diff options
Diffstat (limited to 'arch')
30 files changed, 142 insertions, 111 deletions
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c index 1de121fc55f4..f44647738ee4 100644 --- a/arch/arm/mach-at91/at91x40.c +++ b/arch/arm/mach-at91/at91x40.c | |||
@@ -16,16 +16,32 @@ | |||
16 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
17 | #include <asm/arch/at91x40.h> | 17 | #include <asm/arch/at91x40.h> |
18 | #include <asm/arch/at91_st.h> | 18 | #include <asm/arch/at91_st.h> |
19 | #include <asm/arch/timex.h> | ||
19 | #include "generic.h" | 20 | #include "generic.h" |
20 | 21 | ||
21 | /* | 22 | /* |
22 | * This is used in the gpio code, stub locally. | 23 | * Export the clock functions for the AT91X40. Some external code common |
24 | * to all AT91 family parts relys on this, like the gpio and serial support. | ||
23 | */ | 25 | */ |
24 | int clk_enable(struct clk *clk) | 26 | int clk_enable(struct clk *clk) |
25 | { | 27 | { |
26 | return 0; | 28 | return 0; |
27 | } | 29 | } |
28 | 30 | ||
31 | void clk_disable(struct clk *clk) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | unsigned long clk_get_rate(struct clk *clk) | ||
36 | { | ||
37 | return AT91X40_MASTER_CLOCK; | ||
38 | } | ||
39 | |||
40 | struct clk *clk_get(struct device *dev, const char *id) | ||
41 | { | ||
42 | return NULL; | ||
43 | } | ||
44 | |||
29 | void __init at91x40_initialize(unsigned long main_clock) | 45 | void __init at91x40_initialize(unsigned long main_clock) |
30 | { | 46 | { |
31 | at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) | 47 | at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 92d79fb39311..62e653a3ea1a 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -369,7 +369,8 @@ static int impd1_probe(struct lm_device *dev) | |||
369 | 369 | ||
370 | lm_set_drvdata(dev, impd1); | 370 | lm_set_drvdata(dev, impd1); |
371 | 371 | ||
372 | printk("IM-PD1 found at 0x%08lx\n", dev->resource.start); | 372 | printk("IM-PD1 found at 0x%08lx\n", |
373 | (unsigned long)dev->resource.start); | ||
373 | 374 | ||
374 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { | 375 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { |
375 | impd1->vcos[i].owner = THIS_MODULE, | 376 | impd1->vcos[i].owner = THIS_MODULE, |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index d55fa4e9bb43..c07f497000ca 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -405,7 +405,6 @@ v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
405 | addr, fsr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255, | 405 | addr, fsr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255, |
406 | v3_readb(V3_LB_ISTAT)); | 406 | v3_readb(V3_LB_ISTAT)); |
407 | printk(KERN_DEBUG "%s", buf); | 407 | printk(KERN_DEBUG "%s", buf); |
408 | printascii(buf); | ||
409 | #endif | 408 | #endif |
410 | 409 | ||
411 | v3_writeb(V3_LB_ISTAT, 0); | 410 | v3_writeb(V3_LB_ISTAT, 0); |
@@ -447,6 +446,7 @@ static irqreturn_t v3_irq(int dummy, void *devid) | |||
447 | unsigned long pc = instruction_pointer(regs); | 446 | unsigned long pc = instruction_pointer(regs); |
448 | unsigned long instr = *(unsigned long *)pc; | 447 | unsigned long instr = *(unsigned long *)pc; |
449 | char buf[128]; | 448 | char buf[128]; |
449 | extern void printascii(const char *); | ||
450 | 450 | ||
451 | sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x " | 451 | sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x " |
452 | "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr, | 452 | "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr, |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index a0b16a7e8a04..a4d20127a60e 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/mtd/mtd.h> | 24 | #include <linux/mtd/mtd.h> |
25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
26 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
27 | #include <linux/spi/tsc2102.h> | ||
28 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
29 | #include <linux/apm-emulation.h> | 28 | #include <linux/apm-emulation.h> |
30 | 29 | ||
@@ -315,14 +314,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery) | |||
315 | #define palmte_get_power_status NULL | 314 | #define palmte_get_power_status NULL |
316 | #endif | 315 | #endif |
317 | 316 | ||
318 | static struct tsc2102_config palmte_tsc2102_config = { | ||
319 | .use_internal = 0, | ||
320 | .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP, | ||
321 | .temp_at25c = { 2200, 2615 }, | ||
322 | .apm_report = palmte_get_power_status, | ||
323 | .alsa_config = &palmte_alsa_config, | ||
324 | }; | ||
325 | |||
326 | static struct omap_board_config_kernel palmte_config[] __initdata = { | 317 | static struct omap_board_config_kernel palmte_config[] __initdata = { |
327 | { OMAP_TAG_USB, &palmte_usb_config }, | 318 | { OMAP_TAG_USB, &palmte_usb_config }, |
328 | { OMAP_TAG_MMC, &palmte_mmc_config }, | 319 | { OMAP_TAG_MMC, &palmte_mmc_config }, |
@@ -336,7 +327,6 @@ static struct spi_board_info palmte_spi_info[] __initdata = { | |||
336 | .bus_num = 2, /* uWire (officially) */ | 327 | .bus_num = 2, /* uWire (officially) */ |
337 | .chip_select = 0, /* As opposed to 3 */ | 328 | .chip_select = 0, /* As opposed to 3 */ |
338 | .irq = OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO), | 329 | .irq = OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO), |
339 | .platform_data = &palmte_tsc2102_config, | ||
340 | .max_speed_hz = 8000000, | 330 | .max_speed_hz = 8000000, |
341 | }, | 331 | }, |
342 | }; | 332 | }; |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index dace3820f1ee..e7d0fcd9b43f 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/arch/pxa-regs.h> | 38 | #include <asm/arch/pxa-regs.h> |
39 | #include <asm/arch/pxa2xx-regs.h> | 39 | #include <asm/arch/pxa2xx-regs.h> |
40 | #include <asm/arch/pxa2xx-gpio.h> | 40 | #include <asm/arch/pxa2xx-gpio.h> |
41 | #include <asm/arch/pxa27x-udc.h> | ||
42 | #include <asm/arch/irda.h> | 41 | #include <asm/arch/irda.h> |
43 | #include <asm/arch/mmc.h> | 42 | #include <asm/arch/mmc.h> |
44 | #include <asm/arch/ohci.h> | 43 | #include <asm/arch/ohci.h> |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 661a2358ac22..27f63d5d3a7b 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -374,7 +374,7 @@ static struct resource bast_dm9k_resource[] = { | |||
374 | [2] = { | 374 | [2] = { |
375 | .start = IRQ_DM9000, | 375 | .start = IRQ_DM9000, |
376 | .end = IRQ_DM9000, | 376 | .end = IRQ_DM9000, |
377 | .flags = IORESOURCE_IRQ, | 377 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, |
378 | } | 378 | } |
379 | 379 | ||
380 | }; | 380 | }; |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index c56423373ff3..4c4b5c4207c4 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -263,7 +263,7 @@ static struct resource vr1000_dm9k0_resource[] = { | |||
263 | [2] = { | 263 | [2] = { |
264 | .start = IRQ_VR1000_DM9000A, | 264 | .start = IRQ_VR1000_DM9000A, |
265 | .end = IRQ_VR1000_DM9000A, | 265 | .end = IRQ_VR1000_DM9000A, |
266 | .flags = IORESOURCE_IRQ | 266 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, |
267 | } | 267 | } |
268 | 268 | ||
269 | }; | 269 | }; |
@@ -282,7 +282,7 @@ static struct resource vr1000_dm9k1_resource[] = { | |||
282 | [2] = { | 282 | [2] = { |
283 | .start = IRQ_VR1000_DM9000N, | 283 | .start = IRQ_VR1000_DM9000N, |
284 | .end = IRQ_VR1000_DM9000N, | 284 | .end = IRQ_VR1000_DM9000N, |
285 | .flags = IORESOURCE_IRQ | 285 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, |
286 | } | 286 | } |
287 | }; | 287 | }; |
288 | 288 | ||
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 6496eb645cee..2f772a3965c4 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -225,26 +225,28 @@ static void __init collie_init(void) | |||
225 | int ret = 0; | 225 | int ret = 0; |
226 | 226 | ||
227 | /* cpu initialize */ | 227 | /* cpu initialize */ |
228 | GAFR = ( GPIO_SSP_TXD | \ | 228 | GAFR = GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SSP_CLK | |
229 | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SSP_CLK | GPIO_TIC_ACK | \ | 229 | GPIO_MCP_CLK | GPIO_32_768kHz; |
230 | GPIO_32_768kHz ); | 230 | |
231 | 231 | GPDR = GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 | | |
232 | GPDR = ( GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 | \ | 232 | GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD | |
233 | GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD | \ | 233 | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK | |
234 | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK | \ | 234 | COLLIE_GPIO_UCB1x00_RESET | COLLIE_GPIO_nMIC_ON | |
235 | GPIO_SDLC_AAF | GPIO_UART_SCLK1 | GPIO_32_768kHz ); | 235 | COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz; |
236 | GPLR = GPIO_GPIO18; | 236 | |
237 | 237 | PPDR = PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 | | |
238 | // PPC pin setting | 238 | PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS | |
239 | PPDR = ( PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 | \ | 239 | PPC_TXD1 | PPC_TXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM; |
240 | PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS | \ | 240 | |
241 | PPC_TXD1 | PPC_TXD2 | PPC_RXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM ); | 241 | PWER = COLLIE_GPIO_AC_IN | COLLIE_GPIO_CO | COLLIE_GPIO_ON_KEY | |
242 | 242 | COLLIE_GPIO_WAKEUP | COLLIE_GPIO_nREMOCON_INT | PWER_RTC; | |
243 | PSDR = ( PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4 ); | 243 | |
244 | 244 | PGSR = COLLIE_GPIO_nREMOCON_ON; | |
245 | GAFR |= GPIO_32_768kHz; | 245 | |
246 | GPDR |= GPIO_32_768kHz; | 246 | PSDR = PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4; |
247 | TUCR = TUCR_32_768kHz; | 247 | |
248 | PCFR = PCFR_OPDE; | ||
249 | |||
248 | 250 | ||
249 | platform_scoop_config = &collie_pcmcia_config; | 251 | platform_scoop_config = &collie_pcmcia_config; |
250 | 252 | ||
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 2946c193a7d6..2db5580048d8 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/cpufreq.h> | ||
24 | 25 | ||
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
26 | 27 | ||
diff --git a/arch/arm/plat-s3c24xx/s3c244x.c b/arch/arm/plat-s3c24xx/s3c244x.c index f197bb3a2366..2f01af5f64c4 100644 --- a/arch/arm/plat-s3c24xx/s3c244x.c +++ b/arch/arm/plat-s3c24xx/s3c244x.c | |||
@@ -65,6 +65,7 @@ void __init s3c244x_map_io(struct map_desc *mach_desc, int size) | |||
65 | 65 | ||
66 | /* rename any peripherals used differing from the s3c2410 */ | 66 | /* rename any peripherals used differing from the s3c2410 */ |
67 | 67 | ||
68 | s3c_device_sdi.name = "s3c2440-sdi"; | ||
68 | s3c_device_i2c.name = "s3c2440-i2c"; | 69 | s3c_device_i2c.name = "s3c2440-i2c"; |
69 | s3c_device_nand.name = "s3c2440-nand"; | 70 | s3c_device_nand.name = "s3c2440-nand"; |
70 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; | 71 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index b841ecfd5d5a..9af7740f32fb 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/bootmem.h> | 27 | #include <linux/bootmem.h> |
28 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
29 | #include <linux/module.h> | ||
29 | 30 | ||
30 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
31 | #include <asm/segment.h> | 32 | #include <asm/segment.h> |
@@ -56,7 +57,9 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
56 | */ | 57 | */ |
57 | static unsigned long empty_bad_page_table; | 58 | static unsigned long empty_bad_page_table; |
58 | static unsigned long empty_bad_page; | 59 | static unsigned long empty_bad_page; |
60 | |||
59 | unsigned long empty_zero_page; | 61 | unsigned long empty_zero_page; |
62 | EXPORT_SYMBOL(empty_zero_page); | ||
60 | 63 | ||
61 | /*****************************************************************************/ | 64 | /*****************************************************************************/ |
62 | /* | 65 | /* |
diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh index 8e24fc1821e8..31729a9387df 100644 --- a/arch/powerpc/kernel/prom_init_check.sh +++ b/arch/powerpc/kernel/prom_init_check.sh | |||
@@ -20,7 +20,7 @@ WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush | |||
20 | _end enter_prom memcpy memset reloc_offset __secondary_hold | 20 | _end enter_prom memcpy memset reloc_offset __secondary_hold |
21 | __secondary_hold_acknowledge __secondary_hold_spinloop __start | 21 | __secondary_hold_acknowledge __secondary_hold_spinloop __start |
22 | strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 | 22 | strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 |
23 | reloc_got2" | 23 | reloc_got2 kernstart_addr" |
24 | 24 | ||
25 | NM="$1" | 25 | NM="$1" |
26 | OBJ="$2" | 26 | OBJ="$2" |
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 80d1babb230d..e0ff59f21135 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -402,7 +402,7 @@ void __set_fixmap (enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) | |||
402 | return; | 402 | return; |
403 | } | 403 | } |
404 | 404 | ||
405 | map_page(address, phys, flags); | 405 | map_page(address, phys, pgprot_val(flags)); |
406 | fixmaps++; | 406 | fixmaps++; |
407 | } | 407 | } |
408 | 408 | ||
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 5b3fb2b321ab..3a58ffabccd9 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -317,6 +317,9 @@ static int __init ps3_mm_add_memory(void) | |||
317 | return result; | 317 | return result; |
318 | } | 318 | } |
319 | 319 | ||
320 | lmb_add(start_addr, map.r1.size); | ||
321 | lmb_analyze(); | ||
322 | |||
320 | result = online_pages(start_pfn, nr_pages); | 323 | result = online_pages(start_pfn, nr_pages); |
321 | 324 | ||
322 | if (result) | 325 | if (result) |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 8619f2a3f1f6..7680001676a6 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -1331,6 +1331,9 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri) | |||
1331 | unsigned long flags; | 1331 | unsigned long flags; |
1332 | u32 reg; | 1332 | u32 reg; |
1333 | 1333 | ||
1334 | if (!mpic) | ||
1335 | return; | ||
1336 | |||
1334 | spin_lock_irqsave(&mpic_lock, flags); | 1337 | spin_lock_irqsave(&mpic_lock, flags); |
1335 | if (is_ipi) { | 1338 | if (is_ipi) { |
1336 | reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) & | 1339 | reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) & |
@@ -1346,23 +1349,6 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri) | |||
1346 | spin_unlock_irqrestore(&mpic_lock, flags); | 1349 | spin_unlock_irqrestore(&mpic_lock, flags); |
1347 | } | 1350 | } |
1348 | 1351 | ||
1349 | unsigned int mpic_irq_get_priority(unsigned int irq) | ||
1350 | { | ||
1351 | unsigned int is_ipi; | ||
1352 | struct mpic *mpic = mpic_find(irq, &is_ipi); | ||
1353 | unsigned int src = mpic_irq_to_hw(irq); | ||
1354 | unsigned long flags; | ||
1355 | u32 reg; | ||
1356 | |||
1357 | spin_lock_irqsave(&mpic_lock, flags); | ||
1358 | if (is_ipi) | ||
1359 | reg = mpic_ipi_read(src = mpic->ipi_vecs[0]); | ||
1360 | else | ||
1361 | reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)); | ||
1362 | spin_unlock_irqrestore(&mpic_lock, flags); | ||
1363 | return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT; | ||
1364 | } | ||
1365 | |||
1366 | void mpic_setup_this_cpu(void) | 1352 | void mpic_setup_this_cpu(void) |
1367 | { | 1353 | { |
1368 | #ifdef CONFIG_SMP | 1354 | #ifdef CONFIG_SMP |
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 0a0c05fc3a33..2084f81a76e1 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -657,20 +657,39 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
657 | struct task_struct *p, struct pt_regs *regs) | 657 | struct task_struct *p, struct pt_regs *regs) |
658 | { | 658 | { |
659 | struct thread_info *t = task_thread_info(p); | 659 | struct thread_info *t = task_thread_info(p); |
660 | struct sparc_stackf *parent_sf; | ||
661 | unsigned long child_stack_sz; | ||
660 | char *child_trap_frame; | 662 | char *child_trap_frame; |
663 | int kernel_thread; | ||
661 | 664 | ||
662 | /* Calculate offset to stack_frame & pt_regs */ | 665 | kernel_thread = (regs->tstate & TSTATE_PRIV) ? 1 : 0; |
663 | child_trap_frame = task_stack_page(p) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); | 666 | parent_sf = ((struct sparc_stackf *) regs) - 1; |
664 | memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ)); | ||
665 | 667 | ||
666 | t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | | 668 | /* Calculate offset to stack_frame & pt_regs */ |
669 | child_stack_sz = ((STACKFRAME_SZ + TRACEREG_SZ) + | ||
670 | (kernel_thread ? STACKFRAME_SZ : 0)); | ||
671 | child_trap_frame = (task_stack_page(p) + | ||
672 | (THREAD_SIZE - child_stack_sz)); | ||
673 | memcpy(child_trap_frame, parent_sf, child_stack_sz); | ||
674 | |||
675 | t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | | ||
676 | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | | ||
667 | (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT); | 677 | (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT); |
668 | t->new_child = 1; | 678 | t->new_child = 1; |
669 | t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; | 679 | t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; |
670 | t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf)); | 680 | t->kregs = (struct pt_regs *) (child_trap_frame + |
681 | sizeof(struct sparc_stackf)); | ||
671 | t->fpsaved[0] = 0; | 682 | t->fpsaved[0] = 0; |
672 | 683 | ||
673 | if (regs->tstate & TSTATE_PRIV) { | 684 | if (kernel_thread) { |
685 | struct sparc_stackf *child_sf = (struct sparc_stackf *) | ||
686 | (child_trap_frame + (STACKFRAME_SZ + TRACEREG_SZ)); | ||
687 | |||
688 | /* Zero terminate the stack backtrace. */ | ||
689 | child_sf->fp = NULL; | ||
690 | t->kregs->u_regs[UREG_FP] = | ||
691 | ((unsigned long) child_sf) - STACK_BIAS; | ||
692 | |||
674 | /* Special case, if we are spawning a kernel thread from | 693 | /* Special case, if we are spawning a kernel thread from |
675 | * a userspace task (via KMOD, NFS, or similar) we must | 694 | * a userspace task (via KMOD, NFS, or similar) we must |
676 | * disable performance counters in the child because the | 695 | * disable performance counters in the child because the |
@@ -681,12 +700,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
681 | t->pcr_reg = 0; | 700 | t->pcr_reg = 0; |
682 | t->flags &= ~_TIF_PERFCTR; | 701 | t->flags &= ~_TIF_PERFCTR; |
683 | } | 702 | } |
684 | t->kregs->u_regs[UREG_FP] = t->ksp; | ||
685 | t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT); | 703 | t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT); |
686 | flush_register_windows(); | ||
687 | memcpy((void *)(t->ksp + STACK_BIAS), | ||
688 | (void *)(regs->u_regs[UREG_FP] + STACK_BIAS), | ||
689 | sizeof(struct sparc_stackf)); | ||
690 | t->kregs->u_regs[UREG_G6] = (unsigned long) t; | 704 | t->kregs->u_regs[UREG_G6] = (unsigned long) t; |
691 | t->kregs->u_regs[UREG_G4] = (unsigned long) t->task; | 705 | t->kregs->u_regs[UREG_G4] = (unsigned long) t->task; |
692 | } else { | 706 | } else { |
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 3afacbb5781d..c6fc695fe1fe 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -363,6 +363,7 @@ kern_rtt: rdpr %canrestore, %g1 | |||
363 | brz,pn %g1, kern_rtt_fill | 363 | brz,pn %g1, kern_rtt_fill |
364 | nop | 364 | nop |
365 | kern_rtt_restore: | 365 | kern_rtt_restore: |
366 | stw %g0, [%sp + PTREGS_OFF + PT_V9_MAGIC] | ||
366 | restore | 367 | restore |
367 | retry | 368 | retry |
368 | 369 | ||
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c index 01b52f561af4..c73ce3f4197e 100644 --- a/arch/sparc64/kernel/stacktrace.c +++ b/arch/sparc64/kernel/stacktrace.c | |||
@@ -19,7 +19,7 @@ void save_stack_trace(struct stack_trace *trace) | |||
19 | fp = ksp + STACK_BIAS; | 19 | fp = ksp + STACK_BIAS; |
20 | thread_base = (unsigned long) tp; | 20 | thread_base = (unsigned long) tp; |
21 | do { | 21 | do { |
22 | struct reg_window *rw; | 22 | struct sparc_stackf *sf; |
23 | struct pt_regs *regs; | 23 | struct pt_regs *regs; |
24 | unsigned long pc; | 24 | unsigned long pc; |
25 | 25 | ||
@@ -28,15 +28,17 @@ void save_stack_trace(struct stack_trace *trace) | |||
28 | fp >= (thread_base + THREAD_SIZE)) | 28 | fp >= (thread_base + THREAD_SIZE)) |
29 | break; | 29 | break; |
30 | 30 | ||
31 | rw = (struct reg_window *) fp; | 31 | sf = (struct sparc_stackf *) fp; |
32 | regs = (struct pt_regs *) (rw + 1); | 32 | regs = (struct pt_regs *) (sf + 1); |
33 | 33 | ||
34 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { | 34 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { |
35 | if (!(regs->tstate & TSTATE_PRIV)) | ||
36 | break; | ||
35 | pc = regs->tpc; | 37 | pc = regs->tpc; |
36 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; | 38 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; |
37 | } else { | 39 | } else { |
38 | pc = rw->ins[7]; | 40 | pc = sf->callers_pc; |
39 | fp = rw->ins[6] + STACK_BIAS; | 41 | fp = (unsigned long)sf->fp + STACK_BIAS; |
40 | } | 42 | } |
41 | 43 | ||
42 | if (trace->skip > 0) | 44 | if (trace->skip > 0) |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index d9b8d46707d1..369749262653 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -2116,7 +2116,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2116 | printk("\n"); | 2116 | printk("\n"); |
2117 | #endif | 2117 | #endif |
2118 | do { | 2118 | do { |
2119 | struct reg_window *rw; | 2119 | struct sparc_stackf *sf; |
2120 | struct pt_regs *regs; | 2120 | struct pt_regs *regs; |
2121 | unsigned long pc; | 2121 | unsigned long pc; |
2122 | 2122 | ||
@@ -2124,15 +2124,17 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2124 | if (fp < (thread_base + sizeof(struct thread_info)) || | 2124 | if (fp < (thread_base + sizeof(struct thread_info)) || |
2125 | fp >= (thread_base + THREAD_SIZE)) | 2125 | fp >= (thread_base + THREAD_SIZE)) |
2126 | break; | 2126 | break; |
2127 | rw = (struct reg_window *)fp; | 2127 | sf = (struct sparc_stackf *) fp; |
2128 | regs = (struct pt_regs *) (rw + 1); | 2128 | regs = (struct pt_regs *) (sf + 1); |
2129 | 2129 | ||
2130 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { | 2130 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { |
2131 | if (!(regs->tstate & TSTATE_PRIV)) | ||
2132 | break; | ||
2131 | pc = regs->tpc; | 2133 | pc = regs->tpc; |
2132 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; | 2134 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; |
2133 | } else { | 2135 | } else { |
2134 | pc = rw->ins[7]; | 2136 | pc = sf->callers_pc; |
2135 | fp = rw->ins[6] + STACK_BIAS; | 2137 | fp = (unsigned long)sf->fp + STACK_BIAS; |
2136 | } | 2138 | } |
2137 | 2139 | ||
2138 | printk(" [%016lx] ", pc); | 2140 | printk(" [%016lx] ", pc); |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fe361ae7ef2f..dcbec34154cf 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -26,17 +26,10 @@ config X86 | |||
26 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) | 26 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) |
27 | select HAVE_ARCH_KGDB if !X86_VOYAGER | 27 | select HAVE_ARCH_KGDB if !X86_VOYAGER |
28 | 28 | ||
29 | config DEFCONFIG_LIST | 29 | config ARCH_DEFCONFIG |
30 | string | 30 | string |
31 | depends on X86_32 | 31 | default "arch/x86/configs/i386_defconfig" if X86_32 |
32 | option defconfig_list | 32 | default "arch/x86/configs/x86_64_defconfig" if X86_64 |
33 | default "arch/x86/configs/i386_defconfig" | ||
34 | |||
35 | config DEFCONFIG_LIST | ||
36 | string | ||
37 | depends on X86_64 | ||
38 | option defconfig_list | ||
39 | default "arch/x86/configs/x86_64_defconfig" | ||
40 | 33 | ||
41 | 34 | ||
42 | config GENERIC_LOCKBREAK | 35 | config GENERIC_LOCKBREAK |
diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c index c1d00c0274c4..50e47cdbdddd 100644 --- a/arch/x86/boot/printf.c +++ b/arch/x86/boot/printf.c | |||
@@ -56,7 +56,7 @@ static char *number(char *str, long num, int base, int size, int precision, | |||
56 | if (type & LEFT) | 56 | if (type & LEFT) |
57 | type &= ~ZEROPAD; | 57 | type &= ~ZEROPAD; |
58 | if (base < 2 || base > 36) | 58 | if (base < 2 || base > 36) |
59 | return 0; | 59 | return NULL; |
60 | c = (type & ZEROPAD) ? '0' : ' '; | 60 | c = (type & ZEROPAD) ? '0' : ' '; |
61 | sign = 0; | 61 | sign = 0; |
62 | if (type & SIGN) { | 62 | if (type & SIGN) { |
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index 5910020c3f24..0633cfd0dc29 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -534,7 +534,7 @@ int setup_profiling_timer(unsigned int multiplier) | |||
534 | */ | 534 | */ |
535 | void clear_local_APIC(void) | 535 | void clear_local_APIC(void) |
536 | { | 536 | { |
537 | int maxlvt = lapic_get_maxlvt(); | 537 | int maxlvt; |
538 | u32 v; | 538 | u32 v; |
539 | 539 | ||
540 | /* APIC hasn't been mapped yet */ | 540 | /* APIC hasn't been mapped yet */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index af4a867a097c..777a7ff075de 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c | |||
@@ -245,7 +245,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, | |||
245 | if ((ecx > 95) || (ecx == 0) || (eax < ebx)) | 245 | if ((ecx > 95) || (ecx == 0) || (eax < ebx)) |
246 | return -EIO; | 246 | return -EIO; |
247 | 247 | ||
248 | edx = (eax - ebx) / (100 - ecx); | 248 | edx = ((eax - ebx) * 100) / (100 - ecx); |
249 | *low_freq = edx * 1000; /* back to kHz */ | 249 | *low_freq = edx * 1000; /* back to kHz */ |
250 | 250 | ||
251 | dprintk("low frequency is %u kHz\n", *low_freq); | 251 | dprintk("low frequency is %u kHz\n", *low_freq); |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 46d4034d9f37..206791eb46e3 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -1127,12 +1127,23 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1127 | * an UP version, and is deprecated by AMD. | 1127 | * an UP version, and is deprecated by AMD. |
1128 | */ | 1128 | */ |
1129 | if (num_online_cpus() != 1) { | 1129 | if (num_online_cpus() != 1) { |
1130 | printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); | 1130 | #ifndef CONFIG_ACPI_PROCESSOR |
1131 | printk(KERN_ERR PFX "ACPI Processor support is required " | ||
1132 | "for SMP systems but is absent. Please load the " | ||
1133 | "ACPI Processor module before starting this " | ||
1134 | "driver.\n"); | ||
1135 | #else | ||
1136 | printk(KERN_ERR PFX "Your BIOS does not provide ACPI " | ||
1137 | "_PSS objects in a way that Linux understands. " | ||
1138 | "Please report this to the Linux ACPI maintainers" | ||
1139 | " and complain to your BIOS vendor.\n"); | ||
1140 | #endif | ||
1131 | kfree(data); | 1141 | kfree(data); |
1132 | return -ENODEV; | 1142 | return -ENODEV; |
1133 | } | 1143 | } |
1134 | if (pol->cpu != 0) { | 1144 | if (pol->cpu != 0) { |
1135 | printk(KERN_ERR PFX "No _PSS objects for CPU other than CPU0\n"); | 1145 | printk(KERN_ERR PFX "No ACPI _PSS objects for CPU other than " |
1146 | "CPU0. Complain to your BIOS vendor.\n"); | ||
1136 | kfree(data); | 1147 | kfree(data); |
1137 | return -ENODEV; | 1148 | return -ENODEV; |
1138 | } | 1149 | } |
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index 4bc1be5d5472..08a30986d472 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c | |||
@@ -53,7 +53,7 @@ static cycle_t kvm_clock_read(void); | |||
53 | * have elapsed since the hypervisor wrote the data. So we try to account for | 53 | * have elapsed since the hypervisor wrote the data. So we try to account for |
54 | * that with system time | 54 | * that with system time |
55 | */ | 55 | */ |
56 | unsigned long kvm_get_wallclock(void) | 56 | static unsigned long kvm_get_wallclock(void) |
57 | { | 57 | { |
58 | u32 wc_sec, wc_nsec; | 58 | u32 wc_sec, wc_nsec; |
59 | u64 delta; | 59 | u64 delta; |
@@ -86,7 +86,7 @@ unsigned long kvm_get_wallclock(void) | |||
86 | return ts.tv_sec + 1; | 86 | return ts.tv_sec + 1; |
87 | } | 87 | } |
88 | 88 | ||
89 | int kvm_set_wallclock(unsigned long now) | 89 | static int kvm_set_wallclock(unsigned long now) |
90 | { | 90 | { |
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c index e4790728b224..068759db63dd 100644 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include "mach_timer.h" | 15 | #include "mach_timer.h" |
16 | 16 | ||
17 | static int tsc_enabled; | 17 | static int tsc_disabled; |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * On some systems the TSC frequency does not | 20 | * On some systems the TSC frequency does not |
@@ -28,8 +28,8 @@ EXPORT_SYMBOL_GPL(tsc_khz); | |||
28 | static int __init tsc_setup(char *str) | 28 | static int __init tsc_setup(char *str) |
29 | { | 29 | { |
30 | printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, " | 30 | printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, " |
31 | "cannot disable TSC completely.\n"); | 31 | "cannot disable TSC completely.\n"); |
32 | mark_tsc_unstable("user disabled TSC"); | 32 | tsc_disabled = 1; |
33 | return 1; | 33 | return 1; |
34 | } | 34 | } |
35 | #else | 35 | #else |
@@ -120,7 +120,7 @@ unsigned long long native_sched_clock(void) | |||
120 | * very important for it to be as fast as the platform | 120 | * very important for it to be as fast as the platform |
121 | * can achive it. ) | 121 | * can achive it. ) |
122 | */ | 122 | */ |
123 | if (unlikely(!tsc_enabled && !tsc_unstable)) | 123 | if (unlikely(tsc_disabled)) |
124 | /* No locking but a rare wrong value is not a big deal: */ | 124 | /* No locking but a rare wrong value is not a big deal: */ |
125 | return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); | 125 | return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); |
126 | 126 | ||
@@ -322,7 +322,6 @@ void mark_tsc_unstable(char *reason) | |||
322 | { | 322 | { |
323 | if (!tsc_unstable) { | 323 | if (!tsc_unstable) { |
324 | tsc_unstable = 1; | 324 | tsc_unstable = 1; |
325 | tsc_enabled = 0; | ||
326 | printk("Marking TSC unstable due to: %s.\n", reason); | 325 | printk("Marking TSC unstable due to: %s.\n", reason); |
327 | /* Can be called before registration */ | 326 | /* Can be called before registration */ |
328 | if (clocksource_tsc.mult) | 327 | if (clocksource_tsc.mult) |
@@ -336,7 +335,7 @@ EXPORT_SYMBOL_GPL(mark_tsc_unstable); | |||
336 | static int __init dmi_mark_tsc_unstable(const struct dmi_system_id *d) | 335 | static int __init dmi_mark_tsc_unstable(const struct dmi_system_id *d) |
337 | { | 336 | { |
338 | printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", | 337 | printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", |
339 | d->ident); | 338 | d->ident); |
340 | tsc_unstable = 1; | 339 | tsc_unstable = 1; |
341 | return 0; | 340 | return 0; |
342 | } | 341 | } |
@@ -403,14 +402,22 @@ void __init tsc_init(void) | |||
403 | { | 402 | { |
404 | int cpu; | 403 | int cpu; |
405 | 404 | ||
406 | if (!cpu_has_tsc) | 405 | if (!cpu_has_tsc || tsc_disabled) { |
406 | /* Disable the TSC in case of !cpu_has_tsc */ | ||
407 | tsc_disabled = 1; | ||
407 | return; | 408 | return; |
409 | } | ||
408 | 410 | ||
409 | cpu_khz = calculate_cpu_khz(); | 411 | cpu_khz = calculate_cpu_khz(); |
410 | tsc_khz = cpu_khz; | 412 | tsc_khz = cpu_khz; |
411 | 413 | ||
412 | if (!cpu_khz) { | 414 | if (!cpu_khz) { |
413 | mark_tsc_unstable("could not calculate TSC khz"); | 415 | mark_tsc_unstable("could not calculate TSC khz"); |
416 | /* | ||
417 | * We need to disable the TSC completely in this case | ||
418 | * to prevent sched_clock() from using it. | ||
419 | */ | ||
420 | tsc_disabled = 1; | ||
414 | return; | 421 | return; |
415 | } | 422 | } |
416 | 423 | ||
@@ -441,8 +448,6 @@ void __init tsc_init(void) | |||
441 | if (check_tsc_unstable()) { | 448 | if (check_tsc_unstable()) { |
442 | clocksource_tsc.rating = 0; | 449 | clocksource_tsc.rating = 0; |
443 | clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS; | 450 | clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS; |
444 | } else | 451 | } |
445 | tsc_enabled = 1; | ||
446 | |||
447 | clocksource_register(&clocksource_tsc); | 452 | clocksource_register(&clocksource_tsc); |
448 | } | 453 | } |
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c index fcc16e58609e..1784b8077a12 100644 --- a/arch/x86/kernel/tsc_64.c +++ b/arch/x86/kernel/tsc_64.c | |||
@@ -227,14 +227,14 @@ void __init tsc_calibrate(void) | |||
227 | /* hpet or pmtimer available ? */ | 227 | /* hpet or pmtimer available ? */ |
228 | if (!hpet && !pm1 && !pm2) { | 228 | if (!hpet && !pm1 && !pm2) { |
229 | printk(KERN_INFO "TSC calibrated against PIT\n"); | 229 | printk(KERN_INFO "TSC calibrated against PIT\n"); |
230 | return; | 230 | goto out; |
231 | } | 231 | } |
232 | 232 | ||
233 | /* Check, whether the sampling was disturbed by an SMI */ | 233 | /* Check, whether the sampling was disturbed by an SMI */ |
234 | if (tsc1 == ULONG_MAX || tsc2 == ULONG_MAX) { | 234 | if (tsc1 == ULONG_MAX || tsc2 == ULONG_MAX) { |
235 | printk(KERN_WARNING "TSC calibration disturbed by SMI, " | 235 | printk(KERN_WARNING "TSC calibration disturbed by SMI, " |
236 | "using PIT calibration result\n"); | 236 | "using PIT calibration result\n"); |
237 | return; | 237 | goto out; |
238 | } | 238 | } |
239 | 239 | ||
240 | tsc2 = (tsc2 - tsc1) * 1000000L; | 240 | tsc2 = (tsc2 - tsc1) * 1000000L; |
@@ -255,6 +255,7 @@ void __init tsc_calibrate(void) | |||
255 | 255 | ||
256 | tsc_khz = tsc2 / tsc1; | 256 | tsc_khz = tsc2 / tsc1; |
257 | 257 | ||
258 | out: | ||
258 | for_each_possible_cpu(cpu) | 259 | for_each_possible_cpu(cpu) |
259 | set_cyc2ns_scale(tsc_khz, cpu); | 260 | set_cyc2ns_scale(tsc_khz, cpu); |
260 | } | 261 | } |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 36c5406b1813..7246b60afb96 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1996,7 +1996,7 @@ static struct shrinker mmu_shrinker = { | |||
1996 | .seeks = DEFAULT_SEEKS * 10, | 1996 | .seeks = DEFAULT_SEEKS * 10, |
1997 | }; | 1997 | }; |
1998 | 1998 | ||
1999 | void mmu_destroy_caches(void) | 1999 | static void mmu_destroy_caches(void) |
2000 | { | 2000 | { |
2001 | if (pte_chain_cache) | 2001 | if (pte_chain_cache) |
2002 | kmem_cache_destroy(pte_chain_cache); | 2002 | kmem_cache_destroy(pte_chain_cache); |
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c index 23476c2ebfc4..efa2ba7c6005 100644 --- a/arch/x86/vdso/vclock_gettime.c +++ b/arch/x86/vdso/vclock_gettime.c | |||
@@ -106,9 +106,9 @@ int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) | |||
106 | do_realtime((struct timespec *)tv); | 106 | do_realtime((struct timespec *)tv); |
107 | tv->tv_usec /= 1000; | 107 | tv->tv_usec /= 1000; |
108 | if (unlikely(tz != NULL)) { | 108 | if (unlikely(tz != NULL)) { |
109 | /* This relies on gcc inlining the memcpy. We'll notice | 109 | /* Avoid memcpy. Some old compilers fail to inline it */ |
110 | if it ever fails to do so. */ | 110 | tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest; |
111 | memcpy(tz, >od->sys_tz, sizeof(struct timezone)); | 111 | tz->tz_dsttime = gtod->sys_tz.tz_dsttime; |
112 | } | 112 | } |
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 126766d43aea..3525ef523a74 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -60,7 +60,7 @@ xmaddr_t arbitrary_virt_to_machine(unsigned long address) | |||
60 | { | 60 | { |
61 | unsigned int level; | 61 | unsigned int level; |
62 | pte_t *pte = lookup_address(address, &level); | 62 | pte_t *pte = lookup_address(address, &level); |
63 | unsigned offset = address & PAGE_MASK; | 63 | unsigned offset = address & ~PAGE_MASK; |
64 | 64 | ||
65 | BUG_ON(pte == NULL); | 65 | BUG_ON(pte == NULL); |
66 | 66 | ||