diff options
Diffstat (limited to 'arch')
77 files changed, 389 insertions, 305 deletions
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile index 63104ebd1806..4e1a8e2c4541 100644 --- a/arch/alpha/Makefile +++ b/arch/alpha/Makefile | |||
@@ -14,13 +14,13 @@ LDFLAGS_vmlinux := -static -N #-relax | |||
14 | CHECKFLAGS += -D__alpha__ -m64 | 14 | CHECKFLAGS += -D__alpha__ -m64 |
15 | cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data | 15 | cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data |
16 | 16 | ||
17 | cpuflags-$(CONFIG_ALPHA_EV67) := -mcpu=ev67 | 17 | cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4 |
18 | cpuflags-$(CONFIG_ALPHA_EV6) := -mcpu=ev6 | 18 | cpuflags-$(CONFIG_ALPHA_EV5) := -mcpu=ev5 |
19 | cpuflags-$(CONFIG_ALPHA_EV56) := -mcpu=ev56 | ||
19 | cpuflags-$(CONFIG_ALPHA_POLARIS) := -mcpu=pca56 | 20 | cpuflags-$(CONFIG_ALPHA_POLARIS) := -mcpu=pca56 |
20 | cpuflags-$(CONFIG_ALPHA_SX164) := -mcpu=pca56 | 21 | cpuflags-$(CONFIG_ALPHA_SX164) := -mcpu=pca56 |
21 | cpuflags-$(CONFIG_ALPHA_EV56) := -mcpu=ev56 | 22 | cpuflags-$(CONFIG_ALPHA_EV6) := -mcpu=ev6 |
22 | cpuflags-$(CONFIG_ALPHA_EV5) := -mcpu=ev5 | 23 | cpuflags-$(CONFIG_ALPHA_EV67) := -mcpu=ev67 |
23 | cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4 | ||
24 | # If GENERIC, make sure to turn off any instruction set extensions that | 24 | # If GENERIC, make sure to turn off any instruction set extensions that |
25 | # the host compiler might have on by default. Given that EV4 and EV5 | 25 | # the host compiler might have on by default. Given that EV4 and EV5 |
26 | # have the same instruction set, prefer EV5 because an EV5 schedule is | 26 | # have the same instruction set, prefer EV5 because an EV5 schedule is |
diff --git a/arch/alpha/kernel/err_ev7.c b/arch/alpha/kernel/err_ev7.c index bc799f72d8c1..68cd493f54c5 100644 --- a/arch/alpha/kernel/err_ev7.c +++ b/arch/alpha/kernel/err_ev7.c | |||
@@ -273,7 +273,7 @@ ev7_process_pal_subpacket(struct el_subpacket *header) | |||
273 | struct el_subpacket_handler ev7_pal_subpacket_handler = | 273 | struct el_subpacket_handler ev7_pal_subpacket_handler = |
274 | SUBPACKET_HANDLER_INIT(EL_CLASS__PAL, ev7_process_pal_subpacket); | 274 | SUBPACKET_HANDLER_INIT(EL_CLASS__PAL, ev7_process_pal_subpacket); |
275 | 275 | ||
276 | void | 276 | void __init |
277 | ev7_register_error_handlers(void) | 277 | ev7_register_error_handlers(void) |
278 | { | 278 | { |
279 | int i; | 279 | int i; |
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c index 497877bf2012..413bf37eb094 100644 --- a/arch/alpha/kernel/err_marvel.c +++ b/arch/alpha/kernel/err_marvel.c | |||
@@ -1152,7 +1152,7 @@ marvel_machine_check(u64 vector, u64 la_ptr) | |||
1152 | mb(); | 1152 | mb(); |
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | void | 1155 | void __init |
1156 | marvel_register_error_handlers(void) | 1156 | marvel_register_error_handlers(void) |
1157 | { | 1157 | { |
1158 | ev7_register_error_handlers(); | 1158 | ev7_register_error_handlers(); |
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c index 6f3867877d9e..257449ed15ef 100644 --- a/arch/alpha/kernel/err_titan.c +++ b/arch/alpha/kernel/err_titan.c | |||
@@ -564,7 +564,7 @@ static struct el_subpacket_handler titan_subpacket_handler = | |||
564 | SUBPACKET_HANDLER_INIT(EL_CLASS__REGATTA_FAMILY, | 564 | SUBPACKET_HANDLER_INIT(EL_CLASS__REGATTA_FAMILY, |
565 | el_process_regatta_subpacket); | 565 | el_process_regatta_subpacket); |
566 | 566 | ||
567 | void | 567 | void __init |
568 | titan_register_error_handlers(void) | 568 | titan_register_error_handlers(void) |
569 | { | 569 | { |
570 | size_t i; | 570 | size_t i; |
diff --git a/arch/alpha/kernel/machvec_impl.h b/arch/alpha/kernel/machvec_impl.h index 0caa45aa128d..466c9dff8181 100644 --- a/arch/alpha/kernel/machvec_impl.h +++ b/arch/alpha/kernel/machvec_impl.h | |||
@@ -134,7 +134,7 @@ | |||
134 | #define __initmv __initdata | 134 | #define __initmv __initdata |
135 | #define ALIAS_MV(x) | 135 | #define ALIAS_MV(x) |
136 | #else | 136 | #else |
137 | #define __initmv | 137 | #define __initmv __initdata_refok |
138 | 138 | ||
139 | /* GCC actually has a syntax for defining aliases, but is under some | 139 | /* GCC actually has a syntax for defining aliases, but is under some |
140 | delusion that you shouldn't be able to declare it extern somewhere | 140 | delusion that you shouldn't be able to declare it extern somewhere |
diff --git a/arch/alpha/lib/ev6-stxncpy.S b/arch/alpha/lib/ev6-stxncpy.S index b581a7af2456..1aa6e97e04b5 100644 --- a/arch/alpha/lib/ev6-stxncpy.S +++ b/arch/alpha/lib/ev6-stxncpy.S | |||
@@ -362,10 +362,10 @@ $unaligned: | |||
362 | 362 | ||
363 | extql t2, a1, t2 # U : | 363 | extql t2, a1, t2 # U : |
364 | cmpbge zero, t1, t8 # E : is there a zero? | 364 | cmpbge zero, t1, t8 # E : is there a zero? |
365 | andnot t2, t6, t12 # E : dest mask for a single word copy | 365 | andnot t2, t6, t2 # E : dest mask for a single word copy |
366 | or t8, t10, t5 # E : test for end-of-count too | 366 | or t8, t10, t5 # E : test for end-of-count too |
367 | 367 | ||
368 | cmpbge zero, t12, t3 # E : | 368 | cmpbge zero, t2, t3 # E : |
369 | cmoveq a2, t5, t8 # E : Latency=2, extra map slot | 369 | cmoveq a2, t5, t8 # E : Latency=2, extra map slot |
370 | nop # E : keep with cmoveq | 370 | nop # E : keep with cmoveq |
371 | andnot t8, t3, t8 # E : (stall) | 371 | andnot t8, t3, t8 # E : (stall) |
@@ -379,13 +379,13 @@ $unaligned: | |||
379 | negq t8, t6 # E : build bitmask of bytes <= zero | 379 | negq t8, t6 # E : build bitmask of bytes <= zero |
380 | mskqh t1, t4, t1 # U : | 380 | mskqh t1, t4, t1 # U : |
381 | 381 | ||
382 | and t6, t8, t2 # E : | 382 | and t6, t8, t12 # E : |
383 | subq t2, 1, t6 # E : (stall) | 383 | subq t12, 1, t6 # E : (stall) |
384 | or t6, t2, t8 # E : (stall) | 384 | or t6, t12, t8 # E : (stall) |
385 | zapnot t12, t8, t12 # U : prepare source word; mirror changes (stall) | 385 | zapnot t2, t8, t2 # U : prepare source word; mirror changes (stall) |
386 | 386 | ||
387 | zapnot t1, t8, t1 # U : to source validity mask | 387 | zapnot t1, t8, t1 # U : to source validity mask |
388 | andnot t0, t12, t0 # E : zero place for source to reside | 388 | andnot t0, t2, t0 # E : zero place for source to reside |
389 | or t0, t1, t0 # E : and put it there (stall both t0, t1) | 389 | or t0, t1, t0 # E : and put it there (stall both t0, t1) |
390 | stq_u t0, 0(a0) # L : (stall) | 390 | stq_u t0, 0(a0) # L : (stall) |
391 | 391 | ||
diff --git a/arch/alpha/lib/strncpy.S b/arch/alpha/lib/strncpy.S index bbdef1be5f95..a46f7f3ad8c7 100644 --- a/arch/alpha/lib/strncpy.S +++ b/arch/alpha/lib/strncpy.S | |||
@@ -35,7 +35,7 @@ strncpy: | |||
35 | 35 | ||
36 | or $3, $24, $3 # clear the bits between the last | 36 | or $3, $24, $3 # clear the bits between the last |
37 | or $4, $27, $4 # written byte and the last byte in COUNT | 37 | or $4, $27, $4 # written byte and the last byte in COUNT |
38 | andnot $4, $3, $4 | 38 | andnot $3, $4, $4 |
39 | zap $1, $4, $1 | 39 | zap $1, $4, $1 |
40 | 40 | ||
41 | stq_u $1, 0($16) | 41 | stq_u $1, 0($16) |
diff --git a/arch/alpha/lib/stxncpy.S b/arch/alpha/lib/stxncpy.S index da1a72740d29..3dece25283a3 100644 --- a/arch/alpha/lib/stxncpy.S +++ b/arch/alpha/lib/stxncpy.S | |||
@@ -315,9 +315,9 @@ $unaligned: | |||
315 | 315 | ||
316 | extql t2, a1, t2 # e0 : | 316 | extql t2, a1, t2 # e0 : |
317 | cmpbge zero, t1, t8 # .. e1 : is there a zero? | 317 | cmpbge zero, t1, t8 # .. e1 : is there a zero? |
318 | andnot t2, t6, t12 # e0 : dest mask for a single word copy | 318 | andnot t2, t6, t2 # e0 : dest mask for a single word copy |
319 | or t8, t10, t5 # .. e1 : test for end-of-count too | 319 | or t8, t10, t5 # .. e1 : test for end-of-count too |
320 | cmpbge zero, t12, t3 # e0 : | 320 | cmpbge zero, t2, t3 # e0 : |
321 | cmoveq a2, t5, t8 # .. e1 : | 321 | cmoveq a2, t5, t8 # .. e1 : |
322 | andnot t8, t3, t8 # e0 : | 322 | andnot t8, t3, t8 # e0 : |
323 | beq t8, $u_head # .. e1 (zdb) | 323 | beq t8, $u_head # .. e1 (zdb) |
@@ -330,14 +330,14 @@ $unaligned: | |||
330 | ldq_u t0, 0(a0) # e0 : | 330 | ldq_u t0, 0(a0) # e0 : |
331 | negq t8, t6 # .. e1 : build bitmask of bytes <= zero | 331 | negq t8, t6 # .. e1 : build bitmask of bytes <= zero |
332 | mskqh t1, t4, t1 # e0 : | 332 | mskqh t1, t4, t1 # e0 : |
333 | and t6, t8, t2 # .. e1 : | 333 | and t6, t8, t12 # .. e1 : |
334 | subq t2, 1, t6 # e0 : | 334 | subq t12, 1, t6 # e0 : |
335 | or t6, t2, t8 # e1 : | 335 | or t6, t12, t8 # e1 : |
336 | 336 | ||
337 | zapnot t12, t8, t12 # e0 : prepare source word; mirror changes | 337 | zapnot t2, t8, t2 # e0 : prepare source word; mirror changes |
338 | zapnot t1, t8, t1 # .. e1 : to source validity mask | 338 | zapnot t1, t8, t1 # .. e1 : to source validity mask |
339 | 339 | ||
340 | andnot t0, t12, t0 # e0 : zero place for source to reside | 340 | andnot t0, t2, t0 # e0 : zero place for source to reside |
341 | or t0, t1, t0 # e1 : and put it there | 341 | or t0, t1, t0 # e1 : and put it there |
342 | stq_u t0, 0(a0) # e0 : | 342 | stq_u t0, 0(a0) # e0 : |
343 | ret (t9) # .. e1 : | 343 | ret (t9) # .. e1 : |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a7e9fea978a6..c4de2d4664d7 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -537,7 +537,7 @@ config ISA_DMA_API | |||
537 | bool | 537 | bool |
538 | 538 | ||
539 | config PCI | 539 | config PCI |
540 | bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695 | 540 | bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695 || MACH_ARMCORE |
541 | help | 541 | help |
542 | Find out whether you have a PCI motherboard. PCI is the name of a | 542 | Find out whether you have a PCI motherboard. PCI is the name of a |
543 | bus system, i.e. the way the CPU talks to the other stuff inside | 543 | bus system, i.e. the way the CPU talks to the other stuff inside |
@@ -558,6 +558,12 @@ config PCI_HOST_VIA82C505 | |||
558 | depends on PCI && ARCH_SHARK | 558 | depends on PCI && ARCH_SHARK |
559 | default y | 559 | default y |
560 | 560 | ||
561 | config PCI_HOST_ITE8152 | ||
562 | bool | ||
563 | depends on PCI && MACH_ARMCORE | ||
564 | default y | ||
565 | select DMABOUNCE | ||
566 | |||
561 | source "drivers/pci/Kconfig" | 567 | source "drivers/pci/Kconfig" |
562 | 568 | ||
563 | source "drivers/pcmcia/Kconfig" | 569 | source "drivers/pcmcia/Kconfig" |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index b9b03eda70e5..5cac46a19bb7 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -31,7 +31,7 @@ | |||
31 | .macro loadsp, rb | 31 | .macro loadsp, rb |
32 | .endm | 32 | .endm |
33 | .macro writeb, ch, rb | 33 | .macro writeb, ch, rb |
34 | mcr p14, 0, \ch, c0, c1, 0 | 34 | mcr p14, 0, \ch, c1, c0, 0 |
35 | .endm | 35 | .endm |
36 | #endif | 36 | #endif |
37 | 37 | ||
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index c03de9bfd76b..97b7dc13d9aa 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
@@ -70,8 +70,6 @@ static inline void it8152_irq(int irq) | |||
70 | { | 70 | { |
71 | struct irq_desc *desc; | 71 | struct irq_desc *desc; |
72 | 72 | ||
73 | printk(KERN_DEBUG "===> %s: irq=%d\n", __FUNCTION__, irq); | ||
74 | |||
75 | desc = irq_desc + irq; | 73 | desc = irq_desc + irq; |
76 | desc_handle_irq(irq, desc); | 74 | desc_handle_irq(irq, desc); |
77 | } | 75 | } |
@@ -106,8 +104,6 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc) | |||
106 | int bits_pd, bits_lp, bits_ld; | 104 | int bits_pd, bits_lp, bits_ld; |
107 | int i; | 105 | int i; |
108 | 106 | ||
109 | printk(KERN_DEBUG "=> %s: irq = %d\n", __FUNCTION__, irq); | ||
110 | |||
111 | while (1) { | 107 | while (1) { |
112 | /* Read all */ | 108 | /* Read all */ |
113 | bits_pd = __raw_readl(IT8152_INTC_PDCNIRR); | 109 | bits_pd = __raw_readl(IT8152_INTC_PDCNIRR); |
@@ -293,8 +289,7 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) | |||
293 | */ | 289 | */ |
294 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | 290 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask) |
295 | { | 291 | { |
296 | printk(KERN_DEBUG "%s: %s %llx\n", | 292 | dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask); |
297 | __FUNCTION__, dev->dev.bus_id, mask); | ||
298 | if (mask >= PHYS_OFFSET + SZ_64M - 1) | 293 | if (mask >= PHYS_OFFSET + SZ_64M - 1) |
299 | return 0; | 294 | return 0; |
300 | 295 | ||
@@ -304,8 +299,7 @@ int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | |||
304 | int | 299 | int |
305 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | 300 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) |
306 | { | 301 | { |
307 | printk(KERN_DEBUG "%s: %s %llx\n", | 302 | dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask); |
308 | __FUNCTION__, dev->dev.bus_id, mask); | ||
309 | if (mask >= PHYS_OFFSET + SZ_64M - 1) | 303 | if (mask >= PHYS_OFFSET + SZ_64M - 1) |
310 | return 0; | 304 | return 0; |
311 | 305 | ||
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index c1271c449246..f6d66dce6852 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -442,7 +442,8 @@ static int ixp4xx_set_next_event(unsigned long evt, | |||
442 | static void ixp4xx_set_mode(enum clock_event_mode mode, | 442 | static void ixp4xx_set_mode(enum clock_event_mode mode, |
443 | struct clock_event_device *evt) | 443 | struct clock_event_device *evt) |
444 | { | 444 | { |
445 | unsigned long opts, osrt = *IXP4XX_OSRT1 & ~IXP4XX_OST_RELOAD_MASK; | 445 | unsigned long opts = *IXP4XX_OSRT1 & IXP4XX_OST_RELOAD_MASK; |
446 | unsigned long osrt = *IXP4XX_OSRT1 & ~IXP4XX_OST_RELOAD_MASK; | ||
446 | 447 | ||
447 | switch (mode) { | 448 | switch (mode) { |
448 | case CLOCK_EVT_MODE_PERIODIC: | 449 | case CLOCK_EVT_MODE_PERIODIC: |
@@ -455,12 +456,15 @@ static void ixp4xx_set_mode(enum clock_event_mode mode, | |||
455 | opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT; | 456 | opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT; |
456 | break; | 457 | break; |
457 | case CLOCK_EVT_MODE_SHUTDOWN: | 458 | case CLOCK_EVT_MODE_SHUTDOWN: |
459 | opts &= ~IXP4XX_OST_ENABLE; | ||
460 | break; | ||
461 | case CLOCK_EVT_MODE_RESUME: | ||
462 | opts |= IXP4XX_OST_ENABLE; | ||
463 | break; | ||
458 | case CLOCK_EVT_MODE_UNUSED: | 464 | case CLOCK_EVT_MODE_UNUSED: |
459 | default: | 465 | default: |
460 | osrt = opts = 0; | 466 | osrt = opts = 0; |
461 | break; | 467 | break; |
462 | case CLOCK_EVT_MODE_RESUME: | ||
463 | break; | ||
464 | } | 468 | } |
465 | 469 | ||
466 | *IXP4XX_OSRT1 = osrt | opts; | 470 | *IXP4XX_OSRT1 = osrt | opts; |
diff --git a/arch/arm/mach-pxa/cm-x270-pci.c b/arch/arm/mach-pxa/cm-x270-pci.c index 878d3b9b8633..15c4e0df3e10 100644 --- a/arch/arm/mach-pxa/cm-x270-pci.c +++ b/arch/arm/mach-pxa/cm-x270-pci.c | |||
@@ -40,7 +40,7 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size, | |||
40 | { | 40 | { |
41 | unsigned int sz = SZ_64M >> PAGE_SHIFT; | 41 | unsigned int sz = SZ_64M >> PAGE_SHIFT; |
42 | 42 | ||
43 | printk(KERN_INFO "Adjusting zones for CM-x270\n"); | 43 | pr_info("Adjusting zones for CM-x270\n"); |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Only adjust if > 64M on current system | 46 | * Only adjust if > 64M on current system |
@@ -104,8 +104,7 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
104 | { | 104 | { |
105 | int irq; | 105 | int irq; |
106 | 106 | ||
107 | printk(KERN_DEBUG "===> %s: %s slot=%x, pin=%x\n", __FUNCTION__, | 107 | dev_dbg(&dev->dev, "%s: slot=%x, pin=%x\n", __FUNCTION__, slot, pin); |
108 | pci_name(dev), slot, pin); | ||
109 | 108 | ||
110 | irq = it8152_pci_map_irq(dev, slot, pin); | 109 | irq = it8152_pci_map_irq(dev, slot, pin); |
111 | if (irq) | 110 | if (irq) |
@@ -141,14 +140,13 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
141 | return(0); | 140 | return(0); |
142 | } | 141 | } |
143 | 142 | ||
144 | static struct pci_bus * __init | 143 | static void cmx270_pci_preinit(void) |
145 | cmx270_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
146 | { | 144 | { |
147 | printk(KERN_INFO "Initializing CM-X270 PCI subsystem\n"); | 145 | pr_info("Initializing CM-X270 PCI subsystem\n"); |
148 | 146 | ||
149 | __raw_writel(0x800, IT8152_PCI_CFG_ADDR); | 147 | __raw_writel(0x800, IT8152_PCI_CFG_ADDR); |
150 | if (__raw_readl(IT8152_PCI_CFG_DATA) == 0x81521283) { | 148 | if (__raw_readl(IT8152_PCI_CFG_DATA) == 0x81521283) { |
151 | printk(KERN_INFO "PCI Bridge found.\n"); | 149 | pr_info("PCI Bridge found.\n"); |
152 | 150 | ||
153 | /* set PCI I/O base at 0 */ | 151 | /* set PCI I/O base at 0 */ |
154 | writel(0x848, IT8152_PCI_CFG_ADDR); | 152 | writel(0x848, IT8152_PCI_CFG_ADDR); |
@@ -163,7 +161,7 @@ cmx270_pci_scan_bus(int nr, struct pci_sys_data *sys) | |||
163 | /* CardBus Controller on ATXbase baseboard */ | 161 | /* CardBus Controller on ATXbase baseboard */ |
164 | writel(0x4000, IT8152_PCI_CFG_ADDR); | 162 | writel(0x4000, IT8152_PCI_CFG_ADDR); |
165 | if (readl(IT8152_PCI_CFG_DATA) == 0xAC51104C) { | 163 | if (readl(IT8152_PCI_CFG_DATA) == 0xAC51104C) { |
166 | printk(KERN_INFO "CardBus Bridge found.\n"); | 164 | pr_info("CardBus Bridge found.\n"); |
167 | 165 | ||
168 | /* Configure socket 0 */ | 166 | /* Configure socket 0 */ |
169 | writel(0x408C, IT8152_PCI_CFG_ADDR); | 167 | writel(0x408C, IT8152_PCI_CFG_ADDR); |
@@ -196,7 +194,6 @@ cmx270_pci_scan_bus(int nr, struct pci_sys_data *sys) | |||
196 | writel(0xb0000000, IT8152_PCI_CFG_DATA); | 194 | writel(0xb0000000, IT8152_PCI_CFG_DATA); |
197 | } | 195 | } |
198 | } | 196 | } |
199 | return it8152_pci_scan_bus(nr, sys); | ||
200 | } | 197 | } |
201 | 198 | ||
202 | static struct hw_pci cmx270_pci __initdata = { | 199 | static struct hw_pci cmx270_pci __initdata = { |
@@ -204,7 +201,8 @@ static struct hw_pci cmx270_pci __initdata = { | |||
204 | .map_irq = cmx270_pci_map_irq, | 201 | .map_irq = cmx270_pci_map_irq, |
205 | .nr_controllers = 1, | 202 | .nr_controllers = 1, |
206 | .setup = it8152_pci_setup, | 203 | .setup = it8152_pci_setup, |
207 | .scan = cmx270_pci_scan_bus, | 204 | .scan = it8152_pci_scan_bus, |
205 | .preinit = cmx270_pci_preinit, | ||
208 | }; | 206 | }; |
209 | 207 | ||
210 | static int __init cmx270_init_pci(void) | 208 | static int __init cmx270_init_pci(void) |
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index bc859a311eaf..45bf04eb7d70 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
@@ -2034,7 +2034,8 @@ sba_init(void) | |||
2034 | if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb")) | 2034 | if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb")) |
2035 | return 0; | 2035 | return 0; |
2036 | 2036 | ||
2037 | #if defined(CONFIG_IA64_GENERIC) && defined(CONFIG_CRASH_DUMP) | 2037 | #if defined(CONFIG_IA64_GENERIC) && defined(CONFIG_CRASH_DUMP) && \ |
2038 | defined(CONFIG_PROC_FS) | ||
2038 | /* If we are booting a kdump kernel, the sba_iommu will | 2039 | /* If we are booting a kdump kernel, the sba_iommu will |
2039 | * cause devices that were not shutdown properly to MCA | 2040 | * cause devices that were not shutdown properly to MCA |
2040 | * as soon as they are turned back on. Our only option for | 2041 | * as soon as they are turned back on. Our only option for |
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index f6ae3ec93810..3e35987af458 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c | |||
@@ -52,33 +52,29 @@ extern struct page *ia32_shared_page[]; | |||
52 | extern unsigned long *ia32_gdt; | 52 | extern unsigned long *ia32_gdt; |
53 | extern struct page *ia32_gate_page; | 53 | extern struct page *ia32_gate_page; |
54 | 54 | ||
55 | struct page * | 55 | int |
56 | ia32_install_shared_page (struct vm_area_struct *vma, unsigned long address, int *type) | 56 | ia32_install_shared_page (struct vm_area_struct *vma, struct vm_fault *vmf) |
57 | { | 57 | { |
58 | struct page *pg = ia32_shared_page[smp_processor_id()]; | 58 | vmf->page = ia32_shared_page[smp_processor_id()]; |
59 | get_page(pg); | 59 | get_page(vmf->page); |
60 | if (type) | 60 | return 0; |
61 | *type = VM_FAULT_MINOR; | ||
62 | return pg; | ||
63 | } | 61 | } |
64 | 62 | ||
65 | struct page * | 63 | int |
66 | ia32_install_gate_page (struct vm_area_struct *vma, unsigned long address, int *type) | 64 | ia32_install_gate_page (struct vm_area_struct *vma, struct vm_fault *vmf) |
67 | { | 65 | { |
68 | struct page *pg = ia32_gate_page; | 66 | vmf->page = ia32_gate_page; |
69 | get_page(pg); | 67 | get_page(vmf->page); |
70 | if (type) | 68 | return 0; |
71 | *type = VM_FAULT_MINOR; | ||
72 | return pg; | ||
73 | } | 69 | } |
74 | 70 | ||
75 | 71 | ||
76 | static struct vm_operations_struct ia32_shared_page_vm_ops = { | 72 | static struct vm_operations_struct ia32_shared_page_vm_ops = { |
77 | .nopage = ia32_install_shared_page | 73 | .fault = ia32_install_shared_page |
78 | }; | 74 | }; |
79 | 75 | ||
80 | static struct vm_operations_struct ia32_gate_page_vm_ops = { | 76 | static struct vm_operations_struct ia32_gate_page_vm_ops = { |
81 | .nopage = ia32_install_gate_page | 77 | .fault = ia32_install_gate_page |
82 | }; | 78 | }; |
83 | 79 | ||
84 | void | 80 | void |
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index 4e5e27540e27..d3a41d5f8d12 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -1176,6 +1176,7 @@ tlb_purge_done: | |||
1176 | RESTORE_REG(cr.dcr, r25, r17);; | 1176 | RESTORE_REG(cr.dcr, r25, r17);; |
1177 | RESTORE_REG(cr.iva, r25, r17);; | 1177 | RESTORE_REG(cr.iva, r25, r17);; |
1178 | RESTORE_REG(cr.pta, r25, r17);; | 1178 | RESTORE_REG(cr.pta, r25, r17);; |
1179 | srlz.d;; // required not to violate RAW dependency | ||
1179 | RESTORE_REG(cr.itv, r25, r17);; | 1180 | RESTORE_REG(cr.itv, r25, r17);; |
1180 | RESTORE_REG(cr.pmv, r25, r17);; | 1181 | RESTORE_REG(cr.pmv, r25, r17);; |
1181 | RESTORE_REG(cr.cmcv, r25, r17);; | 1182 | RESTORE_REG(cr.cmcv, r25, r17);; |
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 00a4599e5f47..0b52f19ed046 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -200,7 +200,7 @@ assign_irq_vector (int irq) | |||
200 | { | 200 | { |
201 | unsigned long flags; | 201 | unsigned long flags; |
202 | int vector, cpu; | 202 | int vector, cpu; |
203 | cpumask_t domain; | 203 | cpumask_t domain = CPU_MASK_NONE; |
204 | 204 | ||
205 | vector = -ENOSPC; | 205 | vector = -ENOSPC; |
206 | 206 | ||
@@ -340,7 +340,7 @@ int create_irq(void) | |||
340 | { | 340 | { |
341 | unsigned long flags; | 341 | unsigned long flags; |
342 | int irq, vector, cpu; | 342 | int irq, vector, cpu; |
343 | cpumask_t domain; | 343 | cpumask_t domain = CPU_MASK_NONE; |
344 | 344 | ||
345 | irq = vector = -ENOSPC; | 345 | irq = vector = -ENOSPC; |
346 | spin_lock_irqsave(&vector_lock, flags); | 346 | spin_lock_irqsave(&vector_lock, flags); |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 10b48cd15a87..6dbf5919d2d0 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -75,6 +75,7 @@ | |||
75 | #include <linux/workqueue.h> | 75 | #include <linux/workqueue.h> |
76 | #include <linux/cpumask.h> | 76 | #include <linux/cpumask.h> |
77 | #include <linux/kdebug.h> | 77 | #include <linux/kdebug.h> |
78 | #include <linux/cpu.h> | ||
78 | 79 | ||
79 | #include <asm/delay.h> | 80 | #include <asm/delay.h> |
80 | #include <asm/machvec.h> | 81 | #include <asm/machvec.h> |
@@ -1813,6 +1814,36 @@ ia64_mca_cpu_init(void *cpu_data) | |||
1813 | PAGE_KERNEL)); | 1814 | PAGE_KERNEL)); |
1814 | } | 1815 | } |
1815 | 1816 | ||
1817 | static void __cpuinit ia64_mca_cmc_vector_adjust(void *dummy) | ||
1818 | { | ||
1819 | unsigned long flags; | ||
1820 | |||
1821 | local_irq_save(flags); | ||
1822 | if (!cmc_polling_enabled) | ||
1823 | ia64_mca_cmc_vector_enable(NULL); | ||
1824 | local_irq_restore(flags); | ||
1825 | } | ||
1826 | |||
1827 | static int __cpuinit mca_cpu_callback(struct notifier_block *nfb, | ||
1828 | unsigned long action, | ||
1829 | void *hcpu) | ||
1830 | { | ||
1831 | int hotcpu = (unsigned long) hcpu; | ||
1832 | |||
1833 | switch (action) { | ||
1834 | case CPU_ONLINE: | ||
1835 | case CPU_ONLINE_FROZEN: | ||
1836 | smp_call_function_single(hotcpu, ia64_mca_cmc_vector_adjust, | ||
1837 | NULL, 1, 0); | ||
1838 | break; | ||
1839 | } | ||
1840 | return NOTIFY_OK; | ||
1841 | } | ||
1842 | |||
1843 | static struct notifier_block mca_cpu_notifier __cpuinitdata = { | ||
1844 | .notifier_call = mca_cpu_callback | ||
1845 | }; | ||
1846 | |||
1816 | /* | 1847 | /* |
1817 | * ia64_mca_init | 1848 | * ia64_mca_init |
1818 | * | 1849 | * |
@@ -1996,6 +2027,8 @@ ia64_mca_late_init(void) | |||
1996 | if (!mca_init) | 2027 | if (!mca_init) |
1997 | return 0; | 2028 | return 0; |
1998 | 2029 | ||
2030 | register_hotcpu_notifier(&mca_cpu_notifier); | ||
2031 | |||
1999 | /* Setup the CMCI/P vector and handler */ | 2032 | /* Setup the CMCI/P vector and handler */ |
2000 | init_timer(&cmc_poll_timer); | 2033 | init_timer(&cmc_poll_timer); |
2001 | cmc_poll_timer.function = ia64_mca_cmc_poll; | 2034 | cmc_poll_timer.function = ia64_mca_cmc_poll; |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 2418289ee5ca..7377d323131d 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/kdebug.h> | 29 | #include <linux/kdebug.h> |
30 | #include <linux/utsname.h> | ||
30 | 31 | ||
31 | #include <asm/cpu.h> | 32 | #include <asm/cpu.h> |
32 | #include <asm/delay.h> | 33 | #include <asm/delay.h> |
@@ -107,8 +108,9 @@ show_regs (struct pt_regs *regs) | |||
107 | print_modules(); | 108 | print_modules(); |
108 | printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current), | 109 | printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current), |
109 | smp_processor_id(), current->comm); | 110 | smp_processor_id(), current->comm); |
110 | printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s\n", | 111 | printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n", |
111 | regs->cr_ipsr, regs->cr_ifs, ip, print_tainted()); | 112 | regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(), |
113 | init_utsname()->release); | ||
112 | print_symbol("ip is at %s\n", ip); | 114 | print_symbol("ip is at %s\n", ip); |
113 | printk("unat: %016lx pfs : %016lx rsc : %016lx\n", | 115 | printk("unat: %016lx pfs : %016lx rsc : %016lx\n", |
114 | regs->ar_unat, regs->ar_pfs, regs->ar_rsc); | 116 | regs->ar_unat, regs->ar_pfs, regs->ar_rsc); |
@@ -737,6 +739,7 @@ flush_thread (void) | |||
737 | ia32_drop_ia64_partial_page_list(current); | 739 | ia32_drop_ia64_partial_page_list(current); |
738 | current->thread.task_size = IA32_PAGE_OFFSET; | 740 | current->thread.task_size = IA32_PAGE_OFFSET; |
739 | set_fs(USER_DS); | 741 | set_fs(USER_DS); |
742 | memset(current->thread.tls_array, 0, sizeof(current->thread.tls_array)); | ||
740 | } | 743 | } |
741 | #endif | 744 | #endif |
742 | } | 745 | } |
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index 4c730099d58f..309da3567bc8 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c | |||
@@ -280,15 +280,7 @@ setup_sigcontext (struct sigcontext __user *sc, sigset_t *mask, struct sigscratc | |||
280 | err |= __copy_to_user(&sc->sc_gr[15], &scr->pt.r15, 8); /* r15 */ | 280 | err |= __copy_to_user(&sc->sc_gr[15], &scr->pt.r15, 8); /* r15 */ |
281 | err |= __put_user(scr->pt.cr_iip + ia64_psr(&scr->pt)->ri, &sc->sc_ip); | 281 | err |= __put_user(scr->pt.cr_iip + ia64_psr(&scr->pt)->ri, &sc->sc_ip); |
282 | 282 | ||
283 | if (flags & IA64_SC_FLAG_IN_SYSCALL) { | 283 | if (!(flags & IA64_SC_FLAG_IN_SYSCALL)) { |
284 | /* Clear scratch registers if the signal interrupted a system call. */ | ||
285 | err |= __put_user(0, &sc->sc_ar_ccv); /* ar.ccv */ | ||
286 | err |= __put_user(0, &sc->sc_br[7]); /* b7 */ | ||
287 | err |= __put_user(0, &sc->sc_gr[14]); /* r14 */ | ||
288 | err |= __clear_user(&sc->sc_ar25, 2*8); /* ar.csd & ar.ssd */ | ||
289 | err |= __clear_user(&sc->sc_gr[2], 2*8); /* r2-r3 */ | ||
290 | err |= __clear_user(&sc->sc_gr[16], 16*8); /* r16-r31 */ | ||
291 | } else { | ||
292 | /* Copy scratch regs to sigcontext if the signal didn't interrupt a syscall. */ | 284 | /* Copy scratch regs to sigcontext if the signal didn't interrupt a syscall. */ |
293 | err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); /* ar.ccv */ | 285 | err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); /* ar.ccv */ |
294 | err |= __put_user(scr->pt.b7, &sc->sc_br[7]); /* b7 */ | 286 | err |= __put_user(scr->pt.b7, &sc->sc_br[7]); /* b7 */ |
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index a7be4f203420..2a90c32024f4 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c | |||
@@ -118,7 +118,7 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid) | |||
118 | for (i = 0; i < (IA64_GRANULE_SIZE / PAGE_SIZE); i++) | 118 | for (i = 0; i < (IA64_GRANULE_SIZE / PAGE_SIZE); i++) |
119 | SetPageUncached(&page[i]); | 119 | SetPageUncached(&page[i]); |
120 | 120 | ||
121 | flush_tlb_kernel_range(uc_addr, uc_adddr + IA64_GRANULE_SIZE); | 121 | flush_tlb_kernel_range(uc_addr, uc_addr + IA64_GRANULE_SIZE); |
122 | 122 | ||
123 | status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); | 123 | status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); |
124 | if (status == PAL_VISIBILITY_OK_REMOTE_NEEDED) { | 124 | if (status == PAL_VISIBILITY_OK_REMOTE_NEEDED) { |
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index cef164729db7..655da240d13c 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * IPI based ptc implementation and A-step IPI implementation. | 10 | * IPI based ptc implementation and A-step IPI implementation. |
11 | * Rohit Seth <rohit.seth@intel.com> | 11 | * Rohit Seth <rohit.seth@intel.com> |
12 | * Ken Chen <kenneth.w.chen@intel.com> | 12 | * Ken Chen <kenneth.w.chen@intel.com> |
13 | * Christophe de Dinechin <ddd@hp.com>: Avoid ptc.e on memory allocation | ||
13 | */ | 14 | */ |
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
@@ -89,9 +90,16 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start, | |||
89 | { | 90 | { |
90 | static DEFINE_SPINLOCK(ptcg_lock); | 91 | static DEFINE_SPINLOCK(ptcg_lock); |
91 | 92 | ||
92 | if (mm != current->active_mm || !current->mm) { | 93 | struct mm_struct *active_mm = current->active_mm; |
93 | flush_tlb_all(); | 94 | |
94 | return; | 95 | if (mm != active_mm) { |
96 | /* Restore region IDs for mm */ | ||
97 | if (mm && active_mm) { | ||
98 | activate_context(mm); | ||
99 | } else { | ||
100 | flush_tlb_all(); | ||
101 | return; | ||
102 | } | ||
95 | } | 103 | } |
96 | 104 | ||
97 | /* HW requires global serialization of ptc.ga. */ | 105 | /* HW requires global serialization of ptc.ga. */ |
@@ -107,6 +115,10 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start, | |||
107 | } while (start < end); | 115 | } while (start < end); |
108 | } | 116 | } |
109 | spin_unlock(&ptcg_lock); | 117 | spin_unlock(&ptcg_lock); |
118 | |||
119 | if (mm != active_mm) { | ||
120 | activate_context(active_mm); | ||
121 | } | ||
110 | } | 122 | } |
111 | 123 | ||
112 | void | 124 | void |
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index b362d6d6a8c8..9456d4034024 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
@@ -227,7 +227,7 @@ retry_bteop: | |||
227 | BTE_LNSTAT_LOAD(bte), *bte->most_rcnt_na)); | 227 | BTE_LNSTAT_LOAD(bte), *bte->most_rcnt_na)); |
228 | 228 | ||
229 | if (transfer_stat & IBLS_ERROR) { | 229 | if (transfer_stat & IBLS_ERROR) { |
230 | bte_status = transfer_stat & ~IBLS_ERROR; | 230 | bte_status = BTE_GET_ERROR_STATUS(transfer_stat); |
231 | } else { | 231 | } else { |
232 | bte_status = BTE_SUCCESS; | 232 | bte_status = BTE_SUCCESS; |
233 | } | 233 | } |
diff --git a/arch/ia64/sn/kernel/bte_error.c b/arch/ia64/sn/kernel/bte_error.c index 27c5936ccfe9..4cb09f3f1efc 100644 --- a/arch/ia64/sn/kernel/bte_error.c +++ b/arch/ia64/sn/kernel/bte_error.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
@@ -148,7 +148,11 @@ int shub2_bte_error_handler(unsigned long _nodepda) | |||
148 | for (i = 0; i < BTES_PER_NODE; i++) { | 148 | for (i = 0; i < BTES_PER_NODE; i++) { |
149 | bte = &err_nodepda->bte_if[i]; | 149 | bte = &err_nodepda->bte_if[i]; |
150 | status = BTE_LNSTAT_LOAD(bte); | 150 | status = BTE_LNSTAT_LOAD(bte); |
151 | if ((status & IBLS_ERROR) || !(status & IBLS_BUSY)) | 151 | if (status & IBLS_ERROR) { |
152 | bte->bh_error = BTE_SHUB2_ERROR(status); | ||
153 | continue; | ||
154 | } | ||
155 | if (!(status & IBLS_BUSY)) | ||
152 | continue; | 156 | continue; |
153 | mod_timer(recovery_timer, jiffies + (HZ * 5)); | 157 | mod_timer(recovery_timer, jiffies + (HZ * 5)); |
154 | BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda, | 158 | BTE_PRINTK(("eh:%p:%d Marked Giving up\n", err_nodepda, |
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c index cee9379d44e0..e1a3e19d3d9c 100644 --- a/arch/ia64/sn/pci/tioce_provider.c +++ b/arch/ia64/sn/pci/tioce_provider.c | |||
@@ -41,7 +41,7 @@ | |||
41 | * } else | 41 | * } else |
42 | * do desired mmr access | 42 | * do desired mmr access |
43 | * | 43 | * |
44 | * According to hw, we can use reads instead of writes to the above addres | 44 | * According to hw, we can use reads instead of writes to the above address |
45 | * | 45 | * |
46 | * Note this WAR can only to be used for accessing internal MMR's in the | 46 | * Note this WAR can only to be used for accessing internal MMR's in the |
47 | * TIOCE Coretalk Address Range 0x0 - 0x07ff_ffff. This includes the | 47 | * TIOCE Coretalk Address Range 0x0 - 0x07ff_ffff. This includes the |
diff --git a/arch/mips/au1000/Kconfig b/arch/mips/au1000/Kconfig index 05d1354aad3a..1fe97cccead1 100644 --- a/arch/mips/au1000/Kconfig +++ b/arch/mips/au1000/Kconfig | |||
@@ -7,7 +7,6 @@ config MIPS_MTX1 | |||
7 | bool "4G Systems MTX-1 board" | 7 | bool "4G Systems MTX-1 board" |
8 | select DMA_NONCOHERENT | 8 | select DMA_NONCOHERENT |
9 | select HW_HAS_PCI | 9 | select HW_HAS_PCI |
10 | select RESOURCES_64BIT if PCI | ||
11 | select SOC_AU1500 | 10 | select SOC_AU1500 |
12 | select SYS_SUPPORTS_LITTLE_ENDIAN | 11 | select SYS_SUPPORTS_LITTLE_ENDIAN |
13 | 12 | ||
@@ -22,7 +21,6 @@ config MIPS_DB1000 | |||
22 | select SOC_AU1000 | 21 | select SOC_AU1000 |
23 | select DMA_NONCOHERENT | 22 | select DMA_NONCOHERENT |
24 | select HW_HAS_PCI | 23 | select HW_HAS_PCI |
25 | select RESOURCES_64BIT if PCI | ||
26 | select SYS_SUPPORTS_LITTLE_ENDIAN | 24 | select SYS_SUPPORTS_LITTLE_ENDIAN |
27 | 25 | ||
28 | config MIPS_DB1100 | 26 | config MIPS_DB1100 |
@@ -44,7 +42,6 @@ config MIPS_DB1500 | |||
44 | select DMA_NONCOHERENT | 42 | select DMA_NONCOHERENT |
45 | select HW_HAS_PCI | 43 | select HW_HAS_PCI |
46 | select MIPS_DISABLE_OBSOLETE_IDE | 44 | select MIPS_DISABLE_OBSOLETE_IDE |
47 | select RESOURCES_64BIT if PCI | ||
48 | select SYS_SUPPORTS_BIG_ENDIAN | 45 | select SYS_SUPPORTS_BIG_ENDIAN |
49 | select SYS_SUPPORTS_LITTLE_ENDIAN | 46 | select SYS_SUPPORTS_LITTLE_ENDIAN |
50 | 47 | ||
@@ -54,7 +51,6 @@ config MIPS_DB1550 | |||
54 | select HW_HAS_PCI | 51 | select HW_HAS_PCI |
55 | select DMA_NONCOHERENT | 52 | select DMA_NONCOHERENT |
56 | select MIPS_DISABLE_OBSOLETE_IDE | 53 | select MIPS_DISABLE_OBSOLETE_IDE |
57 | select RESOURCES_64BIT if PCI | ||
58 | select SYS_SUPPORTS_LITTLE_ENDIAN | 54 | select SYS_SUPPORTS_LITTLE_ENDIAN |
59 | 55 | ||
60 | config MIPS_MIRAGE | 56 | config MIPS_MIRAGE |
@@ -68,7 +64,6 @@ config MIPS_PB1000 | |||
68 | select SOC_AU1000 | 64 | select SOC_AU1000 |
69 | select DMA_NONCOHERENT | 65 | select DMA_NONCOHERENT |
70 | select HW_HAS_PCI | 66 | select HW_HAS_PCI |
71 | select RESOURCES_64BIT if PCI | ||
72 | select SWAP_IO_SPACE | 67 | select SWAP_IO_SPACE |
73 | select SYS_SUPPORTS_LITTLE_ENDIAN | 68 | select SYS_SUPPORTS_LITTLE_ENDIAN |
74 | 69 | ||
@@ -77,7 +72,6 @@ config MIPS_PB1100 | |||
77 | select SOC_AU1100 | 72 | select SOC_AU1100 |
78 | select DMA_NONCOHERENT | 73 | select DMA_NONCOHERENT |
79 | select HW_HAS_PCI | 74 | select HW_HAS_PCI |
80 | select RESOURCES_64BIT if PCI | ||
81 | select SWAP_IO_SPACE | 75 | select SWAP_IO_SPACE |
82 | select SYS_SUPPORTS_LITTLE_ENDIAN | 76 | select SYS_SUPPORTS_LITTLE_ENDIAN |
83 | 77 | ||
@@ -86,7 +80,6 @@ config MIPS_PB1200 | |||
86 | select SOC_AU1200 | 80 | select SOC_AU1200 |
87 | select DMA_NONCOHERENT | 81 | select DMA_NONCOHERENT |
88 | select MIPS_DISABLE_OBSOLETE_IDE | 82 | select MIPS_DISABLE_OBSOLETE_IDE |
89 | select RESOURCES_64BIT if PCI | ||
90 | select SYS_SUPPORTS_LITTLE_ENDIAN | 83 | select SYS_SUPPORTS_LITTLE_ENDIAN |
91 | 84 | ||
92 | config MIPS_PB1500 | 85 | config MIPS_PB1500 |
@@ -94,7 +87,6 @@ config MIPS_PB1500 | |||
94 | select SOC_AU1500 | 87 | select SOC_AU1500 |
95 | select DMA_NONCOHERENT | 88 | select DMA_NONCOHERENT |
96 | select HW_HAS_PCI | 89 | select HW_HAS_PCI |
97 | select RESOURCES_64BIT if PCI | ||
98 | select SYS_SUPPORTS_LITTLE_ENDIAN | 90 | select SYS_SUPPORTS_LITTLE_ENDIAN |
99 | 91 | ||
100 | config MIPS_PB1550 | 92 | config MIPS_PB1550 |
@@ -103,7 +95,6 @@ config MIPS_PB1550 | |||
103 | select DMA_NONCOHERENT | 95 | select DMA_NONCOHERENT |
104 | select HW_HAS_PCI | 96 | select HW_HAS_PCI |
105 | select MIPS_DISABLE_OBSOLETE_IDE | 97 | select MIPS_DISABLE_OBSOLETE_IDE |
106 | select RESOURCES_64BIT if PCI | ||
107 | select SYS_SUPPORTS_LITTLE_ENDIAN | 98 | select SYS_SUPPORTS_LITTLE_ENDIAN |
108 | 99 | ||
109 | config MIPS_XXS1500 | 100 | config MIPS_XXS1500 |
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c index 9be99a68932a..6fa70a36a250 100644 --- a/arch/mips/au1000/common/pci.c +++ b/arch/mips/au1000/common/pci.c | |||
@@ -39,15 +39,15 @@ | |||
39 | 39 | ||
40 | /* TBD */ | 40 | /* TBD */ |
41 | static struct resource pci_io_resource = { | 41 | static struct resource pci_io_resource = { |
42 | .start = (resource_size_t)PCI_IO_START, | 42 | .start = PCI_IO_START, |
43 | .end = (resource_size_t)PCI_IO_END, | 43 | .end = PCI_IO_END, |
44 | .name = "PCI IO space", | 44 | .name = "PCI IO space", |
45 | .flags = IORESOURCE_IO | 45 | .flags = IORESOURCE_IO |
46 | }; | 46 | }; |
47 | 47 | ||
48 | static struct resource pci_mem_resource = { | 48 | static struct resource pci_mem_resource = { |
49 | .start = (resource_size_t)PCI_MEM_START, | 49 | .start = PCI_MEM_START, |
50 | .end = (resource_size_t)PCI_MEM_END, | 50 | .end = PCI_MEM_END, |
51 | .name = "PCI memory space", | 51 | .name = "PCI memory space", |
52 | .flags = IORESOURCE_MEM | 52 | .flags = IORESOURCE_MEM |
53 | }; | 53 | }; |
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c index a90d425d4651..d885e3848ec6 100644 --- a/arch/mips/au1000/common/setup.c +++ b/arch/mips/au1000/common/setup.c | |||
@@ -137,12 +137,11 @@ phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) | |||
137 | 137 | ||
138 | #ifdef CONFIG_PCI | 138 | #ifdef CONFIG_PCI |
139 | { | 139 | { |
140 | u32 start, end; | 140 | u32 start = (u32)Au1500_PCI_MEM_START; |
141 | u32 end = (u32)Au1500_PCI_MEM_END; | ||
141 | 142 | ||
142 | start = (u32)Au1500_PCI_MEM_START; | 143 | /* Check for PCI memory window */ |
143 | end = (u32)Au1500_PCI_MEM_END; | 144 | if (phys_addr >= start && (phys_addr + size - 1) <= end) |
144 | /* check for pci memory window */ | ||
145 | if ((phys_addr >= start) && ((phys_addr + size) < end)) | ||
146 | return (phys_t) | 145 | return (phys_t) |
147 | ((phys_addr - start) + Au1500_PCI_MEM_START); | 146 | ((phys_addr - start) + Au1500_PCI_MEM_START); |
148 | } | 147 | } |
diff --git a/arch/mips/cobalt/time.c b/arch/mips/cobalt/time.c index fa819fccd5db..4a570e7145fe 100644 --- a/arch/mips/cobalt/time.c +++ b/arch/mips/cobalt/time.c | |||
@@ -27,9 +27,28 @@ | |||
27 | 27 | ||
28 | void __init plat_time_init(void) | 28 | void __init plat_time_init(void) |
29 | { | 29 | { |
30 | u32 start, end; | ||
31 | int i = HZ / 10; | ||
32 | |||
30 | setup_pit_timer(); | 33 | setup_pit_timer(); |
31 | 34 | ||
32 | gt641xx_set_base_clock(GT641XX_BASE_CLOCK); | 35 | gt641xx_set_base_clock(GT641XX_BASE_CLOCK); |
33 | 36 | ||
34 | mips_timer_state = gt641xx_timer0_state; | 37 | /* |
38 | * MIPS counter frequency is measured during a 100msec interval | ||
39 | * using GT64111 timer0. | ||
40 | */ | ||
41 | while (!gt641xx_timer0_state()) | ||
42 | ; | ||
43 | |||
44 | start = read_c0_count(); | ||
45 | |||
46 | while (i--) | ||
47 | while (!gt641xx_timer0_state()) | ||
48 | ; | ||
49 | |||
50 | end = read_c0_count(); | ||
51 | |||
52 | mips_hpt_frequency = (end - start) * 10; | ||
53 | printk(KERN_INFO "MIPS counter frequency %dHz\n", mips_hpt_frequency); | ||
35 | } | 54 | } |
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig index 80b0c99c2cfb..3c70c9d16d01 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig | |||
@@ -76,9 +76,13 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
76 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 76 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
77 | CONFIG_GENERIC_HWEIGHT=y | 77 | CONFIG_GENERIC_HWEIGHT=y |
78 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 78 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
79 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
79 | CONFIG_GENERIC_TIME=y | 80 | CONFIG_GENERIC_TIME=y |
81 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
80 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 82 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
81 | # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set | 83 | # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set |
84 | CONFIG_CEVT_BCM1480=y | ||
85 | CONFIG_CSRC_BCM1480=y | ||
82 | CONFIG_DMA_COHERENT=y | 86 | CONFIG_DMA_COHERENT=y |
83 | CONFIG_CPU_BIG_ENDIAN=y | 87 | CONFIG_CPU_BIG_ENDIAN=y |
84 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 88 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
@@ -91,6 +95,11 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 | |||
91 | # | 95 | # |
92 | # CPU selection | 96 | # CPU selection |
93 | # | 97 | # |
98 | CONFIG_TICK_ONESHOT=y | ||
99 | CONFIG_NO_HZ=y | ||
100 | CONFIG_HIGH_RES_TIMERS=y | ||
101 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
102 | # CONFIG_CPU_LOONGSON2 is not set | ||
94 | # CONFIG_CPU_MIPS32_R1 is not set | 103 | # CONFIG_CPU_MIPS32_R1 is not set |
95 | # CONFIG_CPU_MIPS32_R2 is not set | 104 | # CONFIG_CPU_MIPS32_R2 is not set |
96 | # CONFIG_CPU_MIPS64_R1 is not set | 105 | # CONFIG_CPU_MIPS64_R1 is not set |
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index fbd2d802fdfd..4b7e43c9f69a 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig | |||
@@ -49,10 +49,13 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
49 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 49 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
50 | CONFIG_GENERIC_HWEIGHT=y | 50 | CONFIG_GENERIC_HWEIGHT=y |
51 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 51 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
52 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
52 | CONFIG_GENERIC_TIME=y | 53 | CONFIG_GENERIC_TIME=y |
54 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
53 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 55 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
54 | # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set | 56 | # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set |
55 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 57 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
58 | CONFIG_CEVT_R4K=y | ||
56 | CONFIG_DMA_NONCOHERENT=y | 59 | CONFIG_DMA_NONCOHERENT=y |
57 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | 60 | CONFIG_DMA_NEED_PCI_MAP_STATE=y |
58 | CONFIG_EARLY_PRINTK=y | 61 | CONFIG_EARLY_PRINTK=y |
@@ -76,6 +79,10 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 | |||
76 | # | 79 | # |
77 | # CPU selection | 80 | # CPU selection |
78 | # | 81 | # |
82 | CONFIG_TICK_ONESHOT=y | ||
83 | CONFIG_NO_HZ=y | ||
84 | CONFIG_HIGH_RES_TIMERS=y | ||
85 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
79 | # CONFIG_CPU_LOONGSON2 is not set | 86 | # CONFIG_CPU_LOONGSON2 is not set |
80 | # CONFIG_CPU_MIPS32_R1 is not set | 87 | # CONFIG_CPU_MIPS32_R1 is not set |
81 | CONFIG_CPU_MIPS32_R2=y | 88 | CONFIG_CPU_MIPS32_R2=y |
@@ -253,6 +260,7 @@ CONFIG_HW_HAS_PCI=y | |||
253 | CONFIG_PCI=y | 260 | CONFIG_PCI=y |
254 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 261 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
255 | CONFIG_MMU=y | 262 | CONFIG_MMU=y |
263 | CONFIG_I8253=y | ||
256 | 264 | ||
257 | # | 265 | # |
258 | # PCCARD (PCMCIA/CardBus) support | 266 | # PCCARD (PCMCIA/CardBus) support |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 11cb264f59ce..2c09a442e5e5 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) | |||
77 | unsigned long status; | 77 | unsigned long status; |
78 | 78 | ||
79 | /* New thread loses kernel privileges. */ | 79 | /* New thread loses kernel privileges. */ |
80 | status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK); | 80 | status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK); |
81 | #ifdef CONFIG_64BIT | 81 | #ifdef CONFIG_64BIT |
82 | status &= ~ST0_FR; | ||
83 | status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR; | 82 | status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR; |
84 | #endif | 83 | #endif |
85 | status |= KU_USER; | 84 | status |= KU_USER; |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 52075426c373..1ecfbb7eba6c 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -109,10 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, | |||
109 | cd->mult = (u32) temp; | 109 | cd->mult = (u32) temp; |
110 | } | 110 | } |
111 | 111 | ||
112 | void __init __weak plat_time_init(void) | ||
113 | { | ||
114 | } | ||
115 | |||
116 | /* | 112 | /* |
117 | * This function exists in order to cause an error due to a duplicate | 113 | * This function exists in order to cause an error due to a duplicate |
118 | * definition if platform code should have its own implementation. The hook | 114 | * definition if platform code should have its own implementation. The hook |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 23e73d0650a3..fcae66752972 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1317,12 +1317,12 @@ void __init per_cpu_trap_init(void) | |||
1317 | #endif | 1317 | #endif |
1318 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) | 1318 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) |
1319 | status_set |= ST0_XX; | 1319 | status_set |= ST0_XX; |
1320 | if (cpu_has_dsp) | ||
1321 | status_set |= ST0_MX; | ||
1322 | |||
1320 | change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, | 1323 | change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, |
1321 | status_set); | 1324 | status_set); |
1322 | 1325 | ||
1323 | if (cpu_has_dsp) | ||
1324 | set_c0_status(ST0_MX); | ||
1325 | |||
1326 | #ifdef CONFIG_CPU_MIPSR2 | 1326 | #ifdef CONFIG_CPU_MIPSR2 |
1327 | if (cpu_has_mips_r2) { | 1327 | if (cpu_has_mips_r2) { |
1328 | unsigned int enable = 0x0000000f; | 1328 | unsigned int enable = 0x0000000f; |
diff --git a/arch/mips/mips-boards/generic/display.c b/arch/mips/mips-boards/generic/display.c index 5d600054090a..2a0057cfc30d 100644 --- a/arch/mips/mips-boards/generic/display.c +++ b/arch/mips/mips-boards/generic/display.c | |||
@@ -37,9 +37,9 @@ void mips_display_message(const char *str) | |||
37 | 37 | ||
38 | for (i = 0; i <= 14; i=i+2) { | 38 | for (i = 0; i <= 14; i=i+2) { |
39 | if (*str) | 39 | if (*str) |
40 | writel(*str++, display + i); | 40 | __raw_writel(*str++, display + i); |
41 | else | 41 | else |
42 | writel(' ', display + i); | 42 | __raw_writel(' ', display + i); |
43 | } | 43 | } |
44 | } | 44 | } |
45 | 45 | ||
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index dc272c188233..2c5c27c8e86d 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c | |||
@@ -169,6 +169,7 @@ void __init prom_meminit(void) | |||
169 | 169 | ||
170 | void __init prom_free_prom_memory(void) | 170 | void __init prom_free_prom_memory(void) |
171 | { | 171 | { |
172 | #if 0 /* for now ... */ | ||
172 | unsigned long addr; | 173 | unsigned long addr; |
173 | int i; | 174 | int i; |
174 | 175 | ||
@@ -180,4 +181,5 @@ void __init prom_free_prom_memory(void) | |||
180 | free_init_pages("prom memory", | 181 | free_init_pages("prom memory", |
181 | addr, addr + boot_mem_map.map[i].size); | 182 | addr, addr + boot_mem_map.map[i].size); |
182 | } | 183 | } |
184 | #endif | ||
183 | } | 185 | } |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 589b745d822a..6e6981fd7934 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -242,6 +242,8 @@ static void pcibios_fixup_device_resources(struct pci_dev *dev, | |||
242 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { | 242 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { |
243 | if (!dev->resource[i].start) | 243 | if (!dev->resource[i].start) |
244 | continue; | 244 | continue; |
245 | if (dev->resource[i].flags & IORESOURCE_PCI_FIXED) | ||
246 | continue; | ||
245 | if (dev->resource[i].flags & IORESOURCE_IO) | 247 | if (dev->resource[i].flags & IORESOURCE_IO) |
246 | offset = hose->io_offset; | 248 | offset = hose->io_offset; |
247 | else if (dev->resource[i].flags & IORESOURCE_MEM) | 249 | else if (dev->resource[i].flags & IORESOURCE_MEM) |
diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c index 11f984767880..7df36dbe65c7 100644 --- a/arch/mips/qemu/q-irq.c +++ b/arch/mips/qemu/q-irq.c | |||
@@ -33,5 +33,5 @@ void __init arch_init_irq(void) | |||
33 | 33 | ||
34 | mips_cpu_irq_init(); | 34 | mips_cpu_irq_init(); |
35 | init_i8259_irqs(); | 35 | init_i8259_irqs(); |
36 | set_c0_status(0x8400); | 36 | set_c0_status(0x400); |
37 | } | 37 | } |
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig index a31b7a030a6b..5eae305215dc 100644 --- a/arch/powerpc/configs/mpc8272_ads_defconfig +++ b/arch/powerpc/configs/mpc8272_ads_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.24-rc4 | 3 | # Linux kernel version: 2.6.24-rc5 |
4 | # Thu Dec 6 16:48:30 2007 | 4 | # Thu Dec 13 22:40:57 2007 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -491,7 +491,7 @@ CONFIG_MII=y | |||
491 | CONFIG_FS_ENET=y | 491 | CONFIG_FS_ENET=y |
492 | # CONFIG_FS_ENET_HAS_SCC is not set | 492 | # CONFIG_FS_ENET_HAS_SCC is not set |
493 | CONFIG_FS_ENET_HAS_FCC=y | 493 | CONFIG_FS_ENET_HAS_FCC=y |
494 | # CONFIG_FS_ENET_MDIO_FCC is not set | 494 | CONFIG_FS_ENET_MDIO_FCC=y |
495 | CONFIG_NETDEV_1000=y | 495 | CONFIG_NETDEV_1000=y |
496 | # CONFIG_ACENIC is not set | 496 | # CONFIG_ACENIC is not set |
497 | # CONFIG_DL2K is not set | 497 | # CONFIG_DL2K is not set |
diff --git a/arch/powerpc/configs/pq2fads_defconfig b/arch/powerpc/configs/pq2fads_defconfig index 142d206d6870..a3bfbb65a933 100644 --- a/arch/powerpc/configs/pq2fads_defconfig +++ b/arch/powerpc/configs/pq2fads_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.24-rc4 | 3 | # Linux kernel version: 2.6.24-rc5 |
4 | # Thu Dec 6 16:49:09 2007 | 4 | # Thu Dec 13 22:39:18 2007 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -548,7 +548,7 @@ CONFIG_MII=y | |||
548 | CONFIG_FS_ENET=y | 548 | CONFIG_FS_ENET=y |
549 | # CONFIG_FS_ENET_HAS_SCC is not set | 549 | # CONFIG_FS_ENET_HAS_SCC is not set |
550 | CONFIG_FS_ENET_HAS_FCC=y | 550 | CONFIG_FS_ENET_HAS_FCC=y |
551 | # CONFIG_FS_ENET_MDIO_FCC is not set | 551 | CONFIG_FS_ENET_MDIO_FCC=y |
552 | CONFIG_NETDEV_1000=y | 552 | CONFIG_NETDEV_1000=y |
553 | # CONFIG_ACENIC is not set | 553 | # CONFIG_ACENIC is not set |
554 | # CONFIG_DL2K is not set | 554 | # CONFIG_DL2K is not set |
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index 5bd547ecd60a..0b5469fb6e0f 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
@@ -157,7 +157,7 @@ CONFIG_PS3_HTAB_SIZE=20 | |||
157 | CONFIG_PS3_USE_LPAR_ADDR=y | 157 | CONFIG_PS3_USE_LPAR_ADDR=y |
158 | CONFIG_PS3_VUART=y | 158 | CONFIG_PS3_VUART=y |
159 | CONFIG_PS3_PS3AV=y | 159 | CONFIG_PS3_PS3AV=y |
160 | CONFIG_PS3_SYS_MANAGER=m | 160 | CONFIG_PS3_SYS_MANAGER=y |
161 | CONFIG_PS3_STORAGE=y | 161 | CONFIG_PS3_STORAGE=y |
162 | CONFIG_PS3_DISK=y | 162 | CONFIG_PS3_DISK=y |
163 | CONFIG_PS3_ROM=y | 163 | CONFIG_PS3_ROM=y |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index c6b1aa3efbb9..13ebeb2d71e6 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -45,10 +45,6 @@ | |||
45 | #include <asm/signal.h> | 45 | #include <asm/signal.h> |
46 | #include <asm/dcr.h> | 46 | #include <asm/dcr.h> |
47 | 47 | ||
48 | #ifdef CONFIG_8xx | ||
49 | #include <asm/commproc.h> | ||
50 | #endif | ||
51 | |||
52 | #ifdef CONFIG_PPC64 | 48 | #ifdef CONFIG_PPC64 |
53 | EXPORT_SYMBOL(local_irq_restore); | 49 | EXPORT_SYMBOL(local_irq_restore); |
54 | #endif | 50 | #endif |
@@ -172,14 +168,6 @@ EXPORT_SYMBOL(console_drivers); | |||
172 | EXPORT_SYMBOL(cacheable_memcpy); | 168 | EXPORT_SYMBOL(cacheable_memcpy); |
173 | #endif | 169 | #endif |
174 | 170 | ||
175 | #ifdef CONFIG_8xx | ||
176 | EXPORT_SYMBOL(cpm_install_handler); | ||
177 | EXPORT_SYMBOL(cpm_free_handler); | ||
178 | #endif /* CONFIG_8xx */ | ||
179 | #if defined(CONFIG_8xx) | ||
180 | EXPORT_SYMBOL(__res); | ||
181 | #endif | ||
182 | |||
183 | #ifdef CONFIG_PPC32 | 171 | #ifdef CONFIG_PPC32 |
184 | EXPORT_SYMBOL(next_mmu_context); | 172 | EXPORT_SYMBOL(next_mmu_context); |
185 | EXPORT_SYMBOL(set_context); | 173 | EXPORT_SYMBOL(set_context); |
diff --git a/arch/powerpc/math-emu/op-2.h b/arch/powerpc/math-emu/op-2.h index b9b06b4c6ea1..7d6f17cc2929 100644 --- a/arch/powerpc/math-emu/op-2.h +++ b/arch/powerpc/math-emu/op-2.h | |||
@@ -59,7 +59,8 @@ | |||
59 | else \ | 59 | else \ |
60 | { \ | 60 | { \ |
61 | X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE) | \ | 61 | X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE) | \ |
62 | (((X##_f1 << (sz - (N))) | X##_f0) != 0)); \ | 62 | (((X##_f1 << (2 * _FP_W_TYPE_SIZE - (N))) | \ |
63 | X##_f0) != 0)); \ | ||
63 | X##_f1 = 0; \ | 64 | X##_f1 = 0; \ |
64 | } \ | 65 | } \ |
65 | } while (0) | 66 | } while (0) |
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 02c142227b51..e5b40e3e0082 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c | |||
@@ -121,6 +121,7 @@ void process_hvlpevents(void) | |||
121 | { | 121 | { |
122 | struct HvLpEvent * event; | 122 | struct HvLpEvent * event; |
123 | 123 | ||
124 | restart: | ||
124 | /* If we have recursed, just return */ | 125 | /* If we have recursed, just return */ |
125 | if (!spin_trylock(&hvlpevent_queue.hq_lock)) | 126 | if (!spin_trylock(&hvlpevent_queue.hq_lock)) |
126 | return; | 127 | return; |
@@ -146,8 +147,20 @@ void process_hvlpevents(void) | |||
146 | if (event->xType < HvLpEvent_Type_NumTypes && | 147 | if (event->xType < HvLpEvent_Type_NumTypes && |
147 | lpEventHandler[event->xType]) | 148 | lpEventHandler[event->xType]) |
148 | lpEventHandler[event->xType](event); | 149 | lpEventHandler[event->xType](event); |
149 | else | 150 | else { |
150 | printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType ); | 151 | u8 type = event->xType; |
152 | |||
153 | /* | ||
154 | * Don't printk in the spinlock as printk | ||
155 | * may require ack events form the HV to send | ||
156 | * any characters there. | ||
157 | */ | ||
158 | hvlpevent_clear_valid(event); | ||
159 | spin_unlock(&hvlpevent_queue.hq_lock); | ||
160 | printk(KERN_INFO | ||
161 | "Unexpected Lp Event type=%d\n", type); | ||
162 | goto restart; | ||
163 | } | ||
151 | 164 | ||
152 | hvlpevent_clear_valid(event); | 165 | hvlpevent_clear_valid(event); |
153 | } else if (hvlpevent_queue.hq_overflow_pending) | 166 | } else if (hvlpevent_queue.hq_overflow_pending) |
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig index 67144d1d1405..298f1c9679fb 100644 --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig | |||
@@ -91,7 +91,7 @@ config PS3_SYS_MANAGER | |||
91 | depends on PPC_PS3 | 91 | depends on PPC_PS3 |
92 | tristate "PS3 System Manager driver" if PS3_ADVANCED | 92 | tristate "PS3 System Manager driver" if PS3_ADVANCED |
93 | select PS3_VUART | 93 | select PS3_VUART |
94 | default m | 94 | default y |
95 | help | 95 | help |
96 | Include support for the PS3 System Manager. | 96 | Include support for the PS3 System Manager. |
97 | 97 | ||
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c index 0a7054579d98..f7188e2ba669 100644 --- a/arch/powerpc/sysdev/cpm2_common.c +++ b/arch/powerpc/sysdev/cpm2_common.c | |||
@@ -61,8 +61,7 @@ cpm2_map_t __iomem *cpm2_immr; | |||
61 | of space for CPM as it is larger | 61 | of space for CPM as it is larger |
62 | than on PQ2 */ | 62 | than on PQ2 */ |
63 | 63 | ||
64 | void | 64 | void __init cpm2_reset(void) |
65 | cpm2_reset(void) | ||
66 | { | 65 | { |
67 | #ifdef CONFIG_PPC_85xx | 66 | #ifdef CONFIG_PPC_85xx |
68 | cpm2_immr = ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE); | 67 | cpm2_immr = ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE); |
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index c9b0d7af64ae..ea257e828364 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -2593,3 +2593,15 @@ sun4v_mmustat_info: | |||
2593 | retl | 2593 | retl |
2594 | nop | 2594 | nop |
2595 | .size sun4v_mmustat_info, .-sun4v_mmustat_info | 2595 | .size sun4v_mmustat_info, .-sun4v_mmustat_info |
2596 | |||
2597 | .globl sun4v_mmu_demap_all | ||
2598 | .type sun4v_mmu_demap_all,#function | ||
2599 | sun4v_mmu_demap_all: | ||
2600 | clr %o0 | ||
2601 | clr %o1 | ||
2602 | mov HV_MMU_ALL, %o2 | ||
2603 | mov HV_FAST_MMU_DEMAP_ALL, %o5 | ||
2604 | ta HV_FAST_TRAP | ||
2605 | retl | ||
2606 | nop | ||
2607 | .size sun4v_mmu_demap_all, .-sun4v_mmu_demap_all | ||
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 894b506f9636..c39944927f1a 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -476,7 +476,7 @@ static inline void spitfire_xcall_deliver(u64 data0, u64 data1, u64 data2, cpuma | |||
476 | */ | 476 | */ |
477 | static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask) | 477 | static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask) |
478 | { | 478 | { |
479 | u64 pstate, ver; | 479 | u64 pstate, ver, busy_mask; |
480 | int nack_busy_id, is_jbus, need_more; | 480 | int nack_busy_id, is_jbus, need_more; |
481 | 481 | ||
482 | if (cpus_empty(mask)) | 482 | if (cpus_empty(mask)) |
@@ -508,14 +508,20 @@ retry: | |||
508 | "i" (ASI_INTR_W)); | 508 | "i" (ASI_INTR_W)); |
509 | 509 | ||
510 | nack_busy_id = 0; | 510 | nack_busy_id = 0; |
511 | busy_mask = 0; | ||
511 | { | 512 | { |
512 | int i; | 513 | int i; |
513 | 514 | ||
514 | for_each_cpu_mask(i, mask) { | 515 | for_each_cpu_mask(i, mask) { |
515 | u64 target = (i << 14) | 0x70; | 516 | u64 target = (i << 14) | 0x70; |
516 | 517 | ||
517 | if (!is_jbus) | 518 | if (is_jbus) { |
519 | busy_mask |= (0x1UL << (i * 2)); | ||
520 | } else { | ||
518 | target |= (nack_busy_id << 24); | 521 | target |= (nack_busy_id << 24); |
522 | busy_mask |= (0x1UL << | ||
523 | (nack_busy_id * 2)); | ||
524 | } | ||
519 | __asm__ __volatile__( | 525 | __asm__ __volatile__( |
520 | "stxa %%g0, [%0] %1\n\t" | 526 | "stxa %%g0, [%0] %1\n\t" |
521 | "membar #Sync\n\t" | 527 | "membar #Sync\n\t" |
@@ -531,15 +537,16 @@ retry: | |||
531 | 537 | ||
532 | /* Now, poll for completion. */ | 538 | /* Now, poll for completion. */ |
533 | { | 539 | { |
534 | u64 dispatch_stat; | 540 | u64 dispatch_stat, nack_mask; |
535 | long stuck; | 541 | long stuck; |
536 | 542 | ||
537 | stuck = 100000 * nack_busy_id; | 543 | stuck = 100000 * nack_busy_id; |
544 | nack_mask = busy_mask << 1; | ||
538 | do { | 545 | do { |
539 | __asm__ __volatile__("ldxa [%%g0] %1, %0" | 546 | __asm__ __volatile__("ldxa [%%g0] %1, %0" |
540 | : "=r" (dispatch_stat) | 547 | : "=r" (dispatch_stat) |
541 | : "i" (ASI_INTR_DISPATCH_STAT)); | 548 | : "i" (ASI_INTR_DISPATCH_STAT)); |
542 | if (dispatch_stat == 0UL) { | 549 | if (!(dispatch_stat & (busy_mask | nack_mask))) { |
543 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" | 550 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" |
544 | : : "r" (pstate)); | 551 | : : "r" (pstate)); |
545 | if (unlikely(need_more)) { | 552 | if (unlikely(need_more)) { |
@@ -556,12 +563,12 @@ retry: | |||
556 | } | 563 | } |
557 | if (!--stuck) | 564 | if (!--stuck) |
558 | break; | 565 | break; |
559 | } while (dispatch_stat & 0x5555555555555555UL); | 566 | } while (dispatch_stat & busy_mask); |
560 | 567 | ||
561 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" | 568 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" |
562 | : : "r" (pstate)); | 569 | : : "r" (pstate)); |
563 | 570 | ||
564 | if ((dispatch_stat & ~(0x5555555555555555UL)) == 0) { | 571 | if (dispatch_stat & busy_mask) { |
565 | /* Busy bits will not clear, continue instead | 572 | /* Busy bits will not clear, continue instead |
566 | * of freezing up on this cpu. | 573 | * of freezing up on this cpu. |
567 | */ | 574 | */ |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index e18ccf85224f..fbeb55d71e76 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -1133,14 +1133,9 @@ static void __init mark_kpte_bitmap(unsigned long start, unsigned long end) | |||
1133 | } | 1133 | } |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | static void __init kernel_physical_mapping_init(void) | 1136 | static void __init init_kpte_bitmap(void) |
1137 | { | 1137 | { |
1138 | unsigned long i; | 1138 | unsigned long i; |
1139 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
1140 | unsigned long mem_alloced = 0UL; | ||
1141 | #endif | ||
1142 | |||
1143 | read_obp_memory("reg", &pall[0], &pall_ents); | ||
1144 | 1139 | ||
1145 | for (i = 0; i < pall_ents; i++) { | 1140 | for (i = 0; i < pall_ents; i++) { |
1146 | unsigned long phys_start, phys_end; | 1141 | unsigned long phys_start, phys_end; |
@@ -1149,14 +1144,24 @@ static void __init kernel_physical_mapping_init(void) | |||
1149 | phys_end = phys_start + pall[i].reg_size; | 1144 | phys_end = phys_start + pall[i].reg_size; |
1150 | 1145 | ||
1151 | mark_kpte_bitmap(phys_start, phys_end); | 1146 | mark_kpte_bitmap(phys_start, phys_end); |
1147 | } | ||
1148 | } | ||
1152 | 1149 | ||
1150 | static void __init kernel_physical_mapping_init(void) | ||
1151 | { | ||
1153 | #ifdef CONFIG_DEBUG_PAGEALLOC | 1152 | #ifdef CONFIG_DEBUG_PAGEALLOC |
1153 | unsigned long i, mem_alloced = 0UL; | ||
1154 | |||
1155 | for (i = 0; i < pall_ents; i++) { | ||
1156 | unsigned long phys_start, phys_end; | ||
1157 | |||
1158 | phys_start = pall[i].phys_addr; | ||
1159 | phys_end = phys_start + pall[i].reg_size; | ||
1160 | |||
1154 | mem_alloced += kernel_map_range(phys_start, phys_end, | 1161 | mem_alloced += kernel_map_range(phys_start, phys_end, |
1155 | PAGE_KERNEL); | 1162 | PAGE_KERNEL); |
1156 | #endif | ||
1157 | } | 1163 | } |
1158 | 1164 | ||
1159 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
1160 | printk("Allocated %ld bytes for kernel page tables.\n", | 1165 | printk("Allocated %ld bytes for kernel page tables.\n", |
1161 | mem_alloced); | 1166 | mem_alloced); |
1162 | 1167 | ||
@@ -1398,6 +1403,10 @@ void __init paging_init(void) | |||
1398 | 1403 | ||
1399 | inherit_prom_mappings(); | 1404 | inherit_prom_mappings(); |
1400 | 1405 | ||
1406 | read_obp_memory("reg", &pall[0], &pall_ents); | ||
1407 | |||
1408 | init_kpte_bitmap(); | ||
1409 | |||
1401 | /* Ok, we can use our TLB miss and window trap handlers safely. */ | 1410 | /* Ok, we can use our TLB miss and window trap handlers safely. */ |
1402 | setup_tba(); | 1411 | setup_tba(); |
1403 | 1412 | ||
@@ -1904,7 +1913,9 @@ void __flush_tlb_all(void) | |||
1904 | "wrpr %0, %1, %%pstate" | 1913 | "wrpr %0, %1, %%pstate" |
1905 | : "=r" (pstate) | 1914 | : "=r" (pstate) |
1906 | : "i" (PSTATE_IE)); | 1915 | : "i" (PSTATE_IE)); |
1907 | if (tlb_type == spitfire) { | 1916 | if (tlb_type == hypervisor) { |
1917 | sun4v_mmu_demap_all(); | ||
1918 | } else if (tlb_type == spitfire) { | ||
1908 | for (i = 0; i < 64; i++) { | 1919 | for (i = 0; i < 64; i++) { |
1909 | /* Spitfire Errata #32 workaround */ | 1920 | /* Spitfire Errata #32 workaround */ |
1910 | /* NOTE: Always runs on spitfire, so no | 1921 | /* NOTE: Always runs on spitfire, so no |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 73681f14f9fc..3c6c44ca1ffa 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -98,10 +98,10 @@ static int uml_net_rx(struct net_device *dev) | |||
98 | if (pkt_len > 0) { | 98 | if (pkt_len > 0) { |
99 | skb_trim(skb, pkt_len); | 99 | skb_trim(skb, pkt_len); |
100 | skb->protocol = (*lp->protocol)(skb); | 100 | skb->protocol = (*lp->protocol)(skb); |
101 | netif_rx(skb); | ||
102 | 101 | ||
103 | lp->stats.rx_bytes += skb->len; | 102 | lp->stats.rx_bytes += skb->len; |
104 | lp->stats.rx_packets++; | 103 | lp->stats.rx_packets++; |
104 | netif_rx(skb); | ||
105 | return pkt_len; | 105 | return pkt_len; |
106 | } | 106 | } |
107 | 107 | ||
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 90d7f2e8ead8..29185cad9fff 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c | |||
@@ -201,7 +201,7 @@ static int change_tramp(char **argv, char *output, int output_len) | |||
201 | close(fds[1]); | 201 | close(fds[1]); |
202 | 202 | ||
203 | if (pid > 0) | 203 | if (pid > 0) |
204 | CATCH_EINTR(err = waitpid(pid, NULL, 0)); | 204 | helper_wait(pid, 0, "change_tramp"); |
205 | return pid; | 205 | return pid; |
206 | } | 206 | } |
207 | 207 | ||
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c index 5f06204d6871..b8711e50da80 100644 --- a/arch/um/drivers/slip_user.c +++ b/arch/um/drivers/slip_user.c | |||
@@ -77,7 +77,7 @@ static int slip_tramp(char **argv, int fd) | |||
77 | { | 77 | { |
78 | struct slip_pre_exec_data pe_data; | 78 | struct slip_pre_exec_data pe_data; |
79 | char *output; | 79 | char *output; |
80 | int status, pid, fds[2], err, output_len; | 80 | int pid, fds[2], err, output_len; |
81 | 81 | ||
82 | err = os_pipe(fds, 1, 0); | 82 | err = os_pipe(fds, 1, 0); |
83 | if (err < 0) { | 83 | if (err < 0) { |
@@ -109,15 +109,7 @@ static int slip_tramp(char **argv, int fd) | |||
109 | read_output(fds[0], output, output_len); | 109 | read_output(fds[0], output, output_len); |
110 | printk("%s", output); | 110 | printk("%s", output); |
111 | 111 | ||
112 | CATCH_EINTR(err = waitpid(pid, &status, 0)); | 112 | err = helper_wait(pid, 0, argv[0]); |
113 | if (err < 0) | ||
114 | err = errno; | ||
115 | else if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) { | ||
116 | printk(UM_KERN_ERR "'%s' didn't exit with status 0\n", argv[0]); | ||
117 | err = -EINVAL; | ||
118 | } | ||
119 | else err = 0; | ||
120 | |||
121 | close(fds[0]); | 113 | close(fds[0]); |
122 | 114 | ||
123 | out_free: | 115 | out_free: |
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c index 1865089ff41a..89c1be225fda 100644 --- a/arch/um/drivers/slirp_user.c +++ b/arch/um/drivers/slirp_user.c | |||
@@ -79,7 +79,7 @@ out: | |||
79 | static void slirp_close(int fd, void *data) | 79 | static void slirp_close(int fd, void *data) |
80 | { | 80 | { |
81 | struct slirp_data *pri = data; | 81 | struct slirp_data *pri = data; |
82 | int status,err; | 82 | int err; |
83 | 83 | ||
84 | close(fd); | 84 | close(fd); |
85 | close(pri->slave); | 85 | close(pri->slave); |
@@ -98,18 +98,9 @@ static void slirp_close(int fd, void *data) | |||
98 | "(%d)\n", pri->pid, errno); | 98 | "(%d)\n", pri->pid, errno); |
99 | } | 99 | } |
100 | #endif | 100 | #endif |
101 | 101 | err = helper_wait(pri->pid, 1, "slirp_close"); | |
102 | CATCH_EINTR(err = waitpid(pri->pid, &status, WNOHANG)); | 102 | if (err < 0) |
103 | if (err < 0) { | ||
104 | printk(UM_KERN_ERR "slirp_close: waitpid returned %d\n", errno); | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | if (err == 0) { | ||
109 | printk(UM_KERN_ERR "slirp_close: process %d has not exited\n", | ||
110 | pri->pid); | ||
111 | return; | 103 | return; |
112 | } | ||
113 | 104 | ||
114 | pri->pid = -1; | 105 | pri->pid = -1; |
115 | } | 106 | } |
diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c index 41d254bd38df..48fc7452bc1d 100644 --- a/arch/um/drivers/ubd_user.c +++ b/arch/um/drivers/ubd_user.c | |||
@@ -49,8 +49,7 @@ int start_io_thread(unsigned long sp, int *fd_out) | |||
49 | goto out_close; | 49 | goto out_close; |
50 | } | 50 | } |
51 | 51 | ||
52 | pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD, | 52 | pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM, NULL); |
53 | NULL); | ||
54 | if(pid < 0){ | 53 | if(pid < 0){ |
55 | err = -errno; | 54 | err = -errno; |
56 | printk("start_io_thread - clone failed : errno = %d\n", errno); | 55 | printk("start_io_thread - clone failed : errno = %d\n", errno); |
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index fbf0a87c6eaa..6f0d1c741bca 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -214,7 +214,7 @@ extern int execvp_noalloc(char *buf, const char *file, char *const argv[]); | |||
214 | extern int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv); | 214 | extern int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv); |
215 | extern int run_helper_thread(int (*proc)(void *), void *arg, | 215 | extern int run_helper_thread(int (*proc)(void *), void *arg, |
216 | unsigned int flags, unsigned long *stack_out); | 216 | unsigned int flags, unsigned long *stack_out); |
217 | extern int helper_wait(int pid); | 217 | extern int helper_wait(int pid, int nohang, char *pname); |
218 | 218 | ||
219 | 219 | ||
220 | /* tls.c */ | 220 | /* tls.c */ |
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c index 4158118c4a56..93dc0c80ebaf 100644 --- a/arch/um/os-Linux/aio.c +++ b/arch/um/os-Linux/aio.c | |||
@@ -218,7 +218,7 @@ static int init_aio_24(void) | |||
218 | goto out_close_pipe; | 218 | goto out_close_pipe; |
219 | 219 | ||
220 | err = run_helper_thread(not_aio_thread, NULL, | 220 | err = run_helper_thread(not_aio_thread, NULL, |
221 | CLONE_FILES | CLONE_VM | SIGCHLD, &aio_stack); | 221 | CLONE_FILES | CLONE_VM, &aio_stack); |
222 | if (err < 0) | 222 | if (err < 0) |
223 | goto out_close_pipe; | 223 | goto out_close_pipe; |
224 | 224 | ||
@@ -254,7 +254,7 @@ static int init_aio_26(void) | |||
254 | } | 254 | } |
255 | 255 | ||
256 | err = run_helper_thread(aio_thread, NULL, | 256 | err = run_helper_thread(aio_thread, NULL, |
257 | CLONE_FILES | CLONE_VM | SIGCHLD, &aio_stack); | 257 | CLONE_FILES | CLONE_VM, &aio_stack); |
258 | if (err < 0) | 258 | if (err < 0) |
259 | return err; | 259 | return err; |
260 | 260 | ||
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c index 4ff553603449..07ca0cb472ac 100644 --- a/arch/um/os-Linux/drivers/ethertap_user.c +++ b/arch/um/os-Linux/drivers/ethertap_user.c | |||
@@ -94,7 +94,7 @@ static int etap_tramp(char *dev, char *gate, int control_me, | |||
94 | int control_remote, int data_me, int data_remote) | 94 | int control_remote, int data_me, int data_remote) |
95 | { | 95 | { |
96 | struct etap_pre_exec_data pe_data; | 96 | struct etap_pre_exec_data pe_data; |
97 | int pid, status, err, n; | 97 | int pid, err, n; |
98 | char version_buf[sizeof("nnnnn\0")]; | 98 | char version_buf[sizeof("nnnnn\0")]; |
99 | char data_fd_buf[sizeof("nnnnnn\0")]; | 99 | char data_fd_buf[sizeof("nnnnnn\0")]; |
100 | char gate_buf[sizeof("nnn.nnn.nnn.nnn\0")]; | 100 | char gate_buf[sizeof("nnn.nnn.nnn.nnn\0")]; |
@@ -131,13 +131,7 @@ static int etap_tramp(char *dev, char *gate, int control_me, | |||
131 | } | 131 | } |
132 | if (c != 1) { | 132 | if (c != 1) { |
133 | printk(UM_KERN_ERR "etap_tramp : uml_net failed\n"); | 133 | printk(UM_KERN_ERR "etap_tramp : uml_net failed\n"); |
134 | err = -EINVAL; | 134 | err = helper_wait(pid, 0, "uml_net"); |
135 | CATCH_EINTR(n = waitpid(pid, &status, 0)); | ||
136 | if (n < 0) | ||
137 | err = -errno; | ||
138 | else if (!WIFEXITED(status) || (WEXITSTATUS(status) != 1)) | ||
139 | printk(UM_KERN_ERR "uml_net didn't exit with " | ||
140 | "status 1\n"); | ||
141 | } | 135 | } |
142 | return err; | 136 | return err; |
143 | } | 137 | } |
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c index 6c55d3c8ead8..1037a3b6386e 100644 --- a/arch/um/os-Linux/drivers/tuntap_user.c +++ b/arch/um/os-Linux/drivers/tuntap_user.c | |||
@@ -107,7 +107,7 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote, | |||
107 | "errno = %d\n", errno); | 107 | "errno = %d\n", errno); |
108 | return err; | 108 | return err; |
109 | } | 109 | } |
110 | CATCH_EINTR(waitpid(pid, NULL, 0)); | 110 | helper_wait(pid, 0, "tuntap_open_tramp"); |
111 | 111 | ||
112 | cmsg = CMSG_FIRSTHDR(&msg); | 112 | cmsg = CMSG_FIRSTHDR(&msg); |
113 | if (cmsg == NULL) { | 113 | if (cmsg == NULL) { |
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index 7a72dbb61b0d..fba3f0fefeef 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c | |||
@@ -76,7 +76,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) | |||
76 | data.fd = fds[1]; | 76 | data.fd = fds[1]; |
77 | data.buf = __cant_sleep() ? kmalloc(PATH_MAX, UM_GFP_ATOMIC) : | 77 | data.buf = __cant_sleep() ? kmalloc(PATH_MAX, UM_GFP_ATOMIC) : |
78 | kmalloc(PATH_MAX, UM_GFP_KERNEL); | 78 | kmalloc(PATH_MAX, UM_GFP_KERNEL); |
79 | pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data); | 79 | pid = clone(helper_child, (void *) sp, CLONE_VM, &data); |
80 | if (pid < 0) { | 80 | if (pid < 0) { |
81 | ret = -errno; | 81 | ret = -errno; |
82 | printk("run_helper : clone failed, errno = %d\n", errno); | 82 | printk("run_helper : clone failed, errno = %d\n", errno); |
@@ -101,7 +101,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) | |||
101 | ret = n; | 101 | ret = n; |
102 | kill(pid, SIGKILL); | 102 | kill(pid, SIGKILL); |
103 | } | 103 | } |
104 | CATCH_EINTR(waitpid(pid, NULL, 0)); | 104 | CATCH_EINTR(waitpid(pid, NULL, __WCLONE)); |
105 | } | 105 | } |
106 | 106 | ||
107 | out_free2: | 107 | out_free2: |
@@ -126,7 +126,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, | |||
126 | return -ENOMEM; | 126 | return -ENOMEM; |
127 | 127 | ||
128 | sp = stack + UM_KERN_PAGE_SIZE - sizeof(void *); | 128 | sp = stack + UM_KERN_PAGE_SIZE - sizeof(void *); |
129 | pid = clone(proc, (void *) sp, flags | SIGCHLD, arg); | 129 | pid = clone(proc, (void *) sp, flags, arg); |
130 | if (pid < 0) { | 130 | if (pid < 0) { |
131 | err = -errno; | 131 | err = -errno; |
132 | printk("run_helper_thread : clone failed, errno = %d\n", | 132 | printk("run_helper_thread : clone failed, errno = %d\n", |
@@ -134,7 +134,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, | |||
134 | return err; | 134 | return err; |
135 | } | 135 | } |
136 | if (stack_out == NULL) { | 136 | if (stack_out == NULL) { |
137 | CATCH_EINTR(pid = waitpid(pid, &status, 0)); | 137 | CATCH_EINTR(pid = waitpid(pid, &status, __WCLONE)); |
138 | if (pid < 0) { | 138 | if (pid < 0) { |
139 | err = -errno; | 139 | err = -errno; |
140 | printk("run_helper_thread - wait failed, errno = %d\n", | 140 | printk("run_helper_thread - wait failed, errno = %d\n", |
@@ -150,14 +150,30 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, | |||
150 | return pid; | 150 | return pid; |
151 | } | 151 | } |
152 | 152 | ||
153 | int helper_wait(int pid) | 153 | int helper_wait(int pid, int nohang, char *pname) |
154 | { | 154 | { |
155 | int ret; | 155 | int ret, status; |
156 | int wflags = __WCLONE; | ||
156 | 157 | ||
157 | CATCH_EINTR(ret = waitpid(pid, NULL, WNOHANG)); | 158 | if (nohang) |
159 | wflags |= WNOHANG; | ||
160 | |||
161 | if (!pname) | ||
162 | pname = "helper_wait"; | ||
163 | |||
164 | CATCH_EINTR(ret = waitpid(pid, &status, wflags)); | ||
158 | if (ret < 0) { | 165 | if (ret < 0) { |
159 | ret = -errno; | 166 | printk(UM_KERN_ERR "%s : waitpid process %d failed, " |
160 | printk("helper_wait : waitpid failed, errno = %d\n", errno); | 167 | "errno = %d\n", pname, pid, errno); |
161 | } | 168 | return -errno; |
162 | return ret; | 169 | } else if (nohang && ret == 0) { |
170 | printk(UM_KERN_ERR "%s : process %d has not exited\n", | ||
171 | pname, pid); | ||
172 | return -ECHILD; | ||
173 | } else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { | ||
174 | printk(UM_KERN_ERR "%s : process %d didn't exit with " | ||
175 | "status 0\n", pname, pid); | ||
176 | return -ECHILD; | ||
177 | } else | ||
178 | return 0; | ||
163 | } | 179 | } |
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 37781db4ceca..bda5c3150d6c 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -101,7 +101,7 @@ void os_kill_process(int pid, int reap_child) | |||
101 | { | 101 | { |
102 | kill(pid, SIGKILL); | 102 | kill(pid, SIGKILL); |
103 | if (reap_child) | 103 | if (reap_child) |
104 | CATCH_EINTR(waitpid(pid, NULL, 0)); | 104 | CATCH_EINTR(waitpid(pid, NULL, __WALL)); |
105 | } | 105 | } |
106 | 106 | ||
107 | /* This is here uniquely to have access to the userspace errno, i.e. the one | 107 | /* This is here uniquely to have access to the userspace errno, i.e. the one |
@@ -130,7 +130,7 @@ void os_kill_ptraced_process(int pid, int reap_child) | |||
130 | ptrace(PTRACE_KILL, pid); | 130 | ptrace(PTRACE_KILL, pid); |
131 | ptrace(PTRACE_CONT, pid); | 131 | ptrace(PTRACE_CONT, pid); |
132 | if (reap_child) | 132 | if (reap_child) |
133 | CATCH_EINTR(waitpid(pid, NULL, 0)); | 133 | CATCH_EINTR(waitpid(pid, NULL, __WALL)); |
134 | } | 134 | } |
135 | 135 | ||
136 | /* Don't use the glibc version, which caches the result in TLS. It misses some | 136 | /* Don't use the glibc version, which caches the result in TLS. It misses some |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index d77c81d7068a..e8b7a97e83d3 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -64,7 +64,7 @@ void wait_stub_done(int pid) | |||
64 | int n, status, err; | 64 | int n, status, err; |
65 | 65 | ||
66 | while (1) { | 66 | while (1) { |
67 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 67 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL)); |
68 | if ((n < 0) || !WIFSTOPPED(status)) | 68 | if ((n < 0) || !WIFSTOPPED(status)) |
69 | goto bad_wait; | 69 | goto bad_wait; |
70 | 70 | ||
@@ -153,7 +153,7 @@ static void handle_trap(int pid, struct uml_pt_regs *regs, | |||
153 | panic("handle_trap - continuing to end of syscall " | 153 | panic("handle_trap - continuing to end of syscall " |
154 | "failed, errno = %d\n", errno); | 154 | "failed, errno = %d\n", errno); |
155 | 155 | ||
156 | CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); | 156 | CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED | __WALL)); |
157 | if ((err < 0) || !WIFSTOPPED(status) || | 157 | if ((err < 0) || !WIFSTOPPED(status) || |
158 | (WSTOPSIG(status) != SIGTRAP + 0x80)) { | 158 | (WSTOPSIG(status) != SIGTRAP + 0x80)) { |
159 | err = ptrace_dump_regs(pid); | 159 | err = ptrace_dump_regs(pid); |
@@ -255,16 +255,18 @@ int start_userspace(unsigned long stub_stack) | |||
255 | panic("start_userspace : mmap failed, errno = %d", errno); | 255 | panic("start_userspace : mmap failed, errno = %d", errno); |
256 | sp = (unsigned long) stack + UM_KERN_PAGE_SIZE - sizeof(void *); | 256 | sp = (unsigned long) stack + UM_KERN_PAGE_SIZE - sizeof(void *); |
257 | 257 | ||
258 | flags = CLONE_FILES | SIGCHLD; | 258 | flags = CLONE_FILES; |
259 | if (proc_mm) | 259 | if (proc_mm) |
260 | flags |= CLONE_VM; | 260 | flags |= CLONE_VM; |
261 | else | ||
262 | flags |= SIGCHLD; | ||
261 | 263 | ||
262 | pid = clone(userspace_tramp, (void *) sp, flags, (void *) stub_stack); | 264 | pid = clone(userspace_tramp, (void *) sp, flags, (void *) stub_stack); |
263 | if (pid < 0) | 265 | if (pid < 0) |
264 | panic("start_userspace : clone failed, errno = %d", errno); | 266 | panic("start_userspace : clone failed, errno = %d", errno); |
265 | 267 | ||
266 | do { | 268 | do { |
267 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 269 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL)); |
268 | if (n < 0) | 270 | if (n < 0) |
269 | panic("start_userspace : wait failed, errno = %d", | 271 | panic("start_userspace : wait failed, errno = %d", |
270 | errno); | 272 | errno); |
@@ -314,7 +316,7 @@ void userspace(struct uml_pt_regs *regs) | |||
314 | "pid=%d, ptrace operation = %d, errno = %d\n", | 316 | "pid=%d, ptrace operation = %d, errno = %d\n", |
315 | pid, op, errno); | 317 | pid, op, errno); |
316 | 318 | ||
317 | CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); | 319 | CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED | __WALL)); |
318 | if (err < 0) | 320 | if (err < 0) |
319 | panic("userspace - waitpid failed, errno = %d\n", | 321 | panic("userspace - waitpid failed, errno = %d\n", |
320 | errno); | 322 | errno); |
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c index ef095436a78c..3e058ce9ffb6 100644 --- a/arch/um/os-Linux/util.c +++ b/arch/um/os-Linux/util.c | |||
@@ -141,7 +141,7 @@ void os_dump_core(void) | |||
141 | * nothing reasonable to do if that fails. | 141 | * nothing reasonable to do if that fails. |
142 | */ | 142 | */ |
143 | 143 | ||
144 | while ((pid = waitpid(-1, NULL, WNOHANG)) > 0) | 144 | while ((pid = waitpid(-1, NULL, WNOHANG | __WALL)) > 0) |
145 | os_kill_ptraced_process(pid, 0); | 145 | os_kill_ptraced_process(pid, 0); |
146 | 146 | ||
147 | abort(); | 147 | abort(); |
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 96986b46bc85..edb5108e5d0e 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -849,7 +849,7 @@ void __init init_bsp_APIC(void) | |||
849 | /** | 849 | /** |
850 | * setup_local_APIC - setup the local APIC | 850 | * setup_local_APIC - setup the local APIC |
851 | */ | 851 | */ |
852 | void __devinit setup_local_APIC(void) | 852 | void __cpuinit setup_local_APIC(void) |
853 | { | 853 | { |
854 | unsigned long oldvalue, value, maxlvt, integrated; | 854 | unsigned long oldvalue, value, maxlvt, integrated; |
855 | int i, j; | 855 | int i, j; |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 606fe4d55a91..9f530ff43c21 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -49,6 +49,7 @@ static struct _cache_table cache_table[] __cpuinitdata = | |||
49 | { 0x3c, LVL_2, 256 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 49 | { 0x3c, LVL_2, 256 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
50 | { 0x3d, LVL_2, 384 }, /* 6-way set assoc, sectored cache, 64 byte line size */ | 50 | { 0x3d, LVL_2, 384 }, /* 6-way set assoc, sectored cache, 64 byte line size */ |
51 | { 0x3e, LVL_2, 512 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 51 | { 0x3e, LVL_2, 512 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
52 | { 0x3f, LVL_2, 256 }, /* 2-way set assoc, 64 byte line size */ | ||
52 | { 0x41, LVL_2, 128 }, /* 4-way set assoc, 32 byte line size */ | 53 | { 0x41, LVL_2, 128 }, /* 4-way set assoc, 32 byte line size */ |
53 | { 0x42, LVL_2, 256 }, /* 4-way set assoc, 32 byte line size */ | 54 | { 0x42, LVL_2, 256 }, /* 4-way set assoc, 32 byte line size */ |
54 | { 0x43, LVL_2, 512 }, /* 4-way set assoc, 32 byte line size */ | 55 | { 0x43, LVL_2, 512 }, /* 4-way set assoc, 32 byte line size */ |
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 6cf27319a91c..c3a565bba106 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -1882,13 +1882,16 @@ __setup("no_timer_check", notimercheck); | |||
1882 | static int __init timer_irq_works(void) | 1882 | static int __init timer_irq_works(void) |
1883 | { | 1883 | { |
1884 | unsigned long t1 = jiffies; | 1884 | unsigned long t1 = jiffies; |
1885 | unsigned long flags; | ||
1885 | 1886 | ||
1886 | if (no_timer_check) | 1887 | if (no_timer_check) |
1887 | return 1; | 1888 | return 1; |
1888 | 1889 | ||
1890 | local_save_flags(flags); | ||
1889 | local_irq_enable(); | 1891 | local_irq_enable(); |
1890 | /* Let ten ticks pass... */ | 1892 | /* Let ten ticks pass... */ |
1891 | mdelay((10 * 1000) / HZ); | 1893 | mdelay((10 * 1000) / HZ); |
1894 | local_irq_restore(flags); | ||
1892 | 1895 | ||
1893 | /* | 1896 | /* |
1894 | * Expect a few ticks at least, to be sure some possible | 1897 | * Expect a few ticks at least, to be sure some possible |
@@ -2167,6 +2170,9 @@ static inline void __init check_timer(void) | |||
2167 | int apic1, pin1, apic2, pin2; | 2170 | int apic1, pin1, apic2, pin2; |
2168 | int vector; | 2171 | int vector; |
2169 | unsigned int ver; | 2172 | unsigned int ver; |
2173 | unsigned long flags; | ||
2174 | |||
2175 | local_irq_save(flags); | ||
2170 | 2176 | ||
2171 | ver = apic_read(APIC_LVR); | 2177 | ver = apic_read(APIC_LVR); |
2172 | ver = GET_APIC_VERSION(ver); | 2178 | ver = GET_APIC_VERSION(ver); |
@@ -2219,7 +2225,7 @@ static inline void __init check_timer(void) | |||
2219 | } | 2225 | } |
2220 | if (disable_timer_pin_1 > 0) | 2226 | if (disable_timer_pin_1 > 0) |
2221 | clear_IO_APIC_pin(0, pin1); | 2227 | clear_IO_APIC_pin(0, pin1); |
2222 | return; | 2228 | goto out; |
2223 | } | 2229 | } |
2224 | clear_IO_APIC_pin(apic1, pin1); | 2230 | clear_IO_APIC_pin(apic1, pin1); |
2225 | printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to " | 2231 | printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to " |
@@ -2242,7 +2248,7 @@ static inline void __init check_timer(void) | |||
2242 | if (nmi_watchdog == NMI_IO_APIC) { | 2248 | if (nmi_watchdog == NMI_IO_APIC) { |
2243 | setup_nmi(); | 2249 | setup_nmi(); |
2244 | } | 2250 | } |
2245 | return; | 2251 | goto out; |
2246 | } | 2252 | } |
2247 | /* | 2253 | /* |
2248 | * Cleanup, just in case ... | 2254 | * Cleanup, just in case ... |
@@ -2266,7 +2272,7 @@ static inline void __init check_timer(void) | |||
2266 | 2272 | ||
2267 | if (timer_irq_works()) { | 2273 | if (timer_irq_works()) { |
2268 | printk(" works.\n"); | 2274 | printk(" works.\n"); |
2269 | return; | 2275 | goto out; |
2270 | } | 2276 | } |
2271 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); | 2277 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); |
2272 | printk(" failed.\n"); | 2278 | printk(" failed.\n"); |
@@ -2282,11 +2288,13 @@ static inline void __init check_timer(void) | |||
2282 | 2288 | ||
2283 | if (timer_irq_works()) { | 2289 | if (timer_irq_works()) { |
2284 | printk(" works.\n"); | 2290 | printk(" works.\n"); |
2285 | return; | 2291 | goto out; |
2286 | } | 2292 | } |
2287 | printk(" failed :(.\n"); | 2293 | printk(" failed :(.\n"); |
2288 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " | 2294 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " |
2289 | "report. Then try booting with the 'noapic' option"); | 2295 | "report. Then try booting with the 'noapic' option"); |
2296 | out: | ||
2297 | local_irq_restore(flags); | ||
2290 | } | 2298 | } |
2291 | 2299 | ||
2292 | /* | 2300 | /* |
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 435a8c9b55f8..cbac1670c7c3 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -1281,10 +1281,13 @@ void disable_IO_APIC(void) | |||
1281 | static int __init timer_irq_works(void) | 1281 | static int __init timer_irq_works(void) |
1282 | { | 1282 | { |
1283 | unsigned long t1 = jiffies; | 1283 | unsigned long t1 = jiffies; |
1284 | unsigned long flags; | ||
1284 | 1285 | ||
1286 | local_save_flags(flags); | ||
1285 | local_irq_enable(); | 1287 | local_irq_enable(); |
1286 | /* Let ten ticks pass... */ | 1288 | /* Let ten ticks pass... */ |
1287 | mdelay((10 * 1000) / HZ); | 1289 | mdelay((10 * 1000) / HZ); |
1290 | local_irq_restore(flags); | ||
1288 | 1291 | ||
1289 | /* | 1292 | /* |
1290 | * Expect a few ticks at least, to be sure some possible | 1293 | * Expect a few ticks at least, to be sure some possible |
@@ -1655,6 +1658,9 @@ static inline void check_timer(void) | |||
1655 | { | 1658 | { |
1656 | struct irq_cfg *cfg = irq_cfg + 0; | 1659 | struct irq_cfg *cfg = irq_cfg + 0; |
1657 | int apic1, pin1, apic2, pin2; | 1660 | int apic1, pin1, apic2, pin2; |
1661 | unsigned long flags; | ||
1662 | |||
1663 | local_irq_save(flags); | ||
1658 | 1664 | ||
1659 | /* | 1665 | /* |
1660 | * get/set the timer IRQ vector: | 1666 | * get/set the timer IRQ vector: |
@@ -1696,7 +1702,7 @@ static inline void check_timer(void) | |||
1696 | } | 1702 | } |
1697 | if (disable_timer_pin_1 > 0) | 1703 | if (disable_timer_pin_1 > 0) |
1698 | clear_IO_APIC_pin(0, pin1); | 1704 | clear_IO_APIC_pin(0, pin1); |
1699 | return; | 1705 | goto out; |
1700 | } | 1706 | } |
1701 | clear_IO_APIC_pin(apic1, pin1); | 1707 | clear_IO_APIC_pin(apic1, pin1); |
1702 | apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not " | 1708 | apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not " |
@@ -1718,7 +1724,7 @@ static inline void check_timer(void) | |||
1718 | if (nmi_watchdog == NMI_IO_APIC) { | 1724 | if (nmi_watchdog == NMI_IO_APIC) { |
1719 | setup_nmi(); | 1725 | setup_nmi(); |
1720 | } | 1726 | } |
1721 | return; | 1727 | goto out; |
1722 | } | 1728 | } |
1723 | /* | 1729 | /* |
1724 | * Cleanup, just in case ... | 1730 | * Cleanup, just in case ... |
@@ -1741,7 +1747,7 @@ static inline void check_timer(void) | |||
1741 | 1747 | ||
1742 | if (timer_irq_works()) { | 1748 | if (timer_irq_works()) { |
1743 | apic_printk(APIC_VERBOSE," works.\n"); | 1749 | apic_printk(APIC_VERBOSE," works.\n"); |
1744 | return; | 1750 | goto out; |
1745 | } | 1751 | } |
1746 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector); | 1752 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector); |
1747 | apic_printk(APIC_VERBOSE," failed.\n"); | 1753 | apic_printk(APIC_VERBOSE," failed.\n"); |
@@ -1756,10 +1762,12 @@ static inline void check_timer(void) | |||
1756 | 1762 | ||
1757 | if (timer_irq_works()) { | 1763 | if (timer_irq_works()) { |
1758 | apic_printk(APIC_VERBOSE," works.\n"); | 1764 | apic_printk(APIC_VERBOSE," works.\n"); |
1759 | return; | 1765 | goto out; |
1760 | } | 1766 | } |
1761 | apic_printk(APIC_VERBOSE," failed :(.\n"); | 1767 | apic_printk(APIC_VERBOSE," failed :(.\n"); |
1762 | panic("IO-APIC + timer doesn't work! Try using the 'noapic' kernel parameter\n"); | 1768 | panic("IO-APIC + timer doesn't work! Try using the 'noapic' kernel parameter\n"); |
1769 | out: | ||
1770 | local_irq_restore(flags); | ||
1763 | } | 1771 | } |
1764 | 1772 | ||
1765 | static int __init notimercheck(char *s) | 1773 | static int __init notimercheck(char *s) |
diff --git a/arch/x86/kernel/kprobes_32.c b/arch/x86/kernel/kprobes_32.c index d87a523070d1..3a020f79f82b 100644 --- a/arch/x86/kernel/kprobes_32.c +++ b/arch/x86/kernel/kprobes_32.c | |||
@@ -727,9 +727,7 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
727 | 727 | ||
728 | if ((addr > (u8 *) jprobe_return) && (addr < (u8 *) jprobe_return_end)) { | 728 | if ((addr > (u8 *) jprobe_return) && (addr < (u8 *) jprobe_return_end)) { |
729 | if (®s->esp != kcb->jprobe_saved_esp) { | 729 | if (®s->esp != kcb->jprobe_saved_esp) { |
730 | struct pt_regs *saved_regs = | 730 | struct pt_regs *saved_regs = &kcb->jprobe_saved_regs; |
731 | container_of(kcb->jprobe_saved_esp, | ||
732 | struct pt_regs, esp); | ||
733 | printk("current esp %p does not match saved esp %p\n", | 731 | printk("current esp %p does not match saved esp %p\n", |
734 | ®s->esp, kcb->jprobe_saved_esp); | 732 | ®s->esp, kcb->jprobe_saved_esp); |
735 | printk("Saved registers for jprobe %p\n", jp); | 733 | printk("Saved registers for jprobe %p\n", jp); |
diff --git a/arch/x86/kernel/kprobes_64.c b/arch/x86/kernel/kprobes_64.c index 0c467644589c..5df19a9f9239 100644 --- a/arch/x86/kernel/kprobes_64.c +++ b/arch/x86/kernel/kprobes_64.c | |||
@@ -485,7 +485,6 @@ static void __kprobes resume_execution(struct kprobe *p, | |||
485 | struct pt_regs *regs, struct kprobe_ctlblk *kcb) | 485 | struct pt_regs *regs, struct kprobe_ctlblk *kcb) |
486 | { | 486 | { |
487 | unsigned long *tos = (unsigned long *)regs->rsp; | 487 | unsigned long *tos = (unsigned long *)regs->rsp; |
488 | unsigned long next_rip = 0; | ||
489 | unsigned long copy_rip = (unsigned long)p->ainsn.insn; | 488 | unsigned long copy_rip = (unsigned long)p->ainsn.insn; |
490 | unsigned long orig_rip = (unsigned long)p->addr; | 489 | unsigned long orig_rip = (unsigned long)p->addr; |
491 | kprobe_opcode_t *insn = p->ainsn.insn; | 490 | kprobe_opcode_t *insn = p->ainsn.insn; |
@@ -494,46 +493,42 @@ static void __kprobes resume_execution(struct kprobe *p, | |||
494 | if (*insn >= 0x40 && *insn <= 0x4f) | 493 | if (*insn >= 0x40 && *insn <= 0x4f) |
495 | insn++; | 494 | insn++; |
496 | 495 | ||
496 | regs->eflags &= ~TF_MASK; | ||
497 | switch (*insn) { | 497 | switch (*insn) { |
498 | case 0x9c: /* pushfl */ | 498 | case 0x9c: /* pushfl */ |
499 | *tos &= ~(TF_MASK | IF_MASK); | 499 | *tos &= ~(TF_MASK | IF_MASK); |
500 | *tos |= kcb->kprobe_old_rflags; | 500 | *tos |= kcb->kprobe_old_rflags; |
501 | break; | 501 | break; |
502 | case 0xc3: /* ret/lret */ | 502 | case 0xc2: /* iret/ret/lret */ |
503 | case 0xcb: | 503 | case 0xc3: |
504 | case 0xc2: | ||
505 | case 0xca: | 504 | case 0xca: |
506 | regs->eflags &= ~TF_MASK; | 505 | case 0xcb: |
507 | /* rip is already adjusted, no more changes required*/ | 506 | case 0xcf: |
508 | return; | 507 | case 0xea: /* jmp absolute -- ip is correct */ |
509 | case 0xe8: /* call relative - Fix return addr */ | 508 | /* ip is already adjusted, no more changes required */ |
509 | goto no_change; | ||
510 | case 0xe8: /* call relative - Fix return addr */ | ||
510 | *tos = orig_rip + (*tos - copy_rip); | 511 | *tos = orig_rip + (*tos - copy_rip); |
511 | break; | 512 | break; |
512 | case 0xff: | 513 | case 0xff: |
513 | if ((insn[1] & 0x30) == 0x10) { | 514 | if ((insn[1] & 0x30) == 0x10) { |
514 | /* call absolute, indirect */ | 515 | /* call absolute, indirect */ |
515 | /* Fix return addr; rip is correct. */ | 516 | /* Fix return addr; ip is correct. */ |
516 | next_rip = regs->rip; | ||
517 | *tos = orig_rip + (*tos - copy_rip); | 517 | *tos = orig_rip + (*tos - copy_rip); |
518 | goto no_change; | ||
518 | } else if (((insn[1] & 0x31) == 0x20) || /* jmp near, absolute indirect */ | 519 | } else if (((insn[1] & 0x31) == 0x20) || /* jmp near, absolute indirect */ |
519 | ((insn[1] & 0x31) == 0x21)) { /* jmp far, absolute indirect */ | 520 | ((insn[1] & 0x31) == 0x21)) { /* jmp far, absolute indirect */ |
520 | /* rip is correct. */ | 521 | /* ip is correct. */ |
521 | next_rip = regs->rip; | 522 | goto no_change; |
522 | } | 523 | } |
523 | break; | ||
524 | case 0xea: /* jmp absolute -- rip is correct */ | ||
525 | next_rip = regs->rip; | ||
526 | break; | ||
527 | default: | 524 | default: |
528 | break; | 525 | break; |
529 | } | 526 | } |
530 | 527 | ||
531 | regs->eflags &= ~TF_MASK; | 528 | regs->rip = orig_rip + (regs->rip - copy_rip); |
532 | if (next_rip) { | 529 | no_change: |
533 | regs->rip = next_rip; | 530 | |
534 | } else { | 531 | return; |
535 | regs->rip = orig_rip + (regs->rip - copy_rip); | ||
536 | } | ||
537 | } | 532 | } |
538 | 533 | ||
539 | int __kprobes post_kprobe_handler(struct pt_regs *regs) | 534 | int __kprobes post_kprobe_handler(struct pt_regs *regs) |
@@ -716,10 +711,8 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
716 | struct jprobe *jp = container_of(p, struct jprobe, kp); | 711 | struct jprobe *jp = container_of(p, struct jprobe, kp); |
717 | 712 | ||
718 | if ((addr > (u8 *) jprobe_return) && (addr < (u8 *) jprobe_return_end)) { | 713 | if ((addr > (u8 *) jprobe_return) && (addr < (u8 *) jprobe_return_end)) { |
719 | if ((long *)regs->rsp != kcb->jprobe_saved_rsp) { | 714 | if ((unsigned long *)regs->rsp != kcb->jprobe_saved_rsp) { |
720 | struct pt_regs *saved_regs = | 715 | struct pt_regs *saved_regs = &kcb->jprobe_saved_regs; |
721 | container_of(kcb->jprobe_saved_rsp, | ||
722 | struct pt_regs, rsp); | ||
723 | printk("current rsp %p does not match saved rsp %p\n", | 716 | printk("current rsp %p does not match saved rsp %p\n", |
724 | (long *)regs->rsp, kcb->jprobe_saved_rsp); | 717 | (long *)regs->rsp, kcb->jprobe_saved_rsp); |
725 | printk("Saved registers for jprobe %p\n", jp); | 718 | printk("Saved registers for jprobe %p\n", jp); |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 7b899584d290..9663c2a74830 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -261,7 +261,7 @@ static void mwait_idle(void) | |||
261 | mwait_idle_with_hints(0, 0); | 261 | mwait_idle_with_hints(0, 0); |
262 | } | 262 | } |
263 | 263 | ||
264 | void __devinit select_idle_routine(const struct cpuinfo_x86 *c) | 264 | void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) |
265 | { | 265 | { |
266 | if (cpu_has(c, X86_FEATURE_MWAIT)) { | 266 | if (cpu_has(c, X86_FEATURE_MWAIT)) { |
267 | printk("monitor/mwait feature present.\n"); | 267 | printk("monitor/mwait feature present.\n"); |
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index e1e18c34c821..9c24b45b513c 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c | |||
@@ -67,7 +67,7 @@ | |||
67 | address, and must not be in the .bss segment! */ | 67 | address, and must not be in the .bss segment! */ |
68 | unsigned long init_pg_tables_end __initdata = ~0UL; | 68 | unsigned long init_pg_tables_end __initdata = ~0UL; |
69 | 69 | ||
70 | int disable_pse __devinitdata = 0; | 70 | int disable_pse __cpuinitdata = 0; |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Machine setup.. | 73 | * Machine setup.. |
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index ef0f34ede1ab..4ea80cbe52e5 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #include <asm/mtrr.h> | 60 | #include <asm/mtrr.h> |
61 | 61 | ||
62 | /* Set if we find a B stepping CPU */ | 62 | /* Set if we find a B stepping CPU */ |
63 | static int __devinitdata smp_b_stepping; | 63 | static int __cpuinitdata smp_b_stepping; |
64 | 64 | ||
65 | /* Number of siblings per CPU package */ | 65 | /* Number of siblings per CPU package */ |
66 | int smp_num_siblings = 1; | 66 | int smp_num_siblings = 1; |
@@ -745,8 +745,8 @@ static inline int alloc_cpu_id(void) | |||
745 | } | 745 | } |
746 | 746 | ||
747 | #ifdef CONFIG_HOTPLUG_CPU | 747 | #ifdef CONFIG_HOTPLUG_CPU |
748 | static struct task_struct * __devinitdata cpu_idle_tasks[NR_CPUS]; | 748 | static struct task_struct * __cpuinitdata cpu_idle_tasks[NR_CPUS]; |
749 | static inline struct task_struct * alloc_idle_task(int cpu) | 749 | static inline struct task_struct * __cpuinit alloc_idle_task(int cpu) |
750 | { | 750 | { |
751 | struct task_struct *idle; | 751 | struct task_struct *idle; |
752 | 752 | ||
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index 500670c93d81..594889521da1 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c | |||
@@ -141,8 +141,8 @@ static void __cpuinit smp_store_cpu_info(int id) | |||
141 | struct cpuinfo_x86 *c = &cpu_data(id); | 141 | struct cpuinfo_x86 *c = &cpu_data(id); |
142 | 142 | ||
143 | *c = boot_cpu_data; | 143 | *c = boot_cpu_data; |
144 | c->cpu_index = id; | ||
145 | identify_cpu(c); | 144 | identify_cpu(c); |
145 | c->cpu_index = id; | ||
146 | print_cpu_info(c); | 146 | print_cpu_info(c); |
147 | } | 147 | } |
148 | 148 | ||
diff --git a/arch/x86/kernel/suspend_64.c b/arch/x86/kernel/suspend_64.c index db284ef44d53..2e5efaaf8800 100644 --- a/arch/x86/kernel/suspend_64.c +++ b/arch/x86/kernel/suspend_64.c | |||
@@ -192,42 +192,25 @@ static int res_phys_pud_init(pud_t *pud, unsigned long address, unsigned long en | |||
192 | return 0; | 192 | return 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | static int res_kernel_text_pud_init(pud_t *pud, unsigned long start) | ||
196 | { | ||
197 | pmd_t *pmd; | ||
198 | unsigned long paddr; | ||
199 | |||
200 | pmd = (pmd_t *)get_safe_page(GFP_ATOMIC); | ||
201 | if (!pmd) | ||
202 | return -ENOMEM; | ||
203 | set_pud(pud + pud_index(start), __pud(__pa(pmd) | _KERNPG_TABLE)); | ||
204 | for (paddr = 0; paddr < KERNEL_TEXT_SIZE; pmd++, paddr += PMD_SIZE) { | ||
205 | unsigned long pe; | ||
206 | |||
207 | pe = __PAGE_KERNEL_LARGE_EXEC | _PAGE_GLOBAL | paddr; | ||
208 | pe &= __supported_pte_mask; | ||
209 | set_pmd(pmd, __pmd(pe)); | ||
210 | } | ||
211 | |||
212 | return 0; | ||
213 | } | ||
214 | |||
215 | static int set_up_temporary_mappings(void) | 195 | static int set_up_temporary_mappings(void) |
216 | { | 196 | { |
217 | unsigned long start, end, next; | 197 | unsigned long start, end, next; |
218 | pud_t *pud; | ||
219 | int error; | 198 | int error; |
220 | 199 | ||
221 | temp_level4_pgt = (pgd_t *)get_safe_page(GFP_ATOMIC); | 200 | temp_level4_pgt = (pgd_t *)get_safe_page(GFP_ATOMIC); |
222 | if (!temp_level4_pgt) | 201 | if (!temp_level4_pgt) |
223 | return -ENOMEM; | 202 | return -ENOMEM; |
224 | 203 | ||
204 | /* It is safe to reuse the original kernel mapping */ | ||
205 | set_pgd(temp_level4_pgt + pgd_index(__START_KERNEL_map), | ||
206 | init_level4_pgt[pgd_index(__START_KERNEL_map)]); | ||
207 | |||
225 | /* Set up the direct mapping from scratch */ | 208 | /* Set up the direct mapping from scratch */ |
226 | start = (unsigned long)pfn_to_kaddr(0); | 209 | start = (unsigned long)pfn_to_kaddr(0); |
227 | end = (unsigned long)pfn_to_kaddr(end_pfn); | 210 | end = (unsigned long)pfn_to_kaddr(end_pfn); |
228 | 211 | ||
229 | for (; start < end; start = next) { | 212 | for (; start < end; start = next) { |
230 | pud = (pud_t *)get_safe_page(GFP_ATOMIC); | 213 | pud_t *pud = (pud_t *)get_safe_page(GFP_ATOMIC); |
231 | if (!pud) | 214 | if (!pud) |
232 | return -ENOMEM; | 215 | return -ENOMEM; |
233 | next = start + PGDIR_SIZE; | 216 | next = start + PGDIR_SIZE; |
@@ -238,17 +221,7 @@ static int set_up_temporary_mappings(void) | |||
238 | set_pgd(temp_level4_pgt + pgd_index(start), | 221 | set_pgd(temp_level4_pgt + pgd_index(start), |
239 | mk_kernel_pgd(__pa(pud))); | 222 | mk_kernel_pgd(__pa(pud))); |
240 | } | 223 | } |
241 | 224 | return 0; | |
242 | /* Set up the kernel text mapping from scratch */ | ||
243 | pud = (pud_t *)get_safe_page(GFP_ATOMIC); | ||
244 | if (!pud) | ||
245 | return -ENOMEM; | ||
246 | error = res_kernel_text_pud_init(pud, __START_KERNEL_map); | ||
247 | if (!error) | ||
248 | set_pgd(temp_level4_pgt + pgd_index(__START_KERNEL_map), | ||
249 | __pgd(__pa(pud) | _PAGE_TABLE)); | ||
250 | |||
251 | return error; | ||
252 | } | 225 | } |
253 | 226 | ||
254 | int swsusp_arch_resume(void) | 227 | int swsusp_arch_resume(void) |
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index ef6010262597..c88bbffcaa03 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -373,14 +373,13 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
373 | 373 | ||
374 | if (die.lock_owner != raw_smp_processor_id()) { | 374 | if (die.lock_owner != raw_smp_processor_id()) { |
375 | console_verbose(); | 375 | console_verbose(); |
376 | raw_local_irq_save(flags); | ||
376 | __raw_spin_lock(&die.lock); | 377 | __raw_spin_lock(&die.lock); |
377 | raw_local_save_flags(flags); | ||
378 | die.lock_owner = smp_processor_id(); | 378 | die.lock_owner = smp_processor_id(); |
379 | die.lock_owner_depth = 0; | 379 | die.lock_owner_depth = 0; |
380 | bust_spinlocks(1); | 380 | bust_spinlocks(1); |
381 | } | 381 | } else |
382 | else | 382 | raw_local_irq_save(flags); |
383 | raw_local_save_flags(flags); | ||
384 | 383 | ||
385 | if (++die.lock_owner_depth < 3) { | 384 | if (++die.lock_owner_depth < 3) { |
386 | unsigned long esp; | 385 | unsigned long esp; |
diff --git a/arch/x86/oprofile/op_model_athlon.c b/arch/x86/oprofile/op_model_athlon.c index 3057a19e4641..c3ee43333f26 100644 --- a/arch/x86/oprofile/op_model_athlon.c +++ b/arch/x86/oprofile/op_model_athlon.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /** | 1 | /** |
2 | * @file op_model_athlon.h | 2 | * @file op_model_athlon.h |
3 | * athlon / K7 model-specific MSR operations | 3 | * athlon / K7 / K8 / Family 10h model-specific MSR operations |
4 | * | 4 | * |
5 | * @remark Copyright 2002 OProfile authors | 5 | * @remark Copyright 2002 OProfile authors |
6 | * @remark Read the file COPYING | 6 | * @remark Read the file COPYING |
@@ -31,12 +31,16 @@ | |||
31 | #define CTRL_WRITE(l,h,msrs,c) do {wrmsr(msrs->controls[(c)].addr, (l), (h));} while (0) | 31 | #define CTRL_WRITE(l,h,msrs,c) do {wrmsr(msrs->controls[(c)].addr, (l), (h));} while (0) |
32 | #define CTRL_SET_ACTIVE(n) (n |= (1<<22)) | 32 | #define CTRL_SET_ACTIVE(n) (n |= (1<<22)) |
33 | #define CTRL_SET_INACTIVE(n) (n &= ~(1<<22)) | 33 | #define CTRL_SET_INACTIVE(n) (n &= ~(1<<22)) |
34 | #define CTRL_CLEAR(x) (x &= (1<<21)) | 34 | #define CTRL_CLEAR_LO(x) (x &= (1<<21)) |
35 | #define CTRL_CLEAR_HI(x) (x &= 0xfffffcf0) | ||
35 | #define CTRL_SET_ENABLE(val) (val |= 1<<20) | 36 | #define CTRL_SET_ENABLE(val) (val |= 1<<20) |
36 | #define CTRL_SET_USR(val,u) (val |= ((u & 1) << 16)) | 37 | #define CTRL_SET_USR(val,u) (val |= ((u & 1) << 16)) |
37 | #define CTRL_SET_KERN(val,k) (val |= ((k & 1) << 17)) | 38 | #define CTRL_SET_KERN(val,k) (val |= ((k & 1) << 17)) |
38 | #define CTRL_SET_UM(val, m) (val |= (m << 8)) | 39 | #define CTRL_SET_UM(val, m) (val |= (m << 8)) |
39 | #define CTRL_SET_EVENT(val, e) (val |= e) | 40 | #define CTRL_SET_EVENT_LOW(val, e) (val |= (e & 0xff)) |
41 | #define CTRL_SET_EVENT_HIGH(val, e) (val |= ((e >> 8) & 0xf)) | ||
42 | #define CTRL_SET_HOST_ONLY(val, h) (val |= ((h & 1) << 9)) | ||
43 | #define CTRL_SET_GUEST_ONLY(val, h) (val |= ((h & 1) << 8)) | ||
40 | 44 | ||
41 | static unsigned long reset_value[NUM_COUNTERS]; | 45 | static unsigned long reset_value[NUM_COUNTERS]; |
42 | 46 | ||
@@ -70,7 +74,8 @@ static void athlon_setup_ctrs(struct op_msrs const * const msrs) | |||
70 | if (unlikely(!CTRL_IS_RESERVED(msrs,i))) | 74 | if (unlikely(!CTRL_IS_RESERVED(msrs,i))) |
71 | continue; | 75 | continue; |
72 | CTRL_READ(low, high, msrs, i); | 76 | CTRL_READ(low, high, msrs, i); |
73 | CTRL_CLEAR(low); | 77 | CTRL_CLEAR_LO(low); |
78 | CTRL_CLEAR_HI(high); | ||
74 | CTRL_WRITE(low, high, msrs, i); | 79 | CTRL_WRITE(low, high, msrs, i); |
75 | } | 80 | } |
76 | 81 | ||
@@ -89,12 +94,17 @@ static void athlon_setup_ctrs(struct op_msrs const * const msrs) | |||
89 | CTR_WRITE(counter_config[i].count, msrs, i); | 94 | CTR_WRITE(counter_config[i].count, msrs, i); |
90 | 95 | ||
91 | CTRL_READ(low, high, msrs, i); | 96 | CTRL_READ(low, high, msrs, i); |
92 | CTRL_CLEAR(low); | 97 | CTRL_CLEAR_LO(low); |
98 | CTRL_CLEAR_HI(high); | ||
93 | CTRL_SET_ENABLE(low); | 99 | CTRL_SET_ENABLE(low); |
94 | CTRL_SET_USR(low, counter_config[i].user); | 100 | CTRL_SET_USR(low, counter_config[i].user); |
95 | CTRL_SET_KERN(low, counter_config[i].kernel); | 101 | CTRL_SET_KERN(low, counter_config[i].kernel); |
96 | CTRL_SET_UM(low, counter_config[i].unit_mask); | 102 | CTRL_SET_UM(low, counter_config[i].unit_mask); |
97 | CTRL_SET_EVENT(low, counter_config[i].event); | 103 | CTRL_SET_EVENT_LOW(low, counter_config[i].event); |
104 | CTRL_SET_EVENT_HIGH(high, counter_config[i].event); | ||
105 | CTRL_SET_HOST_ONLY(high, 0); | ||
106 | CTRL_SET_GUEST_ONLY(high, 0); | ||
107 | |||
98 | CTRL_WRITE(low, high, msrs, i); | 108 | CTRL_WRITE(low, high, msrs, i); |
99 | } else { | 109 | } else { |
100 | reset_value[i] = 0; | 110 | reset_value[i] = 0; |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 94c39aaf695f..b6af3ea43c73 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1131,7 +1131,7 @@ asmlinkage void __init xen_start_kernel(void) | |||
1131 | if (!xen_start_info) | 1131 | if (!xen_start_info) |
1132 | return; | 1132 | return; |
1133 | 1133 | ||
1134 | BUG_ON(memcmp(xen_start_info->magic, "xen-3.0", 7) != 0); | 1134 | BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0); |
1135 | 1135 | ||
1136 | /* Install Xen paravirt ops */ | 1136 | /* Install Xen paravirt ops */ |
1137 | pv_info = xen_info; | 1137 | pv_info = xen_info; |
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index b61fb36674e7..f21b9b0899a8 100644 --- a/arch/xtensa/platform-iss/network.c +++ b/arch/xtensa/platform-iss/network.c | |||
@@ -393,11 +393,11 @@ static int iss_net_rx(struct net_device *dev) | |||
393 | if (pkt_len > 0) { | 393 | if (pkt_len > 0) { |
394 | skb_trim(skb, pkt_len); | 394 | skb_trim(skb, pkt_len); |
395 | skb->protocol = lp->tp.protocol(skb); | 395 | skb->protocol = lp->tp.protocol(skb); |
396 | // netif_rx(skb); | ||
397 | netif_rx_ni(skb); | ||
398 | 396 | ||
399 | lp->stats.rx_bytes += skb->len; | 397 | lp->stats.rx_bytes += skb->len; |
400 | lp->stats.rx_packets++; | 398 | lp->stats.rx_packets++; |
399 | // netif_rx(skb); | ||
400 | netif_rx_ni(skb); | ||
401 | return pkt_len; | 401 | return pkt_len; |
402 | } | 402 | } |
403 | kfree_skb(skb); | 403 | kfree_skb(skb); |