diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-11-07 11:34:46 -0500 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-11-07 11:34:46 -0500 |
commit | b5480950c6cbb7b07ab1c1a5af0dc661a1cb6f24 (patch) | |
tree | b5fcb00387a838beb2bcf2f8ed2fd3d6d460c8ae /arch | |
parent | e363bbac316ffb5daaf45d855f82680148cafe20 (diff) | |
parent | 355e62f5ad12b005c862838156262eb2df2f8dff (diff) |
Merge remote-tracking branch 'grant/devicetree/next' into for-next
Diffstat (limited to 'arch')
151 files changed, 951 insertions, 626 deletions
diff --git a/arch/arc/include/asm/spinlock.h b/arch/arc/include/asm/spinlock.h index f158197ac5b0..b6a8c2dfbe6e 100644 --- a/arch/arc/include/asm/spinlock.h +++ b/arch/arc/include/asm/spinlock.h | |||
@@ -45,7 +45,14 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock) | |||
45 | 45 | ||
46 | static inline void arch_spin_unlock(arch_spinlock_t *lock) | 46 | static inline void arch_spin_unlock(arch_spinlock_t *lock) |
47 | { | 47 | { |
48 | lock->slock = __ARCH_SPIN_LOCK_UNLOCKED__; | 48 | unsigned int tmp = __ARCH_SPIN_LOCK_UNLOCKED__; |
49 | |||
50 | __asm__ __volatile__( | ||
51 | " ex %0, [%1] \n" | ||
52 | : "+r" (tmp) | ||
53 | : "r"(&(lock->slock)) | ||
54 | : "memory"); | ||
55 | |||
49 | smp_mb(); | 56 | smp_mb(); |
50 | } | 57 | } |
51 | 58 | ||
diff --git a/arch/arc/include/asm/uaccess.h b/arch/arc/include/asm/uaccess.h index 32420824375b..30c9baffa96f 100644 --- a/arch/arc/include/asm/uaccess.h +++ b/arch/arc/include/asm/uaccess.h | |||
@@ -43,7 +43,7 @@ | |||
43 | * Because it essentially checks if buffer end is within limit and @len is | 43 | * Because it essentially checks if buffer end is within limit and @len is |
44 | * non-ngeative, which implies that buffer start will be within limit too. | 44 | * non-ngeative, which implies that buffer start will be within limit too. |
45 | * | 45 | * |
46 | * The reason for rewriting being, for majorit yof cases, @len is generally | 46 | * The reason for rewriting being, for majority of cases, @len is generally |
47 | * compile time constant, causing first sub-expression to be compile time | 47 | * compile time constant, causing first sub-expression to be compile time |
48 | * subsumed. | 48 | * subsumed. |
49 | * | 49 | * |
@@ -53,7 +53,7 @@ | |||
53 | * | 53 | * |
54 | */ | 54 | */ |
55 | #define __user_ok(addr, sz) (((sz) <= TASK_SIZE) && \ | 55 | #define __user_ok(addr, sz) (((sz) <= TASK_SIZE) && \ |
56 | (((addr)+(sz)) <= get_fs())) | 56 | ((addr) <= (get_fs() - (sz)))) |
57 | #define __access_ok(addr, sz) (unlikely(__kernel_ok) || \ | 57 | #define __access_ok(addr, sz) (unlikely(__kernel_ok) || \ |
58 | likely(__user_ok((addr), (sz)))) | 58 | likely(__user_ok((addr), (sz)))) |
59 | 59 | ||
diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c index 333238564b67..5d76706139dd 100644 --- a/arch/arc/kernel/ptrace.c +++ b/arch/arc/kernel/ptrace.c | |||
@@ -102,7 +102,7 @@ static int genregs_set(struct task_struct *target, | |||
102 | REG_IGNORE_ONE(pad2); | 102 | REG_IGNORE_ONE(pad2); |
103 | REG_IN_CHUNK(callee, efa, cregs); /* callee_regs[r25..r13] */ | 103 | REG_IN_CHUNK(callee, efa, cregs); /* callee_regs[r25..r13] */ |
104 | REG_IGNORE_ONE(efa); /* efa update invalid */ | 104 | REG_IGNORE_ONE(efa); /* efa update invalid */ |
105 | REG_IN_ONE(stop_pc, &ptregs->ret); /* stop_pc: PC update */ | 105 | REG_IGNORE_ONE(stop_pc); /* PC updated via @ret */ |
106 | 106 | ||
107 | return ret; | 107 | return ret; |
108 | } | 108 | } |
diff --git a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c index ee6ef2f60a28..7e95e1a86510 100644 --- a/arch/arc/kernel/signal.c +++ b/arch/arc/kernel/signal.c | |||
@@ -101,7 +101,6 @@ SYSCALL_DEFINE0(rt_sigreturn) | |||
101 | { | 101 | { |
102 | struct rt_sigframe __user *sf; | 102 | struct rt_sigframe __user *sf; |
103 | unsigned int magic; | 103 | unsigned int magic; |
104 | int err; | ||
105 | struct pt_regs *regs = current_pt_regs(); | 104 | struct pt_regs *regs = current_pt_regs(); |
106 | 105 | ||
107 | /* Always make any pending restarted system calls return -EINTR */ | 106 | /* Always make any pending restarted system calls return -EINTR */ |
@@ -119,15 +118,16 @@ SYSCALL_DEFINE0(rt_sigreturn) | |||
119 | if (!access_ok(VERIFY_READ, sf, sizeof(*sf))) | 118 | if (!access_ok(VERIFY_READ, sf, sizeof(*sf))) |
120 | goto badframe; | 119 | goto badframe; |
121 | 120 | ||
122 | err = restore_usr_regs(regs, sf); | 121 | if (__get_user(magic, &sf->sigret_magic)) |
123 | err |= __get_user(magic, &sf->sigret_magic); | ||
124 | if (err) | ||
125 | goto badframe; | 122 | goto badframe; |
126 | 123 | ||
127 | if (unlikely(is_do_ss_needed(magic))) | 124 | if (unlikely(is_do_ss_needed(magic))) |
128 | if (restore_altstack(&sf->uc.uc_stack)) | 125 | if (restore_altstack(&sf->uc.uc_stack)) |
129 | goto badframe; | 126 | goto badframe; |
130 | 127 | ||
128 | if (restore_usr_regs(regs, sf)) | ||
129 | goto badframe; | ||
130 | |||
131 | /* Don't restart from sigreturn */ | 131 | /* Don't restart from sigreturn */ |
132 | syscall_wont_restart(regs); | 132 | syscall_wont_restart(regs); |
133 | 133 | ||
@@ -191,6 +191,15 @@ setup_rt_frame(int signo, struct k_sigaction *ka, siginfo_t *info, | |||
191 | return 1; | 191 | return 1; |
192 | 192 | ||
193 | /* | 193 | /* |
194 | * w/o SA_SIGINFO, struct ucontext is partially populated (only | ||
195 | * uc_mcontext/uc_sigmask) for kernel's normal user state preservation | ||
196 | * during signal handler execution. This works for SA_SIGINFO as well | ||
197 | * although the semantics are now overloaded (the same reg state can be | ||
198 | * inspected by userland: but are they allowed to fiddle with it ? | ||
199 | */ | ||
200 | err |= stash_usr_regs(sf, regs, set); | ||
201 | |||
202 | /* | ||
194 | * SA_SIGINFO requires 3 args to signal handler: | 203 | * SA_SIGINFO requires 3 args to signal handler: |
195 | * #1: sig-no (common to any handler) | 204 | * #1: sig-no (common to any handler) |
196 | * #2: struct siginfo | 205 | * #2: struct siginfo |
@@ -213,14 +222,6 @@ setup_rt_frame(int signo, struct k_sigaction *ka, siginfo_t *info, | |||
213 | magic = MAGIC_SIGALTSTK; | 222 | magic = MAGIC_SIGALTSTK; |
214 | } | 223 | } |
215 | 224 | ||
216 | /* | ||
217 | * w/o SA_SIGINFO, struct ucontext is partially populated (only | ||
218 | * uc_mcontext/uc_sigmask) for kernel's normal user state preservation | ||
219 | * during signal handler execution. This works for SA_SIGINFO as well | ||
220 | * although the semantics are now overloaded (the same reg state can be | ||
221 | * inspected by userland: but are they allowed to fiddle with it ? | ||
222 | */ | ||
223 | err |= stash_usr_regs(sf, regs, set); | ||
224 | err |= __put_user(magic, &sf->sigret_magic); | 225 | err |= __put_user(magic, &sf->sigret_magic); |
225 | if (err) | 226 | if (err) |
226 | return err; | 227 | return err; |
diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c index 0e51e69cf30d..3fde7de3ea67 100644 --- a/arch/arc/kernel/time.c +++ b/arch/arc/kernel/time.c | |||
@@ -227,12 +227,9 @@ void __attribute__((weak)) arc_local_timer_setup(unsigned int cpu) | |||
227 | { | 227 | { |
228 | struct clock_event_device *clk = &per_cpu(arc_clockevent_device, cpu); | 228 | struct clock_event_device *clk = &per_cpu(arc_clockevent_device, cpu); |
229 | 229 | ||
230 | clockevents_calc_mult_shift(clk, arc_get_core_freq(), 5); | ||
231 | |||
232 | clk->max_delta_ns = clockevent_delta2ns(ARC_TIMER_MAX, clk); | ||
233 | clk->cpumask = cpumask_of(cpu); | 230 | clk->cpumask = cpumask_of(cpu); |
234 | 231 | clockevents_config_and_register(clk, arc_get_core_freq(), | |
235 | clockevents_register_device(clk); | 232 | 0, ARC_TIMER_MAX); |
236 | 233 | ||
237 | /* | 234 | /* |
238 | * setup the per-cpu timer IRQ handler - for all cpus | 235 | * setup the per-cpu timer IRQ handler - for all cpus |
diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c index 28d170060747..7ff5b5c183bb 100644 --- a/arch/arc/kernel/unaligned.c +++ b/arch/arc/kernel/unaligned.c | |||
@@ -245,6 +245,12 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs, | |||
245 | regs->status32 &= ~STATUS_DE_MASK; | 245 | regs->status32 &= ~STATUS_DE_MASK; |
246 | } else { | 246 | } else { |
247 | regs->ret += state.instr_len; | 247 | regs->ret += state.instr_len; |
248 | |||
249 | /* handle zero-overhead-loop */ | ||
250 | if ((regs->ret == regs->lp_end) && (regs->lp_count)) { | ||
251 | regs->ret = regs->lp_start; | ||
252 | regs->lp_count--; | ||
253 | } | ||
248 | } | 254 | } |
249 | 255 | ||
250 | return 0; | 256 | return 0; |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index a37a50f575a2..db50b626be98 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -296,10 +296,15 @@ archprepare: | |||
296 | # Convert bzImage to zImage | 296 | # Convert bzImage to zImage |
297 | bzImage: zImage | 297 | bzImage: zImage |
298 | 298 | ||
299 | zImage Image xipImage bootpImage uImage: vmlinux | 299 | BOOT_TARGETS = zImage Image xipImage bootpImage uImage |
300 | INSTALL_TARGETS = zinstall uinstall install | ||
301 | |||
302 | PHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS) | ||
303 | |||
304 | $(BOOT_TARGETS): vmlinux | ||
300 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 305 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ |
301 | 306 | ||
302 | zinstall uinstall install: vmlinux | 307 | $(INSTALL_TARGETS): |
303 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ | 308 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ |
304 | 309 | ||
305 | %.dtb: | scripts | 310 | %.dtb: | scripts |
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 84aa2caf07ed..ec2f8065f955 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -95,24 +95,24 @@ initrd: | |||
95 | @test "$(INITRD)" != "" || \ | 95 | @test "$(INITRD)" != "" || \ |
96 | (echo You must specify INITRD; exit -1) | 96 | (echo You must specify INITRD; exit -1) |
97 | 97 | ||
98 | install: $(obj)/Image | 98 | install: |
99 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 99 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
100 | $(obj)/Image System.map "$(INSTALL_PATH)" | 100 | $(obj)/Image System.map "$(INSTALL_PATH)" |
101 | 101 | ||
102 | zinstall: $(obj)/zImage | 102 | zinstall: |
103 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 103 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
104 | $(obj)/zImage System.map "$(INSTALL_PATH)" | 104 | $(obj)/zImage System.map "$(INSTALL_PATH)" |
105 | 105 | ||
106 | uinstall: $(obj)/uImage | 106 | uinstall: |
107 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 107 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
108 | $(obj)/uImage System.map "$(INSTALL_PATH)" | 108 | $(obj)/uImage System.map "$(INSTALL_PATH)" |
109 | 109 | ||
110 | zi: | 110 | zi: |
111 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 111 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
112 | $(obj)/zImage System.map "$(INSTALL_PATH)" | 112 | $(obj)/zImage System.map "$(INSTALL_PATH)" |
113 | 113 | ||
114 | i: | 114 | i: |
115 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 115 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
116 | $(obj)/Image System.map "$(INSTALL_PATH)" | 116 | $(obj)/Image System.map "$(INSTALL_PATH)" |
117 | 117 | ||
118 | subdir- := bootp compressed dts | 118 | subdir- := bootp compressed dts |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e95af3f5433b..802720e3e8fd 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -41,6 +41,8 @@ dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb | |||
41 | dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb | 41 | dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb |
42 | dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb | 42 | dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb |
43 | 43 | ||
44 | dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb | ||
45 | |||
44 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb | 46 | dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb |
45 | dtb-$(CONFIG_ARCH_BCM) += bcm11351-brt.dtb \ | 47 | dtb-$(CONFIG_ARCH_BCM) += bcm11351-brt.dtb \ |
46 | bcm28155-ap.dtb | 48 | bcm28155-ap.dtb |
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts index 05e4485a8225..8ac2ac1f69cc 100644 --- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts +++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts | |||
@@ -27,6 +27,25 @@ | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | soc { | 29 | soc { |
30 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 | ||
31 | MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; | ||
32 | |||
33 | pcie-controller { | ||
34 | status = "okay"; | ||
35 | |||
36 | /* Connected to Marvell SATA controller */ | ||
37 | pcie@1,0 { | ||
38 | /* Port 0, Lane 0 */ | ||
39 | status = "okay"; | ||
40 | }; | ||
41 | |||
42 | /* Connected to FL1009 USB 3.0 controller */ | ||
43 | pcie@2,0 { | ||
44 | /* Port 1, Lane 0 */ | ||
45 | status = "okay"; | ||
46 | }; | ||
47 | }; | ||
48 | |||
30 | internal-regs { | 49 | internal-regs { |
31 | serial@12000 { | 50 | serial@12000 { |
32 | clock-frequency = <200000000>; | 51 | clock-frequency = <200000000>; |
@@ -57,6 +76,11 @@ | |||
57 | marvell,pins = "mpp56"; | 76 | marvell,pins = "mpp56"; |
58 | marvell,function = "gpio"; | 77 | marvell,function = "gpio"; |
59 | }; | 78 | }; |
79 | |||
80 | poweroff: poweroff { | ||
81 | marvell,pins = "mpp8"; | ||
82 | marvell,function = "gpio"; | ||
83 | }; | ||
60 | }; | 84 | }; |
61 | 85 | ||
62 | mdio { | 86 | mdio { |
@@ -89,22 +113,6 @@ | |||
89 | pwm_polarity = <0>; | 113 | pwm_polarity = <0>; |
90 | }; | 114 | }; |
91 | }; | 115 | }; |
92 | |||
93 | pcie-controller { | ||
94 | status = "okay"; | ||
95 | |||
96 | /* Connected to Marvell SATA controller */ | ||
97 | pcie@1,0 { | ||
98 | /* Port 0, Lane 0 */ | ||
99 | status = "okay"; | ||
100 | }; | ||
101 | |||
102 | /* Connected to FL1009 USB 3.0 controller */ | ||
103 | pcie@2,0 { | ||
104 | /* Port 1, Lane 0 */ | ||
105 | status = "okay"; | ||
106 | }; | ||
107 | }; | ||
108 | }; | 116 | }; |
109 | }; | 117 | }; |
110 | 118 | ||
@@ -160,7 +168,7 @@ | |||
160 | button@1 { | 168 | button@1 { |
161 | label = "Power Button"; | 169 | label = "Power Button"; |
162 | linux,code = <116>; /* KEY_POWER */ | 170 | linux,code = <116>; /* KEY_POWER */ |
163 | gpios = <&gpio1 30 1>; | 171 | gpios = <&gpio1 30 0>; |
164 | }; | 172 | }; |
165 | 173 | ||
166 | button@2 { | 174 | button@2 { |
@@ -176,4 +184,11 @@ | |||
176 | }; | 184 | }; |
177 | }; | 185 | }; |
178 | 186 | ||
187 | gpio_poweroff { | ||
188 | compatible = "gpio-poweroff"; | ||
189 | pinctrl-0 = <&poweroff>; | ||
190 | pinctrl-names = "default"; | ||
191 | gpios = <&gpio0 8 1>; | ||
192 | }; | ||
193 | |||
179 | }; | 194 | }; |
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index def125c0eeaa..3058522f5aad 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi | |||
@@ -70,6 +70,8 @@ | |||
70 | 70 | ||
71 | timer@20300 { | 71 | timer@20300 { |
72 | compatible = "marvell,armada-xp-timer"; | 72 | compatible = "marvell,armada-xp-timer"; |
73 | clocks = <&coreclk 2>, <&refclk>; | ||
74 | clock-names = "nbclk", "fixed"; | ||
73 | }; | 75 | }; |
74 | 76 | ||
75 | coreclk: mvebu-sar@18230 { | 77 | coreclk: mvebu-sar@18230 { |
@@ -169,4 +171,13 @@ | |||
169 | }; | 171 | }; |
170 | }; | 172 | }; |
171 | }; | 173 | }; |
174 | |||
175 | clocks { | ||
176 | /* 25 MHz reference crystal */ | ||
177 | refclk: oscillator { | ||
178 | compatible = "fixed-clock"; | ||
179 | #clock-cells = <0>; | ||
180 | clock-frequency = <25000000>; | ||
181 | }; | ||
182 | }; | ||
172 | }; | 183 | }; |
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index cf78ac0b04b1..e74dc15efa9d 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -190,12 +190,12 @@ | |||
190 | AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA8 periph A */ | 190 | AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PA8 periph A */ |
191 | }; | 191 | }; |
192 | 192 | ||
193 | pinctrl_uart2_rts: uart2_rts-0 { | 193 | pinctrl_usart2_rts: usart2_rts-0 { |
194 | atmel,pins = | 194 | atmel,pins = |
195 | <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB0 periph B */ | 195 | <AT91_PIOB 0 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB0 periph B */ |
196 | }; | 196 | }; |
197 | 197 | ||
198 | pinctrl_uart2_cts: uart2_cts-0 { | 198 | pinctrl_usart2_cts: usart2_cts-0 { |
199 | atmel,pins = | 199 | atmel,pins = |
200 | <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB1 periph B */ | 200 | <AT91_PIOB 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB1 periph B */ |
201 | }; | 201 | }; |
@@ -556,6 +556,7 @@ | |||
556 | interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>; | 556 | interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>; |
557 | dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(0)>; | 557 | dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(0)>; |
558 | dma-names = "rxtx"; | 558 | dma-names = "rxtx"; |
559 | pinctrl-names = "default"; | ||
559 | #address-cells = <1>; | 560 | #address-cells = <1>; |
560 | #size-cells = <0>; | 561 | #size-cells = <0>; |
561 | status = "disabled"; | 562 | status = "disabled"; |
@@ -567,6 +568,7 @@ | |||
567 | interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>; | 568 | interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>; |
568 | dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(0)>; | 569 | dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(0)>; |
569 | dma-names = "rxtx"; | 570 | dma-names = "rxtx"; |
571 | pinctrl-names = "default"; | ||
570 | #address-cells = <1>; | 572 | #address-cells = <1>; |
571 | #size-cells = <0>; | 573 | #size-cells = <0>; |
572 | status = "disabled"; | 574 | status = "disabled"; |
diff --git a/arch/arm/boot/dts/atlas6.dtsi b/arch/arm/boot/dts/atlas6.dtsi index 8678e0c11119..6db4f81d4795 100644 --- a/arch/arm/boot/dts/atlas6.dtsi +++ b/arch/arm/boot/dts/atlas6.dtsi | |||
@@ -181,6 +181,8 @@ | |||
181 | interrupts = <17>; | 181 | interrupts = <17>; |
182 | fifosize = <128>; | 182 | fifosize = <128>; |
183 | clocks = <&clks 13>; | 183 | clocks = <&clks 13>; |
184 | sirf,uart-dma-rx-channel = <21>; | ||
185 | sirf,uart-dma-tx-channel = <2>; | ||
184 | }; | 186 | }; |
185 | 187 | ||
186 | uart1: uart@b0060000 { | 188 | uart1: uart@b0060000 { |
@@ -199,6 +201,8 @@ | |||
199 | interrupts = <19>; | 201 | interrupts = <19>; |
200 | fifosize = <128>; | 202 | fifosize = <128>; |
201 | clocks = <&clks 15>; | 203 | clocks = <&clks 15>; |
204 | sirf,uart-dma-rx-channel = <6>; | ||
205 | sirf,uart-dma-tx-channel = <7>; | ||
202 | }; | 206 | }; |
203 | 207 | ||
204 | usp0: usp@b0080000 { | 208 | usp0: usp@b0080000 { |
@@ -206,7 +210,10 @@ | |||
206 | compatible = "sirf,prima2-usp"; | 210 | compatible = "sirf,prima2-usp"; |
207 | reg = <0xb0080000 0x10000>; | 211 | reg = <0xb0080000 0x10000>; |
208 | interrupts = <20>; | 212 | interrupts = <20>; |
213 | fifosize = <128>; | ||
209 | clocks = <&clks 28>; | 214 | clocks = <&clks 28>; |
215 | sirf,usp-dma-rx-channel = <17>; | ||
216 | sirf,usp-dma-tx-channel = <18>; | ||
210 | }; | 217 | }; |
211 | 218 | ||
212 | usp1: usp@b0090000 { | 219 | usp1: usp@b0090000 { |
@@ -214,7 +221,10 @@ | |||
214 | compatible = "sirf,prima2-usp"; | 221 | compatible = "sirf,prima2-usp"; |
215 | reg = <0xb0090000 0x10000>; | 222 | reg = <0xb0090000 0x10000>; |
216 | interrupts = <21>; | 223 | interrupts = <21>; |
224 | fifosize = <128>; | ||
217 | clocks = <&clks 29>; | 225 | clocks = <&clks 29>; |
226 | sirf,usp-dma-rx-channel = <14>; | ||
227 | sirf,usp-dma-tx-channel = <15>; | ||
218 | }; | 228 | }; |
219 | 229 | ||
220 | dmac0: dma-controller@b00b0000 { | 230 | dmac0: dma-controller@b00b0000 { |
@@ -237,6 +247,8 @@ | |||
237 | compatible = "sirf,prima2-vip"; | 247 | compatible = "sirf,prima2-vip"; |
238 | reg = <0xb00C0000 0x10000>; | 248 | reg = <0xb00C0000 0x10000>; |
239 | clocks = <&clks 31>; | 249 | clocks = <&clks 31>; |
250 | interrupts = <14>; | ||
251 | sirf,vip-dma-rx-channel = <16>; | ||
240 | }; | 252 | }; |
241 | 253 | ||
242 | spi0: spi@b00d0000 { | 254 | spi0: spi@b00d0000 { |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 7d7cc777ff7b..bbac42a78ce5 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
@@ -96,6 +96,11 @@ | |||
96 | <1 14 0xf08>, | 96 | <1 14 0xf08>, |
97 | <1 11 0xf08>, | 97 | <1 11 0xf08>, |
98 | <1 10 0xf08>; | 98 | <1 10 0xf08>; |
99 | /* Unfortunately we need this since some versions of U-Boot | ||
100 | * on Exynos don't set the CNTFRQ register, so we need the | ||
101 | * value from DT. | ||
102 | */ | ||
103 | clock-frequency = <24000000>; | ||
99 | }; | 104 | }; |
100 | 105 | ||
101 | mct@101C0000 { | 106 | mct@101C0000 { |
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index cf7aeaf89e9c..1335b2e1bed4 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi | |||
@@ -13,6 +13,7 @@ | |||
13 | cpu@0 { | 13 | cpu@0 { |
14 | device_type = "cpu"; | 14 | device_type = "cpu"; |
15 | compatible = "marvell,feroceon"; | 15 | compatible = "marvell,feroceon"; |
16 | reg = <0>; | ||
16 | clocks = <&core_clk 1>, <&core_clk 3>, <&gate_clk 11>; | 17 | clocks = <&core_clk 1>, <&core_clk 3>, <&gate_clk 11>; |
17 | clock-names = "cpu_clk", "ddrclk", "powersave"; | 18 | clock-names = "cpu_clk", "ddrclk", "powersave"; |
18 | }; | 19 | }; |
@@ -167,7 +168,7 @@ | |||
167 | xor@60900 { | 168 | xor@60900 { |
168 | compatible = "marvell,orion-xor"; | 169 | compatible = "marvell,orion-xor"; |
169 | reg = <0x60900 0x100 | 170 | reg = <0x60900 0x100 |
170 | 0xd0B00 0x100>; | 171 | 0x60B00 0x100>; |
171 | status = "okay"; | 172 | status = "okay"; |
172 | clocks = <&gate_clk 16>; | 173 | clocks = <&gate_clk 16>; |
173 | 174 | ||
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index 0c514dc8460c..2816bf612672 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | / { | 12 | / { |
13 | model = "TI OMAP3 BeagleBoard xM"; | 13 | model = "TI OMAP3 BeagleBoard xM"; |
14 | compatible = "ti,omap3-beagle-xm", "ti,omap3-beagle", "ti,omap3"; | 14 | compatible = "ti,omap3-beagle-xm", "ti,omap36xx", "ti,omap3"; |
15 | 15 | ||
16 | cpus { | 16 | cpus { |
17 | cpu@0 { | 17 | cpu@0 { |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 7d95cda1fae4..b41bd57f4328 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -108,7 +108,7 @@ | |||
108 | #address-cells = <1>; | 108 | #address-cells = <1>; |
109 | #size-cells = <0>; | 109 | #size-cells = <0>; |
110 | pinctrl-single,register-width = <16>; | 110 | pinctrl-single,register-width = <16>; |
111 | pinctrl-single,function-mask = <0x7f1f>; | 111 | pinctrl-single,function-mask = <0xff1f>; |
112 | }; | 112 | }; |
113 | 113 | ||
114 | omap3_pmx_wkup: pinmux@0x48002a00 { | 114 | omap3_pmx_wkup: pinmux@0x48002a00 { |
@@ -117,7 +117,7 @@ | |||
117 | #address-cells = <1>; | 117 | #address-cells = <1>; |
118 | #size-cells = <0>; | 118 | #size-cells = <0>; |
119 | pinctrl-single,register-width = <16>; | 119 | pinctrl-single,register-width = <16>; |
120 | pinctrl-single,function-mask = <0x7f1f>; | 120 | pinctrl-single,function-mask = <0xff1f>; |
121 | }; | 121 | }; |
122 | 122 | ||
123 | gpio1: gpio@48310000 { | 123 | gpio1: gpio@48310000 { |
diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi index bbeb623fc2c6..27ed9f5144bc 100644 --- a/arch/arm/boot/dts/prima2.dtsi +++ b/arch/arm/boot/dts/prima2.dtsi | |||
@@ -171,7 +171,8 @@ | |||
171 | compatible = "simple-bus"; | 171 | compatible = "simple-bus"; |
172 | #address-cells = <1>; | 172 | #address-cells = <1>; |
173 | #size-cells = <1>; | 173 | #size-cells = <1>; |
174 | ranges = <0xb0000000 0xb0000000 0x180000>; | 174 | ranges = <0xb0000000 0xb0000000 0x180000>, |
175 | <0x56000000 0x56000000 0x1b00000>; | ||
175 | 176 | ||
176 | timer@b0020000 { | 177 | timer@b0020000 { |
177 | compatible = "sirf,prima2-tick"; | 178 | compatible = "sirf,prima2-tick"; |
@@ -196,25 +197,32 @@ | |||
196 | uart0: uart@b0050000 { | 197 | uart0: uart@b0050000 { |
197 | cell-index = <0>; | 198 | cell-index = <0>; |
198 | compatible = "sirf,prima2-uart"; | 199 | compatible = "sirf,prima2-uart"; |
199 | reg = <0xb0050000 0x10000>; | 200 | reg = <0xb0050000 0x1000>; |
200 | interrupts = <17>; | 201 | interrupts = <17>; |
202 | fifosize = <128>; | ||
201 | clocks = <&clks 13>; | 203 | clocks = <&clks 13>; |
204 | sirf,uart-dma-rx-channel = <21>; | ||
205 | sirf,uart-dma-tx-channel = <2>; | ||
202 | }; | 206 | }; |
203 | 207 | ||
204 | uart1: uart@b0060000 { | 208 | uart1: uart@b0060000 { |
205 | cell-index = <1>; | 209 | cell-index = <1>; |
206 | compatible = "sirf,prima2-uart"; | 210 | compatible = "sirf,prima2-uart"; |
207 | reg = <0xb0060000 0x10000>; | 211 | reg = <0xb0060000 0x1000>; |
208 | interrupts = <18>; | 212 | interrupts = <18>; |
213 | fifosize = <32>; | ||
209 | clocks = <&clks 14>; | 214 | clocks = <&clks 14>; |
210 | }; | 215 | }; |
211 | 216 | ||
212 | uart2: uart@b0070000 { | 217 | uart2: uart@b0070000 { |
213 | cell-index = <2>; | 218 | cell-index = <2>; |
214 | compatible = "sirf,prima2-uart"; | 219 | compatible = "sirf,prima2-uart"; |
215 | reg = <0xb0070000 0x10000>; | 220 | reg = <0xb0070000 0x1000>; |
216 | interrupts = <19>; | 221 | interrupts = <19>; |
222 | fifosize = <128>; | ||
217 | clocks = <&clks 15>; | 223 | clocks = <&clks 15>; |
224 | sirf,uart-dma-rx-channel = <6>; | ||
225 | sirf,uart-dma-tx-channel = <7>; | ||
218 | }; | 226 | }; |
219 | 227 | ||
220 | usp0: usp@b0080000 { | 228 | usp0: usp@b0080000 { |
@@ -222,7 +230,10 @@ | |||
222 | compatible = "sirf,prima2-usp"; | 230 | compatible = "sirf,prima2-usp"; |
223 | reg = <0xb0080000 0x10000>; | 231 | reg = <0xb0080000 0x10000>; |
224 | interrupts = <20>; | 232 | interrupts = <20>; |
233 | fifosize = <128>; | ||
225 | clocks = <&clks 28>; | 234 | clocks = <&clks 28>; |
235 | sirf,usp-dma-rx-channel = <17>; | ||
236 | sirf,usp-dma-tx-channel = <18>; | ||
226 | }; | 237 | }; |
227 | 238 | ||
228 | usp1: usp@b0090000 { | 239 | usp1: usp@b0090000 { |
@@ -230,7 +241,10 @@ | |||
230 | compatible = "sirf,prima2-usp"; | 241 | compatible = "sirf,prima2-usp"; |
231 | reg = <0xb0090000 0x10000>; | 242 | reg = <0xb0090000 0x10000>; |
232 | interrupts = <21>; | 243 | interrupts = <21>; |
244 | fifosize = <128>; | ||
233 | clocks = <&clks 29>; | 245 | clocks = <&clks 29>; |
246 | sirf,usp-dma-rx-channel = <14>; | ||
247 | sirf,usp-dma-tx-channel = <15>; | ||
234 | }; | 248 | }; |
235 | 249 | ||
236 | usp2: usp@b00a0000 { | 250 | usp2: usp@b00a0000 { |
@@ -238,7 +252,10 @@ | |||
238 | compatible = "sirf,prima2-usp"; | 252 | compatible = "sirf,prima2-usp"; |
239 | reg = <0xb00a0000 0x10000>; | 253 | reg = <0xb00a0000 0x10000>; |
240 | interrupts = <22>; | 254 | interrupts = <22>; |
255 | fifosize = <128>; | ||
241 | clocks = <&clks 30>; | 256 | clocks = <&clks 30>; |
257 | sirf,usp-dma-rx-channel = <10>; | ||
258 | sirf,usp-dma-tx-channel = <11>; | ||
242 | }; | 259 | }; |
243 | 260 | ||
244 | dmac0: dma-controller@b00b0000 { | 261 | dmac0: dma-controller@b00b0000 { |
@@ -261,6 +278,8 @@ | |||
261 | compatible = "sirf,prima2-vip"; | 278 | compatible = "sirf,prima2-vip"; |
262 | reg = <0xb00C0000 0x10000>; | 279 | reg = <0xb00C0000 0x10000>; |
263 | clocks = <&clks 31>; | 280 | clocks = <&clks 31>; |
281 | interrupts = <14>; | ||
282 | sirf,vip-dma-rx-channel = <16>; | ||
264 | }; | 283 | }; |
265 | 284 | ||
266 | spi0: spi@b00d0000 { | 285 | spi0: spi@b00d0000 { |
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi index 6c26caa880f2..658fcc537576 100644 --- a/arch/arm/boot/dts/r8a73a4.dtsi +++ b/arch/arm/boot/dts/r8a73a4.dtsi | |||
@@ -193,7 +193,7 @@ | |||
193 | }; | 193 | }; |
194 | 194 | ||
195 | sdhi0: sdhi@ee100000 { | 195 | sdhi0: sdhi@ee100000 { |
196 | compatible = "renesas,r8a73a4-sdhi"; | 196 | compatible = "renesas,sdhi-r8a73a4"; |
197 | reg = <0 0xee100000 0 0x100>; | 197 | reg = <0 0xee100000 0 0x100>; |
198 | interrupt-parent = <&gic>; | 198 | interrupt-parent = <&gic>; |
199 | interrupts = <0 165 4>; | 199 | interrupts = <0 165 4>; |
@@ -202,7 +202,7 @@ | |||
202 | }; | 202 | }; |
203 | 203 | ||
204 | sdhi1: sdhi@ee120000 { | 204 | sdhi1: sdhi@ee120000 { |
205 | compatible = "renesas,r8a73a4-sdhi"; | 205 | compatible = "renesas,sdhi-r8a73a4"; |
206 | reg = <0 0xee120000 0 0x100>; | 206 | reg = <0 0xee120000 0 0x100>; |
207 | interrupt-parent = <&gic>; | 207 | interrupt-parent = <&gic>; |
208 | interrupts = <0 166 4>; | 208 | interrupts = <0 166 4>; |
@@ -211,7 +211,7 @@ | |||
211 | }; | 211 | }; |
212 | 212 | ||
213 | sdhi2: sdhi@ee140000 { | 213 | sdhi2: sdhi@ee140000 { |
214 | compatible = "renesas,r8a73a4-sdhi"; | 214 | compatible = "renesas,sdhi-r8a73a4"; |
215 | reg = <0 0xee140000 0 0x100>; | 215 | reg = <0 0xee140000 0 0x100>; |
216 | interrupt-parent = <&gic>; | 216 | interrupt-parent = <&gic>; |
217 | interrupts = <0 167 4>; | 217 | interrupts = <0 167 4>; |
diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi index 45ac404ab6d8..3577aba82583 100644 --- a/arch/arm/boot/dts/r8a7778.dtsi +++ b/arch/arm/boot/dts/r8a7778.dtsi | |||
@@ -96,6 +96,5 @@ | |||
96 | pfc: pfc@fffc0000 { | 96 | pfc: pfc@fffc0000 { |
97 | compatible = "renesas,pfc-r8a7778"; | 97 | compatible = "renesas,pfc-r8a7778"; |
98 | reg = <0xfffc000 0x118>; | 98 | reg = <0xfffc000 0x118>; |
99 | #gpio-range-cells = <3>; | ||
100 | }; | 99 | }; |
101 | }; | 100 | }; |
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi index 23a62447359c..ebbe507fcbfa 100644 --- a/arch/arm/boot/dts/r8a7779.dtsi +++ b/arch/arm/boot/dts/r8a7779.dtsi | |||
@@ -188,7 +188,6 @@ | |||
188 | pfc: pfc@fffc0000 { | 188 | pfc: pfc@fffc0000 { |
189 | compatible = "renesas,pfc-r8a7779"; | 189 | compatible = "renesas,pfc-r8a7779"; |
190 | reg = <0xfffc0000 0x23c>; | 190 | reg = <0xfffc0000 0x23c>; |
191 | #gpio-range-cells = <3>; | ||
192 | }; | 191 | }; |
193 | 192 | ||
194 | thermal@ffc48000 { | 193 | thermal@ffc48000 { |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 3b879e7c697c..413b4c29e782 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
@@ -148,11 +148,10 @@ | |||
148 | pfc: pfc@e6060000 { | 148 | pfc: pfc@e6060000 { |
149 | compatible = "renesas,pfc-r8a7790"; | 149 | compatible = "renesas,pfc-r8a7790"; |
150 | reg = <0 0xe6060000 0 0x250>; | 150 | reg = <0 0xe6060000 0 0x250>; |
151 | #gpio-range-cells = <3>; | ||
152 | }; | 151 | }; |
153 | 152 | ||
154 | sdhi0: sdhi@ee100000 { | 153 | sdhi0: sdhi@ee100000 { |
155 | compatible = "renesas,r8a7790-sdhi"; | 154 | compatible = "renesas,sdhi-r8a7790"; |
156 | reg = <0 0xee100000 0 0x100>; | 155 | reg = <0 0xee100000 0 0x100>; |
157 | interrupt-parent = <&gic>; | 156 | interrupt-parent = <&gic>; |
158 | interrupts = <0 165 4>; | 157 | interrupts = <0 165 4>; |
@@ -161,7 +160,7 @@ | |||
161 | }; | 160 | }; |
162 | 161 | ||
163 | sdhi1: sdhi@ee120000 { | 162 | sdhi1: sdhi@ee120000 { |
164 | compatible = "renesas,r8a7790-sdhi"; | 163 | compatible = "renesas,sdhi-r8a7790"; |
165 | reg = <0 0xee120000 0 0x100>; | 164 | reg = <0 0xee120000 0 0x100>; |
166 | interrupt-parent = <&gic>; | 165 | interrupt-parent = <&gic>; |
167 | interrupts = <0 166 4>; | 166 | interrupts = <0 166 4>; |
@@ -170,7 +169,7 @@ | |||
170 | }; | 169 | }; |
171 | 170 | ||
172 | sdhi2: sdhi@ee140000 { | 171 | sdhi2: sdhi@ee140000 { |
173 | compatible = "renesas,r8a7790-sdhi"; | 172 | compatible = "renesas,sdhi-r8a7790"; |
174 | reg = <0 0xee140000 0 0x100>; | 173 | reg = <0 0xee140000 0 0x100>; |
175 | interrupt-parent = <&gic>; | 174 | interrupt-parent = <&gic>; |
176 | interrupts = <0 167 4>; | 175 | interrupts = <0 167 4>; |
@@ -179,7 +178,7 @@ | |||
179 | }; | 178 | }; |
180 | 179 | ||
181 | sdhi3: sdhi@ee160000 { | 180 | sdhi3: sdhi@ee160000 { |
182 | compatible = "renesas,r8a7790-sdhi"; | 181 | compatible = "renesas,sdhi-r8a7790"; |
183 | reg = <0 0xee160000 0 0x100>; | 182 | reg = <0 0xee160000 0 0x100>; |
184 | interrupt-parent = <&gic>; | 183 | interrupt-parent = <&gic>; |
185 | interrupts = <0 168 4>; | 184 | interrupts = <0 168 4>; |
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index ba59a5875a10..3955c7606a6f 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi | |||
@@ -196,7 +196,7 @@ | |||
196 | }; | 196 | }; |
197 | 197 | ||
198 | sdhi0: sdhi@ee100000 { | 198 | sdhi0: sdhi@ee100000 { |
199 | compatible = "renesas,r8a7740-sdhi"; | 199 | compatible = "renesas,sdhi-r8a7740"; |
200 | reg = <0xee100000 0x100>; | 200 | reg = <0xee100000 0x100>; |
201 | interrupt-parent = <&gic>; | 201 | interrupt-parent = <&gic>; |
202 | interrupts = <0 83 4 | 202 | interrupts = <0 83 4 |
@@ -208,7 +208,7 @@ | |||
208 | 208 | ||
209 | /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */ | 209 | /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */ |
210 | sdhi1: sdhi@ee120000 { | 210 | sdhi1: sdhi@ee120000 { |
211 | compatible = "renesas,r8a7740-sdhi"; | 211 | compatible = "renesas,sdhi-r8a7740"; |
212 | reg = <0xee120000 0x100>; | 212 | reg = <0xee120000 0x100>; |
213 | interrupt-parent = <&gic>; | 213 | interrupt-parent = <&gic>; |
214 | interrupts = <0 88 4 | 214 | interrupts = <0 88 4 |
@@ -219,7 +219,7 @@ | |||
219 | }; | 219 | }; |
220 | 220 | ||
221 | sdhi2: sdhi@ee140000 { | 221 | sdhi2: sdhi@ee140000 { |
222 | compatible = "renesas,r8a7740-sdhi"; | 222 | compatible = "renesas,sdhi-r8a7740"; |
223 | reg = <0xee140000 0x100>; | 223 | reg = <0xee140000 0x100>; |
224 | interrupt-parent = <&gic>; | 224 | interrupt-parent = <&gic>; |
225 | interrupts = <0 104 4 | 225 | interrupts = <0 104 4 |
diff --git a/arch/arm/boot/dts/testcases/tests-interrupts.dtsi b/arch/arm/boot/dts/testcases/tests-interrupts.dtsi new file mode 100644 index 000000000000..c843720bd3e5 --- /dev/null +++ b/arch/arm/boot/dts/testcases/tests-interrupts.dtsi | |||
@@ -0,0 +1,58 @@ | |||
1 | |||
2 | / { | ||
3 | testcase-data { | ||
4 | interrupts { | ||
5 | #address-cells = <1>; | ||
6 | #size-cells = <1>; | ||
7 | test_intc0: intc0 { | ||
8 | interrupt-controller; | ||
9 | #interrupt-cells = <1>; | ||
10 | }; | ||
11 | |||
12 | test_intc1: intc1 { | ||
13 | interrupt-controller; | ||
14 | #interrupt-cells = <3>; | ||
15 | }; | ||
16 | |||
17 | test_intc2: intc2 { | ||
18 | interrupt-controller; | ||
19 | #interrupt-cells = <2>; | ||
20 | }; | ||
21 | |||
22 | test_intmap0: intmap0 { | ||
23 | #interrupt-cells = <1>; | ||
24 | #address-cells = <0>; | ||
25 | interrupt-map = <1 &test_intc0 9>, | ||
26 | <2 &test_intc1 10 11 12>, | ||
27 | <3 &test_intc2 13 14>, | ||
28 | <4 &test_intc2 15 16>; | ||
29 | }; | ||
30 | |||
31 | test_intmap1: intmap1 { | ||
32 | #interrupt-cells = <2>; | ||
33 | interrupt-map = <0x5000 1 2 &test_intc0 15>; | ||
34 | }; | ||
35 | |||
36 | interrupts0 { | ||
37 | interrupt-parent = <&test_intc0>; | ||
38 | interrupts = <1>, <2>, <3>, <4>; | ||
39 | }; | ||
40 | |||
41 | interrupts1 { | ||
42 | interrupt-parent = <&test_intmap0>; | ||
43 | interrupts = <1>, <2>, <3>, <4>; | ||
44 | }; | ||
45 | |||
46 | interrupts-extended0 { | ||
47 | reg = <0x5000 0x100>; | ||
48 | interrupts-extended = <&test_intc0 1>, | ||
49 | <&test_intc1 2 3 4>, | ||
50 | <&test_intc2 5 6>, | ||
51 | <&test_intmap0 1>, | ||
52 | <&test_intmap0 2>, | ||
53 | <&test_intmap0 3>, | ||
54 | <&test_intmap1 1 2>; | ||
55 | }; | ||
56 | }; | ||
57 | }; | ||
58 | }; | ||
diff --git a/arch/arm/boot/dts/testcases/tests.dtsi b/arch/arm/boot/dts/testcases/tests.dtsi index a7c5067622e8..3f123ecc9dd7 100644 --- a/arch/arm/boot/dts/testcases/tests.dtsi +++ b/arch/arm/boot/dts/testcases/tests.dtsi | |||
@@ -1 +1,2 @@ | |||
1 | /include/ "tests-phandle.dtsi" | 1 | /include/ "tests-phandle.dtsi" |
2 | /include/ "tests-interrupts.dtsi" | ||
diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts index dde75ae8b4b1..e01e5a081def 100644 --- a/arch/arm/boot/dts/versatile-ab.dts +++ b/arch/arm/boot/dts/versatile-ab.dts | |||
@@ -185,7 +185,7 @@ | |||
185 | mmc@5000 { | 185 | mmc@5000 { |
186 | compatible = "arm,primecell"; | 186 | compatible = "arm,primecell"; |
187 | reg = < 0x5000 0x1000>; | 187 | reg = < 0x5000 0x1000>; |
188 | interrupts = <22 34>; | 188 | interrupts-extended = <&vic 22 &sic 2>; |
189 | }; | 189 | }; |
190 | kmi@6000 { | 190 | kmi@6000 { |
191 | compatible = "arm,pl050", "arm,primecell"; | 191 | compatible = "arm,pl050", "arm,primecell"; |
diff --git a/arch/arm/boot/dts/versatile-pb.dts b/arch/arm/boot/dts/versatile-pb.dts index 7e8175269064..f43907c40c93 100644 --- a/arch/arm/boot/dts/versatile-pb.dts +++ b/arch/arm/boot/dts/versatile-pb.dts | |||
@@ -41,7 +41,7 @@ | |||
41 | mmc@b000 { | 41 | mmc@b000 { |
42 | compatible = "arm,primecell"; | 42 | compatible = "arm,primecell"; |
43 | reg = <0xb000 0x1000>; | 43 | reg = <0xb000 0x1000>; |
44 | interrupts = <23 34>; | 44 | interrupts-extended = <&vic 23 &sic 2>; |
45 | }; | 45 | }; |
46 | }; | 46 | }; |
47 | }; | 47 | }; |
diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh index 06ea7d42ce8e..2a45092a40e3 100644 --- a/arch/arm/boot/install.sh +++ b/arch/arm/boot/install.sh | |||
@@ -20,6 +20,20 @@ | |||
20 | # $4 - default install path (blank if root directory) | 20 | # $4 - default install path (blank if root directory) |
21 | # | 21 | # |
22 | 22 | ||
23 | verify () { | ||
24 | if [ ! -f "$1" ]; then | ||
25 | echo "" 1>&2 | ||
26 | echo " *** Missing file: $1" 1>&2 | ||
27 | echo ' *** You need to run "make" before "make install".' 1>&2 | ||
28 | echo "" 1>&2 | ||
29 | exit 1 | ||
30 | fi | ||
31 | } | ||
32 | |||
33 | # Make sure the files actually exist | ||
34 | verify "$2" | ||
35 | verify "$3" | ||
36 | |||
23 | # User may have a custom install script | 37 | # User may have a custom install script |
24 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi | 38 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
25 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi | 39 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 117f955a2a06..8e1a0245907f 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c | |||
@@ -269,6 +269,11 @@ static const struct edmacc_param dummy_paramset = { | |||
269 | .ccnt = 1, | 269 | .ccnt = 1, |
270 | }; | 270 | }; |
271 | 271 | ||
272 | static const struct of_device_id edma_of_ids[] = { | ||
273 | { .compatible = "ti,edma3", }, | ||
274 | {} | ||
275 | }; | ||
276 | |||
272 | /*****************************************************************************/ | 277 | /*****************************************************************************/ |
273 | 278 | ||
274 | static void map_dmach_queue(unsigned ctlr, unsigned ch_no, | 279 | static void map_dmach_queue(unsigned ctlr, unsigned ch_no, |
@@ -560,14 +565,38 @@ static int reserve_contiguous_slots(int ctlr, unsigned int id, | |||
560 | static int prepare_unused_channel_list(struct device *dev, void *data) | 565 | static int prepare_unused_channel_list(struct device *dev, void *data) |
561 | { | 566 | { |
562 | struct platform_device *pdev = to_platform_device(dev); | 567 | struct platform_device *pdev = to_platform_device(dev); |
563 | int i, ctlr; | 568 | int i, count, ctlr; |
569 | struct of_phandle_args dma_spec; | ||
564 | 570 | ||
571 | if (dev->of_node) { | ||
572 | count = of_property_count_strings(dev->of_node, "dma-names"); | ||
573 | if (count < 0) | ||
574 | return 0; | ||
575 | for (i = 0; i < count; i++) { | ||
576 | if (of_parse_phandle_with_args(dev->of_node, "dmas", | ||
577 | "#dma-cells", i, | ||
578 | &dma_spec)) | ||
579 | continue; | ||
580 | |||
581 | if (!of_match_node(edma_of_ids, dma_spec.np)) { | ||
582 | of_node_put(dma_spec.np); | ||
583 | continue; | ||
584 | } | ||
585 | |||
586 | clear_bit(EDMA_CHAN_SLOT(dma_spec.args[0]), | ||
587 | edma_cc[0]->edma_unused); | ||
588 | of_node_put(dma_spec.np); | ||
589 | } | ||
590 | return 0; | ||
591 | } | ||
592 | |||
593 | /* For non-OF case */ | ||
565 | for (i = 0; i < pdev->num_resources; i++) { | 594 | for (i = 0; i < pdev->num_resources; i++) { |
566 | if ((pdev->resource[i].flags & IORESOURCE_DMA) && | 595 | if ((pdev->resource[i].flags & IORESOURCE_DMA) && |
567 | (int)pdev->resource[i].start >= 0) { | 596 | (int)pdev->resource[i].start >= 0) { |
568 | ctlr = EDMA_CTLR(pdev->resource[i].start); | 597 | ctlr = EDMA_CTLR(pdev->resource[i].start); |
569 | clear_bit(EDMA_CHAN_SLOT(pdev->resource[i].start), | 598 | clear_bit(EDMA_CHAN_SLOT(pdev->resource[i].start), |
570 | edma_cc[ctlr]->edma_unused); | 599 | edma_cc[ctlr]->edma_unused); |
571 | } | 600 | } |
572 | } | 601 | } |
573 | 602 | ||
@@ -1762,11 +1791,6 @@ static int edma_probe(struct platform_device *pdev) | |||
1762 | return 0; | 1791 | return 0; |
1763 | } | 1792 | } |
1764 | 1793 | ||
1765 | static const struct of_device_id edma_of_ids[] = { | ||
1766 | { .compatible = "ti,edma3", }, | ||
1767 | {} | ||
1768 | }; | ||
1769 | |||
1770 | static struct platform_driver edma_driver = { | 1794 | static struct platform_driver edma_driver = { |
1771 | .driver = { | 1795 | .driver = { |
1772 | .name = "edma", | 1796 | .name = "edma", |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index f3935b46df29..119fc378fc52 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -135,6 +135,7 @@ CONFIG_MMC=y | |||
135 | CONFIG_MMC_ARMMMCI=y | 135 | CONFIG_MMC_ARMMMCI=y |
136 | CONFIG_MMC_SDHCI=y | 136 | CONFIG_MMC_SDHCI=y |
137 | CONFIG_MMC_SDHCI_PLTFM=y | 137 | CONFIG_MMC_SDHCI_PLTFM=y |
138 | CONFIG_MMC_SDHCI_ESDHC_IMX=y | ||
138 | CONFIG_MMC_SDHCI_TEGRA=y | 139 | CONFIG_MMC_SDHCI_TEGRA=y |
139 | CONFIG_MMC_SDHCI_SPEAR=y | 140 | CONFIG_MMC_SDHCI_SPEAR=y |
140 | CONFIG_MMC_OMAP=y | 141 | CONFIG_MMC_OMAP=y |
diff --git a/arch/arm/include/asm/jump_label.h b/arch/arm/include/asm/jump_label.h index bfc198c75913..863c892b4aaa 100644 --- a/arch/arm/include/asm/jump_label.h +++ b/arch/arm/include/asm/jump_label.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | static __always_inline bool arch_static_branch(struct static_key *key) | 17 | static __always_inline bool arch_static_branch(struct static_key *key) |
18 | { | 18 | { |
19 | asm goto("1:\n\t" | 19 | asm_volatile_goto("1:\n\t" |
20 | JUMP_LABEL_NOP "\n\t" | 20 | JUMP_LABEL_NOP "\n\t" |
21 | ".pushsection __jump_table, \"aw\"\n\t" | 21 | ".pushsection __jump_table, \"aw\"\n\t" |
22 | ".word 1b, %l[l_yes], %c0\n\t" | 22 | ".word 1b, %l[l_yes], %c0\n\t" |
diff --git a/arch/arm/kvm/reset.c b/arch/arm/kvm/reset.c index 71e08baee209..c02ba4af599f 100644 --- a/arch/arm/kvm/reset.c +++ b/arch/arm/kvm/reset.c | |||
@@ -58,14 +58,14 @@ static const struct kvm_irq_level a15_vtimer_irq = { | |||
58 | */ | 58 | */ |
59 | int kvm_reset_vcpu(struct kvm_vcpu *vcpu) | 59 | int kvm_reset_vcpu(struct kvm_vcpu *vcpu) |
60 | { | 60 | { |
61 | struct kvm_regs *cpu_reset; | 61 | struct kvm_regs *reset_regs; |
62 | const struct kvm_irq_level *cpu_vtimer_irq; | 62 | const struct kvm_irq_level *cpu_vtimer_irq; |
63 | 63 | ||
64 | switch (vcpu->arch.target) { | 64 | switch (vcpu->arch.target) { |
65 | case KVM_ARM_TARGET_CORTEX_A15: | 65 | case KVM_ARM_TARGET_CORTEX_A15: |
66 | if (vcpu->vcpu_id > a15_max_cpu_idx) | 66 | if (vcpu->vcpu_id > a15_max_cpu_idx) |
67 | return -EINVAL; | 67 | return -EINVAL; |
68 | cpu_reset = &a15_regs_reset; | 68 | reset_regs = &a15_regs_reset; |
69 | vcpu->arch.midr = read_cpuid_id(); | 69 | vcpu->arch.midr = read_cpuid_id(); |
70 | cpu_vtimer_irq = &a15_vtimer_irq; | 70 | cpu_vtimer_irq = &a15_vtimer_irq; |
71 | break; | 71 | break; |
@@ -74,7 +74,7 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu) | |||
74 | } | 74 | } |
75 | 75 | ||
76 | /* Reset core registers */ | 76 | /* Reset core registers */ |
77 | memcpy(&vcpu->arch.regs, cpu_reset, sizeof(vcpu->arch.regs)); | 77 | memcpy(&vcpu->arch.regs, reset_regs, sizeof(vcpu->arch.regs)); |
78 | 78 | ||
79 | /* Reset CP15 registers */ | 79 | /* Reset CP15 registers */ |
80 | kvm_reset_coprocs(vcpu); | 80 | kvm_reset_coprocs(vcpu); |
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index 180b3024bec3..f607deb40f4d 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c | |||
@@ -93,7 +93,7 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id) | |||
93 | 93 | ||
94 | static struct irqaction at91rm9200_timer_irq = { | 94 | static struct irqaction at91rm9200_timer_irq = { |
95 | .name = "at91_tick", | 95 | .name = "at91_tick", |
96 | .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 96 | .flags = IRQF_SHARED | IRQF_TIMER | IRQF_IRQPOLL, |
97 | .handler = at91rm9200_timer_interrupt, | 97 | .handler = at91rm9200_timer_interrupt, |
98 | .irq = NR_IRQS_LEGACY + AT91_ID_SYS, | 98 | .irq = NR_IRQS_LEGACY + AT91_ID_SYS, |
99 | }; | 99 | }; |
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c index 3a4bc2e1a65e..bb392320a0dd 100644 --- a/arch/arm/mach-at91/at91sam926x_time.c +++ b/arch/arm/mach-at91/at91sam926x_time.c | |||
@@ -171,7 +171,7 @@ static irqreturn_t at91sam926x_pit_interrupt(int irq, void *dev_id) | |||
171 | 171 | ||
172 | static struct irqaction at91sam926x_pit_irq = { | 172 | static struct irqaction at91sam926x_pit_irq = { |
173 | .name = "at91_tick", | 173 | .name = "at91_tick", |
174 | .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 174 | .flags = IRQF_SHARED | IRQF_TIMER | IRQF_IRQPOLL, |
175 | .handler = at91sam926x_pit_interrupt, | 175 | .handler = at91sam926x_pit_interrupt, |
176 | .irq = NR_IRQS_LEGACY + AT91_ID_SYS, | 176 | .irq = NR_IRQS_LEGACY + AT91_ID_SYS, |
177 | }; | 177 | }; |
diff --git a/arch/arm/mach-at91/at91sam9g45_reset.S b/arch/arm/mach-at91/at91sam9g45_reset.S index 721a1a34dd1d..c40c1e2ef80f 100644 --- a/arch/arm/mach-at91/at91sam9g45_reset.S +++ b/arch/arm/mach-at91/at91sam9g45_reset.S | |||
@@ -16,11 +16,17 @@ | |||
16 | #include "at91_rstc.h" | 16 | #include "at91_rstc.h" |
17 | .arm | 17 | .arm |
18 | 18 | ||
19 | /* | ||
20 | * at91_ramc_base is an array void* | ||
21 | * init at NULL if only one DDR controler is present in or DT | ||
22 | */ | ||
19 | .globl at91sam9g45_restart | 23 | .globl at91sam9g45_restart |
20 | 24 | ||
21 | at91sam9g45_restart: | 25 | at91sam9g45_restart: |
22 | ldr r5, =at91_ramc_base @ preload constants | 26 | ldr r5, =at91_ramc_base @ preload constants |
23 | ldr r0, [r5] | 27 | ldr r0, [r5] |
28 | ldr r5, [r5, #4] @ ddr1 | ||
29 | cmp r5, #0 | ||
24 | ldr r4, =at91_rstc_base | 30 | ldr r4, =at91_rstc_base |
25 | ldr r1, [r4] | 31 | ldr r1, [r4] |
26 | 32 | ||
@@ -30,6 +36,8 @@ at91sam9g45_restart: | |||
30 | 36 | ||
31 | .balign 32 @ align to cache line | 37 | .balign 32 @ align to cache line |
32 | 38 | ||
39 | strne r2, [r5, #AT91_DDRSDRC_RTR] @ disable DDR1 access | ||
40 | strne r3, [r5, #AT91_DDRSDRC_LPR] @ power down DDR1 | ||
33 | str r2, [r0, #AT91_DDRSDRC_RTR] @ disable DDR0 access | 41 | str r2, [r0, #AT91_DDRSDRC_RTR] @ disable DDR0 access |
34 | str r3, [r0, #AT91_DDRSDRC_LPR] @ power down DDR0 | 42 | str r3, [r0, #AT91_DDRSDRC_LPR] @ power down DDR0 |
35 | str r4, [r1, #AT91_RSTC_CR] @ reset processor | 43 | str r4, [r1, #AT91_RSTC_CR] @ reset processor |
diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c index 2919eba41ff4..c0e637adf65d 100644 --- a/arch/arm/mach-at91/at91x40_time.c +++ b/arch/arm/mach-at91/at91x40_time.c | |||
@@ -57,7 +57,7 @@ static irqreturn_t at91x40_timer_interrupt(int irq, void *dev_id) | |||
57 | 57 | ||
58 | static struct irqaction at91x40_timer_irq = { | 58 | static struct irqaction at91x40_timer_irq = { |
59 | .name = "at91_tick", | 59 | .name = "at91_tick", |
60 | .flags = IRQF_DISABLED | IRQF_TIMER, | 60 | .flags = IRQF_TIMER, |
61 | .handler = at91x40_timer_interrupt | 61 | .handler = at91x40_timer_interrupt |
62 | }; | 62 | }; |
63 | 63 | ||
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 92b7f770615a..4078ba93776b 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -176,7 +176,7 @@ static struct at24_platform_data eeprom_info = { | |||
176 | .context = (void *)0x7f00, | 176 | .context = (void *)0x7f00, |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct snd_platform_data dm365_evm_snd_data = { | 179 | static struct snd_platform_data dm365_evm_snd_data __maybe_unused = { |
180 | .asp_chan_q = EVENTQ_3, | 180 | .asp_chan_q = EVENTQ_3, |
181 | }; | 181 | }; |
182 | 182 | ||
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 52b8571b2e70..ce402cd21fa0 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -15,8 +15,6 @@ | |||
15 | 15 | ||
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | 17 | ||
18 | #include <linux/platform_device.h> | ||
19 | |||
20 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) | 18 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) |
21 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) | 19 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) |
22 | #define DAVINCI_UART2_BASE (IO_PHYS + 0x20800) | 20 | #define DAVINCI_UART2_BASE (IO_PHYS + 0x20800) |
@@ -39,6 +37,8 @@ | |||
39 | #define UART_DM646X_SCR_TX_WATERMARK 0x08 | 37 | #define UART_DM646X_SCR_TX_WATERMARK 0x08 |
40 | 38 | ||
41 | #ifndef __ASSEMBLY__ | 39 | #ifndef __ASSEMBLY__ |
40 | #include <linux/platform_device.h> | ||
41 | |||
42 | extern int davinci_serial_init(struct platform_device *); | 42 | extern int davinci_serial_init(struct platform_device *); |
43 | #endif | 43 | #endif |
44 | 44 | ||
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index bef100527c42..a87e510fe0c4 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -835,22 +835,6 @@ static struct hw_pci pci_v3 __initdata = { | |||
835 | 835 | ||
836 | #ifdef CONFIG_OF | 836 | #ifdef CONFIG_OF |
837 | 837 | ||
838 | static int __init pci_v3_map_irq_dt(const struct pci_dev *dev, u8 slot, u8 pin) | ||
839 | { | ||
840 | struct of_irq oirq; | ||
841 | int ret; | ||
842 | |||
843 | ret = of_irq_map_pci(dev, &oirq); | ||
844 | if (ret) { | ||
845 | dev_err(&dev->dev, "of_irq_map_pci() %d\n", ret); | ||
846 | /* Proper return code 0 == NO_IRQ */ | ||
847 | return 0; | ||
848 | } | ||
849 | |||
850 | return irq_create_of_mapping(oirq.controller, oirq.specifier, | ||
851 | oirq.size); | ||
852 | } | ||
853 | |||
854 | static int __init pci_v3_dtprobe(struct platform_device *pdev, | 838 | static int __init pci_v3_dtprobe(struct platform_device *pdev, |
855 | struct device_node *np) | 839 | struct device_node *np) |
856 | { | 840 | { |
@@ -919,7 +903,7 @@ static int __init pci_v3_dtprobe(struct platform_device *pdev, | |||
919 | return -EINVAL; | 903 | return -EINVAL; |
920 | } | 904 | } |
921 | 905 | ||
922 | pci_v3.map_irq = pci_v3_map_irq_dt; | 906 | pci_v3.map_irq = of_irq_parse_and_map_pci; |
923 | pci_common_init_dev(&pdev->dev, &pci_v3); | 907 | pci_common_init_dev(&pdev->dev, &pci_v3); |
924 | 908 | ||
925 | return 0; | 909 | return 0; |
diff --git a/arch/arm/mach-integrator/pci_v3.h b/arch/arm/mach-integrator/pci_v3.h index 755fd29fed4a..06a9e2e7d007 100644 --- a/arch/arm/mach-integrator/pci_v3.h +++ b/arch/arm/mach-integrator/pci_v3.h | |||
@@ -1,2 +1,9 @@ | |||
1 | /* Simple oneliner include to the PCIv3 early init */ | 1 | /* Simple oneliner include to the PCIv3 early init */ |
2 | #ifdef CONFIG_PCI | ||
2 | extern int pci_v3_early_init(void); | 3 | extern int pci_v3_early_init(void); |
4 | #else | ||
5 | static inline int pci_v3_early_init(void) | ||
6 | { | ||
7 | return 0; | ||
8 | } | ||
9 | #endif | ||
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index 4c24303ec481..58adf2fd9cfc 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c | |||
@@ -140,6 +140,7 @@ int __init coherency_init(void) | |||
140 | coherency_base = of_iomap(np, 0); | 140 | coherency_base = of_iomap(np, 0); |
141 | coherency_cpu_base = of_iomap(np, 1); | 141 | coherency_cpu_base = of_iomap(np, 1); |
142 | set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); | 142 | set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0); |
143 | of_node_put(np); | ||
143 | } | 144 | } |
144 | 145 | ||
145 | return 0; | 146 | return 0; |
@@ -147,9 +148,14 @@ int __init coherency_init(void) | |||
147 | 148 | ||
148 | static int __init coherency_late_init(void) | 149 | static int __init coherency_late_init(void) |
149 | { | 150 | { |
150 | if (of_find_matching_node(NULL, of_coherency_table)) | 151 | struct device_node *np; |
152 | |||
153 | np = of_find_matching_node(NULL, of_coherency_table); | ||
154 | if (np) { | ||
151 | bus_register_notifier(&platform_bus_type, | 155 | bus_register_notifier(&platform_bus_type, |
152 | &mvebu_hwcc_platform_nb); | 156 | &mvebu_hwcc_platform_nb); |
157 | of_node_put(np); | ||
158 | } | ||
153 | return 0; | 159 | return 0; |
154 | } | 160 | } |
155 | 161 | ||
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 3cc4bef6401c..27fc4f049474 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
@@ -67,6 +67,7 @@ int __init armada_370_xp_pmsu_init(void) | |||
67 | pr_info("Initializing Power Management Service Unit\n"); | 67 | pr_info("Initializing Power Management Service Unit\n"); |
68 | pmsu_mp_base = of_iomap(np, 0); | 68 | pmsu_mp_base = of_iomap(np, 0); |
69 | pmsu_reset_base = of_iomap(np, 1); | 69 | pmsu_reset_base = of_iomap(np, 1); |
70 | of_node_put(np); | ||
70 | } | 71 | } |
71 | 72 | ||
72 | return 0; | 73 | return 0; |
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c index f875124ff4f9..5175083cdb34 100644 --- a/arch/arm/mach-mvebu/system-controller.c +++ b/arch/arm/mach-mvebu/system-controller.c | |||
@@ -98,6 +98,7 @@ static int __init mvebu_system_controller_init(void) | |||
98 | BUG_ON(!match); | 98 | BUG_ON(!match); |
99 | system_controller_base = of_iomap(np, 0); | 99 | system_controller_base = of_iomap(np, 0); |
100 | mvebu_sc = (struct mvebu_system_controller *)match->data; | 100 | mvebu_sc = (struct mvebu_system_controller *)match->data; |
101 | of_node_put(np); | ||
101 | } | 102 | } |
102 | 103 | ||
103 | return 0; | 104 | return 0; |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 39c78387ddec..87162e1b94a5 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -129,6 +129,24 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") | |||
129 | .restart = omap3xxx_restart, | 129 | .restart = omap3xxx_restart, |
130 | MACHINE_END | 130 | MACHINE_END |
131 | 131 | ||
132 | static const char *omap36xx_boards_compat[] __initdata = { | ||
133 | "ti,omap36xx", | ||
134 | NULL, | ||
135 | }; | ||
136 | |||
137 | DT_MACHINE_START(OMAP36XX_DT, "Generic OMAP36xx (Flattened Device Tree)") | ||
138 | .reserve = omap_reserve, | ||
139 | .map_io = omap3_map_io, | ||
140 | .init_early = omap3630_init_early, | ||
141 | .init_irq = omap_intc_of_init, | ||
142 | .handle_irq = omap3_intc_handle_irq, | ||
143 | .init_machine = omap_generic_init, | ||
144 | .init_late = omap3_init_late, | ||
145 | .init_time = omap3_sync32k_timer_init, | ||
146 | .dt_compat = omap36xx_boards_compat, | ||
147 | .restart = omap3xxx_restart, | ||
148 | MACHINE_END | ||
149 | |||
132 | static const char *omap3_gp_boards_compat[] __initdata = { | 150 | static const char *omap3_gp_boards_compat[] __initdata = { |
133 | "ti,omap3-beagle", | 151 | "ti,omap3-beagle", |
134 | "timll,omap3-devkit8000", | 152 | "timll,omap3-devkit8000", |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index c3270c0f1fce..f6fe388af989 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -167,38 +167,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = { | |||
167 | .name = "lp5523:kb1", | 167 | .name = "lp5523:kb1", |
168 | .chan_nr = 0, | 168 | .chan_nr = 0, |
169 | .led_current = 50, | 169 | .led_current = 50, |
170 | .max_current = 100, | ||
170 | }, { | 171 | }, { |
171 | .name = "lp5523:kb2", | 172 | .name = "lp5523:kb2", |
172 | .chan_nr = 1, | 173 | .chan_nr = 1, |
173 | .led_current = 50, | 174 | .led_current = 50, |
175 | .max_current = 100, | ||
174 | }, { | 176 | }, { |
175 | .name = "lp5523:kb3", | 177 | .name = "lp5523:kb3", |
176 | .chan_nr = 2, | 178 | .chan_nr = 2, |
177 | .led_current = 50, | 179 | .led_current = 50, |
180 | .max_current = 100, | ||
178 | }, { | 181 | }, { |
179 | .name = "lp5523:kb4", | 182 | .name = "lp5523:kb4", |
180 | .chan_nr = 3, | 183 | .chan_nr = 3, |
181 | .led_current = 50, | 184 | .led_current = 50, |
185 | .max_current = 100, | ||
182 | }, { | 186 | }, { |
183 | .name = "lp5523:b", | 187 | .name = "lp5523:b", |
184 | .chan_nr = 4, | 188 | .chan_nr = 4, |
185 | .led_current = 50, | 189 | .led_current = 50, |
190 | .max_current = 100, | ||
186 | }, { | 191 | }, { |
187 | .name = "lp5523:g", | 192 | .name = "lp5523:g", |
188 | .chan_nr = 5, | 193 | .chan_nr = 5, |
189 | .led_current = 50, | 194 | .led_current = 50, |
195 | .max_current = 100, | ||
190 | }, { | 196 | }, { |
191 | .name = "lp5523:r", | 197 | .name = "lp5523:r", |
192 | .chan_nr = 6, | 198 | .chan_nr = 6, |
193 | .led_current = 50, | 199 | .led_current = 50, |
200 | .max_current = 100, | ||
194 | }, { | 201 | }, { |
195 | .name = "lp5523:kb5", | 202 | .name = "lp5523:kb5", |
196 | .chan_nr = 7, | 203 | .chan_nr = 7, |
197 | .led_current = 50, | 204 | .led_current = 50, |
205 | .max_current = 100, | ||
198 | }, { | 206 | }, { |
199 | .name = "lp5523:kb6", | 207 | .name = "lp5523:kb6", |
200 | .chan_nr = 8, | 208 | .chan_nr = 8, |
201 | .led_current = 50, | 209 | .led_current = 50, |
210 | .max_current = 100, | ||
202 | } | 211 | } |
203 | }; | 212 | }; |
204 | 213 | ||
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 64b5a8346982..8b6876c98ce1 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
@@ -272,9 +272,19 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base) | |||
272 | struct gpmc_timings t; | 272 | struct gpmc_timings t; |
273 | int ret; | 273 | int ret; |
274 | 274 | ||
275 | if (gpmc_onenand_data->of_node) | 275 | if (gpmc_onenand_data->of_node) { |
276 | gpmc_read_settings_dt(gpmc_onenand_data->of_node, | 276 | gpmc_read_settings_dt(gpmc_onenand_data->of_node, |
277 | &onenand_async); | 277 | &onenand_async); |
278 | if (onenand_async.sync_read || onenand_async.sync_write) { | ||
279 | if (onenand_async.sync_write) | ||
280 | gpmc_onenand_data->flags |= | ||
281 | ONENAND_SYNC_READWRITE; | ||
282 | else | ||
283 | gpmc_onenand_data->flags |= ONENAND_SYNC_READ; | ||
284 | onenand_async.sync_read = false; | ||
285 | onenand_async.sync_write = false; | ||
286 | } | ||
287 | } | ||
278 | 288 | ||
279 | omap2_onenand_set_async_mode(onenand_base); | 289 | omap2_onenand_set_async_mode(onenand_base); |
280 | 290 | ||
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 5d2080ef7923..16f78a990d04 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define OMAP_PULL_UP (1 << 4) | 28 | #define OMAP_PULL_UP (1 << 4) |
29 | #define OMAP_ALTELECTRICALSEL (1 << 5) | 29 | #define OMAP_ALTELECTRICALSEL (1 << 5) |
30 | 30 | ||
31 | /* 34xx specific mux bit defines */ | 31 | /* omap3/4/5 specific mux bit defines */ |
32 | #define OMAP_INPUT_EN (1 << 8) | 32 | #define OMAP_INPUT_EN (1 << 8) |
33 | #define OMAP_OFF_EN (1 << 9) | 33 | #define OMAP_OFF_EN (1 << 9) |
34 | #define OMAP_OFFOUT_EN (1 << 10) | 34 | #define OMAP_OFFOUT_EN (1 << 10) |
@@ -36,8 +36,6 @@ | |||
36 | #define OMAP_OFF_PULL_EN (1 << 12) | 36 | #define OMAP_OFF_PULL_EN (1 << 12) |
37 | #define OMAP_OFF_PULL_UP (1 << 13) | 37 | #define OMAP_OFF_PULL_UP (1 << 13) |
38 | #define OMAP_WAKEUP_EN (1 << 14) | 38 | #define OMAP_WAKEUP_EN (1 << 14) |
39 | |||
40 | /* 44xx specific mux bit defines */ | ||
41 | #define OMAP_WAKEUP_EVENT (1 << 15) | 39 | #define OMAP_WAKEUP_EVENT (1 << 15) |
42 | 40 | ||
43 | /* Active pin states */ | 41 | /* Active pin states */ |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index fa74a0625da1..ead48fa5715e 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -628,7 +628,7 @@ void __init omap4_local_timer_init(void) | |||
628 | #endif /* CONFIG_HAVE_ARM_TWD */ | 628 | #endif /* CONFIG_HAVE_ARM_TWD */ |
629 | #endif /* CONFIG_ARCH_OMAP4 */ | 629 | #endif /* CONFIG_ARCH_OMAP4 */ |
630 | 630 | ||
631 | #ifdef CONFIG_SOC_OMAP5 | 631 | #if defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX) |
632 | void __init omap5_realtime_timer_init(void) | 632 | void __init omap5_realtime_timer_init(void) |
633 | { | 633 | { |
634 | omap4_sync32k_timer_init(); | 634 | omap4_sync32k_timer_init(); |
@@ -636,7 +636,7 @@ void __init omap5_realtime_timer_init(void) | |||
636 | 636 | ||
637 | clocksource_of_init(); | 637 | clocksource_of_init(); |
638 | } | 638 | } |
639 | #endif /* CONFIG_SOC_OMAP5 */ | 639 | #endif /* CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX */ |
640 | 640 | ||
641 | /** | 641 | /** |
642 | * omap_timer_init - build and register timer device with an | 642 | * omap_timer_init - build and register timer device with an |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 5bd1479d3deb..7f8f6076d360 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -1108,9 +1108,9 @@ static const struct pinctrl_map eva_pinctrl_map[] = { | |||
1108 | PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.1", "pfc-r8a7740", | 1108 | PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.1", "pfc-r8a7740", |
1109 | "fsib_mclk_in", "fsib"), | 1109 | "fsib_mclk_in", "fsib"), |
1110 | /* GETHER */ | 1110 | /* GETHER */ |
1111 | PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7740", | 1111 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7740-gether", "pfc-r8a7740", |
1112 | "gether_mii", "gether"), | 1112 | "gether_mii", "gether"), |
1113 | PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7740", | 1113 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7740-gether", "pfc-r8a7740", |
1114 | "gether_int", "gether"), | 1114 | "gether_int", "gether"), |
1115 | /* HDMI */ | 1115 | /* HDMI */ |
1116 | PIN_MAP_MUX_GROUP_DEFAULT("sh-mobile-hdmi", "pfc-r8a7740", | 1116 | PIN_MAP_MUX_GROUP_DEFAULT("sh-mobile-hdmi", "pfc-r8a7740", |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index ffb6f0ac7606..5930af8d434f 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/pinctrl/machine.h> | 29 | #include <linux/pinctrl/machine.h> |
30 | #include <linux/platform_data/gpio-rcar.h> | 30 | #include <linux/platform_data/gpio-rcar.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/phy.h> | ||
32 | #include <linux/regulator/fixed.h> | 33 | #include <linux/regulator/fixed.h> |
33 | #include <linux/regulator/machine.h> | 34 | #include <linux/regulator/machine.h> |
34 | #include <linux/sh_eth.h> | 35 | #include <linux/sh_eth.h> |
@@ -155,6 +156,30 @@ static void __init lager_add_standard_devices(void) | |||
155 | ðer_pdata, sizeof(ether_pdata)); | 156 | ðer_pdata, sizeof(ether_pdata)); |
156 | } | 157 | } |
157 | 158 | ||
159 | /* | ||
160 | * Ether LEDs on the Lager board are named LINK and ACTIVE which corresponds | ||
161 | * to non-default 01 setting of the Micrel KSZ8041 PHY control register 1 bits | ||
162 | * 14-15. We have to set them back to 01 from the default 00 value each time | ||
163 | * the PHY is reset. It's also important because the PHY's LED0 signal is | ||
164 | * connected to SoC's ETH_LINK signal and in the PHY's default mode it will | ||
165 | * bounce on and off after each packet, which we apparently want to avoid. | ||
166 | */ | ||
167 | static int lager_ksz8041_fixup(struct phy_device *phydev) | ||
168 | { | ||
169 | u16 phyctrl1 = phy_read(phydev, 0x1e); | ||
170 | |||
171 | phyctrl1 &= ~0xc000; | ||
172 | phyctrl1 |= 0x4000; | ||
173 | return phy_write(phydev, 0x1e, phyctrl1); | ||
174 | } | ||
175 | |||
176 | static void __init lager_init(void) | ||
177 | { | ||
178 | lager_add_standard_devices(); | ||
179 | |||
180 | phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup); | ||
181 | } | ||
182 | |||
158 | static const char *lager_boards_compat_dt[] __initdata = { | 183 | static const char *lager_boards_compat_dt[] __initdata = { |
159 | "renesas,lager", | 184 | "renesas,lager", |
160 | NULL, | 185 | NULL, |
@@ -163,6 +188,6 @@ static const char *lager_boards_compat_dt[] __initdata = { | |||
163 | DT_MACHINE_START(LAGER_DT, "lager") | 188 | DT_MACHINE_START(LAGER_DT, "lager") |
164 | .init_early = r8a7790_init_delay, | 189 | .init_early = r8a7790_init_delay, |
165 | .init_time = r8a7790_timer_init, | 190 | .init_time = r8a7790_timer_init, |
166 | .init_machine = lager_add_standard_devices, | 191 | .init_machine = lager_init, |
167 | .dt_compat = lager_boards_compat_dt, | 192 | .dt_compat = lager_boards_compat_dt, |
168 | MACHINE_END | 193 | MACHINE_END |
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index b5db207dfd1e..9a5f9fb352ce 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -358,8 +358,7 @@ static struct delay_timer u300_delay_timer; | |||
358 | */ | 358 | */ |
359 | static void __init u300_timer_init_of(struct device_node *np) | 359 | static void __init u300_timer_init_of(struct device_node *np) |
360 | { | 360 | { |
361 | struct resource irq_res; | 361 | unsigned int irq; |
362 | int irq; | ||
363 | struct clk *clk; | 362 | struct clk *clk; |
364 | unsigned long rate; | 363 | unsigned long rate; |
365 | 364 | ||
@@ -368,11 +367,11 @@ static void __init u300_timer_init_of(struct device_node *np) | |||
368 | panic("could not ioremap system timer\n"); | 367 | panic("could not ioremap system timer\n"); |
369 | 368 | ||
370 | /* Get the IRQ for the GP1 timer */ | 369 | /* Get the IRQ for the GP1 timer */ |
371 | irq = of_irq_to_resource(np, 2, &irq_res); | 370 | irq = irq_of_parse_and_map(np, 2); |
372 | if (irq <= 0) | 371 | if (!irq) |
373 | panic("no IRQ for system timer\n"); | 372 | panic("no IRQ for system timer\n"); |
374 | 373 | ||
375 | pr_info("U300 GP1 timer @ base: %p, IRQ: %d\n", u300_timer_base, irq); | 374 | pr_info("U300 GP1 timer @ base: %p, IRQ: %u\n", u300_timer_base, irq); |
376 | 375 | ||
377 | /* Clock the interrupt controller */ | 376 | /* Clock the interrupt controller */ |
378 | clk = of_clk_get(np, 0); | 377 | clk = of_clk_get(np, 0); |
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c index 7aeb5d60e484..e6eb48192912 100644 --- a/arch/arm/mach-vexpress/tc2_pm.c +++ b/arch/arm/mach-vexpress/tc2_pm.c | |||
@@ -131,6 +131,16 @@ static void tc2_pm_down(u64 residency) | |||
131 | } else | 131 | } else |
132 | BUG(); | 132 | BUG(); |
133 | 133 | ||
134 | /* | ||
135 | * If the CPU is committed to power down, make sure | ||
136 | * the power controller will be in charge of waking it | ||
137 | * up upon IRQ, ie IRQ lines are cut from GIC CPU IF | ||
138 | * to the CPU by disabling the GIC CPU IF to prevent wfi | ||
139 | * from completing execution behind power controller back | ||
140 | */ | ||
141 | if (!skip_wfi) | ||
142 | gic_cpu_if_down(); | ||
143 | |||
134 | if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) { | 144 | if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) { |
135 | arch_spin_unlock(&tc2_pm_lock); | 145 | arch_spin_unlock(&tc2_pm_lock); |
136 | 146 | ||
@@ -231,7 +241,6 @@ static void tc2_pm_suspend(u64 residency) | |||
231 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | 241 | cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); |
232 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | 242 | cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); |
233 | ve_spc_set_resume_addr(cluster, cpu, virt_to_phys(mcpm_entry_point)); | 243 | ve_spc_set_resume_addr(cluster, cpu, virt_to_phys(mcpm_entry_point)); |
234 | gic_cpu_if_down(); | ||
235 | tc2_pm_down(residency); | 244 | tc2_pm_down(residency); |
236 | } | 245 | } |
237 | 246 | ||
diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug index 1a6bfe954d49..835c559786bd 100644 --- a/arch/arm64/Kconfig.debug +++ b/arch/arm64/Kconfig.debug | |||
@@ -6,13 +6,6 @@ config FRAME_POINTER | |||
6 | bool | 6 | bool |
7 | default y | 7 | default y |
8 | 8 | ||
9 | config DEBUG_STACK_USAGE | ||
10 | bool "Enable stack utilization instrumentation" | ||
11 | depends on DEBUG_KERNEL | ||
12 | help | ||
13 | Enables the display of the minimum amount of free stack which each | ||
14 | task has ever had available in the sysrq-T output. | ||
15 | |||
16 | config EARLY_PRINTK | 9 | config EARLY_PRINTK |
17 | bool "Early printk support" | 10 | bool "Early printk support" |
18 | default y | 11 | default y |
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 5b3e83217b03..31c81e9b792e 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig | |||
@@ -42,7 +42,7 @@ CONFIG_IP_PNP_BOOTP=y | |||
42 | # CONFIG_WIRELESS is not set | 42 | # CONFIG_WIRELESS is not set |
43 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 43 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
44 | CONFIG_DEVTMPFS=y | 44 | CONFIG_DEVTMPFS=y |
45 | # CONFIG_BLK_DEV is not set | 45 | CONFIG_BLK_DEV=y |
46 | CONFIG_SCSI=y | 46 | CONFIG_SCSI=y |
47 | # CONFIG_SCSI_PROC_FS is not set | 47 | # CONFIG_SCSI_PROC_FS is not set |
48 | CONFIG_BLK_DEV_SD=y | 48 | CONFIG_BLK_DEV_SD=y |
@@ -72,6 +72,7 @@ CONFIG_LOGO=y | |||
72 | # CONFIG_IOMMU_SUPPORT is not set | 72 | # CONFIG_IOMMU_SUPPORT is not set |
73 | CONFIG_EXT2_FS=y | 73 | CONFIG_EXT2_FS=y |
74 | CONFIG_EXT3_FS=y | 74 | CONFIG_EXT3_FS=y |
75 | CONFIG_EXT4_FS=y | ||
75 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 76 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
76 | # CONFIG_EXT3_FS_XATTR is not set | 77 | # CONFIG_EXT3_FS_XATTR is not set |
77 | CONFIG_FUSE_FS=y | 78 | CONFIG_FUSE_FS=y |
@@ -90,3 +91,5 @@ CONFIG_DEBUG_KERNEL=y | |||
90 | CONFIG_DEBUG_INFO=y | 91 | CONFIG_DEBUG_INFO=y |
91 | # CONFIG_FTRACE is not set | 92 | # CONFIG_FTRACE is not set |
92 | CONFIG_ATOMIC64_SELFTEST=y | 93 | CONFIG_ATOMIC64_SELFTEST=y |
94 | CONFIG_VIRTIO_MMIO=y | ||
95 | CONFIG_VIRTIO_BLK=y | ||
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index edb3d5c73a32..7ecc2b23882e 100644 --- a/arch/arm64/include/asm/uaccess.h +++ b/arch/arm64/include/asm/uaccess.h | |||
@@ -166,9 +166,10 @@ do { \ | |||
166 | 166 | ||
167 | #define get_user(x, ptr) \ | 167 | #define get_user(x, ptr) \ |
168 | ({ \ | 168 | ({ \ |
169 | __typeof__(*(ptr)) __user *__p = (ptr); \ | ||
169 | might_fault(); \ | 170 | might_fault(); \ |
170 | access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) ? \ | 171 | access_ok(VERIFY_READ, __p, sizeof(*__p)) ? \ |
171 | __get_user((x), (ptr)) : \ | 172 | __get_user((x), __p) : \ |
172 | ((x) = 0, -EFAULT); \ | 173 | ((x) = 0, -EFAULT); \ |
173 | }) | 174 | }) |
174 | 175 | ||
@@ -227,9 +228,10 @@ do { \ | |||
227 | 228 | ||
228 | #define put_user(x, ptr) \ | 229 | #define put_user(x, ptr) \ |
229 | ({ \ | 230 | ({ \ |
231 | __typeof__(*(ptr)) __user *__p = (ptr); \ | ||
230 | might_fault(); \ | 232 | might_fault(); \ |
231 | access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) ? \ | 233 | access_ok(VERIFY_WRITE, __p, sizeof(*__p)) ? \ |
232 | __put_user((x), (ptr)) : \ | 234 | __put_user((x), __p) : \ |
233 | -EFAULT; \ | 235 | -EFAULT; \ |
234 | }) | 236 | }) |
235 | 237 | ||
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 1f2e4d5a5c0f..bb785d23dbde 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c | |||
@@ -80,8 +80,10 @@ void fpsimd_thread_switch(struct task_struct *next) | |||
80 | 80 | ||
81 | void fpsimd_flush_thread(void) | 81 | void fpsimd_flush_thread(void) |
82 | { | 82 | { |
83 | preempt_disable(); | ||
83 | memset(¤t->thread.fpsimd_state, 0, sizeof(struct fpsimd_state)); | 84 | memset(¤t->thread.fpsimd_state, 0, sizeof(struct fpsimd_state)); |
84 | fpsimd_load_state(¤t->thread.fpsimd_state); | 85 | fpsimd_load_state(¤t->thread.fpsimd_state); |
86 | preempt_enable(); | ||
85 | } | 87 | } |
86 | 88 | ||
87 | #ifdef CONFIG_KERNEL_MODE_NEON | 89 | #ifdef CONFIG_KERNEL_MODE_NEON |
diff --git a/arch/arm64/mm/tlb.S b/arch/arm64/mm/tlb.S index 8ae80a18e8ec..19da91e0cd27 100644 --- a/arch/arm64/mm/tlb.S +++ b/arch/arm64/mm/tlb.S | |||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | ENTRY(__cpu_flush_user_tlb_range) | 36 | ENTRY(__cpu_flush_user_tlb_range) |
37 | vma_vm_mm x3, x2 // get vma->vm_mm | 37 | vma_vm_mm x3, x2 // get vma->vm_mm |
38 | mmid x3, x3 // get vm_mm->context.id | 38 | mmid w3, x3 // get vm_mm->context.id |
39 | dsb sy | 39 | dsb sy |
40 | lsr x0, x0, #12 // align address | 40 | lsr x0, x0, #12 // align address |
41 | lsr x1, x1, #12 | 41 | lsr x1, x1, #12 |
diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index d22af851f3f6..fd7980743890 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild | |||
@@ -1,5 +1,19 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += cputime.h | ||
4 | generic-y += delay.h | ||
5 | generic-y += device.h | ||
6 | generic-y += div64.h | ||
7 | generic-y += emergency-restart.h | ||
3 | generic-y += exec.h | 8 | generic-y += exec.h |
4 | generic-y += trace_clock.h | 9 | generic-y += futex.h |
10 | generic-y += irq_regs.h | ||
5 | generic-y += param.h | 11 | generic-y += param.h |
12 | generic-y += local.h | ||
13 | generic-y += local64.h | ||
14 | generic-y += percpu.h | ||
15 | generic-y += scatterlist.h | ||
16 | generic-y += sections.h | ||
17 | generic-y += topology.h | ||
18 | generic-y += trace_clock.h | ||
19 | generic-y += xor.h | ||
diff --git a/arch/avr32/include/asm/cputime.h b/arch/avr32/include/asm/cputime.h deleted file mode 100644 index e87e0f81cbeb..000000000000 --- a/arch/avr32/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_CPUTIME_H | ||
2 | #define __ASM_AVR32_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_CPUTIME_H */ | ||
diff --git a/arch/avr32/include/asm/delay.h b/arch/avr32/include/asm/delay.h deleted file mode 100644 index 9670e127b7b2..000000000000 --- a/arch/avr32/include/asm/delay.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/delay.h> | ||
diff --git a/arch/avr32/include/asm/device.h b/arch/avr32/include/asm/device.h deleted file mode 100644 index d8f9872b0e2d..000000000000 --- a/arch/avr32/include/asm/device.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #include <asm-generic/device.h> | ||
7 | |||
diff --git a/arch/avr32/include/asm/div64.h b/arch/avr32/include/asm/div64.h deleted file mode 100644 index d7ddd4fdeca6..000000000000 --- a/arch/avr32/include/asm/div64.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_DIV64_H | ||
2 | #define __ASM_AVR32_DIV64_H | ||
3 | |||
4 | #include <asm-generic/div64.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_DIV64_H */ | ||
diff --git a/arch/avr32/include/asm/emergency-restart.h b/arch/avr32/include/asm/emergency-restart.h deleted file mode 100644 index 3e7e014776ba..000000000000 --- a/arch/avr32/include/asm/emergency-restart.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_EMERGENCY_RESTART_H | ||
2 | #define __ASM_AVR32_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_EMERGENCY_RESTART_H */ | ||
diff --git a/arch/avr32/include/asm/futex.h b/arch/avr32/include/asm/futex.h deleted file mode 100644 index 10419f14a68a..000000000000 --- a/arch/avr32/include/asm/futex.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_FUTEX_H | ||
2 | #define __ASM_AVR32_FUTEX_H | ||
3 | |||
4 | #include <asm-generic/futex.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_FUTEX_H */ | ||
diff --git a/arch/avr32/include/asm/irq_regs.h b/arch/avr32/include/asm/irq_regs.h deleted file mode 100644 index 3dd9c0b70270..000000000000 --- a/arch/avr32/include/asm/irq_regs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/irq_regs.h> | ||
diff --git a/arch/avr32/include/asm/local.h b/arch/avr32/include/asm/local.h deleted file mode 100644 index 1c1619694da3..000000000000 --- a/arch/avr32/include/asm/local.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_LOCAL_H | ||
2 | #define __ASM_AVR32_LOCAL_H | ||
3 | |||
4 | #include <asm-generic/local.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_LOCAL_H */ | ||
diff --git a/arch/avr32/include/asm/local64.h b/arch/avr32/include/asm/local64.h deleted file mode 100644 index 36c93b5cc239..000000000000 --- a/arch/avr32/include/asm/local64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local64.h> | ||
diff --git a/arch/avr32/include/asm/percpu.h b/arch/avr32/include/asm/percpu.h deleted file mode 100644 index 69227b4cd0d4..000000000000 --- a/arch/avr32/include/asm/percpu.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_PERCPU_H | ||
2 | #define __ASM_AVR32_PERCPU_H | ||
3 | |||
4 | #include <asm-generic/percpu.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_PERCPU_H */ | ||
diff --git a/arch/avr32/include/asm/scatterlist.h b/arch/avr32/include/asm/scatterlist.h deleted file mode 100644 index a5902d9834e8..000000000000 --- a/arch/avr32/include/asm/scatterlist.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_SCATTERLIST_H | ||
2 | #define __ASM_AVR32_SCATTERLIST_H | ||
3 | |||
4 | #include <asm-generic/scatterlist.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_SCATTERLIST_H */ | ||
diff --git a/arch/avr32/include/asm/sections.h b/arch/avr32/include/asm/sections.h deleted file mode 100644 index aa14252e4181..000000000000 --- a/arch/avr32/include/asm/sections.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_SECTIONS_H | ||
2 | #define __ASM_AVR32_SECTIONS_H | ||
3 | |||
4 | #include <asm-generic/sections.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_SECTIONS_H */ | ||
diff --git a/arch/avr32/include/asm/topology.h b/arch/avr32/include/asm/topology.h deleted file mode 100644 index 5b766cbb4806..000000000000 --- a/arch/avr32/include/asm/topology.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_TOPOLOGY_H | ||
2 | #define __ASM_AVR32_TOPOLOGY_H | ||
3 | |||
4 | #include <asm-generic/topology.h> | ||
5 | |||
6 | #endif /* __ASM_AVR32_TOPOLOGY_H */ | ||
diff --git a/arch/avr32/include/asm/xor.h b/arch/avr32/include/asm/xor.h deleted file mode 100644 index 99c87aa0af4f..000000000000 --- a/arch/avr32/include/asm/xor.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_XOR_H | ||
2 | #define _ASM_XOR_H | ||
3 | |||
4 | #include <asm-generic/xor.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index c2731003edef..42a53e740a7e 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -289,7 +289,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
289 | memset(childregs, 0, sizeof(struct pt_regs)); | 289 | memset(childregs, 0, sizeof(struct pt_regs)); |
290 | p->thread.cpu_context.r0 = arg; | 290 | p->thread.cpu_context.r0 = arg; |
291 | p->thread.cpu_context.r1 = usp; /* fn */ | 291 | p->thread.cpu_context.r1 = usp; /* fn */ |
292 | p->thread.cpu_context.r2 = syscall_return; | 292 | p->thread.cpu_context.r2 = (unsigned long)syscall_return; |
293 | p->thread.cpu_context.pc = (unsigned long)ret_from_kernel_thread; | 293 | p->thread.cpu_context.pc = (unsigned long)ret_from_kernel_thread; |
294 | childregs->sr = MODE_SUPERVISOR; | 294 | childregs->sr = MODE_SUPERVISOR; |
295 | } else { | 295 | } else { |
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 869a1c6ffeee..12f828ad5058 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c | |||
@@ -98,7 +98,14 @@ static void comparator_mode(enum clock_event_mode mode, | |||
98 | case CLOCK_EVT_MODE_SHUTDOWN: | 98 | case CLOCK_EVT_MODE_SHUTDOWN: |
99 | sysreg_write(COMPARE, 0); | 99 | sysreg_write(COMPARE, 0); |
100 | pr_debug("%s: stop\n", evdev->name); | 100 | pr_debug("%s: stop\n", evdev->name); |
101 | cpu_idle_poll_ctrl(false); | 101 | if (evdev->mode == CLOCK_EVT_MODE_ONESHOT || |
102 | evdev->mode == CLOCK_EVT_MODE_RESUME) { | ||
103 | /* | ||
104 | * Only disable idle poll if we have forced that | ||
105 | * in a previous call. | ||
106 | */ | ||
107 | cpu_idle_poll_ctrl(false); | ||
108 | } | ||
102 | break; | 109 | break; |
103 | default: | 110 | default: |
104 | BUG(); | 111 | BUG(); |
diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h index d52abb6812fa..935f9bec414a 100644 --- a/arch/microblaze/include/asm/pci.h +++ b/arch/microblaze/include/asm/pci.h | |||
@@ -127,8 +127,6 @@ extern void of_scan_pci_bridge(struct device_node *node, | |||
127 | extern void of_scan_bus(struct device_node *node, struct pci_bus *bus); | 127 | extern void of_scan_bus(struct device_node *node, struct pci_bus *bus); |
128 | extern void of_rescan_bus(struct device_node *node, struct pci_bus *bus); | 128 | extern void of_rescan_bus(struct device_node *node, struct pci_bus *bus); |
129 | 129 | ||
130 | extern int pci_read_irq_line(struct pci_dev *dev); | ||
131 | |||
132 | extern int pci_bus_find_capability(struct pci_bus *bus, | 130 | extern int pci_bus_find_capability(struct pci_bus *bus, |
133 | unsigned int devfn, int cap); | 131 | unsigned int devfn, int cap); |
134 | 132 | ||
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 7c8a35238f74..66804adcacf0 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -194,76 +194,6 @@ void pcibios_set_master(struct pci_dev *dev) | |||
194 | } | 194 | } |
195 | 195 | ||
196 | /* | 196 | /* |
197 | * Reads the interrupt pin to determine if interrupt is use by card. | ||
198 | * If the interrupt is used, then gets the interrupt line from the | ||
199 | * openfirmware and sets it in the pci_dev and pci_config line. | ||
200 | */ | ||
201 | int pci_read_irq_line(struct pci_dev *pci_dev) | ||
202 | { | ||
203 | struct of_irq oirq; | ||
204 | unsigned int virq; | ||
205 | |||
206 | /* The current device-tree that iSeries generates from the HV | ||
207 | * PCI informations doesn't contain proper interrupt routing, | ||
208 | * and all the fallback would do is print out crap, so we | ||
209 | * don't attempt to resolve the interrupts here at all, some | ||
210 | * iSeries specific fixup does it. | ||
211 | * | ||
212 | * In the long run, we will hopefully fix the generated device-tree | ||
213 | * instead. | ||
214 | */ | ||
215 | pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev)); | ||
216 | |||
217 | #ifdef DEBUG | ||
218 | memset(&oirq, 0xff, sizeof(oirq)); | ||
219 | #endif | ||
220 | /* Try to get a mapping from the device-tree */ | ||
221 | if (of_irq_map_pci(pci_dev, &oirq)) { | ||
222 | u8 line, pin; | ||
223 | |||
224 | /* If that fails, lets fallback to what is in the config | ||
225 | * space and map that through the default controller. We | ||
226 | * also set the type to level low since that's what PCI | ||
227 | * interrupts are. If your platform does differently, then | ||
228 | * either provide a proper interrupt tree or don't use this | ||
229 | * function. | ||
230 | */ | ||
231 | if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin)) | ||
232 | return -1; | ||
233 | if (pin == 0) | ||
234 | return -1; | ||
235 | if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) || | ||
236 | line == 0xff || line == 0) { | ||
237 | return -1; | ||
238 | } | ||
239 | pr_debug(" No map ! Using line %d (pin %d) from PCI config\n", | ||
240 | line, pin); | ||
241 | |||
242 | virq = irq_create_mapping(NULL, line); | ||
243 | if (virq) | ||
244 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); | ||
245 | } else { | ||
246 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", | ||
247 | oirq.size, oirq.specifier[0], oirq.specifier[1], | ||
248 | of_node_full_name(oirq.controller)); | ||
249 | |||
250 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | ||
251 | oirq.size); | ||
252 | } | ||
253 | if (!virq) { | ||
254 | pr_debug(" Failed to map !\n"); | ||
255 | return -1; | ||
256 | } | ||
257 | |||
258 | pr_debug(" Mapped to linux irq %d\n", virq); | ||
259 | |||
260 | pci_dev->irq = virq; | ||
261 | |||
262 | return 0; | ||
263 | } | ||
264 | EXPORT_SYMBOL(pci_read_irq_line); | ||
265 | |||
266 | /* | ||
267 | * Platform support for /proc/bus/pci/X/Y mmap()s, | 197 | * Platform support for /proc/bus/pci/X/Y mmap()s, |
268 | * modelled on the sparc64 implementation by Dave Miller. | 198 | * modelled on the sparc64 implementation by Dave Miller. |
269 | * -- paulus. | 199 | * -- paulus. |
@@ -961,7 +891,7 @@ void pcibios_setup_bus_devices(struct pci_bus *bus) | |||
961 | dev->dev.archdata.dma_data = (void *)PCI_DRAM_OFFSET; | 891 | dev->dev.archdata.dma_data = (void *)PCI_DRAM_OFFSET; |
962 | 892 | ||
963 | /* Read default IRQs and fixup if necessary */ | 893 | /* Read default IRQs and fixup if necessary */ |
964 | pci_read_irq_line(dev); | 894 | dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); |
965 | } | 895 | } |
966 | } | 896 | } |
967 | 897 | ||
diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c index 4a9baa9f6330..9969dbab19e3 100644 --- a/arch/mips/alchemy/board-mtx1.c +++ b/arch/mips/alchemy/board-mtx1.c | |||
@@ -276,7 +276,7 @@ static struct platform_device mtx1_pci_host = { | |||
276 | .resource = alchemy_pci_host_res, | 276 | .resource = alchemy_pci_host_res, |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static struct __initdata platform_device * mtx1_devs[] = { | 279 | static struct platform_device *mtx1_devs[] __initdata = { |
280 | &mtx1_pci_host, | 280 | &mtx1_pci_host, |
281 | &mtx1_gpio_leds, | 281 | &mtx1_gpio_leds, |
282 | &mtx1_wdt, | 282 | &mtx1_wdt, |
diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h index 4d6d77ed9b9d..e194f957ca8c 100644 --- a/arch/mips/include/asm/jump_label.h +++ b/arch/mips/include/asm/jump_label.h | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | static __always_inline bool arch_static_branch(struct static_key *key) | 23 | static __always_inline bool arch_static_branch(struct static_key *key) |
24 | { | 24 | { |
25 | asm goto("1:\tnop\n\t" | 25 | asm_volatile_goto("1:\tnop\n\t" |
26 | "nop\n\t" | 26 | "nop\n\t" |
27 | ".pushsection __jump_table, \"aw\"\n\t" | 27 | ".pushsection __jump_table, \"aw\"\n\t" |
28 | WORD_INSN " 1b, %l[l_yes], %0\n\t" | 28 | WORD_INSN " 1b, %l[l_yes], %0\n\t" |
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S index 4204d76af854..029e002a4ea0 100644 --- a/arch/mips/kernel/octeon_switch.S +++ b/arch/mips/kernel/octeon_switch.S | |||
@@ -73,7 +73,7 @@ | |||
73 | 3: | 73 | 3: |
74 | 74 | ||
75 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) | 75 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) |
76 | PTR_L t8, __stack_chk_guard | 76 | PTR_LA t8, __stack_chk_guard |
77 | LONG_L t9, TASK_STACK_CANARY(a1) | 77 | LONG_L t9, TASK_STACK_CANARY(a1) |
78 | LONG_S t9, 0(t8) | 78 | LONG_S t9, 0(t8) |
79 | #endif | 79 | #endif |
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 38af83f84c4a..20b7b040e76f 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
@@ -67,7 +67,7 @@ LEAF(resume) | |||
67 | 1: | 67 | 1: |
68 | 68 | ||
69 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) | 69 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) |
70 | PTR_L t8, __stack_chk_guard | 70 | PTR_LA t8, __stack_chk_guard |
71 | LONG_L t9, TASK_STACK_CANARY(a1) | 71 | LONG_L t9, TASK_STACK_CANARY(a1) |
72 | LONG_S t9, 0(t8) | 72 | LONG_S t9, 0(t8) |
73 | #endif | 73 | #endif |
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 921238a6bd26..078de5eaca8f 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
@@ -69,7 +69,7 @@ | |||
69 | 1: | 69 | 1: |
70 | 70 | ||
71 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) | 71 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) |
72 | PTR_L t8, __stack_chk_guard | 72 | PTR_LA t8, __stack_chk_guard |
73 | LONG_L t9, TASK_STACK_CANARY(a1) | 73 | LONG_L t9, TASK_STACK_CANARY(a1) |
74 | LONG_S t9, 0(t8) | 74 | LONG_S t9, 0(t8) |
75 | #endif | 75 | #endif |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 627883bc6d5f..bc6f96fcb529 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -609,6 +609,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
609 | r4k_blast_scache(); | 609 | r4k_blast_scache(); |
610 | else | 610 | else |
611 | blast_scache_range(addr, addr + size); | 611 | blast_scache_range(addr, addr + size); |
612 | preempt_enable(); | ||
612 | __sync(); | 613 | __sync(); |
613 | return; | 614 | return; |
614 | } | 615 | } |
@@ -650,6 +651,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
650 | */ | 651 | */ |
651 | blast_inv_scache_range(addr, addr + size); | 652 | blast_inv_scache_range(addr, addr + size); |
652 | } | 653 | } |
654 | preempt_enable(); | ||
653 | __sync(); | 655 | __sync(); |
654 | return; | 656 | return; |
655 | } | 657 | } |
diff --git a/arch/mips/pci/fixup-lantiq.c b/arch/mips/pci/fixup-lantiq.c index 6c829df28dc7..c2ce41ea61d7 100644 --- a/arch/mips/pci/fixup-lantiq.c +++ b/arch/mips/pci/fixup-lantiq.c | |||
@@ -25,16 +25,5 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
25 | 25 | ||
26 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 26 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
27 | { | 27 | { |
28 | struct of_irq dev_irq; | 28 | return of_irq_parse_and_map_pci(dev, slot, pin); |
29 | int irq; | ||
30 | |||
31 | if (of_irq_map_pci(dev, &dev_irq)) { | ||
32 | dev_err(&dev->dev, "trying to map irq for unknown slot:%d pin:%d\n", | ||
33 | slot, pin); | ||
34 | return 0; | ||
35 | } | ||
36 | irq = irq_create_of_mapping(dev_irq.controller, dev_irq.specifier, | ||
37 | dev_irq.size); | ||
38 | dev_info(&dev->dev, "SLOT:%d PIN:%d IRQ:%d\n", slot, pin, irq); | ||
39 | return irq; | ||
40 | } | 29 | } |
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index 95c9d41382e7..adeff2bfe4cd 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c | |||
@@ -583,29 +583,7 @@ err_put_intc_node: | |||
583 | 583 | ||
584 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 584 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
585 | { | 585 | { |
586 | struct of_irq dev_irq; | 586 | return of_irq_parse_and_map_pci(dev, slot, pin); |
587 | int err; | ||
588 | int irq; | ||
589 | |||
590 | err = of_irq_map_pci(dev, &dev_irq); | ||
591 | if (err) { | ||
592 | pr_err("pci %s: unable to get irq map, err=%d\n", | ||
593 | pci_name((struct pci_dev *) dev), err); | ||
594 | return 0; | ||
595 | } | ||
596 | |||
597 | irq = irq_create_of_mapping(dev_irq.controller, | ||
598 | dev_irq.specifier, | ||
599 | dev_irq.size); | ||
600 | |||
601 | if (irq == 0) | ||
602 | pr_crit("pci %s: no irq found for pin %u\n", | ||
603 | pci_name((struct pci_dev *) dev), pin); | ||
604 | else | ||
605 | pr_info("pci %s: using irq %d for pin %u\n", | ||
606 | pci_name((struct pci_dev *) dev), irq, pin); | ||
607 | |||
608 | return irq; | ||
609 | } | 587 | } |
610 | 588 | ||
611 | int pcibios_plat_dev_init(struct pci_dev *dev) | 589 | int pcibios_plat_dev_init(struct pci_dev *dev) |
diff --git a/arch/parisc/include/asm/traps.h b/arch/parisc/include/asm/traps.h index 1945f995f2df..4736020ba5ea 100644 --- a/arch/parisc/include/asm/traps.h +++ b/arch/parisc/include/asm/traps.h | |||
@@ -6,7 +6,7 @@ struct pt_regs; | |||
6 | 6 | ||
7 | /* traps.c */ | 7 | /* traps.c */ |
8 | void parisc_terminate(char *msg, struct pt_regs *regs, | 8 | void parisc_terminate(char *msg, struct pt_regs *regs, |
9 | int code, unsigned long offset); | 9 | int code, unsigned long offset) __noreturn __cold; |
10 | 10 | ||
11 | /* mm/fault.c */ | 11 | /* mm/fault.c */ |
12 | void do_page_fault(struct pt_regs *regs, unsigned long code, | 12 | void do_page_fault(struct pt_regs *regs, unsigned long code, |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index c035673209f7..b521c0adf4ec 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -602,6 +602,7 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long | |||
602 | __flush_cache_page(vma, vmaddr, PFN_PHYS(pfn)); | 602 | __flush_cache_page(vma, vmaddr, PFN_PHYS(pfn)); |
603 | } | 603 | } |
604 | } | 604 | } |
605 | EXPORT_SYMBOL_GPL(flush_cache_page); | ||
605 | 606 | ||
606 | #ifdef CONFIG_PARISC_TMPALIAS | 607 | #ifdef CONFIG_PARISC_TMPALIAS |
607 | 608 | ||
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 8a252f2d6c08..2b96602e812f 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -72,7 +72,6 @@ enum ipi_message_type { | |||
72 | IPI_NOP=0, | 72 | IPI_NOP=0, |
73 | IPI_RESCHEDULE=1, | 73 | IPI_RESCHEDULE=1, |
74 | IPI_CALL_FUNC, | 74 | IPI_CALL_FUNC, |
75 | IPI_CALL_FUNC_SINGLE, | ||
76 | IPI_CPU_START, | 75 | IPI_CPU_START, |
77 | IPI_CPU_STOP, | 76 | IPI_CPU_STOP, |
78 | IPI_CPU_TEST | 77 | IPI_CPU_TEST |
@@ -164,11 +163,6 @@ ipi_interrupt(int irq, void *dev_id) | |||
164 | generic_smp_call_function_interrupt(); | 163 | generic_smp_call_function_interrupt(); |
165 | break; | 164 | break; |
166 | 165 | ||
167 | case IPI_CALL_FUNC_SINGLE: | ||
168 | smp_debug(100, KERN_DEBUG "CPU%d IPI_CALL_FUNC_SINGLE\n", this_cpu); | ||
169 | generic_smp_call_function_single_interrupt(); | ||
170 | break; | ||
171 | |||
172 | case IPI_CPU_START: | 166 | case IPI_CPU_START: |
173 | smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu); | 167 | smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu); |
174 | break; | 168 | break; |
@@ -260,7 +254,7 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask) | |||
260 | 254 | ||
261 | void arch_send_call_function_single_ipi(int cpu) | 255 | void arch_send_call_function_single_ipi(int cpu) |
262 | { | 256 | { |
263 | send_IPI_single(cpu, IPI_CALL_FUNC_SINGLE); | 257 | send_IPI_single(cpu, IPI_CALL_FUNC); |
264 | } | 258 | } |
265 | 259 | ||
266 | /* | 260 | /* |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 04e47c6a4562..1cd1d0c83b6d 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -291,11 +291,6 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err) | |||
291 | do_exit(SIGSEGV); | 291 | do_exit(SIGSEGV); |
292 | } | 292 | } |
293 | 293 | ||
294 | int syscall_ipi(int (*syscall) (struct pt_regs *), struct pt_regs *regs) | ||
295 | { | ||
296 | return syscall(regs); | ||
297 | } | ||
298 | |||
299 | /* gdb uses break 4,8 */ | 294 | /* gdb uses break 4,8 */ |
300 | #define GDB_BREAK_INSN 0x10004 | 295 | #define GDB_BREAK_INSN 0x10004 |
301 | static void handle_gdb_break(struct pt_regs *regs, int wot) | 296 | static void handle_gdb_break(struct pt_regs *regs, int wot) |
@@ -805,14 +800,14 @@ void notrace handle_interruption(int code, struct pt_regs *regs) | |||
805 | else { | 800 | else { |
806 | 801 | ||
807 | /* | 802 | /* |
808 | * The kernel should never fault on its own address space. | 803 | * The kernel should never fault on its own address space, |
804 | * unless pagefault_disable() was called before. | ||
809 | */ | 805 | */ |
810 | 806 | ||
811 | if (fault_space == 0) | 807 | if (fault_space == 0 && !in_atomic()) |
812 | { | 808 | { |
813 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC); | 809 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC); |
814 | parisc_terminate("Kernel Fault", regs, code, fault_address); | 810 | parisc_terminate("Kernel Fault", regs, code, fault_address); |
815 | |||
816 | } | 811 | } |
817 | } | 812 | } |
818 | 813 | ||
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index ac4370b1ca40..b5507ec06b84 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c | |||
@@ -56,7 +56,7 @@ | |||
56 | #ifdef __KERNEL__ | 56 | #ifdef __KERNEL__ |
57 | #include <linux/module.h> | 57 | #include <linux/module.h> |
58 | #include <linux/compiler.h> | 58 | #include <linux/compiler.h> |
59 | #include <asm/uaccess.h> | 59 | #include <linux/uaccess.h> |
60 | #define s_space "%%sr1" | 60 | #define s_space "%%sr1" |
61 | #define d_space "%%sr2" | 61 | #define d_space "%%sr2" |
62 | #else | 62 | #else |
@@ -524,4 +524,17 @@ EXPORT_SYMBOL(copy_to_user); | |||
524 | EXPORT_SYMBOL(copy_from_user); | 524 | EXPORT_SYMBOL(copy_from_user); |
525 | EXPORT_SYMBOL(copy_in_user); | 525 | EXPORT_SYMBOL(copy_in_user); |
526 | EXPORT_SYMBOL(memcpy); | 526 | EXPORT_SYMBOL(memcpy); |
527 | |||
528 | long probe_kernel_read(void *dst, const void *src, size_t size) | ||
529 | { | ||
530 | unsigned long addr = (unsigned long)src; | ||
531 | |||
532 | if (size < 0 || addr < PAGE_SIZE) | ||
533 | return -EFAULT; | ||
534 | |||
535 | /* check for I/O space F_EXTEND(0xfff00000) access as well? */ | ||
536 | |||
537 | return __probe_kernel_read(dst, src, size); | ||
538 | } | ||
539 | |||
527 | #endif | 540 | #endif |
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index d10d27a720c0..0293588d5b8c 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c | |||
@@ -171,17 +171,25 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, | |||
171 | unsigned long address) | 171 | unsigned long address) |
172 | { | 172 | { |
173 | struct vm_area_struct *vma, *prev_vma; | 173 | struct vm_area_struct *vma, *prev_vma; |
174 | struct task_struct *tsk = current; | 174 | struct task_struct *tsk; |
175 | struct mm_struct *mm = tsk->mm; | 175 | struct mm_struct *mm; |
176 | unsigned long acc_type; | 176 | unsigned long acc_type; |
177 | int fault; | 177 | int fault; |
178 | unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; | 178 | unsigned int flags; |
179 | 179 | ||
180 | if (in_atomic() || !mm) | 180 | if (in_atomic()) |
181 | goto no_context; | 181 | goto no_context; |
182 | 182 | ||
183 | tsk = current; | ||
184 | mm = tsk->mm; | ||
185 | if (!mm) | ||
186 | goto no_context; | ||
187 | |||
188 | flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; | ||
183 | if (user_mode(regs)) | 189 | if (user_mode(regs)) |
184 | flags |= FAULT_FLAG_USER; | 190 | flags |= FAULT_FLAG_USER; |
191 | |||
192 | acc_type = parisc_acctyp(code, regs->iir); | ||
185 | if (acc_type & VM_WRITE) | 193 | if (acc_type & VM_WRITE) |
186 | flags |= FAULT_FLAG_WRITE; | 194 | flags |= FAULT_FLAG_WRITE; |
187 | retry: | 195 | retry: |
@@ -196,8 +204,6 @@ retry: | |||
196 | 204 | ||
197 | good_area: | 205 | good_area: |
198 | 206 | ||
199 | acc_type = parisc_acctyp(code,regs->iir); | ||
200 | |||
201 | if ((vma->vm_flags & acc_type) != acc_type) | 207 | if ((vma->vm_flags & acc_type) != acc_type) |
202 | goto bad_area; | 208 | goto bad_area; |
203 | 209 | ||
diff --git a/arch/powerpc/include/asm/jump_label.h b/arch/powerpc/include/asm/jump_label.h index ae098c438f00..f016bb699b5f 100644 --- a/arch/powerpc/include/asm/jump_label.h +++ b/arch/powerpc/include/asm/jump_label.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | static __always_inline bool arch_static_branch(struct static_key *key) | 20 | static __always_inline bool arch_static_branch(struct static_key *key) |
21 | { | 21 | { |
22 | asm goto("1:\n\t" | 22 | asm_volatile_goto("1:\n\t" |
23 | "nop\n\t" | 23 | "nop\n\t" |
24 | ".pushsection __jump_table, \"aw\"\n\t" | 24 | ".pushsection __jump_table, \"aw\"\n\t" |
25 | JUMP_ENTRY_TYPE "1b, %l[l_yes], %c0\n\t" | 25 | JUMP_ENTRY_TYPE "1b, %l[l_yes], %c0\n\t" |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 0adab06ce5c0..572bb5b95f35 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -661,7 +661,7 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid) | |||
661 | /* number of bytes needed for the bitmap */ | 661 | /* number of bytes needed for the bitmap */ |
662 | sz = BITS_TO_LONGS(tbl->it_size) * sizeof(unsigned long); | 662 | sz = BITS_TO_LONGS(tbl->it_size) * sizeof(unsigned long); |
663 | 663 | ||
664 | page = alloc_pages_node(nid, GFP_ATOMIC, get_order(sz)); | 664 | page = alloc_pages_node(nid, GFP_KERNEL, get_order(sz)); |
665 | if (!page) | 665 | if (!page) |
666 | panic("iommu_init_table: Can't allocate %ld bytes\n", sz); | 666 | panic("iommu_init_table: Can't allocate %ld bytes\n", sz); |
667 | tbl->it_map = page_address(page); | 667 | tbl->it_map = page_address(page); |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 57d286a78f86..c7cb8c232d2f 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -495,14 +495,15 @@ void __do_irq(struct pt_regs *regs) | |||
495 | void do_IRQ(struct pt_regs *regs) | 495 | void do_IRQ(struct pt_regs *regs) |
496 | { | 496 | { |
497 | struct pt_regs *old_regs = set_irq_regs(regs); | 497 | struct pt_regs *old_regs = set_irq_regs(regs); |
498 | struct thread_info *curtp, *irqtp; | 498 | struct thread_info *curtp, *irqtp, *sirqtp; |
499 | 499 | ||
500 | /* Switch to the irq stack to handle this */ | 500 | /* Switch to the irq stack to handle this */ |
501 | curtp = current_thread_info(); | 501 | curtp = current_thread_info(); |
502 | irqtp = hardirq_ctx[raw_smp_processor_id()]; | 502 | irqtp = hardirq_ctx[raw_smp_processor_id()]; |
503 | sirqtp = softirq_ctx[raw_smp_processor_id()]; | ||
503 | 504 | ||
504 | /* Already there ? */ | 505 | /* Already there ? */ |
505 | if (unlikely(curtp == irqtp)) { | 506 | if (unlikely(curtp == irqtp || curtp == sirqtp)) { |
506 | __do_irq(regs); | 507 | __do_irq(regs); |
507 | set_irq_regs(old_regs); | 508 | set_irq_regs(old_regs); |
508 | return; | 509 | return; |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 905a24bb7acc..a1e3e40ca3fd 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -228,7 +228,7 @@ int pcibios_add_platform_entries(struct pci_dev *pdev) | |||
228 | */ | 228 | */ |
229 | static int pci_read_irq_line(struct pci_dev *pci_dev) | 229 | static int pci_read_irq_line(struct pci_dev *pci_dev) |
230 | { | 230 | { |
231 | struct of_irq oirq; | 231 | struct of_phandle_args oirq; |
232 | unsigned int virq; | 232 | unsigned int virq; |
233 | 233 | ||
234 | pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev)); | 234 | pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev)); |
@@ -237,7 +237,7 @@ static int pci_read_irq_line(struct pci_dev *pci_dev) | |||
237 | memset(&oirq, 0xff, sizeof(oirq)); | 237 | memset(&oirq, 0xff, sizeof(oirq)); |
238 | #endif | 238 | #endif |
239 | /* Try to get a mapping from the device-tree */ | 239 | /* Try to get a mapping from the device-tree */ |
240 | if (of_irq_map_pci(pci_dev, &oirq)) { | 240 | if (of_irq_parse_pci(pci_dev, &oirq)) { |
241 | u8 line, pin; | 241 | u8 line, pin; |
242 | 242 | ||
243 | /* If that fails, lets fallback to what is in the config | 243 | /* If that fails, lets fallback to what is in the config |
@@ -263,11 +263,10 @@ static int pci_read_irq_line(struct pci_dev *pci_dev) | |||
263 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); | 263 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); |
264 | } else { | 264 | } else { |
265 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", | 265 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", |
266 | oirq.size, oirq.specifier[0], oirq.specifier[1], | 266 | oirq.args_count, oirq.args[0], oirq.args[1], |
267 | of_node_full_name(oirq.controller)); | 267 | of_node_full_name(oirq.np)); |
268 | 268 | ||
269 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 269 | virq = irq_create_of_mapping(&oirq); |
270 | oirq.size); | ||
271 | } | 270 | } |
272 | if(virq == NO_IRQ) { | 271 | if(virq == NO_IRQ) { |
273 | pr_debug(" Failed to map !\n"); | 272 | pr_debug(" Failed to map !\n"); |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 27a90b99ef67..b4e667663d9b 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/machdep.h> | 17 | #include <asm/machdep.h> |
18 | #include <asm/smp.h> | 18 | #include <asm/smp.h> |
19 | #include <asm/pmc.h> | 19 | #include <asm/pmc.h> |
20 | #include <asm/firmware.h> | ||
20 | 21 | ||
21 | #include "cacheinfo.h" | 22 | #include "cacheinfo.h" |
22 | 23 | ||
@@ -179,15 +180,25 @@ SYSFS_PMCSETUP(spurr, SPRN_SPURR); | |||
179 | SYSFS_PMCSETUP(dscr, SPRN_DSCR); | 180 | SYSFS_PMCSETUP(dscr, SPRN_DSCR); |
180 | SYSFS_PMCSETUP(pir, SPRN_PIR); | 181 | SYSFS_PMCSETUP(pir, SPRN_PIR); |
181 | 182 | ||
183 | /* | ||
184 | Lets only enable read for phyp resources and | ||
185 | enable write when needed with a separate function. | ||
186 | Lets be conservative and default to pseries. | ||
187 | */ | ||
182 | static DEVICE_ATTR(mmcra, 0600, show_mmcra, store_mmcra); | 188 | static DEVICE_ATTR(mmcra, 0600, show_mmcra, store_mmcra); |
183 | static DEVICE_ATTR(spurr, 0400, show_spurr, NULL); | 189 | static DEVICE_ATTR(spurr, 0400, show_spurr, NULL); |
184 | static DEVICE_ATTR(dscr, 0600, show_dscr, store_dscr); | 190 | static DEVICE_ATTR(dscr, 0600, show_dscr, store_dscr); |
185 | static DEVICE_ATTR(purr, 0600, show_purr, store_purr); | 191 | static DEVICE_ATTR(purr, 0400, show_purr, store_purr); |
186 | static DEVICE_ATTR(pir, 0400, show_pir, NULL); | 192 | static DEVICE_ATTR(pir, 0400, show_pir, NULL); |
187 | 193 | ||
188 | unsigned long dscr_default = 0; | 194 | unsigned long dscr_default = 0; |
189 | EXPORT_SYMBOL(dscr_default); | 195 | EXPORT_SYMBOL(dscr_default); |
190 | 196 | ||
197 | static void add_write_permission_dev_attr(struct device_attribute *attr) | ||
198 | { | ||
199 | attr->attr.mode |= 0200; | ||
200 | } | ||
201 | |||
191 | static ssize_t show_dscr_default(struct device *dev, | 202 | static ssize_t show_dscr_default(struct device *dev, |
192 | struct device_attribute *attr, char *buf) | 203 | struct device_attribute *attr, char *buf) |
193 | { | 204 | { |
@@ -394,8 +405,11 @@ static void register_cpu_online(unsigned int cpu) | |||
394 | if (cpu_has_feature(CPU_FTR_MMCRA)) | 405 | if (cpu_has_feature(CPU_FTR_MMCRA)) |
395 | device_create_file(s, &dev_attr_mmcra); | 406 | device_create_file(s, &dev_attr_mmcra); |
396 | 407 | ||
397 | if (cpu_has_feature(CPU_FTR_PURR)) | 408 | if (cpu_has_feature(CPU_FTR_PURR)) { |
409 | if (!firmware_has_feature(FW_FEATURE_LPAR)) | ||
410 | add_write_permission_dev_attr(&dev_attr_purr); | ||
398 | device_create_file(s, &dev_attr_purr); | 411 | device_create_file(s, &dev_attr_purr); |
412 | } | ||
399 | 413 | ||
400 | if (cpu_has_feature(CPU_FTR_SPURR)) | 414 | if (cpu_has_feature(CPU_FTR_SPURR)) |
401 | device_create_file(s, &dev_attr_spurr); | 415 | device_create_file(s, &dev_attr_spurr); |
diff --git a/arch/powerpc/kernel/tm.S b/arch/powerpc/kernel/tm.S index 7b60b9851469..cd809eaa8b5c 100644 --- a/arch/powerpc/kernel/tm.S +++ b/arch/powerpc/kernel/tm.S | |||
@@ -79,6 +79,11 @@ _GLOBAL(tm_abort) | |||
79 | TABORT(R3) | 79 | TABORT(R3) |
80 | blr | 80 | blr |
81 | 81 | ||
82 | .section ".toc","aw" | ||
83 | DSCR_DEFAULT: | ||
84 | .tc dscr_default[TC],dscr_default | ||
85 | |||
86 | .section ".text" | ||
82 | 87 | ||
83 | /* void tm_reclaim(struct thread_struct *thread, | 88 | /* void tm_reclaim(struct thread_struct *thread, |
84 | * unsigned long orig_msr, | 89 | * unsigned long orig_msr, |
@@ -123,6 +128,7 @@ _GLOBAL(tm_reclaim) | |||
123 | mr r15, r14 | 128 | mr r15, r14 |
124 | ori r15, r15, MSR_FP | 129 | ori r15, r15, MSR_FP |
125 | li r16, MSR_RI | 130 | li r16, MSR_RI |
131 | ori r16, r16, MSR_EE /* IRQs hard off */ | ||
126 | andc r15, r15, r16 | 132 | andc r15, r15, r16 |
127 | oris r15, r15, MSR_VEC@h | 133 | oris r15, r15, MSR_VEC@h |
128 | #ifdef CONFIG_VSX | 134 | #ifdef CONFIG_VSX |
@@ -187,11 +193,18 @@ dont_backup_fp: | |||
187 | std r1, PACATMSCRATCH(r13) | 193 | std r1, PACATMSCRATCH(r13) |
188 | ld r1, PACAR1(r13) | 194 | ld r1, PACAR1(r13) |
189 | 195 | ||
196 | /* Store the PPR in r11 and reset to decent value */ | ||
197 | std r11, GPR11(r1) /* Temporary stash */ | ||
198 | mfspr r11, SPRN_PPR | ||
199 | HMT_MEDIUM | ||
200 | |||
190 | /* Now get some more GPRS free */ | 201 | /* Now get some more GPRS free */ |
191 | std r7, GPR7(r1) /* Temporary stash */ | 202 | std r7, GPR7(r1) /* Temporary stash */ |
192 | std r12, GPR12(r1) /* '' '' '' */ | 203 | std r12, GPR12(r1) /* '' '' '' */ |
193 | ld r12, STACK_PARAM(0)(r1) /* Param 0, thread_struct * */ | 204 | ld r12, STACK_PARAM(0)(r1) /* Param 0, thread_struct * */ |
194 | 205 | ||
206 | std r11, THREAD_TM_PPR(r12) /* Store PPR and free r11 */ | ||
207 | |||
195 | addi r7, r12, PT_CKPT_REGS /* Thread's ckpt_regs */ | 208 | addi r7, r12, PT_CKPT_REGS /* Thread's ckpt_regs */ |
196 | 209 | ||
197 | /* Make r7 look like an exception frame so that we | 210 | /* Make r7 look like an exception frame so that we |
@@ -203,15 +216,19 @@ dont_backup_fp: | |||
203 | SAVE_GPR(0, r7) /* user r0 */ | 216 | SAVE_GPR(0, r7) /* user r0 */ |
204 | SAVE_GPR(2, r7) /* user r2 */ | 217 | SAVE_GPR(2, r7) /* user r2 */ |
205 | SAVE_4GPRS(3, r7) /* user r3-r6 */ | 218 | SAVE_4GPRS(3, r7) /* user r3-r6 */ |
206 | SAVE_4GPRS(8, r7) /* user r8-r11 */ | 219 | SAVE_GPR(8, r7) /* user r8 */ |
220 | SAVE_GPR(9, r7) /* user r9 */ | ||
221 | SAVE_GPR(10, r7) /* user r10 */ | ||
207 | ld r3, PACATMSCRATCH(r13) /* user r1 */ | 222 | ld r3, PACATMSCRATCH(r13) /* user r1 */ |
208 | ld r4, GPR7(r1) /* user r7 */ | 223 | ld r4, GPR7(r1) /* user r7 */ |
209 | ld r5, GPR12(r1) /* user r12 */ | 224 | ld r5, GPR11(r1) /* user r11 */ |
210 | GET_SCRATCH0(6) /* user r13 */ | 225 | ld r6, GPR12(r1) /* user r12 */ |
226 | GET_SCRATCH0(8) /* user r13 */ | ||
211 | std r3, GPR1(r7) | 227 | std r3, GPR1(r7) |
212 | std r4, GPR7(r7) | 228 | std r4, GPR7(r7) |
213 | std r5, GPR12(r7) | 229 | std r5, GPR11(r7) |
214 | std r6, GPR13(r7) | 230 | std r6, GPR12(r7) |
231 | std r8, GPR13(r7) | ||
215 | 232 | ||
216 | SAVE_NVGPRS(r7) /* user r14-r31 */ | 233 | SAVE_NVGPRS(r7) /* user r14-r31 */ |
217 | 234 | ||
@@ -234,14 +251,12 @@ dont_backup_fp: | |||
234 | std r6, _XER(r7) | 251 | std r6, _XER(r7) |
235 | 252 | ||
236 | 253 | ||
237 | /* ******************** TAR, PPR, DSCR ********** */ | 254 | /* ******************** TAR, DSCR ********** */ |
238 | mfspr r3, SPRN_TAR | 255 | mfspr r3, SPRN_TAR |
239 | mfspr r4, SPRN_PPR | 256 | mfspr r4, SPRN_DSCR |
240 | mfspr r5, SPRN_DSCR | ||
241 | 257 | ||
242 | std r3, THREAD_TM_TAR(r12) | 258 | std r3, THREAD_TM_TAR(r12) |
243 | std r4, THREAD_TM_PPR(r12) | 259 | std r4, THREAD_TM_DSCR(r12) |
244 | std r5, THREAD_TM_DSCR(r12) | ||
245 | 260 | ||
246 | /* MSR and flags: We don't change CRs, and we don't need to alter | 261 | /* MSR and flags: We don't change CRs, and we don't need to alter |
247 | * MSR. | 262 | * MSR. |
@@ -258,7 +273,7 @@ dont_backup_fp: | |||
258 | std r3, THREAD_TM_TFHAR(r12) | 273 | std r3, THREAD_TM_TFHAR(r12) |
259 | std r4, THREAD_TM_TFIAR(r12) | 274 | std r4, THREAD_TM_TFIAR(r12) |
260 | 275 | ||
261 | /* AMR and PPR are checkpointed too, but are unsupported by Linux. */ | 276 | /* AMR is checkpointed too, but is unsupported by Linux. */ |
262 | 277 | ||
263 | /* Restore original MSR/IRQ state & clear TM mode */ | 278 | /* Restore original MSR/IRQ state & clear TM mode */ |
264 | ld r14, TM_FRAME_L0(r1) /* Orig MSR */ | 279 | ld r14, TM_FRAME_L0(r1) /* Orig MSR */ |
@@ -274,6 +289,12 @@ dont_backup_fp: | |||
274 | mtcr r4 | 289 | mtcr r4 |
275 | mtlr r0 | 290 | mtlr r0 |
276 | ld r2, 40(r1) | 291 | ld r2, 40(r1) |
292 | |||
293 | /* Load system default DSCR */ | ||
294 | ld r4, DSCR_DEFAULT@toc(r2) | ||
295 | ld r0, 0(r4) | ||
296 | mtspr SPRN_DSCR, r0 | ||
297 | |||
277 | blr | 298 | blr |
278 | 299 | ||
279 | 300 | ||
@@ -358,25 +379,24 @@ dont_restore_fp: | |||
358 | 379 | ||
359 | restore_gprs: | 380 | restore_gprs: |
360 | 381 | ||
361 | /* ******************** TAR, PPR, DSCR ********** */ | 382 | /* ******************** CR,LR,CCR,MSR ********** */ |
362 | ld r4, THREAD_TM_TAR(r3) | 383 | ld r4, _CTR(r7) |
363 | ld r5, THREAD_TM_PPR(r3) | 384 | ld r5, _LINK(r7) |
364 | ld r6, THREAD_TM_DSCR(r3) | 385 | ld r6, _CCR(r7) |
386 | ld r8, _XER(r7) | ||
365 | 387 | ||
366 | mtspr SPRN_TAR, r4 | 388 | mtctr r4 |
367 | mtspr SPRN_PPR, r5 | 389 | mtlr r5 |
368 | mtspr SPRN_DSCR, r6 | 390 | mtcr r6 |
391 | mtxer r8 | ||
369 | 392 | ||
370 | /* ******************** CR,LR,CCR,MSR ********** */ | 393 | /* ******************** TAR ******************** */ |
371 | ld r3, _CTR(r7) | 394 | ld r4, THREAD_TM_TAR(r3) |
372 | ld r4, _LINK(r7) | 395 | mtspr SPRN_TAR, r4 |
373 | ld r5, _CCR(r7) | ||
374 | ld r6, _XER(r7) | ||
375 | 396 | ||
376 | mtctr r3 | 397 | /* Load up the PPR and DSCR in GPRs only at this stage */ |
377 | mtlr r4 | 398 | ld r5, THREAD_TM_DSCR(r3) |
378 | mtcr r5 | 399 | ld r6, THREAD_TM_PPR(r3) |
379 | mtxer r6 | ||
380 | 400 | ||
381 | /* Clear the MSR RI since we are about to change R1. EE is already off | 401 | /* Clear the MSR RI since we are about to change R1. EE is already off |
382 | */ | 402 | */ |
@@ -384,19 +404,26 @@ restore_gprs: | |||
384 | mtmsrd r4, 1 | 404 | mtmsrd r4, 1 |
385 | 405 | ||
386 | REST_4GPRS(0, r7) /* GPR0-3 */ | 406 | REST_4GPRS(0, r7) /* GPR0-3 */ |
387 | REST_GPR(4, r7) /* GPR4-6 */ | 407 | REST_GPR(4, r7) /* GPR4 */ |
388 | REST_GPR(5, r7) | ||
389 | REST_GPR(6, r7) | ||
390 | REST_4GPRS(8, r7) /* GPR8-11 */ | 408 | REST_4GPRS(8, r7) /* GPR8-11 */ |
391 | REST_2GPRS(12, r7) /* GPR12-13 */ | 409 | REST_2GPRS(12, r7) /* GPR12-13 */ |
392 | 410 | ||
393 | REST_NVGPRS(r7) /* GPR14-31 */ | 411 | REST_NVGPRS(r7) /* GPR14-31 */ |
394 | 412 | ||
395 | ld r7, GPR7(r7) /* GPR7 */ | 413 | /* Load up PPR and DSCR here so we don't run with user values for long |
414 | */ | ||
415 | mtspr SPRN_DSCR, r5 | ||
416 | mtspr SPRN_PPR, r6 | ||
417 | |||
418 | REST_GPR(5, r7) /* GPR5-7 */ | ||
419 | REST_GPR(6, r7) | ||
420 | ld r7, GPR7(r7) | ||
396 | 421 | ||
397 | /* Commit register state as checkpointed state: */ | 422 | /* Commit register state as checkpointed state: */ |
398 | TRECHKPT | 423 | TRECHKPT |
399 | 424 | ||
425 | HMT_MEDIUM | ||
426 | |||
400 | /* Our transactional state has now changed. | 427 | /* Our transactional state has now changed. |
401 | * | 428 | * |
402 | * Now just get out of here. Transactional (current) state will be | 429 | * Now just get out of here. Transactional (current) state will be |
@@ -419,6 +446,12 @@ restore_gprs: | |||
419 | mtcr r4 | 446 | mtcr r4 |
420 | mtlr r0 | 447 | mtlr r0 |
421 | ld r2, 40(r1) | 448 | ld r2, 40(r1) |
449 | |||
450 | /* Load system default DSCR */ | ||
451 | ld r4, DSCR_DEFAULT@toc(r2) | ||
452 | ld r0, 0(r4) | ||
453 | mtspr SPRN_DSCR, r0 | ||
454 | |||
422 | blr | 455 | blr |
423 | 456 | ||
424 | /* ****************************************************************** */ | 457 | /* ****************************************************************** */ |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 78a350670de3..d38cc08b16c7 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -1530,11 +1530,15 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | |||
1530 | const char *cp; | 1530 | const char *cp; |
1531 | 1531 | ||
1532 | dn = dev->of_node; | 1532 | dn = dev->of_node; |
1533 | if (!dn) | 1533 | if (!dn) { |
1534 | return -ENODEV; | 1534 | strcat(buf, "\n"); |
1535 | return strlen(buf); | ||
1536 | } | ||
1535 | cp = of_get_property(dn, "compatible", NULL); | 1537 | cp = of_get_property(dn, "compatible", NULL); |
1536 | if (!cp) | 1538 | if (!cp) { |
1537 | return -ENODEV; | 1539 | strcat(buf, "\n"); |
1540 | return strlen(buf); | ||
1541 | } | ||
1538 | 1542 | ||
1539 | return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); | 1543 | return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); |
1540 | } | 1544 | } |
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 294b7af28cdd..c71103b8a748 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -1066,7 +1066,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206) | |||
1066 | BEGIN_FTR_SECTION | 1066 | BEGIN_FTR_SECTION |
1067 | mfspr r8, SPRN_DSCR | 1067 | mfspr r8, SPRN_DSCR |
1068 | ld r7, HSTATE_DSCR(r13) | 1068 | ld r7, HSTATE_DSCR(r13) |
1069 | std r8, VCPU_DSCR(r7) | 1069 | std r8, VCPU_DSCR(r9) |
1070 | mtspr SPRN_DSCR, r7 | 1070 | mtspr SPRN_DSCR, r7 |
1071 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206) | 1071 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206) |
1072 | 1072 | ||
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index 1c6a9d729df4..c65593abae8e 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c | |||
@@ -332,6 +332,13 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, | |||
332 | unsigned long hva; | 332 | unsigned long hva; |
333 | int pfnmap = 0; | 333 | int pfnmap = 0; |
334 | int tsize = BOOK3E_PAGESZ_4K; | 334 | int tsize = BOOK3E_PAGESZ_4K; |
335 | int ret = 0; | ||
336 | unsigned long mmu_seq; | ||
337 | struct kvm *kvm = vcpu_e500->vcpu.kvm; | ||
338 | |||
339 | /* used to check for invalidations in progress */ | ||
340 | mmu_seq = kvm->mmu_notifier_seq; | ||
341 | smp_rmb(); | ||
335 | 342 | ||
336 | /* | 343 | /* |
337 | * Translate guest physical to true physical, acquiring | 344 | * Translate guest physical to true physical, acquiring |
@@ -449,6 +456,12 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, | |||
449 | gvaddr &= ~((tsize_pages << PAGE_SHIFT) - 1); | 456 | gvaddr &= ~((tsize_pages << PAGE_SHIFT) - 1); |
450 | } | 457 | } |
451 | 458 | ||
459 | spin_lock(&kvm->mmu_lock); | ||
460 | if (mmu_notifier_retry(kvm, mmu_seq)) { | ||
461 | ret = -EAGAIN; | ||
462 | goto out; | ||
463 | } | ||
464 | |||
452 | kvmppc_e500_ref_setup(ref, gtlbe, pfn); | 465 | kvmppc_e500_ref_setup(ref, gtlbe, pfn); |
453 | 466 | ||
454 | kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize, | 467 | kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize, |
@@ -457,10 +470,13 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, | |||
457 | /* Clear i-cache for new pages */ | 470 | /* Clear i-cache for new pages */ |
458 | kvmppc_mmu_flush_icache(pfn); | 471 | kvmppc_mmu_flush_icache(pfn); |
459 | 472 | ||
473 | out: | ||
474 | spin_unlock(&kvm->mmu_lock); | ||
475 | |||
460 | /* Drop refcount on page, so that mmu notifiers can clear it */ | 476 | /* Drop refcount on page, so that mmu notifiers can clear it */ |
461 | kvm_release_pfn_clean(pfn); | 477 | kvm_release_pfn_clean(pfn); |
462 | 478 | ||
463 | return 0; | 479 | return ret; |
464 | } | 480 | } |
465 | 481 | ||
466 | /* XXX only map the one-one case, for now use TLB0 */ | 482 | /* XXX only map the one-one case, for now use TLB0 */ |
diff --git a/arch/powerpc/lib/checksum_64.S b/arch/powerpc/lib/checksum_64.S index 167f72555d60..57a072065057 100644 --- a/arch/powerpc/lib/checksum_64.S +++ b/arch/powerpc/lib/checksum_64.S | |||
@@ -226,19 +226,35 @@ _GLOBAL(csum_partial) | |||
226 | blr | 226 | blr |
227 | 227 | ||
228 | 228 | ||
229 | .macro source | 229 | .macro srcnr |
230 | 100: | 230 | 100: |
231 | .section __ex_table,"a" | 231 | .section __ex_table,"a" |
232 | .align 3 | 232 | .align 3 |
233 | .llong 100b,.Lsrc_error | 233 | .llong 100b,.Lsrc_error_nr |
234 | .previous | 234 | .previous |
235 | .endm | 235 | .endm |
236 | 236 | ||
237 | .macro dest | 237 | .macro source |
238 | 150: | ||
239 | .section __ex_table,"a" | ||
240 | .align 3 | ||
241 | .llong 150b,.Lsrc_error | ||
242 | .previous | ||
243 | .endm | ||
244 | |||
245 | .macro dstnr | ||
238 | 200: | 246 | 200: |
239 | .section __ex_table,"a" | 247 | .section __ex_table,"a" |
240 | .align 3 | 248 | .align 3 |
241 | .llong 200b,.Ldest_error | 249 | .llong 200b,.Ldest_error_nr |
250 | .previous | ||
251 | .endm | ||
252 | |||
253 | .macro dest | ||
254 | 250: | ||
255 | .section __ex_table,"a" | ||
256 | .align 3 | ||
257 | .llong 250b,.Ldest_error | ||
242 | .previous | 258 | .previous |
243 | .endm | 259 | .endm |
244 | 260 | ||
@@ -269,16 +285,16 @@ _GLOBAL(csum_partial_copy_generic) | |||
269 | rldicl. r6,r3,64-1,64-2 /* r6 = (r3 & 0x3) >> 1 */ | 285 | rldicl. r6,r3,64-1,64-2 /* r6 = (r3 & 0x3) >> 1 */ |
270 | beq .Lcopy_aligned | 286 | beq .Lcopy_aligned |
271 | 287 | ||
272 | li r7,4 | 288 | li r9,4 |
273 | sub r6,r7,r6 | 289 | sub r6,r9,r6 |
274 | mtctr r6 | 290 | mtctr r6 |
275 | 291 | ||
276 | 1: | 292 | 1: |
277 | source; lhz r6,0(r3) /* align to doubleword */ | 293 | srcnr; lhz r6,0(r3) /* align to doubleword */ |
278 | subi r5,r5,2 | 294 | subi r5,r5,2 |
279 | addi r3,r3,2 | 295 | addi r3,r3,2 |
280 | adde r0,r0,r6 | 296 | adde r0,r0,r6 |
281 | dest; sth r6,0(r4) | 297 | dstnr; sth r6,0(r4) |
282 | addi r4,r4,2 | 298 | addi r4,r4,2 |
283 | bdnz 1b | 299 | bdnz 1b |
284 | 300 | ||
@@ -392,10 +408,10 @@ dest; std r16,56(r4) | |||
392 | 408 | ||
393 | mtctr r6 | 409 | mtctr r6 |
394 | 3: | 410 | 3: |
395 | source; ld r6,0(r3) | 411 | srcnr; ld r6,0(r3) |
396 | addi r3,r3,8 | 412 | addi r3,r3,8 |
397 | adde r0,r0,r6 | 413 | adde r0,r0,r6 |
398 | dest; std r6,0(r4) | 414 | dstnr; std r6,0(r4) |
399 | addi r4,r4,8 | 415 | addi r4,r4,8 |
400 | bdnz 3b | 416 | bdnz 3b |
401 | 417 | ||
@@ -405,10 +421,10 @@ dest; std r6,0(r4) | |||
405 | srdi. r6,r5,2 | 421 | srdi. r6,r5,2 |
406 | beq .Lcopy_tail_halfword | 422 | beq .Lcopy_tail_halfword |
407 | 423 | ||
408 | source; lwz r6,0(r3) | 424 | srcnr; lwz r6,0(r3) |
409 | addi r3,r3,4 | 425 | addi r3,r3,4 |
410 | adde r0,r0,r6 | 426 | adde r0,r0,r6 |
411 | dest; stw r6,0(r4) | 427 | dstnr; stw r6,0(r4) |
412 | addi r4,r4,4 | 428 | addi r4,r4,4 |
413 | subi r5,r5,4 | 429 | subi r5,r5,4 |
414 | 430 | ||
@@ -416,10 +432,10 @@ dest; stw r6,0(r4) | |||
416 | srdi. r6,r5,1 | 432 | srdi. r6,r5,1 |
417 | beq .Lcopy_tail_byte | 433 | beq .Lcopy_tail_byte |
418 | 434 | ||
419 | source; lhz r6,0(r3) | 435 | srcnr; lhz r6,0(r3) |
420 | addi r3,r3,2 | 436 | addi r3,r3,2 |
421 | adde r0,r0,r6 | 437 | adde r0,r0,r6 |
422 | dest; sth r6,0(r4) | 438 | dstnr; sth r6,0(r4) |
423 | addi r4,r4,2 | 439 | addi r4,r4,2 |
424 | subi r5,r5,2 | 440 | subi r5,r5,2 |
425 | 441 | ||
@@ -427,10 +443,10 @@ dest; sth r6,0(r4) | |||
427 | andi. r6,r5,1 | 443 | andi. r6,r5,1 |
428 | beq .Lcopy_finish | 444 | beq .Lcopy_finish |
429 | 445 | ||
430 | source; lbz r6,0(r3) | 446 | srcnr; lbz r6,0(r3) |
431 | sldi r9,r6,8 /* Pad the byte out to 16 bits */ | 447 | sldi r9,r6,8 /* Pad the byte out to 16 bits */ |
432 | adde r0,r0,r9 | 448 | adde r0,r0,r9 |
433 | dest; stb r6,0(r4) | 449 | dstnr; stb r6,0(r4) |
434 | 450 | ||
435 | .Lcopy_finish: | 451 | .Lcopy_finish: |
436 | addze r0,r0 /* add in final carry */ | 452 | addze r0,r0 /* add in final carry */ |
@@ -440,6 +456,11 @@ dest; stb r6,0(r4) | |||
440 | blr | 456 | blr |
441 | 457 | ||
442 | .Lsrc_error: | 458 | .Lsrc_error: |
459 | ld r14,STK_REG(R14)(r1) | ||
460 | ld r15,STK_REG(R15)(r1) | ||
461 | ld r16,STK_REG(R16)(r1) | ||
462 | addi r1,r1,STACKFRAMESIZE | ||
463 | .Lsrc_error_nr: | ||
443 | cmpdi 0,r7,0 | 464 | cmpdi 0,r7,0 |
444 | beqlr | 465 | beqlr |
445 | li r6,-EFAULT | 466 | li r6,-EFAULT |
@@ -447,6 +468,11 @@ dest; stb r6,0(r4) | |||
447 | blr | 468 | blr |
448 | 469 | ||
449 | .Ldest_error: | 470 | .Ldest_error: |
471 | ld r14,STK_REG(R14)(r1) | ||
472 | ld r15,STK_REG(R15)(r1) | ||
473 | ld r16,STK_REG(R16)(r1) | ||
474 | addi r1,r1,STACKFRAMESIZE | ||
475 | .Ldest_error_nr: | ||
450 | cmpdi 0,r8,0 | 476 | cmpdi 0,r8,0 |
451 | beqlr | 477 | beqlr |
452 | li r6,-EFAULT | 478 | li r6,-EFAULT |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index d0cd9e4c6837..8ed035d2edb5 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -300,5 +300,9 @@ void vmemmap_free(unsigned long start, unsigned long end) | |||
300 | { | 300 | { |
301 | } | 301 | } |
302 | 302 | ||
303 | void register_page_bootmem_memmap(unsigned long section_nr, | ||
304 | struct page *start_page, unsigned long size) | ||
305 | { | ||
306 | } | ||
303 | #endif /* CONFIG_SPARSEMEM_VMEMMAP */ | 307 | #endif /* CONFIG_SPARSEMEM_VMEMMAP */ |
304 | 308 | ||
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 1cf9c5b67f24..3fa93dc7fe75 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -297,12 +297,21 @@ void __init paging_init(void) | |||
297 | } | 297 | } |
298 | #endif /* ! CONFIG_NEED_MULTIPLE_NODES */ | 298 | #endif /* ! CONFIG_NEED_MULTIPLE_NODES */ |
299 | 299 | ||
300 | static void __init register_page_bootmem_info(void) | ||
301 | { | ||
302 | int i; | ||
303 | |||
304 | for_each_online_node(i) | ||
305 | register_page_bootmem_info_node(NODE_DATA(i)); | ||
306 | } | ||
307 | |||
300 | void __init mem_init(void) | 308 | void __init mem_init(void) |
301 | { | 309 | { |
302 | #ifdef CONFIG_SWIOTLB | 310 | #ifdef CONFIG_SWIOTLB |
303 | swiotlb_init(0); | 311 | swiotlb_init(0); |
304 | #endif | 312 | #endif |
305 | 313 | ||
314 | register_page_bootmem_info(); | ||
306 | high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); | 315 | high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); |
307 | set_max_mapnr(max_pfn); | 316 | set_max_mapnr(max_pfn); |
308 | free_all_bootmem(); | 317 | free_all_bootmem(); |
diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c index 2ee4a707f0df..a3f7abd2f13f 100644 --- a/arch/powerpc/perf/power8-pmu.c +++ b/arch/powerpc/perf/power8-pmu.c | |||
@@ -199,6 +199,7 @@ | |||
199 | #define MMCR1_UNIT_SHIFT(pmc) (60 - (4 * ((pmc) - 1))) | 199 | #define MMCR1_UNIT_SHIFT(pmc) (60 - (4 * ((pmc) - 1))) |
200 | #define MMCR1_COMBINE_SHIFT(pmc) (35 - ((pmc) - 1)) | 200 | #define MMCR1_COMBINE_SHIFT(pmc) (35 - ((pmc) - 1)) |
201 | #define MMCR1_PMCSEL_SHIFT(pmc) (24 - (((pmc) - 1)) * 8) | 201 | #define MMCR1_PMCSEL_SHIFT(pmc) (24 - (((pmc) - 1)) * 8) |
202 | #define MMCR1_FAB_SHIFT 36 | ||
202 | #define MMCR1_DC_QUAL_SHIFT 47 | 203 | #define MMCR1_DC_QUAL_SHIFT 47 |
203 | #define MMCR1_IC_QUAL_SHIFT 46 | 204 | #define MMCR1_IC_QUAL_SHIFT 46 |
204 | 205 | ||
@@ -388,8 +389,8 @@ static int power8_compute_mmcr(u64 event[], int n_ev, | |||
388 | * the threshold bits are used for the match value. | 389 | * the threshold bits are used for the match value. |
389 | */ | 390 | */ |
390 | if (event_is_fab_match(event[i])) { | 391 | if (event_is_fab_match(event[i])) { |
391 | mmcr1 |= (event[i] >> EVENT_THR_CTL_SHIFT) & | 392 | mmcr1 |= ((event[i] >> EVENT_THR_CTL_SHIFT) & |
392 | EVENT_THR_CTL_MASK; | 393 | EVENT_THR_CTL_MASK) << MMCR1_FAB_SHIFT; |
393 | } else { | 394 | } else { |
394 | val = (event[i] >> EVENT_THR_CTL_SHIFT) & EVENT_THR_CTL_MASK; | 395 | val = (event[i] >> EVENT_THR_CTL_SHIFT) & EVENT_THR_CTL_MASK; |
395 | mmcra |= val << MMCRA_THR_CTL_SHIFT; | 396 | mmcra |= val << MMCRA_THR_CTL_SHIFT; |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c index 14be2bd358b8..4278acfa2ede 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
@@ -486,7 +486,6 @@ static __init int celleb_setup_pciex(struct device_node *node, | |||
486 | struct pci_controller *phb) | 486 | struct pci_controller *phb) |
487 | { | 487 | { |
488 | struct resource r; | 488 | struct resource r; |
489 | struct of_irq oirq; | ||
490 | int virq; | 489 | int virq; |
491 | 490 | ||
492 | /* SMMIO registers; used inside this file */ | 491 | /* SMMIO registers; used inside this file */ |
@@ -507,12 +506,11 @@ static __init int celleb_setup_pciex(struct device_node *node, | |||
507 | phb->ops = &scc_pciex_pci_ops; | 506 | phb->ops = &scc_pciex_pci_ops; |
508 | 507 | ||
509 | /* internal interrupt handler */ | 508 | /* internal interrupt handler */ |
510 | if (of_irq_map_one(node, 1, &oirq)) { | 509 | virq = irq_of_parse_and_map(node, 1); |
510 | if (!virq) { | ||
511 | pr_err("PCIEXC:Failed to map irq\n"); | 511 | pr_err("PCIEXC:Failed to map irq\n"); |
512 | goto error; | 512 | goto error; |
513 | } | 513 | } |
514 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | ||
515 | oirq.size); | ||
516 | if (request_irq(virq, pciex_handle_internal_irq, | 514 | if (request_irq(virq, pciex_handle_internal_irq, |
517 | 0, "pciex", (void *)phb)) { | 515 | 0, "pciex", (void *)phb)) { |
518 | pr_err("PCIEXC:Failed to request irq\n"); | 516 | pr_err("PCIEXC:Failed to request irq\n"); |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_sio.c b/arch/powerpc/platforms/cell/celleb_scc_sio.c index 9c339ec646f5..c8eb57193826 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_sio.c +++ b/arch/powerpc/platforms/cell/celleb_scc_sio.c | |||
@@ -45,7 +45,7 @@ static int __init txx9_serial_init(void) | |||
45 | struct device_node *node; | 45 | struct device_node *node; |
46 | int i; | 46 | int i; |
47 | struct uart_port req; | 47 | struct uart_port req; |
48 | struct of_irq irq; | 48 | struct of_phandle_args irq; |
49 | struct resource res; | 49 | struct resource res; |
50 | 50 | ||
51 | for_each_compatible_node(node, "serial", "toshiba,sio-scc") { | 51 | for_each_compatible_node(node, "serial", "toshiba,sio-scc") { |
@@ -53,7 +53,7 @@ static int __init txx9_serial_init(void) | |||
53 | if (!(txx9_serial_bitmap & (1<<i))) | 53 | if (!(txx9_serial_bitmap & (1<<i))) |
54 | continue; | 54 | continue; |
55 | 55 | ||
56 | if (of_irq_map_one(node, i, &irq)) | 56 | if (of_irq_parse_one(node, i, &irq)) |
57 | continue; | 57 | continue; |
58 | if (of_address_to_resource(node, | 58 | if (of_address_to_resource(node, |
59 | txx9_scc_tab[i].index, &res)) | 59 | txx9_scc_tab[i].index, &res)) |
@@ -66,8 +66,7 @@ static int __init txx9_serial_init(void) | |||
66 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE | 66 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE |
67 | req.membase = ioremap(req.mapbase, 0x24); | 67 | req.membase = ioremap(req.mapbase, 0x24); |
68 | #endif | 68 | #endif |
69 | req.irq = irq_create_of_mapping(irq.controller, | 69 | req.irq = irq_create_of_mapping(&irq); |
70 | irq.specifier, irq.size); | ||
71 | req.flags |= UPF_IOREMAP | UPF_BUGGY_UART | 70 | req.flags |= UPF_IOREMAP | UPF_BUGGY_UART |
72 | /*HAVE_CTS_LINE*/; | 71 | /*HAVE_CTS_LINE*/; |
73 | req.uartclk = 83300000; | 72 | req.uartclk = 83300000; |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index 8e299447127e..1f72f4ab6353 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -235,12 +235,9 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic) | |||
235 | /* First, we check whether we have a real "interrupts" in the device | 235 | /* First, we check whether we have a real "interrupts" in the device |
236 | * tree in case the device-tree is ever fixed | 236 | * tree in case the device-tree is ever fixed |
237 | */ | 237 | */ |
238 | struct of_irq oirq; | 238 | virq = irq_of_parse_and_map(pic->host->of_node, 0); |
239 | if (of_irq_map_one(pic->host->of_node, 0, &oirq) == 0) { | 239 | if (virq) |
240 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | ||
241 | oirq.size); | ||
242 | return virq; | 240 | return virq; |
243 | } | ||
244 | 241 | ||
245 | /* Now do the horrible hacks */ | 242 | /* Now do the horrible hacks */ |
246 | tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL); | 243 | tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL); |
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 2bb6977c0a5a..c3327f3d8cf7 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -177,21 +177,20 @@ out: | |||
177 | 177 | ||
178 | static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) | 178 | static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) |
179 | { | 179 | { |
180 | struct of_irq oirq; | 180 | struct of_phandle_args oirq; |
181 | int ret; | 181 | int ret; |
182 | int i; | 182 | int i; |
183 | 183 | ||
184 | for (i=0; i < 3; i++) { | 184 | for (i=0; i < 3; i++) { |
185 | ret = of_irq_map_one(np, i, &oirq); | 185 | ret = of_irq_parse_one(np, i, &oirq); |
186 | if (ret) { | 186 | if (ret) { |
187 | pr_debug("spu_new: failed to get irq %d\n", i); | 187 | pr_debug("spu_new: failed to get irq %d\n", i); |
188 | goto err; | 188 | goto err; |
189 | } | 189 | } |
190 | ret = -EINVAL; | 190 | ret = -EINVAL; |
191 | pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0], | 191 | pr_debug(" irq %d no 0x%x on %s\n", i, oirq.args[0], |
192 | oirq.controller->full_name); | 192 | oirq.np->full_name); |
193 | spu->irqs[i] = irq_create_of_mapping(oirq.controller, | 193 | spu->irqs[i] = irq_create_of_mapping(&oirq); |
194 | oirq.specifier, oirq.size); | ||
195 | if (spu->irqs[i] == NO_IRQ) { | 194 | if (spu->irqs[i] == NO_IRQ) { |
196 | pr_debug("spu_new: failed to map it !\n"); | 195 | pr_debug("spu_new: failed to map it !\n"); |
197 | goto err; | 196 | goto err; |
@@ -200,7 +199,7 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) | |||
200 | return 0; | 199 | return 0; |
201 | 200 | ||
202 | err: | 201 | err: |
203 | pr_debug("failed to map irq %x for spu %s\n", *oirq.specifier, | 202 | pr_debug("failed to map irq %x for spu %s\n", *oirq.args, |
204 | spu->name); | 203 | spu->name); |
205 | for (; i >= 0; i--) { | 204 | for (; i >= 0; i--) { |
206 | if (spu->irqs[i] != NO_IRQ) | 205 | if (spu->irqs[i] != NO_IRQ) |
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index 92ac9b52b32d..b97f6f3d3c5b 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c | |||
@@ -321,8 +321,7 @@ static void hpcd_final_uli5288(struct pci_dev *dev) | |||
321 | { | 321 | { |
322 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | 322 | struct pci_controller *hose = pci_bus_to_host(dev->bus); |
323 | struct device_node *hosenode = hose ? hose->dn : NULL; | 323 | struct device_node *hosenode = hose ? hose->dn : NULL; |
324 | struct of_irq oirq; | 324 | struct of_phandle_args oirq; |
325 | int virq, pin = 2; | ||
326 | u32 laddr[3]; | 325 | u32 laddr[3]; |
327 | 326 | ||
328 | if (!machine_is(mpc86xx_hpcd)) | 327 | if (!machine_is(mpc86xx_hpcd)) |
@@ -331,12 +330,13 @@ static void hpcd_final_uli5288(struct pci_dev *dev) | |||
331 | if (!hosenode) | 330 | if (!hosenode) |
332 | return; | 331 | return; |
333 | 332 | ||
333 | oirq.np = hosenode; | ||
334 | oirq.args[0] = 2; | ||
335 | oirq.args_count = 1; | ||
334 | laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); | 336 | laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); |
335 | laddr[1] = laddr[2] = 0; | 337 | laddr[1] = laddr[2] = 0; |
336 | of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq); | 338 | of_irq_parse_raw(laddr, &oirq); |
337 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 339 | dev->irq = irq_create_of_mapping(&oirq); |
338 | oirq.size); | ||
339 | dev->irq = virq; | ||
340 | } | 340 | } |
341 | 341 | ||
342 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575); | 342 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575); |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 31036b56670e..4c24bf60d39d 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -393,8 +393,8 @@ static void __init pmac_pic_probe_oldstyle(void) | |||
393 | #endif | 393 | #endif |
394 | } | 394 | } |
395 | 395 | ||
396 | int of_irq_map_oldworld(struct device_node *device, int index, | 396 | int of_irq_parse_oldworld(struct device_node *device, int index, |
397 | struct of_irq *out_irq) | 397 | struct of_phandle_args *out_irq) |
398 | { | 398 | { |
399 | const u32 *ints = NULL; | 399 | const u32 *ints = NULL; |
400 | int intlen; | 400 | int intlen; |
@@ -422,9 +422,9 @@ int of_irq_map_oldworld(struct device_node *device, int index, | |||
422 | if (index >= intlen) | 422 | if (index >= intlen) |
423 | return -EINVAL; | 423 | return -EINVAL; |
424 | 424 | ||
425 | out_irq->controller = NULL; | 425 | out_irq->np = NULL; |
426 | out_irq->specifier[0] = ints[index]; | 426 | out_irq->args[0] = ints[index]; |
427 | out_irq->size = 1; | 427 | out_irq->args_count = 1; |
428 | 428 | ||
429 | return 0; | 429 | return 0; |
430 | } | 430 | } |
diff --git a/arch/powerpc/platforms/pseries/event_sources.c b/arch/powerpc/platforms/pseries/event_sources.c index 2605c310166a..18380e8f6dfe 100644 --- a/arch/powerpc/platforms/pseries/event_sources.c +++ b/arch/powerpc/platforms/pseries/event_sources.c | |||
@@ -25,7 +25,7 @@ void request_event_sources_irqs(struct device_node *np, | |||
25 | const char *name) | 25 | const char *name) |
26 | { | 26 | { |
27 | int i, index, count = 0; | 27 | int i, index, count = 0; |
28 | struct of_irq oirq; | 28 | struct of_phandle_args oirq; |
29 | const u32 *opicprop; | 29 | const u32 *opicprop; |
30 | unsigned int opicplen; | 30 | unsigned int opicplen; |
31 | unsigned int virqs[16]; | 31 | unsigned int virqs[16]; |
@@ -55,13 +55,11 @@ void request_event_sources_irqs(struct device_node *np, | |||
55 | /* Else use normal interrupt tree parsing */ | 55 | /* Else use normal interrupt tree parsing */ |
56 | else { | 56 | else { |
57 | /* First try to do a proper OF tree parsing */ | 57 | /* First try to do a proper OF tree parsing */ |
58 | for (index = 0; of_irq_map_one(np, index, &oirq) == 0; | 58 | for (index = 0; of_irq_parse_one(np, index, &oirq) == 0; |
59 | index++) { | 59 | index++) { |
60 | if (count > 15) | 60 | if (count > 15) |
61 | break; | 61 | break; |
62 | virqs[count] = irq_create_of_mapping(oirq.controller, | 62 | virqs[count] = irq_create_of_mapping(&oirq); |
63 | oirq.specifier, | ||
64 | oirq.size); | ||
65 | if (virqs[count] == NO_IRQ) { | 63 | if (virqs[count] == NO_IRQ) { |
66 | pr_err("event-sources: Unable to allocate " | 64 | pr_err("event-sources: Unable to allocate " |
67 | "interrupt number for %s\n", | 65 | "interrupt number for %s\n", |
diff --git a/arch/powerpc/sysdev/fsl_gtm.c b/arch/powerpc/sysdev/fsl_gtm.c index 1b980eed235a..06ac3c61b3d0 100644 --- a/arch/powerpc/sysdev/fsl_gtm.c +++ b/arch/powerpc/sysdev/fsl_gtm.c | |||
@@ -403,16 +403,15 @@ static int __init fsl_gtm_init(void) | |||
403 | gtm->clock = *clock; | 403 | gtm->clock = *clock; |
404 | 404 | ||
405 | for (i = 0; i < ARRAY_SIZE(gtm->timers); i++) { | 405 | for (i = 0; i < ARRAY_SIZE(gtm->timers); i++) { |
406 | int ret; | 406 | unsigned int irq; |
407 | struct resource irq; | ||
408 | 407 | ||
409 | ret = of_irq_to_resource(np, i, &irq); | 408 | irq = irq_of_parse_and_map(np, i); |
410 | if (ret == NO_IRQ) { | 409 | if (irq == NO_IRQ) { |
411 | pr_err("%s: not enough interrupts specified\n", | 410 | pr_err("%s: not enough interrupts specified\n", |
412 | np->full_name); | 411 | np->full_name); |
413 | goto err; | 412 | goto err; |
414 | } | 413 | } |
415 | gtm->timers[i].irq = irq.start; | 414 | gtm->timers[i].irq = irq; |
416 | gtm->timers[i].gtm = gtm; | 415 | gtm->timers[i].gtm = gtm; |
417 | } | 416 | } |
418 | 417 | ||
diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msgr.c index c75325865a85..2c9b52aa266c 100644 --- a/arch/powerpc/sysdev/mpic_msgr.c +++ b/arch/powerpc/sysdev/mpic_msgr.c | |||
@@ -237,15 +237,13 @@ static int mpic_msgr_probe(struct platform_device *dev) | |||
237 | raw_spin_lock_init(&msgr->lock); | 237 | raw_spin_lock_init(&msgr->lock); |
238 | 238 | ||
239 | if (receive_mask & (1 << i)) { | 239 | if (receive_mask & (1 << i)) { |
240 | struct resource irq; | 240 | msgr->irq = irq_of_parse_and_map(np, irq_index); |
241 | 241 | if (msgr->irq == NO_IRQ) { | |
242 | if (of_irq_to_resource(np, irq_index, &irq) == NO_IRQ) { | ||
243 | dev_err(&dev->dev, | 242 | dev_err(&dev->dev, |
244 | "Missing interrupt specifier"); | 243 | "Missing interrupt specifier"); |
245 | kfree(msgr); | 244 | kfree(msgr); |
246 | return -EFAULT; | 245 | return -EFAULT; |
247 | } | 246 | } |
248 | msgr->irq = irq.start; | ||
249 | irq_index += 1; | 247 | irq_index += 1; |
250 | } else { | 248 | } else { |
251 | msgr->irq = NO_IRQ; | 249 | msgr->irq = NO_IRQ; |
diff --git a/arch/powerpc/sysdev/mpic_msi.c b/arch/powerpc/sysdev/mpic_msi.c index bbf342c88314..7dc39f35a4cc 100644 --- a/arch/powerpc/sysdev/mpic_msi.c +++ b/arch/powerpc/sysdev/mpic_msi.c | |||
@@ -35,7 +35,7 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic) | |||
35 | const struct irq_domain_ops *ops = mpic->irqhost->ops; | 35 | const struct irq_domain_ops *ops = mpic->irqhost->ops; |
36 | struct device_node *np; | 36 | struct device_node *np; |
37 | int flags, index, i; | 37 | int flags, index, i; |
38 | struct of_irq oirq; | 38 | struct of_phandle_args oirq; |
39 | 39 | ||
40 | pr_debug("mpic: found U3, guessing msi allocator setup\n"); | 40 | pr_debug("mpic: found U3, guessing msi allocator setup\n"); |
41 | 41 | ||
@@ -63,9 +63,9 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic) | |||
63 | pr_debug("mpic: mapping hwirqs for %s\n", np->full_name); | 63 | pr_debug("mpic: mapping hwirqs for %s\n", np->full_name); |
64 | 64 | ||
65 | index = 0; | 65 | index = 0; |
66 | while (of_irq_map_one(np, index++, &oirq) == 0) { | 66 | while (of_irq_parse_one(np, index++, &oirq) == 0) { |
67 | ops->xlate(mpic->irqhost, NULL, oirq.specifier, | 67 | ops->xlate(mpic->irqhost, NULL, oirq.args, |
68 | oirq.size, &hwirq, &flags); | 68 | oirq.args_count, &hwirq, &flags); |
69 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq); | 69 | msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, hwirq); |
70 | } | 70 | } |
71 | } | 71 | } |
diff --git a/arch/s390/include/asm/jump_label.h b/arch/s390/include/asm/jump_label.h index 6c32190dc73e..346b1c85ffb4 100644 --- a/arch/s390/include/asm/jump_label.h +++ b/arch/s390/include/asm/jump_label.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | static __always_inline bool arch_static_branch(struct static_key *key) | 16 | static __always_inline bool arch_static_branch(struct static_key *key) |
17 | { | 17 | { |
18 | asm goto("0: brcl 0,0\n" | 18 | asm_volatile_goto("0: brcl 0,0\n" |
19 | ".pushsection __jump_table, \"aw\"\n" | 19 | ".pushsection __jump_table, \"aw\"\n" |
20 | ASM_ALIGN "\n" | 20 | ASM_ALIGN "\n" |
21 | ASM_PTR " 0b, %l[label], %0\n" | 21 | ASM_PTR " 0b, %l[label], %0\n" |
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c index c84f33d51f7b..7dd21720e5b0 100644 --- a/arch/s390/kernel/crash_dump.c +++ b/arch/s390/kernel/crash_dump.c | |||
@@ -40,28 +40,26 @@ static inline void *load_real_addr(void *addr) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * Copy up to one page to vmalloc or real memory | 43 | * Copy real to virtual or real memory |
44 | */ | 44 | */ |
45 | static ssize_t copy_page_real(void *buf, void *src, size_t csize) | 45 | static int copy_from_realmem(void *dest, void *src, size_t count) |
46 | { | 46 | { |
47 | size_t size; | 47 | unsigned long size; |
48 | int rc; | ||
48 | 49 | ||
49 | if (is_vmalloc_addr(buf)) { | 50 | if (!count) |
50 | BUG_ON(csize >= PAGE_SIZE); | 51 | return 0; |
51 | /* If buf is not page aligned, copy first part */ | 52 | if (!is_vmalloc_or_module_addr(dest)) |
52 | size = min(roundup(__pa(buf), PAGE_SIZE) - __pa(buf), csize); | 53 | return memcpy_real(dest, src, count); |
53 | if (size) { | 54 | do { |
54 | if (memcpy_real(load_real_addr(buf), src, size)) | 55 | size = min(count, PAGE_SIZE - (__pa(dest) & ~PAGE_MASK)); |
55 | return -EFAULT; | 56 | if (memcpy_real(load_real_addr(dest), src, size)) |
56 | buf += size; | 57 | return -EFAULT; |
57 | src += size; | 58 | count -= size; |
58 | } | 59 | dest += size; |
59 | /* Copy second part */ | 60 | src += size; |
60 | size = csize - size; | 61 | } while (count); |
61 | return (size) ? memcpy_real(load_real_addr(buf), src, size) : 0; | 62 | return 0; |
62 | } else { | ||
63 | return memcpy_real(buf, src, csize); | ||
64 | } | ||
65 | } | 63 | } |
66 | 64 | ||
67 | /* | 65 | /* |
@@ -114,7 +112,7 @@ static ssize_t copy_oldmem_page_kdump(char *buf, size_t csize, | |||
114 | rc = copy_to_user_real((void __force __user *) buf, | 112 | rc = copy_to_user_real((void __force __user *) buf, |
115 | (void *) src, csize); | 113 | (void *) src, csize); |
116 | else | 114 | else |
117 | rc = copy_page_real(buf, (void *) src, csize); | 115 | rc = copy_from_realmem(buf, (void *) src, csize); |
118 | return (rc == 0) ? rc : csize; | 116 | return (rc == 0) ? rc : csize; |
119 | } | 117 | } |
120 | 118 | ||
@@ -210,7 +208,7 @@ int copy_from_oldmem(void *dest, void *src, size_t count) | |||
210 | if (OLDMEM_BASE) { | 208 | if (OLDMEM_BASE) { |
211 | if ((unsigned long) src < OLDMEM_SIZE) { | 209 | if ((unsigned long) src < OLDMEM_SIZE) { |
212 | copied = min(count, OLDMEM_SIZE - (unsigned long) src); | 210 | copied = min(count, OLDMEM_SIZE - (unsigned long) src); |
213 | rc = memcpy_real(dest, src + OLDMEM_BASE, copied); | 211 | rc = copy_from_realmem(dest, src + OLDMEM_BASE, copied); |
214 | if (rc) | 212 | if (rc) |
215 | return rc; | 213 | return rc; |
216 | } | 214 | } |
@@ -223,7 +221,7 @@ int copy_from_oldmem(void *dest, void *src, size_t count) | |||
223 | return rc; | 221 | return rc; |
224 | } | 222 | } |
225 | } | 223 | } |
226 | return memcpy_real(dest + copied, src + copied, count - copied); | 224 | return copy_from_realmem(dest + copied, src + copied, count - copied); |
227 | } | 225 | } |
228 | 226 | ||
229 | /* | 227 | /* |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index cc30d1fb000c..0dc2b6d0a1ec 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -266,6 +266,7 @@ sysc_sigpending: | |||
266 | tm __TI_flags+3(%r12),_TIF_SYSCALL | 266 | tm __TI_flags+3(%r12),_TIF_SYSCALL |
267 | jno sysc_return | 267 | jno sysc_return |
268 | lm %r2,%r7,__PT_R2(%r11) # load svc arguments | 268 | lm %r2,%r7,__PT_R2(%r11) # load svc arguments |
269 | l %r10,__TI_sysc_table(%r12) # 31 bit system call table | ||
269 | xr %r8,%r8 # svc 0 returns -ENOSYS | 270 | xr %r8,%r8 # svc 0 returns -ENOSYS |
270 | clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2) | 271 | clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2) |
271 | jnl sysc_nr_ok # invalid svc number -> do svc 0 | 272 | jnl sysc_nr_ok # invalid svc number -> do svc 0 |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 2b2188b97c6a..e5b43c97a834 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -297,6 +297,7 @@ sysc_sigpending: | |||
297 | tm __TI_flags+7(%r12),_TIF_SYSCALL | 297 | tm __TI_flags+7(%r12),_TIF_SYSCALL |
298 | jno sysc_return | 298 | jno sysc_return |
299 | lmg %r2,%r7,__PT_R2(%r11) # load svc arguments | 299 | lmg %r2,%r7,__PT_R2(%r11) # load svc arguments |
300 | lg %r10,__TI_sysc_table(%r12) # address of system call table | ||
300 | lghi %r8,0 # svc 0 returns -ENOSYS | 301 | lghi %r8,0 # svc 0 returns -ENOSYS |
301 | llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number | 302 | llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number |
302 | cghi %r1,NR_syscalls | 303 | cghi %r1,NR_syscalls |
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 0ce9fb245034..d86e64eddb42 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
@@ -67,6 +67,11 @@ static int __kprobes is_prohibited_opcode(kprobe_opcode_t *insn) | |||
67 | case 0xac: /* stnsm */ | 67 | case 0xac: /* stnsm */ |
68 | case 0xad: /* stosm */ | 68 | case 0xad: /* stosm */ |
69 | return -EINVAL; | 69 | return -EINVAL; |
70 | case 0xc6: | ||
71 | switch (insn[0] & 0x0f) { | ||
72 | case 0x00: /* exrl */ | ||
73 | return -EINVAL; | ||
74 | } | ||
70 | } | 75 | } |
71 | switch (insn[0]) { | 76 | switch (insn[0]) { |
72 | case 0x0101: /* pr */ | 77 | case 0x0101: /* pr */ |
@@ -180,7 +185,6 @@ static int __kprobes is_insn_relative_long(kprobe_opcode_t *insn) | |||
180 | break; | 185 | break; |
181 | case 0xc6: | 186 | case 0xc6: |
182 | switch (insn[0] & 0x0f) { | 187 | switch (insn[0] & 0x0f) { |
183 | case 0x00: /* exrl */ | ||
184 | case 0x02: /* pfdrl */ | 188 | case 0x02: /* pfdrl */ |
185 | case 0x04: /* cghrl */ | 189 | case 0x04: /* cghrl */ |
186 | case 0x05: /* chrl */ | 190 | case 0x05: /* chrl */ |
diff --git a/arch/score/Kconfig b/arch/score/Kconfig index a1be70db75fe..305f7ee1f382 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig | |||
@@ -2,6 +2,7 @@ menu "Machine selection" | |||
2 | 2 | ||
3 | config SCORE | 3 | config SCORE |
4 | def_bool y | 4 | def_bool y |
5 | select HAVE_GENERIC_HARDIRQS | ||
5 | select GENERIC_IRQ_SHOW | 6 | select GENERIC_IRQ_SHOW |
6 | select GENERIC_IOMAP | 7 | select GENERIC_IOMAP |
7 | select GENERIC_ATOMIC64 | 8 | select GENERIC_ATOMIC64 |
@@ -110,3 +111,6 @@ source "security/Kconfig" | |||
110 | source "crypto/Kconfig" | 111 | source "crypto/Kconfig" |
111 | 112 | ||
112 | source "lib/Kconfig" | 113 | source "lib/Kconfig" |
114 | |||
115 | config NO_IOMEM | ||
116 | def_bool y | ||
diff --git a/arch/score/Makefile b/arch/score/Makefile index 974aefe86123..9e3e060290e0 100644 --- a/arch/score/Makefile +++ b/arch/score/Makefile | |||
@@ -20,8 +20,8 @@ cflags-y += -G0 -pipe -mel -mnhwloop -D__SCOREEL__ \ | |||
20 | # | 20 | # |
21 | KBUILD_AFLAGS += $(cflags-y) | 21 | KBUILD_AFLAGS += $(cflags-y) |
22 | KBUILD_CFLAGS += $(cflags-y) | 22 | KBUILD_CFLAGS += $(cflags-y) |
23 | KBUILD_AFLAGS_MODULE += -mlong-calls | 23 | KBUILD_AFLAGS_MODULE += |
24 | KBUILD_CFLAGS_MODULE += -mlong-calls | 24 | KBUILD_CFLAGS_MODULE += |
25 | LDFLAGS += --oformat elf32-littlescore | 25 | LDFLAGS += --oformat elf32-littlescore |
26 | LDFLAGS_vmlinux += -G0 -static -nostdlib | 26 | LDFLAGS_vmlinux += -G0 -static -nostdlib |
27 | 27 | ||
diff --git a/arch/score/include/asm/checksum.h b/arch/score/include/asm/checksum.h index f909ac3144a4..961bd64015a8 100644 --- a/arch/score/include/asm/checksum.h +++ b/arch/score/include/asm/checksum.h | |||
@@ -184,48 +184,57 @@ static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, | |||
184 | __wsum sum) | 184 | __wsum sum) |
185 | { | 185 | { |
186 | __asm__ __volatile__( | 186 | __asm__ __volatile__( |
187 | ".set\tnoreorder\t\t\t# csum_ipv6_magic\n\t" | 187 | ".set\tvolatile\t\t\t# csum_ipv6_magic\n\t" |
188 | ".set\tnoat\n\t" | 188 | "add\t%0, %0, %5\t\t\t# proto (long in network byte order)\n\t" |
189 | "addu\t%0, %5\t\t\t# proto (long in network byte order)\n\t" | 189 | "cmp.c\t%5, %0\n\t" |
190 | "sltu\t$1, %0, %5\n\t" | 190 | "bleu 1f\n\t" |
191 | "addu\t%0, $1\n\t" | 191 | "addi\t%0, 0x1\n\t" |
192 | "addu\t%0, %6\t\t\t# csum\n\t" | 192 | "1:add\t%0, %0, %6\t\t\t# csum\n\t" |
193 | "sltu\t$1, %0, %6\n\t" | 193 | "cmp.c\t%6, %0\n\t" |
194 | "lw\t%1, 0(%2)\t\t\t# four words source address\n\t" | 194 | "lw\t%1, [%2, 0]\t\t\t# four words source address\n\t" |
195 | "addu\t%0, $1\n\t" | 195 | "bleu 1f\n\t" |
196 | "addu\t%0, %1\n\t" | 196 | "addi\t%0, 0x1\n\t" |
197 | "sltu\t$1, %0, %1\n\t" | 197 | "1:add\t%0, %0, %1\n\t" |
198 | "lw\t%1, 4(%2)\n\t" | 198 | "cmp.c\t%1, %0\n\t" |
199 | "addu\t%0, $1\n\t" | 199 | "1:lw\t%1, [%2, 4]\n\t" |
200 | "addu\t%0, %1\n\t" | 200 | "bleu 1f\n\t" |
201 | "sltu\t$1, %0, %1\n\t" | 201 | "addi\t%0, 0x1\n\t" |
202 | "lw\t%1, 8(%2)\n\t" | 202 | "1:add\t%0, %0, %1\n\t" |
203 | "addu\t%0, $1\n\t" | 203 | "cmp.c\t%1, %0\n\t" |
204 | "addu\t%0, %1\n\t" | 204 | "lw\t%1, [%2,8]\n\t" |
205 | "sltu\t$1, %0, %1\n\t" | 205 | "bleu 1f\n\t" |
206 | "lw\t%1, 12(%2)\n\t" | 206 | "addi\t%0, 0x1\n\t" |
207 | "addu\t%0, $1\n\t" | 207 | "1:add\t%0, %0, %1\n\t" |
208 | "addu\t%0, %1\n\t" | 208 | "cmp.c\t%1, %0\n\t" |
209 | "sltu\t$1, %0, %1\n\t" | 209 | "lw\t%1, [%2, 12]\n\t" |
210 | "lw\t%1, 0(%3)\n\t" | 210 | "bleu 1f\n\t" |
211 | "addu\t%0, $1\n\t" | 211 | "addi\t%0, 0x1\n\t" |
212 | "addu\t%0, %1\n\t" | 212 | "1:add\t%0, %0,%1\n\t" |
213 | "sltu\t$1, %0, %1\n\t" | 213 | "cmp.c\t%1, %0\n\t" |
214 | "lw\t%1, 4(%3)\n\t" | 214 | "lw\t%1, [%3, 0]\n\t" |
215 | "addu\t%0, $1\n\t" | 215 | "bleu 1f\n\t" |
216 | "addu\t%0, %1\n\t" | 216 | "addi\t%0, 0x1\n\t" |
217 | "sltu\t$1, %0, %1\n\t" | 217 | "1:add\t%0, %0, %1\n\t" |
218 | "lw\t%1, 8(%3)\n\t" | 218 | "cmp.c\t%1, %0\n\t" |
219 | "addu\t%0, $1\n\t" | 219 | "lw\t%1, [%3, 4]\n\t" |
220 | "addu\t%0, %1\n\t" | 220 | "bleu 1f\n\t" |
221 | "sltu\t$1, %0, %1\n\t" | 221 | "addi\t%0, 0x1\n\t" |
222 | "lw\t%1, 12(%3)\n\t" | 222 | "1:add\t%0, %0, %1\n\t" |
223 | "addu\t%0, $1\n\t" | 223 | "cmp.c\t%1, %0\n\t" |
224 | "addu\t%0, %1\n\t" | 224 | "lw\t%1, [%3, 8]\n\t" |
225 | "sltu\t$1, %0, %1\n\t" | 225 | "bleu 1f\n\t" |
226 | "addu\t%0, $1\t\t\t# Add final carry\n\t" | 226 | "addi\t%0, 0x1\n\t" |
227 | ".set\tnoat\n\t" | 227 | "1:add\t%0, %0, %1\n\t" |
228 | ".set\tnoreorder" | 228 | "cmp.c\t%1, %0\n\t" |
229 | "lw\t%1, [%3, 12]\n\t" | ||
230 | "bleu 1f\n\t" | ||
231 | "addi\t%0, 0x1\n\t" | ||
232 | "1:add\t%0, %0, %1\n\t" | ||
233 | "cmp.c\t%1, %0\n\t" | ||
234 | "bleu 1f\n\t" | ||
235 | "addi\t%0, 0x1\n\t" | ||
236 | "1:\n\t" | ||
237 | ".set\toptimize" | ||
229 | : "=r" (sum), "=r" (proto) | 238 | : "=r" (sum), "=r" (proto) |
230 | : "r" (saddr), "r" (daddr), | 239 | : "r" (saddr), "r" (daddr), |
231 | "0" (htonl(len)), "1" (htonl(proto)), "r" (sum)); | 240 | "0" (htonl(len)), "1" (htonl(proto)), "r" (sum)); |
diff --git a/arch/score/include/asm/io.h b/arch/score/include/asm/io.h index fbbfd7132e3b..574c8827abe2 100644 --- a/arch/score/include/asm/io.h +++ b/arch/score/include/asm/io.h | |||
@@ -5,5 +5,4 @@ | |||
5 | 5 | ||
6 | #define virt_to_bus virt_to_phys | 6 | #define virt_to_bus virt_to_phys |
7 | #define bus_to_virt phys_to_virt | 7 | #define bus_to_virt phys_to_virt |
8 | |||
9 | #endif /* _ASM_SCORE_IO_H */ | 8 | #endif /* _ASM_SCORE_IO_H */ |
diff --git a/arch/score/include/asm/pgalloc.h b/arch/score/include/asm/pgalloc.h index 059a61b7071b..716b3fd1d863 100644 --- a/arch/score/include/asm/pgalloc.h +++ b/arch/score/include/asm/pgalloc.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_SCORE_PGALLOC_H | 2 | #define _ASM_SCORE_PGALLOC_H |
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | 5 | #include <linux/highmem.h> | |
6 | static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, | 6 | static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, |
7 | pte_t *pte) | 7 | pte_t *pte) |
8 | { | 8 | { |
diff --git a/arch/score/kernel/entry.S b/arch/score/kernel/entry.S index 7234ed09b7b7..befb87d30a89 100644 --- a/arch/score/kernel/entry.S +++ b/arch/score/kernel/entry.S | |||
@@ -264,7 +264,7 @@ resume_kernel: | |||
264 | disable_irq | 264 | disable_irq |
265 | lw r8, [r28, TI_PRE_COUNT] | 265 | lw r8, [r28, TI_PRE_COUNT] |
266 | cmpz.c r8 | 266 | cmpz.c r8 |
267 | bne r8, restore_all | 267 | bne restore_all |
268 | need_resched: | 268 | need_resched: |
269 | lw r8, [r28, TI_FLAGS] | 269 | lw r8, [r28, TI_FLAGS] |
270 | andri.c r9, r8, _TIF_NEED_RESCHED | 270 | andri.c r9, r8, _TIF_NEED_RESCHED |
@@ -415,7 +415,7 @@ ENTRY(handle_sys) | |||
415 | sw r9, [r0, PT_EPC] | 415 | sw r9, [r0, PT_EPC] |
416 | 416 | ||
417 | cmpi.c r27, __NR_syscalls # check syscall number | 417 | cmpi.c r27, __NR_syscalls # check syscall number |
418 | bgeu illegal_syscall | 418 | bcs illegal_syscall |
419 | 419 | ||
420 | slli r8, r27, 2 # get syscall routine | 420 | slli r8, r27, 2 # get syscall routine |
421 | la r11, sys_call_table | 421 | la r11, sys_call_table |
diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c index f4c6d02421d3..a1519ad3d49d 100644 --- a/arch/score/kernel/process.c +++ b/arch/score/kernel/process.c | |||
@@ -78,8 +78,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
78 | p->thread.reg0 = (unsigned long) childregs; | 78 | p->thread.reg0 = (unsigned long) childregs; |
79 | if (unlikely(p->flags & PF_KTHREAD)) { | 79 | if (unlikely(p->flags & PF_KTHREAD)) { |
80 | memset(childregs, 0, sizeof(struct pt_regs)); | 80 | memset(childregs, 0, sizeof(struct pt_regs)); |
81 | p->thread->reg12 = usp; | 81 | p->thread.reg12 = usp; |
82 | p->thread->reg13 = arg; | 82 | p->thread.reg13 = arg; |
83 | p->thread.reg3 = (unsigned long) ret_from_kernel_thread; | 83 | p->thread.reg3 = (unsigned long) ret_from_kernel_thread; |
84 | } else { | 84 | } else { |
85 | *childregs = *current_pt_regs(); | 85 | *childregs = *current_pt_regs(); |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 2137ad667438..78c4fdb91bc5 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -506,12 +506,17 @@ config SUN_OPENPROMFS | |||
506 | Only choose N if you know in advance that you will not need to modify | 506 | Only choose N if you know in advance that you will not need to modify |
507 | OpenPROM settings on the running system. | 507 | OpenPROM settings on the running system. |
508 | 508 | ||
509 | # Makefile helper | 509 | # Makefile helpers |
510 | config SPARC64_PCI | 510 | config SPARC64_PCI |
511 | bool | 511 | bool |
512 | default y | 512 | default y |
513 | depends on SPARC64 && PCI | 513 | depends on SPARC64 && PCI |
514 | 514 | ||
515 | config SPARC64_PCI_MSI | ||
516 | bool | ||
517 | default y | ||
518 | depends on SPARC64_PCI && PCI_MSI | ||
519 | |||
515 | endmenu | 520 | endmenu |
516 | 521 | ||
517 | menu "Executable file formats" | 522 | menu "Executable file formats" |
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h index e204f902e6c9..7c90c50c200d 100644 --- a/arch/sparc/include/asm/floppy_64.h +++ b/arch/sparc/include/asm/floppy_64.h | |||
@@ -254,7 +254,7 @@ static int sun_fd_request_irq(void) | |||
254 | once = 1; | 254 | once = 1; |
255 | 255 | ||
256 | error = request_irq(FLOPPY_IRQ, sparc_floppy_irq, | 256 | error = request_irq(FLOPPY_IRQ, sparc_floppy_irq, |
257 | IRQF_DISABLED, "floppy", NULL); | 257 | 0, "floppy", NULL); |
258 | 258 | ||
259 | return ((error == 0) ? 0 : -1); | 259 | return ((error == 0) ? 0 : -1); |
260 | } | 260 | } |
diff --git a/arch/sparc/include/asm/jump_label.h b/arch/sparc/include/asm/jump_label.h index 5080d16a832f..ec2e2e2aba7d 100644 --- a/arch/sparc/include/asm/jump_label.h +++ b/arch/sparc/include/asm/jump_label.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | static __always_inline bool arch_static_branch(struct static_key *key) | 10 | static __always_inline bool arch_static_branch(struct static_key *key) |
11 | { | 11 | { |
12 | asm goto("1:\n\t" | 12 | asm_volatile_goto("1:\n\t" |
13 | "nop\n\t" | 13 | "nop\n\t" |
14 | "nop\n\t" | 14 | "nop\n\t" |
15 | ".pushsection __jump_table, \"aw\"\n\t" | 15 | ".pushsection __jump_table, \"aw\"\n\t" |
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index d432fb20358e..d15cc1794b0e 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
@@ -1,3 +1,4 @@ | |||
1 | |||
1 | # | 2 | # |
2 | # Makefile for the linux kernel. | 3 | # Makefile for the linux kernel. |
3 | # | 4 | # |
@@ -99,7 +100,7 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o | |||
99 | obj-$(CONFIG_SPARC64_PCI) += pci.o pci_common.o psycho_common.o | 100 | obj-$(CONFIG_SPARC64_PCI) += pci.o pci_common.o psycho_common.o |
100 | obj-$(CONFIG_SPARC64_PCI) += pci_psycho.o pci_sabre.o pci_schizo.o | 101 | obj-$(CONFIG_SPARC64_PCI) += pci_psycho.o pci_sabre.o pci_schizo.o |
101 | obj-$(CONFIG_SPARC64_PCI) += pci_sun4v.o pci_sun4v_asm.o pci_fire.o | 102 | obj-$(CONFIG_SPARC64_PCI) += pci_sun4v.o pci_sun4v_asm.o pci_fire.o |
102 | obj-$(CONFIG_PCI_MSI) += pci_msi.o | 103 | obj-$(CONFIG_SPARC64_PCI_MSI) += pci_msi.o |
103 | 104 | ||
104 | obj-$(CONFIG_COMPAT) += sys32.o sys_sparc32.o signal32.o | 105 | obj-$(CONFIG_COMPAT) += sys32.o sys_sparc32.o signal32.o |
105 | 106 | ||
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 62d6b153ffa2..dff60abbea01 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
@@ -849,9 +849,8 @@ void ldom_reboot(const char *boot_command) | |||
849 | if (boot_command && strlen(boot_command)) { | 849 | if (boot_command && strlen(boot_command)) { |
850 | unsigned long len; | 850 | unsigned long len; |
851 | 851 | ||
852 | strcpy(full_boot_str, "boot "); | 852 | snprintf(full_boot_str, sizeof(full_boot_str), "boot %s", |
853 | strlcpy(full_boot_str + strlen("boot "), boot_command, | 853 | boot_command); |
854 | sizeof(full_boot_str + strlen("boot "))); | ||
855 | len = strlen(full_boot_str); | 854 | len = strlen(full_boot_str); |
856 | 855 | ||
857 | if (reboot_data_supported) { | 856 | if (reboot_data_supported) { |
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index 54df554b82d9..e01d75d40329 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c | |||
@@ -1249,12 +1249,12 @@ int ldc_bind(struct ldc_channel *lp, const char *name) | |||
1249 | snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name); | 1249 | snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name); |
1250 | snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); | 1250 | snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); |
1251 | 1251 | ||
1252 | err = request_irq(lp->cfg.rx_irq, ldc_rx, IRQF_DISABLED, | 1252 | err = request_irq(lp->cfg.rx_irq, ldc_rx, 0, |
1253 | lp->rx_irq_name, lp); | 1253 | lp->rx_irq_name, lp); |
1254 | if (err) | 1254 | if (err) |
1255 | return err; | 1255 | return err; |
1256 | 1256 | ||
1257 | err = request_irq(lp->cfg.tx_irq, ldc_tx, IRQF_DISABLED, | 1257 | err = request_irq(lp->cfg.tx_irq, ldc_tx, 0, |
1258 | lp->tx_irq_name, lp); | 1258 | lp->tx_irq_name, lp); |
1259 | if (err) { | 1259 | if (err) { |
1260 | free_irq(lp->cfg.rx_irq, lp); | 1260 | free_irq(lp->cfg.rx_irq, lp); |
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c index d397d7fc5c28..6b39125eb927 100644 --- a/arch/sparc/kernel/prom_64.c +++ b/arch/sparc/kernel/prom_64.c | |||
@@ -373,6 +373,59 @@ static const char *get_mid_prop(void) | |||
373 | return (tlb_type == spitfire ? "upa-portid" : "portid"); | 373 | return (tlb_type == spitfire ? "upa-portid" : "portid"); |
374 | } | 374 | } |
375 | 375 | ||
376 | bool arch_find_n_match_cpu_physical_id(struct device_node *cpun, | ||
377 | int cpu, unsigned int *thread) | ||
378 | { | ||
379 | const char *mid_prop = get_mid_prop(); | ||
380 | int this_cpu_id; | ||
381 | |||
382 | /* On hypervisor based platforms we interrogate the 'reg' | ||
383 | * property. On everything else we look for a 'upa-portis', | ||
384 | * 'portid', or 'cpuid' property. | ||
385 | */ | ||
386 | |||
387 | if (tlb_type == hypervisor) { | ||
388 | struct property *prop = of_find_property(cpun, "reg", NULL); | ||
389 | u32 *regs; | ||
390 | |||
391 | if (!prop) { | ||
392 | pr_warn("CPU node missing reg property\n"); | ||
393 | return false; | ||
394 | } | ||
395 | regs = prop->value; | ||
396 | this_cpu_id = regs[0] & 0x0fffffff; | ||
397 | } else { | ||
398 | this_cpu_id = of_getintprop_default(cpun, mid_prop, -1); | ||
399 | |||
400 | if (this_cpu_id < 0) { | ||
401 | mid_prop = "cpuid"; | ||
402 | this_cpu_id = of_getintprop_default(cpun, mid_prop, -1); | ||
403 | } | ||
404 | if (this_cpu_id < 0) { | ||
405 | pr_warn("CPU node missing cpu ID property\n"); | ||
406 | return false; | ||
407 | } | ||
408 | } | ||
409 | if (this_cpu_id == cpu) { | ||
410 | if (thread) { | ||
411 | int proc_id = cpu_data(cpu).proc_id; | ||
412 | |||
413 | /* On sparc64, the cpu thread information is obtained | ||
414 | * either from OBP or the machine description. We've | ||
415 | * actually probed this information already long before | ||
416 | * this interface gets called so instead of interrogating | ||
417 | * both the OF node and the MDESC again, just use what | ||
418 | * we discovered already. | ||
419 | */ | ||
420 | if (proc_id < 0) | ||
421 | proc_id = 0; | ||
422 | *thread = proc_id; | ||
423 | } | ||
424 | return true; | ||
425 | } | ||
426 | return false; | ||
427 | } | ||
428 | |||
376 | static void *of_iterate_over_cpus(void *(*func)(struct device_node *, int, int), int arg) | 429 | static void *of_iterate_over_cpus(void *(*func)(struct device_node *, int, int), int arg) |
377 | { | 430 | { |
378 | struct device_node *dp; | 431 | struct device_node *dp; |
diff --git a/arch/tile/include/asm/atomic.h b/arch/tile/include/asm/atomic.h index d385eaadece7..709798460763 100644 --- a/arch/tile/include/asm/atomic.h +++ b/arch/tile/include/asm/atomic.h | |||
@@ -166,7 +166,7 @@ static inline int atomic_cmpxchg(atomic_t *v, int o, int n) | |||
166 | * | 166 | * |
167 | * Atomically sets @v to @i and returns old @v | 167 | * Atomically sets @v to @i and returns old @v |
168 | */ | 168 | */ |
169 | static inline u64 atomic64_xchg(atomic64_t *v, u64 n) | 169 | static inline long long atomic64_xchg(atomic64_t *v, long long n) |
170 | { | 170 | { |
171 | return xchg64(&v->counter, n); | 171 | return xchg64(&v->counter, n); |
172 | } | 172 | } |
@@ -180,7 +180,8 @@ static inline u64 atomic64_xchg(atomic64_t *v, u64 n) | |||
180 | * Atomically checks if @v holds @o and replaces it with @n if so. | 180 | * Atomically checks if @v holds @o and replaces it with @n if so. |
181 | * Returns the old value at @v. | 181 | * Returns the old value at @v. |
182 | */ | 182 | */ |
183 | static inline u64 atomic64_cmpxchg(atomic64_t *v, u64 o, u64 n) | 183 | static inline long long atomic64_cmpxchg(atomic64_t *v, long long o, |
184 | long long n) | ||
184 | { | 185 | { |
185 | return cmpxchg64(&v->counter, o, n); | 186 | return cmpxchg64(&v->counter, o, n); |
186 | } | 187 | } |
diff --git a/arch/tile/include/asm/atomic_32.h b/arch/tile/include/asm/atomic_32.h index 0d0395b1b152..1ad4a1f7d42b 100644 --- a/arch/tile/include/asm/atomic_32.h +++ b/arch/tile/include/asm/atomic_32.h | |||
@@ -80,7 +80,7 @@ static inline void atomic_set(atomic_t *v, int n) | |||
80 | /* A 64bit atomic type */ | 80 | /* A 64bit atomic type */ |
81 | 81 | ||
82 | typedef struct { | 82 | typedef struct { |
83 | u64 __aligned(8) counter; | 83 | long long counter; |
84 | } atomic64_t; | 84 | } atomic64_t; |
85 | 85 | ||
86 | #define ATOMIC64_INIT(val) { (val) } | 86 | #define ATOMIC64_INIT(val) { (val) } |
@@ -91,14 +91,14 @@ typedef struct { | |||
91 | * | 91 | * |
92 | * Atomically reads the value of @v. | 92 | * Atomically reads the value of @v. |
93 | */ | 93 | */ |
94 | static inline u64 atomic64_read(const atomic64_t *v) | 94 | static inline long long atomic64_read(const atomic64_t *v) |
95 | { | 95 | { |
96 | /* | 96 | /* |
97 | * Requires an atomic op to read both 32-bit parts consistently. | 97 | * Requires an atomic op to read both 32-bit parts consistently. |
98 | * Casting away const is safe since the atomic support routines | 98 | * Casting away const is safe since the atomic support routines |
99 | * do not write to memory if the value has not been modified. | 99 | * do not write to memory if the value has not been modified. |
100 | */ | 100 | */ |
101 | return _atomic64_xchg_add((u64 *)&v->counter, 0); | 101 | return _atomic64_xchg_add((long long *)&v->counter, 0); |
102 | } | 102 | } |
103 | 103 | ||
104 | /** | 104 | /** |
@@ -108,7 +108,7 @@ static inline u64 atomic64_read(const atomic64_t *v) | |||
108 | * | 108 | * |
109 | * Atomically adds @i to @v. | 109 | * Atomically adds @i to @v. |
110 | */ | 110 | */ |
111 | static inline void atomic64_add(u64 i, atomic64_t *v) | 111 | static inline void atomic64_add(long long i, atomic64_t *v) |
112 | { | 112 | { |
113 | _atomic64_xchg_add(&v->counter, i); | 113 | _atomic64_xchg_add(&v->counter, i); |
114 | } | 114 | } |
@@ -120,7 +120,7 @@ static inline void atomic64_add(u64 i, atomic64_t *v) | |||
120 | * | 120 | * |
121 | * Atomically adds @i to @v and returns @i + @v | 121 | * Atomically adds @i to @v and returns @i + @v |
122 | */ | 122 | */ |
123 | static inline u64 atomic64_add_return(u64 i, atomic64_t *v) | 123 | static inline long long atomic64_add_return(long long i, atomic64_t *v) |
124 | { | 124 | { |
125 | smp_mb(); /* barrier for proper semantics */ | 125 | smp_mb(); /* barrier for proper semantics */ |
126 | return _atomic64_xchg_add(&v->counter, i) + i; | 126 | return _atomic64_xchg_add(&v->counter, i) + i; |
@@ -135,7 +135,8 @@ static inline u64 atomic64_add_return(u64 i, atomic64_t *v) | |||
135 | * Atomically adds @a to @v, so long as @v was not already @u. | 135 | * Atomically adds @a to @v, so long as @v was not already @u. |
136 | * Returns non-zero if @v was not @u, and zero otherwise. | 136 | * Returns non-zero if @v was not @u, and zero otherwise. |
137 | */ | 137 | */ |
138 | static inline u64 atomic64_add_unless(atomic64_t *v, u64 a, u64 u) | 138 | static inline long long atomic64_add_unless(atomic64_t *v, long long a, |
139 | long long u) | ||
139 | { | 140 | { |
140 | smp_mb(); /* barrier for proper semantics */ | 141 | smp_mb(); /* barrier for proper semantics */ |
141 | return _atomic64_xchg_add_unless(&v->counter, a, u) != u; | 142 | return _atomic64_xchg_add_unless(&v->counter, a, u) != u; |
@@ -151,7 +152,7 @@ static inline u64 atomic64_add_unless(atomic64_t *v, u64 a, u64 u) | |||
151 | * atomic64_set() can't be just a raw store, since it would be lost if it | 152 | * atomic64_set() can't be just a raw store, since it would be lost if it |
152 | * fell between the load and store of one of the other atomic ops. | 153 | * fell between the load and store of one of the other atomic ops. |
153 | */ | 154 | */ |
154 | static inline void atomic64_set(atomic64_t *v, u64 n) | 155 | static inline void atomic64_set(atomic64_t *v, long long n) |
155 | { | 156 | { |
156 | _atomic64_xchg(&v->counter, n); | 157 | _atomic64_xchg(&v->counter, n); |
157 | } | 158 | } |
@@ -236,11 +237,13 @@ extern struct __get_user __atomic_xchg_add_unless(volatile int *p, | |||
236 | extern struct __get_user __atomic_or(volatile int *p, int *lock, int n); | 237 | extern struct __get_user __atomic_or(volatile int *p, int *lock, int n); |
237 | extern struct __get_user __atomic_andn(volatile int *p, int *lock, int n); | 238 | extern struct __get_user __atomic_andn(volatile int *p, int *lock, int n); |
238 | extern struct __get_user __atomic_xor(volatile int *p, int *lock, int n); | 239 | extern struct __get_user __atomic_xor(volatile int *p, int *lock, int n); |
239 | extern u64 __atomic64_cmpxchg(volatile u64 *p, int *lock, u64 o, u64 n); | 240 | extern long long __atomic64_cmpxchg(volatile long long *p, int *lock, |
240 | extern u64 __atomic64_xchg(volatile u64 *p, int *lock, u64 n); | 241 | long long o, long long n); |
241 | extern u64 __atomic64_xchg_add(volatile u64 *p, int *lock, u64 n); | 242 | extern long long __atomic64_xchg(volatile long long *p, int *lock, long long n); |
242 | extern u64 __atomic64_xchg_add_unless(volatile u64 *p, | 243 | extern long long __atomic64_xchg_add(volatile long long *p, int *lock, |
243 | int *lock, u64 o, u64 n); | 244 | long long n); |
245 | extern long long __atomic64_xchg_add_unless(volatile long long *p, | ||
246 | int *lock, long long o, long long n); | ||
244 | 247 | ||
245 | /* Return failure from the atomic wrappers. */ | 248 | /* Return failure from the atomic wrappers. */ |
246 | struct __get_user __atomic_bad_address(int __user *addr); | 249 | struct __get_user __atomic_bad_address(int __user *addr); |
diff --git a/arch/tile/include/asm/cmpxchg.h b/arch/tile/include/asm/cmpxchg.h index 4001d5eab4bb..0ccda3c425be 100644 --- a/arch/tile/include/asm/cmpxchg.h +++ b/arch/tile/include/asm/cmpxchg.h | |||
@@ -35,10 +35,10 @@ int _atomic_xchg(int *ptr, int n); | |||
35 | int _atomic_xchg_add(int *v, int i); | 35 | int _atomic_xchg_add(int *v, int i); |
36 | int _atomic_xchg_add_unless(int *v, int a, int u); | 36 | int _atomic_xchg_add_unless(int *v, int a, int u); |
37 | int _atomic_cmpxchg(int *ptr, int o, int n); | 37 | int _atomic_cmpxchg(int *ptr, int o, int n); |
38 | u64 _atomic64_xchg(u64 *v, u64 n); | 38 | long long _atomic64_xchg(long long *v, long long n); |
39 | u64 _atomic64_xchg_add(u64 *v, u64 i); | 39 | long long _atomic64_xchg_add(long long *v, long long i); |
40 | u64 _atomic64_xchg_add_unless(u64 *v, u64 a, u64 u); | 40 | long long _atomic64_xchg_add_unless(long long *v, long long a, long long u); |
41 | u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | 41 | long long _atomic64_cmpxchg(long long *v, long long o, long long n); |
42 | 42 | ||
43 | #define xchg(ptr, n) \ | 43 | #define xchg(ptr, n) \ |
44 | ({ \ | 44 | ({ \ |
@@ -53,7 +53,8 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
53 | if (sizeof(*(ptr)) != 4) \ | 53 | if (sizeof(*(ptr)) != 4) \ |
54 | __cmpxchg_called_with_bad_pointer(); \ | 54 | __cmpxchg_called_with_bad_pointer(); \ |
55 | smp_mb(); \ | 55 | smp_mb(); \ |
56 | (typeof(*(ptr)))_atomic_cmpxchg((int *)ptr, (int)o, (int)n); \ | 56 | (typeof(*(ptr)))_atomic_cmpxchg((int *)ptr, (int)o, \ |
57 | (int)n); \ | ||
57 | }) | 58 | }) |
58 | 59 | ||
59 | #define xchg64(ptr, n) \ | 60 | #define xchg64(ptr, n) \ |
@@ -61,7 +62,8 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
61 | if (sizeof(*(ptr)) != 8) \ | 62 | if (sizeof(*(ptr)) != 8) \ |
62 | __xchg_called_with_bad_pointer(); \ | 63 | __xchg_called_with_bad_pointer(); \ |
63 | smp_mb(); \ | 64 | smp_mb(); \ |
64 | (typeof(*(ptr)))_atomic64_xchg((u64 *)(ptr), (u64)(n)); \ | 65 | (typeof(*(ptr)))_atomic64_xchg((long long *)(ptr), \ |
66 | (long long)(n)); \ | ||
65 | }) | 67 | }) |
66 | 68 | ||
67 | #define cmpxchg64(ptr, o, n) \ | 69 | #define cmpxchg64(ptr, o, n) \ |
@@ -69,7 +71,8 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
69 | if (sizeof(*(ptr)) != 8) \ | 71 | if (sizeof(*(ptr)) != 8) \ |
70 | __cmpxchg_called_with_bad_pointer(); \ | 72 | __cmpxchg_called_with_bad_pointer(); \ |
71 | smp_mb(); \ | 73 | smp_mb(); \ |
72 | (typeof(*(ptr)))_atomic64_cmpxchg((u64 *)ptr, (u64)o, (u64)n); \ | 74 | (typeof(*(ptr)))_atomic64_cmpxchg((long long *)ptr, \ |
75 | (long long)o, (long long)n); \ | ||
73 | }) | 76 | }) |
74 | 77 | ||
75 | #else | 78 | #else |
@@ -81,10 +84,11 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
81 | switch (sizeof(*(ptr))) { \ | 84 | switch (sizeof(*(ptr))) { \ |
82 | case 4: \ | 85 | case 4: \ |
83 | __x = (typeof(__x))(unsigned long) \ | 86 | __x = (typeof(__x))(unsigned long) \ |
84 | __insn_exch4((ptr), (u32)(unsigned long)(n)); \ | 87 | __insn_exch4((ptr), \ |
88 | (u32)(unsigned long)(n)); \ | ||
85 | break; \ | 89 | break; \ |
86 | case 8: \ | 90 | case 8: \ |
87 | __x = (typeof(__x)) \ | 91 | __x = (typeof(__x)) \ |
88 | __insn_exch((ptr), (unsigned long)(n)); \ | 92 | __insn_exch((ptr), (unsigned long)(n)); \ |
89 | break; \ | 93 | break; \ |
90 | default: \ | 94 | default: \ |
@@ -103,10 +107,12 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
103 | switch (sizeof(*(ptr))) { \ | 107 | switch (sizeof(*(ptr))) { \ |
104 | case 4: \ | 108 | case 4: \ |
105 | __x = (typeof(__x))(unsigned long) \ | 109 | __x = (typeof(__x))(unsigned long) \ |
106 | __insn_cmpexch4((ptr), (u32)(unsigned long)(n)); \ | 110 | __insn_cmpexch4((ptr), \ |
111 | (u32)(unsigned long)(n)); \ | ||
107 | break; \ | 112 | break; \ |
108 | case 8: \ | 113 | case 8: \ |
109 | __x = (typeof(__x))__insn_cmpexch((ptr), (u64)(n)); \ | 114 | __x = (typeof(__x))__insn_cmpexch((ptr), \ |
115 | (long long)(n)); \ | ||
110 | break; \ | 116 | break; \ |
111 | default: \ | 117 | default: \ |
112 | __cmpxchg_called_with_bad_pointer(); \ | 118 | __cmpxchg_called_with_bad_pointer(); \ |
diff --git a/arch/tile/include/asm/percpu.h b/arch/tile/include/asm/percpu.h index 63294f5a8efb..4f7ae39fa202 100644 --- a/arch/tile/include/asm/percpu.h +++ b/arch/tile/include/asm/percpu.h | |||
@@ -15,9 +15,37 @@ | |||
15 | #ifndef _ASM_TILE_PERCPU_H | 15 | #ifndef _ASM_TILE_PERCPU_H |
16 | #define _ASM_TILE_PERCPU_H | 16 | #define _ASM_TILE_PERCPU_H |
17 | 17 | ||
18 | register unsigned long __my_cpu_offset __asm__("tp"); | 18 | register unsigned long my_cpu_offset_reg asm("tp"); |
19 | #define __my_cpu_offset __my_cpu_offset | 19 | |
20 | #define set_my_cpu_offset(tp) (__my_cpu_offset = (tp)) | 20 | #ifdef CONFIG_PREEMPT |
21 | /* | ||
22 | * For full preemption, we can't just use the register variable | ||
23 | * directly, since we need barrier() to hazard against it, causing the | ||
24 | * compiler to reload anything computed from a previous "tp" value. | ||
25 | * But we also don't want to use volatile asm, since we'd like the | ||
26 | * compiler to be able to cache the value across multiple percpu reads. | ||
27 | * So we use a fake stack read as a hazard against barrier(). | ||
28 | * The 'U' constraint is like 'm' but disallows postincrement. | ||
29 | */ | ||
30 | static inline unsigned long __my_cpu_offset(void) | ||
31 | { | ||
32 | unsigned long tp; | ||
33 | register unsigned long *sp asm("sp"); | ||
34 | asm("move %0, tp" : "=r" (tp) : "U" (*sp)); | ||
35 | return tp; | ||
36 | } | ||
37 | #define __my_cpu_offset __my_cpu_offset() | ||
38 | #else | ||
39 | /* | ||
40 | * We don't need to hazard against barrier() since "tp" doesn't ever | ||
41 | * change with PREEMPT_NONE, and with PREEMPT_VOLUNTARY it only | ||
42 | * changes at function call points, at which we are already re-reading | ||
43 | * the value of "tp" due to "my_cpu_offset_reg" being a global variable. | ||
44 | */ | ||
45 | #define __my_cpu_offset my_cpu_offset_reg | ||
46 | #endif | ||
47 | |||
48 | #define set_my_cpu_offset(tp) (my_cpu_offset_reg = (tp)) | ||
21 | 49 | ||
22 | #include <asm-generic/percpu.h> | 50 | #include <asm-generic/percpu.h> |
23 | 51 | ||
diff --git a/arch/tile/kernel/hardwall.c b/arch/tile/kernel/hardwall.c index df27a1fd94a3..531f4c365351 100644 --- a/arch/tile/kernel/hardwall.c +++ b/arch/tile/kernel/hardwall.c | |||
@@ -66,7 +66,7 @@ static struct hardwall_type hardwall_types[] = { | |||
66 | 0, | 66 | 0, |
67 | "udn", | 67 | "udn", |
68 | LIST_HEAD_INIT(hardwall_types[HARDWALL_UDN].list), | 68 | LIST_HEAD_INIT(hardwall_types[HARDWALL_UDN].list), |
69 | __SPIN_LOCK_INITIALIZER(hardwall_types[HARDWALL_UDN].lock), | 69 | __SPIN_LOCK_UNLOCKED(hardwall_types[HARDWALL_UDN].lock), |
70 | NULL | 70 | NULL |
71 | }, | 71 | }, |
72 | #ifndef __tilepro__ | 72 | #ifndef __tilepro__ |
@@ -77,7 +77,7 @@ static struct hardwall_type hardwall_types[] = { | |||
77 | 1, /* disabled pending hypervisor support */ | 77 | 1, /* disabled pending hypervisor support */ |
78 | "idn", | 78 | "idn", |
79 | LIST_HEAD_INIT(hardwall_types[HARDWALL_IDN].list), | 79 | LIST_HEAD_INIT(hardwall_types[HARDWALL_IDN].list), |
80 | __SPIN_LOCK_INITIALIZER(hardwall_types[HARDWALL_IDN].lock), | 80 | __SPIN_LOCK_UNLOCKED(hardwall_types[HARDWALL_IDN].lock), |
81 | NULL | 81 | NULL |
82 | }, | 82 | }, |
83 | { /* access to user-space IPI */ | 83 | { /* access to user-space IPI */ |
@@ -87,7 +87,7 @@ static struct hardwall_type hardwall_types[] = { | |||
87 | 0, | 87 | 0, |
88 | "ipi", | 88 | "ipi", |
89 | LIST_HEAD_INIT(hardwall_types[HARDWALL_IPI].list), | 89 | LIST_HEAD_INIT(hardwall_types[HARDWALL_IPI].list), |
90 | __SPIN_LOCK_INITIALIZER(hardwall_types[HARDWALL_IPI].lock), | 90 | __SPIN_LOCK_UNLOCKED(hardwall_types[HARDWALL_IPI].lock), |
91 | NULL | 91 | NULL |
92 | }, | 92 | }, |
93 | #endif | 93 | #endif |
diff --git a/arch/tile/kernel/intvec_32.S b/arch/tile/kernel/intvec_32.S index 088d5c141e68..2cbe6d5dd6b0 100644 --- a/arch/tile/kernel/intvec_32.S +++ b/arch/tile/kernel/intvec_32.S | |||
@@ -815,6 +815,9 @@ STD_ENTRY(interrupt_return) | |||
815 | } | 815 | } |
816 | bzt r28, 1f | 816 | bzt r28, 1f |
817 | bnz r29, 1f | 817 | bnz r29, 1f |
818 | /* Disable interrupts explicitly for preemption. */ | ||
819 | IRQ_DISABLE(r20,r21) | ||
820 | TRACE_IRQS_OFF | ||
818 | jal preempt_schedule_irq | 821 | jal preempt_schedule_irq |
819 | FEEDBACK_REENTER(interrupt_return) | 822 | FEEDBACK_REENTER(interrupt_return) |
820 | 1: | 823 | 1: |
diff --git a/arch/tile/kernel/intvec_64.S b/arch/tile/kernel/intvec_64.S index ec755d3f3734..b8fc497f2437 100644 --- a/arch/tile/kernel/intvec_64.S +++ b/arch/tile/kernel/intvec_64.S | |||
@@ -841,6 +841,9 @@ STD_ENTRY(interrupt_return) | |||
841 | } | 841 | } |
842 | beqzt r28, 1f | 842 | beqzt r28, 1f |
843 | bnez r29, 1f | 843 | bnez r29, 1f |
844 | /* Disable interrupts explicitly for preemption. */ | ||
845 | IRQ_DISABLE(r20,r21) | ||
846 | TRACE_IRQS_OFF | ||
844 | jal preempt_schedule_irq | 847 | jal preempt_schedule_irq |
845 | FEEDBACK_REENTER(interrupt_return) | 848 | FEEDBACK_REENTER(interrupt_return) |
846 | 1: | 849 | 1: |
diff --git a/arch/tile/kernel/stack.c b/arch/tile/kernel/stack.c index 362284af3afd..c93977a62116 100644 --- a/arch/tile/kernel/stack.c +++ b/arch/tile/kernel/stack.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mmzone.h> | 23 | #include <linux/mmzone.h> |
24 | #include <linux/dcache.h> | 24 | #include <linux/dcache.h> |
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/string.h> | ||
26 | #include <asm/backtrace.h> | 27 | #include <asm/backtrace.h> |
27 | #include <asm/page.h> | 28 | #include <asm/page.h> |
28 | #include <asm/ucontext.h> | 29 | #include <asm/ucontext.h> |
@@ -332,21 +333,18 @@ static void describe_addr(struct KBacktraceIterator *kbt, | |||
332 | } | 333 | } |
333 | 334 | ||
334 | if (vma->vm_file) { | 335 | if (vma->vm_file) { |
335 | char *s; | ||
336 | p = d_path(&vma->vm_file->f_path, buf, bufsize); | 336 | p = d_path(&vma->vm_file->f_path, buf, bufsize); |
337 | if (IS_ERR(p)) | 337 | if (IS_ERR(p)) |
338 | p = "?"; | 338 | p = "?"; |
339 | s = strrchr(p, '/'); | 339 | name = kbasename(p); |
340 | if (s) | ||
341 | p = s+1; | ||
342 | } else { | 340 | } else { |
343 | p = "anon"; | 341 | name = "anon"; |
344 | } | 342 | } |
345 | 343 | ||
346 | /* Generate a string description of the vma info. */ | 344 | /* Generate a string description of the vma info. */ |
347 | namelen = strlen(p); | 345 | namelen = strlen(name); |
348 | remaining = (bufsize - 1) - namelen; | 346 | remaining = (bufsize - 1) - namelen; |
349 | memmove(buf, p, namelen); | 347 | memmove(buf, name, namelen); |
350 | snprintf(buf + namelen, remaining, "[%lx+%lx] ", | 348 | snprintf(buf + namelen, remaining, "[%lx+%lx] ", |
351 | vma->vm_start, vma->vm_end - vma->vm_start); | 349 | vma->vm_start, vma->vm_end - vma->vm_start); |
352 | } | 350 | } |
diff --git a/arch/tile/lib/atomic_32.c b/arch/tile/lib/atomic_32.c index 759efa337be8..c89b211fd9e7 100644 --- a/arch/tile/lib/atomic_32.c +++ b/arch/tile/lib/atomic_32.c | |||
@@ -107,19 +107,19 @@ unsigned long _atomic_xor(volatile unsigned long *p, unsigned long mask) | |||
107 | EXPORT_SYMBOL(_atomic_xor); | 107 | EXPORT_SYMBOL(_atomic_xor); |
108 | 108 | ||
109 | 109 | ||
110 | u64 _atomic64_xchg(u64 *v, u64 n) | 110 | long long _atomic64_xchg(long long *v, long long n) |
111 | { | 111 | { |
112 | return __atomic64_xchg(v, __atomic_setup(v), n); | 112 | return __atomic64_xchg(v, __atomic_setup(v), n); |
113 | } | 113 | } |
114 | EXPORT_SYMBOL(_atomic64_xchg); | 114 | EXPORT_SYMBOL(_atomic64_xchg); |
115 | 115 | ||
116 | u64 _atomic64_xchg_add(u64 *v, u64 i) | 116 | long long _atomic64_xchg_add(long long *v, long long i) |
117 | { | 117 | { |
118 | return __atomic64_xchg_add(v, __atomic_setup(v), i); | 118 | return __atomic64_xchg_add(v, __atomic_setup(v), i); |
119 | } | 119 | } |
120 | EXPORT_SYMBOL(_atomic64_xchg_add); | 120 | EXPORT_SYMBOL(_atomic64_xchg_add); |
121 | 121 | ||
122 | u64 _atomic64_xchg_add_unless(u64 *v, u64 a, u64 u) | 122 | long long _atomic64_xchg_add_unless(long long *v, long long a, long long u) |
123 | { | 123 | { |
124 | /* | 124 | /* |
125 | * Note: argument order is switched here since it is easier | 125 | * Note: argument order is switched here since it is easier |
@@ -130,7 +130,7 @@ u64 _atomic64_xchg_add_unless(u64 *v, u64 a, u64 u) | |||
130 | } | 130 | } |
131 | EXPORT_SYMBOL(_atomic64_xchg_add_unless); | 131 | EXPORT_SYMBOL(_atomic64_xchg_add_unless); |
132 | 132 | ||
133 | u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n) | 133 | long long _atomic64_cmpxchg(long long *v, long long o, long long n) |
134 | { | 134 | { |
135 | return __atomic64_cmpxchg(v, __atomic_setup(v), o, n); | 135 | return __atomic64_cmpxchg(v, __atomic_setup(v), o, n); |
136 | } | 136 | } |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index ee2fb9d37745..145d703227bf 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -860,7 +860,7 @@ source "kernel/Kconfig.preempt" | |||
860 | 860 | ||
861 | config X86_UP_APIC | 861 | config X86_UP_APIC |
862 | bool "Local APIC support on uniprocessors" | 862 | bool "Local APIC support on uniprocessors" |
863 | depends on X86_32 && !SMP && !X86_32_NON_STANDARD | 863 | depends on X86_32 && !SMP && !X86_32_NON_STANDARD && !PCI_MSI |
864 | ---help--- | 864 | ---help--- |
865 | A local APIC (Advanced Programmable Interrupt Controller) is an | 865 | A local APIC (Advanced Programmable Interrupt Controller) is an |
866 | integrated interrupt controller in the CPU. If you have a single-CPU | 866 | integrated interrupt controller in the CPU. If you have a single-CPU |
@@ -885,11 +885,11 @@ config X86_UP_IOAPIC | |||
885 | 885 | ||
886 | config X86_LOCAL_APIC | 886 | config X86_LOCAL_APIC |
887 | def_bool y | 887 | def_bool y |
888 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC | 888 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI |
889 | 889 | ||
890 | config X86_IO_APIC | 890 | config X86_IO_APIC |
891 | def_bool y | 891 | def_bool y |
892 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC | 892 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC || PCI_MSI |
893 | 893 | ||
894 | config X86_VISWS_APIC | 894 | config X86_VISWS_APIC |
895 | def_bool y | 895 | def_bool y |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index d3f5c63078d8..89270b4318db 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -374,7 +374,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit) | |||
374 | * Catch too early usage of this before alternatives | 374 | * Catch too early usage of this before alternatives |
375 | * have run. | 375 | * have run. |
376 | */ | 376 | */ |
377 | asm goto("1: jmp %l[t_warn]\n" | 377 | asm_volatile_goto("1: jmp %l[t_warn]\n" |
378 | "2:\n" | 378 | "2:\n" |
379 | ".section .altinstructions,\"a\"\n" | 379 | ".section .altinstructions,\"a\"\n" |
380 | " .long 1b - .\n" | 380 | " .long 1b - .\n" |
@@ -388,7 +388,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit) | |||
388 | 388 | ||
389 | #endif | 389 | #endif |
390 | 390 | ||
391 | asm goto("1: jmp %l[t_no]\n" | 391 | asm_volatile_goto("1: jmp %l[t_no]\n" |
392 | "2:\n" | 392 | "2:\n" |
393 | ".section .altinstructions,\"a\"\n" | 393 | ".section .altinstructions,\"a\"\n" |
394 | " .long 1b - .\n" | 394 | " .long 1b - .\n" |
@@ -453,7 +453,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit) | |||
453 | * have. Thus, we force the jump to the widest, 4-byte, signed relative | 453 | * have. Thus, we force the jump to the widest, 4-byte, signed relative |
454 | * offset even though the last would often fit in less bytes. | 454 | * offset even though the last would often fit in less bytes. |
455 | */ | 455 | */ |
456 | asm goto("1: .byte 0xe9\n .long %l[t_dynamic] - 2f\n" | 456 | asm_volatile_goto("1: .byte 0xe9\n .long %l[t_dynamic] - 2f\n" |
457 | "2:\n" | 457 | "2:\n" |
458 | ".section .altinstructions,\"a\"\n" | 458 | ".section .altinstructions,\"a\"\n" |
459 | " .long 1b - .\n" /* src offset */ | 459 | " .long 1b - .\n" /* src offset */ |
diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h index 64507f35800c..6a2cefb4395a 100644 --- a/arch/x86/include/asm/jump_label.h +++ b/arch/x86/include/asm/jump_label.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | static __always_inline bool arch_static_branch(struct static_key *key) | 19 | static __always_inline bool arch_static_branch(struct static_key *key) |
20 | { | 20 | { |
21 | asm goto("1:" | 21 | asm_volatile_goto("1:" |
22 | ".byte " __stringify(STATIC_KEY_INIT_NOP) "\n\t" | 22 | ".byte " __stringify(STATIC_KEY_INIT_NOP) "\n\t" |
23 | ".pushsection __jump_table, \"aw\" \n\t" | 23 | ".pushsection __jump_table, \"aw\" \n\t" |
24 | _ASM_ALIGN "\n\t" | 24 | _ASM_ALIGN "\n\t" |
diff --git a/arch/x86/include/asm/mutex_64.h b/arch/x86/include/asm/mutex_64.h index e7e6751648ed..07537a44216e 100644 --- a/arch/x86/include/asm/mutex_64.h +++ b/arch/x86/include/asm/mutex_64.h | |||
@@ -20,7 +20,7 @@ | |||
20 | static inline void __mutex_fastpath_lock(atomic_t *v, | 20 | static inline void __mutex_fastpath_lock(atomic_t *v, |
21 | void (*fail_fn)(atomic_t *)) | 21 | void (*fail_fn)(atomic_t *)) |
22 | { | 22 | { |
23 | asm volatile goto(LOCK_PREFIX " decl %0\n" | 23 | asm_volatile_goto(LOCK_PREFIX " decl %0\n" |
24 | " jns %l[exit]\n" | 24 | " jns %l[exit]\n" |
25 | : : "m" (v->counter) | 25 | : : "m" (v->counter) |
26 | : "memory", "cc" | 26 | : "memory", "cc" |
@@ -75,7 +75,7 @@ static inline int __mutex_fastpath_lock_retval(atomic_t *count) | |||
75 | static inline void __mutex_fastpath_unlock(atomic_t *v, | 75 | static inline void __mutex_fastpath_unlock(atomic_t *v, |
76 | void (*fail_fn)(atomic_t *)) | 76 | void (*fail_fn)(atomic_t *)) |
77 | { | 77 | { |
78 | asm volatile goto(LOCK_PREFIX " incl %0\n" | 78 | asm_volatile_goto(LOCK_PREFIX " incl %0\n" |
79 | " jg %l[exit]\n" | 79 | " jg %l[exit]\n" |
80 | : : "m" (v->counter) | 80 | : : "m" (v->counter) |
81 | : "memory", "cc" | 81 | : "memory", "cc" |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 897783b3302a..9d8449158cf9 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -1888,10 +1888,7 @@ void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now) | |||
1888 | userpg->cap_user_rdpmc = x86_pmu.attr_rdpmc; | 1888 | userpg->cap_user_rdpmc = x86_pmu.attr_rdpmc; |
1889 | userpg->pmc_width = x86_pmu.cntval_bits; | 1889 | userpg->pmc_width = x86_pmu.cntval_bits; |
1890 | 1890 | ||
1891 | if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) | 1891 | if (!sched_clock_stable) |
1892 | return; | ||
1893 | |||
1894 | if (!boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) | ||
1895 | return; | 1892 | return; |
1896 | 1893 | ||
1897 | userpg->cap_user_time = 1; | 1894 | userpg->cap_user_time = 1; |
@@ -1899,10 +1896,8 @@ void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now) | |||
1899 | userpg->time_shift = CYC2NS_SCALE_FACTOR; | 1896 | userpg->time_shift = CYC2NS_SCALE_FACTOR; |
1900 | userpg->time_offset = this_cpu_read(cyc2ns_offset) - now; | 1897 | userpg->time_offset = this_cpu_read(cyc2ns_offset) - now; |
1901 | 1898 | ||
1902 | if (sched_clock_stable && !check_tsc_disabled()) { | 1899 | userpg->cap_user_time_zero = 1; |
1903 | userpg->cap_user_time_zero = 1; | 1900 | userpg->time_zero = this_cpu_read(cyc2ns_offset); |
1904 | userpg->time_zero = this_cpu_read(cyc2ns_offset); | ||
1905 | } | ||
1906 | } | 1901 | } |
1907 | 1902 | ||
1908 | /* | 1903 | /* |
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index cffd07368547..d35078ea1446 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -87,7 +87,6 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus) | |||
87 | 87 | ||
88 | static int x86_of_pci_irq_enable(struct pci_dev *dev) | 88 | static int x86_of_pci_irq_enable(struct pci_dev *dev) |
89 | { | 89 | { |
90 | struct of_irq oirq; | ||
91 | u32 virq; | 90 | u32 virq; |
92 | int ret; | 91 | int ret; |
93 | u8 pin; | 92 | u8 pin; |
@@ -98,12 +97,7 @@ static int x86_of_pci_irq_enable(struct pci_dev *dev) | |||
98 | if (!pin) | 97 | if (!pin) |
99 | return 0; | 98 | return 0; |
100 | 99 | ||
101 | ret = of_irq_map_pci(dev, &oirq); | 100 | virq = of_irq_parse_and_map_pci(dev, 0, 0); |
102 | if (ret) | ||
103 | return ret; | ||
104 | |||
105 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | ||
106 | oirq.size); | ||
107 | if (virq == 0) | 101 | if (virq == 0) |
108 | return -EINVAL; | 102 | return -EINVAL; |
109 | dev->irq = virq; | 103 | dev->irq = virq; |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index e643e744e4d8..7e920bff99a3 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -326,6 +326,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
326 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320"), | 326 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320"), |
327 | }, | 327 | }, |
328 | }, | 328 | }, |
329 | { /* Handle problems with rebooting on the Latitude E5410. */ | ||
330 | .callback = set_pci_reboot, | ||
331 | .ident = "Dell Latitude E5410", | ||
332 | .matches = { | ||
333 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
334 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E5410"), | ||
335 | }, | ||
336 | }, | ||
329 | { /* Handle problems with rebooting on the Latitude E5420. */ | 337 | { /* Handle problems with rebooting on the Latitude E5420. */ |
330 | .callback = set_pci_reboot, | 338 | .callback = set_pci_reboot, |
331 | .ident = "Dell Latitude E5420", | 339 | .ident = "Dell Latitude E5420", |
diff --git a/arch/x86/kernel/sysfb_simplefb.c b/arch/x86/kernel/sysfb_simplefb.c index 22513e96b012..86179d409893 100644 --- a/arch/x86/kernel/sysfb_simplefb.c +++ b/arch/x86/kernel/sysfb_simplefb.c | |||
@@ -72,14 +72,14 @@ __init int create_simplefb(const struct screen_info *si, | |||
72 | * the part that is occupied by the framebuffer */ | 72 | * the part that is occupied by the framebuffer */ |
73 | len = mode->height * mode->stride; | 73 | len = mode->height * mode->stride; |
74 | len = PAGE_ALIGN(len); | 74 | len = PAGE_ALIGN(len); |
75 | if (len > si->lfb_size << 16) { | 75 | if (len > (u64)si->lfb_size << 16) { |
76 | printk(KERN_WARNING "sysfb: VRAM smaller than advertised\n"); | 76 | printk(KERN_WARNING "sysfb: VRAM smaller than advertised\n"); |
77 | return -EINVAL; | 77 | return -EINVAL; |
78 | } | 78 | } |
79 | 79 | ||
80 | /* setup IORESOURCE_MEM as framebuffer memory */ | 80 | /* setup IORESOURCE_MEM as framebuffer memory */ |
81 | memset(&res, 0, sizeof(res)); | 81 | memset(&res, 0, sizeof(res)); |
82 | res.flags = IORESOURCE_MEM; | 82 | res.flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
83 | res.name = simplefb_resname; | 83 | res.name = simplefb_resname; |
84 | res.start = si->lfb_base; | 84 | res.start = si->lfb_base; |
85 | res.end = si->lfb_base + len - 1; | 85 | res.end = si->lfb_base + len - 1; |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a1216de9ffda..2b2fce1b2009 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3255,25 +3255,29 @@ static void vmx_decache_cr4_guest_bits(struct kvm_vcpu *vcpu) | |||
3255 | 3255 | ||
3256 | static void ept_load_pdptrs(struct kvm_vcpu *vcpu) | 3256 | static void ept_load_pdptrs(struct kvm_vcpu *vcpu) |
3257 | { | 3257 | { |
3258 | struct kvm_mmu *mmu = vcpu->arch.walk_mmu; | ||
3259 | |||
3258 | if (!test_bit(VCPU_EXREG_PDPTR, | 3260 | if (!test_bit(VCPU_EXREG_PDPTR, |
3259 | (unsigned long *)&vcpu->arch.regs_dirty)) | 3261 | (unsigned long *)&vcpu->arch.regs_dirty)) |
3260 | return; | 3262 | return; |
3261 | 3263 | ||
3262 | if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { | 3264 | if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { |
3263 | vmcs_write64(GUEST_PDPTR0, vcpu->arch.mmu.pdptrs[0]); | 3265 | vmcs_write64(GUEST_PDPTR0, mmu->pdptrs[0]); |
3264 | vmcs_write64(GUEST_PDPTR1, vcpu->arch.mmu.pdptrs[1]); | 3266 | vmcs_write64(GUEST_PDPTR1, mmu->pdptrs[1]); |
3265 | vmcs_write64(GUEST_PDPTR2, vcpu->arch.mmu.pdptrs[2]); | 3267 | vmcs_write64(GUEST_PDPTR2, mmu->pdptrs[2]); |
3266 | vmcs_write64(GUEST_PDPTR3, vcpu->arch.mmu.pdptrs[3]); | 3268 | vmcs_write64(GUEST_PDPTR3, mmu->pdptrs[3]); |
3267 | } | 3269 | } |
3268 | } | 3270 | } |
3269 | 3271 | ||
3270 | static void ept_save_pdptrs(struct kvm_vcpu *vcpu) | 3272 | static void ept_save_pdptrs(struct kvm_vcpu *vcpu) |
3271 | { | 3273 | { |
3274 | struct kvm_mmu *mmu = vcpu->arch.walk_mmu; | ||
3275 | |||
3272 | if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { | 3276 | if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { |
3273 | vcpu->arch.mmu.pdptrs[0] = vmcs_read64(GUEST_PDPTR0); | 3277 | mmu->pdptrs[0] = vmcs_read64(GUEST_PDPTR0); |
3274 | vcpu->arch.mmu.pdptrs[1] = vmcs_read64(GUEST_PDPTR1); | 3278 | mmu->pdptrs[1] = vmcs_read64(GUEST_PDPTR1); |
3275 | vcpu->arch.mmu.pdptrs[2] = vmcs_read64(GUEST_PDPTR2); | 3279 | mmu->pdptrs[2] = vmcs_read64(GUEST_PDPTR2); |
3276 | vcpu->arch.mmu.pdptrs[3] = vmcs_read64(GUEST_PDPTR3); | 3280 | mmu->pdptrs[3] = vmcs_read64(GUEST_PDPTR3); |
3277 | } | 3281 | } |
3278 | 3282 | ||
3279 | __set_bit(VCPU_EXREG_PDPTR, | 3283 | __set_bit(VCPU_EXREG_PDPTR, |
@@ -5345,7 +5349,9 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu) | |||
5345 | * There are errata that may cause this bit to not be set: | 5349 | * There are errata that may cause this bit to not be set: |
5346 | * AAK134, BY25. | 5350 | * AAK134, BY25. |
5347 | */ | 5351 | */ |
5348 | if (exit_qualification & INTR_INFO_UNBLOCK_NMI) | 5352 | if (!(to_vmx(vcpu)->idt_vectoring_info & VECTORING_INFO_VALID_MASK) && |
5353 | cpu_has_virtual_nmis() && | ||
5354 | (exit_qualification & INTR_INFO_UNBLOCK_NMI)) | ||
5349 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_NMI); | 5355 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_NMI); |
5350 | 5356 | ||
5351 | gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); | 5357 | gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); |
@@ -7775,10 +7781,6 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) | |||
7775 | vmcs_write64(GUEST_PDPTR1, vmcs12->guest_pdptr1); | 7781 | vmcs_write64(GUEST_PDPTR1, vmcs12->guest_pdptr1); |
7776 | vmcs_write64(GUEST_PDPTR2, vmcs12->guest_pdptr2); | 7782 | vmcs_write64(GUEST_PDPTR2, vmcs12->guest_pdptr2); |
7777 | vmcs_write64(GUEST_PDPTR3, vmcs12->guest_pdptr3); | 7783 | vmcs_write64(GUEST_PDPTR3, vmcs12->guest_pdptr3); |
7778 | __clear_bit(VCPU_EXREG_PDPTR, | ||
7779 | (unsigned long *)&vcpu->arch.regs_avail); | ||
7780 | __clear_bit(VCPU_EXREG_PDPTR, | ||
7781 | (unsigned long *)&vcpu->arch.regs_dirty); | ||
7782 | } | 7784 | } |
7783 | 7785 | ||
7784 | kvm_register_write(vcpu, VCPU_REGS_RSP, vmcs12->guest_rsp); | 7786 | kvm_register_write(vcpu, VCPU_REGS_RSP, vmcs12->guest_rsp); |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 5596c7bdd327..082e88129712 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -700,7 +700,7 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, | |||
700 | if (!(pci_probe & PCI_PROBE_MMCONF) || pci_mmcfg_arch_init_failed) | 700 | if (!(pci_probe & PCI_PROBE_MMCONF) || pci_mmcfg_arch_init_failed) |
701 | return -ENODEV; | 701 | return -ENODEV; |
702 | 702 | ||
703 | if (start > end || !addr) | 703 | if (start > end) |
704 | return -EINVAL; | 704 | return -EINVAL; |
705 | 705 | ||
706 | mutex_lock(&pci_mmcfg_lock); | 706 | mutex_lock(&pci_mmcfg_lock); |
@@ -716,6 +716,11 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, | |||
716 | return -EEXIST; | 716 | return -EEXIST; |
717 | } | 717 | } |
718 | 718 | ||
719 | if (!addr) { | ||
720 | mutex_unlock(&pci_mmcfg_lock); | ||
721 | return -EINVAL; | ||
722 | } | ||
723 | |||
719 | rc = -EBUSY; | 724 | rc = -EBUSY; |
720 | cfg = pci_mmconfig_alloc(seg, start, end, addr); | 725 | cfg = pci_mmconfig_alloc(seg, start, end, addr); |
721 | if (cfg == NULL) { | 726 | if (cfg == NULL) { |