aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-25 01:14:09 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 07:10:38 -0400
commitc987d12f8455b19b3b057d63bac3de161bd809fc (patch)
treeeb42d14516ea0d24d023d00ed0100cbee42df28c /arch/x86/kernel
parentf47f9d538ecc938bed589e9d39ad7b454f3b506c (diff)
x86: remove end_pfn in 64bit
and use max_pfn directly. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/aperture_64.c6
-rw-r--r--arch/x86/kernel/e820.c2
-rw-r--r--arch/x86/kernel/early-quirks.c2
-rw-r--r--arch/x86/kernel/machine_kexec_64.c2
-rw-r--r--arch/x86/kernel/pci-calgary_64.c4
-rw-r--r--arch/x86/kernel/pci-dma.c4
-rw-r--r--arch/x86/kernel/pci-gart_64.c4
-rw-r--r--arch/x86/kernel/pci-swiotlb_64.c2
8 files changed, 14 insertions, 12 deletions
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 600470d464fa..9f907806c1a5 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -407,7 +407,9 @@ void __init gart_iommu_hole_init(void)
407 agp_aper_base == aper_base && 407 agp_aper_base == aper_base &&
408 agp_aper_order == aper_order) { 408 agp_aper_order == aper_order) {
409 /* the same between two setting from NB and agp */ 409 /* the same between two setting from NB and agp */
410 if (!no_iommu && end_pfn > MAX_DMA32_PFN && !printed_gart_size_msg) { 410 if (!no_iommu &&
411 max_pfn > MAX_DMA32_PFN &&
412 !printed_gart_size_msg) {
411 printk(KERN_ERR "you are using iommu with agp, but GART size is less than 64M\n"); 413 printk(KERN_ERR "you are using iommu with agp, but GART size is less than 64M\n");
412 printk(KERN_ERR "please increase GART size in your BIOS setup\n"); 414 printk(KERN_ERR "please increase GART size in your BIOS setup\n");
413 printk(KERN_ERR "if BIOS doesn't have that option, contact your HW vendor!\n"); 415 printk(KERN_ERR "if BIOS doesn't have that option, contact your HW vendor!\n");
@@ -448,7 +450,7 @@ out:
448 /* Got the aperture from the AGP bridge */ 450 /* Got the aperture from the AGP bridge */
449 } else if (swiotlb && !valid_agp) { 451 } else if (swiotlb && !valid_agp) {
450 /* Do nothing */ 452 /* Do nothing */
451 } else if ((!no_iommu && end_pfn > MAX_DMA32_PFN) || 453 } else if ((!no_iommu && max_pfn > MAX_DMA32_PFN) ||
452 force_iommu || 454 force_iommu ||
453 valid_agp || 455 valid_agp ||
454 fallback_aper_force) { 456 fallback_aper_force) {
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 1b76b25b4d9a..3900ff51bc68 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -527,7 +527,7 @@ __init void e820_setup_gap(void)
527 527
528#ifdef CONFIG_X86_64 528#ifdef CONFIG_X86_64
529 if (!found) { 529 if (!found) {
530 gapstart = (end_pfn << PAGE_SHIFT) + 1024*1024; 530 gapstart = (max_pfn << PAGE_SHIFT) + 1024*1024;
531 printk(KERN_ERR "PCI: Warning: Cannot find a gap in the 32bit " 531 printk(KERN_ERR "PCI: Warning: Cannot find a gap in the 32bit "
532 "address range\n" 532 "address range\n"
533 KERN_ERR "PCI: Unassigned devices with 32bit resource " 533 KERN_ERR "PCI: Unassigned devices with 32bit resource "
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 84fd9f2a28ff..a4665f37cfc5 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -50,7 +50,7 @@ static void __init fix_hypertransport_config(int num, int slot, int func)
50static void __init via_bugs(int num, int slot, int func) 50static void __init via_bugs(int num, int slot, int func)
51{ 51{
52#ifdef CONFIG_GART_IOMMU 52#ifdef CONFIG_GART_IOMMU
53 if ((end_pfn > MAX_DMA32_PFN || force_iommu) && 53 if ((max_pfn > MAX_DMA32_PFN || force_iommu) &&
54 !gart_iommu_aperture_allowed) { 54 !gart_iommu_aperture_allowed) {
55 printk(KERN_INFO 55 printk(KERN_INFO
56 "Looks like a VIA chipset. Disabling IOMMU." 56 "Looks like a VIA chipset. Disabling IOMMU."
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index 576a03db4511..7830dc4a8380 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -110,7 +110,7 @@ static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
110{ 110{
111 pgd_t *level4p; 111 pgd_t *level4p;
112 level4p = (pgd_t *)__va(start_pgtable); 112 level4p = (pgd_t *)__va(start_pgtable);
113 return init_level4_page(image, level4p, 0, end_pfn << PAGE_SHIFT); 113 return init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT);
114} 114}
115 115
116static void set_idt(void *newidt, u16 limit) 116static void set_idt(void *newidt, u16 limit)
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index e28ec497e142..6959b5c45df4 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -1394,7 +1394,7 @@ void __init detect_calgary(void)
1394 return; 1394 return;
1395 } 1395 }
1396 1396
1397 specified_table_size = determine_tce_table_size(end_pfn * PAGE_SIZE); 1397 specified_table_size = determine_tce_table_size(max_pfn * PAGE_SIZE);
1398 1398
1399 for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { 1399 for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) {
1400 struct calgary_bus_info *info = &bus_info[bus]; 1400 struct calgary_bus_info *info = &bus_info[bus];
@@ -1459,7 +1459,7 @@ int __init calgary_iommu_init(void)
1459 if (ret) { 1459 if (ret) {
1460 printk(KERN_ERR "PCI-DMA: Calgary init failed %d, " 1460 printk(KERN_ERR "PCI-DMA: Calgary init failed %d, "
1461 "falling back to no_iommu\n", ret); 1461 "falling back to no_iommu\n", ret);
1462 if (end_pfn > MAX_DMA32_PFN) 1462 if (max_pfn > MAX_DMA32_PFN)
1463 printk(KERN_ERR "WARNING more than 4GB of memory, " 1463 printk(KERN_ERR "WARNING more than 4GB of memory, "
1464 "32bit PCI may malfunction.\n"); 1464 "32bit PCI may malfunction.\n");
1465 return ret; 1465 return ret;
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index cb0bdf440715..8467ec2320f1 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -75,7 +75,7 @@ early_param("dma32_size", parse_dma32_size_opt);
75void __init dma32_reserve_bootmem(void) 75void __init dma32_reserve_bootmem(void)
76{ 76{
77 unsigned long size, align; 77 unsigned long size, align;
78 if (end_pfn <= MAX_DMA32_PFN) 78 if (max_pfn <= MAX_DMA32_PFN)
79 return; 79 return;
80 80
81 /* 81 /*
@@ -94,7 +94,7 @@ void __init dma32_reserve_bootmem(void)
94static void __init dma32_free_bootmem(void) 94static void __init dma32_free_bootmem(void)
95{ 95{
96 96
97 if (end_pfn <= MAX_DMA32_PFN) 97 if (max_pfn <= MAX_DMA32_PFN)
98 return; 98 return;
99 99
100 if (!dma32_bootmem_ptr) 100 if (!dma32_bootmem_ptr)
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 021f3c684a62..d0d18db5d2a4 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -751,10 +751,10 @@ void __init gart_iommu_init(void)
751 return; 751 return;
752 752
753 if (no_iommu || 753 if (no_iommu ||
754 (!force_iommu && end_pfn <= MAX_DMA32_PFN) || 754 (!force_iommu && max_pfn <= MAX_DMA32_PFN) ||
755 !gart_iommu_aperture || 755 !gart_iommu_aperture ||
756 (no_agp && init_k8_gatt(&info) < 0)) { 756 (no_agp && init_k8_gatt(&info) < 0)) {
757 if (end_pfn > MAX_DMA32_PFN) { 757 if (max_pfn > MAX_DMA32_PFN) {
758 printk(KERN_WARNING "More than 4GB of memory " 758 printk(KERN_WARNING "More than 4GB of memory "
759 "but GART IOMMU not available.\n" 759 "but GART IOMMU not available.\n"
760 KERN_WARNING "falling back to iommu=soft.\n"); 760 KERN_WARNING "falling back to iommu=soft.\n");
diff --git a/arch/x86/kernel/pci-swiotlb_64.c b/arch/x86/kernel/pci-swiotlb_64.c
index 490da7f4b8d0..82299cd1d04d 100644
--- a/arch/x86/kernel/pci-swiotlb_64.c
+++ b/arch/x86/kernel/pci-swiotlb_64.c
@@ -38,7 +38,7 @@ const struct dma_mapping_ops swiotlb_dma_ops = {
38void __init pci_swiotlb_init(void) 38void __init pci_swiotlb_init(void)
39{ 39{
40 /* don't initialize swiotlb if iommu=off (no_iommu=1) */ 40 /* don't initialize swiotlb if iommu=off (no_iommu=1) */
41 if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN) 41 if (!iommu_detected && !no_iommu && max_pfn > MAX_DMA32_PFN)
42 swiotlb = 1; 42 swiotlb = 1;
43 if (swiotlb_force) 43 if (swiotlb_force)
44 swiotlb = 1; 44 swiotlb = 1;