diff options
Diffstat (limited to 'arch')
204 files changed, 1828 insertions, 1102 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 1feb169274fe..af2cc6eabcc7 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -286,9 +286,6 @@ config HAVE_PERF_USER_STACK_DUMP | |||
286 | config HAVE_ARCH_JUMP_LABEL | 286 | config HAVE_ARCH_JUMP_LABEL |
287 | bool | 287 | bool |
288 | 288 | ||
289 | config HAVE_ARCH_MUTEX_CPU_RELAX | ||
290 | bool | ||
291 | |||
292 | config HAVE_RCU_TABLE_FREE | 289 | config HAVE_RCU_TABLE_FREE |
293 | bool | 290 | bool |
294 | 291 | ||
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/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/Kconfig b/arch/arm/Kconfig index 3f7714d8d2d2..1ad6fb6c094d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -2217,8 +2217,7 @@ config NEON | |||
2217 | 2217 | ||
2218 | config KERNEL_MODE_NEON | 2218 | config KERNEL_MODE_NEON |
2219 | bool "Support for NEON in kernel mode" | 2219 | bool "Support for NEON in kernel mode" |
2220 | default n | 2220 | depends on NEON && AEABI |
2221 | depends on NEON | ||
2222 | help | 2221 | help |
2223 | Say Y to include support for NEON in kernel mode. | 2222 | Say Y to include support for NEON in kernel mode. |
2224 | 2223 | ||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index cc0f1fb61753..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 |
@@ -183,6 +185,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ | |||
183 | am335x-evm.dtb \ | 185 | am335x-evm.dtb \ |
184 | am335x-evmsk.dtb \ | 186 | am335x-evmsk.dtb \ |
185 | am335x-bone.dtb \ | 187 | am335x-bone.dtb \ |
188 | am335x-boneblack.dtb \ | ||
186 | am3517-evm.dtb \ | 189 | am3517-evm.dtb \ |
187 | am3517_mt_ventoux.dtb \ | 190 | am3517_mt_ventoux.dtb \ |
188 | am43x-epos-evm.dtb | 191 | am43x-epos-evm.dtb |
diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi new file mode 100644 index 000000000000..2f66deda9f5c --- /dev/null +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi | |||
@@ -0,0 +1,262 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | / { | ||
10 | model = "TI AM335x BeagleBone"; | ||
11 | compatible = "ti,am335x-bone", "ti,am33xx"; | ||
12 | |||
13 | cpus { | ||
14 | cpu@0 { | ||
15 | cpu0-supply = <&dcdc2_reg>; | ||
16 | }; | ||
17 | }; | ||
18 | |||
19 | memory { | ||
20 | device_type = "memory"; | ||
21 | reg = <0x80000000 0x10000000>; /* 256 MB */ | ||
22 | }; | ||
23 | |||
24 | am33xx_pinmux: pinmux@44e10800 { | ||
25 | pinctrl-names = "default"; | ||
26 | pinctrl-0 = <&clkout2_pin>; | ||
27 | |||
28 | user_leds_s0: user_leds_s0 { | ||
29 | pinctrl-single,pins = < | ||
30 | 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ | ||
31 | 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ | ||
32 | 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ | ||
33 | 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ | ||
34 | >; | ||
35 | }; | ||
36 | |||
37 | i2c0_pins: pinmux_i2c0_pins { | ||
38 | pinctrl-single,pins = < | ||
39 | 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ | ||
40 | 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ | ||
41 | >; | ||
42 | }; | ||
43 | |||
44 | uart0_pins: pinmux_uart0_pins { | ||
45 | pinctrl-single,pins = < | ||
46 | 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ | ||
47 | 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ | ||
48 | >; | ||
49 | }; | ||
50 | |||
51 | clkout2_pin: pinmux_clkout2_pin { | ||
52 | pinctrl-single,pins = < | ||
53 | 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ | ||
54 | >; | ||
55 | }; | ||
56 | |||
57 | cpsw_default: cpsw_default { | ||
58 | pinctrl-single,pins = < | ||
59 | /* Slave 1 */ | ||
60 | 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ | ||
61 | 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ | ||
62 | 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ | ||
63 | 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ | ||
64 | 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ | ||
65 | 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ | ||
66 | 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ | ||
67 | 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */ | ||
68 | 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ | ||
69 | 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ | ||
70 | 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ | ||
71 | 0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ | ||
72 | 0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */ | ||
73 | >; | ||
74 | }; | ||
75 | |||
76 | cpsw_sleep: cpsw_sleep { | ||
77 | pinctrl-single,pins = < | ||
78 | /* Slave 1 reset value */ | ||
79 | 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
80 | 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
81 | 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
82 | 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
83 | 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
84 | 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
85 | 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
86 | 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
87 | 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
88 | 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
89 | 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
90 | 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
91 | 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
92 | >; | ||
93 | }; | ||
94 | |||
95 | davinci_mdio_default: davinci_mdio_default { | ||
96 | pinctrl-single,pins = < | ||
97 | /* MDIO */ | ||
98 | 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ | ||
99 | 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ | ||
100 | >; | ||
101 | }; | ||
102 | |||
103 | davinci_mdio_sleep: davinci_mdio_sleep { | ||
104 | pinctrl-single,pins = < | ||
105 | /* MDIO reset value */ | ||
106 | 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
107 | 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
108 | >; | ||
109 | }; | ||
110 | }; | ||
111 | |||
112 | ocp { | ||
113 | uart0: serial@44e09000 { | ||
114 | pinctrl-names = "default"; | ||
115 | pinctrl-0 = <&uart0_pins>; | ||
116 | |||
117 | status = "okay"; | ||
118 | }; | ||
119 | |||
120 | musb: usb@47400000 { | ||
121 | status = "okay"; | ||
122 | |||
123 | control@44e10000 { | ||
124 | status = "okay"; | ||
125 | }; | ||
126 | |||
127 | usb-phy@47401300 { | ||
128 | status = "okay"; | ||
129 | }; | ||
130 | |||
131 | usb-phy@47401b00 { | ||
132 | status = "okay"; | ||
133 | }; | ||
134 | |||
135 | usb@47401000 { | ||
136 | status = "okay"; | ||
137 | }; | ||
138 | |||
139 | usb@47401800 { | ||
140 | status = "okay"; | ||
141 | dr_mode = "host"; | ||
142 | }; | ||
143 | |||
144 | dma-controller@07402000 { | ||
145 | status = "okay"; | ||
146 | }; | ||
147 | }; | ||
148 | |||
149 | i2c0: i2c@44e0b000 { | ||
150 | pinctrl-names = "default"; | ||
151 | pinctrl-0 = <&i2c0_pins>; | ||
152 | |||
153 | status = "okay"; | ||
154 | clock-frequency = <400000>; | ||
155 | |||
156 | tps: tps@24 { | ||
157 | reg = <0x24>; | ||
158 | }; | ||
159 | |||
160 | }; | ||
161 | }; | ||
162 | |||
163 | leds { | ||
164 | pinctrl-names = "default"; | ||
165 | pinctrl-0 = <&user_leds_s0>; | ||
166 | |||
167 | compatible = "gpio-leds"; | ||
168 | |||
169 | led@2 { | ||
170 | label = "beaglebone:green:heartbeat"; | ||
171 | gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; | ||
172 | linux,default-trigger = "heartbeat"; | ||
173 | default-state = "off"; | ||
174 | }; | ||
175 | |||
176 | led@3 { | ||
177 | label = "beaglebone:green:mmc0"; | ||
178 | gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; | ||
179 | linux,default-trigger = "mmc0"; | ||
180 | default-state = "off"; | ||
181 | }; | ||
182 | |||
183 | led@4 { | ||
184 | label = "beaglebone:green:usr2"; | ||
185 | gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; | ||
186 | default-state = "off"; | ||
187 | }; | ||
188 | |||
189 | led@5 { | ||
190 | label = "beaglebone:green:usr3"; | ||
191 | gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; | ||
192 | default-state = "off"; | ||
193 | }; | ||
194 | }; | ||
195 | }; | ||
196 | |||
197 | /include/ "tps65217.dtsi" | ||
198 | |||
199 | &tps { | ||
200 | regulators { | ||
201 | dcdc1_reg: regulator@0 { | ||
202 | regulator-always-on; | ||
203 | }; | ||
204 | |||
205 | dcdc2_reg: regulator@1 { | ||
206 | /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ | ||
207 | regulator-name = "vdd_mpu"; | ||
208 | regulator-min-microvolt = <925000>; | ||
209 | regulator-max-microvolt = <1325000>; | ||
210 | regulator-boot-on; | ||
211 | regulator-always-on; | ||
212 | }; | ||
213 | |||
214 | dcdc3_reg: regulator@2 { | ||
215 | /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ | ||
216 | regulator-name = "vdd_core"; | ||
217 | regulator-min-microvolt = <925000>; | ||
218 | regulator-max-microvolt = <1150000>; | ||
219 | regulator-boot-on; | ||
220 | regulator-always-on; | ||
221 | }; | ||
222 | |||
223 | ldo1_reg: regulator@3 { | ||
224 | regulator-always-on; | ||
225 | }; | ||
226 | |||
227 | ldo2_reg: regulator@4 { | ||
228 | regulator-always-on; | ||
229 | }; | ||
230 | |||
231 | ldo3_reg: regulator@5 { | ||
232 | regulator-always-on; | ||
233 | }; | ||
234 | |||
235 | ldo4_reg: regulator@6 { | ||
236 | regulator-always-on; | ||
237 | }; | ||
238 | }; | ||
239 | }; | ||
240 | |||
241 | &cpsw_emac0 { | ||
242 | phy_id = <&davinci_mdio>, <0>; | ||
243 | phy-mode = "mii"; | ||
244 | }; | ||
245 | |||
246 | &cpsw_emac1 { | ||
247 | phy_id = <&davinci_mdio>, <1>; | ||
248 | phy-mode = "mii"; | ||
249 | }; | ||
250 | |||
251 | &mac { | ||
252 | pinctrl-names = "default", "sleep"; | ||
253 | pinctrl-0 = <&cpsw_default>; | ||
254 | pinctrl-1 = <&cpsw_sleep>; | ||
255 | |||
256 | }; | ||
257 | |||
258 | &davinci_mdio { | ||
259 | pinctrl-names = "default", "sleep"; | ||
260 | pinctrl-0 = <&davinci_mdio_default>; | ||
261 | pinctrl-1 = <&davinci_mdio_sleep>; | ||
262 | }; | ||
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts index d318987d44a1..7993c489982c 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts | |||
@@ -8,258 +8,4 @@ | |||
8 | /dts-v1/; | 8 | /dts-v1/; |
9 | 9 | ||
10 | #include "am33xx.dtsi" | 10 | #include "am33xx.dtsi" |
11 | 11 | #include "am335x-bone-common.dtsi" | |
12 | / { | ||
13 | model = "TI AM335x BeagleBone"; | ||
14 | compatible = "ti,am335x-bone", "ti,am33xx"; | ||
15 | |||
16 | cpus { | ||
17 | cpu@0 { | ||
18 | cpu0-supply = <&dcdc2_reg>; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | memory { | ||
23 | device_type = "memory"; | ||
24 | reg = <0x80000000 0x10000000>; /* 256 MB */ | ||
25 | }; | ||
26 | |||
27 | am33xx_pinmux: pinmux@44e10800 { | ||
28 | pinctrl-names = "default"; | ||
29 | pinctrl-0 = <&clkout2_pin>; | ||
30 | |||
31 | user_leds_s0: user_leds_s0 { | ||
32 | pinctrl-single,pins = < | ||
33 | 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a5.gpio1_21 */ | ||
34 | 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ | ||
35 | 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a7.gpio1_23 */ | ||
36 | 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 */ | ||
37 | >; | ||
38 | }; | ||
39 | |||
40 | i2c0_pins: pinmux_i2c0_pins { | ||
41 | pinctrl-single,pins = < | ||
42 | 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */ | ||
43 | 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */ | ||
44 | >; | ||
45 | }; | ||
46 | |||
47 | uart0_pins: pinmux_uart0_pins { | ||
48 | pinctrl-single,pins = < | ||
49 | 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ | ||
50 | 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */ | ||
51 | >; | ||
52 | }; | ||
53 | |||
54 | clkout2_pin: pinmux_clkout2_pin { | ||
55 | pinctrl-single,pins = < | ||
56 | 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ | ||
57 | >; | ||
58 | }; | ||
59 | |||
60 | cpsw_default: cpsw_default { | ||
61 | pinctrl-single,pins = < | ||
62 | /* Slave 1 */ | ||
63 | 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */ | ||
64 | 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ | ||
65 | 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ | ||
66 | 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ | ||
67 | 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ | ||
68 | 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ | ||
69 | 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ | ||
70 | 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */ | ||
71 | 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ | ||
72 | 0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ | ||
73 | 0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ | ||
74 | 0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ | ||
75 | 0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */ | ||
76 | >; | ||
77 | }; | ||
78 | |||
79 | cpsw_sleep: cpsw_sleep { | ||
80 | pinctrl-single,pins = < | ||
81 | /* Slave 1 reset value */ | ||
82 | 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
83 | 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
84 | 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
85 | 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
86 | 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
87 | 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
88 | 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
89 | 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
90 | 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
91 | 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
92 | 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
93 | 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
94 | 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
95 | >; | ||
96 | }; | ||
97 | |||
98 | davinci_mdio_default: davinci_mdio_default { | ||
99 | pinctrl-single,pins = < | ||
100 | /* MDIO */ | ||
101 | 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */ | ||
102 | 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */ | ||
103 | >; | ||
104 | }; | ||
105 | |||
106 | davinci_mdio_sleep: davinci_mdio_sleep { | ||
107 | pinctrl-single,pins = < | ||
108 | /* MDIO reset value */ | ||
109 | 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
110 | 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7) | ||
111 | >; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | ocp { | ||
116 | uart0: serial@44e09000 { | ||
117 | pinctrl-names = "default"; | ||
118 | pinctrl-0 = <&uart0_pins>; | ||
119 | |||
120 | status = "okay"; | ||
121 | }; | ||
122 | |||
123 | musb: usb@47400000 { | ||
124 | status = "okay"; | ||
125 | |||
126 | control@44e10000 { | ||
127 | status = "okay"; | ||
128 | }; | ||
129 | |||
130 | usb-phy@47401300 { | ||
131 | status = "okay"; | ||
132 | }; | ||
133 | |||
134 | usb-phy@47401b00 { | ||
135 | status = "okay"; | ||
136 | }; | ||
137 | |||
138 | usb@47401000 { | ||
139 | status = "okay"; | ||
140 | }; | ||
141 | |||
142 | usb@47401800 { | ||
143 | status = "okay"; | ||
144 | dr_mode = "host"; | ||
145 | }; | ||
146 | |||
147 | dma-controller@07402000 { | ||
148 | status = "okay"; | ||
149 | }; | ||
150 | }; | ||
151 | |||
152 | i2c0: i2c@44e0b000 { | ||
153 | pinctrl-names = "default"; | ||
154 | pinctrl-0 = <&i2c0_pins>; | ||
155 | |||
156 | status = "okay"; | ||
157 | clock-frequency = <400000>; | ||
158 | |||
159 | tps: tps@24 { | ||
160 | reg = <0x24>; | ||
161 | }; | ||
162 | |||
163 | }; | ||
164 | }; | ||
165 | |||
166 | leds { | ||
167 | pinctrl-names = "default"; | ||
168 | pinctrl-0 = <&user_leds_s0>; | ||
169 | |||
170 | compatible = "gpio-leds"; | ||
171 | |||
172 | led@2 { | ||
173 | label = "beaglebone:green:heartbeat"; | ||
174 | gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; | ||
175 | linux,default-trigger = "heartbeat"; | ||
176 | default-state = "off"; | ||
177 | }; | ||
178 | |||
179 | led@3 { | ||
180 | label = "beaglebone:green:mmc0"; | ||
181 | gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; | ||
182 | linux,default-trigger = "mmc0"; | ||
183 | default-state = "off"; | ||
184 | }; | ||
185 | |||
186 | led@4 { | ||
187 | label = "beaglebone:green:usr2"; | ||
188 | gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; | ||
189 | default-state = "off"; | ||
190 | }; | ||
191 | |||
192 | led@5 { | ||
193 | label = "beaglebone:green:usr3"; | ||
194 | gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; | ||
195 | default-state = "off"; | ||
196 | }; | ||
197 | }; | ||
198 | }; | ||
199 | |||
200 | /include/ "tps65217.dtsi" | ||
201 | |||
202 | &tps { | ||
203 | regulators { | ||
204 | dcdc1_reg: regulator@0 { | ||
205 | regulator-always-on; | ||
206 | }; | ||
207 | |||
208 | dcdc2_reg: regulator@1 { | ||
209 | /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ | ||
210 | regulator-name = "vdd_mpu"; | ||
211 | regulator-min-microvolt = <925000>; | ||
212 | regulator-max-microvolt = <1325000>; | ||
213 | regulator-boot-on; | ||
214 | regulator-always-on; | ||
215 | }; | ||
216 | |||
217 | dcdc3_reg: regulator@2 { | ||
218 | /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ | ||
219 | regulator-name = "vdd_core"; | ||
220 | regulator-min-microvolt = <925000>; | ||
221 | regulator-max-microvolt = <1150000>; | ||
222 | regulator-boot-on; | ||
223 | regulator-always-on; | ||
224 | }; | ||
225 | |||
226 | ldo1_reg: regulator@3 { | ||
227 | regulator-always-on; | ||
228 | }; | ||
229 | |||
230 | ldo2_reg: regulator@4 { | ||
231 | regulator-always-on; | ||
232 | }; | ||
233 | |||
234 | ldo3_reg: regulator@5 { | ||
235 | regulator-always-on; | ||
236 | }; | ||
237 | |||
238 | ldo4_reg: regulator@6 { | ||
239 | regulator-always-on; | ||
240 | }; | ||
241 | }; | ||
242 | }; | ||
243 | |||
244 | &cpsw_emac0 { | ||
245 | phy_id = <&davinci_mdio>, <0>; | ||
246 | phy-mode = "mii"; | ||
247 | }; | ||
248 | |||
249 | &cpsw_emac1 { | ||
250 | phy_id = <&davinci_mdio>, <1>; | ||
251 | phy-mode = "mii"; | ||
252 | }; | ||
253 | |||
254 | &mac { | ||
255 | pinctrl-names = "default", "sleep"; | ||
256 | pinctrl-0 = <&cpsw_default>; | ||
257 | pinctrl-1 = <&cpsw_sleep>; | ||
258 | |||
259 | }; | ||
260 | |||
261 | &davinci_mdio { | ||
262 | pinctrl-names = "default", "sleep"; | ||
263 | pinctrl-0 = <&davinci_mdio_default>; | ||
264 | pinctrl-1 = <&davinci_mdio_sleep>; | ||
265 | }; | ||
diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts new file mode 100644 index 000000000000..197cadf72d2c --- /dev/null +++ b/arch/arm/boot/dts/am335x-boneblack.dts | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | /dts-v1/; | ||
9 | |||
10 | #include "am33xx.dtsi" | ||
11 | #include "am335x-bone-common.dtsi" | ||
12 | |||
13 | &ldo3_reg { | ||
14 | regulator-min-microvolt = <1800000>; | ||
15 | regulator-max-microvolt = <1800000>; | ||
16 | regulator-always-on; | ||
17 | }; | ||
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/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi index c037c223619a..b7a1c6d950b9 100644 --- a/arch/arm/boot/dts/imx27.dtsi +++ b/arch/arm/boot/dts/imx27.dtsi | |||
@@ -187,7 +187,7 @@ | |||
187 | compatible = "fsl,imx27-cspi"; | 187 | compatible = "fsl,imx27-cspi"; |
188 | reg = <0x1000e000 0x1000>; | 188 | reg = <0x1000e000 0x1000>; |
189 | interrupts = <16>; | 189 | interrupts = <16>; |
190 | clocks = <&clks 53>, <&clks 53>; | 190 | clocks = <&clks 53>, <&clks 60>; |
191 | clock-names = "ipg", "per"; | 191 | clock-names = "ipg", "per"; |
192 | status = "disabled"; | 192 | status = "disabled"; |
193 | }; | 193 | }; |
@@ -198,7 +198,7 @@ | |||
198 | compatible = "fsl,imx27-cspi"; | 198 | compatible = "fsl,imx27-cspi"; |
199 | reg = <0x1000f000 0x1000>; | 199 | reg = <0x1000f000 0x1000>; |
200 | interrupts = <15>; | 200 | interrupts = <15>; |
201 | clocks = <&clks 52>, <&clks 52>; | 201 | clocks = <&clks 52>, <&clks 60>; |
202 | clock-names = "ipg", "per"; | 202 | clock-names = "ipg", "per"; |
203 | status = "disabled"; | 203 | status = "disabled"; |
204 | }; | 204 | }; |
@@ -309,7 +309,7 @@ | |||
309 | compatible = "fsl,imx27-cspi"; | 309 | compatible = "fsl,imx27-cspi"; |
310 | reg = <0x10017000 0x1000>; | 310 | reg = <0x10017000 0x1000>; |
311 | interrupts = <6>; | 311 | interrupts = <6>; |
312 | clocks = <&clks 51>, <&clks 51>; | 312 | clocks = <&clks 51>, <&clks 60>; |
313 | clock-names = "ipg", "per"; | 313 | clock-names = "ipg", "per"; |
314 | status = "disabled"; | 314 | status = "disabled"; |
315 | }; | 315 | }; |
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi index a85abb424c34..54cee6517902 100644 --- a/arch/arm/boot/dts/imx51.dtsi +++ b/arch/arm/boot/dts/imx51.dtsi | |||
@@ -474,7 +474,7 @@ | |||
474 | compatible = "fsl,imx51-pata", "fsl,imx27-pata"; | 474 | compatible = "fsl,imx51-pata", "fsl,imx27-pata"; |
475 | reg = <0x83fe0000 0x4000>; | 475 | reg = <0x83fe0000 0x4000>; |
476 | interrupts = <70>; | 476 | interrupts = <70>; |
477 | clocks = <&clks 161>; | 477 | clocks = <&clks 172>; |
478 | status = "disabled"; | 478 | status = "disabled"; |
479 | }; | 479 | }; |
480 | 480 | ||
diff --git a/arch/arm/boot/dts/imx6q-pinfunc.h b/arch/arm/boot/dts/imx6q-pinfunc.h index c0e38a45e4bb..9bbe82bdee41 100644 --- a/arch/arm/boot/dts/imx6q-pinfunc.h +++ b/arch/arm/boot/dts/imx6q-pinfunc.h | |||
@@ -207,8 +207,8 @@ | |||
207 | #define MX6QDL_PAD_EIM_D29__ECSPI4_SS0 0x0c8 0x3dc 0x824 0x2 0x1 | 207 | #define MX6QDL_PAD_EIM_D29__ECSPI4_SS0 0x0c8 0x3dc 0x824 0x2 0x1 |
208 | #define MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x0c8 0x3dc 0x924 0x4 0x1 | 208 | #define MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x0c8 0x3dc 0x924 0x4 0x1 |
209 | #define MX6QDL_PAD_EIM_D29__UART2_CTS_B 0x0c8 0x3dc 0x000 0x4 0x0 | 209 | #define MX6QDL_PAD_EIM_D29__UART2_CTS_B 0x0c8 0x3dc 0x000 0x4 0x0 |
210 | #define MX6QDL_PAD_EIM_D29__UART2_DTE_RTS_B 0x0c4 0x3dc 0x000 0x4 0x0 | 210 | #define MX6QDL_PAD_EIM_D29__UART2_DTE_RTS_B 0x0c8 0x3dc 0x000 0x4 0x0 |
211 | #define MX6QDL_PAD_EIM_D29__UART2_DTE_CTS_B 0x0c4 0x3dc 0x924 0x4 0x1 | 211 | #define MX6QDL_PAD_EIM_D29__UART2_DTE_CTS_B 0x0c8 0x3dc 0x924 0x4 0x1 |
212 | #define MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x0c8 0x3dc 0x000 0x5 0x0 | 212 | #define MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x0c8 0x3dc 0x000 0x5 0x0 |
213 | #define MX6QDL_PAD_EIM_D29__IPU2_CSI1_VSYNC 0x0c8 0x3dc 0x8e4 0x6 0x0 | 213 | #define MX6QDL_PAD_EIM_D29__IPU2_CSI1_VSYNC 0x0c8 0x3dc 0x8e4 0x6 0x0 |
214 | #define MX6QDL_PAD_EIM_D29__IPU1_DI0_PIN14 0x0c8 0x3dc 0x000 0x7 0x0 | 214 | #define MX6QDL_PAD_EIM_D29__IPU1_DI0_PIN14 0x0c8 0x3dc 0x000 0x7 0x0 |
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 afdb16417d4e..0c514dc8460c 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,omap3-beagle", "ti,omap3"; |
15 | 15 | ||
16 | cpus { | 16 | cpus { |
17 | cpu@0 { | 17 | cpu@0 { |
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi index bc48b114eae6..2326d11462a5 100644 --- a/arch/arm/boot/dts/omap3-igep.dtsi +++ b/arch/arm/boot/dts/omap3-igep.dtsi | |||
@@ -48,6 +48,15 @@ | |||
48 | >; | 48 | >; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | mcbsp2_pins: pinmux_mcbsp2_pins { | ||
52 | pinctrl-single,pins = < | ||
53 | 0x10c (PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */ | ||
54 | 0x10e (PIN_INPUT | MUX_MODE0) /* mcbsp2_clkx.mcbsp2_clkx */ | ||
55 | 0x110 (PIN_INPUT | MUX_MODE0) /* mcbsp2_dr.mcbsp2.dr */ | ||
56 | 0x112 (PIN_OUTPUT | MUX_MODE0) /* mcbsp2_dx.mcbsp2_dx */ | ||
57 | >; | ||
58 | }; | ||
59 | |||
51 | mmc1_pins: pinmux_mmc1_pins { | 60 | mmc1_pins: pinmux_mmc1_pins { |
52 | pinctrl-single,pins = < | 61 | pinctrl-single,pins = < |
53 | 0x114 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */ | 62 | 0x114 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */ |
@@ -93,6 +102,11 @@ | |||
93 | clock-frequency = <400000>; | 102 | clock-frequency = <400000>; |
94 | }; | 103 | }; |
95 | 104 | ||
105 | &mcbsp2 { | ||
106 | pinctrl-names = "default"; | ||
107 | pinctrl-0 = <&mcbsp2_pins>; | ||
108 | }; | ||
109 | |||
96 | &mmc1 { | 110 | &mmc1 { |
97 | pinctrl-names = "default"; | 111 | pinctrl-names = "default"; |
98 | pinctrl-0 = <&mmc1_pins>; | 112 | pinctrl-0 = <&mmc1_pins>; |
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index faa95b5b242e..814ab67c8c29 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi | |||
@@ -107,6 +107,19 @@ | |||
107 | */ | 107 | */ |
108 | clock-frequency = <19200000>; | 108 | clock-frequency = <19200000>; |
109 | }; | 109 | }; |
110 | |||
111 | /* regulator for wl12xx on sdio5 */ | ||
112 | wl12xx_vmmc: wl12xx_vmmc { | ||
113 | pinctrl-names = "default"; | ||
114 | pinctrl-0 = <&wl12xx_gpio>; | ||
115 | compatible = "regulator-fixed"; | ||
116 | regulator-name = "vwl1271"; | ||
117 | regulator-min-microvolt = <1800000>; | ||
118 | regulator-max-microvolt = <1800000>; | ||
119 | gpio = <&gpio2 11 0>; | ||
120 | startup-delay-us = <70000>; | ||
121 | enable-active-high; | ||
122 | }; | ||
110 | }; | 123 | }; |
111 | 124 | ||
112 | &omap4_pmx_wkup { | 125 | &omap4_pmx_wkup { |
@@ -235,6 +248,33 @@ | |||
235 | 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */ | 248 | 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */ |
236 | >; | 249 | >; |
237 | }; | 250 | }; |
251 | |||
252 | /* | ||
253 | * wl12xx GPIO outputs for WLAN_EN, BT_EN, FM_EN, BT_WAKEUP | ||
254 | * REVISIT: Are the pull-ups needed for GPIO 48 and 49? | ||
255 | */ | ||
256 | wl12xx_gpio: pinmux_wl12xx_gpio { | ||
257 | pinctrl-single,pins = < | ||
258 | 0x26 (PIN_OUTPUT | MUX_MODE3) /* gpmc_a19.gpio_43 */ | ||
259 | 0x2c (PIN_OUTPUT | MUX_MODE3) /* gpmc_a22.gpio_46 */ | ||
260 | 0x30 (PIN_OUTPUT_PULLUP | MUX_MODE3) /* gpmc_a24.gpio_48 */ | ||
261 | 0x32 (PIN_OUTPUT_PULLUP | MUX_MODE3) /* gpmc_a25.gpio_49 */ | ||
262 | >; | ||
263 | }; | ||
264 | |||
265 | /* wl12xx GPIO inputs and SDIO pins */ | ||
266 | wl12xx_pins: pinmux_wl12xx_pins { | ||
267 | pinctrl-single,pins = < | ||
268 | 0x38 (PIN_INPUT | MUX_MODE3) /* gpmc_ncs2.gpio_52 */ | ||
269 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ | ||
270 | 0x108 (PIN_OUTPUT | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */ | ||
271 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */ | ||
272 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */ | ||
273 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */ | ||
274 | 0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2.sdmmc5_dat2 */ | ||
275 | 0x112 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */ | ||
276 | >; | ||
277 | }; | ||
238 | }; | 278 | }; |
239 | 279 | ||
240 | &i2c1 { | 280 | &i2c1 { |
@@ -314,8 +354,12 @@ | |||
314 | }; | 354 | }; |
315 | 355 | ||
316 | &mmc5 { | 356 | &mmc5 { |
317 | ti,non-removable; | 357 | pinctrl-names = "default"; |
358 | pinctrl-0 = <&wl12xx_pins>; | ||
359 | vmmc-supply = <&wl12xx_vmmc>; | ||
360 | non-removable; | ||
318 | bus-width = <4>; | 361 | bus-width = <4>; |
362 | cap-power-off-card; | ||
319 | }; | 363 | }; |
320 | 364 | ||
321 | &emif1 { | 365 | &emif1 { |
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts index 7951b4ea500a..4f78380ecdb8 100644 --- a/arch/arm/boot/dts/omap4-sdp.dts +++ b/arch/arm/boot/dts/omap4-sdp.dts | |||
@@ -140,6 +140,19 @@ | |||
140 | "DMic", "Digital Mic", | 140 | "DMic", "Digital Mic", |
141 | "Digital Mic", "Digital Mic1 Bias"; | 141 | "Digital Mic", "Digital Mic1 Bias"; |
142 | }; | 142 | }; |
143 | |||
144 | /* regulator for wl12xx on sdio5 */ | ||
145 | wl12xx_vmmc: wl12xx_vmmc { | ||
146 | pinctrl-names = "default"; | ||
147 | pinctrl-0 = <&wl12xx_gpio>; | ||
148 | compatible = "regulator-fixed"; | ||
149 | regulator-name = "vwl1271"; | ||
150 | regulator-min-microvolt = <1800000>; | ||
151 | regulator-max-microvolt = <1800000>; | ||
152 | gpio = <&gpio2 22 0>; | ||
153 | startup-delay-us = <70000>; | ||
154 | enable-active-high; | ||
155 | }; | ||
143 | }; | 156 | }; |
144 | 157 | ||
145 | &omap4_pmx_wkup { | 158 | &omap4_pmx_wkup { |
@@ -295,6 +308,26 @@ | |||
295 | 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ | 308 | 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */ |
296 | >; | 309 | >; |
297 | }; | 310 | }; |
311 | |||
312 | /* wl12xx GPIO output for WLAN_EN */ | ||
313 | wl12xx_gpio: pinmux_wl12xx_gpio { | ||
314 | pinctrl-single,pins = < | ||
315 | 0x3c (PIN_OUTPUT | MUX_MODE3) /* gpmc_nwp.gpio_54 */ | ||
316 | >; | ||
317 | }; | ||
318 | |||
319 | /* wl12xx GPIO inputs and SDIO pins */ | ||
320 | wl12xx_pins: pinmux_wl12xx_pins { | ||
321 | pinctrl-single,pins = < | ||
322 | 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */ | ||
323 | 0x108 (PIN_OUTPUT | MUX_MODE3) /* sdmmc5_clk.sdmmc5_clk */ | ||
324 | 0x10a (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_cmd.sdmmc5_cmd */ | ||
325 | 0x10c (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat0.sdmmc5_dat0 */ | ||
326 | 0x10e (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat1.sdmmc5_dat1 */ | ||
327 | 0x110 (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat2.sdmmc5_dat2 */ | ||
328 | 0x112 (PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc5_dat3.sdmmc5_dat3 */ | ||
329 | >; | ||
330 | }; | ||
298 | }; | 331 | }; |
299 | 332 | ||
300 | &i2c1 { | 333 | &i2c1 { |
@@ -420,8 +453,12 @@ | |||
420 | }; | 453 | }; |
421 | 454 | ||
422 | &mmc5 { | 455 | &mmc5 { |
456 | pinctrl-names = "default"; | ||
457 | pinctrl-0 = <&wl12xx_pins>; | ||
458 | vmmc-supply = <&wl12xx_vmmc>; | ||
459 | non-removable; | ||
423 | bus-width = <4>; | 460 | bus-width = <4>; |
424 | ti,non-removable; | 461 | cap-power-off-card; |
425 | }; | 462 | }; |
426 | 463 | ||
427 | &emif1 { | 464 | &emif1 { |
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index 07be2cd7b318..7cdea1bfea09 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi | |||
@@ -637,7 +637,7 @@ | |||
637 | omap_dwc3@4a020000 { | 637 | omap_dwc3@4a020000 { |
638 | compatible = "ti,dwc3"; | 638 | compatible = "ti,dwc3"; |
639 | ti,hwmods = "usb_otg_ss"; | 639 | ti,hwmods = "usb_otg_ss"; |
640 | reg = <0x4a020000 0x1000>; | 640 | reg = <0x4a020000 0x10000>; |
641 | interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; | 641 | interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; |
642 | #address-cells = <1>; | 642 | #address-cells = <1>; |
643 | #size-cells = <1>; | 643 | #size-cells = <1>; |
@@ -645,17 +645,18 @@ | |||
645 | ranges; | 645 | ranges; |
646 | dwc3@4a030000 { | 646 | dwc3@4a030000 { |
647 | compatible = "snps,dwc3"; | 647 | compatible = "snps,dwc3"; |
648 | reg = <0x4a030000 0x1000>; | 648 | reg = <0x4a030000 0x10000>; |
649 | interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>; | 649 | interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>; |
650 | usb-phy = <&usb2_phy>, <&usb3_phy>; | 650 | usb-phy = <&usb2_phy>, <&usb3_phy>; |
651 | tx-fifo-resize; | 651 | tx-fifo-resize; |
652 | }; | 652 | }; |
653 | }; | 653 | }; |
654 | 654 | ||
655 | ocp2scp { | 655 | ocp2scp@4a080000 { |
656 | compatible = "ti,omap-ocp2scp"; | 656 | compatible = "ti,omap-ocp2scp"; |
657 | #address-cells = <1>; | 657 | #address-cells = <1>; |
658 | #size-cells = <1>; | 658 | #size-cells = <1>; |
659 | reg = <0x4a080000 0x20>; | ||
659 | ranges; | 660 | ranges; |
660 | ti,hwmods = "ocp2scp1"; | 661 | ti,hwmods = "ocp2scp1"; |
661 | usb2_phy: usb2phy@4a084000 { | 662 | usb2_phy: usb2phy@4a084000 { |
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/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 6e572c64cf5a..119fc378fc52 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -36,6 +36,7 @@ CONFIG_ARCH_TEGRA_114_SOC=y | |||
36 | CONFIG_TEGRA_PCI=y | 36 | CONFIG_TEGRA_PCI=y |
37 | CONFIG_TEGRA_EMC_SCALING_ENABLE=y | 37 | CONFIG_TEGRA_EMC_SCALING_ENABLE=y |
38 | CONFIG_ARCH_U8500=y | 38 | CONFIG_ARCH_U8500=y |
39 | CONFIG_MACH_HREFV60=y | ||
39 | CONFIG_MACH_SNOWBALL=y | 40 | CONFIG_MACH_SNOWBALL=y |
40 | CONFIG_MACH_UX500_DT=y | 41 | CONFIG_MACH_UX500_DT=y |
41 | CONFIG_ARCH_VEXPRESS=y | 42 | CONFIG_ARCH_VEXPRESS=y |
@@ -46,6 +47,7 @@ CONFIG_ARCH_ZYNQ=y | |||
46 | CONFIG_SMP=y | 47 | CONFIG_SMP=y |
47 | CONFIG_HIGHPTE=y | 48 | CONFIG_HIGHPTE=y |
48 | CONFIG_ARM_APPENDED_DTB=y | 49 | CONFIG_ARM_APPENDED_DTB=y |
50 | CONFIG_ARM_ATAG_DTB_COMPAT=y | ||
49 | CONFIG_NET=y | 51 | CONFIG_NET=y |
50 | CONFIG_UNIX=y | 52 | CONFIG_UNIX=y |
51 | CONFIG_INET=y | 53 | CONFIG_INET=y |
@@ -133,6 +135,7 @@ CONFIG_MMC=y | |||
133 | CONFIG_MMC_ARMMMCI=y | 135 | CONFIG_MMC_ARMMMCI=y |
134 | CONFIG_MMC_SDHCI=y | 136 | CONFIG_MMC_SDHCI=y |
135 | CONFIG_MMC_SDHCI_PLTFM=y | 137 | CONFIG_MMC_SDHCI_PLTFM=y |
138 | CONFIG_MMC_SDHCI_ESDHC_IMX=y | ||
136 | CONFIG_MMC_SDHCI_TEGRA=y | 139 | CONFIG_MMC_SDHCI_TEGRA=y |
137 | CONFIG_MMC_SDHCI_SPEAR=y | 140 | CONFIG_MMC_SDHCI_SPEAR=y |
138 | CONFIG_MMC_OMAP=y | 141 | CONFIG_MMC_OMAP=y |
diff --git a/arch/arm/crypto/aes-armv4.S b/arch/arm/crypto/aes-armv4.S index 19d6cd6f29f9..3a14ea8fe97e 100644 --- a/arch/arm/crypto/aes-armv4.S +++ b/arch/arm/crypto/aes-armv4.S | |||
@@ -148,7 +148,7 @@ AES_Te: | |||
148 | @ const AES_KEY *key) { | 148 | @ const AES_KEY *key) { |
149 | .align 5 | 149 | .align 5 |
150 | ENTRY(AES_encrypt) | 150 | ENTRY(AES_encrypt) |
151 | sub r3,pc,#8 @ AES_encrypt | 151 | adr r3,AES_encrypt |
152 | stmdb sp!,{r1,r4-r12,lr} | 152 | stmdb sp!,{r1,r4-r12,lr} |
153 | mov r12,r0 @ inp | 153 | mov r12,r0 @ inp |
154 | mov r11,r2 | 154 | mov r11,r2 |
@@ -381,7 +381,7 @@ _armv4_AES_encrypt: | |||
381 | .align 5 | 381 | .align 5 |
382 | ENTRY(private_AES_set_encrypt_key) | 382 | ENTRY(private_AES_set_encrypt_key) |
383 | _armv4_AES_set_encrypt_key: | 383 | _armv4_AES_set_encrypt_key: |
384 | sub r3,pc,#8 @ AES_set_encrypt_key | 384 | adr r3,_armv4_AES_set_encrypt_key |
385 | teq r0,#0 | 385 | teq r0,#0 |
386 | moveq r0,#-1 | 386 | moveq r0,#-1 |
387 | beq .Labrt | 387 | beq .Labrt |
@@ -843,7 +843,7 @@ AES_Td: | |||
843 | @ const AES_KEY *key) { | 843 | @ const AES_KEY *key) { |
844 | .align 5 | 844 | .align 5 |
845 | ENTRY(AES_decrypt) | 845 | ENTRY(AES_decrypt) |
846 | sub r3,pc,#8 @ AES_decrypt | 846 | adr r3,AES_decrypt |
847 | stmdb sp!,{r1,r4-r12,lr} | 847 | stmdb sp!,{r1,r4-r12,lr} |
848 | mov r12,r0 @ inp | 848 | mov r12,r0 @ inp |
849 | mov r11,r2 | 849 | mov r11,r2 |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 7e1f76027f66..72abdc541f38 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -19,6 +19,13 @@ | |||
19 | #include <asm/unified.h> | 19 | #include <asm/unified.h> |
20 | #include <asm/compiler.h> | 20 | #include <asm/compiler.h> |
21 | 21 | ||
22 | #if __LINUX_ARM_ARCH__ < 6 | ||
23 | #include <asm-generic/uaccess-unaligned.h> | ||
24 | #else | ||
25 | #define __get_user_unaligned __get_user | ||
26 | #define __put_user_unaligned __put_user | ||
27 | #endif | ||
28 | |||
22 | #define VERIFY_READ 0 | 29 | #define VERIFY_READ 0 |
23 | #define VERIFY_WRITE 1 | 30 | #define VERIFY_WRITE 1 |
24 | 31 | ||
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 74ad15d1a065..bc6bd9683ba4 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -442,10 +442,10 @@ local_restart: | |||
442 | ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine | 442 | ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine |
443 | 443 | ||
444 | add r1, sp, #S_OFF | 444 | add r1, sp, #S_OFF |
445 | cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE) | 445 | 2: cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE) |
446 | eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back | 446 | eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back |
447 | bcs arm_syscall | 447 | bcs arm_syscall |
448 | 2: mov why, #0 @ no longer a real syscall | 448 | mov why, #0 @ no longer a real syscall |
449 | b sys_ni_syscall @ not private func | 449 | b sys_ni_syscall @ not private func |
450 | 450 | ||
451 | #if defined(CONFIG_OABI_COMPAT) || !defined(CONFIG_AEABI) | 451 | #if defined(CONFIG_OABI_COMPAT) || !defined(CONFIG_AEABI) |
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index de23a9beed13..39f89fbd5111 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S | |||
@@ -329,10 +329,10 @@ | |||
329 | #ifdef CONFIG_CONTEXT_TRACKING | 329 | #ifdef CONFIG_CONTEXT_TRACKING |
330 | .if \save | 330 | .if \save |
331 | stmdb sp!, {r0-r3, ip, lr} | 331 | stmdb sp!, {r0-r3, ip, lr} |
332 | bl user_exit | 332 | bl context_tracking_user_exit |
333 | ldmia sp!, {r0-r3, ip, lr} | 333 | ldmia sp!, {r0-r3, ip, lr} |
334 | .else | 334 | .else |
335 | bl user_exit | 335 | bl context_tracking_user_exit |
336 | .endif | 336 | .endif |
337 | #endif | 337 | #endif |
338 | .endm | 338 | .endm |
@@ -341,10 +341,10 @@ | |||
341 | #ifdef CONFIG_CONTEXT_TRACKING | 341 | #ifdef CONFIG_CONTEXT_TRACKING |
342 | .if \save | 342 | .if \save |
343 | stmdb sp!, {r0-r3, ip, lr} | 343 | stmdb sp!, {r0-r3, ip, lr} |
344 | bl user_enter | 344 | bl context_tracking_user_enter |
345 | ldmia sp!, {r0-r3, ip, lr} | 345 | ldmia sp!, {r0-r3, ip, lr} |
346 | .else | 346 | .else |
347 | bl user_enter | 347 | bl context_tracking_user_enter |
348 | .endif | 348 | .endif |
349 | #endif | 349 | #endif |
350 | .endm | 350 | .endm |
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-imx/clk-fixup-mux.c b/arch/arm/mach-imx/clk-fixup-mux.c index deb4b8093b30..0d40b35c557c 100644 --- a/arch/arm/mach-imx/clk-fixup-mux.c +++ b/arch/arm/mach-imx/clk-fixup-mux.c | |||
@@ -90,6 +90,7 @@ struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg, | |||
90 | init.ops = &clk_fixup_mux_ops; | 90 | init.ops = &clk_fixup_mux_ops; |
91 | init.parent_names = parents; | 91 | init.parent_names = parents; |
92 | init.num_parents = num_parents; | 92 | init.num_parents = num_parents; |
93 | init.flags = 0; | ||
93 | 94 | ||
94 | fixup_mux->mux.reg = reg; | 95 | fixup_mux->mux.reg = reg; |
95 | fixup_mux->mux.shift = shift; | 96 | fixup_mux->mux.shift = shift; |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index c3cfa4116dc0..c6b40f386786 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -285,7 +285,7 @@ int __init mx27_clocks_init(unsigned long fref) | |||
285 | clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL); | 285 | clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL); |
286 | clk_register_clkdev(clk[rtc_ipg_gate], NULL, "imx21-rtc"); | 286 | clk_register_clkdev(clk[rtc_ipg_gate], NULL, "imx21-rtc"); |
287 | clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL); | 287 | clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL); |
288 | clk_register_clkdev(clk[cpu_div], NULL, "cpufreq-cpu0.0"); | 288 | clk_register_clkdev(clk[cpu_div], NULL, "cpu0"); |
289 | clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL); | 289 | clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL); |
290 | 290 | ||
291 | mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1); | 291 | mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1); |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index 1a56a3319997..7c0dc4540aa4 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -328,7 +328,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
328 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); | 328 | clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); |
329 | clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2"); | 329 | clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2"); |
330 | clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); | 330 | clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); |
331 | clk_register_clkdev(clk[cpu_podf], NULL, "cpufreq-cpu0.0"); | 331 | clk_register_clkdev(clk[cpu_podf], NULL, "cpu0"); |
332 | clk_register_clkdev(clk[iim_gate], "iim", NULL); | 332 | clk_register_clkdev(clk[iim_gate], "iim", NULL); |
333 | clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.0"); | 333 | clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.0"); |
334 | clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.1"); | 334 | clk_register_clkdev(clk[dummy], NULL, "imx2-wdt.1"); |
@@ -397,7 +397,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
397 | mx51_spdif_xtal_sel, ARRAY_SIZE(mx51_spdif_xtal_sel)); | 397 | mx51_spdif_xtal_sel, ARRAY_SIZE(mx51_spdif_xtal_sel)); |
398 | clk[spdif1_sel] = imx_clk_mux("spdif1_sel", MXC_CCM_CSCMR2, 2, 2, | 398 | clk[spdif1_sel] = imx_clk_mux("spdif1_sel", MXC_CCM_CSCMR2, 2, 2, |
399 | spdif_sel, ARRAY_SIZE(spdif_sel)); | 399 | spdif_sel, ARRAY_SIZE(spdif_sel)); |
400 | clk[spdif1_pred] = imx_clk_divider("spdif1_podf", "spdif1_sel", MXC_CCM_CDCDR, 16, 3); | 400 | clk[spdif1_pred] = imx_clk_divider("spdif1_pred", "spdif1_sel", MXC_CCM_CDCDR, 16, 3); |
401 | clk[spdif1_podf] = imx_clk_divider("spdif1_podf", "spdif1_pred", MXC_CCM_CDCDR, 9, 6); | 401 | clk[spdif1_podf] = imx_clk_divider("spdif1_podf", "spdif1_pred", MXC_CCM_CDCDR, 9, 6); |
402 | clk[spdif1_com_sel] = imx_clk_mux("spdif1_com_sel", MXC_CCM_CSCMR2, 5, 1, | 402 | clk[spdif1_com_sel] = imx_clk_mux("spdif1_com_sel", MXC_CCM_CSCMR2, 5, 1, |
403 | mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel)); | 403 | mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel)); |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 85a1b51346c8..90372a21087f 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -233,10 +233,15 @@ put_node: | |||
233 | of_node_put(np); | 233 | of_node_put(np); |
234 | } | 234 | } |
235 | 235 | ||
236 | static void __init imx6q_opp_init(struct device *cpu_dev) | 236 | static void __init imx6q_opp_init(void) |
237 | { | 237 | { |
238 | struct device_node *np; | 238 | struct device_node *np; |
239 | struct device *cpu_dev = get_cpu_device(0); | ||
239 | 240 | ||
241 | if (!cpu_dev) { | ||
242 | pr_warn("failed to get cpu0 device\n"); | ||
243 | return; | ||
244 | } | ||
240 | np = of_node_get(cpu_dev->of_node); | 245 | np = of_node_get(cpu_dev->of_node); |
241 | if (!np) { | 246 | if (!np) { |
242 | pr_warn("failed to find cpu0 node\n"); | 247 | pr_warn("failed to find cpu0 node\n"); |
@@ -268,7 +273,7 @@ static void __init imx6q_init_late(void) | |||
268 | imx6q_cpuidle_init(); | 273 | imx6q_cpuidle_init(); |
269 | 274 | ||
270 | if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) { | 275 | if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) { |
271 | imx6q_opp_init(&imx6q_cpufreq_pdev.dev); | 276 | imx6q_opp_init(); |
272 | platform_device_register(&imx6q_cpufreq_pdev); | 277 | platform_device_register(&imx6q_cpufreq_pdev); |
273 | } | 278 | } |
274 | } | 279 | } |
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index 64ff37ea72b1..80c177c36c5f 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c | |||
@@ -117,6 +117,17 @@ void __init imx_init_l2cache(void) | |||
117 | /* Configure the L2 PREFETCH and POWER registers */ | 117 | /* Configure the L2 PREFETCH and POWER registers */ |
118 | val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL); | 118 | val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL); |
119 | val |= 0x70800000; | 119 | val |= 0x70800000; |
120 | /* | ||
121 | * The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0 | ||
122 | * The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2 | ||
123 | * But according to ARM PL310 errata: 752271 | ||
124 | * ID: 752271: Double linefill feature can cause data corruption | ||
125 | * Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in r3p2 | ||
126 | * Workaround: The only workaround to this erratum is to disable the | ||
127 | * double linefill feature. This is the default behavior. | ||
128 | */ | ||
129 | if (cpu_is_imx6q()) | ||
130 | val &= ~(1 << 30 | 1 << 23); | ||
120 | writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL); | 131 | writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL); |
121 | val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN; | 132 | val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN; |
122 | writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL); | 133 | writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL); |
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/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c index 1d5b5290d2af..b237950eb8a3 100644 --- a/arch/arm/mach-omap2/cclock44xx_data.c +++ b/arch/arm/mach-omap2/cclock44xx_data.c | |||
@@ -1632,7 +1632,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
1632 | CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck), | 1632 | CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck), |
1633 | CLK(NULL, "auxclk5_ck", &auxclk5_ck), | 1633 | CLK(NULL, "auxclk5_ck", &auxclk5_ck), |
1634 | CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck), | 1634 | CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck), |
1635 | CLK("omap-gpmc", "fck", &dummy_ck), | 1635 | CLK("50000000.gpmc", "fck", &dummy_ck), |
1636 | CLK("omap_i2c.1", "ick", &dummy_ck), | 1636 | CLK("omap_i2c.1", "ick", &dummy_ck), |
1637 | CLK("omap_i2c.2", "ick", &dummy_ck), | 1637 | CLK("omap_i2c.2", "ick", &dummy_ck), |
1638 | CLK("omap_i2c.3", "ick", &dummy_ck), | 1638 | CLK("omap_i2c.3", "ick", &dummy_ck), |
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index c443f2e97e10..4c8982ae9529 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
@@ -143,7 +143,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev, | |||
143 | * Call idle CPU cluster PM exit notifier chain | 143 | * Call idle CPU cluster PM exit notifier chain |
144 | * to restore GIC and wakeupgen context. | 144 | * to restore GIC and wakeupgen context. |
145 | */ | 145 | */ |
146 | if ((cx->mpu_state == PWRDM_POWER_RET) && | 146 | if (dev->cpu == 0 && (cx->mpu_state == PWRDM_POWER_RET) && |
147 | (cx->mpu_logic_state == PWRDM_POWER_OFF)) | 147 | (cx->mpu_logic_state == PWRDM_POWER_OFF)) |
148 | cpu_cluster_pm_exit(); | 148 | cpu_cluster_pm_exit(); |
149 | 149 | ||
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 9f4795aff48a..579697adaae7 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -1491,8 +1491,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, | |||
1491 | */ | 1491 | */ |
1492 | ret = gpmc_cs_remap(cs, res.start); | 1492 | ret = gpmc_cs_remap(cs, res.start); |
1493 | if (ret < 0) { | 1493 | if (ret < 0) { |
1494 | dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%x\n", | 1494 | dev_err(&pdev->dev, "cannot remap GPMC CS %d to %pa\n", |
1495 | cs, res.start); | 1495 | cs, &res.start); |
1496 | goto err; | 1496 | goto err; |
1497 | } | 1497 | } |
1498 | 1498 | ||
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index c53609f46294..be271f1d585b 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c | |||
@@ -620,7 +620,7 @@ static struct omap_mux __initdata omap3_muxmodes[] = { | |||
620 | "uart1_rts", "ssi1_flag_tx", NULL, NULL, | 620 | "uart1_rts", "ssi1_flag_tx", NULL, NULL, |
621 | "gpio_149", NULL, NULL, "safe_mode"), | 621 | "gpio_149", NULL, NULL, "safe_mode"), |
622 | _OMAP3_MUXENTRY(UART1_RX, 151, | 622 | _OMAP3_MUXENTRY(UART1_RX, 151, |
623 | "uart1_rx", "ss1_wake_tx", "mcbsp1_clkr", "mcspi4_clk", | 623 | "uart1_rx", "ssi1_wake_tx", "mcbsp1_clkr", "mcspi4_clk", |
624 | "gpio_151", NULL, NULL, "safe_mode"), | 624 | "gpio_151", NULL, NULL, "safe_mode"), |
625 | _OMAP3_MUXENTRY(UART1_TX, 148, | 625 | _OMAP3_MUXENTRY(UART1_TX, 148, |
626 | "uart1_tx", "ssi1_dat_tx", NULL, NULL, | 626 | "uart1_tx", "ssi1_dat_tx", NULL, NULL, |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 8708b2a9da45..891211093295 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP4 SMP source file. It contains platform specific fucntions | 2 | * OMAP4 SMP source file. It contains platform specific functions |
3 | * needed for the linux smp kernel. | 3 | * needed for the linux smp kernel. |
4 | * | 4 | * |
5 | * Copyright (C) 2009 Texas Instruments, Inc. | 5 | * Copyright (C) 2009 Texas Instruments, Inc. |
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index f99f68e1e85b..b69dd9abb50a 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -158,7 +158,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
158 | } | 158 | } |
159 | 159 | ||
160 | od = omap_device_alloc(pdev, hwmods, oh_cnt); | 160 | od = omap_device_alloc(pdev, hwmods, oh_cnt); |
161 | if (!od) { | 161 | if (IS_ERR(od)) { |
162 | dev_err(&pdev->dev, "Cannot allocate omap_device for :%s\n", | 162 | dev_err(&pdev->dev, "Cannot allocate omap_device for :%s\n", |
163 | oh_name); | 163 | oh_name); |
164 | ret = PTR_ERR(od); | 164 | ret = PTR_ERR(od); |
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 612a45689770..7fb96ebdc0fb 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -289,7 +289,7 @@ static void collie_flash_exit(void) | |||
289 | } | 289 | } |
290 | 290 | ||
291 | static struct flash_platform_data collie_flash_data = { | 291 | static struct flash_platform_data collie_flash_data = { |
292 | .map_name = "cfi_probe", | 292 | .map_name = "jedec_probe", |
293 | .init = collie_flash_init, | 293 | .init = collie_flash_init, |
294 | .set_vpp = collie_set_vpp, | 294 | .set_vpp = collie_set_vpp, |
295 | .exit = collie_flash_exit, | 295 | .exit = collie_flash_exit, |
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-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c index 8ea5ef6c79cc..5bd2e851e3c7 100644 --- a/arch/arm/mach-shmobile/clock-r8a73a4.c +++ b/arch/arm/mach-shmobile/clock-r8a73a4.c | |||
@@ -555,7 +555,7 @@ static struct clk_lookup lookups[] = { | |||
555 | CLKDEV_CON_ID("pll2h", &pll2h_clk), | 555 | CLKDEV_CON_ID("pll2h", &pll2h_clk), |
556 | 556 | ||
557 | /* CPU clock */ | 557 | /* CPU clock */ |
558 | CLKDEV_DEV_ID("cpufreq-cpu0", &z_clk), | 558 | CLKDEV_DEV_ID("cpu0", &z_clk), |
559 | 559 | ||
560 | /* DIV6 */ | 560 | /* DIV6 */ |
561 | CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]), | 561 | CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]), |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 1942eaef5181..c92c023f0d27 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -616,7 +616,7 @@ static struct clk_lookup lookups[] = { | |||
616 | CLKDEV_DEV_ID("smp_twd", &twd_clk), /* smp_twd */ | 616 | CLKDEV_DEV_ID("smp_twd", &twd_clk), /* smp_twd */ |
617 | 617 | ||
618 | /* DIV4 clocks */ | 618 | /* DIV4 clocks */ |
619 | CLKDEV_DEV_ID("cpufreq-cpu0", &div4_clks[DIV4_Z]), | 619 | CLKDEV_DEV_ID("cpu0", &div4_clks[DIV4_Z]), |
620 | 620 | ||
621 | /* DIV6 clocks */ | 621 | /* DIV6 clocks */ |
622 | CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), | 622 | CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), |
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index a85adcd00882..a1659863bfd5 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig | |||
@@ -1,7 +1,3 @@ | |||
1 | menu "ST-Ericsson AB U300/U335 Platform" | ||
2 | |||
3 | comment "ST-Ericsson Mobile Platform Products" | ||
4 | |||
5 | config ARCH_U300 | 1 | config ARCH_U300 |
6 | bool "ST-Ericsson U300 Series" if ARCH_MULTI_V5 | 2 | bool "ST-Ericsson U300 Series" if ARCH_MULTI_V5 |
7 | depends on MMU | 3 | depends on MMU |
@@ -25,7 +21,9 @@ config ARCH_U300 | |||
25 | help | 21 | help |
26 | Support for ST-Ericsson U300 series mobile platforms. | 22 | Support for ST-Ericsson U300 series mobile platforms. |
27 | 23 | ||
28 | comment "ST-Ericsson U300/U335 Feature Selections" | 24 | if ARCH_U300 |
25 | |||
26 | menu "ST-Ericsson AB U300/U335 Platform" | ||
29 | 27 | ||
30 | config MACH_U300 | 28 | config MACH_U300 |
31 | depends on ARCH_U300 | 29 | depends on ARCH_U300 |
@@ -53,3 +51,5 @@ config MACH_U300_SPIDUMMY | |||
53 | SPI framework and ARM PL022 support. | 51 | SPI framework and ARM PL022 support. |
54 | 52 | ||
55 | endmenu | 53 | endmenu |
54 | |||
55 | endif | ||
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index 82ccf1d98735..264f894c0e3d 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c | |||
@@ -69,6 +69,7 @@ static int __init ux500_l2x0_init(void) | |||
69 | * some SMI service available. | 69 | * some SMI service available. |
70 | */ | 70 | */ |
71 | outer_cache.disable = NULL; | 71 | outer_cache.disable = NULL; |
72 | outer_cache.set_debug = NULL; | ||
72 | 73 | ||
73 | return 0; | 74 | return 0; |
74 | } | 75 | } |
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/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/mips/Makefile b/arch/mips/Makefile index 75a36ad11ff5..ca8f8340d75f 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -288,9 +288,6 @@ endif | |||
288 | vmlinux.32: vmlinux | 288 | vmlinux.32: vmlinux |
289 | $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@ | 289 | $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@ |
290 | 290 | ||
291 | |||
292 | #obj-$(CONFIG_KPROBES) += kprobes.o | ||
293 | |||
294 | # | 291 | # |
295 | # The 64-bit ELF tools are pretty broken so at this time we generate 64-bit | 292 | # The 64-bit ELF tools are pretty broken so at this time we generate 64-bit |
296 | # ELF files from 32-bit files by conversion. | 293 | # ELF files from 32-bit files by conversion. |
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/alchemy/common/usb.c b/arch/mips/alchemy/common/usb.c index fcc695626117..2adc7edda49c 100644 --- a/arch/mips/alchemy/common/usb.c +++ b/arch/mips/alchemy/common/usb.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/syscore_ops.h> | 16 | #include <linux/syscore_ops.h> |
17 | #include <asm/cpu.h> | ||
17 | #include <asm/mach-au1x00/au1000.h> | 18 | #include <asm/mach-au1x00/au1000.h> |
18 | 19 | ||
19 | /* control register offsets */ | 20 | /* control register offsets */ |
@@ -358,7 +359,7 @@ static inline int au1200_coherency_bug(void) | |||
358 | { | 359 | { |
359 | #if defined(CONFIG_DMA_COHERENT) | 360 | #if defined(CONFIG_DMA_COHERENT) |
360 | /* Au1200 AB USB does not support coherent memory */ | 361 | /* Au1200 AB USB does not support coherent memory */ |
361 | if (!(read_c0_prid() & 0xff)) { | 362 | if (!(read_c0_prid() & PRID_REV_MASK)) { |
362 | printk(KERN_INFO "Au1200 USB: this is chip revision AB !!\n"); | 363 | printk(KERN_INFO "Au1200 USB: this is chip revision AB !!\n"); |
363 | printk(KERN_INFO "Au1200 USB: update your board or re-configure" | 364 | printk(KERN_INFO "Au1200 USB: update your board or re-configure" |
364 | " the kernel\n"); | 365 | " the kernel\n"); |
diff --git a/arch/mips/bcm63xx/cpu.c b/arch/mips/bcm63xx/cpu.c index 7e17374a9ae8..b713cd64b087 100644 --- a/arch/mips/bcm63xx/cpu.c +++ b/arch/mips/bcm63xx/cpu.c | |||
@@ -306,14 +306,14 @@ void __init bcm63xx_cpu_init(void) | |||
306 | 306 | ||
307 | switch (c->cputype) { | 307 | switch (c->cputype) { |
308 | case CPU_BMIPS3300: | 308 | case CPU_BMIPS3300: |
309 | if ((read_c0_prid() & 0xff00) != PRID_IMP_BMIPS3300_ALT) | 309 | if ((read_c0_prid() & PRID_IMP_MASK) != PRID_IMP_BMIPS3300_ALT) |
310 | __cpu_name[cpu] = "Broadcom BCM6338"; | 310 | __cpu_name[cpu] = "Broadcom BCM6338"; |
311 | /* fall-through */ | 311 | /* fall-through */ |
312 | case CPU_BMIPS32: | 312 | case CPU_BMIPS32: |
313 | chipid_reg = BCM_6345_PERF_BASE; | 313 | chipid_reg = BCM_6345_PERF_BASE; |
314 | break; | 314 | break; |
315 | case CPU_BMIPS4350: | 315 | case CPU_BMIPS4350: |
316 | switch ((read_c0_prid() & 0xff)) { | 316 | switch ((read_c0_prid() & PRID_REV_MASK)) { |
317 | case 0x04: | 317 | case 0x04: |
318 | chipid_reg = BCM_3368_PERF_BASE; | 318 | chipid_reg = BCM_3368_PERF_BASE; |
319 | break; | 319 | break; |
diff --git a/arch/mips/boot/dts/include/dt-bindings b/arch/mips/boot/dts/include/dt-bindings index 68ae3887b3e5..08c00e4972fa 120000 --- a/arch/mips/boot/dts/include/dt-bindings +++ b/arch/mips/boot/dts/include/dt-bindings | |||
@@ -1 +1 @@ | |||
../../../../../include/dt-bindings | ../../../../../include/dt-bindings \ No newline at end of file | ||
diff --git a/arch/mips/cavium-octeon/csrc-octeon.c b/arch/mips/cavium-octeon/csrc-octeon.c index 02193953eb9e..b752c4ed0b79 100644 --- a/arch/mips/cavium-octeon/csrc-octeon.c +++ b/arch/mips/cavium-octeon/csrc-octeon.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
13 | 13 | ||
14 | #include <asm/cpu-info.h> | 14 | #include <asm/cpu-info.h> |
15 | #include <asm/cpu-type.h> | ||
15 | #include <asm/time.h> | 16 | #include <asm/time.h> |
16 | 17 | ||
17 | #include <asm/octeon/octeon.h> | 18 | #include <asm/octeon/octeon.h> |
diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c index ab169046e442..468f665de7bb 100644 --- a/arch/mips/dec/prom/init.c +++ b/arch/mips/dec/prom/init.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <asm/bootinfo.h> | 14 | #include <asm/bootinfo.h> |
15 | #include <asm/cpu.h> | 15 | #include <asm/cpu.h> |
16 | #include <asm/cpu-type.h> | ||
16 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
17 | 18 | ||
18 | #include <asm/dec/prom.h> | 19 | #include <asm/dec/prom.h> |
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index fa44f3ec5302..d445d060e346 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -13,12 +13,6 @@ | |||
13 | #include <asm/cpu-info.h> | 13 | #include <asm/cpu-info.h> |
14 | #include <cpu-feature-overrides.h> | 14 | #include <cpu-feature-overrides.h> |
15 | 15 | ||
16 | #ifndef current_cpu_type | ||
17 | #define current_cpu_type() current_cpu_data.cputype | ||
18 | #endif | ||
19 | |||
20 | #define boot_cpu_type() cpu_data[0].cputype | ||
21 | |||
22 | /* | 16 | /* |
23 | * SMP assumption: Options of CPU 0 are a superset of all processors. | 17 | * SMP assumption: Options of CPU 0 are a superset of all processors. |
24 | * This is true for all known MIPS systems. | 18 | * This is true for all known MIPS systems. |
@@ -193,7 +187,7 @@ | |||
193 | 187 | ||
194 | /* | 188 | /* |
195 | * MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other | 189 | * MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other |
196 | * pre-MIPS32/MIPS53 processors have CLO, CLZ. The IDT RC64574 is 64-bit and | 190 | * pre-MIPS32/MIPS64 processors have CLO, CLZ. The IDT RC64574 is 64-bit and |
197 | * has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels | 191 | * has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels |
198 | * cpu_has_clo_clz also indicates the availability of DCLO and DCLZ. | 192 | * cpu_has_clo_clz also indicates the availability of DCLO and DCLZ. |
199 | */ | 193 | */ |
diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index 41401d8eb7d1..21c8e29c8f91 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h | |||
@@ -84,6 +84,7 @@ struct cpuinfo_mips { | |||
84 | extern struct cpuinfo_mips cpu_data[]; | 84 | extern struct cpuinfo_mips cpu_data[]; |
85 | #define current_cpu_data cpu_data[smp_processor_id()] | 85 | #define current_cpu_data cpu_data[smp_processor_id()] |
86 | #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] | 86 | #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] |
87 | #define boot_cpu_data cpu_data[0] | ||
87 | 88 | ||
88 | extern void cpu_probe(void); | 89 | extern void cpu_probe(void); |
89 | extern void cpu_report(void); | 90 | extern void cpu_report(void); |
diff --git a/arch/mips/include/asm/cpu-type.h b/arch/mips/include/asm/cpu-type.h new file mode 100644 index 000000000000..4a402cc60c03 --- /dev/null +++ b/arch/mips/include/asm/cpu-type.h | |||
@@ -0,0 +1,203 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003, 2004 Ralf Baechle | ||
7 | * Copyright (C) 2004 Maciej W. Rozycki | ||
8 | */ | ||
9 | #ifndef __ASM_CPU_TYPE_H | ||
10 | #define __ASM_CPU_TYPE_H | ||
11 | |||
12 | #include <linux/smp.h> | ||
13 | #include <linux/compiler.h> | ||
14 | |||
15 | static inline int __pure __get_cpu_type(const int cpu_type) | ||
16 | { | ||
17 | switch (cpu_type) { | ||
18 | #if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \ | ||
19 | defined(CONFIG_SYS_HAS_CPU_LOONGSON2F) | ||
20 | case CPU_LOONGSON2: | ||
21 | #endif | ||
22 | |||
23 | #ifdef CONFIG_SYS_HAS_CPU_LOONGSON1B | ||
24 | case CPU_LOONGSON1: | ||
25 | #endif | ||
26 | |||
27 | #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R1 | ||
28 | case CPU_4KC: | ||
29 | case CPU_ALCHEMY: | ||
30 | case CPU_BMIPS3300: | ||
31 | case CPU_BMIPS4350: | ||
32 | case CPU_PR4450: | ||
33 | case CPU_BMIPS32: | ||
34 | case CPU_JZRISC: | ||
35 | #endif | ||
36 | |||
37 | #if defined(CONFIG_SYS_HAS_CPU_MIPS32_R1) || \ | ||
38 | defined(CONFIG_SYS_HAS_CPU_MIPS32_R2) | ||
39 | case CPU_4KEC: | ||
40 | #endif | ||
41 | |||
42 | #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R2 | ||
43 | case CPU_4KSC: | ||
44 | case CPU_24K: | ||
45 | case CPU_34K: | ||
46 | case CPU_1004K: | ||
47 | case CPU_74K: | ||
48 | case CPU_M14KC: | ||
49 | case CPU_M14KEC: | ||
50 | #endif | ||
51 | |||
52 | #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R1 | ||
53 | case CPU_5KC: | ||
54 | case CPU_5KE: | ||
55 | case CPU_20KC: | ||
56 | case CPU_25KF: | ||
57 | case CPU_SB1: | ||
58 | case CPU_SB1A: | ||
59 | #endif | ||
60 | |||
61 | #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R2 | ||
62 | /* | ||
63 | * All MIPS64 R2 processors have their own special symbols. That is, | ||
64 | * there currently is no pure R2 core | ||
65 | */ | ||
66 | #endif | ||
67 | |||
68 | #ifdef CONFIG_SYS_HAS_CPU_R3000 | ||
69 | case CPU_R2000: | ||
70 | case CPU_R3000: | ||
71 | case CPU_R3000A: | ||
72 | case CPU_R3041: | ||
73 | case CPU_R3051: | ||
74 | case CPU_R3052: | ||
75 | case CPU_R3081: | ||
76 | case CPU_R3081E: | ||
77 | #endif | ||
78 | |||
79 | #ifdef CONFIG_SYS_HAS_CPU_TX39XX | ||
80 | case CPU_TX3912: | ||
81 | case CPU_TX3922: | ||
82 | case CPU_TX3927: | ||
83 | #endif | ||
84 | |||
85 | #ifdef CONFIG_SYS_HAS_CPU_VR41XX | ||
86 | case CPU_VR41XX: | ||
87 | case CPU_VR4111: | ||
88 | case CPU_VR4121: | ||
89 | case CPU_VR4122: | ||
90 | case CPU_VR4131: | ||
91 | case CPU_VR4133: | ||
92 | case CPU_VR4181: | ||
93 | case CPU_VR4181A: | ||
94 | #endif | ||
95 | |||
96 | #ifdef CONFIG_SYS_HAS_CPU_R4300 | ||
97 | case CPU_R4300: | ||
98 | case CPU_R4310: | ||
99 | #endif | ||
100 | |||
101 | #ifdef CONFIG_SYS_HAS_CPU_R4X00 | ||
102 | case CPU_R4000PC: | ||
103 | case CPU_R4000SC: | ||
104 | case CPU_R4000MC: | ||
105 | case CPU_R4200: | ||
106 | case CPU_R4400PC: | ||
107 | case CPU_R4400SC: | ||
108 | case CPU_R4400MC: | ||
109 | case CPU_R4600: | ||
110 | case CPU_R4700: | ||
111 | case CPU_R4640: | ||
112 | case CPU_R4650: | ||
113 | #endif | ||
114 | |||
115 | #ifdef CONFIG_SYS_HAS_CPU_TX49XX | ||
116 | case CPU_TX49XX: | ||
117 | #endif | ||
118 | |||
119 | #ifdef CONFIG_SYS_HAS_CPU_R5000 | ||
120 | case CPU_R5000: | ||
121 | #endif | ||
122 | |||
123 | #ifdef CONFIG_SYS_HAS_CPU_R5432 | ||
124 | case CPU_R5432: | ||
125 | #endif | ||
126 | |||
127 | #ifdef CONFIG_SYS_HAS_CPU_R5500 | ||
128 | case CPU_R5500: | ||
129 | #endif | ||
130 | |||
131 | #ifdef CONFIG_SYS_HAS_CPU_R6000 | ||
132 | case CPU_R6000: | ||
133 | case CPU_R6000A: | ||
134 | #endif | ||
135 | |||
136 | #ifdef CONFIG_SYS_HAS_CPU_NEVADA | ||
137 | case CPU_NEVADA: | ||
138 | #endif | ||
139 | |||
140 | #ifdef CONFIG_SYS_HAS_CPU_R8000 | ||
141 | case CPU_R8000: | ||
142 | #endif | ||
143 | |||
144 | #ifdef CONFIG_SYS_HAS_CPU_R10000 | ||
145 | case CPU_R10000: | ||
146 | case CPU_R12000: | ||
147 | case CPU_R14000: | ||
148 | #endif | ||
149 | #ifdef CONFIG_SYS_HAS_CPU_RM7000 | ||
150 | case CPU_RM7000: | ||
151 | case CPU_SR71000: | ||
152 | #endif | ||
153 | #ifdef CONFIG_SYS_HAS_CPU_RM9000 | ||
154 | case CPU_RM9000: | ||
155 | #endif | ||
156 | #ifdef CONFIG_SYS_HAS_CPU_SB1 | ||
157 | case CPU_SB1: | ||
158 | case CPU_SB1A: | ||
159 | #endif | ||
160 | #ifdef CONFIG_SYS_HAS_CPU_CAVIUM_OCTEON | ||
161 | case CPU_CAVIUM_OCTEON: | ||
162 | case CPU_CAVIUM_OCTEON_PLUS: | ||
163 | case CPU_CAVIUM_OCTEON2: | ||
164 | #endif | ||
165 | |||
166 | #ifdef CONFIG_SYS_HAS_CPU_BMIPS4380 | ||
167 | case CPU_BMIPS4380: | ||
168 | #endif | ||
169 | |||
170 | #ifdef CONFIG_SYS_HAS_CPU_BMIPS5000 | ||
171 | case CPU_BMIPS5000: | ||
172 | #endif | ||
173 | |||
174 | #ifdef CONFIG_SYS_HAS_CPU_XLP | ||
175 | case CPU_XLP: | ||
176 | #endif | ||
177 | |||
178 | #ifdef CONFIG_SYS_HAS_CPU_XLR | ||
179 | case CPU_XLR: | ||
180 | #endif | ||
181 | break; | ||
182 | default: | ||
183 | unreachable(); | ||
184 | } | ||
185 | |||
186 | return cpu_type; | ||
187 | } | ||
188 | |||
189 | static inline int __pure current_cpu_type(void) | ||
190 | { | ||
191 | const int cpu_type = current_cpu_data.cputype; | ||
192 | |||
193 | return __get_cpu_type(cpu_type); | ||
194 | } | ||
195 | |||
196 | static inline int __pure boot_cpu_type(void) | ||
197 | { | ||
198 | const int cpu_type = cpu_data[0].cputype; | ||
199 | |||
200 | return __get_cpu_type(cpu_type); | ||
201 | } | ||
202 | |||
203 | #endif /* __ASM_CPU_TYPE_H */ | ||
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index 71b9f1998be7..d2035e16502a 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h | |||
@@ -3,15 +3,14 @@ | |||
3 | * various MIPS cpu types. | 3 | * various MIPS cpu types. |
4 | * | 4 | * |
5 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) | 5 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) |
6 | * Copyright (C) 2004 Maciej W. Rozycki | 6 | * Copyright (C) 2004, 2013 Maciej W. Rozycki |
7 | */ | 7 | */ |
8 | #ifndef _ASM_CPU_H | 8 | #ifndef _ASM_CPU_H |
9 | #define _ASM_CPU_H | 9 | #define _ASM_CPU_H |
10 | 10 | ||
11 | /* Assigned Company values for bits 23:16 of the PRId Register | 11 | /* |
12 | (CP0 register 15, select 0). As of the MIPS32 and MIPS64 specs from | 12 | As of the MIPS32 and MIPS64 specs from MTI, the PRId register (CP0 |
13 | MTI, the PRId register is defined in this (backwards compatible) | 13 | register 15, select 0) is defined in this (backwards compatible) way: |
14 | way: | ||
15 | 14 | ||
16 | +----------------+----------------+----------------+----------------+ | 15 | +----------------+----------------+----------------+----------------+ |
17 | | Company Options| Company ID | Processor ID | Revision | | 16 | | Company Options| Company ID | Processor ID | Revision | |
@@ -23,6 +22,14 @@ | |||
23 | spec. | 22 | spec. |
24 | */ | 23 | */ |
25 | 24 | ||
25 | #define PRID_OPT_MASK 0xff000000 | ||
26 | |||
27 | /* | ||
28 | * Assigned Company values for bits 23:16 of the PRId register. | ||
29 | */ | ||
30 | |||
31 | #define PRID_COMP_MASK 0xff0000 | ||
32 | |||
26 | #define PRID_COMP_LEGACY 0x000000 | 33 | #define PRID_COMP_LEGACY 0x000000 |
27 | #define PRID_COMP_MIPS 0x010000 | 34 | #define PRID_COMP_MIPS 0x010000 |
28 | #define PRID_COMP_BROADCOM 0x020000 | 35 | #define PRID_COMP_BROADCOM 0x020000 |
@@ -38,10 +45,17 @@ | |||
38 | #define PRID_COMP_INGENIC 0xd00000 | 45 | #define PRID_COMP_INGENIC 0xd00000 |
39 | 46 | ||
40 | /* | 47 | /* |
41 | * Assigned values for the product ID register. In order to detect a | 48 | * Assigned Processor ID (implementation) values for bits 15:8 of the PRId |
42 | * certain CPU type exactly eventually additional registers may need to | 49 | * register. In order to detect a certain CPU type exactly eventually |
43 | * be examined. These are valid when 23:16 == PRID_COMP_LEGACY | 50 | * additional registers may need to be examined. |
44 | */ | 51 | */ |
52 | |||
53 | #define PRID_IMP_MASK 0xff00 | ||
54 | |||
55 | /* | ||
56 | * These are valid when 23:16 == PRID_COMP_LEGACY | ||
57 | */ | ||
58 | |||
45 | #define PRID_IMP_R2000 0x0100 | 59 | #define PRID_IMP_R2000 0x0100 |
46 | #define PRID_IMP_AU1_REV1 0x0100 | 60 | #define PRID_IMP_AU1_REV1 0x0100 |
47 | #define PRID_IMP_AU1_REV2 0x0200 | 61 | #define PRID_IMP_AU1_REV2 0x0200 |
@@ -182,11 +196,15 @@ | |||
182 | #define PRID_IMP_NETLOGIC_XLP2XX 0x1200 | 196 | #define PRID_IMP_NETLOGIC_XLP2XX 0x1200 |
183 | 197 | ||
184 | /* | 198 | /* |
185 | * Definitions for 7:0 on legacy processors | 199 | * Particular Revision values for bits 7:0 of the PRId register. |
186 | */ | 200 | */ |
187 | 201 | ||
188 | #define PRID_REV_MASK 0x00ff | 202 | #define PRID_REV_MASK 0x00ff |
189 | 203 | ||
204 | /* | ||
205 | * Definitions for 7:0 on legacy processors | ||
206 | */ | ||
207 | |||
190 | #define PRID_REV_TX4927 0x0022 | 208 | #define PRID_REV_TX4927 0x0022 |
191 | #define PRID_REV_TX4937 0x0030 | 209 | #define PRID_REV_TX4937 0x0030 |
192 | #define PRID_REV_R4400 0x0040 | 210 | #define PRID_REV_R4400 0x0040 |
@@ -227,6 +245,8 @@ | |||
227 | * 31 16 15 8 7 0 | 245 | * 31 16 15 8 7 0 |
228 | */ | 246 | */ |
229 | 247 | ||
248 | #define FPIR_IMP_MASK 0xff00 | ||
249 | |||
230 | #define FPIR_IMP_NONE 0x0000 | 250 | #define FPIR_IMP_NONE 0x0000 |
231 | 251 | ||
232 | enum cpu_type_enum { | 252 | enum cpu_type_enum { |
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index 3e11a468cdf8..54f9e84db8ac 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -43,6 +43,8 @@ | |||
43 | #include <linux/io.h> | 43 | #include <linux/io.h> |
44 | #include <linux/irq.h> | 44 | #include <linux/irq.h> |
45 | 45 | ||
46 | #include <asm/cpu.h> | ||
47 | |||
46 | /* cpu pipeline flush */ | 48 | /* cpu pipeline flush */ |
47 | void static inline au_sync(void) | 49 | void static inline au_sync(void) |
48 | { | 50 | { |
@@ -140,7 +142,7 @@ static inline int au1xxx_cpu_needs_config_od(void) | |||
140 | 142 | ||
141 | static inline int alchemy_get_cputype(void) | 143 | static inline int alchemy_get_cputype(void) |
142 | { | 144 | { |
143 | switch (read_c0_prid() & 0xffff0000) { | 145 | switch (read_c0_prid() & (PRID_OPT_MASK | PRID_COMP_MASK)) { |
144 | case 0x00030000: | 146 | case 0x00030000: |
145 | return ALCHEMY_CPU_AU1000; | 147 | return ALCHEMY_CPU_AU1000; |
146 | break; | 148 | break; |
diff --git a/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h index f4caacd25552..1bcb6421205e 100644 --- a/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ip22/cpu-feature-overrides.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_IP22_CPU_FEATURE_OVERRIDES_H |
10 | 10 | ||
11 | #include <asm/cpu.h> | ||
12 | |||
11 | /* | 13 | /* |
12 | * IP22 with a variety of processors so we can't use defaults for everything. | 14 | * IP22 with a variety of processors so we can't use defaults for everything. |
13 | */ | 15 | */ |
diff --git a/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h index 1d2b6ff60d33..d6111aa2e886 100644 --- a/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_IP27_CPU_FEATURE_OVERRIDES_H |
10 | 10 | ||
11 | #include <asm/cpu.h> | ||
12 | |||
11 | /* | 13 | /* |
12 | * IP27 only comes with R10000 family processors all using the same config | 14 | * IP27 only comes with R10000 family processors all using the same config |
13 | */ | 15 | */ |
diff --git a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h index 65e9c856390d..4cec06d133db 100644 --- a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H | 9 | #ifndef __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H |
10 | #define __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H | 10 | #define __ASM_MACH_IP28_CPU_FEATURE_OVERRIDES_H |
11 | 11 | ||
12 | #include <asm/cpu.h> | ||
13 | |||
12 | /* | 14 | /* |
13 | * IP28 only comes with R10000 family processors all using the same config | 15 | * IP28 only comes with R10000 family processors all using the same config |
14 | */ | 16 | */ |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index fed1c3e9b486..e0331414c7d6 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -603,6 +603,13 @@ | |||
603 | #define MIPS_CONF4_MMUEXTDEF (_ULCAST_(3) << 14) | 603 | #define MIPS_CONF4_MMUEXTDEF (_ULCAST_(3) << 14) |
604 | #define MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT (_ULCAST_(1) << 14) | 604 | #define MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT (_ULCAST_(1) << 14) |
605 | 605 | ||
606 | #define MIPS_CONF5_NF (_ULCAST_(1) << 0) | ||
607 | #define MIPS_CONF5_UFR (_ULCAST_(1) << 2) | ||
608 | #define MIPS_CONF5_MSAEN (_ULCAST_(1) << 27) | ||
609 | #define MIPS_CONF5_EVA (_ULCAST_(1) << 28) | ||
610 | #define MIPS_CONF5_CV (_ULCAST_(1) << 29) | ||
611 | #define MIPS_CONF5_K (_ULCAST_(1) << 30) | ||
612 | |||
606 | #define MIPS_CONF6_SYND (_ULCAST_(1) << 13) | 613 | #define MIPS_CONF6_SYND (_ULCAST_(1) << 13) |
607 | 614 | ||
608 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) | 615 | #define MIPS_CONF7_WII (_ULCAST_(1) << 31) |
diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index f194c08bd057..12d6842962be 100644 --- a/arch/mips/include/asm/pci.h +++ b/arch/mips/include/asm/pci.h | |||
@@ -83,6 +83,18 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
83 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 83 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
84 | enum pci_mmap_state mmap_state, int write_combine); | 84 | enum pci_mmap_state mmap_state, int write_combine); |
85 | 85 | ||
86 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER | ||
87 | |||
88 | static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, | ||
89 | const struct resource *rsrc, resource_size_t *start, | ||
90 | resource_size_t *end) | ||
91 | { | ||
92 | phys_t size = resource_size(rsrc); | ||
93 | |||
94 | *start = fixup_bigphys_addr(rsrc->start, size); | ||
95 | *end = rsrc->start + size; | ||
96 | } | ||
97 | |||
86 | /* | 98 | /* |
87 | * Dynamic DMA mapping stuff. | 99 | * Dynamic DMA mapping stuff. |
88 | * MIPS has everything mapped statically. | 100 | * MIPS has everything mapped statically. |
diff --git a/arch/mips/include/asm/timex.h b/arch/mips/include/asm/timex.h index 6529704aa73a..c5424757da65 100644 --- a/arch/mips/include/asm/timex.h +++ b/arch/mips/include/asm/timex.h | |||
@@ -10,7 +10,9 @@ | |||
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | 12 | ||
13 | #include <asm/cpu-features.h> | ||
13 | #include <asm/mipsregs.h> | 14 | #include <asm/mipsregs.h> |
15 | #include <asm/cpu-type.h> | ||
14 | 16 | ||
15 | /* | 17 | /* |
16 | * This is the clock rate of the i8253 PIT. A MIPS system may not have | 18 | * This is the clock rate of the i8253 PIT. A MIPS system may not have |
@@ -33,9 +35,38 @@ | |||
33 | 35 | ||
34 | typedef unsigned int cycles_t; | 36 | typedef unsigned int cycles_t; |
35 | 37 | ||
38 | /* | ||
39 | * On R4000/R4400 before version 5.0 an erratum exists such that if the | ||
40 | * cycle counter is read in the exact moment that it is matching the | ||
41 | * compare register, no interrupt will be generated. | ||
42 | * | ||
43 | * There is a suggested workaround and also the erratum can't strike if | ||
44 | * the compare interrupt isn't being used as the clock source device. | ||
45 | * However for now the implementaton of this function doesn't get these | ||
46 | * fine details right. | ||
47 | */ | ||
36 | static inline cycles_t get_cycles(void) | 48 | static inline cycles_t get_cycles(void) |
37 | { | 49 | { |
38 | return 0; | 50 | switch (boot_cpu_type()) { |
51 | case CPU_R4400PC: | ||
52 | case CPU_R4400SC: | ||
53 | case CPU_R4400MC: | ||
54 | if ((read_c0_prid() & 0xff) >= 0x0050) | ||
55 | return read_c0_count(); | ||
56 | break; | ||
57 | |||
58 | case CPU_R4000PC: | ||
59 | case CPU_R4000SC: | ||
60 | case CPU_R4000MC: | ||
61 | break; | ||
62 | |||
63 | default: | ||
64 | if (cpu_has_counter) | ||
65 | return read_c0_count(); | ||
66 | break; | ||
67 | } | ||
68 | |||
69 | return 0; /* no usable counter */ | ||
39 | } | 70 | } |
40 | 71 | ||
41 | #endif /* __KERNEL__ */ | 72 | #endif /* __KERNEL__ */ |
diff --git a/arch/mips/include/asm/vga.h b/arch/mips/include/asm/vga.h index f4cff7e4fa8a..f82c83749a08 100644 --- a/arch/mips/include/asm/vga.h +++ b/arch/mips/include/asm/vga.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #ifndef _ASM_VGA_H | 6 | #ifndef _ASM_VGA_H |
7 | #define _ASM_VGA_H | 7 | #define _ASM_VGA_H |
8 | 8 | ||
9 | #include <asm/addrspace.h> | ||
9 | #include <asm/byteorder.h> | 10 | #include <asm/byteorder.h> |
10 | 11 | ||
11 | /* | 12 | /* |
@@ -13,7 +14,7 @@ | |||
13 | * access the videoram directly without any black magic. | 14 | * access the videoram directly without any black magic. |
14 | */ | 15 | */ |
15 | 16 | ||
16 | #define VGA_MAP_MEM(x, s) (0xb0000000L + (unsigned long)(x)) | 17 | #define VGA_MAP_MEM(x, s) CKSEG1ADDR(0x10000000L + (unsigned long)(x)) |
17 | 18 | ||
18 | #define vga_readb(x) (*(x)) | 19 | #define vga_readb(x) (*(x)) |
19 | #define vga_writeb(x, y) (*(y) = (x)) | 20 | #define vga_writeb(x, y) (*(y) = (x)) |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 37663c7862a5..5465dc183e5a 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <asm/bugs.h> | 21 | #include <asm/bugs.h> |
22 | #include <asm/cpu.h> | 22 | #include <asm/cpu.h> |
23 | #include <asm/cpu-type.h> | ||
23 | #include <asm/fpu.h> | 24 | #include <asm/fpu.h> |
24 | #include <asm/mipsregs.h> | 25 | #include <asm/mipsregs.h> |
25 | #include <asm/watch.h> | 26 | #include <asm/watch.h> |
@@ -55,7 +56,7 @@ static inline void check_errata(void) | |||
55 | { | 56 | { |
56 | struct cpuinfo_mips *c = ¤t_cpu_data; | 57 | struct cpuinfo_mips *c = ¤t_cpu_data; |
57 | 58 | ||
58 | switch (c->cputype) { | 59 | switch (current_cpu_type()) { |
59 | case CPU_34K: | 60 | case CPU_34K: |
60 | /* | 61 | /* |
61 | * Erratum "RPS May Cause Incorrect Instruction Execution" | 62 | * Erratum "RPS May Cause Incorrect Instruction Execution" |
@@ -122,7 +123,7 @@ static inline unsigned long cpu_get_fpu_id(void) | |||
122 | */ | 123 | */ |
123 | static inline int __cpu_has_fpu(void) | 124 | static inline int __cpu_has_fpu(void) |
124 | { | 125 | { |
125 | return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE); | 126 | return ((cpu_get_fpu_id() & FPIR_IMP_MASK) != FPIR_IMP_NONE); |
126 | } | 127 | } |
127 | 128 | ||
128 | static inline void cpu_probe_vmbits(struct cpuinfo_mips *c) | 129 | static inline void cpu_probe_vmbits(struct cpuinfo_mips *c) |
@@ -290,6 +291,17 @@ static inline unsigned int decode_config4(struct cpuinfo_mips *c) | |||
290 | return config4 & MIPS_CONF_M; | 291 | return config4 & MIPS_CONF_M; |
291 | } | 292 | } |
292 | 293 | ||
294 | static inline unsigned int decode_config5(struct cpuinfo_mips *c) | ||
295 | { | ||
296 | unsigned int config5; | ||
297 | |||
298 | config5 = read_c0_config5(); | ||
299 | config5 &= ~MIPS_CONF5_UFR; | ||
300 | write_c0_config5(config5); | ||
301 | |||
302 | return config5 & MIPS_CONF_M; | ||
303 | } | ||
304 | |||
293 | static void decode_configs(struct cpuinfo_mips *c) | 305 | static void decode_configs(struct cpuinfo_mips *c) |
294 | { | 306 | { |
295 | int ok; | 307 | int ok; |
@@ -310,6 +322,8 @@ static void decode_configs(struct cpuinfo_mips *c) | |||
310 | ok = decode_config3(c); | 322 | ok = decode_config3(c); |
311 | if (ok) | 323 | if (ok) |
312 | ok = decode_config4(c); | 324 | ok = decode_config4(c); |
325 | if (ok) | ||
326 | ok = decode_config5(c); | ||
313 | 327 | ||
314 | mips_probe_watch_registers(c); | 328 | mips_probe_watch_registers(c); |
315 | 329 | ||
@@ -322,7 +336,7 @@ static void decode_configs(struct cpuinfo_mips *c) | |||
322 | 336 | ||
323 | static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | 337 | static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) |
324 | { | 338 | { |
325 | switch (c->processor_id & 0xff00) { | 339 | switch (c->processor_id & PRID_IMP_MASK) { |
326 | case PRID_IMP_R2000: | 340 | case PRID_IMP_R2000: |
327 | c->cputype = CPU_R2000; | 341 | c->cputype = CPU_R2000; |
328 | __cpu_name[cpu] = "R2000"; | 342 | __cpu_name[cpu] = "R2000"; |
@@ -333,7 +347,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
333 | c->tlbsize = 64; | 347 | c->tlbsize = 64; |
334 | break; | 348 | break; |
335 | case PRID_IMP_R3000: | 349 | case PRID_IMP_R3000: |
336 | if ((c->processor_id & 0xff) == PRID_REV_R3000A) { | 350 | if ((c->processor_id & PRID_REV_MASK) == PRID_REV_R3000A) { |
337 | if (cpu_has_confreg()) { | 351 | if (cpu_has_confreg()) { |
338 | c->cputype = CPU_R3081E; | 352 | c->cputype = CPU_R3081E; |
339 | __cpu_name[cpu] = "R3081"; | 353 | __cpu_name[cpu] = "R3081"; |
@@ -353,7 +367,8 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
353 | break; | 367 | break; |
354 | case PRID_IMP_R4000: | 368 | case PRID_IMP_R4000: |
355 | if (read_c0_config() & CONF_SC) { | 369 | if (read_c0_config() & CONF_SC) { |
356 | if ((c->processor_id & 0xff) >= PRID_REV_R4400) { | 370 | if ((c->processor_id & PRID_REV_MASK) >= |
371 | PRID_REV_R4400) { | ||
357 | c->cputype = CPU_R4400PC; | 372 | c->cputype = CPU_R4400PC; |
358 | __cpu_name[cpu] = "R4400PC"; | 373 | __cpu_name[cpu] = "R4400PC"; |
359 | } else { | 374 | } else { |
@@ -361,7 +376,8 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
361 | __cpu_name[cpu] = "R4000PC"; | 376 | __cpu_name[cpu] = "R4000PC"; |
362 | } | 377 | } |
363 | } else { | 378 | } else { |
364 | if ((c->processor_id & 0xff) >= PRID_REV_R4400) { | 379 | if ((c->processor_id & PRID_REV_MASK) >= |
380 | PRID_REV_R4400) { | ||
365 | c->cputype = CPU_R4400SC; | 381 | c->cputype = CPU_R4400SC; |
366 | __cpu_name[cpu] = "R4400SC"; | 382 | __cpu_name[cpu] = "R4400SC"; |
367 | } else { | 383 | } else { |
@@ -454,7 +470,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
454 | __cpu_name[cpu] = "TX3927"; | 470 | __cpu_name[cpu] = "TX3927"; |
455 | c->tlbsize = 64; | 471 | c->tlbsize = 64; |
456 | } else { | 472 | } else { |
457 | switch (c->processor_id & 0xff) { | 473 | switch (c->processor_id & PRID_REV_MASK) { |
458 | case PRID_REV_TX3912: | 474 | case PRID_REV_TX3912: |
459 | c->cputype = CPU_TX3912; | 475 | c->cputype = CPU_TX3912; |
460 | __cpu_name[cpu] = "TX3912"; | 476 | __cpu_name[cpu] = "TX3912"; |
@@ -640,7 +656,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
640 | static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) | 656 | static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) |
641 | { | 657 | { |
642 | decode_configs(c); | 658 | decode_configs(c); |
643 | switch (c->processor_id & 0xff00) { | 659 | switch (c->processor_id & PRID_IMP_MASK) { |
644 | case PRID_IMP_4KC: | 660 | case PRID_IMP_4KC: |
645 | c->cputype = CPU_4KC; | 661 | c->cputype = CPU_4KC; |
646 | __cpu_name[cpu] = "MIPS 4Kc"; | 662 | __cpu_name[cpu] = "MIPS 4Kc"; |
@@ -711,7 +727,7 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) | |||
711 | static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu) | 727 | static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu) |
712 | { | 728 | { |
713 | decode_configs(c); | 729 | decode_configs(c); |
714 | switch (c->processor_id & 0xff00) { | 730 | switch (c->processor_id & PRID_IMP_MASK) { |
715 | case PRID_IMP_AU1_REV1: | 731 | case PRID_IMP_AU1_REV1: |
716 | case PRID_IMP_AU1_REV2: | 732 | case PRID_IMP_AU1_REV2: |
717 | c->cputype = CPU_ALCHEMY; | 733 | c->cputype = CPU_ALCHEMY; |
@@ -730,7 +746,7 @@ static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu) | |||
730 | break; | 746 | break; |
731 | case 4: | 747 | case 4: |
732 | __cpu_name[cpu] = "Au1200"; | 748 | __cpu_name[cpu] = "Au1200"; |
733 | if ((c->processor_id & 0xff) == 2) | 749 | if ((c->processor_id & PRID_REV_MASK) == 2) |
734 | __cpu_name[cpu] = "Au1250"; | 750 | __cpu_name[cpu] = "Au1250"; |
735 | break; | 751 | break; |
736 | case 5: | 752 | case 5: |
@@ -748,12 +764,12 @@ static inline void cpu_probe_sibyte(struct cpuinfo_mips *c, unsigned int cpu) | |||
748 | { | 764 | { |
749 | decode_configs(c); | 765 | decode_configs(c); |
750 | 766 | ||
751 | switch (c->processor_id & 0xff00) { | 767 | switch (c->processor_id & PRID_IMP_MASK) { |
752 | case PRID_IMP_SB1: | 768 | case PRID_IMP_SB1: |
753 | c->cputype = CPU_SB1; | 769 | c->cputype = CPU_SB1; |
754 | __cpu_name[cpu] = "SiByte SB1"; | 770 | __cpu_name[cpu] = "SiByte SB1"; |
755 | /* FPU in pass1 is known to have issues. */ | 771 | /* FPU in pass1 is known to have issues. */ |
756 | if ((c->processor_id & 0xff) < 0x02) | 772 | if ((c->processor_id & PRID_REV_MASK) < 0x02) |
757 | c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); | 773 | c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); |
758 | break; | 774 | break; |
759 | case PRID_IMP_SB1A: | 775 | case PRID_IMP_SB1A: |
@@ -766,7 +782,7 @@ static inline void cpu_probe_sibyte(struct cpuinfo_mips *c, unsigned int cpu) | |||
766 | static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c, unsigned int cpu) | 782 | static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c, unsigned int cpu) |
767 | { | 783 | { |
768 | decode_configs(c); | 784 | decode_configs(c); |
769 | switch (c->processor_id & 0xff00) { | 785 | switch (c->processor_id & PRID_IMP_MASK) { |
770 | case PRID_IMP_SR71000: | 786 | case PRID_IMP_SR71000: |
771 | c->cputype = CPU_SR71000; | 787 | c->cputype = CPU_SR71000; |
772 | __cpu_name[cpu] = "Sandcraft SR71000"; | 788 | __cpu_name[cpu] = "Sandcraft SR71000"; |
@@ -779,7 +795,7 @@ static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c, unsigned int cpu) | |||
779 | static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu) | 795 | static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu) |
780 | { | 796 | { |
781 | decode_configs(c); | 797 | decode_configs(c); |
782 | switch (c->processor_id & 0xff00) { | 798 | switch (c->processor_id & PRID_IMP_MASK) { |
783 | case PRID_IMP_PR4450: | 799 | case PRID_IMP_PR4450: |
784 | c->cputype = CPU_PR4450; | 800 | c->cputype = CPU_PR4450; |
785 | __cpu_name[cpu] = "Philips PR4450"; | 801 | __cpu_name[cpu] = "Philips PR4450"; |
@@ -791,7 +807,7 @@ static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu) | |||
791 | static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) | 807 | static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) |
792 | { | 808 | { |
793 | decode_configs(c); | 809 | decode_configs(c); |
794 | switch (c->processor_id & 0xff00) { | 810 | switch (c->processor_id & PRID_IMP_MASK) { |
795 | case PRID_IMP_BMIPS32_REV4: | 811 | case PRID_IMP_BMIPS32_REV4: |
796 | case PRID_IMP_BMIPS32_REV8: | 812 | case PRID_IMP_BMIPS32_REV8: |
797 | c->cputype = CPU_BMIPS32; | 813 | c->cputype = CPU_BMIPS32; |
@@ -806,7 +822,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) | |||
806 | set_elf_platform(cpu, "bmips3300"); | 822 | set_elf_platform(cpu, "bmips3300"); |
807 | break; | 823 | break; |
808 | case PRID_IMP_BMIPS43XX: { | 824 | case PRID_IMP_BMIPS43XX: { |
809 | int rev = c->processor_id & 0xff; | 825 | int rev = c->processor_id & PRID_REV_MASK; |
810 | 826 | ||
811 | if (rev >= PRID_REV_BMIPS4380_LO && | 827 | if (rev >= PRID_REV_BMIPS4380_LO && |
812 | rev <= PRID_REV_BMIPS4380_HI) { | 828 | rev <= PRID_REV_BMIPS4380_HI) { |
@@ -832,7 +848,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) | |||
832 | static inline void cpu_probe_cavium(struct cpuinfo_mips *c, unsigned int cpu) | 848 | static inline void cpu_probe_cavium(struct cpuinfo_mips *c, unsigned int cpu) |
833 | { | 849 | { |
834 | decode_configs(c); | 850 | decode_configs(c); |
835 | switch (c->processor_id & 0xff00) { | 851 | switch (c->processor_id & PRID_IMP_MASK) { |
836 | case PRID_IMP_CAVIUM_CN38XX: | 852 | case PRID_IMP_CAVIUM_CN38XX: |
837 | case PRID_IMP_CAVIUM_CN31XX: | 853 | case PRID_IMP_CAVIUM_CN31XX: |
838 | case PRID_IMP_CAVIUM_CN30XX: | 854 | case PRID_IMP_CAVIUM_CN30XX: |
@@ -875,7 +891,7 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu) | |||
875 | decode_configs(c); | 891 | decode_configs(c); |
876 | /* JZRISC does not implement the CP0 counter. */ | 892 | /* JZRISC does not implement the CP0 counter. */ |
877 | c->options &= ~MIPS_CPU_COUNTER; | 893 | c->options &= ~MIPS_CPU_COUNTER; |
878 | switch (c->processor_id & 0xff00) { | 894 | switch (c->processor_id & PRID_IMP_MASK) { |
879 | case PRID_IMP_JZRISC: | 895 | case PRID_IMP_JZRISC: |
880 | c->cputype = CPU_JZRISC; | 896 | c->cputype = CPU_JZRISC; |
881 | __cpu_name[cpu] = "Ingenic JZRISC"; | 897 | __cpu_name[cpu] = "Ingenic JZRISC"; |
@@ -890,7 +906,7 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu) | |||
890 | { | 906 | { |
891 | decode_configs(c); | 907 | decode_configs(c); |
892 | 908 | ||
893 | if ((c->processor_id & 0xff00) == PRID_IMP_NETLOGIC_AU13XX) { | 909 | if ((c->processor_id & PRID_IMP_MASK) == PRID_IMP_NETLOGIC_AU13XX) { |
894 | c->cputype = CPU_ALCHEMY; | 910 | c->cputype = CPU_ALCHEMY; |
895 | __cpu_name[cpu] = "Au1300"; | 911 | __cpu_name[cpu] = "Au1300"; |
896 | /* following stuff is not for Alchemy */ | 912 | /* following stuff is not for Alchemy */ |
@@ -905,7 +921,7 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu) | |||
905 | MIPS_CPU_EJTAG | | 921 | MIPS_CPU_EJTAG | |
906 | MIPS_CPU_LLSC); | 922 | MIPS_CPU_LLSC); |
907 | 923 | ||
908 | switch (c->processor_id & 0xff00) { | 924 | switch (c->processor_id & PRID_IMP_MASK) { |
909 | case PRID_IMP_NETLOGIC_XLP2XX: | 925 | case PRID_IMP_NETLOGIC_XLP2XX: |
910 | c->cputype = CPU_XLP; | 926 | c->cputype = CPU_XLP; |
911 | __cpu_name[cpu] = "Broadcom XLPII"; | 927 | __cpu_name[cpu] = "Broadcom XLPII"; |
@@ -984,7 +1000,7 @@ void cpu_probe(void) | |||
984 | c->cputype = CPU_UNKNOWN; | 1000 | c->cputype = CPU_UNKNOWN; |
985 | 1001 | ||
986 | c->processor_id = read_c0_prid(); | 1002 | c->processor_id = read_c0_prid(); |
987 | switch (c->processor_id & 0xff0000) { | 1003 | switch (c->processor_id & PRID_COMP_MASK) { |
988 | case PRID_COMP_LEGACY: | 1004 | case PRID_COMP_LEGACY: |
989 | cpu_probe_legacy(c, cpu); | 1005 | cpu_probe_legacy(c, cpu); |
990 | break; | 1006 | break; |
diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c index 42f8875d2444..f7991d95bff9 100644 --- a/arch/mips/kernel/idle.c +++ b/arch/mips/kernel/idle.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <asm/cpu.h> | 19 | #include <asm/cpu.h> |
20 | #include <asm/cpu-info.h> | 20 | #include <asm/cpu-info.h> |
21 | #include <asm/cpu-type.h> | ||
21 | #include <asm/idle.h> | 22 | #include <asm/idle.h> |
22 | #include <asm/mipsregs.h> | 23 | #include <asm/mipsregs.h> |
23 | 24 | ||
@@ -136,7 +137,7 @@ void __init check_wait(void) | |||
136 | return; | 137 | return; |
137 | } | 138 | } |
138 | 139 | ||
139 | switch (c->cputype) { | 140 | switch (current_cpu_type()) { |
140 | case CPU_R3081: | 141 | case CPU_R3081: |
141 | case CPU_R3081E: | 142 | case CPU_R3081E: |
142 | cpu_wait = r3081_wait; | 143 | cpu_wait = r3081_wait; |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 364d26ae4215..dcb8e5d3bb8a 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/export.h> | 24 | #include <linux/export.h> |
25 | 25 | ||
26 | #include <asm/cpu-features.h> | 26 | #include <asm/cpu-features.h> |
27 | #include <asm/cpu-type.h> | ||
27 | #include <asm/div64.h> | 28 | #include <asm/div64.h> |
28 | #include <asm/smtc_ipi.h> | 29 | #include <asm/smtc_ipi.h> |
29 | #include <asm/time.h> | 30 | #include <asm/time.h> |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index aec3408edd4b..524841f02803 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/break.h> | 39 | #include <asm/break.h> |
40 | #include <asm/cop2.h> | 40 | #include <asm/cop2.h> |
41 | #include <asm/cpu.h> | 41 | #include <asm/cpu.h> |
42 | #include <asm/cpu-type.h> | ||
42 | #include <asm/dsp.h> | 43 | #include <asm/dsp.h> |
43 | #include <asm/fpu.h> | 44 | #include <asm/fpu.h> |
44 | #include <asm/fpu_emulator.h> | 45 | #include <asm/fpu_emulator.h> |
@@ -622,7 +623,7 @@ static int simulate_rdhwr(struct pt_regs *regs, int rd, int rt) | |||
622 | regs->regs[rt] = read_c0_count(); | 623 | regs->regs[rt] = read_c0_count(); |
623 | return 0; | 624 | return 0; |
624 | case 3: /* Count register resolution */ | 625 | case 3: /* Count register resolution */ |
625 | switch (current_cpu_data.cputype) { | 626 | switch (current_cpu_type()) { |
626 | case CPU_20KC: | 627 | case CPU_20KC: |
627 | case CPU_25KF: | 628 | case CPU_25KF: |
628 | regs->regs[rt] = 1; | 629 | regs->regs[rt] = 1; |
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c index 729e7702b1de..c8efdb5b6ee0 100644 --- a/arch/mips/mm/c-octeon.c +++ b/arch/mips/mm/c-octeon.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/bootinfo.h> | 19 | #include <asm/bootinfo.h> |
20 | #include <asm/cacheops.h> | 20 | #include <asm/cacheops.h> |
21 | #include <asm/cpu-features.h> | 21 | #include <asm/cpu-features.h> |
22 | #include <asm/cpu-type.h> | ||
22 | #include <asm/page.h> | 23 | #include <asm/page.h> |
23 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
24 | #include <asm/r4kcache.h> | 25 | #include <asm/r4kcache.h> |
@@ -186,9 +187,10 @@ static void probe_octeon(void) | |||
186 | unsigned long dcache_size; | 187 | unsigned long dcache_size; |
187 | unsigned int config1; | 188 | unsigned int config1; |
188 | struct cpuinfo_mips *c = ¤t_cpu_data; | 189 | struct cpuinfo_mips *c = ¤t_cpu_data; |
190 | int cputype = current_cpu_type(); | ||
189 | 191 | ||
190 | config1 = read_c0_config1(); | 192 | config1 = read_c0_config1(); |
191 | switch (c->cputype) { | 193 | switch (cputype) { |
192 | case CPU_CAVIUM_OCTEON: | 194 | case CPU_CAVIUM_OCTEON: |
193 | case CPU_CAVIUM_OCTEON_PLUS: | 195 | case CPU_CAVIUM_OCTEON_PLUS: |
194 | c->icache.linesz = 2 << ((config1 >> 19) & 7); | 196 | c->icache.linesz = 2 << ((config1 >> 19) & 7); |
@@ -199,7 +201,7 @@ static void probe_octeon(void) | |||
199 | c->icache.sets * c->icache.ways * c->icache.linesz; | 201 | c->icache.sets * c->icache.ways * c->icache.linesz; |
200 | c->icache.waybit = ffs(icache_size / c->icache.ways) - 1; | 202 | c->icache.waybit = ffs(icache_size / c->icache.ways) - 1; |
201 | c->dcache.linesz = 128; | 203 | c->dcache.linesz = 128; |
202 | if (c->cputype == CPU_CAVIUM_OCTEON_PLUS) | 204 | if (cputype == CPU_CAVIUM_OCTEON_PLUS) |
203 | c->dcache.sets = 2; /* CN5XXX has two Dcache sets */ | 205 | c->dcache.sets = 2; /* CN5XXX has two Dcache sets */ |
204 | else | 206 | else |
205 | c->dcache.sets = 1; /* CN3XXX has one Dcache set */ | 207 | c->dcache.sets = 1; /* CN3XXX has one Dcache set */ |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index f749f687ee87..bc6f96fcb529 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/preempt.h> | ||
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
17 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
@@ -24,6 +25,7 @@ | |||
24 | #include <asm/cacheops.h> | 25 | #include <asm/cacheops.h> |
25 | #include <asm/cpu.h> | 26 | #include <asm/cpu.h> |
26 | #include <asm/cpu-features.h> | 27 | #include <asm/cpu-features.h> |
28 | #include <asm/cpu-type.h> | ||
27 | #include <asm/io.h> | 29 | #include <asm/io.h> |
28 | #include <asm/page.h> | 30 | #include <asm/page.h> |
29 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
@@ -601,11 +603,13 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
601 | /* Catch bad driver code */ | 603 | /* Catch bad driver code */ |
602 | BUG_ON(size == 0); | 604 | BUG_ON(size == 0); |
603 | 605 | ||
606 | preempt_disable(); | ||
604 | if (cpu_has_inclusive_pcaches) { | 607 | if (cpu_has_inclusive_pcaches) { |
605 | if (size >= scache_size) | 608 | if (size >= scache_size) |
606 | r4k_blast_scache(); | 609 | r4k_blast_scache(); |
607 | else | 610 | else |
608 | blast_scache_range(addr, addr + size); | 611 | blast_scache_range(addr, addr + size); |
612 | preempt_enable(); | ||
609 | __sync(); | 613 | __sync(); |
610 | return; | 614 | return; |
611 | } | 615 | } |
@@ -621,6 +625,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
621 | R4600_HIT_CACHEOP_WAR_IMPL; | 625 | R4600_HIT_CACHEOP_WAR_IMPL; |
622 | blast_dcache_range(addr, addr + size); | 626 | blast_dcache_range(addr, addr + size); |
623 | } | 627 | } |
628 | preempt_enable(); | ||
624 | 629 | ||
625 | bc_wback_inv(addr, size); | 630 | bc_wback_inv(addr, size); |
626 | __sync(); | 631 | __sync(); |
@@ -631,6 +636,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
631 | /* Catch bad driver code */ | 636 | /* Catch bad driver code */ |
632 | BUG_ON(size == 0); | 637 | BUG_ON(size == 0); |
633 | 638 | ||
639 | preempt_disable(); | ||
634 | if (cpu_has_inclusive_pcaches) { | 640 | if (cpu_has_inclusive_pcaches) { |
635 | if (size >= scache_size) | 641 | if (size >= scache_size) |
636 | r4k_blast_scache(); | 642 | r4k_blast_scache(); |
@@ -645,6 +651,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
645 | */ | 651 | */ |
646 | blast_inv_scache_range(addr, addr + size); | 652 | blast_inv_scache_range(addr, addr + size); |
647 | } | 653 | } |
654 | preempt_enable(); | ||
648 | __sync(); | 655 | __sync(); |
649 | return; | 656 | return; |
650 | } | 657 | } |
@@ -655,6 +662,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
655 | R4600_HIT_CACHEOP_WAR_IMPL; | 662 | R4600_HIT_CACHEOP_WAR_IMPL; |
656 | blast_inv_dcache_range(addr, addr + size); | 663 | blast_inv_dcache_range(addr, addr + size); |
657 | } | 664 | } |
665 | preempt_enable(); | ||
658 | 666 | ||
659 | bc_inv(addr, size); | 667 | bc_inv(addr, size); |
660 | __sync(); | 668 | __sync(); |
@@ -780,20 +788,30 @@ static inline void rm7k_erratum31(void) | |||
780 | 788 | ||
781 | static inline void alias_74k_erratum(struct cpuinfo_mips *c) | 789 | static inline void alias_74k_erratum(struct cpuinfo_mips *c) |
782 | { | 790 | { |
791 | unsigned int imp = c->processor_id & PRID_IMP_MASK; | ||
792 | unsigned int rev = c->processor_id & PRID_REV_MASK; | ||
793 | |||
783 | /* | 794 | /* |
784 | * Early versions of the 74K do not update the cache tags on a | 795 | * Early versions of the 74K do not update the cache tags on a |
785 | * vtag miss/ptag hit which can occur in the case of KSEG0/KUSEG | 796 | * vtag miss/ptag hit which can occur in the case of KSEG0/KUSEG |
786 | * aliases. In this case it is better to treat the cache as always | 797 | * aliases. In this case it is better to treat the cache as always |
787 | * having aliases. | 798 | * having aliases. |
788 | */ | 799 | */ |
789 | if ((c->processor_id & 0xff) <= PRID_REV_ENCODE_332(2, 4, 0)) | 800 | switch (imp) { |
790 | c->dcache.flags |= MIPS_CACHE_VTAG; | 801 | case PRID_IMP_74K: |
791 | if ((c->processor_id & 0xff) == PRID_REV_ENCODE_332(2, 4, 0)) | 802 | if (rev <= PRID_REV_ENCODE_332(2, 4, 0)) |
792 | write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND); | 803 | c->dcache.flags |= MIPS_CACHE_VTAG; |
793 | if (((c->processor_id & 0xff00) == PRID_IMP_1074K) && | 804 | if (rev == PRID_REV_ENCODE_332(2, 4, 0)) |
794 | ((c->processor_id & 0xff) <= PRID_REV_ENCODE_332(1, 1, 0))) { | 805 | write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND); |
795 | c->dcache.flags |= MIPS_CACHE_VTAG; | 806 | break; |
796 | write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND); | 807 | case PRID_IMP_1074K: |
808 | if (rev <= PRID_REV_ENCODE_332(1, 1, 0)) { | ||
809 | c->dcache.flags |= MIPS_CACHE_VTAG; | ||
810 | write_c0_config6(read_c0_config6() | MIPS_CONF6_SYND); | ||
811 | } | ||
812 | break; | ||
813 | default: | ||
814 | BUG(); | ||
797 | } | 815 | } |
798 | } | 816 | } |
799 | 817 | ||
@@ -809,7 +827,7 @@ static void probe_pcache(void) | |||
809 | unsigned long config1; | 827 | unsigned long config1; |
810 | unsigned int lsize; | 828 | unsigned int lsize; |
811 | 829 | ||
812 | switch (c->cputype) { | 830 | switch (current_cpu_type()) { |
813 | case CPU_R4600: /* QED style two way caches? */ | 831 | case CPU_R4600: /* QED style two way caches? */ |
814 | case CPU_R4700: | 832 | case CPU_R4700: |
815 | case CPU_R5000: | 833 | case CPU_R5000: |
@@ -1025,7 +1043,8 @@ static void probe_pcache(void) | |||
1025 | * presumably no vendor is shipping his hardware in the "bad" | 1043 | * presumably no vendor is shipping his hardware in the "bad" |
1026 | * configuration. | 1044 | * configuration. |
1027 | */ | 1045 | */ |
1028 | if ((prid & 0xff00) == PRID_IMP_R4000 && (prid & 0xff) < 0x40 && | 1046 | if ((prid & PRID_IMP_MASK) == PRID_IMP_R4000 && |
1047 | (prid & PRID_REV_MASK) < PRID_REV_R4400 && | ||
1029 | !(config & CONF_SC) && c->icache.linesz != 16 && | 1048 | !(config & CONF_SC) && c->icache.linesz != 16 && |
1030 | PAGE_SIZE <= 0x8000) | 1049 | PAGE_SIZE <= 0x8000) |
1031 | panic("Improper R4000SC processor configuration detected"); | 1050 | panic("Improper R4000SC processor configuration detected"); |
@@ -1045,7 +1064,7 @@ static void probe_pcache(void) | |||
1045 | * normally they'd suffer from aliases but magic in the hardware deals | 1064 | * normally they'd suffer from aliases but magic in the hardware deals |
1046 | * with that for us so we don't need to take care ourselves. | 1065 | * with that for us so we don't need to take care ourselves. |
1047 | */ | 1066 | */ |
1048 | switch (c->cputype) { | 1067 | switch (current_cpu_type()) { |
1049 | case CPU_20KC: | 1068 | case CPU_20KC: |
1050 | case CPU_25KF: | 1069 | case CPU_25KF: |
1051 | case CPU_SB1: | 1070 | case CPU_SB1: |
@@ -1065,7 +1084,7 @@ static void probe_pcache(void) | |||
1065 | case CPU_34K: | 1084 | case CPU_34K: |
1066 | case CPU_74K: | 1085 | case CPU_74K: |
1067 | case CPU_1004K: | 1086 | case CPU_1004K: |
1068 | if (c->cputype == CPU_74K) | 1087 | if (current_cpu_type() == CPU_74K) |
1069 | alias_74k_erratum(c); | 1088 | alias_74k_erratum(c); |
1070 | if ((read_c0_config7() & (1 << 16))) { | 1089 | if ((read_c0_config7() & (1 << 16))) { |
1071 | /* effectively physically indexed dcache, | 1090 | /* effectively physically indexed dcache, |
@@ -1078,7 +1097,7 @@ static void probe_pcache(void) | |||
1078 | c->dcache.flags |= MIPS_CACHE_ALIASES; | 1097 | c->dcache.flags |= MIPS_CACHE_ALIASES; |
1079 | } | 1098 | } |
1080 | 1099 | ||
1081 | switch (c->cputype) { | 1100 | switch (current_cpu_type()) { |
1082 | case CPU_20KC: | 1101 | case CPU_20KC: |
1083 | /* | 1102 | /* |
1084 | * Some older 20Kc chips doesn't have the 'VI' bit in | 1103 | * Some older 20Kc chips doesn't have the 'VI' bit in |
@@ -1207,7 +1226,7 @@ static void setup_scache(void) | |||
1207 | * processors don't have a S-cache that would be relevant to the | 1226 | * processors don't have a S-cache that would be relevant to the |
1208 | * Linux memory management. | 1227 | * Linux memory management. |
1209 | */ | 1228 | */ |
1210 | switch (c->cputype) { | 1229 | switch (current_cpu_type()) { |
1211 | case CPU_R4000SC: | 1230 | case CPU_R4000SC: |
1212 | case CPU_R4000MC: | 1231 | case CPU_R4000MC: |
1213 | case CPU_R4400SC: | 1232 | case CPU_R4400SC: |
@@ -1384,9 +1403,8 @@ static void r4k_cache_error_setup(void) | |||
1384 | { | 1403 | { |
1385 | extern char __weak except_vec2_generic; | 1404 | extern char __weak except_vec2_generic; |
1386 | extern char __weak except_vec2_sb1; | 1405 | extern char __weak except_vec2_sb1; |
1387 | struct cpuinfo_mips *c = ¤t_cpu_data; | ||
1388 | 1406 | ||
1389 | switch (c->cputype) { | 1407 | switch (current_cpu_type()) { |
1390 | case CPU_SB1: | 1408 | case CPU_SB1: |
1391 | case CPU_SB1A: | 1409 | case CPU_SB1A: |
1392 | set_uncached_handler(0x100, &except_vec2_sb1, 0x80); | 1410 | set_uncached_handler(0x100, &except_vec2_sb1, 0x80); |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 664e523653d0..5f8b95512580 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/highmem.h> | 18 | #include <linux/highmem.h> |
19 | 19 | ||
20 | #include <asm/cache.h> | 20 | #include <asm/cache.h> |
21 | #include <asm/cpu-type.h> | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | 23 | ||
23 | #include <dma-coherence.h> | 24 | #include <dma-coherence.h> |
@@ -307,12 +308,10 @@ static void mips_dma_sync_sg_for_cpu(struct device *dev, | |||
307 | { | 308 | { |
308 | int i; | 309 | int i; |
309 | 310 | ||
310 | /* Make sure that gcc doesn't leave the empty loop body. */ | 311 | if (cpu_needs_post_dma_flush(dev)) |
311 | for (i = 0; i < nelems; i++, sg++) { | 312 | for (i = 0; i < nelems; i++, sg++) |
312 | if (cpu_needs_post_dma_flush(dev)) | ||
313 | __dma_sync(sg_page(sg), sg->offset, sg->length, | 313 | __dma_sync(sg_page(sg), sg->offset, sg->length, |
314 | direction); | 314 | direction); |
315 | } | ||
316 | } | 315 | } |
317 | 316 | ||
318 | static void mips_dma_sync_sg_for_device(struct device *dev, | 317 | static void mips_dma_sync_sg_for_device(struct device *dev, |
@@ -320,12 +319,10 @@ static void mips_dma_sync_sg_for_device(struct device *dev, | |||
320 | { | 319 | { |
321 | int i; | 320 | int i; |
322 | 321 | ||
323 | /* Make sure that gcc doesn't leave the empty loop body. */ | 322 | if (!plat_device_is_coherent(dev)) |
324 | for (i = 0; i < nelems; i++, sg++) { | 323 | for (i = 0; i < nelems; i++, sg++) |
325 | if (!plat_device_is_coherent(dev)) | ||
326 | __dma_sync(sg_page(sg), sg->offset, sg->length, | 324 | __dma_sync(sg_page(sg), sg->offset, sg->length, |
327 | direction); | 325 | direction); |
328 | } | ||
329 | } | 326 | } |
330 | 327 | ||
331 | int mips_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | 328 | int mips_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
diff --git a/arch/mips/mm/page.c b/arch/mips/mm/page.c index 218c2109a55d..cbd81d17793a 100644 --- a/arch/mips/mm/page.c +++ b/arch/mips/mm/page.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <asm/bugs.h> | 19 | #include <asm/bugs.h> |
20 | #include <asm/cacheops.h> | 20 | #include <asm/cacheops.h> |
21 | #include <asm/cpu-type.h> | ||
21 | #include <asm/inst.h> | 22 | #include <asm/inst.h> |
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c index 5d01392e3518..08d05aee8788 100644 --- a/arch/mips/mm/sc-mips.c +++ b/arch/mips/mm/sc-mips.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
8 | 8 | ||
9 | #include <asm/cpu-type.h> | ||
9 | #include <asm/mipsregs.h> | 10 | #include <asm/mipsregs.h> |
10 | #include <asm/bcache.h> | 11 | #include <asm/bcache.h> |
11 | #include <asm/cacheops.h> | 12 | #include <asm/cacheops.h> |
@@ -71,7 +72,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c) | |||
71 | unsigned int tmp; | 72 | unsigned int tmp; |
72 | 73 | ||
73 | /* Check the bypass bit (L2B) */ | 74 | /* Check the bypass bit (L2B) */ |
74 | switch (c->cputype) { | 75 | switch (current_cpu_type()) { |
75 | case CPU_34K: | 76 | case CPU_34K: |
76 | case CPU_74K: | 77 | case CPU_74K: |
77 | case CPU_1004K: | 78 | case CPU_1004K: |
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 00b26a67a06d..bb3a5f643e97 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | 17 | ||
18 | #include <asm/cpu.h> | 18 | #include <asm/cpu.h> |
19 | #include <asm/cpu-type.h> | ||
19 | #include <asm/bootinfo.h> | 20 | #include <asm/bootinfo.h> |
20 | #include <asm/mmu_context.h> | 21 | #include <asm/mmu_context.h> |
21 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 821b45175dc1..9bb3a9363b06 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/cache.h> | 30 | #include <linux/cache.h> |
31 | 31 | ||
32 | #include <asm/cacheflush.h> | 32 | #include <asm/cacheflush.h> |
33 | #include <asm/cpu-type.h> | ||
33 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
34 | #include <asm/war.h> | 35 | #include <asm/war.h> |
35 | #include <asm/uasm.h> | 36 | #include <asm/uasm.h> |
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c index 53aad4a35375..a18af5fce67e 100644 --- a/arch/mips/mti-malta/malta-time.c +++ b/arch/mips/mti-malta/malta-time.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/timex.h> | 27 | #include <linux/timex.h> |
28 | #include <linux/mc146818rtc.h> | 28 | #include <linux/mc146818rtc.h> |
29 | 29 | ||
30 | #include <asm/cpu.h> | ||
30 | #include <asm/mipsregs.h> | 31 | #include <asm/mipsregs.h> |
31 | #include <asm/mipsmtregs.h> | 32 | #include <asm/mipsmtregs.h> |
32 | #include <asm/hardirq.h> | 33 | #include <asm/hardirq.h> |
@@ -76,7 +77,7 @@ static void __init estimate_frequencies(void) | |||
76 | #endif | 77 | #endif |
77 | 78 | ||
78 | #if defined (CONFIG_KVM_GUEST) && defined (CONFIG_KVM_HOST_FREQ) | 79 | #if defined (CONFIG_KVM_GUEST) && defined (CONFIG_KVM_HOST_FREQ) |
79 | unsigned int prid = read_c0_prid() & 0xffff00; | 80 | unsigned int prid = read_c0_prid() & (PRID_COMP_MASK | PRID_IMP_MASK); |
80 | 81 | ||
81 | /* | 82 | /* |
82 | * XXXKYMA: hardwire the CPU frequency to Host Freq/4 | 83 | * XXXKYMA: hardwire the CPU frequency to Host Freq/4 |
@@ -169,7 +170,7 @@ unsigned int get_c0_compare_int(void) | |||
169 | 170 | ||
170 | void __init plat_time_init(void) | 171 | void __init plat_time_init(void) |
171 | { | 172 | { |
172 | unsigned int prid = read_c0_prid() & 0xffff00; | 173 | unsigned int prid = read_c0_prid() & (PRID_COMP_MASK | PRID_IMP_MASK); |
173 | unsigned int freq; | 174 | unsigned int freq; |
174 | 175 | ||
175 | estimate_frequencies(); | 176 | estimate_frequencies(); |
diff --git a/arch/mips/mti-sead3/sead3-time.c b/arch/mips/mti-sead3/sead3-time.c index a43ea3cc0a3b..552d26c34386 100644 --- a/arch/mips/mti-sead3/sead3-time.c +++ b/arch/mips/mti-sead3/sead3-time.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | 9 | ||
10 | #include <asm/cpu.h> | ||
10 | #include <asm/setup.h> | 11 | #include <asm/setup.h> |
11 | #include <asm/time.h> | 12 | #include <asm/time.h> |
12 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
@@ -34,7 +35,7 @@ static void __iomem *status_reg = (void __iomem *)0xbf000410; | |||
34 | */ | 35 | */ |
35 | static unsigned int __init estimate_cpu_frequency(void) | 36 | static unsigned int __init estimate_cpu_frequency(void) |
36 | { | 37 | { |
37 | unsigned int prid = read_c0_prid() & 0xffff00; | 38 | unsigned int prid = read_c0_prid() & (PRID_COMP_MASK | PRID_IMP_MASK); |
38 | unsigned int tick = 0; | 39 | unsigned int tick = 0; |
39 | unsigned int freq; | 40 | unsigned int freq; |
40 | unsigned int orig; | 41 | unsigned int orig; |
diff --git a/arch/mips/netlogic/xlr/fmn-config.c b/arch/mips/netlogic/xlr/fmn-config.c index ed3bf0e3f309..c7622c6e5f67 100644 --- a/arch/mips/netlogic/xlr/fmn-config.c +++ b/arch/mips/netlogic/xlr/fmn-config.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/irq.h> | 36 | #include <linux/irq.h> |
37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
38 | 38 | ||
39 | #include <asm/cpu.h> | ||
39 | #include <asm/mipsregs.h> | 40 | #include <asm/mipsregs.h> |
40 | #include <asm/netlogic/xlr/fmn.h> | 41 | #include <asm/netlogic/xlr/fmn.h> |
41 | #include <asm/netlogic/xlr/xlr.h> | 42 | #include <asm/netlogic/xlr/xlr.h> |
@@ -187,7 +188,7 @@ void xlr_board_info_setup(void) | |||
187 | int processor_id, num_core; | 188 | int processor_id, num_core; |
188 | 189 | ||
189 | num_core = hweight32(nlm_current_node()->coremask); | 190 | num_core = hweight32(nlm_current_node()->coremask); |
190 | processor_id = read_c0_prid() & 0xff00; | 191 | processor_id = read_c0_prid() & PRID_IMP_MASK; |
191 | 192 | ||
192 | setup_cpu_fmninfo(cpu, num_core); | 193 | setup_cpu_fmninfo(cpu, num_core); |
193 | switch (processor_id) { | 194 | switch (processor_id) { |
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index 5e5424753b56..4d1736fc1955 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/oprofile.h> | 12 | #include <linux/oprofile.h> |
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <asm/cpu-info.h> | 14 | #include <asm/cpu-info.h> |
15 | #include <asm/cpu-type.h> | ||
15 | 16 | ||
16 | #include "op_impl.h" | 17 | #include "op_impl.h" |
17 | 18 | ||
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c index 44dd5aa2e36f..5ec2a7bae02c 100644 --- a/arch/mips/pci/pci-bcm1480.c +++ b/arch/mips/pci/pci-bcm1480.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/mm.h> | 39 | #include <linux/mm.h> |
40 | #include <linux/console.h> | 40 | #include <linux/console.h> |
41 | #include <linux/tty.h> | 41 | #include <linux/tty.h> |
42 | #include <linux/vt.h> | ||
42 | 43 | ||
43 | #include <asm/sibyte/bcm1480_regs.h> | 44 | #include <asm/sibyte/bcm1480_regs.h> |
44 | #include <asm/sibyte/bcm1480_scd.h> | 45 | #include <asm/sibyte/bcm1480_scd.h> |
diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c index 05ed92c92b69..8e2e04f77870 100644 --- a/arch/mips/sibyte/bcm1480/setup.c +++ b/arch/mips/sibyte/bcm1480/setup.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | 23 | ||
24 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
25 | #include <asm/cpu.h> | ||
25 | #include <asm/mipsregs.h> | 26 | #include <asm/mipsregs.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <asm/sibyte/sb1250.h> | 28 | #include <asm/sibyte/sb1250.h> |
@@ -119,7 +120,7 @@ void __init bcm1480_setup(void) | |||
119 | uint64_t sys_rev; | 120 | uint64_t sys_rev; |
120 | int plldiv; | 121 | int plldiv; |
121 | 122 | ||
122 | sb1_pass = read_c0_prid() & 0xff; | 123 | sb1_pass = read_c0_prid() & PRID_REV_MASK; |
123 | sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION)); | 124 | sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION)); |
124 | soc_type = SYS_SOC_TYPE(sys_rev); | 125 | soc_type = SYS_SOC_TYPE(sys_rev); |
125 | part_type = G_SYS_PART(sys_rev); | 126 | part_type = G_SYS_PART(sys_rev); |
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index a14bd4cb0bc0..3c02b2a77ae9 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | 23 | ||
24 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
25 | #include <asm/cpu.h> | ||
25 | #include <asm/mipsregs.h> | 26 | #include <asm/mipsregs.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <asm/sibyte/sb1250.h> | 28 | #include <asm/sibyte/sb1250.h> |
@@ -182,7 +183,7 @@ void __init sb1250_setup(void) | |||
182 | int plldiv; | 183 | int plldiv; |
183 | int bad_config = 0; | 184 | int bad_config = 0; |
184 | 185 | ||
185 | sb1_pass = read_c0_prid() & 0xff; | 186 | sb1_pass = read_c0_prid() & PRID_REV_MASK; |
186 | sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION)); | 187 | sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION)); |
187 | soc_type = SYS_SOC_TYPE(sys_rev); | 188 | soc_type = SYS_SOC_TYPE(sys_rev); |
188 | soc_pass = G_SYS_REVISION(sys_rev); | 189 | soc_pass = G_SYS_REVISION(sys_rev); |
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index 5b09b3544edd..efad85c8c823 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include <asm/bootinfo.h> | 27 | #include <asm/bootinfo.h> |
28 | #include <asm/cpu.h> | ||
28 | #include <asm/io.h> | 29 | #include <asm/io.h> |
29 | #include <asm/reboot.h> | 30 | #include <asm/reboot.h> |
30 | #include <asm/sni.h> | 31 | #include <asm/sni.h> |
@@ -173,7 +174,7 @@ void __init plat_mem_setup(void) | |||
173 | system_type = "RM300-Cxx"; | 174 | system_type = "RM300-Cxx"; |
174 | break; | 175 | break; |
175 | case SNI_BRD_PCI_DESKTOP: | 176 | case SNI_BRD_PCI_DESKTOP: |
176 | switch (read_c0_prid() & 0xff00) { | 177 | switch (read_c0_prid() & PRID_IMP_MASK) { |
177 | case PRID_IMP_R4600: | 178 | case PRID_IMP_R4600: |
178 | case PRID_IMP_R4700: | 179 | case PRID_IMP_R4700: |
179 | system_type = "RM200-C20"; | 180 | system_type = "RM200-C20"; |
diff --git a/arch/openrisc/include/asm/prom.h b/arch/openrisc/include/asm/prom.h index eb59bfe23e85..93c9980e1b6b 100644 --- a/arch/openrisc/include/asm/prom.h +++ b/arch/openrisc/include/asm/prom.h | |||
@@ -14,53 +14,9 @@ | |||
14 | * the Free Software Foundation; either version 2 of the License, or | 14 | * the Free Software Foundation; either version 2 of the License, or |
15 | * (at your option) any later version. | 15 | * (at your option) any later version. |
16 | */ | 16 | */ |
17 | |||
18 | #include <linux/of.h> /* linux/of.h gets to determine #include ordering */ | ||
19 | |||
20 | #ifndef _ASM_OPENRISC_PROM_H | 17 | #ifndef _ASM_OPENRISC_PROM_H |
21 | #define _ASM_OPENRISC_PROM_H | 18 | #define _ASM_OPENRISC_PROM_H |
22 | #ifdef __KERNEL__ | ||
23 | #ifndef __ASSEMBLY__ | ||
24 | 19 | ||
25 | #include <linux/types.h> | ||
26 | #include <asm/irq.h> | ||
27 | #include <linux/irqdomain.h> | ||
28 | #include <linux/atomic.h> | ||
29 | #include <linux/of_irq.h> | ||
30 | #include <linux/of_fdt.h> | ||
31 | #include <linux/of_address.h> | ||
32 | #include <linux/proc_fs.h> | ||
33 | #include <linux/platform_device.h> | ||
34 | #define HAVE_ARCH_DEVTREE_FIXUPS | 20 | #define HAVE_ARCH_DEVTREE_FIXUPS |
35 | 21 | ||
36 | /* Other Prototypes */ | ||
37 | extern int early_uartlite_console(void); | ||
38 | |||
39 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and | ||
40 | * size parameters. | ||
41 | */ | ||
42 | void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop, | ||
43 | unsigned long *busno, unsigned long *phys, unsigned long *size); | ||
44 | |||
45 | extern void kdump_move_device_tree(void); | ||
46 | |||
47 | /* Get the MAC address */ | ||
48 | extern const void *of_get_mac_address(struct device_node *np); | ||
49 | |||
50 | /** | ||
51 | * of_irq_map_pci - Resolve the interrupt for a PCI device | ||
52 | * @pdev: the device whose interrupt is to be resolved | ||
53 | * @out_irq: structure of_irq filled by this function | ||
54 | * | ||
55 | * This function resolves the PCI interrupt for a given PCI device. If a | ||
56 | * device-node exists for a given pci_dev, it will use normal OF tree | ||
57 | * walking. If not, it will implement standard swizzling and walk up the | ||
58 | * PCI tree until an device-node is found, at which point it will finish | ||
59 | * resolving using the OF tree walking. | ||
60 | */ | ||
61 | struct pci_dev; | ||
62 | extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); | ||
63 | |||
64 | #endif /* __ASSEMBLY__ */ | ||
65 | #endif /* __KERNEL__ */ | ||
66 | #endif /* _ASM_OPENRISC_PROM_H */ | 22 | #endif /* _ASM_OPENRISC_PROM_H */ |
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index d10d27a720c0..00c0ed333a3d 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c | |||
@@ -182,6 +182,9 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, | |||
182 | 182 | ||
183 | if (user_mode(regs)) | 183 | if (user_mode(regs)) |
184 | flags |= FAULT_FLAG_USER; | 184 | flags |= FAULT_FLAG_USER; |
185 | |||
186 | acc_type = parisc_acctyp(code, regs->iir); | ||
187 | |||
185 | if (acc_type & VM_WRITE) | 188 | if (acc_type & VM_WRITE) |
186 | flags |= FAULT_FLAG_WRITE; | 189 | flags |= FAULT_FLAG_WRITE; |
187 | retry: | 190 | retry: |
@@ -196,8 +199,6 @@ retry: | |||
196 | 199 | ||
197 | good_area: | 200 | good_area: |
198 | 201 | ||
199 | acc_type = parisc_acctyp(code,regs->iir); | ||
200 | |||
201 | if ((vma->vm_flags & acc_type) != acc_type) | 202 | if ((vma->vm_flags & acc_type) != acc_type) |
202 | goto bad_area; | 203 | goto bad_area; |
203 | 204 | ||
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 6a15c968d214..15ca2255f438 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -74,7 +74,7 @@ src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c | |||
74 | src-wlib-$(CONFIG_PPC_82xx) += pq2.c fsl-soc.c planetcore.c | 74 | src-wlib-$(CONFIG_PPC_82xx) += pq2.c fsl-soc.c planetcore.c |
75 | src-wlib-$(CONFIG_EMBEDDED6xx) += mv64x60.c mv64x60_i2c.c ugecon.c | 75 | src-wlib-$(CONFIG_EMBEDDED6xx) += mv64x60.c mv64x60_i2c.c ugecon.c |
76 | 76 | ||
77 | src-plat-y := of.c | 77 | src-plat-y := of.c epapr.c |
78 | src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c \ | 78 | src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c \ |
79 | treeboot-walnut.c cuboot-acadia.c \ | 79 | treeboot-walnut.c cuboot-acadia.c \ |
80 | cuboot-kilauea.c simpleboot.c \ | 80 | cuboot-kilauea.c simpleboot.c \ |
@@ -97,7 +97,7 @@ src-plat-$(CONFIG_EMBEDDED6xx) += cuboot-pq2.c cuboot-mpc7448hpc2.c \ | |||
97 | prpmc2800.c | 97 | prpmc2800.c |
98 | src-plat-$(CONFIG_AMIGAONE) += cuboot-amigaone.c | 98 | src-plat-$(CONFIG_AMIGAONE) += cuboot-amigaone.c |
99 | src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c | 99 | src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c |
100 | src-plat-$(CONFIG_EPAPR_BOOT) += epapr.c | 100 | src-plat-$(CONFIG_EPAPR_BOOT) += epapr.c epapr-wrapper.c |
101 | 101 | ||
102 | src-wlib := $(sort $(src-wlib-y)) | 102 | src-wlib := $(sort $(src-wlib-y)) |
103 | src-plat := $(sort $(src-plat-y)) | 103 | src-plat := $(sort $(src-plat-y)) |
diff --git a/arch/powerpc/boot/epapr-wrapper.c b/arch/powerpc/boot/epapr-wrapper.c new file mode 100644 index 000000000000..c10191006673 --- /dev/null +++ b/arch/powerpc/boot/epapr-wrapper.c | |||
@@ -0,0 +1,9 @@ | |||
1 | extern void epapr_platform_init(unsigned long r3, unsigned long r4, | ||
2 | unsigned long r5, unsigned long r6, | ||
3 | unsigned long r7); | ||
4 | |||
5 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
6 | unsigned long r6, unsigned long r7) | ||
7 | { | ||
8 | epapr_platform_init(r3, r4, r5, r6, r7); | ||
9 | } | ||
diff --git a/arch/powerpc/boot/epapr.c b/arch/powerpc/boot/epapr.c index 06c1961bd124..02e91aa2194a 100644 --- a/arch/powerpc/boot/epapr.c +++ b/arch/powerpc/boot/epapr.c | |||
@@ -48,8 +48,8 @@ static void platform_fixups(void) | |||
48 | fdt_addr, fdt_totalsize((void *)fdt_addr), ima_size); | 48 | fdt_addr, fdt_totalsize((void *)fdt_addr), ima_size); |
49 | } | 49 | } |
50 | 50 | ||
51 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | 51 | void epapr_platform_init(unsigned long r3, unsigned long r4, unsigned long r5, |
52 | unsigned long r6, unsigned long r7) | 52 | unsigned long r6, unsigned long r7) |
53 | { | 53 | { |
54 | epapr_magic = r6; | 54 | epapr_magic = r6; |
55 | ima_size = r7; | 55 | ima_size = r7; |
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c index 61d9899aa0d0..62e2f43ec1df 100644 --- a/arch/powerpc/boot/of.c +++ b/arch/powerpc/boot/of.c | |||
@@ -26,6 +26,9 @@ | |||
26 | 26 | ||
27 | static unsigned long claim_base; | 27 | static unsigned long claim_base; |
28 | 28 | ||
29 | void epapr_platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
30 | unsigned long r6, unsigned long r7); | ||
31 | |||
29 | static void *of_try_claim(unsigned long size) | 32 | static void *of_try_claim(unsigned long size) |
30 | { | 33 | { |
31 | unsigned long addr = 0; | 34 | unsigned long addr = 0; |
@@ -61,7 +64,7 @@ static void of_image_hdr(const void *hdr) | |||
61 | } | 64 | } |
62 | } | 65 | } |
63 | 66 | ||
64 | void platform_init(unsigned long a1, unsigned long a2, void *promptr) | 67 | static void of_platform_init(unsigned long a1, unsigned long a2, void *promptr) |
65 | { | 68 | { |
66 | platform_ops.image_hdr = of_image_hdr; | 69 | platform_ops.image_hdr = of_image_hdr; |
67 | platform_ops.malloc = of_try_claim; | 70 | platform_ops.malloc = of_try_claim; |
@@ -81,3 +84,14 @@ void platform_init(unsigned long a1, unsigned long a2, void *promptr) | |||
81 | loader_info.initrd_size = a2; | 84 | loader_info.initrd_size = a2; |
82 | } | 85 | } |
83 | } | 86 | } |
87 | |||
88 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
89 | unsigned long r6, unsigned long r7) | ||
90 | { | ||
91 | /* Detect OF vs. ePAPR boot */ | ||
92 | if (r5) | ||
93 | of_platform_init(r3, r4, (void *)r5); | ||
94 | else | ||
95 | epapr_platform_init(r3, r4, r5, r6, r7); | ||
96 | } | ||
97 | |||
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 6761c746048d..cd7af841ba05 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -148,18 +148,18 @@ make_space=y | |||
148 | 148 | ||
149 | case "$platform" in | 149 | case "$platform" in |
150 | pseries) | 150 | pseries) |
151 | platformo=$object/of.o | 151 | platformo="$object/of.o $object/epapr.o" |
152 | link_address='0x4000000' | 152 | link_address='0x4000000' |
153 | ;; | 153 | ;; |
154 | maple) | 154 | maple) |
155 | platformo=$object/of.o | 155 | platformo="$object/of.o $object/epapr.o" |
156 | link_address='0x400000' | 156 | link_address='0x400000' |
157 | ;; | 157 | ;; |
158 | pmac|chrp) | 158 | pmac|chrp) |
159 | platformo=$object/of.o | 159 | platformo="$object/of.o $object/epapr.o" |
160 | ;; | 160 | ;; |
161 | coff) | 161 | coff) |
162 | platformo="$object/crt0.o $object/of.o" | 162 | platformo="$object/crt0.o $object/of.o $object/epapr.o" |
163 | lds=$object/zImage.coff.lds | 163 | lds=$object/zImage.coff.lds |
164 | link_address='0x500000' | 164 | link_address='0x500000' |
165 | pie= | 165 | pie= |
@@ -253,6 +253,7 @@ treeboot-iss4xx-mpic) | |||
253 | platformo="$object/treeboot-iss4xx.o" | 253 | platformo="$object/treeboot-iss4xx.o" |
254 | ;; | 254 | ;; |
255 | epapr) | 255 | epapr) |
256 | platformo="$object/epapr.o $object/epapr-wrapper.o" | ||
256 | link_address='0x20000000' | 257 | link_address='0x20000000' |
257 | pie=-pie | 258 | pie=-pie |
258 | ;; | 259 | ;; |
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index 0e40843a1c6e..41f13cec8a8f 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h | |||
@@ -69,9 +69,9 @@ extern struct thread_info *softirq_ctx[NR_CPUS]; | |||
69 | 69 | ||
70 | extern void irq_ctx_init(void); | 70 | extern void irq_ctx_init(void); |
71 | extern void call_do_softirq(struct thread_info *tp); | 71 | extern void call_do_softirq(struct thread_info *tp); |
72 | extern int call_handle_irq(int irq, void *p1, | 72 | extern void call_do_irq(struct pt_regs *regs, struct thread_info *tp); |
73 | struct thread_info *tp, void *func); | ||
74 | extern void do_IRQ(struct pt_regs *regs); | 73 | extern void do_IRQ(struct pt_regs *regs); |
74 | extern void __do_irq(struct pt_regs *regs); | ||
75 | 75 | ||
76 | int irq_choose_cpu(const struct cpumask *mask); | 76 | int irq_choose_cpu(const struct cpumask *mask); |
77 | 77 | ||
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index e378cccfca55..ce4de5aed7b5 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -149,8 +149,6 @@ typedef struct { | |||
149 | 149 | ||
150 | struct thread_struct { | 150 | struct thread_struct { |
151 | unsigned long ksp; /* Kernel stack pointer */ | 151 | unsigned long ksp; /* Kernel stack pointer */ |
152 | unsigned long ksp_limit; /* if ksp <= ksp_limit stack overflow */ | ||
153 | |||
154 | #ifdef CONFIG_PPC64 | 152 | #ifdef CONFIG_PPC64 |
155 | unsigned long ksp_vsid; | 153 | unsigned long ksp_vsid; |
156 | #endif | 154 | #endif |
@@ -162,6 +160,7 @@ struct thread_struct { | |||
162 | #endif | 160 | #endif |
163 | #ifdef CONFIG_PPC32 | 161 | #ifdef CONFIG_PPC32 |
164 | void *pgdir; /* root of page-table tree */ | 162 | void *pgdir; /* root of page-table tree */ |
163 | unsigned long ksp_limit; /* if ksp <= ksp_limit stack overflow */ | ||
165 | #endif | 164 | #endif |
166 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | 165 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS |
167 | /* | 166 | /* |
@@ -321,7 +320,6 @@ struct thread_struct { | |||
321 | #else | 320 | #else |
322 | #define INIT_THREAD { \ | 321 | #define INIT_THREAD { \ |
323 | .ksp = INIT_SP, \ | 322 | .ksp = INIT_SP, \ |
324 | .ksp_limit = INIT_SP_LIMIT, \ | ||
325 | .regs = (struct pt_regs *)INIT_SP - 1, /* XXX bogus, I think */ \ | 323 | .regs = (struct pt_regs *)INIT_SP - 1, /* XXX bogus, I think */ \ |
326 | .fs = KERNEL_DS, \ | 324 | .fs = KERNEL_DS, \ |
327 | .fpr = {{0}}, \ | 325 | .fpr = {{0}}, \ |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index d8958be5f31a..502c7a4e73f7 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -80,10 +80,11 @@ int main(void) | |||
80 | DEFINE(TASKTHREADPPR, offsetof(struct task_struct, thread.ppr)); | 80 | DEFINE(TASKTHREADPPR, offsetof(struct task_struct, thread.ppr)); |
81 | #else | 81 | #else |
82 | DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); | 82 | DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); |
83 | DEFINE(THREAD_INFO_GAP, _ALIGN_UP(sizeof(struct thread_info), 16)); | ||
84 | DEFINE(KSP_LIMIT, offsetof(struct thread_struct, ksp_limit)); | ||
83 | #endif /* CONFIG_PPC64 */ | 85 | #endif /* CONFIG_PPC64 */ |
84 | 86 | ||
85 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); | 87 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); |
86 | DEFINE(KSP_LIMIT, offsetof(struct thread_struct, ksp_limit)); | ||
87 | DEFINE(PT_REGS, offsetof(struct thread_struct, regs)); | 88 | DEFINE(PT_REGS, offsetof(struct thread_struct, regs)); |
88 | #ifdef CONFIG_BOOKE | 89 | #ifdef CONFIG_BOOKE |
89 | DEFINE(THREAD_NORMSAVES, offsetof(struct thread_struct, normsave[0])); | 90 | DEFINE(THREAD_NORMSAVES, offsetof(struct thread_struct, normsave[0])); |
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 c69440cef7af..57d286a78f86 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -441,50 +441,6 @@ void migrate_irqs(void) | |||
441 | } | 441 | } |
442 | #endif | 442 | #endif |
443 | 443 | ||
444 | static inline void handle_one_irq(unsigned int irq) | ||
445 | { | ||
446 | struct thread_info *curtp, *irqtp; | ||
447 | unsigned long saved_sp_limit; | ||
448 | struct irq_desc *desc; | ||
449 | |||
450 | desc = irq_to_desc(irq); | ||
451 | if (!desc) | ||
452 | return; | ||
453 | |||
454 | /* Switch to the irq stack to handle this */ | ||
455 | curtp = current_thread_info(); | ||
456 | irqtp = hardirq_ctx[smp_processor_id()]; | ||
457 | |||
458 | if (curtp == irqtp) { | ||
459 | /* We're already on the irq stack, just handle it */ | ||
460 | desc->handle_irq(irq, desc); | ||
461 | return; | ||
462 | } | ||
463 | |||
464 | saved_sp_limit = current->thread.ksp_limit; | ||
465 | |||
466 | irqtp->task = curtp->task; | ||
467 | irqtp->flags = 0; | ||
468 | |||
469 | /* Copy the softirq bits in preempt_count so that the | ||
470 | * softirq checks work in the hardirq context. */ | ||
471 | irqtp->preempt_count = (irqtp->preempt_count & ~SOFTIRQ_MASK) | | ||
472 | (curtp->preempt_count & SOFTIRQ_MASK); | ||
473 | |||
474 | current->thread.ksp_limit = (unsigned long)irqtp + | ||
475 | _ALIGN_UP(sizeof(struct thread_info), 16); | ||
476 | |||
477 | call_handle_irq(irq, desc, irqtp, desc->handle_irq); | ||
478 | current->thread.ksp_limit = saved_sp_limit; | ||
479 | irqtp->task = NULL; | ||
480 | |||
481 | /* Set any flag that may have been set on the | ||
482 | * alternate stack | ||
483 | */ | ||
484 | if (irqtp->flags) | ||
485 | set_bits(irqtp->flags, &curtp->flags); | ||
486 | } | ||
487 | |||
488 | static inline void check_stack_overflow(void) | 444 | static inline void check_stack_overflow(void) |
489 | { | 445 | { |
490 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 446 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
@@ -501,9 +457,9 @@ static inline void check_stack_overflow(void) | |||
501 | #endif | 457 | #endif |
502 | } | 458 | } |
503 | 459 | ||
504 | void do_IRQ(struct pt_regs *regs) | 460 | void __do_irq(struct pt_regs *regs) |
505 | { | 461 | { |
506 | struct pt_regs *old_regs = set_irq_regs(regs); | 462 | struct irq_desc *desc; |
507 | unsigned int irq; | 463 | unsigned int irq; |
508 | 464 | ||
509 | irq_enter(); | 465 | irq_enter(); |
@@ -519,18 +475,56 @@ void do_IRQ(struct pt_regs *regs) | |||
519 | */ | 475 | */ |
520 | irq = ppc_md.get_irq(); | 476 | irq = ppc_md.get_irq(); |
521 | 477 | ||
522 | /* We can hard enable interrupts now */ | 478 | /* We can hard enable interrupts now to allow perf interrupts */ |
523 | may_hard_irq_enable(); | 479 | may_hard_irq_enable(); |
524 | 480 | ||
525 | /* And finally process it */ | 481 | /* And finally process it */ |
526 | if (irq != NO_IRQ) | 482 | if (unlikely(irq == NO_IRQ)) |
527 | handle_one_irq(irq); | ||
528 | else | ||
529 | __get_cpu_var(irq_stat).spurious_irqs++; | 483 | __get_cpu_var(irq_stat).spurious_irqs++; |
484 | else { | ||
485 | desc = irq_to_desc(irq); | ||
486 | if (likely(desc)) | ||
487 | desc->handle_irq(irq, desc); | ||
488 | } | ||
530 | 489 | ||
531 | trace_irq_exit(regs); | 490 | trace_irq_exit(regs); |
532 | 491 | ||
533 | irq_exit(); | 492 | irq_exit(); |
493 | } | ||
494 | |||
495 | void do_IRQ(struct pt_regs *regs) | ||
496 | { | ||
497 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
498 | struct thread_info *curtp, *irqtp; | ||
499 | |||
500 | /* Switch to the irq stack to handle this */ | ||
501 | curtp = current_thread_info(); | ||
502 | irqtp = hardirq_ctx[raw_smp_processor_id()]; | ||
503 | |||
504 | /* Already there ? */ | ||
505 | if (unlikely(curtp == irqtp)) { | ||
506 | __do_irq(regs); | ||
507 | set_irq_regs(old_regs); | ||
508 | return; | ||
509 | } | ||
510 | |||
511 | /* Prepare the thread_info in the irq stack */ | ||
512 | irqtp->task = curtp->task; | ||
513 | irqtp->flags = 0; | ||
514 | |||
515 | /* Copy the preempt_count so that the [soft]irq checks work. */ | ||
516 | irqtp->preempt_count = curtp->preempt_count; | ||
517 | |||
518 | /* Switch stack and call */ | ||
519 | call_do_irq(regs, irqtp); | ||
520 | |||
521 | /* Restore stack limit */ | ||
522 | irqtp->task = NULL; | ||
523 | |||
524 | /* Copy back updates to the thread_info */ | ||
525 | if (irqtp->flags) | ||
526 | set_bits(irqtp->flags, &curtp->flags); | ||
527 | |||
534 | set_irq_regs(old_regs); | 528 | set_irq_regs(old_regs); |
535 | } | 529 | } |
536 | 530 | ||
@@ -592,28 +586,22 @@ void irq_ctx_init(void) | |||
592 | memset((void *)softirq_ctx[i], 0, THREAD_SIZE); | 586 | memset((void *)softirq_ctx[i], 0, THREAD_SIZE); |
593 | tp = softirq_ctx[i]; | 587 | tp = softirq_ctx[i]; |
594 | tp->cpu = i; | 588 | tp->cpu = i; |
595 | tp->preempt_count = 0; | ||
596 | 589 | ||
597 | memset((void *)hardirq_ctx[i], 0, THREAD_SIZE); | 590 | memset((void *)hardirq_ctx[i], 0, THREAD_SIZE); |
598 | tp = hardirq_ctx[i]; | 591 | tp = hardirq_ctx[i]; |
599 | tp->cpu = i; | 592 | tp->cpu = i; |
600 | tp->preempt_count = HARDIRQ_OFFSET; | ||
601 | } | 593 | } |
602 | } | 594 | } |
603 | 595 | ||
604 | static inline void do_softirq_onstack(void) | 596 | static inline void do_softirq_onstack(void) |
605 | { | 597 | { |
606 | struct thread_info *curtp, *irqtp; | 598 | struct thread_info *curtp, *irqtp; |
607 | unsigned long saved_sp_limit = current->thread.ksp_limit; | ||
608 | 599 | ||
609 | curtp = current_thread_info(); | 600 | curtp = current_thread_info(); |
610 | irqtp = softirq_ctx[smp_processor_id()]; | 601 | irqtp = softirq_ctx[smp_processor_id()]; |
611 | irqtp->task = curtp->task; | 602 | irqtp->task = curtp->task; |
612 | irqtp->flags = 0; | 603 | irqtp->flags = 0; |
613 | current->thread.ksp_limit = (unsigned long)irqtp + | ||
614 | _ALIGN_UP(sizeof(struct thread_info), 16); | ||
615 | call_do_softirq(irqtp); | 604 | call_do_softirq(irqtp); |
616 | current->thread.ksp_limit = saved_sp_limit; | ||
617 | irqtp->task = NULL; | 605 | irqtp->task = NULL; |
618 | 606 | ||
619 | /* Set any flag that may have been set on the | 607 | /* Set any flag that may have been set on the |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 777d999f563b..2b0ad9845363 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -36,26 +36,41 @@ | |||
36 | 36 | ||
37 | .text | 37 | .text |
38 | 38 | ||
39 | /* | ||
40 | * We store the saved ksp_limit in the unused part | ||
41 | * of the STACK_FRAME_OVERHEAD | ||
42 | */ | ||
39 | _GLOBAL(call_do_softirq) | 43 | _GLOBAL(call_do_softirq) |
40 | mflr r0 | 44 | mflr r0 |
41 | stw r0,4(r1) | 45 | stw r0,4(r1) |
46 | lwz r10,THREAD+KSP_LIMIT(r2) | ||
47 | addi r11,r3,THREAD_INFO_GAP | ||
42 | stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r3) | 48 | stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r3) |
43 | mr r1,r3 | 49 | mr r1,r3 |
50 | stw r10,8(r1) | ||
51 | stw r11,THREAD+KSP_LIMIT(r2) | ||
44 | bl __do_softirq | 52 | bl __do_softirq |
53 | lwz r10,8(r1) | ||
45 | lwz r1,0(r1) | 54 | lwz r1,0(r1) |
46 | lwz r0,4(r1) | 55 | lwz r0,4(r1) |
56 | stw r10,THREAD+KSP_LIMIT(r2) | ||
47 | mtlr r0 | 57 | mtlr r0 |
48 | blr | 58 | blr |
49 | 59 | ||
50 | _GLOBAL(call_handle_irq) | 60 | _GLOBAL(call_do_irq) |
51 | mflr r0 | 61 | mflr r0 |
52 | stw r0,4(r1) | 62 | stw r0,4(r1) |
53 | mtctr r6 | 63 | lwz r10,THREAD+KSP_LIMIT(r2) |
54 | stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r5) | 64 | addi r11,r3,THREAD_INFO_GAP |
55 | mr r1,r5 | 65 | stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r4) |
56 | bctrl | 66 | mr r1,r4 |
67 | stw r10,8(r1) | ||
68 | stw r11,THREAD+KSP_LIMIT(r2) | ||
69 | bl __do_irq | ||
70 | lwz r10,8(r1) | ||
57 | lwz r1,0(r1) | 71 | lwz r1,0(r1) |
58 | lwz r0,4(r1) | 72 | lwz r0,4(r1) |
73 | stw r10,THREAD+KSP_LIMIT(r2) | ||
59 | mtlr r0 | 74 | mtlr r0 |
60 | blr | 75 | blr |
61 | 76 | ||
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 971d7e78aff2..e59caf874d05 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -40,14 +40,12 @@ _GLOBAL(call_do_softirq) | |||
40 | mtlr r0 | 40 | mtlr r0 |
41 | blr | 41 | blr |
42 | 42 | ||
43 | _GLOBAL(call_handle_irq) | 43 | _GLOBAL(call_do_irq) |
44 | ld r8,0(r6) | ||
45 | mflr r0 | 44 | mflr r0 |
46 | std r0,16(r1) | 45 | std r0,16(r1) |
47 | mtctr r8 | 46 | stdu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r4) |
48 | stdu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r5) | 47 | mr r1,r4 |
49 | mr r1,r5 | 48 | bl .__do_irq |
50 | bctrl | ||
51 | ld r1,0(r1) | 49 | ld r1,0(r1) |
52 | ld r0,16(r1) | 50 | ld r0,16(r1) |
53 | mtlr r0 | 51 | mtlr r0 |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 6f428da53e20..96d2fdf3aa9e 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -1000,9 +1000,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
1000 | kregs = (struct pt_regs *) sp; | 1000 | kregs = (struct pt_regs *) sp; |
1001 | sp -= STACK_FRAME_OVERHEAD; | 1001 | sp -= STACK_FRAME_OVERHEAD; |
1002 | p->thread.ksp = sp; | 1002 | p->thread.ksp = sp; |
1003 | #ifdef CONFIG_PPC32 | ||
1003 | p->thread.ksp_limit = (unsigned long)task_stack_page(p) + | 1004 | p->thread.ksp_limit = (unsigned long)task_stack_page(p) + |
1004 | _ALIGN_UP(sizeof(struct thread_info), 16); | 1005 | _ALIGN_UP(sizeof(struct thread_info), 16); |
1005 | 1006 | #endif | |
1006 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 1007 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
1007 | p->thread.ptrace_bps[0] = NULL; | 1008 | p->thread.ptrace_bps[0] = NULL; |
1008 | #endif | 1009 | #endif |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 12e656ffe60e..5fe2842e8bab 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -196,6 +196,8 @@ static int __initdata mem_reserve_cnt; | |||
196 | 196 | ||
197 | static cell_t __initdata regbuf[1024]; | 197 | static cell_t __initdata regbuf[1024]; |
198 | 198 | ||
199 | static bool rtas_has_query_cpu_stopped; | ||
200 | |||
199 | 201 | ||
200 | /* | 202 | /* |
201 | * Error results ... some OF calls will return "-1" on error, some | 203 | * Error results ... some OF calls will return "-1" on error, some |
@@ -1574,6 +1576,11 @@ static void __init prom_instantiate_rtas(void) | |||
1574 | prom_setprop(rtas_node, "/rtas", "linux,rtas-entry", | 1576 | prom_setprop(rtas_node, "/rtas", "linux,rtas-entry", |
1575 | &val, sizeof(val)); | 1577 | &val, sizeof(val)); |
1576 | 1578 | ||
1579 | /* Check if it supports "query-cpu-stopped-state" */ | ||
1580 | if (prom_getprop(rtas_node, "query-cpu-stopped-state", | ||
1581 | &val, sizeof(val)) != PROM_ERROR) | ||
1582 | rtas_has_query_cpu_stopped = true; | ||
1583 | |||
1577 | #if defined(CONFIG_PPC_POWERNV) && defined(__BIG_ENDIAN__) | 1584 | #if defined(CONFIG_PPC_POWERNV) && defined(__BIG_ENDIAN__) |
1578 | /* PowerVN takeover hack */ | 1585 | /* PowerVN takeover hack */ |
1579 | prom_rtas_data = base; | 1586 | prom_rtas_data = base; |
@@ -1815,6 +1822,18 @@ static void __init prom_hold_cpus(void) | |||
1815 | = (void *) LOW_ADDR(__secondary_hold_acknowledge); | 1822 | = (void *) LOW_ADDR(__secondary_hold_acknowledge); |
1816 | unsigned long secondary_hold = LOW_ADDR(__secondary_hold); | 1823 | unsigned long secondary_hold = LOW_ADDR(__secondary_hold); |
1817 | 1824 | ||
1825 | /* | ||
1826 | * On pseries, if RTAS supports "query-cpu-stopped-state", | ||
1827 | * we skip this stage, the CPUs will be started by the | ||
1828 | * kernel using RTAS. | ||
1829 | */ | ||
1830 | if ((of_platform == PLATFORM_PSERIES || | ||
1831 | of_platform == PLATFORM_PSERIES_LPAR) && | ||
1832 | rtas_has_query_cpu_stopped) { | ||
1833 | prom_printf("prom_hold_cpus: skipped\n"); | ||
1834 | return; | ||
1835 | } | ||
1836 | |||
1818 | prom_debug("prom_hold_cpus: start...\n"); | 1837 | prom_debug("prom_hold_cpus: start...\n"); |
1819 | prom_debug(" 1) spinloop = 0x%x\n", (unsigned long)spinloop); | 1838 | prom_debug(" 1) spinloop = 0x%x\n", (unsigned long)spinloop); |
1820 | prom_debug(" 1) *spinloop = 0x%x\n", *spinloop); | 1839 | prom_debug(" 1) *spinloop = 0x%x\n", *spinloop); |
@@ -3011,6 +3030,8 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
3011 | * On non-powermacs, put all CPUs in spin-loops. | 3030 | * On non-powermacs, put all CPUs in spin-loops. |
3012 | * | 3031 | * |
3013 | * PowerMacs use a different mechanism to spin CPUs | 3032 | * PowerMacs use a different mechanism to spin CPUs |
3033 | * | ||
3034 | * (This must be done after instanciating RTAS) | ||
3014 | */ | 3035 | */ |
3015 | if (of_platform != PLATFORM_POWERMAC && | 3036 | if (of_platform != PLATFORM_POWERMAC && |
3016 | of_platform != PLATFORM_OPAL) | 3037 | of_platform != PLATFORM_OPAL) |
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/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/lib/sstep.c b/arch/powerpc/lib/sstep.c index a7ee978fb860..b1faa1593c90 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c | |||
@@ -1505,6 +1505,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1505 | */ | 1505 | */ |
1506 | if ((ra == 1) && !(regs->msr & MSR_PR) \ | 1506 | if ((ra == 1) && !(regs->msr & MSR_PR) \ |
1507 | && (val3 >= (regs->gpr[1] - STACK_INT_FRAME_SIZE))) { | 1507 | && (val3 >= (regs->gpr[1] - STACK_INT_FRAME_SIZE))) { |
1508 | #ifdef CONFIG_PPC32 | ||
1508 | /* | 1509 | /* |
1509 | * Check if we will touch kernel sack overflow | 1510 | * Check if we will touch kernel sack overflow |
1510 | */ | 1511 | */ |
@@ -1513,7 +1514,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1513 | err = -EINVAL; | 1514 | err = -EINVAL; |
1514 | break; | 1515 | break; |
1515 | } | 1516 | } |
1516 | 1517 | #endif /* CONFIG_PPC32 */ | |
1517 | /* | 1518 | /* |
1518 | * Check if we already set since that means we'll | 1519 | * Check if we already set since that means we'll |
1519 | * lose the previous value. | 1520 | * lose the previous value. |
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/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 1c1771a40250..24f58cb0a543 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -233,18 +233,24 @@ static void __init smp_init_pseries(void) | |||
233 | 233 | ||
234 | alloc_bootmem_cpumask_var(&of_spin_mask); | 234 | alloc_bootmem_cpumask_var(&of_spin_mask); |
235 | 235 | ||
236 | /* Mark threads which are still spinning in hold loops. */ | 236 | /* |
237 | if (cpu_has_feature(CPU_FTR_SMT)) { | 237 | * Mark threads which are still spinning in hold loops |
238 | for_each_present_cpu(i) { | 238 | * |
239 | if (cpu_thread_in_core(i) == 0) | 239 | * We know prom_init will not have started them if RTAS supports |
240 | cpumask_set_cpu(i, of_spin_mask); | 240 | * query-cpu-stopped-state. |
241 | } | 241 | */ |
242 | } else { | 242 | if (rtas_token("query-cpu-stopped-state") == RTAS_UNKNOWN_SERVICE) { |
243 | cpumask_copy(of_spin_mask, cpu_present_mask); | 243 | if (cpu_has_feature(CPU_FTR_SMT)) { |
244 | for_each_present_cpu(i) { | ||
245 | if (cpu_thread_in_core(i) == 0) | ||
246 | cpumask_set_cpu(i, of_spin_mask); | ||
247 | } | ||
248 | } else | ||
249 | cpumask_copy(of_spin_mask, cpu_present_mask); | ||
250 | |||
251 | cpumask_clear_cpu(boot_cpuid, of_spin_mask); | ||
244 | } | 252 | } |
245 | 253 | ||
246 | cpumask_clear_cpu(boot_cpuid, of_spin_mask); | ||
247 | |||
248 | /* Non-lpar has additional take/give timebase */ | 254 | /* Non-lpar has additional take/give timebase */ |
249 | if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) { | 255 | if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) { |
250 | smp_ops->give_timebase = rtas_give_timebase; | 256 | smp_ops->give_timebase = rtas_give_timebase; |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index dcc6ac2d8026..7143793859fa 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -93,6 +93,7 @@ config S390 | |||
93 | select ARCH_INLINE_WRITE_UNLOCK_IRQ | 93 | select ARCH_INLINE_WRITE_UNLOCK_IRQ |
94 | select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE | 94 | select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE |
95 | select ARCH_SAVE_PAGE_KEYS if HIBERNATION | 95 | select ARCH_SAVE_PAGE_KEYS if HIBERNATION |
96 | select ARCH_USE_CMPXCHG_LOCKREF | ||
96 | select ARCH_WANT_IPC_PARSE_VERSION | 97 | select ARCH_WANT_IPC_PARSE_VERSION |
97 | select BUILDTIME_EXTABLE_SORT | 98 | select BUILDTIME_EXTABLE_SORT |
98 | select CLONE_BACKWARDS2 | 99 | select CLONE_BACKWARDS2 |
@@ -102,7 +103,6 @@ config S390 | |||
102 | select GENERIC_TIME_VSYSCALL_OLD | 103 | select GENERIC_TIME_VSYSCALL_OLD |
103 | select HAVE_ALIGNED_STRUCT_PAGE if SLUB | 104 | select HAVE_ALIGNED_STRUCT_PAGE if SLUB |
104 | select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 | 105 | select HAVE_ARCH_JUMP_LABEL if !MARCH_G5 |
105 | select HAVE_ARCH_MUTEX_CPU_RELAX | ||
106 | select HAVE_ARCH_SECCOMP_FILTER | 106 | select HAVE_ARCH_SECCOMP_FILTER |
107 | select HAVE_ARCH_TRACEHOOK | 107 | select HAVE_ARCH_TRACEHOOK |
108 | select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT | 108 | select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT |
diff --git a/arch/s390/include/asm/mutex.h b/arch/s390/include/asm/mutex.h index 688271f5f2e4..458c1f7fbc18 100644 --- a/arch/s390/include/asm/mutex.h +++ b/arch/s390/include/asm/mutex.h | |||
@@ -7,5 +7,3 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm-generic/mutex-dec.h> | 9 | #include <asm-generic/mutex-dec.h> |
10 | |||
11 | #define arch_mutex_cpu_relax() barrier() | ||
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 0eb37505cab1..ca7821f07260 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h | |||
@@ -198,6 +198,8 @@ static inline void cpu_relax(void) | |||
198 | barrier(); | 198 | barrier(); |
199 | } | 199 | } |
200 | 200 | ||
201 | #define arch_mutex_cpu_relax() barrier() | ||
202 | |||
201 | static inline void psw_set_key(unsigned int key) | 203 | static inline void psw_set_key(unsigned int key) |
202 | { | 204 | { |
203 | asm volatile("spka 0(%0)" : : "d" (key)); | 205 | asm volatile("spka 0(%0)" : : "d" (key)); |
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h index 701fe8c59e1f..83e5d216105e 100644 --- a/arch/s390/include/asm/spinlock.h +++ b/arch/s390/include/asm/spinlock.h | |||
@@ -44,6 +44,11 @@ extern void arch_spin_lock_wait_flags(arch_spinlock_t *, unsigned long flags); | |||
44 | extern int arch_spin_trylock_retry(arch_spinlock_t *); | 44 | extern int arch_spin_trylock_retry(arch_spinlock_t *); |
45 | extern void arch_spin_relax(arch_spinlock_t *lock); | 45 | extern void arch_spin_relax(arch_spinlock_t *lock); |
46 | 46 | ||
47 | static inline int arch_spin_value_unlocked(arch_spinlock_t lock) | ||
48 | { | ||
49 | return lock.owner_cpu == 0; | ||
50 | } | ||
51 | |||
47 | static inline void arch_spin_lock(arch_spinlock_t *lp) | 52 | static inline void arch_spin_lock(arch_spinlock_t *lp) |
48 | { | 53 | { |
49 | int old; | 54 | int old; |
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/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/tile/Kconfig b/arch/tile/Kconfig index 8a7cc663b3f8..d45a2c48f185 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
@@ -361,7 +361,7 @@ config CMDLINE_OVERRIDE | |||
361 | 361 | ||
362 | config VMALLOC_RESERVE | 362 | config VMALLOC_RESERVE |
363 | hex | 363 | hex |
364 | default 0x1000000 | 364 | default 0x2000000 |
365 | 365 | ||
366 | config HARDWALL | 366 | config HARDWALL |
367 | bool "Hardwall support to allow access to user dynamic network" | 367 | bool "Hardwall support to allow access to user dynamic network" |
diff --git a/arch/tile/gxio/iorpc_mpipe.c b/arch/tile/gxio/iorpc_mpipe.c index 4f8f3d619c4a..e19325c4c431 100644 --- a/arch/tile/gxio/iorpc_mpipe.c +++ b/arch/tile/gxio/iorpc_mpipe.c | |||
@@ -21,7 +21,7 @@ struct alloc_buffer_stacks_param { | |||
21 | unsigned int flags; | 21 | unsigned int flags; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t * context, | 24 | int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t *context, |
25 | unsigned int count, unsigned int first, | 25 | unsigned int count, unsigned int first, |
26 | unsigned int flags) | 26 | unsigned int flags) |
27 | { | 27 | { |
@@ -45,7 +45,7 @@ struct init_buffer_stack_aux_param { | |||
45 | unsigned int buffer_size_enum; | 45 | unsigned int buffer_size_enum; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t * context, | 48 | int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t *context, |
49 | void *mem_va, size_t mem_size, | 49 | void *mem_va, size_t mem_size, |
50 | unsigned int mem_flags, unsigned int stack, | 50 | unsigned int mem_flags, unsigned int stack, |
51 | unsigned int buffer_size_enum) | 51 | unsigned int buffer_size_enum) |
@@ -80,7 +80,7 @@ struct alloc_notif_rings_param { | |||
80 | unsigned int flags; | 80 | unsigned int flags; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t * context, | 83 | int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t *context, |
84 | unsigned int count, unsigned int first, | 84 | unsigned int count, unsigned int first, |
85 | unsigned int flags) | 85 | unsigned int flags) |
86 | { | 86 | { |
@@ -102,7 +102,7 @@ struct init_notif_ring_aux_param { | |||
102 | unsigned int ring; | 102 | unsigned int ring; |
103 | }; | 103 | }; |
104 | 104 | ||
105 | int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t * context, void *mem_va, | 105 | int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t *context, void *mem_va, |
106 | size_t mem_size, unsigned int mem_flags, | 106 | size_t mem_size, unsigned int mem_flags, |
107 | unsigned int ring) | 107 | unsigned int ring) |
108 | { | 108 | { |
@@ -133,7 +133,7 @@ struct request_notif_ring_interrupt_param { | |||
133 | unsigned int ring; | 133 | unsigned int ring; |
134 | }; | 134 | }; |
135 | 135 | ||
136 | int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t * context, | 136 | int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t *context, |
137 | int inter_x, int inter_y, | 137 | int inter_x, int inter_y, |
138 | int inter_ipi, int inter_event, | 138 | int inter_ipi, int inter_event, |
139 | unsigned int ring) | 139 | unsigned int ring) |
@@ -158,7 +158,7 @@ struct enable_notif_ring_interrupt_param { | |||
158 | unsigned int ring; | 158 | unsigned int ring; |
159 | }; | 159 | }; |
160 | 160 | ||
161 | int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t * context, | 161 | int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t *context, |
162 | unsigned int ring) | 162 | unsigned int ring) |
163 | { | 163 | { |
164 | struct enable_notif_ring_interrupt_param temp; | 164 | struct enable_notif_ring_interrupt_param temp; |
@@ -179,7 +179,7 @@ struct alloc_notif_groups_param { | |||
179 | unsigned int flags; | 179 | unsigned int flags; |
180 | }; | 180 | }; |
181 | 181 | ||
182 | int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t * context, | 182 | int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t *context, |
183 | unsigned int count, unsigned int first, | 183 | unsigned int count, unsigned int first, |
184 | unsigned int flags) | 184 | unsigned int flags) |
185 | { | 185 | { |
@@ -201,7 +201,7 @@ struct init_notif_group_param { | |||
201 | gxio_mpipe_notif_group_bits_t bits; | 201 | gxio_mpipe_notif_group_bits_t bits; |
202 | }; | 202 | }; |
203 | 203 | ||
204 | int gxio_mpipe_init_notif_group(gxio_mpipe_context_t * context, | 204 | int gxio_mpipe_init_notif_group(gxio_mpipe_context_t *context, |
205 | unsigned int group, | 205 | unsigned int group, |
206 | gxio_mpipe_notif_group_bits_t bits) | 206 | gxio_mpipe_notif_group_bits_t bits) |
207 | { | 207 | { |
@@ -223,7 +223,7 @@ struct alloc_buckets_param { | |||
223 | unsigned int flags; | 223 | unsigned int flags; |
224 | }; | 224 | }; |
225 | 225 | ||
226 | int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t * context, unsigned int count, | 226 | int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t *context, unsigned int count, |
227 | unsigned int first, unsigned int flags) | 227 | unsigned int first, unsigned int flags) |
228 | { | 228 | { |
229 | struct alloc_buckets_param temp; | 229 | struct alloc_buckets_param temp; |
@@ -244,7 +244,7 @@ struct init_bucket_param { | |||
244 | MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info; | 244 | MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info; |
245 | }; | 245 | }; |
246 | 246 | ||
247 | int gxio_mpipe_init_bucket(gxio_mpipe_context_t * context, unsigned int bucket, | 247 | int gxio_mpipe_init_bucket(gxio_mpipe_context_t *context, unsigned int bucket, |
248 | MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info) | 248 | MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info) |
249 | { | 249 | { |
250 | struct init_bucket_param temp; | 250 | struct init_bucket_param temp; |
@@ -265,7 +265,7 @@ struct alloc_edma_rings_param { | |||
265 | unsigned int flags; | 265 | unsigned int flags; |
266 | }; | 266 | }; |
267 | 267 | ||
268 | int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t * context, | 268 | int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t *context, |
269 | unsigned int count, unsigned int first, | 269 | unsigned int count, unsigned int first, |
270 | unsigned int flags) | 270 | unsigned int flags) |
271 | { | 271 | { |
@@ -288,7 +288,7 @@ struct init_edma_ring_aux_param { | |||
288 | unsigned int channel; | 288 | unsigned int channel; |
289 | }; | 289 | }; |
290 | 290 | ||
291 | int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t * context, void *mem_va, | 291 | int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t *context, void *mem_va, |
292 | size_t mem_size, unsigned int mem_flags, | 292 | size_t mem_size, unsigned int mem_flags, |
293 | unsigned int ring, unsigned int channel) | 293 | unsigned int ring, unsigned int channel) |
294 | { | 294 | { |
@@ -315,7 +315,7 @@ int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t * context, void *mem_va, | |||
315 | EXPORT_SYMBOL(gxio_mpipe_init_edma_ring_aux); | 315 | EXPORT_SYMBOL(gxio_mpipe_init_edma_ring_aux); |
316 | 316 | ||
317 | 317 | ||
318 | int gxio_mpipe_commit_rules(gxio_mpipe_context_t * context, const void *blob, | 318 | int gxio_mpipe_commit_rules(gxio_mpipe_context_t *context, const void *blob, |
319 | size_t blob_size) | 319 | size_t blob_size) |
320 | { | 320 | { |
321 | const void *params = blob; | 321 | const void *params = blob; |
@@ -332,7 +332,7 @@ struct register_client_memory_param { | |||
332 | unsigned int flags; | 332 | unsigned int flags; |
333 | }; | 333 | }; |
334 | 334 | ||
335 | int gxio_mpipe_register_client_memory(gxio_mpipe_context_t * context, | 335 | int gxio_mpipe_register_client_memory(gxio_mpipe_context_t *context, |
336 | unsigned int iotlb, HV_PTE pte, | 336 | unsigned int iotlb, HV_PTE pte, |
337 | unsigned int flags) | 337 | unsigned int flags) |
338 | { | 338 | { |
@@ -355,7 +355,7 @@ struct link_open_aux_param { | |||
355 | unsigned int flags; | 355 | unsigned int flags; |
356 | }; | 356 | }; |
357 | 357 | ||
358 | int gxio_mpipe_link_open_aux(gxio_mpipe_context_t * context, | 358 | int gxio_mpipe_link_open_aux(gxio_mpipe_context_t *context, |
359 | _gxio_mpipe_link_name_t name, unsigned int flags) | 359 | _gxio_mpipe_link_name_t name, unsigned int flags) |
360 | { | 360 | { |
361 | struct link_open_aux_param temp; | 361 | struct link_open_aux_param temp; |
@@ -374,7 +374,7 @@ struct link_close_aux_param { | |||
374 | int mac; | 374 | int mac; |
375 | }; | 375 | }; |
376 | 376 | ||
377 | int gxio_mpipe_link_close_aux(gxio_mpipe_context_t * context, int mac) | 377 | int gxio_mpipe_link_close_aux(gxio_mpipe_context_t *context, int mac) |
378 | { | 378 | { |
379 | struct link_close_aux_param temp; | 379 | struct link_close_aux_param temp; |
380 | struct link_close_aux_param *params = &temp; | 380 | struct link_close_aux_param *params = &temp; |
@@ -393,7 +393,7 @@ struct link_set_attr_aux_param { | |||
393 | int64_t val; | 393 | int64_t val; |
394 | }; | 394 | }; |
395 | 395 | ||
396 | int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t * context, int mac, | 396 | int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t *context, int mac, |
397 | uint32_t attr, int64_t val) | 397 | uint32_t attr, int64_t val) |
398 | { | 398 | { |
399 | struct link_set_attr_aux_param temp; | 399 | struct link_set_attr_aux_param temp; |
@@ -415,8 +415,8 @@ struct get_timestamp_aux_param { | |||
415 | uint64_t cycles; | 415 | uint64_t cycles; |
416 | }; | 416 | }; |
417 | 417 | ||
418 | int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t * context, uint64_t * sec, | 418 | int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t *context, uint64_t *sec, |
419 | uint64_t * nsec, uint64_t * cycles) | 419 | uint64_t *nsec, uint64_t *cycles) |
420 | { | 420 | { |
421 | int __result; | 421 | int __result; |
422 | struct get_timestamp_aux_param temp; | 422 | struct get_timestamp_aux_param temp; |
@@ -440,7 +440,7 @@ struct set_timestamp_aux_param { | |||
440 | uint64_t cycles; | 440 | uint64_t cycles; |
441 | }; | 441 | }; |
442 | 442 | ||
443 | int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t * context, uint64_t sec, | 443 | int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t *context, uint64_t sec, |
444 | uint64_t nsec, uint64_t cycles) | 444 | uint64_t nsec, uint64_t cycles) |
445 | { | 445 | { |
446 | struct set_timestamp_aux_param temp; | 446 | struct set_timestamp_aux_param temp; |
@@ -460,8 +460,7 @@ struct adjust_timestamp_aux_param { | |||
460 | int64_t nsec; | 460 | int64_t nsec; |
461 | }; | 461 | }; |
462 | 462 | ||
463 | int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t * context, | 463 | int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t *context, int64_t nsec) |
464 | int64_t nsec) | ||
465 | { | 464 | { |
466 | struct adjust_timestamp_aux_param temp; | 465 | struct adjust_timestamp_aux_param temp; |
467 | struct adjust_timestamp_aux_param *params = &temp; | 466 | struct adjust_timestamp_aux_param *params = &temp; |
@@ -475,25 +474,6 @@ int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t * context, | |||
475 | 474 | ||
476 | EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_aux); | 475 | EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_aux); |
477 | 476 | ||
478 | struct adjust_timestamp_freq_param { | ||
479 | int32_t ppb; | ||
480 | }; | ||
481 | |||
482 | int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t * context, | ||
483 | int32_t ppb) | ||
484 | { | ||
485 | struct adjust_timestamp_freq_param temp; | ||
486 | struct adjust_timestamp_freq_param *params = &temp; | ||
487 | |||
488 | params->ppb = ppb; | ||
489 | |||
490 | return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, | ||
491 | sizeof(*params), | ||
492 | GXIO_MPIPE_OP_ADJUST_TIMESTAMP_FREQ); | ||
493 | } | ||
494 | |||
495 | EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_freq); | ||
496 | |||
497 | struct config_edma_ring_blks_param { | 477 | struct config_edma_ring_blks_param { |
498 | unsigned int ering; | 478 | unsigned int ering; |
499 | unsigned int max_blks; | 479 | unsigned int max_blks; |
@@ -501,7 +481,7 @@ struct config_edma_ring_blks_param { | |||
501 | unsigned int db; | 481 | unsigned int db; |
502 | }; | 482 | }; |
503 | 483 | ||
504 | int gxio_mpipe_config_edma_ring_blks(gxio_mpipe_context_t * context, | 484 | int gxio_mpipe_config_edma_ring_blks(gxio_mpipe_context_t *context, |
505 | unsigned int ering, unsigned int max_blks, | 485 | unsigned int ering, unsigned int max_blks, |
506 | unsigned int min_snf_blks, unsigned int db) | 486 | unsigned int min_snf_blks, unsigned int db) |
507 | { | 487 | { |
@@ -520,11 +500,29 @@ int gxio_mpipe_config_edma_ring_blks(gxio_mpipe_context_t * context, | |||
520 | 500 | ||
521 | EXPORT_SYMBOL(gxio_mpipe_config_edma_ring_blks); | 501 | EXPORT_SYMBOL(gxio_mpipe_config_edma_ring_blks); |
522 | 502 | ||
503 | struct adjust_timestamp_freq_param { | ||
504 | int32_t ppb; | ||
505 | }; | ||
506 | |||
507 | int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t *context, int32_t ppb) | ||
508 | { | ||
509 | struct adjust_timestamp_freq_param temp; | ||
510 | struct adjust_timestamp_freq_param *params = &temp; | ||
511 | |||
512 | params->ppb = ppb; | ||
513 | |||
514 | return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params, | ||
515 | sizeof(*params), | ||
516 | GXIO_MPIPE_OP_ADJUST_TIMESTAMP_FREQ); | ||
517 | } | ||
518 | |||
519 | EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_freq); | ||
520 | |||
523 | struct arm_pollfd_param { | 521 | struct arm_pollfd_param { |
524 | union iorpc_pollfd pollfd; | 522 | union iorpc_pollfd pollfd; |
525 | }; | 523 | }; |
526 | 524 | ||
527 | int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t * context, int pollfd_cookie) | 525 | int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie) |
528 | { | 526 | { |
529 | struct arm_pollfd_param temp; | 527 | struct arm_pollfd_param temp; |
530 | struct arm_pollfd_param *params = &temp; | 528 | struct arm_pollfd_param *params = &temp; |
@@ -541,7 +539,7 @@ struct close_pollfd_param { | |||
541 | union iorpc_pollfd pollfd; | 539 | union iorpc_pollfd pollfd; |
542 | }; | 540 | }; |
543 | 541 | ||
544 | int gxio_mpipe_close_pollfd(gxio_mpipe_context_t * context, int pollfd_cookie) | 542 | int gxio_mpipe_close_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie) |
545 | { | 543 | { |
546 | struct close_pollfd_param temp; | 544 | struct close_pollfd_param temp; |
547 | struct close_pollfd_param *params = &temp; | 545 | struct close_pollfd_param *params = &temp; |
@@ -558,7 +556,7 @@ struct get_mmio_base_param { | |||
558 | HV_PTE base; | 556 | HV_PTE base; |
559 | }; | 557 | }; |
560 | 558 | ||
561 | int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t * context, HV_PTE *base) | 559 | int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t *context, HV_PTE *base) |
562 | { | 560 | { |
563 | int __result; | 561 | int __result; |
564 | struct get_mmio_base_param temp; | 562 | struct get_mmio_base_param temp; |
@@ -579,7 +577,7 @@ struct check_mmio_offset_param { | |||
579 | unsigned long size; | 577 | unsigned long size; |
580 | }; | 578 | }; |
581 | 579 | ||
582 | int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t * context, | 580 | int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t *context, |
583 | unsigned long offset, unsigned long size) | 581 | unsigned long offset, unsigned long size) |
584 | { | 582 | { |
585 | struct check_mmio_offset_param temp; | 583 | struct check_mmio_offset_param temp; |
diff --git a/arch/tile/gxio/iorpc_mpipe_info.c b/arch/tile/gxio/iorpc_mpipe_info.c index 64883aabeb9c..77019c6e9b4a 100644 --- a/arch/tile/gxio/iorpc_mpipe_info.c +++ b/arch/tile/gxio/iorpc_mpipe_info.c | |||
@@ -15,12 +15,11 @@ | |||
15 | /* This file is machine-generated; DO NOT EDIT! */ | 15 | /* This file is machine-generated; DO NOT EDIT! */ |
16 | #include "gxio/iorpc_mpipe_info.h" | 16 | #include "gxio/iorpc_mpipe_info.h" |
17 | 17 | ||
18 | |||
19 | struct instance_aux_param { | 18 | struct instance_aux_param { |
20 | _gxio_mpipe_link_name_t name; | 19 | _gxio_mpipe_link_name_t name; |
21 | }; | 20 | }; |
22 | 21 | ||
23 | int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t * context, | 22 | int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t *context, |
24 | _gxio_mpipe_link_name_t name) | 23 | _gxio_mpipe_link_name_t name) |
25 | { | 24 | { |
26 | struct instance_aux_param temp; | 25 | struct instance_aux_param temp; |
@@ -39,10 +38,10 @@ struct enumerate_aux_param { | |||
39 | _gxio_mpipe_link_mac_t mac; | 38 | _gxio_mpipe_link_mac_t mac; |
40 | }; | 39 | }; |
41 | 40 | ||
42 | int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context, | 41 | int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t *context, |
43 | unsigned int idx, | 42 | unsigned int idx, |
44 | _gxio_mpipe_link_name_t * name, | 43 | _gxio_mpipe_link_name_t *name, |
45 | _gxio_mpipe_link_mac_t * mac) | 44 | _gxio_mpipe_link_mac_t *mac) |
46 | { | 45 | { |
47 | int __result; | 46 | int __result; |
48 | struct enumerate_aux_param temp; | 47 | struct enumerate_aux_param temp; |
@@ -50,7 +49,7 @@ int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context, | |||
50 | 49 | ||
51 | __result = | 50 | __result = |
52 | hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), | 51 | hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params), |
53 | (((uint64_t) idx << 32) | | 52 | (((uint64_t)idx << 32) | |
54 | GXIO_MPIPE_INFO_OP_ENUMERATE_AUX)); | 53 | GXIO_MPIPE_INFO_OP_ENUMERATE_AUX)); |
55 | *name = params->name; | 54 | *name = params->name; |
56 | *mac = params->mac; | 55 | *mac = params->mac; |
@@ -64,7 +63,7 @@ struct get_mmio_base_param { | |||
64 | HV_PTE base; | 63 | HV_PTE base; |
65 | }; | 64 | }; |
66 | 65 | ||
67 | int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t * context, | 66 | int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t *context, |
68 | HV_PTE *base) | 67 | HV_PTE *base) |
69 | { | 68 | { |
70 | int __result; | 69 | int __result; |
@@ -86,7 +85,7 @@ struct check_mmio_offset_param { | |||
86 | unsigned long size; | 85 | unsigned long size; |
87 | }; | 86 | }; |
88 | 87 | ||
89 | int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t * context, | 88 | int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t *context, |
90 | unsigned long offset, unsigned long size) | 89 | unsigned long offset, unsigned long size) |
91 | { | 90 | { |
92 | struct check_mmio_offset_param temp; | 91 | struct check_mmio_offset_param temp; |
diff --git a/arch/tile/gxio/iorpc_trio.c b/arch/tile/gxio/iorpc_trio.c index da6e18e049c3..1d3cedb9aeb4 100644 --- a/arch/tile/gxio/iorpc_trio.c +++ b/arch/tile/gxio/iorpc_trio.c | |||
@@ -21,7 +21,7 @@ struct alloc_asids_param { | |||
21 | unsigned int flags; | 21 | unsigned int flags; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | int gxio_trio_alloc_asids(gxio_trio_context_t * context, unsigned int count, | 24 | int gxio_trio_alloc_asids(gxio_trio_context_t *context, unsigned int count, |
25 | unsigned int first, unsigned int flags) | 25 | unsigned int first, unsigned int flags) |
26 | { | 26 | { |
27 | struct alloc_asids_param temp; | 27 | struct alloc_asids_param temp; |
@@ -44,7 +44,7 @@ struct alloc_memory_maps_param { | |||
44 | unsigned int flags; | 44 | unsigned int flags; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | int gxio_trio_alloc_memory_maps(gxio_trio_context_t * context, | 47 | int gxio_trio_alloc_memory_maps(gxio_trio_context_t *context, |
48 | unsigned int count, unsigned int first, | 48 | unsigned int count, unsigned int first, |
49 | unsigned int flags) | 49 | unsigned int flags) |
50 | { | 50 | { |
@@ -67,7 +67,7 @@ struct alloc_scatter_queues_param { | |||
67 | unsigned int flags; | 67 | unsigned int flags; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | int gxio_trio_alloc_scatter_queues(gxio_trio_context_t * context, | 70 | int gxio_trio_alloc_scatter_queues(gxio_trio_context_t *context, |
71 | unsigned int count, unsigned int first, | 71 | unsigned int count, unsigned int first, |
72 | unsigned int flags) | 72 | unsigned int flags) |
73 | { | 73 | { |
@@ -91,7 +91,7 @@ struct alloc_pio_regions_param { | |||
91 | unsigned int flags; | 91 | unsigned int flags; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | int gxio_trio_alloc_pio_regions(gxio_trio_context_t * context, | 94 | int gxio_trio_alloc_pio_regions(gxio_trio_context_t *context, |
95 | unsigned int count, unsigned int first, | 95 | unsigned int count, unsigned int first, |
96 | unsigned int flags) | 96 | unsigned int flags) |
97 | { | 97 | { |
@@ -115,7 +115,7 @@ struct init_pio_region_aux_param { | |||
115 | unsigned int flags; | 115 | unsigned int flags; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | int gxio_trio_init_pio_region_aux(gxio_trio_context_t * context, | 118 | int gxio_trio_init_pio_region_aux(gxio_trio_context_t *context, |
119 | unsigned int pio_region, unsigned int mac, | 119 | unsigned int pio_region, unsigned int mac, |
120 | uint32_t bus_address_hi, unsigned int flags) | 120 | uint32_t bus_address_hi, unsigned int flags) |
121 | { | 121 | { |
@@ -145,7 +145,7 @@ struct init_memory_map_mmu_aux_param { | |||
145 | unsigned int order_mode; | 145 | unsigned int order_mode; |
146 | }; | 146 | }; |
147 | 147 | ||
148 | int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t * context, | 148 | int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t *context, |
149 | unsigned int map, unsigned long va, | 149 | unsigned int map, unsigned long va, |
150 | uint64_t size, unsigned int asid, | 150 | uint64_t size, unsigned int asid, |
151 | unsigned int mac, uint64_t bus_address, | 151 | unsigned int mac, uint64_t bus_address, |
@@ -175,7 +175,7 @@ struct get_port_property_param { | |||
175 | struct pcie_trio_ports_property trio_ports; | 175 | struct pcie_trio_ports_property trio_ports; |
176 | }; | 176 | }; |
177 | 177 | ||
178 | int gxio_trio_get_port_property(gxio_trio_context_t * context, | 178 | int gxio_trio_get_port_property(gxio_trio_context_t *context, |
179 | struct pcie_trio_ports_property *trio_ports) | 179 | struct pcie_trio_ports_property *trio_ports) |
180 | { | 180 | { |
181 | int __result; | 181 | int __result; |
@@ -198,7 +198,7 @@ struct config_legacy_intr_param { | |||
198 | unsigned int intx; | 198 | unsigned int intx; |
199 | }; | 199 | }; |
200 | 200 | ||
201 | int gxio_trio_config_legacy_intr(gxio_trio_context_t * context, int inter_x, | 201 | int gxio_trio_config_legacy_intr(gxio_trio_context_t *context, int inter_x, |
202 | int inter_y, int inter_ipi, int inter_event, | 202 | int inter_y, int inter_ipi, int inter_event, |
203 | unsigned int mac, unsigned int intx) | 203 | unsigned int mac, unsigned int intx) |
204 | { | 204 | { |
@@ -227,7 +227,7 @@ struct config_msi_intr_param { | |||
227 | unsigned int asid; | 227 | unsigned int asid; |
228 | }; | 228 | }; |
229 | 229 | ||
230 | int gxio_trio_config_msi_intr(gxio_trio_context_t * context, int inter_x, | 230 | int gxio_trio_config_msi_intr(gxio_trio_context_t *context, int inter_x, |
231 | int inter_y, int inter_ipi, int inter_event, | 231 | int inter_y, int inter_ipi, int inter_event, |
232 | unsigned int mac, unsigned int mem_map, | 232 | unsigned int mac, unsigned int mem_map, |
233 | uint64_t mem_map_base, uint64_t mem_map_limit, | 233 | uint64_t mem_map_base, uint64_t mem_map_limit, |
@@ -259,7 +259,7 @@ struct set_mps_mrs_param { | |||
259 | unsigned int mac; | 259 | unsigned int mac; |
260 | }; | 260 | }; |
261 | 261 | ||
262 | int gxio_trio_set_mps_mrs(gxio_trio_context_t * context, uint16_t mps, | 262 | int gxio_trio_set_mps_mrs(gxio_trio_context_t *context, uint16_t mps, |
263 | uint16_t mrs, unsigned int mac) | 263 | uint16_t mrs, unsigned int mac) |
264 | { | 264 | { |
265 | struct set_mps_mrs_param temp; | 265 | struct set_mps_mrs_param temp; |
@@ -279,7 +279,7 @@ struct force_rc_link_up_param { | |||
279 | unsigned int mac; | 279 | unsigned int mac; |
280 | }; | 280 | }; |
281 | 281 | ||
282 | int gxio_trio_force_rc_link_up(gxio_trio_context_t * context, unsigned int mac) | 282 | int gxio_trio_force_rc_link_up(gxio_trio_context_t *context, unsigned int mac) |
283 | { | 283 | { |
284 | struct force_rc_link_up_param temp; | 284 | struct force_rc_link_up_param temp; |
285 | struct force_rc_link_up_param *params = &temp; | 285 | struct force_rc_link_up_param *params = &temp; |
@@ -296,7 +296,7 @@ struct force_ep_link_up_param { | |||
296 | unsigned int mac; | 296 | unsigned int mac; |
297 | }; | 297 | }; |
298 | 298 | ||
299 | int gxio_trio_force_ep_link_up(gxio_trio_context_t * context, unsigned int mac) | 299 | int gxio_trio_force_ep_link_up(gxio_trio_context_t *context, unsigned int mac) |
300 | { | 300 | { |
301 | struct force_ep_link_up_param temp; | 301 | struct force_ep_link_up_param temp; |
302 | struct force_ep_link_up_param *params = &temp; | 302 | struct force_ep_link_up_param *params = &temp; |
@@ -313,7 +313,7 @@ struct get_mmio_base_param { | |||
313 | HV_PTE base; | 313 | HV_PTE base; |
314 | }; | 314 | }; |
315 | 315 | ||
316 | int gxio_trio_get_mmio_base(gxio_trio_context_t * context, HV_PTE *base) | 316 | int gxio_trio_get_mmio_base(gxio_trio_context_t *context, HV_PTE *base) |
317 | { | 317 | { |
318 | int __result; | 318 | int __result; |
319 | struct get_mmio_base_param temp; | 319 | struct get_mmio_base_param temp; |
@@ -334,7 +334,7 @@ struct check_mmio_offset_param { | |||
334 | unsigned long size; | 334 | unsigned long size; |
335 | }; | 335 | }; |
336 | 336 | ||
337 | int gxio_trio_check_mmio_offset(gxio_trio_context_t * context, | 337 | int gxio_trio_check_mmio_offset(gxio_trio_context_t *context, |
338 | unsigned long offset, unsigned long size) | 338 | unsigned long offset, unsigned long size) |
339 | { | 339 | { |
340 | struct check_mmio_offset_param temp; | 340 | struct check_mmio_offset_param temp; |
diff --git a/arch/tile/gxio/iorpc_usb_host.c b/arch/tile/gxio/iorpc_usb_host.c index cf3c3cc12204..9c820073bfc0 100644 --- a/arch/tile/gxio/iorpc_usb_host.c +++ b/arch/tile/gxio/iorpc_usb_host.c | |||
@@ -19,7 +19,7 @@ struct cfg_interrupt_param { | |||
19 | union iorpc_interrupt interrupt; | 19 | union iorpc_interrupt interrupt; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t * context, int inter_x, | 22 | int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t *context, int inter_x, |
23 | int inter_y, int inter_ipi, int inter_event) | 23 | int inter_y, int inter_ipi, int inter_event) |
24 | { | 24 | { |
25 | struct cfg_interrupt_param temp; | 25 | struct cfg_interrupt_param temp; |
@@ -41,7 +41,7 @@ struct register_client_memory_param { | |||
41 | unsigned int flags; | 41 | unsigned int flags; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | int gxio_usb_host_register_client_memory(gxio_usb_host_context_t * context, | 44 | int gxio_usb_host_register_client_memory(gxio_usb_host_context_t *context, |
45 | HV_PTE pte, unsigned int flags) | 45 | HV_PTE pte, unsigned int flags) |
46 | { | 46 | { |
47 | struct register_client_memory_param temp; | 47 | struct register_client_memory_param temp; |
@@ -61,7 +61,7 @@ struct get_mmio_base_param { | |||
61 | HV_PTE base; | 61 | HV_PTE base; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t * context, HV_PTE *base) | 64 | int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t *context, HV_PTE *base) |
65 | { | 65 | { |
66 | int __result; | 66 | int __result; |
67 | struct get_mmio_base_param temp; | 67 | struct get_mmio_base_param temp; |
@@ -82,7 +82,7 @@ struct check_mmio_offset_param { | |||
82 | unsigned long size; | 82 | unsigned long size; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t * context, | 85 | int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t *context, |
86 | unsigned long offset, unsigned long size) | 86 | unsigned long offset, unsigned long size) |
87 | { | 87 | { |
88 | struct check_mmio_offset_param temp; | 88 | struct check_mmio_offset_param temp; |
diff --git a/arch/tile/gxio/usb_host.c b/arch/tile/gxio/usb_host.c index 66b002f54ecc..785afad7922e 100644 --- a/arch/tile/gxio/usb_host.c +++ b/arch/tile/gxio/usb_host.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <gxio/kiorpc.h> | 26 | #include <gxio/kiorpc.h> |
27 | #include <gxio/usb_host.h> | 27 | #include <gxio/usb_host.h> |
28 | 28 | ||
29 | int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index, | 29 | int gxio_usb_host_init(gxio_usb_host_context_t *context, int usb_index, |
30 | int is_ehci) | 30 | int is_ehci) |
31 | { | 31 | { |
32 | char file[32]; | 32 | char file[32]; |
@@ -63,7 +63,7 @@ int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index, | |||
63 | 63 | ||
64 | EXPORT_SYMBOL_GPL(gxio_usb_host_init); | 64 | EXPORT_SYMBOL_GPL(gxio_usb_host_init); |
65 | 65 | ||
66 | int gxio_usb_host_destroy(gxio_usb_host_context_t * context) | 66 | int gxio_usb_host_destroy(gxio_usb_host_context_t *context) |
67 | { | 67 | { |
68 | iounmap((void __force __iomem *)(context->mmio_base)); | 68 | iounmap((void __force __iomem *)(context->mmio_base)); |
69 | hv_dev_close(context->fd); | 69 | hv_dev_close(context->fd); |
@@ -76,14 +76,14 @@ int gxio_usb_host_destroy(gxio_usb_host_context_t * context) | |||
76 | 76 | ||
77 | EXPORT_SYMBOL_GPL(gxio_usb_host_destroy); | 77 | EXPORT_SYMBOL_GPL(gxio_usb_host_destroy); |
78 | 78 | ||
79 | void *gxio_usb_host_get_reg_start(gxio_usb_host_context_t * context) | 79 | void *gxio_usb_host_get_reg_start(gxio_usb_host_context_t *context) |
80 | { | 80 | { |
81 | return context->mmio_base; | 81 | return context->mmio_base; |
82 | } | 82 | } |
83 | 83 | ||
84 | EXPORT_SYMBOL_GPL(gxio_usb_host_get_reg_start); | 84 | EXPORT_SYMBOL_GPL(gxio_usb_host_get_reg_start); |
85 | 85 | ||
86 | size_t gxio_usb_host_get_reg_len(gxio_usb_host_context_t * context) | 86 | size_t gxio_usb_host_get_reg_len(gxio_usb_host_context_t *context) |
87 | { | 87 | { |
88 | return HV_USB_HOST_MMIO_SIZE; | 88 | return HV_USB_HOST_MMIO_SIZE; |
89 | } | 89 | } |
diff --git a/arch/tile/include/arch/mpipe.h b/arch/tile/include/arch/mpipe.h index 8a33912fd6cc..904538e754d8 100644 --- a/arch/tile/include/arch/mpipe.h +++ b/arch/tile/include/arch/mpipe.h | |||
@@ -176,7 +176,18 @@ typedef union | |||
176 | */ | 176 | */ |
177 | uint_reg_t stack_idx : 5; | 177 | uint_reg_t stack_idx : 5; |
178 | /* Reserved. */ | 178 | /* Reserved. */ |
179 | uint_reg_t __reserved_2 : 5; | 179 | uint_reg_t __reserved_2 : 3; |
180 | /* | ||
181 | * Instance ID. For devices that support automatic buffer return between | ||
182 | * mPIPE instances, this field indicates the buffer owner. If the INST | ||
183 | * field does not match the mPIPE's instance number when a packet is | ||
184 | * egressed, buffers with HWB set will be returned to the other mPIPE | ||
185 | * instance. Note that not all devices support multi-mPIPE buffer | ||
186 | * return. The MPIPE_EDMA_INFO.REMOTE_BUFF_RTN_SUPPORT bit indicates | ||
187 | * whether the INST field in the buffer descriptor is populated by iDMA | ||
188 | * hardware. This field is ignored on writes. | ||
189 | */ | ||
190 | uint_reg_t inst : 2; | ||
180 | /* | 191 | /* |
181 | * Reads as one to indicate that this is a hardware managed buffer. | 192 | * Reads as one to indicate that this is a hardware managed buffer. |
182 | * Ignored on writes since all buffers on a given stack are the same size. | 193 | * Ignored on writes since all buffers on a given stack are the same size. |
@@ -205,7 +216,8 @@ typedef union | |||
205 | uint_reg_t c : 2; | 216 | uint_reg_t c : 2; |
206 | uint_reg_t size : 3; | 217 | uint_reg_t size : 3; |
207 | uint_reg_t hwb : 1; | 218 | uint_reg_t hwb : 1; |
208 | uint_reg_t __reserved_2 : 5; | 219 | uint_reg_t inst : 2; |
220 | uint_reg_t __reserved_2 : 3; | ||
209 | uint_reg_t stack_idx : 5; | 221 | uint_reg_t stack_idx : 5; |
210 | uint_reg_t __reserved_1 : 6; | 222 | uint_reg_t __reserved_1 : 6; |
211 | int_reg_t va : 35; | 223 | int_reg_t va : 35; |
@@ -231,9 +243,9 @@ typedef union | |||
231 | /* Reserved. */ | 243 | /* Reserved. */ |
232 | uint_reg_t __reserved_0 : 3; | 244 | uint_reg_t __reserved_0 : 3; |
233 | /* eDMA ring being accessed */ | 245 | /* eDMA ring being accessed */ |
234 | uint_reg_t ring : 5; | 246 | uint_reg_t ring : 6; |
235 | /* Reserved. */ | 247 | /* Reserved. */ |
236 | uint_reg_t __reserved_1 : 18; | 248 | uint_reg_t __reserved_1 : 17; |
237 | /* | 249 | /* |
238 | * This field of the address selects the region (address space) to be | 250 | * This field of the address selects the region (address space) to be |
239 | * accessed. For the egress DMA post region, this field must be 5. | 251 | * accessed. For the egress DMA post region, this field must be 5. |
@@ -250,8 +262,8 @@ typedef union | |||
250 | uint_reg_t svc_dom : 5; | 262 | uint_reg_t svc_dom : 5; |
251 | uint_reg_t __reserved_2 : 6; | 263 | uint_reg_t __reserved_2 : 6; |
252 | uint_reg_t region : 3; | 264 | uint_reg_t region : 3; |
253 | uint_reg_t __reserved_1 : 18; | 265 | uint_reg_t __reserved_1 : 17; |
254 | uint_reg_t ring : 5; | 266 | uint_reg_t ring : 6; |
255 | uint_reg_t __reserved_0 : 3; | 267 | uint_reg_t __reserved_0 : 3; |
256 | #endif | 268 | #endif |
257 | }; | 269 | }; |
diff --git a/arch/tile/include/arch/mpipe_constants.h b/arch/tile/include/arch/mpipe_constants.h index 410a0400e055..84022ac5fe82 100644 --- a/arch/tile/include/arch/mpipe_constants.h +++ b/arch/tile/include/arch/mpipe_constants.h | |||
@@ -16,13 +16,13 @@ | |||
16 | #ifndef __ARCH_MPIPE_CONSTANTS_H__ | 16 | #ifndef __ARCH_MPIPE_CONSTANTS_H__ |
17 | #define __ARCH_MPIPE_CONSTANTS_H__ | 17 | #define __ARCH_MPIPE_CONSTANTS_H__ |
18 | 18 | ||
19 | #define MPIPE_NUM_CLASSIFIERS 10 | 19 | #define MPIPE_NUM_CLASSIFIERS 16 |
20 | #define MPIPE_CLS_MHZ 1200 | 20 | #define MPIPE_CLS_MHZ 1200 |
21 | 21 | ||
22 | #define MPIPE_NUM_EDMA_RINGS 32 | 22 | #define MPIPE_NUM_EDMA_RINGS 64 |
23 | 23 | ||
24 | #define MPIPE_NUM_SGMII_MACS 16 | 24 | #define MPIPE_NUM_SGMII_MACS 16 |
25 | #define MPIPE_NUM_XAUI_MACS 4 | 25 | #define MPIPE_NUM_XAUI_MACS 16 |
26 | #define MPIPE_NUM_LOOPBACK_CHANNELS 4 | 26 | #define MPIPE_NUM_LOOPBACK_CHANNELS 4 |
27 | #define MPIPE_NUM_NON_LB_CHANNELS 28 | 27 | #define MPIPE_NUM_NON_LB_CHANNELS 28 |
28 | 28 | ||
diff --git a/arch/tile/include/arch/mpipe_shm.h b/arch/tile/include/arch/mpipe_shm.h index f2e9e122818d..13b3c4300e50 100644 --- a/arch/tile/include/arch/mpipe_shm.h +++ b/arch/tile/include/arch/mpipe_shm.h | |||
@@ -44,8 +44,14 @@ typedef union | |||
44 | * descriptors toggles each time the ring tail pointer wraps. | 44 | * descriptors toggles each time the ring tail pointer wraps. |
45 | */ | 45 | */ |
46 | uint_reg_t gen : 1; | 46 | uint_reg_t gen : 1; |
47 | /** | ||
48 | * For devices with EDMA reorder support, this field allows the | ||
49 | * descriptor to select the egress FIFO. The associated DMA ring must | ||
50 | * have ALLOW_EFIFO_SEL enabled. | ||
51 | */ | ||
52 | uint_reg_t efifo_sel : 6; | ||
47 | /** Reserved. Must be zero. */ | 53 | /** Reserved. Must be zero. */ |
48 | uint_reg_t r0 : 7; | 54 | uint_reg_t r0 : 1; |
49 | /** Checksum generation enabled for this transfer. */ | 55 | /** Checksum generation enabled for this transfer. */ |
50 | uint_reg_t csum : 1; | 56 | uint_reg_t csum : 1; |
51 | /** | 57 | /** |
@@ -110,7 +116,8 @@ typedef union | |||
110 | uint_reg_t notif : 1; | 116 | uint_reg_t notif : 1; |
111 | uint_reg_t ns : 1; | 117 | uint_reg_t ns : 1; |
112 | uint_reg_t csum : 1; | 118 | uint_reg_t csum : 1; |
113 | uint_reg_t r0 : 7; | 119 | uint_reg_t r0 : 1; |
120 | uint_reg_t efifo_sel : 6; | ||
114 | uint_reg_t gen : 1; | 121 | uint_reg_t gen : 1; |
115 | #endif | 122 | #endif |
116 | 123 | ||
@@ -126,14 +133,16 @@ typedef union | |||
126 | /** Reserved. */ | 133 | /** Reserved. */ |
127 | uint_reg_t __reserved_1 : 3; | 134 | uint_reg_t __reserved_1 : 3; |
128 | /** | 135 | /** |
129 | * Instance ID. For devices that support more than one mPIPE instance, | 136 | * Instance ID. For devices that support automatic buffer return between |
130 | * this field indicates the buffer owner. If the INST field does not | 137 | * mPIPE instances, this field indicates the buffer owner. If the INST |
131 | * match the mPIPE's instance number when a packet is egressed, buffers | 138 | * field does not match the mPIPE's instance number when a packet is |
132 | * with HWB set will be returned to the other mPIPE instance. | 139 | * egressed, buffers with HWB set will be returned to the other mPIPE |
140 | * instance. Note that not all devices support multi-mPIPE buffer | ||
141 | * return. The MPIPE_EDMA_INFO.REMOTE_BUFF_RTN_SUPPORT bit indicates | ||
142 | * whether the INST field in the buffer descriptor is populated by iDMA | ||
143 | * hardware. | ||
133 | */ | 144 | */ |
134 | uint_reg_t inst : 1; | 145 | uint_reg_t inst : 2; |
135 | /** Reserved. */ | ||
136 | uint_reg_t __reserved_2 : 1; | ||
137 | /** | 146 | /** |
138 | * Always set to one by hardware in iDMA packet descriptors. For eDMA, | 147 | * Always set to one by hardware in iDMA packet descriptors. For eDMA, |
139 | * indicates whether the buffer will be released to the buffer stack | 148 | * indicates whether the buffer will be released to the buffer stack |
@@ -166,8 +175,7 @@ typedef union | |||
166 | uint_reg_t c : 2; | 175 | uint_reg_t c : 2; |
167 | uint_reg_t size : 3; | 176 | uint_reg_t size : 3; |
168 | uint_reg_t hwb : 1; | 177 | uint_reg_t hwb : 1; |
169 | uint_reg_t __reserved_2 : 1; | 178 | uint_reg_t inst : 2; |
170 | uint_reg_t inst : 1; | ||
171 | uint_reg_t __reserved_1 : 3; | 179 | uint_reg_t __reserved_1 : 3; |
172 | uint_reg_t stack_idx : 5; | 180 | uint_reg_t stack_idx : 5; |
173 | uint_reg_t __reserved_0 : 6; | 181 | uint_reg_t __reserved_0 : 6; |
@@ -408,7 +416,10 @@ typedef union | |||
408 | /** | 416 | /** |
409 | * Sequence number applied when packet is distributed. Classifier | 417 | * Sequence number applied when packet is distributed. Classifier |
410 | * selects which sequence number is to be applied by writing the 13-bit | 418 | * selects which sequence number is to be applied by writing the 13-bit |
411 | * SQN-selector into this field. | 419 | * SQN-selector into this field. For devices that support EXT_SQN (as |
420 | * indicated in IDMA_INFO.EXT_SQN_SUPPORT), the GP_SQN can be extended to | ||
421 | * 32-bits via the IDMA_CTL.EXT_SQN register. In this case the | ||
422 | * PACKET_SQN will be reduced to 32 bits. | ||
412 | */ | 423 | */ |
413 | uint_reg_t gp_sqn : 16; | 424 | uint_reg_t gp_sqn : 16; |
414 | /** | 425 | /** |
@@ -451,14 +462,16 @@ typedef union | |||
451 | /** Reserved. */ | 462 | /** Reserved. */ |
452 | uint_reg_t __reserved_5 : 3; | 463 | uint_reg_t __reserved_5 : 3; |
453 | /** | 464 | /** |
454 | * Instance ID. For devices that support more than one mPIPE instance, | 465 | * Instance ID. For devices that support automatic buffer return between |
455 | * this field indicates the buffer owner. If the INST field does not | 466 | * mPIPE instances, this field indicates the buffer owner. If the INST |
456 | * match the mPIPE's instance number when a packet is egressed, buffers | 467 | * field does not match the mPIPE's instance number when a packet is |
457 | * with HWB set will be returned to the other mPIPE instance. | 468 | * egressed, buffers with HWB set will be returned to the other mPIPE |
469 | * instance. Note that not all devices support multi-mPIPE buffer | ||
470 | * return. The MPIPE_EDMA_INFO.REMOTE_BUFF_RTN_SUPPORT bit indicates | ||
471 | * whether the INST field in the buffer descriptor is populated by iDMA | ||
472 | * hardware. | ||
458 | */ | 473 | */ |
459 | uint_reg_t inst : 1; | 474 | uint_reg_t inst : 2; |
460 | /** Reserved. */ | ||
461 | uint_reg_t __reserved_6 : 1; | ||
462 | /** | 475 | /** |
463 | * Always set to one by hardware in iDMA packet descriptors. For eDMA, | 476 | * Always set to one by hardware in iDMA packet descriptors. For eDMA, |
464 | * indicates whether the buffer will be released to the buffer stack | 477 | * indicates whether the buffer will be released to the buffer stack |
@@ -491,8 +504,7 @@ typedef union | |||
491 | uint_reg_t c : 2; | 504 | uint_reg_t c : 2; |
492 | uint_reg_t size : 3; | 505 | uint_reg_t size : 3; |
493 | uint_reg_t hwb : 1; | 506 | uint_reg_t hwb : 1; |
494 | uint_reg_t __reserved_6 : 1; | 507 | uint_reg_t inst : 2; |
495 | uint_reg_t inst : 1; | ||
496 | uint_reg_t __reserved_5 : 3; | 508 | uint_reg_t __reserved_5 : 3; |
497 | uint_reg_t stack_idx : 5; | 509 | uint_reg_t stack_idx : 5; |
498 | uint_reg_t __reserved_4 : 6; | 510 | uint_reg_t __reserved_4 : 6; |
diff --git a/arch/tile/include/arch/trio_constants.h b/arch/tile/include/arch/trio_constants.h index 628b045436b8..85647e91a458 100644 --- a/arch/tile/include/arch/trio_constants.h +++ b/arch/tile/include/arch/trio_constants.h | |||
@@ -16,21 +16,21 @@ | |||
16 | #ifndef __ARCH_TRIO_CONSTANTS_H__ | 16 | #ifndef __ARCH_TRIO_CONSTANTS_H__ |
17 | #define __ARCH_TRIO_CONSTANTS_H__ | 17 | #define __ARCH_TRIO_CONSTANTS_H__ |
18 | 18 | ||
19 | #define TRIO_NUM_ASIDS 16 | 19 | #define TRIO_NUM_ASIDS 32 |
20 | #define TRIO_NUM_TLBS_PER_ASID 16 | 20 | #define TRIO_NUM_TLBS_PER_ASID 16 |
21 | 21 | ||
22 | #define TRIO_NUM_TPIO_REGIONS 8 | 22 | #define TRIO_NUM_TPIO_REGIONS 8 |
23 | #define TRIO_LOG2_NUM_TPIO_REGIONS 3 | 23 | #define TRIO_LOG2_NUM_TPIO_REGIONS 3 |
24 | 24 | ||
25 | #define TRIO_NUM_MAP_MEM_REGIONS 16 | 25 | #define TRIO_NUM_MAP_MEM_REGIONS 32 |
26 | #define TRIO_LOG2_NUM_MAP_MEM_REGIONS 4 | 26 | #define TRIO_LOG2_NUM_MAP_MEM_REGIONS 5 |
27 | #define TRIO_NUM_MAP_SQ_REGIONS 8 | 27 | #define TRIO_NUM_MAP_SQ_REGIONS 8 |
28 | #define TRIO_LOG2_NUM_MAP_SQ_REGIONS 3 | 28 | #define TRIO_LOG2_NUM_MAP_SQ_REGIONS 3 |
29 | 29 | ||
30 | #define TRIO_LOG2_NUM_SQ_FIFO_ENTRIES 6 | 30 | #define TRIO_LOG2_NUM_SQ_FIFO_ENTRIES 6 |
31 | 31 | ||
32 | #define TRIO_NUM_PUSH_DMA_RINGS 32 | 32 | #define TRIO_NUM_PUSH_DMA_RINGS 64 |
33 | 33 | ||
34 | #define TRIO_NUM_PULL_DMA_RINGS 32 | 34 | #define TRIO_NUM_PULL_DMA_RINGS 64 |
35 | 35 | ||
36 | #endif /* __ARCH_TRIO_CONSTANTS_H__ */ | 36 | #endif /* __ARCH_TRIO_CONSTANTS_H__ */ |
diff --git a/arch/tile/include/asm/page.h b/arch/tile/include/asm/page.h index 6346888f7bdc..672768008618 100644 --- a/arch/tile/include/asm/page.h +++ b/arch/tile/include/asm/page.h | |||
@@ -182,10 +182,9 @@ static inline __attribute_const__ int get_order(unsigned long size) | |||
182 | 182 | ||
183 | #define PAGE_OFFSET (-(_AC(1, UL) << (MAX_VA_WIDTH - 1))) | 183 | #define PAGE_OFFSET (-(_AC(1, UL) << (MAX_VA_WIDTH - 1))) |
184 | #define KERNEL_HIGH_VADDR _AC(0xfffffff800000000, UL) /* high 32GB */ | 184 | #define KERNEL_HIGH_VADDR _AC(0xfffffff800000000, UL) /* high 32GB */ |
185 | #define FIXADDR_BASE (KERNEL_HIGH_VADDR - 0x400000000) /* 4 GB */ | 185 | #define FIXADDR_BASE (KERNEL_HIGH_VADDR - 0x300000000) /* 4 GB */ |
186 | #define FIXADDR_TOP (KERNEL_HIGH_VADDR - 0x300000000) /* 4 GB */ | 186 | #define FIXADDR_TOP (KERNEL_HIGH_VADDR - 0x200000000) /* 4 GB */ |
187 | #define _VMALLOC_START FIXADDR_TOP | 187 | #define _VMALLOC_START FIXADDR_TOP |
188 | #define HUGE_VMAP_BASE (KERNEL_HIGH_VADDR - 0x200000000) /* 4 GB */ | ||
189 | #define MEM_SV_START (KERNEL_HIGH_VADDR - 0x100000000) /* 256 MB */ | 188 | #define MEM_SV_START (KERNEL_HIGH_VADDR - 0x100000000) /* 256 MB */ |
190 | #define MEM_MODULE_START (MEM_SV_START + (256*1024*1024)) /* 256 MB */ | 189 | #define MEM_MODULE_START (MEM_SV_START + (256*1024*1024)) /* 256 MB */ |
191 | #define MEM_MODULE_END (MEM_MODULE_START + (256*1024*1024)) | 190 | #define MEM_MODULE_END (MEM_MODULE_START + (256*1024*1024)) |
diff --git a/arch/tile/include/asm/pgtable_32.h b/arch/tile/include/asm/pgtable_32.h index 63142ab3b3dd..d26a42279036 100644 --- a/arch/tile/include/asm/pgtable_32.h +++ b/arch/tile/include/asm/pgtable_32.h | |||
@@ -55,17 +55,9 @@ | |||
55 | #define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE*LAST_PKMAP) & PGDIR_MASK) | 55 | #define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE*LAST_PKMAP) & PGDIR_MASK) |
56 | 56 | ||
57 | #ifdef CONFIG_HIGHMEM | 57 | #ifdef CONFIG_HIGHMEM |
58 | # define __VMAPPING_END (PKMAP_BASE & ~(HPAGE_SIZE-1)) | 58 | # define _VMALLOC_END (PKMAP_BASE & ~(HPAGE_SIZE-1)) |
59 | #else | 59 | #else |
60 | # define __VMAPPING_END (FIXADDR_START & ~(HPAGE_SIZE-1)) | 60 | # define _VMALLOC_END (FIXADDR_START & ~(HPAGE_SIZE-1)) |
61 | #endif | ||
62 | |||
63 | #ifdef CONFIG_HUGEVMAP | ||
64 | #define HUGE_VMAP_END __VMAPPING_END | ||
65 | #define HUGE_VMAP_BASE (HUGE_VMAP_END - CONFIG_NR_HUGE_VMAPS * HPAGE_SIZE) | ||
66 | #define _VMALLOC_END HUGE_VMAP_BASE | ||
67 | #else | ||
68 | #define _VMALLOC_END __VMAPPING_END | ||
69 | #endif | 61 | #endif |
70 | 62 | ||
71 | /* | 63 | /* |
diff --git a/arch/tile/include/asm/pgtable_64.h b/arch/tile/include/asm/pgtable_64.h index 3421177f7370..2c8a9cd102d3 100644 --- a/arch/tile/include/asm/pgtable_64.h +++ b/arch/tile/include/asm/pgtable_64.h | |||
@@ -52,12 +52,10 @@ | |||
52 | * memory allocation code). The vmalloc code puts in an internal | 52 | * memory allocation code). The vmalloc code puts in an internal |
53 | * guard page between each allocation. | 53 | * guard page between each allocation. |
54 | */ | 54 | */ |
55 | #define _VMALLOC_END HUGE_VMAP_BASE | 55 | #define _VMALLOC_END MEM_SV_START |
56 | #define VMALLOC_END _VMALLOC_END | 56 | #define VMALLOC_END _VMALLOC_END |
57 | #define VMALLOC_START _VMALLOC_START | 57 | #define VMALLOC_START _VMALLOC_START |
58 | 58 | ||
59 | #define HUGE_VMAP_END (HUGE_VMAP_BASE + PGDIR_SIZE) | ||
60 | |||
61 | #ifndef __ASSEMBLY__ | 59 | #ifndef __ASSEMBLY__ |
62 | 60 | ||
63 | /* We have no pud since we are a three-level page table. */ | 61 | /* We have no pud since we are a three-level page table. */ |
diff --git a/arch/tile/include/gxio/iorpc_mpipe.h b/arch/tile/include/gxio/iorpc_mpipe.h index fdd07f88cfd7..4cda03de734f 100644 --- a/arch/tile/include/gxio/iorpc_mpipe.h +++ b/arch/tile/include/gxio/iorpc_mpipe.h | |||
@@ -56,89 +56,89 @@ | |||
56 | #define GXIO_MPIPE_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) | 56 | #define GXIO_MPIPE_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) |
57 | #define GXIO_MPIPE_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) | 57 | #define GXIO_MPIPE_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) |
58 | 58 | ||
59 | int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t * context, | 59 | int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t *context, |
60 | unsigned int count, unsigned int first, | 60 | unsigned int count, unsigned int first, |
61 | unsigned int flags); | 61 | unsigned int flags); |
62 | 62 | ||
63 | int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t * context, | 63 | int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t *context, |
64 | void *mem_va, size_t mem_size, | 64 | void *mem_va, size_t mem_size, |
65 | unsigned int mem_flags, unsigned int stack, | 65 | unsigned int mem_flags, unsigned int stack, |
66 | unsigned int buffer_size_enum); | 66 | unsigned int buffer_size_enum); |
67 | 67 | ||
68 | 68 | ||
69 | int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t * context, | 69 | int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t *context, |
70 | unsigned int count, unsigned int first, | 70 | unsigned int count, unsigned int first, |
71 | unsigned int flags); | 71 | unsigned int flags); |
72 | 72 | ||
73 | int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t * context, void *mem_va, | 73 | int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t *context, void *mem_va, |
74 | size_t mem_size, unsigned int mem_flags, | 74 | size_t mem_size, unsigned int mem_flags, |
75 | unsigned int ring); | 75 | unsigned int ring); |
76 | 76 | ||
77 | int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t * context, | 77 | int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t *context, |
78 | int inter_x, int inter_y, | 78 | int inter_x, int inter_y, |
79 | int inter_ipi, int inter_event, | 79 | int inter_ipi, int inter_event, |
80 | unsigned int ring); | 80 | unsigned int ring); |
81 | 81 | ||
82 | int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t * context, | 82 | int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t *context, |
83 | unsigned int ring); | 83 | unsigned int ring); |
84 | 84 | ||
85 | int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t * context, | 85 | int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t *context, |
86 | unsigned int count, unsigned int first, | 86 | unsigned int count, unsigned int first, |
87 | unsigned int flags); | 87 | unsigned int flags); |
88 | 88 | ||
89 | int gxio_mpipe_init_notif_group(gxio_mpipe_context_t * context, | 89 | int gxio_mpipe_init_notif_group(gxio_mpipe_context_t *context, |
90 | unsigned int group, | 90 | unsigned int group, |
91 | gxio_mpipe_notif_group_bits_t bits); | 91 | gxio_mpipe_notif_group_bits_t bits); |
92 | 92 | ||
93 | int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t * context, unsigned int count, | 93 | int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t *context, unsigned int count, |
94 | unsigned int first, unsigned int flags); | 94 | unsigned int first, unsigned int flags); |
95 | 95 | ||
96 | int gxio_mpipe_init_bucket(gxio_mpipe_context_t * context, unsigned int bucket, | 96 | int gxio_mpipe_init_bucket(gxio_mpipe_context_t *context, unsigned int bucket, |
97 | MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info); | 97 | MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info); |
98 | 98 | ||
99 | int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t * context, | 99 | int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t *context, |
100 | unsigned int count, unsigned int first, | 100 | unsigned int count, unsigned int first, |
101 | unsigned int flags); | 101 | unsigned int flags); |
102 | 102 | ||
103 | int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t * context, void *mem_va, | 103 | int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t *context, void *mem_va, |
104 | size_t mem_size, unsigned int mem_flags, | 104 | size_t mem_size, unsigned int mem_flags, |
105 | unsigned int ring, unsigned int channel); | 105 | unsigned int ring, unsigned int channel); |
106 | 106 | ||
107 | 107 | ||
108 | int gxio_mpipe_commit_rules(gxio_mpipe_context_t * context, const void *blob, | 108 | int gxio_mpipe_commit_rules(gxio_mpipe_context_t *context, const void *blob, |
109 | size_t blob_size); | 109 | size_t blob_size); |
110 | 110 | ||
111 | int gxio_mpipe_register_client_memory(gxio_mpipe_context_t * context, | 111 | int gxio_mpipe_register_client_memory(gxio_mpipe_context_t *context, |
112 | unsigned int iotlb, HV_PTE pte, | 112 | unsigned int iotlb, HV_PTE pte, |
113 | unsigned int flags); | 113 | unsigned int flags); |
114 | 114 | ||
115 | int gxio_mpipe_link_open_aux(gxio_mpipe_context_t * context, | 115 | int gxio_mpipe_link_open_aux(gxio_mpipe_context_t *context, |
116 | _gxio_mpipe_link_name_t name, unsigned int flags); | 116 | _gxio_mpipe_link_name_t name, unsigned int flags); |
117 | 117 | ||
118 | int gxio_mpipe_link_close_aux(gxio_mpipe_context_t * context, int mac); | 118 | int gxio_mpipe_link_close_aux(gxio_mpipe_context_t *context, int mac); |
119 | 119 | ||
120 | int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t * context, int mac, | 120 | int gxio_mpipe_link_set_attr_aux(gxio_mpipe_context_t *context, int mac, |
121 | uint32_t attr, int64_t val); | 121 | uint32_t attr, int64_t val); |
122 | 122 | ||
123 | int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t * context, uint64_t * sec, | 123 | int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t *context, uint64_t *sec, |
124 | uint64_t * nsec, uint64_t * cycles); | 124 | uint64_t *nsec, uint64_t *cycles); |
125 | 125 | ||
126 | int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t * context, uint64_t sec, | 126 | int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t *context, uint64_t sec, |
127 | uint64_t nsec, uint64_t cycles); | 127 | uint64_t nsec, uint64_t cycles); |
128 | 128 | ||
129 | int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t * context, | 129 | int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t *context, |
130 | int64_t nsec); | 130 | int64_t nsec); |
131 | 131 | ||
132 | int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t * context, | 132 | int gxio_mpipe_adjust_timestamp_freq(gxio_mpipe_context_t *context, |
133 | int32_t ppb); | 133 | int32_t ppb); |
134 | 134 | ||
135 | int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t * context, int pollfd_cookie); | 135 | int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie); |
136 | 136 | ||
137 | int gxio_mpipe_close_pollfd(gxio_mpipe_context_t * context, int pollfd_cookie); | 137 | int gxio_mpipe_close_pollfd(gxio_mpipe_context_t *context, int pollfd_cookie); |
138 | 138 | ||
139 | int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t * context, HV_PTE *base); | 139 | int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t *context, HV_PTE *base); |
140 | 140 | ||
141 | int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t * context, | 141 | int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t *context, |
142 | unsigned long offset, unsigned long size); | 142 | unsigned long offset, unsigned long size); |
143 | 143 | ||
144 | #endif /* !__GXIO_MPIPE_LINUX_RPC_H__ */ | 144 | #endif /* !__GXIO_MPIPE_LINUX_RPC_H__ */ |
diff --git a/arch/tile/include/gxio/iorpc_mpipe_info.h b/arch/tile/include/gxio/iorpc_mpipe_info.h index 476c5e5ca22c..f0b04284468b 100644 --- a/arch/tile/include/gxio/iorpc_mpipe_info.h +++ b/arch/tile/include/gxio/iorpc_mpipe_info.h | |||
@@ -33,18 +33,18 @@ | |||
33 | #define GXIO_MPIPE_INFO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) | 33 | #define GXIO_MPIPE_INFO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) |
34 | 34 | ||
35 | 35 | ||
36 | int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t * context, | 36 | int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t *context, |
37 | _gxio_mpipe_link_name_t name); | 37 | _gxio_mpipe_link_name_t name); |
38 | 38 | ||
39 | int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context, | 39 | int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t *context, |
40 | unsigned int idx, | 40 | unsigned int idx, |
41 | _gxio_mpipe_link_name_t * name, | 41 | _gxio_mpipe_link_name_t *name, |
42 | _gxio_mpipe_link_mac_t * mac); | 42 | _gxio_mpipe_link_mac_t *mac); |
43 | 43 | ||
44 | int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t * context, | 44 | int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t *context, |
45 | HV_PTE *base); | 45 | HV_PTE *base); |
46 | 46 | ||
47 | int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t * context, | 47 | int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t *context, |
48 | unsigned long offset, unsigned long size); | 48 | unsigned long offset, unsigned long size); |
49 | 49 | ||
50 | #endif /* !__GXIO_MPIPE_INFO_LINUX_RPC_H__ */ | 50 | #endif /* !__GXIO_MPIPE_INFO_LINUX_RPC_H__ */ |
diff --git a/arch/tile/include/gxio/iorpc_trio.h b/arch/tile/include/gxio/iorpc_trio.h index d95b96fd6c93..376a4f771167 100644 --- a/arch/tile/include/gxio/iorpc_trio.h +++ b/arch/tile/include/gxio/iorpc_trio.h | |||
@@ -46,59 +46,59 @@ | |||
46 | #define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) | 46 | #define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) |
47 | #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) | 47 | #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) |
48 | 48 | ||
49 | int gxio_trio_alloc_asids(gxio_trio_context_t * context, unsigned int count, | 49 | int gxio_trio_alloc_asids(gxio_trio_context_t *context, unsigned int count, |
50 | unsigned int first, unsigned int flags); | 50 | unsigned int first, unsigned int flags); |
51 | 51 | ||
52 | 52 | ||
53 | int gxio_trio_alloc_memory_maps(gxio_trio_context_t * context, | 53 | int gxio_trio_alloc_memory_maps(gxio_trio_context_t *context, |
54 | unsigned int count, unsigned int first, | 54 | unsigned int count, unsigned int first, |
55 | unsigned int flags); | 55 | unsigned int flags); |
56 | 56 | ||
57 | 57 | ||
58 | int gxio_trio_alloc_scatter_queues(gxio_trio_context_t * context, | 58 | int gxio_trio_alloc_scatter_queues(gxio_trio_context_t *context, |
59 | unsigned int count, unsigned int first, | 59 | unsigned int count, unsigned int first, |
60 | unsigned int flags); | 60 | unsigned int flags); |
61 | 61 | ||
62 | int gxio_trio_alloc_pio_regions(gxio_trio_context_t * context, | 62 | int gxio_trio_alloc_pio_regions(gxio_trio_context_t *context, |
63 | unsigned int count, unsigned int first, | 63 | unsigned int count, unsigned int first, |
64 | unsigned int flags); | 64 | unsigned int flags); |
65 | 65 | ||
66 | int gxio_trio_init_pio_region_aux(gxio_trio_context_t * context, | 66 | int gxio_trio_init_pio_region_aux(gxio_trio_context_t *context, |
67 | unsigned int pio_region, unsigned int mac, | 67 | unsigned int pio_region, unsigned int mac, |
68 | uint32_t bus_address_hi, unsigned int flags); | 68 | uint32_t bus_address_hi, unsigned int flags); |
69 | 69 | ||
70 | 70 | ||
71 | int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t * context, | 71 | int gxio_trio_init_memory_map_mmu_aux(gxio_trio_context_t *context, |
72 | unsigned int map, unsigned long va, | 72 | unsigned int map, unsigned long va, |
73 | uint64_t size, unsigned int asid, | 73 | uint64_t size, unsigned int asid, |
74 | unsigned int mac, uint64_t bus_address, | 74 | unsigned int mac, uint64_t bus_address, |
75 | unsigned int node, | 75 | unsigned int node, |
76 | unsigned int order_mode); | 76 | unsigned int order_mode); |
77 | 77 | ||
78 | int gxio_trio_get_port_property(gxio_trio_context_t * context, | 78 | int gxio_trio_get_port_property(gxio_trio_context_t *context, |
79 | struct pcie_trio_ports_property *trio_ports); | 79 | struct pcie_trio_ports_property *trio_ports); |
80 | 80 | ||
81 | int gxio_trio_config_legacy_intr(gxio_trio_context_t * context, int inter_x, | 81 | int gxio_trio_config_legacy_intr(gxio_trio_context_t *context, int inter_x, |
82 | int inter_y, int inter_ipi, int inter_event, | 82 | int inter_y, int inter_ipi, int inter_event, |
83 | unsigned int mac, unsigned int intx); | 83 | unsigned int mac, unsigned int intx); |
84 | 84 | ||
85 | int gxio_trio_config_msi_intr(gxio_trio_context_t * context, int inter_x, | 85 | int gxio_trio_config_msi_intr(gxio_trio_context_t *context, int inter_x, |
86 | int inter_y, int inter_ipi, int inter_event, | 86 | int inter_y, int inter_ipi, int inter_event, |
87 | unsigned int mac, unsigned int mem_map, | 87 | unsigned int mac, unsigned int mem_map, |
88 | uint64_t mem_map_base, uint64_t mem_map_limit, | 88 | uint64_t mem_map_base, uint64_t mem_map_limit, |
89 | unsigned int asid); | 89 | unsigned int asid); |
90 | 90 | ||
91 | 91 | ||
92 | int gxio_trio_set_mps_mrs(gxio_trio_context_t * context, uint16_t mps, | 92 | int gxio_trio_set_mps_mrs(gxio_trio_context_t *context, uint16_t mps, |
93 | uint16_t mrs, unsigned int mac); | 93 | uint16_t mrs, unsigned int mac); |
94 | 94 | ||
95 | int gxio_trio_force_rc_link_up(gxio_trio_context_t * context, unsigned int mac); | 95 | int gxio_trio_force_rc_link_up(gxio_trio_context_t *context, unsigned int mac); |
96 | 96 | ||
97 | int gxio_trio_force_ep_link_up(gxio_trio_context_t * context, unsigned int mac); | 97 | int gxio_trio_force_ep_link_up(gxio_trio_context_t *context, unsigned int mac); |
98 | 98 | ||
99 | int gxio_trio_get_mmio_base(gxio_trio_context_t * context, HV_PTE *base); | 99 | int gxio_trio_get_mmio_base(gxio_trio_context_t *context, HV_PTE *base); |
100 | 100 | ||
101 | int gxio_trio_check_mmio_offset(gxio_trio_context_t * context, | 101 | int gxio_trio_check_mmio_offset(gxio_trio_context_t *context, |
102 | unsigned long offset, unsigned long size); | 102 | unsigned long offset, unsigned long size); |
103 | 103 | ||
104 | #endif /* !__GXIO_TRIO_LINUX_RPC_H__ */ | 104 | #endif /* !__GXIO_TRIO_LINUX_RPC_H__ */ |
diff --git a/arch/tile/include/gxio/iorpc_usb_host.h b/arch/tile/include/gxio/iorpc_usb_host.h index 8622e7d126ad..79962a97de8e 100644 --- a/arch/tile/include/gxio/iorpc_usb_host.h +++ b/arch/tile/include/gxio/iorpc_usb_host.h | |||
@@ -31,16 +31,16 @@ | |||
31 | #define GXIO_USB_HOST_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) | 31 | #define GXIO_USB_HOST_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) |
32 | #define GXIO_USB_HOST_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) | 32 | #define GXIO_USB_HOST_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) |
33 | 33 | ||
34 | int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t * context, int inter_x, | 34 | int gxio_usb_host_cfg_interrupt(gxio_usb_host_context_t *context, int inter_x, |
35 | int inter_y, int inter_ipi, int inter_event); | 35 | int inter_y, int inter_ipi, int inter_event); |
36 | 36 | ||
37 | int gxio_usb_host_register_client_memory(gxio_usb_host_context_t * context, | 37 | int gxio_usb_host_register_client_memory(gxio_usb_host_context_t *context, |
38 | HV_PTE pte, unsigned int flags); | 38 | HV_PTE pte, unsigned int flags); |
39 | 39 | ||
40 | int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t * context, | 40 | int gxio_usb_host_get_mmio_base(gxio_usb_host_context_t *context, |
41 | HV_PTE *base); | 41 | HV_PTE *base); |
42 | 42 | ||
43 | int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t * context, | 43 | int gxio_usb_host_check_mmio_offset(gxio_usb_host_context_t *context, |
44 | unsigned long offset, unsigned long size); | 44 | unsigned long offset, unsigned long size); |
45 | 45 | ||
46 | #endif /* !__GXIO_USB_HOST_LINUX_RPC_H__ */ | 46 | #endif /* !__GXIO_USB_HOST_LINUX_RPC_H__ */ |
diff --git a/arch/tile/include/gxio/usb_host.h b/arch/tile/include/gxio/usb_host.h index 5eedec0e988e..93c9636d2dd7 100644 --- a/arch/tile/include/gxio/usb_host.h +++ b/arch/tile/include/gxio/usb_host.h | |||
@@ -53,7 +53,7 @@ typedef struct { | |||
53 | * @return Zero if the context was successfully initialized, else a | 53 | * @return Zero if the context was successfully initialized, else a |
54 | * GXIO_ERR_xxx error code. | 54 | * GXIO_ERR_xxx error code. |
55 | */ | 55 | */ |
56 | extern int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index, | 56 | extern int gxio_usb_host_init(gxio_usb_host_context_t *context, int usb_index, |
57 | int is_ehci); | 57 | int is_ehci); |
58 | 58 | ||
59 | /* Destroy a USB context. | 59 | /* Destroy a USB context. |
@@ -68,20 +68,20 @@ extern int gxio_usb_host_init(gxio_usb_host_context_t * context, int usb_index, | |||
68 | * @return Zero if the context was successfully destroyed, else a | 68 | * @return Zero if the context was successfully destroyed, else a |
69 | * GXIO_ERR_xxx error code. | 69 | * GXIO_ERR_xxx error code. |
70 | */ | 70 | */ |
71 | extern int gxio_usb_host_destroy(gxio_usb_host_context_t * context); | 71 | extern int gxio_usb_host_destroy(gxio_usb_host_context_t *context); |
72 | 72 | ||
73 | /* Retrieve the address of the shim's MMIO registers. | 73 | /* Retrieve the address of the shim's MMIO registers. |
74 | * | 74 | * |
75 | * @param context Pointer to a properly initialized gxio_usb_host_context_t. | 75 | * @param context Pointer to a properly initialized gxio_usb_host_context_t. |
76 | * @return The address of the shim's MMIO registers. | 76 | * @return The address of the shim's MMIO registers. |
77 | */ | 77 | */ |
78 | extern void *gxio_usb_host_get_reg_start(gxio_usb_host_context_t * context); | 78 | extern void *gxio_usb_host_get_reg_start(gxio_usb_host_context_t *context); |
79 | 79 | ||
80 | /* Retrieve the length of the shim's MMIO registers. | 80 | /* Retrieve the length of the shim's MMIO registers. |
81 | * | 81 | * |
82 | * @param context Pointer to a properly initialized gxio_usb_host_context_t. | 82 | * @param context Pointer to a properly initialized gxio_usb_host_context_t. |
83 | * @return The length of the shim's MMIO registers. | 83 | * @return The length of the shim's MMIO registers. |
84 | */ | 84 | */ |
85 | extern size_t gxio_usb_host_get_reg_len(gxio_usb_host_context_t * context); | 85 | extern size_t gxio_usb_host_get_reg_len(gxio_usb_host_context_t *context); |
86 | 86 | ||
87 | #endif /* _GXIO_USB_H_ */ | 87 | #endif /* _GXIO_USB_H_ */ |
diff --git a/arch/tile/kernel/compat.c b/arch/tile/kernel/compat.c index ed378416b86a..49120843ff96 100644 --- a/arch/tile/kernel/compat.c +++ b/arch/tile/kernel/compat.c | |||
@@ -84,7 +84,7 @@ COMPAT_SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned int, offset_high, | |||
84 | { | 84 | { |
85 | return sys_llseek(fd, offset_high, offset_low, result, origin); | 85 | return sys_llseek(fd, offset_high, offset_low, result, origin); |
86 | } | 86 | } |
87 | 87 | ||
88 | /* Provide the compat syscall number to call mapping. */ | 88 | /* Provide the compat syscall number to call mapping. */ |
89 | #undef __SYSCALL | 89 | #undef __SYSCALL |
90 | #define __SYSCALL(nr, call) [nr] = (call), | 90 | #define __SYSCALL(nr, call) [nr] = (call), |
diff --git a/arch/tile/kernel/futex_64.S b/arch/tile/kernel/futex_64.S deleted file mode 100644 index f465d1eda20f..000000000000 --- a/arch/tile/kernel/futex_64.S +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * Atomically access user memory, but use MMU to avoid propagating | ||
15 | * kernel exceptions. | ||
16 | */ | ||
17 | |||
18 | #include <linux/linkage.h> | ||
19 | #include <asm/errno.h> | ||
20 | #include <asm/futex.h> | ||
21 | #include <asm/page.h> | ||
22 | #include <asm/processor.h> | ||
23 | |||
24 | /* | ||
25 | * Provide a set of atomic memory operations supporting <asm/futex.h>. | ||
26 | * | ||
27 | * r0: user address to manipulate | ||
28 | * r1: new value to write, or for cmpxchg, old value to compare against | ||
29 | * r2: (cmpxchg only) new value to write | ||
30 | * | ||
31 | * Return __get_user struct, r0 with value, r1 with error. | ||
32 | */ | ||
33 | #define FUTEX_OP(name, ...) \ | ||
34 | STD_ENTRY(futex_##name) \ | ||
35 | __VA_ARGS__; \ | ||
36 | { \ | ||
37 | move r1, zero; \ | ||
38 | jrp lr \ | ||
39 | }; \ | ||
40 | STD_ENDPROC(futex_##name); \ | ||
41 | .pushsection __ex_table,"a"; \ | ||
42 | .quad 1b, get_user_fault; \ | ||
43 | .popsection | ||
44 | |||
45 | .pushsection .fixup,"ax" | ||
46 | get_user_fault: | ||
47 | { movei r1, -EFAULT; jrp lr } | ||
48 | ENDPROC(get_user_fault) | ||
49 | .popsection | ||
50 | |||
51 | FUTEX_OP(cmpxchg, mtspr CMPEXCH_VALUE, r1; 1: cmpexch4 r0, r0, r2) | ||
52 | FUTEX_OP(set, 1: exch4 r0, r0, r1) | ||
53 | FUTEX_OP(add, 1: fetchadd4 r0, r0, r1) | ||
54 | FUTEX_OP(or, 1: fetchor4 r0, r0, r1) | ||
55 | FUTEX_OP(andn, nor r1, r1, zero; 1: fetchand4 r0, r0, r1) | ||
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c index 4c34caea9dd3..74c91729a62a 100644 --- a/arch/tile/kernel/setup.c +++ b/arch/tile/kernel/setup.c | |||
@@ -1268,8 +1268,7 @@ static void __init validate_va(void) | |||
1268 | if ((long)VMALLOC_START >= 0) | 1268 | if ((long)VMALLOC_START >= 0) |
1269 | early_panic( | 1269 | early_panic( |
1270 | "Linux VMALLOC region below the 2GB line (%#lx)!\n" | 1270 | "Linux VMALLOC region below the 2GB line (%#lx)!\n" |
1271 | "Reconfigure the kernel with fewer NR_HUGE_VMAPS\n" | 1271 | "Reconfigure the kernel with smaller VMALLOC_RESERVE.\n", |
1272 | "or smaller VMALLOC_RESERVE.\n", | ||
1273 | VMALLOC_START); | 1272 | VMALLOC_START); |
1274 | #endif | 1273 | #endif |
1275 | } | 1274 | } |
diff --git a/arch/tile/kernel/unaligned.c b/arch/tile/kernel/unaligned.c index b425fb6a480d..b030b4e78845 100644 --- a/arch/tile/kernel/unaligned.c +++ b/arch/tile/kernel/unaligned.c | |||
@@ -551,8 +551,8 @@ static tilegx_bundle_bits jit_x1_bnezt(int ra, int broff) | |||
551 | /* | 551 | /* |
552 | * This function generates unalign fixup JIT. | 552 | * This function generates unalign fixup JIT. |
553 | * | 553 | * |
554 | * We fist find unalign load/store instruction's destination, source | 554 | * We first find unalign load/store instruction's destination, source |
555 | * reguisters: ra, rb and rd. and 3 scratch registers by calling | 555 | * registers: ra, rb and rd. and 3 scratch registers by calling |
556 | * find_regs(...). 3 scratch clobbers should not alias with any register | 556 | * find_regs(...). 3 scratch clobbers should not alias with any register |
557 | * used in the fault bundle. Then analyze the fault bundle to determine | 557 | * used in the fault bundle. Then analyze the fault bundle to determine |
558 | * if it's a load or store, operand width, branch or address increment etc. | 558 | * if it's a load or store, operand width, branch or address increment etc. |
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index 4c288f199453..6c0571216a9d 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
@@ -149,8 +149,6 @@ static inline int vmalloc_fault(pgd_t *pgd, unsigned long address) | |||
149 | pmd_k = vmalloc_sync_one(pgd, address); | 149 | pmd_k = vmalloc_sync_one(pgd, address); |
150 | if (!pmd_k) | 150 | if (!pmd_k) |
151 | return -1; | 151 | return -1; |
152 | if (pmd_huge(*pmd_k)) | ||
153 | return 0; /* support TILE huge_vmap() API */ | ||
154 | pte_k = pte_offset_kernel(pmd_k, address); | 152 | pte_k = pte_offset_kernel(pmd_k, address); |
155 | if (!pte_present(*pte_k)) | 153 | if (!pte_present(*pte_k)) |
156 | return -1; | 154 | return -1; |
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c index 4e316deb92fd..0fa1acfac79a 100644 --- a/arch/tile/mm/init.c +++ b/arch/tile/mm/init.c | |||
@@ -828,10 +828,6 @@ void __init mem_init(void) | |||
828 | printk(KERN_DEBUG " PKMAP %#lx - %#lx\n", | 828 | printk(KERN_DEBUG " PKMAP %#lx - %#lx\n", |
829 | PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP) - 1); | 829 | PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP) - 1); |
830 | #endif | 830 | #endif |
831 | #ifdef CONFIG_HUGEVMAP | ||
832 | printk(KERN_DEBUG " HUGEMAP %#lx - %#lx\n", | ||
833 | HUGE_VMAP_BASE, HUGE_VMAP_END - 1); | ||
834 | #endif | ||
835 | printk(KERN_DEBUG " VMALLOC %#lx - %#lx\n", | 831 | printk(KERN_DEBUG " VMALLOC %#lx - %#lx\n", |
836 | _VMALLOC_START, _VMALLOC_END - 1); | 832 | _VMALLOC_START, _VMALLOC_END - 1); |
837 | #ifdef __tilegx__ | 833 | #ifdef __tilegx__ |
diff --git a/arch/tile/mm/pgtable.c b/arch/tile/mm/pgtable.c index 2deaddf3e01f..4fd9ec0b58ed 100644 --- a/arch/tile/mm/pgtable.c +++ b/arch/tile/mm/pgtable.c | |||
@@ -127,8 +127,7 @@ void shatter_huge_page(unsigned long addr) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | /* Shatter the huge page into the preallocated L2 page table. */ | 129 | /* Shatter the huge page into the preallocated L2 page table. */ |
130 | pmd_populate_kernel(&init_mm, pmd, | 130 | pmd_populate_kernel(&init_mm, pmd, get_prealloc_pte(pmd_pfn(*pmd))); |
131 | get_prealloc_pte(pte_pfn(*(pte_t *)pmd))); | ||
132 | 131 | ||
133 | #ifdef __PAGETABLE_PMD_FOLDED | 132 | #ifdef __PAGETABLE_PMD_FOLDED |
134 | /* Walk every pgd on the system and update the pmd there. */ | 133 | /* Walk every pgd on the system and update the pmd there. */ |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e241a1930c98..ee2fb9d37745 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -481,11 +481,12 @@ config X86_INTEL_LPSS | |||
481 | bool "Intel Low Power Subsystem Support" | 481 | bool "Intel Low Power Subsystem Support" |
482 | depends on ACPI | 482 | depends on ACPI |
483 | select COMMON_CLK | 483 | select COMMON_CLK |
484 | select PINCTRL | ||
484 | ---help--- | 485 | ---help--- |
485 | Select to build support for Intel Low Power Subsystem such as | 486 | Select to build support for Intel Low Power Subsystem such as |
486 | found on Intel Lynxpoint PCH. Selecting this option enables | 487 | found on Intel Lynxpoint PCH. Selecting this option enables |
487 | things like clock tree (common clock framework) which are needed | 488 | things like clock tree (common clock framework) and pincontrol |
488 | by the LPSS peripheral drivers. | 489 | which are needed by the LPSS peripheral drivers. |
489 | 490 | ||
490 | config X86_RDC321X | 491 | config X86_RDC321X |
491 | bool "RDC R-321x SoC" | 492 | bool "RDC R-321x SoC" |
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 6aef9fbc09b7..b913915e8e63 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -79,30 +79,38 @@ static inline int phys_to_machine_mapping_valid(unsigned long pfn) | |||
79 | return get_phys_to_machine(pfn) != INVALID_P2M_ENTRY; | 79 | return get_phys_to_machine(pfn) != INVALID_P2M_ENTRY; |
80 | } | 80 | } |
81 | 81 | ||
82 | static inline unsigned long mfn_to_pfn(unsigned long mfn) | 82 | static inline unsigned long mfn_to_pfn_no_overrides(unsigned long mfn) |
83 | { | 83 | { |
84 | unsigned long pfn; | 84 | unsigned long pfn; |
85 | int ret = 0; | 85 | int ret; |
86 | 86 | ||
87 | if (xen_feature(XENFEAT_auto_translated_physmap)) | 87 | if (xen_feature(XENFEAT_auto_translated_physmap)) |
88 | return mfn; | 88 | return mfn; |
89 | 89 | ||
90 | if (unlikely(mfn >= machine_to_phys_nr)) { | 90 | if (unlikely(mfn >= machine_to_phys_nr)) |
91 | pfn = ~0; | 91 | return ~0; |
92 | goto try_override; | 92 | |
93 | } | ||
94 | pfn = 0; | ||
95 | /* | 93 | /* |
96 | * The array access can fail (e.g., device space beyond end of RAM). | 94 | * The array access can fail (e.g., device space beyond end of RAM). |
97 | * In such cases it doesn't matter what we return (we return garbage), | 95 | * In such cases it doesn't matter what we return (we return garbage), |
98 | * but we must handle the fault without crashing! | 96 | * but we must handle the fault without crashing! |
99 | */ | 97 | */ |
100 | ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); | 98 | ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); |
101 | try_override: | ||
102 | /* ret might be < 0 if there are no entries in the m2p for mfn */ | ||
103 | if (ret < 0) | 99 | if (ret < 0) |
104 | pfn = ~0; | 100 | return ~0; |
105 | else if (get_phys_to_machine(pfn) != mfn) | 101 | |
102 | return pfn; | ||
103 | } | ||
104 | |||
105 | static inline unsigned long mfn_to_pfn(unsigned long mfn) | ||
106 | { | ||
107 | unsigned long pfn; | ||
108 | |||
109 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
110 | return mfn; | ||
111 | |||
112 | pfn = mfn_to_pfn_no_overrides(mfn); | ||
113 | if (get_phys_to_machine(pfn) != mfn) { | ||
106 | /* | 114 | /* |
107 | * If this appears to be a foreign mfn (because the pfn | 115 | * If this appears to be a foreign mfn (because the pfn |
108 | * doesn't map back to the mfn), then check the local override | 116 | * doesn't map back to the mfn), then check the local override |
@@ -111,6 +119,7 @@ try_override: | |||
111 | * m2p_find_override_pfn returns ~0 if it doesn't find anything. | 119 | * m2p_find_override_pfn returns ~0 if it doesn't find anything. |
112 | */ | 120 | */ |
113 | pfn = m2p_find_override_pfn(mfn, ~0); | 121 | pfn = m2p_find_override_pfn(mfn, ~0); |
122 | } | ||
114 | 123 | ||
115 | /* | 124 | /* |
116 | * pfn is ~0 if there are no entries in the m2p for mfn or if the | 125 | * pfn is ~0 if there are no entries in the m2p for mfn or if the |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 8355c84b9729..897783b3302a 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -1506,7 +1506,7 @@ static int __init init_hw_perf_events(void) | |||
1506 | err = amd_pmu_init(); | 1506 | err = amd_pmu_init(); |
1507 | break; | 1507 | break; |
1508 | default: | 1508 | default: |
1509 | return 0; | 1509 | err = -ENOTSUPP; |
1510 | } | 1510 | } |
1511 | if (err != 0) { | 1511 | if (err != 0) { |
1512 | pr_cont("no PMU driver, software events only.\n"); | 1512 | pr_cont("no PMU driver, software events only.\n"); |
@@ -1883,9 +1883,9 @@ static struct pmu pmu = { | |||
1883 | 1883 | ||
1884 | void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now) | 1884 | void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now) |
1885 | { | 1885 | { |
1886 | userpg->cap_usr_time = 0; | 1886 | userpg->cap_user_time = 0; |
1887 | userpg->cap_usr_time_zero = 0; | 1887 | userpg->cap_user_time_zero = 0; |
1888 | userpg->cap_usr_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 (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) |
@@ -1894,13 +1894,13 @@ void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now) | |||
1894 | if (!boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) | 1894 | if (!boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) |
1895 | return; | 1895 | return; |
1896 | 1896 | ||
1897 | userpg->cap_usr_time = 1; | 1897 | userpg->cap_user_time = 1; |
1898 | userpg->time_mult = this_cpu_read(cyc2ns); | 1898 | userpg->time_mult = this_cpu_read(cyc2ns); |
1899 | userpg->time_shift = CYC2NS_SCALE_FACTOR; | 1899 | userpg->time_shift = CYC2NS_SCALE_FACTOR; |
1900 | userpg->time_offset = this_cpu_read(cyc2ns_offset) - now; | 1900 | userpg->time_offset = this_cpu_read(cyc2ns_offset) - now; |
1901 | 1901 | ||
1902 | if (sched_clock_stable && !check_tsc_disabled()) { | 1902 | if (sched_clock_stable && !check_tsc_disabled()) { |
1903 | userpg->cap_usr_time_zero = 1; | 1903 | userpg->cap_user_time_zero = 1; |
1904 | userpg->time_zero = this_cpu_read(cyc2ns_offset); | 1904 | userpg->time_zero = this_cpu_read(cyc2ns_offset); |
1905 | } | 1905 | } |
1906 | } | 1906 | } |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index c62d88396ad5..f31a1655d1ff 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -899,8 +899,8 @@ static __initconst const u64 atom_hw_cache_event_ids | |||
899 | static struct extra_reg intel_slm_extra_regs[] __read_mostly = | 899 | static struct extra_reg intel_slm_extra_regs[] __read_mostly = |
900 | { | 900 | { |
901 | /* must define OFFCORE_RSP_X first, see intel_fixup_er() */ | 901 | /* must define OFFCORE_RSP_X first, see intel_fixup_er() */ |
902 | INTEL_UEVENT_EXTRA_REG(0x01b7, MSR_OFFCORE_RSP_0, 0x768005ffff, RSP_0), | 902 | INTEL_UEVENT_EXTRA_REG(0x01b7, MSR_OFFCORE_RSP_0, 0x768005ffffull, RSP_0), |
903 | INTEL_UEVENT_EXTRA_REG(0x02b7, MSR_OFFCORE_RSP_1, 0x768005ffff, RSP_1), | 903 | INTEL_UEVENT_EXTRA_REG(0x02b7, MSR_OFFCORE_RSP_1, 0x768005ffffull, RSP_1), |
904 | EVENT_EXTRA_END | 904 | EVENT_EXTRA_END |
905 | }; | 905 | }; |
906 | 906 | ||
@@ -2325,6 +2325,7 @@ __init int intel_pmu_init(void) | |||
2325 | break; | 2325 | break; |
2326 | 2326 | ||
2327 | case 55: /* Atom 22nm "Silvermont" */ | 2327 | case 55: /* Atom 22nm "Silvermont" */ |
2328 | case 77: /* Avoton "Silvermont" */ | ||
2328 | memcpy(hw_cache_event_ids, slm_hw_cache_event_ids, | 2329 | memcpy(hw_cache_event_ids, slm_hw_cache_event_ids, |
2329 | sizeof(hw_cache_event_ids)); | 2330 | sizeof(hw_cache_event_ids)); |
2330 | memcpy(hw_cache_extra_regs, slm_hw_cache_extra_regs, | 2331 | memcpy(hw_cache_extra_regs, slm_hw_cache_extra_regs, |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c index 63438aad177f..ab3ba1c1b7dd 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_ds.c +++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c | |||
@@ -584,6 +584,7 @@ struct event_constraint intel_snb_pebs_event_constraints[] = { | |||
584 | INTEL_EVENT_CONSTRAINT(0xd0, 0xf), /* MEM_UOP_RETIRED.* */ | 584 | INTEL_EVENT_CONSTRAINT(0xd0, 0xf), /* MEM_UOP_RETIRED.* */ |
585 | INTEL_EVENT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_UOPS_RETIRED.* */ | 585 | INTEL_EVENT_CONSTRAINT(0xd1, 0xf), /* MEM_LOAD_UOPS_RETIRED.* */ |
586 | INTEL_EVENT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */ | 586 | INTEL_EVENT_CONSTRAINT(0xd2, 0xf), /* MEM_LOAD_UOPS_LLC_HIT_RETIRED.* */ |
587 | INTEL_EVENT_CONSTRAINT(0xd3, 0xf), /* MEM_LOAD_UOPS_LLC_MISS_RETIRED.* */ | ||
587 | INTEL_UEVENT_CONSTRAINT(0x02d4, 0xf), /* MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS */ | 588 | INTEL_UEVENT_CONSTRAINT(0x02d4, 0xf), /* MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS */ |
588 | EVENT_CONSTRAINT_END | 589 | EVENT_CONSTRAINT_END |
589 | }; | 590 | }; |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 8ed44589b0e4..4118f9f68315 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
@@ -2706,14 +2706,14 @@ static void uncore_pmu_init_hrtimer(struct intel_uncore_box *box) | |||
2706 | box->hrtimer.function = uncore_pmu_hrtimer; | 2706 | box->hrtimer.function = uncore_pmu_hrtimer; |
2707 | } | 2707 | } |
2708 | 2708 | ||
2709 | struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type, int cpu) | 2709 | static struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type, int node) |
2710 | { | 2710 | { |
2711 | struct intel_uncore_box *box; | 2711 | struct intel_uncore_box *box; |
2712 | int i, size; | 2712 | int i, size; |
2713 | 2713 | ||
2714 | size = sizeof(*box) + type->num_shared_regs * sizeof(struct intel_uncore_extra_reg); | 2714 | size = sizeof(*box) + type->num_shared_regs * sizeof(struct intel_uncore_extra_reg); |
2715 | 2715 | ||
2716 | box = kzalloc_node(size, GFP_KERNEL, cpu_to_node(cpu)); | 2716 | box = kzalloc_node(size, GFP_KERNEL, node); |
2717 | if (!box) | 2717 | if (!box) |
2718 | return NULL; | 2718 | return NULL; |
2719 | 2719 | ||
@@ -3031,7 +3031,7 @@ static int uncore_validate_group(struct intel_uncore_pmu *pmu, | |||
3031 | struct intel_uncore_box *fake_box; | 3031 | struct intel_uncore_box *fake_box; |
3032 | int ret = -EINVAL, n; | 3032 | int ret = -EINVAL, n; |
3033 | 3033 | ||
3034 | fake_box = uncore_alloc_box(pmu->type, smp_processor_id()); | 3034 | fake_box = uncore_alloc_box(pmu->type, NUMA_NO_NODE); |
3035 | if (!fake_box) | 3035 | if (!fake_box) |
3036 | return -ENOMEM; | 3036 | return -ENOMEM; |
3037 | 3037 | ||
@@ -3294,7 +3294,7 @@ static int uncore_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id | |||
3294 | } | 3294 | } |
3295 | 3295 | ||
3296 | type = pci_uncores[UNCORE_PCI_DEV_TYPE(id->driver_data)]; | 3296 | type = pci_uncores[UNCORE_PCI_DEV_TYPE(id->driver_data)]; |
3297 | box = uncore_alloc_box(type, 0); | 3297 | box = uncore_alloc_box(type, NUMA_NO_NODE); |
3298 | if (!box) | 3298 | if (!box) |
3299 | return -ENOMEM; | 3299 | return -ENOMEM; |
3300 | 3300 | ||
@@ -3499,7 +3499,7 @@ static int uncore_cpu_prepare(int cpu, int phys_id) | |||
3499 | if (pmu->func_id < 0) | 3499 | if (pmu->func_id < 0) |
3500 | pmu->func_id = j; | 3500 | pmu->func_id = j; |
3501 | 3501 | ||
3502 | box = uncore_alloc_box(type, cpu); | 3502 | box = uncore_alloc_box(type, cpu_to_node(cpu)); |
3503 | if (!box) | 3503 | if (!box) |
3504 | return -ENOMEM; | 3504 | return -ENOMEM; |
3505 | 3505 | ||
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 1b69951a81e2..b077f4cc225a 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -487,21 +487,6 @@ ENDPROC(native_usergs_sysret64) | |||
487 | TRACE_IRQS_OFF | 487 | TRACE_IRQS_OFF |
488 | .endm | 488 | .endm |
489 | 489 | ||
490 | ENTRY(save_rest) | ||
491 | PARTIAL_FRAME 1 (REST_SKIP+8) | ||
492 | movq 5*8+16(%rsp), %r11 /* save return address */ | ||
493 | movq_cfi rbx, RBX+16 | ||
494 | movq_cfi rbp, RBP+16 | ||
495 | movq_cfi r12, R12+16 | ||
496 | movq_cfi r13, R13+16 | ||
497 | movq_cfi r14, R14+16 | ||
498 | movq_cfi r15, R15+16 | ||
499 | movq %r11, 8(%rsp) /* return address */ | ||
500 | FIXUP_TOP_OF_STACK %r11, 16 | ||
501 | ret | ||
502 | CFI_ENDPROC | ||
503 | END(save_rest) | ||
504 | |||
505 | /* save complete stack frame */ | 490 | /* save complete stack frame */ |
506 | .pushsection .kprobes.text, "ax" | 491 | .pushsection .kprobes.text, "ax" |
507 | ENTRY(save_paranoid) | 492 | ENTRY(save_paranoid) |
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 7123b5df479d..af99f71aeb7f 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -216,6 +216,7 @@ int apply_microcode_amd(int cpu) | |||
216 | /* need to apply patch? */ | 216 | /* need to apply patch? */ |
217 | if (rev >= mc_amd->hdr.patch_id) { | 217 | if (rev >= mc_amd->hdr.patch_id) { |
218 | c->microcode = rev; | 218 | c->microcode = rev; |
219 | uci->cpu_sig.rev = rev; | ||
219 | return 0; | 220 | return 0; |
220 | } | 221 | } |
221 | 222 | ||
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 563ed91e6faa..e643e744e4d8 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -352,12 +352,28 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
352 | }, | 352 | }, |
353 | { /* Handle problems with rebooting on the Precision M6600. */ | 353 | { /* Handle problems with rebooting on the Precision M6600. */ |
354 | .callback = set_pci_reboot, | 354 | .callback = set_pci_reboot, |
355 | .ident = "Dell OptiPlex 990", | 355 | .ident = "Dell Precision M6600", |
356 | .matches = { | 356 | .matches = { |
357 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | 357 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), |
358 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"), | 358 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"), |
359 | }, | 359 | }, |
360 | }, | 360 | }, |
361 | { /* Handle problems with rebooting on the Dell PowerEdge C6100. */ | ||
362 | .callback = set_pci_reboot, | ||
363 | .ident = "Dell PowerEdge C6100", | ||
364 | .matches = { | ||
365 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
366 | DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), | ||
367 | }, | ||
368 | }, | ||
369 | { /* Some C6100 machines were shipped with vendor being 'Dell'. */ | ||
370 | .callback = set_pci_reboot, | ||
371 | .ident = "Dell PowerEdge C6100", | ||
372 | .matches = { | ||
373 | DMI_MATCH(DMI_SYS_VENDOR, "Dell"), | ||
374 | DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), | ||
375 | }, | ||
376 | }, | ||
361 | { } | 377 | { } |
362 | }; | 378 | }; |
363 | 379 | ||
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index aecc98a93d1b..6cacab671f9b 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -653,6 +653,7 @@ static void announce_cpu(int cpu, int apicid) | |||
653 | { | 653 | { |
654 | static int current_node = -1; | 654 | static int current_node = -1; |
655 | int node = early_cpu_to_node(cpu); | 655 | int node = early_cpu_to_node(cpu); |
656 | int max_cpu_present = find_last_bit(cpumask_bits(cpu_present_mask), NR_CPUS); | ||
656 | 657 | ||
657 | if (system_state == SYSTEM_BOOTING) { | 658 | if (system_state == SYSTEM_BOOTING) { |
658 | if (node != current_node) { | 659 | if (node != current_node) { |
@@ -661,7 +662,7 @@ static void announce_cpu(int cpu, int apicid) | |||
661 | current_node = node; | 662 | current_node = node; |
662 | pr_info("Booting Node %3d, Processors ", node); | 663 | pr_info("Booting Node %3d, Processors ", node); |
663 | } | 664 | } |
664 | pr_cont(" #%d%s", cpu, cpu == (nr_cpu_ids - 1) ? " OK\n" : ""); | 665 | pr_cont(" #%4d%s", cpu, cpu == max_cpu_present ? " OK\n" : ""); |
665 | return; | 666 | return; |
666 | } else | 667 | } else |
667 | pr_info("Booting Node %d Processor %d APIC 0x%x\n", | 668 | pr_info("Booting Node %d Processor %d APIC 0x%x\n", |
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/emulate.c b/arch/x86/kvm/emulate.c index 2bc1e81045b0..ddc3f3d2afdb 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2025,6 +2025,17 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt) | |||
2025 | return rc; | 2025 | return rc; |
2026 | } | 2026 | } |
2027 | 2027 | ||
2028 | static int em_ret_far_imm(struct x86_emulate_ctxt *ctxt) | ||
2029 | { | ||
2030 | int rc; | ||
2031 | |||
2032 | rc = em_ret_far(ctxt); | ||
2033 | if (rc != X86EMUL_CONTINUE) | ||
2034 | return rc; | ||
2035 | rsp_increment(ctxt, ctxt->src.val); | ||
2036 | return X86EMUL_CONTINUE; | ||
2037 | } | ||
2038 | |||
2028 | static int em_cmpxchg(struct x86_emulate_ctxt *ctxt) | 2039 | static int em_cmpxchg(struct x86_emulate_ctxt *ctxt) |
2029 | { | 2040 | { |
2030 | /* Save real source value, then compare EAX against destination. */ | 2041 | /* Save real source value, then compare EAX against destination. */ |
@@ -3763,7 +3774,8 @@ static const struct opcode opcode_table[256] = { | |||
3763 | G(ByteOp, group11), G(0, group11), | 3774 | G(ByteOp, group11), G(0, group11), |
3764 | /* 0xC8 - 0xCF */ | 3775 | /* 0xC8 - 0xCF */ |
3765 | I(Stack | SrcImmU16 | Src2ImmByte, em_enter), I(Stack, em_leave), | 3776 | I(Stack | SrcImmU16 | Src2ImmByte, em_enter), I(Stack, em_leave), |
3766 | N, I(ImplicitOps | Stack, em_ret_far), | 3777 | I(ImplicitOps | Stack | SrcImmU16, em_ret_far_imm), |
3778 | I(ImplicitOps | Stack, em_ret_far), | ||
3767 | D(ImplicitOps), DI(SrcImmByte, intn), | 3779 | D(ImplicitOps), DI(SrcImmByte, intn), |
3768 | D(ImplicitOps | No64), II(ImplicitOps, em_iret, iret), | 3780 | D(ImplicitOps | No64), II(ImplicitOps, em_iret, iret), |
3769 | /* 0xD0 - 0xD7 */ | 3781 | /* 0xD0 - 0xD7 */ |
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 043330159179..ad75d77999d0 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -99,6 +99,7 @@ struct guest_walker { | |||
99 | pt_element_t prefetch_ptes[PTE_PREFETCH_NUM]; | 99 | pt_element_t prefetch_ptes[PTE_PREFETCH_NUM]; |
100 | gpa_t pte_gpa[PT_MAX_FULL_LEVELS]; | 100 | gpa_t pte_gpa[PT_MAX_FULL_LEVELS]; |
101 | pt_element_t __user *ptep_user[PT_MAX_FULL_LEVELS]; | 101 | pt_element_t __user *ptep_user[PT_MAX_FULL_LEVELS]; |
102 | bool pte_writable[PT_MAX_FULL_LEVELS]; | ||
102 | unsigned pt_access; | 103 | unsigned pt_access; |
103 | unsigned pte_access; | 104 | unsigned pte_access; |
104 | gfn_t gfn; | 105 | gfn_t gfn; |
@@ -235,6 +236,22 @@ static int FNAME(update_accessed_dirty_bits)(struct kvm_vcpu *vcpu, | |||
235 | if (pte == orig_pte) | 236 | if (pte == orig_pte) |
236 | continue; | 237 | continue; |
237 | 238 | ||
239 | /* | ||
240 | * If the slot is read-only, simply do not process the accessed | ||
241 | * and dirty bits. This is the correct thing to do if the slot | ||
242 | * is ROM, and page tables in read-as-ROM/write-as-MMIO slots | ||
243 | * are only supported if the accessed and dirty bits are already | ||
244 | * set in the ROM (so that MMIO writes are never needed). | ||
245 | * | ||
246 | * Note that NPT does not allow this at all and faults, since | ||
247 | * it always wants nested page table entries for the guest | ||
248 | * page tables to be writable. And EPT works but will simply | ||
249 | * overwrite the read-only memory to set the accessed and dirty | ||
250 | * bits. | ||
251 | */ | ||
252 | if (unlikely(!walker->pte_writable[level - 1])) | ||
253 | continue; | ||
254 | |||
238 | ret = FNAME(cmpxchg_gpte)(vcpu, mmu, ptep_user, index, orig_pte, pte); | 255 | ret = FNAME(cmpxchg_gpte)(vcpu, mmu, ptep_user, index, orig_pte, pte); |
239 | if (ret) | 256 | if (ret) |
240 | return ret; | 257 | return ret; |
@@ -309,7 +326,8 @@ retry_walk: | |||
309 | goto error; | 326 | goto error; |
310 | real_gfn = gpa_to_gfn(real_gfn); | 327 | real_gfn = gpa_to_gfn(real_gfn); |
311 | 328 | ||
312 | host_addr = gfn_to_hva(vcpu->kvm, real_gfn); | 329 | host_addr = gfn_to_hva_prot(vcpu->kvm, real_gfn, |
330 | &walker->pte_writable[walker->level - 1]); | ||
313 | if (unlikely(kvm_is_error_hva(host_addr))) | 331 | if (unlikely(kvm_is_error_hva(host_addr))) |
314 | goto error; | 332 | goto error; |
315 | 333 | ||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 1f1da43ff2a2..3b8e7459dd4d 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -5339,6 +5339,17 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu) | |||
5339 | return 0; | 5339 | return 0; |
5340 | } | 5340 | } |
5341 | 5341 | ||
5342 | /* | ||
5343 | * EPT violation happened while executing iret from NMI, | ||
5344 | * "blocked by NMI" bit has to be set before next VM entry. | ||
5345 | * There are errata that may cause this bit to not be set: | ||
5346 | * AAK134, BY25. | ||
5347 | */ | ||
5348 | if (!(to_vmx(vcpu)->idt_vectoring_info & VECTORING_INFO_VALID_MASK) && | ||
5349 | cpu_has_virtual_nmis() && | ||
5350 | (exit_qualification & INTR_INFO_UNBLOCK_NMI)) | ||
5351 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_NMI); | ||
5352 | |||
5342 | gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); | 5353 | gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); |
5343 | trace_kvm_page_fault(gpa, exit_qualification); | 5354 | trace_kvm_page_fault(gpa, exit_qualification); |
5344 | 5355 | ||
@@ -7766,6 +7777,10 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) | |||
7766 | vmcs_write64(GUEST_PDPTR1, vmcs12->guest_pdptr1); | 7777 | vmcs_write64(GUEST_PDPTR1, vmcs12->guest_pdptr1); |
7767 | vmcs_write64(GUEST_PDPTR2, vmcs12->guest_pdptr2); | 7778 | vmcs_write64(GUEST_PDPTR2, vmcs12->guest_pdptr2); |
7768 | vmcs_write64(GUEST_PDPTR3, vmcs12->guest_pdptr3); | 7779 | vmcs_write64(GUEST_PDPTR3, vmcs12->guest_pdptr3); |
7780 | __clear_bit(VCPU_EXREG_PDPTR, | ||
7781 | (unsigned long *)&vcpu->arch.regs_avail); | ||
7782 | __clear_bit(VCPU_EXREG_PDPTR, | ||
7783 | (unsigned long *)&vcpu->arch.regs_dirty); | ||
7769 | } | 7784 | } |
7770 | 7785 | ||
7771 | 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/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 90f6ed127096..c7e22ab29a5a 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -912,10 +912,13 @@ void __init efi_enter_virtual_mode(void) | |||
912 | 912 | ||
913 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { | 913 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
914 | md = p; | 914 | md = p; |
915 | if (!(md->attribute & EFI_MEMORY_RUNTIME) && | 915 | if (!(md->attribute & EFI_MEMORY_RUNTIME)) { |
916 | md->type != EFI_BOOT_SERVICES_CODE && | 916 | #ifdef CONFIG_X86_64 |
917 | md->type != EFI_BOOT_SERVICES_DATA) | 917 | if (md->type != EFI_BOOT_SERVICES_CODE && |
918 | continue; | 918 | md->type != EFI_BOOT_SERVICES_DATA) |
919 | #endif | ||
920 | continue; | ||
921 | } | ||
919 | 922 | ||
920 | size = md->num_pages << EFI_PAGE_SHIFT; | 923 | size = md->num_pages << EFI_PAGE_SHIFT; |
921 | end = md->phys_addr + size; | 924 | end = md->phys_addr + size; |
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 8b901e8d782d..a61c7d5811be 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -879,7 +879,6 @@ int m2p_add_override(unsigned long mfn, struct page *page, | |||
879 | unsigned long uninitialized_var(address); | 879 | unsigned long uninitialized_var(address); |
880 | unsigned level; | 880 | unsigned level; |
881 | pte_t *ptep = NULL; | 881 | pte_t *ptep = NULL; |
882 | int ret = 0; | ||
883 | 882 | ||
884 | pfn = page_to_pfn(page); | 883 | pfn = page_to_pfn(page); |
885 | if (!PageHighMem(page)) { | 884 | if (!PageHighMem(page)) { |
@@ -926,8 +925,8 @@ int m2p_add_override(unsigned long mfn, struct page *page, | |||
926 | * frontend pages while they are being shared with the backend, | 925 | * frontend pages while they are being shared with the backend, |
927 | * because mfn_to_pfn (that ends up being called by GUPF) will | 926 | * because mfn_to_pfn (that ends up being called by GUPF) will |
928 | * return the backend pfn rather than the frontend pfn. */ | 927 | * return the backend pfn rather than the frontend pfn. */ |
929 | ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); | 928 | pfn = mfn_to_pfn_no_overrides(mfn); |
930 | if (ret == 0 && get_phys_to_machine(pfn) == mfn) | 929 | if (get_phys_to_machine(pfn) == mfn) |
931 | set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)); | 930 | set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)); |
932 | 931 | ||
933 | return 0; | 932 | return 0; |
@@ -942,7 +941,6 @@ int m2p_remove_override(struct page *page, | |||
942 | unsigned long uninitialized_var(address); | 941 | unsigned long uninitialized_var(address); |
943 | unsigned level; | 942 | unsigned level; |
944 | pte_t *ptep = NULL; | 943 | pte_t *ptep = NULL; |
945 | int ret = 0; | ||
946 | 944 | ||
947 | pfn = page_to_pfn(page); | 945 | pfn = page_to_pfn(page); |
948 | mfn = get_phys_to_machine(pfn); | 946 | mfn = get_phys_to_machine(pfn); |
@@ -1029,8 +1027,8 @@ int m2p_remove_override(struct page *page, | |||
1029 | * the original pfn causes mfn_to_pfn(mfn) to return the frontend | 1027 | * the original pfn causes mfn_to_pfn(mfn) to return the frontend |
1030 | * pfn again. */ | 1028 | * pfn again. */ |
1031 | mfn &= ~FOREIGN_FRAME_BIT; | 1029 | mfn &= ~FOREIGN_FRAME_BIT; |
1032 | ret = __get_user(pfn, &machine_to_phys_mapping[mfn]); | 1030 | pfn = mfn_to_pfn_no_overrides(mfn); |
1033 | if (ret == 0 && get_phys_to_machine(pfn) == FOREIGN_FRAME(mfn) && | 1031 | if (get_phys_to_machine(pfn) == FOREIGN_FRAME(mfn) && |
1034 | m2p_find_override(mfn) == NULL) | 1032 | m2p_find_override(mfn) == NULL) |
1035 | set_phys_to_machine(pfn, mfn); | 1033 | set_phys_to_machine(pfn, mfn); |
1036 | 1034 | ||
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 253f63fceea1..be6b86078957 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c | |||
@@ -259,6 +259,14 @@ void xen_uninit_lock_cpu(int cpu) | |||
259 | } | 259 | } |
260 | 260 | ||
261 | 261 | ||
262 | /* | ||
263 | * Our init of PV spinlocks is split in two init functions due to us | ||
264 | * using paravirt patching and jump labels patching and having to do | ||
265 | * all of this before SMP code is invoked. | ||
266 | * | ||
267 | * The paravirt patching needs to be done _before_ the alternative asm code | ||
268 | * is started, otherwise we would not patch the core kernel code. | ||
269 | */ | ||
262 | void __init xen_init_spinlocks(void) | 270 | void __init xen_init_spinlocks(void) |
263 | { | 271 | { |
264 | 272 | ||
@@ -267,12 +275,26 @@ void __init xen_init_spinlocks(void) | |||
267 | return; | 275 | return; |
268 | } | 276 | } |
269 | 277 | ||
270 | static_key_slow_inc(¶virt_ticketlocks_enabled); | ||
271 | |||
272 | pv_lock_ops.lock_spinning = PV_CALLEE_SAVE(xen_lock_spinning); | 278 | pv_lock_ops.lock_spinning = PV_CALLEE_SAVE(xen_lock_spinning); |
273 | pv_lock_ops.unlock_kick = xen_unlock_kick; | 279 | pv_lock_ops.unlock_kick = xen_unlock_kick; |
274 | } | 280 | } |
275 | 281 | ||
282 | /* | ||
283 | * While the jump_label init code needs to happend _after_ the jump labels are | ||
284 | * enabled and before SMP is started. Hence we use pre-SMP initcall level | ||
285 | * init. We cannot do it in xen_init_spinlocks as that is done before | ||
286 | * jump labels are activated. | ||
287 | */ | ||
288 | static __init int xen_init_spinlocks_jump(void) | ||
289 | { | ||
290 | if (!xen_pvspin) | ||
291 | return 0; | ||
292 | |||
293 | static_key_slow_inc(¶virt_ticketlocks_enabled); | ||
294 | return 0; | ||
295 | } | ||
296 | early_initcall(xen_init_spinlocks_jump); | ||
297 | |||
276 | static __init int xen_parse_nopvspin(char *arg) | 298 | static __init int xen_parse_nopvspin(char *arg) |
277 | { | 299 | { |
278 | xen_pvspin = false; | 300 | xen_pvspin = false; |