Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190408
b: refs/heads/master
c: 4b83c33
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Apr 28, 2010
1 parent 1b1d21a commit 19329ab
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbc9632a8c25c6efcc1ca3f3a2177c855b6e053e
refs/heads/master: 4b83c330b4d38e869111bda6e9077d4f61ed974a
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/kernel/prom_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ static void __init early_cmdline_parse(void)
#else
#define OV5_CMO 0x00
#endif
#define OV5_TYPE1_AFFINITY 0x80 /* Type 1 NUMA affinity */

/* Option Vector 6: IBM PAPR hints */
#define OV6_LINUX 0x02 /* Linux is our OS */
Expand Down Expand Up @@ -706,7 +707,7 @@ static unsigned char ibm_architecture_vec[] = {
OV5_DONATE_DEDICATE_CPU | OV5_MSI,
0,
OV5_CMO,
0,
OV5_TYPE1_AFFINITY,
0,
0,
0,
Expand Down
17 changes: 15 additions & 2 deletions trunk/arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,11 @@ EXPORT_SYMBOL_GPL(of_node_to_nid);
*/
static int __init find_min_common_depth(void)
{
int depth;
int depth, index;
const unsigned int *ref_points;
struct device_node *rtas_root;
unsigned int len;
struct device_node *options;

rtas_root = of_find_node_by_path("/rtas");

Expand All @@ -258,11 +259,23 @@ static int __init find_min_common_depth(void)
* configuration (should be all 0's) and the second is for a normal
* NUMA configuration.
*/
index = 1;
ref_points = of_get_property(rtas_root,
"ibm,associativity-reference-points", &len);

/*
* For type 1 affinity information we want the first field
*/
options = of_find_node_by_path("/options");
if (options) {
const char *str;
str = of_get_property(options, "ibm,associativity-form", NULL);
if (str && !strcmp(str, "1"))
index = 0;
}

if ((len >= 2 * sizeof(unsigned int)) && ref_points) {
depth = ref_points[1];
depth = ref_points[index];
} else {
dbg("NUMA: ibm,associativity-reference-points not found.\n");
depth = -1;
Expand Down

0 comments on commit 19329ab

Please sign in to comment.