Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196672
b: refs/heads/master
c: bc8449c
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed May 21, 2010
1 parent 0cd373e commit ff6d6c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: 56608209d34b8add40af54031d4e420afbcde9f6
refs/heads/master: bc8449cc57898bc9cf1ffc4619d026f77bf327c1
20 changes: 12 additions & 8 deletions trunk/arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ static int __init find_min_common_depth(void)
const unsigned int *ref_points;
struct device_node *rtas_root;
unsigned int len;
struct device_node *options;
struct device_node *chosen;
const char *vec5;

rtas_root = of_find_node_by_path("/rtas");

Expand All @@ -289,14 +290,17 @@ static int __init find_min_common_depth(void)
"ibm,associativity-reference-points", &len);

/*
* For type 1 affinity information we want the first field
* For form 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;
#define VEC5_AFFINITY_BYTE 5
#define VEC5_AFFINITY 0x80
chosen = of_find_node_by_path("/chosen");
if (chosen) {
vec5 = of_get_property(chosen, "ibm,architecture-vec-5", NULL);
if (vec5 && (vec5[VEC5_AFFINITY_BYTE] & VEC5_AFFINITY)) {
dbg("Using form 1 affinity\n");
index = 0;
}
}

if ((len >= 2 * sizeof(unsigned int)) && ref_points) {
Expand Down

0 comments on commit ff6d6c3

Please sign in to comment.