diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 3 | ||||
-rw-r--r-- | arch/powerpc/mm/numa.c | 17 |
2 files changed, 17 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 5f306c4946e5..97d4bd9442d3 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -653,6 +653,7 @@ static void __init early_cmdline_parse(void) | |||
653 | #else | 653 | #else |
654 | #define OV5_CMO 0x00 | 654 | #define OV5_CMO 0x00 |
655 | #endif | 655 | #endif |
656 | #define OV5_TYPE1_AFFINITY 0x80 /* Type 1 NUMA affinity */ | ||
656 | 657 | ||
657 | /* Option Vector 6: IBM PAPR hints */ | 658 | /* Option Vector 6: IBM PAPR hints */ |
658 | #define OV6_LINUX 0x02 /* Linux is our OS */ | 659 | #define OV6_LINUX 0x02 /* Linux is our OS */ |
@@ -706,7 +707,7 @@ static unsigned char ibm_architecture_vec[] = { | |||
706 | OV5_DONATE_DEDICATE_CPU | OV5_MSI, | 707 | OV5_DONATE_DEDICATE_CPU | OV5_MSI, |
707 | 0, | 708 | 0, |
708 | OV5_CMO, | 709 | OV5_CMO, |
709 | 0, | 710 | OV5_TYPE1_AFFINITY, |
710 | 0, | 711 | 0, |
711 | 0, | 712 | 0, |
712 | 0, | 713 | 0, |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 64c00227b997..eaa7633515b7 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -242,10 +242,11 @@ EXPORT_SYMBOL_GPL(of_node_to_nid); | |||
242 | */ | 242 | */ |
243 | static int __init find_min_common_depth(void) | 243 | static int __init find_min_common_depth(void) |
244 | { | 244 | { |
245 | int depth; | 245 | int depth, index; |
246 | const unsigned int *ref_points; | 246 | const unsigned int *ref_points; |
247 | struct device_node *rtas_root; | 247 | struct device_node *rtas_root; |
248 | unsigned int len; | 248 | unsigned int len; |
249 | struct device_node *options; | ||
249 | 250 | ||
250 | rtas_root = of_find_node_by_path("/rtas"); | 251 | rtas_root = of_find_node_by_path("/rtas"); |
251 | 252 | ||
@@ -258,11 +259,23 @@ static int __init find_min_common_depth(void) | |||
258 | * configuration (should be all 0's) and the second is for a normal | 259 | * configuration (should be all 0's) and the second is for a normal |
259 | * NUMA configuration. | 260 | * NUMA configuration. |
260 | */ | 261 | */ |
262 | index = 1; | ||
261 | ref_points = of_get_property(rtas_root, | 263 | ref_points = of_get_property(rtas_root, |
262 | "ibm,associativity-reference-points", &len); | 264 | "ibm,associativity-reference-points", &len); |
263 | 265 | ||
266 | /* | ||
267 | * For type 1 affinity information we want the first field | ||
268 | */ | ||
269 | options = of_find_node_by_path("/options"); | ||
270 | if (options) { | ||
271 | const char *str; | ||
272 | str = of_get_property(options, "ibm,associativity-form", NULL); | ||
273 | if (str && !strcmp(str, "1")) | ||
274 | index = 0; | ||
275 | } | ||
276 | |||
264 | if ((len >= 2 * sizeof(unsigned int)) && ref_points) { | 277 | if ((len >= 2 * sizeof(unsigned int)) && ref_points) { |
265 | depth = ref_points[1]; | 278 | depth = ref_points[index]; |
266 | } else { | 279 | } else { |
267 | dbg("NUMA: ibm,associativity-reference-points not found.\n"); | 280 | dbg("NUMA: ibm,associativity-reference-points not found.\n"); |
268 | depth = -1; | 281 | depth = -1; |