diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-10 05:32:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-10 05:32:52 -0400 |
commit | e92b4fdacc6a7d8cc7895b81347671d5fcd6c5e1 (patch) | |
tree | 4f84567261682d8ec2ad4102bce1ff970a6eed1a /arch/x86/kernel/pci-calgary_64.c | |
parent | 9fcaff0e660d886e9a766460adbe558dd25de31b (diff) | |
parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) |
Merge commit 'v2.6.27-rc6' into x86/iommu
Diffstat (limited to 'arch/x86/kernel/pci-calgary_64.c')
-rw-r--r-- | arch/x86/kernel/pci-calgary_64.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index afb020fdb19c..8415d92853c4 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -343,9 +343,8 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, | |||
343 | /* were we called with bad_dma_address? */ | 343 | /* were we called with bad_dma_address? */ |
344 | badend = bad_dma_address + (EMERGENCY_PAGES * PAGE_SIZE); | 344 | badend = bad_dma_address + (EMERGENCY_PAGES * PAGE_SIZE); |
345 | if (unlikely((dma_addr >= bad_dma_address) && (dma_addr < badend))) { | 345 | if (unlikely((dma_addr >= bad_dma_address) && (dma_addr < badend))) { |
346 | printk(KERN_ERR "Calgary: driver tried unmapping bad DMA " | 346 | WARN(1, KERN_ERR "Calgary: driver tried unmapping bad DMA " |
347 | "address 0x%Lx\n", dma_addr); | 347 | "address 0x%Lx\n", dma_addr); |
348 | WARN_ON(1); | ||
349 | return; | 348 | return; |
350 | } | 349 | } |
351 | 350 | ||
@@ -1283,13 +1282,15 @@ static inline int __init determine_tce_table_size(u64 ram) | |||
1283 | static int __init build_detail_arrays(void) | 1282 | static int __init build_detail_arrays(void) |
1284 | { | 1283 | { |
1285 | unsigned long ptr; | 1284 | unsigned long ptr; |
1286 | int i, scal_detail_size, rio_detail_size; | 1285 | unsigned numnodes, i; |
1286 | int scal_detail_size, rio_detail_size; | ||
1287 | 1287 | ||
1288 | if (rio_table_hdr->num_scal_dev > MAX_NUMNODES){ | 1288 | numnodes = rio_table_hdr->num_scal_dev; |
1289 | if (numnodes > MAX_NUMNODES){ | ||
1289 | printk(KERN_WARNING | 1290 | printk(KERN_WARNING |
1290 | "Calgary: MAX_NUMNODES too low! Defined as %d, " | 1291 | "Calgary: MAX_NUMNODES too low! Defined as %d, " |
1291 | "but system has %d nodes.\n", | 1292 | "but system has %d nodes.\n", |
1292 | MAX_NUMNODES, rio_table_hdr->num_scal_dev); | 1293 | MAX_NUMNODES, numnodes); |
1293 | return -ENODEV; | 1294 | return -ENODEV; |
1294 | } | 1295 | } |
1295 | 1296 | ||
@@ -1310,8 +1311,7 @@ static int __init build_detail_arrays(void) | |||
1310 | } | 1311 | } |
1311 | 1312 | ||
1312 | ptr = ((unsigned long)rio_table_hdr) + 3; | 1313 | ptr = ((unsigned long)rio_table_hdr) + 3; |
1313 | for (i = 0; i < rio_table_hdr->num_scal_dev; | 1314 | for (i = 0; i < numnodes; i++, ptr += scal_detail_size) |
1314 | i++, ptr += scal_detail_size) | ||
1315 | scal_devs[i] = (struct scal_detail *)ptr; | 1315 | scal_devs[i] = (struct scal_detail *)ptr; |
1316 | 1316 | ||
1317 | for (i = 0; i < rio_table_hdr->num_rio_dev; | 1317 | for (i = 0; i < rio_table_hdr->num_rio_dev; |