diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-04 07:46:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-04 07:46:21 -0500 |
commit | df5450d51945b4a1a506200e11267626a6d324e3 (patch) | |
tree | e9348b02855e213cbfee382cd1a4d8c902e7f06e /arch | |
parent | d8658bca2e5696df2b6c69bc5538f8fe54e4a01e (diff) | |
parent | b69f0859dc8e633c5d8c06845811588fe17e68b3 (diff) |
Merge tag 'v3.7-rc8' into staging/for_v3.8
Linux 3.7-rc8
* tag 'v3.7-rc8': (112 commits)
Linux 3.7-rc8
[parisc] open(2) compat bug
Revert "sched, autogroup: Stop going ahead if autogroup is disabled"
open*(2) compat fixes (s390, arm64)
8139cp: fix coherent mapping leak in error path.
tcp: fix crashes in do_tcp_sendpages()
workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay
workqueue: exit rescuer_thread() as TASK_RUNNING
x86, fpu: Avoid FPU lazy restore after suspend
drivers/rtc/rtc-tps65910.c: fix invalid pointer access on _remove()
mm: soft offline: split thp at the beginning of soft_offline_page()
mm: avoid waking kswapd for THP allocations when compaction is deferred or contended
revert "Revert "mm: remove __GFP_NO_KSWAPD""
mm: vmscan: fix endless loop in kswapd balancing
mm/vmemmap: fix wrong use of virt_to_page
mm: compaction: fix return value of capture_free_page()
fix off-by-one in argument passed by iterate_fd() to callbacks
lookup_one_len: don't accept . and ..
cifs: get rid of blind d_drop() in readdir
nfs_lookup_revalidate(): fix a leak
...
Diffstat (limited to 'arch')
33 files changed, 158 insertions, 127 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/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/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/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/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) */ |