diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/cpufeature.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/fixmap.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/fixmap_32.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/highmem.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/irq_vectors.h | 20 | ||||
-rw-r--r-- | arch/x86/include/asm/topology.h | 7 | ||||
-rw-r--r-- | arch/x86/include/asm/voyager.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 9 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/e820.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/reboot.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/tlb_32.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/tlb_64.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/tsc.c | 8 | ||||
-rw-r--r-- | arch/x86/mach-voyager/setup.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-voyager/voyager_smp.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/Makefile | 2 | ||||
-rw-r--r-- | arch/x86/mm/init_32.c | 3 | ||||
-rw-r--r-- | arch/x86/mm/iomap_32.c | 59 | ||||
-rw-r--r-- | arch/x86/mm/pageattr.c | 8 |
22 files changed, 120 insertions, 50 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6f20718d3156..4cf0ab13d187 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1494,7 +1494,7 @@ config HAVE_ARCH_EARLY_PFN_TO_NID | |||
1494 | def_bool X86_64 | 1494 | def_bool X86_64 |
1495 | depends on NUMA | 1495 | depends on NUMA |
1496 | 1496 | ||
1497 | menu "Power management options" | 1497 | menu "Power management and ACPI options" |
1498 | depends on !X86_VOYAGER | 1498 | depends on !X86_VOYAGER |
1499 | 1499 | ||
1500 | config ARCH_HIBERNATION_HEADER | 1500 | config ARCH_HIBERNATION_HEADER |
@@ -1894,6 +1894,10 @@ config SYSVIPC_COMPAT | |||
1894 | endmenu | 1894 | endmenu |
1895 | 1895 | ||
1896 | 1896 | ||
1897 | config HAVE_ATOMIC_IOMAP | ||
1898 | def_bool y | ||
1899 | depends on X86_32 | ||
1900 | |||
1897 | source "net/Kconfig" | 1901 | source "net/Kconfig" |
1898 | 1902 | ||
1899 | source "drivers/Kconfig" | 1903 | source "drivers/Kconfig" |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index f73e95d75b45..cfdf8c2c5c31 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -91,7 +91,7 @@ | |||
91 | #define X86_FEATURE_11AP (3*32+19) /* "" Bad local APIC aka 11AP */ | 91 | #define X86_FEATURE_11AP (3*32+19) /* "" Bad local APIC aka 11AP */ |
92 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ | 92 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ |
93 | #define X86_FEATURE_AMDC1E (3*32+21) /* AMD C1E detected */ | 93 | #define X86_FEATURE_AMDC1E (3*32+21) /* AMD C1E detected */ |
94 | #define X86_FEATURE_XTOPOLOGY (3*32+21) /* cpu topology enum extensions */ | 94 | #define X86_FEATURE_XTOPOLOGY (3*32+22) /* cpu topology enum extensions */ |
95 | 95 | ||
96 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 96 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
97 | #define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */ | 97 | #define X86_FEATURE_XMM3 (4*32+ 0) /* "pni" SSE-3 */ |
diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index 8668a94f850e..23696d44a0af 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include/asm/fixmap.h | |||
@@ -9,6 +9,10 @@ | |||
9 | 9 | ||
10 | extern int fixmaps_set; | 10 | extern int fixmaps_set; |
11 | 11 | ||
12 | extern pte_t *kmap_pte; | ||
13 | extern pgprot_t kmap_prot; | ||
14 | extern pte_t *pkmap_page_table; | ||
15 | |||
12 | void __native_set_fixmap(enum fixed_addresses idx, pte_t pte); | 16 | void __native_set_fixmap(enum fixed_addresses idx, pte_t pte); |
13 | void native_set_fixmap(enum fixed_addresses idx, | 17 | void native_set_fixmap(enum fixed_addresses idx, |
14 | unsigned long phys, pgprot_t flags); | 18 | unsigned long phys, pgprot_t flags); |
diff --git a/arch/x86/include/asm/fixmap_32.h b/arch/x86/include/asm/fixmap_32.h index 09f29ab5c139..c7115c1d7217 100644 --- a/arch/x86/include/asm/fixmap_32.h +++ b/arch/x86/include/asm/fixmap_32.h | |||
@@ -28,10 +28,8 @@ extern unsigned long __FIXADDR_TOP; | |||
28 | #include <asm/acpi.h> | 28 | #include <asm/acpi.h> |
29 | #include <asm/apicdef.h> | 29 | #include <asm/apicdef.h> |
30 | #include <asm/page.h> | 30 | #include <asm/page.h> |
31 | #ifdef CONFIG_HIGHMEM | ||
32 | #include <linux/threads.h> | 31 | #include <linux/threads.h> |
33 | #include <asm/kmap_types.h> | 32 | #include <asm/kmap_types.h> |
34 | #endif | ||
35 | 33 | ||
36 | /* | 34 | /* |
37 | * Here we define all the compile-time 'special' virtual | 35 | * Here we define all the compile-time 'special' virtual |
@@ -75,10 +73,8 @@ enum fixed_addresses { | |||
75 | #ifdef CONFIG_X86_CYCLONE_TIMER | 73 | #ifdef CONFIG_X86_CYCLONE_TIMER |
76 | FIX_CYCLONE_TIMER, /*cyclone timer register*/ | 74 | FIX_CYCLONE_TIMER, /*cyclone timer register*/ |
77 | #endif | 75 | #endif |
78 | #ifdef CONFIG_HIGHMEM | ||
79 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ | 76 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ |
80 | FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, | 77 | FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, |
81 | #endif | ||
82 | #ifdef CONFIG_PCI_MMCONFIG | 78 | #ifdef CONFIG_PCI_MMCONFIG |
83 | FIX_PCIE_MCFG, | 79 | FIX_PCIE_MCFG, |
84 | #endif | 80 | #endif |
diff --git a/arch/x86/include/asm/highmem.h b/arch/x86/include/asm/highmem.h index a3b3b7c3027b..bf9276bea660 100644 --- a/arch/x86/include/asm/highmem.h +++ b/arch/x86/include/asm/highmem.h | |||
@@ -25,14 +25,11 @@ | |||
25 | #include <asm/kmap_types.h> | 25 | #include <asm/kmap_types.h> |
26 | #include <asm/tlbflush.h> | 26 | #include <asm/tlbflush.h> |
27 | #include <asm/paravirt.h> | 27 | #include <asm/paravirt.h> |
28 | #include <asm/fixmap.h> | ||
28 | 29 | ||
29 | /* declarations for highmem.c */ | 30 | /* declarations for highmem.c */ |
30 | extern unsigned long highstart_pfn, highend_pfn; | 31 | extern unsigned long highstart_pfn, highend_pfn; |
31 | 32 | ||
32 | extern pte_t *kmap_pte; | ||
33 | extern pgprot_t kmap_prot; | ||
34 | extern pte_t *pkmap_page_table; | ||
35 | |||
36 | /* | 33 | /* |
37 | * Right now we initialize only a single pte table. It can be extended | 34 | * Right now we initialize only a single pte table. It can be extended |
38 | * easily, subsequent pte tables have to be allocated in one physical | 35 | * easily, subsequent pte tables have to be allocated in one physical |
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index d843ed0e9b2e..0005adb0f941 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h | |||
@@ -101,30 +101,22 @@ | |||
101 | #define LAST_VM86_IRQ 15 | 101 | #define LAST_VM86_IRQ 15 |
102 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) | 102 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) |
103 | 103 | ||
104 | #ifdef CONFIG_X86_64 | 104 | #if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_VOYAGER) |
105 | # if NR_CPUS < MAX_IO_APICS | 105 | # if NR_CPUS < MAX_IO_APICS |
106 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) | 106 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) |
107 | # else | 107 | # else |
108 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) | 108 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) |
109 | # endif | 109 | # endif |
110 | 110 | ||
111 | #elif !defined(CONFIG_X86_VOYAGER) | 111 | #elif defined(CONFIG_X86_VOYAGER) |
112 | 112 | ||
113 | # if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) | 113 | # define NR_IRQS 224 |
114 | |||
115 | # define NR_IRQS 224 | ||
116 | |||
117 | # else /* IO_APIC || PARAVIRT */ | ||
118 | |||
119 | # define NR_IRQS 16 | ||
120 | |||
121 | # endif | ||
122 | 114 | ||
123 | #else /* !VISWS && !VOYAGER */ | 115 | #else /* IO_APIC || VOYAGER */ |
124 | 116 | ||
125 | # define NR_IRQS 224 | 117 | # define NR_IRQS 16 |
126 | 118 | ||
127 | #endif /* VISWS */ | 119 | #endif |
128 | 120 | ||
129 | /* Voyager specific defines */ | 121 | /* Voyager specific defines */ |
130 | /* These define the CPIs we use in linux */ | 122 | /* These define the CPIs we use in linux */ |
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 90ac7718469a..4850e4b02b61 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -154,7 +154,7 @@ extern unsigned long node_remap_size[]; | |||
154 | 154 | ||
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | /* sched_domains SD_NODE_INIT for NUMAQ machines */ | 157 | /* sched_domains SD_NODE_INIT for NUMA machines */ |
158 | #define SD_NODE_INIT (struct sched_domain) { \ | 158 | #define SD_NODE_INIT (struct sched_domain) { \ |
159 | .min_interval = 8, \ | 159 | .min_interval = 8, \ |
160 | .max_interval = 32, \ | 160 | .max_interval = 32, \ |
@@ -169,8 +169,9 @@ extern unsigned long node_remap_size[]; | |||
169 | .flags = SD_LOAD_BALANCE \ | 169 | .flags = SD_LOAD_BALANCE \ |
170 | | SD_BALANCE_EXEC \ | 170 | | SD_BALANCE_EXEC \ |
171 | | SD_BALANCE_FORK \ | 171 | | SD_BALANCE_FORK \ |
172 | | SD_SERIALIZE \ | 172 | | SD_WAKE_AFFINE \ |
173 | | SD_WAKE_BALANCE, \ | 173 | | SD_WAKE_BALANCE \ |
174 | | SD_SERIALIZE, \ | ||
174 | .last_balance = jiffies, \ | 175 | .last_balance = jiffies, \ |
175 | .balance_interval = 1, \ | 176 | .balance_interval = 1, \ |
176 | } | 177 | } |
diff --git a/arch/x86/include/asm/voyager.h b/arch/x86/include/asm/voyager.h index 9c811d2e6f91..b3e647307625 100644 --- a/arch/x86/include/asm/voyager.h +++ b/arch/x86/include/asm/voyager.h | |||
@@ -520,6 +520,7 @@ extern void voyager_restart(void); | |||
520 | extern void voyager_cat_power_off(void); | 520 | extern void voyager_cat_power_off(void); |
521 | extern void voyager_cat_do_common_interrupt(void); | 521 | extern void voyager_cat_do_common_interrupt(void); |
522 | extern void voyager_handle_nmi(void); | 522 | extern void voyager_handle_nmi(void); |
523 | extern void voyager_smp_intr_init(void); | ||
523 | /* Commands for the following are */ | 524 | /* Commands for the following are */ |
524 | #define VOYAGER_PSI_READ 0 | 525 | #define VOYAGER_PSI_READ 0 |
525 | #define VOYAGER_PSI_WRITE 1 | 526 | #define VOYAGER_PSI_WRITE 1 |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index a8fd9ebdc8e2..331b318304eb 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -50,7 +50,7 @@ static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, | |||
50 | /* returns !0 if the IOMMU is caching non-present entries in its TLB */ | 50 | /* returns !0 if the IOMMU is caching non-present entries in its TLB */ |
51 | static int iommu_has_npcache(struct amd_iommu *iommu) | 51 | static int iommu_has_npcache(struct amd_iommu *iommu) |
52 | { | 52 | { |
53 | return iommu->cap & IOMMU_CAP_NPCACHE; | 53 | return iommu->cap & (1UL << IOMMU_CAP_NPCACHE); |
54 | } | 54 | } |
55 | 55 | ||
56 | /**************************************************************************** | 56 | /**************************************************************************** |
@@ -536,6 +536,9 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom, | |||
536 | { | 536 | { |
537 | address >>= PAGE_SHIFT; | 537 | address >>= PAGE_SHIFT; |
538 | iommu_area_free(dom->bitmap, address, pages); | 538 | iommu_area_free(dom->bitmap, address, pages); |
539 | |||
540 | if (address + pages >= dom->next_bit) | ||
541 | dom->need_flush = true; | ||
539 | } | 542 | } |
540 | 543 | ||
541 | /**************************************************************************** | 544 | /**************************************************************************** |
@@ -992,8 +995,10 @@ static void __unmap_single(struct amd_iommu *iommu, | |||
992 | 995 | ||
993 | dma_ops_free_addresses(dma_dom, dma_addr, pages); | 996 | dma_ops_free_addresses(dma_dom, dma_addr, pages); |
994 | 997 | ||
995 | if (amd_iommu_unmap_flush) | 998 | if (amd_iommu_unmap_flush || dma_dom->need_flush) { |
996 | iommu_flush_pages(iommu, dma_dom->domain.id, dma_addr, size); | 999 | iommu_flush_pages(iommu, dma_dom->domain.id, dma_addr, size); |
1000 | dma_dom->need_flush = false; | ||
1001 | } | ||
997 | } | 1002 | } |
998 | 1003 | ||
999 | /* | 1004 | /* |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 003a65395bd5..b9c9ea0217a9 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/pat.h> | 20 | #include <asm/pat.h> |
21 | #include <asm/asm.h> | 21 | #include <asm/asm.h> |
22 | #include <asm/numa.h> | 22 | #include <asm/numa.h> |
23 | #include <asm/smp.h> | ||
23 | #ifdef CONFIG_X86_LOCAL_APIC | 24 | #ifdef CONFIG_X86_LOCAL_APIC |
24 | #include <asm/mpspec.h> | 25 | #include <asm/mpspec.h> |
25 | #include <asm/apic.h> | 26 | #include <asm/apic.h> |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index ce97bf3bed12..7aafeb5263ef 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -1290,15 +1290,17 @@ void __init e820_reserve_resources(void) | |||
1290 | res->start = e820.map[i].addr; | 1290 | res->start = e820.map[i].addr; |
1291 | res->end = end; | 1291 | res->end = end; |
1292 | 1292 | ||
1293 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 1293 | res->flags = IORESOURCE_MEM; |
1294 | 1294 | ||
1295 | /* | 1295 | /* |
1296 | * don't register the region that could be conflicted with | 1296 | * don't register the region that could be conflicted with |
1297 | * pci device BAR resource and insert them later in | 1297 | * pci device BAR resource and insert them later in |
1298 | * pcibios_resource_survey() | 1298 | * pcibios_resource_survey() |
1299 | */ | 1299 | */ |
1300 | if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) | 1300 | if (e820.map[i].type != E820_RESERVED || res->start < (1ULL<<20)) { |
1301 | res->flags |= IORESOURCE_BUSY; | ||
1301 | insert_resource(&iomem_resource, res); | 1302 | insert_resource(&iomem_resource, res); |
1303 | } | ||
1302 | res++; | 1304 | res++; |
1303 | } | 1305 | } |
1304 | 1306 | ||
@@ -1318,7 +1320,7 @@ void __init e820_reserve_resources_late(void) | |||
1318 | res = e820_res; | 1320 | res = e820_res; |
1319 | for (i = 0; i < e820.nr_map; i++) { | 1321 | for (i = 0; i < e820.nr_map; i++) { |
1320 | if (!res->parent && res->end) | 1322 | if (!res->parent && res->end) |
1321 | reserve_region_with_split(&iomem_resource, res->start, res->end, res->name); | 1323 | insert_resource_expand_to_fit(&iomem_resource, res); |
1322 | res++; | 1324 | res++; |
1323 | } | 1325 | } |
1324 | } | 1326 | } |
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index b764d7429c61..7a3f2028e2eb 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -3611,6 +3611,8 @@ int __init probe_nr_irqs(void) | |||
3611 | /* something wrong ? */ | 3611 | /* something wrong ? */ |
3612 | if (nr < nr_min) | 3612 | if (nr < nr_min) |
3613 | nr = nr_min; | 3613 | nr = nr_min; |
3614 | if (WARN_ON(nr > NR_IRQS)) | ||
3615 | nr = NR_IRQS; | ||
3614 | 3616 | ||
3615 | return nr; | 3617 | return nr; |
3616 | } | 3618 | } |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index f4c93f1cfc19..724adfc63cb9 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -29,11 +29,7 @@ EXPORT_SYMBOL(pm_power_off); | |||
29 | 29 | ||
30 | static const struct desc_ptr no_idt = {}; | 30 | static const struct desc_ptr no_idt = {}; |
31 | static int reboot_mode; | 31 | static int reboot_mode; |
32 | /* | 32 | enum reboot_type reboot_type = BOOT_KBD; |
33 | * Keyboard reset and triple fault may result in INIT, not RESET, which | ||
34 | * doesn't work when we're in vmx root mode. Try ACPI first. | ||
35 | */ | ||
36 | enum reboot_type reboot_type = BOOT_ACPI; | ||
37 | int reboot_force; | 33 | int reboot_force; |
38 | 34 | ||
39 | #if defined(CONFIG_X86_32) && defined(CONFIG_SMP) | 35 | #if defined(CONFIG_X86_32) && defined(CONFIG_SMP) |
diff --git a/arch/x86/kernel/tlb_32.c b/arch/x86/kernel/tlb_32.c index e00534b33534..f4049f3513b6 100644 --- a/arch/x86/kernel/tlb_32.c +++ b/arch/x86/kernel/tlb_32.c | |||
@@ -154,6 +154,12 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, | |||
154 | flush_mm = mm; | 154 | flush_mm = mm; |
155 | flush_va = va; | 155 | flush_va = va; |
156 | cpus_or(flush_cpumask, cpumask, flush_cpumask); | 156 | cpus_or(flush_cpumask, cpumask, flush_cpumask); |
157 | |||
158 | /* | ||
159 | * Make the above memory operations globally visible before | ||
160 | * sending the IPI. | ||
161 | */ | ||
162 | smp_mb(); | ||
157 | /* | 163 | /* |
158 | * We have to send the IPI only to | 164 | * We have to send the IPI only to |
159 | * CPUs affected. | 165 | * CPUs affected. |
diff --git a/arch/x86/kernel/tlb_64.c b/arch/x86/kernel/tlb_64.c index dcbf7a1159ea..8f919ca69494 100644 --- a/arch/x86/kernel/tlb_64.c +++ b/arch/x86/kernel/tlb_64.c | |||
@@ -183,6 +183,11 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm, | |||
183 | cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask); | 183 | cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask); |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Make the above memory operations globally visible before | ||
187 | * sending the IPI. | ||
188 | */ | ||
189 | smp_mb(); | ||
190 | /* | ||
186 | * We have to send the IPI only to | 191 | * We have to send the IPI only to |
187 | * CPUs affected. | 192 | * CPUs affected. |
188 | */ | 193 | */ |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 62348e4fd8d1..2ef80e301925 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -813,10 +813,6 @@ void __init tsc_init(void) | |||
813 | cpu_khz = calibrate_cpu(); | 813 | cpu_khz = calibrate_cpu(); |
814 | #endif | 814 | #endif |
815 | 815 | ||
816 | lpj = ((u64)tsc_khz * 1000); | ||
817 | do_div(lpj, HZ); | ||
818 | lpj_fine = lpj; | ||
819 | |||
820 | printk("Detected %lu.%03lu MHz processor.\n", | 816 | printk("Detected %lu.%03lu MHz processor.\n", |
821 | (unsigned long)cpu_khz / 1000, | 817 | (unsigned long)cpu_khz / 1000, |
822 | (unsigned long)cpu_khz % 1000); | 818 | (unsigned long)cpu_khz % 1000); |
@@ -836,6 +832,10 @@ void __init tsc_init(void) | |||
836 | /* now allow native_sched_clock() to use rdtsc */ | 832 | /* now allow native_sched_clock() to use rdtsc */ |
837 | tsc_disabled = 0; | 833 | tsc_disabled = 0; |
838 | 834 | ||
835 | lpj = ((u64)tsc_khz * 1000); | ||
836 | do_div(lpj, HZ); | ||
837 | lpj_fine = lpj; | ||
838 | |||
839 | use_tsc_delay(); | 839 | use_tsc_delay(); |
840 | /* Check and install the TSC clocksource */ | 840 | /* Check and install the TSC clocksource */ |
841 | dmi_check_system(bad_tsc_dmi_table); | 841 | dmi_check_system(bad_tsc_dmi_table); |
diff --git a/arch/x86/mach-voyager/setup.c b/arch/x86/mach-voyager/setup.c index 6bbdd633864c..a580b9562e76 100644 --- a/arch/x86/mach-voyager/setup.c +++ b/arch/x86/mach-voyager/setup.c | |||
@@ -27,7 +27,7 @@ static struct irqaction irq2 = { | |||
27 | void __init intr_init_hook(void) | 27 | void __init intr_init_hook(void) |
28 | { | 28 | { |
29 | #ifdef CONFIG_SMP | 29 | #ifdef CONFIG_SMP |
30 | smp_intr_init(); | 30 | voyager_smp_intr_init(); |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | setup_irq(2, &irq2); | 33 | setup_irq(2, &irq2); |
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c index 7f4c6af14351..0e331652681e 100644 --- a/arch/x86/mach-voyager/voyager_smp.c +++ b/arch/x86/mach-voyager/voyager_smp.c | |||
@@ -1258,7 +1258,7 @@ static void handle_vic_irq(unsigned int irq, struct irq_desc *desc) | |||
1258 | #define QIC_SET_GATE(cpi, vector) \ | 1258 | #define QIC_SET_GATE(cpi, vector) \ |
1259 | set_intr_gate((cpi) + QIC_DEFAULT_CPI_BASE, (vector)) | 1259 | set_intr_gate((cpi) + QIC_DEFAULT_CPI_BASE, (vector)) |
1260 | 1260 | ||
1261 | void __init smp_intr_init(void) | 1261 | void __init voyager_smp_intr_init(void) |
1262 | { | 1262 | { |
1263 | int i; | 1263 | int i; |
1264 | 1264 | ||
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile index 59f89b434b45..fea4565ff576 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ | 1 | obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ |
2 | pat.o pgtable.o gup.o | 2 | pat.o pgtable.o gup.o |
3 | 3 | ||
4 | obj-$(CONFIG_X86_32) += pgtable_32.o | 4 | obj-$(CONFIG_X86_32) += pgtable_32.o iomap_32.o |
5 | 5 | ||
6 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o | 6 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o |
7 | obj-$(CONFIG_X86_PTDUMP) += dump_pagetables.o | 7 | obj-$(CONFIG_X86_PTDUMP) += dump_pagetables.o |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 8396868e82c5..c483f4242079 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -334,7 +334,6 @@ int devmem_is_allowed(unsigned long pagenr) | |||
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
336 | 336 | ||
337 | #ifdef CONFIG_HIGHMEM | ||
338 | pte_t *kmap_pte; | 337 | pte_t *kmap_pte; |
339 | pgprot_t kmap_prot; | 338 | pgprot_t kmap_prot; |
340 | 339 | ||
@@ -357,6 +356,7 @@ static void __init kmap_init(void) | |||
357 | kmap_prot = PAGE_KERNEL; | 356 | kmap_prot = PAGE_KERNEL; |
358 | } | 357 | } |
359 | 358 | ||
359 | #ifdef CONFIG_HIGHMEM | ||
360 | static void __init permanent_kmaps_init(pgd_t *pgd_base) | 360 | static void __init permanent_kmaps_init(pgd_t *pgd_base) |
361 | { | 361 | { |
362 | unsigned long vaddr; | 362 | unsigned long vaddr; |
@@ -436,7 +436,6 @@ static void __init set_highmem_pages_init(void) | |||
436 | #endif /* !CONFIG_NUMA */ | 436 | #endif /* !CONFIG_NUMA */ |
437 | 437 | ||
438 | #else | 438 | #else |
439 | # define kmap_init() do { } while (0) | ||
440 | # define permanent_kmaps_init(pgd_base) do { } while (0) | 439 | # define permanent_kmaps_init(pgd_base) do { } while (0) |
441 | # define set_highmem_pages_init() do { } while (0) | 440 | # define set_highmem_pages_init() do { } while (0) |
442 | #endif /* CONFIG_HIGHMEM */ | 441 | #endif /* CONFIG_HIGHMEM */ |
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c new file mode 100644 index 000000000000..d0151d8ce452 --- /dev/null +++ b/arch/x86/mm/iomap_32.c | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * Copyright © 2008 Ingo Molnar | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but | ||
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
17 | */ | ||
18 | |||
19 | #include <asm/iomap.h> | ||
20 | #include <linux/module.h> | ||
21 | |||
22 | /* Map 'pfn' using fixed map 'type' and protections 'prot' | ||
23 | */ | ||
24 | void * | ||
25 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | ||
26 | { | ||
27 | enum fixed_addresses idx; | ||
28 | unsigned long vaddr; | ||
29 | |||
30 | pagefault_disable(); | ||
31 | |||
32 | idx = type + KM_TYPE_NR*smp_processor_id(); | ||
33 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | ||
34 | set_pte(kmap_pte-idx, pfn_pte(pfn, prot)); | ||
35 | arch_flush_lazy_mmu_mode(); | ||
36 | |||
37 | return (void*) vaddr; | ||
38 | } | ||
39 | EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn); | ||
40 | |||
41 | void | ||
42 | iounmap_atomic(void *kvaddr, enum km_type type) | ||
43 | { | ||
44 | unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; | ||
45 | enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); | ||
46 | |||
47 | /* | ||
48 | * Force other mappings to Oops if they'll try to access this pte | ||
49 | * without first remap it. Keeping stale mappings around is a bad idea | ||
50 | * also, in case the page changes cacheability attributes or becomes | ||
51 | * a protected page in a hypervisor. | ||
52 | */ | ||
53 | if (vaddr == __fix_to_virt(FIX_KMAP_BEGIN+idx)) | ||
54 | kpte_clear_flush(kmap_pte-idx, vaddr); | ||
55 | |||
56 | arch_flush_lazy_mmu_mode(); | ||
57 | pagefault_enable(); | ||
58 | } | ||
59 | EXPORT_SYMBOL_GPL(iounmap_atomic); | ||
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index f1dc1b75d166..e89d24815f26 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -67,18 +67,18 @@ static void split_page_count(int level) | |||
67 | 67 | ||
68 | void arch_report_meminfo(struct seq_file *m) | 68 | void arch_report_meminfo(struct seq_file *m) |
69 | { | 69 | { |
70 | seq_printf(m, "DirectMap4k: %8lu kB\n", | 70 | seq_printf(m, "DirectMap4k: %8lu kB\n", |
71 | direct_pages_count[PG_LEVEL_4K] << 2); | 71 | direct_pages_count[PG_LEVEL_4K] << 2); |
72 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) | 72 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) |
73 | seq_printf(m, "DirectMap2M: %8lu kB\n", | 73 | seq_printf(m, "DirectMap2M: %8lu kB\n", |
74 | direct_pages_count[PG_LEVEL_2M] << 11); | 74 | direct_pages_count[PG_LEVEL_2M] << 11); |
75 | #else | 75 | #else |
76 | seq_printf(m, "DirectMap4M: %8lu kB\n", | 76 | seq_printf(m, "DirectMap4M: %8lu kB\n", |
77 | direct_pages_count[PG_LEVEL_2M] << 12); | 77 | direct_pages_count[PG_LEVEL_2M] << 12); |
78 | #endif | 78 | #endif |
79 | #ifdef CONFIG_X86_64 | 79 | #ifdef CONFIG_X86_64 |
80 | if (direct_gbpages) | 80 | if (direct_gbpages) |
81 | seq_printf(m, "DirectMap1G: %8lu kB\n", | 81 | seq_printf(m, "DirectMap1G: %8lu kB\n", |
82 | direct_pages_count[PG_LEVEL_1G] << 20); | 82 | direct_pages_count[PG_LEVEL_1G] << 20); |
83 | #endif | 83 | #endif |
84 | } | 84 | } |