diff options
-rw-r--r-- | arch/x86_64/kernel/aperture.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/pci-gart.c | 2 | ||||
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c index a52af5820592..a3d450d6c15b 100644 --- a/arch/x86_64/kernel/aperture.c +++ b/arch/x86_64/kernel/aperture.c | |||
@@ -86,7 +86,7 @@ static int __init aperture_valid(u64 aper_base, u32 aper_size) | |||
86 | printk("Aperture too small (%d MB)\n", aper_size>>20); | 86 | printk("Aperture too small (%d MB)\n", aper_size>>20); |
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | if (aper_base + aper_size >= 0xffffffff) { | 89 | if (aper_base + aper_size > 0x100000000UL) { |
90 | printk("Aperture beyond 4GB. Ignoring.\n"); | 90 | printk("Aperture beyond 4GB. Ignoring.\n"); |
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 373ef66ca1dc..ae091cdc1a4d 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -476,7 +476,7 @@ static __init unsigned read_aperture(struct pci_dev *dev, u32 *size) | |||
476 | aper_base <<= 25; | 476 | aper_base <<= 25; |
477 | 477 | ||
478 | aper_size = (32 * 1024 * 1024) << aper_order; | 478 | aper_size = (32 * 1024 * 1024) << aper_order; |
479 | if (aper_base + aper_size >= 0xffffffff || !aper_size) | 479 | if (aper_base + aper_size > 0x100000000UL || !aper_size) |
480 | aper_base = 0; | 480 | aper_base = 0; |
481 | 481 | ||
482 | *size = aper_size; | 482 | *size = aper_size; |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index c9f0f250d78f..801abdd29066 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -268,7 +268,7 @@ static int __devinit aperture_valid(u64 aper, u32 size) | |||
268 | printk(KERN_ERR PFX "Aperture too small (%d MB)\n", size>>20); | 268 | printk(KERN_ERR PFX "Aperture too small (%d MB)\n", size>>20); |
269 | return 0; | 269 | return 0; |
270 | } | 270 | } |
271 | if (aper + size > 0xffffffff) { | 271 | if ((u64)aper + size > 0x100000000ULL) { |
272 | printk(KERN_ERR PFX "Aperture out of bounds\n"); | 272 | printk(KERN_ERR PFX "Aperture out of bounds\n"); |
273 | return 0; | 273 | return 0; |
274 | } | 274 | } |