diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-04-02 03:48:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-02 03:48:56 -0400 |
commit | b8764fe6d0ba654c8705ebbb8c2c8ddd776d8928 (patch) | |
tree | 3e28a08a044547d5429f011bcce24a3c82c89fec /arch | |
parent | b8c89c6a0d56d47ae7f22755a133540b32fa81cf (diff) | |
parent | 683b6c6f82a60fabf47012581c2cfbf1b037ab95 (diff) |
Merge branch 'linus' into x86/urgent
Pick up Linus's latest, to fix a bug.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
202 files changed, 3373 insertions, 3581 deletions
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index 7736f426ff3b..96e54bed5088 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild | |||
@@ -1,6 +1,7 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += cputime.h | ||
4 | generic-y += exec.h | 5 | generic-y += exec.h |
5 | generic-y += hash.h | 6 | generic-y += hash.h |
6 | generic-y += mcs_spinlock.h | 7 | generic-y += mcs_spinlock.h |
diff --git a/arch/alpha/include/asm/cputime.h b/arch/alpha/include/asm/cputime.h deleted file mode 100644 index 19577fd93230..000000000000 --- a/arch/alpha/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ALPHA_CPUTIME_H | ||
2 | #define __ALPHA_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __ALPHA_CPUTIME_H */ | ||
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi index d4d2763f4794..249b6e0ba737 100644 --- a/arch/arm/boot/dts/sun4i-a10.dtsi +++ b/arch/arm/boot/dts/sun4i-a10.dtsi | |||
@@ -331,7 +331,7 @@ | |||
331 | }; | 331 | }; |
332 | 332 | ||
333 | intc: interrupt-controller@01c20400 { | 333 | intc: interrupt-controller@01c20400 { |
334 | compatible = "allwinner,sun4i-ic"; | 334 | compatible = "allwinner,sun4i-a10-ic"; |
335 | reg = <0x01c20400 0x400>; | 335 | reg = <0x01c20400 0x400>; |
336 | interrupt-controller; | 336 | interrupt-controller; |
337 | #interrupt-cells = <1>; | 337 | #interrupt-cells = <1>; |
@@ -403,7 +403,7 @@ | |||
403 | }; | 403 | }; |
404 | 404 | ||
405 | timer@01c20c00 { | 405 | timer@01c20c00 { |
406 | compatible = "allwinner,sun4i-timer"; | 406 | compatible = "allwinner,sun4i-a10-timer"; |
407 | reg = <0x01c20c00 0x90>; | 407 | reg = <0x01c20c00 0x90>; |
408 | interrupts = <22>; | 408 | interrupts = <22>; |
409 | clocks = <&osc24M>; | 409 | clocks = <&osc24M>; |
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi index 79fd412005b0..ddb25452d78e 100644 --- a/arch/arm/boot/dts/sun5i-a10s.dtsi +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi | |||
@@ -294,7 +294,7 @@ | |||
294 | }; | 294 | }; |
295 | 295 | ||
296 | intc: interrupt-controller@01c20400 { | 296 | intc: interrupt-controller@01c20400 { |
297 | compatible = "allwinner,sun4i-ic"; | 297 | compatible = "allwinner,sun4i-a10-ic"; |
298 | reg = <0x01c20400 0x400>; | 298 | reg = <0x01c20400 0x400>; |
299 | interrupt-controller; | 299 | interrupt-controller; |
300 | #interrupt-cells = <1>; | 300 | #interrupt-cells = <1>; |
@@ -366,7 +366,7 @@ | |||
366 | }; | 366 | }; |
367 | 367 | ||
368 | timer@01c20c00 { | 368 | timer@01c20c00 { |
369 | compatible = "allwinner,sun4i-timer"; | 369 | compatible = "allwinner,sun4i-a10-timer"; |
370 | reg = <0x01c20c00 0x90>; | 370 | reg = <0x01c20c00 0x90>; |
371 | interrupts = <22>; | 371 | interrupts = <22>; |
372 | clocks = <&osc24M>; | 372 | clocks = <&osc24M>; |
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi index c463fd730c91..b373c74a9b3d 100644 --- a/arch/arm/boot/dts/sun5i-a13.dtsi +++ b/arch/arm/boot/dts/sun5i-a13.dtsi | |||
@@ -275,7 +275,7 @@ | |||
275 | ranges; | 275 | ranges; |
276 | 276 | ||
277 | intc: interrupt-controller@01c20400 { | 277 | intc: interrupt-controller@01c20400 { |
278 | compatible = "allwinner,sun4i-ic"; | 278 | compatible = "allwinner,sun4i-a10-ic"; |
279 | reg = <0x01c20400 0x400>; | 279 | reg = <0x01c20400 0x400>; |
280 | interrupt-controller; | 280 | interrupt-controller; |
281 | #interrupt-cells = <1>; | 281 | #interrupt-cells = <1>; |
@@ -329,7 +329,7 @@ | |||
329 | }; | 329 | }; |
330 | 330 | ||
331 | timer@01c20c00 { | 331 | timer@01c20c00 { |
332 | compatible = "allwinner,sun4i-timer"; | 332 | compatible = "allwinner,sun4i-a10-timer"; |
333 | reg = <0x01c20c00 0x90>; | 333 | reg = <0x01c20c00 0x90>; |
334 | interrupts = <22>; | 334 | interrupts = <22>; |
335 | clocks = <&osc24M>; | 335 | clocks = <&osc24M>; |
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index 5256ad9be52c..38d43febda4c 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi | |||
@@ -190,6 +190,14 @@ | |||
190 | #size-cells = <1>; | 190 | #size-cells = <1>; |
191 | ranges; | 191 | ranges; |
192 | 192 | ||
193 | nmi_intc: interrupt-controller@01f00c0c { | ||
194 | compatible = "allwinner,sun6i-a31-sc-nmi"; | ||
195 | interrupt-controller; | ||
196 | #interrupt-cells = <2>; | ||
197 | reg = <0x01f00c0c 0x38>; | ||
198 | interrupts = <0 32 4>; | ||
199 | }; | ||
200 | |||
193 | pio: pinctrl@01c20800 { | 201 | pio: pinctrl@01c20800 { |
194 | compatible = "allwinner,sun6i-a31-pinctrl"; | 202 | compatible = "allwinner,sun6i-a31-pinctrl"; |
195 | reg = <0x01c20800 0x400>; | 203 | reg = <0x01c20800 0x400>; |
@@ -231,7 +239,7 @@ | |||
231 | }; | 239 | }; |
232 | 240 | ||
233 | timer@01c20c00 { | 241 | timer@01c20c00 { |
234 | compatible = "allwinner,sun4i-timer"; | 242 | compatible = "allwinner,sun4i-a10-timer"; |
235 | reg = <0x01c20c00 0xa0>; | 243 | reg = <0x01c20c00 0xa0>; |
236 | interrupts = <0 18 4>, | 244 | interrupts = <0 18 4>, |
237 | <0 19 4>, | 245 | <0 19 4>, |
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 6f25cf559ad0..cadcf2f9881d 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi | |||
@@ -339,6 +339,14 @@ | |||
339 | #size-cells = <1>; | 339 | #size-cells = <1>; |
340 | ranges; | 340 | ranges; |
341 | 341 | ||
342 | nmi_intc: interrupt-controller@01c00030 { | ||
343 | compatible = "allwinner,sun7i-a20-sc-nmi"; | ||
344 | interrupt-controller; | ||
345 | #interrupt-cells = <2>; | ||
346 | reg = <0x01c00030 0x0c>; | ||
347 | interrupts = <0 0 4>; | ||
348 | }; | ||
349 | |||
342 | emac: ethernet@01c0b000 { | 350 | emac: ethernet@01c0b000 { |
343 | compatible = "allwinner,sun4i-a10-emac"; | 351 | compatible = "allwinner,sun4i-a10-emac"; |
344 | reg = <0x01c0b000 0x1000>; | 352 | reg = <0x01c0b000 0x1000>; |
@@ -435,7 +443,7 @@ | |||
435 | }; | 443 | }; |
436 | 444 | ||
437 | timer@01c20c00 { | 445 | timer@01c20c00 { |
438 | compatible = "allwinner,sun4i-timer"; | 446 | compatible = "allwinner,sun4i-a10-timer"; |
439 | reg = <0x01c20c00 0x90>; | 447 | reg = <0x01c20c00 0x90>; |
440 | interrupts = <0 22 4>, | 448 | interrupts = <0 22 4>, |
441 | <0 23 4>, | 449 | <0 23 4>, |
diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi index 8b67b19392ec..789d0bacc110 100644 --- a/arch/arm/boot/dts/zynq-7000.dtsi +++ b/arch/arm/boot/dts/zynq-7000.dtsi | |||
@@ -24,6 +24,12 @@ | |||
24 | device_type = "cpu"; | 24 | device_type = "cpu"; |
25 | reg = <0>; | 25 | reg = <0>; |
26 | clocks = <&clkc 3>; | 26 | clocks = <&clkc 3>; |
27 | operating-points = < | ||
28 | /* kHz uV */ | ||
29 | 666667 1000000 | ||
30 | 333334 1000000 | ||
31 | 222223 1000000 | ||
32 | >; | ||
27 | }; | 33 | }; |
28 | 34 | ||
29 | cpu@1 { | 35 | cpu@1 { |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 2ab00434b2eb..85399c98f84a 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -472,7 +472,7 @@ static struct clk_lookup da850_clks[] = { | |||
472 | CLK("spi_davinci.0", NULL, &spi0_clk), | 472 | CLK("spi_davinci.0", NULL, &spi0_clk), |
473 | CLK("spi_davinci.1", NULL, &spi1_clk), | 473 | CLK("spi_davinci.1", NULL, &spi1_clk), |
474 | CLK("vpif", NULL, &vpif_clk), | 474 | CLK("vpif", NULL, &vpif_clk), |
475 | CLK("ahci", NULL, &sata_clk), | 475 | CLK("ahci_da850", NULL, &sata_clk), |
476 | CLK("davinci-rproc.0", NULL, &dsp_clk), | 476 | CLK("davinci-rproc.0", NULL, &dsp_clk), |
477 | CLK("ehrpwm", "fck", &ehrpwm_clk), | 477 | CLK("ehrpwm", "fck", &ehrpwm_clk), |
478 | CLK("ehrpwm", "tbclk", &ehrpwm_tbclk), | 478 | CLK("ehrpwm", "tbclk", &ehrpwm_tbclk), |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 0486cdf28c8d..56ea41d5f849 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -1020,7 +1020,6 @@ int __init da8xx_register_spi_bus(int instance, unsigned num_chipselect) | |||
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | #ifdef CONFIG_ARCH_DAVINCI_DA850 | 1022 | #ifdef CONFIG_ARCH_DAVINCI_DA850 |
1023 | |||
1024 | static struct resource da850_sata_resources[] = { | 1023 | static struct resource da850_sata_resources[] = { |
1025 | { | 1024 | { |
1026 | .start = DA850_SATA_BASE, | 1025 | .start = DA850_SATA_BASE, |
@@ -1028,103 +1027,22 @@ static struct resource da850_sata_resources[] = { | |||
1028 | .flags = IORESOURCE_MEM, | 1027 | .flags = IORESOURCE_MEM, |
1029 | }, | 1028 | }, |
1030 | { | 1029 | { |
1030 | .start = DA8XX_SYSCFG1_BASE + DA8XX_PWRDN_REG, | ||
1031 | .end = DA8XX_SYSCFG1_BASE + DA8XX_PWRDN_REG + 0x3, | ||
1032 | .flags = IORESOURCE_MEM, | ||
1033 | }, | ||
1034 | { | ||
1031 | .start = IRQ_DA850_SATAINT, | 1035 | .start = IRQ_DA850_SATAINT, |
1032 | .flags = IORESOURCE_IRQ, | 1036 | .flags = IORESOURCE_IRQ, |
1033 | }, | 1037 | }, |
1034 | }; | 1038 | }; |
1035 | 1039 | ||
1036 | /* SATA PHY Control Register offset from AHCI base */ | ||
1037 | #define SATA_P0PHYCR_REG 0x178 | ||
1038 | |||
1039 | #define SATA_PHY_MPY(x) ((x) << 0) | ||
1040 | #define SATA_PHY_LOS(x) ((x) << 6) | ||
1041 | #define SATA_PHY_RXCDR(x) ((x) << 10) | ||
1042 | #define SATA_PHY_RXEQ(x) ((x) << 13) | ||
1043 | #define SATA_PHY_TXSWING(x) ((x) << 19) | ||
1044 | #define SATA_PHY_ENPLL(x) ((x) << 31) | ||
1045 | |||
1046 | static struct clk *da850_sata_clk; | ||
1047 | static unsigned long da850_sata_refclkpn; | ||
1048 | |||
1049 | /* Supported DA850 SATA crystal frequencies */ | ||
1050 | #define KHZ_TO_HZ(freq) ((freq) * 1000) | ||
1051 | static unsigned long da850_sata_xtal[] = { | ||
1052 | KHZ_TO_HZ(300000), | ||
1053 | KHZ_TO_HZ(250000), | ||
1054 | 0, /* Reserved */ | ||
1055 | KHZ_TO_HZ(187500), | ||
1056 | KHZ_TO_HZ(150000), | ||
1057 | KHZ_TO_HZ(125000), | ||
1058 | KHZ_TO_HZ(120000), | ||
1059 | KHZ_TO_HZ(100000), | ||
1060 | KHZ_TO_HZ(75000), | ||
1061 | KHZ_TO_HZ(60000), | ||
1062 | }; | ||
1063 | |||
1064 | static int da850_sata_init(struct device *dev, void __iomem *addr) | ||
1065 | { | ||
1066 | int i, ret; | ||
1067 | unsigned int val; | ||
1068 | |||
1069 | da850_sata_clk = clk_get(dev, NULL); | ||
1070 | if (IS_ERR(da850_sata_clk)) | ||
1071 | return PTR_ERR(da850_sata_clk); | ||
1072 | |||
1073 | ret = clk_prepare_enable(da850_sata_clk); | ||
1074 | if (ret) | ||
1075 | goto err0; | ||
1076 | |||
1077 | /* Enable SATA clock receiver */ | ||
1078 | val = __raw_readl(DA8XX_SYSCFG1_VIRT(DA8XX_PWRDN_REG)); | ||
1079 | val &= ~BIT(0); | ||
1080 | __raw_writel(val, DA8XX_SYSCFG1_VIRT(DA8XX_PWRDN_REG)); | ||
1081 | |||
1082 | /* Get the multiplier needed for 1.5GHz PLL output */ | ||
1083 | for (i = 0; i < ARRAY_SIZE(da850_sata_xtal); i++) | ||
1084 | if (da850_sata_xtal[i] == da850_sata_refclkpn) | ||
1085 | break; | ||
1086 | |||
1087 | if (i == ARRAY_SIZE(da850_sata_xtal)) { | ||
1088 | ret = -EINVAL; | ||
1089 | goto err1; | ||
1090 | } | ||
1091 | |||
1092 | val = SATA_PHY_MPY(i + 1) | | ||
1093 | SATA_PHY_LOS(1) | | ||
1094 | SATA_PHY_RXCDR(4) | | ||
1095 | SATA_PHY_RXEQ(1) | | ||
1096 | SATA_PHY_TXSWING(3) | | ||
1097 | SATA_PHY_ENPLL(1); | ||
1098 | |||
1099 | __raw_writel(val, addr + SATA_P0PHYCR_REG); | ||
1100 | |||
1101 | return 0; | ||
1102 | |||
1103 | err1: | ||
1104 | clk_disable_unprepare(da850_sata_clk); | ||
1105 | err0: | ||
1106 | clk_put(da850_sata_clk); | ||
1107 | return ret; | ||
1108 | } | ||
1109 | |||
1110 | static void da850_sata_exit(struct device *dev) | ||
1111 | { | ||
1112 | clk_disable_unprepare(da850_sata_clk); | ||
1113 | clk_put(da850_sata_clk); | ||
1114 | } | ||
1115 | |||
1116 | static struct ahci_platform_data da850_sata_pdata = { | ||
1117 | .init = da850_sata_init, | ||
1118 | .exit = da850_sata_exit, | ||
1119 | }; | ||
1120 | |||
1121 | static u64 da850_sata_dmamask = DMA_BIT_MASK(32); | 1040 | static u64 da850_sata_dmamask = DMA_BIT_MASK(32); |
1122 | 1041 | ||
1123 | static struct platform_device da850_sata_device = { | 1042 | static struct platform_device da850_sata_device = { |
1124 | .name = "ahci", | 1043 | .name = "ahci_da850", |
1125 | .id = -1, | 1044 | .id = -1, |
1126 | .dev = { | 1045 | .dev = { |
1127 | .platform_data = &da850_sata_pdata, | ||
1128 | .dma_mask = &da850_sata_dmamask, | 1046 | .dma_mask = &da850_sata_dmamask, |
1129 | .coherent_dma_mask = DMA_BIT_MASK(32), | 1047 | .coherent_dma_mask = DMA_BIT_MASK(32), |
1130 | }, | 1048 | }, |
@@ -1134,9 +1052,8 @@ static struct platform_device da850_sata_device = { | |||
1134 | 1052 | ||
1135 | int __init da850_register_sata(unsigned long refclkpn) | 1053 | int __init da850_register_sata(unsigned long refclkpn) |
1136 | { | 1054 | { |
1137 | da850_sata_refclkpn = refclkpn; | 1055 | /* please see comment in drivers/ata/ahci_da850.c */ |
1138 | if (!da850_sata_refclkpn) | 1056 | BUG_ON(refclkpn != 100 * 1000 * 1000); |
1139 | return -EINVAL; | ||
1140 | 1057 | ||
1141 | return platform_device_register(&da850_sata_device); | 1058 | return platform_device_register(&da850_sata_device); |
1142 | } | 1059 | } |
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c index 7a9b98589db7..29e3fe6a6669 100644 --- a/arch/arm/mach-imx/pm-imx6q.c +++ b/arch/arm/mach-imx/pm-imx6q.c | |||
@@ -120,7 +120,7 @@ static void imx6q_enable_wb(bool enable) | |||
120 | 120 | ||
121 | int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | 121 | int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) |
122 | { | 122 | { |
123 | struct irq_desc *iomuxc_irq_desc; | 123 | struct irq_data *iomuxc_irq_data = irq_get_irq_data(32); |
124 | u32 val = readl_relaxed(ccm_base + CLPCR); | 124 | u32 val = readl_relaxed(ccm_base + CLPCR); |
125 | 125 | ||
126 | val &= ~BM_CLPCR_LPM; | 126 | val &= ~BM_CLPCR_LPM; |
@@ -167,10 +167,9 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | |||
167 | * 3) Software should mask IRQ #32 right after CCM Low-Power mode | 167 | * 3) Software should mask IRQ #32 right after CCM Low-Power mode |
168 | * is set (set bits 0-1 of CCM_CLPCR). | 168 | * is set (set bits 0-1 of CCM_CLPCR). |
169 | */ | 169 | */ |
170 | iomuxc_irq_desc = irq_to_desc(32); | 170 | imx_gpc_irq_unmask(iomuxc_irq_data); |
171 | imx_gpc_irq_unmask(&iomuxc_irq_desc->irq_data); | ||
172 | writel_relaxed(val, ccm_base + CLPCR); | 171 | writel_relaxed(val, ccm_base + CLPCR); |
173 | imx_gpc_irq_mask(&iomuxc_irq_desc->irq_data); | 172 | imx_gpc_irq_mask(iomuxc_irq_data); |
174 | 173 | ||
175 | return 0; | 174 | return 0; |
176 | } | 175 | } |
diff --git a/arch/arm/mach-mmp/pm-mmp2.c b/arch/arm/mach-mmp/pm-mmp2.c index 461a191a32d2..43b1a516957f 100644 --- a/arch/arm/mach-mmp/pm-mmp2.c +++ b/arch/arm/mach-mmp/pm-mmp2.c | |||
@@ -27,22 +27,8 @@ | |||
27 | 27 | ||
28 | int mmp2_set_wake(struct irq_data *d, unsigned int on) | 28 | int mmp2_set_wake(struct irq_data *d, unsigned int on) |
29 | { | 29 | { |
30 | int irq = d->irq; | ||
31 | struct irq_desc *desc = irq_to_desc(irq); | ||
32 | unsigned long data = 0; | 30 | unsigned long data = 0; |
33 | 31 | int irq = d->irq; | |
34 | if (unlikely(irq >= nr_irqs)) { | ||
35 | pr_err("IRQ nubmers are out of boundary!\n"); | ||
36 | return -EINVAL; | ||
37 | } | ||
38 | |||
39 | if (on) { | ||
40 | if (desc->action) | ||
41 | desc->action->flags |= IRQF_NO_SUSPEND; | ||
42 | } else { | ||
43 | if (desc->action) | ||
44 | desc->action->flags &= ~IRQF_NO_SUSPEND; | ||
45 | } | ||
46 | 32 | ||
47 | /* enable wakeup sources */ | 33 | /* enable wakeup sources */ |
48 | switch (irq) { | 34 | switch (irq) { |
diff --git a/arch/arm/mach-mmp/pm-pxa910.c b/arch/arm/mach-mmp/pm-pxa910.c index 48981ca801a5..04c9daf9f8d7 100644 --- a/arch/arm/mach-mmp/pm-pxa910.c +++ b/arch/arm/mach-mmp/pm-pxa910.c | |||
@@ -27,22 +27,8 @@ | |||
27 | 27 | ||
28 | int pxa910_set_wake(struct irq_data *data, unsigned int on) | 28 | int pxa910_set_wake(struct irq_data *data, unsigned int on) |
29 | { | 29 | { |
30 | int irq = data->irq; | ||
31 | struct irq_desc *desc = irq_to_desc(data->irq); | ||
32 | uint32_t awucrm = 0, apcr = 0; | 30 | uint32_t awucrm = 0, apcr = 0; |
33 | 31 | int irq = data->irq; | |
34 | if (unlikely(irq >= nr_irqs)) { | ||
35 | pr_err("IRQ nubmers are out of boundary!\n"); | ||
36 | return -EINVAL; | ||
37 | } | ||
38 | |||
39 | if (on) { | ||
40 | if (desc->action) | ||
41 | desc->action->flags |= IRQF_NO_SUSPEND; | ||
42 | } else { | ||
43 | if (desc->action) | ||
44 | desc->action->flags &= ~IRQF_NO_SUSPEND; | ||
45 | } | ||
46 | 32 | ||
47 | /* setting wakeup sources */ | 33 | /* setting wakeup sources */ |
48 | switch (irq) { | 34 | switch (irq) { |
@@ -115,9 +101,11 @@ int pxa910_set_wake(struct irq_data *data, unsigned int on) | |||
115 | if (irq >= IRQ_GPIO_START && irq < IRQ_BOARD_START) { | 101 | if (irq >= IRQ_GPIO_START && irq < IRQ_BOARD_START) { |
116 | awucrm = MPMU_AWUCRM_WAKEUP(2); | 102 | awucrm = MPMU_AWUCRM_WAKEUP(2); |
117 | apcr |= MPMU_APCR_SLPWP2; | 103 | apcr |= MPMU_APCR_SLPWP2; |
118 | } else | 104 | } else { |
105 | /* FIXME: This should return a proper error code ! */ | ||
119 | printk(KERN_ERR "Error: no defined wake up source irq: %d\n", | 106 | printk(KERN_ERR "Error: no defined wake up source irq: %d\n", |
120 | irq); | 107 | irq); |
108 | } | ||
121 | } | 109 | } |
122 | 110 | ||
123 | if (on) { | 111 | if (on) { |
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index f12a12af3523..d1f12095f315 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c | |||
@@ -44,13 +44,10 @@ static unsigned int irq_counter[16]; | |||
44 | 44 | ||
45 | static irqreturn_t deferred_fiq(int irq, void *dev_id) | 45 | static irqreturn_t deferred_fiq(int irq, void *dev_id) |
46 | { | 46 | { |
47 | struct irq_desc *irq_desc; | ||
48 | struct irq_chip *irq_chip = NULL; | ||
49 | int gpio, irq_num, fiq_count; | 47 | int gpio, irq_num, fiq_count; |
48 | struct irq_chip *irq_chip; | ||
50 | 49 | ||
51 | irq_desc = irq_to_desc(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK)); | 50 | irq_chip = irq_get_chip(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK)); |
52 | if (irq_desc) | ||
53 | irq_chip = irq_desc->irq_data.chip; | ||
54 | 51 | ||
55 | /* | 52 | /* |
56 | * For each handled GPIO interrupt, keep calling its interrupt handler | 53 | * For each handled GPIO interrupt, keep calling its interrupt handler |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 05fa505df585..f6db7dcae3f4 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -24,17 +24,21 @@ comment "Renesas ARM SoCs System Type" | |||
24 | 24 | ||
25 | config ARCH_EMEV2 | 25 | config ARCH_EMEV2 |
26 | bool "Emma Mobile EV2" | 26 | bool "Emma Mobile EV2" |
27 | select SYS_SUPPORTS_EM_STI | ||
27 | 28 | ||
28 | config ARCH_R7S72100 | 29 | config ARCH_R7S72100 |
29 | bool "RZ/A1H (R7S72100)" | 30 | bool "RZ/A1H (R7S72100)" |
31 | select SYS_SUPPORTS_SH_MTU2 | ||
30 | 32 | ||
31 | config ARCH_R8A7790 | 33 | config ARCH_R8A7790 |
32 | bool "R-Car H2 (R8A77900)" | 34 | bool "R-Car H2 (R8A77900)" |
33 | select RENESAS_IRQC | 35 | select RENESAS_IRQC |
36 | select SYS_SUPPORTS_SH_CMT | ||
34 | 37 | ||
35 | config ARCH_R8A7791 | 38 | config ARCH_R8A7791 |
36 | bool "R-Car M2 (R8A77910)" | 39 | bool "R-Car M2 (R8A77910)" |
37 | select RENESAS_IRQC | 40 | select RENESAS_IRQC |
41 | select SYS_SUPPORTS_SH_CMT | ||
38 | 42 | ||
39 | comment "Renesas ARM SoCs Board Type" | 43 | comment "Renesas ARM SoCs Board Type" |
40 | 44 | ||
@@ -68,6 +72,8 @@ config ARCH_SH7372 | |||
68 | select ARM_CPU_SUSPEND if PM || CPU_IDLE | 72 | select ARM_CPU_SUSPEND if PM || CPU_IDLE |
69 | select CPU_V7 | 73 | select CPU_V7 |
70 | select SH_CLK_CPG | 74 | select SH_CLK_CPG |
75 | select SYS_SUPPORTS_SH_CMT | ||
76 | select SYS_SUPPORTS_SH_TMU | ||
71 | 77 | ||
72 | config ARCH_SH73A0 | 78 | config ARCH_SH73A0 |
73 | bool "SH-Mobile AG5 (R8A73A00)" | 79 | bool "SH-Mobile AG5 (R8A73A00)" |
@@ -77,6 +83,8 @@ config ARCH_SH73A0 | |||
77 | select I2C | 83 | select I2C |
78 | select SH_CLK_CPG | 84 | select SH_CLK_CPG |
79 | select RENESAS_INTC_IRQPIN | 85 | select RENESAS_INTC_IRQPIN |
86 | select SYS_SUPPORTS_SH_CMT | ||
87 | select SYS_SUPPORTS_SH_TMU | ||
80 | 88 | ||
81 | config ARCH_R8A73A4 | 89 | config ARCH_R8A73A4 |
82 | bool "R-Mobile APE6 (R8A73A40)" | 90 | bool "R-Mobile APE6 (R8A73A40)" |
@@ -87,6 +95,8 @@ config ARCH_R8A73A4 | |||
87 | select RENESAS_IRQC | 95 | select RENESAS_IRQC |
88 | select ARCH_HAS_CPUFREQ | 96 | select ARCH_HAS_CPUFREQ |
89 | select ARCH_HAS_OPP | 97 | select ARCH_HAS_OPP |
98 | select SYS_SUPPORTS_SH_CMT | ||
99 | select SYS_SUPPORTS_SH_TMU | ||
90 | 100 | ||
91 | config ARCH_R8A7740 | 101 | config ARCH_R8A7740 |
92 | bool "R-Mobile A1 (R8A77400)" | 102 | bool "R-Mobile A1 (R8A77400)" |
@@ -95,6 +105,8 @@ config ARCH_R8A7740 | |||
95 | select CPU_V7 | 105 | select CPU_V7 |
96 | select SH_CLK_CPG | 106 | select SH_CLK_CPG |
97 | select RENESAS_INTC_IRQPIN | 107 | select RENESAS_INTC_IRQPIN |
108 | select SYS_SUPPORTS_SH_CMT | ||
109 | select SYS_SUPPORTS_SH_TMU | ||
98 | 110 | ||
99 | config ARCH_R8A7778 | 111 | config ARCH_R8A7778 |
100 | bool "R-Car M1A (R8A77781)" | 112 | bool "R-Car M1A (R8A77781)" |
@@ -104,6 +116,7 @@ config ARCH_R8A7778 | |||
104 | select ARM_GIC | 116 | select ARM_GIC |
105 | select USB_ARCH_HAS_EHCI | 117 | select USB_ARCH_HAS_EHCI |
106 | select USB_ARCH_HAS_OHCI | 118 | select USB_ARCH_HAS_OHCI |
119 | select SYS_SUPPORTS_SH_TMU | ||
107 | 120 | ||
108 | config ARCH_R8A7779 | 121 | config ARCH_R8A7779 |
109 | bool "R-Car H1 (R8A77790)" | 122 | bool "R-Car H1 (R8A77790)" |
@@ -114,6 +127,7 @@ config ARCH_R8A7779 | |||
114 | select USB_ARCH_HAS_EHCI | 127 | select USB_ARCH_HAS_EHCI |
115 | select USB_ARCH_HAS_OHCI | 128 | select USB_ARCH_HAS_OHCI |
116 | select RENESAS_INTC_IRQPIN | 129 | select RENESAS_INTC_IRQPIN |
130 | select SYS_SUPPORTS_SH_TMU | ||
117 | 131 | ||
118 | config ARCH_R8A7790 | 132 | config ARCH_R8A7790 |
119 | bool "R-Car H2 (R8A77900)" | 133 | bool "R-Car H2 (R8A77900)" |
@@ -123,6 +137,7 @@ config ARCH_R8A7790 | |||
123 | select MIGHT_HAVE_PCI | 137 | select MIGHT_HAVE_PCI |
124 | select SH_CLK_CPG | 138 | select SH_CLK_CPG |
125 | select RENESAS_IRQC | 139 | select RENESAS_IRQC |
140 | select SYS_SUPPORTS_SH_CMT | ||
126 | 141 | ||
127 | config ARCH_R8A7791 | 142 | config ARCH_R8A7791 |
128 | bool "R-Car M2 (R8A77910)" | 143 | bool "R-Car M2 (R8A77910)" |
@@ -132,6 +147,7 @@ config ARCH_R8A7791 | |||
132 | select MIGHT_HAVE_PCI | 147 | select MIGHT_HAVE_PCI |
133 | select SH_CLK_CPG | 148 | select SH_CLK_CPG |
134 | select RENESAS_IRQC | 149 | select RENESAS_IRQC |
150 | select SYS_SUPPORTS_SH_CMT | ||
135 | 151 | ||
136 | config ARCH_EMEV2 | 152 | config ARCH_EMEV2 |
137 | bool "Emma Mobile EV2" | 153 | bool "Emma Mobile EV2" |
@@ -141,6 +157,7 @@ config ARCH_EMEV2 | |||
141 | select MIGHT_HAVE_PCI | 157 | select MIGHT_HAVE_PCI |
142 | select USE_OF | 158 | select USE_OF |
143 | select AUTO_ZRELADDR | 159 | select AUTO_ZRELADDR |
160 | select SYS_SUPPORTS_EM_STI | ||
144 | 161 | ||
145 | config ARCH_R7S72100 | 162 | config ARCH_R7S72100 |
146 | bool "RZ/A1H (R7S72100)" | 163 | bool "RZ/A1H (R7S72100)" |
@@ -148,6 +165,7 @@ config ARCH_R7S72100 | |||
148 | select ARM_GIC | 165 | select ARM_GIC |
149 | select CPU_V7 | 166 | select CPU_V7 |
150 | select SH_CLK_CPG | 167 | select SH_CLK_CPG |
168 | select SYS_SUPPORTS_SH_MTU2 | ||
151 | 169 | ||
152 | comment "Renesas ARM SoCs Board Type" | 170 | comment "Renesas ARM SoCs Board Type" |
153 | 171 | ||
@@ -321,24 +339,6 @@ config SHMOBILE_TIMER_HZ | |||
321 | want to select a HZ value such as 128 that can evenly divide RCLK. | 339 | want to select a HZ value such as 128 that can evenly divide RCLK. |
322 | A HZ value that does not divide evenly may cause timer drift. | 340 | A HZ value that does not divide evenly may cause timer drift. |
323 | 341 | ||
324 | config SH_TIMER_CMT | ||
325 | bool "CMT timer driver" | ||
326 | default y | ||
327 | help | ||
328 | This enables build of the CMT timer driver. | ||
329 | |||
330 | config SH_TIMER_TMU | ||
331 | bool "TMU timer driver" | ||
332 | default y | ||
333 | help | ||
334 | This enables build of the TMU timer driver. | ||
335 | |||
336 | config EM_TIMER_STI | ||
337 | bool "STI timer driver" | ||
338 | default y | ||
339 | help | ||
340 | This enables build of the STI timer driver. | ||
341 | |||
342 | endmenu | 342 | endmenu |
343 | 343 | ||
344 | endif | 344 | endif |
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile index 0f362b64fb87..3ec74ac95bc1 100644 --- a/arch/arm/mach-u300/Makefile +++ b/arch/arm/mach-u300/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel, U300 machine. | 2 | # Makefile for the linux kernel, U300 machine. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := core.o timer.o | 5 | obj-y := core.o |
6 | obj-m := | 6 | obj-m := |
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c deleted file mode 100644 index fe08fd34c0ce..000000000000 --- a/arch/arm/mach-u300/timer.c +++ /dev/null | |||
@@ -1,451 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch/arm/mach-u300/timer.c | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2007-2009 ST-Ericsson AB | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * Timer COH 901 328, runs the OS timer interrupt. | ||
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
10 | */ | ||
11 | #include <linux/interrupt.h> | ||
12 | #include <linux/time.h> | ||
13 | #include <linux/timex.h> | ||
14 | #include <linux/clockchips.h> | ||
15 | #include <linux/clocksource.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/err.h> | ||
20 | #include <linux/irq.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <linux/of_address.h> | ||
23 | #include <linux/of_irq.h> | ||
24 | #include <linux/sched_clock.h> | ||
25 | |||
26 | /* Generic stuff */ | ||
27 | #include <asm/mach/map.h> | ||
28 | #include <asm/mach/time.h> | ||
29 | |||
30 | /* | ||
31 | * APP side special timer registers | ||
32 | * This timer contains four timers which can fire an interrupt each. | ||
33 | * OS (operating system) timer @ 32768 Hz | ||
34 | * DD (device driver) timer @ 1 kHz | ||
35 | * GP1 (general purpose 1) timer @ 1MHz | ||
36 | * GP2 (general purpose 2) timer @ 1MHz | ||
37 | */ | ||
38 | |||
39 | /* Reset OS Timer 32bit (-/W) */ | ||
40 | #define U300_TIMER_APP_ROST (0x0000) | ||
41 | #define U300_TIMER_APP_ROST_TIMER_RESET (0x00000000) | ||
42 | /* Enable OS Timer 32bit (-/W) */ | ||
43 | #define U300_TIMER_APP_EOST (0x0004) | ||
44 | #define U300_TIMER_APP_EOST_TIMER_ENABLE (0x00000000) | ||
45 | /* Disable OS Timer 32bit (-/W) */ | ||
46 | #define U300_TIMER_APP_DOST (0x0008) | ||
47 | #define U300_TIMER_APP_DOST_TIMER_DISABLE (0x00000000) | ||
48 | /* OS Timer Mode Register 32bit (-/W) */ | ||
49 | #define U300_TIMER_APP_SOSTM (0x000c) | ||
50 | #define U300_TIMER_APP_SOSTM_MODE_CONTINUOUS (0x00000000) | ||
51 | #define U300_TIMER_APP_SOSTM_MODE_ONE_SHOT (0x00000001) | ||
52 | /* OS Timer Status Register 32bit (R/-) */ | ||
53 | #define U300_TIMER_APP_OSTS (0x0010) | ||
54 | #define U300_TIMER_APP_OSTS_TIMER_STATE_MASK (0x0000000F) | ||
55 | #define U300_TIMER_APP_OSTS_TIMER_STATE_IDLE (0x00000001) | ||
56 | #define U300_TIMER_APP_OSTS_TIMER_STATE_ACTIVE (0x00000002) | ||
57 | #define U300_TIMER_APP_OSTS_ENABLE_IND (0x00000010) | ||
58 | #define U300_TIMER_APP_OSTS_MODE_MASK (0x00000020) | ||
59 | #define U300_TIMER_APP_OSTS_MODE_CONTINUOUS (0x00000000) | ||
60 | #define U300_TIMER_APP_OSTS_MODE_ONE_SHOT (0x00000020) | ||
61 | #define U300_TIMER_APP_OSTS_IRQ_ENABLED_IND (0x00000040) | ||
62 | #define U300_TIMER_APP_OSTS_IRQ_PENDING_IND (0x00000080) | ||
63 | /* OS Timer Current Count Register 32bit (R/-) */ | ||
64 | #define U300_TIMER_APP_OSTCC (0x0014) | ||
65 | /* OS Timer Terminal Count Register 32bit (R/W) */ | ||
66 | #define U300_TIMER_APP_OSTTC (0x0018) | ||
67 | /* OS Timer Interrupt Enable Register 32bit (-/W) */ | ||
68 | #define U300_TIMER_APP_OSTIE (0x001c) | ||
69 | #define U300_TIMER_APP_OSTIE_IRQ_DISABLE (0x00000000) | ||
70 | #define U300_TIMER_APP_OSTIE_IRQ_ENABLE (0x00000001) | ||
71 | /* OS Timer Interrupt Acknowledge Register 32bit (-/W) */ | ||
72 | #define U300_TIMER_APP_OSTIA (0x0020) | ||
73 | #define U300_TIMER_APP_OSTIA_IRQ_ACK (0x00000080) | ||
74 | |||
75 | /* Reset DD Timer 32bit (-/W) */ | ||
76 | #define U300_TIMER_APP_RDDT (0x0040) | ||
77 | #define U300_TIMER_APP_RDDT_TIMER_RESET (0x00000000) | ||
78 | /* Enable DD Timer 32bit (-/W) */ | ||
79 | #define U300_TIMER_APP_EDDT (0x0044) | ||
80 | #define U300_TIMER_APP_EDDT_TIMER_ENABLE (0x00000000) | ||
81 | /* Disable DD Timer 32bit (-/W) */ | ||
82 | #define U300_TIMER_APP_DDDT (0x0048) | ||
83 | #define U300_TIMER_APP_DDDT_TIMER_DISABLE (0x00000000) | ||
84 | /* DD Timer Mode Register 32bit (-/W) */ | ||
85 | #define U300_TIMER_APP_SDDTM (0x004c) | ||
86 | #define U300_TIMER_APP_SDDTM_MODE_CONTINUOUS (0x00000000) | ||
87 | #define U300_TIMER_APP_SDDTM_MODE_ONE_SHOT (0x00000001) | ||
88 | /* DD Timer Status Register 32bit (R/-) */ | ||
89 | #define U300_TIMER_APP_DDTS (0x0050) | ||
90 | #define U300_TIMER_APP_DDTS_TIMER_STATE_MASK (0x0000000F) | ||
91 | #define U300_TIMER_APP_DDTS_TIMER_STATE_IDLE (0x00000001) | ||
92 | #define U300_TIMER_APP_DDTS_TIMER_STATE_ACTIVE (0x00000002) | ||
93 | #define U300_TIMER_APP_DDTS_ENABLE_IND (0x00000010) | ||
94 | #define U300_TIMER_APP_DDTS_MODE_MASK (0x00000020) | ||
95 | #define U300_TIMER_APP_DDTS_MODE_CONTINUOUS (0x00000000) | ||
96 | #define U300_TIMER_APP_DDTS_MODE_ONE_SHOT (0x00000020) | ||
97 | #define U300_TIMER_APP_DDTS_IRQ_ENABLED_IND (0x00000040) | ||
98 | #define U300_TIMER_APP_DDTS_IRQ_PENDING_IND (0x00000080) | ||
99 | /* DD Timer Current Count Register 32bit (R/-) */ | ||
100 | #define U300_TIMER_APP_DDTCC (0x0054) | ||
101 | /* DD Timer Terminal Count Register 32bit (R/W) */ | ||
102 | #define U300_TIMER_APP_DDTTC (0x0058) | ||
103 | /* DD Timer Interrupt Enable Register 32bit (-/W) */ | ||
104 | #define U300_TIMER_APP_DDTIE (0x005c) | ||
105 | #define U300_TIMER_APP_DDTIE_IRQ_DISABLE (0x00000000) | ||
106 | #define U300_TIMER_APP_DDTIE_IRQ_ENABLE (0x00000001) | ||
107 | /* DD Timer Interrupt Acknowledge Register 32bit (-/W) */ | ||
108 | #define U300_TIMER_APP_DDTIA (0x0060) | ||
109 | #define U300_TIMER_APP_DDTIA_IRQ_ACK (0x00000080) | ||
110 | |||
111 | /* Reset GP1 Timer 32bit (-/W) */ | ||
112 | #define U300_TIMER_APP_RGPT1 (0x0080) | ||
113 | #define U300_TIMER_APP_RGPT1_TIMER_RESET (0x00000000) | ||
114 | /* Enable GP1 Timer 32bit (-/W) */ | ||
115 | #define U300_TIMER_APP_EGPT1 (0x0084) | ||
116 | #define U300_TIMER_APP_EGPT1_TIMER_ENABLE (0x00000000) | ||
117 | /* Disable GP1 Timer 32bit (-/W) */ | ||
118 | #define U300_TIMER_APP_DGPT1 (0x0088) | ||
119 | #define U300_TIMER_APP_DGPT1_TIMER_DISABLE (0x00000000) | ||
120 | /* GP1 Timer Mode Register 32bit (-/W) */ | ||
121 | #define U300_TIMER_APP_SGPT1M (0x008c) | ||
122 | #define U300_TIMER_APP_SGPT1M_MODE_CONTINUOUS (0x00000000) | ||
123 | #define U300_TIMER_APP_SGPT1M_MODE_ONE_SHOT (0x00000001) | ||
124 | /* GP1 Timer Status Register 32bit (R/-) */ | ||
125 | #define U300_TIMER_APP_GPT1S (0x0090) | ||
126 | #define U300_TIMER_APP_GPT1S_TIMER_STATE_MASK (0x0000000F) | ||
127 | #define U300_TIMER_APP_GPT1S_TIMER_STATE_IDLE (0x00000001) | ||
128 | #define U300_TIMER_APP_GPT1S_TIMER_STATE_ACTIVE (0x00000002) | ||
129 | #define U300_TIMER_APP_GPT1S_ENABLE_IND (0x00000010) | ||
130 | #define U300_TIMER_APP_GPT1S_MODE_MASK (0x00000020) | ||
131 | #define U300_TIMER_APP_GPT1S_MODE_CONTINUOUS (0x00000000) | ||
132 | #define U300_TIMER_APP_GPT1S_MODE_ONE_SHOT (0x00000020) | ||
133 | #define U300_TIMER_APP_GPT1S_IRQ_ENABLED_IND (0x00000040) | ||
134 | #define U300_TIMER_APP_GPT1S_IRQ_PENDING_IND (0x00000080) | ||
135 | /* GP1 Timer Current Count Register 32bit (R/-) */ | ||
136 | #define U300_TIMER_APP_GPT1CC (0x0094) | ||
137 | /* GP1 Timer Terminal Count Register 32bit (R/W) */ | ||
138 | #define U300_TIMER_APP_GPT1TC (0x0098) | ||
139 | /* GP1 Timer Interrupt Enable Register 32bit (-/W) */ | ||
140 | #define U300_TIMER_APP_GPT1IE (0x009c) | ||
141 | #define U300_TIMER_APP_GPT1IE_IRQ_DISABLE (0x00000000) | ||
142 | #define U300_TIMER_APP_GPT1IE_IRQ_ENABLE (0x00000001) | ||
143 | /* GP1 Timer Interrupt Acknowledge Register 32bit (-/W) */ | ||
144 | #define U300_TIMER_APP_GPT1IA (0x00a0) | ||
145 | #define U300_TIMER_APP_GPT1IA_IRQ_ACK (0x00000080) | ||
146 | |||
147 | /* Reset GP2 Timer 32bit (-/W) */ | ||
148 | #define U300_TIMER_APP_RGPT2 (0x00c0) | ||
149 | #define U300_TIMER_APP_RGPT2_TIMER_RESET (0x00000000) | ||
150 | /* Enable GP2 Timer 32bit (-/W) */ | ||
151 | #define U300_TIMER_APP_EGPT2 (0x00c4) | ||
152 | #define U300_TIMER_APP_EGPT2_TIMER_ENABLE (0x00000000) | ||
153 | /* Disable GP2 Timer 32bit (-/W) */ | ||
154 | #define U300_TIMER_APP_DGPT2 (0x00c8) | ||
155 | #define U300_TIMER_APP_DGPT2_TIMER_DISABLE (0x00000000) | ||
156 | /* GP2 Timer Mode Register 32bit (-/W) */ | ||
157 | #define U300_TIMER_APP_SGPT2M (0x00cc) | ||
158 | #define U300_TIMER_APP_SGPT2M_MODE_CONTINUOUS (0x00000000) | ||
159 | #define U300_TIMER_APP_SGPT2M_MODE_ONE_SHOT (0x00000001) | ||
160 | /* GP2 Timer Status Register 32bit (R/-) */ | ||
161 | #define U300_TIMER_APP_GPT2S (0x00d0) | ||
162 | #define U300_TIMER_APP_GPT2S_TIMER_STATE_MASK (0x0000000F) | ||
163 | #define U300_TIMER_APP_GPT2S_TIMER_STATE_IDLE (0x00000001) | ||
164 | #define U300_TIMER_APP_GPT2S_TIMER_STATE_ACTIVE (0x00000002) | ||
165 | #define U300_TIMER_APP_GPT2S_ENABLE_IND (0x00000010) | ||
166 | #define U300_TIMER_APP_GPT2S_MODE_MASK (0x00000020) | ||
167 | #define U300_TIMER_APP_GPT2S_MODE_CONTINUOUS (0x00000000) | ||
168 | #define U300_TIMER_APP_GPT2S_MODE_ONE_SHOT (0x00000020) | ||
169 | #define U300_TIMER_APP_GPT2S_IRQ_ENABLED_IND (0x00000040) | ||
170 | #define U300_TIMER_APP_GPT2S_IRQ_PENDING_IND (0x00000080) | ||
171 | /* GP2 Timer Current Count Register 32bit (R/-) */ | ||
172 | #define U300_TIMER_APP_GPT2CC (0x00d4) | ||
173 | /* GP2 Timer Terminal Count Register 32bit (R/W) */ | ||
174 | #define U300_TIMER_APP_GPT2TC (0x00d8) | ||
175 | /* GP2 Timer Interrupt Enable Register 32bit (-/W) */ | ||
176 | #define U300_TIMER_APP_GPT2IE (0x00dc) | ||
177 | #define U300_TIMER_APP_GPT2IE_IRQ_DISABLE (0x00000000) | ||
178 | #define U300_TIMER_APP_GPT2IE_IRQ_ENABLE (0x00000001) | ||
179 | /* GP2 Timer Interrupt Acknowledge Register 32bit (-/W) */ | ||
180 | #define U300_TIMER_APP_GPT2IA (0x00e0) | ||
181 | #define U300_TIMER_APP_GPT2IA_IRQ_ACK (0x00000080) | ||
182 | |||
183 | /* Clock request control register - all four timers */ | ||
184 | #define U300_TIMER_APP_CRC (0x100) | ||
185 | #define U300_TIMER_APP_CRC_CLOCK_REQUEST_ENABLE (0x00000001) | ||
186 | |||
187 | static void __iomem *u300_timer_base; | ||
188 | |||
189 | struct u300_clockevent_data { | ||
190 | struct clock_event_device cevd; | ||
191 | unsigned ticks_per_jiffy; | ||
192 | }; | ||
193 | |||
194 | /* | ||
195 | * The u300_set_mode() function is always called first, if we | ||
196 | * have oneshot timer active, the oneshot scheduling function | ||
197 | * u300_set_next_event() is called immediately after. | ||
198 | */ | ||
199 | static void u300_set_mode(enum clock_event_mode mode, | ||
200 | struct clock_event_device *evt) | ||
201 | { | ||
202 | struct u300_clockevent_data *cevdata = | ||
203 | container_of(evt, struct u300_clockevent_data, cevd); | ||
204 | |||
205 | switch (mode) { | ||
206 | case CLOCK_EVT_MODE_PERIODIC: | ||
207 | /* Disable interrupts on GPT1 */ | ||
208 | writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE, | ||
209 | u300_timer_base + U300_TIMER_APP_GPT1IE); | ||
210 | /* Disable GP1 while we're reprogramming it. */ | ||
211 | writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE, | ||
212 | u300_timer_base + U300_TIMER_APP_DGPT1); | ||
213 | /* | ||
214 | * Set the periodic mode to a certain number of ticks per | ||
215 | * jiffy. | ||
216 | */ | ||
217 | writel(cevdata->ticks_per_jiffy, | ||
218 | u300_timer_base + U300_TIMER_APP_GPT1TC); | ||
219 | /* | ||
220 | * Set continuous mode, so the timer keeps triggering | ||
221 | * interrupts. | ||
222 | */ | ||
223 | writel(U300_TIMER_APP_SGPT1M_MODE_CONTINUOUS, | ||
224 | u300_timer_base + U300_TIMER_APP_SGPT1M); | ||
225 | /* Enable timer interrupts */ | ||
226 | writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE, | ||
227 | u300_timer_base + U300_TIMER_APP_GPT1IE); | ||
228 | /* Then enable the OS timer again */ | ||
229 | writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE, | ||
230 | u300_timer_base + U300_TIMER_APP_EGPT1); | ||
231 | break; | ||
232 | case CLOCK_EVT_MODE_ONESHOT: | ||
233 | /* Just break; here? */ | ||
234 | /* | ||
235 | * The actual event will be programmed by the next event hook, | ||
236 | * so we just set a dummy value somewhere at the end of the | ||
237 | * universe here. | ||
238 | */ | ||
239 | /* Disable interrupts on GPT1 */ | ||
240 | writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE, | ||
241 | u300_timer_base + U300_TIMER_APP_GPT1IE); | ||
242 | /* Disable GP1 while we're reprogramming it. */ | ||
243 | writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE, | ||
244 | u300_timer_base + U300_TIMER_APP_DGPT1); | ||
245 | /* | ||
246 | * Expire far in the future, u300_set_next_event() will be | ||
247 | * called soon... | ||
248 | */ | ||
249 | writel(0xFFFFFFFF, u300_timer_base + U300_TIMER_APP_GPT1TC); | ||
250 | /* We run one shot per tick here! */ | ||
251 | writel(U300_TIMER_APP_SGPT1M_MODE_ONE_SHOT, | ||
252 | u300_timer_base + U300_TIMER_APP_SGPT1M); | ||
253 | /* Enable interrupts for this timer */ | ||
254 | writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE, | ||
255 | u300_timer_base + U300_TIMER_APP_GPT1IE); | ||
256 | /* Enable timer */ | ||
257 | writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE, | ||
258 | u300_timer_base + U300_TIMER_APP_EGPT1); | ||
259 | break; | ||
260 | case CLOCK_EVT_MODE_UNUSED: | ||
261 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
262 | /* Disable interrupts on GP1 */ | ||
263 | writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE, | ||
264 | u300_timer_base + U300_TIMER_APP_GPT1IE); | ||
265 | /* Disable GP1 */ | ||
266 | writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE, | ||
267 | u300_timer_base + U300_TIMER_APP_DGPT1); | ||
268 | break; | ||
269 | case CLOCK_EVT_MODE_RESUME: | ||
270 | /* Ignore this call */ | ||
271 | break; | ||
272 | } | ||
273 | } | ||
274 | |||
275 | /* | ||
276 | * The app timer in one shot mode obviously has to be reprogrammed | ||
277 | * in EXACTLY this sequence to work properly. Do NOT try to e.g. replace | ||
278 | * the interrupt disable + timer disable commands with a reset command, | ||
279 | * it will fail miserably. Apparently (and I found this the hard way) | ||
280 | * the timer is very sensitive to the instruction order, though you don't | ||
281 | * get that impression from the data sheet. | ||
282 | */ | ||
283 | static int u300_set_next_event(unsigned long cycles, | ||
284 | struct clock_event_device *evt) | ||
285 | |||
286 | { | ||
287 | /* Disable interrupts on GPT1 */ | ||
288 | writel(U300_TIMER_APP_GPT1IE_IRQ_DISABLE, | ||
289 | u300_timer_base + U300_TIMER_APP_GPT1IE); | ||
290 | /* Disable GP1 while we're reprogramming it. */ | ||
291 | writel(U300_TIMER_APP_DGPT1_TIMER_DISABLE, | ||
292 | u300_timer_base + U300_TIMER_APP_DGPT1); | ||
293 | /* Reset the General Purpose timer 1. */ | ||
294 | writel(U300_TIMER_APP_RGPT1_TIMER_RESET, | ||
295 | u300_timer_base + U300_TIMER_APP_RGPT1); | ||
296 | /* IRQ in n * cycles */ | ||
297 | writel(cycles, u300_timer_base + U300_TIMER_APP_GPT1TC); | ||
298 | /* | ||
299 | * We run one shot per tick here! (This is necessary to reconfigure, | ||
300 | * the timer will tilt if you don't!) | ||
301 | */ | ||
302 | writel(U300_TIMER_APP_SGPT1M_MODE_ONE_SHOT, | ||
303 | u300_timer_base + U300_TIMER_APP_SGPT1M); | ||
304 | /* Enable timer interrupts */ | ||
305 | writel(U300_TIMER_APP_GPT1IE_IRQ_ENABLE, | ||
306 | u300_timer_base + U300_TIMER_APP_GPT1IE); | ||
307 | /* Then enable the OS timer again */ | ||
308 | writel(U300_TIMER_APP_EGPT1_TIMER_ENABLE, | ||
309 | u300_timer_base + U300_TIMER_APP_EGPT1); | ||
310 | return 0; | ||
311 | } | ||
312 | |||
313 | static struct u300_clockevent_data u300_clockevent_data = { | ||
314 | /* Use general purpose timer 1 as clock event */ | ||
315 | .cevd = { | ||
316 | .name = "GPT1", | ||
317 | /* Reasonably fast and accurate clock event */ | ||
318 | .rating = 300, | ||
319 | .features = CLOCK_EVT_FEAT_PERIODIC | | ||
320 | CLOCK_EVT_FEAT_ONESHOT, | ||
321 | .set_next_event = u300_set_next_event, | ||
322 | .set_mode = u300_set_mode, | ||
323 | }, | ||
324 | }; | ||
325 | |||
326 | /* Clock event timer interrupt handler */ | ||
327 | static irqreturn_t u300_timer_interrupt(int irq, void *dev_id) | ||
328 | { | ||
329 | struct clock_event_device *evt = &u300_clockevent_data.cevd; | ||
330 | /* ACK/Clear timer IRQ for the APP GPT1 Timer */ | ||
331 | |||
332 | writel(U300_TIMER_APP_GPT1IA_IRQ_ACK, | ||
333 | u300_timer_base + U300_TIMER_APP_GPT1IA); | ||
334 | evt->event_handler(evt); | ||
335 | return IRQ_HANDLED; | ||
336 | } | ||
337 | |||
338 | static struct irqaction u300_timer_irq = { | ||
339 | .name = "U300 Timer Tick", | ||
340 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
341 | .handler = u300_timer_interrupt, | ||
342 | }; | ||
343 | |||
344 | /* | ||
345 | * Override the global weak sched_clock symbol with this | ||
346 | * local implementation which uses the clocksource to get some | ||
347 | * better resolution when scheduling the kernel. We accept that | ||
348 | * this wraps around for now, since it is just a relative time | ||
349 | * stamp. (Inspired by OMAP implementation.) | ||
350 | */ | ||
351 | |||
352 | static u64 notrace u300_read_sched_clock(void) | ||
353 | { | ||
354 | return readl(u300_timer_base + U300_TIMER_APP_GPT2CC); | ||
355 | } | ||
356 | |||
357 | static unsigned long u300_read_current_timer(void) | ||
358 | { | ||
359 | return readl(u300_timer_base + U300_TIMER_APP_GPT2CC); | ||
360 | } | ||
361 | |||
362 | static struct delay_timer u300_delay_timer; | ||
363 | |||
364 | /* | ||
365 | * This sets up the system timers, clock source and clock event. | ||
366 | */ | ||
367 | static void __init u300_timer_init_of(struct device_node *np) | ||
368 | { | ||
369 | unsigned int irq; | ||
370 | struct clk *clk; | ||
371 | unsigned long rate; | ||
372 | |||
373 | u300_timer_base = of_iomap(np, 0); | ||
374 | if (!u300_timer_base) | ||
375 | panic("could not ioremap system timer\n"); | ||
376 | |||
377 | /* Get the IRQ for the GP1 timer */ | ||
378 | irq = irq_of_parse_and_map(np, 2); | ||
379 | if (!irq) | ||
380 | panic("no IRQ for system timer\n"); | ||
381 | |||
382 | pr_info("U300 GP1 timer @ base: %p, IRQ: %u\n", u300_timer_base, irq); | ||
383 | |||
384 | /* Clock the interrupt controller */ | ||
385 | clk = of_clk_get(np, 0); | ||
386 | BUG_ON(IS_ERR(clk)); | ||
387 | clk_prepare_enable(clk); | ||
388 | rate = clk_get_rate(clk); | ||
389 | |||
390 | u300_clockevent_data.ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); | ||
391 | |||
392 | sched_clock_register(u300_read_sched_clock, 32, rate); | ||
393 | |||
394 | u300_delay_timer.read_current_timer = &u300_read_current_timer; | ||
395 | u300_delay_timer.freq = rate; | ||
396 | register_current_timer_delay(&u300_delay_timer); | ||
397 | |||
398 | /* | ||
399 | * Disable the "OS" and "DD" timers - these are designed for Symbian! | ||
400 | * Example usage in cnh1601578 cpu subsystem pd_timer_app.c | ||
401 | */ | ||
402 | writel(U300_TIMER_APP_CRC_CLOCK_REQUEST_ENABLE, | ||
403 | u300_timer_base + U300_TIMER_APP_CRC); | ||
404 | writel(U300_TIMER_APP_ROST_TIMER_RESET, | ||
405 | u300_timer_base + U300_TIMER_APP_ROST); | ||
406 | writel(U300_TIMER_APP_DOST_TIMER_DISABLE, | ||
407 | u300_timer_base + U300_TIMER_APP_DOST); | ||
408 | writel(U300_TIMER_APP_RDDT_TIMER_RESET, | ||
409 | u300_timer_base + U300_TIMER_APP_RDDT); | ||
410 | writel(U300_TIMER_APP_DDDT_TIMER_DISABLE, | ||
411 | u300_timer_base + U300_TIMER_APP_DDDT); | ||
412 | |||
413 | /* Reset the General Purpose timer 1. */ | ||
414 | writel(U300_TIMER_APP_RGPT1_TIMER_RESET, | ||
415 | u300_timer_base + U300_TIMER_APP_RGPT1); | ||
416 | |||
417 | /* Set up the IRQ handler */ | ||
418 | setup_irq(irq, &u300_timer_irq); | ||
419 | |||
420 | /* Reset the General Purpose timer 2 */ | ||
421 | writel(U300_TIMER_APP_RGPT2_TIMER_RESET, | ||
422 | u300_timer_base + U300_TIMER_APP_RGPT2); | ||
423 | /* Set this timer to run around forever */ | ||
424 | writel(0xFFFFFFFFU, u300_timer_base + U300_TIMER_APP_GPT2TC); | ||
425 | /* Set continuous mode so it wraps around */ | ||
426 | writel(U300_TIMER_APP_SGPT2M_MODE_CONTINUOUS, | ||
427 | u300_timer_base + U300_TIMER_APP_SGPT2M); | ||
428 | /* Disable timer interrupts */ | ||
429 | writel(U300_TIMER_APP_GPT2IE_IRQ_DISABLE, | ||
430 | u300_timer_base + U300_TIMER_APP_GPT2IE); | ||
431 | /* Then enable the GP2 timer to use as a free running us counter */ | ||
432 | writel(U300_TIMER_APP_EGPT2_TIMER_ENABLE, | ||
433 | u300_timer_base + U300_TIMER_APP_EGPT2); | ||
434 | |||
435 | /* Use general purpose timer 2 as clock source */ | ||
436 | if (clocksource_mmio_init(u300_timer_base + U300_TIMER_APP_GPT2CC, | ||
437 | "GPT2", rate, 300, 32, clocksource_mmio_readl_up)) | ||
438 | pr_err("timer: failed to initialize U300 clock source\n"); | ||
439 | |||
440 | /* Configure and register the clockevent */ | ||
441 | clockevents_config_and_register(&u300_clockevent_data.cevd, rate, | ||
442 | 1, 0xffffffff); | ||
443 | |||
444 | /* | ||
445 | * TODO: init and register the rest of the timers too, they can be | ||
446 | * used by hrtimers! | ||
447 | */ | ||
448 | } | ||
449 | |||
450 | CLOCKSOURCE_OF_DECLARE(u300_timer, "stericsson,u300-apptimer", | ||
451 | u300_timer_init_of); | ||
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig index 6b04260aa142..f03e75bd0b2b 100644 --- a/arch/arm/mach-zynq/Kconfig +++ b/arch/arm/mach-zynq/Kconfig | |||
@@ -2,6 +2,8 @@ config ARCH_ZYNQ | |||
2 | bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7 | 2 | bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7 |
3 | select ARM_AMBA | 3 | select ARM_AMBA |
4 | select ARM_GIC | 4 | select ARM_GIC |
5 | select ARCH_HAS_CPUFREQ | ||
6 | select ARCH_HAS_OPP | ||
5 | select COMMON_CLK | 7 | select COMMON_CLK |
6 | select CPU_V7 | 8 | select CPU_V7 |
7 | select GENERIC_CLOCKEVENTS | 9 | select GENERIC_CLOCKEVENTS |
@@ -13,6 +15,6 @@ config ARCH_ZYNQ | |||
13 | select HAVE_SMP | 15 | select HAVE_SMP |
14 | select SPARSE_IRQ | 16 | select SPARSE_IRQ |
15 | select CADENCE_TTC_TIMER | 17 | select CADENCE_TTC_TIMER |
16 | select ARM_GLOBAL_TIMER | 18 | select ARM_GLOBAL_TIMER if !CPU_FREQ |
17 | help | 19 | help |
18 | Support for Xilinx Zynq ARM Cortex A9 Platform | 20 | Support for Xilinx Zynq ARM Cortex A9 Platform |
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 8c09a8393fb6..a39be8e80856 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
@@ -64,6 +64,8 @@ static struct platform_device zynq_cpuidle_device = { | |||
64 | */ | 64 | */ |
65 | static void __init zynq_init_machine(void) | 65 | static void __init zynq_init_machine(void) |
66 | { | 66 | { |
67 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; | ||
68 | |||
67 | /* | 69 | /* |
68 | * 64KB way size, 8-way associativity, parity disabled | 70 | * 64KB way size, 8-way associativity, parity disabled |
69 | */ | 71 | */ |
@@ -72,6 +74,7 @@ static void __init zynq_init_machine(void) | |||
72 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 74 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
73 | 75 | ||
74 | platform_device_register(&zynq_cpuidle_device); | 76 | platform_device_register(&zynq_cpuidle_device); |
77 | platform_device_register_full(&devinfo); | ||
75 | } | 78 | } |
76 | 79 | ||
77 | static void __init zynq_timer_init(void) | 80 | static void __init zynq_timer_init(void) |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 27bbcfc7202a..516d8a7ca697 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
@@ -16,6 +16,7 @@ config ARM64 | |||
16 | select DCACHE_WORD_ACCESS | 16 | select DCACHE_WORD_ACCESS |
17 | select GENERIC_CLOCKEVENTS | 17 | select GENERIC_CLOCKEVENTS |
18 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP | 18 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP |
19 | select GENERIC_CPU_AUTOPROBE | ||
19 | select GENERIC_IOMAP | 20 | select GENERIC_IOMAP |
20 | select GENERIC_IRQ_PROBE | 21 | select GENERIC_IRQ_PROBE |
21 | select GENERIC_IRQ_SHOW | 22 | select GENERIC_IRQ_SHOW |
@@ -26,6 +27,7 @@ config ARM64 | |||
26 | select GENERIC_TIME_VSYSCALL | 27 | select GENERIC_TIME_VSYSCALL |
27 | select HARDIRQS_SW_RESEND | 28 | select HARDIRQS_SW_RESEND |
28 | select HAVE_ARCH_JUMP_LABEL | 29 | select HAVE_ARCH_JUMP_LABEL |
30 | select HAVE_ARCH_KGDB | ||
29 | select HAVE_ARCH_TRACEHOOK | 31 | select HAVE_ARCH_TRACEHOOK |
30 | select HAVE_DEBUG_BUGVERBOSE | 32 | select HAVE_DEBUG_BUGVERBOSE |
31 | select HAVE_DEBUG_KMEMLEAK | 33 | select HAVE_DEBUG_KMEMLEAK |
@@ -38,6 +40,8 @@ config ARM64 | |||
38 | select HAVE_MEMBLOCK | 40 | select HAVE_MEMBLOCK |
39 | select HAVE_PATA_PLATFORM | 41 | select HAVE_PATA_PLATFORM |
40 | select HAVE_PERF_EVENTS | 42 | select HAVE_PERF_EVENTS |
43 | select HAVE_PERF_REGS | ||
44 | select HAVE_PERF_USER_STACK_DUMP | ||
41 | select IRQ_DOMAIN | 45 | select IRQ_DOMAIN |
42 | select MODULES_USE_ELF_RELA | 46 | select MODULES_USE_ELF_RELA |
43 | select NO_BOOTMEM | 47 | select NO_BOOTMEM |
@@ -73,7 +77,7 @@ config LOCKDEP_SUPPORT | |||
73 | config TRACE_IRQFLAGS_SUPPORT | 77 | config TRACE_IRQFLAGS_SUPPORT |
74 | def_bool y | 78 | def_bool y |
75 | 79 | ||
76 | config RWSEM_GENERIC_SPINLOCK | 80 | config RWSEM_XCHGADD_ALGORITHM |
77 | def_bool y | 81 | def_bool y |
78 | 82 | ||
79 | config GENERIC_HWEIGHT | 83 | config GENERIC_HWEIGHT |
@@ -85,7 +89,7 @@ config GENERIC_CSUM | |||
85 | config GENERIC_CALIBRATE_DELAY | 89 | config GENERIC_CALIBRATE_DELAY |
86 | def_bool y | 90 | def_bool y |
87 | 91 | ||
88 | config ZONE_DMA32 | 92 | config ZONE_DMA |
89 | def_bool y | 93 | def_bool y |
90 | 94 | ||
91 | config ARCH_DMA_ADDR_T_64BIT | 95 | config ARCH_DMA_ADDR_T_64BIT |
@@ -164,6 +168,22 @@ config SMP | |||
164 | 168 | ||
165 | If you don't know what to do here, say N. | 169 | If you don't know what to do here, say N. |
166 | 170 | ||
171 | config SCHED_MC | ||
172 | bool "Multi-core scheduler support" | ||
173 | depends on SMP | ||
174 | help | ||
175 | Multi-core scheduler support improves the CPU scheduler's decision | ||
176 | making when dealing with multi-core CPU chips at a cost of slightly | ||
177 | increased overhead in some places. If unsure say N here. | ||
178 | |||
179 | config SCHED_SMT | ||
180 | bool "SMT scheduler support" | ||
181 | depends on SMP | ||
182 | help | ||
183 | Improves the CPU scheduler's decision making when dealing with | ||
184 | MultiThreading at a cost of slightly increased overhead in some | ||
185 | places. If unsure say N here. | ||
186 | |||
167 | config NR_CPUS | 187 | config NR_CPUS |
168 | int "Maximum number of CPUs (2-32)" | 188 | int "Maximum number of CPUs (2-32)" |
169 | range 2 32 | 189 | range 2 32 |
@@ -301,6 +321,8 @@ menu "CPU Power Management" | |||
301 | 321 | ||
302 | source "drivers/cpuidle/Kconfig" | 322 | source "drivers/cpuidle/Kconfig" |
303 | 323 | ||
324 | source "drivers/cpufreq/Kconfig" | ||
325 | |||
304 | endmenu | 326 | endmenu |
305 | 327 | ||
306 | source "net/Kconfig" | 328 | source "net/Kconfig" |
diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi index d37d7369e260..93f4b2dd9248 100644 --- a/arch/arm64/boot/dts/apm-storm.dtsi +++ b/arch/arm64/boot/dts/apm-storm.dtsi | |||
@@ -176,6 +176,87 @@ | |||
176 | reg-names = "csr-reg"; | 176 | reg-names = "csr-reg"; |
177 | clock-output-names = "eth8clk"; | 177 | clock-output-names = "eth8clk"; |
178 | }; | 178 | }; |
179 | |||
180 | sataphy1clk: sataphy1clk@1f21c000 { | ||
181 | compatible = "apm,xgene-device-clock"; | ||
182 | #clock-cells = <1>; | ||
183 | clocks = <&socplldiv2 0>; | ||
184 | reg = <0x0 0x1f21c000 0x0 0x1000>; | ||
185 | reg-names = "csr-reg"; | ||
186 | clock-output-names = "sataphy1clk"; | ||
187 | status = "disabled"; | ||
188 | csr-offset = <0x4>; | ||
189 | csr-mask = <0x00>; | ||
190 | enable-offset = <0x0>; | ||
191 | enable-mask = <0x06>; | ||
192 | }; | ||
193 | |||
194 | sataphy2clk: sataphy1clk@1f22c000 { | ||
195 | compatible = "apm,xgene-device-clock"; | ||
196 | #clock-cells = <1>; | ||
197 | clocks = <&socplldiv2 0>; | ||
198 | reg = <0x0 0x1f22c000 0x0 0x1000>; | ||
199 | reg-names = "csr-reg"; | ||
200 | clock-output-names = "sataphy2clk"; | ||
201 | status = "ok"; | ||
202 | csr-offset = <0x4>; | ||
203 | csr-mask = <0x3a>; | ||
204 | enable-offset = <0x0>; | ||
205 | enable-mask = <0x06>; | ||
206 | }; | ||
207 | |||
208 | sataphy3clk: sataphy1clk@1f23c000 { | ||
209 | compatible = "apm,xgene-device-clock"; | ||
210 | #clock-cells = <1>; | ||
211 | clocks = <&socplldiv2 0>; | ||
212 | reg = <0x0 0x1f23c000 0x0 0x1000>; | ||
213 | reg-names = "csr-reg"; | ||
214 | clock-output-names = "sataphy3clk"; | ||
215 | status = "ok"; | ||
216 | csr-offset = <0x4>; | ||
217 | csr-mask = <0x3a>; | ||
218 | enable-offset = <0x0>; | ||
219 | enable-mask = <0x06>; | ||
220 | }; | ||
221 | |||
222 | sata01clk: sata01clk@1f21c000 { | ||
223 | compatible = "apm,xgene-device-clock"; | ||
224 | #clock-cells = <1>; | ||
225 | clocks = <&socplldiv2 0>; | ||
226 | reg = <0x0 0x1f21c000 0x0 0x1000>; | ||
227 | reg-names = "csr-reg"; | ||
228 | clock-output-names = "sata01clk"; | ||
229 | csr-offset = <0x4>; | ||
230 | csr-mask = <0x05>; | ||
231 | enable-offset = <0x0>; | ||
232 | enable-mask = <0x39>; | ||
233 | }; | ||
234 | |||
235 | sata23clk: sata23clk@1f22c000 { | ||
236 | compatible = "apm,xgene-device-clock"; | ||
237 | #clock-cells = <1>; | ||
238 | clocks = <&socplldiv2 0>; | ||
239 | reg = <0x0 0x1f22c000 0x0 0x1000>; | ||
240 | reg-names = "csr-reg"; | ||
241 | clock-output-names = "sata23clk"; | ||
242 | csr-offset = <0x4>; | ||
243 | csr-mask = <0x05>; | ||
244 | enable-offset = <0x0>; | ||
245 | enable-mask = <0x39>; | ||
246 | }; | ||
247 | |||
248 | sata45clk: sata45clk@1f23c000 { | ||
249 | compatible = "apm,xgene-device-clock"; | ||
250 | #clock-cells = <1>; | ||
251 | clocks = <&socplldiv2 0>; | ||
252 | reg = <0x0 0x1f23c000 0x0 0x1000>; | ||
253 | reg-names = "csr-reg"; | ||
254 | clock-output-names = "sata45clk"; | ||
255 | csr-offset = <0x4>; | ||
256 | csr-mask = <0x05>; | ||
257 | enable-offset = <0x0>; | ||
258 | enable-mask = <0x39>; | ||
259 | }; | ||
179 | }; | 260 | }; |
180 | 261 | ||
181 | serial0: serial@1c020000 { | 262 | serial0: serial@1c020000 { |
@@ -187,5 +268,76 @@ | |||
187 | interrupt-parent = <&gic>; | 268 | interrupt-parent = <&gic>; |
188 | interrupts = <0x0 0x4c 0x4>; | 269 | interrupts = <0x0 0x4c 0x4>; |
189 | }; | 270 | }; |
271 | |||
272 | phy1: phy@1f21a000 { | ||
273 | compatible = "apm,xgene-phy"; | ||
274 | reg = <0x0 0x1f21a000 0x0 0x100>; | ||
275 | #phy-cells = <1>; | ||
276 | clocks = <&sataphy1clk 0>; | ||
277 | status = "disabled"; | ||
278 | apm,tx-boost-gain = <30 30 30 30 30 30>; | ||
279 | apm,tx-eye-tuning = <2 10 10 2 10 10>; | ||
280 | }; | ||
281 | |||
282 | phy2: phy@1f22a000 { | ||
283 | compatible = "apm,xgene-phy"; | ||
284 | reg = <0x0 0x1f22a000 0x0 0x100>; | ||
285 | #phy-cells = <1>; | ||
286 | clocks = <&sataphy2clk 0>; | ||
287 | status = "ok"; | ||
288 | apm,tx-boost-gain = <30 30 30 30 30 30>; | ||
289 | apm,tx-eye-tuning = <1 10 10 2 10 10>; | ||
290 | }; | ||
291 | |||
292 | phy3: phy@1f23a000 { | ||
293 | compatible = "apm,xgene-phy"; | ||
294 | reg = <0x0 0x1f23a000 0x0 0x100>; | ||
295 | #phy-cells = <1>; | ||
296 | clocks = <&sataphy3clk 0>; | ||
297 | status = "ok"; | ||
298 | apm,tx-boost-gain = <31 31 31 31 31 31>; | ||
299 | apm,tx-eye-tuning = <2 10 10 2 10 10>; | ||
300 | }; | ||
301 | |||
302 | sata1: sata@1a000000 { | ||
303 | compatible = "apm,xgene-ahci"; | ||
304 | reg = <0x0 0x1a000000 0x0 0x1000>, | ||
305 | <0x0 0x1f210000 0x0 0x1000>, | ||
306 | <0x0 0x1f21d000 0x0 0x1000>, | ||
307 | <0x0 0x1f21e000 0x0 0x1000>, | ||
308 | <0x0 0x1f217000 0x0 0x1000>; | ||
309 | interrupts = <0x0 0x86 0x4>; | ||
310 | status = "disabled"; | ||
311 | clocks = <&sata01clk 0>; | ||
312 | phys = <&phy1 0>; | ||
313 | phy-names = "sata-phy"; | ||
314 | }; | ||
315 | |||
316 | sata2: sata@1a400000 { | ||
317 | compatible = "apm,xgene-ahci"; | ||
318 | reg = <0x0 0x1a400000 0x0 0x1000>, | ||
319 | <0x0 0x1f220000 0x0 0x1000>, | ||
320 | <0x0 0x1f22d000 0x0 0x1000>, | ||
321 | <0x0 0x1f22e000 0x0 0x1000>, | ||
322 | <0x0 0x1f227000 0x0 0x1000>; | ||
323 | interrupts = <0x0 0x87 0x4>; | ||
324 | status = "ok"; | ||
325 | clocks = <&sata23clk 0>; | ||
326 | phys = <&phy2 0>; | ||
327 | phy-names = "sata-phy"; | ||
328 | }; | ||
329 | |||
330 | sata3: sata@1a800000 { | ||
331 | compatible = "apm,xgene-ahci"; | ||
332 | reg = <0x0 0x1a800000 0x0 0x1000>, | ||
333 | <0x0 0x1f230000 0x0 0x1000>, | ||
334 | <0x0 0x1f23d000 0x0 0x1000>, | ||
335 | <0x0 0x1f23e000 0x0 0x1000>; | ||
336 | interrupts = <0x0 0x88 0x4>; | ||
337 | status = "ok"; | ||
338 | clocks = <&sata45clk 0>; | ||
339 | phys = <&phy3 0>; | ||
340 | phy-names = "sata-phy"; | ||
341 | }; | ||
190 | }; | 342 | }; |
191 | }; | 343 | }; |
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index 3bdfdda70567..4bca4923fc0b 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild | |||
@@ -32,6 +32,7 @@ generic-y += poll.h | |||
32 | generic-y += posix_types.h | 32 | generic-y += posix_types.h |
33 | generic-y += preempt.h | 33 | generic-y += preempt.h |
34 | generic-y += resource.h | 34 | generic-y += resource.h |
35 | generic-y += rwsem.h | ||
35 | generic-y += scatterlist.h | 36 | generic-y += scatterlist.h |
36 | generic-y += sections.h | 37 | generic-y += sections.h |
37 | generic-y += segment.h | 38 | generic-y += segment.h |
diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h index 409ca370cfe2..66eb7648043b 100644 --- a/arch/arm64/include/asm/barrier.h +++ b/arch/arm64/include/asm/barrier.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define wfi() asm volatile("wfi" : : : "memory") | 25 | #define wfi() asm volatile("wfi" : : : "memory") |
26 | 26 | ||
27 | #define isb() asm volatile("isb" : : : "memory") | 27 | #define isb() asm volatile("isb" : : : "memory") |
28 | #define dmb(opt) asm volatile("dmb sy" : : : "memory") | ||
28 | #define dsb(opt) asm volatile("dsb sy" : : : "memory") | 29 | #define dsb(opt) asm volatile("dsb sy" : : : "memory") |
29 | 30 | ||
30 | #define mb() dsb() | 31 | #define mb() dsb() |
diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h index 889324981aa4..4c60e64a801c 100644 --- a/arch/arm64/include/asm/cacheflush.h +++ b/arch/arm64/include/asm/cacheflush.h | |||
@@ -85,6 +85,13 @@ static inline void flush_cache_page(struct vm_area_struct *vma, | |||
85 | } | 85 | } |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * Cache maintenance functions used by the DMA API. No to be used directly. | ||
89 | */ | ||
90 | extern void __dma_map_area(const void *, size_t, int); | ||
91 | extern void __dma_unmap_area(const void *, size_t, int); | ||
92 | extern void __dma_flush_range(const void *, const void *); | ||
93 | |||
94 | /* | ||
88 | * Copy user data from/to a page which is mapped into a different | 95 | * Copy user data from/to a page which is mapped into a different |
89 | * processes address space. Really, we want to allow our "user | 96 | * processes address space. Really, we want to allow our "user |
90 | * space" model to handle this. | 97 | * space" model to handle this. |
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index fda2704b3f9f..e71f81fe127a 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h | |||
@@ -228,7 +228,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr) | |||
228 | return (u32)(unsigned long)uptr; | 228 | return (u32)(unsigned long)uptr; |
229 | } | 229 | } |
230 | 230 | ||
231 | #define compat_user_stack_pointer() (current_pt_regs()->compat_sp) | 231 | #define compat_user_stack_pointer() (user_stack_pointer(current_pt_regs())) |
232 | 232 | ||
233 | static inline void __user *arch_compat_alloc_user_space(long len) | 233 | static inline void __user *arch_compat_alloc_user_space(long len) |
234 | { | 234 | { |
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h new file mode 100644 index 000000000000..cd4ac0516488 --- /dev/null +++ b/arch/arm64/include/asm/cpufeature.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org> | ||
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 | #ifndef __ASM_CPUFEATURE_H | ||
10 | #define __ASM_CPUFEATURE_H | ||
11 | |||
12 | #include <asm/hwcap.h> | ||
13 | |||
14 | /* | ||
15 | * In the arm64 world (as in the ARM world), elf_hwcap is used both internally | ||
16 | * in the kernel and for user space to keep track of which optional features | ||
17 | * are supported by the current system. So let's map feature 'x' to HWCAP_x. | ||
18 | * Note that HWCAP_x constants are bit fields so we need to take the log. | ||
19 | */ | ||
20 | |||
21 | #define MAX_CPU_FEATURES (8 * sizeof(elf_hwcap)) | ||
22 | #define cpu_feature(x) ilog2(HWCAP_ ## x) | ||
23 | |||
24 | static inline bool cpu_have_feature(unsigned int num) | ||
25 | { | ||
26 | return elf_hwcap & (1UL << num); | ||
27 | } | ||
28 | |||
29 | #endif | ||
diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h index 62314791570c..6e9b5b36921c 100644 --- a/arch/arm64/include/asm/debug-monitors.h +++ b/arch/arm64/include/asm/debug-monitors.h | |||
@@ -26,6 +26,53 @@ | |||
26 | #define DBG_ESR_EVT_HWWP 0x2 | 26 | #define DBG_ESR_EVT_HWWP 0x2 |
27 | #define DBG_ESR_EVT_BRK 0x6 | 27 | #define DBG_ESR_EVT_BRK 0x6 |
28 | 28 | ||
29 | /* | ||
30 | * Break point instruction encoding | ||
31 | */ | ||
32 | #define BREAK_INSTR_SIZE 4 | ||
33 | |||
34 | /* | ||
35 | * ESR values expected for dynamic and compile time BRK instruction | ||
36 | */ | ||
37 | #define DBG_ESR_VAL_BRK(x) (0xf2000000 | ((x) & 0xfffff)) | ||
38 | |||
39 | /* | ||
40 | * #imm16 values used for BRK instruction generation | ||
41 | * Allowed values for kgbd are 0x400 - 0x7ff | ||
42 | * 0x400: for dynamic BRK instruction | ||
43 | * 0x401: for compile time BRK instruction | ||
44 | */ | ||
45 | #define KGDB_DYN_DGB_BRK_IMM 0x400 | ||
46 | #define KDBG_COMPILED_DBG_BRK_IMM 0x401 | ||
47 | |||
48 | /* | ||
49 | * BRK instruction encoding | ||
50 | * The #imm16 value should be placed at bits[20:5] within BRK ins | ||
51 | */ | ||
52 | #define AARCH64_BREAK_MON 0xd4200000 | ||
53 | |||
54 | /* | ||
55 | * Extract byte from BRK instruction | ||
56 | */ | ||
57 | #define KGDB_DYN_DGB_BRK_INS_BYTE(x) \ | ||
58 | ((((AARCH64_BREAK_MON) & 0xffe0001f) >> (x * 8)) & 0xff) | ||
59 | |||
60 | /* | ||
61 | * Extract byte from BRK #imm16 | ||
62 | */ | ||
63 | #define KGBD_DYN_DGB_BRK_IMM_BYTE(x) \ | ||
64 | (((((KGDB_DYN_DGB_BRK_IMM) & 0xffff) << 5) >> (x * 8)) & 0xff) | ||
65 | |||
66 | #define KGDB_DYN_DGB_BRK_BYTE(x) \ | ||
67 | (KGDB_DYN_DGB_BRK_INS_BYTE(x) | KGBD_DYN_DGB_BRK_IMM_BYTE(x)) | ||
68 | |||
69 | #define KGDB_DYN_BRK_INS_BYTE0 KGDB_DYN_DGB_BRK_BYTE(0) | ||
70 | #define KGDB_DYN_BRK_INS_BYTE1 KGDB_DYN_DGB_BRK_BYTE(1) | ||
71 | #define KGDB_DYN_BRK_INS_BYTE2 KGDB_DYN_DGB_BRK_BYTE(2) | ||
72 | #define KGDB_DYN_BRK_INS_BYTE3 KGDB_DYN_DGB_BRK_BYTE(3) | ||
73 | |||
74 | #define CACHE_FLUSH_IS_SAFE 1 | ||
75 | |||
29 | enum debug_el { | 76 | enum debug_el { |
30 | DBG_ACTIVE_EL0 = 0, | 77 | DBG_ACTIVE_EL0 = 0, |
31 | DBG_ACTIVE_EL1, | 78 | DBG_ACTIVE_EL1, |
@@ -43,23 +90,6 @@ enum debug_el { | |||
43 | #ifndef __ASSEMBLY__ | 90 | #ifndef __ASSEMBLY__ |
44 | struct task_struct; | 91 | struct task_struct; |
45 | 92 | ||
46 | #define local_dbg_save(flags) \ | ||
47 | do { \ | ||
48 | typecheck(unsigned long, flags); \ | ||
49 | asm volatile( \ | ||
50 | "mrs %0, daif // local_dbg_save\n" \ | ||
51 | "msr daifset, #8" \ | ||
52 | : "=r" (flags) : : "memory"); \ | ||
53 | } while (0) | ||
54 | |||
55 | #define local_dbg_restore(flags) \ | ||
56 | do { \ | ||
57 | typecheck(unsigned long, flags); \ | ||
58 | asm volatile( \ | ||
59 | "msr daif, %0 // local_dbg_restore\n" \ | ||
60 | : : "r" (flags) : "memory"); \ | ||
61 | } while (0) | ||
62 | |||
63 | #define DBG_ARCH_ID_RESERVED 0 /* In case of ptrace ABI updates. */ | 93 | #define DBG_ARCH_ID_RESERVED 0 /* In case of ptrace ABI updates. */ |
64 | 94 | ||
65 | #define DBG_HOOK_HANDLED 0 | 95 | #define DBG_HOOK_HANDLED 0 |
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h index fd0c0c0e447a..3a4572ec3273 100644 --- a/arch/arm64/include/asm/dma-mapping.h +++ b/arch/arm64/include/asm/dma-mapping.h | |||
@@ -30,6 +30,8 @@ | |||
30 | 30 | ||
31 | #define DMA_ERROR_CODE (~(dma_addr_t)0) | 31 | #define DMA_ERROR_CODE (~(dma_addr_t)0) |
32 | extern struct dma_map_ops *dma_ops; | 32 | extern struct dma_map_ops *dma_ops; |
33 | extern struct dma_map_ops coherent_swiotlb_dma_ops; | ||
34 | extern struct dma_map_ops noncoherent_swiotlb_dma_ops; | ||
33 | 35 | ||
34 | static inline struct dma_map_ops *__generic_dma_ops(struct device *dev) | 36 | static inline struct dma_map_ops *__generic_dma_ops(struct device *dev) |
35 | { | 37 | { |
@@ -47,6 +49,11 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev) | |||
47 | return __generic_dma_ops(dev); | 49 | return __generic_dma_ops(dev); |
48 | } | 50 | } |
49 | 51 | ||
52 | static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) | ||
53 | { | ||
54 | dev->archdata.dma_ops = ops; | ||
55 | } | ||
56 | |||
50 | #include <asm-generic/dma-mapping-common.h> | 57 | #include <asm-generic/dma-mapping-common.h> |
51 | 58 | ||
52 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | 59 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) |
diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index 6cddbb0c9f54..024c46183c3c 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h | |||
@@ -32,6 +32,12 @@ | |||
32 | #define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT) | 32 | #define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT) |
33 | #define COMPAT_HWCAP_EVTSTRM (1 << 21) | 33 | #define COMPAT_HWCAP_EVTSTRM (1 << 21) |
34 | 34 | ||
35 | #define COMPAT_HWCAP2_AES (1 << 0) | ||
36 | #define COMPAT_HWCAP2_PMULL (1 << 1) | ||
37 | #define COMPAT_HWCAP2_SHA1 (1 << 2) | ||
38 | #define COMPAT_HWCAP2_SHA2 (1 << 3) | ||
39 | #define COMPAT_HWCAP2_CRC32 (1 << 4) | ||
40 | |||
35 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
36 | /* | 42 | /* |
37 | * This yields a mask that user programs can use to figure out what | 43 | * This yields a mask that user programs can use to figure out what |
@@ -41,7 +47,8 @@ | |||
41 | 47 | ||
42 | #ifdef CONFIG_COMPAT | 48 | #ifdef CONFIG_COMPAT |
43 | #define COMPAT_ELF_HWCAP (compat_elf_hwcap) | 49 | #define COMPAT_ELF_HWCAP (compat_elf_hwcap) |
44 | extern unsigned int compat_elf_hwcap; | 50 | #define COMPAT_ELF_HWCAP2 (compat_elf_hwcap2) |
51 | extern unsigned int compat_elf_hwcap, compat_elf_hwcap2; | ||
45 | #endif | 52 | #endif |
46 | 53 | ||
47 | extern unsigned long elf_hwcap; | 54 | extern unsigned long elf_hwcap; |
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 4cc813eddacb..7846a6bb0833 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h | |||
@@ -121,7 +121,7 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) | |||
121 | * I/O port access primitives. | 121 | * I/O port access primitives. |
122 | */ | 122 | */ |
123 | #define IO_SPACE_LIMIT 0xffff | 123 | #define IO_SPACE_LIMIT 0xffff |
124 | #define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_2M)) | 124 | #define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_32M)) |
125 | 125 | ||
126 | static inline u8 inb(unsigned long addr) | 126 | static inline u8 inb(unsigned long addr) |
127 | { | 127 | { |
diff --git a/arch/arm64/include/asm/irqflags.h b/arch/arm64/include/asm/irqflags.h index b2fcfbc51ecc..11cc941bd107 100644 --- a/arch/arm64/include/asm/irqflags.h +++ b/arch/arm64/include/asm/irqflags.h | |||
@@ -90,5 +90,28 @@ static inline int arch_irqs_disabled_flags(unsigned long flags) | |||
90 | return flags & PSR_I_BIT; | 90 | return flags & PSR_I_BIT; |
91 | } | 91 | } |
92 | 92 | ||
93 | /* | ||
94 | * save and restore debug state | ||
95 | */ | ||
96 | #define local_dbg_save(flags) \ | ||
97 | do { \ | ||
98 | typecheck(unsigned long, flags); \ | ||
99 | asm volatile( \ | ||
100 | "mrs %0, daif // local_dbg_save\n" \ | ||
101 | "msr daifset, #8" \ | ||
102 | : "=r" (flags) : : "memory"); \ | ||
103 | } while (0) | ||
104 | |||
105 | #define local_dbg_restore(flags) \ | ||
106 | do { \ | ||
107 | typecheck(unsigned long, flags); \ | ||
108 | asm volatile( \ | ||
109 | "msr daif, %0 // local_dbg_restore\n" \ | ||
110 | : : "r" (flags) : "memory"); \ | ||
111 | } while (0) | ||
112 | |||
113 | #define local_dbg_enable() asm("msr daifclr, #8" : : : "memory") | ||
114 | #define local_dbg_disable() asm("msr daifset, #8" : : : "memory") | ||
115 | |||
93 | #endif | 116 | #endif |
94 | #endif | 117 | #endif |
diff --git a/arch/arm64/include/asm/kgdb.h b/arch/arm64/include/asm/kgdb.h new file mode 100644 index 000000000000..3c8aafc1082f --- /dev/null +++ b/arch/arm64/include/asm/kgdb.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * AArch64 KGDB support | ||
3 | * | ||
4 | * Based on arch/arm/include/kgdb.h | ||
5 | * | ||
6 | * Copyright (C) 2013 Cavium Inc. | ||
7 | * Author: Vijaya Kumar K <vijaya.kumar@caviumnetworks.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | ||
21 | |||
22 | #ifndef __ARM_KGDB_H | ||
23 | #define __ARM_KGDB_H | ||
24 | |||
25 | #include <linux/ptrace.h> | ||
26 | #include <asm/debug-monitors.h> | ||
27 | |||
28 | #ifndef __ASSEMBLY__ | ||
29 | |||
30 | static inline void arch_kgdb_breakpoint(void) | ||
31 | { | ||
32 | asm ("brk %0" : : "I" (KDBG_COMPILED_DBG_BRK_IMM)); | ||
33 | } | ||
34 | |||
35 | extern void kgdb_handle_bus_error(void); | ||
36 | extern int kgdb_fault_expected; | ||
37 | |||
38 | #endif /* !__ASSEMBLY__ */ | ||
39 | |||
40 | /* | ||
41 | * gdb is expecting the following registers layout. | ||
42 | * | ||
43 | * General purpose regs: | ||
44 | * r0-r30: 64 bit | ||
45 | * sp,pc : 64 bit | ||
46 | * pstate : 64 bit | ||
47 | * Total: 34 | ||
48 | * FPU regs: | ||
49 | * f0-f31: 128 bit | ||
50 | * Total: 32 | ||
51 | * Extra regs | ||
52 | * fpsr & fpcr: 32 bit | ||
53 | * Total: 2 | ||
54 | * | ||
55 | */ | ||
56 | |||
57 | #define _GP_REGS 34 | ||
58 | #define _FP_REGS 32 | ||
59 | #define _EXTRA_REGS 2 | ||
60 | /* | ||
61 | * general purpose registers size in bytes. | ||
62 | * pstate is only 4 bytes. subtract 4 bytes | ||
63 | */ | ||
64 | #define GP_REG_BYTES (_GP_REGS * 8) | ||
65 | #define DBG_MAX_REG_NUM (_GP_REGS + _FP_REGS + _EXTRA_REGS) | ||
66 | |||
67 | /* | ||
68 | * Size of I/O buffer for gdb packet. | ||
69 | * considering to hold all register contents, size is set | ||
70 | */ | ||
71 | |||
72 | #define BUFMAX 2048 | ||
73 | |||
74 | /* | ||
75 | * Number of bytes required for gdb_regs buffer. | ||
76 | * _GP_REGS: 8 bytes, _FP_REGS: 16 bytes and _EXTRA_REGS: 4 bytes each | ||
77 | * GDB fails to connect for size beyond this with error | ||
78 | * "'g' packet reply is too long" | ||
79 | */ | ||
80 | |||
81 | #define NUMREGBYTES ((_GP_REGS * 8) + (_FP_REGS * 16) + \ | ||
82 | (_EXTRA_REGS * 4)) | ||
83 | |||
84 | #endif /* __ASM_KGDB_H */ | ||
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 0eb398655378..21ef48d32ff2 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h | |||
@@ -106,7 +106,6 @@ | |||
106 | 106 | ||
107 | /* VTCR_EL2 Registers bits */ | 107 | /* VTCR_EL2 Registers bits */ |
108 | #define VTCR_EL2_PS_MASK (7 << 16) | 108 | #define VTCR_EL2_PS_MASK (7 << 16) |
109 | #define VTCR_EL2_PS_40B (2 << 16) | ||
110 | #define VTCR_EL2_TG0_MASK (1 << 14) | 109 | #define VTCR_EL2_TG0_MASK (1 << 14) |
111 | #define VTCR_EL2_TG0_4K (0 << 14) | 110 | #define VTCR_EL2_TG0_4K (0 << 14) |
112 | #define VTCR_EL2_TG0_64K (1 << 14) | 111 | #define VTCR_EL2_TG0_64K (1 << 14) |
@@ -129,10 +128,9 @@ | |||
129 | * 64kB pages (TG0 = 1) | 128 | * 64kB pages (TG0 = 1) |
130 | * 2 level page tables (SL = 1) | 129 | * 2 level page tables (SL = 1) |
131 | */ | 130 | */ |
132 | #define VTCR_EL2_FLAGS (VTCR_EL2_PS_40B | VTCR_EL2_TG0_64K | \ | 131 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_64K | VTCR_EL2_SH0_INNER | \ |
133 | VTCR_EL2_SH0_INNER | VTCR_EL2_ORGN0_WBWA | \ | 132 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ |
134 | VTCR_EL2_IRGN0_WBWA | VTCR_EL2_SL0_LVL1 | \ | 133 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B) |
135 | VTCR_EL2_T0SZ_40B) | ||
136 | #define VTTBR_X (38 - VTCR_EL2_T0SZ_40B) | 134 | #define VTTBR_X (38 - VTCR_EL2_T0SZ_40B) |
137 | #else | 135 | #else |
138 | /* | 136 | /* |
@@ -142,10 +140,9 @@ | |||
142 | * 4kB pages (TG0 = 0) | 140 | * 4kB pages (TG0 = 0) |
143 | * 3 level page tables (SL = 1) | 141 | * 3 level page tables (SL = 1) |
144 | */ | 142 | */ |
145 | #define VTCR_EL2_FLAGS (VTCR_EL2_PS_40B | VTCR_EL2_TG0_4K | \ | 143 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_4K | VTCR_EL2_SH0_INNER | \ |
146 | VTCR_EL2_SH0_INNER | VTCR_EL2_ORGN0_WBWA | \ | 144 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ |
147 | VTCR_EL2_IRGN0_WBWA | VTCR_EL2_SL0_LVL1 | \ | 145 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B) |
148 | VTCR_EL2_T0SZ_40B) | ||
149 | #define VTTBR_X (37 - VTCR_EL2_T0SZ_40B) | 146 | #define VTTBR_X (37 - VTCR_EL2_T0SZ_40B) |
150 | #endif | 147 | #endif |
151 | 148 | ||
diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index b1d2e26c3c88..f7af66b54cb2 100644 --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h | |||
@@ -100,9 +100,9 @@ | |||
100 | #define PTE_HYP PTE_USER | 100 | #define PTE_HYP PTE_USER |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * 40-bit physical address supported. | 103 | * Highest possible physical address supported. |
104 | */ | 104 | */ |
105 | #define PHYS_MASK_SHIFT (40) | 105 | #define PHYS_MASK_SHIFT (48) |
106 | #define PHYS_MASK ((UL(1) << PHYS_MASK_SHIFT) - 1) | 106 | #define PHYS_MASK ((UL(1) << PHYS_MASK_SHIFT) - 1) |
107 | 107 | ||
108 | /* | 108 | /* |
@@ -122,7 +122,6 @@ | |||
122 | #define TCR_SHARED ((UL(3) << 12) | (UL(3) << 28)) | 122 | #define TCR_SHARED ((UL(3) << 12) | (UL(3) << 28)) |
123 | #define TCR_TG0_64K (UL(1) << 14) | 123 | #define TCR_TG0_64K (UL(1) << 14) |
124 | #define TCR_TG1_64K (UL(1) << 30) | 124 | #define TCR_TG1_64K (UL(1) << 30) |
125 | #define TCR_IPS_40BIT (UL(2) << 32) | ||
126 | #define TCR_ASID16 (UL(1) << 36) | 125 | #define TCR_ASID16 (UL(1) << 36) |
127 | #define TCR_TBI0 (UL(1) << 37) | 126 | #define TCR_TBI0 (UL(1) << 37) |
128 | 127 | ||
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index aa3917c8b623..90c811f05a2e 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
@@ -199,7 +199,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
199 | pte_t *ptep, pte_t pte) | 199 | pte_t *ptep, pte_t pte) |
200 | { | 200 | { |
201 | if (pte_valid_user(pte)) { | 201 | if (pte_valid_user(pte)) { |
202 | if (pte_exec(pte)) | 202 | if (!pte_special(pte) && pte_exec(pte)) |
203 | __sync_icache_dcache(pte, addr); | 203 | __sync_icache_dcache(pte, addr); |
204 | if (pte_dirty(pte) && pte_write(pte)) | 204 | if (pte_dirty(pte) && pte_write(pte)) |
205 | pte_val(pte) &= ~PTE_RDONLY; | 205 | pte_val(pte) &= ~PTE_RDONLY; |
@@ -227,36 +227,36 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
227 | 227 | ||
228 | #define __HAVE_ARCH_PTE_SPECIAL | 228 | #define __HAVE_ARCH_PTE_SPECIAL |
229 | 229 | ||
230 | /* | 230 | static inline pte_t pmd_pte(pmd_t pmd) |
231 | * Software PMD bits for THP | 231 | { |
232 | */ | 232 | return __pte(pmd_val(pmd)); |
233 | } | ||
233 | 234 | ||
234 | #define PMD_SECT_DIRTY (_AT(pmdval_t, 1) << 55) | 235 | static inline pmd_t pte_pmd(pte_t pte) |
235 | #define PMD_SECT_SPLITTING (_AT(pmdval_t, 1) << 57) | 236 | { |
237 | return __pmd(pte_val(pte)); | ||
238 | } | ||
236 | 239 | ||
237 | /* | 240 | /* |
238 | * THP definitions. | 241 | * THP definitions. |
239 | */ | 242 | */ |
240 | #define pmd_young(pmd) (pmd_val(pmd) & PMD_SECT_AF) | ||
241 | |||
242 | #define __HAVE_ARCH_PMD_WRITE | ||
243 | #define pmd_write(pmd) (!(pmd_val(pmd) & PMD_SECT_RDONLY)) | ||
244 | 243 | ||
245 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 244 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
246 | #define pmd_trans_huge(pmd) (pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT)) | 245 | #define pmd_trans_huge(pmd) (pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT)) |
247 | #define pmd_trans_splitting(pmd) (pmd_val(pmd) & PMD_SECT_SPLITTING) | 246 | #define pmd_trans_splitting(pmd) pte_special(pmd_pte(pmd)) |
248 | #endif | 247 | #endif |
249 | 248 | ||
250 | #define PMD_BIT_FUNC(fn,op) \ | 249 | #define pmd_young(pmd) pte_young(pmd_pte(pmd)) |
251 | static inline pmd_t pmd_##fn(pmd_t pmd) { pmd_val(pmd) op; return pmd; } | 250 | #define pmd_wrprotect(pmd) pte_pmd(pte_wrprotect(pmd_pte(pmd))) |
251 | #define pmd_mksplitting(pmd) pte_pmd(pte_mkspecial(pmd_pte(pmd))) | ||
252 | #define pmd_mkold(pmd) pte_pmd(pte_mkold(pmd_pte(pmd))) | ||
253 | #define pmd_mkwrite(pmd) pte_pmd(pte_mkwrite(pmd_pte(pmd))) | ||
254 | #define pmd_mkdirty(pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd))) | ||
255 | #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) | ||
256 | #define pmd_mknotpresent(pmd) (__pmd(pmd_val(pmd) &= ~PMD_TYPE_MASK)) | ||
252 | 257 | ||
253 | PMD_BIT_FUNC(wrprotect, |= PMD_SECT_RDONLY); | 258 | #define __HAVE_ARCH_PMD_WRITE |
254 | PMD_BIT_FUNC(mkold, &= ~PMD_SECT_AF); | 259 | #define pmd_write(pmd) pte_write(pmd_pte(pmd)) |
255 | PMD_BIT_FUNC(mksplitting, |= PMD_SECT_SPLITTING); | ||
256 | PMD_BIT_FUNC(mkwrite, &= ~PMD_SECT_RDONLY); | ||
257 | PMD_BIT_FUNC(mkdirty, |= PMD_SECT_DIRTY); | ||
258 | PMD_BIT_FUNC(mkyoung, |= PMD_SECT_AF); | ||
259 | PMD_BIT_FUNC(mknotpresent, &= ~PMD_TYPE_MASK); | ||
260 | 260 | ||
261 | #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT)) | 261 | #define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT)) |
262 | 262 | ||
@@ -266,15 +266,6 @@ PMD_BIT_FUNC(mknotpresent, &= ~PMD_TYPE_MASK); | |||
266 | 266 | ||
267 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) | 267 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) |
268 | 268 | ||
269 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) | ||
270 | { | ||
271 | const pmdval_t mask = PMD_SECT_USER | PMD_SECT_PXN | PMD_SECT_UXN | | ||
272 | PMD_SECT_RDONLY | PMD_SECT_PROT_NONE | | ||
273 | PMD_SECT_VALID; | ||
274 | pmd_val(pmd) = (pmd_val(pmd) & ~mask) | (pgprot_val(newprot) & mask); | ||
275 | return pmd; | ||
276 | } | ||
277 | |||
278 | #define set_pmd_at(mm, addr, pmdp, pmd) set_pmd(pmdp, pmd) | 269 | #define set_pmd_at(mm, addr, pmdp, pmd) set_pmd(pmdp, pmd) |
279 | 270 | ||
280 | static inline int has_transparent_hugepage(void) | 271 | static inline int has_transparent_hugepage(void) |
@@ -286,11 +277,9 @@ static inline int has_transparent_hugepage(void) | |||
286 | * Mark the prot value as uncacheable and unbufferable. | 277 | * Mark the prot value as uncacheable and unbufferable. |
287 | */ | 278 | */ |
288 | #define pgprot_noncached(prot) \ | 279 | #define pgprot_noncached(prot) \ |
289 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE)) | 280 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN) |
290 | #define pgprot_writecombine(prot) \ | 281 | #define pgprot_writecombine(prot) \ |
291 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) | 282 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) |
292 | #define pgprot_dmacoherent(prot) \ | ||
293 | __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) | ||
294 | #define __HAVE_PHYS_MEM_ACCESS_PROT | 283 | #define __HAVE_PHYS_MEM_ACCESS_PROT |
295 | struct file; | 284 | struct file; |
296 | extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | 285 | extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, |
@@ -383,6 +372,11 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
383 | return pte; | 372 | return pte; |
384 | } | 373 | } |
385 | 374 | ||
375 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) | ||
376 | { | ||
377 | return pte_pmd(pte_modify(pmd_pte(pmd), newprot)); | ||
378 | } | ||
379 | |||
386 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 380 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
387 | extern pgd_t idmap_pg_dir[PTRS_PER_PGD]; | 381 | extern pgd_t idmap_pg_dir[PTRS_PER_PGD]; |
388 | 382 | ||
diff --git a/arch/arm64/include/asm/psci.h b/arch/arm64/include/asm/psci.h index e5312ea0ec1a..d15ab8b46336 100644 --- a/arch/arm64/include/asm/psci.h +++ b/arch/arm64/include/asm/psci.h | |||
@@ -14,6 +14,6 @@ | |||
14 | #ifndef __ASM_PSCI_H | 14 | #ifndef __ASM_PSCI_H |
15 | #define __ASM_PSCI_H | 15 | #define __ASM_PSCI_H |
16 | 16 | ||
17 | int psci_init(void); | 17 | void psci_init(void); |
18 | 18 | ||
19 | #endif /* __ASM_PSCI_H */ | 19 | #endif /* __ASM_PSCI_H */ |
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index 0e7fa4963735..c7ba261dd4b3 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h | |||
@@ -68,6 +68,7 @@ | |||
68 | 68 | ||
69 | /* Architecturally defined mapping between AArch32 and AArch64 registers */ | 69 | /* Architecturally defined mapping between AArch32 and AArch64 registers */ |
70 | #define compat_usr(x) regs[(x)] | 70 | #define compat_usr(x) regs[(x)] |
71 | #define compat_fp regs[11] | ||
71 | #define compat_sp regs[13] | 72 | #define compat_sp regs[13] |
72 | #define compat_lr regs[14] | 73 | #define compat_lr regs[14] |
73 | #define compat_sp_hyp regs[15] | 74 | #define compat_sp_hyp regs[15] |
@@ -132,7 +133,7 @@ struct pt_regs { | |||
132 | (!((regs)->pstate & PSR_F_BIT)) | 133 | (!((regs)->pstate & PSR_F_BIT)) |
133 | 134 | ||
134 | #define user_stack_pointer(regs) \ | 135 | #define user_stack_pointer(regs) \ |
135 | ((regs)->sp) | 136 | (!compat_user_mode(regs)) ? ((regs)->sp) : ((regs)->compat_sp) |
136 | 137 | ||
137 | /* | 138 | /* |
138 | * Are the current registers suitable for user mode? (used to maintain | 139 | * Are the current registers suitable for user mode? (used to maintain |
@@ -164,7 +165,7 @@ static inline int valid_user_regs(struct user_pt_regs *regs) | |||
164 | return 0; | 165 | return 0; |
165 | } | 166 | } |
166 | 167 | ||
167 | #define instruction_pointer(regs) (regs)->pc | 168 | #define instruction_pointer(regs) ((unsigned long)(regs)->pc) |
168 | 169 | ||
169 | #ifdef CONFIG_SMP | 170 | #ifdef CONFIG_SMP |
170 | extern unsigned long profile_pc(struct pt_regs *regs); | 171 | extern unsigned long profile_pc(struct pt_regs *regs); |
diff --git a/arch/arm64/include/asm/tlb.h b/arch/arm64/include/asm/tlb.h index 717031a762c2..72cadf52ca80 100644 --- a/arch/arm64/include/asm/tlb.h +++ b/arch/arm64/include/asm/tlb.h | |||
@@ -19,115 +19,44 @@ | |||
19 | #ifndef __ASM_TLB_H | 19 | #ifndef __ASM_TLB_H |
20 | #define __ASM_TLB_H | 20 | #define __ASM_TLB_H |
21 | 21 | ||
22 | #include <linux/pagemap.h> | ||
23 | #include <linux/swap.h> | ||
24 | 22 | ||
25 | #include <asm/pgalloc.h> | 23 | #include <asm-generic/tlb.h> |
26 | #include <asm/tlbflush.h> | ||
27 | |||
28 | #define MMU_GATHER_BUNDLE 8 | ||
29 | |||
30 | /* | ||
31 | * TLB handling. This allows us to remove pages from the page | ||
32 | * tables, and efficiently handle the TLB issues. | ||
33 | */ | ||
34 | struct mmu_gather { | ||
35 | struct mm_struct *mm; | ||
36 | unsigned int fullmm; | ||
37 | struct vm_area_struct *vma; | ||
38 | unsigned long start, end; | ||
39 | unsigned long range_start; | ||
40 | unsigned long range_end; | ||
41 | unsigned int nr; | ||
42 | unsigned int max; | ||
43 | struct page **pages; | ||
44 | struct page *local[MMU_GATHER_BUNDLE]; | ||
45 | }; | ||
46 | 24 | ||
47 | /* | 25 | /* |
48 | * This is unnecessarily complex. There's three ways the TLB shootdown | 26 | * There's three ways the TLB shootdown code is used: |
49 | * code is used: | ||
50 | * 1. Unmapping a range of vmas. See zap_page_range(), unmap_region(). | 27 | * 1. Unmapping a range of vmas. See zap_page_range(), unmap_region(). |
51 | * tlb->fullmm = 0, and tlb_start_vma/tlb_end_vma will be called. | 28 | * tlb->fullmm = 0, and tlb_start_vma/tlb_end_vma will be called. |
52 | * tlb->vma will be non-NULL. | ||
53 | * 2. Unmapping all vmas. See exit_mmap(). | 29 | * 2. Unmapping all vmas. See exit_mmap(). |
54 | * tlb->fullmm = 1, and tlb_start_vma/tlb_end_vma will be called. | 30 | * tlb->fullmm = 1, and tlb_start_vma/tlb_end_vma will be called. |
55 | * tlb->vma will be non-NULL. Additionally, page tables will be freed. | 31 | * Page tables will be freed. |
56 | * 3. Unmapping argument pages. See shift_arg_pages(). | 32 | * 3. Unmapping argument pages. See shift_arg_pages(). |
57 | * tlb->fullmm = 0, but tlb_start_vma/tlb_end_vma will not be called. | 33 | * tlb->fullmm = 0, but tlb_start_vma/tlb_end_vma will not be called. |
58 | * tlb->vma will be NULL. | ||
59 | */ | 34 | */ |
60 | static inline void tlb_flush(struct mmu_gather *tlb) | 35 | static inline void tlb_flush(struct mmu_gather *tlb) |
61 | { | 36 | { |
62 | if (tlb->fullmm || !tlb->vma) | 37 | if (tlb->fullmm) { |
63 | flush_tlb_mm(tlb->mm); | 38 | flush_tlb_mm(tlb->mm); |
64 | else if (tlb->range_end > 0) { | 39 | } else if (tlb->end > 0) { |
65 | flush_tlb_range(tlb->vma, tlb->range_start, tlb->range_end); | 40 | struct vm_area_struct vma = { .vm_mm = tlb->mm, }; |
66 | tlb->range_start = TASK_SIZE; | 41 | flush_tlb_range(&vma, tlb->start, tlb->end); |
67 | tlb->range_end = 0; | 42 | tlb->start = TASK_SIZE; |
43 | tlb->end = 0; | ||
68 | } | 44 | } |
69 | } | 45 | } |
70 | 46 | ||
71 | static inline void tlb_add_flush(struct mmu_gather *tlb, unsigned long addr) | 47 | static inline void tlb_add_flush(struct mmu_gather *tlb, unsigned long addr) |
72 | { | 48 | { |
73 | if (!tlb->fullmm) { | 49 | if (!tlb->fullmm) { |
74 | if (addr < tlb->range_start) | 50 | tlb->start = min(tlb->start, addr); |
75 | tlb->range_start = addr; | 51 | tlb->end = max(tlb->end, addr + PAGE_SIZE); |
76 | if (addr + PAGE_SIZE > tlb->range_end) | ||
77 | tlb->range_end = addr + PAGE_SIZE; | ||
78 | } | ||
79 | } | ||
80 | |||
81 | static inline void __tlb_alloc_page(struct mmu_gather *tlb) | ||
82 | { | ||
83 | unsigned long addr = __get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0); | ||
84 | |||
85 | if (addr) { | ||
86 | tlb->pages = (void *)addr; | ||
87 | tlb->max = PAGE_SIZE / sizeof(struct page *); | ||
88 | } | 52 | } |
89 | } | 53 | } |
90 | 54 | ||
91 | static inline void tlb_flush_mmu(struct mmu_gather *tlb) | ||
92 | { | ||
93 | tlb_flush(tlb); | ||
94 | free_pages_and_swap_cache(tlb->pages, tlb->nr); | ||
95 | tlb->nr = 0; | ||
96 | if (tlb->pages == tlb->local) | ||
97 | __tlb_alloc_page(tlb); | ||
98 | } | ||
99 | |||
100 | static inline void | ||
101 | tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) | ||
102 | { | ||
103 | tlb->mm = mm; | ||
104 | tlb->fullmm = !(start | (end+1)); | ||
105 | tlb->start = start; | ||
106 | tlb->end = end; | ||
107 | tlb->vma = NULL; | ||
108 | tlb->max = ARRAY_SIZE(tlb->local); | ||
109 | tlb->pages = tlb->local; | ||
110 | tlb->nr = 0; | ||
111 | __tlb_alloc_page(tlb); | ||
112 | } | ||
113 | |||
114 | static inline void | ||
115 | tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) | ||
116 | { | ||
117 | tlb_flush_mmu(tlb); | ||
118 | |||
119 | /* keep the page table cache within bounds */ | ||
120 | check_pgt_cache(); | ||
121 | |||
122 | if (tlb->pages != tlb->local) | ||
123 | free_pages((unsigned long)tlb->pages, 0); | ||
124 | } | ||
125 | |||
126 | /* | 55 | /* |
127 | * Memorize the range for the TLB flush. | 56 | * Memorize the range for the TLB flush. |
128 | */ | 57 | */ |
129 | static inline void | 58 | static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, |
130 | tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, unsigned long addr) | 59 | unsigned long addr) |
131 | { | 60 | { |
132 | tlb_add_flush(tlb, addr); | 61 | tlb_add_flush(tlb, addr); |
133 | } | 62 | } |
@@ -137,38 +66,24 @@ tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, unsigned long addr) | |||
137 | * case where we're doing a full MM flush. When we're doing a munmap, | 66 | * case where we're doing a full MM flush. When we're doing a munmap, |
138 | * the vmas are adjusted to only cover the region to be torn down. | 67 | * the vmas are adjusted to only cover the region to be torn down. |
139 | */ | 68 | */ |
140 | static inline void | 69 | static inline void tlb_start_vma(struct mmu_gather *tlb, |
141 | tlb_start_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) | 70 | struct vm_area_struct *vma) |
142 | { | 71 | { |
143 | if (!tlb->fullmm) { | 72 | if (!tlb->fullmm) { |
144 | tlb->vma = vma; | 73 | tlb->start = TASK_SIZE; |
145 | tlb->range_start = TASK_SIZE; | 74 | tlb->end = 0; |
146 | tlb->range_end = 0; | ||
147 | } | 75 | } |
148 | } | 76 | } |
149 | 77 | ||
150 | static inline void | 78 | static inline void tlb_end_vma(struct mmu_gather *tlb, |
151 | tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) | 79 | struct vm_area_struct *vma) |
152 | { | 80 | { |
153 | if (!tlb->fullmm) | 81 | if (!tlb->fullmm) |
154 | tlb_flush(tlb); | 82 | tlb_flush(tlb); |
155 | } | 83 | } |
156 | 84 | ||
157 | static inline int __tlb_remove_page(struct mmu_gather *tlb, struct page *page) | ||
158 | { | ||
159 | tlb->pages[tlb->nr++] = page; | ||
160 | VM_BUG_ON(tlb->nr > tlb->max); | ||
161 | return tlb->max - tlb->nr; | ||
162 | } | ||
163 | |||
164 | static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | ||
165 | { | ||
166 | if (!__tlb_remove_page(tlb, page)) | ||
167 | tlb_flush_mmu(tlb); | ||
168 | } | ||
169 | |||
170 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | 85 | static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, |
171 | unsigned long addr) | 86 | unsigned long addr) |
172 | { | 87 | { |
173 | pgtable_page_dtor(pte); | 88 | pgtable_page_dtor(pte); |
174 | tlb_add_flush(tlb, addr); | 89 | tlb_add_flush(tlb, addr); |
@@ -184,16 +99,5 @@ static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, | |||
184 | } | 99 | } |
185 | #endif | 100 | #endif |
186 | 101 | ||
187 | #define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr) | ||
188 | #define pmd_free_tlb(tlb, pmdp, addr) __pmd_free_tlb(tlb, pmdp, addr) | ||
189 | #define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp) | ||
190 | |||
191 | #define tlb_migrate_finish(mm) do { } while (0) | ||
192 | |||
193 | static inline void | ||
194 | tlb_remove_pmd_tlb_entry(struct mmu_gather *tlb, pmd_t *pmdp, unsigned long addr) | ||
195 | { | ||
196 | tlb_add_flush(tlb, addr); | ||
197 | } | ||
198 | 102 | ||
199 | #endif | 103 | #endif |
diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h new file mode 100644 index 000000000000..0172e6d76bf3 --- /dev/null +++ b/arch/arm64/include/asm/topology.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef __ASM_TOPOLOGY_H | ||
2 | #define __ASM_TOPOLOGY_H | ||
3 | |||
4 | #ifdef CONFIG_SMP | ||
5 | |||
6 | #include <linux/cpumask.h> | ||
7 | |||
8 | struct cpu_topology { | ||
9 | int thread_id; | ||
10 | int core_id; | ||
11 | int cluster_id; | ||
12 | cpumask_t thread_sibling; | ||
13 | cpumask_t core_sibling; | ||
14 | }; | ||
15 | |||
16 | extern struct cpu_topology cpu_topology[NR_CPUS]; | ||
17 | |||
18 | #define topology_physical_package_id(cpu) (cpu_topology[cpu].cluster_id) | ||
19 | #define topology_core_id(cpu) (cpu_topology[cpu].core_id) | ||
20 | #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling) | ||
21 | #define topology_thread_cpumask(cpu) (&cpu_topology[cpu].thread_sibling) | ||
22 | |||
23 | #define mc_capable() (cpu_topology[0].cluster_id != -1) | ||
24 | #define smt_capable() (cpu_topology[0].thread_id != -1) | ||
25 | |||
26 | void init_cpu_topology(void); | ||
27 | void store_cpu_topology(unsigned int cpuid); | ||
28 | const struct cpumask *cpu_coregroup_mask(int cpu); | ||
29 | |||
30 | #else | ||
31 | |||
32 | static inline void init_cpu_topology(void) { } | ||
33 | static inline void store_cpu_topology(unsigned int cpuid) { } | ||
34 | |||
35 | #endif | ||
36 | |||
37 | #include <asm-generic/topology.h> | ||
38 | |||
39 | #endif /* _ASM_ARM_TOPOLOGY_H */ | ||
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index 6c0f684aca81..3bf8f4e99a51 100644 --- a/arch/arm64/include/asm/uaccess.h +++ b/arch/arm64/include/asm/uaccess.h | |||
@@ -83,7 +83,7 @@ static inline void set_fs(mm_segment_t fs) | |||
83 | * Returns 1 if the range is valid, 0 otherwise. | 83 | * Returns 1 if the range is valid, 0 otherwise. |
84 | * | 84 | * |
85 | * This is equivalent to the following test: | 85 | * This is equivalent to the following test: |
86 | * (u65)addr + (u65)size < (u65)current->addr_limit | 86 | * (u65)addr + (u65)size <= current->addr_limit |
87 | * | 87 | * |
88 | * This needs 65-bit arithmetic. | 88 | * This needs 65-bit arithmetic. |
89 | */ | 89 | */ |
@@ -91,7 +91,7 @@ static inline void set_fs(mm_segment_t fs) | |||
91 | ({ \ | 91 | ({ \ |
92 | unsigned long flag, roksum; \ | 92 | unsigned long flag, roksum; \ |
93 | __chk_user_ptr(addr); \ | 93 | __chk_user_ptr(addr); \ |
94 | asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, cc" \ | 94 | asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \ |
95 | : "=&r" (flag), "=&r" (roksum) \ | 95 | : "=&r" (flag), "=&r" (roksum) \ |
96 | : "1" (addr), "Ir" (size), \ | 96 | : "1" (addr), "Ir" (size), \ |
97 | "r" (current_thread_info()->addr_limit) \ | 97 | "r" (current_thread_info()->addr_limit) \ |
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 82ce217e94cf..a4654c656a1e 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #ifdef CONFIG_COMPAT | 16 | #ifdef CONFIG_COMPAT |
17 | #define __ARCH_WANT_COMPAT_SYS_GETDENTS64 | ||
17 | #define __ARCH_WANT_COMPAT_STAT64 | 18 | #define __ARCH_WANT_COMPAT_STAT64 |
18 | #define __ARCH_WANT_SYS_GETHOSTNAME | 19 | #define __ARCH_WANT_SYS_GETHOSTNAME |
19 | #define __ARCH_WANT_SYS_PAUSE | 20 | #define __ARCH_WANT_SYS_PAUSE |
diff --git a/arch/arm64/include/uapi/asm/Kbuild b/arch/arm64/include/uapi/asm/Kbuild index e4b78bdca19e..942376d37d22 100644 --- a/arch/arm64/include/uapi/asm/Kbuild +++ b/arch/arm64/include/uapi/asm/Kbuild | |||
@@ -9,6 +9,7 @@ header-y += byteorder.h | |||
9 | header-y += fcntl.h | 9 | header-y += fcntl.h |
10 | header-y += hwcap.h | 10 | header-y += hwcap.h |
11 | header-y += kvm_para.h | 11 | header-y += kvm_para.h |
12 | header-y += perf_regs.h | ||
12 | header-y += param.h | 13 | header-y += param.h |
13 | header-y += ptrace.h | 14 | header-y += ptrace.h |
14 | header-y += setup.h | 15 | header-y += setup.h |
diff --git a/arch/arm64/include/uapi/asm/perf_regs.h b/arch/arm64/include/uapi/asm/perf_regs.h new file mode 100644 index 000000000000..172b8317ee49 --- /dev/null +++ b/arch/arm64/include/uapi/asm/perf_regs.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _ASM_ARM64_PERF_REGS_H | ||
2 | #define _ASM_ARM64_PERF_REGS_H | ||
3 | |||
4 | enum perf_event_arm_regs { | ||
5 | PERF_REG_ARM64_X0, | ||
6 | PERF_REG_ARM64_X1, | ||
7 | PERF_REG_ARM64_X2, | ||
8 | PERF_REG_ARM64_X3, | ||
9 | PERF_REG_ARM64_X4, | ||
10 | PERF_REG_ARM64_X5, | ||
11 | PERF_REG_ARM64_X6, | ||
12 | PERF_REG_ARM64_X7, | ||
13 | PERF_REG_ARM64_X8, | ||
14 | PERF_REG_ARM64_X9, | ||
15 | PERF_REG_ARM64_X10, | ||
16 | PERF_REG_ARM64_X11, | ||
17 | PERF_REG_ARM64_X12, | ||
18 | PERF_REG_ARM64_X13, | ||
19 | PERF_REG_ARM64_X14, | ||
20 | PERF_REG_ARM64_X15, | ||
21 | PERF_REG_ARM64_X16, | ||
22 | PERF_REG_ARM64_X17, | ||
23 | PERF_REG_ARM64_X18, | ||
24 | PERF_REG_ARM64_X19, | ||
25 | PERF_REG_ARM64_X20, | ||
26 | PERF_REG_ARM64_X21, | ||
27 | PERF_REG_ARM64_X22, | ||
28 | PERF_REG_ARM64_X23, | ||
29 | PERF_REG_ARM64_X24, | ||
30 | PERF_REG_ARM64_X25, | ||
31 | PERF_REG_ARM64_X26, | ||
32 | PERF_REG_ARM64_X27, | ||
33 | PERF_REG_ARM64_X28, | ||
34 | PERF_REG_ARM64_X29, | ||
35 | PERF_REG_ARM64_LR, | ||
36 | PERF_REG_ARM64_SP, | ||
37 | PERF_REG_ARM64_PC, | ||
38 | PERF_REG_ARM64_MAX, | ||
39 | }; | ||
40 | #endif /* _ASM_ARM64_PERF_REGS_H */ | ||
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 2d4554b13410..7d811d9522bc 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile | |||
@@ -14,12 +14,14 @@ arm64-obj-y := cputable.o debug-monitors.o entry.o irq.o fpsimd.o \ | |||
14 | arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \ | 14 | arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \ |
15 | sys_compat.o | 15 | sys_compat.o |
16 | arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o | 16 | arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o |
17 | arm64-obj-$(CONFIG_SMP) += smp.o smp_spin_table.o | 17 | arm64-obj-$(CONFIG_SMP) += smp.o smp_spin_table.o topology.o |
18 | arm64-obj-$(CONFIG_PERF_EVENTS) += perf_regs.o | ||
18 | arm64-obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o | 19 | arm64-obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o |
19 | arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT)+= hw_breakpoint.o | 20 | arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o |
20 | arm64-obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 21 | arm64-obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
21 | arm64-obj-$(CONFIG_ARM64_CPU_SUSPEND) += sleep.o suspend.o | 22 | arm64-obj-$(CONFIG_ARM64_CPU_SUSPEND) += sleep.o suspend.o |
22 | arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o | 23 | arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
24 | arm64-obj-$(CONFIG_KGDB) += kgdb.o | ||
23 | 25 | ||
24 | obj-y += $(arm64-obj-y) vdso/ | 26 | obj-y += $(arm64-obj-y) vdso/ |
25 | obj-m += $(arm64-obj-m) | 27 | obj-m += $(arm64-obj-m) |
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 636ba8b6240b..14ba23c61153 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c | |||
@@ -137,7 +137,6 @@ void disable_debug_monitors(enum debug_el el) | |||
137 | static void clear_os_lock(void *unused) | 137 | static void clear_os_lock(void *unused) |
138 | { | 138 | { |
139 | asm volatile("msr oslar_el1, %0" : : "r" (0)); | 139 | asm volatile("msr oslar_el1, %0" : : "r" (0)); |
140 | isb(); | ||
141 | } | 140 | } |
142 | 141 | ||
143 | static int os_lock_notify(struct notifier_block *self, | 142 | static int os_lock_notify(struct notifier_block *self, |
@@ -156,8 +155,9 @@ static struct notifier_block os_lock_nb = { | |||
156 | static int debug_monitors_init(void) | 155 | static int debug_monitors_init(void) |
157 | { | 156 | { |
158 | /* Clear the OS lock. */ | 157 | /* Clear the OS lock. */ |
159 | smp_call_function(clear_os_lock, NULL, 1); | 158 | on_each_cpu(clear_os_lock, NULL, 1); |
160 | clear_os_lock(NULL); | 159 | isb(); |
160 | local_dbg_enable(); | ||
161 | 161 | ||
162 | /* Register hotplug handler. */ | 162 | /* Register hotplug handler. */ |
163 | register_cpu_notifier(&os_lock_nb); | 163 | register_cpu_notifier(&os_lock_nb); |
@@ -189,7 +189,7 @@ static void clear_regs_spsr_ss(struct pt_regs *regs) | |||
189 | 189 | ||
190 | /* EL1 Single Step Handler hooks */ | 190 | /* EL1 Single Step Handler hooks */ |
191 | static LIST_HEAD(step_hook); | 191 | static LIST_HEAD(step_hook); |
192 | DEFINE_RWLOCK(step_hook_lock); | 192 | static DEFINE_RWLOCK(step_hook_lock); |
193 | 193 | ||
194 | void register_step_hook(struct step_hook *hook) | 194 | void register_step_hook(struct step_hook *hook) |
195 | { | 195 | { |
@@ -276,7 +276,7 @@ static int single_step_handler(unsigned long addr, unsigned int esr, | |||
276 | * Use reader/writer locks instead of plain spinlock. | 276 | * Use reader/writer locks instead of plain spinlock. |
277 | */ | 277 | */ |
278 | static LIST_HEAD(break_hook); | 278 | static LIST_HEAD(break_hook); |
279 | DEFINE_RWLOCK(break_hook_lock); | 279 | static DEFINE_RWLOCK(break_hook_lock); |
280 | 280 | ||
281 | void register_break_hook(struct break_hook *hook) | 281 | void register_break_hook(struct break_hook *hook) |
282 | { | 282 | { |
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 0b281fffda51..61035d6814cb 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S | |||
@@ -384,26 +384,18 @@ ENDPROC(__calc_phys_offset) | |||
384 | * Preserves: tbl, flags | 384 | * Preserves: tbl, flags |
385 | * Corrupts: phys, start, end, pstate | 385 | * Corrupts: phys, start, end, pstate |
386 | */ | 386 | */ |
387 | .macro create_block_map, tbl, flags, phys, start, end, idmap=0 | 387 | .macro create_block_map, tbl, flags, phys, start, end |
388 | lsr \phys, \phys, #BLOCK_SHIFT | 388 | lsr \phys, \phys, #BLOCK_SHIFT |
389 | .if \idmap | ||
390 | and \start, \phys, #PTRS_PER_PTE - 1 // table index | ||
391 | .else | ||
392 | lsr \start, \start, #BLOCK_SHIFT | 389 | lsr \start, \start, #BLOCK_SHIFT |
393 | and \start, \start, #PTRS_PER_PTE - 1 // table index | 390 | and \start, \start, #PTRS_PER_PTE - 1 // table index |
394 | .endif | ||
395 | orr \phys, \flags, \phys, lsl #BLOCK_SHIFT // table entry | 391 | orr \phys, \flags, \phys, lsl #BLOCK_SHIFT // table entry |
396 | .ifnc \start,\end | ||
397 | lsr \end, \end, #BLOCK_SHIFT | 392 | lsr \end, \end, #BLOCK_SHIFT |
398 | and \end, \end, #PTRS_PER_PTE - 1 // table end index | 393 | and \end, \end, #PTRS_PER_PTE - 1 // table end index |
399 | .endif | ||
400 | 9999: str \phys, [\tbl, \start, lsl #3] // store the entry | 394 | 9999: str \phys, [\tbl, \start, lsl #3] // store the entry |
401 | .ifnc \start,\end | ||
402 | add \start, \start, #1 // next entry | 395 | add \start, \start, #1 // next entry |
403 | add \phys, \phys, #BLOCK_SIZE // next block | 396 | add \phys, \phys, #BLOCK_SIZE // next block |
404 | cmp \start, \end | 397 | cmp \start, \end |
405 | b.ls 9999b | 398 | b.ls 9999b |
406 | .endif | ||
407 | .endm | 399 | .endm |
408 | 400 | ||
409 | /* | 401 | /* |
@@ -435,9 +427,13 @@ __create_page_tables: | |||
435 | * Create the identity mapping. | 427 | * Create the identity mapping. |
436 | */ | 428 | */ |
437 | add x0, x25, #PAGE_SIZE // section table address | 429 | add x0, x25, #PAGE_SIZE // section table address |
438 | adr x3, __turn_mmu_on // virtual/physical address | 430 | ldr x3, =KERNEL_START |
431 | add x3, x3, x28 // __pa(KERNEL_START) | ||
439 | create_pgd_entry x25, x0, x3, x5, x6 | 432 | create_pgd_entry x25, x0, x3, x5, x6 |
440 | create_block_map x0, x7, x3, x5, x5, idmap=1 | 433 | ldr x6, =KERNEL_END |
434 | mov x5, x3 // __pa(KERNEL_START) | ||
435 | add x6, x6, x28 // __pa(KERNEL_END) | ||
436 | create_block_map x0, x7, x3, x5, x6 | ||
441 | 437 | ||
442 | /* | 438 | /* |
443 | * Map the kernel image (starting with PHYS_OFFSET). | 439 | * Map the kernel image (starting with PHYS_OFFSET). |
@@ -445,7 +441,7 @@ __create_page_tables: | |||
445 | add x0, x26, #PAGE_SIZE // section table address | 441 | add x0, x26, #PAGE_SIZE // section table address |
446 | mov x5, #PAGE_OFFSET | 442 | mov x5, #PAGE_OFFSET |
447 | create_pgd_entry x26, x0, x5, x3, x6 | 443 | create_pgd_entry x26, x0, x5, x3, x6 |
448 | ldr x6, =KERNEL_END - 1 | 444 | ldr x6, =KERNEL_END |
449 | mov x3, x24 // phys offset | 445 | mov x3, x24 // phys offset |
450 | create_block_map x0, x7, x3, x5, x6 | 446 | create_block_map x0, x7, x3, x5, x6 |
451 | 447 | ||
diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c new file mode 100644 index 000000000000..75c9cf1aafee --- /dev/null +++ b/arch/arm64/kernel/kgdb.c | |||
@@ -0,0 +1,336 @@ | |||
1 | /* | ||
2 | * AArch64 KGDB support | ||
3 | * | ||
4 | * Based on arch/arm/kernel/kgdb.c | ||
5 | * | ||
6 | * Copyright (C) 2013 Cavium Inc. | ||
7 | * Author: Vijaya Kumar K <vijaya.kumar@caviumnetworks.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | ||
21 | |||
22 | #include <linux/irq.h> | ||
23 | #include <linux/kdebug.h> | ||
24 | #include <linux/kgdb.h> | ||
25 | #include <asm/traps.h> | ||
26 | |||
27 | struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = { | ||
28 | { "x0", 8, offsetof(struct pt_regs, regs[0])}, | ||
29 | { "x1", 8, offsetof(struct pt_regs, regs[1])}, | ||
30 | { "x2", 8, offsetof(struct pt_regs, regs[2])}, | ||
31 | { "x3", 8, offsetof(struct pt_regs, regs[3])}, | ||
32 | { "x4", 8, offsetof(struct pt_regs, regs[4])}, | ||
33 | { "x5", 8, offsetof(struct pt_regs, regs[5])}, | ||
34 | { "x6", 8, offsetof(struct pt_regs, regs[6])}, | ||
35 | { "x7", 8, offsetof(struct pt_regs, regs[7])}, | ||
36 | { "x8", 8, offsetof(struct pt_regs, regs[8])}, | ||
37 | { "x9", 8, offsetof(struct pt_regs, regs[9])}, | ||
38 | { "x10", 8, offsetof(struct pt_regs, regs[10])}, | ||
39 | { "x11", 8, offsetof(struct pt_regs, regs[11])}, | ||
40 | { "x12", 8, offsetof(struct pt_regs, regs[12])}, | ||
41 | { "x13", 8, offsetof(struct pt_regs, regs[13])}, | ||
42 | { "x14", 8, offsetof(struct pt_regs, regs[14])}, | ||
43 | { "x15", 8, offsetof(struct pt_regs, regs[15])}, | ||
44 | { "x16", 8, offsetof(struct pt_regs, regs[16])}, | ||
45 | { "x17", 8, offsetof(struct pt_regs, regs[17])}, | ||
46 | { "x18", 8, offsetof(struct pt_regs, regs[18])}, | ||
47 | { "x19", 8, offsetof(struct pt_regs, regs[19])}, | ||
48 | { "x20", 8, offsetof(struct pt_regs, regs[20])}, | ||
49 | { "x21", 8, offsetof(struct pt_regs, regs[21])}, | ||
50 | { "x22", 8, offsetof(struct pt_regs, regs[22])}, | ||
51 | { "x23", 8, offsetof(struct pt_regs, regs[23])}, | ||
52 | { "x24", 8, offsetof(struct pt_regs, regs[24])}, | ||
53 | { "x25", 8, offsetof(struct pt_regs, regs[25])}, | ||
54 | { "x26", 8, offsetof(struct pt_regs, regs[26])}, | ||
55 | { "x27", 8, offsetof(struct pt_regs, regs[27])}, | ||
56 | { "x28", 8, offsetof(struct pt_regs, regs[28])}, | ||
57 | { "x29", 8, offsetof(struct pt_regs, regs[29])}, | ||
58 | { "x30", 8, offsetof(struct pt_regs, regs[30])}, | ||
59 | { "sp", 8, offsetof(struct pt_regs, sp)}, | ||
60 | { "pc", 8, offsetof(struct pt_regs, pc)}, | ||
61 | { "pstate", 8, offsetof(struct pt_regs, pstate)}, | ||
62 | { "v0", 16, -1 }, | ||
63 | { "v1", 16, -1 }, | ||
64 | { "v2", 16, -1 }, | ||
65 | { "v3", 16, -1 }, | ||
66 | { "v4", 16, -1 }, | ||
67 | { "v5", 16, -1 }, | ||
68 | { "v6", 16, -1 }, | ||
69 | { "v7", 16, -1 }, | ||
70 | { "v8", 16, -1 }, | ||
71 | { "v9", 16, -1 }, | ||
72 | { "v10", 16, -1 }, | ||
73 | { "v11", 16, -1 }, | ||
74 | { "v12", 16, -1 }, | ||
75 | { "v13", 16, -1 }, | ||
76 | { "v14", 16, -1 }, | ||
77 | { "v15", 16, -1 }, | ||
78 | { "v16", 16, -1 }, | ||
79 | { "v17", 16, -1 }, | ||
80 | { "v18", 16, -1 }, | ||
81 | { "v19", 16, -1 }, | ||
82 | { "v20", 16, -1 }, | ||
83 | { "v21", 16, -1 }, | ||
84 | { "v22", 16, -1 }, | ||
85 | { "v23", 16, -1 }, | ||
86 | { "v24", 16, -1 }, | ||
87 | { "v25", 16, -1 }, | ||
88 | { "v26", 16, -1 }, | ||
89 | { "v27", 16, -1 }, | ||
90 | { "v28", 16, -1 }, | ||
91 | { "v29", 16, -1 }, | ||
92 | { "v30", 16, -1 }, | ||
93 | { "v31", 16, -1 }, | ||
94 | { "fpsr", 4, -1 }, | ||
95 | { "fpcr", 4, -1 }, | ||
96 | }; | ||
97 | |||
98 | char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) | ||
99 | { | ||
100 | if (regno >= DBG_MAX_REG_NUM || regno < 0) | ||
101 | return NULL; | ||
102 | |||
103 | if (dbg_reg_def[regno].offset != -1) | ||
104 | memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, | ||
105 | dbg_reg_def[regno].size); | ||
106 | else | ||
107 | memset(mem, 0, dbg_reg_def[regno].size); | ||
108 | return dbg_reg_def[regno].name; | ||
109 | } | ||
110 | |||
111 | int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) | ||
112 | { | ||
113 | if (regno >= DBG_MAX_REG_NUM || regno < 0) | ||
114 | return -EINVAL; | ||
115 | |||
116 | if (dbg_reg_def[regno].offset != -1) | ||
117 | memcpy((void *)regs + dbg_reg_def[regno].offset, mem, | ||
118 | dbg_reg_def[regno].size); | ||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | void | ||
123 | sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) | ||
124 | { | ||
125 | struct pt_regs *thread_regs; | ||
126 | |||
127 | /* Initialize to zero */ | ||
128 | memset((char *)gdb_regs, 0, NUMREGBYTES); | ||
129 | thread_regs = task_pt_regs(task); | ||
130 | memcpy((void *)gdb_regs, (void *)thread_regs->regs, GP_REG_BYTES); | ||
131 | } | ||
132 | |||
133 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) | ||
134 | { | ||
135 | regs->pc = pc; | ||
136 | } | ||
137 | |||
138 | static int compiled_break; | ||
139 | |||
140 | static void kgdb_arch_update_addr(struct pt_regs *regs, | ||
141 | char *remcom_in_buffer) | ||
142 | { | ||
143 | unsigned long addr; | ||
144 | char *ptr; | ||
145 | |||
146 | ptr = &remcom_in_buffer[1]; | ||
147 | if (kgdb_hex2long(&ptr, &addr)) | ||
148 | kgdb_arch_set_pc(regs, addr); | ||
149 | else if (compiled_break == 1) | ||
150 | kgdb_arch_set_pc(regs, regs->pc + 4); | ||
151 | |||
152 | compiled_break = 0; | ||
153 | } | ||
154 | |||
155 | int kgdb_arch_handle_exception(int exception_vector, int signo, | ||
156 | int err_code, char *remcom_in_buffer, | ||
157 | char *remcom_out_buffer, | ||
158 | struct pt_regs *linux_regs) | ||
159 | { | ||
160 | int err; | ||
161 | |||
162 | switch (remcom_in_buffer[0]) { | ||
163 | case 'D': | ||
164 | case 'k': | ||
165 | /* | ||
166 | * Packet D (Detach), k (kill). No special handling | ||
167 | * is required here. Handle same as c packet. | ||
168 | */ | ||
169 | case 'c': | ||
170 | /* | ||
171 | * Packet c (Continue) to continue executing. | ||
172 | * Set pc to required address. | ||
173 | * Try to read optional parameter and set pc. | ||
174 | * If this was a compiled breakpoint, we need to move | ||
175 | * to the next instruction else we will just breakpoint | ||
176 | * over and over again. | ||
177 | */ | ||
178 | kgdb_arch_update_addr(linux_regs, remcom_in_buffer); | ||
179 | atomic_set(&kgdb_cpu_doing_single_step, -1); | ||
180 | kgdb_single_step = 0; | ||
181 | |||
182 | /* | ||
183 | * Received continue command, disable single step | ||
184 | */ | ||
185 | if (kernel_active_single_step()) | ||
186 | kernel_disable_single_step(); | ||
187 | |||
188 | err = 0; | ||
189 | break; | ||
190 | case 's': | ||
191 | /* | ||
192 | * Update step address value with address passed | ||
193 | * with step packet. | ||
194 | * On debug exception return PC is copied to ELR | ||
195 | * So just update PC. | ||
196 | * If no step address is passed, resume from the address | ||
197 | * pointed by PC. Do not update PC | ||
198 | */ | ||
199 | kgdb_arch_update_addr(linux_regs, remcom_in_buffer); | ||
200 | atomic_set(&kgdb_cpu_doing_single_step, raw_smp_processor_id()); | ||
201 | kgdb_single_step = 1; | ||
202 | |||
203 | /* | ||
204 | * Enable single step handling | ||
205 | */ | ||
206 | if (!kernel_active_single_step()) | ||
207 | kernel_enable_single_step(linux_regs); | ||
208 | err = 0; | ||
209 | break; | ||
210 | default: | ||
211 | err = -1; | ||
212 | } | ||
213 | return err; | ||
214 | } | ||
215 | |||
216 | static int kgdb_brk_fn(struct pt_regs *regs, unsigned int esr) | ||
217 | { | ||
218 | kgdb_handle_exception(1, SIGTRAP, 0, regs); | ||
219 | return 0; | ||
220 | } | ||
221 | |||
222 | static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr) | ||
223 | { | ||
224 | compiled_break = 1; | ||
225 | kgdb_handle_exception(1, SIGTRAP, 0, regs); | ||
226 | |||
227 | return 0; | ||
228 | } | ||
229 | |||
230 | static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr) | ||
231 | { | ||
232 | kgdb_handle_exception(1, SIGTRAP, 0, regs); | ||
233 | return 0; | ||
234 | } | ||
235 | |||
236 | static struct break_hook kgdb_brkpt_hook = { | ||
237 | .esr_mask = 0xffffffff, | ||
238 | .esr_val = DBG_ESR_VAL_BRK(KGDB_DYN_DGB_BRK_IMM), | ||
239 | .fn = kgdb_brk_fn | ||
240 | }; | ||
241 | |||
242 | static struct break_hook kgdb_compiled_brkpt_hook = { | ||
243 | .esr_mask = 0xffffffff, | ||
244 | .esr_val = DBG_ESR_VAL_BRK(KDBG_COMPILED_DBG_BRK_IMM), | ||
245 | .fn = kgdb_compiled_brk_fn | ||
246 | }; | ||
247 | |||
248 | static struct step_hook kgdb_step_hook = { | ||
249 | .fn = kgdb_step_brk_fn | ||
250 | }; | ||
251 | |||
252 | static void kgdb_call_nmi_hook(void *ignored) | ||
253 | { | ||
254 | kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); | ||
255 | } | ||
256 | |||
257 | void kgdb_roundup_cpus(unsigned long flags) | ||
258 | { | ||
259 | local_irq_enable(); | ||
260 | smp_call_function(kgdb_call_nmi_hook, NULL, 0); | ||
261 | local_irq_disable(); | ||
262 | } | ||
263 | |||
264 | static int __kgdb_notify(struct die_args *args, unsigned long cmd) | ||
265 | { | ||
266 | struct pt_regs *regs = args->regs; | ||
267 | |||
268 | if (kgdb_handle_exception(1, args->signr, cmd, regs)) | ||
269 | return NOTIFY_DONE; | ||
270 | return NOTIFY_STOP; | ||
271 | } | ||
272 | |||
273 | static int | ||
274 | kgdb_notify(struct notifier_block *self, unsigned long cmd, void *ptr) | ||
275 | { | ||
276 | unsigned long flags; | ||
277 | int ret; | ||
278 | |||
279 | local_irq_save(flags); | ||
280 | ret = __kgdb_notify(ptr, cmd); | ||
281 | local_irq_restore(flags); | ||
282 | |||
283 | return ret; | ||
284 | } | ||
285 | |||
286 | static struct notifier_block kgdb_notifier = { | ||
287 | .notifier_call = kgdb_notify, | ||
288 | /* | ||
289 | * Want to be lowest priority | ||
290 | */ | ||
291 | .priority = -INT_MAX, | ||
292 | }; | ||
293 | |||
294 | /* | ||
295 | * kgdb_arch_init - Perform any architecture specific initalization. | ||
296 | * This function will handle the initalization of any architecture | ||
297 | * specific callbacks. | ||
298 | */ | ||
299 | int kgdb_arch_init(void) | ||
300 | { | ||
301 | int ret = register_die_notifier(&kgdb_notifier); | ||
302 | |||
303 | if (ret != 0) | ||
304 | return ret; | ||
305 | |||
306 | register_break_hook(&kgdb_brkpt_hook); | ||
307 | register_break_hook(&kgdb_compiled_brkpt_hook); | ||
308 | register_step_hook(&kgdb_step_hook); | ||
309 | return 0; | ||
310 | } | ||
311 | |||
312 | /* | ||
313 | * kgdb_arch_exit - Perform any architecture specific uninitalization. | ||
314 | * This function will handle the uninitalization of any architecture | ||
315 | * specific callbacks, for dynamic registration and unregistration. | ||
316 | */ | ||
317 | void kgdb_arch_exit(void) | ||
318 | { | ||
319 | unregister_break_hook(&kgdb_brkpt_hook); | ||
320 | unregister_break_hook(&kgdb_compiled_brkpt_hook); | ||
321 | unregister_step_hook(&kgdb_step_hook); | ||
322 | unregister_die_notifier(&kgdb_notifier); | ||
323 | } | ||
324 | |||
325 | /* | ||
326 | * ARM instructions are always in LE. | ||
327 | * Break instruction is encoded in LE format | ||
328 | */ | ||
329 | struct kgdb_arch arch_kgdb_ops = { | ||
330 | .gdb_bpt_instr = { | ||
331 | KGDB_DYN_BRK_INS_BYTE0, | ||
332 | KGDB_DYN_BRK_INS_BYTE1, | ||
333 | KGDB_DYN_BRK_INS_BYTE2, | ||
334 | KGDB_DYN_BRK_INS_BYTE3, | ||
335 | } | ||
336 | }; | ||
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index 5b1cd792274a..e868c72a7938 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c | |||
@@ -1348,8 +1348,8 @@ early_initcall(init_hw_perf_events); | |||
1348 | * Callchain handling code. | 1348 | * Callchain handling code. |
1349 | */ | 1349 | */ |
1350 | struct frame_tail { | 1350 | struct frame_tail { |
1351 | struct frame_tail __user *fp; | 1351 | struct frame_tail __user *fp; |
1352 | unsigned long lr; | 1352 | unsigned long lr; |
1353 | } __attribute__((packed)); | 1353 | } __attribute__((packed)); |
1354 | 1354 | ||
1355 | /* | 1355 | /* |
@@ -1386,22 +1386,80 @@ user_backtrace(struct frame_tail __user *tail, | |||
1386 | return buftail.fp; | 1386 | return buftail.fp; |
1387 | } | 1387 | } |
1388 | 1388 | ||
1389 | /* | ||
1390 | * The registers we're interested in are at the end of the variable | ||
1391 | * length saved register structure. The fp points at the end of this | ||
1392 | * structure so the address of this struct is: | ||
1393 | * (struct compat_frame_tail *)(xxx->fp)-1 | ||
1394 | * | ||
1395 | * This code has been adapted from the ARM OProfile support. | ||
1396 | */ | ||
1397 | struct compat_frame_tail { | ||
1398 | compat_uptr_t fp; /* a (struct compat_frame_tail *) in compat mode */ | ||
1399 | u32 sp; | ||
1400 | u32 lr; | ||
1401 | } __attribute__((packed)); | ||
1402 | |||
1403 | static struct compat_frame_tail __user * | ||
1404 | compat_user_backtrace(struct compat_frame_tail __user *tail, | ||
1405 | struct perf_callchain_entry *entry) | ||
1406 | { | ||
1407 | struct compat_frame_tail buftail; | ||
1408 | unsigned long err; | ||
1409 | |||
1410 | /* Also check accessibility of one struct frame_tail beyond */ | ||
1411 | if (!access_ok(VERIFY_READ, tail, sizeof(buftail))) | ||
1412 | return NULL; | ||
1413 | |||
1414 | pagefault_disable(); | ||
1415 | err = __copy_from_user_inatomic(&buftail, tail, sizeof(buftail)); | ||
1416 | pagefault_enable(); | ||
1417 | |||
1418 | if (err) | ||
1419 | return NULL; | ||
1420 | |||
1421 | perf_callchain_store(entry, buftail.lr); | ||
1422 | |||
1423 | /* | ||
1424 | * Frame pointers should strictly progress back up the stack | ||
1425 | * (towards higher addresses). | ||
1426 | */ | ||
1427 | if (tail + 1 >= (struct compat_frame_tail __user *) | ||
1428 | compat_ptr(buftail.fp)) | ||
1429 | return NULL; | ||
1430 | |||
1431 | return (struct compat_frame_tail __user *)compat_ptr(buftail.fp) - 1; | ||
1432 | } | ||
1433 | |||
1389 | void perf_callchain_user(struct perf_callchain_entry *entry, | 1434 | void perf_callchain_user(struct perf_callchain_entry *entry, |
1390 | struct pt_regs *regs) | 1435 | struct pt_regs *regs) |
1391 | { | 1436 | { |
1392 | struct frame_tail __user *tail; | ||
1393 | |||
1394 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) { | 1437 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) { |
1395 | /* We don't support guest os callchain now */ | 1438 | /* We don't support guest os callchain now */ |
1396 | return; | 1439 | return; |
1397 | } | 1440 | } |
1398 | 1441 | ||
1399 | perf_callchain_store(entry, regs->pc); | 1442 | perf_callchain_store(entry, regs->pc); |
1400 | tail = (struct frame_tail __user *)regs->regs[29]; | ||
1401 | 1443 | ||
1402 | while (entry->nr < PERF_MAX_STACK_DEPTH && | 1444 | if (!compat_user_mode(regs)) { |
1403 | tail && !((unsigned long)tail & 0xf)) | 1445 | /* AARCH64 mode */ |
1404 | tail = user_backtrace(tail, entry); | 1446 | struct frame_tail __user *tail; |
1447 | |||
1448 | tail = (struct frame_tail __user *)regs->regs[29]; | ||
1449 | |||
1450 | while (entry->nr < PERF_MAX_STACK_DEPTH && | ||
1451 | tail && !((unsigned long)tail & 0xf)) | ||
1452 | tail = user_backtrace(tail, entry); | ||
1453 | } else { | ||
1454 | /* AARCH32 compat mode */ | ||
1455 | struct compat_frame_tail __user *tail; | ||
1456 | |||
1457 | tail = (struct compat_frame_tail __user *)regs->compat_fp - 1; | ||
1458 | |||
1459 | while ((entry->nr < PERF_MAX_STACK_DEPTH) && | ||
1460 | tail && !((unsigned long)tail & 0x3)) | ||
1461 | tail = compat_user_backtrace(tail, entry); | ||
1462 | } | ||
1405 | } | 1463 | } |
1406 | 1464 | ||
1407 | /* | 1465 | /* |
@@ -1429,6 +1487,7 @@ void perf_callchain_kernel(struct perf_callchain_entry *entry, | |||
1429 | frame.fp = regs->regs[29]; | 1487 | frame.fp = regs->regs[29]; |
1430 | frame.sp = regs->sp; | 1488 | frame.sp = regs->sp; |
1431 | frame.pc = regs->pc; | 1489 | frame.pc = regs->pc; |
1490 | |||
1432 | walk_stackframe(&frame, callchain_trace, entry); | 1491 | walk_stackframe(&frame, callchain_trace, entry); |
1433 | } | 1492 | } |
1434 | 1493 | ||
diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c new file mode 100644 index 000000000000..f2d6f0a36d63 --- /dev/null +++ b/arch/arm64/kernel/perf_regs.c | |||
@@ -0,0 +1,44 @@ | |||
1 | #include <linux/errno.h> | ||
2 | #include <linux/kernel.h> | ||
3 | #include <linux/perf_event.h> | ||
4 | #include <linux/bug.h> | ||
5 | #include <asm/perf_regs.h> | ||
6 | #include <asm/ptrace.h> | ||
7 | |||
8 | u64 perf_reg_value(struct pt_regs *regs, int idx) | ||
9 | { | ||
10 | if (WARN_ON_ONCE((u32)idx >= PERF_REG_ARM64_MAX)) | ||
11 | return 0; | ||
12 | |||
13 | /* | ||
14 | * Compat (i.e. 32 bit) mode: | ||
15 | * - PC has been set in the pt_regs struct in kernel_entry, | ||
16 | * - Handle SP and LR here. | ||
17 | */ | ||
18 | if (compat_user_mode(regs)) { | ||
19 | if ((u32)idx == PERF_REG_ARM64_SP) | ||
20 | return regs->compat_sp; | ||
21 | if ((u32)idx == PERF_REG_ARM64_LR) | ||
22 | return regs->compat_lr; | ||
23 | } | ||
24 | |||
25 | return regs->regs[idx]; | ||
26 | } | ||
27 | |||
28 | #define REG_RESERVED (~((1ULL << PERF_REG_ARM64_MAX) - 1)) | ||
29 | |||
30 | int perf_reg_validate(u64 mask) | ||
31 | { | ||
32 | if (!mask || mask & REG_RESERVED) | ||
33 | return -EINVAL; | ||
34 | |||
35 | return 0; | ||
36 | } | ||
37 | |||
38 | u64 perf_reg_abi(struct task_struct *task) | ||
39 | { | ||
40 | if (is_compat_thread(task_thread_info(task))) | ||
41 | return PERF_SAMPLE_REGS_ABI_32; | ||
42 | else | ||
43 | return PERF_SAMPLE_REGS_ABI_64; | ||
44 | } | ||
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 9cce0098f4cd..6391485f342d 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -71,8 +71,17 @@ static void setup_restart(void) | |||
71 | 71 | ||
72 | void soft_restart(unsigned long addr) | 72 | void soft_restart(unsigned long addr) |
73 | { | 73 | { |
74 | typedef void (*phys_reset_t)(unsigned long); | ||
75 | phys_reset_t phys_reset; | ||
76 | |||
74 | setup_restart(); | 77 | setup_restart(); |
75 | cpu_reset(addr); | 78 | |
79 | /* Switch to the identity mapping */ | ||
80 | phys_reset = (phys_reset_t)virt_to_phys(cpu_reset); | ||
81 | phys_reset(addr); | ||
82 | |||
83 | /* Should never get here */ | ||
84 | BUG(); | ||
76 | } | 85 | } |
77 | 86 | ||
78 | /* | 87 | /* |
diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index 4f97db3d7363..ea4828a4aa96 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c | |||
@@ -176,22 +176,20 @@ static const struct of_device_id psci_of_match[] __initconst = { | |||
176 | {}, | 176 | {}, |
177 | }; | 177 | }; |
178 | 178 | ||
179 | int __init psci_init(void) | 179 | void __init psci_init(void) |
180 | { | 180 | { |
181 | struct device_node *np; | 181 | struct device_node *np; |
182 | const char *method; | 182 | const char *method; |
183 | u32 id; | 183 | u32 id; |
184 | int err = 0; | ||
185 | 184 | ||
186 | np = of_find_matching_node(NULL, psci_of_match); | 185 | np = of_find_matching_node(NULL, psci_of_match); |
187 | if (!np) | 186 | if (!np) |
188 | return -ENODEV; | 187 | return; |
189 | 188 | ||
190 | pr_info("probing function IDs from device-tree\n"); | 189 | pr_info("probing function IDs from device-tree\n"); |
191 | 190 | ||
192 | if (of_property_read_string(np, "method", &method)) { | 191 | if (of_property_read_string(np, "method", &method)) { |
193 | pr_warning("missing \"method\" property\n"); | 192 | pr_warning("missing \"method\" property\n"); |
194 | err = -ENXIO; | ||
195 | goto out_put_node; | 193 | goto out_put_node; |
196 | } | 194 | } |
197 | 195 | ||
@@ -201,7 +199,6 @@ int __init psci_init(void) | |||
201 | invoke_psci_fn = __invoke_psci_fn_smc; | 199 | invoke_psci_fn = __invoke_psci_fn_smc; |
202 | } else { | 200 | } else { |
203 | pr_warning("invalid \"method\" property: %s\n", method); | 201 | pr_warning("invalid \"method\" property: %s\n", method); |
204 | err = -EINVAL; | ||
205 | goto out_put_node; | 202 | goto out_put_node; |
206 | } | 203 | } |
207 | 204 | ||
@@ -227,7 +224,7 @@ int __init psci_init(void) | |||
227 | 224 | ||
228 | out_put_node: | 225 | out_put_node: |
229 | of_node_put(np); | 226 | of_node_put(np); |
230 | return err; | 227 | return; |
231 | } | 228 | } |
232 | 229 | ||
233 | #ifdef CONFIG_SMP | 230 | #ifdef CONFIG_SMP |
@@ -251,7 +248,7 @@ static int cpu_psci_cpu_boot(unsigned int cpu) | |||
251 | { | 248 | { |
252 | int err = psci_ops.cpu_on(cpu_logical_map(cpu), __pa(secondary_entry)); | 249 | int err = psci_ops.cpu_on(cpu_logical_map(cpu), __pa(secondary_entry)); |
253 | if (err) | 250 | if (err) |
254 | pr_err("psci: failed to boot CPU%d (%d)\n", cpu, err); | 251 | pr_err("failed to boot CPU%d (%d)\n", cpu, err); |
255 | 252 | ||
256 | return err; | 253 | return err; |
257 | } | 254 | } |
@@ -278,7 +275,7 @@ static void cpu_psci_cpu_die(unsigned int cpu) | |||
278 | 275 | ||
279 | ret = psci_ops.cpu_off(state); | 276 | ret = psci_ops.cpu_off(state); |
280 | 277 | ||
281 | pr_crit("psci: unable to power off CPU%u (%d)\n", cpu, ret); | 278 | pr_crit("unable to power off CPU%u (%d)\n", cpu, ret); |
282 | } | 279 | } |
283 | #endif | 280 | #endif |
284 | 281 | ||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index c8e9effe52e1..67da30741a1b 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
@@ -69,6 +69,7 @@ EXPORT_SYMBOL_GPL(elf_hwcap); | |||
69 | COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\ | 69 | COMPAT_HWCAP_VFPv3|COMPAT_HWCAP_VFPv4|\ |
70 | COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV) | 70 | COMPAT_HWCAP_NEON|COMPAT_HWCAP_IDIV) |
71 | unsigned int compat_elf_hwcap __read_mostly = COMPAT_ELF_HWCAP_DEFAULT; | 71 | unsigned int compat_elf_hwcap __read_mostly = COMPAT_ELF_HWCAP_DEFAULT; |
72 | unsigned int compat_elf_hwcap2 __read_mostly; | ||
72 | #endif | 73 | #endif |
73 | 74 | ||
74 | static const char *cpu_name; | 75 | static const char *cpu_name; |
@@ -242,6 +243,38 @@ static void __init setup_processor(void) | |||
242 | block = (features >> 16) & 0xf; | 243 | block = (features >> 16) & 0xf; |
243 | if (block && !(block & 0x8)) | 244 | if (block && !(block & 0x8)) |
244 | elf_hwcap |= HWCAP_CRC32; | 245 | elf_hwcap |= HWCAP_CRC32; |
246 | |||
247 | #ifdef CONFIG_COMPAT | ||
248 | /* | ||
249 | * ID_ISAR5_EL1 carries similar information as above, but pertaining to | ||
250 | * the Aarch32 32-bit execution state. | ||
251 | */ | ||
252 | features = read_cpuid(ID_ISAR5_EL1); | ||
253 | block = (features >> 4) & 0xf; | ||
254 | if (!(block & 0x8)) { | ||
255 | switch (block) { | ||
256 | default: | ||
257 | case 2: | ||
258 | compat_elf_hwcap2 |= COMPAT_HWCAP2_PMULL; | ||
259 | case 1: | ||
260 | compat_elf_hwcap2 |= COMPAT_HWCAP2_AES; | ||
261 | case 0: | ||
262 | break; | ||
263 | } | ||
264 | } | ||
265 | |||
266 | block = (features >> 8) & 0xf; | ||
267 | if (block && !(block & 0x8)) | ||
268 | compat_elf_hwcap2 |= COMPAT_HWCAP2_SHA1; | ||
269 | |||
270 | block = (features >> 12) & 0xf; | ||
271 | if (block && !(block & 0x8)) | ||
272 | compat_elf_hwcap2 |= COMPAT_HWCAP2_SHA2; | ||
273 | |||
274 | block = (features >> 16) & 0xf; | ||
275 | if (block && !(block & 0x8)) | ||
276 | compat_elf_hwcap2 |= COMPAT_HWCAP2_CRC32; | ||
277 | #endif | ||
245 | } | 278 | } |
246 | 279 | ||
247 | static void __init setup_machine_fdt(phys_addr_t dt_phys) | 280 | static void __init setup_machine_fdt(phys_addr_t dt_phys) |
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 7cfb92a4ab66..f0a141dd5655 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
@@ -114,6 +114,11 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) | |||
114 | return ret; | 114 | return ret; |
115 | } | 115 | } |
116 | 116 | ||
117 | static void smp_store_cpu_info(unsigned int cpuid) | ||
118 | { | ||
119 | store_cpu_topology(cpuid); | ||
120 | } | ||
121 | |||
117 | /* | 122 | /* |
118 | * This is the secondary CPU boot entry. We're using this CPUs | 123 | * This is the secondary CPU boot entry. We're using this CPUs |
119 | * idle thread stack, but a set of temporary page tables. | 124 | * idle thread stack, but a set of temporary page tables. |
@@ -152,6 +157,8 @@ asmlinkage void secondary_start_kernel(void) | |||
152 | */ | 157 | */ |
153 | notify_cpu_starting(cpu); | 158 | notify_cpu_starting(cpu); |
154 | 159 | ||
160 | smp_store_cpu_info(cpu); | ||
161 | |||
155 | /* | 162 | /* |
156 | * OK, now it's safe to let the boot CPU continue. Wait for | 163 | * OK, now it's safe to let the boot CPU continue. Wait for |
157 | * the CPU migration code to notice that the CPU is online | 164 | * the CPU migration code to notice that the CPU is online |
@@ -160,6 +167,7 @@ asmlinkage void secondary_start_kernel(void) | |||
160 | set_cpu_online(cpu, true); | 167 | set_cpu_online(cpu, true); |
161 | complete(&cpu_running); | 168 | complete(&cpu_running); |
162 | 169 | ||
170 | local_dbg_enable(); | ||
163 | local_irq_enable(); | 171 | local_irq_enable(); |
164 | local_async_enable(); | 172 | local_async_enable(); |
165 | 173 | ||
@@ -390,6 +398,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
390 | int err; | 398 | int err; |
391 | unsigned int cpu, ncores = num_possible_cpus(); | 399 | unsigned int cpu, ncores = num_possible_cpus(); |
392 | 400 | ||
401 | init_cpu_topology(); | ||
402 | |||
403 | smp_store_cpu_info(smp_processor_id()); | ||
404 | |||
393 | /* | 405 | /* |
394 | * are we trying to boot more cores than exist? | 406 | * are we trying to boot more cores than exist? |
395 | */ | 407 | */ |
diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c index 44c22805d2e2..7a530d2cc807 100644 --- a/arch/arm64/kernel/smp_spin_table.c +++ b/arch/arm64/kernel/smp_spin_table.c | |||
@@ -128,7 +128,7 @@ static int smp_spin_table_cpu_boot(unsigned int cpu) | |||
128 | return secondary_holding_pen_release != INVALID_HWID ? -ENOSYS : 0; | 128 | return secondary_holding_pen_release != INVALID_HWID ? -ENOSYS : 0; |
129 | } | 129 | } |
130 | 130 | ||
131 | void smp_spin_table_cpu_postboot(void) | 131 | static void smp_spin_table_cpu_postboot(void) |
132 | { | 132 | { |
133 | /* | 133 | /* |
134 | * Let the primary processor know we're out of the pen. | 134 | * Let the primary processor know we're out of the pen. |
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c new file mode 100644 index 000000000000..3e06b0be4ec8 --- /dev/null +++ b/arch/arm64/kernel/topology.c | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * arch/arm64/kernel/topology.c | ||
3 | * | ||
4 | * Copyright (C) 2011,2013,2014 Linaro Limited. | ||
5 | * | ||
6 | * Based on the arm32 version written by Vincent Guittot in turn based on | ||
7 | * arch/sh/kernel/topology.c | ||
8 | * | ||
9 | * This file is subject to the terms and conditions of the GNU General Public | ||
10 | * License. See the file "COPYING" in the main directory of this archive | ||
11 | * for more details. | ||
12 | */ | ||
13 | |||
14 | #include <linux/cpu.h> | ||
15 | #include <linux/cpumask.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/percpu.h> | ||
18 | #include <linux/node.h> | ||
19 | #include <linux/nodemask.h> | ||
20 | #include <linux/sched.h> | ||
21 | |||
22 | #include <asm/topology.h> | ||
23 | |||
24 | /* | ||
25 | * cpu topology table | ||
26 | */ | ||
27 | struct cpu_topology cpu_topology[NR_CPUS]; | ||
28 | EXPORT_SYMBOL_GPL(cpu_topology); | ||
29 | |||
30 | const struct cpumask *cpu_coregroup_mask(int cpu) | ||
31 | { | ||
32 | return &cpu_topology[cpu].core_sibling; | ||
33 | } | ||
34 | |||
35 | static void update_siblings_masks(unsigned int cpuid) | ||
36 | { | ||
37 | struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; | ||
38 | int cpu; | ||
39 | |||
40 | if (cpuid_topo->cluster_id == -1) { | ||
41 | /* | ||
42 | * DT does not contain topology information for this cpu | ||
43 | * reset it to default behaviour | ||
44 | */ | ||
45 | pr_debug("CPU%u: No topology information configured\n", cpuid); | ||
46 | cpuid_topo->core_id = 0; | ||
47 | cpumask_set_cpu(cpuid, &cpuid_topo->core_sibling); | ||
48 | cpumask_set_cpu(cpuid, &cpuid_topo->thread_sibling); | ||
49 | return; | ||
50 | } | ||
51 | |||
52 | /* update core and thread sibling masks */ | ||
53 | for_each_possible_cpu(cpu) { | ||
54 | cpu_topo = &cpu_topology[cpu]; | ||
55 | |||
56 | if (cpuid_topo->cluster_id != cpu_topo->cluster_id) | ||
57 | continue; | ||
58 | |||
59 | cpumask_set_cpu(cpuid, &cpu_topo->core_sibling); | ||
60 | if (cpu != cpuid) | ||
61 | cpumask_set_cpu(cpu, &cpuid_topo->core_sibling); | ||
62 | |||
63 | if (cpuid_topo->core_id != cpu_topo->core_id) | ||
64 | continue; | ||
65 | |||
66 | cpumask_set_cpu(cpuid, &cpu_topo->thread_sibling); | ||
67 | if (cpu != cpuid) | ||
68 | cpumask_set_cpu(cpu, &cpuid_topo->thread_sibling); | ||
69 | } | ||
70 | } | ||
71 | |||
72 | void store_cpu_topology(unsigned int cpuid) | ||
73 | { | ||
74 | update_siblings_masks(cpuid); | ||
75 | } | ||
76 | |||
77 | /* | ||
78 | * init_cpu_topology is called at boot when only one cpu is running | ||
79 | * which prevent simultaneous write access to cpu_topology array | ||
80 | */ | ||
81 | void __init init_cpu_topology(void) | ||
82 | { | ||
83 | unsigned int cpu; | ||
84 | |||
85 | /* init core mask and power*/ | ||
86 | for_each_possible_cpu(cpu) { | ||
87 | struct cpu_topology *cpu_topo = &cpu_topology[cpu]; | ||
88 | |||
89 | cpu_topo->thread_id = -1; | ||
90 | cpu_topo->core_id = -1; | ||
91 | cpu_topo->cluster_id = -1; | ||
92 | cpumask_clear(&cpu_topo->core_sibling); | ||
93 | cpumask_clear(&cpu_topo->thread_sibling); | ||
94 | } | ||
95 | } | ||
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index a7149cae1615..50384fec56c4 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c | |||
@@ -106,49 +106,31 @@ int aarch32_setup_vectors_page(struct linux_binprm *bprm, int uses_interp) | |||
106 | 106 | ||
107 | static int __init vdso_init(void) | 107 | static int __init vdso_init(void) |
108 | { | 108 | { |
109 | struct page *pg; | 109 | int i; |
110 | char *vbase; | 110 | |
111 | int i, ret = 0; | 111 | if (memcmp(&vdso_start, "\177ELF", 4)) { |
112 | pr_err("vDSO is not a valid ELF object!\n"); | ||
113 | return -EINVAL; | ||
114 | } | ||
112 | 115 | ||
113 | vdso_pages = (&vdso_end - &vdso_start) >> PAGE_SHIFT; | 116 | vdso_pages = (&vdso_end - &vdso_start) >> PAGE_SHIFT; |
114 | pr_info("vdso: %ld pages (%ld code, %ld data) at base %p\n", | 117 | pr_info("vdso: %ld pages (%ld code, %ld data) at base %p\n", |
115 | vdso_pages + 1, vdso_pages, 1L, &vdso_start); | 118 | vdso_pages + 1, vdso_pages, 1L, &vdso_start); |
116 | 119 | ||
117 | /* Allocate the vDSO pagelist, plus a page for the data. */ | 120 | /* Allocate the vDSO pagelist, plus a page for the data. */ |
118 | vdso_pagelist = kzalloc(sizeof(struct page *) * (vdso_pages + 1), | 121 | vdso_pagelist = kcalloc(vdso_pages + 1, sizeof(struct page *), |
119 | GFP_KERNEL); | 122 | GFP_KERNEL); |
120 | if (vdso_pagelist == NULL) { | 123 | if (vdso_pagelist == NULL) |
121 | pr_err("Failed to allocate vDSO pagelist!\n"); | ||
122 | return -ENOMEM; | 124 | return -ENOMEM; |
123 | } | ||
124 | 125 | ||
125 | /* Grab the vDSO code pages. */ | 126 | /* Grab the vDSO code pages. */ |
126 | for (i = 0; i < vdso_pages; i++) { | 127 | for (i = 0; i < vdso_pages; i++) |
127 | pg = virt_to_page(&vdso_start + i*PAGE_SIZE); | 128 | vdso_pagelist[i] = virt_to_page(&vdso_start + i * PAGE_SIZE); |
128 | ClearPageReserved(pg); | ||
129 | get_page(pg); | ||
130 | vdso_pagelist[i] = pg; | ||
131 | } | ||
132 | |||
133 | /* Sanity check the shared object header. */ | ||
134 | vbase = vmap(vdso_pagelist, 1, 0, PAGE_KERNEL); | ||
135 | if (vbase == NULL) { | ||
136 | pr_err("Failed to map vDSO pagelist!\n"); | ||
137 | return -ENOMEM; | ||
138 | } else if (memcmp(vbase, "\177ELF", 4)) { | ||
139 | pr_err("vDSO is not a valid ELF object!\n"); | ||
140 | ret = -EINVAL; | ||
141 | goto unmap; | ||
142 | } | ||
143 | 129 | ||
144 | /* Grab the vDSO data page. */ | 130 | /* Grab the vDSO data page. */ |
145 | pg = virt_to_page(vdso_data); | 131 | vdso_pagelist[i] = virt_to_page(vdso_data); |
146 | get_page(pg); | ||
147 | vdso_pagelist[i] = pg; | ||
148 | 132 | ||
149 | unmap: | 133 | return 0; |
150 | vunmap(vbase); | ||
151 | return ret; | ||
152 | } | 134 | } |
153 | arch_initcall(vdso_init); | 135 | arch_initcall(vdso_init); |
154 | 136 | ||
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index 2b0244d65c16..d968796f4b2d 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S | |||
@@ -68,6 +68,12 @@ __do_hyp_init: | |||
68 | msr tcr_el2, x4 | 68 | msr tcr_el2, x4 |
69 | 69 | ||
70 | ldr x4, =VTCR_EL2_FLAGS | 70 | ldr x4, =VTCR_EL2_FLAGS |
71 | /* | ||
72 | * Read the PARange bits from ID_AA64MMFR0_EL1 and set the PS bits in | ||
73 | * VTCR_EL2. | ||
74 | */ | ||
75 | mrs x5, ID_AA64MMFR0_EL1 | ||
76 | bfi x4, x5, #16, #3 | ||
71 | msr vtcr_el2, x4 | 77 | msr vtcr_el2, x4 |
72 | 78 | ||
73 | mrs x4, mair_el1 | 79 | mrs x4, mair_el1 |
diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S index 1ea9f26d1b70..c46f48b33c14 100644 --- a/arch/arm64/mm/cache.S +++ b/arch/arm64/mm/cache.S | |||
@@ -30,7 +30,7 @@ | |||
30 | * | 30 | * |
31 | * Corrupted registers: x0-x7, x9-x11 | 31 | * Corrupted registers: x0-x7, x9-x11 |
32 | */ | 32 | */ |
33 | ENTRY(__flush_dcache_all) | 33 | __flush_dcache_all: |
34 | dsb sy // ensure ordering with previous memory accesses | 34 | dsb sy // ensure ordering with previous memory accesses |
35 | mrs x0, clidr_el1 // read clidr | 35 | mrs x0, clidr_el1 // read clidr |
36 | and x3, x0, #0x7000000 // extract loc from clidr | 36 | and x3, x0, #0x7000000 // extract loc from clidr |
@@ -166,3 +166,81 @@ ENTRY(__flush_dcache_area) | |||
166 | dsb sy | 166 | dsb sy |
167 | ret | 167 | ret |
168 | ENDPROC(__flush_dcache_area) | 168 | ENDPROC(__flush_dcache_area) |
169 | |||
170 | /* | ||
171 | * __dma_inv_range(start, end) | ||
172 | * - start - virtual start address of region | ||
173 | * - end - virtual end address of region | ||
174 | */ | ||
175 | __dma_inv_range: | ||
176 | dcache_line_size x2, x3 | ||
177 | sub x3, x2, #1 | ||
178 | bic x0, x0, x3 | ||
179 | bic x1, x1, x3 | ||
180 | 1: dc ivac, x0 // invalidate D / U line | ||
181 | add x0, x0, x2 | ||
182 | cmp x0, x1 | ||
183 | b.lo 1b | ||
184 | dsb sy | ||
185 | ret | ||
186 | ENDPROC(__dma_inv_range) | ||
187 | |||
188 | /* | ||
189 | * __dma_clean_range(start, end) | ||
190 | * - start - virtual start address of region | ||
191 | * - end - virtual end address of region | ||
192 | */ | ||
193 | __dma_clean_range: | ||
194 | dcache_line_size x2, x3 | ||
195 | sub x3, x2, #1 | ||
196 | bic x0, x0, x3 | ||
197 | 1: dc cvac, x0 // clean D / U line | ||
198 | add x0, x0, x2 | ||
199 | cmp x0, x1 | ||
200 | b.lo 1b | ||
201 | dsb sy | ||
202 | ret | ||
203 | ENDPROC(__dma_clean_range) | ||
204 | |||
205 | /* | ||
206 | * __dma_flush_range(start, end) | ||
207 | * - start - virtual start address of region | ||
208 | * - end - virtual end address of region | ||
209 | */ | ||
210 | ENTRY(__dma_flush_range) | ||
211 | dcache_line_size x2, x3 | ||
212 | sub x3, x2, #1 | ||
213 | bic x0, x0, x3 | ||
214 | 1: dc civac, x0 // clean & invalidate D / U line | ||
215 | add x0, x0, x2 | ||
216 | cmp x0, x1 | ||
217 | b.lo 1b | ||
218 | dsb sy | ||
219 | ret | ||
220 | ENDPROC(__dma_flush_range) | ||
221 | |||
222 | /* | ||
223 | * __dma_map_area(start, size, dir) | ||
224 | * - start - kernel virtual start address | ||
225 | * - size - size of region | ||
226 | * - dir - DMA direction | ||
227 | */ | ||
228 | ENTRY(__dma_map_area) | ||
229 | add x1, x1, x0 | ||
230 | cmp w2, #DMA_FROM_DEVICE | ||
231 | b.eq __dma_inv_range | ||
232 | b __dma_clean_range | ||
233 | ENDPROC(__dma_map_area) | ||
234 | |||
235 | /* | ||
236 | * __dma_unmap_area(start, size, dir) | ||
237 | * - start - kernel virtual start address | ||
238 | * - size - size of region | ||
239 | * - dir - DMA direction | ||
240 | */ | ||
241 | ENTRY(__dma_unmap_area) | ||
242 | add x1, x1, x0 | ||
243 | cmp w2, #DMA_TO_DEVICE | ||
244 | b.ne __dma_inv_range | ||
245 | ret | ||
246 | ENDPROC(__dma_unmap_area) | ||
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index fbd76785c5db..0ba347e59f06 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c | |||
@@ -30,18 +30,26 @@ | |||
30 | struct dma_map_ops *dma_ops; | 30 | struct dma_map_ops *dma_ops; |
31 | EXPORT_SYMBOL(dma_ops); | 31 | EXPORT_SYMBOL(dma_ops); |
32 | 32 | ||
33 | static void *arm64_swiotlb_alloc_coherent(struct device *dev, size_t size, | 33 | static pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot, |
34 | dma_addr_t *dma_handle, gfp_t flags, | 34 | bool coherent) |
35 | struct dma_attrs *attrs) | 35 | { |
36 | if (!coherent || dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) | ||
37 | return pgprot_writecombine(prot); | ||
38 | return prot; | ||
39 | } | ||
40 | |||
41 | static void *__dma_alloc_coherent(struct device *dev, size_t size, | ||
42 | dma_addr_t *dma_handle, gfp_t flags, | ||
43 | struct dma_attrs *attrs) | ||
36 | { | 44 | { |
37 | if (dev == NULL) { | 45 | if (dev == NULL) { |
38 | WARN_ONCE(1, "Use an actual device structure for DMA allocation\n"); | 46 | WARN_ONCE(1, "Use an actual device structure for DMA allocation\n"); |
39 | return NULL; | 47 | return NULL; |
40 | } | 48 | } |
41 | 49 | ||
42 | if (IS_ENABLED(CONFIG_ZONE_DMA32) && | 50 | if (IS_ENABLED(CONFIG_ZONE_DMA) && |
43 | dev->coherent_dma_mask <= DMA_BIT_MASK(32)) | 51 | dev->coherent_dma_mask <= DMA_BIT_MASK(32)) |
44 | flags |= GFP_DMA32; | 52 | flags |= GFP_DMA; |
45 | if (IS_ENABLED(CONFIG_DMA_CMA)) { | 53 | if (IS_ENABLED(CONFIG_DMA_CMA)) { |
46 | struct page *page; | 54 | struct page *page; |
47 | 55 | ||
@@ -58,9 +66,9 @@ static void *arm64_swiotlb_alloc_coherent(struct device *dev, size_t size, | |||
58 | } | 66 | } |
59 | } | 67 | } |
60 | 68 | ||
61 | static void arm64_swiotlb_free_coherent(struct device *dev, size_t size, | 69 | static void __dma_free_coherent(struct device *dev, size_t size, |
62 | void *vaddr, dma_addr_t dma_handle, | 70 | void *vaddr, dma_addr_t dma_handle, |
63 | struct dma_attrs *attrs) | 71 | struct dma_attrs *attrs) |
64 | { | 72 | { |
65 | if (dev == NULL) { | 73 | if (dev == NULL) { |
66 | WARN_ONCE(1, "Use an actual device structure for DMA allocation\n"); | 74 | WARN_ONCE(1, "Use an actual device structure for DMA allocation\n"); |
@@ -78,9 +86,212 @@ static void arm64_swiotlb_free_coherent(struct device *dev, size_t size, | |||
78 | } | 86 | } |
79 | } | 87 | } |
80 | 88 | ||
81 | static struct dma_map_ops arm64_swiotlb_dma_ops = { | 89 | static void *__dma_alloc_noncoherent(struct device *dev, size_t size, |
82 | .alloc = arm64_swiotlb_alloc_coherent, | 90 | dma_addr_t *dma_handle, gfp_t flags, |
83 | .free = arm64_swiotlb_free_coherent, | 91 | struct dma_attrs *attrs) |
92 | { | ||
93 | struct page *page, **map; | ||
94 | void *ptr, *coherent_ptr; | ||
95 | int order, i; | ||
96 | |||
97 | size = PAGE_ALIGN(size); | ||
98 | order = get_order(size); | ||
99 | |||
100 | ptr = __dma_alloc_coherent(dev, size, dma_handle, flags, attrs); | ||
101 | if (!ptr) | ||
102 | goto no_mem; | ||
103 | map = kmalloc(sizeof(struct page *) << order, flags & ~GFP_DMA); | ||
104 | if (!map) | ||
105 | goto no_map; | ||
106 | |||
107 | /* remove any dirty cache lines on the kernel alias */ | ||
108 | __dma_flush_range(ptr, ptr + size); | ||
109 | |||
110 | /* create a coherent mapping */ | ||
111 | page = virt_to_page(ptr); | ||
112 | for (i = 0; i < (size >> PAGE_SHIFT); i++) | ||
113 | map[i] = page + i; | ||
114 | coherent_ptr = vmap(map, size >> PAGE_SHIFT, VM_MAP, | ||
115 | __get_dma_pgprot(attrs, pgprot_default, false)); | ||
116 | kfree(map); | ||
117 | if (!coherent_ptr) | ||
118 | goto no_map; | ||
119 | |||
120 | return coherent_ptr; | ||
121 | |||
122 | no_map: | ||
123 | __dma_free_coherent(dev, size, ptr, *dma_handle, attrs); | ||
124 | no_mem: | ||
125 | *dma_handle = ~0; | ||
126 | return NULL; | ||
127 | } | ||
128 | |||
129 | static void __dma_free_noncoherent(struct device *dev, size_t size, | ||
130 | void *vaddr, dma_addr_t dma_handle, | ||
131 | struct dma_attrs *attrs) | ||
132 | { | ||
133 | void *swiotlb_addr = phys_to_virt(dma_to_phys(dev, dma_handle)); | ||
134 | |||
135 | vunmap(vaddr); | ||
136 | __dma_free_coherent(dev, size, swiotlb_addr, dma_handle, attrs); | ||
137 | } | ||
138 | |||
139 | static dma_addr_t __swiotlb_map_page(struct device *dev, struct page *page, | ||
140 | unsigned long offset, size_t size, | ||
141 | enum dma_data_direction dir, | ||
142 | struct dma_attrs *attrs) | ||
143 | { | ||
144 | dma_addr_t dev_addr; | ||
145 | |||
146 | dev_addr = swiotlb_map_page(dev, page, offset, size, dir, attrs); | ||
147 | __dma_map_area(phys_to_virt(dma_to_phys(dev, dev_addr)), size, dir); | ||
148 | |||
149 | return dev_addr; | ||
150 | } | ||
151 | |||
152 | |||
153 | static void __swiotlb_unmap_page(struct device *dev, dma_addr_t dev_addr, | ||
154 | size_t size, enum dma_data_direction dir, | ||
155 | struct dma_attrs *attrs) | ||
156 | { | ||
157 | __dma_unmap_area(phys_to_virt(dma_to_phys(dev, dev_addr)), size, dir); | ||
158 | swiotlb_unmap_page(dev, dev_addr, size, dir, attrs); | ||
159 | } | ||
160 | |||
161 | static int __swiotlb_map_sg_attrs(struct device *dev, struct scatterlist *sgl, | ||
162 | int nelems, enum dma_data_direction dir, | ||
163 | struct dma_attrs *attrs) | ||
164 | { | ||
165 | struct scatterlist *sg; | ||
166 | int i, ret; | ||
167 | |||
168 | ret = swiotlb_map_sg_attrs(dev, sgl, nelems, dir, attrs); | ||
169 | for_each_sg(sgl, sg, ret, i) | ||
170 | __dma_map_area(phys_to_virt(dma_to_phys(dev, sg->dma_address)), | ||
171 | sg->length, dir); | ||
172 | |||
173 | return ret; | ||
174 | } | ||
175 | |||
176 | static void __swiotlb_unmap_sg_attrs(struct device *dev, | ||
177 | struct scatterlist *sgl, int nelems, | ||
178 | enum dma_data_direction dir, | ||
179 | struct dma_attrs *attrs) | ||
180 | { | ||
181 | struct scatterlist *sg; | ||
182 | int i; | ||
183 | |||
184 | for_each_sg(sgl, sg, nelems, i) | ||
185 | __dma_unmap_area(phys_to_virt(dma_to_phys(dev, sg->dma_address)), | ||
186 | sg->length, dir); | ||
187 | swiotlb_unmap_sg_attrs(dev, sgl, nelems, dir, attrs); | ||
188 | } | ||
189 | |||
190 | static void __swiotlb_sync_single_for_cpu(struct device *dev, | ||
191 | dma_addr_t dev_addr, size_t size, | ||
192 | enum dma_data_direction dir) | ||
193 | { | ||
194 | __dma_unmap_area(phys_to_virt(dma_to_phys(dev, dev_addr)), size, dir); | ||
195 | swiotlb_sync_single_for_cpu(dev, dev_addr, size, dir); | ||
196 | } | ||
197 | |||
198 | static void __swiotlb_sync_single_for_device(struct device *dev, | ||
199 | dma_addr_t dev_addr, size_t size, | ||
200 | enum dma_data_direction dir) | ||
201 | { | ||
202 | swiotlb_sync_single_for_device(dev, dev_addr, size, dir); | ||
203 | __dma_map_area(phys_to_virt(dma_to_phys(dev, dev_addr)), size, dir); | ||
204 | } | ||
205 | |||
206 | static void __swiotlb_sync_sg_for_cpu(struct device *dev, | ||
207 | struct scatterlist *sgl, int nelems, | ||
208 | enum dma_data_direction dir) | ||
209 | { | ||
210 | struct scatterlist *sg; | ||
211 | int i; | ||
212 | |||
213 | for_each_sg(sgl, sg, nelems, i) | ||
214 | __dma_unmap_area(phys_to_virt(dma_to_phys(dev, sg->dma_address)), | ||
215 | sg->length, dir); | ||
216 | swiotlb_sync_sg_for_cpu(dev, sgl, nelems, dir); | ||
217 | } | ||
218 | |||
219 | static void __swiotlb_sync_sg_for_device(struct device *dev, | ||
220 | struct scatterlist *sgl, int nelems, | ||
221 | enum dma_data_direction dir) | ||
222 | { | ||
223 | struct scatterlist *sg; | ||
224 | int i; | ||
225 | |||
226 | swiotlb_sync_sg_for_device(dev, sgl, nelems, dir); | ||
227 | for_each_sg(sgl, sg, nelems, i) | ||
228 | __dma_map_area(phys_to_virt(dma_to_phys(dev, sg->dma_address)), | ||
229 | sg->length, dir); | ||
230 | } | ||
231 | |||
232 | /* vma->vm_page_prot must be set appropriately before calling this function */ | ||
233 | static int __dma_common_mmap(struct device *dev, struct vm_area_struct *vma, | ||
234 | void *cpu_addr, dma_addr_t dma_addr, size_t size) | ||
235 | { | ||
236 | int ret = -ENXIO; | ||
237 | unsigned long nr_vma_pages = (vma->vm_end - vma->vm_start) >> | ||
238 | PAGE_SHIFT; | ||
239 | unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT; | ||
240 | unsigned long pfn = dma_to_phys(dev, dma_addr) >> PAGE_SHIFT; | ||
241 | unsigned long off = vma->vm_pgoff; | ||
242 | |||
243 | if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret)) | ||
244 | return ret; | ||
245 | |||
246 | if (off < nr_pages && nr_vma_pages <= (nr_pages - off)) { | ||
247 | ret = remap_pfn_range(vma, vma->vm_start, | ||
248 | pfn + off, | ||
249 | vma->vm_end - vma->vm_start, | ||
250 | vma->vm_page_prot); | ||
251 | } | ||
252 | |||
253 | return ret; | ||
254 | } | ||
255 | |||
256 | static int __swiotlb_mmap_noncoherent(struct device *dev, | ||
257 | struct vm_area_struct *vma, | ||
258 | void *cpu_addr, dma_addr_t dma_addr, size_t size, | ||
259 | struct dma_attrs *attrs) | ||
260 | { | ||
261 | vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot, false); | ||
262 | return __dma_common_mmap(dev, vma, cpu_addr, dma_addr, size); | ||
263 | } | ||
264 | |||
265 | static int __swiotlb_mmap_coherent(struct device *dev, | ||
266 | struct vm_area_struct *vma, | ||
267 | void *cpu_addr, dma_addr_t dma_addr, size_t size, | ||
268 | struct dma_attrs *attrs) | ||
269 | { | ||
270 | /* Just use whatever page_prot attributes were specified */ | ||
271 | return __dma_common_mmap(dev, vma, cpu_addr, dma_addr, size); | ||
272 | } | ||
273 | |||
274 | struct dma_map_ops noncoherent_swiotlb_dma_ops = { | ||
275 | .alloc = __dma_alloc_noncoherent, | ||
276 | .free = __dma_free_noncoherent, | ||
277 | .mmap = __swiotlb_mmap_noncoherent, | ||
278 | .map_page = __swiotlb_map_page, | ||
279 | .unmap_page = __swiotlb_unmap_page, | ||
280 | .map_sg = __swiotlb_map_sg_attrs, | ||
281 | .unmap_sg = __swiotlb_unmap_sg_attrs, | ||
282 | .sync_single_for_cpu = __swiotlb_sync_single_for_cpu, | ||
283 | .sync_single_for_device = __swiotlb_sync_single_for_device, | ||
284 | .sync_sg_for_cpu = __swiotlb_sync_sg_for_cpu, | ||
285 | .sync_sg_for_device = __swiotlb_sync_sg_for_device, | ||
286 | .dma_supported = swiotlb_dma_supported, | ||
287 | .mapping_error = swiotlb_dma_mapping_error, | ||
288 | }; | ||
289 | EXPORT_SYMBOL(noncoherent_swiotlb_dma_ops); | ||
290 | |||
291 | struct dma_map_ops coherent_swiotlb_dma_ops = { | ||
292 | .alloc = __dma_alloc_coherent, | ||
293 | .free = __dma_free_coherent, | ||
294 | .mmap = __swiotlb_mmap_coherent, | ||
84 | .map_page = swiotlb_map_page, | 295 | .map_page = swiotlb_map_page, |
85 | .unmap_page = swiotlb_unmap_page, | 296 | .unmap_page = swiotlb_unmap_page, |
86 | .map_sg = swiotlb_map_sg_attrs, | 297 | .map_sg = swiotlb_map_sg_attrs, |
@@ -92,12 +303,19 @@ static struct dma_map_ops arm64_swiotlb_dma_ops = { | |||
92 | .dma_supported = swiotlb_dma_supported, | 303 | .dma_supported = swiotlb_dma_supported, |
93 | .mapping_error = swiotlb_dma_mapping_error, | 304 | .mapping_error = swiotlb_dma_mapping_error, |
94 | }; | 305 | }; |
306 | EXPORT_SYMBOL(coherent_swiotlb_dma_ops); | ||
307 | |||
308 | extern int swiotlb_late_init_with_default_size(size_t default_size); | ||
95 | 309 | ||
96 | void __init arm64_swiotlb_init(void) | 310 | static int __init swiotlb_late_init(void) |
97 | { | 311 | { |
98 | dma_ops = &arm64_swiotlb_dma_ops; | 312 | size_t swiotlb_size = min(SZ_64M, MAX_ORDER_NR_PAGES << PAGE_SHIFT); |
99 | swiotlb_init(1); | 313 | |
314 | dma_ops = &coherent_swiotlb_dma_ops; | ||
315 | |||
316 | return swiotlb_late_init_with_default_size(swiotlb_size); | ||
100 | } | 317 | } |
318 | subsys_initcall(swiotlb_late_init); | ||
101 | 319 | ||
102 | #define PREALLOC_DMA_DEBUG_ENTRIES 4096 | 320 | #define PREALLOC_DMA_DEBUG_ENTRIES 4096 |
103 | 321 | ||
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index d0b4c2efda90..88627c450a6c 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/memblock.h> | 30 | #include <linux/memblock.h> |
31 | #include <linux/sort.h> | 31 | #include <linux/sort.h> |
32 | #include <linux/of_fdt.h> | 32 | #include <linux/of_fdt.h> |
33 | #include <linux/dma-mapping.h> | ||
33 | #include <linux/dma-contiguous.h> | 34 | #include <linux/dma-contiguous.h> |
34 | 35 | ||
35 | #include <asm/sections.h> | 36 | #include <asm/sections.h> |
@@ -59,22 +60,22 @@ static int __init early_initrd(char *p) | |||
59 | early_param("initrd", early_initrd); | 60 | early_param("initrd", early_initrd); |
60 | #endif | 61 | #endif |
61 | 62 | ||
62 | #define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) | ||
63 | |||
64 | static void __init zone_sizes_init(unsigned long min, unsigned long max) | 63 | static void __init zone_sizes_init(unsigned long min, unsigned long max) |
65 | { | 64 | { |
66 | struct memblock_region *reg; | 65 | struct memblock_region *reg; |
67 | unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES]; | 66 | unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES]; |
68 | unsigned long max_dma32 = min; | 67 | unsigned long max_dma = min; |
69 | 68 | ||
70 | memset(zone_size, 0, sizeof(zone_size)); | 69 | memset(zone_size, 0, sizeof(zone_size)); |
71 | 70 | ||
72 | #ifdef CONFIG_ZONE_DMA32 | ||
73 | /* 4GB maximum for 32-bit only capable devices */ | 71 | /* 4GB maximum for 32-bit only capable devices */ |
74 | max_dma32 = max(min, min(max, MAX_DMA32_PFN)); | 72 | if (IS_ENABLED(CONFIG_ZONE_DMA)) { |
75 | zone_size[ZONE_DMA32] = max_dma32 - min; | 73 | unsigned long max_dma_phys = |
76 | #endif | 74 | (unsigned long)dma_to_phys(NULL, DMA_BIT_MASK(32) + 1); |
77 | zone_size[ZONE_NORMAL] = max - max_dma32; | 75 | max_dma = max(min, min(max, max_dma_phys >> PAGE_SHIFT)); |
76 | zone_size[ZONE_DMA] = max_dma - min; | ||
77 | } | ||
78 | zone_size[ZONE_NORMAL] = max - max_dma; | ||
78 | 79 | ||
79 | memcpy(zhole_size, zone_size, sizeof(zhole_size)); | 80 | memcpy(zhole_size, zone_size, sizeof(zhole_size)); |
80 | 81 | ||
@@ -84,15 +85,15 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) | |||
84 | 85 | ||
85 | if (start >= max) | 86 | if (start >= max) |
86 | continue; | 87 | continue; |
87 | #ifdef CONFIG_ZONE_DMA32 | 88 | |
88 | if (start < max_dma32) { | 89 | if (IS_ENABLED(CONFIG_ZONE_DMA) && start < max_dma) { |
89 | unsigned long dma_end = min(end, max_dma32); | 90 | unsigned long dma_end = min(end, max_dma); |
90 | zhole_size[ZONE_DMA32] -= dma_end - start; | 91 | zhole_size[ZONE_DMA] -= dma_end - start; |
91 | } | 92 | } |
92 | #endif | 93 | |
93 | if (end > max_dma32) { | 94 | if (end > max_dma) { |
94 | unsigned long normal_end = min(end, max); | 95 | unsigned long normal_end = min(end, max); |
95 | unsigned long normal_start = max(start, max_dma32); | 96 | unsigned long normal_start = max(start, max_dma); |
96 | zhole_size[ZONE_NORMAL] -= normal_end - normal_start; | 97 | zhole_size[ZONE_NORMAL] -= normal_end - normal_start; |
97 | } | 98 | } |
98 | } | 99 | } |
@@ -261,8 +262,6 @@ static void __init free_unused_memmap(void) | |||
261 | */ | 262 | */ |
262 | void __init mem_init(void) | 263 | void __init mem_init(void) |
263 | { | 264 | { |
264 | arm64_swiotlb_init(); | ||
265 | |||
266 | max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; | 265 | max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map; |
267 | 266 | ||
268 | #ifndef CONFIG_SPARSEMEM_VMEMMAP | 267 | #ifndef CONFIG_SPARSEMEM_VMEMMAP |
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 1333e6f9a8e5..e085ee6ef4e2 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S | |||
@@ -173,12 +173,6 @@ ENDPROC(cpu_do_switch_mm) | |||
173 | * value of the SCTLR_EL1 register. | 173 | * value of the SCTLR_EL1 register. |
174 | */ | 174 | */ |
175 | ENTRY(__cpu_setup) | 175 | ENTRY(__cpu_setup) |
176 | /* | ||
177 | * Preserve the link register across the function call. | ||
178 | */ | ||
179 | mov x28, lr | ||
180 | bl __flush_dcache_all | ||
181 | mov lr, x28 | ||
182 | ic iallu // I+BTB cache invalidate | 176 | ic iallu // I+BTB cache invalidate |
183 | tlbi vmalle1is // invalidate I + D TLBs | 177 | tlbi vmalle1is // invalidate I + D TLBs |
184 | dsb sy | 178 | dsb sy |
@@ -215,8 +209,14 @@ ENTRY(__cpu_setup) | |||
215 | * Set/prepare TCR and TTBR. We use 512GB (39-bit) address range for | 209 | * Set/prepare TCR and TTBR. We use 512GB (39-bit) address range for |
216 | * both user and kernel. | 210 | * both user and kernel. |
217 | */ | 211 | */ |
218 | ldr x10, =TCR_TxSZ(VA_BITS) | TCR_FLAGS | TCR_IPS_40BIT | \ | 212 | ldr x10, =TCR_TxSZ(VA_BITS) | TCR_FLAGS | \ |
219 | TCR_ASID16 | TCR_TBI0 | (1 << 31) | 213 | TCR_ASID16 | TCR_TBI0 | (1 << 31) |
214 | /* | ||
215 | * Read the PARange bits from ID_AA64MMFR0_EL1 and set the IPS bits in | ||
216 | * TCR_EL1. | ||
217 | */ | ||
218 | mrs x9, ID_AA64MMFR0_EL1 | ||
219 | bfi x10, x9, #32, #3 | ||
220 | #ifdef CONFIG_ARM64_64K_PAGES | 220 | #ifdef CONFIG_ARM64_64K_PAGES |
221 | orr x10, x10, TCR_TG0_64K | 221 | orr x10, x10, TCR_TG0_64K |
222 | orr x10, x10, TCR_TG1_64K | 222 | orr x10, x10, TCR_TG1_64K |
diff --git a/arch/avr32/include/asm/bugs.h b/arch/avr32/include/asm/bugs.h index 7635e770622e..278661bbd1b0 100644 --- a/arch/avr32/include/asm/bugs.h +++ b/arch/avr32/include/asm/bugs.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | static void __init check_bugs(void) | 10 | static void __init check_bugs(void) |
11 | { | 11 | { |
12 | cpu_data->loops_per_jiffy = loops_per_jiffy; | 12 | boot_cpu_data.loops_per_jiffy = loops_per_jiffy; |
13 | } | 13 | } |
14 | 14 | ||
15 | #endif /* __ASM_AVR32_BUGS_H */ | 15 | #endif /* __ASM_AVR32_BUGS_H */ |
diff --git a/arch/avr32/include/asm/processor.h b/arch/avr32/include/asm/processor.h index 48d71c5c898a..972adcc1e8f4 100644 --- a/arch/avr32/include/asm/processor.h +++ b/arch/avr32/include/asm/processor.h | |||
@@ -83,13 +83,8 @@ static inline unsigned int avr32_get_chip_revision(struct avr32_cpuinfo *cpu) | |||
83 | 83 | ||
84 | extern struct avr32_cpuinfo boot_cpu_data; | 84 | extern struct avr32_cpuinfo boot_cpu_data; |
85 | 85 | ||
86 | #ifdef CONFIG_SMP | 86 | /* No SMP support so far */ |
87 | extern struct avr32_cpuinfo cpu_data[]; | ||
88 | #define current_cpu_data cpu_data[smp_processor_id()] | ||
89 | #else | ||
90 | #define cpu_data (&boot_cpu_data) | ||
91 | #define current_cpu_data boot_cpu_data | 87 | #define current_cpu_data boot_cpu_data |
92 | #endif | ||
93 | 88 | ||
94 | /* This decides where the kernel will search for a free chunk of vm | 89 | /* This decides where the kernel will search for a free chunk of vm |
95 | * space during mmap's | 90 | * space during mmap's |
diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c index 2233be71e2e8..0341ae27c9ec 100644 --- a/arch/avr32/kernel/cpu.c +++ b/arch/avr32/kernel/cpu.c | |||
@@ -39,10 +39,12 @@ static ssize_t store_pc0event(struct device *dev, | |||
39 | size_t count) | 39 | size_t count) |
40 | { | 40 | { |
41 | unsigned long val; | 41 | unsigned long val; |
42 | char *endp; | 42 | int ret; |
43 | 43 | ||
44 | val = simple_strtoul(buf, &endp, 0); | 44 | ret = kstrtoul(buf, 0, &val); |
45 | if (endp == buf || val > 0x3f) | 45 | if (ret) |
46 | return ret; | ||
47 | if (val > 0x3f) | ||
46 | return -EINVAL; | 48 | return -EINVAL; |
47 | val = (val << 12) | (sysreg_read(PCCR) & 0xfffc0fff); | 49 | val = (val << 12) | (sysreg_read(PCCR) & 0xfffc0fff); |
48 | sysreg_write(PCCR, val); | 50 | sysreg_write(PCCR, val); |
@@ -61,11 +63,11 @@ static ssize_t store_pc0count(struct device *dev, | |||
61 | const char *buf, size_t count) | 63 | const char *buf, size_t count) |
62 | { | 64 | { |
63 | unsigned long val; | 65 | unsigned long val; |
64 | char *endp; | 66 | int ret; |
65 | 67 | ||
66 | val = simple_strtoul(buf, &endp, 0); | 68 | ret = kstrtoul(buf, 0, &val); |
67 | if (endp == buf) | 69 | if (ret) |
68 | return -EINVAL; | 70 | return ret; |
69 | sysreg_write(PCNT0, val); | 71 | sysreg_write(PCNT0, val); |
70 | 72 | ||
71 | return count; | 73 | return count; |
@@ -84,10 +86,12 @@ static ssize_t store_pc1event(struct device *dev, | |||
84 | size_t count) | 86 | size_t count) |
85 | { | 87 | { |
86 | unsigned long val; | 88 | unsigned long val; |
87 | char *endp; | 89 | int ret; |
88 | 90 | ||
89 | val = simple_strtoul(buf, &endp, 0); | 91 | ret = kstrtoul(buf, 0, &val); |
90 | if (endp == buf || val > 0x3f) | 92 | if (ret) |
93 | return ret; | ||
94 | if (val > 0x3f) | ||
91 | return -EINVAL; | 95 | return -EINVAL; |
92 | val = (val << 18) | (sysreg_read(PCCR) & 0xff03ffff); | 96 | val = (val << 18) | (sysreg_read(PCCR) & 0xff03ffff); |
93 | sysreg_write(PCCR, val); | 97 | sysreg_write(PCCR, val); |
@@ -106,11 +110,11 @@ static ssize_t store_pc1count(struct device *dev, | |||
106 | size_t count) | 110 | size_t count) |
107 | { | 111 | { |
108 | unsigned long val; | 112 | unsigned long val; |
109 | char *endp; | 113 | int ret; |
110 | 114 | ||
111 | val = simple_strtoul(buf, &endp, 0); | 115 | ret = kstrtoul(buf, 0, &val); |
112 | if (endp == buf) | 116 | if (ret) |
113 | return -EINVAL; | 117 | return ret; |
114 | sysreg_write(PCNT1, val); | 118 | sysreg_write(PCNT1, val); |
115 | 119 | ||
116 | return count; | 120 | return count; |
@@ -129,11 +133,11 @@ static ssize_t store_pccycles(struct device *dev, | |||
129 | size_t count) | 133 | size_t count) |
130 | { | 134 | { |
131 | unsigned long val; | 135 | unsigned long val; |
132 | char *endp; | 136 | int ret; |
133 | 137 | ||
134 | val = simple_strtoul(buf, &endp, 0); | 138 | ret = kstrtoul(buf, 0, &val); |
135 | if (endp == buf) | 139 | if (ret) |
136 | return -EINVAL; | 140 | return ret; |
137 | sysreg_write(PCCNT, val); | 141 | sysreg_write(PCCNT, val); |
138 | 142 | ||
139 | return count; | 143 | return count; |
@@ -152,11 +156,11 @@ static ssize_t store_pcenable(struct device *dev, | |||
152 | size_t count) | 156 | size_t count) |
153 | { | 157 | { |
154 | unsigned long pccr, val; | 158 | unsigned long pccr, val; |
155 | char *endp; | 159 | int ret; |
156 | 160 | ||
157 | val = simple_strtoul(buf, &endp, 0); | 161 | ret = kstrtoul(buf, 0, &val); |
158 | if (endp == buf) | 162 | if (ret) |
159 | return -EINVAL; | 163 | return ret; |
160 | if (val) | 164 | if (val) |
161 | val = 1; | 165 | val = 1; |
162 | 166 | ||
diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c index 6a46ecd56cfd..85d635cd7b28 100644 --- a/arch/avr32/mm/cache.c +++ b/arch/avr32/mm/cache.c | |||
@@ -111,6 +111,7 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
111 | __flush_icache_range(start & ~(linesz - 1), | 111 | __flush_icache_range(start & ~(linesz - 1), |
112 | (end + linesz - 1) & ~(linesz - 1)); | 112 | (end + linesz - 1) & ~(linesz - 1)); |
113 | } | 113 | } |
114 | EXPORT_SYMBOL(flush_icache_range); | ||
114 | 115 | ||
115 | /* | 116 | /* |
116 | * This one is called from __do_fault() and do_swap_page(). | 117 | * This one is called from __do_fault() and do_swap_page(). |
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index 056027f38351..afff5105909d 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild | |||
@@ -5,6 +5,7 @@ header-y += arch-v32/ | |||
5 | 5 | ||
6 | generic-y += barrier.h | 6 | generic-y += barrier.h |
7 | generic-y += clkdev.h | 7 | generic-y += clkdev.h |
8 | generic-y += cputime.h | ||
8 | generic-y += exec.h | 9 | generic-y += exec.h |
9 | generic-y += hash.h | 10 | generic-y += hash.h |
10 | generic-y += kvm_para.h | 11 | generic-y += kvm_para.h |
diff --git a/arch/cris/include/asm/cputime.h b/arch/cris/include/asm/cputime.h deleted file mode 100644 index 4446a65656fa..000000000000 --- a/arch/cris/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __CRIS_CPUTIME_H | ||
2 | #define __CRIS_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __CRIS_CPUTIME_H */ | ||
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index babb9338ebf8..87b95eb8aee5 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += cputime.h | ||
3 | generic-y += exec.h | 4 | generic-y += exec.h |
4 | generic-y += hash.h | 5 | generic-y += hash.h |
5 | generic-y += mcs_spinlock.h | 6 | generic-y += mcs_spinlock.h |
diff --git a/arch/frv/include/asm/cputime.h b/arch/frv/include/asm/cputime.h deleted file mode 100644 index f6c373ad2b80..000000000000 --- a/arch/frv/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_CPUTIME_H | ||
2 | #define _ASM_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* _ASM_CPUTIME_H */ | ||
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig index efbd2929aeb7..6404acbb84b2 100644 --- a/arch/ia64/configs/generic_defconfig +++ b/arch/ia64/configs/generic_defconfig | |||
@@ -30,9 +30,9 @@ CONFIG_ACPI_BUTTON=m | |||
30 | CONFIG_ACPI_FAN=m | 30 | CONFIG_ACPI_FAN=m |
31 | CONFIG_ACPI_DOCK=y | 31 | CONFIG_ACPI_DOCK=y |
32 | CONFIG_ACPI_PROCESSOR=m | 32 | CONFIG_ACPI_PROCESSOR=m |
33 | CONFIG_ACPI_CONTAINER=m | 33 | CONFIG_ACPI_CONTAINER=y |
34 | CONFIG_HOTPLUG_PCI=y | 34 | CONFIG_HOTPLUG_PCI=y |
35 | CONFIG_HOTPLUG_PCI_ACPI=m | 35 | CONFIG_HOTPLUG_PCI_ACPI=y |
36 | CONFIG_PACKET=y | 36 | CONFIG_PACKET=y |
37 | CONFIG_UNIX=y | 37 | CONFIG_UNIX=y |
38 | CONFIG_INET=y | 38 | CONFIG_INET=y |
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 8e858b593e4f..30c43d39dede 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
@@ -1596,7 +1596,7 @@ static void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist, | |||
1596 | * | 1596 | * |
1597 | ***************************************************************/ | 1597 | ***************************************************************/ |
1598 | 1598 | ||
1599 | static void __init | 1599 | static void |
1600 | ioc_iova_init(struct ioc *ioc) | 1600 | ioc_iova_init(struct ioc *ioc) |
1601 | { | 1601 | { |
1602 | int tcnfg; | 1602 | int tcnfg; |
@@ -1807,7 +1807,7 @@ static struct ioc_iommu ioc_iommu_info[] __initdata = { | |||
1807 | { SX2000_IOC_ID, "sx2000", NULL }, | 1807 | { SX2000_IOC_ID, "sx2000", NULL }, |
1808 | }; | 1808 | }; |
1809 | 1809 | ||
1810 | static struct ioc * __init | 1810 | static struct ioc * |
1811 | ioc_init(unsigned long hpa, void *handle) | 1811 | ioc_init(unsigned long hpa, void *handle) |
1812 | { | 1812 | { |
1813 | struct ioc *ioc; | 1813 | struct ioc *ioc; |
@@ -2041,7 +2041,7 @@ sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle) | |||
2041 | #define sba_map_ioc_to_node(ioc, handle) | 2041 | #define sba_map_ioc_to_node(ioc, handle) |
2042 | #endif | 2042 | #endif |
2043 | 2043 | ||
2044 | static int __init | 2044 | static int |
2045 | acpi_sba_ioc_add(struct acpi_device *device, | 2045 | acpi_sba_ioc_add(struct acpi_device *device, |
2046 | const struct acpi_device_id *not_used) | 2046 | const struct acpi_device_id *not_used) |
2047 | { | 2047 | { |
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 1034884b77da..0884f5ecbcc3 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -364,7 +364,6 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id) | |||
364 | 364 | ||
365 | static struct irqaction irq_move_irqaction = { | 365 | static struct irqaction irq_move_irqaction = { |
366 | .handler = smp_irq_move_cleanup_interrupt, | 366 | .handler = smp_irq_move_cleanup_interrupt, |
367 | .flags = IRQF_DISABLED, | ||
368 | .name = "irq_move" | 367 | .name = "irq_move" |
369 | }; | 368 | }; |
370 | 369 | ||
@@ -489,14 +488,13 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) | |||
489 | ia64_srlz_d(); | 488 | ia64_srlz_d(); |
490 | while (vector != IA64_SPURIOUS_INT_VECTOR) { | 489 | while (vector != IA64_SPURIOUS_INT_VECTOR) { |
491 | int irq = local_vector_to_irq(vector); | 490 | int irq = local_vector_to_irq(vector); |
492 | struct irq_desc *desc = irq_to_desc(irq); | ||
493 | 491 | ||
494 | if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { | 492 | if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { |
495 | smp_local_flush_tlb(); | 493 | smp_local_flush_tlb(); |
496 | kstat_incr_irqs_this_cpu(irq, desc); | 494 | kstat_incr_irq_this_cpu(irq); |
497 | } else if (unlikely(IS_RESCHEDULE(vector))) { | 495 | } else if (unlikely(IS_RESCHEDULE(vector))) { |
498 | scheduler_ipi(); | 496 | scheduler_ipi(); |
499 | kstat_incr_irqs_this_cpu(irq, desc); | 497 | kstat_incr_irq_this_cpu(irq); |
500 | } else { | 498 | } else { |
501 | ia64_setreg(_IA64_REG_CR_TPR, vector); | 499 | ia64_setreg(_IA64_REG_CR_TPR, vector); |
502 | ia64_srlz_d(); | 500 | ia64_srlz_d(); |
@@ -549,13 +547,12 @@ void ia64_process_pending_intr(void) | |||
549 | */ | 547 | */ |
550 | while (vector != IA64_SPURIOUS_INT_VECTOR) { | 548 | while (vector != IA64_SPURIOUS_INT_VECTOR) { |
551 | int irq = local_vector_to_irq(vector); | 549 | int irq = local_vector_to_irq(vector); |
552 | struct irq_desc *desc = irq_to_desc(irq); | ||
553 | 550 | ||
554 | if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { | 551 | if (unlikely(IS_LOCAL_TLB_FLUSH(vector))) { |
555 | smp_local_flush_tlb(); | 552 | smp_local_flush_tlb(); |
556 | kstat_incr_irqs_this_cpu(irq, desc); | 553 | kstat_incr_irq_this_cpu(irq); |
557 | } else if (unlikely(IS_RESCHEDULE(vector))) { | 554 | } else if (unlikely(IS_RESCHEDULE(vector))) { |
558 | kstat_incr_irqs_this_cpu(irq, desc); | 555 | kstat_incr_irq_this_cpu(irq); |
559 | } else { | 556 | } else { |
560 | struct pt_regs *old_regs = set_irq_regs(NULL); | 557 | struct pt_regs *old_regs = set_irq_regs(NULL); |
561 | 558 | ||
@@ -602,7 +599,6 @@ static irqreturn_t dummy_handler (int irq, void *dev_id) | |||
602 | 599 | ||
603 | static struct irqaction ipi_irqaction = { | 600 | static struct irqaction ipi_irqaction = { |
604 | .handler = handle_IPI, | 601 | .handler = handle_IPI, |
605 | .flags = IRQF_DISABLED, | ||
606 | .name = "IPI" | 602 | .name = "IPI" |
607 | }; | 603 | }; |
608 | 604 | ||
@@ -611,13 +607,11 @@ static struct irqaction ipi_irqaction = { | |||
611 | */ | 607 | */ |
612 | static struct irqaction resched_irqaction = { | 608 | static struct irqaction resched_irqaction = { |
613 | .handler = dummy_handler, | 609 | .handler = dummy_handler, |
614 | .flags = IRQF_DISABLED, | ||
615 | .name = "resched" | 610 | .name = "resched" |
616 | }; | 611 | }; |
617 | 612 | ||
618 | static struct irqaction tlb_irqaction = { | 613 | static struct irqaction tlb_irqaction = { |
619 | .handler = dummy_handler, | 614 | .handler = dummy_handler, |
620 | .flags = IRQF_DISABLED, | ||
621 | .name = "tlb_flush" | 615 | .name = "tlb_flush" |
622 | }; | 616 | }; |
623 | 617 | ||
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index b8edfa75a83f..db7b36bb068b 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -217,7 +217,7 @@ void ia64_mca_printk(const char *fmt, ...) | |||
217 | /* Copy the output into mlogbuf */ | 217 | /* Copy the output into mlogbuf */ |
218 | if (oops_in_progress) { | 218 | if (oops_in_progress) { |
219 | /* mlogbuf was abandoned, use printk directly instead. */ | 219 | /* mlogbuf was abandoned, use printk directly instead. */ |
220 | printk(temp_buf); | 220 | printk("%s", temp_buf); |
221 | } else { | 221 | } else { |
222 | spin_lock(&mlogbuf_wlock); | 222 | spin_lock(&mlogbuf_wlock); |
223 | for (p = temp_buf; *p; p++) { | 223 | for (p = temp_buf; *p; p++) { |
@@ -268,7 +268,7 @@ void ia64_mlogbuf_dump(void) | |||
268 | } | 268 | } |
269 | *p = '\0'; | 269 | *p = '\0'; |
270 | if (temp_buf[0]) | 270 | if (temp_buf[0]) |
271 | printk(temp_buf); | 271 | printk("%s", temp_buf); |
272 | mlogbuf_start = index; | 272 | mlogbuf_start = index; |
273 | 273 | ||
274 | mlogbuf_timestamp = 0; | 274 | mlogbuf_timestamp = 0; |
@@ -1772,38 +1772,32 @@ __setup("disable_cpe_poll", ia64_mca_disable_cpe_polling); | |||
1772 | 1772 | ||
1773 | static struct irqaction cmci_irqaction = { | 1773 | static struct irqaction cmci_irqaction = { |
1774 | .handler = ia64_mca_cmc_int_handler, | 1774 | .handler = ia64_mca_cmc_int_handler, |
1775 | .flags = IRQF_DISABLED, | ||
1776 | .name = "cmc_hndlr" | 1775 | .name = "cmc_hndlr" |
1777 | }; | 1776 | }; |
1778 | 1777 | ||
1779 | static struct irqaction cmcp_irqaction = { | 1778 | static struct irqaction cmcp_irqaction = { |
1780 | .handler = ia64_mca_cmc_int_caller, | 1779 | .handler = ia64_mca_cmc_int_caller, |
1781 | .flags = IRQF_DISABLED, | ||
1782 | .name = "cmc_poll" | 1780 | .name = "cmc_poll" |
1783 | }; | 1781 | }; |
1784 | 1782 | ||
1785 | static struct irqaction mca_rdzv_irqaction = { | 1783 | static struct irqaction mca_rdzv_irqaction = { |
1786 | .handler = ia64_mca_rendez_int_handler, | 1784 | .handler = ia64_mca_rendez_int_handler, |
1787 | .flags = IRQF_DISABLED, | ||
1788 | .name = "mca_rdzv" | 1785 | .name = "mca_rdzv" |
1789 | }; | 1786 | }; |
1790 | 1787 | ||
1791 | static struct irqaction mca_wkup_irqaction = { | 1788 | static struct irqaction mca_wkup_irqaction = { |
1792 | .handler = ia64_mca_wakeup_int_handler, | 1789 | .handler = ia64_mca_wakeup_int_handler, |
1793 | .flags = IRQF_DISABLED, | ||
1794 | .name = "mca_wkup" | 1790 | .name = "mca_wkup" |
1795 | }; | 1791 | }; |
1796 | 1792 | ||
1797 | #ifdef CONFIG_ACPI | 1793 | #ifdef CONFIG_ACPI |
1798 | static struct irqaction mca_cpe_irqaction = { | 1794 | static struct irqaction mca_cpe_irqaction = { |
1799 | .handler = ia64_mca_cpe_int_handler, | 1795 | .handler = ia64_mca_cpe_int_handler, |
1800 | .flags = IRQF_DISABLED, | ||
1801 | .name = "cpe_hndlr" | 1796 | .name = "cpe_hndlr" |
1802 | }; | 1797 | }; |
1803 | 1798 | ||
1804 | static struct irqaction mca_cpep_irqaction = { | 1799 | static struct irqaction mca_cpep_irqaction = { |
1805 | .handler = ia64_mca_cpe_int_caller, | 1800 | .handler = ia64_mca_cpe_int_caller, |
1806 | .flags = IRQF_DISABLED, | ||
1807 | .name = "cpe_poll" | 1801 | .name = "cpe_poll" |
1808 | }; | 1802 | }; |
1809 | #endif /* CONFIG_ACPI */ | 1803 | #endif /* CONFIG_ACPI */ |
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index fb2f1e622877..c430f9198d1b 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c | |||
@@ -17,12 +17,9 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata, | |||
17 | { | 17 | { |
18 | struct msi_msg msg; | 18 | struct msi_msg msg; |
19 | u32 addr, data; | 19 | u32 addr, data; |
20 | int cpu = first_cpu(*cpu_mask); | 20 | int cpu = cpumask_first_and(cpu_mask, cpu_online_mask); |
21 | unsigned int irq = idata->irq; | 21 | unsigned int irq = idata->irq; |
22 | 22 | ||
23 | if (!cpu_online(cpu)) | ||
24 | return -1; | ||
25 | |||
26 | if (irq_prepare_move(irq, cpu)) | 23 | if (irq_prepare_move(irq, cpu)) |
27 | return -1; | 24 | return -1; |
28 | 25 | ||
@@ -139,10 +136,7 @@ static int dmar_msi_set_affinity(struct irq_data *data, | |||
139 | unsigned int irq = data->irq; | 136 | unsigned int irq = data->irq; |
140 | struct irq_cfg *cfg = irq_cfg + irq; | 137 | struct irq_cfg *cfg = irq_cfg + irq; |
141 | struct msi_msg msg; | 138 | struct msi_msg msg; |
142 | int cpu = cpumask_first(mask); | 139 | int cpu = cpumask_first_and(mask, cpu_online_mask); |
143 | |||
144 | if (!cpu_online(cpu)) | ||
145 | return -1; | ||
146 | 140 | ||
147 | if (irq_prepare_move(irq, cpu)) | 141 | if (irq_prepare_move(irq, cpu)) |
148 | return -1; | 142 | return -1; |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index cb592773c78b..d841c4bd6864 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -6387,7 +6387,6 @@ pfm_flush_pmds(struct task_struct *task, pfm_context_t *ctx) | |||
6387 | 6387 | ||
6388 | static struct irqaction perfmon_irqaction = { | 6388 | static struct irqaction perfmon_irqaction = { |
6389 | .handler = pfm_interrupt_handler, | 6389 | .handler = pfm_interrupt_handler, |
6390 | .flags = IRQF_DISABLED, | ||
6391 | .name = "perfmon" | 6390 | .name = "perfmon" |
6392 | }; | 6391 | }; |
6393 | 6392 | ||
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index fbaac1afb844..71c52bc7c28d 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -380,7 +380,7 @@ static cycle_t itc_get_cycles(struct clocksource *cs) | |||
380 | 380 | ||
381 | static struct irqaction timer_irqaction = { | 381 | static struct irqaction timer_irqaction = { |
382 | .handler = timer_interrupt, | 382 | .handler = timer_interrupt, |
383 | .flags = IRQF_DISABLED | IRQF_IRQPOLL, | 383 | .flags = IRQF_IRQPOLL, |
384 | .name = "timer" | 384 | .name = "timer" |
385 | }; | 385 | }; |
386 | 386 | ||
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 62cf4dde6a04..85d095154902 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -209,8 +209,8 @@ static int sn_set_affinity_irq(struct irq_data *data, | |||
209 | nasid_t nasid; | 209 | nasid_t nasid; |
210 | int slice; | 210 | int slice; |
211 | 211 | ||
212 | nasid = cpuid_to_nasid(cpumask_first(mask)); | 212 | nasid = cpuid_to_nasid(cpumask_first_and(mask, cpu_online_mask)); |
213 | slice = cpuid_to_slice(cpumask_first(mask)); | 213 | slice = cpuid_to_slice(cpumask_first_and(mask, cpu_online_mask)); |
214 | 214 | ||
215 | list_for_each_entry_safe(sn_irq_info, sn_irq_info_safe, | 215 | list_for_each_entry_safe(sn_irq_info, sn_irq_info_safe, |
216 | sn_irq_lh[irq], list) | 216 | sn_irq_lh[irq], list) |
diff --git a/arch/ia64/sn/kernel/msi_sn.c b/arch/ia64/sn/kernel/msi_sn.c index 2b98b9e088de..afc58d2799ad 100644 --- a/arch/ia64/sn/kernel/msi_sn.c +++ b/arch/ia64/sn/kernel/msi_sn.c | |||
@@ -166,7 +166,7 @@ static int sn_set_msi_irq_affinity(struct irq_data *data, | |||
166 | struct sn_pcibus_provider *provider; | 166 | struct sn_pcibus_provider *provider; |
167 | unsigned int cpu, irq = data->irq; | 167 | unsigned int cpu, irq = data->irq; |
168 | 168 | ||
169 | cpu = cpumask_first(cpu_mask); | 169 | cpu = cpumask_first_and(cpu_mask, cpu_online_mask); |
170 | sn_irq_info = sn_msi_info[irq].sn_irq_info; | 170 | sn_irq_info = sn_msi_info[irq].sn_irq_info; |
171 | if (sn_irq_info == NULL || sn_irq_info->irq_int_bit >= 0) | 171 | if (sn_irq_info == NULL || sn_irq_info->irq_int_bit >= 0) |
172 | return -1; | 172 | return -1; |
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index 5825a35b2c56..67779a74b62d 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += cputime.h | ||
3 | generic-y += exec.h | 4 | generic-y += exec.h |
4 | generic-y += hash.h | 5 | generic-y += hash.h |
5 | generic-y += mcs_spinlock.h | 6 | generic-y += mcs_spinlock.h |
diff --git a/arch/m32r/include/asm/cputime.h b/arch/m32r/include/asm/cputime.h deleted file mode 100644 index 0a47550df2b7..000000000000 --- a/arch/m32r/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __M32R_CPUTIME_H | ||
2 | #define __M32R_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __M32R_CPUTIME_H */ | ||
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c index 18c0e29976e3..2081b8cd5591 100644 --- a/arch/m68k/amiga/cia.c +++ b/arch/m68k/amiga/cia.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/irq.h> | ||
21 | 22 | ||
22 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
23 | #include <asm/amigahw.h> | 24 | #include <asm/amigahw.h> |
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 3e73a63c066f..3d2b63bedf05 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/seq_file.h> | 42 | #include <linux/seq_file.h> |
43 | #include <linux/module.h> | 43 | #include <linux/module.h> |
44 | #include <linux/irq.h> | ||
44 | 45 | ||
45 | #include <asm/traps.h> | 46 | #include <asm/traps.h> |
46 | 47 | ||
diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig index 559ff3af8ff7..96da4963d14b 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_defconfig | |||
@@ -24,6 +24,8 @@ CONFIG_SUN_PARTITION=y | |||
24 | # CONFIG_EFI_PARTITION is not set | 24 | # CONFIG_EFI_PARTITION is not set |
25 | CONFIG_SYSV68_PARTITION=y | 25 | CONFIG_SYSV68_PARTITION=y |
26 | CONFIG_IOSCHED_DEADLINE=m | 26 | CONFIG_IOSCHED_DEADLINE=m |
27 | CONFIG_KEXEC=y | ||
28 | CONFIG_BOOTINFO_PROC=y | ||
27 | CONFIG_M68020=y | 29 | CONFIG_M68020=y |
28 | CONFIG_M68030=y | 30 | CONFIG_M68030=y |
29 | CONFIG_M68040=y | 31 | CONFIG_M68040=y |
@@ -85,6 +87,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
85 | CONFIG_NF_CONNTRACK_SIP=m | 87 | CONFIG_NF_CONNTRACK_SIP=m |
86 | CONFIG_NF_CONNTRACK_TFTP=m | 88 | CONFIG_NF_CONNTRACK_TFTP=m |
87 | CONFIG_NF_TABLES=m | 89 | CONFIG_NF_TABLES=m |
90 | CONFIG_NF_TABLES_INET=m | ||
88 | CONFIG_NFT_EXTHDR=m | 91 | CONFIG_NFT_EXTHDR=m |
89 | CONFIG_NFT_META=m | 92 | CONFIG_NFT_META=m |
90 | CONFIG_NFT_CT=m | 93 | CONFIG_NFT_CT=m |
@@ -94,6 +97,8 @@ CONFIG_NFT_COUNTER=m | |||
94 | CONFIG_NFT_LOG=m | 97 | CONFIG_NFT_LOG=m |
95 | CONFIG_NFT_LIMIT=m | 98 | CONFIG_NFT_LIMIT=m |
96 | CONFIG_NFT_NAT=m | 99 | CONFIG_NFT_NAT=m |
100 | CONFIG_NFT_QUEUE=m | ||
101 | CONFIG_NFT_REJECT=m | ||
97 | CONFIG_NFT_COMPAT=m | 102 | CONFIG_NFT_COMPAT=m |
98 | CONFIG_NETFILTER_XT_SET=m | 103 | CONFIG_NETFILTER_XT_SET=m |
99 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 104 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -126,6 +131,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
126 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 131 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
127 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 132 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
128 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 133 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
134 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
129 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 135 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
130 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 136 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
131 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 137 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -163,8 +169,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
163 | CONFIG_IP_SET_HASH_NETIFACE=m | 169 | CONFIG_IP_SET_HASH_NETIFACE=m |
164 | CONFIG_IP_SET_LIST_SET=m | 170 | CONFIG_IP_SET_LIST_SET=m |
165 | CONFIG_NF_CONNTRACK_IPV4=m | 171 | CONFIG_NF_CONNTRACK_IPV4=m |
166 | CONFIG_NF_TABLES_IPV4=m | ||
167 | CONFIG_NFT_REJECT_IPV4=m | ||
168 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 172 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
169 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 173 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
170 | CONFIG_NF_TABLES_ARP=m | 174 | CONFIG_NF_TABLES_ARP=m |
@@ -190,7 +194,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
190 | CONFIG_IP_NF_ARPFILTER=m | 194 | CONFIG_IP_NF_ARPFILTER=m |
191 | CONFIG_IP_NF_ARP_MANGLE=m | 195 | CONFIG_IP_NF_ARP_MANGLE=m |
192 | CONFIG_NF_CONNTRACK_IPV6=m | 196 | CONFIG_NF_CONNTRACK_IPV6=m |
193 | CONFIG_NF_TABLES_IPV6=m | ||
194 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 197 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
195 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 198 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
196 | CONFIG_IP6_NF_IPTABLES=m | 199 | CONFIG_IP6_NF_IPTABLES=m |
@@ -512,7 +515,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
512 | CONFIG_CRYPTO_USER_API_HASH=m | 515 | CONFIG_CRYPTO_USER_API_HASH=m |
513 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 516 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
514 | # CONFIG_CRYPTO_HW is not set | 517 | # CONFIG_CRYPTO_HW is not set |
515 | CONFIG_CRC_T10DIF=y | ||
516 | CONFIG_XZ_DEC_X86=y | 518 | CONFIG_XZ_DEC_X86=y |
517 | CONFIG_XZ_DEC_POWERPC=y | 519 | CONFIG_XZ_DEC_POWERPC=y |
518 | CONFIG_XZ_DEC_IA64=y | 520 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig index cb1f55df69b6..1b8739f50cbf 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_defconfig | |||
@@ -25,6 +25,8 @@ CONFIG_SUN_PARTITION=y | |||
25 | # CONFIG_EFI_PARTITION is not set | 25 | # CONFIG_EFI_PARTITION is not set |
26 | CONFIG_SYSV68_PARTITION=y | 26 | CONFIG_SYSV68_PARTITION=y |
27 | CONFIG_IOSCHED_DEADLINE=m | 27 | CONFIG_IOSCHED_DEADLINE=m |
28 | CONFIG_KEXEC=y | ||
29 | CONFIG_BOOTINFO_PROC=y | ||
28 | CONFIG_M68020=y | 30 | CONFIG_M68020=y |
29 | CONFIG_M68030=y | 31 | CONFIG_M68030=y |
30 | CONFIG_M68040=y | 32 | CONFIG_M68040=y |
@@ -83,6 +85,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
83 | CONFIG_NF_CONNTRACK_SIP=m | 85 | CONFIG_NF_CONNTRACK_SIP=m |
84 | CONFIG_NF_CONNTRACK_TFTP=m | 86 | CONFIG_NF_CONNTRACK_TFTP=m |
85 | CONFIG_NF_TABLES=m | 87 | CONFIG_NF_TABLES=m |
88 | CONFIG_NF_TABLES_INET=m | ||
86 | CONFIG_NFT_EXTHDR=m | 89 | CONFIG_NFT_EXTHDR=m |
87 | CONFIG_NFT_META=m | 90 | CONFIG_NFT_META=m |
88 | CONFIG_NFT_CT=m | 91 | CONFIG_NFT_CT=m |
@@ -92,6 +95,8 @@ CONFIG_NFT_COUNTER=m | |||
92 | CONFIG_NFT_LOG=m | 95 | CONFIG_NFT_LOG=m |
93 | CONFIG_NFT_LIMIT=m | 96 | CONFIG_NFT_LIMIT=m |
94 | CONFIG_NFT_NAT=m | 97 | CONFIG_NFT_NAT=m |
98 | CONFIG_NFT_QUEUE=m | ||
99 | CONFIG_NFT_REJECT=m | ||
95 | CONFIG_NFT_COMPAT=m | 100 | CONFIG_NFT_COMPAT=m |
96 | CONFIG_NETFILTER_XT_SET=m | 101 | CONFIG_NETFILTER_XT_SET=m |
97 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 102 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -124,6 +129,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
124 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 129 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
125 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 130 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
126 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 131 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
132 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
127 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 133 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
128 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 134 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
129 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 135 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -161,8 +167,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
161 | CONFIG_IP_SET_HASH_NETIFACE=m | 167 | CONFIG_IP_SET_HASH_NETIFACE=m |
162 | CONFIG_IP_SET_LIST_SET=m | 168 | CONFIG_IP_SET_LIST_SET=m |
163 | CONFIG_NF_CONNTRACK_IPV4=m | 169 | CONFIG_NF_CONNTRACK_IPV4=m |
164 | CONFIG_NF_TABLES_IPV4=m | ||
165 | CONFIG_NFT_REJECT_IPV4=m | ||
166 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 170 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
167 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 171 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
168 | CONFIG_NF_TABLES_ARP=m | 172 | CONFIG_NF_TABLES_ARP=m |
@@ -188,7 +192,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
188 | CONFIG_IP_NF_ARPFILTER=m | 192 | CONFIG_IP_NF_ARPFILTER=m |
189 | CONFIG_IP_NF_ARP_MANGLE=m | 193 | CONFIG_IP_NF_ARP_MANGLE=m |
190 | CONFIG_NF_CONNTRACK_IPV6=m | 194 | CONFIG_NF_CONNTRACK_IPV6=m |
191 | CONFIG_NF_TABLES_IPV6=m | ||
192 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 195 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
193 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 196 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
194 | CONFIG_IP6_NF_IPTABLES=m | 197 | CONFIG_IP6_NF_IPTABLES=m |
@@ -470,7 +473,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
470 | CONFIG_CRYPTO_USER_API_HASH=m | 473 | CONFIG_CRYPTO_USER_API_HASH=m |
471 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 474 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
472 | # CONFIG_CRYPTO_HW is not set | 475 | # CONFIG_CRYPTO_HW is not set |
473 | CONFIG_CRC_T10DIF=y | ||
474 | CONFIG_XZ_DEC_X86=y | 476 | CONFIG_XZ_DEC_X86=y |
475 | CONFIG_XZ_DEC_POWERPC=y | 477 | CONFIG_XZ_DEC_POWERPC=y |
476 | CONFIG_XZ_DEC_IA64=y | 478 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig index e880cfbb62d9..6ea4e91f0caa 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_defconfig | |||
@@ -24,6 +24,8 @@ CONFIG_SUN_PARTITION=y | |||
24 | # CONFIG_EFI_PARTITION is not set | 24 | # CONFIG_EFI_PARTITION is not set |
25 | CONFIG_SYSV68_PARTITION=y | 25 | CONFIG_SYSV68_PARTITION=y |
26 | CONFIG_IOSCHED_DEADLINE=m | 26 | CONFIG_IOSCHED_DEADLINE=m |
27 | CONFIG_KEXEC=y | ||
28 | CONFIG_BOOTINFO_PROC=y | ||
27 | CONFIG_M68020=y | 29 | CONFIG_M68020=y |
28 | CONFIG_M68030=y | 30 | CONFIG_M68030=y |
29 | CONFIG_M68040=y | 31 | CONFIG_M68040=y |
@@ -82,6 +84,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
82 | CONFIG_NF_CONNTRACK_SIP=m | 84 | CONFIG_NF_CONNTRACK_SIP=m |
83 | CONFIG_NF_CONNTRACK_TFTP=m | 85 | CONFIG_NF_CONNTRACK_TFTP=m |
84 | CONFIG_NF_TABLES=m | 86 | CONFIG_NF_TABLES=m |
87 | CONFIG_NF_TABLES_INET=m | ||
85 | CONFIG_NFT_EXTHDR=m | 88 | CONFIG_NFT_EXTHDR=m |
86 | CONFIG_NFT_META=m | 89 | CONFIG_NFT_META=m |
87 | CONFIG_NFT_CT=m | 90 | CONFIG_NFT_CT=m |
@@ -91,6 +94,8 @@ CONFIG_NFT_COUNTER=m | |||
91 | CONFIG_NFT_LOG=m | 94 | CONFIG_NFT_LOG=m |
92 | CONFIG_NFT_LIMIT=m | 95 | CONFIG_NFT_LIMIT=m |
93 | CONFIG_NFT_NAT=m | 96 | CONFIG_NFT_NAT=m |
97 | CONFIG_NFT_QUEUE=m | ||
98 | CONFIG_NFT_REJECT=m | ||
94 | CONFIG_NFT_COMPAT=m | 99 | CONFIG_NFT_COMPAT=m |
95 | CONFIG_NETFILTER_XT_SET=m | 100 | CONFIG_NETFILTER_XT_SET=m |
96 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 101 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -123,6 +128,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
123 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 128 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
124 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 129 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
125 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 130 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
131 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
126 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 132 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
127 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 133 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
128 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 134 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -160,8 +166,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
160 | CONFIG_IP_SET_HASH_NETIFACE=m | 166 | CONFIG_IP_SET_HASH_NETIFACE=m |
161 | CONFIG_IP_SET_LIST_SET=m | 167 | CONFIG_IP_SET_LIST_SET=m |
162 | CONFIG_NF_CONNTRACK_IPV4=m | 168 | CONFIG_NF_CONNTRACK_IPV4=m |
163 | CONFIG_NF_TABLES_IPV4=m | ||
164 | CONFIG_NFT_REJECT_IPV4=m | ||
165 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 169 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
166 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 170 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
167 | CONFIG_NF_TABLES_ARP=m | 171 | CONFIG_NF_TABLES_ARP=m |
@@ -187,7 +191,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
187 | CONFIG_IP_NF_ARPFILTER=m | 191 | CONFIG_IP_NF_ARPFILTER=m |
188 | CONFIG_IP_NF_ARP_MANGLE=m | 192 | CONFIG_IP_NF_ARP_MANGLE=m |
189 | CONFIG_NF_CONNTRACK_IPV6=m | 193 | CONFIG_NF_CONNTRACK_IPV6=m |
190 | CONFIG_NF_TABLES_IPV6=m | ||
191 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 194 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
192 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 195 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
193 | CONFIG_IP6_NF_IPTABLES=m | 196 | CONFIG_IP6_NF_IPTABLES=m |
@@ -487,7 +490,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
487 | CONFIG_CRYPTO_USER_API_HASH=m | 490 | CONFIG_CRYPTO_USER_API_HASH=m |
488 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 491 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
489 | # CONFIG_CRYPTO_HW is not set | 492 | # CONFIG_CRYPTO_HW is not set |
490 | CONFIG_CRC_T10DIF=y | ||
491 | CONFIG_XZ_DEC_X86=y | 493 | CONFIG_XZ_DEC_X86=y |
492 | CONFIG_XZ_DEC_POWERPC=y | 494 | CONFIG_XZ_DEC_POWERPC=y |
493 | CONFIG_XZ_DEC_IA64=y | 495 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig index 4aa4f45e52a8..e5a12739ff2d 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_defconfig | |||
@@ -24,6 +24,8 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
24 | CONFIG_SUN_PARTITION=y | 24 | CONFIG_SUN_PARTITION=y |
25 | # CONFIG_EFI_PARTITION is not set | 25 | # CONFIG_EFI_PARTITION is not set |
26 | CONFIG_IOSCHED_DEADLINE=m | 26 | CONFIG_IOSCHED_DEADLINE=m |
27 | CONFIG_KEXEC=y | ||
28 | CONFIG_BOOTINFO_PROC=y | ||
27 | CONFIG_M68040=y | 29 | CONFIG_M68040=y |
28 | CONFIG_M68060=y | 30 | CONFIG_M68060=y |
29 | CONFIG_VME=y | 31 | CONFIG_VME=y |
@@ -81,6 +83,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
81 | CONFIG_NF_CONNTRACK_SIP=m | 83 | CONFIG_NF_CONNTRACK_SIP=m |
82 | CONFIG_NF_CONNTRACK_TFTP=m | 84 | CONFIG_NF_CONNTRACK_TFTP=m |
83 | CONFIG_NF_TABLES=m | 85 | CONFIG_NF_TABLES=m |
86 | CONFIG_NF_TABLES_INET=m | ||
84 | CONFIG_NFT_EXTHDR=m | 87 | CONFIG_NFT_EXTHDR=m |
85 | CONFIG_NFT_META=m | 88 | CONFIG_NFT_META=m |
86 | CONFIG_NFT_CT=m | 89 | CONFIG_NFT_CT=m |
@@ -90,6 +93,8 @@ CONFIG_NFT_COUNTER=m | |||
90 | CONFIG_NFT_LOG=m | 93 | CONFIG_NFT_LOG=m |
91 | CONFIG_NFT_LIMIT=m | 94 | CONFIG_NFT_LIMIT=m |
92 | CONFIG_NFT_NAT=m | 95 | CONFIG_NFT_NAT=m |
96 | CONFIG_NFT_QUEUE=m | ||
97 | CONFIG_NFT_REJECT=m | ||
93 | CONFIG_NFT_COMPAT=m | 98 | CONFIG_NFT_COMPAT=m |
94 | CONFIG_NETFILTER_XT_SET=m | 99 | CONFIG_NETFILTER_XT_SET=m |
95 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 100 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -122,6 +127,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
122 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 127 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
123 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 128 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
124 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 129 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
130 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
125 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 131 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
126 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 132 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
127 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 133 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -159,8 +165,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
159 | CONFIG_IP_SET_HASH_NETIFACE=m | 165 | CONFIG_IP_SET_HASH_NETIFACE=m |
160 | CONFIG_IP_SET_LIST_SET=m | 166 | CONFIG_IP_SET_LIST_SET=m |
161 | CONFIG_NF_CONNTRACK_IPV4=m | 167 | CONFIG_NF_CONNTRACK_IPV4=m |
162 | CONFIG_NF_TABLES_IPV4=m | ||
163 | CONFIG_NFT_REJECT_IPV4=m | ||
164 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 168 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
165 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 169 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
166 | CONFIG_NF_TABLES_ARP=m | 170 | CONFIG_NF_TABLES_ARP=m |
@@ -186,7 +190,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
186 | CONFIG_IP_NF_ARPFILTER=m | 190 | CONFIG_IP_NF_ARPFILTER=m |
187 | CONFIG_IP_NF_ARP_MANGLE=m | 191 | CONFIG_IP_NF_ARP_MANGLE=m |
188 | CONFIG_NF_CONNTRACK_IPV6=m | 192 | CONFIG_NF_CONNTRACK_IPV6=m |
189 | CONFIG_NF_TABLES_IPV6=m | ||
190 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 193 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
191 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 194 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
192 | CONFIG_IP6_NF_IPTABLES=m | 195 | CONFIG_IP6_NF_IPTABLES=m |
@@ -463,7 +466,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
463 | CONFIG_CRYPTO_USER_API_HASH=m | 466 | CONFIG_CRYPTO_USER_API_HASH=m |
464 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 467 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
465 | # CONFIG_CRYPTO_HW is not set | 468 | # CONFIG_CRYPTO_HW is not set |
466 | CONFIG_CRC_T10DIF=y | ||
467 | CONFIG_XZ_DEC_X86=y | 469 | CONFIG_XZ_DEC_X86=y |
468 | CONFIG_XZ_DEC_POWERPC=y | 470 | CONFIG_XZ_DEC_POWERPC=y |
469 | CONFIG_XZ_DEC_IA64=y | 471 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig index 7cd9d9f456fb..8936d7fb0f0f 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_defconfig | |||
@@ -25,6 +25,8 @@ CONFIG_SUN_PARTITION=y | |||
25 | # CONFIG_EFI_PARTITION is not set | 25 | # CONFIG_EFI_PARTITION is not set |
26 | CONFIG_SYSV68_PARTITION=y | 26 | CONFIG_SYSV68_PARTITION=y |
27 | CONFIG_IOSCHED_DEADLINE=m | 27 | CONFIG_IOSCHED_DEADLINE=m |
28 | CONFIG_KEXEC=y | ||
29 | CONFIG_BOOTINFO_PROC=y | ||
28 | CONFIG_M68020=y | 30 | CONFIG_M68020=y |
29 | CONFIG_M68030=y | 31 | CONFIG_M68030=y |
30 | CONFIG_M68040=y | 32 | CONFIG_M68040=y |
@@ -83,6 +85,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
83 | CONFIG_NF_CONNTRACK_SIP=m | 85 | CONFIG_NF_CONNTRACK_SIP=m |
84 | CONFIG_NF_CONNTRACK_TFTP=m | 86 | CONFIG_NF_CONNTRACK_TFTP=m |
85 | CONFIG_NF_TABLES=m | 87 | CONFIG_NF_TABLES=m |
88 | CONFIG_NF_TABLES_INET=m | ||
86 | CONFIG_NFT_EXTHDR=m | 89 | CONFIG_NFT_EXTHDR=m |
87 | CONFIG_NFT_META=m | 90 | CONFIG_NFT_META=m |
88 | CONFIG_NFT_CT=m | 91 | CONFIG_NFT_CT=m |
@@ -92,6 +95,8 @@ CONFIG_NFT_COUNTER=m | |||
92 | CONFIG_NFT_LOG=m | 95 | CONFIG_NFT_LOG=m |
93 | CONFIG_NFT_LIMIT=m | 96 | CONFIG_NFT_LIMIT=m |
94 | CONFIG_NFT_NAT=m | 97 | CONFIG_NFT_NAT=m |
98 | CONFIG_NFT_QUEUE=m | ||
99 | CONFIG_NFT_REJECT=m | ||
95 | CONFIG_NFT_COMPAT=m | 100 | CONFIG_NFT_COMPAT=m |
96 | CONFIG_NETFILTER_XT_SET=m | 101 | CONFIG_NETFILTER_XT_SET=m |
97 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 102 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -124,6 +129,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
124 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 129 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
125 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 130 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
126 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 131 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
132 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
127 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 133 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
128 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 134 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
129 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 135 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -161,8 +167,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
161 | CONFIG_IP_SET_HASH_NETIFACE=m | 167 | CONFIG_IP_SET_HASH_NETIFACE=m |
162 | CONFIG_IP_SET_LIST_SET=m | 168 | CONFIG_IP_SET_LIST_SET=m |
163 | CONFIG_NF_CONNTRACK_IPV4=m | 169 | CONFIG_NF_CONNTRACK_IPV4=m |
164 | CONFIG_NF_TABLES_IPV4=m | ||
165 | CONFIG_NFT_REJECT_IPV4=m | ||
166 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 170 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
167 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 171 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
168 | CONFIG_NF_TABLES_ARP=m | 172 | CONFIG_NF_TABLES_ARP=m |
@@ -188,7 +192,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
188 | CONFIG_IP_NF_ARPFILTER=m | 192 | CONFIG_IP_NF_ARPFILTER=m |
189 | CONFIG_IP_NF_ARP_MANGLE=m | 193 | CONFIG_IP_NF_ARP_MANGLE=m |
190 | CONFIG_NF_CONNTRACK_IPV6=m | 194 | CONFIG_NF_CONNTRACK_IPV6=m |
191 | CONFIG_NF_TABLES_IPV6=m | ||
192 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 195 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
193 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 196 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
194 | CONFIG_IP6_NF_IPTABLES=m | 197 | CONFIG_IP6_NF_IPTABLES=m |
@@ -472,7 +475,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
472 | CONFIG_CRYPTO_USER_API_HASH=m | 475 | CONFIG_CRYPTO_USER_API_HASH=m |
473 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 476 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
474 | # CONFIG_CRYPTO_HW is not set | 477 | # CONFIG_CRYPTO_HW is not set |
475 | CONFIG_CRC_T10DIF=y | ||
476 | CONFIG_XZ_DEC_X86=y | 478 | CONFIG_XZ_DEC_X86=y |
477 | CONFIG_XZ_DEC_POWERPC=y | 479 | CONFIG_XZ_DEC_POWERPC=y |
478 | CONFIG_XZ_DEC_IA64=y | 480 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig index 31f5bd061d14..be5342cca25b 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig | |||
@@ -24,6 +24,8 @@ CONFIG_SUN_PARTITION=y | |||
24 | # CONFIG_EFI_PARTITION is not set | 24 | # CONFIG_EFI_PARTITION is not set |
25 | CONFIG_SYSV68_PARTITION=y | 25 | CONFIG_SYSV68_PARTITION=y |
26 | CONFIG_IOSCHED_DEADLINE=m | 26 | CONFIG_IOSCHED_DEADLINE=m |
27 | CONFIG_KEXEC=y | ||
28 | CONFIG_BOOTINFO_PROC=y | ||
27 | CONFIG_M68020=y | 29 | CONFIG_M68020=y |
28 | CONFIG_M68030=y | 30 | CONFIG_M68030=y |
29 | CONFIG_M68040=y | 31 | CONFIG_M68040=y |
@@ -82,6 +84,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
82 | CONFIG_NF_CONNTRACK_SIP=m | 84 | CONFIG_NF_CONNTRACK_SIP=m |
83 | CONFIG_NF_CONNTRACK_TFTP=m | 85 | CONFIG_NF_CONNTRACK_TFTP=m |
84 | CONFIG_NF_TABLES=m | 86 | CONFIG_NF_TABLES=m |
87 | CONFIG_NF_TABLES_INET=m | ||
85 | CONFIG_NFT_EXTHDR=m | 88 | CONFIG_NFT_EXTHDR=m |
86 | CONFIG_NFT_META=m | 89 | CONFIG_NFT_META=m |
87 | CONFIG_NFT_CT=m | 90 | CONFIG_NFT_CT=m |
@@ -91,6 +94,8 @@ CONFIG_NFT_COUNTER=m | |||
91 | CONFIG_NFT_LOG=m | 94 | CONFIG_NFT_LOG=m |
92 | CONFIG_NFT_LIMIT=m | 95 | CONFIG_NFT_LIMIT=m |
93 | CONFIG_NFT_NAT=m | 96 | CONFIG_NFT_NAT=m |
97 | CONFIG_NFT_QUEUE=m | ||
98 | CONFIG_NFT_REJECT=m | ||
94 | CONFIG_NFT_COMPAT=m | 99 | CONFIG_NFT_COMPAT=m |
95 | CONFIG_NETFILTER_XT_SET=m | 100 | CONFIG_NETFILTER_XT_SET=m |
96 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 101 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -123,6 +128,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
123 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 128 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
124 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 129 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
125 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 130 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
131 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
126 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 132 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
127 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 133 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
128 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 134 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -160,8 +166,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
160 | CONFIG_IP_SET_HASH_NETIFACE=m | 166 | CONFIG_IP_SET_HASH_NETIFACE=m |
161 | CONFIG_IP_SET_LIST_SET=m | 167 | CONFIG_IP_SET_LIST_SET=m |
162 | CONFIG_NF_CONNTRACK_IPV4=m | 168 | CONFIG_NF_CONNTRACK_IPV4=m |
163 | CONFIG_NF_TABLES_IPV4=m | ||
164 | CONFIG_NFT_REJECT_IPV4=m | ||
165 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 169 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
166 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 170 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
167 | CONFIG_NF_TABLES_ARP=m | 171 | CONFIG_NF_TABLES_ARP=m |
@@ -187,7 +191,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
187 | CONFIG_IP_NF_ARPFILTER=m | 191 | CONFIG_IP_NF_ARPFILTER=m |
188 | CONFIG_IP_NF_ARP_MANGLE=m | 192 | CONFIG_IP_NF_ARP_MANGLE=m |
189 | CONFIG_NF_CONNTRACK_IPV6=m | 193 | CONFIG_NF_CONNTRACK_IPV6=m |
190 | CONFIG_NF_TABLES_IPV6=m | ||
191 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 194 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
192 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 195 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
193 | CONFIG_IP6_NF_IPTABLES=m | 196 | CONFIG_IP6_NF_IPTABLES=m |
@@ -495,7 +498,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
495 | CONFIG_CRYPTO_USER_API_HASH=m | 498 | CONFIG_CRYPTO_USER_API_HASH=m |
496 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 499 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
497 | # CONFIG_CRYPTO_HW is not set | 500 | # CONFIG_CRYPTO_HW is not set |
498 | CONFIG_CRC_T10DIF=y | ||
499 | CONFIG_XZ_DEC_X86=y | 501 | CONFIG_XZ_DEC_X86=y |
500 | CONFIG_XZ_DEC_POWERPC=y | 502 | CONFIG_XZ_DEC_POWERPC=y |
501 | CONFIG_XZ_DEC_IA64=y | 503 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig index 4e5adff326ee..f27194ade167 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig | |||
@@ -20,6 +20,8 @@ CONFIG_SOLARIS_X86_PARTITION=y | |||
20 | CONFIG_UNIXWARE_DISKLABEL=y | 20 | CONFIG_UNIXWARE_DISKLABEL=y |
21 | # CONFIG_EFI_PARTITION is not set | 21 | # CONFIG_EFI_PARTITION is not set |
22 | CONFIG_IOSCHED_DEADLINE=m | 22 | CONFIG_IOSCHED_DEADLINE=m |
23 | CONFIG_KEXEC=y | ||
24 | CONFIG_BOOTINFO_PROC=y | ||
23 | CONFIG_M68020=y | 25 | CONFIG_M68020=y |
24 | CONFIG_M68040=y | 26 | CONFIG_M68040=y |
25 | CONFIG_M68060=y | 27 | CONFIG_M68060=y |
@@ -91,6 +93,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
91 | CONFIG_NF_CONNTRACK_SIP=m | 93 | CONFIG_NF_CONNTRACK_SIP=m |
92 | CONFIG_NF_CONNTRACK_TFTP=m | 94 | CONFIG_NF_CONNTRACK_TFTP=m |
93 | CONFIG_NF_TABLES=m | 95 | CONFIG_NF_TABLES=m |
96 | CONFIG_NF_TABLES_INET=m | ||
94 | CONFIG_NFT_EXTHDR=m | 97 | CONFIG_NFT_EXTHDR=m |
95 | CONFIG_NFT_META=m | 98 | CONFIG_NFT_META=m |
96 | CONFIG_NFT_CT=m | 99 | CONFIG_NFT_CT=m |
@@ -100,6 +103,8 @@ CONFIG_NFT_COUNTER=m | |||
100 | CONFIG_NFT_LOG=m | 103 | CONFIG_NFT_LOG=m |
101 | CONFIG_NFT_LIMIT=m | 104 | CONFIG_NFT_LIMIT=m |
102 | CONFIG_NFT_NAT=m | 105 | CONFIG_NFT_NAT=m |
106 | CONFIG_NFT_QUEUE=m | ||
107 | CONFIG_NFT_REJECT=m | ||
103 | CONFIG_NFT_COMPAT=m | 108 | CONFIG_NFT_COMPAT=m |
104 | CONFIG_NETFILTER_XT_SET=m | 109 | CONFIG_NETFILTER_XT_SET=m |
105 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 110 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -132,6 +137,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
132 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 137 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
133 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 138 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
134 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 139 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
140 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
135 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 141 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
136 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 142 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
137 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 143 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -169,8 +175,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
169 | CONFIG_IP_SET_HASH_NETIFACE=m | 175 | CONFIG_IP_SET_HASH_NETIFACE=m |
170 | CONFIG_IP_SET_LIST_SET=m | 176 | CONFIG_IP_SET_LIST_SET=m |
171 | CONFIG_NF_CONNTRACK_IPV4=m | 177 | CONFIG_NF_CONNTRACK_IPV4=m |
172 | CONFIG_NF_TABLES_IPV4=m | ||
173 | CONFIG_NFT_REJECT_IPV4=m | ||
174 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 178 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
175 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 179 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
176 | CONFIG_NF_TABLES_ARP=m | 180 | CONFIG_NF_TABLES_ARP=m |
@@ -196,7 +200,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
196 | CONFIG_IP_NF_ARPFILTER=m | 200 | CONFIG_IP_NF_ARPFILTER=m |
197 | CONFIG_IP_NF_ARP_MANGLE=m | 201 | CONFIG_IP_NF_ARP_MANGLE=m |
198 | CONFIG_NF_CONNTRACK_IPV6=m | 202 | CONFIG_NF_CONNTRACK_IPV6=m |
199 | CONFIG_NF_TABLES_IPV6=m | ||
200 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 203 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
201 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 204 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
202 | CONFIG_IP6_NF_IPTABLES=m | 205 | CONFIG_IP6_NF_IPTABLES=m |
@@ -571,7 +574,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
571 | CONFIG_CRYPTO_USER_API_HASH=m | 574 | CONFIG_CRYPTO_USER_API_HASH=m |
572 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 575 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
573 | # CONFIG_CRYPTO_HW is not set | 576 | # CONFIG_CRYPTO_HW is not set |
574 | CONFIG_CRC_T10DIF=y | ||
575 | CONFIG_XZ_DEC_X86=y | 577 | CONFIG_XZ_DEC_X86=y |
576 | CONFIG_XZ_DEC_POWERPC=y | 578 | CONFIG_XZ_DEC_POWERPC=y |
577 | CONFIG_XZ_DEC_IA64=y | 579 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig index 02cdbac5565e..c3887603c1db 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_defconfig | |||
@@ -24,6 +24,8 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
24 | CONFIG_SUN_PARTITION=y | 24 | CONFIG_SUN_PARTITION=y |
25 | # CONFIG_EFI_PARTITION is not set | 25 | # CONFIG_EFI_PARTITION is not set |
26 | CONFIG_IOSCHED_DEADLINE=m | 26 | CONFIG_IOSCHED_DEADLINE=m |
27 | CONFIG_KEXEC=y | ||
28 | CONFIG_BOOTINFO_PROC=y | ||
27 | CONFIG_M68030=y | 29 | CONFIG_M68030=y |
28 | CONFIG_VME=y | 30 | CONFIG_VME=y |
29 | CONFIG_MVME147=y | 31 | CONFIG_MVME147=y |
@@ -80,6 +82,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
80 | CONFIG_NF_CONNTRACK_SIP=m | 82 | CONFIG_NF_CONNTRACK_SIP=m |
81 | CONFIG_NF_CONNTRACK_TFTP=m | 83 | CONFIG_NF_CONNTRACK_TFTP=m |
82 | CONFIG_NF_TABLES=m | 84 | CONFIG_NF_TABLES=m |
85 | CONFIG_NF_TABLES_INET=m | ||
83 | CONFIG_NFT_EXTHDR=m | 86 | CONFIG_NFT_EXTHDR=m |
84 | CONFIG_NFT_META=m | 87 | CONFIG_NFT_META=m |
85 | CONFIG_NFT_CT=m | 88 | CONFIG_NFT_CT=m |
@@ -89,6 +92,8 @@ CONFIG_NFT_COUNTER=m | |||
89 | CONFIG_NFT_LOG=m | 92 | CONFIG_NFT_LOG=m |
90 | CONFIG_NFT_LIMIT=m | 93 | CONFIG_NFT_LIMIT=m |
91 | CONFIG_NFT_NAT=m | 94 | CONFIG_NFT_NAT=m |
95 | CONFIG_NFT_QUEUE=m | ||
96 | CONFIG_NFT_REJECT=m | ||
92 | CONFIG_NFT_COMPAT=m | 97 | CONFIG_NFT_COMPAT=m |
93 | CONFIG_NETFILTER_XT_SET=m | 98 | CONFIG_NETFILTER_XT_SET=m |
94 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 99 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -121,6 +126,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
121 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 126 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
122 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 127 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
123 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 128 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
129 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
124 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 130 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
125 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 131 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
126 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 132 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -158,8 +164,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
158 | CONFIG_IP_SET_HASH_NETIFACE=m | 164 | CONFIG_IP_SET_HASH_NETIFACE=m |
159 | CONFIG_IP_SET_LIST_SET=m | 165 | CONFIG_IP_SET_LIST_SET=m |
160 | CONFIG_NF_CONNTRACK_IPV4=m | 166 | CONFIG_NF_CONNTRACK_IPV4=m |
161 | CONFIG_NF_TABLES_IPV4=m | ||
162 | CONFIG_NFT_REJECT_IPV4=m | ||
163 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 167 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
164 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 168 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
165 | CONFIG_NF_TABLES_ARP=m | 169 | CONFIG_NF_TABLES_ARP=m |
@@ -185,7 +189,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
185 | CONFIG_IP_NF_ARPFILTER=m | 189 | CONFIG_IP_NF_ARPFILTER=m |
186 | CONFIG_IP_NF_ARP_MANGLE=m | 190 | CONFIG_IP_NF_ARP_MANGLE=m |
187 | CONFIG_NF_CONNTRACK_IPV6=m | 191 | CONFIG_NF_CONNTRACK_IPV6=m |
188 | CONFIG_NF_TABLES_IPV6=m | ||
189 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 192 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
190 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 193 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
191 | CONFIG_IP6_NF_IPTABLES=m | 194 | CONFIG_IP6_NF_IPTABLES=m |
@@ -463,7 +466,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
463 | CONFIG_CRYPTO_USER_API_HASH=m | 466 | CONFIG_CRYPTO_USER_API_HASH=m |
464 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 467 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
465 | # CONFIG_CRYPTO_HW is not set | 468 | # CONFIG_CRYPTO_HW is not set |
466 | CONFIG_CRC_T10DIF=y | ||
467 | CONFIG_XZ_DEC_X86=y | 469 | CONFIG_XZ_DEC_X86=y |
468 | CONFIG_XZ_DEC_POWERPC=y | 470 | CONFIG_XZ_DEC_POWERPC=y |
469 | CONFIG_XZ_DEC_IA64=y | 471 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig index 05a990a9dbd4..f7ff784d05ac 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_defconfig | |||
@@ -24,6 +24,8 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
24 | CONFIG_SUN_PARTITION=y | 24 | CONFIG_SUN_PARTITION=y |
25 | # CONFIG_EFI_PARTITION is not set | 25 | # CONFIG_EFI_PARTITION is not set |
26 | CONFIG_IOSCHED_DEADLINE=m | 26 | CONFIG_IOSCHED_DEADLINE=m |
27 | CONFIG_KEXEC=y | ||
28 | CONFIG_BOOTINFO_PROC=y | ||
27 | CONFIG_M68040=y | 29 | CONFIG_M68040=y |
28 | CONFIG_M68060=y | 30 | CONFIG_M68060=y |
29 | CONFIG_VME=y | 31 | CONFIG_VME=y |
@@ -81,6 +83,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
81 | CONFIG_NF_CONNTRACK_SIP=m | 83 | CONFIG_NF_CONNTRACK_SIP=m |
82 | CONFIG_NF_CONNTRACK_TFTP=m | 84 | CONFIG_NF_CONNTRACK_TFTP=m |
83 | CONFIG_NF_TABLES=m | 85 | CONFIG_NF_TABLES=m |
86 | CONFIG_NF_TABLES_INET=m | ||
84 | CONFIG_NFT_EXTHDR=m | 87 | CONFIG_NFT_EXTHDR=m |
85 | CONFIG_NFT_META=m | 88 | CONFIG_NFT_META=m |
86 | CONFIG_NFT_CT=m | 89 | CONFIG_NFT_CT=m |
@@ -90,6 +93,8 @@ CONFIG_NFT_COUNTER=m | |||
90 | CONFIG_NFT_LOG=m | 93 | CONFIG_NFT_LOG=m |
91 | CONFIG_NFT_LIMIT=m | 94 | CONFIG_NFT_LIMIT=m |
92 | CONFIG_NFT_NAT=m | 95 | CONFIG_NFT_NAT=m |
96 | CONFIG_NFT_QUEUE=m | ||
97 | CONFIG_NFT_REJECT=m | ||
93 | CONFIG_NFT_COMPAT=m | 98 | CONFIG_NFT_COMPAT=m |
94 | CONFIG_NETFILTER_XT_SET=m | 99 | CONFIG_NETFILTER_XT_SET=m |
95 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 100 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -122,6 +127,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
122 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 127 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
123 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 128 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
124 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 129 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
130 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
125 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 131 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
126 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 132 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
127 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 133 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -159,8 +165,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
159 | CONFIG_IP_SET_HASH_NETIFACE=m | 165 | CONFIG_IP_SET_HASH_NETIFACE=m |
160 | CONFIG_IP_SET_LIST_SET=m | 166 | CONFIG_IP_SET_LIST_SET=m |
161 | CONFIG_NF_CONNTRACK_IPV4=m | 167 | CONFIG_NF_CONNTRACK_IPV4=m |
162 | CONFIG_NF_TABLES_IPV4=m | ||
163 | CONFIG_NFT_REJECT_IPV4=m | ||
164 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 168 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
165 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 169 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
166 | CONFIG_NF_TABLES_ARP=m | 170 | CONFIG_NF_TABLES_ARP=m |
@@ -186,7 +190,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
186 | CONFIG_IP_NF_ARPFILTER=m | 190 | CONFIG_IP_NF_ARPFILTER=m |
187 | CONFIG_IP_NF_ARP_MANGLE=m | 191 | CONFIG_IP_NF_ARP_MANGLE=m |
188 | CONFIG_NF_CONNTRACK_IPV6=m | 192 | CONFIG_NF_CONNTRACK_IPV6=m |
189 | CONFIG_NF_TABLES_IPV6=m | ||
190 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 193 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
191 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 194 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
192 | CONFIG_IP6_NF_IPTABLES=m | 195 | CONFIG_IP6_NF_IPTABLES=m |
@@ -464,7 +467,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
464 | CONFIG_CRYPTO_USER_API_HASH=m | 467 | CONFIG_CRYPTO_USER_API_HASH=m |
465 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 468 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
466 | # CONFIG_CRYPTO_HW is not set | 469 | # CONFIG_CRYPTO_HW is not set |
467 | CONFIG_CRC_T10DIF=y | ||
468 | CONFIG_XZ_DEC_X86=y | 470 | CONFIG_XZ_DEC_X86=y |
469 | CONFIG_XZ_DEC_POWERPC=y | 471 | CONFIG_XZ_DEC_POWERPC=y |
470 | CONFIG_XZ_DEC_IA64=y | 472 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig index 568e2a98f976..f0c72ab037be 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_defconfig | |||
@@ -25,6 +25,8 @@ CONFIG_SUN_PARTITION=y | |||
25 | # CONFIG_EFI_PARTITION is not set | 25 | # CONFIG_EFI_PARTITION is not set |
26 | CONFIG_SYSV68_PARTITION=y | 26 | CONFIG_SYSV68_PARTITION=y |
27 | CONFIG_IOSCHED_DEADLINE=m | 27 | CONFIG_IOSCHED_DEADLINE=m |
28 | CONFIG_KEXEC=y | ||
29 | CONFIG_BOOTINFO_PROC=y | ||
28 | CONFIG_M68040=y | 30 | CONFIG_M68040=y |
29 | CONFIG_M68060=y | 31 | CONFIG_M68060=y |
30 | CONFIG_Q40=y | 32 | CONFIG_Q40=y |
@@ -81,6 +83,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
81 | CONFIG_NF_CONNTRACK_SIP=m | 83 | CONFIG_NF_CONNTRACK_SIP=m |
82 | CONFIG_NF_CONNTRACK_TFTP=m | 84 | CONFIG_NF_CONNTRACK_TFTP=m |
83 | CONFIG_NF_TABLES=m | 85 | CONFIG_NF_TABLES=m |
86 | CONFIG_NF_TABLES_INET=m | ||
84 | CONFIG_NFT_EXTHDR=m | 87 | CONFIG_NFT_EXTHDR=m |
85 | CONFIG_NFT_META=m | 88 | CONFIG_NFT_META=m |
86 | CONFIG_NFT_CT=m | 89 | CONFIG_NFT_CT=m |
@@ -90,6 +93,8 @@ CONFIG_NFT_COUNTER=m | |||
90 | CONFIG_NFT_LOG=m | 93 | CONFIG_NFT_LOG=m |
91 | CONFIG_NFT_LIMIT=m | 94 | CONFIG_NFT_LIMIT=m |
92 | CONFIG_NFT_NAT=m | 95 | CONFIG_NFT_NAT=m |
96 | CONFIG_NFT_QUEUE=m | ||
97 | CONFIG_NFT_REJECT=m | ||
93 | CONFIG_NFT_COMPAT=m | 98 | CONFIG_NFT_COMPAT=m |
94 | CONFIG_NETFILTER_XT_SET=m | 99 | CONFIG_NETFILTER_XT_SET=m |
95 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 100 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -122,6 +127,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
122 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 127 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
123 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 128 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
124 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 129 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
130 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
125 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 131 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
126 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 132 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
127 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 133 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -159,8 +165,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
159 | CONFIG_IP_SET_HASH_NETIFACE=m | 165 | CONFIG_IP_SET_HASH_NETIFACE=m |
160 | CONFIG_IP_SET_LIST_SET=m | 166 | CONFIG_IP_SET_LIST_SET=m |
161 | CONFIG_NF_CONNTRACK_IPV4=m | 167 | CONFIG_NF_CONNTRACK_IPV4=m |
162 | CONFIG_NF_TABLES_IPV4=m | ||
163 | CONFIG_NFT_REJECT_IPV4=m | ||
164 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 168 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
165 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 169 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
166 | CONFIG_NF_TABLES_ARP=m | 170 | CONFIG_NF_TABLES_ARP=m |
@@ -186,7 +190,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
186 | CONFIG_IP_NF_ARPFILTER=m | 190 | CONFIG_IP_NF_ARPFILTER=m |
187 | CONFIG_IP_NF_ARP_MANGLE=m | 191 | CONFIG_IP_NF_ARP_MANGLE=m |
188 | CONFIG_NF_CONNTRACK_IPV6=m | 192 | CONFIG_NF_CONNTRACK_IPV6=m |
189 | CONFIG_NF_TABLES_IPV6=m | ||
190 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 193 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
191 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 194 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
192 | CONFIG_IP6_NF_IPTABLES=m | 195 | CONFIG_IP6_NF_IPTABLES=m |
@@ -485,7 +488,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
485 | CONFIG_CRYPTO_USER_API_HASH=m | 488 | CONFIG_CRYPTO_USER_API_HASH=m |
486 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 489 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
487 | # CONFIG_CRYPTO_HW is not set | 490 | # CONFIG_CRYPTO_HW is not set |
488 | CONFIG_CRC_T10DIF=y | ||
489 | CONFIG_XZ_DEC_X86=y | 491 | CONFIG_XZ_DEC_X86=y |
490 | CONFIG_XZ_DEC_POWERPC=y | 492 | CONFIG_XZ_DEC_POWERPC=y |
491 | CONFIG_XZ_DEC_IA64=y | 493 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig index 60b0aeac5742..7bca0f464521 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_defconfig | |||
@@ -24,6 +24,8 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
24 | # CONFIG_EFI_PARTITION is not set | 24 | # CONFIG_EFI_PARTITION is not set |
25 | CONFIG_SYSV68_PARTITION=y | 25 | CONFIG_SYSV68_PARTITION=y |
26 | CONFIG_IOSCHED_DEADLINE=m | 26 | CONFIG_IOSCHED_DEADLINE=m |
27 | CONFIG_KEXEC=y | ||
28 | CONFIG_BOOTINFO_PROC=y | ||
27 | CONFIG_SUN3=y | 29 | CONFIG_SUN3=y |
28 | # CONFIG_COMPACTION is not set | 30 | # CONFIG_COMPACTION is not set |
29 | CONFIG_CLEANCACHE=y | 31 | CONFIG_CLEANCACHE=y |
@@ -78,6 +80,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
78 | CONFIG_NF_CONNTRACK_SIP=m | 80 | CONFIG_NF_CONNTRACK_SIP=m |
79 | CONFIG_NF_CONNTRACK_TFTP=m | 81 | CONFIG_NF_CONNTRACK_TFTP=m |
80 | CONFIG_NF_TABLES=m | 82 | CONFIG_NF_TABLES=m |
83 | CONFIG_NF_TABLES_INET=m | ||
81 | CONFIG_NFT_EXTHDR=m | 84 | CONFIG_NFT_EXTHDR=m |
82 | CONFIG_NFT_META=m | 85 | CONFIG_NFT_META=m |
83 | CONFIG_NFT_CT=m | 86 | CONFIG_NFT_CT=m |
@@ -87,6 +90,8 @@ CONFIG_NFT_COUNTER=m | |||
87 | CONFIG_NFT_LOG=m | 90 | CONFIG_NFT_LOG=m |
88 | CONFIG_NFT_LIMIT=m | 91 | CONFIG_NFT_LIMIT=m |
89 | CONFIG_NFT_NAT=m | 92 | CONFIG_NFT_NAT=m |
93 | CONFIG_NFT_QUEUE=m | ||
94 | CONFIG_NFT_REJECT=m | ||
90 | CONFIG_NFT_COMPAT=m | 95 | CONFIG_NFT_COMPAT=m |
91 | CONFIG_NETFILTER_XT_SET=m | 96 | CONFIG_NETFILTER_XT_SET=m |
92 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 97 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -119,6 +124,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
119 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 124 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
120 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 125 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
121 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 126 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
127 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
122 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 128 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
123 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 129 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
124 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 130 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -156,8 +162,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
156 | CONFIG_IP_SET_HASH_NETIFACE=m | 162 | CONFIG_IP_SET_HASH_NETIFACE=m |
157 | CONFIG_IP_SET_LIST_SET=m | 163 | CONFIG_IP_SET_LIST_SET=m |
158 | CONFIG_NF_CONNTRACK_IPV4=m | 164 | CONFIG_NF_CONNTRACK_IPV4=m |
159 | CONFIG_NF_TABLES_IPV4=m | ||
160 | CONFIG_NFT_REJECT_IPV4=m | ||
161 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 165 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
162 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 166 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
163 | CONFIG_NF_TABLES_ARP=m | 167 | CONFIG_NF_TABLES_ARP=m |
@@ -183,7 +187,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
183 | CONFIG_IP_NF_ARPFILTER=m | 187 | CONFIG_IP_NF_ARPFILTER=m |
184 | CONFIG_IP_NF_ARP_MANGLE=m | 188 | CONFIG_IP_NF_ARP_MANGLE=m |
185 | CONFIG_NF_CONNTRACK_IPV6=m | 189 | CONFIG_NF_CONNTRACK_IPV6=m |
186 | CONFIG_NF_TABLES_IPV6=m | ||
187 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 190 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
188 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 191 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
189 | CONFIG_IP6_NF_IPTABLES=m | 192 | CONFIG_IP6_NF_IPTABLES=m |
@@ -464,7 +467,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
464 | CONFIG_CRYPTO_USER_API_HASH=m | 467 | CONFIG_CRYPTO_USER_API_HASH=m |
465 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 468 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
466 | # CONFIG_CRYPTO_HW is not set | 469 | # CONFIG_CRYPTO_HW is not set |
467 | CONFIG_CRC_T10DIF=y | ||
468 | CONFIG_XZ_DEC_X86=y | 470 | CONFIG_XZ_DEC_X86=y |
469 | CONFIG_XZ_DEC_POWERPC=y | 471 | CONFIG_XZ_DEC_POWERPC=y |
470 | CONFIG_XZ_DEC_IA64=y | 472 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig index 21bda331eebb..317f3e1fec95 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_defconfig | |||
@@ -24,6 +24,8 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
24 | # CONFIG_EFI_PARTITION is not set | 24 | # CONFIG_EFI_PARTITION is not set |
25 | CONFIG_SYSV68_PARTITION=y | 25 | CONFIG_SYSV68_PARTITION=y |
26 | CONFIG_IOSCHED_DEADLINE=m | 26 | CONFIG_IOSCHED_DEADLINE=m |
27 | CONFIG_KEXEC=y | ||
28 | CONFIG_BOOTINFO_PROC=y | ||
27 | CONFIG_SUN3X=y | 29 | CONFIG_SUN3X=y |
28 | # CONFIG_COMPACTION is not set | 30 | # CONFIG_COMPACTION is not set |
29 | CONFIG_CLEANCACHE=y | 31 | CONFIG_CLEANCACHE=y |
@@ -78,6 +80,7 @@ CONFIG_NF_CONNTRACK_SANE=m | |||
78 | CONFIG_NF_CONNTRACK_SIP=m | 80 | CONFIG_NF_CONNTRACK_SIP=m |
79 | CONFIG_NF_CONNTRACK_TFTP=m | 81 | CONFIG_NF_CONNTRACK_TFTP=m |
80 | CONFIG_NF_TABLES=m | 82 | CONFIG_NF_TABLES=m |
83 | CONFIG_NF_TABLES_INET=m | ||
81 | CONFIG_NFT_EXTHDR=m | 84 | CONFIG_NFT_EXTHDR=m |
82 | CONFIG_NFT_META=m | 85 | CONFIG_NFT_META=m |
83 | CONFIG_NFT_CT=m | 86 | CONFIG_NFT_CT=m |
@@ -87,6 +90,8 @@ CONFIG_NFT_COUNTER=m | |||
87 | CONFIG_NFT_LOG=m | 90 | CONFIG_NFT_LOG=m |
88 | CONFIG_NFT_LIMIT=m | 91 | CONFIG_NFT_LIMIT=m |
89 | CONFIG_NFT_NAT=m | 92 | CONFIG_NFT_NAT=m |
93 | CONFIG_NFT_QUEUE=m | ||
94 | CONFIG_NFT_REJECT=m | ||
90 | CONFIG_NFT_COMPAT=m | 95 | CONFIG_NFT_COMPAT=m |
91 | CONFIG_NETFILTER_XT_SET=m | 96 | CONFIG_NETFILTER_XT_SET=m |
92 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 97 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -119,6 +124,7 @@ CONFIG_NETFILTER_XT_MATCH_DSCP=m | |||
119 | CONFIG_NETFILTER_XT_MATCH_ESP=m | 124 | CONFIG_NETFILTER_XT_MATCH_ESP=m |
120 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | 125 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m |
121 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | 126 | CONFIG_NETFILTER_XT_MATCH_HELPER=m |
127 | CONFIG_NETFILTER_XT_MATCH_IPCOMP=m | ||
122 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | 128 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m |
123 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | 129 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m |
124 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | 130 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m |
@@ -156,8 +162,6 @@ CONFIG_IP_SET_HASH_NETPORT=m | |||
156 | CONFIG_IP_SET_HASH_NETIFACE=m | 162 | CONFIG_IP_SET_HASH_NETIFACE=m |
157 | CONFIG_IP_SET_LIST_SET=m | 163 | CONFIG_IP_SET_LIST_SET=m |
158 | CONFIG_NF_CONNTRACK_IPV4=m | 164 | CONFIG_NF_CONNTRACK_IPV4=m |
159 | CONFIG_NF_TABLES_IPV4=m | ||
160 | CONFIG_NFT_REJECT_IPV4=m | ||
161 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 165 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
162 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 166 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
163 | CONFIG_NF_TABLES_ARP=m | 167 | CONFIG_NF_TABLES_ARP=m |
@@ -183,7 +187,6 @@ CONFIG_IP_NF_ARPTABLES=m | |||
183 | CONFIG_IP_NF_ARPFILTER=m | 187 | CONFIG_IP_NF_ARPFILTER=m |
184 | CONFIG_IP_NF_ARP_MANGLE=m | 188 | CONFIG_IP_NF_ARP_MANGLE=m |
185 | CONFIG_NF_CONNTRACK_IPV6=m | 189 | CONFIG_NF_CONNTRACK_IPV6=m |
186 | CONFIG_NF_TABLES_IPV6=m | ||
187 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 190 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
188 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 191 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
189 | CONFIG_IP6_NF_IPTABLES=m | 192 | CONFIG_IP6_NF_IPTABLES=m |
@@ -464,7 +467,6 @@ CONFIG_CRYPTO_LZ4HC=m | |||
464 | CONFIG_CRYPTO_USER_API_HASH=m | 467 | CONFIG_CRYPTO_USER_API_HASH=m |
465 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | 468 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
466 | # CONFIG_CRYPTO_HW is not set | 469 | # CONFIG_CRYPTO_HW is not set |
467 | CONFIG_CRC_T10DIF=y | ||
468 | CONFIG_XZ_DEC_X86=y | 470 | CONFIG_XZ_DEC_X86=y |
469 | CONFIG_XZ_DEC_POWERPC=y | 471 | CONFIG_XZ_DEC_POWERPC=y |
470 | CONFIG_XZ_DEC_IA64=y | 472 | CONFIG_XZ_DEC_IA64=y |
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index 4c99bab7e664..3ab329b88521 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S | |||
@@ -275,7 +275,6 @@ | |||
275 | 275 | ||
276 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE | 276 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE |
277 | #define CONSOLE | 277 | #define CONSOLE |
278 | #define CONSOLE_PENGUIN | ||
279 | #endif | 278 | #endif |
280 | 279 | ||
281 | #ifdef CONFIG_EARLY_PRINTK | 280 | #ifdef CONFIG_EARLY_PRINTK |
@@ -658,27 +657,6 @@ ENTRY(__start) | |||
658 | movel %a0@,%a1@ | 657 | movel %a0@,%a1@ |
659 | #endif | 658 | #endif |
660 | 659 | ||
661 | #if 0 | ||
662 | /* | ||
663 | * Clear the screen | ||
664 | */ | ||
665 | lea %pc@(L(mac_videobase)),%a0 | ||
666 | movel %a0@,%a1 | ||
667 | lea %pc@(L(mac_dimensions)),%a0 | ||
668 | movel %a0@,%d1 | ||
669 | swap %d1 /* #rows is high bytes */ | ||
670 | andl #0xFFFF,%d1 /* rows */ | ||
671 | subl #10,%d1 | ||
672 | lea %pc@(L(mac_rowbytes)),%a0 | ||
673 | loopy2: | ||
674 | movel %a0@,%d0 | ||
675 | subql #1,%d0 | ||
676 | loopx2: | ||
677 | moveb #0x55, %a1@+ | ||
678 | dbra %d0,loopx2 | ||
679 | dbra %d1,loopy2 | ||
680 | #endif | ||
681 | |||
682 | L(test_notmac): | 660 | L(test_notmac): |
683 | #endif /* CONFIG_MAC */ | 661 | #endif /* CONFIG_MAC */ |
684 | 662 | ||
@@ -907,15 +885,15 @@ L(nothp): | |||
907 | */ | 885 | */ |
908 | #ifdef CONFIG_MAC | 886 | #ifdef CONFIG_MAC |
909 | is_not_mac(L(nocon)) | 887 | is_not_mac(L(nocon)) |
910 | #ifdef CONSOLE | 888 | # ifdef CONSOLE |
911 | console_init | 889 | console_init |
912 | #ifdef CONSOLE_PENGUIN | 890 | # ifdef CONFIG_LOGO |
913 | console_put_penguin | 891 | console_put_penguin |
914 | #endif /* CONSOLE_PENGUIN */ | 892 | # endif /* CONFIG_LOGO */ |
915 | console_put_stats | 893 | console_put_stats |
916 | #endif /* CONSOLE */ | 894 | # endif /* CONSOLE */ |
917 | L(nocon): | 895 | L(nocon): |
918 | #endif /* CONFIG_MAC */ | 896 | #endif /* CONFIG_MAC */ |
919 | 897 | ||
920 | 898 | ||
921 | putc '\n' | 899 | putc '\n' |
@@ -3324,14 +3302,13 @@ func_return set_leds | |||
3324 | #define Lconsole_struct_num_columns 8 | 3302 | #define Lconsole_struct_num_columns 8 |
3325 | #define Lconsole_struct_num_rows 12 | 3303 | #define Lconsole_struct_num_rows 12 |
3326 | #define Lconsole_struct_left_edge 16 | 3304 | #define Lconsole_struct_left_edge 16 |
3327 | #define Lconsole_struct_penguin_putc 20 | ||
3328 | 3305 | ||
3329 | func_start console_init,%a0-%a4/%d0-%d7 | 3306 | func_start console_init,%a0-%a4/%d0-%d7 |
3330 | /* | 3307 | /* |
3331 | * Some of the register usage that follows | 3308 | * Some of the register usage that follows |
3332 | * a0 = pointer to boot_info | 3309 | * a0 = pointer to boot_info |
3333 | * a1 = pointer to screen | 3310 | * a1 = pointer to screen |
3334 | * a2 = pointer to Lconsole_globals | 3311 | * a2 = pointer to console_globals |
3335 | * d3 = pixel width of screen | 3312 | * d3 = pixel width of screen |
3336 | * d4 = pixel height of screen | 3313 | * d4 = pixel height of screen |
3337 | * (d3,d4) ~= (x,y) of a point just below | 3314 | * (d3,d4) ~= (x,y) of a point just below |
@@ -3456,7 +3433,7 @@ func_start console_put_stats,%a0/%d7 | |||
3456 | 3433 | ||
3457 | func_return console_put_stats | 3434 | func_return console_put_stats |
3458 | 3435 | ||
3459 | #ifdef CONSOLE_PENGUIN | 3436 | #ifdef CONFIG_LOGO |
3460 | func_start console_put_penguin,%a0-%a1/%d0-%d7 | 3437 | func_start console_put_penguin,%a0-%a1/%d0-%d7 |
3461 | /* | 3438 | /* |
3462 | * Get 'that_penguin' onto the screen in the upper right corner | 3439 | * Get 'that_penguin' onto the screen in the upper right corner |
@@ -3799,38 +3776,6 @@ L(console_plot_pixel_exit): | |||
3799 | func_return console_plot_pixel | 3776 | func_return console_plot_pixel |
3800 | #endif /* CONSOLE */ | 3777 | #endif /* CONSOLE */ |
3801 | 3778 | ||
3802 | #if 0 | ||
3803 | /* | ||
3804 | * This is some old code lying around. I don't believe | ||
3805 | * it's used or important anymore. My guess is it contributed | ||
3806 | * to getting to this point, but it's done for now. | ||
3807 | * It was still in the 2.1.77 head.S, so it's still here. | ||
3808 | * (And still not used!) | ||
3809 | */ | ||
3810 | L(showtest): | ||
3811 | moveml %a0/%d7,%sp@- | ||
3812 | puts "A=" | ||
3813 | putn %a1 | ||
3814 | |||
3815 | .long 0xf0119f15 | ptestr #5,%a1@,#7,%a0 | ||
3816 | |||
3817 | puts "DA=" | ||
3818 | putn %a0 | ||
3819 | |||
3820 | puts "D=" | ||
3821 | putn %a0@ | ||
3822 | |||
3823 | puts "S=" | ||
3824 | lea %pc@(L(mmu)),%a0 | ||
3825 | .long 0xf0106200 | pmove %psr,%a0@ | ||
3826 | clrl %d7 | ||
3827 | movew %a0@,%d7 | ||
3828 | putn %d7 | ||
3829 | |||
3830 | putc '\n' | ||
3831 | moveml %sp@+,%a0/%d7 | ||
3832 | rts | ||
3833 | #endif /* 0 */ | ||
3834 | 3779 | ||
3835 | __INITDATA | 3780 | __INITDATA |
3836 | .align 4 | 3781 | .align 4 |
@@ -3849,7 +3794,6 @@ L(console_globals): | |||
3849 | .long 0 /* max num columns */ | 3794 | .long 0 /* max num columns */ |
3850 | .long 0 /* max num rows */ | 3795 | .long 0 /* max num rows */ |
3851 | .long 0 /* left edge */ | 3796 | .long 0 /* left edge */ |
3852 | .long 0 /* mac putc */ | ||
3853 | L(console_font): | 3797 | L(console_font): |
3854 | .long 0 /* pointer to console font (struct font_desc) */ | 3798 | .long 0 /* pointer to console font (struct font_desc) */ |
3855 | L(console_font_data): | 3799 | L(console_font_data): |
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index 077d3a70fed1..5b8d66fbf383 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -10,9 +10,9 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/kernel_stat.h> | ||
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/irq.h> | ||
16 | 16 | ||
17 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
18 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index 1f590ab8f323..c98ed95c0541 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild | |||
@@ -1,6 +1,7 @@ | |||
1 | 1 | ||
2 | generic-y += barrier.h | 2 | generic-y += barrier.h |
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += cputime.h | ||
4 | generic-y += exec.h | 5 | generic-y += exec.h |
5 | generic-y += hash.h | 6 | generic-y += hash.h |
6 | generic-y += mcs_spinlock.h | 7 | generic-y += mcs_spinlock.h |
diff --git a/arch/microblaze/include/asm/cputime.h b/arch/microblaze/include/asm/cputime.h deleted file mode 100644 index 6d68ad7e0ea3..000000000000 --- a/arch/microblaze/include/asm/cputime.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/cputime.h> | ||
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h index 4d3b92886665..413d6c612bec 100644 --- a/arch/mips/include/asm/unistd.h +++ b/arch/mips/include/asm/unistd.h | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
26 | 26 | ||
27 | #define __ARCH_OMIT_COMPAT_SYS_GETDENTS64 | ||
28 | #define __ARCH_WANT_OLD_READDIR | 27 | #define __ARCH_WANT_OLD_READDIR |
29 | #define __ARCH_WANT_SYS_ALARM | 28 | #define __ARCH_WANT_SYS_ALARM |
30 | #define __ARCH_WANT_SYS_GETHOSTNAME | 29 | #define __ARCH_WANT_SYS_GETHOSTNAME |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index dfc1b911be04..c1681d65dd5c 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -1007,7 +1007,7 @@ static void __irq_entry smtc_clock_tick_interrupt(void) | |||
1007 | int irq = MIPS_CPU_IRQ_BASE + 1; | 1007 | int irq = MIPS_CPU_IRQ_BASE + 1; |
1008 | 1008 | ||
1009 | irq_enter(); | 1009 | irq_enter(); |
1010 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | 1010 | kstat_incr_irq_this_cpu(irq); |
1011 | cd = &per_cpu(mips_clockevent_device, cpu); | 1011 | cd = &per_cpu(mips_clockevent_device, cpu); |
1012 | cd->event_handler(cd); | 1012 | cd->event_handler(cd); |
1013 | irq_exit(); | 1013 | irq_exit(); |
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index 3db64d51798d..58b40ae59335 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c | |||
@@ -148,7 +148,7 @@ static void __irq_entry indy_buserror_irq(void) | |||
148 | int irq = SGI_BUSERR_IRQ; | 148 | int irq = SGI_BUSERR_IRQ; |
149 | 149 | ||
150 | irq_enter(); | 150 | irq_enter(); |
151 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | 151 | kstat_incr_irq_this_cpu(irq); |
152 | ip22_be_interrupt(irq); | 152 | ip22_be_interrupt(irq); |
153 | irq_exit(); | 153 | irq_exit(); |
154 | } | 154 | } |
diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c index 607192449335..045aa89f28d8 100644 --- a/arch/mips/sgi-ip22/ip22-time.c +++ b/arch/mips/sgi-ip22/ip22-time.c | |||
@@ -123,7 +123,7 @@ void __irq_entry indy_8254timer_irq(void) | |||
123 | char c; | 123 | char c; |
124 | 124 | ||
125 | irq_enter(); | 125 | irq_enter(); |
126 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | 126 | kstat_incr_irq_this_cpu(irq); |
127 | printk(KERN_ALERT "Oops, got 8254 interrupt.\n"); | 127 | printk(KERN_ALERT "Oops, got 8254 interrupt.\n"); |
128 | ArcRead(0, &c, 1, &cnt); | 128 | ArcRead(0, &c, 1, &cnt); |
129 | ArcEnterInteractiveMode(); | 129 | ArcEnterInteractiveMode(); |
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c index 09d6e16a70f1..59cfe2659771 100644 --- a/arch/mips/sibyte/bcm1480/irq.c +++ b/arch/mips/sibyte/bcm1480/irq.c | |||
@@ -95,7 +95,7 @@ static int bcm1480_set_affinity(struct irq_data *d, const struct cpumask *mask, | |||
95 | u64 cur_ints; | 95 | u64 cur_ints; |
96 | unsigned long flags; | 96 | unsigned long flags; |
97 | 97 | ||
98 | i = cpumask_first(mask); | 98 | i = cpumask_first_and(mask, cpu_online_mask); |
99 | 99 | ||
100 | /* Convert logical CPU to physical CPU */ | 100 | /* Convert logical CPU to physical CPU */ |
101 | cpu = cpu_logical_map(i); | 101 | cpu = cpu_logical_map(i); |
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c index 54e2c4de15c1..70d9182b26f1 100644 --- a/arch/mips/sibyte/bcm1480/smp.c +++ b/arch/mips/sibyte/bcm1480/smp.c | |||
@@ -182,7 +182,7 @@ void bcm1480_mailbox_interrupt(void) | |||
182 | int irq = K_BCM1480_INT_MBOX_0_0; | 182 | int irq = K_BCM1480_INT_MBOX_0_0; |
183 | unsigned int action; | 183 | unsigned int action; |
184 | 184 | ||
185 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | 185 | kstat_incr_irq_this_cpu(irq); |
186 | /* Load the mailbox register to figure out what we're supposed to do */ | 186 | /* Load the mailbox register to figure out what we're supposed to do */ |
187 | action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff; | 187 | action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff; |
188 | 188 | ||
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index fca0cdb99509..6d8dba5cf348 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -88,7 +88,7 @@ static int sb1250_set_affinity(struct irq_data *d, const struct cpumask *mask, | |||
88 | u64 cur_ints; | 88 | u64 cur_ints; |
89 | unsigned long flags; | 89 | unsigned long flags; |
90 | 90 | ||
91 | i = cpumask_first(mask); | 91 | i = cpumask_first_and(mask, cpu_online_mask); |
92 | 92 | ||
93 | /* Convert logical CPU to physical CPU */ | 93 | /* Convert logical CPU to physical CPU */ |
94 | cpu = cpu_logical_map(i); | 94 | cpu = cpu_logical_map(i); |
diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c index d7b942db0ea5..db976117dd4d 100644 --- a/arch/mips/sibyte/sb1250/smp.c +++ b/arch/mips/sibyte/sb1250/smp.c | |||
@@ -170,7 +170,7 @@ void sb1250_mailbox_interrupt(void) | |||
170 | int irq = K_INT_MBOX_0; | 170 | int irq = K_INT_MBOX_0; |
171 | unsigned int action; | 171 | unsigned int action; |
172 | 172 | ||
173 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | 173 | kstat_incr_irq_this_cpu(irq); |
174 | /* Load the mailbox register to figure out what we're supposed to do */ | 174 | /* Load the mailbox register to figure out what we're supposed to do */ |
175 | action = (____raw_readq(mailbox_regs[cpu]) >> 48) & 0xffff; | 175 | action = (____raw_readq(mailbox_regs[cpu]) >> 48) & 0xffff; |
176 | 176 | ||
diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild index cbc6b9bf45da..654d5ba6e310 100644 --- a/arch/mn10300/include/asm/Kbuild +++ b/arch/mn10300/include/asm/Kbuild | |||
@@ -1,6 +1,7 @@ | |||
1 | 1 | ||
2 | generic-y += barrier.h | 2 | generic-y += barrier.h |
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += cputime.h | ||
4 | generic-y += exec.h | 5 | generic-y += exec.h |
5 | generic-y += hash.h | 6 | generic-y += hash.h |
6 | generic-y += mcs_spinlock.h | 7 | generic-y += mcs_spinlock.h |
diff --git a/arch/mn10300/include/asm/cputime.h b/arch/mn10300/include/asm/cputime.h deleted file mode 100644 index 6d68ad7e0ea3..000000000000 --- a/arch/mn10300/include/asm/cputime.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/cputime.h> | ||
diff --git a/arch/mn10300/kernel/cevt-mn10300.c b/arch/mn10300/kernel/cevt-mn10300.c index ccce35e3e179..60f64ca1752a 100644 --- a/arch/mn10300/kernel/cevt-mn10300.c +++ b/arch/mn10300/kernel/cevt-mn10300.c | |||
@@ -113,7 +113,7 @@ int __init init_clockevents(void) | |||
113 | cd->set_next_event = next_event; | 113 | cd->set_next_event = next_event; |
114 | 114 | ||
115 | iact = &per_cpu(timer_irq, cpu); | 115 | iact = &per_cpu(timer_irq, cpu); |
116 | iact->flags = IRQF_DISABLED | IRQF_SHARED | IRQF_TIMER; | 116 | iact->flags = IRQF_SHARED | IRQF_TIMER; |
117 | iact->handler = timer_interrupt; | 117 | iact->handler = timer_interrupt; |
118 | 118 | ||
119 | clockevents_register_device(cd); | 119 | clockevents_register_device(cd); |
diff --git a/arch/mn10300/kernel/mn10300-serial.c b/arch/mn10300/kernel/mn10300-serial.c index bf6e949a2f87..7ecf69879e2d 100644 --- a/arch/mn10300/kernel/mn10300-serial.c +++ b/arch/mn10300/kernel/mn10300-serial.c | |||
@@ -985,17 +985,17 @@ static int mn10300_serial_startup(struct uart_port *_port) | |||
985 | irq_set_chip(port->tm_irq, &mn10300_serial_pic); | 985 | irq_set_chip(port->tm_irq, &mn10300_serial_pic); |
986 | 986 | ||
987 | if (request_irq(port->rx_irq, mn10300_serial_interrupt, | 987 | if (request_irq(port->rx_irq, mn10300_serial_interrupt, |
988 | IRQF_DISABLED | IRQF_NOBALANCING, | 988 | IRQF_NOBALANCING, |
989 | port->rx_name, port) < 0) | 989 | port->rx_name, port) < 0) |
990 | goto error; | 990 | goto error; |
991 | 991 | ||
992 | if (request_irq(port->tx_irq, mn10300_serial_interrupt, | 992 | if (request_irq(port->tx_irq, mn10300_serial_interrupt, |
993 | IRQF_DISABLED | IRQF_NOBALANCING, | 993 | IRQF_NOBALANCING, |
994 | port->tx_name, port) < 0) | 994 | port->tx_name, port) < 0) |
995 | goto error2; | 995 | goto error2; |
996 | 996 | ||
997 | if (request_irq(port->tm_irq, mn10300_serial_interrupt, | 997 | if (request_irq(port->tm_irq, mn10300_serial_interrupt, |
998 | IRQF_DISABLED | IRQF_NOBALANCING, | 998 | IRQF_NOBALANCING, |
999 | port->tm_name, port) < 0) | 999 | port->tm_name, port) < 0) |
1000 | goto error3; | 1000 | goto error3; |
1001 | mn10300_serial_mask_ack(port->tm_irq); | 1001 | mn10300_serial_mask_ack(port->tm_irq); |
diff --git a/arch/mn10300/kernel/mn10300-watchdog.c b/arch/mn10300/kernel/mn10300-watchdog.c index db64a7166c09..a2d8e6938d67 100644 --- a/arch/mn10300/kernel/mn10300-watchdog.c +++ b/arch/mn10300/kernel/mn10300-watchdog.c | |||
@@ -142,7 +142,7 @@ void watchdog_interrupt(struct pt_regs *regs, enum exception_code excep) | |||
142 | NMICR = NMICR_WDIF; | 142 | NMICR = NMICR_WDIF; |
143 | 143 | ||
144 | nmi_count(smp_processor_id())++; | 144 | nmi_count(smp_processor_id())++; |
145 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | 145 | kstat_incr_irq_this_cpu(irq); |
146 | 146 | ||
147 | for_each_online_cpu(cpu) { | 147 | for_each_online_cpu(cpu) { |
148 | 148 | ||
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c index a17f9c9c14c9..f984193718b1 100644 --- a/arch/mn10300/kernel/smp.c +++ b/arch/mn10300/kernel/smp.c | |||
@@ -143,7 +143,7 @@ static struct irqaction call_function_ipi = { | |||
143 | static irqreturn_t smp_ipi_timer_interrupt(int irq, void *dev_id); | 143 | static irqreturn_t smp_ipi_timer_interrupt(int irq, void *dev_id); |
144 | static struct irqaction local_timer_ipi = { | 144 | static struct irqaction local_timer_ipi = { |
145 | .handler = smp_ipi_timer_interrupt, | 145 | .handler = smp_ipi_timer_interrupt, |
146 | .flags = IRQF_DISABLED | IRQF_NOBALANCING, | 146 | .flags = IRQF_NOBALANCING, |
147 | .name = "smp local timer IPI" | 147 | .name = "smp local timer IPI" |
148 | }; | 148 | }; |
149 | #endif | 149 | #endif |
diff --git a/arch/mn10300/unit-asb2364/irq-fpga.c b/arch/mn10300/unit-asb2364/irq-fpga.c index e16c216f31dc..073e2ccc4a44 100644 --- a/arch/mn10300/unit-asb2364/irq-fpga.c +++ b/arch/mn10300/unit-asb2364/irq-fpga.c | |||
@@ -76,7 +76,7 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask) | |||
76 | static struct irqaction fpga_irq[] = { | 76 | static struct irqaction fpga_irq[] = { |
77 | [0] = { | 77 | [0] = { |
78 | .handler = fpga_interrupt, | 78 | .handler = fpga_interrupt, |
79 | .flags = IRQF_DISABLED | IRQF_SHARED, | 79 | .flags = IRQF_SHARED, |
80 | .name = "fpga", | 80 | .name = "fpga", |
81 | }, | 81 | }, |
82 | }; | 82 | }; |
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 8ceac4785609..cfe056fe7f5c 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -117,7 +117,7 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest) | |||
117 | return -EINVAL; | 117 | return -EINVAL; |
118 | 118 | ||
119 | /* whatever mask they set, we just allow one CPU */ | 119 | /* whatever mask they set, we just allow one CPU */ |
120 | cpu_dest = first_cpu(*dest); | 120 | cpu_dest = cpumask_first_and(dest, cpu_online_mask); |
121 | 121 | ||
122 | return cpu_dest; | 122 | return cpu_dest; |
123 | } | 123 | } |
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index fdc679d309ec..bb61ca58ca6d 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c | |||
@@ -143,13 +143,30 @@ static void eeh_disable_irq(struct pci_dev *dev) | |||
143 | static void eeh_enable_irq(struct pci_dev *dev) | 143 | static void eeh_enable_irq(struct pci_dev *dev) |
144 | { | 144 | { |
145 | struct eeh_dev *edev = pci_dev_to_eeh_dev(dev); | 145 | struct eeh_dev *edev = pci_dev_to_eeh_dev(dev); |
146 | struct irq_desc *desc; | ||
147 | 146 | ||
148 | if ((edev->mode) & EEH_DEV_IRQ_DISABLED) { | 147 | if ((edev->mode) & EEH_DEV_IRQ_DISABLED) { |
149 | edev->mode &= ~EEH_DEV_IRQ_DISABLED; | 148 | edev->mode &= ~EEH_DEV_IRQ_DISABLED; |
150 | 149 | /* | |
151 | desc = irq_to_desc(dev->irq); | 150 | * FIXME !!!!! |
152 | if (desc && desc->depth > 0) | 151 | * |
152 | * This is just ass backwards. This maze has | ||
153 | * unbalanced irq_enable/disable calls. So instead of | ||
154 | * finding the root cause it works around the warning | ||
155 | * in the irq_enable code by conditionally calling | ||
156 | * into it. | ||
157 | * | ||
158 | * That's just wrong.The warning in the core code is | ||
159 | * there to tell people to fix their assymetries in | ||
160 | * their own code, not by abusing the core information | ||
161 | * to avoid it. | ||
162 | * | ||
163 | * I so wish that the assymetry would be the other way | ||
164 | * round and a few more irq_disable calls render that | ||
165 | * shit unusable forever. | ||
166 | * | ||
167 | * tglx | ||
168 | */ | ||
169 | if (irqd_irq_disabled(irq_get_irq_data(dev->irq))) | ||
153 | enable_irq(dev->irq); | 170 | enable_irq(dev->irq); |
154 | } | 171 | } |
155 | } | 172 | } |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 1d0848bba049..ca1cd7459c4a 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -465,7 +465,6 @@ static inline void check_stack_overflow(void) | |||
465 | 465 | ||
466 | void __do_irq(struct pt_regs *regs) | 466 | void __do_irq(struct pt_regs *regs) |
467 | { | 467 | { |
468 | struct irq_desc *desc; | ||
469 | unsigned int irq; | 468 | unsigned int irq; |
470 | 469 | ||
471 | irq_enter(); | 470 | irq_enter(); |
@@ -487,11 +486,8 @@ void __do_irq(struct pt_regs *regs) | |||
487 | /* And finally process it */ | 486 | /* And finally process it */ |
488 | if (unlikely(irq == NO_IRQ)) | 487 | if (unlikely(irq == NO_IRQ)) |
489 | __get_cpu_var(irq_stat).spurious_irqs++; | 488 | __get_cpu_var(irq_stat).spurious_irqs++; |
490 | else { | 489 | else |
491 | desc = irq_to_desc(irq); | 490 | generic_handle_irq(irq); |
492 | if (likely(desc)) | ||
493 | desc->handle_irq(irq, desc); | ||
494 | } | ||
495 | 491 | ||
496 | trace_irq_exit(regs); | 492 | trace_irq_exit(regs); |
497 | 493 | ||
diff --git a/arch/powerpc/sysdev/ehv_pic.c b/arch/powerpc/sysdev/ehv_pic.c index b74085cea1af..2d20f10a4203 100644 --- a/arch/powerpc/sysdev/ehv_pic.c +++ b/arch/powerpc/sysdev/ehv_pic.c | |||
@@ -28,8 +28,6 @@ | |||
28 | #include <asm/ehv_pic.h> | 28 | #include <asm/ehv_pic.h> |
29 | #include <asm/fsl_hcalls.h> | 29 | #include <asm/fsl_hcalls.h> |
30 | 30 | ||
31 | #include "../../../kernel/irq/settings.h" | ||
32 | |||
33 | static struct ehv_pic *global_ehv_pic; | 31 | static struct ehv_pic *global_ehv_pic; |
34 | static DEFINE_SPINLOCK(ehv_pic_lock); | 32 | static DEFINE_SPINLOCK(ehv_pic_lock); |
35 | 33 | ||
@@ -113,17 +111,13 @@ static unsigned int ehv_pic_type_to_vecpri(unsigned int type) | |||
113 | int ehv_pic_set_irq_type(struct irq_data *d, unsigned int flow_type) | 111 | int ehv_pic_set_irq_type(struct irq_data *d, unsigned int flow_type) |
114 | { | 112 | { |
115 | unsigned int src = virq_to_hw(d->irq); | 113 | unsigned int src = virq_to_hw(d->irq); |
116 | struct irq_desc *desc = irq_to_desc(d->irq); | ||
117 | unsigned int vecpri, vold, vnew, prio, cpu_dest; | 114 | unsigned int vecpri, vold, vnew, prio, cpu_dest; |
118 | unsigned long flags; | 115 | unsigned long flags; |
119 | 116 | ||
120 | if (flow_type == IRQ_TYPE_NONE) | 117 | if (flow_type == IRQ_TYPE_NONE) |
121 | flow_type = IRQ_TYPE_LEVEL_LOW; | 118 | flow_type = IRQ_TYPE_LEVEL_LOW; |
122 | 119 | ||
123 | irq_settings_clr_level(desc); | 120 | irqd_set_trigger_type(d, flow_type); |
124 | irq_settings_set_trigger_mask(desc, flow_type); | ||
125 | if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) | ||
126 | irq_settings_set_level(desc); | ||
127 | 121 | ||
128 | vecpri = ehv_pic_type_to_vecpri(flow_type); | 122 | vecpri = ehv_pic_type_to_vecpri(flow_type); |
129 | 123 | ||
@@ -144,7 +138,7 @@ int ehv_pic_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
144 | ev_int_set_config(src, vecpri, prio, cpu_dest); | 138 | ev_int_set_config(src, vecpri, prio, cpu_dest); |
145 | 139 | ||
146 | spin_unlock_irqrestore(&ehv_pic_lock, flags); | 140 | spin_unlock_irqrestore(&ehv_pic_lock, flags); |
147 | return 0; | 141 | return IRQ_SET_MASK_OK_NOCOPY; |
148 | } | 142 | } |
149 | 143 | ||
150 | static struct irq_chip ehv_pic_irq_chip = { | 144 | static struct irq_chip ehv_pic_irq_chip = { |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index bb74b21f007a..953f17c8d17c 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -141,6 +141,7 @@ config S390 | |||
141 | select OLD_SIGACTION | 141 | select OLD_SIGACTION |
142 | select OLD_SIGSUSPEND3 | 142 | select OLD_SIGSUSPEND3 |
143 | select SYSCTL_EXCEPTION_TRACE | 143 | select SYSCTL_EXCEPTION_TRACE |
144 | select TTY | ||
144 | select VIRT_CPU_ACCOUNTING | 145 | select VIRT_CPU_ACCOUNTING |
145 | select VIRT_TO_BUS | 146 | select VIRT_TO_BUS |
146 | 147 | ||
@@ -416,6 +417,10 @@ config ARCH_ENABLE_MEMORY_HOTPLUG | |||
416 | config ARCH_ENABLE_MEMORY_HOTREMOVE | 417 | config ARCH_ENABLE_MEMORY_HOTREMOVE |
417 | def_bool y | 418 | def_bool y |
418 | 419 | ||
420 | config ARCH_ENABLE_SPLIT_PMD_PTLOCK | ||
421 | def_bool y | ||
422 | depends on 64BIT | ||
423 | |||
419 | config FORCE_MAX_ZONEORDER | 424 | config FORCE_MAX_ZONEORDER |
420 | int | 425 | int |
421 | default "9" | 426 | default "9" |
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c index de8e2b3b0180..69b23b25ac34 100644 --- a/arch/s390/appldata/appldata_os.c +++ b/arch/s390/appldata/appldata_os.c | |||
@@ -171,7 +171,7 @@ static int __init appldata_os_init(void) | |||
171 | int rc, max_size; | 171 | int rc, max_size; |
172 | 172 | ||
173 | max_size = sizeof(struct appldata_os_data) + | 173 | max_size = sizeof(struct appldata_os_data) + |
174 | (NR_CPUS * sizeof(struct appldata_os_per_cpu)); | 174 | (num_possible_cpus() * sizeof(struct appldata_os_per_cpu)); |
175 | if (max_size > APPLDATA_MAX_REC_SIZE) { | 175 | if (max_size > APPLDATA_MAX_REC_SIZE) { |
176 | pr_err("Maximum OS record size %i exceeds the maximum " | 176 | pr_err("Maximum OS record size %i exceeds the maximum " |
177 | "record size %i\n", max_size, APPLDATA_MAX_REC_SIZE); | 177 | "record size %i\n", max_size, APPLDATA_MAX_REC_SIZE); |
diff --git a/arch/s390/configs/default_defconfig b/arch/s390/configs/default_defconfig index e0af2ee58751..ddaae2f5c913 100644 --- a/arch/s390/configs/default_defconfig +++ b/arch/s390/configs/default_defconfig | |||
@@ -46,6 +46,7 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
46 | CONFIG_CFQ_GROUP_IOSCHED=y | 46 | CONFIG_CFQ_GROUP_IOSCHED=y |
47 | CONFIG_DEFAULT_DEADLINE=y | 47 | CONFIG_DEFAULT_DEADLINE=y |
48 | CONFIG_MARCH_Z9_109=y | 48 | CONFIG_MARCH_Z9_109=y |
49 | CONFIG_NR_CPUS=256 | ||
49 | CONFIG_PREEMPT=y | 50 | CONFIG_PREEMPT=y |
50 | CONFIG_HZ_100=y | 51 | CONFIG_HZ_100=y |
51 | CONFIG_MEMORY_HOTPLUG=y | 52 | CONFIG_MEMORY_HOTPLUG=y |
@@ -58,7 +59,6 @@ CONFIG_HOTPLUG_PCI=y | |||
58 | CONFIG_HOTPLUG_PCI_S390=y | 59 | CONFIG_HOTPLUG_PCI_S390=y |
59 | CONFIG_CHSC_SCH=y | 60 | CONFIG_CHSC_SCH=y |
60 | CONFIG_CRASH_DUMP=y | 61 | CONFIG_CRASH_DUMP=y |
61 | CONFIG_ZFCPDUMP=y | ||
62 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 62 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
63 | CONFIG_BINFMT_MISC=m | 63 | CONFIG_BINFMT_MISC=m |
64 | CONFIG_HIBERNATION=y | 64 | CONFIG_HIBERNATION=y |
@@ -101,7 +101,6 @@ CONFIG_TCP_CONG_VENO=m | |||
101 | CONFIG_TCP_CONG_YEAH=m | 101 | CONFIG_TCP_CONG_YEAH=m |
102 | CONFIG_TCP_CONG_ILLINOIS=m | 102 | CONFIG_TCP_CONG_ILLINOIS=m |
103 | CONFIG_IPV6=y | 103 | CONFIG_IPV6=y |
104 | CONFIG_IPV6_PRIVACY=y | ||
105 | CONFIG_IPV6_ROUTER_PREF=y | 104 | CONFIG_IPV6_ROUTER_PREF=y |
106 | CONFIG_INET6_AH=m | 105 | CONFIG_INET6_AH=m |
107 | CONFIG_INET6_ESP=m | 106 | CONFIG_INET6_ESP=m |
@@ -111,6 +110,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m | |||
111 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | 110 | CONFIG_INET6_XFRM_MODE_TUNNEL=m |
112 | CONFIG_INET6_XFRM_MODE_BEET=m | 111 | CONFIG_INET6_XFRM_MODE_BEET=m |
113 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | 112 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m |
113 | CONFIG_IPV6_VTI=m | ||
114 | CONFIG_IPV6_SIT=m | 114 | CONFIG_IPV6_SIT=m |
115 | CONFIG_IPV6_GRE=m | 115 | CONFIG_IPV6_GRE=m |
116 | CONFIG_IPV6_MULTIPLE_TABLES=y | 116 | CONFIG_IPV6_MULTIPLE_TABLES=y |
@@ -135,7 +135,17 @@ CONFIG_NF_CONNTRACK_SIP=m | |||
135 | CONFIG_NF_CONNTRACK_TFTP=m | 135 | CONFIG_NF_CONNTRACK_TFTP=m |
136 | CONFIG_NF_CT_NETLINK=m | 136 | CONFIG_NF_CT_NETLINK=m |
137 | CONFIG_NF_CT_NETLINK_TIMEOUT=m | 137 | CONFIG_NF_CT_NETLINK_TIMEOUT=m |
138 | CONFIG_NETFILTER_TPROXY=m | 138 | CONFIG_NF_TABLES=m |
139 | CONFIG_NFT_EXTHDR=m | ||
140 | CONFIG_NFT_META=m | ||
141 | CONFIG_NFT_CT=m | ||
142 | CONFIG_NFT_RBTREE=m | ||
143 | CONFIG_NFT_HASH=m | ||
144 | CONFIG_NFT_COUNTER=m | ||
145 | CONFIG_NFT_LOG=m | ||
146 | CONFIG_NFT_LIMIT=m | ||
147 | CONFIG_NFT_NAT=m | ||
148 | CONFIG_NFT_COMPAT=m | ||
139 | CONFIG_NETFILTER_XT_SET=m | 149 | CONFIG_NETFILTER_XT_SET=m |
140 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m | 150 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m |
141 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 151 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -204,7 +214,9 @@ CONFIG_IP_SET_HASH_IP=m | |||
204 | CONFIG_IP_SET_HASH_IPPORT=m | 214 | CONFIG_IP_SET_HASH_IPPORT=m |
205 | CONFIG_IP_SET_HASH_IPPORTIP=m | 215 | CONFIG_IP_SET_HASH_IPPORTIP=m |
206 | CONFIG_IP_SET_HASH_IPPORTNET=m | 216 | CONFIG_IP_SET_HASH_IPPORTNET=m |
217 | CONFIG_IP_SET_HASH_NETPORTNET=m | ||
207 | CONFIG_IP_SET_HASH_NET=m | 218 | CONFIG_IP_SET_HASH_NET=m |
219 | CONFIG_IP_SET_HASH_NETNET=m | ||
208 | CONFIG_IP_SET_HASH_NETPORT=m | 220 | CONFIG_IP_SET_HASH_NETPORT=m |
209 | CONFIG_IP_SET_HASH_NETIFACE=m | 221 | CONFIG_IP_SET_HASH_NETIFACE=m |
210 | CONFIG_IP_SET_LIST_SET=m | 222 | CONFIG_IP_SET_LIST_SET=m |
@@ -227,6 +239,11 @@ CONFIG_IP_VS_FTP=m | |||
227 | CONFIG_IP_VS_PE_SIP=m | 239 | CONFIG_IP_VS_PE_SIP=m |
228 | CONFIG_NF_CONNTRACK_IPV4=m | 240 | CONFIG_NF_CONNTRACK_IPV4=m |
229 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set | 241 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set |
242 | CONFIG_NF_TABLES_IPV4=m | ||
243 | CONFIG_NFT_REJECT_IPV4=m | ||
244 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | ||
245 | CONFIG_NFT_CHAIN_NAT_IPV4=m | ||
246 | CONFIG_NF_TABLES_ARP=m | ||
230 | CONFIG_IP_NF_IPTABLES=m | 247 | CONFIG_IP_NF_IPTABLES=m |
231 | CONFIG_IP_NF_MATCH_AH=m | 248 | CONFIG_IP_NF_MATCH_AH=m |
232 | CONFIG_IP_NF_MATCH_ECN=m | 249 | CONFIG_IP_NF_MATCH_ECN=m |
@@ -249,6 +266,9 @@ CONFIG_IP_NF_ARPTABLES=m | |||
249 | CONFIG_IP_NF_ARPFILTER=m | 266 | CONFIG_IP_NF_ARPFILTER=m |
250 | CONFIG_IP_NF_ARP_MANGLE=m | 267 | CONFIG_IP_NF_ARP_MANGLE=m |
251 | CONFIG_NF_CONNTRACK_IPV6=m | 268 | CONFIG_NF_CONNTRACK_IPV6=m |
269 | CONFIG_NF_TABLES_IPV6=m | ||
270 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | ||
271 | CONFIG_NFT_CHAIN_NAT_IPV6=m | ||
252 | CONFIG_IP6_NF_IPTABLES=m | 272 | CONFIG_IP6_NF_IPTABLES=m |
253 | CONFIG_IP6_NF_MATCH_AH=m | 273 | CONFIG_IP6_NF_MATCH_AH=m |
254 | CONFIG_IP6_NF_MATCH_EUI64=m | 274 | CONFIG_IP6_NF_MATCH_EUI64=m |
@@ -268,6 +288,7 @@ CONFIG_IP6_NF_SECURITY=m | |||
268 | CONFIG_NF_NAT_IPV6=m | 288 | CONFIG_NF_NAT_IPV6=m |
269 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | 289 | CONFIG_IP6_NF_TARGET_MASQUERADE=m |
270 | CONFIG_IP6_NF_TARGET_NPT=m | 290 | CONFIG_IP6_NF_TARGET_NPT=m |
291 | CONFIG_NF_TABLES_BRIDGE=m | ||
271 | CONFIG_NET_SCTPPROBE=m | 292 | CONFIG_NET_SCTPPROBE=m |
272 | CONFIG_RDS=m | 293 | CONFIG_RDS=m |
273 | CONFIG_RDS_RDMA=m | 294 | CONFIG_RDS_RDMA=m |
@@ -314,6 +335,7 @@ CONFIG_NET_CLS_RSVP=m | |||
314 | CONFIG_NET_CLS_RSVP6=m | 335 | CONFIG_NET_CLS_RSVP6=m |
315 | CONFIG_NET_CLS_FLOW=m | 336 | CONFIG_NET_CLS_FLOW=m |
316 | CONFIG_NET_CLS_CGROUP=y | 337 | CONFIG_NET_CLS_CGROUP=y |
338 | CONFIG_NET_CLS_BPF=m | ||
317 | CONFIG_NET_CLS_ACT=y | 339 | CONFIG_NET_CLS_ACT=y |
318 | CONFIG_NET_ACT_POLICE=m | 340 | CONFIG_NET_ACT_POLICE=m |
319 | CONFIG_NET_ACT_GACT=m | 341 | CONFIG_NET_ACT_GACT=m |
@@ -381,8 +403,8 @@ CONFIG_BLK_DEV_DM=m | |||
381 | CONFIG_DM_CRYPT=m | 403 | CONFIG_DM_CRYPT=m |
382 | CONFIG_DM_SNAPSHOT=m | 404 | CONFIG_DM_SNAPSHOT=m |
383 | CONFIG_DM_MIRROR=m | 405 | CONFIG_DM_MIRROR=m |
384 | CONFIG_DM_RAID=m | ||
385 | CONFIG_DM_LOG_USERSPACE=m | 406 | CONFIG_DM_LOG_USERSPACE=m |
407 | CONFIG_DM_RAID=m | ||
386 | CONFIG_DM_ZERO=m | 408 | CONFIG_DM_ZERO=m |
387 | CONFIG_DM_MULTIPATH=m | 409 | CONFIG_DM_MULTIPATH=m |
388 | CONFIG_DM_MULTIPATH_QL=m | 410 | CONFIG_DM_MULTIPATH_QL=m |
@@ -434,7 +456,6 @@ CONFIG_TN3270_FS=y | |||
434 | CONFIG_WATCHDOG=y | 456 | CONFIG_WATCHDOG=y |
435 | CONFIG_WATCHDOG_NOWAYOUT=y | 457 | CONFIG_WATCHDOG_NOWAYOUT=y |
436 | CONFIG_SOFT_WATCHDOG=m | 458 | CONFIG_SOFT_WATCHDOG=m |
437 | CONFIG_ZVM_WATCHDOG=m | ||
438 | # CONFIG_HID is not set | 459 | # CONFIG_HID is not set |
439 | # CONFIG_USB_SUPPORT is not set | 460 | # CONFIG_USB_SUPPORT is not set |
440 | CONFIG_INFINIBAND=m | 461 | CONFIG_INFINIBAND=m |
@@ -534,13 +555,23 @@ CONFIG_UNUSED_SYMBOLS=y | |||
534 | CONFIG_MAGIC_SYSRQ=y | 555 | CONFIG_MAGIC_SYSRQ=y |
535 | CONFIG_DEBUG_KERNEL=y | 556 | CONFIG_DEBUG_KERNEL=y |
536 | CONFIG_DEBUG_PAGEALLOC=y | 557 | CONFIG_DEBUG_PAGEALLOC=y |
558 | CONFIG_DEBUG_OBJECTS=y | ||
559 | CONFIG_DEBUG_OBJECTS_SELFTEST=y | ||
560 | CONFIG_DEBUG_OBJECTS_FREE=y | ||
561 | CONFIG_DEBUG_OBJECTS_TIMERS=y | ||
562 | CONFIG_DEBUG_OBJECTS_WORK=y | ||
563 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
564 | CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y | ||
537 | CONFIG_SLUB_DEBUG_ON=y | 565 | CONFIG_SLUB_DEBUG_ON=y |
538 | CONFIG_SLUB_STATS=y | 566 | CONFIG_SLUB_STATS=y |
567 | CONFIG_DEBUG_KMEMLEAK=y | ||
539 | CONFIG_DEBUG_STACK_USAGE=y | 568 | CONFIG_DEBUG_STACK_USAGE=y |
540 | CONFIG_DEBUG_VM=y | 569 | CONFIG_DEBUG_VM=y |
541 | CONFIG_DEBUG_VM_RB=y | 570 | CONFIG_DEBUG_VM_RB=y |
542 | CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m | 571 | CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m |
543 | CONFIG_DEBUG_PER_CPU_MAPS=y | 572 | CONFIG_DEBUG_PER_CPU_MAPS=y |
573 | CONFIG_DEBUG_SHIRQ=y | ||
574 | CONFIG_DETECT_HUNG_TASK=y | ||
544 | CONFIG_TIMER_STATS=y | 575 | CONFIG_TIMER_STATS=y |
545 | CONFIG_DEBUG_RT_MUTEXES=y | 576 | CONFIG_DEBUG_RT_MUTEXES=y |
546 | CONFIG_RT_MUTEX_TESTER=y | 577 | CONFIG_RT_MUTEX_TESTER=y |
@@ -573,9 +604,11 @@ CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y | |||
573 | CONFIG_BLK_DEV_IO_TRACE=y | 604 | CONFIG_BLK_DEV_IO_TRACE=y |
574 | # CONFIG_KPROBE_EVENT is not set | 605 | # CONFIG_KPROBE_EVENT is not set |
575 | CONFIG_LKDTM=m | 606 | CONFIG_LKDTM=m |
607 | CONFIG_TEST_LIST_SORT=y | ||
576 | CONFIG_KPROBES_SANITY_TEST=y | 608 | CONFIG_KPROBES_SANITY_TEST=y |
577 | CONFIG_RBTREE_TEST=m | 609 | CONFIG_RBTREE_TEST=y |
578 | CONFIG_INTERVAL_TREE_TEST=m | 610 | CONFIG_INTERVAL_TREE_TEST=m |
611 | CONFIG_PERCPU_TEST=m | ||
579 | CONFIG_ATOMIC64_SELFTEST=y | 612 | CONFIG_ATOMIC64_SELFTEST=y |
580 | CONFIG_DMA_API_DEBUG=y | 613 | CONFIG_DMA_API_DEBUG=y |
581 | # CONFIG_STRICT_DEVMEM is not set | 614 | # CONFIG_STRICT_DEVMEM is not set |
@@ -638,7 +671,6 @@ CONFIG_CRYPTO_AES_S390=m | |||
638 | CONFIG_CRYPTO_GHASH_S390=m | 671 | CONFIG_CRYPTO_GHASH_S390=m |
639 | CONFIG_ASYMMETRIC_KEY_TYPE=m | 672 | CONFIG_ASYMMETRIC_KEY_TYPE=m |
640 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | 673 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m |
641 | CONFIG_PUBLIC_KEY_ALGO_RSA=m | ||
642 | CONFIG_X509_CERTIFICATE_PARSER=m | 674 | CONFIG_X509_CERTIFICATE_PARSER=m |
643 | CONFIG_CRC7=m | 675 | CONFIG_CRC7=m |
644 | CONFIG_CRC8=m | 676 | CONFIG_CRC8=m |
diff --git a/arch/s390/configs/gcov_defconfig b/arch/s390/configs/gcov_defconfig index b9f6b4cab927..c81a74e3e25a 100644 --- a/arch/s390/configs/gcov_defconfig +++ b/arch/s390/configs/gcov_defconfig | |||
@@ -46,6 +46,7 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
46 | CONFIG_CFQ_GROUP_IOSCHED=y | 46 | CONFIG_CFQ_GROUP_IOSCHED=y |
47 | CONFIG_DEFAULT_DEADLINE=y | 47 | CONFIG_DEFAULT_DEADLINE=y |
48 | CONFIG_MARCH_Z9_109=y | 48 | CONFIG_MARCH_Z9_109=y |
49 | CONFIG_NR_CPUS=256 | ||
49 | CONFIG_HZ_100=y | 50 | CONFIG_HZ_100=y |
50 | CONFIG_MEMORY_HOTPLUG=y | 51 | CONFIG_MEMORY_HOTPLUG=y |
51 | CONFIG_MEMORY_HOTREMOVE=y | 52 | CONFIG_MEMORY_HOTREMOVE=y |
@@ -56,7 +57,6 @@ CONFIG_HOTPLUG_PCI=y | |||
56 | CONFIG_HOTPLUG_PCI_S390=y | 57 | CONFIG_HOTPLUG_PCI_S390=y |
57 | CONFIG_CHSC_SCH=y | 58 | CONFIG_CHSC_SCH=y |
58 | CONFIG_CRASH_DUMP=y | 59 | CONFIG_CRASH_DUMP=y |
59 | CONFIG_ZFCPDUMP=y | ||
60 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 60 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
61 | CONFIG_BINFMT_MISC=m | 61 | CONFIG_BINFMT_MISC=m |
62 | CONFIG_HIBERNATION=y | 62 | CONFIG_HIBERNATION=y |
@@ -99,7 +99,6 @@ CONFIG_TCP_CONG_VENO=m | |||
99 | CONFIG_TCP_CONG_YEAH=m | 99 | CONFIG_TCP_CONG_YEAH=m |
100 | CONFIG_TCP_CONG_ILLINOIS=m | 100 | CONFIG_TCP_CONG_ILLINOIS=m |
101 | CONFIG_IPV6=y | 101 | CONFIG_IPV6=y |
102 | CONFIG_IPV6_PRIVACY=y | ||
103 | CONFIG_IPV6_ROUTER_PREF=y | 102 | CONFIG_IPV6_ROUTER_PREF=y |
104 | CONFIG_INET6_AH=m | 103 | CONFIG_INET6_AH=m |
105 | CONFIG_INET6_ESP=m | 104 | CONFIG_INET6_ESP=m |
@@ -109,6 +108,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m | |||
109 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | 108 | CONFIG_INET6_XFRM_MODE_TUNNEL=m |
110 | CONFIG_INET6_XFRM_MODE_BEET=m | 109 | CONFIG_INET6_XFRM_MODE_BEET=m |
111 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | 110 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m |
111 | CONFIG_IPV6_VTI=m | ||
112 | CONFIG_IPV6_SIT=m | 112 | CONFIG_IPV6_SIT=m |
113 | CONFIG_IPV6_GRE=m | 113 | CONFIG_IPV6_GRE=m |
114 | CONFIG_IPV6_MULTIPLE_TABLES=y | 114 | CONFIG_IPV6_MULTIPLE_TABLES=y |
@@ -133,7 +133,17 @@ CONFIG_NF_CONNTRACK_SIP=m | |||
133 | CONFIG_NF_CONNTRACK_TFTP=m | 133 | CONFIG_NF_CONNTRACK_TFTP=m |
134 | CONFIG_NF_CT_NETLINK=m | 134 | CONFIG_NF_CT_NETLINK=m |
135 | CONFIG_NF_CT_NETLINK_TIMEOUT=m | 135 | CONFIG_NF_CT_NETLINK_TIMEOUT=m |
136 | CONFIG_NETFILTER_TPROXY=m | 136 | CONFIG_NF_TABLES=m |
137 | CONFIG_NFT_EXTHDR=m | ||
138 | CONFIG_NFT_META=m | ||
139 | CONFIG_NFT_CT=m | ||
140 | CONFIG_NFT_RBTREE=m | ||
141 | CONFIG_NFT_HASH=m | ||
142 | CONFIG_NFT_COUNTER=m | ||
143 | CONFIG_NFT_LOG=m | ||
144 | CONFIG_NFT_LIMIT=m | ||
145 | CONFIG_NFT_NAT=m | ||
146 | CONFIG_NFT_COMPAT=m | ||
137 | CONFIG_NETFILTER_XT_SET=m | 147 | CONFIG_NETFILTER_XT_SET=m |
138 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m | 148 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m |
139 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 149 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -202,7 +212,9 @@ CONFIG_IP_SET_HASH_IP=m | |||
202 | CONFIG_IP_SET_HASH_IPPORT=m | 212 | CONFIG_IP_SET_HASH_IPPORT=m |
203 | CONFIG_IP_SET_HASH_IPPORTIP=m | 213 | CONFIG_IP_SET_HASH_IPPORTIP=m |
204 | CONFIG_IP_SET_HASH_IPPORTNET=m | 214 | CONFIG_IP_SET_HASH_IPPORTNET=m |
215 | CONFIG_IP_SET_HASH_NETPORTNET=m | ||
205 | CONFIG_IP_SET_HASH_NET=m | 216 | CONFIG_IP_SET_HASH_NET=m |
217 | CONFIG_IP_SET_HASH_NETNET=m | ||
206 | CONFIG_IP_SET_HASH_NETPORT=m | 218 | CONFIG_IP_SET_HASH_NETPORT=m |
207 | CONFIG_IP_SET_HASH_NETIFACE=m | 219 | CONFIG_IP_SET_HASH_NETIFACE=m |
208 | CONFIG_IP_SET_LIST_SET=m | 220 | CONFIG_IP_SET_LIST_SET=m |
@@ -225,6 +237,11 @@ CONFIG_IP_VS_FTP=m | |||
225 | CONFIG_IP_VS_PE_SIP=m | 237 | CONFIG_IP_VS_PE_SIP=m |
226 | CONFIG_NF_CONNTRACK_IPV4=m | 238 | CONFIG_NF_CONNTRACK_IPV4=m |
227 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set | 239 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set |
240 | CONFIG_NF_TABLES_IPV4=m | ||
241 | CONFIG_NFT_REJECT_IPV4=m | ||
242 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | ||
243 | CONFIG_NFT_CHAIN_NAT_IPV4=m | ||
244 | CONFIG_NF_TABLES_ARP=m | ||
228 | CONFIG_IP_NF_IPTABLES=m | 245 | CONFIG_IP_NF_IPTABLES=m |
229 | CONFIG_IP_NF_MATCH_AH=m | 246 | CONFIG_IP_NF_MATCH_AH=m |
230 | CONFIG_IP_NF_MATCH_ECN=m | 247 | CONFIG_IP_NF_MATCH_ECN=m |
@@ -247,6 +264,9 @@ CONFIG_IP_NF_ARPTABLES=m | |||
247 | CONFIG_IP_NF_ARPFILTER=m | 264 | CONFIG_IP_NF_ARPFILTER=m |
248 | CONFIG_IP_NF_ARP_MANGLE=m | 265 | CONFIG_IP_NF_ARP_MANGLE=m |
249 | CONFIG_NF_CONNTRACK_IPV6=m | 266 | CONFIG_NF_CONNTRACK_IPV6=m |
267 | CONFIG_NF_TABLES_IPV6=m | ||
268 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | ||
269 | CONFIG_NFT_CHAIN_NAT_IPV6=m | ||
250 | CONFIG_IP6_NF_IPTABLES=m | 270 | CONFIG_IP6_NF_IPTABLES=m |
251 | CONFIG_IP6_NF_MATCH_AH=m | 271 | CONFIG_IP6_NF_MATCH_AH=m |
252 | CONFIG_IP6_NF_MATCH_EUI64=m | 272 | CONFIG_IP6_NF_MATCH_EUI64=m |
@@ -266,6 +286,7 @@ CONFIG_IP6_NF_SECURITY=m | |||
266 | CONFIG_NF_NAT_IPV6=m | 286 | CONFIG_NF_NAT_IPV6=m |
267 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | 287 | CONFIG_IP6_NF_TARGET_MASQUERADE=m |
268 | CONFIG_IP6_NF_TARGET_NPT=m | 288 | CONFIG_IP6_NF_TARGET_NPT=m |
289 | CONFIG_NF_TABLES_BRIDGE=m | ||
269 | CONFIG_NET_SCTPPROBE=m | 290 | CONFIG_NET_SCTPPROBE=m |
270 | CONFIG_RDS=m | 291 | CONFIG_RDS=m |
271 | CONFIG_RDS_RDMA=m | 292 | CONFIG_RDS_RDMA=m |
@@ -311,6 +332,7 @@ CONFIG_NET_CLS_RSVP=m | |||
311 | CONFIG_NET_CLS_RSVP6=m | 332 | CONFIG_NET_CLS_RSVP6=m |
312 | CONFIG_NET_CLS_FLOW=m | 333 | CONFIG_NET_CLS_FLOW=m |
313 | CONFIG_NET_CLS_CGROUP=y | 334 | CONFIG_NET_CLS_CGROUP=y |
335 | CONFIG_NET_CLS_BPF=m | ||
314 | CONFIG_NET_CLS_ACT=y | 336 | CONFIG_NET_CLS_ACT=y |
315 | CONFIG_NET_ACT_POLICE=m | 337 | CONFIG_NET_ACT_POLICE=m |
316 | CONFIG_NET_ACT_GACT=m | 338 | CONFIG_NET_ACT_GACT=m |
@@ -378,8 +400,8 @@ CONFIG_BLK_DEV_DM=m | |||
378 | CONFIG_DM_CRYPT=m | 400 | CONFIG_DM_CRYPT=m |
379 | CONFIG_DM_SNAPSHOT=m | 401 | CONFIG_DM_SNAPSHOT=m |
380 | CONFIG_DM_MIRROR=m | 402 | CONFIG_DM_MIRROR=m |
381 | CONFIG_DM_RAID=m | ||
382 | CONFIG_DM_LOG_USERSPACE=m | 403 | CONFIG_DM_LOG_USERSPACE=m |
404 | CONFIG_DM_RAID=m | ||
383 | CONFIG_DM_ZERO=m | 405 | CONFIG_DM_ZERO=m |
384 | CONFIG_DM_MULTIPATH=m | 406 | CONFIG_DM_MULTIPATH=m |
385 | CONFIG_DM_MULTIPATH_QL=m | 407 | CONFIG_DM_MULTIPATH_QL=m |
@@ -431,7 +453,6 @@ CONFIG_TN3270_FS=y | |||
431 | CONFIG_WATCHDOG=y | 453 | CONFIG_WATCHDOG=y |
432 | CONFIG_WATCHDOG_NOWAYOUT=y | 454 | CONFIG_WATCHDOG_NOWAYOUT=y |
433 | CONFIG_SOFT_WATCHDOG=m | 455 | CONFIG_SOFT_WATCHDOG=m |
434 | CONFIG_ZVM_WATCHDOG=m | ||
435 | # CONFIG_HID is not set | 456 | # CONFIG_HID is not set |
436 | # CONFIG_USB_SUPPORT is not set | 457 | # CONFIG_USB_SUPPORT is not set |
437 | CONFIG_INFINIBAND=m | 458 | CONFIG_INFINIBAND=m |
@@ -540,6 +561,7 @@ CONFIG_BLK_DEV_IO_TRACE=y | |||
540 | CONFIG_LKDTM=m | 561 | CONFIG_LKDTM=m |
541 | CONFIG_RBTREE_TEST=m | 562 | CONFIG_RBTREE_TEST=m |
542 | CONFIG_INTERVAL_TREE_TEST=m | 563 | CONFIG_INTERVAL_TREE_TEST=m |
564 | CONFIG_PERCPU_TEST=m | ||
543 | CONFIG_ATOMIC64_SELFTEST=y | 565 | CONFIG_ATOMIC64_SELFTEST=y |
544 | # CONFIG_STRICT_DEVMEM is not set | 566 | # CONFIG_STRICT_DEVMEM is not set |
545 | CONFIG_S390_PTDUMP=y | 567 | CONFIG_S390_PTDUMP=y |
@@ -601,7 +623,6 @@ CONFIG_CRYPTO_AES_S390=m | |||
601 | CONFIG_CRYPTO_GHASH_S390=m | 623 | CONFIG_CRYPTO_GHASH_S390=m |
602 | CONFIG_ASYMMETRIC_KEY_TYPE=m | 624 | CONFIG_ASYMMETRIC_KEY_TYPE=m |
603 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | 625 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m |
604 | CONFIG_PUBLIC_KEY_ALGO_RSA=m | ||
605 | CONFIG_X509_CERTIFICATE_PARSER=m | 626 | CONFIG_X509_CERTIFICATE_PARSER=m |
606 | CONFIG_CRC7=m | 627 | CONFIG_CRC7=m |
607 | CONFIG_CRC8=m | 628 | CONFIG_CRC8=m |
diff --git a/arch/s390/configs/performance_defconfig b/arch/s390/configs/performance_defconfig index 91087b43e8fa..b5ba8fe1cc64 100644 --- a/arch/s390/configs/performance_defconfig +++ b/arch/s390/configs/performance_defconfig | |||
@@ -44,6 +44,7 @@ CONFIG_UNIXWARE_DISKLABEL=y | |||
44 | CONFIG_CFQ_GROUP_IOSCHED=y | 44 | CONFIG_CFQ_GROUP_IOSCHED=y |
45 | CONFIG_DEFAULT_DEADLINE=y | 45 | CONFIG_DEFAULT_DEADLINE=y |
46 | CONFIG_MARCH_Z9_109=y | 46 | CONFIG_MARCH_Z9_109=y |
47 | CONFIG_NR_CPUS=256 | ||
47 | CONFIG_HZ_100=y | 48 | CONFIG_HZ_100=y |
48 | CONFIG_MEMORY_HOTPLUG=y | 49 | CONFIG_MEMORY_HOTPLUG=y |
49 | CONFIG_MEMORY_HOTREMOVE=y | 50 | CONFIG_MEMORY_HOTREMOVE=y |
@@ -54,7 +55,6 @@ CONFIG_HOTPLUG_PCI=y | |||
54 | CONFIG_HOTPLUG_PCI_S390=y | 55 | CONFIG_HOTPLUG_PCI_S390=y |
55 | CONFIG_CHSC_SCH=y | 56 | CONFIG_CHSC_SCH=y |
56 | CONFIG_CRASH_DUMP=y | 57 | CONFIG_CRASH_DUMP=y |
57 | CONFIG_ZFCPDUMP=y | ||
58 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 58 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
59 | CONFIG_BINFMT_MISC=m | 59 | CONFIG_BINFMT_MISC=m |
60 | CONFIG_HIBERNATION=y | 60 | CONFIG_HIBERNATION=y |
@@ -97,7 +97,6 @@ CONFIG_TCP_CONG_VENO=m | |||
97 | CONFIG_TCP_CONG_YEAH=m | 97 | CONFIG_TCP_CONG_YEAH=m |
98 | CONFIG_TCP_CONG_ILLINOIS=m | 98 | CONFIG_TCP_CONG_ILLINOIS=m |
99 | CONFIG_IPV6=y | 99 | CONFIG_IPV6=y |
100 | CONFIG_IPV6_PRIVACY=y | ||
101 | CONFIG_IPV6_ROUTER_PREF=y | 100 | CONFIG_IPV6_ROUTER_PREF=y |
102 | CONFIG_INET6_AH=m | 101 | CONFIG_INET6_AH=m |
103 | CONFIG_INET6_ESP=m | 102 | CONFIG_INET6_ESP=m |
@@ -107,6 +106,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=m | |||
107 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | 106 | CONFIG_INET6_XFRM_MODE_TUNNEL=m |
108 | CONFIG_INET6_XFRM_MODE_BEET=m | 107 | CONFIG_INET6_XFRM_MODE_BEET=m |
109 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | 108 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m |
109 | CONFIG_IPV6_VTI=m | ||
110 | CONFIG_IPV6_SIT=m | 110 | CONFIG_IPV6_SIT=m |
111 | CONFIG_IPV6_GRE=m | 111 | CONFIG_IPV6_GRE=m |
112 | CONFIG_IPV6_MULTIPLE_TABLES=y | 112 | CONFIG_IPV6_MULTIPLE_TABLES=y |
@@ -131,7 +131,17 @@ CONFIG_NF_CONNTRACK_SIP=m | |||
131 | CONFIG_NF_CONNTRACK_TFTP=m | 131 | CONFIG_NF_CONNTRACK_TFTP=m |
132 | CONFIG_NF_CT_NETLINK=m | 132 | CONFIG_NF_CT_NETLINK=m |
133 | CONFIG_NF_CT_NETLINK_TIMEOUT=m | 133 | CONFIG_NF_CT_NETLINK_TIMEOUT=m |
134 | CONFIG_NETFILTER_TPROXY=m | 134 | CONFIG_NF_TABLES=m |
135 | CONFIG_NFT_EXTHDR=m | ||
136 | CONFIG_NFT_META=m | ||
137 | CONFIG_NFT_CT=m | ||
138 | CONFIG_NFT_RBTREE=m | ||
139 | CONFIG_NFT_HASH=m | ||
140 | CONFIG_NFT_COUNTER=m | ||
141 | CONFIG_NFT_LOG=m | ||
142 | CONFIG_NFT_LIMIT=m | ||
143 | CONFIG_NFT_NAT=m | ||
144 | CONFIG_NFT_COMPAT=m | ||
135 | CONFIG_NETFILTER_XT_SET=m | 145 | CONFIG_NETFILTER_XT_SET=m |
136 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m | 146 | CONFIG_NETFILTER_XT_TARGET_AUDIT=m |
137 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m | 147 | CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m |
@@ -200,7 +210,9 @@ CONFIG_IP_SET_HASH_IP=m | |||
200 | CONFIG_IP_SET_HASH_IPPORT=m | 210 | CONFIG_IP_SET_HASH_IPPORT=m |
201 | CONFIG_IP_SET_HASH_IPPORTIP=m | 211 | CONFIG_IP_SET_HASH_IPPORTIP=m |
202 | CONFIG_IP_SET_HASH_IPPORTNET=m | 212 | CONFIG_IP_SET_HASH_IPPORTNET=m |
213 | CONFIG_IP_SET_HASH_NETPORTNET=m | ||
203 | CONFIG_IP_SET_HASH_NET=m | 214 | CONFIG_IP_SET_HASH_NET=m |
215 | CONFIG_IP_SET_HASH_NETNET=m | ||
204 | CONFIG_IP_SET_HASH_NETPORT=m | 216 | CONFIG_IP_SET_HASH_NETPORT=m |
205 | CONFIG_IP_SET_HASH_NETIFACE=m | 217 | CONFIG_IP_SET_HASH_NETIFACE=m |
206 | CONFIG_IP_SET_LIST_SET=m | 218 | CONFIG_IP_SET_LIST_SET=m |
@@ -223,6 +235,11 @@ CONFIG_IP_VS_FTP=m | |||
223 | CONFIG_IP_VS_PE_SIP=m | 235 | CONFIG_IP_VS_PE_SIP=m |
224 | CONFIG_NF_CONNTRACK_IPV4=m | 236 | CONFIG_NF_CONNTRACK_IPV4=m |
225 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set | 237 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set |
238 | CONFIG_NF_TABLES_IPV4=m | ||
239 | CONFIG_NFT_REJECT_IPV4=m | ||
240 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | ||
241 | CONFIG_NFT_CHAIN_NAT_IPV4=m | ||
242 | CONFIG_NF_TABLES_ARP=m | ||
226 | CONFIG_IP_NF_IPTABLES=m | 243 | CONFIG_IP_NF_IPTABLES=m |
227 | CONFIG_IP_NF_MATCH_AH=m | 244 | CONFIG_IP_NF_MATCH_AH=m |
228 | CONFIG_IP_NF_MATCH_ECN=m | 245 | CONFIG_IP_NF_MATCH_ECN=m |
@@ -245,6 +262,9 @@ CONFIG_IP_NF_ARPTABLES=m | |||
245 | CONFIG_IP_NF_ARPFILTER=m | 262 | CONFIG_IP_NF_ARPFILTER=m |
246 | CONFIG_IP_NF_ARP_MANGLE=m | 263 | CONFIG_IP_NF_ARP_MANGLE=m |
247 | CONFIG_NF_CONNTRACK_IPV6=m | 264 | CONFIG_NF_CONNTRACK_IPV6=m |
265 | CONFIG_NF_TABLES_IPV6=m | ||
266 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | ||
267 | CONFIG_NFT_CHAIN_NAT_IPV6=m | ||
248 | CONFIG_IP6_NF_IPTABLES=m | 268 | CONFIG_IP6_NF_IPTABLES=m |
249 | CONFIG_IP6_NF_MATCH_AH=m | 269 | CONFIG_IP6_NF_MATCH_AH=m |
250 | CONFIG_IP6_NF_MATCH_EUI64=m | 270 | CONFIG_IP6_NF_MATCH_EUI64=m |
@@ -264,6 +284,7 @@ CONFIG_IP6_NF_SECURITY=m | |||
264 | CONFIG_NF_NAT_IPV6=m | 284 | CONFIG_NF_NAT_IPV6=m |
265 | CONFIG_IP6_NF_TARGET_MASQUERADE=m | 285 | CONFIG_IP6_NF_TARGET_MASQUERADE=m |
266 | CONFIG_IP6_NF_TARGET_NPT=m | 286 | CONFIG_IP6_NF_TARGET_NPT=m |
287 | CONFIG_NF_TABLES_BRIDGE=m | ||
267 | CONFIG_NET_SCTPPROBE=m | 288 | CONFIG_NET_SCTPPROBE=m |
268 | CONFIG_RDS=m | 289 | CONFIG_RDS=m |
269 | CONFIG_RDS_RDMA=m | 290 | CONFIG_RDS_RDMA=m |
@@ -309,6 +330,7 @@ CONFIG_NET_CLS_RSVP=m | |||
309 | CONFIG_NET_CLS_RSVP6=m | 330 | CONFIG_NET_CLS_RSVP6=m |
310 | CONFIG_NET_CLS_FLOW=m | 331 | CONFIG_NET_CLS_FLOW=m |
311 | CONFIG_NET_CLS_CGROUP=y | 332 | CONFIG_NET_CLS_CGROUP=y |
333 | CONFIG_NET_CLS_BPF=m | ||
312 | CONFIG_NET_CLS_ACT=y | 334 | CONFIG_NET_CLS_ACT=y |
313 | CONFIG_NET_ACT_POLICE=m | 335 | CONFIG_NET_ACT_POLICE=m |
314 | CONFIG_NET_ACT_GACT=m | 336 | CONFIG_NET_ACT_GACT=m |
@@ -376,8 +398,8 @@ CONFIG_BLK_DEV_DM=m | |||
376 | CONFIG_DM_CRYPT=m | 398 | CONFIG_DM_CRYPT=m |
377 | CONFIG_DM_SNAPSHOT=m | 399 | CONFIG_DM_SNAPSHOT=m |
378 | CONFIG_DM_MIRROR=m | 400 | CONFIG_DM_MIRROR=m |
379 | CONFIG_DM_RAID=m | ||
380 | CONFIG_DM_LOG_USERSPACE=m | 401 | CONFIG_DM_LOG_USERSPACE=m |
402 | CONFIG_DM_RAID=m | ||
381 | CONFIG_DM_ZERO=m | 403 | CONFIG_DM_ZERO=m |
382 | CONFIG_DM_MULTIPATH=m | 404 | CONFIG_DM_MULTIPATH=m |
383 | CONFIG_DM_MULTIPATH_QL=m | 405 | CONFIG_DM_MULTIPATH_QL=m |
@@ -429,7 +451,6 @@ CONFIG_TN3270_FS=y | |||
429 | CONFIG_WATCHDOG=y | 451 | CONFIG_WATCHDOG=y |
430 | CONFIG_WATCHDOG_NOWAYOUT=y | 452 | CONFIG_WATCHDOG_NOWAYOUT=y |
431 | CONFIG_SOFT_WATCHDOG=m | 453 | CONFIG_SOFT_WATCHDOG=m |
432 | CONFIG_ZVM_WATCHDOG=m | ||
433 | # CONFIG_HID is not set | 454 | # CONFIG_HID is not set |
434 | # CONFIG_USB_SUPPORT is not set | 455 | # CONFIG_USB_SUPPORT is not set |
435 | CONFIG_INFINIBAND=m | 456 | CONFIG_INFINIBAND=m |
@@ -532,6 +553,7 @@ CONFIG_LATENCYTOP=y | |||
532 | CONFIG_BLK_DEV_IO_TRACE=y | 553 | CONFIG_BLK_DEV_IO_TRACE=y |
533 | # CONFIG_KPROBE_EVENT is not set | 554 | # CONFIG_KPROBE_EVENT is not set |
534 | CONFIG_LKDTM=m | 555 | CONFIG_LKDTM=m |
556 | CONFIG_PERCPU_TEST=m | ||
535 | CONFIG_ATOMIC64_SELFTEST=y | 557 | CONFIG_ATOMIC64_SELFTEST=y |
536 | # CONFIG_STRICT_DEVMEM is not set | 558 | # CONFIG_STRICT_DEVMEM is not set |
537 | CONFIG_S390_PTDUMP=y | 559 | CONFIG_S390_PTDUMP=y |
@@ -593,7 +615,6 @@ CONFIG_CRYPTO_AES_S390=m | |||
593 | CONFIG_CRYPTO_GHASH_S390=m | 615 | CONFIG_CRYPTO_GHASH_S390=m |
594 | CONFIG_ASYMMETRIC_KEY_TYPE=m | 616 | CONFIG_ASYMMETRIC_KEY_TYPE=m |
595 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m | 617 | CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m |
596 | CONFIG_PUBLIC_KEY_ALGO_RSA=m | ||
597 | CONFIG_X509_CERTIFICATE_PARSER=m | 618 | CONFIG_X509_CERTIFICATE_PARSER=m |
598 | CONFIG_CRC7=m | 619 | CONFIG_CRC7=m |
599 | CONFIG_CRC8=m | 620 | CONFIG_CRC8=m |
diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig index d725c4d956e4..cef073ca1f07 100644 --- a/arch/s390/configs/zfcpdump_defconfig +++ b/arch/s390/configs/zfcpdump_defconfig | |||
@@ -19,7 +19,6 @@ CONFIG_HZ_100=y | |||
19 | # CONFIG_CHSC_SCH is not set | 19 | # CONFIG_CHSC_SCH is not set |
20 | # CONFIG_SCM_BUS is not set | 20 | # CONFIG_SCM_BUS is not set |
21 | CONFIG_CRASH_DUMP=y | 21 | CONFIG_CRASH_DUMP=y |
22 | CONFIG_ZFCPDUMP=y | ||
23 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 22 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
24 | # CONFIG_SECCOMP is not set | 23 | # CONFIG_SECCOMP is not set |
25 | # CONFIG_IUCV is not set | 24 | # CONFIG_IUCV is not set |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 33f57514f424..4557cb7ffddf 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -40,6 +40,7 @@ CONFIG_PARTITION_ADVANCED=y | |||
40 | CONFIG_IBM_PARTITION=y | 40 | CONFIG_IBM_PARTITION=y |
41 | CONFIG_DEFAULT_DEADLINE=y | 41 | CONFIG_DEFAULT_DEADLINE=y |
42 | CONFIG_MARCH_Z196=y | 42 | CONFIG_MARCH_Z196=y |
43 | CONFIG_NR_CPUS=256 | ||
43 | CONFIG_HZ_100=y | 44 | CONFIG_HZ_100=y |
44 | CONFIG_MEMORY_HOTPLUG=y | 45 | CONFIG_MEMORY_HOTPLUG=y |
45 | CONFIG_MEMORY_HOTREMOVE=y | 46 | CONFIG_MEMORY_HOTREMOVE=y |
@@ -122,22 +123,31 @@ CONFIG_TMPFS=y | |||
122 | CONFIG_TMPFS_POSIX_ACL=y | 123 | CONFIG_TMPFS_POSIX_ACL=y |
123 | CONFIG_HUGETLBFS=y | 124 | CONFIG_HUGETLBFS=y |
124 | # CONFIG_NETWORK_FILESYSTEMS is not set | 125 | # CONFIG_NETWORK_FILESYSTEMS is not set |
126 | CONFIG_UNUSED_SYMBOLS=y | ||
127 | CONFIG_DEBUG_SECTION_MISMATCH=y | ||
125 | CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y | 128 | CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y |
126 | CONFIG_MAGIC_SYSRQ=y | 129 | CONFIG_MAGIC_SYSRQ=y |
127 | CONFIG_DEBUG_PAGEALLOC=y | 130 | CONFIG_DEBUG_PAGEALLOC=y |
131 | CONFIG_DETECT_HUNG_TASK=y | ||
128 | CONFIG_TIMER_STATS=y | 132 | CONFIG_TIMER_STATS=y |
133 | CONFIG_DEBUG_RT_MUTEXES=y | ||
129 | CONFIG_PROVE_LOCKING=y | 134 | CONFIG_PROVE_LOCKING=y |
130 | CONFIG_LOCK_STAT=y | 135 | CONFIG_LOCK_STAT=y |
131 | CONFIG_DEBUG_LOCKDEP=y | 136 | CONFIG_DEBUG_LOCKDEP=y |
137 | CONFIG_DEBUG_ATOMIC_SLEEP=y | ||
138 | CONFIG_DEBUG_WRITECOUNT=y | ||
132 | CONFIG_DEBUG_LIST=y | 139 | CONFIG_DEBUG_LIST=y |
140 | CONFIG_DEBUG_SG=y | ||
133 | CONFIG_DEBUG_NOTIFIERS=y | 141 | CONFIG_DEBUG_NOTIFIERS=y |
134 | CONFIG_PROVE_RCU=y | 142 | CONFIG_PROVE_RCU=y |
135 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 | 143 | CONFIG_RCU_CPU_STALL_TIMEOUT=60 |
136 | CONFIG_RCU_TRACE=y | 144 | CONFIG_RCU_TRACE=y |
137 | CONFIG_LATENCYTOP=y | 145 | CONFIG_LATENCYTOP=y |
146 | CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y | ||
138 | CONFIG_BLK_DEV_IO_TRACE=y | 147 | CONFIG_BLK_DEV_IO_TRACE=y |
139 | CONFIG_KPROBES_SANITY_TEST=y | 148 | CONFIG_KPROBES_SANITY_TEST=y |
140 | # CONFIG_STRICT_DEVMEM is not set | 149 | # CONFIG_STRICT_DEVMEM is not set |
150 | CONFIG_S390_PTDUMP=y | ||
141 | CONFIG_CRYPTO_CRYPTD=m | 151 | CONFIG_CRYPTO_CRYPTD=m |
142 | CONFIG_CRYPTO_AUTHENC=m | 152 | CONFIG_CRYPTO_AUTHENC=m |
143 | CONFIG_CRYPTO_TEST=m | 153 | CONFIG_CRYPTO_TEST=m |
diff --git a/arch/s390/hypfs/hypfs_vm.c b/arch/s390/hypfs/hypfs_vm.c index 24908ce149f1..32040ace00ea 100644 --- a/arch/s390/hypfs/hypfs_vm.c +++ b/arch/s390/hypfs/hypfs_vm.c | |||
@@ -32,7 +32,7 @@ struct diag2fc_data { | |||
32 | __u32 pcpus; | 32 | __u32 pcpus; |
33 | __u32 lcpus; | 33 | __u32 lcpus; |
34 | __u32 vcpus; | 34 | __u32 vcpus; |
35 | __u32 cpu_min; | 35 | __u32 ocpus; |
36 | __u32 cpu_max; | 36 | __u32 cpu_max; |
37 | __u32 cpu_shares; | 37 | __u32 cpu_shares; |
38 | __u32 cpu_use_samp; | 38 | __u32 cpu_use_samp; |
@@ -142,7 +142,12 @@ static int hpyfs_vm_create_guest(struct dentry *systems_dir, | |||
142 | ATTRIBUTE(cpus_dir, "capped", capped_value); | 142 | ATTRIBUTE(cpus_dir, "capped", capped_value); |
143 | ATTRIBUTE(cpus_dir, "dedicated", dedicated_flag); | 143 | ATTRIBUTE(cpus_dir, "dedicated", dedicated_flag); |
144 | ATTRIBUTE(cpus_dir, "count", data->vcpus); | 144 | ATTRIBUTE(cpus_dir, "count", data->vcpus); |
145 | ATTRIBUTE(cpus_dir, "weight_min", data->cpu_min); | 145 | /* |
146 | * Note: The "weight_min" attribute got the wrong name. | ||
147 | * The value represents the number of non-stopped (operating) | ||
148 | * CPUS. | ||
149 | */ | ||
150 | ATTRIBUTE(cpus_dir, "weight_min", data->ocpus); | ||
146 | ATTRIBUTE(cpus_dir, "weight_max", data->cpu_max); | 151 | ATTRIBUTE(cpus_dir, "weight_max", data->cpu_max); |
147 | ATTRIBUTE(cpus_dir, "weight_cur", data->cpu_shares); | 152 | ATTRIBUTE(cpus_dir, "weight_cur", data->cpu_shares); |
148 | 153 | ||
diff --git a/arch/s390/include/asm/airq.h b/arch/s390/include/asm/airq.h index 4bbb5957ed1b..bd93ff6661b8 100644 --- a/arch/s390/include/asm/airq.h +++ b/arch/s390/include/asm/airq.h | |||
@@ -44,11 +44,21 @@ struct airq_iv { | |||
44 | 44 | ||
45 | struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags); | 45 | struct airq_iv *airq_iv_create(unsigned long bits, unsigned long flags); |
46 | void airq_iv_release(struct airq_iv *iv); | 46 | void airq_iv_release(struct airq_iv *iv); |
47 | unsigned long airq_iv_alloc_bit(struct airq_iv *iv); | 47 | unsigned long airq_iv_alloc(struct airq_iv *iv, unsigned long num); |
48 | void airq_iv_free_bit(struct airq_iv *iv, unsigned long bit); | 48 | void airq_iv_free(struct airq_iv *iv, unsigned long bit, unsigned long num); |
49 | unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, | 49 | unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, |
50 | unsigned long end); | 50 | unsigned long end); |
51 | 51 | ||
52 | static inline unsigned long airq_iv_alloc_bit(struct airq_iv *iv) | ||
53 | { | ||
54 | return airq_iv_alloc(iv, 1); | ||
55 | } | ||
56 | |||
57 | static inline void airq_iv_free_bit(struct airq_iv *iv, unsigned long bit) | ||
58 | { | ||
59 | airq_iv_free(iv, bit, 1); | ||
60 | } | ||
61 | |||
52 | static inline unsigned long airq_iv_end(struct airq_iv *iv) | 62 | static inline unsigned long airq_iv_end(struct airq_iv *iv) |
53 | { | 63 | { |
54 | return iv->end; | 64 | return iv->end; |
diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 6e6ad0680829..ec5ef891db6b 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h | |||
@@ -13,9 +13,9 @@ | |||
13 | * | 13 | * |
14 | * The bitop functions are defined to work on unsigned longs, so for an | 14 | * The bitop functions are defined to work on unsigned longs, so for an |
15 | * s390x system the bits end up numbered: | 15 | * s390x system the bits end up numbered: |
16 | * |63..............0|127............64|191...........128|255...........196| | 16 | * |63..............0|127............64|191...........128|255...........192| |
17 | * and on s390: | 17 | * and on s390: |
18 | * |31.....0|63....31|95....64|127...96|159..128|191..160|223..192|255..224| | 18 | * |31.....0|63....32|95....64|127...96|159..128|191..160|223..192|255..224| |
19 | * | 19 | * |
20 | * There are a few little-endian macros used mostly for filesystem | 20 | * There are a few little-endian macros used mostly for filesystem |
21 | * bitmaps, these work on similar bit arrays layouts, but | 21 | * bitmaps, these work on similar bit arrays layouts, but |
@@ -30,7 +30,7 @@ | |||
30 | * on an s390x system the bits are numbered: | 30 | * on an s390x system the bits are numbered: |
31 | * |0..............63|64............127|128...........191|192...........255| | 31 | * |0..............63|64............127|128...........191|192...........255| |
32 | * and on s390: | 32 | * and on s390: |
33 | * |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255| | 33 | * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255| |
34 | * | 34 | * |
35 | * The main difference is that bit 0-63 (64b) or 0-31 (32b) in the bit | 35 | * The main difference is that bit 0-63 (64b) or 0-31 (32b) in the bit |
36 | * number field needs to be reversed compared to the LSB0 encoded bit | 36 | * number field needs to be reversed compared to the LSB0 encoded bit |
@@ -304,7 +304,7 @@ static inline int test_bit(unsigned long nr, const volatile unsigned long *ptr) | |||
304 | * On an s390x system the bits are numbered: | 304 | * On an s390x system the bits are numbered: |
305 | * |0..............63|64............127|128...........191|192...........255| | 305 | * |0..............63|64............127|128...........191|192...........255| |
306 | * and on s390: | 306 | * and on s390: |
307 | * |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255| | 307 | * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255| |
308 | */ | 308 | */ |
309 | unsigned long find_first_bit_inv(const unsigned long *addr, unsigned long size); | 309 | unsigned long find_first_bit_inv(const unsigned long *addr, unsigned long size); |
310 | unsigned long find_next_bit_inv(const unsigned long *addr, unsigned long size, | 310 | unsigned long find_next_bit_inv(const unsigned long *addr, unsigned long size, |
diff --git a/arch/s390/include/asm/ccwdev.h b/arch/s390/include/asm/ccwdev.h index f201af8be580..a9c2c0686177 100644 --- a/arch/s390/include/asm/ccwdev.h +++ b/arch/s390/include/asm/ccwdev.h | |||
@@ -219,7 +219,9 @@ extern void ccw_device_get_id(struct ccw_device *, struct ccw_dev_id *); | |||
219 | #define to_ccwdev(n) container_of(n, struct ccw_device, dev) | 219 | #define to_ccwdev(n) container_of(n, struct ccw_device, dev) |
220 | #define to_ccwdrv(n) container_of(n, struct ccw_driver, driver) | 220 | #define to_ccwdrv(n) container_of(n, struct ccw_driver, driver) |
221 | 221 | ||
222 | extern struct ccw_device *ccw_device_probe_console(void); | 222 | extern struct ccw_device *ccw_device_create_console(struct ccw_driver *); |
223 | extern void ccw_device_destroy_console(struct ccw_device *); | ||
224 | extern int ccw_device_enable_console(struct ccw_device *); | ||
223 | extern void ccw_device_wait_idle(struct ccw_device *); | 225 | extern void ccw_device_wait_idle(struct ccw_device *); |
224 | extern int ccw_device_force_console(struct ccw_device *); | 226 | extern int ccw_device_force_console(struct ccw_device *); |
225 | 227 | ||
diff --git a/arch/s390/include/asm/checksum.h b/arch/s390/include/asm/checksum.h index 4f57a4f3909a..740364856355 100644 --- a/arch/s390/include/asm/checksum.h +++ b/arch/s390/include/asm/checksum.h | |||
@@ -44,22 +44,15 @@ csum_partial(const void *buff, int len, __wsum sum) | |||
44 | * here even more important to align src and dst on a 32-bit (or even | 44 | * here even more important to align src and dst on a 32-bit (or even |
45 | * better 64-bit) boundary | 45 | * better 64-bit) boundary |
46 | * | 46 | * |
47 | * Copy from userspace and compute checksum. If we catch an exception | 47 | * Copy from userspace and compute checksum. |
48 | * then zero the rest of the buffer. | ||
49 | */ | 48 | */ |
50 | static inline __wsum | 49 | static inline __wsum |
51 | csum_partial_copy_from_user(const void __user *src, void *dst, | 50 | csum_partial_copy_from_user(const void __user *src, void *dst, |
52 | int len, __wsum sum, | 51 | int len, __wsum sum, |
53 | int *err_ptr) | 52 | int *err_ptr) |
54 | { | 53 | { |
55 | int missing; | 54 | if (unlikely(copy_from_user(dst, src, len))) |
56 | |||
57 | missing = copy_from_user(dst, src, len); | ||
58 | if (missing) { | ||
59 | memset(dst + len - missing, 0, missing); | ||
60 | *err_ptr = -EFAULT; | 55 | *err_ptr = -EFAULT; |
61 | } | ||
62 | |||
63 | return csum_partial(dst, len, sum); | 56 | return csum_partial(dst, len, sum); |
64 | } | 57 | } |
65 | 58 | ||
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index 5d7e8cf83bd6..d350ed9d0fbb 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h | |||
@@ -8,7 +8,11 @@ | |||
8 | #include <linux/thread_info.h> | 8 | #include <linux/thread_info.h> |
9 | 9 | ||
10 | #define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p(typeof(0?(t)0:0ULL), u64)) | 10 | #define __TYPE_IS_PTR(t) (!__builtin_types_compatible_p(typeof(0?(t)0:0ULL), u64)) |
11 | #define __SC_DELOUSE(t,v) (t)(__TYPE_IS_PTR(t) ? ((v) & 0x7fffffff) : (v)) | 11 | |
12 | #define __SC_DELOUSE(t,v) ({ \ | ||
13 | BUILD_BUG_ON(sizeof(t) > 4 && !__TYPE_IS_PTR(t)); \ | ||
14 | (t)(__TYPE_IS_PTR(t) ? ((v) & 0x7fffffff) : (v)); \ | ||
15 | }) | ||
12 | 16 | ||
13 | #define PSW32_MASK_PER 0x40000000UL | 17 | #define PSW32_MASK_PER 0x40000000UL |
14 | #define PSW32_MASK_DAT 0x04000000UL | 18 | #define PSW32_MASK_DAT 0x04000000UL |
diff --git a/arch/s390/include/asm/futex.h b/arch/s390/include/asm/futex.h index 51bcaa0fdeef..fda46bd38c99 100644 --- a/arch/s390/include/asm/futex.h +++ b/arch/s390/include/asm/futex.h | |||
@@ -5,7 +5,10 @@ | |||
5 | #include <linux/uaccess.h> | 5 | #include <linux/uaccess.h> |
6 | #include <asm/errno.h> | 6 | #include <asm/errno.h> |
7 | 7 | ||
8 | static inline int futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | 8 | int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, u32 newval); |
9 | int __futex_atomic_op_inuser(int op, u32 __user *uaddr, int oparg, int *old); | ||
10 | |||
11 | static inline int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) | ||
9 | { | 12 | { |
10 | int op = (encoded_op >> 28) & 7; | 13 | int op = (encoded_op >> 28) & 7; |
11 | int cmp = (encoded_op >> 24) & 15; | 14 | int cmp = (encoded_op >> 24) & 15; |
@@ -17,7 +20,7 @@ static inline int futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
17 | oparg = 1 << oparg; | 20 | oparg = 1 << oparg; |
18 | 21 | ||
19 | pagefault_disable(); | 22 | pagefault_disable(); |
20 | ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval); | 23 | ret = __futex_atomic_op_inuser(op, uaddr, oparg, &oldval); |
21 | pagefault_enable(); | 24 | pagefault_enable(); |
22 | 25 | ||
23 | if (!ret) { | 26 | if (!ret) { |
@@ -34,10 +37,4 @@ static inline int futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | |||
34 | return ret; | 37 | return ret; |
35 | } | 38 | } |
36 | 39 | ||
37 | static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | ||
38 | u32 oldval, u32 newval) | ||
39 | { | ||
40 | return uaccess.futex_atomic_cmpxchg(uval, uaddr, oldval, newval); | ||
41 | } | ||
42 | |||
43 | #endif /* _ASM_S390_FUTEX_H */ | 40 | #endif /* _ASM_S390_FUTEX_H */ |
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index eef3dd3fd9a9..9bf95bb30f1a 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -106,7 +106,9 @@ struct kvm_s390_sie_block { | |||
106 | __u64 gbea; /* 0x0180 */ | 106 | __u64 gbea; /* 0x0180 */ |
107 | __u8 reserved188[24]; /* 0x0188 */ | 107 | __u8 reserved188[24]; /* 0x0188 */ |
108 | __u32 fac; /* 0x01a0 */ | 108 | __u32 fac; /* 0x01a0 */ |
109 | __u8 reserved1a4[68]; /* 0x01a4 */ | 109 | __u8 reserved1a4[20]; /* 0x01a4 */ |
110 | __u64 cbrlo; /* 0x01b8 */ | ||
111 | __u8 reserved1c0[40]; /* 0x01c0 */ | ||
110 | __u64 itdba; /* 0x01e8 */ | 112 | __u64 itdba; /* 0x01e8 */ |
111 | __u8 reserved1f0[16]; /* 0x01f0 */ | 113 | __u8 reserved1f0[16]; /* 0x01f0 */ |
112 | } __attribute__((packed)); | 114 | } __attribute__((packed)); |
@@ -155,6 +157,7 @@ struct kvm_vcpu_stat { | |||
155 | u32 instruction_stsi; | 157 | u32 instruction_stsi; |
156 | u32 instruction_stfl; | 158 | u32 instruction_stfl; |
157 | u32 instruction_tprot; | 159 | u32 instruction_tprot; |
160 | u32 instruction_essa; | ||
158 | u32 instruction_sigp_sense; | 161 | u32 instruction_sigp_sense; |
159 | u32 instruction_sigp_sense_running; | 162 | u32 instruction_sigp_sense_running; |
160 | u32 instruction_sigp_external_call; | 163 | u32 instruction_sigp_external_call; |
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index 5d1f950704dc..38149b63dc44 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h | |||
@@ -48,13 +48,42 @@ static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk) | |||
48 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 48 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
49 | struct task_struct *tsk) | 49 | struct task_struct *tsk) |
50 | { | 50 | { |
51 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); | 51 | int cpu = smp_processor_id(); |
52 | update_mm(next, tsk); | 52 | |
53 | if (prev == next) | ||
54 | return; | ||
55 | if (atomic_inc_return(&next->context.attach_count) >> 16) { | ||
56 | /* Delay update_mm until all TLB flushes are done. */ | ||
57 | set_tsk_thread_flag(tsk, TIF_TLB_WAIT); | ||
58 | } else { | ||
59 | cpumask_set_cpu(cpu, mm_cpumask(next)); | ||
60 | update_mm(next, tsk); | ||
61 | if (next->context.flush_mm) | ||
62 | /* Flush pending TLBs */ | ||
63 | __tlb_flush_mm(next); | ||
64 | } | ||
53 | atomic_dec(&prev->context.attach_count); | 65 | atomic_dec(&prev->context.attach_count); |
54 | WARN_ON(atomic_read(&prev->context.attach_count) < 0); | 66 | WARN_ON(atomic_read(&prev->context.attach_count) < 0); |
55 | atomic_inc(&next->context.attach_count); | 67 | } |
56 | /* Check for TLBs not flushed yet */ | 68 | |
57 | __tlb_flush_mm_lazy(next); | 69 | #define finish_arch_post_lock_switch finish_arch_post_lock_switch |
70 | static inline void finish_arch_post_lock_switch(void) | ||
71 | { | ||
72 | struct task_struct *tsk = current; | ||
73 | struct mm_struct *mm = tsk->mm; | ||
74 | |||
75 | if (!test_tsk_thread_flag(tsk, TIF_TLB_WAIT)) | ||
76 | return; | ||
77 | preempt_disable(); | ||
78 | clear_tsk_thread_flag(tsk, TIF_TLB_WAIT); | ||
79 | while (atomic_read(&mm->context.attach_count) >> 16) | ||
80 | cpu_relax(); | ||
81 | |||
82 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); | ||
83 | update_mm(mm, tsk); | ||
84 | if (mm->context.flush_mm) | ||
85 | __tlb_flush_mm(mm); | ||
86 | preempt_enable(); | ||
58 | } | 87 | } |
59 | 88 | ||
60 | #define enter_lazy_tlb(mm,tsk) do { } while (0) | 89 | #define enter_lazy_tlb(mm,tsk) do { } while (0) |
diff --git a/arch/s390/include/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h index e1408ddb94f8..884017cbfa9f 100644 --- a/arch/s390/include/asm/pgalloc.h +++ b/arch/s390/include/asm/pgalloc.h | |||
@@ -22,6 +22,7 @@ unsigned long *page_table_alloc(struct mm_struct *, unsigned long); | |||
22 | void page_table_free(struct mm_struct *, unsigned long *); | 22 | void page_table_free(struct mm_struct *, unsigned long *); |
23 | void page_table_free_rcu(struct mmu_gather *, unsigned long *); | 23 | void page_table_free_rcu(struct mmu_gather *, unsigned long *); |
24 | 24 | ||
25 | void page_table_reset_pgste(struct mm_struct *, unsigned long, unsigned long); | ||
25 | int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, | 26 | int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, |
26 | unsigned long key, bool nq); | 27 | unsigned long key, bool nq); |
27 | 28 | ||
@@ -91,11 +92,22 @@ static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address) | |||
91 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) | 92 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) |
92 | { | 93 | { |
93 | unsigned long *table = crst_table_alloc(mm); | 94 | unsigned long *table = crst_table_alloc(mm); |
94 | if (table) | 95 | |
95 | crst_table_init(table, _SEGMENT_ENTRY_EMPTY); | 96 | if (!table) |
97 | return NULL; | ||
98 | crst_table_init(table, _SEGMENT_ENTRY_EMPTY); | ||
99 | if (!pgtable_pmd_page_ctor(virt_to_page(table))) { | ||
100 | crst_table_free(mm, table); | ||
101 | return NULL; | ||
102 | } | ||
96 | return (pmd_t *) table; | 103 | return (pmd_t *) table; |
97 | } | 104 | } |
98 | #define pmd_free(mm, pmd) crst_table_free(mm, (unsigned long *) pmd) | 105 | |
106 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | ||
107 | { | ||
108 | pgtable_pmd_page_dtor(virt_to_page(pmd)); | ||
109 | crst_table_free(mm, (unsigned long *) pmd); | ||
110 | } | ||
99 | 111 | ||
100 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) | 112 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) |
101 | { | 113 | { |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 2204400d0bd5..1ab75eaacbd4 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -229,6 +229,7 @@ extern unsigned long MODULES_END; | |||
229 | #define _PAGE_READ 0x010 /* SW pte read bit */ | 229 | #define _PAGE_READ 0x010 /* SW pte read bit */ |
230 | #define _PAGE_WRITE 0x020 /* SW pte write bit */ | 230 | #define _PAGE_WRITE 0x020 /* SW pte write bit */ |
231 | #define _PAGE_SPECIAL 0x040 /* SW associated with special page */ | 231 | #define _PAGE_SPECIAL 0x040 /* SW associated with special page */ |
232 | #define _PAGE_UNUSED 0x080 /* SW bit for pgste usage state */ | ||
232 | #define __HAVE_ARCH_PTE_SPECIAL | 233 | #define __HAVE_ARCH_PTE_SPECIAL |
233 | 234 | ||
234 | /* Set of bits not changed in pte_modify */ | 235 | /* Set of bits not changed in pte_modify */ |
@@ -394,6 +395,12 @@ extern unsigned long MODULES_END; | |||
394 | 395 | ||
395 | #endif /* CONFIG_64BIT */ | 396 | #endif /* CONFIG_64BIT */ |
396 | 397 | ||
398 | /* Guest Page State used for virtualization */ | ||
399 | #define _PGSTE_GPS_ZERO 0x0000000080000000UL | ||
400 | #define _PGSTE_GPS_USAGE_MASK 0x0000000003000000UL | ||
401 | #define _PGSTE_GPS_USAGE_STABLE 0x0000000000000000UL | ||
402 | #define _PGSTE_GPS_USAGE_UNUSED 0x0000000001000000UL | ||
403 | |||
397 | /* | 404 | /* |
398 | * A user page table pointer has the space-switch-event bit, the | 405 | * A user page table pointer has the space-switch-event bit, the |
399 | * private-space-control bit and the storage-alteration-event-control | 406 | * private-space-control bit and the storage-alteration-event-control |
@@ -617,6 +624,14 @@ static inline int pte_none(pte_t pte) | |||
617 | return pte_val(pte) == _PAGE_INVALID; | 624 | return pte_val(pte) == _PAGE_INVALID; |
618 | } | 625 | } |
619 | 626 | ||
627 | static inline int pte_swap(pte_t pte) | ||
628 | { | ||
629 | /* Bit pattern: (pte & 0x603) == 0x402 */ | ||
630 | return (pte_val(pte) & (_PAGE_INVALID | _PAGE_PROTECT | | ||
631 | _PAGE_TYPE | _PAGE_PRESENT)) | ||
632 | == (_PAGE_INVALID | _PAGE_TYPE); | ||
633 | } | ||
634 | |||
620 | static inline int pte_file(pte_t pte) | 635 | static inline int pte_file(pte_t pte) |
621 | { | 636 | { |
622 | /* Bit pattern: (pte & 0x601) == 0x600 */ | 637 | /* Bit pattern: (pte & 0x601) == 0x600 */ |
@@ -821,20 +836,20 @@ unsigned long gmap_translate(unsigned long address, struct gmap *); | |||
821 | unsigned long __gmap_fault(unsigned long address, struct gmap *); | 836 | unsigned long __gmap_fault(unsigned long address, struct gmap *); |
822 | unsigned long gmap_fault(unsigned long address, struct gmap *); | 837 | unsigned long gmap_fault(unsigned long address, struct gmap *); |
823 | void gmap_discard(unsigned long from, unsigned long to, struct gmap *); | 838 | void gmap_discard(unsigned long from, unsigned long to, struct gmap *); |
839 | void __gmap_zap(unsigned long address, struct gmap *); | ||
824 | 840 | ||
825 | void gmap_register_ipte_notifier(struct gmap_notifier *); | 841 | void gmap_register_ipte_notifier(struct gmap_notifier *); |
826 | void gmap_unregister_ipte_notifier(struct gmap_notifier *); | 842 | void gmap_unregister_ipte_notifier(struct gmap_notifier *); |
827 | int gmap_ipte_notify(struct gmap *, unsigned long start, unsigned long len); | 843 | int gmap_ipte_notify(struct gmap *, unsigned long start, unsigned long len); |
828 | void gmap_do_ipte_notify(struct mm_struct *, unsigned long addr, pte_t *); | 844 | void gmap_do_ipte_notify(struct mm_struct *, pte_t *); |
829 | 845 | ||
830 | static inline pgste_t pgste_ipte_notify(struct mm_struct *mm, | 846 | static inline pgste_t pgste_ipte_notify(struct mm_struct *mm, |
831 | unsigned long addr, | ||
832 | pte_t *ptep, pgste_t pgste) | 847 | pte_t *ptep, pgste_t pgste) |
833 | { | 848 | { |
834 | #ifdef CONFIG_PGSTE | 849 | #ifdef CONFIG_PGSTE |
835 | if (pgste_val(pgste) & PGSTE_IN_BIT) { | 850 | if (pgste_val(pgste) & PGSTE_IN_BIT) { |
836 | pgste_val(pgste) &= ~PGSTE_IN_BIT; | 851 | pgste_val(pgste) &= ~PGSTE_IN_BIT; |
837 | gmap_do_ipte_notify(mm, addr, ptep); | 852 | gmap_do_ipte_notify(mm, ptep); |
838 | } | 853 | } |
839 | #endif | 854 | #endif |
840 | return pgste; | 855 | return pgste; |
@@ -852,6 +867,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
852 | 867 | ||
853 | if (mm_has_pgste(mm)) { | 868 | if (mm_has_pgste(mm)) { |
854 | pgste = pgste_get_lock(ptep); | 869 | pgste = pgste_get_lock(ptep); |
870 | pgste_val(pgste) &= ~_PGSTE_GPS_ZERO; | ||
855 | pgste_set_key(ptep, pgste, entry); | 871 | pgste_set_key(ptep, pgste, entry); |
856 | pgste_set_pte(ptep, entry); | 872 | pgste_set_pte(ptep, entry); |
857 | pgste_set_unlock(ptep, pgste); | 873 | pgste_set_unlock(ptep, pgste); |
@@ -881,6 +897,12 @@ static inline int pte_young(pte_t pte) | |||
881 | return (pte_val(pte) & _PAGE_YOUNG) != 0; | 897 | return (pte_val(pte) & _PAGE_YOUNG) != 0; |
882 | } | 898 | } |
883 | 899 | ||
900 | #define __HAVE_ARCH_PTE_UNUSED | ||
901 | static inline int pte_unused(pte_t pte) | ||
902 | { | ||
903 | return pte_val(pte) & _PAGE_UNUSED; | ||
904 | } | ||
905 | |||
884 | /* | 906 | /* |
885 | * pgd/pmd/pte modification functions | 907 | * pgd/pmd/pte modification functions |
886 | */ | 908 | */ |
@@ -1034,30 +1056,41 @@ static inline int ptep_test_and_clear_user_young(struct mm_struct *mm, | |||
1034 | 1056 | ||
1035 | static inline void __ptep_ipte(unsigned long address, pte_t *ptep) | 1057 | static inline void __ptep_ipte(unsigned long address, pte_t *ptep) |
1036 | { | 1058 | { |
1037 | if (!(pte_val(*ptep) & _PAGE_INVALID)) { | 1059 | unsigned long pto = (unsigned long) ptep; |
1060 | |||
1038 | #ifndef CONFIG_64BIT | 1061 | #ifndef CONFIG_64BIT |
1039 | /* pto must point to the start of the segment table */ | 1062 | /* pto in ESA mode must point to the start of the segment table */ |
1040 | pte_t *pto = (pte_t *) (((unsigned long) ptep) & 0x7ffffc00); | 1063 | pto &= 0x7ffffc00; |
1041 | #else | ||
1042 | /* ipte in zarch mode can do the math */ | ||
1043 | pte_t *pto = ptep; | ||
1044 | #endif | 1064 | #endif |
1045 | asm volatile( | 1065 | /* Invalidation + global TLB flush for the pte */ |
1046 | " ipte %2,%3" | 1066 | asm volatile( |
1047 | : "=m" (*ptep) : "m" (*ptep), | 1067 | " ipte %2,%3" |
1048 | "a" (pto), "a" (address)); | 1068 | : "=m" (*ptep) : "m" (*ptep), "a" (pto), "a" (address)); |
1049 | } | 1069 | } |
1070 | |||
1071 | static inline void ptep_flush_direct(struct mm_struct *mm, | ||
1072 | unsigned long address, pte_t *ptep) | ||
1073 | { | ||
1074 | if (pte_val(*ptep) & _PAGE_INVALID) | ||
1075 | return; | ||
1076 | __ptep_ipte(address, ptep); | ||
1050 | } | 1077 | } |
1051 | 1078 | ||
1052 | static inline void ptep_flush_lazy(struct mm_struct *mm, | 1079 | static inline void ptep_flush_lazy(struct mm_struct *mm, |
1053 | unsigned long address, pte_t *ptep) | 1080 | unsigned long address, pte_t *ptep) |
1054 | { | 1081 | { |
1055 | int active = (mm == current->active_mm) ? 1 : 0; | 1082 | int active, count; |
1056 | 1083 | ||
1057 | if (atomic_read(&mm->context.attach_count) > active) | 1084 | if (pte_val(*ptep) & _PAGE_INVALID) |
1058 | __ptep_ipte(address, ptep); | 1085 | return; |
1059 | else | 1086 | active = (mm == current->active_mm) ? 1 : 0; |
1087 | count = atomic_add_return(0x10000, &mm->context.attach_count); | ||
1088 | if ((count & 0xffff) <= active) { | ||
1089 | pte_val(*ptep) |= _PAGE_INVALID; | ||
1060 | mm->context.flush_mm = 1; | 1090 | mm->context.flush_mm = 1; |
1091 | } else | ||
1092 | __ptep_ipte(address, ptep); | ||
1093 | atomic_sub(0x10000, &mm->context.attach_count); | ||
1061 | } | 1094 | } |
1062 | 1095 | ||
1063 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 1096 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
@@ -1070,11 +1103,11 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, | |||
1070 | 1103 | ||
1071 | if (mm_has_pgste(vma->vm_mm)) { | 1104 | if (mm_has_pgste(vma->vm_mm)) { |
1072 | pgste = pgste_get_lock(ptep); | 1105 | pgste = pgste_get_lock(ptep); |
1073 | pgste = pgste_ipte_notify(vma->vm_mm, addr, ptep, pgste); | 1106 | pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); |
1074 | } | 1107 | } |
1075 | 1108 | ||
1076 | pte = *ptep; | 1109 | pte = *ptep; |
1077 | __ptep_ipte(addr, ptep); | 1110 | ptep_flush_direct(vma->vm_mm, addr, ptep); |
1078 | young = pte_young(pte); | 1111 | young = pte_young(pte); |
1079 | pte = pte_mkold(pte); | 1112 | pte = pte_mkold(pte); |
1080 | 1113 | ||
@@ -1116,7 +1149,7 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, | |||
1116 | 1149 | ||
1117 | if (mm_has_pgste(mm)) { | 1150 | if (mm_has_pgste(mm)) { |
1118 | pgste = pgste_get_lock(ptep); | 1151 | pgste = pgste_get_lock(ptep); |
1119 | pgste = pgste_ipte_notify(mm, address, ptep, pgste); | 1152 | pgste = pgste_ipte_notify(mm, ptep, pgste); |
1120 | } | 1153 | } |
1121 | 1154 | ||
1122 | pte = *ptep; | 1155 | pte = *ptep; |
@@ -1140,12 +1173,11 @@ static inline pte_t ptep_modify_prot_start(struct mm_struct *mm, | |||
1140 | 1173 | ||
1141 | if (mm_has_pgste(mm)) { | 1174 | if (mm_has_pgste(mm)) { |
1142 | pgste = pgste_get_lock(ptep); | 1175 | pgste = pgste_get_lock(ptep); |
1143 | pgste_ipte_notify(mm, address, ptep, pgste); | 1176 | pgste_ipte_notify(mm, ptep, pgste); |
1144 | } | 1177 | } |
1145 | 1178 | ||
1146 | pte = *ptep; | 1179 | pte = *ptep; |
1147 | ptep_flush_lazy(mm, address, ptep); | 1180 | ptep_flush_lazy(mm, address, ptep); |
1148 | pte_val(*ptep) |= _PAGE_INVALID; | ||
1149 | 1181 | ||
1150 | if (mm_has_pgste(mm)) { | 1182 | if (mm_has_pgste(mm)) { |
1151 | pgste = pgste_update_all(&pte, pgste); | 1183 | pgste = pgste_update_all(&pte, pgste); |
@@ -1178,14 +1210,17 @@ static inline pte_t ptep_clear_flush(struct vm_area_struct *vma, | |||
1178 | 1210 | ||
1179 | if (mm_has_pgste(vma->vm_mm)) { | 1211 | if (mm_has_pgste(vma->vm_mm)) { |
1180 | pgste = pgste_get_lock(ptep); | 1212 | pgste = pgste_get_lock(ptep); |
1181 | pgste = pgste_ipte_notify(vma->vm_mm, address, ptep, pgste); | 1213 | pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); |
1182 | } | 1214 | } |
1183 | 1215 | ||
1184 | pte = *ptep; | 1216 | pte = *ptep; |
1185 | __ptep_ipte(address, ptep); | 1217 | ptep_flush_direct(vma->vm_mm, address, ptep); |
1186 | pte_val(*ptep) = _PAGE_INVALID; | 1218 | pte_val(*ptep) = _PAGE_INVALID; |
1187 | 1219 | ||
1188 | if (mm_has_pgste(vma->vm_mm)) { | 1220 | if (mm_has_pgste(vma->vm_mm)) { |
1221 | if ((pgste_val(pgste) & _PGSTE_GPS_USAGE_MASK) == | ||
1222 | _PGSTE_GPS_USAGE_UNUSED) | ||
1223 | pte_val(pte) |= _PAGE_UNUSED; | ||
1189 | pgste = pgste_update_all(&pte, pgste); | 1224 | pgste = pgste_update_all(&pte, pgste); |
1190 | pgste_set_unlock(ptep, pgste); | 1225 | pgste_set_unlock(ptep, pgste); |
1191 | } | 1226 | } |
@@ -1209,7 +1244,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, | |||
1209 | 1244 | ||
1210 | if (!full && mm_has_pgste(mm)) { | 1245 | if (!full && mm_has_pgste(mm)) { |
1211 | pgste = pgste_get_lock(ptep); | 1246 | pgste = pgste_get_lock(ptep); |
1212 | pgste = pgste_ipte_notify(mm, address, ptep, pgste); | 1247 | pgste = pgste_ipte_notify(mm, ptep, pgste); |
1213 | } | 1248 | } |
1214 | 1249 | ||
1215 | pte = *ptep; | 1250 | pte = *ptep; |
@@ -1234,7 +1269,7 @@ static inline pte_t ptep_set_wrprotect(struct mm_struct *mm, | |||
1234 | if (pte_write(pte)) { | 1269 | if (pte_write(pte)) { |
1235 | if (mm_has_pgste(mm)) { | 1270 | if (mm_has_pgste(mm)) { |
1236 | pgste = pgste_get_lock(ptep); | 1271 | pgste = pgste_get_lock(ptep); |
1237 | pgste = pgste_ipte_notify(mm, address, ptep, pgste); | 1272 | pgste = pgste_ipte_notify(mm, ptep, pgste); |
1238 | } | 1273 | } |
1239 | 1274 | ||
1240 | ptep_flush_lazy(mm, address, ptep); | 1275 | ptep_flush_lazy(mm, address, ptep); |
@@ -1260,10 +1295,10 @@ static inline int ptep_set_access_flags(struct vm_area_struct *vma, | |||
1260 | return 0; | 1295 | return 0; |
1261 | if (mm_has_pgste(vma->vm_mm)) { | 1296 | if (mm_has_pgste(vma->vm_mm)) { |
1262 | pgste = pgste_get_lock(ptep); | 1297 | pgste = pgste_get_lock(ptep); |
1263 | pgste = pgste_ipte_notify(vma->vm_mm, address, ptep, pgste); | 1298 | pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); |
1264 | } | 1299 | } |
1265 | 1300 | ||
1266 | __ptep_ipte(address, ptep); | 1301 | ptep_flush_direct(vma->vm_mm, address, ptep); |
1267 | 1302 | ||
1268 | if (mm_has_pgste(vma->vm_mm)) { | 1303 | if (mm_has_pgste(vma->vm_mm)) { |
1269 | pgste_set_pte(ptep, entry); | 1304 | pgste_set_pte(ptep, entry); |
@@ -1447,12 +1482,16 @@ static inline pmd_t pmd_mkwrite(pmd_t pmd) | |||
1447 | static inline void pmdp_flush_lazy(struct mm_struct *mm, | 1482 | static inline void pmdp_flush_lazy(struct mm_struct *mm, |
1448 | unsigned long address, pmd_t *pmdp) | 1483 | unsigned long address, pmd_t *pmdp) |
1449 | { | 1484 | { |
1450 | int active = (mm == current->active_mm) ? 1 : 0; | 1485 | int active, count; |
1451 | 1486 | ||
1452 | if ((atomic_read(&mm->context.attach_count) & 0xffff) > active) | 1487 | active = (mm == current->active_mm) ? 1 : 0; |
1453 | __pmd_idte(address, pmdp); | 1488 | count = atomic_add_return(0x10000, &mm->context.attach_count); |
1454 | else | 1489 | if ((count & 0xffff) <= active) { |
1490 | pmd_val(*pmdp) |= _SEGMENT_ENTRY_INVALID; | ||
1455 | mm->context.flush_mm = 1; | 1491 | mm->context.flush_mm = 1; |
1492 | } else | ||
1493 | __pmd_idte(address, pmdp); | ||
1494 | atomic_sub(0x10000, &mm->context.attach_count); | ||
1456 | } | 1495 | } |
1457 | 1496 | ||
1458 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 1497 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h index 9c82cebddabd..f4783c0b7b43 100644 --- a/arch/s390/include/asm/ptrace.h +++ b/arch/s390/include/asm/ptrace.h | |||
@@ -83,6 +83,7 @@ struct per_struct_kernel { | |||
83 | * These are defined as per linux/ptrace.h, which see. | 83 | * These are defined as per linux/ptrace.h, which see. |
84 | */ | 84 | */ |
85 | #define arch_has_single_step() (1) | 85 | #define arch_has_single_step() (1) |
86 | #define arch_has_block_step() (1) | ||
86 | 87 | ||
87 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) | 88 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) |
88 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) | 89 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) |
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index abaca2275c7a..2f5e9932b4de 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
@@ -46,6 +46,7 @@ int sclp_cpu_configure(u8 cpu); | |||
46 | int sclp_cpu_deconfigure(u8 cpu); | 46 | int sclp_cpu_deconfigure(u8 cpu); |
47 | unsigned long long sclp_get_rnmax(void); | 47 | unsigned long long sclp_get_rnmax(void); |
48 | unsigned long long sclp_get_rzm(void); | 48 | unsigned long long sclp_get_rzm(void); |
49 | unsigned int sclp_get_max_cpu(void); | ||
49 | int sclp_sdias_blk_count(void); | 50 | int sclp_sdias_blk_count(void); |
50 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); | 51 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); |
51 | int sclp_chp_configure(struct chp_id chpid); | 52 | int sclp_chp_configure(struct chp_id chpid); |
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h index 94cfbe442f12..406f3a1e63ef 100644 --- a/arch/s390/include/asm/setup.h +++ b/arch/s390/include/asm/setup.h | |||
@@ -59,7 +59,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr, | |||
59 | #define MACHINE_FLAG_DIAG44 (1UL << 4) | 59 | #define MACHINE_FLAG_DIAG44 (1UL << 4) |
60 | #define MACHINE_FLAG_IDTE (1UL << 5) | 60 | #define MACHINE_FLAG_IDTE (1UL << 5) |
61 | #define MACHINE_FLAG_DIAG9C (1UL << 6) | 61 | #define MACHINE_FLAG_DIAG9C (1UL << 6) |
62 | #define MACHINE_FLAG_MVCOS (1UL << 7) | ||
63 | #define MACHINE_FLAG_KVM (1UL << 8) | 62 | #define MACHINE_FLAG_KVM (1UL << 8) |
64 | #define MACHINE_FLAG_ESOP (1UL << 9) | 63 | #define MACHINE_FLAG_ESOP (1UL << 9) |
65 | #define MACHINE_FLAG_EDAT1 (1UL << 10) | 64 | #define MACHINE_FLAG_EDAT1 (1UL << 10) |
@@ -85,7 +84,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr, | |||
85 | #define MACHINE_HAS_IDTE (0) | 84 | #define MACHINE_HAS_IDTE (0) |
86 | #define MACHINE_HAS_DIAG44 (1) | 85 | #define MACHINE_HAS_DIAG44 (1) |
87 | #define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG) | 86 | #define MACHINE_HAS_MVPG (S390_lowcore.machine_flags & MACHINE_FLAG_MVPG) |
88 | #define MACHINE_HAS_MVCOS (0) | ||
89 | #define MACHINE_HAS_EDAT1 (0) | 87 | #define MACHINE_HAS_EDAT1 (0) |
90 | #define MACHINE_HAS_EDAT2 (0) | 88 | #define MACHINE_HAS_EDAT2 (0) |
91 | #define MACHINE_HAS_LPP (0) | 89 | #define MACHINE_HAS_LPP (0) |
@@ -98,7 +96,6 @@ void create_mem_hole(struct mem_chunk mem_chunk[], unsigned long addr, | |||
98 | #define MACHINE_HAS_IDTE (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE) | 96 | #define MACHINE_HAS_IDTE (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE) |
99 | #define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44) | 97 | #define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44) |
100 | #define MACHINE_HAS_MVPG (1) | 98 | #define MACHINE_HAS_MVPG (1) |
101 | #define MACHINE_HAS_MVCOS (S390_lowcore.machine_flags & MACHINE_FLAG_MVCOS) | ||
102 | #define MACHINE_HAS_EDAT1 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1) | 99 | #define MACHINE_HAS_EDAT1 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1) |
103 | #define MACHINE_HAS_EDAT2 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT2) | 100 | #define MACHINE_HAS_EDAT2 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT2) |
104 | #define MACHINE_HAS_LPP (S390_lowcore.machine_flags & MACHINE_FLAG_LPP) | 101 | #define MACHINE_HAS_LPP (S390_lowcore.machine_flags & MACHINE_FLAG_LPP) |
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index 10e0fcd3633d..3ccd71b90345 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -81,6 +81,7 @@ static inline struct thread_info *current_thread_info(void) | |||
81 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ | 81 | #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ |
82 | #define TIF_SIGPENDING 2 /* signal pending */ | 82 | #define TIF_SIGPENDING 2 /* signal pending */ |
83 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 83 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
84 | #define TIF_TLB_WAIT 4 /* wait for TLB flush completion */ | ||
84 | #define TIF_PER_TRAP 6 /* deliver sigtrap on return to user */ | 85 | #define TIF_PER_TRAP 6 /* deliver sigtrap on return to user */ |
85 | #define TIF_MCCK_PENDING 7 /* machine check handling is pending */ | 86 | #define TIF_MCCK_PENDING 7 /* machine check handling is pending */ |
86 | #define TIF_SYSCALL_TRACE 8 /* syscall trace active */ | 87 | #define TIF_SYSCALL_TRACE 8 /* syscall trace active */ |
@@ -91,11 +92,13 @@ static inline struct thread_info *current_thread_info(void) | |||
91 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 92 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
92 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ | 93 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ |
93 | #define TIF_SINGLE_STEP 20 /* This task is single stepped */ | 94 | #define TIF_SINGLE_STEP 20 /* This task is single stepped */ |
95 | #define TIF_BLOCK_STEP 21 /* This task is block stepped */ | ||
94 | 96 | ||
95 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) | 97 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) |
96 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 98 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
97 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 99 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
98 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 100 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
101 | #define _TIF_TLB_WAIT (1<<TIF_TLB_WAIT) | ||
99 | #define _TIF_PER_TRAP (1<<TIF_PER_TRAP) | 102 | #define _TIF_PER_TRAP (1<<TIF_PER_TRAP) |
100 | #define _TIF_MCCK_PENDING (1<<TIF_MCCK_PENDING) | 103 | #define _TIF_MCCK_PENDING (1<<TIF_MCCK_PENDING) |
101 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 104 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h index 79330af9a5f8..4133b3f72fb0 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h | |||
@@ -92,33 +92,58 @@ static inline unsigned long extable_fixup(const struct exception_table_entry *x) | |||
92 | #define ARCH_HAS_SORT_EXTABLE | 92 | #define ARCH_HAS_SORT_EXTABLE |
93 | #define ARCH_HAS_SEARCH_EXTABLE | 93 | #define ARCH_HAS_SEARCH_EXTABLE |
94 | 94 | ||
95 | struct uaccess_ops { | 95 | int __handle_fault(unsigned long, unsigned long, int); |
96 | size_t (*copy_from_user)(size_t, const void __user *, void *); | ||
97 | size_t (*copy_to_user)(size_t, void __user *, const void *); | ||
98 | size_t (*copy_in_user)(size_t, void __user *, const void __user *); | ||
99 | size_t (*clear_user)(size_t, void __user *); | ||
100 | size_t (*strnlen_user)(size_t, const char __user *); | ||
101 | size_t (*strncpy_from_user)(size_t, const char __user *, char *); | ||
102 | int (*futex_atomic_op)(int op, u32 __user *, int oparg, int *old); | ||
103 | int (*futex_atomic_cmpxchg)(u32 *, u32 __user *, u32 old, u32 new); | ||
104 | }; | ||
105 | 96 | ||
106 | extern struct uaccess_ops uaccess; | 97 | /** |
107 | extern struct uaccess_ops uaccess_mvcos; | 98 | * __copy_from_user: - Copy a block of data from user space, with less checking. |
108 | extern struct uaccess_ops uaccess_pt; | 99 | * @to: Destination address, in kernel space. |
100 | * @from: Source address, in user space. | ||
101 | * @n: Number of bytes to copy. | ||
102 | * | ||
103 | * Context: User context only. This function may sleep. | ||
104 | * | ||
105 | * Copy data from user space to kernel space. Caller must check | ||
106 | * the specified block with access_ok() before calling this function. | ||
107 | * | ||
108 | * Returns number of bytes that could not be copied. | ||
109 | * On success, this will be zero. | ||
110 | * | ||
111 | * If some data could not be copied, this function will pad the copied | ||
112 | * data to the requested size using zero bytes. | ||
113 | */ | ||
114 | unsigned long __must_check __copy_from_user(void *to, const void __user *from, | ||
115 | unsigned long n); | ||
116 | |||
117 | /** | ||
118 | * __copy_to_user: - Copy a block of data into user space, with less checking. | ||
119 | * @to: Destination address, in user space. | ||
120 | * @from: Source address, in kernel space. | ||
121 | * @n: Number of bytes to copy. | ||
122 | * | ||
123 | * Context: User context only. This function may sleep. | ||
124 | * | ||
125 | * Copy data from kernel space to user space. Caller must check | ||
126 | * the specified block with access_ok() before calling this function. | ||
127 | * | ||
128 | * Returns number of bytes that could not be copied. | ||
129 | * On success, this will be zero. | ||
130 | */ | ||
131 | unsigned long __must_check __copy_to_user(void __user *to, const void *from, | ||
132 | unsigned long n); | ||
109 | 133 | ||
110 | extern int __handle_fault(unsigned long, unsigned long, int); | 134 | #define __copy_to_user_inatomic __copy_to_user |
135 | #define __copy_from_user_inatomic __copy_from_user | ||
111 | 136 | ||
112 | static inline int __put_user_fn(size_t size, void __user *ptr, void *x) | 137 | static inline int __put_user_fn(void *x, void __user *ptr, unsigned long size) |
113 | { | 138 | { |
114 | size = uaccess.copy_to_user(size, ptr, x); | 139 | size = __copy_to_user(ptr, x, size); |
115 | return size ? -EFAULT : size; | 140 | return size ? -EFAULT : 0; |
116 | } | 141 | } |
117 | 142 | ||
118 | static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | 143 | static inline int __get_user_fn(void *x, const void __user *ptr, unsigned long size) |
119 | { | 144 | { |
120 | size = uaccess.copy_from_user(size, ptr, x); | 145 | size = __copy_from_user(x, ptr, size); |
121 | return size ? -EFAULT : size; | 146 | return size ? -EFAULT : 0; |
122 | } | 147 | } |
123 | 148 | ||
124 | /* | 149 | /* |
@@ -135,8 +160,8 @@ static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | |||
135 | case 2: \ | 160 | case 2: \ |
136 | case 4: \ | 161 | case 4: \ |
137 | case 8: \ | 162 | case 8: \ |
138 | __pu_err = __put_user_fn(sizeof (*(ptr)), \ | 163 | __pu_err = __put_user_fn(&__x, ptr, \ |
139 | ptr, &__x); \ | 164 | sizeof(*(ptr))); \ |
140 | break; \ | 165 | break; \ |
141 | default: \ | 166 | default: \ |
142 | __put_user_bad(); \ | 167 | __put_user_bad(); \ |
@@ -152,7 +177,7 @@ static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | |||
152 | }) | 177 | }) |
153 | 178 | ||
154 | 179 | ||
155 | extern int __put_user_bad(void) __attribute__((noreturn)); | 180 | int __put_user_bad(void) __attribute__((noreturn)); |
156 | 181 | ||
157 | #define __get_user(x, ptr) \ | 182 | #define __get_user(x, ptr) \ |
158 | ({ \ | 183 | ({ \ |
@@ -161,29 +186,29 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
161 | switch (sizeof(*(ptr))) { \ | 186 | switch (sizeof(*(ptr))) { \ |
162 | case 1: { \ | 187 | case 1: { \ |
163 | unsigned char __x; \ | 188 | unsigned char __x; \ |
164 | __gu_err = __get_user_fn(sizeof (*(ptr)), \ | 189 | __gu_err = __get_user_fn(&__x, ptr, \ |
165 | ptr, &__x); \ | 190 | sizeof(*(ptr))); \ |
166 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ | 191 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
167 | break; \ | 192 | break; \ |
168 | }; \ | 193 | }; \ |
169 | case 2: { \ | 194 | case 2: { \ |
170 | unsigned short __x; \ | 195 | unsigned short __x; \ |
171 | __gu_err = __get_user_fn(sizeof (*(ptr)), \ | 196 | __gu_err = __get_user_fn(&__x, ptr, \ |
172 | ptr, &__x); \ | 197 | sizeof(*(ptr))); \ |
173 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ | 198 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
174 | break; \ | 199 | break; \ |
175 | }; \ | 200 | }; \ |
176 | case 4: { \ | 201 | case 4: { \ |
177 | unsigned int __x; \ | 202 | unsigned int __x; \ |
178 | __gu_err = __get_user_fn(sizeof (*(ptr)), \ | 203 | __gu_err = __get_user_fn(&__x, ptr, \ |
179 | ptr, &__x); \ | 204 | sizeof(*(ptr))); \ |
180 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ | 205 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
181 | break; \ | 206 | break; \ |
182 | }; \ | 207 | }; \ |
183 | case 8: { \ | 208 | case 8: { \ |
184 | unsigned long long __x; \ | 209 | unsigned long long __x; \ |
185 | __gu_err = __get_user_fn(sizeof (*(ptr)), \ | 210 | __gu_err = __get_user_fn(&__x, ptr, \ |
186 | ptr, &__x); \ | 211 | sizeof(*(ptr))); \ |
187 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ | 212 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
188 | break; \ | 213 | break; \ |
189 | }; \ | 214 | }; \ |
@@ -200,35 +225,12 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
200 | __get_user(x, ptr); \ | 225 | __get_user(x, ptr); \ |
201 | }) | 226 | }) |
202 | 227 | ||
203 | extern int __get_user_bad(void) __attribute__((noreturn)); | 228 | int __get_user_bad(void) __attribute__((noreturn)); |
204 | 229 | ||
205 | #define __put_user_unaligned __put_user | 230 | #define __put_user_unaligned __put_user |
206 | #define __get_user_unaligned __get_user | 231 | #define __get_user_unaligned __get_user |
207 | 232 | ||
208 | /** | 233 | /** |
209 | * __copy_to_user: - Copy a block of data into user space, with less checking. | ||
210 | * @to: Destination address, in user space. | ||
211 | * @from: Source address, in kernel space. | ||
212 | * @n: Number of bytes to copy. | ||
213 | * | ||
214 | * Context: User context only. This function may sleep. | ||
215 | * | ||
216 | * Copy data from kernel space to user space. Caller must check | ||
217 | * the specified block with access_ok() before calling this function. | ||
218 | * | ||
219 | * Returns number of bytes that could not be copied. | ||
220 | * On success, this will be zero. | ||
221 | */ | ||
222 | static inline unsigned long __must_check | ||
223 | __copy_to_user(void __user *to, const void *from, unsigned long n) | ||
224 | { | ||
225 | return uaccess.copy_to_user(n, to, from); | ||
226 | } | ||
227 | |||
228 | #define __copy_to_user_inatomic __copy_to_user | ||
229 | #define __copy_from_user_inatomic __copy_from_user | ||
230 | |||
231 | /** | ||
232 | * copy_to_user: - Copy a block of data into user space. | 234 | * copy_to_user: - Copy a block of data into user space. |
233 | * @to: Destination address, in user space. | 235 | * @to: Destination address, in user space. |
234 | * @from: Source address, in kernel space. | 236 | * @from: Source address, in kernel space. |
@@ -248,30 +250,7 @@ copy_to_user(void __user *to, const void *from, unsigned long n) | |||
248 | return __copy_to_user(to, from, n); | 250 | return __copy_to_user(to, from, n); |
249 | } | 251 | } |
250 | 252 | ||
251 | /** | 253 | void copy_from_user_overflow(void) |
252 | * __copy_from_user: - Copy a block of data from user space, with less checking. | ||
253 | * @to: Destination address, in kernel space. | ||
254 | * @from: Source address, in user space. | ||
255 | * @n: Number of bytes to copy. | ||
256 | * | ||
257 | * Context: User context only. This function may sleep. | ||
258 | * | ||
259 | * Copy data from user space to kernel space. Caller must check | ||
260 | * the specified block with access_ok() before calling this function. | ||
261 | * | ||
262 | * Returns number of bytes that could not be copied. | ||
263 | * On success, this will be zero. | ||
264 | * | ||
265 | * If some data could not be copied, this function will pad the copied | ||
266 | * data to the requested size using zero bytes. | ||
267 | */ | ||
268 | static inline unsigned long __must_check | ||
269 | __copy_from_user(void *to, const void __user *from, unsigned long n) | ||
270 | { | ||
271 | return uaccess.copy_from_user(n, from, to); | ||
272 | } | ||
273 | |||
274 | extern void copy_from_user_overflow(void) | ||
275 | #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS | 254 | #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS |
276 | __compiletime_warning("copy_from_user() buffer size is not provably correct") | 255 | __compiletime_warning("copy_from_user() buffer size is not provably correct") |
277 | #endif | 256 | #endif |
@@ -306,11 +285,8 @@ copy_from_user(void *to, const void __user *from, unsigned long n) | |||
306 | return __copy_from_user(to, from, n); | 285 | return __copy_from_user(to, from, n); |
307 | } | 286 | } |
308 | 287 | ||
309 | static inline unsigned long __must_check | 288 | unsigned long __must_check |
310 | __copy_in_user(void __user *to, const void __user *from, unsigned long n) | 289 | __copy_in_user(void __user *to, const void __user *from, unsigned long n); |
311 | { | ||
312 | return uaccess.copy_in_user(n, to, from); | ||
313 | } | ||
314 | 290 | ||
315 | static inline unsigned long __must_check | 291 | static inline unsigned long __must_check |
316 | copy_in_user(void __user *to, const void __user *from, unsigned long n) | 292 | copy_in_user(void __user *to, const void __user *from, unsigned long n) |
@@ -322,18 +298,22 @@ copy_in_user(void __user *to, const void __user *from, unsigned long n) | |||
322 | /* | 298 | /* |
323 | * Copy a null terminated string from userspace. | 299 | * Copy a null terminated string from userspace. |
324 | */ | 300 | */ |
301 | |||
302 | long __strncpy_from_user(char *dst, const char __user *src, long count); | ||
303 | |||
325 | static inline long __must_check | 304 | static inline long __must_check |
326 | strncpy_from_user(char *dst, const char __user *src, long count) | 305 | strncpy_from_user(char *dst, const char __user *src, long count) |
327 | { | 306 | { |
328 | might_fault(); | 307 | might_fault(); |
329 | return uaccess.strncpy_from_user(count, src, dst); | 308 | return __strncpy_from_user(dst, src, count); |
330 | } | 309 | } |
331 | 310 | ||
332 | static inline unsigned long | 311 | unsigned long __must_check __strnlen_user(const char __user *src, unsigned long count); |
333 | strnlen_user(const char __user * src, unsigned long n) | 312 | |
313 | static inline unsigned long strnlen_user(const char __user *src, unsigned long n) | ||
334 | { | 314 | { |
335 | might_fault(); | 315 | might_fault(); |
336 | return uaccess.strnlen_user(n, src); | 316 | return __strnlen_user(src, n); |
337 | } | 317 | } |
338 | 318 | ||
339 | /** | 319 | /** |
@@ -355,21 +335,14 @@ strnlen_user(const char __user * src, unsigned long n) | |||
355 | /* | 335 | /* |
356 | * Zero Userspace | 336 | * Zero Userspace |
357 | */ | 337 | */ |
338 | unsigned long __must_check __clear_user(void __user *to, unsigned long size); | ||
358 | 339 | ||
359 | static inline unsigned long __must_check | 340 | static inline unsigned long __must_check clear_user(void __user *to, unsigned long n) |
360 | __clear_user(void __user *to, unsigned long n) | ||
361 | { | ||
362 | return uaccess.clear_user(n, to); | ||
363 | } | ||
364 | |||
365 | static inline unsigned long __must_check | ||
366 | clear_user(void __user *to, unsigned long n) | ||
367 | { | 341 | { |
368 | might_fault(); | 342 | might_fault(); |
369 | return uaccess.clear_user(n, to); | 343 | return __clear_user(to, n); |
370 | } | 344 | } |
371 | 345 | ||
372 | extern int copy_to_user_real(void __user *dest, void *src, size_t count); | 346 | int copy_to_user_real(void __user *dest, void *src, unsigned long count); |
373 | extern int copy_from_user_real(void *dest, void __user *src, size_t count); | ||
374 | 347 | ||
375 | #endif /* __S390_UACCESS_H */ | 348 | #endif /* __S390_UACCESS_H */ |
diff --git a/arch/s390/include/uapi/asm/ptrace.h b/arch/s390/include/uapi/asm/ptrace.h index 7e0b498a2c2b..a150f4fabe43 100644 --- a/arch/s390/include/uapi/asm/ptrace.h +++ b/arch/s390/include/uapi/asm/ptrace.h | |||
@@ -403,6 +403,12 @@ typedef struct | |||
403 | #define PTRACE_TE_ABORT_RAND 0x5011 | 403 | #define PTRACE_TE_ABORT_RAND 0x5011 |
404 | 404 | ||
405 | /* | 405 | /* |
406 | * The numbers chosen here are somewhat arbitrary but absolutely MUST | ||
407 | * not overlap with any of the number assigned in <linux/ptrace.h>. | ||
408 | */ | ||
409 | #define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ | ||
410 | |||
411 | /* | ||
406 | * PT_PROT definition is loosely based on hppa bsd definition in | 412 | * PT_PROT definition is loosely based on hppa bsd definition in |
407 | * gdb/hppab-nat.c | 413 | * gdb/hppab-nat.c |
408 | */ | 414 | */ |
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index 1b3ac09c11b6..a95c4ca99617 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile | |||
@@ -47,9 +47,8 @@ obj-$(CONFIG_SCHED_BOOK) += topology.o | |||
47 | obj-$(CONFIG_HIBERNATION) += suspend.o swsusp_asm64.o | 47 | obj-$(CONFIG_HIBERNATION) += suspend.o swsusp_asm64.o |
48 | obj-$(CONFIG_AUDIT) += audit.o | 48 | obj-$(CONFIG_AUDIT) += audit.o |
49 | compat-obj-$(CONFIG_AUDIT) += compat_audit.o | 49 | compat-obj-$(CONFIG_AUDIT) += compat_audit.o |
50 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ | 50 | obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o |
51 | compat_wrapper.o compat_exec_domain.o \ | 51 | obj-$(CONFIG_COMPAT) += compat_wrapper.o $(compat-obj-y) |
52 | $(compat-obj-y) | ||
53 | 52 | ||
54 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 53 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
55 | obj-$(CONFIG_KPROBES) += kprobes.o | 54 | obj-$(CONFIG_KPROBES) += kprobes.o |
diff --git a/arch/s390/kernel/compat_exec_domain.c b/arch/s390/kernel/compat_exec_domain.c deleted file mode 100644 index 765fabdada9f..000000000000 --- a/arch/s390/kernel/compat_exec_domain.c +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * Support for 32-bit Linux for S390 personality. | ||
3 | * | ||
4 | * Copyright IBM Corp. 2000 | ||
5 | * Author(s): Gerhard Tonn (ton@de.ibm.com) | ||
6 | * | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/personality.h> | ||
13 | #include <linux/sched.h> | ||
14 | |||
15 | static struct exec_domain s390_exec_domain; | ||
16 | |||
17 | static int __init s390_init (void) | ||
18 | { | ||
19 | s390_exec_domain.name = "Linux/s390"; | ||
20 | s390_exec_domain.handler = NULL; | ||
21 | s390_exec_domain.pers_low = PER_LINUX32; | ||
22 | s390_exec_domain.pers_high = PER_LINUX32; | ||
23 | s390_exec_domain.signal_map = default_exec_domain.signal_map; | ||
24 | s390_exec_domain.signal_invmap = default_exec_domain.signal_invmap; | ||
25 | register_exec_domain(&s390_exec_domain); | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | __initcall(s390_init); | ||
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index db02052bd137..ca38139423ae 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -86,48 +86,51 @@ | |||
86 | #define SET_STAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid) | 86 | #define SET_STAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid) |
87 | #define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid) | 87 | #define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid) |
88 | 88 | ||
89 | asmlinkage long sys32_chown16(const char __user * filename, u16 user, u16 group) | 89 | COMPAT_SYSCALL_DEFINE3(s390_chown16, const char __user *, filename, |
90 | u16, user, u16, group) | ||
90 | { | 91 | { |
91 | return sys_chown(filename, low2highuid(user), low2highgid(group)); | 92 | return sys_chown(filename, low2highuid(user), low2highgid(group)); |
92 | } | 93 | } |
93 | 94 | ||
94 | asmlinkage long sys32_lchown16(const char __user * filename, u16 user, u16 group) | 95 | COMPAT_SYSCALL_DEFINE3(s390_lchown16, const char __user *, |
96 | filename, u16, user, u16, group) | ||
95 | { | 97 | { |
96 | return sys_lchown(filename, low2highuid(user), low2highgid(group)); | 98 | return sys_lchown(filename, low2highuid(user), low2highgid(group)); |
97 | } | 99 | } |
98 | 100 | ||
99 | asmlinkage long sys32_fchown16(unsigned int fd, u16 user, u16 group) | 101 | COMPAT_SYSCALL_DEFINE3(s390_fchown16, unsigned int, fd, u16, user, u16, group) |
100 | { | 102 | { |
101 | return sys_fchown(fd, low2highuid(user), low2highgid(group)); | 103 | return sys_fchown(fd, low2highuid(user), low2highgid(group)); |
102 | } | 104 | } |
103 | 105 | ||
104 | asmlinkage long sys32_setregid16(u16 rgid, u16 egid) | 106 | COMPAT_SYSCALL_DEFINE2(s390_setregid16, u16, rgid, u16, egid) |
105 | { | 107 | { |
106 | return sys_setregid(low2highgid(rgid), low2highgid(egid)); | 108 | return sys_setregid(low2highgid(rgid), low2highgid(egid)); |
107 | } | 109 | } |
108 | 110 | ||
109 | asmlinkage long sys32_setgid16(u16 gid) | 111 | COMPAT_SYSCALL_DEFINE1(s390_setgid16, u16, gid) |
110 | { | 112 | { |
111 | return sys_setgid((gid_t)gid); | 113 | return sys_setgid((gid_t)gid); |
112 | } | 114 | } |
113 | 115 | ||
114 | asmlinkage long sys32_setreuid16(u16 ruid, u16 euid) | 116 | COMPAT_SYSCALL_DEFINE2(s390_setreuid16, u16, ruid, u16, euid) |
115 | { | 117 | { |
116 | return sys_setreuid(low2highuid(ruid), low2highuid(euid)); | 118 | return sys_setreuid(low2highuid(ruid), low2highuid(euid)); |
117 | } | 119 | } |
118 | 120 | ||
119 | asmlinkage long sys32_setuid16(u16 uid) | 121 | COMPAT_SYSCALL_DEFINE1(s390_setuid16, u16, uid) |
120 | { | 122 | { |
121 | return sys_setuid((uid_t)uid); | 123 | return sys_setuid((uid_t)uid); |
122 | } | 124 | } |
123 | 125 | ||
124 | asmlinkage long sys32_setresuid16(u16 ruid, u16 euid, u16 suid) | 126 | COMPAT_SYSCALL_DEFINE3(s390_setresuid16, u16, ruid, u16, euid, u16, suid) |
125 | { | 127 | { |
126 | return sys_setresuid(low2highuid(ruid), low2highuid(euid), | 128 | return sys_setresuid(low2highuid(ruid), low2highuid(euid), |
127 | low2highuid(suid)); | 129 | low2highuid(suid)); |
128 | } | 130 | } |
129 | 131 | ||
130 | asmlinkage long sys32_getresuid16(u16 __user *ruidp, u16 __user *euidp, u16 __user *suidp) | 132 | COMPAT_SYSCALL_DEFINE3(s390_getresuid16, u16 __user *, ruidp, |
133 | u16 __user *, euidp, u16 __user *, suidp) | ||
131 | { | 134 | { |
132 | const struct cred *cred = current_cred(); | 135 | const struct cred *cred = current_cred(); |
133 | int retval; | 136 | int retval; |
@@ -144,13 +147,14 @@ asmlinkage long sys32_getresuid16(u16 __user *ruidp, u16 __user *euidp, u16 __us | |||
144 | return retval; | 147 | return retval; |
145 | } | 148 | } |
146 | 149 | ||
147 | asmlinkage long sys32_setresgid16(u16 rgid, u16 egid, u16 sgid) | 150 | COMPAT_SYSCALL_DEFINE3(s390_setresgid16, u16, rgid, u16, egid, u16, sgid) |
148 | { | 151 | { |
149 | return sys_setresgid(low2highgid(rgid), low2highgid(egid), | 152 | return sys_setresgid(low2highgid(rgid), low2highgid(egid), |
150 | low2highgid(sgid)); | 153 | low2highgid(sgid)); |
151 | } | 154 | } |
152 | 155 | ||
153 | asmlinkage long sys32_getresgid16(u16 __user *rgidp, u16 __user *egidp, u16 __user *sgidp) | 156 | COMPAT_SYSCALL_DEFINE3(s390_getresgid16, u16 __user *, rgidp, |
157 | u16 __user *, egidp, u16 __user *, sgidp) | ||
154 | { | 158 | { |
155 | const struct cred *cred = current_cred(); | 159 | const struct cred *cred = current_cred(); |
156 | int retval; | 160 | int retval; |
@@ -167,12 +171,12 @@ asmlinkage long sys32_getresgid16(u16 __user *rgidp, u16 __user *egidp, u16 __us | |||
167 | return retval; | 171 | return retval; |
168 | } | 172 | } |
169 | 173 | ||
170 | asmlinkage long sys32_setfsuid16(u16 uid) | 174 | COMPAT_SYSCALL_DEFINE1(s390_setfsuid16, u16, uid) |
171 | { | 175 | { |
172 | return sys_setfsuid((uid_t)uid); | 176 | return sys_setfsuid((uid_t)uid); |
173 | } | 177 | } |
174 | 178 | ||
175 | asmlinkage long sys32_setfsgid16(u16 gid) | 179 | COMPAT_SYSCALL_DEFINE1(s390_setfsgid16, u16, gid) |
176 | { | 180 | { |
177 | return sys_setfsgid((gid_t)gid); | 181 | return sys_setfsgid((gid_t)gid); |
178 | } | 182 | } |
@@ -215,7 +219,7 @@ static int groups16_from_user(struct group_info *group_info, u16 __user *groupli | |||
215 | return 0; | 219 | return 0; |
216 | } | 220 | } |
217 | 221 | ||
218 | asmlinkage long sys32_getgroups16(int gidsetsize, u16 __user *grouplist) | 222 | COMPAT_SYSCALL_DEFINE2(s390_getgroups16, int, gidsetsize, u16 __user *, grouplist) |
219 | { | 223 | { |
220 | const struct cred *cred = current_cred(); | 224 | const struct cred *cred = current_cred(); |
221 | int i; | 225 | int i; |
@@ -240,7 +244,7 @@ out: | |||
240 | return i; | 244 | return i; |
241 | } | 245 | } |
242 | 246 | ||
243 | asmlinkage long sys32_setgroups16(int gidsetsize, u16 __user *grouplist) | 247 | COMPAT_SYSCALL_DEFINE2(s390_setgroups16, int, gidsetsize, u16 __user *, grouplist) |
244 | { | 248 | { |
245 | struct group_info *group_info; | 249 | struct group_info *group_info; |
246 | int retval; | 250 | int retval; |
@@ -265,22 +269,22 @@ asmlinkage long sys32_setgroups16(int gidsetsize, u16 __user *grouplist) | |||
265 | return retval; | 269 | return retval; |
266 | } | 270 | } |
267 | 271 | ||
268 | asmlinkage long sys32_getuid16(void) | 272 | COMPAT_SYSCALL_DEFINE0(s390_getuid16) |
269 | { | 273 | { |
270 | return high2lowuid(from_kuid_munged(current_user_ns(), current_uid())); | 274 | return high2lowuid(from_kuid_munged(current_user_ns(), current_uid())); |
271 | } | 275 | } |
272 | 276 | ||
273 | asmlinkage long sys32_geteuid16(void) | 277 | COMPAT_SYSCALL_DEFINE0(s390_geteuid16) |
274 | { | 278 | { |
275 | return high2lowuid(from_kuid_munged(current_user_ns(), current_euid())); | 279 | return high2lowuid(from_kuid_munged(current_user_ns(), current_euid())); |
276 | } | 280 | } |
277 | 281 | ||
278 | asmlinkage long sys32_getgid16(void) | 282 | COMPAT_SYSCALL_DEFINE0(s390_getgid16) |
279 | { | 283 | { |
280 | return high2lowgid(from_kgid_munged(current_user_ns(), current_gid())); | 284 | return high2lowgid(from_kgid_munged(current_user_ns(), current_gid())); |
281 | } | 285 | } |
282 | 286 | ||
283 | asmlinkage long sys32_getegid16(void) | 287 | COMPAT_SYSCALL_DEFINE0(s390_getegid16) |
284 | { | 288 | { |
285 | return high2lowgid(from_kgid_munged(current_user_ns(), current_egid())); | 289 | return high2lowgid(from_kgid_munged(current_user_ns(), current_egid())); |
286 | } | 290 | } |
@@ -295,41 +299,35 @@ COMPAT_SYSCALL_DEFINE5(s390_ipc, uint, call, int, first, compat_ulong_t, second, | |||
295 | } | 299 | } |
296 | #endif | 300 | #endif |
297 | 301 | ||
298 | asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low) | 302 | COMPAT_SYSCALL_DEFINE3(s390_truncate64, const char __user *, path, u32, high, u32, low) |
299 | { | 303 | { |
300 | if ((int)high < 0) | 304 | return sys_truncate(path, (unsigned long)high << 32 | low); |
301 | return -EINVAL; | ||
302 | else | ||
303 | return sys_truncate(path, (high << 32) | low); | ||
304 | } | 305 | } |
305 | 306 | ||
306 | asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low) | 307 | COMPAT_SYSCALL_DEFINE3(s390_ftruncate64, unsigned int, fd, u32, high, u32, low) |
307 | { | 308 | { |
308 | if ((int)high < 0) | 309 | return sys_ftruncate(fd, (unsigned long)high << 32 | low); |
309 | return -EINVAL; | ||
310 | else | ||
311 | return sys_ftruncate(fd, (high << 32) | low); | ||
312 | } | 310 | } |
313 | 311 | ||
314 | asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf, | 312 | COMPAT_SYSCALL_DEFINE5(s390_pread64, unsigned int, fd, char __user *, ubuf, |
315 | size_t count, u32 poshi, u32 poslo) | 313 | compat_size_t, count, u32, high, u32, low) |
316 | { | 314 | { |
317 | if ((compat_ssize_t) count < 0) | 315 | if ((compat_ssize_t) count < 0) |
318 | return -EINVAL; | 316 | return -EINVAL; |
319 | return sys_pread64(fd, ubuf, count, ((loff_t)AA(poshi) << 32) | AA(poslo)); | 317 | return sys_pread64(fd, ubuf, count, (unsigned long)high << 32 | low); |
320 | } | 318 | } |
321 | 319 | ||
322 | asmlinkage long sys32_pwrite64(unsigned int fd, const char __user *ubuf, | 320 | COMPAT_SYSCALL_DEFINE5(s390_pwrite64, unsigned int, fd, const char __user *, ubuf, |
323 | size_t count, u32 poshi, u32 poslo) | 321 | compat_size_t, count, u32, high, u32, low) |
324 | { | 322 | { |
325 | if ((compat_ssize_t) count < 0) | 323 | if ((compat_ssize_t) count < 0) |
326 | return -EINVAL; | 324 | return -EINVAL; |
327 | return sys_pwrite64(fd, ubuf, count, ((loff_t)AA(poshi) << 32) | AA(poslo)); | 325 | return sys_pwrite64(fd, ubuf, count, (unsigned long)high << 32 | low); |
328 | } | 326 | } |
329 | 327 | ||
330 | asmlinkage compat_ssize_t sys32_readahead(int fd, u32 offhi, u32 offlo, s32 count) | 328 | COMPAT_SYSCALL_DEFINE4(s390_readahead, int, fd, u32, high, u32, low, s32, count) |
331 | { | 329 | { |
332 | return sys_readahead(fd, ((loff_t)AA(offhi) << 32) | AA(offlo), count); | 330 | return sys_readahead(fd, (unsigned long)high << 32 | low, count); |
333 | } | 331 | } |
334 | 332 | ||
335 | struct stat64_emu31 { | 333 | struct stat64_emu31 { |
@@ -381,7 +379,7 @@ static int cp_stat64(struct stat64_emu31 __user *ubuf, struct kstat *stat) | |||
381 | return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 379 | return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
382 | } | 380 | } |
383 | 381 | ||
384 | asmlinkage long sys32_stat64(const char __user * filename, struct stat64_emu31 __user * statbuf) | 382 | COMPAT_SYSCALL_DEFINE2(s390_stat64, const char __user *, filename, struct stat64_emu31 __user *, statbuf) |
385 | { | 383 | { |
386 | struct kstat stat; | 384 | struct kstat stat; |
387 | int ret = vfs_stat(filename, &stat); | 385 | int ret = vfs_stat(filename, &stat); |
@@ -390,7 +388,7 @@ asmlinkage long sys32_stat64(const char __user * filename, struct stat64_emu31 _ | |||
390 | return ret; | 388 | return ret; |
391 | } | 389 | } |
392 | 390 | ||
393 | asmlinkage long sys32_lstat64(const char __user * filename, struct stat64_emu31 __user * statbuf) | 391 | COMPAT_SYSCALL_DEFINE2(s390_lstat64, const char __user *, filename, struct stat64_emu31 __user *, statbuf) |
394 | { | 392 | { |
395 | struct kstat stat; | 393 | struct kstat stat; |
396 | int ret = vfs_lstat(filename, &stat); | 394 | int ret = vfs_lstat(filename, &stat); |
@@ -399,7 +397,7 @@ asmlinkage long sys32_lstat64(const char __user * filename, struct stat64_emu31 | |||
399 | return ret; | 397 | return ret; |
400 | } | 398 | } |
401 | 399 | ||
402 | asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * statbuf) | 400 | COMPAT_SYSCALL_DEFINE2(s390_fstat64, unsigned int, fd, struct stat64_emu31 __user *, statbuf) |
403 | { | 401 | { |
404 | struct kstat stat; | 402 | struct kstat stat; |
405 | int ret = vfs_fstat(fd, &stat); | 403 | int ret = vfs_fstat(fd, &stat); |
@@ -408,8 +406,8 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta | |||
408 | return ret; | 406 | return ret; |
409 | } | 407 | } |
410 | 408 | ||
411 | asmlinkage long sys32_fstatat64(unsigned int dfd, const char __user *filename, | 409 | COMPAT_SYSCALL_DEFINE4(s390_fstatat64, unsigned int, dfd, const char __user *, filename, |
412 | struct stat64_emu31 __user* statbuf, int flag) | 410 | struct stat64_emu31 __user *, statbuf, int, flag) |
413 | { | 411 | { |
414 | struct kstat stat; | 412 | struct kstat stat; |
415 | int error; | 413 | int error; |
@@ -435,7 +433,7 @@ struct mmap_arg_struct_emu31 { | |||
435 | compat_ulong_t offset; | 433 | compat_ulong_t offset; |
436 | }; | 434 | }; |
437 | 435 | ||
438 | asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg) | 436 | COMPAT_SYSCALL_DEFINE1(s390_old_mmap, struct mmap_arg_struct_emu31 __user *, arg) |
439 | { | 437 | { |
440 | struct mmap_arg_struct_emu31 a; | 438 | struct mmap_arg_struct_emu31 a; |
441 | 439 | ||
@@ -447,7 +445,7 @@ asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg) | |||
447 | a.offset >> PAGE_SHIFT); | 445 | a.offset >> PAGE_SHIFT); |
448 | } | 446 | } |
449 | 447 | ||
450 | asmlinkage long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg) | 448 | COMPAT_SYSCALL_DEFINE1(s390_mmap2, struct mmap_arg_struct_emu31 __user *, arg) |
451 | { | 449 | { |
452 | struct mmap_arg_struct_emu31 a; | 450 | struct mmap_arg_struct_emu31 a; |
453 | 451 | ||
@@ -456,7 +454,7 @@ asmlinkage long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg) | |||
456 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); | 454 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); |
457 | } | 455 | } |
458 | 456 | ||
459 | asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count) | 457 | COMPAT_SYSCALL_DEFINE3(s390_read, unsigned int, fd, char __user *, buf, compat_size_t, count) |
460 | { | 458 | { |
461 | if ((compat_ssize_t) count < 0) | 459 | if ((compat_ssize_t) count < 0) |
462 | return -EINVAL; | 460 | return -EINVAL; |
@@ -464,7 +462,7 @@ asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count) | |||
464 | return sys_read(fd, buf, count); | 462 | return sys_read(fd, buf, count); |
465 | } | 463 | } |
466 | 464 | ||
467 | asmlinkage long sys32_write(unsigned int fd, const char __user * buf, size_t count) | 465 | COMPAT_SYSCALL_DEFINE3(s390_write, unsigned int, fd, const char __user *, buf, compat_size_t, count) |
468 | { | 466 | { |
469 | if ((compat_ssize_t) count < 0) | 467 | if ((compat_ssize_t) count < 0) |
470 | return -EINVAL; | 468 | return -EINVAL; |
@@ -478,14 +476,13 @@ asmlinkage long sys32_write(unsigned int fd, const char __user * buf, size_t cou | |||
478 | * because the 31 bit values differ from the 64 bit values. | 476 | * because the 31 bit values differ from the 64 bit values. |
479 | */ | 477 | */ |
480 | 478 | ||
481 | asmlinkage long | 479 | COMPAT_SYSCALL_DEFINE5(s390_fadvise64, int, fd, u32, high, u32, low, compat_size_t, len, int, advise) |
482 | sys32_fadvise64(int fd, loff_t offset, size_t len, int advise) | ||
483 | { | 480 | { |
484 | if (advise == 4) | 481 | if (advise == 4) |
485 | advise = POSIX_FADV_DONTNEED; | 482 | advise = POSIX_FADV_DONTNEED; |
486 | else if (advise == 5) | 483 | else if (advise == 5) |
487 | advise = POSIX_FADV_NOREUSE; | 484 | advise = POSIX_FADV_NOREUSE; |
488 | return sys_fadvise64(fd, offset, len, advise); | 485 | return sys_fadvise64(fd, (unsigned long)high << 32 | low, len, advise); |
489 | } | 486 | } |
490 | 487 | ||
491 | struct fadvise64_64_args { | 488 | struct fadvise64_64_args { |
@@ -495,8 +492,7 @@ struct fadvise64_64_args { | |||
495 | int advice; | 492 | int advice; |
496 | }; | 493 | }; |
497 | 494 | ||
498 | asmlinkage long | 495 | COMPAT_SYSCALL_DEFINE1(s390_fadvise64_64, struct fadvise64_64_args __user *, args) |
499 | sys32_fadvise64_64(struct fadvise64_64_args __user *args) | ||
500 | { | 496 | { |
501 | struct fadvise64_64_args a; | 497 | struct fadvise64_64_args a; |
502 | 498 | ||
@@ -508,3 +504,17 @@ sys32_fadvise64_64(struct fadvise64_64_args __user *args) | |||
508 | a.advice = POSIX_FADV_NOREUSE; | 504 | a.advice = POSIX_FADV_NOREUSE; |
509 | return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice); | 505 | return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice); |
510 | } | 506 | } |
507 | |||
508 | COMPAT_SYSCALL_DEFINE6(s390_sync_file_range, int, fd, u32, offhigh, u32, offlow, | ||
509 | u32, nhigh, u32, nlow, unsigned int, flags) | ||
510 | { | ||
511 | return sys_sync_file_range(fd, ((loff_t)offhigh << 32) + offlow, | ||
512 | ((u64)nhigh << 32) + nlow, flags); | ||
513 | } | ||
514 | |||
515 | COMPAT_SYSCALL_DEFINE6(s390_fallocate, int, fd, int, mode, u32, offhigh, u32, offlow, | ||
516 | u32, lenhigh, u32, lenlow) | ||
517 | { | ||
518 | return sys_fallocate(fd, mode, ((loff_t)offhigh << 32) + offlow, | ||
519 | ((u64)lenhigh << 32) + lenlow); | ||
520 | } | ||
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index 1bfda3eca379..39ddfdb40ae8 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h | |||
@@ -76,46 +76,43 @@ struct stat64_emu31; | |||
76 | struct mmap_arg_struct_emu31; | 76 | struct mmap_arg_struct_emu31; |
77 | struct fadvise64_64_args; | 77 | struct fadvise64_64_args; |
78 | 78 | ||
79 | long sys32_chown16(const char __user * filename, u16 user, u16 group); | 79 | long compat_sys_s390_chown16(const char __user *filename, u16 user, u16 group); |
80 | long sys32_lchown16(const char __user * filename, u16 user, u16 group); | 80 | long compat_sys_s390_lchown16(const char __user *filename, u16 user, u16 group); |
81 | long sys32_fchown16(unsigned int fd, u16 user, u16 group); | 81 | long compat_sys_s390_fchown16(unsigned int fd, u16 user, u16 group); |
82 | long sys32_setregid16(u16 rgid, u16 egid); | 82 | long compat_sys_s390_setregid16(u16 rgid, u16 egid); |
83 | long sys32_setgid16(u16 gid); | 83 | long compat_sys_s390_setgid16(u16 gid); |
84 | long sys32_setreuid16(u16 ruid, u16 euid); | 84 | long compat_sys_s390_setreuid16(u16 ruid, u16 euid); |
85 | long sys32_setuid16(u16 uid); | 85 | long compat_sys_s390_setuid16(u16 uid); |
86 | long sys32_setresuid16(u16 ruid, u16 euid, u16 suid); | 86 | long compat_sys_s390_setresuid16(u16 ruid, u16 euid, u16 suid); |
87 | long sys32_getresuid16(u16 __user *ruid, u16 __user *euid, u16 __user *suid); | 87 | long compat_sys_s390_getresuid16(u16 __user *ruid, u16 __user *euid, u16 __user *suid); |
88 | long sys32_setresgid16(u16 rgid, u16 egid, u16 sgid); | 88 | long compat_sys_s390_setresgid16(u16 rgid, u16 egid, u16 sgid); |
89 | long sys32_getresgid16(u16 __user *rgid, u16 __user *egid, u16 __user *sgid); | 89 | long compat_sys_s390_getresgid16(u16 __user *rgid, u16 __user *egid, u16 __user *sgid); |
90 | long sys32_setfsuid16(u16 uid); | 90 | long compat_sys_s390_setfsuid16(u16 uid); |
91 | long sys32_setfsgid16(u16 gid); | 91 | long compat_sys_s390_setfsgid16(u16 gid); |
92 | long sys32_getgroups16(int gidsetsize, u16 __user *grouplist); | 92 | long compat_sys_s390_getgroups16(int gidsetsize, u16 __user *grouplist); |
93 | long sys32_setgroups16(int gidsetsize, u16 __user *grouplist); | 93 | long compat_sys_s390_setgroups16(int gidsetsize, u16 __user *grouplist); |
94 | long sys32_getuid16(void); | 94 | long compat_sys_s390_getuid16(void); |
95 | long sys32_geteuid16(void); | 95 | long compat_sys_s390_geteuid16(void); |
96 | long sys32_getgid16(void); | 96 | long compat_sys_s390_getgid16(void); |
97 | long sys32_getegid16(void); | 97 | long compat_sys_s390_getegid16(void); |
98 | long sys32_truncate64(const char __user * path, unsigned long high, | 98 | long compat_sys_s390_truncate64(const char __user *path, u32 high, u32 low); |
99 | unsigned long low); | 99 | long compat_sys_s390_ftruncate64(unsigned int fd, u32 high, u32 low); |
100 | long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low); | 100 | long compat_sys_s390_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, u32 high, u32 low); |
101 | long sys32_init_module(void __user *umod, unsigned long len, | 101 | long compat_sys_s390_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count, u32 high, u32 low); |
102 | const char __user *uargs); | 102 | long compat_sys_s390_readahead(int fd, u32 high, u32 low, s32 count); |
103 | long sys32_delete_module(const char __user *name_user, unsigned int flags); | 103 | long compat_sys_s390_stat64(const char __user *filename, struct stat64_emu31 __user *statbuf); |
104 | long sys32_pread64(unsigned int fd, char __user *ubuf, size_t count, | 104 | long compat_sys_s390_lstat64(const char __user *filename, struct stat64_emu31 __user *statbuf); |
105 | u32 poshi, u32 poslo); | 105 | long compat_sys_s390_fstat64(unsigned int fd, struct stat64_emu31 __user *statbuf); |
106 | long sys32_pwrite64(unsigned int fd, const char __user *ubuf, | 106 | long compat_sys_s390_fstatat64(unsigned int dfd, const char __user *filename, struct stat64_emu31 __user *statbuf, int flag); |
107 | size_t count, u32 poshi, u32 poslo); | 107 | long compat_sys_s390_old_mmap(struct mmap_arg_struct_emu31 __user *arg); |
108 | compat_ssize_t sys32_readahead(int fd, u32 offhi, u32 offlo, s32 count); | 108 | long compat_sys_s390_mmap2(struct mmap_arg_struct_emu31 __user *arg); |
109 | long sys32_stat64(const char __user * filename, struct stat64_emu31 __user * statbuf); | 109 | long compat_sys_s390_read(unsigned int fd, char __user * buf, compat_size_t count); |
110 | long sys32_lstat64(const char __user * filename, | 110 | long compat_sys_s390_write(unsigned int fd, const char __user * buf, compat_size_t count); |
111 | struct stat64_emu31 __user * statbuf); | 111 | long compat_sys_s390_fadvise64(int fd, u32 high, u32 low, compat_size_t len, int advise); |
112 | long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * statbuf); | 112 | long compat_sys_s390_fadvise64_64(struct fadvise64_64_args __user *args); |
113 | long sys32_fstatat64(unsigned int dfd, const char __user *filename, | 113 | long compat_sys_s390_sync_file_range(int fd, u32 offhigh, u32 offlow, u32 nhigh, u32 nlow, unsigned int flags); |
114 | struct stat64_emu31 __user* statbuf, int flag); | 114 | long compat_sys_s390_fallocate(int fd, int mode, u32 offhigh, u32 offlow, u32 lenhigh, u32 lenlow); |
115 | unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg); | 115 | long compat_sys_sigreturn(void); |
116 | long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg); | 116 | long compat_sys_rt_sigreturn(void); |
117 | long sys32_read(unsigned int fd, char __user * buf, size_t count); | 117 | |
118 | long sys32_write(unsigned int fd, const char __user * buf, size_t count); | ||
119 | long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise); | ||
120 | long sys32_fadvise64_64(struct fadvise64_64_args __user *args); | ||
121 | #endif /* _ASM_S390X_S390_H */ | 118 | #endif /* _ASM_S390X_S390_H */ |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 8b84bc373e94..7df5ed9f44d7 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -241,7 +241,7 @@ static int restore_sigregs_gprs_high(struct pt_regs *regs, __u32 __user *uregs) | |||
241 | return 0; | 241 | return 0; |
242 | } | 242 | } |
243 | 243 | ||
244 | asmlinkage long sys32_sigreturn(void) | 244 | COMPAT_SYSCALL_DEFINE0(sigreturn) |
245 | { | 245 | { |
246 | struct pt_regs *regs = task_pt_regs(current); | 246 | struct pt_regs *regs = task_pt_regs(current); |
247 | sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15]; | 247 | sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15]; |
@@ -260,7 +260,7 @@ badframe: | |||
260 | return 0; | 260 | return 0; |
261 | } | 261 | } |
262 | 262 | ||
263 | asmlinkage long sys32_rt_sigreturn(void) | 263 | COMPAT_SYSCALL_DEFINE0(rt_sigreturn) |
264 | { | 264 | { |
265 | struct pt_regs *regs = task_pt_regs(current); | 265 | struct pt_regs *regs = task_pt_regs(current); |
266 | rt_sigframe32 __user *frame = (rt_sigframe32 __user *)regs->gprs[15]; | 266 | rt_sigframe32 __user *frame = (rt_sigframe32 __user *)regs->gprs[15]; |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S deleted file mode 100644 index 0248949a756d..000000000000 --- a/arch/s390/kernel/compat_wrapper.S +++ /dev/null | |||
@@ -1,1425 +0,0 @@ | |||
1 | /* | ||
2 | * wrapper for 31 bit compatible system calls. | ||
3 | * | ||
4 | * Copyright IBM Corp. 2000, 2006 | ||
5 | * Author(s): Gerhard Tonn (ton@de.ibm.com), | ||
6 | * Thomas Spatzier (tspat@de.ibm.com) | ||
7 | */ | ||
8 | |||
9 | #include <linux/linkage.h> | ||
10 | |||
11 | ENTRY(sys32_exit_wrapper) | ||
12 | lgfr %r2,%r2 # int | ||
13 | jg sys_exit # branch to sys_exit | ||
14 | |||
15 | ENTRY(sys32_read_wrapper) | ||
16 | llgfr %r2,%r2 # unsigned int | ||
17 | llgtr %r3,%r3 # char * | ||
18 | llgfr %r4,%r4 # size_t | ||
19 | jg sys32_read # branch to sys_read | ||
20 | |||
21 | ENTRY(sys32_write_wrapper) | ||
22 | llgfr %r2,%r2 # unsigned int | ||
23 | llgtr %r3,%r3 # const char * | ||
24 | llgfr %r4,%r4 # size_t | ||
25 | jg sys32_write # branch to system call | ||
26 | |||
27 | ENTRY(sys32_close_wrapper) | ||
28 | llgfr %r2,%r2 # unsigned int | ||
29 | jg sys_close # branch to system call | ||
30 | |||
31 | ENTRY(sys32_creat_wrapper) | ||
32 | llgtr %r2,%r2 # const char * | ||
33 | lgfr %r3,%r3 # int | ||
34 | jg sys_creat # branch to system call | ||
35 | |||
36 | ENTRY(sys32_link_wrapper) | ||
37 | llgtr %r2,%r2 # const char * | ||
38 | llgtr %r3,%r3 # const char * | ||
39 | jg sys_link # branch to system call | ||
40 | |||
41 | ENTRY(sys32_unlink_wrapper) | ||
42 | llgtr %r2,%r2 # const char * | ||
43 | jg sys_unlink # branch to system call | ||
44 | |||
45 | ENTRY(sys32_chdir_wrapper) | ||
46 | llgtr %r2,%r2 # const char * | ||
47 | jg sys_chdir # branch to system call | ||
48 | |||
49 | ENTRY(sys32_time_wrapper) | ||
50 | llgtr %r2,%r2 # int * | ||
51 | jg compat_sys_time # branch to system call | ||
52 | |||
53 | ENTRY(sys32_mknod_wrapper) | ||
54 | llgtr %r2,%r2 # const char * | ||
55 | lgfr %r3,%r3 # int | ||
56 | llgfr %r4,%r4 # dev | ||
57 | jg sys_mknod # branch to system call | ||
58 | |||
59 | ENTRY(sys32_chmod_wrapper) | ||
60 | llgtr %r2,%r2 # const char * | ||
61 | llgfr %r3,%r3 # mode_t | ||
62 | jg sys_chmod # branch to system call | ||
63 | |||
64 | ENTRY(sys32_lchown16_wrapper) | ||
65 | llgtr %r2,%r2 # const char * | ||
66 | llgfr %r3,%r3 # __kernel_old_uid_emu31_t | ||
67 | llgfr %r4,%r4 # __kernel_old_uid_emu31_t | ||
68 | jg sys32_lchown16 # branch to system call | ||
69 | |||
70 | #sys32_getpid_wrapper # void | ||
71 | |||
72 | ENTRY(sys32_mount_wrapper) | ||
73 | llgtr %r2,%r2 # char * | ||
74 | llgtr %r3,%r3 # char * | ||
75 | llgtr %r4,%r4 # char * | ||
76 | llgfr %r5,%r5 # unsigned long | ||
77 | llgtr %r6,%r6 # void * | ||
78 | jg compat_sys_mount # branch to system call | ||
79 | |||
80 | ENTRY(sys32_oldumount_wrapper) | ||
81 | llgtr %r2,%r2 # char * | ||
82 | jg sys_oldumount # branch to system call | ||
83 | |||
84 | ENTRY(sys32_setuid16_wrapper) | ||
85 | llgfr %r2,%r2 # __kernel_old_uid_emu31_t | ||
86 | jg sys32_setuid16 # branch to system call | ||
87 | |||
88 | #sys32_getuid16_wrapper # void | ||
89 | |||
90 | ENTRY(sys32_ptrace_wrapper) | ||
91 | lgfr %r2,%r2 # long | ||
92 | lgfr %r3,%r3 # long | ||
93 | llgtr %r4,%r4 # long | ||
94 | llgfr %r5,%r5 # long | ||
95 | jg compat_sys_ptrace # branch to system call | ||
96 | |||
97 | ENTRY(sys32_alarm_wrapper) | ||
98 | llgfr %r2,%r2 # unsigned int | ||
99 | jg sys_alarm # branch to system call | ||
100 | |||
101 | ENTRY(compat_sys_utime_wrapper) | ||
102 | llgtr %r2,%r2 # char * | ||
103 | llgtr %r3,%r3 # struct compat_utimbuf * | ||
104 | jg compat_sys_utime # branch to system call | ||
105 | |||
106 | ENTRY(sys32_access_wrapper) | ||
107 | llgtr %r2,%r2 # const char * | ||
108 | lgfr %r3,%r3 # int | ||
109 | jg sys_access # branch to system call | ||
110 | |||
111 | ENTRY(sys32_nice_wrapper) | ||
112 | lgfr %r2,%r2 # int | ||
113 | jg sys_nice # branch to system call | ||
114 | |||
115 | #sys32_sync_wrapper # void | ||
116 | |||
117 | ENTRY(sys32_kill_wrapper) | ||
118 | lgfr %r2,%r2 # int | ||
119 | lgfr %r3,%r3 # int | ||
120 | jg sys_kill # branch to system call | ||
121 | |||
122 | ENTRY(sys32_rename_wrapper) | ||
123 | llgtr %r2,%r2 # const char * | ||
124 | llgtr %r3,%r3 # const char * | ||
125 | jg sys_rename # branch to system call | ||
126 | |||
127 | ENTRY(sys32_mkdir_wrapper) | ||
128 | llgtr %r2,%r2 # const char * | ||
129 | lgfr %r3,%r3 # int | ||
130 | jg sys_mkdir # branch to system call | ||
131 | |||
132 | ENTRY(sys32_rmdir_wrapper) | ||
133 | llgtr %r2,%r2 # const char * | ||
134 | jg sys_rmdir # branch to system call | ||
135 | |||
136 | ENTRY(sys32_dup_wrapper) | ||
137 | llgfr %r2,%r2 # unsigned int | ||
138 | jg sys_dup # branch to system call | ||
139 | |||
140 | ENTRY(sys32_pipe_wrapper) | ||
141 | llgtr %r2,%r2 # u32 * | ||
142 | jg sys_pipe # branch to system call | ||
143 | |||
144 | ENTRY(compat_sys_times_wrapper) | ||
145 | llgtr %r2,%r2 # struct compat_tms * | ||
146 | jg compat_sys_times # branch to system call | ||
147 | |||
148 | ENTRY(sys32_brk_wrapper) | ||
149 | llgtr %r2,%r2 # unsigned long | ||
150 | jg sys_brk # branch to system call | ||
151 | |||
152 | ENTRY(sys32_setgid16_wrapper) | ||
153 | llgfr %r2,%r2 # __kernel_old_gid_emu31_t | ||
154 | jg sys32_setgid16 # branch to system call | ||
155 | |||
156 | #sys32_getgid16_wrapper # void | ||
157 | |||
158 | ENTRY(sys32_signal_wrapper) | ||
159 | lgfr %r2,%r2 # int | ||
160 | llgtr %r3,%r3 # __sighandler_t | ||
161 | jg sys_signal | ||
162 | |||
163 | #sys32_geteuid16_wrapper # void | ||
164 | |||
165 | #sys32_getegid16_wrapper # void | ||
166 | |||
167 | ENTRY(sys32_acct_wrapper) | ||
168 | llgtr %r2,%r2 # char * | ||
169 | jg sys_acct # branch to system call | ||
170 | |||
171 | ENTRY(sys32_umount_wrapper) | ||
172 | llgtr %r2,%r2 # char * | ||
173 | lgfr %r3,%r3 # int | ||
174 | jg sys_umount # branch to system call | ||
175 | |||
176 | ENTRY(compat_sys_ioctl_wrapper) | ||
177 | llgfr %r2,%r2 # unsigned int | ||
178 | llgfr %r3,%r3 # unsigned int | ||
179 | llgfr %r4,%r4 # unsigned int | ||
180 | jg compat_sys_ioctl # branch to system call | ||
181 | |||
182 | ENTRY(compat_sys_fcntl_wrapper) | ||
183 | llgfr %r2,%r2 # unsigned int | ||
184 | llgfr %r3,%r3 # unsigned int | ||
185 | llgfr %r4,%r4 # unsigned long | ||
186 | jg compat_sys_fcntl # branch to system call | ||
187 | |||
188 | ENTRY(sys32_setpgid_wrapper) | ||
189 | lgfr %r2,%r2 # pid_t | ||
190 | lgfr %r3,%r3 # pid_t | ||
191 | jg sys_setpgid # branch to system call | ||
192 | |||
193 | ENTRY(sys32_umask_wrapper) | ||
194 | lgfr %r2,%r2 # int | ||
195 | jg sys_umask # branch to system call | ||
196 | |||
197 | ENTRY(sys32_chroot_wrapper) | ||
198 | llgtr %r2,%r2 # char * | ||
199 | jg sys_chroot # branch to system call | ||
200 | |||
201 | ENTRY(sys32_ustat_wrapper) | ||
202 | llgfr %r2,%r2 # dev_t | ||
203 | llgtr %r3,%r3 # struct ustat * | ||
204 | jg compat_sys_ustat | ||
205 | |||
206 | ENTRY(sys32_dup2_wrapper) | ||
207 | llgfr %r2,%r2 # unsigned int | ||
208 | llgfr %r3,%r3 # unsigned int | ||
209 | jg sys_dup2 # branch to system call | ||
210 | |||
211 | #sys32_getppid_wrapper # void | ||
212 | |||
213 | #sys32_getpgrp_wrapper # void | ||
214 | |||
215 | #sys32_setsid_wrapper # void | ||
216 | |||
217 | ENTRY(sys32_setreuid16_wrapper) | ||
218 | llgfr %r2,%r2 # __kernel_old_uid_emu31_t | ||
219 | llgfr %r3,%r3 # __kernel_old_uid_emu31_t | ||
220 | jg sys32_setreuid16 # branch to system call | ||
221 | |||
222 | ENTRY(sys32_setregid16_wrapper) | ||
223 | llgfr %r2,%r2 # __kernel_old_gid_emu31_t | ||
224 | llgfr %r3,%r3 # __kernel_old_gid_emu31_t | ||
225 | jg sys32_setregid16 # branch to system call | ||
226 | |||
227 | ENTRY(sys_sigsuspend_wrapper) | ||
228 | lgfr %r2,%r2 # int | ||
229 | lgfr %r3,%r3 # int | ||
230 | llgfr %r4,%r4 # old_sigset_t | ||
231 | jg sys_sigsuspend | ||
232 | |||
233 | ENTRY(compat_sys_sigpending_wrapper) | ||
234 | llgtr %r2,%r2 # compat_old_sigset_t * | ||
235 | jg compat_sys_sigpending # branch to system call | ||
236 | |||
237 | ENTRY(sys32_sethostname_wrapper) | ||
238 | llgtr %r2,%r2 # char * | ||
239 | lgfr %r3,%r3 # int | ||
240 | jg sys_sethostname # branch to system call | ||
241 | |||
242 | ENTRY(compat_sys_setrlimit_wrapper) | ||
243 | llgfr %r2,%r2 # unsigned int | ||
244 | llgtr %r3,%r3 # struct rlimit_emu31 * | ||
245 | jg compat_sys_setrlimit # branch to system call | ||
246 | |||
247 | ENTRY(compat_sys_old_getrlimit_wrapper) | ||
248 | llgfr %r2,%r2 # unsigned int | ||
249 | llgtr %r3,%r3 # struct rlimit_emu31 * | ||
250 | jg compat_sys_old_getrlimit # branch to system call | ||
251 | |||
252 | ENTRY(compat_sys_getrlimit_wrapper) | ||
253 | llgfr %r2,%r2 # unsigned int | ||
254 | llgtr %r3,%r3 # struct rlimit_emu31 * | ||
255 | jg compat_sys_getrlimit # branch to system call | ||
256 | |||
257 | ENTRY(sys32_mmap2_wrapper) | ||
258 | llgtr %r2,%r2 # struct mmap_arg_struct_emu31 * | ||
259 | jg sys32_mmap2 # branch to system call | ||
260 | |||
261 | ENTRY(compat_sys_gettimeofday_wrapper) | ||
262 | llgtr %r2,%r2 # struct timeval_emu31 * | ||
263 | llgtr %r3,%r3 # struct timezone * | ||
264 | jg compat_sys_gettimeofday # branch to system call | ||
265 | |||
266 | ENTRY(compat_sys_settimeofday_wrapper) | ||
267 | llgtr %r2,%r2 # struct timeval_emu31 * | ||
268 | llgtr %r3,%r3 # struct timezone * | ||
269 | jg compat_sys_settimeofday # branch to system call | ||
270 | |||
271 | ENTRY(sys32_getgroups16_wrapper) | ||
272 | lgfr %r2,%r2 # int | ||
273 | llgtr %r3,%r3 # __kernel_old_gid_emu31_t * | ||
274 | jg sys32_getgroups16 # branch to system call | ||
275 | |||
276 | ENTRY(sys32_setgroups16_wrapper) | ||
277 | lgfr %r2,%r2 # int | ||
278 | llgtr %r3,%r3 # __kernel_old_gid_emu31_t * | ||
279 | jg sys32_setgroups16 # branch to system call | ||
280 | |||
281 | ENTRY(sys32_symlink_wrapper) | ||
282 | llgtr %r2,%r2 # const char * | ||
283 | llgtr %r3,%r3 # const char * | ||
284 | jg sys_symlink # branch to system call | ||
285 | |||
286 | ENTRY(sys32_readlink_wrapper) | ||
287 | llgtr %r2,%r2 # const char * | ||
288 | llgtr %r3,%r3 # char * | ||
289 | lgfr %r4,%r4 # int | ||
290 | jg sys_readlink # branch to system call | ||
291 | |||
292 | ENTRY(sys32_uselib_wrapper) | ||
293 | llgtr %r2,%r2 # const char * | ||
294 | jg sys_uselib # branch to system call | ||
295 | |||
296 | ENTRY(sys32_swapon_wrapper) | ||
297 | llgtr %r2,%r2 # const char * | ||
298 | lgfr %r3,%r3 # int | ||
299 | jg sys_swapon # branch to system call | ||
300 | |||
301 | ENTRY(sys32_reboot_wrapper) | ||
302 | lgfr %r2,%r2 # int | ||
303 | lgfr %r3,%r3 # int | ||
304 | llgfr %r4,%r4 # unsigned int | ||
305 | llgtr %r5,%r5 # void * | ||
306 | jg sys_reboot # branch to system call | ||
307 | |||
308 | ENTRY(old32_readdir_wrapper) | ||
309 | llgfr %r2,%r2 # unsigned int | ||
310 | llgtr %r3,%r3 # void * | ||
311 | llgfr %r4,%r4 # unsigned int | ||
312 | jg compat_sys_old_readdir # branch to system call | ||
313 | |||
314 | ENTRY(old32_mmap_wrapper) | ||
315 | llgtr %r2,%r2 # struct mmap_arg_struct_emu31 * | ||
316 | jg old32_mmap # branch to system call | ||
317 | |||
318 | ENTRY(sys32_munmap_wrapper) | ||
319 | llgfr %r2,%r2 # unsigned long | ||
320 | llgfr %r3,%r3 # size_t | ||
321 | jg sys_munmap # branch to system call | ||
322 | |||
323 | ENTRY(sys32_fchmod_wrapper) | ||
324 | llgfr %r2,%r2 # unsigned int | ||
325 | llgfr %r3,%r3 # mode_t | ||
326 | jg sys_fchmod # branch to system call | ||
327 | |||
328 | ENTRY(sys32_fchown16_wrapper) | ||
329 | llgfr %r2,%r2 # unsigned int | ||
330 | llgfr %r3,%r3 # compat_uid_t | ||
331 | llgfr %r4,%r4 # compat_uid_t | ||
332 | jg sys32_fchown16 # branch to system call | ||
333 | |||
334 | ENTRY(sys32_getpriority_wrapper) | ||
335 | lgfr %r2,%r2 # int | ||
336 | lgfr %r3,%r3 # int | ||
337 | jg sys_getpriority # branch to system call | ||
338 | |||
339 | ENTRY(sys32_setpriority_wrapper) | ||
340 | lgfr %r2,%r2 # int | ||
341 | lgfr %r3,%r3 # int | ||
342 | lgfr %r4,%r4 # int | ||
343 | jg sys_setpriority # branch to system call | ||
344 | |||
345 | ENTRY(compat_sys_statfs_wrapper) | ||
346 | llgtr %r2,%r2 # char * | ||
347 | llgtr %r3,%r3 # struct compat_statfs * | ||
348 | jg compat_sys_statfs # branch to system call | ||
349 | |||
350 | ENTRY(compat_sys_fstatfs_wrapper) | ||
351 | llgfr %r2,%r2 # unsigned int | ||
352 | llgtr %r3,%r3 # struct compat_statfs * | ||
353 | jg compat_sys_fstatfs # branch to system call | ||
354 | |||
355 | ENTRY(compat_sys_socketcall_wrapper) | ||
356 | lgfr %r2,%r2 # int | ||
357 | llgtr %r3,%r3 # u32 * | ||
358 | jg compat_sys_socketcall # branch to system call | ||
359 | |||
360 | ENTRY(sys32_syslog_wrapper) | ||
361 | lgfr %r2,%r2 # int | ||
362 | llgtr %r3,%r3 # char * | ||
363 | lgfr %r4,%r4 # int | ||
364 | jg sys_syslog # branch to system call | ||
365 | |||
366 | ENTRY(compat_sys_newstat_wrapper) | ||
367 | llgtr %r2,%r2 # char * | ||
368 | llgtr %r3,%r3 # struct stat_emu31 * | ||
369 | jg compat_sys_newstat # branch to system call | ||
370 | |||
371 | ENTRY(compat_sys_newlstat_wrapper) | ||
372 | llgtr %r2,%r2 # char * | ||
373 | llgtr %r3,%r3 # struct stat_emu31 * | ||
374 | jg compat_sys_newlstat # branch to system call | ||
375 | |||
376 | ENTRY(compat_sys_newfstat_wrapper) | ||
377 | llgfr %r2,%r2 # unsigned int | ||
378 | llgtr %r3,%r3 # struct stat_emu31 * | ||
379 | jg compat_sys_newfstat # branch to system call | ||
380 | |||
381 | #sys32_vhangup_wrapper # void | ||
382 | |||
383 | ENTRY(sys32_swapoff_wrapper) | ||
384 | llgtr %r2,%r2 # const char * | ||
385 | jg sys_swapoff # branch to system call | ||
386 | |||
387 | ENTRY(compat_sys_sysinfo_wrapper) | ||
388 | llgtr %r2,%r2 # struct sysinfo_emu31 * | ||
389 | jg compat_sys_sysinfo # branch to system call | ||
390 | |||
391 | ENTRY(sys32_fsync_wrapper) | ||
392 | llgfr %r2,%r2 # unsigned int | ||
393 | jg sys_fsync # branch to system call | ||
394 | |||
395 | #sys32_sigreturn_wrapper # done in sigreturn_glue | ||
396 | |||
397 | #sys32_clone_wrapper # done in clone_glue | ||
398 | |||
399 | ENTRY(sys32_setdomainname_wrapper) | ||
400 | llgtr %r2,%r2 # char * | ||
401 | lgfr %r3,%r3 # int | ||
402 | jg sys_setdomainname # branch to system call | ||
403 | |||
404 | ENTRY(sys32_newuname_wrapper) | ||
405 | llgtr %r2,%r2 # struct new_utsname * | ||
406 | jg sys_newuname # branch to system call | ||
407 | |||
408 | ENTRY(compat_sys_adjtimex_wrapper) | ||
409 | llgtr %r2,%r2 # struct compat_timex * | ||
410 | jg compat_sys_adjtimex # branch to system call | ||
411 | |||
412 | ENTRY(sys32_mprotect_wrapper) | ||
413 | llgtr %r2,%r2 # unsigned long (actually pointer | ||
414 | llgfr %r3,%r3 # size_t | ||
415 | llgfr %r4,%r4 # unsigned long | ||
416 | jg sys_mprotect # branch to system call | ||
417 | |||
418 | ENTRY(sys_init_module_wrapper) | ||
419 | llgtr %r2,%r2 # void * | ||
420 | llgfr %r3,%r3 # unsigned long | ||
421 | llgtr %r4,%r4 # char * | ||
422 | jg sys_init_module # branch to system call | ||
423 | |||
424 | ENTRY(sys_delete_module_wrapper) | ||
425 | llgtr %r2,%r2 # const char * | ||
426 | llgfr %r3,%r3 # unsigned int | ||
427 | jg sys_delete_module # branch to system call | ||
428 | |||
429 | ENTRY(sys32_quotactl_wrapper) | ||
430 | llgfr %r2,%r2 # unsigned int | ||
431 | llgtr %r3,%r3 # const char * | ||
432 | llgfr %r4,%r4 # qid_t | ||
433 | llgtr %r5,%r5 # caddr_t | ||
434 | jg sys_quotactl # branch to system call | ||
435 | |||
436 | ENTRY(sys32_getpgid_wrapper) | ||
437 | lgfr %r2,%r2 # pid_t | ||
438 | jg sys_getpgid # branch to system call | ||
439 | |||
440 | ENTRY(sys32_fchdir_wrapper) | ||
441 | llgfr %r2,%r2 # unsigned int | ||
442 | jg sys_fchdir # branch to system call | ||
443 | |||
444 | ENTRY(sys32_bdflush_wrapper) | ||
445 | lgfr %r2,%r2 # int | ||
446 | lgfr %r3,%r3 # long | ||
447 | jg sys_bdflush # branch to system call | ||
448 | |||
449 | ENTRY(sys32_sysfs_wrapper) | ||
450 | lgfr %r2,%r2 # int | ||
451 | llgfr %r3,%r3 # unsigned long | ||
452 | llgfr %r4,%r4 # unsigned long | ||
453 | jg sys_sysfs # branch to system call | ||
454 | |||
455 | ENTRY(sys32_personality_wrapper) | ||
456 | llgfr %r2,%r2 # unsigned int | ||
457 | jg sys_s390_personality # branch to system call | ||
458 | |||
459 | ENTRY(sys32_setfsuid16_wrapper) | ||
460 | llgfr %r2,%r2 # __kernel_old_uid_emu31_t | ||
461 | jg sys32_setfsuid16 # branch to system call | ||
462 | |||
463 | ENTRY(sys32_setfsgid16_wrapper) | ||
464 | llgfr %r2,%r2 # __kernel_old_gid_emu31_t | ||
465 | jg sys32_setfsgid16 # branch to system call | ||
466 | |||
467 | ENTRY(sys32_llseek_wrapper) | ||
468 | llgfr %r2,%r2 # unsigned int | ||
469 | llgfr %r3,%r3 # unsigned long | ||
470 | llgfr %r4,%r4 # unsigned long | ||
471 | llgtr %r5,%r5 # loff_t * | ||
472 | llgfr %r6,%r6 # unsigned int | ||
473 | jg sys_llseek # branch to system call | ||
474 | |||
475 | ENTRY(sys32_getdents_wrapper) | ||
476 | llgfr %r2,%r2 # unsigned int | ||
477 | llgtr %r3,%r3 # void * | ||
478 | llgfr %r4,%r4 # unsigned int | ||
479 | jg compat_sys_getdents # branch to system call | ||
480 | |||
481 | ENTRY(compat_sys_select_wrapper) | ||
482 | lgfr %r2,%r2 # int | ||
483 | llgtr %r3,%r3 # compat_fd_set * | ||
484 | llgtr %r4,%r4 # compat_fd_set * | ||
485 | llgtr %r5,%r5 # compat_fd_set * | ||
486 | llgtr %r6,%r6 # struct compat_timeval * | ||
487 | jg compat_sys_select # branch to system call | ||
488 | |||
489 | ENTRY(sys32_flock_wrapper) | ||
490 | llgfr %r2,%r2 # unsigned int | ||
491 | llgfr %r3,%r3 # unsigned int | ||
492 | jg sys_flock # branch to system call | ||
493 | |||
494 | ENTRY(sys32_msync_wrapper) | ||
495 | llgfr %r2,%r2 # unsigned long | ||
496 | llgfr %r3,%r3 # size_t | ||
497 | lgfr %r4,%r4 # int | ||
498 | jg sys_msync # branch to system call | ||
499 | |||
500 | ENTRY(compat_sys_readv_wrapper) | ||
501 | lgfr %r2,%r2 # int | ||
502 | llgtr %r3,%r3 # const struct compat_iovec * | ||
503 | llgfr %r4,%r4 # unsigned long | ||
504 | jg compat_sys_readv # branch to system call | ||
505 | |||
506 | ENTRY(compat_sys_writev_wrapper) | ||
507 | lgfr %r2,%r2 # int | ||
508 | llgtr %r3,%r3 # const struct compat_iovec * | ||
509 | llgfr %r4,%r4 # unsigned long | ||
510 | jg compat_sys_writev # branch to system call | ||
511 | |||
512 | ENTRY(sys32_getsid_wrapper) | ||
513 | lgfr %r2,%r2 # pid_t | ||
514 | jg sys_getsid # branch to system call | ||
515 | |||
516 | ENTRY(sys32_fdatasync_wrapper) | ||
517 | llgfr %r2,%r2 # unsigned int | ||
518 | jg sys_fdatasync # branch to system call | ||
519 | |||
520 | ENTRY(sys32_mlock_wrapper) | ||
521 | llgfr %r2,%r2 # unsigned long | ||
522 | llgfr %r3,%r3 # size_t | ||
523 | jg sys_mlock # branch to system call | ||
524 | |||
525 | ENTRY(sys32_munlock_wrapper) | ||
526 | llgfr %r2,%r2 # unsigned long | ||
527 | llgfr %r3,%r3 # size_t | ||
528 | jg sys_munlock # branch to system call | ||
529 | |||
530 | ENTRY(sys32_mlockall_wrapper) | ||
531 | lgfr %r2,%r2 # int | ||
532 | jg sys_mlockall # branch to system call | ||
533 | |||
534 | #sys32_munlockall_wrapper # void | ||
535 | |||
536 | ENTRY(sys32_sched_setparam_wrapper) | ||
537 | lgfr %r2,%r2 # pid_t | ||
538 | llgtr %r3,%r3 # struct sched_param * | ||
539 | jg sys_sched_setparam # branch to system call | ||
540 | |||
541 | ENTRY(sys32_sched_getparam_wrapper) | ||
542 | lgfr %r2,%r2 # pid_t | ||
543 | llgtr %r3,%r3 # struct sched_param * | ||
544 | jg sys_sched_getparam # branch to system call | ||
545 | |||
546 | ENTRY(sys32_sched_setscheduler_wrapper) | ||
547 | lgfr %r2,%r2 # pid_t | ||
548 | lgfr %r3,%r3 # int | ||
549 | llgtr %r4,%r4 # struct sched_param * | ||
550 | jg sys_sched_setscheduler # branch to system call | ||
551 | |||
552 | ENTRY(sys32_sched_getscheduler_wrapper) | ||
553 | lgfr %r2,%r2 # pid_t | ||
554 | jg sys_sched_getscheduler # branch to system call | ||
555 | |||
556 | #sys32_sched_yield_wrapper # void | ||
557 | |||
558 | ENTRY(sys32_sched_get_priority_max_wrapper) | ||
559 | lgfr %r2,%r2 # int | ||
560 | jg sys_sched_get_priority_max # branch to system call | ||
561 | |||
562 | ENTRY(sys32_sched_get_priority_min_wrapper) | ||
563 | lgfr %r2,%r2 # int | ||
564 | jg sys_sched_get_priority_min # branch to system call | ||
565 | |||
566 | ENTRY(compat_sys_nanosleep_wrapper) | ||
567 | llgtr %r2,%r2 # struct compat_timespec * | ||
568 | llgtr %r3,%r3 # struct compat_timespec * | ||
569 | jg compat_sys_nanosleep # branch to system call | ||
570 | |||
571 | ENTRY(sys32_mremap_wrapper) | ||
572 | llgfr %r2,%r2 # unsigned long | ||
573 | llgfr %r3,%r3 # unsigned long | ||
574 | llgfr %r4,%r4 # unsigned long | ||
575 | llgfr %r5,%r5 # unsigned long | ||
576 | llgfr %r6,%r6 # unsigned long | ||
577 | jg sys_mremap # branch to system call | ||
578 | |||
579 | ENTRY(sys32_setresuid16_wrapper) | ||
580 | llgfr %r2,%r2 # __kernel_old_uid_emu31_t | ||
581 | llgfr %r3,%r3 # __kernel_old_uid_emu31_t | ||
582 | llgfr %r4,%r4 # __kernel_old_uid_emu31_t | ||
583 | jg sys32_setresuid16 # branch to system call | ||
584 | |||
585 | ENTRY(sys32_getresuid16_wrapper) | ||
586 | llgtr %r2,%r2 # __kernel_old_uid_emu31_t * | ||
587 | llgtr %r3,%r3 # __kernel_old_uid_emu31_t * | ||
588 | llgtr %r4,%r4 # __kernel_old_uid_emu31_t * | ||
589 | jg sys32_getresuid16 # branch to system call | ||
590 | |||
591 | ENTRY(sys32_poll_wrapper) | ||
592 | llgtr %r2,%r2 # struct pollfd * | ||
593 | llgfr %r3,%r3 # unsigned int | ||
594 | lgfr %r4,%r4 # int | ||
595 | jg sys_poll # branch to system call | ||
596 | |||
597 | ENTRY(sys32_setresgid16_wrapper) | ||
598 | llgfr %r2,%r2 # __kernel_old_gid_emu31_t | ||
599 | llgfr %r3,%r3 # __kernel_old_gid_emu31_t | ||
600 | llgfr %r4,%r4 # __kernel_old_gid_emu31_t | ||
601 | jg sys32_setresgid16 # branch to system call | ||
602 | |||
603 | ENTRY(sys32_getresgid16_wrapper) | ||
604 | llgtr %r2,%r2 # __kernel_old_gid_emu31_t * | ||
605 | llgtr %r3,%r3 # __kernel_old_gid_emu31_t * | ||
606 | llgtr %r4,%r4 # __kernel_old_gid_emu31_t * | ||
607 | jg sys32_getresgid16 # branch to system call | ||
608 | |||
609 | ENTRY(sys32_prctl_wrapper) | ||
610 | lgfr %r2,%r2 # int | ||
611 | llgfr %r3,%r3 # unsigned long | ||
612 | llgfr %r4,%r4 # unsigned long | ||
613 | llgfr %r5,%r5 # unsigned long | ||
614 | llgfr %r6,%r6 # unsigned long | ||
615 | jg sys_prctl # branch to system call | ||
616 | |||
617 | #sys32_rt_sigreturn_wrapper # done in rt_sigreturn_glue | ||
618 | |||
619 | ENTRY(sys32_pread64_wrapper) | ||
620 | llgfr %r2,%r2 # unsigned int | ||
621 | llgtr %r3,%r3 # char * | ||
622 | llgfr %r4,%r4 # size_t | ||
623 | llgfr %r5,%r5 # u32 | ||
624 | llgfr %r6,%r6 # u32 | ||
625 | jg sys32_pread64 # branch to system call | ||
626 | |||
627 | ENTRY(sys32_pwrite64_wrapper) | ||
628 | llgfr %r2,%r2 # unsigned int | ||
629 | llgtr %r3,%r3 # const char * | ||
630 | llgfr %r4,%r4 # size_t | ||
631 | llgfr %r5,%r5 # u32 | ||
632 | llgfr %r6,%r6 # u32 | ||
633 | jg sys32_pwrite64 # branch to system call | ||
634 | |||
635 | ENTRY(sys32_chown16_wrapper) | ||
636 | llgtr %r2,%r2 # const char * | ||
637 | llgfr %r3,%r3 # __kernel_old_uid_emu31_t | ||
638 | llgfr %r4,%r4 # __kernel_old_gid_emu31_t | ||
639 | jg sys32_chown16 # branch to system call | ||
640 | |||
641 | ENTRY(sys32_getcwd_wrapper) | ||
642 | llgtr %r2,%r2 # char * | ||
643 | llgfr %r3,%r3 # unsigned long | ||
644 | jg sys_getcwd # branch to system call | ||
645 | |||
646 | ENTRY(sys32_capget_wrapper) | ||
647 | llgtr %r2,%r2 # cap_user_header_t | ||
648 | llgtr %r3,%r3 # cap_user_data_t | ||
649 | jg sys_capget # branch to system call | ||
650 | |||
651 | ENTRY(sys32_capset_wrapper) | ||
652 | llgtr %r2,%r2 # cap_user_header_t | ||
653 | llgtr %r3,%r3 # const cap_user_data_t | ||
654 | jg sys_capset # branch to system call | ||
655 | |||
656 | #sys32_vfork_wrapper # done in vfork_glue | ||
657 | |||
658 | ENTRY(sys32_truncate64_wrapper) | ||
659 | llgtr %r2,%r2 # const char * | ||
660 | llgfr %r3,%r3 # unsigned long | ||
661 | llgfr %r4,%r4 # unsigned long | ||
662 | jg sys32_truncate64 # branch to system call | ||
663 | |||
664 | ENTRY(sys32_ftruncate64_wrapper) | ||
665 | llgfr %r2,%r2 # unsigned int | ||
666 | llgfr %r3,%r3 # unsigned long | ||
667 | llgfr %r4,%r4 # unsigned long | ||
668 | jg sys32_ftruncate64 # branch to system call | ||
669 | |||
670 | ENTRY(sys32_lchown_wrapper) | ||
671 | llgtr %r2,%r2 # const char * | ||
672 | llgfr %r3,%r3 # uid_t | ||
673 | llgfr %r4,%r4 # gid_t | ||
674 | jg sys_lchown # branch to system call | ||
675 | |||
676 | #sys32_getuid_wrapper # void | ||
677 | #sys32_getgid_wrapper # void | ||
678 | #sys32_geteuid_wrapper # void | ||
679 | #sys32_getegid_wrapper # void | ||
680 | |||
681 | ENTRY(sys32_setreuid_wrapper) | ||
682 | llgfr %r2,%r2 # uid_t | ||
683 | llgfr %r3,%r3 # uid_t | ||
684 | jg sys_setreuid # branch to system call | ||
685 | |||
686 | ENTRY(sys32_setregid_wrapper) | ||
687 | llgfr %r2,%r2 # gid_t | ||
688 | llgfr %r3,%r3 # gid_t | ||
689 | jg sys_setregid # branch to system call | ||
690 | |||
691 | ENTRY(sys32_getgroups_wrapper) | ||
692 | lgfr %r2,%r2 # int | ||
693 | llgtr %r3,%r3 # gid_t * | ||
694 | jg sys_getgroups # branch to system call | ||
695 | |||
696 | ENTRY(sys32_setgroups_wrapper) | ||
697 | lgfr %r2,%r2 # int | ||
698 | llgtr %r3,%r3 # gid_t * | ||
699 | jg sys_setgroups # branch to system call | ||
700 | |||
701 | ENTRY(sys32_fchown_wrapper) | ||
702 | llgfr %r2,%r2 # unsigned int | ||
703 | llgfr %r3,%r3 # uid_t | ||
704 | llgfr %r4,%r4 # gid_t | ||
705 | jg sys_fchown # branch to system call | ||
706 | |||
707 | ENTRY(sys32_setresuid_wrapper) | ||
708 | llgfr %r2,%r2 # uid_t | ||
709 | llgfr %r3,%r3 # uid_t | ||
710 | llgfr %r4,%r4 # uid_t | ||
711 | jg sys_setresuid # branch to system call | ||
712 | |||
713 | ENTRY(sys32_getresuid_wrapper) | ||
714 | llgtr %r2,%r2 # uid_t * | ||
715 | llgtr %r3,%r3 # uid_t * | ||
716 | llgtr %r4,%r4 # uid_t * | ||
717 | jg sys_getresuid # branch to system call | ||
718 | |||
719 | ENTRY(sys32_setresgid_wrapper) | ||
720 | llgfr %r2,%r2 # gid_t | ||
721 | llgfr %r3,%r3 # gid_t | ||
722 | llgfr %r4,%r4 # gid_t | ||
723 | jg sys_setresgid # branch to system call | ||
724 | |||
725 | ENTRY(sys32_getresgid_wrapper) | ||
726 | llgtr %r2,%r2 # gid_t * | ||
727 | llgtr %r3,%r3 # gid_t * | ||
728 | llgtr %r4,%r4 # gid_t * | ||
729 | jg sys_getresgid # branch to system call | ||
730 | |||
731 | ENTRY(sys32_chown_wrapper) | ||
732 | llgtr %r2,%r2 # const char * | ||
733 | llgfr %r3,%r3 # uid_t | ||
734 | llgfr %r4,%r4 # gid_t | ||
735 | jg sys_chown # branch to system call | ||
736 | |||
737 | ENTRY(sys32_setuid_wrapper) | ||
738 | llgfr %r2,%r2 # uid_t | ||
739 | jg sys_setuid # branch to system call | ||
740 | |||
741 | ENTRY(sys32_setgid_wrapper) | ||
742 | llgfr %r2,%r2 # gid_t | ||
743 | jg sys_setgid # branch to system call | ||
744 | |||
745 | ENTRY(sys32_setfsuid_wrapper) | ||
746 | llgfr %r2,%r2 # uid_t | ||
747 | jg sys_setfsuid # branch to system call | ||
748 | |||
749 | ENTRY(sys32_setfsgid_wrapper) | ||
750 | llgfr %r2,%r2 # gid_t | ||
751 | jg sys_setfsgid # branch to system call | ||
752 | |||
753 | ENTRY(sys32_pivot_root_wrapper) | ||
754 | llgtr %r2,%r2 # const char * | ||
755 | llgtr %r3,%r3 # const char * | ||
756 | jg sys_pivot_root # branch to system call | ||
757 | |||
758 | ENTRY(sys32_mincore_wrapper) | ||
759 | llgfr %r2,%r2 # unsigned long | ||
760 | llgfr %r3,%r3 # size_t | ||
761 | llgtr %r4,%r4 # unsigned char * | ||
762 | jg sys_mincore # branch to system call | ||
763 | |||
764 | ENTRY(sys32_madvise_wrapper) | ||
765 | llgfr %r2,%r2 # unsigned long | ||
766 | llgfr %r3,%r3 # size_t | ||
767 | lgfr %r4,%r4 # int | ||
768 | jg sys_madvise # branch to system call | ||
769 | |||
770 | ENTRY(sys32_getdents64_wrapper) | ||
771 | llgfr %r2,%r2 # unsigned int | ||
772 | llgtr %r3,%r3 # void * | ||
773 | llgfr %r4,%r4 # unsigned int | ||
774 | jg sys_getdents64 # branch to system call | ||
775 | |||
776 | ENTRY(compat_sys_fcntl64_wrapper) | ||
777 | llgfr %r2,%r2 # unsigned int | ||
778 | llgfr %r3,%r3 # unsigned int | ||
779 | llgfr %r4,%r4 # unsigned long | ||
780 | jg compat_sys_fcntl64 # branch to system call | ||
781 | |||
782 | ENTRY(sys32_stat64_wrapper) | ||
783 | llgtr %r2,%r2 # char * | ||
784 | llgtr %r3,%r3 # struct stat64 * | ||
785 | jg sys32_stat64 # branch to system call | ||
786 | |||
787 | ENTRY(sys32_lstat64_wrapper) | ||
788 | llgtr %r2,%r2 # char * | ||
789 | llgtr %r3,%r3 # struct stat64 * | ||
790 | jg sys32_lstat64 # branch to system call | ||
791 | |||
792 | ENTRY(sys32_stime_wrapper) | ||
793 | llgtr %r2,%r2 # long * | ||
794 | jg compat_sys_stime # branch to system call | ||
795 | |||
796 | ENTRY(sys32_fstat64_wrapper) | ||
797 | llgfr %r2,%r2 # unsigned long | ||
798 | llgtr %r3,%r3 # struct stat64 * | ||
799 | jg sys32_fstat64 # branch to system call | ||
800 | |||
801 | ENTRY(sys32_setxattr_wrapper) | ||
802 | llgtr %r2,%r2 # char * | ||
803 | llgtr %r3,%r3 # char * | ||
804 | llgtr %r4,%r4 # void * | ||
805 | llgfr %r5,%r5 # size_t | ||
806 | lgfr %r6,%r6 # int | ||
807 | jg sys_setxattr | ||
808 | |||
809 | ENTRY(sys32_lsetxattr_wrapper) | ||
810 | llgtr %r2,%r2 # char * | ||
811 | llgtr %r3,%r3 # char * | ||
812 | llgtr %r4,%r4 # void * | ||
813 | llgfr %r5,%r5 # size_t | ||
814 | lgfr %r6,%r6 # int | ||
815 | jg sys_lsetxattr | ||
816 | |||
817 | ENTRY(sys32_fsetxattr_wrapper) | ||
818 | lgfr %r2,%r2 # int | ||
819 | llgtr %r3,%r3 # char * | ||
820 | llgtr %r4,%r4 # void * | ||
821 | llgfr %r5,%r5 # size_t | ||
822 | lgfr %r6,%r6 # int | ||
823 | jg sys_fsetxattr | ||
824 | |||
825 | ENTRY(sys32_getxattr_wrapper) | ||
826 | llgtr %r2,%r2 # char * | ||
827 | llgtr %r3,%r3 # char * | ||
828 | llgtr %r4,%r4 # void * | ||
829 | llgfr %r5,%r5 # size_t | ||
830 | jg sys_getxattr | ||
831 | |||
832 | ENTRY(sys32_lgetxattr_wrapper) | ||
833 | llgtr %r2,%r2 # char * | ||
834 | llgtr %r3,%r3 # char * | ||
835 | llgtr %r4,%r4 # void * | ||
836 | llgfr %r5,%r5 # size_t | ||
837 | jg sys_lgetxattr | ||
838 | |||
839 | ENTRY(sys32_fgetxattr_wrapper) | ||
840 | lgfr %r2,%r2 # int | ||
841 | llgtr %r3,%r3 # char * | ||
842 | llgtr %r4,%r4 # void * | ||
843 | llgfr %r5,%r5 # size_t | ||
844 | jg sys_fgetxattr | ||
845 | |||
846 | ENTRY(sys32_listxattr_wrapper) | ||
847 | llgtr %r2,%r2 # char * | ||
848 | llgtr %r3,%r3 # char * | ||
849 | llgfr %r4,%r4 # size_t | ||
850 | jg sys_listxattr | ||
851 | |||
852 | ENTRY(sys32_llistxattr_wrapper) | ||
853 | llgtr %r2,%r2 # char * | ||
854 | llgtr %r3,%r3 # char * | ||
855 | llgfr %r4,%r4 # size_t | ||
856 | jg sys_llistxattr | ||
857 | |||
858 | ENTRY(sys32_flistxattr_wrapper) | ||
859 | lgfr %r2,%r2 # int | ||
860 | llgtr %r3,%r3 # char * | ||
861 | llgfr %r4,%r4 # size_t | ||
862 | jg sys_flistxattr | ||
863 | |||
864 | ENTRY(sys32_removexattr_wrapper) | ||
865 | llgtr %r2,%r2 # char * | ||
866 | llgtr %r3,%r3 # char * | ||
867 | jg sys_removexattr | ||
868 | |||
869 | ENTRY(sys32_lremovexattr_wrapper) | ||
870 | llgtr %r2,%r2 # char * | ||
871 | llgtr %r3,%r3 # char * | ||
872 | jg sys_lremovexattr | ||
873 | |||
874 | ENTRY(sys32_fremovexattr_wrapper) | ||
875 | lgfr %r2,%r2 # int | ||
876 | llgtr %r3,%r3 # char * | ||
877 | jg sys_fremovexattr | ||
878 | |||
879 | ENTRY(sys32_sched_setaffinity_wrapper) | ||
880 | lgfr %r2,%r2 # int | ||
881 | llgfr %r3,%r3 # unsigned int | ||
882 | llgtr %r4,%r4 # unsigned long * | ||
883 | jg compat_sys_sched_setaffinity | ||
884 | |||
885 | ENTRY(sys32_sched_getaffinity_wrapper) | ||
886 | lgfr %r2,%r2 # int | ||
887 | llgfr %r3,%r3 # unsigned int | ||
888 | llgtr %r4,%r4 # unsigned long * | ||
889 | jg compat_sys_sched_getaffinity | ||
890 | |||
891 | ENTRY(sys32_exit_group_wrapper) | ||
892 | lgfr %r2,%r2 # int | ||
893 | jg sys_exit_group # branch to system call | ||
894 | |||
895 | ENTRY(sys32_set_tid_address_wrapper) | ||
896 | llgtr %r2,%r2 # int * | ||
897 | jg sys_set_tid_address # branch to system call | ||
898 | |||
899 | ENTRY(sys_epoll_create_wrapper) | ||
900 | lgfr %r2,%r2 # int | ||
901 | jg sys_epoll_create # branch to system call | ||
902 | |||
903 | ENTRY(sys_epoll_ctl_wrapper) | ||
904 | lgfr %r2,%r2 # int | ||
905 | lgfr %r3,%r3 # int | ||
906 | lgfr %r4,%r4 # int | ||
907 | llgtr %r5,%r5 # struct epoll_event * | ||
908 | jg sys_epoll_ctl # branch to system call | ||
909 | |||
910 | ENTRY(sys_epoll_wait_wrapper) | ||
911 | lgfr %r2,%r2 # int | ||
912 | llgtr %r3,%r3 # struct epoll_event * | ||
913 | lgfr %r4,%r4 # int | ||
914 | lgfr %r5,%r5 # int | ||
915 | jg sys_epoll_wait # branch to system call | ||
916 | |||
917 | ENTRY(sys32_fadvise64_wrapper) | ||
918 | lgfr %r2,%r2 # int | ||
919 | sllg %r3,%r3,32 # get high word of 64bit loff_t | ||
920 | or %r3,%r4 # get low word of 64bit loff_t | ||
921 | llgfr %r4,%r5 # size_t (unsigned long) | ||
922 | lgfr %r5,%r6 # int | ||
923 | jg sys32_fadvise64 | ||
924 | |||
925 | ENTRY(sys32_fadvise64_64_wrapper) | ||
926 | llgtr %r2,%r2 # struct fadvise64_64_args * | ||
927 | jg sys32_fadvise64_64 | ||
928 | |||
929 | ENTRY(sys32_clock_settime_wrapper) | ||
930 | lgfr %r2,%r2 # clockid_t (int) | ||
931 | llgtr %r3,%r3 # struct compat_timespec * | ||
932 | jg compat_sys_clock_settime | ||
933 | |||
934 | ENTRY(sys32_clock_gettime_wrapper) | ||
935 | lgfr %r2,%r2 # clockid_t (int) | ||
936 | llgtr %r3,%r3 # struct compat_timespec * | ||
937 | jg compat_sys_clock_gettime | ||
938 | |||
939 | ENTRY(sys32_clock_getres_wrapper) | ||
940 | lgfr %r2,%r2 # clockid_t (int) | ||
941 | llgtr %r3,%r3 # struct compat_timespec * | ||
942 | jg compat_sys_clock_getres | ||
943 | |||
944 | ENTRY(sys32_clock_nanosleep_wrapper) | ||
945 | lgfr %r2,%r2 # clockid_t (int) | ||
946 | lgfr %r3,%r3 # int | ||
947 | llgtr %r4,%r4 # struct compat_timespec * | ||
948 | llgtr %r5,%r5 # struct compat_timespec * | ||
949 | jg compat_sys_clock_nanosleep | ||
950 | |||
951 | ENTRY(sys32_timer_create_wrapper) | ||
952 | lgfr %r2,%r2 # timer_t (int) | ||
953 | llgtr %r3,%r3 # struct compat_sigevent * | ||
954 | llgtr %r4,%r4 # timer_t * | ||
955 | jg compat_sys_timer_create | ||
956 | |||
957 | ENTRY(sys32_timer_settime_wrapper) | ||
958 | lgfr %r2,%r2 # timer_t (int) | ||
959 | lgfr %r3,%r3 # int | ||
960 | llgtr %r4,%r4 # struct compat_itimerspec * | ||
961 | llgtr %r5,%r5 # struct compat_itimerspec * | ||
962 | jg compat_sys_timer_settime | ||
963 | |||
964 | ENTRY(sys32_timer_gettime_wrapper) | ||
965 | lgfr %r2,%r2 # timer_t (int) | ||
966 | llgtr %r3,%r3 # struct compat_itimerspec * | ||
967 | jg compat_sys_timer_gettime | ||
968 | |||
969 | ENTRY(sys32_timer_getoverrun_wrapper) | ||
970 | lgfr %r2,%r2 # timer_t (int) | ||
971 | jg sys_timer_getoverrun | ||
972 | |||
973 | ENTRY(sys32_timer_delete_wrapper) | ||
974 | lgfr %r2,%r2 # timer_t (int) | ||
975 | jg sys_timer_delete | ||
976 | |||
977 | ENTRY(sys32_io_setup_wrapper) | ||
978 | llgfr %r2,%r2 # unsigned int | ||
979 | llgtr %r3,%r3 # u32 * | ||
980 | jg compat_sys_io_setup | ||
981 | |||
982 | ENTRY(sys32_io_destroy_wrapper) | ||
983 | llgfr %r2,%r2 # (aio_context_t) u32 | ||
984 | jg sys_io_destroy | ||
985 | |||
986 | ENTRY(sys32_io_getevents_wrapper) | ||
987 | llgfr %r2,%r2 # (aio_context_t) u32 | ||
988 | lgfr %r3,%r3 # long | ||
989 | lgfr %r4,%r4 # long | ||
990 | llgtr %r5,%r5 # struct io_event * | ||
991 | llgtr %r6,%r6 # struct compat_timespec * | ||
992 | jg compat_sys_io_getevents | ||
993 | |||
994 | ENTRY(sys32_io_submit_wrapper) | ||
995 | llgfr %r2,%r2 # (aio_context_t) u32 | ||
996 | lgfr %r3,%r3 # long | ||
997 | llgtr %r4,%r4 # struct iocb ** | ||
998 | jg compat_sys_io_submit | ||
999 | |||
1000 | ENTRY(sys32_io_cancel_wrapper) | ||
1001 | llgfr %r2,%r2 # (aio_context_t) u32 | ||
1002 | llgtr %r3,%r3 # struct iocb * | ||
1003 | llgtr %r4,%r4 # struct io_event * | ||
1004 | jg sys_io_cancel | ||
1005 | |||
1006 | ENTRY(compat_sys_statfs64_wrapper) | ||
1007 | llgtr %r2,%r2 # const char * | ||
1008 | llgfr %r3,%r3 # compat_size_t | ||
1009 | llgtr %r4,%r4 # struct compat_statfs64 * | ||
1010 | jg compat_sys_statfs64 | ||
1011 | |||
1012 | ENTRY(compat_sys_fstatfs64_wrapper) | ||
1013 | llgfr %r2,%r2 # unsigned int fd | ||
1014 | llgfr %r3,%r3 # compat_size_t | ||
1015 | llgtr %r4,%r4 # struct compat_statfs64 * | ||
1016 | jg compat_sys_fstatfs64 | ||
1017 | |||
1018 | ENTRY(compat_sys_mq_open_wrapper) | ||
1019 | llgtr %r2,%r2 # const char * | ||
1020 | lgfr %r3,%r3 # int | ||
1021 | llgfr %r4,%r4 # mode_t | ||
1022 | llgtr %r5,%r5 # struct compat_mq_attr * | ||
1023 | jg compat_sys_mq_open | ||
1024 | |||
1025 | ENTRY(sys32_mq_unlink_wrapper) | ||
1026 | llgtr %r2,%r2 # const char * | ||
1027 | jg sys_mq_unlink | ||
1028 | |||
1029 | ENTRY(compat_sys_mq_timedsend_wrapper) | ||
1030 | lgfr %r2,%r2 # mqd_t | ||
1031 | llgtr %r3,%r3 # const char * | ||
1032 | llgfr %r4,%r4 # size_t | ||
1033 | llgfr %r5,%r5 # unsigned int | ||
1034 | llgtr %r6,%r6 # const struct compat_timespec * | ||
1035 | jg compat_sys_mq_timedsend | ||
1036 | |||
1037 | ENTRY(compat_sys_mq_timedreceive_wrapper) | ||
1038 | lgfr %r2,%r2 # mqd_t | ||
1039 | llgtr %r3,%r3 # char * | ||
1040 | llgfr %r4,%r4 # size_t | ||
1041 | llgtr %r5,%r5 # unsigned int * | ||
1042 | llgtr %r6,%r6 # const struct compat_timespec * | ||
1043 | jg compat_sys_mq_timedreceive | ||
1044 | |||
1045 | ENTRY(compat_sys_mq_notify_wrapper) | ||
1046 | lgfr %r2,%r2 # mqd_t | ||
1047 | llgtr %r3,%r3 # struct compat_sigevent * | ||
1048 | jg compat_sys_mq_notify | ||
1049 | |||
1050 | ENTRY(compat_sys_mq_getsetattr_wrapper) | ||
1051 | lgfr %r2,%r2 # mqd_t | ||
1052 | llgtr %r3,%r3 # struct compat_mq_attr * | ||
1053 | llgtr %r4,%r4 # struct compat_mq_attr * | ||
1054 | jg compat_sys_mq_getsetattr | ||
1055 | |||
1056 | ENTRY(compat_sys_add_key_wrapper) | ||
1057 | llgtr %r2,%r2 # const char * | ||
1058 | llgtr %r3,%r3 # const char * | ||
1059 | llgtr %r4,%r4 # const void * | ||
1060 | llgfr %r5,%r5 # size_t | ||
1061 | llgfr %r6,%r6 # (key_serial_t) u32 | ||
1062 | jg sys_add_key | ||
1063 | |||
1064 | ENTRY(compat_sys_request_key_wrapper) | ||
1065 | llgtr %r2,%r2 # const char * | ||
1066 | llgtr %r3,%r3 # const char * | ||
1067 | llgtr %r4,%r4 # const void * | ||
1068 | llgfr %r5,%r5 # (key_serial_t) u32 | ||
1069 | jg sys_request_key | ||
1070 | |||
1071 | ENTRY(sys32_remap_file_pages_wrapper) | ||
1072 | llgfr %r2,%r2 # unsigned long | ||
1073 | llgfr %r3,%r3 # unsigned long | ||
1074 | llgfr %r4,%r4 # unsigned long | ||
1075 | llgfr %r5,%r5 # unsigned long | ||
1076 | llgfr %r6,%r6 # unsigned long | ||
1077 | jg sys_remap_file_pages | ||
1078 | |||
1079 | ENTRY(compat_sys_kexec_load_wrapper) | ||
1080 | llgfr %r2,%r2 # unsigned long | ||
1081 | llgfr %r3,%r3 # unsigned long | ||
1082 | llgtr %r4,%r4 # struct kexec_segment * | ||
1083 | llgfr %r5,%r5 # unsigned long | ||
1084 | jg compat_sys_kexec_load | ||
1085 | |||
1086 | ENTRY(sys_ioprio_set_wrapper) | ||
1087 | lgfr %r2,%r2 # int | ||
1088 | lgfr %r3,%r3 # int | ||
1089 | lgfr %r4,%r4 # int | ||
1090 | jg sys_ioprio_set | ||
1091 | |||
1092 | ENTRY(sys_ioprio_get_wrapper) | ||
1093 | lgfr %r2,%r2 # int | ||
1094 | lgfr %r3,%r3 # int | ||
1095 | jg sys_ioprio_get | ||
1096 | |||
1097 | ENTRY(sys_inotify_add_watch_wrapper) | ||
1098 | lgfr %r2,%r2 # int | ||
1099 | llgtr %r3,%r3 # const char * | ||
1100 | llgfr %r4,%r4 # u32 | ||
1101 | jg sys_inotify_add_watch | ||
1102 | |||
1103 | ENTRY(sys_inotify_rm_watch_wrapper) | ||
1104 | lgfr %r2,%r2 # int | ||
1105 | llgfr %r3,%r3 # u32 | ||
1106 | jg sys_inotify_rm_watch | ||
1107 | |||
1108 | ENTRY(sys_mkdirat_wrapper) | ||
1109 | lgfr %r2,%r2 # int | ||
1110 | llgtr %r3,%r3 # const char * | ||
1111 | lgfr %r4,%r4 # int | ||
1112 | jg sys_mkdirat | ||
1113 | |||
1114 | ENTRY(sys_mknodat_wrapper) | ||
1115 | lgfr %r2,%r2 # int | ||
1116 | llgtr %r3,%r3 # const char * | ||
1117 | lgfr %r4,%r4 # int | ||
1118 | llgfr %r5,%r5 # unsigned int | ||
1119 | jg sys_mknodat | ||
1120 | |||
1121 | ENTRY(sys_fchownat_wrapper) | ||
1122 | lgfr %r2,%r2 # int | ||
1123 | llgtr %r3,%r3 # const char * | ||
1124 | llgfr %r4,%r4 # uid_t | ||
1125 | llgfr %r5,%r5 # gid_t | ||
1126 | lgfr %r6,%r6 # int | ||
1127 | jg sys_fchownat | ||
1128 | |||
1129 | ENTRY(compat_sys_futimesat_wrapper) | ||
1130 | llgfr %r2,%r2 # unsigned int | ||
1131 | llgtr %r3,%r3 # char * | ||
1132 | llgtr %r4,%r4 # struct timeval * | ||
1133 | jg compat_sys_futimesat | ||
1134 | |||
1135 | ENTRY(sys32_fstatat64_wrapper) | ||
1136 | llgfr %r2,%r2 # unsigned int | ||
1137 | llgtr %r3,%r3 # char * | ||
1138 | llgtr %r4,%r4 # struct stat64 * | ||
1139 | lgfr %r5,%r5 # int | ||
1140 | jg sys32_fstatat64 | ||
1141 | |||
1142 | ENTRY(sys_unlinkat_wrapper) | ||
1143 | lgfr %r2,%r2 # int | ||
1144 | llgtr %r3,%r3 # const char * | ||
1145 | lgfr %r4,%r4 # int | ||
1146 | jg sys_unlinkat | ||
1147 | |||
1148 | ENTRY(sys_renameat_wrapper) | ||
1149 | lgfr %r2,%r2 # int | ||
1150 | llgtr %r3,%r3 # const char * | ||
1151 | lgfr %r4,%r4 # int | ||
1152 | llgtr %r5,%r5 # const char * | ||
1153 | jg sys_renameat | ||
1154 | |||
1155 | ENTRY(sys_linkat_wrapper) | ||
1156 | lgfr %r2,%r2 # int | ||
1157 | llgtr %r3,%r3 # const char * | ||
1158 | lgfr %r4,%r4 # int | ||
1159 | llgtr %r5,%r5 # const char * | ||
1160 | lgfr %r6,%r6 # int | ||
1161 | jg sys_linkat | ||
1162 | |||
1163 | ENTRY(sys_symlinkat_wrapper) | ||
1164 | llgtr %r2,%r2 # const char * | ||
1165 | lgfr %r3,%r3 # int | ||
1166 | llgtr %r4,%r4 # const char * | ||
1167 | jg sys_symlinkat | ||
1168 | |||
1169 | ENTRY(sys_readlinkat_wrapper) | ||
1170 | lgfr %r2,%r2 # int | ||
1171 | llgtr %r3,%r3 # const char * | ||
1172 | llgtr %r4,%r4 # char * | ||
1173 | lgfr %r5,%r5 # int | ||
1174 | jg sys_readlinkat | ||
1175 | |||
1176 | ENTRY(sys_fchmodat_wrapper) | ||
1177 | lgfr %r2,%r2 # int | ||
1178 | llgtr %r3,%r3 # const char * | ||
1179 | llgfr %r4,%r4 # mode_t | ||
1180 | jg sys_fchmodat | ||
1181 | |||
1182 | ENTRY(sys_faccessat_wrapper) | ||
1183 | lgfr %r2,%r2 # int | ||
1184 | llgtr %r3,%r3 # const char * | ||
1185 | lgfr %r4,%r4 # int | ||
1186 | jg sys_faccessat | ||
1187 | |||
1188 | ENTRY(compat_sys_pselect6_wrapper) | ||
1189 | lgfr %r2,%r2 # int | ||
1190 | llgtr %r3,%r3 # fd_set * | ||
1191 | llgtr %r4,%r4 # fd_set * | ||
1192 | llgtr %r5,%r5 # fd_set * | ||
1193 | llgtr %r6,%r6 # struct timespec * | ||
1194 | llgt %r0,164(%r15) # void * | ||
1195 | stg %r0,160(%r15) | ||
1196 | jg compat_sys_pselect6 | ||
1197 | |||
1198 | ENTRY(compat_sys_ppoll_wrapper) | ||
1199 | llgtr %r2,%r2 # struct pollfd * | ||
1200 | llgfr %r3,%r3 # unsigned int | ||
1201 | llgtr %r4,%r4 # struct timespec * | ||
1202 | llgtr %r5,%r5 # const sigset_t * | ||
1203 | llgfr %r6,%r6 # size_t | ||
1204 | jg compat_sys_ppoll | ||
1205 | |||
1206 | ENTRY(sys_unshare_wrapper) | ||
1207 | llgfr %r2,%r2 # unsigned long | ||
1208 | jg sys_unshare | ||
1209 | |||
1210 | ENTRY(sys_splice_wrapper) | ||
1211 | lgfr %r2,%r2 # int | ||
1212 | llgtr %r3,%r3 # loff_t * | ||
1213 | lgfr %r4,%r4 # int | ||
1214 | llgtr %r5,%r5 # loff_t * | ||
1215 | llgfr %r6,%r6 # size_t | ||
1216 | llgf %r0,164(%r15) # unsigned int | ||
1217 | stg %r0,160(%r15) | ||
1218 | jg sys_splice | ||
1219 | |||
1220 | ENTRY(sys_sync_file_range_wrapper) | ||
1221 | lgfr %r2,%r2 # int | ||
1222 | sllg %r3,%r3,32 # get high word of 64bit loff_t | ||
1223 | or %r3,%r4 # get low word of 64bit loff_t | ||
1224 | sllg %r4,%r5,32 # get high word of 64bit loff_t | ||
1225 | or %r4,%r6 # get low word of 64bit loff_t | ||
1226 | llgf %r5,164(%r15) # unsigned int | ||
1227 | jg sys_sync_file_range | ||
1228 | |||
1229 | ENTRY(sys_tee_wrapper) | ||
1230 | lgfr %r2,%r2 # int | ||
1231 | lgfr %r3,%r3 # int | ||
1232 | llgfr %r4,%r4 # size_t | ||
1233 | llgfr %r5,%r5 # unsigned int | ||
1234 | jg sys_tee | ||
1235 | |||
1236 | ENTRY(sys_getcpu_wrapper) | ||
1237 | llgtr %r2,%r2 # unsigned * | ||
1238 | llgtr %r3,%r3 # unsigned * | ||
1239 | llgtr %r4,%r4 # struct getcpu_cache * | ||
1240 | jg sys_getcpu | ||
1241 | |||
1242 | ENTRY(compat_sys_utimes_wrapper) | ||
1243 | llgtr %r2,%r2 # char * | ||
1244 | llgtr %r3,%r3 # struct compat_timeval * | ||
1245 | jg compat_sys_utimes | ||
1246 | |||
1247 | ENTRY(compat_sys_utimensat_wrapper) | ||
1248 | llgfr %r2,%r2 # unsigned int | ||
1249 | llgtr %r3,%r3 # char * | ||
1250 | llgtr %r4,%r4 # struct compat_timespec * | ||
1251 | lgfr %r5,%r5 # int | ||
1252 | jg compat_sys_utimensat | ||
1253 | |||
1254 | ENTRY(sys_eventfd_wrapper) | ||
1255 | llgfr %r2,%r2 # unsigned int | ||
1256 | jg sys_eventfd | ||
1257 | |||
1258 | ENTRY(sys_fallocate_wrapper) | ||
1259 | lgfr %r2,%r2 # int | ||
1260 | lgfr %r3,%r3 # int | ||
1261 | sllg %r4,%r4,32 # get high word of 64bit loff_t | ||
1262 | lr %r4,%r5 # get low word of 64bit loff_t | ||
1263 | sllg %r5,%r6,32 # get high word of 64bit loff_t | ||
1264 | l %r5,164(%r15) # get low word of 64bit loff_t | ||
1265 | jg sys_fallocate | ||
1266 | |||
1267 | ENTRY(sys_timerfd_create_wrapper) | ||
1268 | lgfr %r2,%r2 # int | ||
1269 | lgfr %r3,%r3 # int | ||
1270 | jg sys_timerfd_create | ||
1271 | |||
1272 | ENTRY(sys_eventfd2_wrapper) | ||
1273 | llgfr %r2,%r2 # unsigned int | ||
1274 | lgfr %r3,%r3 # int | ||
1275 | jg sys_eventfd2 | ||
1276 | |||
1277 | ENTRY(sys_inotify_init1_wrapper) | ||
1278 | lgfr %r2,%r2 # int | ||
1279 | jg sys_inotify_init1 | ||
1280 | |||
1281 | ENTRY(sys_pipe2_wrapper) | ||
1282 | llgtr %r2,%r2 # u32 * | ||
1283 | lgfr %r3,%r3 # int | ||
1284 | jg sys_pipe2 # branch to system call | ||
1285 | |||
1286 | ENTRY(sys_dup3_wrapper) | ||
1287 | llgfr %r2,%r2 # unsigned int | ||
1288 | llgfr %r3,%r3 # unsigned int | ||
1289 | lgfr %r4,%r4 # int | ||
1290 | jg sys_dup3 # branch to system call | ||
1291 | |||
1292 | ENTRY(sys_epoll_create1_wrapper) | ||
1293 | lgfr %r2,%r2 # int | ||
1294 | jg sys_epoll_create1 # branch to system call | ||
1295 | |||
1296 | ENTRY(sys32_readahead_wrapper) | ||
1297 | lgfr %r2,%r2 # int | ||
1298 | llgfr %r3,%r3 # u32 | ||
1299 | llgfr %r4,%r4 # u32 | ||
1300 | lgfr %r5,%r5 # s32 | ||
1301 | jg sys32_readahead # branch to system call | ||
1302 | |||
1303 | ENTRY(sys_tkill_wrapper) | ||
1304 | lgfr %r2,%r2 # pid_t | ||
1305 | lgfr %r3,%r3 # int | ||
1306 | jg sys_tkill # branch to system call | ||
1307 | |||
1308 | ENTRY(sys_tgkill_wrapper) | ||
1309 | lgfr %r2,%r2 # pid_t | ||
1310 | lgfr %r3,%r3 # pid_t | ||
1311 | lgfr %r4,%r4 # int | ||
1312 | jg sys_tgkill # branch to system call | ||
1313 | |||
1314 | ENTRY(compat_sys_keyctl_wrapper) | ||
1315 | llgfr %r2,%r2 # u32 | ||
1316 | llgfr %r3,%r3 # u32 | ||
1317 | llgfr %r4,%r4 # u32 | ||
1318 | llgfr %r5,%r5 # u32 | ||
1319 | llgfr %r6,%r6 # u32 | ||
1320 | jg compat_sys_keyctl # branch to system call | ||
1321 | |||
1322 | ENTRY(sys_perf_event_open_wrapper) | ||
1323 | llgtr %r2,%r2 # const struct perf_event_attr * | ||
1324 | lgfr %r3,%r3 # pid_t | ||
1325 | lgfr %r4,%r4 # int | ||
1326 | lgfr %r5,%r5 # int | ||
1327 | llgfr %r6,%r6 # unsigned long | ||
1328 | jg sys_perf_event_open # branch to system call | ||
1329 | |||
1330 | ENTRY(sys_clone_wrapper) | ||
1331 | llgfr %r2,%r2 # unsigned long | ||
1332 | llgfr %r3,%r3 # unsigned long | ||
1333 | llgtr %r4,%r4 # int * | ||
1334 | llgtr %r5,%r5 # int * | ||
1335 | jg sys_clone # branch to system call | ||
1336 | |||
1337 | ENTRY(sys32_execve_wrapper) | ||
1338 | llgtr %r2,%r2 # char * | ||
1339 | llgtr %r3,%r3 # compat_uptr_t * | ||
1340 | llgtr %r4,%r4 # compat_uptr_t * | ||
1341 | jg compat_sys_execve # branch to system call | ||
1342 | |||
1343 | ENTRY(sys_fanotify_init_wrapper) | ||
1344 | llgfr %r2,%r2 # unsigned int | ||
1345 | llgfr %r3,%r3 # unsigned int | ||
1346 | jg sys_fanotify_init # branch to system call | ||
1347 | |||
1348 | ENTRY(sys_prlimit64_wrapper) | ||
1349 | lgfr %r2,%r2 # pid_t | ||
1350 | llgfr %r3,%r3 # unsigned int | ||
1351 | llgtr %r4,%r4 # const struct rlimit64 __user * | ||
1352 | llgtr %r5,%r5 # struct rlimit64 __user * | ||
1353 | jg sys_prlimit64 # branch to system call | ||
1354 | |||
1355 | ENTRY(sys_name_to_handle_at_wrapper) | ||
1356 | lgfr %r2,%r2 # int | ||
1357 | llgtr %r3,%r3 # const char __user * | ||
1358 | llgtr %r4,%r4 # struct file_handle __user * | ||
1359 | llgtr %r5,%r5 # int __user * | ||
1360 | lgfr %r6,%r6 # int | ||
1361 | jg sys_name_to_handle_at | ||
1362 | |||
1363 | ENTRY(compat_sys_clock_adjtime_wrapper) | ||
1364 | lgfr %r2,%r2 # clockid_t (int) | ||
1365 | llgtr %r3,%r3 # struct compat_timex __user * | ||
1366 | jg compat_sys_clock_adjtime | ||
1367 | |||
1368 | ENTRY(sys_syncfs_wrapper) | ||
1369 | lgfr %r2,%r2 # int | ||
1370 | jg sys_syncfs | ||
1371 | |||
1372 | ENTRY(sys_setns_wrapper) | ||
1373 | lgfr %r2,%r2 # int | ||
1374 | lgfr %r3,%r3 # int | ||
1375 | jg sys_setns | ||
1376 | |||
1377 | ENTRY(compat_sys_process_vm_readv_wrapper) | ||
1378 | lgfr %r2,%r2 # compat_pid_t | ||
1379 | llgtr %r3,%r3 # struct compat_iovec __user * | ||
1380 | llgfr %r4,%r4 # unsigned long | ||
1381 | llgtr %r5,%r5 # struct compat_iovec __user * | ||
1382 | llgfr %r6,%r6 # unsigned long | ||
1383 | llgf %r0,164(%r15) # unsigned long | ||
1384 | stg %r0,160(%r15) | ||
1385 | jg compat_sys_process_vm_readv | ||
1386 | |||
1387 | ENTRY(compat_sys_process_vm_writev_wrapper) | ||
1388 | lgfr %r2,%r2 # compat_pid_t | ||
1389 | llgtr %r3,%r3 # struct compat_iovec __user * | ||
1390 | llgfr %r4,%r4 # unsigned long | ||
1391 | llgtr %r5,%r5 # struct compat_iovec __user * | ||
1392 | llgfr %r6,%r6 # unsigned long | ||
1393 | llgf %r0,164(%r15) # unsigned long | ||
1394 | stg %r0,160(%r15) | ||
1395 | jg compat_sys_process_vm_writev | ||
1396 | |||
1397 | ENTRY(sys_s390_runtime_instr_wrapper) | ||
1398 | lgfr %r2,%r2 # int | ||
1399 | lgfr %r3,%r3 # int | ||
1400 | jg sys_s390_runtime_instr | ||
1401 | |||
1402 | ENTRY(sys_kcmp_wrapper) | ||
1403 | lgfr %r2,%r2 # pid_t | ||
1404 | lgfr %r3,%r3 # pid_t | ||
1405 | lgfr %r4,%r4 # int | ||
1406 | llgfr %r5,%r5 # unsigned long | ||
1407 | llgfr %r6,%r6 # unsigned long | ||
1408 | jg sys_kcmp | ||
1409 | |||
1410 | ENTRY(sys_finit_module_wrapper) | ||
1411 | lgfr %r2,%r2 # int | ||
1412 | llgtr %r3,%r3 # const char __user * | ||
1413 | lgfr %r4,%r4 # int | ||
1414 | jg sys_finit_module | ||
1415 | |||
1416 | ENTRY(sys_sched_setattr_wrapper) | ||
1417 | lgfr %r2,%r2 # pid_t | ||
1418 | llgtr %r3,%r3 # struct sched_attr __user * | ||
1419 | jg sys_sched_setattr | ||
1420 | |||
1421 | ENTRY(sys_sched_getattr_wrapper) | ||
1422 | lgfr %r2,%r2 # pid_t | ||
1423 | llgtr %r3,%r3 # const char __user * | ||
1424 | llgfr %r4,%r4 # unsigned int | ||
1425 | jg sys_sched_getattr | ||
diff --git a/arch/s390/kernel/compat_wrapper.c b/arch/s390/kernel/compat_wrapper.c new file mode 100644 index 000000000000..824c39dfddfc --- /dev/null +++ b/arch/s390/kernel/compat_wrapper.c | |||
@@ -0,0 +1,215 @@ | |||
1 | /* | ||
2 | * Compat sytem call wrappers. | ||
3 | * | ||
4 | * Copyright IBM Corp. 2014 | ||
5 | */ | ||
6 | |||
7 | #include <linux/syscalls.h> | ||
8 | #include <linux/compat.h> | ||
9 | #include "entry.h" | ||
10 | |||
11 | #define COMPAT_SYSCALL_WRAP1(name, ...) \ | ||
12 | COMPAT_SYSCALL_WRAPx(1, _##name, __VA_ARGS__) | ||
13 | #define COMPAT_SYSCALL_WRAP2(name, ...) \ | ||
14 | COMPAT_SYSCALL_WRAPx(2, _##name, __VA_ARGS__) | ||
15 | #define COMPAT_SYSCALL_WRAP3(name, ...) \ | ||
16 | COMPAT_SYSCALL_WRAPx(3, _##name, __VA_ARGS__) | ||
17 | #define COMPAT_SYSCALL_WRAP4(name, ...) \ | ||
18 | COMPAT_SYSCALL_WRAPx(4, _##name, __VA_ARGS__) | ||
19 | #define COMPAT_SYSCALL_WRAP5(name, ...) \ | ||
20 | COMPAT_SYSCALL_WRAPx(5, _##name, __VA_ARGS__) | ||
21 | #define COMPAT_SYSCALL_WRAP6(name, ...) \ | ||
22 | COMPAT_SYSCALL_WRAPx(6, _##name, __VA_ARGS__) | ||
23 | |||
24 | #define __SC_COMPAT_TYPE(t, a) \ | ||
25 | __typeof(__builtin_choose_expr(sizeof(t) > 4, 0L, (t)0)) a | ||
26 | |||
27 | #define __SC_COMPAT_CAST(t, a) \ | ||
28 | ({ \ | ||
29 | long __ReS = a; \ | ||
30 | \ | ||
31 | BUILD_BUG_ON((sizeof(t) > 4) && !__TYPE_IS_L(t) && \ | ||
32 | !__TYPE_IS_UL(t) && !__TYPE_IS_PTR(t)); \ | ||
33 | if (__TYPE_IS_L(t)) \ | ||
34 | __ReS = (s32)a; \ | ||
35 | if (__TYPE_IS_UL(t)) \ | ||
36 | __ReS = (u32)a; \ | ||
37 | if (__TYPE_IS_PTR(t)) \ | ||
38 | __ReS = a & 0x7fffffff; \ | ||
39 | (t)__ReS; \ | ||
40 | }) | ||
41 | |||
42 | /* | ||
43 | * The COMPAT_SYSCALL_WRAP macro generates system call wrappers to be used by | ||
44 | * compat tasks. These wrappers will only be used for system calls where only | ||
45 | * the system call arguments need sign or zero extension or zeroing of the upper | ||
46 | * 33 bits of pointers. | ||
47 | * Note: since the wrapper function will afterwards call a system call which | ||
48 | * again performs zero and sign extension for all system call arguments with | ||
49 | * a size of less than eight bytes, these compat wrappers only touch those | ||
50 | * system call arguments with a size of eight bytes ((unsigned) long and | ||
51 | * pointers). Zero and sign extension for e.g. int parameters will be done by | ||
52 | * the regular system call wrappers. | ||
53 | */ | ||
54 | #define COMPAT_SYSCALL_WRAPx(x, name, ...) \ | ||
55 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ | ||
56 | asmlinkage long compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__));\ | ||
57 | asmlinkage long compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__)) \ | ||
58 | { \ | ||
59 | return sys##name(__MAP(x,__SC_COMPAT_CAST,__VA_ARGS__)); \ | ||
60 | } | ||
61 | |||
62 | COMPAT_SYSCALL_WRAP1(exit, int, error_code); | ||
63 | COMPAT_SYSCALL_WRAP1(close, unsigned int, fd); | ||
64 | COMPAT_SYSCALL_WRAP2(creat, const char __user *, pathname, umode_t, mode); | ||
65 | COMPAT_SYSCALL_WRAP2(link, const char __user *, oldname, const char __user *, newname); | ||
66 | COMPAT_SYSCALL_WRAP1(unlink, const char __user *, pathname); | ||
67 | COMPAT_SYSCALL_WRAP1(chdir, const char __user *, filename); | ||
68 | COMPAT_SYSCALL_WRAP3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev); | ||
69 | COMPAT_SYSCALL_WRAP2(chmod, const char __user *, filename, umode_t, mode); | ||
70 | COMPAT_SYSCALL_WRAP1(oldumount, char __user *, name); | ||
71 | COMPAT_SYSCALL_WRAP1(alarm, unsigned int, seconds); | ||
72 | COMPAT_SYSCALL_WRAP2(access, const char __user *, filename, int, mode); | ||
73 | COMPAT_SYSCALL_WRAP1(nice, int, increment); | ||
74 | COMPAT_SYSCALL_WRAP2(kill, int, pid, int, sig); | ||
75 | COMPAT_SYSCALL_WRAP2(rename, const char __user *, oldname, const char __user *, newname); | ||
76 | COMPAT_SYSCALL_WRAP2(mkdir, const char __user *, pathname, umode_t, mode); | ||
77 | COMPAT_SYSCALL_WRAP1(rmdir, const char __user *, pathname); | ||
78 | COMPAT_SYSCALL_WRAP1(dup, unsigned int, fildes); | ||
79 | COMPAT_SYSCALL_WRAP1(pipe, int __user *, fildes); | ||
80 | COMPAT_SYSCALL_WRAP1(brk, unsigned long, brk); | ||
81 | COMPAT_SYSCALL_WRAP2(signal, int, sig, __sighandler_t, handler); | ||
82 | COMPAT_SYSCALL_WRAP1(acct, const char __user *, name); | ||
83 | COMPAT_SYSCALL_WRAP2(umount, char __user *, name, int, flags); | ||
84 | COMPAT_SYSCALL_WRAP2(setpgid, pid_t, pid, pid_t, pgid); | ||
85 | COMPAT_SYSCALL_WRAP1(umask, int, mask); | ||
86 | COMPAT_SYSCALL_WRAP1(chroot, const char __user *, filename); | ||
87 | COMPAT_SYSCALL_WRAP2(dup2, unsigned int, oldfd, unsigned int, newfd); | ||
88 | COMPAT_SYSCALL_WRAP3(sigsuspend, int, unused1, int, unused2, old_sigset_t, mask); | ||
89 | COMPAT_SYSCALL_WRAP2(sethostname, char __user *, name, int, len); | ||
90 | COMPAT_SYSCALL_WRAP2(symlink, const char __user *, old, const char __user *, new); | ||
91 | COMPAT_SYSCALL_WRAP3(readlink, const char __user *, path, char __user *, buf, int, bufsiz); | ||
92 | COMPAT_SYSCALL_WRAP1(uselib, const char __user *, library); | ||
93 | COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags); | ||
94 | COMPAT_SYSCALL_WRAP4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg); | ||
95 | COMPAT_SYSCALL_WRAP2(munmap, unsigned long, addr, size_t, len); | ||
96 | COMPAT_SYSCALL_WRAP2(fchmod, unsigned int, fd, umode_t, mode); | ||
97 | COMPAT_SYSCALL_WRAP2(getpriority, int, which, int, who); | ||
98 | COMPAT_SYSCALL_WRAP3(setpriority, int, which, int, who, int, niceval); | ||
99 | COMPAT_SYSCALL_WRAP3(syslog, int, type, char __user *, buf, int, len); | ||
100 | COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile); | ||
101 | COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd); | ||
102 | COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len); | ||
103 | COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name); | ||
104 | COMPAT_SYSCALL_WRAP3(mprotect, unsigned long, start, size_t, len, unsigned long, prot); | ||
105 | COMPAT_SYSCALL_WRAP3(init_module, void __user *, umod, unsigned long, len, const char __user *, uargs); | ||
106 | COMPAT_SYSCALL_WRAP2(delete_module, const char __user *, name_user, unsigned int, flags); | ||
107 | COMPAT_SYSCALL_WRAP4(quotactl, unsigned int, cmd, const char __user *, special, qid_t, id, void __user *, addr); | ||
108 | COMPAT_SYSCALL_WRAP1(getpgid, pid_t, pid); | ||
109 | COMPAT_SYSCALL_WRAP1(fchdir, unsigned int, fd); | ||
110 | COMPAT_SYSCALL_WRAP2(bdflush, int, func, long, data); | ||
111 | COMPAT_SYSCALL_WRAP3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2); | ||
112 | COMPAT_SYSCALL_WRAP1(s390_personality, unsigned int, personality); | ||
113 | COMPAT_SYSCALL_WRAP5(llseek, unsigned int, fd, unsigned long, high, unsigned long, low, loff_t __user *, result, unsigned int, whence); | ||
114 | COMPAT_SYSCALL_WRAP2(flock, unsigned int, fd, unsigned int, cmd); | ||
115 | COMPAT_SYSCALL_WRAP3(msync, unsigned long, start, size_t, len, int, flags); | ||
116 | COMPAT_SYSCALL_WRAP1(getsid, pid_t, pid); | ||
117 | COMPAT_SYSCALL_WRAP1(fdatasync, unsigned int, fd); | ||
118 | COMPAT_SYSCALL_WRAP2(mlock, unsigned long, start, size_t, len); | ||
119 | COMPAT_SYSCALL_WRAP2(munlock, unsigned long, start, size_t, len); | ||
120 | COMPAT_SYSCALL_WRAP1(mlockall, int, flags); | ||
121 | COMPAT_SYSCALL_WRAP2(sched_setparam, pid_t, pid, struct sched_param __user *, param); | ||
122 | COMPAT_SYSCALL_WRAP2(sched_getparam, pid_t, pid, struct sched_param __user *, param); | ||
123 | COMPAT_SYSCALL_WRAP3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param); | ||
124 | COMPAT_SYSCALL_WRAP1(sched_getscheduler, pid_t, pid); | ||
125 | COMPAT_SYSCALL_WRAP1(sched_get_priority_max, int, policy); | ||
126 | COMPAT_SYSCALL_WRAP1(sched_get_priority_min, int, policy); | ||
127 | COMPAT_SYSCALL_WRAP5(mremap, unsigned long, addr, unsigned long, old_len, unsigned long, new_len, unsigned long, flags, unsigned long, new_addr); | ||
128 | COMPAT_SYSCALL_WRAP3(poll, struct pollfd __user *, ufds, unsigned int, nfds, int, timeout); | ||
129 | COMPAT_SYSCALL_WRAP5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5); | ||
130 | COMPAT_SYSCALL_WRAP2(getcwd, char __user *, buf, unsigned long, size); | ||
131 | COMPAT_SYSCALL_WRAP2(capget, cap_user_header_t, header, cap_user_data_t, dataptr); | ||
132 | COMPAT_SYSCALL_WRAP2(capset, cap_user_header_t, header, const cap_user_data_t, data); | ||
133 | COMPAT_SYSCALL_WRAP3(lchown, const char __user *, filename, uid_t, user, gid_t, group); | ||
134 | COMPAT_SYSCALL_WRAP2(setreuid, uid_t, ruid, uid_t, euid); | ||
135 | COMPAT_SYSCALL_WRAP2(setregid, gid_t, rgid, gid_t, egid); | ||
136 | COMPAT_SYSCALL_WRAP2(getgroups, int, gidsetsize, gid_t __user *, grouplist); | ||
137 | COMPAT_SYSCALL_WRAP2(setgroups, int, gidsetsize, gid_t __user *, grouplist); | ||
138 | COMPAT_SYSCALL_WRAP3(fchown, unsigned int, fd, uid_t, user, gid_t, group); | ||
139 | COMPAT_SYSCALL_WRAP3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid); | ||
140 | COMPAT_SYSCALL_WRAP3(getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __user *, suid); | ||
141 | COMPAT_SYSCALL_WRAP3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid); | ||
142 | COMPAT_SYSCALL_WRAP3(getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __user *, sgid); | ||
143 | COMPAT_SYSCALL_WRAP3(chown, const char __user *, filename, uid_t, user, gid_t, group); | ||
144 | COMPAT_SYSCALL_WRAP1(setuid, uid_t, uid); | ||
145 | COMPAT_SYSCALL_WRAP1(setgid, gid_t, gid); | ||
146 | COMPAT_SYSCALL_WRAP1(setfsuid, uid_t, uid); | ||
147 | COMPAT_SYSCALL_WRAP1(setfsgid, gid_t, gid); | ||
148 | COMPAT_SYSCALL_WRAP2(pivot_root, const char __user *, new_root, const char __user *, put_old); | ||
149 | COMPAT_SYSCALL_WRAP3(mincore, unsigned long, start, size_t, len, unsigned char __user *, vec); | ||
150 | COMPAT_SYSCALL_WRAP3(madvise, unsigned long, start, size_t, len, int, behavior); | ||
151 | COMPAT_SYSCALL_WRAP5(setxattr, const char __user *, path, const char __user *, name, const void __user *, value, size_t, size, int, flags); | ||
152 | COMPAT_SYSCALL_WRAP5(lsetxattr, const char __user *, path, const char __user *, name, const void __user *, value, size_t, size, int, flags); | ||
153 | COMPAT_SYSCALL_WRAP5(fsetxattr, int, fd, const char __user *, name, const void __user *, value, size_t, size, int, flags); | ||
154 | COMPAT_SYSCALL_WRAP3(getdents64, unsigned int, fd, struct linux_dirent64 __user *, dirent, unsigned int, count); | ||
155 | COMPAT_SYSCALL_WRAP4(getxattr, const char __user *, path, const char __user *, name, void __user *, value, size_t, size); | ||
156 | COMPAT_SYSCALL_WRAP4(lgetxattr, const char __user *, path, const char __user *, name, void __user *, value, size_t, size); | ||
157 | COMPAT_SYSCALL_WRAP4(fgetxattr, int, fd, const char __user *, name, void __user *, value, size_t, size); | ||
158 | COMPAT_SYSCALL_WRAP3(listxattr, const char __user *, path, char __user *, list, size_t, size); | ||
159 | COMPAT_SYSCALL_WRAP3(llistxattr, const char __user *, path, char __user *, list, size_t, size); | ||
160 | COMPAT_SYSCALL_WRAP3(flistxattr, int, fd, char __user *, list, size_t, size); | ||
161 | COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name); | ||
162 | COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name); | ||
163 | COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name); | ||
164 | COMPAT_SYSCALL_WRAP1(exit_group, int, error_code); | ||
165 | COMPAT_SYSCALL_WRAP1(set_tid_address, int __user *, tidptr); | ||
166 | COMPAT_SYSCALL_WRAP1(epoll_create, int, size); | ||
167 | COMPAT_SYSCALL_WRAP4(epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event __user *, event); | ||
168 | COMPAT_SYSCALL_WRAP4(epoll_wait, int, epfd, struct epoll_event __user *, events, int, maxevents, int, timeout); | ||
169 | COMPAT_SYSCALL_WRAP1(timer_getoverrun, timer_t, timer_id); | ||
170 | COMPAT_SYSCALL_WRAP1(timer_delete, compat_timer_t, compat_timer_id); | ||
171 | COMPAT_SYSCALL_WRAP1(io_destroy, aio_context_t, ctx); | ||
172 | COMPAT_SYSCALL_WRAP3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result); | ||
173 | COMPAT_SYSCALL_WRAP1(mq_unlink, const char __user *, name); | ||
174 | COMPAT_SYSCALL_WRAP5(add_key, const char __user *, tp, const char __user *, dsc, const void __user *, pld, size_t, len, key_serial_t, id); | ||
175 | COMPAT_SYSCALL_WRAP4(request_key, const char __user *, tp, const char __user *, dsc, const char __user *, info, key_serial_t, id); | ||
176 | COMPAT_SYSCALL_WRAP5(remap_file_pages, unsigned long, start, unsigned long, size, unsigned long, prot, unsigned long, pgoff, unsigned long, flags); | ||
177 | COMPAT_SYSCALL_WRAP3(ioprio_set, int, which, int, who, int, ioprio); | ||
178 | COMPAT_SYSCALL_WRAP2(ioprio_get, int, which, int, who); | ||
179 | COMPAT_SYSCALL_WRAP3(inotify_add_watch, int, fd, const char __user *, path, u32, mask); | ||
180 | COMPAT_SYSCALL_WRAP2(inotify_rm_watch, int, fd, __s32, wd); | ||
181 | COMPAT_SYSCALL_WRAP3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode); | ||
182 | COMPAT_SYSCALL_WRAP4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, unsigned, dev); | ||
183 | COMPAT_SYSCALL_WRAP5(fchownat, int, dfd, const char __user *, filename, uid_t, user, gid_t, group, int, flag); | ||
184 | COMPAT_SYSCALL_WRAP3(unlinkat, int, dfd, const char __user *, pathname, int, flag); | ||
185 | COMPAT_SYSCALL_WRAP4(renameat, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname); | ||
186 | COMPAT_SYSCALL_WRAP5(linkat, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, int, flags); | ||
187 | COMPAT_SYSCALL_WRAP3(symlinkat, const char __user *, oldname, int, newdfd, const char __user *, newname); | ||
188 | COMPAT_SYSCALL_WRAP4(readlinkat, int, dfd, const char __user *, path, char __user *, buf, int, bufsiz); | ||
189 | COMPAT_SYSCALL_WRAP3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode); | ||
190 | COMPAT_SYSCALL_WRAP3(faccessat, int, dfd, const char __user *, filename, int, mode); | ||
191 | COMPAT_SYSCALL_WRAP1(unshare, unsigned long, unshare_flags); | ||
192 | COMPAT_SYSCALL_WRAP6(splice, int, fd_in, loff_t __user *, off_in, int, fd_out, loff_t __user *, off_out, size_t, len, unsigned int, flags); | ||
193 | COMPAT_SYSCALL_WRAP4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags); | ||
194 | COMPAT_SYSCALL_WRAP3(getcpu, unsigned __user *, cpu, unsigned __user *, node, struct getcpu_cache __user *, cache); | ||
195 | COMPAT_SYSCALL_WRAP1(eventfd, unsigned int, count); | ||
196 | COMPAT_SYSCALL_WRAP2(timerfd_create, int, clockid, int, flags); | ||
197 | COMPAT_SYSCALL_WRAP2(eventfd2, unsigned int, count, int, flags); | ||
198 | COMPAT_SYSCALL_WRAP1(inotify_init1, int, flags); | ||
199 | COMPAT_SYSCALL_WRAP2(pipe2, int __user *, fildes, int, flags); | ||
200 | COMPAT_SYSCALL_WRAP3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags); | ||
201 | COMPAT_SYSCALL_WRAP1(epoll_create1, int, flags); | ||
202 | COMPAT_SYSCALL_WRAP2(tkill, int, pid, int, sig); | ||
203 | COMPAT_SYSCALL_WRAP3(tgkill, int, tgid, int, pid, int, sig); | ||
204 | COMPAT_SYSCALL_WRAP5(perf_event_open, struct perf_event_attr __user *, attr_uptr, pid_t, pid, int, cpu, int, group_fd, unsigned long, flags); | ||
205 | COMPAT_SYSCALL_WRAP5(clone, unsigned long, newsp, unsigned long, clone_flags, int __user *, parent_tidptr, int __user *, child_tidptr, int, tls_val); | ||
206 | COMPAT_SYSCALL_WRAP2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags); | ||
207 | COMPAT_SYSCALL_WRAP4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim); | ||
208 | COMPAT_SYSCALL_WRAP5(name_to_handle_at, int, dfd, const char __user *, name, struct file_handle __user *, handle, int __user *, mnt_id, int, flag); | ||
209 | COMPAT_SYSCALL_WRAP1(syncfs, int, fd); | ||
210 | COMPAT_SYSCALL_WRAP2(setns, int, fd, int, nstype); | ||
211 | COMPAT_SYSCALL_WRAP2(s390_runtime_instr, int, command, int, signum); | ||
212 | COMPAT_SYSCALL_WRAP5(kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, idx1, unsigned long, idx2); | ||
213 | COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, flags); | ||
214 | COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, flags); | ||
215 | COMPAT_SYSCALL_WRAP4(sched_getattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, size, unsigned int, flags); | ||
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index fca20b5fe79e..6b594439cca5 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -380,8 +380,6 @@ static __init void detect_machine_facilities(void) | |||
380 | S390_lowcore.machine_flags |= MACHINE_FLAG_EDAT2; | 380 | S390_lowcore.machine_flags |= MACHINE_FLAG_EDAT2; |
381 | if (test_facility(3)) | 381 | if (test_facility(3)) |
382 | S390_lowcore.machine_flags |= MACHINE_FLAG_IDTE; | 382 | S390_lowcore.machine_flags |= MACHINE_FLAG_IDTE; |
383 | if (test_facility(27)) | ||
384 | S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS; | ||
385 | if (test_facility(40)) | 383 | if (test_facility(40)) |
386 | S390_lowcore.machine_flags |= MACHINE_FLAG_LPP; | 384 | S390_lowcore.machine_flags |= MACHINE_FLAG_LPP; |
387 | if (test_facility(50) && test_facility(73)) | 385 | if (test_facility(50) && test_facility(73)) |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 0dc2b6d0a1ec..526d3735ed29 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -43,6 +43,7 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
43 | _TIF_MCCK_PENDING) | 43 | _TIF_MCCK_PENDING) |
44 | _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ | 44 | _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ |
45 | _TIF_SYSCALL_TRACEPOINT) | 45 | _TIF_SYSCALL_TRACEPOINT) |
46 | _TIF_TRANSFER = (_TIF_MCCK_PENDING | _TIF_TLB_WAIT) | ||
46 | 47 | ||
47 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER | 48 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER |
48 | STACK_SIZE = 1 << STACK_SHIFT | 49 | STACK_SIZE = 1 << STACK_SHIFT |
@@ -159,10 +160,12 @@ ENTRY(__switch_to) | |||
159 | lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 | 160 | lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 |
160 | mvc __LC_CURRENT_PID(4,%r0),__TASK_pid(%r3) # store pid of next | 161 | mvc __LC_CURRENT_PID(4,%r0),__TASK_pid(%r3) # store pid of next |
161 | l %r15,__THREAD_ksp(%r3) # load kernel stack of next | 162 | l %r15,__THREAD_ksp(%r3) # load kernel stack of next |
162 | tm __TI_flags+3(%r4),_TIF_MCCK_PENDING # machine check pending? | 163 | lhi %r6,_TIF_TRANSFER # transfer TIF bits |
164 | n %r6,__TI_flags(%r4) # isolate TIF bits | ||
163 | jz 0f | 165 | jz 0f |
164 | ni __TI_flags+3(%r4),255-_TIF_MCCK_PENDING # clear flag in prev | 166 | o %r6,__TI_flags(%r5) # set TIF bits of next |
165 | oi __TI_flags+3(%r5),_TIF_MCCK_PENDING # set it in next | 167 | st %r6,__TI_flags(%r5) |
168 | ni __TI_flags+3(%r4),255-_TIF_TRANSFER # clear TIF bits of prev | ||
166 | 0: lm %r6,%r15,__SF_GPRS(%r15) # load gprs of next task | 169 | 0: lm %r6,%r15,__SF_GPRS(%r15) # load gprs of next task |
167 | br %r14 | 170 | br %r14 |
168 | 171 | ||
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h index cb533f78c09e..6ac78192455f 100644 --- a/arch/s390/kernel/entry.h +++ b/arch/s390/kernel/entry.h | |||
@@ -67,9 +67,7 @@ struct s390_mmap_arg_struct; | |||
67 | struct fadvise64_64_args; | 67 | struct fadvise64_64_args; |
68 | struct old_sigaction; | 68 | struct old_sigaction; |
69 | 69 | ||
70 | long sys_sigreturn(void); | 70 | long sys_s390_personality(unsigned int personality); |
71 | long sys_rt_sigreturn(void); | 71 | long sys_s390_runtime_instr(int command, int signum); |
72 | long sys32_sigreturn(void); | ||
73 | long sys32_rt_sigreturn(void); | ||
74 | 72 | ||
75 | #endif /* _ENTRY_H */ | 73 | #endif /* _ENTRY_H */ |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 384e609b4711..e09dbe5f2901 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -48,6 +48,7 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
48 | _TIF_MCCK_PENDING) | 48 | _TIF_MCCK_PENDING) |
49 | _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ | 49 | _TIF_TRACE = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \ |
50 | _TIF_SYSCALL_TRACEPOINT) | 50 | _TIF_SYSCALL_TRACEPOINT) |
51 | _TIF_TRANSFER = (_TIF_MCCK_PENDING | _TIF_TLB_WAIT) | ||
51 | 52 | ||
52 | #define BASED(name) name-system_call(%r13) | 53 | #define BASED(name) name-system_call(%r13) |
53 | 54 | ||
@@ -189,10 +190,12 @@ ENTRY(__switch_to) | |||
189 | lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 | 190 | lctl %c4,%c4,__TASK_pid(%r3) # load pid to control reg. 4 |
190 | mvc __LC_CURRENT_PID+4(4,%r0),__TASK_pid(%r3) # store pid of next | 191 | mvc __LC_CURRENT_PID+4(4,%r0),__TASK_pid(%r3) # store pid of next |
191 | lg %r15,__THREAD_ksp(%r3) # load kernel stack of next | 192 | lg %r15,__THREAD_ksp(%r3) # load kernel stack of next |
192 | tm __TI_flags+7(%r4),_TIF_MCCK_PENDING # machine check pending? | 193 | llill %r6,_TIF_TRANSFER # transfer TIF bits |
194 | ng %r6,__TI_flags(%r4) # isolate TIF bits | ||
193 | jz 0f | 195 | jz 0f |
194 | ni __TI_flags+7(%r4),255-_TIF_MCCK_PENDING # clear flag in prev | 196 | og %r6,__TI_flags(%r5) # set TIF bits of next |
195 | oi __TI_flags+7(%r5),_TIF_MCCK_PENDING # set it in next | 197 | stg %r6,__TI_flags(%r5) |
198 | ni __TI_flags+7(%r4),255-_TIF_TRANSFER # clear TIF bits of prev | ||
196 | 0: lmg %r6,%r15,__SF_GPRS(%r15) # load gprs of next task | 199 | 0: lmg %r6,%r15,__SF_GPRS(%r15) # load gprs of next task |
197 | br %r14 | 200 | br %r14 |
198 | 201 | ||
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index bb27a262c44a..a770be97db4d 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
21 | #include <linux/irq.h> | ||
21 | #include <asm/irq_regs.h> | 22 | #include <asm/irq_regs.h> |
22 | #include <asm/cputime.h> | 23 | #include <asm/cputime.h> |
23 | #include <asm/lowcore.h> | 24 | #include <asm/lowcore.h> |
diff --git a/arch/s390/kernel/perf_event.c b/arch/s390/kernel/perf_event.c index 5d2dfa31c4ef..61595c1f0a0f 100644 --- a/arch/s390/kernel/perf_event.c +++ b/arch/s390/kernel/perf_event.c | |||
@@ -121,7 +121,7 @@ unsigned long perf_misc_flags(struct pt_regs *regs) | |||
121 | : PERF_RECORD_MISC_KERNEL; | 121 | : PERF_RECORD_MISC_KERNEL; |
122 | } | 122 | } |
123 | 123 | ||
124 | void print_debug_cf(void) | 124 | static void print_debug_cf(void) |
125 | { | 125 | { |
126 | struct cpumf_ctr_info cf_info; | 126 | struct cpumf_ctr_info cf_info; |
127 | int cpu = smp_processor_id(); | 127 | int cpu = smp_processor_id(); |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index f6be6087a0e9..4ac8fafec95f 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -85,7 +85,10 @@ void update_cr_regs(struct task_struct *task) | |||
85 | 85 | ||
86 | /* merge TIF_SINGLE_STEP into user specified PER registers. */ | 86 | /* merge TIF_SINGLE_STEP into user specified PER registers. */ |
87 | if (test_tsk_thread_flag(task, TIF_SINGLE_STEP)) { | 87 | if (test_tsk_thread_flag(task, TIF_SINGLE_STEP)) { |
88 | new.control |= PER_EVENT_IFETCH; | 88 | if (test_tsk_thread_flag(task, TIF_BLOCK_STEP)) |
89 | new.control |= PER_EVENT_BRANCH; | ||
90 | else | ||
91 | new.control |= PER_EVENT_IFETCH; | ||
89 | #ifdef CONFIG_64BIT | 92 | #ifdef CONFIG_64BIT |
90 | new.control |= PER_CONTROL_SUSPENSION; | 93 | new.control |= PER_CONTROL_SUSPENSION; |
91 | new.control |= PER_EVENT_TRANSACTION_END; | 94 | new.control |= PER_EVENT_TRANSACTION_END; |
@@ -107,14 +110,22 @@ void update_cr_regs(struct task_struct *task) | |||
107 | 110 | ||
108 | void user_enable_single_step(struct task_struct *task) | 111 | void user_enable_single_step(struct task_struct *task) |
109 | { | 112 | { |
113 | clear_tsk_thread_flag(task, TIF_BLOCK_STEP); | ||
110 | set_tsk_thread_flag(task, TIF_SINGLE_STEP); | 114 | set_tsk_thread_flag(task, TIF_SINGLE_STEP); |
111 | } | 115 | } |
112 | 116 | ||
113 | void user_disable_single_step(struct task_struct *task) | 117 | void user_disable_single_step(struct task_struct *task) |
114 | { | 118 | { |
119 | clear_tsk_thread_flag(task, TIF_BLOCK_STEP); | ||
115 | clear_tsk_thread_flag(task, TIF_SINGLE_STEP); | 120 | clear_tsk_thread_flag(task, TIF_SINGLE_STEP); |
116 | } | 121 | } |
117 | 122 | ||
123 | void user_enable_block_step(struct task_struct *task) | ||
124 | { | ||
125 | set_tsk_thread_flag(task, TIF_SINGLE_STEP); | ||
126 | set_tsk_thread_flag(task, TIF_BLOCK_STEP); | ||
127 | } | ||
128 | |||
118 | /* | 129 | /* |
119 | * Called by kernel/ptrace.c when detaching.. | 130 | * Called by kernel/ptrace.c when detaching.. |
120 | * | 131 | * |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 09e2f468f48b..f70f2489fa5f 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/compat.h> | 47 | #include <linux/compat.h> |
48 | 48 | ||
49 | #include <asm/ipl.h> | 49 | #include <asm/ipl.h> |
50 | #include <asm/uaccess.h> | ||
51 | #include <asm/facility.h> | 50 | #include <asm/facility.h> |
52 | #include <asm/smp.h> | 51 | #include <asm/smp.h> |
53 | #include <asm/mmu_context.h> | 52 | #include <asm/mmu_context.h> |
@@ -65,12 +64,6 @@ | |||
65 | #include "entry.h" | 64 | #include "entry.h" |
66 | 65 | ||
67 | /* | 66 | /* |
68 | * User copy operations. | ||
69 | */ | ||
70 | struct uaccess_ops uaccess; | ||
71 | EXPORT_SYMBOL(uaccess); | ||
72 | |||
73 | /* | ||
74 | * Machine setup.. | 67 | * Machine setup.. |
75 | */ | 68 | */ |
76 | unsigned int console_mode = 0; | 69 | unsigned int console_mode = 0; |
@@ -294,14 +287,6 @@ static int __init parse_vmalloc(char *arg) | |||
294 | } | 287 | } |
295 | early_param("vmalloc", parse_vmalloc); | 288 | early_param("vmalloc", parse_vmalloc); |
296 | 289 | ||
297 | static int __init early_parse_user_mode(char *p) | ||
298 | { | ||
299 | if (!p || strcmp(p, "primary") == 0) | ||
300 | return 0; | ||
301 | return 1; | ||
302 | } | ||
303 | early_param("user_mode", early_parse_user_mode); | ||
304 | |||
305 | void *restart_stack __attribute__((__section__(".data"))); | 290 | void *restart_stack __attribute__((__section__(".data"))); |
306 | 291 | ||
307 | static void __init setup_lowcore(void) | 292 | static void __init setup_lowcore(void) |
@@ -1009,8 +994,6 @@ void __init setup_arch(char **cmdline_p) | |||
1009 | init_mm.end_data = (unsigned long) &_edata; | 994 | init_mm.end_data = (unsigned long) &_edata; |
1010 | init_mm.brk = (unsigned long) &_end; | 995 | init_mm.brk = (unsigned long) &_end; |
1011 | 996 | ||
1012 | uaccess = MACHINE_HAS_MVCOS ? uaccess_mvcos : uaccess_pt; | ||
1013 | |||
1014 | parse_early_param(); | 997 | parse_early_param(); |
1015 | detect_memory_layout(memory_chunk, memory_end); | 998 | detect_memory_layout(memory_chunk, memory_end); |
1016 | os_info_init(); | 999 | os_info_init(); |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index a7125b62a9a6..8827883310dd 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -773,11 +773,11 @@ void __noreturn cpu_die(void) | |||
773 | 773 | ||
774 | void __init smp_fill_possible_mask(void) | 774 | void __init smp_fill_possible_mask(void) |
775 | { | 775 | { |
776 | unsigned int possible, cpu; | 776 | unsigned int possible, sclp, cpu; |
777 | 777 | ||
778 | possible = setup_possible_cpus; | 778 | sclp = sclp_get_max_cpu() ?: nr_cpu_ids; |
779 | if (!possible) | 779 | possible = setup_possible_cpus ?: nr_cpu_ids; |
780 | possible = MACHINE_IS_VM ? 64 : nr_cpu_ids; | 780 | possible = min(possible, sclp); |
781 | for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++) | 781 | for (cpu = 0; cpu < possible && cpu < nr_cpu_ids; cpu++) |
782 | set_cpu_possible(cpu, true); | 782 | set_cpu_possible(cpu, true); |
783 | } | 783 | } |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 143992152ec9..542ef488bac1 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -9,349 +9,349 @@ | |||
9 | #define NI_SYSCALL SYSCALL(sys_ni_syscall,sys_ni_syscall,sys_ni_syscall) | 9 | #define NI_SYSCALL SYSCALL(sys_ni_syscall,sys_ni_syscall,sys_ni_syscall) |
10 | 10 | ||
11 | NI_SYSCALL /* 0 */ | 11 | NI_SYSCALL /* 0 */ |
12 | SYSCALL(sys_exit,sys_exit,sys32_exit_wrapper) | 12 | SYSCALL(sys_exit,sys_exit,compat_sys_exit) |
13 | SYSCALL(sys_fork,sys_fork,sys_fork) | 13 | SYSCALL(sys_fork,sys_fork,sys_fork) |
14 | SYSCALL(sys_read,sys_read,sys32_read_wrapper) | 14 | SYSCALL(sys_read,sys_read,compat_sys_s390_read) |
15 | SYSCALL(sys_write,sys_write,sys32_write_wrapper) | 15 | SYSCALL(sys_write,sys_write,compat_sys_s390_write) |
16 | SYSCALL(sys_open,sys_open,compat_sys_open) /* 5 */ | 16 | SYSCALL(sys_open,sys_open,compat_sys_open) /* 5 */ |
17 | SYSCALL(sys_close,sys_close,sys32_close_wrapper) | 17 | SYSCALL(sys_close,sys_close,compat_sys_close) |
18 | SYSCALL(sys_restart_syscall,sys_restart_syscall,sys_restart_syscall) | 18 | SYSCALL(sys_restart_syscall,sys_restart_syscall,sys_restart_syscall) |
19 | SYSCALL(sys_creat,sys_creat,sys32_creat_wrapper) | 19 | SYSCALL(sys_creat,sys_creat,compat_sys_creat) |
20 | SYSCALL(sys_link,sys_link,sys32_link_wrapper) | 20 | SYSCALL(sys_link,sys_link,compat_sys_link) |
21 | SYSCALL(sys_unlink,sys_unlink,sys32_unlink_wrapper) /* 10 */ | 21 | SYSCALL(sys_unlink,sys_unlink,compat_sys_unlink) /* 10 */ |
22 | SYSCALL(sys_execve,sys_execve,sys32_execve_wrapper) | 22 | SYSCALL(sys_execve,sys_execve,compat_sys_execve) |
23 | SYSCALL(sys_chdir,sys_chdir,sys32_chdir_wrapper) | 23 | SYSCALL(sys_chdir,sys_chdir,compat_sys_chdir) |
24 | SYSCALL(sys_time,sys_ni_syscall,sys32_time_wrapper) /* old time syscall */ | 24 | SYSCALL(sys_time,sys_ni_syscall,compat_sys_time) /* old time syscall */ |
25 | SYSCALL(sys_mknod,sys_mknod,sys32_mknod_wrapper) | 25 | SYSCALL(sys_mknod,sys_mknod,compat_sys_mknod) |
26 | SYSCALL(sys_chmod,sys_chmod,sys32_chmod_wrapper) /* 15 */ | 26 | SYSCALL(sys_chmod,sys_chmod,compat_sys_chmod) /* 15 */ |
27 | SYSCALL(sys_lchown16,sys_ni_syscall,sys32_lchown16_wrapper) /* old lchown16 syscall*/ | 27 | SYSCALL(sys_lchown16,sys_ni_syscall,compat_sys_s390_lchown16) /* old lchown16 syscall*/ |
28 | NI_SYSCALL /* old break syscall holder */ | 28 | NI_SYSCALL /* old break syscall holder */ |
29 | NI_SYSCALL /* old stat syscall holder */ | 29 | NI_SYSCALL /* old stat syscall holder */ |
30 | SYSCALL(sys_lseek,sys_lseek,compat_sys_lseek) | 30 | SYSCALL(sys_lseek,sys_lseek,compat_sys_lseek) |
31 | SYSCALL(sys_getpid,sys_getpid,sys_getpid) /* 20 */ | 31 | SYSCALL(sys_getpid,sys_getpid,sys_getpid) /* 20 */ |
32 | SYSCALL(sys_mount,sys_mount,sys32_mount_wrapper) | 32 | SYSCALL(sys_mount,sys_mount,compat_sys_mount) |
33 | SYSCALL(sys_oldumount,sys_oldumount,sys32_oldumount_wrapper) | 33 | SYSCALL(sys_oldumount,sys_oldumount,compat_sys_oldumount) |
34 | SYSCALL(sys_setuid16,sys_ni_syscall,sys32_setuid16_wrapper) /* old setuid16 syscall*/ | 34 | SYSCALL(sys_setuid16,sys_ni_syscall,compat_sys_s390_setuid16) /* old setuid16 syscall*/ |
35 | SYSCALL(sys_getuid16,sys_ni_syscall,sys32_getuid16) /* old getuid16 syscall*/ | 35 | SYSCALL(sys_getuid16,sys_ni_syscall,compat_sys_s390_getuid16) /* old getuid16 syscall*/ |
36 | SYSCALL(sys_stime,sys_ni_syscall,sys32_stime_wrapper) /* 25 old stime syscall */ | 36 | SYSCALL(sys_stime,sys_ni_syscall,compat_sys_stime) /* 25 old stime syscall */ |
37 | SYSCALL(sys_ptrace,sys_ptrace,sys32_ptrace_wrapper) | 37 | SYSCALL(sys_ptrace,sys_ptrace,compat_sys_ptrace) |
38 | SYSCALL(sys_alarm,sys_alarm,sys32_alarm_wrapper) | 38 | SYSCALL(sys_alarm,sys_alarm,compat_sys_alarm) |
39 | NI_SYSCALL /* old fstat syscall */ | 39 | NI_SYSCALL /* old fstat syscall */ |
40 | SYSCALL(sys_pause,sys_pause,sys_pause) | 40 | SYSCALL(sys_pause,sys_pause,sys_pause) |
41 | SYSCALL(sys_utime,sys_utime,compat_sys_utime_wrapper) /* 30 */ | 41 | SYSCALL(sys_utime,sys_utime,compat_sys_utime) /* 30 */ |
42 | NI_SYSCALL /* old stty syscall */ | 42 | NI_SYSCALL /* old stty syscall */ |
43 | NI_SYSCALL /* old gtty syscall */ | 43 | NI_SYSCALL /* old gtty syscall */ |
44 | SYSCALL(sys_access,sys_access,sys32_access_wrapper) | 44 | SYSCALL(sys_access,sys_access,compat_sys_access) |
45 | SYSCALL(sys_nice,sys_nice,sys32_nice_wrapper) | 45 | SYSCALL(sys_nice,sys_nice,compat_sys_nice) |
46 | NI_SYSCALL /* 35 old ftime syscall */ | 46 | NI_SYSCALL /* 35 old ftime syscall */ |
47 | SYSCALL(sys_sync,sys_sync,sys_sync) | 47 | SYSCALL(sys_sync,sys_sync,sys_sync) |
48 | SYSCALL(sys_kill,sys_kill,sys32_kill_wrapper) | 48 | SYSCALL(sys_kill,sys_kill,compat_sys_kill) |
49 | SYSCALL(sys_rename,sys_rename,sys32_rename_wrapper) | 49 | SYSCALL(sys_rename,sys_rename,compat_sys_rename) |
50 | SYSCALL(sys_mkdir,sys_mkdir,sys32_mkdir_wrapper) | 50 | SYSCALL(sys_mkdir,sys_mkdir,compat_sys_mkdir) |
51 | SYSCALL(sys_rmdir,sys_rmdir,sys32_rmdir_wrapper) /* 40 */ | 51 | SYSCALL(sys_rmdir,sys_rmdir,compat_sys_rmdir) /* 40 */ |
52 | SYSCALL(sys_dup,sys_dup,sys32_dup_wrapper) | 52 | SYSCALL(sys_dup,sys_dup,compat_sys_dup) |
53 | SYSCALL(sys_pipe,sys_pipe,sys32_pipe_wrapper) | 53 | SYSCALL(sys_pipe,sys_pipe,compat_sys_pipe) |
54 | SYSCALL(sys_times,sys_times,compat_sys_times_wrapper) | 54 | SYSCALL(sys_times,sys_times,compat_sys_times) |
55 | NI_SYSCALL /* old prof syscall */ | 55 | NI_SYSCALL /* old prof syscall */ |
56 | SYSCALL(sys_brk,sys_brk,sys32_brk_wrapper) /* 45 */ | 56 | SYSCALL(sys_brk,sys_brk,compat_sys_brk) /* 45 */ |
57 | SYSCALL(sys_setgid16,sys_ni_syscall,sys32_setgid16_wrapper) /* old setgid16 syscall*/ | 57 | SYSCALL(sys_setgid16,sys_ni_syscall,compat_sys_s390_setgid16) /* old setgid16 syscall*/ |
58 | SYSCALL(sys_getgid16,sys_ni_syscall,sys32_getgid16) /* old getgid16 syscall*/ | 58 | SYSCALL(sys_getgid16,sys_ni_syscall,compat_sys_s390_getgid16) /* old getgid16 syscall*/ |
59 | SYSCALL(sys_signal,sys_signal,sys32_signal_wrapper) | 59 | SYSCALL(sys_signal,sys_signal,compat_sys_signal) |
60 | SYSCALL(sys_geteuid16,sys_ni_syscall,sys32_geteuid16) /* old geteuid16 syscall */ | 60 | SYSCALL(sys_geteuid16,sys_ni_syscall,compat_sys_s390_geteuid16) /* old geteuid16 syscall */ |
61 | SYSCALL(sys_getegid16,sys_ni_syscall,sys32_getegid16) /* 50 old getegid16 syscall */ | 61 | SYSCALL(sys_getegid16,sys_ni_syscall,compat_sys_s390_getegid16) /* 50 old getegid16 syscall */ |
62 | SYSCALL(sys_acct,sys_acct,sys32_acct_wrapper) | 62 | SYSCALL(sys_acct,sys_acct,compat_sys_acct) |
63 | SYSCALL(sys_umount,sys_umount,sys32_umount_wrapper) | 63 | SYSCALL(sys_umount,sys_umount,compat_sys_umount) |
64 | NI_SYSCALL /* old lock syscall */ | 64 | NI_SYSCALL /* old lock syscall */ |
65 | SYSCALL(sys_ioctl,sys_ioctl,compat_sys_ioctl_wrapper) | 65 | SYSCALL(sys_ioctl,sys_ioctl,compat_sys_ioctl) |
66 | SYSCALL(sys_fcntl,sys_fcntl,compat_sys_fcntl_wrapper) /* 55 */ | 66 | SYSCALL(sys_fcntl,sys_fcntl,compat_sys_fcntl) /* 55 */ |
67 | NI_SYSCALL /* intel mpx syscall */ | 67 | NI_SYSCALL /* intel mpx syscall */ |
68 | SYSCALL(sys_setpgid,sys_setpgid,sys32_setpgid_wrapper) | 68 | SYSCALL(sys_setpgid,sys_setpgid,compat_sys_setpgid) |
69 | NI_SYSCALL /* old ulimit syscall */ | 69 | NI_SYSCALL /* old ulimit syscall */ |
70 | NI_SYSCALL /* old uname syscall */ | 70 | NI_SYSCALL /* old uname syscall */ |
71 | SYSCALL(sys_umask,sys_umask,sys32_umask_wrapper) /* 60 */ | 71 | SYSCALL(sys_umask,sys_umask,compat_sys_umask) /* 60 */ |
72 | SYSCALL(sys_chroot,sys_chroot,sys32_chroot_wrapper) | 72 | SYSCALL(sys_chroot,sys_chroot,compat_sys_chroot) |
73 | SYSCALL(sys_ustat,sys_ustat,sys32_ustat_wrapper) | 73 | SYSCALL(sys_ustat,sys_ustat,compat_sys_ustat) |
74 | SYSCALL(sys_dup2,sys_dup2,sys32_dup2_wrapper) | 74 | SYSCALL(sys_dup2,sys_dup2,compat_sys_dup2) |
75 | SYSCALL(sys_getppid,sys_getppid,sys_getppid) | 75 | SYSCALL(sys_getppid,sys_getppid,sys_getppid) |
76 | SYSCALL(sys_getpgrp,sys_getpgrp,sys_getpgrp) /* 65 */ | 76 | SYSCALL(sys_getpgrp,sys_getpgrp,sys_getpgrp) /* 65 */ |
77 | SYSCALL(sys_setsid,sys_setsid,sys_setsid) | 77 | SYSCALL(sys_setsid,sys_setsid,sys_setsid) |
78 | SYSCALL(sys_sigaction,sys_sigaction,compat_sys_sigaction) | 78 | SYSCALL(sys_sigaction,sys_sigaction,compat_sys_sigaction) |
79 | NI_SYSCALL /* old sgetmask syscall*/ | 79 | NI_SYSCALL /* old sgetmask syscall*/ |
80 | NI_SYSCALL /* old ssetmask syscall*/ | 80 | NI_SYSCALL /* old ssetmask syscall*/ |
81 | SYSCALL(sys_setreuid16,sys_ni_syscall,sys32_setreuid16_wrapper) /* old setreuid16 syscall */ | 81 | SYSCALL(sys_setreuid16,sys_ni_syscall,compat_sys_s390_setreuid16) /* old setreuid16 syscall */ |
82 | SYSCALL(sys_setregid16,sys_ni_syscall,sys32_setregid16_wrapper) /* old setregid16 syscall */ | 82 | SYSCALL(sys_setregid16,sys_ni_syscall,compat_sys_s390_setregid16) /* old setregid16 syscall */ |
83 | SYSCALL(sys_sigsuspend,sys_sigsuspend,sys_sigsuspend_wrapper) | 83 | SYSCALL(sys_sigsuspend,sys_sigsuspend,compat_sys_sigsuspend) |
84 | SYSCALL(sys_sigpending,sys_sigpending,compat_sys_sigpending_wrapper) | 84 | SYSCALL(sys_sigpending,sys_sigpending,compat_sys_sigpending) |
85 | SYSCALL(sys_sethostname,sys_sethostname,sys32_sethostname_wrapper) | 85 | SYSCALL(sys_sethostname,sys_sethostname,compat_sys_sethostname) |
86 | SYSCALL(sys_setrlimit,sys_setrlimit,compat_sys_setrlimit_wrapper) /* 75 */ | 86 | SYSCALL(sys_setrlimit,sys_setrlimit,compat_sys_setrlimit) /* 75 */ |
87 | SYSCALL(sys_old_getrlimit,sys_getrlimit,compat_sys_old_getrlimit_wrapper) | 87 | SYSCALL(sys_old_getrlimit,sys_getrlimit,compat_sys_old_getrlimit) |
88 | SYSCALL(sys_getrusage,sys_getrusage,compat_sys_getrusage) | 88 | SYSCALL(sys_getrusage,sys_getrusage,compat_sys_getrusage) |
89 | SYSCALL(sys_gettimeofday,sys_gettimeofday,compat_sys_gettimeofday_wrapper) | 89 | SYSCALL(sys_gettimeofday,sys_gettimeofday,compat_sys_gettimeofday) |
90 | SYSCALL(sys_settimeofday,sys_settimeofday,compat_sys_settimeofday_wrapper) | 90 | SYSCALL(sys_settimeofday,sys_settimeofday,compat_sys_settimeofday) |
91 | SYSCALL(sys_getgroups16,sys_ni_syscall,sys32_getgroups16_wrapper) /* 80 old getgroups16 syscall */ | 91 | SYSCALL(sys_getgroups16,sys_ni_syscall,compat_sys_s390_getgroups16) /* 80 old getgroups16 syscall */ |
92 | SYSCALL(sys_setgroups16,sys_ni_syscall,sys32_setgroups16_wrapper) /* old setgroups16 syscall */ | 92 | SYSCALL(sys_setgroups16,sys_ni_syscall,compat_sys_s390_setgroups16) /* old setgroups16 syscall */ |
93 | NI_SYSCALL /* old select syscall */ | 93 | NI_SYSCALL /* old select syscall */ |
94 | SYSCALL(sys_symlink,sys_symlink,sys32_symlink_wrapper) | 94 | SYSCALL(sys_symlink,sys_symlink,compat_sys_symlink) |
95 | NI_SYSCALL /* old lstat syscall */ | 95 | NI_SYSCALL /* old lstat syscall */ |
96 | SYSCALL(sys_readlink,sys_readlink,sys32_readlink_wrapper) /* 85 */ | 96 | SYSCALL(sys_readlink,sys_readlink,compat_sys_readlink) /* 85 */ |
97 | SYSCALL(sys_uselib,sys_uselib,sys32_uselib_wrapper) | 97 | SYSCALL(sys_uselib,sys_uselib,compat_sys_uselib) |
98 | SYSCALL(sys_swapon,sys_swapon,sys32_swapon_wrapper) | 98 | SYSCALL(sys_swapon,sys_swapon,compat_sys_swapon) |
99 | SYSCALL(sys_reboot,sys_reboot,sys32_reboot_wrapper) | 99 | SYSCALL(sys_reboot,sys_reboot,compat_sys_reboot) |
100 | SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper) /* old readdir syscall */ | 100 | SYSCALL(sys_ni_syscall,sys_ni_syscall,compat_sys_old_readdir) /* old readdir syscall */ |
101 | SYSCALL(sys_old_mmap,sys_old_mmap,old32_mmap_wrapper) /* 90 */ | 101 | SYSCALL(sys_old_mmap,sys_old_mmap,compat_sys_s390_old_mmap) /* 90 */ |
102 | SYSCALL(sys_munmap,sys_munmap,sys32_munmap_wrapper) | 102 | SYSCALL(sys_munmap,sys_munmap,compat_sys_munmap) |
103 | SYSCALL(sys_truncate,sys_truncate,compat_sys_truncate) | 103 | SYSCALL(sys_truncate,sys_truncate,compat_sys_truncate) |
104 | SYSCALL(sys_ftruncate,sys_ftruncate,compat_sys_ftruncate) | 104 | SYSCALL(sys_ftruncate,sys_ftruncate,compat_sys_ftruncate) |
105 | SYSCALL(sys_fchmod,sys_fchmod,sys32_fchmod_wrapper) | 105 | SYSCALL(sys_fchmod,sys_fchmod,compat_sys_fchmod) |
106 | SYSCALL(sys_fchown16,sys_ni_syscall,sys32_fchown16_wrapper) /* 95 old fchown16 syscall*/ | 106 | SYSCALL(sys_fchown16,sys_ni_syscall,compat_sys_s390_fchown16) /* 95 old fchown16 syscall*/ |
107 | SYSCALL(sys_getpriority,sys_getpriority,sys32_getpriority_wrapper) | 107 | SYSCALL(sys_getpriority,sys_getpriority,compat_sys_getpriority) |
108 | SYSCALL(sys_setpriority,sys_setpriority,sys32_setpriority_wrapper) | 108 | SYSCALL(sys_setpriority,sys_setpriority,compat_sys_setpriority) |
109 | NI_SYSCALL /* old profil syscall */ | 109 | NI_SYSCALL /* old profil syscall */ |
110 | SYSCALL(sys_statfs,sys_statfs,compat_sys_statfs_wrapper) | 110 | SYSCALL(sys_statfs,sys_statfs,compat_sys_statfs) |
111 | SYSCALL(sys_fstatfs,sys_fstatfs,compat_sys_fstatfs_wrapper) /* 100 */ | 111 | SYSCALL(sys_fstatfs,sys_fstatfs,compat_sys_fstatfs) /* 100 */ |
112 | NI_SYSCALL /* ioperm for i386 */ | 112 | NI_SYSCALL /* ioperm for i386 */ |
113 | SYSCALL(sys_socketcall,sys_socketcall,compat_sys_socketcall_wrapper) | 113 | SYSCALL(sys_socketcall,sys_socketcall,compat_sys_socketcall) |
114 | SYSCALL(sys_syslog,sys_syslog,sys32_syslog_wrapper) | 114 | SYSCALL(sys_syslog,sys_syslog,compat_sys_syslog) |
115 | SYSCALL(sys_setitimer,sys_setitimer,compat_sys_setitimer) | 115 | SYSCALL(sys_setitimer,sys_setitimer,compat_sys_setitimer) |
116 | SYSCALL(sys_getitimer,sys_getitimer,compat_sys_getitimer) /* 105 */ | 116 | SYSCALL(sys_getitimer,sys_getitimer,compat_sys_getitimer) /* 105 */ |
117 | SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat_wrapper) | 117 | SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat) |
118 | SYSCALL(sys_newlstat,sys_newlstat,compat_sys_newlstat_wrapper) | 118 | SYSCALL(sys_newlstat,sys_newlstat,compat_sys_newlstat) |
119 | SYSCALL(sys_newfstat,sys_newfstat,compat_sys_newfstat_wrapper) | 119 | SYSCALL(sys_newfstat,sys_newfstat,compat_sys_newfstat) |
120 | NI_SYSCALL /* old uname syscall */ | 120 | NI_SYSCALL /* old uname syscall */ |
121 | SYSCALL(sys_lookup_dcookie,sys_lookup_dcookie,compat_sys_lookup_dcookie) /* 110 */ | 121 | SYSCALL(sys_lookup_dcookie,sys_lookup_dcookie,compat_sys_lookup_dcookie) /* 110 */ |
122 | SYSCALL(sys_vhangup,sys_vhangup,sys_vhangup) | 122 | SYSCALL(sys_vhangup,sys_vhangup,sys_vhangup) |
123 | NI_SYSCALL /* old "idle" system call */ | 123 | NI_SYSCALL /* old "idle" system call */ |
124 | NI_SYSCALL /* vm86old for i386 */ | 124 | NI_SYSCALL /* vm86old for i386 */ |
125 | SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4) | 125 | SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4) |
126 | SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */ | 126 | SYSCALL(sys_swapoff,sys_swapoff,compat_sys_swapoff) /* 115 */ |
127 | SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) | 127 | SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo) |
128 | SYSCALL(sys_s390_ipc,sys_s390_ipc,compat_sys_s390_ipc) | 128 | SYSCALL(sys_s390_ipc,sys_s390_ipc,compat_sys_s390_ipc) |
129 | SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) | 129 | SYSCALL(sys_fsync,sys_fsync,compat_sys_fsync) |
130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) | 130 | SYSCALL(sys_sigreturn,sys_sigreturn,compat_sys_sigreturn) |
131 | SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */ | 131 | SYSCALL(sys_clone,sys_clone,compat_sys_clone) /* 120 */ |
132 | SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) | 132 | SYSCALL(sys_setdomainname,sys_setdomainname,compat_sys_setdomainname) |
133 | SYSCALL(sys_newuname,sys_newuname,sys32_newuname_wrapper) | 133 | SYSCALL(sys_newuname,sys_newuname,compat_sys_newuname) |
134 | NI_SYSCALL /* modify_ldt for i386 */ | 134 | NI_SYSCALL /* modify_ldt for i386 */ |
135 | SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) | 135 | SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex) |
136 | SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ | 136 | SYSCALL(sys_mprotect,sys_mprotect,compat_sys_mprotect) /* 125 */ |
137 | SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask) | 137 | SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask) |
138 | NI_SYSCALL /* old "create module" */ | 138 | NI_SYSCALL /* old "create module" */ |
139 | SYSCALL(sys_init_module,sys_init_module,sys_init_module_wrapper) | 139 | SYSCALL(sys_init_module,sys_init_module,compat_sys_init_module) |
140 | SYSCALL(sys_delete_module,sys_delete_module,sys_delete_module_wrapper) | 140 | SYSCALL(sys_delete_module,sys_delete_module,compat_sys_delete_module) |
141 | NI_SYSCALL /* 130: old get_kernel_syms */ | 141 | NI_SYSCALL /* 130: old get_kernel_syms */ |
142 | SYSCALL(sys_quotactl,sys_quotactl,sys32_quotactl_wrapper) | 142 | SYSCALL(sys_quotactl,sys_quotactl,compat_sys_quotactl) |
143 | SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper) | 143 | SYSCALL(sys_getpgid,sys_getpgid,compat_sys_getpgid) |
144 | SYSCALL(sys_fchdir,sys_fchdir,sys32_fchdir_wrapper) | 144 | SYSCALL(sys_fchdir,sys_fchdir,compat_sys_fchdir) |
145 | SYSCALL(sys_bdflush,sys_bdflush,sys32_bdflush_wrapper) | 145 | SYSCALL(sys_bdflush,sys_bdflush,compat_sys_bdflush) |
146 | SYSCALL(sys_sysfs,sys_sysfs,sys32_sysfs_wrapper) /* 135 */ | 146 | SYSCALL(sys_sysfs,sys_sysfs,compat_sys_sysfs) /* 135 */ |
147 | SYSCALL(sys_personality,sys_s390_personality,sys32_personality_wrapper) | 147 | SYSCALL(sys_personality,sys_s390_personality,compat_sys_s390_personality) |
148 | NI_SYSCALL /* for afs_syscall */ | 148 | NI_SYSCALL /* for afs_syscall */ |
149 | SYSCALL(sys_setfsuid16,sys_ni_syscall,sys32_setfsuid16_wrapper) /* old setfsuid16 syscall */ | 149 | SYSCALL(sys_setfsuid16,sys_ni_syscall,compat_sys_s390_setfsuid16) /* old setfsuid16 syscall */ |
150 | SYSCALL(sys_setfsgid16,sys_ni_syscall,sys32_setfsgid16_wrapper) /* old setfsgid16 syscall */ | 150 | SYSCALL(sys_setfsgid16,sys_ni_syscall,compat_sys_s390_setfsgid16) /* old setfsgid16 syscall */ |
151 | SYSCALL(sys_llseek,sys_llseek,sys32_llseek_wrapper) /* 140 */ | 151 | SYSCALL(sys_llseek,sys_llseek,compat_sys_llseek) /* 140 */ |
152 | SYSCALL(sys_getdents,sys_getdents,sys32_getdents_wrapper) | 152 | SYSCALL(sys_getdents,sys_getdents,compat_sys_getdents) |
153 | SYSCALL(sys_select,sys_select,compat_sys_select_wrapper) | 153 | SYSCALL(sys_select,sys_select,compat_sys_select) |
154 | SYSCALL(sys_flock,sys_flock,sys32_flock_wrapper) | 154 | SYSCALL(sys_flock,sys_flock,compat_sys_flock) |
155 | SYSCALL(sys_msync,sys_msync,sys32_msync_wrapper) | 155 | SYSCALL(sys_msync,sys_msync,compat_sys_msync) |
156 | SYSCALL(sys_readv,sys_readv,compat_sys_readv_wrapper) /* 145 */ | 156 | SYSCALL(sys_readv,sys_readv,compat_sys_readv) /* 145 */ |
157 | SYSCALL(sys_writev,sys_writev,compat_sys_writev_wrapper) | 157 | SYSCALL(sys_writev,sys_writev,compat_sys_writev) |
158 | SYSCALL(sys_getsid,sys_getsid,sys32_getsid_wrapper) | 158 | SYSCALL(sys_getsid,sys_getsid,compat_sys_getsid) |
159 | SYSCALL(sys_fdatasync,sys_fdatasync,sys32_fdatasync_wrapper) | 159 | SYSCALL(sys_fdatasync,sys_fdatasync,compat_sys_fdatasync) |
160 | SYSCALL(sys_sysctl,sys_sysctl,compat_sys_sysctl) | 160 | SYSCALL(sys_sysctl,sys_sysctl,compat_sys_sysctl) |
161 | SYSCALL(sys_mlock,sys_mlock,sys32_mlock_wrapper) /* 150 */ | 161 | SYSCALL(sys_mlock,sys_mlock,compat_sys_mlock) /* 150 */ |
162 | SYSCALL(sys_munlock,sys_munlock,sys32_munlock_wrapper) | 162 | SYSCALL(sys_munlock,sys_munlock,compat_sys_munlock) |
163 | SYSCALL(sys_mlockall,sys_mlockall,sys32_mlockall_wrapper) | 163 | SYSCALL(sys_mlockall,sys_mlockall,compat_sys_mlockall) |
164 | SYSCALL(sys_munlockall,sys_munlockall,sys_munlockall) | 164 | SYSCALL(sys_munlockall,sys_munlockall,sys_munlockall) |
165 | SYSCALL(sys_sched_setparam,sys_sched_setparam,sys32_sched_setparam_wrapper) | 165 | SYSCALL(sys_sched_setparam,sys_sched_setparam,compat_sys_sched_setparam) |
166 | SYSCALL(sys_sched_getparam,sys_sched_getparam,sys32_sched_getparam_wrapper) /* 155 */ | 166 | SYSCALL(sys_sched_getparam,sys_sched_getparam,compat_sys_sched_getparam) /* 155 */ |
167 | SYSCALL(sys_sched_setscheduler,sys_sched_setscheduler,sys32_sched_setscheduler_wrapper) | 167 | SYSCALL(sys_sched_setscheduler,sys_sched_setscheduler,compat_sys_sched_setscheduler) |
168 | SYSCALL(sys_sched_getscheduler,sys_sched_getscheduler,sys32_sched_getscheduler_wrapper) | 168 | SYSCALL(sys_sched_getscheduler,sys_sched_getscheduler,compat_sys_sched_getscheduler) |
169 | SYSCALL(sys_sched_yield,sys_sched_yield,sys_sched_yield) | 169 | SYSCALL(sys_sched_yield,sys_sched_yield,sys_sched_yield) |
170 | SYSCALL(sys_sched_get_priority_max,sys_sched_get_priority_max,sys32_sched_get_priority_max_wrapper) | 170 | SYSCALL(sys_sched_get_priority_max,sys_sched_get_priority_max,compat_sys_sched_get_priority_max) |
171 | SYSCALL(sys_sched_get_priority_min,sys_sched_get_priority_min,sys32_sched_get_priority_min_wrapper) /* 160 */ | 171 | SYSCALL(sys_sched_get_priority_min,sys_sched_get_priority_min,compat_sys_sched_get_priority_min) /* 160 */ |
172 | SYSCALL(sys_sched_rr_get_interval,sys_sched_rr_get_interval,compat_sys_sched_rr_get_interval) | 172 | SYSCALL(sys_sched_rr_get_interval,sys_sched_rr_get_interval,compat_sys_sched_rr_get_interval) |
173 | SYSCALL(sys_nanosleep,sys_nanosleep,compat_sys_nanosleep_wrapper) | 173 | SYSCALL(sys_nanosleep,sys_nanosleep,compat_sys_nanosleep) |
174 | SYSCALL(sys_mremap,sys_mremap,sys32_mremap_wrapper) | 174 | SYSCALL(sys_mremap,sys_mremap,compat_sys_mremap) |
175 | SYSCALL(sys_setresuid16,sys_ni_syscall,sys32_setresuid16_wrapper) /* old setresuid16 syscall */ | 175 | SYSCALL(sys_setresuid16,sys_ni_syscall,compat_sys_s390_setresuid16) /* old setresuid16 syscall */ |
176 | SYSCALL(sys_getresuid16,sys_ni_syscall,sys32_getresuid16_wrapper) /* 165 old getresuid16 syscall */ | 176 | SYSCALL(sys_getresuid16,sys_ni_syscall,compat_sys_s390_getresuid16) /* 165 old getresuid16 syscall */ |
177 | NI_SYSCALL /* for vm86 */ | 177 | NI_SYSCALL /* for vm86 */ |
178 | NI_SYSCALL /* old sys_query_module */ | 178 | NI_SYSCALL /* old sys_query_module */ |
179 | SYSCALL(sys_poll,sys_poll,sys32_poll_wrapper) | 179 | SYSCALL(sys_poll,sys_poll,compat_sys_poll) |
180 | NI_SYSCALL /* old nfsservctl */ | 180 | NI_SYSCALL /* old nfsservctl */ |
181 | SYSCALL(sys_setresgid16,sys_ni_syscall,sys32_setresgid16_wrapper) /* 170 old setresgid16 syscall */ | 181 | SYSCALL(sys_setresgid16,sys_ni_syscall,compat_sys_s390_setresgid16) /* 170 old setresgid16 syscall */ |
182 | SYSCALL(sys_getresgid16,sys_ni_syscall,sys32_getresgid16_wrapper) /* old getresgid16 syscall */ | 182 | SYSCALL(sys_getresgid16,sys_ni_syscall,compat_sys_s390_getresgid16) /* old getresgid16 syscall */ |
183 | SYSCALL(sys_prctl,sys_prctl,sys32_prctl_wrapper) | 183 | SYSCALL(sys_prctl,sys_prctl,compat_sys_prctl) |
184 | SYSCALL(sys_rt_sigreturn,sys_rt_sigreturn,sys32_rt_sigreturn) | 184 | SYSCALL(sys_rt_sigreturn,sys_rt_sigreturn,compat_sys_rt_sigreturn) |
185 | SYSCALL(sys_rt_sigaction,sys_rt_sigaction,compat_sys_rt_sigaction) | 185 | SYSCALL(sys_rt_sigaction,sys_rt_sigaction,compat_sys_rt_sigaction) |
186 | SYSCALL(sys_rt_sigprocmask,sys_rt_sigprocmask,compat_sys_rt_sigprocmask) /* 175 */ | 186 | SYSCALL(sys_rt_sigprocmask,sys_rt_sigprocmask,compat_sys_rt_sigprocmask) /* 175 */ |
187 | SYSCALL(sys_rt_sigpending,sys_rt_sigpending,compat_sys_rt_sigpending) | 187 | SYSCALL(sys_rt_sigpending,sys_rt_sigpending,compat_sys_rt_sigpending) |
188 | SYSCALL(sys_rt_sigtimedwait,sys_rt_sigtimedwait,compat_sys_rt_sigtimedwait) | 188 | SYSCALL(sys_rt_sigtimedwait,sys_rt_sigtimedwait,compat_sys_rt_sigtimedwait) |
189 | SYSCALL(sys_rt_sigqueueinfo,sys_rt_sigqueueinfo,compat_sys_rt_sigqueueinfo) | 189 | SYSCALL(sys_rt_sigqueueinfo,sys_rt_sigqueueinfo,compat_sys_rt_sigqueueinfo) |
190 | SYSCALL(sys_rt_sigsuspend,sys_rt_sigsuspend,compat_sys_rt_sigsuspend) | 190 | SYSCALL(sys_rt_sigsuspend,sys_rt_sigsuspend,compat_sys_rt_sigsuspend) |
191 | SYSCALL(sys_pread64,sys_pread64,sys32_pread64_wrapper) /* 180 */ | 191 | SYSCALL(sys_pread64,sys_pread64,compat_sys_s390_pread64) /* 180 */ |
192 | SYSCALL(sys_pwrite64,sys_pwrite64,sys32_pwrite64_wrapper) | 192 | SYSCALL(sys_pwrite64,sys_pwrite64,compat_sys_s390_pwrite64) |
193 | SYSCALL(sys_chown16,sys_ni_syscall,sys32_chown16_wrapper) /* old chown16 syscall */ | 193 | SYSCALL(sys_chown16,sys_ni_syscall,compat_sys_s390_chown16) /* old chown16 syscall */ |
194 | SYSCALL(sys_getcwd,sys_getcwd,sys32_getcwd_wrapper) | 194 | SYSCALL(sys_getcwd,sys_getcwd,compat_sys_getcwd) |
195 | SYSCALL(sys_capget,sys_capget,sys32_capget_wrapper) | 195 | SYSCALL(sys_capget,sys_capget,compat_sys_capget) |
196 | SYSCALL(sys_capset,sys_capset,sys32_capset_wrapper) /* 185 */ | 196 | SYSCALL(sys_capset,sys_capset,compat_sys_capset) /* 185 */ |
197 | SYSCALL(sys_sigaltstack,sys_sigaltstack,compat_sys_sigaltstack) | 197 | SYSCALL(sys_sigaltstack,sys_sigaltstack,compat_sys_sigaltstack) |
198 | SYSCALL(sys_sendfile,sys_sendfile64,compat_sys_sendfile) | 198 | SYSCALL(sys_sendfile,sys_sendfile64,compat_sys_sendfile) |
199 | NI_SYSCALL /* streams1 */ | 199 | NI_SYSCALL /* streams1 */ |
200 | NI_SYSCALL /* streams2 */ | 200 | NI_SYSCALL /* streams2 */ |
201 | SYSCALL(sys_vfork,sys_vfork,sys_vfork) /* 190 */ | 201 | SYSCALL(sys_vfork,sys_vfork,sys_vfork) /* 190 */ |
202 | SYSCALL(sys_getrlimit,sys_getrlimit,compat_sys_getrlimit_wrapper) | 202 | SYSCALL(sys_getrlimit,sys_getrlimit,compat_sys_getrlimit) |
203 | SYSCALL(sys_mmap2,sys_mmap2,sys32_mmap2_wrapper) | 203 | SYSCALL(sys_mmap2,sys_mmap2,compat_sys_s390_mmap2) |
204 | SYSCALL(sys_truncate64,sys_ni_syscall,sys32_truncate64_wrapper) | 204 | SYSCALL(sys_truncate64,sys_ni_syscall,compat_sys_s390_truncate64) |
205 | SYSCALL(sys_ftruncate64,sys_ni_syscall,sys32_ftruncate64_wrapper) | 205 | SYSCALL(sys_ftruncate64,sys_ni_syscall,compat_sys_s390_ftruncate64) |
206 | SYSCALL(sys_stat64,sys_ni_syscall,sys32_stat64_wrapper) /* 195 */ | 206 | SYSCALL(sys_stat64,sys_ni_syscall,compat_sys_s390_stat64) /* 195 */ |
207 | SYSCALL(sys_lstat64,sys_ni_syscall,sys32_lstat64_wrapper) | 207 | SYSCALL(sys_lstat64,sys_ni_syscall,compat_sys_s390_lstat64) |
208 | SYSCALL(sys_fstat64,sys_ni_syscall,sys32_fstat64_wrapper) | 208 | SYSCALL(sys_fstat64,sys_ni_syscall,compat_sys_s390_fstat64) |
209 | SYSCALL(sys_lchown,sys_lchown,sys32_lchown_wrapper) | 209 | SYSCALL(sys_lchown,sys_lchown,compat_sys_lchown) |
210 | SYSCALL(sys_getuid,sys_getuid,sys_getuid) | 210 | SYSCALL(sys_getuid,sys_getuid,sys_getuid) |
211 | SYSCALL(sys_getgid,sys_getgid,sys_getgid) /* 200 */ | 211 | SYSCALL(sys_getgid,sys_getgid,sys_getgid) /* 200 */ |
212 | SYSCALL(sys_geteuid,sys_geteuid,sys_geteuid) | 212 | SYSCALL(sys_geteuid,sys_geteuid,sys_geteuid) |
213 | SYSCALL(sys_getegid,sys_getegid,sys_getegid) | 213 | SYSCALL(sys_getegid,sys_getegid,sys_getegid) |
214 | SYSCALL(sys_setreuid,sys_setreuid,sys32_setreuid_wrapper) | 214 | SYSCALL(sys_setreuid,sys_setreuid,compat_sys_setreuid) |
215 | SYSCALL(sys_setregid,sys_setregid,sys32_setregid_wrapper) | 215 | SYSCALL(sys_setregid,sys_setregid,compat_sys_setregid) |
216 | SYSCALL(sys_getgroups,sys_getgroups,sys32_getgroups_wrapper) /* 205 */ | 216 | SYSCALL(sys_getgroups,sys_getgroups,compat_sys_getgroups) /* 205 */ |
217 | SYSCALL(sys_setgroups,sys_setgroups,sys32_setgroups_wrapper) | 217 | SYSCALL(sys_setgroups,sys_setgroups,compat_sys_setgroups) |
218 | SYSCALL(sys_fchown,sys_fchown,sys32_fchown_wrapper) | 218 | SYSCALL(sys_fchown,sys_fchown,compat_sys_fchown) |
219 | SYSCALL(sys_setresuid,sys_setresuid,sys32_setresuid_wrapper) | 219 | SYSCALL(sys_setresuid,sys_setresuid,compat_sys_setresuid) |
220 | SYSCALL(sys_getresuid,sys_getresuid,sys32_getresuid_wrapper) | 220 | SYSCALL(sys_getresuid,sys_getresuid,compat_sys_getresuid) |
221 | SYSCALL(sys_setresgid,sys_setresgid,sys32_setresgid_wrapper) /* 210 */ | 221 | SYSCALL(sys_setresgid,sys_setresgid,compat_sys_setresgid) /* 210 */ |
222 | SYSCALL(sys_getresgid,sys_getresgid,sys32_getresgid_wrapper) | 222 | SYSCALL(sys_getresgid,sys_getresgid,compat_sys_getresgid) |
223 | SYSCALL(sys_chown,sys_chown,sys32_chown_wrapper) | 223 | SYSCALL(sys_chown,sys_chown,compat_sys_chown) |
224 | SYSCALL(sys_setuid,sys_setuid,sys32_setuid_wrapper) | 224 | SYSCALL(sys_setuid,sys_setuid,compat_sys_setuid) |
225 | SYSCALL(sys_setgid,sys_setgid,sys32_setgid_wrapper) | 225 | SYSCALL(sys_setgid,sys_setgid,compat_sys_setgid) |
226 | SYSCALL(sys_setfsuid,sys_setfsuid,sys32_setfsuid_wrapper) /* 215 */ | 226 | SYSCALL(sys_setfsuid,sys_setfsuid,compat_sys_setfsuid) /* 215 */ |
227 | SYSCALL(sys_setfsgid,sys_setfsgid,sys32_setfsgid_wrapper) | 227 | SYSCALL(sys_setfsgid,sys_setfsgid,compat_sys_setfsgid) |
228 | SYSCALL(sys_pivot_root,sys_pivot_root,sys32_pivot_root_wrapper) | 228 | SYSCALL(sys_pivot_root,sys_pivot_root,compat_sys_pivot_root) |
229 | SYSCALL(sys_mincore,sys_mincore,sys32_mincore_wrapper) | 229 | SYSCALL(sys_mincore,sys_mincore,compat_sys_mincore) |
230 | SYSCALL(sys_madvise,sys_madvise,sys32_madvise_wrapper) | 230 | SYSCALL(sys_madvise,sys_madvise,compat_sys_madvise) |
231 | SYSCALL(sys_getdents64,sys_getdents64,sys32_getdents64_wrapper) /* 220 */ | 231 | SYSCALL(sys_getdents64,sys_getdents64,compat_sys_getdents64) /* 220 */ |
232 | SYSCALL(sys_fcntl64,sys_ni_syscall,compat_sys_fcntl64_wrapper) | 232 | SYSCALL(sys_fcntl64,sys_ni_syscall,compat_sys_fcntl64) |
233 | SYSCALL(sys_readahead,sys_readahead,sys32_readahead_wrapper) | 233 | SYSCALL(sys_readahead,sys_readahead,compat_sys_s390_readahead) |
234 | SYSCALL(sys_sendfile64,sys_ni_syscall,compat_sys_sendfile64) | 234 | SYSCALL(sys_sendfile64,sys_ni_syscall,compat_sys_sendfile64) |
235 | SYSCALL(sys_setxattr,sys_setxattr,sys32_setxattr_wrapper) | 235 | SYSCALL(sys_setxattr,sys_setxattr,compat_sys_setxattr) |
236 | SYSCALL(sys_lsetxattr,sys_lsetxattr,sys32_lsetxattr_wrapper) /* 225 */ | 236 | SYSCALL(sys_lsetxattr,sys_lsetxattr,compat_sys_lsetxattr) /* 225 */ |
237 | SYSCALL(sys_fsetxattr,sys_fsetxattr,sys32_fsetxattr_wrapper) | 237 | SYSCALL(sys_fsetxattr,sys_fsetxattr,compat_sys_fsetxattr) |
238 | SYSCALL(sys_getxattr,sys_getxattr,sys32_getxattr_wrapper) | 238 | SYSCALL(sys_getxattr,sys_getxattr,compat_sys_getxattr) |
239 | SYSCALL(sys_lgetxattr,sys_lgetxattr,sys32_lgetxattr_wrapper) | 239 | SYSCALL(sys_lgetxattr,sys_lgetxattr,compat_sys_lgetxattr) |
240 | SYSCALL(sys_fgetxattr,sys_fgetxattr,sys32_fgetxattr_wrapper) | 240 | SYSCALL(sys_fgetxattr,sys_fgetxattr,compat_sys_fgetxattr) |
241 | SYSCALL(sys_listxattr,sys_listxattr,sys32_listxattr_wrapper) /* 230 */ | 241 | SYSCALL(sys_listxattr,sys_listxattr,compat_sys_listxattr) /* 230 */ |
242 | SYSCALL(sys_llistxattr,sys_llistxattr,sys32_llistxattr_wrapper) | 242 | SYSCALL(sys_llistxattr,sys_llistxattr,compat_sys_llistxattr) |
243 | SYSCALL(sys_flistxattr,sys_flistxattr,sys32_flistxattr_wrapper) | 243 | SYSCALL(sys_flistxattr,sys_flistxattr,compat_sys_flistxattr) |
244 | SYSCALL(sys_removexattr,sys_removexattr,sys32_removexattr_wrapper) | 244 | SYSCALL(sys_removexattr,sys_removexattr,compat_sys_removexattr) |
245 | SYSCALL(sys_lremovexattr,sys_lremovexattr,sys32_lremovexattr_wrapper) | 245 | SYSCALL(sys_lremovexattr,sys_lremovexattr,compat_sys_lremovexattr) |
246 | SYSCALL(sys_fremovexattr,sys_fremovexattr,sys32_fremovexattr_wrapper) /* 235 */ | 246 | SYSCALL(sys_fremovexattr,sys_fremovexattr,compat_sys_fremovexattr) /* 235 */ |
247 | SYSCALL(sys_gettid,sys_gettid,sys_gettid) | 247 | SYSCALL(sys_gettid,sys_gettid,sys_gettid) |
248 | SYSCALL(sys_tkill,sys_tkill,sys_tkill_wrapper) | 248 | SYSCALL(sys_tkill,sys_tkill,compat_sys_tkill) |
249 | SYSCALL(sys_futex,sys_futex,compat_sys_futex) | 249 | SYSCALL(sys_futex,sys_futex,compat_sys_futex) |
250 | SYSCALL(sys_sched_setaffinity,sys_sched_setaffinity,sys32_sched_setaffinity_wrapper) | 250 | SYSCALL(sys_sched_setaffinity,sys_sched_setaffinity,compat_sys_sched_setaffinity) |
251 | SYSCALL(sys_sched_getaffinity,sys_sched_getaffinity,sys32_sched_getaffinity_wrapper) /* 240 */ | 251 | SYSCALL(sys_sched_getaffinity,sys_sched_getaffinity,compat_sys_sched_getaffinity) /* 240 */ |
252 | SYSCALL(sys_tgkill,sys_tgkill,sys_tgkill_wrapper) | 252 | SYSCALL(sys_tgkill,sys_tgkill,compat_sys_tgkill) |
253 | NI_SYSCALL /* reserved for TUX */ | 253 | NI_SYSCALL /* reserved for TUX */ |
254 | SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper) | 254 | SYSCALL(sys_io_setup,sys_io_setup,compat_sys_io_setup) |
255 | SYSCALL(sys_io_destroy,sys_io_destroy,sys32_io_destroy_wrapper) | 255 | SYSCALL(sys_io_destroy,sys_io_destroy,compat_sys_io_destroy) |
256 | SYSCALL(sys_io_getevents,sys_io_getevents,sys32_io_getevents_wrapper) /* 245 */ | 256 | SYSCALL(sys_io_getevents,sys_io_getevents,compat_sys_io_getevents) /* 245 */ |
257 | SYSCALL(sys_io_submit,sys_io_submit,sys32_io_submit_wrapper) | 257 | SYSCALL(sys_io_submit,sys_io_submit,compat_sys_io_submit) |
258 | SYSCALL(sys_io_cancel,sys_io_cancel,sys32_io_cancel_wrapper) | 258 | SYSCALL(sys_io_cancel,sys_io_cancel,compat_sys_io_cancel) |
259 | SYSCALL(sys_exit_group,sys_exit_group,sys32_exit_group_wrapper) | 259 | SYSCALL(sys_exit_group,sys_exit_group,compat_sys_exit_group) |
260 | SYSCALL(sys_epoll_create,sys_epoll_create,sys_epoll_create_wrapper) | 260 | SYSCALL(sys_epoll_create,sys_epoll_create,compat_sys_epoll_create) |
261 | SYSCALL(sys_epoll_ctl,sys_epoll_ctl,sys_epoll_ctl_wrapper) /* 250 */ | 261 | SYSCALL(sys_epoll_ctl,sys_epoll_ctl,compat_sys_epoll_ctl) /* 250 */ |
262 | SYSCALL(sys_epoll_wait,sys_epoll_wait,sys_epoll_wait_wrapper) | 262 | SYSCALL(sys_epoll_wait,sys_epoll_wait,compat_sys_epoll_wait) |
263 | SYSCALL(sys_set_tid_address,sys_set_tid_address,sys32_set_tid_address_wrapper) | 263 | SYSCALL(sys_set_tid_address,sys_set_tid_address,compat_sys_set_tid_address) |
264 | SYSCALL(sys_s390_fadvise64,sys_fadvise64_64,sys32_fadvise64_wrapper) | 264 | SYSCALL(sys_s390_fadvise64,sys_fadvise64_64,compat_sys_s390_fadvise64) |
265 | SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper) | 265 | SYSCALL(sys_timer_create,sys_timer_create,compat_sys_timer_create) |
266 | SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper) /* 255 */ | 266 | SYSCALL(sys_timer_settime,sys_timer_settime,compat_sys_timer_settime) /* 255 */ |
267 | SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper) | 267 | SYSCALL(sys_timer_gettime,sys_timer_gettime,compat_sys_timer_gettime) |
268 | SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun,sys32_timer_getoverrun_wrapper) | 268 | SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun,compat_sys_timer_getoverrun) |
269 | SYSCALL(sys_timer_delete,sys_timer_delete,sys32_timer_delete_wrapper) | 269 | SYSCALL(sys_timer_delete,sys_timer_delete,compat_sys_timer_delete) |
270 | SYSCALL(sys_clock_settime,sys_clock_settime,sys32_clock_settime_wrapper) | 270 | SYSCALL(sys_clock_settime,sys_clock_settime,compat_sys_clock_settime) |
271 | SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 */ | 271 | SYSCALL(sys_clock_gettime,sys_clock_gettime,compat_sys_clock_gettime) /* 260 */ |
272 | SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper) | 272 | SYSCALL(sys_clock_getres,sys_clock_getres,compat_sys_clock_getres) |
273 | SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper) | 273 | SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,compat_sys_clock_nanosleep) |
274 | NI_SYSCALL /* reserved for vserver */ | 274 | NI_SYSCALL /* reserved for vserver */ |
275 | SYSCALL(sys_s390_fadvise64_64,sys_ni_syscall,sys32_fadvise64_64_wrapper) | 275 | SYSCALL(sys_s390_fadvise64_64,sys_ni_syscall,compat_sys_s390_fadvise64_64) |
276 | SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper) | 276 | SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64) |
277 | SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper) | 277 | SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64) |
278 | SYSCALL(sys_remap_file_pages,sys_remap_file_pages,sys32_remap_file_pages_wrapper) | 278 | SYSCALL(sys_remap_file_pages,sys_remap_file_pages,compat_sys_remap_file_pages) |
279 | NI_SYSCALL /* 268 sys_mbind */ | 279 | NI_SYSCALL /* 268 sys_mbind */ |
280 | NI_SYSCALL /* 269 sys_get_mempolicy */ | 280 | NI_SYSCALL /* 269 sys_get_mempolicy */ |
281 | NI_SYSCALL /* 270 sys_set_mempolicy */ | 281 | NI_SYSCALL /* 270 sys_set_mempolicy */ |
282 | SYSCALL(sys_mq_open,sys_mq_open,compat_sys_mq_open_wrapper) | 282 | SYSCALL(sys_mq_open,sys_mq_open,compat_sys_mq_open) |
283 | SYSCALL(sys_mq_unlink,sys_mq_unlink,sys32_mq_unlink_wrapper) | 283 | SYSCALL(sys_mq_unlink,sys_mq_unlink,compat_sys_mq_unlink) |
284 | SYSCALL(sys_mq_timedsend,sys_mq_timedsend,compat_sys_mq_timedsend_wrapper) | 284 | SYSCALL(sys_mq_timedsend,sys_mq_timedsend,compat_sys_mq_timedsend) |
285 | SYSCALL(sys_mq_timedreceive,sys_mq_timedreceive,compat_sys_mq_timedreceive_wrapper) | 285 | SYSCALL(sys_mq_timedreceive,sys_mq_timedreceive,compat_sys_mq_timedreceive) |
286 | SYSCALL(sys_mq_notify,sys_mq_notify,compat_sys_mq_notify_wrapper) /* 275 */ | 286 | SYSCALL(sys_mq_notify,sys_mq_notify,compat_sys_mq_notify) /* 275 */ |
287 | SYSCALL(sys_mq_getsetattr,sys_mq_getsetattr,compat_sys_mq_getsetattr_wrapper) | 287 | SYSCALL(sys_mq_getsetattr,sys_mq_getsetattr,compat_sys_mq_getsetattr) |
288 | SYSCALL(sys_kexec_load,sys_kexec_load,compat_sys_kexec_load_wrapper) | 288 | SYSCALL(sys_kexec_load,sys_kexec_load,compat_sys_kexec_load) |
289 | SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key_wrapper) | 289 | SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key) |
290 | SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper) | 290 | SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key) |
291 | SYSCALL(sys_keyctl,sys_keyctl,compat_sys_keyctl_wrapper) /* 280 */ | 291 | SYSCALL(sys_keyctl,sys_keyctl,compat_sys_keyctl) /* 280 */ |
292 | SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid) | 292 | SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid) |
293 | SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper) | 293 | SYSCALL(sys_ioprio_set,sys_ioprio_set,compat_sys_ioprio_set) |
294 | SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper) | 294 | SYSCALL(sys_ioprio_get,sys_ioprio_get,compat_sys_ioprio_get) |
295 | SYSCALL(sys_inotify_init,sys_inotify_init,sys_inotify_init) | 295 | SYSCALL(sys_inotify_init,sys_inotify_init,sys_inotify_init) |
296 | SYSCALL(sys_inotify_add_watch,sys_inotify_add_watch,sys_inotify_add_watch_wrapper) /* 285 */ | 296 | SYSCALL(sys_inotify_add_watch,sys_inotify_add_watch,compat_sys_inotify_add_watch) /* 285 */ |
297 | SYSCALL(sys_inotify_rm_watch,sys_inotify_rm_watch,sys_inotify_rm_watch_wrapper) | 297 | SYSCALL(sys_inotify_rm_watch,sys_inotify_rm_watch,compat_sys_inotify_rm_watch) |
298 | NI_SYSCALL /* 287 sys_migrate_pages */ | 298 | NI_SYSCALL /* 287 sys_migrate_pages */ |
299 | SYSCALL(sys_openat,sys_openat,compat_sys_openat) | 299 | SYSCALL(sys_openat,sys_openat,compat_sys_openat) |
300 | SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper) | 300 | SYSCALL(sys_mkdirat,sys_mkdirat,compat_sys_mkdirat) |
301 | SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ | 301 | SYSCALL(sys_mknodat,sys_mknodat,compat_sys_mknodat) /* 290 */ |
302 | SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) | 302 | SYSCALL(sys_fchownat,sys_fchownat,compat_sys_fchownat) |
303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) | 303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat) |
304 | SYSCALL(sys_fstatat64,sys_newfstatat,sys32_fstatat64_wrapper) | 304 | SYSCALL(sys_fstatat64,sys_newfstatat,compat_sys_s390_fstatat64) |
305 | SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) | 305 | SYSCALL(sys_unlinkat,sys_unlinkat,compat_sys_unlinkat) |
306 | SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ | 306 | SYSCALL(sys_renameat,sys_renameat,compat_sys_renameat) /* 295 */ |
307 | SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) | 307 | SYSCALL(sys_linkat,sys_linkat,compat_sys_linkat) |
308 | SYSCALL(sys_symlinkat,sys_symlinkat,sys_symlinkat_wrapper) | 308 | SYSCALL(sys_symlinkat,sys_symlinkat,compat_sys_symlinkat) |
309 | SYSCALL(sys_readlinkat,sys_readlinkat,sys_readlinkat_wrapper) | 309 | SYSCALL(sys_readlinkat,sys_readlinkat,compat_sys_readlinkat) |
310 | SYSCALL(sys_fchmodat,sys_fchmodat,sys_fchmodat_wrapper) | 310 | SYSCALL(sys_fchmodat,sys_fchmodat,compat_sys_fchmodat) |
311 | SYSCALL(sys_faccessat,sys_faccessat,sys_faccessat_wrapper) /* 300 */ | 311 | SYSCALL(sys_faccessat,sys_faccessat,compat_sys_faccessat) /* 300 */ |
312 | SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6_wrapper) | 312 | SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6) |
313 | SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll_wrapper) | 313 | SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll) |
314 | SYSCALL(sys_unshare,sys_unshare,sys_unshare_wrapper) | 314 | SYSCALL(sys_unshare,sys_unshare,compat_sys_unshare) |
315 | SYSCALL(sys_set_robust_list,sys_set_robust_list,compat_sys_set_robust_list) | 315 | SYSCALL(sys_set_robust_list,sys_set_robust_list,compat_sys_set_robust_list) |
316 | SYSCALL(sys_get_robust_list,sys_get_robust_list,compat_sys_get_robust_list) | 316 | SYSCALL(sys_get_robust_list,sys_get_robust_list,compat_sys_get_robust_list) |
317 | SYSCALL(sys_splice,sys_splice,sys_splice_wrapper) | 317 | SYSCALL(sys_splice,sys_splice,compat_sys_splice) |
318 | SYSCALL(sys_sync_file_range,sys_sync_file_range,sys_sync_file_range_wrapper) | 318 | SYSCALL(sys_sync_file_range,sys_sync_file_range,compat_sys_s390_sync_file_range) |
319 | SYSCALL(sys_tee,sys_tee,sys_tee_wrapper) | 319 | SYSCALL(sys_tee,sys_tee,compat_sys_tee) |
320 | SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice) | 320 | SYSCALL(sys_vmsplice,sys_vmsplice,compat_sys_vmsplice) |
321 | NI_SYSCALL /* 310 sys_move_pages */ | 321 | NI_SYSCALL /* 310 sys_move_pages */ |
322 | SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) | 322 | SYSCALL(sys_getcpu,sys_getcpu,compat_sys_getcpu) |
323 | SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait) | 323 | SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait) |
324 | SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper) | 324 | SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes) |
325 | SYSCALL(sys_s390_fallocate,sys_fallocate,sys_fallocate_wrapper) | 325 | SYSCALL(sys_s390_fallocate,sys_fallocate,compat_sys_s390_fallocate) |
326 | SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */ | 326 | SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat) /* 315 */ |
327 | SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd) | 327 | SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd) |
328 | NI_SYSCALL /* 317 old sys_timer_fd */ | 328 | NI_SYSCALL /* 317 old sys_timer_fd */ |
329 | SYSCALL(sys_eventfd,sys_eventfd,sys_eventfd_wrapper) | 329 | SYSCALL(sys_eventfd,sys_eventfd,compat_sys_eventfd) |
330 | SYSCALL(sys_timerfd_create,sys_timerfd_create,sys_timerfd_create_wrapper) | 330 | SYSCALL(sys_timerfd_create,sys_timerfd_create,compat_sys_timerfd_create) |
331 | SYSCALL(sys_timerfd_settime,sys_timerfd_settime,compat_sys_timerfd_settime) /* 320 */ | 331 | SYSCALL(sys_timerfd_settime,sys_timerfd_settime,compat_sys_timerfd_settime) /* 320 */ |
332 | SYSCALL(sys_timerfd_gettime,sys_timerfd_gettime,compat_sys_timerfd_gettime) | 332 | SYSCALL(sys_timerfd_gettime,sys_timerfd_gettime,compat_sys_timerfd_gettime) |
333 | SYSCALL(sys_signalfd4,sys_signalfd4,compat_sys_signalfd4) | 333 | SYSCALL(sys_signalfd4,sys_signalfd4,compat_sys_signalfd4) |
334 | SYSCALL(sys_eventfd2,sys_eventfd2,sys_eventfd2_wrapper) | 334 | SYSCALL(sys_eventfd2,sys_eventfd2,compat_sys_eventfd2) |
335 | SYSCALL(sys_inotify_init1,sys_inotify_init1,sys_inotify_init1_wrapper) | 335 | SYSCALL(sys_inotify_init1,sys_inotify_init1,compat_sys_inotify_init1) |
336 | SYSCALL(sys_pipe2,sys_pipe2,sys_pipe2_wrapper) /* 325 */ | 336 | SYSCALL(sys_pipe2,sys_pipe2,compat_sys_pipe2) /* 325 */ |
337 | SYSCALL(sys_dup3,sys_dup3,sys_dup3_wrapper) | 337 | SYSCALL(sys_dup3,sys_dup3,compat_sys_dup3) |
338 | SYSCALL(sys_epoll_create1,sys_epoll_create1,sys_epoll_create1_wrapper) | 338 | SYSCALL(sys_epoll_create1,sys_epoll_create1,compat_sys_epoll_create1) |
339 | SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv) | 339 | SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv) |
340 | SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev) | 340 | SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev) |
341 | SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo) /* 330 */ | 341 | SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo) /* 330 */ |
342 | SYSCALL(sys_perf_event_open,sys_perf_event_open,sys_perf_event_open_wrapper) | 342 | SYSCALL(sys_perf_event_open,sys_perf_event_open,compat_sys_perf_event_open) |
343 | SYSCALL(sys_fanotify_init,sys_fanotify_init,sys_fanotify_init_wrapper) | 343 | SYSCALL(sys_fanotify_init,sys_fanotify_init,compat_sys_fanotify_init) |
344 | SYSCALL(sys_fanotify_mark,sys_fanotify_mark,compat_sys_fanotify_mark) | 344 | SYSCALL(sys_fanotify_mark,sys_fanotify_mark,compat_sys_fanotify_mark) |
345 | SYSCALL(sys_prlimit64,sys_prlimit64,sys_prlimit64_wrapper) | 345 | SYSCALL(sys_prlimit64,sys_prlimit64,compat_sys_prlimit64) |
346 | SYSCALL(sys_name_to_handle_at,sys_name_to_handle_at,sys_name_to_handle_at_wrapper) /* 335 */ | 346 | SYSCALL(sys_name_to_handle_at,sys_name_to_handle_at,compat_sys_name_to_handle_at) /* 335 */ |
347 | SYSCALL(sys_open_by_handle_at,sys_open_by_handle_at,compat_sys_open_by_handle_at) | 347 | SYSCALL(sys_open_by_handle_at,sys_open_by_handle_at,compat_sys_open_by_handle_at) |
348 | SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime_wrapper) | 348 | SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime) |
349 | SYSCALL(sys_syncfs,sys_syncfs,sys_syncfs_wrapper) | 349 | SYSCALL(sys_syncfs,sys_syncfs,compat_sys_syncfs) |
350 | SYSCALL(sys_setns,sys_setns,sys_setns_wrapper) | 350 | SYSCALL(sys_setns,sys_setns,compat_sys_setns) |
351 | SYSCALL(sys_process_vm_readv,sys_process_vm_readv,compat_sys_process_vm_readv_wrapper) /* 340 */ | 351 | SYSCALL(sys_process_vm_readv,sys_process_vm_readv,compat_sys_process_vm_readv) /* 340 */ |
352 | SYSCALL(sys_process_vm_writev,sys_process_vm_writev,compat_sys_process_vm_writev_wrapper) | 352 | SYSCALL(sys_process_vm_writev,sys_process_vm_writev,compat_sys_process_vm_writev) |
353 | SYSCALL(sys_ni_syscall,sys_s390_runtime_instr,sys_s390_runtime_instr_wrapper) | 353 | SYSCALL(sys_ni_syscall,sys_s390_runtime_instr,compat_sys_s390_runtime_instr) |
354 | SYSCALL(sys_kcmp,sys_kcmp,sys_kcmp_wrapper) | 354 | SYSCALL(sys_kcmp,sys_kcmp,compat_sys_kcmp) |
355 | SYSCALL(sys_finit_module,sys_finit_module,sys_finit_module_wrapper) | 355 | SYSCALL(sys_finit_module,sys_finit_module,compat_sys_finit_module) |
356 | SYSCALL(sys_sched_setattr,sys_sched_setattr,sys_sched_setattr_wrapper) /* 345 */ | 356 | SYSCALL(sys_sched_setattr,sys_sched_setattr,compat_sys_sched_setattr) /* 345 */ |
357 | SYSCALL(sys_sched_getattr,sys_sched_getattr,sys_sched_getattr_wrapper) | 357 | SYSCALL(sys_sched_getattr,sys_sched_getattr,compat_sys_sched_getattr) |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 4b2e3e317004..6298fed11ced 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -451,7 +451,6 @@ static int __init topology_init(void) | |||
451 | } | 451 | } |
452 | set_topology_timer(); | 452 | set_topology_timer(); |
453 | out: | 453 | out: |
454 | update_cpu_masks(); | ||
455 | return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching); | 454 | return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching); |
456 | } | 455 | } |
457 | device_initcall(topology_init); | 456 | device_initcall(topology_init); |
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index 8216c0e0b2e2..6f9cfa500372 100644 --- a/arch/s390/kvm/diag.c +++ b/arch/s390/kvm/diag.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/kvm.h> | 14 | #include <linux/kvm.h> |
15 | #include <linux/kvm_host.h> | 15 | #include <linux/kvm_host.h> |
16 | #include <asm/pgalloc.h> | ||
16 | #include <asm/virtio-ccw.h> | 17 | #include <asm/virtio-ccw.h> |
17 | #include "kvm-s390.h" | 18 | #include "kvm-s390.h" |
18 | #include "trace.h" | 19 | #include "trace.h" |
@@ -86,9 +87,11 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu) | |||
86 | switch (subcode) { | 87 | switch (subcode) { |
87 | case 3: | 88 | case 3: |
88 | vcpu->run->s390_reset_flags = KVM_S390_RESET_CLEAR; | 89 | vcpu->run->s390_reset_flags = KVM_S390_RESET_CLEAR; |
90 | page_table_reset_pgste(current->mm, 0, TASK_SIZE); | ||
89 | break; | 91 | break; |
90 | case 4: | 92 | case 4: |
91 | vcpu->run->s390_reset_flags = 0; | 93 | vcpu->run->s390_reset_flags = 0; |
94 | page_table_reset_pgste(current->mm, 0, TASK_SIZE); | ||
92 | break; | 95 | break; |
93 | default: | 96 | default: |
94 | return -EOPNOTSUPP; | 97 | return -EOPNOTSUPP; |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index e0676f390d57..10b5db3c9bc4 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -68,6 +68,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
68 | { "instruction_storage_key", VCPU_STAT(instruction_storage_key) }, | 68 | { "instruction_storage_key", VCPU_STAT(instruction_storage_key) }, |
69 | { "instruction_stsch", VCPU_STAT(instruction_stsch) }, | 69 | { "instruction_stsch", VCPU_STAT(instruction_stsch) }, |
70 | { "instruction_chsc", VCPU_STAT(instruction_chsc) }, | 70 | { "instruction_chsc", VCPU_STAT(instruction_chsc) }, |
71 | { "instruction_essa", VCPU_STAT(instruction_essa) }, | ||
71 | { "instruction_stsi", VCPU_STAT(instruction_stsi) }, | 72 | { "instruction_stsi", VCPU_STAT(instruction_stsi) }, |
72 | { "instruction_stfl", VCPU_STAT(instruction_stfl) }, | 73 | { "instruction_stfl", VCPU_STAT(instruction_stfl) }, |
73 | { "instruction_tprot", VCPU_STAT(instruction_tprot) }, | 74 | { "instruction_tprot", VCPU_STAT(instruction_tprot) }, |
@@ -283,7 +284,11 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) | |||
283 | if (kvm_is_ucontrol(vcpu->kvm)) | 284 | if (kvm_is_ucontrol(vcpu->kvm)) |
284 | gmap_free(vcpu->arch.gmap); | 285 | gmap_free(vcpu->arch.gmap); |
285 | 286 | ||
287 | if (vcpu->arch.sie_block->cbrlo) | ||
288 | __free_page(__pfn_to_page( | ||
289 | vcpu->arch.sie_block->cbrlo >> PAGE_SHIFT)); | ||
286 | free_page((unsigned long)(vcpu->arch.sie_block)); | 290 | free_page((unsigned long)(vcpu->arch.sie_block)); |
291 | |||
287 | kvm_vcpu_uninit(vcpu); | 292 | kvm_vcpu_uninit(vcpu); |
288 | kmem_cache_free(kvm_vcpu_cache, vcpu); | 293 | kmem_cache_free(kvm_vcpu_cache, vcpu); |
289 | } | 294 | } |
@@ -390,6 +395,8 @@ int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) | |||
390 | 395 | ||
391 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | 396 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) |
392 | { | 397 | { |
398 | struct page *cbrl; | ||
399 | |||
393 | atomic_set(&vcpu->arch.sie_block->cpuflags, CPUSTAT_ZARCH | | 400 | atomic_set(&vcpu->arch.sie_block->cpuflags, CPUSTAT_ZARCH | |
394 | CPUSTAT_SM | | 401 | CPUSTAT_SM | |
395 | CPUSTAT_STOPPED | | 402 | CPUSTAT_STOPPED | |
@@ -401,6 +408,14 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | |||
401 | vcpu->arch.sie_block->ecb2 = 8; | 408 | vcpu->arch.sie_block->ecb2 = 8; |
402 | vcpu->arch.sie_block->eca = 0xC1002001U; | 409 | vcpu->arch.sie_block->eca = 0xC1002001U; |
403 | vcpu->arch.sie_block->fac = (int) (long) vfacilities; | 410 | vcpu->arch.sie_block->fac = (int) (long) vfacilities; |
411 | if (kvm_enabled_cmma()) { | ||
412 | cbrl = alloc_page(GFP_KERNEL | __GFP_ZERO); | ||
413 | if (cbrl) { | ||
414 | vcpu->arch.sie_block->ecb2 |= 0x80; | ||
415 | vcpu->arch.sie_block->ecb2 &= ~0x08; | ||
416 | vcpu->arch.sie_block->cbrlo = page_to_phys(cbrl); | ||
417 | } | ||
418 | } | ||
404 | hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); | 419 | hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); |
405 | tasklet_init(&vcpu->arch.tasklet, kvm_s390_tasklet, | 420 | tasklet_init(&vcpu->arch.tasklet, kvm_s390_tasklet, |
406 | (unsigned long) vcpu); | 421 | (unsigned long) vcpu); |
@@ -761,6 +776,16 @@ static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason) | |||
761 | return rc; | 776 | return rc; |
762 | } | 777 | } |
763 | 778 | ||
779 | bool kvm_enabled_cmma(void) | ||
780 | { | ||
781 | if (!MACHINE_IS_LPAR) | ||
782 | return false; | ||
783 | /* only enable for z10 and later */ | ||
784 | if (!MACHINE_HAS_EDAT1) | ||
785 | return false; | ||
786 | return true; | ||
787 | } | ||
788 | |||
764 | static int __vcpu_run(struct kvm_vcpu *vcpu) | 789 | static int __vcpu_run(struct kvm_vcpu *vcpu) |
765 | { | 790 | { |
766 | int rc, exit_reason; | 791 | int rc, exit_reason; |
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index f9559b0bd620..564514f410f4 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h | |||
@@ -156,6 +156,8 @@ void s390_vcpu_block(struct kvm_vcpu *vcpu); | |||
156 | void s390_vcpu_unblock(struct kvm_vcpu *vcpu); | 156 | void s390_vcpu_unblock(struct kvm_vcpu *vcpu); |
157 | void exit_sie(struct kvm_vcpu *vcpu); | 157 | void exit_sie(struct kvm_vcpu *vcpu); |
158 | void exit_sie_sync(struct kvm_vcpu *vcpu); | 158 | void exit_sie_sync(struct kvm_vcpu *vcpu); |
159 | /* are we going to support cmma? */ | ||
160 | bool kvm_enabled_cmma(void); | ||
159 | /* implemented in diag.c */ | 161 | /* implemented in diag.c */ |
160 | int kvm_s390_handle_diag(struct kvm_vcpu *vcpu); | 162 | int kvm_s390_handle_diag(struct kvm_vcpu *vcpu); |
161 | 163 | ||
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 75beea632a10..aacb6b129914 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -636,8 +636,49 @@ static int handle_pfmf(struct kvm_vcpu *vcpu) | |||
636 | return 0; | 636 | return 0; |
637 | } | 637 | } |
638 | 638 | ||
639 | static int handle_essa(struct kvm_vcpu *vcpu) | ||
640 | { | ||
641 | /* entries expected to be 1FF */ | ||
642 | int entries = (vcpu->arch.sie_block->cbrlo & ~PAGE_MASK) >> 3; | ||
643 | unsigned long *cbrlo, cbrle; | ||
644 | struct gmap *gmap; | ||
645 | int i; | ||
646 | |||
647 | VCPU_EVENT(vcpu, 5, "cmma release %d pages", entries); | ||
648 | gmap = vcpu->arch.gmap; | ||
649 | vcpu->stat.instruction_essa++; | ||
650 | if (!kvm_enabled_cmma() || !vcpu->arch.sie_block->cbrlo) | ||
651 | return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); | ||
652 | |||
653 | if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) | ||
654 | return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); | ||
655 | |||
656 | if (((vcpu->arch.sie_block->ipb & 0xf0000000) >> 28) > 6) | ||
657 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); | ||
658 | |||
659 | /* Rewind PSW to repeat the ESSA instruction */ | ||
660 | vcpu->arch.sie_block->gpsw.addr = | ||
661 | __rewind_psw(vcpu->arch.sie_block->gpsw, 4); | ||
662 | vcpu->arch.sie_block->cbrlo &= PAGE_MASK; /* reset nceo */ | ||
663 | cbrlo = phys_to_virt(vcpu->arch.sie_block->cbrlo); | ||
664 | down_read(&gmap->mm->mmap_sem); | ||
665 | for (i = 0; i < entries; ++i) { | ||
666 | cbrle = cbrlo[i]; | ||
667 | if (unlikely(cbrle & ~PAGE_MASK || cbrle < 2 * PAGE_SIZE)) | ||
668 | /* invalid entry */ | ||
669 | break; | ||
670 | /* try to free backing */ | ||
671 | __gmap_zap(cbrle, gmap); | ||
672 | } | ||
673 | up_read(&gmap->mm->mmap_sem); | ||
674 | if (i < entries) | ||
675 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); | ||
676 | return 0; | ||
677 | } | ||
678 | |||
639 | static const intercept_handler_t b9_handlers[256] = { | 679 | static const intercept_handler_t b9_handlers[256] = { |
640 | [0x8d] = handle_epsw, | 680 | [0x8d] = handle_epsw, |
681 | [0xab] = handle_essa, | ||
641 | [0xaf] = handle_pfmf, | 682 | [0xaf] = handle_pfmf, |
642 | }; | 683 | }; |
643 | 684 | ||
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index b068729e50ac..e3fffe1dff51 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile | |||
@@ -2,8 +2,7 @@ | |||
2 | # Makefile for s390-specific library files.. | 2 | # Makefile for s390-specific library files.. |
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y += delay.o string.o uaccess_pt.o find.o | 5 | lib-y += delay.o string.o uaccess_pt.o uaccess_mvcos.o find.o |
6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o ucmpdi2.o mem32.o | 6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o ucmpdi2.o mem32.o |
7 | obj-$(CONFIG_64BIT) += mem64.o | 7 | obj-$(CONFIG_64BIT) += mem64.o |
8 | lib-$(CONFIG_64BIT) += uaccess_mvcos.o | ||
9 | lib-$(CONFIG_SMP) += spinlock.o | 8 | lib-$(CONFIG_SMP) += spinlock.o |
diff --git a/arch/s390/lib/find.c b/arch/s390/lib/find.c index 620d34d6487e..922003c1b90d 100644 --- a/arch/s390/lib/find.c +++ b/arch/s390/lib/find.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * On s390x the bits are numbered: | 4 | * On s390x the bits are numbered: |
5 | * |0..............63|64............127|128...........191|192...........255| | 5 | * |0..............63|64............127|128...........191|192...........255| |
6 | * and on s390: | 6 | * and on s390: |
7 | * |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255| | 7 | * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255| |
8 | * | 8 | * |
9 | * The reason for this bit numbering is the fact that the hardware sets bits | 9 | * The reason for this bit numbering is the fact that the hardware sets bits |
10 | * in a bitmap starting at bit 0 (MSB) and we don't want to scan the bitmap | 10 | * in a bitmap starting at bit 0 (MSB) and we don't want to scan the bitmap |
diff --git a/arch/s390/lib/uaccess.h b/arch/s390/lib/uaccess.h index b1a22173d027..c7e0e81f4b4e 100644 --- a/arch/s390/lib/uaccess.h +++ b/arch/s390/lib/uaccess.h | |||
@@ -6,7 +6,11 @@ | |||
6 | #ifndef __ARCH_S390_LIB_UACCESS_H | 6 | #ifndef __ARCH_S390_LIB_UACCESS_H |
7 | #define __ARCH_S390_LIB_UACCESS_H | 7 | #define __ARCH_S390_LIB_UACCESS_H |
8 | 8 | ||
9 | extern int futex_atomic_op_pt(int, u32 __user *, int, int *); | 9 | unsigned long copy_from_user_pt(void *to, const void __user *from, unsigned long n); |
10 | extern int futex_atomic_cmpxchg_pt(u32 *, u32 __user *, u32, u32); | 10 | unsigned long copy_to_user_pt(void __user *to, const void *from, unsigned long n); |
11 | unsigned long copy_in_user_pt(void __user *to, const void __user *from, unsigned long n); | ||
12 | unsigned long clear_user_pt(void __user *to, unsigned long n); | ||
13 | unsigned long strnlen_user_pt(const char __user *src, unsigned long count); | ||
14 | long strncpy_from_user_pt(char *dst, const char __user *src, long count); | ||
11 | 15 | ||
12 | #endif /* __ARCH_S390_LIB_UACCESS_H */ | 16 | #endif /* __ARCH_S390_LIB_UACCESS_H */ |
diff --git a/arch/s390/lib/uaccess_mvcos.c b/arch/s390/lib/uaccess_mvcos.c index 4b7993bf69b9..ae97b8df11aa 100644 --- a/arch/s390/lib/uaccess_mvcos.c +++ b/arch/s390/lib/uaccess_mvcos.c | |||
@@ -6,8 +6,11 @@ | |||
6 | * Gerald Schaefer (gerald.schaefer@de.ibm.com) | 6 | * Gerald Schaefer (gerald.schaefer@de.ibm.com) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/jump_label.h> | ||
9 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/init.h> | ||
10 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <asm/facility.h> | ||
11 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
12 | #include <asm/futex.h> | 15 | #include <asm/futex.h> |
13 | #include "uaccess.h" | 16 | #include "uaccess.h" |
@@ -26,7 +29,10 @@ | |||
26 | #define SLR "slgr" | 29 | #define SLR "slgr" |
27 | #endif | 30 | #endif |
28 | 31 | ||
29 | static size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x) | 32 | static struct static_key have_mvcos = STATIC_KEY_INIT_TRUE; |
33 | |||
34 | static inline unsigned long copy_from_user_mvcos(void *x, const void __user *ptr, | ||
35 | unsigned long size) | ||
30 | { | 36 | { |
31 | register unsigned long reg0 asm("0") = 0x81UL; | 37 | register unsigned long reg0 asm("0") = 0x81UL; |
32 | unsigned long tmp1, tmp2; | 38 | unsigned long tmp1, tmp2; |
@@ -65,7 +71,16 @@ static size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x) | |||
65 | return size; | 71 | return size; |
66 | } | 72 | } |
67 | 73 | ||
68 | static size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x) | 74 | unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n) |
75 | { | ||
76 | if (static_key_true(&have_mvcos)) | ||
77 | return copy_from_user_mvcos(to, from, n); | ||
78 | return copy_from_user_pt(to, from, n); | ||
79 | } | ||
80 | EXPORT_SYMBOL(__copy_from_user); | ||
81 | |||
82 | static inline unsigned long copy_to_user_mvcos(void __user *ptr, const void *x, | ||
83 | unsigned long size) | ||
69 | { | 84 | { |
70 | register unsigned long reg0 asm("0") = 0x810000UL; | 85 | register unsigned long reg0 asm("0") = 0x810000UL; |
71 | unsigned long tmp1, tmp2; | 86 | unsigned long tmp1, tmp2; |
@@ -94,8 +109,16 @@ static size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x) | |||
94 | return size; | 109 | return size; |
95 | } | 110 | } |
96 | 111 | ||
97 | static size_t copy_in_user_mvcos(size_t size, void __user *to, | 112 | unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n) |
98 | const void __user *from) | 113 | { |
114 | if (static_key_true(&have_mvcos)) | ||
115 | return copy_to_user_mvcos(to, from, n); | ||
116 | return copy_to_user_pt(to, from, n); | ||
117 | } | ||
118 | EXPORT_SYMBOL(__copy_to_user); | ||
119 | |||
120 | static inline unsigned long copy_in_user_mvcos(void __user *to, const void __user *from, | ||
121 | unsigned long size) | ||
99 | { | 122 | { |
100 | register unsigned long reg0 asm("0") = 0x810081UL; | 123 | register unsigned long reg0 asm("0") = 0x810081UL; |
101 | unsigned long tmp1, tmp2; | 124 | unsigned long tmp1, tmp2; |
@@ -117,7 +140,15 @@ static size_t copy_in_user_mvcos(size_t size, void __user *to, | |||
117 | return size; | 140 | return size; |
118 | } | 141 | } |
119 | 142 | ||
120 | static size_t clear_user_mvcos(size_t size, void __user *to) | 143 | unsigned long __copy_in_user(void __user *to, const void __user *from, unsigned long n) |
144 | { | ||
145 | if (static_key_true(&have_mvcos)) | ||
146 | return copy_in_user_mvcos(to, from, n); | ||
147 | return copy_in_user_pt(to, from, n); | ||
148 | } | ||
149 | EXPORT_SYMBOL(__copy_in_user); | ||
150 | |||
151 | static inline unsigned long clear_user_mvcos(void __user *to, unsigned long size) | ||
121 | { | 152 | { |
122 | register unsigned long reg0 asm("0") = 0x810000UL; | 153 | register unsigned long reg0 asm("0") = 0x810000UL; |
123 | unsigned long tmp1, tmp2; | 154 | unsigned long tmp1, tmp2; |
@@ -145,17 +176,26 @@ static size_t clear_user_mvcos(size_t size, void __user *to) | |||
145 | return size; | 176 | return size; |
146 | } | 177 | } |
147 | 178 | ||
148 | static size_t strnlen_user_mvcos(size_t count, const char __user *src) | 179 | unsigned long __clear_user(void __user *to, unsigned long size) |
149 | { | 180 | { |
150 | size_t done, len, offset, len_str; | 181 | if (static_key_true(&have_mvcos)) |
182 | return clear_user_mvcos(to, size); | ||
183 | return clear_user_pt(to, size); | ||
184 | } | ||
185 | EXPORT_SYMBOL(__clear_user); | ||
186 | |||
187 | static inline unsigned long strnlen_user_mvcos(const char __user *src, | ||
188 | unsigned long count) | ||
189 | { | ||
190 | unsigned long done, len, offset, len_str; | ||
151 | char buf[256]; | 191 | char buf[256]; |
152 | 192 | ||
153 | done = 0; | 193 | done = 0; |
154 | do { | 194 | do { |
155 | offset = (size_t)src & ~PAGE_MASK; | 195 | offset = (unsigned long)src & ~PAGE_MASK; |
156 | len = min(256UL, PAGE_SIZE - offset); | 196 | len = min(256UL, PAGE_SIZE - offset); |
157 | len = min(count - done, len); | 197 | len = min(count - done, len); |
158 | if (copy_from_user_mvcos(len, src, buf)) | 198 | if (copy_from_user_mvcos(buf, src, len)) |
159 | return 0; | 199 | return 0; |
160 | len_str = strnlen(buf, len); | 200 | len_str = strnlen(buf, len); |
161 | done += len_str; | 201 | done += len_str; |
@@ -164,18 +204,26 @@ static size_t strnlen_user_mvcos(size_t count, const char __user *src) | |||
164 | return done + 1; | 204 | return done + 1; |
165 | } | 205 | } |
166 | 206 | ||
167 | static size_t strncpy_from_user_mvcos(size_t count, const char __user *src, | 207 | unsigned long __strnlen_user(const char __user *src, unsigned long count) |
168 | char *dst) | ||
169 | { | 208 | { |
170 | size_t done, len, offset, len_str; | 209 | if (static_key_true(&have_mvcos)) |
210 | return strnlen_user_mvcos(src, count); | ||
211 | return strnlen_user_pt(src, count); | ||
212 | } | ||
213 | EXPORT_SYMBOL(__strnlen_user); | ||
171 | 214 | ||
172 | if (unlikely(!count)) | 215 | static inline long strncpy_from_user_mvcos(char *dst, const char __user *src, |
216 | long count) | ||
217 | { | ||
218 | unsigned long done, len, offset, len_str; | ||
219 | |||
220 | if (unlikely(count <= 0)) | ||
173 | return 0; | 221 | return 0; |
174 | done = 0; | 222 | done = 0; |
175 | do { | 223 | do { |
176 | offset = (size_t)src & ~PAGE_MASK; | 224 | offset = (unsigned long)src & ~PAGE_MASK; |
177 | len = min(count - done, PAGE_SIZE - offset); | 225 | len = min(count - done, PAGE_SIZE - offset); |
178 | if (copy_from_user_mvcos(len, src, dst)) | 226 | if (copy_from_user_mvcos(dst, src, len)) |
179 | return -EFAULT; | 227 | return -EFAULT; |
180 | len_str = strnlen(dst, len); | 228 | len_str = strnlen(dst, len); |
181 | done += len_str; | 229 | done += len_str; |
@@ -185,13 +233,31 @@ static size_t strncpy_from_user_mvcos(size_t count, const char __user *src, | |||
185 | return done; | 233 | return done; |
186 | } | 234 | } |
187 | 235 | ||
188 | struct uaccess_ops uaccess_mvcos = { | 236 | long __strncpy_from_user(char *dst, const char __user *src, long count) |
189 | .copy_from_user = copy_from_user_mvcos, | 237 | { |
190 | .copy_to_user = copy_to_user_mvcos, | 238 | if (static_key_true(&have_mvcos)) |
191 | .copy_in_user = copy_in_user_mvcos, | 239 | return strncpy_from_user_mvcos(dst, src, count); |
192 | .clear_user = clear_user_mvcos, | 240 | return strncpy_from_user_pt(dst, src, count); |
193 | .strnlen_user = strnlen_user_mvcos, | 241 | } |
194 | .strncpy_from_user = strncpy_from_user_mvcos, | 242 | EXPORT_SYMBOL(__strncpy_from_user); |
195 | .futex_atomic_op = futex_atomic_op_pt, | 243 | |
196 | .futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt, | 244 | /* |
197 | }; | 245 | * The uaccess page tabe walk variant can be enforced with the "uaccesspt" |
246 | * kernel parameter. This is mainly for debugging purposes. | ||
247 | */ | ||
248 | static int force_uaccess_pt __initdata; | ||
249 | |||
250 | static int __init parse_uaccess_pt(char *__unused) | ||
251 | { | ||
252 | force_uaccess_pt = 1; | ||
253 | return 0; | ||
254 | } | ||
255 | early_param("uaccesspt", parse_uaccess_pt); | ||
256 | |||
257 | static int __init uaccess_init(void) | ||
258 | { | ||
259 | if (IS_ENABLED(CONFIG_32BIT) || force_uaccess_pt || !test_facility(27)) | ||
260 | static_key_slow_dec(&have_mvcos); | ||
261 | return 0; | ||
262 | } | ||
263 | early_initcall(uaccess_init); | ||
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 61ebcc9ccb34..8d39760bae68 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #define SLR "slgr" | 22 | #define SLR "slgr" |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | static size_t strnlen_kernel(size_t count, const char __user *src) | 25 | static unsigned long strnlen_kernel(const char __user *src, unsigned long count) |
26 | { | 26 | { |
27 | register unsigned long reg0 asm("0") = 0UL; | 27 | register unsigned long reg0 asm("0") = 0UL; |
28 | unsigned long tmp1, tmp2; | 28 | unsigned long tmp1, tmp2; |
@@ -42,8 +42,8 @@ static size_t strnlen_kernel(size_t count, const char __user *src) | |||
42 | return count; | 42 | return count; |
43 | } | 43 | } |
44 | 44 | ||
45 | static size_t copy_in_kernel(size_t count, void __user *to, | 45 | static unsigned long copy_in_kernel(void __user *to, const void __user *from, |
46 | const void __user *from) | 46 | unsigned long count) |
47 | { | 47 | { |
48 | unsigned long tmp1; | 48 | unsigned long tmp1; |
49 | 49 | ||
@@ -146,8 +146,8 @@ static unsigned long follow_table(struct mm_struct *mm, | |||
146 | 146 | ||
147 | #endif /* CONFIG_64BIT */ | 147 | #endif /* CONFIG_64BIT */ |
148 | 148 | ||
149 | static __always_inline size_t __user_copy_pt(unsigned long uaddr, void *kptr, | 149 | static inline unsigned long __user_copy_pt(unsigned long uaddr, void *kptr, |
150 | size_t n, int write_user) | 150 | unsigned long n, int write_user) |
151 | { | 151 | { |
152 | struct mm_struct *mm = current->mm; | 152 | struct mm_struct *mm = current->mm; |
153 | unsigned long offset, done, size, kaddr; | 153 | unsigned long offset, done, size, kaddr; |
@@ -189,8 +189,7 @@ fault: | |||
189 | * Do DAT for user address by page table walk, return kernel address. | 189 | * Do DAT for user address by page table walk, return kernel address. |
190 | * This function needs to be called with current->mm->page_table_lock held. | 190 | * This function needs to be called with current->mm->page_table_lock held. |
191 | */ | 191 | */ |
192 | static __always_inline unsigned long __dat_user_addr(unsigned long uaddr, | 192 | static inline unsigned long __dat_user_addr(unsigned long uaddr, int write) |
193 | int write) | ||
194 | { | 193 | { |
195 | struct mm_struct *mm = current->mm; | 194 | struct mm_struct *mm = current->mm; |
196 | unsigned long kaddr; | 195 | unsigned long kaddr; |
@@ -211,29 +210,29 @@ fault: | |||
211 | return 0; | 210 | return 0; |
212 | } | 211 | } |
213 | 212 | ||
214 | static size_t copy_from_user_pt(size_t n, const void __user *from, void *to) | 213 | unsigned long copy_from_user_pt(void *to, const void __user *from, unsigned long n) |
215 | { | 214 | { |
216 | size_t rc; | 215 | unsigned long rc; |
217 | 216 | ||
218 | if (segment_eq(get_fs(), KERNEL_DS)) | 217 | if (segment_eq(get_fs(), KERNEL_DS)) |
219 | return copy_in_kernel(n, (void __user *) to, from); | 218 | return copy_in_kernel((void __user *) to, from, n); |
220 | rc = __user_copy_pt((unsigned long) from, to, n, 0); | 219 | rc = __user_copy_pt((unsigned long) from, to, n, 0); |
221 | if (unlikely(rc)) | 220 | if (unlikely(rc)) |
222 | memset(to + n - rc, 0, rc); | 221 | memset(to + n - rc, 0, rc); |
223 | return rc; | 222 | return rc; |
224 | } | 223 | } |
225 | 224 | ||
226 | static size_t copy_to_user_pt(size_t n, void __user *to, const void *from) | 225 | unsigned long copy_to_user_pt(void __user *to, const void *from, unsigned long n) |
227 | { | 226 | { |
228 | if (segment_eq(get_fs(), KERNEL_DS)) | 227 | if (segment_eq(get_fs(), KERNEL_DS)) |
229 | return copy_in_kernel(n, to, (void __user *) from); | 228 | return copy_in_kernel(to, (void __user *) from, n); |
230 | return __user_copy_pt((unsigned long) to, (void *) from, n, 1); | 229 | return __user_copy_pt((unsigned long) to, (void *) from, n, 1); |
231 | } | 230 | } |
232 | 231 | ||
233 | static size_t clear_user_pt(size_t n, void __user *to) | 232 | unsigned long clear_user_pt(void __user *to, unsigned long n) |
234 | { | 233 | { |
235 | void *zpage = (void *) empty_zero_page; | 234 | void *zpage = (void *) empty_zero_page; |
236 | long done, size, ret; | 235 | unsigned long done, size, ret; |
237 | 236 | ||
238 | done = 0; | 237 | done = 0; |
239 | do { | 238 | do { |
@@ -242,7 +241,7 @@ static size_t clear_user_pt(size_t n, void __user *to) | |||
242 | else | 241 | else |
243 | size = n - done; | 242 | size = n - done; |
244 | if (segment_eq(get_fs(), KERNEL_DS)) | 243 | if (segment_eq(get_fs(), KERNEL_DS)) |
245 | ret = copy_in_kernel(n, to, (void __user *) zpage); | 244 | ret = copy_in_kernel(to, (void __user *) zpage, n); |
246 | else | 245 | else |
247 | ret = __user_copy_pt((unsigned long) to, zpage, size, 1); | 246 | ret = __user_copy_pt((unsigned long) to, zpage, size, 1); |
248 | done += size; | 247 | done += size; |
@@ -253,17 +252,17 @@ static size_t clear_user_pt(size_t n, void __user *to) | |||
253 | return 0; | 252 | return 0; |
254 | } | 253 | } |
255 | 254 | ||
256 | static size_t strnlen_user_pt(size_t count, const char __user *src) | 255 | unsigned long strnlen_user_pt(const char __user *src, unsigned long count) |
257 | { | 256 | { |
258 | unsigned long uaddr = (unsigned long) src; | 257 | unsigned long uaddr = (unsigned long) src; |
259 | struct mm_struct *mm = current->mm; | 258 | struct mm_struct *mm = current->mm; |
260 | unsigned long offset, done, len, kaddr; | 259 | unsigned long offset, done, len, kaddr; |
261 | size_t len_str; | 260 | unsigned long len_str; |
262 | 261 | ||
263 | if (unlikely(!count)) | 262 | if (unlikely(!count)) |
264 | return 0; | 263 | return 0; |
265 | if (segment_eq(get_fs(), KERNEL_DS)) | 264 | if (segment_eq(get_fs(), KERNEL_DS)) |
266 | return strnlen_kernel(count, src); | 265 | return strnlen_kernel(src, count); |
267 | if (!mm) | 266 | if (!mm) |
268 | return 0; | 267 | return 0; |
269 | done = 0; | 268 | done = 0; |
@@ -289,19 +288,18 @@ fault: | |||
289 | goto retry; | 288 | goto retry; |
290 | } | 289 | } |
291 | 290 | ||
292 | static size_t strncpy_from_user_pt(size_t count, const char __user *src, | 291 | long strncpy_from_user_pt(char *dst, const char __user *src, long count) |
293 | char *dst) | ||
294 | { | 292 | { |
295 | size_t done, len, offset, len_str; | 293 | unsigned long done, len, offset, len_str; |
296 | 294 | ||
297 | if (unlikely(!count)) | 295 | if (unlikely(count <= 0)) |
298 | return 0; | 296 | return 0; |
299 | done = 0; | 297 | done = 0; |
300 | do { | 298 | do { |
301 | offset = (size_t)src & ~PAGE_MASK; | 299 | offset = (unsigned long)src & ~PAGE_MASK; |
302 | len = min(count - done, PAGE_SIZE - offset); | 300 | len = min(count - done, PAGE_SIZE - offset); |
303 | if (segment_eq(get_fs(), KERNEL_DS)) { | 301 | if (segment_eq(get_fs(), KERNEL_DS)) { |
304 | if (copy_in_kernel(len, (void __user *) dst, src)) | 302 | if (copy_in_kernel((void __user *) dst, src, len)) |
305 | return -EFAULT; | 303 | return -EFAULT; |
306 | } else { | 304 | } else { |
307 | if (__user_copy_pt((unsigned long) src, dst, len, 0)) | 305 | if (__user_copy_pt((unsigned long) src, dst, len, 0)) |
@@ -315,8 +313,8 @@ static size_t strncpy_from_user_pt(size_t count, const char __user *src, | |||
315 | return done; | 313 | return done; |
316 | } | 314 | } |
317 | 315 | ||
318 | static size_t copy_in_user_pt(size_t n, void __user *to, | 316 | unsigned long copy_in_user_pt(void __user *to, const void __user *from, |
319 | const void __user *from) | 317 | unsigned long n) |
320 | { | 318 | { |
321 | struct mm_struct *mm = current->mm; | 319 | struct mm_struct *mm = current->mm; |
322 | unsigned long offset_max, uaddr, done, size, error_code; | 320 | unsigned long offset_max, uaddr, done, size, error_code; |
@@ -326,7 +324,7 @@ static size_t copy_in_user_pt(size_t n, void __user *to, | |||
326 | int write_user; | 324 | int write_user; |
327 | 325 | ||
328 | if (segment_eq(get_fs(), KERNEL_DS)) | 326 | if (segment_eq(get_fs(), KERNEL_DS)) |
329 | return copy_in_kernel(n, to, from); | 327 | return copy_in_kernel(to, from, n); |
330 | if (!mm) | 328 | if (!mm) |
331 | return n; | 329 | return n; |
332 | done = 0; | 330 | done = 0; |
@@ -411,7 +409,7 @@ static int __futex_atomic_op_pt(int op, u32 __user *uaddr, int oparg, int *old) | |||
411 | return ret; | 409 | return ret; |
412 | } | 410 | } |
413 | 411 | ||
414 | int futex_atomic_op_pt(int op, u32 __user *uaddr, int oparg, int *old) | 412 | int __futex_atomic_op_inuser(int op, u32 __user *uaddr, int oparg, int *old) |
415 | { | 413 | { |
416 | int ret; | 414 | int ret; |
417 | 415 | ||
@@ -449,8 +447,8 @@ static int __futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr, | |||
449 | return ret; | 447 | return ret; |
450 | } | 448 | } |
451 | 449 | ||
452 | int futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr, | 450 | int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, |
453 | u32 oldval, u32 newval) | 451 | u32 oldval, u32 newval) |
454 | { | 452 | { |
455 | int ret; | 453 | int ret; |
456 | 454 | ||
@@ -471,14 +469,3 @@ int futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr, | |||
471 | put_page(virt_to_page(uaddr)); | 469 | put_page(virt_to_page(uaddr)); |
472 | return ret; | 470 | return ret; |
473 | } | 471 | } |
474 | |||
475 | struct uaccess_ops uaccess_pt = { | ||
476 | .copy_from_user = copy_from_user_pt, | ||
477 | .copy_to_user = copy_to_user_pt, | ||
478 | .copy_in_user = copy_in_user_pt, | ||
479 | .clear_user = clear_user_pt, | ||
480 | .strnlen_user = strnlen_user_pt, | ||
481 | .strncpy_from_user = strncpy_from_user_pt, | ||
482 | .futex_atomic_op = futex_atomic_op_pt, | ||
483 | .futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt, | ||
484 | }; | ||
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c index d1e0e0c7a7e2..2a2e35416d2f 100644 --- a/arch/s390/mm/maccess.c +++ b/arch/s390/mm/maccess.c | |||
@@ -128,7 +128,7 @@ void memcpy_absolute(void *dest, void *src, size_t count) | |||
128 | /* | 128 | /* |
129 | * Copy memory from kernel (real) to user (virtual) | 129 | * Copy memory from kernel (real) to user (virtual) |
130 | */ | 130 | */ |
131 | int copy_to_user_real(void __user *dest, void *src, size_t count) | 131 | int copy_to_user_real(void __user *dest, void *src, unsigned long count) |
132 | { | 132 | { |
133 | int offs = 0, size, rc; | 133 | int offs = 0, size, rc; |
134 | char *buf; | 134 | char *buf; |
@@ -152,32 +152,6 @@ out: | |||
152 | } | 152 | } |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * Copy memory from user (virtual) to kernel (real) | ||
156 | */ | ||
157 | int copy_from_user_real(void *dest, void __user *src, size_t count) | ||
158 | { | ||
159 | int offs = 0, size, rc; | ||
160 | char *buf; | ||
161 | |||
162 | buf = (char *) __get_free_page(GFP_KERNEL); | ||
163 | if (!buf) | ||
164 | return -ENOMEM; | ||
165 | rc = -EFAULT; | ||
166 | while (offs < count) { | ||
167 | size = min(PAGE_SIZE, count - offs); | ||
168 | if (copy_from_user(buf, src + offs, size)) | ||
169 | goto out; | ||
170 | if (memcpy_real(dest + offs, buf, size)) | ||
171 | goto out; | ||
172 | offs += size; | ||
173 | } | ||
174 | rc = 0; | ||
175 | out: | ||
176 | free_page((unsigned long) buf); | ||
177 | return rc; | ||
178 | } | ||
179 | |||
180 | /* | ||
181 | * Check if physical address is within prefix or zero page | 155 | * Check if physical address is within prefix or zero page |
182 | */ | 156 | */ |
183 | static int is_swapped(unsigned long addr) | 157 | static int is_swapped(unsigned long addr) |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 3584ed9b20a1..796c9320c709 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/quicklist.h> | 17 | #include <linux/quicklist.h> |
18 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/swapops.h> | ||
20 | 21 | ||
21 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
22 | #include <asm/pgalloc.h> | 23 | #include <asm/pgalloc.h> |
@@ -594,6 +595,82 @@ unsigned long gmap_fault(unsigned long address, struct gmap *gmap) | |||
594 | } | 595 | } |
595 | EXPORT_SYMBOL_GPL(gmap_fault); | 596 | EXPORT_SYMBOL_GPL(gmap_fault); |
596 | 597 | ||
598 | static void gmap_zap_swap_entry(swp_entry_t entry, struct mm_struct *mm) | ||
599 | { | ||
600 | if (!non_swap_entry(entry)) | ||
601 | dec_mm_counter(mm, MM_SWAPENTS); | ||
602 | else if (is_migration_entry(entry)) { | ||
603 | struct page *page = migration_entry_to_page(entry); | ||
604 | |||
605 | if (PageAnon(page)) | ||
606 | dec_mm_counter(mm, MM_ANONPAGES); | ||
607 | else | ||
608 | dec_mm_counter(mm, MM_FILEPAGES); | ||
609 | } | ||
610 | free_swap_and_cache(entry); | ||
611 | } | ||
612 | |||
613 | /** | ||
614 | * The mm->mmap_sem lock must be held | ||
615 | */ | ||
616 | static void gmap_zap_unused(struct mm_struct *mm, unsigned long address) | ||
617 | { | ||
618 | unsigned long ptev, pgstev; | ||
619 | spinlock_t *ptl; | ||
620 | pgste_t pgste; | ||
621 | pte_t *ptep, pte; | ||
622 | |||
623 | ptep = get_locked_pte(mm, address, &ptl); | ||
624 | if (unlikely(!ptep)) | ||
625 | return; | ||
626 | pte = *ptep; | ||
627 | if (!pte_swap(pte)) | ||
628 | goto out_pte; | ||
629 | /* Zap unused and logically-zero pages */ | ||
630 | pgste = pgste_get_lock(ptep); | ||
631 | pgstev = pgste_val(pgste); | ||
632 | ptev = pte_val(pte); | ||
633 | if (((pgstev & _PGSTE_GPS_USAGE_MASK) == _PGSTE_GPS_USAGE_UNUSED) || | ||
634 | ((pgstev & _PGSTE_GPS_ZERO) && (ptev & _PAGE_INVALID))) { | ||
635 | gmap_zap_swap_entry(pte_to_swp_entry(pte), mm); | ||
636 | pte_clear(mm, address, ptep); | ||
637 | } | ||
638 | pgste_set_unlock(ptep, pgste); | ||
639 | out_pte: | ||
640 | pte_unmap_unlock(*ptep, ptl); | ||
641 | } | ||
642 | |||
643 | /* | ||
644 | * this function is assumed to be called with mmap_sem held | ||
645 | */ | ||
646 | void __gmap_zap(unsigned long address, struct gmap *gmap) | ||
647 | { | ||
648 | unsigned long *table, *segment_ptr; | ||
649 | unsigned long segment, pgstev, ptev; | ||
650 | struct gmap_pgtable *mp; | ||
651 | struct page *page; | ||
652 | |||
653 | segment_ptr = gmap_table_walk(address, gmap); | ||
654 | if (IS_ERR(segment_ptr)) | ||
655 | return; | ||
656 | segment = *segment_ptr; | ||
657 | if (segment & _SEGMENT_ENTRY_INVALID) | ||
658 | return; | ||
659 | page = pfn_to_page(segment >> PAGE_SHIFT); | ||
660 | mp = (struct gmap_pgtable *) page->index; | ||
661 | address = mp->vmaddr | (address & ~PMD_MASK); | ||
662 | /* Page table is present */ | ||
663 | table = (unsigned long *)(segment & _SEGMENT_ENTRY_ORIGIN); | ||
664 | table = table + ((address >> 12) & 0xff); | ||
665 | pgstev = table[PTRS_PER_PTE]; | ||
666 | ptev = table[0]; | ||
667 | /* quick check, checked again with locks held */ | ||
668 | if (((pgstev & _PGSTE_GPS_USAGE_MASK) == _PGSTE_GPS_USAGE_UNUSED) || | ||
669 | ((pgstev & _PGSTE_GPS_ZERO) && (ptev & _PAGE_INVALID))) | ||
670 | gmap_zap_unused(gmap->mm, address); | ||
671 | } | ||
672 | EXPORT_SYMBOL_GPL(__gmap_zap); | ||
673 | |||
597 | void gmap_discard(unsigned long from, unsigned long to, struct gmap *gmap) | 674 | void gmap_discard(unsigned long from, unsigned long to, struct gmap *gmap) |
598 | { | 675 | { |
599 | 676 | ||
@@ -671,7 +748,7 @@ EXPORT_SYMBOL_GPL(gmap_unregister_ipte_notifier); | |||
671 | /** | 748 | /** |
672 | * gmap_ipte_notify - mark a range of ptes for invalidation notification | 749 | * gmap_ipte_notify - mark a range of ptes for invalidation notification |
673 | * @gmap: pointer to guest mapping meta data structure | 750 | * @gmap: pointer to guest mapping meta data structure |
674 | * @address: virtual address in the guest address space | 751 | * @start: virtual address in the guest address space |
675 | * @len: size of area | 752 | * @len: size of area |
676 | * | 753 | * |
677 | * Returns 0 if for each page in the given range a gmap mapping exists and | 754 | * Returns 0 if for each page in the given range a gmap mapping exists and |
@@ -725,13 +802,12 @@ EXPORT_SYMBOL_GPL(gmap_ipte_notify); | |||
725 | /** | 802 | /** |
726 | * gmap_do_ipte_notify - call all invalidation callbacks for a specific pte. | 803 | * gmap_do_ipte_notify - call all invalidation callbacks for a specific pte. |
727 | * @mm: pointer to the process mm_struct | 804 | * @mm: pointer to the process mm_struct |
728 | * @addr: virtual address in the process address space | ||
729 | * @pte: pointer to the page table entry | 805 | * @pte: pointer to the page table entry |
730 | * | 806 | * |
731 | * This function is assumed to be called with the page table lock held | 807 | * This function is assumed to be called with the page table lock held |
732 | * for the pte to notify. | 808 | * for the pte to notify. |
733 | */ | 809 | */ |
734 | void gmap_do_ipte_notify(struct mm_struct *mm, unsigned long addr, pte_t *pte) | 810 | void gmap_do_ipte_notify(struct mm_struct *mm, pte_t *pte) |
735 | { | 811 | { |
736 | unsigned long segment_offset; | 812 | unsigned long segment_offset; |
737 | struct gmap_notifier *nb; | 813 | struct gmap_notifier *nb; |
@@ -802,6 +878,78 @@ static inline void page_table_free_pgste(unsigned long *table) | |||
802 | __free_page(page); | 878 | __free_page(page); |
803 | } | 879 | } |
804 | 880 | ||
881 | static inline unsigned long page_table_reset_pte(struct mm_struct *mm, | ||
882 | pmd_t *pmd, unsigned long addr, unsigned long end) | ||
883 | { | ||
884 | pte_t *start_pte, *pte; | ||
885 | spinlock_t *ptl; | ||
886 | pgste_t pgste; | ||
887 | |||
888 | start_pte = pte_offset_map_lock(mm, pmd, addr, &ptl); | ||
889 | pte = start_pte; | ||
890 | do { | ||
891 | pgste = pgste_get_lock(pte); | ||
892 | pgste_val(pgste) &= ~_PGSTE_GPS_USAGE_MASK; | ||
893 | pgste_set_unlock(pte, pgste); | ||
894 | } while (pte++, addr += PAGE_SIZE, addr != end); | ||
895 | pte_unmap_unlock(start_pte, ptl); | ||
896 | |||
897 | return addr; | ||
898 | } | ||
899 | |||
900 | static inline unsigned long page_table_reset_pmd(struct mm_struct *mm, | ||
901 | pud_t *pud, unsigned long addr, unsigned long end) | ||
902 | { | ||
903 | unsigned long next; | ||
904 | pmd_t *pmd; | ||
905 | |||
906 | pmd = pmd_offset(pud, addr); | ||
907 | do { | ||
908 | next = pmd_addr_end(addr, end); | ||
909 | if (pmd_none_or_clear_bad(pmd)) | ||
910 | continue; | ||
911 | next = page_table_reset_pte(mm, pmd, addr, next); | ||
912 | } while (pmd++, addr = next, addr != end); | ||
913 | |||
914 | return addr; | ||
915 | } | ||
916 | |||
917 | static inline unsigned long page_table_reset_pud(struct mm_struct *mm, | ||
918 | pgd_t *pgd, unsigned long addr, unsigned long end) | ||
919 | { | ||
920 | unsigned long next; | ||
921 | pud_t *pud; | ||
922 | |||
923 | pud = pud_offset(pgd, addr); | ||
924 | do { | ||
925 | next = pud_addr_end(addr, end); | ||
926 | if (pud_none_or_clear_bad(pud)) | ||
927 | continue; | ||
928 | next = page_table_reset_pmd(mm, pud, addr, next); | ||
929 | } while (pud++, addr = next, addr != end); | ||
930 | |||
931 | return addr; | ||
932 | } | ||
933 | |||
934 | void page_table_reset_pgste(struct mm_struct *mm, | ||
935 | unsigned long start, unsigned long end) | ||
936 | { | ||
937 | unsigned long addr, next; | ||
938 | pgd_t *pgd; | ||
939 | |||
940 | addr = start; | ||
941 | down_read(&mm->mmap_sem); | ||
942 | pgd = pgd_offset(mm, addr); | ||
943 | do { | ||
944 | next = pgd_addr_end(addr, end); | ||
945 | if (pgd_none_or_clear_bad(pgd)) | ||
946 | continue; | ||
947 | next = page_table_reset_pud(mm, pgd, addr, next); | ||
948 | } while (pgd++, addr = next, addr != end); | ||
949 | up_read(&mm->mmap_sem); | ||
950 | } | ||
951 | EXPORT_SYMBOL(page_table_reset_pgste); | ||
952 | |||
805 | int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, | 953 | int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, |
806 | unsigned long key, bool nq) | 954 | unsigned long key, bool nq) |
807 | { | 955 | { |
@@ -1248,7 +1396,7 @@ void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, | |||
1248 | { | 1396 | { |
1249 | struct list_head *lh = (struct list_head *) pgtable; | 1397 | struct list_head *lh = (struct list_head *) pgtable; |
1250 | 1398 | ||
1251 | assert_spin_locked(&mm->page_table_lock); | 1399 | assert_spin_locked(pmd_lockptr(mm, pmdp)); |
1252 | 1400 | ||
1253 | /* FIFO */ | 1401 | /* FIFO */ |
1254 | if (!pmd_huge_pte(mm, pmdp)) | 1402 | if (!pmd_huge_pte(mm, pmdp)) |
@@ -1264,7 +1412,7 @@ pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp) | |||
1264 | pgtable_t pgtable; | 1412 | pgtable_t pgtable; |
1265 | pte_t *ptep; | 1413 | pte_t *ptep; |
1266 | 1414 | ||
1267 | assert_spin_locked(&mm->page_table_lock); | 1415 | assert_spin_locked(pmd_lockptr(mm, pmdp)); |
1268 | 1416 | ||
1269 | /* FIFO */ | 1417 | /* FIFO */ |
1270 | pgtable = pmd_huge_pte(mm, pmdp); | 1418 | pgtable = pmd_huge_pte(mm, pmdp); |
diff --git a/arch/s390/pci/pci_debug.c b/arch/s390/pci/pci_debug.c index 75c69b402e05..c5c66840ac00 100644 --- a/arch/s390/pci/pci_debug.c +++ b/arch/s390/pci/pci_debug.c | |||
@@ -139,7 +139,7 @@ void zpci_debug_exit_device(struct zpci_dev *zdev) | |||
139 | int __init zpci_debug_init(void) | 139 | int __init zpci_debug_init(void) |
140 | { | 140 | { |
141 | /* event trace buffer */ | 141 | /* event trace buffer */ |
142 | pci_debug_msg_id = debug_register("pci_msg", 16, 1, 16 * sizeof(long)); | 142 | pci_debug_msg_id = debug_register("pci_msg", 8, 1, 8 * sizeof(long)); |
143 | if (!pci_debug_msg_id) | 143 | if (!pci_debug_msg_id) |
144 | return -EINVAL; | 144 | return -EINVAL; |
145 | debug_register_view(pci_debug_msg_id, &debug_sprintf_view); | 145 | debug_register_view(pci_debug_msg_id, &debug_sprintf_view); |
diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index 4630cf217b5b..2f947aba4bd4 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild | |||
@@ -4,6 +4,7 @@ header-y += | |||
4 | 4 | ||
5 | generic-y += barrier.h | 5 | generic-y += barrier.h |
6 | generic-y += clkdev.h | 6 | generic-y += clkdev.h |
7 | generic-y += cputime.h | ||
7 | generic-y += hash.h | 8 | generic-y += hash.h |
8 | generic-y += mcs_spinlock.h | 9 | generic-y += mcs_spinlock.h |
9 | generic-y += preempt.h | 10 | generic-y += preempt.h |
diff --git a/arch/score/include/asm/cputime.h b/arch/score/include/asm/cputime.h deleted file mode 100644 index 1fced99f0d67..000000000000 --- a/arch/score/include/asm/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_SCORE_CPUTIME_H | ||
2 | #define _ASM_SCORE_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* _ASM_SCORE_CPUTIME_H */ | ||
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 6357710753d5..364d204298fa 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -123,15 +123,6 @@ config SYS_SUPPORTS_NUMA | |||
123 | config SYS_SUPPORTS_PCI | 123 | config SYS_SUPPORTS_PCI |
124 | bool | 124 | bool |
125 | 125 | ||
126 | config SYS_SUPPORTS_CMT | ||
127 | bool | ||
128 | |||
129 | config SYS_SUPPORTS_MTU2 | ||
130 | bool | ||
131 | |||
132 | config SYS_SUPPORTS_TMU | ||
133 | bool | ||
134 | |||
135 | config STACKTRACE_SUPPORT | 126 | config STACKTRACE_SUPPORT |
136 | def_bool y | 127 | def_bool y |
137 | 128 | ||
@@ -191,14 +182,14 @@ config CPU_SH3 | |||
191 | bool | 182 | bool |
192 | select CPU_HAS_INTEVT | 183 | select CPU_HAS_INTEVT |
193 | select CPU_HAS_SR_RB | 184 | select CPU_HAS_SR_RB |
194 | select SYS_SUPPORTS_TMU | 185 | select SYS_SUPPORTS_SH_TMU |
195 | 186 | ||
196 | config CPU_SH4 | 187 | config CPU_SH4 |
197 | bool | 188 | bool |
198 | select CPU_HAS_INTEVT | 189 | select CPU_HAS_INTEVT |
199 | select CPU_HAS_SR_RB | 190 | select CPU_HAS_SR_RB |
200 | select CPU_HAS_FPU if !CPU_SH4AL_DSP | 191 | select CPU_HAS_FPU if !CPU_SH4AL_DSP |
201 | select SYS_SUPPORTS_TMU | 192 | select SYS_SUPPORTS_SH_TMU |
202 | select SYS_SUPPORTS_HUGETLBFS if MMU | 193 | select SYS_SUPPORTS_HUGETLBFS if MMU |
203 | 194 | ||
204 | config CPU_SH4A | 195 | config CPU_SH4A |
@@ -213,7 +204,7 @@ config CPU_SH4AL_DSP | |||
213 | config CPU_SH5 | 204 | config CPU_SH5 |
214 | bool | 205 | bool |
215 | select CPU_HAS_FPU | 206 | select CPU_HAS_FPU |
216 | select SYS_SUPPORTS_TMU | 207 | select SYS_SUPPORTS_SH_TMU |
217 | select SYS_SUPPORTS_HUGETLBFS if MMU | 208 | select SYS_SUPPORTS_HUGETLBFS if MMU |
218 | 209 | ||
219 | config CPU_SHX2 | 210 | config CPU_SHX2 |
@@ -250,7 +241,7 @@ choice | |||
250 | config CPU_SUBTYPE_SH7619 | 241 | config CPU_SUBTYPE_SH7619 |
251 | bool "Support SH7619 processor" | 242 | bool "Support SH7619 processor" |
252 | select CPU_SH2 | 243 | select CPU_SH2 |
253 | select SYS_SUPPORTS_CMT | 244 | select SYS_SUPPORTS_SH_CMT |
254 | 245 | ||
255 | # SH-2A Processor Support | 246 | # SH-2A Processor Support |
256 | 247 | ||
@@ -258,50 +249,50 @@ config CPU_SUBTYPE_SH7201 | |||
258 | bool "Support SH7201 processor" | 249 | bool "Support SH7201 processor" |
259 | select CPU_SH2A | 250 | select CPU_SH2A |
260 | select CPU_HAS_FPU | 251 | select CPU_HAS_FPU |
261 | select SYS_SUPPORTS_MTU2 | 252 | select SYS_SUPPORTS_SH_MTU2 |
262 | 253 | ||
263 | config CPU_SUBTYPE_SH7203 | 254 | config CPU_SUBTYPE_SH7203 |
264 | bool "Support SH7203 processor" | 255 | bool "Support SH7203 processor" |
265 | select CPU_SH2A | 256 | select CPU_SH2A |
266 | select CPU_HAS_FPU | 257 | select CPU_HAS_FPU |
267 | select SYS_SUPPORTS_CMT | 258 | select SYS_SUPPORTS_SH_CMT |
268 | select SYS_SUPPORTS_MTU2 | 259 | select SYS_SUPPORTS_SH_MTU2 |
269 | select ARCH_WANT_OPTIONAL_GPIOLIB | 260 | select ARCH_WANT_OPTIONAL_GPIOLIB |
270 | select PINCTRL | 261 | select PINCTRL |
271 | 262 | ||
272 | config CPU_SUBTYPE_SH7206 | 263 | config CPU_SUBTYPE_SH7206 |
273 | bool "Support SH7206 processor" | 264 | bool "Support SH7206 processor" |
274 | select CPU_SH2A | 265 | select CPU_SH2A |
275 | select SYS_SUPPORTS_CMT | 266 | select SYS_SUPPORTS_SH_CMT |
276 | select SYS_SUPPORTS_MTU2 | 267 | select SYS_SUPPORTS_SH_MTU2 |
277 | 268 | ||
278 | config CPU_SUBTYPE_SH7263 | 269 | config CPU_SUBTYPE_SH7263 |
279 | bool "Support SH7263 processor" | 270 | bool "Support SH7263 processor" |
280 | select CPU_SH2A | 271 | select CPU_SH2A |
281 | select CPU_HAS_FPU | 272 | select CPU_HAS_FPU |
282 | select SYS_SUPPORTS_CMT | 273 | select SYS_SUPPORTS_SH_CMT |
283 | select SYS_SUPPORTS_MTU2 | 274 | select SYS_SUPPORTS_SH_MTU2 |
284 | 275 | ||
285 | config CPU_SUBTYPE_SH7264 | 276 | config CPU_SUBTYPE_SH7264 |
286 | bool "Support SH7264 processor" | 277 | bool "Support SH7264 processor" |
287 | select CPU_SH2A | 278 | select CPU_SH2A |
288 | select CPU_HAS_FPU | 279 | select CPU_HAS_FPU |
289 | select SYS_SUPPORTS_CMT | 280 | select SYS_SUPPORTS_SH_CMT |
290 | select SYS_SUPPORTS_MTU2 | 281 | select SYS_SUPPORTS_SH_MTU2 |
291 | select PINCTRL | 282 | select PINCTRL |
292 | 283 | ||
293 | config CPU_SUBTYPE_SH7269 | 284 | config CPU_SUBTYPE_SH7269 |
294 | bool "Support SH7269 processor" | 285 | bool "Support SH7269 processor" |
295 | select CPU_SH2A | 286 | select CPU_SH2A |
296 | select CPU_HAS_FPU | 287 | select CPU_HAS_FPU |
297 | select SYS_SUPPORTS_CMT | 288 | select SYS_SUPPORTS_SH_CMT |
298 | select SYS_SUPPORTS_MTU2 | 289 | select SYS_SUPPORTS_SH_MTU2 |
299 | select PINCTRL | 290 | select PINCTRL |
300 | 291 | ||
301 | config CPU_SUBTYPE_MXG | 292 | config CPU_SUBTYPE_MXG |
302 | bool "Support MX-G processor" | 293 | bool "Support MX-G processor" |
303 | select CPU_SH2A | 294 | select CPU_SH2A |
304 | select SYS_SUPPORTS_MTU2 | 295 | select SYS_SUPPORTS_SH_MTU2 |
305 | help | 296 | help |
306 | Select MX-G if running on an R8A03022BG part. | 297 | Select MX-G if running on an R8A03022BG part. |
307 | 298 | ||
@@ -354,7 +345,7 @@ config CPU_SUBTYPE_SH7720 | |||
354 | bool "Support SH7720 processor" | 345 | bool "Support SH7720 processor" |
355 | select CPU_SH3 | 346 | select CPU_SH3 |
356 | select CPU_HAS_DSP | 347 | select CPU_HAS_DSP |
357 | select SYS_SUPPORTS_CMT | 348 | select SYS_SUPPORTS_SH_CMT |
358 | select ARCH_WANT_OPTIONAL_GPIOLIB | 349 | select ARCH_WANT_OPTIONAL_GPIOLIB |
359 | select USB_ARCH_HAS_OHCI | 350 | select USB_ARCH_HAS_OHCI |
360 | select USB_OHCI_SH if USB_OHCI_HCD | 351 | select USB_OHCI_SH if USB_OHCI_HCD |
@@ -366,7 +357,7 @@ config CPU_SUBTYPE_SH7721 | |||
366 | bool "Support SH7721 processor" | 357 | bool "Support SH7721 processor" |
367 | select CPU_SH3 | 358 | select CPU_SH3 |
368 | select CPU_HAS_DSP | 359 | select CPU_HAS_DSP |
369 | select SYS_SUPPORTS_CMT | 360 | select SYS_SUPPORTS_SH_CMT |
370 | select USB_ARCH_HAS_OHCI | 361 | select USB_ARCH_HAS_OHCI |
371 | select USB_OHCI_SH if USB_OHCI_HCD | 362 | select USB_OHCI_SH if USB_OHCI_HCD |
372 | help | 363 | help |
@@ -422,7 +413,7 @@ config CPU_SUBTYPE_SH7723 | |||
422 | select CPU_SHX2 | 413 | select CPU_SHX2 |
423 | select ARCH_SHMOBILE | 414 | select ARCH_SHMOBILE |
424 | select ARCH_SPARSEMEM_ENABLE | 415 | select ARCH_SPARSEMEM_ENABLE |
425 | select SYS_SUPPORTS_CMT | 416 | select SYS_SUPPORTS_SH_CMT |
426 | select ARCH_WANT_OPTIONAL_GPIOLIB | 417 | select ARCH_WANT_OPTIONAL_GPIOLIB |
427 | select PINCTRL | 418 | select PINCTRL |
428 | help | 419 | help |
@@ -434,7 +425,7 @@ config CPU_SUBTYPE_SH7724 | |||
434 | select CPU_SHX2 | 425 | select CPU_SHX2 |
435 | select ARCH_SHMOBILE | 426 | select ARCH_SHMOBILE |
436 | select ARCH_SPARSEMEM_ENABLE | 427 | select ARCH_SPARSEMEM_ENABLE |
437 | select SYS_SUPPORTS_CMT | 428 | select SYS_SUPPORTS_SH_CMT |
438 | select ARCH_WANT_OPTIONAL_GPIOLIB | 429 | select ARCH_WANT_OPTIONAL_GPIOLIB |
439 | select PINCTRL | 430 | select PINCTRL |
440 | help | 431 | help |
@@ -514,7 +505,7 @@ config CPU_SUBTYPE_SH7343 | |||
514 | bool "Support SH7343 processor" | 505 | bool "Support SH7343 processor" |
515 | select CPU_SH4AL_DSP | 506 | select CPU_SH4AL_DSP |
516 | select ARCH_SHMOBILE | 507 | select ARCH_SHMOBILE |
517 | select SYS_SUPPORTS_CMT | 508 | select SYS_SUPPORTS_SH_CMT |
518 | 509 | ||
519 | config CPU_SUBTYPE_SH7722 | 510 | config CPU_SUBTYPE_SH7722 |
520 | bool "Support SH7722 processor" | 511 | bool "Support SH7722 processor" |
@@ -523,7 +514,7 @@ config CPU_SUBTYPE_SH7722 | |||
523 | select ARCH_SHMOBILE | 514 | select ARCH_SHMOBILE |
524 | select ARCH_SPARSEMEM_ENABLE | 515 | select ARCH_SPARSEMEM_ENABLE |
525 | select SYS_SUPPORTS_NUMA | 516 | select SYS_SUPPORTS_NUMA |
526 | select SYS_SUPPORTS_CMT | 517 | select SYS_SUPPORTS_SH_CMT |
527 | select ARCH_WANT_OPTIONAL_GPIOLIB | 518 | select ARCH_WANT_OPTIONAL_GPIOLIB |
528 | select PINCTRL | 519 | select PINCTRL |
529 | 520 | ||
@@ -534,7 +525,7 @@ config CPU_SUBTYPE_SH7366 | |||
534 | select ARCH_SHMOBILE | 525 | select ARCH_SHMOBILE |
535 | select ARCH_SPARSEMEM_ENABLE | 526 | select ARCH_SPARSEMEM_ENABLE |
536 | select SYS_SUPPORTS_NUMA | 527 | select SYS_SUPPORTS_NUMA |
537 | select SYS_SUPPORTS_CMT | 528 | select SYS_SUPPORTS_SH_CMT |
538 | 529 | ||
539 | endchoice | 530 | endchoice |
540 | 531 | ||
@@ -567,27 +558,6 @@ source "arch/sh/boards/Kconfig" | |||
567 | 558 | ||
568 | menu "Timer and clock configuration" | 559 | menu "Timer and clock configuration" |
569 | 560 | ||
570 | config SH_TIMER_TMU | ||
571 | bool "TMU timer driver" | ||
572 | depends on SYS_SUPPORTS_TMU | ||
573 | default y | ||
574 | help | ||
575 | This enables the build of the TMU timer driver. | ||
576 | |||
577 | config SH_TIMER_CMT | ||
578 | bool "CMT timer driver" | ||
579 | depends on SYS_SUPPORTS_CMT | ||
580 | default y | ||
581 | help | ||
582 | This enables build of the CMT timer driver. | ||
583 | |||
584 | config SH_TIMER_MTU2 | ||
585 | bool "MTU2 timer driver" | ||
586 | depends on SYS_SUPPORTS_MTU2 | ||
587 | default y | ||
588 | help | ||
589 | This enables build of the MTU2 timer driver. | ||
590 | |||
591 | config SH_PCLK_FREQ | 561 | config SH_PCLK_FREQ |
592 | int "Peripheral clock frequency (in Hz)" | 562 | int "Peripheral clock frequency (in Hz)" |
593 | depends on SH_CLK_CPG_LEGACY | 563 | depends on SH_CLK_CPG_LEGACY |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 0833736afa32..65a1ecd77f96 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -217,19 +217,6 @@ void __init init_IRQ(void) | |||
217 | } | 217 | } |
218 | 218 | ||
219 | #ifdef CONFIG_HOTPLUG_CPU | 219 | #ifdef CONFIG_HOTPLUG_CPU |
220 | static void route_irq(struct irq_data *data, unsigned int irq, unsigned int cpu) | ||
221 | { | ||
222 | struct irq_desc *desc = irq_to_desc(irq); | ||
223 | struct irq_chip *chip = irq_data_get_irq_chip(data); | ||
224 | |||
225 | printk(KERN_INFO "IRQ%u: moving from cpu%u to cpu%u\n", | ||
226 | irq, data->node, cpu); | ||
227 | |||
228 | raw_spin_lock_irq(&desc->lock); | ||
229 | chip->irq_set_affinity(data, cpumask_of(cpu), false); | ||
230 | raw_spin_unlock_irq(&desc->lock); | ||
231 | } | ||
232 | |||
233 | /* | 220 | /* |
234 | * The CPU has been marked offline. Migrate IRQs off this CPU. If | 221 | * The CPU has been marked offline. Migrate IRQs off this CPU. If |
235 | * the affinity settings do not allow other CPUs, force them onto any | 222 | * the affinity settings do not allow other CPUs, force them onto any |
@@ -250,11 +237,8 @@ void migrate_irqs(void) | |||
250 | irq, cpu); | 237 | irq, cpu); |
251 | 238 | ||
252 | cpumask_setall(data->affinity); | 239 | cpumask_setall(data->affinity); |
253 | newcpu = cpumask_any_and(data->affinity, | ||
254 | cpu_online_mask); | ||
255 | } | 240 | } |
256 | 241 | irq_set_affinity(irq, data->affinity); | |
257 | route_irq(data, irq, newcpu); | ||
258 | } | 242 | } |
259 | } | 243 | } |
260 | } | 244 | } |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index c3d82b5f54ca..24e8b8705e7f 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -733,7 +733,7 @@ void __irq_entry timer_interrupt(int irq, struct pt_regs *regs) | |||
733 | irq_enter(); | 733 | irq_enter(); |
734 | 734 | ||
735 | local_cpu_data().irq0_irqs++; | 735 | local_cpu_data().irq0_irqs++; |
736 | kstat_incr_irqs_this_cpu(0, irq_to_desc(0)); | 736 | kstat_incr_irq_this_cpu(0); |
737 | 737 | ||
738 | if (unlikely(!evt->event_handler)) { | 738 | if (unlikely(!evt->event_handler)) { |
739 | printk(KERN_WARNING | 739 | printk(KERN_WARNING |
diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index a8fee078b92f..4acddc43ee0c 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild | |||
@@ -5,4 +5,5 @@ genhdr-y += unistd_64.h | |||
5 | genhdr-y += unistd_x32.h | 5 | genhdr-y += unistd_x32.h |
6 | 6 | ||
7 | generic-y += clkdev.h | 7 | generic-y += clkdev.h |
8 | generic-y += cputime.h | ||
8 | generic-y += mcs_spinlock.h | 9 | generic-y += mcs_spinlock.h |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index bc507d7640f8..63211ef5046a 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */ | 37 | #define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */ |
38 | #define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ | 38 | #define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ |
39 | #define X86_FEATURE_PN (0*32+18) /* Processor serial number */ | 39 | #define X86_FEATURE_PN (0*32+18) /* Processor serial number */ |
40 | #define X86_FEATURE_CLFLSH (0*32+19) /* "clflush" CLFLUSH instruction */ | 40 | #define X86_FEATURE_CLFLUSH (0*32+19) /* CLFLUSH instruction */ |
41 | #define X86_FEATURE_DS (0*32+21) /* "dts" Debug Store */ | 41 | #define X86_FEATURE_DS (0*32+21) /* "dts" Debug Store */ |
42 | #define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */ | 42 | #define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */ |
43 | #define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */ | 43 | #define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */ |
@@ -318,7 +318,7 @@ extern const char * const x86_power_flags[32]; | |||
318 | #define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN) | 318 | #define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN) |
319 | #define cpu_has_ds boot_cpu_has(X86_FEATURE_DS) | 319 | #define cpu_has_ds boot_cpu_has(X86_FEATURE_DS) |
320 | #define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS) | 320 | #define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS) |
321 | #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH) | 321 | #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLUSH) |
322 | #define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS) | 322 | #define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS) |
323 | #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) | 323 | #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) |
324 | #define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON) | 324 | #define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON) |
diff --git a/arch/x86/include/asm/cputime.h b/arch/x86/include/asm/cputime.h deleted file mode 100644 index 6d68ad7e0ea3..000000000000 --- a/arch/x86/include/asm/cputime.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/cputime.h> | ||
diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h index d3d74698dce9..1c7eefe32502 100644 --- a/arch/x86/include/asm/floppy.h +++ b/arch/x86/include/asm/floppy.h | |||
@@ -145,10 +145,10 @@ static int fd_request_irq(void) | |||
145 | { | 145 | { |
146 | if (can_use_virtual_dma) | 146 | if (can_use_virtual_dma) |
147 | return request_irq(FLOPPY_IRQ, floppy_hardint, | 147 | return request_irq(FLOPPY_IRQ, floppy_hardint, |
148 | IRQF_DISABLED, "floppy", NULL); | 148 | 0, "floppy", NULL); |
149 | else | 149 | else |
150 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 150 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
151 | IRQF_DISABLED, "floppy", NULL); | 151 | 0, "floppy", NULL); |
152 | } | 152 | } |
153 | 153 | ||
154 | static unsigned long dma_mem_alloc(unsigned long size) | 154 | static unsigned long dma_mem_alloc(unsigned long size) |
diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h index ab0ae1aa6d0a..230853da4ec0 100644 --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h | |||
@@ -33,6 +33,9 @@ typedef struct { | |||
33 | #ifdef CONFIG_X86_MCE_THRESHOLD | 33 | #ifdef CONFIG_X86_MCE_THRESHOLD |
34 | unsigned int irq_threshold_count; | 34 | unsigned int irq_threshold_count; |
35 | #endif | 35 | #endif |
36 | #if IS_ENABLED(CONFIG_HYPERV) || defined(CONFIG_XEN) | ||
37 | unsigned int irq_hv_callback_count; | ||
38 | #endif | ||
36 | } ____cacheline_aligned irq_cpustat_t; | 39 | } ____cacheline_aligned irq_cpustat_t; |
37 | 40 | ||
38 | DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); | 41 | DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); |
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index cd9c41938b8a..c163215abb9a 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86/include/asm/mshyperv.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASM_X86_MSHYPER_H | 2 | #define _ASM_X86_MSHYPER_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/interrupt.h> | ||
5 | #include <asm/hyperv.h> | 6 | #include <asm/hyperv.h> |
6 | 7 | ||
7 | struct ms_hyperv_info { | 8 | struct ms_hyperv_info { |
@@ -16,6 +17,7 @@ void hyperv_callback_vector(void); | |||
16 | #define trace_hyperv_callback_vector hyperv_callback_vector | 17 | #define trace_hyperv_callback_vector hyperv_callback_vector |
17 | #endif | 18 | #endif |
18 | void hyperv_vector_handler(struct pt_regs *regs); | 19 | void hyperv_vector_handler(struct pt_regs *regs); |
19 | void hv_register_vmbus_handler(int irq, irq_handler_t handler); | 20 | void hv_setup_vmbus_irq(void (*handler)(void)); |
21 | void hv_remove_vmbus_irq(void); | ||
20 | 22 | ||
21 | #endif | 23 | #endif |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index fdedd38fd0fc..a4ea02351f4d 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -449,6 +449,15 @@ struct stack_canary { | |||
449 | }; | 449 | }; |
450 | DECLARE_PER_CPU_ALIGNED(struct stack_canary, stack_canary); | 450 | DECLARE_PER_CPU_ALIGNED(struct stack_canary, stack_canary); |
451 | #endif | 451 | #endif |
452 | /* | ||
453 | * per-CPU IRQ handling stacks | ||
454 | */ | ||
455 | struct irq_stack { | ||
456 | u32 stack[THREAD_SIZE/sizeof(u32)]; | ||
457 | } __aligned(THREAD_SIZE); | ||
458 | |||
459 | DECLARE_PER_CPU(struct irq_stack *, hardirq_stack); | ||
460 | DECLARE_PER_CPU(struct irq_stack *, softirq_stack); | ||
452 | #endif /* X86_64 */ | 461 | #endif /* X86_64 */ |
453 | 462 | ||
454 | extern unsigned int xstate_size; | 463 | extern unsigned int xstate_size; |
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index e1940c06ed02..47e5de25ba79 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/compiler.h> | 10 | #include <linux/compiler.h> |
11 | #include <asm/page.h> | 11 | #include <asm/page.h> |
12 | #include <asm/percpu.h> | ||
12 | #include <asm/types.h> | 13 | #include <asm/types.h> |
13 | 14 | ||
14 | /* | 15 | /* |
@@ -32,12 +33,6 @@ struct thread_info { | |||
32 | mm_segment_t addr_limit; | 33 | mm_segment_t addr_limit; |
33 | struct restart_block restart_block; | 34 | struct restart_block restart_block; |
34 | void __user *sysenter_return; | 35 | void __user *sysenter_return; |
35 | #ifdef CONFIG_X86_32 | ||
36 | unsigned long previous_esp; /* ESP of the previous stack in | ||
37 | case of nested (IRQ) stacks | ||
38 | */ | ||
39 | __u8 supervisor_stack[0]; | ||
40 | #endif | ||
41 | unsigned int sig_on_uaccess_error:1; | 36 | unsigned int sig_on_uaccess_error:1; |
42 | unsigned int uaccess_err:1; /* uaccess failed */ | 37 | unsigned int uaccess_err:1; /* uaccess failed */ |
43 | }; | 38 | }; |
@@ -153,9 +148,9 @@ struct thread_info { | |||
153 | #define _TIF_WORK_CTXSW_PREV (_TIF_WORK_CTXSW|_TIF_USER_RETURN_NOTIFY) | 148 | #define _TIF_WORK_CTXSW_PREV (_TIF_WORK_CTXSW|_TIF_USER_RETURN_NOTIFY) |
154 | #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW) | 149 | #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW) |
155 | 150 | ||
156 | #ifdef CONFIG_X86_32 | 151 | #define STACK_WARN (THREAD_SIZE/8) |
152 | #define KERNEL_STACK_OFFSET (5*(BITS_PER_LONG/8)) | ||
157 | 153 | ||
158 | #define STACK_WARN (THREAD_SIZE/8) | ||
159 | /* | 154 | /* |
160 | * macros/functions for gaining access to the thread information structure | 155 | * macros/functions for gaining access to the thread information structure |
161 | * | 156 | * |
@@ -163,42 +158,6 @@ struct thread_info { | |||
163 | */ | 158 | */ |
164 | #ifndef __ASSEMBLY__ | 159 | #ifndef __ASSEMBLY__ |
165 | 160 | ||
166 | #define current_stack_pointer ({ \ | ||
167 | unsigned long sp; \ | ||
168 | asm("mov %%esp,%0" : "=g" (sp)); \ | ||
169 | sp; \ | ||
170 | }) | ||
171 | |||
172 | /* how to get the thread information struct from C */ | ||
173 | static inline struct thread_info *current_thread_info(void) | ||
174 | { | ||
175 | return (struct thread_info *) | ||
176 | (current_stack_pointer & ~(THREAD_SIZE - 1)); | ||
177 | } | ||
178 | |||
179 | #else /* !__ASSEMBLY__ */ | ||
180 | |||
181 | /* how to get the thread information struct from ASM */ | ||
182 | #define GET_THREAD_INFO(reg) \ | ||
183 | movl $-THREAD_SIZE, reg; \ | ||
184 | andl %esp, reg | ||
185 | |||
186 | /* use this one if reg already contains %esp */ | ||
187 | #define GET_THREAD_INFO_WITH_ESP(reg) \ | ||
188 | andl $-THREAD_SIZE, reg | ||
189 | |||
190 | #endif | ||
191 | |||
192 | #else /* X86_32 */ | ||
193 | |||
194 | #include <asm/percpu.h> | ||
195 | #define KERNEL_STACK_OFFSET (5*8) | ||
196 | |||
197 | /* | ||
198 | * macros/functions for gaining access to the thread information structure | ||
199 | * preempt_count needs to be 1 initially, until the scheduler is functional. | ||
200 | */ | ||
201 | #ifndef __ASSEMBLY__ | ||
202 | DECLARE_PER_CPU(unsigned long, kernel_stack); | 161 | DECLARE_PER_CPU(unsigned long, kernel_stack); |
203 | 162 | ||
204 | static inline struct thread_info *current_thread_info(void) | 163 | static inline struct thread_info *current_thread_info(void) |
@@ -213,8 +172,8 @@ static inline struct thread_info *current_thread_info(void) | |||
213 | 172 | ||
214 | /* how to get the thread information struct from ASM */ | 173 | /* how to get the thread information struct from ASM */ |
215 | #define GET_THREAD_INFO(reg) \ | 174 | #define GET_THREAD_INFO(reg) \ |
216 | movq PER_CPU_VAR(kernel_stack),reg ; \ | 175 | _ASM_MOV PER_CPU_VAR(kernel_stack),reg ; \ |
217 | subq $(THREAD_SIZE-KERNEL_STACK_OFFSET),reg | 176 | _ASM_SUB $(THREAD_SIZE-KERNEL_STACK_OFFSET),reg ; |
218 | 177 | ||
219 | /* | 178 | /* |
220 | * Same if PER_CPU_VAR(kernel_stack) is, perhaps with some offset, already in | 179 | * Same if PER_CPU_VAR(kernel_stack) is, perhaps with some offset, already in |
@@ -224,8 +183,6 @@ static inline struct thread_info *current_thread_info(void) | |||
224 | 183 | ||
225 | #endif | 184 | #endif |
226 | 185 | ||
227 | #endif /* !X86_32 */ | ||
228 | |||
229 | /* | 186 | /* |
230 | * Thread-synchronous status. | 187 | * Thread-synchronous status. |
231 | * | 188 | * |
diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h index c2a48139c340..3f556c6a0157 100644 --- a/arch/x86/include/asm/unistd.h +++ b/arch/x86/include/asm/unistd.h | |||
@@ -23,6 +23,9 @@ | |||
23 | # include <asm/unistd_64.h> | 23 | # include <asm/unistd_64.h> |
24 | # include <asm/unistd_64_x32.h> | 24 | # include <asm/unistd_64_x32.h> |
25 | # define __ARCH_WANT_COMPAT_SYS_TIME | 25 | # define __ARCH_WANT_COMPAT_SYS_TIME |
26 | # define __ARCH_WANT_COMPAT_SYS_GETDENTS64 | ||
27 | # define __ARCH_WANT_COMPAT_SYS_PREADV64 | ||
28 | # define __ARCH_WANT_COMPAT_SYS_PWRITEV64 | ||
26 | 29 | ||
27 | # endif | 30 | # endif |
28 | 31 | ||
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 8e28bf2fc3ef..a135239badb7 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -1025,7 +1025,8 @@ __setup("show_msr=", setup_show_msr); | |||
1025 | 1025 | ||
1026 | static __init int setup_noclflush(char *arg) | 1026 | static __init int setup_noclflush(char *arg) |
1027 | { | 1027 | { |
1028 | setup_clear_cpu_cap(X86_FEATURE_CLFLSH); | 1028 | setup_clear_cpu_cap(X86_FEATURE_CLFLUSH); |
1029 | setup_clear_cpu_cap(X86_FEATURE_CLFLUSHOPT); | ||
1029 | return 1; | 1030 | return 1; |
1030 | } | 1031 | } |
1031 | __setup("noclflush", setup_noclflush); | 1032 | __setup("noclflush", setup_noclflush); |
@@ -1078,6 +1079,10 @@ static __init int setup_disablecpuid(char *arg) | |||
1078 | } | 1079 | } |
1079 | __setup("clearcpuid=", setup_disablecpuid); | 1080 | __setup("clearcpuid=", setup_disablecpuid); |
1080 | 1081 | ||
1082 | DEFINE_PER_CPU(unsigned long, kernel_stack) = | ||
1083 | (unsigned long)&init_thread_union - KERNEL_STACK_OFFSET + THREAD_SIZE; | ||
1084 | EXPORT_PER_CPU_SYMBOL(kernel_stack); | ||
1085 | |||
1081 | #ifdef CONFIG_X86_64 | 1086 | #ifdef CONFIG_X86_64 |
1082 | struct desc_ptr idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) idt_table }; | 1087 | struct desc_ptr idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) idt_table }; |
1083 | struct desc_ptr debug_idt_descr = { NR_VECTORS * 16 - 1, | 1088 | struct desc_ptr debug_idt_descr = { NR_VECTORS * 16 - 1, |
@@ -1094,10 +1099,6 @@ DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned = | |||
1094 | &init_task; | 1099 | &init_task; |
1095 | EXPORT_PER_CPU_SYMBOL(current_task); | 1100 | EXPORT_PER_CPU_SYMBOL(current_task); |
1096 | 1101 | ||
1097 | DEFINE_PER_CPU(unsigned long, kernel_stack) = | ||
1098 | (unsigned long)&init_thread_union - KERNEL_STACK_OFFSET + THREAD_SIZE; | ||
1099 | EXPORT_PER_CPU_SYMBOL(kernel_stack); | ||
1100 | |||
1101 | DEFINE_PER_CPU(char *, irq_stack_ptr) = | 1102 | DEFINE_PER_CPU(char *, irq_stack_ptr) = |
1102 | init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64; | 1103 | init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64; |
1103 | 1104 | ||
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index 832d05a914ba..76f98fe5b35c 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/hardirq.h> | 17 | #include <linux/hardirq.h> |
18 | #include <linux/efi.h> | 18 | #include <linux/efi.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/irq.h> | ||
20 | #include <asm/processor.h> | 21 | #include <asm/processor.h> |
21 | #include <asm/hypervisor.h> | 22 | #include <asm/hypervisor.h> |
22 | #include <asm/hyperv.h> | 23 | #include <asm/hyperv.h> |
@@ -31,6 +32,45 @@ | |||
31 | struct ms_hyperv_info ms_hyperv; | 32 | struct ms_hyperv_info ms_hyperv; |
32 | EXPORT_SYMBOL_GPL(ms_hyperv); | 33 | EXPORT_SYMBOL_GPL(ms_hyperv); |
33 | 34 | ||
35 | #if IS_ENABLED(CONFIG_HYPERV) | ||
36 | static void (*vmbus_handler)(void); | ||
37 | |||
38 | void hyperv_vector_handler(struct pt_regs *regs) | ||
39 | { | ||
40 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
41 | |||
42 | irq_enter(); | ||
43 | exit_idle(); | ||
44 | |||
45 | inc_irq_stat(irq_hv_callback_count); | ||
46 | if (vmbus_handler) | ||
47 | vmbus_handler(); | ||
48 | |||
49 | irq_exit(); | ||
50 | set_irq_regs(old_regs); | ||
51 | } | ||
52 | |||
53 | void hv_setup_vmbus_irq(void (*handler)(void)) | ||
54 | { | ||
55 | vmbus_handler = handler; | ||
56 | /* | ||
57 | * Setup the IDT for hypervisor callback. Prevent reallocation | ||
58 | * at module reload. | ||
59 | */ | ||
60 | if (!test_bit(HYPERVISOR_CALLBACK_VECTOR, used_vectors)) | ||
61 | alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, | ||
62 | hyperv_callback_vector); | ||
63 | } | ||
64 | |||
65 | void hv_remove_vmbus_irq(void) | ||
66 | { | ||
67 | /* We have no way to deallocate the interrupt gate */ | ||
68 | vmbus_handler = NULL; | ||
69 | } | ||
70 | EXPORT_SYMBOL_GPL(hv_setup_vmbus_irq); | ||
71 | EXPORT_SYMBOL_GPL(hv_remove_vmbus_irq); | ||
72 | #endif | ||
73 | |||
34 | static uint32_t __init ms_hyperv_platform(void) | 74 | static uint32_t __init ms_hyperv_platform(void) |
35 | { | 75 | { |
36 | u32 eax; | 76 | u32 eax; |
@@ -119,41 +159,3 @@ const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = { | |||
119 | .init_platform = ms_hyperv_init_platform, | 159 | .init_platform = ms_hyperv_init_platform, |
120 | }; | 160 | }; |
121 | EXPORT_SYMBOL(x86_hyper_ms_hyperv); | 161 | EXPORT_SYMBOL(x86_hyper_ms_hyperv); |
122 | |||
123 | #if IS_ENABLED(CONFIG_HYPERV) | ||
124 | static int vmbus_irq = -1; | ||
125 | static irq_handler_t vmbus_isr; | ||
126 | |||
127 | void hv_register_vmbus_handler(int irq, irq_handler_t handler) | ||
128 | { | ||
129 | /* | ||
130 | * Setup the IDT for hypervisor callback. | ||
131 | */ | ||
132 | alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector); | ||
133 | |||
134 | vmbus_irq = irq; | ||
135 | vmbus_isr = handler; | ||
136 | } | ||
137 | |||
138 | void hyperv_vector_handler(struct pt_regs *regs) | ||
139 | { | ||
140 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
141 | struct irq_desc *desc; | ||
142 | |||
143 | irq_enter(); | ||
144 | exit_idle(); | ||
145 | |||
146 | desc = irq_to_desc(vmbus_irq); | ||
147 | |||
148 | if (desc) | ||
149 | generic_handle_irq_desc(vmbus_irq, desc); | ||
150 | |||
151 | irq_exit(); | ||
152 | set_irq_regs(old_regs); | ||
153 | } | ||
154 | #else | ||
155 | void hv_register_vmbus_handler(int irq, irq_handler_t handler) | ||
156 | { | ||
157 | } | ||
158 | #endif | ||
159 | EXPORT_SYMBOL_GPL(hv_register_vmbus_handler); | ||
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c index a21d49c071db..5abd4cd4230c 100644 --- a/arch/x86/kernel/dumpstack_32.c +++ b/arch/x86/kernel/dumpstack_32.c | |||
@@ -16,12 +16,35 @@ | |||
16 | 16 | ||
17 | #include <asm/stacktrace.h> | 17 | #include <asm/stacktrace.h> |
18 | 18 | ||
19 | static void *is_irq_stack(void *p, void *irq) | ||
20 | { | ||
21 | if (p < irq || p >= (irq + THREAD_SIZE)) | ||
22 | return NULL; | ||
23 | return irq + THREAD_SIZE; | ||
24 | } | ||
25 | |||
26 | |||
27 | static void *is_hardirq_stack(unsigned long *stack, int cpu) | ||
28 | { | ||
29 | void *irq = per_cpu(hardirq_stack, cpu); | ||
30 | |||
31 | return is_irq_stack(stack, irq); | ||
32 | } | ||
33 | |||
34 | static void *is_softirq_stack(unsigned long *stack, int cpu) | ||
35 | { | ||
36 | void *irq = per_cpu(softirq_stack, cpu); | ||
37 | |||
38 | return is_irq_stack(stack, irq); | ||
39 | } | ||
19 | 40 | ||
20 | void dump_trace(struct task_struct *task, struct pt_regs *regs, | 41 | void dump_trace(struct task_struct *task, struct pt_regs *regs, |
21 | unsigned long *stack, unsigned long bp, | 42 | unsigned long *stack, unsigned long bp, |
22 | const struct stacktrace_ops *ops, void *data) | 43 | const struct stacktrace_ops *ops, void *data) |
23 | { | 44 | { |
45 | const unsigned cpu = get_cpu(); | ||
24 | int graph = 0; | 46 | int graph = 0; |
47 | u32 *prev_esp; | ||
25 | 48 | ||
26 | if (!task) | 49 | if (!task) |
27 | task = current; | 50 | task = current; |
@@ -39,18 +62,31 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
39 | 62 | ||
40 | for (;;) { | 63 | for (;;) { |
41 | struct thread_info *context; | 64 | struct thread_info *context; |
65 | void *end_stack; | ||
66 | |||
67 | end_stack = is_hardirq_stack(stack, cpu); | ||
68 | if (!end_stack) | ||
69 | end_stack = is_softirq_stack(stack, cpu); | ||
42 | 70 | ||
43 | context = (struct thread_info *) | 71 | context = task_thread_info(task); |
44 | ((unsigned long)stack & (~(THREAD_SIZE - 1))); | 72 | bp = ops->walk_stack(context, stack, bp, ops, data, |
45 | bp = ops->walk_stack(context, stack, bp, ops, data, NULL, &graph); | 73 | end_stack, &graph); |
46 | 74 | ||
47 | stack = (unsigned long *)context->previous_esp; | 75 | /* Stop if not on irq stack */ |
76 | if (!end_stack) | ||
77 | break; | ||
78 | |||
79 | /* The previous esp is saved on the bottom of the stack */ | ||
80 | prev_esp = (u32 *)(end_stack - THREAD_SIZE); | ||
81 | stack = (unsigned long *)*prev_esp; | ||
48 | if (!stack) | 82 | if (!stack) |
49 | break; | 83 | break; |
84 | |||
50 | if (ops->stack(data, "IRQ") < 0) | 85 | if (ops->stack(data, "IRQ") < 0) |
51 | break; | 86 | break; |
52 | touch_nmi_watchdog(); | 87 | touch_nmi_watchdog(); |
53 | } | 88 | } |
89 | put_cpu(); | ||
54 | } | 90 | } |
55 | EXPORT_SYMBOL(dump_trace); | 91 | EXPORT_SYMBOL(dump_trace); |
56 | 92 | ||
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index addb207dab92..346b1df2412e 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -104,6 +104,45 @@ in_irq_stack(unsigned long *stack, unsigned long *irq_stack, | |||
104 | return (stack >= irq_stack && stack < irq_stack_end); | 104 | return (stack >= irq_stack && stack < irq_stack_end); |
105 | } | 105 | } |
106 | 106 | ||
107 | static const unsigned long irq_stack_size = | ||
108 | (IRQ_STACK_SIZE - 64) / sizeof(unsigned long); | ||
109 | |||
110 | enum stack_type { | ||
111 | STACK_IS_UNKNOWN, | ||
112 | STACK_IS_NORMAL, | ||
113 | STACK_IS_EXCEPTION, | ||
114 | STACK_IS_IRQ, | ||
115 | }; | ||
116 | |||
117 | static enum stack_type | ||
118 | analyze_stack(int cpu, struct task_struct *task, | ||
119 | unsigned long *stack, unsigned long **stack_end, char **id) | ||
120 | { | ||
121 | unsigned long *irq_stack; | ||
122 | unsigned long addr; | ||
123 | unsigned used = 0; | ||
124 | |||
125 | addr = ((unsigned long)stack & (~(THREAD_SIZE - 1))); | ||
126 | if ((unsigned long)task_stack_page(task) == addr) | ||
127 | return STACK_IS_NORMAL; | ||
128 | |||
129 | *stack_end = in_exception_stack(cpu, (unsigned long)stack, | ||
130 | &used, id); | ||
131 | if (*stack_end) | ||
132 | return STACK_IS_EXCEPTION; | ||
133 | |||
134 | *stack_end = (unsigned long *)per_cpu(irq_stack_ptr, cpu); | ||
135 | if (!*stack_end) | ||
136 | return STACK_IS_UNKNOWN; | ||
137 | |||
138 | irq_stack = *stack_end - irq_stack_size; | ||
139 | |||
140 | if (in_irq_stack(stack, irq_stack, *stack_end)) | ||
141 | return STACK_IS_IRQ; | ||
142 | |||
143 | return STACK_IS_UNKNOWN; | ||
144 | } | ||
145 | |||
107 | /* | 146 | /* |
108 | * x86-64 can have up to three kernel stacks: | 147 | * x86-64 can have up to three kernel stacks: |
109 | * process stack | 148 | * process stack |
@@ -116,12 +155,11 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
116 | const struct stacktrace_ops *ops, void *data) | 155 | const struct stacktrace_ops *ops, void *data) |
117 | { | 156 | { |
118 | const unsigned cpu = get_cpu(); | 157 | const unsigned cpu = get_cpu(); |
119 | unsigned long *irq_stack_end = | ||
120 | (unsigned long *)per_cpu(irq_stack_ptr, cpu); | ||
121 | unsigned used = 0; | ||
122 | struct thread_info *tinfo; | 158 | struct thread_info *tinfo; |
123 | int graph = 0; | 159 | unsigned long *irq_stack; |
124 | unsigned long dummy; | 160 | unsigned long dummy; |
161 | int graph = 0; | ||
162 | int done = 0; | ||
125 | 163 | ||
126 | if (!task) | 164 | if (!task) |
127 | task = current; | 165 | task = current; |
@@ -143,49 +181,60 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
143 | * exceptions | 181 | * exceptions |
144 | */ | 182 | */ |
145 | tinfo = task_thread_info(task); | 183 | tinfo = task_thread_info(task); |
146 | for (;;) { | 184 | while (!done) { |
185 | unsigned long *stack_end; | ||
186 | enum stack_type stype; | ||
147 | char *id; | 187 | char *id; |
148 | unsigned long *estack_end; | ||
149 | estack_end = in_exception_stack(cpu, (unsigned long)stack, | ||
150 | &used, &id); | ||
151 | 188 | ||
152 | if (estack_end) { | 189 | stype = analyze_stack(cpu, task, stack, &stack_end, &id); |
190 | |||
191 | /* Default finish unless specified to continue */ | ||
192 | done = 1; | ||
193 | |||
194 | switch (stype) { | ||
195 | |||
196 | /* Break out early if we are on the thread stack */ | ||
197 | case STACK_IS_NORMAL: | ||
198 | break; | ||
199 | |||
200 | case STACK_IS_EXCEPTION: | ||
201 | |||
153 | if (ops->stack(data, id) < 0) | 202 | if (ops->stack(data, id) < 0) |
154 | break; | 203 | break; |
155 | 204 | ||
156 | bp = ops->walk_stack(tinfo, stack, bp, ops, | 205 | bp = ops->walk_stack(tinfo, stack, bp, ops, |
157 | data, estack_end, &graph); | 206 | data, stack_end, &graph); |
158 | ops->stack(data, "<EOE>"); | 207 | ops->stack(data, "<EOE>"); |
159 | /* | 208 | /* |
160 | * We link to the next stack via the | 209 | * We link to the next stack via the |
161 | * second-to-last pointer (index -2 to end) in the | 210 | * second-to-last pointer (index -2 to end) in the |
162 | * exception stack: | 211 | * exception stack: |
163 | */ | 212 | */ |
164 | stack = (unsigned long *) estack_end[-2]; | 213 | stack = (unsigned long *) stack_end[-2]; |
165 | continue; | 214 | done = 0; |
166 | } | 215 | break; |
167 | if (irq_stack_end) { | 216 | |
168 | unsigned long *irq_stack; | 217 | case STACK_IS_IRQ: |
169 | irq_stack = irq_stack_end - | 218 | |
170 | (IRQ_STACK_SIZE - 64) / sizeof(*irq_stack); | 219 | if (ops->stack(data, "IRQ") < 0) |
171 | 220 | break; | |
172 | if (in_irq_stack(stack, irq_stack, irq_stack_end)) { | 221 | bp = ops->walk_stack(tinfo, stack, bp, |
173 | if (ops->stack(data, "IRQ") < 0) | 222 | ops, data, stack_end, &graph); |
174 | break; | 223 | /* |
175 | bp = ops->walk_stack(tinfo, stack, bp, | 224 | * We link to the next stack (which would be |
176 | ops, data, irq_stack_end, &graph); | 225 | * the process stack normally) the last |
177 | /* | 226 | * pointer (index -1 to end) in the IRQ stack: |
178 | * We link to the next stack (which would be | 227 | */ |
179 | * the process stack normally) the last | 228 | stack = (unsigned long *) (stack_end[-1]); |
180 | * pointer (index -1 to end) in the IRQ stack: | 229 | irq_stack = stack_end - irq_stack_size; |
181 | */ | 230 | ops->stack(data, "EOI"); |
182 | stack = (unsigned long *) (irq_stack_end[-1]); | 231 | done = 0; |
183 | irq_stack_end = NULL; | 232 | break; |
184 | ops->stack(data, "EOI"); | 233 | |
185 | continue; | 234 | case STACK_IS_UNKNOWN: |
186 | } | 235 | ops->stack(data, "UNK"); |
236 | break; | ||
187 | } | 237 | } |
188 | break; | ||
189 | } | 238 | } |
190 | 239 | ||
191 | /* | 240 | /* |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index bc4a088f9023..6d7d5a1260a6 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -203,18 +203,15 @@ static void __init intel_remapping_check(int num, int slot, int func) | |||
203 | revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID); | 203 | revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID); |
204 | 204 | ||
205 | /* | 205 | /* |
206 | * Revision 13 of all triggering devices id in this quirk have | 206 | * Revision <= 13 of all triggering devices id in this quirk |
207 | * a problem draining interrupts when irq remapping is enabled, | 207 | * have a problem draining interrupts when irq remapping is |
208 | * and should be flagged as broken. Additionally revisions 0x12 | 208 | * enabled, and should be flagged as broken. Additionally |
209 | * and 0x22 of device id 0x3405 has this problem. | 209 | * revision 0x22 of device id 0x3405 has this problem. |
210 | */ | 210 | */ |
211 | if (revision == 0x13) | 211 | if (revision <= 0x13) |
212 | set_irq_remapping_broken(); | 212 | set_irq_remapping_broken(); |
213 | else if ((device == 0x3405) && | 213 | else if (device == 0x3405 && revision == 0x22) |
214 | ((revision == 0x12) || | ||
215 | (revision == 0x22))) | ||
216 | set_irq_remapping_broken(); | 214 | set_irq_remapping_broken(); |
217 | |||
218 | } | 215 | } |
219 | 216 | ||
220 | /* | 217 | /* |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index da85a8e830a1..014618dbaa7b 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -521,7 +521,7 @@ static int hpet_setup_irq(struct hpet_dev *dev) | |||
521 | { | 521 | { |
522 | 522 | ||
523 | if (request_irq(dev->irq, hpet_interrupt_handler, | 523 | if (request_irq(dev->irq, hpet_interrupt_handler, |
524 | IRQF_TIMER | IRQF_DISABLED | IRQF_NOBALANCING, | 524 | IRQF_TIMER | IRQF_NOBALANCING, |
525 | dev->name, dev)) | 525 | dev->name, dev)) |
526 | return -1; | 526 | return -1; |
527 | 527 | ||
@@ -699,7 +699,7 @@ static int hpet_cpuhp_notify(struct notifier_block *n, | |||
699 | /* FIXME: add schedule_work_on() */ | 699 | /* FIXME: add schedule_work_on() */ |
700 | schedule_delayed_work_on(cpu, &work.work, 0); | 700 | schedule_delayed_work_on(cpu, &work.work, 0); |
701 | wait_for_completion(&work.complete); | 701 | wait_for_completion(&work.complete); |
702 | destroy_timer_on_stack(&work.work.timer); | 702 | destroy_delayed_work_on_stack(&work.work); |
703 | break; | 703 | break; |
704 | case CPU_DEAD: | 704 | case CPU_DEAD: |
705 | if (hdev) { | 705 | if (hdev) { |
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index d99f31d9a750..42805fac0092 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -125,6 +125,12 @@ int arch_show_interrupts(struct seq_file *p, int prec) | |||
125 | seq_printf(p, "%10u ", per_cpu(mce_poll_count, j)); | 125 | seq_printf(p, "%10u ", per_cpu(mce_poll_count, j)); |
126 | seq_printf(p, " Machine check polls\n"); | 126 | seq_printf(p, " Machine check polls\n"); |
127 | #endif | 127 | #endif |
128 | #if defined(CONFIG_HYPERV) || defined(CONFIG_XEN) | ||
129 | seq_printf(p, "%*s: ", prec, "THR"); | ||
130 | for_each_online_cpu(j) | ||
131 | seq_printf(p, "%10u ", irq_stats(j)->irq_hv_callback_count); | ||
132 | seq_printf(p, " Hypervisor callback interrupts\n"); | ||
133 | #endif | ||
128 | seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); | 134 | seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); |
129 | #if defined(CONFIG_X86_IO_APIC) | 135 | #if defined(CONFIG_X86_IO_APIC) |
130 | seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count)); | 136 | seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count)); |
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index d7fcbedc9c43..63ce838e5a54 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -55,16 +55,8 @@ static inline int check_stack_overflow(void) { return 0; } | |||
55 | static inline void print_stack_overflow(void) { } | 55 | static inline void print_stack_overflow(void) { } |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | /* | 58 | DEFINE_PER_CPU(struct irq_stack *, hardirq_stack); |
59 | * per-CPU IRQ handling contexts (thread information and stack) | 59 | DEFINE_PER_CPU(struct irq_stack *, softirq_stack); |
60 | */ | ||
61 | union irq_ctx { | ||
62 | struct thread_info tinfo; | ||
63 | u32 stack[THREAD_SIZE/sizeof(u32)]; | ||
64 | } __attribute__((aligned(THREAD_SIZE))); | ||
65 | |||
66 | static DEFINE_PER_CPU(union irq_ctx *, hardirq_ctx); | ||
67 | static DEFINE_PER_CPU(union irq_ctx *, softirq_ctx); | ||
68 | 60 | ||
69 | static void call_on_stack(void *func, void *stack) | 61 | static void call_on_stack(void *func, void *stack) |
70 | { | 62 | { |
@@ -77,14 +69,26 @@ static void call_on_stack(void *func, void *stack) | |||
77 | : "memory", "cc", "edx", "ecx", "eax"); | 69 | : "memory", "cc", "edx", "ecx", "eax"); |
78 | } | 70 | } |
79 | 71 | ||
72 | /* how to get the current stack pointer from C */ | ||
73 | #define current_stack_pointer ({ \ | ||
74 | unsigned long sp; \ | ||
75 | asm("mov %%esp,%0" : "=g" (sp)); \ | ||
76 | sp; \ | ||
77 | }) | ||
78 | |||
79 | static inline void *current_stack(void) | ||
80 | { | ||
81 | return (void *)(current_stack_pointer & ~(THREAD_SIZE - 1)); | ||
82 | } | ||
83 | |||
80 | static inline int | 84 | static inline int |
81 | execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) | 85 | execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) |
82 | { | 86 | { |
83 | union irq_ctx *curctx, *irqctx; | 87 | struct irq_stack *curstk, *irqstk; |
84 | u32 *isp, arg1, arg2; | 88 | u32 *isp, *prev_esp, arg1, arg2; |
85 | 89 | ||
86 | curctx = (union irq_ctx *) current_thread_info(); | 90 | curstk = (struct irq_stack *) current_stack(); |
87 | irqctx = __this_cpu_read(hardirq_ctx); | 91 | irqstk = __this_cpu_read(hardirq_stack); |
88 | 92 | ||
89 | /* | 93 | /* |
90 | * this is where we switch to the IRQ stack. However, if we are | 94 | * this is where we switch to the IRQ stack. However, if we are |
@@ -92,13 +96,14 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) | |||
92 | * handler) we can't do that and just have to keep using the | 96 | * handler) we can't do that and just have to keep using the |
93 | * current stack (which is the irq stack already after all) | 97 | * current stack (which is the irq stack already after all) |
94 | */ | 98 | */ |
95 | if (unlikely(curctx == irqctx)) | 99 | if (unlikely(curstk == irqstk)) |
96 | return 0; | 100 | return 0; |
97 | 101 | ||
98 | /* build the stack frame on the IRQ stack */ | 102 | isp = (u32 *) ((char *)irqstk + sizeof(*irqstk)); |
99 | isp = (u32 *) ((char *)irqctx + sizeof(*irqctx)); | 103 | |
100 | irqctx->tinfo.task = curctx->tinfo.task; | 104 | /* Save the next esp at the bottom of the stack */ |
101 | irqctx->tinfo.previous_esp = current_stack_pointer; | 105 | prev_esp = (u32 *)irqstk; |
106 | *prev_esp = current_stack_pointer; | ||
102 | 107 | ||
103 | if (unlikely(overflow)) | 108 | if (unlikely(overflow)) |
104 | call_on_stack(print_stack_overflow, isp); | 109 | call_on_stack(print_stack_overflow, isp); |
@@ -118,46 +123,40 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) | |||
118 | */ | 123 | */ |
119 | void irq_ctx_init(int cpu) | 124 | void irq_ctx_init(int cpu) |
120 | { | 125 | { |
121 | union irq_ctx *irqctx; | 126 | struct irq_stack *irqstk; |
122 | 127 | ||
123 | if (per_cpu(hardirq_ctx, cpu)) | 128 | if (per_cpu(hardirq_stack, cpu)) |
124 | return; | 129 | return; |
125 | 130 | ||
126 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), | 131 | irqstk = page_address(alloc_pages_node(cpu_to_node(cpu), |
127 | THREADINFO_GFP, | 132 | THREADINFO_GFP, |
128 | THREAD_SIZE_ORDER)); | 133 | THREAD_SIZE_ORDER)); |
129 | memset(&irqctx->tinfo, 0, sizeof(struct thread_info)); | 134 | per_cpu(hardirq_stack, cpu) = irqstk; |
130 | irqctx->tinfo.cpu = cpu; | ||
131 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); | ||
132 | |||
133 | per_cpu(hardirq_ctx, cpu) = irqctx; | ||
134 | 135 | ||
135 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), | 136 | irqstk = page_address(alloc_pages_node(cpu_to_node(cpu), |
136 | THREADINFO_GFP, | 137 | THREADINFO_GFP, |
137 | THREAD_SIZE_ORDER)); | 138 | THREAD_SIZE_ORDER)); |
138 | memset(&irqctx->tinfo, 0, sizeof(struct thread_info)); | 139 | per_cpu(softirq_stack, cpu) = irqstk; |
139 | irqctx->tinfo.cpu = cpu; | ||
140 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); | ||
141 | |||
142 | per_cpu(softirq_ctx, cpu) = irqctx; | ||
143 | 140 | ||
144 | printk(KERN_DEBUG "CPU %u irqstacks, hard=%p soft=%p\n", | 141 | printk(KERN_DEBUG "CPU %u irqstacks, hard=%p soft=%p\n", |
145 | cpu, per_cpu(hardirq_ctx, cpu), per_cpu(softirq_ctx, cpu)); | 142 | cpu, per_cpu(hardirq_stack, cpu), per_cpu(softirq_stack, cpu)); |
146 | } | 143 | } |
147 | 144 | ||
148 | void do_softirq_own_stack(void) | 145 | void do_softirq_own_stack(void) |
149 | { | 146 | { |
150 | struct thread_info *curctx; | 147 | struct thread_info *curstk; |
151 | union irq_ctx *irqctx; | 148 | struct irq_stack *irqstk; |
152 | u32 *isp; | 149 | u32 *isp, *prev_esp; |
153 | 150 | ||
154 | curctx = current_thread_info(); | 151 | curstk = current_stack(); |
155 | irqctx = __this_cpu_read(softirq_ctx); | 152 | irqstk = __this_cpu_read(softirq_stack); |
156 | irqctx->tinfo.task = curctx->task; | ||
157 | irqctx->tinfo.previous_esp = current_stack_pointer; | ||
158 | 153 | ||
159 | /* build the stack frame on the softirq stack */ | 154 | /* build the stack frame on the softirq stack */ |
160 | isp = (u32 *) ((char *)irqctx + sizeof(*irqctx)); | 155 | isp = (u32 *) ((char *)irqstk + sizeof(*irqstk)); |
156 | |||
157 | /* Push the previous esp onto the stack */ | ||
158 | prev_esp = (u32 *)irqstk; | ||
159 | *prev_esp = current_stack_pointer; | ||
161 | 160 | ||
162 | call_on_stack(__do_softirq, isp); | 161 | call_on_stack(__do_softirq, isp); |
163 | } | 162 | } |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 0de43e98ce08..7bc86bbe7485 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -314,6 +314,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
314 | */ | 314 | */ |
315 | arch_end_context_switch(next_p); | 315 | arch_end_context_switch(next_p); |
316 | 316 | ||
317 | this_cpu_write(kernel_stack, | ||
318 | (unsigned long)task_stack_page(next_p) + | ||
319 | THREAD_SIZE - KERNEL_STACK_OFFSET); | ||
320 | |||
317 | /* | 321 | /* |
318 | * Restore %gs if needed (which is common) | 322 | * Restore %gs if needed (which is common) |
319 | */ | 323 | */ |
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 7461f50d5bb1..678c0ada3b3c 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -184,14 +184,14 @@ unsigned long kernel_stack_pointer(struct pt_regs *regs) | |||
184 | { | 184 | { |
185 | unsigned long context = (unsigned long)regs & ~(THREAD_SIZE - 1); | 185 | unsigned long context = (unsigned long)regs & ~(THREAD_SIZE - 1); |
186 | unsigned long sp = (unsigned long)®s->sp; | 186 | unsigned long sp = (unsigned long)®s->sp; |
187 | struct thread_info *tinfo; | 187 | u32 *prev_esp; |
188 | 188 | ||
189 | if (context == (sp & ~(THREAD_SIZE - 1))) | 189 | if (context == (sp & ~(THREAD_SIZE - 1))) |
190 | return sp; | 190 | return sp; |
191 | 191 | ||
192 | tinfo = (struct thread_info *)context; | 192 | prev_esp = (u32 *)(context); |
193 | if (tinfo->previous_esp) | 193 | if (prev_esp) |
194 | return tinfo->previous_esp; | 194 | return (unsigned long)prev_esp; |
195 | 195 | ||
196 | return (unsigned long)regs; | 196 | return (unsigned long)regs; |
197 | } | 197 | } |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index c752cb43e52f..654b46574b91 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -464,9 +464,12 @@ void __attribute__((weak)) mach_reboot_fixups(void) | |||
464 | * 2) If still alive, write to the keyboard controller | 464 | * 2) If still alive, write to the keyboard controller |
465 | * 3) If still alive, write to the ACPI reboot register again | 465 | * 3) If still alive, write to the ACPI reboot register again |
466 | * 4) If still alive, write to the keyboard controller again | 466 | * 4) If still alive, write to the keyboard controller again |
467 | * 5) If still alive, call the EFI runtime service to reboot | ||
468 | * 6) If still alive, write to the PCI IO port 0xCF9 to reboot | ||
469 | * 7) If still alive, inform BIOS to do a proper reboot | ||
467 | * | 470 | * |
468 | * If the machine is still alive at this stage, it gives up. We default to | 471 | * If the machine is still alive at this stage, it gives up. We default to |
469 | * following the same pattern, except that if we're still alive after (4) we'll | 472 | * following the same pattern, except that if we're still alive after (7) we'll |
470 | * try to force a triple fault and then cycle between hitting the keyboard | 473 | * try to force a triple fault and then cycle between hitting the keyboard |
471 | * controller and doing that | 474 | * controller and doing that |
472 | */ | 475 | */ |
@@ -502,7 +505,7 @@ static void native_machine_emergency_restart(void) | |||
502 | attempt = 1; | 505 | attempt = 1; |
503 | reboot_type = BOOT_ACPI; | 506 | reboot_type = BOOT_ACPI; |
504 | } else { | 507 | } else { |
505 | reboot_type = BOOT_TRIPLE; | 508 | reboot_type = BOOT_EFI; |
506 | } | 509 | } |
507 | break; | 510 | break; |
508 | 511 | ||
@@ -510,13 +513,15 @@ static void native_machine_emergency_restart(void) | |||
510 | load_idt(&no_idt); | 513 | load_idt(&no_idt); |
511 | __asm__ __volatile__("int3"); | 514 | __asm__ __volatile__("int3"); |
512 | 515 | ||
516 | /* We're probably dead after this, but... */ | ||
513 | reboot_type = BOOT_KBD; | 517 | reboot_type = BOOT_KBD; |
514 | break; | 518 | break; |
515 | 519 | ||
516 | case BOOT_BIOS: | 520 | case BOOT_BIOS: |
517 | machine_real_restart(MRR_BIOS); | 521 | machine_real_restart(MRR_BIOS); |
518 | 522 | ||
519 | reboot_type = BOOT_KBD; | 523 | /* We're probably dead after this, but... */ |
524 | reboot_type = BOOT_TRIPLE; | ||
520 | break; | 525 | break; |
521 | 526 | ||
522 | case BOOT_ACPI: | 527 | case BOOT_ACPI: |
@@ -530,7 +535,7 @@ static void native_machine_emergency_restart(void) | |||
530 | EFI_RESET_WARM : | 535 | EFI_RESET_WARM : |
531 | EFI_RESET_COLD, | 536 | EFI_RESET_COLD, |
532 | EFI_SUCCESS, 0, NULL); | 537 | EFI_SUCCESS, 0, NULL); |
533 | reboot_type = BOOT_KBD; | 538 | reboot_type = BOOT_CF9_COND; |
534 | break; | 539 | break; |
535 | 540 | ||
536 | case BOOT_CF9: | 541 | case BOOT_CF9: |
@@ -548,7 +553,7 @@ static void native_machine_emergency_restart(void) | |||
548 | outb(cf9|reboot_code, 0xcf9); | 553 | outb(cf9|reboot_code, 0xcf9); |
549 | udelay(50); | 554 | udelay(50); |
550 | } | 555 | } |
551 | reboot_type = BOOT_KBD; | 556 | reboot_type = BOOT_BIOS; |
552 | break; | 557 | break; |
553 | } | 558 | } |
554 | } | 559 | } |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 60179ec39d4c..34826934d4a7 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -766,10 +766,10 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) | |||
766 | #else | 766 | #else |
767 | clear_tsk_thread_flag(idle, TIF_FORK); | 767 | clear_tsk_thread_flag(idle, TIF_FORK); |
768 | initial_gs = per_cpu_offset(cpu); | 768 | initial_gs = per_cpu_offset(cpu); |
769 | #endif | ||
769 | per_cpu(kernel_stack, cpu) = | 770 | per_cpu(kernel_stack, cpu) = |
770 | (unsigned long)task_stack_page(idle) - | 771 | (unsigned long)task_stack_page(idle) - |
771 | KERNEL_STACK_OFFSET + THREAD_SIZE; | 772 | KERNEL_STACK_OFFSET + THREAD_SIZE; |
772 | #endif | ||
773 | early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu); | 773 | early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu); |
774 | initial_code = (unsigned long)start_secondary; | 774 | initial_code = (unsigned long)start_secondary; |
775 | stack_start = idle->thread.sp; | 775 | stack_start = idle->thread.sp; |
@@ -1387,7 +1387,7 @@ static inline void mwait_play_dead(void) | |||
1387 | 1387 | ||
1388 | if (!this_cpu_has(X86_FEATURE_MWAIT)) | 1388 | if (!this_cpu_has(X86_FEATURE_MWAIT)) |
1389 | return; | 1389 | return; |
1390 | if (!this_cpu_has(X86_FEATURE_CLFLSH)) | 1390 | if (!this_cpu_has(X86_FEATURE_CLFLUSH)) |
1391 | return; | 1391 | return; |
1392 | if (__this_cpu_read(cpu_info.cpuid_level) < CPUID_MWAIT_LEAF) | 1392 | if (__this_cpu_read(cpu_info.cpuid_level) < CPUID_MWAIT_LEAF) |
1393 | return; | 1393 | return; |
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c index 6ec91c00d84d..bf7ef5ce29df 100644 --- a/arch/x86/kernel/time.c +++ b/arch/x86/kernel/time.c | |||
@@ -62,7 +62,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
62 | 62 | ||
63 | static struct irqaction irq0 = { | 63 | static struct irqaction irq0 = { |
64 | .handler = timer_interrupt, | 64 | .handler = timer_interrupt, |
65 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER, | 65 | .flags = IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER, |
66 | .name = "timer" | 66 | .name = "timer" |
67 | }; | 67 | }; |
68 | 68 | ||
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index c6976257eff5..e5503d8aec1d 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c | |||
@@ -263,7 +263,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, | |||
263 | F(TSC) | F(MSR) | F(PAE) | F(MCE) | | 263 | F(TSC) | F(MSR) | F(PAE) | F(MCE) | |
264 | F(CX8) | F(APIC) | 0 /* Reserved */ | F(SEP) | | 264 | F(CX8) | F(APIC) | 0 /* Reserved */ | F(SEP) | |
265 | F(MTRR) | F(PGE) | F(MCA) | F(CMOV) | | 265 | F(MTRR) | F(PGE) | F(MCA) | F(CMOV) | |
266 | F(PAT) | F(PSE36) | 0 /* PSN */ | F(CLFLSH) | | 266 | F(PAT) | F(PSE36) | 0 /* PSN */ | F(CLFLUSH) | |
267 | 0 /* Reserved, DS, ACPI */ | F(MMX) | | 267 | 0 /* Reserved, DS, ACPI */ | F(MMX) | |
268 | F(FXSR) | F(XMM) | F(XMM2) | F(SELFSNOOP) | | 268 | F(FXSR) | F(XMM) | F(XMM2) | F(SELFSNOOP) | |
269 | 0 /* HTT, TM, Reserved, PBE */; | 269 | 0 /* HTT, TM, Reserved, PBE */; |
diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 1953e9c9391a..66338a60aa6e 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm/srat.c | |||
@@ -52,12 +52,18 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit) | |||
52 | int i, j; | 52 | int i, j; |
53 | 53 | ||
54 | for (i = 0; i < slit->locality_count; i++) { | 54 | for (i = 0; i < slit->locality_count; i++) { |
55 | if (pxm_to_node(i) == NUMA_NO_NODE) | 55 | const int from_node = pxm_to_node(i); |
56 | |||
57 | if (from_node == NUMA_NO_NODE) | ||
56 | continue; | 58 | continue; |
59 | |||
57 | for (j = 0; j < slit->locality_count; j++) { | 60 | for (j = 0; j < slit->locality_count; j++) { |
58 | if (pxm_to_node(j) == NUMA_NO_NODE) | 61 | const int to_node = pxm_to_node(j); |
62 | |||
63 | if (to_node == NUMA_NO_NODE) | ||
59 | continue; | 64 | continue; |
60 | numa_set_distance(pxm_to_node(i), pxm_to_node(j), | 65 | |
66 | numa_set_distance(from_node, to_node, | ||
61 | slit->entry[slit->locality_count * i + j]); | 67 | slit->entry[slit->locality_count * i + j]); |
62 | } | 68 | } |
63 | } | 69 | } |
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 581521c843a5..4d3acc34a998 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c | |||
@@ -183,7 +183,7 @@ __visible void xen_lock_spinning(struct arch_spinlock *lock, __ticket_t want) | |||
183 | 183 | ||
184 | local_irq_save(flags); | 184 | local_irq_save(flags); |
185 | 185 | ||
186 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | 186 | kstat_incr_irq_this_cpu(irq); |
187 | out: | 187 | out: |
188 | cpumask_clear_cpu(cpu, &waiting_cpus); | 188 | cpumask_clear_cpu(cpu, &waiting_cpus); |
189 | w->lock = NULL; | 189 | w->lock = NULL; |
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 482868a2de6e..3eee94f621eb 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -155,18 +155,6 @@ void __init init_IRQ(void) | |||
155 | } | 155 | } |
156 | 156 | ||
157 | #ifdef CONFIG_HOTPLUG_CPU | 157 | #ifdef CONFIG_HOTPLUG_CPU |
158 | static void route_irq(struct irq_data *data, unsigned int irq, unsigned int cpu) | ||
159 | { | ||
160 | struct irq_desc *desc = irq_to_desc(irq); | ||
161 | struct irq_chip *chip = irq_data_get_irq_chip(data); | ||
162 | unsigned long flags; | ||
163 | |||
164 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
165 | if (chip->irq_set_affinity) | ||
166 | chip->irq_set_affinity(data, cpumask_of(cpu), false); | ||
167 | raw_spin_unlock_irqrestore(&desc->lock, flags); | ||
168 | } | ||
169 | |||
170 | /* | 158 | /* |
171 | * The CPU has been marked offline. Migrate IRQs off this CPU. If | 159 | * The CPU has been marked offline. Migrate IRQs off this CPU. If |
172 | * the affinity settings do not allow other CPUs, force them onto any | 160 | * the affinity settings do not allow other CPUs, force them onto any |
@@ -175,10 +163,9 @@ static void route_irq(struct irq_data *data, unsigned int irq, unsigned int cpu) | |||
175 | void migrate_irqs(void) | 163 | void migrate_irqs(void) |
176 | { | 164 | { |
177 | unsigned int i, cpu = smp_processor_id(); | 165 | unsigned int i, cpu = smp_processor_id(); |
178 | struct irq_desc *desc; | ||
179 | 166 | ||
180 | for_each_irq_desc(i, desc) { | 167 | for_each_active_irq(i) { |
181 | struct irq_data *data = irq_desc_get_irq_data(desc); | 168 | struct irq_data *data = irq_get_irq_data(i); |
182 | unsigned int newcpu; | 169 | unsigned int newcpu; |
183 | 170 | ||
184 | if (irqd_is_per_cpu(data)) | 171 | if (irqd_is_per_cpu(data)) |
@@ -194,11 +181,8 @@ void migrate_irqs(void) | |||
194 | i, cpu); | 181 | i, cpu); |
195 | 182 | ||
196 | cpumask_setall(data->affinity); | 183 | cpumask_setall(data->affinity); |
197 | newcpu = cpumask_any_and(data->affinity, | ||
198 | cpu_online_mask); | ||
199 | } | 184 | } |
200 | 185 | irq_set_affinity(i, data->affinity); | |
201 | route_irq(data, i, newcpu); | ||
202 | } | 186 | } |
203 | } | 187 | } |
204 | #endif /* CONFIG_HOTPLUG_CPU */ | 188 | #endif /* CONFIG_HOTPLUG_CPU */ |