Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109034
b: refs/heads/master
c: 85d5779
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Ingo Molnar committed Aug 21, 2008
1 parent 99e7c3e commit 60fd679
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 80a8c9fffa78f57d7d4351af2f15a56386805ceb
refs/heads/master: 85d577979a8a94a32ca1d828a91c2eb8300bc9f2
11 changes: 6 additions & 5 deletions trunk/arch/x86/kernel/pci-calgary_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,13 +1269,15 @@ static inline int __init determine_tce_table_size(u64 ram)
static int __init build_detail_arrays(void)
{
unsigned long ptr;
int i, scal_detail_size, rio_detail_size;
unsigned numnodes, i;
int scal_detail_size, rio_detail_size;

if (rio_table_hdr->num_scal_dev > MAX_NUMNODES){
numnodes = rio_table_hdr->num_scal_dev;
if (numnodes > MAX_NUMNODES){
printk(KERN_WARNING
"Calgary: MAX_NUMNODES too low! Defined as %d, "
"but system has %d nodes.\n",
MAX_NUMNODES, rio_table_hdr->num_scal_dev);
MAX_NUMNODES, numnodes);
return -ENODEV;
}

Expand All @@ -1296,8 +1298,7 @@ static int __init build_detail_arrays(void)
}

ptr = ((unsigned long)rio_table_hdr) + 3;
for (i = 0; i < rio_table_hdr->num_scal_dev;
i++, ptr += scal_detail_size)
for (i = 0; i < numnodes; i++, ptr += scal_detail_size)
scal_devs[i] = (struct scal_detail *)ptr;

for (i = 0; i < rio_table_hdr->num_rio_dev;
Expand Down

0 comments on commit 60fd679

Please sign in to comment.