diff options
Diffstat (limited to 'arch')
44 files changed, 216 insertions, 159 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ade7e924bef5..9759fec0b704 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -547,6 +547,7 @@ config ARCH_KIRKWOOD | |||
547 | select CPU_FEROCEON | 547 | select CPU_FEROCEON |
548 | select GENERIC_CLOCKEVENTS | 548 | select GENERIC_CLOCKEVENTS |
549 | select PCI | 549 | select PCI |
550 | select PCI_QUIRKS | ||
550 | select PLAT_ORION_LEGACY | 551 | select PLAT_ORION_LEGACY |
551 | help | 552 | help |
552 | Support for the following Marvell Kirkwood series SoCs: | 553 | Support for the following Marvell Kirkwood series SoCs: |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 90275f036cd1..49ca86e37b8d 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -652,6 +652,15 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
652 | mov pc, lr | 652 | mov pc, lr |
653 | ENDPROC(__setup_mmu) | 653 | ENDPROC(__setup_mmu) |
654 | 654 | ||
655 | @ Enable unaligned access on v6, to allow better code generation | ||
656 | @ for the decompressor C code: | ||
657 | __armv6_mmu_cache_on: | ||
658 | mrc p15, 0, r0, c1, c0, 0 @ read SCTLR | ||
659 | bic r0, r0, #2 @ A (no unaligned access fault) | ||
660 | orr r0, r0, #1 << 22 @ U (v6 unaligned access model) | ||
661 | mcr p15, 0, r0, c1, c0, 0 @ write SCTLR | ||
662 | b __armv4_mmu_cache_on | ||
663 | |||
655 | __arm926ejs_mmu_cache_on: | 664 | __arm926ejs_mmu_cache_on: |
656 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | 665 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH |
657 | mov r0, #4 @ put dcache in WT mode | 666 | mov r0, #4 @ put dcache in WT mode |
@@ -694,6 +703,9 @@ __armv7_mmu_cache_on: | |||
694 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE | 703 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE |
695 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement | 704 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement |
696 | orr r0, r0, #0x003c @ write buffer | 705 | orr r0, r0, #0x003c @ write buffer |
706 | bic r0, r0, #2 @ A (no unaligned access fault) | ||
707 | orr r0, r0, #1 << 22 @ U (v6 unaligned access model) | ||
708 | @ (needed for ARM1176) | ||
697 | #ifdef CONFIG_MMU | 709 | #ifdef CONFIG_MMU |
698 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 710 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
699 | orr r0, r0, #1 << 25 @ big-endian page tables | 711 | orr r0, r0, #1 << 25 @ big-endian page tables |
@@ -914,7 +926,7 @@ proc_types: | |||
914 | 926 | ||
915 | .word 0x0007b000 @ ARMv6 | 927 | .word 0x0007b000 @ ARMv6 |
916 | .word 0x000ff000 | 928 | .word 0x000ff000 |
917 | W(b) __armv4_mmu_cache_on | 929 | W(b) __armv6_mmu_cache_on |
918 | W(b) __armv4_mmu_cache_off | 930 | W(b) __armv4_mmu_cache_off |
919 | W(b) __armv6_mmu_cache_flush | 931 | W(b) __armv6_mmu_cache_flush |
920 | 932 | ||
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index df13a3ffff35..9d2d3ba339ff 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -162,7 +162,6 @@ static struct clock_event_device sp804_clockevent = { | |||
162 | .set_mode = sp804_set_mode, | 162 | .set_mode = sp804_set_mode, |
163 | .set_next_event = sp804_set_next_event, | 163 | .set_next_event = sp804_set_next_event, |
164 | .rating = 300, | 164 | .rating = 300, |
165 | .cpumask = cpu_all_mask, | ||
166 | }; | 165 | }; |
167 | 166 | ||
168 | static struct irqaction sp804_timer_irq = { | 167 | static struct irqaction sp804_timer_irq = { |
@@ -185,6 +184,7 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int irq, | |||
185 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); | 184 | clkevt_reload = DIV_ROUND_CLOSEST(rate, HZ); |
186 | evt->name = name; | 185 | evt->name = name; |
187 | evt->irq = irq; | 186 | evt->irq = irq; |
187 | evt->cpumask = cpu_possible_mask; | ||
188 | 188 | ||
189 | setup_irq(irq, &sp804_timer_irq); | 189 | setup_irq(irq, &sp804_timer_irq); |
190 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); | 190 | clockevents_config_and_register(evt, rate, 0xf, 0xffffffff); |
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h index 7bcd0dfce4b1..b47f75038686 100644 --- a/arch/arm/mach-dove/include/mach/pm.h +++ b/arch/arm/mach-dove/include/mach/pm.h | |||
@@ -63,7 +63,7 @@ static inline int pmu_to_irq(int pin) | |||
63 | 63 | ||
64 | static inline int irq_to_pmu(int irq) | 64 | static inline int irq_to_pmu(int irq) |
65 | { | 65 | { |
66 | if (IRQ_DOVE_PMU_START < irq && irq < NR_IRQS) | 66 | if (IRQ_DOVE_PMU_START <= irq && irq < NR_IRQS) |
67 | return irq - IRQ_DOVE_PMU_START; | 67 | return irq - IRQ_DOVE_PMU_START; |
68 | 68 | ||
69 | return -EINVAL; | 69 | return -EINVAL; |
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c index 087711524e8a..bc4344aa1009 100644 --- a/arch/arm/mach-dove/irq.c +++ b/arch/arm/mach-dove/irq.c | |||
@@ -46,8 +46,20 @@ static void pmu_irq_ack(struct irq_data *d) | |||
46 | int pin = irq_to_pmu(d->irq); | 46 | int pin = irq_to_pmu(d->irq); |
47 | u32 u; | 47 | u32 u; |
48 | 48 | ||
49 | /* | ||
50 | * The PMU mask register is not RW0C: it is RW. This means that | ||
51 | * the bits take whatever value is written to them; if you write | ||
52 | * a '1', you will set the interrupt. | ||
53 | * | ||
54 | * Unfortunately this means there is NO race free way to clear | ||
55 | * these interrupts. | ||
56 | * | ||
57 | * So, let's structure the code so that the window is as small as | ||
58 | * possible. | ||
59 | */ | ||
49 | u = ~(1 << (pin & 31)); | 60 | u = ~(1 << (pin & 31)); |
50 | writel(u, PMU_INTERRUPT_CAUSE); | 61 | u &= readl_relaxed(PMU_INTERRUPT_CAUSE); |
62 | writel_relaxed(u, PMU_INTERRUPT_CAUSE); | ||
51 | } | 63 | } |
52 | 64 | ||
53 | static struct irq_chip pmu_irq_chip = { | 65 | static struct irq_chip pmu_irq_chip = { |
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 1694f01ce2b6..6d6bde3e15fa 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -410,6 +410,7 @@ void __init ixp4xx_pci_preinit(void) | |||
410 | * Enable the IO window to be way up high, at 0xfffffc00 | 410 | * Enable the IO window to be way up high, at 0xfffffc00 |
411 | */ | 411 | */ |
412 | local_write_config(PCI_BASE_ADDRESS_5, 4, 0xfffffc01); | 412 | local_write_config(PCI_BASE_ADDRESS_5, 4, 0xfffffc01); |
413 | local_write_config(0x40, 4, 0x000080FF); /* No TRDY time limit */ | ||
413 | } else { | 414 | } else { |
414 | printk("PCI: IXP4xx is target - No bus scan performed\n"); | 415 | printk("PCI: IXP4xx is target - No bus scan performed\n"); |
415 | } | 416 | } |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index fdf91a160884..8c0c0e2d0727 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -67,15 +67,12 @@ static struct map_desc ixp4xx_io_desc[] __initdata = { | |||
67 | .pfn = __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS), | 67 | .pfn = __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS), |
68 | .length = IXP4XX_PCI_CFG_REGION_SIZE, | 68 | .length = IXP4XX_PCI_CFG_REGION_SIZE, |
69 | .type = MT_DEVICE | 69 | .type = MT_DEVICE |
70 | }, | 70 | }, { /* Queue Manager */ |
71 | #ifdef CONFIG_DEBUG_LL | 71 | .virtual = (unsigned long)IXP4XX_QMGR_BASE_VIRT, |
72 | { /* Debug UART mapping */ | 72 | .pfn = __phys_to_pfn(IXP4XX_QMGR_BASE_PHYS), |
73 | .virtual = (unsigned long)IXP4XX_DEBUG_UART_BASE_VIRT, | 73 | .length = IXP4XX_QMGR_REGION_SIZE, |
74 | .pfn = __phys_to_pfn(IXP4XX_DEBUG_UART_BASE_PHYS), | ||
75 | .length = IXP4XX_DEBUG_UART_REGION_SIZE, | ||
76 | .type = MT_DEVICE | 74 | .type = MT_DEVICE |
77 | } | 75 | }, |
78 | #endif | ||
79 | }; | 76 | }; |
80 | 77 | ||
81 | void __init ixp4xx_map_io(void) | 78 | void __init ixp4xx_map_io(void) |
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index b800a031207c..53b8348dfcc2 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
16 | #include <asm/mach/flash.h> | 16 | #include <asm/mach/flash.h> |
17 | #include <asm/mach/pci.h> | 17 | #include <asm/mach/pci.h> |
18 | #include <asm/system_info.h> | ||
18 | 19 | ||
19 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ | 20 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ |
20 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ | 21 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ |
@@ -329,7 +330,7 @@ static struct platform_device device_hss_tab[] = { | |||
329 | }; | 330 | }; |
330 | 331 | ||
331 | 332 | ||
332 | static struct platform_device *device_tab[6] __initdata = { | 333 | static struct platform_device *device_tab[7] __initdata = { |
333 | &device_flash, /* index 0 */ | 334 | &device_flash, /* index 0 */ |
334 | }; | 335 | }; |
335 | 336 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S index 8c9f8d564492..ff686cbc5df4 100644 --- a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S +++ b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S | |||
@@ -17,8 +17,8 @@ | |||
17 | #else | 17 | #else |
18 | mov \rp, #0 | 18 | mov \rp, #0 |
19 | #endif | 19 | #endif |
20 | orr \rv, \rp, #0xff000000 @ virtual | 20 | orr \rv, \rp, #0xfe000000 @ virtual |
21 | orr \rv, \rv, #0x00b00000 | 21 | orr \rv, \rv, #0x00f00000 |
22 | orr \rp, \rp, #0xc8000000 @ physical | 22 | orr \rp, \rp, #0xc8000000 @ physical |
23 | .endm | 23 | .endm |
24 | 24 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h index eb68b61ce975..c5bae9c035d5 100644 --- a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h +++ b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h | |||
@@ -30,51 +30,43 @@ | |||
30 | * | 30 | * |
31 | * 0x50000000 0x10000000 ioremap'd EXP BUS | 31 | * 0x50000000 0x10000000 ioremap'd EXP BUS |
32 | * | 32 | * |
33 | * 0x6000000 0x00004000 ioremap'd QMgr | 33 | * 0xC8000000 0x00013000 0xFEF00000 On-Chip Peripherals |
34 | * | 34 | * |
35 | * 0xC0000000 0x00001000 0xffbff000 PCI CFG | 35 | * 0xC0000000 0x00001000 0xFEF13000 PCI CFG |
36 | * | 36 | * |
37 | * 0xC4000000 0x00001000 0xffbfe000 EXP CFG | 37 | * 0xC4000000 0x00001000 0xFEF14000 EXP CFG |
38 | * | 38 | * |
39 | * 0xC8000000 0x00013000 0xffbeb000 On-Chip Peripherals | 39 | * 0x60000000 0x00004000 0xFEF15000 QMgr |
40 | */ | 40 | */ |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * Queue Manager | 43 | * Queue Manager |
44 | */ | 44 | */ |
45 | #define IXP4XX_QMGR_BASE_PHYS (0x60000000) | 45 | #define IXP4XX_QMGR_BASE_PHYS 0x60000000 |
46 | #define IXP4XX_QMGR_REGION_SIZE (0x00004000) | 46 | #define IXP4XX_QMGR_BASE_VIRT IOMEM(0xFEF15000) |
47 | #define IXP4XX_QMGR_REGION_SIZE 0x00004000 | ||
47 | 48 | ||
48 | /* | 49 | /* |
49 | * Expansion BUS Configuration registers | 50 | * Peripheral space, including debug UART. Must be section-aligned so that |
51 | * it can be used with the low-level debug code. | ||
50 | */ | 52 | */ |
51 | #define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000) | 53 | #define IXP4XX_PERIPHERAL_BASE_PHYS 0xC8000000 |
52 | #define IXP4XX_EXP_CFG_BASE_VIRT IOMEM(0xFFBFE000) | 54 | #define IXP4XX_PERIPHERAL_BASE_VIRT IOMEM(0xFEF00000) |
53 | #define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000) | 55 | #define IXP4XX_PERIPHERAL_REGION_SIZE 0x00013000 |
54 | 56 | ||
55 | /* | 57 | /* |
56 | * PCI Config registers | 58 | * PCI Config registers |
57 | */ | 59 | */ |
58 | #define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000) | 60 | #define IXP4XX_PCI_CFG_BASE_PHYS 0xC0000000 |
59 | #define IXP4XX_PCI_CFG_BASE_VIRT IOMEM(0xFFBFF000) | 61 | #define IXP4XX_PCI_CFG_BASE_VIRT IOMEM(0xFEF13000) |
60 | #define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000) | 62 | #define IXP4XX_PCI_CFG_REGION_SIZE 0x00001000 |
61 | |||
62 | /* | ||
63 | * Peripheral space | ||
64 | */ | ||
65 | #define IXP4XX_PERIPHERAL_BASE_PHYS (0xC8000000) | ||
66 | #define IXP4XX_PERIPHERAL_BASE_VIRT IOMEM(0xFFBEB000) | ||
67 | #define IXP4XX_PERIPHERAL_REGION_SIZE (0x00013000) | ||
68 | 63 | ||
69 | /* | 64 | /* |
70 | * Debug UART | 65 | * Expansion BUS Configuration registers |
71 | * | ||
72 | * This is basically a remap of UART1 into a region that is section | ||
73 | * aligned so that it * can be used with the low-level debug code. | ||
74 | */ | 66 | */ |
75 | #define IXP4XX_DEBUG_UART_BASE_PHYS (0xC8000000) | 67 | #define IXP4XX_EXP_CFG_BASE_PHYS 0xC4000000 |
76 | #define IXP4XX_DEBUG_UART_BASE_VIRT IOMEM(0xffb00000) | 68 | #define IXP4XX_EXP_CFG_BASE_VIRT 0xFEF14000 |
77 | #define IXP4XX_DEBUG_UART_REGION_SIZE (0x00001000) | 69 | #define IXP4XX_EXP_CFG_REGION_SIZE 0x00001000 |
78 | 70 | ||
79 | #define IXP4XX_EXP_CS0_OFFSET 0x00 | 71 | #define IXP4XX_EXP_CS0_OFFSET 0x00 |
80 | #define IXP4XX_EXP_CS1_OFFSET 0x04 | 72 | #define IXP4XX_EXP_CS1_OFFSET 0x04 |
diff --git a/arch/arm/mach-ixp4xx/include/mach/qmgr.h b/arch/arm/mach-ixp4xx/include/mach/qmgr.h index 9e7cad2d54cb..4de8da536dbb 100644 --- a/arch/arm/mach-ixp4xx/include/mach/qmgr.h +++ b/arch/arm/mach-ixp4xx/include/mach/qmgr.h | |||
@@ -86,7 +86,7 @@ void qmgr_release_queue(unsigned int queue); | |||
86 | 86 | ||
87 | static inline void qmgr_put_entry(unsigned int queue, u32 val) | 87 | static inline void qmgr_put_entry(unsigned int queue, u32 val) |
88 | { | 88 | { |
89 | extern struct qmgr_regs __iomem *qmgr_regs; | 89 | struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
90 | #if DEBUG_QMGR | 90 | #if DEBUG_QMGR |
91 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ | 91 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ |
92 | 92 | ||
@@ -99,7 +99,7 @@ static inline void qmgr_put_entry(unsigned int queue, u32 val) | |||
99 | static inline u32 qmgr_get_entry(unsigned int queue) | 99 | static inline u32 qmgr_get_entry(unsigned int queue) |
100 | { | 100 | { |
101 | u32 val; | 101 | u32 val; |
102 | extern struct qmgr_regs __iomem *qmgr_regs; | 102 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
103 | val = __raw_readl(&qmgr_regs->acc[queue][0]); | 103 | val = __raw_readl(&qmgr_regs->acc[queue][0]); |
104 | #if DEBUG_QMGR | 104 | #if DEBUG_QMGR |
105 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ | 105 | BUG_ON(!qmgr_queue_descs[queue]); /* not yet requested */ |
@@ -112,14 +112,14 @@ static inline u32 qmgr_get_entry(unsigned int queue) | |||
112 | 112 | ||
113 | static inline int __qmgr_get_stat1(unsigned int queue) | 113 | static inline int __qmgr_get_stat1(unsigned int queue) |
114 | { | 114 | { |
115 | extern struct qmgr_regs __iomem *qmgr_regs; | 115 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
116 | return (__raw_readl(&qmgr_regs->stat1[queue >> 3]) | 116 | return (__raw_readl(&qmgr_regs->stat1[queue >> 3]) |
117 | >> ((queue & 7) << 2)) & 0xF; | 117 | >> ((queue & 7) << 2)) & 0xF; |
118 | } | 118 | } |
119 | 119 | ||
120 | static inline int __qmgr_get_stat2(unsigned int queue) | 120 | static inline int __qmgr_get_stat2(unsigned int queue) |
121 | { | 121 | { |
122 | extern struct qmgr_regs __iomem *qmgr_regs; | 122 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
123 | BUG_ON(queue >= HALF_QUEUES); | 123 | BUG_ON(queue >= HALF_QUEUES); |
124 | return (__raw_readl(&qmgr_regs->stat2[queue >> 4]) | 124 | return (__raw_readl(&qmgr_regs->stat2[queue >> 4]) |
125 | >> ((queue & 0xF) << 1)) & 0x3; | 125 | >> ((queue & 0xF) << 1)) & 0x3; |
@@ -145,7 +145,7 @@ static inline int qmgr_stat_empty(unsigned int queue) | |||
145 | */ | 145 | */ |
146 | static inline int qmgr_stat_below_low_watermark(unsigned int queue) | 146 | static inline int qmgr_stat_below_low_watermark(unsigned int queue) |
147 | { | 147 | { |
148 | extern struct qmgr_regs __iomem *qmgr_regs; | 148 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
149 | if (queue >= HALF_QUEUES) | 149 | if (queue >= HALF_QUEUES) |
150 | return (__raw_readl(&qmgr_regs->statne_h) >> | 150 | return (__raw_readl(&qmgr_regs->statne_h) >> |
151 | (queue - HALF_QUEUES)) & 0x01; | 151 | (queue - HALF_QUEUES)) & 0x01; |
@@ -172,7 +172,7 @@ static inline int qmgr_stat_above_high_watermark(unsigned int queue) | |||
172 | */ | 172 | */ |
173 | static inline int qmgr_stat_full(unsigned int queue) | 173 | static inline int qmgr_stat_full(unsigned int queue) |
174 | { | 174 | { |
175 | extern struct qmgr_regs __iomem *qmgr_regs; | 175 | const struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
176 | if (queue >= HALF_QUEUES) | 176 | if (queue >= HALF_QUEUES) |
177 | return (__raw_readl(&qmgr_regs->statf_h) >> | 177 | return (__raw_readl(&qmgr_regs->statf_h) >> |
178 | (queue - HALF_QUEUES)) & 0x01; | 178 | (queue - HALF_QUEUES)) & 0x01; |
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c index a17ed79207a4..d4eb09a62863 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c | |||
@@ -116,7 +116,11 @@ | |||
116 | /* NPE mailbox_status value for reset */ | 116 | /* NPE mailbox_status value for reset */ |
117 | #define RESET_MBOX_STAT 0x0000F0F0 | 117 | #define RESET_MBOX_STAT 0x0000F0F0 |
118 | 118 | ||
119 | const char *npe_names[] = { "NPE-A", "NPE-B", "NPE-C" }; | 119 | #define NPE_A_FIRMWARE "NPE-A" |
120 | #define NPE_B_FIRMWARE "NPE-B" | ||
121 | #define NPE_C_FIRMWARE "NPE-C" | ||
122 | |||
123 | const char *npe_names[] = { NPE_A_FIRMWARE, NPE_B_FIRMWARE, NPE_C_FIRMWARE }; | ||
120 | 124 | ||
121 | #define print_npe(pri, npe, fmt, ...) \ | 125 | #define print_npe(pri, npe, fmt, ...) \ |
122 | printk(pri "%s: " fmt, npe_name(npe), ## __VA_ARGS__) | 126 | printk(pri "%s: " fmt, npe_name(npe), ## __VA_ARGS__) |
@@ -724,6 +728,9 @@ module_exit(npe_cleanup_module); | |||
724 | 728 | ||
725 | MODULE_AUTHOR("Krzysztof Halasa"); | 729 | MODULE_AUTHOR("Krzysztof Halasa"); |
726 | MODULE_LICENSE("GPL v2"); | 730 | MODULE_LICENSE("GPL v2"); |
731 | MODULE_FIRMWARE(NPE_A_FIRMWARE); | ||
732 | MODULE_FIRMWARE(NPE_B_FIRMWARE); | ||
733 | MODULE_FIRMWARE(NPE_C_FIRMWARE); | ||
727 | 734 | ||
728 | EXPORT_SYMBOL(npe_names); | 735 | EXPORT_SYMBOL(npe_names); |
729 | EXPORT_SYMBOL(npe_running); | 736 | EXPORT_SYMBOL(npe_running); |
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c index 852f7c9f87d0..9d1b6b7c394c 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <mach/qmgr.h> | 15 | #include <mach/qmgr.h> |
16 | 16 | ||
17 | struct qmgr_regs __iomem *qmgr_regs; | 17 | static struct qmgr_regs __iomem *qmgr_regs = IXP4XX_QMGR_BASE_VIRT; |
18 | static struct resource *mem_res; | 18 | static struct resource *mem_res; |
19 | static spinlock_t qmgr_lock; | 19 | static spinlock_t qmgr_lock; |
20 | static u32 used_sram_bitmap[4]; /* 128 16-dword pages */ | 20 | static u32 used_sram_bitmap[4]; /* 128 16-dword pages */ |
@@ -293,12 +293,6 @@ static int qmgr_init(void) | |||
293 | if (mem_res == NULL) | 293 | if (mem_res == NULL) |
294 | return -EBUSY; | 294 | return -EBUSY; |
295 | 295 | ||
296 | qmgr_regs = ioremap(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | ||
297 | if (qmgr_regs == NULL) { | ||
298 | err = -ENOMEM; | ||
299 | goto error_map; | ||
300 | } | ||
301 | |||
302 | /* reset qmgr registers */ | 296 | /* reset qmgr registers */ |
303 | for (i = 0; i < 4; i++) { | 297 | for (i = 0; i < 4; i++) { |
304 | __raw_writel(0x33333333, &qmgr_regs->stat1[i]); | 298 | __raw_writel(0x33333333, &qmgr_regs->stat1[i]); |
@@ -347,8 +341,6 @@ static int qmgr_init(void) | |||
347 | error_irq2: | 341 | error_irq2: |
348 | free_irq(IRQ_IXP4XX_QM1, NULL); | 342 | free_irq(IRQ_IXP4XX_QM1, NULL); |
349 | error_irq: | 343 | error_irq: |
350 | iounmap(qmgr_regs); | ||
351 | error_map: | ||
352 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | 344 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); |
353 | return err; | 345 | return err; |
354 | } | 346 | } |
@@ -359,7 +351,6 @@ static void qmgr_remove(void) | |||
359 | free_irq(IRQ_IXP4XX_QM2, NULL); | 351 | free_irq(IRQ_IXP4XX_QM2, NULL); |
360 | synchronize_irq(IRQ_IXP4XX_QM1); | 352 | synchronize_irq(IRQ_IXP4XX_QM1); |
361 | synchronize_irq(IRQ_IXP4XX_QM2); | 353 | synchronize_irq(IRQ_IXP4XX_QM2); |
362 | iounmap(qmgr_regs); | ||
363 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); | 354 | release_mem_region(IXP4XX_QMGR_BASE_PHYS, IXP4XX_QMGR_REGION_SIZE); |
364 | } | 355 | } |
365 | 356 | ||
@@ -369,7 +360,6 @@ module_exit(qmgr_remove); | |||
369 | MODULE_LICENSE("GPL v2"); | 360 | MODULE_LICENSE("GPL v2"); |
370 | MODULE_AUTHOR("Krzysztof Halasa"); | 361 | MODULE_AUTHOR("Krzysztof Halasa"); |
371 | 362 | ||
372 | EXPORT_SYMBOL(qmgr_regs); | ||
373 | EXPORT_SYMBOL(qmgr_set_irq); | 363 | EXPORT_SYMBOL(qmgr_set_irq); |
374 | EXPORT_SYMBOL(qmgr_enable_irq); | 364 | EXPORT_SYMBOL(qmgr_enable_irq); |
375 | EXPORT_SYMBOL(qmgr_disable_irq); | 365 | EXPORT_SYMBOL(qmgr_disable_irq); |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index ec544918b12c..74fc5a074fc4 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -207,14 +207,19 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
207 | return 1; | 207 | return 1; |
208 | } | 208 | } |
209 | 209 | ||
210 | /* | ||
211 | * The root complex has a hardwired class of PCI_CLASS_MEMORY_OTHER, when it | ||
212 | * is operating as a root complex this needs to be switched to | ||
213 | * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on | ||
214 | * the device. Decoding setup is handled by the orion code. | ||
215 | */ | ||
210 | static void __devinit rc_pci_fixup(struct pci_dev *dev) | 216 | static void __devinit rc_pci_fixup(struct pci_dev *dev) |
211 | { | 217 | { |
212 | /* | ||
213 | * Prevent enumeration of root complex. | ||
214 | */ | ||
215 | if (dev->bus->parent == NULL && dev->devfn == 0) { | 218 | if (dev->bus->parent == NULL && dev->devfn == 0) { |
216 | int i; | 219 | int i; |
217 | 220 | ||
221 | dev->class &= 0xff; | ||
222 | dev->class |= PCI_CLASS_BRIDGE_HOST << 8; | ||
218 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | 223 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { |
219 | dev->resource[i].start = 0; | 224 | dev->resource[i].start = 0; |
220 | dev->resource[i].end = 0; | 225 | dev->resource[i].end = 0; |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 86b8b480634f..09c5233f4dfc 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -89,7 +89,7 @@ ENTRY(cpu_v6_dcache_clean_area) | |||
89 | mov pc, lr | 89 | mov pc, lr |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * cpu_arm926_switch_mm(pgd_phys, tsk) | 92 | * cpu_v6_switch_mm(pgd_phys, tsk) |
93 | * | 93 | * |
94 | * Set the translation table base pointer to be pgd_phys | 94 | * Set the translation table base pointer to be pgd_phys |
95 | * | 95 | * |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index db98e7021f0d..0abd1c469887 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -473,12 +473,13 @@ int s3c2410_dma_enqueue(enum dma_ch channel, void *id, | |||
473 | pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", | 473 | pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", |
474 | chan->number, __func__, buf); | 474 | chan->number, __func__, buf); |
475 | 475 | ||
476 | if (chan->end == NULL) | 476 | if (chan->end == NULL) { |
477 | pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", | 477 | pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", |
478 | chan->number, __func__, chan); | 478 | chan->number, __func__, chan); |
479 | 479 | } else { | |
480 | chan->end->next = buf; | 480 | chan->end->next = buf; |
481 | chan->end = buf; | 481 | chan->end = buf; |
482 | } | ||
482 | } | 483 | } |
483 | 484 | ||
484 | /* if necessary, update the next buffer field */ | 485 | /* if necessary, update the next buffer field */ |
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index 6d909faebf28..656a6f291a35 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h | |||
@@ -392,7 +392,7 @@ __SYSCALL(367, sys_fanotify_init) | |||
392 | __SYSCALL(368, compat_sys_fanotify_mark_wrapper) | 392 | __SYSCALL(368, compat_sys_fanotify_mark_wrapper) |
393 | __SYSCALL(369, sys_prlimit64) | 393 | __SYSCALL(369, sys_prlimit64) |
394 | __SYSCALL(370, sys_name_to_handle_at) | 394 | __SYSCALL(370, sys_name_to_handle_at) |
395 | __SYSCALL(371, sys_open_by_handle_at) | 395 | __SYSCALL(371, compat_sys_open_by_handle_at) |
396 | __SYSCALL(372, sys_clock_adjtime) | 396 | __SYSCALL(372, sys_clock_adjtime) |
397 | __SYSCALL(373, sys_syncfs) | 397 | __SYSCALL(373, sys_syncfs) |
398 | 398 | ||
diff --git a/arch/c6x/include/asm/setup.h b/arch/c6x/include/asm/setup.h new file mode 100644 index 000000000000..ecead15872a6 --- /dev/null +++ b/arch/c6x/include/asm/setup.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Port on Texas Instruments TMS320C6x architecture | ||
3 | * | ||
4 | * Copyright (C) 2004, 2009, 2010 2011 Texas Instruments Incorporated | ||
5 | * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _ASM_C6X_SETUP_H | ||
12 | #define _ASM_C6X_SETUP_H | ||
13 | |||
14 | #include <uapi/asm/setup.h> | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | extern char c6x_command_line[COMMAND_LINE_SIZE]; | ||
18 | |||
19 | extern int c6x_add_memory(phys_addr_t start, unsigned long size); | ||
20 | |||
21 | extern unsigned long ram_start; | ||
22 | extern unsigned long ram_end; | ||
23 | |||
24 | extern int c6x_num_cores; | ||
25 | extern unsigned int c6x_silicon_rev; | ||
26 | extern unsigned int c6x_devstat; | ||
27 | extern unsigned char c6x_fuse_mac[6]; | ||
28 | |||
29 | extern void machine_init(unsigned long dt_ptr); | ||
30 | extern void time_init(void); | ||
31 | |||
32 | #endif /* !__ASSEMBLY__ */ | ||
33 | #endif /* _ASM_C6X_SETUP_H */ | ||
diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild index c312b424c433..e9bc2b2b8147 100644 --- a/arch/c6x/include/uapi/asm/Kbuild +++ b/arch/c6x/include/uapi/asm/Kbuild | |||
@@ -1,6 +1,8 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | generic-y += kvm_para.h | ||
5 | |||
4 | header-y += byteorder.h | 6 | header-y += byteorder.h |
5 | header-y += kvm_para.h | 7 | header-y += kvm_para.h |
6 | header-y += ptrace.h | 8 | header-y += ptrace.h |
diff --git a/arch/c6x/include/uapi/asm/kvm_para.h b/arch/c6x/include/uapi/asm/kvm_para.h deleted file mode 100644 index 14fab8f0b957..000000000000 --- a/arch/c6x/include/uapi/asm/kvm_para.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kvm_para.h> | ||
diff --git a/arch/c6x/include/uapi/asm/setup.h b/arch/c6x/include/uapi/asm/setup.h index a01e31896fa9..ad9ac97a8dad 100644 --- a/arch/c6x/include/uapi/asm/setup.h +++ b/arch/c6x/include/uapi/asm/setup.h | |||
@@ -1,33 +1,6 @@ | |||
1 | /* | 1 | #ifndef _UAPI_ASM_C6X_SETUP_H |
2 | * Port on Texas Instruments TMS320C6x architecture | 2 | #define _UAPI_ASM_C6X_SETUP_H |
3 | * | ||
4 | * Copyright (C) 2004, 2009, 2010 2011 Texas Instruments Incorporated | ||
5 | * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _ASM_C6X_SETUP_H | ||
12 | #define _ASM_C6X_SETUP_H | ||
13 | 3 | ||
14 | #define COMMAND_LINE_SIZE 1024 | 4 | #define COMMAND_LINE_SIZE 1024 |
15 | 5 | ||
16 | #ifndef __ASSEMBLY__ | 6 | #endif /* _UAPI_ASM_C6X_SETUP_H */ |
17 | extern char c6x_command_line[COMMAND_LINE_SIZE]; | ||
18 | |||
19 | extern int c6x_add_memory(phys_addr_t start, unsigned long size); | ||
20 | |||
21 | extern unsigned long ram_start; | ||
22 | extern unsigned long ram_end; | ||
23 | |||
24 | extern int c6x_num_cores; | ||
25 | extern unsigned int c6x_silicon_rev; | ||
26 | extern unsigned int c6x_devstat; | ||
27 | extern unsigned char c6x_fuse_mac[6]; | ||
28 | |||
29 | extern void machine_init(unsigned long dt_ptr); | ||
30 | extern void time_init(void); | ||
31 | |||
32 | #endif /* !__ASSEMBLY__ */ | ||
33 | #endif /* _ASM_C6X_SETUP_H */ | ||
diff --git a/arch/c6x/kernel/entry.S b/arch/c6x/kernel/entry.S index 5449c36018fe..0ed6157dd256 100644 --- a/arch/c6x/kernel/entry.S +++ b/arch/c6x/kernel/entry.S | |||
@@ -277,6 +277,8 @@ work_rescheduled: | |||
277 | [A1] BNOP .S1 work_resched,5 | 277 | [A1] BNOP .S1 work_resched,5 |
278 | 278 | ||
279 | work_notifysig: | 279 | work_notifysig: |
280 | ;; enable interrupts for do_notify_resume() | ||
281 | UNMASK_INT B2 | ||
280 | B .S2 do_notify_resume | 282 | B .S2 do_notify_resume |
281 | LDW .D2T1 *+SP(REGS__END+8),A6 ; syscall flag | 283 | LDW .D2T1 *+SP(REGS__END+8),A6 ; syscall flag |
282 | ADDKPC .S2 resume_userspace,B3,1 | 284 | ADDKPC .S2 resume_userspace,B3,1 |
@@ -427,8 +429,7 @@ ENTRY(ret_from_kernel_execve) | |||
427 | ENDPROC(ret_from_kernel_execve) | 429 | ENDPROC(ret_from_kernel_execve) |
428 | 430 | ||
429 | ;; | 431 | ;; |
430 | ;; These are the interrupt handlers, responsible for calling __do_IRQ() | 432 | ;; These are the interrupt handlers, responsible for calling c6x_do_IRQ() |
431 | ;; int6 is used for syscalls (see _system_call entry) | ||
432 | ;; | 433 | ;; |
433 | .macro SAVE_ALL_INT | 434 | .macro SAVE_ALL_INT |
434 | SAVE_ALL IRP,ITSR | 435 | SAVE_ALL IRP,ITSR |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index 3847e5b9c601..3903e3d11f5a 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -111,7 +111,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) | |||
111 | 111 | ||
112 | /* It is more difficult to avoid calling this function than to | 112 | /* It is more difficult to avoid calling this function than to |
113 | call it and ignore errors. */ | 113 | call it and ignore errors. */ |
114 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->r1)) | 114 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->r1) == -EFAULT) |
115 | goto badframe; | 115 | goto badframe; |
116 | 116 | ||
117 | return rval; | 117 | return rval; |
diff --git a/arch/mips/include/asm/hugetlb.h b/arch/mips/include/asm/hugetlb.h index bd94946a18f3..ef99db994c2f 100644 --- a/arch/mips/include/asm/hugetlb.h +++ b/arch/mips/include/asm/hugetlb.h | |||
@@ -95,7 +95,17 @@ static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, | |||
95 | pte_t *ptep, pte_t pte, | 95 | pte_t *ptep, pte_t pte, |
96 | int dirty) | 96 | int dirty) |
97 | { | 97 | { |
98 | return ptep_set_access_flags(vma, addr, ptep, pte, dirty); | 98 | int changed = !pte_same(*ptep, pte); |
99 | |||
100 | if (changed) { | ||
101 | set_pte_at(vma->vm_mm, addr, ptep, pte); | ||
102 | /* | ||
103 | * There could be some standard sized pages in there, | ||
104 | * get them all. | ||
105 | */ | ||
106 | flush_tlb_range(vma, addr, addr + HPAGE_SIZE); | ||
107 | } | ||
108 | return changed; | ||
99 | } | 109 | } |
100 | 110 | ||
101 | static inline pte_t huge_ptep_get(pte_t *ptep) | 111 | static inline pte_t huge_ptep_get(pte_t *ptep) |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index b1fb7af3c350..cce3782c96c9 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -510,7 +510,6 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
510 | c->cputype = CPU_R3000A; | 510 | c->cputype = CPU_R3000A; |
511 | __cpu_name[cpu] = "R3000A"; | 511 | __cpu_name[cpu] = "R3000A"; |
512 | } | 512 | } |
513 | break; | ||
514 | } else { | 513 | } else { |
515 | c->cputype = CPU_R3000; | 514 | c->cputype = CPU_R3000; |
516 | __cpu_name[cpu] = "R3000"; | 515 | __cpu_name[cpu] = "R3000"; |
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index a6c133212003..9b00362f32f6 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S | |||
@@ -36,6 +36,11 @@ FEXPORT(ret_from_exception) | |||
36 | FEXPORT(ret_from_irq) | 36 | FEXPORT(ret_from_irq) |
37 | LONG_S s0, TI_REGS($28) | 37 | LONG_S s0, TI_REGS($28) |
38 | FEXPORT(__ret_from_irq) | 38 | FEXPORT(__ret_from_irq) |
39 | /* | ||
40 | * We can be coming here from a syscall done in the kernel space, | ||
41 | * e.g. a failed kernel_execve(). | ||
42 | */ | ||
43 | resume_userspace_check: | ||
39 | LONG_L t0, PT_STATUS(sp) # returning to kernel mode? | 44 | LONG_L t0, PT_STATUS(sp) # returning to kernel mode? |
40 | andi t0, t0, KU_USER | 45 | andi t0, t0, KU_USER |
41 | beqz t0, resume_kernel | 46 | beqz t0, resume_kernel |
@@ -162,7 +167,7 @@ work_notifysig: # deal with pending signals and | |||
162 | move a0, sp | 167 | move a0, sp |
163 | li a1, 0 | 168 | li a1, 0 |
164 | jal do_notify_resume # a2 already loaded | 169 | jal do_notify_resume # a2 already loaded |
165 | j resume_userspace | 170 | j resume_userspace_check |
166 | 171 | ||
167 | FEXPORT(syscall_exit_partial) | 172 | FEXPORT(syscall_exit_partial) |
168 | local_irq_disable # make sure need_resched doesn't | 173 | local_irq_disable # make sure need_resched doesn't |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index f6ba8381ee01..86ec03f0e00c 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -397,14 +397,14 @@ EXPORT(sysn32_call_table) | |||
397 | PTR sys_timerfd_create | 397 | PTR sys_timerfd_create |
398 | PTR compat_sys_timerfd_gettime /* 6285 */ | 398 | PTR compat_sys_timerfd_gettime /* 6285 */ |
399 | PTR compat_sys_timerfd_settime | 399 | PTR compat_sys_timerfd_settime |
400 | PTR sys_signalfd4 | 400 | PTR compat_sys_signalfd4 |
401 | PTR sys_eventfd2 | 401 | PTR sys_eventfd2 |
402 | PTR sys_epoll_create1 | 402 | PTR sys_epoll_create1 |
403 | PTR sys_dup3 /* 6290 */ | 403 | PTR sys_dup3 /* 6290 */ |
404 | PTR sys_pipe2 | 404 | PTR sys_pipe2 |
405 | PTR sys_inotify_init1 | 405 | PTR sys_inotify_init1 |
406 | PTR sys_preadv | 406 | PTR compat_sys_preadv |
407 | PTR sys_pwritev | 407 | PTR compat_sys_pwritev |
408 | PTR compat_sys_rt_tgsigqueueinfo /* 6295 */ | 408 | PTR compat_sys_rt_tgsigqueueinfo /* 6295 */ |
409 | PTR sys_perf_event_open | 409 | PTR sys_perf_event_open |
410 | PTR sys_accept4 | 410 | PTR sys_accept4 |
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 4b9b935a070e..88e79ad6f811 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -120,18 +120,11 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
120 | 120 | ||
121 | if (cpu_context(cpu, mm) != 0) { | 121 | if (cpu_context(cpu, mm) != 0) { |
122 | unsigned long size, flags; | 122 | unsigned long size, flags; |
123 | int huge = is_vm_hugetlb_page(vma); | ||
124 | 123 | ||
125 | ENTER_CRITICAL(flags); | 124 | ENTER_CRITICAL(flags); |
126 | if (huge) { | 125 | start = round_down(start, PAGE_SIZE << 1); |
127 | start = round_down(start, HPAGE_SIZE); | 126 | end = round_up(end, PAGE_SIZE << 1); |
128 | end = round_up(end, HPAGE_SIZE); | 127 | size = (end - start) >> (PAGE_SHIFT + 1); |
129 | size = (end - start) >> HPAGE_SHIFT; | ||
130 | } else { | ||
131 | start = round_down(start, PAGE_SIZE << 1); | ||
132 | end = round_up(end, PAGE_SIZE << 1); | ||
133 | size = (end - start) >> (PAGE_SHIFT + 1); | ||
134 | } | ||
135 | if (size <= current_cpu_data.tlbsize/2) { | 128 | if (size <= current_cpu_data.tlbsize/2) { |
136 | int oldpid = read_c0_entryhi(); | 129 | int oldpid = read_c0_entryhi(); |
137 | int newpid = cpu_asid(cpu, mm); | 130 | int newpid = cpu_asid(cpu, mm); |
@@ -140,10 +133,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
140 | int idx; | 133 | int idx; |
141 | 134 | ||
142 | write_c0_entryhi(start | newpid); | 135 | write_c0_entryhi(start | newpid); |
143 | if (huge) | 136 | start += (PAGE_SIZE << 1); |
144 | start += HPAGE_SIZE; | ||
145 | else | ||
146 | start += (PAGE_SIZE << 1); | ||
147 | mtc0_tlbw_hazard(); | 137 | mtc0_tlbw_hazard(); |
148 | tlb_probe(); | 138 | tlb_probe(); |
149 | tlb_probe_hazard(); | 139 | tlb_probe_hazard(); |
diff --git a/arch/openrisc/kernel/signal.c b/arch/openrisc/kernel/signal.c index 30110297f4f9..ddedc8a77861 100644 --- a/arch/openrisc/kernel/signal.c +++ b/arch/openrisc/kernel/signal.c | |||
@@ -84,7 +84,6 @@ asmlinkage long _sys_rt_sigreturn(struct pt_regs *regs) | |||
84 | { | 84 | { |
85 | struct rt_sigframe *frame = (struct rt_sigframe __user *)regs->sp; | 85 | struct rt_sigframe *frame = (struct rt_sigframe __user *)regs->sp; |
86 | sigset_t set; | 86 | sigset_t set; |
87 | stack_t st; | ||
88 | 87 | ||
89 | /* | 88 | /* |
90 | * Since we stacked the signal on a dword boundary, | 89 | * Since we stacked the signal on a dword boundary, |
@@ -104,11 +103,10 @@ asmlinkage long _sys_rt_sigreturn(struct pt_regs *regs) | |||
104 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) | 103 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) |
105 | goto badframe; | 104 | goto badframe; |
106 | 105 | ||
107 | if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) | ||
108 | goto badframe; | ||
109 | /* It is more difficult to avoid calling this function than to | 106 | /* It is more difficult to avoid calling this function than to |
110 | call it and ignore errors. */ | 107 | call it and ignore errors. */ |
111 | do_sigaltstack(&st, NULL, regs->sp); | 108 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->sp) == -EFAULT) |
109 | goto badframe; | ||
112 | 110 | ||
113 | return regs->gpr[11]; | 111 | return regs->gpr[11]; |
114 | 112 | ||
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 3735abd7f8f6..cbf5d59d5d6a 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -60,7 +60,7 @@ | |||
60 | ENTRY_SAME(fork_wrapper) | 60 | ENTRY_SAME(fork_wrapper) |
61 | ENTRY_SAME(read) | 61 | ENTRY_SAME(read) |
62 | ENTRY_SAME(write) | 62 | ENTRY_SAME(write) |
63 | ENTRY_SAME(open) /* 5 */ | 63 | ENTRY_COMP(open) /* 5 */ |
64 | ENTRY_SAME(close) | 64 | ENTRY_SAME(close) |
65 | ENTRY_SAME(waitpid) | 65 | ENTRY_SAME(waitpid) |
66 | ENTRY_SAME(creat) | 66 | ENTRY_SAME(creat) |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index ad79b846535c..827e094a2f49 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -28,7 +28,7 @@ ENTRY(sys32_open_wrapper) | |||
28 | llgtr %r2,%r2 # const char * | 28 | llgtr %r2,%r2 # const char * |
29 | lgfr %r3,%r3 # int | 29 | lgfr %r3,%r3 # int |
30 | lgfr %r4,%r4 # int | 30 | lgfr %r4,%r4 # int |
31 | jg sys_open # branch to system call | 31 | jg compat_sys_open # branch to system call |
32 | 32 | ||
33 | ENTRY(sys32_close_wrapper) | 33 | ENTRY(sys32_close_wrapper) |
34 | llgfr %r2,%r2 # unsigned int | 34 | llgfr %r2,%r2 # unsigned int |
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c index c268bbf8b410..02353bde92d8 100644 --- a/arch/score/kernel/signal.c +++ b/arch/score/kernel/signal.c | |||
@@ -148,7 +148,6 @@ score_rt_sigreturn(struct pt_regs *regs) | |||
148 | { | 148 | { |
149 | struct rt_sigframe __user *frame; | 149 | struct rt_sigframe __user *frame; |
150 | sigset_t set; | 150 | sigset_t set; |
151 | stack_t st; | ||
152 | int sig; | 151 | int sig; |
153 | 152 | ||
154 | /* Always make any pending restarted system calls return -EINTR */ | 153 | /* Always make any pending restarted system calls return -EINTR */ |
@@ -168,12 +167,10 @@ score_rt_sigreturn(struct pt_regs *regs) | |||
168 | else if (sig) | 167 | else if (sig) |
169 | force_sig(sig, current); | 168 | force_sig(sig, current); |
170 | 169 | ||
171 | if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st))) | ||
172 | goto badframe; | ||
173 | |||
174 | /* It is more difficult to avoid calling this function than to | 170 | /* It is more difficult to avoid calling this function than to |
175 | call it and ignore errors. */ | 171 | call it and ignore errors. */ |
176 | do_sigaltstack((stack_t __user *)&st, NULL, regs->regs[0]); | 172 | if (do_sigaltstack(&frame->rs_uc.uc_stack, NULL, regs->regs[0]) == -EFAULT) |
173 | goto badframe; | ||
177 | regs->is_syscall = 0; | 174 | regs->is_syscall = 0; |
178 | 175 | ||
179 | __asm__ __volatile__( | 176 | __asm__ __volatile__( |
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c index 23853814bd17..d867cd95a622 100644 --- a/arch/sh/kernel/signal_64.c +++ b/arch/sh/kernel/signal_64.c | |||
@@ -347,7 +347,6 @@ asmlinkage int sys_rt_sigreturn(unsigned long r2, unsigned long r3, | |||
347 | { | 347 | { |
348 | struct rt_sigframe __user *frame = (struct rt_sigframe __user *) (long) REF_REG_SP; | 348 | struct rt_sigframe __user *frame = (struct rt_sigframe __user *) (long) REF_REG_SP; |
349 | sigset_t set; | 349 | sigset_t set; |
350 | stack_t __user st; | ||
351 | long long ret; | 350 | long long ret; |
352 | 351 | ||
353 | /* Always make any pending restarted system calls return -EINTR */ | 352 | /* Always make any pending restarted system calls return -EINTR */ |
@@ -365,11 +364,10 @@ asmlinkage int sys_rt_sigreturn(unsigned long r2, unsigned long r3, | |||
365 | goto badframe; | 364 | goto badframe; |
366 | regs->pc -= 4; | 365 | regs->pc -= 4; |
367 | 366 | ||
368 | if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) | ||
369 | goto badframe; | ||
370 | /* It is more difficult to avoid calling this function than to | 367 | /* It is more difficult to avoid calling this function than to |
371 | call it and ignore errors. */ | 368 | call it and ignore errors. */ |
372 | do_sigaltstack(&st, NULL, REF_REG_SP); | 369 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, REF_REG_SP) == -EFAULT) |
370 | goto badframe; | ||
373 | 371 | ||
374 | return (int) ret; | 372 | return (int) ret; |
375 | 373 | ||
diff --git a/arch/sparc/boot/piggyback.c b/arch/sparc/boot/piggyback.c index c0a798fcf030..bb7c95161d71 100644 --- a/arch/sparc/boot/piggyback.c +++ b/arch/sparc/boot/piggyback.c | |||
@@ -81,18 +81,18 @@ static void usage(void) | |||
81 | 81 | ||
82 | static int start_line(const char *line) | 82 | static int start_line(const char *line) |
83 | { | 83 | { |
84 | if (strcmp(line + 8, " T _start\n") == 0) | 84 | if (strcmp(line + 10, " _start\n") == 0) |
85 | return 1; | 85 | return 1; |
86 | else if (strcmp(line + 16, " T _start\n") == 0) | 86 | else if (strcmp(line + 18, " _start\n") == 0) |
87 | return 1; | 87 | return 1; |
88 | return 0; | 88 | return 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | static int end_line(const char *line) | 91 | static int end_line(const char *line) |
92 | { | 92 | { |
93 | if (strcmp(line + 8, " A _end\n") == 0) | 93 | if (strcmp(line + 10, " _end\n") == 0) |
94 | return 1; | 94 | return 1; |
95 | else if (strcmp (line + 16, " A _end\n") == 0) | 95 | else if (strcmp (line + 18, " _end\n") == 0) |
96 | return 1; | 96 | return 1; |
97 | return 0; | 97 | return 0; |
98 | } | 98 | } |
@@ -100,8 +100,8 @@ static int end_line(const char *line) | |||
100 | /* | 100 | /* |
101 | * Find address for start and end in System.map. | 101 | * Find address for start and end in System.map. |
102 | * The file looks like this: | 102 | * The file looks like this: |
103 | * f0004000 T _start | 103 | * f0004000 ... _start |
104 | * f0379f79 A _end | 104 | * f0379f79 ... _end |
105 | * 1234567890123456 | 105 | * 1234567890123456 |
106 | * ^coloumn 1 | 106 | * ^coloumn 1 |
107 | * There is support for 64 bit addresses too. | 107 | * There is support for 64 bit addresses too. |
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S index 44025f4ba41f..8475a474273a 100644 --- a/arch/sparc/kernel/sys32.S +++ b/arch/sparc/kernel/sys32.S | |||
@@ -47,7 +47,7 @@ STUB: sra REG1, 0, REG1; \ | |||
47 | sra REG4, 0, REG4 | 47 | sra REG4, 0, REG4 |
48 | 48 | ||
49 | SIGN1(sys32_exit, sparc_exit, %o0) | 49 | SIGN1(sys32_exit, sparc_exit, %o0) |
50 | SIGN1(sys32_exit_group, sys_exit_group, %o0) | 50 | SIGN1(sys32_exit_group, sparc_exit_group, %o0) |
51 | SIGN1(sys32_wait4, compat_sys_wait4, %o2) | 51 | SIGN1(sys32_wait4, compat_sys_wait4, %o2) |
52 | SIGN1(sys32_creat, sys_creat, %o1) | 52 | SIGN1(sys32_creat, sys_creat, %o1) |
53 | SIGN1(sys32_mknod, sys_mknod, %o1) | 53 | SIGN1(sys32_mknod, sys_mknod, %o1) |
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S index 7f5f65d0b3fd..bf2347794e33 100644 --- a/arch/sparc/kernel/syscalls.S +++ b/arch/sparc/kernel/syscalls.S | |||
@@ -118,10 +118,20 @@ ret_from_syscall: | |||
118 | ba,pt %xcc, ret_sys_call | 118 | ba,pt %xcc, ret_sys_call |
119 | ldx [%sp + PTREGS_OFF + PT_V9_I0], %o0 | 119 | ldx [%sp + PTREGS_OFF + PT_V9_I0], %o0 |
120 | 120 | ||
121 | .globl sparc_exit_group | ||
122 | .type sparc_exit_group,#function | ||
123 | sparc_exit_group: | ||
124 | sethi %hi(sys_exit_group), %g7 | ||
125 | ba,pt %xcc, 1f | ||
126 | or %g7, %lo(sys_exit_group), %g7 | ||
127 | .size sparc_exit_group,.-sparc_exit_group | ||
128 | |||
121 | .globl sparc_exit | 129 | .globl sparc_exit |
122 | .type sparc_exit,#function | 130 | .type sparc_exit,#function |
123 | sparc_exit: | 131 | sparc_exit: |
124 | rdpr %pstate, %g2 | 132 | sethi %hi(sys_exit), %g7 |
133 | or %g7, %lo(sys_exit), %g7 | ||
134 | 1: rdpr %pstate, %g2 | ||
125 | wrpr %g2, PSTATE_IE, %pstate | 135 | wrpr %g2, PSTATE_IE, %pstate |
126 | rdpr %otherwin, %g1 | 136 | rdpr %otherwin, %g1 |
127 | rdpr %cansave, %g3 | 137 | rdpr %cansave, %g3 |
@@ -129,7 +139,7 @@ sparc_exit: | |||
129 | wrpr %g3, 0x0, %cansave | 139 | wrpr %g3, 0x0, %cansave |
130 | wrpr %g0, 0x0, %otherwin | 140 | wrpr %g0, 0x0, %otherwin |
131 | wrpr %g2, 0x0, %pstate | 141 | wrpr %g2, 0x0, %pstate |
132 | ba,pt %xcc, sys_exit | 142 | jmpl %g7, %g0 |
133 | stb %g0, [%g6 + TI_WSAVED] | 143 | stb %g0, [%g6 + TI_WSAVED] |
134 | .size sparc_exit,.-sparc_exit | 144 | .size sparc_exit,.-sparc_exit |
135 | 145 | ||
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 1c9af9fa38e9..017b74a63dcb 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -133,7 +133,7 @@ sys_call_table: | |||
133 | /*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys_getdents | 133 | /*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys_getdents |
134 | .word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr | 134 | .word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr |
135 | /*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall | 135 | /*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall |
136 | .word sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname | 136 | .word sys_setpgid, sys_fremovexattr, sys_tkill, sparc_exit_group, sys_newuname |
137 | /*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl | 137 | /*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl |
138 | .word sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_nis_syscall, sys_sgetmask | 138 | .word sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_nis_syscall, sys_sgetmask |
139 | /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall | 139 | /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall |
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 3a8ece7d09ca..0d7103c9eff3 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -32,13 +32,14 @@ void flush_thread(void) | |||
32 | "err = %d\n", ret); | 32 | "err = %d\n", ret); |
33 | force_sig(SIGKILL, current); | 33 | force_sig(SIGKILL, current); |
34 | } | 34 | } |
35 | get_safe_registers(current_pt_regs()->regs.gp, | ||
36 | current_pt_regs()->regs.fp); | ||
35 | 37 | ||
36 | __switch_mm(¤t->mm->context.id); | 38 | __switch_mm(¤t->mm->context.id); |
37 | } | 39 | } |
38 | 40 | ||
39 | void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) | 41 | void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) |
40 | { | 42 | { |
41 | get_safe_registers(regs->regs.gp, regs->regs.fp); | ||
42 | PT_REGS_IP(regs) = eip; | 43 | PT_REGS_IP(regs) = eip; |
43 | PT_REGS_SP(regs) = esp; | 44 | PT_REGS_SP(regs) = esp; |
44 | current->ptrace &= ~PT_DTRACE; | 45 | current->ptrace &= ~PT_DTRACE; |
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index 66e5f0ef0523..79fd8a3418f9 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild | |||
@@ -12,6 +12,7 @@ header-y += mce.h | |||
12 | header-y += msr-index.h | 12 | header-y += msr-index.h |
13 | header-y += msr.h | 13 | header-y += msr.h |
14 | header-y += mtrr.h | 14 | header-y += mtrr.h |
15 | header-y += perf_regs.h | ||
15 | header-y += posix_types_32.h | 16 | header-y += posix_types_32.h |
16 | header-y += posix_types_64.h | 17 | header-y += posix_types_64.h |
17 | header-y += posix_types_x32.h | 18 | header-y += posix_types_x32.h |
@@ -19,8 +20,10 @@ header-y += prctl.h | |||
19 | header-y += processor-flags.h | 20 | header-y += processor-flags.h |
20 | header-y += ptrace-abi.h | 21 | header-y += ptrace-abi.h |
21 | header-y += sigcontext32.h | 22 | header-y += sigcontext32.h |
23 | header-y += svm.h | ||
22 | header-y += ucontext.h | 24 | header-y += ucontext.h |
23 | header-y += vm86.h | 25 | header-y += vm86.h |
26 | header-y += vmx.h | ||
24 | header-y += vsyscall.h | 27 | header-y += vsyscall.h |
25 | 28 | ||
26 | genhdr-y += unistd_32.h | 29 | genhdr-y += unistd_32.h |
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 831dbb9c6c02..41ab26ea6564 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h | |||
@@ -399,14 +399,17 @@ static inline void drop_init_fpu(struct task_struct *tsk) | |||
399 | typedef struct { int preload; } fpu_switch_t; | 399 | typedef struct { int preload; } fpu_switch_t; |
400 | 400 | ||
401 | /* | 401 | /* |
402 | * FIXME! We could do a totally lazy restore, but we need to | 402 | * Must be run with preemption disabled: this clears the fpu_owner_task, |
403 | * add a per-cpu "this was the task that last touched the FPU | 403 | * on this CPU. |
404 | * on this CPU" variable, and the task needs to have a "I last | ||
405 | * touched the FPU on this CPU" and check them. | ||
406 | * | 404 | * |
407 | * We don't do that yet, so "fpu_lazy_restore()" always returns | 405 | * This will disable any lazy FPU state restore of the current FPU state, |
408 | * false, but some day.. | 406 | * but if the current thread owns the FPU, it will still be saved by. |
409 | */ | 407 | */ |
408 | static inline void __cpu_disable_lazy_restore(unsigned int cpu) | ||
409 | { | ||
410 | per_cpu(fpu_owner_task, cpu) = NULL; | ||
411 | } | ||
412 | |||
410 | static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu) | 413 | static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu) |
411 | { | 414 | { |
412 | return new == this_cpu_read_stable(fpu_owner_task) && | 415 | return new == this_cpu_read_stable(fpu_owner_task) && |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 957a47aec64e..4dac2f68ed4a 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -292,8 +292,8 @@ default_entry: | |||
292 | * be using the global pages. | 292 | * be using the global pages. |
293 | * | 293 | * |
294 | * NOTE! If we are on a 486 we may have no cr4 at all! | 294 | * NOTE! If we are on a 486 we may have no cr4 at all! |
295 | * Specifically, cr4 exists if and only if CPUID exists, | 295 | * Specifically, cr4 exists if and only if CPUID exists |
296 | * which in turn exists if and only if EFLAGS.ID exists. | 296 | * and has flags other than the FPU flag set. |
297 | */ | 297 | */ |
298 | movl $X86_EFLAGS_ID,%ecx | 298 | movl $X86_EFLAGS_ID,%ecx |
299 | pushl %ecx | 299 | pushl %ecx |
@@ -308,6 +308,11 @@ default_entry: | |||
308 | testl %ecx,%eax | 308 | testl %ecx,%eax |
309 | jz 6f # No ID flag = no CPUID = no CR4 | 309 | jz 6f # No ID flag = no CPUID = no CR4 |
310 | 310 | ||
311 | movl $1,%eax | ||
312 | cpuid | ||
313 | andl $~1,%edx # Ignore CPUID.FPU | ||
314 | jz 6f # No flags or only CPUID.FPU = no CR4 | ||
315 | |||
311 | movl pa(mmu_cr4_features),%eax | 316 | movl pa(mmu_cr4_features),%eax |
312 | movl %eax,%cr4 | 317 | movl %eax,%cr4 |
313 | 318 | ||
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 5e0596b0632e..974b67e46dd0 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -1541,6 +1541,13 @@ void syscall_trace_leave(struct pt_regs *regs) | |||
1541 | { | 1541 | { |
1542 | bool step; | 1542 | bool step; |
1543 | 1543 | ||
1544 | /* | ||
1545 | * We may come here right after calling schedule_user() | ||
1546 | * or do_notify_resume(), in which case we can be in RCU | ||
1547 | * user mode. | ||
1548 | */ | ||
1549 | rcu_user_exit(); | ||
1550 | |||
1544 | audit_syscall_exit(regs); | 1551 | audit_syscall_exit(regs); |
1545 | 1552 | ||
1546 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | 1553 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index c80a33bc528b..f3e2ec878b8c 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -68,6 +68,8 @@ | |||
68 | #include <asm/mwait.h> | 68 | #include <asm/mwait.h> |
69 | #include <asm/apic.h> | 69 | #include <asm/apic.h> |
70 | #include <asm/io_apic.h> | 70 | #include <asm/io_apic.h> |
71 | #include <asm/i387.h> | ||
72 | #include <asm/fpu-internal.h> | ||
71 | #include <asm/setup.h> | 73 | #include <asm/setup.h> |
72 | #include <asm/uv/uv.h> | 74 | #include <asm/uv/uv.h> |
73 | #include <linux/mc146818rtc.h> | 75 | #include <linux/mc146818rtc.h> |
@@ -818,6 +820,9 @@ int __cpuinit native_cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
818 | 820 | ||
819 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; | 821 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; |
820 | 822 | ||
823 | /* the FPU context is blank, nobody can own it */ | ||
824 | __cpu_disable_lazy_restore(cpu); | ||
825 | |||
821 | err = do_boot_cpu(apicid, cpu, tidle); | 826 | err = do_boot_cpu(apicid, cpu, tidle); |
822 | if (err) { | 827 | if (err) { |
823 | pr_debug("do_boot_cpu failed %d\n", err); | 828 | pr_debug("do_boot_cpu failed %d\n", err); |
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 39171cb307ea..bba39bfa1c4b 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -426,8 +426,7 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt) | |||
426 | _ASM_EXTABLE(1b, 3b) \ | 426 | _ASM_EXTABLE(1b, 3b) \ |
427 | : "=m" ((ctxt)->eflags), "=&r" (_tmp), \ | 427 | : "=m" ((ctxt)->eflags), "=&r" (_tmp), \ |
428 | "+a" (*rax), "+d" (*rdx), "+qm"(_ex) \ | 428 | "+a" (*rax), "+d" (*rdx), "+qm"(_ex) \ |
429 | : "i" (EFLAGS_MASK), "m" ((ctxt)->src.val), \ | 429 | : "i" (EFLAGS_MASK), "m" ((ctxt)->src.val)); \ |
430 | "a" (*rax), "d" (*rdx)); \ | ||
431 | } while (0) | 430 | } while (0) |
432 | 431 | ||
433 | /* instruction has only one source operand, destination is implicit (e.g. mul, div, imul, idiv) */ | 432 | /* instruction has only one source operand, destination is implicit (e.g. mul, div, imul, idiv) */ |