@@ -138,7 +138,7 @@ static void __init move_device_tree(void)
138138}
139139
140140/*
141- * ibm,pa-features is a per-cpu property that contains a string of
141+ * ibm,pa/pi -features is a per-cpu property that contains a string of
142142 * attribute descriptors, each of which has a 2 byte header plus up
143143 * to 254 bytes worth of processor attribute bits. First header
144144 * byte specifies the number of bytes following the header.
@@ -150,15 +150,17 @@ static void __init move_device_tree(void)
150150 * is supported/not supported. Note that the bit numbers are
151151 * big-endian to match the definition in PAPR.
152152 */
153- static struct ibm_pa_feature {
153+ struct ibm_feature {
154154 unsigned long cpu_features ; /* CPU_FTR_xxx bit */
155155 unsigned long mmu_features ; /* MMU_FTR_xxx bit */
156156 unsigned int cpu_user_ftrs ; /* PPC_FEATURE_xxx bit */
157157 unsigned int cpu_user_ftrs2 ; /* PPC_FEATURE2_xxx bit */
158- unsigned char pabyte ; /* byte number in ibm,pa-features */
158+ unsigned char pabyte ; /* byte number in ibm,pa/pi -features */
159159 unsigned char pabit ; /* bit number (big-endian) */
160160 unsigned char invert ; /* if 1, pa bit set => clear feature */
161- } ibm_pa_features [] __initdata = {
161+ };
162+
163+ static struct ibm_feature ibm_pa_features [] __initdata = {
162164 { .pabyte = 0 , .pabit = 0 , .cpu_user_ftrs = PPC_FEATURE_HAS_MMU },
163165 { .pabyte = 0 , .pabit = 1 , .cpu_user_ftrs = PPC_FEATURE_HAS_FPU },
164166 { .pabyte = 0 , .pabit = 3 , .cpu_features = CPU_FTR_CTRL },
@@ -180,9 +182,19 @@ static struct ibm_pa_feature {
180182 { .pabyte = 64 , .pabit = 0 , .cpu_features = CPU_FTR_DAWR1 },
181183};
182184
185+ /*
186+ * ibm,pi-features property provides the support of processor specific
187+ * options not described in ibm,pa-features. Right now use byte 0, bit 3
188+ * which indicates the occurrence of DSI interrupt when the paste operation
189+ * on the suspended NX window.
190+ */
191+ static struct ibm_feature ibm_pi_features [] __initdata = {
192+ { .pabyte = 0 , .pabit = 3 , .mmu_features = MMU_FTR_NX_DSI },
193+ };
194+
183195static void __init scan_features (unsigned long node , const unsigned char * ftrs ,
184196 unsigned long tablelen ,
185- struct ibm_pa_feature * fp ,
197+ struct ibm_feature * fp ,
186198 unsigned long ft_size )
187199{
188200 unsigned long i , len , bit ;
@@ -219,17 +231,18 @@ static void __init scan_features(unsigned long node, const unsigned char *ftrs,
219231 }
220232}
221233
222- static void __init check_cpu_pa_features (unsigned long node )
234+ static void __init check_cpu_features (unsigned long node , char * name ,
235+ struct ibm_feature * fp ,
236+ unsigned long size )
223237{
224238 const unsigned char * pa_ftrs ;
225239 int tablelen ;
226240
227- pa_ftrs = of_get_flat_dt_prop (node , "ibm,pa-features" , & tablelen );
241+ pa_ftrs = of_get_flat_dt_prop (node , name , & tablelen );
228242 if (pa_ftrs == NULL )
229243 return ;
230244
231- scan_features (node , pa_ftrs , tablelen ,
232- ibm_pa_features , ARRAY_SIZE (ibm_pa_features ));
245+ scan_features (node , pa_ftrs , tablelen , fp , size );
233246}
234247
235248#ifdef CONFIG_PPC_64S_HASH_MMU
@@ -383,7 +396,10 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
383396 identify_cpu (0 , be32_to_cpup (prop ));
384397
385398 check_cpu_feature_properties (node );
386- check_cpu_pa_features (node );
399+ check_cpu_features (node , "ibm,pa-features" , ibm_pa_features ,
400+ ARRAY_SIZE (ibm_pa_features ));
401+ check_cpu_features (node , "ibm,pi-features" , ibm_pi_features ,
402+ ARRAY_SIZE (ibm_pi_features ));
387403 }
388404
389405 identical_pvr_fixup (node );
0 commit comments