Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232974
b: refs/heads/master
c: c0e5e46
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Feb 7, 2011
1 parent bf1da19 commit a337f88
Show file tree
Hide file tree
Showing 2 changed files with 10 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: d69043e8069f493ebee9472bcc78b3f54c5c27d9
refs/heads/master: c0e5e46f3911a451b6915feda709fd1b9b7f026a
12 changes: 9 additions & 3 deletions trunk/arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,8 +1355,11 @@ static int update_cpu_associativity_changes_mask(void)
return nr_cpus;
}

/* 6 64-bit registers unpacked into 12 32-bit associativity values */
#define VPHN_ASSOC_BUFSIZE (6*sizeof(u64)/sizeof(u32))
/*
* 6 64-bit registers unpacked into 12 32-bit associativity values. To form
* the complete property we have to add the length in the first cell.
*/
#define VPHN_ASSOC_BUFSIZE (6*sizeof(u64)/sizeof(u32) + 1)

/*
* Convert the associativity domain numbers returned from the hypervisor
Expand All @@ -1371,7 +1374,7 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
#define VPHN_FIELD_MSB (0x8000)
#define VPHN_FIELD_MASK (~VPHN_FIELD_MSB)

for (i = 0; i < VPHN_ASSOC_BUFSIZE; i++) {
for (i = 1; i < VPHN_ASSOC_BUFSIZE; i++) {
if (*field == VPHN_FIELD_UNUSED) {
/* All significant fields processed, and remaining
* fields contain the reserved value of all 1's.
Expand All @@ -1394,6 +1397,9 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
}
}

/* The first cell contains the length of the property */
unpacked[0] = nr_assoc_doms;

return nr_assoc_doms;
}

Expand Down

0 comments on commit a337f88

Please sign in to comment.