diff options
Diffstat (limited to 'arch')
411 files changed, 2280 insertions, 1578 deletions
diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h index f05bdb4b1cb9..ff4049155c84 100644 --- a/arch/alpha/include/asm/io.h +++ b/arch/alpha/include/asm/io.h | |||
| @@ -297,7 +297,9 @@ static inline void __iomem * ioremap_nocache(unsigned long offset, | |||
| 297 | unsigned long size) | 297 | unsigned long size) |
| 298 | { | 298 | { |
| 299 | return ioremap(offset, size); | 299 | return ioremap(offset, size); |
| 300 | } | 300 | } |
| 301 | |||
| 302 | #define ioremap_uc ioremap_nocache | ||
| 301 | 303 | ||
| 302 | static inline void iounmap(volatile void __iomem *addr) | 304 | static inline void iounmap(volatile void __iomem *addr) |
| 303 | { | 305 | { |
diff --git a/arch/alpha/include/asm/word-at-a-time.h b/arch/alpha/include/asm/word-at-a-time.h index 6b340d0f1521..902e6ab00a06 100644 --- a/arch/alpha/include/asm/word-at-a-time.h +++ b/arch/alpha/include/asm/word-at-a-time.h | |||
| @@ -52,4 +52,6 @@ static inline unsigned long find_zero(unsigned long bits) | |||
| 52 | #endif | 52 | #endif |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | #define zero_bytemask(mask) ((2ul << (find_zero(mask) * 8)) - 1) | ||
| 56 | |||
| 55 | #endif /* _ASM_WORD_AT_A_TIME_H */ | 57 | #endif /* _ASM_WORD_AT_A_TIME_H */ |
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index 2804648c8ff4..2d6efcff3bf3 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
| @@ -117,6 +117,6 @@ handle_irq(int irq) | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | irq_enter(); | 119 | irq_enter(); |
| 120 | generic_handle_irq_desc(irq, desc); | 120 | generic_handle_irq_desc(desc); |
| 121 | irq_exit(); | 121 | irq_exit(); |
| 122 | } | 122 | } |
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index cded02c890aa..5f387ee5b5c5 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c | |||
| @@ -242,7 +242,12 @@ pci_restore_srm_config(void) | |||
| 242 | 242 | ||
| 243 | void pcibios_fixup_bus(struct pci_bus *bus) | 243 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 244 | { | 244 | { |
| 245 | struct pci_dev *dev; | 245 | struct pci_dev *dev = bus->self; |
| 246 | |||
| 247 | if (pci_has_flag(PCI_PROBE_ONLY) && dev && | ||
| 248 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { | ||
| 249 | pci_read_bridge_bases(bus); | ||
| 250 | } | ||
| 246 | 251 | ||
| 247 | list_for_each_entry(dev, &bus->devices, bus_list) { | 252 | list_for_each_entry(dev, &bus->devices, bus_list) { |
| 248 | pdev_save_srm_config(dev); | 253 | pdev_save_srm_config(dev); |
diff --git a/arch/alpha/lib/udelay.c b/arch/alpha/lib/udelay.c index 69d52aa37bae..f2d81ff38aa6 100644 --- a/arch/alpha/lib/udelay.c +++ b/arch/alpha/lib/udelay.c | |||
| @@ -30,6 +30,7 @@ __delay(int loops) | |||
| 30 | " bgt %0,1b" | 30 | " bgt %0,1b" |
| 31 | : "=&r" (tmp), "=r" (loops) : "1"(loops)); | 31 | : "=&r" (tmp), "=r" (loops) : "1"(loops)); |
| 32 | } | 32 | } |
| 33 | EXPORT_SYMBOL(__delay); | ||
| 33 | 34 | ||
| 34 | #ifdef CONFIG_SMP | 35 | #ifdef CONFIG_SMP |
| 35 | #define LPJ cpu_data[smp_processor_id()].loops_per_jiffy | 36 | #define LPJ cpu_data[smp_processor_id()].loops_per_jiffy |
diff --git a/arch/arc/include/asm/Kbuild b/arch/arc/include/asm/Kbuild index 7611b10a2d23..0b10ef2a4372 100644 --- a/arch/arc/include/asm/Kbuild +++ b/arch/arc/include/asm/Kbuild | |||
| @@ -48,4 +48,5 @@ generic-y += types.h | |||
| 48 | generic-y += ucontext.h | 48 | generic-y += ucontext.h |
| 49 | generic-y += user.h | 49 | generic-y += user.h |
| 50 | generic-y += vga.h | 50 | generic-y += vga.h |
| 51 | generic-y += word-at-a-time.h | ||
| 51 | generic-y += xor.h | 52 | generic-y += xor.h |
diff --git a/arch/arc/kernel/mcip.c b/arch/arc/kernel/mcip.c index d9e44b62df05..4ffd1855f1bd 100644 --- a/arch/arc/kernel/mcip.c +++ b/arch/arc/kernel/mcip.c | |||
| @@ -252,7 +252,7 @@ static struct irq_chip idu_irq_chip = { | |||
| 252 | 252 | ||
| 253 | static int idu_first_irq; | 253 | static int idu_first_irq; |
| 254 | 254 | ||
| 255 | static void idu_cascade_isr(unsigned int __core_irq, struct irq_desc *desc) | 255 | static void idu_cascade_isr(struct irq_desc *desc) |
| 256 | { | 256 | { |
| 257 | struct irq_domain *domain = irq_desc_get_handler_data(desc); | 257 | struct irq_domain *domain = irq_desc_get_handler_data(desc); |
| 258 | unsigned int core_irq = irq_desc_get_irq(desc); | 258 | unsigned int core_irq = irq_desc_get_irq(desc); |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 72ad724c67ae..639411f73ca9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -645,6 +645,7 @@ config ARCH_SHMOBILE_LEGACY | |||
| 645 | 645 | ||
| 646 | config ARCH_RPC | 646 | config ARCH_RPC |
| 647 | bool "RiscPC" | 647 | bool "RiscPC" |
| 648 | depends on MMU | ||
| 648 | select ARCH_ACORN | 649 | select ARCH_ACORN |
| 649 | select ARCH_MAY_HAVE_PC_FDC | 650 | select ARCH_MAY_HAVE_PC_FDC |
| 650 | select ARCH_SPARSEMEM_ENABLE | 651 | select ARCH_SPARSEMEM_ENABLE |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 7451b447cc2d..2c2b28ee4811 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -54,6 +54,14 @@ AS += -EL | |||
| 54 | LD += -EL | 54 | LD += -EL |
| 55 | endif | 55 | endif |
| 56 | 56 | ||
| 57 | # | ||
| 58 | # The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and | ||
| 59 | # later may result in code being generated that handles signed short and signed | ||
| 60 | # char struct members incorrectly. So disable it. | ||
| 61 | # (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932) | ||
| 62 | # | ||
| 63 | KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra) | ||
| 64 | |||
| 57 | # This selects which instruction set is used. | 65 | # This selects which instruction set is used. |
| 58 | # Note that GCC does not numerically define an architecture version | 66 | # Note that GCC does not numerically define an architecture version |
| 59 | # macro, but instead defines a whole series of macros which makes | 67 | # macro, but instead defines a whole series of macros which makes |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 233159d2eaab..bb8fa023d574 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
| @@ -578,7 +578,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \ | |||
| 578 | sun4i-a10-hackberry.dtb \ | 578 | sun4i-a10-hackberry.dtb \ |
| 579 | sun4i-a10-hyundai-a7hd.dtb \ | 579 | sun4i-a10-hyundai-a7hd.dtb \ |
| 580 | sun4i-a10-inet97fv2.dtb \ | 580 | sun4i-a10-inet97fv2.dtb \ |
| 581 | sun4i-a10-itead-iteaduino-plus.dts \ | 581 | sun4i-a10-itead-iteaduino-plus.dtb \ |
| 582 | sun4i-a10-jesurun-q5.dtb \ | 582 | sun4i-a10-jesurun-q5.dtb \ |
| 583 | sun4i-a10-marsboard.dtb \ | 583 | sun4i-a10-marsboard.dtb \ |
| 584 | sun4i-a10-mini-xplus.dtb \ | 584 | sun4i-a10-mini-xplus.dtb \ |
diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi b/arch/arm/boot/dts/am335x-phycore-som.dtsi index 4d28fc3aac69..5dd084f3c81c 100644 --- a/arch/arm/boot/dts/am335x-phycore-som.dtsi +++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi | |||
| @@ -252,10 +252,10 @@ | |||
| 252 | }; | 252 | }; |
| 253 | 253 | ||
| 254 | vdd1_reg: regulator@2 { | 254 | vdd1_reg: regulator@2 { |
| 255 | /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ | 255 | /* VDD_MPU voltage limits 0.95V - 1.325V with +/-4% tolerance */ |
| 256 | regulator-name = "vdd_mpu"; | 256 | regulator-name = "vdd_mpu"; |
| 257 | regulator-min-microvolt = <912500>; | 257 | regulator-min-microvolt = <912500>; |
| 258 | regulator-max-microvolt = <1312500>; | 258 | regulator-max-microvolt = <1378000>; |
| 259 | regulator-boot-on; | 259 | regulator-boot-on; |
| 260 | regulator-always-on; | 260 | regulator-always-on; |
| 261 | }; | 261 | }; |
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts index 3a05b94f59ed..d55e3ea89fda 100644 --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts | |||
| @@ -98,13 +98,6 @@ | |||
| 98 | pinctrl-0 = <&extcon_usb1_pins>; | 98 | pinctrl-0 = <&extcon_usb1_pins>; |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | extcon_usb2: extcon_usb2 { | ||
| 102 | compatible = "linux,extcon-usb-gpio"; | ||
| 103 | id-gpio = <&gpio7 24 GPIO_ACTIVE_HIGH>; | ||
| 104 | pinctrl-names = "default"; | ||
| 105 | pinctrl-0 = <&extcon_usb2_pins>; | ||
| 106 | }; | ||
| 107 | |||
| 108 | hdmi0: connector { | 101 | hdmi0: connector { |
| 109 | compatible = "hdmi-connector"; | 102 | compatible = "hdmi-connector"; |
| 110 | label = "hdmi"; | 103 | label = "hdmi"; |
| @@ -326,12 +319,6 @@ | |||
| 326 | >; | 319 | >; |
| 327 | }; | 320 | }; |
| 328 | 321 | ||
| 329 | extcon_usb2_pins: extcon_usb2_pins { | ||
| 330 | pinctrl-single,pins = < | ||
| 331 | 0x3e8 (PIN_INPUT_PULLUP | MUX_MODE14) /* uart1_ctsn.gpio7_24 */ | ||
| 332 | >; | ||
| 333 | }; | ||
| 334 | |||
| 335 | tpd12s015_pins: pinmux_tpd12s015_pins { | 322 | tpd12s015_pins: pinmux_tpd12s015_pins { |
| 336 | pinctrl-single,pins = < | 323 | pinctrl-single,pins = < |
| 337 | 0x3b0 (PIN_OUTPUT | MUX_MODE14) /* gpio7_10 CT_CP_HPD */ | 324 | 0x3b0 (PIN_OUTPUT | MUX_MODE14) /* gpio7_10 CT_CP_HPD */ |
| @@ -415,11 +402,12 @@ | |||
| 415 | /* SMPS9 unused */ | 402 | /* SMPS9 unused */ |
| 416 | 403 | ||
| 417 | ldo1_reg: ldo1 { | 404 | ldo1_reg: ldo1 { |
| 418 | /* VDD_SD */ | 405 | /* VDD_SD / VDDSHV8 */ |
| 419 | regulator-name = "ldo1"; | 406 | regulator-name = "ldo1"; |
| 420 | regulator-min-microvolt = <1800000>; | 407 | regulator-min-microvolt = <1800000>; |
| 421 | regulator-max-microvolt = <3300000>; | 408 | regulator-max-microvolt = <3300000>; |
| 422 | regulator-boot-on; | 409 | regulator-boot-on; |
| 410 | regulator-always-on; | ||
| 423 | }; | 411 | }; |
| 424 | 412 | ||
| 425 | ldo2_reg: ldo2 { | 413 | ldo2_reg: ldo2 { |
| @@ -432,7 +420,7 @@ | |||
| 432 | }; | 420 | }; |
| 433 | 421 | ||
| 434 | ldo3_reg: ldo3 { | 422 | ldo3_reg: ldo3 { |
| 435 | /* VDDA_1V8_PHY */ | 423 | /* VDDA_1V8_PHYA */ |
| 436 | regulator-name = "ldo3"; | 424 | regulator-name = "ldo3"; |
| 437 | regulator-min-microvolt = <1800000>; | 425 | regulator-min-microvolt = <1800000>; |
| 438 | regulator-max-microvolt = <1800000>; | 426 | regulator-max-microvolt = <1800000>; |
| @@ -440,6 +428,15 @@ | |||
| 440 | regulator-boot-on; | 428 | regulator-boot-on; |
| 441 | }; | 429 | }; |
| 442 | 430 | ||
| 431 | ldo4_reg: ldo4 { | ||
| 432 | /* VDDA_1V8_PHYB */ | ||
| 433 | regulator-name = "ldo4"; | ||
| 434 | regulator-min-microvolt = <1800000>; | ||
| 435 | regulator-max-microvolt = <1800000>; | ||
| 436 | regulator-always-on; | ||
| 437 | regulator-boot-on; | ||
| 438 | }; | ||
| 439 | |||
| 443 | ldo9_reg: ldo9 { | 440 | ldo9_reg: ldo9 { |
| 444 | /* VDD_RTC */ | 441 | /* VDD_RTC */ |
| 445 | regulator-name = "ldo9"; | 442 | regulator-name = "ldo9"; |
| @@ -495,6 +492,14 @@ | |||
| 495 | gpio-controller; | 492 | gpio-controller; |
| 496 | #gpio-cells = <2>; | 493 | #gpio-cells = <2>; |
| 497 | }; | 494 | }; |
| 495 | |||
| 496 | extcon_usb2: tps659038_usb { | ||
| 497 | compatible = "ti,palmas-usb-vid"; | ||
| 498 | ti,enable-vbus-detection; | ||
| 499 | ti,enable-id-detection; | ||
| 500 | id-gpios = <&gpio7 24 GPIO_ACTIVE_HIGH>; | ||
| 501 | }; | ||
| 502 | |||
| 498 | }; | 503 | }; |
| 499 | 504 | ||
| 500 | tmp102: tmp102@48 { | 505 | tmp102: tmp102@48 { |
| @@ -517,7 +522,8 @@ | |||
| 517 | mcp_rtc: rtc@6f { | 522 | mcp_rtc: rtc@6f { |
| 518 | compatible = "microchip,mcp7941x"; | 523 | compatible = "microchip,mcp7941x"; |
| 519 | reg = <0x6f>; | 524 | reg = <0x6f>; |
| 520 | interrupts = <GIC_SPI 2 IRQ_TYPE_EDGE_RISING>; /* IRQ_SYS_1N */ | 525 | interrupts-extended = <&crossbar_mpu GIC_SPI 2 IRQ_TYPE_EDGE_RISING>, |
| 526 | <&dra7_pmx_core 0x424>; | ||
| 521 | 527 | ||
| 522 | pinctrl-names = "default"; | 528 | pinctrl-names = "default"; |
| 523 | pinctrl-0 = <&mcp79410_pins_default>; | 529 | pinctrl-0 = <&mcp79410_pins_default>; |
| @@ -579,7 +585,6 @@ | |||
| 579 | pinctrl-0 = <&mmc1_pins_default>; | 585 | pinctrl-0 = <&mmc1_pins_default>; |
| 580 | 586 | ||
| 581 | vmmc-supply = <&ldo1_reg>; | 587 | vmmc-supply = <&ldo1_reg>; |
| 582 | vmmc_aux-supply = <&vdd_3v3>; | ||
| 583 | bus-width = <4>; | 588 | bus-width = <4>; |
| 584 | cd-gpios = <&gpio6 27 0>; /* gpio 219 */ | 589 | cd-gpios = <&gpio6 27 0>; /* gpio 219 */ |
| 585 | }; | 590 | }; |
| @@ -623,6 +628,14 @@ | |||
| 623 | }; | 628 | }; |
| 624 | 629 | ||
| 625 | &usb2 { | 630 | &usb2 { |
| 631 | /* | ||
| 632 | * Stand alone usage is peripheral only. | ||
| 633 | * However, with some resistor modifications | ||
| 634 | * this port can be used via expansion connectors | ||
| 635 | * as "host" or "dual-role". If so, provide | ||
| 636 | * the necessary dr_mode override in the expansion | ||
| 637 | * board's DT. | ||
| 638 | */ | ||
| 626 | dr_mode = "peripheral"; | 639 | dr_mode = "peripheral"; |
| 627 | }; | 640 | }; |
| 628 | 641 | ||
| @@ -681,7 +694,7 @@ | |||
| 681 | 694 | ||
| 682 | &hdmi { | 695 | &hdmi { |
| 683 | status = "ok"; | 696 | status = "ok"; |
| 684 | vdda-supply = <&ldo3_reg>; | 697 | vdda-supply = <&ldo4_reg>; |
| 685 | 698 | ||
| 686 | pinctrl-names = "default"; | 699 | pinctrl-names = "default"; |
| 687 | pinctrl-0 = <&hdmi_pins>; | 700 | pinctrl-0 = <&hdmi_pins>; |
diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts index 89f5a95954ed..4047621b137e 100644 --- a/arch/arm/boot/dts/armada-385-db-ap.dts +++ b/arch/arm/boot/dts/armada-385-db-ap.dts | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | / { | 47 | / { |
| 48 | model = "Marvell Armada 385 Access Point Development Board"; | 48 | model = "Marvell Armada 385 Access Point Development Board"; |
| 49 | compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada38x"; | 49 | compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada380"; |
| 50 | 50 | ||
| 51 | chosen { | 51 | chosen { |
| 52 | stdout-path = "serial1:115200n8"; | 52 | stdout-path = "serial1:115200n8"; |
diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi index 63a48490e2f9..d4dbd28d348c 100644 --- a/arch/arm/boot/dts/berlin2q.dtsi +++ b/arch/arm/boot/dts/berlin2q.dtsi | |||
| @@ -152,7 +152,7 @@ | |||
| 152 | }; | 152 | }; |
| 153 | 153 | ||
| 154 | usb_phy2: phy@a2f400 { | 154 | usb_phy2: phy@a2f400 { |
| 155 | compatible = "marvell,berlin2-usb-phy"; | 155 | compatible = "marvell,berlin2cd-usb-phy"; |
| 156 | reg = <0xa2f400 0x128>; | 156 | reg = <0xa2f400 0x128>; |
| 157 | #phy-cells = <0>; | 157 | #phy-cells = <0>; |
| 158 | resets = <&chip_rst 0x104 14>; | 158 | resets = <&chip_rst 0x104 14>; |
| @@ -170,7 +170,7 @@ | |||
| 170 | }; | 170 | }; |
| 171 | 171 | ||
| 172 | usb_phy0: phy@b74000 { | 172 | usb_phy0: phy@b74000 { |
| 173 | compatible = "marvell,berlin2-usb-phy"; | 173 | compatible = "marvell,berlin2cd-usb-phy"; |
| 174 | reg = <0xb74000 0x128>; | 174 | reg = <0xb74000 0x128>; |
| 175 | #phy-cells = <0>; | 175 | #phy-cells = <0>; |
| 176 | resets = <&chip_rst 0x104 12>; | 176 | resets = <&chip_rst 0x104 12>; |
| @@ -178,7 +178,7 @@ | |||
| 178 | }; | 178 | }; |
| 179 | 179 | ||
| 180 | usb_phy1: phy@b78000 { | 180 | usb_phy1: phy@b78000 { |
| 181 | compatible = "marvell,berlin2-usb-phy"; | 181 | compatible = "marvell,berlin2cd-usb-phy"; |
| 182 | reg = <0xb78000 0x128>; | 182 | reg = <0xb78000 0x128>; |
| 183 | #phy-cells = <0>; | 183 | #phy-cells = <0>; |
| 184 | resets = <&chip_rst 0x104 13>; | 184 | resets = <&chip_rst 0x104 13>; |
diff --git a/arch/arm/boot/dts/dm8148-evm.dts b/arch/arm/boot/dts/dm8148-evm.dts index 92bacd3c8fab..109fd4711647 100644 --- a/arch/arm/boot/dts/dm8148-evm.dts +++ b/arch/arm/boot/dts/dm8148-evm.dts | |||
| @@ -19,10 +19,10 @@ | |||
| 19 | 19 | ||
| 20 | &cpsw_emac0 { | 20 | &cpsw_emac0 { |
| 21 | phy_id = <&davinci_mdio>, <0>; | 21 | phy_id = <&davinci_mdio>, <0>; |
| 22 | phy-mode = "mii"; | 22 | phy-mode = "rgmii"; |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | &cpsw_emac1 { | 25 | &cpsw_emac1 { |
| 26 | phy_id = <&davinci_mdio>, <1>; | 26 | phy_id = <&davinci_mdio>, <1>; |
| 27 | phy-mode = "mii"; | 27 | phy-mode = "rgmii"; |
| 28 | }; | 28 | }; |
diff --git a/arch/arm/boot/dts/dm8148-t410.dts b/arch/arm/boot/dts/dm8148-t410.dts index 8c4bbc7573df..79838dd8dee7 100644 --- a/arch/arm/boot/dts/dm8148-t410.dts +++ b/arch/arm/boot/dts/dm8148-t410.dts | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include "dm814x.dtsi" | 8 | #include "dm814x.dtsi" |
| 9 | 9 | ||
| 10 | / { | 10 | / { |
| 11 | model = "DM8148 EVM"; | 11 | model = "HP t410 Smart Zero Client"; |
| 12 | compatible = "hp,t410", "ti,dm8148"; | 12 | compatible = "hp,t410", "ti,dm8148"; |
| 13 | 13 | ||
| 14 | memory { | 14 | memory { |
| @@ -19,10 +19,10 @@ | |||
| 19 | 19 | ||
| 20 | &cpsw_emac0 { | 20 | &cpsw_emac0 { |
| 21 | phy_id = <&davinci_mdio>, <0>; | 21 | phy_id = <&davinci_mdio>, <0>; |
| 22 | phy-mode = "mii"; | 22 | phy-mode = "rgmii"; |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | &cpsw_emac1 { | 25 | &cpsw_emac1 { |
| 26 | phy_id = <&davinci_mdio>, <1>; | 26 | phy_id = <&davinci_mdio>, <1>; |
| 27 | phy-mode = "mii"; | 27 | phy-mode = "rgmii"; |
| 28 | }; | 28 | }; |
diff --git a/arch/arm/boot/dts/dm814x.dtsi b/arch/arm/boot/dts/dm814x.dtsi index 972c9c9e885b..7988b42e5764 100644 --- a/arch/arm/boot/dts/dm814x.dtsi +++ b/arch/arm/boot/dts/dm814x.dtsi | |||
| @@ -181,9 +181,9 @@ | |||
| 181 | ti,hwmods = "timer3"; | 181 | ti,hwmods = "timer3"; |
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | control: control@160000 { | 184 | control: control@140000 { |
| 185 | compatible = "ti,dm814-scm", "simple-bus"; | 185 | compatible = "ti,dm814-scm", "simple-bus"; |
| 186 | reg = <0x160000 0x16d000>; | 186 | reg = <0x140000 0x16d000>; |
| 187 | #address-cells = <1>; | 187 | #address-cells = <1>; |
| 188 | #size-cells = <1>; | 188 | #size-cells = <1>; |
| 189 | ranges = <0 0x160000 0x16d000>; | 189 | ranges = <0 0x160000 0x16d000>; |
| @@ -321,9 +321,9 @@ | |||
| 321 | mac-address = [ 00 00 00 00 00 00 ]; | 321 | mac-address = [ 00 00 00 00 00 00 ]; |
| 322 | }; | 322 | }; |
| 323 | 323 | ||
| 324 | phy_sel: cpsw-phy-sel@0x48160650 { | 324 | phy_sel: cpsw-phy-sel@48140650 { |
| 325 | compatible = "ti,am3352-cpsw-phy-sel"; | 325 | compatible = "ti,am3352-cpsw-phy-sel"; |
| 326 | reg= <0x48160650 0x4>; | 326 | reg= <0x48140650 0x4>; |
| 327 | reg-names = "gmii-sel"; | 327 | reg-names = "gmii-sel"; |
| 328 | }; | 328 | }; |
| 329 | }; | 329 | }; |
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 5d65db9ebc2b..e289c706d27d 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi | |||
| @@ -120,9 +120,10 @@ | |||
| 120 | reg = <0x0 0x1400>; | 120 | reg = <0x0 0x1400>; |
| 121 | #address-cells = <1>; | 121 | #address-cells = <1>; |
| 122 | #size-cells = <1>; | 122 | #size-cells = <1>; |
| 123 | ranges = <0 0x0 0x1400>; | ||
| 123 | 124 | ||
| 124 | pbias_regulator: pbias_regulator { | 125 | pbias_regulator: pbias_regulator { |
| 125 | compatible = "ti,pbias-omap"; | 126 | compatible = "ti,pbias-dra7", "ti,pbias-omap"; |
| 126 | reg = <0xe00 0x4>; | 127 | reg = <0xe00 0x4>; |
| 127 | syscon = <&scm_conf>; | 128 | syscon = <&scm_conf>; |
| 128 | pbias_mmc_reg: pbias_mmc_omap5 { | 129 | pbias_mmc_reg: pbias_mmc_omap5 { |
| @@ -1417,7 +1418,7 @@ | |||
| 1417 | ti,irqs-safe-map = <0>; | 1418 | ti,irqs-safe-map = <0>; |
| 1418 | }; | 1419 | }; |
| 1419 | 1420 | ||
| 1420 | mac: ethernet@4a100000 { | 1421 | mac: ethernet@48484000 { |
| 1421 | compatible = "ti,dra7-cpsw","ti,cpsw"; | 1422 | compatible = "ti,dra7-cpsw","ti,cpsw"; |
| 1422 | ti,hwmods = "gmac"; | 1423 | ti,hwmods = "gmac"; |
| 1423 | clocks = <&dpll_gmac_ck>, <&gmac_gmii_ref_clk_div>; | 1424 | clocks = <&dpll_gmac_ck>, <&gmac_gmii_ref_clk_div>; |
diff --git a/arch/arm/boot/dts/emev2-kzm9d.dts b/arch/arm/boot/dts/emev2-kzm9d.dts index 955c24ee4a8c..8c24975e8f9d 100644 --- a/arch/arm/boot/dts/emev2-kzm9d.dts +++ b/arch/arm/boot/dts/emev2-kzm9d.dts | |||
| @@ -35,28 +35,28 @@ | |||
| 35 | 35 | ||
| 36 | button@1 { | 36 | button@1 { |
| 37 | debounce_interval = <50>; | 37 | debounce_interval = <50>; |
| 38 | wakeup = <1>; | 38 | wakeup-source; |
| 39 | label = "DSW2-1"; | 39 | label = "DSW2-1"; |
| 40 | linux,code = <KEY_1>; | 40 | linux,code = <KEY_1>; |
| 41 | gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; | 41 | gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; |
| 42 | }; | 42 | }; |
| 43 | button@2 { | 43 | button@2 { |
| 44 | debounce_interval = <50>; | 44 | debounce_interval = <50>; |
| 45 | wakeup = <1>; | 45 | wakeup-source; |
| 46 | label = "DSW2-2"; | 46 | label = "DSW2-2"; |
| 47 | linux,code = <KEY_2>; | 47 | linux,code = <KEY_2>; |
| 48 | gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; | 48 | gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; |
| 49 | }; | 49 | }; |
| 50 | button@3 { | 50 | button@3 { |
| 51 | debounce_interval = <50>; | 51 | debounce_interval = <50>; |
| 52 | wakeup = <1>; | 52 | wakeup-source; |
| 53 | label = "DSW2-3"; | 53 | label = "DSW2-3"; |
| 54 | linux,code = <KEY_3>; | 54 | linux,code = <KEY_3>; |
| 55 | gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; | 55 | gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; |
| 56 | }; | 56 | }; |
| 57 | button@4 { | 57 | button@4 { |
| 58 | debounce_interval = <50>; | 58 | debounce_interval = <50>; |
| 59 | wakeup = <1>; | 59 | wakeup-source; |
| 60 | label = "DSW2-4"; | 60 | label = "DSW2-4"; |
| 61 | linux,code = <KEY_4>; | 61 | linux,code = <KEY_4>; |
| 62 | gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; | 62 | gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; |
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi index ca0e3c15977f..294cfe40388d 100644 --- a/arch/arm/boot/dts/exynos4412.dtsi +++ b/arch/arm/boot/dts/exynos4412.dtsi | |||
| @@ -98,6 +98,7 @@ | |||
| 98 | opp-hz = /bits/ 64 <800000000>; | 98 | opp-hz = /bits/ 64 <800000000>; |
| 99 | opp-microvolt = <1000000>; | 99 | opp-microvolt = <1000000>; |
| 100 | clock-latency-ns = <200000>; | 100 | clock-latency-ns = <200000>; |
| 101 | opp-suspend; | ||
| 101 | }; | 102 | }; |
| 102 | opp07 { | 103 | opp07 { |
| 103 | opp-hz = /bits/ 64 <900000000>; | 104 | opp-hz = /bits/ 64 <900000000>; |
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 15aea760c1da..c625e71217aa 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts | |||
| @@ -197,6 +197,7 @@ | |||
| 197 | regulator-name = "P1.8V_LDO_OUT10"; | 197 | regulator-name = "P1.8V_LDO_OUT10"; |
| 198 | regulator-min-microvolt = <1800000>; | 198 | regulator-min-microvolt = <1800000>; |
| 199 | regulator-max-microvolt = <1800000>; | 199 | regulator-max-microvolt = <1800000>; |
| 200 | regulator-always-on; | ||
| 200 | }; | 201 | }; |
| 201 | 202 | ||
| 202 | ldo11_reg: LDO11 { | 203 | ldo11_reg: LDO11 { |
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts index 8f4d76c5e11c..1b95da79293c 100644 --- a/arch/arm/boot/dts/exynos5420-peach-pit.dts +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts | |||
| @@ -915,6 +915,11 @@ | |||
| 915 | }; | 915 | }; |
| 916 | }; | 916 | }; |
| 917 | 917 | ||
| 918 | &pmu_system_controller { | ||
| 919 | assigned-clocks = <&pmu_system_controller 0>; | ||
| 920 | assigned-clock-parents = <&clock CLK_FIN_PLL>; | ||
| 921 | }; | ||
| 922 | |||
| 918 | &rtc { | 923 | &rtc { |
| 919 | status = "okay"; | 924 | status = "okay"; |
| 920 | clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>; | 925 | clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>; |
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index df9aee92ecf4..1b3d6c769a3c 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi | |||
| @@ -1117,7 +1117,7 @@ | |||
| 1117 | interrupt-parent = <&combiner>; | 1117 | interrupt-parent = <&combiner>; |
| 1118 | interrupts = <3 0>; | 1118 | interrupts = <3 0>; |
| 1119 | clock-names = "sysmmu", "master"; | 1119 | clock-names = "sysmmu", "master"; |
| 1120 | clocks = <&clock CLK_SMMU_FIMD1M0>, <&clock CLK_FIMD1>; | 1120 | clocks = <&clock CLK_SMMU_FIMD1M1>, <&clock CLK_FIMD1>; |
| 1121 | power-domains = <&disp_pd>; | 1121 | power-domains = <&disp_pd>; |
| 1122 | #iommu-cells = <0>; | 1122 | #iommu-cells = <0>; |
| 1123 | }; | 1123 | }; |
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi index 79ffdfe712aa..3b43e57845ae 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | |||
| @@ -472,7 +472,6 @@ | |||
| 472 | */ | 472 | */ |
| 473 | pinctrl-0 = <&pwm0_out &pwm1_out &pwm2_out &pwm3_out>; | 473 | pinctrl-0 = <&pwm0_out &pwm1_out &pwm2_out &pwm3_out>; |
| 474 | pinctrl-names = "default"; | 474 | pinctrl-names = "default"; |
| 475 | samsung,pwm-outputs = <0>; | ||
| 476 | status = "okay"; | 475 | status = "okay"; |
| 477 | }; | 476 | }; |
| 478 | 477 | ||
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index 7d5b386b5ae6..8f40c7e549bd 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts | |||
| @@ -878,6 +878,11 @@ | |||
| 878 | }; | 878 | }; |
| 879 | }; | 879 | }; |
| 880 | 880 | ||
| 881 | &pmu_system_controller { | ||
| 882 | assigned-clocks = <&pmu_system_controller 0>; | ||
| 883 | assigned-clock-parents = <&clock CLK_FIN_PLL>; | ||
| 884 | }; | ||
| 885 | |||
| 881 | &rtc { | 886 | &rtc { |
| 882 | status = "okay"; | 887 | status = "okay"; |
| 883 | clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>; | 888 | clocks = <&clock CLK_RTC>, <&max77802 MAX77802_CLK_32K_AP>; |
diff --git a/arch/arm/boot/dts/imx53-qsrb.dts b/arch/arm/boot/dts/imx53-qsrb.dts index 66e47de5e826..96d7eede412e 100644 --- a/arch/arm/boot/dts/imx53-qsrb.dts +++ b/arch/arm/boot/dts/imx53-qsrb.dts | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | pinctrl-0 = <&pinctrl_pmic>; | 36 | pinctrl-0 = <&pinctrl_pmic>; |
| 37 | reg = <0x08>; | 37 | reg = <0x08>; |
| 38 | interrupt-parent = <&gpio5>; | 38 | interrupt-parent = <&gpio5>; |
| 39 | interrupts = <23 0x8>; | 39 | interrupts = <23 IRQ_TYPE_LEVEL_HIGH>; |
| 40 | regulators { | 40 | regulators { |
| 41 | sw1_reg: sw1a { | 41 | sw1_reg: sw1a { |
| 42 | regulator-name = "SW1"; | 42 | regulator-name = "SW1"; |
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index c3e3ca9362fb..cd170376eaca 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <dt-bindings/clock/imx5-clock.h> | 15 | #include <dt-bindings/clock/imx5-clock.h> |
| 16 | #include <dt-bindings/gpio/gpio.h> | 16 | #include <dt-bindings/gpio/gpio.h> |
| 17 | #include <dt-bindings/input/input.h> | 17 | #include <dt-bindings/input/input.h> |
| 18 | #include <dt-bindings/interrupt-controller/irq.h> | ||
| 18 | 19 | ||
| 19 | / { | 20 | / { |
| 20 | aliases { | 21 | aliases { |
diff --git a/arch/arm/boot/dts/imx6qdl-rex.dtsi b/arch/arm/boot/dts/imx6qdl-rex.dtsi index 3373fd958e95..a50356243888 100644 --- a/arch/arm/boot/dts/imx6qdl-rex.dtsi +++ b/arch/arm/boot/dts/imx6qdl-rex.dtsi | |||
| @@ -35,7 +35,6 @@ | |||
| 35 | compatible = "regulator-fixed"; | 35 | compatible = "regulator-fixed"; |
| 36 | reg = <1>; | 36 | reg = <1>; |
| 37 | pinctrl-names = "default"; | 37 | pinctrl-names = "default"; |
| 38 | pinctrl-0 = <&pinctrl_usbh1>; | ||
| 39 | regulator-name = "usbh1_vbus"; | 38 | regulator-name = "usbh1_vbus"; |
| 40 | regulator-min-microvolt = <5000000>; | 39 | regulator-min-microvolt = <5000000>; |
| 41 | regulator-max-microvolt = <5000000>; | 40 | regulator-max-microvolt = <5000000>; |
| @@ -47,7 +46,6 @@ | |||
| 47 | compatible = "regulator-fixed"; | 46 | compatible = "regulator-fixed"; |
| 48 | reg = <2>; | 47 | reg = <2>; |
| 49 | pinctrl-names = "default"; | 48 | pinctrl-names = "default"; |
| 50 | pinctrl-0 = <&pinctrl_usbotg>; | ||
| 51 | regulator-name = "usb_otg_vbus"; | 49 | regulator-name = "usb_otg_vbus"; |
| 52 | regulator-min-microvolt = <5000000>; | 50 | regulator-min-microvolt = <5000000>; |
| 53 | regulator-max-microvolt = <5000000>; | 51 | regulator-max-microvolt = <5000000>; |
diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi index b738ce0f9d9b..6e444bb873f9 100644 --- a/arch/arm/boot/dts/imx7d.dtsi +++ b/arch/arm/boot/dts/imx7d.dtsi | |||
| @@ -588,10 +588,10 @@ | |||
| 588 | status = "disabled"; | 588 | status = "disabled"; |
| 589 | }; | 589 | }; |
| 590 | 590 | ||
| 591 | uart2: serial@30870000 { | 591 | uart2: serial@30890000 { |
| 592 | compatible = "fsl,imx7d-uart", | 592 | compatible = "fsl,imx7d-uart", |
| 593 | "fsl,imx6q-uart"; | 593 | "fsl,imx6q-uart"; |
| 594 | reg = <0x30870000 0x10000>; | 594 | reg = <0x30890000 0x10000>; |
| 595 | interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; | 595 | interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; |
| 596 | clocks = <&clks IMX7D_UART2_ROOT_CLK>, | 596 | clocks = <&clks IMX7D_UART2_ROOT_CLK>, |
| 597 | <&clks IMX7D_UART2_ROOT_CLK>; | 597 | <&clks IMX7D_UART2_ROOT_CLK>; |
diff --git a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts index 91146c318798..5b0430041ec6 100644 --- a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts +++ b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | / { | 13 | / { |
| 14 | model = "LogicPD Zoom DM3730 Torpedo Development Kit"; | 14 | model = "LogicPD Zoom DM3730 Torpedo Development Kit"; |
| 15 | compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap36xx"; | 15 | compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3"; |
| 16 | 16 | ||
| 17 | gpio_keys { | 17 | gpio_keys { |
| 18 | compatible = "gpio-keys"; | 18 | compatible = "gpio-keys"; |
diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi index 548441384d2a..8c77c87660cd 100644 --- a/arch/arm/boot/dts/meson.dtsi +++ b/arch/arm/boot/dts/meson.dtsi | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | 67 | ||
| 68 | timer@c1109940 { | 68 | timer@c1109940 { |
| 69 | compatible = "amlogic,meson6-timer"; | 69 | compatible = "amlogic,meson6-timer"; |
| 70 | reg = <0xc1109940 0x14>; | 70 | reg = <0xc1109940 0x18>; |
| 71 | interrupts = <0 10 1>; | 71 | interrupts = <0 10 1>; |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| @@ -80,36 +80,37 @@ | |||
| 80 | wdt: watchdog@c1109900 { | 80 | wdt: watchdog@c1109900 { |
| 81 | compatible = "amlogic,meson6-wdt"; | 81 | compatible = "amlogic,meson6-wdt"; |
| 82 | reg = <0xc1109900 0x8>; | 82 | reg = <0xc1109900 0x8>; |
| 83 | interrupts = <0 0 1>; | ||
| 83 | }; | 84 | }; |
| 84 | 85 | ||
| 85 | uart_AO: serial@c81004c0 { | 86 | uart_AO: serial@c81004c0 { |
| 86 | compatible = "amlogic,meson-uart"; | 87 | compatible = "amlogic,meson-uart"; |
| 87 | reg = <0xc81004c0 0x14>; | 88 | reg = <0xc81004c0 0x18>; |
| 88 | interrupts = <0 90 1>; | 89 | interrupts = <0 90 1>; |
| 89 | clocks = <&clk81>; | 90 | clocks = <&clk81>; |
| 90 | status = "disabled"; | 91 | status = "disabled"; |
| 91 | }; | 92 | }; |
| 92 | 93 | ||
| 93 | uart_A: serial@c81084c0 { | 94 | uart_A: serial@c11084c0 { |
| 94 | compatible = "amlogic,meson-uart"; | 95 | compatible = "amlogic,meson-uart"; |
| 95 | reg = <0xc81084c0 0x14>; | 96 | reg = <0xc11084c0 0x18>; |
| 96 | interrupts = <0 90 1>; | 97 | interrupts = <0 26 1>; |
| 97 | clocks = <&clk81>; | 98 | clocks = <&clk81>; |
| 98 | status = "disabled"; | 99 | status = "disabled"; |
| 99 | }; | 100 | }; |
| 100 | 101 | ||
| 101 | uart_B: serial@c81084dc { | 102 | uart_B: serial@c11084dc { |
| 102 | compatible = "amlogic,meson-uart"; | 103 | compatible = "amlogic,meson-uart"; |
| 103 | reg = <0xc81084dc 0x14>; | 104 | reg = <0xc11084dc 0x18>; |
| 104 | interrupts = <0 90 1>; | 105 | interrupts = <0 75 1>; |
| 105 | clocks = <&clk81>; | 106 | clocks = <&clk81>; |
| 106 | status = "disabled"; | 107 | status = "disabled"; |
| 107 | }; | 108 | }; |
| 108 | 109 | ||
| 109 | uart_C: serial@c8108700 { | 110 | uart_C: serial@c1108700 { |
| 110 | compatible = "amlogic,meson-uart"; | 111 | compatible = "amlogic,meson-uart"; |
| 111 | reg = <0xc8108700 0x14>; | 112 | reg = <0xc1108700 0x18>; |
| 112 | interrupts = <0 90 1>; | 113 | interrupts = <0 93 1>; |
| 113 | clocks = <&clk81>; | 114 | clocks = <&clk81>; |
| 114 | status = "disabled"; | 115 | status = "disabled"; |
| 115 | }; | 116 | }; |
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi index 2390f387c271..798dda072b2a 100644 --- a/arch/arm/boot/dts/omap2430.dtsi +++ b/arch/arm/boot/dts/omap2430.dtsi | |||
| @@ -56,6 +56,7 @@ | |||
| 56 | reg = <0x270 0x240>; | 56 | reg = <0x270 0x240>; |
| 57 | #address-cells = <1>; | 57 | #address-cells = <1>; |
| 58 | #size-cells = <1>; | 58 | #size-cells = <1>; |
| 59 | ranges = <0 0x270 0x240>; | ||
| 59 | 60 | ||
| 60 | scm_clocks: clocks { | 61 | scm_clocks: clocks { |
| 61 | #address-cells = <1>; | 62 | #address-cells = <1>; |
| @@ -63,7 +64,7 @@ | |||
| 63 | }; | 64 | }; |
| 64 | 65 | ||
| 65 | pbias_regulator: pbias_regulator { | 66 | pbias_regulator: pbias_regulator { |
| 66 | compatible = "ti,pbias-omap"; | 67 | compatible = "ti,pbias-omap2", "ti,pbias-omap"; |
| 67 | reg = <0x230 0x4>; | 68 | reg = <0x230 0x4>; |
| 68 | syscon = <&scm_conf>; | 69 | syscon = <&scm_conf>; |
| 69 | pbias_mmc_reg: pbias_mmc_omap2430 { | 70 | pbias_mmc_reg: pbias_mmc_omap2430 { |
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index a5474113cd50..67659a0ed13e 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts | |||
| @@ -202,7 +202,7 @@ | |||
| 202 | 202 | ||
| 203 | tfp410_pins: pinmux_tfp410_pins { | 203 | tfp410_pins: pinmux_tfp410_pins { |
| 204 | pinctrl-single,pins = < | 204 | pinctrl-single,pins = < |
| 205 | 0x194 (PIN_OUTPUT | MUX_MODE4) /* hdq_sio.gpio_170 */ | 205 | 0x196 (PIN_OUTPUT | MUX_MODE4) /* hdq_sio.gpio_170 */ |
| 206 | >; | 206 | >; |
| 207 | }; | 207 | }; |
| 208 | 208 | ||
diff --git a/arch/arm/boot/dts/omap3-evm-37xx.dts b/arch/arm/boot/dts/omap3-evm-37xx.dts index 16e8ce350dda..bb339d1648e0 100644 --- a/arch/arm/boot/dts/omap3-evm-37xx.dts +++ b/arch/arm/boot/dts/omap3-evm-37xx.dts | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | / { | 14 | / { |
| 15 | model = "TI OMAP37XX EVM (TMDSEVM3730)"; | 15 | model = "TI OMAP37XX EVM (TMDSEVM3730)"; |
| 16 | compatible = "ti,omap3-evm-37xx", "ti,omap36xx"; | 16 | compatible = "ti,omap3-evm-37xx", "ti,omap3630", "ti,omap3"; |
| 17 | 17 | ||
| 18 | memory { | 18 | memory { |
| 19 | device_type = "memory"; | 19 | device_type = "memory"; |
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi index d5e5cd449b16..2230e1c03320 100644 --- a/arch/arm/boot/dts/omap3-igep.dtsi +++ b/arch/arm/boot/dts/omap3-igep.dtsi | |||
| @@ -78,12 +78,6 @@ | |||
| 78 | >; | 78 | >; |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | smsc9221_pins: pinmux_smsc9221_pins { | ||
| 82 | pinctrl-single,pins = < | ||
| 83 | 0x1a2 (PIN_INPUT | MUX_MODE4) /* mcspi1_cs2.gpio_176 */ | ||
| 84 | >; | ||
| 85 | }; | ||
| 86 | |||
| 87 | i2c1_pins: pinmux_i2c1_pins { | 81 | i2c1_pins: pinmux_i2c1_pins { |
| 88 | pinctrl-single,pins = < | 82 | pinctrl-single,pins = < |
| 89 | 0x18a (PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */ | 83 | 0x18a (PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */ |
diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi b/arch/arm/boot/dts/omap3-igep0020-common.dtsi index e458c2185e3c..5ad688c57a00 100644 --- a/arch/arm/boot/dts/omap3-igep0020-common.dtsi +++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi | |||
| @@ -156,6 +156,12 @@ | |||
| 156 | OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */ | 156 | OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */ |
| 157 | >; | 157 | >; |
| 158 | }; | 158 | }; |
| 159 | |||
| 160 | smsc9221_pins: pinmux_smsc9221_pins { | ||
| 161 | pinctrl-single,pins = < | ||
| 162 | OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT | MUX_MODE4) /* mcspi1_cs2.gpio_176 */ | ||
| 163 | >; | ||
| 164 | }; | ||
| 159 | }; | 165 | }; |
| 160 | 166 | ||
| 161 | &omap3_pmx_core2 { | 167 | &omap3_pmx_core2 { |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 69a40cfc1f29..8a2b25332b8c 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
| @@ -113,10 +113,22 @@ | |||
| 113 | }; | 113 | }; |
| 114 | 114 | ||
| 115 | scm_conf: scm_conf@270 { | 115 | scm_conf: scm_conf@270 { |
| 116 | compatible = "syscon"; | 116 | compatible = "syscon", "simple-bus"; |
| 117 | reg = <0x270 0x330>; | 117 | reg = <0x270 0x330>; |
| 118 | #address-cells = <1>; | 118 | #address-cells = <1>; |
| 119 | #size-cells = <1>; | 119 | #size-cells = <1>; |
| 120 | ranges = <0 0x270 0x330>; | ||
| 121 | |||
| 122 | pbias_regulator: pbias_regulator { | ||
| 123 | compatible = "ti,pbias-omap3", "ti,pbias-omap"; | ||
| 124 | reg = <0x2b0 0x4>; | ||
| 125 | syscon = <&scm_conf>; | ||
| 126 | pbias_mmc_reg: pbias_mmc_omap2430 { | ||
| 127 | regulator-name = "pbias_mmc_omap2430"; | ||
| 128 | regulator-min-microvolt = <1800000>; | ||
| 129 | regulator-max-microvolt = <3000000>; | ||
| 130 | }; | ||
| 131 | }; | ||
| 120 | 132 | ||
| 121 | scm_clocks: clocks { | 133 | scm_clocks: clocks { |
| 122 | #address-cells = <1>; | 134 | #address-cells = <1>; |
| @@ -202,17 +214,6 @@ | |||
| 202 | dma-requests = <96>; | 214 | dma-requests = <96>; |
| 203 | }; | 215 | }; |
| 204 | 216 | ||
| 205 | pbias_regulator: pbias_regulator { | ||
| 206 | compatible = "ti,pbias-omap"; | ||
| 207 | reg = <0x2b0 0x4>; | ||
| 208 | syscon = <&scm_conf>; | ||
| 209 | pbias_mmc_reg: pbias_mmc_omap2430 { | ||
| 210 | regulator-name = "pbias_mmc_omap2430"; | ||
| 211 | regulator-min-microvolt = <1800000>; | ||
| 212 | regulator-max-microvolt = <3000000>; | ||
| 213 | }; | ||
| 214 | }; | ||
| 215 | |||
| 216 | gpio1: gpio@48310000 { | 217 | gpio1: gpio@48310000 { |
| 217 | compatible = "ti,omap3-gpio"; | 218 | compatible = "ti,omap3-gpio"; |
| 218 | reg = <0x48310000 0x200>; | 219 | reg = <0x48310000 0x200>; |
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index abc4473e6f8a..5a206c100ce2 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi | |||
| @@ -196,9 +196,10 @@ | |||
| 196 | reg = <0x5a0 0x170>; | 196 | reg = <0x5a0 0x170>; |
| 197 | #address-cells = <1>; | 197 | #address-cells = <1>; |
| 198 | #size-cells = <1>; | 198 | #size-cells = <1>; |
| 199 | ranges = <0 0x5a0 0x170>; | ||
| 199 | 200 | ||
| 200 | pbias_regulator: pbias_regulator { | 201 | pbias_regulator: pbias_regulator { |
| 201 | compatible = "ti,pbias-omap"; | 202 | compatible = "ti,pbias-omap4", "ti,pbias-omap"; |
| 202 | reg = <0x60 0x4>; | 203 | reg = <0x60 0x4>; |
| 203 | syscon = <&omap4_padconf_global>; | 204 | syscon = <&omap4_padconf_global>; |
| 204 | pbias_mmc_reg: pbias_mmc_omap4 { | 205 | pbias_mmc_reg: pbias_mmc_omap4 { |
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts index 3cc8f357d5b8..3cb030f9d2c4 100644 --- a/arch/arm/boot/dts/omap5-uevm.dts +++ b/arch/arm/boot/dts/omap5-uevm.dts | |||
| @@ -174,8 +174,8 @@ | |||
| 174 | 174 | ||
| 175 | i2c5_pins: pinmux_i2c5_pins { | 175 | i2c5_pins: pinmux_i2c5_pins { |
| 176 | pinctrl-single,pins = < | 176 | pinctrl-single,pins = < |
| 177 | 0x184 (PIN_INPUT | MUX_MODE0) /* i2c5_scl */ | 177 | 0x186 (PIN_INPUT | MUX_MODE0) /* i2c5_scl */ |
| 178 | 0x186 (PIN_INPUT | MUX_MODE0) /* i2c5_sda */ | 178 | 0x188 (PIN_INPUT | MUX_MODE0) /* i2c5_sda */ |
| 179 | >; | 179 | >; |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index 4205a8ac9ddb..4c04389dab32 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi | |||
| @@ -185,9 +185,10 @@ | |||
| 185 | reg = <0x5a0 0xec>; | 185 | reg = <0x5a0 0xec>; |
| 186 | #address-cells = <1>; | 186 | #address-cells = <1>; |
| 187 | #size-cells = <1>; | 187 | #size-cells = <1>; |
| 188 | ranges = <0 0x5a0 0xec>; | ||
| 188 | 189 | ||
| 189 | pbias_regulator: pbias_regulator { | 190 | pbias_regulator: pbias_regulator { |
| 190 | compatible = "ti,pbias-omap"; | 191 | compatible = "ti,pbias-omap5", "ti,pbias-omap"; |
| 191 | reg = <0x60 0x4>; | 192 | reg = <0x60 0x4>; |
| 192 | syscon = <&omap5_padconf_global>; | 193 | syscon = <&omap5_padconf_global>; |
| 193 | pbias_mmc_reg: pbias_mmc_omap5 { | 194 | pbias_mmc_reg: pbias_mmc_omap5 { |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index a0b2a79cbfbd..4624d0f2a754 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
| @@ -1627,6 +1627,7 @@ | |||
| 1627 | "mix.0", "mix.1", | 1627 | "mix.0", "mix.1", |
| 1628 | "dvc.0", "dvc.1", | 1628 | "dvc.0", "dvc.1", |
| 1629 | "clk_a", "clk_b", "clk_c", "clk_i"; | 1629 | "clk_a", "clk_b", "clk_c", "clk_i"; |
| 1630 | power-domains = <&cpg_clocks>; | ||
| 1630 | 1631 | ||
| 1631 | status = "disabled"; | 1632 | status = "disabled"; |
| 1632 | 1633 | ||
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 831525dd39a6..1666c8a6b143 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi | |||
| @@ -1677,6 +1677,7 @@ | |||
| 1677 | "mix.0", "mix.1", | 1677 | "mix.0", "mix.1", |
| 1678 | "dvc.0", "dvc.1", | 1678 | "dvc.0", "dvc.1", |
| 1679 | "clk_a", "clk_b", "clk_c", "clk_i"; | 1679 | "clk_a", "clk_b", "clk_c", "clk_i"; |
| 1680 | power-domains = <&cpg_clocks>; | ||
| 1680 | 1681 | ||
| 1681 | status = "disabled"; | 1682 | status = "disabled"; |
| 1682 | 1683 | ||
diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi index 2fa7a0dc83f7..275c78ccc0f3 100644 --- a/arch/arm/boot/dts/rk3288-veyron.dtsi +++ b/arch/arm/boot/dts/rk3288-veyron.dtsi | |||
| @@ -158,6 +158,7 @@ | |||
| 158 | }; | 158 | }; |
| 159 | 159 | ||
| 160 | &hdmi { | 160 | &hdmi { |
| 161 | ddc-i2c-bus = <&i2c5>; | ||
| 161 | status = "okay"; | 162 | status = "okay"; |
| 162 | }; | 163 | }; |
| 163 | 164 | ||
diff --git a/arch/arm/boot/dts/ste-hrefv60plus.dtsi b/arch/arm/boot/dts/ste-hrefv60plus.dtsi index 810cda743b6d..9c2387b34d0c 100644 --- a/arch/arm/boot/dts/ste-hrefv60plus.dtsi +++ b/arch/arm/boot/dts/ste-hrefv60plus.dtsi | |||
| @@ -56,7 +56,7 @@ | |||
| 56 | /* VMMCI level-shifter enable */ | 56 | /* VMMCI level-shifter enable */ |
| 57 | default_hrefv60_cfg2 { | 57 | default_hrefv60_cfg2 { |
| 58 | pins = "GPIO169_D22"; | 58 | pins = "GPIO169_D22"; |
| 59 | ste,config = <&gpio_out_lo>; | 59 | ste,config = <&gpio_out_hi>; |
| 60 | }; | 60 | }; |
| 61 | /* VMMCI level-shifter voltage select */ | 61 | /* VMMCI level-shifter voltage select */ |
| 62 | default_hrefv60_cfg3 { | 62 | default_hrefv60_cfg3 { |
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index 32a5ccb14e7e..e80e42163883 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts | |||
| @@ -47,35 +47,35 @@ | |||
| 47 | 47 | ||
| 48 | button@1 { | 48 | button@1 { |
| 49 | debounce_interval = <50>; | 49 | debounce_interval = <50>; |
| 50 | wakeup = <1>; | 50 | wakeup-source; |
| 51 | linux,code = <2>; | 51 | linux,code = <2>; |
| 52 | label = "userpb"; | 52 | label = "userpb"; |
| 53 | gpios = <&gpio1 0 0x4>; | 53 | gpios = <&gpio1 0 0x4>; |
| 54 | }; | 54 | }; |
| 55 | button@2 { | 55 | button@2 { |
| 56 | debounce_interval = <50>; | 56 | debounce_interval = <50>; |
| 57 | wakeup = <1>; | 57 | wakeup-source; |
| 58 | linux,code = <3>; | 58 | linux,code = <3>; |
| 59 | label = "extkb1"; | 59 | label = "extkb1"; |
| 60 | gpios = <&gpio4 23 0x4>; | 60 | gpios = <&gpio4 23 0x4>; |
| 61 | }; | 61 | }; |
| 62 | button@3 { | 62 | button@3 { |
| 63 | debounce_interval = <50>; | 63 | debounce_interval = <50>; |
| 64 | wakeup = <1>; | 64 | wakeup-source; |
| 65 | linux,code = <4>; | 65 | linux,code = <4>; |
| 66 | label = "extkb2"; | 66 | label = "extkb2"; |
| 67 | gpios = <&gpio4 24 0x4>; | 67 | gpios = <&gpio4 24 0x4>; |
| 68 | }; | 68 | }; |
| 69 | button@4 { | 69 | button@4 { |
| 70 | debounce_interval = <50>; | 70 | debounce_interval = <50>; |
| 71 | wakeup = <1>; | 71 | wakeup-source; |
| 72 | linux,code = <5>; | 72 | linux,code = <5>; |
| 73 | label = "extkb3"; | 73 | label = "extkb3"; |
| 74 | gpios = <&gpio5 1 0x4>; | 74 | gpios = <&gpio5 1 0x4>; |
| 75 | }; | 75 | }; |
| 76 | button@5 { | 76 | button@5 { |
| 77 | debounce_interval = <50>; | 77 | debounce_interval = <50>; |
| 78 | wakeup = <1>; | 78 | wakeup-source; |
| 79 | linux,code = <6>; | 79 | linux,code = <6>; |
| 80 | label = "extkb4"; | 80 | label = "extkb4"; |
| 81 | gpios = <&gpio5 2 0x4>; | 81 | gpios = <&gpio5 2 0x4>; |
diff --git a/arch/arm/boot/dts/stih407.dtsi b/arch/arm/boot/dts/stih407.dtsi index 3efa3b2ebe90..6b914e4bb099 100644 --- a/arch/arm/boot/dts/stih407.dtsi +++ b/arch/arm/boot/dts/stih407.dtsi | |||
| @@ -103,48 +103,46 @@ | |||
| 103 | <&clk_s_d0_quadfs 0>, | 103 | <&clk_s_d0_quadfs 0>, |
| 104 | <&clk_s_d2_quadfs 0>, | 104 | <&clk_s_d2_quadfs 0>, |
| 105 | <&clk_s_d2_quadfs 0>; | 105 | <&clk_s_d2_quadfs 0>; |
| 106 | ranges; | 106 | }; |
| 107 | 107 | ||
| 108 | sti-hdmi@8d04000 { | 108 | sti-hdmi@8d04000 { |
| 109 | compatible = "st,stih407-hdmi"; | 109 | compatible = "st,stih407-hdmi"; |
| 110 | reg = <0x8d04000 0x1000>; | 110 | reg = <0x8d04000 0x1000>; |
| 111 | reg-names = "hdmi-reg"; | 111 | reg-names = "hdmi-reg"; |
| 112 | interrupts = <GIC_SPI 106 IRQ_TYPE_NONE>; | 112 | interrupts = <GIC_SPI 106 IRQ_TYPE_NONE>; |
| 113 | interrupt-names = "irq"; | 113 | interrupt-names = "irq"; |
| 114 | clock-names = "pix", | 114 | clock-names = "pix", |
| 115 | "tmds", | 115 | "tmds", |
| 116 | "phy", | 116 | "phy", |
| 117 | "audio", | 117 | "audio", |
| 118 | "main_parent", | 118 | "main_parent", |
| 119 | "aux_parent"; | 119 | "aux_parent"; |
| 120 | 120 | ||
| 121 | clocks = <&clk_s_d2_flexgen CLK_PIX_HDMI>, | 121 | clocks = <&clk_s_d2_flexgen CLK_PIX_HDMI>, |
| 122 | <&clk_s_d2_flexgen CLK_TMDS_HDMI>, | 122 | <&clk_s_d2_flexgen CLK_TMDS_HDMI>, |
| 123 | <&clk_s_d2_flexgen CLK_REF_HDMIPHY>, | 123 | <&clk_s_d2_flexgen CLK_REF_HDMIPHY>, |
| 124 | <&clk_s_d0_flexgen CLK_PCM_0>, | 124 | <&clk_s_d0_flexgen CLK_PCM_0>, |
| 125 | <&clk_s_d2_quadfs 0>, | 125 | <&clk_s_d2_quadfs 0>, |
| 126 | <&clk_s_d2_quadfs 1>; | 126 | <&clk_s_d2_quadfs 1>; |
| 127 | 127 | ||
| 128 | hdmi,hpd-gpio = <&pio5 3>; | 128 | hdmi,hpd-gpio = <&pio5 3>; |
| 129 | reset-names = "hdmi"; | 129 | reset-names = "hdmi"; |
| 130 | resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; | 130 | resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; |
| 131 | ddc = <&hdmiddc>; | 131 | ddc = <&hdmiddc>; |
| 132 | 132 | }; | |
| 133 | }; | 133 | |
| 134 | 134 | sti-hda@8d02000 { | |
| 135 | sti-hda@8d02000 { | 135 | compatible = "st,stih407-hda"; |
| 136 | compatible = "st,stih407-hda"; | 136 | reg = <0x8d02000 0x400>, <0x92b0120 0x4>; |
| 137 | reg = <0x8d02000 0x400>, <0x92b0120 0x4>; | 137 | reg-names = "hda-reg", "video-dacs-ctrl"; |
| 138 | reg-names = "hda-reg", "video-dacs-ctrl"; | 138 | clock-names = "pix", |
| 139 | clock-names = "pix", | 139 | "hddac", |
| 140 | "hddac", | 140 | "main_parent", |
| 141 | "main_parent", | 141 | "aux_parent"; |
| 142 | "aux_parent"; | 142 | clocks = <&clk_s_d2_flexgen CLK_PIX_HDDAC>, |
| 143 | clocks = <&clk_s_d2_flexgen CLK_PIX_HDDAC>, | 143 | <&clk_s_d2_flexgen CLK_HDDAC>, |
| 144 | <&clk_s_d2_flexgen CLK_HDDAC>, | 144 | <&clk_s_d2_quadfs 0>, |
| 145 | <&clk_s_d2_quadfs 0>, | 145 | <&clk_s_d2_quadfs 1>; |
| 146 | <&clk_s_d2_quadfs 1>; | ||
| 147 | }; | ||
| 148 | }; | 146 | }; |
| 149 | }; | 147 | }; |
| 150 | }; | 148 | }; |
diff --git a/arch/arm/boot/dts/stih410.dtsi b/arch/arm/boot/dts/stih410.dtsi index 6f40bc99c22f..8c6e61a27234 100644 --- a/arch/arm/boot/dts/stih410.dtsi +++ b/arch/arm/boot/dts/stih410.dtsi | |||
| @@ -178,48 +178,46 @@ | |||
| 178 | <&clk_s_d0_quadfs 0>, | 178 | <&clk_s_d0_quadfs 0>, |
| 179 | <&clk_s_d2_quadfs 0>, | 179 | <&clk_s_d2_quadfs 0>, |
| 180 | <&clk_s_d2_quadfs 0>; | 180 | <&clk_s_d2_quadfs 0>; |
| 181 | ranges; | 181 | }; |
| 182 | 182 | ||
| 183 | sti-hdmi@8d04000 { | 183 | sti-hdmi@8d04000 { |
| 184 | compatible = "st,stih407-hdmi"; | 184 | compatible = "st,stih407-hdmi"; |
| 185 | reg = <0x8d04000 0x1000>; | 185 | reg = <0x8d04000 0x1000>; |
| 186 | reg-names = "hdmi-reg"; | 186 | reg-names = "hdmi-reg"; |
| 187 | interrupts = <GIC_SPI 106 IRQ_TYPE_NONE>; | 187 | interrupts = <GIC_SPI 106 IRQ_TYPE_NONE>; |
| 188 | interrupt-names = "irq"; | 188 | interrupt-names = "irq"; |
| 189 | clock-names = "pix", | 189 | clock-names = "pix", |
| 190 | "tmds", | 190 | "tmds", |
| 191 | "phy", | 191 | "phy", |
| 192 | "audio", | 192 | "audio", |
| 193 | "main_parent", | 193 | "main_parent", |
| 194 | "aux_parent"; | 194 | "aux_parent"; |
| 195 | 195 | ||
| 196 | clocks = <&clk_s_d2_flexgen CLK_PIX_HDMI>, | 196 | clocks = <&clk_s_d2_flexgen CLK_PIX_HDMI>, |
| 197 | <&clk_s_d2_flexgen CLK_TMDS_HDMI>, | 197 | <&clk_s_d2_flexgen CLK_TMDS_HDMI>, |
| 198 | <&clk_s_d2_flexgen CLK_REF_HDMIPHY>, | 198 | <&clk_s_d2_flexgen CLK_REF_HDMIPHY>, |
| 199 | <&clk_s_d0_flexgen CLK_PCM_0>, | 199 | <&clk_s_d0_flexgen CLK_PCM_0>, |
| 200 | <&clk_s_d2_quadfs 0>, | 200 | <&clk_s_d2_quadfs 0>, |
| 201 | <&clk_s_d2_quadfs 1>; | 201 | <&clk_s_d2_quadfs 1>; |
| 202 | 202 | ||
| 203 | hdmi,hpd-gpio = <&pio5 3>; | 203 | hdmi,hpd-gpio = <&pio5 3>; |
| 204 | reset-names = "hdmi"; | 204 | reset-names = "hdmi"; |
| 205 | resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; | 205 | resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; |
| 206 | ddc = <&hdmiddc>; | 206 | ddc = <&hdmiddc>; |
| 207 | 207 | }; | |
| 208 | }; | 208 | |
| 209 | 209 | sti-hda@8d02000 { | |
| 210 | sti-hda@8d02000 { | 210 | compatible = "st,stih407-hda"; |
| 211 | compatible = "st,stih407-hda"; | 211 | reg = <0x8d02000 0x400>, <0x92b0120 0x4>; |
| 212 | reg = <0x8d02000 0x400>, <0x92b0120 0x4>; | 212 | reg-names = "hda-reg", "video-dacs-ctrl"; |
| 213 | reg-names = "hda-reg", "video-dacs-ctrl"; | 213 | clock-names = "pix", |
| 214 | clock-names = "pix", | 214 | "hddac", |
| 215 | "hddac", | 215 | "main_parent", |
| 216 | "main_parent", | 216 | "aux_parent"; |
| 217 | "aux_parent"; | 217 | clocks = <&clk_s_d2_flexgen CLK_PIX_HDDAC>, |
| 218 | clocks = <&clk_s_d2_flexgen CLK_PIX_HDDAC>, | 218 | <&clk_s_d2_flexgen CLK_HDDAC>, |
| 219 | <&clk_s_d2_flexgen CLK_HDDAC>, | 219 | <&clk_s_d2_quadfs 0>, |
| 220 | <&clk_s_d2_quadfs 0>, | 220 | <&clk_s_d2_quadfs 1>; |
| 221 | <&clk_s_d2_quadfs 1>; | ||
| 222 | }; | ||
| 223 | }; | 221 | }; |
| 224 | }; | 222 | }; |
| 225 | 223 | ||
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 2bebaa286f9a..391230c3dc93 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi | |||
| @@ -107,7 +107,7 @@ | |||
| 107 | 720000 1200000 | 107 | 720000 1200000 |
| 108 | 528000 1100000 | 108 | 528000 1100000 |
| 109 | 312000 1000000 | 109 | 312000 1000000 |
| 110 | 144000 900000 | 110 | 144000 1000000 |
| 111 | >; | 111 | >; |
| 112 | #cooling-cells = <2>; | 112 | #cooling-cells = <2>; |
| 113 | cooling-min-level = <0>; | 113 | cooling-min-level = <0>; |
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi index 9d4f86e9c50a..d845bd1448b5 100644 --- a/arch/arm/boot/dts/tegra114.dtsi +++ b/arch/arm/boot/dts/tegra114.dtsi | |||
| @@ -234,7 +234,9 @@ | |||
| 234 | gpio-controller; | 234 | gpio-controller; |
| 235 | #interrupt-cells = <2>; | 235 | #interrupt-cells = <2>; |
| 236 | interrupt-controller; | 236 | interrupt-controller; |
| 237 | /* | ||
| 237 | gpio-ranges = <&pinmux 0 0 246>; | 238 | gpio-ranges = <&pinmux 0 0 246>; |
| 239 | */ | ||
| 238 | }; | 240 | }; |
| 239 | 241 | ||
| 240 | apbmisc@70000800 { | 242 | apbmisc@70000800 { |
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi index 1e204a6de12c..819e2ae2cabe 100644 --- a/arch/arm/boot/dts/tegra124.dtsi +++ b/arch/arm/boot/dts/tegra124.dtsi | |||
| @@ -258,7 +258,9 @@ | |||
| 258 | gpio-controller; | 258 | gpio-controller; |
| 259 | #interrupt-cells = <2>; | 259 | #interrupt-cells = <2>; |
| 260 | interrupt-controller; | 260 | interrupt-controller; |
| 261 | /* | ||
| 261 | gpio-ranges = <&pinmux 0 0 251>; | 262 | gpio-ranges = <&pinmux 0 0 251>; |
| 263 | */ | ||
| 262 | }; | 264 | }; |
| 263 | 265 | ||
| 264 | apbdma: dma@0,60020000 { | 266 | apbdma: dma@0,60020000 { |
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index e058709e6d98..969b828505ae 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
| @@ -244,7 +244,9 @@ | |||
| 244 | gpio-controller; | 244 | gpio-controller; |
| 245 | #interrupt-cells = <2>; | 245 | #interrupt-cells = <2>; |
| 246 | interrupt-controller; | 246 | interrupt-controller; |
| 247 | /* | ||
| 247 | gpio-ranges = <&pinmux 0 0 224>; | 248 | gpio-ranges = <&pinmux 0 0 224>; |
| 249 | */ | ||
| 248 | }; | 250 | }; |
| 249 | 251 | ||
| 250 | apbmisc@70000800 { | 252 | apbmisc@70000800 { |
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index fe04fb5e155f..c6938ad1b543 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
| @@ -349,7 +349,9 @@ | |||
| 349 | gpio-controller; | 349 | gpio-controller; |
| 350 | #interrupt-cells = <2>; | 350 | #interrupt-cells = <2>; |
| 351 | interrupt-controller; | 351 | interrupt-controller; |
| 352 | /* | ||
| 352 | gpio-ranges = <&pinmux 0 0 248>; | 353 | gpio-ranges = <&pinmux 0 0 248>; |
| 354 | */ | ||
| 353 | }; | 355 | }; |
| 354 | 356 | ||
| 355 | apbmisc@70000800 { | 357 | apbmisc@70000800 { |
diff --git a/arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts b/arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts index 33963acd7e8f..f80f772d99fb 100644 --- a/arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts +++ b/arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts | |||
| @@ -85,7 +85,7 @@ | |||
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | ðsc { | 87 | ðsc { |
| 88 | interrupts = <0 50 4>; | 88 | interrupts = <0 52 4>; |
| 89 | }; | 89 | }; |
| 90 | 90 | ||
| 91 | &serial0 { | 91 | &serial0 { |
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index 96dabcb6c621..996aed3b4eee 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
| @@ -95,7 +95,7 @@ void it8152_init_irq(void) | |||
| 95 | } | 95 | } |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | void it8152_irq_demux(unsigned int irq, struct irq_desc *desc) | 98 | void it8152_irq_demux(struct irq_desc *desc) |
| 99 | { | 99 | { |
| 100 | int bits_pd, bits_lp, bits_ld; | 100 | int bits_pd, bits_lp, bits_ld; |
| 101 | int i; | 101 | int i; |
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 304adea4bc52..0e97b4b871f9 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
| @@ -138,7 +138,7 @@ static struct locomo_dev_info locomo_devices[] = { | |||
| 138 | }, | 138 | }, |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | static void locomo_handler(unsigned int __irq, struct irq_desc *desc) | 141 | static void locomo_handler(struct irq_desc *desc) |
| 142 | { | 142 | { |
| 143 | struct locomo *lchip = irq_desc_get_chip_data(desc); | 143 | struct locomo *lchip = irq_desc_get_chip_data(desc); |
| 144 | int req, i; | 144 | int req, i; |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 4f290250fa93..3d224941b541 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
| @@ -196,10 +196,8 @@ static struct sa1111_dev_info sa1111_devices[] = { | |||
| 196 | * active IRQs causes the interrupt output to pulse, the upper levels | 196 | * active IRQs causes the interrupt output to pulse, the upper levels |
| 197 | * will call us again if there are more interrupts to process. | 197 | * will call us again if there are more interrupts to process. |
| 198 | */ | 198 | */ |
| 199 | static void | 199 | static void sa1111_irq_handler(struct irq_desc *desc) |
| 200 | sa1111_irq_handler(unsigned int __irq, struct irq_desc *desc) | ||
| 201 | { | 200 | { |
| 202 | unsigned int irq = irq_desc_get_irq(desc); | ||
| 203 | unsigned int stat0, stat1, i; | 201 | unsigned int stat0, stat1, i; |
| 204 | struct sa1111 *sachip = irq_desc_get_handler_data(desc); | 202 | struct sa1111 *sachip = irq_desc_get_handler_data(desc); |
| 205 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 203 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
| @@ -214,7 +212,7 @@ sa1111_irq_handler(unsigned int __irq, struct irq_desc *desc) | |||
| 214 | sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1); | 212 | sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1); |
| 215 | 213 | ||
| 216 | if (stat0 == 0 && stat1 == 0) { | 214 | if (stat0 == 0 && stat1 == 0) { |
| 217 | do_bad_IRQ(irq, desc); | 215 | do_bad_IRQ(desc); |
| 218 | return; | 216 | return; |
| 219 | } | 217 | } |
| 220 | 218 | ||
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index 50c84e1876fc..3f15a5cae167 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
| @@ -240,7 +240,8 @@ CONFIG_SSI_PROTOCOL=m | |||
| 240 | CONFIG_PINCTRL_SINGLE=y | 240 | CONFIG_PINCTRL_SINGLE=y |
| 241 | CONFIG_DEBUG_GPIO=y | 241 | CONFIG_DEBUG_GPIO=y |
| 242 | CONFIG_GPIO_SYSFS=y | 242 | CONFIG_GPIO_SYSFS=y |
| 243 | CONFIG_GPIO_PCF857X=m | 243 | CONFIG_GPIO_PCA953X=m |
| 244 | CONFIG_GPIO_PCF857X=y | ||
| 244 | CONFIG_GPIO_TWL4030=y | 245 | CONFIG_GPIO_TWL4030=y |
| 245 | CONFIG_GPIO_PALMAS=y | 246 | CONFIG_GPIO_PALMAS=y |
| 246 | CONFIG_W1=m | 247 | CONFIG_W1=m |
| @@ -350,6 +351,8 @@ CONFIG_USB_MUSB_HDRC=m | |||
| 350 | CONFIG_USB_MUSB_OMAP2PLUS=m | 351 | CONFIG_USB_MUSB_OMAP2PLUS=m |
| 351 | CONFIG_USB_MUSB_AM35X=m | 352 | CONFIG_USB_MUSB_AM35X=m |
| 352 | CONFIG_USB_MUSB_DSPS=m | 353 | CONFIG_USB_MUSB_DSPS=m |
| 354 | CONFIG_USB_INVENTRA_DMA=y | ||
| 355 | CONFIG_USB_TI_CPPI41_DMA=y | ||
| 353 | CONFIG_USB_DWC3=m | 356 | CONFIG_USB_DWC3=m |
| 354 | CONFIG_USB_TEST=m | 357 | CONFIG_USB_TEST=m |
| 355 | CONFIG_AM335X_PHY_USB=y | 358 | CONFIG_AM335X_PHY_USB=y |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 7bbf325a4f31..b2bc8e11471d 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
| @@ -491,11 +491,6 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) | |||
| 491 | #endif | 491 | #endif |
| 492 | .endm | 492 | .endm |
| 493 | 493 | ||
| 494 | .macro uaccess_save_and_disable, tmp | ||
| 495 | uaccess_save \tmp | ||
| 496 | uaccess_disable \tmp | ||
| 497 | .endm | ||
| 498 | |||
| 499 | .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo | 494 | .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo |
| 500 | .macro ret\c, reg | 495 | .macro ret\c, reg |
| 501 | #if __LINUX_ARM_ARCH__ < 6 | 496 | #if __LINUX_ARM_ARCH__ < 6 |
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h index b274bde24905..e7335a92144e 100644 --- a/arch/arm/include/asm/bug.h +++ b/arch/arm/include/asm/bug.h | |||
| @@ -40,6 +40,7 @@ do { \ | |||
| 40 | "2:\t.asciz " #__file "\n" \ | 40 | "2:\t.asciz " #__file "\n" \ |
| 41 | ".popsection\n" \ | 41 | ".popsection\n" \ |
| 42 | ".pushsection __bug_table,\"a\"\n" \ | 42 | ".pushsection __bug_table,\"a\"\n" \ |
| 43 | ".align 2\n" \ | ||
| 43 | "3:\t.word 1b, 2b\n" \ | 44 | "3:\t.word 1b, 2b\n" \ |
| 44 | "\t.hword " #__line ", 0\n" \ | 45 | "\t.hword " #__line ", 0\n" \ |
| 45 | ".popsection"); \ | 46 | ".popsection"); \ |
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h index e878129f2fee..fc8ba1663601 100644 --- a/arch/arm/include/asm/domain.h +++ b/arch/arm/include/asm/domain.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
| 14 | #include <asm/barrier.h> | 14 | #include <asm/barrier.h> |
| 15 | #include <asm/thread_info.h> | ||
| 15 | #endif | 16 | #endif |
| 16 | 17 | ||
| 17 | /* | 18 | /* |
| @@ -89,7 +90,8 @@ static inline unsigned int get_domain(void) | |||
| 89 | 90 | ||
| 90 | asm( | 91 | asm( |
| 91 | "mrc p15, 0, %0, c3, c0 @ get domain" | 92 | "mrc p15, 0, %0, c3, c0 @ get domain" |
| 92 | : "=r" (domain)); | 93 | : "=r" (domain) |
| 94 | : "m" (current_thread_info()->cpu_domain)); | ||
| 93 | 95 | ||
| 94 | return domain; | 96 | return domain; |
| 95 | } | 97 | } |
| @@ -98,7 +100,7 @@ static inline void set_domain(unsigned val) | |||
| 98 | { | 100 | { |
| 99 | asm volatile( | 101 | asm volatile( |
| 100 | "mcr p15, 0, %0, c3, c0 @ set domain" | 102 | "mcr p15, 0, %0, c3, c0 @ set domain" |
| 101 | : : "r" (val)); | 103 | : : "r" (val) : "memory"); |
| 102 | isb(); | 104 | isb(); |
| 103 | } | 105 | } |
| 104 | 106 | ||
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h index d36a73d7c0e8..076777ff3daa 100644 --- a/arch/arm/include/asm/hardware/it8152.h +++ b/arch/arm/include/asm/hardware/it8152.h | |||
| @@ -106,7 +106,7 @@ extern void __iomem *it8152_base_address; | |||
| 106 | struct pci_dev; | 106 | struct pci_dev; |
| 107 | struct pci_sys_data; | 107 | struct pci_sys_data; |
| 108 | 108 | ||
| 109 | extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); | 109 | extern void it8152_irq_demux(struct irq_desc *desc); |
| 110 | extern void it8152_init_irq(void); | 110 | extern void it8152_init_irq(void); |
| 111 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); | 111 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
| 112 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); | 112 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); |
diff --git a/arch/arm/include/asm/hw_irq.h b/arch/arm/include/asm/hw_irq.h index af79da40af2a..9beb92914f4d 100644 --- a/arch/arm/include/asm/hw_irq.h +++ b/arch/arm/include/asm/hw_irq.h | |||
| @@ -11,12 +11,6 @@ static inline void ack_bad_irq(int irq) | |||
| 11 | pr_crit("unexpected IRQ trap at vector %02x\n", irq); | 11 | pr_crit("unexpected IRQ trap at vector %02x\n", irq); |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | void set_irq_flags(unsigned int irq, unsigned int flags); | ||
| 15 | |||
| 16 | #define IRQF_VALID (1 << 0) | ||
| 17 | #define IRQF_PROBE (1 << 1) | ||
| 18 | #define IRQF_NOAUTOEN (1 << 2) | ||
| 19 | |||
| 20 | #define ARCH_IRQ_INIT_FLAGS (IRQ_NOREQUEST | IRQ_NOPROBE) | 14 | #define ARCH_IRQ_INIT_FLAGS (IRQ_NOREQUEST | IRQ_NOPROBE) |
| 21 | 15 | ||
| 22 | #endif | 16 | #endif |
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index dcba0fa5176e..c4072d9f32c7 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h | |||
| @@ -29,21 +29,18 @@ | |||
| 29 | 29 | ||
| 30 | #define __KVM_HAVE_ARCH_INTC_INITIALIZED | 30 | #define __KVM_HAVE_ARCH_INTC_INITIALIZED |
| 31 | 31 | ||
| 32 | #if defined(CONFIG_KVM_ARM_MAX_VCPUS) | ||
| 33 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS | ||
| 34 | #else | ||
| 35 | #define KVM_MAX_VCPUS 0 | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #define KVM_USER_MEM_SLOTS 32 | 32 | #define KVM_USER_MEM_SLOTS 32 |
| 39 | #define KVM_PRIVATE_MEM_SLOTS 4 | 33 | #define KVM_PRIVATE_MEM_SLOTS 4 |
| 40 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 34 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| 41 | #define KVM_HAVE_ONE_REG | 35 | #define KVM_HAVE_ONE_REG |
| 36 | #define KVM_HALT_POLL_NS_DEFAULT 500000 | ||
| 42 | 37 | ||
| 43 | #define KVM_VCPU_MAX_FEATURES 2 | 38 | #define KVM_VCPU_MAX_FEATURES 2 |
| 44 | 39 | ||
| 45 | #include <kvm/arm_vgic.h> | 40 | #include <kvm/arm_vgic.h> |
| 46 | 41 | ||
| 42 | #define KVM_MAX_VCPUS VGIC_V2_MAX_CPUS | ||
| 43 | |||
| 47 | u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); | 44 | u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); |
| 48 | int __attribute_const__ kvm_target_cpu(void); | 45 | int __attribute_const__ kvm_target_cpu(void); |
| 49 | int kvm_reset_vcpu(struct kvm_vcpu *vcpu); | 46 | int kvm_reset_vcpu(struct kvm_vcpu *vcpu); |
| @@ -148,6 +145,7 @@ struct kvm_vm_stat { | |||
| 148 | 145 | ||
| 149 | struct kvm_vcpu_stat { | 146 | struct kvm_vcpu_stat { |
| 150 | u32 halt_successful_poll; | 147 | u32 halt_successful_poll; |
| 148 | u32 halt_attempted_poll; | ||
| 151 | u32 halt_wakeup; | 149 | u32 halt_wakeup; |
| 152 | }; | 150 | }; |
| 153 | 151 | ||
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index 2092ee1e1300..de4634b51456 100644 --- a/arch/arm/include/asm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h | |||
| @@ -23,10 +23,10 @@ extern int show_fiq_list(struct seq_file *, int); | |||
| 23 | /* | 23 | /* |
| 24 | * This is for easy migration, but should be changed in the source | 24 | * This is for easy migration, but should be changed in the source |
| 25 | */ | 25 | */ |
| 26 | #define do_bad_IRQ(irq,desc) \ | 26 | #define do_bad_IRQ(desc) \ |
| 27 | do { \ | 27 | do { \ |
| 28 | raw_spin_lock(&desc->lock); \ | 28 | raw_spin_lock(&desc->lock); \ |
| 29 | handle_bad_irq(irq, desc); \ | 29 | handle_bad_irq(desc); \ |
| 30 | raw_spin_unlock(&desc->lock); \ | 30 | raw_spin_unlock(&desc->lock); \ |
| 31 | } while(0) | 31 | } while(0) |
| 32 | 32 | ||
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index d0a1119dcaf3..776757d1604a 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | struct task_struct; | 25 | struct task_struct; |
| 26 | 26 | ||
| 27 | #include <asm/types.h> | 27 | #include <asm/types.h> |
| 28 | #include <asm/domain.h> | ||
| 29 | 28 | ||
| 30 | typedef unsigned long mm_segment_t; | 29 | typedef unsigned long mm_segment_t; |
| 31 | 30 | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 32640c431a08..7cba573c2cc9 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * This may need to be greater than __NR_last_syscall+1 in order to | 19 | * This may need to be greater than __NR_last_syscall+1 in order to |
| 20 | * account for the padding in the syscall table | 20 | * account for the padding in the syscall table |
| 21 | */ | 21 | */ |
| 22 | #define __NR_syscalls (388) | 22 | #define __NR_syscalls (392) |
| 23 | 23 | ||
| 24 | /* | 24 | /* |
| 25 | * *NOTE*: This is a ghost syscall private to the kernel. Only the | 25 | * *NOTE*: This is a ghost syscall private to the kernel. Only the |
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h index 0c3f5a0dafd3..7a2a32a1d5a8 100644 --- a/arch/arm/include/uapi/asm/unistd.h +++ b/arch/arm/include/uapi/asm/unistd.h | |||
| @@ -414,6 +414,8 @@ | |||
| 414 | #define __NR_memfd_create (__NR_SYSCALL_BASE+385) | 414 | #define __NR_memfd_create (__NR_SYSCALL_BASE+385) |
| 415 | #define __NR_bpf (__NR_SYSCALL_BASE+386) | 415 | #define __NR_bpf (__NR_SYSCALL_BASE+386) |
| 416 | #define __NR_execveat (__NR_SYSCALL_BASE+387) | 416 | #define __NR_execveat (__NR_SYSCALL_BASE+387) |
| 417 | #define __NR_userfaultfd (__NR_SYSCALL_BASE+388) | ||
| 418 | #define __NR_membarrier (__NR_SYSCALL_BASE+389) | ||
| 417 | 419 | ||
| 418 | /* | 420 | /* |
| 419 | * The following SWIs are ARM private. | 421 | * The following SWIs are ARM private. |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 05745eb838c5..fde6c88d560c 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
| @@ -397,6 +397,8 @@ | |||
| 397 | /* 385 */ CALL(sys_memfd_create) | 397 | /* 385 */ CALL(sys_memfd_create) |
| 398 | CALL(sys_bpf) | 398 | CALL(sys_bpf) |
| 399 | CALL(sys_execveat) | 399 | CALL(sys_execveat) |
| 400 | CALL(sys_userfaultfd) | ||
| 401 | CALL(sys_membarrier) | ||
| 400 | #ifndef syscalls_counted | 402 | #ifndef syscalls_counted |
| 401 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | 403 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
| 402 | #define syscalls_counted | 404 | #define syscalls_counted |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 5ff4826cb154..2766183e69df 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
| @@ -79,26 +79,6 @@ asm_do_IRQ(unsigned int irq, struct pt_regs *regs) | |||
| 79 | handle_IRQ(irq, regs); | 79 | handle_IRQ(irq, regs); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | void set_irq_flags(unsigned int irq, unsigned int iflags) | ||
| 83 | { | ||
| 84 | unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; | ||
| 85 | |||
| 86 | if (irq >= nr_irqs) { | ||
| 87 | pr_err("Trying to set irq flags for IRQ%d\n", irq); | ||
| 88 | return; | ||
| 89 | } | ||
| 90 | |||
| 91 | if (iflags & IRQF_VALID) | ||
| 92 | clr |= IRQ_NOREQUEST; | ||
| 93 | if (iflags & IRQF_PROBE) | ||
| 94 | clr |= IRQ_NOPROBE; | ||
| 95 | if (!(iflags & IRQF_NOAUTOEN)) | ||
| 96 | clr |= IRQ_NOAUTOEN; | ||
| 97 | /* Order is clear bits in "clr" then set bits in "set" */ | ||
| 98 | irq_modify_status(irq, clr, set & ~clr); | ||
| 99 | } | ||
| 100 | EXPORT_SYMBOL_GPL(set_irq_flags); | ||
| 101 | |||
| 102 | void __init init_IRQ(void) | 82 | void __init init_IRQ(void) |
| 103 | { | 83 | { |
| 104 | int ret; | 84 | int ret; |
diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c index a6ad93c9bce3..fd9eefce0a7b 100644 --- a/arch/arm/kernel/kgdb.c +++ b/arch/arm/kernel/kgdb.c | |||
| @@ -259,15 +259,17 @@ int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt) | |||
| 259 | if (err) | 259 | if (err) |
| 260 | return err; | 260 | return err; |
| 261 | 261 | ||
| 262 | patch_text((void *)bpt->bpt_addr, | 262 | /* Machine is already stopped, so we can use __patch_text() directly */ |
| 263 | *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr); | 263 | __patch_text((void *)bpt->bpt_addr, |
| 264 | *(unsigned int *)arch_kgdb_ops.gdb_bpt_instr); | ||
| 264 | 265 | ||
| 265 | return err; | 266 | return err; |
| 266 | } | 267 | } |
| 267 | 268 | ||
| 268 | int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt) | 269 | int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt) |
| 269 | { | 270 | { |
| 270 | patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr); | 271 | /* Machine is already stopped, so we can use __patch_text() directly */ |
| 272 | __patch_text((void *)bpt->bpt_addr, *(unsigned int *)bpt->saved_instr); | ||
| 271 | 273 | ||
| 272 | return 0; | 274 | return 0; |
| 273 | } | 275 | } |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index a3089bacb8d8..7a7c4cea5523 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
| @@ -226,6 +226,7 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start, | |||
| 226 | 226 | ||
| 227 | memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save)); | 227 | memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save)); |
| 228 | 228 | ||
| 229 | #ifdef CONFIG_CPU_USE_DOMAINS | ||
| 229 | /* | 230 | /* |
| 230 | * Copy the initial value of the domain access control register | 231 | * Copy the initial value of the domain access control register |
| 231 | * from the current thread: thread->addr_limit will have been | 232 | * from the current thread: thread->addr_limit will have been |
| @@ -233,6 +234,7 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start, | |||
| 233 | * kernel/fork.c | 234 | * kernel/fork.c |
| 234 | */ | 235 | */ |
| 235 | thread->cpu_domain = get_domain(); | 236 | thread->cpu_domain = get_domain(); |
| 237 | #endif | ||
| 236 | 238 | ||
| 237 | if (likely(!(p->flags & PF_KTHREAD))) { | 239 | if (likely(!(p->flags & PF_KTHREAD))) { |
| 238 | *childregs = *current_pt_regs(); | 240 | *childregs = *current_pt_regs(); |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index b6cda06b455f..7b8f2141427b 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
| @@ -343,15 +343,18 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, | |||
| 343 | */ | 343 | */ |
| 344 | thumb = handler & 1; | 344 | thumb = handler & 1; |
| 345 | 345 | ||
| 346 | #if __LINUX_ARM_ARCH__ >= 7 | ||
| 347 | /* | 346 | /* |
| 348 | * Clear the If-Then Thumb-2 execution state | 347 | * Clear the If-Then Thumb-2 execution state. ARM spec |
| 349 | * ARM spec requires this to be all 000s in ARM mode | 348 | * requires this to be all 000s in ARM mode. Snapdragon |
| 350 | * Snapdragon S4/Krait misbehaves on a Thumb=>ARM | 349 | * S4/Krait misbehaves on a Thumb=>ARM signal transition |
| 351 | * signal transition without this. | 350 | * without this. |
| 351 | * | ||
| 352 | * We must do this whenever we are running on a Thumb-2 | ||
| 353 | * capable CPU, which includes ARMv6T2. However, we elect | ||
| 354 | * to always do this to simplify the code; this field is | ||
| 355 | * marked UNK/SBZP for older architectures. | ||
| 352 | */ | 356 | */ |
| 353 | cpsr &= ~PSR_IT_MASK; | 357 | cpsr &= ~PSR_IT_MASK; |
| 354 | #endif | ||
| 355 | 358 | ||
| 356 | if (thumb) { | 359 | if (thumb) { |
| 357 | cpsr |= PSR_T_BIT; | 360 | cpsr |= PSR_T_BIT; |
diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig index bfb915d05665..356970f3b25e 100644 --- a/arch/arm/kvm/Kconfig +++ b/arch/arm/kvm/Kconfig | |||
| @@ -21,6 +21,7 @@ config KVM | |||
| 21 | depends on MMU && OF | 21 | depends on MMU && OF |
| 22 | select PREEMPT_NOTIFIERS | 22 | select PREEMPT_NOTIFIERS |
| 23 | select ANON_INODES | 23 | select ANON_INODES |
| 24 | select ARM_GIC | ||
| 24 | select HAVE_KVM_CPU_RELAX_INTERCEPT | 25 | select HAVE_KVM_CPU_RELAX_INTERCEPT |
| 25 | select HAVE_KVM_ARCH_TLB_FLUSH_ALL | 26 | select HAVE_KVM_ARCH_TLB_FLUSH_ALL |
| 26 | select KVM_MMIO | 27 | select KVM_MMIO |
| @@ -45,15 +46,4 @@ config KVM_ARM_HOST | |||
| 45 | ---help--- | 46 | ---help--- |
| 46 | Provides host support for ARM processors. | 47 | Provides host support for ARM processors. |
| 47 | 48 | ||
| 48 | config KVM_ARM_MAX_VCPUS | ||
| 49 | int "Number maximum supported virtual CPUs per VM" | ||
| 50 | depends on KVM_ARM_HOST | ||
| 51 | default 4 | ||
| 52 | help | ||
| 53 | Static number of max supported virtual CPUs per VM. | ||
| 54 | |||
| 55 | If you choose a high number, the vcpu structures will be quite | ||
| 56 | large, so only choose a reasonable number that you expect to | ||
| 57 | actually use. | ||
| 58 | |||
| 59 | endif # VIRTUALIZATION | 49 | endif # VIRTUALIZATION |
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index ce404a5c3062..78b286994577 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c | |||
| @@ -446,7 +446,7 @@ static int kvm_vcpu_first_run_init(struct kvm_vcpu *vcpu) | |||
| 446 | * Map the VGIC hardware resources before running a vcpu the first | 446 | * Map the VGIC hardware resources before running a vcpu the first |
| 447 | * time on this VM. | 447 | * time on this VM. |
| 448 | */ | 448 | */ |
| 449 | if (unlikely(!vgic_ready(kvm))) { | 449 | if (unlikely(irqchip_in_kernel(kvm) && !vgic_ready(kvm))) { |
| 450 | ret = kvm_vgic_map_resources(kvm); | 450 | ret = kvm_vgic_map_resources(kvm); |
| 451 | if (ret) | 451 | if (ret) |
| 452 | return ret; | 452 | return ret; |
| @@ -1080,7 +1080,7 @@ static int init_hyp_mode(void) | |||
| 1080 | */ | 1080 | */ |
| 1081 | err = kvm_timer_hyp_init(); | 1081 | err = kvm_timer_hyp_init(); |
| 1082 | if (err) | 1082 | if (err) |
| 1083 | goto out_free_mappings; | 1083 | goto out_free_context; |
| 1084 | 1084 | ||
| 1085 | #ifndef CONFIG_HOTPLUG_CPU | 1085 | #ifndef CONFIG_HOTPLUG_CPU |
| 1086 | free_boot_hyp_pgd(); | 1086 | free_boot_hyp_pgd(); |
diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S index 702740d37465..51a59504bef4 100644 --- a/arch/arm/kvm/interrupts_head.S +++ b/arch/arm/kvm/interrupts_head.S | |||
| @@ -515,8 +515,7 @@ ARM_BE8(rev r6, r6 ) | |||
| 515 | 515 | ||
| 516 | mrc p15, 0, r2, c14, c3, 1 @ CNTV_CTL | 516 | mrc p15, 0, r2, c14, c3, 1 @ CNTV_CTL |
| 517 | str r2, [vcpu, #VCPU_TIMER_CNTV_CTL] | 517 | str r2, [vcpu, #VCPU_TIMER_CNTV_CTL] |
| 518 | bic r2, #1 @ Clear ENABLE | 518 | |
| 519 | mcr p15, 0, r2, c14, c3, 1 @ CNTV_CTL | ||
| 520 | isb | 519 | isb |
| 521 | 520 | ||
| 522 | mrrc p15, 3, rr_lo_hi(r2, r3), c14 @ CNTV_CVAL | 521 | mrrc p15, 3, rr_lo_hi(r2, r3), c14 @ CNTV_CVAL |
| @@ -529,6 +528,9 @@ ARM_BE8(rev r6, r6 ) | |||
| 529 | mcrr p15, 4, r2, r2, c14 @ CNTVOFF | 528 | mcrr p15, 4, r2, r2, c14 @ CNTVOFF |
| 530 | 529 | ||
| 531 | 1: | 530 | 1: |
| 531 | mov r2, #0 @ Clear ENABLE | ||
| 532 | mcr p15, 0, r2, c14, c3, 1 @ CNTV_CTL | ||
| 533 | |||
| 532 | @ Allow physical timer/counter access for the host | 534 | @ Allow physical timer/counter access for the host |
| 533 | mrc p15, 4, r2, c14, c1, 0 @ CNTHCTL | 535 | mrc p15, 4, r2, c14, c1, 0 @ CNTHCTL |
| 534 | orr r2, r2, #(CNTHCTL_PL1PCEN | CNTHCTL_PL1PCTEN) | 536 | orr r2, r2, #(CNTHCTL_PL1PCEN | CNTHCTL_PL1PCTEN) |
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 7b4201294187..6984342da13d 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c | |||
| @@ -1792,8 +1792,10 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, | |||
| 1792 | if (vma->vm_flags & VM_PFNMAP) { | 1792 | if (vma->vm_flags & VM_PFNMAP) { |
| 1793 | gpa_t gpa = mem->guest_phys_addr + | 1793 | gpa_t gpa = mem->guest_phys_addr + |
| 1794 | (vm_start - mem->userspace_addr); | 1794 | (vm_start - mem->userspace_addr); |
| 1795 | phys_addr_t pa = (vma->vm_pgoff << PAGE_SHIFT) + | 1795 | phys_addr_t pa; |
| 1796 | vm_start - vma->vm_start; | 1796 | |
| 1797 | pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; | ||
| 1798 | pa += vm_start - vma->vm_start; | ||
| 1797 | 1799 | ||
| 1798 | /* IO region dirty page logging not allowed */ | 1800 | /* IO region dirty page logging not allowed */ |
| 1799 | if (memslot->flags & KVM_MEM_LOG_DIRTY_PAGES) | 1801 | if (memslot->flags & KVM_MEM_LOG_DIRTY_PAGES) |
diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c index 4b94b513168d..ad6f6424f1d1 100644 --- a/arch/arm/kvm/psci.c +++ b/arch/arm/kvm/psci.c | |||
| @@ -126,7 +126,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu) | |||
| 126 | 126 | ||
| 127 | static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu) | 127 | static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu) |
| 128 | { | 128 | { |
| 129 | int i; | 129 | int i, matching_cpus = 0; |
| 130 | unsigned long mpidr; | 130 | unsigned long mpidr; |
| 131 | unsigned long target_affinity; | 131 | unsigned long target_affinity; |
| 132 | unsigned long target_affinity_mask; | 132 | unsigned long target_affinity_mask; |
| @@ -151,12 +151,16 @@ static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu) | |||
| 151 | */ | 151 | */ |
| 152 | kvm_for_each_vcpu(i, tmp, kvm) { | 152 | kvm_for_each_vcpu(i, tmp, kvm) { |
| 153 | mpidr = kvm_vcpu_get_mpidr_aff(tmp); | 153 | mpidr = kvm_vcpu_get_mpidr_aff(tmp); |
| 154 | if (((mpidr & target_affinity_mask) == target_affinity) && | 154 | if ((mpidr & target_affinity_mask) == target_affinity) { |
| 155 | !tmp->arch.pause) { | 155 | matching_cpus++; |
| 156 | return PSCI_0_2_AFFINITY_LEVEL_ON; | 156 | if (!tmp->arch.pause) |
| 157 | return PSCI_0_2_AFFINITY_LEVEL_ON; | ||
| 157 | } | 158 | } |
| 158 | } | 159 | } |
| 159 | 160 | ||
| 161 | if (!matching_cpus) | ||
| 162 | return PSCI_RET_INVALID_PARAMS; | ||
| 163 | |||
| 160 | return PSCI_0_2_AFFINITY_LEVEL_OFF; | 164 | return PSCI_0_2_AFFINITY_LEVEL_OFF; |
| 161 | } | 165 | } |
| 162 | 166 | ||
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c index 305d7c6242bb..bfb3703357c5 100644 --- a/arch/arm/mach-dove/irq.c +++ b/arch/arm/mach-dove/irq.c | |||
| @@ -69,14 +69,14 @@ static struct irq_chip pmu_irq_chip = { | |||
| 69 | .irq_ack = pmu_irq_ack, | 69 | .irq_ack = pmu_irq_ack, |
| 70 | }; | 70 | }; |
| 71 | 71 | ||
| 72 | static void pmu_irq_handler(unsigned int __irq, struct irq_desc *desc) | 72 | static void pmu_irq_handler(struct irq_desc *desc) |
| 73 | { | 73 | { |
| 74 | unsigned int irq = irq_desc_get_irq(desc); | ||
| 75 | unsigned long cause = readl(PMU_INTERRUPT_CAUSE); | 74 | unsigned long cause = readl(PMU_INTERRUPT_CAUSE); |
| 75 | unsigned int irq; | ||
| 76 | 76 | ||
| 77 | cause &= readl(PMU_INTERRUPT_MASK); | 77 | cause &= readl(PMU_INTERRUPT_MASK); |
| 78 | if (cause == 0) { | 78 | if (cause == 0) { |
| 79 | do_bad_IRQ(irq, desc); | 79 | do_bad_IRQ(desc); |
| 80 | return; | 80 | return; |
| 81 | } | 81 | } |
| 82 | 82 | ||
diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c index 9bdf54795f05..56978199c479 100644 --- a/arch/arm/mach-exynos/mcpm-exynos.c +++ b/arch/arm/mach-exynos/mcpm-exynos.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <asm/cputype.h> | 20 | #include <asm/cputype.h> |
| 21 | #include <asm/cp15.h> | 21 | #include <asm/cp15.h> |
| 22 | #include <asm/mcpm.h> | 22 | #include <asm/mcpm.h> |
| 23 | #include <asm/smp_plat.h> | ||
| 23 | 24 | ||
| 24 | #include "regs-pmu.h" | 25 | #include "regs-pmu.h" |
| 25 | #include "common.h" | 26 | #include "common.h" |
| @@ -70,7 +71,31 @@ static int exynos_cpu_powerup(unsigned int cpu, unsigned int cluster) | |||
| 70 | cluster >= EXYNOS5420_NR_CLUSTERS) | 71 | cluster >= EXYNOS5420_NR_CLUSTERS) |
| 71 | return -EINVAL; | 72 | return -EINVAL; |
| 72 | 73 | ||
| 73 | exynos_cpu_power_up(cpunr); | 74 | if (!exynos_cpu_power_state(cpunr)) { |
| 75 | exynos_cpu_power_up(cpunr); | ||
| 76 | |||
| 77 | /* | ||
| 78 | * This assumes the cluster number of the big cores(Cortex A15) | ||
| 79 | * is 0 and the Little cores(Cortex A7) is 1. | ||
| 80 | * When the system was booted from the Little core, | ||
| 81 | * they should be reset during power up cpu. | ||
| 82 | */ | ||
| 83 | if (cluster && | ||
| 84 | cluster == MPIDR_AFFINITY_LEVEL(cpu_logical_map(0), 1)) { | ||
| 85 | /* | ||
| 86 | * Before we reset the Little cores, we should wait | ||
| 87 | * the SPARE2 register is set to 1 because the init | ||
| 88 | * codes of the iROM will set the register after | ||
| 89 | * initialization. | ||
| 90 | */ | ||
| 91 | while (!pmu_raw_readl(S5P_PMU_SPARE2)) | ||
| 92 | udelay(10); | ||
| 93 | |||
| 94 | pmu_raw_writel(EXYNOS5420_KFC_CORE_RESET(cpu), | ||
| 95 | EXYNOS_SWRESET); | ||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 74 | return 0; | 99 | return 0; |
| 75 | } | 100 | } |
| 76 | 101 | ||
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 4a87e86dec45..7c21760f590f 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
| @@ -200,15 +200,15 @@ no_clk: | |||
| 200 | args.args_count = 0; | 200 | args.args_count = 0; |
| 201 | child_domain = of_genpd_get_from_provider(&args); | 201 | child_domain = of_genpd_get_from_provider(&args); |
| 202 | if (IS_ERR(child_domain)) | 202 | if (IS_ERR(child_domain)) |
| 203 | goto next_pd; | 203 | continue; |
| 204 | 204 | ||
| 205 | if (of_parse_phandle_with_args(np, "power-domains", | 205 | if (of_parse_phandle_with_args(np, "power-domains", |
| 206 | "#power-domain-cells", 0, &args) != 0) | 206 | "#power-domain-cells", 0, &args) != 0) |
| 207 | goto next_pd; | 207 | continue; |
| 208 | 208 | ||
| 209 | parent_domain = of_genpd_get_from_provider(&args); | 209 | parent_domain = of_genpd_get_from_provider(&args); |
| 210 | if (IS_ERR(parent_domain)) | 210 | if (IS_ERR(parent_domain)) |
| 211 | goto next_pd; | 211 | continue; |
| 212 | 212 | ||
| 213 | if (pm_genpd_add_subdomain(parent_domain, child_domain)) | 213 | if (pm_genpd_add_subdomain(parent_domain, child_domain)) |
| 214 | pr_warn("%s failed to add subdomain: %s\n", | 214 | pr_warn("%s failed to add subdomain: %s\n", |
| @@ -216,8 +216,6 @@ no_clk: | |||
| 216 | else | 216 | else |
| 217 | pr_info("%s has as child subdomain: %s.\n", | 217 | pr_info("%s has as child subdomain: %s.\n", |
| 218 | parent_domain->name, child_domain->name); | 218 | parent_domain->name, child_domain->name); |
| 219 | next_pd: | ||
| 220 | of_node_put(np); | ||
| 221 | } | 219 | } |
| 222 | 220 | ||
| 223 | return 0; | 221 | return 0; |
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h index b7614333d296..fba9068ed260 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h | |||
| @@ -513,6 +513,12 @@ static inline unsigned int exynos_pmu_cpunr(unsigned int mpidr) | |||
| 513 | #define SPREAD_ENABLE 0xF | 513 | #define SPREAD_ENABLE 0xF |
| 514 | #define SPREAD_USE_STANDWFI 0xF | 514 | #define SPREAD_USE_STANDWFI 0xF |
| 515 | 515 | ||
| 516 | #define EXYNOS5420_KFC_CORE_RESET0 BIT(8) | ||
| 517 | #define EXYNOS5420_KFC_ETM_RESET0 BIT(20) | ||
| 518 | |||
| 519 | #define EXYNOS5420_KFC_CORE_RESET(_nr) \ | ||
| 520 | ((EXYNOS5420_KFC_CORE_RESET0 | EXYNOS5420_KFC_ETM_RESET0) << (_nr)) | ||
| 521 | |||
| 516 | #define EXYNOS5420_BB_CON1 0x0784 | 522 | #define EXYNOS5420_BB_CON1 0x0784 |
| 517 | #define EXYNOS5420_BB_SEL_EN BIT(31) | 523 | #define EXYNOS5420_BB_SEL_EN BIT(31) |
| 518 | #define EXYNOS5420_BB_PMOS_EN BIT(7) | 524 | #define EXYNOS5420_BB_PMOS_EN BIT(7) |
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c index fcd79bc3a3e1..c01fca11b224 100644 --- a/arch/arm/mach-footbridge/isa-irq.c +++ b/arch/arm/mach-footbridge/isa-irq.c | |||
| @@ -87,13 +87,12 @@ static struct irq_chip isa_hi_chip = { | |||
| 87 | .irq_unmask = isa_unmask_pic_hi_irq, | 87 | .irq_unmask = isa_unmask_pic_hi_irq, |
| 88 | }; | 88 | }; |
| 89 | 89 | ||
| 90 | static void | 90 | static void isa_irq_handler(struct irq_desc *desc) |
| 91 | isa_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
| 92 | { | 91 | { |
| 93 | unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE; | 92 | unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE; |
| 94 | 93 | ||
| 95 | if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) { | 94 | if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) { |
| 96 | do_bad_IRQ(isa_irq, desc); | 95 | do_bad_IRQ(desc); |
| 97 | return; | 96 | return; |
| 98 | } | 97 | } |
| 99 | 98 | ||
diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c index 220333ed741d..2478d9f4d92d 100644 --- a/arch/arm/mach-gemini/gpio.c +++ b/arch/arm/mach-gemini/gpio.c | |||
| @@ -126,7 +126,7 @@ static int gpio_set_irq_type(struct irq_data *d, unsigned int type) | |||
| 126 | return 0; | 126 | return 0; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | 129 | static void gpio_irq_handler(struct irq_desc *desc) |
| 130 | { | 130 | { |
| 131 | unsigned int port = (unsigned int)irq_desc_get_handler_data(desc); | 131 | unsigned int port = (unsigned int)irq_desc_get_handler_data(desc); |
| 132 | unsigned int gpio_irq_no, irq_stat; | 132 | unsigned int gpio_irq_no, irq_stat; |
diff --git a/arch/arm/mach-imx/3ds_debugboard.c b/arch/arm/mach-imx/3ds_debugboard.c index 45903be6e7b3..16496a071ecb 100644 --- a/arch/arm/mach-imx/3ds_debugboard.c +++ b/arch/arm/mach-imx/3ds_debugboard.c | |||
| @@ -85,7 +85,7 @@ static struct platform_device smsc_lan9217_device = { | |||
| 85 | .resource = smsc911x_resources, | 85 | .resource = smsc911x_resources, |
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc) | 88 | static void mxc_expio_irq_handler(struct irq_desc *desc) |
| 89 | { | 89 | { |
| 90 | u32 imr_val; | 90 | u32 imr_val; |
| 91 | u32 int_valid; | 91 | u32 int_valid; |
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c index 2c0853560bd2..2b147e4bf9c9 100644 --- a/arch/arm/mach-imx/mach-mx31ads.c +++ b/arch/arm/mach-imx/mach-mx31ads.c | |||
| @@ -154,7 +154,7 @@ static inline void mxc_init_imx_uart(void) | |||
| 154 | imx31_add_imx_uart0(&uart_pdata); | 154 | imx31_add_imx_uart0(&uart_pdata); |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) | 157 | static void mx31ads_expio_irq_handler(struct irq_desc *desc) |
| 158 | { | 158 | { |
| 159 | u32 imr_val; | 159 | u32 imr_val; |
| 160 | u32 int_valid; | 160 | u32 int_valid; |
diff --git a/arch/arm/mach-iop13xx/msi.c b/arch/arm/mach-iop13xx/msi.c index 9f89e76dfbb9..f6235b28578c 100644 --- a/arch/arm/mach-iop13xx/msi.c +++ b/arch/arm/mach-iop13xx/msi.c | |||
| @@ -91,7 +91,7 @@ static void (*write_imipr[])(u32) = { | |||
| 91 | write_imipr_3, | 91 | write_imipr_3, |
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| 94 | static void iop13xx_msi_handler(unsigned int irq, struct irq_desc *desc) | 94 | static void iop13xx_msi_handler(struct irq_desc *desc) |
| 95 | { | 95 | { |
| 96 | int i, j; | 96 | int i, j; |
| 97 | unsigned long status; | 97 | unsigned long status; |
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index cce4cef12b6e..2ae431e8bc1b 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
| @@ -370,7 +370,7 @@ static struct irq_chip lpc32xx_irq_chip = { | |||
| 370 | .irq_set_wake = lpc32xx_irq_wake | 370 | .irq_set_wake = lpc32xx_irq_wake |
| 371 | }; | 371 | }; |
| 372 | 372 | ||
| 373 | static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc) | 373 | static void lpc32xx_sic1_handler(struct irq_desc *desc) |
| 374 | { | 374 | { |
| 375 | unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC1_BASE)); | 375 | unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC1_BASE)); |
| 376 | 376 | ||
| @@ -383,7 +383,7 @@ static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc) | |||
| 383 | } | 383 | } |
| 384 | } | 384 | } |
| 385 | 385 | ||
| 386 | static void lpc32xx_sic2_handler(unsigned int irq, struct irq_desc *desc) | 386 | static void lpc32xx_sic2_handler(struct irq_desc *desc) |
| 387 | { | 387 | { |
| 388 | unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC2_BASE)); | 388 | unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC2_BASE)); |
| 389 | 389 | ||
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c index 6373e2bff203..842302df99c1 100644 --- a/arch/arm/mach-netx/generic.c +++ b/arch/arm/mach-netx/generic.c | |||
| @@ -69,8 +69,7 @@ static struct platform_device *devices[] __initdata = { | |||
| 69 | #define DEBUG_IRQ(fmt...) while (0) {} | 69 | #define DEBUG_IRQ(fmt...) while (0) {} |
| 70 | #endif | 70 | #endif |
| 71 | 71 | ||
| 72 | static void | 72 | static void netx_hif_demux_handler(struct irq_desc *desc) |
| 73 | netx_hif_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | ||
| 74 | { | 73 | { |
| 75 | unsigned int irq = NETX_IRQ_HIF_CHAINED(0); | 74 | unsigned int irq = NETX_IRQ_HIF_CHAINED(0); |
| 76 | unsigned int stat; | 75 | unsigned int stat; |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index dfec671b1639..39e20d0ead08 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
| @@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d) | |||
| 87 | fpga_ack_irq(d); | 87 | fpga_ack_irq(d); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) | 90 | static void innovator_fpga_IRQ_demux(struct irq_desc *desc) |
| 91 | { | 91 | { |
| 92 | u32 stat; | 92 | u32 stat; |
| 93 | int fpga_irq; | 93 | int fpga_irq; |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 07d2e100caab..33d1460a5639 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
| @@ -44,10 +44,12 @@ config SOC_OMAP5 | |||
| 44 | select ARM_CPU_SUSPEND if PM | 44 | select ARM_CPU_SUSPEND if PM |
| 45 | select ARM_GIC | 45 | select ARM_GIC |
| 46 | select HAVE_ARM_SCU if SMP | 46 | select HAVE_ARM_SCU if SMP |
| 47 | select HAVE_ARM_TWD if SMP | ||
| 48 | select HAVE_ARM_ARCH_TIMER | 47 | select HAVE_ARM_ARCH_TIMER |
| 49 | select ARM_ERRATA_798181 if SMP | 48 | select ARM_ERRATA_798181 if SMP |
| 49 | select OMAP_INTERCONNECT | ||
| 50 | select OMAP_INTERCONNECT_BARRIER | 50 | select OMAP_INTERCONNECT_BARRIER |
| 51 | select PM_OPP if PM | ||
| 52 | select ZONE_DMA if ARM_LPAE | ||
| 51 | 53 | ||
| 52 | config SOC_AM33XX | 54 | config SOC_AM33XX |
| 53 | bool "TI AM33XX" | 55 | bool "TI AM33XX" |
| @@ -70,10 +72,14 @@ config SOC_DRA7XX | |||
| 70 | select ARCH_OMAP2PLUS | 72 | select ARCH_OMAP2PLUS |
| 71 | select ARM_CPU_SUSPEND if PM | 73 | select ARM_CPU_SUSPEND if PM |
| 72 | select ARM_GIC | 74 | select ARM_GIC |
| 75 | select HAVE_ARM_SCU if SMP | ||
| 73 | select HAVE_ARM_ARCH_TIMER | 76 | select HAVE_ARM_ARCH_TIMER |
| 74 | select IRQ_CROSSBAR | 77 | select IRQ_CROSSBAR |
| 75 | select ARM_ERRATA_798181 if SMP | 78 | select ARM_ERRATA_798181 if SMP |
| 79 | select OMAP_INTERCONNECT | ||
| 76 | select OMAP_INTERCONNECT_BARRIER | 80 | select OMAP_INTERCONNECT_BARRIER |
| 81 | select PM_OPP if PM | ||
| 82 | select ZONE_DMA if ARM_LPAE | ||
| 77 | 83 | ||
| 78 | config ARCH_OMAP2PLUS | 84 | config ARCH_OMAP2PLUS |
| 79 | bool | 85 | bool |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 24c9afc9e8a7..fb219a30c10c 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
| @@ -20,13 +20,6 @@ | |||
| 20 | 20 | ||
| 21 | #include "common.h" | 21 | #include "common.h" |
| 22 | 22 | ||
| 23 | #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)) | ||
| 24 | #define intc_of_init NULL | ||
| 25 | #endif | ||
| 26 | #ifndef CONFIG_ARCH_OMAP4 | ||
| 27 | #define gic_of_init NULL | ||
| 28 | #endif | ||
| 29 | |||
| 30 | static const struct of_device_id omap_dt_match_table[] __initconst = { | 23 | static const struct of_device_id omap_dt_match_table[] __initconst = { |
| 31 | { .compatible = "simple-bus", }, | 24 | { .compatible = "simple-bus", }, |
| 32 | { .compatible = "ti,omap-infra", }, | 25 | { .compatible = "ti,omap-infra", }, |
| @@ -113,6 +106,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") | |||
| 113 | MACHINE_END | 106 | MACHINE_END |
| 114 | 107 | ||
| 115 | static const char *const omap36xx_boards_compat[] __initconst = { | 108 | static const char *const omap36xx_boards_compat[] __initconst = { |
| 109 | "ti,omap3630", | ||
| 116 | "ti,omap36xx", | 110 | "ti,omap36xx", |
| 117 | NULL, | 111 | NULL, |
| 118 | }; | 112 | }; |
| @@ -250,6 +244,9 @@ static const char *const omap5_boards_compat[] __initconst = { | |||
| 250 | }; | 244 | }; |
| 251 | 245 | ||
| 252 | DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)") | 246 | DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)") |
| 247 | #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) | ||
| 248 | .dma_zone_size = SZ_2G, | ||
| 249 | #endif | ||
| 253 | .reserve = omap_reserve, | 250 | .reserve = omap_reserve, |
| 254 | .smp = smp_ops(omap4_smp_ops), | 251 | .smp = smp_ops(omap4_smp_ops), |
| 255 | .map_io = omap5_map_io, | 252 | .map_io = omap5_map_io, |
| @@ -295,6 +292,9 @@ static const char *const dra74x_boards_compat[] __initconst = { | |||
| 295 | }; | 292 | }; |
| 296 | 293 | ||
| 297 | DT_MACHINE_START(DRA74X_DT, "Generic DRA74X (Flattened Device Tree)") | 294 | DT_MACHINE_START(DRA74X_DT, "Generic DRA74X (Flattened Device Tree)") |
| 295 | #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) | ||
| 296 | .dma_zone_size = SZ_2G, | ||
| 297 | #endif | ||
| 298 | .reserve = omap_reserve, | 298 | .reserve = omap_reserve, |
| 299 | .smp = smp_ops(omap4_smp_ops), | 299 | .smp = smp_ops(omap4_smp_ops), |
| 300 | .map_io = dra7xx_map_io, | 300 | .map_io = dra7xx_map_io, |
| @@ -315,6 +315,9 @@ static const char *const dra72x_boards_compat[] __initconst = { | |||
| 315 | }; | 315 | }; |
| 316 | 316 | ||
| 317 | DT_MACHINE_START(DRA72X_DT, "Generic DRA72X (Flattened Device Tree)") | 317 | DT_MACHINE_START(DRA72X_DT, "Generic DRA72X (Flattened Device Tree)") |
| 318 | #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) | ||
| 319 | .dma_zone_size = SZ_2G, | ||
| 320 | #endif | ||
| 318 | .reserve = omap_reserve, | 321 | .reserve = omap_reserve, |
| 319 | .map_io = dra7xx_map_io, | 322 | .map_io = dra7xx_map_io, |
| 320 | .init_early = dra7xx_init_early, | 323 | .init_early = dra7xx_init_early, |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index e3f713ffb06b..54a5ba54d2ff 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
| @@ -653,8 +653,12 @@ void __init dra7xxx_check_revision(void) | |||
| 653 | omap_revision = DRA752_REV_ES1_0; | 653 | omap_revision = DRA752_REV_ES1_0; |
| 654 | break; | 654 | break; |
| 655 | case 1: | 655 | case 1: |
| 656 | default: | ||
| 657 | omap_revision = DRA752_REV_ES1_1; | 656 | omap_revision = DRA752_REV_ES1_1; |
| 657 | break; | ||
| 658 | case 2: | ||
| 659 | default: | ||
| 660 | omap_revision = DRA752_REV_ES2_0; | ||
| 661 | break; | ||
| 658 | } | 662 | } |
| 659 | break; | 663 | break; |
| 660 | 664 | ||
| @@ -674,7 +678,7 @@ void __init dra7xxx_check_revision(void) | |||
| 674 | /* Unknown default to latest silicon rev as default*/ | 678 | /* Unknown default to latest silicon rev as default*/ |
| 675 | pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%x)\n", | 679 | pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%x)\n", |
| 676 | __func__, idcode, hawkeye, rev); | 680 | __func__, idcode, hawkeye, rev); |
| 677 | omap_revision = DRA752_REV_ES1_1; | 681 | omap_revision = DRA752_REV_ES2_0; |
| 678 | } | 682 | } |
| 679 | 683 | ||
| 680 | sprintf(soc_name, "DRA%03x", omap_rev() >> 16); | 684 | sprintf(soc_name, "DRA%03x", omap_rev() >> 16); |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 980c9372e6fd..3eaeaca5da05 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
| @@ -676,6 +676,7 @@ void __init am43xx_init_early(void) | |||
| 676 | void __init am43xx_init_late(void) | 676 | void __init am43xx_init_late(void) |
| 677 | { | 677 | { |
| 678 | omap_common_late_init(); | 678 | omap_common_late_init(); |
| 679 | omap2_clk_enable_autoidle_all(); | ||
| 679 | } | 680 | } |
| 680 | #endif | 681 | #endif |
| 681 | 682 | ||
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 4cb8fd9f741f..72ebc4c16bae 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
| @@ -901,7 +901,8 @@ static int __init omap_device_late_idle(struct device *dev, void *data) | |||
| 901 | if (od->hwmods[i]->flags & HWMOD_INIT_NO_IDLE) | 901 | if (od->hwmods[i]->flags & HWMOD_INIT_NO_IDLE) |
| 902 | return 0; | 902 | return 0; |
| 903 | 903 | ||
| 904 | if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) { | 904 | if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER && |
| 905 | od->_driver_status != BUS_NOTIFY_BIND_DRIVER) { | ||
| 905 | if (od->_state == OMAP_DEVICE_STATE_ENABLED) { | 906 | if (od->_state == OMAP_DEVICE_STATE_ENABLED) { |
| 906 | dev_warn(dev, "%s: enabled but no driver. Idling\n", | 907 | dev_warn(dev, "%s: enabled but no driver. Idling\n", |
| 907 | __func__); | 908 | __func__); |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index ea56397599c2..1dfe34654c43 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
| @@ -559,7 +559,14 @@ static void pdata_quirks_check(struct pdata_init *quirks) | |||
| 559 | 559 | ||
| 560 | void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table) | 560 | void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table) |
| 561 | { | 561 | { |
| 562 | omap_sdrc_init(NULL, NULL); | 562 | /* |
| 563 | * We still need this for omap2420 and omap3 PM to work, others are | ||
| 564 | * using drivers/misc/sram.c already. | ||
| 565 | */ | ||
| 566 | if (of_machine_is_compatible("ti,omap2420") || | ||
| 567 | of_machine_is_compatible("ti,omap3")) | ||
| 568 | omap_sdrc_init(NULL, NULL); | ||
| 569 | |||
| 563 | pdata_quirks_check(auxdata_quirks); | 570 | pdata_quirks_check(auxdata_quirks); |
| 564 | of_platform_populate(NULL, omap_dt_match_table, | 571 | of_platform_populate(NULL, omap_dt_match_table, |
| 565 | omap_auxdata_lookup, NULL); | 572 | omap_auxdata_lookup, NULL); |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 425bfcd67db6..b668719b9b25 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
| @@ -103,7 +103,8 @@ static inline void enable_omap3630_toggle_l2_on_restore(void) { } | |||
| 103 | #define PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD (1 << 0) | 103 | #define PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD (1 << 0) |
| 104 | #define PM_OMAP4_CPU_OSWR_DISABLE (1 << 1) | 104 | #define PM_OMAP4_CPU_OSWR_DISABLE (1 << 1) |
| 105 | 105 | ||
| 106 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4) | 106 | #if defined(CONFIG_PM) && (defined(CONFIG_ARCH_OMAP4) ||\ |
| 107 | defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX)) | ||
| 107 | extern u16 pm44xx_errata; | 108 | extern u16 pm44xx_errata; |
| 108 | #define IS_PM44XX_ERRATUM(id) (pm44xx_errata & (id)) | 109 | #define IS_PM44XX_ERRATUM(id) (pm44xx_errata & (id)) |
| 109 | #else | 110 | #else |
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index 257e98c26618..3fc2cbe52113 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c | |||
| @@ -102,7 +102,7 @@ static void omap_prcm_events_filter_priority(unsigned long *events, | |||
| 102 | * dispatched accordingly. Clearing of the wakeup events should be | 102 | * dispatched accordingly. Clearing of the wakeup events should be |
| 103 | * done by the SoC specific individual handlers. | 103 | * done by the SoC specific individual handlers. |
| 104 | */ | 104 | */ |
| 105 | static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc) | 105 | static void omap_prcm_irq_handler(struct irq_desc *desc) |
| 106 | { | 106 | { |
| 107 | unsigned long pending[OMAP_PRCM_MAX_NR_PENDING_REG]; | 107 | unsigned long pending[OMAP_PRCM_MAX_NR_PENDING_REG]; |
| 108 | unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG]; | 108 | unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG]; |
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index f97654d11ea5..2d1d3845253c 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h | |||
| @@ -469,6 +469,8 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
| 469 | #define DRA7XX_CLASS 0x07000000 | 469 | #define DRA7XX_CLASS 0x07000000 |
| 470 | #define DRA752_REV_ES1_0 (DRA7XX_CLASS | (0x52 << 16) | (0x10 << 8)) | 470 | #define DRA752_REV_ES1_0 (DRA7XX_CLASS | (0x52 << 16) | (0x10 << 8)) |
| 471 | #define DRA752_REV_ES1_1 (DRA7XX_CLASS | (0x52 << 16) | (0x11 << 8)) | 471 | #define DRA752_REV_ES1_1 (DRA7XX_CLASS | (0x52 << 16) | (0x11 << 8)) |
| 472 | #define DRA752_REV_ES2_0 (DRA7XX_CLASS | (0x52 << 16) | (0x20 << 8)) | ||
| 473 | #define DRA722_REV_ES1_0 (DRA7XX_CLASS | (0x22 << 16) | (0x10 << 8)) | ||
| 472 | #define DRA722_REV_ES1_0 (DRA7XX_CLASS | (0x22 << 16) | (0x10 << 8)) | 474 | #define DRA722_REV_ES1_0 (DRA7XX_CLASS | (0x22 << 16) | (0x10 << 8)) |
| 473 | 475 | ||
| 474 | void omap2xxx_check_revision(void); | 476 | void omap2xxx_check_revision(void); |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index e4d8701f99f9..a55655127ef2 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
| @@ -297,12 +297,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
| 297 | if (IS_ERR(src)) | 297 | if (IS_ERR(src)) |
| 298 | return PTR_ERR(src); | 298 | return PTR_ERR(src); |
| 299 | 299 | ||
| 300 | r = clk_set_parent(timer->fclk, src); | 300 | WARN(clk_set_parent(timer->fclk, src) < 0, |
| 301 | if (r < 0) { | 301 | "Cannot set timer parent clock, no PLL clock driver?"); |
| 302 | pr_warn("%s: %s cannot set source\n", __func__, oh->name); | ||
| 303 | clk_put(src); | ||
| 304 | return r; | ||
| 305 | } | ||
| 306 | 302 | ||
| 307 | clk_put(src); | 303 | clk_put(src); |
| 308 | 304 | ||
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index e5a35f6b83a7..d44d311704ba 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c | |||
| @@ -300,7 +300,7 @@ static void __init omap3_vc_init_pmic_signaling(struct voltagedomain *voltdm) | |||
| 300 | 300 | ||
| 301 | val = voltdm->read(OMAP3_PRM_POLCTRL_OFFSET); | 301 | val = voltdm->read(OMAP3_PRM_POLCTRL_OFFSET); |
| 302 | if (!(val & OMAP3430_PRM_POLCTRL_CLKREQ_POL) || | 302 | if (!(val & OMAP3430_PRM_POLCTRL_CLKREQ_POL) || |
| 303 | (val & OMAP3430_PRM_POLCTRL_CLKREQ_POL)) { | 303 | (val & OMAP3430_PRM_POLCTRL_OFFMODE_POL)) { |
| 304 | val |= OMAP3430_PRM_POLCTRL_CLKREQ_POL; | 304 | val |= OMAP3430_PRM_POLCTRL_CLKREQ_POL; |
| 305 | val &= ~OMAP3430_PRM_POLCTRL_OFFMODE_POL; | 305 | val &= ~OMAP3430_PRM_POLCTRL_OFFMODE_POL; |
| 306 | pr_debug("PM: fixing sys_clkreq and sys_off_mode polarity to 0x%x\n", | 306 | pr_debug("PM: fixing sys_clkreq and sys_off_mode polarity to 0x%x\n", |
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 70366b35d299..a727282bfa99 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
| @@ -496,13 +496,13 @@ static struct irq_chip balloon3_irq_chip = { | |||
| 496 | .irq_unmask = balloon3_unmask_irq, | 496 | .irq_unmask = balloon3_unmask_irq, |
| 497 | }; | 497 | }; |
| 498 | 498 | ||
| 499 | static void balloon3_irq_handler(unsigned int __irq, struct irq_desc *desc) | 499 | static void balloon3_irq_handler(struct irq_desc *desc) |
| 500 | { | 500 | { |
| 501 | unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & | 501 | unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & |
| 502 | balloon3_irq_enabled; | 502 | balloon3_irq_enabled; |
| 503 | do { | 503 | do { |
| 504 | struct irq_data *d = irq_desc_get_irq_data(desc); | 504 | struct irq_data *d = irq_desc_get_irq_data(desc); |
| 505 | struct irq_chip *chip = irq_data_get_chip(d); | 505 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 506 | unsigned int irq; | 506 | unsigned int irq; |
| 507 | 507 | ||
| 508 | /* clear useless edge notification */ | 508 | /* clear useless edge notification */ |
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index 1fa79f1f832d..3221ae15bef7 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c | |||
| @@ -29,13 +29,12 @@ | |||
| 29 | void __iomem *it8152_base_address; | 29 | void __iomem *it8152_base_address; |
| 30 | static int cmx2xx_it8152_irq_gpio; | 30 | static int cmx2xx_it8152_irq_gpio; |
| 31 | 31 | ||
| 32 | static void cmx2xx_it8152_irq_demux(unsigned int __irq, struct irq_desc *desc) | 32 | static void cmx2xx_it8152_irq_demux(struct irq_desc *desc) |
| 33 | { | 33 | { |
| 34 | unsigned int irq = irq_desc_get_irq(desc); | ||
| 35 | /* clear our parent irq */ | 34 | /* clear our parent irq */ |
| 36 | desc->irq_data.chip->irq_ack(&desc->irq_data); | 35 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
| 37 | 36 | ||
| 38 | it8152_irq_demux(irq, desc); | 37 | it8152_irq_demux(desc); |
| 39 | } | 38 | } |
| 40 | 39 | ||
| 41 | void __cmx2xx_pci_init_irq(int irq_gpio) | 40 | void __cmx2xx_pci_init_irq(int irq_gpio) |
diff --git a/arch/arm/mach-pxa/include/mach/addr-map.h b/arch/arm/mach-pxa/include/mach/addr-map.h index d28fe291233a..07b93fd24474 100644 --- a/arch/arm/mach-pxa/include/mach/addr-map.h +++ b/arch/arm/mach-pxa/include/mach/addr-map.h | |||
| @@ -44,6 +44,13 @@ | |||
| 44 | */ | 44 | */ |
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| 47 | * DFI Bus for NAND, PXA3xx only | ||
| 48 | */ | ||
| 49 | #define NAND_PHYS 0x43100000 | ||
| 50 | #define NAND_VIRT IOMEM(0xf6300000) | ||
| 51 | #define NAND_SIZE 0x00100000 | ||
| 52 | |||
| 53 | /* | ||
| 47 | * Internal Memory Controller (PXA27x and later) | 54 | * Internal Memory Controller (PXA27x and later) |
| 48 | */ | 55 | */ |
| 49 | #define IMEMC_PHYS 0x58000000 | 56 | #define IMEMC_PHYS 0x58000000 |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index b070167deef2..4823d972e647 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
| @@ -120,7 +120,7 @@ static struct irq_chip lpd270_irq_chip = { | |||
| 120 | .irq_unmask = lpd270_unmask_irq, | 120 | .irq_unmask = lpd270_unmask_irq, |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | static void lpd270_irq_handler(unsigned int __irq, struct irq_desc *desc) | 123 | static void lpd270_irq_handler(struct irq_desc *desc) |
| 124 | { | 124 | { |
| 125 | unsigned int irq; | 125 | unsigned int irq; |
| 126 | unsigned long pending; | 126 | unsigned long pending; |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 9a0c8affdadb..d8319b54299a 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
| @@ -284,7 +284,7 @@ static struct irq_chip pcm990_irq_chip = { | |||
| 284 | .irq_unmask = pcm990_unmask_irq, | 284 | .irq_unmask = pcm990_unmask_irq, |
| 285 | }; | 285 | }; |
| 286 | 286 | ||
| 287 | static void pcm990_irq_handler(unsigned int __irq, struct irq_desc *desc) | 287 | static void pcm990_irq_handler(struct irq_desc *desc) |
| 288 | { | 288 | { |
| 289 | unsigned int irq; | 289 | unsigned int irq; |
| 290 | unsigned long pending; | 290 | unsigned long pending; |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index ce0f8d6242e2..20ce2d386f17 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
| @@ -42,6 +42,14 @@ | |||
| 42 | #define PECR_IS(n) ((1 << ((n) * 2)) << 29) | 42 | #define PECR_IS(n) ((1 << ((n) * 2)) << 29) |
| 43 | 43 | ||
| 44 | extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int)); | 44 | extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int)); |
| 45 | |||
| 46 | /* | ||
| 47 | * NAND NFC: DFI bus arbitration subset | ||
| 48 | */ | ||
| 49 | #define NDCR (*(volatile u32 __iomem*)(NAND_VIRT + 0)) | ||
| 50 | #define NDCR_ND_ARB_EN (1 << 12) | ||
| 51 | #define NDCR_ND_ARB_CNTL (1 << 19) | ||
| 52 | |||
| 45 | #ifdef CONFIG_PM | 53 | #ifdef CONFIG_PM |
| 46 | 54 | ||
| 47 | #define ISRAM_START 0x5c000000 | 55 | #define ISRAM_START 0x5c000000 |
| @@ -362,7 +370,12 @@ static struct map_desc pxa3xx_io_desc[] __initdata = { | |||
| 362 | .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), | 370 | .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), |
| 363 | .length = SMEMC_SIZE, | 371 | .length = SMEMC_SIZE, |
| 364 | .type = MT_DEVICE | 372 | .type = MT_DEVICE |
| 365 | } | 373 | }, { |
| 374 | .virtual = (unsigned long)NAND_VIRT, | ||
| 375 | .pfn = __phys_to_pfn(NAND_PHYS), | ||
| 376 | .length = NAND_SIZE, | ||
| 377 | .type = MT_DEVICE | ||
| 378 | }, | ||
| 366 | }; | 379 | }; |
| 367 | 380 | ||
| 368 | void __init pxa3xx_map_io(void) | 381 | void __init pxa3xx_map_io(void) |
| @@ -419,6 +432,13 @@ static int __init pxa3xx_init(void) | |||
| 419 | */ | 432 | */ |
| 420 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); | 433 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); |
| 421 | 434 | ||
| 435 | /* | ||
| 436 | * Disable DFI bus arbitration, to prevent a system bus lock if | ||
| 437 | * somebody disables the NAND clock (unused clock) while this | ||
| 438 | * bit remains set. | ||
| 439 | */ | ||
| 440 | NDCR = (NDCR & ~NDCR_ND_ARB_EN) | NDCR_ND_ARB_CNTL; | ||
| 441 | |||
| 422 | if ((ret = pxa_init_dma(IRQ_DMA, 32))) | 442 | if ((ret = pxa_init_dma(IRQ_DMA, 32))) |
| 423 | return ret; | 443 | return ret; |
| 424 | 444 | ||
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 4841d6cefe76..8ab26370107e 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
| @@ -276,7 +276,7 @@ static inline unsigned long viper_irq_pending(void) | |||
| 276 | viper_irq_enabled_mask; | 276 | viper_irq_enabled_mask; |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | static void viper_irq_handler(unsigned int __irq, struct irq_desc *desc) | 279 | static void viper_irq_handler(struct irq_desc *desc) |
| 280 | { | 280 | { |
| 281 | unsigned int irq; | 281 | unsigned int irq; |
| 282 | unsigned long pending; | 282 | unsigned long pending; |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 6f94dd7b4dee..30e62a3f0701 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
| @@ -105,7 +105,7 @@ static inline unsigned long zeus_irq_pending(void) | |||
| 105 | return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask; | 105 | return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask; |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | static void zeus_irq_handler(unsigned int __irq, struct irq_desc *desc) | 108 | static void zeus_irq_handler(struct irq_desc *desc) |
| 109 | { | 109 | { |
| 110 | unsigned int irq; | 110 | unsigned int irq; |
| 111 | unsigned long pending; | 111 | unsigned long pending; |
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c index f726d4c4e6dd..dc67a7fb3831 100644 --- a/arch/arm/mach-rpc/ecard.c +++ b/arch/arm/mach-rpc/ecard.c | |||
| @@ -551,8 +551,7 @@ static void ecard_check_lockup(struct irq_desc *desc) | |||
| 551 | } | 551 | } |
| 552 | } | 552 | } |
| 553 | 553 | ||
| 554 | static void | 554 | static void ecard_irq_handler(struct irq_desc *desc) |
| 555 | ecard_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
| 556 | { | 555 | { |
| 557 | ecard_t *ec; | 556 | ecard_t *ec; |
| 558 | int called = 0; | 557 | int called = 0; |
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c index ced1ab86ac83..2bb08961e934 100644 --- a/arch/arm/mach-s3c24xx/bast-irq.c +++ b/arch/arm/mach-s3c24xx/bast-irq.c | |||
| @@ -100,9 +100,7 @@ static struct irq_chip bast_pc104_chip = { | |||
| 100 | .irq_ack = bast_pc104_maskack | 100 | .irq_ack = bast_pc104_maskack |
| 101 | }; | 101 | }; |
| 102 | 102 | ||
| 103 | static void | 103 | static void bast_irq_pc104_demux(struct irq_desc *desc) |
| 104 | bast_irq_pc104_demux(unsigned int irq, | ||
| 105 | struct irq_desc *desc) | ||
| 106 | { | 104 | { |
| 107 | unsigned int stat; | 105 | unsigned int stat; |
| 108 | unsigned int irqno; | 106 | unsigned int irqno; |
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index fd63ecfb2f81..ddb30b8434c5 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c | |||
| @@ -388,22 +388,22 @@ static inline void s3c_irq_demux_eint(unsigned int start, unsigned int end) | |||
| 388 | } | 388 | } |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | static void s3c_irq_demux_eint0_3(unsigned int irq, struct irq_desc *desc) | 391 | static void s3c_irq_demux_eint0_3(struct irq_desc *desc) |
| 392 | { | 392 | { |
| 393 | s3c_irq_demux_eint(0, 3); | 393 | s3c_irq_demux_eint(0, 3); |
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | static void s3c_irq_demux_eint4_11(unsigned int irq, struct irq_desc *desc) | 396 | static void s3c_irq_demux_eint4_11(struct irq_desc *desc) |
| 397 | { | 397 | { |
| 398 | s3c_irq_demux_eint(4, 11); | 398 | s3c_irq_demux_eint(4, 11); |
| 399 | } | 399 | } |
| 400 | 400 | ||
| 401 | static void s3c_irq_demux_eint12_19(unsigned int irq, struct irq_desc *desc) | 401 | static void s3c_irq_demux_eint12_19(struct irq_desc *desc) |
| 402 | { | 402 | { |
| 403 | s3c_irq_demux_eint(12, 19); | 403 | s3c_irq_demux_eint(12, 19); |
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc) | 406 | static void s3c_irq_demux_eint20_27(struct irq_desc *desc) |
| 407 | { | 407 | { |
| 408 | s3c_irq_demux_eint(20, 27); | 408 | s3c_irq_demux_eint(20, 27); |
| 409 | } | 409 | } |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 6d237b4f7a8e..8411985af9ff 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
| @@ -166,7 +166,7 @@ static struct sa1100_port_fns neponset_port_fns = { | |||
| 166 | * ensure that the IRQ signal is deasserted before returning. This | 166 | * ensure that the IRQ signal is deasserted before returning. This |
| 167 | * is rather unfortunate. | 167 | * is rather unfortunate. |
| 168 | */ | 168 | */ |
| 169 | static void neponset_irq_handler(unsigned int irq, struct irq_desc *desc) | 169 | static void neponset_irq_handler(struct irq_desc *desc) |
| 170 | { | 170 | { |
| 171 | struct neponset_drvdata *d = irq_desc_get_handler_data(desc); | 171 | struct neponset_drvdata *d = irq_desc_get_handler_data(desc); |
| 172 | unsigned int irr; | 172 | unsigned int irr; |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 9769f1eefe3b..00b7f7de28a1 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
| @@ -365,15 +365,21 @@ do_alignment_ldrhstrh(unsigned long addr, unsigned long instr, struct pt_regs *r | |||
| 365 | user: | 365 | user: |
| 366 | if (LDST_L_BIT(instr)) { | 366 | if (LDST_L_BIT(instr)) { |
| 367 | unsigned long val; | 367 | unsigned long val; |
| 368 | unsigned int __ua_flags = uaccess_save_and_enable(); | ||
| 369 | |||
| 368 | get16t_unaligned_check(val, addr); | 370 | get16t_unaligned_check(val, addr); |
| 371 | uaccess_restore(__ua_flags); | ||
| 369 | 372 | ||
| 370 | /* signed half-word? */ | 373 | /* signed half-word? */ |
| 371 | if (instr & 0x40) | 374 | if (instr & 0x40) |
| 372 | val = (signed long)((signed short) val); | 375 | val = (signed long)((signed short) val); |
| 373 | 376 | ||
| 374 | regs->uregs[rd] = val; | 377 | regs->uregs[rd] = val; |
| 375 | } else | 378 | } else { |
| 379 | unsigned int __ua_flags = uaccess_save_and_enable(); | ||
| 376 | put16t_unaligned_check(regs->uregs[rd], addr); | 380 | put16t_unaligned_check(regs->uregs[rd], addr); |
| 381 | uaccess_restore(__ua_flags); | ||
| 382 | } | ||
| 377 | 383 | ||
| 378 | return TYPE_LDST; | 384 | return TYPE_LDST; |
| 379 | 385 | ||
| @@ -420,14 +426,21 @@ do_alignment_ldrdstrd(unsigned long addr, unsigned long instr, | |||
| 420 | 426 | ||
| 421 | user: | 427 | user: |
| 422 | if (load) { | 428 | if (load) { |
| 423 | unsigned long val; | 429 | unsigned long val, val2; |
| 430 | unsigned int __ua_flags = uaccess_save_and_enable(); | ||
| 431 | |||
| 424 | get32t_unaligned_check(val, addr); | 432 | get32t_unaligned_check(val, addr); |
| 433 | get32t_unaligned_check(val2, addr + 4); | ||
| 434 | |||
| 435 | uaccess_restore(__ua_flags); | ||
| 436 | |||
| 425 | regs->uregs[rd] = val; | 437 | regs->uregs[rd] = val; |
| 426 | get32t_unaligned_check(val, addr + 4); | 438 | regs->uregs[rd2] = val2; |
| 427 | regs->uregs[rd2] = val; | ||
| 428 | } else { | 439 | } else { |
| 440 | unsigned int __ua_flags = uaccess_save_and_enable(); | ||
| 429 | put32t_unaligned_check(regs->uregs[rd], addr); | 441 | put32t_unaligned_check(regs->uregs[rd], addr); |
| 430 | put32t_unaligned_check(regs->uregs[rd2], addr + 4); | 442 | put32t_unaligned_check(regs->uregs[rd2], addr + 4); |
| 443 | uaccess_restore(__ua_flags); | ||
| 431 | } | 444 | } |
| 432 | 445 | ||
| 433 | return TYPE_LDST; | 446 | return TYPE_LDST; |
| @@ -458,10 +471,15 @@ do_alignment_ldrstr(unsigned long addr, unsigned long instr, struct pt_regs *reg | |||
| 458 | trans: | 471 | trans: |
| 459 | if (LDST_L_BIT(instr)) { | 472 | if (LDST_L_BIT(instr)) { |
| 460 | unsigned int val; | 473 | unsigned int val; |
| 474 | unsigned int __ua_flags = uaccess_save_and_enable(); | ||
| 461 | get32t_unaligned_check(val, addr); | 475 | get32t_unaligned_check(val, addr); |
| 476 | uaccess_restore(__ua_flags); | ||
| 462 | regs->uregs[rd] = val; | 477 | regs->uregs[rd] = val; |
| 463 | } else | 478 | } else { |
| 479 | unsigned int __ua_flags = uaccess_save_and_enable(); | ||
| 464 | put32t_unaligned_check(regs->uregs[rd], addr); | 480 | put32t_unaligned_check(regs->uregs[rd], addr); |
| 481 | uaccess_restore(__ua_flags); | ||
| 482 | } | ||
| 465 | return TYPE_LDST; | 483 | return TYPE_LDST; |
| 466 | 484 | ||
| 467 | fault: | 485 | fault: |
| @@ -531,6 +549,7 @@ do_alignment_ldmstm(unsigned long addr, unsigned long instr, struct pt_regs *reg | |||
| 531 | #endif | 549 | #endif |
| 532 | 550 | ||
| 533 | if (user_mode(regs)) { | 551 | if (user_mode(regs)) { |
| 552 | unsigned int __ua_flags = uaccess_save_and_enable(); | ||
| 534 | for (regbits = REGMASK_BITS(instr), rd = 0; regbits; | 553 | for (regbits = REGMASK_BITS(instr), rd = 0; regbits; |
| 535 | regbits >>= 1, rd += 1) | 554 | regbits >>= 1, rd += 1) |
| 536 | if (regbits & 1) { | 555 | if (regbits & 1) { |
| @@ -542,6 +561,7 @@ do_alignment_ldmstm(unsigned long addr, unsigned long instr, struct pt_regs *reg | |||
| 542 | put32t_unaligned_check(regs->uregs[rd], eaddr); | 561 | put32t_unaligned_check(regs->uregs[rd], eaddr); |
| 543 | eaddr += 4; | 562 | eaddr += 4; |
| 544 | } | 563 | } |
| 564 | uaccess_restore(__ua_flags); | ||
| 545 | } else { | 565 | } else { |
| 546 | for (regbits = REGMASK_BITS(instr), rd = 0; regbits; | 566 | for (regbits = REGMASK_BITS(instr), rd = 0; regbits; |
| 547 | regbits >>= 1, rd += 1) | 567 | regbits >>= 1, rd += 1) |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index e62604384945..1a7815e5421b 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
| @@ -1249,7 +1249,7 @@ __iommu_create_mapping(struct device *dev, struct page **pages, size_t size) | |||
| 1249 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); | 1249 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
| 1250 | unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; | 1250 | unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; |
| 1251 | dma_addr_t dma_addr, iova; | 1251 | dma_addr_t dma_addr, iova; |
| 1252 | int i, ret = DMA_ERROR_CODE; | 1252 | int i; |
| 1253 | 1253 | ||
| 1254 | dma_addr = __alloc_iova(mapping, size); | 1254 | dma_addr = __alloc_iova(mapping, size); |
| 1255 | if (dma_addr == DMA_ERROR_CODE) | 1255 | if (dma_addr == DMA_ERROR_CODE) |
| @@ -1257,6 +1257,8 @@ __iommu_create_mapping(struct device *dev, struct page **pages, size_t size) | |||
| 1257 | 1257 | ||
| 1258 | iova = dma_addr; | 1258 | iova = dma_addr; |
| 1259 | for (i = 0; i < count; ) { | 1259 | for (i = 0; i < count; ) { |
| 1260 | int ret; | ||
| 1261 | |||
| 1260 | unsigned int next_pfn = page_to_pfn(pages[i]) + 1; | 1262 | unsigned int next_pfn = page_to_pfn(pages[i]) + 1; |
| 1261 | phys_addr_t phys = page_to_phys(pages[i]); | 1263 | phys_addr_t phys = page_to_phys(pages[i]); |
| 1262 | unsigned int len, j; | 1264 | unsigned int len, j; |
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 876060bcceeb..b8efb8cd1f73 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c | |||
| @@ -614,6 +614,7 @@ load_common: | |||
| 614 | case BPF_LD | BPF_B | BPF_IND: | 614 | case BPF_LD | BPF_B | BPF_IND: |
| 615 | load_order = 0; | 615 | load_order = 0; |
| 616 | load_ind: | 616 | load_ind: |
| 617 | update_on_xread(ctx); | ||
| 617 | OP_IMM3(ARM_ADD, r_off, r_X, k, ctx); | 618 | OP_IMM3(ARM_ADD, r_off, r_X, k, ctx); |
| 618 | goto load_common; | 619 | goto load_common; |
| 619 | case BPF_LDX | BPF_IMM: | 620 | case BPF_LDX | BPF_IMM: |
diff --git a/arch/arm/nwfpe/entry.S b/arch/arm/nwfpe/entry.S index 71df43547659..39c20afad7ed 100644 --- a/arch/arm/nwfpe/entry.S +++ b/arch/arm/nwfpe/entry.S | |||
| @@ -95,9 +95,10 @@ emulate: | |||
| 95 | reteq r4 @ no, return failure | 95 | reteq r4 @ no, return failure |
| 96 | 96 | ||
| 97 | next: | 97 | next: |
| 98 | uaccess_enable r3 | ||
| 98 | .Lx1: ldrt r6, [r5], #4 @ get the next instruction and | 99 | .Lx1: ldrt r6, [r5], #4 @ get the next instruction and |
| 99 | @ increment PC | 100 | @ increment PC |
| 100 | 101 | uaccess_disable r3 | |
| 101 | and r2, r6, #0x0F000000 @ test for FP insns | 102 | and r2, r6, #0x0F000000 @ test for FP insns |
| 102 | teq r2, #0x0C000000 | 103 | teq r2, #0x0C000000 |
| 103 | teqne r2, #0x0D000000 | 104 | teqne r2, #0x0D000000 |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 2235081a04ee..8861c367d061 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
| @@ -495,7 +495,7 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq) | |||
| 495 | 495 | ||
| 496 | d->netdev = &orion_ge00.dev; | 496 | d->netdev = &orion_ge00.dev; |
| 497 | for (i = 0; i < d->nr_chips; i++) | 497 | for (i = 0; i < d->nr_chips; i++) |
| 498 | d->chip[i].host_dev = &orion_ge00_shared.dev; | 498 | d->chip[i].host_dev = &orion_ge_mvmdio.dev; |
| 499 | orion_switch_device.dev.platform_data = d; | 499 | orion_switch_device.dev.platform_data = d; |
| 500 | 500 | ||
| 501 | platform_device_register(&orion_switch_device); | 501 | platform_device_register(&orion_switch_device); |
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 79c33eca09a3..7bd22d8e5b11 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c | |||
| @@ -407,7 +407,7 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type) | |||
| 407 | return 0; | 407 | return 0; |
| 408 | } | 408 | } |
| 409 | 409 | ||
| 410 | static void gpio_irq_handler(unsigned __irq, struct irq_desc *desc) | 410 | static void gpio_irq_handler(struct irq_desc *desc) |
| 411 | { | 411 | { |
| 412 | struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc); | 412 | struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc); |
| 413 | u32 cause, type; | 413 | u32 cause, type; |
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index ad9529cc4203..daa1a65f2eb7 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c | |||
| @@ -107,7 +107,6 @@ static const struct of_device_id pxa_ssp_of_ids[] = { | |||
| 107 | { .compatible = "mvrl,pxa168-ssp", .data = (void *) PXA168_SSP }, | 107 | { .compatible = "mvrl,pxa168-ssp", .data = (void *) PXA168_SSP }, |
| 108 | { .compatible = "mrvl,pxa910-ssp", .data = (void *) PXA910_SSP }, | 108 | { .compatible = "mrvl,pxa910-ssp", .data = (void *) PXA910_SSP }, |
| 109 | { .compatible = "mrvl,ce4100-ssp", .data = (void *) CE4100_SSP }, | 109 | { .compatible = "mrvl,ce4100-ssp", .data = (void *) CE4100_SSP }, |
| 110 | { .compatible = "mrvl,lpss-ssp", .data = (void *) LPSS_SSP }, | ||
| 111 | { }, | 110 | { }, |
| 112 | }; | 111 | }; |
| 113 | MODULE_DEVICE_TABLE(of, pxa_ssp_of_ids); | 112 | MODULE_DEVICE_TABLE(of, pxa_ssp_of_ids); |
diff --git a/arch/arm/vdso/vdsomunge.c b/arch/arm/vdso/vdsomunge.c index aedec81d1198..0cebd98cd88c 100644 --- a/arch/arm/vdso/vdsomunge.c +++ b/arch/arm/vdso/vdsomunge.c | |||
| @@ -45,7 +45,6 @@ | |||
| 45 | * it does. | 45 | * it does. |
| 46 | */ | 46 | */ |
| 47 | 47 | ||
| 48 | #include <byteswap.h> | ||
| 49 | #include <elf.h> | 48 | #include <elf.h> |
| 50 | #include <errno.h> | 49 | #include <errno.h> |
| 51 | #include <fcntl.h> | 50 | #include <fcntl.h> |
| @@ -59,6 +58,16 @@ | |||
| 59 | #include <sys/types.h> | 58 | #include <sys/types.h> |
| 60 | #include <unistd.h> | 59 | #include <unistd.h> |
| 61 | 60 | ||
| 61 | #define swab16(x) \ | ||
| 62 | ((((x) & 0x00ff) << 8) | \ | ||
| 63 | (((x) & 0xff00) >> 8)) | ||
| 64 | |||
| 65 | #define swab32(x) \ | ||
| 66 | ((((x) & 0x000000ff) << 24) | \ | ||
| 67 | (((x) & 0x0000ff00) << 8) | \ | ||
| 68 | (((x) & 0x00ff0000) >> 8) | \ | ||
| 69 | (((x) & 0xff000000) << 24)) | ||
| 70 | |||
| 62 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ | 71 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
| 63 | #define HOST_ORDER ELFDATA2LSB | 72 | #define HOST_ORDER ELFDATA2LSB |
| 64 | #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ | 73 | #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ |
| @@ -104,17 +113,17 @@ static void cleanup(void) | |||
| 104 | 113 | ||
| 105 | static Elf32_Word read_elf_word(Elf32_Word word, bool swap) | 114 | static Elf32_Word read_elf_word(Elf32_Word word, bool swap) |
| 106 | { | 115 | { |
| 107 | return swap ? bswap_32(word) : word; | 116 | return swap ? swab32(word) : word; |
| 108 | } | 117 | } |
| 109 | 118 | ||
| 110 | static Elf32_Half read_elf_half(Elf32_Half half, bool swap) | 119 | static Elf32_Half read_elf_half(Elf32_Half half, bool swap) |
| 111 | { | 120 | { |
| 112 | return swap ? bswap_16(half) : half; | 121 | return swap ? swab16(half) : half; |
| 113 | } | 122 | } |
| 114 | 123 | ||
| 115 | static void write_elf_word(Elf32_Word val, Elf32_Word *dst, bool swap) | 124 | static void write_elf_word(Elf32_Word val, Elf32_Word *dst, bool swap) |
| 116 | { | 125 | { |
| 117 | *dst = swap ? bswap_32(val) : val; | 126 | *dst = swap ? swab32(val) : val; |
| 118 | } | 127 | } |
| 119 | 128 | ||
| 120 | int main(int argc, char **argv) | 129 | int main(int argc, char **argv) |
diff --git a/arch/arm/xen/hypercall.S b/arch/arm/xen/hypercall.S index f00e08075938..10fd99c568c6 100644 --- a/arch/arm/xen/hypercall.S +++ b/arch/arm/xen/hypercall.S | |||
| @@ -98,8 +98,23 @@ ENTRY(privcmd_call) | |||
| 98 | mov r1, r2 | 98 | mov r1, r2 |
| 99 | mov r2, r3 | 99 | mov r2, r3 |
| 100 | ldr r3, [sp, #8] | 100 | ldr r3, [sp, #8] |
| 101 | /* | ||
| 102 | * Privcmd calls are issued by the userspace. We need to allow the | ||
| 103 | * kernel to access the userspace memory before issuing the hypercall. | ||
| 104 | */ | ||
| 105 | uaccess_enable r4 | ||
| 106 | |||
| 107 | /* r4 is loaded now as we use it as scratch register before */ | ||
| 101 | ldr r4, [sp, #4] | 108 | ldr r4, [sp, #4] |
| 102 | __HVC(XEN_IMM) | 109 | __HVC(XEN_IMM) |
| 110 | |||
| 111 | /* | ||
| 112 | * Disable userspace access from kernel. This is fine to do it | ||
| 113 | * unconditionally as no set_fs(KERNEL_DS)/set_fs(get_ds()) is | ||
| 114 | * called before. | ||
| 115 | */ | ||
| 116 | uaccess_disable r4 | ||
| 117 | |||
| 103 | ldm sp!, {r4} | 118 | ldm sp!, {r4} |
| 104 | ret lr | 119 | ret lr |
| 105 | ENDPROC(privcmd_call); | 120 | ENDPROC(privcmd_call); |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 7d95663c0160..07d1811aa03f 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
| @@ -32,6 +32,7 @@ config ARM64 | |||
| 32 | select GENERIC_CLOCKEVENTS_BROADCAST | 32 | select GENERIC_CLOCKEVENTS_BROADCAST |
| 33 | select GENERIC_CPU_AUTOPROBE | 33 | select GENERIC_CPU_AUTOPROBE |
| 34 | select GENERIC_EARLY_IOREMAP | 34 | select GENERIC_EARLY_IOREMAP |
| 35 | select GENERIC_IDLE_POLL_SETUP | ||
| 35 | select GENERIC_IRQ_PROBE | 36 | select GENERIC_IRQ_PROBE |
| 36 | select GENERIC_IRQ_SHOW | 37 | select GENERIC_IRQ_SHOW |
| 37 | select GENERIC_IRQ_SHOW_LEVEL | 38 | select GENERIC_IRQ_SHOW_LEVEL |
| @@ -331,6 +332,22 @@ config ARM64_ERRATUM_845719 | |||
| 331 | 332 | ||
| 332 | If unsure, say Y. | 333 | If unsure, say Y. |
| 333 | 334 | ||
| 335 | config ARM64_ERRATUM_843419 | ||
| 336 | bool "Cortex-A53: 843419: A load or store might access an incorrect address" | ||
| 337 | depends on MODULES | ||
| 338 | default y | ||
| 339 | help | ||
| 340 | This option builds kernel modules using the large memory model in | ||
| 341 | order to avoid the use of the ADRP instruction, which can cause | ||
| 342 | a subsequent memory access to use an incorrect address on Cortex-A53 | ||
| 343 | parts up to r0p4. | ||
| 344 | |||
| 345 | Note that the kernel itself must be linked with a version of ld | ||
| 346 | which fixes potentially affected ADRP instructions through the | ||
| 347 | use of veneers. | ||
| 348 | |||
| 349 | If unsure, say Y. | ||
| 350 | |||
| 334 | endmenu | 351 | endmenu |
| 335 | 352 | ||
| 336 | 353 | ||
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 15ff5b4156fd..d10b5d483022 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile | |||
| @@ -41,6 +41,10 @@ endif | |||
| 41 | 41 | ||
| 42 | CHECKFLAGS += -D__aarch64__ | 42 | CHECKFLAGS += -D__aarch64__ |
| 43 | 43 | ||
| 44 | ifeq ($(CONFIG_ARM64_ERRATUM_843419), y) | ||
| 45 | KBUILD_CFLAGS_MODULE += -mcmodel=large | ||
| 46 | endif | ||
| 47 | |||
| 44 | # Default value | 48 | # Default value |
| 45 | head-y := arch/arm64/kernel/head.o | 49 | head-y := arch/arm64/kernel/head.o |
| 46 | 50 | ||
diff --git a/arch/arm64/boot/dts/arm/juno-motherboard.dtsi b/arch/arm64/boot/dts/arm/juno-motherboard.dtsi index 637e046f0e36..3c386680357e 100644 --- a/arch/arm64/boot/dts/arm/juno-motherboard.dtsi +++ b/arch/arm64/boot/dts/arm/juno-motherboard.dtsi | |||
| @@ -61,42 +61,42 @@ | |||
| 61 | 61 | ||
| 62 | button@1 { | 62 | button@1 { |
| 63 | debounce_interval = <50>; | 63 | debounce_interval = <50>; |
| 64 | wakeup = <1>; | 64 | wakeup-source; |
| 65 | linux,code = <116>; | 65 | linux,code = <116>; |
| 66 | label = "POWER"; | 66 | label = "POWER"; |
| 67 | gpios = <&iofpga_gpio0 0 0x4>; | 67 | gpios = <&iofpga_gpio0 0 0x4>; |
| 68 | }; | 68 | }; |
| 69 | button@2 { | 69 | button@2 { |
| 70 | debounce_interval = <50>; | 70 | debounce_interval = <50>; |
| 71 | wakeup = <1>; | 71 | wakeup-source; |
| 72 | linux,code = <102>; | 72 | linux,code = <102>; |
| 73 | label = "HOME"; | 73 | label = "HOME"; |
| 74 | gpios = <&iofpga_gpio0 1 0x4>; | 74 | gpios = <&iofpga_gpio0 1 0x4>; |
| 75 | }; | 75 | }; |
| 76 | button@3 { | 76 | button@3 { |
| 77 | debounce_interval = <50>; | 77 | debounce_interval = <50>; |
| 78 | wakeup = <1>; | 78 | wakeup-source; |
| 79 | linux,code = <152>; | 79 | linux,code = <152>; |
| 80 | label = "RLOCK"; | 80 | label = "RLOCK"; |
| 81 | gpios = <&iofpga_gpio0 2 0x4>; | 81 | gpios = <&iofpga_gpio0 2 0x4>; |
| 82 | }; | 82 | }; |
| 83 | button@4 { | 83 | button@4 { |
| 84 | debounce_interval = <50>; | 84 | debounce_interval = <50>; |
| 85 | wakeup = <1>; | 85 | wakeup-source; |
| 86 | linux,code = <115>; | 86 | linux,code = <115>; |
| 87 | label = "VOL+"; | 87 | label = "VOL+"; |
| 88 | gpios = <&iofpga_gpio0 3 0x4>; | 88 | gpios = <&iofpga_gpio0 3 0x4>; |
| 89 | }; | 89 | }; |
| 90 | button@5 { | 90 | button@5 { |
| 91 | debounce_interval = <50>; | 91 | debounce_interval = <50>; |
| 92 | wakeup = <1>; | 92 | wakeup-source; |
| 93 | linux,code = <114>; | 93 | linux,code = <114>; |
| 94 | label = "VOL-"; | 94 | label = "VOL-"; |
| 95 | gpios = <&iofpga_gpio0 4 0x4>; | 95 | gpios = <&iofpga_gpio0 4 0x4>; |
| 96 | }; | 96 | }; |
| 97 | button@6 { | 97 | button@6 { |
| 98 | debounce_interval = <50>; | 98 | debounce_interval = <50>; |
| 99 | wakeup = <1>; | 99 | wakeup-source; |
| 100 | linux,code = <99>; | 100 | linux,code = <99>; |
| 101 | label = "NMI"; | 101 | label = "NMI"; |
| 102 | gpios = <&iofpga_gpio0 5 0x4>; | 102 | gpios = <&iofpga_gpio0 5 0x4>; |
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index d18ee4259ee5..06a15644be38 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi | |||
| @@ -81,7 +81,7 @@ | |||
| 81 | }; | 81 | }; |
| 82 | 82 | ||
| 83 | idle-states { | 83 | idle-states { |
| 84 | entry-method = "arm,psci"; | 84 | entry-method = "psci"; |
| 85 | 85 | ||
| 86 | CPU_SLEEP_0: cpu-sleep-0 { | 86 | CPU_SLEEP_0: cpu-sleep-0 { |
| 87 | compatible = "arm,idle-state"; | 87 | compatible = "arm,idle-state"; |
diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi index a712bea3bf2c..cc093a482aa4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi | |||
| @@ -106,7 +106,7 @@ | |||
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | idle-states { | 108 | idle-states { |
| 109 | entry-method = "arm,psci"; | 109 | entry-method = "psci"; |
| 110 | 110 | ||
| 111 | cpu_sleep: cpu-sleep-0 { | 111 | cpu_sleep: cpu-sleep-0 { |
| 112 | compatible = "arm,idle-state"; | 112 | compatible = "arm,idle-state"; |
diff --git a/arch/arm64/include/asm/hardirq.h b/arch/arm64/include/asm/hardirq.h index 2bb7009bdac7..a57601f9d17c 100644 --- a/arch/arm64/include/asm/hardirq.h +++ b/arch/arm64/include/asm/hardirq.h | |||
| @@ -43,9 +43,4 @@ static inline void ack_bad_irq(unsigned int irq) | |||
| 43 | irq_err_count++; | 43 | irq_err_count++; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | /* | ||
| 47 | * No arch-specific IRQ flags. | ||
| 48 | */ | ||
| 49 | #define set_irq_flags(irq, flags) | ||
| 50 | |||
| 51 | #endif /* __ASM_HARDIRQ_H */ | 46 | #endif /* __ASM_HARDIRQ_H */ |
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 7605e095217f..9694f2654593 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h | |||
| @@ -95,6 +95,7 @@ | |||
| 95 | SCTLR_EL2_SA | SCTLR_EL2_I) | 95 | SCTLR_EL2_SA | SCTLR_EL2_I) |
| 96 | 96 | ||
| 97 | /* TCR_EL2 Registers bits */ | 97 | /* TCR_EL2 Registers bits */ |
| 98 | #define TCR_EL2_RES1 ((1 << 31) | (1 << 23)) | ||
| 98 | #define TCR_EL2_TBI (1 << 20) | 99 | #define TCR_EL2_TBI (1 << 20) |
| 99 | #define TCR_EL2_PS (7 << 16) | 100 | #define TCR_EL2_PS (7 << 16) |
| 100 | #define TCR_EL2_PS_40B (2 << 16) | 101 | #define TCR_EL2_PS_40B (2 << 16) |
| @@ -106,9 +107,10 @@ | |||
| 106 | #define TCR_EL2_MASK (TCR_EL2_TG0 | TCR_EL2_SH0 | \ | 107 | #define TCR_EL2_MASK (TCR_EL2_TG0 | TCR_EL2_SH0 | \ |
| 107 | TCR_EL2_ORGN0 | TCR_EL2_IRGN0 | TCR_EL2_T0SZ) | 108 | TCR_EL2_ORGN0 | TCR_EL2_IRGN0 | TCR_EL2_T0SZ) |
| 108 | 109 | ||
| 109 | #define TCR_EL2_FLAGS (TCR_EL2_PS_40B) | 110 | #define TCR_EL2_FLAGS (TCR_EL2_RES1 | TCR_EL2_PS_40B) |
| 110 | 111 | ||
| 111 | /* VTCR_EL2 Registers bits */ | 112 | /* VTCR_EL2 Registers bits */ |
| 113 | #define VTCR_EL2_RES1 (1 << 31) | ||
| 112 | #define VTCR_EL2_PS_MASK (7 << 16) | 114 | #define VTCR_EL2_PS_MASK (7 << 16) |
| 113 | #define VTCR_EL2_TG0_MASK (1 << 14) | 115 | #define VTCR_EL2_TG0_MASK (1 << 14) |
| 114 | #define VTCR_EL2_TG0_4K (0 << 14) | 116 | #define VTCR_EL2_TG0_4K (0 << 14) |
| @@ -147,7 +149,8 @@ | |||
| 147 | */ | 149 | */ |
| 148 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_64K | VTCR_EL2_SH0_INNER | \ | 150 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_64K | VTCR_EL2_SH0_INNER | \ |
| 149 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ | 151 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ |
| 150 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B) | 152 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B | \ |
| 153 | VTCR_EL2_RES1) | ||
| 151 | #define VTTBR_X (38 - VTCR_EL2_T0SZ_40B) | 154 | #define VTTBR_X (38 - VTCR_EL2_T0SZ_40B) |
| 152 | #else | 155 | #else |
| 153 | /* | 156 | /* |
| @@ -158,7 +161,8 @@ | |||
| 158 | */ | 161 | */ |
| 159 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_4K | VTCR_EL2_SH0_INNER | \ | 162 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_4K | VTCR_EL2_SH0_INNER | \ |
| 160 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ | 163 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ |
| 161 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B) | 164 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B | \ |
| 165 | VTCR_EL2_RES1) | ||
| 162 | #define VTTBR_X (37 - VTCR_EL2_T0SZ_40B) | 166 | #define VTTBR_X (37 - VTCR_EL2_T0SZ_40B) |
| 163 | #endif | 167 | #endif |
| 164 | 168 | ||
| @@ -168,7 +172,6 @@ | |||
| 168 | #define VTTBR_VMID_MASK (UL(0xFF) << VTTBR_VMID_SHIFT) | 172 | #define VTTBR_VMID_MASK (UL(0xFF) << VTTBR_VMID_SHIFT) |
| 169 | 173 | ||
| 170 | /* Hyp System Trap Register */ | 174 | /* Hyp System Trap Register */ |
| 171 | #define HSTR_EL2_TTEE (1 << 16) | ||
| 172 | #define HSTR_EL2_T(x) (1 << x) | 175 | #define HSTR_EL2_T(x) (1 << x) |
| 173 | 176 | ||
| 174 | /* Hyp Coproccessor Trap Register Shifts */ | 177 | /* Hyp Coproccessor Trap Register Shifts */ |
diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h index 67fa0de3d483..5e377101f919 100644 --- a/arch/arm64/include/asm/kvm_asm.h +++ b/arch/arm64/include/asm/kvm_asm.h | |||
| @@ -53,9 +53,7 @@ | |||
| 53 | #define IFSR32_EL2 25 /* Instruction Fault Status Register */ | 53 | #define IFSR32_EL2 25 /* Instruction Fault Status Register */ |
| 54 | #define FPEXC32_EL2 26 /* Floating-Point Exception Control Register */ | 54 | #define FPEXC32_EL2 26 /* Floating-Point Exception Control Register */ |
| 55 | #define DBGVCR32_EL2 27 /* Debug Vector Catch Register */ | 55 | #define DBGVCR32_EL2 27 /* Debug Vector Catch Register */ |
| 56 | #define TEECR32_EL1 28 /* ThumbEE Configuration Register */ | 56 | #define NR_SYS_REGS 28 |
| 57 | #define TEEHBR32_EL1 29 /* ThumbEE Handler Base Register */ | ||
| 58 | #define NR_SYS_REGS 30 | ||
| 59 | 57 | ||
| 60 | /* 32bit mapping */ | 58 | /* 32bit mapping */ |
| 61 | #define c0_MPIDR (MPIDR_EL1 * 2) /* MultiProcessor ID Register */ | 59 | #define c0_MPIDR (MPIDR_EL1 * 2) /* MultiProcessor ID Register */ |
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 415938dc45cf..ed039688c221 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h | |||
| @@ -30,19 +30,16 @@ | |||
| 30 | 30 | ||
| 31 | #define __KVM_HAVE_ARCH_INTC_INITIALIZED | 31 | #define __KVM_HAVE_ARCH_INTC_INITIALIZED |
| 32 | 32 | ||
| 33 | #if defined(CONFIG_KVM_ARM_MAX_VCPUS) | ||
| 34 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS | ||
| 35 | #else | ||
| 36 | #define KVM_MAX_VCPUS 0 | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #define KVM_USER_MEM_SLOTS 32 | 33 | #define KVM_USER_MEM_SLOTS 32 |
| 40 | #define KVM_PRIVATE_MEM_SLOTS 4 | 34 | #define KVM_PRIVATE_MEM_SLOTS 4 |
| 41 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 35 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| 36 | #define KVM_HALT_POLL_NS_DEFAULT 500000 | ||
| 42 | 37 | ||
| 43 | #include <kvm/arm_vgic.h> | 38 | #include <kvm/arm_vgic.h> |
| 44 | #include <kvm/arm_arch_timer.h> | 39 | #include <kvm/arm_arch_timer.h> |
| 45 | 40 | ||
| 41 | #define KVM_MAX_VCPUS VGIC_V3_MAX_CPUS | ||
| 42 | |||
| 46 | #define KVM_VCPU_MAX_FEATURES 3 | 43 | #define KVM_VCPU_MAX_FEATURES 3 |
| 47 | 44 | ||
| 48 | int __attribute_const__ kvm_target_cpu(void); | 45 | int __attribute_const__ kvm_target_cpu(void); |
| @@ -195,6 +192,7 @@ struct kvm_vm_stat { | |||
| 195 | 192 | ||
| 196 | struct kvm_vcpu_stat { | 193 | struct kvm_vcpu_stat { |
| 197 | u32 halt_successful_poll; | 194 | u32 halt_successful_poll; |
| 195 | u32 halt_attempted_poll; | ||
| 198 | u32 halt_wakeup; | 196 | u32 halt_wakeup; |
| 199 | }; | 197 | }; |
| 200 | 198 | ||
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 6900b2d95371..26b066690593 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
| @@ -26,13 +26,9 @@ | |||
| 26 | * Software defined PTE bits definition. | 26 | * Software defined PTE bits definition. |
| 27 | */ | 27 | */ |
| 28 | #define PTE_VALID (_AT(pteval_t, 1) << 0) | 28 | #define PTE_VALID (_AT(pteval_t, 1) << 0) |
| 29 | #define PTE_WRITE (PTE_DBM) /* same as DBM (51) */ | ||
| 29 | #define PTE_DIRTY (_AT(pteval_t, 1) << 55) | 30 | #define PTE_DIRTY (_AT(pteval_t, 1) << 55) |
| 30 | #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) | 31 | #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) |
| 31 | #ifdef CONFIG_ARM64_HW_AFDBM | ||
| 32 | #define PTE_WRITE (PTE_DBM) /* same as DBM */ | ||
| 33 | #else | ||
| 34 | #define PTE_WRITE (_AT(pteval_t, 1) << 57) | ||
| 35 | #endif | ||
| 36 | #define PTE_PROT_NONE (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */ | 32 | #define PTE_PROT_NONE (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */ |
| 37 | 33 | ||
| 38 | /* | 34 | /* |
| @@ -83,7 +79,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
| 83 | #define PAGE_S2 __pgprot(PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_NORMAL) | PTE_S2_RDONLY) | 79 | #define PAGE_S2 __pgprot(PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_NORMAL) | PTE_S2_RDONLY) |
| 84 | #define PAGE_S2_DEVICE __pgprot(PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_DEVICE_nGnRE) | PTE_S2_RDONLY | PTE_UXN) | 80 | #define PAGE_S2_DEVICE __pgprot(PROT_DEFAULT | PTE_S2_MEMATTR(MT_S2_DEVICE_nGnRE) | PTE_S2_RDONLY | PTE_UXN) |
| 85 | 81 | ||
| 86 | #define PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_TYPE_MASK) | PTE_PROT_NONE | PTE_PXN | PTE_UXN) | 82 | #define PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_VALID) | PTE_PROT_NONE | PTE_PXN | PTE_UXN) |
| 87 | #define PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_WRITE) | 83 | #define PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_WRITE) |
| 88 | #define PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_WRITE) | 84 | #define PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_WRITE) |
| 89 | #define PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) | 85 | #define PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) |
| @@ -146,7 +142,7 @@ extern struct page *empty_zero_page; | |||
| 146 | #define pte_exec(pte) (!(pte_val(pte) & PTE_UXN)) | 142 | #define pte_exec(pte) (!(pte_val(pte) & PTE_UXN)) |
| 147 | 143 | ||
| 148 | #ifdef CONFIG_ARM64_HW_AFDBM | 144 | #ifdef CONFIG_ARM64_HW_AFDBM |
| 149 | #define pte_hw_dirty(pte) (!(pte_val(pte) & PTE_RDONLY)) | 145 | #define pte_hw_dirty(pte) (pte_write(pte) && !(pte_val(pte) & PTE_RDONLY)) |
| 150 | #else | 146 | #else |
| 151 | #define pte_hw_dirty(pte) (0) | 147 | #define pte_hw_dirty(pte) (0) |
| 152 | #endif | 148 | #endif |
| @@ -238,7 +234,7 @@ extern void __sync_icache_dcache(pte_t pteval, unsigned long addr); | |||
| 238 | * When hardware DBM is not present, the sofware PTE_DIRTY bit is updated via | 234 | * When hardware DBM is not present, the sofware PTE_DIRTY bit is updated via |
| 239 | * the page fault mechanism. Checking the dirty status of a pte becomes: | 235 | * the page fault mechanism. Checking the dirty status of a pte becomes: |
| 240 | * | 236 | * |
| 241 | * PTE_DIRTY || !PTE_RDONLY | 237 | * PTE_DIRTY || (PTE_WRITE && !PTE_RDONLY) |
| 242 | */ | 238 | */ |
| 243 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | 239 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, |
| 244 | pte_t *ptep, pte_t pte) | 240 | pte_t *ptep, pte_t pte) |
| @@ -500,10 +496,10 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long addr) | |||
| 500 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 496 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 501 | { | 497 | { |
| 502 | const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY | | 498 | const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY | |
| 503 | PTE_PROT_NONE | PTE_WRITE | PTE_TYPE_MASK; | 499 | PTE_PROT_NONE | PTE_VALID | PTE_WRITE; |
| 504 | /* preserve the hardware dirty information */ | 500 | /* preserve the hardware dirty information */ |
| 505 | if (pte_hw_dirty(pte)) | 501 | if (pte_hw_dirty(pte)) |
| 506 | newprot |= PTE_DIRTY; | 502 | pte = pte_mkdirty(pte); |
| 507 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); | 503 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); |
| 508 | return pte; | 504 | return pte; |
| 509 | } | 505 | } |
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 3bc498c250dc..41e58fe3c041 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | #define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2) | 44 | #define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2) |
| 45 | #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5) | 45 | #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5) |
| 46 | 46 | ||
| 47 | #define __NR_compat_syscalls 388 | 47 | #define __NR_compat_syscalls 390 |
| 48 | #endif | 48 | #endif |
| 49 | 49 | ||
| 50 | #define __ARCH_WANT_SYS_CLONE | 50 | #define __ARCH_WANT_SYS_CLONE |
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index cef934a90f17..5b925b761a2a 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h | |||
| @@ -797,3 +797,12 @@ __SYSCALL(__NR_memfd_create, sys_memfd_create) | |||
| 797 | __SYSCALL(__NR_bpf, sys_bpf) | 797 | __SYSCALL(__NR_bpf, sys_bpf) |
| 798 | #define __NR_execveat 387 | 798 | #define __NR_execveat 387 |
| 799 | __SYSCALL(__NR_execveat, compat_sys_execveat) | 799 | __SYSCALL(__NR_execveat, compat_sys_execveat) |
| 800 | #define __NR_userfaultfd 388 | ||
| 801 | __SYSCALL(__NR_userfaultfd, sys_userfaultfd) | ||
| 802 | #define __NR_membarrier 389 | ||
| 803 | __SYSCALL(__NR_membarrier, sys_membarrier) | ||
| 804 | |||
| 805 | /* | ||
| 806 | * Please add new compat syscalls above this comment and update | ||
| 807 | * __NR_compat_syscalls in asm/unistd.h. | ||
| 808 | */ | ||
diff --git a/arch/arm64/include/uapi/asm/signal.h b/arch/arm64/include/uapi/asm/signal.h index 8d1e7236431b..991bf5db2ca1 100644 --- a/arch/arm64/include/uapi/asm/signal.h +++ b/arch/arm64/include/uapi/asm/signal.h | |||
| @@ -19,6 +19,9 @@ | |||
| 19 | /* Required for AArch32 compatibility. */ | 19 | /* Required for AArch32 compatibility. */ |
| 20 | #define SA_RESTORER 0x04000000 | 20 | #define SA_RESTORER 0x04000000 |
| 21 | 21 | ||
| 22 | #define MINSIGSTKSZ 5120 | ||
| 23 | #define SIGSTKSZ 16384 | ||
| 24 | |||
| 22 | #include <asm-generic/signal.h> | 25 | #include <asm-generic/signal.h> |
| 23 | 26 | ||
| 24 | #endif | 27 | #endif |
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index bcee7abac68e..937f5e58a4d3 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c | |||
| @@ -284,21 +284,23 @@ static void register_insn_emulation_sysctl(struct ctl_table *table) | |||
| 284 | __asm__ __volatile__( \ | 284 | __asm__ __volatile__( \ |
| 285 | ALTERNATIVE("nop", SET_PSTATE_PAN(0), ARM64_HAS_PAN, \ | 285 | ALTERNATIVE("nop", SET_PSTATE_PAN(0), ARM64_HAS_PAN, \ |
| 286 | CONFIG_ARM64_PAN) \ | 286 | CONFIG_ARM64_PAN) \ |
| 287 | " mov %w2, %w1\n" \ | 287 | "0: ldxr"B" %w2, [%3]\n" \ |
| 288 | "0: ldxr"B" %w1, [%3]\n" \ | 288 | "1: stxr"B" %w0, %w1, [%3]\n" \ |
| 289 | "1: stxr"B" %w0, %w2, [%3]\n" \ | ||
| 290 | " cbz %w0, 2f\n" \ | 289 | " cbz %w0, 2f\n" \ |
| 291 | " mov %w0, %w4\n" \ | 290 | " mov %w0, %w4\n" \ |
| 291 | " b 3f\n" \ | ||
| 292 | "2:\n" \ | 292 | "2:\n" \ |
| 293 | " mov %w1, %w2\n" \ | ||
| 294 | "3:\n" \ | ||
| 293 | " .pushsection .fixup,\"ax\"\n" \ | 295 | " .pushsection .fixup,\"ax\"\n" \ |
| 294 | " .align 2\n" \ | 296 | " .align 2\n" \ |
| 295 | "3: mov %w0, %w5\n" \ | 297 | "4: mov %w0, %w5\n" \ |
| 296 | " b 2b\n" \ | 298 | " b 3b\n" \ |
| 297 | " .popsection" \ | 299 | " .popsection" \ |
| 298 | " .pushsection __ex_table,\"a\"\n" \ | 300 | " .pushsection __ex_table,\"a\"\n" \ |
| 299 | " .align 3\n" \ | 301 | " .align 3\n" \ |
| 300 | " .quad 0b, 3b\n" \ | 302 | " .quad 0b, 4b\n" \ |
| 301 | " .quad 1b, 3b\n" \ | 303 | " .quad 1b, 4b\n" \ |
| 302 | " .popsection\n" \ | 304 | " .popsection\n" \ |
| 303 | ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN, \ | 305 | ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN, \ |
| 304 | CONFIG_ARM64_PAN) \ | 306 | CONFIG_ARM64_PAN) \ |
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 9b3b62ac9c24..253021ef2769 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c | |||
| @@ -134,7 +134,7 @@ static int os_lock_notify(struct notifier_block *self, | |||
| 134 | unsigned long action, void *data) | 134 | unsigned long action, void *data) |
| 135 | { | 135 | { |
| 136 | int cpu = (unsigned long)data; | 136 | int cpu = (unsigned long)data; |
| 137 | if (action == CPU_ONLINE) | 137 | if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE) |
| 138 | smp_call_function_single(cpu, clear_os_lock, NULL, 1); | 138 | smp_call_function_single(cpu, clear_os_lock, NULL, 1); |
| 139 | return NOTIFY_OK; | 139 | return NOTIFY_OK; |
| 140 | } | 140 | } |
| @@ -201,7 +201,7 @@ void unregister_step_hook(struct step_hook *hook) | |||
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | /* | 203 | /* |
| 204 | * Call registered single step handers | 204 | * Call registered single step handlers |
| 205 | * There is no Syndrome info to check for determining the handler. | 205 | * There is no Syndrome info to check for determining the handler. |
| 206 | * So we call all the registered handlers, until the right handler is | 206 | * So we call all the registered handlers, until the right handler is |
| 207 | * found which returns zero. | 207 | * found which returns zero. |
| @@ -271,20 +271,21 @@ static int single_step_handler(unsigned long addr, unsigned int esr, | |||
| 271 | * Use reader/writer locks instead of plain spinlock. | 271 | * Use reader/writer locks instead of plain spinlock. |
| 272 | */ | 272 | */ |
| 273 | static LIST_HEAD(break_hook); | 273 | static LIST_HEAD(break_hook); |
| 274 | static DEFINE_RWLOCK(break_hook_lock); | 274 | static DEFINE_SPINLOCK(break_hook_lock); |
| 275 | 275 | ||
| 276 | void register_break_hook(struct break_hook *hook) | 276 | void register_break_hook(struct break_hook *hook) |
| 277 | { | 277 | { |
| 278 | write_lock(&break_hook_lock); | 278 | spin_lock(&break_hook_lock); |
| 279 | list_add(&hook->node, &break_hook); | 279 | list_add_rcu(&hook->node, &break_hook); |
| 280 | write_unlock(&break_hook_lock); | 280 | spin_unlock(&break_hook_lock); |
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | void unregister_break_hook(struct break_hook *hook) | 283 | void unregister_break_hook(struct break_hook *hook) |
| 284 | { | 284 | { |
| 285 | write_lock(&break_hook_lock); | 285 | spin_lock(&break_hook_lock); |
| 286 | list_del(&hook->node); | 286 | list_del_rcu(&hook->node); |
| 287 | write_unlock(&break_hook_lock); | 287 | spin_unlock(&break_hook_lock); |
| 288 | synchronize_rcu(); | ||
| 288 | } | 289 | } |
| 289 | 290 | ||
| 290 | static int call_break_hook(struct pt_regs *regs, unsigned int esr) | 291 | static int call_break_hook(struct pt_regs *regs, unsigned int esr) |
| @@ -292,11 +293,11 @@ static int call_break_hook(struct pt_regs *regs, unsigned int esr) | |||
| 292 | struct break_hook *hook; | 293 | struct break_hook *hook; |
| 293 | int (*fn)(struct pt_regs *regs, unsigned int esr) = NULL; | 294 | int (*fn)(struct pt_regs *regs, unsigned int esr) = NULL; |
| 294 | 295 | ||
| 295 | read_lock(&break_hook_lock); | 296 | rcu_read_lock(); |
| 296 | list_for_each_entry(hook, &break_hook, node) | 297 | list_for_each_entry_rcu(hook, &break_hook, node) |
| 297 | if ((esr & hook->esr_mask) == hook->esr_val) | 298 | if ((esr & hook->esr_mask) == hook->esr_val) |
| 298 | fn = hook->fn; | 299 | fn = hook->fn; |
| 299 | read_unlock(&break_hook_lock); | 300 | rcu_read_unlock(); |
| 300 | 301 | ||
| 301 | return fn ? fn(regs, esr) : DBG_HOOK_ERROR; | 302 | return fn ? fn(regs, esr) : DBG_HOOK_ERROR; |
| 302 | } | 303 | } |
diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c index 816120ece6bc..78dfbd34b6bf 100644 --- a/arch/arm64/kernel/efi-stub.c +++ b/arch/arm64/kernel/efi-stub.c | |||
| @@ -25,10 +25,20 @@ efi_status_t __init handle_kernel_image(efi_system_table_t *sys_table_arg, | |||
| 25 | unsigned long kernel_size, kernel_memsize = 0; | 25 | unsigned long kernel_size, kernel_memsize = 0; |
| 26 | unsigned long nr_pages; | 26 | unsigned long nr_pages; |
| 27 | void *old_image_addr = (void *)*image_addr; | 27 | void *old_image_addr = (void *)*image_addr; |
| 28 | unsigned long preferred_offset; | ||
| 29 | |||
| 30 | /* | ||
| 31 | * The preferred offset of the kernel Image is TEXT_OFFSET bytes beyond | ||
| 32 | * a 2 MB aligned base, which itself may be lower than dram_base, as | ||
| 33 | * long as the resulting offset equals or exceeds it. | ||
| 34 | */ | ||
| 35 | preferred_offset = round_down(dram_base, SZ_2M) + TEXT_OFFSET; | ||
| 36 | if (preferred_offset < dram_base) | ||
| 37 | preferred_offset += SZ_2M; | ||
| 28 | 38 | ||
| 29 | /* Relocate the image, if required. */ | 39 | /* Relocate the image, if required. */ |
| 30 | kernel_size = _edata - _text; | 40 | kernel_size = _edata - _text; |
| 31 | if (*image_addr != (dram_base + TEXT_OFFSET)) { | 41 | if (*image_addr != preferred_offset) { |
| 32 | kernel_memsize = kernel_size + (_end - _edata); | 42 | kernel_memsize = kernel_size + (_end - _edata); |
| 33 | 43 | ||
| 34 | /* | 44 | /* |
| @@ -42,7 +52,7 @@ efi_status_t __init handle_kernel_image(efi_system_table_t *sys_table_arg, | |||
| 42 | * Mustang), we can still place the kernel at the address | 52 | * Mustang), we can still place the kernel at the address |
| 43 | * 'dram_base + TEXT_OFFSET'. | 53 | * 'dram_base + TEXT_OFFSET'. |
| 44 | */ | 54 | */ |
| 45 | *image_addr = *reserve_addr = dram_base + TEXT_OFFSET; | 55 | *image_addr = *reserve_addr = preferred_offset; |
| 46 | nr_pages = round_up(kernel_memsize, EFI_ALLOC_ALIGN) / | 56 | nr_pages = round_up(kernel_memsize, EFI_ALLOC_ALIGN) / |
| 47 | EFI_PAGE_SIZE; | 57 | EFI_PAGE_SIZE; |
| 48 | status = efi_call_early(allocate_pages, EFI_ALLOCATE_ADDRESS, | 58 | status = efi_call_early(allocate_pages, EFI_ALLOCATE_ADDRESS, |
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index e8ca6eaedd02..13671a9cf016 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c | |||
| @@ -258,7 +258,8 @@ static bool __init efi_virtmap_init(void) | |||
| 258 | */ | 258 | */ |
| 259 | if (!is_normal_ram(md)) | 259 | if (!is_normal_ram(md)) |
| 260 | prot = __pgprot(PROT_DEVICE_nGnRE); | 260 | prot = __pgprot(PROT_DEVICE_nGnRE); |
| 261 | else if (md->type == EFI_RUNTIME_SERVICES_CODE) | 261 | else if (md->type == EFI_RUNTIME_SERVICES_CODE || |
| 262 | !PAGE_ALIGNED(md->phys_addr)) | ||
| 262 | prot = PAGE_KERNEL_EXEC; | 263 | prot = PAGE_KERNEL_EXEC; |
| 263 | else | 264 | else |
| 264 | prot = PAGE_KERNEL; | 265 | prot = PAGE_KERNEL; |
diff --git a/arch/arm64/kernel/entry-ftrace.S b/arch/arm64/kernel/entry-ftrace.S index 08cafc518b9a..0f03a8fe2314 100644 --- a/arch/arm64/kernel/entry-ftrace.S +++ b/arch/arm64/kernel/entry-ftrace.S | |||
| @@ -178,6 +178,24 @@ ENTRY(ftrace_stub) | |||
| 178 | ENDPROC(ftrace_stub) | 178 | ENDPROC(ftrace_stub) |
| 179 | 179 | ||
| 180 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 180 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
| 181 | /* save return value regs*/ | ||
| 182 | .macro save_return_regs | ||
| 183 | sub sp, sp, #64 | ||
| 184 | stp x0, x1, [sp] | ||
| 185 | stp x2, x3, [sp, #16] | ||
| 186 | stp x4, x5, [sp, #32] | ||
| 187 | stp x6, x7, [sp, #48] | ||
| 188 | .endm | ||
| 189 | |||
| 190 | /* restore return value regs*/ | ||
| 191 | .macro restore_return_regs | ||
| 192 | ldp x0, x1, [sp] | ||
| 193 | ldp x2, x3, [sp, #16] | ||
| 194 | ldp x4, x5, [sp, #32] | ||
| 195 | ldp x6, x7, [sp, #48] | ||
| 196 | add sp, sp, #64 | ||
| 197 | .endm | ||
| 198 | |||
| 181 | /* | 199 | /* |
| 182 | * void ftrace_graph_caller(void) | 200 | * void ftrace_graph_caller(void) |
| 183 | * | 201 | * |
| @@ -204,11 +222,11 @@ ENDPROC(ftrace_graph_caller) | |||
| 204 | * only when CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST is enabled. | 222 | * only when CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST is enabled. |
| 205 | */ | 223 | */ |
| 206 | ENTRY(return_to_handler) | 224 | ENTRY(return_to_handler) |
| 207 | str x0, [sp, #-16]! | 225 | save_return_regs |
| 208 | mov x0, x29 // parent's fp | 226 | mov x0, x29 // parent's fp |
| 209 | bl ftrace_return_to_handler// addr = ftrace_return_to_hander(fp); | 227 | bl ftrace_return_to_handler// addr = ftrace_return_to_hander(fp); |
| 210 | mov x30, x0 // restore the original return address | 228 | mov x30, x0 // restore the original return address |
| 211 | ldr x0, [sp], #16 | 229 | restore_return_regs |
| 212 | ret | 230 | ret |
| 213 | END(return_to_handler) | 231 | END(return_to_handler) |
| 214 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ | 232 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ |
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index a055be6125cf..90d09eddd5b2 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S | |||
| @@ -523,6 +523,11 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems | |||
| 523 | msr hstr_el2, xzr // Disable CP15 traps to EL2 | 523 | msr hstr_el2, xzr // Disable CP15 traps to EL2 |
| 524 | #endif | 524 | #endif |
| 525 | 525 | ||
| 526 | /* EL2 debug */ | ||
| 527 | mrs x0, pmcr_el0 // Disable debug access traps | ||
| 528 | ubfx x0, x0, #11, #5 // to EL2 and allow access to | ||
| 529 | msr mdcr_el2, x0 // all PMU counters from EL1 | ||
| 530 | |||
| 526 | /* Stage-2 translation */ | 531 | /* Stage-2 translation */ |
| 527 | msr vttbr_el2, xzr | 532 | msr vttbr_el2, xzr |
| 528 | 533 | ||
diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index c97040ecf838..bba85c8f8037 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c | |||
| @@ -872,7 +872,7 @@ static int hw_breakpoint_reset_notify(struct notifier_block *self, | |||
| 872 | void *hcpu) | 872 | void *hcpu) |
| 873 | { | 873 | { |
| 874 | int cpu = (long)hcpu; | 874 | int cpu = (long)hcpu; |
| 875 | if (action == CPU_ONLINE) | 875 | if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE) |
| 876 | smp_call_function_single(cpu, hw_breakpoint_reset, NULL, 1); | 876 | smp_call_function_single(cpu, hw_breakpoint_reset, NULL, 1); |
| 877 | return NOTIFY_OK; | 877 | return NOTIFY_OK; |
| 878 | } | 878 | } |
diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c index f341866aa810..c08b9ad6f429 100644 --- a/arch/arm64/kernel/insn.c +++ b/arch/arm64/kernel/insn.c | |||
| @@ -85,7 +85,7 @@ bool aarch64_insn_is_branch_imm(u32 insn) | |||
| 85 | aarch64_insn_is_bcond(insn)); | 85 | aarch64_insn_is_bcond(insn)); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | static DEFINE_SPINLOCK(patch_lock); | 88 | static DEFINE_RAW_SPINLOCK(patch_lock); |
| 89 | 89 | ||
| 90 | static void __kprobes *patch_map(void *addr, int fixmap) | 90 | static void __kprobes *patch_map(void *addr, int fixmap) |
| 91 | { | 91 | { |
| @@ -131,13 +131,13 @@ static int __kprobes __aarch64_insn_write(void *addr, u32 insn) | |||
| 131 | unsigned long flags = 0; | 131 | unsigned long flags = 0; |
| 132 | int ret; | 132 | int ret; |
| 133 | 133 | ||
| 134 | spin_lock_irqsave(&patch_lock, flags); | 134 | raw_spin_lock_irqsave(&patch_lock, flags); |
| 135 | waddr = patch_map(addr, FIX_TEXT_POKE0); | 135 | waddr = patch_map(addr, FIX_TEXT_POKE0); |
| 136 | 136 | ||
| 137 | ret = probe_kernel_write(waddr, &insn, AARCH64_INSN_SIZE); | 137 | ret = probe_kernel_write(waddr, &insn, AARCH64_INSN_SIZE); |
| 138 | 138 | ||
| 139 | patch_unmap(FIX_TEXT_POKE0); | 139 | patch_unmap(FIX_TEXT_POKE0); |
| 140 | spin_unlock_irqrestore(&patch_lock, flags); | 140 | raw_spin_unlock_irqrestore(&patch_lock, flags); |
| 141 | 141 | ||
| 142 | return ret; | 142 | return ret; |
| 143 | } | 143 | } |
diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index 67bf4107f6ef..876eb8df50bf 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c | |||
| @@ -332,12 +332,14 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, | |||
| 332 | ovf = reloc_insn_imm(RELOC_OP_PREL, loc, val, 0, 21, | 332 | ovf = reloc_insn_imm(RELOC_OP_PREL, loc, val, 0, 21, |
| 333 | AARCH64_INSN_IMM_ADR); | 333 | AARCH64_INSN_IMM_ADR); |
| 334 | break; | 334 | break; |
| 335 | #ifndef CONFIG_ARM64_ERRATUM_843419 | ||
| 335 | case R_AARCH64_ADR_PREL_PG_HI21_NC: | 336 | case R_AARCH64_ADR_PREL_PG_HI21_NC: |
| 336 | overflow_check = false; | 337 | overflow_check = false; |
| 337 | case R_AARCH64_ADR_PREL_PG_HI21: | 338 | case R_AARCH64_ADR_PREL_PG_HI21: |
| 338 | ovf = reloc_insn_imm(RELOC_OP_PAGE, loc, val, 12, 21, | 339 | ovf = reloc_insn_imm(RELOC_OP_PAGE, loc, val, 12, 21, |
| 339 | AARCH64_INSN_IMM_ADR); | 340 | AARCH64_INSN_IMM_ADR); |
| 340 | break; | 341 | break; |
| 342 | #endif | ||
| 341 | case R_AARCH64_ADD_ABS_LO12_NC: | 343 | case R_AARCH64_ADD_ABS_LO12_NC: |
| 342 | case R_AARCH64_LDST8_ABS_LO12_NC: | 344 | case R_AARCH64_LDST8_ABS_LO12_NC: |
| 343 | overflow_check = false; | 345 | overflow_check = false; |
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 6bab21f84a9f..232247945b1c 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
| @@ -364,6 +364,8 @@ static void __init relocate_initrd(void) | |||
| 364 | to_free = ram_end - orig_start; | 364 | to_free = ram_end - orig_start; |
| 365 | 365 | ||
| 366 | size = orig_end - orig_start; | 366 | size = orig_end - orig_start; |
| 367 | if (!size) | ||
| 368 | return; | ||
| 367 | 369 | ||
| 368 | /* initrd needs to be relocated completely inside linear mapping */ | 370 | /* initrd needs to be relocated completely inside linear mapping */ |
| 369 | new_start = memblock_find_in_range(0, PFN_PHYS(max_pfn), | 371 | new_start = memblock_find_in_range(0, PFN_PHYS(max_pfn), |
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c index 948f0ad2de23..71ef6dc89ae5 100644 --- a/arch/arm64/kernel/signal32.c +++ b/arch/arm64/kernel/signal32.c | |||
| @@ -212,14 +212,32 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) | |||
| 212 | 212 | ||
| 213 | /* | 213 | /* |
| 214 | * VFP save/restore code. | 214 | * VFP save/restore code. |
| 215 | * | ||
| 216 | * We have to be careful with endianness, since the fpsimd context-switch | ||
| 217 | * code operates on 128-bit (Q) register values whereas the compat ABI | ||
| 218 | * uses an array of 64-bit (D) registers. Consequently, we need to swap | ||
| 219 | * the two halves of each Q register when running on a big-endian CPU. | ||
| 215 | */ | 220 | */ |
| 221 | union __fpsimd_vreg { | ||
| 222 | __uint128_t raw; | ||
| 223 | struct { | ||
| 224 | #ifdef __AARCH64EB__ | ||
| 225 | u64 hi; | ||
| 226 | u64 lo; | ||
| 227 | #else | ||
| 228 | u64 lo; | ||
| 229 | u64 hi; | ||
| 230 | #endif | ||
| 231 | }; | ||
| 232 | }; | ||
| 233 | |||
| 216 | static int compat_preserve_vfp_context(struct compat_vfp_sigframe __user *frame) | 234 | static int compat_preserve_vfp_context(struct compat_vfp_sigframe __user *frame) |
| 217 | { | 235 | { |
| 218 | struct fpsimd_state *fpsimd = ¤t->thread.fpsimd_state; | 236 | struct fpsimd_state *fpsimd = ¤t->thread.fpsimd_state; |
| 219 | compat_ulong_t magic = VFP_MAGIC; | 237 | compat_ulong_t magic = VFP_MAGIC; |
| 220 | compat_ulong_t size = VFP_STORAGE_SIZE; | 238 | compat_ulong_t size = VFP_STORAGE_SIZE; |
| 221 | compat_ulong_t fpscr, fpexc; | 239 | compat_ulong_t fpscr, fpexc; |
| 222 | int err = 0; | 240 | int i, err = 0; |
| 223 | 241 | ||
| 224 | /* | 242 | /* |
| 225 | * Save the hardware registers to the fpsimd_state structure. | 243 | * Save the hardware registers to the fpsimd_state structure. |
| @@ -235,10 +253,15 @@ static int compat_preserve_vfp_context(struct compat_vfp_sigframe __user *frame) | |||
| 235 | /* | 253 | /* |
| 236 | * Now copy the FP registers. Since the registers are packed, | 254 | * Now copy the FP registers. Since the registers are packed, |
| 237 | * we can copy the prefix we want (V0-V15) as it is. | 255 | * we can copy the prefix we want (V0-V15) as it is. |
| 238 | * FIXME: Won't work if big endian. | ||
| 239 | */ | 256 | */ |
| 240 | err |= __copy_to_user(&frame->ufp.fpregs, fpsimd->vregs, | 257 | for (i = 0; i < ARRAY_SIZE(frame->ufp.fpregs); i += 2) { |
| 241 | sizeof(frame->ufp.fpregs)); | 258 | union __fpsimd_vreg vreg = { |
| 259 | .raw = fpsimd->vregs[i >> 1], | ||
| 260 | }; | ||
| 261 | |||
| 262 | __put_user_error(vreg.lo, &frame->ufp.fpregs[i], err); | ||
| 263 | __put_user_error(vreg.hi, &frame->ufp.fpregs[i + 1], err); | ||
| 264 | } | ||
| 242 | 265 | ||
| 243 | /* Create an AArch32 fpscr from the fpsr and the fpcr. */ | 266 | /* Create an AArch32 fpscr from the fpsr and the fpcr. */ |
| 244 | fpscr = (fpsimd->fpsr & VFP_FPSCR_STAT_MASK) | | 267 | fpscr = (fpsimd->fpsr & VFP_FPSCR_STAT_MASK) | |
| @@ -263,7 +286,7 @@ static int compat_restore_vfp_context(struct compat_vfp_sigframe __user *frame) | |||
| 263 | compat_ulong_t magic = VFP_MAGIC; | 286 | compat_ulong_t magic = VFP_MAGIC; |
| 264 | compat_ulong_t size = VFP_STORAGE_SIZE; | 287 | compat_ulong_t size = VFP_STORAGE_SIZE; |
| 265 | compat_ulong_t fpscr; | 288 | compat_ulong_t fpscr; |
| 266 | int err = 0; | 289 | int i, err = 0; |
| 267 | 290 | ||
| 268 | __get_user_error(magic, &frame->magic, err); | 291 | __get_user_error(magic, &frame->magic, err); |
| 269 | __get_user_error(size, &frame->size, err); | 292 | __get_user_error(size, &frame->size, err); |
| @@ -273,12 +296,14 @@ static int compat_restore_vfp_context(struct compat_vfp_sigframe __user *frame) | |||
| 273 | if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE) | 296 | if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE) |
| 274 | return -EINVAL; | 297 | return -EINVAL; |
| 275 | 298 | ||
| 276 | /* | 299 | /* Copy the FP registers into the start of the fpsimd_state. */ |
| 277 | * Copy the FP registers into the start of the fpsimd_state. | 300 | for (i = 0; i < ARRAY_SIZE(frame->ufp.fpregs); i += 2) { |
| 278 | * FIXME: Won't work if big endian. | 301 | union __fpsimd_vreg vreg; |
| 279 | */ | 302 | |
| 280 | err |= __copy_from_user(fpsimd.vregs, frame->ufp.fpregs, | 303 | __get_user_error(vreg.lo, &frame->ufp.fpregs[i], err); |
| 281 | sizeof(frame->ufp.fpregs)); | 304 | __get_user_error(vreg.hi, &frame->ufp.fpregs[i + 1], err); |
| 305 | fpsimd.vregs[i >> 1] = vreg.raw; | ||
| 306 | } | ||
| 282 | 307 | ||
| 283 | /* Extract the fpsr and the fpcr from the fpscr */ | 308 | /* Extract the fpsr and the fpcr from the fpscr */ |
| 284 | __get_user_error(fpscr, &frame->ufp.fpscr, err); | 309 | __get_user_error(fpscr, &frame->ufp.fpscr, err); |
diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 407991bf79f5..ccb6078ed9f2 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c | |||
| @@ -48,11 +48,7 @@ int notrace unwind_frame(struct stackframe *frame) | |||
| 48 | 48 | ||
| 49 | frame->sp = fp + 0x10; | 49 | frame->sp = fp + 0x10; |
| 50 | frame->fp = *(unsigned long *)(fp); | 50 | frame->fp = *(unsigned long *)(fp); |
| 51 | /* | 51 | frame->pc = *(unsigned long *)(fp + 8); |
| 52 | * -4 here because we care about the PC at time of bl, | ||
| 53 | * not where the return will go. | ||
| 54 | */ | ||
| 55 | frame->pc = *(unsigned long *)(fp + 8) - 4; | ||
| 56 | 52 | ||
| 57 | return 0; | 53 | return 0; |
| 58 | } | 54 | } |
diff --git a/arch/arm64/kernel/suspend.c b/arch/arm64/kernel/suspend.c index 8297d502217e..44ca4143b013 100644 --- a/arch/arm64/kernel/suspend.c +++ b/arch/arm64/kernel/suspend.c | |||
| @@ -80,17 +80,21 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) | |||
| 80 | if (ret == 0) { | 80 | if (ret == 0) { |
| 81 | /* | 81 | /* |
| 82 | * We are resuming from reset with TTBR0_EL1 set to the | 82 | * We are resuming from reset with TTBR0_EL1 set to the |
| 83 | * idmap to enable the MMU; restore the active_mm mappings in | 83 | * idmap to enable the MMU; set the TTBR0 to the reserved |
| 84 | * TTBR0_EL1 unless the active_mm == &init_mm, in which case | 84 | * page tables to prevent speculative TLB allocations, flush |
| 85 | * the thread entered cpu_suspend with TTBR0_EL1 set to | 85 | * the local tlb and set the default tcr_el1.t0sz so that |
| 86 | * reserved TTBR0 page tables and should be restored as such. | 86 | * the TTBR0 address space set-up is properly restored. |
| 87 | * If the current active_mm != &init_mm we entered cpu_suspend | ||
| 88 | * with mappings in TTBR0 that must be restored, so we switch | ||
| 89 | * them back to complete the address space configuration | ||
| 90 | * restoration before returning. | ||
| 87 | */ | 91 | */ |
| 88 | if (mm == &init_mm) | 92 | cpu_set_reserved_ttbr0(); |
| 89 | cpu_set_reserved_ttbr0(); | ||
| 90 | else | ||
| 91 | cpu_switch_mm(mm->pgd, mm); | ||
| 92 | |||
| 93 | flush_tlb_all(); | 93 | flush_tlb_all(); |
| 94 | cpu_set_default_tcr_t0sz(); | ||
| 95 | |||
| 96 | if (mm != &init_mm) | ||
| 97 | cpu_switch_mm(mm->pgd, mm); | ||
| 94 | 98 | ||
| 95 | /* | 99 | /* |
| 96 | * Restore per-cpu offset before any kernel | 100 | * Restore per-cpu offset before any kernel |
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig index bfffe8f4bd53..5c7e920e4861 100644 --- a/arch/arm64/kvm/Kconfig +++ b/arch/arm64/kvm/Kconfig | |||
| @@ -41,15 +41,4 @@ config KVM_ARM_HOST | |||
| 41 | ---help--- | 41 | ---help--- |
| 42 | Provides host support for ARM processors. | 42 | Provides host support for ARM processors. |
| 43 | 43 | ||
| 44 | config KVM_ARM_MAX_VCPUS | ||
| 45 | int "Number maximum supported virtual CPUs per VM" | ||
| 46 | depends on KVM_ARM_HOST | ||
| 47 | default 4 | ||
| 48 | help | ||
| 49 | Static number of max supported virtual CPUs per VM. | ||
| 50 | |||
| 51 | If you choose a high number, the vcpu structures will be quite | ||
| 52 | large, so only choose a reasonable number that you expect to | ||
| 53 | actually use. | ||
| 54 | |||
| 55 | endif # VIRTUALIZATION | 44 | endif # VIRTUALIZATION |
diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index 37c89ea2c572..e5836138ec42 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S | |||
| @@ -433,20 +433,13 @@ | |||
| 433 | mrs x5, ifsr32_el2 | 433 | mrs x5, ifsr32_el2 |
| 434 | stp x4, x5, [x3] | 434 | stp x4, x5, [x3] |
| 435 | 435 | ||
| 436 | skip_fpsimd_state x8, 3f | 436 | skip_fpsimd_state x8, 2f |
| 437 | mrs x6, fpexc32_el2 | 437 | mrs x6, fpexc32_el2 |
| 438 | str x6, [x3, #16] | 438 | str x6, [x3, #16] |
| 439 | 3: | 439 | 2: |
| 440 | skip_debug_state x8, 2f | 440 | skip_debug_state x8, 1f |
| 441 | mrs x7, dbgvcr32_el2 | 441 | mrs x7, dbgvcr32_el2 |
| 442 | str x7, [x3, #24] | 442 | str x7, [x3, #24] |
| 443 | 2: | ||
| 444 | skip_tee_state x8, 1f | ||
| 445 | |||
| 446 | add x3, x2, #CPU_SYSREG_OFFSET(TEECR32_EL1) | ||
| 447 | mrs x4, teecr32_el1 | ||
| 448 | mrs x5, teehbr32_el1 | ||
| 449 | stp x4, x5, [x3] | ||
| 450 | 1: | 443 | 1: |
| 451 | .endm | 444 | .endm |
| 452 | 445 | ||
| @@ -466,16 +459,9 @@ | |||
| 466 | msr dacr32_el2, x4 | 459 | msr dacr32_el2, x4 |
| 467 | msr ifsr32_el2, x5 | 460 | msr ifsr32_el2, x5 |
| 468 | 461 | ||
| 469 | skip_debug_state x8, 2f | 462 | skip_debug_state x8, 1f |
| 470 | ldr x7, [x3, #24] | 463 | ldr x7, [x3, #24] |
| 471 | msr dbgvcr32_el2, x7 | 464 | msr dbgvcr32_el2, x7 |
| 472 | 2: | ||
| 473 | skip_tee_state x8, 1f | ||
| 474 | |||
| 475 | add x3, x2, #CPU_SYSREG_OFFSET(TEECR32_EL1) | ||
| 476 | ldp x4, x5, [x3] | ||
| 477 | msr teecr32_el1, x4 | ||
| 478 | msr teehbr32_el1, x5 | ||
| 479 | 1: | 465 | 1: |
| 480 | .endm | 466 | .endm |
| 481 | 467 | ||
| @@ -570,8 +556,6 @@ alternative_endif | |||
| 570 | mrs x3, cntv_ctl_el0 | 556 | mrs x3, cntv_ctl_el0 |
| 571 | and x3, x3, #3 | 557 | and x3, x3, #3 |
| 572 | str w3, [x0, #VCPU_TIMER_CNTV_CTL] | 558 | str w3, [x0, #VCPU_TIMER_CNTV_CTL] |
| 573 | bic x3, x3, #1 // Clear Enable | ||
| 574 | msr cntv_ctl_el0, x3 | ||
| 575 | 559 | ||
| 576 | isb | 560 | isb |
| 577 | 561 | ||
| @@ -579,6 +563,9 @@ alternative_endif | |||
| 579 | str x3, [x0, #VCPU_TIMER_CNTV_CVAL] | 563 | str x3, [x0, #VCPU_TIMER_CNTV_CVAL] |
| 580 | 564 | ||
| 581 | 1: | 565 | 1: |
| 566 | // Disable the virtual timer | ||
| 567 | msr cntv_ctl_el0, xzr | ||
| 568 | |||
| 582 | // Allow physical timer/counter access for the host | 569 | // Allow physical timer/counter access for the host |
| 583 | mrs x2, cnthctl_el2 | 570 | mrs x2, cnthctl_el2 |
| 584 | orr x2, x2, #3 | 571 | orr x2, x2, #3 |
| @@ -753,6 +740,9 @@ ENTRY(__kvm_vcpu_run) | |||
| 753 | // Guest context | 740 | // Guest context |
| 754 | add x2, x0, #VCPU_CONTEXT | 741 | add x2, x0, #VCPU_CONTEXT |
| 755 | 742 | ||
| 743 | // We must restore the 32-bit state before the sysregs, thanks | ||
| 744 | // to Cortex-A57 erratum #852523. | ||
| 745 | restore_guest_32bit_state | ||
| 756 | bl __restore_sysregs | 746 | bl __restore_sysregs |
| 757 | 747 | ||
| 758 | skip_debug_state x3, 1f | 748 | skip_debug_state x3, 1f |
| @@ -760,7 +750,6 @@ ENTRY(__kvm_vcpu_run) | |||
| 760 | kern_hyp_va x3 | 750 | kern_hyp_va x3 |
| 761 | bl __restore_debug | 751 | bl __restore_debug |
| 762 | 1: | 752 | 1: |
| 763 | restore_guest_32bit_state | ||
| 764 | restore_guest_regs | 753 | restore_guest_regs |
| 765 | 754 | ||
| 766 | // That's it, no more messing around. | 755 | // That's it, no more messing around. |
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index b41607d270ac..d03d3af17e7e 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c | |||
| @@ -272,7 +272,7 @@ static int set_bvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd, | |||
| 272 | { | 272 | { |
| 273 | __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bvr[rd->reg]; | 273 | __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bvr[rd->reg]; |
| 274 | 274 | ||
| 275 | if (copy_from_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0) | 275 | if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0) |
| 276 | return -EFAULT; | 276 | return -EFAULT; |
| 277 | return 0; | 277 | return 0; |
| 278 | } | 278 | } |
| @@ -314,7 +314,7 @@ static int set_bcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd, | |||
| 314 | { | 314 | { |
| 315 | __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bcr[rd->reg]; | 315 | __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_bcr[rd->reg]; |
| 316 | 316 | ||
| 317 | if (copy_from_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0) | 317 | if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0) |
| 318 | return -EFAULT; | 318 | return -EFAULT; |
| 319 | 319 | ||
| 320 | return 0; | 320 | return 0; |
| @@ -358,7 +358,7 @@ static int set_wvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd, | |||
| 358 | { | 358 | { |
| 359 | __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wvr[rd->reg]; | 359 | __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wvr[rd->reg]; |
| 360 | 360 | ||
| 361 | if (copy_from_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0) | 361 | if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0) |
| 362 | return -EFAULT; | 362 | return -EFAULT; |
| 363 | return 0; | 363 | return 0; |
| 364 | } | 364 | } |
| @@ -400,7 +400,7 @@ static int set_wcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd, | |||
| 400 | { | 400 | { |
| 401 | __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wcr[rd->reg]; | 401 | __u64 *r = &vcpu->arch.vcpu_debug_state.dbg_wcr[rd->reg]; |
| 402 | 402 | ||
| 403 | if (copy_from_user(uaddr, r, KVM_REG_SIZE(reg->id)) != 0) | 403 | if (copy_from_user(r, uaddr, KVM_REG_SIZE(reg->id)) != 0) |
| 404 | return -EFAULT; | 404 | return -EFAULT; |
| 405 | return 0; | 405 | return 0; |
| 406 | } | 406 | } |
| @@ -539,13 +539,6 @@ static const struct sys_reg_desc sys_reg_descs[] = { | |||
| 539 | { Op0(0b10), Op1(0b000), CRn(0b0111), CRm(0b1110), Op2(0b110), | 539 | { Op0(0b10), Op1(0b000), CRn(0b0111), CRm(0b1110), Op2(0b110), |
| 540 | trap_dbgauthstatus_el1 }, | 540 | trap_dbgauthstatus_el1 }, |
| 541 | 541 | ||
| 542 | /* TEECR32_EL1 */ | ||
| 543 | { Op0(0b10), Op1(0b010), CRn(0b0000), CRm(0b0000), Op2(0b000), | ||
| 544 | NULL, reset_val, TEECR32_EL1, 0 }, | ||
| 545 | /* TEEHBR32_EL1 */ | ||
| 546 | { Op0(0b10), Op1(0b010), CRn(0b0001), CRm(0b0000), Op2(0b000), | ||
| 547 | NULL, reset_val, TEEHBR32_EL1, 0 }, | ||
| 548 | |||
| 549 | /* MDCCSR_EL1 */ | 542 | /* MDCCSR_EL1 */ |
| 550 | { Op0(0b10), Op1(0b011), CRn(0b0000), CRm(0b0001), Op2(0b000), | 543 | { Op0(0b10), Op1(0b011), CRn(0b0000), CRm(0b0001), Op2(0b000), |
| 551 | trap_raz_wi }, | 544 | trap_raz_wi }, |
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 0bcc4bc94b4a..99224dcebdc5 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c | |||
| @@ -100,7 +100,7 @@ static void *__dma_alloc_coherent(struct device *dev, size_t size, | |||
| 100 | if (IS_ENABLED(CONFIG_ZONE_DMA) && | 100 | if (IS_ENABLED(CONFIG_ZONE_DMA) && |
| 101 | dev->coherent_dma_mask <= DMA_BIT_MASK(32)) | 101 | dev->coherent_dma_mask <= DMA_BIT_MASK(32)) |
| 102 | flags |= GFP_DMA; | 102 | flags |= GFP_DMA; |
| 103 | if (IS_ENABLED(CONFIG_DMA_CMA) && (flags & __GFP_WAIT)) { | 103 | if (dev_get_cma_area(dev) && (flags & __GFP_WAIT)) { |
| 104 | struct page *page; | 104 | struct page *page; |
| 105 | void *addr; | 105 | void *addr; |
| 106 | 106 | ||
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index aba9ead1384c..9fadf6d7039b 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
| @@ -287,6 +287,7 @@ retry: | |||
| 287 | * starvation. | 287 | * starvation. |
| 288 | */ | 288 | */ |
| 289 | mm_flags &= ~FAULT_FLAG_ALLOW_RETRY; | 289 | mm_flags &= ~FAULT_FLAG_ALLOW_RETRY; |
| 290 | mm_flags |= FAULT_FLAG_TRIED; | ||
| 290 | goto retry; | 291 | goto retry; |
| 291 | } | 292 | } |
| 292 | } | 293 | } |
diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index f61f2dd67464..241b9b9729d8 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild | |||
| @@ -20,4 +20,5 @@ generic-y += sections.h | |||
| 20 | generic-y += topology.h | 20 | generic-y += topology.h |
| 21 | generic-y += trace_clock.h | 21 | generic-y += trace_clock.h |
| 22 | generic-y += vga.h | 22 | generic-y += vga.h |
| 23 | generic-y += word-at-a-time.h | ||
| 23 | generic-y += xor.h | 24 | generic-y += xor.h |
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index d51ff8f1c541..96cabad68489 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
| @@ -144,7 +144,7 @@ static struct irq_chip eic_chip = { | |||
| 144 | .irq_set_type = eic_set_irq_type, | 144 | .irq_set_type = eic_set_irq_type, |
| 145 | }; | 145 | }; |
| 146 | 146 | ||
| 147 | static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) | 147 | static void demux_eic_irq(struct irq_desc *desc) |
| 148 | { | 148 | { |
| 149 | struct eic *eic = irq_desc_get_handler_data(desc); | 149 | struct eic *eic = irq_desc_get_handler_data(desc); |
| 150 | unsigned long status, pending; | 150 | unsigned long status, pending; |
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index 157a5e0e789f..4f61378c3453 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
| @@ -281,7 +281,7 @@ static struct irq_chip gpio_irqchip = { | |||
| 281 | .irq_set_type = gpio_irq_type, | 281 | .irq_set_type = gpio_irq_type, |
| 282 | }; | 282 | }; |
| 283 | 283 | ||
| 284 | static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | 284 | static void gpio_irq_handler(struct irq_desc *desc) |
| 285 | { | 285 | { |
| 286 | struct pio_device *pio = irq_desc_get_chip_data(desc); | 286 | struct pio_device *pio = irq_desc_get_chip_data(desc); |
| 287 | unsigned gpio_irq; | 287 | unsigned gpio_irq; |
diff --git a/arch/blackfin/include/asm/Kbuild b/arch/blackfin/include/asm/Kbuild index 61cd1e786a14..91d49c0a3118 100644 --- a/arch/blackfin/include/asm/Kbuild +++ b/arch/blackfin/include/asm/Kbuild | |||
| @@ -46,4 +46,5 @@ generic-y += types.h | |||
| 46 | generic-y += ucontext.h | 46 | generic-y += ucontext.h |
| 47 | generic-y += unaligned.h | 47 | generic-y += unaligned.h |
| 48 | generic-y += user.h | 48 | generic-y += user.h |
| 49 | generic-y += word-at-a-time.h | ||
| 49 | generic-y += xor.h | 50 | generic-y += xor.h |
diff --git a/arch/blackfin/include/asm/irq_handler.h b/arch/blackfin/include/asm/irq_handler.h index 4b2a992794d7..d2f90c72378e 100644 --- a/arch/blackfin/include/asm/irq_handler.h +++ b/arch/blackfin/include/asm/irq_handler.h | |||
| @@ -60,7 +60,7 @@ extern void bfin_internal_mask_irq(unsigned int irq); | |||
| 60 | extern void bfin_internal_unmask_irq(unsigned int irq); | 60 | extern void bfin_internal_unmask_irq(unsigned int irq); |
| 61 | 61 | ||
| 62 | struct irq_desc; | 62 | struct irq_desc; |
| 63 | extern void bfin_demux_mac_status_irq(unsigned int, struct irq_desc *); | 63 | extern void bfin_demux_mac_status_irq(struct irq_desc *); |
| 64 | extern void bfin_demux_gpio_irq(unsigned int, struct irq_desc *); | 64 | extern void bfin_demux_gpio_irq(struct irq_desc *); |
| 65 | 65 | ||
| 66 | #endif | 66 | #endif |
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c index 0ba25764b8c0..052cde5ed2e4 100644 --- a/arch/blackfin/kernel/irqchip.c +++ b/arch/blackfin/kernel/irqchip.c | |||
| @@ -107,7 +107,7 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) | |||
| 107 | * than crashing, do something sensible. | 107 | * than crashing, do something sensible. |
| 108 | */ | 108 | */ |
| 109 | if (irq >= NR_IRQS) | 109 | if (irq >= NR_IRQS) |
| 110 | handle_bad_irq(irq, &bad_irq_desc); | 110 | handle_bad_irq(&bad_irq_desc); |
| 111 | else | 111 | else |
| 112 | generic_handle_irq(irq); | 112 | generic_handle_irq(irq); |
| 113 | 113 | ||
diff --git a/arch/blackfin/mach-bf537/ints-priority.c b/arch/blackfin/mach-bf537/ints-priority.c index 14b2f74554dc..a48baae4384d 100644 --- a/arch/blackfin/mach-bf537/ints-priority.c +++ b/arch/blackfin/mach-bf537/ints-priority.c | |||
| @@ -89,8 +89,7 @@ static struct irq_chip bf537_generic_error_irqchip = { | |||
| 89 | .irq_unmask = bf537_generic_error_unmask_irq, | 89 | .irq_unmask = bf537_generic_error_unmask_irq, |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| 92 | static void bf537_demux_error_irq(unsigned int int_err_irq, | 92 | static void bf537_demux_error_irq(struct irq_desc *inta_desc) |
| 93 | struct irq_desc *inta_desc) | ||
| 94 | { | 93 | { |
| 95 | int irq = 0; | 94 | int irq = 0; |
| 96 | 95 | ||
| @@ -182,15 +181,12 @@ static struct irq_chip bf537_mac_rx_irqchip = { | |||
| 182 | .irq_unmask = bf537_mac_rx_unmask_irq, | 181 | .irq_unmask = bf537_mac_rx_unmask_irq, |
| 183 | }; | 182 | }; |
| 184 | 183 | ||
| 185 | static void bf537_demux_mac_rx_irq(unsigned int __int_irq, | 184 | static void bf537_demux_mac_rx_irq(struct irq_desc *desc) |
| 186 | struct irq_desc *desc) | ||
| 187 | { | 185 | { |
| 188 | unsigned int int_irq = irq_desc_get_irq(desc); | ||
| 189 | |||
| 190 | if (bfin_read_DMA1_IRQ_STATUS() & (DMA_DONE | DMA_ERR)) | 186 | if (bfin_read_DMA1_IRQ_STATUS() & (DMA_DONE | DMA_ERR)) |
| 191 | bfin_handle_irq(IRQ_MAC_RX); | 187 | bfin_handle_irq(IRQ_MAC_RX); |
| 192 | else | 188 | else |
| 193 | bfin_demux_gpio_irq(int_irq, desc); | 189 | bfin_demux_gpio_irq(desc); |
| 194 | } | 190 | } |
| 195 | #endif | 191 | #endif |
| 196 | 192 | ||
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index a6d1b03cdf36..e8d4d748d0fd 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
| @@ -656,8 +656,7 @@ static struct irq_chip bfin_mac_status_irqchip = { | |||
| 656 | .irq_set_wake = bfin_mac_status_set_wake, | 656 | .irq_set_wake = bfin_mac_status_set_wake, |
| 657 | }; | 657 | }; |
| 658 | 658 | ||
| 659 | void bfin_demux_mac_status_irq(unsigned int int_err_irq, | 659 | void bfin_demux_mac_status_irq(struct irq_desc *inta_desc) |
| 660 | struct irq_desc *inta_desc) | ||
| 661 | { | 660 | { |
| 662 | int i, irq = 0; | 661 | int i, irq = 0; |
| 663 | u32 status = bfin_read_EMAC_SYSTAT(); | 662 | u32 status = bfin_read_EMAC_SYSTAT(); |
| @@ -825,7 +824,7 @@ static void bfin_demux_gpio_block(unsigned int irq) | |||
| 825 | } | 824 | } |
| 826 | } | 825 | } |
| 827 | 826 | ||
| 828 | void bfin_demux_gpio_irq(unsigned int __inta_irq, struct irq_desc *desc) | 827 | void bfin_demux_gpio_irq(struct irq_desc *desc) |
| 829 | { | 828 | { |
| 830 | unsigned int inta_irq = irq_desc_get_irq(desc); | 829 | unsigned int inta_irq = irq_desc_get_irq(desc); |
| 831 | unsigned int irq; | 830 | unsigned int irq; |
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index f17c4dc6050c..945544ec603e 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild | |||
| @@ -59,4 +59,5 @@ generic-y += types.h | |||
| 59 | generic-y += ucontext.h | 59 | generic-y += ucontext.h |
| 60 | generic-y += user.h | 60 | generic-y += user.h |
| 61 | generic-y += vga.h | 61 | generic-y += vga.h |
| 62 | generic-y += word-at-a-time.h | ||
| 62 | generic-y += xor.h | 63 | generic-y += xor.h |
diff --git a/arch/c6x/platforms/megamod-pic.c b/arch/c6x/platforms/megamod-pic.c index d487698e978a..ddcb45d7dfa7 100644 --- a/arch/c6x/platforms/megamod-pic.c +++ b/arch/c6x/platforms/megamod-pic.c | |||
| @@ -93,7 +93,7 @@ static struct irq_chip megamod_chip = { | |||
| 93 | .irq_unmask = unmask_megamod, | 93 | .irq_unmask = unmask_megamod, |
| 94 | }; | 94 | }; |
| 95 | 95 | ||
| 96 | static void megamod_irq_cascade(unsigned int __irq, struct irq_desc *desc) | 96 | static void megamod_irq_cascade(struct irq_desc *desc) |
| 97 | { | 97 | { |
| 98 | struct megamod_cascade_data *cascade; | 98 | struct megamod_cascade_data *cascade; |
| 99 | struct megamod_pic *pic; | 99 | struct megamod_pic *pic; |
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index b7f68192d15b..1778805f6380 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild | |||
| @@ -43,4 +43,5 @@ generic-y += topology.h | |||
| 43 | generic-y += trace_clock.h | 43 | generic-y += trace_clock.h |
| 44 | generic-y += types.h | 44 | generic-y += types.h |
| 45 | generic-y += vga.h | 45 | generic-y += vga.h |
| 46 | generic-y += word-at-a-time.h | ||
| 46 | generic-y += xor.h | 47 | generic-y += xor.h |
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index 8e47b832cc76..1fa084cf1a43 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild | |||
| @@ -7,3 +7,4 @@ generic-y += mcs_spinlock.h | |||
| 7 | generic-y += mm-arch-hooks.h | 7 | generic-y += mm-arch-hooks.h |
| 8 | generic-y += preempt.h | 8 | generic-y += preempt.h |
| 9 | generic-y += trace_clock.h | 9 | generic-y += trace_clock.h |
| 10 | generic-y += word-at-a-time.h | ||
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index f9c86c475bbd..f211839e2cae 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c | |||
| @@ -294,6 +294,8 @@ void pcibios_fixup_bus(struct pci_bus *bus) | |||
| 294 | printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number); | 294 | printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number); |
| 295 | #endif | 295 | #endif |
| 296 | 296 | ||
| 297 | pci_read_bridge_bases(bus); | ||
| 298 | |||
| 297 | if (bus->number == 0) { | 299 | if (bus->number == 0) { |
| 298 | struct pci_dev *dev; | 300 | struct pci_dev *dev; |
| 299 | list_for_each_entry(dev, &bus->devices, bus_list) { | 301 | list_for_each_entry(dev, &bus->devices, bus_list) { |
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index 70e6ae1e7006..373cb23301e3 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild | |||
| @@ -73,4 +73,5 @@ generic-y += uaccess.h | |||
| 73 | generic-y += ucontext.h | 73 | generic-y += ucontext.h |
| 74 | generic-y += unaligned.h | 74 | generic-y += unaligned.h |
| 75 | generic-y += vga.h | 75 | generic-y += vga.h |
| 76 | generic-y += word-at-a-time.h | ||
| 76 | generic-y += xor.h | 77 | generic-y += xor.h |
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index daee37bd0999..db8ddabc6bd2 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild | |||
| @@ -58,4 +58,5 @@ generic-y += types.h | |||
| 58 | generic-y += ucontext.h | 58 | generic-y += ucontext.h |
| 59 | generic-y += unaligned.h | 59 | generic-y += unaligned.h |
| 60 | generic-y += vga.h | 60 | generic-y += vga.h |
| 61 | generic-y += word-at-a-time.h | ||
| 61 | generic-y += xor.h | 62 | generic-y += xor.h |
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild index 9de3ba12f6b9..502a91d8dbbd 100644 --- a/arch/ia64/include/asm/Kbuild +++ b/arch/ia64/include/asm/Kbuild | |||
| @@ -8,3 +8,4 @@ generic-y += mm-arch-hooks.h | |||
| 8 | generic-y += preempt.h | 8 | generic-y += preempt.h |
| 9 | generic-y += trace_clock.h | 9 | generic-y += trace_clock.h |
| 10 | generic-y += vtime.h | 10 | generic-y += vtime.h |
| 11 | generic-y += word-at-a-time.h | ||
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h index 95c39b95e97e..db73390568c8 100644 --- a/arch/ia64/include/asm/unistd.h +++ b/arch/ia64/include/asm/unistd.h | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | #define NR_syscalls 319 /* length of syscall table */ | 14 | #define NR_syscalls 322 /* length of syscall table */ |
| 15 | 15 | ||
| 16 | /* | 16 | /* |
| 17 | * The following defines stop scripts/checksyscalls.sh from complaining about | 17 | * The following defines stop scripts/checksyscalls.sh from complaining about |
diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h index 461079560c78..9038726e7d26 100644 --- a/arch/ia64/include/uapi/asm/unistd.h +++ b/arch/ia64/include/uapi/asm/unistd.h | |||
| @@ -332,5 +332,8 @@ | |||
| 332 | #define __NR_memfd_create 1340 | 332 | #define __NR_memfd_create 1340 |
| 333 | #define __NR_bpf 1341 | 333 | #define __NR_bpf 1341 |
| 334 | #define __NR_execveat 1342 | 334 | #define __NR_execveat 1342 |
| 335 | #define __NR_userfaultfd 1343 | ||
| 336 | #define __NR_membarrier 1344 | ||
| 337 | #define __NR_kcmp 1345 | ||
| 335 | 338 | ||
| 336 | #endif /* _UAPI_ASM_IA64_UNISTD_H */ | 339 | #endif /* _UAPI_ASM_IA64_UNISTD_H */ |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index ae0de7bf5525..dcd97f84d065 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
| @@ -1768,5 +1768,8 @@ sys_call_table: | |||
| 1768 | data8 sys_memfd_create // 1340 | 1768 | data8 sys_memfd_create // 1340 |
| 1769 | data8 sys_bpf | 1769 | data8 sys_bpf |
| 1770 | data8 sys_execveat | 1770 | data8 sys_execveat |
| 1771 | data8 sys_userfaultfd | ||
| 1772 | data8 sys_membarrier | ||
| 1773 | data8 sys_kcmp // 1345 | ||
| 1771 | 1774 | ||
| 1772 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls | 1775 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index d89b6013c941..7cc3be9fa7c6 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
| @@ -533,9 +533,10 @@ void pcibios_fixup_bus(struct pci_bus *b) | |||
| 533 | { | 533 | { |
| 534 | struct pci_dev *dev; | 534 | struct pci_dev *dev; |
| 535 | 535 | ||
| 536 | if (b->self) | 536 | if (b->self) { |
| 537 | pci_read_bridge_bases(b); | ||
| 537 | pcibios_fixup_bridge_resources(b->self); | 538 | pcibios_fixup_bridge_resources(b->self); |
| 538 | 539 | } | |
| 539 | list_for_each_entry(dev, &b->devices, bus_list) | 540 | list_for_each_entry(dev, &b->devices, bus_list) |
| 540 | pcibios_fixup_device_resources(dev); | 541 | pcibios_fixup_device_resources(dev); |
| 541 | platform_pci_fixup_bus(b); | 542 | platform_pci_fixup_bus(b); |
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index e0eb704ca1fa..fd104bd221ce 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild | |||
| @@ -9,3 +9,4 @@ generic-y += module.h | |||
| 9 | generic-y += preempt.h | 9 | generic-y += preempt.h |
| 10 | generic-y += sections.h | 10 | generic-y += sections.h |
| 11 | generic-y += trace_clock.h | 11 | generic-y += trace_clock.h |
| 12 | generic-y += word-at-a-time.h | ||
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index 47b5f90002ab..7ff739e94896 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c | |||
| @@ -46,7 +46,7 @@ static struct irq_chip amiga_irq_chip = { | |||
| 46 | * The builtin Amiga hardware interrupt handlers. | 46 | * The builtin Amiga hardware interrupt handlers. |
| 47 | */ | 47 | */ |
| 48 | 48 | ||
| 49 | static void ami_int1(unsigned int irq, struct irq_desc *desc) | 49 | static void ami_int1(struct irq_desc *desc) |
| 50 | { | 50 | { |
| 51 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 51 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
| 52 | 52 | ||
| @@ -69,7 +69,7 @@ static void ami_int1(unsigned int irq, struct irq_desc *desc) | |||
| 69 | } | 69 | } |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | static void ami_int3(unsigned int irq, struct irq_desc *desc) | 72 | static void ami_int3(struct irq_desc *desc) |
| 73 | { | 73 | { |
| 74 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 74 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
| 75 | 75 | ||
| @@ -92,7 +92,7 @@ static void ami_int3(unsigned int irq, struct irq_desc *desc) | |||
| 92 | } | 92 | } |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | static void ami_int4(unsigned int irq, struct irq_desc *desc) | 95 | static void ami_int4(struct irq_desc *desc) |
| 96 | { | 96 | { |
| 97 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 97 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
| 98 | 98 | ||
| @@ -121,7 +121,7 @@ static void ami_int4(unsigned int irq, struct irq_desc *desc) | |||
| 121 | } | 121 | } |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | static void ami_int5(unsigned int irq, struct irq_desc *desc) | 124 | static void ami_int5(struct irq_desc *desc) |
| 125 | { | 125 | { |
| 126 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; | 126 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
| 127 | 127 | ||
diff --git a/arch/m68k/coldfire/intc-5272.c b/arch/m68k/coldfire/intc-5272.c index 47371de60427..b0a19e207a63 100644 --- a/arch/m68k/coldfire/intc-5272.c +++ b/arch/m68k/coldfire/intc-5272.c | |||
| @@ -143,12 +143,10 @@ static int intc_irq_set_type(struct irq_data *d, unsigned int type) | |||
| 143 | * We need to be careful with the masking/acking due to the side effects | 143 | * We need to be careful with the masking/acking due to the side effects |
| 144 | * of masking an interrupt. | 144 | * of masking an interrupt. |
| 145 | */ | 145 | */ |
| 146 | static void intc_external_irq(unsigned int __irq, struct irq_desc *desc) | 146 | static void intc_external_irq(struct irq_desc *desc) |
| 147 | { | 147 | { |
| 148 | unsigned int irq = irq_desc_get_irq(desc); | ||
| 149 | |||
| 150 | irq_desc_get_chip(desc)->irq_ack(&desc->irq_data); | 148 | irq_desc_get_chip(desc)->irq_ack(&desc->irq_data); |
| 151 | handle_simple_irq(irq, desc); | 149 | handle_simple_irq(desc); |
| 152 | } | 150 | } |
| 153 | 151 | ||
| 154 | static struct irq_chip intc_irq_chip = { | 152 | static struct irq_chip intc_irq_chip = { |
diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig index 0b6b40d37b95..5b4ec541ba7c 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -57,7 +58,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 57 | CONFIG_NET_IPGRE=m | 58 | CONFIG_NET_IPGRE=m |
| 58 | CONFIG_NET_IPVTI=m | 59 | CONFIG_NET_IPVTI=m |
| 59 | CONFIG_NET_FOU_IP_TUNNELS=y | 60 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 60 | CONFIG_GENEVE_CORE=m | ||
| 61 | CONFIG_INET_AH=m | 61 | CONFIG_INET_AH=m |
| 62 | CONFIG_INET_ESP=m | 62 | CONFIG_INET_ESP=m |
| 63 | CONFIG_INET_IPCOMP=m | 63 | CONFIG_INET_IPCOMP=m |
| @@ -67,10 +67,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 67 | # CONFIG_INET_LRO is not set | 67 | # CONFIG_INET_LRO is not set |
| 68 | CONFIG_INET_DIAG=m | 68 | CONFIG_INET_DIAG=m |
| 69 | CONFIG_INET_UDP_DIAG=m | 69 | CONFIG_INET_UDP_DIAG=m |
| 70 | CONFIG_IPV6=m | ||
| 70 | CONFIG_IPV6_ROUTER_PREF=y | 71 | CONFIG_IPV6_ROUTER_PREF=y |
| 71 | CONFIG_INET6_AH=m | 72 | CONFIG_INET6_AH=m |
| 72 | CONFIG_INET6_ESP=m | 73 | CONFIG_INET6_ESP=m |
| 73 | CONFIG_INET6_IPCOMP=m | 74 | CONFIG_INET6_IPCOMP=m |
| 75 | CONFIG_IPV6_ILA=m | ||
| 74 | CONFIG_IPV6_VTI=m | 76 | CONFIG_IPV6_VTI=m |
| 75 | CONFIG_IPV6_GRE=m | 77 | CONFIG_IPV6_GRE=m |
| 76 | CONFIG_NETFILTER=y | 78 | CONFIG_NETFILTER=y |
| @@ -179,6 +181,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 179 | CONFIG_IP_SET_LIST_SET=m | 181 | CONFIG_IP_SET_LIST_SET=m |
| 180 | CONFIG_NF_CONNTRACK_IPV4=m | 182 | CONFIG_NF_CONNTRACK_IPV4=m |
| 181 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 183 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 184 | CONFIG_NFT_DUP_IPV4=m | ||
| 182 | CONFIG_NF_TABLES_ARP=m | 185 | CONFIG_NF_TABLES_ARP=m |
| 183 | CONFIG_NF_LOG_ARP=m | 186 | CONFIG_NF_LOG_ARP=m |
| 184 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 187 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -206,6 +209,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 206 | CONFIG_IP_NF_ARP_MANGLE=m | 209 | CONFIG_IP_NF_ARP_MANGLE=m |
| 207 | CONFIG_NF_CONNTRACK_IPV6=m | 210 | CONFIG_NF_CONNTRACK_IPV6=m |
| 208 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 211 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 212 | CONFIG_NFT_DUP_IPV6=m | ||
| 209 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 213 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 210 | CONFIG_NFT_MASQ_IPV6=m | 214 | CONFIG_NFT_MASQ_IPV6=m |
| 211 | CONFIG_NFT_REDIR_IPV6=m | 215 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -271,6 +275,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 271 | CONFIG_MPLS=y | 275 | CONFIG_MPLS=y |
| 272 | CONFIG_NET_MPLS_GSO=m | 276 | CONFIG_NET_MPLS_GSO=m |
| 273 | CONFIG_MPLS_ROUTING=m | 277 | CONFIG_MPLS_ROUTING=m |
| 278 | CONFIG_MPLS_IPTUNNEL=m | ||
| 274 | # CONFIG_WIRELESS is not set | 279 | # CONFIG_WIRELESS is not set |
| 275 | # CONFIG_UEVENT_HELPER is not set | 280 | # CONFIG_UEVENT_HELPER is not set |
| 276 | CONFIG_DEVTMPFS=y | 281 | CONFIG_DEVTMPFS=y |
| @@ -370,6 +375,7 @@ CONFIG_ZORRO8390=y | |||
| 370 | # CONFIG_NET_VENDOR_SEEQ is not set | 375 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 371 | # CONFIG_NET_VENDOR_SMSC is not set | 376 | # CONFIG_NET_VENDOR_SMSC is not set |
| 372 | # CONFIG_NET_VENDOR_STMICRO is not set | 377 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 378 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 373 | # CONFIG_NET_VENDOR_VIA is not set | 379 | # CONFIG_NET_VENDOR_VIA is not set |
| 374 | # CONFIG_NET_VENDOR_WIZNET is not set | 380 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 375 | CONFIG_PPP=m | 381 | CONFIG_PPP=m |
| @@ -537,6 +543,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 537 | CONFIG_TEST_BPF=m | 543 | CONFIG_TEST_BPF=m |
| 538 | CONFIG_TEST_FIRMWARE=m | 544 | CONFIG_TEST_FIRMWARE=m |
| 539 | CONFIG_TEST_UDELAY=m | 545 | CONFIG_TEST_UDELAY=m |
| 546 | CONFIG_TEST_STATIC_KEYS=m | ||
| 540 | CONFIG_EARLY_PRINTK=y | 547 | CONFIG_EARLY_PRINTK=y |
| 541 | CONFIG_ENCRYPTED_KEYS=m | 548 | CONFIG_ENCRYPTED_KEYS=m |
| 542 | CONFIG_CRYPTO_RSA=m | 549 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig index eeb3a8991fc4..6e5198e2c124 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -55,7 +56,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 55 | CONFIG_NET_IPGRE=m | 56 | CONFIG_NET_IPGRE=m |
| 56 | CONFIG_NET_IPVTI=m | 57 | CONFIG_NET_IPVTI=m |
| 57 | CONFIG_NET_FOU_IP_TUNNELS=y | 58 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 58 | CONFIG_GENEVE_CORE=m | ||
| 59 | CONFIG_INET_AH=m | 59 | CONFIG_INET_AH=m |
| 60 | CONFIG_INET_ESP=m | 60 | CONFIG_INET_ESP=m |
| 61 | CONFIG_INET_IPCOMP=m | 61 | CONFIG_INET_IPCOMP=m |
| @@ -65,10 +65,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 65 | # CONFIG_INET_LRO is not set | 65 | # CONFIG_INET_LRO is not set |
| 66 | CONFIG_INET_DIAG=m | 66 | CONFIG_INET_DIAG=m |
| 67 | CONFIG_INET_UDP_DIAG=m | 67 | CONFIG_INET_UDP_DIAG=m |
| 68 | CONFIG_IPV6=m | ||
| 68 | CONFIG_IPV6_ROUTER_PREF=y | 69 | CONFIG_IPV6_ROUTER_PREF=y |
| 69 | CONFIG_INET6_AH=m | 70 | CONFIG_INET6_AH=m |
| 70 | CONFIG_INET6_ESP=m | 71 | CONFIG_INET6_ESP=m |
| 71 | CONFIG_INET6_IPCOMP=m | 72 | CONFIG_INET6_IPCOMP=m |
| 73 | CONFIG_IPV6_ILA=m | ||
| 72 | CONFIG_IPV6_VTI=m | 74 | CONFIG_IPV6_VTI=m |
| 73 | CONFIG_IPV6_GRE=m | 75 | CONFIG_IPV6_GRE=m |
| 74 | CONFIG_NETFILTER=y | 76 | CONFIG_NETFILTER=y |
| @@ -177,6 +179,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 177 | CONFIG_IP_SET_LIST_SET=m | 179 | CONFIG_IP_SET_LIST_SET=m |
| 178 | CONFIG_NF_CONNTRACK_IPV4=m | 180 | CONFIG_NF_CONNTRACK_IPV4=m |
| 179 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 181 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 182 | CONFIG_NFT_DUP_IPV4=m | ||
| 180 | CONFIG_NF_TABLES_ARP=m | 183 | CONFIG_NF_TABLES_ARP=m |
| 181 | CONFIG_NF_LOG_ARP=m | 184 | CONFIG_NF_LOG_ARP=m |
| 182 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 185 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -204,6 +207,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 204 | CONFIG_IP_NF_ARP_MANGLE=m | 207 | CONFIG_IP_NF_ARP_MANGLE=m |
| 205 | CONFIG_NF_CONNTRACK_IPV6=m | 208 | CONFIG_NF_CONNTRACK_IPV6=m |
| 206 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 209 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 210 | CONFIG_NFT_DUP_IPV6=m | ||
| 207 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 211 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 208 | CONFIG_NFT_MASQ_IPV6=m | 212 | CONFIG_NFT_MASQ_IPV6=m |
| 209 | CONFIG_NFT_REDIR_IPV6=m | 213 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -269,6 +273,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 269 | CONFIG_MPLS=y | 273 | CONFIG_MPLS=y |
| 270 | CONFIG_NET_MPLS_GSO=m | 274 | CONFIG_NET_MPLS_GSO=m |
| 271 | CONFIG_MPLS_ROUTING=m | 275 | CONFIG_MPLS_ROUTING=m |
| 276 | CONFIG_MPLS_IPTUNNEL=m | ||
| 272 | # CONFIG_WIRELESS is not set | 277 | # CONFIG_WIRELESS is not set |
| 273 | # CONFIG_UEVENT_HELPER is not set | 278 | # CONFIG_UEVENT_HELPER is not set |
| 274 | CONFIG_DEVTMPFS=y | 279 | CONFIG_DEVTMPFS=y |
| @@ -344,6 +349,7 @@ CONFIG_VETH=m | |||
| 344 | # CONFIG_NET_VENDOR_SAMSUNG is not set | 349 | # CONFIG_NET_VENDOR_SAMSUNG is not set |
| 345 | # CONFIG_NET_VENDOR_SEEQ is not set | 350 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 346 | # CONFIG_NET_VENDOR_STMICRO is not set | 351 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 352 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 347 | # CONFIG_NET_VENDOR_VIA is not set | 353 | # CONFIG_NET_VENDOR_VIA is not set |
| 348 | # CONFIG_NET_VENDOR_WIZNET is not set | 354 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 349 | CONFIG_PPP=m | 355 | CONFIG_PPP=m |
| @@ -495,6 +501,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 495 | CONFIG_TEST_BPF=m | 501 | CONFIG_TEST_BPF=m |
| 496 | CONFIG_TEST_FIRMWARE=m | 502 | CONFIG_TEST_FIRMWARE=m |
| 497 | CONFIG_TEST_UDELAY=m | 503 | CONFIG_TEST_UDELAY=m |
| 504 | CONFIG_TEST_STATIC_KEYS=m | ||
| 498 | CONFIG_EARLY_PRINTK=y | 505 | CONFIG_EARLY_PRINTK=y |
| 499 | CONFIG_ENCRYPTED_KEYS=m | 506 | CONFIG_ENCRYPTED_KEYS=m |
| 500 | CONFIG_CRYPTO_RSA=m | 507 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig index 3a7006654ce9..f75600b0ca23 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -55,7 +56,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 55 | CONFIG_NET_IPGRE=m | 56 | CONFIG_NET_IPGRE=m |
| 56 | CONFIG_NET_IPVTI=m | 57 | CONFIG_NET_IPVTI=m |
| 57 | CONFIG_NET_FOU_IP_TUNNELS=y | 58 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 58 | CONFIG_GENEVE_CORE=m | ||
| 59 | CONFIG_INET_AH=m | 59 | CONFIG_INET_AH=m |
| 60 | CONFIG_INET_ESP=m | 60 | CONFIG_INET_ESP=m |
| 61 | CONFIG_INET_IPCOMP=m | 61 | CONFIG_INET_IPCOMP=m |
| @@ -65,10 +65,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 65 | # CONFIG_INET_LRO is not set | 65 | # CONFIG_INET_LRO is not set |
| 66 | CONFIG_INET_DIAG=m | 66 | CONFIG_INET_DIAG=m |
| 67 | CONFIG_INET_UDP_DIAG=m | 67 | CONFIG_INET_UDP_DIAG=m |
| 68 | CONFIG_IPV6=m | ||
| 68 | CONFIG_IPV6_ROUTER_PREF=y | 69 | CONFIG_IPV6_ROUTER_PREF=y |
| 69 | CONFIG_INET6_AH=m | 70 | CONFIG_INET6_AH=m |
| 70 | CONFIG_INET6_ESP=m | 71 | CONFIG_INET6_ESP=m |
| 71 | CONFIG_INET6_IPCOMP=m | 72 | CONFIG_INET6_IPCOMP=m |
| 73 | CONFIG_IPV6_ILA=m | ||
| 72 | CONFIG_IPV6_VTI=m | 74 | CONFIG_IPV6_VTI=m |
| 73 | CONFIG_IPV6_GRE=m | 75 | CONFIG_IPV6_GRE=m |
| 74 | CONFIG_NETFILTER=y | 76 | CONFIG_NETFILTER=y |
| @@ -177,6 +179,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 177 | CONFIG_IP_SET_LIST_SET=m | 179 | CONFIG_IP_SET_LIST_SET=m |
| 178 | CONFIG_NF_CONNTRACK_IPV4=m | 180 | CONFIG_NF_CONNTRACK_IPV4=m |
| 179 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 181 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 182 | CONFIG_NFT_DUP_IPV4=m | ||
| 180 | CONFIG_NF_TABLES_ARP=m | 183 | CONFIG_NF_TABLES_ARP=m |
| 181 | CONFIG_NF_LOG_ARP=m | 184 | CONFIG_NF_LOG_ARP=m |
| 182 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 185 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -204,6 +207,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 204 | CONFIG_IP_NF_ARP_MANGLE=m | 207 | CONFIG_IP_NF_ARP_MANGLE=m |
| 205 | CONFIG_NF_CONNTRACK_IPV6=m | 208 | CONFIG_NF_CONNTRACK_IPV6=m |
| 206 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 209 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 210 | CONFIG_NFT_DUP_IPV6=m | ||
| 207 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 211 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 208 | CONFIG_NFT_MASQ_IPV6=m | 212 | CONFIG_NFT_MASQ_IPV6=m |
| 209 | CONFIG_NFT_REDIR_IPV6=m | 213 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -269,6 +273,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 269 | CONFIG_MPLS=y | 273 | CONFIG_MPLS=y |
| 270 | CONFIG_NET_MPLS_GSO=m | 274 | CONFIG_NET_MPLS_GSO=m |
| 271 | CONFIG_MPLS_ROUTING=m | 275 | CONFIG_MPLS_ROUTING=m |
| 276 | CONFIG_MPLS_IPTUNNEL=m | ||
| 272 | # CONFIG_WIRELESS is not set | 277 | # CONFIG_WIRELESS is not set |
| 273 | # CONFIG_UEVENT_HELPER is not set | 278 | # CONFIG_UEVENT_HELPER is not set |
| 274 | CONFIG_DEVTMPFS=y | 279 | CONFIG_DEVTMPFS=y |
| @@ -355,6 +360,7 @@ CONFIG_NE2000=y | |||
| 355 | # CONFIG_NET_VENDOR_SEEQ is not set | 360 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 356 | CONFIG_SMC91X=y | 361 | CONFIG_SMC91X=y |
| 357 | # CONFIG_NET_VENDOR_STMICRO is not set | 362 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 363 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 358 | # CONFIG_NET_VENDOR_VIA is not set | 364 | # CONFIG_NET_VENDOR_VIA is not set |
| 359 | # CONFIG_NET_VENDOR_WIZNET is not set | 365 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 360 | CONFIG_PPP=m | 366 | CONFIG_PPP=m |
| @@ -517,6 +523,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 517 | CONFIG_TEST_BPF=m | 523 | CONFIG_TEST_BPF=m |
| 518 | CONFIG_TEST_FIRMWARE=m | 524 | CONFIG_TEST_FIRMWARE=m |
| 519 | CONFIG_TEST_UDELAY=m | 525 | CONFIG_TEST_UDELAY=m |
| 526 | CONFIG_TEST_STATIC_KEYS=m | ||
| 520 | CONFIG_EARLY_PRINTK=y | 527 | CONFIG_EARLY_PRINTK=y |
| 521 | CONFIG_ENCRYPTED_KEYS=m | 528 | CONFIG_ENCRYPTED_KEYS=m |
| 522 | CONFIG_CRYPTO_RSA=m | 529 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig index 0586b323a673..a42d91c389a6 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -53,7 +54,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 53 | CONFIG_NET_IPGRE=m | 54 | CONFIG_NET_IPGRE=m |
| 54 | CONFIG_NET_IPVTI=m | 55 | CONFIG_NET_IPVTI=m |
| 55 | CONFIG_NET_FOU_IP_TUNNELS=y | 56 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 56 | CONFIG_GENEVE_CORE=m | ||
| 57 | CONFIG_INET_AH=m | 57 | CONFIG_INET_AH=m |
| 58 | CONFIG_INET_ESP=m | 58 | CONFIG_INET_ESP=m |
| 59 | CONFIG_INET_IPCOMP=m | 59 | CONFIG_INET_IPCOMP=m |
| @@ -63,10 +63,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 63 | # CONFIG_INET_LRO is not set | 63 | # CONFIG_INET_LRO is not set |
| 64 | CONFIG_INET_DIAG=m | 64 | CONFIG_INET_DIAG=m |
| 65 | CONFIG_INET_UDP_DIAG=m | 65 | CONFIG_INET_UDP_DIAG=m |
| 66 | CONFIG_IPV6=m | ||
| 66 | CONFIG_IPV6_ROUTER_PREF=y | 67 | CONFIG_IPV6_ROUTER_PREF=y |
| 67 | CONFIG_INET6_AH=m | 68 | CONFIG_INET6_AH=m |
| 68 | CONFIG_INET6_ESP=m | 69 | CONFIG_INET6_ESP=m |
| 69 | CONFIG_INET6_IPCOMP=m | 70 | CONFIG_INET6_IPCOMP=m |
| 71 | CONFIG_IPV6_ILA=m | ||
| 70 | CONFIG_IPV6_VTI=m | 72 | CONFIG_IPV6_VTI=m |
| 71 | CONFIG_IPV6_GRE=m | 73 | CONFIG_IPV6_GRE=m |
| 72 | CONFIG_NETFILTER=y | 74 | CONFIG_NETFILTER=y |
| @@ -175,6 +177,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 175 | CONFIG_IP_SET_LIST_SET=m | 177 | CONFIG_IP_SET_LIST_SET=m |
| 176 | CONFIG_NF_CONNTRACK_IPV4=m | 178 | CONFIG_NF_CONNTRACK_IPV4=m |
| 177 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 179 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 180 | CONFIG_NFT_DUP_IPV4=m | ||
| 178 | CONFIG_NF_TABLES_ARP=m | 181 | CONFIG_NF_TABLES_ARP=m |
| 179 | CONFIG_NF_LOG_ARP=m | 182 | CONFIG_NF_LOG_ARP=m |
| 180 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 183 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -202,6 +205,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 202 | CONFIG_IP_NF_ARP_MANGLE=m | 205 | CONFIG_IP_NF_ARP_MANGLE=m |
| 203 | CONFIG_NF_CONNTRACK_IPV6=m | 206 | CONFIG_NF_CONNTRACK_IPV6=m |
| 204 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 207 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 208 | CONFIG_NFT_DUP_IPV6=m | ||
| 205 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 209 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 206 | CONFIG_NFT_MASQ_IPV6=m | 210 | CONFIG_NFT_MASQ_IPV6=m |
| 207 | CONFIG_NFT_REDIR_IPV6=m | 211 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -267,6 +271,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 267 | CONFIG_MPLS=y | 271 | CONFIG_MPLS=y |
| 268 | CONFIG_NET_MPLS_GSO=m | 272 | CONFIG_NET_MPLS_GSO=m |
| 269 | CONFIG_MPLS_ROUTING=m | 273 | CONFIG_MPLS_ROUTING=m |
| 274 | CONFIG_MPLS_IPTUNNEL=m | ||
| 270 | # CONFIG_WIRELESS is not set | 275 | # CONFIG_WIRELESS is not set |
| 271 | # CONFIG_UEVENT_HELPER is not set | 276 | # CONFIG_UEVENT_HELPER is not set |
| 272 | CONFIG_DEVTMPFS=y | 277 | CONFIG_DEVTMPFS=y |
| @@ -343,6 +348,7 @@ CONFIG_BVME6000_NET=y | |||
| 343 | # CONFIG_NET_VENDOR_SAMSUNG is not set | 348 | # CONFIG_NET_VENDOR_SAMSUNG is not set |
| 344 | # CONFIG_NET_VENDOR_SEEQ is not set | 349 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 345 | # CONFIG_NET_VENDOR_STMICRO is not set | 350 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 351 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 346 | # CONFIG_NET_VENDOR_VIA is not set | 352 | # CONFIG_NET_VENDOR_VIA is not set |
| 347 | # CONFIG_NET_VENDOR_WIZNET is not set | 353 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 348 | CONFIG_PPP=m | 354 | CONFIG_PPP=m |
| @@ -488,6 +494,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 488 | CONFIG_TEST_BPF=m | 494 | CONFIG_TEST_BPF=m |
| 489 | CONFIG_TEST_FIRMWARE=m | 495 | CONFIG_TEST_FIRMWARE=m |
| 490 | CONFIG_TEST_UDELAY=m | 496 | CONFIG_TEST_UDELAY=m |
| 497 | CONFIG_TEST_STATIC_KEYS=m | ||
| 491 | CONFIG_EARLY_PRINTK=y | 498 | CONFIG_EARLY_PRINTK=y |
| 492 | CONFIG_ENCRYPTED_KEYS=m | 499 | CONFIG_ENCRYPTED_KEYS=m |
| 493 | CONFIG_CRYPTO_RSA=m | 500 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig index ad1dbce07aa4..77f4a11083e9 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -55,7 +56,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 55 | CONFIG_NET_IPGRE=m | 56 | CONFIG_NET_IPGRE=m |
| 56 | CONFIG_NET_IPVTI=m | 57 | CONFIG_NET_IPVTI=m |
| 57 | CONFIG_NET_FOU_IP_TUNNELS=y | 58 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 58 | CONFIG_GENEVE_CORE=m | ||
| 59 | CONFIG_INET_AH=m | 59 | CONFIG_INET_AH=m |
| 60 | CONFIG_INET_ESP=m | 60 | CONFIG_INET_ESP=m |
| 61 | CONFIG_INET_IPCOMP=m | 61 | CONFIG_INET_IPCOMP=m |
| @@ -65,10 +65,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 65 | # CONFIG_INET_LRO is not set | 65 | # CONFIG_INET_LRO is not set |
| 66 | CONFIG_INET_DIAG=m | 66 | CONFIG_INET_DIAG=m |
| 67 | CONFIG_INET_UDP_DIAG=m | 67 | CONFIG_INET_UDP_DIAG=m |
| 68 | CONFIG_IPV6=m | ||
| 68 | CONFIG_IPV6_ROUTER_PREF=y | 69 | CONFIG_IPV6_ROUTER_PREF=y |
| 69 | CONFIG_INET6_AH=m | 70 | CONFIG_INET6_AH=m |
| 70 | CONFIG_INET6_ESP=m | 71 | CONFIG_INET6_ESP=m |
| 71 | CONFIG_INET6_IPCOMP=m | 72 | CONFIG_INET6_IPCOMP=m |
| 73 | CONFIG_IPV6_ILA=m | ||
| 72 | CONFIG_IPV6_VTI=m | 74 | CONFIG_IPV6_VTI=m |
| 73 | CONFIG_IPV6_GRE=m | 75 | CONFIG_IPV6_GRE=m |
| 74 | CONFIG_NETFILTER=y | 76 | CONFIG_NETFILTER=y |
| @@ -177,6 +179,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 177 | CONFIG_IP_SET_LIST_SET=m | 179 | CONFIG_IP_SET_LIST_SET=m |
| 178 | CONFIG_NF_CONNTRACK_IPV4=m | 180 | CONFIG_NF_CONNTRACK_IPV4=m |
| 179 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 181 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 182 | CONFIG_NFT_DUP_IPV4=m | ||
| 180 | CONFIG_NF_TABLES_ARP=m | 183 | CONFIG_NF_TABLES_ARP=m |
| 181 | CONFIG_NF_LOG_ARP=m | 184 | CONFIG_NF_LOG_ARP=m |
| 182 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 185 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -204,6 +207,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 204 | CONFIG_IP_NF_ARP_MANGLE=m | 207 | CONFIG_IP_NF_ARP_MANGLE=m |
| 205 | CONFIG_NF_CONNTRACK_IPV6=m | 208 | CONFIG_NF_CONNTRACK_IPV6=m |
| 206 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 209 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 210 | CONFIG_NFT_DUP_IPV6=m | ||
| 207 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 211 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 208 | CONFIG_NFT_MASQ_IPV6=m | 212 | CONFIG_NFT_MASQ_IPV6=m |
| 209 | CONFIG_NFT_REDIR_IPV6=m | 213 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -269,6 +273,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 269 | CONFIG_MPLS=y | 273 | CONFIG_MPLS=y |
| 270 | CONFIG_NET_MPLS_GSO=m | 274 | CONFIG_NET_MPLS_GSO=m |
| 271 | CONFIG_MPLS_ROUTING=m | 275 | CONFIG_MPLS_ROUTING=m |
| 276 | CONFIG_MPLS_IPTUNNEL=m | ||
| 272 | # CONFIG_WIRELESS is not set | 277 | # CONFIG_WIRELESS is not set |
| 273 | # CONFIG_UEVENT_HELPER is not set | 278 | # CONFIG_UEVENT_HELPER is not set |
| 274 | CONFIG_DEVTMPFS=y | 279 | CONFIG_DEVTMPFS=y |
| @@ -345,6 +350,7 @@ CONFIG_HPLANCE=y | |||
| 345 | # CONFIG_NET_VENDOR_SAMSUNG is not set | 350 | # CONFIG_NET_VENDOR_SAMSUNG is not set |
| 346 | # CONFIG_NET_VENDOR_SEEQ is not set | 351 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 347 | # CONFIG_NET_VENDOR_STMICRO is not set | 352 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 353 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 348 | # CONFIG_NET_VENDOR_VIA is not set | 354 | # CONFIG_NET_VENDOR_VIA is not set |
| 349 | # CONFIG_NET_VENDOR_WIZNET is not set | 355 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 350 | CONFIG_PPP=m | 356 | CONFIG_PPP=m |
| @@ -497,6 +503,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 497 | CONFIG_TEST_BPF=m | 503 | CONFIG_TEST_BPF=m |
| 498 | CONFIG_TEST_FIRMWARE=m | 504 | CONFIG_TEST_FIRMWARE=m |
| 499 | CONFIG_TEST_UDELAY=m | 505 | CONFIG_TEST_UDELAY=m |
| 506 | CONFIG_TEST_STATIC_KEYS=m | ||
| 500 | CONFIG_EARLY_PRINTK=y | 507 | CONFIG_EARLY_PRINTK=y |
| 501 | CONFIG_ENCRYPTED_KEYS=m | 508 | CONFIG_ENCRYPTED_KEYS=m |
| 502 | CONFIG_CRYPTO_RSA=m | 509 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig index b44acacaecf4..5a329f77329b 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -54,7 +55,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 54 | CONFIG_NET_IPGRE=m | 55 | CONFIG_NET_IPGRE=m |
| 55 | CONFIG_NET_IPVTI=m | 56 | CONFIG_NET_IPVTI=m |
| 56 | CONFIG_NET_FOU_IP_TUNNELS=y | 57 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 57 | CONFIG_GENEVE_CORE=m | ||
| 58 | CONFIG_INET_AH=m | 58 | CONFIG_INET_AH=m |
| 59 | CONFIG_INET_ESP=m | 59 | CONFIG_INET_ESP=m |
| 60 | CONFIG_INET_IPCOMP=m | 60 | CONFIG_INET_IPCOMP=m |
| @@ -64,10 +64,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 64 | # CONFIG_INET_LRO is not set | 64 | # CONFIG_INET_LRO is not set |
| 65 | CONFIG_INET_DIAG=m | 65 | CONFIG_INET_DIAG=m |
| 66 | CONFIG_INET_UDP_DIAG=m | 66 | CONFIG_INET_UDP_DIAG=m |
| 67 | CONFIG_IPV6=m | ||
| 67 | CONFIG_IPV6_ROUTER_PREF=y | 68 | CONFIG_IPV6_ROUTER_PREF=y |
| 68 | CONFIG_INET6_AH=m | 69 | CONFIG_INET6_AH=m |
| 69 | CONFIG_INET6_ESP=m | 70 | CONFIG_INET6_ESP=m |
| 70 | CONFIG_INET6_IPCOMP=m | 71 | CONFIG_INET6_IPCOMP=m |
| 72 | CONFIG_IPV6_ILA=m | ||
| 71 | CONFIG_IPV6_VTI=m | 73 | CONFIG_IPV6_VTI=m |
| 72 | CONFIG_IPV6_GRE=m | 74 | CONFIG_IPV6_GRE=m |
| 73 | CONFIG_NETFILTER=y | 75 | CONFIG_NETFILTER=y |
| @@ -176,6 +178,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 176 | CONFIG_IP_SET_LIST_SET=m | 178 | CONFIG_IP_SET_LIST_SET=m |
| 177 | CONFIG_NF_CONNTRACK_IPV4=m | 179 | CONFIG_NF_CONNTRACK_IPV4=m |
| 178 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 180 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 181 | CONFIG_NFT_DUP_IPV4=m | ||
| 179 | CONFIG_NF_TABLES_ARP=m | 182 | CONFIG_NF_TABLES_ARP=m |
| 180 | CONFIG_NF_LOG_ARP=m | 183 | CONFIG_NF_LOG_ARP=m |
| 181 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 184 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -203,6 +206,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 203 | CONFIG_IP_NF_ARP_MANGLE=m | 206 | CONFIG_IP_NF_ARP_MANGLE=m |
| 204 | CONFIG_NF_CONNTRACK_IPV6=m | 207 | CONFIG_NF_CONNTRACK_IPV6=m |
| 205 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 208 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 209 | CONFIG_NFT_DUP_IPV6=m | ||
| 206 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 210 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 207 | CONFIG_NFT_MASQ_IPV6=m | 211 | CONFIG_NFT_MASQ_IPV6=m |
| 208 | CONFIG_NFT_REDIR_IPV6=m | 212 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -271,6 +275,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 271 | CONFIG_MPLS=y | 275 | CONFIG_MPLS=y |
| 272 | CONFIG_NET_MPLS_GSO=m | 276 | CONFIG_NET_MPLS_GSO=m |
| 273 | CONFIG_MPLS_ROUTING=m | 277 | CONFIG_MPLS_ROUTING=m |
| 278 | CONFIG_MPLS_IPTUNNEL=m | ||
| 274 | # CONFIG_WIRELESS is not set | 279 | # CONFIG_WIRELESS is not set |
| 275 | # CONFIG_UEVENT_HELPER is not set | 280 | # CONFIG_UEVENT_HELPER is not set |
| 276 | CONFIG_DEVTMPFS=y | 281 | CONFIG_DEVTMPFS=y |
| @@ -364,6 +369,7 @@ CONFIG_MAC8390=y | |||
| 364 | # CONFIG_NET_VENDOR_SEEQ is not set | 369 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 365 | # CONFIG_NET_VENDOR_SMSC is not set | 370 | # CONFIG_NET_VENDOR_SMSC is not set |
| 366 | # CONFIG_NET_VENDOR_STMICRO is not set | 371 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 372 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 367 | # CONFIG_NET_VENDOR_VIA is not set | 373 | # CONFIG_NET_VENDOR_VIA is not set |
| 368 | # CONFIG_NET_VENDOR_WIZNET is not set | 374 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 369 | CONFIG_PPP=m | 375 | CONFIG_PPP=m |
| @@ -519,6 +525,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 519 | CONFIG_TEST_BPF=m | 525 | CONFIG_TEST_BPF=m |
| 520 | CONFIG_TEST_FIRMWARE=m | 526 | CONFIG_TEST_FIRMWARE=m |
| 521 | CONFIG_TEST_UDELAY=m | 527 | CONFIG_TEST_UDELAY=m |
| 528 | CONFIG_TEST_STATIC_KEYS=m | ||
| 522 | CONFIG_EARLY_PRINTK=y | 529 | CONFIG_EARLY_PRINTK=y |
| 523 | CONFIG_ENCRYPTED_KEYS=m | 530 | CONFIG_ENCRYPTED_KEYS=m |
| 524 | CONFIG_CRYPTO_RSA=m | 531 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig index 8afca3753db1..83c80d2030ec 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -64,7 +65,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 64 | CONFIG_NET_IPGRE=m | 65 | CONFIG_NET_IPGRE=m |
| 65 | CONFIG_NET_IPVTI=m | 66 | CONFIG_NET_IPVTI=m |
| 66 | CONFIG_NET_FOU_IP_TUNNELS=y | 67 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 67 | CONFIG_GENEVE_CORE=m | ||
| 68 | CONFIG_INET_AH=m | 68 | CONFIG_INET_AH=m |
| 69 | CONFIG_INET_ESP=m | 69 | CONFIG_INET_ESP=m |
| 70 | CONFIG_INET_IPCOMP=m | 70 | CONFIG_INET_IPCOMP=m |
| @@ -74,10 +74,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 74 | # CONFIG_INET_LRO is not set | 74 | # CONFIG_INET_LRO is not set |
| 75 | CONFIG_INET_DIAG=m | 75 | CONFIG_INET_DIAG=m |
| 76 | CONFIG_INET_UDP_DIAG=m | 76 | CONFIG_INET_UDP_DIAG=m |
| 77 | CONFIG_IPV6=m | ||
| 77 | CONFIG_IPV6_ROUTER_PREF=y | 78 | CONFIG_IPV6_ROUTER_PREF=y |
| 78 | CONFIG_INET6_AH=m | 79 | CONFIG_INET6_AH=m |
| 79 | CONFIG_INET6_ESP=m | 80 | CONFIG_INET6_ESP=m |
| 80 | CONFIG_INET6_IPCOMP=m | 81 | CONFIG_INET6_IPCOMP=m |
| 82 | CONFIG_IPV6_ILA=m | ||
| 81 | CONFIG_IPV6_VTI=m | 83 | CONFIG_IPV6_VTI=m |
| 82 | CONFIG_IPV6_GRE=m | 84 | CONFIG_IPV6_GRE=m |
| 83 | CONFIG_NETFILTER=y | 85 | CONFIG_NETFILTER=y |
| @@ -186,6 +188,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 186 | CONFIG_IP_SET_LIST_SET=m | 188 | CONFIG_IP_SET_LIST_SET=m |
| 187 | CONFIG_NF_CONNTRACK_IPV4=m | 189 | CONFIG_NF_CONNTRACK_IPV4=m |
| 188 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 190 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 191 | CONFIG_NFT_DUP_IPV4=m | ||
| 189 | CONFIG_NF_TABLES_ARP=m | 192 | CONFIG_NF_TABLES_ARP=m |
| 190 | CONFIG_NF_LOG_ARP=m | 193 | CONFIG_NF_LOG_ARP=m |
| 191 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 194 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -213,6 +216,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 213 | CONFIG_IP_NF_ARP_MANGLE=m | 216 | CONFIG_IP_NF_ARP_MANGLE=m |
| 214 | CONFIG_NF_CONNTRACK_IPV6=m | 217 | CONFIG_NF_CONNTRACK_IPV6=m |
| 215 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 218 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 219 | CONFIG_NFT_DUP_IPV6=m | ||
| 216 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 220 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 217 | CONFIG_NFT_MASQ_IPV6=m | 221 | CONFIG_NFT_MASQ_IPV6=m |
| 218 | CONFIG_NFT_REDIR_IPV6=m | 222 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -281,6 +285,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 281 | CONFIG_MPLS=y | 285 | CONFIG_MPLS=y |
| 282 | CONFIG_NET_MPLS_GSO=m | 286 | CONFIG_NET_MPLS_GSO=m |
| 283 | CONFIG_MPLS_ROUTING=m | 287 | CONFIG_MPLS_ROUTING=m |
| 288 | CONFIG_MPLS_IPTUNNEL=m | ||
| 284 | # CONFIG_WIRELESS is not set | 289 | # CONFIG_WIRELESS is not set |
| 285 | # CONFIG_UEVENT_HELPER is not set | 290 | # CONFIG_UEVENT_HELPER is not set |
| 286 | CONFIG_DEVTMPFS=y | 291 | CONFIG_DEVTMPFS=y |
| @@ -410,6 +415,7 @@ CONFIG_ZORRO8390=y | |||
| 410 | # CONFIG_NET_VENDOR_SEEQ is not set | 415 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 411 | CONFIG_SMC91X=y | 416 | CONFIG_SMC91X=y |
| 412 | # CONFIG_NET_VENDOR_STMICRO is not set | 417 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 418 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 413 | # CONFIG_NET_VENDOR_VIA is not set | 419 | # CONFIG_NET_VENDOR_VIA is not set |
| 414 | # CONFIG_NET_VENDOR_WIZNET is not set | 420 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 415 | CONFIG_PLIP=m | 421 | CONFIG_PLIP=m |
| @@ -599,6 +605,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 599 | CONFIG_TEST_BPF=m | 605 | CONFIG_TEST_BPF=m |
| 600 | CONFIG_TEST_FIRMWARE=m | 606 | CONFIG_TEST_FIRMWARE=m |
| 601 | CONFIG_TEST_UDELAY=m | 607 | CONFIG_TEST_UDELAY=m |
| 608 | CONFIG_TEST_STATIC_KEYS=m | ||
| 602 | CONFIG_EARLY_PRINTK=y | 609 | CONFIG_EARLY_PRINTK=y |
| 603 | CONFIG_ENCRYPTED_KEYS=m | 610 | CONFIG_ENCRYPTED_KEYS=m |
| 604 | CONFIG_CRYPTO_RSA=m | 611 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig index ef00875994d9..6cb42c3bf5a2 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -52,7 +53,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 52 | CONFIG_NET_IPGRE=m | 53 | CONFIG_NET_IPGRE=m |
| 53 | CONFIG_NET_IPVTI=m | 54 | CONFIG_NET_IPVTI=m |
| 54 | CONFIG_NET_FOU_IP_TUNNELS=y | 55 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 55 | CONFIG_GENEVE_CORE=m | ||
| 56 | CONFIG_INET_AH=m | 56 | CONFIG_INET_AH=m |
| 57 | CONFIG_INET_ESP=m | 57 | CONFIG_INET_ESP=m |
| 58 | CONFIG_INET_IPCOMP=m | 58 | CONFIG_INET_IPCOMP=m |
| @@ -62,10 +62,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 62 | # CONFIG_INET_LRO is not set | 62 | # CONFIG_INET_LRO is not set |
| 63 | CONFIG_INET_DIAG=m | 63 | CONFIG_INET_DIAG=m |
| 64 | CONFIG_INET_UDP_DIAG=m | 64 | CONFIG_INET_UDP_DIAG=m |
| 65 | CONFIG_IPV6=m | ||
| 65 | CONFIG_IPV6_ROUTER_PREF=y | 66 | CONFIG_IPV6_ROUTER_PREF=y |
| 66 | CONFIG_INET6_AH=m | 67 | CONFIG_INET6_AH=m |
| 67 | CONFIG_INET6_ESP=m | 68 | CONFIG_INET6_ESP=m |
| 68 | CONFIG_INET6_IPCOMP=m | 69 | CONFIG_INET6_IPCOMP=m |
| 70 | CONFIG_IPV6_ILA=m | ||
| 69 | CONFIG_IPV6_VTI=m | 71 | CONFIG_IPV6_VTI=m |
| 70 | CONFIG_IPV6_GRE=m | 72 | CONFIG_IPV6_GRE=m |
| 71 | CONFIG_NETFILTER=y | 73 | CONFIG_NETFILTER=y |
| @@ -174,6 +176,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 174 | CONFIG_IP_SET_LIST_SET=m | 176 | CONFIG_IP_SET_LIST_SET=m |
| 175 | CONFIG_NF_CONNTRACK_IPV4=m | 177 | CONFIG_NF_CONNTRACK_IPV4=m |
| 176 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 178 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 179 | CONFIG_NFT_DUP_IPV4=m | ||
| 177 | CONFIG_NF_TABLES_ARP=m | 180 | CONFIG_NF_TABLES_ARP=m |
| 178 | CONFIG_NF_LOG_ARP=m | 181 | CONFIG_NF_LOG_ARP=m |
| 179 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 182 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -201,6 +204,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 201 | CONFIG_IP_NF_ARP_MANGLE=m | 204 | CONFIG_IP_NF_ARP_MANGLE=m |
| 202 | CONFIG_NF_CONNTRACK_IPV6=m | 205 | CONFIG_NF_CONNTRACK_IPV6=m |
| 203 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 206 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 207 | CONFIG_NFT_DUP_IPV6=m | ||
| 204 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 208 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 205 | CONFIG_NFT_MASQ_IPV6=m | 209 | CONFIG_NFT_MASQ_IPV6=m |
| 206 | CONFIG_NFT_REDIR_IPV6=m | 210 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -266,6 +270,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 266 | CONFIG_MPLS=y | 270 | CONFIG_MPLS=y |
| 267 | CONFIG_NET_MPLS_GSO=m | 271 | CONFIG_NET_MPLS_GSO=m |
| 268 | CONFIG_MPLS_ROUTING=m | 272 | CONFIG_MPLS_ROUTING=m |
| 273 | CONFIG_MPLS_IPTUNNEL=m | ||
| 269 | # CONFIG_WIRELESS is not set | 274 | # CONFIG_WIRELESS is not set |
| 270 | # CONFIG_UEVENT_HELPER is not set | 275 | # CONFIG_UEVENT_HELPER is not set |
| 271 | CONFIG_DEVTMPFS=y | 276 | CONFIG_DEVTMPFS=y |
| @@ -343,6 +348,7 @@ CONFIG_MVME147_NET=y | |||
| 343 | # CONFIG_NET_VENDOR_SAMSUNG is not set | 348 | # CONFIG_NET_VENDOR_SAMSUNG is not set |
| 344 | # CONFIG_NET_VENDOR_SEEQ is not set | 349 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 345 | # CONFIG_NET_VENDOR_STMICRO is not set | 350 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 351 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 346 | # CONFIG_NET_VENDOR_VIA is not set | 352 | # CONFIG_NET_VENDOR_VIA is not set |
| 347 | # CONFIG_NET_VENDOR_WIZNET is not set | 353 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 348 | CONFIG_PPP=m | 354 | CONFIG_PPP=m |
| @@ -488,6 +494,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 488 | CONFIG_TEST_BPF=m | 494 | CONFIG_TEST_BPF=m |
| 489 | CONFIG_TEST_FIRMWARE=m | 495 | CONFIG_TEST_FIRMWARE=m |
| 490 | CONFIG_TEST_UDELAY=m | 496 | CONFIG_TEST_UDELAY=m |
| 497 | CONFIG_TEST_STATIC_KEYS=m | ||
| 491 | CONFIG_EARLY_PRINTK=y | 498 | CONFIG_EARLY_PRINTK=y |
| 492 | CONFIG_ENCRYPTED_KEYS=m | 499 | CONFIG_ENCRYPTED_KEYS=m |
| 493 | CONFIG_CRYPTO_RSA=m | 500 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig index 387c2bd90ff1..c7508c30330c 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -53,7 +54,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 53 | CONFIG_NET_IPGRE=m | 54 | CONFIG_NET_IPGRE=m |
| 54 | CONFIG_NET_IPVTI=m | 55 | CONFIG_NET_IPVTI=m |
| 55 | CONFIG_NET_FOU_IP_TUNNELS=y | 56 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 56 | CONFIG_GENEVE_CORE=m | ||
| 57 | CONFIG_INET_AH=m | 57 | CONFIG_INET_AH=m |
| 58 | CONFIG_INET_ESP=m | 58 | CONFIG_INET_ESP=m |
| 59 | CONFIG_INET_IPCOMP=m | 59 | CONFIG_INET_IPCOMP=m |
| @@ -63,10 +63,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 63 | # CONFIG_INET_LRO is not set | 63 | # CONFIG_INET_LRO is not set |
| 64 | CONFIG_INET_DIAG=m | 64 | CONFIG_INET_DIAG=m |
| 65 | CONFIG_INET_UDP_DIAG=m | 65 | CONFIG_INET_UDP_DIAG=m |
| 66 | CONFIG_IPV6=m | ||
| 66 | CONFIG_IPV6_ROUTER_PREF=y | 67 | CONFIG_IPV6_ROUTER_PREF=y |
| 67 | CONFIG_INET6_AH=m | 68 | CONFIG_INET6_AH=m |
| 68 | CONFIG_INET6_ESP=m | 69 | CONFIG_INET6_ESP=m |
| 69 | CONFIG_INET6_IPCOMP=m | 70 | CONFIG_INET6_IPCOMP=m |
| 71 | CONFIG_IPV6_ILA=m | ||
| 70 | CONFIG_IPV6_VTI=m | 72 | CONFIG_IPV6_VTI=m |
| 71 | CONFIG_IPV6_GRE=m | 73 | CONFIG_IPV6_GRE=m |
| 72 | CONFIG_NETFILTER=y | 74 | CONFIG_NETFILTER=y |
| @@ -175,6 +177,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 175 | CONFIG_IP_SET_LIST_SET=m | 177 | CONFIG_IP_SET_LIST_SET=m |
| 176 | CONFIG_NF_CONNTRACK_IPV4=m | 178 | CONFIG_NF_CONNTRACK_IPV4=m |
| 177 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 179 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 180 | CONFIG_NFT_DUP_IPV4=m | ||
| 178 | CONFIG_NF_TABLES_ARP=m | 181 | CONFIG_NF_TABLES_ARP=m |
| 179 | CONFIG_NF_LOG_ARP=m | 182 | CONFIG_NF_LOG_ARP=m |
| 180 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 183 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -202,6 +205,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 202 | CONFIG_IP_NF_ARP_MANGLE=m | 205 | CONFIG_IP_NF_ARP_MANGLE=m |
| 203 | CONFIG_NF_CONNTRACK_IPV6=m | 206 | CONFIG_NF_CONNTRACK_IPV6=m |
| 204 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 207 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 208 | CONFIG_NFT_DUP_IPV6=m | ||
| 205 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 209 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 206 | CONFIG_NFT_MASQ_IPV6=m | 210 | CONFIG_NFT_MASQ_IPV6=m |
| 207 | CONFIG_NFT_REDIR_IPV6=m | 211 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -267,6 +271,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 267 | CONFIG_MPLS=y | 271 | CONFIG_MPLS=y |
| 268 | CONFIG_NET_MPLS_GSO=m | 272 | CONFIG_NET_MPLS_GSO=m |
| 269 | CONFIG_MPLS_ROUTING=m | 273 | CONFIG_MPLS_ROUTING=m |
| 274 | CONFIG_MPLS_IPTUNNEL=m | ||
| 270 | # CONFIG_WIRELESS is not set | 275 | # CONFIG_WIRELESS is not set |
| 271 | # CONFIG_UEVENT_HELPER is not set | 276 | # CONFIG_UEVENT_HELPER is not set |
| 272 | CONFIG_DEVTMPFS=y | 277 | CONFIG_DEVTMPFS=y |
| @@ -343,6 +348,7 @@ CONFIG_MVME16x_NET=y | |||
| 343 | # CONFIG_NET_VENDOR_SAMSUNG is not set | 348 | # CONFIG_NET_VENDOR_SAMSUNG is not set |
| 344 | # CONFIG_NET_VENDOR_SEEQ is not set | 349 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 345 | # CONFIG_NET_VENDOR_STMICRO is not set | 350 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 351 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 346 | # CONFIG_NET_VENDOR_VIA is not set | 352 | # CONFIG_NET_VENDOR_VIA is not set |
| 347 | # CONFIG_NET_VENDOR_WIZNET is not set | 353 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 348 | CONFIG_PPP=m | 354 | CONFIG_PPP=m |
| @@ -488,6 +494,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 488 | CONFIG_TEST_BPF=m | 494 | CONFIG_TEST_BPF=m |
| 489 | CONFIG_TEST_FIRMWARE=m | 495 | CONFIG_TEST_FIRMWARE=m |
| 490 | CONFIG_TEST_UDELAY=m | 496 | CONFIG_TEST_UDELAY=m |
| 497 | CONFIG_TEST_STATIC_KEYS=m | ||
| 491 | CONFIG_EARLY_PRINTK=y | 498 | CONFIG_EARLY_PRINTK=y |
| 492 | CONFIG_ENCRYPTED_KEYS=m | 499 | CONFIG_ENCRYPTED_KEYS=m |
| 493 | CONFIG_CRYPTO_RSA=m | 500 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig index 35355c1bc714..64b71664a303 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -53,7 +54,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 53 | CONFIG_NET_IPGRE=m | 54 | CONFIG_NET_IPGRE=m |
| 54 | CONFIG_NET_IPVTI=m | 55 | CONFIG_NET_IPVTI=m |
| 55 | CONFIG_NET_FOU_IP_TUNNELS=y | 56 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 56 | CONFIG_GENEVE_CORE=m | ||
| 57 | CONFIG_INET_AH=m | 57 | CONFIG_INET_AH=m |
| 58 | CONFIG_INET_ESP=m | 58 | CONFIG_INET_ESP=m |
| 59 | CONFIG_INET_IPCOMP=m | 59 | CONFIG_INET_IPCOMP=m |
| @@ -63,10 +63,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 63 | # CONFIG_INET_LRO is not set | 63 | # CONFIG_INET_LRO is not set |
| 64 | CONFIG_INET_DIAG=m | 64 | CONFIG_INET_DIAG=m |
| 65 | CONFIG_INET_UDP_DIAG=m | 65 | CONFIG_INET_UDP_DIAG=m |
| 66 | CONFIG_IPV6=m | ||
| 66 | CONFIG_IPV6_ROUTER_PREF=y | 67 | CONFIG_IPV6_ROUTER_PREF=y |
| 67 | CONFIG_INET6_AH=m | 68 | CONFIG_INET6_AH=m |
| 68 | CONFIG_INET6_ESP=m | 69 | CONFIG_INET6_ESP=m |
| 69 | CONFIG_INET6_IPCOMP=m | 70 | CONFIG_INET6_IPCOMP=m |
| 71 | CONFIG_IPV6_ILA=m | ||
| 70 | CONFIG_IPV6_VTI=m | 72 | CONFIG_IPV6_VTI=m |
| 71 | CONFIG_IPV6_GRE=m | 73 | CONFIG_IPV6_GRE=m |
| 72 | CONFIG_NETFILTER=y | 74 | CONFIG_NETFILTER=y |
| @@ -175,6 +177,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 175 | CONFIG_IP_SET_LIST_SET=m | 177 | CONFIG_IP_SET_LIST_SET=m |
| 176 | CONFIG_NF_CONNTRACK_IPV4=m | 178 | CONFIG_NF_CONNTRACK_IPV4=m |
| 177 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 179 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 180 | CONFIG_NFT_DUP_IPV4=m | ||
| 178 | CONFIG_NF_TABLES_ARP=m | 181 | CONFIG_NF_TABLES_ARP=m |
| 179 | CONFIG_NF_LOG_ARP=m | 182 | CONFIG_NF_LOG_ARP=m |
| 180 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 183 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -202,6 +205,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 202 | CONFIG_IP_NF_ARP_MANGLE=m | 205 | CONFIG_IP_NF_ARP_MANGLE=m |
| 203 | CONFIG_NF_CONNTRACK_IPV6=m | 206 | CONFIG_NF_CONNTRACK_IPV6=m |
| 204 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 207 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 208 | CONFIG_NFT_DUP_IPV6=m | ||
| 205 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 209 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 206 | CONFIG_NFT_MASQ_IPV6=m | 210 | CONFIG_NFT_MASQ_IPV6=m |
| 207 | CONFIG_NFT_REDIR_IPV6=m | 211 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -267,6 +271,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 267 | CONFIG_MPLS=y | 271 | CONFIG_MPLS=y |
| 268 | CONFIG_NET_MPLS_GSO=m | 272 | CONFIG_NET_MPLS_GSO=m |
| 269 | CONFIG_MPLS_ROUTING=m | 273 | CONFIG_MPLS_ROUTING=m |
| 274 | CONFIG_MPLS_IPTUNNEL=m | ||
| 270 | # CONFIG_WIRELESS is not set | 275 | # CONFIG_WIRELESS is not set |
| 271 | # CONFIG_UEVENT_HELPER is not set | 276 | # CONFIG_UEVENT_HELPER is not set |
| 272 | CONFIG_DEVTMPFS=y | 277 | CONFIG_DEVTMPFS=y |
| @@ -354,6 +359,7 @@ CONFIG_NE2000=y | |||
| 354 | # CONFIG_NET_VENDOR_SEEQ is not set | 359 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 355 | # CONFIG_NET_VENDOR_SMSC is not set | 360 | # CONFIG_NET_VENDOR_SMSC is not set |
| 356 | # CONFIG_NET_VENDOR_STMICRO is not set | 361 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 362 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 357 | # CONFIG_NET_VENDOR_VIA is not set | 363 | # CONFIG_NET_VENDOR_VIA is not set |
| 358 | # CONFIG_NET_VENDOR_WIZNET is not set | 364 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 359 | CONFIG_PLIP=m | 365 | CONFIG_PLIP=m |
| @@ -510,6 +516,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 510 | CONFIG_TEST_BPF=m | 516 | CONFIG_TEST_BPF=m |
| 511 | CONFIG_TEST_FIRMWARE=m | 517 | CONFIG_TEST_FIRMWARE=m |
| 512 | CONFIG_TEST_UDELAY=m | 518 | CONFIG_TEST_UDELAY=m |
| 519 | CONFIG_TEST_STATIC_KEYS=m | ||
| 513 | CONFIG_EARLY_PRINTK=y | 520 | CONFIG_EARLY_PRINTK=y |
| 514 | CONFIG_ENCRYPTED_KEYS=m | 521 | CONFIG_ENCRYPTED_KEYS=m |
| 515 | CONFIG_CRYPTO_RSA=m | 522 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig index 8442d267b877..9a4cab78a2ea 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -50,7 +51,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 50 | CONFIG_NET_IPGRE=m | 51 | CONFIG_NET_IPGRE=m |
| 51 | CONFIG_NET_IPVTI=m | 52 | CONFIG_NET_IPVTI=m |
| 52 | CONFIG_NET_FOU_IP_TUNNELS=y | 53 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 53 | CONFIG_GENEVE_CORE=m | ||
| 54 | CONFIG_INET_AH=m | 54 | CONFIG_INET_AH=m |
| 55 | CONFIG_INET_ESP=m | 55 | CONFIG_INET_ESP=m |
| 56 | CONFIG_INET_IPCOMP=m | 56 | CONFIG_INET_IPCOMP=m |
| @@ -60,10 +60,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 60 | # CONFIG_INET_LRO is not set | 60 | # CONFIG_INET_LRO is not set |
| 61 | CONFIG_INET_DIAG=m | 61 | CONFIG_INET_DIAG=m |
| 62 | CONFIG_INET_UDP_DIAG=m | 62 | CONFIG_INET_UDP_DIAG=m |
| 63 | CONFIG_IPV6=m | ||
| 63 | CONFIG_IPV6_ROUTER_PREF=y | 64 | CONFIG_IPV6_ROUTER_PREF=y |
| 64 | CONFIG_INET6_AH=m | 65 | CONFIG_INET6_AH=m |
| 65 | CONFIG_INET6_ESP=m | 66 | CONFIG_INET6_ESP=m |
| 66 | CONFIG_INET6_IPCOMP=m | 67 | CONFIG_INET6_IPCOMP=m |
| 68 | CONFIG_IPV6_ILA=m | ||
| 67 | CONFIG_IPV6_VTI=m | 69 | CONFIG_IPV6_VTI=m |
| 68 | CONFIG_IPV6_GRE=m | 70 | CONFIG_IPV6_GRE=m |
| 69 | CONFIG_NETFILTER=y | 71 | CONFIG_NETFILTER=y |
| @@ -172,6 +174,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 172 | CONFIG_IP_SET_LIST_SET=m | 174 | CONFIG_IP_SET_LIST_SET=m |
| 173 | CONFIG_NF_CONNTRACK_IPV4=m | 175 | CONFIG_NF_CONNTRACK_IPV4=m |
| 174 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 176 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 177 | CONFIG_NFT_DUP_IPV4=m | ||
| 175 | CONFIG_NF_TABLES_ARP=m | 178 | CONFIG_NF_TABLES_ARP=m |
| 176 | CONFIG_NF_LOG_ARP=m | 179 | CONFIG_NF_LOG_ARP=m |
| 177 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 180 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -199,6 +202,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 199 | CONFIG_IP_NF_ARP_MANGLE=m | 202 | CONFIG_IP_NF_ARP_MANGLE=m |
| 200 | CONFIG_NF_CONNTRACK_IPV6=m | 203 | CONFIG_NF_CONNTRACK_IPV6=m |
| 201 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 204 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 205 | CONFIG_NFT_DUP_IPV6=m | ||
| 202 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 206 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 203 | CONFIG_NFT_MASQ_IPV6=m | 207 | CONFIG_NFT_MASQ_IPV6=m |
| 204 | CONFIG_NFT_REDIR_IPV6=m | 208 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -264,6 +268,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 264 | CONFIG_MPLS=y | 268 | CONFIG_MPLS=y |
| 265 | CONFIG_NET_MPLS_GSO=m | 269 | CONFIG_NET_MPLS_GSO=m |
| 266 | CONFIG_MPLS_ROUTING=m | 270 | CONFIG_MPLS_ROUTING=m |
| 271 | CONFIG_MPLS_IPTUNNEL=m | ||
| 267 | # CONFIG_WIRELESS is not set | 272 | # CONFIG_WIRELESS is not set |
| 268 | # CONFIG_UEVENT_HELPER is not set | 273 | # CONFIG_UEVENT_HELPER is not set |
| 269 | CONFIG_DEVTMPFS=y | 274 | CONFIG_DEVTMPFS=y |
| @@ -341,6 +346,7 @@ CONFIG_SUN3_82586=y | |||
| 341 | # CONFIG_NET_VENDOR_SEEQ is not set | 346 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 342 | # CONFIG_NET_VENDOR_STMICRO is not set | 347 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 343 | # CONFIG_NET_VENDOR_SUN is not set | 348 | # CONFIG_NET_VENDOR_SUN is not set |
| 349 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 344 | # CONFIG_NET_VENDOR_VIA is not set | 350 | # CONFIG_NET_VENDOR_VIA is not set |
| 345 | # CONFIG_NET_VENDOR_WIZNET is not set | 351 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 346 | CONFIG_PPP=m | 352 | CONFIG_PPP=m |
| @@ -489,6 +495,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 489 | CONFIG_TEST_BPF=m | 495 | CONFIG_TEST_BPF=m |
| 490 | CONFIG_TEST_FIRMWARE=m | 496 | CONFIG_TEST_FIRMWARE=m |
| 491 | CONFIG_TEST_UDELAY=m | 497 | CONFIG_TEST_UDELAY=m |
| 498 | CONFIG_TEST_STATIC_KEYS=m | ||
| 492 | CONFIG_ENCRYPTED_KEYS=m | 499 | CONFIG_ENCRYPTED_KEYS=m |
| 493 | CONFIG_CRYPTO_RSA=m | 500 | CONFIG_CRYPTO_RSA=m |
| 494 | CONFIG_CRYPTO_MANAGER=y | 501 | CONFIG_CRYPTO_MANAGER=y |
diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig index 0e1b542e1555..1a2eaac13dbd 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_defconfig | |||
| @@ -10,6 +10,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
| 10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
| 11 | # CONFIG_NET_NS is not set | 11 | # CONFIG_NET_NS is not set |
| 12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
| 13 | CONFIG_USERFAULTFD=y | ||
| 13 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
| 14 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
| 15 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
| @@ -50,7 +51,6 @@ CONFIG_NET_IPGRE_DEMUX=m | |||
| 50 | CONFIG_NET_IPGRE=m | 51 | CONFIG_NET_IPGRE=m |
| 51 | CONFIG_NET_IPVTI=m | 52 | CONFIG_NET_IPVTI=m |
| 52 | CONFIG_NET_FOU_IP_TUNNELS=y | 53 | CONFIG_NET_FOU_IP_TUNNELS=y |
| 53 | CONFIG_GENEVE_CORE=m | ||
| 54 | CONFIG_INET_AH=m | 54 | CONFIG_INET_AH=m |
| 55 | CONFIG_INET_ESP=m | 55 | CONFIG_INET_ESP=m |
| 56 | CONFIG_INET_IPCOMP=m | 56 | CONFIG_INET_IPCOMP=m |
| @@ -60,10 +60,12 @@ CONFIG_INET_XFRM_MODE_BEET=m | |||
| 60 | # CONFIG_INET_LRO is not set | 60 | # CONFIG_INET_LRO is not set |
| 61 | CONFIG_INET_DIAG=m | 61 | CONFIG_INET_DIAG=m |
| 62 | CONFIG_INET_UDP_DIAG=m | 62 | CONFIG_INET_UDP_DIAG=m |
| 63 | CONFIG_IPV6=m | ||
| 63 | CONFIG_IPV6_ROUTER_PREF=y | 64 | CONFIG_IPV6_ROUTER_PREF=y |
| 64 | CONFIG_INET6_AH=m | 65 | CONFIG_INET6_AH=m |
| 65 | CONFIG_INET6_ESP=m | 66 | CONFIG_INET6_ESP=m |
| 66 | CONFIG_INET6_IPCOMP=m | 67 | CONFIG_INET6_IPCOMP=m |
| 68 | CONFIG_IPV6_ILA=m | ||
| 67 | CONFIG_IPV6_VTI=m | 69 | CONFIG_IPV6_VTI=m |
| 68 | CONFIG_IPV6_GRE=m | 70 | CONFIG_IPV6_GRE=m |
| 69 | CONFIG_NETFILTER=y | 71 | CONFIG_NETFILTER=y |
| @@ -172,6 +174,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m | |||
| 172 | CONFIG_IP_SET_LIST_SET=m | 174 | CONFIG_IP_SET_LIST_SET=m |
| 173 | CONFIG_NF_CONNTRACK_IPV4=m | 175 | CONFIG_NF_CONNTRACK_IPV4=m |
| 174 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m | 176 | CONFIG_NFT_CHAIN_ROUTE_IPV4=m |
| 177 | CONFIG_NFT_DUP_IPV4=m | ||
| 175 | CONFIG_NF_TABLES_ARP=m | 178 | CONFIG_NF_TABLES_ARP=m |
| 176 | CONFIG_NF_LOG_ARP=m | 179 | CONFIG_NF_LOG_ARP=m |
| 177 | CONFIG_NFT_CHAIN_NAT_IPV4=m | 180 | CONFIG_NFT_CHAIN_NAT_IPV4=m |
| @@ -199,6 +202,7 @@ CONFIG_IP_NF_ARPFILTER=m | |||
| 199 | CONFIG_IP_NF_ARP_MANGLE=m | 202 | CONFIG_IP_NF_ARP_MANGLE=m |
| 200 | CONFIG_NF_CONNTRACK_IPV6=m | 203 | CONFIG_NF_CONNTRACK_IPV6=m |
| 201 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m | 204 | CONFIG_NFT_CHAIN_ROUTE_IPV6=m |
| 205 | CONFIG_NFT_DUP_IPV6=m | ||
| 202 | CONFIG_NFT_CHAIN_NAT_IPV6=m | 206 | CONFIG_NFT_CHAIN_NAT_IPV6=m |
| 203 | CONFIG_NFT_MASQ_IPV6=m | 207 | CONFIG_NFT_MASQ_IPV6=m |
| 204 | CONFIG_NFT_REDIR_IPV6=m | 208 | CONFIG_NFT_REDIR_IPV6=m |
| @@ -264,6 +268,7 @@ CONFIG_NETLINK_DIAG=m | |||
| 264 | CONFIG_MPLS=y | 268 | CONFIG_MPLS=y |
| 265 | CONFIG_NET_MPLS_GSO=m | 269 | CONFIG_NET_MPLS_GSO=m |
| 266 | CONFIG_MPLS_ROUTING=m | 270 | CONFIG_MPLS_ROUTING=m |
| 271 | CONFIG_MPLS_IPTUNNEL=m | ||
| 267 | # CONFIG_WIRELESS is not set | 272 | # CONFIG_WIRELESS is not set |
| 268 | # CONFIG_UEVENT_HELPER is not set | 273 | # CONFIG_UEVENT_HELPER is not set |
| 269 | CONFIG_DEVTMPFS=y | 274 | CONFIG_DEVTMPFS=y |
| @@ -341,6 +346,7 @@ CONFIG_SUN3LANCE=y | |||
| 341 | # CONFIG_NET_VENDOR_SAMSUNG is not set | 346 | # CONFIG_NET_VENDOR_SAMSUNG is not set |
| 342 | # CONFIG_NET_VENDOR_SEEQ is not set | 347 | # CONFIG_NET_VENDOR_SEEQ is not set |
| 343 | # CONFIG_NET_VENDOR_STMICRO is not set | 348 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 349 | # CONFIG_NET_VENDOR_SYNOPSYS is not set | ||
| 344 | # CONFIG_NET_VENDOR_VIA is not set | 350 | # CONFIG_NET_VENDOR_VIA is not set |
| 345 | # CONFIG_NET_VENDOR_WIZNET is not set | 351 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 346 | CONFIG_PPP=m | 352 | CONFIG_PPP=m |
| @@ -489,6 +495,7 @@ CONFIG_TEST_USER_COPY=m | |||
| 489 | CONFIG_TEST_BPF=m | 495 | CONFIG_TEST_BPF=m |
| 490 | CONFIG_TEST_FIRMWARE=m | 496 | CONFIG_TEST_FIRMWARE=m |
| 491 | CONFIG_TEST_UDELAY=m | 497 | CONFIG_TEST_UDELAY=m |
| 498 | CONFIG_TEST_STATIC_KEYS=m | ||
| 492 | CONFIG_EARLY_PRINTK=y | 499 | CONFIG_EARLY_PRINTK=y |
| 493 | CONFIG_ENCRYPTED_KEYS=m | 500 | CONFIG_ENCRYPTED_KEYS=m |
| 494 | CONFIG_CRYPTO_RSA=m | 501 | CONFIG_CRYPTO_RSA=m |
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h index 81ca118d58af..a644f4a53b94 100644 --- a/arch/m68k/include/asm/irq.h +++ b/arch/m68k/include/asm/irq.h | |||
| @@ -64,8 +64,7 @@ extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, | |||
| 64 | struct pt_regs *)); | 64 | struct pt_regs *)); |
| 65 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt); | 65 | extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt); |
| 66 | extern void m68k_setup_irq_controller(struct irq_chip *, | 66 | extern void m68k_setup_irq_controller(struct irq_chip *, |
| 67 | void (*handle)(unsigned int irq, | 67 | void (*handle)(struct irq_desc *desc), |
| 68 | struct irq_desc *desc), | ||
| 69 | unsigned int irq, unsigned int cnt); | 68 | unsigned int irq, unsigned int cnt); |
| 70 | 69 | ||
| 71 | extern unsigned int irq_canonicalize(unsigned int irq); | 70 | extern unsigned int irq_canonicalize(unsigned int irq); |
diff --git a/arch/m68k/include/asm/linkage.h b/arch/m68k/include/asm/linkage.h index 5a822bb790f7..066e74f666ae 100644 --- a/arch/m68k/include/asm/linkage.h +++ b/arch/m68k/include/asm/linkage.h | |||
| @@ -4,4 +4,34 @@ | |||
| 4 | #define __ALIGN .align 4 | 4 | #define __ALIGN .align 4 |
| 5 | #define __ALIGN_STR ".align 4" | 5 | #define __ALIGN_STR ".align 4" |
| 6 | 6 | ||
| 7 | /* | ||
| 8 | * Make sure the compiler doesn't do anything stupid with the | ||
| 9 | * arguments on the stack - they are owned by the *caller*, not | ||
| 10 | * the callee. This just fools gcc into not spilling into them, | ||
| 11 | * and keeps it from doing tailcall recursion and/or using the | ||
| 12 | * stack slots for temporaries, since they are live and "used" | ||
| 13 | * all the way to the end of the function. | ||
| 14 | */ | ||
| 15 | #define asmlinkage_protect(n, ret, args...) \ | ||
| 16 | __asmlinkage_protect##n(ret, ##args) | ||
| 17 | #define __asmlinkage_protect_n(ret, args...) \ | ||
| 18 | __asm__ __volatile__ ("" : "=r" (ret) : "0" (ret), ##args) | ||
| 19 | #define __asmlinkage_protect0(ret) \ | ||
| 20 | __asmlinkage_protect_n(ret) | ||
| 21 | #define __asmlinkage_protect1(ret, arg1) \ | ||
| 22 | __asmlinkage_protect_n(ret, "m" (arg1)) | ||
| 23 | #define __asmlinkage_protect2(ret, arg1, arg2) \ | ||
| 24 | __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2)) | ||
| 25 | #define __asmlinkage_protect3(ret, arg1, arg2, arg3) \ | ||
| 26 | __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3)) | ||
| 27 | #define __asmlinkage_protect4(ret, arg1, arg2, arg3, arg4) \ | ||
| 28 | __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ | ||
| 29 | "m" (arg4)) | ||
| 30 | #define __asmlinkage_protect5(ret, arg1, arg2, arg3, arg4, arg5) \ | ||
| 31 | __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ | ||
| 32 | "m" (arg4), "m" (arg5)) | ||
| 33 | #define __asmlinkage_protect6(ret, arg1, arg2, arg3, arg4, arg5, arg6) \ | ||
| 34 | __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ | ||
| 35 | "m" (arg4), "m" (arg5), "m" (arg6)) | ||
| 36 | |||
| 7 | #endif | 37 | #endif |
diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h index fe3fc9ae1b69..53c632c85b03 100644 --- a/arch/m68k/include/asm/mac_via.h +++ b/arch/m68k/include/asm/mac_via.h | |||
| @@ -261,7 +261,7 @@ extern void via_irq_enable(int); | |||
| 261 | extern void via_irq_disable(int); | 261 | extern void via_irq_disable(int); |
| 262 | extern void via_nubus_irq_startup(int irq); | 262 | extern void via_nubus_irq_startup(int irq); |
| 263 | extern void via_nubus_irq_shutdown(int irq); | 263 | extern void via_nubus_irq_shutdown(int irq); |
| 264 | extern void via1_irq(unsigned int irq, struct irq_desc *desc); | 264 | extern void via1_irq(struct irq_desc *desc); |
| 265 | extern void via1_set_head(int); | 265 | extern void via1_set_head(int); |
| 266 | extern int via2_scsi_drq_pending(void); | 266 | extern int via2_scsi_drq_pending(void); |
| 267 | 267 | ||
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 244e0dbe45db..0793a7f17417 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 356 | 7 | #define NR_syscalls 375 |
| 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 61fb6cb9d2ae..5e6fae6c275f 100644 --- a/arch/m68k/include/uapi/asm/unistd.h +++ b/arch/m68k/include/uapi/asm/unistd.h | |||
| @@ -361,5 +361,24 @@ | |||
| 361 | #define __NR_memfd_create 353 | 361 | #define __NR_memfd_create 353 |
| 362 | #define __NR_bpf 354 | 362 | #define __NR_bpf 354 |
| 363 | #define __NR_execveat 355 | 363 | #define __NR_execveat 355 |
| 364 | #define __NR_socket 356 | ||
| 365 | #define __NR_socketpair 357 | ||
| 366 | #define __NR_bind 358 | ||
| 367 | #define __NR_connect 359 | ||
| 368 | #define __NR_listen 360 | ||
| 369 | #define __NR_accept4 361 | ||
| 370 | #define __NR_getsockopt 362 | ||
| 371 | #define __NR_setsockopt 363 | ||
| 372 | #define __NR_getsockname 364 | ||
| 373 | #define __NR_getpeername 365 | ||
| 374 | #define __NR_sendto 366 | ||
| 375 | #define __NR_sendmsg 367 | ||
| 376 | #define __NR_recvfrom 368 | ||
| 377 | #define __NR_recvmsg 369 | ||
| 378 | #define __NR_shutdown 370 | ||
| 379 | #define __NR_recvmmsg 371 | ||
| 380 | #define __NR_sendmmsg 372 | ||
| 381 | #define __NR_userfaultfd 373 | ||
| 382 | #define __NR_membarrier 374 | ||
| 364 | 383 | ||
| 365 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ | 384 | #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ |
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index a0ec4303f2c8..5dd0e80042f5 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
| @@ -376,4 +376,22 @@ ENTRY(sys_call_table) | |||
| 376 | .long sys_memfd_create | 376 | .long sys_memfd_create |
| 377 | .long sys_bpf | 377 | .long sys_bpf |
| 378 | .long sys_execveat /* 355 */ | 378 | .long sys_execveat /* 355 */ |
| 379 | 379 | .long sys_socket | |
| 380 | .long sys_socketpair | ||
| 381 | .long sys_bind | ||
| 382 | .long sys_connect | ||
| 383 | .long sys_listen /* 360 */ | ||
| 384 | .long sys_accept4 | ||
| 385 | .long sys_getsockopt | ||
| 386 | .long sys_setsockopt | ||
| 387 | .long sys_getsockname | ||
| 388 | .long sys_getpeername /* 365 */ | ||
| 389 | .long sys_sendto | ||
| 390 | .long sys_sendmsg | ||
| 391 | .long sys_recvfrom | ||
| 392 | .long sys_recvmsg | ||
| 393 | .long sys_shutdown /* 370 */ | ||
| 394 | .long sys_recvmmsg | ||
| 395 | .long sys_sendmmsg | ||
| 396 | .long sys_userfaultfd | ||
| 397 | .long sys_membarrier | ||
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 3fe0e43d44f6..f6f7d42713ec 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c | |||
| @@ -45,7 +45,7 @@ void __init baboon_init(void) | |||
| 45 | * Baboon interrupt handler. This works a lot like a VIA. | 45 | * Baboon interrupt handler. This works a lot like a VIA. |
| 46 | */ | 46 | */ |
| 47 | 47 | ||
| 48 | static void baboon_irq(unsigned int irq, struct irq_desc *desc) | 48 | static void baboon_irq(struct irq_desc *desc) |
| 49 | { | 49 | { |
| 50 | int irq_bit, irq_num; | 50 | int irq_bit, irq_num; |
| 51 | unsigned char events; | 51 | unsigned char events; |
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index 191610d97689..55d6592783f5 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c | |||
| @@ -63,7 +63,7 @@ void __init oss_nubus_init(void) | |||
| 63 | * Handle miscellaneous OSS interrupts. | 63 | * Handle miscellaneous OSS interrupts. |
| 64 | */ | 64 | */ |
| 65 | 65 | ||
| 66 | static void oss_irq(unsigned int __irq, struct irq_desc *desc) | 66 | static void oss_irq(struct irq_desc *desc) |
| 67 | { | 67 | { |
| 68 | int events = oss->irq_pending & | 68 | int events = oss->irq_pending & |
| 69 | (OSS_IP_IOPSCC | OSS_IP_SCSI | OSS_IP_IOPISM); | 69 | (OSS_IP_IOPSCC | OSS_IP_SCSI | OSS_IP_IOPISM); |
| @@ -99,7 +99,7 @@ static void oss_irq(unsigned int __irq, struct irq_desc *desc) | |||
| 99 | * Unlike the VIA/RBV this is on its own autovector interrupt level. | 99 | * Unlike the VIA/RBV this is on its own autovector interrupt level. |
| 100 | */ | 100 | */ |
| 101 | 101 | ||
| 102 | static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) | 102 | static void oss_nubus_irq(struct irq_desc *desc) |
| 103 | { | 103 | { |
| 104 | int events, irq_bit, i; | 104 | int events, irq_bit, i; |
| 105 | 105 | ||
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index 3b9e302e7a37..cd38f29955c8 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c | |||
| @@ -113,7 +113,7 @@ void __init psc_init(void) | |||
| 113 | * PSC interrupt handler. It's a lot like the VIA interrupt handler. | 113 | * PSC interrupt handler. It's a lot like the VIA interrupt handler. |
| 114 | */ | 114 | */ |
| 115 | 115 | ||
| 116 | static void psc_irq(unsigned int __irq, struct irq_desc *desc) | 116 | static void psc_irq(struct irq_desc *desc) |
| 117 | { | 117 | { |
| 118 | unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); | 118 | unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); |
| 119 | unsigned int irq = irq_desc_get_irq(desc); | 119 | unsigned int irq = irq_desc_get_irq(desc); |
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index e198dec868e4..ce56e04386e7 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
| @@ -446,7 +446,7 @@ void via_nubus_irq_shutdown(int irq) | |||
| 446 | * via6522.c :-), disable/pending masks added. | 446 | * via6522.c :-), disable/pending masks added. |
| 447 | */ | 447 | */ |
| 448 | 448 | ||
| 449 | void via1_irq(unsigned int irq, struct irq_desc *desc) | 449 | void via1_irq(struct irq_desc *desc) |
| 450 | { | 450 | { |
| 451 | int irq_num; | 451 | int irq_num; |
| 452 | unsigned char irq_bit, events; | 452 | unsigned char irq_bit, events; |
| @@ -467,7 +467,7 @@ void via1_irq(unsigned int irq, struct irq_desc *desc) | |||
| 467 | } while (events >= irq_bit); | 467 | } while (events >= irq_bit); |
| 468 | } | 468 | } |
| 469 | 469 | ||
| 470 | static void via2_irq(unsigned int irq, struct irq_desc *desc) | 470 | static void via2_irq(struct irq_desc *desc) |
| 471 | { | 471 | { |
| 472 | int irq_num; | 472 | int irq_num; |
| 473 | unsigned char irq_bit, events; | 473 | unsigned char irq_bit, events; |
| @@ -493,7 +493,7 @@ static void via2_irq(unsigned int irq, struct irq_desc *desc) | |||
| 493 | * VIA2 dispatcher as a fast interrupt handler. | 493 | * VIA2 dispatcher as a fast interrupt handler. |
| 494 | */ | 494 | */ |
| 495 | 495 | ||
| 496 | void via_nubus_irq(unsigned int irq, struct irq_desc *desc) | 496 | static void via_nubus_irq(struct irq_desc *desc) |
| 497 | { | 497 | { |
| 498 | int slot_irq; | 498 | int slot_irq; |
| 499 | unsigned char slot_bit, events; | 499 | unsigned char slot_bit, events; |
diff --git a/arch/metag/include/asm/Kbuild b/arch/metag/include/asm/Kbuild index df31353fd200..29acb89daaaa 100644 --- a/arch/metag/include/asm/Kbuild +++ b/arch/metag/include/asm/Kbuild | |||
| @@ -54,4 +54,5 @@ generic-y += ucontext.h | |||
| 54 | generic-y += unaligned.h | 54 | generic-y += unaligned.h |
| 55 | generic-y += user.h | 55 | generic-y += user.h |
| 56 | generic-y += vga.h | 56 | generic-y += vga.h |
| 57 | generic-y += word-at-a-time.h | ||
| 57 | generic-y += xor.h | 58 | generic-y += xor.h |
diff --git a/arch/metag/kernel/irq.c b/arch/metag/kernel/irq.c index a336094a7a6c..3074b64793e6 100644 --- a/arch/metag/kernel/irq.c +++ b/arch/metag/kernel/irq.c | |||
| @@ -94,13 +94,11 @@ void do_IRQ(int irq, struct pt_regs *regs) | |||
| 94 | "MOV D0.5,%0\n" | 94 | "MOV D0.5,%0\n" |
| 95 | "MOV D1Ar1,%1\n" | 95 | "MOV D1Ar1,%1\n" |
| 96 | "MOV D1RtP,%2\n" | 96 | "MOV D1RtP,%2\n" |
| 97 | "MOV D0Ar2,%3\n" | ||
| 98 | "SWAP A0StP,D0.5\n" | 97 | "SWAP A0StP,D0.5\n" |
| 99 | "SWAP PC,D1RtP\n" | 98 | "SWAP PC,D1RtP\n" |
| 100 | "MOV A0StP,D0.5\n" | 99 | "MOV A0StP,D0.5\n" |
| 101 | : | 100 | : |
| 102 | : "r" (isp), "r" (irq), "r" (desc->handle_irq), | 101 | : "r" (isp), "r" (desc), "r" (desc->handle_irq) |
| 103 | "r" (desc) | ||
| 104 | : "memory", "cc", "D1Ar1", "D0Ar2", "D1Ar3", "D0Ar4", | 102 | : "memory", "cc", "D1Ar1", "D0Ar2", "D1Ar3", "D0Ar4", |
| 105 | "D1Ar5", "D0Ar6", "D0Re0", "D1Re0", "D0.4", "D1RtP", | 103 | "D1Ar5", "D0Ar6", "D0Re0", "D1Re0", "D0.4", "D1RtP", |
| 106 | "D0.5" | 104 | "D0.5" |
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index 2f222f355c4b..b0ae88c9fed9 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild | |||
| @@ -10,3 +10,4 @@ generic-y += mm-arch-hooks.h | |||
| 10 | generic-y += preempt.h | 10 | generic-y += preempt.h |
| 11 | generic-y += syscalls.h | 11 | generic-y += syscalls.h |
| 12 | generic-y += trace_clock.h | 12 | generic-y += trace_clock.h |
| 13 | generic-y += word-at-a-time.h | ||
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 6b8b75266801..ae838ed5fcf2 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
| @@ -863,7 +863,14 @@ void pcibios_setup_bus_devices(struct pci_bus *bus) | |||
| 863 | 863 | ||
| 864 | void pcibios_fixup_bus(struct pci_bus *bus) | 864 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 865 | { | 865 | { |
| 866 | /* Fixup the bus */ | 866 | /* When called from the generic PCI probe, read PCI<->PCI bridge |
| 867 | * bases. This is -not- called when generating the PCI tree from | ||
| 868 | * the OF device-tree. | ||
| 869 | */ | ||
| 870 | if (bus->self != NULL) | ||
| 871 | pci_read_bridge_bases(bus); | ||
| 872 | |||
| 873 | /* Now fixup the bus bus */ | ||
| 867 | pcibios_setup_bus_self(bus); | 874 | pcibios_setup_bus_self(bus); |
| 868 | 875 | ||
| 869 | /* Now fixup devices on that bus */ | 876 | /* Now fixup devices on that bus */ |
diff --git a/arch/mips/alchemy/common/irq.c b/arch/mips/alchemy/common/irq.c index 4c496c50edf6..da9f9220048f 100644 --- a/arch/mips/alchemy/common/irq.c +++ b/arch/mips/alchemy/common/irq.c | |||
| @@ -851,7 +851,7 @@ static struct syscore_ops alchemy_gpic_pmops = { | |||
| 851 | 851 | ||
| 852 | /* create chained handlers for the 4 IC requests to the MIPS IRQ ctrl */ | 852 | /* create chained handlers for the 4 IC requests to the MIPS IRQ ctrl */ |
| 853 | #define DISP(name, base, addr) \ | 853 | #define DISP(name, base, addr) \ |
| 854 | static void au1000_##name##_dispatch(unsigned int irq, struct irq_desc *d) \ | 854 | static void au1000_##name##_dispatch(struct irq_desc *d) \ |
| 855 | { \ | 855 | { \ |
| 856 | unsigned long r = __raw_readl((void __iomem *)KSEG1ADDR(addr)); \ | 856 | unsigned long r = __raw_readl((void __iomem *)KSEG1ADDR(addr)); \ |
| 857 | if (likely(r)) \ | 857 | if (likely(r)) \ |
| @@ -865,7 +865,7 @@ DISP(ic0r1, AU1000_INTC0_INT_BASE, AU1000_IC0_PHYS_ADDR + IC_REQ1INT) | |||
| 865 | DISP(ic1r0, AU1000_INTC1_INT_BASE, AU1000_IC1_PHYS_ADDR + IC_REQ0INT) | 865 | DISP(ic1r0, AU1000_INTC1_INT_BASE, AU1000_IC1_PHYS_ADDR + IC_REQ0INT) |
| 866 | DISP(ic1r1, AU1000_INTC1_INT_BASE, AU1000_IC1_PHYS_ADDR + IC_REQ1INT) | 866 | DISP(ic1r1, AU1000_INTC1_INT_BASE, AU1000_IC1_PHYS_ADDR + IC_REQ1INT) |
| 867 | 867 | ||
| 868 | static void alchemy_gpic_dispatch(unsigned int irq, struct irq_desc *d) | 868 | static void alchemy_gpic_dispatch(struct irq_desc *d) |
| 869 | { | 869 | { |
| 870 | int i = __raw_readl(AU1300_GPIC_ADDR + AU1300_GPIC_PRIENC); | 870 | int i = __raw_readl(AU1300_GPIC_ADDR + AU1300_GPIC_PRIENC); |
| 871 | generic_handle_irq(ALCHEMY_GPIC_INT_BASE + i); | 871 | generic_handle_irq(ALCHEMY_GPIC_INT_BASE + i); |
diff --git a/arch/mips/alchemy/devboards/bcsr.c b/arch/mips/alchemy/devboards/bcsr.c index 324ad72d7c36..faeddf119fd4 100644 --- a/arch/mips/alchemy/devboards/bcsr.c +++ b/arch/mips/alchemy/devboards/bcsr.c | |||
| @@ -86,7 +86,7 @@ EXPORT_SYMBOL_GPL(bcsr_mod); | |||
| 86 | /* | 86 | /* |
| 87 | * DB1200/PB1200 CPLD IRQ muxer | 87 | * DB1200/PB1200 CPLD IRQ muxer |
| 88 | */ | 88 | */ |
| 89 | static void bcsr_csc_handler(unsigned int irq, struct irq_desc *d) | 89 | static void bcsr_csc_handler(struct irq_desc *d) |
| 90 | { | 90 | { |
| 91 | unsigned short bisr = __raw_readw(bcsr_virt + BCSR_REG_INTSTAT); | 91 | unsigned short bisr = __raw_readw(bcsr_virt + BCSR_REG_INTSTAT); |
| 92 | struct irq_chip *chip = irq_desc_get_chip(d); | 92 | struct irq_chip *chip = irq_desc_get_chip(d); |
diff --git a/arch/mips/ath25/ar2315.c b/arch/mips/ath25/ar2315.c index ec9a371f1e62..8da996142d6a 100644 --- a/arch/mips/ath25/ar2315.c +++ b/arch/mips/ath25/ar2315.c | |||
| @@ -69,7 +69,7 @@ static struct irqaction ar2315_ahb_err_interrupt = { | |||
| 69 | .name = "ar2315-ahb-error", | 69 | .name = "ar2315-ahb-error", |
| 70 | }; | 70 | }; |
| 71 | 71 | ||
| 72 | static void ar2315_misc_irq_handler(unsigned irq, struct irq_desc *desc) | 72 | static void ar2315_misc_irq_handler(struct irq_desc *desc) |
| 73 | { | 73 | { |
| 74 | u32 pending = ar2315_rst_reg_read(AR2315_ISR) & | 74 | u32 pending = ar2315_rst_reg_read(AR2315_ISR) & |
| 75 | ar2315_rst_reg_read(AR2315_IMR); | 75 | ar2315_rst_reg_read(AR2315_IMR); |
diff --git a/arch/mips/ath25/ar5312.c b/arch/mips/ath25/ar5312.c index e63e38fa4880..acd55a9cffe3 100644 --- a/arch/mips/ath25/ar5312.c +++ b/arch/mips/ath25/ar5312.c | |||
| @@ -73,7 +73,7 @@ static struct irqaction ar5312_ahb_err_interrupt = { | |||
| 73 | .name = "ar5312-ahb-error", | 73 | .name = "ar5312-ahb-error", |
| 74 | }; | 74 | }; |
| 75 | 75 | ||
| 76 | static void ar5312_misc_irq_handler(unsigned irq, struct irq_desc *desc) | 76 | static void ar5312_misc_irq_handler(struct irq_desc *desc) |
| 77 | { | 77 | { |
| 78 | u32 pending = ar5312_rst_reg_read(AR5312_ISR) & | 78 | u32 pending = ar5312_rst_reg_read(AR5312_ISR) & |
| 79 | ar5312_rst_reg_read(AR5312_IMR); | 79 | ar5312_rst_reg_read(AR5312_IMR); |
diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c index 807132b838b2..eeb3953ed8ac 100644 --- a/arch/mips/ath79/irq.c +++ b/arch/mips/ath79/irq.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include "common.h" | 26 | #include "common.h" |
| 27 | #include "machtypes.h" | 27 | #include "machtypes.h" |
| 28 | 28 | ||
| 29 | static void ath79_misc_irq_handler(unsigned int irq, struct irq_desc *desc) | 29 | static void ath79_misc_irq_handler(struct irq_desc *desc) |
| 30 | { | 30 | { |
| 31 | void __iomem *base = ath79_reset_base; | 31 | void __iomem *base = ath79_reset_base; |
| 32 | u32 pending; | 32 | u32 pending; |
| @@ -119,7 +119,7 @@ static void __init ath79_misc_irq_init(void) | |||
| 119 | irq_set_chained_handler(ATH79_CPU_IRQ(6), ath79_misc_irq_handler); | 119 | irq_set_chained_handler(ATH79_CPU_IRQ(6), ath79_misc_irq_handler); |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | static void ar934x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) | 122 | static void ar934x_ip2_irq_dispatch(struct irq_desc *desc) |
| 123 | { | 123 | { |
| 124 | u32 status; | 124 | u32 status; |
| 125 | 125 | ||
| @@ -148,7 +148,7 @@ static void ar934x_ip2_irq_init(void) | |||
| 148 | irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch); | 148 | irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | static void qca955x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) | 151 | static void qca955x_ip2_irq_dispatch(struct irq_desc *desc) |
| 152 | { | 152 | { |
| 153 | u32 status; | 153 | u32 status; |
| 154 | 154 | ||
| @@ -171,7 +171,7 @@ static void qca955x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) | |||
| 171 | } | 171 | } |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | static void qca955x_ip3_irq_dispatch(unsigned int irq, struct irq_desc *desc) | 174 | static void qca955x_ip3_irq_dispatch(struct irq_desc *desc) |
| 175 | { | 175 | { |
| 176 | u32 status; | 176 | u32 status; |
| 177 | 177 | ||
| @@ -293,8 +293,26 @@ static int __init ath79_misc_intc_of_init( | |||
| 293 | 293 | ||
| 294 | return 0; | 294 | return 0; |
| 295 | } | 295 | } |
| 296 | IRQCHIP_DECLARE(ath79_misc_intc, "qca,ar7100-misc-intc", | 296 | |
| 297 | ath79_misc_intc_of_init); | 297 | static int __init ar7100_misc_intc_of_init( |
| 298 | struct device_node *node, struct device_node *parent) | ||
| 299 | { | ||
| 300 | ath79_misc_irq_chip.irq_mask_ack = ar71xx_misc_irq_mask; | ||
| 301 | return ath79_misc_intc_of_init(node, parent); | ||
| 302 | } | ||
| 303 | |||
| 304 | IRQCHIP_DECLARE(ar7100_misc_intc, "qca,ar7100-misc-intc", | ||
| 305 | ar7100_misc_intc_of_init); | ||
| 306 | |||
| 307 | static int __init ar7240_misc_intc_of_init( | ||
| 308 | struct device_node *node, struct device_node *parent) | ||
| 309 | { | ||
| 310 | ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack; | ||
| 311 | return ath79_misc_intc_of_init(node, parent); | ||
| 312 | } | ||
| 313 | |||
| 314 | IRQCHIP_DECLARE(ar7240_misc_intc, "qca,ar7240-misc-intc", | ||
| 315 | ar7240_misc_intc_of_init); | ||
| 298 | 316 | ||
| 299 | static int __init ar79_cpu_intc_of_init( | 317 | static int __init ar79_cpu_intc_of_init( |
| 300 | struct device_node *node, struct device_node *parent) | 318 | struct device_node *node, struct device_node *parent) |
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c index f26c3c661cca..0352bc8d56b3 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c | |||
| @@ -2221,7 +2221,7 @@ static irqreturn_t octeon_irq_cib_handler(int my_irq, void *data) | |||
| 2221 | if (irqd_get_trigger_type(irq_data) & | 2221 | if (irqd_get_trigger_type(irq_data) & |
| 2222 | IRQ_TYPE_EDGE_BOTH) | 2222 | IRQ_TYPE_EDGE_BOTH) |
| 2223 | cvmx_write_csr(host_data->raw_reg, 1ull << i); | 2223 | cvmx_write_csr(host_data->raw_reg, 1ull << i); |
| 2224 | generic_handle_irq_desc(irq, desc); | 2224 | generic_handle_irq_desc(desc); |
| 2225 | } | 2225 | } |
| 2226 | } | 2226 | } |
| 2227 | 2227 | ||
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index 89a628455bc2..bd634259eab9 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c | |||
| @@ -933,7 +933,7 @@ void __init plat_mem_setup(void) | |||
| 933 | while ((boot_mem_map.nr_map < BOOT_MEM_MAP_MAX) | 933 | while ((boot_mem_map.nr_map < BOOT_MEM_MAP_MAX) |
| 934 | && (total < MAX_MEMORY)) { | 934 | && (total < MAX_MEMORY)) { |
| 935 | memory = cvmx_bootmem_phy_alloc(mem_alloc_size, | 935 | memory = cvmx_bootmem_phy_alloc(mem_alloc_size, |
| 936 | __pa_symbol(&__init_end), -1, | 936 | __pa_symbol(&_end), -1, |
| 937 | 0x100000, | 937 | 0x100000, |
| 938 | CVMX_BOOTMEM_FLAG_NO_LOCKING); | 938 | CVMX_BOOTMEM_FLAG_NO_LOCKING); |
| 939 | if (memory >= 0) { | 939 | if (memory >= 0) { |
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild index 40ec4ca3f946..c7fe4d01e79c 100644 --- a/arch/mips/include/asm/Kbuild +++ b/arch/mips/include/asm/Kbuild | |||
| @@ -17,4 +17,5 @@ generic-y += segment.h | |||
| 17 | generic-y += serial.h | 17 | generic-y += serial.h |
| 18 | generic-y += trace_clock.h | 18 | generic-y += trace_clock.h |
| 19 | generic-y += user.h | 19 | generic-y += user.h |
| 20 | generic-y += word-at-a-time.h | ||
| 20 | generic-y += xor.h | 21 | generic-y += xor.h |
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index 9801ac982655..fe67f12ac239 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
| @@ -20,6 +20,9 @@ | |||
| 20 | #ifndef cpu_has_tlb | 20 | #ifndef cpu_has_tlb |
| 21 | #define cpu_has_tlb (cpu_data[0].options & MIPS_CPU_TLB) | 21 | #define cpu_has_tlb (cpu_data[0].options & MIPS_CPU_TLB) |
| 22 | #endif | 22 | #endif |
| 23 | #ifndef cpu_has_ftlb | ||
| 24 | #define cpu_has_ftlb (cpu_data[0].options & MIPS_CPU_FTLB) | ||
| 25 | #endif | ||
| 23 | #ifndef cpu_has_tlbinv | 26 | #ifndef cpu_has_tlbinv |
| 24 | #define cpu_has_tlbinv (cpu_data[0].options & MIPS_CPU_TLBINV) | 27 | #define cpu_has_tlbinv (cpu_data[0].options & MIPS_CPU_TLBINV) |
| 25 | #endif | 28 | #endif |
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index cd89e9855775..82ad15f11049 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h | |||
| @@ -385,6 +385,7 @@ enum cpu_type_enum { | |||
| 385 | #define MIPS_CPU_CDMM 0x4000000000ull /* CPU has Common Device Memory Map */ | 385 | #define MIPS_CPU_CDMM 0x4000000000ull /* CPU has Common Device Memory Map */ |
| 386 | #define MIPS_CPU_BP_GHIST 0x8000000000ull /* R12K+ Branch Prediction Global History */ | 386 | #define MIPS_CPU_BP_GHIST 0x8000000000ull /* R12K+ Branch Prediction Global History */ |
| 387 | #define MIPS_CPU_SP 0x10000000000ull /* Small (1KB) page support */ | 387 | #define MIPS_CPU_SP 0x10000000000ull /* Small (1KB) page support */ |
| 388 | #define MIPS_CPU_FTLB 0x20000000000ull /* CPU has Fixed-page-size TLB */ | ||
| 388 | 389 | ||
| 389 | /* | 390 | /* |
| 390 | * CPU ASE encodings | 391 | * CPU ASE encodings |
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 9e777cd42b67..d10fd80dbb7e 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h | |||
| @@ -256,6 +256,7 @@ static inline void __iomem * __ioremap_mode(phys_addr_t offset, unsigned long si | |||
| 256 | */ | 256 | */ |
| 257 | #define ioremap_nocache(offset, size) \ | 257 | #define ioremap_nocache(offset, size) \ |
| 258 | __ioremap_mode((offset), (size), _CACHE_UNCACHED) | 258 | __ioremap_mode((offset), (size), _CACHE_UNCACHED) |
| 259 | #define ioremap_uc ioremap_nocache | ||
| 259 | 260 | ||
| 260 | /* | 261 | /* |
| 261 | * ioremap_cachable - map bus memory into CPU space | 262 | * ioremap_cachable - map bus memory into CPU space |
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index e8c8d9d0c45f..5a1a882e0a75 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h | |||
| @@ -61,6 +61,7 @@ | |||
| 61 | #define KVM_PRIVATE_MEM_SLOTS 0 | 61 | #define KVM_PRIVATE_MEM_SLOTS 0 |
| 62 | 62 | ||
| 63 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 63 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| 64 | #define KVM_HALT_POLL_NS_DEFAULT 500000 | ||
| 64 | 65 | ||
| 65 | 66 | ||
| 66 | 67 | ||
| @@ -128,6 +129,7 @@ struct kvm_vcpu_stat { | |||
| 128 | u32 msa_disabled_exits; | 129 | u32 msa_disabled_exits; |
| 129 | u32 flush_dcache_exits; | 130 | u32 flush_dcache_exits; |
| 130 | u32 halt_successful_poll; | 131 | u32 halt_successful_poll; |
| 132 | u32 halt_attempted_poll; | ||
| 131 | u32 halt_wakeup; | 133 | u32 halt_wakeup; |
| 132 | }; | 134 | }; |
| 133 | 135 | ||
diff --git a/arch/mips/include/asm/maar.h b/arch/mips/include/asm/maar.h index b02891f9caaf..21d9607c80d7 100644 --- a/arch/mips/include/asm/maar.h +++ b/arch/mips/include/asm/maar.h | |||
| @@ -66,6 +66,15 @@ static inline void write_maar_pair(unsigned idx, phys_addr_t lower, | |||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | /** | 68 | /** |
| 69 | * maar_init() - initialise MAARs | ||
| 70 | * | ||
| 71 | * Performs initialisation of MAARs for the current CPU, making use of the | ||
| 72 | * platforms implementation of platform_maar_init where necessary and | ||
| 73 | * duplicating the setup it provides on secondary CPUs. | ||
| 74 | */ | ||
| 75 | extern void maar_init(void); | ||
| 76 | |||
| 77 | /** | ||
| 69 | * struct maar_config - MAAR configuration data | 78 | * struct maar_config - MAAR configuration data |
| 70 | * @lower: The lowest address that the MAAR pair will affect. Must be | 79 | * @lower: The lowest address that the MAAR pair will affect. Must be |
| 71 | * aligned to a 2^16 byte boundary. | 80 | * aligned to a 2^16 byte boundary. |
diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index d75b75e78ebb..1f1927ab4269 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h | |||
| @@ -194,6 +194,7 @@ BUILD_CM_RW(reg3_mask, MIPS_CM_GCB_OFS + 0xc8) | |||
| 194 | BUILD_CM_R_(gic_status, MIPS_CM_GCB_OFS + 0xd0) | 194 | BUILD_CM_R_(gic_status, MIPS_CM_GCB_OFS + 0xd0) |
| 195 | BUILD_CM_R_(cpc_status, MIPS_CM_GCB_OFS + 0xf0) | 195 | BUILD_CM_R_(cpc_status, MIPS_CM_GCB_OFS + 0xf0) |
| 196 | BUILD_CM_RW(l2_config, MIPS_CM_GCB_OFS + 0x130) | 196 | BUILD_CM_RW(l2_config, MIPS_CM_GCB_OFS + 0x130) |
| 197 | BUILD_CM_RW(sys_config2, MIPS_CM_GCB_OFS + 0x150) | ||
| 197 | 198 | ||
| 198 | /* Core Local & Core Other register accessor functions */ | 199 | /* Core Local & Core Other register accessor functions */ |
| 199 | BUILD_CM_Cx_RW(reset_release, 0x00) | 200 | BUILD_CM_Cx_RW(reset_release, 0x00) |
| @@ -316,6 +317,10 @@ BUILD_CM_Cx_R_(tcid_8_priority, 0x80) | |||
| 316 | #define CM_GCR_L2_CONFIG_ASSOC_SHF 0 | 317 | #define CM_GCR_L2_CONFIG_ASSOC_SHF 0 |
| 317 | #define CM_GCR_L2_CONFIG_ASSOC_MSK (_ULCAST_(0xff) << 0) | 318 | #define CM_GCR_L2_CONFIG_ASSOC_MSK (_ULCAST_(0xff) << 0) |
| 318 | 319 | ||
| 320 | /* GCR_SYS_CONFIG2 register fields */ | ||
| 321 | #define CM_GCR_SYS_CONFIG2_MAXVPW_SHF 0 | ||
| 322 | #define CM_GCR_SYS_CONFIG2_MAXVPW_MSK (_ULCAST_(0xf) << 0) | ||
| 323 | |||
| 319 | /* GCR_Cx_COHERENCE register fields */ | 324 | /* GCR_Cx_COHERENCE register fields */ |
| 320 | #define CM_GCR_Cx_COHERENCE_COHDOMAINEN_SHF 0 | 325 | #define CM_GCR_Cx_COHERENCE_COHDOMAINEN_SHF 0 |
| 321 | #define CM_GCR_Cx_COHERENCE_COHDOMAINEN_MSK (_ULCAST_(0xff) << 0) | 326 | #define CM_GCR_Cx_COHERENCE_COHDOMAINEN_MSK (_ULCAST_(0xff) << 0) |
| @@ -405,4 +410,38 @@ static inline int mips_cm_revision(void) | |||
| 405 | return read_gcr_rev(); | 410 | return read_gcr_rev(); |
| 406 | } | 411 | } |
| 407 | 412 | ||
| 413 | /** | ||
| 414 | * mips_cm_max_vp_width() - return the width in bits of VP indices | ||
| 415 | * | ||
| 416 | * Return: the width, in bits, of VP indices in fields that combine core & VP | ||
| 417 | * indices. | ||
| 418 | */ | ||
| 419 | static inline unsigned int mips_cm_max_vp_width(void) | ||
| 420 | { | ||
| 421 | extern int smp_num_siblings; | ||
| 422 | |||
| 423 | if (mips_cm_revision() >= CM_REV_CM3) | ||
| 424 | return read_gcr_sys_config2() & CM_GCR_SYS_CONFIG2_MAXVPW_MSK; | ||
| 425 | |||
| 426 | return smp_num_siblings; | ||
| 427 | } | ||
| 428 | |||
| 429 | /** | ||
| 430 | * mips_cm_vp_id() - calculate the hardware VP ID for a CPU | ||
| 431 | * @cpu: the CPU whose VP ID to calculate | ||
| 432 | * | ||
| 433 | * Hardware such as the GIC uses identifiers for VPs which may not match the | ||
| 434 | * CPU numbers used by Linux. This function calculates the hardware VP | ||
| 435 | * identifier corresponding to a given CPU. | ||
| 436 | * | ||
| 437 | * Return: the VP ID for the CPU. | ||
| 438 | */ | ||
| 439 | static inline unsigned int mips_cm_vp_id(unsigned int cpu) | ||
| 440 | { | ||
| 441 | unsigned int core = cpu_data[cpu].core; | ||
| 442 | unsigned int vp = cpu_vpe_id(&cpu_data[cpu]); | ||
| 443 | |||
| 444 | return (core * mips_cm_max_vp_width()) + vp; | ||
| 445 | } | ||
| 446 | |||
| 408 | #endif /* __MIPS_ASM_MIPS_CM_H__ */ | 447 | #endif /* __MIPS_ASM_MIPS_CM_H__ */ |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index d3cd8eac81e3..c64781cf649f 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
| @@ -487,6 +487,8 @@ | |||
| 487 | 487 | ||
| 488 | /* Bits specific to the MIPS32/64 PRA. */ | 488 | /* Bits specific to the MIPS32/64 PRA. */ |
| 489 | #define MIPS_CONF_MT (_ULCAST_(7) << 7) | 489 | #define MIPS_CONF_MT (_ULCAST_(7) << 7) |
| 490 | #define MIPS_CONF_MT_TLB (_ULCAST_(1) << 7) | ||
| 491 | #define MIPS_CONF_MT_FTLB (_ULCAST_(4) << 7) | ||
| 490 | #define MIPS_CONF_AR (_ULCAST_(7) << 10) | 492 | #define MIPS_CONF_AR (_ULCAST_(7) << 10) |
| 491 | #define MIPS_CONF_AT (_ULCAST_(3) << 13) | 493 | #define MIPS_CONF_AT (_ULCAST_(3) << 13) |
| 492 | #define MIPS_CONF_M (_ULCAST_(1) << 31) | 494 | #define MIPS_CONF_M (_ULCAST_(1) << 31) |
diff --git a/arch/mips/include/asm/netlogic/common.h b/arch/mips/include/asm/netlogic/common.h index 2a4c128277e4..be52c2125d71 100644 --- a/arch/mips/include/asm/netlogic/common.h +++ b/arch/mips/include/asm/netlogic/common.h | |||
| @@ -57,8 +57,8 @@ | |||
| 57 | #include <asm/mach-netlogic/multi-node.h> | 57 | #include <asm/mach-netlogic/multi-node.h> |
| 58 | 58 | ||
| 59 | struct irq_desc; | 59 | struct irq_desc; |
| 60 | void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc); | 60 | void nlm_smp_function_ipi_handler(struct irq_desc *desc); |
| 61 | void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc); | 61 | void nlm_smp_resched_ipi_handler(struct irq_desc *desc); |
| 62 | void nlm_smp_irq_init(int hwcpuid); | 62 | void nlm_smp_irq_init(int hwcpuid); |
| 63 | void nlm_boot_secondary_cpus(void); | 63 | void nlm_boot_secondary_cpus(void); |
| 64 | int nlm_wakeup_secondary_cpus(void); | 64 | int nlm_wakeup_secondary_cpus(void); |
diff --git a/arch/mips/include/uapi/asm/swab.h b/arch/mips/include/uapi/asm/swab.h index c4ddc4f0d2dc..23cd9b118c9e 100644 --- a/arch/mips/include/uapi/asm/swab.h +++ b/arch/mips/include/uapi/asm/swab.h | |||
| @@ -13,16 +13,15 @@ | |||
| 13 | 13 | ||
| 14 | #define __SWAB_64_THRU_32__ | 14 | #define __SWAB_64_THRU_32__ |
| 15 | 15 | ||
| 16 | #if (defined(__mips_isa_rev) && (__mips_isa_rev >= 2)) || \ | 16 | #if !defined(__mips16) && \ |
| 17 | defined(_MIPS_ARCH_LOONGSON3A) | 17 | ((defined(__mips_isa_rev) && (__mips_isa_rev >= 2)) || \ |
| 18 | defined(_MIPS_ARCH_LOONGSON3A)) | ||
| 18 | 19 | ||
| 19 | static inline __attribute__((nomips16)) __attribute_const__ | 20 | static inline __attribute_const__ __u16 __arch_swab16(__u16 x) |
| 20 | __u16 __arch_swab16(__u16 x) | ||
| 21 | { | 21 | { |
| 22 | __asm__( | 22 | __asm__( |
| 23 | " .set push \n" | 23 | " .set push \n" |
| 24 | " .set arch=mips32r2 \n" | 24 | " .set arch=mips32r2 \n" |
| 25 | " .set nomips16 \n" | ||
| 26 | " wsbh %0, %1 \n" | 25 | " wsbh %0, %1 \n" |
| 27 | " .set pop \n" | 26 | " .set pop \n" |
| 28 | : "=r" (x) | 27 | : "=r" (x) |
| @@ -32,13 +31,11 @@ static inline __attribute__((nomips16)) __attribute_const__ | |||
| 32 | } | 31 | } |
| 33 | #define __arch_swab16 __arch_swab16 | 32 | #define __arch_swab16 __arch_swab16 |
| 34 | 33 | ||
| 35 | static inline __attribute__((nomips16)) __attribute_const__ | 34 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) |
| 36 | __u32 __arch_swab32(__u32 x) | ||
| 37 | { | 35 | { |
| 38 | __asm__( | 36 | __asm__( |
| 39 | " .set push \n" | 37 | " .set push \n" |
| 40 | " .set arch=mips32r2 \n" | 38 | " .set arch=mips32r2 \n" |
| 41 | " .set nomips16 \n" | ||
| 42 | " wsbh %0, %1 \n" | 39 | " wsbh %0, %1 \n" |
| 43 | " rotr %0, %0, 16 \n" | 40 | " rotr %0, %0, 16 \n" |
| 44 | " .set pop \n" | 41 | " .set pop \n" |
| @@ -54,13 +51,11 @@ static inline __attribute__((nomips16)) __attribute_const__ | |||
| 54 | * 64-bit kernel on r2 CPUs. | 51 | * 64-bit kernel on r2 CPUs. |
| 55 | */ | 52 | */ |
| 56 | #ifdef __mips64 | 53 | #ifdef __mips64 |
| 57 | static inline __attribute__((nomips16)) __attribute_const__ | 54 | static inline __attribute_const__ __u64 __arch_swab64(__u64 x) |
| 58 | __u64 __arch_swab64(__u64 x) | ||
| 59 | { | 55 | { |
| 60 | __asm__( | 56 | __asm__( |
| 61 | " .set push \n" | 57 | " .set push \n" |
| 62 | " .set arch=mips64r2 \n" | 58 | " .set arch=mips64r2 \n" |
| 63 | " .set nomips16 \n" | ||
| 64 | " dsbh %0, %1 \n" | 59 | " dsbh %0, %1 \n" |
| 65 | " dshd %0, %0 \n" | 60 | " dshd %0, %0 \n" |
| 66 | " .set pop \n" | 61 | " .set pop \n" |
| @@ -71,5 +66,5 @@ static inline __attribute__((nomips16)) __attribute_const__ | |||
| 71 | } | 66 | } |
| 72 | #define __arch_swab64 __arch_swab64 | 67 | #define __arch_swab64 __arch_swab64 |
| 73 | #endif /* __mips64 */ | 68 | #endif /* __mips64 */ |
| 74 | #endif /* MIPS R2 or newer or Loongson 3A */ | 69 | #endif /* (not __mips16) and (MIPS R2 or newer or Loongson 3A) */ |
| 75 | #endif /* _ASM_SWAB_H */ | 70 | #endif /* _ASM_SWAB_H */ |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index c03088f9f514..cfabadb135d9 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
| @@ -377,16 +377,18 @@ | |||
| 377 | #define __NR_memfd_create (__NR_Linux + 354) | 377 | #define __NR_memfd_create (__NR_Linux + 354) |
| 378 | #define __NR_bpf (__NR_Linux + 355) | 378 | #define __NR_bpf (__NR_Linux + 355) |
| 379 | #define __NR_execveat (__NR_Linux + 356) | 379 | #define __NR_execveat (__NR_Linux + 356) |
| 380 | #define __NR_userfaultfd (__NR_Linux + 357) | ||
| 381 | #define __NR_membarrier (__NR_Linux + 358) | ||
| 380 | 382 | ||
| 381 | /* | 383 | /* |
| 382 | * Offset of the last Linux o32 flavoured syscall | 384 | * Offset of the last Linux o32 flavoured syscall |
| 383 | */ | 385 | */ |
| 384 | #define __NR_Linux_syscalls 356 | 386 | #define __NR_Linux_syscalls 358 |
| 385 | 387 | ||
| 386 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 388 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 387 | 389 | ||
| 388 | #define __NR_O32_Linux 4000 | 390 | #define __NR_O32_Linux 4000 |
| 389 | #define __NR_O32_Linux_syscalls 356 | 391 | #define __NR_O32_Linux_syscalls 358 |
| 390 | 392 | ||
| 391 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 393 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 392 | 394 | ||
| @@ -711,16 +713,18 @@ | |||
| 711 | #define __NR_memfd_create (__NR_Linux + 314) | 713 | #define __NR_memfd_create (__NR_Linux + 314) |
| 712 | #define __NR_bpf (__NR_Linux + 315) | 714 | #define __NR_bpf (__NR_Linux + 315) |
| 713 | #define __NR_execveat (__NR_Linux + 316) | 715 | #define __NR_execveat (__NR_Linux + 316) |
| 716 | #define __NR_userfaultfd (__NR_Linux + 317) | ||
| 717 | #define __NR_membarrier (__NR_Linux + 318) | ||
| 714 | 718 | ||
| 715 | /* | 719 | /* |
| 716 | * Offset of the last Linux 64-bit flavoured syscall | 720 | * Offset of the last Linux 64-bit flavoured syscall |
| 717 | */ | 721 | */ |
| 718 | #define __NR_Linux_syscalls 316 | 722 | #define __NR_Linux_syscalls 318 |
| 719 | 723 | ||
| 720 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 724 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 721 | 725 | ||
| 722 | #define __NR_64_Linux 5000 | 726 | #define __NR_64_Linux 5000 |
| 723 | #define __NR_64_Linux_syscalls 316 | 727 | #define __NR_64_Linux_syscalls 318 |
| 724 | 728 | ||
| 725 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 729 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 726 | 730 | ||
| @@ -1049,15 +1053,17 @@ | |||
| 1049 | #define __NR_memfd_create (__NR_Linux + 318) | 1053 | #define __NR_memfd_create (__NR_Linux + 318) |
| 1050 | #define __NR_bpf (__NR_Linux + 319) | 1054 | #define __NR_bpf (__NR_Linux + 319) |
| 1051 | #define __NR_execveat (__NR_Linux + 320) | 1055 | #define __NR_execveat (__NR_Linux + 320) |
| 1056 | #define __NR_userfaultfd (__NR_Linux + 321) | ||
| 1057 | #define __NR_membarrier (__NR_Linux + 322) | ||
| 1052 | 1058 | ||
| 1053 | /* | 1059 | /* |
| 1054 | * Offset of the last N32 flavoured syscall | 1060 | * Offset of the last N32 flavoured syscall |
| 1055 | */ | 1061 | */ |
| 1056 | #define __NR_Linux_syscalls 320 | 1062 | #define __NR_Linux_syscalls 322 |
| 1057 | 1063 | ||
| 1058 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1064 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 1059 | 1065 | ||
| 1060 | #define __NR_N32_Linux 6000 | 1066 | #define __NR_N32_Linux 6000 |
| 1061 | #define __NR_N32_Linux_syscalls 320 | 1067 | #define __NR_N32_Linux_syscalls 322 |
| 1062 | 1068 | ||
| 1063 | #endif /* _UAPI_ASM_UNISTD_H */ | 1069 | #endif /* _UAPI_ASM_UNISTD_H */ |
diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index 4e62bf85d0b0..459cb017306c 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/power/jz4740-battery.h> | 26 | #include <linux/power/jz4740-battery.h> |
| 27 | #include <linux/power/gpio-charger.h> | 27 | #include <linux/power/gpio-charger.h> |
| 28 | 28 | ||
| 29 | #include <asm/mach-jz4740/gpio.h> | ||
| 29 | #include <asm/mach-jz4740/jz4740_fb.h> | 30 | #include <asm/mach-jz4740/jz4740_fb.h> |
| 30 | #include <asm/mach-jz4740/jz4740_mmc.h> | 31 | #include <asm/mach-jz4740/jz4740_mmc.h> |
| 31 | #include <asm/mach-jz4740/jz4740_nand.h> | 32 | #include <asm/mach-jz4740/jz4740_nand.h> |
diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c index 6cd69fdaa1c5..8c6d76c9b2d6 100644 --- a/arch/mips/jz4740/gpio.c +++ b/arch/mips/jz4740/gpio.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
| 29 | 29 | ||
| 30 | #include <asm/mach-jz4740/base.h> | 30 | #include <asm/mach-jz4740/base.h> |
| 31 | #include <asm/mach-jz4740/gpio.h> | ||
| 31 | 32 | ||
| 32 | #define JZ4740_GPIO_BASE_A (32*0) | 33 | #define JZ4740_GPIO_BASE_A (32*0) |
| 33 | #define JZ4740_GPIO_BASE_B (32*1) | 34 | #define JZ4740_GPIO_BASE_B (32*1) |
| @@ -291,7 +292,7 @@ static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int i | |||
| 291 | writel(mask, reg); | 292 | writel(mask, reg); |
| 292 | } | 293 | } |
| 293 | 294 | ||
| 294 | static void jz_gpio_irq_demux_handler(unsigned int irq, struct irq_desc *desc) | 295 | static void jz_gpio_irq_demux_handler(struct irq_desc *desc) |
| 295 | { | 296 | { |
| 296 | uint32_t flag; | 297 | uint32_t flag; |
| 297 | unsigned int gpio_irq; | 298 | unsigned int gpio_irq; |
diff --git a/arch/mips/kernel/cps-vec.S b/arch/mips/kernel/cps-vec.S index 9f71c06aebf6..209ded16806b 100644 --- a/arch/mips/kernel/cps-vec.S +++ b/arch/mips/kernel/cps-vec.S | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | mfc0 \dest, CP0_CONFIG, 3 | 39 | mfc0 \dest, CP0_CONFIG, 3 |
| 40 | andi \dest, \dest, MIPS_CONF3_MT | 40 | andi \dest, \dest, MIPS_CONF3_MT |
| 41 | beqz \dest, \nomt | 41 | beqz \dest, \nomt |
| 42 | nop | ||
| 42 | .endm | 43 | .endm |
| 43 | 44 | ||
| 44 | .section .text.cps-vec | 45 | .section .text.cps-vec |
| @@ -223,10 +224,9 @@ LEAF(excep_ejtag) | |||
| 223 | END(excep_ejtag) | 224 | END(excep_ejtag) |
| 224 | 225 | ||
| 225 | LEAF(mips_cps_core_init) | 226 | LEAF(mips_cps_core_init) |
| 226 | #ifdef CONFIG_MIPS_MT | 227 | #ifdef CONFIG_MIPS_MT_SMP |
| 227 | /* Check that the core implements the MT ASE */ | 228 | /* Check that the core implements the MT ASE */ |
| 228 | has_mt t0, 3f | 229 | has_mt t0, 3f |
| 229 | nop | ||
| 230 | 230 | ||
| 231 | .set push | 231 | .set push |
| 232 | .set mips64r2 | 232 | .set mips64r2 |
| @@ -310,8 +310,9 @@ LEAF(mips_cps_boot_vpes) | |||
| 310 | PTR_ADDU t0, t0, t1 | 310 | PTR_ADDU t0, t0, t1 |
| 311 | 311 | ||
| 312 | /* Calculate this VPEs ID. If the core doesn't support MT use 0 */ | 312 | /* Calculate this VPEs ID. If the core doesn't support MT use 0 */ |
| 313 | li t9, 0 | ||
| 314 | #ifdef CONFIG_MIPS_MT_SMP | ||
| 313 | has_mt ta2, 1f | 315 | has_mt ta2, 1f |
| 314 | li t9, 0 | ||
| 315 | 316 | ||
| 316 | /* Find the number of VPEs present in the core */ | 317 | /* Find the number of VPEs present in the core */ |
| 317 | mfc0 t1, CP0_MVPCONF0 | 318 | mfc0 t1, CP0_MVPCONF0 |
| @@ -330,6 +331,7 @@ LEAF(mips_cps_boot_vpes) | |||
| 330 | /* Retrieve the VPE ID from EBase.CPUNum */ | 331 | /* Retrieve the VPE ID from EBase.CPUNum */ |
| 331 | mfc0 t9, $15, 1 | 332 | mfc0 t9, $15, 1 |
| 332 | and t9, t9, t1 | 333 | and t9, t9, t1 |
| 334 | #endif | ||
| 333 | 335 | ||
| 334 | 1: /* Calculate a pointer to this VPEs struct vpe_boot_config */ | 336 | 1: /* Calculate a pointer to this VPEs struct vpe_boot_config */ |
| 335 | li t1, VPEBOOTCFG_SIZE | 337 | li t1, VPEBOOTCFG_SIZE |
| @@ -337,7 +339,7 @@ LEAF(mips_cps_boot_vpes) | |||
| 337 | PTR_L ta3, COREBOOTCFG_VPECONFIG(t0) | 339 | PTR_L ta3, COREBOOTCFG_VPECONFIG(t0) |
| 338 | PTR_ADDU v0, v0, ta3 | 340 | PTR_ADDU v0, v0, ta3 |
| 339 | 341 | ||
| 340 | #ifdef CONFIG_MIPS_MT | 342 | #ifdef CONFIG_MIPS_MT_SMP |
| 341 | 343 | ||
| 342 | /* If the core doesn't support MT then return */ | 344 | /* If the core doesn't support MT then return */ |
| 343 | bnez ta2, 1f | 345 | bnez ta2, 1f |
| @@ -451,7 +453,7 @@ LEAF(mips_cps_boot_vpes) | |||
| 451 | 453 | ||
| 452 | 2: .set pop | 454 | 2: .set pop |
| 453 | 455 | ||
| 454 | #endif /* CONFIG_MIPS_MT */ | 456 | #endif /* CONFIG_MIPS_MT_SMP */ |
| 455 | 457 | ||
| 456 | /* Return */ | 458 | /* Return */ |
| 457 | jr ra | 459 | jr ra |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 571a8e6ea5bd..09a51d091941 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
| @@ -410,16 +410,18 @@ static int set_ftlb_enable(struct cpuinfo_mips *c, int enable) | |||
| 410 | static inline unsigned int decode_config0(struct cpuinfo_mips *c) | 410 | static inline unsigned int decode_config0(struct cpuinfo_mips *c) |
| 411 | { | 411 | { |
| 412 | unsigned int config0; | 412 | unsigned int config0; |
| 413 | int isa; | 413 | int isa, mt; |
| 414 | 414 | ||
| 415 | config0 = read_c0_config(); | 415 | config0 = read_c0_config(); |
| 416 | 416 | ||
| 417 | /* | 417 | /* |
| 418 | * Look for Standard TLB or Dual VTLB and FTLB | 418 | * Look for Standard TLB or Dual VTLB and FTLB |
| 419 | */ | 419 | */ |
| 420 | if ((((config0 & MIPS_CONF_MT) >> 7) == 1) || | 420 | mt = config0 & MIPS_CONF_MT; |
| 421 | (((config0 & MIPS_CONF_MT) >> 7) == 4)) | 421 | if (mt == MIPS_CONF_MT_TLB) |
| 422 | c->options |= MIPS_CPU_TLB; | 422 | c->options |= MIPS_CPU_TLB; |
| 423 | else if (mt == MIPS_CONF_MT_FTLB) | ||
| 424 | c->options |= MIPS_CPU_TLB | MIPS_CPU_FTLB; | ||
| 423 | 425 | ||
| 424 | isa = (config0 & MIPS_CONF_AT) >> 13; | 426 | isa = (config0 & MIPS_CONF_AT) >> 13; |
| 425 | switch (isa) { | 427 | switch (isa) { |
| @@ -559,15 +561,18 @@ static inline unsigned int decode_config4(struct cpuinfo_mips *c) | |||
| 559 | if (cpu_has_tlb) { | 561 | if (cpu_has_tlb) { |
| 560 | if (((config4 & MIPS_CONF4_IE) >> 29) == 2) | 562 | if (((config4 & MIPS_CONF4_IE) >> 29) == 2) |
| 561 | c->options |= MIPS_CPU_TLBINV; | 563 | c->options |= MIPS_CPU_TLBINV; |
| 564 | |||
| 562 | /* | 565 | /* |
| 563 | * This is a bit ugly. R6 has dropped that field from | 566 | * R6 has dropped the MMUExtDef field from config4. |
| 564 | * config4 and the only valid configuration is VTLB+FTLB so | 567 | * On R6 the fields always describe the FTLB, and only if it is |
| 565 | * set a good value for mmuextdef for that case. | 568 | * present according to Config.MT. |
| 566 | */ | 569 | */ |
| 567 | if (cpu_has_mips_r6) | 570 | if (!cpu_has_mips_r6) |
| 571 | mmuextdef = config4 & MIPS_CONF4_MMUEXTDEF; | ||
| 572 | else if (cpu_has_ftlb) | ||
| 568 | mmuextdef = MIPS_CONF4_MMUEXTDEF_VTLBSIZEEXT; | 573 | mmuextdef = MIPS_CONF4_MMUEXTDEF_VTLBSIZEEXT; |
| 569 | else | 574 | else |
| 570 | mmuextdef = config4 & MIPS_CONF4_MMUEXTDEF; | 575 | mmuextdef = 0; |
| 571 | 576 | ||
| 572 | switch (mmuextdef) { | 577 | switch (mmuextdef) { |
| 573 | case MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT: | 578 | case MIPS_CONF4_MMUEXTDEF_MMUSIZEEXT: |
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S index 423ae83af1fb..3375745b9198 100644 --- a/arch/mips/kernel/octeon_switch.S +++ b/arch/mips/kernel/octeon_switch.S | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | .set pop | 18 | .set pop |
| 19 | /* | 19 | /* |
| 20 | * task_struct *resume(task_struct *prev, task_struct *next, | 20 | * task_struct *resume(task_struct *prev, task_struct *next, |
| 21 | * struct thread_info *next_ti, int usedfpu) | 21 | * struct thread_info *next_ti) |
| 22 | */ | 22 | */ |
| 23 | .align 7 | 23 | .align 7 |
| 24 | LEAF(resume) | 24 | LEAF(resume) |
| @@ -28,30 +28,6 @@ | |||
| 28 | cpu_save_nonscratch a0 | 28 | cpu_save_nonscratch a0 |
| 29 | LONG_S ra, THREAD_REG31(a0) | 29 | LONG_S ra, THREAD_REG31(a0) |
| 30 | 30 | ||
| 31 | /* | ||
| 32 | * check if we need to save FPU registers | ||
| 33 | */ | ||
| 34 | .set push | ||
| 35 | .set noreorder | ||
| 36 | beqz a3, 1f | ||
| 37 | PTR_L t3, TASK_THREAD_INFO(a0) | ||
| 38 | .set pop | ||
| 39 | |||
| 40 | /* | ||
| 41 | * clear saved user stack CU1 bit | ||
| 42 | */ | ||
| 43 | LONG_L t0, ST_OFF(t3) | ||
| 44 | li t1, ~ST0_CU1 | ||
| 45 | and t0, t0, t1 | ||
| 46 | LONG_S t0, ST_OFF(t3) | ||
| 47 | |||
| 48 | .set push | ||
| 49 | .set arch=mips64r2 | ||
| 50 | fpu_save_double a0 t0 t1 # c0_status passed in t0 | ||
| 51 | # clobbers t1 | ||
| 52 | .set pop | ||
| 53 | 1: | ||
| 54 | |||
| 55 | #if CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0 | 31 | #if CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0 |
| 56 | /* Check if we need to store CVMSEG state */ | 32 | /* Check if we need to store CVMSEG state */ |
| 57 | dmfc0 t0, $11,7 /* CvmMemCtl */ | 33 | dmfc0 t0, $11,7 /* CvmMemCtl */ |
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 5087a4b72e6b..ac27ef7d4d0e 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
| @@ -31,18 +31,8 @@ | |||
| 31 | #define ST_OFF (_THREAD_SIZE - 32 - PT_SIZE + PT_STATUS) | 31 | #define ST_OFF (_THREAD_SIZE - 32 - PT_SIZE + PT_STATUS) |
| 32 | 32 | ||
| 33 | /* | 33 | /* |
| 34 | * FPU context is saved iff the process has used it's FPU in the current | ||
| 35 | * time slice as indicated by TIF_USEDFPU. In any case, the CU1 bit for user | ||
| 36 | * space STATUS register should be 0, so that a process *always* starts its | ||
| 37 | * userland with FPU disabled after each context switch. | ||
| 38 | * | ||
| 39 | * FPU will be enabled as soon as the process accesses FPU again, through | ||
| 40 | * do_cpu() trap. | ||
| 41 | */ | ||
| 42 | |||
| 43 | /* | ||
| 44 | * task_struct *resume(task_struct *prev, task_struct *next, | 34 | * task_struct *resume(task_struct *prev, task_struct *next, |
| 45 | * struct thread_info *next_ti, int usedfpu) | 35 | * struct thread_info *next_ti) |
| 46 | */ | 36 | */ |
| 47 | LEAF(resume) | 37 | LEAF(resume) |
| 48 | mfc0 t1, CP0_STATUS | 38 | mfc0 t1, CP0_STATUS |
| @@ -50,22 +40,6 @@ LEAF(resume) | |||
| 50 | cpu_save_nonscratch a0 | 40 | cpu_save_nonscratch a0 |
| 51 | sw ra, THREAD_REG31(a0) | 41 | sw ra, THREAD_REG31(a0) |
| 52 | 42 | ||
| 53 | beqz a3, 1f | ||
| 54 | |||
| 55 | PTR_L t3, TASK_THREAD_INFO(a0) | ||
| 56 | |||
| 57 | /* | ||
| 58 | * clear saved user stack CU1 bit | ||
| 59 | */ | ||
| 60 | lw t0, ST_OFF(t3) | ||
| 61 | li t1, ~ST0_CU1 | ||
| 62 | and t0, t0, t1 | ||
| 63 | sw t0, ST_OFF(t3) | ||
| 64 | |||
| 65 | fpu_save_single a0, t0 # clobbers t0 | ||
| 66 | |||
| 67 | 1: | ||
| 68 | |||
| 69 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) | 43 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) |
| 70 | PTR_LA t8, __stack_chk_guard | 44 | PTR_LA t8, __stack_chk_guard |
| 71 | LONG_L t9, TASK_STACK_CANARY(a1) | 45 | LONG_L t9, TASK_STACK_CANARY(a1) |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 4cc13508d967..65a74e4f0f45 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -36,16 +36,8 @@ NESTED(handle_sys, PT_SIZE, sp) | |||
| 36 | lw t1, PT_EPC(sp) # skip syscall on return | 36 | lw t1, PT_EPC(sp) # skip syscall on return |
| 37 | 37 | ||
| 38 | subu v0, v0, __NR_O32_Linux # check syscall number | 38 | subu v0, v0, __NR_O32_Linux # check syscall number |
| 39 | sltiu t0, v0, __NR_O32_Linux_syscalls + 1 | ||
| 40 | addiu t1, 4 # skip to next instruction | 39 | addiu t1, 4 # skip to next instruction |
| 41 | sw t1, PT_EPC(sp) | 40 | sw t1, PT_EPC(sp) |
| 42 | beqz t0, illegal_syscall | ||
| 43 | |||
| 44 | sll t0, v0, 2 | ||
| 45 | la t1, sys_call_table | ||
| 46 | addu t1, t0 | ||
| 47 | lw t2, (t1) # syscall routine | ||
| 48 | beqz t2, illegal_syscall | ||
| 49 | 41 | ||
| 50 | sw a3, PT_R26(sp) # save a3 for syscall restarting | 42 | sw a3, PT_R26(sp) # save a3 for syscall restarting |
| 51 | 43 | ||
| @@ -96,6 +88,16 @@ loads_done: | |||
| 96 | li t1, _TIF_WORK_SYSCALL_ENTRY | 88 | li t1, _TIF_WORK_SYSCALL_ENTRY |
| 97 | and t0, t1 | 89 | and t0, t1 |
| 98 | bnez t0, syscall_trace_entry # -> yes | 90 | bnez t0, syscall_trace_entry # -> yes |
| 91 | syscall_common: | ||
| 92 | sltiu t0, v0, __NR_O32_Linux_syscalls + 1 | ||
| 93 | beqz t0, illegal_syscall | ||
| 94 | |||
| 95 | sll t0, v0, 2 | ||
| 96 | la t1, sys_call_table | ||
| 97 | addu t1, t0 | ||
| 98 | lw t2, (t1) # syscall routine | ||
| 99 | |||
| 100 | beqz t2, illegal_syscall | ||
| 99 | 101 | ||
| 100 | jalr t2 # Do The Real Thing (TM) | 102 | jalr t2 # Do The Real Thing (TM) |
| 101 | 103 | ||
| @@ -116,7 +118,7 @@ o32_syscall_exit: | |||
| 116 | 118 | ||
| 117 | syscall_trace_entry: | 119 | syscall_trace_entry: |
| 118 | SAVE_STATIC | 120 | SAVE_STATIC |
| 119 | move s0, t2 | 121 | move s0, v0 |
| 120 | move a0, sp | 122 | move a0, sp |
| 121 | 123 | ||
| 122 | /* | 124 | /* |
| @@ -129,27 +131,18 @@ syscall_trace_entry: | |||
| 129 | 131 | ||
| 130 | 1: jal syscall_trace_enter | 132 | 1: jal syscall_trace_enter |
| 131 | 133 | ||
| 132 | bltz v0, 2f # seccomp failed? Skip syscall | 134 | bltz v0, 1f # seccomp failed? Skip syscall |
| 135 | |||
| 136 | move v0, s0 # restore syscall | ||
| 133 | 137 | ||
| 134 | move t0, s0 | ||
| 135 | RESTORE_STATIC | 138 | RESTORE_STATIC |
| 136 | lw a0, PT_R4(sp) # Restore argument registers | 139 | lw a0, PT_R4(sp) # Restore argument registers |
| 137 | lw a1, PT_R5(sp) | 140 | lw a1, PT_R5(sp) |
| 138 | lw a2, PT_R6(sp) | 141 | lw a2, PT_R6(sp) |
| 139 | lw a3, PT_R7(sp) | 142 | lw a3, PT_R7(sp) |
| 140 | jalr t0 | 143 | j syscall_common |
| 141 | |||
| 142 | li t0, -EMAXERRNO - 1 # error? | ||
| 143 | sltu t0, t0, v0 | ||
| 144 | sw t0, PT_R7(sp) # set error flag | ||
| 145 | beqz t0, 1f | ||
| 146 | |||
| 147 | lw t1, PT_R2(sp) # syscall number | ||
| 148 | negu v0 # error | ||
| 149 | sw t1, PT_R0(sp) # save it for syscall restarting | ||
| 150 | 1: sw v0, PT_R2(sp) # result | ||
| 151 | 144 | ||
| 152 | 2: j syscall_exit | 145 | 1: j syscall_exit |
| 153 | 146 | ||
| 154 | /* ------------------------------------------------------------------------ */ | 147 | /* ------------------------------------------------------------------------ */ |
| 155 | 148 | ||
| @@ -599,3 +592,5 @@ EXPORT(sys_call_table) | |||
| 599 | PTR sys_memfd_create | 592 | PTR sys_memfd_create |
| 600 | PTR sys_bpf /* 4355 */ | 593 | PTR sys_bpf /* 4355 */ |
| 601 | PTR sys_execveat | 594 | PTR sys_execveat |
| 595 | PTR sys_userfaultfd | ||
| 596 | PTR sys_membarrier | ||
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index a6f6b762c47a..e732981cf99f 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -39,18 +39,11 @@ NESTED(handle_sys64, PT_SIZE, sp) | |||
| 39 | .set at | 39 | .set at |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | dsubu t0, v0, __NR_64_Linux # check syscall number | ||
| 43 | sltiu t0, t0, __NR_64_Linux_syscalls + 1 | ||
| 44 | #if !defined(CONFIG_MIPS32_O32) && !defined(CONFIG_MIPS32_N32) | 42 | #if !defined(CONFIG_MIPS32_O32) && !defined(CONFIG_MIPS32_N32) |
| 45 | ld t1, PT_EPC(sp) # skip syscall on return | 43 | ld t1, PT_EPC(sp) # skip syscall on return |
| 46 | daddiu t1, 4 # skip to next instruction | 44 | daddiu t1, 4 # skip to next instruction |
| 47 | sd t1, PT_EPC(sp) | 45 | sd t1, PT_EPC(sp) |
| 48 | #endif | 46 | #endif |
| 49 | beqz t0, illegal_syscall | ||
| 50 | |||
| 51 | dsll t0, v0, 3 # offset into table | ||
| 52 | ld t2, (sys_call_table - (__NR_64_Linux * 8))(t0) | ||
| 53 | # syscall routine | ||
| 54 | 47 | ||
| 55 | sd a3, PT_R26(sp) # save a3 for syscall restarting | 48 | sd a3, PT_R26(sp) # save a3 for syscall restarting |
| 56 | 49 | ||
| @@ -59,6 +52,17 @@ NESTED(handle_sys64, PT_SIZE, sp) | |||
| 59 | and t0, t1, t0 | 52 | and t0, t1, t0 |
| 60 | bnez t0, syscall_trace_entry | 53 | bnez t0, syscall_trace_entry |
| 61 | 54 | ||
| 55 | syscall_common: | ||
| 56 | dsubu t2, v0, __NR_64_Linux | ||
| 57 | sltiu t0, t2, __NR_64_Linux_syscalls + 1 | ||
| 58 | beqz t0, illegal_syscall | ||
| 59 | |||
| 60 | dsll t0, t2, 3 # offset into table | ||
| 61 | dla t2, sys_call_table | ||
| 62 | daddu t0, t2, t0 | ||
| 63 | ld t2, (t0) # syscall routine | ||
| 64 | beqz t2, illegal_syscall | ||
| 65 | |||
| 62 | jalr t2 # Do The Real Thing (TM) | 66 | jalr t2 # Do The Real Thing (TM) |
| 63 | 67 | ||
| 64 | li t0, -EMAXERRNO - 1 # error? | 68 | li t0, -EMAXERRNO - 1 # error? |
| @@ -78,14 +82,14 @@ n64_syscall_exit: | |||
| 78 | 82 | ||
| 79 | syscall_trace_entry: | 83 | syscall_trace_entry: |
| 80 | SAVE_STATIC | 84 | SAVE_STATIC |
| 81 | move s0, t2 | 85 | move s0, v0 |
| 82 | move a0, sp | 86 | move a0, sp |
| 83 | move a1, v0 | 87 | move a1, v0 |
| 84 | jal syscall_trace_enter | 88 | jal syscall_trace_enter |
| 85 | 89 | ||
| 86 | bltz v0, 2f # seccomp failed? Skip syscall | 90 | bltz v0, 1f # seccomp failed? Skip syscall |
| 87 | 91 | ||
| 88 | move t0, s0 | 92 | move v0, s0 |
| 89 | RESTORE_STATIC | 93 | RESTORE_STATIC |
| 90 | ld a0, PT_R4(sp) # Restore argument registers | 94 | ld a0, PT_R4(sp) # Restore argument registers |
| 91 | ld a1, PT_R5(sp) | 95 | ld a1, PT_R5(sp) |
| @@ -93,19 +97,9 @@ syscall_trace_entry: | |||
| 93 | ld a3, PT_R7(sp) | 97 | ld a3, PT_R7(sp) |
| 94 | ld a4, PT_R8(sp) | 98 | ld a4, PT_R8(sp) |
| 95 | ld a5, PT_R9(sp) | 99 | ld a5, PT_R9(sp) |
| 96 | jalr t0 | 100 | j syscall_common |
| 97 | |||
| 98 | li t0, -EMAXERRNO - 1 # error? | ||
| 99 | sltu t0, t0, v0 | ||
| 100 | sd t0, PT_R7(sp) # set error flag | ||
| 101 | beqz t0, 1f | ||
| 102 | |||
| 103 | ld t1, PT_R2(sp) # syscall number | ||
| 104 | dnegu v0 # error | ||
| 105 | sd t1, PT_R0(sp) # save it for syscall restarting | ||
| 106 | 1: sd v0, PT_R2(sp) # result | ||
| 107 | 101 | ||
| 108 | 2: j syscall_exit | 102 | 1: j syscall_exit |
| 109 | 103 | ||
| 110 | illegal_syscall: | 104 | illegal_syscall: |
| 111 | /* This also isn't a 64-bit syscall, throw an error. */ | 105 | /* This also isn't a 64-bit syscall, throw an error. */ |
| @@ -436,4 +430,6 @@ EXPORT(sys_call_table) | |||
| 436 | PTR sys_memfd_create | 430 | PTR sys_memfd_create |
| 437 | PTR sys_bpf /* 5315 */ | 431 | PTR sys_bpf /* 5315 */ |
| 438 | PTR sys_execveat | 432 | PTR sys_execveat |
| 433 | PTR sys_userfaultfd | ||
| 434 | PTR sys_membarrier | ||
| 439 | .size sys_call_table,.-sys_call_table | 435 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 4b2010654c46..c79484397584 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -52,6 +52,7 @@ NESTED(handle_sysn32, PT_SIZE, sp) | |||
| 52 | and t0, t1, t0 | 52 | and t0, t1, t0 |
| 53 | bnez t0, n32_syscall_trace_entry | 53 | bnez t0, n32_syscall_trace_entry |
| 54 | 54 | ||
| 55 | syscall_common: | ||
| 55 | jalr t2 # Do The Real Thing (TM) | 56 | jalr t2 # Do The Real Thing (TM) |
| 56 | 57 | ||
| 57 | li t0, -EMAXERRNO - 1 # error? | 58 | li t0, -EMAXERRNO - 1 # error? |
| @@ -75,9 +76,9 @@ n32_syscall_trace_entry: | |||
| 75 | move a1, v0 | 76 | move a1, v0 |
| 76 | jal syscall_trace_enter | 77 | jal syscall_trace_enter |
| 77 | 78 | ||
| 78 | bltz v0, 2f # seccomp failed? Skip syscall | 79 | bltz v0, 1f # seccomp failed? Skip syscall |
| 79 | 80 | ||
| 80 | move t0, s0 | 81 | move t2, s0 |
| 81 | RESTORE_STATIC | 82 | RESTORE_STATIC |
| 82 | ld a0, PT_R4(sp) # Restore argument registers | 83 | ld a0, PT_R4(sp) # Restore argument registers |
| 83 | ld a1, PT_R5(sp) | 84 | ld a1, PT_R5(sp) |
| @@ -85,19 +86,9 @@ n32_syscall_trace_entry: | |||
| 85 | ld a3, PT_R7(sp) | 86 | ld a3, PT_R7(sp) |
| 86 | ld a4, PT_R8(sp) | 87 | ld a4, PT_R8(sp) |
| 87 | ld a5, PT_R9(sp) | 88 | ld a5, PT_R9(sp) |
| 88 | jalr t0 | 89 | j syscall_common |
| 89 | 90 | ||
| 90 | li t0, -EMAXERRNO - 1 # error? | 91 | 1: j syscall_exit |
| 91 | sltu t0, t0, v0 | ||
| 92 | sd t0, PT_R7(sp) # set error flag | ||
| 93 | beqz t0, 1f | ||
| 94 | |||
| 95 | ld t1, PT_R2(sp) # syscall number | ||
| 96 | dnegu v0 # error | ||
| 97 | sd t1, PT_R0(sp) # save it for syscall restarting | ||
| 98 | 1: sd v0, PT_R2(sp) # result | ||
| 99 | |||
| 100 | 2: j syscall_exit | ||
| 101 | 92 | ||
| 102 | not_n32_scall: | 93 | not_n32_scall: |
| 103 | /* This is not an n32 compatibility syscall, pass it on to | 94 | /* This is not an n32 compatibility syscall, pass it on to |
| @@ -429,4 +420,6 @@ EXPORT(sysn32_call_table) | |||
| 429 | PTR sys_memfd_create | 420 | PTR sys_memfd_create |
| 430 | PTR sys_bpf | 421 | PTR sys_bpf |
| 431 | PTR compat_sys_execveat /* 6320 */ | 422 | PTR compat_sys_execveat /* 6320 */ |
| 423 | PTR sys_userfaultfd | ||
| 424 | PTR sys_membarrier | ||
| 432 | .size sysn32_call_table,.-sysn32_call_table | 425 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index f543ff4feef9..6369cfd390c6 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -87,6 +87,7 @@ loads_done: | |||
| 87 | and t0, t1, t0 | 87 | and t0, t1, t0 |
| 88 | bnez t0, trace_a_syscall | 88 | bnez t0, trace_a_syscall |
| 89 | 89 | ||
| 90 | syscall_common: | ||
| 90 | jalr t2 # Do The Real Thing (TM) | 91 | jalr t2 # Do The Real Thing (TM) |
| 91 | 92 | ||
| 92 | li t0, -EMAXERRNO - 1 # error? | 93 | li t0, -EMAXERRNO - 1 # error? |
| @@ -130,9 +131,9 @@ trace_a_syscall: | |||
| 130 | 131 | ||
| 131 | 1: jal syscall_trace_enter | 132 | 1: jal syscall_trace_enter |
| 132 | 133 | ||
| 133 | bltz v0, 2f # seccomp failed? Skip syscall | 134 | bltz v0, 1f # seccomp failed? Skip syscall |
| 134 | 135 | ||
| 135 | move t0, s0 | 136 | move t2, s0 |
| 136 | RESTORE_STATIC | 137 | RESTORE_STATIC |
| 137 | ld a0, PT_R4(sp) # Restore argument registers | 138 | ld a0, PT_R4(sp) # Restore argument registers |
| 138 | ld a1, PT_R5(sp) | 139 | ld a1, PT_R5(sp) |
| @@ -142,19 +143,9 @@ trace_a_syscall: | |||
| 142 | ld a5, PT_R9(sp) | 143 | ld a5, PT_R9(sp) |
| 143 | ld a6, PT_R10(sp) | 144 | ld a6, PT_R10(sp) |
| 144 | ld a7, PT_R11(sp) # For indirect syscalls | 145 | ld a7, PT_R11(sp) # For indirect syscalls |
| 145 | jalr t0 | 146 | j syscall_common |
| 146 | 147 | ||
| 147 | li t0, -EMAXERRNO - 1 # error? | 148 | 1: j syscall_exit |
| 148 | sltu t0, t0, v0 | ||
| 149 | sd t0, PT_R7(sp) # set error flag | ||
| 150 | beqz t0, 1f | ||
| 151 | |||
| 152 | ld t1, PT_R2(sp) # syscall number | ||
| 153 | dnegu v0 # error | ||
| 154 | sd t1, PT_R0(sp) # save it for syscall restarting | ||
| 155 | 1: sd v0, PT_R2(sp) # result | ||
| 156 | |||
| 157 | 2: j syscall_exit | ||
| 158 | 149 | ||
| 159 | /* ------------------------------------------------------------------------ */ | 150 | /* ------------------------------------------------------------------------ */ |
| 160 | 151 | ||
| @@ -584,4 +575,6 @@ EXPORT(sys32_call_table) | |||
| 584 | PTR sys_memfd_create | 575 | PTR sys_memfd_create |
| 585 | PTR sys_bpf /* 4355 */ | 576 | PTR sys_bpf /* 4355 */ |
| 586 | PTR compat_sys_execveat | 577 | PTR compat_sys_execveat |
| 578 | PTR sys_userfaultfd | ||
| 579 | PTR sys_membarrier | ||
| 587 | .size sys32_call_table,.-sys32_call_table | 580 | .size sys32_call_table,.-sys32_call_table |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 35b8316002f8..479515109e5b 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
| @@ -338,7 +338,7 @@ static void __init bootmem_init(void) | |||
| 338 | if (end <= reserved_end) | 338 | if (end <= reserved_end) |
| 339 | continue; | 339 | continue; |
| 340 | #ifdef CONFIG_BLK_DEV_INITRD | 340 | #ifdef CONFIG_BLK_DEV_INITRD |
| 341 | /* mapstart should be after initrd_end */ | 341 | /* Skip zones before initrd and initrd itself */ |
| 342 | if (initrd_end && end <= (unsigned long)PFN_UP(__pa(initrd_end))) | 342 | if (initrd_end && end <= (unsigned long)PFN_UP(__pa(initrd_end))) |
| 343 | continue; | 343 | continue; |
| 344 | #endif | 344 | #endif |
| @@ -371,6 +371,14 @@ static void __init bootmem_init(void) | |||
| 371 | max_low_pfn = PFN_DOWN(HIGHMEM_START); | 371 | max_low_pfn = PFN_DOWN(HIGHMEM_START); |
| 372 | } | 372 | } |
| 373 | 373 | ||
| 374 | #ifdef CONFIG_BLK_DEV_INITRD | ||
| 375 | /* | ||
| 376 | * mapstart should be after initrd_end | ||
| 377 | */ | ||
| 378 | if (initrd_end) | ||
| 379 | mapstart = max(mapstart, (unsigned long)PFN_UP(__pa(initrd_end))); | ||
| 380 | #endif | ||
| 381 | |||
| 374 | /* | 382 | /* |
| 375 | * Initialize the boot-time allocator with low memory only. | 383 | * Initialize the boot-time allocator with low memory only. |
| 376 | */ | 384 | */ |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index a31896c33716..bd4385a8e6e8 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | #include <asm/mmu_context.h> | 42 | #include <asm/mmu_context.h> |
| 43 | #include <asm/time.h> | 43 | #include <asm/time.h> |
| 44 | #include <asm/setup.h> | 44 | #include <asm/setup.h> |
| 45 | #include <asm/maar.h> | ||
| 45 | 46 | ||
| 46 | cpumask_t cpu_callin_map; /* Bitmask of started secondaries */ | 47 | cpumask_t cpu_callin_map; /* Bitmask of started secondaries */ |
| 47 | 48 | ||
| @@ -157,6 +158,7 @@ asmlinkage void start_secondary(void) | |||
| 157 | mips_clockevent_init(); | 158 | mips_clockevent_init(); |
| 158 | mp_ops->init_secondary(); | 159 | mp_ops->init_secondary(); |
| 159 | cpu_report(); | 160 | cpu_report(); |
| 161 | maar_init(); | ||
| 160 | 162 | ||
| 161 | /* | 163 | /* |
| 162 | * XXX parity protection should be folded in here when it's converted | 164 | * XXX parity protection should be folded in here when it's converted |
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index cd4c129ce743..49ff3bfc007e 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
| @@ -55,6 +55,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
| 55 | { "msa_disabled", VCPU_STAT(msa_disabled_exits), KVM_STAT_VCPU }, | 55 | { "msa_disabled", VCPU_STAT(msa_disabled_exits), KVM_STAT_VCPU }, |
| 56 | { "flush_dcache", VCPU_STAT(flush_dcache_exits), KVM_STAT_VCPU }, | 56 | { "flush_dcache", VCPU_STAT(flush_dcache_exits), KVM_STAT_VCPU }, |
| 57 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll), KVM_STAT_VCPU }, | 57 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll), KVM_STAT_VCPU }, |
| 58 | { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll), KVM_STAT_VCPU }, | ||
| 58 | { "halt_wakeup", VCPU_STAT(halt_wakeup), KVM_STAT_VCPU }, | 59 | { "halt_wakeup", VCPU_STAT(halt_wakeup), KVM_STAT_VCPU }, |
| 59 | {NULL} | 60 | {NULL} |
| 60 | }; | 61 | }; |
diff --git a/arch/mips/loongson64/common/env.c b/arch/mips/loongson64/common/env.c index f6c44dd332e2..d6d07ad56180 100644 --- a/arch/mips/loongson64/common/env.c +++ b/arch/mips/loongson64/common/env.c | |||
| @@ -64,6 +64,9 @@ void __init prom_init_env(void) | |||
| 64 | } | 64 | } |
| 65 | if (memsize == 0) | 65 | if (memsize == 0) |
| 66 | memsize = 256; | 66 | memsize = 256; |
| 67 | |||
| 68 | loongson_sysconf.nr_uarts = 1; | ||
| 69 | |||
| 67 | pr_info("memsize=%u, highmemsize=%u\n", memsize, highmemsize); | 70 | pr_info("memsize=%u, highmemsize=%u\n", memsize, highmemsize); |
| 68 | #else | 71 | #else |
| 69 | struct boot_params *boot_p; | 72 | struct boot_params *boot_p; |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index a914dc1cb6d1..d8117be729a2 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
| @@ -100,7 +100,7 @@ static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) | |||
| 100 | else | 100 | else |
| 101 | #endif | 101 | #endif |
| 102 | #if defined(CONFIG_ZONE_DMA) && !defined(CONFIG_ZONE_DMA32) | 102 | #if defined(CONFIG_ZONE_DMA) && !defined(CONFIG_ZONE_DMA32) |
| 103 | if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) | 103 | if (dev->coherent_dma_mask < DMA_BIT_MASK(sizeof(phys_addr_t) * 8)) |
| 104 | dma_flag = __GFP_DMA; | 104 | dma_flag = __GFP_DMA; |
| 105 | else | 105 | else |
| 106 | #endif | 106 | #endif |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 66d0f49c5bec..8770e619185e 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | #include <asm/pgalloc.h> | 44 | #include <asm/pgalloc.h> |
| 45 | #include <asm/tlb.h> | 45 | #include <asm/tlb.h> |
| 46 | #include <asm/fixmap.h> | 46 | #include <asm/fixmap.h> |
| 47 | #include <asm/maar.h> | ||
| 47 | 48 | ||
| 48 | /* | 49 | /* |
| 49 | * We have up to 8 empty zeroed pages so we can map one of the right colour | 50 | * We have up to 8 empty zeroed pages so we can map one of the right colour |
| @@ -252,6 +253,119 @@ void __init fixrange_init(unsigned long start, unsigned long end, | |||
| 252 | #endif | 253 | #endif |
| 253 | } | 254 | } |
| 254 | 255 | ||
| 256 | unsigned __weak platform_maar_init(unsigned num_pairs) | ||
| 257 | { | ||
| 258 | struct maar_config cfg[BOOT_MEM_MAP_MAX]; | ||
| 259 | unsigned i, num_configured, num_cfg = 0; | ||
| 260 | phys_addr_t skip; | ||
| 261 | |||
| 262 | for (i = 0; i < boot_mem_map.nr_map; i++) { | ||
| 263 | switch (boot_mem_map.map[i].type) { | ||
| 264 | case BOOT_MEM_RAM: | ||
| 265 | case BOOT_MEM_INIT_RAM: | ||
| 266 | break; | ||
| 267 | default: | ||
| 268 | continue; | ||
| 269 | } | ||
| 270 | |||
| 271 | skip = 0x10000 - (boot_mem_map.map[i].addr & 0xffff); | ||
| 272 | |||
| 273 | cfg[num_cfg].lower = boot_mem_map.map[i].addr; | ||
| 274 | cfg[num_cfg].lower += skip; | ||
| 275 | |||
| 276 | cfg[num_cfg].upper = cfg[num_cfg].lower; | ||
| 277 | cfg[num_cfg].upper += boot_mem_map.map[i].size - 1; | ||
| 278 | cfg[num_cfg].upper -= skip; | ||
| 279 | |||
| 280 | cfg[num_cfg].attrs = MIPS_MAAR_S; | ||
| 281 | num_cfg++; | ||
| 282 | } | ||
| 283 | |||
| 284 | num_configured = maar_config(cfg, num_cfg, num_pairs); | ||
| 285 | if (num_configured < num_cfg) | ||
| 286 | pr_warn("Not enough MAAR pairs (%u) for all bootmem regions (%u)\n", | ||
| 287 | num_pairs, num_cfg); | ||
| 288 | |||
| 289 | return num_configured; | ||
| 290 | } | ||
| 291 | |||
| 292 | void maar_init(void) | ||
| 293 | { | ||
| 294 | unsigned num_maars, used, i; | ||
| 295 | phys_addr_t lower, upper, attr; | ||
| 296 | static struct { | ||
| 297 | struct maar_config cfgs[3]; | ||
| 298 | unsigned used; | ||
| 299 | } recorded = { { { 0 } }, 0 }; | ||
| 300 | |||
| 301 | if (!cpu_has_maar) | ||
| 302 | return; | ||
| 303 | |||
| 304 | /* Detect the number of MAARs */ | ||
| 305 | write_c0_maari(~0); | ||
| 306 | back_to_back_c0_hazard(); | ||
| 307 | num_maars = read_c0_maari() + 1; | ||
| 308 | |||
| 309 | /* MAARs should be in pairs */ | ||
| 310 | WARN_ON(num_maars % 2); | ||
| 311 | |||
| 312 | /* Set MAARs using values we recorded already */ | ||
| 313 | if (recorded.used) { | ||
| 314 | used = maar_config(recorded.cfgs, recorded.used, num_maars / 2); | ||
| 315 | BUG_ON(used != recorded.used); | ||
| 316 | } else { | ||
| 317 | /* Configure the required MAARs */ | ||
| 318 | used = platform_maar_init(num_maars / 2); | ||
| 319 | } | ||
| 320 | |||
| 321 | /* Disable any further MAARs */ | ||
| 322 | for (i = (used * 2); i < num_maars; i++) { | ||
| 323 | write_c0_maari(i); | ||
| 324 | back_to_back_c0_hazard(); | ||
| 325 | write_c0_maar(0); | ||
| 326 | back_to_back_c0_hazard(); | ||
| 327 | } | ||
| 328 | |||
| 329 | if (recorded.used) | ||
| 330 | return; | ||
| 331 | |||
| 332 | pr_info("MAAR configuration:\n"); | ||
| 333 | for (i = 0; i < num_maars; i += 2) { | ||
| 334 | write_c0_maari(i); | ||
| 335 | back_to_back_c0_hazard(); | ||
| 336 | upper = read_c0_maar(); | ||
| 337 | |||
| 338 | write_c0_maari(i + 1); | ||
| 339 | back_to_back_c0_hazard(); | ||
| 340 | lower = read_c0_maar(); | ||
| 341 | |||
| 342 | attr = lower & upper; | ||
| 343 | lower = (lower & MIPS_MAAR_ADDR) << 4; | ||
| 344 | upper = ((upper & MIPS_MAAR_ADDR) << 4) | 0xffff; | ||
| 345 | |||
| 346 | pr_info(" [%d]: ", i / 2); | ||
| 347 | if (!(attr & MIPS_MAAR_V)) { | ||
| 348 | pr_cont("disabled\n"); | ||
| 349 | continue; | ||
| 350 | } | ||
| 351 | |||
| 352 | pr_cont("%pa-%pa", &lower, &upper); | ||
| 353 | |||
| 354 | if (attr & MIPS_MAAR_S) | ||
| 355 | pr_cont(" speculate"); | ||
| 356 | |||
| 357 | pr_cont("\n"); | ||
| 358 | |||
| 359 | /* Record the setup for use on secondary CPUs */ | ||
| 360 | if (used <= ARRAY_SIZE(recorded.cfgs)) { | ||
| 361 | recorded.cfgs[recorded.used].lower = lower; | ||
| 362 | recorded.cfgs[recorded.used].upper = upper; | ||
| 363 | recorded.cfgs[recorded.used].attrs = attr; | ||
| 364 | recorded.used++; | ||
| 365 | } | ||
| 366 | } | ||
| 367 | } | ||
| 368 | |||
| 255 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 369 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
| 256 | int page_is_ram(unsigned long pagenr) | 370 | int page_is_ram(unsigned long pagenr) |
| 257 | { | 371 | { |
| @@ -334,69 +448,6 @@ static inline void mem_init_free_highmem(void) | |||
| 334 | #endif | 448 | #endif |
| 335 | } | 449 | } |
| 336 | 450 | ||
| 337 | unsigned __weak platform_maar_init(unsigned num_pairs) | ||
| 338 | { | ||
| 339 | struct maar_config cfg[BOOT_MEM_MAP_MAX]; | ||
| 340 | unsigned i, num_configured, num_cfg = 0; | ||
| 341 | phys_addr_t skip; | ||
| 342 | |||
| 343 | for (i = 0; i < boot_mem_map.nr_map; i++) { | ||
| 344 | switch (boot_mem_map.map[i].type) { | ||
| 345 | case BOOT_MEM_RAM: | ||
| 346 | case BOOT_MEM_INIT_RAM: | ||
| 347 | break; | ||
| 348 | default: | ||
| 349 | continue; | ||
| 350 | } | ||
| 351 | |||
| 352 | skip = 0x10000 - (boot_mem_map.map[i].addr & 0xffff); | ||
| 353 | |||
| 354 | cfg[num_cfg].lower = boot_mem_map.map[i].addr; | ||
| 355 | cfg[num_cfg].lower += skip; | ||
| 356 | |||
| 357 | cfg[num_cfg].upper = cfg[num_cfg].lower; | ||
| 358 | cfg[num_cfg].upper += boot_mem_map.map[i].size - 1; | ||
| 359 | cfg[num_cfg].upper -= skip; | ||
| 360 | |||
| 361 | cfg[num_cfg].attrs = MIPS_MAAR_S; | ||
| 362 | num_cfg++; | ||
| 363 | } | ||
| 364 | |||
| 365 | num_configured = maar_config(cfg, num_cfg, num_pairs); | ||
| 366 | if (num_configured < num_cfg) | ||
| 367 | pr_warn("Not enough MAAR pairs (%u) for all bootmem regions (%u)\n", | ||
| 368 | num_pairs, num_cfg); | ||
| 369 | |||
| 370 | return num_configured; | ||
| 371 | } | ||
| 372 | |||
| 373 | static void maar_init(void) | ||
| 374 | { | ||
| 375 | unsigned num_maars, used, i; | ||
| 376 | |||
| 377 | if (!cpu_has_maar) | ||
| 378 | return; | ||
| 379 | |||
| 380 | /* Detect the number of MAARs */ | ||
| 381 | write_c0_maari(~0); | ||
| 382 | back_to_back_c0_hazard(); | ||
| 383 | num_maars = read_c0_maari() + 1; | ||
| 384 | |||
| 385 | /* MAARs should be in pairs */ | ||
| 386 | WARN_ON(num_maars % 2); | ||
| 387 | |||
| 388 | /* Configure the required MAARs */ | ||
| 389 | used = platform_maar_init(num_maars / 2); | ||
| 390 | |||
| 391 | /* Disable any further MAARs */ | ||
| 392 | for (i = (used * 2); i < num_maars; i++) { | ||
| 393 | write_c0_maari(i); | ||
| 394 | back_to_back_c0_hazard(); | ||
| 395 | write_c0_maar(0); | ||
| 396 | back_to_back_c0_hazard(); | ||
| 397 | } | ||
| 398 | } | ||
| 399 | |||
| 400 | void __init mem_init(void) | 451 | void __init mem_init(void) |
| 401 | { | 452 | { |
| 402 | #ifdef CONFIG_HIGHMEM | 453 | #ifdef CONFIG_HIGHMEM |
diff --git a/arch/mips/net/bpf_jit_asm.S b/arch/mips/net/bpf_jit_asm.S index e92726099be0..5d2e0c8d29c0 100644 --- a/arch/mips/net/bpf_jit_asm.S +++ b/arch/mips/net/bpf_jit_asm.S | |||
| @@ -57,15 +57,28 @@ | |||
| 57 | 57 | ||
| 58 | LEAF(sk_load_word) | 58 | LEAF(sk_load_word) |
| 59 | is_offset_negative(word) | 59 | is_offset_negative(word) |
| 60 | .globl sk_load_word_positive | 60 | FEXPORT(sk_load_word_positive) |
| 61 | sk_load_word_positive: | ||
| 62 | is_offset_in_header(4, word) | 61 | is_offset_in_header(4, word) |
| 63 | /* Offset within header boundaries */ | 62 | /* Offset within header boundaries */ |
| 64 | PTR_ADDU t1, $r_skb_data, offset | 63 | PTR_ADDU t1, $r_skb_data, offset |
| 64 | .set reorder | ||
| 65 | lw $r_A, 0(t1) | 65 | lw $r_A, 0(t1) |
| 66 | .set noreorder | ||
| 66 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 67 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
| 68 | # if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) | ||
| 67 | wsbh t0, $r_A | 69 | wsbh t0, $r_A |
| 68 | rotr $r_A, t0, 16 | 70 | rotr $r_A, t0, 16 |
| 71 | # else | ||
| 72 | sll t0, $r_A, 24 | ||
| 73 | srl t1, $r_A, 24 | ||
| 74 | srl t2, $r_A, 8 | ||
| 75 | or t0, t0, t1 | ||
| 76 | andi t2, t2, 0xff00 | ||
| 77 | andi t1, $r_A, 0xff00 | ||
| 78 | or t0, t0, t2 | ||
| 79 | sll t1, t1, 8 | ||
| 80 | or $r_A, t0, t1 | ||
| 81 | # endif | ||
| 69 | #endif | 82 | #endif |
| 70 | jr $r_ra | 83 | jr $r_ra |
| 71 | move $r_ret, zero | 84 | move $r_ret, zero |
| @@ -73,15 +86,24 @@ sk_load_word_positive: | |||
| 73 | 86 | ||
| 74 | LEAF(sk_load_half) | 87 | LEAF(sk_load_half) |
| 75 | is_offset_negative(half) | 88 | is_offset_negative(half) |
| 76 | .globl sk_load_half_positive | 89 | FEXPORT(sk_load_half_positive) |
| 77 | sk_load_half_positive: | ||
| 78 | is_offset_in_header(2, half) | 90 | is_offset_in_header(2, half) |
| 79 | /* Offset within header boundaries */ | 91 | /* Offset within header boundaries */ |
| 80 | PTR_ADDU t1, $r_skb_data, offset | 92 | PTR_ADDU t1, $r_skb_data, offset |
| 93 | .set reorder | ||
| 81 | lh $r_A, 0(t1) | 94 | lh $r_A, 0(t1) |
| 95 | .set noreorder | ||
| 82 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 96 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
| 97 | # if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) | ||
| 83 | wsbh t0, $r_A | 98 | wsbh t0, $r_A |
| 84 | seh $r_A, t0 | 99 | seh $r_A, t0 |
| 100 | # else | ||
| 101 | sll t0, $r_A, 24 | ||
| 102 | andi t1, $r_A, 0xff00 | ||
| 103 | sra t0, t0, 16 | ||
| 104 | srl t1, t1, 8 | ||
| 105 | or $r_A, t0, t1 | ||
| 106 | # endif | ||
| 85 | #endif | 107 | #endif |
| 86 | jr $r_ra | 108 | jr $r_ra |
| 87 | move $r_ret, zero | 109 | move $r_ret, zero |
| @@ -89,8 +111,7 @@ sk_load_half_positive: | |||
| 89 | 111 | ||
| 90 | LEAF(sk_load_byte) | 112 | LEAF(sk_load_byte) |
| 91 | is_offset_negative(byte) | 113 | is_offset_negative(byte) |
| 92 | .globl sk_load_byte_positive | 114 | FEXPORT(sk_load_byte_positive) |
| 93 | sk_load_byte_positive: | ||
| 94 | is_offset_in_header(1, byte) | 115 | is_offset_in_header(1, byte) |
| 95 | /* Offset within header boundaries */ | 116 | /* Offset within header boundaries */ |
| 96 | PTR_ADDU t1, $r_skb_data, offset | 117 | PTR_ADDU t1, $r_skb_data, offset |
| @@ -148,23 +169,47 @@ sk_load_byte_positive: | |||
| 148 | NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp) | 169 | NESTED(bpf_slow_path_word, (6 * SZREG), $r_sp) |
| 149 | bpf_slow_path_common(4) | 170 | bpf_slow_path_common(4) |
| 150 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 171 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
| 172 | # if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) | ||
| 151 | wsbh t0, $r_s0 | 173 | wsbh t0, $r_s0 |
| 152 | jr $r_ra | 174 | jr $r_ra |
| 153 | rotr $r_A, t0, 16 | 175 | rotr $r_A, t0, 16 |
| 154 | #endif | 176 | # else |
| 177 | sll t0, $r_s0, 24 | ||
| 178 | srl t1, $r_s0, 24 | ||
| 179 | srl t2, $r_s0, 8 | ||
| 180 | or t0, t0, t1 | ||
| 181 | andi t2, t2, 0xff00 | ||
| 182 | andi t1, $r_s0, 0xff00 | ||
| 183 | or t0, t0, t2 | ||
| 184 | sll t1, t1, 8 | ||
| 185 | jr $r_ra | ||
| 186 | or $r_A, t0, t1 | ||
| 187 | # endif | ||
| 188 | #else | ||
| 155 | jr $r_ra | 189 | jr $r_ra |
| 156 | move $r_A, $r_s0 | 190 | move $r_A, $r_s0 |
| 191 | #endif | ||
| 157 | 192 | ||
| 158 | END(bpf_slow_path_word) | 193 | END(bpf_slow_path_word) |
| 159 | 194 | ||
| 160 | NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp) | 195 | NESTED(bpf_slow_path_half, (6 * SZREG), $r_sp) |
| 161 | bpf_slow_path_common(2) | 196 | bpf_slow_path_common(2) |
| 162 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 197 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
| 198 | # if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) | ||
| 163 | jr $r_ra | 199 | jr $r_ra |
| 164 | wsbh $r_A, $r_s0 | 200 | wsbh $r_A, $r_s0 |
| 165 | #endif | 201 | # else |
| 202 | sll t0, $r_s0, 8 | ||
| 203 | andi t1, $r_s0, 0xff00 | ||
| 204 | andi t0, t0, 0xff00 | ||
| 205 | srl t1, t1, 8 | ||
| 206 | jr $r_ra | ||
| 207 | or $r_A, t0, t1 | ||
| 208 | # endif | ||
| 209 | #else | ||
| 166 | jr $r_ra | 210 | jr $r_ra |
| 167 | move $r_A, $r_s0 | 211 | move $r_A, $r_s0 |
| 212 | #endif | ||
| 168 | 213 | ||
| 169 | END(bpf_slow_path_half) | 214 | END(bpf_slow_path_half) |
| 170 | 215 | ||
diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c index 0136b4f9c9cd..10d86d54880a 100644 --- a/arch/mips/netlogic/common/smp.c +++ b/arch/mips/netlogic/common/smp.c | |||
| @@ -82,7 +82,7 @@ void nlm_send_ipi_mask(const struct cpumask *mask, unsigned int action) | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | /* IRQ_IPI_SMP_FUNCTION Handler */ | 84 | /* IRQ_IPI_SMP_FUNCTION Handler */ |
| 85 | void nlm_smp_function_ipi_handler(unsigned int __irq, struct irq_desc *desc) | 85 | void nlm_smp_function_ipi_handler(struct irq_desc *desc) |
| 86 | { | 86 | { |
| 87 | unsigned int irq = irq_desc_get_irq(desc); | 87 | unsigned int irq = irq_desc_get_irq(desc); |
| 88 | clear_c0_eimr(irq); | 88 | clear_c0_eimr(irq); |
| @@ -92,7 +92,7 @@ void nlm_smp_function_ipi_handler(unsigned int __irq, struct irq_desc *desc) | |||
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | /* IRQ_IPI_SMP_RESCHEDULE handler */ | 94 | /* IRQ_IPI_SMP_RESCHEDULE handler */ |
| 95 | void nlm_smp_resched_ipi_handler(unsigned int __irq, struct irq_desc *desc) | 95 | void nlm_smp_resched_ipi_handler(struct irq_desc *desc) |
| 96 | { | 96 | { |
| 97 | unsigned int irq = irq_desc_get_irq(desc); | 97 | unsigned int irq = irq_desc_get_irq(desc); |
| 98 | clear_c0_eimr(irq); | 98 | clear_c0_eimr(irq); |
diff --git a/arch/mips/pci/pci-ar2315.c b/arch/mips/pci/pci-ar2315.c index f8d0acb4f973..b4fa6413c4e5 100644 --- a/arch/mips/pci/pci-ar2315.c +++ b/arch/mips/pci/pci-ar2315.c | |||
| @@ -318,7 +318,7 @@ static int ar2315_pci_host_setup(struct ar2315_pci_ctrl *apc) | |||
| 318 | return 0; | 318 | return 0; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | static void ar2315_pci_irq_handler(unsigned irq, struct irq_desc *desc) | 321 | static void ar2315_pci_irq_handler(struct irq_desc *desc) |
| 322 | { | 322 | { |
| 323 | struct ar2315_pci_ctrl *apc = irq_desc_get_handler_data(desc); | 323 | struct ar2315_pci_ctrl *apc = irq_desc_get_handler_data(desc); |
| 324 | u32 pending = ar2315_pci_reg_read(apc, AR2315_PCI_ISR) & | 324 | u32 pending = ar2315_pci_reg_read(apc, AR2315_PCI_ISR) & |
diff --git a/arch/mips/pci/pci-ar71xx.c b/arch/mips/pci/pci-ar71xx.c index ad35a5e6a56c..7db963deec73 100644 --- a/arch/mips/pci/pci-ar71xx.c +++ b/arch/mips/pci/pci-ar71xx.c | |||
| @@ -226,7 +226,7 @@ static struct pci_ops ar71xx_pci_ops = { | |||
| 226 | .write = ar71xx_pci_write_config, | 226 | .write = ar71xx_pci_write_config, |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | static void ar71xx_pci_irq_handler(unsigned int irq, struct irq_desc *desc) | 229 | static void ar71xx_pci_irq_handler(struct irq_desc *desc) |
| 230 | { | 230 | { |
| 231 | struct ar71xx_pci_controller *apc; | 231 | struct ar71xx_pci_controller *apc; |
| 232 | void __iomem *base = ath79_reset_base; | 232 | void __iomem *base = ath79_reset_base; |
diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c index 907d11dd921b..2013dad700df 100644 --- a/arch/mips/pci/pci-ar724x.c +++ b/arch/mips/pci/pci-ar724x.c | |||
| @@ -225,7 +225,7 @@ static struct pci_ops ar724x_pci_ops = { | |||
| 225 | .write = ar724x_pci_write, | 225 | .write = ar724x_pci_write, |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | static void ar724x_pci_irq_handler(unsigned int irq, struct irq_desc *desc) | 228 | static void ar724x_pci_irq_handler(struct irq_desc *desc) |
| 229 | { | 229 | { |
| 230 | struct ar724x_pci_controller *apc; | 230 | struct ar724x_pci_controller *apc; |
| 231 | void __iomem *base; | 231 | void __iomem *base; |
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index 53c8efaf1572..ed6732f9aa87 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c | |||
| @@ -129,7 +129,7 @@ static void rt3883_pci_write_cfg32(struct rt3883_pci_controller *rpc, | |||
| 129 | rt3883_pci_w32(rpc, val, RT3883_PCI_REG_CFGDATA); | 129 | rt3883_pci_w32(rpc, val, RT3883_PCI_REG_CFGDATA); |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | static void rt3883_pci_irq_handler(unsigned int __irq, struct irq_desc *desc) | 132 | static void rt3883_pci_irq_handler(struct irq_desc *desc) |
| 133 | { | 133 | { |
| 134 | struct rt3883_pci_controller *rpc; | 134 | struct rt3883_pci_controller *rpc; |
| 135 | u32 pending; | 135 | u32 pending; |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index c6996cf67a5c..b8a0bf5766f2 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
| @@ -311,6 +311,12 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
| 311 | 311 | ||
| 312 | void pcibios_fixup_bus(struct pci_bus *bus) | 312 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 313 | { | 313 | { |
| 314 | struct pci_dev *dev = bus->self; | ||
| 315 | |||
| 316 | if (pci_has_flag(PCI_PROBE_ONLY) && dev && | ||
| 317 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { | ||
| 318 | pci_read_bridge_bases(bus); | ||
| 319 | } | ||
| 314 | } | 320 | } |
| 315 | 321 | ||
| 316 | EXPORT_SYMBOL(PCIBIOS_MIN_IO); | 322 | EXPORT_SYMBOL(PCIBIOS_MIN_IO); |
diff --git a/arch/mips/ralink/irq.c b/arch/mips/ralink/irq.c index 8c624a8b9ea2..4cf77f358395 100644 --- a/arch/mips/ralink/irq.c +++ b/arch/mips/ralink/irq.c | |||
| @@ -96,7 +96,7 @@ unsigned int get_c0_compare_int(void) | |||
| 96 | return CP0_LEGACY_COMPARE_IRQ; | 96 | return CP0_LEGACY_COMPARE_IRQ; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | static void ralink_intc_irq_handler(unsigned int irq, struct irq_desc *desc) | 99 | static void ralink_intc_irq_handler(struct irq_desc *desc) |
| 100 | { | 100 | { |
| 101 | u32 pending = rt_intc_r32(INTC_REG_STATUS0); | 101 | u32 pending = rt_intc_r32(INTC_REG_STATUS0); |
| 102 | 102 | ||
diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild index 6edb9ee6128e..1c8dd0f5cd5d 100644 --- a/arch/mn10300/include/asm/Kbuild +++ b/arch/mn10300/include/asm/Kbuild | |||
| @@ -9,3 +9,4 @@ generic-y += mm-arch-hooks.h | |||
| 9 | generic-y += preempt.h | 9 | generic-y += preempt.h |
| 10 | generic-y += sections.h | 10 | generic-y += sections.h |
| 11 | generic-y += trace_clock.h | 11 | generic-y += trace_clock.h |
| 12 | generic-y += word-at-a-time.h | ||
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c index deaa893efba5..3dfe2d31c67b 100644 --- a/arch/mn10300/unit-asb2305/pci.c +++ b/arch/mn10300/unit-asb2305/pci.c | |||
| @@ -324,6 +324,7 @@ void pcibios_fixup_bus(struct pci_bus *bus) | |||
| 324 | struct pci_dev *dev; | 324 | struct pci_dev *dev; |
| 325 | 325 | ||
| 326 | if (bus->self) { | 326 | if (bus->self) { |
| 327 | pci_read_bridge_bases(bus); | ||
| 327 | pcibios_fixup_bridge_resources(bus->self); | 328 | pcibios_fixup_bridge_resources(bus->self); |
| 328 | } | 329 | } |
| 329 | 330 | ||
diff --git a/arch/nios2/include/asm/Kbuild b/arch/nios2/include/asm/Kbuild index 914864eb5a25..d63330e88379 100644 --- a/arch/nios2/include/asm/Kbuild +++ b/arch/nios2/include/asm/Kbuild | |||
| @@ -61,4 +61,5 @@ generic-y += types.h | |||
| 61 | generic-y += unaligned.h | 61 | generic-y += unaligned.h |
| 62 | generic-y += user.h | 62 | generic-y += user.h |
| 63 | generic-y += vga.h | 63 | generic-y += vga.h |
| 64 | generic-y += word-at-a-time.h | ||
| 64 | generic-y += xor.h | 65 | generic-y += xor.h |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 73eddda53b8e..4eec430d8fa8 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
| @@ -28,6 +28,9 @@ BOOTCFLAGS += -m64 | |||
| 28 | endif | 28 | endif |
| 29 | ifdef CONFIG_CPU_BIG_ENDIAN | 29 | ifdef CONFIG_CPU_BIG_ENDIAN |
| 30 | BOOTCFLAGS += -mbig-endian | 30 | BOOTCFLAGS += -mbig-endian |
| 31 | else | ||
| 32 | BOOTCFLAGS += -mlittle-endian | ||
| 33 | BOOTCFLAGS += $(call cc-option,-mabi=elfv2) | ||
| 31 | endif | 34 | endif |
| 32 | 35 | ||
| 33 | BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc | 36 | BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 6bc0ee4b1070..2c041b535a64 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
| @@ -111,7 +111,7 @@ CONFIG_SCSI_QLA_FC=m | |||
| 111 | CONFIG_SCSI_QLA_ISCSI=m | 111 | CONFIG_SCSI_QLA_ISCSI=m |
| 112 | CONFIG_SCSI_LPFC=m | 112 | CONFIG_SCSI_LPFC=m |
| 113 | CONFIG_SCSI_VIRTIO=m | 113 | CONFIG_SCSI_VIRTIO=m |
| 114 | CONFIG_SCSI_DH=m | 114 | CONFIG_SCSI_DH=y |
| 115 | CONFIG_SCSI_DH_RDAC=m | 115 | CONFIG_SCSI_DH_RDAC=m |
| 116 | CONFIG_SCSI_DH_ALUA=m | 116 | CONFIG_SCSI_DH_ALUA=m |
| 117 | CONFIG_ATA=y | 117 | CONFIG_ATA=y |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 7991f37e5fe2..36871a4bfa54 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
| @@ -114,7 +114,7 @@ CONFIG_SCSI_QLA_FC=m | |||
| 114 | CONFIG_SCSI_QLA_ISCSI=m | 114 | CONFIG_SCSI_QLA_ISCSI=m |
| 115 | CONFIG_SCSI_LPFC=m | 115 | CONFIG_SCSI_LPFC=m |
| 116 | CONFIG_SCSI_VIRTIO=m | 116 | CONFIG_SCSI_VIRTIO=m |
| 117 | CONFIG_SCSI_DH=m | 117 | CONFIG_SCSI_DH=y |
| 118 | CONFIG_SCSI_DH_RDAC=m | 118 | CONFIG_SCSI_DH_RDAC=m |
| 119 | CONFIG_SCSI_DH_ALUA=m | 119 | CONFIG_SCSI_DH_ALUA=m |
| 120 | CONFIG_ATA=y | 120 | CONFIG_ATA=y |
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 0dc42c5082b7..5f8229e24fe6 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
| 5 | 5 | ||
| 6 | #include <asm/reg.h> | ||
| 7 | 6 | ||
| 8 | /* bytes per L1 cache line */ | 7 | /* bytes per L1 cache line */ |
| 9 | #if defined(CONFIG_8xx) || defined(CONFIG_403GCX) | 8 | #if defined(CONFIG_8xx) || defined(CONFIG_403GCX) |
| @@ -40,12 +39,6 @@ struct ppc64_caches { | |||
| 40 | }; | 39 | }; |
| 41 | 40 | ||
| 42 | extern struct ppc64_caches ppc64_caches; | 41 | extern struct ppc64_caches ppc64_caches; |
| 43 | |||
| 44 | static inline void logmpp(u64 x) | ||
| 45 | { | ||
| 46 | asm volatile(PPC_LOGMPP(R1) : : "r" (x)); | ||
| 47 | } | ||
| 48 | |||
| 49 | #endif /* __powerpc64__ && ! __ASSEMBLY__ */ | 42 | #endif /* __powerpc64__ && ! __ASSEMBLY__ */ |
| 50 | 43 | ||
| 51 | #if defined(__ASSEMBLY__) | 44 | #if defined(__ASSEMBLY__) |
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 98eebbf66340..887c259556df 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | #ifdef CONFIG_KVM_MMIO | 44 | #ifdef CONFIG_KVM_MMIO |
| 45 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 | 45 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
| 46 | #endif | 46 | #endif |
| 47 | #define KVM_HALT_POLL_NS_DEFAULT 500000 | ||
| 47 | 48 | ||
| 48 | /* These values are internal and can be increased later */ | 49 | /* These values are internal and can be increased later */ |
| 49 | #define KVM_NR_IRQCHIPS 1 | 50 | #define KVM_NR_IRQCHIPS 1 |
| @@ -108,6 +109,7 @@ struct kvm_vcpu_stat { | |||
| 108 | u32 dec_exits; | 109 | u32 dec_exits; |
| 109 | u32 ext_intr_exits; | 110 | u32 ext_intr_exits; |
| 110 | u32 halt_successful_poll; | 111 | u32 halt_successful_poll; |
| 112 | u32 halt_attempted_poll; | ||
| 111 | u32 halt_wakeup; | 113 | u32 halt_wakeup; |
| 112 | u32 dbell_exits; | 114 | u32 dbell_exits; |
| 113 | u32 gdbell_exits; | 115 | u32 gdbell_exits; |
| @@ -295,8 +297,6 @@ struct kvmppc_vcore { | |||
| 295 | u32 arch_compat; | 297 | u32 arch_compat; |
| 296 | ulong pcr; | 298 | ulong pcr; |
| 297 | ulong dpdes; /* doorbell state (POWER8) */ | 299 | ulong dpdes; /* doorbell state (POWER8) */ |
| 298 | void *mpp_buffer; /* Micro Partition Prefetch buffer */ | ||
| 299 | bool mpp_buffer_is_valid; | ||
| 300 | ulong conferring_threads; | 300 | ulong conferring_threads; |
| 301 | }; | 301 | }; |
| 302 | 302 | ||
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index cab6753f1be5..3f191f573d4f 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
| @@ -61,8 +61,13 @@ struct machdep_calls { | |||
| 61 | unsigned long addr, | 61 | unsigned long addr, |
| 62 | unsigned char *hpte_slot_array, | 62 | unsigned char *hpte_slot_array, |
| 63 | int psize, int ssize, int local); | 63 | int psize, int ssize, int local); |
| 64 | /* special for kexec, to be called in real mode, linear mapping is | 64 | /* |
| 65 | * destroyed as well */ | 65 | * Special for kexec. |
| 66 | * To be called in real mode with interrupts disabled. No locks are | ||
| 67 | * taken as such, concurrent access on pre POWER5 hardware could result | ||
| 68 | * in a deadlock. | ||
| 69 | * The linear mapping is destroyed as well. | ||
| 70 | */ | ||
| 66 | void (*hpte_clear_all)(void); | 71 | void (*hpte_clear_all)(void); |
| 67 | 72 | ||
| 68 | void __iomem * (*ioremap)(phys_addr_t addr, unsigned long size, | 73 | void __iomem * (*ioremap)(phys_addr_t addr, unsigned long size, |
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index 790f5d1d9a46..7ab04fc59e24 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
| @@ -141,7 +141,6 @@ | |||
| 141 | #define PPC_INST_ISEL 0x7c00001e | 141 | #define PPC_INST_ISEL 0x7c00001e |
| 142 | #define PPC_INST_ISEL_MASK 0xfc00003e | 142 | #define PPC_INST_ISEL_MASK 0xfc00003e |
| 143 | #define PPC_INST_LDARX 0x7c0000a8 | 143 | #define PPC_INST_LDARX 0x7c0000a8 |
| 144 | #define PPC_INST_LOGMPP 0x7c0007e4 | ||
| 145 | #define PPC_INST_LSWI 0x7c0004aa | 144 | #define PPC_INST_LSWI 0x7c0004aa |
| 146 | #define PPC_INST_LSWX 0x7c00042a | 145 | #define PPC_INST_LSWX 0x7c00042a |
| 147 | #define PPC_INST_LWARX 0x7c000028 | 146 | #define PPC_INST_LWARX 0x7c000028 |
| @@ -285,20 +284,6 @@ | |||
| 285 | #define __PPC_EH(eh) 0 | 284 | #define __PPC_EH(eh) 0 |
| 286 | #endif | 285 | #endif |
| 287 | 286 | ||
| 288 | /* POWER8 Micro Partition Prefetch (MPP) parameters */ | ||
| 289 | /* Address mask is common for LOGMPP instruction and MPPR SPR */ | ||
| 290 | #define PPC_MPPE_ADDRESS_MASK 0xffffffffc000ULL | ||
| 291 | |||
| 292 | /* Bits 60 and 61 of MPP SPR should be set to one of the following */ | ||
| 293 | /* Aborting the fetch is indeed setting 00 in the table size bits */ | ||
| 294 | #define PPC_MPPR_FETCH_ABORT (0x0ULL << 60) | ||
| 295 | #define PPC_MPPR_FETCH_WHOLE_TABLE (0x2ULL << 60) | ||
| 296 | |||
| 297 | /* Bits 54 and 55 of register for LOGMPP instruction should be set to: */ | ||
| 298 | #define PPC_LOGMPP_LOG_L2 (0x02ULL << 54) | ||
| 299 | #define PPC_LOGMPP_LOG_L2L3 (0x01ULL << 54) | ||
| 300 | #define PPC_LOGMPP_LOG_ABORT (0x03ULL << 54) | ||
| 301 | |||
| 302 | /* Deal with instructions that older assemblers aren't aware of */ | 287 | /* Deal with instructions that older assemblers aren't aware of */ |
| 303 | #define PPC_DCBAL(a, b) stringify_in_c(.long PPC_INST_DCBAL | \ | 288 | #define PPC_DCBAL(a, b) stringify_in_c(.long PPC_INST_DCBAL | \ |
| 304 | __PPC_RA(a) | __PPC_RB(b)) | 289 | __PPC_RA(a) | __PPC_RB(b)) |
| @@ -307,8 +292,6 @@ | |||
| 307 | #define PPC_LDARX(t, a, b, eh) stringify_in_c(.long PPC_INST_LDARX | \ | 292 | #define PPC_LDARX(t, a, b, eh) stringify_in_c(.long PPC_INST_LDARX | \ |
| 308 | ___PPC_RT(t) | ___PPC_RA(a) | \ | 293 | ___PPC_RT(t) | ___PPC_RA(a) | \ |
| 309 | ___PPC_RB(b) | __PPC_EH(eh)) | 294 | ___PPC_RB(b) | __PPC_EH(eh)) |
| 310 | #define PPC_LOGMPP(b) stringify_in_c(.long PPC_INST_LOGMPP | \ | ||
| 311 | __PPC_RB(b)) | ||
| 312 | #define PPC_LWARX(t, a, b, eh) stringify_in_c(.long PPC_INST_LWARX | \ | 295 | #define PPC_LWARX(t, a, b, eh) stringify_in_c(.long PPC_INST_LWARX | \ |
| 313 | ___PPC_RT(t) | ___PPC_RA(a) | \ | 296 | ___PPC_RT(t) | ___PPC_RA(a) | \ |
| 314 | ___PPC_RB(b) | __PPC_EH(eh)) | 297 | ___PPC_RB(b) | __PPC_EH(eh)) |
diff --git a/arch/powerpc/include/asm/qe_ic.h b/arch/powerpc/include/asm/qe_ic.h index 25784cc959a0..1e155ca6d33c 100644 --- a/arch/powerpc/include/asm/qe_ic.h +++ b/arch/powerpc/include/asm/qe_ic.h | |||
| @@ -59,14 +59,14 @@ enum qe_ic_grp_id { | |||
| 59 | 59 | ||
| 60 | #ifdef CONFIG_QUICC_ENGINE | 60 | #ifdef CONFIG_QUICC_ENGINE |
| 61 | void qe_ic_init(struct device_node *node, unsigned int flags, | 61 | void qe_ic_init(struct device_node *node, unsigned int flags, |
| 62 | void (*low_handler)(unsigned int irq, struct irq_desc *desc), | 62 | void (*low_handler)(struct irq_desc *desc), |
| 63 | void (*high_handler)(unsigned int irq, struct irq_desc *desc)); | 63 | void (*high_handler)(struct irq_desc *desc)); |
| 64 | unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic); | 64 | unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic); |
| 65 | unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic); | 65 | unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic); |
| 66 | #else | 66 | #else |
| 67 | static inline void qe_ic_init(struct device_node *node, unsigned int flags, | 67 | static inline void qe_ic_init(struct device_node *node, unsigned int flags, |
| 68 | void (*low_handler)(unsigned int irq, struct irq_desc *desc), | 68 | void (*low_handler)(struct irq_desc *desc), |
| 69 | void (*high_handler)(unsigned int irq, struct irq_desc *desc)) | 69 | void (*high_handler)(struct irq_desc *desc)) |
| 70 | {} | 70 | {} |
| 71 | static inline unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic) | 71 | static inline unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic) |
| 72 | { return 0; } | 72 | { return 0; } |
| @@ -78,8 +78,7 @@ void qe_ic_set_highest_priority(unsigned int virq, int high); | |||
| 78 | int qe_ic_set_priority(unsigned int virq, unsigned int priority); | 78 | int qe_ic_set_priority(unsigned int virq, unsigned int priority); |
| 79 | int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high); | 79 | int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high); |
| 80 | 80 | ||
| 81 | static inline void qe_ic_cascade_low_ipic(unsigned int irq, | 81 | static inline void qe_ic_cascade_low_ipic(struct irq_desc *desc) |
| 82 | struct irq_desc *desc) | ||
| 83 | { | 82 | { |
| 84 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); | 83 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 85 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); | 84 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); |
| @@ -88,8 +87,7 @@ static inline void qe_ic_cascade_low_ipic(unsigned int irq, | |||
| 88 | generic_handle_irq(cascade_irq); | 87 | generic_handle_irq(cascade_irq); |
| 89 | } | 88 | } |
| 90 | 89 | ||
| 91 | static inline void qe_ic_cascade_high_ipic(unsigned int irq, | 90 | static inline void qe_ic_cascade_high_ipic(struct irq_desc *desc) |
| 92 | struct irq_desc *desc) | ||
| 93 | { | 91 | { |
| 94 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); | 92 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 95 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); | 93 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); |
| @@ -98,8 +96,7 @@ static inline void qe_ic_cascade_high_ipic(unsigned int irq, | |||
| 98 | generic_handle_irq(cascade_irq); | 96 | generic_handle_irq(cascade_irq); |
| 99 | } | 97 | } |
| 100 | 98 | ||
| 101 | static inline void qe_ic_cascade_low_mpic(unsigned int irq, | 99 | static inline void qe_ic_cascade_low_mpic(struct irq_desc *desc) |
| 102 | struct irq_desc *desc) | ||
| 103 | { | 100 | { |
| 104 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); | 101 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 105 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); | 102 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); |
| @@ -111,8 +108,7 @@ static inline void qe_ic_cascade_low_mpic(unsigned int irq, | |||
| 111 | chip->irq_eoi(&desc->irq_data); | 108 | chip->irq_eoi(&desc->irq_data); |
| 112 | } | 109 | } |
| 113 | 110 | ||
| 114 | static inline void qe_ic_cascade_high_mpic(unsigned int irq, | 111 | static inline void qe_ic_cascade_high_mpic(struct irq_desc *desc) |
| 115 | struct irq_desc *desc) | ||
| 116 | { | 112 | { |
| 117 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); | 113 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 118 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); | 114 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); |
| @@ -124,8 +120,7 @@ static inline void qe_ic_cascade_high_mpic(unsigned int irq, | |||
| 124 | chip->irq_eoi(&desc->irq_data); | 120 | chip->irq_eoi(&desc->irq_data); |
| 125 | } | 121 | } |
| 126 | 122 | ||
| 127 | static inline void qe_ic_cascade_muxed_mpic(unsigned int irq, | 123 | static inline void qe_ic_cascade_muxed_mpic(struct irq_desc *desc) |
| 128 | struct irq_desc *desc) | ||
| 129 | { | 124 | { |
| 130 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); | 125 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
| 131 | unsigned int cascade_irq; | 126 | unsigned int cascade_irq; |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index aa1cc5f015ee..a908ada8e0a5 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
| @@ -226,7 +226,6 @@ | |||
| 226 | #define CTRL_TE 0x00c00000 /* thread enable */ | 226 | #define CTRL_TE 0x00c00000 /* thread enable */ |
| 227 | #define CTRL_RUNLATCH 0x1 | 227 | #define CTRL_RUNLATCH 0x1 |
| 228 | #define SPRN_DAWR 0xB4 | 228 | #define SPRN_DAWR 0xB4 |
| 229 | #define SPRN_MPPR 0xB8 /* Micro Partition Prefetch Register */ | ||
| 230 | #define SPRN_RPR 0xBA /* Relative Priority Register */ | 229 | #define SPRN_RPR 0xBA /* Relative Priority Register */ |
| 231 | #define SPRN_CIABR 0xBB | 230 | #define SPRN_CIABR 0xBB |
| 232 | #define CIABR_PRIV 0x3 | 231 | #define CIABR_PRIV 0x3 |
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 71f2b3f02cf8..126d0c4f9b7d 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
| @@ -368,3 +368,5 @@ SYSCALL_SPU(memfd_create) | |||
| 368 | SYSCALL_SPU(bpf) | 368 | SYSCALL_SPU(bpf) |
| 369 | COMPAT_SYS(execveat) | 369 | COMPAT_SYS(execveat) |
| 370 | PPC64ONLY(switch_endian) | 370 | PPC64ONLY(switch_endian) |
| 371 | SYSCALL_SPU(userfaultfd) | ||
| 372 | SYSCALL_SPU(membarrier) | ||
diff --git a/arch/powerpc/include/asm/tsi108_pci.h b/arch/powerpc/include/asm/tsi108_pci.h index 5653d7cc3e24..ae59d5b672b0 100644 --- a/arch/powerpc/include/asm/tsi108_pci.h +++ b/arch/powerpc/include/asm/tsi108_pci.h | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | extern int tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary); | 40 | extern int tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary); |
| 41 | extern void tsi108_pci_int_init(struct device_node *node); | 41 | extern void tsi108_pci_int_init(struct device_node *node); |
| 42 | extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc); | 42 | extern void tsi108_irq_cascade(struct irq_desc *desc); |
| 43 | extern void tsi108_clear_pci_cfg_error(void); | 43 | extern void tsi108_clear_pci_cfg_error(void); |
| 44 | 44 | ||
| 45 | #endif /* _ASM_POWERPC_TSI108_PCI_H */ | 45 | #endif /* _ASM_POWERPC_TSI108_PCI_H */ |
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index f4f8b667d75b..13411be86041 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 364 | 15 | #define __NR_syscalls 366 |
| 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/asm/word-at-a-time.h b/arch/powerpc/include/asm/word-at-a-time.h index 5b3a903adae6..e4396a7d0f7c 100644 --- a/arch/powerpc/include/asm/word-at-a-time.h +++ b/arch/powerpc/include/asm/word-at-a-time.h | |||
| @@ -40,6 +40,11 @@ static inline bool has_zero(unsigned long val, unsigned long *data, const struct | |||
| 40 | return (val + c->high_bits) & ~rhs; | 40 | return (val + c->high_bits) & ~rhs; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | static inline unsigned long zero_bytemask(unsigned long mask) | ||
| 44 | { | ||
| 45 | return ~1ul << __fls(mask); | ||
| 46 | } | ||
| 47 | |||
| 43 | #else | 48 | #else |
| 44 | 49 | ||
| 45 | #ifdef CONFIG_64BIT | 50 | #ifdef CONFIG_64BIT |
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h index e4aa173dae62..6337738018aa 100644 --- a/arch/powerpc/include/uapi/asm/unistd.h +++ b/arch/powerpc/include/uapi/asm/unistd.h | |||
| @@ -386,5 +386,7 @@ | |||
| 386 | #define __NR_bpf 361 | 386 | #define __NR_bpf 361 |
| 387 | #define __NR_execveat 362 | 387 | #define __NR_execveat 362 |
| 388 | #define __NR_switch_endian 363 | 388 | #define __NR_switch_endian 363 |
| 389 | #define __NR_userfaultfd 364 | ||
| 390 | #define __NR_membarrier 365 | ||
| 389 | 391 | ||
| 390 | #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ | 392 | #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ |
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 59503ed98e5f..3f1472a78f39 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
| @@ -303,7 +303,7 @@ int dma_set_coherent_mask(struct device *dev, u64 mask) | |||
| 303 | dev->coherent_dma_mask = mask; | 303 | dev->coherent_dma_mask = mask; |
| 304 | return 0; | 304 | return 0; |
| 305 | } | 305 | } |
| 306 | EXPORT_SYMBOL_GPL(dma_set_coherent_mask); | 306 | EXPORT_SYMBOL(dma_set_coherent_mask); |
| 307 | 307 | ||
| 308 | #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16) | 308 | #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16) |
| 309 | 309 | ||
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 45096033d37b..290559df1e8b 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
| @@ -441,7 +441,7 @@ void migrate_irqs(void) | |||
| 441 | 441 | ||
| 442 | chip = irq_data_get_irq_chip(data); | 442 | chip = irq_data_get_irq_chip(data); |
| 443 | 443 | ||
| 444 | cpumask_and(mask, data->affinity, map); | 444 | cpumask_and(mask, irq_data_get_affinity_mask(data), map); |
| 445 | if (cpumask_any(mask) >= nr_cpu_ids) { | 445 | if (cpumask_any(mask) >= nr_cpu_ids) { |
| 446 | pr_warn("Breaking affinity for irq %i\n", irq); | 446 | pr_warn("Breaking affinity for irq %i\n", irq); |
| 447 | cpumask_copy(mask, map); | 447 | cpumask_copy(mask, map); |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index a1d0632d97c6..7587b2ae5f77 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
| @@ -1032,7 +1032,13 @@ void pcibios_set_master(struct pci_dev *dev) | |||
| 1032 | 1032 | ||
| 1033 | void pcibios_fixup_bus(struct pci_bus *bus) | 1033 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 1034 | { | 1034 | { |
| 1035 | /* Fixup the bus */ | 1035 | /* When called from the generic PCI probe, read PCI<->PCI bridge |
| 1036 | * bases. This is -not- called when generating the PCI tree from | ||
| 1037 | * the OF device-tree. | ||
| 1038 | */ | ||
| 1039 | pci_read_bridge_bases(bus); | ||
| 1040 | |||
| 1041 | /* Now fixup the bus bus */ | ||
| 1036 | pcibios_setup_bus_self(bus); | 1042 | pcibios_setup_bus_self(bus); |
| 1037 | 1043 | ||
| 1038 | /* Now fixup devices on that bus */ | 1044 | /* Now fixup devices on that bus */ |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 84bf934cf748..5a753fae8265 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
| @@ -1043,6 +1043,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
| 1043 | if (!capable(CAP_SYS_ADMIN)) | 1043 | if (!capable(CAP_SYS_ADMIN)) |
| 1044 | return -EPERM; | 1044 | return -EPERM; |
| 1045 | 1045 | ||
| 1046 | if (!rtas.entry) | ||
| 1047 | return -EINVAL; | ||
| 1048 | |||
| 1046 | if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0) | 1049 | if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0) |
| 1047 | return -EFAULT; | 1050 | return -EFAULT; |
| 1048 | 1051 | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index bb02e9f6944e..ad8c9db61237 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <asm/udbg.h> | 38 | #include <asm/udbg.h> |
| 39 | #include <asm/mmu_context.h> | 39 | #include <asm/mmu_context.h> |
| 40 | #include <asm/epapr_hcalls.h> | 40 | #include <asm/epapr_hcalls.h> |
| 41 | #include <asm/code-patching.h> | ||
| 41 | 42 | ||
| 42 | #define DBG(fmt...) | 43 | #define DBG(fmt...) |
| 43 | 44 | ||
| @@ -109,6 +110,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr) | |||
| 109 | * This is called very early on the boot process, after a minimal | 110 | * This is called very early on the boot process, after a minimal |
| 110 | * MMU environment has been set up but before MMU_init is called. | 111 | * MMU environment has been set up but before MMU_init is called. |
| 111 | */ | 112 | */ |
| 113 | extern unsigned int memset_nocache_branch; /* Insn to be replaced by NOP */ | ||
| 114 | |||
| 112 | notrace void __init machine_init(u64 dt_ptr) | 115 | notrace void __init machine_init(u64 dt_ptr) |
| 113 | { | 116 | { |
| 114 | lockdep_init(); | 117 | lockdep_init(); |
| @@ -116,6 +119,9 @@ notrace void __init machine_init(u64 dt_ptr) | |||
| 116 | /* Enable early debugging if any specified (see udbg.h) */ | 119 | /* Enable early debugging if any specified (see udbg.h) */ |
| 117 | udbg_early_init(); | 120 | udbg_early_init(); |
| 118 | 121 | ||
| 122 | patch_instruction((unsigned int *)&memcpy, PPC_INST_NOP); | ||
| 123 | patch_instruction(&memset_nocache_branch, PPC_INST_NOP); | ||
| 124 | |||
| 119 | /* Do some early initialization based on the flat device tree */ | 125 | /* Do some early initialization based on the flat device tree */ |
| 120 | early_init_devtree(__va(dt_ptr)); | 126 | early_init_devtree(__va(dt_ptr)); |
| 121 | 127 | ||
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index d75bf325f54a..099c79d8c160 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
| @@ -53,6 +53,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
| 53 | { "ext_intr", VCPU_STAT(ext_intr_exits) }, | 53 | { "ext_intr", VCPU_STAT(ext_intr_exits) }, |
| 54 | { "queue_intr", VCPU_STAT(queue_intr) }, | 54 | { "queue_intr", VCPU_STAT(queue_intr) }, |
| 55 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll), }, | 55 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll), }, |
| 56 | { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll), }, | ||
| 56 | { "halt_wakeup", VCPU_STAT(halt_wakeup) }, | 57 | { "halt_wakeup", VCPU_STAT(halt_wakeup) }, |
| 57 | { "pf_storage", VCPU_STAT(pf_storage) }, | 58 | { "pf_storage", VCPU_STAT(pf_storage) }, |
| 58 | { "sp_storage", VCPU_STAT(sp_storage) }, | 59 | { "sp_storage", VCPU_STAT(sp_storage) }, |
| @@ -828,12 +829,15 @@ int kvmppc_h_logical_ci_load(struct kvm_vcpu *vcpu) | |||
| 828 | unsigned long size = kvmppc_get_gpr(vcpu, 4); | 829 | unsigned long size = kvmppc_get_gpr(vcpu, 4); |
| 829 | unsigned long addr = kvmppc_get_gpr(vcpu, 5); | 830 | unsigned long addr = kvmppc_get_gpr(vcpu, 5); |
| 830 | u64 buf; | 831 | u64 buf; |
| 832 | int srcu_idx; | ||
| 831 | int ret; | 833 | int ret; |
| 832 | 834 | ||
| 833 | if (!is_power_of_2(size) || (size > sizeof(buf))) | 835 | if (!is_power_of_2(size) || (size > sizeof(buf))) |
| 834 | return H_TOO_HARD; | 836 | return H_TOO_HARD; |
| 835 | 837 | ||
| 838 | srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); | ||
| 836 | ret = kvm_io_bus_read(vcpu, KVM_MMIO_BUS, addr, size, &buf); | 839 | ret = kvm_io_bus_read(vcpu, KVM_MMIO_BUS, addr, size, &buf); |
| 840 | srcu_read_unlock(&vcpu->kvm->srcu, srcu_idx); | ||
| 837 | if (ret != 0) | 841 | if (ret != 0) |
| 838 | return H_TOO_HARD; | 842 | return H_TOO_HARD; |
| 839 | 843 | ||
| @@ -868,6 +872,7 @@ int kvmppc_h_logical_ci_store(struct kvm_vcpu *vcpu) | |||
| 868 | unsigned long addr = kvmppc_get_gpr(vcpu, 5); | 872 | unsigned long addr = kvmppc_get_gpr(vcpu, 5); |
| 869 | unsigned long val = kvmppc_get_gpr(vcpu, 6); | 873 | unsigned long val = kvmppc_get_gpr(vcpu, 6); |
| 870 | u64 buf; | 874 | u64 buf; |
| 875 | int srcu_idx; | ||
| 871 | int ret; | 876 | int ret; |
| 872 | 877 | ||
| 873 | switch (size) { | 878 | switch (size) { |
| @@ -891,7 +896,9 @@ int kvmppc_h_logical_ci_store(struct kvm_vcpu *vcpu) | |||
| 891 | return H_TOO_HARD; | 896 | return H_TOO_HARD; |
| 892 | } | 897 | } |
| 893 | 898 | ||
| 899 | srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); | ||
| 894 | ret = kvm_io_bus_write(vcpu, KVM_MMIO_BUS, addr, size, &buf); | 900 | ret = kvm_io_bus_write(vcpu, KVM_MMIO_BUS, addr, size, &buf); |
| 901 | srcu_read_unlock(&vcpu->kvm->srcu, srcu_idx); | ||
| 895 | if (ret != 0) | 902 | if (ret != 0) |
| 896 | return H_TOO_HARD; | 903 | return H_TOO_HARD; |
| 897 | 904 | ||
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 9754e6815e52..9c26c5a96ea2 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
| @@ -36,7 +36,6 @@ | |||
| 36 | 36 | ||
| 37 | #include <asm/reg.h> | 37 | #include <asm/reg.h> |
| 38 | #include <asm/cputable.h> | 38 | #include <asm/cputable.h> |
| 39 | #include <asm/cache.h> | ||
| 40 | #include <asm/cacheflush.h> | 39 | #include <asm/cacheflush.h> |
| 41 | #include <asm/tlbflush.h> | 40 | #include <asm/tlbflush.h> |
| 42 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
| @@ -75,12 +74,6 @@ | |||
| 75 | 74 | ||
| 76 | static DECLARE_BITMAP(default_enabled_hcalls, MAX_HCALL_OPCODE/4 + 1); | 75 | static DECLARE_BITMAP(default_enabled_hcalls, MAX_HCALL_OPCODE/4 + 1); |
| 77 | 76 | ||
| 78 | #if defined(CONFIG_PPC_64K_PAGES) | ||
| 79 | #define MPP_BUFFER_ORDER 0 | ||
| 80 | #elif defined(CONFIG_PPC_4K_PAGES) | ||
| 81 | #define MPP_BUFFER_ORDER 3 | ||
| 82 | #endif | ||
| 83 | |||
| 84 | static int dynamic_mt_modes = 6; | 77 | static int dynamic_mt_modes = 6; |
| 85 | module_param(dynamic_mt_modes, int, S_IRUGO | S_IWUSR); | 78 | module_param(dynamic_mt_modes, int, S_IRUGO | S_IWUSR); |
| 86 | MODULE_PARM_DESC(dynamic_mt_modes, "Set of allowed dynamic micro-threading modes: 0 (= none), 2, 4, or 6 (= 2 or 4)"); | 79 | MODULE_PARM_DESC(dynamic_mt_modes, "Set of allowed dynamic micro-threading modes: 0 (= none), 2, 4, or 6 (= 2 or 4)"); |
| @@ -1455,13 +1448,6 @@ static struct kvmppc_vcore *kvmppc_vcore_create(struct kvm *kvm, int core) | |||
| 1455 | vcore->kvm = kvm; | 1448 | vcore->kvm = kvm; |
| 1456 | INIT_LIST_HEAD(&vcore->preempt_list); | 1449 | INIT_LIST_HEAD(&vcore->preempt_list); |
| 1457 | 1450 | ||
| 1458 | vcore->mpp_buffer_is_valid = false; | ||
| 1459 | |||
| 1460 | if (cpu_has_feature(CPU_FTR_ARCH_207S)) | ||
| 1461 | vcore->mpp_buffer = (void *)__get_free_pages( | ||
| 1462 | GFP_KERNEL|__GFP_ZERO, | ||
| 1463 | MPP_BUFFER_ORDER); | ||
| 1464 | |||
| 1465 | return vcore; | 1451 | return vcore; |
| 1466 | } | 1452 | } |
| 1467 | 1453 | ||
| @@ -1894,33 +1880,6 @@ static int on_primary_thread(void) | |||
| 1894 | return 1; | 1880 | return 1; |
| 1895 | } | 1881 | } |
| 1896 | 1882 | ||
| 1897 | static void kvmppc_start_saving_l2_cache(struct kvmppc_vcore *vc) | ||
| 1898 | { | ||
| 1899 | phys_addr_t phy_addr, mpp_addr; | ||
| 1900 | |||
| 1901 | phy_addr = (phys_addr_t)virt_to_phys(vc->mpp_buffer); | ||
| 1902 | mpp_addr = phy_addr & PPC_MPPE_ADDRESS_MASK; | ||
| 1903 | |||
| 1904 | mtspr(SPRN_MPPR, mpp_addr | PPC_MPPR_FETCH_ABORT); | ||
| 1905 | logmpp(mpp_addr | PPC_LOGMPP_LOG_L2); | ||
| 1906 | |||
| 1907 | vc->mpp_buffer_is_valid = true; | ||
| 1908 | } | ||
| 1909 | |||
| 1910 | static void kvmppc_start_restoring_l2_cache(const struct kvmppc_vcore *vc) | ||
| 1911 | { | ||
| 1912 | phys_addr_t phy_addr, mpp_addr; | ||
| 1913 | |||
| 1914 | phy_addr = virt_to_phys(vc->mpp_buffer); | ||
| 1915 | mpp_addr = phy_addr & PPC_MPPE_ADDRESS_MASK; | ||
| 1916 | |||
| 1917 | /* We must abort any in-progress save operations to ensure | ||
| 1918 | * the table is valid so that prefetch engine knows when to | ||
| 1919 | * stop prefetching. */ | ||
| 1920 | logmpp(mpp_addr | PPC_LOGMPP_LOG_ABORT); | ||
| 1921 | mtspr(SPRN_MPPR, mpp_addr | PPC_MPPR_FETCH_WHOLE_TABLE); | ||
| 1922 | } | ||
| 1923 | |||
| 1924 | /* | 1883 | /* |
| 1925 | * A list of virtual cores for each physical CPU. | 1884 | * A list of virtual cores for each physical CPU. |
| 1926 | * These are vcores that could run but their runner VCPU tasks are | 1885 | * These are vcores that could run but their runner VCPU tasks are |
| @@ -2471,14 +2430,8 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc) | |||
| 2471 | 2430 | ||
| 2472 | srcu_idx = srcu_read_lock(&vc->kvm->srcu); | 2431 | srcu_idx = srcu_read_lock(&vc->kvm->srcu); |
| 2473 | 2432 | ||
| 2474 | if (vc->mpp_buffer_is_valid) | ||
| 2475 | kvmppc_start_restoring_l2_cache(vc); | ||
| 2476 | |||
| 2477 | __kvmppc_vcore_entry(); | 2433 | __kvmppc_vcore_entry(); |
| 2478 | 2434 | ||
| 2479 | if (vc->mpp_buffer) | ||
| 2480 | kvmppc_start_saving_l2_cache(vc); | ||
| 2481 | |||
| 2482 | srcu_read_unlock(&vc->kvm->srcu, srcu_idx); | 2435 | srcu_read_unlock(&vc->kvm->srcu, srcu_idx); |
| 2483 | 2436 | ||
| 2484 | spin_lock(&vc->lock); | 2437 | spin_lock(&vc->lock); |
| @@ -2692,9 +2645,13 @@ static int kvmppc_run_vcpu(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) | |||
| 2692 | 2645 | ||
| 2693 | while (vcpu->arch.state == KVMPPC_VCPU_RUNNABLE && | 2646 | while (vcpu->arch.state == KVMPPC_VCPU_RUNNABLE && |
| 2694 | (vc->vcore_state == VCORE_RUNNING || | 2647 | (vc->vcore_state == VCORE_RUNNING || |
| 2695 | vc->vcore_state == VCORE_EXITING)) | 2648 | vc->vcore_state == VCORE_EXITING || |
| 2649 | vc->vcore_state == VCORE_PIGGYBACK)) | ||
| 2696 | kvmppc_wait_for_exec(vc, vcpu, TASK_UNINTERRUPTIBLE); | 2650 | kvmppc_wait_for_exec(vc, vcpu, TASK_UNINTERRUPTIBLE); |
| 2697 | 2651 | ||
| 2652 | if (vc->vcore_state == VCORE_PREEMPT && vc->runner == NULL) | ||
| 2653 | kvmppc_vcore_end_preempt(vc); | ||
| 2654 | |||
| 2698 | if (vcpu->arch.state == KVMPPC_VCPU_RUNNABLE) { | 2655 | if (vcpu->arch.state == KVMPPC_VCPU_RUNNABLE) { |
| 2699 | kvmppc_remove_runnable(vc, vcpu); | 2656 | kvmppc_remove_runnable(vc, vcpu); |
| 2700 | vcpu->stat.signal_exits++; | 2657 | vcpu->stat.signal_exits++; |
| @@ -3069,14 +3026,8 @@ static void kvmppc_free_vcores(struct kvm *kvm) | |||
| 3069 | { | 3026 | { |
| 3070 | long int i; | 3027 | long int i; |
| 3071 | 3028 | ||
| 3072 | for (i = 0; i < KVM_MAX_VCORES; ++i) { | 3029 | for (i = 0; i < KVM_MAX_VCORES; ++i) |
| 3073 | if (kvm->arch.vcores[i] && kvm->arch.vcores[i]->mpp_buffer) { | ||
| 3074 | struct kvmppc_vcore *vc = kvm->arch.vcores[i]; | ||
| 3075 | free_pages((unsigned long)vc->mpp_buffer, | ||
| 3076 | MPP_BUFFER_ORDER); | ||
| 3077 | } | ||
| 3078 | kfree(kvm->arch.vcores[i]); | 3030 | kfree(kvm->arch.vcores[i]); |
| 3079 | } | ||
| 3080 | kvm->arch.online_vcores = 0; | 3031 | kvm->arch.online_vcores = 0; |
| 3081 | } | 3032 | } |
| 3082 | 3033 | ||
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 2273dcacef39..b98889e9851d 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
| @@ -1257,6 +1257,7 @@ mc_cont: | |||
| 1257 | bl kvmhv_accumulate_time | 1257 | bl kvmhv_accumulate_time |
| 1258 | #endif | 1258 | #endif |
| 1259 | 1259 | ||
| 1260 | mr r3, r12 | ||
| 1260 | /* Increment exit count, poke other threads to exit */ | 1261 | /* Increment exit count, poke other threads to exit */ |
| 1261 | bl kvmhv_commence_exit | 1262 | bl kvmhv_commence_exit |
| 1262 | nop | 1263 | nop |
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index ae458f0fd061..fd5875179e5c 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
| @@ -63,6 +63,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
| 63 | { "dec", VCPU_STAT(dec_exits) }, | 63 | { "dec", VCPU_STAT(dec_exits) }, |
| 64 | { "ext_intr", VCPU_STAT(ext_intr_exits) }, | 64 | { "ext_intr", VCPU_STAT(ext_intr_exits) }, |
| 65 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, | 65 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, |
| 66 | { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll) }, | ||
| 66 | { "halt_wakeup", VCPU_STAT(halt_wakeup) }, | 67 | { "halt_wakeup", VCPU_STAT(halt_wakeup) }, |
| 67 | { "doorbell", VCPU_STAT(dbell_exits) }, | 68 | { "doorbell", VCPU_STAT(dbell_exits) }, |
| 68 | { "guest doorbell", VCPU_STAT(gdbell_exits) }, | 69 | { "guest doorbell", VCPU_STAT(gdbell_exits) }, |
diff --git a/arch/powerpc/lib/copy_32.S b/arch/powerpc/lib/copy_32.S index 2ef50c629470..c44df2dbedd5 100644 --- a/arch/powerpc/lib/copy_32.S +++ b/arch/powerpc/lib/copy_32.S | |||
| @@ -73,6 +73,10 @@ CACHELINE_MASK = (L1_CACHE_BYTES-1) | |||
| 73 | * Use dcbz on the complete cache lines in the destination | 73 | * Use dcbz on the complete cache lines in the destination |
| 74 | * to set them to zero. This requires that the destination | 74 | * to set them to zero. This requires that the destination |
| 75 | * area is cacheable. -- paulus | 75 | * area is cacheable. -- paulus |
| 76 | * | ||
| 77 | * During early init, cache might not be active yet, so dcbz cannot be used. | ||
| 78 | * We therefore skip the optimised bloc that uses dcbz. This jump is | ||
| 79 | * replaced by a nop once cache is active. This is done in machine_init() | ||
| 76 | */ | 80 | */ |
| 77 | _GLOBAL(memset) | 81 | _GLOBAL(memset) |
| 78 | rlwimi r4,r4,8,16,23 | 82 | rlwimi r4,r4,8,16,23 |
| @@ -88,6 +92,8 @@ _GLOBAL(memset) | |||
| 88 | subf r6,r0,r6 | 92 | subf r6,r0,r6 |
| 89 | cmplwi 0,r4,0 | 93 | cmplwi 0,r4,0 |
| 90 | bne 2f /* Use normal procedure if r4 is not zero */ | 94 | bne 2f /* Use normal procedure if r4 is not zero */ |
| 95 | _GLOBAL(memset_nocache_branch) | ||
| 96 | b 2f /* Skip optimised bloc until cache is enabled */ | ||
| 91 | 97 | ||
| 92 | clrlwi r7,r6,32-LG_CACHELINE_BYTES | 98 | clrlwi r7,r6,32-LG_CACHELINE_BYTES |
| 93 | add r8,r7,r5 | 99 | add r8,r7,r5 |
| @@ -128,6 +134,10 @@ _GLOBAL(memset) | |||
| 128 | * the destination area is cacheable. | 134 | * the destination area is cacheable. |
| 129 | * We only use this version if the source and dest don't overlap. | 135 | * We only use this version if the source and dest don't overlap. |
| 130 | * -- paulus. | 136 | * -- paulus. |
| 137 | * | ||
| 138 | * During early init, cache might not be active yet, so dcbz cannot be used. | ||
| 139 | * We therefore jump to generic_memcpy which doesn't use dcbz. This jump is | ||
| 140 | * replaced by a nop once cache is active. This is done in machine_init() | ||
| 131 | */ | 141 | */ |
| 132 | _GLOBAL(memmove) | 142 | _GLOBAL(memmove) |
| 133 | cmplw 0,r3,r4 | 143 | cmplw 0,r3,r4 |
| @@ -135,6 +145,7 @@ _GLOBAL(memmove) | |||
| 135 | /* fall through */ | 145 | /* fall through */ |
| 136 | 146 | ||
| 137 | _GLOBAL(memcpy) | 147 | _GLOBAL(memcpy) |
| 148 | b generic_memcpy | ||
| 138 | add r7,r3,r5 /* test if the src & dst overlap */ | 149 | add r7,r3,r5 /* test if the src & dst overlap */ |
| 139 | add r8,r4,r5 | 150 | add r8,r4,r5 |
| 140 | cmplw 0,r4,r7 | 151 | cmplw 0,r4,r7 |
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 13befa35d8a8..c8822af10a58 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
| @@ -582,13 +582,21 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot, | |||
| 582 | * be when they isi), and we are the only one left. We rely on our kernel | 582 | * be when they isi), and we are the only one left. We rely on our kernel |
| 583 | * mapping being 0xC0's and the hardware ignoring those two real bits. | 583 | * mapping being 0xC0's and the hardware ignoring those two real bits. |
| 584 | * | 584 | * |
| 585 | * This must be called with interrupts disabled. | ||
| 586 | * | ||
| 587 | * Taking the native_tlbie_lock is unsafe here due to the possibility of | ||
| 588 | * lockdep being on. On pre POWER5 hardware, not taking the lock could | ||
| 589 | * cause deadlock. POWER5 and newer not taking the lock is fine. This only | ||
| 590 | * gets called during boot before secondary CPUs have come up and during | ||
| 591 | * crashdump and all bets are off anyway. | ||
| 592 | * | ||
| 585 | * TODO: add batching support when enabled. remember, no dynamic memory here, | 593 | * TODO: add batching support when enabled. remember, no dynamic memory here, |
| 586 | * athough there is the control page available... | 594 | * athough there is the control page available... |
| 587 | */ | 595 | */ |
| 588 | static void native_hpte_clear(void) | 596 | static void native_hpte_clear(void) |
| 589 | { | 597 | { |
| 590 | unsigned long vpn = 0; | 598 | unsigned long vpn = 0; |
| 591 | unsigned long slot, slots, flags; | 599 | unsigned long slot, slots; |
| 592 | struct hash_pte *hptep = htab_address; | 600 | struct hash_pte *hptep = htab_address; |
| 593 | unsigned long hpte_v; | 601 | unsigned long hpte_v; |
| 594 | unsigned long pteg_count; | 602 | unsigned long pteg_count; |
| @@ -596,13 +604,6 @@ static void native_hpte_clear(void) | |||
| 596 | 604 | ||
| 597 | pteg_count = htab_hash_mask + 1; | 605 | pteg_count = htab_hash_mask + 1; |
| 598 | 606 | ||
| 599 | local_irq_save(flags); | ||
| 600 | |||
| 601 | /* we take the tlbie lock and hold it. Some hardware will | ||
| 602 | * deadlock if we try to tlbie from two processors at once. | ||
| 603 | */ | ||
| 604 | raw_spin_lock(&native_tlbie_lock); | ||
| 605 | |||
| 606 | slots = pteg_count * HPTES_PER_GROUP; | 607 | slots = pteg_count * HPTES_PER_GROUP; |
| 607 | 608 | ||
| 608 | for (slot = 0; slot < slots; slot++, hptep++) { | 609 | for (slot = 0; slot < slots; slot++, hptep++) { |
| @@ -614,8 +615,8 @@ static void native_hpte_clear(void) | |||
| 614 | hpte_v = be64_to_cpu(hptep->v); | 615 | hpte_v = be64_to_cpu(hptep->v); |
| 615 | 616 | ||
| 616 | /* | 617 | /* |
| 617 | * Call __tlbie() here rather than tlbie() since we | 618 | * Call __tlbie() here rather than tlbie() since we can't take the |
| 618 | * already hold the native_tlbie_lock. | 619 | * native_tlbie_lock. |
| 619 | */ | 620 | */ |
| 620 | if (hpte_v & HPTE_V_VALID) { | 621 | if (hpte_v & HPTE_V_VALID) { |
| 621 | hpte_decode(hptep, slot, &psize, &apsize, &ssize, &vpn); | 622 | hpte_decode(hptep, slot, &psize, &apsize, &ssize, &vpn); |
| @@ -625,8 +626,6 @@ static void native_hpte_clear(void) | |||
| 625 | } | 626 | } |
| 626 | 627 | ||
| 627 | asm volatile("eieio; tlbsync; ptesync":::"memory"); | 628 | asm volatile("eieio; tlbsync; ptesync":::"memory"); |
| 628 | raw_spin_unlock(&native_tlbie_lock); | ||
| 629 | local_irq_restore(flags); | ||
| 630 | } | 629 | } |
| 631 | 630 | ||
| 632 | /* | 631 | /* |
diff --git a/arch/powerpc/mm/hugepage-hash64.c b/arch/powerpc/mm/hugepage-hash64.c index 43dafb9d6a46..4d87122cf6a7 100644 --- a/arch/powerpc/mm/hugepage-hash64.c +++ b/arch/powerpc/mm/hugepage-hash64.c | |||
| @@ -85,7 +85,6 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid, | |||
| 85 | BUG_ON(index >= 4096); | 85 | BUG_ON(index >= 4096); |
| 86 | 86 | ||
| 87 | vpn = hpt_vpn(ea, vsid, ssize); | 87 | vpn = hpt_vpn(ea, vsid, ssize); |
| 88 | hash = hpt_hash(vpn, shift, ssize); | ||
| 89 | hpte_slot_array = get_hpte_slot_array(pmdp); | 88 | hpte_slot_array = get_hpte_slot_array(pmdp); |
| 90 | if (psize == MMU_PAGE_4K) { | 89 | if (psize == MMU_PAGE_4K) { |
| 91 | /* | 90 | /* |
| @@ -101,6 +100,7 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid, | |||
| 101 | valid = hpte_valid(hpte_slot_array, index); | 100 | valid = hpte_valid(hpte_slot_array, index); |
| 102 | if (valid) { | 101 | if (valid) { |
| 103 | /* update the hpte bits */ | 102 | /* update the hpte bits */ |
| 103 | hash = hpt_hash(vpn, shift, ssize); | ||
| 104 | hidx = hpte_hash_index(hpte_slot_array, index); | 104 | hidx = hpte_hash_index(hpte_slot_array, index); |
| 105 | if (hidx & _PTEIDX_SECONDARY) | 105 | if (hidx & _PTEIDX_SECONDARY) |
| 106 | hash = ~hash; | 106 | hash = ~hash; |
| @@ -126,6 +126,7 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid, | |||
| 126 | if (!valid) { | 126 | if (!valid) { |
| 127 | unsigned long hpte_group; | 127 | unsigned long hpte_group; |
| 128 | 128 | ||
| 129 | hash = hpt_hash(vpn, shift, ssize); | ||
| 129 | /* insert new entry */ | 130 | /* insert new entry */ |
| 130 | pa = pmd_pfn(__pmd(old_pmd)) << PAGE_SHIFT; | 131 | pa = pmd_pfn(__pmd(old_pmd)) << PAGE_SHIFT; |
| 131 | new_pmd |= _PAGE_HASHPTE; | 132 | new_pmd |= _PAGE_HASHPTE; |
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c index 11090ab4bf59..0035d146df73 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | |||
| @@ -104,9 +104,10 @@ cpld_pic_get_irq(int offset, u8 ignore, u8 __iomem *statusp, | |||
| 104 | return irq_linear_revmap(cpld_pic_host, cpld_irq); | 104 | return irq_linear_revmap(cpld_pic_host, cpld_irq); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | static void | 107 | static void cpld_pic_cascade(struct irq_desc *desc) |
| 108 | cpld_pic_cascade(unsigned int irq, struct irq_desc *desc) | ||
| 109 | { | 108 | { |
| 109 | unsigned int irq; | ||
| 110 | |||
| 110 | irq = cpld_pic_get_irq(0, PCI_IGNORE, &cpld_regs->pci_status, | 111 | irq = cpld_pic_get_irq(0, PCI_IGNORE, &cpld_regs->pci_status, |
| 111 | &cpld_regs->pci_mask); | 112 | &cpld_regs->pci_mask); |
| 112 | if (irq != NO_IRQ) { | 113 | if (irq != NO_IRQ) { |
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c index 32cae33c4266..8fb95480fd73 100644 --- a/arch/powerpc/platforms/52xx/media5200.c +++ b/arch/powerpc/platforms/52xx/media5200.c | |||
| @@ -80,7 +80,7 @@ static struct irq_chip media5200_irq_chip = { | |||
| 80 | .irq_mask_ack = media5200_irq_mask, | 80 | .irq_mask_ack = media5200_irq_mask, |
| 81 | }; | 81 | }; |
| 82 | 82 | ||
| 83 | void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) | 83 | static void media5200_irq_cascade(struct irq_desc *desc) |
| 84 | { | 84 | { |
| 85 | struct irq_chip *chip = irq_desc_get_chip(desc); | 85 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 86 | int sub_virq, val; | 86 | int sub_virq, val; |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index 63016621aff8..78ac19aefa4d 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c | |||
| @@ -191,7 +191,7 @@ static struct irq_chip mpc52xx_gpt_irq_chip = { | |||
| 191 | .irq_set_type = mpc52xx_gpt_irq_set_type, | 191 | .irq_set_type = mpc52xx_gpt_irq_set_type, |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | void mpc52xx_gpt_irq_cascade(unsigned int virq, struct irq_desc *desc) | 194 | static void mpc52xx_gpt_irq_cascade(struct irq_desc *desc) |
| 195 | { | 195 | { |
| 196 | struct mpc52xx_gpt_priv *gpt = irq_desc_get_handler_data(desc); | 196 | struct mpc52xx_gpt_priv *gpt = irq_desc_get_handler_data(desc); |
| 197 | int sub_virq; | 197 | int sub_virq; |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index 2944bc84b9d6..4fe2074c88cb 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
| @@ -196,7 +196,7 @@ static int mpc52xx_extirq_set_type(struct irq_data *d, unsigned int flow_type) | |||
| 196 | ctrl_reg |= (type << (22 - (l2irq * 2))); | 196 | ctrl_reg |= (type << (22 - (l2irq * 2))); |
| 197 | out_be32(&intr->ctrl, ctrl_reg); | 197 | out_be32(&intr->ctrl, ctrl_reg); |
| 198 | 198 | ||
| 199 | __irq_set_handler_locked(d->irq, handler); | 199 | irq_set_handler_locked(d, handler); |
| 200 | 200 | ||
| 201 | return 0; | 201 | return 0; |
| 202 | } | 202 | } |
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c index 74861a7fb807..60e89fc9c753 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | |||
| @@ -78,7 +78,7 @@ static struct irq_chip pq2ads_pci_ic = { | |||
| 78 | .irq_disable = pq2ads_pci_mask_irq | 78 | .irq_disable = pq2ads_pci_mask_irq |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) | 81 | static void pq2ads_pci_irq_demux(struct irq_desc *desc) |
| 82 | { | 82 | { |
| 83 | struct pq2ads_pci_pic *priv = irq_desc_get_handler_data(desc); | 83 | struct pq2ads_pci_pic *priv = irq_desc_get_handler_data(desc); |
| 84 | u32 stat, mask, pend; | 84 | u32 stat, mask, pend; |
diff --git a/arch/powerpc/platforms/85xx/common.c b/arch/powerpc/platforms/85xx/common.c index 7bfb9b184dd4..23791de7b688 100644 --- a/arch/powerpc/platforms/85xx/common.c +++ b/arch/powerpc/platforms/85xx/common.c | |||
| @@ -49,7 +49,7 @@ int __init mpc85xx_common_publish_devices(void) | |||
| 49 | return of_platform_bus_probe(NULL, mpc85xx_common_ids, NULL); | 49 | return of_platform_bus_probe(NULL, mpc85xx_common_ids, NULL); |
| 50 | } | 50 | } |
| 51 | #ifdef CONFIG_CPM2 | 51 | #ifdef CONFIG_CPM2 |
| 52 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | 52 | static void cpm2_cascade(struct irq_desc *desc) |
| 53 | { | 53 | { |
| 54 | struct irq_chip *chip = irq_desc_get_chip(desc); | 54 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 55 | int cascade_irq; | 55 | int cascade_irq; |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index b0753e222086..5ac70de3e48a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
| @@ -192,8 +192,7 @@ void mpc85xx_cds_fixup_bus(struct pci_bus *bus) | |||
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | #ifdef CONFIG_PPC_I8259 | 194 | #ifdef CONFIG_PPC_I8259 |
| 195 | static void mpc85xx_8259_cascade_handler(unsigned int irq, | 195 | static void mpc85xx_8259_cascade_handler(struct irq_desc *desc) |
| 196 | struct irq_desc *desc) | ||
| 197 | { | 196 | { |
| 198 | unsigned int cascade_irq = i8259_irq(); | 197 | unsigned int cascade_irq = i8259_irq(); |
| 199 | 198 | ||
| @@ -202,7 +201,7 @@ static void mpc85xx_8259_cascade_handler(unsigned int irq, | |||
| 202 | generic_handle_irq(cascade_irq); | 201 | generic_handle_irq(cascade_irq); |
| 203 | 202 | ||
| 204 | /* check for any interrupts from the shared IRQ line */ | 203 | /* check for any interrupts from the shared IRQ line */ |
| 205 | handle_fasteoi_irq(irq, desc); | 204 | handle_fasteoi_irq(desc); |
| 206 | } | 205 | } |
| 207 | 206 | ||
| 208 | static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id) | 207 | static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id) |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index ffdf02121a7c..f858306dba6a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| 48 | #ifdef CONFIG_PPC_I8259 | 48 | #ifdef CONFIG_PPC_I8259 |
| 49 | static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) | 49 | static void mpc85xx_8259_cascade(struct irq_desc *desc) |
| 50 | { | 50 | { |
| 51 | struct irq_chip *chip = irq_desc_get_chip(desc); | 51 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 52 | unsigned int cascade_irq = i8259_irq(); | 52 | unsigned int cascade_irq = i8259_irq(); |
diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c index 55a9682b9529..b02d6a5bb035 100644 --- a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c +++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c | |||
| @@ -91,9 +91,10 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq) | |||
| 91 | (irq_hw_number_t)i); | 91 | (irq_hw_number_t)i); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc) | 94 | static void socrates_fpga_pic_cascade(struct irq_desc *desc) |
| 95 | { | 95 | { |
| 96 | struct irq_chip *chip = irq_desc_get_chip(desc); | 96 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 97 | unsigned int irq = irq_desc_get_irq(desc); | ||
| 97 | unsigned int cascade_irq; | 98 | unsigned int cascade_irq; |
| 98 | 99 | ||
| 99 | /* | 100 | /* |
diff --git a/arch/powerpc/platforms/86xx/pic.c b/arch/powerpc/platforms/86xx/pic.c index d5b98c0f958a..845defa1fd19 100644 --- a/arch/powerpc/platforms/86xx/pic.c +++ b/arch/powerpc/platforms/86xx/pic.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <asm/i8259.h> | 17 | #include <asm/i8259.h> |
| 18 | 18 | ||
| 19 | #ifdef CONFIG_PPC_I8259 | 19 | #ifdef CONFIG_PPC_I8259 |
| 20 | static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) | 20 | static void mpc86xx_8259_cascade(struct irq_desc *desc) |
| 21 | { | 21 | { |
| 22 | struct irq_chip *chip = irq_desc_get_chip(desc); | 22 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 23 | unsigned int cascade_irq = i8259_irq(); | 23 | unsigned int cascade_irq = i8259_irq(); |
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index d3037747031d..c289fc77b4ba 100644 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c | |||
| @@ -214,7 +214,7 @@ void mpc8xx_restart(char *cmd) | |||
| 214 | panic("Restart failed\n"); | 214 | panic("Restart failed\n"); |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | static void cpm_cascade(unsigned int irq, struct irq_desc *desc) | 217 | static void cpm_cascade(struct irq_desc *desc) |
| 218 | { | 218 | { |
| 219 | struct irq_chip *chip = irq_desc_get_chip(desc); | 219 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 220 | int cascade_irq = cpm_get_irq(); | 220 | int cascade_irq = cpm_get_irq(); |
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index 306888acb737..e0e68a1c0d3c 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
| @@ -93,7 +93,7 @@ static void msic_dcr_write(struct axon_msic *msic, unsigned int dcr_n, u32 val) | |||
| 93 | dcr_write(msic->dcr_host, dcr_n, val); | 93 | dcr_write(msic->dcr_host, dcr_n, val); |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc) | 96 | static void axon_msi_cascade(struct irq_desc *desc) |
| 97 | { | 97 | { |
| 98 | struct irq_chip *chip = irq_desc_get_chip(desc); | 98 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 99 | struct axon_msic *msic = irq_desc_get_handler_data(desc); | 99 | struct axon_msic *msic = irq_desc_get_handler_data(desc); |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index a15f1efc295f..9f609fc8d331 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
| @@ -99,11 +99,12 @@ static void iic_ioexc_eoi(struct irq_data *d) | |||
| 99 | { | 99 | { |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc) | 102 | static void iic_ioexc_cascade(struct irq_desc *desc) |
| 103 | { | 103 | { |
| 104 | struct irq_chip *chip = irq_desc_get_chip(desc); | 104 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 105 | struct cbe_iic_regs __iomem *node_iic = | 105 | struct cbe_iic_regs __iomem *node_iic = |
| 106 | (void __iomem *)irq_desc_get_handler_data(desc); | 106 | (void __iomem *)irq_desc_get_handler_data(desc); |
| 107 | unsigned int irq = irq_desc_get_irq(desc); | ||
| 107 | unsigned int base = (irq & 0xffffff00) | IIC_IRQ_TYPE_IOEXC; | 108 | unsigned int base = (irq & 0xffffff00) | IIC_IRQ_TYPE_IOEXC; |
| 108 | unsigned long bits, ack; | 109 | unsigned long bits, ack; |
| 109 | int cascade; | 110 | int cascade; |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index 1f72f4ab6353..9d27de62dc62 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
| @@ -199,7 +199,7 @@ static const struct irq_domain_ops spider_host_ops = { | |||
| 199 | .xlate = spider_host_xlate, | 199 | .xlate = spider_host_xlate, |
| 200 | }; | 200 | }; |
| 201 | 201 | ||
| 202 | static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc) | 202 | static void spider_irq_cascade(struct irq_desc *desc) |
| 203 | { | 203 | { |
| 204 | struct irq_chip *chip = irq_desc_get_chip(desc); | 204 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 205 | struct spider_pic *pic = irq_desc_get_handler_data(desc); | 205 | struct spider_pic *pic = irq_desc_get_handler_data(desc); |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 15ebc4e8a151..987d1b8d68e3 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
| @@ -363,7 +363,7 @@ void __init chrp_setup_arch(void) | |||
| 363 | if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0); | 363 | if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0); |
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc) | 366 | static void chrp_8259_cascade(struct irq_desc *desc) |
| 367 | { | 367 | { |
| 368 | struct irq_chip *chip = irq_desc_get_chip(desc); | 368 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 369 | unsigned int cascade_irq = i8259_irq(); | 369 | unsigned int cascade_irq = i8259_irq(); |
diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c index 9dd154d6f89a..9b7975706bfc 100644 --- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c +++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c | |||
| @@ -120,8 +120,7 @@ static unsigned int __hlwd_pic_get_irq(struct irq_domain *h) | |||
| 120 | return irq_linear_revmap(h, irq); | 120 | return irq_linear_revmap(h, irq); |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | static void hlwd_pic_irq_cascade(unsigned int cascade_virq, | 123 | static void hlwd_pic_irq_cascade(struct irq_desc *desc) |
| 124 | struct irq_desc *desc) | ||
| 125 | { | 124 | { |
| 126 | struct irq_chip *chip = irq_desc_get_chip(desc); | 125 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 127 | struct irq_domain *irq_domain = irq_desc_get_handler_data(desc); | 126 | struct irq_domain *irq_domain = irq_desc_get_handler_data(desc); |
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c index 1613303177e6..8f65aa3747f5 100644 --- a/arch/powerpc/platforms/embedded6xx/mvme5100.c +++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | static phys_addr_t pci_membase; | 42 | static phys_addr_t pci_membase; |
| 43 | static u_char *restart; | 43 | static u_char *restart; |
| 44 | 44 | ||
| 45 | static void mvme5100_8259_cascade(unsigned int irq, struct irq_desc *desc) | 45 | static void mvme5100_8259_cascade(struct irq_desc *desc) |
| 46 | { | 46 | { |
| 47 | struct irq_chip *chip = irq_desc_get_chip(desc); | 47 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 48 | unsigned int cascade_irq = i8259_irq(); | 48 | unsigned int cascade_irq = i8259_irq(); |
diff --git a/arch/powerpc/platforms/pasemi/msi.c b/arch/powerpc/platforms/pasemi/msi.c index e66ef1943338..b304a9fe55cc 100644 --- a/arch/powerpc/platforms/pasemi/msi.c +++ b/arch/powerpc/platforms/pasemi/msi.c | |||
| @@ -63,6 +63,7 @@ static struct irq_chip mpic_pasemi_msi_chip = { | |||
| 63 | static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev) | 63 | static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev) |
| 64 | { | 64 | { |
| 65 | struct msi_desc *entry; | 65 | struct msi_desc *entry; |
| 66 | irq_hw_number_t hwirq; | ||
| 66 | 67 | ||
| 67 | pr_debug("pasemi_msi_teardown_msi_irqs, pdev %p\n", pdev); | 68 | pr_debug("pasemi_msi_teardown_msi_irqs, pdev %p\n", pdev); |
| 68 | 69 | ||
| @@ -70,10 +71,10 @@ static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev) | |||
| 70 | if (entry->irq == NO_IRQ) | 71 | if (entry->irq == NO_IRQ) |
| 71 | continue; | 72 | continue; |
| 72 | 73 | ||
| 74 | hwirq = virq_to_hw(entry->irq); | ||
| 73 | irq_set_msi_desc(entry->irq, NULL); | 75 | irq_set_msi_desc(entry->irq, NULL); |
| 74 | msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, | ||
| 75 | virq_to_hw(entry->irq), ALLOC_CHUNK); | ||
| 76 | irq_dispose_mapping(entry->irq); | 76 | irq_dispose_mapping(entry->irq); |
| 77 | msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, hwirq, ALLOC_CHUNK); | ||
| 77 | } | 78 | } |
| 78 | 79 | ||
| 79 | return; | 80 | return; |
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 230f3a7cdea4..4296d55e88f3 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c | |||
| @@ -487,9 +487,12 @@ int opal_machine_check(struct pt_regs *regs) | |||
| 487 | * PRD component would have already got notified about this | 487 | * PRD component would have already got notified about this |
| 488 | * error through other channels. | 488 | * error through other channels. |
| 489 | * | 489 | * |
| 490 | * In any case, let us just fall through. We anyway heading | 490 | * If hardware marked this as an unrecoverable MCE, we are |
| 491 | * down to panic path. | 491 | * going to panic anyway. Even if it didn't, it's not safe to |
| 492 | * continue at this point, so we should explicitly panic. | ||
| 492 | */ | 493 | */ |
| 494 | |||
| 495 | panic("PowerNV Unrecovered Machine Check"); | ||
| 493 | return 0; | 496 | return 0; |
| 494 | } | 497 | } |
| 495 | 498 | ||
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 2927cd5c8303..414fd1a00fda 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
| @@ -2049,9 +2049,23 @@ static long pnv_pci_ioda2_setup_default_config(struct pnv_ioda_pe *pe) | |||
| 2049 | struct iommu_table *tbl = NULL; | 2049 | struct iommu_table *tbl = NULL; |
| 2050 | long rc; | 2050 | long rc; |
| 2051 | 2051 | ||
| 2052 | /* | ||
| 2053 | * crashkernel= specifies the kdump kernel's maximum memory at | ||
| 2054 | * some offset and there is no guaranteed the result is a power | ||
| 2055 | * of 2, which will cause errors later. | ||
| 2056 | */ | ||
| 2057 | const u64 max_memory = __rounddown_pow_of_two(memory_hotplug_max()); | ||
| 2058 | |||
| 2059 | /* | ||
| 2060 | * In memory constrained environments, e.g. kdump kernel, the | ||
| 2061 | * DMA window can be larger than available memory, which will | ||
| 2062 | * cause errors later. | ||
| 2063 | */ | ||
| 2064 | const u64 window_size = min((u64)pe->table_group.tce32_size, max_memory); | ||
| 2065 | |||
| 2052 | rc = pnv_pci_ioda2_create_table(&pe->table_group, 0, | 2066 | rc = pnv_pci_ioda2_create_table(&pe->table_group, 0, |
| 2053 | IOMMU_PAGE_SHIFT_4K, | 2067 | IOMMU_PAGE_SHIFT_4K, |
| 2054 | pe->table_group.tce32_size, | 2068 | window_size, |
| 2055 | POWERNV_IOMMU_DEFAULT_LEVELS, &tbl); | 2069 | POWERNV_IOMMU_DEFAULT_LEVELS, &tbl); |
| 2056 | if (rc) { | 2070 | if (rc) { |
| 2057 | pe_err(pe, "Failed to create 32-bit TCE table, err %ld", | 2071 | pe_err(pe, "Failed to create 32-bit TCE table, err %ld", |
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index 9b2480b265c0..f2dd77234240 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c | |||
| @@ -99,6 +99,7 @@ void pnv_teardown_msi_irqs(struct pci_dev *pdev) | |||
| 99 | struct pci_controller *hose = pci_bus_to_host(pdev->bus); | 99 | struct pci_controller *hose = pci_bus_to_host(pdev->bus); |
| 100 | struct pnv_phb *phb = hose->private_data; | 100 | struct pnv_phb *phb = hose->private_data; |
| 101 | struct msi_desc *entry; | 101 | struct msi_desc *entry; |
| 102 | irq_hw_number_t hwirq; | ||
| 102 | 103 | ||
| 103 | if (WARN_ON(!phb)) | 104 | if (WARN_ON(!phb)) |
| 104 | return; | 105 | return; |
| @@ -106,10 +107,10 @@ void pnv_teardown_msi_irqs(struct pci_dev *pdev) | |||
| 106 | for_each_pci_msi_entry(entry, pdev) { | 107 | for_each_pci_msi_entry(entry, pdev) { |
| 107 | if (entry->irq == NO_IRQ) | 108 | if (entry->irq == NO_IRQ) |
| 108 | continue; | 109 | continue; |
| 110 | hwirq = virq_to_hw(entry->irq); | ||
| 109 | irq_set_msi_desc(entry->irq, NULL); | 111 | irq_set_msi_desc(entry->irq, NULL); |
| 110 | msi_bitmap_free_hwirqs(&phb->msi_bmp, | ||
| 111 | virq_to_hw(entry->irq) - phb->msi_base, 1); | ||
| 112 | irq_dispose_mapping(entry->irq); | 112 | irq_dispose_mapping(entry->irq); |
| 113 | msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq - phb->msi_base, 1); | ||
| 113 | } | 114 | } |
| 114 | } | 115 | } |
| 115 | #endif /* CONFIG_PCI_MSI */ | 116 | #endif /* CONFIG_PCI_MSI */ |
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c index 8f70ba681a78..ca264833ee64 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c | |||
| @@ -171,7 +171,26 @@ static void pnv_smp_cpu_kill_self(void) | |||
| 171 | * so clear LPCR:PECE1. We keep PECE2 enabled. | 171 | * so clear LPCR:PECE1. We keep PECE2 enabled. |
| 172 | */ | 172 | */ |
| 173 | mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1); | 173 | mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1); |
| 174 | |||
| 175 | /* | ||
| 176 | * Hard-disable interrupts, and then clear irq_happened flags | ||
| 177 | * that we can safely ignore while off-line, since they | ||
| 178 | * are for things for which we do no processing when off-line | ||
| 179 | * (or in the case of HMI, all the processing we need to do | ||
| 180 | * is done in lower-level real-mode code). | ||
| 181 | */ | ||
| 182 | hard_irq_disable(); | ||
| 183 | local_paca->irq_happened &= ~(PACA_IRQ_DEC | PACA_IRQ_HMI); | ||
| 184 | |||
| 174 | while (!generic_check_cpu_restart(cpu)) { | 185 | while (!generic_check_cpu_restart(cpu)) { |
| 186 | /* | ||
| 187 | * Clear IPI flag, since we don't handle IPIs while | ||
| 188 | * offline, except for those when changing micro-threading | ||
| 189 | * mode, which are handled explicitly below, and those | ||
| 190 | * for coming online, which are handled via | ||
| 191 | * generic_check_cpu_restart() calls. | ||
| 192 | */ | ||
| 193 | kvmppc_set_host_ipi(cpu, 0); | ||
| 175 | 194 | ||
| 176 | ppc64_runlatch_off(); | 195 | ppc64_runlatch_off(); |
| 177 | 196 | ||
| @@ -196,20 +215,20 @@ static void pnv_smp_cpu_kill_self(void) | |||
| 196 | * having finished executing in a KVM guest, then srr1 | 215 | * having finished executing in a KVM guest, then srr1 |
| 197 | * contains 0. | 216 | * contains 0. |
| 198 | */ | 217 | */ |
| 199 | if ((srr1 & wmask) == SRR1_WAKEEE) { | 218 | if (((srr1 & wmask) == SRR1_WAKEEE) || |
| 219 | (local_paca->irq_happened & PACA_IRQ_EE)) { | ||
| 200 | icp_native_flush_interrupt(); | 220 | icp_native_flush_interrupt(); |
| 201 | local_paca->irq_happened &= PACA_IRQ_HARD_DIS; | ||
| 202 | smp_mb(); | ||
| 203 | } else if ((srr1 & wmask) == SRR1_WAKEHDBELL) { | 221 | } else if ((srr1 & wmask) == SRR1_WAKEHDBELL) { |
| 204 | unsigned long msg = PPC_DBELL_TYPE(PPC_DBELL_SERVER); | 222 | unsigned long msg = PPC_DBELL_TYPE(PPC_DBELL_SERVER); |
| 205 | asm volatile(PPC_MSGCLR(%0) : : "r" (msg)); | 223 | asm volatile(PPC_MSGCLR(%0) : : "r" (msg)); |
| 206 | kvmppc_set_host_ipi(cpu, 0); | ||
| 207 | } | 224 | } |
| 225 | local_paca->irq_happened &= ~(PACA_IRQ_EE | PACA_IRQ_DBELL); | ||
| 226 | smp_mb(); | ||
| 208 | 227 | ||
| 209 | if (cpu_core_split_required()) | 228 | if (cpu_core_split_required()) |
| 210 | continue; | 229 | continue; |
| 211 | 230 | ||
| 212 | if (!generic_check_cpu_restart(cpu)) | 231 | if (srr1 && !generic_check_cpu_restart(cpu)) |
| 213 | DBG("CPU%d Unexpected exit while offline !\n", cpu); | 232 | DBG("CPU%d Unexpected exit while offline !\n", cpu); |
| 214 | } | 233 | } |
| 215 | mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) | LPCR_PECE1); | 234 | mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) | LPCR_PECE1); |
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c index 09787139834d..3db53e8aff92 100644 --- a/arch/powerpc/platforms/ps3/os-area.c +++ b/arch/powerpc/platforms/ps3/os-area.c | |||
| @@ -194,11 +194,6 @@ static const struct os_area_db_id os_area_db_id_rtc_diff = { | |||
| 194 | .key = OS_AREA_DB_KEY_RTC_DIFF | 194 | .key = OS_AREA_DB_KEY_RTC_DIFF |
| 195 | }; | 195 | }; |
| 196 | 196 | ||
| 197 | static const struct os_area_db_id os_area_db_id_video_mode = { | ||
| 198 | .owner = OS_AREA_DB_OWNER_LINUX, | ||
| 199 | .key = OS_AREA_DB_KEY_VIDEO_MODE | ||
| 200 | }; | ||
| 201 | |||
| 202 | #define SECONDS_FROM_1970_TO_2000 946684800LL | 197 | #define SECONDS_FROM_1970_TO_2000 946684800LL |
| 203 | 198 | ||
| 204 | /** | 199 | /** |
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index 47d9cebe7159..db17827eb746 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c | |||
| @@ -422,8 +422,10 @@ static ssize_t dlpar_cpu_probe(const char *buf, size_t count) | |||
| 422 | 422 | ||
| 423 | dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent); | 423 | dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent); |
| 424 | of_node_put(parent); | 424 | of_node_put(parent); |
| 425 | if (!dn) | 425 | if (!dn) { |
| 426 | dlpar_release_drc(drc_index); | ||
| 426 | return -EINVAL; | 427 | return -EINVAL; |
| 428 | } | ||
| 427 | 429 | ||
| 428 | rc = dlpar_attach_node(dn); | 430 | rc = dlpar_attach_node(dn); |
| 429 | if (rc) { | 431 | if (rc) { |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 39a74fad3e04..9a83eb71b030 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
| @@ -111,7 +111,7 @@ static void __init fwnmi_init(void) | |||
| 111 | fwnmi_active = 1; | 111 | fwnmi_active = 1; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc) | 114 | static void pseries_8259_cascade(struct irq_desc *desc) |
| 115 | { | 115 | { |
| 116 | struct irq_chip *chip = irq_desc_get_chip(desc); | 116 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 117 | unsigned int cascade_irq = i8259_irq(); | 117 | unsigned int cascade_irq = i8259_irq(); |
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index a11bd1d433ad..9e86074719a9 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c | |||
| @@ -155,9 +155,9 @@ static int cpm2_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
| 155 | 155 | ||
| 156 | irqd_set_trigger_type(d, flow_type); | 156 | irqd_set_trigger_type(d, flow_type); |
| 157 | if (flow_type & IRQ_TYPE_LEVEL_LOW) | 157 | if (flow_type & IRQ_TYPE_LEVEL_LOW) |
| 158 | __irq_set_handler_locked(d->irq, handle_level_irq); | 158 | irq_set_handler_locked(d, handle_level_irq); |
| 159 | else | 159 | else |
| 160 | __irq_set_handler_locked(d->irq, handle_edge_irq); | 160 | irq_set_handler_locked(d, handle_edge_irq); |
| 161 | 161 | ||
| 162 | /* internal IRQ senses are LEVEL_LOW | 162 | /* internal IRQ senses are LEVEL_LOW |
| 163 | * EXT IRQ and Port C IRQ senses are programmable | 163 | * EXT IRQ and Port C IRQ senses are programmable |
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 5916da1856a7..48a576aa47b9 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
| @@ -128,15 +128,16 @@ static void fsl_teardown_msi_irqs(struct pci_dev *pdev) | |||
| 128 | { | 128 | { |
| 129 | struct msi_desc *entry; | 129 | struct msi_desc *entry; |
| 130 | struct fsl_msi *msi_data; | 130 | struct fsl_msi *msi_data; |
| 131 | irq_hw_number_t hwirq; | ||
| 131 | 132 | ||
| 132 | for_each_pci_msi_entry(entry, pdev) { | 133 | for_each_pci_msi_entry(entry, pdev) { |
| 133 | if (entry->irq == NO_IRQ) | 134 | if (entry->irq == NO_IRQ) |
| 134 | continue; | 135 | continue; |
| 136 | hwirq = virq_to_hw(entry->irq); | ||
| 135 | msi_data = irq_get_chip_data(entry->irq); | 137 | msi_data = irq_get_chip_data(entry->irq); |
| 136 | irq_set_msi_desc(entry->irq, NULL); | 138 | irq_set_msi_desc(entry->irq, NULL); |
| 137 | msi_bitmap_free_hwirqs(&msi_data->bitmap, | ||
| 138 | virq_to_hw(entry->irq), 1); | ||
| 139 | irq_dispose_mapping(entry->irq); | 139 | irq_dispose_mapping(entry->irq); |
| 140 | msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1); | ||
| 140 | } | 141 | } |
| 141 | 142 | ||
| 142 | return; | 143 | return; |
diff --git a/arch/powerpc/sysdev/ge/ge_pic.c b/arch/powerpc/sysdev/ge/ge_pic.c index 2bcb78bb3a15..d57b77573068 100644 --- a/arch/powerpc/sysdev/ge/ge_pic.c +++ b/arch/powerpc/sysdev/ge/ge_pic.c | |||
| @@ -91,7 +91,7 @@ static int gef_pic_cascade_irq; | |||
| 91 | * should be masked out. | 91 | * should be masked out. |
| 92 | */ | 92 | */ |
| 93 | 93 | ||
| 94 | void gef_pic_cascade(unsigned int irq, struct irq_desc *desc) | 94 | static void gef_pic_cascade(struct irq_desc *desc) |
| 95 | { | 95 | { |
| 96 | struct irq_chip *chip = irq_desc_get_chip(desc); | 96 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 97 | unsigned int cascade_irq; | 97 | unsigned int cascade_irq; |
diff --git a/arch/powerpc/sysdev/ge/ge_pic.h b/arch/powerpc/sysdev/ge/ge_pic.h index 908dbd9826b6..5bf7e4b81e36 100644 --- a/arch/powerpc/sysdev/ge/ge_pic.h +++ b/arch/powerpc/sysdev/ge/ge_pic.h | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | #ifndef __GEF_PIC_H__ | 1 | #ifndef __GEF_PIC_H__ |
| 2 | #define __GEF_PIC_H__ | 2 | #define __GEF_PIC_H__ |
| 3 | 3 | ||
| 4 | |||
| 5 | void gef_pic_cascade(unsigned int, struct irq_desc *); | ||
| 6 | unsigned int gef_pic_get_irq(void); | 4 | unsigned int gef_pic_get_irq(void); |
| 7 | void gef_pic_init(struct device_node *); | 5 | void gef_pic_init(struct device_node *); |
| 8 | 6 | ||
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 6b2b68914810..b1297ab1599b 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
| @@ -624,10 +624,10 @@ static int ipic_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
| 624 | 624 | ||
| 625 | irqd_set_trigger_type(d, flow_type); | 625 | irqd_set_trigger_type(d, flow_type); |
| 626 | if (flow_type & IRQ_TYPE_LEVEL_LOW) { | 626 | if (flow_type & IRQ_TYPE_LEVEL_LOW) { |
| 627 | __irq_set_handler_locked(d->irq, handle_level_irq); | 627 | irq_set_handler_locked(d, handle_level_irq); |
| 628 | d->chip = &ipic_level_irq_chip; | 628 | d->chip = &ipic_level_irq_chip; |
| 629 | } else { | 629 | } else { |
| 630 | __irq_set_handler_locked(d->irq, handle_edge_irq); | 630 | irq_set_handler_locked(d, handle_edge_irq); |
| 631 | d->chip = &ipic_edge_irq_chip; | 631 | d->chip = &ipic_edge_irq_chip; |
| 632 | } | 632 | } |
| 633 | 633 | ||
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index d93a78be4346..9a423975853a 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c | |||
| @@ -55,7 +55,7 @@ static int mpc8xx_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
| 55 | unsigned int siel = in_be32(&siu_reg->sc_siel); | 55 | unsigned int siel = in_be32(&siu_reg->sc_siel); |
| 56 | siel |= mpc8xx_irqd_to_bit(d); | 56 | siel |= mpc8xx_irqd_to_bit(d); |
| 57 | out_be32(&siu_reg->sc_siel, siel); | 57 | out_be32(&siu_reg->sc_siel, siel); |
| 58 | __irq_set_handler_locked(d->irq, handle_edge_irq); | 58 | irq_set_handler_locked(d, handle_edge_irq); |
| 59 | } | 59 | } |
| 60 | return 0; | 60 | return 0; |
| 61 | } | 61 | } |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 97a8ae8f94dd..537e5db85a06 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
| @@ -1181,7 +1181,7 @@ static int mpic_host_xlate(struct irq_domain *h, struct device_node *ct, | |||
| 1181 | } | 1181 | } |
| 1182 | 1182 | ||
| 1183 | /* IRQ handler for a secondary MPIC cascaded from another IRQ controller */ | 1183 | /* IRQ handler for a secondary MPIC cascaded from another IRQ controller */ |
| 1184 | static void mpic_cascade(unsigned int irq, struct irq_desc *desc) | 1184 | static void mpic_cascade(struct irq_desc *desc) |
| 1185 | { | 1185 | { |
| 1186 | struct irq_chip *chip = irq_desc_get_chip(desc); | 1186 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 1187 | struct mpic *mpic = irq_desc_get_handler_data(desc); | 1187 | struct mpic *mpic = irq_desc_get_handler_data(desc); |
diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c index 70fbd5694a8b..2cbc7e29b85f 100644 --- a/arch/powerpc/sysdev/mpic_u3msi.c +++ b/arch/powerpc/sysdev/mpic_u3msi.c | |||
| @@ -107,15 +107,16 @@ static u64 find_u4_magic_addr(struct pci_dev *pdev, unsigned int hwirq) | |||
| 107 | static void u3msi_teardown_msi_irqs(struct pci_dev *pdev) | 107 | static void u3msi_teardown_msi_irqs(struct pci_dev *pdev) |
| 108 | { | 108 | { |
| 109 | struct msi_desc *entry; | 109 | struct msi_desc *entry; |
| 110 | irq_hw_number_t hwirq; | ||
| 110 | 111 | ||
| 111 | for_each_pci_msi_entry(entry, pdev) { | 112 | for_each_pci_msi_entry(entry, pdev) { |
| 112 | if (entry->irq == NO_IRQ) | 113 | if (entry->irq == NO_IRQ) |
| 113 | continue; | 114 | continue; |
| 114 | 115 | ||
| 116 | hwirq = virq_to_hw(entry->irq); | ||
| 115 | irq_set_msi_desc(entry->irq, NULL); | 117 | irq_set_msi_desc(entry->irq, NULL); |
| 116 | msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, | ||
| 117 | virq_to_hw(entry->irq), 1); | ||
| 118 | irq_dispose_mapping(entry->irq); | 118 | irq_dispose_mapping(entry->irq); |
| 119 | msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, hwirq, 1); | ||
| 119 | } | 120 | } |
| 120 | 121 | ||
| 121 | return; | 122 | return; |
diff --git a/arch/powerpc/sysdev/ppc4xx_msi.c b/arch/powerpc/sysdev/ppc4xx_msi.c index 24d0470c1698..8fb806135043 100644 --- a/arch/powerpc/sysdev/ppc4xx_msi.c +++ b/arch/powerpc/sysdev/ppc4xx_msi.c | |||
| @@ -124,16 +124,17 @@ void ppc4xx_teardown_msi_irqs(struct pci_dev *dev) | |||
| 124 | { | 124 | { |
| 125 | struct msi_desc *entry; | 125 | struct msi_desc *entry; |
| 126 | struct ppc4xx_msi *msi_data = &ppc4xx_msi; | 126 | struct ppc4xx_msi *msi_data = &ppc4xx_msi; |
| 127 | irq_hw_number_t hwirq; | ||
| 127 | 128 | ||
| 128 | dev_dbg(&dev->dev, "PCIE-MSI: tearing down msi irqs\n"); | 129 | dev_dbg(&dev->dev, "PCIE-MSI: tearing down msi irqs\n"); |
| 129 | 130 | ||
| 130 | for_each_pci_msi_entry(entry, dev) { | 131 | for_each_pci_msi_entry(entry, dev) { |
| 131 | if (entry->irq == NO_IRQ) | 132 | if (entry->irq == NO_IRQ) |
| 132 | continue; | 133 | continue; |
| 134 | hwirq = virq_to_hw(entry->irq); | ||
| 133 | irq_set_msi_desc(entry->irq, NULL); | 135 | irq_set_msi_desc(entry->irq, NULL); |
| 134 | msi_bitmap_free_hwirqs(&msi_data->bitmap, | ||
| 135 | virq_to_hw(entry->irq), 1); | ||
| 136 | irq_dispose_mapping(entry->irq); | 136 | irq_dispose_mapping(entry->irq); |
| 137 | msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1); | ||
| 137 | } | 138 | } |
| 138 | } | 139 | } |
| 139 | 140 | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c index 47b352e4bc74..fbcc1f855a7f 100644 --- a/arch/powerpc/sysdev/qe_lib/qe_ic.c +++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c | |||
| @@ -311,8 +311,8 @@ unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic) | |||
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | void __init qe_ic_init(struct device_node *node, unsigned int flags, | 313 | void __init qe_ic_init(struct device_node *node, unsigned int flags, |
| 314 | void (*low_handler)(unsigned int irq, struct irq_desc *desc), | 314 | void (*low_handler)(struct irq_desc *desc), |
| 315 | void (*high_handler)(unsigned int irq, struct irq_desc *desc)) | 315 | void (*high_handler)(struct irq_desc *desc)) |
| 316 | { | 316 | { |
| 317 | struct qe_ic *qe_ic; | 317 | struct qe_ic *qe_ic; |
| 318 | struct resource res; | 318 | struct resource res; |
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index 57b54476e747..379de955aae3 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
| @@ -428,7 +428,7 @@ void __init tsi108_pci_int_init(struct device_node *node) | |||
| 428 | init_pci_source(); | 428 | init_pci_source(); |
| 429 | } | 429 | } |
| 430 | 430 | ||
| 431 | void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc) | 431 | void tsi108_irq_cascade(struct irq_desc *desc) |
| 432 | { | 432 | { |
| 433 | struct irq_chip *chip = irq_desc_get_chip(desc); | 433 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 434 | unsigned int cascade_irq = get_pci_source(); | 434 | unsigned int cascade_irq = get_pci_source(); |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index d77345338671..6893d8f236df 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
| @@ -194,7 +194,7 @@ static const struct irq_domain_ops uic_host_ops = { | |||
| 194 | .xlate = irq_domain_xlate_twocell, | 194 | .xlate = irq_domain_xlate_twocell, |
| 195 | }; | 195 | }; |
| 196 | 196 | ||
| 197 | void uic_irq_cascade(unsigned int virq, struct irq_desc *desc) | 197 | static void uic_irq_cascade(struct irq_desc *desc) |
| 198 | { | 198 | { |
| 199 | struct irq_chip *chip = irq_desc_get_chip(desc); | 199 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 200 | struct irq_data *idata = irq_desc_get_irq_data(desc); | 200 | struct irq_data *idata = irq_desc_get_irq_data(desc); |
diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c index 11ac964d5175..27c936c080a6 100644 --- a/arch/powerpc/sysdev/xics/ics-opal.c +++ b/arch/powerpc/sysdev/xics/ics-opal.c | |||
| @@ -54,7 +54,7 @@ static void ics_opal_unmask_irq(struct irq_data *d) | |||
| 54 | if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS) | 54 | if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS) |
| 55 | return; | 55 | return; |
| 56 | 56 | ||
| 57 | server = xics_get_irq_server(d->irq, d->affinity, 0); | 57 | server = xics_get_irq_server(d->irq, irq_data_get_affinity_mask(d), 0); |
| 58 | server = ics_opal_mangle_server(server); | 58 | server = ics_opal_mangle_server(server); |
| 59 | 59 | ||
| 60 | rc = opal_set_xive(hw_irq, server, DEFAULT_PRIORITY); | 60 | rc = opal_set_xive(hw_irq, server, DEFAULT_PRIORITY); |
diff --git a/arch/powerpc/sysdev/xics/ics-rtas.c b/arch/powerpc/sysdev/xics/ics-rtas.c index d1c625c4cc5a..3854dd41558d 100644 --- a/arch/powerpc/sysdev/xics/ics-rtas.c +++ b/arch/powerpc/sysdev/xics/ics-rtas.c | |||
| @@ -47,7 +47,7 @@ static void ics_rtas_unmask_irq(struct irq_data *d) | |||
| 47 | if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS) | 47 | if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS) |
| 48 | return; | 48 | return; |
| 49 | 49 | ||
| 50 | server = xics_get_irq_server(d->irq, d->affinity, 0); | 50 | server = xics_get_irq_server(d->irq, irq_data_get_affinity_mask(d), 0); |
| 51 | 51 | ||
| 52 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, hw_irq, server, | 52 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, hw_irq, server, |
| 53 | DEFAULT_PRIORITY); | 53 | DEFAULT_PRIORITY); |
diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c index 43b8b275bc5c..0f52d7955796 100644 --- a/arch/powerpc/sysdev/xilinx_intc.c +++ b/arch/powerpc/sysdev/xilinx_intc.c | |||
| @@ -222,7 +222,7 @@ int xilinx_intc_get_irq(void) | |||
| 222 | /* | 222 | /* |
| 223 | * Support code for cascading to 8259 interrupt controllers | 223 | * Support code for cascading to 8259 interrupt controllers |
| 224 | */ | 224 | */ |
| 225 | static void xilinx_i8259_cascade(unsigned int irq, struct irq_desc *desc) | 225 | static void xilinx_i8259_cascade(struct irq_desc *desc) |
| 226 | { | 226 | { |
| 227 | struct irq_chip *chip = irq_desc_get_chip(desc); | 227 | struct irq_chip *chip = irq_desc_get_chip(desc); |
| 228 | unsigned int cascade_irq = i8259_irq(); | 228 | unsigned int cascade_irq = i8259_irq(); |
diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile index d4788111c161..fac6ac9790fa 100644 --- a/arch/s390/boot/compressed/Makefile +++ b/arch/s390/boot/compressed/Makefile | |||
| @@ -10,7 +10,7 @@ targets += misc.o piggy.o sizes.h head.o | |||
| 10 | 10 | ||
| 11 | KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUX_INCLUDE) -O2 | 11 | KBUILD_CFLAGS := -m64 -D__KERNEL__ $(LINUX_INCLUDE) -O2 |
| 12 | KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING | 12 | KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING |
| 13 | KBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks | 13 | KBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks -msoft-float |
| 14 | KBUILD_CFLAGS += $(call cc-option,-mpacked-stack) | 14 | KBUILD_CFLAGS += $(call cc-option,-mpacked-stack) |
| 15 | KBUILD_CFLAGS += $(call cc-option,-ffreestanding) | 15 | KBUILD_CFLAGS += $(call cc-option,-ffreestanding) |
| 16 | 16 | ||
diff --git a/arch/s390/configs/default_defconfig b/arch/s390/configs/default_defconfig index 0c98f1508542..ed7da281df66 100644 --- a/arch/s390/configs/default_defconfig +++ b/arch/s390/configs/default_defconfig | |||
| @@ -381,7 +381,7 @@ CONFIG_ISCSI_TCP=m | |||
| 381 | CONFIG_SCSI_DEBUG=m | 381 | CONFIG_SCSI_DEBUG=m |
| 382 | CONFIG_ZFCP=y | 382 | CONFIG_ZFCP=y |
| 383 | CONFIG_SCSI_VIRTIO=m | 383 | CONFIG_SCSI_VIRTIO=m |
| 384 | CONFIG_SCSI_DH=m | 384 | CONFIG_SCSI_DH=y |
| 385 | CONFIG_SCSI_DH_RDAC=m | 385 | CONFIG_SCSI_DH_RDAC=m |
| 386 | CONFIG_SCSI_DH_HP_SW=m | 386 | CONFIG_SCSI_DH_HP_SW=m |
| 387 | CONFIG_SCSI_DH_EMC=m | 387 | CONFIG_SCSI_DH_EMC=m |
diff --git a/arch/s390/configs/gcov_defconfig b/arch/s390/configs/gcov_defconfig index 82083e1fbdc4..9858b14cde1e 100644 --- a/arch/s390/configs/gcov_defconfig +++ b/arch/s390/configs/gcov_defconfig | |||
| @@ -377,7 +377,7 @@ CONFIG_ISCSI_TCP=m | |||
| 377 | CONFIG_SCSI_DEBUG=m | 377 | CONFIG_SCSI_DEBUG=m |
| 378 | CONFIG_ZFCP=y | 378 | CONFIG_ZFCP=y |
| 379 | CONFIG_SCSI_VIRTIO=m | 379 | CONFIG_SCSI_VIRTIO=m |
| 380 | CONFIG_SCSI_DH=m | 380 | CONFIG_SCSI_DH=y |
| 381 | CONFIG_SCSI_DH_RDAC=m | 381 | CONFIG_SCSI_DH_RDAC=m |
| 382 | CONFIG_SCSI_DH_HP_SW=m | 382 | CONFIG_SCSI_DH_HP_SW=m |
| 383 | CONFIG_SCSI_DH_EMC=m | 383 | CONFIG_SCSI_DH_EMC=m |
diff --git a/arch/s390/configs/performance_defconfig b/arch/s390/configs/performance_defconfig index c05c9e0821e3..7f14f80717d4 100644 --- a/arch/s390/configs/performance_defconfig +++ b/arch/s390/configs/performance_defconfig | |||
| @@ -377,7 +377,7 @@ CONFIG_ISCSI_TCP=m | |||
| 377 | CONFIG_SCSI_DEBUG=m | 377 | CONFIG_SCSI_DEBUG=m |
| 378 | CONFIG_ZFCP=y | 378 | CONFIG_ZFCP=y |
| 379 | CONFIG_SCSI_VIRTIO=m | 379 | CONFIG_SCSI_VIRTIO=m |
| 380 | CONFIG_SCSI_DH=m | 380 | CONFIG_SCSI_DH=y |
| 381 | CONFIG_SCSI_DH_RDAC=m | 381 | CONFIG_SCSI_DH_RDAC=m |
| 382 | CONFIG_SCSI_DH_HP_SW=m | 382 | CONFIG_SCSI_DH_HP_SW=m |
| 383 | CONFIG_SCSI_DH_EMC=m | 383 | CONFIG_SCSI_DH_EMC=m |
diff --git a/arch/s390/configs/zfcpdump_defconfig b/arch/s390/configs/zfcpdump_defconfig index 1b0184a0f7f2..92805d604173 100644 --- a/arch/s390/configs/zfcpdump_defconfig +++ b/arch/s390/configs/zfcpdump_defconfig | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | # CONFIG_SWAP is not set | 1 | # CONFIG_SWAP is not set |
| 2 | CONFIG_NO_HZ=y | 2 | CONFIG_NO_HZ=y |
| 3 | CONFIG_HIGH_RES_TIMERS=y | 3 | CONFIG_HIGH_RES_TIMERS=y |
| 4 | CONFIG_RCU_FAST_NO_HZ=y | ||
| 5 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
| 6 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 5 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
| 7 | # CONFIG_COMPAT_BRK is not set | 6 | # CONFIG_COMPAT_BRK is not set |
| @@ -54,10 +53,6 @@ CONFIG_RAW_DRIVER=y | |||
| 54 | # CONFIG_MONWRITER is not set | 53 | # CONFIG_MONWRITER is not set |
| 55 | # CONFIG_S390_VMUR is not set | 54 | # CONFIG_S390_VMUR is not set |
| 56 | # CONFIG_HID is not set | 55 | # CONFIG_HID is not set |
| 57 | CONFIG_MEMSTICK=y | ||
| 58 | CONFIG_MEMSTICK_DEBUG=y | ||
| 59 | CONFIG_MEMSTICK_UNSAFE_RESUME=y | ||
| 60 | CONFIG_MSPRO_BLOCK=y | ||
| 61 | # CONFIG_IOMMU_SUPPORT is not set | 56 | # CONFIG_IOMMU_SUPPORT is not set |
| 62 | CONFIG_EXT2_FS=y | 57 | CONFIG_EXT2_FS=y |
| 63 | CONFIG_EXT3_FS=y | 58 | CONFIG_EXT3_FS=y |
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild index 5ad26dd94d77..9043d2e1e2ae 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild | |||
| @@ -6,3 +6,4 @@ generic-y += mcs_spinlock.h | |||
| 6 | generic-y += mm-arch-hooks.h | 6 | generic-y += mm-arch-hooks.h |
| 7 | generic-y += preempt.h | 7 | generic-y += preempt.h |
| 8 | generic-y += trace_clock.h | 8 | generic-y += trace_clock.h |
| 9 | generic-y += word-at-a-time.h | ||
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 3d012e071647..8ced426091e1 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | */ | 35 | */ |
| 36 | #define KVM_NR_IRQCHIPS 1 | 36 | #define KVM_NR_IRQCHIPS 1 |
| 37 | #define KVM_IRQCHIP_NUM_PINS 4096 | 37 | #define KVM_IRQCHIP_NUM_PINS 4096 |
| 38 | #define KVM_HALT_POLL_NS_DEFAULT 0 | ||
| 38 | 39 | ||
| 39 | #define SIGP_CTRL_C 0x80 | 40 | #define SIGP_CTRL_C 0x80 |
| 40 | #define SIGP_CTRL_SCN_MASK 0x3f | 41 | #define SIGP_CTRL_SCN_MASK 0x3f |
| @@ -210,6 +211,7 @@ struct kvm_vcpu_stat { | |||
| 210 | u32 exit_validity; | 211 | u32 exit_validity; |
| 211 | u32 exit_instruction; | 212 | u32 exit_instruction; |
| 212 | u32 halt_successful_poll; | 213 | u32 halt_successful_poll; |
| 214 | u32 halt_attempted_poll; | ||
| 213 | u32 halt_wakeup; | 215 | u32 halt_wakeup; |
| 214 | u32 instruction_lctl; | 216 | u32 instruction_lctl; |
| 215 | u32 instruction_lctlg; | 217 | u32 instruction_lctlg; |
diff --git a/arch/s390/include/asm/numa.h b/arch/s390/include/asm/numa.h index 2a0efc63b9e5..dc19ee0c92aa 100644 --- a/arch/s390/include/asm/numa.h +++ b/arch/s390/include/asm/numa.h | |||
| @@ -19,7 +19,7 @@ int numa_pfn_to_nid(unsigned long pfn); | |||
| 19 | int __node_distance(int a, int b); | 19 | int __node_distance(int a, int b); |
| 20 | void numa_update_cpu_topology(void); | 20 | void numa_update_cpu_topology(void); |
| 21 | 21 | ||
| 22 | extern cpumask_var_t node_to_cpumask_map[MAX_NUMNODES]; | 22 | extern cpumask_t node_to_cpumask_map[MAX_NUMNODES]; |
| 23 | extern int numa_debug_enabled; | 23 | extern int numa_debug_enabled; |
| 24 | 24 | ||
| 25 | #else | 25 | #else |
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h index 27ebde643933..94fc55fc72ce 100644 --- a/arch/s390/include/asm/topology.h +++ b/arch/s390/include/asm/topology.h | |||
| @@ -68,7 +68,7 @@ static inline int cpu_to_node(int cpu) | |||
| 68 | #define cpumask_of_node cpumask_of_node | 68 | #define cpumask_of_node cpumask_of_node |
| 69 | static inline const struct cpumask *cpumask_of_node(int node) | 69 | static inline const struct cpumask *cpumask_of_node(int node) |
| 70 | { | 70 | { |
| 71 | return node_to_cpumask_map[node]; | 71 | return &node_to_cpumask_map[node]; |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | /* | 74 | /* |
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h index 525cef73b085..02613bad8bbb 100644 --- a/arch/s390/include/asm/unistd.h +++ b/arch/s390/include/asm/unistd.h | |||
| @@ -8,28 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #include <uapi/asm/unistd.h> | 9 | #include <uapi/asm/unistd.h> |
| 10 | 10 | ||
| 11 | |||
| 12 | #define __IGNORE_time | 11 | #define __IGNORE_time |
| 13 | 12 | ||
| 14 | /* Ignore system calls that are also reachable via sys_socketcall */ | ||
| 15 | #define __IGNORE_recvmmsg | ||
| 16 | #define __IGNORE_sendmmsg | ||
| 17 | #define __IGNORE_socket | ||
| 18 | #define __IGNORE_socketpair | ||
| 19 | #define __IGNORE_bind | ||
| 20 | #define __IGNORE_connect | ||
| 21 | #define __IGNORE_listen | ||
| 22 | #define __IGNORE_accept4 | ||
| 23 | #define __IGNORE_getsockopt | ||
| 24 | #define __IGNORE_setsockopt | ||
| 25 | #define __IGNORE_getsockname | ||
| 26 | #define __IGNORE_getpeername | ||
| 27 | #define __IGNORE_sendto | ||
| 28 | #define __IGNORE_sendmsg | ||
| 29 | #define __IGNORE_recvfrom | ||
| 30 | #define __IGNORE_recvmsg | ||
| 31 | #define __IGNORE_shutdown | ||
| 32 | |||
| 33 | #define __ARCH_WANT_OLD_READDIR | 13 | #define __ARCH_WANT_OLD_READDIR |
| 34 | #define __ARCH_WANT_SYS_ALARM | 14 | #define __ARCH_WANT_SYS_ALARM |
| 35 | #define __ARCH_WANT_SYS_GETHOSTNAME | 15 | #define __ARCH_WANT_SYS_GETHOSTNAME |
diff --git a/arch/s390/include/uapi/asm/unistd.h b/arch/s390/include/uapi/asm/unistd.h index 59d2bb4e2d0c..a848adba1504 100644 --- a/arch/s390/include/uapi/asm/unistd.h +++ b/arch/s390/include/uapi/asm/unistd.h | |||
| @@ -290,7 +290,26 @@ | |||
| 290 | #define __NR_s390_pci_mmio_write 352 | 290 | #define __NR_s390_pci_mmio_write 352 |
| 291 | #define __NR_s390_pci_mmio_read 353 | 291 | #define __NR_s390_pci_mmio_read 353 |
| 292 | #define __NR_execveat 354 | 292 | #define __NR_execveat 354 |
| 293 | #define NR_syscalls 355 | 293 | #define __NR_userfaultfd 355 |
| 294 | #define __NR_membarrier 356 | ||
| 295 | #define __NR_recvmmsg 357 | ||
| 296 | #define __NR_sendmmsg 358 | ||
| 297 | #define __NR_socket 359 | ||
| 298 | #define __NR_socketpair 360 | ||
| 299 | #define __NR_bind 361 | ||
| 300 | #define __NR_connect 362 | ||
| 301 | #define __NR_listen 363 | ||
| 302 | #define __NR_accept4 364 | ||
| 303 | #define __NR_getsockopt 365 | ||
| 304 | #define __NR_setsockopt 366 | ||
| 305 | #define __NR_getsockname 367 | ||
| 306 | #define __NR_getpeername 368 | ||
| 307 | #define __NR_sendto 369 | ||
| 308 | #define __NR_sendmsg 370 | ||
| 309 | #define __NR_recvfrom 371 | ||
| 310 | #define __NR_recvmsg 372 | ||
| 311 | #define __NR_shutdown 373 | ||
| 312 | #define NR_syscalls 374 | ||
| 294 | 313 | ||
| 295 | /* | 314 | /* |
| 296 | * There are some system calls that are not present on 64 bit, some | 315 | * There are some system calls that are not present on 64 bit, some |
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index 48c9af7a7683..3aeeb1b562c0 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
| @@ -176,6 +176,7 @@ int main(void) | |||
| 176 | DEFINE(__LC_PASTE, offsetof(struct _lowcore, paste)); | 176 | DEFINE(__LC_PASTE, offsetof(struct _lowcore, paste)); |
| 177 | DEFINE(__LC_FP_CREG_SAVE_AREA, offsetof(struct _lowcore, fpt_creg_save_area)); | 177 | DEFINE(__LC_FP_CREG_SAVE_AREA, offsetof(struct _lowcore, fpt_creg_save_area)); |
| 178 | DEFINE(__LC_LAST_BREAK, offsetof(struct _lowcore, breaking_event_addr)); | 178 | DEFINE(__LC_LAST_BREAK, offsetof(struct _lowcore, breaking_event_addr)); |
| 179 | DEFINE(__LC_PERCPU_OFFSET, offsetof(struct _lowcore, percpu_offset)); | ||
| 179 | DEFINE(__LC_VDSO_PER_CPU, offsetof(struct _lowcore, vdso_per_cpu_data)); | 180 | DEFINE(__LC_VDSO_PER_CPU, offsetof(struct _lowcore, vdso_per_cpu_data)); |
| 180 | DEFINE(__LC_GMAP, offsetof(struct _lowcore, gmap)); | 181 | DEFINE(__LC_GMAP, offsetof(struct _lowcore, gmap)); |
| 181 | DEFINE(__LC_PGM_TDB, offsetof(struct _lowcore, pgm_tdb)); | 182 | DEFINE(__LC_PGM_TDB, offsetof(struct _lowcore, pgm_tdb)); |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index eb4664238613..e0f9d270b30f 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
| @@ -48,6 +48,19 @@ typedef struct | |||
| 48 | struct ucontext32 uc; | 48 | struct ucontext32 uc; |
| 49 | } rt_sigframe32; | 49 | } rt_sigframe32; |
| 50 | 50 | ||
| 51 | static inline void sigset_to_sigset32(unsigned long *set64, | ||
| 52 | compat_sigset_word *set32) | ||
| 53 | { | ||
| 54 | set32[0] = (compat_sigset_word) set64[0]; | ||
| 55 | set32[1] = (compat_sigset_word)(set64[0] >> 32); | ||
| 56 | } | ||
| 57 | |||
| 58 | static inline void sigset32_to_sigset(compat_sigset_word *set32, | ||
| 59 | unsigned long *set64) | ||
| 60 | { | ||
| 61 | set64[0] = (unsigned long) set32[0] | ((unsigned long) set32[1] << 32); | ||
| 62 | } | ||
| 63 | |||
| 51 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from) | 64 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from) |
| 52 | { | 65 | { |
| 53 | int err; | 66 | int err; |
| @@ -281,10 +294,12 @@ COMPAT_SYSCALL_DEFINE0(sigreturn) | |||
| 281 | { | 294 | { |
| 282 | struct pt_regs *regs = task_pt_regs(current); | 295 | struct pt_regs *regs = task_pt_regs(current); |
| 283 | sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15]; | 296 | sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15]; |
| 297 | compat_sigset_t cset; | ||
| 284 | sigset_t set; | 298 | sigset_t set; |
| 285 | 299 | ||
| 286 | if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32)) | 300 | if (__copy_from_user(&cset.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32)) |
| 287 | goto badframe; | 301 | goto badframe; |
| 302 | sigset32_to_sigset(cset.sig, set.sig); | ||
| 288 | set_current_blocked(&set); | 303 | set_current_blocked(&set); |
| 289 | save_fpu_regs(); | 304 | save_fpu_regs(); |
| 290 | if (restore_sigregs32(regs, &frame->sregs)) | 305 | if (restore_sigregs32(regs, &frame->sregs)) |
| @@ -302,10 +317,12 @@ COMPAT_SYSCALL_DEFINE0(rt_sigreturn) | |||
| 302 | { | 317 | { |
| 303 | struct pt_regs *regs = task_pt_regs(current); | 318 | struct pt_regs *regs = task_pt_regs(current); |
| 304 | rt_sigframe32 __user *frame = (rt_sigframe32 __user *)regs->gprs[15]; | 319 | rt_sigframe32 __user *frame = (rt_sigframe32 __user *)regs->gprs[15]; |
| 320 | compat_sigset_t cset; | ||
| 305 | sigset_t set; | 321 | sigset_t set; |
| 306 | 322 | ||
| 307 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | 323 | if (__copy_from_user(&cset, &frame->uc.uc_sigmask, sizeof(cset))) |
| 308 | goto badframe; | 324 | goto badframe; |
| 325 | sigset32_to_sigset(cset.sig, set.sig); | ||
| 309 | set_current_blocked(&set); | 326 | set_current_blocked(&set); |
| 310 | if (compat_restore_altstack(&frame->uc.uc_stack)) | 327 | if (compat_restore_altstack(&frame->uc.uc_stack)) |
| 311 | goto badframe; | 328 | goto badframe; |
| @@ -377,7 +394,7 @@ static int setup_frame32(struct ksignal *ksig, sigset_t *set, | |||
| 377 | return -EFAULT; | 394 | return -EFAULT; |
| 378 | 395 | ||
| 379 | /* Create struct sigcontext32 on the signal stack */ | 396 | /* Create struct sigcontext32 on the signal stack */ |
| 380 | memcpy(&sc.oldmask, &set->sig, _SIGMASK_COPY_SIZE32); | 397 | sigset_to_sigset32(set->sig, sc.oldmask); |
| 381 | sc.sregs = (__u32)(unsigned long __force) &frame->sregs; | 398 | sc.sregs = (__u32)(unsigned long __force) &frame->sregs; |
| 382 | if (__copy_to_user(&frame->sc, &sc, sizeof(frame->sc))) | 399 | if (__copy_to_user(&frame->sc, &sc, sizeof(frame->sc))) |
| 383 | return -EFAULT; | 400 | return -EFAULT; |
| @@ -438,6 +455,7 @@ static int setup_frame32(struct ksignal *ksig, sigset_t *set, | |||
| 438 | static int setup_rt_frame32(struct ksignal *ksig, sigset_t *set, | 455 | static int setup_rt_frame32(struct ksignal *ksig, sigset_t *set, |
| 439 | struct pt_regs *regs) | 456 | struct pt_regs *regs) |
| 440 | { | 457 | { |
| 458 | compat_sigset_t cset; | ||
| 441 | rt_sigframe32 __user *frame; | 459 | rt_sigframe32 __user *frame; |
| 442 | unsigned long restorer; | 460 | unsigned long restorer; |
| 443 | size_t frame_size; | 461 | size_t frame_size; |
| @@ -485,11 +503,12 @@ static int setup_rt_frame32(struct ksignal *ksig, sigset_t *set, | |||
| 485 | store_sigregs(); | 503 | store_sigregs(); |
| 486 | 504 | ||
| 487 | /* Create ucontext on the signal stack. */ | 505 | /* Create ucontext on the signal stack. */ |
| 506 | sigset_to_sigset32(set->sig, cset.sig); | ||
| 488 | if (__put_user(uc_flags, &frame->uc.uc_flags) || | 507 | if (__put_user(uc_flags, &frame->uc.uc_flags) || |
| 489 | __put_user(0, &frame->uc.uc_link) || | 508 | __put_user(0, &frame->uc.uc_link) || |
| 490 | __compat_save_altstack(&frame->uc.uc_stack, regs->gprs[15]) || | 509 | __compat_save_altstack(&frame->uc.uc_stack, regs->gprs[15]) || |
| 491 | save_sigregs32(regs, &frame->uc.uc_mcontext) || | 510 | save_sigregs32(regs, &frame->uc.uc_mcontext) || |
| 492 | __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)) || | 511 | __copy_to_user(&frame->uc.uc_sigmask, &cset, sizeof(cset)) || |
| 493 | save_sigregs_ext32(regs, &frame->uc.uc_mcontext_ext)) | 512 | save_sigregs_ext32(regs, &frame->uc.uc_mcontext_ext)) |
| 494 | return -EFAULT; | 513 | return -EFAULT; |
| 495 | 514 | ||
diff --git a/arch/s390/kernel/compat_wrapper.c b/arch/s390/kernel/compat_wrapper.c index f8498dde67b1..09f194052df3 100644 --- a/arch/s390/kernel/compat_wrapper.c +++ b/arch/s390/kernel/compat_wrapper.c | |||
| @@ -52,15 +52,13 @@ | |||
| 52 | * the regular system call wrappers. | 52 | * the regular system call wrappers. |
| 53 | */ | 53 | */ |
| 54 | #define COMPAT_SYSCALL_WRAPx(x, name, ...) \ | 54 | #define COMPAT_SYSCALL_WRAPx(x, name, ...) \ |
| 55 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ | 55 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ |
| 56 | asmlinkage long compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__));\ | 56 | asmlinkage long notrace compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__));\ |
| 57 | asmlinkage long compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__)) \ | 57 | asmlinkage long notrace compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__)) \ |
| 58 | { \ | 58 | { \ |
| 59 | return sys##name(__MAP(x,__SC_COMPAT_CAST,__VA_ARGS__)); \ | 59 | return sys##name(__MAP(x,__SC_COMPAT_CAST,__VA_ARGS__)); \ |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | COMPAT_SYSCALL_WRAP1(exit, int, error_code); | ||
| 63 | COMPAT_SYSCALL_WRAP1(close, unsigned int, fd); | ||
| 64 | COMPAT_SYSCALL_WRAP2(creat, const char __user *, pathname, umode_t, mode); | 62 | COMPAT_SYSCALL_WRAP2(creat, const char __user *, pathname, umode_t, mode); |
| 65 | COMPAT_SYSCALL_WRAP2(link, const char __user *, oldname, const char __user *, newname); | 63 | COMPAT_SYSCALL_WRAP2(link, const char __user *, oldname, const char __user *, newname); |
| 66 | COMPAT_SYSCALL_WRAP1(unlink, const char __user *, pathname); | 64 | COMPAT_SYSCALL_WRAP1(unlink, const char __user *, pathname); |
| @@ -68,23 +66,16 @@ COMPAT_SYSCALL_WRAP1(chdir, const char __user *, filename); | |||
| 68 | COMPAT_SYSCALL_WRAP3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev); | 66 | COMPAT_SYSCALL_WRAP3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev); |
| 69 | COMPAT_SYSCALL_WRAP2(chmod, const char __user *, filename, umode_t, mode); | 67 | COMPAT_SYSCALL_WRAP2(chmod, const char __user *, filename, umode_t, mode); |
| 70 | COMPAT_SYSCALL_WRAP1(oldumount, char __user *, name); | 68 | COMPAT_SYSCALL_WRAP1(oldumount, char __user *, name); |
| 71 | COMPAT_SYSCALL_WRAP1(alarm, unsigned int, seconds); | ||
| 72 | COMPAT_SYSCALL_WRAP2(access, const char __user *, filename, int, mode); | 69 | COMPAT_SYSCALL_WRAP2(access, const char __user *, filename, int, mode); |
| 73 | COMPAT_SYSCALL_WRAP1(nice, int, increment); | ||
| 74 | COMPAT_SYSCALL_WRAP2(kill, int, pid, int, sig); | ||
| 75 | COMPAT_SYSCALL_WRAP2(rename, const char __user *, oldname, const char __user *, newname); | 70 | COMPAT_SYSCALL_WRAP2(rename, const char __user *, oldname, const char __user *, newname); |
| 76 | COMPAT_SYSCALL_WRAP2(mkdir, const char __user *, pathname, umode_t, mode); | 71 | COMPAT_SYSCALL_WRAP2(mkdir, const char __user *, pathname, umode_t, mode); |
| 77 | COMPAT_SYSCALL_WRAP1(rmdir, const char __user *, pathname); | 72 | COMPAT_SYSCALL_WRAP1(rmdir, const char __user *, pathname); |
| 78 | COMPAT_SYSCALL_WRAP1(dup, unsigned int, fildes); | ||
| 79 | COMPAT_SYSCALL_WRAP1(pipe, int __user *, fildes); | 73 | COMPAT_SYSCALL_WRAP1(pipe, int __user *, fildes); |
| 80 | COMPAT_SYSCALL_WRAP1(brk, unsigned long, brk); | 74 | COMPAT_SYSCALL_WRAP1(brk, unsigned long, brk); |
| 81 | COMPAT_SYSCALL_WRAP2(signal, int, sig, __sighandler_t, handler); | 75 | COMPAT_SYSCALL_WRAP2(signal, int, sig, __sighandler_t, handler); |
| 82 | COMPAT_SYSCALL_WRAP1(acct, const char __user *, name); | 76 | COMPAT_SYSCALL_WRAP1(acct, const char __user *, name); |
| 83 | COMPAT_SYSCALL_WRAP2(umount, char __user *, name, int, flags); | 77 | COMPAT_SYSCALL_WRAP2(umount, char __user *, name, int, flags); |
| 84 | COMPAT_SYSCALL_WRAP2(setpgid, pid_t, pid, pid_t, pgid); | ||
| 85 | COMPAT_SYSCALL_WRAP1(umask, int, mask); | ||
| 86 | COMPAT_SYSCALL_WRAP1(chroot, const char __user *, filename); | 78 | COMPAT_SYSCALL_WRAP1(chroot, const char __user *, filename); |
| 87 | COMPAT_SYSCALL_WRAP2(dup2, unsigned int, oldfd, unsigned int, newfd); | ||
| 88 | COMPAT_SYSCALL_WRAP3(sigsuspend, int, unused1, int, unused2, old_sigset_t, mask); | 79 | COMPAT_SYSCALL_WRAP3(sigsuspend, int, unused1, int, unused2, old_sigset_t, mask); |
| 89 | COMPAT_SYSCALL_WRAP2(sethostname, char __user *, name, int, len); | 80 | COMPAT_SYSCALL_WRAP2(sethostname, char __user *, name, int, len); |
| 90 | COMPAT_SYSCALL_WRAP2(symlink, const char __user *, old, const char __user *, new); | 81 | COMPAT_SYSCALL_WRAP2(symlink, const char __user *, old, const char __user *, new); |
| @@ -93,37 +84,23 @@ COMPAT_SYSCALL_WRAP1(uselib, const char __user *, library); | |||
| 93 | COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags); | 84 | COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags); |
| 94 | COMPAT_SYSCALL_WRAP4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg); | 85 | COMPAT_SYSCALL_WRAP4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg); |
| 95 | COMPAT_SYSCALL_WRAP2(munmap, unsigned long, addr, size_t, len); | 86 | COMPAT_SYSCALL_WRAP2(munmap, unsigned long, addr, size_t, len); |
| 96 | COMPAT_SYSCALL_WRAP2(fchmod, unsigned int, fd, umode_t, mode); | ||
| 97 | COMPAT_SYSCALL_WRAP2(getpriority, int, which, int, who); | ||
| 98 | COMPAT_SYSCALL_WRAP3(setpriority, int, which, int, who, int, niceval); | ||
| 99 | COMPAT_SYSCALL_WRAP3(syslog, int, type, char __user *, buf, int, len); | 87 | COMPAT_SYSCALL_WRAP3(syslog, int, type, char __user *, buf, int, len); |
| 100 | COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile); | 88 | COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile); |
| 101 | COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd); | ||
| 102 | COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len); | 89 | COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len); |
| 103 | COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name); | 90 | COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name); |
| 104 | COMPAT_SYSCALL_WRAP3(mprotect, unsigned long, start, size_t, len, unsigned long, prot); | 91 | COMPAT_SYSCALL_WRAP3(mprotect, unsigned long, start, size_t, len, unsigned long, prot); |
| 105 | COMPAT_SYSCALL_WRAP3(init_module, void __user *, umod, unsigned long, len, const char __user *, uargs); | 92 | COMPAT_SYSCALL_WRAP3(init_module, void __user *, umod, unsigned long, len, const char __user *, uargs); |
| 106 | COMPAT_SYSCALL_WRAP2(delete_module, const char __user *, name_user, unsigned int, flags); | 93 | COMPAT_SYSCALL_WRAP2(delete_module, const char __user *, name_user, unsigned int, flags); |
| 107 | COMPAT_SYSCALL_WRAP4(quotactl, unsigned int, cmd, const char __user *, special, qid_t, id, void __user *, addr); | 94 | COMPAT_SYSCALL_WRAP4(quotactl, unsigned int, cmd, const char __user *, special, qid_t, id, void __user *, addr); |
| 108 | COMPAT_SYSCALL_WRAP1(getpgid, pid_t, pid); | ||
| 109 | COMPAT_SYSCALL_WRAP1(fchdir, unsigned int, fd); | ||
| 110 | COMPAT_SYSCALL_WRAP2(bdflush, int, func, long, data); | 95 | COMPAT_SYSCALL_WRAP2(bdflush, int, func, long, data); |
| 111 | COMPAT_SYSCALL_WRAP3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2); | 96 | COMPAT_SYSCALL_WRAP3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2); |
| 112 | COMPAT_SYSCALL_WRAP1(s390_personality, unsigned int, personality); | ||
| 113 | COMPAT_SYSCALL_WRAP5(llseek, unsigned int, fd, unsigned long, high, unsigned long, low, loff_t __user *, result, unsigned int, whence); | 97 | COMPAT_SYSCALL_WRAP5(llseek, unsigned int, fd, unsigned long, high, unsigned long, low, loff_t __user *, result, unsigned int, whence); |
| 114 | COMPAT_SYSCALL_WRAP2(flock, unsigned int, fd, unsigned int, cmd); | ||
| 115 | COMPAT_SYSCALL_WRAP3(msync, unsigned long, start, size_t, len, int, flags); | 98 | COMPAT_SYSCALL_WRAP3(msync, unsigned long, start, size_t, len, int, flags); |
| 116 | COMPAT_SYSCALL_WRAP1(getsid, pid_t, pid); | ||
| 117 | COMPAT_SYSCALL_WRAP1(fdatasync, unsigned int, fd); | ||
| 118 | COMPAT_SYSCALL_WRAP2(mlock, unsigned long, start, size_t, len); | 99 | COMPAT_SYSCALL_WRAP2(mlock, unsigned long, start, size_t, len); |
| 119 | COMPAT_SYSCALL_WRAP2(munlock, unsigned long, start, size_t, len); | 100 | COMPAT_SYSCALL_WRAP2(munlock, unsigned long, start, size_t, len); |
| 120 | COMPAT_SYSCALL_WRAP1(mlockall, int, flags); | ||
| 121 | COMPAT_SYSCALL_WRAP2(sched_setparam, pid_t, pid, struct sched_param __user *, param); | 101 | COMPAT_SYSCALL_WRAP2(sched_setparam, pid_t, pid, struct sched_param __user *, param); |
| 122 | COMPAT_SYSCALL_WRAP2(sched_getparam, pid_t, pid, struct sched_param __user *, param); | 102 | COMPAT_SYSCALL_WRAP2(sched_getparam, pid_t, pid, struct sched_param __user *, param); |
| 123 | COMPAT_SYSCALL_WRAP3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param); | 103 | COMPAT_SYSCALL_WRAP3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param); |
| 124 | COMPAT_SYSCALL_WRAP1(sched_getscheduler, pid_t, pid); | ||
| 125 | COMPAT_SYSCALL_WRAP1(sched_get_priority_max, int, policy); | ||
| 126 | COMPAT_SYSCALL_WRAP1(sched_get_priority_min, int, policy); | ||
| 127 | COMPAT_SYSCALL_WRAP5(mremap, unsigned long, addr, unsigned long, old_len, unsigned long, new_len, unsigned long, flags, unsigned long, new_addr); | 104 | COMPAT_SYSCALL_WRAP5(mremap, unsigned long, addr, unsigned long, old_len, unsigned long, new_len, unsigned long, flags, unsigned long, new_addr); |
| 128 | COMPAT_SYSCALL_WRAP3(poll, struct pollfd __user *, ufds, unsigned int, nfds, int, timeout); | 105 | COMPAT_SYSCALL_WRAP3(poll, struct pollfd __user *, ufds, unsigned int, nfds, int, timeout); |
| 129 | COMPAT_SYSCALL_WRAP5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5); | 106 | COMPAT_SYSCALL_WRAP5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5); |
| @@ -131,20 +108,11 @@ COMPAT_SYSCALL_WRAP2(getcwd, char __user *, buf, unsigned long, size); | |||
| 131 | COMPAT_SYSCALL_WRAP2(capget, cap_user_header_t, header, cap_user_data_t, dataptr); | 108 | COMPAT_SYSCALL_WRAP2(capget, cap_user_header_t, header, cap_user_data_t, dataptr); |
| 132 | COMPAT_SYSCALL_WRAP2(capset, cap_user_header_t, header, const cap_user_data_t, data); | 109 | COMPAT_SYSCALL_WRAP2(capset, cap_user_header_t, header, const cap_user_data_t, data); |
| 133 | COMPAT_SYSCALL_WRAP3(lchown, const char __user *, filename, uid_t, user, gid_t, group); | 110 | COMPAT_SYSCALL_WRAP3(lchown, const char __user *, filename, uid_t, user, gid_t, group); |
| 134 | COMPAT_SYSCALL_WRAP2(setreuid, uid_t, ruid, uid_t, euid); | ||
| 135 | COMPAT_SYSCALL_WRAP2(setregid, gid_t, rgid, gid_t, egid); | ||
| 136 | COMPAT_SYSCALL_WRAP2(getgroups, int, gidsetsize, gid_t __user *, grouplist); | 111 | COMPAT_SYSCALL_WRAP2(getgroups, int, gidsetsize, gid_t __user *, grouplist); |
| 137 | COMPAT_SYSCALL_WRAP2(setgroups, int, gidsetsize, gid_t __user *, grouplist); | 112 | COMPAT_SYSCALL_WRAP2(setgroups, int, gidsetsize, gid_t __user *, grouplist); |
| 138 | COMPAT_SYSCALL_WRAP3(fchown, unsigned int, fd, uid_t, user, gid_t, group); | ||
| 139 | COMPAT_SYSCALL_WRAP3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid); | ||
| 140 | COMPAT_SYSCALL_WRAP3(getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __user *, suid); | 113 | COMPAT_SYSCALL_WRAP3(getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __user *, suid); |
| 141 | COMPAT_SYSCALL_WRAP3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid); | ||
| 142 | COMPAT_SYSCALL_WRAP3(getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __user *, sgid); | 114 | COMPAT_SYSCALL_WRAP3(getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __user *, sgid); |
| 143 | COMPAT_SYSCALL_WRAP3(chown, const char __user *, filename, uid_t, user, gid_t, group); | 115 | COMPAT_SYSCALL_WRAP3(chown, const char __user *, filename, uid_t, user, gid_t, group); |
| 144 | COMPAT_SYSCALL_WRAP1(setuid, uid_t, uid); | ||
| 145 | COMPAT_SYSCALL_WRAP1(setgid, gid_t, gid); | ||
| 146 | COMPAT_SYSCALL_WRAP1(setfsuid, uid_t, uid); | ||
| 147 | COMPAT_SYSCALL_WRAP1(setfsgid, gid_t, gid); | ||
| 148 | COMPAT_SYSCALL_WRAP2(pivot_root, const char __user *, new_root, const char __user *, put_old); | 116 | COMPAT_SYSCALL_WRAP2(pivot_root, const char __user *, new_root, const char __user *, put_old); |
| 149 | COMPAT_SYSCALL_WRAP3(mincore, unsigned long, start, size_t, len, unsigned char __user *, vec); | 117 | COMPAT_SYSCALL_WRAP3(mincore, unsigned long, start, size_t, len, unsigned char __user *, vec); |
| 150 | COMPAT_SYSCALL_WRAP3(madvise, unsigned long, start, size_t, len, int, behavior); | 118 | COMPAT_SYSCALL_WRAP3(madvise, unsigned long, start, size_t, len, int, behavior); |
| @@ -161,23 +129,16 @@ COMPAT_SYSCALL_WRAP3(flistxattr, int, fd, char __user *, list, size_t, size); | |||
| 161 | COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name); | 129 | COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name); |
| 162 | COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name); | 130 | COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name); |
| 163 | COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name); | 131 | COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name); |
| 164 | COMPAT_SYSCALL_WRAP1(exit_group, int, error_code); | ||
| 165 | COMPAT_SYSCALL_WRAP1(set_tid_address, int __user *, tidptr); | 132 | COMPAT_SYSCALL_WRAP1(set_tid_address, int __user *, tidptr); |
| 166 | COMPAT_SYSCALL_WRAP1(epoll_create, int, size); | ||
| 167 | COMPAT_SYSCALL_WRAP4(epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event __user *, event); | 133 | COMPAT_SYSCALL_WRAP4(epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event __user *, event); |
| 168 | COMPAT_SYSCALL_WRAP4(epoll_wait, int, epfd, struct epoll_event __user *, events, int, maxevents, int, timeout); | 134 | COMPAT_SYSCALL_WRAP4(epoll_wait, int, epfd, struct epoll_event __user *, events, int, maxevents, int, timeout); |
| 169 | COMPAT_SYSCALL_WRAP1(timer_getoverrun, timer_t, timer_id); | ||
| 170 | COMPAT_SYSCALL_WRAP1(timer_delete, compat_timer_t, compat_timer_id); | ||
| 171 | COMPAT_SYSCALL_WRAP1(io_destroy, aio_context_t, ctx); | 135 | COMPAT_SYSCALL_WRAP1(io_destroy, aio_context_t, ctx); |
| 172 | COMPAT_SYSCALL_WRAP3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result); | 136 | COMPAT_SYSCALL_WRAP3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result); |
| 173 | COMPAT_SYSCALL_WRAP1(mq_unlink, const char __user *, name); | 137 | COMPAT_SYSCALL_WRAP1(mq_unlink, const char __user *, name); |
| 174 | COMPAT_SYSCALL_WRAP5(add_key, const char __user *, tp, const char __user *, dsc, const void __user *, pld, size_t, len, key_serial_t, id); | 138 | COMPAT_SYSCALL_WRAP5(add_key, const char __user *, tp, const char __user *, dsc, const void __user *, pld, size_t, len, key_serial_t, id); |
| 175 | COMPAT_SYSCALL_WRAP4(request_key, const char __user *, tp, const char __user *, dsc, const char __user *, info, key_serial_t, id); | 139 | COMPAT_SYSCALL_WRAP4(request_key, const char __user *, tp, const char __user *, dsc, const char __user *, info, key_serial_t, id); |
| 176 | COMPAT_SYSCALL_WRAP5(remap_file_pages, unsigned long, start, unsigned long, size, unsigned long, prot, unsigned long, pgoff, unsigned long, flags); | 140 | COMPAT_SYSCALL_WRAP5(remap_file_pages, unsigned long, start, unsigned long, size, unsigned long, prot, unsigned long, pgoff, unsigned long, flags); |
| 177 | COMPAT_SYSCALL_WRAP3(ioprio_set, int, which, int, who, int, ioprio); | ||
| 178 | COMPAT_SYSCALL_WRAP2(ioprio_get, int, which, int, who); | ||
| 179 | COMPAT_SYSCALL_WRAP3(inotify_add_watch, int, fd, const char __user *, path, u32, mask); | 141 | COMPAT_SYSCALL_WRAP3(inotify_add_watch, int, fd, const char __user *, path, u32, mask); |
| 180 | COMPAT_SYSCALL_WRAP2(inotify_rm_watch, int, fd, __s32, wd); | ||
| 181 | COMPAT_SYSCALL_WRAP3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode); | 142 | COMPAT_SYSCALL_WRAP3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode); |
| 182 | COMPAT_SYSCALL_WRAP4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, unsigned, dev); | 143 | COMPAT_SYSCALL_WRAP4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, unsigned, dev); |
| 183 | COMPAT_SYSCALL_WRAP5(fchownat, int, dfd, const char __user *, filename, uid_t, user, gid_t, group, int, flag); | 144 | COMPAT_SYSCALL_WRAP5(fchownat, int, dfd, const char __user *, filename, uid_t, user, gid_t, group, int, flag); |
| @@ -192,23 +153,11 @@ COMPAT_SYSCALL_WRAP1(unshare, unsigned long, unshare_flags); | |||
| 192 | COMPAT_SYSCALL_WRAP6(splice, int, fd_in, loff_t __user *, off_in, int, fd_out, loff_t __user *, off_out, size_t, len, unsigned int, flags); | 153 | COMPAT_SYSCALL_WRAP6(splice, int, fd_in, loff_t __user *, off_in, int, fd_out, loff_t __user *, off_out, size_t, len, unsigned int, flags); |
| 193 | COMPAT_SYSCALL_WRAP4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags); | 154 | COMPAT_SYSCALL_WRAP4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags); |
| 194 | COMPAT_SYSCALL_WRAP3(getcpu, unsigned __user *, cpu, unsigned __user *, node, struct getcpu_cache __user *, cache); | 155 | COMPAT_SYSCALL_WRAP3(getcpu, unsigned __user *, cpu, unsigned __user *, node, struct getcpu_cache __user *, cache); |
| 195 | COMPAT_SYSCALL_WRAP1(eventfd, unsigned int, count); | ||
| 196 | COMPAT_SYSCALL_WRAP2(timerfd_create, int, clockid, int, flags); | ||
| 197 | COMPAT_SYSCALL_WRAP2(eventfd2, unsigned int, count, int, flags); | ||
| 198 | COMPAT_SYSCALL_WRAP1(inotify_init1, int, flags); | ||
| 199 | COMPAT_SYSCALL_WRAP2(pipe2, int __user *, fildes, int, flags); | 156 | COMPAT_SYSCALL_WRAP2(pipe2, int __user *, fildes, int, flags); |
| 200 | COMPAT_SYSCALL_WRAP3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags); | ||
| 201 | COMPAT_SYSCALL_WRAP1(epoll_create1, int, flags); | ||
| 202 | COMPAT_SYSCALL_WRAP2(tkill, int, pid, int, sig); | ||
| 203 | COMPAT_SYSCALL_WRAP3(tgkill, int, tgid, int, pid, int, sig); | ||
| 204 | COMPAT_SYSCALL_WRAP5(perf_event_open, struct perf_event_attr __user *, attr_uptr, pid_t, pid, int, cpu, int, group_fd, unsigned long, flags); | 157 | COMPAT_SYSCALL_WRAP5(perf_event_open, struct perf_event_attr __user *, attr_uptr, pid_t, pid, int, cpu, int, group_fd, unsigned long, flags); |
| 205 | COMPAT_SYSCALL_WRAP5(clone, unsigned long, newsp, unsigned long, clone_flags, int __user *, parent_tidptr, int __user *, child_tidptr, unsigned long, tls); | 158 | COMPAT_SYSCALL_WRAP5(clone, unsigned long, newsp, unsigned long, clone_flags, int __user *, parent_tidptr, int __user *, child_tidptr, unsigned long, tls); |
| 206 | COMPAT_SYSCALL_WRAP2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags); | ||
| 207 | COMPAT_SYSCALL_WRAP4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim); | 159 | COMPAT_SYSCALL_WRAP4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim); |
| 208 | COMPAT_SYSCALL_WRAP5(name_to_handle_at, int, dfd, const char __user *, name, struct file_handle __user *, handle, int __user *, mnt_id, int, flag); | 160 | COMPAT_SYSCALL_WRAP5(name_to_handle_at, int, dfd, const char __user *, name, struct file_handle __user *, handle, int __user *, mnt_id, int, flag); |
| 209 | COMPAT_SYSCALL_WRAP1(syncfs, int, fd); | ||
| 210 | COMPAT_SYSCALL_WRAP2(setns, int, fd, int, nstype); | ||
| 211 | COMPAT_SYSCALL_WRAP2(s390_runtime_instr, int, command, int, signum); | ||
| 212 | COMPAT_SYSCALL_WRAP5(kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, idx1, unsigned long, idx2); | 161 | COMPAT_SYSCALL_WRAP5(kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, idx1, unsigned long, idx2); |
| 213 | COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, flags); | 162 | COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, flags); |
| 214 | COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, flags); | 163 | COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, flags); |
| @@ -220,3 +169,10 @@ COMPAT_SYSCALL_WRAP2(memfd_create, const char __user *, uname, unsigned int, fla | |||
| 220 | COMPAT_SYSCALL_WRAP3(bpf, int, cmd, union bpf_attr *, attr, unsigned int, size); | 169 | COMPAT_SYSCALL_WRAP3(bpf, int, cmd, union bpf_attr *, attr, unsigned int, size); |
| 221 | COMPAT_SYSCALL_WRAP3(s390_pci_mmio_write, const unsigned long, mmio_addr, const void __user *, user_buffer, const size_t, length); | 170 | COMPAT_SYSCALL_WRAP3(s390_pci_mmio_write, const unsigned long, mmio_addr, const void __user *, user_buffer, const size_t, length); |
| 222 | COMPAT_SYSCALL_WRAP3(s390_pci_mmio_read, const unsigned long, mmio_addr, void __user *, user_buffer, const size_t, length); | 171 | COMPAT_SYSCALL_WRAP3(s390_pci_mmio_read, const unsigned long, mmio_addr, void __user *, user_buffer, const size_t, length); |
| 172 | COMPAT_SYSCALL_WRAP4(socketpair, int, family, int, type, int, protocol, int __user *, usockvec); | ||
| 173 | COMPAT_SYSCALL_WRAP3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen); | ||
| 174 | COMPAT_SYSCALL_WRAP3(connect, int, fd, struct sockaddr __user *, uservaddr, int, addrlen); | ||
| 175 | COMPAT_SYSCALL_WRAP4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, int __user *, upeer_addrlen, int, flags); | ||
| 176 | COMPAT_SYSCALL_WRAP3(getsockname, int, fd, struct sockaddr __user *, usockaddr, int __user *, usockaddr_len); | ||
| 177 | COMPAT_SYSCALL_WRAP3(getpeername, int, fd, struct sockaddr __user *, usockaddr, int __user *, usockaddr_len); | ||
| 178 | COMPAT_SYSCALL_WRAP6(sendto, int, fd, void __user *, buff, size_t, len, unsigned int, flags, struct sockaddr __user *, addr, int, addr_len); | ||
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 247b7aae4c6d..582fe44ab07c 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
| @@ -733,6 +733,14 @@ ENTRY(psw_idle) | |||
| 733 | stg %r3,__SF_EMPTY(%r15) | 733 | stg %r3,__SF_EMPTY(%r15) |
| 734 | larl %r1,.Lpsw_idle_lpsw+4 | 734 | larl %r1,.Lpsw_idle_lpsw+4 |
| 735 | stg %r1,__SF_EMPTY+8(%r15) | 735 | stg %r1,__SF_EMPTY+8(%r15) |
| 736 | #ifdef CONFIG_SMP | ||
| 737 | larl %r1,smp_cpu_mtid | ||
| 738 | llgf %r1,0(%r1) | ||
| 739 | ltgr %r1,%r1 | ||
| 740 | jz .Lpsw_idle_stcctm | ||
| 741 | .insn rsy,0xeb0000000017,%r1,5,__SF_EMPTY+16(%r15) | ||
| 742 | .Lpsw_idle_stcctm: | ||
| 743 | #endif | ||
| 736 | STCK __CLOCK_IDLE_ENTER(%r2) | 744 | STCK __CLOCK_IDLE_ENTER(%r2) |
| 737 | stpt __TIMER_IDLE_ENTER(%r2) | 745 | stpt __TIMER_IDLE_ENTER(%r2) |
| 738 | .Lpsw_idle_lpsw: | 746 | .Lpsw_idle_lpsw: |
| @@ -1159,7 +1167,27 @@ cleanup_critical: | |||
| 1159 | jhe 1f | 1167 | jhe 1f |
| 1160 | mvc __CLOCK_IDLE_ENTER(8,%r2),__CLOCK_IDLE_EXIT(%r2) | 1168 | mvc __CLOCK_IDLE_ENTER(8,%r2),__CLOCK_IDLE_EXIT(%r2) |
| 1161 | mvc __TIMER_IDLE_ENTER(8,%r2),__TIMER_IDLE_EXIT(%r2) | 1169 | mvc __TIMER_IDLE_ENTER(8,%r2),__TIMER_IDLE_EXIT(%r2) |
| 1162 | 1: # account system time going idle | 1170 | 1: # calculate idle cycles |
| 1171 | #ifdef CONFIG_SMP | ||
| 1172 | clg %r9,BASED(.Lcleanup_idle_insn) | ||
| 1173 | jl 3f | ||
| 1174 | larl %r1,smp_cpu_mtid | ||
| 1175 | llgf %r1,0(%r1) | ||
| 1176 | ltgr %r1,%r1 | ||
| 1177 | jz 3f | ||
| 1178 | .insn rsy,0xeb0000000017,%r1,5,__SF_EMPTY+80(%r15) | ||
| 1179 | larl %r3,mt_cycles | ||
| 1180 | ag %r3,__LC_PERCPU_OFFSET | ||
| 1181 | la %r4,__SF_EMPTY+16(%r15) | ||
| 1182 | 2: lg %r0,0(%r3) | ||
| 1183 | slg %r0,0(%r4) | ||
| 1184 | alg %r0,64(%r4) | ||
| 1185 | stg %r0,0(%r3) | ||
| 1186 | la %r3,8(%r3) | ||
| 1187 | la %r4,8(%r4) | ||
| 1188 | brct %r1,2b | ||
| 1189 | #endif | ||
| 1190 | 3: # account system time going idle | ||
| 1163 | lg %r9,__LC_STEAL_TIMER | 1191 | lg %r9,__LC_STEAL_TIMER |
| 1164 | alg %r9,__CLOCK_IDLE_ENTER(%r2) | 1192 | alg %r9,__CLOCK_IDLE_ENTER(%r2) |
| 1165 | slg %r9,__LC_LAST_UPDATE_CLOCK | 1193 | slg %r9,__LC_LAST_UPDATE_CLOCK |
| @@ -1191,6 +1219,7 @@ cleanup_critical: | |||
| 1191 | clg %r9,BASED(.Lcleanup_save_fpu_fpc_end) | 1219 | clg %r9,BASED(.Lcleanup_save_fpu_fpc_end) |
| 1192 | jhe 1f | 1220 | jhe 1f |
| 1193 | lg %r2,__LC_CURRENT | 1221 | lg %r2,__LC_CURRENT |
| 1222 | aghi %r2,__TASK_thread | ||
| 1194 | 0: # Store floating-point controls | 1223 | 0: # Store floating-point controls |
| 1195 | stfpc __THREAD_FPU_fpc(%r2) | 1224 | stfpc __THREAD_FPU_fpc(%r2) |
| 1196 | 1: # Load register save area and check if VX is active | 1225 | 1: # Load register save area and check if VX is active |
| @@ -1252,6 +1281,7 @@ cleanup_critical: | |||
| 1252 | clg %r9,BASED(.Lcleanup_load_fpu_regs_vx_ctl) | 1281 | clg %r9,BASED(.Lcleanup_load_fpu_regs_vx_ctl) |
| 1253 | jhe 6f | 1282 | jhe 6f |
| 1254 | lg %r4,__LC_CURRENT | 1283 | lg %r4,__LC_CURRENT |
| 1284 | aghi %r4,__TASK_thread | ||
| 1255 | lfpc __THREAD_FPU_fpc(%r4) | 1285 | lfpc __THREAD_FPU_fpc(%r4) |
| 1256 | tm __THREAD_FPU_flags+3(%r4),FPU_USE_VX # VX-enabled task ? | 1286 | tm __THREAD_FPU_flags+3(%r4),FPU_USE_VX # VX-enabled task ? |
| 1257 | lg %r4,__THREAD_FPU_regs(%r4) # %r4 <- reg save area | 1287 | lg %r4,__THREAD_FPU_regs(%r4) # %r4 <- reg save area |
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index 56fdad479115..a9563409c36e 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c | |||
| @@ -157,10 +157,14 @@ static int validate_ctr_auth(const struct hw_perf_event *hwc) | |||
| 157 | 157 | ||
| 158 | cpuhw = &get_cpu_var(cpu_hw_events); | 158 | cpuhw = &get_cpu_var(cpu_hw_events); |
| 159 | 159 | ||
| 160 | /* check authorization for cpu counter sets */ | 160 | /* Check authorization for cpu counter sets. |
| 161 | * If the particular CPU counter set is not authorized, | ||
| 162 | * return with -ENOENT in order to fall back to other | ||
| 163 | * PMUs that might suffice the event request. | ||
| 164 | */ | ||
| 161 | ctrs_state = cpumf_state_ctl[hwc->config_base]; | 165 | ctrs_state = cpumf_state_ctl[hwc->config_base]; |
| 162 | if (!(ctrs_state & cpuhw->info.auth_ctl)) | 166 | if (!(ctrs_state & cpuhw->info.auth_ctl)) |
| 163 | err = -EPERM; | 167 | err = -ENOENT; |
| 164 | 168 | ||
| 165 | put_cpu_var(cpu_hw_events); | 169 | put_cpu_var(cpu_hw_events); |
| 166 | return err; | 170 | return err; |
| @@ -536,7 +540,7 @@ static int cpumf_pmu_add(struct perf_event *event, int flags) | |||
| 536 | */ | 540 | */ |
| 537 | if (!(cpuhw->flags & PERF_EVENT_TXN)) | 541 | if (!(cpuhw->flags & PERF_EVENT_TXN)) |
| 538 | if (validate_ctr_auth(&event->hw)) | 542 | if (validate_ctr_auth(&event->hw)) |
| 539 | return -EPERM; | 543 | return -ENOENT; |
| 540 | 544 | ||
| 541 | ctr_set_enable(&cpuhw->state, event->hw.config_base); | 545 | ctr_set_enable(&cpuhw->state, event->hw.config_base); |
| 542 | event->hw.state = PERF_HES_UPTODATE | PERF_HES_STOPPED; | 546 | event->hw.state = PERF_HES_UPTODATE | PERF_HES_STOPPED; |
| @@ -611,7 +615,7 @@ static int cpumf_pmu_commit_txn(struct pmu *pmu) | |||
| 611 | state = cpuhw->state & ~((1 << CPUMF_LCCTL_ENABLE_SHIFT) - 1); | 615 | state = cpuhw->state & ~((1 << CPUMF_LCCTL_ENABLE_SHIFT) - 1); |
| 612 | state >>= CPUMF_LCCTL_ENABLE_SHIFT; | 616 | state >>= CPUMF_LCCTL_ENABLE_SHIFT; |
| 613 | if ((state & cpuhw->info.auth_ctl) != state) | 617 | if ((state & cpuhw->info.auth_ctl) != state) |
| 614 | return -EPERM; | 618 | return -ENOENT; |
| 615 | 619 | ||
| 616 | cpuhw->flags &= ~PERF_EVENT_TXN; | 620 | cpuhw->flags &= ~PERF_EVENT_TXN; |
| 617 | perf_pmu_enable(pmu); | 621 | perf_pmu_enable(pmu); |
diff --git a/arch/s390/kernel/swsusp.S b/arch/s390/kernel/swsusp.S index ca6294645dd3..2d6b6e81f812 100644 --- a/arch/s390/kernel/swsusp.S +++ b/arch/s390/kernel/swsusp.S | |||
| @@ -30,6 +30,9 @@ ENTRY(swsusp_arch_suspend) | |||
| 30 | aghi %r15,-STACK_FRAME_OVERHEAD | 30 | aghi %r15,-STACK_FRAME_OVERHEAD |
| 31 | stg %r1,__SF_BACKCHAIN(%r15) | 31 | stg %r1,__SF_BACKCHAIN(%r15) |
| 32 | 32 | ||
| 33 | /* Store FPU registers */ | ||
| 34 | brasl %r14,save_fpu_regs | ||
| 35 | |||
| 33 | /* Deactivate DAT */ | 36 | /* Deactivate DAT */ |
| 34 | stnsm __SF_EMPTY(%r15),0xfb | 37 | stnsm __SF_EMPTY(%r15),0xfb |
| 35 | 38 | ||
| @@ -47,23 +50,6 @@ ENTRY(swsusp_arch_suspend) | |||
| 47 | 50 | ||
| 48 | /* Store registers */ | 51 | /* Store registers */ |
| 49 | mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ | 52 | mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ |
| 50 | stfpc 0x31c(%r1) /* store fpu control */ | ||
| 51 | std 0,0x200(%r1) /* store f0 */ | ||
| 52 | std 1,0x208(%r1) /* store f1 */ | ||
| 53 | std 2,0x210(%r1) /* store f2 */ | ||
| 54 | std 3,0x218(%r1) /* store f3 */ | ||
| 55 | std 4,0x220(%r1) /* store f4 */ | ||
| 56 | std 5,0x228(%r1) /* store f5 */ | ||
| 57 | std 6,0x230(%r1) /* store f6 */ | ||
| 58 | std 7,0x238(%r1) /* store f7 */ | ||
| 59 | std 8,0x240(%r1) /* store f8 */ | ||
| 60 | std 9,0x248(%r1) /* store f9 */ | ||
| 61 | std 10,0x250(%r1) /* store f10 */ | ||
| 62 | std 11,0x258(%r1) /* store f11 */ | ||
| 63 | std 12,0x260(%r1) /* store f12 */ | ||
| 64 | std 13,0x268(%r1) /* store f13 */ | ||
| 65 | std 14,0x270(%r1) /* store f14 */ | ||
| 66 | std 15,0x278(%r1) /* store f15 */ | ||
| 67 | stam %a0,%a15,0x340(%r1) /* store access registers */ | 53 | stam %a0,%a15,0x340(%r1) /* store access registers */ |
| 68 | stctg %c0,%c15,0x380(%r1) /* store control registers */ | 54 | stctg %c0,%c15,0x380(%r1) /* store control registers */ |
| 69 | stmg %r0,%r15,0x280(%r1) /* store general registers */ | 55 | stmg %r0,%r15,0x280(%r1) /* store general registers */ |
| @@ -249,24 +235,6 @@ restore_registers: | |||
| 249 | lctlg %c0,%c15,0x380(%r13) /* load control registers */ | 235 | lctlg %c0,%c15,0x380(%r13) /* load control registers */ |
| 250 | lam %a0,%a15,0x340(%r13) /* load access registers */ | 236 | lam %a0,%a15,0x340(%r13) /* load access registers */ |
| 251 | 237 | ||
| 252 | lfpc 0x31c(%r13) /* load fpu control */ | ||
| 253 | ld 0,0x200(%r13) /* load f0 */ | ||
| 254 | ld 1,0x208(%r13) /* load f1 */ | ||
| 255 | ld 2,0x210(%r13) /* load f2 */ | ||
| 256 | ld 3,0x218(%r13) /* load f3 */ | ||
| 257 | ld 4,0x220(%r13) /* load f4 */ | ||
| 258 | ld 5,0x228(%r13) /* load f5 */ | ||
| 259 | ld 6,0x230(%r13) /* load f6 */ | ||
| 260 | ld 7,0x238(%r13) /* load f7 */ | ||
| 261 | ld 8,0x240(%r13) /* load f8 */ | ||
| 262 | ld 9,0x248(%r13) /* load f9 */ | ||
| 263 | ld 10,0x250(%r13) /* load f10 */ | ||
| 264 | ld 11,0x258(%r13) /* load f11 */ | ||
| 265 | ld 12,0x260(%r13) /* load f12 */ | ||
| 266 | ld 13,0x268(%r13) /* load f13 */ | ||
| 267 | ld 14,0x270(%r13) /* load f14 */ | ||
| 268 | ld 15,0x278(%r13) /* load f15 */ | ||
| 269 | |||
| 270 | /* Load old stack */ | 238 | /* Load old stack */ |
| 271 | lg %r15,0x2f8(%r13) | 239 | lg %r15,0x2f8(%r13) |
| 272 | 240 | ||
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index f3f4a137aef6..8c56929c8d82 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
| @@ -9,12 +9,12 @@ | |||
| 9 | #define NI_SYSCALL SYSCALL(sys_ni_syscall,sys_ni_syscall) | 9 | #define NI_SYSCALL SYSCALL(sys_ni_syscall,sys_ni_syscall) |
| 10 | 10 | ||
| 11 | NI_SYSCALL /* 0 */ | 11 | NI_SYSCALL /* 0 */ |
| 12 | SYSCALL(sys_exit,compat_sys_exit) | 12 | SYSCALL(sys_exit,sys_exit) |
| 13 | SYSCALL(sys_fork,sys_fork) | 13 | SYSCALL(sys_fork,sys_fork) |
| 14 | SYSCALL(sys_read,compat_sys_s390_read) | 14 | SYSCALL(sys_read,compat_sys_s390_read) |
| 15 | SYSCALL(sys_write,compat_sys_s390_write) | 15 | SYSCALL(sys_write,compat_sys_s390_write) |
| 16 | SYSCALL(sys_open,compat_sys_open) /* 5 */ | 16 | SYSCALL(sys_open,compat_sys_open) /* 5 */ |
| 17 | SYSCALL(sys_close,compat_sys_close) | 17 | SYSCALL(sys_close,sys_close) |
| 18 | SYSCALL(sys_restart_syscall,sys_restart_syscall) | 18 | SYSCALL(sys_restart_syscall,sys_restart_syscall) |
| 19 | SYSCALL(sys_creat,compat_sys_creat) | 19 | SYSCALL(sys_creat,compat_sys_creat) |
| 20 | SYSCALL(sys_link,compat_sys_link) | 20 | SYSCALL(sys_link,compat_sys_link) |
| @@ -35,21 +35,21 @@ SYSCALL(sys_ni_syscall,compat_sys_s390_setuid16) /* old setuid16 syscall*/ | |||
| 35 | SYSCALL(sys_ni_syscall,compat_sys_s390_getuid16) /* old getuid16 syscall*/ | 35 | SYSCALL(sys_ni_syscall,compat_sys_s390_getuid16) /* old getuid16 syscall*/ |
| 36 | SYSCALL(sys_ni_syscall,compat_sys_stime) /* 25 old stime syscall */ | 36 | SYSCALL(sys_ni_syscall,compat_sys_stime) /* 25 old stime syscall */ |
| 37 | SYSCALL(sys_ptrace,compat_sys_ptrace) | 37 | SYSCALL(sys_ptrace,compat_sys_ptrace) |
| 38 | SYSCALL(sys_alarm,compat_sys_alarm) | 38 | SYSCALL(sys_alarm,sys_alarm) |
| 39 | NI_SYSCALL /* old fstat syscall */ | 39 | NI_SYSCALL /* old fstat syscall */ |
| 40 | SYSCALL(sys_pause,sys_pause) | 40 | SYSCALL(sys_pause,sys_pause) |
| 41 | SYSCALL(sys_utime,compat_sys_utime) /* 30 */ | 41 | SYSCALL(sys_utime,compat_sys_utime) /* 30 */ |
| 42 | NI_SYSCALL /* old stty syscall */ | 42 | NI_SYSCALL /* old stty syscall */ |
| 43 | NI_SYSCALL /* old gtty syscall */ | 43 | NI_SYSCALL /* old gtty syscall */ |
| 44 | SYSCALL(sys_access,compat_sys_access) | 44 | SYSCALL(sys_access,compat_sys_access) |
| 45 | SYSCALL(sys_nice,compat_sys_nice) | 45 | SYSCALL(sys_nice,sys_nice) |
| 46 | NI_SYSCALL /* 35 old ftime syscall */ | 46 | NI_SYSCALL /* 35 old ftime syscall */ |
| 47 | SYSCALL(sys_sync,sys_sync) | 47 | SYSCALL(sys_sync,sys_sync) |
| 48 | SYSCALL(sys_kill,compat_sys_kill) | 48 | SYSCALL(sys_kill,sys_kill) |
| 49 | SYSCALL(sys_rename,compat_sys_rename) | 49 | SYSCALL(sys_rename,compat_sys_rename) |
| 50 | SYSCALL(sys_mkdir,compat_sys_mkdir) | 50 | SYSCALL(sys_mkdir,compat_sys_mkdir) |
| 51 | SYSCALL(sys_rmdir,compat_sys_rmdir) /* 40 */ | 51 | SYSCALL(sys_rmdir,compat_sys_rmdir) /* 40 */ |
| 52 | SYSCALL(sys_dup,compat_sys_dup) | 52 | SYSCALL(sys_dup,sys_dup) |
| 53 | SYSCALL(sys_pipe,compat_sys_pipe) | 53 | SYSCALL(sys_pipe,compat_sys_pipe) |
| 54 | SYSCALL(sys_times,compat_sys_times) | 54 | SYSCALL(sys_times,compat_sys_times) |
| 55 | NI_SYSCALL /* old prof syscall */ | 55 | NI_SYSCALL /* old prof syscall */ |
| @@ -65,13 +65,13 @@ NI_SYSCALL /* old lock syscall */ | |||
| 65 | SYSCALL(sys_ioctl,compat_sys_ioctl) | 65 | SYSCALL(sys_ioctl,compat_sys_ioctl) |
| 66 | SYSCALL(sys_fcntl,compat_sys_fcntl) /* 55 */ | 66 | SYSCALL(sys_fcntl,compat_sys_fcntl) /* 55 */ |
| 67 | NI_SYSCALL /* intel mpx syscall */ | 67 | NI_SYSCALL /* intel mpx syscall */ |
| 68 | SYSCALL(sys_setpgid,compat_sys_setpgid) | 68 | SYSCALL(sys_setpgid,sys_setpgid) |
| 69 | NI_SYSCALL /* old ulimit syscall */ | 69 | NI_SYSCALL /* old ulimit syscall */ |
| 70 | NI_SYSCALL /* old uname syscall */ | 70 | NI_SYSCALL /* old uname syscall */ |
| 71 | SYSCALL(sys_umask,compat_sys_umask) /* 60 */ | 71 | SYSCALL(sys_umask,sys_umask) /* 60 */ |
| 72 | SYSCALL(sys_chroot,compat_sys_chroot) | 72 | SYSCALL(sys_chroot,compat_sys_chroot) |
| 73 | SYSCALL(sys_ustat,compat_sys_ustat) | 73 | SYSCALL(sys_ustat,compat_sys_ustat) |
| 74 | SYSCALL(sys_dup2,compat_sys_dup2) | 74 | SYSCALL(sys_dup2,sys_dup2) |
| 75 | SYSCALL(sys_getppid,sys_getppid) | 75 | SYSCALL(sys_getppid,sys_getppid) |
| 76 | SYSCALL(sys_getpgrp,sys_getpgrp) /* 65 */ | 76 | SYSCALL(sys_getpgrp,sys_getpgrp) /* 65 */ |
| 77 | SYSCALL(sys_setsid,sys_setsid) | 77 | SYSCALL(sys_setsid,sys_setsid) |
| @@ -102,10 +102,10 @@ SYSCALL(sys_old_mmap,compat_sys_s390_old_mmap) /* 90 */ | |||
| 102 | SYSCALL(sys_munmap,compat_sys_munmap) | 102 | SYSCALL(sys_munmap,compat_sys_munmap) |
| 103 | SYSCALL(sys_truncate,compat_sys_truncate) | 103 | SYSCALL(sys_truncate,compat_sys_truncate) |
| 104 | SYSCALL(sys_ftruncate,compat_sys_ftruncate) | 104 | SYSCALL(sys_ftruncate,compat_sys_ftruncate) |
| 105 | SYSCALL(sys_fchmod,compat_sys_fchmod) | 105 | SYSCALL(sys_fchmod,sys_fchmod) |
| 106 | SYSCALL(sys_ni_syscall,compat_sys_s390_fchown16) /* 95 old fchown16 syscall*/ | 106 | SYSCALL(sys_ni_syscall,compat_sys_s390_fchown16) /* 95 old fchown16 syscall*/ |
| 107 | SYSCALL(sys_getpriority,compat_sys_getpriority) | 107 | SYSCALL(sys_getpriority,sys_getpriority) |
| 108 | SYSCALL(sys_setpriority,compat_sys_setpriority) | 108 | SYSCALL(sys_setpriority,sys_setpriority) |
| 109 | NI_SYSCALL /* old profil syscall */ | 109 | NI_SYSCALL /* old profil syscall */ |
| 110 | SYSCALL(sys_statfs,compat_sys_statfs) | 110 | SYSCALL(sys_statfs,compat_sys_statfs) |
| 111 | SYSCALL(sys_fstatfs,compat_sys_fstatfs) /* 100 */ | 111 | SYSCALL(sys_fstatfs,compat_sys_fstatfs) /* 100 */ |
| @@ -126,7 +126,7 @@ SYSCALL(sys_wait4,compat_sys_wait4) | |||
| 126 | SYSCALL(sys_swapoff,compat_sys_swapoff) /* 115 */ | 126 | SYSCALL(sys_swapoff,compat_sys_swapoff) /* 115 */ |
| 127 | SYSCALL(sys_sysinfo,compat_sys_sysinfo) | 127 | SYSCALL(sys_sysinfo,compat_sys_sysinfo) |
| 128 | SYSCALL(sys_s390_ipc,compat_sys_s390_ipc) | 128 | SYSCALL(sys_s390_ipc,compat_sys_s390_ipc) |
| 129 | SYSCALL(sys_fsync,compat_sys_fsync) | 129 | SYSCALL(sys_fsync,sys_fsync) |
| 130 | SYSCALL(sys_sigreturn,compat_sys_sigreturn) | 130 | SYSCALL(sys_sigreturn,compat_sys_sigreturn) |
| 131 | SYSCALL(sys_clone,compat_sys_clone) /* 120 */ | 131 | SYSCALL(sys_clone,compat_sys_clone) /* 120 */ |
| 132 | SYSCALL(sys_setdomainname,compat_sys_setdomainname) | 132 | SYSCALL(sys_setdomainname,compat_sys_setdomainname) |
| @@ -140,35 +140,35 @@ SYSCALL(sys_init_module,compat_sys_init_module) | |||
| 140 | SYSCALL(sys_delete_module,compat_sys_delete_module) | 140 | SYSCALL(sys_delete_module,compat_sys_delete_module) |
| 141 | NI_SYSCALL /* 130: old get_kernel_syms */ | 141 | NI_SYSCALL /* 130: old get_kernel_syms */ |
| 142 | SYSCALL(sys_quotactl,compat_sys_quotactl) | 142 | SYSCALL(sys_quotactl,compat_sys_quotactl) |
| 143 | SYSCALL(sys_getpgid,compat_sys_getpgid) | 143 | SYSCALL(sys_getpgid,sys_getpgid) |
| 144 | SYSCALL(sys_fchdir,compat_sys_fchdir) | 144 | SYSCALL(sys_fchdir,sys_fchdir) |
| 145 | SYSCALL(sys_bdflush,compat_sys_bdflush) | 145 | SYSCALL(sys_bdflush,compat_sys_bdflush) |
| 146 | SYSCALL(sys_sysfs,compat_sys_sysfs) /* 135 */ | 146 | SYSCALL(sys_sysfs,compat_sys_sysfs) /* 135 */ |
| 147 | SYSCALL(sys_s390_personality,compat_sys_s390_personality) | 147 | SYSCALL(sys_s390_personality,sys_s390_personality) |
| 148 | NI_SYSCALL /* for afs_syscall */ | 148 | NI_SYSCALL /* for afs_syscall */ |
| 149 | SYSCALL(sys_ni_syscall,compat_sys_s390_setfsuid16) /* old setfsuid16 syscall */ | 149 | SYSCALL(sys_ni_syscall,compat_sys_s390_setfsuid16) /* old setfsuid16 syscall */ |
| 150 | SYSCALL(sys_ni_syscall,compat_sys_s390_setfsgid16) /* old setfsgid16 syscall */ | 150 | SYSCALL(sys_ni_syscall,compat_sys_s390_setfsgid16) /* old setfsgid16 syscall */ |
| 151 | SYSCALL(sys_llseek,compat_sys_llseek) /* 140 */ | 151 | SYSCALL(sys_llseek,compat_sys_llseek) /* 140 */ |
| 152 | SYSCALL(sys_getdents,compat_sys_getdents) | 152 | SYSCALL(sys_getdents,compat_sys_getdents) |
| 153 | SYSCALL(sys_select,compat_sys_select) | 153 | SYSCALL(sys_select,compat_sys_select) |
| 154 | SYSCALL(sys_flock,compat_sys_flock) | 154 | SYSCALL(sys_flock,sys_flock) |
| 155 | SYSCALL(sys_msync,compat_sys_msync) | 155 | SYSCALL(sys_msync,compat_sys_msync) |
| 156 | SYSCALL(sys_readv,compat_sys_readv) /* 145 */ | 156 | SYSCALL(sys_readv,compat_sys_readv) /* 145 */ |
| 157 | SYSCALL(sys_writev,compat_sys_writev) | 157 | SYSCALL(sys_writev,compat_sys_writev) |
| 158 | SYSCALL(sys_getsid,compat_sys_getsid) | 158 | SYSCALL(sys_getsid,sys_getsid) |
| 159 | SYSCALL(sys_fdatasync,compat_sys_fdatasync) | 159 | SYSCALL(sys_fdatasync,sys_fdatasync) |
| 160 | SYSCALL(sys_sysctl,compat_sys_sysctl) | 160 | SYSCALL(sys_sysctl,compat_sys_sysctl) |
| 161 | SYSCALL(sys_mlock,compat_sys_mlock) /* 150 */ | 161 | SYSCALL(sys_mlock,compat_sys_mlock) /* 150 */ |
| 162 | SYSCALL(sys_munlock,compat_sys_munlock) | 162 | SYSCALL(sys_munlock,compat_sys_munlock) |
| 163 | SYSCALL(sys_mlockall,compat_sys_mlockall) | 163 | SYSCALL(sys_mlockall,sys_mlockall) |
| 164 | SYSCALL(sys_munlockall,sys_munlockall) | 164 | SYSCALL(sys_munlockall,sys_munlockall) |
| 165 | SYSCALL(sys_sched_setparam,compat_sys_sched_setparam) | 165 | SYSCALL(sys_sched_setparam,compat_sys_sched_setparam) |
| 166 | SYSCALL(sys_sched_getparam,compat_sys_sched_getparam) /* 155 */ | 166 | SYSCALL(sys_sched_getparam,compat_sys_sched_getparam) /* 155 */ |
| 167 | SYSCALL(sys_sched_setscheduler,compat_sys_sched_setscheduler) | 167 | SYSCALL(sys_sched_setscheduler,compat_sys_sched_setscheduler) |
| 168 | SYSCALL(sys_sched_getscheduler,compat_sys_sched_getscheduler) | 168 | SYSCALL(sys_sched_getscheduler,sys_sched_getscheduler) |
| 169 | SYSCALL(sys_sched_yield,sys_sched_yield) | 169 | SYSCALL(sys_sched_yield,sys_sched_yield) |
| 170 | SYSCALL(sys_sched_get_priority_max,compat_sys_sched_get_priority_max) | 170 | SYSCALL(sys_sched_get_priority_max,sys_sched_get_priority_max) |
| 171 | SYSCALL(sys_sched_get_priority_min,compat_sys_sched_get_priority_min) /* 160 */ | 171 | SYSCALL(sys_sched_get_priority_min,sys_sched_get_priority_min) /* 160 */ |
| 172 | SYSCALL(sys_sched_rr_get_interval,compat_sys_sched_rr_get_interval) | 172 | SYSCALL(sys_sched_rr_get_interval,compat_sys_sched_rr_get_interval) |
| 173 | SYSCALL(sys_nanosleep,compat_sys_nanosleep) | 173 | SYSCALL(sys_nanosleep,compat_sys_nanosleep) |
| 174 | SYSCALL(sys_mremap,compat_sys_mremap) | 174 | SYSCALL(sys_mremap,compat_sys_mremap) |
| @@ -211,20 +211,20 @@ SYSCALL(sys_getuid,sys_getuid) | |||
| 211 | SYSCALL(sys_getgid,sys_getgid) /* 200 */ | 211 | SYSCALL(sys_getgid,sys_getgid) /* 200 */ |
| 212 | SYSCALL(sys_geteuid,sys_geteuid) | 212 | SYSCALL(sys_geteuid,sys_geteuid) |
| 213 | SYSCALL(sys_getegid,sys_getegid) | 213 | SYSCALL(sys_getegid,sys_getegid) |
| 214 | SYSCALL(sys_setreuid,compat_sys_setreuid) | 214 | SYSCALL(sys_setreuid,sys_setreuid) |
| 215 | SYSCALL(sys_setregid,compat_sys_setregid) | 215 | SYSCALL(sys_setregid,sys_setregid) |
| 216 | SYSCALL(sys_getgroups,compat_sys_getgroups) /* 205 */ | 216 | SYSCALL(sys_getgroups,compat_sys_getgroups) /* 205 */ |
| 217 | SYSCALL(sys_setgroups,compat_sys_setgroups) | 217 | SYSCALL(sys_setgroups,compat_sys_setgroups) |
| 218 | SYSCALL(sys_fchown,compat_sys_fchown) | 218 | SYSCALL(sys_fchown,sys_fchown) |
| 219 | SYSCALL(sys_setresuid,compat_sys_setresuid) | 219 | SYSCALL(sys_setresuid,sys_setresuid) |
| 220 | SYSCALL(sys_getresuid,compat_sys_getresuid) | 220 | SYSCALL(sys_getresuid,compat_sys_getresuid) |
| 221 | SYSCALL(sys_setresgid,compat_sys_setresgid) /* 210 */ | 221 | SYSCALL(sys_setresgid,sys_setresgid) /* 210 */ |
| 222 | SYSCALL(sys_getresgid,compat_sys_getresgid) | 222 | SYSCALL(sys_getresgid,compat_sys_getresgid) |
| 223 | SYSCALL(sys_chown,compat_sys_chown) | 223 | SYSCALL(sys_chown,compat_sys_chown) |
| 224 | SYSCALL(sys_setuid,compat_sys_setuid) | 224 | SYSCALL(sys_setuid,sys_setuid) |
| 225 | SYSCALL(sys_setgid,compat_sys_setgid) | 225 | SYSCALL(sys_setgid,sys_setgid) |
| 226 | SYSCALL(sys_setfsuid,compat_sys_setfsuid) /* 215 */ | 226 | SYSCALL(sys_setfsuid,sys_setfsuid) /* 215 */ |
| 227 | SYSCALL(sys_setfsgid,compat_sys_setfsgid) | 227 | SYSCALL(sys_setfsgid,sys_setfsgid) |
| 228 | SYSCALL(sys_pivot_root,compat_sys_pivot_root) | 228 | SYSCALL(sys_pivot_root,compat_sys_pivot_root) |
| 229 | SYSCALL(sys_mincore,compat_sys_mincore) | 229 | SYSCALL(sys_mincore,compat_sys_mincore) |
| 230 | SYSCALL(sys_madvise,compat_sys_madvise) | 230 | SYSCALL(sys_madvise,compat_sys_madvise) |
| @@ -245,19 +245,19 @@ SYSCALL(sys_removexattr,compat_sys_removexattr) | |||
| 245 | SYSCALL(sys_lremovexattr,compat_sys_lremovexattr) | 245 | SYSCALL(sys_lremovexattr,compat_sys_lremovexattr) |
| 246 | SYSCALL(sys_fremovexattr,compat_sys_fremovexattr) /* 235 */ | 246 | SYSCALL(sys_fremovexattr,compat_sys_fremovexattr) /* 235 */ |
| 247 | SYSCALL(sys_gettid,sys_gettid) | 247 | SYSCALL(sys_gettid,sys_gettid) |
| 248 | SYSCALL(sys_tkill,compat_sys_tkill) | 248 | SYSCALL(sys_tkill,sys_tkill) |
| 249 | SYSCALL(sys_futex,compat_sys_futex) | 249 | SYSCALL(sys_futex,compat_sys_futex) |
| 250 | SYSCALL(sys_sched_setaffinity,compat_sys_sched_setaffinity) | 250 | SYSCALL(sys_sched_setaffinity,compat_sys_sched_setaffinity) |
| 251 | SYSCALL(sys_sched_getaffinity,compat_sys_sched_getaffinity) /* 240 */ | 251 | SYSCALL(sys_sched_getaffinity,compat_sys_sched_getaffinity) /* 240 */ |
| 252 | SYSCALL(sys_tgkill,compat_sys_tgkill) | 252 | SYSCALL(sys_tgkill,sys_tgkill) |
| 253 | NI_SYSCALL /* reserved for TUX */ | 253 | NI_SYSCALL /* reserved for TUX */ |
| 254 | SYSCALL(sys_io_setup,compat_sys_io_setup) | 254 | SYSCALL(sys_io_setup,compat_sys_io_setup) |
| 255 | SYSCALL(sys_io_destroy,compat_sys_io_destroy) | 255 | SYSCALL(sys_io_destroy,compat_sys_io_destroy) |
| 256 | SYSCALL(sys_io_getevents,compat_sys_io_getevents) /* 245 */ | 256 | SYSCALL(sys_io_getevents,compat_sys_io_getevents) /* 245 */ |
| 257 | SYSCALL(sys_io_submit,compat_sys_io_submit) | 257 | SYSCALL(sys_io_submit,compat_sys_io_submit) |
| 258 | SYSCALL(sys_io_cancel,compat_sys_io_cancel) | 258 | SYSCALL(sys_io_cancel,compat_sys_io_cancel) |
| 259 | SYSCALL(sys_exit_group,compat_sys_exit_group) | 259 | SYSCALL(sys_exit_group,sys_exit_group) |
| 260 | SYSCALL(sys_epoll_create,compat_sys_epoll_create) | 260 | SYSCALL(sys_epoll_create,sys_epoll_create) |
| 261 | SYSCALL(sys_epoll_ctl,compat_sys_epoll_ctl) /* 250 */ | 261 | SYSCALL(sys_epoll_ctl,compat_sys_epoll_ctl) /* 250 */ |
| 262 | SYSCALL(sys_epoll_wait,compat_sys_epoll_wait) | 262 | SYSCALL(sys_epoll_wait,compat_sys_epoll_wait) |
| 263 | SYSCALL(sys_set_tid_address,compat_sys_set_tid_address) | 263 | SYSCALL(sys_set_tid_address,compat_sys_set_tid_address) |
| @@ -265,8 +265,8 @@ SYSCALL(sys_fadvise64_64,compat_sys_s390_fadvise64) | |||
| 265 | SYSCALL(sys_timer_create,compat_sys_timer_create) | 265 | SYSCALL(sys_timer_create,compat_sys_timer_create) |
| 266 | SYSCALL(sys_timer_settime,compat_sys_timer_settime) /* 255 */ | 266 | SYSCALL(sys_timer_settime,compat_sys_timer_settime) /* 255 */ |
| 267 | SYSCALL(sys_timer_gettime,compat_sys_timer_gettime) | 267 | SYSCALL(sys_timer_gettime,compat_sys_timer_gettime) |
| 268 | SYSCALL(sys_timer_getoverrun,compat_sys_timer_getoverrun) | 268 | SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun) |
| 269 | SYSCALL(sys_timer_delete,compat_sys_timer_delete) | 269 | SYSCALL(sys_timer_delete,sys_timer_delete) |
| 270 | SYSCALL(sys_clock_settime,compat_sys_clock_settime) | 270 | SYSCALL(sys_clock_settime,compat_sys_clock_settime) |
| 271 | SYSCALL(sys_clock_gettime,compat_sys_clock_gettime) /* 260 */ | 271 | SYSCALL(sys_clock_gettime,compat_sys_clock_gettime) /* 260 */ |
| 272 | SYSCALL(sys_clock_getres,compat_sys_clock_getres) | 272 | SYSCALL(sys_clock_getres,compat_sys_clock_getres) |
| @@ -290,11 +290,11 @@ SYSCALL(sys_add_key,compat_sys_add_key) | |||
| 290 | SYSCALL(sys_request_key,compat_sys_request_key) | 290 | SYSCALL(sys_request_key,compat_sys_request_key) |
| 291 | SYSCALL(sys_keyctl,compat_sys_keyctl) /* 280 */ | 291 | SYSCALL(sys_keyctl,compat_sys_keyctl) /* 280 */ |
| 292 | SYSCALL(sys_waitid,compat_sys_waitid) | 292 | SYSCALL(sys_waitid,compat_sys_waitid) |
| 293 | SYSCALL(sys_ioprio_set,compat_sys_ioprio_set) | 293 | SYSCALL(sys_ioprio_set,sys_ioprio_set) |
| 294 | SYSCALL(sys_ioprio_get,compat_sys_ioprio_get) | 294 | SYSCALL(sys_ioprio_get,sys_ioprio_get) |
| 295 | SYSCALL(sys_inotify_init,sys_inotify_init) | 295 | SYSCALL(sys_inotify_init,sys_inotify_init) |
| 296 | SYSCALL(sys_inotify_add_watch,compat_sys_inotify_add_watch) /* 285 */ | 296 | SYSCALL(sys_inotify_add_watch,compat_sys_inotify_add_watch) /* 285 */ |
| 297 | SYSCALL(sys_inotify_rm_watch,compat_sys_inotify_rm_watch) | 297 | SYSCALL(sys_inotify_rm_watch,sys_inotify_rm_watch) |
| 298 | SYSCALL(sys_migrate_pages,compat_sys_migrate_pages) | 298 | SYSCALL(sys_migrate_pages,compat_sys_migrate_pages) |
| 299 | SYSCALL(sys_openat,compat_sys_openat) | 299 | SYSCALL(sys_openat,compat_sys_openat) |
| 300 | SYSCALL(sys_mkdirat,compat_sys_mkdirat) | 300 | SYSCALL(sys_mkdirat,compat_sys_mkdirat) |
| @@ -326,31 +326,31 @@ SYSCALL(sys_fallocate,compat_sys_s390_fallocate) | |||
| 326 | SYSCALL(sys_utimensat,compat_sys_utimensat) /* 315 */ | 326 | SYSCALL(sys_utimensat,compat_sys_utimensat) /* 315 */ |
| 327 | SYSCALL(sys_signalfd,compat_sys_signalfd) | 327 | SYSCALL(sys_signalfd,compat_sys_signalfd) |
| 328 | NI_SYSCALL /* 317 old sys_timer_fd */ | 328 | NI_SYSCALL /* 317 old sys_timer_fd */ |
| 329 | SYSCALL(sys_eventfd,compat_sys_eventfd) | 329 | SYSCALL(sys_eventfd,sys_eventfd) |
| 330 | SYSCALL(sys_timerfd_create,compat_sys_timerfd_create) | 330 | SYSCALL(sys_timerfd_create,sys_timerfd_create) |
| 331 | SYSCALL(sys_timerfd_settime,compat_sys_timerfd_settime) /* 320 */ | 331 | SYSCALL(sys_timerfd_settime,compat_sys_timerfd_settime) /* 320 */ |
| 332 | SYSCALL(sys_timerfd_gettime,compat_sys_timerfd_gettime) | 332 | SYSCALL(sys_timerfd_gettime,compat_sys_timerfd_gettime) |
| 333 | SYSCALL(sys_signalfd4,compat_sys_signalfd4) | 333 | SYSCALL(sys_signalfd4,compat_sys_signalfd4) |
| 334 | SYSCALL(sys_eventfd2,compat_sys_eventfd2) | 334 | SYSCALL(sys_eventfd2,sys_eventfd2) |
| 335 | SYSCALL(sys_inotify_init1,compat_sys_inotify_init1) | 335 | SYSCALL(sys_inotify_init1,sys_inotify_init1) |
| 336 | SYSCALL(sys_pipe2,compat_sys_pipe2) /* 325 */ | 336 | SYSCALL(sys_pipe2,compat_sys_pipe2) /* 325 */ |
| 337 | SYSCALL(sys_dup3,compat_sys_dup3) | 337 | SYSCALL(sys_dup3,sys_dup3) |
| 338 | SYSCALL(sys_epoll_create1,compat_sys_epoll_create1) | 338 | SYSCALL(sys_epoll_create1,sys_epoll_create1) |
| 339 | SYSCALL(sys_preadv,compat_sys_preadv) | 339 | SYSCALL(sys_preadv,compat_sys_preadv) |
| 340 | SYSCALL(sys_pwritev,compat_sys_pwritev) | 340 | SYSCALL(sys_pwritev,compat_sys_pwritev) |
| 341 | SYSCALL(sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo) /* 330 */ | 341 | SYSCALL(sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo) /* 330 */ |
| 342 | SYSCALL(sys_perf_event_open,compat_sys_perf_event_open) | 342 | SYSCALL(sys_perf_event_open,compat_sys_perf_event_open) |
| 343 | SYSCALL(sys_fanotify_init,compat_sys_fanotify_init) | 343 | SYSCALL(sys_fanotify_init,sys_fanotify_init) |
| 344 | SYSCALL(sys_fanotify_mark,compat_sys_fanotify_mark) | 344 | SYSCALL(sys_fanotify_mark,compat_sys_fanotify_mark) |
| 345 | SYSCALL(sys_prlimit64,compat_sys_prlimit64) | 345 | SYSCALL(sys_prlimit64,compat_sys_prlimit64) |
| 346 | SYSCALL(sys_name_to_handle_at,compat_sys_name_to_handle_at) /* 335 */ | 346 | SYSCALL(sys_name_to_handle_at,compat_sys_name_to_handle_at) /* 335 */ |
| 347 | SYSCALL(sys_open_by_handle_at,compat_sys_open_by_handle_at) | 347 | SYSCALL(sys_open_by_handle_at,compat_sys_open_by_handle_at) |
| 348 | SYSCALL(sys_clock_adjtime,compat_sys_clock_adjtime) | 348 | SYSCALL(sys_clock_adjtime,compat_sys_clock_adjtime) |
| 349 | SYSCALL(sys_syncfs,compat_sys_syncfs) | 349 | SYSCALL(sys_syncfs,sys_syncfs) |
| 350 | SYSCALL(sys_setns,compat_sys_setns) | 350 | SYSCALL(sys_setns,sys_setns) |
| 351 | SYSCALL(sys_process_vm_readv,compat_sys_process_vm_readv) /* 340 */ | 351 | SYSCALL(sys_process_vm_readv,compat_sys_process_vm_readv) /* 340 */ |
| 352 | SYSCALL(sys_process_vm_writev,compat_sys_process_vm_writev) | 352 | SYSCALL(sys_process_vm_writev,compat_sys_process_vm_writev) |
| 353 | SYSCALL(sys_s390_runtime_instr,compat_sys_s390_runtime_instr) | 353 | SYSCALL(sys_s390_runtime_instr,sys_s390_runtime_instr) |
| 354 | SYSCALL(sys_kcmp,compat_sys_kcmp) | 354 | SYSCALL(sys_kcmp,compat_sys_kcmp) |
| 355 | SYSCALL(sys_finit_module,compat_sys_finit_module) | 355 | SYSCALL(sys_finit_module,compat_sys_finit_module) |
| 356 | SYSCALL(sys_sched_setattr,compat_sys_sched_setattr) /* 345 */ | 356 | SYSCALL(sys_sched_setattr,compat_sys_sched_setattr) /* 345 */ |
| @@ -363,3 +363,22 @@ SYSCALL(sys_bpf,compat_sys_bpf) | |||
| 363 | SYSCALL(sys_s390_pci_mmio_write,compat_sys_s390_pci_mmio_write) | 363 | SYSCALL(sys_s390_pci_mmio_write,compat_sys_s390_pci_mmio_write) |
| 364 | SYSCALL(sys_s390_pci_mmio_read,compat_sys_s390_pci_mmio_read) | 364 | SYSCALL(sys_s390_pci_mmio_read,compat_sys_s390_pci_mmio_read) |
| 365 | SYSCALL(sys_execveat,compat_sys_execveat) | 365 | SYSCALL(sys_execveat,compat_sys_execveat) |
| 366 | SYSCALL(sys_userfaultfd,sys_userfaultfd) /* 355 */ | ||
| 367 | SYSCALL(sys_membarrier,sys_membarrier) | ||
| 368 | SYSCALL(sys_recvmmsg,compat_sys_recvmmsg) | ||
| 369 | SYSCALL(sys_sendmmsg,compat_sys_sendmmsg) | ||
| 370 | SYSCALL(sys_socket,sys_socket) | ||
| 371 | SYSCALL(sys_socketpair,compat_sys_socketpair) /* 360 */ | ||
| 372 | SYSCALL(sys_bind,sys_bind) | ||
| 373 | SYSCALL(sys_connect,sys_connect) | ||
| 374 | SYSCALL(sys_listen,sys_listen) | ||
| 375 | SYSCALL(sys_accept4,sys_accept4) | ||
| 376 | SYSCALL(sys_getsockopt,compat_sys_getsockopt) /* 365 */ | ||
| 377 | SYSCALL(sys_setsockopt,compat_sys_setsockopt) | ||
| 378 | SYSCALL(sys_getsockname,compat_sys_getsockname) | ||
| 379 | SYSCALL(sys_getpeername,compat_sys_getpeername) | ||
| 380 | SYSCALL(sys_sendto,compat_sys_sendto) | ||
| 381 | SYSCALL(sys_sendmsg,compat_sys_sendmsg) /* 370 */ | ||
| 382 | SYSCALL(sys_recvfrom,compat_sys_recvfrom) | ||
| 383 | SYSCALL(sys_recvmsg,compat_sys_recvmsg) | ||
| 384 | SYSCALL(sys_shutdown,sys_shutdown) | ||
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index b9ce650e9e99..dafc44f519c3 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
| @@ -25,7 +25,7 @@ static DEFINE_SPINLOCK(virt_timer_lock); | |||
| 25 | static atomic64_t virt_timer_current; | 25 | static atomic64_t virt_timer_current; |
| 26 | static atomic64_t virt_timer_elapsed; | 26 | static atomic64_t virt_timer_elapsed; |
| 27 | 27 | ||
| 28 | static DEFINE_PER_CPU(u64, mt_cycles[32]); | 28 | DEFINE_PER_CPU(u64, mt_cycles[8]); |
| 29 | static DEFINE_PER_CPU(u64, mt_scaling_mult) = { 1 }; | 29 | static DEFINE_PER_CPU(u64, mt_scaling_mult) = { 1 }; |
| 30 | static DEFINE_PER_CPU(u64, mt_scaling_div) = { 1 }; | 30 | static DEFINE_PER_CPU(u64, mt_scaling_div) = { 1 }; |
| 31 | static DEFINE_PER_CPU(u64, mt_scaling_jiffies); | 31 | static DEFINE_PER_CPU(u64, mt_scaling_jiffies); |
| @@ -60,6 +60,34 @@ static inline int virt_timer_forward(u64 elapsed) | |||
| 60 | return elapsed >= atomic64_read(&virt_timer_current); | 60 | return elapsed >= atomic64_read(&virt_timer_current); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | static void update_mt_scaling(void) | ||
| 64 | { | ||
| 65 | u64 cycles_new[8], *cycles_old; | ||
| 66 | u64 delta, fac, mult, div; | ||
| 67 | int i; | ||
| 68 | |||
| 69 | stcctm5(smp_cpu_mtid + 1, cycles_new); | ||
| 70 | cycles_old = this_cpu_ptr(mt_cycles); | ||
| 71 | fac = 1; | ||
| 72 | mult = div = 0; | ||
| 73 | for (i = 0; i <= smp_cpu_mtid; i++) { | ||
| 74 | delta = cycles_new[i] - cycles_old[i]; | ||
| 75 | div += delta; | ||
| 76 | mult *= i + 1; | ||
| 77 | mult += delta * fac; | ||
| 78 | fac *= i + 1; | ||
| 79 | } | ||
| 80 | div *= fac; | ||
| 81 | if (div > 0) { | ||
| 82 | /* Update scaling factor */ | ||
| 83 | __this_cpu_write(mt_scaling_mult, mult); | ||
| 84 | __this_cpu_write(mt_scaling_div, div); | ||
| 85 | memcpy(cycles_old, cycles_new, | ||
| 86 | sizeof(u64) * (smp_cpu_mtid + 1)); | ||
| 87 | } | ||
| 88 | __this_cpu_write(mt_scaling_jiffies, jiffies_64); | ||
| 89 | } | ||
| 90 | |||
| 63 | /* | 91 | /* |
| 64 | * Update process times based on virtual cpu times stored by entry.S | 92 | * Update process times based on virtual cpu times stored by entry.S |
| 65 | * to the lowcore fields user_timer, system_timer & steal_clock. | 93 | * to the lowcore fields user_timer, system_timer & steal_clock. |
| @@ -69,7 +97,6 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset) | |||
| 69 | struct thread_info *ti = task_thread_info(tsk); | 97 | struct thread_info *ti = task_thread_info(tsk); |
| 70 | u64 timer, clock, user, system, steal; | 98 | u64 timer, clock, user, system, steal; |
| 71 | u64 user_scaled, system_scaled; | 99 | u64 user_scaled, system_scaled; |
| 72 | int i; | ||
| 73 | 100 | ||
| 74 | timer = S390_lowcore.last_update_timer; | 101 | timer = S390_lowcore.last_update_timer; |
| 75 | clock = S390_lowcore.last_update_clock; | 102 | clock = S390_lowcore.last_update_clock; |
| @@ -85,30 +112,10 @@ static int do_account_vtime(struct task_struct *tsk, int hardirq_offset) | |||
| 85 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; | 112 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; |
| 86 | S390_lowcore.steal_timer += S390_lowcore.last_update_clock - clock; | 113 | S390_lowcore.steal_timer += S390_lowcore.last_update_clock - clock; |
| 87 | 114 | ||
| 88 | /* Do MT utilization calculation */ | 115 | /* Update MT utilization calculation */ |
| 89 | if (smp_cpu_mtid && | 116 | if (smp_cpu_mtid && |
| 90 | time_after64(jiffies_64, __this_cpu_read(mt_scaling_jiffies))) { | 117 | time_after64(jiffies_64, this_cpu_read(mt_scaling_jiffies))) |
| 91 | u64 cycles_new[32], *cycles_old; | 118 | update_mt_scaling(); |
| 92 | u64 delta, mult, div; | ||
| 93 | |||
| 94 | cycles_old = this_cpu_ptr(mt_cycles); | ||
| 95 | if (stcctm5(smp_cpu_mtid + 1, cycles_new) < 2) { | ||
| 96 | mult = div = 0; | ||
| 97 | for (i = 0; i <= smp_cpu_mtid; i++) { | ||
| 98 | delta = cycles_new[i] - cycles_old[i]; | ||
| 99 | mult += delta; | ||
| 100 | div += (i + 1) * delta; | ||
| 101 | } | ||
| 102 | if (mult > 0) { | ||
| 103 | /* Update scaling factor */ | ||
| 104 | __this_cpu_write(mt_scaling_mult, mult); | ||
| 105 | __this_cpu_write(mt_scaling_div, div); | ||
| 106 | memcpy(cycles_old, cycles_new, | ||
| 107 | sizeof(u64) * (smp_cpu_mtid + 1)); | ||
| 108 | } | ||
| 109 | } | ||
| 110 | __this_cpu_write(mt_scaling_jiffies, jiffies_64); | ||
| 111 | } | ||
| 112 | 119 | ||
| 113 | user = S390_lowcore.user_timer - ti->user_timer; | 120 | user = S390_lowcore.user_timer - ti->user_timer; |
| 114 | S390_lowcore.steal_timer -= user; | 121 | S390_lowcore.steal_timer -= user; |
| @@ -177,6 +184,11 @@ void vtime_account_irq_enter(struct task_struct *tsk) | |||
| 177 | S390_lowcore.last_update_timer = get_vtimer(); | 184 | S390_lowcore.last_update_timer = get_vtimer(); |
| 178 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; | 185 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; |
| 179 | 186 | ||
| 187 | /* Update MT utilization calculation */ | ||
| 188 | if (smp_cpu_mtid && | ||
| 189 | time_after64(jiffies_64, this_cpu_read(mt_scaling_jiffies))) | ||
| 190 | update_mt_scaling(); | ||
| 191 | |||
| 180 | system = S390_lowcore.system_timer - ti->system_timer; | 192 | system = S390_lowcore.system_timer - ti->system_timer; |
| 181 | S390_lowcore.steal_timer -= system; | 193 | S390_lowcore.steal_timer -= system; |
| 182 | ti->system_timer = S390_lowcore.system_timer; | 194 | ti->system_timer = S390_lowcore.system_timer; |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index c91eb941b444..0a67c40eece9 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
| @@ -63,6 +63,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
| 63 | { "exit_program_interruption", VCPU_STAT(exit_program_interruption) }, | 63 | { "exit_program_interruption", VCPU_STAT(exit_program_interruption) }, |
| 64 | { "exit_instr_and_program_int", VCPU_STAT(exit_instr_and_program) }, | 64 | { "exit_instr_and_program_int", VCPU_STAT(exit_instr_and_program) }, |
| 65 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, | 65 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, |
| 66 | { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll) }, | ||
| 66 | { "halt_wakeup", VCPU_STAT(halt_wakeup) }, | 67 | { "halt_wakeup", VCPU_STAT(halt_wakeup) }, |
| 67 | { "instruction_lctlg", VCPU_STAT(instruction_lctlg) }, | 68 | { "instruction_lctlg", VCPU_STAT(instruction_lctlg) }, |
| 68 | { "instruction_lctl", VCPU_STAT(instruction_lctl) }, | 69 | { "instruction_lctl", VCPU_STAT(instruction_lctl) }, |
| @@ -1574,7 +1575,7 @@ static void kvm_s390_vcpu_request(struct kvm_vcpu *vcpu) | |||
| 1574 | 1575 | ||
| 1575 | static void kvm_s390_vcpu_request_handled(struct kvm_vcpu *vcpu) | 1576 | static void kvm_s390_vcpu_request_handled(struct kvm_vcpu *vcpu) |
| 1576 | { | 1577 | { |
| 1577 | atomic_or(PROG_REQUEST, &vcpu->arch.sie_block->prog20); | 1578 | atomic_andnot(PROG_REQUEST, &vcpu->arch.sie_block->prog20); |
| 1578 | } | 1579 | } |
| 1579 | 1580 | ||
| 1580 | /* | 1581 | /* |
diff --git a/arch/s390/numa/mode_emu.c b/arch/s390/numa/mode_emu.c index 7de4e2f780d7..30b2698a28e2 100644 --- a/arch/s390/numa/mode_emu.c +++ b/arch/s390/numa/mode_emu.c | |||
| @@ -368,7 +368,7 @@ static void topology_add_core(struct toptree *core) | |||
| 368 | cpumask_copy(&top->thread_mask, &core->mask); | 368 | cpumask_copy(&top->thread_mask, &core->mask); |
| 369 | cpumask_copy(&top->core_mask, &core_mc(core)->mask); | 369 | cpumask_copy(&top->core_mask, &core_mc(core)->mask); |
| 370 | cpumask_copy(&top->book_mask, &core_book(core)->mask); | 370 | cpumask_copy(&top->book_mask, &core_book(core)->mask); |
| 371 | cpumask_set_cpu(cpu, node_to_cpumask_map[core_node(core)->id]); | 371 | cpumask_set_cpu(cpu, &node_to_cpumask_map[core_node(core)->id]); |
| 372 | top->node_id = core_node(core)->id; | 372 | top->node_id = core_node(core)->id; |
| 373 | } | 373 | } |
| 374 | } | 374 | } |
| @@ -383,7 +383,7 @@ static void toptree_to_topology(struct toptree *numa) | |||
| 383 | 383 | ||
| 384 | /* Clear all node masks */ | 384 | /* Clear all node masks */ |
| 385 | for (i = 0; i < MAX_NUMNODES; i++) | 385 | for (i = 0; i < MAX_NUMNODES; i++) |
| 386 | cpumask_clear(node_to_cpumask_map[i]); | 386 | cpumask_clear(&node_to_cpumask_map[i]); |
| 387 | 387 | ||
| 388 | /* Rebuild all masks */ | 388 | /* Rebuild all masks */ |
| 389 | toptree_for_each(core, numa, CORE) | 389 | toptree_for_each(core, numa, CORE) |
diff --git a/arch/s390/numa/numa.c b/arch/s390/numa/numa.c index 09b1d2355bd9..43f32ce60aa3 100644 --- a/arch/s390/numa/numa.c +++ b/arch/s390/numa/numa.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | pg_data_t *node_data[MAX_NUMNODES]; | 23 | pg_data_t *node_data[MAX_NUMNODES]; |
| 24 | EXPORT_SYMBOL(node_data); | 24 | EXPORT_SYMBOL(node_data); |
| 25 | 25 | ||
| 26 | cpumask_var_t node_to_cpumask_map[MAX_NUMNODES]; | 26 | cpumask_t node_to_cpumask_map[MAX_NUMNODES]; |
| 27 | EXPORT_SYMBOL(node_to_cpumask_map); | 27 | EXPORT_SYMBOL(node_to_cpumask_map); |
| 28 | 28 | ||
| 29 | const struct numa_mode numa_mode_plain = { | 29 | const struct numa_mode numa_mode_plain = { |
| @@ -144,7 +144,7 @@ void __init numa_setup(void) | |||
| 144 | static int __init numa_init_early(void) | 144 | static int __init numa_init_early(void) |
| 145 | { | 145 | { |
| 146 | /* Attach all possible CPUs to node 0 for now. */ | 146 | /* Attach all possible CPUs to node 0 for now. */ |
| 147 | cpumask_copy(node_to_cpumask_map[0], cpu_possible_mask); | 147 | cpumask_copy(&node_to_cpumask_map[0], cpu_possible_mask); |
| 148 | return 0; | 148 | return 0; |
| 149 | } | 149 | } |
| 150 | early_initcall(numa_init_early); | 150 | early_initcall(numa_init_early); |
diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index 92ffe397b893..a05218ff3fe4 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild | |||
| @@ -13,3 +13,4 @@ generic-y += sections.h | |||
| 13 | generic-y += trace_clock.h | 13 | generic-y += trace_clock.h |
| 14 | generic-y += xor.h | 14 | generic-y += xor.h |
| 15 | generic-y += serial.h | 15 | generic-y += serial.h |
| 16 | generic-y += word-at-a-time.h | ||
diff --git a/arch/sh/boards/mach-se/7343/irq.c b/arch/sh/boards/mach-se/7343/irq.c index 6f97a8f0d0d6..6129aef6db76 100644 --- a/arch/sh/boards/mach-se/7343/irq.c +++ b/arch/sh/boards/mach-se/7343/irq.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | static void __iomem *se7343_irq_regs; | 29 | static void __iomem *se7343_irq_regs; |
| 30 | struct irq_domain *se7343_irq_domain; | 30 | struct irq_domain *se7343_irq_domain; |
| 31 | 31 | ||
| 32 | static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc) | 32 | static void se7343_irq_demux(struct irq_desc *desc) |
| 33 | { | 33 | { |
| 34 | struct irq_data *data = irq_desc_get_irq_data(desc); | 34 | struct irq_data *data = irq_desc_get_irq_data(desc); |
| 35 | struct irq_chip *chip = irq_data_get_irq_chip(data); | 35 | struct irq_chip *chip = irq_data_get_irq_chip(data); |
diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c index 60aebd14ccf8..24c74a88290c 100644 --- a/arch/sh/boards/mach-se/7722/irq.c +++ b/arch/sh/boards/mach-se/7722/irq.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | static void __iomem *se7722_irq_regs; | 28 | static void __iomem *se7722_irq_regs; |
| 29 | struct irq_domain *se7722_irq_domain; | 29 | struct irq_domain *se7722_irq_domain; |
| 30 | 30 | ||
| 31 | static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc) | 31 | static void se7722_irq_demux(struct irq_desc *desc) |
| 32 | { | 32 | { |
| 33 | struct irq_data *data = irq_desc_get_irq_data(desc); | 33 | struct irq_data *data = irq_desc_get_irq_data(desc); |
| 34 | struct irq_chip *chip = irq_data_get_irq_chip(data); | 34 | struct irq_chip *chip = irq_data_get_irq_chip(data); |
diff --git a/arch/sh/boards/mach-se/7724/irq.c b/arch/sh/boards/mach-se/7724/irq.c index 9f2033898652..64e681e66c57 100644 --- a/arch/sh/boards/mach-se/7724/irq.c +++ b/arch/sh/boards/mach-se/7724/irq.c | |||
| @@ -92,7 +92,7 @@ static struct irq_chip se7724_irq_chip __read_mostly = { | |||
| 92 | .irq_unmask = enable_se7724_irq, | 92 | .irq_unmask = enable_se7724_irq, |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | static void se7724_irq_demux(unsigned int __irq, struct irq_desc *desc) | 95 | static void se7724_irq_demux(struct irq_desc *desc) |
| 96 | { | 96 | { |
| 97 | unsigned int irq = irq_desc_get_irq(desc); | 97 | unsigned int irq = irq_desc_get_irq(desc); |
| 98 | struct fpga_irq set = get_fpga_irq(irq); | 98 | struct fpga_irq set = get_fpga_irq(irq); |
diff --git a/arch/sh/boards/mach-x3proto/gpio.c b/arch/sh/boards/mach-x3proto/gpio.c index 24555c364d5b..1fb2cbee25f2 100644 --- a/arch/sh/boards/mach-x3proto/gpio.c +++ b/arch/sh/boards/mach-x3proto/gpio.c | |||
| @@ -60,7 +60,7 @@ static int x3proto_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) | |||
| 60 | return virq; | 60 | return virq; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | static void x3proto_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | 63 | static void x3proto_gpio_irq_handler(struct irq_desc *desc) |
| 64 | { | 64 | { |
| 65 | struct irq_data *data = irq_desc_get_irq_data(desc); | 65 | struct irq_data *data = irq_desc_get_irq_data(desc); |
| 66 | struct irq_chip *chip = irq_data_get_irq_chip(data); | 66 | struct irq_chip *chip = irq_data_get_irq_chip(data); |
diff --git a/arch/sh/cchips/hd6446x/hd64461.c b/arch/sh/cchips/hd6446x/hd64461.c index e9735616bdc8..8180092502f7 100644 --- a/arch/sh/cchips/hd6446x/hd64461.c +++ b/arch/sh/cchips/hd6446x/hd64461.c | |||
| @@ -56,7 +56,7 @@ static struct irq_chip hd64461_irq_chip = { | |||
| 56 | .irq_unmask = hd64461_unmask_irq, | 56 | .irq_unmask = hd64461_unmask_irq, |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | static void hd64461_irq_demux(unsigned int irq, struct irq_desc *desc) | 59 | static void hd64461_irq_demux(struct irq_desc *desc) |
| 60 | { | 60 | { |
| 61 | unsigned short intv = __raw_readw(HD64461_NIRR); | 61 | unsigned short intv = __raw_readw(HD64461_NIRR); |
| 62 | unsigned int ext_irq = HD64461_IRQBASE; | 62 | unsigned int ext_irq = HD64461_IRQBASE; |
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index fe20d14ae051..ceb5201a30ed 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h | |||
| @@ -59,6 +59,7 @@ pages_do_alias(unsigned long addr1, unsigned long addr2) | |||
| 59 | 59 | ||
| 60 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) | 60 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
| 61 | extern void copy_page(void *to, void *from); | 61 | extern void copy_page(void *to, void *from); |
| 62 | #define copy_user_page(to, from, vaddr, pg) __copy_user(to, from, PAGE_SIZE) | ||
| 62 | 63 | ||
| 63 | struct page; | 64 | struct page; |
| 64 | struct vm_area_struct; | 65 | struct vm_area_struct; |
diff --git a/arch/sparc/crypto/aes_glue.c b/arch/sparc/crypto/aes_glue.c index 2e48eb8813ff..c90930de76ba 100644 --- a/arch/sparc/crypto/aes_glue.c +++ b/arch/sparc/crypto/aes_glue.c | |||
| @@ -433,6 +433,7 @@ static struct crypto_alg algs[] = { { | |||
| 433 | .blkcipher = { | 433 | .blkcipher = { |
| 434 | .min_keysize = AES_MIN_KEY_SIZE, | 434 | .min_keysize = AES_MIN_KEY_SIZE, |
| 435 | .max_keysize = AES_MAX_KEY_SIZE, | 435 | .max_keysize = AES_MAX_KEY_SIZE, |
| 436 | .ivsize = AES_BLOCK_SIZE, | ||
| 436 | .setkey = aes_set_key, | 437 | .setkey = aes_set_key, |
| 437 | .encrypt = cbc_encrypt, | 438 | .encrypt = cbc_encrypt, |
| 438 | .decrypt = cbc_decrypt, | 439 | .decrypt = cbc_decrypt, |
| @@ -452,6 +453,7 @@ static struct crypto_alg algs[] = { { | |||
| 452 | .blkcipher = { | 453 | .blkcipher = { |
| 453 | .min_keysize = AES_MIN_KEY_SIZE, | 454 | .min_keysize = AES_MIN_KEY_SIZE, |
| 454 | .max_keysize = AES_MAX_KEY_SIZE, | 455 | .max_keysize = AES_MAX_KEY_SIZE, |
| 456 | .ivsize = AES_BLOCK_SIZE, | ||
| 455 | .setkey = aes_set_key, | 457 | .setkey = aes_set_key, |
| 456 | .encrypt = ctr_crypt, | 458 | .encrypt = ctr_crypt, |
| 457 | .decrypt = ctr_crypt, | 459 | .decrypt = ctr_crypt, |
diff --git a/arch/sparc/crypto/camellia_glue.c b/arch/sparc/crypto/camellia_glue.c index 6bf2479a12fb..561a84d93cf6 100644 --- a/arch/sparc/crypto/camellia_glue.c +++ b/arch/sparc/crypto/camellia_glue.c | |||
| @@ -274,6 +274,7 @@ static struct crypto_alg algs[] = { { | |||
| 274 | .blkcipher = { | 274 | .blkcipher = { |
| 275 | .min_keysize = CAMELLIA_MIN_KEY_SIZE, | 275 | .min_keysize = CAMELLIA_MIN_KEY_SIZE, |
| 276 | .max_keysize = CAMELLIA_MAX_KEY_SIZE, | 276 | .max_keysize = CAMELLIA_MAX_KEY_SIZE, |
| 277 | .ivsize = CAMELLIA_BLOCK_SIZE, | ||
| 277 | .setkey = camellia_set_key, | 278 | .setkey = camellia_set_key, |
| 278 | .encrypt = cbc_encrypt, | 279 | .encrypt = cbc_encrypt, |
| 279 | .decrypt = cbc_decrypt, | 280 | .decrypt = cbc_decrypt, |
diff --git a/arch/sparc/crypto/des_glue.c b/arch/sparc/crypto/des_glue.c index dd6a34fa6e19..61af794aa2d3 100644 --- a/arch/sparc/crypto/des_glue.c +++ b/arch/sparc/crypto/des_glue.c | |||
| @@ -429,6 +429,7 @@ static struct crypto_alg algs[] = { { | |||
| 429 | .blkcipher = { | 429 | .blkcipher = { |
| 430 | .min_keysize = DES_KEY_SIZE, | 430 | .min_keysize = DES_KEY_SIZE, |
| 431 | .max_keysize = DES_KEY_SIZE, | 431 | .max_keysize = DES_KEY_SIZE, |
| 432 | .ivsize = DES_BLOCK_SIZE, | ||
| 432 | .setkey = des_set_key, | 433 | .setkey = des_set_key, |
| 433 | .encrypt = cbc_encrypt, | 434 | .encrypt = cbc_encrypt, |
| 434 | .decrypt = cbc_decrypt, | 435 | .decrypt = cbc_decrypt, |
| @@ -485,6 +486,7 @@ static struct crypto_alg algs[] = { { | |||
| 485 | .blkcipher = { | 486 | .blkcipher = { |
| 486 | .min_keysize = DES3_EDE_KEY_SIZE, | 487 | .min_keysize = DES3_EDE_KEY_SIZE, |
| 487 | .max_keysize = DES3_EDE_KEY_SIZE, | 488 | .max_keysize = DES3_EDE_KEY_SIZE, |
| 489 | .ivsize = DES3_EDE_BLOCK_SIZE, | ||
| 488 | .setkey = des3_ede_set_key, | 490 | .setkey = des3_ede_set_key, |
| 489 | .encrypt = cbc3_encrypt, | 491 | .encrypt = cbc3_encrypt, |
| 490 | .decrypt = cbc3_decrypt, | 492 | .decrypt = cbc3_decrypt, |
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 0299f052a2ef..42efcf85f721 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
| @@ -53,7 +53,7 @@ static inline unsigned int leon_eirq_get(int cpu) | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | /* Handle one or multiple IRQs from the extended interrupt controller */ | 55 | /* Handle one or multiple IRQs from the extended interrupt controller */ |
| 56 | static void leon_handle_ext_irq(unsigned int irq, struct irq_desc *desc) | 56 | static void leon_handle_ext_irq(struct irq_desc *desc) |
| 57 | { | 57 | { |
| 58 | unsigned int eirq; | 58 | unsigned int eirq; |
| 59 | struct irq_bucket *p; | 59 | struct irq_bucket *p; |
diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c index 3382f7b3eeef..1e77128a8f88 100644 --- a/arch/sparc/kernel/leon_pci_grpci1.c +++ b/arch/sparc/kernel/leon_pci_grpci1.c | |||
| @@ -357,7 +357,7 @@ static struct irq_chip grpci1_irq = { | |||
| 357 | }; | 357 | }; |
| 358 | 358 | ||
| 359 | /* Handle one or multiple IRQs from the PCI core */ | 359 | /* Handle one or multiple IRQs from the PCI core */ |
| 360 | static void grpci1_pci_flow_irq(unsigned int irq, struct irq_desc *desc) | 360 | static void grpci1_pci_flow_irq(struct irq_desc *desc) |
| 361 | { | 361 | { |
| 362 | struct grpci1_priv *priv = grpci1priv; | 362 | struct grpci1_priv *priv = grpci1priv; |
| 363 | int i, ack = 0; | 363 | int i, ack = 0; |
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c index 814fb1729b12..f727c4de1316 100644 --- a/arch/sparc/kernel/leon_pci_grpci2.c +++ b/arch/sparc/kernel/leon_pci_grpci2.c | |||
| @@ -498,7 +498,7 @@ static struct irq_chip grpci2_irq = { | |||
| 498 | }; | 498 | }; |
| 499 | 499 | ||
| 500 | /* Handle one or multiple IRQs from the PCI core */ | 500 | /* Handle one or multiple IRQs from the PCI core */ |
| 501 | static void grpci2_pci_flow_irq(unsigned int irq, struct irq_desc *desc) | 501 | static void grpci2_pci_flow_irq(struct irq_desc *desc) |
| 502 | { | 502 | { |
| 503 | struct grpci2_priv *priv = grpci2priv; | 503 | struct grpci2_priv *priv = grpci2priv; |
| 504 | int i, ack = 0; | 504 | int i, ack = 0; |
diff --git a/arch/tile/gxio/mpipe.c b/arch/tile/gxio/mpipe.c index ee186e13dfe6..f102048d9c0e 100644 --- a/arch/tile/gxio/mpipe.c +++ b/arch/tile/gxio/mpipe.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
| 20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
| 21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
| 22 | #include <linux/string.h> | ||
| 22 | 23 | ||
| 23 | #include <gxio/iorpc_globals.h> | 24 | #include <gxio/iorpc_globals.h> |
| 24 | #include <gxio/iorpc_mpipe.h> | 25 | #include <gxio/iorpc_mpipe.h> |
| @@ -29,32 +30,6 @@ | |||
| 29 | /* HACK: Avoid pointless "shadow" warnings. */ | 30 | /* HACK: Avoid pointless "shadow" warnings. */ |
| 30 | #define link link_shadow | 31 | #define link link_shadow |
| 31 | 32 | ||
| 32 | /** | ||
| 33 | * strscpy - Copy a C-string into a sized buffer, but only if it fits | ||
| 34 | * @dest: Where to copy the string to | ||
| 35 | * @src: Where to copy the string from | ||
| 36 | * @size: size of destination buffer | ||
| 37 | * | ||
| 38 | * Use this routine to avoid copying too-long strings. | ||
| 39 | * The routine returns the total number of bytes copied | ||
| 40 | * (including the trailing NUL) or zero if the buffer wasn't | ||
| 41 | * big enough. To ensure that programmers pay attention | ||
| 42 | * to the return code, the destination has a single NUL | ||
| 43 | * written at the front (if size is non-zero) when the | ||
| 44 | * buffer is not big enough. | ||
| 45 | */ | ||
| 46 | static size_t strscpy(char *dest, const char *src, size_t size) | ||
| 47 | { | ||
| 48 | size_t len = strnlen(src, size) + 1; | ||
| 49 | if (len > size) { | ||
| 50 | if (size) | ||
| 51 | dest[0] = '\0'; | ||
| 52 | return 0; | ||
| 53 | } | ||
| 54 | memcpy(dest, src, len); | ||
| 55 | return len; | ||
| 56 | } | ||
| 57 | |||
| 58 | int gxio_mpipe_init(gxio_mpipe_context_t *context, unsigned int mpipe_index) | 33 | int gxio_mpipe_init(gxio_mpipe_context_t *context, unsigned int mpipe_index) |
| 59 | { | 34 | { |
| 60 | char file[32]; | 35 | char file[32]; |
| @@ -540,7 +515,7 @@ int gxio_mpipe_link_instance(const char *link_name) | |||
| 540 | if (!context) | 515 | if (!context) |
| 541 | return GXIO_ERR_NO_DEVICE; | 516 | return GXIO_ERR_NO_DEVICE; |
| 542 | 517 | ||
| 543 | if (strscpy(name.name, link_name, sizeof(name.name)) == 0) | 518 | if (strscpy(name.name, link_name, sizeof(name.name)) < 0) |
| 544 | return GXIO_ERR_NO_DEVICE; | 519 | return GXIO_ERR_NO_DEVICE; |
| 545 | 520 | ||
| 546 | return gxio_mpipe_info_instance_aux(context, name); | 521 | return gxio_mpipe_info_instance_aux(context, name); |
| @@ -559,7 +534,7 @@ int gxio_mpipe_link_enumerate_mac(int idx, char *link_name, uint8_t *link_mac) | |||
| 559 | 534 | ||
| 560 | rv = gxio_mpipe_info_enumerate_aux(context, idx, &name, &mac); | 535 | rv = gxio_mpipe_info_enumerate_aux(context, idx, &name, &mac); |
| 561 | if (rv >= 0) { | 536 | if (rv >= 0) { |
| 562 | if (strscpy(link_name, name.name, sizeof(name.name)) == 0) | 537 | if (strscpy(link_name, name.name, sizeof(name.name)) < 0) |
| 563 | return GXIO_ERR_INVAL_MEMORY_SIZE; | 538 | return GXIO_ERR_INVAL_MEMORY_SIZE; |
| 564 | memcpy(link_mac, mac.mac, sizeof(mac.mac)); | 539 | memcpy(link_mac, mac.mac, sizeof(mac.mac)); |
| 565 | } | 540 | } |
| @@ -576,7 +551,7 @@ int gxio_mpipe_link_open(gxio_mpipe_link_t *link, | |||
| 576 | _gxio_mpipe_link_name_t name; | 551 | _gxio_mpipe_link_name_t name; |
| 577 | int rv; | 552 | int rv; |
| 578 | 553 | ||
| 579 | if (strscpy(name.name, link_name, sizeof(name.name)) == 0) | 554 | if (strscpy(name.name, link_name, sizeof(name.name)) < 0) |
| 580 | return GXIO_ERR_NO_DEVICE; | 555 | return GXIO_ERR_NO_DEVICE; |
| 581 | 556 | ||
| 582 | rv = gxio_mpipe_link_open_aux(context, name, flags); | 557 | rv = gxio_mpipe_link_open_aux(context, name, flags); |
diff --git a/arch/tile/include/asm/word-at-a-time.h b/arch/tile/include/asm/word-at-a-time.h index 9e5ce0d7b292..b66a693c2c34 100644 --- a/arch/tile/include/asm/word-at-a-time.h +++ b/arch/tile/include/asm/word-at-a-time.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | struct word_at_a_time { /* unused */ }; | 6 | struct word_at_a_time { /* unused */ }; |
| 7 | #define WORD_AT_A_TIME_CONSTANTS {} | 7 | #define WORD_AT_A_TIME_CONSTANTS {} |
| 8 | 8 | ||
| 9 | /* Generate 0x01 byte values for non-zero bytes using a SIMD instruction. */ | 9 | /* Generate 0x01 byte values for zero bytes using a SIMD instruction. */ |
| 10 | static inline unsigned long has_zero(unsigned long val, unsigned long *data, | 10 | static inline unsigned long has_zero(unsigned long val, unsigned long *data, |
| 11 | const struct word_at_a_time *c) | 11 | const struct word_at_a_time *c) |
| 12 | { | 12 | { |
| @@ -33,4 +33,10 @@ static inline long find_zero(unsigned long mask) | |||
| 33 | #endif | 33 | #endif |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | #ifdef __BIG_ENDIAN | ||
| 37 | #define zero_bytemask(mask) (~1ul << (63 - __builtin_clzl(mask))) | ||
| 38 | #else | ||
| 39 | #define zero_bytemask(mask) ((2ul << __builtin_ctzl(mask)) - 1) | ||
| 40 | #endif | ||
| 41 | |||
| 36 | #endif /* _ASM_WORD_AT_A_TIME_H */ | 42 | #endif /* _ASM_WORD_AT_A_TIME_H */ |
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c index b3f73fd764a3..4c017d0d2de8 100644 --- a/arch/tile/kernel/pci_gx.c +++ b/arch/tile/kernel/pci_gx.c | |||
| @@ -304,17 +304,16 @@ static struct irq_chip tilegx_legacy_irq_chip = { | |||
| 304 | * to Linux which just calls handle_level_irq() after clearing the | 304 | * to Linux which just calls handle_level_irq() after clearing the |
| 305 | * MAC INTx Assert status bit associated with this interrupt. | 305 | * MAC INTx Assert status bit associated with this interrupt. |
| 306 | */ | 306 | */ |
| 307 | static void trio_handle_level_irq(unsigned int __irq, struct irq_desc *desc) | 307 | static void trio_handle_level_irq(struct irq_desc *desc) |
| 308 | { | 308 | { |
| 309 | struct pci_controller *controller = irq_desc_get_handler_data(desc); | 309 | struct pci_controller *controller = irq_desc_get_handler_data(desc); |
| 310 | gxio_trio_context_t *trio_context = controller->trio; | 310 | gxio_trio_context_t *trio_context = controller->trio; |
| 311 | uint64_t intx = (uint64_t)irq_desc_get_chip_data(desc); | 311 | uint64_t intx = (uint64_t)irq_desc_get_chip_data(desc); |
| 312 | unsigned int irq = irq_desc_get_irq(desc); | ||
| 313 | int mac = controller->mac; | 312 | int mac = controller->mac; |
| 314 | unsigned int reg_offset; | 313 | unsigned int reg_offset; |
| 315 | uint64_t level_mask; | 314 | uint64_t level_mask; |
| 316 | 315 | ||
| 317 | handle_level_irq(irq, desc); | 316 | handle_level_irq(desc); |
| 318 | 317 | ||
| 319 | /* | 318 | /* |
| 320 | * Clear the INTx Level status, otherwise future interrupts are | 319 | * Clear the INTx Level status, otherwise future interrupts are |
diff --git a/arch/tile/kernel/usb.c b/arch/tile/kernel/usb.c index f0da5a237e94..9f1e05e12255 100644 --- a/arch/tile/kernel/usb.c +++ b/arch/tile/kernel/usb.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
| 23 | #include <linux/usb/tilegx.h> | 23 | #include <linux/usb/tilegx.h> |
| 24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
| 25 | #include <linux/module.h> | ||
| 25 | #include <linux/types.h> | 26 | #include <linux/types.h> |
| 26 | 27 | ||
| 27 | static u64 ehci_dmamask = DMA_BIT_MASK(32); | 28 | static u64 ehci_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/um/Makefile b/arch/um/Makefile index 098ab3333e7c..e3abe6f3156d 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
| @@ -70,8 +70,8 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE) | |||
| 70 | 70 | ||
| 71 | USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ | 71 | USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ |
| 72 | $(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \ | 72 | $(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \ |
| 73 | -D_FILE_OFFSET_BITS=64 -idirafter include \ | 73 | -D_FILE_OFFSET_BITS=64 -idirafter $(srctree)/include \ |
| 74 | -D__KERNEL__ -D__UM_HOST__ | 74 | -idirafter $(obj)/include -D__KERNEL__ -D__UM_HOST__ |
| 75 | 75 | ||
| 76 | #This will adjust *FLAGS accordingly to the platform. | 76 | #This will adjust *FLAGS accordingly to the platform. |
| 77 | include $(ARCH_DIR)/Makefile-os-$(OS) | 77 | include $(ARCH_DIR)/Makefile-os-$(OS) |
diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index 149ec55f9c46..904f3ebf4220 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild | |||
| @@ -25,4 +25,5 @@ generic-y += preempt.h | |||
| 25 | generic-y += switch_to.h | 25 | generic-y += switch_to.h |
| 26 | generic-y += topology.h | 26 | generic-y += topology.h |
| 27 | generic-y += trace_clock.h | 27 | generic-y += trace_clock.h |
| 28 | generic-y += word-at-a-time.h | ||
| 28 | generic-y += xor.h | 29 | generic-y += xor.h |
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index d8a9fce6ee2e..98783dd0fa2e 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
| @@ -220,7 +220,7 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, | |||
| 220 | show_regs(container_of(regs, struct pt_regs, regs)); | 220 | show_regs(container_of(regs, struct pt_regs, regs)); |
| 221 | panic("Segfault with no mm"); | 221 | panic("Segfault with no mm"); |
| 222 | } | 222 | } |
| 223 | else if (!is_user && address < TASK_SIZE) { | 223 | else if (!is_user && address > PAGE_SIZE && address < TASK_SIZE) { |
| 224 | show_regs(container_of(regs, struct pt_regs, regs)); | 224 | show_regs(container_of(regs, struct pt_regs, regs)); |
| 225 | panic("Kernel tried to access user memory at addr 0x%lx, ip 0x%lx", | 225 | panic("Kernel tried to access user memory at addr 0x%lx, ip 0x%lx", |
| 226 | address, ip); | 226 | address, ip); |
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index e3ee4a51ef63..3f02d4232812 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c | |||
| @@ -96,7 +96,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) | |||
| 96 | "ret = %d\n", -n); | 96 | "ret = %d\n", -n); |
| 97 | ret = n; | 97 | ret = n; |
| 98 | } | 98 | } |
| 99 | CATCH_EINTR(waitpid(pid, NULL, __WCLONE)); | 99 | CATCH_EINTR(waitpid(pid, NULL, __WALL)); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | out_free2: | 102 | out_free2: |
| @@ -129,7 +129,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, | |||
| 129 | return err; | 129 | return err; |
| 130 | } | 130 | } |
| 131 | if (stack_out == NULL) { | 131 | if (stack_out == NULL) { |
| 132 | CATCH_EINTR(pid = waitpid(pid, &status, __WCLONE)); | 132 | CATCH_EINTR(pid = waitpid(pid, &status, __WALL)); |
| 133 | if (pid < 0) { | 133 | if (pid < 0) { |
| 134 | err = -errno; | 134 | err = -errno; |
| 135 | printk(UM_KERN_ERR "run_helper_thread - wait failed, " | 135 | printk(UM_KERN_ERR "run_helper_thread - wait failed, " |
| @@ -148,7 +148,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, | |||
| 148 | int helper_wait(int pid) | 148 | int helper_wait(int pid) |
| 149 | { | 149 | { |
| 150 | int ret, status; | 150 | int ret, status; |
| 151 | int wflags = __WCLONE; | 151 | int wflags = __WALL; |
| 152 | 152 | ||
| 153 | CATCH_EINTR(ret = waitpid(pid, &status, wflags)); | 153 | CATCH_EINTR(ret = waitpid(pid, &status, wflags)); |
| 154 | if (ret < 0) { | 154 | if (ret < 0) { |
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 1fc7a286dc6f..256c45b3ae34 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild | |||
| @@ -62,4 +62,5 @@ generic-y += ucontext.h | |||
| 62 | generic-y += unaligned.h | 62 | generic-y += unaligned.h |
| 63 | generic-y += user.h | 63 | generic-y += user.h |
| 64 | generic-y += vga.h | 64 | generic-y += vga.h |
| 65 | generic-y += word-at-a-time.h | ||
| 65 | generic-y += xor.h | 66 | generic-y += xor.h |
diff --git a/arch/unicore32/kernel/irq.c b/arch/unicore32/kernel/irq.c index c53729d92e8d..eb1fd0030359 100644 --- a/arch/unicore32/kernel/irq.c +++ b/arch/unicore32/kernel/irq.c | |||
| @@ -112,7 +112,7 @@ static struct irq_chip puv3_low_gpio_chip = { | |||
| 112 | * irq_controller_lock held, and IRQs disabled. Decode the IRQ | 112 | * irq_controller_lock held, and IRQs disabled. Decode the IRQ |
| 113 | * and call the handler. | 113 | * and call the handler. |
| 114 | */ | 114 | */ |
| 115 | static void puv3_gpio_handler(unsigned int __irq, struct irq_desc *desc) | 115 | static void puv3_gpio_handler(struct irq_desc *desc) |
| 116 | { | 116 | { |
| 117 | unsigned int mask, irq; | 117 | unsigned int mask, irq; |
| 118 | 118 | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7aef2d52daa0..96d058a87100 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -1006,7 +1006,7 @@ config X86_THERMAL_VECTOR | |||
| 1006 | depends on X86_MCE_INTEL | 1006 | depends on X86_MCE_INTEL |
| 1007 | 1007 | ||
| 1008 | config X86_LEGACY_VM86 | 1008 | config X86_LEGACY_VM86 |
| 1009 | bool "Legacy VM86 support (obsolete)" | 1009 | bool "Legacy VM86 support" |
| 1010 | default n | 1010 | default n |
| 1011 | depends on X86_32 | 1011 | depends on X86_32 |
| 1012 | ---help--- | 1012 | ---help--- |
| @@ -1018,19 +1018,20 @@ config X86_LEGACY_VM86 | |||
| 1018 | available to accelerate real mode DOS programs. However, any | 1018 | available to accelerate real mode DOS programs. However, any |
| 1019 | recent version of DOSEMU, X, or vbetool should be fully | 1019 | recent version of DOSEMU, X, or vbetool should be fully |
| 1020 | functional even without kernel VM86 support, as they will all | 1020 | functional even without kernel VM86 support, as they will all |
| 1021 | fall back to (pretty well performing) software emulation. | 1021 | fall back to software emulation. Nevertheless, if you are using |
| 1022 | a 16-bit DOS program where 16-bit performance matters, vm86 | ||
| 1023 | mode might be faster than emulation and you might want to | ||
| 1024 | enable this option. | ||
| 1022 | 1025 | ||
| 1023 | Anything that works on a 64-bit kernel is unlikely to need | 1026 | Note that any app that works on a 64-bit kernel is unlikely to |
| 1024 | this option, as 64-bit kernels don't, and can't, support V8086 | 1027 | need this option, as 64-bit kernels don't, and can't, support |
| 1025 | mode. This option is also unrelated to 16-bit protected mode | 1028 | V8086 mode. This option is also unrelated to 16-bit protected |
| 1026 | and is not needed to run most 16-bit programs under Wine. | 1029 | mode and is not needed to run most 16-bit programs under Wine. |
| 1027 | 1030 | ||
| 1028 | Enabling this option adds considerable attack surface to the | 1031 | Enabling this option increases the complexity of the kernel |
| 1029 | kernel and slows down system calls and exception handling. | 1032 | and slows down exception handling a tiny bit. |
| 1030 | 1033 | ||
| 1031 | Unless you use very old userspace or need the last drop of | 1034 | If unsure, say N here. |
| 1032 | performance in your real mode DOS games and can't use KVM, | ||
| 1033 | say N here. | ||
| 1034 | 1035 | ||
| 1035 | config VM86 | 1036 | config VM86 |
| 1036 | bool | 1037 | bool |
| @@ -1307,6 +1308,7 @@ config HIGHMEM | |||
| 1307 | config X86_PAE | 1308 | config X86_PAE |
| 1308 | bool "PAE (Physical Address Extension) Support" | 1309 | bool "PAE (Physical Address Extension) Support" |
| 1309 | depends on X86_32 && !HIGHMEM4G | 1310 | depends on X86_32 && !HIGHMEM4G |
| 1311 | select SWIOTLB | ||
| 1310 | ---help--- | 1312 | ---help--- |
| 1311 | PAE is required for NX support, and furthermore enables | 1313 | PAE is required for NX support, and furthermore enables |
| 1312 | larger swapspace support for non-overcommit purposes. It | 1314 | larger swapspace support for non-overcommit purposes. It |
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index ee1b6d346b98..db51c1f27446 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
| @@ -667,6 +667,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto, | |||
| 667 | bool conout_found = false; | 667 | bool conout_found = false; |
| 668 | void *dummy = NULL; | 668 | void *dummy = NULL; |
| 669 | u32 h = handles[i]; | 669 | u32 h = handles[i]; |
| 670 | u32 current_fb_base; | ||
| 670 | 671 | ||
| 671 | status = efi_call_early(handle_protocol, h, | 672 | status = efi_call_early(handle_protocol, h, |
| 672 | proto, (void **)&gop32); | 673 | proto, (void **)&gop32); |
| @@ -678,7 +679,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto, | |||
| 678 | if (status == EFI_SUCCESS) | 679 | if (status == EFI_SUCCESS) |
| 679 | conout_found = true; | 680 | conout_found = true; |
| 680 | 681 | ||
| 681 | status = __gop_query32(gop32, &info, &size, &fb_base); | 682 | status = __gop_query32(gop32, &info, &size, ¤t_fb_base); |
| 682 | if (status == EFI_SUCCESS && (!first_gop || conout_found)) { | 683 | if (status == EFI_SUCCESS && (!first_gop || conout_found)) { |
| 683 | /* | 684 | /* |
| 684 | * Systems that use the UEFI Console Splitter may | 685 | * Systems that use the UEFI Console Splitter may |
| @@ -692,6 +693,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto, | |||
| 692 | pixel_format = info->pixel_format; | 693 | pixel_format = info->pixel_format; |
| 693 | pixel_info = info->pixel_information; | 694 | pixel_info = info->pixel_information; |
| 694 | pixels_per_scan_line = info->pixels_per_scan_line; | 695 | pixels_per_scan_line = info->pixels_per_scan_line; |
| 696 | fb_base = current_fb_base; | ||
| 695 | 697 | ||
| 696 | /* | 698 | /* |
| 697 | * Once we've found a GOP supporting ConOut, | 699 | * Once we've found a GOP supporting ConOut, |
| @@ -770,6 +772,7 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto, | |||
| 770 | bool conout_found = false; | 772 | bool conout_found = false; |
| 771 | void *dummy = NULL; | 773 | void *dummy = NULL; |
| 772 | u64 h = handles[i]; | 774 | u64 h = handles[i]; |
| 775 | u32 current_fb_base; | ||
| 773 | 776 | ||
| 774 | status = efi_call_early(handle_protocol, h, | 777 | status = efi_call_early(handle_protocol, h, |
| 775 | proto, (void **)&gop64); | 778 | proto, (void **)&gop64); |
| @@ -781,7 +784,7 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto, | |||
| 781 | if (status == EFI_SUCCESS) | 784 | if (status == EFI_SUCCESS) |
| 782 | conout_found = true; | 785 | conout_found = true; |
| 783 | 786 | ||
| 784 | status = __gop_query64(gop64, &info, &size, &fb_base); | 787 | status = __gop_query64(gop64, &info, &size, ¤t_fb_base); |
| 785 | if (status == EFI_SUCCESS && (!first_gop || conout_found)) { | 788 | if (status == EFI_SUCCESS && (!first_gop || conout_found)) { |
| 786 | /* | 789 | /* |
| 787 | * Systems that use the UEFI Console Splitter may | 790 | * Systems that use the UEFI Console Splitter may |
| @@ -795,6 +798,7 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto, | |||
| 795 | pixel_format = info->pixel_format; | 798 | pixel_format = info->pixel_format; |
| 796 | pixel_info = info->pixel_information; | 799 | pixel_info = info->pixel_information; |
| 797 | pixels_per_scan_line = info->pixels_per_scan_line; | 800 | pixels_per_scan_line = info->pixels_per_scan_line; |
| 801 | fb_base = current_fb_base; | ||
| 798 | 802 | ||
| 799 | /* | 803 | /* |
| 800 | * Once we've found a GOP supporting ConOut, | 804 | * Once we've found a GOP supporting ConOut, |
diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c index 80a0e4389c9a..bacaa13acac5 100644 --- a/arch/x86/crypto/camellia_aesni_avx_glue.c +++ b/arch/x86/crypto/camellia_aesni_avx_glue.c | |||
| @@ -554,6 +554,11 @@ static int __init camellia_aesni_init(void) | |||
| 554 | { | 554 | { |
| 555 | const char *feature_name; | 555 | const char *feature_name; |
| 556 | 556 | ||
| 557 | if (!cpu_has_avx || !cpu_has_aes || !cpu_has_osxsave) { | ||
| 558 | pr_info("AVX or AES-NI instructions are not detected.\n"); | ||
| 559 | return -ENODEV; | ||
| 560 | } | ||
| 561 | |||
| 557 | if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) { | 562 | if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) { |
| 558 | pr_info("CPU feature '%s' is not supported.\n", feature_name); | 563 | pr_info("CPU feature '%s' is not supported.\n", feature_name); |
| 559 | return -ENODEV; | 564 | return -ENODEV; |
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index d3033183ed70..055a01de7c8d 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S | |||
| @@ -1128,7 +1128,18 @@ END(error_exit) | |||
| 1128 | 1128 | ||
| 1129 | /* Runs on exception stack */ | 1129 | /* Runs on exception stack */ |
| 1130 | ENTRY(nmi) | 1130 | ENTRY(nmi) |
| 1131 | /* | ||
| 1132 | * Fix up the exception frame if we're on Xen. | ||
| 1133 | * PARAVIRT_ADJUST_EXCEPTION_FRAME is guaranteed to push at most | ||
| 1134 | * one value to the stack on native, so it may clobber the rdx | ||
| 1135 | * scratch slot, but it won't clobber any of the important | ||
| 1136 | * slots past it. | ||
| 1137 | * | ||
| 1138 | * Xen is a different story, because the Xen frame itself overlaps | ||
| 1139 | * the "NMI executing" variable. | ||
| 1140 | */ | ||
| 1131 | PARAVIRT_ADJUST_EXCEPTION_FRAME | 1141 | PARAVIRT_ADJUST_EXCEPTION_FRAME |
| 1142 | |||
| 1132 | /* | 1143 | /* |
| 1133 | * We allow breakpoints in NMIs. If a breakpoint occurs, then | 1144 | * We allow breakpoints in NMIs. If a breakpoint occurs, then |
| 1134 | * the iretq it performs will take us out of NMI context. | 1145 | * the iretq it performs will take us out of NMI context. |
| @@ -1179,9 +1190,12 @@ ENTRY(nmi) | |||
| 1179 | * we don't want to enable interrupts, because then we'll end | 1190 | * we don't want to enable interrupts, because then we'll end |
| 1180 | * up in an awkward situation in which IRQs are on but NMIs | 1191 | * up in an awkward situation in which IRQs are on but NMIs |
| 1181 | * are off. | 1192 | * are off. |
| 1193 | * | ||
| 1194 | * We also must not push anything to the stack before switching | ||
| 1195 | * stacks lest we corrupt the "NMI executing" variable. | ||
| 1182 | */ | 1196 | */ |
| 1183 | 1197 | ||
| 1184 | SWAPGS | 1198 | SWAPGS_UNSAFE_STACK |
| 1185 | cld | 1199 | cld |
| 1186 | movq %rsp, %rdx | 1200 | movq %rsp, %rdx |
| 1187 | movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp | 1201 | movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 477fc28050e4..9727b3b48bd1 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
| @@ -193,7 +193,7 @@ | |||
| 193 | #define X86_FEATURE_HW_PSTATE ( 7*32+ 8) /* AMD HW-PState */ | 193 | #define X86_FEATURE_HW_PSTATE ( 7*32+ 8) /* AMD HW-PState */ |
| 194 | #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */ | 194 | #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */ |
| 195 | #define X86_FEATURE_HWP ( 7*32+ 10) /* "hwp" Intel HWP */ | 195 | #define X86_FEATURE_HWP ( 7*32+ 10) /* "hwp" Intel HWP */ |
| 196 | #define X86_FEATURE_HWP_NOITFY ( 7*32+ 11) /* Intel HWP_NOTIFY */ | 196 | #define X86_FEATURE_HWP_NOTIFY ( 7*32+ 11) /* Intel HWP_NOTIFY */ |
| 197 | #define X86_FEATURE_HWP_ACT_WINDOW ( 7*32+ 12) /* Intel HWP_ACT_WINDOW */ | 197 | #define X86_FEATURE_HWP_ACT_WINDOW ( 7*32+ 12) /* Intel HWP_ACT_WINDOW */ |
| 198 | #define X86_FEATURE_HWP_EPP ( 7*32+13) /* Intel HWP_EPP */ | 198 | #define X86_FEATURE_HWP_EPP ( 7*32+13) /* Intel HWP_EPP */ |
| 199 | #define X86_FEATURE_HWP_PKG_REQ ( 7*32+14) /* Intel HWP_PKG_REQ */ | 199 | #define X86_FEATURE_HWP_PKG_REQ ( 7*32+14) /* Intel HWP_PKG_REQ */ |
| @@ -241,6 +241,7 @@ | |||
| 241 | #define X86_FEATURE_AVX512PF ( 9*32+26) /* AVX-512 Prefetch */ | 241 | #define X86_FEATURE_AVX512PF ( 9*32+26) /* AVX-512 Prefetch */ |
| 242 | #define X86_FEATURE_AVX512ER ( 9*32+27) /* AVX-512 Exponential and Reciprocal */ | 242 | #define X86_FEATURE_AVX512ER ( 9*32+27) /* AVX-512 Exponential and Reciprocal */ |
| 243 | #define X86_FEATURE_AVX512CD ( 9*32+28) /* AVX-512 Conflict Detection */ | 243 | #define X86_FEATURE_AVX512CD ( 9*32+28) /* AVX-512 Conflict Detection */ |
| 244 | #define X86_FEATURE_SHA_NI ( 9*32+29) /* SHA1/SHA256 Instruction Extensions */ | ||
| 244 | 245 | ||
| 245 | /* Extended state features, CPUID level 0x0000000d:1 (eax), word 10 */ | 246 | /* Extended state features, CPUID level 0x0000000d:1 (eax), word 10 */ |
| 246 | #define X86_FEATURE_XSAVEOPT (10*32+ 0) /* XSAVEOPT */ | 247 | #define X86_FEATURE_XSAVEOPT (10*32+ 0) /* XSAVEOPT */ |
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index 155162ea0e00..ae68be92f755 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h | |||
| @@ -86,6 +86,18 @@ extern u64 asmlinkage efi_call(void *fp, ...); | |||
| 86 | extern void __iomem *__init efi_ioremap(unsigned long addr, unsigned long size, | 86 | extern void __iomem *__init efi_ioremap(unsigned long addr, unsigned long size, |
| 87 | u32 type, u64 attribute); | 87 | u32 type, u64 attribute); |
| 88 | 88 | ||
| 89 | #ifdef CONFIG_KASAN | ||
| 90 | /* | ||
| 91 | * CONFIG_KASAN may redefine memset to __memset. __memset function is present | ||
| 92 | * only in kernel binary. Since the EFI stub linked into a separate binary it | ||
| 93 | * doesn't have __memset(). So we should use standard memset from | ||
| 94 | * arch/x86/boot/compressed/string.c. The same applies to memcpy and memmove. | ||
| 95 | */ | ||
| 96 | #undef memcpy | ||
| 97 | #undef memset | ||
| 98 | #undef memmove | ||
| 99 | #endif | ||
| 100 | |||
| 89 | #endif /* CONFIG_X86_32 */ | 101 | #endif /* CONFIG_X86_32 */ |
| 90 | 102 | ||
| 91 | extern struct efi_scratch efi_scratch; | 103 | extern struct efi_scratch efi_scratch; |
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index c12e845f59e6..3a36ee704c30 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | #define KVM_PIO_PAGE_OFFSET 1 | 41 | #define KVM_PIO_PAGE_OFFSET 1 |
| 42 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 2 | 42 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 2 |
| 43 | #define KVM_HALT_POLL_NS_DEFAULT 500000 | ||
| 43 | 44 | ||
| 44 | #define KVM_IRQCHIP_NUM_PINS KVM_IOAPIC_NUM_PINS | 45 | #define KVM_IRQCHIP_NUM_PINS KVM_IOAPIC_NUM_PINS |
| 45 | 46 | ||
| @@ -711,6 +712,7 @@ struct kvm_vcpu_stat { | |||
| 711 | u32 nmi_window_exits; | 712 | u32 nmi_window_exits; |
| 712 | u32 halt_exits; | 713 | u32 halt_exits; |
| 713 | u32 halt_successful_poll; | 714 | u32 halt_successful_poll; |
| 715 | u32 halt_attempted_poll; | ||
| 714 | u32 halt_wakeup; | 716 | u32 halt_wakeup; |
| 715 | u32 request_irq_exits; | 717 | u32 request_irq_exits; |
| 716 | u32 irq_exits; | 718 | u32 irq_exits; |
| @@ -1224,10 +1226,8 @@ void kvm_complete_insn_gp(struct kvm_vcpu *vcpu, int err); | |||
| 1224 | 1226 | ||
| 1225 | int kvm_is_in_guest(void); | 1227 | int kvm_is_in_guest(void); |
| 1226 | 1228 | ||
| 1227 | int __x86_set_memory_region(struct kvm *kvm, | 1229 | int __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, u32 size); |
| 1228 | const struct kvm_userspace_memory_region *mem); | 1230 | int x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, u32 size); |
| 1229 | int x86_set_memory_region(struct kvm *kvm, | ||
| 1230 | const struct kvm_userspace_memory_region *mem); | ||
| 1231 | bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu); | 1231 | bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu); |
| 1232 | bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu); | 1232 | bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu); |
| 1233 | 1233 | ||
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index c1c0a1c14344..b8c14bb7fc8f 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h | |||
| @@ -141,6 +141,8 @@ | |||
| 141 | #define DEBUGCTLMSR_BTS_OFF_USR (1UL << 10) | 141 | #define DEBUGCTLMSR_BTS_OFF_USR (1UL << 10) |
| 142 | #define DEBUGCTLMSR_FREEZE_LBRS_ON_PMI (1UL << 11) | 142 | #define DEBUGCTLMSR_FREEZE_LBRS_ON_PMI (1UL << 11) |
| 143 | 143 | ||
| 144 | #define MSR_PEBS_FRONTEND 0x000003f7 | ||
| 145 | |||
| 144 | #define MSR_IA32_POWER_CTL 0x000001fc | 146 | #define MSR_IA32_POWER_CTL 0x000001fc |
| 145 | 147 | ||
| 146 | #define MSR_IA32_MC0_CTL 0x00000400 | 148 | #define MSR_IA32_MC0_CTL 0x00000400 |
| @@ -331,6 +333,7 @@ | |||
| 331 | /* C1E active bits in int pending message */ | 333 | /* C1E active bits in int pending message */ |
| 332 | #define K8_INTP_C1E_ACTIVE_MASK 0x18000000 | 334 | #define K8_INTP_C1E_ACTIVE_MASK 0x18000000 |
| 333 | #define MSR_K8_TSEG_ADDR 0xc0010112 | 335 | #define MSR_K8_TSEG_ADDR 0xc0010112 |
| 336 | #define MSR_K8_TSEG_MASK 0xc0010113 | ||
| 334 | #define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */ | 337 | #define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */ |
| 335 | #define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */ | 338 | #define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */ |
| 336 | #define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818 /* Mask: RdMem|WrMem */ | 339 | #define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818 /* Mask: RdMem|WrMem */ |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index ce029e4fa7c6..31247b5bff7c 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
| @@ -97,7 +97,6 @@ struct pv_lazy_ops { | |||
| 97 | struct pv_time_ops { | 97 | struct pv_time_ops { |
| 98 | unsigned long long (*sched_clock)(void); | 98 | unsigned long long (*sched_clock)(void); |
| 99 | unsigned long long (*steal_clock)(int cpu); | 99 | unsigned long long (*steal_clock)(int cpu); |
| 100 | unsigned long (*get_tsc_khz)(void); | ||
| 101 | }; | 100 | }; |
| 102 | 101 | ||
| 103 | struct pv_cpu_ops { | 102 | struct pv_cpu_ops { |
diff --git a/arch/x86/include/asm/pvclock-abi.h b/arch/x86/include/asm/pvclock-abi.h index 655e07a48f6c..67f08230103a 100644 --- a/arch/x86/include/asm/pvclock-abi.h +++ b/arch/x86/include/asm/pvclock-abi.h | |||
| @@ -41,6 +41,7 @@ struct pvclock_wall_clock { | |||
| 41 | 41 | ||
| 42 | #define PVCLOCK_TSC_STABLE_BIT (1 << 0) | 42 | #define PVCLOCK_TSC_STABLE_BIT (1 << 0) |
| 43 | #define PVCLOCK_GUEST_STOPPED (1 << 1) | 43 | #define PVCLOCK_GUEST_STOPPED (1 << 1) |
| 44 | /* PVCLOCK_COUNTS_FROM_ZERO broke ABI and can't be used anymore. */ | ||
| 44 | #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) | 45 | #define PVCLOCK_COUNTS_FROM_ZERO (1 << 2) |
| 45 | #endif /* __ASSEMBLY__ */ | 46 | #endif /* __ASSEMBLY__ */ |
| 46 | #endif /* _ASM_X86_PVCLOCK_ABI_H */ | 47 | #endif /* _ASM_X86_PVCLOCK_ABI_H */ |
diff --git a/arch/x86/include/asm/qspinlock.h b/arch/x86/include/asm/qspinlock.h index 9d51fae1cba3..eaba08076030 100644 --- a/arch/x86/include/asm/qspinlock.h +++ b/arch/x86/include/asm/qspinlock.h | |||
| @@ -39,18 +39,27 @@ static inline void queued_spin_unlock(struct qspinlock *lock) | |||
| 39 | } | 39 | } |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | #define virt_queued_spin_lock virt_queued_spin_lock | 42 | #ifdef CONFIG_PARAVIRT |
| 43 | 43 | #define virt_spin_lock virt_spin_lock | |
| 44 | static inline bool virt_queued_spin_lock(struct qspinlock *lock) | 44 | static inline bool virt_spin_lock(struct qspinlock *lock) |
| 45 | { | 45 | { |
| 46 | if (!static_cpu_has(X86_FEATURE_HYPERVISOR)) | 46 | if (!static_cpu_has(X86_FEATURE_HYPERVISOR)) |
| 47 | return false; | 47 | return false; |
| 48 | 48 | ||
| 49 | while (atomic_cmpxchg(&lock->val, 0, _Q_LOCKED_VAL) != 0) | 49 | /* |
| 50 | cpu_relax(); | 50 | * On hypervisors without PARAVIRT_SPINLOCKS support we fall |
| 51 | * back to a Test-and-Set spinlock, because fair locks have | ||
| 52 | * horrible lock 'holder' preemption issues. | ||
| 53 | */ | ||
| 54 | |||
| 55 | do { | ||
| 56 | while (atomic_read(&lock->val) != 0) | ||
| 57 | cpu_relax(); | ||
| 58 | } while (atomic_cmpxchg(&lock->val, 0, _Q_LOCKED_VAL) != 0); | ||
| 51 | 59 | ||
| 52 | return true; | 60 | return true; |
| 53 | } | 61 | } |
| 62 | #endif /* CONFIG_PARAVIRT */ | ||
| 54 | 63 | ||
| 55 | #include <asm-generic/qspinlock.h> | 64 | #include <asm-generic/qspinlock.h> |
| 56 | 65 | ||
diff --git a/arch/x86/include/asm/string_64.h b/arch/x86/include/asm/string_64.h index e4661196994e..ff8b9a17dc4b 100644 --- a/arch/x86/include/asm/string_64.h +++ b/arch/x86/include/asm/string_64.h | |||
| @@ -27,12 +27,11 @@ static __always_inline void *__inline_memcpy(void *to, const void *from, size_t | |||
| 27 | function. */ | 27 | function. */ |
| 28 | 28 | ||
| 29 | #define __HAVE_ARCH_MEMCPY 1 | 29 | #define __HAVE_ARCH_MEMCPY 1 |
| 30 | extern void *memcpy(void *to, const void *from, size_t len); | ||
| 30 | extern void *__memcpy(void *to, const void *from, size_t len); | 31 | extern void *__memcpy(void *to, const void *from, size_t len); |
| 31 | 32 | ||
| 32 | #ifndef CONFIG_KMEMCHECK | 33 | #ifndef CONFIG_KMEMCHECK |
| 33 | #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 | 34 | #if (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || __GNUC__ < 4 |
| 34 | extern void *memcpy(void *to, const void *from, size_t len); | ||
| 35 | #else | ||
| 36 | #define memcpy(dst, src, len) \ | 35 | #define memcpy(dst, src, len) \ |
| 37 | ({ \ | 36 | ({ \ |
| 38 | size_t __len = (len); \ | 37 | size_t __len = (len); \ |
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h index 83aea8055119..4c20dd333412 100644 --- a/arch/x86/include/asm/xen/hypercall.h +++ b/arch/x86/include/asm/xen/hypercall.h | |||
| @@ -336,10 +336,10 @@ HYPERVISOR_update_descriptor(u64 ma, u64 desc) | |||
| 336 | return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32); | 336 | return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32); |
| 337 | } | 337 | } |
| 338 | 338 | ||
| 339 | static inline int | 339 | static inline long |
| 340 | HYPERVISOR_memory_op(unsigned int cmd, void *arg) | 340 | HYPERVISOR_memory_op(unsigned int cmd, void *arg) |
| 341 | { | 341 | { |
| 342 | return _hypercall2(int, memory_op, cmd, arg); | 342 | return _hypercall2(long, memory_op, cmd, arg); |
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | static inline int | 345 | static inline int |
diff --git a/arch/x86/include/uapi/asm/bitsperlong.h b/arch/x86/include/uapi/asm/bitsperlong.h index b0ae1c4dc791..217909b4d6f5 100644 --- a/arch/x86/include/uapi/asm/bitsperlong.h +++ b/arch/x86/include/uapi/asm/bitsperlong.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef __ASM_X86_BITSPERLONG_H | 1 | #ifndef __ASM_X86_BITSPERLONG_H |
| 2 | #define __ASM_X86_BITSPERLONG_H | 2 | #define __ASM_X86_BITSPERLONG_H |
| 3 | 3 | ||
| 4 | #ifdef __x86_64__ | 4 | #if defined(__x86_64__) && !defined(__ILP32__) |
| 5 | # define __BITS_PER_LONG 64 | 5 | # define __BITS_PER_LONG 64 |
| 6 | #else | 6 | #else |
| 7 | # define __BITS_PER_LONG 32 | 7 | # define __BITS_PER_LONG 32 |
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index c42827eb86cf..25f909362b7a 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
| @@ -338,10 +338,15 @@ done: | |||
| 338 | 338 | ||
| 339 | static void __init_or_module optimize_nops(struct alt_instr *a, u8 *instr) | 339 | static void __init_or_module optimize_nops(struct alt_instr *a, u8 *instr) |
| 340 | { | 340 | { |
| 341 | unsigned long flags; | ||
| 342 | |||
| 341 | if (instr[0] != 0x90) | 343 | if (instr[0] != 0x90) |
| 342 | return; | 344 | return; |
| 343 | 345 | ||
| 346 | local_irq_save(flags); | ||
| 344 | add_nops(instr + (a->instrlen - a->padlen), a->padlen); | 347 | add_nops(instr + (a->instrlen - a->padlen), a->padlen); |
| 348 | sync_core(); | ||
| 349 | local_irq_restore(flags); | ||
| 345 | 350 | ||
| 346 | DUMP_BYTES(instr, a->instrlen, "%p: [%d:%d) optimized NOPs: ", | 351 | DUMP_BYTES(instr, a->instrlen, "%p: [%d:%d) optimized NOPs: ", |
| 347 | instr, a->instrlen - a->padlen, a->padlen); | 352 | instr, a->instrlen - a->padlen, a->padlen); |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 3ca3e46aa405..24e94ce454e2 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
| @@ -336,6 +336,13 @@ static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen) | |||
| 336 | apic_write(APIC_LVTT, lvtt_value); | 336 | apic_write(APIC_LVTT, lvtt_value); |
| 337 | 337 | ||
| 338 | if (lvtt_value & APIC_LVT_TIMER_TSCDEADLINE) { | 338 | if (lvtt_value & APIC_LVT_TIMER_TSCDEADLINE) { |
| 339 | /* | ||
| 340 | * See Intel SDM: TSC-Deadline Mode chapter. In xAPIC mode, | ||
| 341 | * writing to the APIC LVTT and TSC_DEADLINE MSR isn't serialized. | ||
| 342 | * According to Intel, MFENCE can do the serialization here. | ||
| 343 | */ | ||
| 344 | asm volatile("mfence" : : : "memory"); | ||
| 345 | |||
| 339 | printk_once(KERN_DEBUG "TSC deadline timer enabled\n"); | 346 | printk_once(KERN_DEBUG "TSC deadline timer enabled\n"); |
| 340 | return; | 347 | return; |
| 341 | } | 348 | } |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 38a76f826530..4f2821527014 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
| @@ -2522,6 +2522,7 @@ void __init setup_ioapic_dest(void) | |||
| 2522 | int pin, ioapic, irq, irq_entry; | 2522 | int pin, ioapic, irq, irq_entry; |
| 2523 | const struct cpumask *mask; | 2523 | const struct cpumask *mask; |
| 2524 | struct irq_data *idata; | 2524 | struct irq_data *idata; |
| 2525 | struct irq_chip *chip; | ||
| 2525 | 2526 | ||
| 2526 | if (skip_ioapic_setup == 1) | 2527 | if (skip_ioapic_setup == 1) |
| 2527 | return; | 2528 | return; |
| @@ -2545,9 +2546,11 @@ void __init setup_ioapic_dest(void) | |||
| 2545 | else | 2546 | else |
| 2546 | mask = apic->target_cpus(); | 2547 | mask = apic->target_cpus(); |
| 2547 | 2548 | ||
| 2548 | irq_set_affinity(irq, mask); | 2549 | chip = irq_data_get_irq_chip(idata); |
| 2550 | /* Might be lapic_chip for irq 0 */ | ||
| 2551 | if (chip->irq_set_affinity) | ||
| 2552 | chip->irq_set_affinity(idata, mask, false); | ||
| 2549 | } | 2553 | } |
| 2550 | |||
| 2551 | } | 2554 | } |
| 2552 | #endif | 2555 | #endif |
| 2553 | 2556 | ||
| @@ -2906,6 +2909,7 @@ int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq, | |||
| 2906 | struct irq_data *irq_data; | 2909 | struct irq_data *irq_data; |
| 2907 | struct mp_chip_data *data; | 2910 | struct mp_chip_data *data; |
| 2908 | struct irq_alloc_info *info = arg; | 2911 | struct irq_alloc_info *info = arg; |
| 2912 | unsigned long flags; | ||
| 2909 | 2913 | ||
| 2910 | if (!info || nr_irqs > 1) | 2914 | if (!info || nr_irqs > 1) |
| 2911 | return -EINVAL; | 2915 | return -EINVAL; |
| @@ -2938,11 +2942,14 @@ int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq, | |||
| 2938 | 2942 | ||
| 2939 | cfg = irqd_cfg(irq_data); | 2943 | cfg = irqd_cfg(irq_data); |
| 2940 | add_pin_to_irq_node(data, ioapic_alloc_attr_node(info), ioapic, pin); | 2944 | add_pin_to_irq_node(data, ioapic_alloc_attr_node(info), ioapic, pin); |
| 2945 | |||
| 2946 | local_irq_save(flags); | ||
| 2941 | if (info->ioapic_entry) | 2947 | if (info->ioapic_entry) |
| 2942 | mp_setup_entry(cfg, data, info->ioapic_entry); | 2948 | mp_setup_entry(cfg, data, info->ioapic_entry); |
| 2943 | mp_register_handler(virq, data->trigger); | 2949 | mp_register_handler(virq, data->trigger); |
| 2944 | if (virq < nr_legacy_irqs()) | 2950 | if (virq < nr_legacy_irqs()) |
| 2945 | legacy_pic->mask(virq); | 2951 | legacy_pic->mask(virq); |
| 2952 | local_irq_restore(flags); | ||
| 2946 | 2953 | ||
| 2947 | apic_printk(APIC_VERBOSE, KERN_DEBUG | 2954 | apic_printk(APIC_VERBOSE, KERN_DEBUG |
| 2948 | "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> IRQ %d Mode:%i Active:%i Dest:%d)\n", | 2955 | "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> IRQ %d Mode:%i Active:%i Dest:%d)\n", |
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index 1bbd0fe2c806..836d11b92811 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c | |||
| @@ -489,10 +489,8 @@ static int apic_set_affinity(struct irq_data *irq_data, | |||
| 489 | 489 | ||
| 490 | err = assign_irq_vector(irq, data, dest); | 490 | err = assign_irq_vector(irq, data, dest); |
| 491 | if (err) { | 491 | if (err) { |
| 492 | struct irq_data *top = irq_get_irq_data(irq); | ||
| 493 | |||
| 494 | if (assign_irq_vector(irq, data, | 492 | if (assign_irq_vector(irq, data, |
| 495 | irq_data_get_affinity_mask(top))) | 493 | irq_data_get_affinity_mask(irq_data))) |
| 496 | pr_err("Failed to recover vector for irq %d\n", irq); | 494 | pr_err("Failed to recover vector for irq %d\n", irq); |
| 497 | return err; | 495 | return err; |
| 498 | } | 496 | } |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 07ce52c22ec8..de22ea7ff82f 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
| @@ -1110,10 +1110,10 @@ void print_cpu_info(struct cpuinfo_x86 *c) | |||
| 1110 | else | 1110 | else |
| 1111 | printk(KERN_CONT "%d86", c->x86); | 1111 | printk(KERN_CONT "%d86", c->x86); |
| 1112 | 1112 | ||
| 1113 | printk(KERN_CONT " (fam: %02x, model: %02x", c->x86, c->x86_model); | 1113 | printk(KERN_CONT " (family: 0x%x, model: 0x%x", c->x86, c->x86_model); |
| 1114 | 1114 | ||
| 1115 | if (c->x86_mask || c->cpuid_level >= 0) | 1115 | if (c->x86_mask || c->cpuid_level >= 0) |
| 1116 | printk(KERN_CONT ", stepping: %02x)\n", c->x86_mask); | 1116 | printk(KERN_CONT ", stepping: 0x%x)\n", c->x86_mask); |
| 1117 | else | 1117 | else |
| 1118 | printk(KERN_CONT ")\n"); | 1118 | printk(KERN_CONT ")\n"); |
| 1119 | 1119 | ||
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index 381c8b9b3a33..20e242ea1bc4 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c | |||
| @@ -34,11 +34,10 @@ | |||
| 34 | struct ms_hyperv_info ms_hyperv; | 34 | struct ms_hyperv_info ms_hyperv; |
| 35 | EXPORT_SYMBOL_GPL(ms_hyperv); | 35 | EXPORT_SYMBOL_GPL(ms_hyperv); |
| 36 | 36 | ||
| 37 | static void (*hv_kexec_handler)(void); | ||
| 38 | static void (*hv_crash_handler)(struct pt_regs *regs); | ||
| 39 | |||
| 40 | #if IS_ENABLED(CONFIG_HYPERV) | 37 | #if IS_ENABLED(CONFIG_HYPERV) |
| 41 | static void (*vmbus_handler)(void); | 38 | static void (*vmbus_handler)(void); |
| 39 | static void (*hv_kexec_handler)(void); | ||
| 40 | static void (*hv_crash_handler)(struct pt_regs *regs); | ||
| 42 | 41 | ||
| 43 | void hyperv_vector_handler(struct pt_regs *regs) | 42 | void hyperv_vector_handler(struct pt_regs *regs) |
| 44 | { | 43 | { |
| @@ -96,8 +95,8 @@ void hv_remove_crash_handler(void) | |||
| 96 | hv_crash_handler = NULL; | 95 | hv_crash_handler = NULL; |
| 97 | } | 96 | } |
| 98 | EXPORT_SYMBOL_GPL(hv_remove_crash_handler); | 97 | EXPORT_SYMBOL_GPL(hv_remove_crash_handler); |
| 99 | #endif | ||
| 100 | 98 | ||
| 99 | #ifdef CONFIG_KEXEC_CORE | ||
| 101 | static void hv_machine_shutdown(void) | 100 | static void hv_machine_shutdown(void) |
| 102 | { | 101 | { |
| 103 | if (kexec_in_progress && hv_kexec_handler) | 102 | if (kexec_in_progress && hv_kexec_handler) |
| @@ -111,7 +110,8 @@ static void hv_machine_crash_shutdown(struct pt_regs *regs) | |||
| 111 | hv_crash_handler(regs); | 110 | hv_crash_handler(regs); |
| 112 | native_machine_crash_shutdown(regs); | 111 | native_machine_crash_shutdown(regs); |
| 113 | } | 112 | } |
| 114 | 113 | #endif /* CONFIG_KEXEC_CORE */ | |
| 114 | #endif /* CONFIG_HYPERV */ | ||
| 115 | 115 | ||
| 116 | static uint32_t __init ms_hyperv_platform(void) | 116 | static uint32_t __init ms_hyperv_platform(void) |
| 117 | { | 117 | { |
| @@ -186,8 +186,10 @@ static void __init ms_hyperv_init_platform(void) | |||
| 186 | no_timer_check = 1; | 186 | no_timer_check = 1; |
| 187 | #endif | 187 | #endif |
| 188 | 188 | ||
| 189 | #if IS_ENABLED(CONFIG_HYPERV) && defined(CONFIG_KEXEC_CORE) | ||
| 189 | machine_ops.shutdown = hv_machine_shutdown; | 190 | machine_ops.shutdown = hv_machine_shutdown; |
| 190 | machine_ops.crash_shutdown = hv_machine_crash_shutdown; | 191 | machine_ops.crash_shutdown = hv_machine_crash_shutdown; |
| 192 | #endif | ||
| 191 | mark_tsc_unstable("running on Hyper-V"); | 193 | mark_tsc_unstable("running on Hyper-V"); |
| 192 | } | 194 | } |
| 193 | 195 | ||
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h index 5edf6d868fc1..165be83a7fa4 100644 --- a/arch/x86/kernel/cpu/perf_event.h +++ b/arch/x86/kernel/cpu/perf_event.h | |||
| @@ -47,6 +47,7 @@ enum extra_reg_type { | |||
| 47 | EXTRA_REG_RSP_1 = 1, /* offcore_response_1 */ | 47 | EXTRA_REG_RSP_1 = 1, /* offcore_response_1 */ |
| 48 | EXTRA_REG_LBR = 2, /* lbr_select */ | 48 | EXTRA_REG_LBR = 2, /* lbr_select */ |
| 49 | EXTRA_REG_LDLAT = 3, /* ld_lat_threshold */ | 49 | EXTRA_REG_LDLAT = 3, /* ld_lat_threshold */ |
| 50 | EXTRA_REG_FE = 4, /* fe_* */ | ||
| 50 | 51 | ||
| 51 | EXTRA_REG_MAX /* number of entries needed */ | 52 | EXTRA_REG_MAX /* number of entries needed */ |
| 52 | }; | 53 | }; |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index cd9b6d0b10bf..f63360be2238 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
| @@ -205,6 +205,11 @@ static struct extra_reg intel_skl_extra_regs[] __read_mostly = { | |||
| 205 | INTEL_UEVENT_EXTRA_REG(0x01b7, MSR_OFFCORE_RSP_0, 0x3fffff8fffull, RSP_0), | 205 | INTEL_UEVENT_EXTRA_REG(0x01b7, MSR_OFFCORE_RSP_0, 0x3fffff8fffull, RSP_0), |
| 206 | INTEL_UEVENT_EXTRA_REG(0x01bb, MSR_OFFCORE_RSP_1, 0x3fffff8fffull, RSP_1), | 206 | INTEL_UEVENT_EXTRA_REG(0x01bb, MSR_OFFCORE_RSP_1, 0x3fffff8fffull, RSP_1), |
| 207 | INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd), | 207 | INTEL_UEVENT_PEBS_LDLAT_EXTRA_REG(0x01cd), |
| 208 | /* | ||
| 209 | * Note the low 8 bits eventsel code is not a continuous field, containing | ||
| 210 | * some #GPing bits. These are masked out. | ||
| 211 | */ | ||
| 212 | INTEL_UEVENT_EXTRA_REG(0x01c6, MSR_PEBS_FRONTEND, 0x7fff17, FE), | ||
| 208 | EVENT_EXTRA_END | 213 | EVENT_EXTRA_END |
| 209 | }; | 214 | }; |
| 210 | 215 | ||
| @@ -250,7 +255,7 @@ struct event_constraint intel_bdw_event_constraints[] = { | |||
| 250 | FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */ | 255 | FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */ |
| 251 | FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */ | 256 | FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */ |
| 252 | INTEL_UEVENT_CONSTRAINT(0x148, 0x4), /* L1D_PEND_MISS.PENDING */ | 257 | INTEL_UEVENT_CONSTRAINT(0x148, 0x4), /* L1D_PEND_MISS.PENDING */ |
| 253 | INTEL_EVENT_CONSTRAINT(0xa3, 0x4), /* CYCLE_ACTIVITY.* */ | 258 | INTEL_UEVENT_CONSTRAINT(0x8a3, 0x4), /* CYCLE_ACTIVITY.CYCLES_L1D_MISS */ |
| 254 | EVENT_CONSTRAINT_END | 259 | EVENT_CONSTRAINT_END |
| 255 | }; | 260 | }; |
| 256 | 261 | ||
| @@ -2316,9 +2321,12 @@ static struct event_constraint * | |||
| 2316 | intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx, | 2321 | intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx, |
| 2317 | struct perf_event *event) | 2322 | struct perf_event *event) |
| 2318 | { | 2323 | { |
| 2319 | struct event_constraint *c1 = cpuc->event_constraint[idx]; | 2324 | struct event_constraint *c1 = NULL; |
| 2320 | struct event_constraint *c2; | 2325 | struct event_constraint *c2; |
| 2321 | 2326 | ||
| 2327 | if (idx >= 0) /* fake does < 0 */ | ||
| 2328 | c1 = cpuc->event_constraint[idx]; | ||
| 2329 | |||
| 2322 | /* | 2330 | /* |
| 2323 | * first time only | 2331 | * first time only |
| 2324 | * - static constraint: no change across incremental scheduling calls | 2332 | * - static constraint: no change across incremental scheduling calls |
| @@ -2888,6 +2896,8 @@ PMU_FORMAT_ATTR(offcore_rsp, "config1:0-63"); | |||
| 2888 | 2896 | ||
| 2889 | PMU_FORMAT_ATTR(ldlat, "config1:0-15"); | 2897 | PMU_FORMAT_ATTR(ldlat, "config1:0-15"); |
| 2890 | 2898 | ||
| 2899 | PMU_FORMAT_ATTR(frontend, "config1:0-23"); | ||
| 2900 | |||
| 2891 | static struct attribute *intel_arch3_formats_attr[] = { | 2901 | static struct attribute *intel_arch3_formats_attr[] = { |
| 2892 | &format_attr_event.attr, | 2902 | &format_attr_event.attr, |
| 2893 | &format_attr_umask.attr, | 2903 | &format_attr_umask.attr, |
| @@ -2904,6 +2914,11 @@ static struct attribute *intel_arch3_formats_attr[] = { | |||
| 2904 | NULL, | 2914 | NULL, |
| 2905 | }; | 2915 | }; |
| 2906 | 2916 | ||
| 2917 | static struct attribute *skl_format_attr[] = { | ||
| 2918 | &format_attr_frontend.attr, | ||
| 2919 | NULL, | ||
| 2920 | }; | ||
| 2921 | |||
| 2907 | static __initconst const struct x86_pmu core_pmu = { | 2922 | static __initconst const struct x86_pmu core_pmu = { |
| 2908 | .name = "core", | 2923 | .name = "core", |
| 2909 | .handle_irq = x86_pmu_handle_irq, | 2924 | .handle_irq = x86_pmu_handle_irq, |
| @@ -3513,7 +3528,8 @@ __init int intel_pmu_init(void) | |||
| 3513 | 3528 | ||
| 3514 | x86_pmu.hw_config = hsw_hw_config; | 3529 | x86_pmu.hw_config = hsw_hw_config; |
| 3515 | x86_pmu.get_event_constraints = hsw_get_event_constraints; | 3530 | x86_pmu.get_event_constraints = hsw_get_event_constraints; |
| 3516 | x86_pmu.cpu_events = hsw_events_attrs; | 3531 | x86_pmu.format_attrs = merge_attr(intel_arch3_formats_attr, |
| 3532 | skl_format_attr); | ||
| 3517 | WARN_ON(!x86_pmu.format_attrs); | 3533 | WARN_ON(!x86_pmu.format_attrs); |
| 3518 | x86_pmu.cpu_events = hsw_events_attrs; | 3534 | x86_pmu.cpu_events = hsw_events_attrs; |
| 3519 | pr_cont("Skylake events, "); | 3535 | pr_cont("Skylake events, "); |
diff --git a/arch/x86/kernel/cpu/perf_event_intel_bts.c b/arch/x86/kernel/cpu/perf_event_intel_bts.c index 54690e885759..d1c0f254afbe 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_bts.c +++ b/arch/x86/kernel/cpu/perf_event_intel_bts.c | |||
| @@ -222,6 +222,7 @@ static void __bts_event_start(struct perf_event *event) | |||
| 222 | if (!buf || bts_buffer_is_full(buf, bts)) | 222 | if (!buf || bts_buffer_is_full(buf, bts)) |
| 223 | return; | 223 | return; |
| 224 | 224 | ||
| 225 | event->hw.itrace_started = 1; | ||
| 225 | event->hw.state = 0; | 226 | event->hw.state = 0; |
| 226 | 227 | ||
| 227 | if (!buf->snapshot) | 228 | if (!buf->snapshot) |
diff --git a/arch/x86/kernel/cpu/perf_event_msr.c b/arch/x86/kernel/cpu/perf_event_msr.c index 086b12eae794..f32ac13934f2 100644 --- a/arch/x86/kernel/cpu/perf_event_msr.c +++ b/arch/x86/kernel/cpu/perf_event_msr.c | |||
| @@ -10,12 +10,12 @@ enum perf_msr_id { | |||
| 10 | PERF_MSR_EVENT_MAX, | 10 | PERF_MSR_EVENT_MAX, |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | bool test_aperfmperf(int idx) | 13 | static bool test_aperfmperf(int idx) |
| 14 | { | 14 | { |
| 15 | return boot_cpu_has(X86_FEATURE_APERFMPERF); | 15 | return boot_cpu_has(X86_FEATURE_APERFMPERF); |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | bool test_intel(int idx) | 18 | static bool test_intel(int idx) |
| 19 | { | 19 | { |
| 20 | if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL || | 20 | if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL || |
| 21 | boot_cpu_data.x86 != 6) | 21 | boot_cpu_data.x86 != 6) |
diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c index 3d423a101fae..608fb26c7254 100644 --- a/arch/x86/kernel/cpu/scattered.c +++ b/arch/x86/kernel/cpu/scattered.c | |||
| @@ -37,7 +37,7 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c) | |||
| 37 | { X86_FEATURE_PLN, CR_EAX, 4, 0x00000006, 0 }, | 37 | { X86_FEATURE_PLN, CR_EAX, 4, 0x00000006, 0 }, |
| 38 | { X86_FEATURE_PTS, CR_EAX, 6, 0x00000006, 0 }, | 38 | { X86_FEATURE_PTS, CR_EAX, 6, 0x00000006, 0 }, |
| 39 | { X86_FEATURE_HWP, CR_EAX, 7, 0x00000006, 0 }, | 39 | { X86_FEATURE_HWP, CR_EAX, 7, 0x00000006, 0 }, |
| 40 | { X86_FEATURE_HWP_NOITFY, CR_EAX, 8, 0x00000006, 0 }, | 40 | { X86_FEATURE_HWP_NOTIFY, CR_EAX, 8, 0x00000006, 0 }, |
| 41 | { X86_FEATURE_HWP_ACT_WINDOW, CR_EAX, 9, 0x00000006, 0 }, | 41 | { X86_FEATURE_HWP_ACT_WINDOW, CR_EAX, 9, 0x00000006, 0 }, |
| 42 | { X86_FEATURE_HWP_EPP, CR_EAX,10, 0x00000006, 0 }, | 42 | { X86_FEATURE_HWP_EPP, CR_EAX,10, 0x00000006, 0 }, |
| 43 | { X86_FEATURE_HWP_PKG_REQ, CR_EAX,11, 0x00000006, 0 }, | 43 | { X86_FEATURE_HWP_PKG_REQ, CR_EAX,11, 0x00000006, 0 }, |
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index e068d6683dba..74ca2fe7a0b3 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c | |||
| @@ -185,10 +185,9 @@ void native_machine_crash_shutdown(struct pt_regs *regs) | |||
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | #ifdef CONFIG_KEXEC_FILE | 187 | #ifdef CONFIG_KEXEC_FILE |
| 188 | static int get_nr_ram_ranges_callback(unsigned long start_pfn, | 188 | static int get_nr_ram_ranges_callback(u64 start, u64 end, void *arg) |
| 189 | unsigned long nr_pfn, void *arg) | ||
| 190 | { | 189 | { |
| 191 | int *nr_ranges = arg; | 190 | unsigned int *nr_ranges = arg; |
| 192 | 191 | ||
| 193 | (*nr_ranges)++; | 192 | (*nr_ranges)++; |
| 194 | return 0; | 193 | return 0; |
| @@ -214,7 +213,7 @@ static void fill_up_crash_elf_data(struct crash_elf_data *ced, | |||
| 214 | 213 | ||
| 215 | ced->image = image; | 214 | ced->image = image; |
| 216 | 215 | ||
| 217 | walk_system_ram_range(0, -1, &nr_ranges, | 216 | walk_system_ram_res(0, -1, &nr_ranges, |
| 218 | get_nr_ram_ranges_callback); | 217 | get_nr_ram_ranges_callback); |
| 219 | 218 | ||
| 220 | ced->max_nr_ranges = nr_ranges; | 219 | ced->max_nr_ranges = nr_ranges; |
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index c80cf6699678..38da8f29a9c8 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
| @@ -68,11 +68,10 @@ static inline void *current_stack(void) | |||
| 68 | return (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1)); | 68 | return (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1)); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | static inline int | 71 | static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc) |
| 72 | execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) | ||
| 73 | { | 72 | { |
| 74 | struct irq_stack *curstk, *irqstk; | 73 | struct irq_stack *curstk, *irqstk; |
| 75 | u32 *isp, *prev_esp, arg1, arg2; | 74 | u32 *isp, *prev_esp, arg1; |
| 76 | 75 | ||
| 77 | curstk = (struct irq_stack *) current_stack(); | 76 | curstk = (struct irq_stack *) current_stack(); |
| 78 | irqstk = __this_cpu_read(hardirq_stack); | 77 | irqstk = __this_cpu_read(hardirq_stack); |
| @@ -98,8 +97,8 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) | |||
| 98 | asm volatile("xchgl %%ebx,%%esp \n" | 97 | asm volatile("xchgl %%ebx,%%esp \n" |
| 99 | "call *%%edi \n" | 98 | "call *%%edi \n" |
| 100 | "movl %%ebx,%%esp \n" | 99 | "movl %%ebx,%%esp \n" |
| 101 | : "=a" (arg1), "=d" (arg2), "=b" (isp) | 100 | : "=a" (arg1), "=b" (isp) |
| 102 | : "0" (irq), "1" (desc), "2" (isp), | 101 | : "0" (desc), "1" (isp), |
| 103 | "D" (desc->handle_irq) | 102 | "D" (desc->handle_irq) |
| 104 | : "memory", "cc", "ecx"); | 103 | : "memory", "cc", "ecx"); |
| 105 | return 1; | 104 | return 1; |
| @@ -150,19 +149,15 @@ void do_softirq_own_stack(void) | |||
| 150 | 149 | ||
| 151 | bool handle_irq(struct irq_desc *desc, struct pt_regs *regs) | 150 | bool handle_irq(struct irq_desc *desc, struct pt_regs *regs) |
| 152 | { | 151 | { |
| 153 | unsigned int irq; | 152 | int overflow = check_stack_overflow(); |
| 154 | int overflow; | ||
| 155 | |||
| 156 | overflow = check_stack_overflow(); | ||
| 157 | 153 | ||
| 158 | if (IS_ERR_OR_NULL(desc)) | 154 | if (IS_ERR_OR_NULL(desc)) |
| 159 | return false; | 155 | return false; |
| 160 | 156 | ||
| 161 | irq = irq_desc_get_irq(desc); | 157 | if (user_mode(regs) || !execute_on_irq_stack(overflow, desc)) { |
| 162 | if (user_mode(regs) || !execute_on_irq_stack(overflow, desc, irq)) { | ||
| 163 | if (unlikely(overflow)) | 158 | if (unlikely(overflow)) |
| 164 | print_stack_overflow(); | 159 | print_stack_overflow(); |
| 165 | generic_handle_irq_desc(irq, desc); | 160 | generic_handle_irq_desc(desc); |
| 166 | } | 161 | } |
| 167 | 162 | ||
| 168 | return true; | 163 | return true; |
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index ff16ccb918f2..c767cf2bc80a 100644 --- a/arch/x86/kernel/irq_64.c +++ b/arch/x86/kernel/irq_64.c | |||
| @@ -75,6 +75,6 @@ bool handle_irq(struct irq_desc *desc, struct pt_regs *regs) | |||
| 75 | if (unlikely(IS_ERR_OR_NULL(desc))) | 75 | if (unlikely(IS_ERR_OR_NULL(desc))) |
| 76 | return false; | 76 | return false; |
| 77 | 77 | ||
| 78 | generic_handle_irq_desc(irq_desc_get_irq(desc), desc); | 78 | generic_handle_irq_desc(desc); |
| 79 | return true; | 79 | return true; |
| 80 | } | 80 | } |
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index 2bcc0525f1c1..6acc9dd91f36 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c | |||
| @@ -58,7 +58,7 @@ static struct ldt_struct *alloc_ldt_struct(int size) | |||
| 58 | if (alloc_size > PAGE_SIZE) | 58 | if (alloc_size > PAGE_SIZE) |
| 59 | new_ldt->entries = vzalloc(alloc_size); | 59 | new_ldt->entries = vzalloc(alloc_size); |
| 60 | else | 60 | else |
| 61 | new_ldt->entries = kzalloc(PAGE_SIZE, GFP_KERNEL); | 61 | new_ldt->entries = (void *)get_zeroed_page(GFP_KERNEL); |
| 62 | 62 | ||
| 63 | if (!new_ldt->entries) { | 63 | if (!new_ldt->entries) { |
| 64 | kfree(new_ldt); | 64 | kfree(new_ldt); |
| @@ -95,7 +95,7 @@ static void free_ldt_struct(struct ldt_struct *ldt) | |||
| 95 | if (ldt->size * LDT_ENTRY_SIZE > PAGE_SIZE) | 95 | if (ldt->size * LDT_ENTRY_SIZE > PAGE_SIZE) |
| 96 | vfree(ldt->entries); | 96 | vfree(ldt->entries); |
| 97 | else | 97 | else |
| 98 | kfree(ldt->entries); | 98 | free_page((unsigned long)ldt->entries); |
| 99 | kfree(ldt); | 99 | kfree(ldt); |
| 100 | } | 100 | } |
| 101 | 101 | ||
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index f68e48f5f6c2..c2130aef3f9d 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
| @@ -41,10 +41,18 @@ | |||
| 41 | #include <asm/timer.h> | 41 | #include <asm/timer.h> |
| 42 | #include <asm/special_insns.h> | 42 | #include <asm/special_insns.h> |
| 43 | 43 | ||
| 44 | /* nop stub */ | 44 | /* |
| 45 | void _paravirt_nop(void) | 45 | * nop stub, which must not clobber anything *including the stack* to |
| 46 | { | 46 | * avoid confusing the entry prologues. |
| 47 | } | 47 | */ |
| 48 | extern void _paravirt_nop(void); | ||
| 49 | asm (".pushsection .entry.text, \"ax\"\n" | ||
| 50 | ".global _paravirt_nop\n" | ||
| 51 | "_paravirt_nop:\n\t" | ||
| 52 | "ret\n\t" | ||
| 53 | ".size _paravirt_nop, . - _paravirt_nop\n\t" | ||
| 54 | ".type _paravirt_nop, @function\n\t" | ||
| 55 | ".popsection"); | ||
| 48 | 56 | ||
| 49 | /* identity function, which can be inlined */ | 57 | /* identity function, which can be inlined */ |
| 50 | u32 _paravirt_ident_32(u32 x) | 58 | u32 _paravirt_ident_32(u32 x) |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 84b8ef82a159..cd99433b8ba1 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
| @@ -131,11 +131,12 @@ void dma_generic_free_coherent(struct device *dev, size_t size, void *vaddr, | |||
| 131 | 131 | ||
| 132 | bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp) | 132 | bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp) |
| 133 | { | 133 | { |
| 134 | *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp); | ||
| 135 | *gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); | ||
| 136 | |||
| 137 | if (!*dev) | 134 | if (!*dev) |
| 138 | *dev = &x86_dma_fallback_dev; | 135 | *dev = &x86_dma_fallback_dev; |
| 136 | |||
| 137 | *gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); | ||
| 138 | *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp); | ||
| 139 | |||
| 139 | if (!is_device_dma_capable(*dev)) | 140 | if (!is_device_dma_capable(*dev)) |
| 140 | return false; | 141 | return false; |
| 141 | return true; | 142 | return true; |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 6d0e62ae8516..9f7c21c22477 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
| @@ -84,6 +84,9 @@ EXPORT_SYMBOL_GPL(idle_notifier_unregister); | |||
| 84 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) | 84 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) |
| 85 | { | 85 | { |
| 86 | memcpy(dst, src, arch_task_struct_size); | 86 | memcpy(dst, src, arch_task_struct_size); |
| 87 | #ifdef CONFIG_VM86 | ||
| 88 | dst->thread.vm86 = NULL; | ||
| 89 | #endif | ||
| 87 | 90 | ||
| 88 | return fpu__copy(&dst->thread.fpu, &src->thread.fpu); | 91 | return fpu__copy(&dst->thread.fpu, &src->thread.fpu); |
| 89 | } | 92 | } |
| @@ -506,3 +509,58 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) | |||
| 506 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; | 509 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; |
| 507 | } | 510 | } |
| 508 | 511 | ||
| 512 | /* | ||
| 513 | * Called from fs/proc with a reference on @p to find the function | ||
| 514 | * which called into schedule(). This needs to be done carefully | ||
| 515 | * because the task might wake up and we might look at a stack | ||
| 516 | * changing under us. | ||
| 517 | */ | ||
| 518 | unsigned long get_wchan(struct task_struct *p) | ||
| 519 | { | ||
| 520 | unsigned long start, bottom, top, sp, fp, ip; | ||
| 521 | int count = 0; | ||
| 522 | |||
| 523 | if (!p || p == current || p->state == TASK_RUNNING) | ||
| 524 | return 0; | ||
| 525 | |||
| 526 | start = (unsigned long)task_stack_page(p); | ||
| 527 | if (!start) | ||
| 528 | return 0; | ||
| 529 | |||
| 530 | /* | ||
| 531 | * Layout of the stack page: | ||
| 532 | * | ||
| 533 | * ----------- topmax = start + THREAD_SIZE - sizeof(unsigned long) | ||
| 534 | * PADDING | ||
| 535 | * ----------- top = topmax - TOP_OF_KERNEL_STACK_PADDING | ||
| 536 | * stack | ||
| 537 | * ----------- bottom = start + sizeof(thread_info) | ||
| 538 | * thread_info | ||
| 539 | * ----------- start | ||
| 540 | * | ||
| 541 | * The tasks stack pointer points at the location where the | ||
| 542 | * framepointer is stored. The data on the stack is: | ||
| 543 | * ... IP FP ... IP FP | ||
| 544 | * | ||
| 545 | * We need to read FP and IP, so we need to adjust the upper | ||
| 546 | * bound by another unsigned long. | ||
| 547 | */ | ||
| 548 | top = start + THREAD_SIZE - TOP_OF_KERNEL_STACK_PADDING; | ||
| 549 | top -= 2 * sizeof(unsigned long); | ||
| 550 | bottom = start + sizeof(struct thread_info); | ||
| 551 | |||
| 552 | sp = READ_ONCE(p->thread.sp); | ||
| 553 | if (sp < bottom || sp > top) | ||
| 554 | return 0; | ||
| 555 | |||
| 556 | fp = READ_ONCE_NOCHECK(*(unsigned long *)sp); | ||
| 557 | do { | ||
| 558 | if (fp < bottom || fp > top) | ||
| 559 | return 0; | ||
| 560 | ip = READ_ONCE_NOCHECK(*(unsigned long *)(fp + sizeof(unsigned long))); | ||
| 561 | if (!in_sched_functions(ip)) | ||
| 562 | return ip; | ||
| 563 | fp = READ_ONCE_NOCHECK(*(unsigned long *)fp); | ||
| 564 | } while (count++ < 16 && p->state != TASK_RUNNING); | ||
| 565 | return 0; | ||
| 566 | } | ||
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index c13df2c735f8..737527b40e5b 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
| @@ -324,31 +324,3 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
| 324 | 324 | ||
| 325 | return prev_p; | 325 | return prev_p; |
| 326 | } | 326 | } |
| 327 | |||
| 328 | #define top_esp (THREAD_SIZE - sizeof(unsigned long)) | ||
| 329 | #define top_ebp (THREAD_SIZE - 2*sizeof(unsigned long)) | ||
| 330 | |||
| 331 | unsigned long get_wchan(struct task_struct *p) | ||
| 332 | { | ||
| 333 | unsigned long bp, sp, ip; | ||
| 334 | unsigned long stack_page; | ||
| 335 | int count = 0; | ||
| 336 | if (!p || p == current || p->state == TASK_RUNNING) | ||
| 337 | return 0; | ||
| 338 | stack_page = (unsigned long)task_stack_page(p); | ||
| 339 | sp = p->thread.sp; | ||
| 340 | if (!stack_page || sp < stack_page || sp > top_esp+stack_page) | ||
| 341 | return 0; | ||
| 342 | /* include/asm-i386/system.h:switch_to() pushes bp last. */ | ||
| 343 | bp = *(unsigned long *) sp; | ||
| 344 | do { | ||
| 345 | if (bp < stack_page || bp > top_ebp+stack_page) | ||
| 346 | return 0; | ||
| 347 | ip = *(unsigned long *) (bp+4); | ||
| 348 | if (!in_sched_functions(ip)) | ||
| 349 | return ip; | ||
| 350 | bp = *(unsigned long *) bp; | ||
| 351 | } while (count++ < 16); | ||
| 352 | return 0; | ||
| 353 | } | ||
| 354 | |||
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 3c1bbcf12924..b35921a670b2 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
| @@ -499,30 +499,6 @@ void set_personality_ia32(bool x32) | |||
| 499 | } | 499 | } |
| 500 | EXPORT_SYMBOL_GPL(set_personality_ia32); | 500 | EXPORT_SYMBOL_GPL(set_personality_ia32); |
| 501 | 501 | ||
| 502 | unsigned long get_wchan(struct task_struct *p) | ||
| 503 | { | ||
| 504 | unsigned long stack; | ||
| 505 | u64 fp, ip; | ||
| 506 | int count = 0; | ||
| 507 | |||
| 508 | if (!p || p == current || p->state == TASK_RUNNING) | ||
| 509 | return 0; | ||
| 510 | stack = (unsigned long)task_stack_page(p); | ||
| 511 | if (p->thread.sp < stack || p->thread.sp >= stack+THREAD_SIZE) | ||
| 512 | return 0; | ||
| 513 | fp = *(u64 *)(p->thread.sp); | ||
| 514 | do { | ||
| 515 | if (fp < (unsigned long)stack || | ||
| 516 | fp >= (unsigned long)stack+THREAD_SIZE) | ||
| 517 | return 0; | ||
| 518 | ip = *(u64 *)(fp+8); | ||
| 519 | if (!in_sched_functions(ip)) | ||
| 520 | return ip; | ||
| 521 | fp = *(u64 *)fp; | ||
| 522 | } while (count++ < 16); | ||
| 523 | return 0; | ||
| 524 | } | ||
| 525 | |||
| 526 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) | 502 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) |
| 527 | { | 503 | { |
| 528 | int ret = 0; | 504 | int ret = 0; |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index fdb7f2a2d328..a3cccbfc5f77 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -1173,6 +1173,14 @@ void __init setup_arch(char **cmdline_p) | |||
| 1173 | clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, | 1173 | clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, |
| 1174 | swapper_pg_dir + KERNEL_PGD_BOUNDARY, | 1174 | swapper_pg_dir + KERNEL_PGD_BOUNDARY, |
| 1175 | KERNEL_PGD_PTRS); | 1175 | KERNEL_PGD_PTRS); |
| 1176 | |||
| 1177 | /* | ||
| 1178 | * sync back low identity map too. It is used for example | ||
| 1179 | * in the 32-bit EFI stub. | ||
| 1180 | */ | ||
| 1181 | clone_pgd_range(initial_page_table, | ||
| 1182 | swapper_pg_dir + KERNEL_PGD_BOUNDARY, | ||
| 1183 | KERNEL_PGD_PTRS); | ||
| 1176 | #endif | 1184 | #endif |
| 1177 | 1185 | ||
| 1178 | tboot_probe(); | 1186 | tboot_probe(); |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index e0c198e5f920..892ee2e5ecbc 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -509,7 +509,7 @@ void __inquire_remote_apic(int apicid) | |||
| 509 | */ | 509 | */ |
| 510 | #define UDELAY_10MS_DEFAULT 10000 | 510 | #define UDELAY_10MS_DEFAULT 10000 |
| 511 | 511 | ||
| 512 | static unsigned int init_udelay = UDELAY_10MS_DEFAULT; | 512 | static unsigned int init_udelay = INT_MAX; |
| 513 | 513 | ||
| 514 | static int __init cpu_init_udelay(char *str) | 514 | static int __init cpu_init_udelay(char *str) |
| 515 | { | 515 | { |
| @@ -522,13 +522,16 @@ early_param("cpu_init_udelay", cpu_init_udelay); | |||
| 522 | static void __init smp_quirk_init_udelay(void) | 522 | static void __init smp_quirk_init_udelay(void) |
| 523 | { | 523 | { |
| 524 | /* if cmdline changed it from default, leave it alone */ | 524 | /* if cmdline changed it from default, leave it alone */ |
| 525 | if (init_udelay != UDELAY_10MS_DEFAULT) | 525 | if (init_udelay != INT_MAX) |
| 526 | return; | 526 | return; |
| 527 | 527 | ||
| 528 | /* if modern processor, use no delay */ | 528 | /* if modern processor, use no delay */ |
| 529 | if (((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 == 6)) || | 529 | if (((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 == 6)) || |
| 530 | ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && (boot_cpu_data.x86 >= 0xF))) | 530 | ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && (boot_cpu_data.x86 >= 0xF))) |
| 531 | init_udelay = 0; | 531 | init_udelay = 0; |
| 532 | |||
| 533 | /* else, use legacy delay */ | ||
| 534 | init_udelay = UDELAY_10MS_DEFAULT; | ||
| 532 | } | 535 | } |
| 533 | 536 | ||
| 534 | /* | 537 | /* |
| @@ -657,7 +660,9 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) | |||
| 657 | /* | 660 | /* |
| 658 | * Give the other CPU some time to accept the IPI. | 661 | * Give the other CPU some time to accept the IPI. |
| 659 | */ | 662 | */ |
| 660 | if (init_udelay) | 663 | if (init_udelay == 0) |
| 664 | udelay(10); | ||
| 665 | else | ||
| 661 | udelay(300); | 666 | udelay(300); |
| 662 | 667 | ||
| 663 | pr_debug("Startup point 1\n"); | 668 | pr_debug("Startup point 1\n"); |
| @@ -668,7 +673,9 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) | |||
| 668 | /* | 673 | /* |
| 669 | * Give the other CPU some time to accept the IPI. | 674 | * Give the other CPU some time to accept the IPI. |
| 670 | */ | 675 | */ |
| 671 | if (init_udelay) | 676 | if (init_udelay == 0) |
| 677 | udelay(10); | ||
| 678 | else | ||
| 672 | udelay(200); | 679 | udelay(200); |
| 673 | 680 | ||
| 674 | if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ | 681 | if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index c8d52cb4cb6e..c3f7602cd038 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <asm/hypervisor.h> | 21 | #include <asm/hypervisor.h> |
| 22 | #include <asm/nmi.h> | 22 | #include <asm/nmi.h> |
| 23 | #include <asm/x86_init.h> | 23 | #include <asm/x86_init.h> |
| 24 | #include <asm/geode.h> | ||
| 24 | 25 | ||
| 25 | unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */ | 26 | unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */ |
| 26 | EXPORT_SYMBOL(cpu_khz); | 27 | EXPORT_SYMBOL(cpu_khz); |
| @@ -1013,15 +1014,17 @@ EXPORT_SYMBOL_GPL(mark_tsc_unstable); | |||
| 1013 | 1014 | ||
| 1014 | static void __init check_system_tsc_reliable(void) | 1015 | static void __init check_system_tsc_reliable(void) |
| 1015 | { | 1016 | { |
| 1016 | #ifdef CONFIG_MGEODE_LX | 1017 | #if defined(CONFIG_MGEODEGX1) || defined(CONFIG_MGEODE_LX) || defined(CONFIG_X86_GENERIC) |
| 1017 | /* RTSC counts during suspend */ | 1018 | if (is_geode_lx()) { |
| 1019 | /* RTSC counts during suspend */ | ||
| 1018 | #define RTSC_SUSP 0x100 | 1020 | #define RTSC_SUSP 0x100 |
| 1019 | unsigned long res_low, res_high; | 1021 | unsigned long res_low, res_high; |
| 1020 | 1022 | ||
| 1021 | rdmsr_safe(MSR_GEODE_BUSCONT_CONF0, &res_low, &res_high); | 1023 | rdmsr_safe(MSR_GEODE_BUSCONT_CONF0, &res_low, &res_high); |
| 1022 | /* Geode_LX - the OLPC CPU has a very reliable TSC */ | 1024 | /* Geode_LX - the OLPC CPU has a very reliable TSC */ |
| 1023 | if (res_low & RTSC_SUSP) | 1025 | if (res_low & RTSC_SUSP) |
| 1024 | tsc_clocksource_reliable = 1; | 1026 | tsc_clocksource_reliable = 1; |
| 1027 | } | ||
| 1025 | #endif | 1028 | #endif |
| 1026 | if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) | 1029 | if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) |
| 1027 | tsc_clocksource_reliable = 1; | 1030 | tsc_clocksource_reliable = 1; |
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index abd8b856bd2b..524619351961 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #include <linux/audit.h> | 45 | #include <linux/audit.h> |
| 46 | #include <linux/stddef.h> | 46 | #include <linux/stddef.h> |
| 47 | #include <linux/slab.h> | 47 | #include <linux/slab.h> |
| 48 | #include <linux/security.h> | ||
| 48 | 49 | ||
| 49 | #include <asm/uaccess.h> | 50 | #include <asm/uaccess.h> |
| 50 | #include <asm/io.h> | 51 | #include <asm/io.h> |
| @@ -232,6 +233,32 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus) | |||
| 232 | struct pt_regs *regs = current_pt_regs(); | 233 | struct pt_regs *regs = current_pt_regs(); |
| 233 | unsigned long err = 0; | 234 | unsigned long err = 0; |
| 234 | 235 | ||
| 236 | err = security_mmap_addr(0); | ||
| 237 | if (err) { | ||
| 238 | /* | ||
| 239 | * vm86 cannot virtualize the address space, so vm86 users | ||
| 240 | * need to manage the low 1MB themselves using mmap. Given | ||
| 241 | * that BIOS places important data in the first page, vm86 | ||
| 242 | * is essentially useless if mmap_min_addr != 0. DOSEMU, | ||
| 243 | * for example, won't even bother trying to use vm86 if it | ||
| 244 | * can't map a page at virtual address 0. | ||
| 245 | * | ||
| 246 | * To reduce the available kernel attack surface, simply | ||
| 247 | * disallow vm86(old) for users who cannot mmap at va 0. | ||
| 248 | * | ||
| 249 | * The implementation of security_mmap_addr will allow | ||
| 250 | * suitably privileged users to map va 0 even if | ||
| 251 | * vm.mmap_min_addr is set above 0, and we want this | ||
| 252 | * behavior for vm86 as well, as it ensures that legacy | ||
| 253 | * tools like vbetool will not fail just because of | ||
| 254 | * vm.mmap_min_addr. | ||
| 255 | */ | ||
| 256 | pr_info_once("Denied a call to vm86(old) from %s[%d] (uid: %d). Set the vm.mmap_min_addr sysctl to 0 and/or adjust LSM mmap_min_addr policy to enable vm86 if you are using a vm86-based DOS emulator.\n", | ||
| 257 | current->comm, task_pid_nr(current), | ||
| 258 | from_kuid_munged(&init_user_ns, current_uid())); | ||
| 259 | return -EPERM; | ||
| 260 | } | ||
| 261 | |||
| 235 | if (!vm86) { | 262 | if (!vm86) { |
| 236 | if (!(vm86 = kzalloc(sizeof(*vm86), GFP_KERNEL))) | 263 | if (!(vm86 = kzalloc(sizeof(*vm86), GFP_KERNEL))) |
| 237 | return -ENOMEM; | 264 | return -ENOMEM; |
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index b372a7557c16..9da95b9daf8d 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
| @@ -2418,7 +2418,7 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase) | |||
| 2418 | u64 val, cr0, cr4; | 2418 | u64 val, cr0, cr4; |
| 2419 | u32 base3; | 2419 | u32 base3; |
| 2420 | u16 selector; | 2420 | u16 selector; |
| 2421 | int i; | 2421 | int i, r; |
| 2422 | 2422 | ||
| 2423 | for (i = 0; i < 16; i++) | 2423 | for (i = 0; i < 16; i++) |
| 2424 | *reg_write(ctxt, i) = GET_SMSTATE(u64, smbase, 0x7ff8 - i * 8); | 2424 | *reg_write(ctxt, i) = GET_SMSTATE(u64, smbase, 0x7ff8 - i * 8); |
| @@ -2460,13 +2460,17 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase) | |||
| 2460 | dt.address = GET_SMSTATE(u64, smbase, 0x7e68); | 2460 | dt.address = GET_SMSTATE(u64, smbase, 0x7e68); |
| 2461 | ctxt->ops->set_gdt(ctxt, &dt); | 2461 | ctxt->ops->set_gdt(ctxt, &dt); |
| 2462 | 2462 | ||
| 2463 | r = rsm_enter_protected_mode(ctxt, cr0, cr4); | ||
| 2464 | if (r != X86EMUL_CONTINUE) | ||
| 2465 | return r; | ||
| 2466 | |||
| 2463 | for (i = 0; i < 6; i++) { | 2467 | for (i = 0; i < 6; i++) { |
| 2464 | int r = rsm_load_seg_64(ctxt, smbase, i); | 2468 | r = rsm_load_seg_64(ctxt, smbase, i); |
| 2465 | if (r != X86EMUL_CONTINUE) | 2469 | if (r != X86EMUL_CONTINUE) |
| 2466 | return r; | 2470 | return r; |
| 2467 | } | 2471 | } |
| 2468 | 2472 | ||
| 2469 | return rsm_enter_protected_mode(ctxt, cr0, cr4); | 2473 | return X86EMUL_CONTINUE; |
| 2470 | } | 2474 | } |
| 2471 | 2475 | ||
| 2472 | static int em_rsm(struct x86_emulate_ctxt *ctxt) | 2476 | static int em_rsm(struct x86_emulate_ctxt *ctxt) |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 69088a1ba509..ff606f507913 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
| @@ -3322,7 +3322,7 @@ walk_shadow_page_get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr, u64 *sptep) | |||
| 3322 | break; | 3322 | break; |
| 3323 | 3323 | ||
| 3324 | reserved |= is_shadow_zero_bits_set(&vcpu->arch.mmu, spte, | 3324 | reserved |= is_shadow_zero_bits_set(&vcpu->arch.mmu, spte, |
| 3325 | leaf); | 3325 | iterator.level); |
| 3326 | } | 3326 | } |
| 3327 | 3327 | ||
| 3328 | walk_shadow_page_lockless_end(vcpu); | 3328 | walk_shadow_page_lockless_end(vcpu); |
| @@ -3614,7 +3614,7 @@ static void | |||
| 3614 | __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, | 3614 | __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, |
| 3615 | struct rsvd_bits_validate *rsvd_check, | 3615 | struct rsvd_bits_validate *rsvd_check, |
| 3616 | int maxphyaddr, int level, bool nx, bool gbpages, | 3616 | int maxphyaddr, int level, bool nx, bool gbpages, |
| 3617 | bool pse) | 3617 | bool pse, bool amd) |
| 3618 | { | 3618 | { |
| 3619 | u64 exb_bit_rsvd = 0; | 3619 | u64 exb_bit_rsvd = 0; |
| 3620 | u64 gbpages_bit_rsvd = 0; | 3620 | u64 gbpages_bit_rsvd = 0; |
| @@ -3631,7 +3631,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, | |||
| 3631 | * Non-leaf PML4Es and PDPEs reserve bit 8 (which would be the G bit for | 3631 | * Non-leaf PML4Es and PDPEs reserve bit 8 (which would be the G bit for |
| 3632 | * leaf entries) on AMD CPUs only. | 3632 | * leaf entries) on AMD CPUs only. |
| 3633 | */ | 3633 | */ |
| 3634 | if (guest_cpuid_is_amd(vcpu)) | 3634 | if (amd) |
| 3635 | nonleaf_bit8_rsvd = rsvd_bits(8, 8); | 3635 | nonleaf_bit8_rsvd = rsvd_bits(8, 8); |
| 3636 | 3636 | ||
| 3637 | switch (level) { | 3637 | switch (level) { |
| @@ -3699,7 +3699,7 @@ static void reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, | |||
| 3699 | __reset_rsvds_bits_mask(vcpu, &context->guest_rsvd_check, | 3699 | __reset_rsvds_bits_mask(vcpu, &context->guest_rsvd_check, |
| 3700 | cpuid_maxphyaddr(vcpu), context->root_level, | 3700 | cpuid_maxphyaddr(vcpu), context->root_level, |
| 3701 | context->nx, guest_cpuid_has_gbpages(vcpu), | 3701 | context->nx, guest_cpuid_has_gbpages(vcpu), |
| 3702 | is_pse(vcpu)); | 3702 | is_pse(vcpu), guest_cpuid_is_amd(vcpu)); |
| 3703 | } | 3703 | } |
| 3704 | 3704 | ||
| 3705 | static void | 3705 | static void |
| @@ -3749,13 +3749,24 @@ static void reset_rsvds_bits_mask_ept(struct kvm_vcpu *vcpu, | |||
| 3749 | void | 3749 | void |
| 3750 | reset_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, struct kvm_mmu *context) | 3750 | reset_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, struct kvm_mmu *context) |
| 3751 | { | 3751 | { |
| 3752 | /* | ||
| 3753 | * Passing "true" to the last argument is okay; it adds a check | ||
| 3754 | * on bit 8 of the SPTEs which KVM doesn't use anyway. | ||
| 3755 | */ | ||
| 3752 | __reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check, | 3756 | __reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check, |
| 3753 | boot_cpu_data.x86_phys_bits, | 3757 | boot_cpu_data.x86_phys_bits, |
| 3754 | context->shadow_root_level, context->nx, | 3758 | context->shadow_root_level, context->nx, |
| 3755 | guest_cpuid_has_gbpages(vcpu), is_pse(vcpu)); | 3759 | guest_cpuid_has_gbpages(vcpu), is_pse(vcpu), |
| 3760 | true); | ||
| 3756 | } | 3761 | } |
| 3757 | EXPORT_SYMBOL_GPL(reset_shadow_zero_bits_mask); | 3762 | EXPORT_SYMBOL_GPL(reset_shadow_zero_bits_mask); |
| 3758 | 3763 | ||
| 3764 | static inline bool boot_cpu_is_amd(void) | ||
| 3765 | { | ||
| 3766 | WARN_ON_ONCE(!tdp_enabled); | ||
| 3767 | return shadow_x_mask == 0; | ||
| 3768 | } | ||
| 3769 | |||
| 3759 | /* | 3770 | /* |
| 3760 | * the direct page table on host, use as much mmu features as | 3771 | * the direct page table on host, use as much mmu features as |
| 3761 | * possible, however, kvm currently does not do execution-protection. | 3772 | * possible, however, kvm currently does not do execution-protection. |
| @@ -3764,11 +3775,11 @@ static void | |||
| 3764 | reset_tdp_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, | 3775 | reset_tdp_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, |
| 3765 | struct kvm_mmu *context) | 3776 | struct kvm_mmu *context) |
| 3766 | { | 3777 | { |
| 3767 | if (guest_cpuid_is_amd(vcpu)) | 3778 | if (boot_cpu_is_amd()) |
| 3768 | __reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check, | 3779 | __reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check, |
| 3769 | boot_cpu_data.x86_phys_bits, | 3780 | boot_cpu_data.x86_phys_bits, |
| 3770 | context->shadow_root_level, false, | 3781 | context->shadow_root_level, false, |
| 3771 | cpu_has_gbpages, true); | 3782 | cpu_has_gbpages, true, true); |
| 3772 | else | 3783 | else |
| 3773 | __reset_rsvds_bits_mask_ept(&context->shadow_zero_check, | 3784 | __reset_rsvds_bits_mask_ept(&context->shadow_zero_check, |
| 3774 | boot_cpu_data.x86_phys_bits, | 3785 | boot_cpu_data.x86_phys_bits, |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index fdb8cb63a6c0..2f9ed1ff0632 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
| @@ -202,6 +202,7 @@ module_param(npt, int, S_IRUGO); | |||
| 202 | static int nested = true; | 202 | static int nested = true; |
| 203 | module_param(nested, int, S_IRUGO); | 203 | module_param(nested, int, S_IRUGO); |
| 204 | 204 | ||
| 205 | static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0); | ||
| 205 | static void svm_flush_tlb(struct kvm_vcpu *vcpu); | 206 | static void svm_flush_tlb(struct kvm_vcpu *vcpu); |
| 206 | static void svm_complete_interrupts(struct vcpu_svm *svm); | 207 | static void svm_complete_interrupts(struct vcpu_svm *svm); |
| 207 | 208 | ||
| @@ -513,7 +514,7 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) | |||
| 513 | struct vcpu_svm *svm = to_svm(vcpu); | 514 | struct vcpu_svm *svm = to_svm(vcpu); |
| 514 | 515 | ||
| 515 | if (svm->vmcb->control.next_rip != 0) { | 516 | if (svm->vmcb->control.next_rip != 0) { |
| 516 | WARN_ON(!static_cpu_has(X86_FEATURE_NRIPS)); | 517 | WARN_ON_ONCE(!static_cpu_has(X86_FEATURE_NRIPS)); |
| 517 | svm->next_rip = svm->vmcb->control.next_rip; | 518 | svm->next_rip = svm->vmcb->control.next_rip; |
| 518 | } | 519 | } |
| 519 | 520 | ||
| @@ -865,64 +866,6 @@ static void svm_disable_lbrv(struct vcpu_svm *svm) | |||
| 865 | set_msr_interception(msrpm, MSR_IA32_LASTINTTOIP, 0, 0); | 866 | set_msr_interception(msrpm, MSR_IA32_LASTINTTOIP, 0, 0); |
| 866 | } | 867 | } |
| 867 | 868 | ||
| 868 | #define MTRR_TYPE_UC_MINUS 7 | ||
| 869 | #define MTRR2PROTVAL_INVALID 0xff | ||
| 870 | |||
| 871 | static u8 mtrr2protval[8]; | ||
| 872 | |||
| 873 | static u8 fallback_mtrr_type(int mtrr) | ||
| 874 | { | ||
| 875 | /* | ||
| 876 | * WT and WP aren't always available in the host PAT. Treat | ||
| 877 | * them as UC and UC- respectively. Everything else should be | ||
| 878 | * there. | ||
| 879 | */ | ||
| 880 | switch (mtrr) | ||
| 881 | { | ||
| 882 | case MTRR_TYPE_WRTHROUGH: | ||
| 883 | return MTRR_TYPE_UNCACHABLE; | ||
| 884 | case MTRR_TYPE_WRPROT: | ||
| 885 | return MTRR_TYPE_UC_MINUS; | ||
| 886 | default: | ||
| 887 | BUG(); | ||
| 888 | } | ||
| 889 | } | ||
| 890 | |||
| 891 | static void build_mtrr2protval(void) | ||
| 892 | { | ||
| 893 | int i; | ||
| 894 | u64 pat; | ||
| 895 | |||
| 896 | for (i = 0; i < 8; i++) | ||
| 897 | mtrr2protval[i] = MTRR2PROTVAL_INVALID; | ||
| 898 | |||
| 899 | /* Ignore the invalid MTRR types. */ | ||
| 900 | mtrr2protval[2] = 0; | ||
| 901 | mtrr2protval[3] = 0; | ||
| 902 | |||
| 903 | /* | ||
| 904 | * Use host PAT value to figure out the mapping from guest MTRR | ||
| 905 | * values to nested page table PAT/PCD/PWT values. We do not | ||
| 906 | * want to change the host PAT value every time we enter the | ||
| 907 | * guest. | ||
| 908 | */ | ||
| 909 | rdmsrl(MSR_IA32_CR_PAT, pat); | ||
| 910 | for (i = 0; i < 8; i++) { | ||
| 911 | u8 mtrr = pat >> (8 * i); | ||
| 912 | |||
| 913 | if (mtrr2protval[mtrr] == MTRR2PROTVAL_INVALID) | ||
| 914 | mtrr2protval[mtrr] = __cm_idx2pte(i); | ||
| 915 | } | ||
| 916 | |||
| 917 | for (i = 0; i < 8; i++) { | ||
| 918 | if (mtrr2protval[i] == MTRR2PROTVAL_INVALID) { | ||
| 919 | u8 fallback = fallback_mtrr_type(i); | ||
| 920 | mtrr2protval[i] = mtrr2protval[fallback]; | ||
| 921 | BUG_ON(mtrr2protval[i] == MTRR2PROTVAL_INVALID); | ||
| 922 | } | ||
| 923 | } | ||
| 924 | } | ||
| 925 | |||
| 926 | static __init int svm_hardware_setup(void) | 869 | static __init int svm_hardware_setup(void) |
| 927 | { | 870 | { |
| 928 | int cpu; | 871 | int cpu; |
| @@ -989,7 +932,6 @@ static __init int svm_hardware_setup(void) | |||
| 989 | } else | 932 | } else |
| 990 | kvm_disable_tdp(); | 933 | kvm_disable_tdp(); |
| 991 | 934 | ||
| 992 | build_mtrr2protval(); | ||
| 993 | return 0; | 935 | return 0; |
| 994 | 936 | ||
| 995 | err: | 937 | err: |
| @@ -1144,43 +1086,6 @@ static u64 svm_compute_tsc_offset(struct kvm_vcpu *vcpu, u64 target_tsc) | |||
| 1144 | return target_tsc - tsc; | 1086 | return target_tsc - tsc; |
| 1145 | } | 1087 | } |
| 1146 | 1088 | ||
| 1147 | static void svm_set_guest_pat(struct vcpu_svm *svm, u64 *g_pat) | ||
| 1148 | { | ||
| 1149 | struct kvm_vcpu *vcpu = &svm->vcpu; | ||
| 1150 | |||
| 1151 | /* Unlike Intel, AMD takes the guest's CR0.CD into account. | ||
| 1152 | * | ||
| 1153 | * AMD does not have IPAT. To emulate it for the case of guests | ||
| 1154 | * with no assigned devices, just set everything to WB. If guests | ||
| 1155 | * have assigned devices, however, we cannot force WB for RAM | ||
| 1156 | * pages only, so use the guest PAT directly. | ||
| 1157 | */ | ||
| 1158 | if (!kvm_arch_has_assigned_device(vcpu->kvm)) | ||
| 1159 | *g_pat = 0x0606060606060606; | ||
| 1160 | else | ||
| 1161 | *g_pat = vcpu->arch.pat; | ||
| 1162 | } | ||
| 1163 | |||
| 1164 | static u64 svm_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio) | ||
| 1165 | { | ||
| 1166 | u8 mtrr; | ||
| 1167 | |||
| 1168 | /* | ||
| 1169 | * 1. MMIO: trust guest MTRR, so same as item 3. | ||
| 1170 | * 2. No passthrough: always map as WB, and force guest PAT to WB as well | ||
| 1171 | * 3. Passthrough: can't guarantee the result, try to trust guest. | ||
| 1172 | */ | ||
| 1173 | if (!is_mmio && !kvm_arch_has_assigned_device(vcpu->kvm)) | ||
| 1174 | return 0; | ||
| 1175 | |||
| 1176 | if (!kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_CD_NW_CLEARED) && | ||
| 1177 | kvm_read_cr0(vcpu) & X86_CR0_CD) | ||
| 1178 | return _PAGE_NOCACHE; | ||
| 1179 | |||
| 1180 | mtrr = kvm_mtrr_get_guest_memory_type(vcpu, gfn); | ||
| 1181 | return mtrr2protval[mtrr]; | ||
| 1182 | } | ||
| 1183 | |||
| 1184 | static void init_vmcb(struct vcpu_svm *svm, bool init_event) | 1089 | static void init_vmcb(struct vcpu_svm *svm, bool init_event) |
| 1185 | { | 1090 | { |
| 1186 | struct vmcb_control_area *control = &svm->vmcb->control; | 1091 | struct vmcb_control_area *control = &svm->vmcb->control; |
| @@ -1263,7 +1168,8 @@ static void init_vmcb(struct vcpu_svm *svm, bool init_event) | |||
| 1263 | * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0. | 1168 | * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0. |
| 1264 | * It also updates the guest-visible cr0 value. | 1169 | * It also updates the guest-visible cr0 value. |
| 1265 | */ | 1170 | */ |
| 1266 | (void)kvm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET); | 1171 | svm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET); |
| 1172 | kvm_mmu_reset_context(&svm->vcpu); | ||
| 1267 | 1173 | ||
| 1268 | save->cr4 = X86_CR4_PAE; | 1174 | save->cr4 = X86_CR4_PAE; |
| 1269 | /* rdx = ?? */ | 1175 | /* rdx = ?? */ |
| @@ -1276,7 +1182,6 @@ static void init_vmcb(struct vcpu_svm *svm, bool init_event) | |||
| 1276 | clr_cr_intercept(svm, INTERCEPT_CR3_READ); | 1182 | clr_cr_intercept(svm, INTERCEPT_CR3_READ); |
| 1277 | clr_cr_intercept(svm, INTERCEPT_CR3_WRITE); | 1183 | clr_cr_intercept(svm, INTERCEPT_CR3_WRITE); |
| 1278 | save->g_pat = svm->vcpu.arch.pat; | 1184 | save->g_pat = svm->vcpu.arch.pat; |
| 1279 | svm_set_guest_pat(svm, &save->g_pat); | ||
| 1280 | save->cr3 = 0; | 1185 | save->cr3 = 0; |
| 1281 | save->cr4 = 0; | 1186 | save->cr4 = 0; |
| 1282 | } | 1187 | } |
| @@ -1671,10 +1576,13 @@ static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
| 1671 | 1576 | ||
| 1672 | if (!vcpu->fpu_active) | 1577 | if (!vcpu->fpu_active) |
| 1673 | cr0 |= X86_CR0_TS; | 1578 | cr0 |= X86_CR0_TS; |
| 1674 | 1579 | /* | |
| 1675 | /* These are emulated via page tables. */ | 1580 | * re-enable caching here because the QEMU bios |
| 1676 | cr0 &= ~(X86_CR0_CD | X86_CR0_NW); | 1581 | * does not do it - this results in some delay at |
| 1677 | 1582 | * reboot | |
| 1583 | */ | ||
| 1584 | if (kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_CD_NW_CLEARED)) | ||
| 1585 | cr0 &= ~(X86_CR0_CD | X86_CR0_NW); | ||
| 1678 | svm->vmcb->save.cr0 = cr0; | 1586 | svm->vmcb->save.cr0 = cr0; |
| 1679 | mark_dirty(svm->vmcb, VMCB_CR); | 1587 | mark_dirty(svm->vmcb, VMCB_CR); |
| 1680 | update_cr0_intercept(svm); | 1588 | update_cr0_intercept(svm); |
| @@ -3349,16 +3257,6 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) | |||
| 3349 | case MSR_VM_IGNNE: | 3257 | case MSR_VM_IGNNE: |
| 3350 | vcpu_unimpl(vcpu, "unimplemented wrmsr: 0x%x data 0x%llx\n", ecx, data); | 3258 | vcpu_unimpl(vcpu, "unimplemented wrmsr: 0x%x data 0x%llx\n", ecx, data); |
| 3351 | break; | 3259 | break; |
| 3352 | case MSR_IA32_CR_PAT: | ||
| 3353 | if (npt_enabled) { | ||
| 3354 | if (!kvm_mtrr_valid(vcpu, MSR_IA32_CR_PAT, data)) | ||
| 3355 | return 1; | ||
| 3356 | vcpu->arch.pat = data; | ||
| 3357 | svm_set_guest_pat(svm, &svm->vmcb->save.g_pat); | ||
| 3358 | mark_dirty(svm->vmcb, VMCB_NPT); | ||
| 3359 | break; | ||
| 3360 | } | ||
| 3361 | /* fall through */ | ||
| 3362 | default: | 3260 | default: |
| 3363 | return kvm_set_msr_common(vcpu, msr); | 3261 | return kvm_set_msr_common(vcpu, msr); |
| 3364 | } | 3262 | } |
| @@ -4193,6 +4091,11 @@ static bool svm_has_high_real_mode_segbase(void) | |||
| 4193 | return true; | 4091 | return true; |
| 4194 | } | 4092 | } |
| 4195 | 4093 | ||
| 4094 | static u64 svm_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio) | ||
| 4095 | { | ||
| 4096 | return 0; | ||
| 4097 | } | ||
| 4098 | |||
| 4196 | static void svm_cpuid_update(struct kvm_vcpu *vcpu) | 4099 | static void svm_cpuid_update(struct kvm_vcpu *vcpu) |
| 4197 | { | 4100 | { |
| 4198 | } | 4101 | } |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d01986832afc..6a8bc64566ab 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
| @@ -4105,17 +4105,13 @@ static void seg_setup(int seg) | |||
| 4105 | static int alloc_apic_access_page(struct kvm *kvm) | 4105 | static int alloc_apic_access_page(struct kvm *kvm) |
| 4106 | { | 4106 | { |
| 4107 | struct page *page; | 4107 | struct page *page; |
| 4108 | struct kvm_userspace_memory_region kvm_userspace_mem; | ||
| 4109 | int r = 0; | 4108 | int r = 0; |
| 4110 | 4109 | ||
| 4111 | mutex_lock(&kvm->slots_lock); | 4110 | mutex_lock(&kvm->slots_lock); |
| 4112 | if (kvm->arch.apic_access_page_done) | 4111 | if (kvm->arch.apic_access_page_done) |
| 4113 | goto out; | 4112 | goto out; |
| 4114 | kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT; | 4113 | r = __x86_set_memory_region(kvm, APIC_ACCESS_PAGE_PRIVATE_MEMSLOT, |
| 4115 | kvm_userspace_mem.flags = 0; | 4114 | APIC_DEFAULT_PHYS_BASE, PAGE_SIZE); |
| 4116 | kvm_userspace_mem.guest_phys_addr = APIC_DEFAULT_PHYS_BASE; | ||
| 4117 | kvm_userspace_mem.memory_size = PAGE_SIZE; | ||
| 4118 | r = __x86_set_memory_region(kvm, &kvm_userspace_mem); | ||
| 4119 | if (r) | 4115 | if (r) |
| 4120 | goto out; | 4116 | goto out; |
| 4121 | 4117 | ||
| @@ -4140,17 +4136,12 @@ static int alloc_identity_pagetable(struct kvm *kvm) | |||
| 4140 | { | 4136 | { |
| 4141 | /* Called with kvm->slots_lock held. */ | 4137 | /* Called with kvm->slots_lock held. */ |
| 4142 | 4138 | ||
| 4143 | struct kvm_userspace_memory_region kvm_userspace_mem; | ||
| 4144 | int r = 0; | 4139 | int r = 0; |
| 4145 | 4140 | ||
| 4146 | BUG_ON(kvm->arch.ept_identity_pagetable_done); | 4141 | BUG_ON(kvm->arch.ept_identity_pagetable_done); |
| 4147 | 4142 | ||
| 4148 | kvm_userspace_mem.slot = IDENTITY_PAGETABLE_PRIVATE_MEMSLOT; | 4143 | r = __x86_set_memory_region(kvm, IDENTITY_PAGETABLE_PRIVATE_MEMSLOT, |
| 4149 | kvm_userspace_mem.flags = 0; | 4144 | kvm->arch.ept_identity_map_addr, PAGE_SIZE); |
| 4150 | kvm_userspace_mem.guest_phys_addr = | ||
| 4151 | kvm->arch.ept_identity_map_addr; | ||
| 4152 | kvm_userspace_mem.memory_size = PAGE_SIZE; | ||
| 4153 | r = __x86_set_memory_region(kvm, &kvm_userspace_mem); | ||
| 4154 | 4145 | ||
| 4155 | return r; | 4146 | return r; |
| 4156 | } | 4147 | } |
| @@ -4949,14 +4940,9 @@ static int vmx_interrupt_allowed(struct kvm_vcpu *vcpu) | |||
| 4949 | static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr) | 4940 | static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr) |
| 4950 | { | 4941 | { |
| 4951 | int ret; | 4942 | int ret; |
| 4952 | struct kvm_userspace_memory_region tss_mem = { | ||
| 4953 | .slot = TSS_PRIVATE_MEMSLOT, | ||
| 4954 | .guest_phys_addr = addr, | ||
| 4955 | .memory_size = PAGE_SIZE * 3, | ||
| 4956 | .flags = 0, | ||
| 4957 | }; | ||
| 4958 | 4943 | ||
| 4959 | ret = x86_set_memory_region(kvm, &tss_mem); | 4944 | ret = x86_set_memory_region(kvm, TSS_PRIVATE_MEMSLOT, addr, |
| 4945 | PAGE_SIZE * 3); | ||
| 4960 | if (ret) | 4946 | if (ret) |
| 4961 | return ret; | 4947 | return ret; |
| 4962 | kvm->arch.tss_addr = addr; | 4948 | kvm->arch.tss_addr = addr; |
| @@ -6064,6 +6050,8 @@ static __init int hardware_setup(void) | |||
| 6064 | memcpy(vmx_msr_bitmap_longmode_x2apic, | 6050 | memcpy(vmx_msr_bitmap_longmode_x2apic, |
| 6065 | vmx_msr_bitmap_longmode, PAGE_SIZE); | 6051 | vmx_msr_bitmap_longmode, PAGE_SIZE); |
| 6066 | 6052 | ||
| 6053 | set_bit(0, vmx_vpid_bitmap); /* 0 is reserved for host */ | ||
| 6054 | |||
| 6067 | if (enable_apicv) { | 6055 | if (enable_apicv) { |
| 6068 | for (msr = 0x800; msr <= 0x8ff; msr++) | 6056 | for (msr = 0x800; msr <= 0x8ff; msr++) |
| 6069 | vmx_disable_intercept_msr_read_x2apic(msr); | 6057 | vmx_disable_intercept_msr_read_x2apic(msr); |
| @@ -8615,17 +8603,22 @@ static u64 vmx_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio) | |||
| 8615 | u64 ipat = 0; | 8603 | u64 ipat = 0; |
| 8616 | 8604 | ||
| 8617 | /* For VT-d and EPT combination | 8605 | /* For VT-d and EPT combination |
| 8618 | * 1. MMIO: guest may want to apply WC, trust it. | 8606 | * 1. MMIO: always map as UC |
| 8619 | * 2. EPT with VT-d: | 8607 | * 2. EPT with VT-d: |
| 8620 | * a. VT-d without snooping control feature: can't guarantee the | 8608 | * a. VT-d without snooping control feature: can't guarantee the |
| 8621 | * result, try to trust guest. So the same as item 1. | 8609 | * result, try to trust guest. |
| 8622 | * b. VT-d with snooping control feature: snooping control feature of | 8610 | * b. VT-d with snooping control feature: snooping control feature of |
| 8623 | * VT-d engine can guarantee the cache correctness. Just set it | 8611 | * VT-d engine can guarantee the cache correctness. Just set it |
| 8624 | * to WB to keep consistent with host. So the same as item 3. | 8612 | * to WB to keep consistent with host. So the same as item 3. |
| 8625 | * 3. EPT without VT-d: always map as WB and set IPAT=1 to keep | 8613 | * 3. EPT without VT-d: always map as WB and set IPAT=1 to keep |
| 8626 | * consistent with host MTRR | 8614 | * consistent with host MTRR |
| 8627 | */ | 8615 | */ |
| 8628 | if (!is_mmio && !kvm_arch_has_noncoherent_dma(vcpu->kvm)) { | 8616 | if (is_mmio) { |
| 8617 | cache = MTRR_TYPE_UNCACHABLE; | ||
| 8618 | goto exit; | ||
| 8619 | } | ||
| 8620 | |||
| 8621 | if (!kvm_arch_has_noncoherent_dma(vcpu->kvm)) { | ||
| 8629 | ipat = VMX_EPT_IPAT_BIT; | 8622 | ipat = VMX_EPT_IPAT_BIT; |
| 8630 | cache = MTRR_TYPE_WRBACK; | 8623 | cache = MTRR_TYPE_WRBACK; |
| 8631 | goto exit; | 8624 | goto exit; |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a60bdbccff51..9a9a19830321 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -149,6 +149,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { | |||
| 149 | { "nmi_window", VCPU_STAT(nmi_window_exits) }, | 149 | { "nmi_window", VCPU_STAT(nmi_window_exits) }, |
| 150 | { "halt_exits", VCPU_STAT(halt_exits) }, | 150 | { "halt_exits", VCPU_STAT(halt_exits) }, |
| 151 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, | 151 | { "halt_successful_poll", VCPU_STAT(halt_successful_poll) }, |
| 152 | { "halt_attempted_poll", VCPU_STAT(halt_attempted_poll) }, | ||
| 152 | { "halt_wakeup", VCPU_STAT(halt_wakeup) }, | 153 | { "halt_wakeup", VCPU_STAT(halt_wakeup) }, |
| 153 | { "hypercalls", VCPU_STAT(hypercalls) }, | 154 | { "hypercalls", VCPU_STAT(hypercalls) }, |
| 154 | { "request_irq", VCPU_STAT(request_irq_exits) }, | 155 | { "request_irq", VCPU_STAT(request_irq_exits) }, |
| @@ -1707,8 +1708,6 @@ static int kvm_guest_time_update(struct kvm_vcpu *v) | |||
| 1707 | vcpu->pvclock_set_guest_stopped_request = false; | 1708 | vcpu->pvclock_set_guest_stopped_request = false; |
| 1708 | } | 1709 | } |
| 1709 | 1710 | ||
| 1710 | pvclock_flags |= PVCLOCK_COUNTS_FROM_ZERO; | ||
| 1711 | |||
| 1712 | /* If the host uses TSC clocksource, then it is stable */ | 1711 | /* If the host uses TSC clocksource, then it is stable */ |
| 1713 | if (use_master_clock) | 1712 | if (use_master_clock) |
| 1714 | pvclock_flags |= PVCLOCK_TSC_STABLE_BIT; | 1713 | pvclock_flags |= PVCLOCK_TSC_STABLE_BIT; |
| @@ -2006,8 +2005,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) | |||
| 2006 | &vcpu->requests); | 2005 | &vcpu->requests); |
| 2007 | 2006 | ||
| 2008 | ka->boot_vcpu_runs_old_kvmclock = tmp; | 2007 | ka->boot_vcpu_runs_old_kvmclock = tmp; |
| 2009 | |||
| 2010 | ka->kvmclock_offset = -get_kernel_ns(); | ||
| 2011 | } | 2008 | } |
| 2012 | 2009 | ||
| 2013 | vcpu->arch.time = data; | 2010 | vcpu->arch.time = data; |
| @@ -2189,6 +2186,8 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) | |||
| 2189 | case MSR_IA32_LASTINTFROMIP: | 2186 | case MSR_IA32_LASTINTFROMIP: |
| 2190 | case MSR_IA32_LASTINTTOIP: | 2187 | case MSR_IA32_LASTINTTOIP: |
| 2191 | case MSR_K8_SYSCFG: | 2188 | case MSR_K8_SYSCFG: |
| 2189 | case MSR_K8_TSEG_ADDR: | ||
| 2190 | case MSR_K8_TSEG_MASK: | ||
| 2192 | case MSR_K7_HWCR: | 2191 | case MSR_K7_HWCR: |
| 2193 | case MSR_VM_HSAVE_PA: | 2192 | case MSR_VM_HSAVE_PA: |
| 2194 | case MSR_K8_INT_PENDING_MSG: | 2193 | case MSR_K8_INT_PENDING_MSG: |
| @@ -6454,6 +6453,12 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu) | |||
| 6454 | return 1; | 6453 | return 1; |
| 6455 | } | 6454 | } |
| 6456 | 6455 | ||
| 6456 | static inline bool kvm_vcpu_running(struct kvm_vcpu *vcpu) | ||
| 6457 | { | ||
| 6458 | return (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE && | ||
| 6459 | !vcpu->arch.apf.halted); | ||
| 6460 | } | ||
| 6461 | |||
| 6457 | static int vcpu_run(struct kvm_vcpu *vcpu) | 6462 | static int vcpu_run(struct kvm_vcpu *vcpu) |
| 6458 | { | 6463 | { |
| 6459 | int r; | 6464 | int r; |
| @@ -6462,8 +6467,7 @@ static int vcpu_run(struct kvm_vcpu *vcpu) | |||
| 6462 | vcpu->srcu_idx = srcu_read_lock(&kvm->srcu); | 6467 | vcpu->srcu_idx = srcu_read_lock(&kvm->srcu); |
| 6463 | 6468 | ||
| 6464 | for (;;) { | 6469 | for (;;) { |
| 6465 | if (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE && | 6470 | if (kvm_vcpu_running(vcpu)) |
| 6466 | !vcpu->arch.apf.halted) | ||
| 6467 | r = vcpu_enter_guest(vcpu); | 6471 | r = vcpu_enter_guest(vcpu); |
| 6468 | else | 6472 | else |
| 6469 | r = vcpu_block(kvm, vcpu); | 6473 | r = vcpu_block(kvm, vcpu); |
| @@ -7475,34 +7479,66 @@ void kvm_arch_sync_events(struct kvm *kvm) | |||
| 7475 | kvm_free_pit(kvm); | 7479 | kvm_free_pit(kvm); |
| 7476 | } | 7480 | } |
| 7477 | 7481 | ||
| 7478 | int __x86_set_memory_region(struct kvm *kvm, | 7482 | int __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, u32 size) |
| 7479 | const struct kvm_userspace_memory_region *mem) | ||
| 7480 | { | 7483 | { |
| 7481 | int i, r; | 7484 | int i, r; |
| 7485 | unsigned long hva; | ||
| 7486 | struct kvm_memslots *slots = kvm_memslots(kvm); | ||
| 7487 | struct kvm_memory_slot *slot, old; | ||
| 7482 | 7488 | ||
| 7483 | /* Called with kvm->slots_lock held. */ | 7489 | /* Called with kvm->slots_lock held. */ |
| 7484 | BUG_ON(mem->slot >= KVM_MEM_SLOTS_NUM); | 7490 | if (WARN_ON(id >= KVM_MEM_SLOTS_NUM)) |
| 7491 | return -EINVAL; | ||
| 7485 | 7492 | ||
| 7493 | slot = id_to_memslot(slots, id); | ||
| 7494 | if (size) { | ||
| 7495 | if (WARN_ON(slot->npages)) | ||
| 7496 | return -EEXIST; | ||
| 7497 | |||
| 7498 | /* | ||
| 7499 | * MAP_SHARED to prevent internal slot pages from being moved | ||
| 7500 | * by fork()/COW. | ||
| 7501 | */ | ||
| 7502 | hva = vm_mmap(NULL, 0, size, PROT_READ | PROT_WRITE, | ||
| 7503 | MAP_SHARED | MAP_ANONYMOUS, 0); | ||
| 7504 | if (IS_ERR((void *)hva)) | ||
| 7505 | return PTR_ERR((void *)hva); | ||
| 7506 | } else { | ||
| 7507 | if (!slot->npages) | ||
| 7508 | return 0; | ||
| 7509 | |||
| 7510 | hva = 0; | ||
| 7511 | } | ||
| 7512 | |||
| 7513 | old = *slot; | ||
| 7486 | for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++) { | 7514 | for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++) { |
| 7487 | struct kvm_userspace_memory_region m = *mem; | 7515 | struct kvm_userspace_memory_region m; |
| 7488 | 7516 | ||
| 7489 | m.slot |= i << 16; | 7517 | m.slot = id | (i << 16); |
| 7518 | m.flags = 0; | ||
| 7519 | m.guest_phys_addr = gpa; | ||
| 7520 | m.userspace_addr = hva; | ||
| 7521 | m.memory_size = size; | ||
| 7490 | r = __kvm_set_memory_region(kvm, &m); | 7522 | r = __kvm_set_memory_region(kvm, &m); |
| 7491 | if (r < 0) | 7523 | if (r < 0) |
| 7492 | return r; | 7524 | return r; |
| 7493 | } | 7525 | } |
| 7494 | 7526 | ||
| 7527 | if (!size) { | ||
| 7528 | r = vm_munmap(old.userspace_addr, old.npages * PAGE_SIZE); | ||
| 7529 | WARN_ON(r < 0); | ||
| 7530 | } | ||
| 7531 | |||
| 7495 | return 0; | 7532 | return 0; |
| 7496 | } | 7533 | } |
| 7497 | EXPORT_SYMBOL_GPL(__x86_set_memory_region); | 7534 | EXPORT_SYMBOL_GPL(__x86_set_memory_region); |
| 7498 | 7535 | ||
| 7499 | int x86_set_memory_region(struct kvm *kvm, | 7536 | int x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, u32 size) |
| 7500 | const struct kvm_userspace_memory_region *mem) | ||
| 7501 | { | 7537 | { |
| 7502 | int r; | 7538 | int r; |
| 7503 | 7539 | ||
| 7504 | mutex_lock(&kvm->slots_lock); | 7540 | mutex_lock(&kvm->slots_lock); |
| 7505 | r = __x86_set_memory_region(kvm, mem); | 7541 | r = __x86_set_memory_region(kvm, id, gpa, size); |
| 7506 | mutex_unlock(&kvm->slots_lock); | 7542 | mutex_unlock(&kvm->slots_lock); |
| 7507 | 7543 | ||
| 7508 | return r; | 7544 | return r; |
| @@ -7517,16 +7553,9 @@ void kvm_arch_destroy_vm(struct kvm *kvm) | |||
| 7517 | * unless the the memory map has changed due to process exit | 7553 | * unless the the memory map has changed due to process exit |
| 7518 | * or fd copying. | 7554 | * or fd copying. |
| 7519 | */ | 7555 | */ |
| 7520 | struct kvm_userspace_memory_region mem; | 7556 | x86_set_memory_region(kvm, APIC_ACCESS_PAGE_PRIVATE_MEMSLOT, 0, 0); |
| 7521 | memset(&mem, 0, sizeof(mem)); | 7557 | x86_set_memory_region(kvm, IDENTITY_PAGETABLE_PRIVATE_MEMSLOT, 0, 0); |
| 7522 | mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT; | 7558 | x86_set_memory_region(kvm, TSS_PRIVATE_MEMSLOT, 0, 0); |
| 7523 | x86_set_memory_region(kvm, &mem); | ||
| 7524 | |||
| 7525 | mem.slot = IDENTITY_PAGETABLE_PRIVATE_MEMSLOT; | ||
| 7526 | x86_set_memory_region(kvm, &mem); | ||
| 7527 | |||
| 7528 | mem.slot = TSS_PRIVATE_MEMSLOT; | ||
| 7529 | x86_set_memory_region(kvm, &mem); | ||
| 7530 | } | 7559 | } |
| 7531 | kvm_iommu_unmap_guest(kvm); | 7560 | kvm_iommu_unmap_guest(kvm); |
| 7532 | kfree(kvm->arch.vpic); | 7561 | kfree(kvm->arch.vpic); |
| @@ -7629,27 +7658,6 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, | |||
| 7629 | const struct kvm_userspace_memory_region *mem, | 7658 | const struct kvm_userspace_memory_region *mem, |
| 7630 | enum kvm_mr_change change) | 7659 | enum kvm_mr_change change) |
| 7631 | { | 7660 | { |
| 7632 | /* | ||
| 7633 | * Only private memory slots need to be mapped here since | ||
| 7634 | * KVM_SET_MEMORY_REGION ioctl is no longer supported. | ||
| 7635 | */ | ||
| 7636 | if ((memslot->id >= KVM_USER_MEM_SLOTS) && (change == KVM_MR_CREATE)) { | ||
| 7637 | unsigned long userspace_addr; | ||
| 7638 | |||
| 7639 | /* | ||
| 7640 | * MAP_SHARED to prevent internal slot pages from being moved | ||
| 7641 | * by fork()/COW. | ||
| 7642 | */ | ||
| 7643 | userspace_addr = vm_mmap(NULL, 0, memslot->npages * PAGE_SIZE, | ||
| 7644 | PROT_READ | PROT_WRITE, | ||
| 7645 | MAP_SHARED | MAP_ANONYMOUS, 0); | ||
| 7646 | |||
| 7647 | if (IS_ERR((void *)userspace_addr)) | ||
| 7648 | return PTR_ERR((void *)userspace_addr); | ||
| 7649 | |||
| 7650 | memslot->userspace_addr = userspace_addr; | ||
| 7651 | } | ||
| 7652 | |||
| 7653 | return 0; | 7661 | return 0; |
| 7654 | } | 7662 | } |
| 7655 | 7663 | ||
| @@ -7711,17 +7719,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm, | |||
| 7711 | { | 7719 | { |
| 7712 | int nr_mmu_pages = 0; | 7720 | int nr_mmu_pages = 0; |
| 7713 | 7721 | ||
| 7714 | if (change == KVM_MR_DELETE && old->id >= KVM_USER_MEM_SLOTS) { | ||
| 7715 | int ret; | ||
| 7716 | |||
| 7717 | ret = vm_munmap(old->userspace_addr, | ||
| 7718 | old->npages * PAGE_SIZE); | ||
| 7719 | if (ret < 0) | ||
| 7720 | printk(KERN_WARNING | ||
| 7721 | "kvm_vm_ioctl_set_memory_region: " | ||
| 7722 | "failed to munmap memory\n"); | ||
| 7723 | } | ||
| 7724 | |||
| 7725 | if (!kvm->arch.n_requested_mmu_pages) | 7722 | if (!kvm->arch.n_requested_mmu_pages) |
| 7726 | nr_mmu_pages = kvm_mmu_calculate_mmu_pages(kvm); | 7723 | nr_mmu_pages = kvm_mmu_calculate_mmu_pages(kvm); |
| 7727 | 7724 | ||
| @@ -7770,19 +7767,36 @@ void kvm_arch_flush_shadow_memslot(struct kvm *kvm, | |||
| 7770 | kvm_mmu_invalidate_zap_all_pages(kvm); | 7767 | kvm_mmu_invalidate_zap_all_pages(kvm); |
| 7771 | } | 7768 | } |
| 7772 | 7769 | ||
| 7770 | static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu) | ||
| 7771 | { | ||
| 7772 | if (!list_empty_careful(&vcpu->async_pf.done)) | ||
| 7773 | return true; | ||
| 7774 | |||
| 7775 | if (kvm_apic_has_events(vcpu)) | ||
| 7776 | return true; | ||
| 7777 | |||
| 7778 | if (vcpu->arch.pv.pv_unhalted) | ||
| 7779 | return true; | ||
| 7780 | |||
| 7781 | if (atomic_read(&vcpu->arch.nmi_queued)) | ||
| 7782 | return true; | ||
| 7783 | |||
| 7784 | if (test_bit(KVM_REQ_SMI, &vcpu->requests)) | ||
| 7785 | return true; | ||
| 7786 | |||
| 7787 | if (kvm_arch_interrupt_allowed(vcpu) && | ||
| 7788 | kvm_cpu_has_interrupt(vcpu)) | ||
| 7789 | return true; | ||
| 7790 | |||
| 7791 | return false; | ||
| 7792 | } | ||
| 7793 | |||
| 7773 | int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) | 7794 | int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) |
| 7774 | { | 7795 | { |
| 7775 | if (is_guest_mode(vcpu) && kvm_x86_ops->check_nested_events) | 7796 | if (is_guest_mode(vcpu) && kvm_x86_ops->check_nested_events) |
| 7776 | kvm_x86_ops->check_nested_events(vcpu, false); | 7797 | kvm_x86_ops->check_nested_events(vcpu, false); |
| 7777 | 7798 | ||
| 7778 | return (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE && | 7799 | return kvm_vcpu_running(vcpu) || kvm_vcpu_has_events(vcpu); |
| 7779 | !vcpu->arch.apf.halted) | ||
| 7780 | || !list_empty_careful(&vcpu->async_pf.done) | ||
| 7781 | || kvm_apic_has_events(vcpu) | ||
| 7782 | || vcpu->arch.pv.pv_unhalted | ||
| 7783 | || atomic_read(&vcpu->arch.nmi_queued) || | ||
| 7784 | (kvm_arch_interrupt_allowed(vcpu) && | ||
| 7785 | kvm_cpu_has_interrupt(vcpu)); | ||
| 7786 | } | 7800 | } |
| 7787 | 7801 | ||
| 7788 | int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu) | 7802 | int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu) |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 161804de124a..a0d09f6c6533 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
| @@ -1015,7 +1015,7 @@ static struct clock_event_device lguest_clockevent = { | |||
| 1015 | * This is the Guest timer interrupt handler (hardware interrupt 0). We just | 1015 | * This is the Guest timer interrupt handler (hardware interrupt 0). We just |
| 1016 | * call the clockevent infrastructure and it does whatever needs doing. | 1016 | * call the clockevent infrastructure and it does whatever needs doing. |
| 1017 | */ | 1017 | */ |
| 1018 | static void lguest_time_irq(unsigned int irq, struct irq_desc *desc) | 1018 | static void lguest_time_irq(struct irq_desc *desc) |
| 1019 | { | 1019 | { |
| 1020 | unsigned long flags; | 1020 | unsigned long flags; |
| 1021 | 1021 | ||
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 30564e2752d3..df48430c279b 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
| @@ -1132,7 +1132,7 @@ void mark_rodata_ro(void) | |||
| 1132 | * has been zapped already via cleanup_highmem(). | 1132 | * has been zapped already via cleanup_highmem(). |
| 1133 | */ | 1133 | */ |
| 1134 | all_end = roundup((unsigned long)_brk_end, PMD_SIZE); | 1134 | all_end = roundup((unsigned long)_brk_end, PMD_SIZE); |
| 1135 | set_memory_nx(rodata_start, (all_end - rodata_start) >> PAGE_SHIFT); | 1135 | set_memory_nx(text_end, (all_end - text_end) >> PAGE_SHIFT); |
| 1136 | 1136 | ||
| 1137 | rodata_test(); | 1137 | rodata_test(); |
| 1138 | 1138 | ||
diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 66338a60aa6e..c2aea63bee20 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm/srat.c | |||
| @@ -192,10 +192,11 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) | |||
| 192 | 192 | ||
| 193 | node_set(node, numa_nodes_parsed); | 193 | node_set(node, numa_nodes_parsed); |
| 194 | 194 | ||
| 195 | pr_info("SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]%s\n", | 195 | pr_info("SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]%s%s\n", |
| 196 | node, pxm, | 196 | node, pxm, |
| 197 | (unsigned long long) start, (unsigned long long) end - 1, | 197 | (unsigned long long) start, (unsigned long long) end - 1, |
| 198 | hotpluggable ? " hotplug" : ""); | 198 | hotpluggable ? " hotplug" : "", |
| 199 | ma->flags & ACPI_SRAT_MEM_NON_VOLATILE ? " non-volatile" : ""); | ||
| 199 | 200 | ||
| 200 | /* Mark hotplug range in memblock. */ | 201 | /* Mark hotplug range in memblock. */ |
| 201 | if (hotpluggable && memblock_mark_hotplug(start, ma->length)) | 202 | if (hotpluggable && memblock_mark_hotplug(start, ma->length)) |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 09d3afc0a181..dc78a4a9a466 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
| @@ -166,6 +166,7 @@ void pcibios_fixup_bus(struct pci_bus *b) | |||
| 166 | { | 166 | { |
| 167 | struct pci_dev *dev; | 167 | struct pci_dev *dev; |
| 168 | 168 | ||
| 169 | pci_read_bridge_bases(b); | ||
| 169 | list_for_each_entry(dev, &b->devices, bus_list) | 170 | list_for_each_entry(dev, &b->devices, bus_list) |
| 170 | pcibios_fixup_device_resources(dev); | 171 | pcibios_fixup_device_resources(dev); |
| 171 | } | 172 | } |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 1db84c0758b7..6a28ded74211 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
| @@ -705,6 +705,70 @@ out: | |||
| 705 | } | 705 | } |
| 706 | 706 | ||
| 707 | /* | 707 | /* |
| 708 | * Iterate the EFI memory map in reverse order because the regions | ||
| 709 | * will be mapped top-down. The end result is the same as if we had | ||
| 710 | * mapped things forward, but doesn't require us to change the | ||
| 711 | * existing implementation of efi_map_region(). | ||
| 712 | */ | ||
| 713 | static inline void *efi_map_next_entry_reverse(void *entry) | ||
| 714 | { | ||
| 715 | /* Initial call */ | ||
| 716 | if (!entry) | ||
| 717 | return memmap.map_end - memmap.desc_size; | ||
| 718 | |||
| 719 | entry -= memmap.desc_size; | ||
| 720 | if (entry < memmap.map) | ||
| 721 | return NULL; | ||
| 722 | |||
| 723 | return entry; | ||
| 724 | } | ||
| 725 | |||
| 726 | /* | ||
| 727 | * efi_map_next_entry - Return the next EFI memory map descriptor | ||
| 728 | * @entry: Previous EFI memory map descriptor | ||
| 729 | * | ||
| 730 | * This is a helper function to iterate over the EFI memory map, which | ||
| 731 | * we do in different orders depending on the current configuration. | ||
| 732 | * | ||
| 733 | * To begin traversing the memory map @entry must be %NULL. | ||
| 734 | * | ||
| 735 | * Returns %NULL when we reach the end of the memory map. | ||
| 736 | */ | ||
| 737 | static void *efi_map_next_entry(void *entry) | ||
| 738 | { | ||
| 739 | if (!efi_enabled(EFI_OLD_MEMMAP) && efi_enabled(EFI_64BIT)) { | ||
| 740 | /* | ||
| 741 | * Starting in UEFI v2.5 the EFI_PROPERTIES_TABLE | ||
| 742 | * config table feature requires us to map all entries | ||
| 743 | * in the same order as they appear in the EFI memory | ||
| 744 | * map. That is to say, entry N must have a lower | ||
| 745 | * virtual address than entry N+1. This is because the | ||
| 746 | * firmware toolchain leaves relative references in | ||
| 747 | * the code/data sections, which are split and become | ||
| 748 | * separate EFI memory regions. Mapping things | ||
| 749 | * out-of-order leads to the firmware accessing | ||
| 750 | * unmapped addresses. | ||
| 751 | * | ||
| 752 | * Since we need to map things this way whether or not | ||
| 753 | * the kernel actually makes use of | ||
| 754 | * EFI_PROPERTIES_TABLE, let's just switch to this | ||
| 755 | * scheme by default for 64-bit. | ||
| 756 | */ | ||
| 757 | return efi_map_next_entry_reverse(entry); | ||
| 758 | } | ||
| 759 | |||
| 760 | /* Initial call */ | ||
| 761 | if (!entry) | ||
| 762 | return memmap.map; | ||
| 763 | |||
| 764 | entry += memmap.desc_size; | ||
| 765 | if (entry >= memmap.map_end) | ||
| 766 | return NULL; | ||
| 767 | |||
| 768 | return entry; | ||
| 769 | } | ||
| 770 | |||
| 771 | /* | ||
| 708 | * Map the efi memory ranges of the runtime services and update new_mmap with | 772 | * Map the efi memory ranges of the runtime services and update new_mmap with |
| 709 | * virtual addresses. | 773 | * virtual addresses. |
| 710 | */ | 774 | */ |
| @@ -714,7 +778,8 @@ static void * __init efi_map_regions(int *count, int *pg_shift) | |||
| 714 | unsigned long left = 0; | 778 | unsigned long left = 0; |
| 715 | efi_memory_desc_t *md; | 779 | efi_memory_desc_t *md; |
| 716 | 780 | ||
| 717 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { | 781 | p = NULL; |
| 782 | while ((p = efi_map_next_entry(p))) { | ||
| 718 | md = p; | 783 | md = p; |
| 719 | if (!(md->attribute & EFI_MEMORY_RUNTIME)) { | 784 | if (!(md->attribute & EFI_MEMORY_RUNTIME)) { |
| 720 | #ifdef CONFIG_X86_64 | 785 | #ifdef CONFIG_X86_64 |
diff --git a/arch/x86/um/ldt.c b/arch/x86/um/ldt.c index 9701a4fd7bf2..836a1eb5df43 100644 --- a/arch/x86/um/ldt.c +++ b/arch/x86/um/ldt.c | |||
| @@ -12,7 +12,10 @@ | |||
| 12 | #include <skas.h> | 12 | #include <skas.h> |
| 13 | #include <sysdep/tls.h> | 13 | #include <sysdep/tls.h> |
| 14 | 14 | ||
| 15 | extern int modify_ldt(int func, void *ptr, unsigned long bytecount); | 15 | static inline int modify_ldt (int func, void *ptr, unsigned long bytecount) |
| 16 | { | ||
| 17 | return syscall(__NR_modify_ldt, func, ptr, bytecount); | ||
| 18 | } | ||
| 16 | 19 | ||
| 17 | static long write_ldt_entry(struct mm_id *mm_idp, int func, | 20 | static long write_ldt_entry(struct mm_id *mm_idp, int func, |
| 18 | struct user_desc *desc, void **addr, int done) | 21 | struct user_desc *desc, void **addr, int done) |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 30d12afe52ed..993b7a71386d 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
| @@ -33,6 +33,10 @@ | |||
| 33 | #include <linux/memblock.h> | 33 | #include <linux/memblock.h> |
| 34 | #include <linux/edd.h> | 34 | #include <linux/edd.h> |
| 35 | 35 | ||
| 36 | #ifdef CONFIG_KEXEC_CORE | ||
| 37 | #include <linux/kexec.h> | ||
| 38 | #endif | ||
| 39 | |||
| 36 | #include <xen/xen.h> | 40 | #include <xen/xen.h> |
| 37 | #include <xen/events.h> | 41 | #include <xen/events.h> |
| 38 | #include <xen/interface/xen.h> | 42 | #include <xen/interface/xen.h> |
| @@ -1077,6 +1081,7 @@ static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high) | |||
| 1077 | /* Fast syscall setup is all done in hypercalls, so | 1081 | /* Fast syscall setup is all done in hypercalls, so |
| 1078 | these are all ignored. Stub them out here to stop | 1082 | these are all ignored. Stub them out here to stop |
| 1079 | Xen console noise. */ | 1083 | Xen console noise. */ |
| 1084 | break; | ||
| 1080 | 1085 | ||
| 1081 | default: | 1086 | default: |
| 1082 | if (!pmu_msr_write(msr, low, high, &ret)) | 1087 | if (!pmu_msr_write(msr, low, high, &ret)) |
| @@ -1807,6 +1812,21 @@ static struct notifier_block xen_hvm_cpu_notifier = { | |||
| 1807 | .notifier_call = xen_hvm_cpu_notify, | 1812 | .notifier_call = xen_hvm_cpu_notify, |
| 1808 | }; | 1813 | }; |
| 1809 | 1814 | ||
| 1815 | #ifdef CONFIG_KEXEC_CORE | ||
| 1816 | static void xen_hvm_shutdown(void) | ||
| 1817 | { | ||
| 1818 | native_machine_shutdown(); | ||
| 1819 | if (kexec_in_progress) | ||
| 1820 | xen_reboot(SHUTDOWN_soft_reset); | ||
| 1821 | } | ||
| 1822 | |||
| 1823 | static void xen_hvm_crash_shutdown(struct pt_regs *regs) | ||
| 1824 | { | ||
| 1825 | native_machine_crash_shutdown(regs); | ||
| 1826 | xen_reboot(SHUTDOWN_soft_reset); | ||
| 1827 | } | ||
| 1828 | #endif | ||
| 1829 | |||
| 1810 | static void __init xen_hvm_guest_init(void) | 1830 | static void __init xen_hvm_guest_init(void) |
| 1811 | { | 1831 | { |
| 1812 | if (xen_pv_domain()) | 1832 | if (xen_pv_domain()) |
| @@ -1826,6 +1846,10 @@ static void __init xen_hvm_guest_init(void) | |||
| 1826 | x86_init.irqs.intr_init = xen_init_IRQ; | 1846 | x86_init.irqs.intr_init = xen_init_IRQ; |
| 1827 | xen_hvm_init_time_ops(); | 1847 | xen_hvm_init_time_ops(); |
| 1828 | xen_hvm_init_mmu_ops(); | 1848 | xen_hvm_init_mmu_ops(); |
| 1849 | #ifdef CONFIG_KEXEC_CORE | ||
| 1850 | machine_ops.shutdown = xen_hvm_shutdown; | ||
| 1851 | machine_ops.crash_shutdown = xen_hvm_crash_shutdown; | ||
| 1852 | #endif | ||
| 1829 | } | 1853 | } |
| 1830 | #endif | 1854 | #endif |
| 1831 | 1855 | ||
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index bfc08b13044b..660b3cfef234 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
| @@ -112,6 +112,15 @@ static unsigned long *p2m_identity; | |||
| 112 | static pte_t *p2m_missing_pte; | 112 | static pte_t *p2m_missing_pte; |
| 113 | static pte_t *p2m_identity_pte; | 113 | static pte_t *p2m_identity_pte; |
| 114 | 114 | ||
| 115 | /* | ||
| 116 | * Hint at last populated PFN. | ||
| 117 | * | ||
| 118 | * Used to set HYPERVISOR_shared_info->arch.max_pfn so the toolstack | ||
| 119 | * can avoid scanning the whole P2M (which may be sized to account for | ||
| 120 | * hotplugged memory). | ||
| 121 | */ | ||
| 122 | static unsigned long xen_p2m_last_pfn; | ||
| 123 | |||
| 115 | static inline unsigned p2m_top_index(unsigned long pfn) | 124 | static inline unsigned p2m_top_index(unsigned long pfn) |
| 116 | { | 125 | { |
| 117 | BUG_ON(pfn >= MAX_P2M_PFN); | 126 | BUG_ON(pfn >= MAX_P2M_PFN); |
| @@ -270,7 +279,7 @@ void xen_setup_mfn_list_list(void) | |||
| 270 | else | 279 | else |
| 271 | HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = | 280 | HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = |
| 272 | virt_to_mfn(p2m_top_mfn); | 281 | virt_to_mfn(p2m_top_mfn); |
| 273 | HYPERVISOR_shared_info->arch.max_pfn = xen_max_p2m_pfn; | 282 | HYPERVISOR_shared_info->arch.max_pfn = xen_p2m_last_pfn; |
| 274 | HYPERVISOR_shared_info->arch.p2m_generation = 0; | 283 | HYPERVISOR_shared_info->arch.p2m_generation = 0; |
| 275 | HYPERVISOR_shared_info->arch.p2m_vaddr = (unsigned long)xen_p2m_addr; | 284 | HYPERVISOR_shared_info->arch.p2m_vaddr = (unsigned long)xen_p2m_addr; |
| 276 | HYPERVISOR_shared_info->arch.p2m_cr3 = | 285 | HYPERVISOR_shared_info->arch.p2m_cr3 = |
| @@ -406,6 +415,8 @@ void __init xen_vmalloc_p2m_tree(void) | |||
| 406 | static struct vm_struct vm; | 415 | static struct vm_struct vm; |
| 407 | unsigned long p2m_limit; | 416 | unsigned long p2m_limit; |
| 408 | 417 | ||
| 418 | xen_p2m_last_pfn = xen_max_p2m_pfn; | ||
| 419 | |||
| 409 | p2m_limit = (phys_addr_t)P2M_LIMIT * 1024 * 1024 * 1024 / PAGE_SIZE; | 420 | p2m_limit = (phys_addr_t)P2M_LIMIT * 1024 * 1024 * 1024 / PAGE_SIZE; |
| 410 | vm.flags = VM_ALLOC; | 421 | vm.flags = VM_ALLOC; |
| 411 | vm.size = ALIGN(sizeof(unsigned long) * max(xen_max_p2m_pfn, p2m_limit), | 422 | vm.size = ALIGN(sizeof(unsigned long) * max(xen_max_p2m_pfn, p2m_limit), |
| @@ -608,6 +619,12 @@ static bool alloc_p2m(unsigned long pfn) | |||
| 608 | free_p2m_page(p2m); | 619 | free_p2m_page(p2m); |
| 609 | } | 620 | } |
| 610 | 621 | ||
| 622 | /* Expanded the p2m? */ | ||
| 623 | if (pfn > xen_p2m_last_pfn) { | ||
| 624 | xen_p2m_last_pfn = pfn; | ||
| 625 | HYPERVISOR_shared_info->arch.max_pfn = xen_p2m_last_pfn; | ||
| 626 | } | ||
| 627 | |||
| 611 | return true; | 628 | return true; |
| 612 | } | 629 | } |
| 613 | 630 | ||
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index f5ef6746d47a..1c30e4ab1022 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
| @@ -548,7 +548,7 @@ static unsigned long __init xen_get_max_pages(void) | |||
| 548 | { | 548 | { |
| 549 | unsigned long max_pages, limit; | 549 | unsigned long max_pages, limit; |
| 550 | domid_t domid = DOMID_SELF; | 550 | domid_t domid = DOMID_SELF; |
| 551 | int ret; | 551 | long ret; |
| 552 | 552 | ||
| 553 | limit = xen_get_pages_limit(); | 553 | limit = xen_get_pages_limit(); |
| 554 | max_pages = limit; | 554 | max_pages = limit; |
| @@ -798,7 +798,7 @@ char * __init xen_memory_setup(void) | |||
| 798 | xen_ignore_unusable(); | 798 | xen_ignore_unusable(); |
| 799 | 799 | ||
| 800 | /* Make sure the Xen-supplied memory map is well-ordered. */ | 800 | /* Make sure the Xen-supplied memory map is well-ordered. */ |
| 801 | sanitize_e820_map(xen_e820_map, xen_e820_map_entries, | 801 | sanitize_e820_map(xen_e820_map, ARRAY_SIZE(xen_e820_map), |
| 802 | &xen_e820_map_entries); | 802 | &xen_e820_map_entries); |
| 803 | 803 | ||
| 804 | max_pages = xen_get_max_pages(); | 804 | max_pages = xen_get_max_pages(); |
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild index 63c223dff5f1..b56855a1382a 100644 --- a/arch/xtensa/include/asm/Kbuild +++ b/arch/xtensa/include/asm/Kbuild | |||
| @@ -28,4 +28,5 @@ generic-y += statfs.h | |||
| 28 | generic-y += termios.h | 28 | generic-y += termios.h |
| 29 | generic-y += topology.h | 29 | generic-y += topology.h |
| 30 | generic-y += trace_clock.h | 30 | generic-y += trace_clock.h |
| 31 | generic-y += word-at-a-time.h | ||
| 31 | generic-y += xor.h | 32 | generic-y += xor.h |
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index d27b4dcf221f..b848cc3dc913 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c | |||
| @@ -210,6 +210,10 @@ subsys_initcall(pcibios_init); | |||
| 210 | 210 | ||
| 211 | void pcibios_fixup_bus(struct pci_bus *bus) | 211 | void pcibios_fixup_bus(struct pci_bus *bus) |
| 212 | { | 212 | { |
| 213 | if (bus->parent) { | ||
| 214 | /* This is a subordinate bridge */ | ||
| 215 | pci_read_bridge_bases(bus); | ||
| 216 | } | ||
| 213 | } | 217 | } |
| 214 | 218 | ||
| 215 | void pcibios_set_master(struct pci_dev *dev) | 219 | void pcibios_set_master(struct pci_dev *dev) |
