diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/defconfig | 7 | ||||
-rw-r--r-- | arch/i386/kernel/nmi.c | 3 | ||||
-rw-r--r-- | arch/i386/kernel/setup.c | 10 | ||||
-rw-r--r-- | arch/i386/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/x86_64/defconfig | 8 | ||||
-rw-r--r-- | arch/x86_64/kernel/mpparse.c | 37 | ||||
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 4 | ||||
-rw-r--r-- | arch/x86_64/kernel/pci-dma.c | 93 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 11 | ||||
-rw-r--r-- | arch/x86_64/kernel/vmlinux.lds.S | 14 | ||||
-rw-r--r-- | arch/x86_64/kernel/vsyscall.c | 8 |
11 files changed, 111 insertions, 86 deletions
diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 1a29bfa26d0c..ee2d79bd8af7 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18-git5 | 3 | # Linux kernel version: 2.6.18-git7 |
4 | # Tue Sep 26 09:30:47 2006 | 4 | # Wed Sep 27 21:53:10 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_32=y | 6 | CONFIG_X86_32=y |
7 | CONFIG_GENERIC_TIME=y | 7 | CONFIG_GENERIC_TIME=y |
@@ -210,6 +210,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | |||
210 | CONFIG_PM=y | 210 | CONFIG_PM=y |
211 | CONFIG_PM_LEGACY=y | 211 | CONFIG_PM_LEGACY=y |
212 | # CONFIG_PM_DEBUG is not set | 212 | # CONFIG_PM_DEBUG is not set |
213 | CONFIG_PM_SYSFS_DEPRECATED=y | ||
213 | 214 | ||
214 | # | 215 | # |
215 | # ACPI (Advanced Configuration and Power Interface) Support | 216 | # ACPI (Advanced Configuration and Power Interface) Support |
@@ -292,6 +293,7 @@ CONFIG_PCI_DIRECT=y | |||
292 | CONFIG_PCI_MMCONFIG=y | 293 | CONFIG_PCI_MMCONFIG=y |
293 | # CONFIG_PCIEPORTBUS is not set | 294 | # CONFIG_PCIEPORTBUS is not set |
294 | CONFIG_PCI_MSI=y | 295 | CONFIG_PCI_MSI=y |
296 | # CONFIG_PCI_MULTITHREAD_PROBE is not set | ||
295 | # CONFIG_PCI_DEBUG is not set | 297 | # CONFIG_PCI_DEBUG is not set |
296 | CONFIG_ISA_DMA_API=y | 298 | CONFIG_ISA_DMA_API=y |
297 | # CONFIG_ISA is not set | 299 | # CONFIG_ISA is not set |
@@ -1427,6 +1429,7 @@ CONFIG_KPROBES=y | |||
1427 | # | 1429 | # |
1428 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 1430 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
1429 | # CONFIG_PRINTK_TIME is not set | 1431 | # CONFIG_PRINTK_TIME is not set |
1432 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
1430 | CONFIG_MAGIC_SYSRQ=y | 1433 | CONFIG_MAGIC_SYSRQ=y |
1431 | CONFIG_UNUSED_SYMBOLS=y | 1434 | CONFIG_UNUSED_SYMBOLS=y |
1432 | CONFIG_DEBUG_KERNEL=y | 1435 | CONFIG_DEBUG_KERNEL=y |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index dbda706fdd14..0fc4997fb143 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -31,6 +31,9 @@ | |||
31 | 31 | ||
32 | #include "mach_traps.h" | 32 | #include "mach_traps.h" |
33 | 33 | ||
34 | int unknown_nmi_panic; | ||
35 | int nmi_watchdog_enabled; | ||
36 | |||
34 | /* perfctr_nmi_owner tracks the ownership of the perfctr registers: | 37 | /* perfctr_nmi_owner tracks the ownership of the perfctr registers: |
35 | * evtsel_nmi_owner tracks the ownership of the event selection | 38 | * evtsel_nmi_owner tracks the ownership of the event selection |
36 | * - different performance counters/ event selection may be reserved for | 39 | * - different performance counters/ event selection may be reserved for |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 814cdebf7377..000cf03751fe 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -209,9 +209,6 @@ static struct resource adapter_rom_resources[] = { { | |||
209 | .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM | 209 | .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM |
210 | } }; | 210 | } }; |
211 | 211 | ||
212 | #define ADAPTER_ROM_RESOURCES \ | ||
213 | (sizeof adapter_rom_resources / sizeof adapter_rom_resources[0]) | ||
214 | |||
215 | static struct resource video_rom_resource = { | 212 | static struct resource video_rom_resource = { |
216 | .name = "Video ROM", | 213 | .name = "Video ROM", |
217 | .start = 0xc0000, | 214 | .start = 0xc0000, |
@@ -273,9 +270,6 @@ static struct resource standard_io_resources[] = { { | |||
273 | .flags = IORESOURCE_BUSY | IORESOURCE_IO | 270 | .flags = IORESOURCE_BUSY | IORESOURCE_IO |
274 | } }; | 271 | } }; |
275 | 272 | ||
276 | #define STANDARD_IO_RESOURCES \ | ||
277 | (sizeof standard_io_resources / sizeof standard_io_resources[0]) | ||
278 | |||
279 | #define romsignature(x) (*(unsigned short *)(x) == 0xaa55) | 273 | #define romsignature(x) (*(unsigned short *)(x) == 0xaa55) |
280 | 274 | ||
281 | static int __init romchecksum(unsigned char *rom, unsigned long length) | 275 | static int __init romchecksum(unsigned char *rom, unsigned long length) |
@@ -332,7 +326,7 @@ static void __init probe_roms(void) | |||
332 | } | 326 | } |
333 | 327 | ||
334 | /* check for adapter roms on 2k boundaries */ | 328 | /* check for adapter roms on 2k boundaries */ |
335 | for (i = 0; i < ADAPTER_ROM_RESOURCES && start < upper; start += 2048) { | 329 | for (i = 0; i < ARRAY_SIZE(adapter_rom_resources) && start < upper; start += 2048) { |
336 | rom = isa_bus_to_virt(start); | 330 | rom = isa_bus_to_virt(start); |
337 | if (!romsignature(rom)) | 331 | if (!romsignature(rom)) |
338 | continue; | 332 | continue; |
@@ -1272,7 +1266,7 @@ static int __init request_standard_resources(void) | |||
1272 | request_resource(&iomem_resource, &video_ram_resource); | 1266 | request_resource(&iomem_resource, &video_ram_resource); |
1273 | 1267 | ||
1274 | /* request I/O space for devices used on all i[345]86 PCs */ | 1268 | /* request I/O space for devices used on all i[345]86 PCs */ |
1275 | for (i = 0; i < STANDARD_IO_RESOURCES; i++) | 1269 | for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++) |
1276 | request_resource(&ioport_resource, &standard_io_resources[i]); | 1270 | request_resource(&ioport_resource, &standard_io_resources[i]); |
1277 | return 0; | 1271 | return 0; |
1278 | } | 1272 | } |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index a13037fe0ee3..6820b8d643c7 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -57,6 +57,8 @@ | |||
57 | 57 | ||
58 | #include "mach_traps.h" | 58 | #include "mach_traps.h" |
59 | 59 | ||
60 | int panic_on_unrecovered_nmi; | ||
61 | |||
60 | asmlinkage int system_call(void); | 62 | asmlinkage int system_call(void); |
61 | 63 | ||
62 | struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, | 64 | struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 647610ecb580..4844b543bed0 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -1,11 +1,12 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18-git5 | 3 | # Linux kernel version: 2.6.18-git7 |
4 | # Tue Sep 26 09:30:47 2006 | 4 | # Wed Sep 27 21:53:10 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
8 | CONFIG_X86=y | 8 | CONFIG_X86=y |
9 | CONFIG_ZONE_DMA32=y | ||
9 | CONFIG_LOCKDEP_SUPPORT=y | 10 | CONFIG_LOCKDEP_SUPPORT=y |
10 | CONFIG_STACKTRACE_SUPPORT=y | 11 | CONFIG_STACKTRACE_SUPPORT=y |
11 | CONFIG_SEMAPHORE_SLEEPERS=y | 12 | CONFIG_SEMAPHORE_SLEEPERS=y |
@@ -179,6 +180,7 @@ CONFIG_GENERIC_PENDING_IRQ=y | |||
179 | CONFIG_PM=y | 180 | CONFIG_PM=y |
180 | # CONFIG_PM_LEGACY is not set | 181 | # CONFIG_PM_LEGACY is not set |
181 | # CONFIG_PM_DEBUG is not set | 182 | # CONFIG_PM_DEBUG is not set |
183 | # CONFIG_PM_SYSFS_DEPRECATED is not set | ||
182 | CONFIG_SOFTWARE_SUSPEND=y | 184 | CONFIG_SOFTWARE_SUSPEND=y |
183 | CONFIG_PM_STD_PARTITION="" | 185 | CONFIG_PM_STD_PARTITION="" |
184 | CONFIG_SUSPEND_SMP=y | 186 | CONFIG_SUSPEND_SMP=y |
@@ -251,6 +253,7 @@ CONFIG_PCI_DIRECT=y | |||
251 | CONFIG_PCI_MMCONFIG=y | 253 | CONFIG_PCI_MMCONFIG=y |
252 | CONFIG_PCIEPORTBUS=y | 254 | CONFIG_PCIEPORTBUS=y |
253 | CONFIG_PCI_MSI=y | 255 | CONFIG_PCI_MSI=y |
256 | # CONFIG_PCI_MULTITHREAD_PROBE is not set | ||
254 | # CONFIG_PCI_DEBUG is not set | 257 | # CONFIG_PCI_DEBUG is not set |
255 | 258 | ||
256 | # | 259 | # |
@@ -1458,6 +1461,7 @@ CONFIG_KPROBES=y | |||
1458 | # | 1461 | # |
1459 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 1462 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
1460 | # CONFIG_PRINTK_TIME is not set | 1463 | # CONFIG_PRINTK_TIME is not set |
1464 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
1461 | CONFIG_MAGIC_SYSRQ=y | 1465 | CONFIG_MAGIC_SYSRQ=y |
1462 | CONFIG_UNUSED_SYMBOLS=y | 1466 | CONFIG_UNUSED_SYMBOLS=y |
1463 | CONFIG_DEBUG_KERNEL=y | 1467 | CONFIG_DEBUG_KERNEL=y |
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 20e88f4b564b..b8d53dfa9931 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -152,6 +152,21 @@ static void __init MP_bus_info (struct mpc_config_bus *m) | |||
152 | } | 152 | } |
153 | } | 153 | } |
154 | 154 | ||
155 | static int bad_ioapic(unsigned long address) | ||
156 | { | ||
157 | if (nr_ioapics >= MAX_IO_APICS) { | ||
158 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " | ||
159 | "(found %d)\n", MAX_IO_APICS, nr_ioapics); | ||
160 | panic("Recompile kernel with bigger MAX_IO_APICS!\n"); | ||
161 | } | ||
162 | if (!address) { | ||
163 | printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address" | ||
164 | " found in table, skipping!\n"); | ||
165 | return 1; | ||
166 | } | ||
167 | return 0; | ||
168 | } | ||
169 | |||
155 | static void __init MP_ioapic_info (struct mpc_config_ioapic *m) | 170 | static void __init MP_ioapic_info (struct mpc_config_ioapic *m) |
156 | { | 171 | { |
157 | if (!(m->mpc_flags & MPC_APIC_USABLE)) | 172 | if (!(m->mpc_flags & MPC_APIC_USABLE)) |
@@ -159,16 +174,10 @@ static void __init MP_ioapic_info (struct mpc_config_ioapic *m) | |||
159 | 174 | ||
160 | printk("I/O APIC #%d at 0x%X.\n", | 175 | printk("I/O APIC #%d at 0x%X.\n", |
161 | m->mpc_apicid, m->mpc_apicaddr); | 176 | m->mpc_apicid, m->mpc_apicaddr); |
162 | if (nr_ioapics >= MAX_IO_APICS) { | 177 | |
163 | printk(KERN_ERR "Max # of I/O APICs (%d) exceeded (found %d).\n", | 178 | if (bad_ioapic(m->mpc_apicaddr)) |
164 | MAX_IO_APICS, nr_ioapics); | ||
165 | panic("Recompile kernel with bigger MAX_IO_APICS!.\n"); | ||
166 | } | ||
167 | if (!m->mpc_apicaddr) { | ||
168 | printk(KERN_ERR "WARNING: bogus zero I/O APIC address" | ||
169 | " found in MP table, skipping!\n"); | ||
170 | return; | 179 | return; |
171 | } | 180 | |
172 | mp_ioapics[nr_ioapics] = *m; | 181 | mp_ioapics[nr_ioapics] = *m; |
173 | nr_ioapics++; | 182 | nr_ioapics++; |
174 | } | 183 | } |
@@ -647,16 +656,8 @@ void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base) | |||
647 | { | 656 | { |
648 | int idx = 0; | 657 | int idx = 0; |
649 | 658 | ||
650 | if (nr_ioapics >= MAX_IO_APICS) { | 659 | if (bad_ioapic(address)) |
651 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " | ||
652 | "(found %d)\n", MAX_IO_APICS, nr_ioapics); | ||
653 | panic("Recompile kernel with bigger MAX_IO_APICS!\n"); | ||
654 | } | ||
655 | if (!address) { | ||
656 | printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address" | ||
657 | " found in MADT table, skipping!\n"); | ||
658 | return; | 660 | return; |
659 | } | ||
660 | 661 | ||
661 | idx = nr_ioapics++; | 662 | idx = nr_ioapics++; |
662 | 663 | ||
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 4d6fb047952e..7af9cb3e2d99 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -28,6 +28,10 @@ | |||
28 | #include <asm/mce.h> | 28 | #include <asm/mce.h> |
29 | #include <asm/intel_arch_perfmon.h> | 29 | #include <asm/intel_arch_perfmon.h> |
30 | 30 | ||
31 | int unknown_nmi_panic; | ||
32 | int nmi_watchdog_enabled; | ||
33 | int panic_on_unrecovered_nmi; | ||
34 | |||
31 | /* perfctr_nmi_owner tracks the ownership of the perfctr registers: | 35 | /* perfctr_nmi_owner tracks the ownership of the perfctr registers: |
32 | * evtsel_nmi_owner tracks the ownership of the event selection | 36 | * evtsel_nmi_owner tracks the ownership of the event selection |
33 | * - different performance counters/ event selection may be reserved for | 37 | * - different performance counters/ event selection may be reserved for |
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index 4dcb671bd19f..f8d857453f8a 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c | |||
@@ -170,8 +170,20 @@ void dma_free_coherent(struct device *dev, size_t size, | |||
170 | } | 170 | } |
171 | EXPORT_SYMBOL(dma_free_coherent); | 171 | EXPORT_SYMBOL(dma_free_coherent); |
172 | 172 | ||
173 | static int forbid_dac __read_mostly; | ||
174 | |||
173 | int dma_supported(struct device *dev, u64 mask) | 175 | int dma_supported(struct device *dev, u64 mask) |
174 | { | 176 | { |
177 | #ifdef CONFIG_PCI | ||
178 | if (mask > 0xffffffff && forbid_dac > 0) { | ||
179 | |||
180 | |||
181 | |||
182 | printk(KERN_INFO "PCI: Disallowing DAC for device %s\n", dev->bus_id); | ||
183 | return 0; | ||
184 | } | ||
185 | #endif | ||
186 | |||
175 | if (dma_ops->dma_supported) | 187 | if (dma_ops->dma_supported) |
176 | return dma_ops->dma_supported(dev, mask); | 188 | return dma_ops->dma_supported(dev, mask); |
177 | 189 | ||
@@ -231,57 +243,64 @@ EXPORT_SYMBOL(dma_set_mask); | |||
231 | allowed overwrite iommu off workarounds for specific chipsets. | 243 | allowed overwrite iommu off workarounds for specific chipsets. |
232 | soft Use software bounce buffering (default for Intel machines) | 244 | soft Use software bounce buffering (default for Intel machines) |
233 | noaperture Don't touch the aperture for AGP. | 245 | noaperture Don't touch the aperture for AGP. |
246 | allowdac Allow DMA >4GB | ||
247 | nodac Forbid DMA >4GB | ||
248 | panic Force panic when IOMMU overflows | ||
234 | */ | 249 | */ |
235 | __init int iommu_setup(char *p) | 250 | __init int iommu_setup(char *p) |
236 | { | 251 | { |
237 | iommu_merge = 1; | 252 | iommu_merge = 1; |
238 | 253 | ||
239 | if (!p) | 254 | if (!p) |
240 | return -EINVAL; | 255 | return -EINVAL; |
241 | 256 | ||
242 | while (*p) { | 257 | while (*p) { |
243 | if (!strncmp(p,"off",3)) | 258 | if (!strncmp(p,"off",3)) |
244 | no_iommu = 1; | 259 | no_iommu = 1; |
245 | /* gart_parse_options has more force support */ | 260 | /* gart_parse_options has more force support */ |
246 | if (!strncmp(p,"force",5)) | 261 | if (!strncmp(p,"force",5)) |
247 | force_iommu = 1; | 262 | force_iommu = 1; |
248 | if (!strncmp(p,"noforce",7)) { | 263 | if (!strncmp(p,"noforce",7)) { |
249 | iommu_merge = 0; | 264 | iommu_merge = 0; |
250 | force_iommu = 0; | 265 | force_iommu = 0; |
251 | } | 266 | } |
252 | 267 | ||
253 | if (!strncmp(p, "biomerge",8)) { | 268 | if (!strncmp(p, "biomerge",8)) { |
254 | iommu_bio_merge = 4096; | 269 | iommu_bio_merge = 4096; |
255 | iommu_merge = 1; | 270 | iommu_merge = 1; |
256 | force_iommu = 1; | 271 | force_iommu = 1; |
257 | } | 272 | } |
258 | if (!strncmp(p, "panic",5)) | 273 | if (!strncmp(p, "panic",5)) |
259 | panic_on_overflow = 1; | 274 | panic_on_overflow = 1; |
260 | if (!strncmp(p, "nopanic",7)) | 275 | if (!strncmp(p, "nopanic",7)) |
261 | panic_on_overflow = 0; | 276 | panic_on_overflow = 0; |
262 | if (!strncmp(p, "merge",5)) { | 277 | if (!strncmp(p, "merge",5)) { |
263 | iommu_merge = 1; | 278 | iommu_merge = 1; |
264 | force_iommu = 1; | 279 | force_iommu = 1; |
265 | } | 280 | } |
266 | if (!strncmp(p, "nomerge",7)) | 281 | if (!strncmp(p, "nomerge",7)) |
267 | iommu_merge = 0; | 282 | iommu_merge = 0; |
268 | if (!strncmp(p, "forcesac",8)) | 283 | if (!strncmp(p, "forcesac",8)) |
269 | iommu_sac_force = 1; | 284 | iommu_sac_force = 1; |
285 | if (!strncmp(p, "allowdac", 8)) | ||
286 | forbid_dac = 0; | ||
287 | if (!strncmp(p, "nodac", 5)) | ||
288 | forbid_dac = -1; | ||
270 | 289 | ||
271 | #ifdef CONFIG_SWIOTLB | 290 | #ifdef CONFIG_SWIOTLB |
272 | if (!strncmp(p, "soft",4)) | 291 | if (!strncmp(p, "soft",4)) |
273 | swiotlb = 1; | 292 | swiotlb = 1; |
274 | #endif | 293 | #endif |
275 | 294 | ||
276 | #ifdef CONFIG_IOMMU | 295 | #ifdef CONFIG_IOMMU |
277 | gart_parse_options(p); | 296 | gart_parse_options(p); |
278 | #endif | 297 | #endif |
279 | 298 | ||
280 | p += strcspn(p, ","); | 299 | p += strcspn(p, ","); |
281 | if (*p == ',') | 300 | if (*p == ',') |
282 | ++p; | 301 | ++p; |
283 | } | 302 | } |
284 | return 0; | 303 | return 0; |
285 | } | 304 | } |
286 | early_param("iommu", iommu_setup); | 305 | early_param("iommu", iommu_setup); |
287 | 306 | ||
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 0b00bb2ea576..fc944b5e8f4a 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -123,9 +123,6 @@ struct resource standard_io_resources[] = { | |||
123 | .flags = IORESOURCE_BUSY | IORESOURCE_IO } | 123 | .flags = IORESOURCE_BUSY | IORESOURCE_IO } |
124 | }; | 124 | }; |
125 | 125 | ||
126 | #define STANDARD_IO_RESOURCES \ | ||
127 | (sizeof standard_io_resources / sizeof standard_io_resources[0]) | ||
128 | |||
129 | #define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM) | 126 | #define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM) |
130 | 127 | ||
131 | struct resource data_resource = { | 128 | struct resource data_resource = { |
@@ -172,9 +169,6 @@ static struct resource adapter_rom_resources[] = { | |||
172 | .flags = IORESOURCE_ROM } | 169 | .flags = IORESOURCE_ROM } |
173 | }; | 170 | }; |
174 | 171 | ||
175 | #define ADAPTER_ROM_RESOURCES \ | ||
176 | (sizeof adapter_rom_resources / sizeof adapter_rom_resources[0]) | ||
177 | |||
178 | static struct resource video_rom_resource = { | 172 | static struct resource video_rom_resource = { |
179 | .name = "Video ROM", | 173 | .name = "Video ROM", |
180 | .start = 0xc0000, | 174 | .start = 0xc0000, |
@@ -245,7 +239,8 @@ static void __init probe_roms(void) | |||
245 | } | 239 | } |
246 | 240 | ||
247 | /* check for adapter roms on 2k boundaries */ | 241 | /* check for adapter roms on 2k boundaries */ |
248 | for (i = 0; i < ADAPTER_ROM_RESOURCES && start < upper; start += 2048) { | 242 | for (i = 0; i < ARRAY_SIZE(adapter_rom_resources) && start < upper; |
243 | start += 2048) { | ||
249 | rom = isa_bus_to_virt(start); | 244 | rom = isa_bus_to_virt(start); |
250 | if (!romsignature(rom)) | 245 | if (!romsignature(rom)) |
251 | continue; | 246 | continue; |
@@ -537,7 +532,7 @@ void __init setup_arch(char **cmdline_p) | |||
537 | { | 532 | { |
538 | unsigned i; | 533 | unsigned i; |
539 | /* request I/O space for devices used on all i[345]86 PCs */ | 534 | /* request I/O space for devices used on all i[345]86 PCs */ |
540 | for (i = 0; i < STANDARD_IO_RESOURCES; i++) | 535 | for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++) |
541 | request_resource(&ioport_resource, &standard_io_resources[i]); | 536 | request_resource(&ioport_resource, &standard_io_resources[i]); |
542 | } | 537 | } |
543 | 538 | ||
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index d0564f1bcb0b..f8aeccf105fa 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -67,13 +67,6 @@ SECTIONS | |||
67 | 67 | ||
68 | _edata = .; /* End of data section */ | 68 | _edata = .; /* End of data section */ |
69 | 69 | ||
70 | __bss_start = .; /* BSS */ | ||
71 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | ||
72 | *(.bss.page_aligned) | ||
73 | *(.bss) | ||
74 | } | ||
75 | __bss_stop = .; | ||
76 | |||
77 | . = ALIGN(PAGE_SIZE); | 70 | . = ALIGN(PAGE_SIZE); |
78 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | 71 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); |
79 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { | 72 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { |
@@ -229,6 +222,13 @@ SECTIONS | |||
229 | . = ALIGN(4096); | 222 | . = ALIGN(4096); |
230 | __nosave_end = .; | 223 | __nosave_end = .; |
231 | 224 | ||
225 | __bss_start = .; /* BSS */ | ||
226 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | ||
227 | *(.bss.page_aligned) | ||
228 | *(.bss) | ||
229 | } | ||
230 | __bss_stop = .; | ||
231 | |||
232 | _end = . ; | 232 | _end = . ; |
233 | 233 | ||
234 | /* Sections to be discarded */ | 234 | /* Sections to be discarded */ |
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index ac48c3857ddb..07c086382059 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -155,8 +155,8 @@ vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache) | |||
155 | We do this here because otherwise user space would do it on | 155 | We do this here because otherwise user space would do it on |
156 | its own in a likely inferior way (no access to jiffies). | 156 | its own in a likely inferior way (no access to jiffies). |
157 | If you don't like it pass NULL. */ | 157 | If you don't like it pass NULL. */ |
158 | if (tcache && tcache->t0 == (j = __jiffies)) { | 158 | if (tcache && tcache->blob[0] == (j = __jiffies)) { |
159 | p = tcache->t1; | 159 | p = tcache->blob[1]; |
160 | } else if (__vgetcpu_mode == VGETCPU_RDTSCP) { | 160 | } else if (__vgetcpu_mode == VGETCPU_RDTSCP) { |
161 | /* Load per CPU data from RDTSCP */ | 161 | /* Load per CPU data from RDTSCP */ |
162 | rdtscp(dummy, dummy, p); | 162 | rdtscp(dummy, dummy, p); |
@@ -165,8 +165,8 @@ vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache) | |||
165 | asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); | 165 | asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); |
166 | } | 166 | } |
167 | if (tcache) { | 167 | if (tcache) { |
168 | tcache->t0 = j; | 168 | tcache->blob[0] = j; |
169 | tcache->t1 = p; | 169 | tcache->blob[1] = p; |
170 | } | 170 | } |
171 | if (cpu) | 171 | if (cpu) |
172 | *cpu = p & 0xfff; | 172 | *cpu = p & 0xfff; |