diff options
Diffstat (limited to 'arch')
268 files changed, 2180 insertions, 1446 deletions
diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h index 5ebab5895edb..f05bdb4b1cb9 100644 --- a/arch/alpha/include/asm/io.h +++ b/arch/alpha/include/asm/io.h | |||
| @@ -500,10 +500,14 @@ extern inline void writeq(u64 b, volatile void __iomem *addr) | |||
| 500 | #define outb_p outb | 500 | #define outb_p outb |
| 501 | #define outw_p outw | 501 | #define outw_p outw |
| 502 | #define outl_p outl | 502 | #define outl_p outl |
| 503 | #define readb_relaxed(addr) __raw_readb(addr) | 503 | #define readb_relaxed(addr) __raw_readb(addr) |
| 504 | #define readw_relaxed(addr) __raw_readw(addr) | 504 | #define readw_relaxed(addr) __raw_readw(addr) |
| 505 | #define readl_relaxed(addr) __raw_readl(addr) | 505 | #define readl_relaxed(addr) __raw_readl(addr) |
| 506 | #define readq_relaxed(addr) __raw_readq(addr) | 506 | #define readq_relaxed(addr) __raw_readq(addr) |
| 507 | #define writeb_relaxed(b, addr) __raw_writeb(b, addr) | ||
| 508 | #define writew_relaxed(b, addr) __raw_writew(b, addr) | ||
| 509 | #define writel_relaxed(b, addr) __raw_writel(b, addr) | ||
| 510 | #define writeq_relaxed(b, addr) __raw_writeq(b, addr) | ||
| 507 | 511 | ||
| 508 | #define mmiowb() | 512 | #define mmiowb() |
| 509 | 513 | ||
diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index f2c94402e2c8..c509d306db45 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <uapi/asm/unistd.h> | 4 | #include <uapi/asm/unistd.h> |
| 5 | 5 | ||
| 6 | #define NR_SYSCALLS 508 | 6 | #define NR_SYSCALLS 511 |
| 7 | 7 | ||
| 8 | #define __ARCH_WANT_OLD_READDIR | 8 | #define __ARCH_WANT_OLD_READDIR |
| 9 | #define __ARCH_WANT_STAT64 | 9 | #define __ARCH_WANT_STAT64 |
diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h index 53ae7bb1bfd1..d214a0358100 100644 --- a/arch/alpha/include/uapi/asm/unistd.h +++ b/arch/alpha/include/uapi/asm/unistd.h | |||
| @@ -469,5 +469,8 @@ | |||
| 469 | #define __NR_process_vm_writev 505 | 469 | #define __NR_process_vm_writev 505 |
| 470 | #define __NR_kcmp 506 | 470 | #define __NR_kcmp 506 |
| 471 | #define __NR_finit_module 507 | 471 | #define __NR_finit_module 507 |
| 472 | #define __NR_sched_setattr 508 | ||
| 473 | #define __NR_sched_getattr 509 | ||
| 474 | #define __NR_renameat2 510 | ||
| 472 | 475 | ||
| 473 | #endif /* _UAPI_ALPHA_UNISTD_H */ | 476 | #endif /* _UAPI_ALPHA_UNISTD_H */ |
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index dca9b3fb0071..24789713f1ea 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S | |||
| @@ -526,6 +526,9 @@ sys_call_table: | |||
| 526 | .quad sys_process_vm_writev /* 505 */ | 526 | .quad sys_process_vm_writev /* 505 */ |
| 527 | .quad sys_kcmp | 527 | .quad sys_kcmp |
| 528 | .quad sys_finit_module | 528 | .quad sys_finit_module |
| 529 | .quad sys_sched_setattr | ||
| 530 | .quad sys_sched_getattr | ||
| 531 | .quad sys_renameat2 /* 510 */ | ||
| 529 | 532 | ||
| 530 | .size sys_call_table, . - sys_call_table | 533 | .size sys_call_table, . - sys_call_table |
| 531 | .type sys_call_table, @object | 534 | .type sys_call_table, @object |
diff --git a/arch/arc/mm/cache_arc700.c b/arch/arc/mm/cache_arc700.c index 4670afc3b971..9e1142729fd1 100644 --- a/arch/arc/mm/cache_arc700.c +++ b/arch/arc/mm/cache_arc700.c | |||
| @@ -427,7 +427,7 @@ struct ic_inv_args { | |||
| 427 | 427 | ||
| 428 | static void __ic_line_inv_vaddr_helper(void *info) | 428 | static void __ic_line_inv_vaddr_helper(void *info) |
| 429 | { | 429 | { |
| 430 | struct ic_inv *ic_inv_args = (struct ic_inv_args *) info; | 430 | struct ic_inv_args *ic_inv = info; |
| 431 | 431 | ||
| 432 | __ic_line_inv_vaddr_local(ic_inv->paddr, ic_inv->vaddr, ic_inv->sz); | 432 | __ic_line_inv_vaddr_local(ic_inv->paddr, ic_inv->vaddr, ic_inv->sz); |
| 433 | } | 433 | } |
| @@ -581,6 +581,7 @@ void flush_icache_range(unsigned long kstart, unsigned long kend) | |||
| 581 | tot_sz -= sz; | 581 | tot_sz -= sz; |
| 582 | } | 582 | } |
| 583 | } | 583 | } |
| 584 | EXPORT_SYMBOL(flush_icache_range); | ||
| 584 | 585 | ||
| 585 | /* | 586 | /* |
| 586 | * General purpose helper to make I and D cache lines consistent. | 587 | * General purpose helper to make I and D cache lines consistent. |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c49a775937db..32cbbd565902 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -1983,8 +1983,6 @@ config XIP_PHYS_ADDR | |||
| 1983 | config KEXEC | 1983 | config KEXEC |
| 1984 | bool "Kexec system call (EXPERIMENTAL)" | 1984 | bool "Kexec system call (EXPERIMENTAL)" |
| 1985 | depends on (!SMP || PM_SLEEP_SMP) | 1985 | depends on (!SMP || PM_SLEEP_SMP) |
| 1986 | select CRYPTO | ||
| 1987 | select CRYPTO_SHA256 | ||
| 1988 | help | 1986 | help |
| 1989 | kexec is a system call that implements the ability to shutdown your | 1987 | kexec is a system call that implements the ability to shutdown your |
| 1990 | current kernel, and to start another kernel. It is like a reboot | 1988 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index 9b3d2ba82f13..8689949bdba3 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi | |||
| @@ -804,7 +804,7 @@ | |||
| 804 | 804 | ||
| 805 | usb1: usb@48390000 { | 805 | usb1: usb@48390000 { |
| 806 | compatible = "synopsys,dwc3"; | 806 | compatible = "synopsys,dwc3"; |
| 807 | reg = <0x48390000 0x17000>; | 807 | reg = <0x48390000 0x10000>; |
| 808 | interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; | 808 | interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; |
| 809 | phys = <&usb2_phy1>; | 809 | phys = <&usb2_phy1>; |
| 810 | phy-names = "usb2-phy"; | 810 | phy-names = "usb2-phy"; |
| @@ -826,7 +826,7 @@ | |||
| 826 | 826 | ||
| 827 | usb2: usb@483d0000 { | 827 | usb2: usb@483d0000 { |
| 828 | compatible = "synopsys,dwc3"; | 828 | compatible = "synopsys,dwc3"; |
| 829 | reg = <0x483d0000 0x17000>; | 829 | reg = <0x483d0000 0x10000>; |
| 830 | interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; | 830 | interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; |
| 831 | phys = <&usb2_phy2>; | 831 | phys = <&usb2_phy2>; |
| 832 | phy-names = "usb2-phy"; | 832 | phy-names = "usb2-phy"; |
diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts index 646a6eade788..e7ac47fa6615 100644 --- a/arch/arm/boot/dts/am437x-gp-evm.dts +++ b/arch/arm/boot/dts/am437x-gp-evm.dts | |||
| @@ -260,7 +260,7 @@ | |||
| 260 | status = "okay"; | 260 | status = "okay"; |
| 261 | pinctrl-names = "default"; | 261 | pinctrl-names = "default"; |
| 262 | pinctrl-0 = <&i2c0_pins>; | 262 | pinctrl-0 = <&i2c0_pins>; |
| 263 | clock-frequency = <400000>; | 263 | clock-frequency = <100000>; |
| 264 | 264 | ||
| 265 | tps65218: tps65218@24 { | 265 | tps65218: tps65218@24 { |
| 266 | reg = <0x24>; | 266 | reg = <0x24>; |
| @@ -424,7 +424,7 @@ | |||
| 424 | ranges = <0 0 0 0x01000000>; /* minimum GPMC partition = 16MB */ | 424 | ranges = <0 0 0 0x01000000>; /* minimum GPMC partition = 16MB */ |
| 425 | nand@0,0 { | 425 | nand@0,0 { |
| 426 | reg = <0 0 4>; /* device IO registers */ | 426 | reg = <0 0 4>; /* device IO registers */ |
| 427 | ti,nand-ecc-opt = "bch8"; | 427 | ti,nand-ecc-opt = "bch16"; |
| 428 | ti,elm-id = <&elm>; | 428 | ti,elm-id = <&elm>; |
| 429 | nand-bus-width = <8>; | 429 | nand-bus-width = <8>; |
| 430 | gpmc,device-width = <1>; | 430 | gpmc,device-width = <1>; |
| @@ -443,8 +443,6 @@ | |||
| 443 | gpmc,rd-cycle-ns = <40>; | 443 | gpmc,rd-cycle-ns = <40>; |
| 444 | gpmc,wr-cycle-ns = <40>; | 444 | gpmc,wr-cycle-ns = <40>; |
| 445 | gpmc,wait-pin = <0>; | 445 | gpmc,wait-pin = <0>; |
| 446 | gpmc,wait-on-read; | ||
| 447 | gpmc,wait-on-write; | ||
| 448 | gpmc,bus-turnaround-ns = <0>; | 446 | gpmc,bus-turnaround-ns = <0>; |
| 449 | gpmc,cycle2cycle-delay-ns = <0>; | 447 | gpmc,cycle2cycle-delay-ns = <0>; |
| 450 | gpmc,clk-activation-ns = <0>; | 448 | gpmc,clk-activation-ns = <0>; |
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts index ed7dd2395915..ac3e4859935f 100644 --- a/arch/arm/boot/dts/am43x-epos-evm.dts +++ b/arch/arm/boot/dts/am43x-epos-evm.dts | |||
| @@ -435,13 +435,13 @@ | |||
| 435 | }; | 435 | }; |
| 436 | 436 | ||
| 437 | &gpmc { | 437 | &gpmc { |
| 438 | status = "okay"; | 438 | status = "okay"; /* Disable QSPI when enabling GPMC (NAND) */ |
| 439 | pinctrl-names = "default"; | 439 | pinctrl-names = "default"; |
| 440 | pinctrl-0 = <&nand_flash_x8>; | 440 | pinctrl-0 = <&nand_flash_x8>; |
| 441 | ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ | 441 | ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ |
| 442 | nand@0,0 { | 442 | nand@0,0 { |
| 443 | reg = <0 0 0>; /* CS0, offset 0 */ | 443 | reg = <0 0 0>; /* CS0, offset 0 */ |
| 444 | ti,nand-ecc-opt = "bch8"; | 444 | ti,nand-ecc-opt = "bch16"; |
| 445 | ti,elm-id = <&elm>; | 445 | ti,elm-id = <&elm>; |
| 446 | nand-bus-width = <8>; | 446 | nand-bus-width = <8>; |
| 447 | gpmc,device-width = <1>; | 447 | gpmc,device-width = <1>; |
| @@ -459,8 +459,7 @@ | |||
| 459 | gpmc,access-ns = <30>; /* tCEA + 4*/ | 459 | gpmc,access-ns = <30>; /* tCEA + 4*/ |
| 460 | gpmc,rd-cycle-ns = <40>; | 460 | gpmc,rd-cycle-ns = <40>; |
| 461 | gpmc,wr-cycle-ns = <40>; | 461 | gpmc,wr-cycle-ns = <40>; |
| 462 | gpmc,wait-on-read = "true"; | 462 | gpmc,wait-pin = <0>; |
| 463 | gpmc,wait-on-write = "true"; | ||
| 464 | gpmc,bus-turnaround-ns = <0>; | 463 | gpmc,bus-turnaround-ns = <0>; |
| 465 | gpmc,cycle2cycle-delay-ns = <0>; | 464 | gpmc,cycle2cycle-delay-ns = <0>; |
| 466 | gpmc,clk-activation-ns = <0>; | 465 | gpmc,clk-activation-ns = <0>; |
| @@ -557,7 +556,7 @@ | |||
| 557 | }; | 556 | }; |
| 558 | 557 | ||
| 559 | &qspi { | 558 | &qspi { |
| 560 | status = "okay"; | 559 | status = "disabled"; /* Disable GPMC (NAND) when enabling QSPI */ |
| 561 | pinctrl-names = "default"; | 560 | pinctrl-names = "default"; |
| 562 | pinctrl-0 = <&qspi1_default>; | 561 | pinctrl-0 = <&qspi1_default>; |
| 563 | 562 | ||
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi index 65ccf564b9a5..6c97d4af61ee 100644 --- a/arch/arm/boot/dts/at91rm9200.dtsi +++ b/arch/arm/boot/dts/at91rm9200.dtsi | |||
| @@ -149,7 +149,7 @@ | |||
| 149 | usb: usbck { | 149 | usb: usbck { |
| 150 | compatible = "atmel,at91rm9200-clk-usb"; | 150 | compatible = "atmel,at91rm9200-clk-usb"; |
| 151 | #clock-cells = <0>; | 151 | #clock-cells = <0>; |
| 152 | atmel,clk-divisors = <1 2>; | 152 | atmel,clk-divisors = <1 2 0 0>; |
| 153 | clocks = <&pllb>; | 153 | clocks = <&pllb>; |
| 154 | }; | 154 | }; |
| 155 | 155 | ||
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi index 31f7652612fc..4e0abbd9d655 100644 --- a/arch/arm/boot/dts/at91sam9g20.dtsi +++ b/arch/arm/boot/dts/at91sam9g20.dtsi | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | pllb: pllbck { | 42 | pllb: pllbck { |
| 43 | compatible = "atmel,at91sam9g20-clk-pllb"; | ||
| 43 | atmel,clk-input-range = <2000000 32000000>; | 44 | atmel,clk-input-range = <2000000 32000000>; |
| 44 | atmel,pll-clk-output-ranges = <30000000 100000000 0 0>; | 45 | atmel,pll-clk-output-ranges = <30000000 100000000 0 0>; |
| 45 | }; | 46 | }; |
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 50f8022905a1..b40cdadb1f87 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | /dts-v1/; | 8 | /dts-v1/; |
| 9 | 9 | ||
| 10 | #include "dra74x.dtsi" | 10 | #include "dra74x.dtsi" |
| 11 | #include <dt-bindings/gpio/gpio.h> | ||
| 11 | 12 | ||
| 12 | / { | 13 | / { |
| 13 | model = "TI DRA742"; | 14 | model = "TI DRA742"; |
| @@ -24,9 +25,29 @@ | |||
| 24 | regulator-min-microvolt = <3300000>; | 25 | regulator-min-microvolt = <3300000>; |
| 25 | regulator-max-microvolt = <3300000>; | 26 | regulator-max-microvolt = <3300000>; |
| 26 | }; | 27 | }; |
| 28 | |||
| 29 | vtt_fixed: fixedregulator-vtt { | ||
| 30 | compatible = "regulator-fixed"; | ||
| 31 | regulator-name = "vtt_fixed"; | ||
| 32 | regulator-min-microvolt = <1350000>; | ||
| 33 | regulator-max-microvolt = <1350000>; | ||
| 34 | regulator-always-on; | ||
| 35 | regulator-boot-on; | ||
| 36 | enable-active-high; | ||
| 37 | gpio = <&gpio7 11 GPIO_ACTIVE_HIGH>; | ||
| 38 | }; | ||
| 27 | }; | 39 | }; |
| 28 | 40 | ||
| 29 | &dra7_pmx_core { | 41 | &dra7_pmx_core { |
| 42 | pinctrl-names = "default"; | ||
| 43 | pinctrl-0 = <&vtt_pin>; | ||
| 44 | |||
| 45 | vtt_pin: pinmux_vtt_pin { | ||
| 46 | pinctrl-single,pins = < | ||
| 47 | 0x3b4 (PIN_OUTPUT | MUX_MODE14) /* spi1_cs1.gpio7_11 */ | ||
| 48 | >; | ||
| 49 | }; | ||
| 50 | |||
| 30 | i2c1_pins: pinmux_i2c1_pins { | 51 | i2c1_pins: pinmux_i2c1_pins { |
| 31 | pinctrl-single,pins = < | 52 | pinctrl-single,pins = < |
| 32 | 0x400 (PIN_INPUT | MUX_MODE0) /* i2c1_sda */ | 53 | 0x400 (PIN_INPUT | MUX_MODE0) /* i2c1_sda */ |
| @@ -43,20 +64,19 @@ | |||
| 43 | 64 | ||
| 44 | i2c3_pins: pinmux_i2c3_pins { | 65 | i2c3_pins: pinmux_i2c3_pins { |
| 45 | pinctrl-single,pins = < | 66 | pinctrl-single,pins = < |
| 46 | 0x410 (PIN_INPUT | MUX_MODE0) /* i2c3_sda */ | 67 | 0x288 (PIN_INPUT | MUX_MODE9) /* gpio6_14.i2c3_sda */ |
| 47 | 0x414 (PIN_INPUT | MUX_MODE0) /* i2c3_scl */ | 68 | 0x28c (PIN_INPUT | MUX_MODE9) /* gpio6_15.i2c3_scl */ |
| 48 | >; | 69 | >; |
| 49 | }; | 70 | }; |
| 50 | 71 | ||
| 51 | mcspi1_pins: pinmux_mcspi1_pins { | 72 | mcspi1_pins: pinmux_mcspi1_pins { |
| 52 | pinctrl-single,pins = < | 73 | pinctrl-single,pins = < |
| 53 | 0x3a4 (PIN_INPUT | MUX_MODE0) /* spi2_clk */ | 74 | 0x3a4 (PIN_INPUT | MUX_MODE0) /* spi1_sclk */ |
| 54 | 0x3a8 (PIN_INPUT | MUX_MODE0) /* spi2_d1 */ | 75 | 0x3a8 (PIN_INPUT | MUX_MODE0) /* spi1_d1 */ |
| 55 | 0x3ac (PIN_INPUT | MUX_MODE0) /* spi2_d0 */ | 76 | 0x3ac (PIN_INPUT | MUX_MODE0) /* spi1_d0 */ |
| 56 | 0x3b0 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_cs0 */ | 77 | 0x3b0 (PIN_INPUT_SLEW | MUX_MODE0) /* spi1_cs0 */ |
| 57 | 0x3b4 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_cs1 */ | 78 | 0x3b8 (PIN_INPUT_SLEW | MUX_MODE6) /* spi1_cs2.hdmi1_hpd */ |
| 58 | 0x3b8 (PIN_INPUT_SLEW | MUX_MODE6) /* spi2_cs2 */ | 79 | 0x3bc (PIN_INPUT_SLEW | MUX_MODE6) /* spi1_cs3.hdmi1_cec */ |
| 59 | 0x3bc (PIN_INPUT_SLEW | MUX_MODE6) /* spi2_cs3 */ | ||
| 60 | >; | 80 | >; |
| 61 | }; | 81 | }; |
| 62 | 82 | ||
| @@ -284,7 +304,7 @@ | |||
| 284 | status = "okay"; | 304 | status = "okay"; |
| 285 | pinctrl-names = "default"; | 305 | pinctrl-names = "default"; |
| 286 | pinctrl-0 = <&i2c3_pins>; | 306 | pinctrl-0 = <&i2c3_pins>; |
| 287 | clock-frequency = <3400000>; | 307 | clock-frequency = <400000>; |
| 288 | }; | 308 | }; |
| 289 | 309 | ||
| 290 | &mcspi1 { | 310 | &mcspi1 { |
| @@ -427,22 +447,19 @@ | |||
| 427 | gpmc,device-width = <2>; | 447 | gpmc,device-width = <2>; |
| 428 | gpmc,sync-clk-ps = <0>; | 448 | gpmc,sync-clk-ps = <0>; |
| 429 | gpmc,cs-on-ns = <0>; | 449 | gpmc,cs-on-ns = <0>; |
| 430 | gpmc,cs-rd-off-ns = <40>; | 450 | gpmc,cs-rd-off-ns = <80>; |
| 431 | gpmc,cs-wr-off-ns = <40>; | 451 | gpmc,cs-wr-off-ns = <80>; |
| 432 | gpmc,adv-on-ns = <0>; | 452 | gpmc,adv-on-ns = <0>; |
| 433 | gpmc,adv-rd-off-ns = <30>; | 453 | gpmc,adv-rd-off-ns = <60>; |
| 434 | gpmc,adv-wr-off-ns = <30>; | 454 | gpmc,adv-wr-off-ns = <60>; |
| 435 | gpmc,we-on-ns = <5>; | 455 | gpmc,we-on-ns = <10>; |
| 436 | gpmc,we-off-ns = <25>; | 456 | gpmc,we-off-ns = <50>; |
| 437 | gpmc,oe-on-ns = <2>; | 457 | gpmc,oe-on-ns = <4>; |
| 438 | gpmc,oe-off-ns = <20>; | 458 | gpmc,oe-off-ns = <40>; |
| 439 | gpmc,access-ns = <20>; | 459 | gpmc,access-ns = <40>; |
| 440 | gpmc,wr-access-ns = <40>; | 460 | gpmc,wr-access-ns = <80>; |
| 441 | gpmc,rd-cycle-ns = <40>; | 461 | gpmc,rd-cycle-ns = <80>; |
| 442 | gpmc,wr-cycle-ns = <40>; | 462 | gpmc,wr-cycle-ns = <80>; |
| 443 | gpmc,wait-pin = <0>; | ||
| 444 | gpmc,wait-on-read; | ||
| 445 | gpmc,wait-on-write; | ||
| 446 | gpmc,bus-turnaround-ns = <0>; | 463 | gpmc,bus-turnaround-ns = <0>; |
| 447 | gpmc,cycle2cycle-delay-ns = <0>; | 464 | gpmc,cycle2cycle-delay-ns = <0>; |
| 448 | gpmc,clk-activation-ns = <0>; | 465 | gpmc,clk-activation-ns = <0>; |
| @@ -483,7 +500,7 @@ | |||
| 483 | reg = <0x001c0000 0x00020000>; | 500 | reg = <0x001c0000 0x00020000>; |
| 484 | }; | 501 | }; |
| 485 | partition@7 { | 502 | partition@7 { |
| 486 | label = "NAND.u-boot-env"; | 503 | label = "NAND.u-boot-env.backup1"; |
| 487 | reg = <0x001e0000 0x00020000>; | 504 | reg = <0x001e0000 0x00020000>; |
| 488 | }; | 505 | }; |
| 489 | partition@8 { | 506 | partition@8 { |
| @@ -504,3 +521,8 @@ | |||
| 504 | &usb2_phy2 { | 521 | &usb2_phy2 { |
| 505 | phy-supply = <&ldousb_reg>; | 522 | phy-supply = <&ldousb_reg>; |
| 506 | }; | 523 | }; |
| 524 | |||
| 525 | &gpio7 { | ||
| 526 | ti,no-reset-on-init; | ||
| 527 | ti,no-idle-on-init; | ||
| 528 | }; | ||
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 97f603c4483d..d678152db4cb 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi | |||
| @@ -245,7 +245,7 @@ | |||
| 245 | gpio-controller; | 245 | gpio-controller; |
| 246 | #gpio-cells = <2>; | 246 | #gpio-cells = <2>; |
| 247 | interrupt-controller; | 247 | interrupt-controller; |
| 248 | #interrupt-cells = <1>; | 248 | #interrupt-cells = <2>; |
| 249 | }; | 249 | }; |
| 250 | 250 | ||
| 251 | gpio2: gpio@48055000 { | 251 | gpio2: gpio@48055000 { |
| @@ -256,7 +256,7 @@ | |||
| 256 | gpio-controller; | 256 | gpio-controller; |
| 257 | #gpio-cells = <2>; | 257 | #gpio-cells = <2>; |
| 258 | interrupt-controller; | 258 | interrupt-controller; |
| 259 | #interrupt-cells = <1>; | 259 | #interrupt-cells = <2>; |
| 260 | }; | 260 | }; |
| 261 | 261 | ||
| 262 | gpio3: gpio@48057000 { | 262 | gpio3: gpio@48057000 { |
| @@ -267,7 +267,7 @@ | |||
| 267 | gpio-controller; | 267 | gpio-controller; |
| 268 | #gpio-cells = <2>; | 268 | #gpio-cells = <2>; |
| 269 | interrupt-controller; | 269 | interrupt-controller; |
| 270 | #interrupt-cells = <1>; | 270 | #interrupt-cells = <2>; |
| 271 | }; | 271 | }; |
| 272 | 272 | ||
| 273 | gpio4: gpio@48059000 { | 273 | gpio4: gpio@48059000 { |
| @@ -278,7 +278,7 @@ | |||
| 278 | gpio-controller; | 278 | gpio-controller; |
| 279 | #gpio-cells = <2>; | 279 | #gpio-cells = <2>; |
| 280 | interrupt-controller; | 280 | interrupt-controller; |
| 281 | #interrupt-cells = <1>; | 281 | #interrupt-cells = <2>; |
| 282 | }; | 282 | }; |
| 283 | 283 | ||
| 284 | gpio5: gpio@4805b000 { | 284 | gpio5: gpio@4805b000 { |
| @@ -289,7 +289,7 @@ | |||
| 289 | gpio-controller; | 289 | gpio-controller; |
| 290 | #gpio-cells = <2>; | 290 | #gpio-cells = <2>; |
| 291 | interrupt-controller; | 291 | interrupt-controller; |
| 292 | #interrupt-cells = <1>; | 292 | #interrupt-cells = <2>; |
| 293 | }; | 293 | }; |
| 294 | 294 | ||
| 295 | gpio6: gpio@4805d000 { | 295 | gpio6: gpio@4805d000 { |
| @@ -300,7 +300,7 @@ | |||
| 300 | gpio-controller; | 300 | gpio-controller; |
| 301 | #gpio-cells = <2>; | 301 | #gpio-cells = <2>; |
| 302 | interrupt-controller; | 302 | interrupt-controller; |
| 303 | #interrupt-cells = <1>; | 303 | #interrupt-cells = <2>; |
| 304 | }; | 304 | }; |
| 305 | 305 | ||
| 306 | gpio7: gpio@48051000 { | 306 | gpio7: gpio@48051000 { |
| @@ -311,7 +311,7 @@ | |||
| 311 | gpio-controller; | 311 | gpio-controller; |
| 312 | #gpio-cells = <2>; | 312 | #gpio-cells = <2>; |
| 313 | interrupt-controller; | 313 | interrupt-controller; |
| 314 | #interrupt-cells = <1>; | 314 | #interrupt-cells = <2>; |
| 315 | }; | 315 | }; |
| 316 | 316 | ||
| 317 | gpio8: gpio@48053000 { | 317 | gpio8: gpio@48053000 { |
| @@ -322,7 +322,7 @@ | |||
| 322 | gpio-controller; | 322 | gpio-controller; |
| 323 | #gpio-cells = <2>; | 323 | #gpio-cells = <2>; |
| 324 | interrupt-controller; | 324 | interrupt-controller; |
| 325 | #interrupt-cells = <1>; | 325 | #interrupt-cells = <2>; |
| 326 | }; | 326 | }; |
| 327 | 327 | ||
| 328 | uart1: serial@4806a000 { | 328 | uart1: serial@4806a000 { |
diff --git a/arch/arm/boot/dts/imx53-qsrb.dts b/arch/arm/boot/dts/imx53-qsrb.dts index f1bbf9a32991..82d623d05915 100644 --- a/arch/arm/boot/dts/imx53-qsrb.dts +++ b/arch/arm/boot/dts/imx53-qsrb.dts | |||
| @@ -28,6 +28,12 @@ | |||
| 28 | MX53_PAD_CSI0_DAT9__I2C1_SCL 0x400001ec | 28 | MX53_PAD_CSI0_DAT9__I2C1_SCL 0x400001ec |
| 29 | >; | 29 | >; |
| 30 | }; | 30 | }; |
| 31 | |||
| 32 | pinctrl_pmic: pmicgrp { | ||
| 33 | fsl,pins = < | ||
| 34 | MX53_PAD_CSI0_DAT5__GPIO5_23 0x1e4 /* IRQ */ | ||
| 35 | >; | ||
| 36 | }; | ||
| 31 | }; | 37 | }; |
| 32 | }; | 38 | }; |
| 33 | 39 | ||
| @@ -38,6 +44,8 @@ | |||
| 38 | 44 | ||
| 39 | pmic: mc34708@8 { | 45 | pmic: mc34708@8 { |
| 40 | compatible = "fsl,mc34708"; | 46 | compatible = "fsl,mc34708"; |
| 47 | pinctrl-names = "default"; | ||
| 48 | pinctrl-0 = <&pinctrl_pmic>; | ||
| 41 | reg = <0x08>; | 49 | reg = <0x08>; |
| 42 | interrupt-parent = <&gpio5>; | 50 | interrupt-parent = <&gpio5>; |
| 43 | interrupts = <23 0x8>; | 51 | interrupts = <23 0x8>; |
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index c6c58c1c00e3..6b675a02066f 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
| @@ -423,10 +423,14 @@ | |||
| 423 | status = "disabled"; | 423 | status = "disabled"; |
| 424 | 424 | ||
| 425 | lvds-channel@0 { | 425 | lvds-channel@0 { |
| 426 | #address-cells = <1>; | ||
| 427 | #size-cells = <0>; | ||
| 426 | reg = <0>; | 428 | reg = <0>; |
| 427 | status = "disabled"; | 429 | status = "disabled"; |
| 428 | 430 | ||
| 429 | port { | 431 | port@0 { |
| 432 | reg = <0>; | ||
| 433 | |||
| 430 | lvds0_in: endpoint { | 434 | lvds0_in: endpoint { |
| 431 | remote-endpoint = <&ipu_di0_lvds0>; | 435 | remote-endpoint = <&ipu_di0_lvds0>; |
| 432 | }; | 436 | }; |
| @@ -434,10 +438,14 @@ | |||
| 434 | }; | 438 | }; |
| 435 | 439 | ||
| 436 | lvds-channel@1 { | 440 | lvds-channel@1 { |
| 441 | #address-cells = <1>; | ||
| 442 | #size-cells = <0>; | ||
| 437 | reg = <1>; | 443 | reg = <1>; |
| 438 | status = "disabled"; | 444 | status = "disabled"; |
| 439 | 445 | ||
| 440 | port { | 446 | port@1 { |
| 447 | reg = <1>; | ||
| 448 | |||
| 441 | lvds1_in: endpoint { | 449 | lvds1_in: endpoint { |
| 442 | remote-endpoint = <&ipu_di1_lvds1>; | 450 | remote-endpoint = <&ipu_di1_lvds1>; |
| 443 | }; | 451 | }; |
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard.dts b/arch/arm/boot/dts/imx6dl-hummingboard.dts index c8e51dd41b8f..71598546087f 100644 --- a/arch/arm/boot/dts/imx6dl-hummingboard.dts +++ b/arch/arm/boot/dts/imx6dl-hummingboard.dts | |||
| @@ -58,7 +58,7 @@ | |||
| 58 | 58 | ||
| 59 | sound-spdif { | 59 | sound-spdif { |
| 60 | compatible = "fsl,imx-audio-spdif"; | 60 | compatible = "fsl,imx-audio-spdif"; |
| 61 | model = "imx-spdif"; | 61 | model = "On-board SPDIF"; |
| 62 | /* IMX6 doesn't implement this yet */ | 62 | /* IMX6 doesn't implement this yet */ |
| 63 | spdif-controller = <&spdif>; | 63 | spdif-controller = <&spdif>; |
| 64 | spdif-out; | 64 | spdif-out; |
| @@ -181,11 +181,13 @@ | |||
| 181 | }; | 181 | }; |
| 182 | 182 | ||
| 183 | &usbh1 { | 183 | &usbh1 { |
| 184 | disable-over-current; | ||
| 184 | vbus-supply = <®_usbh1_vbus>; | 185 | vbus-supply = <®_usbh1_vbus>; |
| 185 | status = "okay"; | 186 | status = "okay"; |
| 186 | }; | 187 | }; |
| 187 | 188 | ||
| 188 | &usbotg { | 189 | &usbotg { |
| 190 | disable-over-current; | ||
| 189 | pinctrl-names = "default"; | 191 | pinctrl-names = "default"; |
| 190 | pinctrl-0 = <&pinctrl_hummingboard_usbotg_id>; | 192 | pinctrl-0 = <&pinctrl_hummingboard_usbotg_id>; |
| 191 | vbus-supply = <®_usbotg_vbus>; | 193 | vbus-supply = <®_usbotg_vbus>; |
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi index e8e781656b3f..6a524ca011e7 100644 --- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi +++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | 61 | ||
| 62 | sound-spdif { | 62 | sound-spdif { |
| 63 | compatible = "fsl,imx-audio-spdif"; | 63 | compatible = "fsl,imx-audio-spdif"; |
| 64 | model = "imx-spdif"; | 64 | model = "Integrated SPDIF"; |
| 65 | /* IMX6 doesn't implement this yet */ | 65 | /* IMX6 doesn't implement this yet */ |
| 66 | spdif-controller = <&spdif>; | 66 | spdif-controller = <&spdif>; |
| 67 | spdif-out; | 67 | spdif-out; |
| @@ -130,16 +130,23 @@ | |||
| 130 | fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>; | 130 | fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>; |
| 131 | }; | 131 | }; |
| 132 | 132 | ||
| 133 | pinctrl_cubox_i_usbh1: cubox-i-usbh1 { | ||
| 134 | fsl,pins = <MX6QDL_PAD_GPIO_3__USB_H1_OC 0x1b0b0>; | ||
| 135 | }; | ||
| 136 | |||
| 133 | pinctrl_cubox_i_usbh1_vbus: cubox-i-usbh1-vbus { | 137 | pinctrl_cubox_i_usbh1_vbus: cubox-i-usbh1-vbus { |
| 134 | fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x4001b0b0>; | 138 | fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x4001b0b0>; |
| 135 | }; | 139 | }; |
| 136 | 140 | ||
| 137 | pinctrl_cubox_i_usbotg_id: cubox-i-usbotg-id { | 141 | pinctrl_cubox_i_usbotg: cubox-i-usbotg { |
| 138 | /* | 142 | /* |
| 139 | * The Cubox-i pulls this low, but as it's pointless | 143 | * The Cubox-i pulls ID low, but as it's pointless |
| 140 | * leaving it as a pull-up, even if it is just 10uA. | 144 | * leaving it as a pull-up, even if it is just 10uA. |
| 141 | */ | 145 | */ |
| 142 | fsl,pins = <MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059>; | 146 | fsl,pins = < |
| 147 | MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059 | ||
| 148 | MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0 | ||
| 149 | >; | ||
| 143 | }; | 150 | }; |
| 144 | 151 | ||
| 145 | pinctrl_cubox_i_usbotg_vbus: cubox-i-usbotg-vbus { | 152 | pinctrl_cubox_i_usbotg_vbus: cubox-i-usbotg-vbus { |
| @@ -173,13 +180,15 @@ | |||
| 173 | }; | 180 | }; |
| 174 | 181 | ||
| 175 | &usbh1 { | 182 | &usbh1 { |
| 183 | pinctrl-names = "default"; | ||
| 184 | pinctrl-0 = <&pinctrl_cubox_i_usbh1>; | ||
| 176 | vbus-supply = <®_usbh1_vbus>; | 185 | vbus-supply = <®_usbh1_vbus>; |
| 177 | status = "okay"; | 186 | status = "okay"; |
| 178 | }; | 187 | }; |
| 179 | 188 | ||
| 180 | &usbotg { | 189 | &usbotg { |
| 181 | pinctrl-names = "default"; | 190 | pinctrl-names = "default"; |
| 182 | pinctrl-0 = <&pinctrl_cubox_i_usbotg_id>; | 191 | pinctrl-0 = <&pinctrl_cubox_i_usbotg>; |
| 183 | vbus-supply = <®_usbotg_vbus>; | 192 | vbus-supply = <®_usbotg_vbus>; |
| 184 | status = "okay"; | 193 | status = "okay"; |
| 185 | }; | 194 | }; |
diff --git a/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi b/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi index d16066608e21..db9f45b2c573 100644 --- a/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi +++ b/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | enet { | 17 | enet { |
| 18 | pinctrl_microsom_enet_ar8035: microsom-enet-ar8035 { | 18 | pinctrl_microsom_enet_ar8035: microsom-enet-ar8035 { |
| 19 | fsl,pins = < | 19 | fsl,pins = < |
| 20 | MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 | 20 | MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b8b0 |
| 21 | MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 | 21 | MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 |
| 22 | /* AR8035 reset */ | 22 | /* AR8035 reset */ |
| 23 | MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0 | 23 | MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0 |
diff --git a/arch/arm/boot/dts/k2e-clocks.dtsi b/arch/arm/boot/dts/k2e-clocks.dtsi index 598afe91c676..4773d6af66a0 100644 --- a/arch/arm/boot/dts/k2e-clocks.dtsi +++ b/arch/arm/boot/dts/k2e-clocks.dtsi | |||
| @@ -40,7 +40,7 @@ clocks { | |||
| 40 | #clock-cells = <0>; | 40 | #clock-cells = <0>; |
| 41 | compatible = "ti,keystone,psc-clock"; | 41 | compatible = "ti,keystone,psc-clock"; |
| 42 | clocks = <&chipclk16>; | 42 | clocks = <&chipclk16>; |
| 43 | clock-output-names = "usb"; | 43 | clock-output-names = "usb1"; |
| 44 | reg = <0x02350004 0xb00>, <0x02350000 0x400>; | 44 | reg = <0x02350004 0xb00>, <0x02350000 0x400>; |
| 45 | reg-names = "control", "domain"; | 45 | reg-names = "control", "domain"; |
| 46 | domain-id = <0>; | 46 | domain-id = <0>; |
| @@ -60,8 +60,8 @@ clocks { | |||
| 60 | #clock-cells = <0>; | 60 | #clock-cells = <0>; |
| 61 | compatible = "ti,keystone,psc-clock"; | 61 | compatible = "ti,keystone,psc-clock"; |
| 62 | clocks = <&chipclk12>; | 62 | clocks = <&chipclk12>; |
| 63 | clock-output-names = "pcie"; | 63 | clock-output-names = "pcie1"; |
| 64 | reg = <0x0235006c 0xb00>, <0x02350000 0x400>; | 64 | reg = <0x0235006c 0xb00>, <0x02350048 0x400>; |
| 65 | reg-names = "control", "domain"; | 65 | reg-names = "control", "domain"; |
| 66 | domain-id = <18>; | 66 | domain-id = <18>; |
| 67 | }; | 67 | }; |
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index 3c3e6da1deac..a9aae88b74f5 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts | |||
| @@ -292,6 +292,7 @@ | |||
| 292 | &uart3 { | 292 | &uart3 { |
| 293 | pinctrl-names = "default"; | 293 | pinctrl-names = "default"; |
| 294 | pinctrl-0 = <&uart3_pins>; | 294 | pinctrl-0 = <&uart3_pins>; |
| 295 | interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>; | ||
| 295 | }; | 296 | }; |
| 296 | 297 | ||
| 297 | &gpio1 { | 298 | &gpio1 { |
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index b15f1a77d684..4361777a08d8 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts | |||
| @@ -93,7 +93,7 @@ | |||
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | tv: connector { | 95 | tv: connector { |
| 96 | compatible = "composite-connector"; | 96 | compatible = "composite-video-connector"; |
| 97 | label = "tv"; | 97 | label = "tv"; |
| 98 | 98 | ||
| 99 | port { | 99 | port { |
| @@ -353,7 +353,7 @@ | |||
| 353 | }; | 353 | }; |
| 354 | 354 | ||
| 355 | twl_power: power { | 355 | twl_power: power { |
| 356 | compatible = "ti,twl4030-power-n900"; | 356 | compatible = "ti,twl4030-power-n900", "ti,twl4030-power-idle-osc-off"; |
| 357 | ti,use_poweroff; | 357 | ti,use_poweroff; |
| 358 | }; | 358 | }; |
| 359 | }; | 359 | }; |
diff --git a/arch/arm/boot/dts/omap3430-sdp.dts b/arch/arm/boot/dts/omap3430-sdp.dts index 02f69f4a8fd3..9bad94efe1c8 100644 --- a/arch/arm/boot/dts/omap3430-sdp.dts +++ b/arch/arm/boot/dts/omap3430-sdp.dts | |||
| @@ -107,7 +107,7 @@ | |||
| 107 | #address-cells = <1>; | 107 | #address-cells = <1>; |
| 108 | #size-cells = <1>; | 108 | #size-cells = <1>; |
| 109 | reg = <1 0 0x08000000>; | 109 | reg = <1 0 0x08000000>; |
| 110 | ti,nand-ecc-opt = "ham1"; | 110 | ti,nand-ecc-opt = "sw"; |
| 111 | nand-bus-width = <8>; | 111 | nand-bus-width = <8>; |
| 112 | gpmc,cs-on-ns = <0>; | 112 | gpmc,cs-on-ns = <0>; |
| 113 | gpmc,cs-rd-off-ns = <36>; | 113 | gpmc,cs-rd-off-ns = <36>; |
diff --git a/arch/arm/boot/dts/omap3xxx-clocks.dtsi b/arch/arm/boot/dts/omap3xxx-clocks.dtsi index e47ff69dcf70..5c375003bad1 100644 --- a/arch/arm/boot/dts/omap3xxx-clocks.dtsi +++ b/arch/arm/boot/dts/omap3xxx-clocks.dtsi | |||
| @@ -467,6 +467,7 @@ | |||
| 467 | ti,bit-shift = <0x1e>; | 467 | ti,bit-shift = <0x1e>; |
| 468 | reg = <0x0d00>; | 468 | reg = <0x0d00>; |
| 469 | ti,set-bit-to-disable; | 469 | ti,set-bit-to-disable; |
| 470 | ti,set-rate-parent; | ||
| 470 | }; | 471 | }; |
| 471 | 472 | ||
| 472 | dpll4_m6_ck: dpll4_m6_ck { | 473 | dpll4_m6_ck: dpll4_m6_ck { |
diff --git a/arch/arm/boot/dts/omap5-cm-t54.dts b/arch/arm/boot/dts/omap5-cm-t54.dts index b8698ca68647..429471aa7a1f 100644 --- a/arch/arm/boot/dts/omap5-cm-t54.dts +++ b/arch/arm/boot/dts/omap5-cm-t54.dts | |||
| @@ -353,13 +353,12 @@ | |||
| 353 | }; | 353 | }; |
| 354 | 354 | ||
| 355 | ldo8_reg: ldo8 { | 355 | ldo8_reg: ldo8 { |
| 356 | /* VDD_3v0: Does not go anywhere */ | 356 | /* VDD_3V_GP: act led/serial console */ |
| 357 | regulator-name = "ldo8"; | 357 | regulator-name = "ldo8"; |
| 358 | regulator-min-microvolt = <3000000>; | 358 | regulator-min-microvolt = <3000000>; |
| 359 | regulator-max-microvolt = <3000000>; | 359 | regulator-max-microvolt = <3000000>; |
| 360 | regulator-always-on; | ||
| 360 | regulator-boot-on; | 361 | regulator-boot-on; |
| 361 | /* Unused */ | ||
| 362 | status = "disabled"; | ||
| 363 | }; | 362 | }; |
| 364 | 363 | ||
| 365 | ldo9_reg: ldo9 { | 364 | ldo9_reg: ldo9 { |
diff --git a/arch/arm/boot/dts/omap54xx-clocks.dtsi b/arch/arm/boot/dts/omap54xx-clocks.dtsi index e67a23b5d788..58c27466f012 100644 --- a/arch/arm/boot/dts/omap54xx-clocks.dtsi +++ b/arch/arm/boot/dts/omap54xx-clocks.dtsi | |||
| @@ -367,10 +367,12 @@ | |||
| 367 | 367 | ||
| 368 | l3_iclk_div: l3_iclk_div { | 368 | l3_iclk_div: l3_iclk_div { |
| 369 | #clock-cells = <0>; | 369 | #clock-cells = <0>; |
| 370 | compatible = "fixed-factor-clock"; | 370 | compatible = "ti,divider-clock"; |
| 371 | ti,max-div = <2>; | ||
| 372 | ti,bit-shift = <4>; | ||
| 373 | reg = <0x100>; | ||
| 371 | clocks = <&dpll_core_h12x2_ck>; | 374 | clocks = <&dpll_core_h12x2_ck>; |
| 372 | clock-mult = <1>; | 375 | ti,index-power-of-two; |
| 373 | clock-div = <1>; | ||
| 374 | }; | 376 | }; |
| 375 | 377 | ||
| 376 | gpu_l3_iclk: gpu_l3_iclk { | 378 | gpu_l3_iclk: gpu_l3_iclk { |
| @@ -383,10 +385,12 @@ | |||
| 383 | 385 | ||
| 384 | l4_root_clk_div: l4_root_clk_div { | 386 | l4_root_clk_div: l4_root_clk_div { |
| 385 | #clock-cells = <0>; | 387 | #clock-cells = <0>; |
| 386 | compatible = "fixed-factor-clock"; | 388 | compatible = "ti,divider-clock"; |
| 389 | ti,max-div = <2>; | ||
| 390 | ti,bit-shift = <8>; | ||
| 391 | reg = <0x100>; | ||
| 387 | clocks = <&l3_iclk_div>; | 392 | clocks = <&l3_iclk_div>; |
| 388 | clock-mult = <1>; | 393 | ti,index-power-of-two; |
| 389 | clock-div = <1>; | ||
| 390 | }; | 394 | }; |
| 391 | 395 | ||
| 392 | slimbus1_slimbus_clk: slimbus1_slimbus_clk { | 396 | slimbus1_slimbus_clk: slimbus1_slimbus_clk { |
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index 4a2000c620ad..3e97a669f15e 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts | |||
| @@ -116,7 +116,6 @@ | |||
| 116 | msp2: msp@80117000 { | 116 | msp2: msp@80117000 { |
| 117 | pinctrl-names = "default"; | 117 | pinctrl-names = "default"; |
| 118 | pinctrl-0 = <&msp2_default_mode>; | 118 | pinctrl-0 = <&msp2_default_mode>; |
| 119 | status = "okay"; | ||
| 120 | }; | 119 | }; |
| 121 | 120 | ||
| 122 | msp3: msp@80125000 { | 121 | msp3: msp@80125000 { |
diff --git a/arch/arm/boot/dts/twl6030.dtsi b/arch/arm/boot/dts/twl6030.dtsi index 2e3bd3172b23..55eb35f068fb 100644 --- a/arch/arm/boot/dts/twl6030.dtsi +++ b/arch/arm/boot/dts/twl6030.dtsi | |||
| @@ -83,10 +83,6 @@ | |||
| 83 | regulator-always-on; | 83 | regulator-always-on; |
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | clk32kg: regulator-clk32kg { | ||
| 87 | compatible = "ti,twl6030-clk32kg"; | ||
| 88 | }; | ||
| 89 | |||
| 90 | twl_usb_comparator: usb-comparator { | 86 | twl_usb_comparator: usb-comparator { |
| 91 | compatible = "ti,twl6030-usb"; | 87 | compatible = "ti,twl6030-usb"; |
| 92 | interrupts = <4>, <10>; | 88 | interrupts = <4>, <10>; |
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 88099175fc56..d86771abbf57 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c | |||
| @@ -1443,14 +1443,14 @@ void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no) | |||
| 1443 | EXPORT_SYMBOL(edma_assign_channel_eventq); | 1443 | EXPORT_SYMBOL(edma_assign_channel_eventq); |
| 1444 | 1444 | ||
| 1445 | static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, | 1445 | static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, |
| 1446 | struct edma *edma_cc) | 1446 | struct edma *edma_cc, int cc_id) |
| 1447 | { | 1447 | { |
| 1448 | int i; | 1448 | int i; |
| 1449 | u32 value, cccfg; | 1449 | u32 value, cccfg; |
| 1450 | s8 (*queue_priority_map)[2]; | 1450 | s8 (*queue_priority_map)[2]; |
| 1451 | 1451 | ||
| 1452 | /* Decode the eDMA3 configuration from CCCFG register */ | 1452 | /* Decode the eDMA3 configuration from CCCFG register */ |
| 1453 | cccfg = edma_read(0, EDMA_CCCFG); | 1453 | cccfg = edma_read(cc_id, EDMA_CCCFG); |
| 1454 | 1454 | ||
| 1455 | value = GET_NUM_REGN(cccfg); | 1455 | value = GET_NUM_REGN(cccfg); |
| 1456 | edma_cc->num_region = BIT(value); | 1456 | edma_cc->num_region = BIT(value); |
| @@ -1464,7 +1464,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, | |||
| 1464 | value = GET_NUM_EVQUE(cccfg); | 1464 | value = GET_NUM_EVQUE(cccfg); |
| 1465 | edma_cc->num_tc = value + 1; | 1465 | edma_cc->num_tc = value + 1; |
| 1466 | 1466 | ||
| 1467 | dev_dbg(dev, "eDMA3 HW configuration (cccfg: 0x%08x):\n", cccfg); | 1467 | dev_dbg(dev, "eDMA3 CC%d HW configuration (cccfg: 0x%08x):\n", cc_id, |
| 1468 | cccfg); | ||
| 1468 | dev_dbg(dev, "num_region: %u\n", edma_cc->num_region); | 1469 | dev_dbg(dev, "num_region: %u\n", edma_cc->num_region); |
| 1469 | dev_dbg(dev, "num_channel: %u\n", edma_cc->num_channels); | 1470 | dev_dbg(dev, "num_channel: %u\n", edma_cc->num_channels); |
| 1470 | dev_dbg(dev, "num_slot: %u\n", edma_cc->num_slots); | 1471 | dev_dbg(dev, "num_slot: %u\n", edma_cc->num_slots); |
| @@ -1684,7 +1685,7 @@ static int edma_probe(struct platform_device *pdev) | |||
| 1684 | return -ENOMEM; | 1685 | return -ENOMEM; |
| 1685 | 1686 | ||
| 1686 | /* Get eDMA3 configuration from IP */ | 1687 | /* Get eDMA3 configuration from IP */ |
| 1687 | ret = edma_setup_from_hw(dev, info[j], edma_cc[j]); | 1688 | ret = edma_setup_from_hw(dev, info[j], edma_cc[j], j); |
| 1688 | if (ret) | 1689 | if (ret) |
| 1689 | return ret; | 1690 | return ret; |
| 1690 | 1691 | ||
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index fd43f7f55b70..10e78d00a0bb 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
| @@ -466,13 +466,13 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size) | |||
| 466 | */ | 466 | */ |
| 467 | #define v7_exit_coherency_flush(level) \ | 467 | #define v7_exit_coherency_flush(level) \ |
| 468 | asm volatile( \ | 468 | asm volatile( \ |
| 469 | ".arch armv7-a \n\t" \ | ||
| 469 | "stmfd sp!, {fp, ip} \n\t" \ | 470 | "stmfd sp!, {fp, ip} \n\t" \ |
| 470 | "mrc p15, 0, r0, c1, c0, 0 @ get SCTLR \n\t" \ | 471 | "mrc p15, 0, r0, c1, c0, 0 @ get SCTLR \n\t" \ |
| 471 | "bic r0, r0, #"__stringify(CR_C)" \n\t" \ | 472 | "bic r0, r0, #"__stringify(CR_C)" \n\t" \ |
| 472 | "mcr p15, 0, r0, c1, c0, 0 @ set SCTLR \n\t" \ | 473 | "mcr p15, 0, r0, c1, c0, 0 @ set SCTLR \n\t" \ |
| 473 | "isb \n\t" \ | 474 | "isb \n\t" \ |
| 474 | "bl v7_flush_dcache_"__stringify(level)" \n\t" \ | 475 | "bl v7_flush_dcache_"__stringify(level)" \n\t" \ |
| 475 | "clrex \n\t" \ | ||
| 476 | "mrc p15, 0, r0, c1, c0, 1 @ get ACTLR \n\t" \ | 476 | "mrc p15, 0, r0, c1, c0, 1 @ get ACTLR \n\t" \ |
| 477 | "bic r0, r0, #(1 << 6) @ disable local coherency \n\t" \ | 477 | "bic r0, r0, #(1 << 6) @ disable local coherency \n\t" \ |
| 478 | "mcr p15, 0, r0, c1, c0, 1 @ set ACTLR \n\t" \ | 478 | "mcr p15, 0, r0, c1, c0, 1 @ set ACTLR \n\t" \ |
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index 963a2515906d..819777d0e91f 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
| @@ -74,6 +74,7 @@ | |||
| 74 | #define ARM_CPU_PART_CORTEX_A12 0x4100c0d0 | 74 | #define ARM_CPU_PART_CORTEX_A12 0x4100c0d0 |
| 75 | #define ARM_CPU_PART_CORTEX_A17 0x4100c0e0 | 75 | #define ARM_CPU_PART_CORTEX_A17 0x4100c0e0 |
| 76 | #define ARM_CPU_PART_CORTEX_A15 0x4100c0f0 | 76 | #define ARM_CPU_PART_CORTEX_A15 0x4100c0f0 |
| 77 | #define ARM_CPU_PART_MASK 0xff00fff0 | ||
| 77 | 78 | ||
| 78 | #define ARM_CPU_XSCALE_ARCH_MASK 0xe000 | 79 | #define ARM_CPU_XSCALE_ARCH_MASK 0xe000 |
| 79 | #define ARM_CPU_XSCALE_ARCH_V1 0x2000 | 80 | #define ARM_CPU_XSCALE_ARCH_V1 0x2000 |
| @@ -179,7 +180,7 @@ static inline unsigned int __attribute_const__ read_cpuid_implementor(void) | |||
| 179 | */ | 180 | */ |
| 180 | static inline unsigned int __attribute_const__ read_cpuid_part(void) | 181 | static inline unsigned int __attribute_const__ read_cpuid_part(void) |
| 181 | { | 182 | { |
| 182 | return read_cpuid_id() & 0xff00fff0; | 183 | return read_cpuid_id() & ARM_CPU_PART_MASK; |
| 183 | } | 184 | } |
| 184 | 185 | ||
| 185 | static inline unsigned int __attribute_const__ __deprecated read_cpuid_part_number(void) | 186 | static inline unsigned int __attribute_const__ __deprecated read_cpuid_part_number(void) |
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index f4b46d39b9cf..afb9cafd3786 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
| @@ -50,6 +50,7 @@ typedef struct user_fp elf_fpregset_t; | |||
| 50 | #define R_ARM_ABS32 2 | 50 | #define R_ARM_ABS32 2 |
| 51 | #define R_ARM_CALL 28 | 51 | #define R_ARM_CALL 28 |
| 52 | #define R_ARM_JUMP24 29 | 52 | #define R_ARM_JUMP24 29 |
| 53 | #define R_ARM_TARGET1 38 | ||
| 53 | #define R_ARM_V4BX 40 | 54 | #define R_ARM_V4BX 40 |
| 54 | #define R_ARM_PREL31 42 | 55 | #define R_ARM_PREL31 42 |
| 55 | #define R_ARM_MOVW_ABS_NC 43 | 56 | #define R_ARM_MOVW_ABS_NC 43 |
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h index a252c0bfacf5..0ad7d490ee6f 100644 --- a/arch/arm/include/asm/smp_plat.h +++ b/arch/arm/include/asm/smp_plat.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/cpumask.h> | 8 | #include <linux/cpumask.h> |
| 9 | #include <linux/err.h> | 9 | #include <linux/err.h> |
| 10 | 10 | ||
| 11 | #include <asm/cpu.h> | ||
| 11 | #include <asm/cputype.h> | 12 | #include <asm/cputype.h> |
| 12 | 13 | ||
| 13 | /* | 14 | /* |
| @@ -25,6 +26,20 @@ static inline bool is_smp(void) | |||
| 25 | #endif | 26 | #endif |
| 26 | } | 27 | } |
| 27 | 28 | ||
| 29 | /** | ||
| 30 | * smp_cpuid_part() - return part id for a given cpu | ||
| 31 | * @cpu: logical cpu id. | ||
| 32 | * | ||
| 33 | * Return: part id of logical cpu passed as argument. | ||
| 34 | */ | ||
| 35 | static inline unsigned int smp_cpuid_part(int cpu) | ||
| 36 | { | ||
| 37 | struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpu); | ||
| 38 | |||
| 39 | return is_smp() ? cpu_info->cpuid & ARM_CPU_PART_MASK : | ||
| 40 | read_cpuid_part(); | ||
| 41 | } | ||
| 42 | |||
| 28 | /* all SMP configurations have the extended CPUID registers */ | 43 | /* all SMP configurations have the extended CPUID registers */ |
| 29 | #ifndef CONFIG_MMU | 44 | #ifndef CONFIG_MMU |
| 30 | #define tlb_ops_need_broadcast() 0 | 45 | #define tlb_ops_need_broadcast() 0 |
diff --git a/arch/arm/include/asm/tls.h b/arch/arm/include/asm/tls.h index 83259b873333..5f833f7adba1 100644 --- a/arch/arm/include/asm/tls.h +++ b/arch/arm/include/asm/tls.h | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | #ifndef __ASMARM_TLS_H | 1 | #ifndef __ASMARM_TLS_H |
| 2 | #define __ASMARM_TLS_H | 2 | #define __ASMARM_TLS_H |
| 3 | 3 | ||
| 4 | #include <linux/compiler.h> | ||
| 5 | #include <asm/thread_info.h> | ||
| 6 | |||
| 4 | #ifdef __ASSEMBLY__ | 7 | #ifdef __ASSEMBLY__ |
| 5 | #include <asm/asm-offsets.h> | 8 | #include <asm/asm-offsets.h> |
| 6 | .macro switch_tls_none, base, tp, tpuser, tmp1, tmp2 | 9 | .macro switch_tls_none, base, tp, tpuser, tmp1, tmp2 |
| @@ -50,6 +53,49 @@ | |||
| 50 | #endif | 53 | #endif |
| 51 | 54 | ||
| 52 | #ifndef __ASSEMBLY__ | 55 | #ifndef __ASSEMBLY__ |
| 56 | |||
| 57 | static inline void set_tls(unsigned long val) | ||
| 58 | { | ||
| 59 | struct thread_info *thread; | ||
| 60 | |||
| 61 | thread = current_thread_info(); | ||
| 62 | |||
| 63 | thread->tp_value[0] = val; | ||
| 64 | |||
| 65 | /* | ||
| 66 | * This code runs with preemption enabled and therefore must | ||
| 67 | * be reentrant with respect to switch_tls. | ||
| 68 | * | ||
| 69 | * We need to ensure ordering between the shadow state and the | ||
| 70 | * hardware state, so that we don't corrupt the hardware state | ||
| 71 | * with a stale shadow state during context switch. | ||
| 72 | * | ||
| 73 | * If we're preempted here, switch_tls will load TPIDRURO from | ||
| 74 | * thread_info upon resuming execution and the following mcr | ||
| 75 | * is merely redundant. | ||
| 76 | */ | ||
| 77 | barrier(); | ||
| 78 | |||
| 79 | if (!tls_emu) { | ||
| 80 | if (has_tls_reg) { | ||
| 81 | asm("mcr p15, 0, %0, c13, c0, 3" | ||
| 82 | : : "r" (val)); | ||
| 83 | } else { | ||
| 84 | #ifdef CONFIG_KUSER_HELPERS | ||
| 85 | /* | ||
| 86 | * User space must never try to access this | ||
| 87 | * directly. Expect your app to break | ||
| 88 | * eventually if you do so. The user helper | ||
| 89 | * at 0xffff0fe0 must be used instead. (see | ||
| 90 | * entry-armv.S for details) | ||
| 91 | */ | ||
| 92 | *((unsigned int *)0xffff0ff0) = val; | ||
| 93 | #endif | ||
| 94 | } | ||
| 95 | |||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 53 | static inline unsigned long get_tpuser(void) | 99 | static inline unsigned long get_tpuser(void) |
| 54 | { | 100 | { |
| 55 | unsigned long reg = 0; | 101 | unsigned long reg = 0; |
| @@ -59,5 +105,23 @@ static inline unsigned long get_tpuser(void) | |||
| 59 | 105 | ||
| 60 | return reg; | 106 | return reg; |
| 61 | } | 107 | } |
| 108 | |||
| 109 | static inline void set_tpuser(unsigned long val) | ||
| 110 | { | ||
| 111 | /* Since TPIDRURW is fully context-switched (unlike TPIDRURO), | ||
| 112 | * we need not update thread_info. | ||
| 113 | */ | ||
| 114 | if (has_tls_reg && !tls_emu) { | ||
| 115 | asm("mcr p15, 0, %0, c13, c0, 2" | ||
| 116 | : : "r" (val)); | ||
| 117 | } | ||
| 118 | } | ||
| 119 | |||
| 120 | static inline void flush_tls(void) | ||
| 121 | { | ||
| 122 | set_tls(0); | ||
| 123 | set_tpuser(0); | ||
| 124 | } | ||
| 125 | |||
| 62 | #endif | 126 | #endif |
| 63 | #endif /* __ASMARM_TLS_H */ | 127 | #endif /* __ASMARM_TLS_H */ |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index a4cd7af475e9..4767eb9caa78 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
| @@ -107,8 +107,11 @@ static inline void set_fs(mm_segment_t fs) | |||
| 107 | extern int __get_user_1(void *); | 107 | extern int __get_user_1(void *); |
| 108 | extern int __get_user_2(void *); | 108 | extern int __get_user_2(void *); |
| 109 | extern int __get_user_4(void *); | 109 | extern int __get_user_4(void *); |
| 110 | extern int __get_user_lo8(void *); | 110 | extern int __get_user_32t_8(void *); |
| 111 | extern int __get_user_8(void *); | 111 | extern int __get_user_8(void *); |
| 112 | extern int __get_user_64t_1(void *); | ||
| 113 | extern int __get_user_64t_2(void *); | ||
| 114 | extern int __get_user_64t_4(void *); | ||
| 112 | 115 | ||
| 113 | #define __GUP_CLOBBER_1 "lr", "cc" | 116 | #define __GUP_CLOBBER_1 "lr", "cc" |
| 114 | #ifdef CONFIG_CPU_USE_DOMAINS | 117 | #ifdef CONFIG_CPU_USE_DOMAINS |
| @@ -117,7 +120,7 @@ extern int __get_user_8(void *); | |||
| 117 | #define __GUP_CLOBBER_2 "lr", "cc" | 120 | #define __GUP_CLOBBER_2 "lr", "cc" |
| 118 | #endif | 121 | #endif |
| 119 | #define __GUP_CLOBBER_4 "lr", "cc" | 122 | #define __GUP_CLOBBER_4 "lr", "cc" |
| 120 | #define __GUP_CLOBBER_lo8 "lr", "cc" | 123 | #define __GUP_CLOBBER_32t_8 "lr", "cc" |
| 121 | #define __GUP_CLOBBER_8 "lr", "cc" | 124 | #define __GUP_CLOBBER_8 "lr", "cc" |
| 122 | 125 | ||
| 123 | #define __get_user_x(__r2,__p,__e,__l,__s) \ | 126 | #define __get_user_x(__r2,__p,__e,__l,__s) \ |
| @@ -131,12 +134,30 @@ extern int __get_user_8(void *); | |||
| 131 | 134 | ||
| 132 | /* narrowing a double-word get into a single 32bit word register: */ | 135 | /* narrowing a double-word get into a single 32bit word register: */ |
| 133 | #ifdef __ARMEB__ | 136 | #ifdef __ARMEB__ |
| 134 | #define __get_user_xb(__r2, __p, __e, __l, __s) \ | 137 | #define __get_user_x_32t(__r2, __p, __e, __l, __s) \ |
| 135 | __get_user_x(__r2, __p, __e, __l, lo8) | 138 | __get_user_x(__r2, __p, __e, __l, 32t_8) |
| 136 | #else | 139 | #else |
| 137 | #define __get_user_xb __get_user_x | 140 | #define __get_user_x_32t __get_user_x |
| 138 | #endif | 141 | #endif |
| 139 | 142 | ||
| 143 | /* | ||
| 144 | * storing result into proper least significant word of 64bit target var, | ||
| 145 | * different only for big endian case where 64 bit __r2 lsw is r3: | ||
| 146 | */ | ||
| 147 | #ifdef __ARMEB__ | ||
| 148 | #define __get_user_x_64t(__r2, __p, __e, __l, __s) \ | ||
| 149 | __asm__ __volatile__ ( \ | ||
| 150 | __asmeq("%0", "r0") __asmeq("%1", "r2") \ | ||
| 151 | __asmeq("%3", "r1") \ | ||
| 152 | "bl __get_user_64t_" #__s \ | ||
| 153 | : "=&r" (__e), "=r" (__r2) \ | ||
| 154 | : "0" (__p), "r" (__l) \ | ||
| 155 | : __GUP_CLOBBER_##__s) | ||
| 156 | #else | ||
| 157 | #define __get_user_x_64t __get_user_x | ||
| 158 | #endif | ||
| 159 | |||
| 160 | |||
| 140 | #define __get_user_check(x,p) \ | 161 | #define __get_user_check(x,p) \ |
| 141 | ({ \ | 162 | ({ \ |
| 142 | unsigned long __limit = current_thread_info()->addr_limit - 1; \ | 163 | unsigned long __limit = current_thread_info()->addr_limit - 1; \ |
| @@ -146,17 +167,26 @@ extern int __get_user_8(void *); | |||
| 146 | register int __e asm("r0"); \ | 167 | register int __e asm("r0"); \ |
| 147 | switch (sizeof(*(__p))) { \ | 168 | switch (sizeof(*(__p))) { \ |
| 148 | case 1: \ | 169 | case 1: \ |
| 149 | __get_user_x(__r2, __p, __e, __l, 1); \ | 170 | if (sizeof((x)) >= 8) \ |
| 171 | __get_user_x_64t(__r2, __p, __e, __l, 1); \ | ||
| 172 | else \ | ||
| 173 | __get_user_x(__r2, __p, __e, __l, 1); \ | ||
| 150 | break; \ | 174 | break; \ |
| 151 | case 2: \ | 175 | case 2: \ |
| 152 | __get_user_x(__r2, __p, __e, __l, 2); \ | 176 | if (sizeof((x)) >= 8) \ |
| 177 | __get_user_x_64t(__r2, __p, __e, __l, 2); \ | ||
| 178 | else \ | ||
| 179 | __get_user_x(__r2, __p, __e, __l, 2); \ | ||
| 153 | break; \ | 180 | break; \ |
| 154 | case 4: \ | 181 | case 4: \ |
| 155 | __get_user_x(__r2, __p, __e, __l, 4); \ | 182 | if (sizeof((x)) >= 8) \ |
| 183 | __get_user_x_64t(__r2, __p, __e, __l, 4); \ | ||
| 184 | else \ | ||
| 185 | __get_user_x(__r2, __p, __e, __l, 4); \ | ||
| 156 | break; \ | 186 | break; \ |
| 157 | case 8: \ | 187 | case 8: \ |
| 158 | if (sizeof((x)) < 8) \ | 188 | if (sizeof((x)) < 8) \ |
| 159 | __get_user_xb(__r2, __p, __e, __l, 4); \ | 189 | __get_user_x_32t(__r2, __p, __e, __l, 4); \ |
| 160 | else \ | 190 | else \ |
| 161 | __get_user_x(__r2, __p, __e, __l, 8); \ | 191 | __get_user_x(__r2, __p, __e, __l, 8); \ |
| 162 | break; \ | 192 | break; \ |
diff --git a/arch/arm/include/asm/xen/page-coherent.h b/arch/arm/include/asm/xen/page-coherent.h index 1109017499e5..e8275ea88e88 100644 --- a/arch/arm/include/asm/xen/page-coherent.h +++ b/arch/arm/include/asm/xen/page-coherent.h | |||
| @@ -26,25 +26,14 @@ static inline void xen_dma_map_page(struct device *hwdev, struct page *page, | |||
| 26 | __generic_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); | 26 | __generic_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle, | 29 | void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle, |
| 30 | size_t size, enum dma_data_direction dir, | 30 | size_t size, enum dma_data_direction dir, |
| 31 | struct dma_attrs *attrs) | 31 | struct dma_attrs *attrs); |
| 32 | { | ||
| 33 | if (__generic_dma_ops(hwdev)->unmap_page) | ||
| 34 | __generic_dma_ops(hwdev)->unmap_page(hwdev, handle, size, dir, attrs); | ||
| 35 | } | ||
| 36 | 32 | ||
| 37 | static inline void xen_dma_sync_single_for_cpu(struct device *hwdev, | 33 | void xen_dma_sync_single_for_cpu(struct device *hwdev, |
| 38 | dma_addr_t handle, size_t size, enum dma_data_direction dir) | 34 | dma_addr_t handle, size_t size, enum dma_data_direction dir); |
| 39 | { | 35 | |
| 40 | if (__generic_dma_ops(hwdev)->sync_single_for_cpu) | 36 | void xen_dma_sync_single_for_device(struct device *hwdev, |
| 41 | __generic_dma_ops(hwdev)->sync_single_for_cpu(hwdev, handle, size, dir); | 37 | dma_addr_t handle, size_t size, enum dma_data_direction dir); |
| 42 | } | ||
| 43 | 38 | ||
| 44 | static inline void xen_dma_sync_single_for_device(struct device *hwdev, | ||
| 45 | dma_addr_t handle, size_t size, enum dma_data_direction dir) | ||
| 46 | { | ||
| 47 | if (__generic_dma_ops(hwdev)->sync_single_for_device) | ||
| 48 | __generic_dma_ops(hwdev)->sync_single_for_device(hwdev, handle, size, dir); | ||
| 49 | } | ||
| 50 | #endif /* _ASM_ARM_XEN_PAGE_COHERENT_H */ | 39 | #endif /* _ASM_ARM_XEN_PAGE_COHERENT_H */ |
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index ded062f9b358..135c24a5ba26 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h | |||
| @@ -33,7 +33,6 @@ typedef struct xpaddr { | |||
| 33 | #define INVALID_P2M_ENTRY (~0UL) | 33 | #define INVALID_P2M_ENTRY (~0UL) |
| 34 | 34 | ||
| 35 | unsigned long __pfn_to_mfn(unsigned long pfn); | 35 | unsigned long __pfn_to_mfn(unsigned long pfn); |
| 36 | unsigned long __mfn_to_pfn(unsigned long mfn); | ||
| 37 | extern struct rb_root phys_to_mach; | 36 | extern struct rb_root phys_to_mach; |
| 38 | 37 | ||
| 39 | static inline unsigned long pfn_to_mfn(unsigned long pfn) | 38 | static inline unsigned long pfn_to_mfn(unsigned long pfn) |
| @@ -51,14 +50,6 @@ static inline unsigned long pfn_to_mfn(unsigned long pfn) | |||
| 51 | 50 | ||
| 52 | static inline unsigned long mfn_to_pfn(unsigned long mfn) | 51 | static inline unsigned long mfn_to_pfn(unsigned long mfn) |
| 53 | { | 52 | { |
| 54 | unsigned long pfn; | ||
| 55 | |||
| 56 | if (phys_to_mach.rb_node != NULL) { | ||
| 57 | pfn = __mfn_to_pfn(mfn); | ||
| 58 | if (pfn != INVALID_P2M_ENTRY) | ||
| 59 | return pfn; | ||
| 60 | } | ||
| 61 | |||
| 62 | return mfn; | 53 | return mfn; |
| 63 | } | 54 | } |
| 64 | 55 | ||
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index f7b450f97e68..a88671cfe1ff 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
| @@ -98,6 +98,14 @@ EXPORT_SYMBOL(__clear_user); | |||
| 98 | EXPORT_SYMBOL(__get_user_1); | 98 | EXPORT_SYMBOL(__get_user_1); |
| 99 | EXPORT_SYMBOL(__get_user_2); | 99 | EXPORT_SYMBOL(__get_user_2); |
| 100 | EXPORT_SYMBOL(__get_user_4); | 100 | EXPORT_SYMBOL(__get_user_4); |
| 101 | EXPORT_SYMBOL(__get_user_8); | ||
| 102 | |||
| 103 | #ifdef __ARMEB__ | ||
| 104 | EXPORT_SYMBOL(__get_user_64t_1); | ||
| 105 | EXPORT_SYMBOL(__get_user_64t_2); | ||
| 106 | EXPORT_SYMBOL(__get_user_64t_4); | ||
| 107 | EXPORT_SYMBOL(__get_user_32t_8); | ||
| 108 | #endif | ||
| 101 | 109 | ||
| 102 | EXPORT_SYMBOL(__put_user_1); | 110 | EXPORT_SYMBOL(__put_user_1); |
| 103 | EXPORT_SYMBOL(__put_user_2); | 111 | EXPORT_SYMBOL(__put_user_2); |
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 8db307d0954b..2fdf8679b46e 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S | |||
| @@ -208,26 +208,21 @@ | |||
| 208 | #endif | 208 | #endif |
| 209 | .endif | 209 | .endif |
| 210 | msr spsr_cxsf, \rpsr | 210 | msr spsr_cxsf, \rpsr |
| 211 | #if defined(CONFIG_CPU_V6) | 211 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K) |
| 212 | ldr r0, [sp] | 212 | @ We must avoid clrex due to Cortex-A15 erratum #830321 |
| 213 | strex r1, r2, [sp] @ clear the exclusive monitor | 213 | sub r0, sp, #4 @ uninhabited address |
| 214 | ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr | 214 | strex r1, r2, [r0] @ clear the exclusive monitor |
| 215 | #elif defined(CONFIG_CPU_32v6K) | ||
| 216 | clrex @ clear the exclusive monitor | ||
| 217 | ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr | ||
| 218 | #else | ||
| 219 | ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr | ||
| 220 | #endif | 215 | #endif |
| 216 | ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr | ||
| 221 | .endm | 217 | .endm |
| 222 | 218 | ||
| 223 | .macro restore_user_regs, fast = 0, offset = 0 | 219 | .macro restore_user_regs, fast = 0, offset = 0 |
| 224 | ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr | 220 | ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr |
| 225 | ldr lr, [sp, #\offset + S_PC]! @ get pc | 221 | ldr lr, [sp, #\offset + S_PC]! @ get pc |
| 226 | msr spsr_cxsf, r1 @ save in spsr_svc | 222 | msr spsr_cxsf, r1 @ save in spsr_svc |
| 227 | #if defined(CONFIG_CPU_V6) | 223 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K) |
| 224 | @ We must avoid clrex due to Cortex-A15 erratum #830321 | ||
| 228 | strex r1, r2, [sp] @ clear the exclusive monitor | 225 | strex r1, r2, [sp] @ clear the exclusive monitor |
| 229 | #elif defined(CONFIG_CPU_32v6K) | ||
| 230 | clrex @ clear the exclusive monitor | ||
| 231 | #endif | 226 | #endif |
| 232 | .if \fast | 227 | .if \fast |
| 233 | ldmdb sp, {r1 - lr}^ @ get calling r1 - lr | 228 | ldmdb sp, {r1 - lr}^ @ get calling r1 - lr |
| @@ -261,7 +256,10 @@ | |||
| 261 | .endif | 256 | .endif |
| 262 | ldr lr, [sp, #S_SP] @ top of the stack | 257 | ldr lr, [sp, #S_SP] @ top of the stack |
| 263 | ldrd r0, r1, [sp, #S_LR] @ calling lr and pc | 258 | ldrd r0, r1, [sp, #S_LR] @ calling lr and pc |
| 264 | clrex @ clear the exclusive monitor | 259 | |
| 260 | @ We must avoid clrex due to Cortex-A15 erratum #830321 | ||
| 261 | strex r2, r1, [sp, #S_LR] @ clear the exclusive monitor | ||
| 262 | |||
| 265 | stmdb lr!, {r0, r1, \rpsr} @ calling lr and rfe context | 263 | stmdb lr!, {r0, r1, \rpsr} @ calling lr and rfe context |
| 266 | ldmia sp, {r0 - r12} | 264 | ldmia sp, {r0 - r12} |
| 267 | mov sp, lr | 265 | mov sp, lr |
| @@ -282,13 +280,16 @@ | |||
| 282 | .endm | 280 | .endm |
| 283 | #else /* ifdef CONFIG_CPU_V7M */ | 281 | #else /* ifdef CONFIG_CPU_V7M */ |
| 284 | .macro restore_user_regs, fast = 0, offset = 0 | 282 | .macro restore_user_regs, fast = 0, offset = 0 |
| 285 | clrex @ clear the exclusive monitor | ||
| 286 | mov r2, sp | 283 | mov r2, sp |
| 287 | load_user_sp_lr r2, r3, \offset + S_SP @ calling sp, lr | 284 | load_user_sp_lr r2, r3, \offset + S_SP @ calling sp, lr |
| 288 | ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr | 285 | ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr |
| 289 | ldr lr, [sp, #\offset + S_PC] @ get pc | 286 | ldr lr, [sp, #\offset + S_PC] @ get pc |
| 290 | add sp, sp, #\offset + S_SP | 287 | add sp, sp, #\offset + S_SP |
| 291 | msr spsr_cxsf, r1 @ save in spsr_svc | 288 | msr spsr_cxsf, r1 @ save in spsr_svc |
| 289 | |||
| 290 | @ We must avoid clrex due to Cortex-A15 erratum #830321 | ||
| 291 | strex r1, r2, [sp] @ clear the exclusive monitor | ||
| 292 | |||
| 292 | .if \fast | 293 | .if \fast |
| 293 | ldmdb sp, {r1 - r12} @ get calling r1 - r12 | 294 | ldmdb sp, {r1 - r12} @ get calling r1 - r12 |
| 294 | .else | 295 | .else |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 2c4257604513..5c4d38e32a51 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
| @@ -175,7 +175,7 @@ static bool migrate_one_irq(struct irq_desc *desc) | |||
| 175 | c = irq_data_get_irq_chip(d); | 175 | c = irq_data_get_irq_chip(d); |
| 176 | if (!c->irq_set_affinity) | 176 | if (!c->irq_set_affinity) |
| 177 | pr_debug("IRQ%u: unable to set affinity\n", d->irq); | 177 | pr_debug("IRQ%u: unable to set affinity\n", d->irq); |
| 178 | else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret) | 178 | else if (c->irq_set_affinity(d, affinity, false) == IRQ_SET_MASK_OK && ret) |
| 179 | cpumask_copy(d->affinity, affinity); | 179 | cpumask_copy(d->affinity, affinity); |
| 180 | 180 | ||
| 181 | return ret; | 181 | return ret; |
diff --git a/arch/arm/kernel/kprobes-test.c b/arch/arm/kernel/kprobes-test.c index 08d731294bcd..b206d7790c77 100644 --- a/arch/arm/kernel/kprobes-test.c +++ b/arch/arm/kernel/kprobes-test.c | |||
| @@ -110,10 +110,13 @@ | |||
| 110 | * | 110 | * |
| 111 | * @ TESTCASE_START | 111 | * @ TESTCASE_START |
| 112 | * bl __kprobes_test_case_start | 112 | * bl __kprobes_test_case_start |
| 113 | * @ start of inline data... | 113 | * .pushsection .rodata |
| 114 | * "10: | ||
| 114 | * .ascii "mov r0, r7" @ text title for test case | 115 | * .ascii "mov r0, r7" @ text title for test case |
| 115 | * .byte 0 | 116 | * .byte 0 |
| 116 | * .align 2, 0 | 117 | * .popsection |
| 118 | * @ start of inline data... | ||
| 119 | * .word 10b @ pointer to title in .rodata section | ||
| 117 | * | 120 | * |
| 118 | * @ TEST_ARG_REG | 121 | * @ TEST_ARG_REG |
| 119 | * .byte ARG_TYPE_REG | 122 | * .byte ARG_TYPE_REG |
| @@ -971,7 +974,7 @@ void __naked __kprobes_test_case_start(void) | |||
| 971 | __asm__ __volatile__ ( | 974 | __asm__ __volatile__ ( |
| 972 | "stmdb sp!, {r4-r11} \n\t" | 975 | "stmdb sp!, {r4-r11} \n\t" |
| 973 | "sub sp, sp, #"__stringify(TEST_MEMORY_SIZE)"\n\t" | 976 | "sub sp, sp, #"__stringify(TEST_MEMORY_SIZE)"\n\t" |
| 974 | "bic r0, lr, #1 @ r0 = inline title string \n\t" | 977 | "bic r0, lr, #1 @ r0 = inline data \n\t" |
| 975 | "mov r1, sp \n\t" | 978 | "mov r1, sp \n\t" |
| 976 | "bl kprobes_test_case_start \n\t" | 979 | "bl kprobes_test_case_start \n\t" |
| 977 | "bx r0 \n\t" | 980 | "bx r0 \n\t" |
| @@ -1349,15 +1352,14 @@ static unsigned long next_instruction(unsigned long pc) | |||
| 1349 | return pc + 4; | 1352 | return pc + 4; |
| 1350 | } | 1353 | } |
| 1351 | 1354 | ||
| 1352 | static uintptr_t __used kprobes_test_case_start(const char *title, void *stack) | 1355 | static uintptr_t __used kprobes_test_case_start(const char **title, void *stack) |
| 1353 | { | 1356 | { |
| 1354 | struct test_arg *args; | 1357 | struct test_arg *args; |
| 1355 | struct test_arg_end *end_arg; | 1358 | struct test_arg_end *end_arg; |
| 1356 | unsigned long test_code; | 1359 | unsigned long test_code; |
| 1357 | 1360 | ||
| 1358 | args = (struct test_arg *)PTR_ALIGN(title + strlen(title) + 1, 4); | 1361 | current_title = *title++; |
| 1359 | 1362 | args = (struct test_arg *)title; | |
| 1360 | current_title = title; | ||
| 1361 | current_args = args; | 1363 | current_args = args; |
| 1362 | current_stack = stack; | 1364 | current_stack = stack; |
| 1363 | 1365 | ||
diff --git a/arch/arm/kernel/kprobes-test.h b/arch/arm/kernel/kprobes-test.h index eecc90a0fd91..4430990e90e7 100644 --- a/arch/arm/kernel/kprobes-test.h +++ b/arch/arm/kernel/kprobes-test.h | |||
| @@ -111,11 +111,14 @@ struct test_arg_end { | |||
| 111 | #define TESTCASE_START(title) \ | 111 | #define TESTCASE_START(title) \ |
| 112 | __asm__ __volatile__ ( \ | 112 | __asm__ __volatile__ ( \ |
| 113 | "bl __kprobes_test_case_start \n\t" \ | 113 | "bl __kprobes_test_case_start \n\t" \ |
| 114 | ".pushsection .rodata \n\t" \ | ||
| 115 | "10: \n\t" \ | ||
| 114 | /* don't use .asciz here as 'title' may be */ \ | 116 | /* don't use .asciz here as 'title' may be */ \ |
| 115 | /* multiple strings to be concatenated. */ \ | 117 | /* multiple strings to be concatenated. */ \ |
| 116 | ".ascii "#title" \n\t" \ | 118 | ".ascii "#title" \n\t" \ |
| 117 | ".byte 0 \n\t" \ | 119 | ".byte 0 \n\t" \ |
| 118 | ".align 2, 0 \n\t" | 120 | ".popsection \n\t" \ |
| 121 | ".word 10b \n\t" | ||
| 119 | 122 | ||
| 120 | #define TEST_ARG_REG(reg, val) \ | 123 | #define TEST_ARG_REG(reg, val) \ |
| 121 | ".byte "__stringify(ARG_TYPE_REG)" \n\t" \ | 124 | ".byte "__stringify(ARG_TYPE_REG)" \n\t" \ |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 45e478157278..6a4dffefd357 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
| @@ -91,6 +91,7 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | |||
| 91 | break; | 91 | break; |
| 92 | 92 | ||
| 93 | case R_ARM_ABS32: | 93 | case R_ARM_ABS32: |
| 94 | case R_ARM_TARGET1: | ||
| 94 | *(u32 *)loc += sym->st_value; | 95 | *(u32 *)loc += sym->st_value; |
| 95 | break; | 96 | break; |
| 96 | 97 | ||
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index e6a6edbec613..4bf4cce759fe 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
| @@ -76,21 +76,15 @@ static struct pmu_hw_events *cpu_pmu_get_cpu_events(void) | |||
| 76 | 76 | ||
| 77 | static void cpu_pmu_enable_percpu_irq(void *data) | 77 | static void cpu_pmu_enable_percpu_irq(void *data) |
| 78 | { | 78 | { |
| 79 | struct arm_pmu *cpu_pmu = data; | 79 | int irq = *(int *)data; |
| 80 | struct platform_device *pmu_device = cpu_pmu->plat_device; | ||
| 81 | int irq = platform_get_irq(pmu_device, 0); | ||
| 82 | 80 | ||
| 83 | enable_percpu_irq(irq, IRQ_TYPE_NONE); | 81 | enable_percpu_irq(irq, IRQ_TYPE_NONE); |
| 84 | cpumask_set_cpu(smp_processor_id(), &cpu_pmu->active_irqs); | ||
| 85 | } | 82 | } |
| 86 | 83 | ||
| 87 | static void cpu_pmu_disable_percpu_irq(void *data) | 84 | static void cpu_pmu_disable_percpu_irq(void *data) |
| 88 | { | 85 | { |
| 89 | struct arm_pmu *cpu_pmu = data; | 86 | int irq = *(int *)data; |
| 90 | struct platform_device *pmu_device = cpu_pmu->plat_device; | ||
| 91 | int irq = platform_get_irq(pmu_device, 0); | ||
| 92 | 87 | ||
| 93 | cpumask_clear_cpu(smp_processor_id(), &cpu_pmu->active_irqs); | ||
| 94 | disable_percpu_irq(irq); | 88 | disable_percpu_irq(irq); |
| 95 | } | 89 | } |
| 96 | 90 | ||
| @@ -103,7 +97,7 @@ static void cpu_pmu_free_irq(struct arm_pmu *cpu_pmu) | |||
| 103 | 97 | ||
| 104 | irq = platform_get_irq(pmu_device, 0); | 98 | irq = platform_get_irq(pmu_device, 0); |
| 105 | if (irq >= 0 && irq_is_percpu(irq)) { | 99 | if (irq >= 0 && irq_is_percpu(irq)) { |
| 106 | on_each_cpu(cpu_pmu_disable_percpu_irq, cpu_pmu, 1); | 100 | on_each_cpu(cpu_pmu_disable_percpu_irq, &irq, 1); |
| 107 | free_percpu_irq(irq, &percpu_pmu); | 101 | free_percpu_irq(irq, &percpu_pmu); |
| 108 | } else { | 102 | } else { |
| 109 | for (i = 0; i < irqs; ++i) { | 103 | for (i = 0; i < irqs; ++i) { |
| @@ -138,7 +132,7 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler) | |||
| 138 | irq); | 132 | irq); |
| 139 | return err; | 133 | return err; |
| 140 | } | 134 | } |
| 141 | on_each_cpu(cpu_pmu_enable_percpu_irq, cpu_pmu, 1); | 135 | on_each_cpu(cpu_pmu_enable_percpu_irq, &irq, 1); |
| 142 | } else { | 136 | } else { |
| 143 | for (i = 0; i < irqs; ++i) { | 137 | for (i = 0; i < irqs; ++i) { |
| 144 | err = 0; | 138 | err = 0; |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 81ef686a91ca..a35f6ebbd2c2 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
| @@ -334,6 +334,8 @@ void flush_thread(void) | |||
| 334 | memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); | 334 | memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); |
| 335 | memset(&thread->fpstate, 0, sizeof(union fp_state)); | 335 | memset(&thread->fpstate, 0, sizeof(union fp_state)); |
| 336 | 336 | ||
| 337 | flush_tls(); | ||
| 338 | |||
| 337 | thread_notify(THREAD_NOTIFY_FLUSH, thread); | 339 | thread_notify(THREAD_NOTIFY_FLUSH, thread); |
| 338 | } | 340 | } |
| 339 | 341 | ||
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c index 67ca8578c6d8..587fdfe1a72c 100644 --- a/arch/arm/kernel/swp_emulate.c +++ b/arch/arm/kernel/swp_emulate.c | |||
| @@ -142,14 +142,6 @@ static int emulate_swpX(unsigned int address, unsigned int *data, | |||
| 142 | while (1) { | 142 | while (1) { |
| 143 | unsigned long temp; | 143 | unsigned long temp; |
| 144 | 144 | ||
| 145 | /* | ||
| 146 | * Barrier required between accessing protected resource and | ||
| 147 | * releasing a lock for it. Legacy code might not have done | ||
| 148 | * this, and we cannot determine that this is not the case | ||
| 149 | * being emulated, so insert always. | ||
| 150 | */ | ||
| 151 | smp_mb(); | ||
| 152 | |||
| 153 | if (type == TYPE_SWPB) | 145 | if (type == TYPE_SWPB) |
| 154 | __user_swpb_asm(*data, address, res, temp); | 146 | __user_swpb_asm(*data, address, res, temp); |
| 155 | else | 147 | else |
| @@ -162,13 +154,6 @@ static int emulate_swpX(unsigned int address, unsigned int *data, | |||
| 162 | } | 154 | } |
| 163 | 155 | ||
| 164 | if (res == 0) { | 156 | if (res == 0) { |
| 165 | /* | ||
| 166 | * Barrier also required between acquiring a lock for a | ||
| 167 | * protected resource and accessing the resource. Inserted for | ||
| 168 | * same reason as above. | ||
| 169 | */ | ||
| 170 | smp_mb(); | ||
| 171 | |||
| 172 | if (type == TYPE_SWPB) | 157 | if (type == TYPE_SWPB) |
| 173 | swpbcounter++; | 158 | swpbcounter++; |
| 174 | else | 159 | else |
diff --git a/arch/arm/kernel/thumbee.c b/arch/arm/kernel/thumbee.c index 7b8403b76666..80f0d69205e7 100644 --- a/arch/arm/kernel/thumbee.c +++ b/arch/arm/kernel/thumbee.c | |||
| @@ -45,7 +45,7 @@ static int thumbee_notifier(struct notifier_block *self, unsigned long cmd, void | |||
| 45 | 45 | ||
| 46 | switch (cmd) { | 46 | switch (cmd) { |
| 47 | case THREAD_NOTIFY_FLUSH: | 47 | case THREAD_NOTIFY_FLUSH: |
| 48 | thread->thumbee_state = 0; | 48 | teehbr_write(0); |
| 49 | break; | 49 | break; |
| 50 | case THREAD_NOTIFY_SWITCH: | 50 | case THREAD_NOTIFY_SWITCH: |
| 51 | current_thread_info()->thumbee_state = teehbr_read(); | 51 | current_thread_info()->thumbee_state = teehbr_read(); |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index c8e4bb714944..a964c9f40f87 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
| @@ -581,7 +581,6 @@ do_cache_op(unsigned long start, unsigned long end, int flags) | |||
| 581 | #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE) | 581 | #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE) |
| 582 | asmlinkage int arm_syscall(int no, struct pt_regs *regs) | 582 | asmlinkage int arm_syscall(int no, struct pt_regs *regs) |
| 583 | { | 583 | { |
| 584 | struct thread_info *thread = current_thread_info(); | ||
| 585 | siginfo_t info; | 584 | siginfo_t info; |
| 586 | 585 | ||
| 587 | if ((no >> 16) != (__ARM_NR_BASE>> 16)) | 586 | if ((no >> 16) != (__ARM_NR_BASE>> 16)) |
| @@ -632,21 +631,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
| 632 | return regs->ARM_r0; | 631 | return regs->ARM_r0; |
| 633 | 632 | ||
| 634 | case NR(set_tls): | 633 | case NR(set_tls): |
| 635 | thread->tp_value[0] = regs->ARM_r0; | 634 | set_tls(regs->ARM_r0); |
| 636 | if (tls_emu) | ||
| 637 | return 0; | ||
| 638 | if (has_tls_reg) { | ||
| 639 | asm ("mcr p15, 0, %0, c13, c0, 3" | ||
| 640 | : : "r" (regs->ARM_r0)); | ||
| 641 | } else { | ||
| 642 | /* | ||
| 643 | * User space must never try to access this directly. | ||
| 644 | * Expect your app to break eventually if you do so. | ||
| 645 | * The user helper at 0xffff0fe0 must be used instead. | ||
| 646 | * (see entry-armv.S for details) | ||
| 647 | */ | ||
| 648 | *((unsigned int *)0xffff0ff0) = regs->ARM_r0; | ||
| 649 | } | ||
| 650 | return 0; | 635 | return 0; |
| 651 | 636 | ||
| 652 | #ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG | 637 | #ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG |
diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c index 4c979d466cc1..a96a8043277c 100644 --- a/arch/arm/kvm/handle_exit.c +++ b/arch/arm/kvm/handle_exit.c | |||
| @@ -93,6 +93,8 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
| 93 | else | 93 | else |
| 94 | kvm_vcpu_block(vcpu); | 94 | kvm_vcpu_block(vcpu); |
| 95 | 95 | ||
| 96 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); | ||
| 97 | |||
| 96 | return 1; | 98 | return 1; |
| 97 | } | 99 | } |
| 98 | 100 | ||
diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S index 991415d978b6..3988e72d16ff 100644 --- a/arch/arm/kvm/init.S +++ b/arch/arm/kvm/init.S | |||
| @@ -99,6 +99,10 @@ __do_hyp_init: | |||
| 99 | mrc p15, 0, r0, c10, c2, 1 | 99 | mrc p15, 0, r0, c10, c2, 1 |
| 100 | mcr p15, 4, r0, c10, c2, 1 | 100 | mcr p15, 4, r0, c10, c2, 1 |
| 101 | 101 | ||
| 102 | @ Invalidate the stale TLBs from Bootloader | ||
| 103 | mcr p15, 4, r0, c8, c7, 0 @ TLBIALLH | ||
| 104 | dsb ish | ||
| 105 | |||
| 102 | @ Set the HSCTLR to: | 106 | @ Set the HSCTLR to: |
| 103 | @ - ARM/THUMB exceptions: Kernel config (Thumb-2 kernel) | 107 | @ - ARM/THUMB exceptions: Kernel config (Thumb-2 kernel) |
| 104 | @ - Endianness: Kernel config | 108 | @ - Endianness: Kernel config |
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S index 938600098b88..8ecfd15c3a02 100644 --- a/arch/arm/lib/getuser.S +++ b/arch/arm/lib/getuser.S | |||
| @@ -80,7 +80,7 @@ ENTRY(__get_user_8) | |||
| 80 | ENDPROC(__get_user_8) | 80 | ENDPROC(__get_user_8) |
| 81 | 81 | ||
| 82 | #ifdef __ARMEB__ | 82 | #ifdef __ARMEB__ |
| 83 | ENTRY(__get_user_lo8) | 83 | ENTRY(__get_user_32t_8) |
| 84 | check_uaccess r0, 8, r1, r2, __get_user_bad | 84 | check_uaccess r0, 8, r1, r2, __get_user_bad |
| 85 | #ifdef CONFIG_CPU_USE_DOMAINS | 85 | #ifdef CONFIG_CPU_USE_DOMAINS |
| 86 | add r0, r0, #4 | 86 | add r0, r0, #4 |
| @@ -90,7 +90,37 @@ ENTRY(__get_user_lo8) | |||
| 90 | #endif | 90 | #endif |
| 91 | mov r0, #0 | 91 | mov r0, #0 |
| 92 | ret lr | 92 | ret lr |
| 93 | ENDPROC(__get_user_lo8) | 93 | ENDPROC(__get_user_32t_8) |
| 94 | |||
| 95 | ENTRY(__get_user_64t_1) | ||
| 96 | check_uaccess r0, 1, r1, r2, __get_user_bad8 | ||
| 97 | 8: TUSER(ldrb) r3, [r0] | ||
| 98 | mov r0, #0 | ||
| 99 | ret lr | ||
| 100 | ENDPROC(__get_user_64t_1) | ||
| 101 | |||
| 102 | ENTRY(__get_user_64t_2) | ||
| 103 | check_uaccess r0, 2, r1, r2, __get_user_bad8 | ||
| 104 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
| 105 | rb .req ip | ||
| 106 | 9: ldrbt r3, [r0], #1 | ||
| 107 | 10: ldrbt rb, [r0], #0 | ||
| 108 | #else | ||
| 109 | rb .req r0 | ||
| 110 | 9: ldrb r3, [r0] | ||
| 111 | 10: ldrb rb, [r0, #1] | ||
| 112 | #endif | ||
| 113 | orr r3, rb, r3, lsl #8 | ||
| 114 | mov r0, #0 | ||
| 115 | ret lr | ||
| 116 | ENDPROC(__get_user_64t_2) | ||
| 117 | |||
| 118 | ENTRY(__get_user_64t_4) | ||
| 119 | check_uaccess r0, 4, r1, r2, __get_user_bad8 | ||
| 120 | 11: TUSER(ldr) r3, [r0] | ||
| 121 | mov r0, #0 | ||
| 122 | ret lr | ||
| 123 | ENDPROC(__get_user_64t_4) | ||
| 94 | #endif | 124 | #endif |
| 95 | 125 | ||
| 96 | __get_user_bad8: | 126 | __get_user_bad8: |
| @@ -111,5 +141,9 @@ ENDPROC(__get_user_bad8) | |||
| 111 | .long 6b, __get_user_bad8 | 141 | .long 6b, __get_user_bad8 |
| 112 | #ifdef __ARMEB__ | 142 | #ifdef __ARMEB__ |
| 113 | .long 7b, __get_user_bad | 143 | .long 7b, __get_user_bad |
| 144 | .long 8b, __get_user_bad8 | ||
| 145 | .long 9b, __get_user_bad8 | ||
| 146 | .long 10b, __get_user_bad8 | ||
| 147 | .long 11b, __get_user_bad8 | ||
| 114 | #endif | 148 | #endif |
| 115 | .popsection | 149 | .popsection |
diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c index 3a185faee795..f4b6e91843e4 100644 --- a/arch/arm/mach-at91/board-dt-rm9200.c +++ b/arch/arm/mach-at91/board-dt-rm9200.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | #include <linux/of_irq.h> | 16 | #include <linux/of_irq.h> |
| 17 | #include <linux/clk-provider.h> | ||
| 17 | 18 | ||
| 18 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
| 19 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
| @@ -35,13 +36,21 @@ static void __init at91rm9200_dt_init_irq(void) | |||
| 35 | of_irq_init(irq_of_match); | 36 | of_irq_init(irq_of_match); |
| 36 | } | 37 | } |
| 37 | 38 | ||
| 39 | static void __init at91rm9200_dt_timer_init(void) | ||
| 40 | { | ||
| 41 | #if defined(CONFIG_COMMON_CLK) | ||
| 42 | of_clk_init(NULL); | ||
| 43 | #endif | ||
| 44 | at91rm9200_timer_init(); | ||
| 45 | } | ||
| 46 | |||
| 38 | static const char *at91rm9200_dt_board_compat[] __initdata = { | 47 | static const char *at91rm9200_dt_board_compat[] __initdata = { |
| 39 | "atmel,at91rm9200", | 48 | "atmel,at91rm9200", |
| 40 | NULL | 49 | NULL |
| 41 | }; | 50 | }; |
| 42 | 51 | ||
| 43 | DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)") | 52 | DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)") |
| 44 | .init_time = at91rm9200_timer_init, | 53 | .init_time = at91rm9200_dt_timer_init, |
| 45 | .map_io = at91_map_io, | 54 | .map_io = at91_map_io, |
| 46 | .handle_irq = at91_aic_handle_irq, | 55 | .handle_irq = at91_aic_handle_irq, |
| 47 | .init_early = at91rm9200_dt_initialize, | 56 | .init_early = at91rm9200_dt_initialize, |
diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile index 67c492aabf4d..b19a39652545 100644 --- a/arch/arm/mach-bcm/Makefile +++ b/arch/arm/mach-bcm/Makefile | |||
| @@ -36,5 +36,4 @@ obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o | |||
| 36 | 36 | ||
| 37 | ifeq ($(CONFIG_ARCH_BRCMSTB),y) | 37 | ifeq ($(CONFIG_ARCH_BRCMSTB),y) |
| 38 | obj-y += brcmstb.o | 38 | obj-y += brcmstb.o |
| 39 | obj-$(CONFIG_SMP) += headsmp-brcmstb.o platsmp-brcmstb.o | ||
| 40 | endif | 39 | endif |
diff --git a/arch/arm/mach-bcm/brcmstb.h b/arch/arm/mach-bcm/brcmstb.h deleted file mode 100644 index ec0c3d112b36..000000000000 --- a/arch/arm/mach-bcm/brcmstb.h +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2013-2014 Broadcom Corporation | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License as | ||
| 6 | * published by the Free Software Foundation version 2. | ||
| 7 | * | ||
| 8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 9 | * kind, whether express or implied; without even the implied warranty | ||
| 10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __BRCMSTB_H__ | ||
| 15 | #define __BRCMSTB_H__ | ||
| 16 | |||
| 17 | void brcmstb_secondary_startup(void); | ||
| 18 | |||
| 19 | #endif /* __BRCMSTB_H__ */ | ||
diff --git a/arch/arm/mach-bcm/headsmp-brcmstb.S b/arch/arm/mach-bcm/headsmp-brcmstb.S deleted file mode 100644 index 199c1ea58248..000000000000 --- a/arch/arm/mach-bcm/headsmp-brcmstb.S +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * SMP boot code for secondary CPUs | ||
| 3 | * Based on arch/arm/mach-tegra/headsmp.S | ||
| 4 | * | ||
| 5 | * Copyright (C) 2010 NVIDIA, Inc. | ||
| 6 | * Copyright (C) 2013-2014 Broadcom Corporation | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License as | ||
| 10 | * published by the Free Software Foundation version 2. | ||
| 11 | * | ||
| 12 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 13 | * kind, whether express or implied; without even the implied warranty | ||
| 14 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <asm/assembler.h> | ||
| 19 | #include <linux/linkage.h> | ||
| 20 | #include <linux/init.h> | ||
| 21 | |||
| 22 | .section ".text.head", "ax" | ||
| 23 | |||
| 24 | ENTRY(brcmstb_secondary_startup) | ||
| 25 | /* | ||
| 26 | * Ensure CPU is in a sane state by disabling all IRQs and switching | ||
| 27 | * into SVC mode. | ||
| 28 | */ | ||
| 29 | setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r0 | ||
| 30 | |||
| 31 | bl v7_invalidate_l1 | ||
| 32 | b secondary_startup | ||
| 33 | ENDPROC(brcmstb_secondary_startup) | ||
diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c deleted file mode 100644 index af780e9c23a6..000000000000 --- a/arch/arm/mach-bcm/platsmp-brcmstb.c +++ /dev/null | |||
| @@ -1,363 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Broadcom STB CPU SMP and hotplug support for ARM | ||
| 3 | * | ||
| 4 | * Copyright (C) 2013-2014 Broadcom Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License as | ||
| 8 | * published by the Free Software Foundation version 2. | ||
| 9 | * | ||
| 10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 11 | * kind, whether express or implied; without even the implied warranty | ||
| 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/delay.h> | ||
| 17 | #include <linux/errno.h> | ||
| 18 | #include <linux/init.h> | ||
| 19 | #include <linux/io.h> | ||
| 20 | #include <linux/of_address.h> | ||
| 21 | #include <linux/of_platform.h> | ||
| 22 | #include <linux/printk.h> | ||
| 23 | #include <linux/regmap.h> | ||
| 24 | #include <linux/smp.h> | ||
| 25 | #include <linux/mfd/syscon.h> | ||
| 26 | #include <linux/spinlock.h> | ||
| 27 | |||
| 28 | #include <asm/cacheflush.h> | ||
| 29 | #include <asm/cp15.h> | ||
| 30 | #include <asm/mach-types.h> | ||
| 31 | #include <asm/smp_plat.h> | ||
| 32 | |||
| 33 | #include "brcmstb.h" | ||
| 34 | |||
| 35 | enum { | ||
| 36 | ZONE_MAN_CLKEN_MASK = BIT(0), | ||
| 37 | ZONE_MAN_RESET_CNTL_MASK = BIT(1), | ||
| 38 | ZONE_MAN_MEM_PWR_MASK = BIT(4), | ||
| 39 | ZONE_RESERVED_1_MASK = BIT(5), | ||
| 40 | ZONE_MAN_ISO_CNTL_MASK = BIT(6), | ||
| 41 | ZONE_MANUAL_CONTROL_MASK = BIT(7), | ||
| 42 | ZONE_PWR_DN_REQ_MASK = BIT(9), | ||
| 43 | ZONE_PWR_UP_REQ_MASK = BIT(10), | ||
| 44 | ZONE_BLK_RST_ASSERT_MASK = BIT(12), | ||
| 45 | ZONE_PWR_OFF_STATE_MASK = BIT(25), | ||
| 46 | ZONE_PWR_ON_STATE_MASK = BIT(26), | ||
| 47 | ZONE_DPG_PWR_STATE_MASK = BIT(28), | ||
| 48 | ZONE_MEM_PWR_STATE_MASK = BIT(29), | ||
| 49 | ZONE_RESET_STATE_MASK = BIT(31), | ||
| 50 | CPU0_PWR_ZONE_CTRL_REG = 1, | ||
| 51 | CPU_RESET_CONFIG_REG = 2, | ||
| 52 | }; | ||
| 53 | |||
| 54 | static void __iomem *cpubiuctrl_block; | ||
| 55 | static void __iomem *hif_cont_block; | ||
| 56 | static u32 cpu0_pwr_zone_ctrl_reg; | ||
| 57 | static u32 cpu_rst_cfg_reg; | ||
| 58 | static u32 hif_cont_reg; | ||
| 59 | |||
| 60 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 61 | static DEFINE_PER_CPU_ALIGNED(int, per_cpu_sw_state); | ||
| 62 | |||
| 63 | static int per_cpu_sw_state_rd(u32 cpu) | ||
| 64 | { | ||
| 65 | sync_cache_r(SHIFT_PERCPU_PTR(&per_cpu_sw_state, per_cpu_offset(cpu))); | ||
| 66 | return per_cpu(per_cpu_sw_state, cpu); | ||
| 67 | } | ||
| 68 | |||
| 69 | static void per_cpu_sw_state_wr(u32 cpu, int val) | ||
| 70 | { | ||
| 71 | per_cpu(per_cpu_sw_state, cpu) = val; | ||
| 72 | dmb(); | ||
| 73 | sync_cache_w(SHIFT_PERCPU_PTR(&per_cpu_sw_state, per_cpu_offset(cpu))); | ||
| 74 | dsb_sev(); | ||
| 75 | } | ||
| 76 | #else | ||
| 77 | static inline void per_cpu_sw_state_wr(u32 cpu, int val) { } | ||
| 78 | #endif | ||
| 79 | |||
| 80 | static void __iomem *pwr_ctrl_get_base(u32 cpu) | ||
| 81 | { | ||
| 82 | void __iomem *base = cpubiuctrl_block + cpu0_pwr_zone_ctrl_reg; | ||
| 83 | base += (cpu_logical_map(cpu) * 4); | ||
| 84 | return base; | ||
| 85 | } | ||
| 86 | |||
| 87 | static u32 pwr_ctrl_rd(u32 cpu) | ||
| 88 | { | ||
| 89 | void __iomem *base = pwr_ctrl_get_base(cpu); | ||
| 90 | return readl_relaxed(base); | ||
| 91 | } | ||
| 92 | |||
| 93 | static void pwr_ctrl_wr(u32 cpu, u32 val) | ||
| 94 | { | ||
| 95 | void __iomem *base = pwr_ctrl_get_base(cpu); | ||
| 96 | writel(val, base); | ||
| 97 | } | ||
| 98 | |||
| 99 | static void cpu_rst_cfg_set(u32 cpu, int set) | ||
| 100 | { | ||
| 101 | u32 val; | ||
| 102 | val = readl_relaxed(cpubiuctrl_block + cpu_rst_cfg_reg); | ||
| 103 | if (set) | ||
| 104 | val |= BIT(cpu_logical_map(cpu)); | ||
| 105 | else | ||
| 106 | val &= ~BIT(cpu_logical_map(cpu)); | ||
| 107 | writel_relaxed(val, cpubiuctrl_block + cpu_rst_cfg_reg); | ||
| 108 | } | ||
| 109 | |||
| 110 | static void cpu_set_boot_addr(u32 cpu, unsigned long boot_addr) | ||
| 111 | { | ||
| 112 | const int reg_ofs = cpu_logical_map(cpu) * 8; | ||
| 113 | writel_relaxed(0, hif_cont_block + hif_cont_reg + reg_ofs); | ||
| 114 | writel_relaxed(boot_addr, hif_cont_block + hif_cont_reg + 4 + reg_ofs); | ||
| 115 | } | ||
| 116 | |||
| 117 | static void brcmstb_cpu_boot(u32 cpu) | ||
| 118 | { | ||
| 119 | pr_info("SMP: Booting CPU%d...\n", cpu); | ||
| 120 | |||
| 121 | /* | ||
| 122 | * set the reset vector to point to the secondary_startup | ||
| 123 | * routine | ||
| 124 | */ | ||
| 125 | cpu_set_boot_addr(cpu, virt_to_phys(brcmstb_secondary_startup)); | ||
| 126 | |||
| 127 | /* unhalt the cpu */ | ||
| 128 | cpu_rst_cfg_set(cpu, 0); | ||
| 129 | } | ||
| 130 | |||
| 131 | static void brcmstb_cpu_power_on(u32 cpu) | ||
| 132 | { | ||
| 133 | /* | ||
| 134 | * The secondary cores power was cut, so we must go through | ||
| 135 | * power-on initialization. | ||
| 136 | */ | ||
| 137 | u32 tmp; | ||
| 138 | |||
| 139 | pr_info("SMP: Powering up CPU%d...\n", cpu); | ||
| 140 | |||
| 141 | /* Request zone power up */ | ||
| 142 | pwr_ctrl_wr(cpu, ZONE_PWR_UP_REQ_MASK); | ||
| 143 | |||
| 144 | /* Wait for the power up FSM to complete */ | ||
| 145 | do { | ||
| 146 | tmp = pwr_ctrl_rd(cpu); | ||
| 147 | } while (!(tmp & ZONE_PWR_ON_STATE_MASK)); | ||
| 148 | |||
| 149 | per_cpu_sw_state_wr(cpu, 1); | ||
| 150 | } | ||
| 151 | |||
| 152 | static int brcmstb_cpu_get_power_state(u32 cpu) | ||
| 153 | { | ||
| 154 | int tmp = pwr_ctrl_rd(cpu); | ||
| 155 | return (tmp & ZONE_RESET_STATE_MASK) ? 0 : 1; | ||
| 156 | } | ||
| 157 | |||
| 158 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 159 | |||
| 160 | static void brcmstb_cpu_die(u32 cpu) | ||
| 161 | { | ||
| 162 | v7_exit_coherency_flush(all); | ||
| 163 | |||
| 164 | /* Prevent all interrupts from reaching this CPU. */ | ||
| 165 | arch_local_irq_disable(); | ||
| 166 | |||
| 167 | /* | ||
| 168 | * Final full barrier to ensure everything before this instruction has | ||
| 169 | * quiesced. | ||
| 170 | */ | ||
| 171 | isb(); | ||
| 172 | dsb(); | ||
| 173 | |||
| 174 | per_cpu_sw_state_wr(cpu, 0); | ||
| 175 | |||
| 176 | /* Sit and wait to die */ | ||
| 177 | wfi(); | ||
| 178 | |||
| 179 | /* We should never get here... */ | ||
| 180 | panic("Spurious interrupt on CPU %d received!\n", cpu); | ||
| 181 | } | ||
| 182 | |||
| 183 | static int brcmstb_cpu_kill(u32 cpu) | ||
| 184 | { | ||
| 185 | u32 tmp; | ||
| 186 | |||
| 187 | pr_info("SMP: Powering down CPU%d...\n", cpu); | ||
| 188 | |||
| 189 | while (per_cpu_sw_state_rd(cpu)) | ||
| 190 | ; | ||
| 191 | |||
| 192 | /* Program zone reset */ | ||
| 193 | pwr_ctrl_wr(cpu, ZONE_RESET_STATE_MASK | ZONE_BLK_RST_ASSERT_MASK | | ||
| 194 | ZONE_PWR_DN_REQ_MASK); | ||
| 195 | |||
| 196 | /* Verify zone reset */ | ||
| 197 | tmp = pwr_ctrl_rd(cpu); | ||
| 198 | if (!(tmp & ZONE_RESET_STATE_MASK)) | ||
| 199 | pr_err("%s: Zone reset bit for CPU %d not asserted!\n", | ||
| 200 | __func__, cpu); | ||
| 201 | |||
| 202 | /* Wait for power down */ | ||
| 203 | do { | ||
| 204 | tmp = pwr_ctrl_rd(cpu); | ||
| 205 | } while (!(tmp & ZONE_PWR_OFF_STATE_MASK)); | ||
| 206 | |||
| 207 | /* Settle-time from Broadcom-internal DVT reference code */ | ||
| 208 | udelay(7); | ||
| 209 | |||
| 210 | /* Assert reset on the CPU */ | ||
| 211 | cpu_rst_cfg_set(cpu, 1); | ||
| 212 | |||
| 213 | return 1; | ||
| 214 | } | ||
| 215 | |||
| 216 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
| 217 | |||
| 218 | static int __init setup_hifcpubiuctrl_regs(struct device_node *np) | ||
| 219 | { | ||
| 220 | int rc = 0; | ||
| 221 | char *name; | ||
| 222 | struct device_node *syscon_np = NULL; | ||
| 223 | |||
| 224 | name = "syscon-cpu"; | ||
| 225 | |||
| 226 | syscon_np = of_parse_phandle(np, name, 0); | ||
| 227 | if (!syscon_np) { | ||
| 228 | pr_err("can't find phandle %s\n", name); | ||
| 229 | rc = -EINVAL; | ||
| 230 | goto cleanup; | ||
| 231 | } | ||
| 232 | |||
| 233 | cpubiuctrl_block = of_iomap(syscon_np, 0); | ||
| 234 | if (!cpubiuctrl_block) { | ||
| 235 | pr_err("iomap failed for cpubiuctrl_block\n"); | ||
| 236 | rc = -EINVAL; | ||
| 237 | goto cleanup; | ||
| 238 | } | ||
| 239 | |||
| 240 | rc = of_property_read_u32_index(np, name, CPU0_PWR_ZONE_CTRL_REG, | ||
| 241 | &cpu0_pwr_zone_ctrl_reg); | ||
| 242 | if (rc) { | ||
| 243 | pr_err("failed to read 1st entry from %s property (%d)\n", name, | ||
| 244 | rc); | ||
| 245 | rc = -EINVAL; | ||
| 246 | goto cleanup; | ||
| 247 | } | ||
| 248 | |||
| 249 | rc = of_property_read_u32_index(np, name, CPU_RESET_CONFIG_REG, | ||
| 250 | &cpu_rst_cfg_reg); | ||
| 251 | if (rc) { | ||
| 252 | pr_err("failed to read 2nd entry from %s property (%d)\n", name, | ||
| 253 | rc); | ||
| 254 | rc = -EINVAL; | ||
| 255 | goto cleanup; | ||
| 256 | } | ||
| 257 | |||
| 258 | cleanup: | ||
| 259 | if (syscon_np) | ||
| 260 | of_node_put(syscon_np); | ||
| 261 | |||
| 262 | return rc; | ||
| 263 | } | ||
| 264 | |||
| 265 | static int __init setup_hifcont_regs(struct device_node *np) | ||
| 266 | { | ||
| 267 | int rc = 0; | ||
| 268 | char *name; | ||
| 269 | struct device_node *syscon_np = NULL; | ||
| 270 | |||
| 271 | name = "syscon-cont"; | ||
| 272 | |||
| 273 | syscon_np = of_parse_phandle(np, name, 0); | ||
| 274 | if (!syscon_np) { | ||
| 275 | pr_err("can't find phandle %s\n", name); | ||
| 276 | rc = -EINVAL; | ||
| 277 | goto cleanup; | ||
| 278 | } | ||
| 279 | |||
| 280 | hif_cont_block = of_iomap(syscon_np, 0); | ||
| 281 | if (!hif_cont_block) { | ||
| 282 | pr_err("iomap failed for hif_cont_block\n"); | ||
| 283 | rc = -EINVAL; | ||
| 284 | goto cleanup; | ||
| 285 | } | ||
| 286 | |||
| 287 | /* offset is at top of hif_cont_block */ | ||
| 288 | hif_cont_reg = 0; | ||
| 289 | |||
| 290 | cleanup: | ||
| 291 | if (syscon_np) | ||
| 292 | of_node_put(syscon_np); | ||
| 293 | |||
| 294 | return rc; | ||
| 295 | } | ||
| 296 | |||
| 297 | static void __init brcmstb_cpu_ctrl_setup(unsigned int max_cpus) | ||
| 298 | { | ||
| 299 | int rc; | ||
| 300 | struct device_node *np; | ||
| 301 | char *name; | ||
| 302 | |||
| 303 | name = "brcm,brcmstb-smpboot"; | ||
| 304 | np = of_find_compatible_node(NULL, NULL, name); | ||
| 305 | if (!np) { | ||
| 306 | pr_err("can't find compatible node %s\n", name); | ||
| 307 | return; | ||
| 308 | } | ||
| 309 | |||
| 310 | rc = setup_hifcpubiuctrl_regs(np); | ||
| 311 | if (rc) | ||
| 312 | return; | ||
| 313 | |||
| 314 | rc = setup_hifcont_regs(np); | ||
| 315 | if (rc) | ||
| 316 | return; | ||
| 317 | } | ||
| 318 | |||
| 319 | static DEFINE_SPINLOCK(boot_lock); | ||
| 320 | |||
| 321 | static void brcmstb_secondary_init(unsigned int cpu) | ||
| 322 | { | ||
| 323 | /* | ||
| 324 | * Synchronise with the boot thread. | ||
| 325 | */ | ||
| 326 | spin_lock(&boot_lock); | ||
| 327 | spin_unlock(&boot_lock); | ||
| 328 | } | ||
| 329 | |||
| 330 | static int brcmstb_boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
| 331 | { | ||
| 332 | /* | ||
| 333 | * set synchronisation state between this boot processor | ||
| 334 | * and the secondary one | ||
| 335 | */ | ||
| 336 | spin_lock(&boot_lock); | ||
| 337 | |||
| 338 | /* Bring up power to the core if necessary */ | ||
| 339 | if (brcmstb_cpu_get_power_state(cpu) == 0) | ||
| 340 | brcmstb_cpu_power_on(cpu); | ||
| 341 | |||
| 342 | brcmstb_cpu_boot(cpu); | ||
| 343 | |||
| 344 | /* | ||
| 345 | * now the secondary core is starting up let it run its | ||
| 346 | * calibrations, then wait for it to finish | ||
| 347 | */ | ||
| 348 | spin_unlock(&boot_lock); | ||
| 349 | |||
| 350 | return 0; | ||
| 351 | } | ||
| 352 | |||
| 353 | static struct smp_operations brcmstb_smp_ops __initdata = { | ||
| 354 | .smp_prepare_cpus = brcmstb_cpu_ctrl_setup, | ||
| 355 | .smp_secondary_init = brcmstb_secondary_init, | ||
| 356 | .smp_boot_secondary = brcmstb_boot_secondary, | ||
| 357 | #ifdef CONFIG_HOTPLUG_CPU | ||
| 358 | .cpu_kill = brcmstb_cpu_kill, | ||
| 359 | .cpu_die = brcmstb_cpu_die, | ||
| 360 | #endif | ||
| 361 | }; | ||
| 362 | |||
| 363 | CPU_METHOD_OF_DECLARE(brcmstb_smp, "brcm,brahma-b15", &brcmstb_smp_ops); | ||
diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c index b2f8b60cf0e9..dc9a764a7c37 100644 --- a/arch/arm/mach-exynos/mcpm-exynos.c +++ b/arch/arm/mach-exynos/mcpm-exynos.c | |||
| @@ -43,7 +43,6 @@ | |||
| 43 | "mcr p15, 0, r0, c1, c0, 0 @ set SCTLR\n\t" \ | 43 | "mcr p15, 0, r0, c1, c0, 0 @ set SCTLR\n\t" \ |
| 44 | "isb\n\t"\ | 44 | "isb\n\t"\ |
| 45 | "bl v7_flush_dcache_"__stringify(level)"\n\t" \ | 45 | "bl v7_flush_dcache_"__stringify(level)"\n\t" \ |
| 46 | "clrex\n\t"\ | ||
| 47 | "mrc p15, 0, r0, c1, c0, 1 @ get ACTLR\n\t" \ | 46 | "mrc p15, 0, r0, c1, c0, 1 @ get ACTLR\n\t" \ |
| 48 | "bic r0, r0, #(1 << 6) @ disable local coherency\n\t" \ | 47 | "bic r0, r0, #(1 << 6) @ disable local coherency\n\t" \ |
| 49 | /* Dummy Load of a device register to avoid Erratum 799270 */ \ | 48 | /* Dummy Load of a device register to avoid Erratum 799270 */ \ |
diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c index 84acdfd1d715..5a75cdc81891 100644 --- a/arch/arm/mach-imx/clk-gate2.c +++ b/arch/arm/mach-imx/clk-gate2.c | |||
| @@ -97,7 +97,7 @@ static int clk_gate2_is_enabled(struct clk_hw *hw) | |||
| 97 | struct clk_gate2 *gate = to_clk_gate2(hw); | 97 | struct clk_gate2 *gate = to_clk_gate2(hw); |
| 98 | 98 | ||
| 99 | if (gate->share_count) | 99 | if (gate->share_count) |
| 100 | return !!(*gate->share_count); | 100 | return !!__clk_get_enable_count(hw->clk); |
| 101 | else | 101 | else |
| 102 | return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx); | 102 | return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx); |
| 103 | } | 103 | } |
| @@ -127,10 +127,6 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, | |||
| 127 | gate->bit_idx = bit_idx; | 127 | gate->bit_idx = bit_idx; |
| 128 | gate->flags = clk_gate2_flags; | 128 | gate->flags = clk_gate2_flags; |
| 129 | gate->lock = lock; | 129 | gate->lock = lock; |
| 130 | |||
| 131 | /* Initialize share_count per hardware state */ | ||
| 132 | if (share_count) | ||
| 133 | *share_count = clk_gate2_reg_is_enabled(reg, bit_idx) ? 1 : 0; | ||
| 134 | gate->share_count = share_count; | 130 | gate->share_count = share_count; |
| 135 | 131 | ||
| 136 | init.name = name; | 132 | init.name = name; |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index e7189dcc9309..08d4167cc7c5 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
| @@ -1,9 +1,6 @@ | |||
| 1 | menu "TI OMAP/AM/DM/DRA Family" | 1 | menu "TI OMAP/AM/DM/DRA Family" |
| 2 | depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 | 2 | depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 |
| 3 | 3 | ||
| 4 | config ARCH_OMAP | ||
| 5 | bool | ||
| 6 | |||
| 7 | config ARCH_OMAP2 | 4 | config ARCH_OMAP2 |
| 8 | bool "TI OMAP2" | 5 | bool "TI OMAP2" |
| 9 | depends on ARCH_MULTI_V6 | 6 | depends on ARCH_MULTI_V6 |
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index e87f2a83d6bf..2d245c2e641c 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
| @@ -142,7 +142,7 @@ __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs, | |||
| 142 | board_nand_data.nr_parts = nr_parts; | 142 | board_nand_data.nr_parts = nr_parts; |
| 143 | board_nand_data.devsize = nand_type; | 143 | board_nand_data.devsize = nand_type; |
| 144 | 144 | ||
| 145 | board_nand_data.ecc_opt = OMAP_ECC_HAM1_CODE_HW; | 145 | board_nand_data.ecc_opt = OMAP_ECC_HAM1_CODE_SW; |
| 146 | gpmc_nand_init(&board_nand_data, gpmc_t); | 146 | gpmc_nand_init(&board_nand_data, gpmc_t); |
| 147 | } | 147 | } |
| 148 | #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ | 148 | #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ |
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 8897ad7035fd..cb7764314f17 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
| @@ -49,7 +49,8 @@ static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) | |||
| 49 | return 0; | 49 | return 0; |
| 50 | 50 | ||
| 51 | /* legacy platforms support only HAM1 (1-bit Hamming) ECC scheme */ | 51 | /* legacy platforms support only HAM1 (1-bit Hamming) ECC scheme */ |
| 52 | if (ecc_opt == OMAP_ECC_HAM1_CODE_HW) | 52 | if (ecc_opt == OMAP_ECC_HAM1_CODE_HW || |
| 53 | ecc_opt == OMAP_ECC_HAM1_CODE_SW) | ||
| 53 | return 1; | 54 | return 1; |
| 54 | else | 55 | else |
| 55 | return 0; | 56 | return 0; |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 8bc13380f0a0..2f97228f188a 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
| @@ -1207,8 +1207,7 @@ int gpmc_cs_program_settings(int cs, struct gpmc_settings *p) | |||
| 1207 | } | 1207 | } |
| 1208 | } | 1208 | } |
| 1209 | 1209 | ||
| 1210 | if ((p->wait_on_read || p->wait_on_write) && | 1210 | if (p->wait_pin > gpmc_nr_waitpins) { |
| 1211 | (p->wait_pin > gpmc_nr_waitpins)) { | ||
| 1212 | pr_err("%s: invalid wait-pin (%d)\n", __func__, p->wait_pin); | 1211 | pr_err("%s: invalid wait-pin (%d)\n", __func__, p->wait_pin); |
| 1213 | return -EINVAL; | 1212 | return -EINVAL; |
| 1214 | } | 1213 | } |
| @@ -1288,8 +1287,8 @@ void gpmc_read_settings_dt(struct device_node *np, struct gpmc_settings *p) | |||
| 1288 | p->wait_on_write = of_property_read_bool(np, | 1287 | p->wait_on_write = of_property_read_bool(np, |
| 1289 | "gpmc,wait-on-write"); | 1288 | "gpmc,wait-on-write"); |
| 1290 | if (!p->wait_on_read && !p->wait_on_write) | 1289 | if (!p->wait_on_read && !p->wait_on_write) |
| 1291 | pr_warn("%s: read/write wait monitoring not enabled!\n", | 1290 | pr_debug("%s: rd/wr wait monitoring not enabled!\n", |
| 1292 | __func__); | 1291 | __func__); |
| 1293 | } | 1292 | } |
| 1294 | } | 1293 | } |
| 1295 | 1294 | ||
| @@ -1403,8 +1402,11 @@ static int gpmc_probe_nand_child(struct platform_device *pdev, | |||
| 1403 | pr_err("%s: ti,nand-ecc-opt not found\n", __func__); | 1402 | pr_err("%s: ti,nand-ecc-opt not found\n", __func__); |
| 1404 | return -ENODEV; | 1403 | return -ENODEV; |
| 1405 | } | 1404 | } |
| 1406 | if (!strcmp(s, "ham1") || !strcmp(s, "sw") || | 1405 | |
| 1407 | !strcmp(s, "hw") || !strcmp(s, "hw-romcode")) | 1406 | if (!strcmp(s, "sw")) |
| 1407 | gpmc_nand_data->ecc_opt = OMAP_ECC_HAM1_CODE_SW; | ||
| 1408 | else if (!strcmp(s, "ham1") || | ||
| 1409 | !strcmp(s, "hw") || !strcmp(s, "hw-romcode")) | ||
| 1408 | gpmc_nand_data->ecc_opt = | 1410 | gpmc_nand_data->ecc_opt = |
| 1409 | OMAP_ECC_HAM1_CODE_HW; | 1411 | OMAP_ECC_HAM1_CODE_HW; |
| 1410 | else if (!strcmp(s, "bch4")) | 1412 | else if (!strcmp(s, "bch4")) |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index d42022f2a71e..53841dea80ea 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
| @@ -663,7 +663,7 @@ void __init dra7xxx_check_revision(void) | |||
| 663 | 663 | ||
| 664 | default: | 664 | default: |
| 665 | /* Unknown default to latest silicon rev as default*/ | 665 | /* Unknown default to latest silicon rev as default*/ |
| 666 | pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n", | 666 | pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%x)\n", |
| 667 | __func__, idcode, hawkeye, rev); | 667 | __func__, idcode, hawkeye, rev); |
| 668 | omap_revision = DRA752_REV_ES1_1; | 668 | omap_revision = DRA752_REV_ES1_1; |
| 669 | } | 669 | } |
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 01ef59def44b..d22c30d3ccfa 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
| @@ -56,7 +56,7 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias, | |||
| 56 | 56 | ||
| 57 | r = clk_get_sys(dev_name(&od->pdev->dev), clk_alias); | 57 | r = clk_get_sys(dev_name(&od->pdev->dev), clk_alias); |
| 58 | if (!IS_ERR(r)) { | 58 | if (!IS_ERR(r)) { |
| 59 | dev_warn(&od->pdev->dev, | 59 | dev_dbg(&od->pdev->dev, |
| 60 | "alias %s already exists\n", clk_alias); | 60 | "alias %s already exists\n", clk_alias); |
| 61 | clk_put(r); | 61 | clk_put(r); |
| 62 | return; | 62 | return; |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 6c074f37cdd2..9e91a4e7519a 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
| @@ -2065,7 +2065,7 @@ static void _reconfigure_io_chain(void) | |||
| 2065 | 2065 | ||
| 2066 | spin_lock_irqsave(&io_chain_lock, flags); | 2066 | spin_lock_irqsave(&io_chain_lock, flags); |
| 2067 | 2067 | ||
| 2068 | if (cpu_is_omap34xx() && omap3_has_io_chain_ctrl()) | 2068 | if (cpu_is_omap34xx()) |
| 2069 | omap3xxx_prm_reconfigure_io_chain(); | 2069 | omap3xxx_prm_reconfigure_io_chain(); |
| 2070 | else if (cpu_is_omap44xx()) | 2070 | else if (cpu_is_omap44xx()) |
| 2071 | omap44xx_prm_reconfigure_io_chain(); | 2071 | omap44xx_prm_reconfigure_io_chain(); |
| @@ -2185,6 +2185,8 @@ static int _enable(struct omap_hwmod *oh) | |||
| 2185 | oh->mux->pads_dynamic))) { | 2185 | oh->mux->pads_dynamic))) { |
| 2186 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); | 2186 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); |
| 2187 | _reconfigure_io_chain(); | 2187 | _reconfigure_io_chain(); |
| 2188 | } else if (oh->flags & HWMOD_FORCE_MSTANDBY) { | ||
| 2189 | _reconfigure_io_chain(); | ||
| 2188 | } | 2190 | } |
| 2189 | 2191 | ||
| 2190 | _add_initiator_dep(oh, mpu_oh); | 2192 | _add_initiator_dep(oh, mpu_oh); |
| @@ -2291,6 +2293,8 @@ static int _idle(struct omap_hwmod *oh) | |||
| 2291 | if (oh->mux && oh->mux->pads_dynamic) { | 2293 | if (oh->mux && oh->mux->pads_dynamic) { |
| 2292 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE); | 2294 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE); |
| 2293 | _reconfigure_io_chain(); | 2295 | _reconfigure_io_chain(); |
| 2296 | } else if (oh->flags & HWMOD_FORCE_MSTANDBY) { | ||
| 2297 | _reconfigure_io_chain(); | ||
| 2294 | } | 2298 | } |
| 2295 | 2299 | ||
| 2296 | oh->_state = _HWMOD_STATE_IDLE; | 2300 | oh->_state = _HWMOD_STATE_IDLE; |
| @@ -3345,6 +3349,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois) | |||
| 3345 | if (!ois) | 3349 | if (!ois) |
| 3346 | return 0; | 3350 | return 0; |
| 3347 | 3351 | ||
| 3352 | if (ois[0] == NULL) /* Empty list */ | ||
| 3353 | return 0; | ||
| 3354 | |||
| 3348 | if (!linkspace) { | 3355 | if (!linkspace) { |
| 3349 | if (_alloc_linkspace(ois)) { | 3356 | if (_alloc_linkspace(ois)) { |
| 3350 | pr_err("omap_hwmod: could not allocate link space\n"); | 3357 | pr_err("omap_hwmod: could not allocate link space\n"); |
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index 2757abf87fbc..5684f112654b 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include "i2c.h" | 35 | #include "i2c.h" |
| 36 | #include "mmc.h" | 36 | #include "mmc.h" |
| 37 | #include "wd_timer.h" | 37 | #include "wd_timer.h" |
| 38 | #include "soc.h" | ||
| 38 | 39 | ||
| 39 | /* Base offset for all DRA7XX interrupts external to MPUSS */ | 40 | /* Base offset for all DRA7XX interrupts external to MPUSS */ |
| 40 | #define DRA7XX_IRQ_GIC_START 32 | 41 | #define DRA7XX_IRQ_GIC_START 32 |
| @@ -3261,7 +3262,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
| 3261 | &dra7xx_l4_per3__usb_otg_ss1, | 3262 | &dra7xx_l4_per3__usb_otg_ss1, |
| 3262 | &dra7xx_l4_per3__usb_otg_ss2, | 3263 | &dra7xx_l4_per3__usb_otg_ss2, |
| 3263 | &dra7xx_l4_per3__usb_otg_ss3, | 3264 | &dra7xx_l4_per3__usb_otg_ss3, |
| 3264 | &dra7xx_l4_per3__usb_otg_ss4, | ||
| 3265 | &dra7xx_l3_main_1__vcp1, | 3265 | &dra7xx_l3_main_1__vcp1, |
| 3266 | &dra7xx_l4_per2__vcp1, | 3266 | &dra7xx_l4_per2__vcp1, |
| 3267 | &dra7xx_l3_main_1__vcp2, | 3267 | &dra7xx_l3_main_1__vcp2, |
| @@ -3270,8 +3270,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
| 3270 | NULL, | 3270 | NULL, |
| 3271 | }; | 3271 | }; |
| 3272 | 3272 | ||
| 3273 | static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = { | ||
| 3274 | &dra7xx_l4_per3__usb_otg_ss4, | ||
| 3275 | NULL, | ||
| 3276 | }; | ||
| 3277 | |||
| 3278 | static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = { | ||
| 3279 | NULL, | ||
| 3280 | }; | ||
| 3281 | |||
| 3273 | int __init dra7xx_hwmod_init(void) | 3282 | int __init dra7xx_hwmod_init(void) |
| 3274 | { | 3283 | { |
| 3284 | int ret; | ||
| 3285 | |||
| 3275 | omap_hwmod_init(); | 3286 | omap_hwmod_init(); |
| 3276 | return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs); | 3287 | ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs); |
| 3288 | |||
| 3289 | if (!ret && soc_is_dra74x()) | ||
| 3290 | return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs); | ||
| 3291 | else if (!ret && soc_is_dra72x()) | ||
| 3292 | return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs); | ||
| 3293 | |||
| 3294 | return ret; | ||
| 3277 | } | 3295 | } |
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index 2458be6fc67b..372de3edf4a5 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c | |||
| @@ -45,7 +45,7 @@ static struct omap_prcm_irq_setup omap3_prcm_irq_setup = { | |||
| 45 | .ocp_barrier = &omap3xxx_prm_ocp_barrier, | 45 | .ocp_barrier = &omap3xxx_prm_ocp_barrier, |
| 46 | .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen, | 46 | .save_and_clear_irqen = &omap3xxx_prm_save_and_clear_irqen, |
| 47 | .restore_irqen = &omap3xxx_prm_restore_irqen, | 47 | .restore_irqen = &omap3xxx_prm_restore_irqen, |
| 48 | .reconfigure_io_chain = &omap3xxx_prm_reconfigure_io_chain, | 48 | .reconfigure_io_chain = NULL, |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | /* | 51 | /* |
| @@ -369,15 +369,30 @@ void __init omap3_prm_init_pm(bool has_uart4, bool has_iva) | |||
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | /** | 371 | /** |
| 372 | * omap3xxx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain | 372 | * omap3430_pre_es3_1_reconfigure_io_chain - restart wake-up daisy chain |
| 373 | * | ||
| 374 | * The ST_IO_CHAIN bit does not exist in 3430 before es3.1. The only | ||
| 375 | * thing we can do is toggle EN_IO bit for earlier omaps. | ||
| 376 | */ | ||
| 377 | void omap3430_pre_es3_1_reconfigure_io_chain(void) | ||
| 378 | { | ||
| 379 | omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, | ||
| 380 | PM_WKEN); | ||
| 381 | omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, | ||
| 382 | PM_WKEN); | ||
| 383 | omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN); | ||
| 384 | } | ||
| 385 | |||
| 386 | /** | ||
| 387 | * omap3_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain | ||
| 373 | * | 388 | * |
| 374 | * Clear any previously-latched I/O wakeup events and ensure that the | 389 | * Clear any previously-latched I/O wakeup events and ensure that the |
| 375 | * I/O wakeup gates are aligned with the current mux settings. Works | 390 | * I/O wakeup gates are aligned with the current mux settings. Works |
| 376 | * by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then | 391 | * by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then |
| 377 | * deasserting WUCLKIN and clearing the ST_IO_CHAIN WKST bit. No | 392 | * deasserting WUCLKIN and clearing the ST_IO_CHAIN WKST bit. No |
| 378 | * return value. | 393 | * return value. These registers are only available in 3430 es3.1 and later. |
| 379 | */ | 394 | */ |
| 380 | void omap3xxx_prm_reconfigure_io_chain(void) | 395 | void omap3_prm_reconfigure_io_chain(void) |
| 381 | { | 396 | { |
| 382 | int i = 0; | 397 | int i = 0; |
| 383 | 398 | ||
| @@ -400,6 +415,15 @@ void omap3xxx_prm_reconfigure_io_chain(void) | |||
| 400 | } | 415 | } |
| 401 | 416 | ||
| 402 | /** | 417 | /** |
| 418 | * omap3xxx_prm_reconfigure_io_chain - reconfigure I/O chain | ||
| 419 | */ | ||
| 420 | void omap3xxx_prm_reconfigure_io_chain(void) | ||
| 421 | { | ||
| 422 | if (omap3_prcm_irq_setup.reconfigure_io_chain) | ||
| 423 | omap3_prcm_irq_setup.reconfigure_io_chain(); | ||
| 424 | } | ||
| 425 | |||
| 426 | /** | ||
| 403 | * omap3xxx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches | 427 | * omap3xxx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches |
| 404 | * | 428 | * |
| 405 | * Activates the I/O wakeup event latches and allows events logged by | 429 | * Activates the I/O wakeup event latches and allows events logged by |
| @@ -656,6 +680,13 @@ static int omap3xxx_prm_late_init(void) | |||
| 656 | if (!(prm_features & PRM_HAS_IO_WAKEUP)) | 680 | if (!(prm_features & PRM_HAS_IO_WAKEUP)) |
| 657 | return 0; | 681 | return 0; |
| 658 | 682 | ||
| 683 | if (omap3_has_io_chain_ctrl()) | ||
| 684 | omap3_prcm_irq_setup.reconfigure_io_chain = | ||
| 685 | omap3_prm_reconfigure_io_chain; | ||
| 686 | else | ||
| 687 | omap3_prcm_irq_setup.reconfigure_io_chain = | ||
| 688 | omap3430_pre_es3_1_reconfigure_io_chain; | ||
| 689 | |||
| 659 | omap3xxx_prm_enable_io_wakeup(); | 690 | omap3xxx_prm_enable_io_wakeup(); |
| 660 | ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); | 691 | ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); |
| 661 | if (!ret) | 692 | if (!ret) |
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index 01ca8086fb6c..4376f59626d1 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h | |||
| @@ -245,6 +245,8 @@ IS_AM_SUBCLASS(437x, 0x437) | |||
| 245 | #define soc_is_omap54xx() 0 | 245 | #define soc_is_omap54xx() 0 |
| 246 | #define soc_is_omap543x() 0 | 246 | #define soc_is_omap543x() 0 |
| 247 | #define soc_is_dra7xx() 0 | 247 | #define soc_is_dra7xx() 0 |
| 248 | #define soc_is_dra74x() 0 | ||
| 249 | #define soc_is_dra72x() 0 | ||
| 248 | 250 | ||
| 249 | #if defined(MULTI_OMAP2) | 251 | #if defined(MULTI_OMAP2) |
| 250 | # if defined(CONFIG_ARCH_OMAP2) | 252 | # if defined(CONFIG_ARCH_OMAP2) |
| @@ -393,7 +395,11 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
| 393 | 395 | ||
| 394 | #if defined(CONFIG_SOC_DRA7XX) | 396 | #if defined(CONFIG_SOC_DRA7XX) |
| 395 | #undef soc_is_dra7xx | 397 | #undef soc_is_dra7xx |
| 398 | #undef soc_is_dra74x | ||
| 399 | #undef soc_is_dra72x | ||
| 396 | #define soc_is_dra7xx() (of_machine_is_compatible("ti,dra7")) | 400 | #define soc_is_dra7xx() (of_machine_is_compatible("ti,dra7")) |
| 401 | #define soc_is_dra74x() (of_machine_is_compatible("ti,dra74")) | ||
| 402 | #define soc_is_dra72x() (of_machine_is_compatible("ti,dra72")) | ||
| 397 | #endif | 403 | #endif |
| 398 | 404 | ||
| 399 | /* Various silicon revisions for omap2 */ | 405 | /* Various silicon revisions for omap2 */ |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 630fa916bbc6..04b013fbc98f 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
| @@ -61,7 +61,7 @@ EXPORT_SYMBOL(get_clock_tick_rate); | |||
| 61 | /* | 61 | /* |
| 62 | * For non device-tree builds, keep legacy timer init | 62 | * For non device-tree builds, keep legacy timer init |
| 63 | */ | 63 | */ |
| 64 | void pxa_timer_init(void) | 64 | void __init pxa_timer_init(void) |
| 65 | { | 65 | { |
| 66 | pxa_timer_nodt_init(IRQ_OST0, io_p2v(0x40a00000), | 66 | pxa_timer_nodt_init(IRQ_OST0, io_p2v(0x40a00000), |
| 67 | get_clock_tick_rate()); | 67 | get_clock_tick_rate()); |
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index 17435c1aa2fe..126ddafad526 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c | |||
| @@ -183,8 +183,8 @@ enum { | |||
| 183 | 183 | ||
| 184 | static struct clk div4_clks[DIV4_NR] = { | 184 | static struct clk div4_clks[DIV4_NR] = { |
| 185 | [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT), | 185 | [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT), |
| 186 | [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1de0, CLK_ENABLE_ON_INIT), | 186 | [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1df0, CLK_ENABLE_ON_INIT), |
| 187 | [DIV4_SD1] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 0, 0x1de0, CLK_ENABLE_ON_INIT), | 187 | [DIV4_SD1] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 0, 0x1df0, CLK_ENABLE_ON_INIT), |
| 188 | }; | 188 | }; |
| 189 | 189 | ||
| 190 | /* DIV6 clocks */ | 190 | /* DIV6 clocks */ |
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c index 10e193d707f5..453b23129cfa 100644 --- a/arch/arm/mach-shmobile/clock-r8a7791.c +++ b/arch/arm/mach-shmobile/clock-r8a7791.c | |||
| @@ -152,7 +152,7 @@ enum { | |||
| 152 | 152 | ||
| 153 | static struct clk div4_clks[DIV4_NR] = { | 153 | static struct clk div4_clks[DIV4_NR] = { |
| 154 | [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT), | 154 | [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT), |
| 155 | [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1de0, CLK_ENABLE_ON_INIT), | 155 | [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1df0, CLK_ENABLE_ON_INIT), |
| 156 | }; | 156 | }; |
| 157 | 157 | ||
| 158 | /* DIV6 clocks */ | 158 | /* DIV6 clocks */ |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index d8c4048b9e33..02a6f45a0b9e 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
| @@ -644,7 +644,7 @@ static struct clk_lookup lookups[] = { | |||
| 644 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | 644 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ |
| 645 | CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), /* SCIFA5 */ | 645 | CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), /* SCIFA5 */ |
| 646 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */ | 646 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */ |
| 647 | CLKDEV_DEV_ID("0xe6c3000.serial", &mstp_clks[MSTP206]), /* SCIFB */ | 647 | CLKDEV_DEV_ID("e6c3000.serial", &mstp_clks[MSTP206]), /* SCIFB */ |
| 648 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | 648 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ |
| 649 | CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), /* SCIFA0 */ | 649 | CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), /* SCIFA0 */ |
| 650 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | 650 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ |
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index 2c2754e79cb3..f61158c6ce71 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c | |||
| @@ -426,9 +426,15 @@ static int ve_spc_populate_opps(uint32_t cluster) | |||
| 426 | 426 | ||
| 427 | static int ve_init_opp_table(struct device *cpu_dev) | 427 | static int ve_init_opp_table(struct device *cpu_dev) |
| 428 | { | 428 | { |
| 429 | int cluster = topology_physical_package_id(cpu_dev->id); | 429 | int cluster; |
| 430 | int idx, ret = 0, max_opp = info->num_opps[cluster]; | 430 | int idx, ret = 0, max_opp; |
| 431 | struct ve_spc_opp *opps = info->opps[cluster]; | 431 | struct ve_spc_opp *opps; |
| 432 | |||
| 433 | cluster = topology_physical_package_id(cpu_dev->id); | ||
| 434 | cluster = cluster < 0 ? 0 : cluster; | ||
| 435 | |||
| 436 | max_opp = info->num_opps[cluster]; | ||
| 437 | opps = info->opps[cluster]; | ||
| 432 | 438 | ||
| 433 | for (idx = 0; idx < max_opp; idx++, opps++) { | 439 | for (idx = 0; idx < max_opp; idx++, opps++) { |
| 434 | ret = dev_pm_opp_add(cpu_dev, opps->freq * 1000, opps->u_volt); | 440 | ret = dev_pm_opp_add(cpu_dev, opps->freq * 1000, opps->u_volt); |
| @@ -537,6 +543,8 @@ static struct clk *ve_spc_clk_register(struct device *cpu_dev) | |||
| 537 | spc->hw.init = &init; | 543 | spc->hw.init = &init; |
| 538 | spc->cluster = topology_physical_package_id(cpu_dev->id); | 544 | spc->cluster = topology_physical_package_id(cpu_dev->id); |
| 539 | 545 | ||
| 546 | spc->cluster = spc->cluster < 0 ? 0 : spc->cluster; | ||
| 547 | |||
| 540 | init.name = dev_name(cpu_dev); | 548 | init.name = dev_name(cpu_dev); |
| 541 | init.ops = &clk_spc_ops; | 549 | init.ops = &clk_spc_ops; |
| 542 | init.flags = CLK_IS_ROOT | CLK_GET_RATE_NOCACHE; | 550 | init.flags = CLK_IS_ROOT | CLK_GET_RATE_NOCACHE; |
diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S index 3815a8262af0..8c48c5c22a33 100644 --- a/arch/arm/mm/abort-ev6.S +++ b/arch/arm/mm/abort-ev6.S | |||
| @@ -17,12 +17,6 @@ | |||
| 17 | */ | 17 | */ |
| 18 | .align 5 | 18 | .align 5 |
| 19 | ENTRY(v6_early_abort) | 19 | ENTRY(v6_early_abort) |
| 20 | #ifdef CONFIG_CPU_V6 | ||
| 21 | sub r1, sp, #4 @ Get unused stack location | ||
| 22 | strex r0, r1, [r1] @ Clear the exclusive monitor | ||
| 23 | #elif defined(CONFIG_CPU_32v6K) | ||
| 24 | clrex | ||
| 25 | #endif | ||
| 26 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | 20 | mrc p15, 0, r1, c5, c0, 0 @ get FSR |
| 27 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | 21 | mrc p15, 0, r0, c6, c0, 0 @ get FAR |
| 28 | /* | 22 | /* |
diff --git a/arch/arm/mm/abort-ev7.S b/arch/arm/mm/abort-ev7.S index 703375277ba6..4812ad054214 100644 --- a/arch/arm/mm/abort-ev7.S +++ b/arch/arm/mm/abort-ev7.S | |||
| @@ -13,12 +13,6 @@ | |||
| 13 | */ | 13 | */ |
| 14 | .align 5 | 14 | .align 5 |
| 15 | ENTRY(v7_early_abort) | 15 | ENTRY(v7_early_abort) |
| 16 | /* | ||
| 17 | * The effect of data aborts on on the exclusive access monitor are | ||
| 18 | * UNPREDICTABLE. Do a CLREX to clear the state | ||
| 19 | */ | ||
| 20 | clrex | ||
| 21 | |||
| 22 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | 16 | mrc p15, 0, r1, c5, c0, 0 @ get FSR |
| 23 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | 17 | mrc p15, 0, r0, c6, c0, 0 @ get FAR |
| 24 | 18 | ||
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 0c1ab49e5f7b..83792f4324ea 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | * This code is not portable to processors with late data abort handling. | 41 | * This code is not portable to processors with late data abort handling. |
| 42 | */ | 42 | */ |
| 43 | #define CODING_BITS(i) (i & 0x0e000000) | 43 | #define CODING_BITS(i) (i & 0x0e000000) |
| 44 | #define COND_BITS(i) (i & 0xf0000000) | ||
| 44 | 45 | ||
| 45 | #define LDST_I_BIT(i) (i & (1 << 26)) /* Immediate constant */ | 46 | #define LDST_I_BIT(i) (i & (1 << 26)) /* Immediate constant */ |
| 46 | #define LDST_P_BIT(i) (i & (1 << 24)) /* Preindex */ | 47 | #define LDST_P_BIT(i) (i & (1 << 24)) /* Preindex */ |
| @@ -821,6 +822,8 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
| 821 | break; | 822 | break; |
| 822 | 823 | ||
| 823 | case 0x04000000: /* ldr or str immediate */ | 824 | case 0x04000000: /* ldr or str immediate */ |
| 825 | if (COND_BITS(instr) == 0xf0000000) /* NEON VLDn, VSTn */ | ||
| 826 | goto bad; | ||
| 824 | offset.un = OFFSET_BITS(instr); | 827 | offset.un = OFFSET_BITS(instr); |
| 825 | handler = do_alignment_ldrstr; | 828 | handler = do_alignment_ldrstr; |
| 826 | break; | 829 | break; |
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S index 1a24e9232ec8..d3daed0ae0ad 100644 --- a/arch/arm/mm/proc-v7-3level.S +++ b/arch/arm/mm/proc-v7-3level.S | |||
| @@ -146,7 +146,6 @@ ENDPROC(cpu_v7_set_pte_ext) | |||
| 146 | mov \tmp, \ttbr1, lsr #(32 - ARCH_PGD_SHIFT) @ upper bits | 146 | mov \tmp, \ttbr1, lsr #(32 - ARCH_PGD_SHIFT) @ upper bits |
| 147 | mov \ttbr1, \ttbr1, lsl #ARCH_PGD_SHIFT @ lower bits | 147 | mov \ttbr1, \ttbr1, lsl #ARCH_PGD_SHIFT @ lower bits |
| 148 | addls \ttbr1, \ttbr1, #TTBR1_OFFSET | 148 | addls \ttbr1, \ttbr1, #TTBR1_OFFSET |
| 149 | adcls \tmp, \tmp, #0 | ||
| 150 | mcrr p15, 1, \ttbr1, \tmp, c2 @ load TTBR1 | 149 | mcrr p15, 1, \ttbr1, \tmp, c2 @ load TTBR1 |
| 151 | mov \tmp, \ttbr0, lsr #(32 - ARCH_PGD_SHIFT) @ upper bits | 150 | mov \tmp, \ttbr0, lsr #(32 - ARCH_PGD_SHIFT) @ upper bits |
| 152 | mov \ttbr0, \ttbr0, lsl #ARCH_PGD_SHIFT @ lower bits | 151 | mov \ttbr0, \ttbr0, lsl #ARCH_PGD_SHIFT @ lower bits |
| @@ -158,9 +157,9 @@ ENDPROC(cpu_v7_set_pte_ext) | |||
| 158 | * TFR EV X F IHD LR S | 157 | * TFR EV X F IHD LR S |
| 159 | * .EEE ..EE PUI. .TAT 4RVI ZWRS BLDP WCAM | 158 | * .EEE ..EE PUI. .TAT 4RVI ZWRS BLDP WCAM |
| 160 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced | 159 | * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced |
| 161 | * 11 0 110 1 0011 1100 .111 1101 < we want | 160 | * 11 0 110 0 0011 1100 .111 1101 < we want |
| 162 | */ | 161 | */ |
| 163 | .align 2 | 162 | .align 2 |
| 164 | .type v7_crval, #object | 163 | .type v7_crval, #object |
| 165 | v7_crval: | 164 | v7_crval: |
| 166 | crval clear=0x0120c302, mmuset=0x30c23c7d, ucset=0x00c01c7c | 165 | crval clear=0x0122c302, mmuset=0x30c03c7d, ucset=0x00c01c7c |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 02fc10d2d63b..d055db32ffcb 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | config ARCH_OMAP | ||
| 2 | bool | ||
| 3 | |||
| 1 | if ARCH_OMAP | 4 | if ARCH_OMAP |
| 2 | 5 | ||
| 3 | menu "TI OMAP Common Features" | 6 | menu "TI OMAP Common Features" |
diff --git a/arch/arm/xen/Makefile b/arch/arm/xen/Makefile index 12969523414c..1f85bfe6b470 100644 --- a/arch/arm/xen/Makefile +++ b/arch/arm/xen/Makefile | |||
| @@ -1 +1 @@ | |||
| obj-y := enlighten.o hypercall.o grant-table.o p2m.o mm.o | obj-y := enlighten.o hypercall.o grant-table.o p2m.o mm.o mm32.o | ||
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 98544c5f86e9..0e15f011f9c8 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c | |||
| @@ -260,6 +260,12 @@ static int __init xen_guest_init(void) | |||
| 260 | xen_domain_type = XEN_HVM_DOMAIN; | 260 | xen_domain_type = XEN_HVM_DOMAIN; |
| 261 | 261 | ||
| 262 | xen_setup_features(); | 262 | xen_setup_features(); |
| 263 | |||
| 264 | if (!xen_feature(XENFEAT_grant_map_identity)) { | ||
| 265 | pr_warn("Please upgrade your Xen.\n" | ||
| 266 | "If your platform has any non-coherent DMA devices, they won't work properly.\n"); | ||
| 267 | } | ||
| 268 | |||
| 263 | if (xen_feature(XENFEAT_dom0)) | 269 | if (xen_feature(XENFEAT_dom0)) |
| 264 | xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED; | 270 | xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED; |
| 265 | else | 271 | else |
diff --git a/arch/arm/xen/mm32.c b/arch/arm/xen/mm32.c new file mode 100644 index 000000000000..3b99860fd7ae --- /dev/null +++ b/arch/arm/xen/mm32.c | |||
| @@ -0,0 +1,202 @@ | |||
| 1 | #include <linux/cpu.h> | ||
| 2 | #include <linux/dma-mapping.h> | ||
| 3 | #include <linux/gfp.h> | ||
| 4 | #include <linux/highmem.h> | ||
| 5 | |||
| 6 | #include <xen/features.h> | ||
| 7 | |||
| 8 | static DEFINE_PER_CPU(unsigned long, xen_mm32_scratch_virt); | ||
| 9 | static DEFINE_PER_CPU(pte_t *, xen_mm32_scratch_ptep); | ||
| 10 | |||
| 11 | static int alloc_xen_mm32_scratch_page(int cpu) | ||
| 12 | { | ||
| 13 | struct page *page; | ||
| 14 | unsigned long virt; | ||
| 15 | pmd_t *pmdp; | ||
| 16 | pte_t *ptep; | ||
| 17 | |||
| 18 | if (per_cpu(xen_mm32_scratch_ptep, cpu) != NULL) | ||
| 19 | return 0; | ||
| 20 | |||
| 21 | page = alloc_page(GFP_KERNEL); | ||
| 22 | if (page == NULL) { | ||
| 23 | pr_warn("Failed to allocate xen_mm32_scratch_page for cpu %d\n", cpu); | ||
| 24 | return -ENOMEM; | ||
| 25 | } | ||
| 26 | |||
| 27 | virt = (unsigned long)__va(page_to_phys(page)); | ||
| 28 | pmdp = pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt); | ||
| 29 | ptep = pte_offset_kernel(pmdp, virt); | ||
| 30 | |||
| 31 | per_cpu(xen_mm32_scratch_virt, cpu) = virt; | ||
| 32 | per_cpu(xen_mm32_scratch_ptep, cpu) = ptep; | ||
| 33 | |||
| 34 | return 0; | ||
| 35 | } | ||
| 36 | |||
| 37 | static int xen_mm32_cpu_notify(struct notifier_block *self, | ||
| 38 | unsigned long action, void *hcpu) | ||
| 39 | { | ||
| 40 | int cpu = (long)hcpu; | ||
| 41 | switch (action) { | ||
| 42 | case CPU_UP_PREPARE: | ||
| 43 | if (alloc_xen_mm32_scratch_page(cpu)) | ||
| 44 | return NOTIFY_BAD; | ||
| 45 | break; | ||
| 46 | default: | ||
| 47 | break; | ||
| 48 | } | ||
| 49 | return NOTIFY_OK; | ||
| 50 | } | ||
| 51 | |||
| 52 | static struct notifier_block xen_mm32_cpu_notifier = { | ||
| 53 | .notifier_call = xen_mm32_cpu_notify, | ||
| 54 | }; | ||
| 55 | |||
| 56 | static void* xen_mm32_remap_page(dma_addr_t handle) | ||
| 57 | { | ||
| 58 | unsigned long virt = get_cpu_var(xen_mm32_scratch_virt); | ||
| 59 | pte_t *ptep = __get_cpu_var(xen_mm32_scratch_ptep); | ||
| 60 | |||
| 61 | *ptep = pfn_pte(handle >> PAGE_SHIFT, PAGE_KERNEL); | ||
| 62 | local_flush_tlb_kernel_page(virt); | ||
| 63 | |||
| 64 | return (void*)virt; | ||
| 65 | } | ||
| 66 | |||
| 67 | static void xen_mm32_unmap(void *vaddr) | ||
| 68 | { | ||
| 69 | put_cpu_var(xen_mm32_scratch_virt); | ||
| 70 | } | ||
| 71 | |||
| 72 | |||
| 73 | /* functions called by SWIOTLB */ | ||
| 74 | |||
| 75 | static void dma_cache_maint(dma_addr_t handle, unsigned long offset, | ||
| 76 | size_t size, enum dma_data_direction dir, | ||
| 77 | void (*op)(const void *, size_t, int)) | ||
| 78 | { | ||
| 79 | unsigned long pfn; | ||
| 80 | size_t left = size; | ||
| 81 | |||
| 82 | pfn = (handle >> PAGE_SHIFT) + offset / PAGE_SIZE; | ||
| 83 | offset %= PAGE_SIZE; | ||
| 84 | |||
| 85 | do { | ||
| 86 | size_t len = left; | ||
| 87 | void *vaddr; | ||
| 88 | |||
| 89 | if (!pfn_valid(pfn)) | ||
| 90 | { | ||
| 91 | /* Cannot map the page, we don't know its physical address. | ||
| 92 | * Return and hope for the best */ | ||
| 93 | if (!xen_feature(XENFEAT_grant_map_identity)) | ||
| 94 | return; | ||
| 95 | vaddr = xen_mm32_remap_page(handle) + offset; | ||
| 96 | op(vaddr, len, dir); | ||
| 97 | xen_mm32_unmap(vaddr - offset); | ||
| 98 | } else { | ||
| 99 | struct page *page = pfn_to_page(pfn); | ||
| 100 | |||
| 101 | if (PageHighMem(page)) { | ||
| 102 | if (len + offset > PAGE_SIZE) | ||
| 103 | len = PAGE_SIZE - offset; | ||
| 104 | |||
| 105 | if (cache_is_vipt_nonaliasing()) { | ||
| 106 | vaddr = kmap_atomic(page); | ||
| 107 | op(vaddr + offset, len, dir); | ||
| 108 | kunmap_atomic(vaddr); | ||
| 109 | } else { | ||
| 110 | vaddr = kmap_high_get(page); | ||
| 111 | if (vaddr) { | ||
| 112 | op(vaddr + offset, len, dir); | ||
| 113 | kunmap_high(page); | ||
| 114 | } | ||
| 115 | } | ||
| 116 | } else { | ||
| 117 | vaddr = page_address(page) + offset; | ||
| 118 | op(vaddr, len, dir); | ||
| 119 | } | ||
| 120 | } | ||
| 121 | |||
| 122 | offset = 0; | ||
| 123 | pfn++; | ||
| 124 | left -= len; | ||
| 125 | } while (left); | ||
| 126 | } | ||
| 127 | |||
| 128 | static void __xen_dma_page_dev_to_cpu(struct device *hwdev, dma_addr_t handle, | ||
| 129 | size_t size, enum dma_data_direction dir) | ||
| 130 | { | ||
| 131 | /* Cannot use __dma_page_dev_to_cpu because we don't have a | ||
| 132 | * struct page for handle */ | ||
| 133 | |||
| 134 | if (dir != DMA_TO_DEVICE) | ||
| 135 | outer_inv_range(handle, handle + size); | ||
| 136 | |||
| 137 | dma_cache_maint(handle & PAGE_MASK, handle & ~PAGE_MASK, size, dir, dmac_unmap_area); | ||
| 138 | } | ||
| 139 | |||
| 140 | static void __xen_dma_page_cpu_to_dev(struct device *hwdev, dma_addr_t handle, | ||
| 141 | size_t size, enum dma_data_direction dir) | ||
| 142 | { | ||
| 143 | |||
| 144 | dma_cache_maint(handle & PAGE_MASK, handle & ~PAGE_MASK, size, dir, dmac_map_area); | ||
| 145 | |||
| 146 | if (dir == DMA_FROM_DEVICE) { | ||
| 147 | outer_inv_range(handle, handle + size); | ||
| 148 | } else { | ||
| 149 | outer_clean_range(handle, handle + size); | ||
| 150 | } | ||
| 151 | } | ||
| 152 | |||
| 153 | void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle, | ||
| 154 | size_t size, enum dma_data_direction dir, | ||
| 155 | struct dma_attrs *attrs) | ||
| 156 | |||
| 157 | { | ||
| 158 | if (!__generic_dma_ops(hwdev)->unmap_page) | ||
| 159 | return; | ||
| 160 | if (dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs)) | ||
| 161 | return; | ||
| 162 | |||
| 163 | __xen_dma_page_dev_to_cpu(hwdev, handle, size, dir); | ||
| 164 | } | ||
| 165 | |||
| 166 | void xen_dma_sync_single_for_cpu(struct device *hwdev, | ||
| 167 | dma_addr_t handle, size_t size, enum dma_data_direction dir) | ||
| 168 | { | ||
| 169 | if (!__generic_dma_ops(hwdev)->sync_single_for_cpu) | ||
| 170 | return; | ||
| 171 | __xen_dma_page_dev_to_cpu(hwdev, handle, size, dir); | ||
| 172 | } | ||
| 173 | |||
| 174 | void xen_dma_sync_single_for_device(struct device *hwdev, | ||
| 175 | dma_addr_t handle, size_t size, enum dma_data_direction dir) | ||
| 176 | { | ||
| 177 | if (!__generic_dma_ops(hwdev)->sync_single_for_device) | ||
| 178 | return; | ||
| 179 | __xen_dma_page_cpu_to_dev(hwdev, handle, size, dir); | ||
| 180 | } | ||
| 181 | |||
| 182 | int __init xen_mm32_init(void) | ||
| 183 | { | ||
| 184 | int cpu; | ||
| 185 | |||
| 186 | if (!xen_initial_domain()) | ||
| 187 | return 0; | ||
| 188 | |||
| 189 | register_cpu_notifier(&xen_mm32_cpu_notifier); | ||
| 190 | get_online_cpus(); | ||
| 191 | for_each_online_cpu(cpu) { | ||
| 192 | if (alloc_xen_mm32_scratch_page(cpu)) { | ||
| 193 | put_online_cpus(); | ||
| 194 | unregister_cpu_notifier(&xen_mm32_cpu_notifier); | ||
| 195 | return -ENOMEM; | ||
| 196 | } | ||
| 197 | } | ||
| 198 | put_online_cpus(); | ||
| 199 | |||
| 200 | return 0; | ||
| 201 | } | ||
| 202 | arch_initcall(xen_mm32_init); | ||
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c index 97baf4427817..054857776254 100644 --- a/arch/arm/xen/p2m.c +++ b/arch/arm/xen/p2m.c | |||
| @@ -21,14 +21,12 @@ struct xen_p2m_entry { | |||
| 21 | unsigned long pfn; | 21 | unsigned long pfn; |
| 22 | unsigned long mfn; | 22 | unsigned long mfn; |
| 23 | unsigned long nr_pages; | 23 | unsigned long nr_pages; |
| 24 | struct rb_node rbnode_mach; | ||
| 25 | struct rb_node rbnode_phys; | 24 | struct rb_node rbnode_phys; |
| 26 | }; | 25 | }; |
| 27 | 26 | ||
| 28 | static rwlock_t p2m_lock; | 27 | static rwlock_t p2m_lock; |
| 29 | struct rb_root phys_to_mach = RB_ROOT; | 28 | struct rb_root phys_to_mach = RB_ROOT; |
| 30 | EXPORT_SYMBOL_GPL(phys_to_mach); | 29 | EXPORT_SYMBOL_GPL(phys_to_mach); |
| 31 | static struct rb_root mach_to_phys = RB_ROOT; | ||
| 32 | 30 | ||
| 33 | static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) | 31 | static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) |
| 34 | { | 32 | { |
| @@ -41,8 +39,6 @@ static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new) | |||
| 41 | parent = *link; | 39 | parent = *link; |
| 42 | entry = rb_entry(parent, struct xen_p2m_entry, rbnode_phys); | 40 | entry = rb_entry(parent, struct xen_p2m_entry, rbnode_phys); |
| 43 | 41 | ||
| 44 | if (new->mfn == entry->mfn) | ||
| 45 | goto err_out; | ||
| 46 | if (new->pfn == entry->pfn) | 42 | if (new->pfn == entry->pfn) |
| 47 | goto err_out; | 43 | goto err_out; |
| 48 | 44 | ||
| @@ -88,64 +84,6 @@ unsigned long __pfn_to_mfn(unsigned long pfn) | |||
| 88 | } | 84 | } |
| 89 | EXPORT_SYMBOL_GPL(__pfn_to_mfn); | 85 | EXPORT_SYMBOL_GPL(__pfn_to_mfn); |
| 90 | 86 | ||
| 91 | static int xen_add_mach_to_phys_entry(struct xen_p2m_entry *new) | ||
| 92 | { | ||
| 93 | struct rb_node **link = &mach_to_phys.rb_node; | ||
| 94 | struct rb_node *parent = NULL; | ||
| 95 | struct xen_p2m_entry *entry; | ||
| 96 | int rc = 0; | ||
| 97 | |||
| 98 | while (*link) { | ||
| 99 | parent = *link; | ||
| 100 | entry = rb_entry(parent, struct xen_p2m_entry, rbnode_mach); | ||
| 101 | |||
| 102 | if (new->mfn == entry->mfn) | ||
| 103 | goto err_out; | ||
| 104 | if (new->pfn == entry->pfn) | ||
| 105 | goto err_out; | ||
| 106 | |||
| 107 | if (new->mfn < entry->mfn) | ||
| 108 | link = &(*link)->rb_left; | ||
| 109 | else | ||
| 110 | link = &(*link)->rb_right; | ||
| 111 | } | ||
| 112 | rb_link_node(&new->rbnode_mach, parent, link); | ||
| 113 | rb_insert_color(&new->rbnode_mach, &mach_to_phys); | ||
| 114 | goto out; | ||
| 115 | |||
| 116 | err_out: | ||
| 117 | rc = -EINVAL; | ||
| 118 | pr_warn("%s: cannot add pfn=%pa -> mfn=%pa: pfn=%pa -> mfn=%pa already exists\n", | ||
| 119 | __func__, &new->pfn, &new->mfn, &entry->pfn, &entry->mfn); | ||
| 120 | out: | ||
| 121 | return rc; | ||
| 122 | } | ||
| 123 | |||
| 124 | unsigned long __mfn_to_pfn(unsigned long mfn) | ||
| 125 | { | ||
| 126 | struct rb_node *n = mach_to_phys.rb_node; | ||
| 127 | struct xen_p2m_entry *entry; | ||
| 128 | unsigned long irqflags; | ||
| 129 | |||
| 130 | read_lock_irqsave(&p2m_lock, irqflags); | ||
| 131 | while (n) { | ||
| 132 | entry = rb_entry(n, struct xen_p2m_entry, rbnode_mach); | ||
| 133 | if (entry->mfn <= mfn && | ||
| 134 | entry->mfn + entry->nr_pages > mfn) { | ||
| 135 | read_unlock_irqrestore(&p2m_lock, irqflags); | ||
| 136 | return entry->pfn + (mfn - entry->mfn); | ||
| 137 | } | ||
| 138 | if (mfn < entry->mfn) | ||
| 139 | n = n->rb_left; | ||
| 140 | else | ||
| 141 | n = n->rb_right; | ||
| 142 | } | ||
| 143 | read_unlock_irqrestore(&p2m_lock, irqflags); | ||
| 144 | |||
| 145 | return INVALID_P2M_ENTRY; | ||
| 146 | } | ||
| 147 | EXPORT_SYMBOL_GPL(__mfn_to_pfn); | ||
| 148 | |||
| 149 | int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, | 87 | int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, |
| 150 | struct gnttab_map_grant_ref *kmap_ops, | 88 | struct gnttab_map_grant_ref *kmap_ops, |
| 151 | struct page **pages, unsigned int count) | 89 | struct page **pages, unsigned int count) |
| @@ -192,7 +130,6 @@ bool __set_phys_to_machine_multi(unsigned long pfn, | |||
| 192 | p2m_entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); | 130 | p2m_entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); |
| 193 | if (p2m_entry->pfn <= pfn && | 131 | if (p2m_entry->pfn <= pfn && |
| 194 | p2m_entry->pfn + p2m_entry->nr_pages > pfn) { | 132 | p2m_entry->pfn + p2m_entry->nr_pages > pfn) { |
| 195 | rb_erase(&p2m_entry->rbnode_mach, &mach_to_phys); | ||
| 196 | rb_erase(&p2m_entry->rbnode_phys, &phys_to_mach); | 133 | rb_erase(&p2m_entry->rbnode_phys, &phys_to_mach); |
| 197 | write_unlock_irqrestore(&p2m_lock, irqflags); | 134 | write_unlock_irqrestore(&p2m_lock, irqflags); |
| 198 | kfree(p2m_entry); | 135 | kfree(p2m_entry); |
| @@ -217,8 +154,7 @@ bool __set_phys_to_machine_multi(unsigned long pfn, | |||
| 217 | p2m_entry->mfn = mfn; | 154 | p2m_entry->mfn = mfn; |
| 218 | 155 | ||
| 219 | write_lock_irqsave(&p2m_lock, irqflags); | 156 | write_lock_irqsave(&p2m_lock, irqflags); |
| 220 | if ((rc = xen_add_phys_to_mach_entry(p2m_entry) < 0) || | 157 | if ((rc = xen_add_phys_to_mach_entry(p2m_entry)) < 0) { |
| 221 | (rc = xen_add_mach_to_phys_entry(p2m_entry) < 0)) { | ||
| 222 | write_unlock_irqrestore(&p2m_lock, irqflags); | 158 | write_unlock_irqrestore(&p2m_lock, irqflags); |
| 223 | return false; | 159 | return false; |
| 224 | } | 160 | } |
diff --git a/arch/arm64/crypto/sha2-ce-glue.c b/arch/arm64/crypto/sha2-ce-glue.c index c294e67d3925..ae67e88c28b9 100644 --- a/arch/arm64/crypto/sha2-ce-glue.c +++ b/arch/arm64/crypto/sha2-ce-glue.c | |||
| @@ -150,7 +150,6 @@ static void sha2_finup(struct shash_desc *desc, const u8 *data, | |||
| 150 | kernel_neon_begin_partial(28); | 150 | kernel_neon_begin_partial(28); |
| 151 | sha2_ce_transform(blocks, data, sctx->state, NULL, len); | 151 | sha2_ce_transform(blocks, data, sctx->state, NULL, len); |
| 152 | kernel_neon_end(); | 152 | kernel_neon_end(); |
| 153 | data += blocks * SHA256_BLOCK_SIZE; | ||
| 154 | } | 153 | } |
| 155 | 154 | ||
| 156 | static int sha224_finup(struct shash_desc *desc, const u8 *data, | 155 | static int sha224_finup(struct shash_desc *desc, const u8 *data, |
diff --git a/arch/arm64/include/asm/hw_breakpoint.h b/arch/arm64/include/asm/hw_breakpoint.h index d064047612b1..52b484b6aa1a 100644 --- a/arch/arm64/include/asm/hw_breakpoint.h +++ b/arch/arm64/include/asm/hw_breakpoint.h | |||
| @@ -79,7 +79,6 @@ static inline void decode_ctrl_reg(u32 reg, | |||
| 79 | */ | 79 | */ |
| 80 | #define ARM_MAX_BRP 16 | 80 | #define ARM_MAX_BRP 16 |
| 81 | #define ARM_MAX_WRP 16 | 81 | #define ARM_MAX_WRP 16 |
| 82 | #define ARM_MAX_HBP_SLOTS (ARM_MAX_BRP + ARM_MAX_WRP) | ||
| 83 | 82 | ||
| 84 | /* Virtual debug register bases. */ | 83 | /* Virtual debug register bases. */ |
| 85 | #define AARCH64_DBG_REG_BVR 0 | 84 | #define AARCH64_DBG_REG_BVR 0 |
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 3df21feeabdd..286b1bec547c 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h | |||
| @@ -139,7 +139,7 @@ extern struct task_struct *cpu_switch_to(struct task_struct *prev, | |||
| 139 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) | 139 | ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1) |
| 140 | 140 | ||
| 141 | #define KSTK_EIP(tsk) ((unsigned long)task_pt_regs(tsk)->pc) | 141 | #define KSTK_EIP(tsk) ((unsigned long)task_pt_regs(tsk)->pc) |
| 142 | #define KSTK_ESP(tsk) ((unsigned long)task_pt_regs(tsk)->sp) | 142 | #define KSTK_ESP(tsk) user_stack_pointer(task_pt_regs(tsk)) |
| 143 | 143 | ||
| 144 | /* | 144 | /* |
| 145 | * Prefetching support | 145 | * Prefetching support |
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index 501000fadb6f..41ed9e13795e 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h | |||
| @@ -137,7 +137,7 @@ struct pt_regs { | |||
| 137 | (!((regs)->pstate & PSR_F_BIT)) | 137 | (!((regs)->pstate & PSR_F_BIT)) |
| 138 | 138 | ||
| 139 | #define user_stack_pointer(regs) \ | 139 | #define user_stack_pointer(regs) \ |
| 140 | (!compat_user_mode(regs)) ? ((regs)->sp) : ((regs)->compat_sp) | 140 | (!compat_user_mode(regs) ? (regs)->sp : (regs)->compat_sp) |
| 141 | 141 | ||
| 142 | static inline unsigned long regs_return_value(struct pt_regs *regs) | 142 | static inline unsigned long regs_return_value(struct pt_regs *regs) |
| 143 | { | 143 | { |
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index ad8aebb1cdef..3dca15634e69 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c | |||
| @@ -270,6 +270,7 @@ static int fpsimd_cpu_pm_notifier(struct notifier_block *self, | |||
| 270 | case CPU_PM_ENTER: | 270 | case CPU_PM_ENTER: |
| 271 | if (current->mm && !test_thread_flag(TIF_FOREIGN_FPSTATE)) | 271 | if (current->mm && !test_thread_flag(TIF_FOREIGN_FPSTATE)) |
| 272 | fpsimd_save_state(¤t->thread.fpsimd_state); | 272 | fpsimd_save_state(¤t->thread.fpsimd_state); |
| 273 | this_cpu_write(fpsimd_last_state, NULL); | ||
| 273 | break; | 274 | break; |
| 274 | case CPU_PM_EXIT: | 275 | case CPU_PM_EXIT: |
| 275 | if (current->mm) | 276 | if (current->mm) |
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index bed028364a93..873069056229 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S | |||
| @@ -373,10 +373,6 @@ ENTRY(__boot_cpu_mode) | |||
| 373 | .long 0 | 373 | .long 0 |
| 374 | .popsection | 374 | .popsection |
| 375 | 375 | ||
| 376 | .align 3 | ||
| 377 | 2: .quad . | ||
| 378 | .quad PAGE_OFFSET | ||
| 379 | |||
| 380 | #ifdef CONFIG_SMP | 376 | #ifdef CONFIG_SMP |
| 381 | .align 3 | 377 | .align 3 |
| 382 | 1: .quad . | 378 | 1: .quad . |
diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c index 0f08dfd69ebc..dfa6e3e74fdd 100644 --- a/arch/arm64/kernel/irq.c +++ b/arch/arm64/kernel/irq.c | |||
| @@ -97,19 +97,15 @@ static bool migrate_one_irq(struct irq_desc *desc) | |||
| 97 | if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity)) | 97 | if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity)) |
| 98 | return false; | 98 | return false; |
| 99 | 99 | ||
| 100 | if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) | 100 | if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) { |
| 101 | affinity = cpu_online_mask; | ||
| 101 | ret = true; | 102 | ret = true; |
| 103 | } | ||
| 102 | 104 | ||
| 103 | /* | ||
| 104 | * when using forced irq_set_affinity we must ensure that the cpu | ||
| 105 | * being offlined is not present in the affinity mask, it may be | ||
| 106 | * selected as the target CPU otherwise | ||
| 107 | */ | ||
| 108 | affinity = cpu_online_mask; | ||
| 109 | c = irq_data_get_irq_chip(d); | 105 | c = irq_data_get_irq_chip(d); |
| 110 | if (!c->irq_set_affinity) | 106 | if (!c->irq_set_affinity) |
| 111 | pr_debug("IRQ%u: unable to set affinity\n", d->irq); | 107 | pr_debug("IRQ%u: unable to set affinity\n", d->irq); |
| 112 | else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret) | 108 | else if (c->irq_set_affinity(d, affinity, false) == IRQ_SET_MASK_OK && ret) |
| 113 | cpumask_copy(d->affinity, affinity); | 109 | cpumask_copy(d->affinity, affinity); |
| 114 | 110 | ||
| 115 | return ret; | 111 | return ret; |
diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c index 422ebd63b619..6762ad705587 100644 --- a/arch/arm64/kernel/perf_regs.c +++ b/arch/arm64/kernel/perf_regs.c | |||
| @@ -24,6 +24,12 @@ u64 perf_reg_value(struct pt_regs *regs, int idx) | |||
| 24 | return regs->compat_lr; | 24 | return regs->compat_lr; |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | if ((u32)idx == PERF_REG_ARM64_SP) | ||
| 28 | return regs->sp; | ||
| 29 | |||
| 30 | if ((u32)idx == PERF_REG_ARM64_PC) | ||
| 31 | return regs->pc; | ||
| 32 | |||
| 27 | return regs->regs[idx]; | 33 | return regs->regs[idx]; |
| 28 | } | 34 | } |
| 29 | 35 | ||
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 1309d64aa926..29d48690f2ac 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
| @@ -230,9 +230,27 @@ void exit_thread(void) | |||
| 230 | { | 230 | { |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | static void tls_thread_flush(void) | ||
| 234 | { | ||
| 235 | asm ("msr tpidr_el0, xzr"); | ||
| 236 | |||
| 237 | if (is_compat_task()) { | ||
| 238 | current->thread.tp_value = 0; | ||
| 239 | |||
| 240 | /* | ||
| 241 | * We need to ensure ordering between the shadow state and the | ||
| 242 | * hardware state, so that we don't corrupt the hardware state | ||
| 243 | * with a stale shadow state during context switch. | ||
| 244 | */ | ||
| 245 | barrier(); | ||
| 246 | asm ("msr tpidrro_el0, xzr"); | ||
| 247 | } | ||
| 248 | } | ||
| 249 | |||
| 233 | void flush_thread(void) | 250 | void flush_thread(void) |
| 234 | { | 251 | { |
| 235 | fpsimd_flush_thread(); | 252 | fpsimd_flush_thread(); |
| 253 | tls_thread_flush(); | ||
| 236 | flush_ptrace_hw_breakpoint(current); | 254 | flush_ptrace_hw_breakpoint(current); |
| 237 | } | 255 | } |
| 238 | 256 | ||
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 70526cfda056..fe63ac5e9bf5 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c | |||
| @@ -87,7 +87,8 @@ static void ptrace_hbptriggered(struct perf_event *bp, | |||
| 87 | break; | 87 | break; |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| 90 | for (i = ARM_MAX_BRP; i < ARM_MAX_HBP_SLOTS && !bp; ++i) { | 90 | |
| 91 | for (i = 0; i < ARM_MAX_WRP; ++i) { | ||
| 91 | if (current->thread.debug.hbp_watch[i] == bp) { | 92 | if (current->thread.debug.hbp_watch[i] == bp) { |
| 92 | info.si_errno = -((i << 1) + 1); | 93 | info.si_errno = -((i << 1) + 1); |
| 93 | break; | 94 | break; |
| @@ -662,8 +663,10 @@ static int compat_gpr_get(struct task_struct *target, | |||
| 662 | kbuf += sizeof(reg); | 663 | kbuf += sizeof(reg); |
| 663 | } else { | 664 | } else { |
| 664 | ret = copy_to_user(ubuf, ®, sizeof(reg)); | 665 | ret = copy_to_user(ubuf, ®, sizeof(reg)); |
| 665 | if (ret) | 666 | if (ret) { |
| 667 | ret = -EFAULT; | ||
| 666 | break; | 668 | break; |
| 669 | } | ||
| 667 | 670 | ||
| 668 | ubuf += sizeof(reg); | 671 | ubuf += sizeof(reg); |
| 669 | } | 672 | } |
| @@ -701,8 +704,10 @@ static int compat_gpr_set(struct task_struct *target, | |||
| 701 | kbuf += sizeof(reg); | 704 | kbuf += sizeof(reg); |
| 702 | } else { | 705 | } else { |
| 703 | ret = copy_from_user(®, ubuf, sizeof(reg)); | 706 | ret = copy_from_user(®, ubuf, sizeof(reg)); |
| 704 | if (ret) | 707 | if (ret) { |
| 705 | return ret; | 708 | ret = -EFAULT; |
| 709 | break; | ||
| 710 | } | ||
| 706 | 711 | ||
| 707 | ubuf += sizeof(reg); | 712 | ubuf += sizeof(reg); |
| 708 | } | 713 | } |
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index f6f0ccf35ae6..edb146d01857 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
| @@ -78,6 +78,7 @@ unsigned int compat_elf_hwcap2 __read_mostly; | |||
| 78 | #endif | 78 | #endif |
| 79 | 79 | ||
| 80 | static const char *cpu_name; | 80 | static const char *cpu_name; |
| 81 | static const char *machine_name; | ||
| 81 | phys_addr_t __fdt_pointer __initdata; | 82 | phys_addr_t __fdt_pointer __initdata; |
| 82 | 83 | ||
| 83 | /* | 84 | /* |
| @@ -309,6 +310,8 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys) | |||
| 309 | while (true) | 310 | while (true) |
| 310 | cpu_relax(); | 311 | cpu_relax(); |
| 311 | } | 312 | } |
| 313 | |||
| 314 | machine_name = of_flat_dt_get_machine_name(); | ||
| 312 | } | 315 | } |
| 313 | 316 | ||
| 314 | /* | 317 | /* |
| @@ -447,21 +450,10 @@ static int c_show(struct seq_file *m, void *v) | |||
| 447 | { | 450 | { |
| 448 | int i; | 451 | int i; |
| 449 | 452 | ||
| 450 | /* | 453 | seq_printf(m, "Processor\t: %s rev %d (%s)\n", |
| 451 | * Dump out the common processor features in a single line. Userspace | 454 | cpu_name, read_cpuid_id() & 15, ELF_PLATFORM); |
| 452 | * should read the hwcaps with getauxval(AT_HWCAP) rather than | ||
| 453 | * attempting to parse this. | ||
| 454 | */ | ||
| 455 | seq_puts(m, "features\t:"); | ||
| 456 | for (i = 0; hwcap_str[i]; i++) | ||
| 457 | if (elf_hwcap & (1 << i)) | ||
| 458 | seq_printf(m, " %s", hwcap_str[i]); | ||
| 459 | seq_puts(m, "\n\n"); | ||
| 460 | 455 | ||
| 461 | for_each_online_cpu(i) { | 456 | for_each_online_cpu(i) { |
| 462 | struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i); | ||
| 463 | u32 midr = cpuinfo->reg_midr; | ||
| 464 | |||
| 465 | /* | 457 | /* |
| 466 | * glibc reads /proc/cpuinfo to determine the number of | 458 | * glibc reads /proc/cpuinfo to determine the number of |
| 467 | * online processors, looking for lines beginning with | 459 | * online processors, looking for lines beginning with |
| @@ -470,13 +462,25 @@ static int c_show(struct seq_file *m, void *v) | |||
| 470 | #ifdef CONFIG_SMP | 462 | #ifdef CONFIG_SMP |
| 471 | seq_printf(m, "processor\t: %d\n", i); | 463 | seq_printf(m, "processor\t: %d\n", i); |
| 472 | #endif | 464 | #endif |
| 473 | seq_printf(m, "implementer\t: 0x%02x\n", | ||
| 474 | MIDR_IMPLEMENTOR(midr)); | ||
| 475 | seq_printf(m, "variant\t\t: 0x%x\n", MIDR_VARIANT(midr)); | ||
| 476 | seq_printf(m, "partnum\t\t: 0x%03x\n", MIDR_PARTNUM(midr)); | ||
| 477 | seq_printf(m, "revision\t: 0x%x\n\n", MIDR_REVISION(midr)); | ||
| 478 | } | 465 | } |
| 479 | 466 | ||
| 467 | /* dump out the processor features */ | ||
| 468 | seq_puts(m, "Features\t: "); | ||
| 469 | |||
| 470 | for (i = 0; hwcap_str[i]; i++) | ||
| 471 | if (elf_hwcap & (1 << i)) | ||
| 472 | seq_printf(m, "%s ", hwcap_str[i]); | ||
| 473 | |||
| 474 | seq_printf(m, "\nCPU implementer\t: 0x%02x\n", read_cpuid_id() >> 24); | ||
| 475 | seq_printf(m, "CPU architecture: AArch64\n"); | ||
| 476 | seq_printf(m, "CPU variant\t: 0x%x\n", (read_cpuid_id() >> 20) & 15); | ||
| 477 | seq_printf(m, "CPU part\t: 0x%03x\n", (read_cpuid_id() >> 4) & 0xfff); | ||
| 478 | seq_printf(m, "CPU revision\t: %d\n", read_cpuid_id() & 15); | ||
| 479 | |||
| 480 | seq_puts(m, "\n"); | ||
| 481 | |||
| 482 | seq_printf(m, "Hardware\t: %s\n", machine_name); | ||
| 483 | |||
| 480 | return 0; | 484 | return 0; |
| 481 | } | 485 | } |
| 482 | 486 | ||
diff --git a/arch/arm64/kernel/sys_compat.c b/arch/arm64/kernel/sys_compat.c index de2b0226e06d..dc47e53e9e28 100644 --- a/arch/arm64/kernel/sys_compat.c +++ b/arch/arm64/kernel/sys_compat.c | |||
| @@ -79,6 +79,12 @@ long compat_arm_syscall(struct pt_regs *regs) | |||
| 79 | 79 | ||
| 80 | case __ARM_NR_compat_set_tls: | 80 | case __ARM_NR_compat_set_tls: |
| 81 | current->thread.tp_value = regs->regs[0]; | 81 | current->thread.tp_value = regs->regs[0]; |
| 82 | |||
| 83 | /* | ||
| 84 | * Protect against register corruption from context switch. | ||
| 85 | * See comment in tls_thread_flush. | ||
| 86 | */ | ||
| 87 | barrier(); | ||
| 82 | asm ("msr tpidrro_el0, %0" : : "r" (regs->regs[0])); | 88 | asm ("msr tpidrro_el0, %0" : : "r" (regs->regs[0])); |
| 83 | return 0; | 89 | return 0; |
| 84 | 90 | ||
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index e28be510380c..34b8bd0711e9 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c | |||
| @@ -66,6 +66,8 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
| 66 | else | 66 | else |
| 67 | kvm_vcpu_block(vcpu); | 67 | kvm_vcpu_block(vcpu); |
| 68 | 68 | ||
| 69 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); | ||
| 70 | |||
| 69 | return 1; | 71 | return 1; |
| 70 | } | 72 | } |
| 71 | 73 | ||
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index d968796f4b2d..c3191168a994 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S | |||
| @@ -80,6 +80,10 @@ __do_hyp_init: | |||
| 80 | msr mair_el2, x4 | 80 | msr mair_el2, x4 |
| 81 | isb | 81 | isb |
| 82 | 82 | ||
| 83 | /* Invalidate the stale TLBs from Bootloader */ | ||
| 84 | tlbi alle2 | ||
| 85 | dsb sy | ||
| 86 | |||
| 83 | mrs x4, sctlr_el2 | 87 | mrs x4, sctlr_el2 |
| 84 | and x4, x4, #SCTLR_EL2_EE // preserve endianness of EL2 | 88 | and x4, x4, #SCTLR_EL2_EE // preserve endianness of EL2 |
| 85 | ldr x5, =SCTLR_EL2_FLAGS | 89 | ldr x5, =SCTLR_EL2_FLAGS |
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 5472c2401876..a83061f37e43 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c | |||
| @@ -149,8 +149,7 @@ void __init arm64_memblock_init(void) | |||
| 149 | memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start); | 149 | memblock_reserve(__virt_to_phys(initrd_start), initrd_end - initrd_start); |
| 150 | #endif | 150 | #endif |
| 151 | 151 | ||
| 152 | if (!efi_enabled(EFI_MEMMAP)) | 152 | early_init_fdt_scan_reserved_mem(); |
| 153 | early_init_fdt_scan_reserved_mem(); | ||
| 154 | 153 | ||
| 155 | /* 4GB maximum for 32-bit only capable devices */ | 154 | /* 4GB maximum for 32-bit only capable devices */ |
| 156 | if (IS_ENABLED(CONFIG_ZONE_DMA)) | 155 | if (IS_ENABLED(CONFIG_ZONE_DMA)) |
diff --git a/arch/hexagon/mm/cache.c b/arch/hexagon/mm/cache.c index fe14ccf28561..0c76c802e31c 100644 --- a/arch/hexagon/mm/cache.c +++ b/arch/hexagon/mm/cache.c | |||
| @@ -68,6 +68,7 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
| 68 | ); | 68 | ); |
| 69 | local_irq_restore(flags); | 69 | local_irq_restore(flags); |
| 70 | } | 70 | } |
| 71 | EXPORT_SYMBOL(flush_icache_range); | ||
| 71 | 72 | ||
| 72 | void hexagon_clean_dcache_range(unsigned long start, unsigned long end) | 73 | void hexagon_clean_dcache_range(unsigned long start, unsigned long end) |
| 73 | { | 74 | { |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 64aefb76bd69..c84c88bbbbd7 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
| @@ -549,8 +549,6 @@ source "drivers/sn/Kconfig" | |||
| 549 | config KEXEC | 549 | config KEXEC |
| 550 | bool "kexec system call" | 550 | bool "kexec system call" |
| 551 | depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU) | 551 | depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU) |
| 552 | select CRYPTO | ||
| 553 | select CRYPTO_SHA256 | ||
| 554 | help | 552 | help |
| 555 | kexec is a system call that implements the ability to shutdown your | 553 | kexec is a system call that implements the ability to shutdown your |
| 556 | current kernel, and to start another kernel. It is like a reboot | 554 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig index 4c4ac163c600..b6bda1838629 100644 --- a/arch/ia64/configs/bigsur_defconfig +++ b/arch/ia64/configs/bigsur_defconfig | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | ||
| 2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
| 4 | CONFIG_LOG_BUF_SHIFT=16 | 3 | CONFIG_LOG_BUF_SHIFT=16 |
| @@ -6,6 +5,8 @@ CONFIG_PROFILING=y | |||
| 6 | CONFIG_OPROFILE=y | 5 | CONFIG_OPROFILE=y |
| 7 | CONFIG_MODULES=y | 6 | CONFIG_MODULES=y |
| 8 | CONFIG_MODULE_UNLOAD=y | 7 | CONFIG_MODULE_UNLOAD=y |
| 8 | CONFIG_PARTITION_ADVANCED=y | ||
| 9 | CONFIG_SGI_PARTITION=y | ||
| 9 | CONFIG_IA64_DIG=y | 10 | CONFIG_IA64_DIG=y |
| 10 | CONFIG_SMP=y | 11 | CONFIG_SMP=y |
| 11 | CONFIG_NR_CPUS=2 | 12 | CONFIG_NR_CPUS=2 |
| @@ -51,9 +52,6 @@ CONFIG_DM_MIRROR=m | |||
| 51 | CONFIG_DM_ZERO=m | 52 | CONFIG_DM_ZERO=m |
| 52 | CONFIG_NETDEVICES=y | 53 | CONFIG_NETDEVICES=y |
| 53 | CONFIG_DUMMY=y | 54 | CONFIG_DUMMY=y |
| 54 | CONFIG_NET_ETHERNET=y | ||
| 55 | CONFIG_MII=y | ||
| 56 | CONFIG_NET_PCI=y | ||
| 57 | CONFIG_INPUT_EVDEV=y | 55 | CONFIG_INPUT_EVDEV=y |
| 58 | CONFIG_SERIAL_8250=y | 56 | CONFIG_SERIAL_8250=y |
| 59 | CONFIG_SERIAL_8250_CONSOLE=y | 57 | CONFIG_SERIAL_8250_CONSOLE=y |
| @@ -85,7 +83,6 @@ CONFIG_EXT3_FS=y | |||
| 85 | CONFIG_XFS_FS=y | 83 | CONFIG_XFS_FS=y |
| 86 | CONFIG_XFS_QUOTA=y | 84 | CONFIG_XFS_QUOTA=y |
| 87 | CONFIG_XFS_POSIX_ACL=y | 85 | CONFIG_XFS_POSIX_ACL=y |
| 88 | CONFIG_AUTOFS_FS=m | ||
| 89 | CONFIG_AUTOFS4_FS=m | 86 | CONFIG_AUTOFS4_FS=m |
| 90 | CONFIG_ISO9660_FS=m | 87 | CONFIG_ISO9660_FS=m |
| 91 | CONFIG_JOLIET=y | 88 | CONFIG_JOLIET=y |
| @@ -95,17 +92,13 @@ CONFIG_PROC_KCORE=y | |||
| 95 | CONFIG_TMPFS=y | 92 | CONFIG_TMPFS=y |
| 96 | CONFIG_HUGETLBFS=y | 93 | CONFIG_HUGETLBFS=y |
| 97 | CONFIG_NFS_FS=m | 94 | CONFIG_NFS_FS=m |
| 98 | CONFIG_NFS_V3=y | 95 | CONFIG_NFS_V4=m |
| 99 | CONFIG_NFS_V4=y | ||
| 100 | CONFIG_NFSD=m | 96 | CONFIG_NFSD=m |
| 101 | CONFIG_NFSD_V4=y | 97 | CONFIG_NFSD_V4=y |
| 102 | CONFIG_CIFS=m | 98 | CONFIG_CIFS=m |
| 103 | CONFIG_CIFS_STATS=y | 99 | CONFIG_CIFS_STATS=y |
| 104 | CONFIG_CIFS_XATTR=y | 100 | CONFIG_CIFS_XATTR=y |
| 105 | CONFIG_CIFS_POSIX=y | 101 | CONFIG_CIFS_POSIX=y |
| 106 | CONFIG_PARTITION_ADVANCED=y | ||
| 107 | CONFIG_SGI_PARTITION=y | ||
| 108 | CONFIG_EFI_PARTITION=y | ||
| 109 | CONFIG_NLS_CODEPAGE_437=y | 102 | CONFIG_NLS_CODEPAGE_437=y |
| 110 | CONFIG_NLS_ISO8859_1=y | 103 | CONFIG_NLS_ISO8859_1=y |
| 111 | CONFIG_NLS_UTF8=m | 104 | CONFIG_NLS_UTF8=m |
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig index e8ed3ae70aae..81f686dee53c 100644 --- a/arch/ia64/configs/generic_defconfig +++ b/arch/ia64/configs/generic_defconfig | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | ||
| 2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
| 4 | CONFIG_IKCONFIG=y | 3 | CONFIG_IKCONFIG=y |
| @@ -6,13 +5,13 @@ CONFIG_IKCONFIG_PROC=y | |||
| 6 | CONFIG_LOG_BUF_SHIFT=20 | 5 | CONFIG_LOG_BUF_SHIFT=20 |
| 7 | CONFIG_CGROUPS=y | 6 | CONFIG_CGROUPS=y |
| 8 | CONFIG_CPUSETS=y | 7 | CONFIG_CPUSETS=y |
| 9 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
| 10 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
| 11 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
| 12 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
| 13 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
| 14 | CONFIG_MODVERSIONS=y | 12 | CONFIG_MODVERSIONS=y |
| 15 | # CONFIG_BLK_DEV_BSG is not set | 13 | CONFIG_PARTITION_ADVANCED=y |
| 14 | CONFIG_SGI_PARTITION=y | ||
| 16 | CONFIG_MCKINLEY=y | 15 | CONFIG_MCKINLEY=y |
| 17 | CONFIG_IA64_PAGE_SIZE_64KB=y | 16 | CONFIG_IA64_PAGE_SIZE_64KB=y |
| 18 | CONFIG_IA64_CYCLONE=y | 17 | CONFIG_IA64_CYCLONE=y |
| @@ -29,14 +28,13 @@ CONFIG_ACPI_BUTTON=m | |||
| 29 | CONFIG_ACPI_FAN=m | 28 | CONFIG_ACPI_FAN=m |
| 30 | CONFIG_ACPI_DOCK=y | 29 | CONFIG_ACPI_DOCK=y |
| 31 | CONFIG_ACPI_PROCESSOR=m | 30 | CONFIG_ACPI_PROCESSOR=m |
| 32 | CONFIG_ACPI_CONTAINER=y | ||
| 33 | CONFIG_HOTPLUG_PCI=y | 31 | CONFIG_HOTPLUG_PCI=y |
| 34 | CONFIG_HOTPLUG_PCI_ACPI=y | 32 | CONFIG_HOTPLUG_PCI_ACPI=y |
| 33 | CONFIG_NET=y | ||
| 35 | CONFIG_PACKET=y | 34 | CONFIG_PACKET=y |
| 36 | CONFIG_UNIX=y | 35 | CONFIG_UNIX=y |
| 37 | CONFIG_INET=y | 36 | CONFIG_INET=y |
| 38 | CONFIG_IP_MULTICAST=y | 37 | CONFIG_IP_MULTICAST=y |
| 39 | CONFIG_ARPD=y | ||
| 40 | CONFIG_SYN_COOKIES=y | 38 | CONFIG_SYN_COOKIES=y |
| 41 | # CONFIG_IPV6 is not set | 39 | # CONFIG_IPV6 is not set |
| 42 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 40 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
| @@ -82,16 +80,13 @@ CONFIG_FUSION_FC=m | |||
| 82 | CONFIG_FUSION_SAS=y | 80 | CONFIG_FUSION_SAS=y |
| 83 | CONFIG_NETDEVICES=y | 81 | CONFIG_NETDEVICES=y |
| 84 | CONFIG_DUMMY=m | 82 | CONFIG_DUMMY=m |
| 85 | CONFIG_NET_ETHERNET=y | 83 | CONFIG_NETCONSOLE=y |
| 84 | CONFIG_TIGON3=y | ||
| 86 | CONFIG_NET_TULIP=y | 85 | CONFIG_NET_TULIP=y |
| 87 | CONFIG_TULIP=m | 86 | CONFIG_TULIP=m |
| 88 | CONFIG_NET_PCI=y | ||
| 89 | CONFIG_NET_VENDOR_INTEL=y | ||
| 90 | CONFIG_E100=m | 87 | CONFIG_E100=m |
| 91 | CONFIG_E1000=y | 88 | CONFIG_E1000=y |
| 92 | CONFIG_IGB=y | 89 | CONFIG_IGB=y |
| 93 | CONFIG_TIGON3=y | ||
| 94 | CONFIG_NETCONSOLE=y | ||
| 95 | # CONFIG_SERIO_SERPORT is not set | 90 | # CONFIG_SERIO_SERPORT is not set |
| 96 | CONFIG_GAMEPORT=m | 91 | CONFIG_GAMEPORT=m |
| 97 | CONFIG_SERIAL_NONSTANDARD=y | 92 | CONFIG_SERIAL_NONSTANDARD=y |
| @@ -151,6 +146,7 @@ CONFIG_USB_STORAGE=m | |||
| 151 | CONFIG_INFINIBAND=m | 146 | CONFIG_INFINIBAND=m |
| 152 | CONFIG_INFINIBAND_MTHCA=m | 147 | CONFIG_INFINIBAND_MTHCA=m |
| 153 | CONFIG_INFINIBAND_IPOIB=m | 148 | CONFIG_INFINIBAND_IPOIB=m |
| 149 | CONFIG_INTEL_IOMMU=y | ||
| 154 | CONFIG_MSPEC=m | 150 | CONFIG_MSPEC=m |
| 155 | CONFIG_EXT2_FS=y | 151 | CONFIG_EXT2_FS=y |
| 156 | CONFIG_EXT2_FS_XATTR=y | 152 | CONFIG_EXT2_FS_XATTR=y |
| @@ -164,7 +160,6 @@ CONFIG_REISERFS_FS_XATTR=y | |||
| 164 | CONFIG_REISERFS_FS_POSIX_ACL=y | 160 | CONFIG_REISERFS_FS_POSIX_ACL=y |
| 165 | CONFIG_REISERFS_FS_SECURITY=y | 161 | CONFIG_REISERFS_FS_SECURITY=y |
| 166 | CONFIG_XFS_FS=y | 162 | CONFIG_XFS_FS=y |
| 167 | CONFIG_AUTOFS_FS=m | ||
| 168 | CONFIG_AUTOFS4_FS=m | 163 | CONFIG_AUTOFS4_FS=m |
| 169 | CONFIG_ISO9660_FS=m | 164 | CONFIG_ISO9660_FS=m |
| 170 | CONFIG_JOLIET=y | 165 | CONFIG_JOLIET=y |
| @@ -175,16 +170,10 @@ CONFIG_PROC_KCORE=y | |||
| 175 | CONFIG_TMPFS=y | 170 | CONFIG_TMPFS=y |
| 176 | CONFIG_HUGETLBFS=y | 171 | CONFIG_HUGETLBFS=y |
| 177 | CONFIG_NFS_FS=m | 172 | CONFIG_NFS_FS=m |
| 178 | CONFIG_NFS_V3=y | 173 | CONFIG_NFS_V4=m |
| 179 | CONFIG_NFS_V4=y | ||
| 180 | CONFIG_NFSD=m | 174 | CONFIG_NFSD=m |
| 181 | CONFIG_NFSD_V4=y | 175 | CONFIG_NFSD_V4=y |
| 182 | CONFIG_SMB_FS=m | ||
| 183 | CONFIG_SMB_NLS_DEFAULT=y | ||
| 184 | CONFIG_CIFS=m | 176 | CONFIG_CIFS=m |
| 185 | CONFIG_PARTITION_ADVANCED=y | ||
| 186 | CONFIG_SGI_PARTITION=y | ||
| 187 | CONFIG_EFI_PARTITION=y | ||
| 188 | CONFIG_NLS_CODEPAGE_437=y | 177 | CONFIG_NLS_CODEPAGE_437=y |
| 189 | CONFIG_NLS_CODEPAGE_737=m | 178 | CONFIG_NLS_CODEPAGE_737=m |
| 190 | CONFIG_NLS_CODEPAGE_775=m | 179 | CONFIG_NLS_CODEPAGE_775=m |
| @@ -225,11 +214,7 @@ CONFIG_NLS_UTF8=m | |||
| 225 | CONFIG_MAGIC_SYSRQ=y | 214 | CONFIG_MAGIC_SYSRQ=y |
| 226 | CONFIG_DEBUG_KERNEL=y | 215 | CONFIG_DEBUG_KERNEL=y |
| 227 | CONFIG_DEBUG_MUTEXES=y | 216 | CONFIG_DEBUG_MUTEXES=y |
| 228 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
| 229 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
| 230 | CONFIG_CRYPTO_ECB=m | ||
| 231 | CONFIG_CRYPTO_PCBC=m | 217 | CONFIG_CRYPTO_PCBC=m |
| 232 | CONFIG_CRYPTO_MD5=y | 218 | CONFIG_CRYPTO_MD5=y |
| 233 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 219 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
| 234 | CONFIG_CRC_T10DIF=y | 220 | CONFIG_CRC_T10DIF=y |
| 235 | CONFIG_INTEL_IOMMU=y | ||
diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig index d663efd1e4db..5b4fcdd51457 100644 --- a/arch/ia64/configs/gensparse_defconfig +++ b/arch/ia64/configs/gensparse_defconfig | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | ||
| 2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
| 4 | CONFIG_IKCONFIG=y | 3 | CONFIG_IKCONFIG=y |
| @@ -9,6 +8,8 @@ CONFIG_KALLSYMS_ALL=y | |||
| 9 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
| 10 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
| 11 | CONFIG_MODVERSIONS=y | 10 | CONFIG_MODVERSIONS=y |
| 11 | CONFIG_PARTITION_ADVANCED=y | ||
| 12 | CONFIG_SGI_PARTITION=y | ||
| 12 | CONFIG_MCKINLEY=y | 13 | CONFIG_MCKINLEY=y |
| 13 | CONFIG_IA64_CYCLONE=y | 14 | CONFIG_IA64_CYCLONE=y |
| 14 | CONFIG_SMP=y | 15 | CONFIG_SMP=y |
| @@ -24,14 +25,12 @@ CONFIG_BINFMT_MISC=m | |||
| 24 | CONFIG_ACPI_BUTTON=m | 25 | CONFIG_ACPI_BUTTON=m |
| 25 | CONFIG_ACPI_FAN=m | 26 | CONFIG_ACPI_FAN=m |
| 26 | CONFIG_ACPI_PROCESSOR=m | 27 | CONFIG_ACPI_PROCESSOR=m |
| 27 | CONFIG_ACPI_CONTAINER=m | ||
| 28 | CONFIG_HOTPLUG_PCI=y | 28 | CONFIG_HOTPLUG_PCI=y |
| 29 | CONFIG_HOTPLUG_PCI_ACPI=m | 29 | CONFIG_NET=y |
| 30 | CONFIG_PACKET=y | 30 | CONFIG_PACKET=y |
| 31 | CONFIG_UNIX=y | 31 | CONFIG_UNIX=y |
| 32 | CONFIG_INET=y | 32 | CONFIG_INET=y |
| 33 | CONFIG_IP_MULTICAST=y | 33 | CONFIG_IP_MULTICAST=y |
| 34 | CONFIG_ARPD=y | ||
| 35 | CONFIG_SYN_COOKIES=y | 34 | CONFIG_SYN_COOKIES=y |
| 36 | # CONFIG_IPV6 is not set | 35 | # CONFIG_IPV6 is not set |
| 37 | CONFIG_BLK_DEV_LOOP=m | 36 | CONFIG_BLK_DEV_LOOP=m |
| @@ -71,15 +70,12 @@ CONFIG_FUSION_SPI=y | |||
| 71 | CONFIG_FUSION_FC=m | 70 | CONFIG_FUSION_FC=m |
| 72 | CONFIG_NETDEVICES=y | 71 | CONFIG_NETDEVICES=y |
| 73 | CONFIG_DUMMY=m | 72 | CONFIG_DUMMY=m |
| 74 | CONFIG_NET_ETHERNET=y | 73 | CONFIG_NETCONSOLE=y |
| 74 | CONFIG_TIGON3=y | ||
| 75 | CONFIG_NET_TULIP=y | 75 | CONFIG_NET_TULIP=y |
| 76 | CONFIG_TULIP=m | 76 | CONFIG_TULIP=m |
| 77 | CONFIG_NET_PCI=y | ||
| 78 | CONFIG_NET_VENDOR_INTEL=y | ||
| 79 | CONFIG_E100=m | 77 | CONFIG_E100=m |
| 80 | CONFIG_E1000=y | 78 | CONFIG_E1000=y |
| 81 | CONFIG_TIGON3=y | ||
| 82 | CONFIG_NETCONSOLE=y | ||
| 83 | # CONFIG_SERIO_SERPORT is not set | 79 | # CONFIG_SERIO_SERPORT is not set |
| 84 | CONFIG_GAMEPORT=m | 80 | CONFIG_GAMEPORT=m |
| 85 | CONFIG_SERIAL_NONSTANDARD=y | 81 | CONFIG_SERIAL_NONSTANDARD=y |
| @@ -146,7 +142,6 @@ CONFIG_REISERFS_FS_XATTR=y | |||
| 146 | CONFIG_REISERFS_FS_POSIX_ACL=y | 142 | CONFIG_REISERFS_FS_POSIX_ACL=y |
| 147 | CONFIG_REISERFS_FS_SECURITY=y | 143 | CONFIG_REISERFS_FS_SECURITY=y |
| 148 | CONFIG_XFS_FS=y | 144 | CONFIG_XFS_FS=y |
| 149 | CONFIG_AUTOFS_FS=y | ||
| 150 | CONFIG_AUTOFS4_FS=y | 145 | CONFIG_AUTOFS4_FS=y |
| 151 | CONFIG_ISO9660_FS=m | 146 | CONFIG_ISO9660_FS=m |
| 152 | CONFIG_JOLIET=y | 147 | CONFIG_JOLIET=y |
| @@ -157,16 +152,10 @@ CONFIG_PROC_KCORE=y | |||
| 157 | CONFIG_TMPFS=y | 152 | CONFIG_TMPFS=y |
| 158 | CONFIG_HUGETLBFS=y | 153 | CONFIG_HUGETLBFS=y |
| 159 | CONFIG_NFS_FS=m | 154 | CONFIG_NFS_FS=m |
| 160 | CONFIG_NFS_V3=y | 155 | CONFIG_NFS_V4=m |
| 161 | CONFIG_NFS_V4=y | ||
| 162 | CONFIG_NFSD=m | 156 | CONFIG_NFSD=m |
| 163 | CONFIG_NFSD_V4=y | 157 | CONFIG_NFSD_V4=y |
| 164 | CONFIG_SMB_FS=m | ||
| 165 | CONFIG_SMB_NLS_DEFAULT=y | ||
| 166 | CONFIG_CIFS=m | 158 | CONFIG_CIFS=m |
| 167 | CONFIG_PARTITION_ADVANCED=y | ||
| 168 | CONFIG_SGI_PARTITION=y | ||
| 169 | CONFIG_EFI_PARTITION=y | ||
| 170 | CONFIG_NLS_CODEPAGE_437=y | 159 | CONFIG_NLS_CODEPAGE_437=y |
| 171 | CONFIG_NLS_CODEPAGE_737=m | 160 | CONFIG_NLS_CODEPAGE_737=m |
| 172 | CONFIG_NLS_CODEPAGE_775=m | 161 | CONFIG_NLS_CODEPAGE_775=m |
diff --git a/arch/ia64/configs/sim_defconfig b/arch/ia64/configs/sim_defconfig index b4548a3e82d5..f0f69fdbddae 100644 --- a/arch/ia64/configs/sim_defconfig +++ b/arch/ia64/configs/sim_defconfig | |||
| @@ -1,13 +1,12 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | ||
| 2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_IKCONFIG=y | 2 | CONFIG_IKCONFIG=y |
| 4 | CONFIG_IKCONFIG_PROC=y | 3 | CONFIG_IKCONFIG_PROC=y |
| 5 | CONFIG_LOG_BUF_SHIFT=16 | 4 | CONFIG_LOG_BUF_SHIFT=16 |
| 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 7 | CONFIG_MODULES=y | 5 | CONFIG_MODULES=y |
| 8 | CONFIG_MODULE_UNLOAD=y | 6 | CONFIG_MODULE_UNLOAD=y |
| 9 | CONFIG_MODULE_FORCE_UNLOAD=y | 7 | CONFIG_MODULE_FORCE_UNLOAD=y |
| 10 | CONFIG_MODVERSIONS=y | 8 | CONFIG_MODVERSIONS=y |
| 9 | CONFIG_PARTITION_ADVANCED=y | ||
| 11 | CONFIG_IA64_HP_SIM=y | 10 | CONFIG_IA64_HP_SIM=y |
| 12 | CONFIG_MCKINLEY=y | 11 | CONFIG_MCKINLEY=y |
| 13 | CONFIG_IA64_PAGE_SIZE_64KB=y | 12 | CONFIG_IA64_PAGE_SIZE_64KB=y |
| @@ -27,7 +26,6 @@ CONFIG_BLK_DEV_LOOP=y | |||
| 27 | CONFIG_BLK_DEV_RAM=y | 26 | CONFIG_BLK_DEV_RAM=y |
| 28 | CONFIG_SCSI=y | 27 | CONFIG_SCSI=y |
| 29 | CONFIG_BLK_DEV_SD=y | 28 | CONFIG_BLK_DEV_SD=y |
| 30 | CONFIG_SCSI_MULTI_LUN=y | ||
| 31 | CONFIG_SCSI_CONSTANTS=y | 29 | CONFIG_SCSI_CONSTANTS=y |
| 32 | CONFIG_SCSI_LOGGING=y | 30 | CONFIG_SCSI_LOGGING=y |
| 33 | CONFIG_SCSI_SPI_ATTRS=y | 31 | CONFIG_SCSI_SPI_ATTRS=y |
| @@ -49,8 +47,6 @@ CONFIG_HUGETLBFS=y | |||
| 49 | CONFIG_NFS_FS=y | 47 | CONFIG_NFS_FS=y |
| 50 | CONFIG_NFSD=y | 48 | CONFIG_NFSD=y |
| 51 | CONFIG_NFSD_V3=y | 49 | CONFIG_NFSD_V3=y |
| 52 | CONFIG_PARTITION_ADVANCED=y | 50 | CONFIG_DEBUG_INFO=y |
| 53 | CONFIG_EFI_PARTITION=y | ||
| 54 | CONFIG_DEBUG_KERNEL=y | 51 | CONFIG_DEBUG_KERNEL=y |
| 55 | CONFIG_DEBUG_MUTEXES=y | 52 | CONFIG_DEBUG_MUTEXES=y |
| 56 | CONFIG_DEBUG_INFO=y | ||
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig index c8a3f40e77f6..192ed157c9ce 100644 --- a/arch/ia64/configs/tiger_defconfig +++ b/arch/ia64/configs/tiger_defconfig | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | ||
| 2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_POSIX_MQUEUE=y | 2 | CONFIG_POSIX_MQUEUE=y |
| 4 | CONFIG_IKCONFIG=y | 3 | CONFIG_IKCONFIG=y |
| @@ -11,6 +10,8 @@ CONFIG_MODULE_UNLOAD=y | |||
| 11 | CONFIG_MODVERSIONS=y | 10 | CONFIG_MODVERSIONS=y |
| 12 | CONFIG_MODULE_SRCVERSION_ALL=y | 11 | CONFIG_MODULE_SRCVERSION_ALL=y |
| 13 | # CONFIG_BLK_DEV_BSG is not set | 12 | # CONFIG_BLK_DEV_BSG is not set |
| 13 | CONFIG_PARTITION_ADVANCED=y | ||
| 14 | CONFIG_SGI_PARTITION=y | ||
| 14 | CONFIG_IA64_DIG=y | 15 | CONFIG_IA64_DIG=y |
| 15 | CONFIG_MCKINLEY=y | 16 | CONFIG_MCKINLEY=y |
| 16 | CONFIG_IA64_PAGE_SIZE_64KB=y | 17 | CONFIG_IA64_PAGE_SIZE_64KB=y |
| @@ -29,14 +30,12 @@ CONFIG_BINFMT_MISC=m | |||
| 29 | CONFIG_ACPI_BUTTON=m | 30 | CONFIG_ACPI_BUTTON=m |
| 30 | CONFIG_ACPI_FAN=m | 31 | CONFIG_ACPI_FAN=m |
| 31 | CONFIG_ACPI_PROCESSOR=m | 32 | CONFIG_ACPI_PROCESSOR=m |
| 32 | CONFIG_ACPI_CONTAINER=m | ||
| 33 | CONFIG_HOTPLUG_PCI=y | 33 | CONFIG_HOTPLUG_PCI=y |
| 34 | CONFIG_HOTPLUG_PCI_ACPI=m | 34 | CONFIG_NET=y |
| 35 | CONFIG_PACKET=y | 35 | CONFIG_PACKET=y |
| 36 | CONFIG_UNIX=y | 36 | CONFIG_UNIX=y |
| 37 | CONFIG_INET=y | 37 | CONFIG_INET=y |
| 38 | CONFIG_IP_MULTICAST=y | 38 | CONFIG_IP_MULTICAST=y |
| 39 | CONFIG_ARPD=y | ||
| 40 | CONFIG_SYN_COOKIES=y | 39 | CONFIG_SYN_COOKIES=y |
| 41 | # CONFIG_IPV6 is not set | 40 | # CONFIG_IPV6 is not set |
| 42 | CONFIG_BLK_DEV_LOOP=m | 41 | CONFIG_BLK_DEV_LOOP=m |
| @@ -53,6 +52,7 @@ CONFIG_BLK_DEV_SD=y | |||
| 53 | CONFIG_CHR_DEV_ST=m | 52 | CONFIG_CHR_DEV_ST=m |
| 54 | CONFIG_BLK_DEV_SR=m | 53 | CONFIG_BLK_DEV_SR=m |
| 55 | CONFIG_CHR_DEV_SG=m | 54 | CONFIG_CHR_DEV_SG=m |
| 55 | CONFIG_SCSI_FC_ATTRS=y | ||
| 56 | CONFIG_SCSI_SYM53C8XX_2=y | 56 | CONFIG_SCSI_SYM53C8XX_2=y |
| 57 | CONFIG_SCSI_QLOGIC_1280=y | 57 | CONFIG_SCSI_QLOGIC_1280=y |
| 58 | CONFIG_MD=y | 58 | CONFIG_MD=y |
| @@ -72,15 +72,12 @@ CONFIG_FUSION_FC=y | |||
| 72 | CONFIG_FUSION_CTL=y | 72 | CONFIG_FUSION_CTL=y |
| 73 | CONFIG_NETDEVICES=y | 73 | CONFIG_NETDEVICES=y |
| 74 | CONFIG_DUMMY=m | 74 | CONFIG_DUMMY=m |
| 75 | CONFIG_NET_ETHERNET=y | 75 | CONFIG_NETCONSOLE=y |
| 76 | CONFIG_TIGON3=y | ||
| 76 | CONFIG_NET_TULIP=y | 77 | CONFIG_NET_TULIP=y |
| 77 | CONFIG_TULIP=m | 78 | CONFIG_TULIP=m |
| 78 | CONFIG_NET_PCI=y | ||
| 79 | CONFIG_NET_VENDOR_INTEL=y | ||
| 80 | CONFIG_E100=m | 79 | CONFIG_E100=m |
| 81 | CONFIG_E1000=y | 80 | CONFIG_E1000=y |
| 82 | CONFIG_TIGON3=y | ||
| 83 | CONFIG_NETCONSOLE=y | ||
| 84 | # CONFIG_SERIO_SERPORT is not set | 81 | # CONFIG_SERIO_SERPORT is not set |
| 85 | CONFIG_GAMEPORT=m | 82 | CONFIG_GAMEPORT=m |
| 86 | CONFIG_SERIAL_NONSTANDARD=y | 83 | CONFIG_SERIAL_NONSTANDARD=y |
| @@ -118,7 +115,6 @@ CONFIG_REISERFS_FS_XATTR=y | |||
| 118 | CONFIG_REISERFS_FS_POSIX_ACL=y | 115 | CONFIG_REISERFS_FS_POSIX_ACL=y |
| 119 | CONFIG_REISERFS_FS_SECURITY=y | 116 | CONFIG_REISERFS_FS_SECURITY=y |
| 120 | CONFIG_XFS_FS=y | 117 | CONFIG_XFS_FS=y |
| 121 | CONFIG_AUTOFS_FS=y | ||
| 122 | CONFIG_AUTOFS4_FS=y | 118 | CONFIG_AUTOFS4_FS=y |
| 123 | CONFIG_ISO9660_FS=m | 119 | CONFIG_ISO9660_FS=m |
| 124 | CONFIG_JOLIET=y | 120 | CONFIG_JOLIET=y |
| @@ -129,16 +125,10 @@ CONFIG_PROC_KCORE=y | |||
| 129 | CONFIG_TMPFS=y | 125 | CONFIG_TMPFS=y |
| 130 | CONFIG_HUGETLBFS=y | 126 | CONFIG_HUGETLBFS=y |
| 131 | CONFIG_NFS_FS=m | 127 | CONFIG_NFS_FS=m |
| 132 | CONFIG_NFS_V3=y | 128 | CONFIG_NFS_V4=m |
| 133 | CONFIG_NFS_V4=y | ||
| 134 | CONFIG_NFSD=m | 129 | CONFIG_NFSD=m |
| 135 | CONFIG_NFSD_V4=y | 130 | CONFIG_NFSD_V4=y |
| 136 | CONFIG_SMB_FS=m | ||
| 137 | CONFIG_SMB_NLS_DEFAULT=y | ||
| 138 | CONFIG_CIFS=m | 131 | CONFIG_CIFS=m |
| 139 | CONFIG_PARTITION_ADVANCED=y | ||
| 140 | CONFIG_SGI_PARTITION=y | ||
| 141 | CONFIG_EFI_PARTITION=y | ||
| 142 | CONFIG_NLS_CODEPAGE_437=y | 132 | CONFIG_NLS_CODEPAGE_437=y |
| 143 | CONFIG_NLS_CODEPAGE_737=m | 133 | CONFIG_NLS_CODEPAGE_737=m |
| 144 | CONFIG_NLS_CODEPAGE_775=m | 134 | CONFIG_NLS_CODEPAGE_775=m |
| @@ -180,6 +170,5 @@ CONFIG_MAGIC_SYSRQ=y | |||
| 180 | CONFIG_DEBUG_KERNEL=y | 170 | CONFIG_DEBUG_KERNEL=y |
| 181 | CONFIG_DEBUG_MUTEXES=y | 171 | CONFIG_DEBUG_MUTEXES=y |
| 182 | CONFIG_IA64_GRANULE_16MB=y | 172 | CONFIG_IA64_GRANULE_16MB=y |
| 183 | CONFIG_CRYPTO_ECB=m | ||
| 184 | CONFIG_CRYPTO_PCBC=m | 173 | CONFIG_CRYPTO_PCBC=m |
| 185 | CONFIG_CRYPTO_MD5=y | 174 | CONFIG_CRYPTO_MD5=y |
diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig index 54bc72eda30d..b504c8e2fd52 100644 --- a/arch/ia64/configs/zx1_defconfig +++ b/arch/ia64/configs/zx1_defconfig | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | CONFIG_EXPERIMENTAL=y | ||
| 2 | CONFIG_SYSVIPC=y | 1 | CONFIG_SYSVIPC=y |
| 3 | CONFIG_BSD_PROCESS_ACCT=y | 2 | CONFIG_BSD_PROCESS_ACCT=y |
| 4 | CONFIG_BLK_DEV_INITRD=y | 3 | CONFIG_BLK_DEV_INITRD=y |
| 5 | CONFIG_KPROBES=y | 4 | CONFIG_KPROBES=y |
| 6 | CONFIG_MODULES=y | 5 | CONFIG_MODULES=y |
| 6 | CONFIG_PARTITION_ADVANCED=y | ||
| 7 | CONFIG_IA64_HP_ZX1=y | 7 | CONFIG_IA64_HP_ZX1=y |
| 8 | CONFIG_MCKINLEY=y | 8 | CONFIG_MCKINLEY=y |
| 9 | CONFIG_SMP=y | 9 | CONFIG_SMP=y |
| @@ -18,6 +18,7 @@ CONFIG_EFI_VARS=y | |||
| 18 | CONFIG_BINFMT_MISC=y | 18 | CONFIG_BINFMT_MISC=y |
| 19 | CONFIG_HOTPLUG_PCI=y | 19 | CONFIG_HOTPLUG_PCI=y |
| 20 | CONFIG_HOTPLUG_PCI_ACPI=y | 20 | CONFIG_HOTPLUG_PCI_ACPI=y |
| 21 | CONFIG_NET=y | ||
| 21 | CONFIG_PACKET=y | 22 | CONFIG_PACKET=y |
| 22 | CONFIG_UNIX=y | 23 | CONFIG_UNIX=y |
| 23 | CONFIG_INET=y | 24 | CONFIG_INET=y |
| @@ -37,9 +38,9 @@ CONFIG_CHR_DEV_OSST=y | |||
| 37 | CONFIG_BLK_DEV_SR=y | 38 | CONFIG_BLK_DEV_SR=y |
| 38 | CONFIG_BLK_DEV_SR_VENDOR=y | 39 | CONFIG_BLK_DEV_SR_VENDOR=y |
| 39 | CONFIG_CHR_DEV_SG=y | 40 | CONFIG_CHR_DEV_SG=y |
| 40 | CONFIG_SCSI_MULTI_LUN=y | ||
| 41 | CONFIG_SCSI_CONSTANTS=y | 41 | CONFIG_SCSI_CONSTANTS=y |
| 42 | CONFIG_SCSI_LOGGING=y | 42 | CONFIG_SCSI_LOGGING=y |
| 43 | CONFIG_SCSI_FC_ATTRS=y | ||
| 43 | CONFIG_SCSI_SYM53C8XX_2=y | 44 | CONFIG_SCSI_SYM53C8XX_2=y |
| 44 | CONFIG_SCSI_QLOGIC_1280=y | 45 | CONFIG_SCSI_QLOGIC_1280=y |
| 45 | CONFIG_FUSION=y | 46 | CONFIG_FUSION=y |
| @@ -48,18 +49,15 @@ CONFIG_FUSION_FC=y | |||
| 48 | CONFIG_FUSION_CTL=m | 49 | CONFIG_FUSION_CTL=m |
| 49 | CONFIG_NETDEVICES=y | 50 | CONFIG_NETDEVICES=y |
| 50 | CONFIG_DUMMY=y | 51 | CONFIG_DUMMY=y |
| 51 | CONFIG_NET_ETHERNET=y | 52 | CONFIG_TIGON3=y |
| 52 | CONFIG_NET_TULIP=y | 53 | CONFIG_NET_TULIP=y |
| 53 | CONFIG_TULIP=y | 54 | CONFIG_TULIP=y |
| 54 | CONFIG_TULIP_MWI=y | 55 | CONFIG_TULIP_MWI=y |
| 55 | CONFIG_TULIP_MMIO=y | 56 | CONFIG_TULIP_MMIO=y |
| 56 | CONFIG_TULIP_NAPI=y | 57 | CONFIG_TULIP_NAPI=y |
| 57 | CONFIG_TULIP_NAPI_HW_MITIGATION=y | 58 | CONFIG_TULIP_NAPI_HW_MITIGATION=y |
| 58 | CONFIG_NET_PCI=y | ||
| 59 | CONFIG_NET_VENDOR_INTEL=y | ||
| 60 | CONFIG_E100=y | 59 | CONFIG_E100=y |
| 61 | CONFIG_E1000=y | 60 | CONFIG_E1000=y |
| 62 | CONFIG_TIGON3=y | ||
| 63 | CONFIG_INPUT_JOYDEV=y | 61 | CONFIG_INPUT_JOYDEV=y |
| 64 | CONFIG_INPUT_EVDEV=y | 62 | CONFIG_INPUT_EVDEV=y |
| 65 | # CONFIG_INPUT_KEYBOARD is not set | 63 | # CONFIG_INPUT_KEYBOARD is not set |
| @@ -100,7 +98,6 @@ CONFIG_USB_STORAGE=y | |||
| 100 | CONFIG_EXT2_FS=y | 98 | CONFIG_EXT2_FS=y |
| 101 | CONFIG_EXT2_FS_XATTR=y | 99 | CONFIG_EXT2_FS_XATTR=y |
| 102 | CONFIG_EXT3_FS=y | 100 | CONFIG_EXT3_FS=y |
| 103 | CONFIG_AUTOFS_FS=y | ||
| 104 | CONFIG_ISO9660_FS=y | 101 | CONFIG_ISO9660_FS=y |
| 105 | CONFIG_JOLIET=y | 102 | CONFIG_JOLIET=y |
| 106 | CONFIG_UDF_FS=y | 103 | CONFIG_UDF_FS=y |
| @@ -110,12 +107,9 @@ CONFIG_PROC_KCORE=y | |||
| 110 | CONFIG_TMPFS=y | 107 | CONFIG_TMPFS=y |
| 111 | CONFIG_HUGETLBFS=y | 108 | CONFIG_HUGETLBFS=y |
| 112 | CONFIG_NFS_FS=y | 109 | CONFIG_NFS_FS=y |
| 113 | CONFIG_NFS_V3=y | ||
| 114 | CONFIG_NFS_V4=y | 110 | CONFIG_NFS_V4=y |
| 115 | CONFIG_NFSD=y | 111 | CONFIG_NFSD=y |
| 116 | CONFIG_NFSD_V3=y | 112 | CONFIG_NFSD_V3=y |
| 117 | CONFIG_PARTITION_ADVANCED=y | ||
| 118 | CONFIG_EFI_PARTITION=y | ||
| 119 | CONFIG_NLS_CODEPAGE_437=y | 113 | CONFIG_NLS_CODEPAGE_437=y |
| 120 | CONFIG_NLS_CODEPAGE_737=y | 114 | CONFIG_NLS_CODEPAGE_737=y |
| 121 | CONFIG_NLS_CODEPAGE_775=y | 115 | CONFIG_NLS_CODEPAGE_775=y |
diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h index 6a65bb7d0657..18026b2eb582 100644 --- a/arch/ia64/include/uapi/asm/unistd.h +++ b/arch/ia64/include/uapi/asm/unistd.h | |||
| @@ -329,6 +329,6 @@ | |||
| 329 | #define __NR_sched_getattr 1337 | 329 | #define __NR_sched_getattr 1337 |
| 330 | #define __NR_renameat2 1338 | 330 | #define __NR_renameat2 1338 |
| 331 | #define __NR_getrandom 1339 | 331 | #define __NR_getrandom 1339 |
| 332 | #define __NR_memfd_create 1339 | 332 | #define __NR_memfd_create 1340 |
| 333 | 333 | ||
| 334 | #endif /* _UAPI_ASM_IA64_UNISTD_H */ | 334 | #endif /* _UAPI_ASM_IA64_UNISTD_H */ |
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c index ec73b2cf912a..fc505d58f078 100644 --- a/arch/ia64/pci/fixup.c +++ b/arch/ia64/pci/fixup.c | |||
| @@ -38,27 +38,6 @@ static void pci_fixup_video(struct pci_dev *pdev) | |||
| 38 | return; | 38 | return; |
| 39 | /* Maybe, this machine supports legacy memory map. */ | 39 | /* Maybe, this machine supports legacy memory map. */ |
| 40 | 40 | ||
| 41 | if (!vga_default_device()) { | ||
| 42 | resource_size_t start, end; | ||
| 43 | int i; | ||
| 44 | |||
| 45 | /* Does firmware framebuffer belong to us? */ | ||
| 46 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
| 47 | if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM)) | ||
| 48 | continue; | ||
| 49 | |||
| 50 | start = pci_resource_start(pdev, i); | ||
| 51 | end = pci_resource_end(pdev, i); | ||
| 52 | |||
| 53 | if (!start || !end) | ||
| 54 | continue; | ||
| 55 | |||
| 56 | if (screen_info.lfb_base >= start && | ||
| 57 | (screen_info.lfb_base + screen_info.lfb_size) < end) | ||
| 58 | vga_set_default_device(pdev); | ||
| 59 | } | ||
| 60 | } | ||
| 61 | |||
| 62 | /* Is VGA routed to us? */ | 41 | /* Is VGA routed to us? */ |
| 63 | bus = pdev->bus; | 42 | bus = pdev->bus; |
| 64 | while (bus) { | 43 | while (bus) { |
| @@ -83,8 +62,7 @@ static void pci_fixup_video(struct pci_dev *pdev) | |||
| 83 | pci_read_config_word(pdev, PCI_COMMAND, &config); | 62 | pci_read_config_word(pdev, PCI_COMMAND, &config); |
| 84 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { | 63 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { |
| 85 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; | 64 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; |
| 86 | dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n"); | 65 | dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n"); |
| 87 | vga_set_default_device(pdev); | ||
| 88 | } | 66 | } |
| 89 | } | 67 | } |
| 90 | } | 68 | } |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 3ff8c9a25335..87b7c7581b1d 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
| @@ -91,8 +91,6 @@ config MMU_SUN3 | |||
| 91 | config KEXEC | 91 | config KEXEC |
| 92 | bool "kexec system call" | 92 | bool "kexec system call" |
| 93 | depends on M68KCLASSIC | 93 | depends on M68KCLASSIC |
| 94 | select CRYPTO | ||
| 95 | select CRYPTO_SHA256 | ||
| 96 | help | 94 | help |
| 97 | kexec is a system call that implements the ability to shutdown your | 95 | kexec is a system call that implements the ability to shutdown your |
| 98 | current kernel, and to start another kernel. It is like a reboot | 96 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 1fcdd344c7ad..4ef7a54813e6 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <uapi/asm/unistd.h> | 4 | #include <uapi/asm/unistd.h> |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | #define NR_syscalls 352 | 7 | #define NR_syscalls 354 |
| 8 | 8 | ||
| 9 | #define __ARCH_WANT_OLD_READDIR | 9 | #define __ARCH_WANT_OLD_READDIR |
| 10 | #define __ARCH_WANT_OLD_STAT | 10 | #define __ARCH_WANT_OLD_STAT |
diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h index 9cd82fbc7817..b419c6b7ac37 100644 --- a/arch/m68k/include/uapi/asm/unistd.h +++ b/arch/m68k/include/uapi/asm/unistd.h | |||
| @@ -357,5 +357,7 @@ | |||
| 357 | #define __NR_sched_setattr 349 | 357 | #define __NR_sched_setattr 349 |
| 358 | #define __NR_sched_getattr 350 | 358 | #define __NR_sched_getattr 350 |
| 359 | #define __NR_renameat2 351 | 359 | #define __NR_renameat2 351 |
| 360 | #define __NR_getrandom 352 | ||
| 361 | #define __NR_memfd_create 353 | ||
| 360 | 362 | ||
| 361 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ | 363 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ |
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index 501e10212789..05b46c2b08b8 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
| @@ -372,4 +372,6 @@ ENTRY(sys_call_table) | |||
| 372 | .long sys_sched_setattr | 372 | .long sys_sched_setattr |
| 373 | .long sys_sched_getattr /* 350 */ | 373 | .long sys_sched_getattr /* 350 */ |
| 374 | .long sys_renameat2 | 374 | .long sys_renameat2 |
| 375 | .long sys_getrandom | ||
| 376 | .long sys_memfd_create | ||
| 375 | 377 | ||
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 40e1c1dd0e24..6feded3b0c4c 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
| @@ -127,7 +127,7 @@ config SECCOMP | |||
| 127 | 127 | ||
| 128 | endmenu | 128 | endmenu |
| 129 | 129 | ||
| 130 | menu "Advanced setup" | 130 | menu "Kernel features" |
| 131 | 131 | ||
| 132 | config ADVANCED_OPTIONS | 132 | config ADVANCED_OPTIONS |
| 133 | bool "Prompt for advanced kernel configuration options" | 133 | bool "Prompt for advanced kernel configuration options" |
| @@ -248,10 +248,10 @@ config MICROBLAZE_64K_PAGES | |||
| 248 | 248 | ||
| 249 | endchoice | 249 | endchoice |
| 250 | 250 | ||
| 251 | endmenu | ||
| 252 | |||
| 253 | source "mm/Kconfig" | 251 | source "mm/Kconfig" |
| 254 | 252 | ||
| 253 | endmenu | ||
| 254 | |||
| 255 | menu "Executable file formats" | 255 | menu "Executable file formats" |
| 256 | 256 | ||
| 257 | source "fs/Kconfig.binfmt" | 257 | source "fs/Kconfig.binfmt" |
diff --git a/arch/microblaze/include/asm/entry.h b/arch/microblaze/include/asm/entry.h index b4a4cb150aa9..596e485ae707 100644 --- a/arch/microblaze/include/asm/entry.h +++ b/arch/microblaze/include/asm/entry.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | #include <asm/percpu.h> | 16 | #include <asm/percpu.h> |
| 17 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
| 18 | #include <linux/linkage.h> | ||
| 18 | 19 | ||
| 19 | /* | 20 | /* |
| 20 | * These are per-cpu variables required in entry.S, among other | 21 | * These are per-cpu variables required in entry.S, among other |
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index 0aa005703a0b..59a89a64a865 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
| @@ -98,13 +98,13 @@ static inline int access_ok(int type, const void __user *addr, | |||
| 98 | 98 | ||
| 99 | if ((get_fs().seg < ((unsigned long)addr)) || | 99 | if ((get_fs().seg < ((unsigned long)addr)) || |
| 100 | (get_fs().seg < ((unsigned long)addr + size - 1))) { | 100 | (get_fs().seg < ((unsigned long)addr + size - 1))) { |
| 101 | pr_debug("ACCESS fail: %s at 0x%08x (size 0x%x), seg 0x%08x\n", | 101 | pr_devel("ACCESS fail: %s at 0x%08x (size 0x%x), seg 0x%08x\n", |
| 102 | type ? "WRITE" : "READ ", (__force u32)addr, (u32)size, | 102 | type ? "WRITE" : "READ ", (__force u32)addr, (u32)size, |
| 103 | (u32)get_fs().seg); | 103 | (u32)get_fs().seg); |
| 104 | return 0; | 104 | return 0; |
| 105 | } | 105 | } |
| 106 | ok: | 106 | ok: |
| 107 | pr_debug("ACCESS OK: %s at 0x%08x (size 0x%x), seg 0x%08x\n", | 107 | pr_devel("ACCESS OK: %s at 0x%08x (size 0x%x), seg 0x%08x\n", |
| 108 | type ? "WRITE" : "READ ", (__force u32)addr, (u32)size, | 108 | type ? "WRITE" : "READ ", (__force u32)addr, (u32)size, |
| 109 | (u32)get_fs().seg); | 109 | (u32)get_fs().seg); |
| 110 | return 1; | 110 | return 1; |
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h index fd56a8f66489..ea4b233647c1 100644 --- a/arch/microblaze/include/asm/unistd.h +++ b/arch/microblaze/include/asm/unistd.h | |||
| @@ -38,6 +38,6 @@ | |||
| 38 | 38 | ||
| 39 | #endif /* __ASSEMBLY__ */ | 39 | #endif /* __ASSEMBLY__ */ |
| 40 | 40 | ||
| 41 | #define __NR_syscalls 381 | 41 | #define __NR_syscalls 387 |
| 42 | 42 | ||
| 43 | #endif /* _ASM_MICROBLAZE_UNISTD_H */ | 43 | #endif /* _ASM_MICROBLAZE_UNISTD_H */ |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index df51e78a72cc..574c43000699 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -546,6 +546,7 @@ config SGI_IP28 | |||
| 546 | # select SYS_HAS_EARLY_PRINTK | 546 | # select SYS_HAS_EARLY_PRINTK |
| 547 | select SYS_SUPPORTS_64BIT_KERNEL | 547 | select SYS_SUPPORTS_64BIT_KERNEL |
| 548 | select SYS_SUPPORTS_BIG_ENDIAN | 548 | select SYS_SUPPORTS_BIG_ENDIAN |
| 549 | select MIPS_L1_CACHE_SHIFT_7 | ||
| 549 | help | 550 | help |
| 550 | This is the SGI Indigo2 with R10000 processor. To compile a Linux | 551 | This is the SGI Indigo2 with R10000 processor. To compile a Linux |
| 551 | kernel that runs on these, say Y here. | 552 | kernel that runs on these, say Y here. |
| @@ -2029,7 +2030,9 @@ config MIPS_CMP | |||
| 2029 | bool "MIPS CMP framework support (DEPRECATED)" | 2030 | bool "MIPS CMP framework support (DEPRECATED)" |
| 2030 | depends on SYS_SUPPORTS_MIPS_CMP | 2031 | depends on SYS_SUPPORTS_MIPS_CMP |
| 2031 | select MIPS_GIC_IPI | 2032 | select MIPS_GIC_IPI |
| 2033 | select SMP | ||
| 2032 | select SYNC_R4K | 2034 | select SYNC_R4K |
| 2035 | select SYS_SUPPORTS_SMP | ||
| 2033 | select WEAK_ORDERING | 2036 | select WEAK_ORDERING |
| 2034 | default n | 2037 | default n |
| 2035 | help | 2038 | help |
| @@ -2396,8 +2399,6 @@ source "kernel/Kconfig.preempt" | |||
| 2396 | 2399 | ||
| 2397 | config KEXEC | 2400 | config KEXEC |
| 2398 | bool "Kexec system call" | 2401 | bool "Kexec system call" |
| 2399 | select CRYPTO | ||
| 2400 | select CRYPTO_SHA256 | ||
| 2401 | help | 2402 | help |
| 2402 | kexec is a system call that implements the ability to shutdown your | 2403 | kexec is a system call that implements the ability to shutdown your |
| 2403 | current kernel, and to start another kernel. It is like a reboot | 2404 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 9336509f47ad..bbac51e11179 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
| @@ -113,7 +113,16 @@ predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__ | |||
| 113 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be)) | 113 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be)) |
| 114 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le)) | 114 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le)) |
| 115 | 115 | ||
| 116 | cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips) | 116 | # For smartmips configurations, there are hundreds of warnings due to ISA overrides |
| 117 | # in assembly and header files. smartmips is only supported for MIPS32r1 onwards | ||
| 118 | # and there is no support for 64-bit. Various '.set mips2' or '.set mips3' or | ||
| 119 | # similar directives in the kernel will spam the build logs with the following warnings: | ||
| 120 | # Warning: the `smartmips' extension requires MIPS32 revision 1 or greater | ||
| 121 | # or | ||
| 122 | # Warning: the 64-bit MIPS architecture does not support the `smartmips' extension | ||
| 123 | # Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has | ||
| 124 | # been fixed properly. | ||
| 125 | cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips) -Wa,--no-warn | ||
| 117 | cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips) | 126 | cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips) |
| 118 | 127 | ||
| 119 | cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ | 128 | cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ |
diff --git a/arch/mips/bcm63xx/irq.c b/arch/mips/bcm63xx/irq.c index 37eb2d1fa69a..b94bf44d8d8e 100644 --- a/arch/mips/bcm63xx/irq.c +++ b/arch/mips/bcm63xx/irq.c | |||
| @@ -434,7 +434,7 @@ static void bcm63xx_init_irq(void) | |||
| 434 | irq_stat_addr[0] += PERF_IRQSTAT_3368_REG; | 434 | irq_stat_addr[0] += PERF_IRQSTAT_3368_REG; |
| 435 | irq_mask_addr[0] += PERF_IRQMASK_3368_REG; | 435 | irq_mask_addr[0] += PERF_IRQMASK_3368_REG; |
| 436 | irq_stat_addr[1] = 0; | 436 | irq_stat_addr[1] = 0; |
| 437 | irq_stat_addr[1] = 0; | 437 | irq_mask_addr[1] = 0; |
| 438 | irq_bits = 32; | 438 | irq_bits = 32; |
| 439 | ext_irq_count = 4; | 439 | ext_irq_count = 4; |
| 440 | ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368; | 440 | ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368; |
| @@ -443,7 +443,7 @@ static void bcm63xx_init_irq(void) | |||
| 443 | irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0); | 443 | irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0); |
| 444 | irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0); | 444 | irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0); |
| 445 | irq_stat_addr[1] += PERF_IRQSTAT_6328_REG(1); | 445 | irq_stat_addr[1] += PERF_IRQSTAT_6328_REG(1); |
| 446 | irq_stat_addr[1] += PERF_IRQMASK_6328_REG(1); | 446 | irq_mask_addr[1] += PERF_IRQMASK_6328_REG(1); |
| 447 | irq_bits = 64; | 447 | irq_bits = 64; |
| 448 | ext_irq_count = 4; | 448 | ext_irq_count = 4; |
| 449 | is_ext_irq_cascaded = 1; | 449 | is_ext_irq_cascaded = 1; |
diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c index b49c7adbfa89..31903cf9709d 100644 --- a/arch/mips/boot/compressed/decompress.c +++ b/arch/mips/boot/compressed/decompress.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
| 16 | #include <linux/string.h> | ||
| 16 | 17 | ||
| 17 | #include <asm/addrspace.h> | 18 | #include <asm/addrspace.h> |
| 18 | 19 | ||
diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defconfig index 8f219dac9598..e24feb0633aa 100644 --- a/arch/mips/configs/gpr_defconfig +++ b/arch/mips/configs/gpr_defconfig | |||
| @@ -19,6 +19,7 @@ CONFIG_MODULE_UNLOAD=y | |||
| 19 | # CONFIG_BLK_DEV_BSG is not set | 19 | # CONFIG_BLK_DEV_BSG is not set |
| 20 | CONFIG_PCI=y | 20 | CONFIG_PCI=y |
| 21 | CONFIG_BINFMT_MISC=m | 21 | CONFIG_BINFMT_MISC=m |
| 22 | CONFIG_NET=y | ||
| 22 | CONFIG_PACKET=y | 23 | CONFIG_PACKET=y |
| 23 | CONFIG_UNIX=y | 24 | CONFIG_UNIX=y |
| 24 | CONFIG_INET=y | 25 | CONFIG_INET=y |
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index cc0756021398..48e16d98b2cc 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
| @@ -28,6 +28,7 @@ CONFIG_MIPS32_COMPAT=y | |||
| 28 | CONFIG_MIPS32_O32=y | 28 | CONFIG_MIPS32_O32=y |
| 29 | CONFIG_MIPS32_N32=y | 29 | CONFIG_MIPS32_N32=y |
| 30 | CONFIG_PM=y | 30 | CONFIG_PM=y |
| 31 | CONFIG_NET=y | ||
| 31 | CONFIG_PACKET=y | 32 | CONFIG_PACKET=y |
| 32 | CONFIG_UNIX=y | 33 | CONFIG_UNIX=y |
| 33 | CONFIG_XFRM_USER=m | 34 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig index 2575302aa2be..4f37a5985459 100644 --- a/arch/mips/configs/jazz_defconfig +++ b/arch/mips/configs/jazz_defconfig | |||
| @@ -18,6 +18,7 @@ CONFIG_MODULE_UNLOAD=y | |||
| 18 | CONFIG_MODVERSIONS=y | 18 | CONFIG_MODVERSIONS=y |
| 19 | CONFIG_BINFMT_MISC=m | 19 | CONFIG_BINFMT_MISC=m |
| 20 | CONFIG_PM=y | 20 | CONFIG_PM=y |
| 21 | CONFIG_NET=y | ||
| 21 | CONFIG_PACKET=m | 22 | CONFIG_PACKET=m |
| 22 | CONFIG_UNIX=y | 23 | CONFIG_UNIX=y |
| 23 | CONFIG_NET_KEY=m | 24 | CONFIG_NET_KEY=m |
diff --git a/arch/mips/configs/loongson3_defconfig b/arch/mips/configs/loongson3_defconfig index 4cb787ff273e..1c6191ebd583 100644 --- a/arch/mips/configs/loongson3_defconfig +++ b/arch/mips/configs/loongson3_defconfig | |||
| @@ -59,6 +59,7 @@ CONFIG_MIPS32_COMPAT=y | |||
| 59 | CONFIG_MIPS32_O32=y | 59 | CONFIG_MIPS32_O32=y |
| 60 | CONFIG_MIPS32_N32=y | 60 | CONFIG_MIPS32_N32=y |
| 61 | CONFIG_PM_RUNTIME=y | 61 | CONFIG_PM_RUNTIME=y |
| 62 | CONFIG_NET=y | ||
| 62 | CONFIG_PACKET=y | 63 | CONFIG_PACKET=y |
| 63 | CONFIG_UNIX=y | 64 | CONFIG_UNIX=y |
| 64 | CONFIG_XFRM_USER=y | 65 | CONFIG_XFRM_USER=y |
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index e18741ea1771..f57b96dcf7df 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig | |||
| @@ -19,6 +19,7 @@ CONFIG_MODULE_UNLOAD=y | |||
| 19 | CONFIG_MODVERSIONS=y | 19 | CONFIG_MODVERSIONS=y |
| 20 | CONFIG_MODULE_SRCVERSION_ALL=y | 20 | CONFIG_MODULE_SRCVERSION_ALL=y |
| 21 | CONFIG_PCI=y | 21 | CONFIG_PCI=y |
| 22 | CONFIG_NET=y | ||
| 22 | CONFIG_PACKET=y | 23 | CONFIG_PACKET=y |
| 23 | CONFIG_UNIX=y | 24 | CONFIG_UNIX=y |
| 24 | CONFIG_XFRM_USER=m | 25 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/malta_kvm_defconfig b/arch/mips/configs/malta_kvm_defconfig index cf0e01f814e1..d41742dd26c8 100644 --- a/arch/mips/configs/malta_kvm_defconfig +++ b/arch/mips/configs/malta_kvm_defconfig | |||
| @@ -20,6 +20,7 @@ CONFIG_MODULE_UNLOAD=y | |||
| 20 | CONFIG_MODVERSIONS=y | 20 | CONFIG_MODVERSIONS=y |
| 21 | CONFIG_MODULE_SRCVERSION_ALL=y | 21 | CONFIG_MODULE_SRCVERSION_ALL=y |
| 22 | CONFIG_PCI=y | 22 | CONFIG_PCI=y |
| 23 | CONFIG_NET=y | ||
| 23 | CONFIG_PACKET=y | 24 | CONFIG_PACKET=y |
| 24 | CONFIG_UNIX=y | 25 | CONFIG_UNIX=y |
| 25 | CONFIG_XFRM_USER=m | 26 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/malta_kvm_guest_defconfig b/arch/mips/configs/malta_kvm_guest_defconfig index edd9ec9cb678..a7806e83ea0f 100644 --- a/arch/mips/configs/malta_kvm_guest_defconfig +++ b/arch/mips/configs/malta_kvm_guest_defconfig | |||
| @@ -19,6 +19,7 @@ CONFIG_MODULE_UNLOAD=y | |||
| 19 | CONFIG_MODVERSIONS=y | 19 | CONFIG_MODVERSIONS=y |
| 20 | CONFIG_MODULE_SRCVERSION_ALL=y | 20 | CONFIG_MODULE_SRCVERSION_ALL=y |
| 21 | CONFIG_PCI=y | 21 | CONFIG_PCI=y |
| 22 | CONFIG_NET=y | ||
| 22 | CONFIG_PACKET=y | 23 | CONFIG_PACKET=y |
| 23 | CONFIG_UNIX=y | 24 | CONFIG_UNIX=y |
| 24 | CONFIG_XFRM_USER=m | 25 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig index d269a5326a30..9b6926d6bb32 100644 --- a/arch/mips/configs/mtx1_defconfig +++ b/arch/mips/configs/mtx1_defconfig | |||
| @@ -27,6 +27,7 @@ CONFIG_PD6729=m | |||
| 27 | CONFIG_I82092=m | 27 | CONFIG_I82092=m |
| 28 | CONFIG_BINFMT_MISC=m | 28 | CONFIG_BINFMT_MISC=m |
| 29 | CONFIG_PM=y | 29 | CONFIG_PM=y |
| 30 | CONFIG_NET=y | ||
| 30 | CONFIG_PACKET=m | 31 | CONFIG_PACKET=m |
| 31 | CONFIG_UNIX=y | 32 | CONFIG_UNIX=y |
| 32 | CONFIG_XFRM_USER=m | 33 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/nlm_xlp_defconfig b/arch/mips/configs/nlm_xlp_defconfig index 2f660e9a0da6..70509a48df82 100644 --- a/arch/mips/configs/nlm_xlp_defconfig +++ b/arch/mips/configs/nlm_xlp_defconfig | |||
| @@ -63,6 +63,7 @@ CONFIG_MIPS32_O32=y | |||
| 63 | CONFIG_MIPS32_N32=y | 63 | CONFIG_MIPS32_N32=y |
| 64 | CONFIG_PM_RUNTIME=y | 64 | CONFIG_PM_RUNTIME=y |
| 65 | CONFIG_PM_DEBUG=y | 65 | CONFIG_PM_DEBUG=y |
| 66 | CONFIG_NET=y | ||
| 66 | CONFIG_PACKET=y | 67 | CONFIG_PACKET=y |
| 67 | CONFIG_UNIX=y | 68 | CONFIG_UNIX=y |
| 68 | CONFIG_XFRM_USER=m | 69 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/nlm_xlr_defconfig b/arch/mips/configs/nlm_xlr_defconfig index c6f84655c98a..82207e8079f3 100644 --- a/arch/mips/configs/nlm_xlr_defconfig +++ b/arch/mips/configs/nlm_xlr_defconfig | |||
| @@ -43,6 +43,7 @@ CONFIG_PCI_DEBUG=y | |||
| 43 | CONFIG_BINFMT_MISC=m | 43 | CONFIG_BINFMT_MISC=m |
| 44 | CONFIG_PM_RUNTIME=y | 44 | CONFIG_PM_RUNTIME=y |
| 45 | CONFIG_PM_DEBUG=y | 45 | CONFIG_PM_DEBUG=y |
| 46 | CONFIG_NET=y | ||
| 46 | CONFIG_PACKET=y | 47 | CONFIG_PACKET=y |
| 47 | CONFIG_UNIX=y | 48 | CONFIG_UNIX=y |
| 48 | CONFIG_XFRM_USER=m | 49 | CONFIG_XFRM_USER=m |
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig index 29d79ae8a823..db029f4ff759 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig | |||
| @@ -20,6 +20,7 @@ CONFIG_MODVERSIONS=y | |||
| 20 | CONFIG_PCI=y | 20 | CONFIG_PCI=y |
| 21 | CONFIG_BINFMT_MISC=m | 21 | CONFIG_BINFMT_MISC=m |
| 22 | CONFIG_PM=y | 22 | CONFIG_PM=y |
| 23 | CONFIG_NET=y | ||
| 23 | CONFIG_PACKET=m | 24 | CONFIG_PACKET=m |
| 24 | CONFIG_UNIX=y | 25 | CONFIG_UNIX=y |
| 25 | CONFIG_NET_KEY=m | 26 | CONFIG_NET_KEY=m |
diff --git a/arch/mips/include/asm/cop2.h b/arch/mips/include/asm/cop2.h index d0352983b94d..51f80bd36fcc 100644 --- a/arch/mips/include/asm/cop2.h +++ b/arch/mips/include/asm/cop2.h | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | extern void octeon_cop2_save(struct octeon_cop2_state *); | 16 | extern void octeon_cop2_save(struct octeon_cop2_state *); |
| 17 | extern void octeon_cop2_restore(struct octeon_cop2_state *); | 17 | extern void octeon_cop2_restore(struct octeon_cop2_state *); |
| 18 | 18 | ||
| 19 | #define cop2_save(r) octeon_cop2_save(r) | 19 | #define cop2_save(r) octeon_cop2_save(&(r)->thread.cp2) |
| 20 | #define cop2_restore(r) octeon_cop2_restore(r) | 20 | #define cop2_restore(r) octeon_cop2_restore(&(r)->thread.cp2) |
| 21 | 21 | ||
| 22 | #define cop2_present 1 | 22 | #define cop2_present 1 |
| 23 | #define cop2_lazy_restore 1 | 23 | #define cop2_lazy_restore 1 |
| @@ -26,26 +26,26 @@ extern void octeon_cop2_restore(struct octeon_cop2_state *); | |||
| 26 | 26 | ||
| 27 | extern void nlm_cop2_save(struct nlm_cop2_state *); | 27 | extern void nlm_cop2_save(struct nlm_cop2_state *); |
| 28 | extern void nlm_cop2_restore(struct nlm_cop2_state *); | 28 | extern void nlm_cop2_restore(struct nlm_cop2_state *); |
| 29 | #define cop2_save(r) nlm_cop2_save(r) | 29 | |
| 30 | #define cop2_restore(r) nlm_cop2_restore(r) | 30 | #define cop2_save(r) nlm_cop2_save(&(r)->thread.cp2) |
| 31 | #define cop2_restore(r) nlm_cop2_restore(&(r)->thread.cp2) | ||
| 31 | 32 | ||
| 32 | #define cop2_present 1 | 33 | #define cop2_present 1 |
| 33 | #define cop2_lazy_restore 0 | 34 | #define cop2_lazy_restore 0 |
| 34 | 35 | ||
| 35 | #elif defined(CONFIG_CPU_LOONGSON3) | 36 | #elif defined(CONFIG_CPU_LOONGSON3) |
| 36 | 37 | ||
| 37 | #define cop2_save(r) | ||
| 38 | #define cop2_restore(r) | ||
| 39 | |||
| 40 | #define cop2_present 1 | 38 | #define cop2_present 1 |
| 41 | #define cop2_lazy_restore 1 | 39 | #define cop2_lazy_restore 1 |
| 40 | #define cop2_save(r) do { (r); } while (0) | ||
| 41 | #define cop2_restore(r) do { (r); } while (0) | ||
| 42 | 42 | ||
| 43 | #else | 43 | #else |
| 44 | 44 | ||
| 45 | #define cop2_present 0 | 45 | #define cop2_present 0 |
| 46 | #define cop2_lazy_restore 0 | 46 | #define cop2_lazy_restore 0 |
| 47 | #define cop2_save(r) | 47 | #define cop2_save(r) do { (r); } while (0) |
| 48 | #define cop2_restore(r) | 48 | #define cop2_restore(r) do { (r); } while (0) |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | enum cu2_ops { | 51 | enum cu2_ops { |
diff --git a/arch/mips/include/asm/mach-ip28/spaces.h b/arch/mips/include/asm/mach-ip28/spaces.h index 5d6a76434d00..c4a912733b65 100644 --- a/arch/mips/include/asm/mach-ip28/spaces.h +++ b/arch/mips/include/asm/mach-ip28/spaces.h | |||
| @@ -11,15 +11,8 @@ | |||
| 11 | #ifndef _ASM_MACH_IP28_SPACES_H | 11 | #ifndef _ASM_MACH_IP28_SPACES_H |
| 12 | #define _ASM_MACH_IP28_SPACES_H | 12 | #define _ASM_MACH_IP28_SPACES_H |
| 13 | 13 | ||
| 14 | #define CAC_BASE _AC(0xa800000000000000, UL) | ||
| 15 | |||
| 16 | #define HIGHMEM_START (~0UL) | ||
| 17 | |||
| 18 | #define PHYS_OFFSET _AC(0x20000000, UL) | 14 | #define PHYS_OFFSET _AC(0x20000000, UL) |
| 19 | 15 | ||
| 20 | #define UNCAC_BASE _AC(0xc0000000, UL) /* 0xa0000000 + PHYS_OFFSET */ | ||
| 21 | #define IO_BASE UNCAC_BASE | ||
| 22 | |||
| 23 | #include <asm/mach-generic/spaces.h> | 16 | #include <asm/mach-generic/spaces.h> |
| 24 | 17 | ||
| 25 | #endif /* _ASM_MACH_IP28_SPACES_H */ | 18 | #endif /* _ASM_MACH_IP28_SPACES_H */ |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index 5699ec3a71af..3be81803595d 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | /* | 38 | /* |
| 39 | * This is used for calculating the real page sizes | 39 | * This is used for calculating the real page sizes |
| 40 | * for FTLB or VTLB + FTLB confugrations. | 40 | * for FTLB or VTLB + FTLB configurations. |
| 41 | */ | 41 | */ |
| 42 | static inline unsigned int page_size_ftlb(unsigned int mmuextdef) | 42 | static inline unsigned int page_size_ftlb(unsigned int mmuextdef) |
| 43 | { | 43 | { |
| @@ -223,7 +223,8 @@ static inline int pfn_valid(unsigned long pfn) | |||
| 223 | 223 | ||
| 224 | #endif | 224 | #endif |
| 225 | 225 | ||
| 226 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) | 226 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys((void *) \ |
| 227 | (kaddr)))) | ||
| 227 | 228 | ||
| 228 | extern int __virt_addr_valid(const volatile void *kaddr); | 229 | extern int __virt_addr_valid(const volatile void *kaddr); |
| 229 | #define virt_addr_valid(kaddr) \ | 230 | #define virt_addr_valid(kaddr) \ |
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index 1e0f20a9cdda..eacf865d21c2 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h | |||
| @@ -37,11 +37,6 @@ extern int __cpu_logical_map[NR_CPUS]; | |||
| 37 | 37 | ||
| 38 | #define NO_PROC_ID (-1) | 38 | #define NO_PROC_ID (-1) |
| 39 | 39 | ||
| 40 | #define topology_physical_package_id(cpu) (cpu_data[cpu].package) | ||
| 41 | #define topology_core_id(cpu) (cpu_data[cpu].core) | ||
| 42 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | ||
| 43 | #define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu]) | ||
| 44 | |||
| 45 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ | 40 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ |
| 46 | #define SMP_CALL_FUNCTION 0x2 | 41 | #define SMP_CALL_FUNCTION 0x2 |
| 47 | /* Octeon - Tell another core to flush its icache */ | 42 | /* Octeon - Tell another core to flush its icache */ |
diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h index 495c1041a2cc..b928b6f898cd 100644 --- a/arch/mips/include/asm/switch_to.h +++ b/arch/mips/include/asm/switch_to.h | |||
| @@ -92,7 +92,7 @@ do { \ | |||
| 92 | KSTK_STATUS(prev) &= ~ST0_CU2; \ | 92 | KSTK_STATUS(prev) &= ~ST0_CU2; \ |
| 93 | __c0_stat = read_c0_status(); \ | 93 | __c0_stat = read_c0_status(); \ |
| 94 | write_c0_status(__c0_stat | ST0_CU2); \ | 94 | write_c0_status(__c0_stat | ST0_CU2); \ |
| 95 | cop2_save(&prev->thread.cp2); \ | 95 | cop2_save(prev); \ |
| 96 | write_c0_status(__c0_stat & ~ST0_CU2); \ | 96 | write_c0_status(__c0_stat & ~ST0_CU2); \ |
| 97 | } \ | 97 | } \ |
| 98 | __clear_software_ll_bit(); \ | 98 | __clear_software_ll_bit(); \ |
| @@ -111,7 +111,7 @@ do { \ | |||
| 111 | (KSTK_STATUS(current) & ST0_CU2)) { \ | 111 | (KSTK_STATUS(current) & ST0_CU2)) { \ |
| 112 | __c0_stat = read_c0_status(); \ | 112 | __c0_stat = read_c0_status(); \ |
| 113 | write_c0_status(__c0_stat | ST0_CU2); \ | 113 | write_c0_status(__c0_stat | ST0_CU2); \ |
| 114 | cop2_restore(¤t->thread.cp2); \ | 114 | cop2_restore(current); \ |
| 115 | write_c0_status(__c0_stat & ~ST0_CU2); \ | 115 | write_c0_status(__c0_stat & ~ST0_CU2); \ |
| 116 | } \ | 116 | } \ |
| 117 | if (cpu_has_dsp) \ | 117 | if (cpu_has_dsp) \ |
diff --git a/arch/mips/include/asm/topology.h b/arch/mips/include/asm/topology.h index 20ea4859c822..3e307ec2afba 100644 --- a/arch/mips/include/asm/topology.h +++ b/arch/mips/include/asm/topology.h | |||
| @@ -9,5 +9,13 @@ | |||
| 9 | #define __ASM_TOPOLOGY_H | 9 | #define __ASM_TOPOLOGY_H |
| 10 | 10 | ||
| 11 | #include <topology.h> | 11 | #include <topology.h> |
| 12 | #include <linux/smp.h> | ||
| 13 | |||
| 14 | #ifdef CONFIG_SMP | ||
| 15 | #define topology_physical_package_id(cpu) (cpu_data[cpu].package) | ||
| 16 | #define topology_core_id(cpu) (cpu_data[cpu].core) | ||
| 17 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | ||
| 18 | #define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu]) | ||
| 19 | #endif | ||
| 12 | 20 | ||
| 13 | #endif /* __ASM_TOPOLOGY_H */ | 21 | #endif /* __ASM_TOPOLOGY_H */ |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index 9bc13eaf9d67..fdb4923777d1 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
| @@ -373,16 +373,18 @@ | |||
| 373 | #define __NR_sched_getattr (__NR_Linux + 350) | 373 | #define __NR_sched_getattr (__NR_Linux + 350) |
| 374 | #define __NR_renameat2 (__NR_Linux + 351) | 374 | #define __NR_renameat2 (__NR_Linux + 351) |
| 375 | #define __NR_seccomp (__NR_Linux + 352) | 375 | #define __NR_seccomp (__NR_Linux + 352) |
| 376 | #define __NR_getrandom (__NR_Linux + 353) | ||
| 377 | #define __NR_memfd_create (__NR_Linux + 354) | ||
| 376 | 378 | ||
| 377 | /* | 379 | /* |
| 378 | * Offset of the last Linux o32 flavoured syscall | 380 | * Offset of the last Linux o32 flavoured syscall |
| 379 | */ | 381 | */ |
| 380 | #define __NR_Linux_syscalls 352 | 382 | #define __NR_Linux_syscalls 354 |
| 381 | 383 | ||
| 382 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 384 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 383 | 385 | ||
| 384 | #define __NR_O32_Linux 4000 | 386 | #define __NR_O32_Linux 4000 |
| 385 | #define __NR_O32_Linux_syscalls 352 | 387 | #define __NR_O32_Linux_syscalls 354 |
| 386 | 388 | ||
| 387 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 389 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 388 | 390 | ||
| @@ -703,16 +705,18 @@ | |||
| 703 | #define __NR_sched_getattr (__NR_Linux + 310) | 705 | #define __NR_sched_getattr (__NR_Linux + 310) |
| 704 | #define __NR_renameat2 (__NR_Linux + 311) | 706 | #define __NR_renameat2 (__NR_Linux + 311) |
| 705 | #define __NR_seccomp (__NR_Linux + 312) | 707 | #define __NR_seccomp (__NR_Linux + 312) |
| 708 | #define __NR_getrandom (__NR_Linux + 313) | ||
| 709 | #define __NR_memfd_create (__NR_Linux + 314) | ||
| 706 | 710 | ||
| 707 | /* | 711 | /* |
| 708 | * Offset of the last Linux 64-bit flavoured syscall | 712 | * Offset of the last Linux 64-bit flavoured syscall |
| 709 | */ | 713 | */ |
| 710 | #define __NR_Linux_syscalls 312 | 714 | #define __NR_Linux_syscalls 314 |
| 711 | 715 | ||
| 712 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 716 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 713 | 717 | ||
| 714 | #define __NR_64_Linux 5000 | 718 | #define __NR_64_Linux 5000 |
| 715 | #define __NR_64_Linux_syscalls 312 | 719 | #define __NR_64_Linux_syscalls 314 |
| 716 | 720 | ||
| 717 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 721 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 718 | 722 | ||
| @@ -1037,15 +1041,17 @@ | |||
| 1037 | #define __NR_sched_getattr (__NR_Linux + 314) | 1041 | #define __NR_sched_getattr (__NR_Linux + 314) |
| 1038 | #define __NR_renameat2 (__NR_Linux + 315) | 1042 | #define __NR_renameat2 (__NR_Linux + 315) |
| 1039 | #define __NR_seccomp (__NR_Linux + 316) | 1043 | #define __NR_seccomp (__NR_Linux + 316) |
| 1044 | #define __NR_getrandom (__NR_Linux + 317) | ||
| 1045 | #define __NR_memfd_create (__NR_Linux + 318) | ||
| 1040 | 1046 | ||
| 1041 | /* | 1047 | /* |
| 1042 | * Offset of the last N32 flavoured syscall | 1048 | * Offset of the last N32 flavoured syscall |
| 1043 | */ | 1049 | */ |
| 1044 | #define __NR_Linux_syscalls 316 | 1050 | #define __NR_Linux_syscalls 318 |
| 1045 | 1051 | ||
| 1046 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1052 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 1047 | 1053 | ||
| 1048 | #define __NR_N32_Linux 6000 | 1054 | #define __NR_N32_Linux 6000 |
| 1049 | #define __NR_N32_Linux_syscalls 316 | 1055 | #define __NR_N32_Linux_syscalls 318 |
| 1050 | 1056 | ||
| 1051 | #endif /* _UAPI_ASM_UNISTD_H */ | 1057 | #endif /* _UAPI_ASM_UNISTD_H */ |
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c index 992e18474da5..50980bf3983e 100644 --- a/arch/mips/kernel/machine_kexec.c +++ b/arch/mips/kernel/machine_kexec.c | |||
| @@ -71,8 +71,12 @@ machine_kexec(struct kimage *image) | |||
| 71 | kexec_start_address = | 71 | kexec_start_address = |
| 72 | (unsigned long) phys_to_virt(image->start); | 72 | (unsigned long) phys_to_virt(image->start); |
| 73 | 73 | ||
| 74 | kexec_indirection_page = | 74 | if (image->type == KEXEC_TYPE_DEFAULT) { |
| 75 | (unsigned long) phys_to_virt(image->head & PAGE_MASK); | 75 | kexec_indirection_page = |
| 76 | (unsigned long) phys_to_virt(image->head & PAGE_MASK); | ||
| 77 | } else { | ||
| 78 | kexec_indirection_page = (unsigned long)&image->head; | ||
| 79 | } | ||
| 76 | 80 | ||
| 77 | memcpy((void*)reboot_code_buffer, relocate_new_kernel, | 81 | memcpy((void*)reboot_code_buffer, relocate_new_kernel, |
| 78 | relocate_new_kernel_size); | 82 | relocate_new_kernel_size); |
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S index 5d25462de8a6..2f7c734771f4 100644 --- a/arch/mips/kernel/mcount.S +++ b/arch/mips/kernel/mcount.S | |||
| @@ -129,7 +129,11 @@ NESTED(_mcount, PT_SIZE, ra) | |||
| 129 | nop | 129 | nop |
| 130 | #endif | 130 | #endif |
| 131 | b ftrace_stub | 131 | b ftrace_stub |
| 132 | #ifdef CONFIG_32BIT | ||
| 133 | addiu sp, sp, 8 | ||
| 134 | #else | ||
| 132 | nop | 135 | nop |
| 136 | #endif | ||
| 133 | 137 | ||
| 134 | static_trace: | 138 | static_trace: |
| 135 | MCOUNT_SAVE_REGS | 139 | MCOUNT_SAVE_REGS |
| @@ -139,6 +143,9 @@ static_trace: | |||
| 139 | move a1, AT /* arg2: parent's return address */ | 143 | move a1, AT /* arg2: parent's return address */ |
| 140 | 144 | ||
| 141 | MCOUNT_RESTORE_REGS | 145 | MCOUNT_RESTORE_REGS |
| 146 | #ifdef CONFIG_32BIT | ||
| 147 | addiu sp, sp, 8 | ||
| 148 | #endif | ||
| 142 | .globl ftrace_stub | 149 | .globl ftrace_stub |
| 143 | ftrace_stub: | 150 | ftrace_stub: |
| 144 | RETURN_BACK | 151 | RETURN_BACK |
| @@ -183,6 +190,11 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra) | |||
| 183 | jal prepare_ftrace_return | 190 | jal prepare_ftrace_return |
| 184 | nop | 191 | nop |
| 185 | MCOUNT_RESTORE_REGS | 192 | MCOUNT_RESTORE_REGS |
| 193 | #ifndef CONFIG_DYNAMIC_FTRACE | ||
| 194 | #ifdef CONFIG_32BIT | ||
| 195 | addiu sp, sp, 8 | ||
| 196 | #endif | ||
| 197 | #endif | ||
| 186 | RETURN_BACK | 198 | RETURN_BACK |
| 187 | END(ftrace_graph_caller) | 199 | END(ftrace_graph_caller) |
| 188 | 200 | ||
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index f93b4cbec739..744cd10ba599 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -577,3 +577,5 @@ EXPORT(sys_call_table) | |||
| 577 | PTR sys_sched_getattr /* 4350 */ | 577 | PTR sys_sched_getattr /* 4350 */ |
| 578 | PTR sys_renameat2 | 578 | PTR sys_renameat2 |
| 579 | PTR sys_seccomp | 579 | PTR sys_seccomp |
| 580 | PTR sys_getrandom | ||
| 581 | PTR sys_memfd_create | ||
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 03ebd9979ad2..002b1bc09c38 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -432,4 +432,6 @@ EXPORT(sys_call_table) | |||
| 432 | PTR sys_sched_getattr /* 5310 */ | 432 | PTR sys_sched_getattr /* 5310 */ |
| 433 | PTR sys_renameat2 | 433 | PTR sys_renameat2 |
| 434 | PTR sys_seccomp | 434 | PTR sys_seccomp |
| 435 | PTR sys_getrandom | ||
| 436 | PTR sys_memfd_create | ||
| 435 | .size sys_call_table,.-sys_call_table | 437 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index ebc9228e2e15..ca6cbbe9805b 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -425,4 +425,6 @@ EXPORT(sysn32_call_table) | |||
| 425 | PTR sys_sched_getattr | 425 | PTR sys_sched_getattr |
| 426 | PTR sys_renameat2 /* 6315 */ | 426 | PTR sys_renameat2 /* 6315 */ |
| 427 | PTR sys_seccomp | 427 | PTR sys_seccomp |
| 428 | PTR sys_getrandom | ||
| 429 | PTR sys_memfd_create | ||
| 428 | .size sysn32_call_table,.-sysn32_call_table | 430 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 25bb8400156d..9e10d11fbb84 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -562,4 +562,6 @@ EXPORT(sys32_call_table) | |||
| 562 | PTR sys_sched_getattr /* 4350 */ | 562 | PTR sys_sched_getattr /* 4350 */ |
| 563 | PTR sys_renameat2 | 563 | PTR sys_renameat2 |
| 564 | PTR sys_seccomp | 564 | PTR sys_seccomp |
| 565 | PTR sys_getrandom | ||
| 566 | PTR sys_memfd_create | ||
| 565 | .size sys32_call_table,.-sys32_call_table | 567 | .size sys32_call_table,.-sys32_call_table |
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index bf0fc6b16ad9..7a4727795a70 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c | |||
| @@ -650,9 +650,9 @@ static inline int cop1_64bit(struct pt_regs *xcp) | |||
| 650 | #define SIFROMREG(si, x) \ | 650 | #define SIFROMREG(si, x) \ |
| 651 | do { \ | 651 | do { \ |
| 652 | if (cop1_64bit(xcp)) \ | 652 | if (cop1_64bit(xcp)) \ |
| 653 | (si) = get_fpr32(&ctx->fpr[x], 0); \ | 653 | (si) = (int)get_fpr32(&ctx->fpr[x], 0); \ |
| 654 | else \ | 654 | else \ |
| 655 | (si) = get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1); \ | 655 | (si) = (int)get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1); \ |
| 656 | } while (0) | 656 | } while (0) |
| 657 | 657 | ||
| 658 | #define SITOREG(si, x) \ | 658 | #define SITOREG(si, x) \ |
| @@ -667,7 +667,7 @@ do { \ | |||
| 667 | } \ | 667 | } \ |
| 668 | } while (0) | 668 | } while (0) |
| 669 | 669 | ||
| 670 | #define SIFROMHREG(si, x) ((si) = get_fpr32(&ctx->fpr[x], 1)) | 670 | #define SIFROMHREG(si, x) ((si) = (int)get_fpr32(&ctx->fpr[x], 1)) |
| 671 | 671 | ||
| 672 | #define SITOHREG(si, x) \ | 672 | #define SITOHREG(si, x) \ |
| 673 | do { \ | 673 | do { \ |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 571aab064936..f42e35e42790 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | */ | 53 | */ |
| 54 | unsigned long empty_zero_page, zero_page_mask; | 54 | unsigned long empty_zero_page, zero_page_mask; |
| 55 | EXPORT_SYMBOL_GPL(empty_zero_page); | 55 | EXPORT_SYMBOL_GPL(empty_zero_page); |
| 56 | EXPORT_SYMBOL(zero_page_mask); | ||
| 56 | 57 | ||
| 57 | /* | 58 | /* |
| 58 | * Not static inline because used by IP27 special magic initialization code | 59 | * Not static inline because used by IP27 special magic initialization code |
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c index 05a56619ece2..9f7ecbda250c 100644 --- a/arch/mips/net/bpf_jit.c +++ b/arch/mips/net/bpf_jit.c | |||
| @@ -793,6 +793,7 @@ static int build_body(struct jit_ctx *ctx) | |||
| 793 | const struct sock_filter *inst; | 793 | const struct sock_filter *inst; |
| 794 | unsigned int i, off, load_order, condt; | 794 | unsigned int i, off, load_order, condt; |
| 795 | u32 k, b_off __maybe_unused; | 795 | u32 k, b_off __maybe_unused; |
| 796 | int tmp; | ||
| 796 | 797 | ||
| 797 | for (i = 0; i < prog->len; i++) { | 798 | for (i = 0; i < prog->len; i++) { |
| 798 | u16 code; | 799 | u16 code; |
| @@ -1332,9 +1333,9 @@ jmp_cmp: | |||
| 1332 | case BPF_ANC | SKF_AD_PKTTYPE: | 1333 | case BPF_ANC | SKF_AD_PKTTYPE: |
| 1333 | ctx->flags |= SEEN_SKB; | 1334 | ctx->flags |= SEEN_SKB; |
| 1334 | 1335 | ||
| 1335 | off = pkt_type_offset(); | 1336 | tmp = off = pkt_type_offset(); |
| 1336 | 1337 | ||
| 1337 | if (off < 0) | 1338 | if (tmp < 0) |
| 1338 | return -1; | 1339 | return -1; |
| 1339 | emit_load_byte(r_tmp, r_skb, off, ctx); | 1340 | emit_load_byte(r_tmp, r_skb, off, ctx); |
| 1340 | /* Keep only the last 3 bits */ | 1341 | /* Keep only the last 3 bits */ |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 6e75e2030927..1554a6f2a5bb 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
| @@ -321,6 +321,22 @@ source "fs/Kconfig" | |||
| 321 | 321 | ||
| 322 | source "arch/parisc/Kconfig.debug" | 322 | source "arch/parisc/Kconfig.debug" |
| 323 | 323 | ||
| 324 | config SECCOMP | ||
| 325 | def_bool y | ||
| 326 | prompt "Enable seccomp to safely compute untrusted bytecode" | ||
| 327 | ---help--- | ||
| 328 | This kernel feature is useful for number crunching applications | ||
| 329 | that may need to compute untrusted bytecode during their | ||
| 330 | execution. By using pipes or other transports made available to | ||
| 331 | the process as file descriptors supporting the read/write | ||
| 332 | syscalls, it's possible to isolate those applications in | ||
| 333 | their own address space using seccomp. Once seccomp is | ||
| 334 | enabled via prctl(PR_SET_SECCOMP), it cannot be disabled | ||
| 335 | and the task is only allowed to execute a few safe syscalls | ||
| 336 | defined by each seccomp mode. | ||
| 337 | |||
| 338 | If unsure, say Y. Only embedded should say N here. | ||
| 339 | |||
| 324 | source "security/Kconfig" | 340 | source "security/Kconfig" |
| 325 | 341 | ||
| 326 | source "crypto/Kconfig" | 342 | source "crypto/Kconfig" |
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 7187664034c3..5db8882f732c 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
| @@ -48,7 +48,12 @@ cflags-y := -pipe | |||
| 48 | 48 | ||
| 49 | # These flags should be implied by an hppa-linux configuration, but they | 49 | # These flags should be implied by an hppa-linux configuration, but they |
| 50 | # are not in gcc 3.2. | 50 | # are not in gcc 3.2. |
| 51 | cflags-y += -mno-space-regs -mfast-indirect-calls | 51 | cflags-y += -mno-space-regs |
| 52 | |||
| 53 | # -mfast-indirect-calls is only relevant for 32-bit kernels. | ||
| 54 | ifndef CONFIG_64BIT | ||
| 55 | cflags-y += -mfast-indirect-calls | ||
| 56 | endif | ||
| 52 | 57 | ||
| 53 | # Currently we save and restore fpregs on all kernel entry/interruption paths. | 58 | # Currently we save and restore fpregs on all kernel entry/interruption paths. |
| 54 | # If that gets optimized, we might need to disable the use of fpregs in the | 59 | # If that gets optimized, we might need to disable the use of fpregs in the |
diff --git a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig index 90025322b75e..0490199d7b15 100644 --- a/arch/parisc/configs/a500_defconfig +++ b/arch/parisc/configs/a500_defconfig | |||
| @@ -31,6 +31,7 @@ CONFIG_PD6729=m | |||
| 31 | CONFIG_I82092=m | 31 | CONFIG_I82092=m |
| 32 | # CONFIG_SUPERIO is not set | 32 | # CONFIG_SUPERIO is not set |
| 33 | # CONFIG_CHASSIS_LCD_LED is not set | 33 | # CONFIG_CHASSIS_LCD_LED is not set |
| 34 | CONFIG_NET=y | ||
| 34 | CONFIG_PACKET=y | 35 | CONFIG_PACKET=y |
| 35 | CONFIG_UNIX=y | 36 | CONFIG_UNIX=y |
| 36 | CONFIG_XFRM_USER=m | 37 | CONFIG_XFRM_USER=m |
diff --git a/arch/parisc/configs/c8000_defconfig b/arch/parisc/configs/c8000_defconfig index 8249ac9d9cfc..269c23d23fcb 100644 --- a/arch/parisc/configs/c8000_defconfig +++ b/arch/parisc/configs/c8000_defconfig | |||
| @@ -33,6 +33,7 @@ CONFIG_PCI_LBA=y | |||
| 33 | # CONFIG_PDC_CHASSIS_WARN is not set | 33 | # CONFIG_PDC_CHASSIS_WARN is not set |
| 34 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 34 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
| 35 | CONFIG_BINFMT_MISC=m | 35 | CONFIG_BINFMT_MISC=m |
| 36 | CONFIG_NET=y | ||
| 36 | CONFIG_PACKET=y | 37 | CONFIG_PACKET=y |
| 37 | CONFIG_UNIX=y | 38 | CONFIG_UNIX=y |
| 38 | CONFIG_XFRM_USER=m | 39 | CONFIG_XFRM_USER=m |
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index d9dc6cd3b7d2..e5c4da035810 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c | |||
| @@ -456,7 +456,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2) | |||
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | /* String could be altered by userspace after strlen_user() */ | 458 | /* String could be altered by userspace after strlen_user() */ |
| 459 | fsname[len] = '\0'; | 459 | fsname[len - 1] = '\0'; |
| 460 | 460 | ||
| 461 | printk(KERN_DEBUG "that is '%s' as (char *)\n", fsname); | 461 | printk(KERN_DEBUG "that is '%s' as (char *)\n", fsname); |
| 462 | if ( !strcmp(fsname, "hfs") ) { | 462 | if ( !strcmp(fsname, "hfs") ) { |
diff --git a/arch/parisc/include/asm/seccomp.h b/arch/parisc/include/asm/seccomp.h new file mode 100644 index 000000000000..015f7887aa29 --- /dev/null +++ b/arch/parisc/include/asm/seccomp.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef _ASM_PARISC_SECCOMP_H | ||
| 2 | #define _ASM_PARISC_SECCOMP_H | ||
| 3 | |||
| 4 | #include <linux/unistd.h> | ||
| 5 | |||
| 6 | #define __NR_seccomp_read __NR_read | ||
| 7 | #define __NR_seccomp_write __NR_write | ||
| 8 | #define __NR_seccomp_exit __NR_exit | ||
| 9 | #define __NR_seccomp_sigreturn __NR_rt_sigreturn | ||
| 10 | |||
| 11 | #define __NR_seccomp_read_32 __NR_read | ||
| 12 | #define __NR_seccomp_write_32 __NR_write | ||
| 13 | #define __NR_seccomp_exit_32 __NR_exit | ||
| 14 | #define __NR_seccomp_sigreturn_32 __NR_rt_sigreturn | ||
| 15 | |||
| 16 | #endif /* _ASM_PARISC_SECCOMP_H */ | ||
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h index 4b9b10ce1f9d..a84611835549 100644 --- a/arch/parisc/include/asm/thread_info.h +++ b/arch/parisc/include/asm/thread_info.h | |||
| @@ -60,6 +60,7 @@ struct thread_info { | |||
| 60 | #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */ | 60 | #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */ |
| 61 | #define TIF_SINGLESTEP 9 /* single stepping? */ | 61 | #define TIF_SINGLESTEP 9 /* single stepping? */ |
| 62 | #define TIF_BLOCKSTEP 10 /* branch stepping? */ | 62 | #define TIF_BLOCKSTEP 10 /* branch stepping? */ |
| 63 | #define TIF_SECCOMP 11 /* secure computing */ | ||
| 63 | 64 | ||
| 64 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 65 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
| 65 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 66 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
| @@ -70,11 +71,13 @@ struct thread_info { | |||
| 70 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 71 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
| 71 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 72 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
| 72 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) | 73 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) |
| 74 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | ||
| 73 | 75 | ||
| 74 | #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \ | 76 | #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \ |
| 75 | _TIF_NEED_RESCHED) | 77 | _TIF_NEED_RESCHED) |
| 76 | #define _TIF_SYSCALL_TRACE_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ | 78 | #define _TIF_SYSCALL_TRACE_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ |
| 77 | _TIF_BLOCKSTEP | _TIF_SYSCALL_AUDIT) | 79 | _TIF_BLOCKSTEP | _TIF_SYSCALL_AUDIT | \ |
| 80 | _TIF_SECCOMP) | ||
| 78 | 81 | ||
| 79 | #ifdef CONFIG_64BIT | 82 | #ifdef CONFIG_64BIT |
| 80 | # ifdef CONFIG_COMPAT | 83 | # ifdef CONFIG_COMPAT |
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h index 47e0e21d2272..8667f18be238 100644 --- a/arch/parisc/include/uapi/asm/unistd.h +++ b/arch/parisc/include/uapi/asm/unistd.h | |||
| @@ -830,8 +830,11 @@ | |||
| 830 | #define __NR_sched_getattr (__NR_Linux + 335) | 830 | #define __NR_sched_getattr (__NR_Linux + 335) |
| 831 | #define __NR_utimes (__NR_Linux + 336) | 831 | #define __NR_utimes (__NR_Linux + 336) |
| 832 | #define __NR_renameat2 (__NR_Linux + 337) | 832 | #define __NR_renameat2 (__NR_Linux + 337) |
| 833 | #define __NR_seccomp (__NR_Linux + 338) | ||
| 834 | #define __NR_getrandom (__NR_Linux + 339) | ||
| 835 | #define __NR_memfd_create (__NR_Linux + 340) | ||
| 833 | 836 | ||
| 834 | #define __NR_Linux_syscalls (__NR_renameat2 + 1) | 837 | #define __NR_Linux_syscalls (__NR_memfd_create + 1) |
| 835 | 838 | ||
| 836 | 839 | ||
| 837 | #define __IGNORE_select /* newselect */ | 840 | #define __IGNORE_select /* newselect */ |
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index e842ee233db4..92438c21d453 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/user.h> | 17 | #include <linux/user.h> |
| 18 | #include <linux/personality.h> | 18 | #include <linux/personality.h> |
| 19 | #include <linux/security.h> | 19 | #include <linux/security.h> |
| 20 | #include <linux/seccomp.h> | ||
| 20 | #include <linux/compat.h> | 21 | #include <linux/compat.h> |
| 21 | #include <linux/signal.h> | 22 | #include <linux/signal.h> |
| 22 | #include <linux/audit.h> | 23 | #include <linux/audit.h> |
| @@ -270,6 +271,9 @@ long do_syscall_trace_enter(struct pt_regs *regs) | |||
| 270 | { | 271 | { |
| 271 | long ret = 0; | 272 | long ret = 0; |
| 272 | 273 | ||
| 274 | /* Do the secure computing check first. */ | ||
| 275 | secure_computing_strict(regs->gr[20]); | ||
| 276 | |||
| 273 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | 277 | if (test_thread_flag(TIF_SYSCALL_TRACE) && |
| 274 | tracehook_report_syscall_entry(regs)) | 278 | tracehook_report_syscall_entry(regs)) |
| 275 | ret = -1L; | 279 | ret = -1L; |
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 838786011037..7ef22e3387e0 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
| @@ -74,7 +74,7 @@ ENTRY(linux_gateway_page) | |||
| 74 | /* ADDRESS 0xb0 to 0xb8, lws uses two insns for entry */ | 74 | /* ADDRESS 0xb0 to 0xb8, lws uses two insns for entry */ |
| 75 | /* Light-weight-syscall entry must always be located at 0xb0 */ | 75 | /* Light-weight-syscall entry must always be located at 0xb0 */ |
| 76 | /* WARNING: Keep this number updated with table size changes */ | 76 | /* WARNING: Keep this number updated with table size changes */ |
| 77 | #define __NR_lws_entries (2) | 77 | #define __NR_lws_entries (3) |
| 78 | 78 | ||
| 79 | lws_entry: | 79 | lws_entry: |
| 80 | gate lws_start, %r0 /* increase privilege */ | 80 | gate lws_start, %r0 /* increase privilege */ |
| @@ -502,7 +502,7 @@ lws_exit: | |||
| 502 | 502 | ||
| 503 | 503 | ||
| 504 | /*************************************************** | 504 | /*************************************************** |
| 505 | Implementing CAS as an atomic operation: | 505 | Implementing 32bit CAS as an atomic operation: |
| 506 | 506 | ||
| 507 | %r26 - Address to examine | 507 | %r26 - Address to examine |
| 508 | %r25 - Old value to check (old) | 508 | %r25 - Old value to check (old) |
| @@ -659,6 +659,230 @@ cas_action: | |||
| 659 | ASM_EXCEPTIONTABLE_ENTRY(2b-linux_gateway_page, 3b-linux_gateway_page) | 659 | ASM_EXCEPTIONTABLE_ENTRY(2b-linux_gateway_page, 3b-linux_gateway_page) |
| 660 | 660 | ||
| 661 | 661 | ||
| 662 | /*************************************************** | ||
| 663 | New CAS implementation which uses pointers and variable size | ||
| 664 | information. The value pointed by old and new MUST NOT change | ||
| 665 | while performing CAS. The lock only protect the value at %r26. | ||
| 666 | |||
| 667 | %r26 - Address to examine | ||
| 668 | %r25 - Pointer to the value to check (old) | ||
| 669 | %r24 - Pointer to the value to set (new) | ||
| 670 | %r23 - Size of the variable (0/1/2/3 for 8/16/32/64 bit) | ||
| 671 | %r28 - Return non-zero on failure | ||
| 672 | %r21 - Kernel error code | ||
| 673 | |||
| 674 | %r21 has the following meanings: | ||
| 675 | |||
| 676 | EAGAIN - CAS is busy, ldcw failed, try again. | ||
| 677 | EFAULT - Read or write failed. | ||
| 678 | |||
| 679 | Scratch: r20, r22, r28, r29, r1, fr4 (32bit for 64bit CAS only) | ||
| 680 | |||
| 681 | ****************************************************/ | ||
| 682 | |||
| 683 | /* ELF32 Process entry path */ | ||
| 684 | lws_compare_and_swap_2: | ||
| 685 | #ifdef CONFIG_64BIT | ||
| 686 | /* Clip the input registers */ | ||
| 687 | depdi 0, 31, 32, %r26 | ||
| 688 | depdi 0, 31, 32, %r25 | ||
| 689 | depdi 0, 31, 32, %r24 | ||
| 690 | depdi 0, 31, 32, %r23 | ||
| 691 | #endif | ||
| 692 | |||
| 693 | /* Check the validity of the size pointer */ | ||
| 694 | subi,>>= 4, %r23, %r0 | ||
| 695 | b,n lws_exit_nosys | ||
| 696 | |||
| 697 | /* Jump to the functions which will load the old and new values into | ||
| 698 | registers depending on the their size */ | ||
| 699 | shlw %r23, 2, %r29 | ||
| 700 | blr %r29, %r0 | ||
| 701 | nop | ||
| 702 | |||
| 703 | /* 8bit load */ | ||
| 704 | 4: ldb 0(%sr3,%r25), %r25 | ||
| 705 | b cas2_lock_start | ||
| 706 | 5: ldb 0(%sr3,%r24), %r24 | ||
| 707 | nop | ||
| 708 | nop | ||
| 709 | nop | ||
| 710 | nop | ||
| 711 | nop | ||
| 712 | |||
| 713 | /* 16bit load */ | ||
| 714 | 6: ldh 0(%sr3,%r25), %r25 | ||
| 715 | b cas2_lock_start | ||
| 716 | 7: ldh 0(%sr3,%r24), %r24 | ||
| 717 | nop | ||
| 718 | nop | ||
| 719 | nop | ||
| 720 | nop | ||
| 721 | nop | ||
| 722 | |||
| 723 | /* 32bit load */ | ||
| 724 | 8: ldw 0(%sr3,%r25), %r25 | ||
| 725 | b cas2_lock_start | ||
| 726 | 9: ldw 0(%sr3,%r24), %r24 | ||
| 727 | nop | ||
| 728 | nop | ||
| 729 | nop | ||
| 730 | nop | ||
| 731 | nop | ||
| 732 | |||
| 733 | /* 64bit load */ | ||
| 734 | #ifdef CONFIG_64BIT | ||
| 735 | 10: ldd 0(%sr3,%r25), %r25 | ||
| 736 | 11: ldd 0(%sr3,%r24), %r24 | ||
| 737 | #else | ||
| 738 | /* Load new value into r22/r23 - high/low */ | ||
| 739 | 10: ldw 0(%sr3,%r25), %r22 | ||
| 740 | 11: ldw 4(%sr3,%r25), %r23 | ||
| 741 | /* Load new value into fr4 for atomic store later */ | ||
| 742 | 12: flddx 0(%sr3,%r24), %fr4 | ||
| 743 | #endif | ||
| 744 | |||
| 745 | cas2_lock_start: | ||
| 746 | /* Load start of lock table */ | ||
| 747 | ldil L%lws_lock_start, %r20 | ||
| 748 | ldo R%lws_lock_start(%r20), %r28 | ||
| 749 | |||
| 750 | /* Extract four bits from r26 and hash lock (Bits 4-7) */ | ||
| 751 | extru %r26, 27, 4, %r20 | ||
| 752 | |||
| 753 | /* Find lock to use, the hash is either one of 0 to | ||
| 754 | 15, multiplied by 16 (keep it 16-byte aligned) | ||
| 755 | and add to the lock table offset. */ | ||
| 756 | shlw %r20, 4, %r20 | ||
| 757 | add %r20, %r28, %r20 | ||
| 758 | |||
| 759 | rsm PSW_SM_I, %r0 /* Disable interrupts */ | ||
| 760 | /* COW breaks can cause contention on UP systems */ | ||
| 761 | LDCW 0(%sr2,%r20), %r28 /* Try to acquire the lock */ | ||
| 762 | cmpb,<>,n %r0, %r28, cas2_action /* Did we get it? */ | ||
| 763 | cas2_wouldblock: | ||
| 764 | ldo 2(%r0), %r28 /* 2nd case */ | ||
| 765 | ssm PSW_SM_I, %r0 | ||
| 766 | b lws_exit /* Contended... */ | ||
| 767 | ldo -EAGAIN(%r0), %r21 /* Spin in userspace */ | ||
| 768 | |||
| 769 | /* | ||
| 770 | prev = *addr; | ||
| 771 | if ( prev == old ) | ||
| 772 | *addr = new; | ||
| 773 | return prev; | ||
| 774 | */ | ||
| 775 | |||
| 776 | /* NOTES: | ||
| 777 | This all works becuse intr_do_signal | ||
| 778 | and schedule both check the return iasq | ||
| 779 | and see that we are on the kernel page | ||
| 780 | so this process is never scheduled off | ||
| 781 | or is ever sent any signal of any sort, | ||
| 782 | thus it is wholly atomic from usrspaces | ||
| 783 | perspective | ||
| 784 | */ | ||
| 785 | cas2_action: | ||
| 786 | /* Jump to the correct function */ | ||
| 787 | blr %r29, %r0 | ||
| 788 | /* Set %r28 as non-zero for now */ | ||
| 789 | ldo 1(%r0),%r28 | ||
| 790 | |||
| 791 | /* 8bit CAS */ | ||
| 792 | 13: ldb,ma 0(%sr3,%r26), %r29 | ||
| 793 | sub,= %r29, %r25, %r0 | ||
| 794 | b,n cas2_end | ||
| 795 | 14: stb,ma %r24, 0(%sr3,%r26) | ||
| 796 | b cas2_end | ||
| 797 | copy %r0, %r28 | ||
| 798 | nop | ||
| 799 | nop | ||
| 800 | |||
| 801 | /* 16bit CAS */ | ||
| 802 | 15: ldh,ma 0(%sr3,%r26), %r29 | ||
| 803 | sub,= %r29, %r25, %r0 | ||
| 804 | b,n cas2_end | ||
| 805 | 16: sth,ma %r24, 0(%sr3,%r26) | ||
| 806 | b cas2_end | ||
| 807 | copy %r0, %r28 | ||
| 808 | nop | ||
| 809 | nop | ||
| 810 | |||
| 811 | /* 32bit CAS */ | ||
| 812 | 17: ldw,ma 0(%sr3,%r26), %r29 | ||
| 813 | sub,= %r29, %r25, %r0 | ||
| 814 | b,n cas2_end | ||
| 815 | 18: stw,ma %r24, 0(%sr3,%r26) | ||
| 816 | b cas2_end | ||
| 817 | copy %r0, %r28 | ||
| 818 | nop | ||
| 819 | nop | ||
| 820 | |||
| 821 | /* 64bit CAS */ | ||
| 822 | #ifdef CONFIG_64BIT | ||
| 823 | 19: ldd,ma 0(%sr3,%r26), %r29 | ||
| 824 | sub,= %r29, %r25, %r0 | ||
| 825 | b,n cas2_end | ||
| 826 | 20: std,ma %r24, 0(%sr3,%r26) | ||
| 827 | copy %r0, %r28 | ||
| 828 | #else | ||
| 829 | /* Compare first word */ | ||
| 830 | 19: ldw,ma 0(%sr3,%r26), %r29 | ||
| 831 | sub,= %r29, %r22, %r0 | ||
| 832 | b,n cas2_end | ||
| 833 | /* Compare second word */ | ||
| 834 | 20: ldw,ma 4(%sr3,%r26), %r29 | ||
| 835 | sub,= %r29, %r23, %r0 | ||
| 836 | b,n cas2_end | ||
| 837 | /* Perform the store */ | ||
| 838 | 21: fstdx %fr4, 0(%sr3,%r26) | ||
| 839 | copy %r0, %r28 | ||
| 840 | #endif | ||
| 841 | |||
| 842 | cas2_end: | ||
| 843 | /* Free lock */ | ||
| 844 | stw,ma %r20, 0(%sr2,%r20) | ||
| 845 | /* Enable interrupts */ | ||
| 846 | ssm PSW_SM_I, %r0 | ||
| 847 | /* Return to userspace, set no error */ | ||
| 848 | b lws_exit | ||
| 849 | copy %r0, %r21 | ||
| 850 | |||
| 851 | 22: | ||
| 852 | /* Error occurred on load or store */ | ||
| 853 | /* Free lock */ | ||
| 854 | stw %r20, 0(%sr2,%r20) | ||
| 855 | ssm PSW_SM_I, %r0 | ||
| 856 | ldo 1(%r0),%r28 | ||
| 857 | b lws_exit | ||
| 858 | ldo -EFAULT(%r0),%r21 /* set errno */ | ||
| 859 | nop | ||
| 860 | nop | ||
| 861 | nop | ||
| 862 | |||
| 863 | /* Exception table entries, for the load and store, return EFAULT. | ||
| 864 | Each of the entries must be relocated. */ | ||
| 865 | ASM_EXCEPTIONTABLE_ENTRY(4b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 866 | ASM_EXCEPTIONTABLE_ENTRY(5b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 867 | ASM_EXCEPTIONTABLE_ENTRY(6b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 868 | ASM_EXCEPTIONTABLE_ENTRY(7b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 869 | ASM_EXCEPTIONTABLE_ENTRY(8b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 870 | ASM_EXCEPTIONTABLE_ENTRY(9b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 871 | ASM_EXCEPTIONTABLE_ENTRY(10b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 872 | ASM_EXCEPTIONTABLE_ENTRY(11b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 873 | ASM_EXCEPTIONTABLE_ENTRY(13b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 874 | ASM_EXCEPTIONTABLE_ENTRY(14b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 875 | ASM_EXCEPTIONTABLE_ENTRY(15b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 876 | ASM_EXCEPTIONTABLE_ENTRY(16b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 877 | ASM_EXCEPTIONTABLE_ENTRY(17b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 878 | ASM_EXCEPTIONTABLE_ENTRY(18b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 879 | ASM_EXCEPTIONTABLE_ENTRY(19b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 880 | ASM_EXCEPTIONTABLE_ENTRY(20b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 881 | #ifndef CONFIG_64BIT | ||
| 882 | ASM_EXCEPTIONTABLE_ENTRY(12b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 883 | ASM_EXCEPTIONTABLE_ENTRY(21b-linux_gateway_page, 22b-linux_gateway_page) | ||
| 884 | #endif | ||
| 885 | |||
| 662 | /* Make sure nothing else is placed on this page */ | 886 | /* Make sure nothing else is placed on this page */ |
| 663 | .align PAGE_SIZE | 887 | .align PAGE_SIZE |
| 664 | END(linux_gateway_page) | 888 | END(linux_gateway_page) |
| @@ -675,8 +899,9 @@ ENTRY(end_linux_gateway_page) | |||
| 675 | /* Light-weight-syscall table */ | 899 | /* Light-weight-syscall table */ |
| 676 | /* Start of lws table. */ | 900 | /* Start of lws table. */ |
| 677 | ENTRY(lws_table) | 901 | ENTRY(lws_table) |
| 678 | LWS_ENTRY(compare_and_swap32) /* 0 - ELF32 Atomic compare and swap */ | 902 | LWS_ENTRY(compare_and_swap32) /* 0 - ELF32 Atomic 32bit CAS */ |
| 679 | LWS_ENTRY(compare_and_swap64) /* 1 - ELF64 Atomic compare and swap */ | 903 | LWS_ENTRY(compare_and_swap64) /* 1 - ELF64 Atomic 32bit CAS */ |
| 904 | LWS_ENTRY(compare_and_swap_2) /* 2 - ELF32 Atomic 64bit CAS */ | ||
| 680 | END(lws_table) | 905 | END(lws_table) |
| 681 | /* End of lws table */ | 906 | /* End of lws table */ |
| 682 | 907 | ||
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 84c5d3a58fa1..b563d9c8268b 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
| @@ -433,6 +433,9 @@ | |||
| 433 | ENTRY_SAME(sched_getattr) /* 335 */ | 433 | ENTRY_SAME(sched_getattr) /* 335 */ |
| 434 | ENTRY_COMP(utimes) | 434 | ENTRY_COMP(utimes) |
| 435 | ENTRY_SAME(renameat2) | 435 | ENTRY_SAME(renameat2) |
| 436 | ENTRY_SAME(seccomp) | ||
| 437 | ENTRY_SAME(getrandom) | ||
| 438 | ENTRY_SAME(memfd_create) /* 340 */ | ||
| 436 | 439 | ||
| 437 | /* Nothing yet */ | 440 | /* Nothing yet */ |
| 438 | 441 | ||
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index a577609f8ed6..4bc7b62fb4b6 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
| @@ -399,8 +399,6 @@ config PPC64_SUPPORTS_MEMORY_FAILURE | |||
| 399 | config KEXEC | 399 | config KEXEC |
| 400 | bool "kexec system call" | 400 | bool "kexec system call" |
| 401 | depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) | 401 | depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) |
| 402 | select CRYPTO | ||
| 403 | select CRYPTO_SHA256 | ||
| 404 | help | 402 | help |
| 405 | kexec is a system call that implements the ability to shutdown your | 403 | kexec is a system call that implements the ability to shutdown your |
| 406 | current kernel, and to start another kernel. It is like a reboot | 404 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/powerpc/configs/c2k_defconfig b/arch/powerpc/configs/c2k_defconfig index 5e2aa43562b5..59734916986a 100644 --- a/arch/powerpc/configs/c2k_defconfig +++ b/arch/powerpc/configs/c2k_defconfig | |||
| @@ -29,6 +29,7 @@ CONFIG_PM=y | |||
| 29 | CONFIG_PCI_MSI=y | 29 | CONFIG_PCI_MSI=y |
| 30 | CONFIG_HOTPLUG_PCI=y | 30 | CONFIG_HOTPLUG_PCI=y |
| 31 | CONFIG_HOTPLUG_PCI_SHPC=m | 31 | CONFIG_HOTPLUG_PCI_SHPC=m |
| 32 | CONFIG_NET=y | ||
| 32 | CONFIG_PACKET=y | 33 | CONFIG_PACKET=y |
| 33 | CONFIG_UNIX=y | 34 | CONFIG_UNIX=y |
| 34 | CONFIG_XFRM_USER=y | 35 | CONFIG_XFRM_USER=y |
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig index 4bee1a6d41d0..45fd06cdc3e8 100644 --- a/arch/powerpc/configs/cell_defconfig +++ b/arch/powerpc/configs/cell_defconfig | |||
| @@ -5,6 +5,7 @@ CONFIG_SMP=y | |||
| 5 | CONFIG_NR_CPUS=4 | 5 | CONFIG_NR_CPUS=4 |
| 6 | CONFIG_EXPERIMENTAL=y | 6 | CONFIG_EXPERIMENTAL=y |
| 7 | CONFIG_SYSVIPC=y | 7 | CONFIG_SYSVIPC=y |
| 8 | CONFIG_FHANDLE=y | ||
| 8 | CONFIG_IKCONFIG=y | 9 | CONFIG_IKCONFIG=y |
| 9 | CONFIG_IKCONFIG_PROC=y | 10 | CONFIG_IKCONFIG_PROC=y |
| 10 | CONFIG_LOG_BUF_SHIFT=15 | 11 | CONFIG_LOG_BUF_SHIFT=15 |
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig index 6d7b22f41b50..77d7bf3ca2ac 100644 --- a/arch/powerpc/configs/celleb_defconfig +++ b/arch/powerpc/configs/celleb_defconfig | |||
| @@ -5,6 +5,7 @@ CONFIG_SMP=y | |||
| 5 | CONFIG_NR_CPUS=4 | 5 | CONFIG_NR_CPUS=4 |
| 6 | CONFIG_EXPERIMENTAL=y | 6 | CONFIG_EXPERIMENTAL=y |
| 7 | CONFIG_SYSVIPC=y | 7 | CONFIG_SYSVIPC=y |
| 8 | CONFIG_FHANDLE=y | ||
| 8 | CONFIG_IKCONFIG=y | 9 | CONFIG_IKCONFIG=y |
| 9 | CONFIG_IKCONFIG_PROC=y | 10 | CONFIG_IKCONFIG_PROC=y |
| 10 | CONFIG_LOG_BUF_SHIFT=15 | 11 | CONFIG_LOG_BUF_SHIFT=15 |
diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/configs/corenet64_smp_defconfig index 4b07bade1ba9..269d6e47c67d 100644 --- a/arch/powerpc/configs/corenet64_smp_defconfig +++ b/arch/powerpc/configs/corenet64_smp_defconfig | |||
| @@ -4,6 +4,7 @@ CONFIG_ALTIVEC=y | |||
| 4 | CONFIG_SMP=y | 4 | CONFIG_SMP=y |
| 5 | CONFIG_NR_CPUS=24 | 5 | CONFIG_NR_CPUS=24 |
| 6 | CONFIG_SYSVIPC=y | 6 | CONFIG_SYSVIPC=y |
| 7 | CONFIG_FHANDLE=y | ||
| 7 | CONFIG_IRQ_DOMAIN_DEBUG=y | 8 | CONFIG_IRQ_DOMAIN_DEBUG=y |
| 8 | CONFIG_NO_HZ=y | 9 | CONFIG_NO_HZ=y |
| 9 | CONFIG_HIGH_RES_TIMERS=y | 10 | CONFIG_HIGH_RES_TIMERS=y |
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig index 3c72fa615bd9..7594c5ac6481 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_defconfig | |||
| @@ -5,6 +5,7 @@ CONFIG_NR_CPUS=4 | |||
| 5 | CONFIG_EXPERIMENTAL=y | 5 | CONFIG_EXPERIMENTAL=y |
| 6 | CONFIG_SYSVIPC=y | 6 | CONFIG_SYSVIPC=y |
| 7 | CONFIG_POSIX_MQUEUE=y | 7 | CONFIG_POSIX_MQUEUE=y |
| 8 | CONFIG_FHANDLE=y | ||
| 8 | CONFIG_IKCONFIG=y | 9 | CONFIG_IKCONFIG=y |
| 9 | CONFIG_IKCONFIG_PROC=y | 10 | CONFIG_IKCONFIG_PROC=y |
| 10 | CONFIG_BLK_DEV_INITRD=y | 11 | CONFIG_BLK_DEV_INITRD=y |
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig index 95e545d9f25c..c8b6a9ddb21b 100644 --- a/arch/powerpc/configs/maple_defconfig +++ b/arch/powerpc/configs/maple_defconfig | |||
| @@ -4,6 +4,7 @@ CONFIG_NR_CPUS=4 | |||
| 4 | CONFIG_EXPERIMENTAL=y | 4 | CONFIG_EXPERIMENTAL=y |
| 5 | CONFIG_SYSVIPC=y | 5 | CONFIG_SYSVIPC=y |
| 6 | CONFIG_POSIX_MQUEUE=y | 6 | CONFIG_POSIX_MQUEUE=y |
| 7 | CONFIG_FHANDLE=y | ||
| 7 | CONFIG_IKCONFIG=y | 8 | CONFIG_IKCONFIG=y |
| 8 | CONFIG_IKCONFIG_PROC=y | 9 | CONFIG_IKCONFIG_PROC=y |
| 9 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig index cec044a3ff69..e5e7838af008 100644 --- a/arch/powerpc/configs/pasemi_defconfig +++ b/arch/powerpc/configs/pasemi_defconfig | |||
| @@ -3,6 +3,7 @@ CONFIG_ALTIVEC=y | |||
| 3 | CONFIG_SMP=y | 3 | CONFIG_SMP=y |
| 4 | CONFIG_NR_CPUS=2 | 4 | CONFIG_NR_CPUS=2 |
| 5 | CONFIG_SYSVIPC=y | 5 | CONFIG_SYSVIPC=y |
| 6 | CONFIG_FHANDLE=y | ||
| 6 | CONFIG_NO_HZ=y | 7 | CONFIG_NO_HZ=y |
| 7 | CONFIG_HIGH_RES_TIMERS=y | 8 | CONFIG_HIGH_RES_TIMERS=y |
| 8 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig index 553e66278010..0351b5ffdfef 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig | |||
| @@ -31,6 +31,7 @@ CONFIG_HIBERNATION=y | |||
| 31 | CONFIG_APM_EMULATION=y | 31 | CONFIG_APM_EMULATION=y |
| 32 | CONFIG_PCCARD=m | 32 | CONFIG_PCCARD=m |
| 33 | CONFIG_YENTA=m | 33 | CONFIG_YENTA=m |
| 34 | CONFIG_NET=y | ||
| 34 | CONFIG_PACKET=y | 35 | CONFIG_PACKET=y |
| 35 | CONFIG_UNIX=y | 36 | CONFIG_UNIX=y |
| 36 | CONFIG_XFRM_USER=y | 37 | CONFIG_XFRM_USER=y |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index f26b267eb71f..36518870e6b2 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
| @@ -4,6 +4,7 @@ CONFIG_VSX=y | |||
| 4 | CONFIG_SMP=y | 4 | CONFIG_SMP=y |
| 5 | CONFIG_SYSVIPC=y | 5 | CONFIG_SYSVIPC=y |
| 6 | CONFIG_POSIX_MQUEUE=y | 6 | CONFIG_POSIX_MQUEUE=y |
| 7 | CONFIG_FHANDLE=y | ||
| 7 | CONFIG_IRQ_DOMAIN_DEBUG=y | 8 | CONFIG_IRQ_DOMAIN_DEBUG=y |
| 8 | CONFIG_NO_HZ=y | 9 | CONFIG_NO_HZ=y |
| 9 | CONFIG_HIGH_RES_TIMERS=y | 10 | CONFIG_HIGH_RES_TIMERS=y |
| @@ -57,6 +58,7 @@ CONFIG_ELECTRA_CF=y | |||
| 57 | CONFIG_HOTPLUG_PCI=y | 58 | CONFIG_HOTPLUG_PCI=y |
| 58 | CONFIG_HOTPLUG_PCI_RPA=m | 59 | CONFIG_HOTPLUG_PCI_RPA=m |
| 59 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 60 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
| 61 | CONFIG_NET=y | ||
| 60 | CONFIG_PACKET=y | 62 | CONFIG_PACKET=y |
| 61 | CONFIG_UNIX=y | 63 | CONFIG_UNIX=y |
| 62 | CONFIG_XFRM_USER=m | 64 | CONFIG_XFRM_USER=m |
diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/ppc64e_defconfig index 438e813dc9cb..c3a3269b0865 100644 --- a/arch/powerpc/configs/ppc64e_defconfig +++ b/arch/powerpc/configs/ppc64e_defconfig | |||
| @@ -3,6 +3,7 @@ CONFIG_PPC_BOOK3E_64=y | |||
| 3 | CONFIG_SMP=y | 3 | CONFIG_SMP=y |
| 4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
| 5 | CONFIG_POSIX_MQUEUE=y | 5 | CONFIG_POSIX_MQUEUE=y |
| 6 | CONFIG_FHANDLE=y | ||
| 6 | CONFIG_NO_HZ=y | 7 | CONFIG_NO_HZ=y |
| 7 | CONFIG_HIGH_RES_TIMERS=y | 8 | CONFIG_HIGH_RES_TIMERS=y |
| 8 | CONFIG_TASKSTATS=y | 9 | CONFIG_TASKSTATS=y |
| @@ -32,6 +33,7 @@ CONFIG_SPARSEMEM_MANUAL=y | |||
| 32 | CONFIG_PCI_MSI=y | 33 | CONFIG_PCI_MSI=y |
| 33 | CONFIG_PCCARD=y | 34 | CONFIG_PCCARD=y |
| 34 | CONFIG_HOTPLUG_PCI=y | 35 | CONFIG_HOTPLUG_PCI=y |
| 36 | CONFIG_NET=y | ||
| 35 | CONFIG_PACKET=y | 37 | CONFIG_PACKET=y |
| 36 | CONFIG_UNIX=y | 38 | CONFIG_UNIX=y |
| 37 | CONFIG_XFRM_USER=m | 39 | CONFIG_XFRM_USER=m |
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index fdee37fab81c..2e637c881d2b 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
| @@ -5,6 +5,7 @@ CONFIG_SMP=y | |||
| 5 | CONFIG_NR_CPUS=2 | 5 | CONFIG_NR_CPUS=2 |
| 6 | CONFIG_SYSVIPC=y | 6 | CONFIG_SYSVIPC=y |
| 7 | CONFIG_POSIX_MQUEUE=y | 7 | CONFIG_POSIX_MQUEUE=y |
| 8 | CONFIG_FHANDLE=y | ||
| 8 | CONFIG_HIGH_RES_TIMERS=y | 9 | CONFIG_HIGH_RES_TIMERS=y |
| 9 | CONFIG_BLK_DEV_INITRD=y | 10 | CONFIG_BLK_DEV_INITRD=y |
| 10 | CONFIG_RD_LZMA=y | 11 | CONFIG_RD_LZMA=y |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index a905063281cc..dd2a9cab4b50 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
| @@ -5,6 +5,7 @@ CONFIG_SMP=y | |||
| 5 | CONFIG_NR_CPUS=2048 | 5 | CONFIG_NR_CPUS=2048 |
| 6 | CONFIG_SYSVIPC=y | 6 | CONFIG_SYSVIPC=y |
| 7 | CONFIG_POSIX_MQUEUE=y | 7 | CONFIG_POSIX_MQUEUE=y |
| 8 | CONFIG_FHANDLE=y | ||
| 8 | CONFIG_AUDIT=y | 9 | CONFIG_AUDIT=y |
| 9 | CONFIG_AUDITSYSCALL=y | 10 | CONFIG_AUDITSYSCALL=y |
| 10 | CONFIG_IRQ_DOMAIN_DEBUG=y | 11 | CONFIG_IRQ_DOMAIN_DEBUG=y |
| @@ -52,6 +53,7 @@ CONFIG_SCHED_SMT=y | |||
| 52 | CONFIG_HOTPLUG_PCI=y | 53 | CONFIG_HOTPLUG_PCI=y |
| 53 | CONFIG_HOTPLUG_PCI_RPA=m | 54 | CONFIG_HOTPLUG_PCI_RPA=m |
| 54 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 55 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
| 56 | CONFIG_NET=y | ||
| 55 | CONFIG_PACKET=y | 57 | CONFIG_PACKET=y |
| 56 | CONFIG_UNIX=y | 58 | CONFIG_UNIX=y |
| 57 | CONFIG_XFRM_USER=m | 59 | CONFIG_XFRM_USER=m |
diff --git a/arch/powerpc/configs/pseries_le_defconfig b/arch/powerpc/configs/pseries_le_defconfig index 58e3dbf43ca4..63392f4b29a4 100644 --- a/arch/powerpc/configs/pseries_le_defconfig +++ b/arch/powerpc/configs/pseries_le_defconfig | |||
| @@ -6,6 +6,7 @@ CONFIG_NR_CPUS=2048 | |||
| 6 | CONFIG_CPU_LITTLE_ENDIAN=y | 6 | CONFIG_CPU_LITTLE_ENDIAN=y |
| 7 | CONFIG_SYSVIPC=y | 7 | CONFIG_SYSVIPC=y |
| 8 | CONFIG_POSIX_MQUEUE=y | 8 | CONFIG_POSIX_MQUEUE=y |
| 9 | CONFIG_FHANDLE=y | ||
| 9 | CONFIG_AUDIT=y | 10 | CONFIG_AUDIT=y |
| 10 | CONFIG_AUDITSYSCALL=y | 11 | CONFIG_AUDITSYSCALL=y |
| 11 | CONFIG_IRQ_DOMAIN_DEBUG=y | 12 | CONFIG_IRQ_DOMAIN_DEBUG=y |
| @@ -54,6 +55,7 @@ CONFIG_SCHED_SMT=y | |||
| 54 | CONFIG_HOTPLUG_PCI=y | 55 | CONFIG_HOTPLUG_PCI=y |
| 55 | CONFIG_HOTPLUG_PCI_RPA=m | 56 | CONFIG_HOTPLUG_PCI_RPA=m |
| 56 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 57 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
| 58 | CONFIG_NET=y | ||
| 57 | CONFIG_PACKET=y | 59 | CONFIG_PACKET=y |
| 58 | CONFIG_UNIX=y | 60 | CONFIG_UNIX=y |
| 59 | CONFIG_XFRM_USER=m | 61 | CONFIG_XFRM_USER=m |
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 279b80f3bb29..c0c61fa9cd9e 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h | |||
| @@ -47,6 +47,12 @@ | |||
| 47 | STACK_FRAME_OVERHEAD + KERNEL_REDZONE_SIZE) | 47 | STACK_FRAME_OVERHEAD + KERNEL_REDZONE_SIZE) |
| 48 | #define STACK_FRAME_MARKER 12 | 48 | #define STACK_FRAME_MARKER 12 |
| 49 | 49 | ||
| 50 | #if defined(_CALL_ELF) && _CALL_ELF == 2 | ||
| 51 | #define STACK_FRAME_MIN_SIZE 32 | ||
| 52 | #else | ||
| 53 | #define STACK_FRAME_MIN_SIZE STACK_FRAME_OVERHEAD | ||
| 54 | #endif | ||
| 55 | |||
| 50 | /* Size of dummy stack frame allocated when calling signal handler. */ | 56 | /* Size of dummy stack frame allocated when calling signal handler. */ |
| 51 | #define __SIGNAL_FRAMESIZE 128 | 57 | #define __SIGNAL_FRAMESIZE 128 |
| 52 | #define __SIGNAL_FRAMESIZE32 64 | 58 | #define __SIGNAL_FRAMESIZE32 64 |
| @@ -60,6 +66,7 @@ | |||
| 60 | #define STACK_FRAME_REGS_MARKER ASM_CONST(0x72656773) | 66 | #define STACK_FRAME_REGS_MARKER ASM_CONST(0x72656773) |
| 61 | #define STACK_INT_FRAME_SIZE (sizeof(struct pt_regs) + STACK_FRAME_OVERHEAD) | 67 | #define STACK_INT_FRAME_SIZE (sizeof(struct pt_regs) + STACK_FRAME_OVERHEAD) |
| 62 | #define STACK_FRAME_MARKER 2 | 68 | #define STACK_FRAME_MARKER 2 |
| 69 | #define STACK_FRAME_MIN_SIZE STACK_FRAME_OVERHEAD | ||
| 63 | 70 | ||
| 64 | /* Size of stack frame allocated when calling signal handler. */ | 71 | /* Size of stack frame allocated when calling signal handler. */ |
| 65 | #define __SIGNAL_FRAMESIZE 64 | 72 | #define __SIGNAL_FRAMESIZE 64 |
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 542bc0f0673f..7d8a60068805 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
| @@ -362,3 +362,6 @@ SYSCALL(ni_syscall) /* sys_kcmp */ | |||
| 362 | SYSCALL_SPU(sched_setattr) | 362 | SYSCALL_SPU(sched_setattr) |
| 363 | SYSCALL_SPU(sched_getattr) | 363 | SYSCALL_SPU(sched_getattr) |
| 364 | SYSCALL_SPU(renameat2) | 364 | SYSCALL_SPU(renameat2) |
| 365 | SYSCALL_SPU(seccomp) | ||
| 366 | SYSCALL_SPU(getrandom) | ||
| 367 | SYSCALL_SPU(memfd_create) | ||
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index 5ce5552ab9f5..4e9af3fd43e7 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <uapi/asm/unistd.h> | 12 | #include <uapi/asm/unistd.h> |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | #define __NR_syscalls 358 | 15 | #define __NR_syscalls 361 |
| 16 | 16 | ||
| 17 | #define __NR__exit __NR_exit | 17 | #define __NR__exit __NR_exit |
| 18 | #define NR_syscalls __NR_syscalls | 18 | #define NR_syscalls __NR_syscalls |
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h index 2d526f7b48da..0688fc06e183 100644 --- a/arch/powerpc/include/uapi/asm/unistd.h +++ b/arch/powerpc/include/uapi/asm/unistd.h | |||
| @@ -380,5 +380,8 @@ | |||
| 380 | #define __NR_sched_setattr 355 | 380 | #define __NR_sched_setattr 355 |
| 381 | #define __NR_sched_getattr 356 | 381 | #define __NR_sched_getattr 356 |
| 382 | #define __NR_renameat2 357 | 382 | #define __NR_renameat2 357 |
| 383 | #define __NR_seccomp 358 | ||
| 384 | #define __NR_getrandom 359 | ||
| 385 | #define __NR_memfd_create 360 | ||
| 383 | 386 | ||
| 384 | #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ | 387 | #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ |
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c index 72c20bb16d26..79294c4c5015 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c | |||
| @@ -62,10 +62,10 @@ long kvmppc_alloc_hpt(struct kvm *kvm, u32 *htab_orderp) | |||
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | kvm->arch.hpt_cma_alloc = 0; | 64 | kvm->arch.hpt_cma_alloc = 0; |
| 65 | page = kvm_alloc_hpt(1 << (order - PAGE_SHIFT)); | 65 | page = kvm_alloc_hpt(1ul << (order - PAGE_SHIFT)); |
| 66 | if (page) { | 66 | if (page) { |
| 67 | hpt = (unsigned long)pfn_to_kaddr(page_to_pfn(page)); | 67 | hpt = (unsigned long)pfn_to_kaddr(page_to_pfn(page)); |
| 68 | memset((void *)hpt, 0, (1 << order)); | 68 | memset((void *)hpt, 0, (1ul << order)); |
| 69 | kvm->arch.hpt_cma_alloc = 1; | 69 | kvm->arch.hpt_cma_alloc = 1; |
| 70 | } | 70 | } |
| 71 | 71 | ||
diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c index 74d1e780748b..2396dda282cd 100644 --- a/arch/powerpc/perf/callchain.c +++ b/arch/powerpc/perf/callchain.c | |||
| @@ -35,7 +35,7 @@ static int valid_next_sp(unsigned long sp, unsigned long prev_sp) | |||
| 35 | return 0; /* must be 16-byte aligned */ | 35 | return 0; /* must be 16-byte aligned */ |
| 36 | if (!validate_sp(sp, current, STACK_FRAME_OVERHEAD)) | 36 | if (!validate_sp(sp, current, STACK_FRAME_OVERHEAD)) |
| 37 | return 0; | 37 | return 0; |
| 38 | if (sp >= prev_sp + STACK_FRAME_OVERHEAD) | 38 | if (sp >= prev_sp + STACK_FRAME_MIN_SIZE) |
| 39 | return 1; | 39 | return 1; |
| 40 | /* | 40 | /* |
| 41 | * sp could decrease when we jump off an interrupt stack | 41 | * sp could decrease when we jump off an interrupt stack |
diff --git a/arch/powerpc/platforms/powernv/opal-hmi.c b/arch/powerpc/platforms/powernv/opal-hmi.c index 97ac8dc33667..5e1ed1575aab 100644 --- a/arch/powerpc/platforms/powernv/opal-hmi.c +++ b/arch/powerpc/platforms/powernv/opal-hmi.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | #include <asm/opal.h> | 29 | #include <asm/opal.h> |
| 30 | #include <asm/cputable.h> | 30 | #include <asm/cputable.h> |
| 31 | #include <asm/machdep.h> | ||
| 31 | 32 | ||
| 32 | static int opal_hmi_handler_nb_init; | 33 | static int opal_hmi_handler_nb_init; |
| 33 | struct OpalHmiEvtNode { | 34 | struct OpalHmiEvtNode { |
| @@ -185,4 +186,4 @@ static int __init opal_hmi_handler_init(void) | |||
| 185 | } | 186 | } |
| 186 | return 0; | 187 | return 0; |
| 187 | } | 188 | } |
| 188 | subsys_initcall(opal_hmi_handler_init); | 189 | machine_subsys_initcall(powernv, opal_hmi_handler_init); |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index c904583baf4b..17ee193960a0 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
| @@ -113,7 +113,7 @@ out: | |||
| 113 | static int pseries_remove_mem_node(struct device_node *np) | 113 | static int pseries_remove_mem_node(struct device_node *np) |
| 114 | { | 114 | { |
| 115 | const char *type; | 115 | const char *type; |
| 116 | const unsigned int *regs; | 116 | const __be32 *regs; |
| 117 | unsigned long base; | 117 | unsigned long base; |
| 118 | unsigned int lmb_size; | 118 | unsigned int lmb_size; |
| 119 | int ret = -EINVAL; | 119 | int ret = -EINVAL; |
| @@ -132,8 +132,8 @@ static int pseries_remove_mem_node(struct device_node *np) | |||
| 132 | if (!regs) | 132 | if (!regs) |
| 133 | return ret; | 133 | return ret; |
| 134 | 134 | ||
| 135 | base = *(unsigned long *)regs; | 135 | base = be64_to_cpu(*(unsigned long *)regs); |
| 136 | lmb_size = regs[3]; | 136 | lmb_size = be32_to_cpu(regs[3]); |
| 137 | 137 | ||
| 138 | pseries_remove_memblock(base, lmb_size); | 138 | pseries_remove_memblock(base, lmb_size); |
| 139 | return 0; | 139 | return 0; |
| @@ -153,7 +153,7 @@ static inline int pseries_remove_mem_node(struct device_node *np) | |||
| 153 | static int pseries_add_mem_node(struct device_node *np) | 153 | static int pseries_add_mem_node(struct device_node *np) |
| 154 | { | 154 | { |
| 155 | const char *type; | 155 | const char *type; |
| 156 | const unsigned int *regs; | 156 | const __be32 *regs; |
| 157 | unsigned long base; | 157 | unsigned long base; |
| 158 | unsigned int lmb_size; | 158 | unsigned int lmb_size; |
| 159 | int ret = -EINVAL; | 159 | int ret = -EINVAL; |
| @@ -172,8 +172,8 @@ static int pseries_add_mem_node(struct device_node *np) | |||
| 172 | if (!regs) | 172 | if (!regs) |
| 173 | return ret; | 173 | return ret; |
| 174 | 174 | ||
| 175 | base = *(unsigned long *)regs; | 175 | base = be64_to_cpu(*(unsigned long *)regs); |
| 176 | lmb_size = regs[3]; | 176 | lmb_size = be32_to_cpu(regs[3]); |
| 177 | 177 | ||
| 178 | /* | 178 | /* |
| 179 | * Update memory region to represent the memory add | 179 | * Update memory region to represent the memory add |
| @@ -187,14 +187,14 @@ static int pseries_update_drconf_memory(struct of_prop_reconfig *pr) | |||
| 187 | struct of_drconf_cell *new_drmem, *old_drmem; | 187 | struct of_drconf_cell *new_drmem, *old_drmem; |
| 188 | unsigned long memblock_size; | 188 | unsigned long memblock_size; |
| 189 | u32 entries; | 189 | u32 entries; |
| 190 | u32 *p; | 190 | __be32 *p; |
| 191 | int i, rc = -EINVAL; | 191 | int i, rc = -EINVAL; |
| 192 | 192 | ||
| 193 | memblock_size = pseries_memory_block_size(); | 193 | memblock_size = pseries_memory_block_size(); |
| 194 | if (!memblock_size) | 194 | if (!memblock_size) |
| 195 | return -EINVAL; | 195 | return -EINVAL; |
| 196 | 196 | ||
| 197 | p = (u32 *) pr->old_prop->value; | 197 | p = (__be32 *) pr->old_prop->value; |
| 198 | if (!p) | 198 | if (!p) |
| 199 | return -EINVAL; | 199 | return -EINVAL; |
| 200 | 200 | ||
| @@ -203,28 +203,30 @@ static int pseries_update_drconf_memory(struct of_prop_reconfig *pr) | |||
| 203 | * entries. Get the niumber of entries and skip to the array of | 203 | * entries. Get the niumber of entries and skip to the array of |
| 204 | * of_drconf_cell's. | 204 | * of_drconf_cell's. |
| 205 | */ | 205 | */ |
| 206 | entries = *p++; | 206 | entries = be32_to_cpu(*p++); |
| 207 | old_drmem = (struct of_drconf_cell *)p; | 207 | old_drmem = (struct of_drconf_cell *)p; |
| 208 | 208 | ||
| 209 | p = (u32 *)pr->prop->value; | 209 | p = (__be32 *)pr->prop->value; |
| 210 | p++; | 210 | p++; |
| 211 | new_drmem = (struct of_drconf_cell *)p; | 211 | new_drmem = (struct of_drconf_cell *)p; |
| 212 | 212 | ||
| 213 | for (i = 0; i < entries; i++) { | 213 | for (i = 0; i < entries; i++) { |
| 214 | if ((old_drmem[i].flags & DRCONF_MEM_ASSIGNED) && | 214 | if ((be32_to_cpu(old_drmem[i].flags) & DRCONF_MEM_ASSIGNED) && |
| 215 | (!(new_drmem[i].flags & DRCONF_MEM_ASSIGNED))) { | 215 | (!(be32_to_cpu(new_drmem[i].flags) & DRCONF_MEM_ASSIGNED))) { |
| 216 | rc = pseries_remove_memblock(old_drmem[i].base_addr, | 216 | rc = pseries_remove_memblock( |
| 217 | be64_to_cpu(old_drmem[i].base_addr), | ||
| 217 | memblock_size); | 218 | memblock_size); |
| 218 | break; | 219 | break; |
| 219 | } else if ((!(old_drmem[i].flags & DRCONF_MEM_ASSIGNED)) && | 220 | } else if ((!(be32_to_cpu(old_drmem[i].flags) & |
| 220 | (new_drmem[i].flags & DRCONF_MEM_ASSIGNED)) { | 221 | DRCONF_MEM_ASSIGNED)) && |
| 221 | rc = memblock_add(old_drmem[i].base_addr, | 222 | (be32_to_cpu(new_drmem[i].flags) & |
| 223 | DRCONF_MEM_ASSIGNED)) { | ||
| 224 | rc = memblock_add(be64_to_cpu(old_drmem[i].base_addr), | ||
| 222 | memblock_size); | 225 | memblock_size); |
| 223 | rc = (rc < 0) ? -EINVAL : 0; | 226 | rc = (rc < 0) ? -EINVAL : 0; |
| 224 | break; | 227 | break; |
| 225 | } | 228 | } |
| 226 | } | 229 | } |
| 227 | |||
| 228 | return rc; | 230 | return rc; |
| 229 | } | 231 | } |
| 230 | 232 | ||
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index ab39ceb89ecf..05c78bb5f570 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
| @@ -48,8 +48,6 @@ config ARCH_SUPPORTS_DEBUG_PAGEALLOC | |||
| 48 | 48 | ||
| 49 | config KEXEC | 49 | config KEXEC |
| 50 | def_bool y | 50 | def_bool y |
| 51 | select CRYPTO | ||
| 52 | select CRYPTO_SHA256 | ||
| 53 | 51 | ||
| 54 | config AUDIT_ARCH | 52 | config AUDIT_ARCH |
| 55 | def_bool y | 53 | def_bool y |
diff --git a/arch/s390/configs/default_defconfig b/arch/s390/configs/default_defconfig index 3ca1894ade09..9d94fdd9f525 100644 --- a/arch/s390/configs/default_defconfig +++ b/arch/s390/configs/default_defconfig | |||
| @@ -63,6 +63,7 @@ CONFIG_CRASH_DUMP=y | |||
| 63 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 63 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
| 64 | CONFIG_BINFMT_MISC=m | 64 | CONFIG_BINFMT_MISC=m |
| 65 | CONFIG_HIBERNATION=y | 65 | CONFIG_HIBERNATION=y |
| 66 | CONFIG_NET=y | ||
| 66 | CONFIG_PACKET=y | 67 | CONFIG_PACKET=y |
| 67 | CONFIG_PACKET_DIAG=m | 68 | CONFIG_PACKET_DIAG=m |
| 68 | CONFIG_UNIX=y | 69 | CONFIG_UNIX=y |
diff --git a/arch/s390/configs/gcov_defconfig b/arch/s390/configs/gcov_defconfig index 4830aa6e6f53..90f514baa37d 100644 --- a/arch/s390/configs/gcov_defconfig +++ b/arch/s390/configs/gcov_defconfig | |||
| @@ -61,6 +61,7 @@ CONFIG_CRASH_DUMP=y | |||
| 61 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 61 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
| 62 | CONFIG_BINFMT_MISC=m | 62 | CONFIG_BINFMT_MISC=m |
| 63 | CONFIG_HIBERNATION=y | 63 | CONFIG_HIBERNATION=y |
| 64 | CONFIG_NET=y | ||
| 64 | CONFIG_PACKET=y | 65 | CONFIG_PACKET=y |
| 65 | CONFIG_PACKET_DIAG=m | 66 | CONFIG_PACKET_DIAG=m |
| 66 | CONFIG_UNIX=y | 67 | CONFIG_UNIX=y |
diff --git a/arch/s390/configs/performance_defconfig b/arch/s390/configs/performance_defconfig index 61db449bf309..13559d32af69 100644 --- a/arch/s390/configs/performance_defconfig +++ b/arch/s390/configs/performance_defconfig | |||
| @@ -59,6 +59,7 @@ CONFIG_CRASH_DUMP=y | |||
| 59 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 59 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
| 60 | CONFIG_BINFMT_MISC=m | 60 | CONFIG_BINFMT_MISC=m |
| 61 | CONFIG_HIBERNATION=y | 61 | CONFIG_HIBERNATION=y |
| 62 | CONFIG_NET=y | ||
| 62 | CONFIG_PACKET=y | 63 | CONFIG_PACKET=y |
| 63 | CONFIG_PACKET_DIAG=m | 64 | CONFIG_PACKET_DIAG=m |
| 64 | CONFIG_UNIX=y | 65 | CONFIG_UNIX=y |
diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig index 948e0e057a23..e376789f2d8d 100644 --- a/arch/s390/configs/zfcpdump_defconfig +++ b/arch/s390/configs/zfcpdump_defconfig | |||
| @@ -23,6 +23,7 @@ CONFIG_CRASH_DUMP=y | |||
| 23 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 23 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
| 24 | # CONFIG_SECCOMP is not set | 24 | # CONFIG_SECCOMP is not set |
| 25 | # CONFIG_IUCV is not set | 25 | # CONFIG_IUCV is not set |
| 26 | CONFIG_NET=y | ||
| 26 | CONFIG_ATM=y | 27 | CONFIG_ATM=y |
| 27 | CONFIG_ATM_LANE=y | 28 | CONFIG_ATM_LANE=y |
| 28 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 29 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 2e56498a40df..fab35a8efa4f 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
| @@ -50,6 +50,7 @@ CONFIG_CMA=y | |||
| 50 | CONFIG_CRASH_DUMP=y | 50 | CONFIG_CRASH_DUMP=y |
| 51 | CONFIG_BINFMT_MISC=m | 51 | CONFIG_BINFMT_MISC=m |
| 52 | CONFIG_HIBERNATION=y | 52 | CONFIG_HIBERNATION=y |
| 53 | CONFIG_NET=y | ||
| 53 | CONFIG_PACKET=y | 54 | CONFIG_PACKET=y |
| 54 | CONFIG_UNIX=y | 55 | CONFIG_UNIX=y |
| 55 | CONFIG_NET_KEY=y | 56 | CONFIG_NET_KEY=y |
diff --git a/arch/s390/include/asm/ipl.h b/arch/s390/include/asm/ipl.h index 2fcccc0c997c..c81661e756a0 100644 --- a/arch/s390/include/asm/ipl.h +++ b/arch/s390/include/asm/ipl.h | |||
| @@ -17,12 +17,12 @@ | |||
| 17 | #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \ | 17 | #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \ |
| 18 | sizeof(struct ipl_block_fcp)) | 18 | sizeof(struct ipl_block_fcp)) |
| 19 | 19 | ||
| 20 | #define IPL_PARM_BLK0_FCP_LEN (sizeof(struct ipl_block_fcp) + 8) | 20 | #define IPL_PARM_BLK0_FCP_LEN (sizeof(struct ipl_block_fcp) + 16) |
| 21 | 21 | ||
| 22 | #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \ | 22 | #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \ |
| 23 | sizeof(struct ipl_block_ccw)) | 23 | sizeof(struct ipl_block_ccw)) |
| 24 | 24 | ||
| 25 | #define IPL_PARM_BLK0_CCW_LEN (sizeof(struct ipl_block_ccw) + 8) | 25 | #define IPL_PARM_BLK0_CCW_LEN (sizeof(struct ipl_block_ccw) + 16) |
| 26 | 26 | ||
| 27 | #define IPL_MAX_SUPPORTED_VERSION (0) | 27 | #define IPL_MAX_SUPPORTED_VERSION (0) |
| 28 | 28 | ||
| @@ -38,10 +38,11 @@ struct ipl_list_hdr { | |||
| 38 | u8 pbt; | 38 | u8 pbt; |
| 39 | u8 flags; | 39 | u8 flags; |
| 40 | u16 reserved2; | 40 | u16 reserved2; |
| 41 | u8 loadparm[8]; | ||
| 41 | } __attribute__((packed)); | 42 | } __attribute__((packed)); |
| 42 | 43 | ||
| 43 | struct ipl_block_fcp { | 44 | struct ipl_block_fcp { |
| 44 | u8 reserved1[313-1]; | 45 | u8 reserved1[305-1]; |
| 45 | u8 opt; | 46 | u8 opt; |
| 46 | u8 reserved2[3]; | 47 | u8 reserved2[3]; |
| 47 | u16 reserved3; | 48 | u16 reserved3; |
| @@ -62,7 +63,6 @@ struct ipl_block_fcp { | |||
| 62 | offsetof(struct ipl_block_fcp, scp_data))) | 63 | offsetof(struct ipl_block_fcp, scp_data))) |
| 63 | 64 | ||
| 64 | struct ipl_block_ccw { | 65 | struct ipl_block_ccw { |
| 65 | u8 load_parm[8]; | ||
| 66 | u8 reserved1[84]; | 66 | u8 reserved1[84]; |
| 67 | u8 reserved2[2]; | 67 | u8 reserved2[2]; |
| 68 | u16 devno; | 68 | u16 devno; |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index b76317c1f3eb..5efb2fe186e7 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
| @@ -1127,7 +1127,7 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, | |||
| 1127 | unsigned long addr, pte_t *ptep) | 1127 | unsigned long addr, pte_t *ptep) |
| 1128 | { | 1128 | { |
| 1129 | pgste_t pgste; | 1129 | pgste_t pgste; |
| 1130 | pte_t pte; | 1130 | pte_t pte, oldpte; |
| 1131 | int young; | 1131 | int young; |
| 1132 | 1132 | ||
| 1133 | if (mm_has_pgste(vma->vm_mm)) { | 1133 | if (mm_has_pgste(vma->vm_mm)) { |
| @@ -1135,12 +1135,13 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, | |||
| 1135 | pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); | 1135 | pgste = pgste_ipte_notify(vma->vm_mm, ptep, pgste); |
| 1136 | } | 1136 | } |
| 1137 | 1137 | ||
| 1138 | pte = *ptep; | 1138 | oldpte = pte = *ptep; |
| 1139 | ptep_flush_direct(vma->vm_mm, addr, ptep); | 1139 | ptep_flush_direct(vma->vm_mm, addr, ptep); |
| 1140 | young = pte_young(pte); | 1140 | young = pte_young(pte); |
| 1141 | pte = pte_mkold(pte); | 1141 | pte = pte_mkold(pte); |
| 1142 | 1142 | ||
| 1143 | if (mm_has_pgste(vma->vm_mm)) { | 1143 | if (mm_has_pgste(vma->vm_mm)) { |
| 1144 | pgste = pgste_update_all(&oldpte, pgste, vma->vm_mm); | ||
| 1144 | pgste = pgste_set_pte(ptep, pgste, pte); | 1145 | pgste = pgste_set_pte(ptep, pgste, pte); |
| 1145 | pgste_set_unlock(ptep, pgste); | 1146 | pgste_set_unlock(ptep, pgste); |
| 1146 | } else | 1147 | } else |
| @@ -1330,6 +1331,7 @@ static inline int ptep_set_access_flags(struct vm_area_struct *vma, | |||
| 1330 | ptep_flush_direct(vma->vm_mm, address, ptep); | 1331 | ptep_flush_direct(vma->vm_mm, address, ptep); |
| 1331 | 1332 | ||
| 1332 | if (mm_has_pgste(vma->vm_mm)) { | 1333 | if (mm_has_pgste(vma->vm_mm)) { |
| 1334 | pgste_set_key(ptep, pgste, entry, vma->vm_mm); | ||
| 1333 | pgste = pgste_set_pte(ptep, pgste, entry); | 1335 | pgste = pgste_set_pte(ptep, pgste, entry); |
| 1334 | pgste_set_unlock(ptep, pgste); | 1336 | pgste_set_unlock(ptep, pgste); |
| 1335 | } else | 1337 | } else |
diff --git a/arch/s390/include/uapi/asm/unistd.h b/arch/s390/include/uapi/asm/unistd.h index 3802d2d3a18d..940ac49198db 100644 --- a/arch/s390/include/uapi/asm/unistd.h +++ b/arch/s390/include/uapi/asm/unistd.h | |||
| @@ -283,7 +283,10 @@ | |||
| 283 | #define __NR_sched_setattr 345 | 283 | #define __NR_sched_setattr 345 |
| 284 | #define __NR_sched_getattr 346 | 284 | #define __NR_sched_getattr 346 |
| 285 | #define __NR_renameat2 347 | 285 | #define __NR_renameat2 347 |
| 286 | #define NR_syscalls 348 | 286 | #define __NR_seccomp 348 |
| 287 | #define __NR_getrandom 349 | ||
| 288 | #define __NR_memfd_create 350 | ||
| 289 | #define NR_syscalls 351 | ||
| 287 | 290 | ||
| 288 | /* | 291 | /* |
| 289 | * There are some system calls that are not present on 64 bit, some | 292 | * There are some system calls that are not present on 64 bit, some |
diff --git a/arch/s390/kernel/compat_wrapper.c b/arch/s390/kernel/compat_wrapper.c index 45cdb37aa6f8..faf6caa510dc 100644 --- a/arch/s390/kernel/compat_wrapper.c +++ b/arch/s390/kernel/compat_wrapper.c | |||
| @@ -214,3 +214,6 @@ COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, fla | |||
| 214 | COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned 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); | 215 | COMPAT_SYSCALL_WRAP4(sched_getattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, size, unsigned int, flags); |
| 216 | COMPAT_SYSCALL_WRAP5(renameat2, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, unsigned int, flags); | 216 | COMPAT_SYSCALL_WRAP5(renameat2, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, unsigned int, flags); |
| 217 | COMPAT_SYSCALL_WRAP3(seccomp, unsigned int, op, unsigned int, flags, const char __user *, uargs) | ||
| 218 | COMPAT_SYSCALL_WRAP3(getrandom, char __user *, buf, size_t, count, unsigned int, flags) | ||
| 219 | COMPAT_SYSCALL_WRAP2(memfd_create, const char __user *, uname, unsigned int, flags) | ||
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 633ca7504536..39badb9ca0b3 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
| @@ -455,22 +455,6 @@ DEFINE_IPL_ATTR_RO(ipl_fcp, bootprog, "%lld\n", (unsigned long long) | |||
| 455 | DEFINE_IPL_ATTR_RO(ipl_fcp, br_lba, "%lld\n", (unsigned long long) | 455 | DEFINE_IPL_ATTR_RO(ipl_fcp, br_lba, "%lld\n", (unsigned long long) |
| 456 | IPL_PARMBLOCK_START->ipl_info.fcp.br_lba); | 456 | IPL_PARMBLOCK_START->ipl_info.fcp.br_lba); |
| 457 | 457 | ||
| 458 | static struct attribute *ipl_fcp_attrs[] = { | ||
| 459 | &sys_ipl_type_attr.attr, | ||
| 460 | &sys_ipl_device_attr.attr, | ||
| 461 | &sys_ipl_fcp_wwpn_attr.attr, | ||
| 462 | &sys_ipl_fcp_lun_attr.attr, | ||
| 463 | &sys_ipl_fcp_bootprog_attr.attr, | ||
| 464 | &sys_ipl_fcp_br_lba_attr.attr, | ||
| 465 | NULL, | ||
| 466 | }; | ||
| 467 | |||
| 468 | static struct attribute_group ipl_fcp_attr_group = { | ||
| 469 | .attrs = ipl_fcp_attrs, | ||
| 470 | }; | ||
| 471 | |||
| 472 | /* CCW ipl device attributes */ | ||
| 473 | |||
| 474 | static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj, | 458 | static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj, |
| 475 | struct kobj_attribute *attr, char *page) | 459 | struct kobj_attribute *attr, char *page) |
| 476 | { | 460 | { |
| @@ -487,6 +471,23 @@ static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj, | |||
| 487 | static struct kobj_attribute sys_ipl_ccw_loadparm_attr = | 471 | static struct kobj_attribute sys_ipl_ccw_loadparm_attr = |
| 488 | __ATTR(loadparm, 0444, ipl_ccw_loadparm_show, NULL); | 472 | __ATTR(loadparm, 0444, ipl_ccw_loadparm_show, NULL); |
| 489 | 473 | ||
| 474 | static struct attribute *ipl_fcp_attrs[] = { | ||
| 475 | &sys_ipl_type_attr.attr, | ||
| 476 | &sys_ipl_device_attr.attr, | ||
| 477 | &sys_ipl_fcp_wwpn_attr.attr, | ||
| 478 | &sys_ipl_fcp_lun_attr.attr, | ||
| 479 | &sys_ipl_fcp_bootprog_attr.attr, | ||
| 480 | &sys_ipl_fcp_br_lba_attr.attr, | ||
| 481 | &sys_ipl_ccw_loadparm_attr.attr, | ||
| 482 | NULL, | ||
| 483 | }; | ||
| 484 | |||
| 485 | static struct attribute_group ipl_fcp_attr_group = { | ||
| 486 | .attrs = ipl_fcp_attrs, | ||
| 487 | }; | ||
| 488 | |||
| 489 | /* CCW ipl device attributes */ | ||
| 490 | |||
| 490 | static struct attribute *ipl_ccw_attrs_vm[] = { | 491 | static struct attribute *ipl_ccw_attrs_vm[] = { |
| 491 | &sys_ipl_type_attr.attr, | 492 | &sys_ipl_type_attr.attr, |
| 492 | &sys_ipl_device_attr.attr, | 493 | &sys_ipl_device_attr.attr, |
| @@ -765,28 +766,10 @@ DEFINE_IPL_ATTR_RW(reipl_fcp, br_lba, "%lld\n", "%lld\n", | |||
| 765 | DEFINE_IPL_ATTR_RW(reipl_fcp, device, "0.0.%04llx\n", "0.0.%llx\n", | 766 | DEFINE_IPL_ATTR_RW(reipl_fcp, device, "0.0.%04llx\n", "0.0.%llx\n", |
| 766 | reipl_block_fcp->ipl_info.fcp.devno); | 767 | reipl_block_fcp->ipl_info.fcp.devno); |
| 767 | 768 | ||
| 768 | static struct attribute *reipl_fcp_attrs[] = { | ||
| 769 | &sys_reipl_fcp_device_attr.attr, | ||
| 770 | &sys_reipl_fcp_wwpn_attr.attr, | ||
| 771 | &sys_reipl_fcp_lun_attr.attr, | ||
| 772 | &sys_reipl_fcp_bootprog_attr.attr, | ||
| 773 | &sys_reipl_fcp_br_lba_attr.attr, | ||
| 774 | NULL, | ||
| 775 | }; | ||
| 776 | |||
| 777 | static struct attribute_group reipl_fcp_attr_group = { | ||
| 778 | .attrs = reipl_fcp_attrs, | ||
| 779 | }; | ||
| 780 | |||
| 781 | /* CCW reipl device attributes */ | ||
| 782 | |||
| 783 | DEFINE_IPL_ATTR_RW(reipl_ccw, device, "0.0.%04llx\n", "0.0.%llx\n", | ||
| 784 | reipl_block_ccw->ipl_info.ccw.devno); | ||
| 785 | |||
| 786 | static void reipl_get_ascii_loadparm(char *loadparm, | 769 | static void reipl_get_ascii_loadparm(char *loadparm, |
| 787 | struct ipl_parameter_block *ibp) | 770 | struct ipl_parameter_block *ibp) |
| 788 | { | 771 | { |
| 789 | memcpy(loadparm, ibp->ipl_info.ccw.load_parm, LOADPARM_LEN); | 772 | memcpy(loadparm, ibp->hdr.loadparm, LOADPARM_LEN); |
| 790 | EBCASC(loadparm, LOADPARM_LEN); | 773 | EBCASC(loadparm, LOADPARM_LEN); |
| 791 | loadparm[LOADPARM_LEN] = 0; | 774 | loadparm[LOADPARM_LEN] = 0; |
| 792 | strim(loadparm); | 775 | strim(loadparm); |
| @@ -821,13 +804,50 @@ static ssize_t reipl_generic_loadparm_store(struct ipl_parameter_block *ipb, | |||
| 821 | return -EINVAL; | 804 | return -EINVAL; |
| 822 | } | 805 | } |
| 823 | /* initialize loadparm with blanks */ | 806 | /* initialize loadparm with blanks */ |
| 824 | memset(ipb->ipl_info.ccw.load_parm, ' ', LOADPARM_LEN); | 807 | memset(ipb->hdr.loadparm, ' ', LOADPARM_LEN); |
| 825 | /* copy and convert to ebcdic */ | 808 | /* copy and convert to ebcdic */ |
| 826 | memcpy(ipb->ipl_info.ccw.load_parm, buf, lp_len); | 809 | memcpy(ipb->hdr.loadparm, buf, lp_len); |
| 827 | ASCEBC(ipb->ipl_info.ccw.load_parm, LOADPARM_LEN); | 810 | ASCEBC(ipb->hdr.loadparm, LOADPARM_LEN); |
| 828 | return len; | 811 | return len; |
| 829 | } | 812 | } |
| 830 | 813 | ||
| 814 | /* FCP wrapper */ | ||
| 815 | static ssize_t reipl_fcp_loadparm_show(struct kobject *kobj, | ||
| 816 | struct kobj_attribute *attr, char *page) | ||
| 817 | { | ||
| 818 | return reipl_generic_loadparm_show(reipl_block_fcp, page); | ||
| 819 | } | ||
| 820 | |||
| 821 | static ssize_t reipl_fcp_loadparm_store(struct kobject *kobj, | ||
| 822 | struct kobj_attribute *attr, | ||
| 823 | const char *buf, size_t len) | ||
| 824 | { | ||
| 825 | return reipl_generic_loadparm_store(reipl_block_fcp, buf, len); | ||
| 826 | } | ||
| 827 | |||
| 828 | static struct kobj_attribute sys_reipl_fcp_loadparm_attr = | ||
| 829 | __ATTR(loadparm, S_IRUGO | S_IWUSR, reipl_fcp_loadparm_show, | ||
| 830 | reipl_fcp_loadparm_store); | ||
| 831 | |||
| 832 | static struct attribute *reipl_fcp_attrs[] = { | ||
| 833 | &sys_reipl_fcp_device_attr.attr, | ||
| 834 | &sys_reipl_fcp_wwpn_attr.attr, | ||
| 835 | &sys_reipl_fcp_lun_attr.attr, | ||
| 836 | &sys_reipl_fcp_bootprog_attr.attr, | ||
| 837 | &sys_reipl_fcp_br_lba_attr.attr, | ||
| 838 | &sys_reipl_fcp_loadparm_attr.attr, | ||
| 839 | NULL, | ||
| 840 | }; | ||
| 841 | |||
| 842 | static struct attribute_group reipl_fcp_attr_group = { | ||
| 843 | .attrs = reipl_fcp_attrs, | ||
| 844 | }; | ||
| 845 | |||
| 846 | /* CCW reipl device attributes */ | ||
| 847 | |||
| 848 | DEFINE_IPL_ATTR_RW(reipl_ccw, device, "0.0.%04llx\n", "0.0.%llx\n", | ||
| 849 | reipl_block_ccw->ipl_info.ccw.devno); | ||
| 850 | |||
| 831 | /* NSS wrapper */ | 851 | /* NSS wrapper */ |
| 832 | static ssize_t reipl_nss_loadparm_show(struct kobject *kobj, | 852 | static ssize_t reipl_nss_loadparm_show(struct kobject *kobj, |
| 833 | struct kobj_attribute *attr, char *page) | 853 | struct kobj_attribute *attr, char *page) |
| @@ -1125,11 +1145,10 @@ static void reipl_block_ccw_fill_parms(struct ipl_parameter_block *ipb) | |||
| 1125 | /* LOADPARM */ | 1145 | /* LOADPARM */ |
| 1126 | /* check if read scp info worked and set loadparm */ | 1146 | /* check if read scp info worked and set loadparm */ |
| 1127 | if (sclp_ipl_info.is_valid) | 1147 | if (sclp_ipl_info.is_valid) |
| 1128 | memcpy(ipb->ipl_info.ccw.load_parm, | 1148 | memcpy(ipb->hdr.loadparm, &sclp_ipl_info.loadparm, LOADPARM_LEN); |
| 1129 | &sclp_ipl_info.loadparm, LOADPARM_LEN); | ||
| 1130 | else | 1149 | else |
| 1131 | /* read scp info failed: set empty loadparm (EBCDIC blanks) */ | 1150 | /* read scp info failed: set empty loadparm (EBCDIC blanks) */ |
| 1132 | memset(ipb->ipl_info.ccw.load_parm, 0x40, LOADPARM_LEN); | 1151 | memset(ipb->hdr.loadparm, 0x40, LOADPARM_LEN); |
| 1133 | ipb->hdr.flags = DIAG308_FLAGS_LP_VALID; | 1152 | ipb->hdr.flags = DIAG308_FLAGS_LP_VALID; |
| 1134 | 1153 | ||
| 1135 | /* VM PARM */ | 1154 | /* VM PARM */ |
| @@ -1251,9 +1270,16 @@ static int __init reipl_fcp_init(void) | |||
| 1251 | return rc; | 1270 | return rc; |
| 1252 | } | 1271 | } |
| 1253 | 1272 | ||
| 1254 | if (ipl_info.type == IPL_TYPE_FCP) | 1273 | if (ipl_info.type == IPL_TYPE_FCP) { |
| 1255 | memcpy(reipl_block_fcp, IPL_PARMBLOCK_START, PAGE_SIZE); | 1274 | memcpy(reipl_block_fcp, IPL_PARMBLOCK_START, PAGE_SIZE); |
| 1256 | else { | 1275 | /* |
| 1276 | * Fix loadparm: There are systems where the (SCSI) LOADPARM | ||
| 1277 | * is invalid in the SCSI IPL parameter block, so take it | ||
| 1278 | * always from sclp_ipl_info. | ||
| 1279 | */ | ||
| 1280 | memcpy(reipl_block_fcp->hdr.loadparm, sclp_ipl_info.loadparm, | ||
| 1281 | LOADPARM_LEN); | ||
| 1282 | } else { | ||
| 1257 | reipl_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN; | 1283 | reipl_block_fcp->hdr.len = IPL_PARM_BLK_FCP_LEN; |
| 1258 | reipl_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION; | 1284 | reipl_block_fcp->hdr.version = IPL_PARM_BLOCK_VERSION; |
| 1259 | reipl_block_fcp->hdr.blk0_len = IPL_PARM_BLK0_FCP_LEN; | 1285 | reipl_block_fcp->hdr.blk0_len = IPL_PARM_BLK0_FCP_LEN; |
| @@ -1864,7 +1890,23 @@ static void __init shutdown_actions_init(void) | |||
| 1864 | 1890 | ||
| 1865 | static int __init s390_ipl_init(void) | 1891 | static int __init s390_ipl_init(void) |
| 1866 | { | 1892 | { |
| 1893 | char str[8] = {0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}; | ||
| 1894 | |||
| 1867 | sclp_get_ipl_info(&sclp_ipl_info); | 1895 | sclp_get_ipl_info(&sclp_ipl_info); |
| 1896 | /* | ||
| 1897 | * Fix loadparm: There are systems where the (SCSI) LOADPARM | ||
| 1898 | * returned by read SCP info is invalid (contains EBCDIC blanks) | ||
| 1899 | * when the system has been booted via diag308. In that case we use | ||
| 1900 | * the value from diag308, if available. | ||
| 1901 | * | ||
| 1902 | * There are also systems where diag308 store does not work in | ||
| 1903 | * case the system is booted from HMC. Fortunately in this case | ||
| 1904 | * READ SCP info provides the correct value. | ||
| 1905 | */ | ||
| 1906 | if (memcmp(sclp_ipl_info.loadparm, str, sizeof(str)) == 0 && | ||
| 1907 | diag308_set_works) | ||
| 1908 | memcpy(sclp_ipl_info.loadparm, ipl_block.hdr.loadparm, | ||
| 1909 | LOADPARM_LEN); | ||
| 1868 | shutdown_actions_init(); | 1910 | shutdown_actions_init(); |
| 1869 | shutdown_triggers_init(); | 1911 | shutdown_triggers_init(); |
| 1870 | return 0; | 1912 | return 0; |
| @@ -2060,6 +2102,13 @@ void s390_reset_system(void (*func)(void *), void *data) | |||
| 2060 | S390_lowcore.program_new_psw.addr = | 2102 | S390_lowcore.program_new_psw.addr = |
| 2061 | PSW_ADDR_AMODE | (unsigned long) s390_base_pgm_handler; | 2103 | PSW_ADDR_AMODE | (unsigned long) s390_base_pgm_handler; |
| 2062 | 2104 | ||
| 2105 | /* | ||
| 2106 | * Clear subchannel ID and number to signal new kernel that no CCW or | ||
| 2107 | * SCSI IPL has been done (for kexec and kdump) | ||
| 2108 | */ | ||
| 2109 | S390_lowcore.subchannel_id = 0; | ||
| 2110 | S390_lowcore.subchannel_nr = 0; | ||
| 2111 | |||
| 2063 | /* Store status at absolute zero */ | 2112 | /* Store status at absolute zero */ |
| 2064 | store_status(); | 2113 | store_status(); |
| 2065 | 2114 | ||
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index ae1d5be7dd88..82bc113e8c1d 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/stddef.h> | 24 | #include <linux/stddef.h> |
| 25 | #include <linux/unistd.h> | 25 | #include <linux/unistd.h> |
| 26 | #include <linux/ptrace.h> | 26 | #include <linux/ptrace.h> |
| 27 | #include <linux/random.h> | ||
| 27 | #include <linux/user.h> | 28 | #include <linux/user.h> |
| 28 | #include <linux/tty.h> | 29 | #include <linux/tty.h> |
| 29 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
| @@ -61,6 +62,7 @@ | |||
| 61 | #include <asm/diag.h> | 62 | #include <asm/diag.h> |
| 62 | #include <asm/os_info.h> | 63 | #include <asm/os_info.h> |
| 63 | #include <asm/sclp.h> | 64 | #include <asm/sclp.h> |
| 65 | #include <asm/sysinfo.h> | ||
| 64 | #include "entry.h" | 66 | #include "entry.h" |
| 65 | 67 | ||
| 66 | /* | 68 | /* |
| @@ -766,6 +768,7 @@ static void __init setup_hwcaps(void) | |||
| 766 | #endif | 768 | #endif |
| 767 | 769 | ||
| 768 | get_cpu_id(&cpu_id); | 770 | get_cpu_id(&cpu_id); |
| 771 | add_device_randomness(&cpu_id, sizeof(cpu_id)); | ||
| 769 | switch (cpu_id.machine) { | 772 | switch (cpu_id.machine) { |
| 770 | case 0x9672: | 773 | case 0x9672: |
| 771 | #if !defined(CONFIG_64BIT) | 774 | #if !defined(CONFIG_64BIT) |
| @@ -804,6 +807,19 @@ static void __init setup_hwcaps(void) | |||
| 804 | } | 807 | } |
| 805 | 808 | ||
| 806 | /* | 809 | /* |
| 810 | * Add system information as device randomness | ||
| 811 | */ | ||
| 812 | static void __init setup_randomness(void) | ||
| 813 | { | ||
| 814 | struct sysinfo_3_2_2 *vmms; | ||
| 815 | |||
| 816 | vmms = (struct sysinfo_3_2_2 *) alloc_page(GFP_KERNEL); | ||
| 817 | if (vmms && stsi(vmms, 3, 2, 2) == 0 && vmms->count) | ||
| 818 | add_device_randomness(&vmms, vmms->count); | ||
| 819 | free_page((unsigned long) vmms); | ||
| 820 | } | ||
| 821 | |||
| 822 | /* | ||
| 807 | * Setup function called from init/main.c just after the banner | 823 | * Setup function called from init/main.c just after the banner |
| 808 | * was printed. | 824 | * was printed. |
| 809 | */ | 825 | */ |
| @@ -901,6 +917,9 @@ void __init setup_arch(char **cmdline_p) | |||
| 901 | 917 | ||
| 902 | /* Setup zfcpdump support */ | 918 | /* Setup zfcpdump support */ |
| 903 | setup_zfcpdump(); | 919 | setup_zfcpdump(); |
| 920 | |||
| 921 | /* Add system specific data to the random pool */ | ||
| 922 | setup_randomness(); | ||
| 904 | } | 923 | } |
| 905 | 924 | ||
| 906 | #ifdef CONFIG_32BIT | 925 | #ifdef CONFIG_32BIT |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index fe5cdf29a001..6fe886ac2db5 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
| @@ -356,3 +356,6 @@ SYSCALL(sys_finit_module,sys_finit_module,compat_sys_finit_module) | |||
| 356 | SYSCALL(sys_sched_setattr,sys_sched_setattr,compat_sys_sched_setattr) /* 345 */ | 356 | SYSCALL(sys_sched_setattr,sys_sched_setattr,compat_sys_sched_setattr) /* 345 */ |
| 357 | SYSCALL(sys_sched_getattr,sys_sched_getattr,compat_sys_sched_getattr) | 357 | SYSCALL(sys_sched_getattr,sys_sched_getattr,compat_sys_sched_getattr) |
| 358 | SYSCALL(sys_renameat2,sys_renameat2,compat_sys_renameat2) | 358 | SYSCALL(sys_renameat2,sys_renameat2,compat_sys_renameat2) |
| 359 | SYSCALL(sys_seccomp,sys_seccomp,compat_sys_seccomp) | ||
| 360 | SYSCALL(sys_getrandom,sys_getrandom,compat_sys_getrandom) | ||
| 361 | SYSCALL(sys_memfd_create,sys_memfd_create,compat_sys_memfd_create) /* 350 */ | ||
diff --git a/arch/s390/kernel/vdso32/clock_gettime.S b/arch/s390/kernel/vdso32/clock_gettime.S index 65fc3979c2f1..7cf18f8d4cb4 100644 --- a/arch/s390/kernel/vdso32/clock_gettime.S +++ b/arch/s390/kernel/vdso32/clock_gettime.S | |||
| @@ -22,13 +22,11 @@ __kernel_clock_gettime: | |||
| 22 | basr %r5,0 | 22 | basr %r5,0 |
| 23 | 0: al %r5,21f-0b(%r5) /* get &_vdso_data */ | 23 | 0: al %r5,21f-0b(%r5) /* get &_vdso_data */ |
| 24 | chi %r2,__CLOCK_REALTIME | 24 | chi %r2,__CLOCK_REALTIME |
| 25 | je 10f | 25 | je 11f |
| 26 | chi %r2,__CLOCK_MONOTONIC | 26 | chi %r2,__CLOCK_MONOTONIC |
| 27 | jne 19f | 27 | jne 19f |
| 28 | 28 | ||
| 29 | /* CLOCK_MONOTONIC */ | 29 | /* CLOCK_MONOTONIC */ |
| 30 | ltr %r3,%r3 | ||
| 31 | jz 9f /* tp == NULL */ | ||
| 32 | 1: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ | 30 | 1: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ |
| 33 | tml %r4,0x0001 /* pending update ? loop */ | 31 | tml %r4,0x0001 /* pending update ? loop */ |
| 34 | jnz 1b | 32 | jnz 1b |
| @@ -67,12 +65,10 @@ __kernel_clock_gettime: | |||
| 67 | j 6b | 65 | j 6b |
| 68 | 8: st %r2,0(%r3) /* store tp->tv_sec */ | 66 | 8: st %r2,0(%r3) /* store tp->tv_sec */ |
| 69 | st %r1,4(%r3) /* store tp->tv_nsec */ | 67 | st %r1,4(%r3) /* store tp->tv_nsec */ |
| 70 | 9: lhi %r2,0 | 68 | lhi %r2,0 |
| 71 | br %r14 | 69 | br %r14 |
| 72 | 70 | ||
| 73 | /* CLOCK_REALTIME */ | 71 | /* CLOCK_REALTIME */ |
| 74 | 10: ltr %r3,%r3 /* tp == NULL */ | ||
| 75 | jz 18f | ||
| 76 | 11: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ | 72 | 11: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */ |
| 77 | tml %r4,0x0001 /* pending update ? loop */ | 73 | tml %r4,0x0001 /* pending update ? loop */ |
| 78 | jnz 11b | 74 | jnz 11b |
| @@ -111,7 +107,7 @@ __kernel_clock_gettime: | |||
| 111 | j 15b | 107 | j 15b |
| 112 | 17: st %r2,0(%r3) /* store tp->tv_sec */ | 108 | 17: st %r2,0(%r3) /* store tp->tv_sec */ |
| 113 | st %r1,4(%r3) /* store tp->tv_nsec */ | 109 | st %r1,4(%r3) /* store tp->tv_nsec */ |
| 114 | 18: lhi %r2,0 | 110 | lhi %r2,0 |
| 115 | br %r14 | 111 | br %r14 |
| 116 | 112 | ||
| 117 | /* Fallback to system call */ | 113 | /* Fallback to system call */ |
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S index 91940ed33a4a..3f34e09db5f4 100644 --- a/arch/s390/kernel/vdso64/clock_gettime.S +++ b/arch/s390/kernel/vdso64/clock_gettime.S | |||
| @@ -21,7 +21,7 @@ __kernel_clock_gettime: | |||
| 21 | .cfi_startproc | 21 | .cfi_startproc |
| 22 | larl %r5,_vdso_data | 22 | larl %r5,_vdso_data |
| 23 | cghi %r2,__CLOCK_REALTIME | 23 | cghi %r2,__CLOCK_REALTIME |
| 24 | je 4f | 24 | je 5f |
| 25 | cghi %r2,__CLOCK_THREAD_CPUTIME_ID | 25 | cghi %r2,__CLOCK_THREAD_CPUTIME_ID |
| 26 | je 9f | 26 | je 9f |
| 27 | cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */ | 27 | cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */ |
| @@ -30,8 +30,6 @@ __kernel_clock_gettime: | |||
| 30 | jne 12f | 30 | jne 12f |
| 31 | 31 | ||
| 32 | /* CLOCK_MONOTONIC */ | 32 | /* CLOCK_MONOTONIC */ |
| 33 | ltgr %r3,%r3 | ||
| 34 | jz 3f /* tp == NULL */ | ||
| 35 | 0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 33 | 0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
| 36 | tmll %r4,0x0001 /* pending update ? loop */ | 34 | tmll %r4,0x0001 /* pending update ? loop */ |
| 37 | jnz 0b | 35 | jnz 0b |
| @@ -53,12 +51,10 @@ __kernel_clock_gettime: | |||
| 53 | j 1b | 51 | j 1b |
| 54 | 2: stg %r0,0(%r3) /* store tp->tv_sec */ | 52 | 2: stg %r0,0(%r3) /* store tp->tv_sec */ |
| 55 | stg %r1,8(%r3) /* store tp->tv_nsec */ | 53 | stg %r1,8(%r3) /* store tp->tv_nsec */ |
| 56 | 3: lghi %r2,0 | 54 | lghi %r2,0 |
| 57 | br %r14 | 55 | br %r14 |
| 58 | 56 | ||
| 59 | /* CLOCK_REALTIME */ | 57 | /* CLOCK_REALTIME */ |
| 60 | 4: ltr %r3,%r3 /* tp == NULL */ | ||
| 61 | jz 8f | ||
| 62 | 5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 58 | 5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
| 63 | tmll %r4,0x0001 /* pending update ? loop */ | 59 | tmll %r4,0x0001 /* pending update ? loop */ |
| 64 | jnz 5b | 60 | jnz 5b |
| @@ -80,7 +76,7 @@ __kernel_clock_gettime: | |||
| 80 | j 6b | 76 | j 6b |
| 81 | 7: stg %r0,0(%r3) /* store tp->tv_sec */ | 77 | 7: stg %r0,0(%r3) /* store tp->tv_sec */ |
| 82 | stg %r1,8(%r3) /* store tp->tv_nsec */ | 78 | stg %r1,8(%r3) /* store tp->tv_nsec */ |
| 83 | 8: lghi %r2,0 | 79 | lghi %r2,0 |
| 84 | br %r14 | 80 | br %r14 |
| 85 | 81 | ||
| 86 | /* CLOCK_THREAD_CPUTIME_ID for this thread */ | 82 | /* CLOCK_THREAD_CPUTIME_ID for this thread */ |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index ce81eb2ab76a..81b0e11521e4 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
| @@ -1317,19 +1317,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
| 1317 | return -EINVAL; | 1317 | return -EINVAL; |
| 1318 | } | 1318 | } |
| 1319 | 1319 | ||
| 1320 | switch (kvm_run->exit_reason) { | ||
| 1321 | case KVM_EXIT_S390_SIEIC: | ||
| 1322 | case KVM_EXIT_UNKNOWN: | ||
| 1323 | case KVM_EXIT_INTR: | ||
| 1324 | case KVM_EXIT_S390_RESET: | ||
| 1325 | case KVM_EXIT_S390_UCONTROL: | ||
| 1326 | case KVM_EXIT_S390_TSCH: | ||
| 1327 | case KVM_EXIT_DEBUG: | ||
| 1328 | break; | ||
| 1329 | default: | ||
| 1330 | BUG(); | ||
| 1331 | } | ||
| 1332 | |||
| 1333 | vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask; | 1320 | vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask; |
| 1334 | vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr; | 1321 | vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr; |
| 1335 | if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) { | 1322 | if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) { |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 0c1073ed1e84..c7235e01fd67 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
| @@ -43,6 +43,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); | |||
| 43 | 43 | ||
| 44 | unsigned long empty_zero_page, zero_page_mask; | 44 | unsigned long empty_zero_page, zero_page_mask; |
| 45 | EXPORT_SYMBOL(empty_zero_page); | 45 | EXPORT_SYMBOL(empty_zero_page); |
| 46 | EXPORT_SYMBOL(zero_page_mask); | ||
| 46 | 47 | ||
| 47 | static void __init setup_zero_pages(void) | 48 | static void __init setup_zero_pages(void) |
| 48 | { | 49 | { |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 19daa53a3da4..5404a6261db9 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
| @@ -986,11 +986,21 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr, | |||
| 986 | pte_t *ptep; | 986 | pte_t *ptep; |
| 987 | 987 | ||
| 988 | down_read(&mm->mmap_sem); | 988 | down_read(&mm->mmap_sem); |
| 989 | retry: | ||
| 989 | ptep = get_locked_pte(current->mm, addr, &ptl); | 990 | ptep = get_locked_pte(current->mm, addr, &ptl); |
| 990 | if (unlikely(!ptep)) { | 991 | if (unlikely(!ptep)) { |
| 991 | up_read(&mm->mmap_sem); | 992 | up_read(&mm->mmap_sem); |
| 992 | return -EFAULT; | 993 | return -EFAULT; |
| 993 | } | 994 | } |
| 995 | if (!(pte_val(*ptep) & _PAGE_INVALID) && | ||
| 996 | (pte_val(*ptep) & _PAGE_PROTECT)) { | ||
| 997 | pte_unmap_unlock(*ptep, ptl); | ||
| 998 | if (fixup_user_fault(current, mm, addr, FAULT_FLAG_WRITE)) { | ||
| 999 | up_read(&mm->mmap_sem); | ||
| 1000 | return -EFAULT; | ||
| 1001 | } | ||
| 1002 | goto retry; | ||
| 1003 | } | ||
| 994 | 1004 | ||
| 995 | new = old = pgste_get_lock(ptep); | 1005 | new = old = pgste_get_lock(ptep); |
| 996 | pgste_val(new) &= ~(PGSTE_GR_BIT | PGSTE_GC_BIT | | 1006 | pgste_val(new) &= ~(PGSTE_GR_BIT | PGSTE_GC_BIT | |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index b319846ad97f..244fb4c81e25 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
| @@ -598,8 +598,6 @@ source kernel/Kconfig.hz | |||
| 598 | config KEXEC | 598 | config KEXEC |
| 599 | bool "kexec system call (EXPERIMENTAL)" | 599 | bool "kexec system call (EXPERIMENTAL)" |
| 600 | depends on SUPERH32 && MMU | 600 | depends on SUPERH32 && MMU |
| 601 | select CRYPTO | ||
| 602 | select CRYPTO_SHA256 | ||
| 603 | help | 601 | help |
| 604 | kexec is a system call that implements the ability to shutdown your | 602 | kexec is a system call that implements the ability to shutdown your |
| 605 | current kernel, and to start another kernel. It is like a reboot | 603 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/sh/configs/sdk7780_defconfig b/arch/sh/configs/sdk7780_defconfig index 6a96b9a2f7a5..bbd4c2298708 100644 --- a/arch/sh/configs/sdk7780_defconfig +++ b/arch/sh/configs/sdk7780_defconfig | |||
| @@ -30,6 +30,7 @@ CONFIG_PCI_DEBUG=y | |||
| 30 | CONFIG_PCCARD=y | 30 | CONFIG_PCCARD=y |
| 31 | CONFIG_YENTA=y | 31 | CONFIG_YENTA=y |
| 32 | CONFIG_HOTPLUG_PCI=y | 32 | CONFIG_HOTPLUG_PCI=y |
| 33 | CONFIG_NET=y | ||
| 33 | CONFIG_PACKET=y | 34 | CONFIG_PACKET=y |
| 34 | CONFIG_UNIX=y | 35 | CONFIG_UNIX=y |
| 35 | CONFIG_INET=y | 36 | CONFIG_INET=y |
diff --git a/arch/sh/configs/sh2007_defconfig b/arch/sh/configs/sh2007_defconfig index e741b1e36acd..df25ae774ee0 100644 --- a/arch/sh/configs/sh2007_defconfig +++ b/arch/sh/configs/sh2007_defconfig | |||
| @@ -25,6 +25,7 @@ CONFIG_CMDLINE_OVERWRITE=y | |||
| 25 | CONFIG_CMDLINE="console=ttySC1,115200 ip=dhcp root=/dev/nfs rw nfsroot=/nfs/rootfs,rsize=1024,wsize=1024 earlyprintk=sh-sci.1" | 25 | CONFIG_CMDLINE="console=ttySC1,115200 ip=dhcp root=/dev/nfs rw nfsroot=/nfs/rootfs,rsize=1024,wsize=1024 earlyprintk=sh-sci.1" |
| 26 | CONFIG_PCCARD=y | 26 | CONFIG_PCCARD=y |
| 27 | CONFIG_BINFMT_MISC=y | 27 | CONFIG_BINFMT_MISC=y |
| 28 | CONFIG_NET=y | ||
| 28 | CONFIG_PACKET=y | 29 | CONFIG_PACKET=y |
| 29 | CONFIG_UNIX=y | 30 | CONFIG_UNIX=y |
| 30 | CONFIG_XFRM_USER=y | 31 | CONFIG_XFRM_USER=y |
diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c index 097c2cdd117f..f770e3992620 100644 --- a/arch/sh/mm/cache.c +++ b/arch/sh/mm/cache.c | |||
| @@ -229,6 +229,7 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
| 229 | 229 | ||
| 230 | cacheop_on_each_cpu(local_flush_icache_range, (void *)&data, 1); | 230 | cacheop_on_each_cpu(local_flush_icache_range, (void *)&data, 1); |
| 231 | } | 231 | } |
| 232 | EXPORT_SYMBOL(flush_icache_range); | ||
| 232 | 233 | ||
| 233 | void flush_icache_page(struct vm_area_struct *vma, struct page *page) | 234 | void flush_icache_page(struct vm_area_struct *vma, struct page *page) |
| 234 | { | 235 | { |
diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index bf8daf9d9c9b..37458f38b220 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c | |||
| @@ -105,6 +105,8 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr, | |||
| 105 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); | 105 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); |
| 106 | page = pte_page(pte); | 106 | page = pte_page(pte); |
| 107 | get_page(page); | 107 | get_page(page); |
| 108 | __flush_anon_page(page, addr); | ||
| 109 | flush_dcache_page(page); | ||
| 108 | pages[*nr] = page; | 110 | pages[*nr] = page; |
| 109 | (*nr)++; | 111 | (*nr)++; |
| 110 | 112 | ||
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig index 9d8521b8c854..6b68f12f29db 100644 --- a/arch/sparc/configs/sparc64_defconfig +++ b/arch/sparc/configs/sparc64_defconfig | |||
| @@ -29,6 +29,7 @@ CONFIG_PCI=y | |||
| 29 | CONFIG_PCI_MSI=y | 29 | CONFIG_PCI_MSI=y |
| 30 | CONFIG_SUN_OPENPROMFS=m | 30 | CONFIG_SUN_OPENPROMFS=m |
| 31 | CONFIG_BINFMT_MISC=m | 31 | CONFIG_BINFMT_MISC=m |
| 32 | CONFIG_NET=y | ||
| 32 | CONFIG_PACKET=y | 33 | CONFIG_PACKET=y |
| 33 | CONFIG_UNIX=y | 34 | CONFIG_UNIX=y |
| 34 | CONFIG_XFRM_USER=m | 35 | CONFIG_XFRM_USER=m |
diff --git a/arch/sparc/net/bpf_jit_asm.S b/arch/sparc/net/bpf_jit_asm.S index 9d016c7017f7..8c83f4b8eb15 100644 --- a/arch/sparc/net/bpf_jit_asm.S +++ b/arch/sparc/net/bpf_jit_asm.S | |||
| @@ -6,10 +6,12 @@ | |||
| 6 | #define SAVE_SZ 176 | 6 | #define SAVE_SZ 176 |
| 7 | #define SCRATCH_OFF STACK_BIAS + 128 | 7 | #define SCRATCH_OFF STACK_BIAS + 128 |
| 8 | #define BE_PTR(label) be,pn %xcc, label | 8 | #define BE_PTR(label) be,pn %xcc, label |
| 9 | #define SIGN_EXTEND(reg) sra reg, 0, reg | ||
| 9 | #else | 10 | #else |
| 10 | #define SAVE_SZ 96 | 11 | #define SAVE_SZ 96 |
| 11 | #define SCRATCH_OFF 72 | 12 | #define SCRATCH_OFF 72 |
| 12 | #define BE_PTR(label) be label | 13 | #define BE_PTR(label) be label |
| 14 | #define SIGN_EXTEND(reg) | ||
| 13 | #endif | 15 | #endif |
| 14 | 16 | ||
| 15 | #define SKF_MAX_NEG_OFF (-0x200000) /* SKF_LL_OFF from filter.h */ | 17 | #define SKF_MAX_NEG_OFF (-0x200000) /* SKF_LL_OFF from filter.h */ |
| @@ -135,6 +137,7 @@ bpf_slow_path_byte_msh: | |||
| 135 | save %sp, -SAVE_SZ, %sp; \ | 137 | save %sp, -SAVE_SZ, %sp; \ |
| 136 | mov %i0, %o0; \ | 138 | mov %i0, %o0; \ |
| 137 | mov r_OFF, %o1; \ | 139 | mov r_OFF, %o1; \ |
| 140 | SIGN_EXTEND(%o1); \ | ||
| 138 | call bpf_internal_load_pointer_neg_helper; \ | 141 | call bpf_internal_load_pointer_neg_helper; \ |
| 139 | mov (LEN), %o2; \ | 142 | mov (LEN), %o2; \ |
| 140 | mov %o0, r_TMP; \ | 143 | mov %o0, r_TMP; \ |
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index 1f76c22a6a75..ece4af0575e9 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
| @@ -184,7 +184,7 @@ do { \ | |||
| 184 | */ | 184 | */ |
| 185 | #define emit_alu_K(OPCODE, K) \ | 185 | #define emit_alu_K(OPCODE, K) \ |
| 186 | do { \ | 186 | do { \ |
| 187 | if (K) { \ | 187 | if (K || OPCODE == AND || OPCODE == MUL) { \ |
| 188 | unsigned int _insn = OPCODE; \ | 188 | unsigned int _insn = OPCODE; \ |
| 189 | _insn |= RS1(r_A) | RD(r_A); \ | 189 | _insn |= RS1(r_A) | RD(r_A); \ |
| 190 | if (is_simm13(K)) { \ | 190 | if (is_simm13(K)) { \ |
| @@ -234,12 +234,18 @@ do { BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(u8)); \ | |||
| 234 | __emit_load8(BASE, STRUCT, FIELD, DEST); \ | 234 | __emit_load8(BASE, STRUCT, FIELD, DEST); \ |
| 235 | } while (0) | 235 | } while (0) |
| 236 | 236 | ||
| 237 | #define emit_ldmem(OFF, DEST) \ | 237 | #ifdef CONFIG_SPARC64 |
| 238 | do { *prog++ = LD32I | RS1(FP) | S13(-(OFF)) | RD(DEST); \ | 238 | #define BIAS (STACK_BIAS - 4) |
| 239 | #else | ||
| 240 | #define BIAS (-4) | ||
| 241 | #endif | ||
| 242 | |||
| 243 | #define emit_ldmem(OFF, DEST) \ | ||
| 244 | do { *prog++ = LD32I | RS1(SP) | S13(BIAS - (OFF)) | RD(DEST); \ | ||
| 239 | } while (0) | 245 | } while (0) |
| 240 | 246 | ||
| 241 | #define emit_stmem(OFF, SRC) \ | 247 | #define emit_stmem(OFF, SRC) \ |
| 242 | do { *prog++ = LD32I | RS1(FP) | S13(-(OFF)) | RD(SRC); \ | 248 | do { *prog++ = ST32I | RS1(SP) | S13(BIAS - (OFF)) | RD(SRC); \ |
| 243 | } while (0) | 249 | } while (0) |
| 244 | 250 | ||
| 245 | #ifdef CONFIG_SMP | 251 | #ifdef CONFIG_SMP |
| @@ -615,10 +621,11 @@ void bpf_jit_compile(struct bpf_prog *fp) | |||
| 615 | case BPF_ANC | SKF_AD_VLAN_TAG: | 621 | case BPF_ANC | SKF_AD_VLAN_TAG: |
| 616 | case BPF_ANC | SKF_AD_VLAN_TAG_PRESENT: | 622 | case BPF_ANC | SKF_AD_VLAN_TAG_PRESENT: |
| 617 | emit_skb_load16(vlan_tci, r_A); | 623 | emit_skb_load16(vlan_tci, r_A); |
| 618 | if (code == (BPF_ANC | SKF_AD_VLAN_TAG)) { | 624 | if (code != (BPF_ANC | SKF_AD_VLAN_TAG)) { |
| 619 | emit_andi(r_A, VLAN_VID_MASK, r_A); | 625 | emit_alu_K(SRL, 12); |
| 626 | emit_andi(r_A, 1, r_A); | ||
| 620 | } else { | 627 | } else { |
| 621 | emit_loadimm(VLAN_TAG_PRESENT, r_TMP); | 628 | emit_loadimm(~VLAN_TAG_PRESENT, r_TMP); |
| 622 | emit_and(r_A, r_TMP, r_A); | 629 | emit_and(r_A, r_TMP, r_A); |
| 623 | } | 630 | } |
| 624 | break; | 631 | break; |
| @@ -630,15 +637,19 @@ void bpf_jit_compile(struct bpf_prog *fp) | |||
| 630 | emit_loadimm(K, r_X); | 637 | emit_loadimm(K, r_X); |
| 631 | break; | 638 | break; |
| 632 | case BPF_LD | BPF_MEM: | 639 | case BPF_LD | BPF_MEM: |
| 640 | seen |= SEEN_MEM; | ||
| 633 | emit_ldmem(K * 4, r_A); | 641 | emit_ldmem(K * 4, r_A); |
| 634 | break; | 642 | break; |
| 635 | case BPF_LDX | BPF_MEM: | 643 | case BPF_LDX | BPF_MEM: |
| 644 | seen |= SEEN_MEM | SEEN_XREG; | ||
| 636 | emit_ldmem(K * 4, r_X); | 645 | emit_ldmem(K * 4, r_X); |
| 637 | break; | 646 | break; |
| 638 | case BPF_ST: | 647 | case BPF_ST: |
| 648 | seen |= SEEN_MEM; | ||
| 639 | emit_stmem(K * 4, r_A); | 649 | emit_stmem(K * 4, r_A); |
| 640 | break; | 650 | break; |
| 641 | case BPF_STX: | 651 | case BPF_STX: |
| 652 | seen |= SEEN_MEM | SEEN_XREG; | ||
| 642 | emit_stmem(K * 4, r_X); | 653 | emit_stmem(K * 4, r_X); |
| 643 | break; | 654 | break; |
| 644 | 655 | ||
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index a3ffe2dd4832..7fcd492adbfc 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
| @@ -191,8 +191,6 @@ source "kernel/Kconfig.hz" | |||
| 191 | 191 | ||
| 192 | config KEXEC | 192 | config KEXEC |
| 193 | bool "kexec system call" | 193 | bool "kexec system call" |
| 194 | select CRYPTO | ||
| 195 | select CRYPTO_SHA256 | ||
| 196 | ---help--- | 194 | ---help--- |
| 197 | kexec is a system call that implements the ability to shutdown your | 195 | kexec is a system call that implements the ability to shutdown your |
| 198 | current kernel, and to start another kernel. It is like a reboot | 196 | current kernel, and to start another kernel. It is like a reboot |
diff --git a/arch/tile/kernel/smp.c b/arch/tile/kernel/smp.c index 01e8ab29f43a..19eaa62d456a 100644 --- a/arch/tile/kernel/smp.c +++ b/arch/tile/kernel/smp.c | |||
| @@ -183,6 +183,7 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
| 183 | preempt_enable(); | 183 | preempt_enable(); |
| 184 | } | 184 | } |
| 185 | } | 185 | } |
| 186 | EXPORT_SYMBOL(flush_icache_range); | ||
| 186 | 187 | ||
| 187 | 188 | ||
| 188 | /* Called when smp_send_reschedule() triggers IRQ_RESCHEDULE. */ | 189 | /* Called when smp_send_reschedule() triggers IRQ_RESCHEDULE. */ |
diff --git a/arch/unicore32/kernel/signal.c b/arch/unicore32/kernel/signal.c index 780d77388dec..7c8fb7018dc6 100644 --- a/arch/unicore32/kernel/signal.c +++ b/arch/unicore32/kernel/signal.c | |||
| @@ -254,7 +254,8 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set, | |||
| 254 | 254 | ||
| 255 | err |= setup_sigframe(frame, regs, set); | 255 | err |= setup_sigframe(frame, regs, set); |
| 256 | if (err == 0) | 256 | if (err == 0) |
| 257 | err |= setup_return(regs, &ksig->ka, frame->retcode, frame, usig); | 257 | err |= setup_return(regs, &ksig->ka, frame->retcode, frame, |
| 258 | ksig->sig); | ||
| 258 | 259 | ||
| 259 | return err; | 260 | return err; |
| 260 | } | 261 | } |
| @@ -276,7 +277,8 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, | |||
| 276 | err |= __save_altstack(&frame->sig.uc.uc_stack, regs->UCreg_sp); | 277 | err |= __save_altstack(&frame->sig.uc.uc_stack, regs->UCreg_sp); |
| 277 | err |= setup_sigframe(&frame->sig, regs, set); | 278 | err |= setup_sigframe(&frame->sig, regs, set); |
| 278 | if (err == 0) | 279 | if (err == 0) |
| 279 | err |= setup_return(regs, &ksig->ka, frame->sig.retcode, frame, usig); | 280 | err |= setup_return(regs, &ksig->ka, frame->sig.retcode, frame, |
| 281 | ksig->sig); | ||
| 280 | 282 | ||
| 281 | if (err == 0) { | 283 | if (err == 0) { |
| 282 | /* | 284 | /* |
| @@ -303,7 +305,6 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs, | |||
| 303 | int syscall) | 305 | int syscall) |
| 304 | { | 306 | { |
| 305 | struct thread_info *thread = current_thread_info(); | 307 | struct thread_info *thread = current_thread_info(); |
| 306 | struct task_struct *tsk = current; | ||
| 307 | sigset_t *oldset = sigmask_to_save(); | 308 | sigset_t *oldset = sigmask_to_save(); |
| 308 | int usig = ksig->sig; | 309 | int usig = ksig->sig; |
| 309 | int ret; | 310 | int ret; |
| @@ -373,7 +374,7 @@ static void do_signal(struct pt_regs *regs, int syscall) | |||
| 373 | if (!user_mode(regs)) | 374 | if (!user_mode(regs)) |
| 374 | return; | 375 | return; |
| 375 | 376 | ||
| 376 | if (get_signsl(&ksig)) { | 377 | if (get_signal(&ksig)) { |
| 377 | handle_signal(&ksig, regs, syscall); | 378 | handle_signal(&ksig, regs, syscall); |
| 378 | return; | 379 | return; |
| 379 | } | 380 | } |
diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild index 61b6d51866f8..3942f74c92d7 100644 --- a/arch/x86/Kbuild +++ b/arch/x86/Kbuild | |||
| @@ -17,6 +17,4 @@ obj-$(CONFIG_IA32_EMULATION) += ia32/ | |||
| 17 | obj-y += platform/ | 17 | obj-y += platform/ |
| 18 | obj-y += net/ | 18 | obj-y += net/ |
| 19 | 19 | ||
| 20 | ifeq ($(CONFIG_X86_64),y) | 20 | obj-$(CONFIG_KEXEC_FILE) += purgatory/ |
| 21 | obj-$(CONFIG_KEXEC) += purgatory/ | ||
| 22 | endif | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5d0bf1aa9dcb..e4b1f431c7ed 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -23,6 +23,7 @@ config X86 | |||
| 23 | def_bool y | 23 | def_bool y |
| 24 | select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI | 24 | select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI |
| 25 | select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS | 25 | select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS |
| 26 | select ARCH_HAS_FAST_MULTIPLIER | ||
| 26 | select ARCH_MIGHT_HAVE_PC_PARPORT | 27 | select ARCH_MIGHT_HAVE_PC_PARPORT |
| 27 | select ARCH_MIGHT_HAVE_PC_SERIO | 28 | select ARCH_MIGHT_HAVE_PC_SERIO |
| 28 | select HAVE_AOUT if X86_32 | 29 | select HAVE_AOUT if X86_32 |
| @@ -136,6 +137,7 @@ config X86 | |||
| 136 | select HAVE_ACPI_APEI if ACPI | 137 | select HAVE_ACPI_APEI if ACPI |
| 137 | select HAVE_ACPI_APEI_NMI if ACPI | 138 | select HAVE_ACPI_APEI_NMI if ACPI |
| 138 | select ACPI_LEGACY_TABLES_LOOKUP if ACPI | 139 | select ACPI_LEGACY_TABLES_LOOKUP if ACPI |
| 140 | select X86_FEATURE_NAMES if PROC_FS | ||
| 139 | 141 | ||
| 140 | config INSTRUCTION_DECODER | 142 | config INSTRUCTION_DECODER |
| 141 | def_bool y | 143 | def_bool y |
| @@ -313,6 +315,17 @@ config SMP | |||
| 313 | 315 | ||
| 314 | If you don't know what to do here, say N. | 316 | If you don't know what to do here, say N. |
| 315 | 317 | ||
| 318 | config X86_FEATURE_NAMES | ||
| 319 | bool "Processor feature human-readable names" if EMBEDDED | ||
| 320 | default y | ||
| 321 | ---help--- | ||
| 322 | This option compiles in a table of x86 feature bits and corresponding | ||
| 323 | names. This is required to support /proc/cpuinfo and a few kernel | ||
| 324 | messages. You can disable this to save space, at the expense of | ||
| 325 | making those few kernel messages show numeric feature bits instead. | ||
| 326 | |||
| 327 | If in doubt, say Y. | ||
| 328 | |||
| 316 | config X86_X2APIC | 329 | config X86_X2APIC |
| 317 | bool "Support x2apic" | 330 | bool "Support x2apic" |
| 318 | depends on X86_LOCAL_APIC && X86_64 && IRQ_REMAP | 331 | depends on X86_LOCAL_APIC && X86_64 && IRQ_REMAP |
| @@ -1585,9 +1598,6 @@ source kernel/Kconfig.hz | |||
| 1585 | 1598 | ||
| 1586 | config KEXEC | 1599 | config KEXEC |
| 1587 | bool "kexec system call" | 1600 | bool "kexec system call" |
| 1588 | select BUILD_BIN2C | ||
| 1589 | select CRYPTO | ||
| 1590 | select CRYPTO_SHA256 | ||
| 1591 | ---help--- | 1601 | ---help--- |
| 1592 | kexec is a system call that implements the ability to shutdown your | 1602 | kexec is a system call that implements the ability to shutdown your |
| 1593 | current kernel, and to start another kernel. It is like a reboot | 1603 | current kernel, and to start another kernel. It is like a reboot |
| @@ -1602,9 +1612,22 @@ config KEXEC | |||
| 1602 | interface is strongly in flux, so no good recommendation can be | 1612 | interface is strongly in flux, so no good recommendation can be |
| 1603 | made. | 1613 | made. |
| 1604 | 1614 | ||
| 1615 | config KEXEC_FILE | ||
| 1616 | bool "kexec file based system call" | ||
| 1617 | select BUILD_BIN2C | ||
| 1618 | depends on KEXEC | ||
| 1619 | depends on X86_64 | ||
| 1620 | depends on CRYPTO=y | ||
| 1621 | depends on CRYPTO_SHA256=y | ||
| 1622 | ---help--- | ||
| 1623 | This is new version of kexec system call. This system call is | ||
| 1624 | file based and takes file descriptors as system call argument | ||
| 1625 | for kernel and initramfs as opposed to list of segments as | ||
| 1626 | accepted by previous system call. | ||
| 1627 | |||
| 1605 | config KEXEC_VERIFY_SIG | 1628 | config KEXEC_VERIFY_SIG |
| 1606 | bool "Verify kernel signature during kexec_file_load() syscall" | 1629 | bool "Verify kernel signature during kexec_file_load() syscall" |
| 1607 | depends on KEXEC | 1630 | depends on KEXEC_FILE |
| 1608 | ---help--- | 1631 | ---help--- |
| 1609 | This option makes kernel signature verification mandatory for | 1632 | This option makes kernel signature verification mandatory for |
| 1610 | kexec_file_load() syscall. If kernel is signature can not be | 1633 | kexec_file_load() syscall. If kernel is signature can not be |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index c1aa36887843..5692d6ac0f18 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
| @@ -184,11 +184,8 @@ archheaders: | |||
| 184 | $(Q)$(MAKE) $(build)=arch/x86/syscalls all | 184 | $(Q)$(MAKE) $(build)=arch/x86/syscalls all |
| 185 | 185 | ||
| 186 | archprepare: | 186 | archprepare: |
| 187 | ifeq ($(CONFIG_KEXEC),y) | 187 | ifeq ($(CONFIG_KEXEC_FILE),y) |
| 188 | # Build only for 64bit. No loaders for 32bit yet. | ||
| 189 | ifeq ($(CONFIG_X86_64),y) | ||
| 190 | $(Q)$(MAKE) $(build)=arch/x86/purgatory arch/x86/purgatory/kexec-purgatory.c | 188 | $(Q)$(MAKE) $(build)=arch/x86/purgatory arch/x86/purgatory/kexec-purgatory.c |
| 191 | endif | ||
| 192 | endif | 189 | endif |
| 193 | 190 | ||
| 194 | ### | 191 | ### |
| @@ -254,12 +251,7 @@ archclean: | |||
| 254 | $(Q)rm -rf $(objtree)/arch/x86_64 | 251 | $(Q)rm -rf $(objtree)/arch/x86_64 |
| 255 | $(Q)$(MAKE) $(clean)=$(boot) | 252 | $(Q)$(MAKE) $(clean)=$(boot) |
| 256 | $(Q)$(MAKE) $(clean)=arch/x86/tools | 253 | $(Q)$(MAKE) $(clean)=arch/x86/tools |
| 257 | 254 | $(Q)$(MAKE) $(clean)=arch/x86/purgatory | |
| 258 | PHONY += kvmconfig | ||
| 259 | kvmconfig: | ||
| 260 | $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target)) | ||
| 261 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config | ||
| 262 | $(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig | ||
| 263 | 255 | ||
| 264 | define archhelp | 256 | define archhelp |
| 265 | echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' | 257 | echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' |
| @@ -274,5 +266,4 @@ define archhelp | |||
| 274 | echo ' bzdisk/fdimage*/isoimage also accept:' | 266 | echo ' bzdisk/fdimage*/isoimage also accept:' |
| 275 | echo ' FDARGS="..." arguments for the booted kernel' | 267 | echo ' FDARGS="..." arguments for the booted kernel' |
| 276 | echo ' FDINITRD=file initrd for the booted kernel' | 268 | echo ' FDINITRD=file initrd for the booted kernel' |
| 277 | echo ' kvmconfig - Enable additional options for guest kernel support' | ||
| 278 | endef | 269 | endef |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index dbe8dd2fe247..5b016e2498f3 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
| @@ -35,19 +35,22 @@ setup-y += video-vesa.o | |||
| 35 | setup-y += video-bios.o | 35 | setup-y += video-bios.o |
| 36 | 36 | ||
| 37 | targets += $(setup-y) | 37 | targets += $(setup-y) |
| 38 | hostprogs-y := mkcpustr tools/build | 38 | hostprogs-y := tools/build |
| 39 | hostprogs-$(CONFIG_X86_FEATURE_NAMES) += mkcpustr | ||
| 39 | 40 | ||
| 40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include \ | 41 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include \ |
| 41 | -include include/generated/autoconf.h \ | 42 | -include include/generated/autoconf.h \ |
| 42 | -D__EXPORTED_HEADERS__ | 43 | -D__EXPORTED_HEADERS__ |
| 43 | 44 | ||
| 45 | ifdef CONFIG_X86_FEATURE_NAMES | ||
| 44 | $(obj)/cpu.o: $(obj)/cpustr.h | 46 | $(obj)/cpu.o: $(obj)/cpustr.h |
| 45 | 47 | ||
| 46 | quiet_cmd_cpustr = CPUSTR $@ | 48 | quiet_cmd_cpustr = CPUSTR $@ |
| 47 | cmd_cpustr = $(obj)/mkcpustr > $@ | 49 | cmd_cpustr = $(obj)/mkcpustr > $@ |
| 48 | targets += cpustr.h | 50 | targets += cpustr.h |
| 49 | $(obj)/cpustr.h: $(obj)/mkcpustr FORCE | 51 | $(obj)/cpustr.h: $(obj)/mkcpustr FORCE |
| 50 | $(call if_changed,cpustr) | 52 | $(call if_changed,cpustr) |
| 53 | endif | ||
| 51 | 54 | ||
| 52 | # --------------------------------------------------------------------------- | 55 | # --------------------------------------------------------------------------- |
| 53 | 56 | ||
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 7a801a310e37..704f58aa79cd 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile | |||
| @@ -26,18 +26,18 @@ LDFLAGS_vmlinux := -T | |||
| 26 | hostprogs-y := mkpiggy | 26 | hostprogs-y := mkpiggy |
| 27 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include | 27 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include |
| 28 | 28 | ||
| 29 | VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \ | 29 | vmlinux-objs-y := $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \ |
| 30 | $(obj)/string.o $(obj)/cmdline.o $(obj)/early_serial_console.o \ | 30 | $(obj)/string.o $(obj)/cmdline.o \ |
| 31 | $(obj)/piggy.o $(obj)/cpuflags.o $(obj)/aslr.o | 31 | $(obj)/piggy.o $(obj)/cpuflags.o |
| 32 | |||
| 33 | vmlinux-objs-$(CONFIG_EARLY_PRINTK) += $(obj)/early_serial_console.o | ||
| 34 | vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/aslr.o | ||
| 32 | 35 | ||
| 33 | $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone | 36 | $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone |
| 34 | 37 | ||
| 35 | ifeq ($(CONFIG_EFI_STUB), y) | 38 | vmlinux-objs-$(CONFIG_EFI_STUB) += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o |
| 36 | VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o \ | ||
| 37 | $(objtree)/drivers/firmware/efi/libstub/lib.a | ||
| 38 | endif | ||
| 39 | 39 | ||
| 40 | $(obj)/vmlinux: $(VMLINUX_OBJS) FORCE | 40 | $(obj)/vmlinux: $(vmlinux-objs-y) FORCE |
| 41 | $(call if_changed,ld) | 41 | $(call if_changed,ld) |
| 42 | @: | 42 | @: |
| 43 | 43 | ||
| @@ -45,7 +45,7 @@ OBJCOPYFLAGS_vmlinux.bin := -R .comment -S | |||
| 45 | $(obj)/vmlinux.bin: vmlinux FORCE | 45 | $(obj)/vmlinux.bin: vmlinux FORCE |
| 46 | $(call if_changed,objcopy) | 46 | $(call if_changed,objcopy) |
| 47 | 47 | ||
| 48 | targets += $(patsubst $(obj)/%,%,$(VMLINUX_OBJS)) vmlinux.bin.all vmlinux.relocs | 48 | targets += $(patsubst $(obj)/%,%,$(vmlinux-objs-y)) vmlinux.bin.all vmlinux.relocs |
| 49 | 49 | ||
| 50 | CMD_RELOCS = arch/x86/tools/relocs | 50 | CMD_RELOCS = arch/x86/tools/relocs |
| 51 | quiet_cmd_relocs = RELOCS $@ | 51 | quiet_cmd_relocs = RELOCS $@ |
diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index fc6091abedb7..7c68808edeb7 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #include "misc.h" | 1 | #include "misc.h" |
| 2 | 2 | ||
| 3 | #ifdef CONFIG_RANDOMIZE_BASE | ||
| 4 | #include <asm/msr.h> | 3 | #include <asm/msr.h> |
| 5 | #include <asm/archrandom.h> | 4 | #include <asm/archrandom.h> |
| 6 | #include <asm/e820.h> | 5 | #include <asm/e820.h> |
| @@ -183,12 +182,27 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size, | |||
| 183 | static bool mem_avoid_overlap(struct mem_vector *img) | 182 | static bool mem_avoid_overlap(struct mem_vector *img) |
| 184 | { | 183 | { |
| 185 | int i; | 184 | int i; |
| 185 | struct setup_data *ptr; | ||
| 186 | 186 | ||
| 187 | for (i = 0; i < MEM_AVOID_MAX; i++) { | 187 | for (i = 0; i < MEM_AVOID_MAX; i++) { |
| 188 | if (mem_overlaps(img, &mem_avoid[i])) | 188 | if (mem_overlaps(img, &mem_avoid[i])) |
| 189 | return true; | 189 | return true; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | /* Avoid all entries in the setup_data linked list. */ | ||
| 193 | ptr = (struct setup_data *)(unsigned long)real_mode->hdr.setup_data; | ||
| 194 | while (ptr) { | ||
| 195 | struct mem_vector avoid; | ||
| 196 | |||
| 197 | avoid.start = (u64)ptr; | ||
| 198 | avoid.size = sizeof(*ptr) + ptr->len; | ||
| 199 | |||
| 200 | if (mem_overlaps(img, &avoid)) | ||
| 201 | return true; | ||
| 202 | |||
| 203 | ptr = (struct setup_data *)(unsigned long)ptr->next; | ||
| 204 | } | ||
| 205 | |||
| 192 | return false; | 206 | return false; |
| 193 | } | 207 | } |
| 194 | 208 | ||
| @@ -320,5 +334,3 @@ unsigned char *choose_kernel_location(unsigned char *input, | |||
| 320 | out: | 334 | out: |
| 321 | return (unsigned char *)choice; | 335 | return (unsigned char *)choice; |
| 322 | } | 336 | } |
| 323 | |||
| 324 | #endif /* CONFIG_RANDOMIZE_BASE */ | ||
diff --git a/arch/x86/boot/compressed/early_serial_console.c b/arch/x86/boot/compressed/early_serial_console.c index d3d003cb5481..261e81fb9582 100644 --- a/arch/x86/boot/compressed/early_serial_console.c +++ b/arch/x86/boot/compressed/early_serial_console.c | |||
| @@ -1,9 +1,5 @@ | |||
| 1 | #include "misc.h" | 1 | #include "misc.h" |
| 2 | 2 | ||
| 3 | #ifdef CONFIG_EARLY_PRINTK | ||
| 4 | |||
| 5 | int early_serial_base; | 3 | int early_serial_base; |
| 6 | 4 | ||
| 7 | #include "../early_serial_console.c" | 5 | #include "../early_serial_console.c" |
| 8 | |||
| 9 | #endif | ||
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index f277184e2ac1..de8eebd6f67c 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
| @@ -19,7 +19,10 @@ | |||
| 19 | 19 | ||
| 20 | static efi_system_table_t *sys_table; | 20 | static efi_system_table_t *sys_table; |
| 21 | 21 | ||
| 22 | struct efi_config *efi_early; | 22 | static struct efi_config *efi_early; |
| 23 | |||
| 24 | #define efi_call_early(f, ...) \ | ||
| 25 | efi_early->call(efi_early->f, __VA_ARGS__); | ||
| 23 | 26 | ||
| 24 | #define BOOT_SERVICES(bits) \ | 27 | #define BOOT_SERVICES(bits) \ |
| 25 | static void setup_boot_services##bits(struct efi_config *c) \ | 28 | static void setup_boot_services##bits(struct efi_config *c) \ |
| @@ -265,21 +268,25 @@ void efi_char16_printk(efi_system_table_t *table, efi_char16_t *str) | |||
| 265 | 268 | ||
| 266 | offset = offsetof(typeof(*out), output_string); | 269 | offset = offsetof(typeof(*out), output_string); |
| 267 | output_string = efi_early->text_output + offset; | 270 | output_string = efi_early->text_output + offset; |
| 271 | out = (typeof(out))(unsigned long)efi_early->text_output; | ||
| 268 | func = (u64 *)output_string; | 272 | func = (u64 *)output_string; |
| 269 | 273 | ||
| 270 | efi_early->call(*func, efi_early->text_output, str); | 274 | efi_early->call(*func, out, str); |
| 271 | } else { | 275 | } else { |
| 272 | struct efi_simple_text_output_protocol_32 *out; | 276 | struct efi_simple_text_output_protocol_32 *out; |
| 273 | u32 *func; | 277 | u32 *func; |
| 274 | 278 | ||
| 275 | offset = offsetof(typeof(*out), output_string); | 279 | offset = offsetof(typeof(*out), output_string); |
| 276 | output_string = efi_early->text_output + offset; | 280 | output_string = efi_early->text_output + offset; |
| 281 | out = (typeof(out))(unsigned long)efi_early->text_output; | ||
| 277 | func = (u32 *)output_string; | 282 | func = (u32 *)output_string; |
| 278 | 283 | ||
| 279 | efi_early->call(*func, efi_early->text_output, str); | 284 | efi_early->call(*func, out, str); |
| 280 | } | 285 | } |
| 281 | } | 286 | } |
| 282 | 287 | ||
| 288 | #include "../../../../drivers/firmware/efi/libstub/efi-stub-helper.c" | ||
| 289 | |||
| 283 | static void find_bits(unsigned long mask, u8 *pos, u8 *size) | 290 | static void find_bits(unsigned long mask, u8 *pos, u8 *size) |
| 284 | { | 291 | { |
| 285 | u8 first, len; | 292 | u8 first, len; |
| @@ -360,7 +367,7 @@ free_struct: | |||
| 360 | return status; | 367 | return status; |
| 361 | } | 368 | } |
| 362 | 369 | ||
| 363 | static efi_status_t | 370 | static void |
| 364 | setup_efi_pci32(struct boot_params *params, void **pci_handle, | 371 | setup_efi_pci32(struct boot_params *params, void **pci_handle, |
| 365 | unsigned long size) | 372 | unsigned long size) |
| 366 | { | 373 | { |
| @@ -403,8 +410,6 @@ setup_efi_pci32(struct boot_params *params, void **pci_handle, | |||
| 403 | data = (struct setup_data *)rom; | 410 | data = (struct setup_data *)rom; |
| 404 | 411 | ||
| 405 | } | 412 | } |
| 406 | |||
| 407 | return status; | ||
| 408 | } | 413 | } |
| 409 | 414 | ||
| 410 | static efi_status_t | 415 | static efi_status_t |
| @@ -463,7 +468,7 @@ free_struct: | |||
| 463 | 468 | ||
| 464 | } | 469 | } |
| 465 | 470 | ||
| 466 | static efi_status_t | 471 | static void |
| 467 | setup_efi_pci64(struct boot_params *params, void **pci_handle, | 472 | setup_efi_pci64(struct boot_params *params, void **pci_handle, |
| 468 | unsigned long size) | 473 | unsigned long size) |
| 469 | { | 474 | { |
| @@ -506,11 +511,18 @@ setup_efi_pci64(struct boot_params *params, void **pci_handle, | |||
| 506 | data = (struct setup_data *)rom; | 511 | data = (struct setup_data *)rom; |
| 507 | 512 | ||
| 508 | } | 513 | } |
| 509 | |||
| 510 | return status; | ||
| 511 | } | 514 | } |
| 512 | 515 | ||
| 513 | static efi_status_t setup_efi_pci(struct boot_params *params) | 516 | /* |
| 517 | * There's no way to return an informative status from this function, | ||
| 518 | * because any analysis (and printing of error messages) needs to be | ||
| 519 | * done directly at the EFI function call-site. | ||
| 520 | * | ||
| 521 | * For example, EFI_INVALID_PARAMETER could indicate a bug or maybe we | ||
| 522 | * just didn't find any PCI devices, but there's no way to tell outside | ||
| 523 | * the context of the call. | ||
| 524 | */ | ||
| 525 | static void setup_efi_pci(struct boot_params *params) | ||
| 514 | { | 526 | { |
| 515 | efi_status_t status; | 527 | efi_status_t status; |
| 516 | void **pci_handle = NULL; | 528 | void **pci_handle = NULL; |
| @@ -527,7 +539,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
| 527 | size, (void **)&pci_handle); | 539 | size, (void **)&pci_handle); |
| 528 | 540 | ||
| 529 | if (status != EFI_SUCCESS) | 541 | if (status != EFI_SUCCESS) |
| 530 | return status; | 542 | return; |
| 531 | 543 | ||
| 532 | status = efi_call_early(locate_handle, | 544 | status = efi_call_early(locate_handle, |
| 533 | EFI_LOCATE_BY_PROTOCOL, &pci_proto, | 545 | EFI_LOCATE_BY_PROTOCOL, &pci_proto, |
| @@ -538,13 +550,12 @@ static efi_status_t setup_efi_pci(struct boot_params *params) | |||
| 538 | goto free_handle; | 550 | goto free_handle; |
| 539 | 551 | ||
| 540 | if (efi_early->is64) | 552 | if (efi_early->is64) |
| 541 | status = setup_efi_pci64(params, pci_handle, size); | 553 | setup_efi_pci64(params, pci_handle, size); |
| 542 | else | 554 | else |
| 543 | status = setup_efi_pci32(params, pci_handle, size); | 555 | setup_efi_pci32(params, pci_handle, size); |
| 544 | 556 | ||
| 545 | free_handle: | 557 | free_handle: |
| 546 | efi_call_early(free_pool, pci_handle); | 558 | efi_call_early(free_pool, pci_handle); |
| 547 | return status; | ||
| 548 | } | 559 | } |
| 549 | 560 | ||
| 550 | static void | 561 | static void |
| @@ -1032,7 +1043,6 @@ struct boot_params *make_boot_params(struct efi_config *c) | |||
| 1032 | int i; | 1043 | int i; |
| 1033 | unsigned long ramdisk_addr; | 1044 | unsigned long ramdisk_addr; |
| 1034 | unsigned long ramdisk_size; | 1045 | unsigned long ramdisk_size; |
| 1035 | unsigned long initrd_addr_max; | ||
| 1036 | 1046 | ||
| 1037 | efi_early = c; | 1047 | efi_early = c; |
| 1038 | sys_table = (efi_system_table_t *)(unsigned long)efi_early->table; | 1048 | sys_table = (efi_system_table_t *)(unsigned long)efi_early->table; |
| @@ -1095,15 +1105,20 @@ struct boot_params *make_boot_params(struct efi_config *c) | |||
| 1095 | 1105 | ||
| 1096 | memset(sdt, 0, sizeof(*sdt)); | 1106 | memset(sdt, 0, sizeof(*sdt)); |
| 1097 | 1107 | ||
| 1098 | if (hdr->xloadflags & XLF_CAN_BE_LOADED_ABOVE_4G) | ||
| 1099 | initrd_addr_max = -1UL; | ||
| 1100 | else | ||
| 1101 | initrd_addr_max = hdr->initrd_addr_max; | ||
| 1102 | |||
| 1103 | status = handle_cmdline_files(sys_table, image, | 1108 | status = handle_cmdline_files(sys_table, image, |
| 1104 | (char *)(unsigned long)hdr->cmd_line_ptr, | 1109 | (char *)(unsigned long)hdr->cmd_line_ptr, |
| 1105 | "initrd=", initrd_addr_max, | 1110 | "initrd=", hdr->initrd_addr_max, |
| 1106 | &ramdisk_addr, &ramdisk_size); | 1111 | &ramdisk_addr, &ramdisk_size); |
| 1112 | |||
| 1113 | if (status != EFI_SUCCESS && | ||
| 1114 | hdr->xloadflags & XLF_CAN_BE_LOADED_ABOVE_4G) { | ||
| 1115 | efi_printk(sys_table, "Trying to load files to higher address\n"); | ||
| 1116 | status = handle_cmdline_files(sys_table, image, | ||
| 1117 | (char *)(unsigned long)hdr->cmd_line_ptr, | ||
| 1118 | "initrd=", -1UL, | ||
| 1119 | &ramdisk_addr, &ramdisk_size); | ||
| 1120 | } | ||
| 1121 | |||
| 1107 | if (status != EFI_SUCCESS) | 1122 | if (status != EFI_SUCCESS) |
| 1108 | goto fail2; | 1123 | goto fail2; |
| 1109 | hdr->ramdisk_image = ramdisk_addr & 0xffffffff; | 1124 | hdr->ramdisk_image = ramdisk_addr & 0xffffffff; |
| @@ -1376,10 +1391,7 @@ struct boot_params *efi_main(struct efi_config *c, | |||
| 1376 | 1391 | ||
| 1377 | setup_graphics(boot_params); | 1392 | setup_graphics(boot_params); |
| 1378 | 1393 | ||
| 1379 | status = setup_efi_pci(boot_params); | 1394 | setup_efi_pci(boot_params); |
| 1380 | if (status != EFI_SUCCESS) { | ||
| 1381 | efi_printk(sys_table, "setup_efi_pci() failed!\n"); | ||
| 1382 | } | ||
| 1383 | 1395 | ||
| 1384 | status = efi_call_early(allocate_pool, EFI_LOADER_DATA, | 1396 | status = efi_call_early(allocate_pool, EFI_LOADER_DATA, |
| 1385 | sizeof(*gdt), (void **)&gdt); | 1397 | sizeof(*gdt), (void **)&gdt); |
diff --git a/arch/x86/boot/compressed/eboot.h b/arch/x86/boot/compressed/eboot.h index d487e727f1ec..c88c31ecad12 100644 --- a/arch/x86/boot/compressed/eboot.h +++ b/arch/x86/boot/compressed/eboot.h | |||
| @@ -103,4 +103,20 @@ struct efi_uga_draw_protocol { | |||
| 103 | void *blt; | 103 | void *blt; |
| 104 | }; | 104 | }; |
| 105 | 105 | ||
| 106 | struct efi_config { | ||
| 107 | u64 image_handle; | ||
| 108 | u64 table; | ||
| 109 | u64 allocate_pool; | ||
| 110 | u64 allocate_pages; | ||
| 111 | u64 get_memory_map; | ||
| 112 | u64 free_pool; | ||
| 113 | u64 free_pages; | ||
| 114 | u64 locate_handle; | ||
| 115 | u64 handle_protocol; | ||
| 116 | u64 exit_boot_services; | ||
| 117 | u64 text_output; | ||
| 118 | efi_status_t (*call)(unsigned long, ...); | ||
| 119 | bool is64; | ||
| 120 | } __packed; | ||
| 121 | |||
| 106 | #endif /* BOOT_COMPRESSED_EBOOT_H */ | 122 | #endif /* BOOT_COMPRESSED_EBOOT_H */ |
diff --git a/arch/x86/boot/cpu.c b/arch/x86/boot/cpu.c index 6ec6bb6e9957..29207f69ae8c 100644 --- a/arch/x86/boot/cpu.c +++ b/arch/x86/boot/cpu.c | |||
| @@ -16,7 +16,9 @@ | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "boot.h" | 18 | #include "boot.h" |
| 19 | #ifdef CONFIG_X86_FEATURE_NAMES | ||
| 19 | #include "cpustr.h" | 20 | #include "cpustr.h" |
| 21 | #endif | ||
| 20 | 22 | ||
| 21 | static char *cpu_name(int level) | 23 | static char *cpu_name(int level) |
| 22 | { | 24 | { |
| @@ -32,11 +34,48 @@ static char *cpu_name(int level) | |||
| 32 | } | 34 | } |
| 33 | } | 35 | } |
| 34 | 36 | ||
| 37 | static void show_cap_strs(u32 *err_flags) | ||
| 38 | { | ||
| 39 | int i, j; | ||
| 40 | #ifdef CONFIG_X86_FEATURE_NAMES | ||
| 41 | const unsigned char *msg_strs = (const unsigned char *)x86_cap_strs; | ||
| 42 | for (i = 0; i < NCAPINTS; i++) { | ||
| 43 | u32 e = err_flags[i]; | ||
| 44 | for (j = 0; j < 32; j++) { | ||
| 45 | if (msg_strs[0] < i || | ||
| 46 | (msg_strs[0] == i && msg_strs[1] < j)) { | ||
| 47 | /* Skip to the next string */ | ||
| 48 | msg_strs += 2; | ||
| 49 | while (*msg_strs++) | ||
| 50 | ; | ||
| 51 | } | ||
| 52 | if (e & 1) { | ||
| 53 | if (msg_strs[0] == i && | ||
| 54 | msg_strs[1] == j && | ||
| 55 | msg_strs[2]) | ||
| 56 | printf("%s ", msg_strs+2); | ||
| 57 | else | ||
| 58 | printf("%d:%d ", i, j); | ||
| 59 | } | ||
| 60 | e >>= 1; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | #else | ||
| 64 | for (i = 0; i < NCAPINTS; i++) { | ||
| 65 | u32 e = err_flags[i]; | ||
| 66 | for (j = 0; j < 32; j++) { | ||
| 67 | if (e & 1) | ||
| 68 | printf("%d:%d ", i, j); | ||
| 69 | e >>= 1; | ||
| 70 | } | ||
| 71 | } | ||
| 72 | #endif | ||
| 73 | } | ||
| 74 | |||
| 35 | int validate_cpu(void) | 75 | int validate_cpu(void) |
| 36 | { | 76 | { |
| 37 | u32 *err_flags; | 77 | u32 *err_flags; |
| 38 | int cpu_level, req_level; | 78 | int cpu_level, req_level; |
| 39 | const unsigned char *msg_strs; | ||
| 40 | 79 | ||
| 41 | check_cpu(&cpu_level, &req_level, &err_flags); | 80 | check_cpu(&cpu_level, &req_level, &err_flags); |
| 42 | 81 | ||
| @@ -49,34 +88,9 @@ int validate_cpu(void) | |||
| 49 | } | 88 | } |
| 50 | 89 | ||
| 51 | if (err_flags) { | 90 | if (err_flags) { |
| 52 | int i, j; | ||
| 53 | puts("This kernel requires the following features " | 91 | puts("This kernel requires the following features " |
| 54 | "not present on the CPU:\n"); | 92 | "not present on the CPU:\n"); |
| 55 | 93 | show_cap_strs(err_flags); | |
| 56 | msg_strs = (const unsigned char *)x86_cap_strs; | ||
| 57 | |||
| 58 | for (i = 0; i < NCAPINTS; i++) { | ||
| 59 | u32 e = err_flags[i]; | ||
| 60 | |||
| 61 | for (j = 0; j < 32; j++) { | ||
| 62 | if (msg_strs[0] < i || | ||
| 63 | (msg_strs[0] == i && msg_strs[1] < j)) { | ||
| 64 | /* Skip to the next string */ | ||
| 65 | msg_strs += 2; | ||
| 66 | while (*msg_strs++) | ||
| 67 | ; | ||
| 68 | } | ||
| 69 | if (e & 1) { | ||
| 70 | if (msg_strs[0] == i && | ||
| 71 | msg_strs[1] == j && | ||
| 72 | msg_strs[2]) | ||
| 73 | printf("%s ", msg_strs+2); | ||
| 74 | else | ||
| 75 | printf("%d:%d ", i, j); | ||
| 76 | } | ||
| 77 | e >>= 1; | ||
| 78 | } | ||
| 79 | } | ||
| 80 | putchar('\n'); | 94 | putchar('\n'); |
| 81 | return -1; | 95 | return -1; |
| 82 | } else { | 96 | } else { |
diff --git a/arch/x86/configs/tiny.config b/arch/x86/configs/tiny.config new file mode 100644 index 000000000000..4e2ecfa23c15 --- /dev/null +++ b/arch/x86/configs/tiny.config | |||
| @@ -0,0 +1 @@ | |||
| CONFIG_NOHIGHMEM=y | |||
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 888950f29fd9..a7ccd57f19e4 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
| @@ -481,7 +481,7 @@ static void ctr_crypt_final(struct crypto_aes_ctx *ctx, | |||
| 481 | crypto_inc(ctrblk, AES_BLOCK_SIZE); | 481 | crypto_inc(ctrblk, AES_BLOCK_SIZE); |
| 482 | } | 482 | } |
| 483 | 483 | ||
| 484 | #ifdef CONFIG_AS_AVX | 484 | #if 0 /* temporary disabled due to failing crypto tests */ |
| 485 | static void aesni_ctr_enc_avx_tfm(struct crypto_aes_ctx *ctx, u8 *out, | 485 | static void aesni_ctr_enc_avx_tfm(struct crypto_aes_ctx *ctx, u8 *out, |
| 486 | const u8 *in, unsigned int len, u8 *iv) | 486 | const u8 *in, unsigned int len, u8 *iv) |
| 487 | { | 487 | { |
| @@ -1522,7 +1522,7 @@ static int __init aesni_init(void) | |||
| 1522 | aesni_gcm_dec_tfm = aesni_gcm_dec; | 1522 | aesni_gcm_dec_tfm = aesni_gcm_dec; |
| 1523 | } | 1523 | } |
| 1524 | aesni_ctr_enc_tfm = aesni_ctr_enc; | 1524 | aesni_ctr_enc_tfm = aesni_ctr_enc; |
| 1525 | #ifdef CONFIG_AS_AVX | 1525 | #if 0 /* temporary disabled due to failing crypto tests */ |
| 1526 | if (cpu_has_avx) { | 1526 | if (cpu_has_avx) { |
| 1527 | /* optimize performance of ctr mode encryption transform */ | 1527 | /* optimize performance of ctr mode encryption transform */ |
| 1528 | aesni_ctr_enc_tfm = aesni_ctr_enc_avx_tfm; | 1528 | aesni_ctr_enc_tfm = aesni_ctr_enc_avx_tfm; |
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index afcd35d331de..cfe3b954d5e4 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h | |||
| @@ -497,8 +497,6 @@ static __always_inline int fls64(__u64 x) | |||
| 497 | 497 | ||
| 498 | #include <asm-generic/bitops/sched.h> | 498 | #include <asm-generic/bitops/sched.h> |
| 499 | 499 | ||
| 500 | #define ARCH_HAS_FAST_MULTIPLIER 1 | ||
| 501 | |||
| 502 | #include <asm/arch_hweight.h> | 500 | #include <asm/arch_hweight.h> |
| 503 | 501 | ||
| 504 | #include <asm-generic/bitops/const_hweight.h> | 502 | #include <asm-generic/bitops/const_hweight.h> |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index bb9b258d60e7..516903b98e06 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
| @@ -250,8 +250,15 @@ | |||
| 250 | #include <asm/asm.h> | 250 | #include <asm/asm.h> |
| 251 | #include <linux/bitops.h> | 251 | #include <linux/bitops.h> |
| 252 | 252 | ||
| 253 | #ifdef CONFIG_X86_FEATURE_NAMES | ||
| 253 | extern const char * const x86_cap_flags[NCAPINTS*32]; | 254 | extern const char * const x86_cap_flags[NCAPINTS*32]; |
| 254 | extern const char * const x86_power_flags[32]; | 255 | extern const char * const x86_power_flags[32]; |
| 256 | #define X86_CAP_FMT "%s" | ||
| 257 | #define x86_cap_flag(flag) x86_cap_flags[flag] | ||
| 258 | #else | ||
| 259 | #define X86_CAP_FMT "%d:%d" | ||
| 260 | #define x86_cap_flag(flag) ((flag) >> 5), ((flag) & 31) | ||
| 261 | #endif | ||
| 255 | 262 | ||
| 256 | /* | 263 | /* |
| 257 | * In order to save room, we index into this array by doing | 264 | * In order to save room, we index into this array by doing |
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index 044a2fd3c5fe..0ec241ede5a2 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h | |||
| @@ -159,30 +159,6 @@ static inline efi_status_t efi_thunk_set_virtual_address_map( | |||
| 159 | } | 159 | } |
| 160 | #endif /* CONFIG_EFI_MIXED */ | 160 | #endif /* CONFIG_EFI_MIXED */ |
| 161 | 161 | ||
| 162 | |||
| 163 | /* arch specific definitions used by the stub code */ | ||
| 164 | |||
| 165 | struct efi_config { | ||
| 166 | u64 image_handle; | ||
| 167 | u64 table; | ||
| 168 | u64 allocate_pool; | ||
| 169 | u64 allocate_pages; | ||
| 170 | u64 get_memory_map; | ||
| 171 | u64 free_pool; | ||
| 172 | u64 free_pages; | ||
| 173 | u64 locate_handle; | ||
| 174 | u64 handle_protocol; | ||
| 175 | u64 exit_boot_services; | ||
| 176 | u64 text_output; | ||
| 177 | efi_status_t (*call)(unsigned long, ...); | ||
| 178 | bool is64; | ||
| 179 | } __packed; | ||
| 180 | |||
| 181 | extern struct efi_config *efi_early; | ||
| 182 | |||
| 183 | #define efi_call_early(f, ...) \ | ||
| 184 | efi_early->call(efi_early->f, __VA_ARGS__); | ||
| 185 | |||
| 186 | extern bool efi_reboot_required(void); | 162 | extern bool efi_reboot_required(void); |
| 187 | 163 | ||
| 188 | #else | 164 | #else |
diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index b0910f97a3ea..ffb1733ac91f 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include/asm/fixmap.h | |||
| @@ -106,14 +106,14 @@ enum fixed_addresses { | |||
| 106 | __end_of_permanent_fixed_addresses, | 106 | __end_of_permanent_fixed_addresses, |
| 107 | 107 | ||
| 108 | /* | 108 | /* |
| 109 | * 256 temporary boot-time mappings, used by early_ioremap(), | 109 | * 512 temporary boot-time mappings, used by early_ioremap(), |
| 110 | * before ioremap() is functional. | 110 | * before ioremap() is functional. |
| 111 | * | 111 | * |
| 112 | * If necessary we round it up to the next 256 pages boundary so | 112 | * If necessary we round it up to the next 512 pages boundary so |
| 113 | * that we can have a single pgd entry and a single pte table: | 113 | * that we can have a single pgd entry and a single pte table: |
| 114 | */ | 114 | */ |
| 115 | #define NR_FIX_BTMAPS 64 | 115 | #define NR_FIX_BTMAPS 64 |
| 116 | #define FIX_BTMAPS_SLOTS 4 | 116 | #define FIX_BTMAPS_SLOTS 8 |
| 117 | #define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS) | 117 | #define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS) |
| 118 | FIX_BTMAP_END = | 118 | FIX_BTMAP_END = |
| 119 | (__end_of_permanent_fixed_addresses ^ | 119 | (__end_of_permanent_fixed_addresses ^ |
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 0aeed5ca356e..1733ab49ac5e 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
| @@ -227,6 +227,8 @@ static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned | |||
| 227 | 227 | ||
| 228 | extern void io_apic_eoi(unsigned int apic, unsigned int vector); | 228 | extern void io_apic_eoi(unsigned int apic, unsigned int vector); |
| 229 | 229 | ||
| 230 | extern bool mp_should_keep_irq(struct device *dev); | ||
| 231 | |||
| 230 | #else /* !CONFIG_X86_IO_APIC */ | 232 | #else /* !CONFIG_X86_IO_APIC */ |
| 231 | 233 | ||
| 232 | #define io_apic_assign_pci_irqs 0 | 234 | #define io_apic_assign_pci_irqs 0 |
| @@ -237,6 +239,7 @@ static inline int mp_find_ioapic(u32 gsi) { return 0; } | |||
| 237 | static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; } | 239 | static inline u32 mp_pin_to_gsi(int ioapic, int pin) { return UINT_MAX; } |
| 238 | static inline int mp_map_gsi_to_irq(u32 gsi, unsigned int flags) { return gsi; } | 240 | static inline int mp_map_gsi_to_irq(u32 gsi, unsigned int flags) { return gsi; } |
| 239 | static inline void mp_unmap_irq(int irq) { } | 241 | static inline void mp_unmap_irq(int irq) { } |
| 242 | static inline bool mp_should_keep_irq(struct device *dev) { return 1; } | ||
| 240 | 243 | ||
| 241 | static inline int save_ioapic_entries(void) | 244 | static inline int save_ioapic_entries(void) |
| 242 | { | 245 | { |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 0ec056012618..aa97a070f09f 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
| @@ -131,8 +131,13 @@ static inline int pte_exec(pte_t pte) | |||
| 131 | 131 | ||
| 132 | static inline int pte_special(pte_t pte) | 132 | static inline int pte_special(pte_t pte) |
| 133 | { | 133 | { |
| 134 | return (pte_flags(pte) & (_PAGE_PRESENT|_PAGE_SPECIAL)) == | 134 | /* |
| 135 | (_PAGE_PRESENT|_PAGE_SPECIAL); | 135 | * See CONFIG_NUMA_BALANCING pte_numa in include/asm-generic/pgtable.h. |
| 136 | * On x86 we have _PAGE_BIT_NUMA == _PAGE_BIT_GLOBAL+1 == | ||
| 137 | * __PAGE_BIT_SOFTW1 == _PAGE_BIT_SPECIAL. | ||
| 138 | */ | ||
| 139 | return (pte_flags(pte) & _PAGE_SPECIAL) && | ||
| 140 | (pte_flags(pte) & (_PAGE_PRESENT|_PAGE_PROTNONE)); | ||
| 136 | } | 141 | } |
| 137 | 142 | ||
| 138 | static inline unsigned long pte_pfn(pte_t pte) | 143 | static inline unsigned long pte_pfn(pte_t pte) |
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 5be9063545d2..3874693c0e53 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h | |||
| @@ -19,6 +19,7 @@ extern pud_t level3_ident_pgt[512]; | |||
| 19 | extern pmd_t level2_kernel_pgt[512]; | 19 | extern pmd_t level2_kernel_pgt[512]; |
| 20 | extern pmd_t level2_fixmap_pgt[512]; | 20 | extern pmd_t level2_fixmap_pgt[512]; |
| 21 | extern pmd_t level2_ident_pgt[512]; | 21 | extern pmd_t level2_ident_pgt[512]; |
| 22 | extern pte_t level1_fixmap_pgt[512]; | ||
| 22 | extern pgd_t init_level4_pgt[]; | 23 | extern pgd_t init_level4_pgt[]; |
| 23 | 24 | ||
| 24 | #define swapper_pg_dir init_level4_pgt | 25 | #define swapper_pg_dir init_level4_pgt |
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index b5ea75c4a4b4..ada2e2d6be3e 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
| @@ -71,6 +71,7 @@ obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o | |||
| 71 | obj-$(CONFIG_X86_TSC) += trace_clock.o | 71 | obj-$(CONFIG_X86_TSC) += trace_clock.o |
| 72 | obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o | 72 | obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o |
| 73 | obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o | 73 | obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o |
| 74 | obj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o | ||
| 74 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o | 75 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o |
| 75 | obj-y += kprobes/ | 76 | obj-y += kprobes/ |
| 76 | obj-$(CONFIG_MODULES) += module.o | 77 | obj-$(CONFIG_MODULES) += module.o |
| @@ -118,5 +119,4 @@ ifeq ($(CONFIG_X86_64),y) | |||
| 118 | 119 | ||
| 119 | obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o | 120 | obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o |
| 120 | obj-y += vsmp_64.o | 121 | obj-y += vsmp_64.o |
| 121 | obj-$(CONFIG_KEXEC) += kexec-bzimage64.o | ||
| 122 | endif | 122 | endif |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 29290f554e79..337ce5a9b15c 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
| @@ -1070,6 +1070,11 @@ static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin, | |||
| 1070 | } | 1070 | } |
| 1071 | 1071 | ||
| 1072 | if (flags & IOAPIC_MAP_ALLOC) { | 1072 | if (flags & IOAPIC_MAP_ALLOC) { |
| 1073 | /* special handling for legacy IRQs */ | ||
| 1074 | if (irq < nr_legacy_irqs() && info->count == 1 && | ||
| 1075 | mp_irqdomain_map(domain, irq, pin) != 0) | ||
| 1076 | irq = -1; | ||
| 1077 | |||
| 1073 | if (irq > 0) | 1078 | if (irq > 0) |
| 1074 | info->count++; | 1079 | info->count++; |
| 1075 | else if (info->count == 0) | 1080 | else if (info->count == 0) |
| @@ -3896,7 +3901,15 @@ int mp_irqdomain_map(struct irq_domain *domain, unsigned int virq, | |||
| 3896 | info->polarity = 1; | 3901 | info->polarity = 1; |
| 3897 | } | 3902 | } |
| 3898 | info->node = NUMA_NO_NODE; | 3903 | info->node = NUMA_NO_NODE; |
| 3899 | info->set = 1; | 3904 | |
| 3905 | /* | ||
| 3906 | * setup_IO_APIC_irqs() programs all legacy IRQs with default | ||
| 3907 | * trigger and polarity attributes. Don't set the flag for that | ||
| 3908 | * case so the first legacy IRQ user could reprogram the pin | ||
| 3909 | * with real trigger and polarity attributes. | ||
| 3910 | */ | ||
| 3911 | if (virq >= nr_legacy_irqs() || info->count) | ||
| 3912 | info->set = 1; | ||
| 3900 | } | 3913 | } |
| 3901 | set_io_apic_irq_attr(&attr, ioapic, hwirq, info->trigger, | 3914 | set_io_apic_irq_attr(&attr, ioapic, hwirq, info->trigger, |
| 3902 | info->polarity); | 3915 | info->polarity); |
| @@ -3946,6 +3959,18 @@ int mp_set_gsi_attr(u32 gsi, int trigger, int polarity, int node) | |||
| 3946 | return ret; | 3959 | return ret; |
| 3947 | } | 3960 | } |
| 3948 | 3961 | ||
| 3962 | bool mp_should_keep_irq(struct device *dev) | ||
| 3963 | { | ||
| 3964 | if (dev->power.is_prepared) | ||
| 3965 | return true; | ||
| 3966 | #ifdef CONFIG_PM_RUNTIME | ||
| 3967 | if (dev->power.runtime_status == RPM_SUSPENDING) | ||
| 3968 | return true; | ||
| 3969 | #endif | ||
| 3970 | |||
| 3971 | return false; | ||
| 3972 | } | ||
| 3973 | |||
| 3949 | /* Enable IOAPIC early just for system timer */ | 3974 | /* Enable IOAPIC early just for system timer */ |
| 3950 | void __init pre_init_apic_IRQ0(void) | 3975 | void __init pre_init_apic_IRQ0(void) |
| 3951 | { | 3976 | { |
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index 7fd54f09b011..77dcab277710 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile | |||
| @@ -13,10 +13,13 @@ nostackp := $(call cc-option, -fno-stack-protector) | |||
| 13 | CFLAGS_common.o := $(nostackp) | 13 | CFLAGS_common.o := $(nostackp) |
| 14 | 14 | ||
| 15 | obj-y := intel_cacheinfo.o scattered.o topology.o | 15 | obj-y := intel_cacheinfo.o scattered.o topology.o |
| 16 | obj-y += proc.o capflags.o powerflags.o common.o | 16 | obj-y += common.o |
| 17 | obj-y += rdrand.o | 17 | obj-y += rdrand.o |
| 18 | obj-y += match.o | 18 | obj-y += match.o |
| 19 | 19 | ||
| 20 | obj-$(CONFIG_PROC_FS) += proc.o | ||
| 21 | obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o | ||
| 22 | |||
| 20 | obj-$(CONFIG_X86_32) += bugs.o | 23 | obj-$(CONFIG_X86_32) += bugs.o |
| 21 | obj-$(CONFIG_X86_64) += bugs_64.o | 24 | obj-$(CONFIG_X86_64) += bugs_64.o |
| 22 | 25 | ||
| @@ -48,6 +51,7 @@ obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o perf_event_amd_ibs.o | |||
| 48 | 51 | ||
| 49 | obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o | 52 | obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o |
| 50 | 53 | ||
| 54 | ifdef CONFIG_X86_FEATURE_NAMES | ||
| 51 | quiet_cmd_mkcapflags = MKCAP $@ | 55 | quiet_cmd_mkcapflags = MKCAP $@ |
| 52 | cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ | 56 | cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ |
| 53 | 57 | ||
| @@ -56,3 +60,4 @@ cpufeature = $(src)/../../include/asm/cpufeature.h | |||
| 56 | targets += capflags.c | 60 | targets += capflags.c |
| 57 | $(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE | 61 | $(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE |
| 58 | $(call if_changed,mkcapflags) | 62 | $(call if_changed,mkcapflags) |
| 63 | endif | ||
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index e4ab2b42bd6f..c649f236e288 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
| @@ -346,8 +346,8 @@ static void filter_cpuid_features(struct cpuinfo_x86 *c, bool warn) | |||
| 346 | continue; | 346 | continue; |
| 347 | 347 | ||
| 348 | printk(KERN_WARNING | 348 | printk(KERN_WARNING |
| 349 | "CPU: CPU feature %s disabled, no CPUID level 0x%x\n", | 349 | "CPU: CPU feature " X86_CAP_FMT " disabled, no CPUID level 0x%x\n", |
| 350 | x86_cap_flags[df->feature], df->level); | 350 | x86_cap_flag(df->feature), df->level); |
| 351 | } | 351 | } |
| 352 | } | 352 | } |
| 353 | 353 | ||
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 0553a34fa0df..a618fcd2c07d 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c | |||
| @@ -182,8 +182,7 @@ void native_machine_crash_shutdown(struct pt_regs *regs) | |||
| 182 | crash_save_cpu(regs, safe_smp_processor_id()); | 182 | crash_save_cpu(regs, safe_smp_processor_id()); |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | #ifdef CONFIG_X86_64 | 185 | #ifdef CONFIG_KEXEC_FILE |
| 186 | |||
| 187 | static int get_nr_ram_ranges_callback(unsigned long start_pfn, | 186 | static int get_nr_ram_ranges_callback(unsigned long start_pfn, |
| 188 | unsigned long nr_pfn, void *arg) | 187 | unsigned long nr_pfn, void *arg) |
| 189 | { | 188 | { |
| @@ -696,5 +695,4 @@ int crash_load_segments(struct kimage *image) | |||
| 696 | 695 | ||
| 697 | return ret; | 696 | return ret; |
| 698 | } | 697 | } |
| 699 | 698 | #endif /* CONFIG_KEXEC_FILE */ | |
| 700 | #endif /* CONFIG_X86_64 */ | ||
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index 1e6cff5814fa..44f1ed42fdf2 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
| @@ -203,7 +203,7 @@ void __init native_init_IRQ(void) | |||
| 203 | set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]); | 203 | set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | if (!acpi_ioapic && !of_ioapic) | 206 | if (!acpi_ioapic && !of_ioapic && nr_legacy_irqs()) |
| 207 | setup_irq(2, &irq2); | 207 | setup_irq(2, &irq2); |
| 208 | 208 | ||
| 209 | #ifdef CONFIG_X86_32 | 209 | #ifdef CONFIG_X86_32 |
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c index f304773285ae..f1314d0bcf0a 100644 --- a/arch/x86/kernel/kprobes/opt.c +++ b/arch/x86/kernel/kprobes/opt.c | |||
| @@ -338,8 +338,10 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op) | |||
| 338 | * a relative jump. | 338 | * a relative jump. |
| 339 | */ | 339 | */ |
| 340 | rel = (long)op->optinsn.insn - (long)op->kp.addr + RELATIVEJUMP_SIZE; | 340 | rel = (long)op->optinsn.insn - (long)op->kp.addr + RELATIVEJUMP_SIZE; |
| 341 | if (abs(rel) > 0x7fffffff) | 341 | if (abs(rel) > 0x7fffffff) { |
| 342 | __arch_remove_optimized_kprobe(op, 0); | ||
| 342 | return -ERANGE; | 343 | return -ERANGE; |
| 344 | } | ||
| 343 | 345 | ||
| 344 | buf = (u8 *)op->optinsn.insn; | 346 | buf = (u8 *)op->optinsn.insn; |
| 345 | 347 | ||
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index 8b04018e5d1f..485981059a40 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c | |||
| @@ -25,9 +25,11 @@ | |||
| 25 | #include <asm/debugreg.h> | 25 | #include <asm/debugreg.h> |
| 26 | #include <asm/kexec-bzimage64.h> | 26 | #include <asm/kexec-bzimage64.h> |
| 27 | 27 | ||
| 28 | #ifdef CONFIG_KEXEC_FILE | ||
| 28 | static struct kexec_file_ops *kexec_file_loaders[] = { | 29 | static struct kexec_file_ops *kexec_file_loaders[] = { |
| 29 | &kexec_bzImage64_ops, | 30 | &kexec_bzImage64_ops, |
| 30 | }; | 31 | }; |
| 32 | #endif | ||
| 31 | 33 | ||
| 32 | static void free_transition_pgtable(struct kimage *image) | 34 | static void free_transition_pgtable(struct kimage *image) |
| 33 | { | 35 | { |
| @@ -178,6 +180,7 @@ static void load_segments(void) | |||
| 178 | ); | 180 | ); |
| 179 | } | 181 | } |
| 180 | 182 | ||
| 183 | #ifdef CONFIG_KEXEC_FILE | ||
| 181 | /* Update purgatory as needed after various image segments have been prepared */ | 184 | /* Update purgatory as needed after various image segments have been prepared */ |
| 182 | static int arch_update_purgatory(struct kimage *image) | 185 | static int arch_update_purgatory(struct kimage *image) |
| 183 | { | 186 | { |
| @@ -209,6 +212,12 @@ static int arch_update_purgatory(struct kimage *image) | |||
| 209 | 212 | ||
| 210 | return ret; | 213 | return ret; |
| 211 | } | 214 | } |
| 215 | #else /* !CONFIG_KEXEC_FILE */ | ||
| 216 | static inline int arch_update_purgatory(struct kimage *image) | ||
| 217 | { | ||
| 218 | return 0; | ||
| 219 | } | ||
| 220 | #endif /* CONFIG_KEXEC_FILE */ | ||
| 212 | 221 | ||
| 213 | int machine_kexec_prepare(struct kimage *image) | 222 | int machine_kexec_prepare(struct kimage *image) |
| 214 | { | 223 | { |
| @@ -329,6 +338,7 @@ void arch_crash_save_vmcoreinfo(void) | |||
| 329 | 338 | ||
| 330 | /* arch-dependent functionality related to kexec file-based syscall */ | 339 | /* arch-dependent functionality related to kexec file-based syscall */ |
| 331 | 340 | ||
| 341 | #ifdef CONFIG_KEXEC_FILE | ||
| 332 | int arch_kexec_kernel_image_probe(struct kimage *image, void *buf, | 342 | int arch_kexec_kernel_image_probe(struct kimage *image, void *buf, |
| 333 | unsigned long buf_len) | 343 | unsigned long buf_len) |
| 334 | { | 344 | { |
| @@ -522,3 +532,4 @@ overflow: | |||
| 522 | (int)ELF64_R_TYPE(rel[i].r_info), value); | 532 | (int)ELF64_R_TYPE(rel[i].r_info), value); |
| 523 | return -ENOEXEC; | 533 | return -ENOEXEC; |
| 524 | } | 534 | } |
| 535 | #endif /* CONFIG_KEXEC_FILE */ | ||
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 2d872e08fab9..42a2dca984b3 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -1284,6 +1284,9 @@ static void remove_siblinginfo(int cpu) | |||
| 1284 | 1284 | ||
| 1285 | for_each_cpu(sibling, cpu_sibling_mask(cpu)) | 1285 | for_each_cpu(sibling, cpu_sibling_mask(cpu)) |
| 1286 | cpumask_clear_cpu(cpu, cpu_sibling_mask(sibling)); | 1286 | cpumask_clear_cpu(cpu, cpu_sibling_mask(sibling)); |
| 1287 | for_each_cpu(sibling, cpu_llc_shared_mask(cpu)) | ||
| 1288 | cpumask_clear_cpu(cpu, cpu_llc_shared_mask(sibling)); | ||
| 1289 | cpumask_clear(cpu_llc_shared_mask(cpu)); | ||
| 1287 | cpumask_clear(cpu_sibling_mask(cpu)); | 1290 | cpumask_clear(cpu_sibling_mask(cpu)); |
| 1288 | cpumask_clear(cpu_core_mask(cpu)); | 1291 | cpumask_clear(cpu_core_mask(cpu)); |
| 1289 | c->phys_proc_id = 0; | 1292 | c->phys_proc_id = 0; |
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c index bf7ef5ce29df..0fa29609b2c4 100644 --- a/arch/x86/kernel/time.c +++ b/arch/x86/kernel/time.c | |||
| @@ -68,6 +68,8 @@ static struct irqaction irq0 = { | |||
| 68 | 68 | ||
| 69 | void __init setup_default_timer_irq(void) | 69 | void __init setup_default_timer_irq(void) |
| 70 | { | 70 | { |
| 71 | if (!nr_legacy_irqs()) | ||
| 72 | return; | ||
| 71 | setup_irq(0, &irq0); | 73 | setup_irq(0, &irq0); |
| 72 | } | 74 | } |
| 73 | 75 | ||
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index 167ffcac16ed..95a427e57887 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c | |||
| @@ -48,7 +48,9 @@ enum address_markers_idx { | |||
| 48 | LOW_KERNEL_NR, | 48 | LOW_KERNEL_NR, |
| 49 | VMALLOC_START_NR, | 49 | VMALLOC_START_NR, |
| 50 | VMEMMAP_START_NR, | 50 | VMEMMAP_START_NR, |
| 51 | # ifdef CONFIG_X86_ESPFIX64 | ||
| 51 | ESPFIX_START_NR, | 52 | ESPFIX_START_NR, |
| 53 | # endif | ||
| 52 | HIGH_KERNEL_NR, | 54 | HIGH_KERNEL_NR, |
| 53 | MODULES_VADDR_NR, | 55 | MODULES_VADDR_NR, |
| 54 | MODULES_END_NR, | 56 | MODULES_END_NR, |
| @@ -71,7 +73,9 @@ static struct addr_marker address_markers[] = { | |||
| 71 | { PAGE_OFFSET, "Low Kernel Mapping" }, | 73 | { PAGE_OFFSET, "Low Kernel Mapping" }, |
| 72 | { VMALLOC_START, "vmalloc() Area" }, | 74 | { VMALLOC_START, "vmalloc() Area" }, |
| 73 | { VMEMMAP_START, "Vmemmap" }, | 75 | { VMEMMAP_START, "Vmemmap" }, |
| 76 | # ifdef CONFIG_X86_ESPFIX64 | ||
| 74 | { ESPFIX_BASE_ADDR, "ESPfix Area", 16 }, | 77 | { ESPFIX_BASE_ADDR, "ESPfix Area", 16 }, |
| 78 | # endif | ||
| 75 | { __START_KERNEL_map, "High Kernel Mapping" }, | 79 | { __START_KERNEL_map, "High Kernel Mapping" }, |
| 76 | { MODULES_VADDR, "Modules" }, | 80 | { MODULES_VADDR, "Modules" }, |
| 77 | { MODULES_END, "End Modules" }, | 81 | { MODULES_END, "End Modules" }, |
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index 25e7e1372bb2..919b91205cd4 100644 --- a/arch/x86/mm/mmap.c +++ b/arch/x86/mm/mmap.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
| 32 | #include <asm/elf.h> | 32 | #include <asm/elf.h> |
| 33 | 33 | ||
| 34 | struct __read_mostly va_alignment va_align = { | 34 | struct va_alignment __read_mostly va_align = { |
| 35 | .flags = -1, | 35 | .flags = -1, |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index c61ea57d1ba1..9a2b7101ae8a 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c | |||
| @@ -326,27 +326,6 @@ static void pci_fixup_video(struct pci_dev *pdev) | |||
| 326 | struct pci_bus *bus; | 326 | struct pci_bus *bus; |
| 327 | u16 config; | 327 | u16 config; |
| 328 | 328 | ||
| 329 | if (!vga_default_device()) { | ||
| 330 | resource_size_t start, end; | ||
| 331 | int i; | ||
| 332 | |||
| 333 | /* Does firmware framebuffer belong to us? */ | ||
| 334 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
| 335 | if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM)) | ||
| 336 | continue; | ||
| 337 | |||
| 338 | start = pci_resource_start(pdev, i); | ||
| 339 | end = pci_resource_end(pdev, i); | ||
| 340 | |||
| 341 | if (!start || !end) | ||
| 342 | continue; | ||
| 343 | |||
| 344 | if (screen_info.lfb_base >= start && | ||
| 345 | (screen_info.lfb_base + screen_info.lfb_size) < end) | ||
| 346 | vga_set_default_device(pdev); | ||
| 347 | } | ||
| 348 | } | ||
| 349 | |||
| 350 | /* Is VGA routed to us? */ | 329 | /* Is VGA routed to us? */ |
| 351 | bus = pdev->bus; | 330 | bus = pdev->bus; |
| 352 | while (bus) { | 331 | while (bus) { |
| @@ -371,8 +350,7 @@ static void pci_fixup_video(struct pci_dev *pdev) | |||
| 371 | pci_read_config_word(pdev, PCI_COMMAND, &config); | 350 | pci_read_config_word(pdev, PCI_COMMAND, &config); |
| 372 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { | 351 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { |
| 373 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; | 352 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; |
| 374 | dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n"); | 353 | dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n"); |
| 375 | vga_set_default_device(pdev); | ||
| 376 | } | 354 | } |
| 377 | } | 355 | } |
| 378 | } | 356 | } |
diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c index 3865116c51fb..b9958c364075 100644 --- a/arch/x86/pci/intel_mid_pci.c +++ b/arch/x86/pci/intel_mid_pci.c | |||
| @@ -229,7 +229,7 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev) | |||
| 229 | 229 | ||
| 230 | static void intel_mid_pci_irq_disable(struct pci_dev *dev) | 230 | static void intel_mid_pci_irq_disable(struct pci_dev *dev) |
| 231 | { | 231 | { |
| 232 | if (!dev->dev.power.is_prepared && dev->irq > 0) | 232 | if (!mp_should_keep_irq(&dev->dev) && dev->irq > 0) |
| 233 | mp_unmap_irq(dev->irq); | 233 | mp_unmap_irq(dev->irq); |
| 234 | } | 234 | } |
| 235 | 235 | ||
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index bc1a2c341891..eb500c2592ad 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
| @@ -1256,7 +1256,7 @@ static int pirq_enable_irq(struct pci_dev *dev) | |||
| 1256 | 1256 | ||
| 1257 | static void pirq_disable_irq(struct pci_dev *dev) | 1257 | static void pirq_disable_irq(struct pci_dev *dev) |
| 1258 | { | 1258 | { |
| 1259 | if (io_apic_assign_pci_irqs && !dev->dev.power.is_prepared && | 1259 | if (io_apic_assign_pci_irqs && !mp_should_keep_irq(&dev->dev) && |
| 1260 | dev->irq) { | 1260 | dev->irq) { |
| 1261 | mp_unmap_irq(dev->irq); | 1261 | mp_unmap_irq(dev->irq); |
| 1262 | dev->irq = 0; | 1262 | dev->irq = 0; |
diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile index 7fde9ee438a4..899dd2454256 100644 --- a/arch/x86/purgatory/Makefile +++ b/arch/x86/purgatory/Makefile | |||
| @@ -11,6 +11,7 @@ targets += purgatory.ro | |||
| 11 | # sure how to relocate those. Like kexec-tools, use custom flags. | 11 | # sure how to relocate those. Like kexec-tools, use custom flags. |
| 12 | 12 | ||
| 13 | KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large | 13 | KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large |
| 14 | KBUILD_CFLAGS += -m$(BITS) | ||
| 14 | 15 | ||
| 15 | $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE | 16 | $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE |
| 16 | $(call if_changed,ld) | 17 | $(call if_changed,ld) |
| @@ -24,7 +25,4 @@ $(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE | |||
| 24 | $(call if_changed,bin2c) | 25 | $(call if_changed,bin2c) |
| 25 | 26 | ||
| 26 | 27 | ||
| 27 | # No loaders for 32bits yet. | 28 | obj-$(CONFIG_KEXEC_FILE) += kexec-purgatory.o |
| 28 | ifeq ($(CONFIG_X86_64),y) | ||
| 29 | obj-$(CONFIG_KEXEC) += kexec-purgatory.o | ||
| 30 | endif | ||
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index e8a1201c3293..16fb0099b7f2 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
| @@ -1866,12 +1866,11 @@ static void __init check_pt_base(unsigned long *pt_base, unsigned long *pt_end, | |||
| 1866 | * | 1866 | * |
| 1867 | * We can construct this by grafting the Xen provided pagetable into | 1867 | * We can construct this by grafting the Xen provided pagetable into |
| 1868 | * head_64.S's preconstructed pagetables. We copy the Xen L2's into | 1868 | * head_64.S's preconstructed pagetables. We copy the Xen L2's into |
| 1869 | * level2_ident_pgt, level2_kernel_pgt and level2_fixmap_pgt. This | 1869 | * level2_ident_pgt, and level2_kernel_pgt. This means that only the |
| 1870 | * means that only the kernel has a physical mapping to start with - | 1870 | * kernel has a physical mapping to start with - but that's enough to |
| 1871 | * but that's enough to get __va working. We need to fill in the rest | 1871 | * get __va working. We need to fill in the rest of the physical |
| 1872 | * of the physical mapping once some sort of allocator has been set | 1872 | * mapping once some sort of allocator has been set up. NOTE: for |
| 1873 | * up. | 1873 | * PVH, the page tables are native. |
| 1874 | * NOTE: for PVH, the page tables are native. | ||
| 1875 | */ | 1874 | */ |
| 1876 | void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) | 1875 | void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) |
| 1877 | { | 1876 | { |
| @@ -1902,8 +1901,11 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) | |||
| 1902 | /* L3_i[0] -> level2_ident_pgt */ | 1901 | /* L3_i[0] -> level2_ident_pgt */ |
| 1903 | convert_pfn_mfn(level3_ident_pgt); | 1902 | convert_pfn_mfn(level3_ident_pgt); |
| 1904 | /* L3_k[510] -> level2_kernel_pgt | 1903 | /* L3_k[510] -> level2_kernel_pgt |
| 1905 | * L3_i[511] -> level2_fixmap_pgt */ | 1904 | * L3_k[511] -> level2_fixmap_pgt */ |
| 1906 | convert_pfn_mfn(level3_kernel_pgt); | 1905 | convert_pfn_mfn(level3_kernel_pgt); |
| 1906 | |||
| 1907 | /* L3_k[511][506] -> level1_fixmap_pgt */ | ||
| 1908 | convert_pfn_mfn(level2_fixmap_pgt); | ||
| 1907 | } | 1909 | } |
| 1908 | /* We get [511][511] and have Xen's version of level2_kernel_pgt */ | 1910 | /* We get [511][511] and have Xen's version of level2_kernel_pgt */ |
| 1909 | l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd); | 1911 | l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd); |
| @@ -1913,21 +1915,15 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) | |||
| 1913 | addr[1] = (unsigned long)l3; | 1915 | addr[1] = (unsigned long)l3; |
| 1914 | addr[2] = (unsigned long)l2; | 1916 | addr[2] = (unsigned long)l2; |
| 1915 | /* Graft it onto L4[272][0]. Note that we creating an aliasing problem: | 1917 | /* Graft it onto L4[272][0]. Note that we creating an aliasing problem: |
| 1916 | * Both L4[272][0] and L4[511][511] have entries that point to the same | 1918 | * Both L4[272][0] and L4[511][510] have entries that point to the same |
| 1917 | * L2 (PMD) tables. Meaning that if you modify it in __va space | 1919 | * L2 (PMD) tables. Meaning that if you modify it in __va space |
| 1918 | * it will be also modified in the __ka space! (But if you just | 1920 | * it will be also modified in the __ka space! (But if you just |
| 1919 | * modify the PMD table to point to other PTE's or none, then you | 1921 | * modify the PMD table to point to other PTE's or none, then you |
| 1920 | * are OK - which is what cleanup_highmap does) */ | 1922 | * are OK - which is what cleanup_highmap does) */ |
| 1921 | copy_page(level2_ident_pgt, l2); | 1923 | copy_page(level2_ident_pgt, l2); |
| 1922 | /* Graft it onto L4[511][511] */ | 1924 | /* Graft it onto L4[511][510] */ |
| 1923 | copy_page(level2_kernel_pgt, l2); | 1925 | copy_page(level2_kernel_pgt, l2); |
| 1924 | 1926 | ||
| 1925 | /* Get [511][510] and graft that in level2_fixmap_pgt */ | ||
| 1926 | l3 = m2v(pgd[pgd_index(__START_KERNEL_map + PMD_SIZE)].pgd); | ||
| 1927 | l2 = m2v(l3[pud_index(__START_KERNEL_map + PMD_SIZE)].pud); | ||
| 1928 | copy_page(level2_fixmap_pgt, l2); | ||
| 1929 | /* Note that we don't do anything with level1_fixmap_pgt which | ||
| 1930 | * we don't need. */ | ||
| 1931 | if (!xen_feature(XENFEAT_auto_translated_physmap)) { | 1927 | if (!xen_feature(XENFEAT_auto_translated_physmap)) { |
| 1932 | /* Make pagetable pieces RO */ | 1928 | /* Make pagetable pieces RO */ |
| 1933 | set_page_prot(init_level4_pgt, PAGE_KERNEL_RO); | 1929 | set_page_prot(init_level4_pgt, PAGE_KERNEL_RO); |
| @@ -1937,6 +1933,7 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) | |||
| 1937 | set_page_prot(level2_ident_pgt, PAGE_KERNEL_RO); | 1933 | set_page_prot(level2_ident_pgt, PAGE_KERNEL_RO); |
| 1938 | set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO); | 1934 | set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO); |
| 1939 | set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO); | 1935 | set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO); |
| 1936 | set_page_prot(level1_fixmap_pgt, PAGE_KERNEL_RO); | ||
| 1940 | 1937 | ||
| 1941 | /* Pin down new L4 */ | 1938 | /* Pin down new L4 */ |
| 1942 | pin_pagetable_pfn(MMUEXT_PIN_L4_TABLE, | 1939 | pin_pagetable_pfn(MMUEXT_PIN_L4_TABLE, |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 3a617af60d46..49c6c3d94449 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
| @@ -4,24 +4,23 @@ config ZONE_DMA | |||
| 4 | config XTENSA | 4 | config XTENSA |
| 5 | def_bool y | 5 | def_bool y |
| 6 | select ARCH_WANT_FRAME_POINTERS | 6 | select ARCH_WANT_FRAME_POINTERS |
| 7 | select HAVE_IDE | ||
| 8 | select GENERIC_ATOMIC64 | ||
| 9 | select GENERIC_CLOCKEVENTS | ||
| 10 | select VIRT_TO_BUS | ||
| 11 | select GENERIC_IRQ_SHOW | ||
| 12 | select GENERIC_SCHED_CLOCK | ||
| 13 | select MODULES_USE_ELF_RELA | ||
| 14 | select GENERIC_PCI_IOMAP | ||
| 15 | select ARCH_WANT_IPC_PARSE_VERSION | 7 | select ARCH_WANT_IPC_PARSE_VERSION |
| 16 | select ARCH_WANT_OPTIONAL_GPIOLIB | 8 | select ARCH_WANT_OPTIONAL_GPIOLIB |
| 17 | select BUILDTIME_EXTABLE_SORT | 9 | select BUILDTIME_EXTABLE_SORT |
| 18 | select CLONE_BACKWARDS | 10 | select CLONE_BACKWARDS |
| 19 | select IRQ_DOMAIN | 11 | select COMMON_CLK |
| 20 | select HAVE_OPROFILE | 12 | select GENERIC_ATOMIC64 |
| 13 | select GENERIC_CLOCKEVENTS | ||
| 14 | select GENERIC_IRQ_SHOW | ||
| 15 | select GENERIC_PCI_IOMAP | ||
| 16 | select GENERIC_SCHED_CLOCK | ||
| 21 | select HAVE_FUNCTION_TRACER | 17 | select HAVE_FUNCTION_TRACER |
| 22 | select HAVE_IRQ_TIME_ACCOUNTING | 18 | select HAVE_IRQ_TIME_ACCOUNTING |
| 19 | select HAVE_OPROFILE | ||
| 23 | select HAVE_PERF_EVENTS | 20 | select HAVE_PERF_EVENTS |
| 24 | select COMMON_CLK | 21 | select IRQ_DOMAIN |
| 22 | select MODULES_USE_ELF_RELA | ||
| 23 | select VIRT_TO_BUS | ||
| 25 | help | 24 | help |
| 26 | Xtensa processors are 32-bit RISC machines designed by Tensilica | 25 | Xtensa processors are 32-bit RISC machines designed by Tensilica |
| 27 | primarily for embedded systems. These processors are both | 26 | primarily for embedded systems. These processors are both |
| @@ -62,7 +61,9 @@ config TRACE_IRQFLAGS_SUPPORT | |||
| 62 | def_bool y | 61 | def_bool y |
| 63 | 62 | ||
| 64 | config MMU | 63 | config MMU |
| 65 | def_bool n | 64 | bool |
| 65 | default n if !XTENSA_VARIANT_CUSTOM | ||
| 66 | default XTENSA_VARIANT_MMU if XTENSA_VARIANT_CUSTOM | ||
| 66 | 67 | ||
| 67 | config VARIANT_IRQ_SWITCH | 68 | config VARIANT_IRQ_SWITCH |
| 68 | def_bool n | 69 | def_bool n |
| @@ -102,8 +103,40 @@ config XTENSA_VARIANT_S6000 | |||
| 102 | select VARIANT_IRQ_SWITCH | 103 | select VARIANT_IRQ_SWITCH |
| 103 | select ARCH_REQUIRE_GPIOLIB | 104 | select ARCH_REQUIRE_GPIOLIB |
| 104 | select XTENSA_CALIBRATE_CCOUNT | 105 | select XTENSA_CALIBRATE_CCOUNT |
| 106 | |||
| 107 | config XTENSA_VARIANT_CUSTOM | ||
| 108 | bool "Custom Xtensa processor configuration" | ||
| 109 | select MAY_HAVE_SMP | ||
| 110 | select HAVE_XTENSA_GPIO32 | ||
| 111 | help | ||
| 112 | Select this variant to use a custom Xtensa processor configuration. | ||
| 113 | You will be prompted for a processor variant CORENAME. | ||
| 105 | endchoice | 114 | endchoice |
| 106 | 115 | ||
| 116 | config XTENSA_VARIANT_CUSTOM_NAME | ||
| 117 | string "Xtensa Processor Custom Core Variant Name" | ||
| 118 | depends on XTENSA_VARIANT_CUSTOM | ||
| 119 | help | ||
| 120 | Provide the name of a custom Xtensa processor variant. | ||
| 121 | This CORENAME selects arch/xtensa/variant/CORENAME. | ||
| 122 | Dont forget you have to select MMU if you have one. | ||
| 123 | |||
| 124 | config XTENSA_VARIANT_NAME | ||
| 125 | string | ||
| 126 | default "dc232b" if XTENSA_VARIANT_DC232B | ||
| 127 | default "dc233c" if XTENSA_VARIANT_DC233C | ||
| 128 | default "fsf" if XTENSA_VARIANT_FSF | ||
| 129 | default "s6000" if XTENSA_VARIANT_S6000 | ||
| 130 | default XTENSA_VARIANT_CUSTOM_NAME if XTENSA_VARIANT_CUSTOM | ||
| 131 | |||
| 132 | config XTENSA_VARIANT_MMU | ||
| 133 | bool "Core variant has a Full MMU (TLB, Pages, Protection, etc)" | ||
| 134 | depends on XTENSA_VARIANT_CUSTOM | ||
| 135 | default y | ||
| 136 | help | ||
| 137 | Build a Conventional Kernel with full MMU support, | ||
| 138 | ie: it supports a TLB with auto-loading, page protection. | ||
| 139 | |||
| 107 | config XTENSA_UNALIGNED_USER | 140 | config XTENSA_UNALIGNED_USER |
| 108 | bool "Unaligned memory access in use space" | 141 | bool "Unaligned memory access in use space" |
| 109 | help | 142 | help |
| @@ -156,13 +189,9 @@ config HOTPLUG_CPU | |||
| 156 | 189 | ||
| 157 | Say N if you want to disable CPU hotplug. | 190 | Say N if you want to disable CPU hotplug. |
| 158 | 191 | ||
| 159 | config MATH_EMULATION | ||
| 160 | bool "Math emulation" | ||
| 161 | help | ||
| 162 | Can we use information of configuration file? | ||
| 163 | |||
| 164 | config INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX | 192 | config INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX |
| 165 | bool "Initialize Xtensa MMU inside the Linux kernel code" | 193 | bool "Initialize Xtensa MMU inside the Linux kernel code" |
| 194 | depends on MMU | ||
| 166 | default y | 195 | default y |
| 167 | help | 196 | help |
| 168 | Earlier version initialized the MMU in the exception vector | 197 | Earlier version initialized the MMU in the exception vector |
| @@ -192,6 +221,7 @@ config INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX | |||
| 192 | 221 | ||
| 193 | config HIGHMEM | 222 | config HIGHMEM |
| 194 | bool "High Memory Support" | 223 | bool "High Memory Support" |
| 224 | depends on MMU | ||
| 195 | help | 225 | help |
| 196 | Linux can use the full amount of RAM in the system by | 226 | Linux can use the full amount of RAM in the system by |
| 197 | default. However, the default MMUv2 setup only maps the | 227 | default. However, the default MMUv2 setup only maps the |
| @@ -208,6 +238,32 @@ config HIGHMEM | |||
| 208 | 238 | ||
| 209 | If unsure, say Y. | 239 | If unsure, say Y. |
| 210 | 240 | ||
| 241 | config FAST_SYSCALL_XTENSA | ||
| 242 | bool "Enable fast atomic syscalls" | ||
| 243 | default n | ||
| 244 | help | ||
| 245 | fast_syscall_xtensa is a syscall that can make atomic operations | ||
| 246 | on UP kernel when processor has no s32c1i support. | ||
| 247 | |||
| 248 | This syscall is deprecated. It may have issues when called with | ||
| 249 | invalid arguments. It is provided only for backwards compatibility. | ||
| 250 | Only enable it if your userspace software requires it. | ||
| 251 | |||
| 252 | If unsure, say N. | ||
| 253 | |||
| 254 | config FAST_SYSCALL_SPILL_REGISTERS | ||
| 255 | bool "Enable spill registers syscall" | ||
| 256 | default n | ||
| 257 | help | ||
| 258 | fast_syscall_spill_registers is a syscall that spills all active | ||
| 259 | register windows of a calling userspace task onto its stack. | ||
| 260 | |||
| 261 | This syscall is deprecated. It may have issues when called with | ||
| 262 | invalid arguments. It is provided only for backwards compatibility. | ||
| 263 | Only enable it if your userspace software requires it. | ||
| 264 | |||
| 265 | If unsure, say N. | ||
| 266 | |||
| 211 | endmenu | 267 | endmenu |
| 212 | 268 | ||
| 213 | config XTENSA_CALIBRATE_CCOUNT | 269 | config XTENSA_CALIBRATE_CCOUNT |
| @@ -250,12 +306,14 @@ config XTENSA_PLATFORM_ISS | |||
| 250 | 306 | ||
| 251 | config XTENSA_PLATFORM_XT2000 | 307 | config XTENSA_PLATFORM_XT2000 |
| 252 | bool "XT2000" | 308 | bool "XT2000" |
| 309 | select HAVE_IDE | ||
| 253 | help | 310 | help |
| 254 | XT2000 is the name of Tensilica's feature-rich emulation platform. | 311 | XT2000 is the name of Tensilica's feature-rich emulation platform. |
| 255 | This hardware is capable of running a full Linux distribution. | 312 | This hardware is capable of running a full Linux distribution. |
| 256 | 313 | ||
| 257 | config XTENSA_PLATFORM_S6105 | 314 | config XTENSA_PLATFORM_S6105 |
| 258 | bool "S6105" | 315 | bool "S6105" |
| 316 | select HAVE_IDE | ||
| 259 | select SERIAL_CONSOLE | 317 | select SERIAL_CONSOLE |
| 260 | select NO_IOPORT_MAP | 318 | select NO_IOPORT_MAP |
| 261 | 319 | ||
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 81250ece3062..472533064b46 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | # for more details. | 4 | # for more details. |
| 5 | # | 5 | # |
| 6 | # Copyright (C) 2001 - 2005 Tensilica Inc. | 6 | # Copyright (C) 2001 - 2005 Tensilica Inc. |
| 7 | # Copyright (C) 2014 Cadence Design Systems Inc. | ||
| 7 | # | 8 | # |
| 8 | # This file is included by the global makefile so that you can add your own | 9 | # This file is included by the global makefile so that you can add your own |
| 9 | # architecture-specific flags and dependencies. Remember to do have actions | 10 | # architecture-specific flags and dependencies. Remember to do have actions |
| @@ -13,11 +14,7 @@ | |||
| 13 | # Core configuration. | 14 | # Core configuration. |
| 14 | # (Use VAR=<xtensa_config> to use another default compiler.) | 15 | # (Use VAR=<xtensa_config> to use another default compiler.) |
| 15 | 16 | ||
| 16 | variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf | 17 | variant-y := $(patsubst "%",%,$(CONFIG_XTENSA_VARIANT_NAME)) |
| 17 | variant-$(CONFIG_XTENSA_VARIANT_DC232B) := dc232b | ||
| 18 | variant-$(CONFIG_XTENSA_VARIANT_DC233C) := dc233c | ||
| 19 | variant-$(CONFIG_XTENSA_VARIANT_S6000) := s6000 | ||
| 20 | variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom | ||
| 21 | 18 | ||
| 22 | VARIANT = $(variant-y) | 19 | VARIANT = $(variant-y) |
| 23 | export VARIANT | 20 | export VARIANT |
diff --git a/arch/xtensa/boot/dts/kc705.dts b/arch/xtensa/boot/dts/kc705.dts index 742a347be67a..c4d17a34ab86 100644 --- a/arch/xtensa/boot/dts/kc705.dts +++ b/arch/xtensa/boot/dts/kc705.dts | |||
| @@ -4,8 +4,11 @@ | |||
| 4 | 4 | ||
| 5 | / { | 5 | / { |
| 6 | compatible = "cdns,xtensa-kc705"; | 6 | compatible = "cdns,xtensa-kc705"; |
| 7 | chosen { | ||
| 8 | bootargs = "earlycon=uart8250,mmio32,0xfd050020,115200n8 console=ttyS0,115200n8 ip=dhcp root=/dev/nfs rw debug memmap=0x38000000"; | ||
| 9 | }; | ||
| 7 | memory@0 { | 10 | memory@0 { |
| 8 | device_type = "memory"; | 11 | device_type = "memory"; |
| 9 | reg = <0x00000000 0x08000000>; | 12 | reg = <0x00000000 0x38000000>; |
| 10 | }; | 13 | }; |
| 11 | }; | 14 | }; |
diff --git a/arch/xtensa/configs/common_defconfig b/arch/xtensa/configs/common_defconfig index f6000fe05119..721df1214bc3 100644 --- a/arch/xtensa/configs/common_defconfig +++ b/arch/xtensa/configs/common_defconfig | |||
| @@ -66,7 +66,6 @@ CONFIG_XTENSA_ARCH_LINUX_BE=y | |||
| 66 | CONFIG_MMU=y | 66 | CONFIG_MMU=y |
| 67 | # CONFIG_XTENSA_UNALIGNED_USER is not set | 67 | # CONFIG_XTENSA_UNALIGNED_USER is not set |
| 68 | # CONFIG_PREEMPT is not set | 68 | # CONFIG_PREEMPT is not set |
| 69 | # CONFIG_MATH_EMULATION is not set | ||
| 70 | # CONFIG_HIGHMEM is not set | 69 | # CONFIG_HIGHMEM is not set |
| 71 | 70 | ||
| 72 | # | 71 | # |
diff --git a/arch/xtensa/configs/iss_defconfig b/arch/xtensa/configs/iss_defconfig index 1493c68352d1..b966baf82cae 100644 --- a/arch/xtensa/configs/iss_defconfig +++ b/arch/xtensa/configs/iss_defconfig | |||
| @@ -146,7 +146,6 @@ CONFIG_XTENSA_VARIANT_FSF=y | |||
| 146 | # CONFIG_XTENSA_VARIANT_S6000 is not set | 146 | # CONFIG_XTENSA_VARIANT_S6000 is not set |
| 147 | # CONFIG_XTENSA_UNALIGNED_USER is not set | 147 | # CONFIG_XTENSA_UNALIGNED_USER is not set |
| 148 | # CONFIG_PREEMPT is not set | 148 | # CONFIG_PREEMPT is not set |
| 149 | # CONFIG_MATH_EMULATION is not set | ||
| 150 | CONFIG_XTENSA_CALIBRATE_CCOUNT=y | 149 | CONFIG_XTENSA_CALIBRATE_CCOUNT=y |
| 151 | CONFIG_SERIAL_CONSOLE=y | 150 | CONFIG_SERIAL_CONSOLE=y |
| 152 | CONFIG_XTENSA_ISS_NETWORK=y | 151 | CONFIG_XTENSA_ISS_NETWORK=y |
| @@ -308,7 +307,7 @@ CONFIG_MISC_DEVICES=y | |||
| 308 | # EEPROM support | 307 | # EEPROM support |
| 309 | # | 308 | # |
| 310 | # CONFIG_EEPROM_93CX6 is not set | 309 | # CONFIG_EEPROM_93CX6 is not set |
| 311 | CONFIG_HAVE_IDE=y | 310 | # CONFIG_HAVE_IDE is not set |
| 312 | # CONFIG_IDE is not set | 311 | # CONFIG_IDE is not set |
| 313 | 312 | ||
| 314 | # | 313 | # |
diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig index 12a492ab6d17..9471265b8ca6 100644 --- a/arch/xtensa/configs/s6105_defconfig +++ b/arch/xtensa/configs/s6105_defconfig | |||
| @@ -109,7 +109,6 @@ CONFIG_VARIANT_IRQ_SWITCH=y | |||
| 109 | CONFIG_XTENSA_VARIANT_S6000=y | 109 | CONFIG_XTENSA_VARIANT_S6000=y |
| 110 | # CONFIG_XTENSA_UNALIGNED_USER is not set | 110 | # CONFIG_XTENSA_UNALIGNED_USER is not set |
| 111 | CONFIG_PREEMPT=y | 111 | CONFIG_PREEMPT=y |
| 112 | # CONFIG_MATH_EMULATION is not set | ||
| 113 | # CONFIG_HIGHMEM is not set | 112 | # CONFIG_HIGHMEM is not set |
| 114 | CONFIG_XTENSA_CALIBRATE_CCOUNT=y | 113 | CONFIG_XTENSA_CALIBRATE_CCOUNT=y |
| 115 | CONFIG_SERIAL_CONSOLE=y | 114 | CONFIG_SERIAL_CONSOLE=y |
diff --git a/arch/xtensa/include/asm/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h index 555a98a18453..e72aaca7a77f 100644 --- a/arch/xtensa/include/asm/cacheflush.h +++ b/arch/xtensa/include/asm/cacheflush.h | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | * specials for cache aliasing: | 37 | * specials for cache aliasing: |
| 38 | * | 38 | * |
| 39 | * __flush_invalidate_dcache_page_alias(vaddr,paddr) | 39 | * __flush_invalidate_dcache_page_alias(vaddr,paddr) |
| 40 | * __invalidate_dcache_page_alias(vaddr,paddr) | ||
| 40 | * __invalidate_icache_page_alias(vaddr,paddr) | 41 | * __invalidate_icache_page_alias(vaddr,paddr) |
| 41 | */ | 42 | */ |
| 42 | 43 | ||
| @@ -62,6 +63,7 @@ extern void __flush_invalidate_dcache_range(unsigned long, unsigned long); | |||
| 62 | 63 | ||
| 63 | #if defined(CONFIG_MMU) && (DCACHE_WAY_SIZE > PAGE_SIZE) | 64 | #if defined(CONFIG_MMU) && (DCACHE_WAY_SIZE > PAGE_SIZE) |
| 64 | extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long); | 65 | extern void __flush_invalidate_dcache_page_alias(unsigned long, unsigned long); |
| 66 | extern void __invalidate_dcache_page_alias(unsigned long, unsigned long); | ||
| 65 | #else | 67 | #else |
| 66 | static inline void __flush_invalidate_dcache_page_alias(unsigned long virt, | 68 | static inline void __flush_invalidate_dcache_page_alias(unsigned long virt, |
| 67 | unsigned long phys) { } | 69 | unsigned long phys) { } |
diff --git a/arch/xtensa/include/asm/fixmap.h b/arch/xtensa/include/asm/fixmap.h index 9f6c33d0428a..62b507deea9d 100644 --- a/arch/xtensa/include/asm/fixmap.h +++ b/arch/xtensa/include/asm/fixmap.h | |||
| @@ -23,8 +23,8 @@ | |||
| 23 | * Here we define all the compile-time 'special' virtual | 23 | * Here we define all the compile-time 'special' virtual |
| 24 | * addresses. The point is to have a constant address at | 24 | * addresses. The point is to have a constant address at |
| 25 | * compile time, but to set the physical address only | 25 | * compile time, but to set the physical address only |
| 26 | * in the boot process. We allocate these special addresses | 26 | * in the boot process. We allocate these special addresses |
| 27 | * from the end of the consistent memory region backwards. | 27 | * from the start of the consistent memory region upwards. |
| 28 | * Also this lets us do fail-safe vmalloc(), we | 28 | * Also this lets us do fail-safe vmalloc(), we |
| 29 | * can guarantee that these special addresses and | 29 | * can guarantee that these special addresses and |
| 30 | * vmalloc()-ed addresses never overlap. | 30 | * vmalloc()-ed addresses never overlap. |
| @@ -38,7 +38,8 @@ enum fixed_addresses { | |||
| 38 | #ifdef CONFIG_HIGHMEM | 38 | #ifdef CONFIG_HIGHMEM |
| 39 | /* reserved pte's for temporary kernel mappings */ | 39 | /* reserved pte's for temporary kernel mappings */ |
| 40 | FIX_KMAP_BEGIN, | 40 | FIX_KMAP_BEGIN, |
| 41 | FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_TYPE_NR * NR_CPUS) - 1, | 41 | FIX_KMAP_END = FIX_KMAP_BEGIN + |
| 42 | (KM_TYPE_NR * NR_CPUS * DCACHE_N_COLORS) - 1, | ||
| 42 | #endif | 43 | #endif |
| 43 | __end_of_fixed_addresses | 44 | __end_of_fixed_addresses |
| 44 | }; | 45 | }; |
| @@ -47,7 +48,28 @@ enum fixed_addresses { | |||
| 47 | #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) | 48 | #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) |
| 48 | #define FIXADDR_START ((FIXADDR_TOP - FIXADDR_SIZE) & PMD_MASK) | 49 | #define FIXADDR_START ((FIXADDR_TOP - FIXADDR_SIZE) & PMD_MASK) |
| 49 | 50 | ||
| 50 | #include <asm-generic/fixmap.h> | 51 | #define __fix_to_virt(x) (FIXADDR_START + ((x) << PAGE_SHIFT)) |
| 52 | #define __virt_to_fix(x) (((x) - FIXADDR_START) >> PAGE_SHIFT) | ||
| 53 | |||
| 54 | #ifndef __ASSEMBLY__ | ||
| 55 | /* | ||
| 56 | * 'index to address' translation. If anyone tries to use the idx | ||
| 57 | * directly without translation, we catch the bug with a NULL-deference | ||
| 58 | * kernel oops. Illegal ranges of incoming indices are caught too. | ||
| 59 | */ | ||
| 60 | static __always_inline unsigned long fix_to_virt(const unsigned int idx) | ||
| 61 | { | ||
| 62 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses); | ||
| 63 | return __fix_to_virt(idx); | ||
| 64 | } | ||
| 65 | |||
| 66 | static inline unsigned long virt_to_fix(const unsigned long vaddr) | ||
| 67 | { | ||
| 68 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | ||
| 69 | return __virt_to_fix(vaddr); | ||
| 70 | } | ||
| 71 | |||
| 72 | #endif | ||
| 51 | 73 | ||
| 52 | #define kmap_get_fixmap_pte(vaddr) \ | 74 | #define kmap_get_fixmap_pte(vaddr) \ |
| 53 | pte_offset_kernel( \ | 75 | pte_offset_kernel( \ |
diff --git a/arch/xtensa/include/asm/highmem.h b/arch/xtensa/include/asm/highmem.h index 2653ef5d55f1..2c7901edffaf 100644 --- a/arch/xtensa/include/asm/highmem.h +++ b/arch/xtensa/include/asm/highmem.h | |||
| @@ -12,19 +12,55 @@ | |||
| 12 | #ifndef _XTENSA_HIGHMEM_H | 12 | #ifndef _XTENSA_HIGHMEM_H |
| 13 | #define _XTENSA_HIGHMEM_H | 13 | #define _XTENSA_HIGHMEM_H |
| 14 | 14 | ||
| 15 | #include <linux/wait.h> | ||
| 15 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
| 16 | #include <asm/fixmap.h> | 17 | #include <asm/fixmap.h> |
| 17 | #include <asm/kmap_types.h> | 18 | #include <asm/kmap_types.h> |
| 18 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
| 19 | 20 | ||
| 20 | #define PKMAP_BASE (FIXADDR_START - PMD_SIZE) | 21 | #define PKMAP_BASE ((FIXADDR_START - \ |
| 21 | #define LAST_PKMAP PTRS_PER_PTE | 22 | (LAST_PKMAP + 1) * PAGE_SIZE) & PMD_MASK) |
| 23 | #define LAST_PKMAP (PTRS_PER_PTE * DCACHE_N_COLORS) | ||
| 22 | #define LAST_PKMAP_MASK (LAST_PKMAP - 1) | 24 | #define LAST_PKMAP_MASK (LAST_PKMAP - 1) |
| 23 | #define PKMAP_NR(virt) (((virt) - PKMAP_BASE) >> PAGE_SHIFT) | 25 | #define PKMAP_NR(virt) (((virt) - PKMAP_BASE) >> PAGE_SHIFT) |
| 24 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | 26 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) |
| 25 | 27 | ||
| 26 | #define kmap_prot PAGE_KERNEL | 28 | #define kmap_prot PAGE_KERNEL |
| 27 | 29 | ||
| 30 | #if DCACHE_WAY_SIZE > PAGE_SIZE | ||
| 31 | #define get_pkmap_color get_pkmap_color | ||
| 32 | static inline int get_pkmap_color(struct page *page) | ||
| 33 | { | ||
| 34 | return DCACHE_ALIAS(page_to_phys(page)); | ||
| 35 | } | ||
| 36 | |||
| 37 | extern unsigned int last_pkmap_nr_arr[]; | ||
| 38 | |||
| 39 | static inline unsigned int get_next_pkmap_nr(unsigned int color) | ||
| 40 | { | ||
| 41 | last_pkmap_nr_arr[color] = | ||
| 42 | (last_pkmap_nr_arr[color] + DCACHE_N_COLORS) & LAST_PKMAP_MASK; | ||
| 43 | return last_pkmap_nr_arr[color] + color; | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline int no_more_pkmaps(unsigned int pkmap_nr, unsigned int color) | ||
| 47 | { | ||
| 48 | return pkmap_nr < DCACHE_N_COLORS; | ||
| 49 | } | ||
| 50 | |||
| 51 | static inline int get_pkmap_entries_count(unsigned int color) | ||
| 52 | { | ||
| 53 | return LAST_PKMAP / DCACHE_N_COLORS; | ||
| 54 | } | ||
| 55 | |||
| 56 | extern wait_queue_head_t pkmap_map_wait_arr[]; | ||
| 57 | |||
| 58 | static inline wait_queue_head_t *get_pkmap_wait_queue_head(unsigned int color) | ||
| 59 | { | ||
| 60 | return pkmap_map_wait_arr + color; | ||
| 61 | } | ||
| 62 | #endif | ||
| 63 | |||
| 28 | extern pte_t *pkmap_page_table; | 64 | extern pte_t *pkmap_page_table; |
| 29 | 65 | ||
| 30 | void *kmap_high(struct page *page); | 66 | void *kmap_high(struct page *page); |
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h index 47f582333f6b..abe24c6f8b2f 100644 --- a/arch/xtensa/include/asm/page.h +++ b/arch/xtensa/include/asm/page.h | |||
| @@ -78,7 +78,9 @@ | |||
| 78 | # define DCACHE_ALIAS_EQ(a,b) ((((a) ^ (b)) & DCACHE_ALIAS_MASK) == 0) | 78 | # define DCACHE_ALIAS_EQ(a,b) ((((a) ^ (b)) & DCACHE_ALIAS_MASK) == 0) |
| 79 | #else | 79 | #else |
| 80 | # define DCACHE_ALIAS_ORDER 0 | 80 | # define DCACHE_ALIAS_ORDER 0 |
| 81 | # define DCACHE_ALIAS(a) ((void)(a), 0) | ||
| 81 | #endif | 82 | #endif |
| 83 | #define DCACHE_N_COLORS (1 << DCACHE_ALIAS_ORDER) | ||
| 82 | 84 | ||
| 83 | #if ICACHE_WAY_SIZE > PAGE_SIZE | 85 | #if ICACHE_WAY_SIZE > PAGE_SIZE |
| 84 | # define ICACHE_ALIAS_ORDER (ICACHE_WAY_SHIFT - PAGE_SHIFT) | 86 | # define ICACHE_ALIAS_ORDER (ICACHE_WAY_SHIFT - PAGE_SHIFT) |
| @@ -134,6 +136,7 @@ static inline __attribute_const__ int get_order(unsigned long size) | |||
| 134 | #endif | 136 | #endif |
| 135 | 137 | ||
| 136 | struct page; | 138 | struct page; |
| 139 | struct vm_area_struct; | ||
| 137 | extern void clear_page(void *page); | 140 | extern void clear_page(void *page); |
| 138 | extern void copy_page(void *to, void *from); | 141 | extern void copy_page(void *to, void *from); |
| 139 | 142 | ||
| @@ -143,8 +146,15 @@ extern void copy_page(void *to, void *from); | |||
| 143 | */ | 146 | */ |
| 144 | 147 | ||
| 145 | #if DCACHE_WAY_SIZE > PAGE_SIZE | 148 | #if DCACHE_WAY_SIZE > PAGE_SIZE |
| 146 | extern void clear_user_page(void*, unsigned long, struct page*); | 149 | extern void clear_page_alias(void *vaddr, unsigned long paddr); |
| 147 | extern void copy_user_page(void*, void*, unsigned long, struct page*); | 150 | extern void copy_page_alias(void *to, void *from, |
| 151 | unsigned long to_paddr, unsigned long from_paddr); | ||
| 152 | |||
| 153 | #define clear_user_highpage clear_user_highpage | ||
| 154 | void clear_user_highpage(struct page *page, unsigned long vaddr); | ||
| 155 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | ||
| 156 | void copy_user_highpage(struct page *to, struct page *from, | ||
| 157 | unsigned long vaddr, struct vm_area_struct *vma); | ||
| 148 | #else | 158 | #else |
| 149 | # define clear_user_page(page, vaddr, pg) clear_page(page) | 159 | # define clear_user_page(page, vaddr, pg) clear_page(page) |
| 150 | # define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | 160 | # define copy_user_page(to, from, vaddr, pg) copy_page(to, from) |
diff --git a/arch/xtensa/include/asm/pgtable.h b/arch/xtensa/include/asm/pgtable.h index 4b0ca35a93b1..b2173e5da601 100644 --- a/arch/xtensa/include/asm/pgtable.h +++ b/arch/xtensa/include/asm/pgtable.h | |||
| @@ -67,7 +67,12 @@ | |||
| 67 | #define VMALLOC_START 0xC0000000 | 67 | #define VMALLOC_START 0xC0000000 |
| 68 | #define VMALLOC_END 0xC7FEFFFF | 68 | #define VMALLOC_END 0xC7FEFFFF |
| 69 | #define TLBTEMP_BASE_1 0xC7FF0000 | 69 | #define TLBTEMP_BASE_1 0xC7FF0000 |
| 70 | #define TLBTEMP_BASE_2 0xC7FF8000 | 70 | #define TLBTEMP_BASE_2 (TLBTEMP_BASE_1 + DCACHE_WAY_SIZE) |
| 71 | #if 2 * DCACHE_WAY_SIZE > ICACHE_WAY_SIZE | ||
| 72 | #define TLBTEMP_SIZE (2 * DCACHE_WAY_SIZE) | ||
| 73 | #else | ||
| 74 | #define TLBTEMP_SIZE ICACHE_WAY_SIZE | ||
| 75 | #endif | ||
| 71 | 76 | ||
| 72 | /* | 77 | /* |
| 73 | * For the Xtensa architecture, the PTE layout is as follows: | 78 | * For the Xtensa architecture, the PTE layout is as follows: |
diff --git a/arch/xtensa/include/asm/uaccess.h b/arch/xtensa/include/asm/uaccess.h index fd686dc45d1a..c7211e7e182d 100644 --- a/arch/xtensa/include/asm/uaccess.h +++ b/arch/xtensa/include/asm/uaccess.h | |||
| @@ -52,7 +52,12 @@ | |||
| 52 | */ | 52 | */ |
| 53 | .macro get_fs ad, sp | 53 | .macro get_fs ad, sp |
| 54 | GET_CURRENT(\ad,\sp) | 54 | GET_CURRENT(\ad,\sp) |
| 55 | #if THREAD_CURRENT_DS > 1020 | ||
| 56 | addi \ad, \ad, TASK_THREAD | ||
| 57 | l32i \ad, \ad, THREAD_CURRENT_DS - TASK_THREAD | ||
| 58 | #else | ||
| 55 | l32i \ad, \ad, THREAD_CURRENT_DS | 59 | l32i \ad, \ad, THREAD_CURRENT_DS |
| 60 | #endif | ||
| 56 | .endm | 61 | .endm |
| 57 | 62 | ||
| 58 | /* | 63 | /* |
diff --git a/arch/xtensa/include/uapi/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h index b4cb1100c0fb..a47909f0c34b 100644 --- a/arch/xtensa/include/uapi/asm/ioctls.h +++ b/arch/xtensa/include/uapi/asm/ioctls.h | |||
| @@ -28,17 +28,17 @@ | |||
| 28 | #define TCSETSW 0x5403 | 28 | #define TCSETSW 0x5403 |
| 29 | #define TCSETSF 0x5404 | 29 | #define TCSETSF 0x5404 |
| 30 | 30 | ||
| 31 | #define TCGETA _IOR('t', 23, struct termio) | 31 | #define TCGETA 0x80127417 /* _IOR('t', 23, struct termio) */ |
| 32 | #define TCSETA _IOW('t', 24, struct termio) | 32 | #define TCSETA 0x40127418 /* _IOW('t', 24, struct termio) */ |
| 33 | #define TCSETAW _IOW('t', 25, struct termio) | 33 | #define TCSETAW 0x40127419 /* _IOW('t', 25, struct termio) */ |
| 34 | #define TCSETAF _IOW('t', 28, struct termio) | 34 | #define TCSETAF 0x4012741C /* _IOW('t', 28, struct termio) */ |
| 35 | 35 | ||
| 36 | #define TCSBRK _IO('t', 29) | 36 | #define TCSBRK _IO('t', 29) |
| 37 | #define TCXONC _IO('t', 30) | 37 | #define TCXONC _IO('t', 30) |
| 38 | #define TCFLSH _IO('t', 31) | 38 | #define TCFLSH _IO('t', 31) |
| 39 | 39 | ||
| 40 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) | 40 | #define TIOCSWINSZ 0x40087467 /* _IOW('t', 103, struct winsize) */ |
| 41 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) | 41 | #define TIOCGWINSZ 0x80087468 /* _IOR('t', 104, struct winsize) */ |
| 42 | #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ | 42 | #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ |
| 43 | #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ | 43 | #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ |
| 44 | #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ | 44 | #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ |
| @@ -88,7 +88,6 @@ | |||
| 88 | #define TIOCSETD _IOW('T', 35, int) | 88 | #define TIOCSETD _IOW('T', 35, int) |
| 89 | #define TIOCGETD _IOR('T', 36, int) | 89 | #define TIOCGETD _IOR('T', 36, int) |
| 90 | #define TCSBRKP _IOW('T', 37, int) /* Needed for POSIX tcsendbreak()*/ | 90 | #define TCSBRKP _IOW('T', 37, int) /* Needed for POSIX tcsendbreak()*/ |
| 91 | #define TIOCTTYGSTRUCT _IOR('T', 38, struct tty_struct) /* For debugging only*/ | ||
| 92 | #define TIOCSBRK _IO('T', 39) /* BSD compatibility */ | 91 | #define TIOCSBRK _IO('T', 39) /* BSD compatibility */ |
| 93 | #define TIOCCBRK _IO('T', 40) /* BSD compatibility */ | 92 | #define TIOCCBRK _IO('T', 40) /* BSD compatibility */ |
| 94 | #define TIOCGSID _IOR('T', 41, pid_t) /* Return the session ID of FD*/ | 93 | #define TIOCGSID _IOR('T', 41, pid_t) /* Return the session ID of FD*/ |
| @@ -114,8 +113,10 @@ | |||
| 114 | #define TIOCSERGETLSR _IOR('T', 89, unsigned int) /* Get line status reg. */ | 113 | #define TIOCSERGETLSR _IOR('T', 89, unsigned int) /* Get line status reg. */ |
| 115 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 114 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
| 116 | # define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 115 | # define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
| 117 | #define TIOCSERGETMULTI _IOR('T', 90, struct serial_multiport_struct) /* Get multiport config */ | 116 | #define TIOCSERGETMULTI 0x80a8545a /* Get multiport config */ |
| 118 | #define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* Set multiport config */ | 117 | /* _IOR('T', 90, struct serial_multiport_struct) */ |
| 118 | #define TIOCSERSETMULTI 0x40a8545b /* Set multiport config */ | ||
| 119 | /* _IOW('T', 91, struct serial_multiport_struct) */ | ||
| 119 | 120 | ||
| 120 | #define TIOCMIWAIT _IO('T', 92) /* wait for a change on serial input line(s) */ | 121 | #define TIOCMIWAIT _IO('T', 92) /* wait for a change on serial input line(s) */ |
| 121 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | 122 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h index b9395529f02d..8883fc877c5c 100644 --- a/arch/xtensa/include/uapi/asm/unistd.h +++ b/arch/xtensa/include/uapi/asm/unistd.h | |||
| @@ -739,7 +739,10 @@ __SYSCALL(334, sys_sched_setattr, 2) | |||
| 739 | #define __NR_sched_getattr 335 | 739 | #define __NR_sched_getattr 335 |
| 740 | __SYSCALL(335, sys_sched_getattr, 3) | 740 | __SYSCALL(335, sys_sched_getattr, 3) |
| 741 | 741 | ||
| 742 | #define __NR_syscall_count 336 | 742 | #define __NR_renameat2 336 |
| 743 | __SYSCALL(336, sys_renameat2, 5) | ||
| 744 | |||
| 745 | #define __NR_syscall_count 337 | ||
| 743 | 746 | ||
| 744 | /* | 747 | /* |
| 745 | * sysxtensa syscall handler | 748 | * sysxtensa syscall handler |
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S index d4cef6039a5c..890004af03a9 100644 --- a/arch/xtensa/kernel/align.S +++ b/arch/xtensa/kernel/align.S | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | * this archive for more details. | 8 | * this archive for more details. |
| 9 | * | 9 | * |
| 10 | * Copyright (C) 2001 - 2005 Tensilica, Inc. | 10 | * Copyright (C) 2001 - 2005 Tensilica, Inc. |
| 11 | * Copyright (C) 2014 Cadence Design Systems Inc. | ||
| 11 | * | 12 | * |
| 12 | * Rewritten by Chris Zankel <chris@zankel.net> | 13 | * Rewritten by Chris Zankel <chris@zankel.net> |
| 13 | * | 14 | * |
| @@ -174,6 +175,10 @@ ENTRY(fast_unaligned) | |||
| 174 | s32i a0, a2, PT_AREG2 | 175 | s32i a0, a2, PT_AREG2 |
| 175 | s32i a3, a2, PT_AREG3 | 176 | s32i a3, a2, PT_AREG3 |
| 176 | 177 | ||
| 178 | rsr a3, excsave1 | ||
| 179 | movi a4, fast_unaligned_fixup | ||
| 180 | s32i a4, a3, EXC_TABLE_FIXUP | ||
| 181 | |||
| 177 | /* Keep value of SAR in a0 */ | 182 | /* Keep value of SAR in a0 */ |
| 178 | 183 | ||
| 179 | rsr a0, sar | 184 | rsr a0, sar |
| @@ -225,10 +230,6 @@ ENTRY(fast_unaligned) | |||
| 225 | addx8 a5, a6, a5 | 230 | addx8 a5, a6, a5 |
| 226 | jx a5 # jump into table | 231 | jx a5 # jump into table |
| 227 | 232 | ||
| 228 | /* Invalid instruction, CRITICAL! */ | ||
| 229 | .Linvalid_instruction_load: | ||
| 230 | j .Linvalid_instruction | ||
| 231 | |||
| 232 | /* Load: Load memory address. */ | 233 | /* Load: Load memory address. */ |
| 233 | 234 | ||
| 234 | .Lload: movi a3, ~3 | 235 | .Lload: movi a3, ~3 |
| @@ -272,18 +273,6 @@ ENTRY(fast_unaligned) | |||
| 272 | /* Set target register. */ | 273 | /* Set target register. */ |
| 273 | 274 | ||
| 274 | 1: | 275 | 1: |
| 275 | |||
| 276 | #if XCHAL_HAVE_LOOPS | ||
| 277 | rsr a5, lend # check if we reached LEND | ||
| 278 | bne a7, a5, 1f | ||
| 279 | rsr a5, lcount # and LCOUNT != 0 | ||
| 280 | beqz a5, 1f | ||
| 281 | addi a5, a5, -1 # decrement LCOUNT and set | ||
| 282 | rsr a7, lbeg # set PC to LBEGIN | ||
| 283 | wsr a5, lcount | ||
| 284 | #endif | ||
| 285 | |||
| 286 | 1: wsr a7, epc1 # skip load instruction | ||
| 287 | extui a4, a4, INSN_T, 4 # extract target register | 276 | extui a4, a4, INSN_T, 4 # extract target register |
| 288 | movi a5, .Lload_table | 277 | movi a5, .Lload_table |
| 289 | addx8 a4, a4, a5 | 278 | addx8 a4, a4, a5 |
| @@ -326,6 +315,35 @@ ENTRY(fast_unaligned) | |||
| 326 | mov a3, a14 ; _j 1f; .align 8 | 315 | mov a3, a14 ; _j 1f; .align 8 |
| 327 | mov a3, a15 ; _j 1f; .align 8 | 316 | mov a3, a15 ; _j 1f; .align 8 |
| 328 | 317 | ||
| 318 | /* We cannot handle this exception. */ | ||
| 319 | |||
| 320 | .extern _kernel_exception | ||
| 321 | .Linvalid_instruction_load: | ||
| 322 | .Linvalid_instruction_store: | ||
| 323 | |||
| 324 | movi a4, 0 | ||
| 325 | rsr a3, excsave1 | ||
| 326 | s32i a4, a3, EXC_TABLE_FIXUP | ||
| 327 | |||
| 328 | /* Restore a4...a8 and SAR, set SP, and jump to default exception. */ | ||
| 329 | |||
| 330 | l32i a8, a2, PT_AREG8 | ||
| 331 | l32i a7, a2, PT_AREG7 | ||
| 332 | l32i a6, a2, PT_AREG6 | ||
| 333 | l32i a5, a2, PT_AREG5 | ||
| 334 | l32i a4, a2, PT_AREG4 | ||
| 335 | wsr a0, sar | ||
| 336 | mov a1, a2 | ||
| 337 | |||
| 338 | rsr a0, ps | ||
| 339 | bbsi.l a0, PS_UM_BIT, 2f # jump if user mode | ||
| 340 | |||
| 341 | movi a0, _kernel_exception | ||
| 342 | jx a0 | ||
| 343 | |||
| 344 | 2: movi a0, _user_exception | ||
| 345 | jx a0 | ||
| 346 | |||
| 329 | 1: # a7: instruction pointer, a4: instruction, a3: value | 347 | 1: # a7: instruction pointer, a4: instruction, a3: value |
| 330 | 348 | ||
| 331 | movi a6, 0 # mask: ffffffff:00000000 | 349 | movi a6, 0 # mask: ffffffff:00000000 |
| @@ -353,17 +371,6 @@ ENTRY(fast_unaligned) | |||
| 353 | /* Get memory address */ | 371 | /* Get memory address */ |
| 354 | 372 | ||
| 355 | 1: | 373 | 1: |
| 356 | #if XCHAL_HAVE_LOOPS | ||
| 357 | rsr a4, lend # check if we reached LEND | ||
| 358 | bne a7, a4, 1f | ||
| 359 | rsr a4, lcount # and LCOUNT != 0 | ||
| 360 | beqz a4, 1f | ||
| 361 | addi a4, a4, -1 # decrement LCOUNT and set | ||
| 362 | rsr a7, lbeg # set PC to LBEGIN | ||
| 363 | wsr a4, lcount | ||
| 364 | #endif | ||
| 365 | |||
| 366 | 1: wsr a7, epc1 # skip store instruction | ||
| 367 | movi a4, ~3 | 374 | movi a4, ~3 |
| 368 | and a4, a4, a8 # align memory address | 375 | and a4, a4, a8 # align memory address |
| 369 | 376 | ||
| @@ -375,25 +382,25 @@ ENTRY(fast_unaligned) | |||
| 375 | #endif | 382 | #endif |
| 376 | 383 | ||
| 377 | __ssa8r a8 | 384 | __ssa8r a8 |
| 378 | __src_b a7, a5, a6 # lo-mask F..F0..0 (BE) 0..0F..F (LE) | 385 | __src_b a8, a5, a6 # lo-mask F..F0..0 (BE) 0..0F..F (LE) |
| 379 | __src_b a6, a6, a5 # hi-mask 0..0F..F (BE) F..F0..0 (LE) | 386 | __src_b a6, a6, a5 # hi-mask 0..0F..F (BE) F..F0..0 (LE) |
| 380 | #ifdef UNALIGNED_USER_EXCEPTION | 387 | #ifdef UNALIGNED_USER_EXCEPTION |
| 381 | l32e a5, a4, -8 | 388 | l32e a5, a4, -8 |
| 382 | #else | 389 | #else |
| 383 | l32i a5, a4, 0 # load lower address word | 390 | l32i a5, a4, 0 # load lower address word |
| 384 | #endif | 391 | #endif |
| 385 | and a5, a5, a7 # mask | 392 | and a5, a5, a8 # mask |
| 386 | __sh a7, a3 # shift value | 393 | __sh a8, a3 # shift value |
| 387 | or a5, a5, a7 # or with original value | 394 | or a5, a5, a8 # or with original value |
| 388 | #ifdef UNALIGNED_USER_EXCEPTION | 395 | #ifdef UNALIGNED_USER_EXCEPTION |
| 389 | s32e a5, a4, -8 | 396 | s32e a5, a4, -8 |
| 390 | l32e a7, a4, -4 | 397 | l32e a8, a4, -4 |
| 391 | #else | 398 | #else |
| 392 | s32i a5, a4, 0 # store | 399 | s32i a5, a4, 0 # store |
| 393 | l32i a7, a4, 4 # same for upper address word | 400 | l32i a8, a4, 4 # same for upper address word |
| 394 | #endif | 401 | #endif |
| 395 | __sl a5, a3 | 402 | __sl a5, a3 |
| 396 | and a6, a7, a6 | 403 | and a6, a8, a6 |
| 397 | or a6, a6, a5 | 404 | or a6, a6, a5 |
| 398 | #ifdef UNALIGNED_USER_EXCEPTION | 405 | #ifdef UNALIGNED_USER_EXCEPTION |
| 399 | s32e a6, a4, -4 | 406 | s32e a6, a4, -4 |
| @@ -401,9 +408,27 @@ ENTRY(fast_unaligned) | |||
| 401 | s32i a6, a4, 4 | 408 | s32i a6, a4, 4 |
| 402 | #endif | 409 | #endif |
| 403 | 410 | ||
| 404 | /* Done. restore stack and return */ | ||
| 405 | |||
| 406 | .Lexit: | 411 | .Lexit: |
| 412 | #if XCHAL_HAVE_LOOPS | ||
| 413 | rsr a4, lend # check if we reached LEND | ||
| 414 | bne a7, a4, 1f | ||
| 415 | rsr a4, lcount # and LCOUNT != 0 | ||
| 416 | beqz a4, 1f | ||
| 417 | addi a4, a4, -1 # decrement LCOUNT and set | ||
| 418 | rsr a7, lbeg # set PC to LBEGIN | ||
| 419 | wsr a4, lcount | ||
| 420 | #endif | ||
| 421 | |||
| 422 | 1: wsr a7, epc1 # skip emulated instruction | ||
| 423 | |||
| 424 | /* Update icount if we're single-stepping in userspace. */ | ||
| 425 | rsr a4, icountlevel | ||
| 426 | beqz a4, 1f | ||
| 427 | bgeui a4, LOCKLEVEL + 1, 1f | ||
| 428 | rsr a4, icount | ||
| 429 | addi a4, a4, 1 | ||
| 430 | wsr a4, icount | ||
| 431 | 1: | ||
| 407 | movi a4, 0 | 432 | movi a4, 0 |
| 408 | rsr a3, excsave1 | 433 | rsr a3, excsave1 |
| 409 | s32i a4, a3, EXC_TABLE_FIXUP | 434 | s32i a4, a3, EXC_TABLE_FIXUP |
| @@ -424,31 +449,40 @@ ENTRY(fast_unaligned) | |||
| 424 | l32i a2, a2, PT_AREG2 | 449 | l32i a2, a2, PT_AREG2 |
| 425 | rfe | 450 | rfe |
| 426 | 451 | ||
| 427 | /* We cannot handle this exception. */ | 452 | ENDPROC(fast_unaligned) |
| 428 | 453 | ||
| 429 | .extern _kernel_exception | 454 | ENTRY(fast_unaligned_fixup) |
| 430 | .Linvalid_instruction_store: | ||
| 431 | .Linvalid_instruction: | ||
| 432 | 455 | ||
| 433 | /* Restore a4...a8 and SAR, set SP, and jump to default exception. */ | 456 | l32i a2, a3, EXC_TABLE_DOUBLE_SAVE |
| 457 | wsr a3, excsave1 | ||
| 434 | 458 | ||
| 435 | l32i a8, a2, PT_AREG8 | 459 | l32i a8, a2, PT_AREG8 |
| 436 | l32i a7, a2, PT_AREG7 | 460 | l32i a7, a2, PT_AREG7 |
| 437 | l32i a6, a2, PT_AREG6 | 461 | l32i a6, a2, PT_AREG6 |
| 438 | l32i a5, a2, PT_AREG5 | 462 | l32i a5, a2, PT_AREG5 |
| 439 | l32i a4, a2, PT_AREG4 | 463 | l32i a4, a2, PT_AREG4 |
| 464 | l32i a0, a2, PT_AREG2 | ||
| 465 | xsr a0, depc # restore depc and a0 | ||
| 440 | wsr a0, sar | 466 | wsr a0, sar |
| 441 | mov a1, a2 | 467 | |
| 468 | rsr a0, exccause | ||
| 469 | s32i a0, a2, PT_DEPC # mark as a regular exception | ||
| 442 | 470 | ||
| 443 | rsr a0, ps | 471 | rsr a0, ps |
| 444 | bbsi.l a2, PS_UM_BIT, 1f # jump if user mode | 472 | bbsi.l a0, PS_UM_BIT, 1f # jump if user mode |
| 445 | 473 | ||
| 446 | movi a0, _kernel_exception | 474 | rsr a0, exccause |
| 475 | addx4 a0, a0, a3 # find entry in table | ||
| 476 | l32i a0, a0, EXC_TABLE_FAST_KERNEL # load handler | ||
| 477 | l32i a3, a2, PT_AREG3 | ||
| 447 | jx a0 | 478 | jx a0 |
| 448 | 479 | 1: | |
| 449 | 1: movi a0, _user_exception | 480 | rsr a0, exccause |
| 481 | addx4 a0, a0, a3 # find entry in table | ||
| 482 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler | ||
| 483 | l32i a3, a2, PT_AREG3 | ||
| 450 | jx a0 | 484 | jx a0 |
| 451 | 485 | ||
| 452 | ENDPROC(fast_unaligned) | 486 | ENDPROC(fast_unaligned_fixup) |
| 453 | 487 | ||
| 454 | #endif /* XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION */ | 488 | #endif /* XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION */ |
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index ef7f4990722b..82bbfa5a05b3 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
| @@ -986,6 +986,8 @@ ENDPROC(fast_syscall_unrecoverable) | |||
| 986 | * j done | 986 | * j done |
| 987 | */ | 987 | */ |
| 988 | 988 | ||
| 989 | #ifdef CONFIG_FAST_SYSCALL_XTENSA | ||
| 990 | |||
| 989 | #define TRY \ | 991 | #define TRY \ |
| 990 | .section __ex_table, "a"; \ | 992 | .section __ex_table, "a"; \ |
| 991 | .word 66f, 67f; \ | 993 | .word 66f, 67f; \ |
| @@ -1001,9 +1003,8 @@ ENTRY(fast_syscall_xtensa) | |||
| 1001 | movi a7, 4 # sizeof(unsigned int) | 1003 | movi a7, 4 # sizeof(unsigned int) |
| 1002 | access_ok a3, a7, a0, a2, .Leac # a0: scratch reg, a2: sp | 1004 | access_ok a3, a7, a0, a2, .Leac # a0: scratch reg, a2: sp |
| 1003 | 1005 | ||
| 1004 | addi a6, a6, -1 # assuming SYS_XTENSA_ATOMIC_SET = 1 | 1006 | _bgeui a6, SYS_XTENSA_COUNT, .Lill |
| 1005 | _bgeui a6, SYS_XTENSA_COUNT - 1, .Lill | 1007 | _bnei a6, SYS_XTENSA_ATOMIC_CMP_SWP, .Lnswp |
| 1006 | _bnei a6, SYS_XTENSA_ATOMIC_CMP_SWP - 1, .Lnswp | ||
| 1007 | 1008 | ||
| 1008 | /* Fall through for ATOMIC_CMP_SWP. */ | 1009 | /* Fall through for ATOMIC_CMP_SWP. */ |
| 1009 | 1010 | ||
| @@ -1015,27 +1016,26 @@ TRY s32i a5, a3, 0 # different, modify value | |||
| 1015 | l32i a7, a2, PT_AREG7 # restore a7 | 1016 | l32i a7, a2, PT_AREG7 # restore a7 |
| 1016 | l32i a0, a2, PT_AREG0 # restore a0 | 1017 | l32i a0, a2, PT_AREG0 # restore a0 |
| 1017 | movi a2, 1 # and return 1 | 1018 | movi a2, 1 # and return 1 |
| 1018 | addi a6, a6, 1 # restore a6 (really necessary?) | ||
| 1019 | rfe | 1019 | rfe |
| 1020 | 1020 | ||
| 1021 | 1: l32i a7, a2, PT_AREG7 # restore a7 | 1021 | 1: l32i a7, a2, PT_AREG7 # restore a7 |
| 1022 | l32i a0, a2, PT_AREG0 # restore a0 | 1022 | l32i a0, a2, PT_AREG0 # restore a0 |
| 1023 | movi a2, 0 # return 0 (note that we cannot set | 1023 | movi a2, 0 # return 0 (note that we cannot set |
| 1024 | addi a6, a6, 1 # restore a6 (really necessary?) | ||
| 1025 | rfe | 1024 | rfe |
| 1026 | 1025 | ||
| 1027 | .Lnswp: /* Atomic set, add, and exg_add. */ | 1026 | .Lnswp: /* Atomic set, add, and exg_add. */ |
| 1028 | 1027 | ||
| 1029 | TRY l32i a7, a3, 0 # orig | 1028 | TRY l32i a7, a3, 0 # orig |
| 1029 | addi a6, a6, -SYS_XTENSA_ATOMIC_SET | ||
| 1030 | add a0, a4, a7 # + arg | 1030 | add a0, a4, a7 # + arg |
| 1031 | moveqz a0, a4, a6 # set | 1031 | moveqz a0, a4, a6 # set |
| 1032 | addi a6, a6, SYS_XTENSA_ATOMIC_SET | ||
| 1032 | TRY s32i a0, a3, 0 # write new value | 1033 | TRY s32i a0, a3, 0 # write new value |
| 1033 | 1034 | ||
| 1034 | mov a0, a2 | 1035 | mov a0, a2 |
| 1035 | mov a2, a7 | 1036 | mov a2, a7 |
| 1036 | l32i a7, a0, PT_AREG7 # restore a7 | 1037 | l32i a7, a0, PT_AREG7 # restore a7 |
| 1037 | l32i a0, a0, PT_AREG0 # restore a0 | 1038 | l32i a0, a0, PT_AREG0 # restore a0 |
| 1038 | addi a6, a6, 1 # restore a6 (really necessary?) | ||
| 1039 | rfe | 1039 | rfe |
| 1040 | 1040 | ||
| 1041 | CATCH | 1041 | CATCH |
| @@ -1044,13 +1044,25 @@ CATCH | |||
| 1044 | movi a2, -EFAULT | 1044 | movi a2, -EFAULT |
| 1045 | rfe | 1045 | rfe |
| 1046 | 1046 | ||
| 1047 | .Lill: l32i a7, a2, PT_AREG0 # restore a7 | 1047 | .Lill: l32i a7, a2, PT_AREG7 # restore a7 |
| 1048 | l32i a0, a2, PT_AREG0 # restore a0 | 1048 | l32i a0, a2, PT_AREG0 # restore a0 |
| 1049 | movi a2, -EINVAL | 1049 | movi a2, -EINVAL |
| 1050 | rfe | 1050 | rfe |
| 1051 | 1051 | ||
| 1052 | ENDPROC(fast_syscall_xtensa) | 1052 | ENDPROC(fast_syscall_xtensa) |
| 1053 | 1053 | ||
| 1054 | #else /* CONFIG_FAST_SYSCALL_XTENSA */ | ||
| 1055 | |||
| 1056 | ENTRY(fast_syscall_xtensa) | ||
| 1057 | |||
| 1058 | l32i a0, a2, PT_AREG0 # restore a0 | ||
| 1059 | movi a2, -ENOSYS | ||
| 1060 | rfe | ||
| 1061 | |||
| 1062 | ENDPROC(fast_syscall_xtensa) | ||
| 1063 | |||
| 1064 | #endif /* CONFIG_FAST_SYSCALL_XTENSA */ | ||
| 1065 | |||
| 1054 | 1066 | ||
| 1055 | /* fast_syscall_spill_registers. | 1067 | /* fast_syscall_spill_registers. |
| 1056 | * | 1068 | * |
| @@ -1066,6 +1078,8 @@ ENDPROC(fast_syscall_xtensa) | |||
| 1066 | * Note: We assume the stack pointer is EXC_TABLE_KSTK in the fixup handler. | 1078 | * Note: We assume the stack pointer is EXC_TABLE_KSTK in the fixup handler. |
| 1067 | */ | 1079 | */ |
| 1068 | 1080 | ||
| 1081 | #ifdef CONFIG_FAST_SYSCALL_SPILL_REGISTERS | ||
| 1082 | |||
| 1069 | ENTRY(fast_syscall_spill_registers) | 1083 | ENTRY(fast_syscall_spill_registers) |
| 1070 | 1084 | ||
| 1071 | /* Register a FIXUP handler (pass current wb as a parameter) */ | 1085 | /* Register a FIXUP handler (pass current wb as a parameter) */ |
| @@ -1400,6 +1414,18 @@ ENTRY(fast_syscall_spill_registers_fixup_return) | |||
| 1400 | 1414 | ||
| 1401 | ENDPROC(fast_syscall_spill_registers_fixup_return) | 1415 | ENDPROC(fast_syscall_spill_registers_fixup_return) |
| 1402 | 1416 | ||
| 1417 | #else /* CONFIG_FAST_SYSCALL_SPILL_REGISTERS */ | ||
| 1418 | |||
| 1419 | ENTRY(fast_syscall_spill_registers) | ||
| 1420 | |||
| 1421 | l32i a0, a2, PT_AREG0 # restore a0 | ||
| 1422 | movi a2, -ENOSYS | ||
| 1423 | rfe | ||
| 1424 | |||
| 1425 | ENDPROC(fast_syscall_spill_registers) | ||
| 1426 | |||
| 1427 | #endif /* CONFIG_FAST_SYSCALL_SPILL_REGISTERS */ | ||
| 1428 | |||
| 1403 | #ifdef CONFIG_MMU | 1429 | #ifdef CONFIG_MMU |
| 1404 | /* | 1430 | /* |
| 1405 | * We should never get here. Bail out! | 1431 | * We should never get here. Bail out! |
| @@ -1565,7 +1591,7 @@ ENTRY(fast_second_level_miss) | |||
| 1565 | rsr a0, excvaddr | 1591 | rsr a0, excvaddr |
| 1566 | bltu a0, a3, 2f | 1592 | bltu a0, a3, 2f |
| 1567 | 1593 | ||
| 1568 | addi a1, a0, -(2 << (DCACHE_ALIAS_ORDER + PAGE_SHIFT)) | 1594 | addi a1, a0, -TLBTEMP_SIZE |
| 1569 | bgeu a1, a3, 2f | 1595 | bgeu a1, a3, 2f |
| 1570 | 1596 | ||
| 1571 | /* Check if we have to restore an ITLB mapping. */ | 1597 | /* Check if we have to restore an ITLB mapping. */ |
| @@ -1820,7 +1846,6 @@ ENTRY(_switch_to) | |||
| 1820 | 1846 | ||
| 1821 | entry a1, 16 | 1847 | entry a1, 16 |
| 1822 | 1848 | ||
| 1823 | mov a10, a2 # preserve 'prev' (a2) | ||
| 1824 | mov a11, a3 # and 'next' (a3) | 1849 | mov a11, a3 # and 'next' (a3) |
| 1825 | 1850 | ||
| 1826 | l32i a4, a2, TASK_THREAD_INFO | 1851 | l32i a4, a2, TASK_THREAD_INFO |
| @@ -1828,8 +1853,14 @@ ENTRY(_switch_to) | |||
| 1828 | 1853 | ||
| 1829 | save_xtregs_user a4 a6 a8 a9 a12 a13 THREAD_XTREGS_USER | 1854 | save_xtregs_user a4 a6 a8 a9 a12 a13 THREAD_XTREGS_USER |
| 1830 | 1855 | ||
| 1831 | s32i a0, a10, THREAD_RA # save return address | 1856 | #if THREAD_RA > 1020 || THREAD_SP > 1020 |
| 1832 | s32i a1, a10, THREAD_SP # save stack pointer | 1857 | addi a10, a2, TASK_THREAD |
| 1858 | s32i a0, a10, THREAD_RA - TASK_THREAD # save return address | ||
| 1859 | s32i a1, a10, THREAD_SP - TASK_THREAD # save stack pointer | ||
| 1860 | #else | ||
| 1861 | s32i a0, a2, THREAD_RA # save return address | ||
| 1862 | s32i a1, a2, THREAD_SP # save stack pointer | ||
| 1863 | #endif | ||
| 1833 | 1864 | ||
| 1834 | /* Disable ints while we manipulate the stack pointer. */ | 1865 | /* Disable ints while we manipulate the stack pointer. */ |
| 1835 | 1866 | ||
| @@ -1870,7 +1901,6 @@ ENTRY(_switch_to) | |||
| 1870 | load_xtregs_user a5 a6 a8 a9 a12 a13 THREAD_XTREGS_USER | 1901 | load_xtregs_user a5 a6 a8 a9 a12 a13 THREAD_XTREGS_USER |
| 1871 | 1902 | ||
| 1872 | wsr a14, ps | 1903 | wsr a14, ps |
| 1873 | mov a2, a10 # return 'prev' | ||
| 1874 | rsync | 1904 | rsync |
| 1875 | 1905 | ||
| 1876 | retw | 1906 | retw |
diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c index 2d9cc6dbfd78..e8b76b8e4b29 100644 --- a/arch/xtensa/kernel/pci-dma.c +++ b/arch/xtensa/kernel/pci-dma.c | |||
| @@ -49,9 +49,8 @@ dma_alloc_coherent(struct device *dev,size_t size,dma_addr_t *handle,gfp_t flag) | |||
| 49 | 49 | ||
| 50 | /* We currently don't support coherent memory outside KSEG */ | 50 | /* We currently don't support coherent memory outside KSEG */ |
| 51 | 51 | ||
| 52 | if (ret < XCHAL_KSEG_CACHED_VADDR | 52 | BUG_ON(ret < XCHAL_KSEG_CACHED_VADDR || |
| 53 | || ret >= XCHAL_KSEG_CACHED_VADDR + XCHAL_KSEG_SIZE) | 53 | ret > XCHAL_KSEG_CACHED_VADDR + XCHAL_KSEG_SIZE - 1); |
| 54 | BUG(); | ||
| 55 | 54 | ||
| 56 | 55 | ||
| 57 | if (ret != 0) { | 56 | if (ret != 0) { |
| @@ -68,10 +67,11 @@ EXPORT_SYMBOL(dma_alloc_coherent); | |||
| 68 | void dma_free_coherent(struct device *hwdev, size_t size, | 67 | void dma_free_coherent(struct device *hwdev, size_t size, |
| 69 | void *vaddr, dma_addr_t dma_handle) | 68 | void *vaddr, dma_addr_t dma_handle) |
| 70 | { | 69 | { |
| 71 | long addr=(long)vaddr+XCHAL_KSEG_CACHED_VADDR-XCHAL_KSEG_BYPASS_VADDR; | 70 | unsigned long addr = (unsigned long)vaddr + |
| 71 | XCHAL_KSEG_CACHED_VADDR - XCHAL_KSEG_BYPASS_VADDR; | ||
| 72 | 72 | ||
| 73 | if (addr < 0 || addr >= XCHAL_KSEG_SIZE) | 73 | BUG_ON(addr < XCHAL_KSEG_CACHED_VADDR || |
| 74 | BUG(); | 74 | addr > XCHAL_KSEG_CACHED_VADDR + XCHAL_KSEG_SIZE - 1); |
| 75 | 75 | ||
| 76 | free_pages(addr, get_order(size)); | 76 | free_pages(addr, get_order(size)); |
| 77 | } | 77 | } |
diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c index 40b5a3771fb0..4d02e38514f5 100644 --- a/arch/xtensa/kernel/smp.c +++ b/arch/xtensa/kernel/smp.c | |||
| @@ -571,6 +571,7 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
| 571 | }; | 571 | }; |
| 572 | on_each_cpu(ipi_flush_icache_range, &fd, 1); | 572 | on_each_cpu(ipi_flush_icache_range, &fd, 1); |
| 573 | } | 573 | } |
| 574 | EXPORT_SYMBOL(flush_icache_range); | ||
| 574 | 575 | ||
| 575 | /* ------------------------------------------------------------------------- */ | 576 | /* ------------------------------------------------------------------------- */ |
| 576 | 577 | ||
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index eebbfd8c26fc..9d2f45f010ef 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
| @@ -101,9 +101,8 @@ static dispatch_init_table_t __initdata dispatch_init_table[] = { | |||
| 101 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION | 101 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION |
| 102 | #ifdef CONFIG_XTENSA_UNALIGNED_USER | 102 | #ifdef CONFIG_XTENSA_UNALIGNED_USER |
| 103 | { EXCCAUSE_UNALIGNED, USER, fast_unaligned }, | 103 | { EXCCAUSE_UNALIGNED, USER, fast_unaligned }, |
| 104 | #else | ||
| 105 | { EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, | ||
| 106 | #endif | 104 | #endif |
| 105 | { EXCCAUSE_UNALIGNED, 0, do_unaligned_user }, | ||
| 107 | { EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, | 106 | { EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, |
| 108 | #endif | 107 | #endif |
| 109 | #ifdef CONFIG_MMU | 108 | #ifdef CONFIG_MMU |
| @@ -264,7 +263,6 @@ do_illegal_instruction(struct pt_regs *regs) | |||
| 264 | */ | 263 | */ |
| 265 | 264 | ||
| 266 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION | 265 | #if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION |
| 267 | #ifndef CONFIG_XTENSA_UNALIGNED_USER | ||
| 268 | void | 266 | void |
| 269 | do_unaligned_user (struct pt_regs *regs) | 267 | do_unaligned_user (struct pt_regs *regs) |
| 270 | { | 268 | { |
| @@ -286,7 +284,6 @@ do_unaligned_user (struct pt_regs *regs) | |||
| 286 | 284 | ||
| 287 | } | 285 | } |
| 288 | #endif | 286 | #endif |
| 289 | #endif | ||
| 290 | 287 | ||
| 291 | void | 288 | void |
| 292 | do_debug(struct pt_regs *regs) | 289 | do_debug(struct pt_regs *regs) |
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index 8453e6e39895..1b397a902292 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S | |||
| @@ -454,8 +454,14 @@ _DoubleExceptionVector_WindowOverflow: | |||
| 454 | s32i a0, a2, PT_DEPC | 454 | s32i a0, a2, PT_DEPC |
| 455 | 455 | ||
| 456 | _DoubleExceptionVector_handle_exception: | 456 | _DoubleExceptionVector_handle_exception: |
| 457 | addi a0, a0, -EXCCAUSE_UNALIGNED | ||
| 458 | beqz a0, 2f | ||
| 457 | addx4 a0, a0, a3 | 459 | addx4 a0, a0, a3 |
| 458 | l32i a0, a0, EXC_TABLE_FAST_USER | 460 | l32i a0, a0, EXC_TABLE_FAST_USER + 4 * EXCCAUSE_UNALIGNED |
| 461 | xsr a3, excsave1 | ||
| 462 | jx a0 | ||
| 463 | 2: | ||
| 464 | movi a0, user_exception | ||
| 459 | xsr a3, excsave1 | 465 | xsr a3, excsave1 |
| 460 | jx a0 | 466 | jx a0 |
| 461 | 467 | ||
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index d16db6df86f8..fc1bc2ba8d5d 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S | |||
| @@ -269,13 +269,13 @@ SECTIONS | |||
| 269 | .UserExceptionVector.literal) | 269 | .UserExceptionVector.literal) |
| 270 | SECTION_VECTOR (_DoubleExceptionVector_literal, | 270 | SECTION_VECTOR (_DoubleExceptionVector_literal, |
| 271 | .DoubleExceptionVector.literal, | 271 | .DoubleExceptionVector.literal, |
| 272 | DOUBLEEXC_VECTOR_VADDR - 40, | 272 | DOUBLEEXC_VECTOR_VADDR - 48, |
| 273 | SIZEOF(.UserExceptionVector.text), | 273 | SIZEOF(.UserExceptionVector.text), |
| 274 | .UserExceptionVector.text) | 274 | .UserExceptionVector.text) |
| 275 | SECTION_VECTOR (_DoubleExceptionVector_text, | 275 | SECTION_VECTOR (_DoubleExceptionVector_text, |
| 276 | .DoubleExceptionVector.text, | 276 | .DoubleExceptionVector.text, |
| 277 | DOUBLEEXC_VECTOR_VADDR, | 277 | DOUBLEEXC_VECTOR_VADDR, |
| 278 | 40, | 278 | 48, |
| 279 | .DoubleExceptionVector.literal) | 279 | .DoubleExceptionVector.literal) |
| 280 | 280 | ||
| 281 | . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; | 281 | . = (LOADADDR( .DoubleExceptionVector.text ) + SIZEOF( .DoubleExceptionVector.text ) + 3) & ~ 3; |
diff --git a/arch/xtensa/mm/cache.c b/arch/xtensa/mm/cache.c index 63cbb867dadd..d75aa1476da7 100644 --- a/arch/xtensa/mm/cache.c +++ b/arch/xtensa/mm/cache.c | |||
| @@ -59,9 +59,68 @@ | |||
| 59 | * | 59 | * |
| 60 | */ | 60 | */ |
| 61 | 61 | ||
| 62 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && defined(CONFIG_HIGHMEM) | 62 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) |
| 63 | #error "HIGHMEM is not supported on cores with aliasing cache." | 63 | static inline void kmap_invalidate_coherent(struct page *page, |
| 64 | #endif | 64 | unsigned long vaddr) |
| 65 | { | ||
| 66 | if (!DCACHE_ALIAS_EQ(page_to_phys(page), vaddr)) { | ||
| 67 | unsigned long kvaddr; | ||
| 68 | |||
| 69 | if (!PageHighMem(page)) { | ||
| 70 | kvaddr = (unsigned long)page_to_virt(page); | ||
| 71 | |||
| 72 | __invalidate_dcache_page(kvaddr); | ||
| 73 | } else { | ||
| 74 | kvaddr = TLBTEMP_BASE_1 + | ||
| 75 | (page_to_phys(page) & DCACHE_ALIAS_MASK); | ||
| 76 | |||
| 77 | __invalidate_dcache_page_alias(kvaddr, | ||
| 78 | page_to_phys(page)); | ||
| 79 | } | ||
| 80 | } | ||
| 81 | } | ||
| 82 | |||
| 83 | static inline void *coherent_kvaddr(struct page *page, unsigned long base, | ||
| 84 | unsigned long vaddr, unsigned long *paddr) | ||
| 85 | { | ||
| 86 | if (PageHighMem(page) || !DCACHE_ALIAS_EQ(page_to_phys(page), vaddr)) { | ||
| 87 | *paddr = page_to_phys(page); | ||
| 88 | return (void *)(base + (vaddr & DCACHE_ALIAS_MASK)); | ||
| 89 | } else { | ||
| 90 | *paddr = 0; | ||
| 91 | return page_to_virt(page); | ||
| 92 | } | ||
| 93 | } | ||
| 94 | |||
| 95 | void clear_user_highpage(struct page *page, unsigned long vaddr) | ||
| 96 | { | ||
| 97 | unsigned long paddr; | ||
| 98 | void *kvaddr = coherent_kvaddr(page, TLBTEMP_BASE_1, vaddr, &paddr); | ||
| 99 | |||
| 100 | pagefault_disable(); | ||
| 101 | kmap_invalidate_coherent(page, vaddr); | ||
| 102 | set_bit(PG_arch_1, &page->flags); | ||
| 103 | clear_page_alias(kvaddr, paddr); | ||
| 104 | pagefault_enable(); | ||
| 105 | } | ||
| 106 | |||
| 107 | void copy_user_highpage(struct page *dst, struct page *src, | ||
| 108 | unsigned long vaddr, struct vm_area_struct *vma) | ||
| 109 | { | ||
| 110 | unsigned long dst_paddr, src_paddr; | ||
| 111 | void *dst_vaddr = coherent_kvaddr(dst, TLBTEMP_BASE_1, vaddr, | ||
| 112 | &dst_paddr); | ||
| 113 | void *src_vaddr = coherent_kvaddr(src, TLBTEMP_BASE_2, vaddr, | ||
| 114 | &src_paddr); | ||
| 115 | |||
| 116 | pagefault_disable(); | ||
| 117 | kmap_invalidate_coherent(dst, vaddr); | ||
| 118 | set_bit(PG_arch_1, &dst->flags); | ||
| 119 | copy_page_alias(dst_vaddr, src_vaddr, dst_paddr, src_paddr); | ||
| 120 | pagefault_enable(); | ||
| 121 | } | ||
| 122 | |||
| 123 | #endif /* DCACHE_WAY_SIZE > PAGE_SIZE */ | ||
| 65 | 124 | ||
| 66 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | 125 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK |
| 67 | 126 | ||
| @@ -103,7 +162,8 @@ void flush_dcache_page(struct page *page) | |||
| 103 | if (!alias && !mapping) | 162 | if (!alias && !mapping) |
| 104 | return; | 163 | return; |
| 105 | 164 | ||
| 106 | __flush_invalidate_dcache_page((long)page_address(page)); | 165 | virt = TLBTEMP_BASE_1 + (phys & DCACHE_ALIAS_MASK); |
| 166 | __flush_invalidate_dcache_page_alias(virt, phys); | ||
| 107 | 167 | ||
| 108 | virt = TLBTEMP_BASE_1 + (temp & DCACHE_ALIAS_MASK); | 168 | virt = TLBTEMP_BASE_1 + (temp & DCACHE_ALIAS_MASK); |
| 109 | 169 | ||
| @@ -168,13 +228,12 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep) | |||
| 168 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | 228 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK |
| 169 | 229 | ||
| 170 | if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) { | 230 | if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) { |
| 171 | |||
| 172 | unsigned long paddr = (unsigned long) page_address(page); | ||
| 173 | unsigned long phys = page_to_phys(page); | 231 | unsigned long phys = page_to_phys(page); |
| 174 | unsigned long tmp = TLBTEMP_BASE_1 + (addr & DCACHE_ALIAS_MASK); | 232 | unsigned long tmp; |
| 175 | |||
| 176 | __flush_invalidate_dcache_page(paddr); | ||
| 177 | 233 | ||
| 234 | tmp = TLBTEMP_BASE_1 + (phys & DCACHE_ALIAS_MASK); | ||
| 235 | __flush_invalidate_dcache_page_alias(tmp, phys); | ||
| 236 | tmp = TLBTEMP_BASE_1 + (addr & DCACHE_ALIAS_MASK); | ||
| 178 | __flush_invalidate_dcache_page_alias(tmp, phys); | 237 | __flush_invalidate_dcache_page_alias(tmp, phys); |
| 179 | __invalidate_icache_page_alias(tmp, phys); | 238 | __invalidate_icache_page_alias(tmp, phys); |
| 180 | 239 | ||
diff --git a/arch/xtensa/mm/highmem.c b/arch/xtensa/mm/highmem.c index 17a8c0d6fd17..8cfb71ec0937 100644 --- a/arch/xtensa/mm/highmem.c +++ b/arch/xtensa/mm/highmem.c | |||
| @@ -14,23 +14,45 @@ | |||
| 14 | 14 | ||
| 15 | static pte_t *kmap_pte; | 15 | static pte_t *kmap_pte; |
| 16 | 16 | ||
| 17 | #if DCACHE_WAY_SIZE > PAGE_SIZE | ||
| 18 | unsigned int last_pkmap_nr_arr[DCACHE_N_COLORS]; | ||
| 19 | wait_queue_head_t pkmap_map_wait_arr[DCACHE_N_COLORS]; | ||
| 20 | |||
| 21 | static void __init kmap_waitqueues_init(void) | ||
| 22 | { | ||
| 23 | unsigned int i; | ||
| 24 | |||
| 25 | for (i = 0; i < ARRAY_SIZE(pkmap_map_wait_arr); ++i) | ||
| 26 | init_waitqueue_head(pkmap_map_wait_arr + i); | ||
| 27 | } | ||
| 28 | #else | ||
| 29 | static inline void kmap_waitqueues_init(void) | ||
| 30 | { | ||
| 31 | } | ||
| 32 | #endif | ||
| 33 | |||
| 34 | static inline enum fixed_addresses kmap_idx(int type, unsigned long color) | ||
| 35 | { | ||
| 36 | return (type + KM_TYPE_NR * smp_processor_id()) * DCACHE_N_COLORS + | ||
| 37 | color; | ||
| 38 | } | ||
| 39 | |||
| 17 | void *kmap_atomic(struct page *page) | 40 | void *kmap_atomic(struct page *page) |
| 18 | { | 41 | { |
| 19 | enum fixed_addresses idx; | 42 | enum fixed_addresses idx; |
| 20 | unsigned long vaddr; | 43 | unsigned long vaddr; |
| 21 | int type; | ||
| 22 | 44 | ||
| 23 | pagefault_disable(); | 45 | pagefault_disable(); |
| 24 | if (!PageHighMem(page)) | 46 | if (!PageHighMem(page)) |
| 25 | return page_address(page); | 47 | return page_address(page); |
| 26 | 48 | ||
| 27 | type = kmap_atomic_idx_push(); | 49 | idx = kmap_idx(kmap_atomic_idx_push(), |
| 28 | idx = type + KM_TYPE_NR * smp_processor_id(); | 50 | DCACHE_ALIAS(page_to_phys(page))); |
| 29 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 51 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |
| 30 | #ifdef CONFIG_DEBUG_HIGHMEM | 52 | #ifdef CONFIG_DEBUG_HIGHMEM |
| 31 | BUG_ON(!pte_none(*(kmap_pte - idx))); | 53 | BUG_ON(!pte_none(*(kmap_pte + idx))); |
| 32 | #endif | 54 | #endif |
| 33 | set_pte(kmap_pte - idx, mk_pte(page, PAGE_KERNEL_EXEC)); | 55 | set_pte(kmap_pte + idx, mk_pte(page, PAGE_KERNEL_EXEC)); |
| 34 | 56 | ||
| 35 | return (void *)vaddr; | 57 | return (void *)vaddr; |
| 36 | } | 58 | } |
| @@ -38,12 +60,10 @@ EXPORT_SYMBOL(kmap_atomic); | |||
| 38 | 60 | ||
| 39 | void __kunmap_atomic(void *kvaddr) | 61 | void __kunmap_atomic(void *kvaddr) |
| 40 | { | 62 | { |
| 41 | int idx, type; | ||
| 42 | |||
| 43 | if (kvaddr >= (void *)FIXADDR_START && | 63 | if (kvaddr >= (void *)FIXADDR_START && |
| 44 | kvaddr < (void *)FIXADDR_TOP) { | 64 | kvaddr < (void *)FIXADDR_TOP) { |
| 45 | type = kmap_atomic_idx(); | 65 | int idx = kmap_idx(kmap_atomic_idx(), |
| 46 | idx = type + KM_TYPE_NR * smp_processor_id(); | 66 | DCACHE_ALIAS((unsigned long)kvaddr)); |
| 47 | 67 | ||
| 48 | /* | 68 | /* |
| 49 | * Force other mappings to Oops if they'll try to access this | 69 | * Force other mappings to Oops if they'll try to access this |
| @@ -51,7 +71,7 @@ void __kunmap_atomic(void *kvaddr) | |||
| 51 | * is a bad idea also, in case the page changes cacheability | 71 | * is a bad idea also, in case the page changes cacheability |
| 52 | * attributes or becomes a protected page in a hypervisor. | 72 | * attributes or becomes a protected page in a hypervisor. |
| 53 | */ | 73 | */ |
| 54 | pte_clear(&init_mm, kvaddr, kmap_pte - idx); | 74 | pte_clear(&init_mm, kvaddr, kmap_pte + idx); |
| 55 | local_flush_tlb_kernel_range((unsigned long)kvaddr, | 75 | local_flush_tlb_kernel_range((unsigned long)kvaddr, |
| 56 | (unsigned long)kvaddr + PAGE_SIZE); | 76 | (unsigned long)kvaddr + PAGE_SIZE); |
| 57 | 77 | ||
| @@ -69,4 +89,5 @@ void __init kmap_init(void) | |||
| 69 | /* cache the first kmap pte */ | 89 | /* cache the first kmap pte */ |
| 70 | kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN); | 90 | kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN); |
| 71 | kmap_pte = kmap_get_fixmap_pte(kmap_vstart); | 91 | kmap_pte = kmap_get_fixmap_pte(kmap_vstart); |
| 92 | kmap_waitqueues_init(); | ||
| 72 | } | 93 | } |
diff --git a/arch/xtensa/mm/misc.S b/arch/xtensa/mm/misc.S index 1f68558dbcc2..11a01c3e9cea 100644 --- a/arch/xtensa/mm/misc.S +++ b/arch/xtensa/mm/misc.S | |||
| @@ -110,41 +110,24 @@ ENTRY(__tlbtemp_mapping_start) | |||
| 110 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) | 110 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) |
| 111 | 111 | ||
| 112 | /* | 112 | /* |
| 113 | * clear_user_page (void *addr, unsigned long vaddr, struct page *page) | 113 | * clear_page_alias(void *addr, unsigned long paddr) |
| 114 | * a2 a3 a4 | 114 | * a2 a3 |
| 115 | */ | 115 | */ |
| 116 | 116 | ||
| 117 | ENTRY(clear_user_page) | 117 | ENTRY(clear_page_alias) |
| 118 | 118 | ||
| 119 | entry a1, 32 | 119 | entry a1, 32 |
| 120 | 120 | ||
| 121 | /* Mark page dirty and determine alias. */ | 121 | /* Skip setting up a temporary DTLB if not aliased low page. */ |
| 122 | 122 | ||
| 123 | movi a7, (1 << PG_ARCH_1) | 123 | movi a5, PAGE_OFFSET |
| 124 | l32i a5, a4, PAGE_FLAGS | 124 | movi a6, 0 |
| 125 | xor a6, a2, a3 | 125 | beqz a3, 1f |
| 126 | extui a3, a3, PAGE_SHIFT, DCACHE_ALIAS_ORDER | ||
| 127 | extui a6, a6, PAGE_SHIFT, DCACHE_ALIAS_ORDER | ||
| 128 | or a5, a5, a7 | ||
| 129 | slli a3, a3, PAGE_SHIFT | ||
| 130 | s32i a5, a4, PAGE_FLAGS | ||
| 131 | 126 | ||
| 132 | /* Skip setting up a temporary DTLB if not aliased. */ | 127 | /* Setup a temporary DTLB for the addr. */ |
| 133 | |||
| 134 | beqz a6, 1f | ||
| 135 | |||
| 136 | /* Invalidate kernel page. */ | ||
| 137 | |||
| 138 | mov a10, a2 | ||
| 139 | call8 __invalidate_dcache_page | ||
| 140 | |||
| 141 | /* Setup a temporary DTLB with the color of the VPN */ | ||
| 142 | |||
| 143 | movi a4, ((PAGE_KERNEL | _PAGE_HW_WRITE) - PAGE_OFFSET) & 0xffffffff | ||
| 144 | movi a5, TLBTEMP_BASE_1 # virt | ||
| 145 | add a6, a2, a4 # ppn | ||
| 146 | add a2, a5, a3 # add 'color' | ||
| 147 | 128 | ||
| 129 | addi a6, a3, (PAGE_KERNEL | _PAGE_HW_WRITE) | ||
| 130 | mov a4, a2 | ||
| 148 | wdtlb a6, a2 | 131 | wdtlb a6, a2 |
| 149 | dsync | 132 | dsync |
| 150 | 133 | ||
| @@ -165,62 +148,43 @@ ENTRY(clear_user_page) | |||
| 165 | 148 | ||
| 166 | /* We need to invalidate the temporary idtlb entry, if any. */ | 149 | /* We need to invalidate the temporary idtlb entry, if any. */ |
| 167 | 150 | ||
| 168 | 1: addi a2, a2, -PAGE_SIZE | 151 | 1: idtlb a4 |
| 169 | idtlb a2 | ||
| 170 | dsync | 152 | dsync |
| 171 | 153 | ||
| 172 | retw | 154 | retw |
| 173 | 155 | ||
| 174 | ENDPROC(clear_user_page) | 156 | ENDPROC(clear_page_alias) |
| 175 | 157 | ||
| 176 | /* | 158 | /* |
| 177 | * copy_page_user (void *to, void *from, unsigned long vaddr, struct page *page) | 159 | * copy_page_alias(void *to, void *from, |
| 178 | * a2 a3 a4 a5 | 160 | * a2 a3 |
| 161 | * unsigned long to_paddr, unsigned long from_paddr) | ||
| 162 | * a4 a5 | ||
| 179 | */ | 163 | */ |
| 180 | 164 | ||
| 181 | ENTRY(copy_user_page) | 165 | ENTRY(copy_page_alias) |
| 182 | 166 | ||
| 183 | entry a1, 32 | 167 | entry a1, 32 |
| 184 | 168 | ||
| 185 | /* Mark page dirty and determine alias for destination. */ | 169 | /* Skip setting up a temporary DTLB for destination if not aliased. */ |
| 186 | |||
| 187 | movi a8, (1 << PG_ARCH_1) | ||
| 188 | l32i a9, a5, PAGE_FLAGS | ||
| 189 | xor a6, a2, a4 | ||
| 190 | xor a7, a3, a4 | ||
| 191 | extui a4, a4, PAGE_SHIFT, DCACHE_ALIAS_ORDER | ||
| 192 | extui a6, a6, PAGE_SHIFT, DCACHE_ALIAS_ORDER | ||
| 193 | extui a7, a7, PAGE_SHIFT, DCACHE_ALIAS_ORDER | ||
| 194 | or a9, a9, a8 | ||
| 195 | slli a4, a4, PAGE_SHIFT | ||
| 196 | s32i a9, a5, PAGE_FLAGS | ||
| 197 | movi a5, ((PAGE_KERNEL | _PAGE_HW_WRITE) - PAGE_OFFSET) & 0xffffffff | ||
| 198 | |||
| 199 | beqz a6, 1f | ||
| 200 | |||
| 201 | /* Invalidate dcache */ | ||
| 202 | |||
| 203 | mov a10, a2 | ||
| 204 | call8 __invalidate_dcache_page | ||
| 205 | 170 | ||
| 206 | /* Setup a temporary DTLB with a matching color. */ | 171 | movi a6, 0 |
| 172 | movi a7, 0 | ||
| 173 | beqz a4, 1f | ||
| 207 | 174 | ||
| 208 | movi a8, TLBTEMP_BASE_1 # base | 175 | /* Setup a temporary DTLB for destination. */ |
| 209 | add a6, a2, a5 # ppn | ||
| 210 | add a2, a8, a4 # add 'color' | ||
| 211 | 176 | ||
| 177 | addi a6, a4, (PAGE_KERNEL | _PAGE_HW_WRITE) | ||
| 212 | wdtlb a6, a2 | 178 | wdtlb a6, a2 |
| 213 | dsync | 179 | dsync |
| 214 | 180 | ||
| 215 | /* Skip setting up a temporary DTLB for destination if not aliased. */ | 181 | /* Skip setting up a temporary DTLB for source if not aliased. */ |
| 216 | 182 | ||
| 217 | 1: beqz a7, 1f | 183 | 1: beqz a5, 1f |
| 218 | 184 | ||
| 219 | /* Setup a temporary DTLB with a matching color. */ | 185 | /* Setup a temporary DTLB for source. */ |
| 220 | 186 | ||
| 221 | movi a8, TLBTEMP_BASE_2 # base | 187 | addi a7, a5, PAGE_KERNEL |
| 222 | add a7, a3, a5 # ppn | ||
| 223 | add a3, a8, a4 | ||
| 224 | addi a8, a3, 1 # way1 | 188 | addi a8, a3, 1 # way1 |
| 225 | 189 | ||
| 226 | wdtlb a7, a8 | 190 | wdtlb a7, a8 |
| @@ -271,7 +235,7 @@ ENTRY(copy_user_page) | |||
| 271 | 235 | ||
| 272 | retw | 236 | retw |
| 273 | 237 | ||
| 274 | ENDPROC(copy_user_page) | 238 | ENDPROC(copy_page_alias) |
| 275 | 239 | ||
| 276 | #endif | 240 | #endif |
| 277 | 241 | ||
| @@ -300,6 +264,30 @@ ENTRY(__flush_invalidate_dcache_page_alias) | |||
| 300 | retw | 264 | retw |
| 301 | 265 | ||
| 302 | ENDPROC(__flush_invalidate_dcache_page_alias) | 266 | ENDPROC(__flush_invalidate_dcache_page_alias) |
| 267 | |||
| 268 | /* | ||
| 269 | * void __invalidate_dcache_page_alias (addr, phys) | ||
| 270 | * a2 a3 | ||
| 271 | */ | ||
| 272 | |||
| 273 | ENTRY(__invalidate_dcache_page_alias) | ||
| 274 | |||
| 275 | entry sp, 16 | ||
| 276 | |||
| 277 | movi a7, 0 # required for exception handler | ||
| 278 | addi a6, a3, (PAGE_KERNEL | _PAGE_HW_WRITE) | ||
| 279 | mov a4, a2 | ||
| 280 | wdtlb a6, a2 | ||
| 281 | dsync | ||
| 282 | |||
| 283 | ___invalidate_dcache_page a2 a3 | ||
| 284 | |||
| 285 | idtlb a4 | ||
| 286 | dsync | ||
| 287 | |||
| 288 | retw | ||
| 289 | |||
| 290 | ENDPROC(__invalidate_dcache_page_alias) | ||
| 303 | #endif | 291 | #endif |
| 304 | 292 | ||
| 305 | ENTRY(__tlbtemp_mapping_itlb) | 293 | ENTRY(__tlbtemp_mapping_itlb) |
diff --git a/arch/xtensa/mm/mmu.c b/arch/xtensa/mm/mmu.c index 3429b483d9f8..abe4513eb0dd 100644 --- a/arch/xtensa/mm/mmu.c +++ b/arch/xtensa/mm/mmu.c | |||
| @@ -18,32 +18,38 @@ | |||
| 18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
| 19 | 19 | ||
| 20 | #if defined(CONFIG_HIGHMEM) | 20 | #if defined(CONFIG_HIGHMEM) |
| 21 | static void * __init init_pmd(unsigned long vaddr) | 21 | static void * __init init_pmd(unsigned long vaddr, unsigned long n_pages) |
| 22 | { | 22 | { |
| 23 | pgd_t *pgd = pgd_offset_k(vaddr); | 23 | pgd_t *pgd = pgd_offset_k(vaddr); |
| 24 | pmd_t *pmd = pmd_offset(pgd, vaddr); | 24 | pmd_t *pmd = pmd_offset(pgd, vaddr); |
| 25 | pte_t *pte; | ||
| 26 | unsigned long i; | ||
| 25 | 27 | ||
| 26 | if (pmd_none(*pmd)) { | 28 | n_pages = ALIGN(n_pages, PTRS_PER_PTE); |
| 27 | unsigned i; | ||
| 28 | pte_t *pte = alloc_bootmem_low_pages(PAGE_SIZE); | ||
| 29 | 29 | ||
| 30 | for (i = 0; i < 1024; i++) | 30 | pr_debug("%s: vaddr: 0x%08lx, n_pages: %ld\n", |
| 31 | pte_clear(NULL, 0, pte + i); | 31 | __func__, vaddr, n_pages); |
| 32 | 32 | ||
| 33 | set_pmd(pmd, __pmd(((unsigned long)pte) & PAGE_MASK)); | 33 | pte = alloc_bootmem_low_pages(n_pages * sizeof(pte_t)); |
| 34 | BUG_ON(pte != pte_offset_kernel(pmd, 0)); | 34 | |
| 35 | pr_debug("%s: vaddr: 0x%08lx, pmd: 0x%p, pte: 0x%p\n", | 35 | for (i = 0; i < n_pages; ++i) |
| 36 | __func__, vaddr, pmd, pte); | 36 | pte_clear(NULL, 0, pte + i); |
| 37 | return pte; | 37 | |
| 38 | } else { | 38 | for (i = 0; i < n_pages; i += PTRS_PER_PTE, ++pmd) { |
| 39 | return pte_offset_kernel(pmd, 0); | 39 | pte_t *cur_pte = pte + i; |
| 40 | |||
| 41 | BUG_ON(!pmd_none(*pmd)); | ||
| 42 | set_pmd(pmd, __pmd(((unsigned long)cur_pte) & PAGE_MASK)); | ||
| 43 | BUG_ON(cur_pte != pte_offset_kernel(pmd, 0)); | ||
| 44 | pr_debug("%s: pmd: 0x%p, pte: 0x%p\n", | ||
| 45 | __func__, pmd, cur_pte); | ||
| 40 | } | 46 | } |
| 47 | return pte; | ||
| 41 | } | 48 | } |
| 42 | 49 | ||
| 43 | static void __init fixedrange_init(void) | 50 | static void __init fixedrange_init(void) |
| 44 | { | 51 | { |
| 45 | BUILD_BUG_ON(FIXADDR_SIZE > PMD_SIZE); | 52 | init_pmd(__fix_to_virt(0), __end_of_fixed_addresses); |
| 46 | init_pmd(__fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK); | ||
| 47 | } | 53 | } |
| 48 | #endif | 54 | #endif |
| 49 | 55 | ||
| @@ -52,7 +58,7 @@ void __init paging_init(void) | |||
| 52 | memset(swapper_pg_dir, 0, PAGE_SIZE); | 58 | memset(swapper_pg_dir, 0, PAGE_SIZE); |
| 53 | #ifdef CONFIG_HIGHMEM | 59 | #ifdef CONFIG_HIGHMEM |
| 54 | fixedrange_init(); | 60 | fixedrange_init(); |
| 55 | pkmap_page_table = init_pmd(PKMAP_BASE); | 61 | pkmap_page_table = init_pmd(PKMAP_BASE, LAST_PKMAP); |
| 56 | kmap_init(); | 62 | kmap_init(); |
| 57 | #endif | 63 | #endif |
| 58 | } | 64 | } |
