diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-27 17:14:08 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-27 17:14:08 -0400 |
commit | f6248dd88dba3aeb19351410a027d92eee7ceb72 (patch) | |
tree | 9dfe33ca030186ffd5007784d0647a8306d41be9 | |
parent | 880a66275ef4d1e08e5d4dcf4cec768de18c68ef (diff) | |
parent | 02cb489be7ad07e74ab40baa908d2e20460ebdb2 (diff) |
Merge branches 'acpi-pm' and 'acpi-numa'
* acpi-pm:
ACPI / PM / EC: Flush all EC work in acpi_freeze_sync()
ACPI / EC: Add parameter to force disable the GPE on suspend
* acpi-numa:
ACPI: NUMA: Fix typo in the full name of SRAT
ACPI: NUMA: add missing include in acpi_numa.h
452 files changed, 11725 insertions, 4379 deletions
diff --git a/Documentation/devicetree/bindings/net/brcm,amac.txt b/Documentation/devicetree/bindings/net/brcm,amac.txt index 2fefa1a44afd..ad16c1f481f7 100644 --- a/Documentation/devicetree/bindings/net/brcm,amac.txt +++ b/Documentation/devicetree/bindings/net/brcm,amac.txt | |||
@@ -11,6 +11,7 @@ Required properties: | |||
11 | - reg-names: Names of the registers. | 11 | - reg-names: Names of the registers. |
12 | "amac_base": Address and length of the GMAC registers | 12 | "amac_base": Address and length of the GMAC registers |
13 | "idm_base": Address and length of the GMAC IDM registers | 13 | "idm_base": Address and length of the GMAC IDM registers |
14 | (required for NSP and Northstar2) | ||
14 | "nicpm_base": Address and length of the NIC Port Manager | 15 | "nicpm_base": Address and length of the NIC Port Manager |
15 | registers (required for Northstar2) | 16 | registers (required for Northstar2) |
16 | - interrupts: Interrupt number | 17 | - interrupts: Interrupt number |
diff --git a/Documentation/devicetree/bindings/net/brcm,bgmac-nsp.txt b/Documentation/devicetree/bindings/net/brcm,bgmac-nsp.txt deleted file mode 100644 index 022946caa7e2..000000000000 --- a/Documentation/devicetree/bindings/net/brcm,bgmac-nsp.txt +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | Broadcom GMAC Ethernet Controller Device Tree Bindings | ||
2 | ------------------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "brcm,bgmac-nsp" | ||
6 | - reg: Address and length of the GMAC registers, | ||
7 | Address and length of the GMAC IDM registers | ||
8 | - reg-names: Names of the registers. Must have both "gmac_base" and | ||
9 | "idm_base" | ||
10 | - interrupts: Interrupt number | ||
11 | |||
12 | Optional properties: | ||
13 | - mac-address: See ethernet.txt file in the same directory | ||
14 | |||
15 | Examples: | ||
16 | |||
17 | gmac0: ethernet@18022000 { | ||
18 | compatible = "brcm,bgmac-nsp"; | ||
19 | reg = <0x18022000 0x1000>, | ||
20 | <0x18110000 0x1000>; | ||
21 | reg-names = "gmac_base", "idm_base"; | ||
22 | interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>; | ||
23 | status = "disabled"; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt b/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt index 194926f77194..1ff02afdc55a 100644 --- a/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt +++ b/Documentation/devicetree/bindings/nvmem/rockchip-efuse.txt | |||
@@ -4,7 +4,7 @@ Required properties: | |||
4 | - compatible: Should be one of the following. | 4 | - compatible: Should be one of the following. |
5 | - "rockchip,rk3066a-efuse" - for RK3066a SoCs. | 5 | - "rockchip,rk3066a-efuse" - for RK3066a SoCs. |
6 | - "rockchip,rk3188-efuse" - for RK3188 SoCs. | 6 | - "rockchip,rk3188-efuse" - for RK3188 SoCs. |
7 | - "rockchip,rk322x-efuse" - for RK322x SoCs. | 7 | - "rockchip,rk3228-efuse" - for RK3228 SoCs. |
8 | - "rockchip,rk3288-efuse" - for RK3288 SoCs. | 8 | - "rockchip,rk3288-efuse" - for RK3288 SoCs. |
9 | - "rockchip,rk3399-efuse" - for RK3399 SoCs. | 9 | - "rockchip,rk3399-efuse" - for RK3399 SoCs. |
10 | - reg: Should contain the registers location and exact eFuse size | 10 | - reg: Should contain the registers location and exact eFuse size |
diff --git a/Documentation/devicetree/bindings/ptp/brcm,ptp-dte.txt b/Documentation/devicetree/bindings/ptp/brcm,ptp-dte.txt index 07590bcdad15..7c04e22a5d6a 100644 --- a/Documentation/devicetree/bindings/ptp/brcm,ptp-dte.txt +++ b/Documentation/devicetree/bindings/ptp/brcm,ptp-dte.txt | |||
@@ -1,13 +1,20 @@ | |||
1 | * Broadcom Digital Timing Engine(DTE) based PTP clock driver | 1 | * Broadcom Digital Timing Engine(DTE) based PTP clock |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: should be "brcm,ptp-dte" | 4 | - compatible: should contain the core compatibility string |
5 | and the SoC compatibility string. The SoC | ||
6 | compatibility string is to handle SoC specific | ||
7 | hardware differences. | ||
8 | Core compatibility string: | ||
9 | "brcm,ptp-dte" | ||
10 | SoC compatibility strings: | ||
11 | "brcm,iproc-ptp-dte" - for iproc based SoC's | ||
5 | - reg: address and length of the DTE block's NCO registers | 12 | - reg: address and length of the DTE block's NCO registers |
6 | 13 | ||
7 | Example: | 14 | Example: |
8 | 15 | ||
9 | ptp_dte: ptp_dte@180af650 { | 16 | ptp: ptp-dte@180af650 { |
10 | compatible = "brcm,ptp-dte"; | 17 | compatible = "brcm,iproc-ptp-dte", "brcm,ptp-dte"; |
11 | reg = <0x180af650 0x10>; | 18 | reg = <0x180af650 0x10>; |
12 | status = "okay"; | 19 | status = "okay"; |
13 | }; | 20 | }; |
diff --git a/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt b/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt index e6b572409cf5..574c3a2c77d5 100644 --- a/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt +++ b/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt | |||
@@ -9,7 +9,6 @@ Optional properties: | |||
9 | - fsl,irda-mode : Indicate the uart supports irda mode | 9 | - fsl,irda-mode : Indicate the uart supports irda mode |
10 | - fsl,dte-mode : Indicate the uart works in DTE mode. The uart works | 10 | - fsl,dte-mode : Indicate the uart works in DTE mode. The uart works |
11 | in DCE mode by default. | 11 | in DCE mode by default. |
12 | - fsl,dma-size : Indicate the size of the DMA buffer and its periods | ||
13 | 12 | ||
14 | Please check Documentation/devicetree/bindings/serial/serial.txt | 13 | Please check Documentation/devicetree/bindings/serial/serial.txt |
15 | for the complete list of generic properties. | 14 | for the complete list of generic properties. |
@@ -29,5 +28,4 @@ uart1: serial@73fbc000 { | |||
29 | interrupts = <31>; | 28 | interrupts = <31>; |
30 | uart-has-rtscts; | 29 | uart-has-rtscts; |
31 | fsl,dte-mode; | 30 | fsl,dte-mode; |
32 | fsl,dma-size = <1024 4>; | ||
33 | }; | 31 | }; |
diff --git a/MAINTAINERS b/MAINTAINERS index 205d3977ac46..f66488dfdbc9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -205,7 +205,6 @@ F: include/net/9p/ | |||
205 | F: include/uapi/linux/virtio_9p.h | 205 | F: include/uapi/linux/virtio_9p.h |
206 | F: include/trace/events/9p.h | 206 | F: include/trace/events/9p.h |
207 | 207 | ||
208 | |||
209 | A8293 MEDIA DRIVER | 208 | A8293 MEDIA DRIVER |
210 | M: Antti Palosaari <crope@iki.fi> | 209 | M: Antti Palosaari <crope@iki.fi> |
211 | L: linux-media@vger.kernel.org | 210 | L: linux-media@vger.kernel.org |
@@ -492,13 +491,6 @@ S: Maintained | |||
492 | F: Documentation/hwmon/adt7475 | 491 | F: Documentation/hwmon/adt7475 |
493 | F: drivers/hwmon/adt7475.c | 492 | F: drivers/hwmon/adt7475.c |
494 | 493 | ||
495 | ADXL34X THREE-AXIS DIGITAL ACCELEROMETER DRIVER (ADXL345/ADXL346) | ||
496 | M: Michael Hennerich <michael.hennerich@analog.com> | ||
497 | W: http://wiki.analog.com/ADXL345 | ||
498 | W: http://ez.analog.com/community/linux-device-drivers | ||
499 | S: Supported | ||
500 | F: drivers/input/misc/adxl34x.c | ||
501 | |||
502 | ADVANSYS SCSI DRIVER | 494 | ADVANSYS SCSI DRIVER |
503 | M: Matthew Wilcox <matthew@wil.cx> | 495 | M: Matthew Wilcox <matthew@wil.cx> |
504 | M: Hannes Reinecke <hare@suse.com> | 496 | M: Hannes Reinecke <hare@suse.com> |
@@ -507,6 +499,13 @@ S: Maintained | |||
507 | F: Documentation/scsi/advansys.txt | 499 | F: Documentation/scsi/advansys.txt |
508 | F: drivers/scsi/advansys.c | 500 | F: drivers/scsi/advansys.c |
509 | 501 | ||
502 | ADXL34X THREE-AXIS DIGITAL ACCELEROMETER DRIVER (ADXL345/ADXL346) | ||
503 | M: Michael Hennerich <michael.hennerich@analog.com> | ||
504 | W: http://wiki.analog.com/ADXL345 | ||
505 | W: http://ez.analog.com/community/linux-device-drivers | ||
506 | S: Supported | ||
507 | F: drivers/input/misc/adxl34x.c | ||
508 | |||
510 | AEDSP16 DRIVER | 509 | AEDSP16 DRIVER |
511 | M: Riccardo Facchetti <fizban@tin.it> | 510 | M: Riccardo Facchetti <fizban@tin.it> |
512 | S: Maintained | 511 | S: Maintained |
@@ -808,6 +807,12 @@ W: http://blackfin.uclinux.org/ | |||
808 | S: Supported | 807 | S: Supported |
809 | F: sound/soc/blackfin/* | 808 | F: sound/soc/blackfin/* |
810 | 809 | ||
810 | ANALOG DEVICES INC DMA DRIVERS | ||
811 | M: Lars-Peter Clausen <lars@metafoo.de> | ||
812 | W: http://ez.analog.com/community/linux-device-drivers | ||
813 | S: Supported | ||
814 | F: drivers/dma/dma-axi-dmac.c | ||
815 | |||
811 | ANALOG DEVICES INC IIO DRIVERS | 816 | ANALOG DEVICES INC IIO DRIVERS |
812 | M: Lars-Peter Clausen <lars@metafoo.de> | 817 | M: Lars-Peter Clausen <lars@metafoo.de> |
813 | M: Michael Hennerich <Michael.Hennerich@analog.com> | 818 | M: Michael Hennerich <Michael.Hennerich@analog.com> |
@@ -820,12 +825,6 @@ X: drivers/iio/*/adjd* | |||
820 | F: drivers/staging/iio/*/ad* | 825 | F: drivers/staging/iio/*/ad* |
821 | F: drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 826 | F: drivers/staging/iio/trigger/iio-trig-bfin-timer.c |
822 | 827 | ||
823 | ANALOG DEVICES INC DMA DRIVERS | ||
824 | M: Lars-Peter Clausen <lars@metafoo.de> | ||
825 | W: http://ez.analog.com/community/linux-device-drivers | ||
826 | S: Supported | ||
827 | F: drivers/dma/dma-axi-dmac.c | ||
828 | |||
829 | ANDROID CONFIG FRAGMENTS | 828 | ANDROID CONFIG FRAGMENTS |
830 | M: Rob Herring <robh@kernel.org> | 829 | M: Rob Herring <robh@kernel.org> |
831 | S: Supported | 830 | S: Supported |
@@ -872,6 +871,15 @@ F: include/linux/apm_bios.h | |||
872 | F: include/uapi/linux/apm_bios.h | 871 | F: include/uapi/linux/apm_bios.h |
873 | F: drivers/char/apm-emulation.c | 872 | F: drivers/char/apm-emulation.c |
874 | 873 | ||
874 | APPARMOR SECURITY MODULE | ||
875 | M: John Johansen <john.johansen@canonical.com> | ||
876 | L: apparmor@lists.ubuntu.com (subscribers-only, general discussion) | ||
877 | W: apparmor.wiki.kernel.org | ||
878 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jj/apparmor-dev.git | ||
879 | S: Supported | ||
880 | F: security/apparmor/ | ||
881 | F: Documentation/admin-guide/LSM/apparmor.rst | ||
882 | |||
875 | APPLE BCM5974 MULTITOUCH DRIVER | 883 | APPLE BCM5974 MULTITOUCH DRIVER |
876 | M: Henrik Rydberg <rydberg@bitmath.org> | 884 | M: Henrik Rydberg <rydberg@bitmath.org> |
877 | L: linux-input@vger.kernel.org | 885 | L: linux-input@vger.kernel.org |
@@ -895,6 +903,18 @@ M: Duc Dang <dhdang@apm.com> | |||
895 | S: Supported | 903 | S: Supported |
896 | F: arch/arm64/boot/dts/apm/ | 904 | F: arch/arm64/boot/dts/apm/ |
897 | 905 | ||
906 | APPLIED MICRO (APM) X-GENE SOC EDAC | ||
907 | M: Loc Ho <lho@apm.com> | ||
908 | S: Supported | ||
909 | F: drivers/edac/xgene_edac.c | ||
910 | F: Documentation/devicetree/bindings/edac/apm-xgene-edac.txt | ||
911 | |||
912 | APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER | ||
913 | M: Iyappan Subramanian <isubramanian@apm.com> | ||
914 | M: Keyur Chudgar <kchudgar@apm.com> | ||
915 | S: Supported | ||
916 | F: drivers/net/ethernet/apm/xgene-v2/ | ||
917 | |||
898 | APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER | 918 | APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER |
899 | M: Iyappan Subramanian <isubramanian@apm.com> | 919 | M: Iyappan Subramanian <isubramanian@apm.com> |
900 | M: Keyur Chudgar <kchudgar@apm.com> | 920 | M: Keyur Chudgar <kchudgar@apm.com> |
@@ -905,12 +925,6 @@ F: drivers/net/phy/mdio-xgene.c | |||
905 | F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt | 925 | F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt |
906 | F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt | 926 | F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt |
907 | 927 | ||
908 | APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER | ||
909 | M: Iyappan Subramanian <isubramanian@apm.com> | ||
910 | M: Keyur Chudgar <kchudgar@apm.com> | ||
911 | S: Supported | ||
912 | F: drivers/net/ethernet/apm/xgene-v2/ | ||
913 | |||
914 | APPLIED MICRO (APM) X-GENE SOC PMU | 928 | APPLIED MICRO (APM) X-GENE SOC PMU |
915 | M: Tai Nguyen <ttnguyen@apm.com> | 929 | M: Tai Nguyen <ttnguyen@apm.com> |
916 | S: Supported | 930 | S: Supported |
@@ -930,6 +944,12 @@ S: Maintained | |||
930 | F: drivers/video/fbdev/arcfb.c | 944 | F: drivers/video/fbdev/arcfb.c |
931 | F: drivers/video/fbdev/core/fb_defio.c | 945 | F: drivers/video/fbdev/core/fb_defio.c |
932 | 946 | ||
947 | ARC PGU DRM DRIVER | ||
948 | M: Alexey Brodkin <abrodkin@synopsys.com> | ||
949 | S: Supported | ||
950 | F: drivers/gpu/drm/arc/ | ||
951 | F: Documentation/devicetree/bindings/display/snps,arcpgu.txt | ||
952 | |||
933 | ARCNET NETWORK LAYER | 953 | ARCNET NETWORK LAYER |
934 | M: Michael Grzeschik <m.grzeschik@pengutronix.de> | 954 | M: Michael Grzeschik <m.grzeschik@pengutronix.de> |
935 | L: netdev@vger.kernel.org | 955 | L: netdev@vger.kernel.org |
@@ -937,12 +957,6 @@ S: Maintained | |||
937 | F: drivers/net/arcnet/ | 957 | F: drivers/net/arcnet/ |
938 | F: include/uapi/linux/if_arcnet.h | 958 | F: include/uapi/linux/if_arcnet.h |
939 | 959 | ||
940 | ARC PGU DRM DRIVER | ||
941 | M: Alexey Brodkin <abrodkin@synopsys.com> | ||
942 | S: Supported | ||
943 | F: drivers/gpu/drm/arc/ | ||
944 | F: Documentation/devicetree/bindings/display/snps,arcpgu.txt | ||
945 | |||
946 | ARM ARCHITECTED TIMER DRIVER | 960 | ARM ARCHITECTED TIMER DRIVER |
947 | M: Mark Rutland <mark.rutland@arm.com> | 961 | M: Mark Rutland <mark.rutland@arm.com> |
948 | M: Marc Zyngier <marc.zyngier@arm.com> | 962 | M: Marc Zyngier <marc.zyngier@arm.com> |
@@ -995,18 +1009,17 @@ S: Maintained | |||
995 | T: git git://git.armlinux.org.uk/~rmk/linux-arm.git | 1009 | T: git git://git.armlinux.org.uk/~rmk/linux-arm.git |
996 | F: arch/arm/ | 1010 | F: arch/arm/ |
997 | 1011 | ||
998 | ARM SUB-ARCHITECTURES | ||
999 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1000 | S: Maintained | ||
1001 | F: arch/arm/mach-*/ | ||
1002 | F: arch/arm/plat-*/ | ||
1003 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git | ||
1004 | |||
1005 | ARM PRIMECELL AACI PL041 DRIVER | 1012 | ARM PRIMECELL AACI PL041 DRIVER |
1006 | M: Russell King <linux@armlinux.org.uk> | 1013 | M: Russell King <linux@armlinux.org.uk> |
1007 | S: Maintained | 1014 | S: Maintained |
1008 | F: sound/arm/aaci.* | 1015 | F: sound/arm/aaci.* |
1009 | 1016 | ||
1017 | ARM PRIMECELL BUS SUPPORT | ||
1018 | M: Russell King <linux@armlinux.org.uk> | ||
1019 | S: Maintained | ||
1020 | F: drivers/amba/ | ||
1021 | F: include/linux/amba/bus.h | ||
1022 | |||
1010 | ARM PRIMECELL CLCD PL110 DRIVER | 1023 | ARM PRIMECELL CLCD PL110 DRIVER |
1011 | M: Russell King <linux@armlinux.org.uk> | 1024 | M: Russell King <linux@armlinux.org.uk> |
1012 | S: Maintained | 1025 | S: Maintained |
@@ -1030,11 +1043,22 @@ S: Maintained | |||
1030 | F: drivers/tty/serial/amba-pl01*.c | 1043 | F: drivers/tty/serial/amba-pl01*.c |
1031 | F: include/linux/amba/serial.h | 1044 | F: include/linux/amba/serial.h |
1032 | 1045 | ||
1033 | ARM PRIMECELL BUS SUPPORT | 1046 | ARM SMMU DRIVERS |
1034 | M: Russell King <linux@armlinux.org.uk> | 1047 | M: Will Deacon <will.deacon@arm.com> |
1048 | R: Robin Murphy <robin.murphy@arm.com> | ||
1049 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1035 | S: Maintained | 1050 | S: Maintained |
1036 | F: drivers/amba/ | 1051 | F: drivers/iommu/arm-smmu.c |
1037 | F: include/linux/amba/bus.h | 1052 | F: drivers/iommu/arm-smmu-v3.c |
1053 | F: drivers/iommu/io-pgtable-arm.c | ||
1054 | F: drivers/iommu/io-pgtable-arm-v7s.c | ||
1055 | |||
1056 | ARM SUB-ARCHITECTURES | ||
1057 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1058 | S: Maintained | ||
1059 | F: arch/arm/mach-*/ | ||
1060 | F: arch/arm/plat-*/ | ||
1061 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git | ||
1038 | 1062 | ||
1039 | ARM/ACTIONS SEMI ARCHITECTURE | 1063 | ARM/ACTIONS SEMI ARCHITECTURE |
1040 | M: Andreas Färber <afaerber@suse.de> | 1064 | M: Andreas Färber <afaerber@suse.de> |
@@ -1067,6 +1091,11 @@ M: Lennert Buytenhek <kernel@wantstofly.org> | |||
1067 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1091 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1068 | S: Maintained | 1092 | S: Maintained |
1069 | 1093 | ||
1094 | ARM/Allwinner SoC Clock Support | ||
1095 | M: Emilio López <emilio@elopez.com.ar> | ||
1096 | S: Maintained | ||
1097 | F: drivers/clk/sunxi/ | ||
1098 | |||
1070 | ARM/Allwinner sunXi SoC support | 1099 | ARM/Allwinner sunXi SoC support |
1071 | M: Maxime Ripard <maxime.ripard@free-electrons.com> | 1100 | M: Maxime Ripard <maxime.ripard@free-electrons.com> |
1072 | M: Chen-Yu Tsai <wens@csie.org> | 1101 | M: Chen-Yu Tsai <wens@csie.org> |
@@ -1081,10 +1110,15 @@ F: drivers/pinctrl/sunxi/ | |||
1081 | F: drivers/soc/sunxi/ | 1110 | F: drivers/soc/sunxi/ |
1082 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git | 1111 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git |
1083 | 1112 | ||
1084 | ARM/Allwinner SoC Clock Support | 1113 | ARM/Amlogic Meson SoC CLOCK FRAMEWORK |
1085 | M: Emilio López <emilio@elopez.com.ar> | 1114 | M: Neil Armstrong <narmstrong@baylibre.com> |
1115 | M: Jerome Brunet <jbrunet@baylibre.com> | ||
1116 | L: linux-amlogic@lists.infradead.org | ||
1086 | S: Maintained | 1117 | S: Maintained |
1087 | F: drivers/clk/sunxi/ | 1118 | F: drivers/clk/meson/ |
1119 | F: include/dt-bindings/clock/meson* | ||
1120 | F: include/dt-bindings/clock/gxbb* | ||
1121 | F: Documentation/devicetree/bindings/clock/amlogic* | ||
1088 | 1122 | ||
1089 | ARM/Amlogic Meson SoC support | 1123 | ARM/Amlogic Meson SoC support |
1090 | M: Carlo Caione <carlo@caione.org> | 1124 | M: Carlo Caione <carlo@caione.org> |
@@ -1096,20 +1130,10 @@ S: Maintained | |||
1096 | F: arch/arm/mach-meson/ | 1130 | F: arch/arm/mach-meson/ |
1097 | F: arch/arm/boot/dts/meson* | 1131 | F: arch/arm/boot/dts/meson* |
1098 | F: arch/arm64/boot/dts/amlogic/ | 1132 | F: arch/arm64/boot/dts/amlogic/ |
1099 | F: drivers/pinctrl/meson/ | 1133 | F: drivers/pinctrl/meson/ |
1100 | F: drivers/mmc/host/meson* | 1134 | F: drivers/mmc/host/meson* |
1101 | N: meson | 1135 | N: meson |
1102 | 1136 | ||
1103 | ARM/Amlogic Meson SoC CLOCK FRAMEWORK | ||
1104 | M: Neil Armstrong <narmstrong@baylibre.com> | ||
1105 | M: Jerome Brunet <jbrunet@baylibre.com> | ||
1106 | L: linux-amlogic@lists.infradead.org | ||
1107 | S: Maintained | ||
1108 | F: drivers/clk/meson/ | ||
1109 | F: include/dt-bindings/clock/meson* | ||
1110 | F: include/dt-bindings/clock/gxbb* | ||
1111 | F: Documentation/devicetree/bindings/clock/amlogic* | ||
1112 | |||
1113 | ARM/Annapurna Labs ALPINE ARCHITECTURE | 1137 | ARM/Annapurna Labs ALPINE ARCHITECTURE |
1114 | M: Tsahee Zidenberg <tsahee@annapurnalabs.com> | 1138 | M: Tsahee Zidenberg <tsahee@annapurnalabs.com> |
1115 | M: Antoine Tenart <antoine.tenart@free-electrons.com> | 1139 | M: Antoine Tenart <antoine.tenart@free-electrons.com> |
@@ -1132,13 +1156,6 @@ F: drivers/clk/axis | |||
1132 | F: drivers/pinctrl/pinctrl-artpec* | 1156 | F: drivers/pinctrl/pinctrl-artpec* |
1133 | F: Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt | 1157 | F: Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt |
1134 | 1158 | ||
1135 | ARM/ASPEED MACHINE SUPPORT | ||
1136 | M: Joel Stanley <joel@jms.id.au> | ||
1137 | S: Maintained | ||
1138 | F: arch/arm/mach-aspeed/ | ||
1139 | F: arch/arm/boot/dts/aspeed-* | ||
1140 | F: drivers/*/*aspeed* | ||
1141 | |||
1142 | ARM/ASPEED I2C DRIVER | 1159 | ARM/ASPEED I2C DRIVER |
1143 | M: Brendan Higgins <brendanhiggins@google.com> | 1160 | M: Brendan Higgins <brendanhiggins@google.com> |
1144 | R: Benjamin Herrenschmidt <benh@kernel.crashing.org> | 1161 | R: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
@@ -1151,6 +1168,18 @@ F: drivers/i2c/busses/i2c-aspeed.c | |||
1151 | F: Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-i2c-ic.txt | 1168 | F: Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2400-i2c-ic.txt |
1152 | F: Documentation/devicetree/bindings/i2c/i2c-aspeed.txt | 1169 | F: Documentation/devicetree/bindings/i2c/i2c-aspeed.txt |
1153 | 1170 | ||
1171 | ARM/ASPEED MACHINE SUPPORT | ||
1172 | M: Joel Stanley <joel@jms.id.au> | ||
1173 | S: Maintained | ||
1174 | F: arch/arm/mach-aspeed/ | ||
1175 | F: arch/arm/boot/dts/aspeed-* | ||
1176 | F: drivers/*/*aspeed* | ||
1177 | |||
1178 | ARM/ATMEL AT91 Clock Support | ||
1179 | M: Boris Brezillon <boris.brezillon@free-electrons.com> | ||
1180 | S: Maintained | ||
1181 | F: drivers/clk/at91 | ||
1182 | |||
1154 | ARM/ATMEL AT91RM9200, AT91SAM9 AND SAMA5 SOC SUPPORT | 1183 | ARM/ATMEL AT91RM9200, AT91SAM9 AND SAMA5 SOC SUPPORT |
1155 | M: Nicolas Ferre <nicolas.ferre@microchip.com> | 1184 | M: Nicolas Ferre <nicolas.ferre@microchip.com> |
1156 | M: Alexandre Belloni <alexandre.belloni@free-electrons.com> | 1185 | M: Alexandre Belloni <alexandre.belloni@free-electrons.com> |
@@ -1167,11 +1196,6 @@ F: arch/arm/boot/dts/sama*.dtsi | |||
1167 | F: arch/arm/include/debug/at91.S | 1196 | F: arch/arm/include/debug/at91.S |
1168 | F: drivers/memory/atmel* | 1197 | F: drivers/memory/atmel* |
1169 | 1198 | ||
1170 | ARM/ATMEL AT91 Clock Support | ||
1171 | M: Boris Brezillon <boris.brezillon@free-electrons.com> | ||
1172 | S: Maintained | ||
1173 | F: drivers/clk/at91 | ||
1174 | |||
1175 | ARM/CALXEDA HIGHBANK ARCHITECTURE | 1199 | ARM/CALXEDA HIGHBANK ARCHITECTURE |
1176 | M: Rob Herring <robh@kernel.org> | 1200 | M: Rob Herring <robh@kernel.org> |
1177 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1201 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -1198,6 +1222,11 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |||
1198 | S: Odd Fixes | 1222 | S: Odd Fixes |
1199 | N: clps711x | 1223 | N: clps711x |
1200 | 1224 | ||
1225 | ARM/CIRRUS LOGIC EDB9315A MACHINE SUPPORT | ||
1226 | M: Lennert Buytenhek <kernel@wantstofly.org> | ||
1227 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1228 | S: Maintained | ||
1229 | |||
1201 | ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE | 1230 | ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE |
1202 | M: Hartley Sweeten <hsweeten@visionengravers.com> | 1231 | M: Hartley Sweeten <hsweeten@visionengravers.com> |
1203 | M: Alexander Sverdlin <alexander.sverdlin@gmail.com> | 1232 | M: Alexander Sverdlin <alexander.sverdlin@gmail.com> |
@@ -1206,11 +1235,6 @@ S: Maintained | |||
1206 | F: arch/arm/mach-ep93xx/ | 1235 | F: arch/arm/mach-ep93xx/ |
1207 | F: arch/arm/mach-ep93xx/include/mach/ | 1236 | F: arch/arm/mach-ep93xx/include/mach/ |
1208 | 1237 | ||
1209 | ARM/CIRRUS LOGIC EDB9315A MACHINE SUPPORT | ||
1210 | M: Lennert Buytenhek <kernel@wantstofly.org> | ||
1211 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1212 | S: Maintained | ||
1213 | |||
1214 | ARM/CLKDEV SUPPORT | 1238 | ARM/CLKDEV SUPPORT |
1215 | M: Russell King <linux@armlinux.org.uk> | 1239 | M: Russell King <linux@armlinux.org.uk> |
1216 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1240 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -1224,6 +1248,13 @@ M: Mike Rapoport <mike@compulab.co.il> | |||
1224 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1248 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1225 | S: Maintained | 1249 | S: Maintained |
1226 | 1250 | ||
1251 | ARM/CONEXANT DIGICOLOR MACHINE SUPPORT | ||
1252 | M: Baruch Siach <baruch@tkos.co.il> | ||
1253 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1254 | S: Maintained | ||
1255 | F: arch/arm/boot/dts/cx92755* | ||
1256 | N: digicolor | ||
1257 | |||
1227 | ARM/CONTEC MICRO9 MACHINE SUPPORT | 1258 | ARM/CONTEC MICRO9 MACHINE SUPPORT |
1228 | M: Hubert Feurstein <hubert.feurstein@contec.at> | 1259 | M: Hubert Feurstein <hubert.feurstein@contec.at> |
1229 | S: Maintained | 1260 | S: Maintained |
@@ -1269,13 +1300,6 @@ F: drivers/clocksource/timer-prima2.c | |||
1269 | F: drivers/clocksource/timer-atlas7.c | 1300 | F: drivers/clocksource/timer-atlas7.c |
1270 | N: [^a-z]sirf | 1301 | N: [^a-z]sirf |
1271 | 1302 | ||
1272 | ARM/CONEXANT DIGICOLOR MACHINE SUPPORT | ||
1273 | M: Baruch Siach <baruch@tkos.co.il> | ||
1274 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1275 | S: Maintained | ||
1276 | F: arch/arm/boot/dts/cx92755* | ||
1277 | N: digicolor | ||
1278 | |||
1279 | ARM/EBSA110 MACHINE SUPPORT | 1303 | ARM/EBSA110 MACHINE SUPPORT |
1280 | M: Russell King <linux@armlinux.org.uk> | 1304 | M: Russell King <linux@armlinux.org.uk> |
1281 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1305 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -1389,6 +1413,11 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |||
1389 | S: Maintained | 1413 | S: Maintained |
1390 | F: arch/arm/mach-pxa/colibri-pxa270-income.c | 1414 | F: arch/arm/mach-pxa/colibri-pxa270-income.c |
1391 | 1415 | ||
1416 | ARM/INTEL IOP13XX ARM ARCHITECTURE | ||
1417 | M: Lennert Buytenhek <kernel@wantstofly.org> | ||
1418 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1419 | S: Maintained | ||
1420 | |||
1392 | ARM/INTEL IOP32X ARM ARCHITECTURE | 1421 | ARM/INTEL IOP32X ARM ARCHITECTURE |
1393 | M: Lennert Buytenhek <kernel@wantstofly.org> | 1422 | M: Lennert Buytenhek <kernel@wantstofly.org> |
1394 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1423 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -1398,11 +1427,6 @@ ARM/INTEL IOP33X ARM ARCHITECTURE | |||
1398 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1427 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1399 | S: Orphan | 1428 | S: Orphan |
1400 | 1429 | ||
1401 | ARM/INTEL IOP13XX ARM ARCHITECTURE | ||
1402 | M: Lennert Buytenhek <kernel@wantstofly.org> | ||
1403 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1404 | S: Maintained | ||
1405 | |||
1406 | ARM/INTEL IQ81342EX MACHINE SUPPORT | 1430 | ARM/INTEL IQ81342EX MACHINE SUPPORT |
1407 | M: Lennert Buytenhek <kernel@wantstofly.org> | 1431 | M: Lennert Buytenhek <kernel@wantstofly.org> |
1408 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1432 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -1437,39 +1461,6 @@ M: Lennert Buytenhek <kernel@wantstofly.org> | |||
1437 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1461 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1438 | S: Maintained | 1462 | S: Maintained |
1439 | 1463 | ||
1440 | ARM/TEXAS INSTRUMENT KEYSTONE ARCHITECTURE | ||
1441 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1442 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1443 | S: Maintained | ||
1444 | F: arch/arm/mach-keystone/ | ||
1445 | F: arch/arm/boot/dts/keystone-* | ||
1446 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git | ||
1447 | |||
1448 | ARM/TEXAS INSTRUMENT KEYSTONE CLOCK FRAMEWORK | ||
1449 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1450 | L: linux-kernel@vger.kernel.org | ||
1451 | S: Maintained | ||
1452 | F: drivers/clk/keystone/ | ||
1453 | |||
1454 | ARM/TEXAS INSTRUMENT KEYSTONE ClOCKSOURCE | ||
1455 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1456 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1457 | L: linux-kernel@vger.kernel.org | ||
1458 | S: Maintained | ||
1459 | F: drivers/clocksource/timer-keystone.c | ||
1460 | |||
1461 | ARM/TEXAS INSTRUMENT KEYSTONE RESET DRIVER | ||
1462 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1463 | L: linux-kernel@vger.kernel.org | ||
1464 | S: Maintained | ||
1465 | F: drivers/power/reset/keystone-reset.c | ||
1466 | |||
1467 | ARM/TEXAS INSTRUMENT AEMIF/EMIF DRIVERS | ||
1468 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1469 | L: linux-kernel@vger.kernel.org | ||
1470 | S: Maintained | ||
1471 | F: drivers/memory/*emif* | ||
1472 | |||
1473 | ARM/LG1K ARCHITECTURE | 1464 | ARM/LG1K ARCHITECTURE |
1474 | M: Chanho Min <chanho.min@lge.com> | 1465 | M: Chanho Min <chanho.min@lge.com> |
1475 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1466 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -1512,24 +1503,6 @@ ARM/MAGICIAN MACHINE SUPPORT | |||
1512 | M: Philipp Zabel <philipp.zabel@gmail.com> | 1503 | M: Philipp Zabel <philipp.zabel@gmail.com> |
1513 | S: Maintained | 1504 | S: Maintained |
1514 | 1505 | ||
1515 | ARM/Marvell Kirkwood and Armada 370, 375, 38x, 39x, XP, 3700, 7K/8K SOC support | ||
1516 | M: Jason Cooper <jason@lakedaemon.net> | ||
1517 | M: Andrew Lunn <andrew@lunn.ch> | ||
1518 | M: Gregory Clement <gregory.clement@free-electrons.com> | ||
1519 | M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | ||
1520 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1521 | S: Maintained | ||
1522 | F: arch/arm/boot/dts/armada* | ||
1523 | F: arch/arm/boot/dts/kirkwood* | ||
1524 | F: arch/arm/configs/mvebu_*_defconfig | ||
1525 | F: arch/arm/mach-mvebu/ | ||
1526 | F: arch/arm64/boot/dts/marvell/armada* | ||
1527 | F: drivers/cpufreq/mvebu-cpufreq.c | ||
1528 | F: drivers/irqchip/irq-armada-370-xp.c | ||
1529 | F: drivers/irqchip/irq-mvebu-* | ||
1530 | F: drivers/pinctrl/mvebu/ | ||
1531 | F: drivers/rtc/rtc-armada38x.c | ||
1532 | |||
1533 | ARM/Marvell Berlin SoC support | 1506 | ARM/Marvell Berlin SoC support |
1534 | M: Jisheng Zhang <jszhang@marvell.com> | 1507 | M: Jisheng Zhang <jszhang@marvell.com> |
1535 | M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 1508 | M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> |
@@ -1539,7 +1512,6 @@ F: arch/arm/mach-berlin/ | |||
1539 | F: arch/arm/boot/dts/berlin* | 1512 | F: arch/arm/boot/dts/berlin* |
1540 | F: arch/arm64/boot/dts/marvell/berlin* | 1513 | F: arch/arm64/boot/dts/marvell/berlin* |
1541 | 1514 | ||
1542 | |||
1543 | ARM/Marvell Dove/MV78xx0/Orion SOC support | 1515 | ARM/Marvell Dove/MV78xx0/Orion SOC support |
1544 | M: Jason Cooper <jason@lakedaemon.net> | 1516 | M: Jason Cooper <jason@lakedaemon.net> |
1545 | M: Andrew Lunn <andrew@lunn.ch> | 1517 | M: Andrew Lunn <andrew@lunn.ch> |
@@ -1555,24 +1527,23 @@ F: arch/arm/plat-orion/ | |||
1555 | F: arch/arm/boot/dts/dove* | 1527 | F: arch/arm/boot/dts/dove* |
1556 | F: arch/arm/boot/dts/orion5x* | 1528 | F: arch/arm/boot/dts/orion5x* |
1557 | 1529 | ||
1558 | 1530 | ARM/Marvell Kirkwood and Armada 370, 375, 38x, 39x, XP, 3700, 7K/8K SOC support | |
1559 | ARM/Orion SoC/Technologic Systems TS-78xx platform support | 1531 | M: Jason Cooper <jason@lakedaemon.net> |
1560 | M: Alexander Clouter <alex@digriz.org.uk> | 1532 | M: Andrew Lunn <andrew@lunn.ch> |
1561 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1533 | M: Gregory Clement <gregory.clement@free-electrons.com> |
1562 | W: http://www.digriz.org.uk/ts78xx/kernel | 1534 | M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> |
1563 | S: Maintained | ||
1564 | F: arch/arm/mach-orion5x/ts78xx-* | ||
1565 | |||
1566 | ARM/OXNAS platform support | ||
1567 | M: Neil Armstrong <narmstrong@baylibre.com> | ||
1568 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1535 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1569 | L: linux-oxnas@lists.tuxfamily.org (moderated for non-subscribers) | ||
1570 | S: Maintained | 1536 | S: Maintained |
1571 | F: arch/arm/mach-oxnas/ | 1537 | F: arch/arm/boot/dts/armada* |
1572 | F: arch/arm/boot/dts/ox8*.dtsi | 1538 | F: arch/arm/boot/dts/kirkwood* |
1573 | F: arch/arm/boot/dts/wd-mbwe.dts | 1539 | F: arch/arm/configs/mvebu_*_defconfig |
1574 | F: arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts | 1540 | F: arch/arm/mach-mvebu/ |
1575 | N: oxnas | 1541 | F: arch/arm64/boot/dts/marvell/armada* |
1542 | F: drivers/cpufreq/mvebu-cpufreq.c | ||
1543 | F: drivers/irqchip/irq-armada-370-xp.c | ||
1544 | F: drivers/irqchip/irq-mvebu-* | ||
1545 | F: drivers/pinctrl/mvebu/ | ||
1546 | F: drivers/rtc/rtc-armada38x.c | ||
1576 | 1547 | ||
1577 | ARM/Mediatek RTC DRIVER | 1548 | ARM/Mediatek RTC DRIVER |
1578 | M: Eddie Huang <eddie.huang@mediatek.com> | 1549 | M: Eddie Huang <eddie.huang@mediatek.com> |
@@ -1627,16 +1598,53 @@ F: drivers/pinctrl/nomadik/ | |||
1627 | F: drivers/i2c/busses/i2c-nomadik.c | 1598 | F: drivers/i2c/busses/i2c-nomadik.c |
1628 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git | 1599 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git |
1629 | 1600 | ||
1601 | ARM/NUVOTON W90X900 ARM ARCHITECTURE | ||
1602 | M: Wan ZongShun <mcuos.com@gmail.com> | ||
1603 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1604 | W: http://www.mcuos.com | ||
1605 | S: Maintained | ||
1606 | F: arch/arm/mach-w90x900/ | ||
1607 | F: drivers/input/keyboard/w90p910_keypad.c | ||
1608 | F: drivers/input/touchscreen/w90p910_ts.c | ||
1609 | F: drivers/watchdog/nuc900_wdt.c | ||
1610 | F: drivers/net/ethernet/nuvoton/w90p910_ether.c | ||
1611 | F: drivers/mtd/nand/nuc900_nand.c | ||
1612 | F: drivers/rtc/rtc-nuc900.c | ||
1613 | F: drivers/spi/spi-nuc900.c | ||
1614 | F: drivers/usb/host/ehci-w90x900.c | ||
1615 | F: drivers/video/fbdev/nuc900fb.c | ||
1616 | |||
1630 | ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT | 1617 | ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT |
1631 | M: Nelson Castillo <arhuaco@freaks-unidos.net> | 1618 | M: Nelson Castillo <arhuaco@freaks-unidos.net> |
1632 | L: openmoko-kernel@lists.openmoko.org (subscribers-only) | 1619 | L: openmoko-kernel@lists.openmoko.org (subscribers-only) |
1633 | W: http://wiki.openmoko.org/wiki/Neo_FreeRunner | 1620 | W: http://wiki.openmoko.org/wiki/Neo_FreeRunner |
1634 | S: Supported | 1621 | S: Supported |
1635 | 1622 | ||
1636 | ARM/TOSA MACHINE SUPPORT | 1623 | ARM/Orion SoC/Technologic Systems TS-78xx platform support |
1637 | M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 1624 | M: Alexander Clouter <alex@digriz.org.uk> |
1638 | M: Dirk Opfer <dirk@opfer-online.de> | 1625 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1626 | W: http://www.digriz.org.uk/ts78xx/kernel | ||
1627 | S: Maintained | ||
1628 | F: arch/arm/mach-orion5x/ts78xx-* | ||
1629 | |||
1630 | ARM/OXNAS platform support | ||
1631 | M: Neil Armstrong <narmstrong@baylibre.com> | ||
1632 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1633 | L: linux-oxnas@lists.tuxfamily.org (moderated for non-subscribers) | ||
1639 | S: Maintained | 1634 | S: Maintained |
1635 | F: arch/arm/mach-oxnas/ | ||
1636 | F: arch/arm/boot/dts/ox8*.dtsi | ||
1637 | F: arch/arm/boot/dts/wd-mbwe.dts | ||
1638 | F: arch/arm/boot/dts/cloudengines-pogoplug-series-3.dts | ||
1639 | N: oxnas | ||
1640 | |||
1641 | ARM/PALM TREO SUPPORT | ||
1642 | M: Tomas Cech <sleep_walker@suse.com> | ||
1643 | L: linux-arm-kernel@lists.infradead.org | ||
1644 | W: http://hackndev.com | ||
1645 | S: Maintained | ||
1646 | F: arch/arm/mach-pxa/include/mach/palmtreo.h | ||
1647 | F: arch/arm/mach-pxa/palmtreo.c | ||
1640 | 1648 | ||
1641 | ARM/PALMTX,PALMT5,PALMLD,PALMTE2,PALMTC SUPPORT | 1649 | ARM/PALMTX,PALMT5,PALMLD,PALMTE2,PALMTC SUPPORT |
1642 | M: Marek Vasut <marek.vasut@gmail.com> | 1650 | M: Marek Vasut <marek.vasut@gmail.com> |
@@ -1654,14 +1662,6 @@ F: arch/arm/mach-pxa/palmte2.c | |||
1654 | F: arch/arm/mach-pxa/include/mach/palmtc.h | 1662 | F: arch/arm/mach-pxa/include/mach/palmtc.h |
1655 | F: arch/arm/mach-pxa/palmtc.c | 1663 | F: arch/arm/mach-pxa/palmtc.c |
1656 | 1664 | ||
1657 | ARM/PALM TREO SUPPORT | ||
1658 | M: Tomas Cech <sleep_walker@suse.com> | ||
1659 | L: linux-arm-kernel@lists.infradead.org | ||
1660 | W: http://hackndev.com | ||
1661 | S: Maintained | ||
1662 | F: arch/arm/mach-pxa/include/mach/palmtreo.h | ||
1663 | F: arch/arm/mach-pxa/palmtreo.c | ||
1664 | |||
1665 | ARM/PALMZ72 SUPPORT | 1665 | ARM/PALMZ72 SUPPORT |
1666 | M: Sergey Lapin <slapin@ossfans.org> | 1666 | M: Sergey Lapin <slapin@ossfans.org> |
1667 | L: linux-arm-kernel@lists.infradead.org | 1667 | L: linux-arm-kernel@lists.infradead.org |
@@ -1802,17 +1802,6 @@ L: linux-media@vger.kernel.org | |||
1802 | S: Maintained | 1802 | S: Maintained |
1803 | F: drivers/media/platform/s5p-g2d/ | 1803 | F: drivers/media/platform/s5p-g2d/ |
1804 | 1804 | ||
1805 | ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT | ||
1806 | M: Kyungmin Park <kyungmin.park@samsung.com> | ||
1807 | M: Kamil Debski <kamil@wypas.org> | ||
1808 | M: Jeongtae Park <jtp.park@samsung.com> | ||
1809 | M: Andrzej Hajda <a.hajda@samsung.com> | ||
1810 | L: linux-arm-kernel@lists.infradead.org | ||
1811 | L: linux-media@vger.kernel.org | ||
1812 | S: Maintained | ||
1813 | F: arch/arm/plat-samsung/s5p-dev-mfc.c | ||
1814 | F: drivers/media/platform/s5p-mfc/ | ||
1815 | |||
1816 | ARM/SAMSUNG S5P SERIES HDMI CEC SUBSYSTEM SUPPORT | 1805 | ARM/SAMSUNG S5P SERIES HDMI CEC SUBSYSTEM SUPPORT |
1817 | M: Marek Szyprowski <m.szyprowski@samsung.com> | 1806 | M: Marek Szyprowski <m.szyprowski@samsung.com> |
1818 | L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers) | 1807 | L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers) |
@@ -1829,6 +1818,17 @@ L: linux-media@vger.kernel.org | |||
1829 | S: Maintained | 1818 | S: Maintained |
1830 | F: drivers/media/platform/s5p-jpeg/ | 1819 | F: drivers/media/platform/s5p-jpeg/ |
1831 | 1820 | ||
1821 | ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT | ||
1822 | M: Kyungmin Park <kyungmin.park@samsung.com> | ||
1823 | M: Kamil Debski <kamil@wypas.org> | ||
1824 | M: Jeongtae Park <jtp.park@samsung.com> | ||
1825 | M: Andrzej Hajda <a.hajda@samsung.com> | ||
1826 | L: linux-arm-kernel@lists.infradead.org | ||
1827 | L: linux-media@vger.kernel.org | ||
1828 | S: Maintained | ||
1829 | F: arch/arm/plat-samsung/s5p-dev-mfc.c | ||
1830 | F: drivers/media/platform/s5p-mfc/ | ||
1831 | |||
1832 | ARM/SHMOBILE ARM ARCHITECTURE | 1832 | ARM/SHMOBILE ARM ARCHITECTURE |
1833 | M: Simon Horman <horms@verge.net.au> | 1833 | M: Simon Horman <horms@verge.net.au> |
1834 | M: Magnus Damm <magnus.damm@gmail.com> | 1834 | M: Magnus Damm <magnus.damm@gmail.com> |
@@ -1922,26 +1922,48 @@ M: "Mark F. Brown" <mark.brown314@gmail.com> | |||
1922 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1922 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1923 | S: Maintained | 1923 | S: Maintained |
1924 | 1924 | ||
1925 | ARM/TEXAS INSTRUMENT AEMIF/EMIF DRIVERS | ||
1926 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1927 | L: linux-kernel@vger.kernel.org | ||
1928 | S: Maintained | ||
1929 | F: drivers/memory/*emif* | ||
1930 | |||
1931 | ARM/TEXAS INSTRUMENT KEYSTONE ARCHITECTURE | ||
1932 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1933 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1934 | S: Maintained | ||
1935 | F: arch/arm/mach-keystone/ | ||
1936 | F: arch/arm/boot/dts/keystone-* | ||
1937 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git | ||
1938 | |||
1939 | ARM/TEXAS INSTRUMENT KEYSTONE CLOCK FRAMEWORK | ||
1940 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1941 | L: linux-kernel@vger.kernel.org | ||
1942 | S: Maintained | ||
1943 | F: drivers/clk/keystone/ | ||
1944 | |||
1945 | ARM/TEXAS INSTRUMENT KEYSTONE ClOCKSOURCE | ||
1946 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1947 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
1948 | L: linux-kernel@vger.kernel.org | ||
1949 | S: Maintained | ||
1950 | F: drivers/clocksource/timer-keystone.c | ||
1951 | |||
1952 | ARM/TEXAS INSTRUMENT KEYSTONE RESET DRIVER | ||
1953 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
1954 | L: linux-kernel@vger.kernel.org | ||
1955 | S: Maintained | ||
1956 | F: drivers/power/reset/keystone-reset.c | ||
1957 | |||
1925 | ARM/THECUS N2100 MACHINE SUPPORT | 1958 | ARM/THECUS N2100 MACHINE SUPPORT |
1926 | M: Lennert Buytenhek <kernel@wantstofly.org> | 1959 | M: Lennert Buytenhek <kernel@wantstofly.org> |
1927 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1960 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
1928 | S: Maintained | 1961 | S: Maintained |
1929 | 1962 | ||
1930 | ARM/NUVOTON W90X900 ARM ARCHITECTURE | 1963 | ARM/TOSA MACHINE SUPPORT |
1931 | M: Wan ZongShun <mcuos.com@gmail.com> | 1964 | M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
1932 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 1965 | M: Dirk Opfer <dirk@opfer-online.de> |
1933 | W: http://www.mcuos.com | ||
1934 | S: Maintained | 1966 | S: Maintained |
1935 | F: arch/arm/mach-w90x900/ | ||
1936 | F: drivers/input/keyboard/w90p910_keypad.c | ||
1937 | F: drivers/input/touchscreen/w90p910_ts.c | ||
1938 | F: drivers/watchdog/nuc900_wdt.c | ||
1939 | F: drivers/net/ethernet/nuvoton/w90p910_ether.c | ||
1940 | F: drivers/mtd/nand/nuc900_nand.c | ||
1941 | F: drivers/rtc/rtc-nuc900.c | ||
1942 | F: drivers/spi/spi-nuc900.c | ||
1943 | F: drivers/usb/host/ehci-w90x900.c | ||
1944 | F: drivers/video/fbdev/nuc900fb.c | ||
1945 | 1967 | ||
1946 | ARM/U300 MACHINE SUPPORT | 1968 | ARM/U300 MACHINE SUPPORT |
1947 | M: Linus Walleij <linus.walleij@linaro.org> | 1969 | M: Linus Walleij <linus.walleij@linaro.org> |
@@ -2086,16 +2108,6 @@ F: drivers/i2c/busses/i2c-cadence.c | |||
2086 | F: drivers/mmc/host/sdhci-of-arasan.c | 2108 | F: drivers/mmc/host/sdhci-of-arasan.c |
2087 | F: drivers/edac/synopsys_edac.c | 2109 | F: drivers/edac/synopsys_edac.c |
2088 | 2110 | ||
2089 | ARM SMMU DRIVERS | ||
2090 | M: Will Deacon <will.deacon@arm.com> | ||
2091 | R: Robin Murphy <robin.murphy@arm.com> | ||
2092 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
2093 | S: Maintained | ||
2094 | F: drivers/iommu/arm-smmu.c | ||
2095 | F: drivers/iommu/arm-smmu-v3.c | ||
2096 | F: drivers/iommu/io-pgtable-arm.c | ||
2097 | F: drivers/iommu/io-pgtable-arm-v7s.c | ||
2098 | |||
2099 | ARM64 PORT (AARCH64 ARCHITECTURE) | 2111 | ARM64 PORT (AARCH64 ARCHITECTURE) |
2100 | M: Catalin Marinas <catalin.marinas@arm.com> | 2112 | M: Catalin Marinas <catalin.marinas@arm.com> |
2101 | M: Will Deacon <will.deacon@arm.com> | 2113 | M: Will Deacon <will.deacon@arm.com> |
@@ -2207,21 +2219,10 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git | |||
2207 | S: Supported | 2219 | S: Supported |
2208 | F: drivers/net/wireless/ath/ath6kl/ | 2220 | F: drivers/net/wireless/ath/ath6kl/ |
2209 | 2221 | ||
2210 | WILOCITY WIL6210 WIRELESS DRIVER | 2222 | ATI_REMOTE2 DRIVER |
2211 | M: Maya Erez <qca_merez@qca.qualcomm.com> | 2223 | M: Ville Syrjala <syrjala@sci.fi> |
2212 | L: linux-wireless@vger.kernel.org | ||
2213 | L: wil6210@qca.qualcomm.com | ||
2214 | S: Supported | ||
2215 | W: http://wireless.kernel.org/en/users/Drivers/wil6210 | ||
2216 | F: drivers/net/wireless/ath/wil6210/ | ||
2217 | F: include/uapi/linux/wil6210_uapi.h | ||
2218 | |||
2219 | CARL9170 LINUX COMMUNITY WIRELESS DRIVER | ||
2220 | M: Christian Lamparter <chunkeey@googlemail.com> | ||
2221 | L: linux-wireless@vger.kernel.org | ||
2222 | W: http://wireless.kernel.org/en/users/Drivers/carl9170 | ||
2223 | S: Maintained | 2224 | S: Maintained |
2224 | F: drivers/net/wireless/ath/carl9170/ | 2225 | F: drivers/input/misc/ati_remote2.c |
2225 | 2226 | ||
2226 | ATK0110 HWMON DRIVER | 2227 | ATK0110 HWMON DRIVER |
2227 | M: Luca Tettamanti <kronos.it@gmail.com> | 2228 | M: Luca Tettamanti <kronos.it@gmail.com> |
@@ -2229,11 +2230,6 @@ L: linux-hwmon@vger.kernel.org | |||
2229 | S: Maintained | 2230 | S: Maintained |
2230 | F: drivers/hwmon/asus_atk0110.c | 2231 | F: drivers/hwmon/asus_atk0110.c |
2231 | 2232 | ||
2232 | ATI_REMOTE2 DRIVER | ||
2233 | M: Ville Syrjala <syrjala@sci.fi> | ||
2234 | S: Maintained | ||
2235 | F: drivers/input/misc/ati_remote2.c | ||
2236 | |||
2237 | ATLX ETHERNET DRIVERS | 2233 | ATLX ETHERNET DRIVERS |
2238 | M: Jay Cliburn <jcliburn@gmail.com> | 2234 | M: Jay Cliburn <jcliburn@gmail.com> |
2239 | M: Chris Snook <chris.snook@gmail.com> | 2235 | M: Chris Snook <chris.snook@gmail.com> |
@@ -2263,25 +2259,12 @@ M: Nicolas Ferre <nicolas.ferre@microchip.com> | |||
2263 | S: Supported | 2259 | S: Supported |
2264 | F: drivers/power/reset/at91-sama5d2_shdwc.c | 2260 | F: drivers/power/reset/at91-sama5d2_shdwc.c |
2265 | 2261 | ||
2266 | ATMEL SAMA5D2 ADC DRIVER | ||
2267 | M: Ludovic Desroches <ludovic.desroches@microchip.com> | ||
2268 | L: linux-iio@vger.kernel.org | ||
2269 | S: Supported | ||
2270 | F: drivers/iio/adc/at91-sama5d2_adc.c | ||
2271 | |||
2272 | ATMEL Audio ALSA driver | 2262 | ATMEL Audio ALSA driver |
2273 | M: Nicolas Ferre <nicolas.ferre@microchip.com> | 2263 | M: Nicolas Ferre <nicolas.ferre@microchip.com> |
2274 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | 2264 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
2275 | S: Supported | 2265 | S: Supported |
2276 | F: sound/soc/atmel | 2266 | F: sound/soc/atmel |
2277 | 2267 | ||
2278 | ATMEL XDMA DRIVER | ||
2279 | M: Ludovic Desroches <ludovic.desroches@microchip.com> | ||
2280 | L: linux-arm-kernel@lists.infradead.org | ||
2281 | L: dmaengine@vger.kernel.org | ||
2282 | S: Supported | ||
2283 | F: drivers/dma/at_xdmac.c | ||
2284 | |||
2285 | ATMEL I2C DRIVER | 2268 | ATMEL I2C DRIVER |
2286 | M: Ludovic Desroches <ludovic.desroches@microchip.com> | 2269 | M: Ludovic Desroches <ludovic.desroches@microchip.com> |
2287 | L: linux-i2c@vger.kernel.org | 2270 | L: linux-i2c@vger.kernel.org |
@@ -2307,6 +2290,14 @@ M: Nicolas Ferre <nicolas.ferre@microchip.com> | |||
2307 | S: Supported | 2290 | S: Supported |
2308 | F: drivers/net/ethernet/cadence/ | 2291 | F: drivers/net/ethernet/cadence/ |
2309 | 2292 | ||
2293 | ATMEL MAXTOUCH DRIVER | ||
2294 | M: Nick Dyer <nick@shmanahar.org> | ||
2295 | T: git git://github.com/ndyer/linux.git | ||
2296 | S: Maintained | ||
2297 | F: Documentation/devicetree/bindings/input/atmel,maxtouch.txt | ||
2298 | F: drivers/input/touchscreen/atmel_mxt_ts.c | ||
2299 | F: include/linux/platform_data/atmel_mxt_ts.h | ||
2300 | |||
2310 | ATMEL NAND DRIVER | 2301 | ATMEL NAND DRIVER |
2311 | M: Wenyou Yang <wenyou.yang@atmel.com> | 2302 | M: Wenyou Yang <wenyou.yang@atmel.com> |
2312 | M: Josh Wu <rainyfeeling@outlook.com> | 2303 | M: Josh Wu <rainyfeeling@outlook.com> |
@@ -2314,6 +2305,12 @@ L: linux-mtd@lists.infradead.org | |||
2314 | S: Supported | 2305 | S: Supported |
2315 | F: drivers/mtd/nand/atmel/* | 2306 | F: drivers/mtd/nand/atmel/* |
2316 | 2307 | ||
2308 | ATMEL SAMA5D2 ADC DRIVER | ||
2309 | M: Ludovic Desroches <ludovic.desroches@microchip.com> | ||
2310 | L: linux-iio@vger.kernel.org | ||
2311 | S: Supported | ||
2312 | F: drivers/iio/adc/at91-sama5d2_adc.c | ||
2313 | |||
2317 | ATMEL SDMMC DRIVER | 2314 | ATMEL SDMMC DRIVER |
2318 | M: Ludovic Desroches <ludovic.desroches@microchip.com> | 2315 | M: Ludovic Desroches <ludovic.desroches@microchip.com> |
2319 | L: linux-mmc@vger.kernel.org | 2316 | L: linux-mmc@vger.kernel.org |
@@ -2353,13 +2350,12 @@ W: http://atmelwlandriver.sourceforge.net/ | |||
2353 | S: Maintained | 2350 | S: Maintained |
2354 | F: drivers/net/wireless/atmel/atmel* | 2351 | F: drivers/net/wireless/atmel/atmel* |
2355 | 2352 | ||
2356 | ATMEL MAXTOUCH DRIVER | 2353 | ATMEL XDMA DRIVER |
2357 | M: Nick Dyer <nick@shmanahar.org> | 2354 | M: Ludovic Desroches <ludovic.desroches@microchip.com> |
2358 | T: git git://github.com/ndyer/linux.git | 2355 | L: linux-arm-kernel@lists.infradead.org |
2359 | S: Maintained | 2356 | L: dmaengine@vger.kernel.org |
2360 | F: Documentation/devicetree/bindings/input/atmel,maxtouch.txt | 2357 | S: Supported |
2361 | F: drivers/input/touchscreen/atmel_mxt_ts.c | 2358 | F: drivers/dma/at_xdmac.c |
2362 | F: include/linux/platform_data/atmel_mxt_ts.h | ||
2363 | 2359 | ||
2364 | ATOMIC INFRASTRUCTURE | 2360 | ATOMIC INFRASTRUCTURE |
2365 | M: Will Deacon <will.deacon@arm.com> | 2361 | M: Will Deacon <will.deacon@arm.com> |
@@ -2413,13 +2409,6 @@ F: include/uapi/linux/ax25.h | |||
2413 | F: include/net/ax25.h | 2409 | F: include/net/ax25.h |
2414 | F: net/ax25/ | 2410 | F: net/ax25/ |
2415 | 2411 | ||
2416 | AXENTIA ASOC DRIVERS | ||
2417 | M: Peter Rosin <peda@axentia.se> | ||
2418 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | ||
2419 | S: Maintained | ||
2420 | F: Documentation/devicetree/bindings/sound/axentia,* | ||
2421 | F: sound/soc/atmel/tse850-pcm5142.c | ||
2422 | |||
2423 | AXENTIA ARM DEVICES | 2412 | AXENTIA ARM DEVICES |
2424 | M: Peter Rosin <peda@axentia.se> | 2413 | M: Peter Rosin <peda@axentia.se> |
2425 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 2414 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -2428,6 +2417,13 @@ F: Documentation/devicetree/bindings/arm/axentia.txt | |||
2428 | F: arch/arm/boot/dts/at91-linea.dtsi | 2417 | F: arch/arm/boot/dts/at91-linea.dtsi |
2429 | F: arch/arm/boot/dts/at91-tse850-3.dts | 2418 | F: arch/arm/boot/dts/at91-tse850-3.dts |
2430 | 2419 | ||
2420 | AXENTIA ASOC DRIVERS | ||
2421 | M: Peter Rosin <peda@axentia.se> | ||
2422 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | ||
2423 | S: Maintained | ||
2424 | F: Documentation/devicetree/bindings/sound/axentia,* | ||
2425 | F: sound/soc/atmel/tse850-pcm5142.c | ||
2426 | |||
2431 | AZ6007 DVB DRIVER | 2427 | AZ6007 DVB DRIVER |
2432 | M: Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2428 | M: Mauro Carvalho Chehab <mchehab@s-opensource.com> |
2433 | M: Mauro Carvalho Chehab <mchehab@kernel.org> | 2429 | M: Mauro Carvalho Chehab <mchehab@kernel.org> |
@@ -2507,13 +2503,11 @@ W: https://linuxtv.org | |||
2507 | S: Supported | 2503 | S: Supported |
2508 | F: drivers/media/platform/sti/bdisp | 2504 | F: drivers/media/platform/sti/bdisp |
2509 | 2505 | ||
2510 | DELTA ST MEDIA DRIVER | 2506 | BECKHOFF CX5020 ETHERCAT MASTER DRIVER |
2511 | M: Hugues Fruchet <hugues.fruchet@st.com> | 2507 | M: Dariusz Marcinkiewicz <reksio@newterm.pl> |
2512 | L: linux-media@vger.kernel.org | 2508 | L: netdev@vger.kernel.org |
2513 | T: git git://linuxtv.org/media_tree.git | 2509 | S: Maintained |
2514 | W: https://linuxtv.org | 2510 | F: drivers/net/ethernet/ec_bhf.c |
2515 | S: Supported | ||
2516 | F: drivers/media/platform/sti/delta | ||
2517 | 2511 | ||
2518 | BEFS FILE SYSTEM | 2512 | BEFS FILE SYSTEM |
2519 | M: Luis de Bethencourt <luisbg@kernel.org> | 2513 | M: Luis de Bethencourt <luisbg@kernel.org> |
@@ -2523,11 +2517,13 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/luisbg/linux-befs.git | |||
2523 | F: Documentation/filesystems/befs.txt | 2517 | F: Documentation/filesystems/befs.txt |
2524 | F: fs/befs/ | 2518 | F: fs/befs/ |
2525 | 2519 | ||
2526 | BECKHOFF CX5020 ETHERCAT MASTER DRIVER | 2520 | BFQ I/O SCHEDULER |
2527 | M: Dariusz Marcinkiewicz <reksio@newterm.pl> | 2521 | M: Paolo Valente <paolo.valente@linaro.org> |
2528 | L: netdev@vger.kernel.org | 2522 | M: Jens Axboe <axboe@kernel.dk> |
2523 | L: linux-block@vger.kernel.org | ||
2529 | S: Maintained | 2524 | S: Maintained |
2530 | F: drivers/net/ethernet/ec_bhf.c | 2525 | F: block/bfq-* |
2526 | F: Documentation/block/bfq-iosched.txt | ||
2531 | 2527 | ||
2532 | BFS FILE SYSTEM | 2528 | BFS FILE SYSTEM |
2533 | M: "Tigran A. Aivazian" <aivazian.tigran@gmail.com> | 2529 | M: "Tigran A. Aivazian" <aivazian.tigran@gmail.com> |
@@ -2550,6 +2546,22 @@ W: http://blackfin.uclinux.org | |||
2550 | S: Supported | 2546 | S: Supported |
2551 | F: drivers/net/ethernet/adi/ | 2547 | F: drivers/net/ethernet/adi/ |
2552 | 2548 | ||
2549 | BLACKFIN I2C TWI DRIVER | ||
2550 | M: Sonic Zhang <sonic.zhang@analog.com> | ||
2551 | L: adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers) | ||
2552 | W: http://blackfin.uclinux.org/ | ||
2553 | S: Supported | ||
2554 | F: drivers/i2c/busses/i2c-bfin-twi.c | ||
2555 | |||
2556 | BLACKFIN MEDIA DRIVER | ||
2557 | M: Scott Jiang <scott.jiang.linux@gmail.com> | ||
2558 | L: adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers) | ||
2559 | W: http://blackfin.uclinux.org/ | ||
2560 | S: Supported | ||
2561 | F: drivers/media/platform/blackfin/ | ||
2562 | F: drivers/media/i2c/adv7183* | ||
2563 | F: drivers/media/i2c/vs6624* | ||
2564 | |||
2553 | BLACKFIN RTC DRIVER | 2565 | BLACKFIN RTC DRIVER |
2554 | L: adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers) | 2566 | L: adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers) |
2555 | W: http://blackfin.uclinux.org | 2567 | W: http://blackfin.uclinux.org |
@@ -2576,22 +2588,6 @@ W: http://blackfin.uclinux.org | |||
2576 | S: Supported | 2588 | S: Supported |
2577 | F: drivers/watchdog/bfin_wdt.c | 2589 | F: drivers/watchdog/bfin_wdt.c |
2578 | 2590 | ||
2579 | BLACKFIN I2C TWI DRIVER | ||
2580 | M: Sonic Zhang <sonic.zhang@analog.com> | ||
2581 | L: adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers) | ||
2582 | W: http://blackfin.uclinux.org/ | ||
2583 | S: Supported | ||
2584 | F: drivers/i2c/busses/i2c-bfin-twi.c | ||
2585 | |||
2586 | BLACKFIN MEDIA DRIVER | ||
2587 | M: Scott Jiang <scott.jiang.linux@gmail.com> | ||
2588 | L: adi-buildroot-devel@lists.sourceforge.net (moderated for non-subscribers) | ||
2589 | W: http://blackfin.uclinux.org/ | ||
2590 | S: Supported | ||
2591 | F: drivers/media/platform/blackfin/ | ||
2592 | F: drivers/media/i2c/adv7183* | ||
2593 | F: drivers/media/i2c/vs6624* | ||
2594 | |||
2595 | BLINKM RGB LED DRIVER | 2591 | BLINKM RGB LED DRIVER |
2596 | M: Jan-Simon Moeller <jansimon.moeller@gmx.de> | 2592 | M: Jan-Simon Moeller <jansimon.moeller@gmx.de> |
2597 | S: Maintained | 2593 | S: Maintained |
@@ -2606,14 +2602,6 @@ F: block/ | |||
2606 | F: kernel/trace/blktrace.c | 2602 | F: kernel/trace/blktrace.c |
2607 | F: lib/sbitmap.c | 2603 | F: lib/sbitmap.c |
2608 | 2604 | ||
2609 | BFQ I/O SCHEDULER | ||
2610 | M: Paolo Valente <paolo.valente@linaro.org> | ||
2611 | M: Jens Axboe <axboe@kernel.dk> | ||
2612 | L: linux-block@vger.kernel.org | ||
2613 | S: Maintained | ||
2614 | F: block/bfq-* | ||
2615 | F: Documentation/block/bfq-iosched.txt | ||
2616 | |||
2617 | BLOCK2MTD DRIVER | 2605 | BLOCK2MTD DRIVER |
2618 | M: Joern Engel <joern@lazybastard.org> | 2606 | M: Joern Engel <joern@lazybastard.org> |
2619 | L: linux-mtd@lists.infradead.org | 2607 | L: linux-mtd@lists.infradead.org |
@@ -2643,21 +2631,6 @@ S: Maintained | |||
2643 | F: net/bluetooth/ | 2631 | F: net/bluetooth/ |
2644 | F: include/net/bluetooth/ | 2632 | F: include/net/bluetooth/ |
2645 | 2633 | ||
2646 | DMA MAPPING HELPERS | ||
2647 | M: Christoph Hellwig <hch@lst.de> | ||
2648 | M: Marek Szyprowski <m.szyprowski@samsung.com> | ||
2649 | R: Robin Murphy <robin.murphy@arm.com> | ||
2650 | L: linux-kernel@vger.kernel.org | ||
2651 | T: git git://git.infradead.org/users/hch/dma-mapping.git | ||
2652 | W: http://git.infradead.org/users/hch/dma-mapping.git | ||
2653 | S: Supported | ||
2654 | F: lib/dma-debug.c | ||
2655 | F: lib/dma-noop.c | ||
2656 | F: lib/dma-virt.c | ||
2657 | F: drivers/base/dma-mapping.c | ||
2658 | F: drivers/base/dma-coherent.c | ||
2659 | F: include/linux/dma-mapping.h | ||
2660 | |||
2661 | BONDING DRIVER | 2634 | BONDING DRIVER |
2662 | M: Jay Vosburgh <j.vosburgh@gmail.com> | 2635 | M: Jay Vosburgh <j.vosburgh@gmail.com> |
2663 | M: Veaceslav Falico <vfalico@gmail.com> | 2636 | M: Veaceslav Falico <vfalico@gmail.com> |
@@ -2705,35 +2678,6 @@ S: Supported | |||
2705 | F: drivers/net/dsa/b53/* | 2678 | F: drivers/net/dsa/b53/* |
2706 | F: include/linux/platform_data/b53.h | 2679 | F: include/linux/platform_data/b53.h |
2707 | 2680 | ||
2708 | BROADCOM GENET ETHERNET DRIVER | ||
2709 | M: Florian Fainelli <f.fainelli@gmail.com> | ||
2710 | L: netdev@vger.kernel.org | ||
2711 | S: Supported | ||
2712 | F: drivers/net/ethernet/broadcom/genet/ | ||
2713 | |||
2714 | BROADCOM BNX2 GIGABIT ETHERNET DRIVER | ||
2715 | M: Rasesh Mody <rasesh.mody@cavium.com> | ||
2716 | M: Harish Patil <harish.patil@cavium.com> | ||
2717 | M: Dept-GELinuxNICDev@cavium.com | ||
2718 | L: netdev@vger.kernel.org | ||
2719 | S: Supported | ||
2720 | F: drivers/net/ethernet/broadcom/bnx2.* | ||
2721 | F: drivers/net/ethernet/broadcom/bnx2_* | ||
2722 | |||
2723 | BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER | ||
2724 | M: Yuval Mintz <Yuval.Mintz@cavium.com> | ||
2725 | M: Ariel Elior <ariel.elior@cavium.com> | ||
2726 | M: everest-linux-l2@cavium.com | ||
2727 | L: netdev@vger.kernel.org | ||
2728 | S: Supported | ||
2729 | F: drivers/net/ethernet/broadcom/bnx2x/ | ||
2730 | |||
2731 | BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER | ||
2732 | M: Michael Chan <michael.chan@broadcom.com> | ||
2733 | L: netdev@vger.kernel.org | ||
2734 | S: Supported | ||
2735 | F: drivers/net/ethernet/broadcom/bnxt/ | ||
2736 | |||
2737 | BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE | 2681 | BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE |
2738 | M: Florian Fainelli <f.fainelli@gmail.com> | 2682 | M: Florian Fainelli <f.fainelli@gmail.com> |
2739 | M: Ray Jui <rjui@broadcom.com> | 2683 | M: Ray Jui <rjui@broadcom.com> |
@@ -2812,6 +2756,13 @@ F: arch/arm/boot/dts/bcm7*.dts* | |||
2812 | F: drivers/bus/brcmstb_gisb.c | 2756 | F: drivers/bus/brcmstb_gisb.c |
2813 | N: brcmstb | 2757 | N: brcmstb |
2814 | 2758 | ||
2759 | BROADCOM BMIPS CPUFREQ DRIVER | ||
2760 | M: Markus Mayer <mmayer@broadcom.com> | ||
2761 | M: bcm-kernel-feedback-list@broadcom.com | ||
2762 | L: linux-pm@vger.kernel.org | ||
2763 | S: Maintained | ||
2764 | F: drivers/cpufreq/bmips-cpufreq.c | ||
2765 | |||
2815 | BROADCOM BMIPS MIPS ARCHITECTURE | 2766 | BROADCOM BMIPS MIPS ARCHITECTURE |
2816 | M: Kevin Cernekee <cernekee@gmail.com> | 2767 | M: Kevin Cernekee <cernekee@gmail.com> |
2817 | M: Florian Fainelli <f.fainelli@gmail.com> | 2768 | M: Florian Fainelli <f.fainelli@gmail.com> |
@@ -2828,20 +2779,40 @@ F: drivers/irqchip/irq-brcmstb* | |||
2828 | F: include/linux/bcm963xx_nvram.h | 2779 | F: include/linux/bcm963xx_nvram.h |
2829 | F: include/linux/bcm963xx_tag.h | 2780 | F: include/linux/bcm963xx_tag.h |
2830 | 2781 | ||
2831 | BROADCOM BMIPS CPUFREQ DRIVER | 2782 | BROADCOM BNX2 GIGABIT ETHERNET DRIVER |
2832 | M: Markus Mayer <mmayer@broadcom.com> | 2783 | M: Rasesh Mody <rasesh.mody@cavium.com> |
2833 | M: bcm-kernel-feedback-list@broadcom.com | 2784 | M: Harish Patil <harish.patil@cavium.com> |
2834 | L: linux-pm@vger.kernel.org | 2785 | M: Dept-GELinuxNICDev@cavium.com |
2835 | S: Maintained | 2786 | L: netdev@vger.kernel.org |
2836 | F: drivers/cpufreq/bmips-cpufreq.c | 2787 | S: Supported |
2788 | F: drivers/net/ethernet/broadcom/bnx2.* | ||
2789 | F: drivers/net/ethernet/broadcom/bnx2_* | ||
2837 | 2790 | ||
2838 | BROADCOM TG3 GIGABIT ETHERNET DRIVER | 2791 | BROADCOM BNX2FC 10 GIGABIT FCOE DRIVER |
2839 | M: Siva Reddy Kallam <siva.kallam@broadcom.com> | 2792 | M: QLogic-Storage-Upstream@qlogic.com |
2840 | M: Prashant Sreedharan <prashant@broadcom.com> | 2793 | L: linux-scsi@vger.kernel.org |
2841 | M: Michael Chan <mchan@broadcom.com> | 2794 | S: Supported |
2795 | F: drivers/scsi/bnx2fc/ | ||
2796 | |||
2797 | BROADCOM BNX2I 1/10 GIGABIT iSCSI DRIVER | ||
2798 | M: QLogic-Storage-Upstream@qlogic.com | ||
2799 | L: linux-scsi@vger.kernel.org | ||
2800 | S: Supported | ||
2801 | F: drivers/scsi/bnx2i/ | ||
2802 | |||
2803 | BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER | ||
2804 | M: Yuval Mintz <Yuval.Mintz@cavium.com> | ||
2805 | M: Ariel Elior <ariel.elior@cavium.com> | ||
2806 | M: everest-linux-l2@cavium.com | ||
2842 | L: netdev@vger.kernel.org | 2807 | L: netdev@vger.kernel.org |
2843 | S: Supported | 2808 | S: Supported |
2844 | F: drivers/net/ethernet/broadcom/tg3.* | 2809 | F: drivers/net/ethernet/broadcom/bnx2x/ |
2810 | |||
2811 | BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER | ||
2812 | M: Michael Chan <michael.chan@broadcom.com> | ||
2813 | L: netdev@vger.kernel.org | ||
2814 | S: Supported | ||
2815 | F: drivers/net/ethernet/broadcom/bnxt/ | ||
2845 | 2816 | ||
2846 | BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER | 2817 | BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER |
2847 | M: Arend van Spriel <arend.vanspriel@broadcom.com> | 2818 | M: Arend van Spriel <arend.vanspriel@broadcom.com> |
@@ -2855,17 +2826,18 @@ L: brcm80211-dev-list@cypress.com | |||
2855 | S: Supported | 2826 | S: Supported |
2856 | F: drivers/net/wireless/broadcom/brcm80211/ | 2827 | F: drivers/net/wireless/broadcom/brcm80211/ |
2857 | 2828 | ||
2858 | BROADCOM BNX2FC 10 GIGABIT FCOE DRIVER | 2829 | BROADCOM BRCMSTB GPIO DRIVER |
2859 | M: QLogic-Storage-Upstream@qlogic.com | 2830 | M: Gregory Fong <gregory.0xf0@gmail.com> |
2860 | L: linux-scsi@vger.kernel.org | 2831 | L: bcm-kernel-feedback-list@broadcom.com |
2861 | S: Supported | 2832 | S: Supported |
2862 | F: drivers/scsi/bnx2fc/ | 2833 | F: drivers/gpio/gpio-brcmstb.c |
2834 | F: Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt | ||
2863 | 2835 | ||
2864 | BROADCOM BNX2I 1/10 GIGABIT iSCSI DRIVER | 2836 | BROADCOM GENET ETHERNET DRIVER |
2865 | M: QLogic-Storage-Upstream@qlogic.com | 2837 | M: Florian Fainelli <f.fainelli@gmail.com> |
2866 | L: linux-scsi@vger.kernel.org | 2838 | L: netdev@vger.kernel.org |
2867 | S: Supported | 2839 | S: Supported |
2868 | F: drivers/scsi/bnx2i/ | 2840 | F: drivers/net/ethernet/broadcom/genet/ |
2869 | 2841 | ||
2870 | BROADCOM IPROC ARM ARCHITECTURE | 2842 | BROADCOM IPROC ARM ARCHITECTURE |
2871 | M: Ray Jui <rjui@broadcom.com> | 2843 | M: Ray Jui <rjui@broadcom.com> |
@@ -2892,13 +2864,6 @@ F: arch/arm64/boot/dts/broadcom/ns2* | |||
2892 | F: drivers/clk/bcm/clk-ns* | 2864 | F: drivers/clk/bcm/clk-ns* |
2893 | F: drivers/pinctrl/bcm/pinctrl-ns* | 2865 | F: drivers/pinctrl/bcm/pinctrl-ns* |
2894 | 2866 | ||
2895 | BROADCOM BRCMSTB GPIO DRIVER | ||
2896 | M: Gregory Fong <gregory.0xf0@gmail.com> | ||
2897 | L: bcm-kernel-feedback-list@broadcom.com | ||
2898 | S: Supported | ||
2899 | F: drivers/gpio/gpio-brcmstb.c | ||
2900 | F: Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt | ||
2901 | |||
2902 | BROADCOM KONA GPIO DRIVER | 2867 | BROADCOM KONA GPIO DRIVER |
2903 | M: Ray Jui <rjui@broadcom.com> | 2868 | M: Ray Jui <rjui@broadcom.com> |
2904 | L: bcm-kernel-feedback-list@broadcom.com | 2869 | L: bcm-kernel-feedback-list@broadcom.com |
@@ -2906,19 +2871,29 @@ S: Supported | |||
2906 | F: drivers/gpio/gpio-bcm-kona.c | 2871 | F: drivers/gpio/gpio-bcm-kona.c |
2907 | F: Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt | 2872 | F: Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt |
2908 | 2873 | ||
2874 | BROADCOM NETXTREME-E ROCE DRIVER | ||
2875 | M: Selvin Xavier <selvin.xavier@broadcom.com> | ||
2876 | M: Devesh Sharma <devesh.sharma@broadcom.com> | ||
2877 | M: Somnath Kotur <somnath.kotur@broadcom.com> | ||
2878 | M: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> | ||
2879 | L: linux-rdma@vger.kernel.org | ||
2880 | W: http://www.broadcom.com | ||
2881 | S: Supported | ||
2882 | F: drivers/infiniband/hw/bnxt_re/ | ||
2883 | F: include/uapi/rdma/bnxt_re-abi.h | ||
2884 | |||
2909 | BROADCOM NVRAM DRIVER | 2885 | BROADCOM NVRAM DRIVER |
2910 | M: Rafał Miłecki <zajec5@gmail.com> | 2886 | M: Rafał Miłecki <zajec5@gmail.com> |
2911 | L: linux-mips@linux-mips.org | 2887 | L: linux-mips@linux-mips.org |
2912 | S: Maintained | 2888 | S: Maintained |
2913 | F: drivers/firmware/broadcom/* | 2889 | F: drivers/firmware/broadcom/* |
2914 | 2890 | ||
2915 | BROADCOM STB NAND FLASH DRIVER | 2891 | BROADCOM SPECIFIC AMBA DRIVER (BCMA) |
2916 | M: Brian Norris <computersforpeace@gmail.com> | 2892 | M: Rafał Miłecki <zajec5@gmail.com> |
2917 | M: Kamal Dasu <kdasu.kdev@gmail.com> | 2893 | L: linux-wireless@vger.kernel.org |
2918 | L: linux-mtd@lists.infradead.org | ||
2919 | L: bcm-kernel-feedback-list@broadcom.com | ||
2920 | S: Maintained | 2894 | S: Maintained |
2921 | F: drivers/mtd/nand/brcmnand/ | 2895 | F: drivers/bcma/ |
2896 | F: include/linux/bcma/ | ||
2922 | 2897 | ||
2923 | BROADCOM STB AVS CPUFREQ DRIVER | 2898 | BROADCOM STB AVS CPUFREQ DRIVER |
2924 | M: Markus Mayer <mmayer@broadcom.com> | 2899 | M: Markus Mayer <mmayer@broadcom.com> |
@@ -2928,12 +2903,13 @@ S: Maintained | |||
2928 | F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt | 2903 | F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt |
2929 | F: drivers/cpufreq/brcmstb* | 2904 | F: drivers/cpufreq/brcmstb* |
2930 | 2905 | ||
2931 | BROADCOM SPECIFIC AMBA DRIVER (BCMA) | 2906 | BROADCOM STB NAND FLASH DRIVER |
2932 | M: Rafał Miłecki <zajec5@gmail.com> | 2907 | M: Brian Norris <computersforpeace@gmail.com> |
2933 | L: linux-wireless@vger.kernel.org | 2908 | M: Kamal Dasu <kdasu.kdev@gmail.com> |
2909 | L: linux-mtd@lists.infradead.org | ||
2910 | L: bcm-kernel-feedback-list@broadcom.com | ||
2934 | S: Maintained | 2911 | S: Maintained |
2935 | F: drivers/bcma/ | 2912 | F: drivers/mtd/nand/brcmnand/ |
2936 | F: include/linux/bcma/ | ||
2937 | 2913 | ||
2938 | BROADCOM SYSTEMPORT ETHERNET DRIVER | 2914 | BROADCOM SYSTEMPORT ETHERNET DRIVER |
2939 | M: Florian Fainelli <f.fainelli@gmail.com> | 2915 | M: Florian Fainelli <f.fainelli@gmail.com> |
@@ -2941,16 +2917,13 @@ L: netdev@vger.kernel.org | |||
2941 | S: Supported | 2917 | S: Supported |
2942 | F: drivers/net/ethernet/broadcom/bcmsysport.* | 2918 | F: drivers/net/ethernet/broadcom/bcmsysport.* |
2943 | 2919 | ||
2944 | BROADCOM NETXTREME-E ROCE DRIVER | 2920 | BROADCOM TG3 GIGABIT ETHERNET DRIVER |
2945 | M: Selvin Xavier <selvin.xavier@broadcom.com> | 2921 | M: Siva Reddy Kallam <siva.kallam@broadcom.com> |
2946 | M: Devesh Sharma <devesh.sharma@broadcom.com> | 2922 | M: Prashant Sreedharan <prashant@broadcom.com> |
2947 | M: Somnath Kotur <somnath.kotur@broadcom.com> | 2923 | M: Michael Chan <mchan@broadcom.com> |
2948 | M: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> | 2924 | L: netdev@vger.kernel.org |
2949 | L: linux-rdma@vger.kernel.org | ||
2950 | W: http://www.broadcom.com | ||
2951 | S: Supported | 2925 | S: Supported |
2952 | F: drivers/infiniband/hw/bnxt_re/ | 2926 | F: drivers/net/ethernet/broadcom/tg3.* |
2953 | F: include/uapi/rdma/bnxt_re-abi.h | ||
2954 | 2927 | ||
2955 | BROCADE BFA FC SCSI DRIVER | 2928 | BROCADE BFA FC SCSI DRIVER |
2956 | M: Anil Gurumurthy <anil.gurumurthy@qlogic.com> | 2929 | M: Anil Gurumurthy <anil.gurumurthy@qlogic.com> |
@@ -3013,6 +2986,15 @@ S: Odd fixes | |||
3013 | F: Documentation/media/v4l-drivers/bttv* | 2986 | F: Documentation/media/v4l-drivers/bttv* |
3014 | F: drivers/media/pci/bt8xx/bttv* | 2987 | F: drivers/media/pci/bt8xx/bttv* |
3015 | 2988 | ||
2989 | BUS FREQUENCY DRIVER FOR SAMSUNG EXYNOS | ||
2990 | M: Chanwoo Choi <cw00.choi@samsung.com> | ||
2991 | L: linux-pm@vger.kernel.org | ||
2992 | L: linux-samsung-soc@vger.kernel.org | ||
2993 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git | ||
2994 | S: Maintained | ||
2995 | F: drivers/devfreq/exynos-bus.c | ||
2996 | F: Documentation/devicetree/bindings/devfreq/exynos-bus.txt | ||
2997 | |||
3016 | BUSLOGIC SCSI DRIVER | 2998 | BUSLOGIC SCSI DRIVER |
3017 | M: Khalid Aziz <khalid@gonehiking.org> | 2999 | M: Khalid Aziz <khalid@gonehiking.org> |
3018 | L: linux-scsi@vger.kernel.org | 3000 | L: linux-scsi@vger.kernel.org |
@@ -3087,6 +3069,21 @@ F: arch/x86/kernel/tce_64.c | |||
3087 | F: arch/x86/include/asm/calgary.h | 3069 | F: arch/x86/include/asm/calgary.h |
3088 | F: arch/x86/include/asm/tce.h | 3070 | F: arch/x86/include/asm/tce.h |
3089 | 3071 | ||
3072 | CAN NETWORK DRIVERS | ||
3073 | M: Wolfgang Grandegger <wg@grandegger.com> | ||
3074 | M: Marc Kleine-Budde <mkl@pengutronix.de> | ||
3075 | L: linux-can@vger.kernel.org | ||
3076 | W: https://github.com/linux-can | ||
3077 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git | ||
3078 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git | ||
3079 | S: Maintained | ||
3080 | F: Documentation/devicetree/bindings/net/can/ | ||
3081 | F: drivers/net/can/ | ||
3082 | F: include/linux/can/dev.h | ||
3083 | F: include/linux/can/platform/ | ||
3084 | F: include/uapi/linux/can/error.h | ||
3085 | F: include/uapi/linux/can/netlink.h | ||
3086 | |||
3090 | CAN NETWORK LAYER | 3087 | CAN NETWORK LAYER |
3091 | M: Oliver Hartkopp <socketcan@hartkopp.net> | 3088 | M: Oliver Hartkopp <socketcan@hartkopp.net> |
3092 | M: Marc Kleine-Budde <mkl@pengutronix.de> | 3089 | M: Marc Kleine-Budde <mkl@pengutronix.de> |
@@ -3103,21 +3100,6 @@ F: include/uapi/linux/can/bcm.h | |||
3103 | F: include/uapi/linux/can/raw.h | 3100 | F: include/uapi/linux/can/raw.h |
3104 | F: include/uapi/linux/can/gw.h | 3101 | F: include/uapi/linux/can/gw.h |
3105 | 3102 | ||
3106 | CAN NETWORK DRIVERS | ||
3107 | M: Wolfgang Grandegger <wg@grandegger.com> | ||
3108 | M: Marc Kleine-Budde <mkl@pengutronix.de> | ||
3109 | L: linux-can@vger.kernel.org | ||
3110 | W: https://github.com/linux-can | ||
3111 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git | ||
3112 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git | ||
3113 | S: Maintained | ||
3114 | F: Documentation/devicetree/bindings/net/can/ | ||
3115 | F: drivers/net/can/ | ||
3116 | F: include/linux/can/dev.h | ||
3117 | F: include/linux/can/platform/ | ||
3118 | F: include/uapi/linux/can/error.h | ||
3119 | F: include/uapi/linux/can/netlink.h | ||
3120 | |||
3121 | CAPABILITIES | 3103 | CAPABILITIES |
3122 | M: Serge Hallyn <serge@hallyn.com> | 3104 | M: Serge Hallyn <serge@hallyn.com> |
3123 | L: linux-security-module@vger.kernel.org | 3105 | L: linux-security-module@vger.kernel.org |
@@ -3132,12 +3114,12 @@ M: Kevin Tsai <ktsai@capellamicro.com> | |||
3132 | S: Maintained | 3114 | S: Maintained |
3133 | F: drivers/iio/light/cm* | 3115 | F: drivers/iio/light/cm* |
3134 | 3116 | ||
3135 | CAVIUM THUNDERX2 ARM64 SOC | 3117 | CARL9170 LINUX COMMUNITY WIRELESS DRIVER |
3136 | M: Jayachandran C <jnair@caviumnetworks.com> | 3118 | M: Christian Lamparter <chunkeey@googlemail.com> |
3137 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 3119 | L: linux-wireless@vger.kernel.org |
3120 | W: http://wireless.kernel.org/en/users/Drivers/carl9170 | ||
3138 | S: Maintained | 3121 | S: Maintained |
3139 | F: arch/arm64/boot/dts/cavium/thunder2-99xx* | 3122 | F: drivers/net/wireless/ath/carl9170/ |
3140 | F: Documentation/devicetree/bindings/arm/cavium-thunder2.txt | ||
3141 | 3123 | ||
3142 | CAVIUM I2C DRIVER | 3124 | CAVIUM I2C DRIVER |
3143 | M: Jan Glauber <jglauber@cavium.com> | 3125 | M: Jan Glauber <jglauber@cavium.com> |
@@ -3147,6 +3129,16 @@ S: Supported | |||
3147 | F: drivers/i2c/busses/i2c-octeon* | 3129 | F: drivers/i2c/busses/i2c-octeon* |
3148 | F: drivers/i2c/busses/i2c-thunderx* | 3130 | F: drivers/i2c/busses/i2c-thunderx* |
3149 | 3131 | ||
3132 | CAVIUM LIQUIDIO NETWORK DRIVER | ||
3133 | M: Derek Chickles <derek.chickles@caviumnetworks.com> | ||
3134 | M: Satanand Burla <satananda.burla@caviumnetworks.com> | ||
3135 | M: Felix Manlunas <felix.manlunas@caviumnetworks.com> | ||
3136 | M: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> | ||
3137 | L: netdev@vger.kernel.org | ||
3138 | W: http://www.cavium.com | ||
3139 | S: Supported | ||
3140 | F: drivers/net/ethernet/cavium/liquidio/ | ||
3141 | |||
3150 | CAVIUM MMC DRIVER | 3142 | CAVIUM MMC DRIVER |
3151 | M: Jan Glauber <jglauber@cavium.com> | 3143 | M: Jan Glauber <jglauber@cavium.com> |
3152 | M: David Daney <david.daney@cavium.com> | 3144 | M: David Daney <david.daney@cavium.com> |
@@ -3155,16 +3147,6 @@ W: http://www.cavium.com | |||
3155 | S: Supported | 3147 | S: Supported |
3156 | F: drivers/mmc/host/cavium* | 3148 | F: drivers/mmc/host/cavium* |
3157 | 3149 | ||
3158 | CAVIUM LIQUIDIO NETWORK DRIVER | ||
3159 | M: Derek Chickles <derek.chickles@caviumnetworks.com> | ||
3160 | M: Satanand Burla <satananda.burla@caviumnetworks.com> | ||
3161 | M: Felix Manlunas <felix.manlunas@caviumnetworks.com> | ||
3162 | M: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> | ||
3163 | L: netdev@vger.kernel.org | ||
3164 | W: http://www.cavium.com | ||
3165 | S: Supported | ||
3166 | F: drivers/net/ethernet/cavium/liquidio/ | ||
3167 | |||
3168 | CAVIUM OCTEON-TX CRYPTO DRIVER | 3150 | CAVIUM OCTEON-TX CRYPTO DRIVER |
3169 | M: George Cherian <george.cherian@cavium.com> | 3151 | M: George Cherian <george.cherian@cavium.com> |
3170 | L: linux-crypto@vger.kernel.org | 3152 | L: linux-crypto@vger.kernel.org |
@@ -3172,6 +3154,13 @@ W: http://www.cavium.com | |||
3172 | S: Supported | 3154 | S: Supported |
3173 | F: drivers/crypto/cavium/cpt/ | 3155 | F: drivers/crypto/cavium/cpt/ |
3174 | 3156 | ||
3157 | CAVIUM THUNDERX2 ARM64 SOC | ||
3158 | M: Jayachandran C <jnair@caviumnetworks.com> | ||
3159 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
3160 | S: Maintained | ||
3161 | F: arch/arm64/boot/dts/cavium/thunder2-99xx* | ||
3162 | F: Documentation/devicetree/bindings/arm/cavium-thunder2.txt | ||
3163 | |||
3175 | CC2520 IEEE-802.15.4 RADIO DRIVER | 3164 | CC2520 IEEE-802.15.4 RADIO DRIVER |
3176 | M: Varka Bhadram <varkabhadram@gmail.com> | 3165 | M: Varka Bhadram <varkabhadram@gmail.com> |
3177 | L: linux-wpan@vger.kernel.org | 3166 | L: linux-wpan@vger.kernel.org |
@@ -3260,12 +3249,6 @@ F: drivers/usb/host/whci/ | |||
3260 | F: drivers/usb/wusbcore/ | 3249 | F: drivers/usb/wusbcore/ |
3261 | F: include/linux/usb/wusb* | 3250 | F: include/linux/usb/wusb* |
3262 | 3251 | ||
3263 | HT16K33 LED CONTROLLER DRIVER | ||
3264 | M: Robin van der Gracht <robin@protonic.nl> | ||
3265 | S: Maintained | ||
3266 | F: drivers/auxdisplay/ht16k33.c | ||
3267 | F: Documentation/devicetree/bindings/display/ht16k33.txt | ||
3268 | |||
3269 | CFAG12864B LCD DRIVER | 3252 | CFAG12864B LCD DRIVER |
3270 | M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com> | 3253 | M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com> |
3271 | W: http://miguelojeda.es/auxdisplay.htm | 3254 | W: http://miguelojeda.es/auxdisplay.htm |
@@ -3337,6 +3320,34 @@ S: Maintained | |||
3337 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git | 3320 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform.git |
3338 | F: drivers/platform/chrome/ | 3321 | F: drivers/platform/chrome/ |
3339 | 3322 | ||
3323 | CIRRUS LOGIC AUDIO CODEC DRIVERS | ||
3324 | M: Brian Austin <brian.austin@cirrus.com> | ||
3325 | M: Paul Handrigan <Paul.Handrigan@cirrus.com> | ||
3326 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | ||
3327 | S: Maintained | ||
3328 | F: sound/soc/codecs/cs* | ||
3329 | |||
3330 | CIRRUS LOGIC EP93XX ETHERNET DRIVER | ||
3331 | M: Hartley Sweeten <hsweeten@visionengravers.com> | ||
3332 | L: netdev@vger.kernel.org | ||
3333 | S: Maintained | ||
3334 | F: drivers/net/ethernet/cirrus/ep93xx_eth.c | ||
3335 | |||
3336 | CISCO FCOE HBA DRIVER | ||
3337 | M: Satish Kharat <satishkh@cisco.com> | ||
3338 | M: Sesidhar Baddela <sebaddel@cisco.com> | ||
3339 | M: Karan Tilak Kumar <kartilak@cisco.com> | ||
3340 | L: linux-scsi@vger.kernel.org | ||
3341 | S: Supported | ||
3342 | F: drivers/scsi/fnic/ | ||
3343 | |||
3344 | CISCO SCSI HBA DRIVER | ||
3345 | M: Karan Tilak Kumar <kartilak@cisco.com> | ||
3346 | M: Sesidhar Baddela <sebaddel@cisco.com> | ||
3347 | L: linux-scsi@vger.kernel.org | ||
3348 | S: Supported | ||
3349 | F: drivers/scsi/snic/ | ||
3350 | |||
3340 | CISCO VIC ETHERNET NIC DRIVER | 3351 | CISCO VIC ETHERNET NIC DRIVER |
3341 | M: Christian Benvenuti <benve@cisco.com> | 3352 | M: Christian Benvenuti <benve@cisco.com> |
3342 | M: Govindarajulu Varadarajan <_govind@gmx.com> | 3353 | M: Govindarajulu Varadarajan <_govind@gmx.com> |
@@ -3350,19 +3361,6 @@ M: Dave Goodell <dgoodell@cisco.com> | |||
3350 | S: Supported | 3361 | S: Supported |
3351 | F: drivers/infiniband/hw/usnic/ | 3362 | F: drivers/infiniband/hw/usnic/ |
3352 | 3363 | ||
3353 | CIRRUS LOGIC EP93XX ETHERNET DRIVER | ||
3354 | M: Hartley Sweeten <hsweeten@visionengravers.com> | ||
3355 | L: netdev@vger.kernel.org | ||
3356 | S: Maintained | ||
3357 | F: drivers/net/ethernet/cirrus/ep93xx_eth.c | ||
3358 | |||
3359 | CIRRUS LOGIC AUDIO CODEC DRIVERS | ||
3360 | M: Brian Austin <brian.austin@cirrus.com> | ||
3361 | M: Paul Handrigan <Paul.Handrigan@cirrus.com> | ||
3362 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | ||
3363 | S: Maintained | ||
3364 | F: sound/soc/codecs/cs* | ||
3365 | |||
3366 | CLEANCACHE API | 3364 | CLEANCACHE API |
3367 | M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 3365 | M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> |
3368 | L: linux-kernel@vger.kernel.org | 3366 | L: linux-kernel@vger.kernel.org |
@@ -3384,21 +3382,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core | |||
3384 | S: Supported | 3382 | S: Supported |
3385 | F: drivers/clocksource | 3383 | F: drivers/clocksource |
3386 | 3384 | ||
3387 | CISCO FCOE HBA DRIVER | ||
3388 | M: Satish Kharat <satishkh@cisco.com> | ||
3389 | M: Sesidhar Baddela <sebaddel@cisco.com> | ||
3390 | M: Karan Tilak Kumar <kartilak@cisco.com> | ||
3391 | L: linux-scsi@vger.kernel.org | ||
3392 | S: Supported | ||
3393 | F: drivers/scsi/fnic/ | ||
3394 | |||
3395 | CISCO SCSI HBA DRIVER | ||
3396 | M: Karan Tilak Kumar <kartilak@cisco.com> | ||
3397 | M: Sesidhar Baddela <sebaddel@cisco.com> | ||
3398 | L: linux-scsi@vger.kernel.org | ||
3399 | S: Supported | ||
3400 | F: drivers/scsi/snic/ | ||
3401 | |||
3402 | CMPC ACPI DRIVER | 3385 | CMPC ACPI DRIVER |
3403 | M: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> | 3386 | M: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> |
3404 | M: Daniel Oliveira Nascimento <don@syst.com.br> | 3387 | M: Daniel Oliveira Nascimento <don@syst.com.br> |
@@ -3474,17 +3457,17 @@ L: linux-pci@vger.kernel.org | |||
3474 | S: Maintained | 3457 | S: Maintained |
3475 | F: drivers/pci/hotplug/cpci_hotplug* | 3458 | F: drivers/pci/hotplug/cpci_hotplug* |
3476 | 3459 | ||
3477 | COMPACTPCI HOTPLUG ZIATECH ZT5550 DRIVER | 3460 | COMPACTPCI HOTPLUG GENERIC DRIVER |
3478 | M: Scott Murray <scott@spiteful.org> | 3461 | M: Scott Murray <scott@spiteful.org> |
3479 | L: linux-pci@vger.kernel.org | 3462 | L: linux-pci@vger.kernel.org |
3480 | S: Maintained | 3463 | S: Maintained |
3481 | F: drivers/pci/hotplug/cpcihp_zt5550.* | 3464 | F: drivers/pci/hotplug/cpcihp_generic.c |
3482 | 3465 | ||
3483 | COMPACTPCI HOTPLUG GENERIC DRIVER | 3466 | COMPACTPCI HOTPLUG ZIATECH ZT5550 DRIVER |
3484 | M: Scott Murray <scott@spiteful.org> | 3467 | M: Scott Murray <scott@spiteful.org> |
3485 | L: linux-pci@vger.kernel.org | 3468 | L: linux-pci@vger.kernel.org |
3486 | S: Maintained | 3469 | S: Maintained |
3487 | F: drivers/pci/hotplug/cpcihp_generic.c | 3470 | F: drivers/pci/hotplug/cpcihp_zt5550.* |
3488 | 3471 | ||
3489 | COMPAL LAPTOP SUPPORT | 3472 | COMPAL LAPTOP SUPPORT |
3490 | M: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> | 3473 | M: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> |
@@ -3587,6 +3570,18 @@ F: drivers/cpufreq/arm_big_little.h | |||
3587 | F: drivers/cpufreq/arm_big_little.c | 3570 | F: drivers/cpufreq/arm_big_little.c |
3588 | F: drivers/cpufreq/arm_big_little_dt.c | 3571 | F: drivers/cpufreq/arm_big_little_dt.c |
3589 | 3572 | ||
3573 | CPU POWER MONITORING SUBSYSTEM | ||
3574 | M: Thomas Renninger <trenn@suse.com> | ||
3575 | L: linux-pm@vger.kernel.org | ||
3576 | S: Maintained | ||
3577 | F: tools/power/cpupower/ | ||
3578 | |||
3579 | CPUID/MSR DRIVER | ||
3580 | M: "H. Peter Anvin" <hpa@zytor.com> | ||
3581 | S: Maintained | ||
3582 | F: arch/x86/kernel/cpuid.c | ||
3583 | F: arch/x86/kernel/msr.c | ||
3584 | |||
3590 | CPUIDLE DRIVER - ARM BIG LITTLE | 3585 | CPUIDLE DRIVER - ARM BIG LITTLE |
3591 | M: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 3586 | M: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> |
3592 | M: Daniel Lezcano <daniel.lezcano@linaro.org> | 3587 | M: Daniel Lezcano <daniel.lezcano@linaro.org> |
@@ -3616,18 +3611,6 @@ B: https://bugzilla.kernel.org | |||
3616 | F: drivers/cpuidle/* | 3611 | F: drivers/cpuidle/* |
3617 | F: include/linux/cpuidle.h | 3612 | F: include/linux/cpuidle.h |
3618 | 3613 | ||
3619 | CPUID/MSR DRIVER | ||
3620 | M: "H. Peter Anvin" <hpa@zytor.com> | ||
3621 | S: Maintained | ||
3622 | F: arch/x86/kernel/cpuid.c | ||
3623 | F: arch/x86/kernel/msr.c | ||
3624 | |||
3625 | CPU POWER MONITORING SUBSYSTEM | ||
3626 | M: Thomas Renninger <trenn@suse.com> | ||
3627 | L: linux-pm@vger.kernel.org | ||
3628 | S: Maintained | ||
3629 | F: tools/power/cpupower/ | ||
3630 | |||
3631 | CRAMFS FILESYSTEM | 3614 | CRAMFS FILESYSTEM |
3632 | W: http://sourceforge.net/projects/cramfs/ | 3615 | W: http://sourceforge.net/projects/cramfs/ |
3633 | S: Orphan / Obsolete | 3616 | S: Orphan / Obsolete |
@@ -3757,6 +3740,13 @@ S: Supported | |||
3757 | F: drivers/infiniband/hw/cxgb3/ | 3740 | F: drivers/infiniband/hw/cxgb3/ |
3758 | F: include/uapi/rdma/cxgb3-abi.h | 3741 | F: include/uapi/rdma/cxgb3-abi.h |
3759 | 3742 | ||
3743 | CXGB4 CRYPTO DRIVER (chcr) | ||
3744 | M: Harsh Jain <harsh@chelsio.com> | ||
3745 | L: linux-crypto@vger.kernel.org | ||
3746 | W: http://www.chelsio.com | ||
3747 | S: Supported | ||
3748 | F: drivers/crypto/chelsio | ||
3749 | |||
3760 | CXGB4 ETHERNET DRIVER (CXGB4) | 3750 | CXGB4 ETHERNET DRIVER (CXGB4) |
3761 | M: Ganesh Goudar <ganeshgr@chelsio.com> | 3751 | M: Ganesh Goudar <ganeshgr@chelsio.com> |
3762 | L: netdev@vger.kernel.org | 3752 | L: netdev@vger.kernel.org |
@@ -3779,13 +3769,6 @@ S: Supported | |||
3779 | F: drivers/infiniband/hw/cxgb4/ | 3769 | F: drivers/infiniband/hw/cxgb4/ |
3780 | F: include/uapi/rdma/cxgb4-abi.h | 3770 | F: include/uapi/rdma/cxgb4-abi.h |
3781 | 3771 | ||
3782 | CXGB4 CRYPTO DRIVER (chcr) | ||
3783 | M: Harsh Jain <harsh@chelsio.com> | ||
3784 | L: linux-crypto@vger.kernel.org | ||
3785 | W: http://www.chelsio.com | ||
3786 | S: Supported | ||
3787 | F: drivers/crypto/chelsio | ||
3788 | |||
3789 | CXGB4VF ETHERNET DRIVER (CXGB4VF) | 3772 | CXGB4VF ETHERNET DRIVER (CXGB4VF) |
3790 | M: Casey Leedom <leedom@chelsio.com> | 3773 | M: Casey Leedom <leedom@chelsio.com> |
3791 | L: netdev@vger.kernel.org | 3774 | L: netdev@vger.kernel.org |
@@ -3815,14 +3798,6 @@ F: drivers/scsi/cxlflash/ | |||
3815 | F: include/uapi/scsi/cxlflash_ioctls.h | 3798 | F: include/uapi/scsi/cxlflash_ioctls.h |
3816 | F: Documentation/powerpc/cxlflash.txt | 3799 | F: Documentation/powerpc/cxlflash.txt |
3817 | 3800 | ||
3818 | STMMAC ETHERNET DRIVER | ||
3819 | M: Giuseppe Cavallaro <peppe.cavallaro@st.com> | ||
3820 | M: Alexandre Torgue <alexandre.torgue@st.com> | ||
3821 | L: netdev@vger.kernel.org | ||
3822 | W: http://www.stlinux.com | ||
3823 | S: Supported | ||
3824 | F: drivers/net/ethernet/stmicro/stmmac/ | ||
3825 | |||
3826 | CYBERPRO FB DRIVER | 3801 | CYBERPRO FB DRIVER |
3827 | M: Russell King <linux@armlinux.org.uk> | 3802 | M: Russell King <linux@armlinux.org.uk> |
3828 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 3803 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -3946,15 +3921,15 @@ L: platform-driver-x86@vger.kernel.org | |||
3946 | S: Maintained | 3921 | S: Maintained |
3947 | F: drivers/platform/x86/dell-laptop.c | 3922 | F: drivers/platform/x86/dell-laptop.c |
3948 | 3923 | ||
3949 | DELL LAPTOP RBTN DRIVER | 3924 | DELL LAPTOP FREEFALL DRIVER |
3950 | M: Pali Rohár <pali.rohar@gmail.com> | 3925 | M: Pali Rohár <pali.rohar@gmail.com> |
3951 | S: Maintained | 3926 | S: Maintained |
3952 | F: drivers/platform/x86/dell-rbtn.* | 3927 | F: drivers/platform/x86/dell-smo8800.c |
3953 | 3928 | ||
3954 | DELL LAPTOP FREEFALL DRIVER | 3929 | DELL LAPTOP RBTN DRIVER |
3955 | M: Pali Rohár <pali.rohar@gmail.com> | 3930 | M: Pali Rohár <pali.rohar@gmail.com> |
3956 | S: Maintained | 3931 | S: Maintained |
3957 | F: drivers/platform/x86/dell-smo8800.c | 3932 | F: drivers/platform/x86/dell-rbtn.* |
3958 | 3933 | ||
3959 | DELL LAPTOP SMM DRIVER | 3934 | DELL LAPTOP SMM DRIVER |
3960 | M: Pali Rohár <pali.rohar@gmail.com> | 3935 | M: Pali Rohár <pali.rohar@gmail.com> |
@@ -3974,6 +3949,14 @@ M: Pali Rohár <pali.rohar@gmail.com> | |||
3974 | S: Maintained | 3949 | S: Maintained |
3975 | F: drivers/platform/x86/dell-wmi.c | 3950 | F: drivers/platform/x86/dell-wmi.c |
3976 | 3951 | ||
3952 | DELTA ST MEDIA DRIVER | ||
3953 | M: Hugues Fruchet <hugues.fruchet@st.com> | ||
3954 | L: linux-media@vger.kernel.org | ||
3955 | T: git git://linuxtv.org/media_tree.git | ||
3956 | W: https://linuxtv.org | ||
3957 | S: Supported | ||
3958 | F: drivers/media/platform/sti/delta | ||
3959 | |||
3977 | DENALI NAND DRIVER | 3960 | DENALI NAND DRIVER |
3978 | M: Masahiro Yamada <yamada.masahiro@socionext.com> | 3961 | M: Masahiro Yamada <yamada.masahiro@socionext.com> |
3979 | L: linux-mtd@lists.infradead.org | 3962 | L: linux-mtd@lists.infradead.org |
@@ -4028,15 +4011,6 @@ F: drivers/devfreq/devfreq-event.c | |||
4028 | F: include/linux/devfreq-event.h | 4011 | F: include/linux/devfreq-event.h |
4029 | F: Documentation/devicetree/bindings/devfreq/event/ | 4012 | F: Documentation/devicetree/bindings/devfreq/event/ |
4030 | 4013 | ||
4031 | BUS FREQUENCY DRIVER FOR SAMSUNG EXYNOS | ||
4032 | M: Chanwoo Choi <cw00.choi@samsung.com> | ||
4033 | L: linux-pm@vger.kernel.org | ||
4034 | L: linux-samsung-soc@vger.kernel.org | ||
4035 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq.git | ||
4036 | S: Maintained | ||
4037 | F: drivers/devfreq/exynos-bus.c | ||
4038 | F: Documentation/devicetree/bindings/devfreq/exynos-bus.txt | ||
4039 | |||
4040 | DEVICE NUMBER REGISTRY | 4014 | DEVICE NUMBER REGISTRY |
4041 | M: Torben Mathiasen <device@lanana.org> | 4015 | M: Torben Mathiasen <device@lanana.org> |
4042 | W: http://lanana.org/docs/device-list/index.html | 4016 | W: http://lanana.org/docs/device-list/index.html |
@@ -4186,20 +4160,6 @@ F: include/linux/*fence.h | |||
4186 | F: Documentation/driver-api/dma-buf.rst | 4160 | F: Documentation/driver-api/dma-buf.rst |
4187 | T: git git://anongit.freedesktop.org/drm/drm-misc | 4161 | T: git git://anongit.freedesktop.org/drm/drm-misc |
4188 | 4162 | ||
4189 | SYNC FILE FRAMEWORK | ||
4190 | M: Sumit Semwal <sumit.semwal@linaro.org> | ||
4191 | R: Gustavo Padovan <gustavo@padovan.org> | ||
4192 | S: Maintained | ||
4193 | L: linux-media@vger.kernel.org | ||
4194 | L: dri-devel@lists.freedesktop.org | ||
4195 | F: drivers/dma-buf/sync_* | ||
4196 | F: drivers/dma-buf/dma-fence* | ||
4197 | F: drivers/dma-buf/sw_sync.c | ||
4198 | F: include/linux/sync_file.h | ||
4199 | F: include/uapi/linux/sync_file.h | ||
4200 | F: Documentation/sync_file.txt | ||
4201 | T: git git://anongit.freedesktop.org/drm/drm-misc | ||
4202 | |||
4203 | DMA GENERIC OFFLOAD ENGINE SUBSYSTEM | 4163 | DMA GENERIC OFFLOAD ENGINE SUBSYSTEM |
4204 | M: Vinod Koul <vinod.koul@intel.com> | 4164 | M: Vinod Koul <vinod.koul@intel.com> |
4205 | L: dmaengine@vger.kernel.org | 4165 | L: dmaengine@vger.kernel.org |
@@ -4211,6 +4171,21 @@ F: Documentation/devicetree/bindings/dma/ | |||
4211 | F: Documentation/dmaengine/ | 4171 | F: Documentation/dmaengine/ |
4212 | T: git git://git.infradead.org/users/vkoul/slave-dma.git | 4172 | T: git git://git.infradead.org/users/vkoul/slave-dma.git |
4213 | 4173 | ||
4174 | DMA MAPPING HELPERS | ||
4175 | M: Christoph Hellwig <hch@lst.de> | ||
4176 | M: Marek Szyprowski <m.szyprowski@samsung.com> | ||
4177 | R: Robin Murphy <robin.murphy@arm.com> | ||
4178 | L: linux-kernel@vger.kernel.org | ||
4179 | T: git git://git.infradead.org/users/hch/dma-mapping.git | ||
4180 | W: http://git.infradead.org/users/hch/dma-mapping.git | ||
4181 | S: Supported | ||
4182 | F: lib/dma-debug.c | ||
4183 | F: lib/dma-noop.c | ||
4184 | F: lib/dma-virt.c | ||
4185 | F: drivers/base/dma-mapping.c | ||
4186 | F: drivers/base/dma-coherent.c | ||
4187 | F: include/linux/dma-mapping.h | ||
4188 | |||
4214 | DME1737 HARDWARE MONITOR DRIVER | 4189 | DME1737 HARDWARE MONITOR DRIVER |
4215 | M: Juerg Haefliger <juergh@gmail.com> | 4190 | M: Juerg Haefliger <juergh@gmail.com> |
4216 | L: linux-hwmon@vger.kernel.org | 4191 | L: linux-hwmon@vger.kernel.org |
@@ -4241,6 +4216,13 @@ X: Documentation/spi | |||
4241 | X: Documentation/media | 4216 | X: Documentation/media |
4242 | T: git git://git.lwn.net/linux.git docs-next | 4217 | T: git git://git.lwn.net/linux.git docs-next |
4243 | 4218 | ||
4219 | DONGWOON DW9714 LENS VOICE COIL DRIVER | ||
4220 | M: Sakari Ailus <sakari.ailus@linux.intel.com> | ||
4221 | L: linux-media@vger.kernel.org | ||
4222 | T: git git://linuxtv.org/media_tree.git | ||
4223 | S: Maintained | ||
4224 | F: drivers/media/i2c/dw9714.c | ||
4225 | |||
4244 | DOUBLETALK DRIVER | 4226 | DOUBLETALK DRIVER |
4245 | M: "James R. Van Zandt" <jrv@vanzandt.mv.com> | 4227 | M: "James R. Van Zandt" <jrv@vanzandt.mv.com> |
4246 | L: blinux-list@redhat.com | 4228 | L: blinux-list@redhat.com |
@@ -4292,36 +4274,13 @@ F: include/linux/debugfs.h | |||
4292 | F: include/linux/kobj* | 4274 | F: include/linux/kobj* |
4293 | F: lib/kobj* | 4275 | F: lib/kobj* |
4294 | 4276 | ||
4295 | DRM DRIVERS | 4277 | DRIVERS FOR ADAPTIVE VOLTAGE SCALING (AVS) |
4296 | M: David Airlie <airlied@linux.ie> | 4278 | M: Kevin Hilman <khilman@kernel.org> |
4297 | L: dri-devel@lists.freedesktop.org | 4279 | M: Nishanth Menon <nm@ti.com> |
4298 | T: git git://people.freedesktop.org/~airlied/linux | ||
4299 | B: https://bugs.freedesktop.org/ | ||
4300 | C: irc://chat.freenode.net/dri-devel | ||
4301 | S: Maintained | ||
4302 | F: drivers/gpu/drm/ | ||
4303 | F: drivers/gpu/vga/ | ||
4304 | F: Documentation/devicetree/bindings/display/ | ||
4305 | F: Documentation/devicetree/bindings/gpu/ | ||
4306 | F: Documentation/devicetree/bindings/video/ | ||
4307 | F: Documentation/gpu/ | ||
4308 | F: include/drm/ | ||
4309 | F: include/uapi/drm/ | ||
4310 | F: include/linux/vga* | ||
4311 | |||
4312 | DRM DRIVERS AND MISC GPU PATCHES | ||
4313 | M: Daniel Vetter <daniel.vetter@intel.com> | ||
4314 | M: Jani Nikula <jani.nikula@linux.intel.com> | ||
4315 | M: Sean Paul <seanpaul@chromium.org> | ||
4316 | W: https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-misc.html | ||
4317 | S: Maintained | 4280 | S: Maintained |
4318 | T: git git://anongit.freedesktop.org/drm/drm-misc | 4281 | F: drivers/power/avs/ |
4319 | F: Documentation/gpu/ | 4282 | F: include/linux/power/smartreflex.h |
4320 | F: drivers/gpu/vga/ | 4283 | L: linux-pm@vger.kernel.org |
4321 | F: drivers/gpu/drm/* | ||
4322 | F: include/drm/drm* | ||
4323 | F: include/uapi/drm/drm* | ||
4324 | F: include/linux/vga* | ||
4325 | 4284 | ||
4326 | DRM DRIVER FOR ARM PL111 CLCD | 4285 | DRM DRIVER FOR ARM PL111 CLCD |
4327 | M: Eric Anholt <eric@anholt.net> | 4286 | M: Eric Anholt <eric@anholt.net> |
@@ -4334,14 +4293,6 @@ M: Dave Airlie <airlied@redhat.com> | |||
4334 | S: Odd Fixes | 4293 | S: Odd Fixes |
4335 | F: drivers/gpu/drm/ast/ | 4294 | F: drivers/gpu/drm/ast/ |
4336 | 4295 | ||
4337 | DRM DRIVERS FOR BRIDGE CHIPS | ||
4338 | M: Archit Taneja <architt@codeaurora.org> | ||
4339 | M: Andrzej Hajda <a.hajda@samsung.com> | ||
4340 | R: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> | ||
4341 | S: Maintained | ||
4342 | T: git git://anongit.freedesktop.org/drm/drm-misc | ||
4343 | F: drivers/gpu/drm/bridge/ | ||
4344 | |||
4345 | DRM DRIVER FOR BOCHS VIRTUAL GPU | 4296 | DRM DRIVER FOR BOCHS VIRTUAL GPU |
4346 | M: Gerd Hoffmann <kraxel@redhat.com> | 4297 | M: Gerd Hoffmann <kraxel@redhat.com> |
4347 | L: virtualization@lists.linux-foundation.org | 4298 | L: virtualization@lists.linux-foundation.org |
@@ -4349,6 +4300,47 @@ T: git git://anongit.freedesktop.org/drm/drm-misc | |||
4349 | S: Maintained | 4300 | S: Maintained |
4350 | F: drivers/gpu/drm/bochs/ | 4301 | F: drivers/gpu/drm/bochs/ |
4351 | 4302 | ||
4303 | DRM DRIVER FOR INTEL I810 VIDEO CARDS | ||
4304 | S: Orphan / Obsolete | ||
4305 | F: drivers/gpu/drm/i810/ | ||
4306 | F: include/uapi/drm/i810_drm.h | ||
4307 | |||
4308 | DRM DRIVER FOR MATROX G200/G400 GRAPHICS CARDS | ||
4309 | S: Orphan / Obsolete | ||
4310 | F: drivers/gpu/drm/mga/ | ||
4311 | F: include/uapi/drm/mga_drm.h | ||
4312 | |||
4313 | DRM DRIVER FOR MGA G200 SERVER GRAPHICS CHIPS | ||
4314 | M: Dave Airlie <airlied@redhat.com> | ||
4315 | S: Odd Fixes | ||
4316 | F: drivers/gpu/drm/mgag200/ | ||
4317 | |||
4318 | DRM DRIVER FOR MI0283QT | ||
4319 | M: Noralf Trønnes <noralf@tronnes.org> | ||
4320 | S: Maintained | ||
4321 | F: drivers/gpu/drm/tinydrm/mi0283qt.c | ||
4322 | F: Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt | ||
4323 | |||
4324 | DRM DRIVER FOR MSM ADRENO GPU | ||
4325 | M: Rob Clark <robdclark@gmail.com> | ||
4326 | L: linux-arm-msm@vger.kernel.org | ||
4327 | L: dri-devel@lists.freedesktop.org | ||
4328 | L: freedreno@lists.freedesktop.org | ||
4329 | T: git git://people.freedesktop.org/~robclark/linux | ||
4330 | S: Maintained | ||
4331 | F: drivers/gpu/drm/msm/ | ||
4332 | F: include/uapi/drm/msm_drm.h | ||
4333 | F: Documentation/devicetree/bindings/display/msm/ | ||
4334 | |||
4335 | DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS | ||
4336 | M: Ben Skeggs <bskeggs@redhat.com> | ||
4337 | L: dri-devel@lists.freedesktop.org | ||
4338 | L: nouveau@lists.freedesktop.org | ||
4339 | T: git git://github.com/skeggsb/linux | ||
4340 | S: Supported | ||
4341 | F: drivers/gpu/drm/nouveau/ | ||
4342 | F: include/uapi/drm/nouveau_drm.h | ||
4343 | |||
4352 | DRM DRIVER FOR QEMU'S CIRRUS DEVICE | 4344 | DRM DRIVER FOR QEMU'S CIRRUS DEVICE |
4353 | M: Dave Airlie <airlied@redhat.com> | 4345 | M: Dave Airlie <airlied@redhat.com> |
4354 | M: Gerd Hoffmann <kraxel@redhat.com> | 4346 | M: Gerd Hoffmann <kraxel@redhat.com> |
@@ -4358,59 +4350,80 @@ S: Obsolete | |||
4358 | W: https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ | 4350 | W: https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ |
4359 | F: drivers/gpu/drm/cirrus/ | 4351 | F: drivers/gpu/drm/cirrus/ |
4360 | 4352 | ||
4361 | RADEON and AMDGPU DRM DRIVERS | 4353 | DRM DRIVER FOR QXL VIRTUAL GPU |
4362 | M: Alex Deucher <alexander.deucher@amd.com> | 4354 | M: Dave Airlie <airlied@redhat.com> |
4363 | M: Christian König <christian.koenig@amd.com> | 4355 | M: Gerd Hoffmann <kraxel@redhat.com> |
4364 | L: amd-gfx@lists.freedesktop.org | 4356 | L: virtualization@lists.linux-foundation.org |
4365 | T: git git://people.freedesktop.org/~agd5f/linux | 4357 | T: git git://anongit.freedesktop.org/drm/drm-misc |
4358 | S: Maintained | ||
4359 | F: drivers/gpu/drm/qxl/ | ||
4360 | F: include/uapi/drm/qxl_drm.h | ||
4361 | |||
4362 | DRM DRIVER FOR RAGE 128 VIDEO CARDS | ||
4363 | S: Orphan / Obsolete | ||
4364 | F: drivers/gpu/drm/r128/ | ||
4365 | F: include/uapi/drm/r128_drm.h | ||
4366 | |||
4367 | DRM DRIVER FOR SAVAGE VIDEO CARDS | ||
4368 | S: Orphan / Obsolete | ||
4369 | F: drivers/gpu/drm/savage/ | ||
4370 | F: include/uapi/drm/savage_drm.h | ||
4371 | |||
4372 | DRM DRIVER FOR SIS VIDEO CARDS | ||
4373 | S: Orphan / Obsolete | ||
4374 | F: drivers/gpu/drm/sis/ | ||
4375 | F: include/uapi/drm/sis_drm.h | ||
4376 | |||
4377 | DRM DRIVER FOR TDFX VIDEO CARDS | ||
4378 | S: Orphan / Obsolete | ||
4379 | F: drivers/gpu/drm/tdfx/ | ||
4380 | |||
4381 | DRM DRIVER FOR USB DISPLAYLINK VIDEO ADAPTERS | ||
4382 | M: Dave Airlie <airlied@redhat.com> | ||
4383 | S: Odd Fixes | ||
4384 | F: drivers/gpu/drm/udl/ | ||
4385 | |||
4386 | DRM DRIVER FOR VMWARE VIRTUAL GPU | ||
4387 | M: "VMware Graphics" <linux-graphics-maintainer@vmware.com> | ||
4388 | M: Sinclair Yeh <syeh@vmware.com> | ||
4389 | M: Thomas Hellstrom <thellstrom@vmware.com> | ||
4390 | L: dri-devel@lists.freedesktop.org | ||
4391 | T: git git://people.freedesktop.org/~syeh/repos_linux | ||
4392 | T: git git://people.freedesktop.org/~thomash/linux | ||
4366 | S: Supported | 4393 | S: Supported |
4367 | F: drivers/gpu/drm/radeon/ | 4394 | F: drivers/gpu/drm/vmwgfx/ |
4368 | F: include/uapi/drm/radeon_drm.h | 4395 | F: include/uapi/drm/vmwgfx_drm.h |
4369 | F: drivers/gpu/drm/amd/ | ||
4370 | F: include/uapi/drm/amdgpu_drm.h | ||
4371 | 4396 | ||
4372 | DRM PANEL DRIVERS | 4397 | DRM DRIVERS |
4373 | M: Thierry Reding <thierry.reding@gmail.com> | 4398 | M: David Airlie <airlied@linux.ie> |
4374 | L: dri-devel@lists.freedesktop.org | 4399 | L: dri-devel@lists.freedesktop.org |
4375 | T: git git://anongit.freedesktop.org/tegra/linux.git | 4400 | T: git git://people.freedesktop.org/~airlied/linux |
4401 | B: https://bugs.freedesktop.org/ | ||
4402 | C: irc://chat.freenode.net/dri-devel | ||
4376 | S: Maintained | 4403 | S: Maintained |
4377 | F: drivers/gpu/drm/drm_panel.c | 4404 | F: drivers/gpu/drm/ |
4378 | F: drivers/gpu/drm/panel/ | 4405 | F: drivers/gpu/vga/ |
4379 | F: include/drm/drm_panel.h | 4406 | F: Documentation/devicetree/bindings/display/ |
4380 | F: Documentation/devicetree/bindings/display/panel/ | 4407 | F: Documentation/devicetree/bindings/gpu/ |
4408 | F: Documentation/devicetree/bindings/video/ | ||
4409 | F: Documentation/gpu/ | ||
4410 | F: include/drm/ | ||
4411 | F: include/uapi/drm/ | ||
4412 | F: include/linux/vga* | ||
4381 | 4413 | ||
4382 | INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets) | 4414 | DRM DRIVERS AND MISC GPU PATCHES |
4383 | M: Daniel Vetter <daniel.vetter@intel.com> | 4415 | M: Daniel Vetter <daniel.vetter@intel.com> |
4384 | M: Jani Nikula <jani.nikula@linux.intel.com> | 4416 | M: Jani Nikula <jani.nikula@linux.intel.com> |
4385 | L: intel-gfx@lists.freedesktop.org | 4417 | M: Sean Paul <seanpaul@chromium.org> |
4386 | W: https://01.org/linuxgraphics/ | 4418 | W: https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-misc.html |
4387 | B: https://01.org/linuxgraphics/documentation/how-report-bugs | 4419 | S: Maintained |
4388 | C: irc://chat.freenode.net/intel-gfx | ||
4389 | Q: http://patchwork.freedesktop.org/project/intel-gfx/ | ||
4390 | T: git git://anongit.freedesktop.org/drm-intel | ||
4391 | S: Supported | ||
4392 | F: drivers/gpu/drm/i915/ | ||
4393 | F: include/drm/i915* | ||
4394 | F: include/uapi/drm/i915_drm.h | ||
4395 | F: Documentation/gpu/i915.rst | ||
4396 | |||
4397 | INTEL GVT-g DRIVERS (Intel GPU Virtualization) | ||
4398 | M: Zhenyu Wang <zhenyuw@linux.intel.com> | ||
4399 | M: Zhi Wang <zhi.a.wang@intel.com> | ||
4400 | L: intel-gvt-dev@lists.freedesktop.org | ||
4401 | L: intel-gfx@lists.freedesktop.org | ||
4402 | W: https://01.org/igvt-g | ||
4403 | T: git https://github.com/01org/gvt-linux.git | ||
4404 | S: Supported | ||
4405 | F: drivers/gpu/drm/i915/gvt/ | ||
4406 | |||
4407 | DRM DRIVERS FOR ATMEL HLCDC | ||
4408 | M: Boris Brezillon <boris.brezillon@free-electrons.com> | ||
4409 | L: dri-devel@lists.freedesktop.org | ||
4410 | S: Supported | ||
4411 | F: drivers/gpu/drm/atmel-hlcdc/ | ||
4412 | F: Documentation/devicetree/bindings/drm/atmel/ | ||
4413 | T: git git://anongit.freedesktop.org/drm/drm-misc | 4420 | T: git git://anongit.freedesktop.org/drm/drm-misc |
4421 | F: Documentation/gpu/ | ||
4422 | F: drivers/gpu/vga/ | ||
4423 | F: drivers/gpu/drm/* | ||
4424 | F: include/drm/drm* | ||
4425 | F: include/uapi/drm/drm* | ||
4426 | F: include/linux/vga* | ||
4414 | 4427 | ||
4415 | DRM DRIVERS FOR ALLWINNER A10 | 4428 | DRM DRIVERS FOR ALLWINNER A10 |
4416 | M: Maxime Ripard <maxime.ripard@free-electrons.com> | 4429 | M: Maxime Ripard <maxime.ripard@free-electrons.com> |
@@ -4432,6 +4445,22 @@ F: Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.txt | |||
4432 | F: Documentation/gpu/meson.rst | 4445 | F: Documentation/gpu/meson.rst |
4433 | T: git git://anongit.freedesktop.org/drm/drm-misc | 4446 | T: git git://anongit.freedesktop.org/drm/drm-misc |
4434 | 4447 | ||
4448 | DRM DRIVERS FOR ATMEL HLCDC | ||
4449 | M: Boris Brezillon <boris.brezillon@free-electrons.com> | ||
4450 | L: dri-devel@lists.freedesktop.org | ||
4451 | S: Supported | ||
4452 | F: drivers/gpu/drm/atmel-hlcdc/ | ||
4453 | F: Documentation/devicetree/bindings/drm/atmel/ | ||
4454 | T: git git://anongit.freedesktop.org/drm/drm-misc | ||
4455 | |||
4456 | DRM DRIVERS FOR BRIDGE CHIPS | ||
4457 | M: Archit Taneja <architt@codeaurora.org> | ||
4458 | M: Andrzej Hajda <a.hajda@samsung.com> | ||
4459 | R: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> | ||
4460 | S: Maintained | ||
4461 | T: git git://anongit.freedesktop.org/drm/drm-misc | ||
4462 | F: drivers/gpu/drm/bridge/ | ||
4463 | |||
4435 | DRM DRIVERS FOR EXYNOS | 4464 | DRM DRIVERS FOR EXYNOS |
4436 | M: Inki Dae <inki.dae@samsung.com> | 4465 | M: Inki Dae <inki.dae@samsung.com> |
4437 | M: Joonyoung Shim <jy0922.shim@samsung.com> | 4466 | M: Joonyoung Shim <jy0922.shim@samsung.com> |
@@ -4480,11 +4509,6 @@ S: Maintained | |||
4480 | F: drivers/gpu/drm/hisilicon/ | 4509 | F: drivers/gpu/drm/hisilicon/ |
4481 | F: Documentation/devicetree/bindings/display/hisilicon/ | 4510 | F: Documentation/devicetree/bindings/display/hisilicon/ |
4482 | 4511 | ||
4483 | DRM DRIVER FOR INTEL I810 VIDEO CARDS | ||
4484 | S: Orphan / Obsolete | ||
4485 | F: drivers/gpu/drm/i810/ | ||
4486 | F: include/uapi/drm/i810_drm.h | ||
4487 | |||
4488 | DRM DRIVERS FOR MEDIATEK | 4512 | DRM DRIVERS FOR MEDIATEK |
4489 | M: CK Hu <ck.hu@mediatek.com> | 4513 | M: CK Hu <ck.hu@mediatek.com> |
4490 | M: Philipp Zabel <p.zabel@pengutronix.de> | 4514 | M: Philipp Zabel <p.zabel@pengutronix.de> |
@@ -4493,32 +4517,6 @@ S: Supported | |||
4493 | F: drivers/gpu/drm/mediatek/ | 4517 | F: drivers/gpu/drm/mediatek/ |
4494 | F: Documentation/devicetree/bindings/display/mediatek/ | 4518 | F: Documentation/devicetree/bindings/display/mediatek/ |
4495 | 4519 | ||
4496 | DRM DRIVER FOR MI0283QT | ||
4497 | M: Noralf Trønnes <noralf@tronnes.org> | ||
4498 | S: Maintained | ||
4499 | F: drivers/gpu/drm/tinydrm/mi0283qt.c | ||
4500 | F: Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt | ||
4501 | |||
4502 | DRM DRIVER FOR MSM ADRENO GPU | ||
4503 | M: Rob Clark <robdclark@gmail.com> | ||
4504 | L: linux-arm-msm@vger.kernel.org | ||
4505 | L: dri-devel@lists.freedesktop.org | ||
4506 | L: freedreno@lists.freedesktop.org | ||
4507 | T: git git://people.freedesktop.org/~robclark/linux | ||
4508 | S: Maintained | ||
4509 | F: drivers/gpu/drm/msm/ | ||
4510 | F: include/uapi/drm/msm_drm.h | ||
4511 | F: Documentation/devicetree/bindings/display/msm/ | ||
4512 | |||
4513 | DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS | ||
4514 | M: Ben Skeggs <bskeggs@redhat.com> | ||
4515 | L: dri-devel@lists.freedesktop.org | ||
4516 | L: nouveau@lists.freedesktop.org | ||
4517 | T: git git://github.com/skeggsb/linux | ||
4518 | S: Supported | ||
4519 | F: drivers/gpu/drm/nouveau/ | ||
4520 | F: include/uapi/drm/nouveau_drm.h | ||
4521 | |||
4522 | DRM DRIVERS FOR NVIDIA TEGRA | 4520 | DRM DRIVERS FOR NVIDIA TEGRA |
4523 | M: Thierry Reding <thierry.reding@gmail.com> | 4521 | M: Thierry Reding <thierry.reding@gmail.com> |
4524 | L: dri-devel@lists.freedesktop.org | 4522 | L: dri-devel@lists.freedesktop.org |
@@ -4531,21 +4529,6 @@ F: include/linux/host1x.h | |||
4531 | F: include/uapi/drm/tegra_drm.h | 4529 | F: include/uapi/drm/tegra_drm.h |
4532 | F: Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt | 4530 | F: Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt |
4533 | 4531 | ||
4534 | DRM DRIVER FOR MATROX G200/G400 GRAPHICS CARDS | ||
4535 | S: Orphan / Obsolete | ||
4536 | F: drivers/gpu/drm/mga/ | ||
4537 | F: include/uapi/drm/mga_drm.h | ||
4538 | |||
4539 | DRM DRIVER FOR MGA G200 SERVER GRAPHICS CHIPS | ||
4540 | M: Dave Airlie <airlied@redhat.com> | ||
4541 | S: Odd Fixes | ||
4542 | F: drivers/gpu/drm/mgag200/ | ||
4543 | |||
4544 | DRM DRIVER FOR RAGE 128 VIDEO CARDS | ||
4545 | S: Orphan / Obsolete | ||
4546 | F: drivers/gpu/drm/r128/ | ||
4547 | F: include/uapi/drm/r128_drm.h | ||
4548 | |||
4549 | DRM DRIVERS FOR RENESAS | 4532 | DRM DRIVERS FOR RENESAS |
4550 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 4533 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
4551 | L: dri-devel@lists.freedesktop.org | 4534 | L: dri-devel@lists.freedesktop.org |
@@ -4558,15 +4541,6 @@ F: include/linux/platform_data/shmob_drm.h | |||
4558 | F: Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt | 4541 | F: Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt |
4559 | F: Documentation/devicetree/bindings/display/renesas,du.txt | 4542 | F: Documentation/devicetree/bindings/display/renesas,du.txt |
4560 | 4543 | ||
4561 | DRM DRIVER FOR QXL VIRTUAL GPU | ||
4562 | M: Dave Airlie <airlied@redhat.com> | ||
4563 | M: Gerd Hoffmann <kraxel@redhat.com> | ||
4564 | L: virtualization@lists.linux-foundation.org | ||
4565 | T: git git://anongit.freedesktop.org/drm/drm-misc | ||
4566 | S: Maintained | ||
4567 | F: drivers/gpu/drm/qxl/ | ||
4568 | F: include/uapi/drm/qxl_drm.h | ||
4569 | |||
4570 | DRM DRIVERS FOR ROCKCHIP | 4544 | DRM DRIVERS FOR ROCKCHIP |
4571 | M: Mark Yao <mark.yao@rock-chips.com> | 4545 | M: Mark Yao <mark.yao@rock-chips.com> |
4572 | L: dri-devel@lists.freedesktop.org | 4546 | L: dri-devel@lists.freedesktop.org |
@@ -4575,16 +4549,6 @@ F: drivers/gpu/drm/rockchip/ | |||
4575 | F: Documentation/devicetree/bindings/display/rockchip/ | 4549 | F: Documentation/devicetree/bindings/display/rockchip/ |
4576 | T: git git://anongit.freedesktop.org/drm/drm-misc | 4550 | T: git git://anongit.freedesktop.org/drm/drm-misc |
4577 | 4551 | ||
4578 | DRM DRIVER FOR SAVAGE VIDEO CARDS | ||
4579 | S: Orphan / Obsolete | ||
4580 | F: drivers/gpu/drm/savage/ | ||
4581 | F: include/uapi/drm/savage_drm.h | ||
4582 | |||
4583 | DRM DRIVER FOR SIS VIDEO CARDS | ||
4584 | S: Orphan / Obsolete | ||
4585 | F: drivers/gpu/drm/sis/ | ||
4586 | F: include/uapi/drm/sis_drm.h | ||
4587 | |||
4588 | DRM DRIVERS FOR STI | 4552 | DRM DRIVERS FOR STI |
4589 | M: Benjamin Gaignard <benjamin.gaignard@linaro.org> | 4553 | M: Benjamin Gaignard <benjamin.gaignard@linaro.org> |
4590 | M: Vincent Abriou <vincent.abriou@st.com> | 4554 | M: Vincent Abriou <vincent.abriou@st.com> |
@@ -4605,36 +4569,20 @@ S: Maintained | |||
4605 | F: drivers/gpu/drm/stm | 4569 | F: drivers/gpu/drm/stm |
4606 | F: Documentation/devicetree/bindings/display/st,stm32-ltdc.txt | 4570 | F: Documentation/devicetree/bindings/display/st,stm32-ltdc.txt |
4607 | 4571 | ||
4608 | DRM DRIVER FOR TDFX VIDEO CARDS | 4572 | DRM DRIVERS FOR TI LCDC |
4609 | S: Orphan / Obsolete | 4573 | M: Jyri Sarha <jsarha@ti.com> |
4610 | F: drivers/gpu/drm/tdfx/ | 4574 | R: Tomi Valkeinen <tomi.valkeinen@ti.com> |
4611 | |||
4612 | DRM DRIVER FOR USB DISPLAYLINK VIDEO ADAPTERS | ||
4613 | M: Dave Airlie <airlied@redhat.com> | ||
4614 | S: Odd Fixes | ||
4615 | F: drivers/gpu/drm/udl/ | ||
4616 | |||
4617 | DRM DRIVERS FOR VIVANTE GPU IP | ||
4618 | M: Lucas Stach <l.stach@pengutronix.de> | ||
4619 | R: Russell King <linux+etnaviv@armlinux.org.uk> | ||
4620 | R: Christian Gmeiner <christian.gmeiner@gmail.com> | ||
4621 | L: etnaviv@lists.freedesktop.org | ||
4622 | L: dri-devel@lists.freedesktop.org | 4575 | L: dri-devel@lists.freedesktop.org |
4623 | S: Maintained | 4576 | S: Maintained |
4624 | F: drivers/gpu/drm/etnaviv/ | 4577 | F: drivers/gpu/drm/tilcdc/ |
4625 | F: include/uapi/drm/etnaviv_drm.h | 4578 | F: Documentation/devicetree/bindings/display/tilcdc/ |
4626 | F: Documentation/devicetree/bindings/display/etnaviv/ | ||
4627 | 4579 | ||
4628 | DRM DRIVER FOR VMWARE VIRTUAL GPU | 4580 | DRM DRIVERS FOR TI OMAP |
4629 | M: "VMware Graphics" <linux-graphics-maintainer@vmware.com> | 4581 | M: Tomi Valkeinen <tomi.valkeinen@ti.com> |
4630 | M: Sinclair Yeh <syeh@vmware.com> | ||
4631 | M: Thomas Hellstrom <thellstrom@vmware.com> | ||
4632 | L: dri-devel@lists.freedesktop.org | 4582 | L: dri-devel@lists.freedesktop.org |
4633 | T: git git://people.freedesktop.org/~syeh/repos_linux | 4583 | S: Maintained |
4634 | T: git git://people.freedesktop.org/~thomash/linux | 4584 | F: drivers/gpu/drm/omapdrm/ |
4635 | S: Supported | 4585 | F: Documentation/devicetree/bindings/display/ti/ |
4636 | F: drivers/gpu/drm/vmwgfx/ | ||
4637 | F: include/uapi/drm/vmwgfx_drm.h | ||
4638 | 4586 | ||
4639 | DRM DRIVERS FOR VC4 | 4587 | DRM DRIVERS FOR VC4 |
4640 | M: Eric Anholt <eric@anholt.net> | 4588 | M: Eric Anholt <eric@anholt.net> |
@@ -4645,20 +4593,16 @@ F: include/uapi/drm/vc4_drm.h | |||
4645 | F: Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 4593 | F: Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt |
4646 | T: git git://anongit.freedesktop.org/drm/drm-misc | 4594 | T: git git://anongit.freedesktop.org/drm/drm-misc |
4647 | 4595 | ||
4648 | DRM DRIVERS FOR TI OMAP | 4596 | DRM DRIVERS FOR VIVANTE GPU IP |
4649 | M: Tomi Valkeinen <tomi.valkeinen@ti.com> | 4597 | M: Lucas Stach <l.stach@pengutronix.de> |
4650 | L: dri-devel@lists.freedesktop.org | 4598 | R: Russell King <linux+etnaviv@armlinux.org.uk> |
4651 | S: Maintained | 4599 | R: Christian Gmeiner <christian.gmeiner@gmail.com> |
4652 | F: drivers/gpu/drm/omapdrm/ | 4600 | L: etnaviv@lists.freedesktop.org |
4653 | F: Documentation/devicetree/bindings/display/ti/ | ||
4654 | |||
4655 | DRM DRIVERS FOR TI LCDC | ||
4656 | M: Jyri Sarha <jsarha@ti.com> | ||
4657 | R: Tomi Valkeinen <tomi.valkeinen@ti.com> | ||
4658 | L: dri-devel@lists.freedesktop.org | 4601 | L: dri-devel@lists.freedesktop.org |
4659 | S: Maintained | 4602 | S: Maintained |
4660 | F: drivers/gpu/drm/tilcdc/ | 4603 | F: drivers/gpu/drm/etnaviv/ |
4661 | F: Documentation/devicetree/bindings/display/tilcdc/ | 4604 | F: include/uapi/drm/etnaviv_drm.h |
4605 | F: Documentation/devicetree/bindings/display/etnaviv/ | ||
4662 | 4606 | ||
4663 | DRM DRIVERS FOR ZTE ZX | 4607 | DRM DRIVERS FOR ZTE ZX |
4664 | M: Shawn Guo <shawnguo@kernel.org> | 4608 | M: Shawn Guo <shawnguo@kernel.org> |
@@ -4668,6 +4612,16 @@ F: drivers/gpu/drm/zte/ | |||
4668 | F: Documentation/devicetree/bindings/display/zte,vou.txt | 4612 | F: Documentation/devicetree/bindings/display/zte,vou.txt |
4669 | T: git git://anongit.freedesktop.org/drm/drm-misc | 4613 | T: git git://anongit.freedesktop.org/drm/drm-misc |
4670 | 4614 | ||
4615 | DRM PANEL DRIVERS | ||
4616 | M: Thierry Reding <thierry.reding@gmail.com> | ||
4617 | L: dri-devel@lists.freedesktop.org | ||
4618 | T: git git://anongit.freedesktop.org/tegra/linux.git | ||
4619 | S: Maintained | ||
4620 | F: drivers/gpu/drm/drm_panel.c | ||
4621 | F: drivers/gpu/drm/panel/ | ||
4622 | F: include/drm/drm_panel.h | ||
4623 | F: Documentation/devicetree/bindings/display/panel/ | ||
4624 | |||
4671 | DSBR100 USB FM RADIO DRIVER | 4625 | DSBR100 USB FM RADIO DRIVER |
4672 | M: Alexey Klimov <klimov.linux@gmail.com> | 4626 | M: Alexey Klimov <klimov.linux@gmail.com> |
4673 | L: linux-media@vger.kernel.org | 4627 | L: linux-media@vger.kernel.org |
@@ -4799,13 +4753,6 @@ S: Maintained | |||
4799 | F: drivers/media/usb/dvb-usb-v2/dvb_usb* | 4753 | F: drivers/media/usb/dvb-usb-v2/dvb_usb* |
4800 | F: drivers/media/usb/dvb-usb-v2/usb_urb.c | 4754 | F: drivers/media/usb/dvb-usb-v2/usb_urb.c |
4801 | 4755 | ||
4802 | DONGWOON DW9714 LENS VOICE COIL DRIVER | ||
4803 | M: Sakari Ailus <sakari.ailus@linux.intel.com> | ||
4804 | L: linux-media@vger.kernel.org | ||
4805 | T: git git://linuxtv.org/media_tree.git | ||
4806 | S: Maintained | ||
4807 | F: drivers/media/i2c/dw9714.c | ||
4808 | |||
4809 | DYNAMIC DEBUG | 4756 | DYNAMIC DEBUG |
4810 | M: Jason Baron <jbaron@akamai.com> | 4757 | M: Jason Baron <jbaron@akamai.com> |
4811 | S: Maintained | 4758 | S: Maintained |
@@ -4861,19 +4808,6 @@ S: Supported | |||
4861 | F: Documentation/filesystems/ecryptfs.txt | 4808 | F: Documentation/filesystems/ecryptfs.txt |
4862 | F: fs/ecryptfs/ | 4809 | F: fs/ecryptfs/ |
4863 | 4810 | ||
4864 | EDAC-CORE | ||
4865 | M: Borislav Petkov <bp@alien8.de> | ||
4866 | M: Mauro Carvalho Chehab <mchehab@s-opensource.com> | ||
4867 | M: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
4868 | L: linux-edac@vger.kernel.org | ||
4869 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-next | ||
4870 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac.git linux_next | ||
4871 | S: Supported | ||
4872 | F: Documentation/admin-guide/ras.rst | ||
4873 | F: Documentation/driver-api/edac.rst | ||
4874 | F: drivers/edac/ | ||
4875 | F: include/linux/edac.h | ||
4876 | |||
4877 | EDAC-AMD64 | 4811 | EDAC-AMD64 |
4878 | M: Borislav Petkov <bp@alien8.de> | 4812 | M: Borislav Petkov <bp@alien8.de> |
4879 | L: linux-edac@vger.kernel.org | 4813 | L: linux-edac@vger.kernel.org |
@@ -4895,6 +4829,19 @@ S: Supported | |||
4895 | F: drivers/edac/octeon_edac* | 4829 | F: drivers/edac/octeon_edac* |
4896 | F: drivers/edac/thunderx_edac* | 4830 | F: drivers/edac/thunderx_edac* |
4897 | 4831 | ||
4832 | EDAC-CORE | ||
4833 | M: Borislav Petkov <bp@alien8.de> | ||
4834 | M: Mauro Carvalho Chehab <mchehab@s-opensource.com> | ||
4835 | M: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
4836 | L: linux-edac@vger.kernel.org | ||
4837 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-next | ||
4838 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac.git linux_next | ||
4839 | S: Supported | ||
4840 | F: Documentation/admin-guide/ras.rst | ||
4841 | F: Documentation/driver-api/edac.rst | ||
4842 | F: drivers/edac/ | ||
4843 | F: include/linux/edac.h | ||
4844 | |||
4898 | EDAC-E752X | 4845 | EDAC-E752X |
4899 | M: Mark Gross <mark.gross@intel.com> | 4846 | M: Mark Gross <mark.gross@intel.com> |
4900 | L: linux-edac@vger.kernel.org | 4847 | L: linux-edac@vger.kernel.org |
@@ -4919,12 +4866,6 @@ L: linux-edac@vger.kernel.org | |||
4919 | S: Maintained | 4866 | S: Maintained |
4920 | F: drivers/edac/ghes_edac.c | 4867 | F: drivers/edac/ghes_edac.c |
4921 | 4868 | ||
4922 | EDAC-I82443BXGX | ||
4923 | M: Tim Small <tim@buttersideup.com> | ||
4924 | L: linux-edac@vger.kernel.org | ||
4925 | S: Maintained | ||
4926 | F: drivers/edac/i82443bxgx_edac.c | ||
4927 | |||
4928 | EDAC-I3000 | 4869 | EDAC-I3000 |
4929 | L: linux-edac@vger.kernel.org | 4870 | L: linux-edac@vger.kernel.org |
4930 | S: Orphan | 4871 | S: Orphan |
@@ -4956,6 +4897,12 @@ L: linux-edac@vger.kernel.org | |||
4956 | S: Maintained | 4897 | S: Maintained |
4957 | F: drivers/edac/i7core_edac.c | 4898 | F: drivers/edac/i7core_edac.c |
4958 | 4899 | ||
4900 | EDAC-I82443BXGX | ||
4901 | M: Tim Small <tim@buttersideup.com> | ||
4902 | L: linux-edac@vger.kernel.org | ||
4903 | S: Maintained | ||
4904 | F: drivers/edac/i82443bxgx_edac.c | ||
4905 | |||
4959 | EDAC-I82975X | 4906 | EDAC-I82975X |
4960 | M: Ranganathan Desikan <ravi@jetztechnologies.com> | 4907 | M: Ranganathan Desikan <ravi@jetztechnologies.com> |
4961 | M: "Arvind R." <arvino55@gmail.com> | 4908 | M: "Arvind R." <arvino55@gmail.com> |
@@ -4975,18 +4922,18 @@ L: linux-edac@vger.kernel.org | |||
4975 | S: Maintained | 4922 | S: Maintained |
4976 | F: drivers/edac/mpc85xx_edac.[ch] | 4923 | F: drivers/edac/mpc85xx_edac.[ch] |
4977 | 4924 | ||
4978 | EDAC-PND2 | ||
4979 | M: Tony Luck <tony.luck@intel.com> | ||
4980 | L: linux-edac@vger.kernel.org | ||
4981 | S: Maintained | ||
4982 | F: drivers/edac/pnd2_edac.[ch] | ||
4983 | |||
4984 | EDAC-PASEMI | 4925 | EDAC-PASEMI |
4985 | M: Egor Martovetsky <egor@pasemi.com> | 4926 | M: Egor Martovetsky <egor@pasemi.com> |
4986 | L: linux-edac@vger.kernel.org | 4927 | L: linux-edac@vger.kernel.org |
4987 | S: Maintained | 4928 | S: Maintained |
4988 | F: drivers/edac/pasemi_edac.c | 4929 | F: drivers/edac/pasemi_edac.c |
4989 | 4930 | ||
4931 | EDAC-PND2 | ||
4932 | M: Tony Luck <tony.luck@intel.com> | ||
4933 | L: linux-edac@vger.kernel.org | ||
4934 | S: Maintained | ||
4935 | F: drivers/edac/pnd2_edac.[ch] | ||
4936 | |||
4990 | EDAC-R82600 | 4937 | EDAC-R82600 |
4991 | M: Tim Small <tim@buttersideup.com> | 4938 | M: Tim Small <tim@buttersideup.com> |
4992 | L: linux-edac@vger.kernel.org | 4939 | L: linux-edac@vger.kernel.org |
@@ -5006,13 +4953,6 @@ L: linux-edac@vger.kernel.org | |||
5006 | S: Maintained | 4953 | S: Maintained |
5007 | F: drivers/edac/skx_edac.c | 4954 | F: drivers/edac/skx_edac.c |
5008 | 4955 | ||
5009 | EDAC-XGENE | ||
5010 | APPLIED MICRO (APM) X-GENE SOC EDAC | ||
5011 | M: Loc Ho <lho@apm.com> | ||
5012 | S: Supported | ||
5013 | F: drivers/edac/xgene_edac.c | ||
5014 | F: Documentation/devicetree/bindings/edac/apm-xgene-edac.txt | ||
5015 | |||
5016 | EDIROL UA-101/UA-1000 DRIVER | 4956 | EDIROL UA-101/UA-1000 DRIVER |
5017 | M: Clemens Ladisch <clemens@ladisch.de> | 4957 | M: Clemens Ladisch <clemens@ladisch.de> |
5018 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | 4958 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
@@ -5020,21 +4960,12 @@ T: git git://git.alsa-project.org/alsa-kernel.git | |||
5020 | S: Maintained | 4960 | S: Maintained |
5021 | F: sound/usb/misc/ua101.c | 4961 | F: sound/usb/misc/ua101.c |
5022 | 4962 | ||
5023 | EXTENSIBLE FIRMWARE INTERFACE (EFI) | 4963 | EFI TEST DRIVER |
5024 | M: Matt Fleming <matt@codeblueprint.co.uk> | ||
5025 | M: Ard Biesheuvel <ard.biesheuvel@linaro.org> | ||
5026 | L: linux-efi@vger.kernel.org | 4964 | L: linux-efi@vger.kernel.org |
5027 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git | 4965 | M: Ivan Hu <ivan.hu@canonical.com> |
4966 | M: Matt Fleming <matt@codeblueprint.co.uk> | ||
5028 | S: Maintained | 4967 | S: Maintained |
5029 | F: Documentation/efi-stub.txt | 4968 | F: drivers/firmware/efi/test/ |
5030 | F: arch/*/kernel/efi.c | ||
5031 | F: arch/x86/boot/compressed/eboot.[ch] | ||
5032 | F: arch/*/include/asm/efi.h | ||
5033 | F: arch/x86/platform/efi/ | ||
5034 | F: drivers/firmware/efi/ | ||
5035 | F: include/linux/efi*.h | ||
5036 | F: arch/arm/boot/compressed/efi-header.S | ||
5037 | F: arch/arm64/kernel/efi-entry.S | ||
5038 | 4969 | ||
5039 | EFI VARIABLE FILESYSTEM | 4970 | EFI VARIABLE FILESYSTEM |
5040 | M: Matthew Garrett <matthew.garrett@nebula.com> | 4971 | M: Matthew Garrett <matthew.garrett@nebula.com> |
@@ -5051,13 +4982,6 @@ M: Peter Jones <pjones@redhat.com> | |||
5051 | S: Maintained | 4982 | S: Maintained |
5052 | F: drivers/video/fbdev/efifb.c | 4983 | F: drivers/video/fbdev/efifb.c |
5053 | 4984 | ||
5054 | EFI TEST DRIVER | ||
5055 | L: linux-efi@vger.kernel.org | ||
5056 | M: Ivan Hu <ivan.hu@canonical.com> | ||
5057 | M: Matt Fleming <matt@codeblueprint.co.uk> | ||
5058 | S: Maintained | ||
5059 | F: drivers/firmware/efi/test/ | ||
5060 | |||
5061 | EFS FILESYSTEM | 4985 | EFS FILESYSTEM |
5062 | W: http://aeschi.ch.eu.org/efs/ | 4986 | W: http://aeschi.ch.eu.org/efs/ |
5063 | S: Orphan | 4987 | S: Orphan |
@@ -5086,6 +5010,34 @@ M: David Woodhouse <dwmw2@infradead.org> | |||
5086 | L: linux-embedded@vger.kernel.org | 5010 | L: linux-embedded@vger.kernel.org |
5087 | S: Maintained | 5011 | S: Maintained |
5088 | 5012 | ||
5013 | Emulex 10Gbps iSCSI - OneConnect DRIVER | ||
5014 | M: Subbu Seetharaman <subbu.seetharaman@broadcom.com> | ||
5015 | M: Ketan Mukadam <ketan.mukadam@broadcom.com> | ||
5016 | M: Jitendra Bhivare <jitendra.bhivare@broadcom.com> | ||
5017 | L: linux-scsi@vger.kernel.org | ||
5018 | W: http://www.broadcom.com | ||
5019 | S: Supported | ||
5020 | F: drivers/scsi/be2iscsi/ | ||
5021 | |||
5022 | Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER (be2net) | ||
5023 | M: Sathya Perla <sathya.perla@broadcom.com> | ||
5024 | M: Ajit Khaparde <ajit.khaparde@broadcom.com> | ||
5025 | M: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> | ||
5026 | M: Somnath Kotur <somnath.kotur@broadcom.com> | ||
5027 | L: netdev@vger.kernel.org | ||
5028 | W: http://www.emulex.com | ||
5029 | S: Supported | ||
5030 | F: drivers/net/ethernet/emulex/benet/ | ||
5031 | |||
5032 | EMULEX ONECONNECT ROCE DRIVER | ||
5033 | M: Selvin Xavier <selvin.xavier@broadcom.com> | ||
5034 | M: Devesh Sharma <devesh.sharma@broadcom.com> | ||
5035 | L: linux-rdma@vger.kernel.org | ||
5036 | W: http://www.broadcom.com | ||
5037 | S: Odd Fixes | ||
5038 | F: drivers/infiniband/hw/ocrdma/ | ||
5039 | F: include/uapi/rdma/ocrdma-abi.h | ||
5040 | |||
5089 | EMULEX/BROADCOM LPFC FC/FCOE SCSI DRIVER | 5041 | EMULEX/BROADCOM LPFC FC/FCOE SCSI DRIVER |
5090 | M: James Smart <james.smart@broadcom.com> | 5042 | M: James Smart <james.smart@broadcom.com> |
5091 | M: Dick Kennedy <dick.kennedy@broadcom.com> | 5043 | M: Dick Kennedy <dick.kennedy@broadcom.com> |
@@ -5171,6 +5123,22 @@ L: linux-security-module@vger.kernel.org | |||
5171 | S: Supported | 5123 | S: Supported |
5172 | F: security/integrity/evm/ | 5124 | F: security/integrity/evm/ |
5173 | 5125 | ||
5126 | EXTENSIBLE FIRMWARE INTERFACE (EFI) | ||
5127 | M: Matt Fleming <matt@codeblueprint.co.uk> | ||
5128 | M: Ard Biesheuvel <ard.biesheuvel@linaro.org> | ||
5129 | L: linux-efi@vger.kernel.org | ||
5130 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git | ||
5131 | S: Maintained | ||
5132 | F: Documentation/efi-stub.txt | ||
5133 | F: arch/*/kernel/efi.c | ||
5134 | F: arch/x86/boot/compressed/eboot.[ch] | ||
5135 | F: arch/*/include/asm/efi.h | ||
5136 | F: arch/x86/platform/efi/ | ||
5137 | F: drivers/firmware/efi/ | ||
5138 | F: include/linux/efi*.h | ||
5139 | F: arch/arm/boot/compressed/efi-header.S | ||
5140 | F: arch/arm64/kernel/efi-entry.S | ||
5141 | |||
5174 | EXTERNAL CONNECTOR SUBSYSTEM (EXTCON) | 5142 | EXTERNAL CONNECTOR SUBSYSTEM (EXTCON) |
5175 | M: MyungJoo Ham <myungjoo.ham@samsung.com> | 5143 | M: MyungJoo Ham <myungjoo.ham@samsung.com> |
5176 | M: Chanwoo Choi <cw00.choi@samsung.com> | 5144 | M: Chanwoo Choi <cw00.choi@samsung.com> |
@@ -5201,6 +5169,19 @@ S: Supported | |||
5201 | F: arch/arc/plat-eznps | 5169 | F: arch/arc/plat-eznps |
5202 | F: arch/arc/boot/dts/eznps.dts | 5170 | F: arch/arc/boot/dts/eznps.dts |
5203 | 5171 | ||
5172 | F2FS FILE SYSTEM | ||
5173 | M: Jaegeuk Kim <jaegeuk@kernel.org> | ||
5174 | M: Chao Yu <yuchao0@huawei.com> | ||
5175 | L: linux-f2fs-devel@lists.sourceforge.net | ||
5176 | W: https://f2fs.wiki.kernel.org/ | ||
5177 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git | ||
5178 | S: Maintained | ||
5179 | F: Documentation/filesystems/f2fs.txt | ||
5180 | F: Documentation/ABI/testing/sysfs-fs-f2fs | ||
5181 | F: fs/f2fs/ | ||
5182 | F: include/linux/f2fs_fs.h | ||
5183 | F: include/trace/events/f2fs.h | ||
5184 | |||
5204 | F71805F HARDWARE MONITORING DRIVER | 5185 | F71805F HARDWARE MONITORING DRIVER |
5205 | M: Jean Delvare <jdelvare@suse.com> | 5186 | M: Jean Delvare <jdelvare@suse.com> |
5206 | L: linux-hwmon@vger.kernel.org | 5187 | L: linux-hwmon@vger.kernel.org |
@@ -5208,23 +5189,6 @@ S: Maintained | |||
5208 | F: Documentation/hwmon/f71805f | 5189 | F: Documentation/hwmon/f71805f |
5209 | F: drivers/hwmon/f71805f.c | 5190 | F: drivers/hwmon/f71805f.c |
5210 | 5191 | ||
5211 | FC0011 TUNER DRIVER | ||
5212 | M: Michael Buesch <m@bues.ch> | ||
5213 | L: linux-media@vger.kernel.org | ||
5214 | S: Maintained | ||
5215 | F: drivers/media/tuners/fc0011.h | ||
5216 | F: drivers/media/tuners/fc0011.c | ||
5217 | |||
5218 | FC2580 MEDIA DRIVER | ||
5219 | M: Antti Palosaari <crope@iki.fi> | ||
5220 | L: linux-media@vger.kernel.org | ||
5221 | W: https://linuxtv.org | ||
5222 | W: http://palosaari.fi/linux/ | ||
5223 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
5224 | T: git git://linuxtv.org/anttip/media_tree.git | ||
5225 | S: Maintained | ||
5226 | F: drivers/media/tuners/fc2580* | ||
5227 | |||
5228 | FANOTIFY | 5192 | FANOTIFY |
5229 | M: Eric Paris <eparis@redhat.com> | 5193 | M: Eric Paris <eparis@redhat.com> |
5230 | S: Maintained | 5194 | S: Maintained |
@@ -5249,6 +5213,23 @@ M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | |||
5249 | S: Maintained | 5213 | S: Maintained |
5250 | F: drivers/staging/fbtft/ | 5214 | F: drivers/staging/fbtft/ |
5251 | 5215 | ||
5216 | FC0011 TUNER DRIVER | ||
5217 | M: Michael Buesch <m@bues.ch> | ||
5218 | L: linux-media@vger.kernel.org | ||
5219 | S: Maintained | ||
5220 | F: drivers/media/tuners/fc0011.h | ||
5221 | F: drivers/media/tuners/fc0011.c | ||
5222 | |||
5223 | FC2580 MEDIA DRIVER | ||
5224 | M: Antti Palosaari <crope@iki.fi> | ||
5225 | L: linux-media@vger.kernel.org | ||
5226 | W: https://linuxtv.org | ||
5227 | W: http://palosaari.fi/linux/ | ||
5228 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
5229 | T: git git://linuxtv.org/anttip/media_tree.git | ||
5230 | S: Maintained | ||
5231 | F: drivers/media/tuners/fc2580* | ||
5232 | |||
5252 | FCOE SUBSYSTEM (libfc, libfcoe, fcoe) | 5233 | FCOE SUBSYSTEM (libfc, libfcoe, fcoe) |
5253 | M: Johannes Thumshirn <jth@kernel.org> | 5234 | M: Johannes Thumshirn <jth@kernel.org> |
5254 | L: fcoe-devel@open-fcoe.org | 5235 | L: fcoe-devel@open-fcoe.org |
@@ -5408,6 +5389,14 @@ L: linuxppc-dev@lists.ozlabs.org | |||
5408 | S: Maintained | 5389 | S: Maintained |
5409 | F: drivers/dma/fsldma.* | 5390 | F: drivers/dma/fsldma.* |
5410 | 5391 | ||
5392 | FREESCALE eTSEC ETHERNET DRIVER (GIANFAR) | ||
5393 | M: Claudiu Manoil <claudiu.manoil@freescale.com> | ||
5394 | L: netdev@vger.kernel.org | ||
5395 | S: Maintained | ||
5396 | F: drivers/net/ethernet/freescale/gianfar* | ||
5397 | X: drivers/net/ethernet/freescale/gianfar_ptp.c | ||
5398 | F: Documentation/devicetree/bindings/net/fsl-tsec-phy.txt | ||
5399 | |||
5411 | FREESCALE GPMI NAND DRIVER | 5400 | FREESCALE GPMI NAND DRIVER |
5412 | M: Han Xu <han.xu@nxp.com> | 5401 | M: Han Xu <han.xu@nxp.com> |
5413 | L: linux-mtd@lists.infradead.org | 5402 | L: linux-mtd@lists.infradead.org |
@@ -5421,6 +5410,15 @@ L: linux-i2c@vger.kernel.org | |||
5421 | S: Maintained | 5410 | S: Maintained |
5422 | F: drivers/i2c/busses/i2c-cpm.c | 5411 | F: drivers/i2c/busses/i2c-cpm.c |
5423 | 5412 | ||
5413 | FREESCALE IMX / MXC FEC DRIVER | ||
5414 | M: Fugang Duan <fugang.duan@nxp.com> | ||
5415 | L: netdev@vger.kernel.org | ||
5416 | S: Maintained | ||
5417 | F: drivers/net/ethernet/freescale/fec_main.c | ||
5418 | F: drivers/net/ethernet/freescale/fec_ptp.c | ||
5419 | F: drivers/net/ethernet/freescale/fec.h | ||
5420 | F: Documentation/devicetree/bindings/net/fsl-fec.txt | ||
5421 | |||
5424 | FREESCALE IMX / MXC FRAMEBUFFER DRIVER | 5422 | FREESCALE IMX / MXC FRAMEBUFFER DRIVER |
5425 | M: Sascha Hauer <kernel@pengutronix.de> | 5423 | M: Sascha Hauer <kernel@pengutronix.de> |
5426 | L: linux-fbdev@vger.kernel.org | 5424 | L: linux-fbdev@vger.kernel.org |
@@ -5429,29 +5427,11 @@ S: Maintained | |||
5429 | F: include/linux/platform_data/video-imxfb.h | 5427 | F: include/linux/platform_data/video-imxfb.h |
5430 | F: drivers/video/fbdev/imxfb.c | 5428 | F: drivers/video/fbdev/imxfb.c |
5431 | 5429 | ||
5432 | FREESCALE QUAD SPI DRIVER | 5430 | FREESCALE QORIQ DPAA ETHERNET DRIVER |
5433 | M: Han Xu <han.xu@nxp.com> | 5431 | M: Madalin Bucur <madalin.bucur@nxp.com> |
5434 | L: linux-mtd@lists.infradead.org | ||
5435 | S: Maintained | ||
5436 | F: drivers/mtd/spi-nor/fsl-quadspi.c | ||
5437 | |||
5438 | FREESCALE SOC FS_ENET DRIVER | ||
5439 | M: Pantelis Antoniou <pantelis.antoniou@gmail.com> | ||
5440 | M: Vitaly Bordug <vbordug@ru.mvista.com> | ||
5441 | L: linuxppc-dev@lists.ozlabs.org | ||
5442 | L: netdev@vger.kernel.org | ||
5443 | S: Maintained | ||
5444 | F: drivers/net/ethernet/freescale/fs_enet/ | ||
5445 | F: include/linux/fs_enet_pd.h | ||
5446 | |||
5447 | FREESCALE IMX / MXC FEC DRIVER | ||
5448 | M: Fugang Duan <fugang.duan@nxp.com> | ||
5449 | L: netdev@vger.kernel.org | 5432 | L: netdev@vger.kernel.org |
5450 | S: Maintained | 5433 | S: Maintained |
5451 | F: drivers/net/ethernet/freescale/fec_main.c | 5434 | F: drivers/net/ethernet/freescale/dpaa |
5452 | F: drivers/net/ethernet/freescale/fec_ptp.c | ||
5453 | F: drivers/net/ethernet/freescale/fec.h | ||
5454 | F: Documentation/devicetree/bindings/net/fsl-fec.txt | ||
5455 | 5435 | ||
5456 | FREESCALE QORIQ DPAA FMAN DRIVER | 5436 | FREESCALE QORIQ DPAA FMAN DRIVER |
5457 | M: Madalin Bucur <madalin.bucur@nxp.com> | 5437 | M: Madalin Bucur <madalin.bucur@nxp.com> |
@@ -5460,20 +5440,11 @@ S: Maintained | |||
5460 | F: drivers/net/ethernet/freescale/fman | 5440 | F: drivers/net/ethernet/freescale/fman |
5461 | F: Documentation/devicetree/bindings/powerpc/fsl/fman.txt | 5441 | F: Documentation/devicetree/bindings/powerpc/fsl/fman.txt |
5462 | 5442 | ||
5463 | FREESCALE QORIQ DPAA ETHERNET DRIVER | 5443 | FREESCALE QUAD SPI DRIVER |
5464 | M: Madalin Bucur <madalin.bucur@nxp.com> | 5444 | M: Han Xu <han.xu@nxp.com> |
5465 | L: netdev@vger.kernel.org | 5445 | L: linux-mtd@lists.infradead.org |
5466 | S: Maintained | ||
5467 | F: drivers/net/ethernet/freescale/dpaa | ||
5468 | |||
5469 | FREESCALE SOC DRIVERS | ||
5470 | M: Li Yang <leoyang.li@nxp.com> | ||
5471 | L: linuxppc-dev@lists.ozlabs.org | ||
5472 | L: linux-arm-kernel@lists.infradead.org | ||
5473 | S: Maintained | 5446 | S: Maintained |
5474 | F: Documentation/devicetree/bindings/soc/fsl/ | 5447 | F: drivers/mtd/spi-nor/fsl-quadspi.c |
5475 | F: drivers/soc/fsl/ | ||
5476 | F: include/linux/fsl/ | ||
5477 | 5448 | ||
5478 | FREESCALE QUICC ENGINE LIBRARY | 5449 | FREESCALE QUICC ENGINE LIBRARY |
5479 | M: Qiang Zhao <qiang.zhao@nxp.com> | 5450 | M: Qiang Zhao <qiang.zhao@nxp.com> |
@@ -5483,13 +5454,6 @@ F: drivers/soc/fsl/qe/ | |||
5483 | F: include/soc/fsl/*qe*.h | 5454 | F: include/soc/fsl/*qe*.h |
5484 | F: include/soc/fsl/*ucc*.h | 5455 | F: include/soc/fsl/*ucc*.h |
5485 | 5456 | ||
5486 | FREESCALE USB PERIPHERAL DRIVERS | ||
5487 | M: Li Yang <leoyang.li@nxp.com> | ||
5488 | L: linux-usb@vger.kernel.org | ||
5489 | L: linuxppc-dev@lists.ozlabs.org | ||
5490 | S: Maintained | ||
5491 | F: drivers/usb/gadget/udc/fsl* | ||
5492 | |||
5493 | FREESCALE QUICC ENGINE UCC ETHERNET DRIVER | 5457 | FREESCALE QUICC ENGINE UCC ETHERNET DRIVER |
5494 | M: Li Yang <leoyang.li@nxp.com> | 5458 | M: Li Yang <leoyang.li@nxp.com> |
5495 | L: netdev@vger.kernel.org | 5459 | L: netdev@vger.kernel.org |
@@ -5497,14 +5461,6 @@ L: linuxppc-dev@lists.ozlabs.org | |||
5497 | S: Maintained | 5461 | S: Maintained |
5498 | F: drivers/net/ethernet/freescale/ucc_geth* | 5462 | F: drivers/net/ethernet/freescale/ucc_geth* |
5499 | 5463 | ||
5500 | FREESCALE eTSEC ETHERNET DRIVER (GIANFAR) | ||
5501 | M: Claudiu Manoil <claudiu.manoil@freescale.com> | ||
5502 | L: netdev@vger.kernel.org | ||
5503 | S: Maintained | ||
5504 | F: drivers/net/ethernet/freescale/gianfar* | ||
5505 | X: drivers/net/ethernet/freescale/gianfar_ptp.c | ||
5506 | F: Documentation/devicetree/bindings/net/fsl-tsec-phy.txt | ||
5507 | |||
5508 | FREESCALE QUICC ENGINE UCC HDLC DRIVER | 5464 | FREESCALE QUICC ENGINE UCC HDLC DRIVER |
5509 | M: Zhao Qiang <qiang.zhao@nxp.com> | 5465 | M: Zhao Qiang <qiang.zhao@nxp.com> |
5510 | L: netdev@vger.kernel.org | 5466 | L: netdev@vger.kernel.org |
@@ -5518,6 +5474,24 @@ L: linuxppc-dev@lists.ozlabs.org | |||
5518 | S: Maintained | 5474 | S: Maintained |
5519 | F: drivers/tty/serial/ucc_uart.c | 5475 | F: drivers/tty/serial/ucc_uart.c |
5520 | 5476 | ||
5477 | FREESCALE SOC DRIVERS | ||
5478 | M: Li Yang <leoyang.li@nxp.com> | ||
5479 | L: linuxppc-dev@lists.ozlabs.org | ||
5480 | L: linux-arm-kernel@lists.infradead.org | ||
5481 | S: Maintained | ||
5482 | F: Documentation/devicetree/bindings/soc/fsl/ | ||
5483 | F: drivers/soc/fsl/ | ||
5484 | F: include/linux/fsl/ | ||
5485 | |||
5486 | FREESCALE SOC FS_ENET DRIVER | ||
5487 | M: Pantelis Antoniou <pantelis.antoniou@gmail.com> | ||
5488 | M: Vitaly Bordug <vbordug@ru.mvista.com> | ||
5489 | L: linuxppc-dev@lists.ozlabs.org | ||
5490 | L: netdev@vger.kernel.org | ||
5491 | S: Maintained | ||
5492 | F: drivers/net/ethernet/freescale/fs_enet/ | ||
5493 | F: include/linux/fs_enet_pd.h | ||
5494 | |||
5521 | FREESCALE SOC SOUND DRIVERS | 5495 | FREESCALE SOC SOUND DRIVERS |
5522 | M: Timur Tabi <timur@tabi.org> | 5496 | M: Timur Tabi <timur@tabi.org> |
5523 | M: Nicolin Chen <nicoleotsuka@gmail.com> | 5497 | M: Nicolin Chen <nicoleotsuka@gmail.com> |
@@ -5530,6 +5504,13 @@ F: sound/soc/fsl/fsl* | |||
5530 | F: sound/soc/fsl/imx* | 5504 | F: sound/soc/fsl/imx* |
5531 | F: sound/soc/fsl/mpc8610_hpcd.c | 5505 | F: sound/soc/fsl/mpc8610_hpcd.c |
5532 | 5506 | ||
5507 | FREESCALE USB PERIPHERAL DRIVERS | ||
5508 | M: Li Yang <leoyang.li@nxp.com> | ||
5509 | L: linux-usb@vger.kernel.org | ||
5510 | L: linuxppc-dev@lists.ozlabs.org | ||
5511 | S: Maintained | ||
5512 | F: drivers/usb/gadget/udc/fsl* | ||
5513 | |||
5533 | FREEVXFS FILESYSTEM | 5514 | FREEVXFS FILESYSTEM |
5534 | M: Christoph Hellwig <hch@infradead.org> | 5515 | M: Christoph Hellwig <hch@infradead.org> |
5535 | W: ftp://ftp.openlinux.org/pub/people/hch/vxfs | 5516 | W: ftp://ftp.openlinux.org/pub/people/hch/vxfs |
@@ -5570,19 +5551,6 @@ S: Supported | |||
5570 | F: fs/crypto/ | 5551 | F: fs/crypto/ |
5571 | F: include/linux/fscrypt*.h | 5552 | F: include/linux/fscrypt*.h |
5572 | 5553 | ||
5573 | F2FS FILE SYSTEM | ||
5574 | M: Jaegeuk Kim <jaegeuk@kernel.org> | ||
5575 | M: Chao Yu <yuchao0@huawei.com> | ||
5576 | L: linux-f2fs-devel@lists.sourceforge.net | ||
5577 | W: https://f2fs.wiki.kernel.org/ | ||
5578 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git | ||
5579 | S: Maintained | ||
5580 | F: Documentation/filesystems/f2fs.txt | ||
5581 | F: Documentation/ABI/testing/sysfs-fs-f2fs | ||
5582 | F: fs/f2fs/ | ||
5583 | F: include/linux/f2fs_fs.h | ||
5584 | F: include/trace/events/f2fs.h | ||
5585 | |||
5586 | FUJITSU FR-V (FRV) PORT | 5554 | FUJITSU FR-V (FRV) PORT |
5587 | S: Orphan | 5555 | S: Orphan |
5588 | F: arch/frv/ | 5556 | F: arch/frv/ |
@@ -5656,6 +5624,12 @@ S: Maintained | |||
5656 | F: kernel/gcov/ | 5624 | F: kernel/gcov/ |
5657 | F: Documentation/dev-tools/gcov.rst | 5625 | F: Documentation/dev-tools/gcov.rst |
5658 | 5626 | ||
5627 | GDB KERNEL DEBUGGING HELPER SCRIPTS | ||
5628 | M: Jan Kiszka <jan.kiszka@siemens.com> | ||
5629 | M: Kieran Bingham <kieran@bingham.xyz> | ||
5630 | S: Supported | ||
5631 | F: scripts/gdb/ | ||
5632 | |||
5659 | GDT SCSI DISK ARRAY CONTROLLER DRIVER | 5633 | GDT SCSI DISK ARRAY CONTROLLER DRIVER |
5660 | M: Achim Leubner <achim_leubner@adaptec.com> | 5634 | M: Achim Leubner <achim_leubner@adaptec.com> |
5661 | L: linux-scsi@vger.kernel.org | 5635 | L: linux-scsi@vger.kernel.org |
@@ -5663,12 +5637,6 @@ W: http://www.icp-vortex.com/ | |||
5663 | S: Supported | 5637 | S: Supported |
5664 | F: drivers/scsi/gdt* | 5638 | F: drivers/scsi/gdt* |
5665 | 5639 | ||
5666 | GDB KERNEL DEBUGGING HELPER SCRIPTS | ||
5667 | M: Jan Kiszka <jan.kiszka@siemens.com> | ||
5668 | M: Kieran Bingham <kieran@bingham.xyz> | ||
5669 | S: Supported | ||
5670 | F: scripts/gdb/ | ||
5671 | |||
5672 | GEMTEK FM RADIO RECEIVER DRIVER | 5640 | GEMTEK FM RADIO RECEIVER DRIVER |
5673 | M: Hans Verkuil <hverkuil@xs4all.nl> | 5641 | M: Hans Verkuil <hverkuil@xs4all.nl> |
5674 | L: linux-media@vger.kernel.org | 5642 | L: linux-media@vger.kernel.org |
@@ -5735,17 +5703,17 @@ L: kvm@vger.kernel.org | |||
5735 | S: Supported | 5703 | S: Supported |
5736 | F: drivers/uio/uio_pci_generic.c | 5704 | F: drivers/uio/uio_pci_generic.c |
5737 | 5705 | ||
5738 | GET_MAINTAINER SCRIPT | ||
5739 | M: Joe Perches <joe@perches.com> | ||
5740 | S: Maintained | ||
5741 | F: scripts/get_maintainer.pl | ||
5742 | |||
5743 | GENWQE (IBM Generic Workqueue Card) | 5706 | GENWQE (IBM Generic Workqueue Card) |
5744 | M: Frank Haverkamp <haver@linux.vnet.ibm.com> | 5707 | M: Frank Haverkamp <haver@linux.vnet.ibm.com> |
5745 | M: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> | 5708 | M: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> |
5746 | S: Supported | 5709 | S: Supported |
5747 | F: drivers/misc/genwqe/ | 5710 | F: drivers/misc/genwqe/ |
5748 | 5711 | ||
5712 | GET_MAINTAINER SCRIPT | ||
5713 | M: Joe Perches <joe@perches.com> | ||
5714 | S: Maintained | ||
5715 | F: scripts/get_maintainer.pl | ||
5716 | |||
5749 | GFS2 FILE SYSTEM | 5717 | GFS2 FILE SYSTEM |
5750 | M: Steven Whitehouse <swhiteho@redhat.com> | 5718 | M: Steven Whitehouse <swhiteho@redhat.com> |
5751 | M: Bob Peterson <rpeterso@redhat.com> | 5719 | M: Bob Peterson <rpeterso@redhat.com> |
@@ -5778,6 +5746,15 @@ L: linux-input@vger.kernel.org | |||
5778 | S: Maintained | 5746 | S: Maintained |
5779 | F: drivers/input/touchscreen/goodix.c | 5747 | F: drivers/input/touchscreen/goodix.c |
5780 | 5748 | ||
5749 | GPIO ACPI SUPPORT | ||
5750 | M: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
5751 | M: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
5752 | L: linux-gpio@vger.kernel.org | ||
5753 | L: linux-acpi@vger.kernel.org | ||
5754 | S: Maintained | ||
5755 | F: Documentation/acpi/gpio-properties.txt | ||
5756 | F: drivers/gpio/gpiolib-acpi.c | ||
5757 | |||
5781 | GPIO MOCKUP DRIVER | 5758 | GPIO MOCKUP DRIVER |
5782 | M: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> | 5759 | M: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> |
5783 | L: linux-gpio@vger.kernel.org | 5760 | L: linux-gpio@vger.kernel.org |
@@ -5801,15 +5778,6 @@ F: include/asm-generic/gpio.h | |||
5801 | F: include/uapi/linux/gpio.h | 5778 | F: include/uapi/linux/gpio.h |
5802 | F: tools/gpio/ | 5779 | F: tools/gpio/ |
5803 | 5780 | ||
5804 | GPIO ACPI SUPPORT | ||
5805 | M: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
5806 | M: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
5807 | L: linux-gpio@vger.kernel.org | ||
5808 | L: linux-acpi@vger.kernel.org | ||
5809 | S: Maintained | ||
5810 | F: Documentation/acpi/gpio-properties.txt | ||
5811 | F: drivers/gpio/gpiolib-acpi.c | ||
5812 | |||
5813 | GRE DEMULTIPLEXER DRIVER | 5781 | GRE DEMULTIPLEXER DRIVER |
5814 | M: Dmitry Kozlov <xeb@mail.ru> | 5782 | M: Dmitry Kozlov <xeb@mail.ru> |
5815 | L: netdev@vger.kernel.org | 5783 | L: netdev@vger.kernel.org |
@@ -5824,14 +5792,6 @@ L: netdev@vger.kernel.org | |||
5824 | S: Maintained | 5792 | S: Maintained |
5825 | F: drivers/net/ethernet/aeroflex/ | 5793 | F: drivers/net/ethernet/aeroflex/ |
5826 | 5794 | ||
5827 | GREYBUS SUBSYSTEM | ||
5828 | M: Johan Hovold <johan@kernel.org> | ||
5829 | M: Alex Elder <elder@kernel.org> | ||
5830 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
5831 | S: Maintained | ||
5832 | F: drivers/staging/greybus/ | ||
5833 | L: greybus-dev@lists.linaro.org (moderated for non-subscribers) | ||
5834 | |||
5835 | GREYBUS AUDIO PROTOCOLS DRIVERS | 5795 | GREYBUS AUDIO PROTOCOLS DRIVERS |
5836 | M: Vaibhav Agarwal <vaibhav.sr@gmail.com> | 5796 | M: Vaibhav Agarwal <vaibhav.sr@gmail.com> |
5837 | M: Mark Greer <mgreer@animalcreek.com> | 5797 | M: Mark Greer <mgreer@animalcreek.com> |
@@ -5849,24 +5809,7 @@ F: drivers/staging/greybus/audio_manager_sysfs.c | |||
5849 | F: drivers/staging/greybus/audio_module.c | 5809 | F: drivers/staging/greybus/audio_module.c |
5850 | F: drivers/staging/greybus/audio_topology.c | 5810 | F: drivers/staging/greybus/audio_topology.c |
5851 | 5811 | ||
5852 | GREYBUS PROTOCOLS DRIVERS | 5812 | GREYBUS FW/HID/SPI PROTOCOLS DRIVERS |
5853 | M: Rui Miguel Silva <rmfrfs@gmail.com> | ||
5854 | S: Maintained | ||
5855 | F: drivers/staging/greybus/sdio.c | ||
5856 | F: drivers/staging/greybus/light.c | ||
5857 | F: drivers/staging/greybus/gpio.c | ||
5858 | F: drivers/staging/greybus/power_supply.c | ||
5859 | F: drivers/staging/greybus/spi.c | ||
5860 | F: drivers/staging/greybus/spilib.c | ||
5861 | |||
5862 | GREYBUS PROTOCOLS DRIVERS | ||
5863 | M: Bryan O'Donoghue <pure.logic@nexus-software.ie> | ||
5864 | S: Maintained | ||
5865 | F: drivers/staging/greybus/loopback.c | ||
5866 | F: drivers/staging/greybus/timesync.c | ||
5867 | F: drivers/staging/greybus/timesync_platform.c | ||
5868 | |||
5869 | GREYBUS PROTOCOLS DRIVERS | ||
5870 | M: Viresh Kumar <vireshk@kernel.org> | 5813 | M: Viresh Kumar <vireshk@kernel.org> |
5871 | S: Maintained | 5814 | S: Maintained |
5872 | F: drivers/staging/greybus/authentication.c | 5815 | F: drivers/staging/greybus/authentication.c |
@@ -5883,11 +5826,12 @@ F: drivers/staging/greybus/spi.c | |||
5883 | F: drivers/staging/greybus/spilib.c | 5826 | F: drivers/staging/greybus/spilib.c |
5884 | F: drivers/staging/greybus/spilib.h | 5827 | F: drivers/staging/greybus/spilib.h |
5885 | 5828 | ||
5886 | GREYBUS PROTOCOLS DRIVERS | 5829 | GREYBUS LOOBACK/TIME PROTOCOLS DRIVERS |
5887 | M: David Lin <dtwlin@gmail.com> | 5830 | M: Bryan O'Donoghue <pure.logic@nexus-software.ie> |
5888 | S: Maintained | 5831 | S: Maintained |
5889 | F: drivers/staging/greybus/uart.c | 5832 | F: drivers/staging/greybus/loopback.c |
5890 | F: drivers/staging/greybus/log.c | 5833 | F: drivers/staging/greybus/timesync.c |
5834 | F: drivers/staging/greybus/timesync_platform.c | ||
5891 | 5835 | ||
5892 | GREYBUS PLATFORM DRIVERS | 5836 | GREYBUS PLATFORM DRIVERS |
5893 | M: Vaibhav Hiremath <hvaibhav.linux@gmail.com> | 5837 | M: Vaibhav Hiremath <hvaibhav.linux@gmail.com> |
@@ -5896,6 +5840,30 @@ F: drivers/staging/greybus/arche-platform.c | |||
5896 | F: drivers/staging/greybus/arche-apb-ctrl.c | 5840 | F: drivers/staging/greybus/arche-apb-ctrl.c |
5897 | F: drivers/staging/greybus/arche_platform.h | 5841 | F: drivers/staging/greybus/arche_platform.h |
5898 | 5842 | ||
5843 | GREYBUS SDIO/GPIO/SPI PROTOCOLS DRIVERS | ||
5844 | M: Rui Miguel Silva <rmfrfs@gmail.com> | ||
5845 | S: Maintained | ||
5846 | F: drivers/staging/greybus/sdio.c | ||
5847 | F: drivers/staging/greybus/light.c | ||
5848 | F: drivers/staging/greybus/gpio.c | ||
5849 | F: drivers/staging/greybus/power_supply.c | ||
5850 | F: drivers/staging/greybus/spi.c | ||
5851 | F: drivers/staging/greybus/spilib.c | ||
5852 | |||
5853 | GREYBUS SUBSYSTEM | ||
5854 | M: Johan Hovold <johan@kernel.org> | ||
5855 | M: Alex Elder <elder@kernel.org> | ||
5856 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
5857 | S: Maintained | ||
5858 | F: drivers/staging/greybus/ | ||
5859 | L: greybus-dev@lists.linaro.org (moderated for non-subscribers) | ||
5860 | |||
5861 | GREYBUS UART PROTOCOLS DRIVERS | ||
5862 | M: David Lin <dtwlin@gmail.com> | ||
5863 | S: Maintained | ||
5864 | F: drivers/staging/greybus/uart.c | ||
5865 | F: drivers/staging/greybus/log.c | ||
5866 | |||
5899 | GS1662 VIDEO SERIALIZER | 5867 | GS1662 VIDEO SERIALIZER |
5900 | M: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr> | 5868 | M: Charles-Antoine Couret <charles-antoine.couret@nexvision.fr> |
5901 | L: linux-media@vger.kernel.org | 5869 | L: linux-media@vger.kernel.org |
@@ -5966,13 +5934,6 @@ L: linux-efi@vger.kernel.org | |||
5966 | S: Maintained | 5934 | S: Maintained |
5967 | F: block/partitions/efi.* | 5935 | F: block/partitions/efi.* |
5968 | 5936 | ||
5969 | STK1160 USB VIDEO CAPTURE DRIVER | ||
5970 | M: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> | ||
5971 | L: linux-media@vger.kernel.org | ||
5972 | T: git git://linuxtv.org/media_tree.git | ||
5973 | S: Maintained | ||
5974 | F: drivers/media/usb/stk1160/ | ||
5975 | |||
5976 | H8/300 ARCHITECTURE | 5937 | H8/300 ARCHITECTURE |
5977 | M: Yoshinori Sato <ysato@users.sourceforge.jp> | 5938 | M: Yoshinori Sato <ysato@users.sourceforge.jp> |
5978 | L: uclinux-h8-devel@lists.sourceforge.jp (moderated for non-subscribers) | 5939 | L: uclinux-h8-devel@lists.sourceforge.jp (moderated for non-subscribers) |
@@ -5984,33 +5945,6 @@ F: drivers/clocksource/h8300_*.c | |||
5984 | F: drivers/clk/h8300/ | 5945 | F: drivers/clk/h8300/ |
5985 | F: drivers/irqchip/irq-renesas-h8*.c | 5946 | F: drivers/irqchip/irq-renesas-h8*.c |
5986 | 5947 | ||
5987 | HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER | ||
5988 | M: Frank Seidel <frank@f-seidel.de> | ||
5989 | L: platform-driver-x86@vger.kernel.org | ||
5990 | W: http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/ | ||
5991 | S: Maintained | ||
5992 | F: drivers/platform/x86/hdaps.c | ||
5993 | |||
5994 | HDPVR USB VIDEO ENCODER DRIVER | ||
5995 | M: Hans Verkuil <hverkuil@xs4all.nl> | ||
5996 | L: linux-media@vger.kernel.org | ||
5997 | T: git git://linuxtv.org/media_tree.git | ||
5998 | W: https://linuxtv.org | ||
5999 | S: Odd Fixes | ||
6000 | F: drivers/media/usb/hdpvr/ | ||
6001 | |||
6002 | HWPOISON MEMORY FAILURE HANDLING | ||
6003 | M: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | ||
6004 | L: linux-mm@kvack.org | ||
6005 | S: Maintained | ||
6006 | F: mm/memory-failure.c | ||
6007 | F: mm/hwpoison-inject.c | ||
6008 | |||
6009 | HYPERVISOR VIRTUAL CONSOLE DRIVER | ||
6010 | L: linuxppc-dev@lists.ozlabs.org | ||
6011 | S: Odd Fixes | ||
6012 | F: drivers/tty/hvc/ | ||
6013 | |||
6014 | HACKRF MEDIA DRIVER | 5948 | HACKRF MEDIA DRIVER |
6015 | M: Antti Palosaari <crope@iki.fi> | 5949 | M: Antti Palosaari <crope@iki.fi> |
6016 | L: linux-media@vger.kernel.org | 5950 | L: linux-media@vger.kernel.org |
@@ -6021,6 +5955,13 @@ T: git git://linuxtv.org/anttip/media_tree.git | |||
6021 | S: Maintained | 5955 | S: Maintained |
6022 | F: drivers/media/usb/hackrf/ | 5956 | F: drivers/media/usb/hackrf/ |
6023 | 5957 | ||
5958 | HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER | ||
5959 | M: Frank Seidel <frank@f-seidel.de> | ||
5960 | L: platform-driver-x86@vger.kernel.org | ||
5961 | W: http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/ | ||
5962 | S: Maintained | ||
5963 | F: drivers/platform/x86/hdaps.c | ||
5964 | |||
6024 | HARDWARE MONITORING | 5965 | HARDWARE MONITORING |
6025 | M: Jean Delvare <jdelvare@suse.com> | 5966 | M: Jean Delvare <jdelvare@suse.com> |
6026 | M: Guenter Roeck <linux@roeck-us.net> | 5967 | M: Guenter Roeck <linux@roeck-us.net> |
@@ -6059,6 +6000,14 @@ L: linux-parisc@vger.kernel.org | |||
6059 | S: Maintained | 6000 | S: Maintained |
6060 | F: sound/parisc/harmony.* | 6001 | F: sound/parisc/harmony.* |
6061 | 6002 | ||
6003 | HDPVR USB VIDEO ENCODER DRIVER | ||
6004 | M: Hans Verkuil <hverkuil@xs4all.nl> | ||
6005 | L: linux-media@vger.kernel.org | ||
6006 | T: git git://linuxtv.org/media_tree.git | ||
6007 | W: https://linuxtv.org | ||
6008 | S: Odd Fixes | ||
6009 | F: drivers/media/usb/hdpvr/ | ||
6010 | |||
6062 | HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER | 6011 | HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER |
6063 | M: Jimmy Vance <jimmy.vance@hpe.com> | 6012 | M: Jimmy Vance <jimmy.vance@hpe.com> |
6064 | S: Supported | 6013 | S: Supported |
@@ -6085,13 +6034,6 @@ F: drivers/block/cciss* | |||
6085 | F: include/linux/cciss_ioctl.h | 6034 | F: include/linux/cciss_ioctl.h |
6086 | F: include/uapi/linux/cciss_ioctl.h | 6035 | F: include/uapi/linux/cciss_ioctl.h |
6087 | 6036 | ||
6088 | OPA-VNIC DRIVER | ||
6089 | M: Dennis Dalessandro <dennis.dalessandro@intel.com> | ||
6090 | M: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> | ||
6091 | L: linux-rdma@vger.kernel.org | ||
6092 | S: Supported | ||
6093 | F: drivers/infiniband/ulp/opa_vnic | ||
6094 | |||
6095 | HFI1 DRIVER | 6037 | HFI1 DRIVER |
6096 | M: Mike Marciniszyn <mike.marciniszyn@intel.com> | 6038 | M: Mike Marciniszyn <mike.marciniszyn@intel.com> |
6097 | M: Dennis Dalessandro <dennis.dalessandro@intel.com> | 6039 | M: Dennis Dalessandro <dennis.dalessandro@intel.com> |
@@ -6269,6 +6211,12 @@ L: netdev@vger.kernel.org | |||
6269 | S: Maintained | 6211 | S: Maintained |
6270 | F: net/hsr/ | 6212 | F: net/hsr/ |
6271 | 6213 | ||
6214 | HT16K33 LED CONTROLLER DRIVER | ||
6215 | M: Robin van der Gracht <robin@protonic.nl> | ||
6216 | S: Maintained | ||
6217 | F: drivers/auxdisplay/ht16k33.c | ||
6218 | F: Documentation/devicetree/bindings/display/ht16k33.txt | ||
6219 | |||
6272 | HTCPEN TOUCHSCREEN DRIVER | 6220 | HTCPEN TOUCHSCREEN DRIVER |
6273 | M: Pau Oliva Fora <pof@eslack.org> | 6221 | M: Pau Oliva Fora <pof@eslack.org> |
6274 | L: linux-input@vger.kernel.org | 6222 | L: linux-input@vger.kernel.org |
@@ -6288,6 +6236,13 @@ W: https://linuxtv.org | |||
6288 | S: Supported | 6236 | S: Supported |
6289 | F: drivers/media/platform/sti/hva | 6237 | F: drivers/media/platform/sti/hva |
6290 | 6238 | ||
6239 | HWPOISON MEMORY FAILURE HANDLING | ||
6240 | M: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | ||
6241 | L: linux-mm@kvack.org | ||
6242 | S: Maintained | ||
6243 | F: mm/memory-failure.c | ||
6244 | F: mm/hwpoison-inject.c | ||
6245 | |||
6291 | Hyper-V CORE AND DRIVERS | 6246 | Hyper-V CORE AND DRIVERS |
6292 | M: "K. Y. Srinivasan" <kys@microsoft.com> | 6247 | M: "K. Y. Srinivasan" <kys@microsoft.com> |
6293 | M: Haiyang Zhang <haiyangz@microsoft.com> | 6248 | M: Haiyang Zhang <haiyangz@microsoft.com> |
@@ -6310,6 +6265,18 @@ F: include/linux/hyperv.h | |||
6310 | F: tools/hv/ | 6265 | F: tools/hv/ |
6311 | F: Documentation/ABI/stable/sysfs-bus-vmbus | 6266 | F: Documentation/ABI/stable/sysfs-bus-vmbus |
6312 | 6267 | ||
6268 | HYPERVISOR VIRTUAL CONSOLE DRIVER | ||
6269 | L: linuxppc-dev@lists.ozlabs.org | ||
6270 | S: Odd Fixes | ||
6271 | F: drivers/tty/hvc/ | ||
6272 | |||
6273 | I2C ACPI SUPPORT | ||
6274 | M: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
6275 | L: linux-i2c@vger.kernel.org | ||
6276 | L: linux-acpi@vger.kernel.org | ||
6277 | S: Maintained | ||
6278 | F: drivers/i2c/i2c-core-acpi.c | ||
6279 | |||
6313 | I2C MUXES | 6280 | I2C MUXES |
6314 | M: Peter Rosin <peda@axentia.se> | 6281 | M: Peter Rosin <peda@axentia.se> |
6315 | L: linux-i2c@vger.kernel.org | 6282 | L: linux-i2c@vger.kernel.org |
@@ -6332,6 +6299,36 @@ F: Documentation/i2c/busses/i2c-parport-light | |||
6332 | F: drivers/i2c/busses/i2c-parport.c | 6299 | F: drivers/i2c/busses/i2c-parport.c |
6333 | F: drivers/i2c/busses/i2c-parport-light.c | 6300 | F: drivers/i2c/busses/i2c-parport-light.c |
6334 | 6301 | ||
6302 | I2C SUBSYSTEM | ||
6303 | M: Wolfram Sang <wsa@the-dreams.de> | ||
6304 | L: linux-i2c@vger.kernel.org | ||
6305 | W: https://i2c.wiki.kernel.org/ | ||
6306 | Q: https://patchwork.ozlabs.org/project/linux-i2c/list/ | ||
6307 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git | ||
6308 | S: Maintained | ||
6309 | F: Documentation/devicetree/bindings/i2c/ | ||
6310 | F: Documentation/i2c/ | ||
6311 | F: drivers/i2c/ | ||
6312 | F: drivers/i2c/*/ | ||
6313 | F: include/linux/i2c.h | ||
6314 | F: include/linux/i2c-*.h | ||
6315 | F: include/uapi/linux/i2c.h | ||
6316 | F: include/uapi/linux/i2c-*.h | ||
6317 | |||
6318 | I2C-TAOS-EVM DRIVER | ||
6319 | M: Jean Delvare <jdelvare@suse.com> | ||
6320 | L: linux-i2c@vger.kernel.org | ||
6321 | S: Maintained | ||
6322 | F: Documentation/i2c/busses/i2c-taos-evm | ||
6323 | F: drivers/i2c/busses/i2c-taos-evm.c | ||
6324 | |||
6325 | I2C-TINY-USB DRIVER | ||
6326 | M: Till Harbaum <till@harbaum.org> | ||
6327 | L: linux-i2c@vger.kernel.org | ||
6328 | W: http://www.harbaum.org/till/i2c_tiny_usb | ||
6329 | S: Maintained | ||
6330 | F: drivers/i2c/busses/i2c-tiny-usb.c | ||
6331 | |||
6335 | I2C/SMBUS CONTROLLER DRIVERS FOR PC | 6332 | I2C/SMBUS CONTROLLER DRIVERS FOR PC |
6336 | M: Jean Delvare <jdelvare@suse.com> | 6333 | M: Jean Delvare <jdelvare@suse.com> |
6337 | L: linux-i2c@vger.kernel.org | 6334 | L: linux-i2c@vger.kernel.org |
@@ -6379,43 +6376,6 @@ L: linux-i2c@vger.kernel.org | |||
6379 | S: Maintained | 6376 | S: Maintained |
6380 | F: drivers/i2c/i2c-stub.c | 6377 | F: drivers/i2c/i2c-stub.c |
6381 | 6378 | ||
6382 | I2C SUBSYSTEM | ||
6383 | M: Wolfram Sang <wsa@the-dreams.de> | ||
6384 | L: linux-i2c@vger.kernel.org | ||
6385 | W: https://i2c.wiki.kernel.org/ | ||
6386 | Q: https://patchwork.ozlabs.org/project/linux-i2c/list/ | ||
6387 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git | ||
6388 | S: Maintained | ||
6389 | F: Documentation/devicetree/bindings/i2c/ | ||
6390 | F: Documentation/i2c/ | ||
6391 | F: drivers/i2c/ | ||
6392 | F: drivers/i2c/*/ | ||
6393 | F: include/linux/i2c.h | ||
6394 | F: include/linux/i2c-*.h | ||
6395 | F: include/uapi/linux/i2c.h | ||
6396 | F: include/uapi/linux/i2c-*.h | ||
6397 | |||
6398 | I2C ACPI SUPPORT | ||
6399 | M: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
6400 | L: linux-i2c@vger.kernel.org | ||
6401 | L: linux-acpi@vger.kernel.org | ||
6402 | S: Maintained | ||
6403 | F: drivers/i2c/i2c-core-acpi.c | ||
6404 | |||
6405 | I2C-TAOS-EVM DRIVER | ||
6406 | M: Jean Delvare <jdelvare@suse.com> | ||
6407 | L: linux-i2c@vger.kernel.org | ||
6408 | S: Maintained | ||
6409 | F: Documentation/i2c/busses/i2c-taos-evm | ||
6410 | F: drivers/i2c/busses/i2c-taos-evm.c | ||
6411 | |||
6412 | I2C-TINY-USB DRIVER | ||
6413 | M: Till Harbaum <till@harbaum.org> | ||
6414 | L: linux-i2c@vger.kernel.org | ||
6415 | W: http://www.harbaum.org/till/i2c_tiny_usb | ||
6416 | S: Maintained | ||
6417 | F: drivers/i2c/busses/i2c-tiny-usb.c | ||
6418 | |||
6419 | i386 BOOT CODE | 6379 | i386 BOOT CODE |
6420 | M: "H. Peter Anvin" <hpa@zytor.com> | 6380 | M: "H. Peter Anvin" <hpa@zytor.com> |
6421 | S: Maintained | 6381 | S: Maintained |
@@ -6434,17 +6394,15 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git | |||
6434 | S: Maintained | 6394 | S: Maintained |
6435 | F: arch/ia64/ | 6395 | F: arch/ia64/ |
6436 | 6396 | ||
6437 | IBM Power VMX Cryptographic instructions | 6397 | IBM Power 842 compression accelerator |
6438 | M: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com> | 6398 | M: Haren Myneni <haren@us.ibm.com> |
6439 | M: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com> | ||
6440 | L: linux-crypto@vger.kernel.org | ||
6441 | S: Supported | 6399 | S: Supported |
6442 | F: drivers/crypto/vmx/Makefile | 6400 | F: drivers/crypto/nx/Makefile |
6443 | F: drivers/crypto/vmx/Kconfig | 6401 | F: drivers/crypto/nx/Kconfig |
6444 | F: drivers/crypto/vmx/vmx.c | 6402 | F: drivers/crypto/nx/nx-842* |
6445 | F: drivers/crypto/vmx/aes* | 6403 | F: include/linux/sw842.h |
6446 | F: drivers/crypto/vmx/ghash* | 6404 | F: crypto/842.c |
6447 | F: drivers/crypto/vmx/ppc-xlate.pl | 6405 | F: lib/842/ |
6448 | 6406 | ||
6449 | IBM Power in-Nest Crypto Acceleration | 6407 | IBM Power in-Nest Crypto Acceleration |
6450 | M: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com> | 6408 | M: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com> |
@@ -6459,33 +6417,29 @@ F: drivers/crypto/nx/nx.* | |||
6459 | F: drivers/crypto/nx/nx_csbcpb.h | 6417 | F: drivers/crypto/nx/nx_csbcpb.h |
6460 | F: drivers/crypto/nx/nx_debugfs.h | 6418 | F: drivers/crypto/nx/nx_debugfs.h |
6461 | 6419 | ||
6462 | IBM Power 842 compression accelerator | ||
6463 | M: Haren Myneni <haren@us.ibm.com> | ||
6464 | S: Supported | ||
6465 | F: drivers/crypto/nx/Makefile | ||
6466 | F: drivers/crypto/nx/Kconfig | ||
6467 | F: drivers/crypto/nx/nx-842* | ||
6468 | F: include/linux/sw842.h | ||
6469 | F: crypto/842.c | ||
6470 | F: lib/842/ | ||
6471 | |||
6472 | IBM Power Linux RAID adapter | 6420 | IBM Power Linux RAID adapter |
6473 | M: Brian King <brking@us.ibm.com> | 6421 | M: Brian King <brking@us.ibm.com> |
6474 | S: Supported | 6422 | S: Supported |
6475 | F: drivers/scsi/ipr.* | 6423 | F: drivers/scsi/ipr.* |
6476 | 6424 | ||
6477 | IBM Power Virtual Ethernet Device Driver | 6425 | IBM Power SRIOV Virtual NIC Device Driver |
6478 | M: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> | 6426 | M: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> |
6427 | M: John Allen <jallen@linux.vnet.ibm.com> | ||
6479 | L: netdev@vger.kernel.org | 6428 | L: netdev@vger.kernel.org |
6480 | S: Supported | 6429 | S: Supported |
6481 | F: drivers/net/ethernet/ibm/ibmveth.* | 6430 | F: drivers/net/ethernet/ibm/ibmvnic.* |
6482 | 6431 | ||
6483 | IBM Power SRIOV Virtual NIC Device Driver | 6432 | IBM Power Virtual Ethernet Device Driver |
6484 | M: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> | 6433 | M: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> |
6485 | M: John Allen <jallen@linux.vnet.ibm.com> | ||
6486 | L: netdev@vger.kernel.org | 6434 | L: netdev@vger.kernel.org |
6487 | S: Supported | 6435 | S: Supported |
6488 | F: drivers/net/ethernet/ibm/ibmvnic.* | 6436 | F: drivers/net/ethernet/ibm/ibmveth.* |
6437 | |||
6438 | IBM Power Virtual FC Device Drivers | ||
6439 | M: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> | ||
6440 | L: linux-scsi@vger.kernel.org | ||
6441 | S: Supported | ||
6442 | F: drivers/scsi/ibmvscsi/ibmvfc* | ||
6489 | 6443 | ||
6490 | IBM Power Virtual SCSI Device Drivers | 6444 | IBM Power Virtual SCSI Device Drivers |
6491 | M: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> | 6445 | M: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> |
@@ -6502,11 +6456,17 @@ L: target-devel@vger.kernel.org | |||
6502 | S: Supported | 6456 | S: Supported |
6503 | F: drivers/scsi/ibmvscsi_tgt/ | 6457 | F: drivers/scsi/ibmvscsi_tgt/ |
6504 | 6458 | ||
6505 | IBM Power Virtual FC Device Drivers | 6459 | IBM Power VMX Cryptographic instructions |
6506 | M: Tyrel Datwyler <tyreld@linux.vnet.ibm.com> | 6460 | M: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com> |
6507 | L: linux-scsi@vger.kernel.org | 6461 | M: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com> |
6462 | L: linux-crypto@vger.kernel.org | ||
6508 | S: Supported | 6463 | S: Supported |
6509 | F: drivers/scsi/ibmvscsi/ibmvfc* | 6464 | F: drivers/crypto/vmx/Makefile |
6465 | F: drivers/crypto/vmx/Kconfig | ||
6466 | F: drivers/crypto/vmx/vmx.c | ||
6467 | F: drivers/crypto/vmx/aes* | ||
6468 | F: drivers/crypto/vmx/ghash* | ||
6469 | F: drivers/crypto/vmx/ppc-xlate.pl | ||
6510 | 6470 | ||
6511 | IBM ServeRAID RAID DRIVER | 6471 | IBM ServeRAID RAID DRIVER |
6512 | S: Orphan | 6472 | S: Orphan |
@@ -6518,11 +6478,6 @@ S: Maintained | |||
6518 | F: drivers/mfd/lpc_ich.c | 6478 | F: drivers/mfd/lpc_ich.c |
6519 | F: drivers/gpio/gpio-ich.c | 6479 | F: drivers/gpio/gpio-ich.c |
6520 | 6480 | ||
6521 | IDT VersaClock 5 CLOCK DRIVER | ||
6522 | M: Marek Vasut <marek.vasut@gmail.com> | ||
6523 | S: Maintained | ||
6524 | F: drivers/clk/clk-versaclock5.c | ||
6525 | |||
6526 | IDE SUBSYSTEM | 6481 | IDE SUBSYSTEM |
6527 | M: "David S. Miller" <davem@davemloft.net> | 6482 | M: "David S. Miller" <davem@davemloft.net> |
6528 | L: linux-ide@vger.kernel.org | 6483 | L: linux-ide@vger.kernel.org |
@@ -6533,6 +6488,13 @@ F: Documentation/ide/ | |||
6533 | F: drivers/ide/ | 6488 | F: drivers/ide/ |
6534 | F: include/linux/ide.h | 6489 | F: include/linux/ide.h |
6535 | 6490 | ||
6491 | IDE/ATAPI DRIVERS | ||
6492 | M: Borislav Petkov <bp@alien8.de> | ||
6493 | L: linux-ide@vger.kernel.org | ||
6494 | S: Maintained | ||
6495 | F: Documentation/cdrom/ide-cd | ||
6496 | F: drivers/ide/ide-cd* | ||
6497 | |||
6536 | IDEAPAD LAPTOP EXTRAS DRIVER | 6498 | IDEAPAD LAPTOP EXTRAS DRIVER |
6537 | M: Ike Panhc <ike.pan@canonical.com> | 6499 | M: Ike Panhc <ike.pan@canonical.com> |
6538 | L: platform-driver-x86@vger.kernel.org | 6500 | L: platform-driver-x86@vger.kernel.org |
@@ -6547,12 +6509,10 @@ W: https://github.com/o2genum/ideapad-slidebar | |||
6547 | S: Maintained | 6509 | S: Maintained |
6548 | F: drivers/input/misc/ideapad_slidebar.c | 6510 | F: drivers/input/misc/ideapad_slidebar.c |
6549 | 6511 | ||
6550 | IDE/ATAPI DRIVERS | 6512 | IDT VersaClock 5 CLOCK DRIVER |
6551 | M: Borislav Petkov <bp@alien8.de> | 6513 | M: Marek Vasut <marek.vasut@gmail.com> |
6552 | L: linux-ide@vger.kernel.org | ||
6553 | S: Maintained | 6514 | S: Maintained |
6554 | F: Documentation/cdrom/ide-cd | 6515 | F: drivers/clk/clk-versaclock5.c |
6555 | F: drivers/ide/ide-cd* | ||
6556 | 6516 | ||
6557 | IEEE 802.15.4 SUBSYSTEM | 6517 | IEEE 802.15.4 SUBSYSTEM |
6558 | M: Alexander Aring <alex.aring@gmail.com> | 6518 | M: Alexander Aring <alex.aring@gmail.com> |
@@ -6642,6 +6602,16 @@ S: Maintained | |||
6642 | F: Documentation/devicetree/bindings/auxdisplay/img-ascii-lcd.txt | 6602 | F: Documentation/devicetree/bindings/auxdisplay/img-ascii-lcd.txt |
6643 | F: drivers/auxdisplay/img-ascii-lcd.c | 6603 | F: drivers/auxdisplay/img-ascii-lcd.c |
6644 | 6604 | ||
6605 | IMGTEC IR DECODER DRIVER | ||
6606 | M: James Hogan <james.hogan@imgtec.com> | ||
6607 | S: Maintained | ||
6608 | F: drivers/media/rc/img-ir/ | ||
6609 | |||
6610 | IMS TWINTURBO FRAMEBUFFER DRIVER | ||
6611 | L: linux-fbdev@vger.kernel.org | ||
6612 | S: Orphan | ||
6613 | F: drivers/video/fbdev/imsttfb.c | ||
6614 | |||
6645 | INA209 HARDWARE MONITOR DRIVER | 6615 | INA209 HARDWARE MONITOR DRIVER |
6646 | M: Guenter Roeck <linux@roeck-us.net> | 6616 | M: Guenter Roeck <linux@roeck-us.net> |
6647 | L: linux-hwmon@vger.kernel.org | 6617 | L: linux-hwmon@vger.kernel.org |
@@ -6667,37 +6637,6 @@ W: http://industrypack.sourceforge.net | |||
6667 | S: Maintained | 6637 | S: Maintained |
6668 | F: drivers/ipack/ | 6638 | F: drivers/ipack/ |
6669 | 6639 | ||
6670 | INGENIC JZ4780 DMA Driver | ||
6671 | M: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> | ||
6672 | S: Maintained | ||
6673 | F: drivers/dma/dma-jz4780.c | ||
6674 | |||
6675 | INGENIC JZ4780 NAND DRIVER | ||
6676 | M: Harvey Hunt <harveyhuntnexus@gmail.com> | ||
6677 | L: linux-mtd@lists.infradead.org | ||
6678 | S: Maintained | ||
6679 | F: drivers/mtd/nand/jz4780_* | ||
6680 | |||
6681 | INTEGRITY MEASUREMENT ARCHITECTURE (IMA) | ||
6682 | M: Mimi Zohar <zohar@linux.vnet.ibm.com> | ||
6683 | M: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> | ||
6684 | L: linux-ima-devel@lists.sourceforge.net | ||
6685 | L: linux-ima-user@lists.sourceforge.net | ||
6686 | L: linux-security-module@vger.kernel.org | ||
6687 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git | ||
6688 | S: Supported | ||
6689 | F: security/integrity/ima/ | ||
6690 | |||
6691 | IMGTEC IR DECODER DRIVER | ||
6692 | M: James Hogan <james.hogan@imgtec.com> | ||
6693 | S: Maintained | ||
6694 | F: drivers/media/rc/img-ir/ | ||
6695 | |||
6696 | IMS TWINTURBO FRAMEBUFFER DRIVER | ||
6697 | L: linux-fbdev@vger.kernel.org | ||
6698 | S: Orphan | ||
6699 | F: drivers/video/fbdev/imsttfb.c | ||
6700 | |||
6701 | INFINIBAND SUBSYSTEM | 6640 | INFINIBAND SUBSYSTEM |
6702 | M: Doug Ledford <dledford@redhat.com> | 6641 | M: Doug Ledford <dledford@redhat.com> |
6703 | M: Sean Hefty <sean.hefty@intel.com> | 6642 | M: Sean Hefty <sean.hefty@intel.com> |
@@ -6714,6 +6653,17 @@ F: include/uapi/linux/if_infiniband.h | |||
6714 | F: include/uapi/rdma/ | 6653 | F: include/uapi/rdma/ |
6715 | F: include/rdma/ | 6654 | F: include/rdma/ |
6716 | 6655 | ||
6656 | INGENIC JZ4780 DMA Driver | ||
6657 | M: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> | ||
6658 | S: Maintained | ||
6659 | F: drivers/dma/dma-jz4780.c | ||
6660 | |||
6661 | INGENIC JZ4780 NAND DRIVER | ||
6662 | M: Harvey Hunt <harveyhuntnexus@gmail.com> | ||
6663 | L: linux-mtd@lists.infradead.org | ||
6664 | S: Maintained | ||
6665 | F: drivers/mtd/nand/jz4780_* | ||
6666 | |||
6717 | INOTIFY | 6667 | INOTIFY |
6718 | M: John McCutchan <john@johnmccutchan.com> | 6668 | M: John McCutchan <john@johnmccutchan.com> |
6719 | M: Robert Love <rlove@rlove.org> | 6669 | M: Robert Love <rlove@rlove.org> |
@@ -6752,6 +6702,22 @@ F: drivers/crypto/inside-secure/ | |||
6752 | S: Maintained | 6702 | S: Maintained |
6753 | L: linux-crypto@vger.kernel.org | 6703 | L: linux-crypto@vger.kernel.org |
6754 | 6704 | ||
6705 | INTEGRITY MEASUREMENT ARCHITECTURE (IMA) | ||
6706 | M: Mimi Zohar <zohar@linux.vnet.ibm.com> | ||
6707 | M: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> | ||
6708 | L: linux-ima-devel@lists.sourceforge.net | ||
6709 | L: linux-ima-user@lists.sourceforge.net | ||
6710 | L: linux-security-module@vger.kernel.org | ||
6711 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git | ||
6712 | S: Supported | ||
6713 | F: security/integrity/ima/ | ||
6714 | |||
6715 | INTEL 810/815 FRAMEBUFFER DRIVER | ||
6716 | M: Antonino Daplas <adaplas@gmail.com> | ||
6717 | L: linux-fbdev@vger.kernel.org | ||
6718 | S: Maintained | ||
6719 | F: drivers/video/fbdev/i810/ | ||
6720 | |||
6755 | INTEL ASoC BDW/HSW DRIVERS | 6721 | INTEL ASoC BDW/HSW DRIVERS |
6756 | M: Jie Yang <yang.jie@linux.intel.com> | 6722 | M: Jie Yang <yang.jie@linux.intel.com> |
6757 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | 6723 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
@@ -6769,17 +6735,74 @@ T: git git://git.code.sf.net/p/intel-sas/isci | |||
6769 | S: Supported | 6735 | S: Supported |
6770 | F: drivers/scsi/isci/ | 6736 | F: drivers/scsi/isci/ |
6771 | 6737 | ||
6738 | INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets) | ||
6739 | M: Daniel Vetter <daniel.vetter@intel.com> | ||
6740 | M: Jani Nikula <jani.nikula@linux.intel.com> | ||
6741 | L: intel-gfx@lists.freedesktop.org | ||
6742 | W: https://01.org/linuxgraphics/ | ||
6743 | B: https://01.org/linuxgraphics/documentation/how-report-bugs | ||
6744 | C: irc://chat.freenode.net/intel-gfx | ||
6745 | Q: http://patchwork.freedesktop.org/project/intel-gfx/ | ||
6746 | T: git git://anongit.freedesktop.org/drm-intel | ||
6747 | S: Supported | ||
6748 | F: drivers/gpu/drm/i915/ | ||
6749 | F: include/drm/i915* | ||
6750 | F: include/uapi/drm/i915_drm.h | ||
6751 | F: Documentation/gpu/i915.rst | ||
6752 | |||
6753 | INTEL ETHERNET DRIVERS | ||
6754 | M: Jeff Kirsher <jeffrey.t.kirsher@intel.com> | ||
6755 | L: intel-wired-lan@lists.osuosl.org (moderated for non-subscribers) | ||
6756 | W: http://www.intel.com/support/feedback.htm | ||
6757 | W: http://e1000.sourceforge.net/ | ||
6758 | Q: http://patchwork.ozlabs.org/project/intel-wired-lan/list/ | ||
6759 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git | ||
6760 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git | ||
6761 | S: Supported | ||
6762 | F: Documentation/networking/e100.txt | ||
6763 | F: Documentation/networking/e1000.txt | ||
6764 | F: Documentation/networking/e1000e.txt | ||
6765 | F: Documentation/networking/igb.txt | ||
6766 | F: Documentation/networking/igbvf.txt | ||
6767 | F: Documentation/networking/ixgb.txt | ||
6768 | F: Documentation/networking/ixgbe.txt | ||
6769 | F: Documentation/networking/ixgbevf.txt | ||
6770 | F: Documentation/networking/i40e.txt | ||
6771 | F: Documentation/networking/i40evf.txt | ||
6772 | F: drivers/net/ethernet/intel/ | ||
6773 | F: drivers/net/ethernet/intel/*/ | ||
6774 | F: include/linux/avf/virtchnl.h | ||
6775 | |||
6776 | INTEL FRAMEBUFFER DRIVER (excluding 810 and 815) | ||
6777 | M: Maik Broemme <mbroemme@libmpq.org> | ||
6778 | L: linux-fbdev@vger.kernel.org | ||
6779 | S: Maintained | ||
6780 | F: Documentation/fb/intelfb.txt | ||
6781 | F: drivers/video/fbdev/intelfb/ | ||
6782 | |||
6783 | INTEL GVT-g DRIVERS (Intel GPU Virtualization) | ||
6784 | M: Zhenyu Wang <zhenyuw@linux.intel.com> | ||
6785 | M: Zhi Wang <zhi.a.wang@intel.com> | ||
6786 | L: intel-gvt-dev@lists.freedesktop.org | ||
6787 | L: intel-gfx@lists.freedesktop.org | ||
6788 | W: https://01.org/igvt-g | ||
6789 | T: git https://github.com/01org/gvt-linux.git | ||
6790 | S: Supported | ||
6791 | F: drivers/gpu/drm/i915/gvt/ | ||
6792 | |||
6772 | INTEL HID EVENT DRIVER | 6793 | INTEL HID EVENT DRIVER |
6773 | M: Alex Hung <alex.hung@canonical.com> | 6794 | M: Alex Hung <alex.hung@canonical.com> |
6774 | L: platform-driver-x86@vger.kernel.org | 6795 | L: platform-driver-x86@vger.kernel.org |
6775 | S: Maintained | 6796 | S: Maintained |
6776 | F: drivers/platform/x86/intel-hid.c | 6797 | F: drivers/platform/x86/intel-hid.c |
6777 | 6798 | ||
6778 | INTEL VIRTUAL BUTTON DRIVER | 6799 | INTEL I/OAT DMA DRIVER |
6779 | M: AceLan Kao <acelan.kao@canonical.com> | 6800 | M: Dave Jiang <dave.jiang@intel.com> |
6780 | L: platform-driver-x86@vger.kernel.org | 6801 | R: Dan Williams <dan.j.williams@intel.com> |
6781 | S: Maintained | 6802 | L: dmaengine@vger.kernel.org |
6782 | F: drivers/platform/x86/intel-vbtn.c | 6803 | Q: https://patchwork.kernel.org/project/linux-dmaengine/list/ |
6804 | S: Supported | ||
6805 | F: drivers/dma/ioat* | ||
6783 | 6806 | ||
6784 | INTEL IDLE DRIVER | 6807 | INTEL IDLE DRIVER |
6785 | M: Jacob Pan <jacob.jun.pan@linux.intel.com> | 6808 | M: Jacob Pan <jacob.jun.pan@linux.intel.com> |
@@ -6797,41 +6820,6 @@ L: linux-input@vger.kernel.org | |||
6797 | S: Maintained | 6820 | S: Maintained |
6798 | F: drivers/hid/intel-ish-hid/ | 6821 | F: drivers/hid/intel-ish-hid/ |
6799 | 6822 | ||
6800 | INTEL PSTATE DRIVER | ||
6801 | M: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | ||
6802 | M: Len Brown <lenb@kernel.org> | ||
6803 | L: linux-pm@vger.kernel.org | ||
6804 | S: Supported | ||
6805 | F: drivers/cpufreq/intel_pstate.c | ||
6806 | |||
6807 | INTEL FRAMEBUFFER DRIVER (excluding 810 and 815) | ||
6808 | M: Maik Broemme <mbroemme@libmpq.org> | ||
6809 | L: linux-fbdev@vger.kernel.org | ||
6810 | S: Maintained | ||
6811 | F: Documentation/fb/intelfb.txt | ||
6812 | F: drivers/video/fbdev/intelfb/ | ||
6813 | |||
6814 | INTEL 810/815 FRAMEBUFFER DRIVER | ||
6815 | M: Antonino Daplas <adaplas@gmail.com> | ||
6816 | L: linux-fbdev@vger.kernel.org | ||
6817 | S: Maintained | ||
6818 | F: drivers/video/fbdev/i810/ | ||
6819 | |||
6820 | INTEL MENLOW THERMAL DRIVER | ||
6821 | M: Sujith Thomas <sujith.thomas@intel.com> | ||
6822 | L: platform-driver-x86@vger.kernel.org | ||
6823 | W: https://01.org/linux-acpi | ||
6824 | S: Supported | ||
6825 | F: drivers/platform/x86/intel_menlow.c | ||
6826 | |||
6827 | INTEL I/OAT DMA DRIVER | ||
6828 | M: Dave Jiang <dave.jiang@intel.com> | ||
6829 | R: Dan Williams <dan.j.williams@intel.com> | ||
6830 | L: dmaengine@vger.kernel.org | ||
6831 | Q: https://patchwork.kernel.org/project/linux-dmaengine/list/ | ||
6832 | S: Supported | ||
6833 | F: drivers/dma/ioat* | ||
6834 | |||
6835 | INTEL IOMMU (VT-d) | 6823 | INTEL IOMMU (VT-d) |
6836 | M: David Woodhouse <dwmw2@infradead.org> | 6824 | M: David Woodhouse <dwmw2@infradead.org> |
6837 | L: iommu@lists.linux-foundation.org | 6825 | L: iommu@lists.linux-foundation.org |
@@ -6860,35 +6848,23 @@ M: Deepak Saxena <dsaxena@plexity.net> | |||
6860 | S: Maintained | 6848 | S: Maintained |
6861 | F: drivers/char/hw_random/ixp4xx-rng.c | 6849 | F: drivers/char/hw_random/ixp4xx-rng.c |
6862 | 6850 | ||
6863 | INTEL ETHERNET DRIVERS | 6851 | INTEL MANAGEMENT ENGINE (mei) |
6864 | M: Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 6852 | M: Tomas Winkler <tomas.winkler@intel.com> |
6865 | L: intel-wired-lan@lists.osuosl.org (moderated for non-subscribers) | 6853 | L: linux-kernel@vger.kernel.org |
6866 | W: http://www.intel.com/support/feedback.htm | ||
6867 | W: http://e1000.sourceforge.net/ | ||
6868 | Q: http://patchwork.ozlabs.org/project/intel-wired-lan/list/ | ||
6869 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git | ||
6870 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git | ||
6871 | S: Supported | 6854 | S: Supported |
6872 | F: Documentation/networking/e100.txt | 6855 | F: include/uapi/linux/mei.h |
6873 | F: Documentation/networking/e1000.txt | 6856 | F: include/linux/mei_cl_bus.h |
6874 | F: Documentation/networking/e1000e.txt | 6857 | F: drivers/misc/mei/* |
6875 | F: Documentation/networking/igb.txt | 6858 | F: drivers/watchdog/mei_wdt.c |
6876 | F: Documentation/networking/igbvf.txt | 6859 | F: Documentation/misc-devices/mei/* |
6877 | F: Documentation/networking/ixgb.txt | 6860 | F: samples/mei/* |
6878 | F: Documentation/networking/ixgbe.txt | ||
6879 | F: Documentation/networking/ixgbevf.txt | ||
6880 | F: Documentation/networking/i40e.txt | ||
6881 | F: Documentation/networking/i40evf.txt | ||
6882 | F: drivers/net/ethernet/intel/ | ||
6883 | F: drivers/net/ethernet/intel/*/ | ||
6884 | F: include/linux/avf/virtchnl.h | ||
6885 | 6861 | ||
6886 | INTEL RDMA RNIC DRIVER | 6862 | INTEL MENLOW THERMAL DRIVER |
6887 | M: Faisal Latif <faisal.latif@intel.com> | 6863 | M: Sujith Thomas <sujith.thomas@intel.com> |
6888 | M: Shiraz Saleem <shiraz.saleem@intel.com> | 6864 | L: platform-driver-x86@vger.kernel.org |
6889 | L: linux-rdma@vger.kernel.org | 6865 | W: https://01.org/linux-acpi |
6890 | S: Supported | 6866 | S: Supported |
6891 | F: drivers/infiniband/hw/i40iw/ | 6867 | F: drivers/platform/x86/intel_menlow.c |
6892 | 6868 | ||
6893 | INTEL MERRIFIELD GPIO DRIVER | 6869 | INTEL MERRIFIELD GPIO DRIVER |
6894 | M: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 6870 | M: Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
@@ -6896,11 +6872,38 @@ L: linux-gpio@vger.kernel.org | |||
6896 | S: Maintained | 6872 | S: Maintained |
6897 | F: drivers/gpio/gpio-merrifield.c | 6873 | F: drivers/gpio/gpio-merrifield.c |
6898 | 6874 | ||
6899 | INTEL-MID GPIO DRIVER | 6875 | INTEL MIC DRIVERS (mic) |
6900 | M: David Cohen <david.a.cohen@linux.intel.com> | 6876 | M: Sudeep Dutt <sudeep.dutt@intel.com> |
6901 | L: linux-gpio@vger.kernel.org | 6877 | M: Ashutosh Dixit <ashutosh.dixit@intel.com> |
6878 | S: Supported | ||
6879 | W: https://github.com/sudeepdutt/mic | ||
6880 | W: http://software.intel.com/en-us/mic-developer | ||
6881 | F: include/linux/mic_bus.h | ||
6882 | F: include/linux/scif.h | ||
6883 | F: include/uapi/linux/mic_common.h | ||
6884 | F: include/uapi/linux/mic_ioctl.h | ||
6885 | F: include/uapi/linux/scif_ioctl.h | ||
6886 | F: drivers/misc/mic/ | ||
6887 | F: drivers/dma/mic_x100_dma.c | ||
6888 | F: drivers/dma/mic_x100_dma.h | ||
6889 | F: Documentation/mic/ | ||
6890 | |||
6891 | INTEL PMC CORE DRIVER | ||
6892 | M: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> | ||
6893 | M: Vishwanath Somayaji <vishwanath.somayaji@intel.com> | ||
6894 | L: platform-driver-x86@vger.kernel.org | ||
6902 | S: Maintained | 6895 | S: Maintained |
6903 | F: drivers/gpio/gpio-intel-mid.c | 6896 | F: arch/x86/include/asm/pmc_core.h |
6897 | F: drivers/platform/x86/intel_pmc_core* | ||
6898 | |||
6899 | INTEL PMC/P-Unit IPC DRIVER | ||
6900 | M: Zha Qipeng<qipeng.zha@intel.com> | ||
6901 | L: platform-driver-x86@vger.kernel.org | ||
6902 | S: Maintained | ||
6903 | F: drivers/platform/x86/intel_pmc_ipc.c | ||
6904 | F: drivers/platform/x86/intel_punit_ipc.c | ||
6905 | F: arch/x86/include/asm/intel_pmc_ipc.h | ||
6906 | F: arch/x86/include/asm/intel_punit_ipc.h | ||
6904 | 6907 | ||
6905 | INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT | 6908 | INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT |
6906 | M: Stanislav Yakovlev <stas.yakovlev@gmail.com> | 6909 | M: Stanislav Yakovlev <stas.yakovlev@gmail.com> |
@@ -6910,31 +6913,32 @@ F: Documentation/networking/README.ipw2100 | |||
6910 | F: Documentation/networking/README.ipw2200 | 6913 | F: Documentation/networking/README.ipw2200 |
6911 | F: drivers/net/wireless/intel/ipw2x00/ | 6914 | F: drivers/net/wireless/intel/ipw2x00/ |
6912 | 6915 | ||
6913 | INTEL(R) TRACE HUB | 6916 | INTEL PSTATE DRIVER |
6914 | M: Alexander Shishkin <alexander.shishkin@linux.intel.com> | 6917 | M: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> |
6918 | M: Len Brown <lenb@kernel.org> | ||
6919 | L: linux-pm@vger.kernel.org | ||
6915 | S: Supported | 6920 | S: Supported |
6916 | F: Documentation/trace/intel_th.txt | 6921 | F: drivers/cpufreq/intel_pstate.c |
6917 | F: drivers/hwtracing/intel_th/ | ||
6918 | 6922 | ||
6919 | INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT) | 6923 | INTEL RDMA RNIC DRIVER |
6920 | M: Ning Sun <ning.sun@intel.com> | 6924 | M: Faisal Latif <faisal.latif@intel.com> |
6921 | L: tboot-devel@lists.sourceforge.net | 6925 | M: Shiraz Saleem <shiraz.saleem@intel.com> |
6922 | W: http://tboot.sourceforge.net | 6926 | L: linux-rdma@vger.kernel.org |
6923 | T: hg http://tboot.hg.sourceforge.net:8000/hgroot/tboot/tboot | ||
6924 | S: Supported | 6927 | S: Supported |
6925 | F: Documentation/intel_txt.txt | 6928 | F: drivers/infiniband/hw/i40iw/ |
6926 | F: include/linux/tboot.h | ||
6927 | F: arch/x86/kernel/tboot.c | ||
6928 | 6929 | ||
6929 | INTEL WIRELESS WIMAX CONNECTION 2400 | 6930 | INTEL TELEMETRY DRIVER |
6930 | M: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | 6931 | M: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com> |
6931 | M: linux-wimax@intel.com | 6932 | L: platform-driver-x86@vger.kernel.org |
6932 | L: wimax@linuxwimax.org (subscribers-only) | 6933 | S: Maintained |
6933 | S: Supported | 6934 | F: arch/x86/include/asm/intel_telemetry.h |
6934 | W: http://linuxwimax.org | 6935 | F: drivers/platform/x86/intel_telemetry* |
6935 | F: Documentation/wimax/README.i2400m | 6936 | |
6936 | F: drivers/net/wimax/i2400m/ | 6937 | INTEL VIRTUAL BUTTON DRIVER |
6937 | F: include/uapi/linux/wimax/i2400m.h | 6938 | M: AceLan Kao <acelan.kao@canonical.com> |
6939 | L: platform-driver-x86@vger.kernel.org | ||
6940 | S: Maintained | ||
6941 | F: drivers/platform/x86/intel-vbtn.c | ||
6938 | 6942 | ||
6939 | INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy) | 6943 | INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy) |
6940 | M: Stanislaw Gruszka <sgruszka@redhat.com> | 6944 | M: Stanislaw Gruszka <sgruszka@redhat.com> |
@@ -6953,56 +6957,37 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi.git | |||
6953 | S: Supported | 6957 | S: Supported |
6954 | F: drivers/net/wireless/intel/iwlwifi/ | 6958 | F: drivers/net/wireless/intel/iwlwifi/ |
6955 | 6959 | ||
6956 | INTEL MANAGEMENT ENGINE (mei) | 6960 | INTEL WIRELESS WIMAX CONNECTION 2400 |
6957 | M: Tomas Winkler <tomas.winkler@intel.com> | 6961 | M: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> |
6958 | L: linux-kernel@vger.kernel.org | 6962 | M: linux-wimax@intel.com |
6963 | L: wimax@linuxwimax.org (subscribers-only) | ||
6959 | S: Supported | 6964 | S: Supported |
6960 | F: include/uapi/linux/mei.h | 6965 | W: http://linuxwimax.org |
6961 | F: include/linux/mei_cl_bus.h | 6966 | F: Documentation/wimax/README.i2400m |
6962 | F: drivers/misc/mei/* | 6967 | F: drivers/net/wimax/i2400m/ |
6963 | F: drivers/watchdog/mei_wdt.c | 6968 | F: include/uapi/linux/wimax/i2400m.h |
6964 | F: Documentation/misc-devices/mei/* | ||
6965 | F: samples/mei/* | ||
6966 | 6969 | ||
6967 | INTEL MIC DRIVERS (mic) | 6970 | INTEL(R) TRACE HUB |
6968 | M: Sudeep Dutt <sudeep.dutt@intel.com> | 6971 | M: Alexander Shishkin <alexander.shishkin@linux.intel.com> |
6969 | M: Ashutosh Dixit <ashutosh.dixit@intel.com> | ||
6970 | S: Supported | 6972 | S: Supported |
6971 | W: https://github.com/sudeepdutt/mic | 6973 | F: Documentation/trace/intel_th.txt |
6972 | W: http://software.intel.com/en-us/mic-developer | 6974 | F: drivers/hwtracing/intel_th/ |
6973 | F: include/linux/mic_bus.h | ||
6974 | F: include/linux/scif.h | ||
6975 | F: include/uapi/linux/mic_common.h | ||
6976 | F: include/uapi/linux/mic_ioctl.h | ||
6977 | F: include/uapi/linux/scif_ioctl.h | ||
6978 | F: drivers/misc/mic/ | ||
6979 | F: drivers/dma/mic_x100_dma.c | ||
6980 | F: drivers/dma/mic_x100_dma.h | ||
6981 | F: Documentation/mic/ | ||
6982 | |||
6983 | INTEL PMC/P-Unit IPC DRIVER | ||
6984 | M: Zha Qipeng<qipeng.zha@intel.com> | ||
6985 | L: platform-driver-x86@vger.kernel.org | ||
6986 | S: Maintained | ||
6987 | F: drivers/platform/x86/intel_pmc_ipc.c | ||
6988 | F: drivers/platform/x86/intel_punit_ipc.c | ||
6989 | F: arch/x86/include/asm/intel_pmc_ipc.h | ||
6990 | F: arch/x86/include/asm/intel_punit_ipc.h | ||
6991 | 6975 | ||
6992 | INTEL TELEMETRY DRIVER | 6976 | INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT) |
6993 | M: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com> | 6977 | M: Ning Sun <ning.sun@intel.com> |
6994 | L: platform-driver-x86@vger.kernel.org | 6978 | L: tboot-devel@lists.sourceforge.net |
6995 | S: Maintained | 6979 | W: http://tboot.sourceforge.net |
6996 | F: arch/x86/include/asm/intel_telemetry.h | 6980 | T: hg http://tboot.hg.sourceforge.net:8000/hgroot/tboot/tboot |
6997 | F: drivers/platform/x86/intel_telemetry* | 6981 | S: Supported |
6982 | F: Documentation/intel_txt.txt | ||
6983 | F: include/linux/tboot.h | ||
6984 | F: arch/x86/kernel/tboot.c | ||
6998 | 6985 | ||
6999 | INTEL PMC CORE DRIVER | 6986 | INTEL-MID GPIO DRIVER |
7000 | M: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> | 6987 | M: David Cohen <david.a.cohen@linux.intel.com> |
7001 | M: Vishwanath Somayaji <vishwanath.somayaji@intel.com> | 6988 | L: linux-gpio@vger.kernel.org |
7002 | L: platform-driver-x86@vger.kernel.org | ||
7003 | S: Maintained | 6989 | S: Maintained |
7004 | F: arch/x86/include/asm/pmc_core.h | 6990 | F: drivers/gpio/gpio-intel-mid.c |
7005 | F: drivers/platform/x86/intel_pmc_core* | ||
7006 | 6991 | ||
7007 | INVENSENSE MPU-3050 GYROSCOPE DRIVER | 6992 | INVENSENSE MPU-3050 GYROSCOPE DRIVER |
7008 | M: Linus Walleij <linus.walleij@linaro.org> | 6993 | M: Linus Walleij <linus.walleij@linaro.org> |
@@ -7048,13 +7033,6 @@ F: drivers/char/ipmi/ | |||
7048 | F: include/linux/ipmi* | 7033 | F: include/linux/ipmi* |
7049 | F: include/uapi/linux/ipmi* | 7034 | F: include/uapi/linux/ipmi* |
7050 | 7035 | ||
7051 | QCOM AUDIO (ASoC) DRIVERS | ||
7052 | M: Patrick Lai <plai@codeaurora.org> | ||
7053 | M: Banajit Goswami <bgoswami@codeaurora.org> | ||
7054 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | ||
7055 | S: Supported | ||
7056 | F: sound/soc/qcom/ | ||
7057 | |||
7058 | IPS SCSI RAID DRIVER | 7036 | IPS SCSI RAID DRIVER |
7059 | M: Adaptec OEM Raid Solutions <aacraid@adaptec.com> | 7037 | M: Adaptec OEM Raid Solutions <aacraid@adaptec.com> |
7060 | L: linux-scsi@vger.kernel.org | 7038 | L: linux-scsi@vger.kernel.org |
@@ -7101,6 +7079,15 @@ F: drivers/net/irda/ | |||
7101 | F: include/net/irda/ | 7079 | F: include/net/irda/ |
7102 | F: net/irda/ | 7080 | F: net/irda/ |
7103 | 7081 | ||
7082 | IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY) | ||
7083 | M: Marc Zyngier <marc.zyngier@arm.com> | ||
7084 | S: Maintained | ||
7085 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core | ||
7086 | F: Documentation/IRQ-domain.txt | ||
7087 | F: include/linux/irqdomain.h | ||
7088 | F: kernel/irq/irqdomain.c | ||
7089 | F: kernel/irq/msi.c | ||
7090 | |||
7104 | IRQ SUBSYSTEM | 7091 | IRQ SUBSYSTEM |
7105 | M: Thomas Gleixner <tglx@linutronix.de> | 7092 | M: Thomas Gleixner <tglx@linutronix.de> |
7106 | L: linux-kernel@vger.kernel.org | 7093 | L: linux-kernel@vger.kernel.org |
@@ -7119,15 +7106,6 @@ T: git git://git.infradead.org/users/jcooper/linux.git irqchip/core | |||
7119 | F: Documentation/devicetree/bindings/interrupt-controller/ | 7106 | F: Documentation/devicetree/bindings/interrupt-controller/ |
7120 | F: drivers/irqchip/ | 7107 | F: drivers/irqchip/ |
7121 | 7108 | ||
7122 | IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY) | ||
7123 | M: Marc Zyngier <marc.zyngier@arm.com> | ||
7124 | S: Maintained | ||
7125 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core | ||
7126 | F: Documentation/IRQ-domain.txt | ||
7127 | F: include/linux/irqdomain.h | ||
7128 | F: kernel/irq/irqdomain.c | ||
7129 | F: kernel/irq/msi.c | ||
7130 | |||
7131 | ISA | 7109 | ISA |
7132 | M: William Breathitt Gray <vilhelm.gray@gmail.com> | 7110 | M: William Breathitt Gray <vilhelm.gray@gmail.com> |
7133 | S: Maintained | 7111 | S: Maintained |
@@ -7135,13 +7113,6 @@ F: Documentation/isa.txt | |||
7135 | F: drivers/base/isa.c | 7113 | F: drivers/base/isa.c |
7136 | F: include/linux/isa.h | 7114 | F: include/linux/isa.h |
7137 | 7115 | ||
7138 | ISAPNP | ||
7139 | M: Jaroslav Kysela <perex@perex.cz> | ||
7140 | S: Maintained | ||
7141 | F: Documentation/isapnp.txt | ||
7142 | F: drivers/pnp/isapnp/ | ||
7143 | F: include/linux/isapnp.h | ||
7144 | |||
7145 | ISA RADIO MODULE | 7116 | ISA RADIO MODULE |
7146 | M: Hans Verkuil <hverkuil@xs4all.nl> | 7117 | M: Hans Verkuil <hverkuil@xs4all.nl> |
7147 | L: linux-media@vger.kernel.org | 7118 | L: linux-media@vger.kernel.org |
@@ -7150,11 +7121,12 @@ W: https://linuxtv.org | |||
7150 | S: Maintained | 7121 | S: Maintained |
7151 | F: drivers/media/radio/radio-isa* | 7122 | F: drivers/media/radio/radio-isa* |
7152 | 7123 | ||
7153 | iSCSI BOOT FIRMWARE TABLE (iBFT) DRIVER | 7124 | ISAPNP |
7154 | M: Peter Jones <pjones@redhat.com> | 7125 | M: Jaroslav Kysela <perex@perex.cz> |
7155 | M: Konrad Rzeszutek Wilk <konrad@kernel.org> | ||
7156 | S: Maintained | 7126 | S: Maintained |
7157 | F: drivers/firmware/iscsi_ibft* | 7127 | F: Documentation/isapnp.txt |
7128 | F: drivers/pnp/isapnp/ | ||
7129 | F: include/linux/isapnp.h | ||
7158 | 7130 | ||
7159 | ISCSI | 7131 | ISCSI |
7160 | M: Lee Duncan <lduncan@suse.com> | 7132 | M: Lee Duncan <lduncan@suse.com> |
@@ -7165,6 +7137,12 @@ S: Maintained | |||
7165 | F: drivers/scsi/*iscsi* | 7137 | F: drivers/scsi/*iscsi* |
7166 | F: include/scsi/*iscsi* | 7138 | F: include/scsi/*iscsi* |
7167 | 7139 | ||
7140 | iSCSI BOOT FIRMWARE TABLE (iBFT) DRIVER | ||
7141 | M: Peter Jones <pjones@redhat.com> | ||
7142 | M: Konrad Rzeszutek Wilk <konrad@kernel.org> | ||
7143 | S: Maintained | ||
7144 | F: drivers/firmware/iscsi_ibft* | ||
7145 | |||
7168 | ISCSI EXTENSIONS FOR RDMA (ISER) INITIATOR | 7146 | ISCSI EXTENSIONS FOR RDMA (ISER) INITIATOR |
7169 | M: Or Gerlitz <ogerlitz@mellanox.com> | 7147 | M: Or Gerlitz <ogerlitz@mellanox.com> |
7170 | M: Sagi Grimberg <sagi@grimberg.me> | 7148 | M: Sagi Grimberg <sagi@grimberg.me> |
@@ -7420,27 +7398,6 @@ S: Maintained | |||
7420 | F: arch/x86/include/asm/svm.h | 7398 | F: arch/x86/include/asm/svm.h |
7421 | F: arch/x86/kvm/svm.c | 7399 | F: arch/x86/kvm/svm.c |
7422 | 7400 | ||
7423 | KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC | ||
7424 | M: Alexander Graf <agraf@suse.com> | ||
7425 | L: kvm-ppc@vger.kernel.org | ||
7426 | W: http://www.linux-kvm.org/ | ||
7427 | T: git git://github.com/agraf/linux-2.6.git | ||
7428 | S: Supported | ||
7429 | F: arch/powerpc/include/asm/kvm* | ||
7430 | F: arch/powerpc/kvm/ | ||
7431 | |||
7432 | KERNEL VIRTUAL MACHINE for s390 (KVM/s390) | ||
7433 | M: Christian Borntraeger <borntraeger@de.ibm.com> | ||
7434 | M: Cornelia Huck <cohuck@redhat.com> | ||
7435 | L: linux-s390@vger.kernel.org | ||
7436 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
7437 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git | ||
7438 | S: Supported | ||
7439 | F: Documentation/s390/kvm.txt | ||
7440 | F: arch/s390/include/asm/kvm* | ||
7441 | F: arch/s390/kvm/ | ||
7442 | F: arch/s390/mm/gmap.c | ||
7443 | |||
7444 | KERNEL VIRTUAL MACHINE (KVM) FOR ARM | 7401 | KERNEL VIRTUAL MACHINE (KVM) FOR ARM |
7445 | M: Christoffer Dall <christoffer.dall@linaro.org> | 7402 | M: Christoffer Dall <christoffer.dall@linaro.org> |
7446 | M: Marc Zyngier <marc.zyngier@arm.com> | 7403 | M: Marc Zyngier <marc.zyngier@arm.com> |
@@ -7455,6 +7412,15 @@ F: arch/arm/kvm/ | |||
7455 | F: virt/kvm/arm/ | 7412 | F: virt/kvm/arm/ |
7456 | F: include/kvm/arm_* | 7413 | F: include/kvm/arm_* |
7457 | 7414 | ||
7415 | KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC | ||
7416 | M: Alexander Graf <agraf@suse.com> | ||
7417 | L: kvm-ppc@vger.kernel.org | ||
7418 | W: http://www.linux-kvm.org/ | ||
7419 | T: git git://github.com/agraf/linux-2.6.git | ||
7420 | S: Supported | ||
7421 | F: arch/powerpc/include/asm/kvm* | ||
7422 | F: arch/powerpc/kvm/ | ||
7423 | |||
7458 | KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64) | 7424 | KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64) |
7459 | M: Christoffer Dall <christoffer.dall@linaro.org> | 7425 | M: Christoffer Dall <christoffer.dall@linaro.org> |
7460 | M: Marc Zyngier <marc.zyngier@arm.com> | 7426 | M: Marc Zyngier <marc.zyngier@arm.com> |
@@ -7473,6 +7439,18 @@ F: arch/mips/include/uapi/asm/kvm* | |||
7473 | F: arch/mips/include/asm/kvm* | 7439 | F: arch/mips/include/asm/kvm* |
7474 | F: arch/mips/kvm/ | 7440 | F: arch/mips/kvm/ |
7475 | 7441 | ||
7442 | KERNEL VIRTUAL MACHINE for s390 (KVM/s390) | ||
7443 | M: Christian Borntraeger <borntraeger@de.ibm.com> | ||
7444 | M: Cornelia Huck <cohuck@redhat.com> | ||
7445 | L: linux-s390@vger.kernel.org | ||
7446 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
7447 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git | ||
7448 | S: Supported | ||
7449 | F: Documentation/s390/kvm.txt | ||
7450 | F: arch/s390/include/asm/kvm* | ||
7451 | F: arch/s390/kvm/ | ||
7452 | F: arch/s390/mm/gmap.c | ||
7453 | |||
7476 | KERNFS | 7454 | KERNFS |
7477 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 7455 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
7478 | M: Tejun Heo <tj@kernel.org> | 7456 | M: Tejun Heo <tj@kernel.org> |
@@ -7490,17 +7468,15 @@ F: include/linux/kexec.h | |||
7490 | F: include/uapi/linux/kexec.h | 7468 | F: include/uapi/linux/kexec.h |
7491 | F: kernel/kexec* | 7469 | F: kernel/kexec* |
7492 | 7470 | ||
7493 | KEYS/KEYRINGS: | 7471 | KEYS-ENCRYPTED |
7494 | M: David Howells <dhowells@redhat.com> | 7472 | M: Mimi Zohar <zohar@linux.vnet.ibm.com> |
7473 | M: David Safford <safford@us.ibm.com> | ||
7474 | L: linux-security-module@vger.kernel.org | ||
7495 | L: keyrings@vger.kernel.org | 7475 | L: keyrings@vger.kernel.org |
7496 | S: Maintained | 7476 | S: Supported |
7497 | F: Documentation/security/keys/core.rst | 7477 | F: Documentation/security/keys/trusted-encrypted.rst |
7498 | F: include/linux/key.h | 7478 | F: include/keys/encrypted-type.h |
7499 | F: include/linux/key-type.h | 7479 | F: security/keys/encrypted-keys/ |
7500 | F: include/linux/keyctl.h | ||
7501 | F: include/uapi/linux/keyctl.h | ||
7502 | F: include/keys/ | ||
7503 | F: security/keys/ | ||
7504 | 7480 | ||
7505 | KEYS-TRUSTED | 7481 | KEYS-TRUSTED |
7506 | M: David Safford <safford@us.ibm.com> | 7482 | M: David Safford <safford@us.ibm.com> |
@@ -7513,15 +7489,17 @@ F: include/keys/trusted-type.h | |||
7513 | F: security/keys/trusted.c | 7489 | F: security/keys/trusted.c |
7514 | F: security/keys/trusted.h | 7490 | F: security/keys/trusted.h |
7515 | 7491 | ||
7516 | KEYS-ENCRYPTED | 7492 | KEYS/KEYRINGS: |
7517 | M: Mimi Zohar <zohar@linux.vnet.ibm.com> | 7493 | M: David Howells <dhowells@redhat.com> |
7518 | M: David Safford <safford@us.ibm.com> | ||
7519 | L: linux-security-module@vger.kernel.org | ||
7520 | L: keyrings@vger.kernel.org | 7494 | L: keyrings@vger.kernel.org |
7521 | S: Supported | 7495 | S: Maintained |
7522 | F: Documentation/security/keys/trusted-encrypted.rst | 7496 | F: Documentation/security/keys/core.rst |
7523 | F: include/keys/encrypted-type.h | 7497 | F: include/linux/key.h |
7524 | F: security/keys/encrypted-keys/ | 7498 | F: include/linux/key-type.h |
7499 | F: include/linux/keyctl.h | ||
7500 | F: include/uapi/linux/keyctl.h | ||
7501 | F: include/keys/ | ||
7502 | F: security/keys/ | ||
7525 | 7503 | ||
7526 | KGDB / KDB /debug_core | 7504 | KGDB / KDB /debug_core |
7527 | M: Jason Wessel <jason.wessel@windriver.com> | 7505 | M: Jason Wessel <jason.wessel@windriver.com> |
@@ -7665,16 +7643,6 @@ F: drivers/lguest/ | |||
7665 | F: include/linux/lguest*.h | 7643 | F: include/linux/lguest*.h |
7666 | F: tools/lguest/ | 7644 | F: tools/lguest/ |
7667 | 7645 | ||
7668 | LIBATA SUBSYSTEM (Serial and Parallel ATA drivers) | ||
7669 | M: Tejun Heo <tj@kernel.org> | ||
7670 | L: linux-ide@vger.kernel.org | ||
7671 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
7672 | S: Maintained | ||
7673 | F: drivers/ata/ | ||
7674 | F: include/linux/ata.h | ||
7675 | F: include/linux/libata.h | ||
7676 | F: Documentation/devicetree/bindings/ata/ | ||
7677 | |||
7678 | LIBATA PATA ARASAN COMPACT FLASH CONTROLLER | 7646 | LIBATA PATA ARASAN COMPACT FLASH CONTROLLER |
7679 | M: Viresh Kumar <vireshk@kernel.org> | 7647 | M: Viresh Kumar <vireshk@kernel.org> |
7680 | L: linux-ide@vger.kernel.org | 7648 | L: linux-ide@vger.kernel.org |
@@ -7718,22 +7686,21 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | |||
7718 | S: Maintained | 7686 | S: Maintained |
7719 | F: drivers/ata/sata_promise.* | 7687 | F: drivers/ata/sata_promise.* |
7720 | 7688 | ||
7689 | LIBATA SUBSYSTEM (Serial and Parallel ATA drivers) | ||
7690 | M: Tejun Heo <tj@kernel.org> | ||
7691 | L: linux-ide@vger.kernel.org | ||
7692 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git | ||
7693 | S: Maintained | ||
7694 | F: drivers/ata/ | ||
7695 | F: include/linux/ata.h | ||
7696 | F: include/linux/libata.h | ||
7697 | F: Documentation/devicetree/bindings/ata/ | ||
7698 | |||
7721 | LIBLOCKDEP | 7699 | LIBLOCKDEP |
7722 | M: Sasha Levin <alexander.levin@verizon.com> | 7700 | M: Sasha Levin <alexander.levin@verizon.com> |
7723 | S: Maintained | 7701 | S: Maintained |
7724 | F: tools/lib/lockdep/ | 7702 | F: tools/lib/lockdep/ |
7725 | 7703 | ||
7726 | LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM | ||
7727 | M: Dan Williams <dan.j.williams@intel.com> | ||
7728 | L: linux-nvdimm@lists.01.org | ||
7729 | Q: https://patchwork.kernel.org/project/linux-nvdimm/list/ | ||
7730 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git | ||
7731 | S: Supported | ||
7732 | F: drivers/nvdimm/* | ||
7733 | F: include/linux/nd.h | ||
7734 | F: include/linux/libnvdimm.h | ||
7735 | F: include/uapi/linux/ndctl.h | ||
7736 | |||
7737 | LIBNVDIMM BLK: MMIO-APERTURE DRIVER | 7704 | LIBNVDIMM BLK: MMIO-APERTURE DRIVER |
7738 | M: Ross Zwisler <ross.zwisler@linux.intel.com> | 7705 | M: Ross Zwisler <ross.zwisler@linux.intel.com> |
7739 | L: linux-nvdimm@lists.01.org | 7706 | L: linux-nvdimm@lists.01.org |
@@ -7741,7 +7708,6 @@ Q: https://patchwork.kernel.org/project/linux-nvdimm/list/ | |||
7741 | S: Supported | 7708 | S: Supported |
7742 | F: drivers/nvdimm/blk.c | 7709 | F: drivers/nvdimm/blk.c |
7743 | F: drivers/nvdimm/region_devs.c | 7710 | F: drivers/nvdimm/region_devs.c |
7744 | F: drivers/acpi/nfit* | ||
7745 | 7711 | ||
7746 | LIBNVDIMM BTT: BLOCK TRANSLATION TABLE | 7712 | LIBNVDIMM BTT: BLOCK TRANSLATION TABLE |
7747 | M: Vishal Verma <vishal.l.verma@intel.com> | 7713 | M: Vishal Verma <vishal.l.verma@intel.com> |
@@ -7757,6 +7723,18 @@ Q: https://patchwork.kernel.org/project/linux-nvdimm/list/ | |||
7757 | S: Supported | 7723 | S: Supported |
7758 | F: drivers/nvdimm/pmem* | 7724 | F: drivers/nvdimm/pmem* |
7759 | 7725 | ||
7726 | LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM | ||
7727 | M: Dan Williams <dan.j.williams@intel.com> | ||
7728 | L: linux-nvdimm@lists.01.org | ||
7729 | Q: https://patchwork.kernel.org/project/linux-nvdimm/list/ | ||
7730 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git | ||
7731 | S: Supported | ||
7732 | F: drivers/nvdimm/* | ||
7733 | F: drivers/acpi/nfit/* | ||
7734 | F: include/linux/nd.h | ||
7735 | F: include/linux/libnvdimm.h | ||
7736 | F: include/uapi/linux/ndctl.h | ||
7737 | |||
7760 | LIGHTNVM PLATFORM SUPPORT | 7738 | LIGHTNVM PLATFORM SUPPORT |
7761 | M: Matias Bjorling <mb@lightnvm.io> | 7739 | M: Matias Bjorling <mb@lightnvm.io> |
7762 | W: http://github/OpenChannelSSD | 7740 | W: http://github/OpenChannelSSD |
@@ -7766,6 +7744,14 @@ F: drivers/lightnvm/ | |||
7766 | F: include/linux/lightnvm.h | 7744 | F: include/linux/lightnvm.h |
7767 | F: include/uapi/linux/lightnvm.h | 7745 | F: include/uapi/linux/lightnvm.h |
7768 | 7746 | ||
7747 | LINUX FOR POWER MACINTOSH | ||
7748 | M: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
7749 | W: http://www.penguinppc.org/ | ||
7750 | L: linuxppc-dev@lists.ozlabs.org | ||
7751 | S: Maintained | ||
7752 | F: arch/powerpc/platforms/powermac/ | ||
7753 | F: drivers/macintosh/ | ||
7754 | |||
7769 | LINUX FOR POWERPC (32-BIT AND 64-BIT) | 7755 | LINUX FOR POWERPC (32-BIT AND 64-BIT) |
7770 | M: Benjamin Herrenschmidt <benh@kernel.crashing.org> | 7756 | M: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
7771 | M: Paul Mackerras <paulus@samba.org> | 7757 | M: Paul Mackerras <paulus@samba.org> |
@@ -7799,14 +7785,6 @@ N: powernv | |||
7799 | N: [^a-z0-9]ps3 | 7785 | N: [^a-z0-9]ps3 |
7800 | N: pseries | 7786 | N: pseries |
7801 | 7787 | ||
7802 | LINUX FOR POWER MACINTOSH | ||
7803 | M: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
7804 | W: http://www.penguinppc.org/ | ||
7805 | L: linuxppc-dev@lists.ozlabs.org | ||
7806 | S: Maintained | ||
7807 | F: arch/powerpc/platforms/powermac/ | ||
7808 | F: drivers/macintosh/ | ||
7809 | |||
7810 | LINUX FOR POWERPC EMBEDDED MPC5XXX | 7788 | LINUX FOR POWERPC EMBEDDED MPC5XXX |
7811 | M: Anatolij Gustschin <agust@denx.de> | 7789 | M: Anatolij Gustschin <agust@denx.de> |
7812 | L: linuxppc-dev@lists.ozlabs.org | 7790 | L: linuxppc-dev@lists.ozlabs.org |
@@ -7824,19 +7802,6 @@ S: Maintained | |||
7824 | F: arch/powerpc/platforms/40x/ | 7802 | F: arch/powerpc/platforms/40x/ |
7825 | F: arch/powerpc/platforms/44x/ | 7803 | F: arch/powerpc/platforms/44x/ |
7826 | 7804 | ||
7827 | LINUX FOR POWERPC EMBEDDED XILINX VIRTEX | ||
7828 | L: linuxppc-dev@lists.ozlabs.org | ||
7829 | S: Orphan | ||
7830 | F: arch/powerpc/*/*virtex* | ||
7831 | F: arch/powerpc/*/*/*virtex* | ||
7832 | |||
7833 | LINUX FOR POWERPC EMBEDDED PPC8XX | ||
7834 | M: Vitaly Bordug <vitb@kernel.crashing.org> | ||
7835 | W: http://www.penguinppc.org/ | ||
7836 | L: linuxppc-dev@lists.ozlabs.org | ||
7837 | S: Maintained | ||
7838 | F: arch/powerpc/platforms/8xx/ | ||
7839 | |||
7840 | LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX | 7805 | LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX |
7841 | M: Scott Wood <oss@buserror.net> | 7806 | M: Scott Wood <oss@buserror.net> |
7842 | M: Kumar Gala <galak@kernel.crashing.org> | 7807 | M: Kumar Gala <galak@kernel.crashing.org> |
@@ -7848,6 +7813,19 @@ F: arch/powerpc/platforms/83xx/ | |||
7848 | F: arch/powerpc/platforms/85xx/ | 7813 | F: arch/powerpc/platforms/85xx/ |
7849 | F: Documentation/devicetree/bindings/powerpc/fsl/ | 7814 | F: Documentation/devicetree/bindings/powerpc/fsl/ |
7850 | 7815 | ||
7816 | LINUX FOR POWERPC EMBEDDED PPC8XX | ||
7817 | M: Vitaly Bordug <vitb@kernel.crashing.org> | ||
7818 | W: http://www.penguinppc.org/ | ||
7819 | L: linuxppc-dev@lists.ozlabs.org | ||
7820 | S: Maintained | ||
7821 | F: arch/powerpc/platforms/8xx/ | ||
7822 | |||
7823 | LINUX FOR POWERPC EMBEDDED XILINX VIRTEX | ||
7824 | L: linuxppc-dev@lists.ozlabs.org | ||
7825 | S: Orphan | ||
7826 | F: arch/powerpc/*/*virtex* | ||
7827 | F: arch/powerpc/*/*/*virtex* | ||
7828 | |||
7851 | LINUX FOR POWERPC PA SEMI PWRFICIENT | 7829 | LINUX FOR POWERPC PA SEMI PWRFICIENT |
7852 | L: linuxppc-dev@lists.ozlabs.org | 7830 | L: linuxppc-dev@lists.ozlabs.org |
7853 | S: Orphan | 7831 | S: Orphan |
@@ -7855,6 +7833,11 @@ F: arch/powerpc/platforms/pasemi/ | |||
7855 | F: drivers/*/*pasemi* | 7833 | F: drivers/*/*pasemi* |
7856 | F: drivers/*/*/*pasemi* | 7834 | F: drivers/*/*/*pasemi* |
7857 | 7835 | ||
7836 | LINUX KERNEL DUMP TEST MODULE (LKDTM) | ||
7837 | M: Kees Cook <keescook@chromium.org> | ||
7838 | S: Maintained | ||
7839 | F: drivers/misc/lkdtm* | ||
7840 | |||
7858 | LINUX SECURITY MODULE (LSM) FRAMEWORK | 7841 | LINUX SECURITY MODULE (LSM) FRAMEWORK |
7859 | M: Chris Wright <chrisw@sous-sol.org> | 7842 | M: Chris Wright <chrisw@sous-sol.org> |
7860 | L: linux-security-module@vger.kernel.org | 7843 | L: linux-security-module@vger.kernel.org |
@@ -7884,11 +7867,6 @@ F: samples/livepatch/ | |||
7884 | L: live-patching@vger.kernel.org | 7867 | L: live-patching@vger.kernel.org |
7885 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching.git | 7868 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching.git |
7886 | 7869 | ||
7887 | LINUX KERNEL DUMP TEST MODULE (LKDTM) | ||
7888 | M: Kees Cook <keescook@chromium.org> | ||
7889 | S: Maintained | ||
7890 | F: drivers/misc/lkdtm* | ||
7891 | |||
7892 | LLC (802.2) | 7870 | LLC (802.2) |
7893 | L: netdev@vger.kernel.org | 7871 | L: netdev@vger.kernel.org |
7894 | S: Odd fixes | 7872 | S: Odd fixes |
@@ -7941,6 +7919,13 @@ Q: http://patchwork.linuxtv.org/project/linux-media/list/ | |||
7941 | S: Maintained | 7919 | S: Maintained |
7942 | F: drivers/media/usb/dvb-usb-v2/lmedm04* | 7920 | F: drivers/media/usb/dvb-usb-v2/lmedm04* |
7943 | 7921 | ||
7922 | LOADPIN SECURITY MODULE | ||
7923 | M: Kees Cook <keescook@chromium.org> | ||
7924 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git lsm/loadpin | ||
7925 | S: Supported | ||
7926 | F: security/loadpin/ | ||
7927 | F: Documentation/admin-guide/LSM/LoadPin.rst | ||
7928 | |||
7944 | LOCKING PRIMITIVES | 7929 | LOCKING PRIMITIVES |
7945 | M: Peter Zijlstra <peterz@infradead.org> | 7930 | M: Peter Zijlstra <peterz@infradead.org> |
7946 | M: Ingo Molnar <mingo@redhat.com> | 7931 | M: Ingo Molnar <mingo@redhat.com> |
@@ -8231,14 +8216,6 @@ S: Maintained | |||
8231 | F: Documentation/devicetree/bindings/sound/max9860.txt | 8216 | F: Documentation/devicetree/bindings/sound/max9860.txt |
8232 | F: sound/soc/codecs/max9860.* | 8217 | F: sound/soc/codecs/max9860.* |
8233 | 8218 | ||
8234 | MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS | ||
8235 | M: Krzysztof Kozlowski <krzk@kernel.org> | ||
8236 | M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | ||
8237 | L: linux-pm@vger.kernel.org | ||
8238 | S: Supported | ||
8239 | F: drivers/power/supply/max14577_charger.c | ||
8240 | F: drivers/power/supply/max77693_charger.c | ||
8241 | |||
8242 | MAXIM MAX77802 PMIC REGULATOR DEVICE DRIVER | 8219 | MAXIM MAX77802 PMIC REGULATOR DEVICE DRIVER |
8243 | M: Javier Martinez Canillas <javier@dowhile0.org> | 8220 | M: Javier Martinez Canillas <javier@dowhile0.org> |
8244 | L: linux-kernel@vger.kernel.org | 8221 | L: linux-kernel@vger.kernel.org |
@@ -8247,6 +8224,14 @@ F: drivers/regulator/max77802-regulator.c | |||
8247 | F: Documentation/devicetree/bindings/*/*max77802.txt | 8224 | F: Documentation/devicetree/bindings/*/*max77802.txt |
8248 | F: include/dt-bindings/*/*max77802.h | 8225 | F: include/dt-bindings/*/*max77802.h |
8249 | 8226 | ||
8227 | MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS | ||
8228 | M: Krzysztof Kozlowski <krzk@kernel.org> | ||
8229 | M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | ||
8230 | L: linux-pm@vger.kernel.org | ||
8231 | S: Supported | ||
8232 | F: drivers/power/supply/max14577_charger.c | ||
8233 | F: drivers/power/supply/max77693_charger.c | ||
8234 | |||
8250 | MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS | 8235 | MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS |
8251 | M: Chanwoo Choi <cw00.choi@samsung.com> | 8236 | M: Chanwoo Choi <cw00.choi@samsung.com> |
8252 | M: Krzysztof Kozlowski <krzk@kernel.org> | 8237 | M: Krzysztof Kozlowski <krzk@kernel.org> |
@@ -8289,14 +8274,25 @@ L: linux-iio@vger.kernel.org | |||
8289 | S: Maintained | 8274 | S: Maintained |
8290 | F: drivers/iio/dac/cio-dac.c | 8275 | F: drivers/iio/dac/cio-dac.c |
8291 | 8276 | ||
8292 | MEDIA DRIVERS FOR RENESAS - DRIF | 8277 | MEDIA DRIVERS FOR ASCOT2E |
8293 | M: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> | 8278 | M: Sergey Kozlov <serjk@netup.ru> |
8279 | M: Abylay Ospan <aospan@netup.ru> | ||
8294 | L: linux-media@vger.kernel.org | 8280 | L: linux-media@vger.kernel.org |
8295 | L: linux-renesas-soc@vger.kernel.org | 8281 | W: https://linuxtv.org |
8282 | W: http://netup.tv/ | ||
8296 | T: git git://linuxtv.org/media_tree.git | 8283 | T: git git://linuxtv.org/media_tree.git |
8297 | S: Supported | 8284 | S: Supported |
8298 | F: Documentation/devicetree/bindings/media/renesas,drif.txt | 8285 | F: drivers/media/dvb-frontends/ascot2e* |
8299 | F: drivers/media/platform/rcar_drif.c | 8286 | |
8287 | MEDIA DRIVERS FOR CXD2841ER | ||
8288 | M: Sergey Kozlov <serjk@netup.ru> | ||
8289 | M: Abylay Ospan <aospan@netup.ru> | ||
8290 | L: linux-media@vger.kernel.org | ||
8291 | W: https://linuxtv.org | ||
8292 | W: http://netup.tv/ | ||
8293 | T: git git://linuxtv.org/media_tree.git | ||
8294 | S: Supported | ||
8295 | F: drivers/media/dvb-frontends/cxd2841er* | ||
8300 | 8296 | ||
8301 | MEDIA DRIVERS FOR FREESCALE IMX | 8297 | MEDIA DRIVERS FOR FREESCALE IMX |
8302 | M: Steve Longerbeam <slongerbeam@gmail.com> | 8298 | M: Steve Longerbeam <slongerbeam@gmail.com> |
@@ -8310,43 +8306,6 @@ F: drivers/staging/media/imx/ | |||
8310 | F: include/linux/imx-media.h | 8306 | F: include/linux/imx-media.h |
8311 | F: include/media/imx.h | 8307 | F: include/media/imx.h |
8312 | 8308 | ||
8313 | MEDIA DRIVERS FOR RENESAS - FCP | ||
8314 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
8315 | L: linux-media@vger.kernel.org | ||
8316 | L: linux-renesas-soc@vger.kernel.org | ||
8317 | T: git git://linuxtv.org/media_tree.git | ||
8318 | S: Supported | ||
8319 | F: Documentation/devicetree/bindings/media/renesas,fcp.txt | ||
8320 | F: drivers/media/platform/rcar-fcp.c | ||
8321 | F: include/media/rcar-fcp.h | ||
8322 | |||
8323 | MEDIA DRIVERS FOR RENESAS - FDP1 | ||
8324 | M: Kieran Bingham <kieran@bingham.xyz> | ||
8325 | L: linux-media@vger.kernel.org | ||
8326 | L: linux-renesas-soc@vger.kernel.org | ||
8327 | T: git git://linuxtv.org/media_tree.git | ||
8328 | S: Supported | ||
8329 | F: Documentation/devicetree/bindings/media/renesas,fdp1.txt | ||
8330 | F: drivers/media/platform/rcar_fdp1.c | ||
8331 | |||
8332 | MEDIA DRIVERS FOR RENESAS - VIN | ||
8333 | M: Niklas Söderlund <niklas.soderlund@ragnatech.se> | ||
8334 | L: linux-media@vger.kernel.org | ||
8335 | L: linux-renesas-soc@vger.kernel.org | ||
8336 | T: git git://linuxtv.org/media_tree.git | ||
8337 | S: Supported | ||
8338 | F: Documentation/devicetree/bindings/media/rcar_vin.txt | ||
8339 | F: drivers/media/platform/rcar-vin/ | ||
8340 | |||
8341 | MEDIA DRIVERS FOR RENESAS - VSP1 | ||
8342 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
8343 | L: linux-media@vger.kernel.org | ||
8344 | L: linux-renesas-soc@vger.kernel.org | ||
8345 | T: git git://linuxtv.org/media_tree.git | ||
8346 | S: Supported | ||
8347 | F: Documentation/devicetree/bindings/media/renesas,vsp1.txt | ||
8348 | F: drivers/media/platform/vsp1/ | ||
8349 | |||
8350 | MEDIA DRIVERS FOR HELENE | 8309 | MEDIA DRIVERS FOR HELENE |
8351 | M: Abylay Ospan <aospan@netup.ru> | 8310 | M: Abylay Ospan <aospan@netup.ru> |
8352 | L: linux-media@vger.kernel.org | 8311 | L: linux-media@vger.kernel.org |
@@ -8356,7 +8315,7 @@ T: git git://linuxtv.org/media_tree.git | |||
8356 | S: Supported | 8315 | S: Supported |
8357 | F: drivers/media/dvb-frontends/helene* | 8316 | F: drivers/media/dvb-frontends/helene* |
8358 | 8317 | ||
8359 | MEDIA DRIVERS FOR ASCOT2E | 8318 | MEDIA DRIVERS FOR HORUS3A |
8360 | M: Sergey Kozlov <serjk@netup.ru> | 8319 | M: Sergey Kozlov <serjk@netup.ru> |
8361 | M: Abylay Ospan <aospan@netup.ru> | 8320 | M: Abylay Ospan <aospan@netup.ru> |
8362 | L: linux-media@vger.kernel.org | 8321 | L: linux-media@vger.kernel.org |
@@ -8364,9 +8323,9 @@ W: https://linuxtv.org | |||
8364 | W: http://netup.tv/ | 8323 | W: http://netup.tv/ |
8365 | T: git git://linuxtv.org/media_tree.git | 8324 | T: git git://linuxtv.org/media_tree.git |
8366 | S: Supported | 8325 | S: Supported |
8367 | F: drivers/media/dvb-frontends/ascot2e* | 8326 | F: drivers/media/dvb-frontends/horus3a* |
8368 | 8327 | ||
8369 | MEDIA DRIVERS FOR CXD2841ER | 8328 | MEDIA DRIVERS FOR LNBH25 |
8370 | M: Sergey Kozlov <serjk@netup.ru> | 8329 | M: Sergey Kozlov <serjk@netup.ru> |
8371 | M: Abylay Ospan <aospan@netup.ru> | 8330 | M: Abylay Ospan <aospan@netup.ru> |
8372 | L: linux-media@vger.kernel.org | 8331 | L: linux-media@vger.kernel.org |
@@ -8374,9 +8333,9 @@ W: https://linuxtv.org | |||
8374 | W: http://netup.tv/ | 8333 | W: http://netup.tv/ |
8375 | T: git git://linuxtv.org/media_tree.git | 8334 | T: git git://linuxtv.org/media_tree.git |
8376 | S: Supported | 8335 | S: Supported |
8377 | F: drivers/media/dvb-frontends/cxd2841er* | 8336 | F: drivers/media/dvb-frontends/lnbh25* |
8378 | 8337 | ||
8379 | MEDIA DRIVERS FOR HORUS3A | 8338 | MEDIA DRIVERS FOR NETUP PCI UNIVERSAL DVB devices |
8380 | M: Sergey Kozlov <serjk@netup.ru> | 8339 | M: Sergey Kozlov <serjk@netup.ru> |
8381 | M: Abylay Ospan <aospan@netup.ru> | 8340 | M: Abylay Ospan <aospan@netup.ru> |
8382 | L: linux-media@vger.kernel.org | 8341 | L: linux-media@vger.kernel.org |
@@ -8384,27 +8343,53 @@ W: https://linuxtv.org | |||
8384 | W: http://netup.tv/ | 8343 | W: http://netup.tv/ |
8385 | T: git git://linuxtv.org/media_tree.git | 8344 | T: git git://linuxtv.org/media_tree.git |
8386 | S: Supported | 8345 | S: Supported |
8387 | F: drivers/media/dvb-frontends/horus3a* | 8346 | F: drivers/media/pci/netup_unidvb/* |
8388 | 8347 | ||
8389 | MEDIA DRIVERS FOR LNBH25 | 8348 | MEDIA DRIVERS FOR RENESAS - DRIF |
8390 | M: Sergey Kozlov <serjk@netup.ru> | 8349 | M: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> |
8391 | M: Abylay Ospan <aospan@netup.ru> | ||
8392 | L: linux-media@vger.kernel.org | 8350 | L: linux-media@vger.kernel.org |
8393 | W: https://linuxtv.org | 8351 | L: linux-renesas-soc@vger.kernel.org |
8394 | W: http://netup.tv/ | ||
8395 | T: git git://linuxtv.org/media_tree.git | 8352 | T: git git://linuxtv.org/media_tree.git |
8396 | S: Supported | 8353 | S: Supported |
8397 | F: drivers/media/dvb-frontends/lnbh25* | 8354 | F: Documentation/devicetree/bindings/media/renesas,drif.txt |
8355 | F: drivers/media/platform/rcar_drif.c | ||
8398 | 8356 | ||
8399 | MEDIA DRIVERS FOR NETUP PCI UNIVERSAL DVB devices | 8357 | MEDIA DRIVERS FOR RENESAS - FCP |
8400 | M: Sergey Kozlov <serjk@netup.ru> | 8358 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
8401 | M: Abylay Ospan <aospan@netup.ru> | ||
8402 | L: linux-media@vger.kernel.org | 8359 | L: linux-media@vger.kernel.org |
8403 | W: https://linuxtv.org | 8360 | L: linux-renesas-soc@vger.kernel.org |
8404 | W: http://netup.tv/ | ||
8405 | T: git git://linuxtv.org/media_tree.git | 8361 | T: git git://linuxtv.org/media_tree.git |
8406 | S: Supported | 8362 | S: Supported |
8407 | F: drivers/media/pci/netup_unidvb/* | 8363 | F: Documentation/devicetree/bindings/media/renesas,fcp.txt |
8364 | F: drivers/media/platform/rcar-fcp.c | ||
8365 | F: include/media/rcar-fcp.h | ||
8366 | |||
8367 | MEDIA DRIVERS FOR RENESAS - FDP1 | ||
8368 | M: Kieran Bingham <kieran@bingham.xyz> | ||
8369 | L: linux-media@vger.kernel.org | ||
8370 | L: linux-renesas-soc@vger.kernel.org | ||
8371 | T: git git://linuxtv.org/media_tree.git | ||
8372 | S: Supported | ||
8373 | F: Documentation/devicetree/bindings/media/renesas,fdp1.txt | ||
8374 | F: drivers/media/platform/rcar_fdp1.c | ||
8375 | |||
8376 | MEDIA DRIVERS FOR RENESAS - VIN | ||
8377 | M: Niklas Söderlund <niklas.soderlund@ragnatech.se> | ||
8378 | L: linux-media@vger.kernel.org | ||
8379 | L: linux-renesas-soc@vger.kernel.org | ||
8380 | T: git git://linuxtv.org/media_tree.git | ||
8381 | S: Supported | ||
8382 | F: Documentation/devicetree/bindings/media/rcar_vin.txt | ||
8383 | F: drivers/media/platform/rcar-vin/ | ||
8384 | |||
8385 | MEDIA DRIVERS FOR RENESAS - VSP1 | ||
8386 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
8387 | L: linux-media@vger.kernel.org | ||
8388 | L: linux-renesas-soc@vger.kernel.org | ||
8389 | T: git git://linuxtv.org/media_tree.git | ||
8390 | S: Supported | ||
8391 | F: Documentation/devicetree/bindings/media/renesas,vsp1.txt | ||
8392 | F: drivers/media/platform/vsp1/ | ||
8408 | 8393 | ||
8409 | MEDIA INPUT INFRASTRUCTURE (V4L/DVB) | 8394 | MEDIA INPUT INFRASTRUCTURE (V4L/DVB) |
8410 | M: Mauro Carvalho Chehab <mchehab@s-opensource.com> | 8395 | M: Mauro Carvalho Chehab <mchehab@s-opensource.com> |
@@ -8443,15 +8428,6 @@ S: Supported | |||
8443 | F: drivers/media/platform/mtk-jpeg/ | 8428 | F: drivers/media/platform/mtk-jpeg/ |
8444 | F: Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.txt | 8429 | F: Documentation/devicetree/bindings/media/mediatek-jpeg-decoder.txt |
8445 | 8430 | ||
8446 | MEDIATEK MEDIA DRIVER | ||
8447 | M: Tiffany Lin <tiffany.lin@mediatek.com> | ||
8448 | M: Andrew-CT Chen <andrew-ct.chen@mediatek.com> | ||
8449 | S: Supported | ||
8450 | F: drivers/media/platform/mtk-vcodec/ | ||
8451 | F: drivers/media/platform/mtk-vpu/ | ||
8452 | F: Documentation/devicetree/bindings/media/mediatek-vcodec.txt | ||
8453 | F: Documentation/devicetree/bindings/media/mediatek-vpu.txt | ||
8454 | |||
8455 | MEDIATEK MDP DRIVER | 8431 | MEDIATEK MDP DRIVER |
8456 | M: Minghsiu Tsai <minghsiu.tsai@mediatek.com> | 8432 | M: Minghsiu Tsai <minghsiu.tsai@mediatek.com> |
8457 | M: Houlong Wei <houlong.wei@mediatek.com> | 8433 | M: Houlong Wei <houlong.wei@mediatek.com> |
@@ -8461,6 +8437,15 @@ F: drivers/media/platform/mtk-mdp/ | |||
8461 | F: drivers/media/platform/mtk-vpu/ | 8437 | F: drivers/media/platform/mtk-vpu/ |
8462 | F: Documentation/devicetree/bindings/media/mediatek-mdp.txt | 8438 | F: Documentation/devicetree/bindings/media/mediatek-mdp.txt |
8463 | 8439 | ||
8440 | MEDIATEK MEDIA DRIVER | ||
8441 | M: Tiffany Lin <tiffany.lin@mediatek.com> | ||
8442 | M: Andrew-CT Chen <andrew-ct.chen@mediatek.com> | ||
8443 | S: Supported | ||
8444 | F: drivers/media/platform/mtk-vcodec/ | ||
8445 | F: drivers/media/platform/mtk-vpu/ | ||
8446 | F: Documentation/devicetree/bindings/media/mediatek-vcodec.txt | ||
8447 | F: Documentation/devicetree/bindings/media/mediatek-vpu.txt | ||
8448 | |||
8464 | MEDIATEK MT7601U WIRELESS LAN DRIVER | 8449 | MEDIATEK MT7601U WIRELESS LAN DRIVER |
8465 | M: Jakub Kicinski <kubakici@wp.pl> | 8450 | M: Jakub Kicinski <kubakici@wp.pl> |
8466 | L: linux-wireless@vger.kernel.org | 8451 | L: linux-wireless@vger.kernel.org |
@@ -8468,9 +8453,9 @@ S: Maintained | |||
8468 | F: drivers/net/wireless/mediatek/mt7601u/ | 8453 | F: drivers/net/wireless/mediatek/mt7601u/ |
8469 | 8454 | ||
8470 | MEDIATEK RANDOM NUMBER GENERATOR SUPPORT | 8455 | MEDIATEK RANDOM NUMBER GENERATOR SUPPORT |
8471 | M: Sean Wang <sean.wang@mediatek.com> | 8456 | M: Sean Wang <sean.wang@mediatek.com> |
8472 | S: Maintained | 8457 | S: Maintained |
8473 | F: drivers/char/hw_random/mtk-rng.c | 8458 | F: drivers/char/hw_random/mtk-rng.c |
8474 | 8459 | ||
8475 | MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES | 8460 | MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES |
8476 | M: Peter Senna Tschudin <peter.senna@collabora.com> | 8461 | M: Peter Senna Tschudin <peter.senna@collabora.com> |
@@ -8492,6 +8477,13 @@ F: Documentation/scsi/megaraid.txt | |||
8492 | F: drivers/scsi/megaraid.* | 8477 | F: drivers/scsi/megaraid.* |
8493 | F: drivers/scsi/megaraid/ | 8478 | F: drivers/scsi/megaraid/ |
8494 | 8479 | ||
8480 | MELEXIS MLX90614 DRIVER | ||
8481 | M: Crt Mori <cmo@melexis.com> | ||
8482 | L: linux-iio@vger.kernel.org | ||
8483 | W: http://www.melexis.com | ||
8484 | S: Supported | ||
8485 | F: drivers/iio/temperature/mlx90614.c | ||
8486 | |||
8495 | MELFAS MIP4 TOUCHSCREEN DRIVER | 8487 | MELFAS MIP4 TOUCHSCREEN DRIVER |
8496 | M: Sangwon Jee <jeesw@melfas.com> | 8488 | M: Sangwon Jee <jeesw@melfas.com> |
8497 | W: http://www.melfas.com | 8489 | W: http://www.melfas.com |
@@ -8552,6 +8544,56 @@ W: http://www.mellanox.com | |||
8552 | Q: http://patchwork.ozlabs.org/project/netdev/list/ | 8544 | Q: http://patchwork.ozlabs.org/project/netdev/list/ |
8553 | F: drivers/net/ethernet/mellanox/mlxfw/ | 8545 | F: drivers/net/ethernet/mellanox/mlxfw/ |
8554 | 8546 | ||
8547 | MELLANOX MLX CPLD HOTPLUG DRIVER | ||
8548 | M: Vadim Pasternak <vadimp@mellanox.com> | ||
8549 | L: platform-driver-x86@vger.kernel.org | ||
8550 | S: Supported | ||
8551 | F: drivers/platform/x86/mlxcpld-hotplug.c | ||
8552 | F: include/linux/platform_data/mlxcpld-hotplug.h | ||
8553 | |||
8554 | MELLANOX MLX4 core VPI driver | ||
8555 | M: Tariq Toukan <tariqt@mellanox.com> | ||
8556 | L: netdev@vger.kernel.org | ||
8557 | L: linux-rdma@vger.kernel.org | ||
8558 | W: http://www.mellanox.com | ||
8559 | Q: http://patchwork.ozlabs.org/project/netdev/list/ | ||
8560 | S: Supported | ||
8561 | F: drivers/net/ethernet/mellanox/mlx4/ | ||
8562 | F: include/linux/mlx4/ | ||
8563 | |||
8564 | MELLANOX MLX4 IB driver | ||
8565 | M: Yishai Hadas <yishaih@mellanox.com> | ||
8566 | L: linux-rdma@vger.kernel.org | ||
8567 | W: http://www.mellanox.com | ||
8568 | Q: http://patchwork.kernel.org/project/linux-rdma/list/ | ||
8569 | S: Supported | ||
8570 | F: drivers/infiniband/hw/mlx4/ | ||
8571 | F: include/linux/mlx4/ | ||
8572 | F: include/uapi/rdma/mlx4-abi.h | ||
8573 | |||
8574 | MELLANOX MLX5 core VPI driver | ||
8575 | M: Saeed Mahameed <saeedm@mellanox.com> | ||
8576 | M: Matan Barak <matanb@mellanox.com> | ||
8577 | M: Leon Romanovsky <leonro@mellanox.com> | ||
8578 | L: netdev@vger.kernel.org | ||
8579 | L: linux-rdma@vger.kernel.org | ||
8580 | W: http://www.mellanox.com | ||
8581 | Q: http://patchwork.ozlabs.org/project/netdev/list/ | ||
8582 | S: Supported | ||
8583 | F: drivers/net/ethernet/mellanox/mlx5/core/ | ||
8584 | F: include/linux/mlx5/ | ||
8585 | |||
8586 | MELLANOX MLX5 IB driver | ||
8587 | M: Matan Barak <matanb@mellanox.com> | ||
8588 | M: Leon Romanovsky <leonro@mellanox.com> | ||
8589 | L: linux-rdma@vger.kernel.org | ||
8590 | W: http://www.mellanox.com | ||
8591 | Q: http://patchwork.kernel.org/project/linux-rdma/list/ | ||
8592 | S: Supported | ||
8593 | F: drivers/infiniband/hw/mlx5/ | ||
8594 | F: include/linux/mlx5/ | ||
8595 | F: include/uapi/rdma/mlx5-abi.h | ||
8596 | |||
8555 | MELLANOX MLXCPLD I2C AND MUX DRIVER | 8597 | MELLANOX MLXCPLD I2C AND MUX DRIVER |
8556 | M: Vadim Pasternak <vadimp@mellanox.com> | 8598 | M: Vadim Pasternak <vadimp@mellanox.com> |
8557 | M: Michael Shych <michaelsh@mellanox.com> | 8599 | M: Michael Shych <michaelsh@mellanox.com> |
@@ -8569,26 +8611,10 @@ F: drivers/leds/leds-mlxcpld.c | |||
8569 | F: Documentation/leds/leds-mlxcpld.txt | 8611 | F: Documentation/leds/leds-mlxcpld.txt |
8570 | 8612 | ||
8571 | MELLANOX PLATFORM DRIVER | 8613 | MELLANOX PLATFORM DRIVER |
8572 | M: Vadim Pasternak <vadimp@mellanox.com> | ||
8573 | L: platform-driver-x86@vger.kernel.org | ||
8574 | S: Supported | ||
8575 | F: drivers/platform/x86/mlx-platform.c | ||
8576 | |||
8577 | MELLANOX MLX CPLD HOTPLUG DRIVER | ||
8578 | M: Vadim Pasternak <vadimp@mellanox.com> | 8614 | M: Vadim Pasternak <vadimp@mellanox.com> |
8579 | L: platform-driver-x86@vger.kernel.org | 8615 | L: platform-driver-x86@vger.kernel.org |
8580 | S: Supported | 8616 | S: Supported |
8581 | F: drivers/platform/x86/mlxcpld-hotplug.c | 8617 | F: drivers/platform/x86/mlx-platform.c |
8582 | F: include/linux/platform_data/mlxcpld-hotplug.h | ||
8583 | |||
8584 | SOFT-ROCE DRIVER (rxe) | ||
8585 | M: Moni Shoua <monis@mellanox.com> | ||
8586 | L: linux-rdma@vger.kernel.org | ||
8587 | S: Supported | ||
8588 | W: https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home | ||
8589 | Q: http://patchwork.kernel.org/project/linux-rdma/list/ | ||
8590 | F: drivers/infiniband/sw/rxe/ | ||
8591 | F: include/uapi/rdma/rdma_user_rxe.h | ||
8592 | 8618 | ||
8593 | MEMBARRIER SUPPORT | 8619 | MEMBARRIER SUPPORT |
8594 | M: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 8620 | M: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
@@ -8710,6 +8736,18 @@ S: Maintained | |||
8710 | F: drivers/usb/misc/usb251xb.c | 8736 | F: drivers/usb/misc/usb251xb.c |
8711 | F: Documentation/devicetree/bindings/usb/usb251xb.txt | 8737 | F: Documentation/devicetree/bindings/usb/usb251xb.txt |
8712 | 8738 | ||
8739 | MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi) | ||
8740 | M: Don Brace <don.brace@microsemi.com> | ||
8741 | L: esc.storagedev@microsemi.com | ||
8742 | L: linux-scsi@vger.kernel.org | ||
8743 | S: Supported | ||
8744 | F: drivers/scsi/smartpqi/smartpqi*.[ch] | ||
8745 | F: drivers/scsi/smartpqi/Kconfig | ||
8746 | F: drivers/scsi/smartpqi/Makefile | ||
8747 | F: include/linux/cciss*.h | ||
8748 | F: include/uapi/linux/cciss*.h | ||
8749 | F: Documentation/scsi/smartpqi.txt | ||
8750 | |||
8713 | MICROSOFT SURFACE PRO 3 BUTTON DRIVER | 8751 | MICROSOFT SURFACE PRO 3 BUTTON DRIVER |
8714 | M: Chen Yu <yu.c.chen@intel.com> | 8752 | M: Chen Yu <yu.c.chen@intel.com> |
8715 | L: platform-driver-x86@vger.kernel.org | 8753 | L: platform-driver-x86@vger.kernel.org |
@@ -8732,6 +8770,16 @@ F: Documentation/devicetree/bindings/mips/ | |||
8732 | F: Documentation/mips/ | 8770 | F: Documentation/mips/ |
8733 | F: arch/mips/ | 8771 | F: arch/mips/ |
8734 | 8772 | ||
8773 | MIPS BOSTON DEVELOPMENT BOARD | ||
8774 | M: Paul Burton <paul.burton@imgtec.com> | ||
8775 | L: linux-mips@linux-mips.org | ||
8776 | S: Maintained | ||
8777 | F: Documentation/devicetree/bindings/clock/img,boston-clock.txt | ||
8778 | F: arch/mips/boot/dts/img/boston.dts | ||
8779 | F: arch/mips/configs/generic/board-boston.config | ||
8780 | F: drivers/clk/imgtec/clk-boston.c | ||
8781 | F: include/dt-bindings/clock/boston-clock.h | ||
8782 | |||
8735 | MIPS GENERIC PLATFORM | 8783 | MIPS GENERIC PLATFORM |
8736 | M: Paul Burton <paul.burton@imgtec.com> | 8784 | M: Paul Burton <paul.burton@imgtec.com> |
8737 | L: linux-mips@linux-mips.org | 8785 | L: linux-mips@linux-mips.org |
@@ -8747,16 +8795,6 @@ F: arch/mips/include/asm/mach-loongson32/ | |||
8747 | F: drivers/*/*loongson1* | 8795 | F: drivers/*/*loongson1* |
8748 | F: drivers/*/*/*loongson1* | 8796 | F: drivers/*/*/*loongson1* |
8749 | 8797 | ||
8750 | MIPS BOSTON DEVELOPMENT BOARD | ||
8751 | M: Paul Burton <paul.burton@imgtec.com> | ||
8752 | L: linux-mips@linux-mips.org | ||
8753 | S: Maintained | ||
8754 | F: Documentation/devicetree/bindings/clock/img,boston-clock.txt | ||
8755 | F: arch/mips/boot/dts/img/boston.dts | ||
8756 | F: arch/mips/configs/generic/board-boston.config | ||
8757 | F: drivers/clk/imgtec/clk-boston.c | ||
8758 | F: include/dt-bindings/clock/boston-clock.h | ||
8759 | |||
8760 | MIROSOUND PCM20 FM RADIO RECEIVER DRIVER | 8798 | MIROSOUND PCM20 FM RADIO RECEIVER DRIVER |
8761 | M: Hans Verkuil <hverkuil@xs4all.nl> | 8799 | M: Hans Verkuil <hverkuil@xs4all.nl> |
8762 | L: linux-media@vger.kernel.org | 8800 | L: linux-media@vger.kernel.org |
@@ -8765,67 +8803,15 @@ W: https://linuxtv.org | |||
8765 | S: Odd Fixes | 8803 | S: Odd Fixes |
8766 | F: drivers/media/radio/radio-miropcm20* | 8804 | F: drivers/media/radio/radio-miropcm20* |
8767 | 8805 | ||
8768 | MELLANOX MLX4 core VPI driver | 8806 | MMP SUPPORT |
8769 | M: Tariq Toukan <tariqt@mellanox.com> | 8807 | M: Eric Miao <eric.y.miao@gmail.com> |
8770 | L: netdev@vger.kernel.org | 8808 | M: Haojian Zhuang <haojian.zhuang@gmail.com> |
8771 | L: linux-rdma@vger.kernel.org | 8809 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
8772 | W: http://www.mellanox.com | 8810 | T: git git://github.com/hzhuang1/linux.git |
8773 | Q: http://patchwork.ozlabs.org/project/netdev/list/ | 8811 | T: git git://git.linaro.org/people/ycmiao/pxa-linux.git |
8774 | S: Supported | 8812 | S: Maintained |
8775 | F: drivers/net/ethernet/mellanox/mlx4/ | 8813 | F: arch/arm/boot/dts/mmp* |
8776 | F: include/linux/mlx4/ | 8814 | F: arch/arm/mach-mmp/ |
8777 | |||
8778 | MELLANOX MLX4 IB driver | ||
8779 | M: Yishai Hadas <yishaih@mellanox.com> | ||
8780 | L: linux-rdma@vger.kernel.org | ||
8781 | W: http://www.mellanox.com | ||
8782 | Q: http://patchwork.kernel.org/project/linux-rdma/list/ | ||
8783 | S: Supported | ||
8784 | F: drivers/infiniband/hw/mlx4/ | ||
8785 | F: include/linux/mlx4/ | ||
8786 | F: include/uapi/rdma/mlx4-abi.h | ||
8787 | |||
8788 | MELLANOX MLX5 core VPI driver | ||
8789 | M: Saeed Mahameed <saeedm@mellanox.com> | ||
8790 | M: Matan Barak <matanb@mellanox.com> | ||
8791 | M: Leon Romanovsky <leonro@mellanox.com> | ||
8792 | L: netdev@vger.kernel.org | ||
8793 | L: linux-rdma@vger.kernel.org | ||
8794 | W: http://www.mellanox.com | ||
8795 | Q: http://patchwork.ozlabs.org/project/netdev/list/ | ||
8796 | S: Supported | ||
8797 | F: drivers/net/ethernet/mellanox/mlx5/core/ | ||
8798 | F: include/linux/mlx5/ | ||
8799 | |||
8800 | MELLANOX MLX5 IB driver | ||
8801 | M: Matan Barak <matanb@mellanox.com> | ||
8802 | M: Leon Romanovsky <leonro@mellanox.com> | ||
8803 | L: linux-rdma@vger.kernel.org | ||
8804 | W: http://www.mellanox.com | ||
8805 | Q: http://patchwork.kernel.org/project/linux-rdma/list/ | ||
8806 | S: Supported | ||
8807 | F: drivers/infiniband/hw/mlx5/ | ||
8808 | F: include/linux/mlx5/ | ||
8809 | F: include/uapi/rdma/mlx5-abi.h | ||
8810 | |||
8811 | MELEXIS MLX90614 DRIVER | ||
8812 | M: Crt Mori <cmo@melexis.com> | ||
8813 | L: linux-iio@vger.kernel.org | ||
8814 | W: http://www.melexis.com | ||
8815 | S: Supported | ||
8816 | F: drivers/iio/temperature/mlx90614.c | ||
8817 | |||
8818 | MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi) | ||
8819 | M: Don Brace <don.brace@microsemi.com> | ||
8820 | L: esc.storagedev@microsemi.com | ||
8821 | L: linux-scsi@vger.kernel.org | ||
8822 | S: Supported | ||
8823 | F: drivers/scsi/smartpqi/smartpqi*.[ch] | ||
8824 | F: drivers/scsi/smartpqi/Kconfig | ||
8825 | F: drivers/scsi/smartpqi/Makefile | ||
8826 | F: include/linux/cciss*.h | ||
8827 | F: include/uapi/linux/cciss*.h | ||
8828 | F: Documentation/scsi/smartpqi.txt | ||
8829 | 8815 | ||
8830 | MN88472 MEDIA DRIVER | 8816 | MN88472 MEDIA DRIVER |
8831 | M: Antti Palosaari <crope@iki.fi> | 8817 | M: Antti Palosaari <crope@iki.fi> |
@@ -8959,6 +8945,11 @@ F: drivers/mfd/ | |||
8959 | F: include/linux/mfd/ | 8945 | F: include/linux/mfd/ |
8960 | F: include/dt-bindings/mfd/ | 8946 | F: include/dt-bindings/mfd/ |
8961 | 8947 | ||
8948 | MULTIMEDIA CARD (MMC) ETC. OVER SPI | ||
8949 | S: Orphan | ||
8950 | F: drivers/mmc/host/mmc_spi.c | ||
8951 | F: include/linux/spi/mmc_spi.h | ||
8952 | |||
8962 | MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM | 8953 | MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM |
8963 | M: Ulf Hansson <ulf.hansson@linaro.org> | 8954 | M: Ulf Hansson <ulf.hansson@linaro.org> |
8964 | L: linux-mmc@vger.kernel.org | 8955 | L: linux-mmc@vger.kernel.org |
@@ -8969,11 +8960,6 @@ F: drivers/mmc/ | |||
8969 | F: include/linux/mmc/ | 8960 | F: include/linux/mmc/ |
8970 | F: include/uapi/linux/mmc/ | 8961 | F: include/uapi/linux/mmc/ |
8971 | 8962 | ||
8972 | MULTIMEDIA CARD (MMC) ETC. OVER SPI | ||
8973 | S: Orphan | ||
8974 | F: drivers/mmc/host/mmc_spi.c | ||
8975 | F: include/linux/spi/mmc_spi.h | ||
8976 | |||
8977 | MULTIPLEXER SUBSYSTEM | 8963 | MULTIPLEXER SUBSYSTEM |
8978 | M: Peter Rosin <peda@axentia.se> | 8964 | M: Peter Rosin <peda@axentia.se> |
8979 | S: Maintained | 8965 | S: Maintained |
@@ -9036,10 +9022,6 @@ S: Maintained | |||
9036 | F: drivers/mtd/nand/ | 9022 | F: drivers/mtd/nand/ |
9037 | F: include/linux/mtd/nand*.h | 9023 | F: include/linux/mtd/nand*.h |
9038 | 9024 | ||
9039 | NATSEMI ETHERNET DRIVER (DP8381x) | ||
9040 | S: Orphan | ||
9041 | F: drivers/net/ethernet/natsemi/natsemi.c | ||
9042 | |||
9043 | NATIVE INSTRUMENTS USB SOUND INTERFACE DRIVER | 9025 | NATIVE INSTRUMENTS USB SOUND INTERFACE DRIVER |
9044 | M: Daniel Mack <zonque@gmail.com> | 9026 | M: Daniel Mack <zonque@gmail.com> |
9045 | S: Maintained | 9027 | S: Maintained |
@@ -9047,6 +9029,10 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |||
9047 | W: http://www.native-instruments.com | 9029 | W: http://www.native-instruments.com |
9048 | F: sound/usb/caiaq/ | 9030 | F: sound/usb/caiaq/ |
9049 | 9031 | ||
9032 | NATSEMI ETHERNET DRIVER (DP8381x) | ||
9033 | S: Orphan | ||
9034 | F: drivers/net/ethernet/natsemi/natsemi.c | ||
9035 | |||
9050 | NCP FILESYSTEM | 9036 | NCP FILESYSTEM |
9051 | M: Petr Vandrovec <petr@vandrovec.name> | 9037 | M: Petr Vandrovec <petr@vandrovec.name> |
9052 | S: Odd Fixes | 9038 | S: Odd Fixes |
@@ -9166,6 +9152,35 @@ S: Maintained | |||
9166 | W: https://fedorahosted.org/dropwatch/ | 9152 | W: https://fedorahosted.org/dropwatch/ |
9167 | F: net/core/drop_monitor.c | 9153 | F: net/core/drop_monitor.c |
9168 | 9154 | ||
9155 | NETWORKING DRIVERS | ||
9156 | L: netdev@vger.kernel.org | ||
9157 | W: http://www.linuxfoundation.org/en/Net | ||
9158 | Q: http://patchwork.ozlabs.org/project/netdev/list/ | ||
9159 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git | ||
9160 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git | ||
9161 | S: Odd Fixes | ||
9162 | F: Documentation/devicetree/bindings/net/ | ||
9163 | F: drivers/net/ | ||
9164 | F: include/linux/if_* | ||
9165 | F: include/linux/netdevice.h | ||
9166 | F: include/linux/etherdevice.h | ||
9167 | F: include/linux/fcdevice.h | ||
9168 | F: include/linux/fddidevice.h | ||
9169 | F: include/linux/hippidevice.h | ||
9170 | F: include/linux/inetdevice.h | ||
9171 | F: include/uapi/linux/if_* | ||
9172 | F: include/uapi/linux/netdevice.h | ||
9173 | |||
9174 | NETWORKING DRIVERS (WIRELESS) | ||
9175 | M: Kalle Valo <kvalo@codeaurora.org> | ||
9176 | L: linux-wireless@vger.kernel.org | ||
9177 | Q: http://patchwork.kernel.org/project/linux-wireless/list/ | ||
9178 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git | ||
9179 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git | ||
9180 | S: Maintained | ||
9181 | F: Documentation/devicetree/bindings/net/wireless/ | ||
9182 | F: drivers/net/wireless/ | ||
9183 | |||
9169 | NETWORKING [DSA] | 9184 | NETWORKING [DSA] |
9170 | M: Andrew Lunn <andrew@lunn.ch> | 9185 | M: Andrew Lunn <andrew@lunn.ch> |
9171 | M: Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 9186 | M: Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
@@ -9197,28 +9212,6 @@ F: tools/net/ | |||
9197 | F: tools/testing/selftests/net/ | 9212 | F: tools/testing/selftests/net/ |
9198 | F: lib/random32.c | 9213 | F: lib/random32.c |
9199 | 9214 | ||
9200 | NETWORKING [IPv4/IPv6] | ||
9201 | M: "David S. Miller" <davem@davemloft.net> | ||
9202 | M: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> | ||
9203 | M: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> | ||
9204 | L: netdev@vger.kernel.org | ||
9205 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git | ||
9206 | S: Maintained | ||
9207 | F: net/ipv4/ | ||
9208 | F: net/ipv6/ | ||
9209 | F: include/net/ip* | ||
9210 | F: arch/x86/net/* | ||
9211 | |||
9212 | NETWORKING [TLS] | ||
9213 | M: Ilya Lesokhin <ilyal@mellanox.com> | ||
9214 | M: Aviad Yehezkel <aviadye@mellanox.com> | ||
9215 | M: Dave Watson <davejwatson@fb.com> | ||
9216 | L: netdev@vger.kernel.org | ||
9217 | S: Maintained | ||
9218 | F: net/tls/* | ||
9219 | F: include/uapi/linux/tls.h | ||
9220 | F: include/net/tls.h | ||
9221 | |||
9222 | NETWORKING [IPSEC] | 9215 | NETWORKING [IPSEC] |
9223 | M: Steffen Klassert <steffen.klassert@secunet.com> | 9216 | M: Steffen Klassert <steffen.klassert@secunet.com> |
9224 | M: Herbert Xu <herbert@gondor.apana.org.au> | 9217 | M: Herbert Xu <herbert@gondor.apana.org.au> |
@@ -9243,43 +9236,36 @@ F: net/ipv6/ip6_vti.c | |||
9243 | F: include/uapi/linux/xfrm.h | 9236 | F: include/uapi/linux/xfrm.h |
9244 | F: include/net/xfrm.h | 9237 | F: include/net/xfrm.h |
9245 | 9238 | ||
9239 | NETWORKING [IPv4/IPv6] | ||
9240 | M: "David S. Miller" <davem@davemloft.net> | ||
9241 | M: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> | ||
9242 | M: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> | ||
9243 | L: netdev@vger.kernel.org | ||
9244 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git | ||
9245 | S: Maintained | ||
9246 | F: net/ipv4/ | ||
9247 | F: net/ipv6/ | ||
9248 | F: include/net/ip* | ||
9249 | F: arch/x86/net/* | ||
9250 | |||
9246 | NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) | 9251 | NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) |
9247 | M: Paul Moore <paul@paul-moore.com> | 9252 | M: Paul Moore <paul@paul-moore.com> |
9248 | L: netdev@vger.kernel.org | 9253 | L: netdev@vger.kernel.org |
9249 | S: Maintained | 9254 | S: Maintained |
9250 | 9255 | ||
9251 | NETWORKING [WIRELESS] | 9256 | NETWORKING [TLS] |
9252 | L: linux-wireless@vger.kernel.org | 9257 | M: Ilya Lesokhin <ilyal@mellanox.com> |
9253 | Q: http://patchwork.kernel.org/project/linux-wireless/list/ | 9258 | M: Aviad Yehezkel <aviadye@mellanox.com> |
9254 | 9259 | M: Dave Watson <davejwatson@fb.com> | |
9255 | NETWORKING DRIVERS | ||
9256 | L: netdev@vger.kernel.org | 9260 | L: netdev@vger.kernel.org |
9257 | W: http://www.linuxfoundation.org/en/Net | 9261 | S: Maintained |
9258 | Q: http://patchwork.ozlabs.org/project/netdev/list/ | 9262 | F: net/tls/* |
9259 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git | 9263 | F: include/uapi/linux/tls.h |
9260 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git | 9264 | F: include/net/tls.h |
9261 | S: Odd Fixes | ||
9262 | F: Documentation/devicetree/bindings/net/ | ||
9263 | F: drivers/net/ | ||
9264 | F: include/linux/if_* | ||
9265 | F: include/linux/netdevice.h | ||
9266 | F: include/linux/etherdevice.h | ||
9267 | F: include/linux/fcdevice.h | ||
9268 | F: include/linux/fddidevice.h | ||
9269 | F: include/linux/hippidevice.h | ||
9270 | F: include/linux/inetdevice.h | ||
9271 | F: include/uapi/linux/if_* | ||
9272 | F: include/uapi/linux/netdevice.h | ||
9273 | 9265 | ||
9274 | NETWORKING DRIVERS (WIRELESS) | 9266 | NETWORKING [WIRELESS] |
9275 | M: Kalle Valo <kvalo@codeaurora.org> | ||
9276 | L: linux-wireless@vger.kernel.org | 9267 | L: linux-wireless@vger.kernel.org |
9277 | Q: http://patchwork.kernel.org/project/linux-wireless/list/ | 9268 | Q: http://patchwork.kernel.org/project/linux-wireless/list/ |
9278 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git | ||
9279 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git | ||
9280 | S: Maintained | ||
9281 | F: Documentation/devicetree/bindings/net/wireless/ | ||
9282 | F: drivers/net/wireless/ | ||
9283 | 9269 | ||
9284 | NETXEN (1/10) GbE SUPPORT | 9270 | NETXEN (1/10) GbE SUPPORT |
9285 | M: Manish Chopra <manish.chopra@cavium.com> | 9271 | M: Manish Chopra <manish.chopra@cavium.com> |
@@ -9373,14 +9359,6 @@ S: Maintained | |||
9373 | F: drivers/media/i2c/et8ek8 | 9359 | F: drivers/media/i2c/et8ek8 |
9374 | F: drivers/media/i2c/ad5820.c | 9360 | F: drivers/media/i2c/ad5820.c |
9375 | 9361 | ||
9376 | NOKIA N900 CAMERA SUPPORT (ET8EK8 SENSOR, AD5820 FOCUS) | ||
9377 | M: Pavel Machek <pavel@ucw.cz> | ||
9378 | M: Sakari Ailus <sakari.ailus@iki.fi> | ||
9379 | L: linux-media@vger.kernel.org | ||
9380 | S: Maintained | ||
9381 | F: drivers/media/i2c/et8ek8 | ||
9382 | F: drivers/media/i2c/ad5820.c | ||
9383 | |||
9384 | NOKIA N900 POWER SUPPLY DRIVERS | 9362 | NOKIA N900 POWER SUPPLY DRIVERS |
9385 | R: Pali Rohár <pali.rohar@gmail.com> | 9363 | R: Pali Rohár <pali.rohar@gmail.com> |
9386 | F: include/linux/power/bq2415x_charger.h | 9364 | F: include/linux/power/bq2415x_charger.h |
@@ -9392,6 +9370,12 @@ F: drivers/power/supply/bq27xxx_battery_i2c.c | |||
9392 | F: drivers/power/supply/isp1704_charger.c | 9370 | F: drivers/power/supply/isp1704_charger.c |
9393 | F: drivers/power/supply/rx51_battery.c | 9371 | F: drivers/power/supply/rx51_battery.c |
9394 | 9372 | ||
9373 | NTB AMD DRIVER | ||
9374 | M: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> | ||
9375 | L: linux-ntb@googlegroups.com | ||
9376 | S: Supported | ||
9377 | F: drivers/ntb/hw/amd/ | ||
9378 | |||
9395 | NTB DRIVER CORE | 9379 | NTB DRIVER CORE |
9396 | M: Jon Mason <jdmason@kudzu.us> | 9380 | M: Jon Mason <jdmason@kudzu.us> |
9397 | M: Dave Jiang <dave.jiang@intel.com> | 9381 | M: Dave Jiang <dave.jiang@intel.com> |
@@ -9421,12 +9405,6 @@ W: https://github.com/jonmason/ntb/wiki | |||
9421 | T: git git://github.com/jonmason/ntb.git | 9405 | T: git git://github.com/jonmason/ntb.git |
9422 | F: drivers/ntb/hw/intel/ | 9406 | F: drivers/ntb/hw/intel/ |
9423 | 9407 | ||
9424 | NTB AMD DRIVER | ||
9425 | M: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> | ||
9426 | L: linux-ntb@googlegroups.com | ||
9427 | S: Supported | ||
9428 | F: drivers/ntb/hw/amd/ | ||
9429 | |||
9430 | NTFS FILESYSTEM | 9408 | NTFS FILESYSTEM |
9431 | M: Anton Altaparmakov <anton@tuxera.com> | 9409 | M: Anton Altaparmakov <anton@tuxera.com> |
9432 | L: linux-ntfs-dev@lists.sourceforge.net | 9410 | L: linux-ntfs-dev@lists.sourceforge.net |
@@ -9456,15 +9434,6 @@ F: drivers/nvme/host/ | |||
9456 | F: include/linux/nvme.h | 9434 | F: include/linux/nvme.h |
9457 | F: include/uapi/linux/nvme_ioctl.h | 9435 | F: include/uapi/linux/nvme_ioctl.h |
9458 | 9436 | ||
9459 | NVM EXPRESS TARGET DRIVER | ||
9460 | M: Christoph Hellwig <hch@lst.de> | ||
9461 | M: Sagi Grimberg <sagi@grimberg.me> | ||
9462 | L: linux-nvme@lists.infradead.org | ||
9463 | T: git://git.infradead.org/nvme.git | ||
9464 | W: http://git.infradead.org/nvme.git | ||
9465 | S: Supported | ||
9466 | F: drivers/nvme/target/ | ||
9467 | |||
9468 | NVM EXPRESS FC TRANSPORT DRIVERS | 9437 | NVM EXPRESS FC TRANSPORT DRIVERS |
9469 | M: James Smart <james.smart@broadcom.com> | 9438 | M: James Smart <james.smart@broadcom.com> |
9470 | L: linux-nvme@lists.infradead.org | 9439 | L: linux-nvme@lists.infradead.org |
@@ -9475,6 +9444,15 @@ F: drivers/nvme/host/fc.c | |||
9475 | F: drivers/nvme/target/fc.c | 9444 | F: drivers/nvme/target/fc.c |
9476 | F: drivers/nvme/target/fcloop.c | 9445 | F: drivers/nvme/target/fcloop.c |
9477 | 9446 | ||
9447 | NVM EXPRESS TARGET DRIVER | ||
9448 | M: Christoph Hellwig <hch@lst.de> | ||
9449 | M: Sagi Grimberg <sagi@grimberg.me> | ||
9450 | L: linux-nvme@lists.infradead.org | ||
9451 | T: git://git.infradead.org/nvme.git | ||
9452 | W: http://git.infradead.org/nvme.git | ||
9453 | S: Supported | ||
9454 | F: drivers/nvme/target/ | ||
9455 | |||
9478 | NVMEM FRAMEWORK | 9456 | NVMEM FRAMEWORK |
9479 | M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 9457 | M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> |
9480 | S: Maintained | 9458 | S: Maintained |
@@ -9483,13 +9461,6 @@ F: Documentation/devicetree/bindings/nvmem/ | |||
9483 | F: include/linux/nvmem-consumer.h | 9461 | F: include/linux/nvmem-consumer.h |
9484 | F: include/linux/nvmem-provider.h | 9462 | F: include/linux/nvmem-provider.h |
9485 | 9463 | ||
9486 | NXP-NCI NFC DRIVER | ||
9487 | M: Clément Perrochaud <clement.perrochaud@effinnov.com> | ||
9488 | R: Charles Gorand <charles.gorand@effinnov.com> | ||
9489 | L: linux-nfc@lists.01.org (moderated for non-subscribers) | ||
9490 | S: Supported | ||
9491 | F: drivers/nfc/nxp-nci | ||
9492 | |||
9493 | NXP TDA998X DRM DRIVER | 9464 | NXP TDA998X DRM DRIVER |
9494 | M: Russell King <linux@armlinux.org.uk> | 9465 | M: Russell King <linux@armlinux.org.uk> |
9495 | S: Supported | 9466 | S: Supported |
@@ -9504,55 +9475,31 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |||
9504 | S: Maintained | 9475 | S: Maintained |
9505 | F: sound/soc/codecs/tfa9879* | 9476 | F: sound/soc/codecs/tfa9879* |
9506 | 9477 | ||
9478 | NXP-NCI NFC DRIVER | ||
9479 | M: Clément Perrochaud <clement.perrochaud@effinnov.com> | ||
9480 | R: Charles Gorand <charles.gorand@effinnov.com> | ||
9481 | L: linux-nfc@lists.01.org (moderated for non-subscribers) | ||
9482 | S: Supported | ||
9483 | F: drivers/nfc/nxp-nci | ||
9484 | |||
9507 | OBJTOOL | 9485 | OBJTOOL |
9508 | M: Josh Poimboeuf <jpoimboe@redhat.com> | 9486 | M: Josh Poimboeuf <jpoimboe@redhat.com> |
9509 | S: Supported | 9487 | S: Supported |
9510 | F: tools/objtool/ | 9488 | F: tools/objtool/ |
9511 | 9489 | ||
9512 | OMAP1 SUPPORT | 9490 | OMAP AUDIO SUPPORT |
9513 | M: Aaro Koskinen <aaro.koskinen@iki.fi> | 9491 | M: Peter Ujfalusi <peter.ujfalusi@ti.com> |
9514 | M: Tony Lindgren <tony@atomide.com> | 9492 | M: Jarkko Nikula <jarkko.nikula@bitmer.com> |
9493 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | ||
9515 | L: linux-omap@vger.kernel.org | 9494 | L: linux-omap@vger.kernel.org |
9516 | Q: http://patchwork.kernel.org/project/linux-omap/list/ | ||
9517 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git | ||
9518 | S: Maintained | 9495 | S: Maintained |
9519 | F: arch/arm/mach-omap1/ | 9496 | F: sound/soc/omap/ |
9520 | F: arch/arm/plat-omap/ | ||
9521 | F: arch/arm/configs/omap1_defconfig | ||
9522 | F: drivers/i2c/busses/i2c-omap.c | ||
9523 | F: include/linux/i2c-omap.h | ||
9524 | 9497 | ||
9525 | OMAP2+ SUPPORT | 9498 | OMAP CLOCK FRAMEWORK SUPPORT |
9526 | M: Tony Lindgren <tony@atomide.com> | 9499 | M: Paul Walmsley <paul@pwsan.com> |
9527 | L: linux-omap@vger.kernel.org | 9500 | L: linux-omap@vger.kernel.org |
9528 | W: http://www.muru.com/linux/omap/ | ||
9529 | W: http://linux.omap.com/ | ||
9530 | Q: http://patchwork.kernel.org/project/linux-omap/list/ | ||
9531 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git | ||
9532 | S: Maintained | 9501 | S: Maintained |
9533 | F: arch/arm/mach-omap2/ | 9502 | F: arch/arm/*omap*/*clock* |
9534 | F: arch/arm/plat-omap/ | ||
9535 | F: arch/arm/configs/omap2plus_defconfig | ||
9536 | F: drivers/i2c/busses/i2c-omap.c | ||
9537 | F: drivers/irqchip/irq-omap-intc.c | ||
9538 | F: drivers/mfd/*omap*.c | ||
9539 | F: drivers/mfd/menelaus.c | ||
9540 | F: drivers/mfd/palmas.c | ||
9541 | F: drivers/mfd/tps65217.c | ||
9542 | F: drivers/mfd/tps65218.c | ||
9543 | F: drivers/mfd/tps65910.c | ||
9544 | F: drivers/mfd/twl-core.[ch] | ||
9545 | F: drivers/mfd/twl4030*.c | ||
9546 | F: drivers/mfd/twl6030*.c | ||
9547 | F: drivers/mfd/twl6040*.c | ||
9548 | F: drivers/regulator/palmas-regulator*.c | ||
9549 | F: drivers/regulator/pbias-regulator.c | ||
9550 | F: drivers/regulator/tps65217-regulator.c | ||
9551 | F: drivers/regulator/tps65218-regulator.c | ||
9552 | F: drivers/regulator/tps65910-regulator.c | ||
9553 | F: drivers/regulator/twl-regulator.c | ||
9554 | F: drivers/regulator/twl6030-regulator.c | ||
9555 | F: include/linux/i2c-omap.h | ||
9556 | 9503 | ||
9557 | OMAP DEVICE TREE SUPPORT | 9504 | OMAP DEVICE TREE SUPPORT |
9558 | M: Benoît Cousson <bcousson@baylibre.com> | 9505 | M: Benoît Cousson <bcousson@baylibre.com> |
@@ -9566,33 +9513,20 @@ F: arch/arm/boot/dts/*am4* | |||
9566 | F: arch/arm/boot/dts/*am5* | 9513 | F: arch/arm/boot/dts/*am5* |
9567 | F: arch/arm/boot/dts/*dra7* | 9514 | F: arch/arm/boot/dts/*dra7* |
9568 | 9515 | ||
9569 | OMAP CLOCK FRAMEWORK SUPPORT | 9516 | OMAP DISPLAY SUBSYSTEM and FRAMEBUFFER SUPPORT (DSS2) |
9570 | M: Paul Walmsley <paul@pwsan.com> | 9517 | M: Tomi Valkeinen <tomi.valkeinen@ti.com> |
9571 | L: linux-omap@vger.kernel.org | ||
9572 | S: Maintained | ||
9573 | F: arch/arm/*omap*/*clock* | ||
9574 | |||
9575 | OMAP POWER MANAGEMENT SUPPORT | ||
9576 | M: Kevin Hilman <khilman@kernel.org> | ||
9577 | L: linux-omap@vger.kernel.org | ||
9578 | S: Maintained | ||
9579 | F: arch/arm/*omap*/*pm* | ||
9580 | F: drivers/cpufreq/omap-cpufreq.c | ||
9581 | |||
9582 | OMAP POWERDOMAIN SOC ADAPTATION LAYER SUPPORT | ||
9583 | M: Rajendra Nayak <rnayak@codeaurora.org> | ||
9584 | M: Paul Walmsley <paul@pwsan.com> | ||
9585 | L: linux-omap@vger.kernel.org | 9518 | L: linux-omap@vger.kernel.org |
9519 | L: linux-fbdev@vger.kernel.org | ||
9586 | S: Maintained | 9520 | S: Maintained |
9587 | F: arch/arm/mach-omap2/prm* | 9521 | F: drivers/video/fbdev/omap2/ |
9522 | F: Documentation/arm/OMAP/DSS | ||
9588 | 9523 | ||
9589 | OMAP AUDIO SUPPORT | 9524 | OMAP FRAMEBUFFER SUPPORT |
9590 | M: Peter Ujfalusi <peter.ujfalusi@ti.com> | 9525 | M: Tomi Valkeinen <tomi.valkeinen@ti.com> |
9591 | M: Jarkko Nikula <jarkko.nikula@bitmer.com> | 9526 | L: linux-fbdev@vger.kernel.org |
9592 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | ||
9593 | L: linux-omap@vger.kernel.org | 9527 | L: linux-omap@vger.kernel.org |
9594 | S: Maintained | 9528 | S: Maintained |
9595 | F: sound/soc/omap/ | 9529 | F: drivers/video/fbdev/omap/ |
9596 | 9530 | ||
9597 | OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT | 9531 | OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT |
9598 | M: Roger Quadros <rogerq@ti.com> | 9532 | M: Roger Quadros <rogerq@ti.com> |
@@ -9602,20 +9536,14 @@ S: Maintained | |||
9602 | F: drivers/memory/omap-gpmc.c | 9536 | F: drivers/memory/omap-gpmc.c |
9603 | F: arch/arm/mach-omap2/*gpmc* | 9537 | F: arch/arm/mach-omap2/*gpmc* |
9604 | 9538 | ||
9605 | OMAP FRAMEBUFFER SUPPORT | 9539 | OMAP GPIO DRIVER |
9606 | M: Tomi Valkeinen <tomi.valkeinen@ti.com> | 9540 | M: Grygorii Strashko <grygorii.strashko@ti.com> |
9607 | L: linux-fbdev@vger.kernel.org | 9541 | M: Santosh Shilimkar <ssantosh@kernel.org> |
9608 | L: linux-omap@vger.kernel.org | 9542 | M: Kevin Hilman <khilman@kernel.org> |
9609 | S: Maintained | ||
9610 | F: drivers/video/fbdev/omap/ | ||
9611 | |||
9612 | OMAP DISPLAY SUBSYSTEM and FRAMEBUFFER SUPPORT (DSS2) | ||
9613 | M: Tomi Valkeinen <tomi.valkeinen@ti.com> | ||
9614 | L: linux-omap@vger.kernel.org | 9543 | L: linux-omap@vger.kernel.org |
9615 | L: linux-fbdev@vger.kernel.org | ||
9616 | S: Maintained | 9544 | S: Maintained |
9617 | F: drivers/video/fbdev/omap2/ | 9545 | F: Documentation/devicetree/bindings/gpio/gpio-omap.txt |
9618 | F: Documentation/arm/OMAP/DSS | 9546 | F: drivers/gpio/gpio-omap.c |
9619 | 9547 | ||
9620 | OMAP HARDWARE SPINLOCK SUPPORT | 9548 | OMAP HARDWARE SPINLOCK SUPPORT |
9621 | M: Ohad Ben-Cohen <ohad@wizery.com> | 9549 | M: Ohad Ben-Cohen <ohad@wizery.com> |
@@ -9623,30 +9551,12 @@ L: linux-omap@vger.kernel.org | |||
9623 | S: Maintained | 9551 | S: Maintained |
9624 | F: drivers/hwspinlock/omap_hwspinlock.c | 9552 | F: drivers/hwspinlock/omap_hwspinlock.c |
9625 | 9553 | ||
9626 | OMAP MMC SUPPORT | ||
9627 | M: Jarkko Lavinen <jarkko.lavinen@nokia.com> | ||
9628 | L: linux-omap@vger.kernel.org | ||
9629 | S: Maintained | ||
9630 | F: drivers/mmc/host/omap.c | ||
9631 | |||
9632 | OMAP HS MMC SUPPORT | 9554 | OMAP HS MMC SUPPORT |
9633 | L: linux-mmc@vger.kernel.org | 9555 | L: linux-mmc@vger.kernel.org |
9634 | L: linux-omap@vger.kernel.org | 9556 | L: linux-omap@vger.kernel.org |
9635 | S: Orphan | 9557 | S: Orphan |
9636 | F: drivers/mmc/host/omap_hsmmc.c | 9558 | F: drivers/mmc/host/omap_hsmmc.c |
9637 | 9559 | ||
9638 | OMAP RANDOM NUMBER GENERATOR SUPPORT | ||
9639 | M: Deepak Saxena <dsaxena@plexity.net> | ||
9640 | S: Maintained | ||
9641 | F: drivers/char/hw_random/omap-rng.c | ||
9642 | |||
9643 | OMAP HWMOD SUPPORT | ||
9644 | M: Benoît Cousson <bcousson@baylibre.com> | ||
9645 | M: Paul Walmsley <paul@pwsan.com> | ||
9646 | L: linux-omap@vger.kernel.org | ||
9647 | S: Maintained | ||
9648 | F: arch/arm/mach-omap2/omap_hwmod.* | ||
9649 | |||
9650 | OMAP HWMOD DATA | 9560 | OMAP HWMOD DATA |
9651 | M: Paul Walmsley <paul@pwsan.com> | 9561 | M: Paul Walmsley <paul@pwsan.com> |
9652 | L: linux-omap@vger.kernel.org | 9562 | L: linux-omap@vger.kernel.org |
@@ -9659,6 +9569,13 @@ L: linux-omap@vger.kernel.org | |||
9659 | S: Maintained | 9569 | S: Maintained |
9660 | F: arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 9570 | F: arch/arm/mach-omap2/omap_hwmod_44xx_data.c |
9661 | 9571 | ||
9572 | OMAP HWMOD SUPPORT | ||
9573 | M: Benoît Cousson <bcousson@baylibre.com> | ||
9574 | M: Paul Walmsley <paul@pwsan.com> | ||
9575 | L: linux-omap@vger.kernel.org | ||
9576 | S: Maintained | ||
9577 | F: arch/arm/mach-omap2/omap_hwmod.* | ||
9578 | |||
9662 | OMAP IMAGING SUBSYSTEM (OMAP3 ISP and OMAP4 ISS) | 9579 | OMAP IMAGING SUBSYSTEM (OMAP3 ISP and OMAP4 ISS) |
9663 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 9580 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
9664 | L: linux-media@vger.kernel.org | 9581 | L: linux-media@vger.kernel.org |
@@ -9667,6 +9584,31 @@ F: Documentation/devicetree/bindings/media/ti,omap3isp.txt | |||
9667 | F: drivers/media/platform/omap3isp/ | 9584 | F: drivers/media/platform/omap3isp/ |
9668 | F: drivers/staging/media/omap4iss/ | 9585 | F: drivers/staging/media/omap4iss/ |
9669 | 9586 | ||
9587 | OMAP MMC SUPPORT | ||
9588 | M: Jarkko Lavinen <jarkko.lavinen@nokia.com> | ||
9589 | L: linux-omap@vger.kernel.org | ||
9590 | S: Maintained | ||
9591 | F: drivers/mmc/host/omap.c | ||
9592 | |||
9593 | OMAP POWER MANAGEMENT SUPPORT | ||
9594 | M: Kevin Hilman <khilman@kernel.org> | ||
9595 | L: linux-omap@vger.kernel.org | ||
9596 | S: Maintained | ||
9597 | F: arch/arm/*omap*/*pm* | ||
9598 | F: drivers/cpufreq/omap-cpufreq.c | ||
9599 | |||
9600 | OMAP POWERDOMAIN SOC ADAPTATION LAYER SUPPORT | ||
9601 | M: Rajendra Nayak <rnayak@codeaurora.org> | ||
9602 | M: Paul Walmsley <paul@pwsan.com> | ||
9603 | L: linux-omap@vger.kernel.org | ||
9604 | S: Maintained | ||
9605 | F: arch/arm/mach-omap2/prm* | ||
9606 | |||
9607 | OMAP RANDOM NUMBER GENERATOR SUPPORT | ||
9608 | M: Deepak Saxena <dsaxena@plexity.net> | ||
9609 | S: Maintained | ||
9610 | F: drivers/char/hw_random/omap-rng.c | ||
9611 | |||
9670 | OMAP USB SUPPORT | 9612 | OMAP USB SUPPORT |
9671 | L: linux-usb@vger.kernel.org | 9613 | L: linux-usb@vger.kernel.org |
9672 | L: linux-omap@vger.kernel.org | 9614 | L: linux-omap@vger.kernel.org |
@@ -9674,21 +9616,57 @@ S: Orphan | |||
9674 | F: drivers/usb/*/*omap* | 9616 | F: drivers/usb/*/*omap* |
9675 | F: arch/arm/*omap*/usb* | 9617 | F: arch/arm/*omap*/usb* |
9676 | 9618 | ||
9677 | OMAP GPIO DRIVER | ||
9678 | M: Grygorii Strashko <grygorii.strashko@ti.com> | ||
9679 | M: Santosh Shilimkar <ssantosh@kernel.org> | ||
9680 | M: Kevin Hilman <khilman@kernel.org> | ||
9681 | L: linux-omap@vger.kernel.org | ||
9682 | S: Maintained | ||
9683 | F: Documentation/devicetree/bindings/gpio/gpio-omap.txt | ||
9684 | F: drivers/gpio/gpio-omap.c | ||
9685 | |||
9686 | OMAP/NEWFLOW NANOBONE MACHINE SUPPORT | 9619 | OMAP/NEWFLOW NANOBONE MACHINE SUPPORT |
9687 | M: Mark Jackson <mpfj@newflow.co.uk> | 9620 | M: Mark Jackson <mpfj@newflow.co.uk> |
9688 | L: linux-omap@vger.kernel.org | 9621 | L: linux-omap@vger.kernel.org |
9689 | S: Maintained | 9622 | S: Maintained |
9690 | F: arch/arm/boot/dts/am335x-nano.dts | 9623 | F: arch/arm/boot/dts/am335x-nano.dts |
9691 | 9624 | ||
9625 | OMAP1 SUPPORT | ||
9626 | M: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
9627 | M: Tony Lindgren <tony@atomide.com> | ||
9628 | L: linux-omap@vger.kernel.org | ||
9629 | Q: http://patchwork.kernel.org/project/linux-omap/list/ | ||
9630 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git | ||
9631 | S: Maintained | ||
9632 | F: arch/arm/mach-omap1/ | ||
9633 | F: arch/arm/plat-omap/ | ||
9634 | F: arch/arm/configs/omap1_defconfig | ||
9635 | F: drivers/i2c/busses/i2c-omap.c | ||
9636 | F: include/linux/i2c-omap.h | ||
9637 | |||
9638 | OMAP2+ SUPPORT | ||
9639 | M: Tony Lindgren <tony@atomide.com> | ||
9640 | L: linux-omap@vger.kernel.org | ||
9641 | W: http://www.muru.com/linux/omap/ | ||
9642 | W: http://linux.omap.com/ | ||
9643 | Q: http://patchwork.kernel.org/project/linux-omap/list/ | ||
9644 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git | ||
9645 | S: Maintained | ||
9646 | F: arch/arm/mach-omap2/ | ||
9647 | F: arch/arm/plat-omap/ | ||
9648 | F: arch/arm/configs/omap2plus_defconfig | ||
9649 | F: drivers/i2c/busses/i2c-omap.c | ||
9650 | F: drivers/irqchip/irq-omap-intc.c | ||
9651 | F: drivers/mfd/*omap*.c | ||
9652 | F: drivers/mfd/menelaus.c | ||
9653 | F: drivers/mfd/palmas.c | ||
9654 | F: drivers/mfd/tps65217.c | ||
9655 | F: drivers/mfd/tps65218.c | ||
9656 | F: drivers/mfd/tps65910.c | ||
9657 | F: drivers/mfd/twl-core.[ch] | ||
9658 | F: drivers/mfd/twl4030*.c | ||
9659 | F: drivers/mfd/twl6030*.c | ||
9660 | F: drivers/mfd/twl6040*.c | ||
9661 | F: drivers/regulator/palmas-regulator*.c | ||
9662 | F: drivers/regulator/pbias-regulator.c | ||
9663 | F: drivers/regulator/tps65217-regulator.c | ||
9664 | F: drivers/regulator/tps65218-regulator.c | ||
9665 | F: drivers/regulator/tps65910-regulator.c | ||
9666 | F: drivers/regulator/twl-regulator.c | ||
9667 | F: drivers/regulator/twl6030-regulator.c | ||
9668 | F: include/linux/i2c-omap.h | ||
9669 | |||
9692 | OMFS FILESYSTEM | 9670 | OMFS FILESYSTEM |
9693 | M: Bob Copeland <me@bobcopeland.com> | 9671 | M: Bob Copeland <me@bobcopeland.com> |
9694 | L: linux-karma-devel@lists.sourceforge.net | 9672 | L: linux-karma-devel@lists.sourceforge.net |
@@ -9708,6 +9686,13 @@ M: Harald Welte <laforge@gnumonks.org> | |||
9708 | S: Maintained | 9686 | S: Maintained |
9709 | F: drivers/char/pcmcia/cm4040_cs.* | 9687 | F: drivers/char/pcmcia/cm4040_cs.* |
9710 | 9688 | ||
9689 | OMNIVISION OV13858 SENSOR DRIVER | ||
9690 | M: Sakari Ailus <sakari.ailus@linux.intel.com> | ||
9691 | L: linux-media@vger.kernel.org | ||
9692 | T: git git://linuxtv.org/media_tree.git | ||
9693 | S: Maintained | ||
9694 | F: drivers/media/i2c/ov13858.c | ||
9695 | |||
9711 | OMNIVISION OV5640 SENSOR DRIVER | 9696 | OMNIVISION OV5640 SENSOR DRIVER |
9712 | M: Steve Longerbeam <slongerbeam@gmail.com> | 9697 | M: Steve Longerbeam <slongerbeam@gmail.com> |
9713 | L: linux-media@vger.kernel.org | 9698 | L: linux-media@vger.kernel.org |
@@ -9730,13 +9715,6 @@ S: Maintained | |||
9730 | F: drivers/media/i2c/ov7670.c | 9715 | F: drivers/media/i2c/ov7670.c |
9731 | F: Documentation/devicetree/bindings/media/i2c/ov7670.txt | 9716 | F: Documentation/devicetree/bindings/media/i2c/ov7670.txt |
9732 | 9717 | ||
9733 | OMNIVISION OV13858 SENSOR DRIVER | ||
9734 | M: Sakari Ailus <sakari.ailus@linux.intel.com> | ||
9735 | L: linux-media@vger.kernel.org | ||
9736 | T: git git://linuxtv.org/media_tree.git | ||
9737 | S: Maintained | ||
9738 | F: drivers/media/i2c/ov13858.c | ||
9739 | |||
9740 | ONENAND FLASH DRIVER | 9718 | ONENAND FLASH DRIVER |
9741 | M: Kyungmin Park <kyungmin.park@samsung.com> | 9719 | M: Kyungmin Park <kyungmin.park@samsung.com> |
9742 | L: linux-mtd@lists.infradead.org | 9720 | L: linux-mtd@lists.infradead.org |
@@ -9754,12 +9732,26 @@ F: drivers/scsi/osst.* | |||
9754 | F: drivers/scsi/osst_*.h | 9732 | F: drivers/scsi/osst_*.h |
9755 | F: drivers/scsi/st.h | 9733 | F: drivers/scsi/st.h |
9756 | 9734 | ||
9757 | OPENCORES I2C BUS DRIVER | 9735 | OP-TEE DRIVER |
9758 | M: Peter Korsgaard <jacmet@sunsite.dk> | 9736 | M: Jens Wiklander <jens.wiklander@linaro.org> |
9759 | L: linux-i2c@vger.kernel.org | ||
9760 | S: Maintained | 9737 | S: Maintained |
9761 | F: Documentation/i2c/busses/i2c-ocores | 9738 | F: drivers/tee/optee/ |
9762 | F: drivers/i2c/busses/i2c-ocores.c | 9739 | |
9740 | OPA-VNIC DRIVER | ||
9741 | M: Dennis Dalessandro <dennis.dalessandro@intel.com> | ||
9742 | M: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> | ||
9743 | L: linux-rdma@vger.kernel.org | ||
9744 | S: Supported | ||
9745 | F: drivers/infiniband/ulp/opa_vnic | ||
9746 | |||
9747 | OPEN FIRMWARE AND DEVICE TREE OVERLAYS | ||
9748 | M: Pantelis Antoniou <pantelis.antoniou@konsulko.com> | ||
9749 | L: devicetree@vger.kernel.org | ||
9750 | S: Maintained | ||
9751 | F: Documentation/devicetree/dynamic-resolution-notes.txt | ||
9752 | F: Documentation/devicetree/overlay-notes.txt | ||
9753 | F: drivers/of/overlay.c | ||
9754 | F: drivers/of/resolver.c | ||
9763 | 9755 | ||
9764 | OPEN FIRMWARE AND FLATTENED DEVICE TREE | 9756 | OPEN FIRMWARE AND FLATTENED DEVICE TREE |
9765 | M: Rob Herring <robh+dt@kernel.org> | 9757 | M: Rob Herring <robh+dt@kernel.org> |
@@ -9784,14 +9776,12 @@ F: Documentation/devicetree/ | |||
9784 | F: arch/*/boot/dts/ | 9776 | F: arch/*/boot/dts/ |
9785 | F: include/dt-bindings/ | 9777 | F: include/dt-bindings/ |
9786 | 9778 | ||
9787 | OPEN FIRMWARE AND DEVICE TREE OVERLAYS | 9779 | OPENCORES I2C BUS DRIVER |
9788 | M: Pantelis Antoniou <pantelis.antoniou@konsulko.com> | 9780 | M: Peter Korsgaard <jacmet@sunsite.dk> |
9789 | L: devicetree@vger.kernel.org | 9781 | L: linux-i2c@vger.kernel.org |
9790 | S: Maintained | 9782 | S: Maintained |
9791 | F: Documentation/devicetree/dynamic-resolution-notes.txt | 9783 | F: Documentation/i2c/busses/i2c-ocores |
9792 | F: Documentation/devicetree/overlay-notes.txt | 9784 | F: drivers/i2c/busses/i2c-ocores.c |
9793 | F: drivers/of/overlay.c | ||
9794 | F: drivers/of/resolver.c | ||
9795 | 9785 | ||
9796 | OPENRISC ARCHITECTURE | 9786 | OPENRISC ARCHITECTURE |
9797 | M: Jonas Bonn <jonas@southpole.se> | 9787 | M: Jonas Bonn <jonas@southpole.se> |
@@ -9840,11 +9830,6 @@ F: arch/*/oprofile/ | |||
9840 | F: drivers/oprofile/ | 9830 | F: drivers/oprofile/ |
9841 | F: include/linux/oprofile.h | 9831 | F: include/linux/oprofile.h |
9842 | 9832 | ||
9843 | OP-TEE DRIVER | ||
9844 | M: Jens Wiklander <jens.wiklander@linaro.org> | ||
9845 | S: Maintained | ||
9846 | F: drivers/tee/optee/ | ||
9847 | |||
9848 | ORACLE CLUSTER FILESYSTEM 2 (OCFS2) | 9833 | ORACLE CLUSTER FILESYSTEM 2 (OCFS2) |
9849 | M: Mark Fasheh <mfasheh@versity.com> | 9834 | M: Mark Fasheh <mfasheh@versity.com> |
9850 | M: Joel Becker <jlbec@evilplan.org> | 9835 | M: Joel Becker <jlbec@evilplan.org> |
@@ -9855,6 +9840,14 @@ F: Documentation/filesystems/ocfs2.txt | |||
9855 | F: Documentation/filesystems/dlmfs.txt | 9840 | F: Documentation/filesystems/dlmfs.txt |
9856 | F: fs/ocfs2/ | 9841 | F: fs/ocfs2/ |
9857 | 9842 | ||
9843 | ORANGEFS FILESYSTEM | ||
9844 | M: Mike Marshall <hubcap@omnibond.com> | ||
9845 | L: pvfs2-developers@beowulf-underground.org (subscribers-only) | ||
9846 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git | ||
9847 | S: Supported | ||
9848 | F: fs/orangefs/ | ||
9849 | F: Documentation/filesystems/orangefs.txt | ||
9850 | |||
9858 | ORINOCO DRIVER | 9851 | ORINOCO DRIVER |
9859 | L: linux-wireless@vger.kernel.org | 9852 | L: linux-wireless@vger.kernel.org |
9860 | W: http://wireless.kernel.org/en/users/Drivers/orinoco | 9853 | W: http://wireless.kernel.org/en/users/Drivers/orinoco |
@@ -9869,6 +9862,16 @@ F: drivers/scsi/osd/ | |||
9869 | F: include/scsi/osd_* | 9862 | F: include/scsi/osd_* |
9870 | F: fs/exofs/ | 9863 | F: fs/exofs/ |
9871 | 9864 | ||
9865 | OV2659 OMNIVISION SENSOR DRIVER | ||
9866 | M: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> | ||
9867 | L: linux-media@vger.kernel.org | ||
9868 | W: https://linuxtv.org | ||
9869 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
9870 | T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git | ||
9871 | S: Maintained | ||
9872 | F: drivers/media/i2c/ov2659.c | ||
9873 | F: include/media/i2c/ov2659.h | ||
9874 | |||
9872 | OVERLAY FILESYSTEM | 9875 | OVERLAY FILESYSTEM |
9873 | M: Miklos Szeredi <miklos@szeredi.hu> | 9876 | M: Miklos Szeredi <miklos@szeredi.hu> |
9874 | L: linux-unionfs@vger.kernel.org | 9877 | L: linux-unionfs@vger.kernel.org |
@@ -9877,14 +9880,6 @@ S: Supported | |||
9877 | F: fs/overlayfs/ | 9880 | F: fs/overlayfs/ |
9878 | F: Documentation/filesystems/overlayfs.txt | 9881 | F: Documentation/filesystems/overlayfs.txt |
9879 | 9882 | ||
9880 | ORANGEFS FILESYSTEM | ||
9881 | M: Mike Marshall <hubcap@omnibond.com> | ||
9882 | L: pvfs2-developers@beowulf-underground.org (subscribers-only) | ||
9883 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git | ||
9884 | S: Supported | ||
9885 | F: fs/orangefs/ | ||
9886 | F: Documentation/filesystems/orangefs.txt | ||
9887 | |||
9888 | P54 WIRELESS DRIVER | 9883 | P54 WIRELESS DRIVER |
9889 | M: Christian Lamparter <chunkeey@googlemail.com> | 9884 | M: Christian Lamparter <chunkeey@googlemail.com> |
9890 | L: linux-wireless@vger.kernel.org | 9885 | L: linux-wireless@vger.kernel.org |
@@ -9925,11 +9920,11 @@ F: Documentation/mn10300/ | |||
9925 | F: arch/mn10300/ | 9920 | F: arch/mn10300/ |
9926 | 9921 | ||
9927 | PARALLEL LCD/KEYPAD PANEL DRIVER | 9922 | PARALLEL LCD/KEYPAD PANEL DRIVER |
9928 | M: Willy Tarreau <willy@haproxy.com> | 9923 | M: Willy Tarreau <willy@haproxy.com> |
9929 | M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> | 9924 | M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> |
9930 | S: Odd Fixes | 9925 | S: Odd Fixes |
9931 | F: Documentation/misc-devices/lcd-panel-cgram.txt | 9926 | F: Documentation/misc-devices/lcd-panel-cgram.txt |
9932 | F: drivers/misc/panel.c | 9927 | F: drivers/misc/panel.c |
9933 | 9928 | ||
9934 | PARALLEL PORT SUBSYSTEM | 9929 | PARALLEL PORT SUBSYSTEM |
9935 | M: Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 9930 | M: Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
@@ -10025,42 +10020,13 @@ M: Khalid Aziz <khalid@gonehiking.org> | |||
10025 | S: Maintained | 10020 | S: Maintained |
10026 | F: drivers/firmware/pcdp.* | 10021 | F: drivers/firmware/pcdp.* |
10027 | 10022 | ||
10028 | PCI ERROR RECOVERY | 10023 | PCI DRIVER FOR AARDVARK (Marvell Armada 3700) |
10029 | M: Linas Vepstas <linasvepstas@gmail.com> | 10024 | M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
10030 | L: linux-pci@vger.kernel.org | ||
10031 | S: Supported | ||
10032 | F: Documentation/PCI/pci-error-recovery.txt | ||
10033 | |||
10034 | PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC | ||
10035 | M: Russell Currey <ruscur@russell.cc> | ||
10036 | L: linuxppc-dev@lists.ozlabs.org | ||
10037 | S: Supported | ||
10038 | F: Documentation/powerpc/eeh-pci-error-recovery.txt | ||
10039 | F: arch/powerpc/kernel/eeh*.c | ||
10040 | F: arch/powerpc/platforms/*/eeh*.c | ||
10041 | F: arch/powerpc/include/*/eeh*.h | ||
10042 | |||
10043 | PCI SUBSYSTEM | ||
10044 | M: Bjorn Helgaas <bhelgaas@google.com> | ||
10045 | L: linux-pci@vger.kernel.org | ||
10046 | Q: http://patchwork.ozlabs.org/project/linux-pci/list/ | ||
10047 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git | ||
10048 | S: Supported | ||
10049 | F: Documentation/devicetree/bindings/pci/ | ||
10050 | F: Documentation/PCI/ | ||
10051 | F: drivers/pci/ | ||
10052 | F: include/linux/pci* | ||
10053 | F: arch/x86/pci/ | ||
10054 | F: arch/x86/kernel/quirks.c | ||
10055 | |||
10056 | PCI ENDPOINT SUBSYSTEM | ||
10057 | M: Kishon Vijay Abraham I <kishon@ti.com> | ||
10058 | L: linux-pci@vger.kernel.org | 10025 | L: linux-pci@vger.kernel.org |
10059 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kishon/pci-endpoint.git | 10026 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
10060 | S: Supported | 10027 | S: Maintained |
10061 | F: drivers/pci/endpoint/ | 10028 | F: Documentation/devicetree/bindings/pci/aardvark-pci.txt |
10062 | F: drivers/misc/pci_endpoint_test.c | 10029 | F: drivers/pci/host/pci-aardvark.c |
10063 | F: tools/pci/ | ||
10064 | 10030 | ||
10065 | PCI DRIVER FOR ALTERA PCIE IP | 10031 | PCI DRIVER FOR ALTERA PCIE IP |
10066 | M: Ley Foon Tan <lftan@altera.com> | 10032 | M: Ley Foon Tan <lftan@altera.com> |
@@ -10070,6 +10036,14 @@ S: Supported | |||
10070 | F: Documentation/devicetree/bindings/pci/altera-pcie.txt | 10036 | F: Documentation/devicetree/bindings/pci/altera-pcie.txt |
10071 | F: drivers/pci/host/pcie-altera.c | 10037 | F: drivers/pci/host/pcie-altera.c |
10072 | 10038 | ||
10039 | PCI DRIVER FOR APPLIEDMICRO XGENE | ||
10040 | M: Tanmay Inamdar <tinamdar@apm.com> | ||
10041 | L: linux-pci@vger.kernel.org | ||
10042 | L: linux-arm-kernel@lists.infradead.org | ||
10043 | S: Maintained | ||
10044 | F: Documentation/devicetree/bindings/pci/xgene-pci.txt | ||
10045 | F: drivers/pci/host/pci-xgene.c | ||
10046 | |||
10073 | PCI DRIVER FOR ARM VERSATILE PLATFORM | 10047 | PCI DRIVER FOR ARM VERSATILE PLATFORM |
10074 | M: Rob Herring <robh@kernel.org> | 10048 | M: Rob Herring <robh@kernel.org> |
10075 | L: linux-pci@vger.kernel.org | 10049 | L: linux-pci@vger.kernel.org |
@@ -10086,14 +10060,6 @@ S: Maintained | |||
10086 | F: Documentation/devicetree/bindings/pci/pci-armada8k.txt | 10060 | F: Documentation/devicetree/bindings/pci/pci-armada8k.txt |
10087 | F: drivers/pci/dwc/pcie-armada8k.c | 10061 | F: drivers/pci/dwc/pcie-armada8k.c |
10088 | 10062 | ||
10089 | PCI DRIVER FOR APPLIEDMICRO XGENE | ||
10090 | M: Tanmay Inamdar <tinamdar@apm.com> | ||
10091 | L: linux-pci@vger.kernel.org | ||
10092 | L: linux-arm-kernel@lists.infradead.org | ||
10093 | S: Maintained | ||
10094 | F: Documentation/devicetree/bindings/pci/xgene-pci.txt | ||
10095 | F: drivers/pci/host/pci-xgene.c | ||
10096 | |||
10097 | PCI DRIVER FOR FREESCALE LAYERSCAPE | 10063 | PCI DRIVER FOR FREESCALE LAYERSCAPE |
10098 | M: Minghuan Lian <minghuan.Lian@freescale.com> | 10064 | M: Minghuan Lian <minghuan.Lian@freescale.com> |
10099 | M: Mingkai Hu <mingkai.hu@freescale.com> | 10065 | M: Mingkai Hu <mingkai.hu@freescale.com> |
@@ -10104,6 +10070,15 @@ L: linux-arm-kernel@lists.infradead.org | |||
10104 | S: Maintained | 10070 | S: Maintained |
10105 | F: drivers/pci/dwc/*layerscape* | 10071 | F: drivers/pci/dwc/*layerscape* |
10106 | 10072 | ||
10073 | PCI DRIVER FOR GENERIC OF HOSTS | ||
10074 | M: Will Deacon <will.deacon@arm.com> | ||
10075 | L: linux-pci@vger.kernel.org | ||
10076 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
10077 | S: Maintained | ||
10078 | F: Documentation/devicetree/bindings/pci/host-generic-pci.txt | ||
10079 | F: drivers/pci/host/pci-host-common.c | ||
10080 | F: drivers/pci/host/pci-host-generic.c | ||
10081 | |||
10107 | PCI DRIVER FOR IMX6 | 10082 | PCI DRIVER FOR IMX6 |
10108 | M: Richard Zhu <hongxing.zhu@nxp.com> | 10083 | M: Richard Zhu <hongxing.zhu@nxp.com> |
10109 | M: Lucas Stach <l.stach@pengutronix.de> | 10084 | M: Lucas Stach <l.stach@pengutronix.de> |
@@ -10113,28 +10088,11 @@ S: Maintained | |||
10113 | F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt | 10088 | F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt |
10114 | F: drivers/pci/dwc/*imx6* | 10089 | F: drivers/pci/dwc/*imx6* |
10115 | 10090 | ||
10116 | PCI DRIVER FOR TI KEYSTONE | 10091 | PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD) |
10117 | M: Murali Karicheri <m-karicheri2@ti.com> | 10092 | M: Keith Busch <keith.busch@intel.com> |
10118 | L: linux-pci@vger.kernel.org | ||
10119 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
10120 | S: Maintained | ||
10121 | F: drivers/pci/dwc/*keystone* | ||
10122 | |||
10123 | PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support) | ||
10124 | M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
10125 | M: Jason Cooper <jason@lakedaemon.net> | ||
10126 | L: linux-pci@vger.kernel.org | ||
10127 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
10128 | S: Maintained | ||
10129 | F: drivers/pci/host/*mvebu* | ||
10130 | |||
10131 | PCI DRIVER FOR AARDVARK (Marvell Armada 3700) | ||
10132 | M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
10133 | L: linux-pci@vger.kernel.org | 10093 | L: linux-pci@vger.kernel.org |
10134 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 10094 | S: Supported |
10135 | S: Maintained | 10095 | F: drivers/pci/host/vmd.c |
10136 | F: Documentation/devicetree/bindings/pci/aardvark-pci.txt | ||
10137 | F: drivers/pci/host/pci-aardvark.c | ||
10138 | 10096 | ||
10139 | PCI DRIVER FOR MICROSEMI SWITCHTEC | 10097 | PCI DRIVER FOR MICROSEMI SWITCHTEC |
10140 | M: Kurt Schwemmer <kurt.schwemmer@microsemi.com> | 10098 | M: Kurt Schwemmer <kurt.schwemmer@microsemi.com> |
@@ -10147,6 +10105,14 @@ F: Documentation/ABI/testing/sysfs-class-switchtec | |||
10147 | F: drivers/pci/switch/switchtec* | 10105 | F: drivers/pci/switch/switchtec* |
10148 | F: include/uapi/linux/switchtec_ioctl.h | 10106 | F: include/uapi/linux/switchtec_ioctl.h |
10149 | 10107 | ||
10108 | PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support) | ||
10109 | M: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
10110 | M: Jason Cooper <jason@lakedaemon.net> | ||
10111 | L: linux-pci@vger.kernel.org | ||
10112 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
10113 | S: Maintained | ||
10114 | F: drivers/pci/host/*mvebu* | ||
10115 | |||
10150 | PCI DRIVER FOR NVIDIA TEGRA | 10116 | PCI DRIVER FOR NVIDIA TEGRA |
10151 | M: Thierry Reding <thierry.reding@gmail.com> | 10117 | M: Thierry Reding <thierry.reding@gmail.com> |
10152 | L: linux-tegra@vger.kernel.org | 10118 | L: linux-tegra@vger.kernel.org |
@@ -10155,14 +10121,6 @@ S: Supported | |||
10155 | F: Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 10121 | F: Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt |
10156 | F: drivers/pci/host/pci-tegra.c | 10122 | F: drivers/pci/host/pci-tegra.c |
10157 | 10123 | ||
10158 | PCI DRIVER FOR TI DRA7XX | ||
10159 | M: Kishon Vijay Abraham I <kishon@ti.com> | ||
10160 | L: linux-omap@vger.kernel.org | ||
10161 | L: linux-pci@vger.kernel.org | ||
10162 | S: Supported | ||
10163 | F: Documentation/devicetree/bindings/pci/ti-pci.txt | ||
10164 | F: drivers/pci/dwc/pci-dra7xx.c | ||
10165 | |||
10166 | PCI DRIVER FOR RENESAS R-CAR | 10124 | PCI DRIVER FOR RENESAS R-CAR |
10167 | M: Simon Horman <horms@verge.net.au> | 10125 | M: Simon Horman <horms@verge.net.au> |
10168 | L: linux-pci@vger.kernel.org | 10126 | L: linux-pci@vger.kernel.org |
@@ -10186,26 +10144,44 @@ S: Maintained | |||
10186 | F: Documentation/devicetree/bindings/pci/designware-pcie.txt | 10144 | F: Documentation/devicetree/bindings/pci/designware-pcie.txt |
10187 | F: drivers/pci/dwc/*designware* | 10145 | F: drivers/pci/dwc/*designware* |
10188 | 10146 | ||
10189 | PCI DRIVER FOR GENERIC OF HOSTS | 10147 | PCI DRIVER FOR TI DRA7XX |
10190 | M: Will Deacon <will.deacon@arm.com> | 10148 | M: Kishon Vijay Abraham I <kishon@ti.com> |
10149 | L: linux-omap@vger.kernel.org | ||
10150 | L: linux-pci@vger.kernel.org | ||
10151 | S: Supported | ||
10152 | F: Documentation/devicetree/bindings/pci/ti-pci.txt | ||
10153 | F: drivers/pci/dwc/pci-dra7xx.c | ||
10154 | |||
10155 | PCI DRIVER FOR TI KEYSTONE | ||
10156 | M: Murali Karicheri <m-karicheri2@ti.com> | ||
10191 | L: linux-pci@vger.kernel.org | 10157 | L: linux-pci@vger.kernel.org |
10192 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 10158 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
10193 | S: Maintained | 10159 | S: Maintained |
10194 | F: Documentation/devicetree/bindings/pci/host-generic-pci.txt | 10160 | F: drivers/pci/dwc/*keystone* |
10195 | F: drivers/pci/host/pci-host-common.c | ||
10196 | F: drivers/pci/host/pci-host-generic.c | ||
10197 | 10161 | ||
10198 | PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD) | 10162 | PCI ENDPOINT SUBSYSTEM |
10199 | M: Keith Busch <keith.busch@intel.com> | 10163 | M: Kishon Vijay Abraham I <kishon@ti.com> |
10200 | L: linux-pci@vger.kernel.org | 10164 | L: linux-pci@vger.kernel.org |
10165 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kishon/pci-endpoint.git | ||
10201 | S: Supported | 10166 | S: Supported |
10202 | F: drivers/pci/host/vmd.c | 10167 | F: drivers/pci/endpoint/ |
10168 | F: drivers/misc/pci_endpoint_test.c | ||
10169 | F: tools/pci/ | ||
10203 | 10170 | ||
10204 | PCIE DRIVER FOR ST SPEAR13XX | 10171 | PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC |
10205 | M: Pratyush Anand <pratyush.anand@gmail.com> | 10172 | M: Russell Currey <ruscur@russell.cc> |
10173 | L: linuxppc-dev@lists.ozlabs.org | ||
10174 | S: Supported | ||
10175 | F: Documentation/powerpc/eeh-pci-error-recovery.txt | ||
10176 | F: arch/powerpc/kernel/eeh*.c | ||
10177 | F: arch/powerpc/platforms/*/eeh*.c | ||
10178 | F: arch/powerpc/include/*/eeh*.h | ||
10179 | |||
10180 | PCI ERROR RECOVERY | ||
10181 | M: Linas Vepstas <linasvepstas@gmail.com> | ||
10206 | L: linux-pci@vger.kernel.org | 10182 | L: linux-pci@vger.kernel.org |
10207 | S: Maintained | 10183 | S: Supported |
10208 | F: drivers/pci/dwc/*spear* | 10184 | F: Documentation/PCI/pci-error-recovery.txt |
10209 | 10185 | ||
10210 | PCI MSI DRIVER FOR ALTERA MSI IP | 10186 | PCI MSI DRIVER FOR ALTERA MSI IP |
10211 | M: Ley Foon Tan <lftan@altera.com> | 10187 | M: Ley Foon Tan <lftan@altera.com> |
@@ -10223,6 +10199,19 @@ S: Maintained | |||
10223 | F: Documentation/devicetree/bindings/pci/xgene-pci-msi.txt | 10199 | F: Documentation/devicetree/bindings/pci/xgene-pci-msi.txt |
10224 | F: drivers/pci/host/pci-xgene-msi.c | 10200 | F: drivers/pci/host/pci-xgene-msi.c |
10225 | 10201 | ||
10202 | PCI SUBSYSTEM | ||
10203 | M: Bjorn Helgaas <bhelgaas@google.com> | ||
10204 | L: linux-pci@vger.kernel.org | ||
10205 | Q: http://patchwork.ozlabs.org/project/linux-pci/list/ | ||
10206 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git | ||
10207 | S: Supported | ||
10208 | F: Documentation/devicetree/bindings/pci/ | ||
10209 | F: Documentation/PCI/ | ||
10210 | F: drivers/pci/ | ||
10211 | F: include/linux/pci* | ||
10212 | F: arch/x86/pci/ | ||
10213 | F: arch/x86/kernel/quirks.c | ||
10214 | |||
10226 | PCIE DRIVER FOR AXIS ARTPEC | 10215 | PCIE DRIVER FOR AXIS ARTPEC |
10227 | M: Niklas Cassel <niklas.cassel@axis.com> | 10216 | M: Niklas Cassel <niklas.cassel@axis.com> |
10228 | M: Jesper Nilsson <jesper.nilsson@axis.com> | 10217 | M: Jesper Nilsson <jesper.nilsson@axis.com> |
@@ -10232,6 +10221,14 @@ S: Maintained | |||
10232 | F: Documentation/devicetree/bindings/pci/axis,artpec* | 10221 | F: Documentation/devicetree/bindings/pci/axis,artpec* |
10233 | F: drivers/pci/dwc/*artpec* | 10222 | F: drivers/pci/dwc/*artpec* |
10234 | 10223 | ||
10224 | PCIE DRIVER FOR CAVIUM THUNDERX | ||
10225 | M: David Daney <david.daney@cavium.com> | ||
10226 | L: linux-pci@vger.kernel.org | ||
10227 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
10228 | S: Supported | ||
10229 | F: Documentation/devicetree/bindings/pci/pci-thunder-* | ||
10230 | F: drivers/pci/host/pci-thunder-* | ||
10231 | |||
10235 | PCIE DRIVER FOR HISILICON | 10232 | PCIE DRIVER FOR HISILICON |
10236 | M: Zhou Wang <wangzhou1@hisilicon.com> | 10233 | M: Zhou Wang <wangzhou1@hisilicon.com> |
10237 | M: Gabriele Paoloni <gabriele.paoloni@huawei.com> | 10234 | M: Gabriele Paoloni <gabriele.paoloni@huawei.com> |
@@ -10248,6 +10245,21 @@ S: Maintained | |||
10248 | F: Documentation/devicetree/bindings/pci/pcie-kirin.txt | 10245 | F: Documentation/devicetree/bindings/pci/pcie-kirin.txt |
10249 | F: drivers/pci/dwc/pcie-kirin.c | 10246 | F: drivers/pci/dwc/pcie-kirin.c |
10250 | 10247 | ||
10248 | PCIE DRIVER FOR MEDIATEK | ||
10249 | M: Ryder Lee <ryder.lee@mediatek.com> | ||
10250 | L: linux-pci@vger.kernel.org | ||
10251 | L: linux-mediatek@lists.infradead.org | ||
10252 | S: Supported | ||
10253 | F: Documentation/devicetree/bindings/pci/mediatek* | ||
10254 | F: drivers/pci/host/*mediatek* | ||
10255 | |||
10256 | PCIE DRIVER FOR QUALCOMM MSM | ||
10257 | M: Stanimir Varbanov <svarbanov@mm-sol.com> | ||
10258 | L: linux-pci@vger.kernel.org | ||
10259 | L: linux-arm-msm@vger.kernel.org | ||
10260 | S: Maintained | ||
10261 | F: drivers/pci/dwc/*qcom* | ||
10262 | |||
10251 | PCIE DRIVER FOR ROCKCHIP | 10263 | PCIE DRIVER FOR ROCKCHIP |
10252 | M: Shawn Lin <shawn.lin@rock-chips.com> | 10264 | M: Shawn Lin <shawn.lin@rock-chips.com> |
10253 | L: linux-pci@vger.kernel.org | 10265 | L: linux-pci@vger.kernel.org |
@@ -10256,28 +10268,11 @@ S: Maintained | |||
10256 | F: Documentation/devicetree/bindings/pci/rockchip-pcie.txt | 10268 | F: Documentation/devicetree/bindings/pci/rockchip-pcie.txt |
10257 | F: drivers/pci/host/pcie-rockchip.c | 10269 | F: drivers/pci/host/pcie-rockchip.c |
10258 | 10270 | ||
10259 | PCIE DRIVER FOR QUALCOMM MSM | 10271 | PCIE DRIVER FOR ST SPEAR13XX |
10260 | M: Stanimir Varbanov <svarbanov@mm-sol.com> | 10272 | M: Pratyush Anand <pratyush.anand@gmail.com> |
10261 | L: linux-pci@vger.kernel.org | ||
10262 | L: linux-arm-msm@vger.kernel.org | ||
10263 | S: Maintained | ||
10264 | F: drivers/pci/dwc/*qcom* | ||
10265 | |||
10266 | PCIE DRIVER FOR CAVIUM THUNDERX | ||
10267 | M: David Daney <david.daney@cavium.com> | ||
10268 | L: linux-pci@vger.kernel.org | 10273 | L: linux-pci@vger.kernel.org |
10269 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 10274 | S: Maintained |
10270 | S: Supported | 10275 | F: drivers/pci/dwc/*spear* |
10271 | F: Documentation/devicetree/bindings/pci/pci-thunder-* | ||
10272 | F: drivers/pci/host/pci-thunder-* | ||
10273 | |||
10274 | PCIE DRIVER FOR MEDIATEK | ||
10275 | M: Ryder Lee <ryder.lee@mediatek.com> | ||
10276 | L: linux-pci@vger.kernel.org | ||
10277 | L: linux-mediatek@lists.infradead.org | ||
10278 | S: Supported | ||
10279 | F: Documentation/devicetree/bindings/pci/mediatek* | ||
10280 | F: drivers/pci/host/*mediatek* | ||
10281 | 10276 | ||
10282 | PCMCIA SUBSYSTEM | 10277 | PCMCIA SUBSYSTEM |
10283 | P: Linux PCMCIA Team | 10278 | P: Linux PCMCIA Team |
@@ -10446,14 +10441,14 @@ S: Maintained | |||
10446 | F: drivers/pinctrl/spear/ | 10441 | F: drivers/pinctrl/spear/ |
10447 | 10442 | ||
10448 | PISTACHIO SOC SUPPORT | 10443 | PISTACHIO SOC SUPPORT |
10449 | M: James Hartley <james.hartley@imgtec.com> | 10444 | M: James Hartley <james.hartley@imgtec.com> |
10450 | M: Ionela Voinescu <ionela.voinescu@imgtec.com> | 10445 | M: Ionela Voinescu <ionela.voinescu@imgtec.com> |
10451 | L: linux-mips@linux-mips.org | 10446 | L: linux-mips@linux-mips.org |
10452 | S: Maintained | 10447 | S: Maintained |
10453 | F: arch/mips/pistachio/ | 10448 | F: arch/mips/pistachio/ |
10454 | F: arch/mips/include/asm/mach-pistachio/ | 10449 | F: arch/mips/include/asm/mach-pistachio/ |
10455 | F: arch/mips/boot/dts/img/pistachio* | 10450 | F: arch/mips/boot/dts/img/pistachio* |
10456 | F: arch/mips/configs/pistachio*_defconfig | 10451 | F: arch/mips/configs/pistachio*_defconfig |
10457 | 10452 | ||
10458 | PKTCDVD DRIVER | 10453 | PKTCDVD DRIVER |
10459 | S: Orphan | 10454 | S: Orphan |
@@ -10496,6 +10491,11 @@ L: linux-scsi@vger.kernel.org | |||
10496 | S: Supported | 10491 | S: Supported |
10497 | F: drivers/scsi/pm8001/ | 10492 | F: drivers/scsi/pm8001/ |
10498 | 10493 | ||
10494 | PNP SUPPORT | ||
10495 | M: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> | ||
10496 | S: Maintained | ||
10497 | F: drivers/pnp/ | ||
10498 | |||
10499 | POSIX CLOCKS and TIMERS | 10499 | POSIX CLOCKS and TIMERS |
10500 | M: Thomas Gleixner <tglx@linutronix.de> | 10500 | M: Thomas Gleixner <tglx@linutronix.de> |
10501 | L: linux-kernel@vger.kernel.org | 10501 | L: linux-kernel@vger.kernel.org |
@@ -10517,15 +10517,6 @@ F: include/linux/pm_* | |||
10517 | F: include/linux/powercap.h | 10517 | F: include/linux/powercap.h |
10518 | F: drivers/powercap/ | 10518 | F: drivers/powercap/ |
10519 | 10519 | ||
10520 | POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS | ||
10521 | M: Sebastian Reichel <sre@kernel.org> | ||
10522 | L: linux-pm@vger.kernel.org | ||
10523 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git | ||
10524 | S: Maintained | ||
10525 | F: Documentation/devicetree/bindings/power/supply/ | ||
10526 | F: include/linux/power_supply.h | ||
10527 | F: drivers/power/supply/ | ||
10528 | |||
10529 | POWER STATE COORDINATION INTERFACE (PSCI) | 10520 | POWER STATE COORDINATION INTERFACE (PSCI) |
10530 | M: Mark Rutland <mark.rutland@arm.com> | 10521 | M: Mark Rutland <mark.rutland@arm.com> |
10531 | M: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 10522 | M: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> |
@@ -10535,23 +10526,21 @@ F: drivers/firmware/psci*.c | |||
10535 | F: include/linux/psci.h | 10526 | F: include/linux/psci.h |
10536 | F: include/uapi/linux/psci.h | 10527 | F: include/uapi/linux/psci.h |
10537 | 10528 | ||
10529 | POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS | ||
10530 | M: Sebastian Reichel <sre@kernel.org> | ||
10531 | L: linux-pm@vger.kernel.org | ||
10532 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git | ||
10533 | S: Maintained | ||
10534 | F: Documentation/devicetree/bindings/power/supply/ | ||
10535 | F: include/linux/power_supply.h | ||
10536 | F: drivers/power/supply/ | ||
10537 | |||
10538 | POWERNV OPERATOR PANEL LCD DISPLAY DRIVER | 10538 | POWERNV OPERATOR PANEL LCD DISPLAY DRIVER |
10539 | M: Suraj Jitindar Singh <sjitindarsingh@gmail.com> | 10539 | M: Suraj Jitindar Singh <sjitindarsingh@gmail.com> |
10540 | L: linuxppc-dev@lists.ozlabs.org | 10540 | L: linuxppc-dev@lists.ozlabs.org |
10541 | S: Maintained | 10541 | S: Maintained |
10542 | F: drivers/char/powernv-op-panel.c | 10542 | F: drivers/char/powernv-op-panel.c |
10543 | 10543 | ||
10544 | PNP SUPPORT | ||
10545 | M: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> | ||
10546 | S: Maintained | ||
10547 | F: drivers/pnp/ | ||
10548 | |||
10549 | PPP PROTOCOL DRIVERS AND COMPRESSORS | ||
10550 | M: Paul Mackerras <paulus@samba.org> | ||
10551 | L: linux-ppp@vger.kernel.org | ||
10552 | S: Maintained | ||
10553 | F: drivers/net/ppp/ppp_* | ||
10554 | |||
10555 | PPP OVER ATM (RFC 2364) | 10544 | PPP OVER ATM (RFC 2364) |
10556 | M: Mitchell Blank Jr <mitch@sfgoth.com> | 10545 | M: Mitchell Blank Jr <mitch@sfgoth.com> |
10557 | S: Maintained | 10546 | S: Maintained |
@@ -10571,6 +10560,12 @@ F: net/l2tp/l2tp_ppp.c | |||
10571 | F: include/linux/if_pppol2tp.h | 10560 | F: include/linux/if_pppol2tp.h |
10572 | F: include/uapi/linux/if_pppol2tp.h | 10561 | F: include/uapi/linux/if_pppol2tp.h |
10573 | 10562 | ||
10563 | PPP PROTOCOL DRIVERS AND COMPRESSORS | ||
10564 | M: Paul Mackerras <paulus@samba.org> | ||
10565 | L: linux-ppp@vger.kernel.org | ||
10566 | S: Maintained | ||
10567 | F: drivers/net/ppp/ppp_* | ||
10568 | |||
10574 | PPS SUPPORT | 10569 | PPS SUPPORT |
10575 | M: Rodolfo Giometti <giometti@enneenne.com> | 10570 | M: Rodolfo Giometti <giometti@enneenne.com> |
10576 | W: http://wiki.enneenne.com/index.php/LinuxPPS_support | 10571 | W: http://wiki.enneenne.com/index.php/LinuxPPS_support |
@@ -10684,7 +10679,6 @@ F: drivers/ptp/* | |||
10684 | F: include/linux/ptp_cl* | 10679 | F: include/linux/ptp_cl* |
10685 | 10680 | ||
10686 | PTRACE SUPPORT | 10681 | PTRACE SUPPORT |
10687 | M: Roland McGrath <roland@hack.frob.com> | ||
10688 | M: Oleg Nesterov <oleg@redhat.com> | 10682 | M: Oleg Nesterov <oleg@redhat.com> |
10689 | S: Maintained | 10683 | S: Maintained |
10690 | F: include/asm-generic/syscall.h | 10684 | F: include/asm-generic/syscall.h |
@@ -10692,7 +10686,12 @@ F: include/linux/ptrace.h | |||
10692 | F: include/linux/regset.h | 10686 | F: include/linux/regset.h |
10693 | F: include/linux/tracehook.h | 10687 | F: include/linux/tracehook.h |
10694 | F: include/uapi/linux/ptrace.h | 10688 | F: include/uapi/linux/ptrace.h |
10689 | F: include/uapi/linux/ptrace.h | ||
10690 | F: include/asm-generic/ptrace.h | ||
10695 | F: kernel/ptrace.c | 10691 | F: kernel/ptrace.c |
10692 | F: arch/*/ptrace*.c | ||
10693 | F: arch/*/*/ptrace*.c | ||
10694 | F: arch/*/include/asm/ptrace*.h | ||
10696 | 10695 | ||
10697 | PULSE8-CEC DRIVER | 10696 | PULSE8-CEC DRIVER |
10698 | M: Hans Verkuil <hverkuil@xs4all.nl> | 10697 | M: Hans Verkuil <hverkuil@xs4all.nl> |
@@ -10741,6 +10740,20 @@ F: include/linux/pwm_backlight.h | |||
10741 | F: drivers/gpio/gpio-mvebu.c | 10740 | F: drivers/gpio/gpio-mvebu.c |
10742 | F: Documentation/devicetree/bindings/gpio/gpio-mvebu.txt | 10741 | F: Documentation/devicetree/bindings/gpio/gpio-mvebu.txt |
10743 | 10742 | ||
10743 | PXA GPIO DRIVER | ||
10744 | M: Robert Jarzmik <robert.jarzmik@free.fr> | ||
10745 | L: linux-gpio@vger.kernel.org | ||
10746 | S: Maintained | ||
10747 | F: drivers/gpio/gpio-pxa.c | ||
10748 | |||
10749 | PXA MMCI DRIVER | ||
10750 | S: Orphan | ||
10751 | |||
10752 | PXA RTC DRIVER | ||
10753 | M: Robert Jarzmik <robert.jarzmik@free.fr> | ||
10754 | L: linux-rtc@vger.kernel.org | ||
10755 | S: Maintained | ||
10756 | |||
10744 | PXA2xx/PXA3xx SUPPORT | 10757 | PXA2xx/PXA3xx SUPPORT |
10745 | M: Daniel Mack <daniel@zonque.org> | 10758 | M: Daniel Mack <daniel@zonque.org> |
10746 | M: Haojian Zhuang <haojian.zhuang@gmail.com> | 10759 | M: Haojian Zhuang <haojian.zhuang@gmail.com> |
@@ -10760,36 +10773,12 @@ F: include/sound/pxa2xx-lib.h | |||
10760 | F: sound/arm/pxa* | 10773 | F: sound/arm/pxa* |
10761 | F: sound/soc/pxa/ | 10774 | F: sound/soc/pxa/ |
10762 | 10775 | ||
10763 | PXA GPIO DRIVER | ||
10764 | M: Robert Jarzmik <robert.jarzmik@free.fr> | ||
10765 | L: linux-gpio@vger.kernel.org | ||
10766 | S: Maintained | ||
10767 | F: drivers/gpio/gpio-pxa.c | ||
10768 | |||
10769 | PXA3xx NAND FLASH DRIVER | 10776 | PXA3xx NAND FLASH DRIVER |
10770 | M: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 10777 | M: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> |
10771 | L: linux-mtd@lists.infradead.org | 10778 | L: linux-mtd@lists.infradead.org |
10772 | S: Maintained | 10779 | S: Maintained |
10773 | F: drivers/mtd/nand/pxa3xx_nand.c | 10780 | F: drivers/mtd/nand/pxa3xx_nand.c |
10774 | 10781 | ||
10775 | MMP SUPPORT | ||
10776 | M: Eric Miao <eric.y.miao@gmail.com> | ||
10777 | M: Haojian Zhuang <haojian.zhuang@gmail.com> | ||
10778 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
10779 | T: git git://github.com/hzhuang1/linux.git | ||
10780 | T: git git://git.linaro.org/people/ycmiao/pxa-linux.git | ||
10781 | S: Maintained | ||
10782 | F: arch/arm/boot/dts/mmp* | ||
10783 | F: arch/arm/mach-mmp/ | ||
10784 | |||
10785 | PXA MMCI DRIVER | ||
10786 | S: Orphan | ||
10787 | |||
10788 | PXA RTC DRIVER | ||
10789 | M: Robert Jarzmik <robert.jarzmik@free.fr> | ||
10790 | L: linux-rtc@vger.kernel.org | ||
10791 | S: Maintained | ||
10792 | |||
10793 | QAT DRIVER | 10782 | QAT DRIVER |
10794 | M: Giovanni Cabiddu <giovanni.cabiddu@intel.com> | 10783 | M: Giovanni Cabiddu <giovanni.cabiddu@intel.com> |
10795 | M: Salvatore Benedetto <salvatore.benedetto@intel.com> | 10784 | M: Salvatore Benedetto <salvatore.benedetto@intel.com> |
@@ -10797,12 +10786,56 @@ L: qat-linux@intel.com | |||
10797 | S: Supported | 10786 | S: Supported |
10798 | F: drivers/crypto/qat/ | 10787 | F: drivers/crypto/qat/ |
10799 | 10788 | ||
10789 | QCOM AUDIO (ASoC) DRIVERS | ||
10790 | M: Patrick Lai <plai@codeaurora.org> | ||
10791 | M: Banajit Goswami <bgoswami@codeaurora.org> | ||
10792 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | ||
10793 | S: Supported | ||
10794 | F: sound/soc/qcom/ | ||
10795 | |||
10796 | QEMU MACHINE EMULATOR AND VIRTUALIZER SUPPORT | ||
10797 | M: Gabriel Somlo <somlo@cmu.edu> | ||
10798 | M: "Michael S. Tsirkin" <mst@redhat.com> | ||
10799 | L: qemu-devel@nongnu.org | ||
10800 | S: Maintained | ||
10801 | F: drivers/firmware/qemu_fw_cfg.c | ||
10802 | |||
10800 | QIB DRIVER | 10803 | QIB DRIVER |
10801 | M: Mike Marciniszyn <infinipath@intel.com> | 10804 | M: Mike Marciniszyn <infinipath@intel.com> |
10802 | L: linux-rdma@vger.kernel.org | 10805 | L: linux-rdma@vger.kernel.org |
10803 | S: Supported | 10806 | S: Supported |
10804 | F: drivers/infiniband/hw/qib/ | 10807 | F: drivers/infiniband/hw/qib/ |
10805 | 10808 | ||
10809 | QLOGIC QL41xxx FCOE DRIVER | ||
10810 | M: QLogic-Storage-Upstream@cavium.com | ||
10811 | L: linux-scsi@vger.kernel.org | ||
10812 | S: Supported | ||
10813 | F: drivers/scsi/qedf/ | ||
10814 | |||
10815 | QLOGIC QL41xxx ISCSI DRIVER | ||
10816 | M: QLogic-Storage-Upstream@cavium.com | ||
10817 | L: linux-scsi@vger.kernel.org | ||
10818 | S: Supported | ||
10819 | F: drivers/scsi/qedi/ | ||
10820 | |||
10821 | QLOGIC QL4xxx ETHERNET DRIVER | ||
10822 | M: Yuval Mintz <Yuval.Mintz@cavium.com> | ||
10823 | M: Ariel Elior <Ariel.Elior@cavium.com> | ||
10824 | M: everest-linux-l2@cavium.com | ||
10825 | L: netdev@vger.kernel.org | ||
10826 | S: Supported | ||
10827 | F: drivers/net/ethernet/qlogic/qed/ | ||
10828 | F: include/linux/qed/ | ||
10829 | F: drivers/net/ethernet/qlogic/qede/ | ||
10830 | |||
10831 | QLOGIC QL4xxx RDMA DRIVER | ||
10832 | M: Ram Amrani <Ram.Amrani@cavium.com> | ||
10833 | M: Ariel Elior <Ariel.Elior@cavium.com> | ||
10834 | L: linux-rdma@vger.kernel.org | ||
10835 | S: Supported | ||
10836 | F: drivers/infiniband/hw/qedr/ | ||
10837 | F: include/uapi/rdma/qedr-abi.h | ||
10838 | |||
10806 | QLOGIC QLA1280 SCSI DRIVER | 10839 | QLOGIC QLA1280 SCSI DRIVER |
10807 | M: Michael Reed <mdr@sgi.com> | 10840 | M: Michael Reed <mdr@sgi.com> |
10808 | L: linux-scsi@vger.kernel.org | 10841 | L: linux-scsi@vger.kernel.org |
@@ -10816,13 +10849,6 @@ S: Supported | |||
10816 | F: Documentation/scsi/LICENSE.qla2xxx | 10849 | F: Documentation/scsi/LICENSE.qla2xxx |
10817 | F: drivers/scsi/qla2xxx/ | 10850 | F: drivers/scsi/qla2xxx/ |
10818 | 10851 | ||
10819 | QLOGIC QLA4XXX iSCSI DRIVER | ||
10820 | M: QLogic-Storage-Upstream@qlogic.com | ||
10821 | L: linux-scsi@vger.kernel.org | ||
10822 | S: Supported | ||
10823 | F: Documentation/scsi/LICENSE.qla4xxx | ||
10824 | F: drivers/scsi/qla4xxx/ | ||
10825 | |||
10826 | QLOGIC QLA3XXX NETWORK DRIVER | 10852 | QLOGIC QLA3XXX NETWORK DRIVER |
10827 | M: Dept-GELinuxNICDev@cavium.com | 10853 | M: Dept-GELinuxNICDev@cavium.com |
10828 | L: netdev@vger.kernel.org | 10854 | L: netdev@vger.kernel.org |
@@ -10830,6 +10856,13 @@ S: Supported | |||
10830 | F: Documentation/networking/LICENSE.qla3xxx | 10856 | F: Documentation/networking/LICENSE.qla3xxx |
10831 | F: drivers/net/ethernet/qlogic/qla3xxx.* | 10857 | F: drivers/net/ethernet/qlogic/qla3xxx.* |
10832 | 10858 | ||
10859 | QLOGIC QLA4XXX iSCSI DRIVER | ||
10860 | M: QLogic-Storage-Upstream@qlogic.com | ||
10861 | L: linux-scsi@vger.kernel.org | ||
10862 | S: Supported | ||
10863 | F: Documentation/scsi/LICENSE.qla4xxx | ||
10864 | F: drivers/scsi/qla4xxx/ | ||
10865 | |||
10833 | QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER | 10866 | QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER |
10834 | M: Harish Patil <harish.patil@cavium.com> | 10867 | M: Harish Patil <harish.patil@cavium.com> |
10835 | M: Manish Chopra <manish.chopra@cavium.com> | 10868 | M: Manish Chopra <manish.chopra@cavium.com> |
@@ -10846,28 +10879,6 @@ L: netdev@vger.kernel.org | |||
10846 | S: Supported | 10879 | S: Supported |
10847 | F: drivers/net/ethernet/qlogic/qlge/ | 10880 | F: drivers/net/ethernet/qlogic/qlge/ |
10848 | 10881 | ||
10849 | QLOGIC QL4xxx ETHERNET DRIVER | ||
10850 | M: Yuval Mintz <Yuval.Mintz@cavium.com> | ||
10851 | M: Ariel Elior <Ariel.Elior@cavium.com> | ||
10852 | M: everest-linux-l2@cavium.com | ||
10853 | L: netdev@vger.kernel.org | ||
10854 | S: Supported | ||
10855 | F: drivers/net/ethernet/qlogic/qed/ | ||
10856 | F: include/linux/qed/ | ||
10857 | F: drivers/net/ethernet/qlogic/qede/ | ||
10858 | |||
10859 | QLOGIC QL41xxx ISCSI DRIVER | ||
10860 | M: QLogic-Storage-Upstream@cavium.com | ||
10861 | L: linux-scsi@vger.kernel.org | ||
10862 | S: Supported | ||
10863 | F: drivers/scsi/qedi/ | ||
10864 | |||
10865 | QLOGIC QL41xxx FCOE DRIVER | ||
10866 | M: QLogic-Storage-Upstream@cavium.com | ||
10867 | L: linux-scsi@vger.kernel.org | ||
10868 | S: Supported | ||
10869 | F: drivers/scsi/qedf/ | ||
10870 | |||
10871 | QNX4 FILESYSTEM | 10882 | QNX4 FILESYSTEM |
10872 | M: Anders Larsen <al@alarsen.net> | 10883 | M: Anders Larsen <al@alarsen.net> |
10873 | W: http://www.alarsen.net/linux/qnx4fs/ | 10884 | W: http://www.alarsen.net/linux/qnx4fs/ |
@@ -10894,13 +10905,6 @@ T: git git://linuxtv.org/anttip/media_tree.git | |||
10894 | S: Maintained | 10905 | S: Maintained |
10895 | F: drivers/media/tuners/qt1010* | 10906 | F: drivers/media/tuners/qt1010* |
10896 | 10907 | ||
10897 | QUALCOMM ATHEROS ATH9K WIRELESS DRIVER | ||
10898 | M: QCA ath9k Development <ath9k-devel@qca.qualcomm.com> | ||
10899 | L: linux-wireless@vger.kernel.org | ||
10900 | W: http://wireless.kernel.org/en/users/Drivers/ath9k | ||
10901 | S: Supported | ||
10902 | F: drivers/net/wireless/ath/ath9k/ | ||
10903 | |||
10904 | QUALCOMM ATHEROS ATH10K WIRELESS DRIVER | 10908 | QUALCOMM ATHEROS ATH10K WIRELESS DRIVER |
10905 | M: Kalle Valo <kvalo@qca.qualcomm.com> | 10909 | M: Kalle Valo <kvalo@qca.qualcomm.com> |
10906 | L: ath10k@lists.infradead.org | 10910 | L: ath10k@lists.infradead.org |
@@ -10909,6 +10913,13 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git | |||
10909 | S: Supported | 10913 | S: Supported |
10910 | F: drivers/net/wireless/ath/ath10k/ | 10914 | F: drivers/net/wireless/ath/ath10k/ |
10911 | 10915 | ||
10916 | QUALCOMM ATHEROS ATH9K WIRELESS DRIVER | ||
10917 | M: QCA ath9k Development <ath9k-devel@qca.qualcomm.com> | ||
10918 | L: linux-wireless@vger.kernel.org | ||
10919 | W: http://wireless.kernel.org/en/users/Drivers/ath9k | ||
10920 | S: Supported | ||
10921 | F: drivers/net/wireless/ath/ath9k/ | ||
10922 | |||
10912 | QUALCOMM EMAC GIGABIT ETHERNET DRIVER | 10923 | QUALCOMM EMAC GIGABIT ETHERNET DRIVER |
10913 | M: Timur Tabi <timur@codeaurora.org> | 10924 | M: Timur Tabi <timur@codeaurora.org> |
10914 | L: netdev@vger.kernel.org | 10925 | L: netdev@vger.kernel.org |
@@ -10938,33 +10949,24 @@ T: git git://github.com/KrasnikovEugene/wcn36xx.git | |||
10938 | S: Supported | 10949 | S: Supported |
10939 | F: drivers/net/wireless/ath/wcn36xx/ | 10950 | F: drivers/net/wireless/ath/wcn36xx/ |
10940 | 10951 | ||
10941 | QEMU MACHINE EMULATOR AND VIRTUALIZER SUPPORT | ||
10942 | M: Gabriel Somlo <somlo@cmu.edu> | ||
10943 | M: "Michael S. Tsirkin" <mst@redhat.com> | ||
10944 | L: qemu-devel@nongnu.org | ||
10945 | S: Maintained | ||
10946 | F: drivers/firmware/qemu_fw_cfg.c | ||
10947 | |||
10948 | QUANTENNA QTNFMAC WIRELESS DRIVER | 10952 | QUANTENNA QTNFMAC WIRELESS DRIVER |
10949 | M: Igor Mitsyanko <imitsyanko@quantenna.com> | 10953 | M: Igor Mitsyanko <imitsyanko@quantenna.com> |
10950 | M: Avinash Patil <avinashp@quantenna.com> | 10954 | M: Avinash Patil <avinashp@quantenna.com> |
10951 | M: Sergey Matyukevich <smatyukevich@quantenna.com> | 10955 | M: Sergey Matyukevich <smatyukevich@quantenna.com> |
10952 | L: linux-wireless@vger.kernel.org | 10956 | L: linux-wireless@vger.kernel.org |
10953 | S: Maintained | 10957 | S: Maintained |
10954 | F: drivers/net/wireless/quantenna | 10958 | F: drivers/net/wireless/quantenna |
10955 | 10959 | ||
10956 | RADOS BLOCK DEVICE (RBD) | 10960 | RADEON and AMDGPU DRM DRIVERS |
10957 | M: Ilya Dryomov <idryomov@gmail.com> | 10961 | M: Alex Deucher <alexander.deucher@amd.com> |
10958 | M: Sage Weil <sage@redhat.com> | 10962 | M: Christian König <christian.koenig@amd.com> |
10959 | M: Alex Elder <elder@kernel.org> | 10963 | L: amd-gfx@lists.freedesktop.org |
10960 | L: ceph-devel@vger.kernel.org | 10964 | T: git git://people.freedesktop.org/~agd5f/linux |
10961 | W: http://ceph.com/ | ||
10962 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git | ||
10963 | T: git git://github.com/ceph/ceph-client.git | ||
10964 | S: Supported | 10965 | S: Supported |
10965 | F: Documentation/ABI/testing/sysfs-bus-rbd | 10966 | F: drivers/gpu/drm/radeon/ |
10966 | F: drivers/block/rbd.c | 10967 | F: include/uapi/drm/radeon_drm.h |
10967 | F: drivers/block/rbd_types.h | 10968 | F: drivers/gpu/drm/amd/ |
10969 | F: include/uapi/drm/amdgpu_drm.h | ||
10968 | 10970 | ||
10969 | RADEON FRAMEBUFFER DISPLAY DRIVER | 10971 | RADEON FRAMEBUFFER DISPLAY DRIVER |
10970 | M: Benjamin Herrenschmidt <benh@kernel.crashing.org> | 10972 | M: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
@@ -10988,6 +10990,19 @@ S: Maintained | |||
10988 | F: drivers/media/radio/radio-shark2.c | 10990 | F: drivers/media/radio/radio-shark2.c |
10989 | F: drivers/media/radio/radio-tea5777.c | 10991 | F: drivers/media/radio/radio-tea5777.c |
10990 | 10992 | ||
10993 | RADOS BLOCK DEVICE (RBD) | ||
10994 | M: Ilya Dryomov <idryomov@gmail.com> | ||
10995 | M: Sage Weil <sage@redhat.com> | ||
10996 | M: Alex Elder <elder@kernel.org> | ||
10997 | L: ceph-devel@vger.kernel.org | ||
10998 | W: http://ceph.com/ | ||
10999 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git | ||
11000 | T: git git://github.com/ceph/ceph-client.git | ||
11001 | S: Supported | ||
11002 | F: Documentation/ABI/testing/sysfs-bus-rbd | ||
11003 | F: drivers/block/rbd.c | ||
11004 | F: drivers/block/rbd_types.h | ||
11005 | |||
10991 | RAGE128 FRAMEBUFFER DISPLAY DRIVER | 11006 | RAGE128 FRAMEBUFFER DISPLAY DRIVER |
10992 | M: Paul Mackerras <paulus@samba.org> | 11007 | M: Paul Mackerras <paulus@samba.org> |
10993 | L: linux-fbdev@vger.kernel.org | 11008 | L: linux-fbdev@vger.kernel.org |
@@ -11067,6 +11082,12 @@ L: netdev@vger.kernel.org | |||
11067 | S: Maintained | 11082 | S: Maintained |
11068 | F: drivers/net/ethernet/rdc/r6040.c | 11083 | F: drivers/net/ethernet/rdc/r6040.c |
11069 | 11084 | ||
11085 | RDMAVT - RDMA verbs software | ||
11086 | M: Dennis Dalessandro <dennis.dalessandro@intel.com> | ||
11087 | L: linux-rdma@vger.kernel.org | ||
11088 | S: Supported | ||
11089 | F: drivers/infiniband/sw/rdmavt | ||
11090 | |||
11070 | RDS - RELIABLE DATAGRAM SOCKETS | 11091 | RDS - RELIABLE DATAGRAM SOCKETS |
11071 | M: Santosh Shilimkar <santosh.shilimkar@oracle.com> | 11092 | M: Santosh Shilimkar <santosh.shilimkar@oracle.com> |
11072 | L: netdev@vger.kernel.org | 11093 | L: netdev@vger.kernel.org |
@@ -11077,12 +11098,6 @@ S: Supported | |||
11077 | F: net/rds/ | 11098 | F: net/rds/ |
11078 | F: Documentation/networking/rds.txt | 11099 | F: Documentation/networking/rds.txt |
11079 | 11100 | ||
11080 | RDMAVT - RDMA verbs software | ||
11081 | M: Dennis Dalessandro <dennis.dalessandro@intel.com> | ||
11082 | L: linux-rdma@vger.kernel.org | ||
11083 | S: Supported | ||
11084 | F: drivers/infiniband/sw/rdmavt | ||
11085 | |||
11086 | RDT - RESOURCE ALLOCATION | 11101 | RDT - RESOURCE ALLOCATION |
11087 | M: Fenghua Yu <fenghua.yu@intel.com> | 11102 | M: Fenghua Yu <fenghua.yu@intel.com> |
11088 | L: linux-kernel@vger.kernel.org | 11103 | L: linux-kernel@vger.kernel.org |
@@ -11131,11 +11146,6 @@ S: Maintained | |||
11131 | F: sound/soc/codecs/rt* | 11146 | F: sound/soc/codecs/rt* |
11132 | F: include/sound/rt*.h | 11147 | F: include/sound/rt*.h |
11133 | 11148 | ||
11134 | REISERFS FILE SYSTEM | ||
11135 | L: reiserfs-devel@vger.kernel.org | ||
11136 | S: Supported | ||
11137 | F: fs/reiserfs/ | ||
11138 | |||
11139 | REGISTER MAP ABSTRACTION | 11149 | REGISTER MAP ABSTRACTION |
11140 | M: Mark Brown <broonie@kernel.org> | 11150 | M: Mark Brown <broonie@kernel.org> |
11141 | L: linux-kernel@vger.kernel.org | 11151 | L: linux-kernel@vger.kernel.org |
@@ -11145,6 +11155,11 @@ F: Documentation/devicetree/bindings/regmap/ | |||
11145 | F: drivers/base/regmap/ | 11155 | F: drivers/base/regmap/ |
11146 | F: include/linux/regmap.h | 11156 | F: include/linux/regmap.h |
11147 | 11157 | ||
11158 | REISERFS FILE SYSTEM | ||
11159 | L: reiserfs-devel@vger.kernel.org | ||
11160 | S: Supported | ||
11161 | F: fs/reiserfs/ | ||
11162 | |||
11148 | REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM | 11163 | REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM |
11149 | M: Ohad Ben-Cohen <ohad@wizery.com> | 11164 | M: Ohad Ben-Cohen <ohad@wizery.com> |
11150 | M: Bjorn Andersson <bjorn.andersson@linaro.org> | 11165 | M: Bjorn Andersson <bjorn.andersson@linaro.org> |
@@ -11220,16 +11235,16 @@ S: Maintained | |||
11220 | F: lib/rhashtable.c | 11235 | F: lib/rhashtable.c |
11221 | F: include/linux/rhashtable.h | 11236 | F: include/linux/rhashtable.h |
11222 | 11237 | ||
11223 | RICOH SMARTMEDIA/XD DRIVER | 11238 | RICOH R5C592 MEMORYSTICK DRIVER |
11224 | M: Maxim Levitsky <maximlevitsky@gmail.com> | 11239 | M: Maxim Levitsky <maximlevitsky@gmail.com> |
11225 | S: Maintained | 11240 | S: Maintained |
11226 | F: drivers/mtd/nand/r852.c | 11241 | F: drivers/memstick/host/r592.* |
11227 | F: drivers/mtd/nand/r852.h | ||
11228 | 11242 | ||
11229 | RICOH R5C592 MEMORYSTICK DRIVER | 11243 | RICOH SMARTMEDIA/XD DRIVER |
11230 | M: Maxim Levitsky <maximlevitsky@gmail.com> | 11244 | M: Maxim Levitsky <maximlevitsky@gmail.com> |
11231 | S: Maintained | 11245 | S: Maintained |
11232 | F: drivers/memstick/host/r592.* | 11246 | F: drivers/mtd/nand/r852.c |
11247 | F: drivers/mtd/nand/r852.h | ||
11233 | 11248 | ||
11234 | ROCCAT DRIVERS | 11249 | ROCCAT DRIVERS |
11235 | M: Stefan Achatz <erazor_de@users.sourceforge.net> | 11250 | M: Stefan Achatz <erazor_de@users.sourceforge.net> |
@@ -11366,6 +11381,23 @@ S: Supported | |||
11366 | F: drivers/s390/block/dasd* | 11381 | F: drivers/s390/block/dasd* |
11367 | F: block/partitions/ibm.c | 11382 | F: block/partitions/ibm.c |
11368 | 11383 | ||
11384 | S390 IOMMU (PCI) | ||
11385 | M: Gerald Schaefer <gerald.schaefer@de.ibm.com> | ||
11386 | L: linux-s390@vger.kernel.org | ||
11387 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
11388 | S: Supported | ||
11389 | F: drivers/iommu/s390-iommu.c | ||
11390 | |||
11391 | S390 IUCV NETWORK LAYER | ||
11392 | M: Julian Wiedmann <jwi@linux.vnet.ibm.com> | ||
11393 | M: Ursula Braun <ubraun@linux.vnet.ibm.com> | ||
11394 | L: linux-s390@vger.kernel.org | ||
11395 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
11396 | S: Supported | ||
11397 | F: drivers/s390/net/*iucv* | ||
11398 | F: include/net/iucv/ | ||
11399 | F: net/iucv/ | ||
11400 | |||
11369 | S390 NETWORK DRIVERS | 11401 | S390 NETWORK DRIVERS |
11370 | M: Julian Wiedmann <jwi@linux.vnet.ibm.com> | 11402 | M: Julian Wiedmann <jwi@linux.vnet.ibm.com> |
11371 | M: Ursula Braun <ubraun@linux.vnet.ibm.com> | 11403 | M: Ursula Braun <ubraun@linux.vnet.ibm.com> |
@@ -11383,6 +11415,16 @@ S: Supported | |||
11383 | F: arch/s390/pci/ | 11415 | F: arch/s390/pci/ |
11384 | F: drivers/pci/hotplug/s390_pci_hpc.c | 11416 | F: drivers/pci/hotplug/s390_pci_hpc.c |
11385 | 11417 | ||
11418 | S390 VFIO-CCW DRIVER | ||
11419 | M: Cornelia Huck <cohuck@redhat.com> | ||
11420 | M: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> | ||
11421 | L: linux-s390@vger.kernel.org | ||
11422 | L: kvm@vger.kernel.org | ||
11423 | S: Supported | ||
11424 | F: drivers/s390/cio/vfio_ccw* | ||
11425 | F: Documentation/s390/vfio-ccw.txt | ||
11426 | F: include/uapi/linux/vfio_ccw.h | ||
11427 | |||
11386 | S390 ZCRYPT DRIVER | 11428 | S390 ZCRYPT DRIVER |
11387 | M: Harald Freudenberger <freude@de.ibm.com> | 11429 | M: Harald Freudenberger <freude@de.ibm.com> |
11388 | L: linux-s390@vger.kernel.org | 11430 | L: linux-s390@vger.kernel.org |
@@ -11397,33 +11439,6 @@ W: http://www.ibm.com/developerworks/linux/linux390/ | |||
11397 | S: Supported | 11439 | S: Supported |
11398 | F: drivers/s390/scsi/zfcp_* | 11440 | F: drivers/s390/scsi/zfcp_* |
11399 | 11441 | ||
11400 | S390 IUCV NETWORK LAYER | ||
11401 | M: Julian Wiedmann <jwi@linux.vnet.ibm.com> | ||
11402 | M: Ursula Braun <ubraun@linux.vnet.ibm.com> | ||
11403 | L: linux-s390@vger.kernel.org | ||
11404 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
11405 | S: Supported | ||
11406 | F: drivers/s390/net/*iucv* | ||
11407 | F: include/net/iucv/ | ||
11408 | F: net/iucv/ | ||
11409 | |||
11410 | S390 IOMMU (PCI) | ||
11411 | M: Gerald Schaefer <gerald.schaefer@de.ibm.com> | ||
11412 | L: linux-s390@vger.kernel.org | ||
11413 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
11414 | S: Supported | ||
11415 | F: drivers/iommu/s390-iommu.c | ||
11416 | |||
11417 | S390 VFIO-CCW DRIVER | ||
11418 | M: Cornelia Huck <cohuck@redhat.com> | ||
11419 | M: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> | ||
11420 | L: linux-s390@vger.kernel.org | ||
11421 | L: kvm@vger.kernel.org | ||
11422 | S: Supported | ||
11423 | F: drivers/s390/cio/vfio_ccw* | ||
11424 | F: Documentation/s390/vfio-ccw.txt | ||
11425 | F: include/uapi/linux/vfio_ccw.h | ||
11426 | |||
11427 | S3C24XX SD/MMC Driver | 11442 | S3C24XX SD/MMC Driver |
11428 | M: Ben Dooks <ben-linux@fluff.org> | 11443 | M: Ben Dooks <ben-linux@fluff.org> |
11429 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 11444 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
@@ -11457,12 +11472,6 @@ F: drivers/media/common/saa7146/ | |||
11457 | F: drivers/media/pci/saa7146/ | 11472 | F: drivers/media/pci/saa7146/ |
11458 | F: include/media/saa7146* | 11473 | F: include/media/saa7146* |
11459 | 11474 | ||
11460 | SAMSUNG LAPTOP DRIVER | ||
11461 | M: Corentin Chary <corentin.chary@gmail.com> | ||
11462 | L: platform-driver-x86@vger.kernel.org | ||
11463 | S: Maintained | ||
11464 | F: drivers/platform/x86/samsung-laptop.c | ||
11465 | |||
11466 | SAMSUNG AUDIO (ASoC) DRIVERS | 11475 | SAMSUNG AUDIO (ASoC) DRIVERS |
11467 | M: Krzysztof Kozlowski <krzk@kernel.org> | 11476 | M: Krzysztof Kozlowski <krzk@kernel.org> |
11468 | M: Sangbeom Kim <sbkim73@samsung.com> | 11477 | M: Sangbeom Kim <sbkim73@samsung.com> |
@@ -11485,6 +11494,12 @@ L: linux-fbdev@vger.kernel.org | |||
11485 | S: Maintained | 11494 | S: Maintained |
11486 | F: drivers/video/fbdev/s3c-fb.c | 11495 | F: drivers/video/fbdev/s3c-fb.c |
11487 | 11496 | ||
11497 | SAMSUNG LAPTOP DRIVER | ||
11498 | M: Corentin Chary <corentin.chary@gmail.com> | ||
11499 | L: platform-driver-x86@vger.kernel.org | ||
11500 | S: Maintained | ||
11501 | F: drivers/platform/x86/samsung-laptop.c | ||
11502 | |||
11488 | SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS | 11503 | SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS |
11489 | M: Sangbeom Kim <sbkim73@samsung.com> | 11504 | M: Sangbeom Kim <sbkim73@samsung.com> |
11490 | M: Krzysztof Kozlowski <krzk@kernel.org> | 11505 | M: Krzysztof Kozlowski <krzk@kernel.org> |
@@ -11503,22 +11518,6 @@ F: Documentation/devicetree/bindings/regulator/samsung,s2m*.txt | |||
11503 | F: Documentation/devicetree/bindings/regulator/samsung,s5m*.txt | 11518 | F: Documentation/devicetree/bindings/regulator/samsung,s5m*.txt |
11504 | F: Documentation/devicetree/bindings/clock/samsung,s2mps11.txt | 11519 | F: Documentation/devicetree/bindings/clock/samsung,s2mps11.txt |
11505 | 11520 | ||
11506 | SAMSUNG S5P Security SubSystem (SSS) DRIVER | ||
11507 | M: Krzysztof Kozlowski <krzk@kernel.org> | ||
11508 | M: Vladimir Zapolskiy <vz@mleia.com> | ||
11509 | L: linux-crypto@vger.kernel.org | ||
11510 | L: linux-samsung-soc@vger.kernel.org | ||
11511 | S: Maintained | ||
11512 | F: drivers/crypto/s5p-sss.c | ||
11513 | |||
11514 | SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS | ||
11515 | M: Kyungmin Park <kyungmin.park@samsung.com> | ||
11516 | M: Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
11517 | L: linux-media@vger.kernel.org | ||
11518 | Q: https://patchwork.linuxtv.org/project/linux-media/list/ | ||
11519 | S: Supported | ||
11520 | F: drivers/media/platform/exynos4-is/ | ||
11521 | |||
11522 | SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER | 11521 | SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER |
11523 | M: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> | 11522 | M: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> |
11524 | L: linux-media@vger.kernel.org | 11523 | L: linux-media@vger.kernel.org |
@@ -11527,6 +11526,13 @@ S: Maintained | |||
11527 | F: drivers/media/platform/s3c-camif/ | 11526 | F: drivers/media/platform/s3c-camif/ |
11528 | F: include/media/drv-intf/s3c_camif.h | 11527 | F: include/media/drv-intf/s3c_camif.h |
11529 | 11528 | ||
11529 | SAMSUNG S3FWRN5 NFC DRIVER | ||
11530 | M: Robert Baldyga <r.baldyga@samsung.com> | ||
11531 | M: Krzysztof Opasiak <k.opasiak@samsung.com> | ||
11532 | L: linux-nfc@lists.01.org (moderated for non-subscribers) | ||
11533 | S: Supported | ||
11534 | F: drivers/nfc/s3fwrn5 | ||
11535 | |||
11530 | SAMSUNG S5C73M3 CAMERA DRIVER | 11536 | SAMSUNG S5C73M3 CAMERA DRIVER |
11531 | M: Kyungmin Park <kyungmin.park@samsung.com> | 11537 | M: Kyungmin Park <kyungmin.park@samsung.com> |
11532 | M: Andrzej Hajda <a.hajda@samsung.com> | 11538 | M: Andrzej Hajda <a.hajda@samsung.com> |
@@ -11541,12 +11547,21 @@ L: linux-media@vger.kernel.org | |||
11541 | S: Supported | 11547 | S: Supported |
11542 | F: drivers/media/i2c/s5k5baf.c | 11548 | F: drivers/media/i2c/s5k5baf.c |
11543 | 11549 | ||
11544 | SAMSUNG S3FWRN5 NFC DRIVER | 11550 | SAMSUNG S5P Security SubSystem (SSS) DRIVER |
11545 | M: Robert Baldyga <r.baldyga@samsung.com> | 11551 | M: Krzysztof Kozlowski <krzk@kernel.org> |
11546 | M: Krzysztof Opasiak <k.opasiak@samsung.com> | 11552 | M: Vladimir Zapolskiy <vz@mleia.com> |
11547 | L: linux-nfc@lists.01.org (moderated for non-subscribers) | 11553 | L: linux-crypto@vger.kernel.org |
11554 | L: linux-samsung-soc@vger.kernel.org | ||
11555 | S: Maintained | ||
11556 | F: drivers/crypto/s5p-sss.c | ||
11557 | |||
11558 | SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS | ||
11559 | M: Kyungmin Park <kyungmin.park@samsung.com> | ||
11560 | M: Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
11561 | L: linux-media@vger.kernel.org | ||
11562 | Q: https://patchwork.linuxtv.org/project/linux-media/list/ | ||
11548 | S: Supported | 11563 | S: Supported |
11549 | F: drivers/nfc/s3fwrn5 | 11564 | F: drivers/media/platform/exynos4-is/ |
11550 | 11565 | ||
11551 | SAMSUNG SOC CLOCK DRIVERS | 11566 | SAMSUNG SOC CLOCK DRIVERS |
11552 | M: Sylwester Nawrocki <s.nawrocki@samsung.com> | 11567 | M: Sylwester Nawrocki <s.nawrocki@samsung.com> |
@@ -11599,126 +11614,6 @@ F: drivers/phy/samsung/phy-s5pv210-usb2.c | |||
11599 | F: drivers/phy/samsung/phy-samsung-usb2.c | 11614 | F: drivers/phy/samsung/phy-samsung-usb2.c |
11600 | F: drivers/phy/samsung/phy-samsung-usb2.h | 11615 | F: drivers/phy/samsung/phy-samsung-usb2.h |
11601 | 11616 | ||
11602 | SERIAL DRIVERS | ||
11603 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
11604 | L: linux-serial@vger.kernel.org | ||
11605 | S: Maintained | ||
11606 | F: Documentation/devicetree/bindings/serial/ | ||
11607 | F: drivers/tty/serial/ | ||
11608 | |||
11609 | SERIAL DEVICE BUS | ||
11610 | M: Rob Herring <robh@kernel.org> | ||
11611 | L: linux-serial@vger.kernel.org | ||
11612 | S: Maintained | ||
11613 | F: Documentation/devicetree/bindings/serial/slave-device.txt | ||
11614 | F: drivers/tty/serdev/ | ||
11615 | F: include/linux/serdev.h | ||
11616 | |||
11617 | SERIAL IR RECEIVER | ||
11618 | M: Sean Young <sean@mess.org> | ||
11619 | L: linux-media@vger.kernel.org | ||
11620 | S: Maintained | ||
11621 | F: drivers/media/rc/serial_ir.c | ||
11622 | |||
11623 | STI CEC DRIVER | ||
11624 | M: Benjamin Gaignard <benjamin.gaignard@linaro.org> | ||
11625 | S: Maintained | ||
11626 | F: drivers/staging/media/st-cec/ | ||
11627 | F: Documentation/devicetree/bindings/media/stih-cec.txt | ||
11628 | |||
11629 | SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS | ||
11630 | M: Ursula Braun <ubraun@linux.vnet.ibm.com> | ||
11631 | L: linux-s390@vger.kernel.org | ||
11632 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
11633 | S: Supported | ||
11634 | F: net/smc/ | ||
11635 | |||
11636 | SYNOPSYS DESIGNWARE DMAC DRIVER | ||
11637 | M: Viresh Kumar <vireshk@kernel.org> | ||
11638 | M: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
11639 | S: Maintained | ||
11640 | F: include/linux/dma/dw.h | ||
11641 | F: include/linux/platform_data/dma-dw.h | ||
11642 | F: drivers/dma/dw/ | ||
11643 | |||
11644 | SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET DRIVER | ||
11645 | M: Jie Deng <jiedeng@synopsys.com> | ||
11646 | L: netdev@vger.kernel.org | ||
11647 | S: Supported | ||
11648 | F: drivers/net/ethernet/synopsys/ | ||
11649 | |||
11650 | SYNOPSYS DESIGNWARE I2C DRIVER | ||
11651 | M: Jarkko Nikula <jarkko.nikula@linux.intel.com> | ||
11652 | R: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
11653 | R: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
11654 | L: linux-i2c@vger.kernel.org | ||
11655 | S: Maintained | ||
11656 | F: drivers/i2c/busses/i2c-designware-* | ||
11657 | F: include/linux/platform_data/i2c-designware.h | ||
11658 | |||
11659 | SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER | ||
11660 | M: Jaehoon Chung <jh80.chung@samsung.com> | ||
11661 | L: linux-mmc@vger.kernel.org | ||
11662 | S: Maintained | ||
11663 | F: drivers/mmc/host/dw_mmc* | ||
11664 | |||
11665 | SYSTEM TRACE MODULE CLASS | ||
11666 | M: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
11667 | S: Maintained | ||
11668 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm.git | ||
11669 | F: Documentation/trace/stm.txt | ||
11670 | F: drivers/hwtracing/stm/ | ||
11671 | F: include/linux/stm.h | ||
11672 | F: include/uapi/linux/stm.h | ||
11673 | |||
11674 | TEE SUBSYSTEM | ||
11675 | M: Jens Wiklander <jens.wiklander@linaro.org> | ||
11676 | S: Maintained | ||
11677 | F: include/linux/tee_drv.h | ||
11678 | F: include/uapi/linux/tee.h | ||
11679 | F: drivers/tee/ | ||
11680 | F: Documentation/tee.txt | ||
11681 | |||
11682 | THUNDERBOLT DRIVER | ||
11683 | M: Andreas Noever <andreas.noever@gmail.com> | ||
11684 | M: Michael Jamet <michael.jamet@intel.com> | ||
11685 | M: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
11686 | M: Yehezkel Bernat <yehezkel.bernat@intel.com> | ||
11687 | S: Maintained | ||
11688 | F: drivers/thunderbolt/ | ||
11689 | |||
11690 | TI BQ27XXX POWER SUPPLY DRIVER | ||
11691 | R: Andrew F. Davis <afd@ti.com> | ||
11692 | F: include/linux/power/bq27xxx_battery.h | ||
11693 | F: drivers/power/supply/bq27xxx_battery.c | ||
11694 | F: drivers/power/supply/bq27xxx_battery_i2c.c | ||
11695 | |||
11696 | TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER | ||
11697 | M: John Stultz <john.stultz@linaro.org> | ||
11698 | M: Thomas Gleixner <tglx@linutronix.de> | ||
11699 | R: Stephen Boyd <sboyd@codeaurora.org> | ||
11700 | L: linux-kernel@vger.kernel.org | ||
11701 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core | ||
11702 | S: Supported | ||
11703 | F: include/linux/clocksource.h | ||
11704 | F: include/linux/time.h | ||
11705 | F: include/linux/timex.h | ||
11706 | F: include/uapi/linux/time.h | ||
11707 | F: include/uapi/linux/timex.h | ||
11708 | F: kernel/time/clocksource.c | ||
11709 | F: kernel/time/time*.c | ||
11710 | F: kernel/time/alarmtimer.c | ||
11711 | F: kernel/time/ntp.c | ||
11712 | F: tools/testing/selftests/timers/ | ||
11713 | |||
11714 | TI TRF7970A NFC DRIVER | ||
11715 | M: Mark Greer <mgreer@animalcreek.com> | ||
11716 | L: linux-wireless@vger.kernel.org | ||
11717 | L: linux-nfc@lists.01.org (moderated for non-subscribers) | ||
11718 | S: Supported | ||
11719 | F: drivers/nfc/trf7970a.c | ||
11720 | F: Documentation/devicetree/bindings/net/nfc/trf7970a.txt | ||
11721 | |||
11722 | SC1200 WDT DRIVER | 11617 | SC1200 WDT DRIVER |
11723 | M: Zwane Mwaikambo <zwanem@gmail.com> | 11618 | M: Zwane Mwaikambo <zwanem@gmail.com> |
11724 | S: Maintained | 11619 | S: Maintained |
@@ -11747,16 +11642,6 @@ M: Lubomir Rintel <lkundrak@v3.sk> | |||
11747 | S: Supported | 11642 | S: Supported |
11748 | F: drivers/char/pcmcia/scr24x_cs.c | 11643 | F: drivers/char/pcmcia/scr24x_cs.c |
11749 | 11644 | ||
11750 | SYSTEM CONTROL & POWER INTERFACE (SCPI) Message Protocol drivers | ||
11751 | M: Sudeep Holla <sudeep.holla@arm.com> | ||
11752 | L: linux-arm-kernel@lists.infradead.org | ||
11753 | S: Maintained | ||
11754 | F: Documentation/devicetree/bindings/arm/arm,scpi.txt | ||
11755 | F: drivers/clk/clk-scpi.c | ||
11756 | F: drivers/cpufreq/scpi-cpufreq.c | ||
11757 | F: drivers/firmware/arm_scpi.c | ||
11758 | F: include/linux/scpi_protocol.h | ||
11759 | |||
11760 | SCSI CDROM DRIVER | 11645 | SCSI CDROM DRIVER |
11761 | M: Jens Axboe <axboe@kernel.dk> | 11646 | M: Jens Axboe <axboe@kernel.dk> |
11762 | L: linux-scsi@vger.kernel.org | 11647 | L: linux-scsi@vger.kernel.org |
@@ -11841,14 +11726,6 @@ L: sdricohcs-devel@lists.sourceforge.net (subscribers-only) | |||
11841 | S: Maintained | 11726 | S: Maintained |
11842 | F: drivers/mmc/host/sdricoh_cs.c | 11727 | F: drivers/mmc/host/sdricoh_cs.c |
11843 | 11728 | ||
11844 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER | ||
11845 | M: Adrian Hunter <adrian.hunter@intel.com> | ||
11846 | L: linux-mmc@vger.kernel.org | ||
11847 | T: git git://git.infradead.org/users/ahunter/linux-sdhci.git | ||
11848 | S: Maintained | ||
11849 | F: drivers/mmc/host/sdhci* | ||
11850 | F: include/linux/mmc/sdhci* | ||
11851 | |||
11852 | SECURE COMPUTING | 11729 | SECURE COMPUTING |
11853 | M: Kees Cook <keescook@chromium.org> | 11730 | M: Kees Cook <keescook@chromium.org> |
11854 | R: Andy Lutomirski <luto@amacapital.net> | 11731 | R: Andy Lutomirski <luto@amacapital.net> |
@@ -11871,6 +11748,14 @@ L: bcm-kernel-feedback-list@broadcom.com | |||
11871 | S: Maintained | 11748 | S: Maintained |
11872 | F: drivers/mmc/host/sdhci-brcmstb* | 11749 | F: drivers/mmc/host/sdhci-brcmstb* |
11873 | 11750 | ||
11751 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER | ||
11752 | M: Adrian Hunter <adrian.hunter@intel.com> | ||
11753 | L: linux-mmc@vger.kernel.org | ||
11754 | T: git git://git.infradead.org/users/ahunter/linux-sdhci.git | ||
11755 | S: Maintained | ||
11756 | F: drivers/mmc/host/sdhci* | ||
11757 | F: include/linux/mmc/sdhci* | ||
11758 | |||
11874 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER | 11759 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER |
11875 | M: Ben Dooks <ben-linux@fluff.org> | 11760 | M: Ben Dooks <ben-linux@fluff.org> |
11876 | M: Jaehoon Chung <jh80.chung@samsung.com> | 11761 | M: Jaehoon Chung <jh80.chung@samsung.com> |
@@ -11895,6 +11780,10 @@ F: block/opal_proto.h | |||
11895 | F: include/linux/sed* | 11780 | F: include/linux/sed* |
11896 | F: include/uapi/linux/sed* | 11781 | F: include/uapi/linux/sed* |
11897 | 11782 | ||
11783 | SECURITY CONTACT | ||
11784 | M: Security Officers <security@kernel.org> | ||
11785 | S: Supported | ||
11786 | |||
11898 | SECURITY SUBSYSTEM | 11787 | SECURITY SUBSYSTEM |
11899 | M: James Morris <james.l.morris@oracle.com> | 11788 | M: James Morris <james.l.morris@oracle.com> |
11900 | M: "Serge E. Hallyn" <serge@hallyn.com> | 11789 | M: "Serge E. Hallyn" <serge@hallyn.com> |
@@ -11904,10 +11793,6 @@ W: http://kernsec.org/ | |||
11904 | S: Supported | 11793 | S: Supported |
11905 | F: security/ | 11794 | F: security/ |
11906 | 11795 | ||
11907 | SECURITY CONTACT | ||
11908 | M: Security Officers <security@kernel.org> | ||
11909 | S: Supported | ||
11910 | |||
11911 | SELINUX SECURITY MODULE | 11796 | SELINUX SECURITY MODULE |
11912 | M: Paul Moore <paul@paul-moore.com> | 11797 | M: Paul Moore <paul@paul-moore.com> |
11913 | M: Stephen Smalley <sds@tycho.nsa.gov> | 11798 | M: Stephen Smalley <sds@tycho.nsa.gov> |
@@ -11921,62 +11806,32 @@ F: security/selinux/ | |||
11921 | F: scripts/selinux/ | 11806 | F: scripts/selinux/ |
11922 | F: Documentation/admin-guide/LSM/SELinux.rst | 11807 | F: Documentation/admin-guide/LSM/SELinux.rst |
11923 | 11808 | ||
11924 | APPARMOR SECURITY MODULE | ||
11925 | M: John Johansen <john.johansen@canonical.com> | ||
11926 | L: apparmor@lists.ubuntu.com (subscribers-only, general discussion) | ||
11927 | W: apparmor.wiki.kernel.org | ||
11928 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jj/apparmor-dev.git | ||
11929 | S: Supported | ||
11930 | F: security/apparmor/ | ||
11931 | F: Documentation/admin-guide/LSM/apparmor.rst | ||
11932 | |||
11933 | LOADPIN SECURITY MODULE | ||
11934 | M: Kees Cook <keescook@chromium.org> | ||
11935 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git lsm/loadpin | ||
11936 | S: Supported | ||
11937 | F: security/loadpin/ | ||
11938 | F: Documentation/admin-guide/LSM/LoadPin.rst | ||
11939 | |||
11940 | YAMA SECURITY MODULE | ||
11941 | M: Kees Cook <keescook@chromium.org> | ||
11942 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git yama/tip | ||
11943 | S: Supported | ||
11944 | F: security/yama/ | ||
11945 | F: Documentation/admin-guide/LSM/Yama.rst | ||
11946 | |||
11947 | SENSABLE PHANTOM | 11809 | SENSABLE PHANTOM |
11948 | M: Jiri Slaby <jirislaby@gmail.com> | 11810 | M: Jiri Slaby <jirislaby@gmail.com> |
11949 | S: Maintained | 11811 | S: Maintained |
11950 | F: drivers/misc/phantom.c | 11812 | F: drivers/misc/phantom.c |
11951 | F: include/uapi/linux/phantom.h | 11813 | F: include/uapi/linux/phantom.h |
11952 | 11814 | ||
11953 | Emulex 10Gbps iSCSI - OneConnect DRIVER | 11815 | SERIAL DEVICE BUS |
11954 | M: Subbu Seetharaman <subbu.seetharaman@broadcom.com> | 11816 | M: Rob Herring <robh@kernel.org> |
11955 | M: Ketan Mukadam <ketan.mukadam@broadcom.com> | 11817 | L: linux-serial@vger.kernel.org |
11956 | M: Jitendra Bhivare <jitendra.bhivare@broadcom.com> | 11818 | S: Maintained |
11957 | L: linux-scsi@vger.kernel.org | 11819 | F: Documentation/devicetree/bindings/serial/slave-device.txt |
11958 | W: http://www.broadcom.com | 11820 | F: drivers/tty/serdev/ |
11959 | S: Supported | 11821 | F: include/linux/serdev.h |
11960 | F: drivers/scsi/be2iscsi/ | ||
11961 | 11822 | ||
11962 | Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER (be2net) | 11823 | SERIAL DRIVERS |
11963 | M: Sathya Perla <sathya.perla@broadcom.com> | 11824 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
11964 | M: Ajit Khaparde <ajit.khaparde@broadcom.com> | 11825 | L: linux-serial@vger.kernel.org |
11965 | M: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> | 11826 | S: Maintained |
11966 | M: Somnath Kotur <somnath.kotur@broadcom.com> | 11827 | F: Documentation/devicetree/bindings/serial/ |
11967 | L: netdev@vger.kernel.org | 11828 | F: drivers/tty/serial/ |
11968 | W: http://www.emulex.com | ||
11969 | S: Supported | ||
11970 | F: drivers/net/ethernet/emulex/benet/ | ||
11971 | 11829 | ||
11972 | EMULEX ONECONNECT ROCE DRIVER | 11830 | SERIAL IR RECEIVER |
11973 | M: Selvin Xavier <selvin.xavier@broadcom.com> | 11831 | M: Sean Young <sean@mess.org> |
11974 | M: Devesh Sharma <devesh.sharma@broadcom.com> | 11832 | L: linux-media@vger.kernel.org |
11975 | L: linux-rdma@vger.kernel.org | 11833 | S: Maintained |
11976 | W: http://www.broadcom.com | 11834 | F: drivers/media/rc/serial_ir.c |
11977 | S: Odd Fixes | ||
11978 | F: drivers/infiniband/hw/ocrdma/ | ||
11979 | F: include/uapi/rdma/ocrdma-abi.h | ||
11980 | 11835 | ||
11981 | SFC NETWORK DRIVER | 11836 | SFC NETWORK DRIVER |
11982 | M: Solarflare linux maintainers <linux-net-drivers@solarflare.com> | 11837 | M: Solarflare linux maintainers <linux-net-drivers@solarflare.com> |
@@ -12005,6 +11860,24 @@ M: Robin Holt <robinmholt@gmail.com> | |||
12005 | S: Maintained | 11860 | S: Maintained |
12006 | F: drivers/misc/sgi-xp/ | 11861 | F: drivers/misc/sgi-xp/ |
12007 | 11862 | ||
11863 | SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS | ||
11864 | M: Ursula Braun <ubraun@linux.vnet.ibm.com> | ||
11865 | L: linux-s390@vger.kernel.org | ||
11866 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
11867 | S: Supported | ||
11868 | F: net/smc/ | ||
11869 | |||
11870 | SH_VEU V4L2 MEM2MEM DRIVER | ||
11871 | L: linux-media@vger.kernel.org | ||
11872 | S: Orphan | ||
11873 | F: drivers/media/platform/sh_veu.c | ||
11874 | |||
11875 | SH_VOU V4L2 OUTPUT DRIVER | ||
11876 | L: linux-media@vger.kernel.org | ||
11877 | S: Orphan | ||
11878 | F: drivers/media/platform/sh_vou.c | ||
11879 | F: include/media/drv-intf/sh_vou.h | ||
11880 | |||
12008 | SI2157 MEDIA DRIVER | 11881 | SI2157 MEDIA DRIVER |
12009 | M: Antti Palosaari <crope@iki.fi> | 11882 | M: Antti Palosaari <crope@iki.fi> |
12010 | L: linux-media@vger.kernel.org | 11883 | L: linux-media@vger.kernel.org |
@@ -12087,24 +11960,14 @@ S: Maintained | |||
12087 | F: drivers/input/touchscreen/silead.c | 11960 | F: drivers/input/touchscreen/silead.c |
12088 | F: drivers/platform/x86/silead_dmi.c | 11961 | F: drivers/platform/x86/silead_dmi.c |
12089 | 11962 | ||
12090 | SIMPLEFB FB DRIVER | 11963 | SILICON MOTION SM712 FRAME BUFFER DRIVER |
12091 | M: Hans de Goede <hdegoede@redhat.com> | 11964 | M: Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
11965 | M: Teddy Wang <teddy.wang@siliconmotion.com> | ||
11966 | M: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> | ||
12092 | L: linux-fbdev@vger.kernel.org | 11967 | L: linux-fbdev@vger.kernel.org |
12093 | S: Maintained | 11968 | S: Maintained |
12094 | F: Documentation/devicetree/bindings/display/simple-framebuffer.txt | 11969 | F: drivers/video/fbdev/sm712* |
12095 | F: drivers/video/fbdev/simplefb.c | 11970 | F: Documentation/fb/sm712fb.txt |
12096 | F: include/linux/platform_data/simplefb.h | ||
12097 | |||
12098 | SH_VEU V4L2 MEM2MEM DRIVER | ||
12099 | L: linux-media@vger.kernel.org | ||
12100 | S: Orphan | ||
12101 | F: drivers/media/platform/sh_veu.c | ||
12102 | |||
12103 | SH_VOU V4L2 OUTPUT DRIVER | ||
12104 | L: linux-media@vger.kernel.org | ||
12105 | S: Orphan | ||
12106 | F: drivers/media/platform/sh_vou.c | ||
12107 | F: include/media/drv-intf/sh_vou.h | ||
12108 | 11971 | ||
12109 | SIMPLE FIRMWARE INTERFACE (SFI) | 11972 | SIMPLE FIRMWARE INTERFACE (SFI) |
12110 | M: Len Brown <lenb@kernel.org> | 11973 | M: Len Brown <lenb@kernel.org> |
@@ -12116,6 +11979,14 @@ F: arch/x86/platform/sfi/ | |||
12116 | F: drivers/sfi/ | 11979 | F: drivers/sfi/ |
12117 | F: include/linux/sfi*.h | 11980 | F: include/linux/sfi*.h |
12118 | 11981 | ||
11982 | SIMPLEFB FB DRIVER | ||
11983 | M: Hans de Goede <hdegoede@redhat.com> | ||
11984 | L: linux-fbdev@vger.kernel.org | ||
11985 | S: Maintained | ||
11986 | F: Documentation/devicetree/bindings/display/simple-framebuffer.txt | ||
11987 | F: drivers/video/fbdev/simplefb.c | ||
11988 | F: include/linux/platform_data/simplefb.h | ||
11989 | |||
12119 | SIMTEC EB110ATX (Chalice CATS) | 11990 | SIMTEC EB110ATX (Chalice CATS) |
12120 | P: Ben Dooks | 11991 | P: Ben Dooks |
12121 | P: Vincent Sanders <vince@simtec.co.uk> | 11992 | P: Vincent Sanders <vince@simtec.co.uk> |
@@ -12140,61 +12011,6 @@ F: lib/siphash.c | |||
12140 | F: lib/test_siphash.c | 12011 | F: lib/test_siphash.c |
12141 | F: include/linux/siphash.h | 12012 | F: include/linux/siphash.h |
12142 | 12013 | ||
12143 | TI DAVINCI MACHINE SUPPORT | ||
12144 | M: Sekhar Nori <nsekhar@ti.com> | ||
12145 | M: Kevin Hilman <khilman@kernel.org> | ||
12146 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
12147 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git | ||
12148 | S: Supported | ||
12149 | F: arch/arm/mach-davinci/ | ||
12150 | F: drivers/i2c/busses/i2c-davinci.c | ||
12151 | F: arch/arm/boot/dts/da850* | ||
12152 | |||
12153 | TI DAVINCI SERIES MEDIA DRIVER | ||
12154 | M: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> | ||
12155 | L: linux-media@vger.kernel.org | ||
12156 | W: https://linuxtv.org | ||
12157 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
12158 | T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git | ||
12159 | S: Maintained | ||
12160 | F: drivers/media/platform/davinci/ | ||
12161 | F: include/media/davinci/ | ||
12162 | |||
12163 | TI DAVINCI SERIES GPIO DRIVER | ||
12164 | M: Keerthy <j-keerthy@ti.com> | ||
12165 | L: linux-gpio@vger.kernel.org | ||
12166 | S: Maintained | ||
12167 | F: Documentation/devicetree/bindings/gpio/gpio-davinci.txt | ||
12168 | F: drivers/gpio/gpio-davinci.c | ||
12169 | |||
12170 | TI AM437X VPFE DRIVER | ||
12171 | M: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> | ||
12172 | L: linux-media@vger.kernel.org | ||
12173 | W: https://linuxtv.org | ||
12174 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
12175 | T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git | ||
12176 | S: Maintained | ||
12177 | F: drivers/media/platform/am437x/ | ||
12178 | |||
12179 | OV2659 OMNIVISION SENSOR DRIVER | ||
12180 | M: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> | ||
12181 | L: linux-media@vger.kernel.org | ||
12182 | W: https://linuxtv.org | ||
12183 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
12184 | T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git | ||
12185 | S: Maintained | ||
12186 | F: drivers/media/i2c/ov2659.c | ||
12187 | F: include/media/i2c/ov2659.h | ||
12188 | |||
12189 | SILICON MOTION SM712 FRAME BUFFER DRIVER | ||
12190 | M: Sudip Mukherjee <sudipm.mukherjee@gmail.com> | ||
12191 | M: Teddy Wang <teddy.wang@siliconmotion.com> | ||
12192 | M: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> | ||
12193 | L: linux-fbdev@vger.kernel.org | ||
12194 | S: Maintained | ||
12195 | F: drivers/video/fbdev/sm712* | ||
12196 | F: Documentation/fb/sm712fb.txt | ||
12197 | |||
12198 | SIS 190 ETHERNET DRIVER | 12014 | SIS 190 ETHERNET DRIVER |
12199 | M: Francois Romieu <romieu@fr.zoreil.com> | 12015 | M: Francois Romieu <romieu@fr.zoreil.com> |
12200 | L: netdev@vger.kernel.org | 12016 | L: netdev@vger.kernel.org |
@@ -12255,14 +12071,6 @@ S: Maintained | |||
12255 | F: Documentation/admin-guide/LSM/Smack.rst | 12071 | F: Documentation/admin-guide/LSM/Smack.rst |
12256 | F: security/smack/ | 12072 | F: security/smack/ |
12257 | 12073 | ||
12258 | DRIVERS FOR ADAPTIVE VOLTAGE SCALING (AVS) | ||
12259 | M: Kevin Hilman <khilman@kernel.org> | ||
12260 | M: Nishanth Menon <nm@ti.com> | ||
12261 | S: Maintained | ||
12262 | F: drivers/power/avs/ | ||
12263 | F: include/linux/power/smartreflex.h | ||
12264 | L: linux-pm@vger.kernel.org | ||
12265 | |||
12266 | SMC91x ETHERNET DRIVER | 12074 | SMC91x ETHERNET DRIVER |
12267 | M: Nicolas Pitre <nico@fluxnic.net> | 12075 | M: Nicolas Pitre <nico@fluxnic.net> |
12268 | S: Odd Fixes | 12076 | S: Odd Fixes |
@@ -12300,6 +12108,12 @@ S: Supported | |||
12300 | F: Documentation/hwmon/sch5627 | 12108 | F: Documentation/hwmon/sch5627 |
12301 | F: drivers/hwmon/sch5627.c | 12109 | F: drivers/hwmon/sch5627.c |
12302 | 12110 | ||
12111 | SMSC UFX6000 and UFX7000 USB to VGA DRIVER | ||
12112 | M: Steve Glendinning <steve.glendinning@shawell.net> | ||
12113 | L: linux-fbdev@vger.kernel.org | ||
12114 | S: Maintained | ||
12115 | F: drivers/video/fbdev/smscufx.c | ||
12116 | |||
12303 | SMSC47B397 HARDWARE MONITOR DRIVER | 12117 | SMSC47B397 HARDWARE MONITOR DRIVER |
12304 | M: Jean Delvare <jdelvare@suse.com> | 12118 | M: Jean Delvare <jdelvare@suse.com> |
12305 | L: linux-hwmon@vger.kernel.org | 12119 | L: linux-hwmon@vger.kernel.org |
@@ -12320,12 +12134,6 @@ L: netdev@vger.kernel.org | |||
12320 | S: Maintained | 12134 | S: Maintained |
12321 | F: drivers/net/ethernet/smsc/smsc9420.* | 12135 | F: drivers/net/ethernet/smsc/smsc9420.* |
12322 | 12136 | ||
12323 | SMSC UFX6000 and UFX7000 USB to VGA DRIVER | ||
12324 | M: Steve Glendinning <steve.glendinning@shawell.net> | ||
12325 | L: linux-fbdev@vger.kernel.org | ||
12326 | S: Maintained | ||
12327 | F: drivers/video/fbdev/smscufx.c | ||
12328 | |||
12329 | SOC-CAMERA V4L2 SUBSYSTEM | 12137 | SOC-CAMERA V4L2 SUBSYSTEM |
12330 | M: Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 12138 | M: Guennadi Liakhovetski <g.liakhovetski@gmx.de> |
12331 | L: linux-media@vger.kernel.org | 12139 | L: linux-media@vger.kernel.org |
@@ -12340,6 +12148,15 @@ M: Chris Boot <bootc@bootc.net> | |||
12340 | S: Maintained | 12148 | S: Maintained |
12341 | F: drivers/leds/leds-net48xx.c | 12149 | F: drivers/leds/leds-net48xx.c |
12342 | 12150 | ||
12151 | SOFT-ROCE DRIVER (rxe) | ||
12152 | M: Moni Shoua <monis@mellanox.com> | ||
12153 | L: linux-rdma@vger.kernel.org | ||
12154 | S: Supported | ||
12155 | W: https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home | ||
12156 | Q: http://patchwork.kernel.org/project/linux-rdma/list/ | ||
12157 | F: drivers/infiniband/sw/rxe/ | ||
12158 | F: include/uapi/rdma/rdma_user_rxe.h | ||
12159 | |||
12343 | SOFTLOGIC 6x10 MPEG CODEC | 12160 | SOFTLOGIC 6x10 MPEG CODEC |
12344 | M: Bluecherry Maintainers <maintainers@bluecherrydvr.com> | 12161 | M: Bluecherry Maintainers <maintainers@bluecherrydvr.com> |
12345 | M: Anton Sviridenko <anton@corp.bluecherry.net> | 12162 | M: Anton Sviridenko <anton@corp.bluecherry.net> |
@@ -12372,16 +12189,6 @@ S: Maintained | |||
12372 | F: drivers/ssb/ | 12189 | F: drivers/ssb/ |
12373 | F: include/linux/ssb/ | 12190 | F: include/linux/ssb/ |
12374 | 12191 | ||
12375 | SONY VAIO CONTROL DEVICE DRIVER | ||
12376 | M: Mattia Dongili <malattia@linux.it> | ||
12377 | L: platform-driver-x86@vger.kernel.org | ||
12378 | W: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers | ||
12379 | S: Maintained | ||
12380 | F: Documentation/laptops/sony-laptop.txt | ||
12381 | F: drivers/char/sonypi.c | ||
12382 | F: drivers/platform/x86/sony-laptop.c | ||
12383 | F: include/linux/sony-laptop.h | ||
12384 | |||
12385 | SONY MEMORYSTICK CARD SUPPORT | 12192 | SONY MEMORYSTICK CARD SUPPORT |
12386 | M: Alex Dubov <oakad@yahoo.com> | 12193 | M: Alex Dubov <oakad@yahoo.com> |
12387 | W: http://tifmxx.berlios.de/ | 12194 | W: http://tifmxx.berlios.de/ |
@@ -12393,6 +12200,16 @@ M: Maxim Levitsky <maximlevitsky@gmail.com> | |||
12393 | S: Maintained | 12200 | S: Maintained |
12394 | F: drivers/memstick/core/ms_block.* | 12201 | F: drivers/memstick/core/ms_block.* |
12395 | 12202 | ||
12203 | SONY VAIO CONTROL DEVICE DRIVER | ||
12204 | M: Mattia Dongili <malattia@linux.it> | ||
12205 | L: platform-driver-x86@vger.kernel.org | ||
12206 | W: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers | ||
12207 | S: Maintained | ||
12208 | F: Documentation/laptops/sony-laptop.txt | ||
12209 | F: drivers/char/sonypi.c | ||
12210 | F: drivers/platform/x86/sony-laptop.c | ||
12211 | F: include/linux/sony-laptop.h | ||
12212 | |||
12396 | SOUND | 12213 | SOUND |
12397 | M: Jaroslav Kysela <perex@perex.cz> | 12214 | M: Jaroslav Kysela <perex@perex.cz> |
12398 | M: Takashi Iwai <tiwai@suse.com> | 12215 | M: Takashi Iwai <tiwai@suse.com> |
@@ -12418,6 +12235,13 @@ F: include/uapi/sound/compress_* | |||
12418 | F: sound/core/compress_offload.c | 12235 | F: sound/core/compress_offload.c |
12419 | F: sound/soc/soc-compress.c | 12236 | F: sound/soc/soc-compress.c |
12420 | 12237 | ||
12238 | SOUND - DMAENGINE HELPERS | ||
12239 | M: Lars-Peter Clausen <lars@metafoo.de> | ||
12240 | S: Supported | ||
12241 | F: include/sound/dmaengine_pcm.h | ||
12242 | F: sound/core/pcm_dmaengine.c | ||
12243 | F: sound/soc/soc-generic-dmaengine-pcm.c | ||
12244 | |||
12421 | SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC) | 12245 | SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC) |
12422 | M: Liam Girdwood <lgirdwood@gmail.com> | 12246 | M: Liam Girdwood <lgirdwood@gmail.com> |
12423 | M: Mark Brown <broonie@kernel.org> | 12247 | M: Mark Brown <broonie@kernel.org> |
@@ -12430,13 +12254,6 @@ F: Documentation/sound/alsa/soc/ | |||
12430 | F: sound/soc/ | 12254 | F: sound/soc/ |
12431 | F: include/sound/soc* | 12255 | F: include/sound/soc* |
12432 | 12256 | ||
12433 | SOUND - DMAENGINE HELPERS | ||
12434 | M: Lars-Peter Clausen <lars@metafoo.de> | ||
12435 | S: Supported | ||
12436 | F: include/sound/dmaengine_pcm.h | ||
12437 | F: sound/core/pcm_dmaengine.c | ||
12438 | F: sound/soc/soc-generic-dmaengine-pcm.c | ||
12439 | |||
12440 | SP2 MEDIA DRIVER | 12257 | SP2 MEDIA DRIVER |
12441 | M: Olli Salonen <olli.salonen@iki.fi> | 12258 | M: Olli Salonen <olli.salonen@iki.fi> |
12442 | L: linux-media@vger.kernel.org | 12259 | L: linux-media@vger.kernel.org |
@@ -12479,21 +12296,21 @@ T: git git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git | |||
12479 | S: Maintained | 12296 | S: Maintained |
12480 | F: include/linux/compiler.h | 12297 | F: include/linux/compiler.h |
12481 | 12298 | ||
12482 | SPEAR PLATFORM SUPPORT | 12299 | SPEAR CLOCK FRAMEWORK SUPPORT |
12483 | M: Viresh Kumar <vireshk@kernel.org> | 12300 | M: Viresh Kumar <vireshk@kernel.org> |
12484 | M: Shiraz Hashim <shiraz.linux.kernel@gmail.com> | ||
12485 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 12301 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
12486 | W: http://www.st.com/spear | 12302 | W: http://www.st.com/spear |
12487 | S: Maintained | 12303 | S: Maintained |
12488 | F: arch/arm/boot/dts/spear* | 12304 | F: drivers/clk/spear/ |
12489 | F: arch/arm/mach-spear/ | ||
12490 | 12305 | ||
12491 | SPEAR CLOCK FRAMEWORK SUPPORT | 12306 | SPEAR PLATFORM SUPPORT |
12492 | M: Viresh Kumar <vireshk@kernel.org> | 12307 | M: Viresh Kumar <vireshk@kernel.org> |
12308 | M: Shiraz Hashim <shiraz.linux.kernel@gmail.com> | ||
12493 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 12309 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
12494 | W: http://www.st.com/spear | 12310 | W: http://www.st.com/spear |
12495 | S: Maintained | 12311 | S: Maintained |
12496 | F: drivers/clk/spear/ | 12312 | F: arch/arm/boot/dts/spear* |
12313 | F: arch/arm/mach-spear/ | ||
12497 | 12314 | ||
12498 | SPI NOR SUBSYSTEM | 12315 | SPI NOR SUBSYSTEM |
12499 | M: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr> | 12316 | M: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr> |
@@ -12527,6 +12344,15 @@ S: Supported | |||
12527 | F: Documentation/networking/spider_net.txt | 12344 | F: Documentation/networking/spider_net.txt |
12528 | F: drivers/net/ethernet/toshiba/spider_net* | 12345 | F: drivers/net/ethernet/toshiba/spider_net* |
12529 | 12346 | ||
12347 | SPMI SUBSYSTEM | ||
12348 | R: Stephen Boyd <sboyd@codeaurora.org> | ||
12349 | L: linux-arm-msm@vger.kernel.org | ||
12350 | F: Documentation/devicetree/bindings/spmi/ | ||
12351 | F: drivers/spmi/ | ||
12352 | F: include/dt-bindings/spmi/spmi.h | ||
12353 | F: include/linux/spmi.h | ||
12354 | F: include/trace/events/spmi.h | ||
12355 | |||
12530 | SPU FILE SYSTEM | 12356 | SPU FILE SYSTEM |
12531 | M: Jeremy Kerr <jk@ozlabs.org> | 12357 | M: Jeremy Kerr <jk@ozlabs.org> |
12532 | L: linuxppc-dev@lists.ozlabs.org | 12358 | L: linuxppc-dev@lists.ozlabs.org |
@@ -12555,13 +12381,6 @@ L: stable@vger.kernel.org | |||
12555 | S: Supported | 12381 | S: Supported |
12556 | F: Documentation/process/stable-kernel-rules.rst | 12382 | F: Documentation/process/stable-kernel-rules.rst |
12557 | 12383 | ||
12558 | STAGING SUBSYSTEM | ||
12559 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
12560 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git | ||
12561 | L: devel@driverdev.osuosl.org | ||
12562 | S: Supported | ||
12563 | F: drivers/staging/ | ||
12564 | |||
12565 | STAGING - COMEDI | 12384 | STAGING - COMEDI |
12566 | M: Ian Abbott <abbotti@mev.co.uk> | 12385 | M: Ian Abbott <abbotti@mev.co.uk> |
12567 | M: H Hartley Sweeten <hsweeten@visionengravers.com> | 12386 | M: H Hartley Sweeten <hsweeten@visionengravers.com> |
@@ -12651,11 +12470,39 @@ M: Arnaud Patard <arnaud.patard@rtp-net.org> | |||
12651 | S: Odd Fixes | 12470 | S: Odd Fixes |
12652 | F: drivers/staging/xgifb/ | 12471 | F: drivers/staging/xgifb/ |
12653 | 12472 | ||
12473 | STAGING SUBSYSTEM | ||
12474 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
12475 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git | ||
12476 | L: devel@driverdev.osuosl.org | ||
12477 | S: Supported | ||
12478 | F: drivers/staging/ | ||
12479 | |||
12654 | STARFIRE/DURALAN NETWORK DRIVER | 12480 | STARFIRE/DURALAN NETWORK DRIVER |
12655 | M: Ion Badulescu <ionut@badula.org> | 12481 | M: Ion Badulescu <ionut@badula.org> |
12656 | S: Odd Fixes | 12482 | S: Odd Fixes |
12657 | F: drivers/net/ethernet/adaptec/starfire* | 12483 | F: drivers/net/ethernet/adaptec/starfire* |
12658 | 12484 | ||
12485 | STI CEC DRIVER | ||
12486 | M: Benjamin Gaignard <benjamin.gaignard@linaro.org> | ||
12487 | S: Maintained | ||
12488 | F: drivers/staging/media/st-cec/ | ||
12489 | F: Documentation/devicetree/bindings/media/stih-cec.txt | ||
12490 | |||
12491 | STK1160 USB VIDEO CAPTURE DRIVER | ||
12492 | M: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> | ||
12493 | L: linux-media@vger.kernel.org | ||
12494 | T: git git://linuxtv.org/media_tree.git | ||
12495 | S: Maintained | ||
12496 | F: drivers/media/usb/stk1160/ | ||
12497 | |||
12498 | STMMAC ETHERNET DRIVER | ||
12499 | M: Giuseppe Cavallaro <peppe.cavallaro@st.com> | ||
12500 | M: Alexandre Torgue <alexandre.torgue@st.com> | ||
12501 | L: netdev@vger.kernel.org | ||
12502 | W: http://www.stlinux.com | ||
12503 | S: Supported | ||
12504 | F: drivers/net/ethernet/stmicro/stmmac/ | ||
12505 | |||
12659 | SUN3/3X | 12506 | SUN3/3X |
12660 | M: Sam Creasey <sammy@sammy.net> | 12507 | M: Sam Creasey <sammy@sammy.net> |
12661 | W: http://sammy.net/sun3/ | 12508 | W: http://sammy.net/sun3/ |
@@ -12727,6 +12574,20 @@ S: Supported | |||
12727 | F: net/switchdev/ | 12574 | F: net/switchdev/ |
12728 | F: include/net/switchdev.h | 12575 | F: include/net/switchdev.h |
12729 | 12576 | ||
12577 | SYNC FILE FRAMEWORK | ||
12578 | M: Sumit Semwal <sumit.semwal@linaro.org> | ||
12579 | R: Gustavo Padovan <gustavo@padovan.org> | ||
12580 | S: Maintained | ||
12581 | L: linux-media@vger.kernel.org | ||
12582 | L: dri-devel@lists.freedesktop.org | ||
12583 | F: drivers/dma-buf/sync_* | ||
12584 | F: drivers/dma-buf/dma-fence* | ||
12585 | F: drivers/dma-buf/sw_sync.c | ||
12586 | F: include/linux/sync_file.h | ||
12587 | F: include/uapi/linux/sync_file.h | ||
12588 | F: Documentation/sync_file.txt | ||
12589 | T: git git://anongit.freedesktop.org/drm/drm-misc | ||
12590 | |||
12730 | SYNOPSYS ARC ARCHITECTURE | 12591 | SYNOPSYS ARC ARCHITECTURE |
12731 | M: Vineet Gupta <vgupta@synopsys.com> | 12592 | M: Vineet Gupta <vgupta@synopsys.com> |
12732 | L: linux-snps-arc@lists.infradead.org | 12593 | L: linux-snps-arc@lists.infradead.org |
@@ -12745,6 +12606,35 @@ F: arch/arc/plat-axs10x | |||
12745 | F: arch/arc/boot/dts/ax* | 12606 | F: arch/arc/boot/dts/ax* |
12746 | F: Documentation/devicetree/bindings/arc/axs10* | 12607 | F: Documentation/devicetree/bindings/arc/axs10* |
12747 | 12608 | ||
12609 | SYNOPSYS DESIGNWARE DMAC DRIVER | ||
12610 | M: Viresh Kumar <vireshk@kernel.org> | ||
12611 | M: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
12612 | S: Maintained | ||
12613 | F: include/linux/dma/dw.h | ||
12614 | F: include/linux/platform_data/dma-dw.h | ||
12615 | F: drivers/dma/dw/ | ||
12616 | |||
12617 | SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET DRIVER | ||
12618 | M: Jie Deng <jiedeng@synopsys.com> | ||
12619 | L: netdev@vger.kernel.org | ||
12620 | S: Supported | ||
12621 | F: drivers/net/ethernet/synopsys/ | ||
12622 | |||
12623 | SYNOPSYS DESIGNWARE I2C DRIVER | ||
12624 | M: Jarkko Nikula <jarkko.nikula@linux.intel.com> | ||
12625 | R: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
12626 | R: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
12627 | L: linux-i2c@vger.kernel.org | ||
12628 | S: Maintained | ||
12629 | F: drivers/i2c/busses/i2c-designware-* | ||
12630 | F: include/linux/platform_data/i2c-designware.h | ||
12631 | |||
12632 | SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER | ||
12633 | M: Jaehoon Chung <jh80.chung@samsung.com> | ||
12634 | L: linux-mmc@vger.kernel.org | ||
12635 | S: Maintained | ||
12636 | F: drivers/mmc/host/dw_mmc* | ||
12637 | |||
12748 | SYSTEM CONFIGURATION (SYSCON) | 12638 | SYSTEM CONFIGURATION (SYSCON) |
12749 | M: Lee Jones <lee.jones@linaro.org> | 12639 | M: Lee Jones <lee.jones@linaro.org> |
12750 | M: Arnd Bergmann <arnd@arndb.de> | 12640 | M: Arnd Bergmann <arnd@arndb.de> |
@@ -12752,6 +12642,16 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git | |||
12752 | S: Supported | 12642 | S: Supported |
12753 | F: drivers/mfd/syscon.c | 12643 | F: drivers/mfd/syscon.c |
12754 | 12644 | ||
12645 | SYSTEM CONTROL & POWER INTERFACE (SCPI) Message Protocol drivers | ||
12646 | M: Sudeep Holla <sudeep.holla@arm.com> | ||
12647 | L: linux-arm-kernel@lists.infradead.org | ||
12648 | S: Maintained | ||
12649 | F: Documentation/devicetree/bindings/arm/arm,scpi.txt | ||
12650 | F: drivers/clk/clk-scpi.c | ||
12651 | F: drivers/cpufreq/scpi-cpufreq.c | ||
12652 | F: drivers/firmware/arm_scpi.c | ||
12653 | F: include/linux/scpi_protocol.h | ||
12654 | |||
12755 | SYSTEM RESET/SHUTDOWN DRIVERS | 12655 | SYSTEM RESET/SHUTDOWN DRIVERS |
12756 | M: Sebastian Reichel <sre@kernel.org> | 12656 | M: Sebastian Reichel <sre@kernel.org> |
12757 | L: linux-pm@vger.kernel.org | 12657 | L: linux-pm@vger.kernel.org |
@@ -12760,6 +12660,15 @@ S: Maintained | |||
12760 | F: Documentation/devicetree/bindings/power/reset/ | 12660 | F: Documentation/devicetree/bindings/power/reset/ |
12761 | F: drivers/power/reset/ | 12661 | F: drivers/power/reset/ |
12762 | 12662 | ||
12663 | SYSTEM TRACE MODULE CLASS | ||
12664 | M: Alexander Shishkin <alexander.shishkin@linux.intel.com> | ||
12665 | S: Maintained | ||
12666 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm.git | ||
12667 | F: Documentation/trace/stm.txt | ||
12668 | F: drivers/hwtracing/stm/ | ||
12669 | F: include/linux/stm.h | ||
12670 | F: include/uapi/linux/stm.h | ||
12671 | |||
12763 | SYSV FILESYSTEM | 12672 | SYSV FILESYSTEM |
12764 | M: Christoph Hellwig <hch@infradead.org> | 12673 | M: Christoph Hellwig <hch@infradead.org> |
12765 | S: Maintained | 12674 | S: Maintained |
@@ -12929,6 +12838,14 @@ L: linux-media@vger.kernel.org | |||
12929 | S: Maintained | 12838 | S: Maintained |
12930 | F: drivers/media/rc/ttusbir.c | 12839 | F: drivers/media/rc/ttusbir.c |
12931 | 12840 | ||
12841 | TEE SUBSYSTEM | ||
12842 | M: Jens Wiklander <jens.wiklander@linaro.org> | ||
12843 | S: Maintained | ||
12844 | F: include/linux/tee_drv.h | ||
12845 | F: include/uapi/linux/tee.h | ||
12846 | F: drivers/tee/ | ||
12847 | F: Documentation/tee.txt | ||
12848 | |||
12932 | TEGRA ARCHITECTURE SUPPORT | 12849 | TEGRA ARCHITECTURE SUPPORT |
12933 | M: Thierry Reding <thierry.reding@gmail.com> | 12850 | M: Thierry Reding <thierry.reding@gmail.com> |
12934 | M: Jonathan Hunter <jonathanh@nvidia.com> | 12851 | M: Jonathan Hunter <jonathanh@nvidia.com> |
@@ -13060,6 +12977,23 @@ T: git git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git | |||
13060 | S: Maintained | 12977 | S: Maintained |
13061 | F: drivers/platform/x86/thinkpad_acpi.c | 12978 | F: drivers/platform/x86/thinkpad_acpi.c |
13062 | 12979 | ||
12980 | THUNDERBOLT DRIVER | ||
12981 | M: Andreas Noever <andreas.noever@gmail.com> | ||
12982 | M: Michael Jamet <michael.jamet@intel.com> | ||
12983 | M: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
12984 | M: Yehezkel Bernat <yehezkel.bernat@intel.com> | ||
12985 | S: Maintained | ||
12986 | F: drivers/thunderbolt/ | ||
12987 | |||
12988 | TI AM437X VPFE DRIVER | ||
12989 | M: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> | ||
12990 | L: linux-media@vger.kernel.org | ||
12991 | W: https://linuxtv.org | ||
12992 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
12993 | T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git | ||
12994 | S: Maintained | ||
12995 | F: drivers/media/platform/am437x/ | ||
12996 | |||
13063 | TI BANDGAP AND THERMAL DRIVER | 12997 | TI BANDGAP AND THERMAL DRIVER |
13064 | M: Eduardo Valentin <edubezval@gmail.com> | 12998 | M: Eduardo Valentin <edubezval@gmail.com> |
13065 | M: Keerthy <j-keerthy@ti.com> | 12999 | M: Keerthy <j-keerthy@ti.com> |
@@ -13068,13 +13002,11 @@ L: linux-omap@vger.kernel.org | |||
13068 | S: Maintained | 13002 | S: Maintained |
13069 | F: drivers/thermal/ti-soc-thermal/ | 13003 | F: drivers/thermal/ti-soc-thermal/ |
13070 | 13004 | ||
13071 | TI VPE/CAL DRIVERS | 13005 | TI BQ27XXX POWER SUPPLY DRIVER |
13072 | M: Benoit Parrot <bparrot@ti.com> | 13006 | R: Andrew F. Davis <afd@ti.com> |
13073 | L: linux-media@vger.kernel.org | 13007 | F: include/linux/power/bq27xxx_battery.h |
13074 | W: http://linuxtv.org/ | 13008 | F: drivers/power/supply/bq27xxx_battery.c |
13075 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | 13009 | F: drivers/power/supply/bq27xxx_battery_i2c.c |
13076 | S: Maintained | ||
13077 | F: drivers/media/platform/ti-vpe/ | ||
13078 | 13010 | ||
13079 | TI CDCE706 CLOCK DRIVER | 13011 | TI CDCE706 CLOCK DRIVER |
13080 | M: Max Filippov <jcmvbkbc@gmail.com> | 13012 | M: Max Filippov <jcmvbkbc@gmail.com> |
@@ -13088,6 +13020,33 @@ S: Maintained | |||
13088 | F: drivers/clk/ti/ | 13020 | F: drivers/clk/ti/ |
13089 | F: include/linux/clk/ti.h | 13021 | F: include/linux/clk/ti.h |
13090 | 13022 | ||
13023 | TI DAVINCI MACHINE SUPPORT | ||
13024 | M: Sekhar Nori <nsekhar@ti.com> | ||
13025 | M: Kevin Hilman <khilman@kernel.org> | ||
13026 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | ||
13027 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git | ||
13028 | S: Supported | ||
13029 | F: arch/arm/mach-davinci/ | ||
13030 | F: drivers/i2c/busses/i2c-davinci.c | ||
13031 | F: arch/arm/boot/dts/da850* | ||
13032 | |||
13033 | TI DAVINCI SERIES GPIO DRIVER | ||
13034 | M: Keerthy <j-keerthy@ti.com> | ||
13035 | L: linux-gpio@vger.kernel.org | ||
13036 | S: Maintained | ||
13037 | F: Documentation/devicetree/bindings/gpio/gpio-davinci.txt | ||
13038 | F: drivers/gpio/gpio-davinci.c | ||
13039 | |||
13040 | TI DAVINCI SERIES MEDIA DRIVER | ||
13041 | M: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> | ||
13042 | L: linux-media@vger.kernel.org | ||
13043 | W: https://linuxtv.org | ||
13044 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
13045 | T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git | ||
13046 | S: Maintained | ||
13047 | F: drivers/media/platform/davinci/ | ||
13048 | F: include/media/davinci/ | ||
13049 | |||
13091 | TI ETHERNET SWITCH DRIVER (CPSW) | 13050 | TI ETHERNET SWITCH DRIVER (CPSW) |
13092 | R: Grygorii Strashko <grygorii.strashko@ti.com> | 13051 | R: Grygorii Strashko <grygorii.strashko@ti.com> |
13093 | L: linux-omap@vger.kernel.org | 13052 | L: linux-omap@vger.kernel.org |
@@ -13111,7 +13070,6 @@ S: Maintained | |||
13111 | F: drivers/soc/ti/* | 13070 | F: drivers/soc/ti/* |
13112 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git | 13071 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git |
13113 | 13072 | ||
13114 | |||
13115 | TI LM49xxx FAMILY ASoC CODEC DRIVERS | 13073 | TI LM49xxx FAMILY ASoC CODEC DRIVERS |
13116 | M: M R Swami Reddy <mr.swami.reddy@ti.com> | 13074 | M: M R Swami Reddy <mr.swami.reddy@ti.com> |
13117 | M: Vishwas A Deshpande <vishwas.a.deshpande@ti.com> | 13075 | M: Vishwas A Deshpande <vishwas.a.deshpande@ti.com> |
@@ -13156,12 +13114,28 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |||
13156 | S: Odd Fixes | 13114 | S: Odd Fixes |
13157 | F: sound/soc/codecs/tas571x* | 13115 | F: sound/soc/codecs/tas571x* |
13158 | 13116 | ||
13117 | TI TRF7970A NFC DRIVER | ||
13118 | M: Mark Greer <mgreer@animalcreek.com> | ||
13119 | L: linux-wireless@vger.kernel.org | ||
13120 | L: linux-nfc@lists.01.org (moderated for non-subscribers) | ||
13121 | S: Supported | ||
13122 | F: drivers/nfc/trf7970a.c | ||
13123 | F: Documentation/devicetree/bindings/net/nfc/trf7970a.txt | ||
13124 | |||
13159 | TI TWL4030 SERIES SOC CODEC DRIVER | 13125 | TI TWL4030 SERIES SOC CODEC DRIVER |
13160 | M: Peter Ujfalusi <peter.ujfalusi@ti.com> | 13126 | M: Peter Ujfalusi <peter.ujfalusi@ti.com> |
13161 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | 13127 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
13162 | S: Maintained | 13128 | S: Maintained |
13163 | F: sound/soc/codecs/twl4030* | 13129 | F: sound/soc/codecs/twl4030* |
13164 | 13130 | ||
13131 | TI VPE/CAL DRIVERS | ||
13132 | M: Benoit Parrot <bparrot@ti.com> | ||
13133 | L: linux-media@vger.kernel.org | ||
13134 | W: http://linuxtv.org/ | ||
13135 | Q: http://patchwork.linuxtv.org/project/linux-media/list/ | ||
13136 | S: Maintained | ||
13137 | F: drivers/media/platform/ti-vpe/ | ||
13138 | |||
13165 | TI WILINK WIRELESS DRIVERS | 13139 | TI WILINK WIRELESS DRIVERS |
13166 | L: linux-wireless@vger.kernel.org | 13140 | L: linux-wireless@vger.kernel.org |
13167 | W: http://wireless.kernel.org/en/users/Drivers/wl12xx | 13141 | W: http://wireless.kernel.org/en/users/Drivers/wl12xx |
@@ -13171,16 +13145,6 @@ S: Orphan | |||
13171 | F: drivers/net/wireless/ti/ | 13145 | F: drivers/net/wireless/ti/ |
13172 | F: include/linux/wl12xx.h | 13146 | F: include/linux/wl12xx.h |
13173 | 13147 | ||
13174 | TIPC NETWORK LAYER | ||
13175 | M: Jon Maloy <jon.maloy@ericsson.com> | ||
13176 | M: Ying Xue <ying.xue@windriver.com> | ||
13177 | L: netdev@vger.kernel.org (core kernel code) | ||
13178 | L: tipc-discussion@lists.sourceforge.net (user apps, general discussion) | ||
13179 | W: http://tipc.sourceforge.net/ | ||
13180 | S: Maintained | ||
13181 | F: include/uapi/linux/tipc*.h | ||
13182 | F: net/tipc/ | ||
13183 | |||
13184 | TILE ARCHITECTURE | 13148 | TILE ARCHITECTURE |
13185 | M: Chris Metcalf <cmetcalf@mellanox.com> | 13149 | M: Chris Metcalf <cmetcalf@mellanox.com> |
13186 | W: http://www.mellanox.com/repository/solutions/tile-scm/ | 13150 | W: http://www.mellanox.com/repository/solutions/tile-scm/ |
@@ -13196,6 +13160,34 @@ F: drivers/tty/serial/tilegx.c | |||
13196 | F: drivers/usb/host/*-tilegx.c | 13160 | F: drivers/usb/host/*-tilegx.c |
13197 | F: include/linux/usb/tilegx.h | 13161 | F: include/linux/usb/tilegx.h |
13198 | 13162 | ||
13163 | TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER | ||
13164 | M: John Stultz <john.stultz@linaro.org> | ||
13165 | M: Thomas Gleixner <tglx@linutronix.de> | ||
13166 | R: Stephen Boyd <sboyd@codeaurora.org> | ||
13167 | L: linux-kernel@vger.kernel.org | ||
13168 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core | ||
13169 | S: Supported | ||
13170 | F: include/linux/clocksource.h | ||
13171 | F: include/linux/time.h | ||
13172 | F: include/linux/timex.h | ||
13173 | F: include/uapi/linux/time.h | ||
13174 | F: include/uapi/linux/timex.h | ||
13175 | F: kernel/time/clocksource.c | ||
13176 | F: kernel/time/time*.c | ||
13177 | F: kernel/time/alarmtimer.c | ||
13178 | F: kernel/time/ntp.c | ||
13179 | F: tools/testing/selftests/timers/ | ||
13180 | |||
13181 | TIPC NETWORK LAYER | ||
13182 | M: Jon Maloy <jon.maloy@ericsson.com> | ||
13183 | M: Ying Xue <ying.xue@windriver.com> | ||
13184 | L: netdev@vger.kernel.org (core kernel code) | ||
13185 | L: tipc-discussion@lists.sourceforge.net (user apps, general discussion) | ||
13186 | W: http://tipc.sourceforge.net/ | ||
13187 | S: Maintained | ||
13188 | F: include/uapi/linux/tipc*.h | ||
13189 | F: net/tipc/ | ||
13190 | |||
13199 | TLAN NETWORK DRIVER | 13191 | TLAN NETWORK DRIVER |
13200 | M: Samuel Chessman <chessman@tux.org> | 13192 | M: Samuel Chessman <chessman@tux.org> |
13201 | L: tlan-devel@lists.sourceforge.net (subscribers-only) | 13193 | L: tlan-devel@lists.sourceforge.net (subscribers-only) |
@@ -13204,6 +13196,38 @@ S: Maintained | |||
13204 | F: Documentation/networking/tlan.txt | 13196 | F: Documentation/networking/tlan.txt |
13205 | F: drivers/net/ethernet/ti/tlan.* | 13197 | F: drivers/net/ethernet/ti/tlan.* |
13206 | 13198 | ||
13199 | TM6000 VIDEO4LINUX DRIVER | ||
13200 | M: Mauro Carvalho Chehab <mchehab@s-opensource.com> | ||
13201 | M: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
13202 | L: linux-media@vger.kernel.org | ||
13203 | W: https://linuxtv.org | ||
13204 | T: git git://linuxtv.org/media_tree.git | ||
13205 | S: Odd fixes | ||
13206 | F: drivers/media/usb/tm6000/ | ||
13207 | F: Documentation/media/v4l-drivers/tm6000* | ||
13208 | |||
13209 | TMIO/SDHI MMC DRIVER | ||
13210 | M: Wolfram Sang <wsa+renesas@sang-engineering.com> | ||
13211 | L: linux-mmc@vger.kernel.org | ||
13212 | S: Supported | ||
13213 | F: drivers/mmc/host/tmio_mmc* | ||
13214 | F: drivers/mmc/host/renesas_sdhi* | ||
13215 | F: include/linux/mfd/tmio.h | ||
13216 | |||
13217 | TMP401 HARDWARE MONITOR DRIVER | ||
13218 | M: Guenter Roeck <linux@roeck-us.net> | ||
13219 | L: linux-hwmon@vger.kernel.org | ||
13220 | S: Maintained | ||
13221 | F: Documentation/hwmon/tmp401 | ||
13222 | F: drivers/hwmon/tmp401.c | ||
13223 | |||
13224 | TMPFS (SHMEM FILESYSTEM) | ||
13225 | M: Hugh Dickins <hughd@google.com> | ||
13226 | L: linux-mm@kvack.org | ||
13227 | S: Maintained | ||
13228 | F: include/linux/shmem_fs.h | ||
13229 | F: mm/shmem.c | ||
13230 | |||
13207 | TOMOYO SECURITY MODULE | 13231 | TOMOYO SECURITY MODULE |
13208 | M: Kentaro Takeda <takedakn@nttdata.co.jp> | 13232 | M: Kentaro Takeda <takedakn@nttdata.co.jp> |
13209 | M: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 13233 | M: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> |
@@ -13240,12 +13264,6 @@ L: platform-driver-x86@vger.kernel.org | |||
13240 | S: Maintained | 13264 | S: Maintained |
13241 | F: drivers/platform/x86/toshiba_haps.c | 13265 | F: drivers/platform/x86/toshiba_haps.c |
13242 | 13266 | ||
13243 | TOSHIBA WMI HOTKEYS DRIVER | ||
13244 | M: Azael Avalos <coproscefalo@gmail.com> | ||
13245 | L: platform-driver-x86@vger.kernel.org | ||
13246 | S: Maintained | ||
13247 | F: drivers/platform/x86/toshiba-wmi.c | ||
13248 | |||
13249 | TOSHIBA SMM DRIVER | 13267 | TOSHIBA SMM DRIVER |
13250 | M: Jonathan Buzzard <jonathan@buzzard.org.uk> | 13268 | M: Jonathan Buzzard <jonathan@buzzard.org.uk> |
13251 | W: http://www.buzzard.org.uk/toshiba/ | 13269 | W: http://www.buzzard.org.uk/toshiba/ |
@@ -13261,62 +13279,11 @@ S: Maintained | |||
13261 | F: drivers/media/i2c/tc358743* | 13279 | F: drivers/media/i2c/tc358743* |
13262 | F: include/media/i2c/tc358743.h | 13280 | F: include/media/i2c/tc358743.h |
13263 | 13281 | ||
13264 | TMIO/SDHI MMC DRIVER | 13282 | TOSHIBA WMI HOTKEYS DRIVER |
13265 | M: Wolfram Sang <wsa+renesas@sang-engineering.com> | 13283 | M: Azael Avalos <coproscefalo@gmail.com> |
13266 | L: linux-mmc@vger.kernel.org | 13284 | L: platform-driver-x86@vger.kernel.org |
13267 | S: Supported | ||
13268 | F: drivers/mmc/host/tmio_mmc* | ||
13269 | F: drivers/mmc/host/renesas_sdhi* | ||
13270 | F: include/linux/mfd/tmio.h | ||
13271 | |||
13272 | TMP401 HARDWARE MONITOR DRIVER | ||
13273 | M: Guenter Roeck <linux@roeck-us.net> | ||
13274 | L: linux-hwmon@vger.kernel.org | ||
13275 | S: Maintained | ||
13276 | F: Documentation/hwmon/tmp401 | ||
13277 | F: drivers/hwmon/tmp401.c | ||
13278 | |||
13279 | TMPFS (SHMEM FILESYSTEM) | ||
13280 | M: Hugh Dickins <hughd@google.com> | ||
13281 | L: linux-mm@kvack.org | ||
13282 | S: Maintained | ||
13283 | F: include/linux/shmem_fs.h | ||
13284 | F: mm/shmem.c | ||
13285 | |||
13286 | TM6000 VIDEO4LINUX DRIVER | ||
13287 | M: Mauro Carvalho Chehab <mchehab@s-opensource.com> | ||
13288 | M: Mauro Carvalho Chehab <mchehab@kernel.org> | ||
13289 | L: linux-media@vger.kernel.org | ||
13290 | W: https://linuxtv.org | ||
13291 | T: git git://linuxtv.org/media_tree.git | ||
13292 | S: Odd fixes | ||
13293 | F: drivers/media/usb/tm6000/ | ||
13294 | F: Documentation/media/v4l-drivers/tm6000* | ||
13295 | |||
13296 | TW5864 VIDEO4LINUX DRIVER | ||
13297 | M: Bluecherry Maintainers <maintainers@bluecherrydvr.com> | ||
13298 | M: Anton Sviridenko <anton@corp.bluecherry.net> | ||
13299 | M: Andrey Utkin <andrey.utkin@corp.bluecherry.net> | ||
13300 | M: Andrey Utkin <andrey_utkin@fastmail.com> | ||
13301 | L: linux-media@vger.kernel.org | ||
13302 | S: Supported | ||
13303 | F: drivers/media/pci/tw5864/ | ||
13304 | |||
13305 | TW68 VIDEO4LINUX DRIVER | ||
13306 | M: Hans Verkuil <hverkuil@xs4all.nl> | ||
13307 | L: linux-media@vger.kernel.org | ||
13308 | T: git git://linuxtv.org/media_tree.git | ||
13309 | W: https://linuxtv.org | ||
13310 | S: Odd Fixes | ||
13311 | F: drivers/media/pci/tw68/ | ||
13312 | |||
13313 | TW686X VIDEO4LINUX DRIVER | ||
13314 | M: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> | ||
13315 | L: linux-media@vger.kernel.org | ||
13316 | T: git git://linuxtv.org/media_tree.git | ||
13317 | W: http://linuxtv.org | ||
13318 | S: Maintained | 13285 | S: Maintained |
13319 | F: drivers/media/pci/tw686x/ | 13286 | F: drivers/platform/x86/toshiba-wmi.c |
13320 | 13287 | ||
13321 | TPM DEVICE DRIVER | 13288 | TPM DEVICE DRIVER |
13322 | M: Peter Huewe <peterhuewe@gmx.de> | 13289 | M: Peter Huewe <peterhuewe@gmx.de> |
@@ -13418,6 +13385,31 @@ S: Maintained | |||
13418 | F: drivers/tc/ | 13385 | F: drivers/tc/ |
13419 | F: include/linux/tc.h | 13386 | F: include/linux/tc.h |
13420 | 13387 | ||
13388 | TW5864 VIDEO4LINUX DRIVER | ||
13389 | M: Bluecherry Maintainers <maintainers@bluecherrydvr.com> | ||
13390 | M: Anton Sviridenko <anton@corp.bluecherry.net> | ||
13391 | M: Andrey Utkin <andrey.utkin@corp.bluecherry.net> | ||
13392 | M: Andrey Utkin <andrey_utkin@fastmail.com> | ||
13393 | L: linux-media@vger.kernel.org | ||
13394 | S: Supported | ||
13395 | F: drivers/media/pci/tw5864/ | ||
13396 | |||
13397 | TW68 VIDEO4LINUX DRIVER | ||
13398 | M: Hans Verkuil <hverkuil@xs4all.nl> | ||
13399 | L: linux-media@vger.kernel.org | ||
13400 | T: git git://linuxtv.org/media_tree.git | ||
13401 | W: https://linuxtv.org | ||
13402 | S: Odd Fixes | ||
13403 | F: drivers/media/pci/tw68/ | ||
13404 | |||
13405 | TW686X VIDEO4LINUX DRIVER | ||
13406 | M: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> | ||
13407 | L: linux-media@vger.kernel.org | ||
13408 | T: git git://linuxtv.org/media_tree.git | ||
13409 | W: http://linuxtv.org | ||
13410 | S: Maintained | ||
13411 | F: drivers/media/pci/tw686x/ | ||
13412 | |||
13421 | UBI FILE SYSTEM (UBIFS) | 13413 | UBI FILE SYSTEM (UBIFS) |
13422 | M: Richard Weinberger <richard@nod.at> | 13414 | M: Richard Weinberger <richard@nod.at> |
13423 | M: Artem Bityutskiy <dedekind1@gmail.com> | 13415 | M: Artem Bityutskiy <dedekind1@gmail.com> |
@@ -13467,6 +13459,13 @@ S: Maintained | |||
13467 | F: drivers/hid/uhid.c | 13459 | F: drivers/hid/uhid.c |
13468 | F: include/uapi/linux/uhid.h | 13460 | F: include/uapi/linux/uhid.h |
13469 | 13461 | ||
13462 | ULPI BUS | ||
13463 | M: Heikki Krogerus <heikki.krogerus@linux.intel.com> | ||
13464 | L: linux-usb@vger.kernel.org | ||
13465 | S: Maintained | ||
13466 | F: drivers/usb/common/ulpi.c | ||
13467 | F: include/linux/ulpi/ | ||
13468 | |||
13470 | ULTRA-WIDEBAND (UWB) SUBSYSTEM: | 13469 | ULTRA-WIDEBAND (UWB) SUBSYSTEM: |
13471 | L: linux-usb@vger.kernel.org | 13470 | L: linux-usb@vger.kernel.org |
13472 | S: Orphan | 13471 | S: Orphan |
@@ -13527,6 +13526,14 @@ F: drivers/mtd/ubi/ | |||
13527 | F: include/linux/mtd/ubi.h | 13526 | F: include/linux/mtd/ubi.h |
13528 | F: include/uapi/mtd/ubi-user.h | 13527 | F: include/uapi/mtd/ubi-user.h |
13529 | 13528 | ||
13529 | USB "USBNET" DRIVER FRAMEWORK | ||
13530 | M: Oliver Neukum <oneukum@suse.com> | ||
13531 | L: netdev@vger.kernel.org | ||
13532 | W: http://www.linux-usb.org/usbnet | ||
13533 | S: Maintained | ||
13534 | F: drivers/net/usb/usbnet.c | ||
13535 | F: include/linux/usb/usbnet.h | ||
13536 | |||
13530 | USB ACM DRIVER | 13537 | USB ACM DRIVER |
13531 | M: Oliver Neukum <oneukum@suse.com> | 13538 | M: Oliver Neukum <oneukum@suse.com> |
13532 | L: linux-usb@vger.kernel.org | 13539 | L: linux-usb@vger.kernel.org |
@@ -13750,14 +13757,6 @@ L: linux-usb@vger.kernel.org | |||
13750 | S: Maintained | 13757 | S: Maintained |
13751 | F: drivers/usb/host/uhci* | 13758 | F: drivers/usb/host/uhci* |
13752 | 13759 | ||
13753 | USB "USBNET" DRIVER FRAMEWORK | ||
13754 | M: Oliver Neukum <oneukum@suse.com> | ||
13755 | L: netdev@vger.kernel.org | ||
13756 | W: http://www.linux-usb.org/usbnet | ||
13757 | S: Maintained | ||
13758 | F: drivers/net/usb/usbnet.c | ||
13759 | F: include/linux/usb/usbnet.h | ||
13760 | |||
13761 | USB VIDEO CLASS | 13760 | USB VIDEO CLASS |
13762 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 13761 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
13763 | L: linux-uvc-devel@lists.sourceforge.net (subscribers-only) | 13762 | L: linux-uvc-devel@lists.sourceforge.net (subscribers-only) |
@@ -13812,13 +13811,6 @@ S: Maintained | |||
13812 | F: Documentation/media/v4l-drivers/zr364xx* | 13811 | F: Documentation/media/v4l-drivers/zr364xx* |
13813 | F: drivers/media/usb/zr364xx/ | 13812 | F: drivers/media/usb/zr364xx/ |
13814 | 13813 | ||
13815 | ULPI BUS | ||
13816 | M: Heikki Krogerus <heikki.krogerus@linux.intel.com> | ||
13817 | L: linux-usb@vger.kernel.org | ||
13818 | S: Maintained | ||
13819 | F: drivers/usb/common/ulpi.c | ||
13820 | F: include/linux/ulpi/ | ||
13821 | |||
13822 | USER-MODE LINUX (UML) | 13814 | USER-MODE LINUX (UML) |
13823 | M: Jeff Dike <jdike@addtoit.com> | 13815 | M: Jeff Dike <jdike@addtoit.com> |
13824 | M: Richard Weinberger <richard@nod.at> | 13816 | M: Richard Weinberger <richard@nod.at> |
@@ -13912,6 +13904,37 @@ F: drivers/gpu/vga/vga_switcheroo.c | |||
13912 | F: include/linux/vga_switcheroo.h | 13904 | F: include/linux/vga_switcheroo.h |
13913 | T: git git://anongit.freedesktop.org/drm/drm-misc | 13905 | T: git git://anongit.freedesktop.org/drm/drm-misc |
13914 | 13906 | ||
13907 | VIA RHINE NETWORK DRIVER | ||
13908 | S: Orphan | ||
13909 | F: drivers/net/ethernet/via/via-rhine.c | ||
13910 | |||
13911 | VIA SD/MMC CARD CONTROLLER DRIVER | ||
13912 | M: Bruce Chang <brucechang@via.com.tw> | ||
13913 | M: Harald Welte <HaraldWelte@viatech.com> | ||
13914 | S: Maintained | ||
13915 | F: drivers/mmc/host/via-sdmmc.c | ||
13916 | |||
13917 | VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER | ||
13918 | M: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | ||
13919 | L: linux-fbdev@vger.kernel.org | ||
13920 | S: Maintained | ||
13921 | F: include/linux/via-core.h | ||
13922 | F: include/linux/via-gpio.h | ||
13923 | F: include/linux/via_i2c.h | ||
13924 | F: drivers/video/fbdev/via/ | ||
13925 | |||
13926 | VIA VELOCITY NETWORK DRIVER | ||
13927 | M: Francois Romieu <romieu@fr.zoreil.com> | ||
13928 | L: netdev@vger.kernel.org | ||
13929 | S: Maintained | ||
13930 | F: drivers/net/ethernet/via/via-velocity.* | ||
13931 | |||
13932 | VIDEO MULTIPLEXER DRIVER | ||
13933 | M: Philipp Zabel <p.zabel@pengutronix.de> | ||
13934 | L: linux-media@vger.kernel.org | ||
13935 | S: Maintained | ||
13936 | F: drivers/media/platform/video-mux.c | ||
13937 | |||
13915 | VIDEOBUF2 FRAMEWORK | 13938 | VIDEOBUF2 FRAMEWORK |
13916 | M: Pawel Osciak <pawel@osciak.com> | 13939 | M: Pawel Osciak <pawel@osciak.com> |
13917 | M: Marek Szyprowski <m.szyprowski@samsung.com> | 13940 | M: Marek Szyprowski <m.szyprowski@samsung.com> |
@@ -13921,11 +13944,20 @@ S: Maintained | |||
13921 | F: drivers/media/v4l2-core/videobuf2-* | 13944 | F: drivers/media/v4l2-core/videobuf2-* |
13922 | F: include/media/videobuf2-* | 13945 | F: include/media/videobuf2-* |
13923 | 13946 | ||
13924 | VIDEO MULTIPLEXER DRIVER | 13947 | VIMC VIRTUAL MEDIA CONTROLLER DRIVER |
13925 | M: Philipp Zabel <p.zabel@pengutronix.de> | 13948 | M: Helen Koike <helen.koike@collabora.com> |
13926 | L: linux-media@vger.kernel.org | 13949 | L: linux-media@vger.kernel.org |
13950 | T: git git://linuxtv.org/media_tree.git | ||
13951 | W: https://linuxtv.org | ||
13927 | S: Maintained | 13952 | S: Maintained |
13928 | F: drivers/media/platform/video-mux.c | 13953 | F: drivers/media/platform/vimc/* |
13954 | |||
13955 | VIRT LIB | ||
13956 | M: Alex Williamson <alex.williamson@redhat.com> | ||
13957 | M: Paolo Bonzini <pbonzini@redhat.com> | ||
13958 | L: kvm@vger.kernel.org | ||
13959 | S: Supported | ||
13960 | F: virt/lib/ | ||
13929 | 13961 | ||
13930 | VIRTIO AND VHOST VSOCK DRIVER | 13962 | VIRTIO AND VHOST VSOCK DRIVER |
13931 | M: Stefan Hajnoczi <stefanha@redhat.com> | 13963 | M: Stefan Hajnoczi <stefanha@redhat.com> |
@@ -13943,12 +13975,6 @@ F: drivers/net/vsockmon.c | |||
13943 | F: drivers/vhost/vsock.c | 13975 | F: drivers/vhost/vsock.c |
13944 | F: drivers/vhost/vsock.h | 13976 | F: drivers/vhost/vsock.h |
13945 | 13977 | ||
13946 | VIRTUAL SERIO DEVICE DRIVER | ||
13947 | M: Stephen Chandler Paul <thatslyude@gmail.com> | ||
13948 | S: Maintained | ||
13949 | F: drivers/input/serio/userio.c | ||
13950 | F: include/uapi/linux/userio.h | ||
13951 | |||
13952 | VIRTIO CONSOLE DRIVER | 13978 | VIRTIO CONSOLE DRIVER |
13953 | M: Amit Shah <amit@kernel.org> | 13979 | M: Amit Shah <amit@kernel.org> |
13954 | L: virtualization@lists.linux-foundation.org | 13980 | L: virtualization@lists.linux-foundation.org |
@@ -13971,6 +13997,14 @@ F: include/linux/virtio*.h | |||
13971 | F: include/uapi/linux/virtio_*.h | 13997 | F: include/uapi/linux/virtio_*.h |
13972 | F: drivers/crypto/virtio/ | 13998 | F: drivers/crypto/virtio/ |
13973 | 13999 | ||
14000 | VIRTIO CRYPTO DRIVER | ||
14001 | M: Gonglei <arei.gonglei@huawei.com> | ||
14002 | L: virtualization@lists.linux-foundation.org | ||
14003 | L: linux-crypto@vger.kernel.org | ||
14004 | S: Maintained | ||
14005 | F: drivers/crypto/virtio/ | ||
14006 | F: include/uapi/linux/virtio_crypto.h | ||
14007 | |||
13974 | VIRTIO DRIVERS FOR S390 | 14008 | VIRTIO DRIVERS FOR S390 |
13975 | M: Cornelia Huck <cohuck@redhat.com> | 14009 | M: Cornelia Huck <cohuck@redhat.com> |
13976 | M: Halil Pasic <pasic@linux.vnet.ibm.com> | 14010 | M: Halil Pasic <pasic@linux.vnet.ibm.com> |
@@ -14007,45 +14041,11 @@ S: Maintained | |||
14007 | F: drivers/virtio/virtio_input.c | 14041 | F: drivers/virtio/virtio_input.c |
14008 | F: include/uapi/linux/virtio_input.h | 14042 | F: include/uapi/linux/virtio_input.h |
14009 | 14043 | ||
14010 | VIRTIO CRYPTO DRIVER | 14044 | VIRTUAL SERIO DEVICE DRIVER |
14011 | M: Gonglei <arei.gonglei@huawei.com> | 14045 | M: Stephen Chandler Paul <thatslyude@gmail.com> |
14012 | L: virtualization@lists.linux-foundation.org | ||
14013 | L: linux-crypto@vger.kernel.org | ||
14014 | S: Maintained | ||
14015 | F: drivers/crypto/virtio/ | ||
14016 | F: include/uapi/linux/virtio_crypto.h | ||
14017 | |||
14018 | VIA RHINE NETWORK DRIVER | ||
14019 | S: Orphan | ||
14020 | F: drivers/net/ethernet/via/via-rhine.c | ||
14021 | |||
14022 | VIA SD/MMC CARD CONTROLLER DRIVER | ||
14023 | M: Bruce Chang <brucechang@via.com.tw> | ||
14024 | M: Harald Welte <HaraldWelte@viatech.com> | ||
14025 | S: Maintained | ||
14026 | F: drivers/mmc/host/via-sdmmc.c | ||
14027 | |||
14028 | VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER | ||
14029 | M: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | ||
14030 | L: linux-fbdev@vger.kernel.org | ||
14031 | S: Maintained | ||
14032 | F: include/linux/via-core.h | ||
14033 | F: include/linux/via-gpio.h | ||
14034 | F: include/linux/via_i2c.h | ||
14035 | F: drivers/video/fbdev/via/ | ||
14036 | |||
14037 | VIA VELOCITY NETWORK DRIVER | ||
14038 | M: Francois Romieu <romieu@fr.zoreil.com> | ||
14039 | L: netdev@vger.kernel.org | ||
14040 | S: Maintained | 14046 | S: Maintained |
14041 | F: drivers/net/ethernet/via/via-velocity.* | 14047 | F: drivers/input/serio/userio.c |
14042 | 14048 | F: include/uapi/linux/userio.h | |
14043 | VIRT LIB | ||
14044 | M: Alex Williamson <alex.williamson@redhat.com> | ||
14045 | M: Paolo Bonzini <pbonzini@redhat.com> | ||
14046 | L: kvm@vger.kernel.org | ||
14047 | S: Supported | ||
14048 | F: virt/lib/ | ||
14049 | 14049 | ||
14050 | VIVID VIRTUAL VIDEO DRIVER | 14050 | VIVID VIRTUAL VIDEO DRIVER |
14051 | M: Hans Verkuil <hverkuil@xs4all.nl> | 14051 | M: Hans Verkuil <hverkuil@xs4all.nl> |
@@ -14055,14 +14055,6 @@ W: https://linuxtv.org | |||
14055 | S: Maintained | 14055 | S: Maintained |
14056 | F: drivers/media/platform/vivid/* | 14056 | F: drivers/media/platform/vivid/* |
14057 | 14057 | ||
14058 | VIMC VIRTUAL MEDIA CONTROLLER DRIVER | ||
14059 | M: Helen Koike <helen.koike@collabora.com> | ||
14060 | L: linux-media@vger.kernel.org | ||
14061 | T: git git://linuxtv.org/media_tree.git | ||
14062 | W: https://linuxtv.org | ||
14063 | S: Maintained | ||
14064 | F: drivers/media/platform/vimc/* | ||
14065 | |||
14066 | VLYNQ BUS | 14058 | VLYNQ BUS |
14067 | M: Florian Fainelli <f.fainelli@gmail.com> | 14059 | M: Florian Fainelli <f.fainelli@gmail.com> |
14068 | L: openwrt-devel@lists.openwrt.org (subscribers-only) | 14060 | L: openwrt-devel@lists.openwrt.org (subscribers-only) |
@@ -14082,12 +14074,6 @@ F: drivers/staging/vme/ | |||
14082 | F: drivers/vme/ | 14074 | F: drivers/vme/ |
14083 | F: include/linux/vme* | 14075 | F: include/linux/vme* |
14084 | 14076 | ||
14085 | VMWARE HYPERVISOR INTERFACE | ||
14086 | M: Alok Kataria <akataria@vmware.com> | ||
14087 | L: virtualization@lists.linux-foundation.org | ||
14088 | S: Supported | ||
14089 | F: arch/x86/kernel/cpu/vmware.c | ||
14090 | |||
14091 | VMWARE BALLOON DRIVER | 14077 | VMWARE BALLOON DRIVER |
14092 | M: Xavier Deguillard <xdeguillard@vmware.com> | 14078 | M: Xavier Deguillard <xdeguillard@vmware.com> |
14093 | M: Philip Moltmann <moltmann@vmware.com> | 14079 | M: Philip Moltmann <moltmann@vmware.com> |
@@ -14096,6 +14082,27 @@ L: linux-kernel@vger.kernel.org | |||
14096 | S: Maintained | 14082 | S: Maintained |
14097 | F: drivers/misc/vmw_balloon.c | 14083 | F: drivers/misc/vmw_balloon.c |
14098 | 14084 | ||
14085 | VMWARE HYPERVISOR INTERFACE | ||
14086 | M: Alok Kataria <akataria@vmware.com> | ||
14087 | L: virtualization@lists.linux-foundation.org | ||
14088 | S: Supported | ||
14089 | F: arch/x86/kernel/cpu/vmware.c | ||
14090 | |||
14091 | VMWARE PVRDMA DRIVER | ||
14092 | M: Adit Ranadive <aditr@vmware.com> | ||
14093 | M: VMware PV-Drivers <pv-drivers@vmware.com> | ||
14094 | L: linux-rdma@vger.kernel.org | ||
14095 | S: Maintained | ||
14096 | F: drivers/infiniband/hw/vmw_pvrdma/ | ||
14097 | |||
14098 | VMware PVSCSI driver | ||
14099 | M: Jim Gill <jgill@vmware.com> | ||
14100 | M: VMware PV-Drivers <pv-drivers@vmware.com> | ||
14101 | L: linux-scsi@vger.kernel.org | ||
14102 | S: Maintained | ||
14103 | F: drivers/scsi/vmw_pvscsi.c | ||
14104 | F: drivers/scsi/vmw_pvscsi.h | ||
14105 | |||
14099 | VMWARE VMMOUSE SUBDRIVER | 14106 | VMWARE VMMOUSE SUBDRIVER |
14100 | M: "VMware Graphics" <linux-graphics-maintainer@vmware.com> | 14107 | M: "VMware Graphics" <linux-graphics-maintainer@vmware.com> |
14101 | M: "VMware, Inc." <pv-drivers@vmware.com> | 14108 | M: "VMware, Inc." <pv-drivers@vmware.com> |
@@ -14111,21 +14118,6 @@ L: netdev@vger.kernel.org | |||
14111 | S: Maintained | 14118 | S: Maintained |
14112 | F: drivers/net/vmxnet3/ | 14119 | F: drivers/net/vmxnet3/ |
14113 | 14120 | ||
14114 | VMware PVSCSI driver | ||
14115 | M: Jim Gill <jgill@vmware.com> | ||
14116 | M: VMware PV-Drivers <pv-drivers@vmware.com> | ||
14117 | L: linux-scsi@vger.kernel.org | ||
14118 | S: Maintained | ||
14119 | F: drivers/scsi/vmw_pvscsi.c | ||
14120 | F: drivers/scsi/vmw_pvscsi.h | ||
14121 | |||
14122 | VMWARE PVRDMA DRIVER | ||
14123 | M: Adit Ranadive <aditr@vmware.com> | ||
14124 | M: VMware PV-Drivers <pv-drivers@vmware.com> | ||
14125 | L: linux-rdma@vger.kernel.org | ||
14126 | S: Maintained | ||
14127 | F: drivers/infiniband/hw/vmw_pvrdma/ | ||
14128 | |||
14129 | VOLTAGE AND CURRENT REGULATOR FRAMEWORK | 14121 | VOLTAGE AND CURRENT REGULATOR FRAMEWORK |
14130 | M: Liam Girdwood <lgirdwood@gmail.com> | 14122 | M: Liam Girdwood <lgirdwood@gmail.com> |
14131 | M: Mark Brown <broonie@kernel.org> | 14123 | M: Mark Brown <broonie@kernel.org> |
@@ -14224,6 +14216,27 @@ L: linux-input@vger.kernel.org | |||
14224 | S: Maintained | 14216 | S: Maintained |
14225 | F: drivers/hid/hid-wiimote* | 14217 | F: drivers/hid/hid-wiimote* |
14226 | 14218 | ||
14219 | WILOCITY WIL6210 WIRELESS DRIVER | ||
14220 | M: Maya Erez <qca_merez@qca.qualcomm.com> | ||
14221 | L: linux-wireless@vger.kernel.org | ||
14222 | L: wil6210@qca.qualcomm.com | ||
14223 | S: Supported | ||
14224 | W: http://wireless.kernel.org/en/users/Drivers/wil6210 | ||
14225 | F: drivers/net/wireless/ath/wil6210/ | ||
14226 | F: include/uapi/linux/wil6210_uapi.h | ||
14227 | |||
14228 | WIMAX STACK | ||
14229 | M: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | ||
14230 | M: linux-wimax@intel.com | ||
14231 | L: wimax@linuxwimax.org (subscribers-only) | ||
14232 | S: Supported | ||
14233 | W: http://linuxwimax.org | ||
14234 | F: Documentation/wimax/README.wimax | ||
14235 | F: include/linux/wimax/debug.h | ||
14236 | F: include/net/wimax.h | ||
14237 | F: include/uapi/linux/wimax.h | ||
14238 | F: net/wimax/ | ||
14239 | |||
14227 | WINBOND CIR DRIVER | 14240 | WINBOND CIR DRIVER |
14228 | M: David Härdeman <david@hardeman.nu> | 14241 | M: David Härdeman <david@hardeman.nu> |
14229 | S: Maintained | 14242 | S: Maintained |
@@ -14241,18 +14254,6 @@ L: linux-gpio@vger.kernel.org | |||
14241 | S: Maintained | 14254 | S: Maintained |
14242 | F: drivers/gpio/gpio-ws16c48.c | 14255 | F: drivers/gpio/gpio-ws16c48.c |
14243 | 14256 | ||
14244 | WIMAX STACK | ||
14245 | M: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | ||
14246 | M: linux-wimax@intel.com | ||
14247 | L: wimax@linuxwimax.org (subscribers-only) | ||
14248 | S: Supported | ||
14249 | W: http://linuxwimax.org | ||
14250 | F: Documentation/wimax/README.wimax | ||
14251 | F: include/linux/wimax/debug.h | ||
14252 | F: include/net/wimax.h | ||
14253 | F: include/uapi/linux/wimax.h | ||
14254 | F: net/wimax/ | ||
14255 | |||
14256 | WISTRON LAPTOP BUTTON DRIVER | 14257 | WISTRON LAPTOP BUTTON DRIVER |
14257 | M: Miloslav Trmac <mitr@volny.cz> | 14258 | M: Miloslav Trmac <mitr@volny.cz> |
14258 | S: Maintained | 14259 | S: Maintained |
@@ -14337,15 +14338,6 @@ S: Maintained | |||
14337 | F: Documentation/x86/ | 14338 | F: Documentation/x86/ |
14338 | F: arch/x86/ | 14339 | F: arch/x86/ |
14339 | 14340 | ||
14340 | X86 PLATFORM DRIVERS | ||
14341 | M: Darren Hart <dvhart@infradead.org> | ||
14342 | M: Andy Shevchenko <andy@infradead.org> | ||
14343 | L: platform-driver-x86@vger.kernel.org | ||
14344 | T: git git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git | ||
14345 | S: Maintained | ||
14346 | F: drivers/platform/x86/ | ||
14347 | F: drivers/platform/olpc/ | ||
14348 | |||
14349 | X86 MCE INFRASTRUCTURE | 14341 | X86 MCE INFRASTRUCTURE |
14350 | M: Tony Luck <tony.luck@intel.com> | 14342 | M: Tony Luck <tony.luck@intel.com> |
14351 | M: Borislav Petkov <bp@alien8.de> | 14343 | M: Borislav Petkov <bp@alien8.de> |
@@ -14358,6 +14350,15 @@ M: Borislav Petkov <bp@alien8.de> | |||
14358 | S: Maintained | 14350 | S: Maintained |
14359 | F: arch/x86/kernel/cpu/microcode/* | 14351 | F: arch/x86/kernel/cpu/microcode/* |
14360 | 14352 | ||
14353 | X86 PLATFORM DRIVERS | ||
14354 | M: Darren Hart <dvhart@infradead.org> | ||
14355 | M: Andy Shevchenko <andy@infradead.org> | ||
14356 | L: platform-driver-x86@vger.kernel.org | ||
14357 | T: git git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git | ||
14358 | S: Maintained | ||
14359 | F: drivers/platform/x86/ | ||
14360 | F: drivers/platform/olpc/ | ||
14361 | |||
14361 | X86 VDSO | 14362 | X86 VDSO |
14362 | M: Andy Lutomirski <luto@amacapital.net> | 14363 | M: Andy Lutomirski <luto@amacapital.net> |
14363 | L: linux-kernel@vger.kernel.org | 14364 | L: linux-kernel@vger.kernel.org |
@@ -14374,20 +14375,13 @@ T: git git://linuxtv.org/media_tree.git | |||
14374 | S: Maintained | 14375 | S: Maintained |
14375 | F: drivers/media/tuners/tuner-xc2028.* | 14376 | F: drivers/media/tuners/tuner-xc2028.* |
14376 | 14377 | ||
14377 | XEN HYPERVISOR INTERFACE | 14378 | XEN BLOCK SUBSYSTEM |
14378 | M: Boris Ostrovsky <boris.ostrovsky@oracle.com> | 14379 | M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> |
14379 | M: Juergen Gross <jgross@suse.com> | 14380 | M: Roger Pau Monné <roger.pau@citrix.com> |
14380 | L: xen-devel@lists.xenproject.org (moderated for non-subscribers) | 14381 | L: xen-devel@lists.xenproject.org (moderated for non-subscribers) |
14381 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git | ||
14382 | S: Supported | 14382 | S: Supported |
14383 | F: arch/x86/xen/ | 14383 | F: drivers/block/xen-blkback/* |
14384 | F: drivers/*/xen-*front.c | 14384 | F: drivers/block/xen* |
14385 | F: drivers/xen/ | ||
14386 | F: arch/x86/include/asm/xen/ | ||
14387 | F: include/xen/ | ||
14388 | F: include/uapi/xen/ | ||
14389 | F: Documentation/ABI/stable/sysfs-hypervisor-xen | ||
14390 | F: Documentation/ABI/testing/sysfs-hypervisor-xen | ||
14391 | 14385 | ||
14392 | XEN HYPERVISOR ARM | 14386 | XEN HYPERVISOR ARM |
14393 | M: Stefano Stabellini <sstabellini@kernel.org> | 14387 | M: Stefano Stabellini <sstabellini@kernel.org> |
@@ -14403,6 +14397,21 @@ S: Maintained | |||
14403 | F: arch/arm64/xen/ | 14397 | F: arch/arm64/xen/ |
14404 | F: arch/arm64/include/asm/xen/ | 14398 | F: arch/arm64/include/asm/xen/ |
14405 | 14399 | ||
14400 | XEN HYPERVISOR INTERFACE | ||
14401 | M: Boris Ostrovsky <boris.ostrovsky@oracle.com> | ||
14402 | M: Juergen Gross <jgross@suse.com> | ||
14403 | L: xen-devel@lists.xenproject.org (moderated for non-subscribers) | ||
14404 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git | ||
14405 | S: Supported | ||
14406 | F: arch/x86/xen/ | ||
14407 | F: drivers/*/xen-*front.c | ||
14408 | F: drivers/xen/ | ||
14409 | F: arch/x86/include/asm/xen/ | ||
14410 | F: include/xen/ | ||
14411 | F: include/uapi/xen/ | ||
14412 | F: Documentation/ABI/stable/sysfs-hypervisor-xen | ||
14413 | F: Documentation/ABI/testing/sysfs-hypervisor-xen | ||
14414 | |||
14406 | XEN NETWORK BACKEND DRIVER | 14415 | XEN NETWORK BACKEND DRIVER |
14407 | M: Wei Liu <wei.liu2@citrix.com> | 14416 | M: Wei Liu <wei.liu2@citrix.com> |
14408 | M: Paul Durrant <paul.durrant@citrix.com> | 14417 | M: Paul Durrant <paul.durrant@citrix.com> |
@@ -14418,14 +14427,6 @@ S: Supported | |||
14418 | F: arch/x86/pci/*xen* | 14427 | F: arch/x86/pci/*xen* |
14419 | F: drivers/pci/*xen* | 14428 | F: drivers/pci/*xen* |
14420 | 14429 | ||
14421 | XEN BLOCK SUBSYSTEM | ||
14422 | M: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | ||
14423 | M: Roger Pau Monné <roger.pau@citrix.com> | ||
14424 | L: xen-devel@lists.xenproject.org (moderated for non-subscribers) | ||
14425 | S: Supported | ||
14426 | F: drivers/block/xen-blkback/* | ||
14427 | F: drivers/block/xen* | ||
14428 | |||
14429 | XEN PVSCSI DRIVERS | 14430 | XEN PVSCSI DRIVERS |
14430 | M: Juergen Gross <jgross@suse.com> | 14431 | M: Juergen Gross <jgross@suse.com> |
14431 | L: xen-devel@lists.xenproject.org (moderated for non-subscribers) | 14432 | L: xen-devel@lists.xenproject.org (moderated for non-subscribers) |
@@ -14502,6 +14503,13 @@ S: Maintained | |||
14502 | F: drivers/net/hamradio/yam* | 14503 | F: drivers/net/hamradio/yam* |
14503 | F: include/linux/yam.h | 14504 | F: include/linux/yam.h |
14504 | 14505 | ||
14506 | YAMA SECURITY MODULE | ||
14507 | M: Kees Cook <keescook@chromium.org> | ||
14508 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git yama/tip | ||
14509 | S: Supported | ||
14510 | F: security/yama/ | ||
14511 | F: Documentation/admin-guide/LSM/Yama.rst | ||
14512 | |||
14505 | YEALINK PHONE DRIVER | 14513 | YEALINK PHONE DRIVER |
14506 | M: Henk Vergonet <Henk.Vergonet@gmail.com> | 14514 | M: Henk Vergonet <Henk.Vergonet@gmail.com> |
14507 | L: usbb2k-api-dev@nongnu.org | 14515 | L: usbb2k-api-dev@nongnu.org |
@@ -14536,23 +14544,23 @@ L: zd1211-devs@lists.sourceforge.net (subscribers-only) | |||
14536 | S: Maintained | 14544 | S: Maintained |
14537 | F: drivers/net/wireless/zydas/zd1211rw/ | 14545 | F: drivers/net/wireless/zydas/zd1211rw/ |
14538 | 14546 | ||
14539 | ZD1301_DEMOD MEDIA DRIVER | 14547 | ZD1301 MEDIA DRIVER |
14540 | M: Antti Palosaari <crope@iki.fi> | 14548 | M: Antti Palosaari <crope@iki.fi> |
14541 | L: linux-media@vger.kernel.org | 14549 | L: linux-media@vger.kernel.org |
14542 | W: https://linuxtv.org/ | 14550 | W: https://linuxtv.org/ |
14543 | W: http://palosaari.fi/linux/ | 14551 | W: http://palosaari.fi/linux/ |
14544 | Q: https://patchwork.linuxtv.org/project/linux-media/list/ | 14552 | Q: https://patchwork.linuxtv.org/project/linux-media/list/ |
14545 | S: Maintained | 14553 | S: Maintained |
14546 | F: drivers/media/dvb-frontends/zd1301_demod* | 14554 | F: drivers/media/usb/dvb-usb-v2/zd1301* |
14547 | 14555 | ||
14548 | ZD1301 MEDIA DRIVER | 14556 | ZD1301_DEMOD MEDIA DRIVER |
14549 | M: Antti Palosaari <crope@iki.fi> | 14557 | M: Antti Palosaari <crope@iki.fi> |
14550 | L: linux-media@vger.kernel.org | 14558 | L: linux-media@vger.kernel.org |
14551 | W: https://linuxtv.org/ | 14559 | W: https://linuxtv.org/ |
14552 | W: http://palosaari.fi/linux/ | 14560 | W: http://palosaari.fi/linux/ |
14553 | Q: https://patchwork.linuxtv.org/project/linux-media/list/ | 14561 | Q: https://patchwork.linuxtv.org/project/linux-media/list/ |
14554 | S: Maintained | 14562 | S: Maintained |
14555 | F: drivers/media/usb/dvb-usb-v2/zd1301* | 14563 | F: drivers/media/dvb-frontends/zd1301_demod* |
14556 | 14564 | ||
14557 | ZPOOL COMPRESSED PAGE STORAGE API | 14565 | ZPOOL COMPRESSED PAGE STORAGE API |
14558 | M: Dan Streetman <ddstreet@ieee.org> | 14566 | M: Dan Streetman <ddstreet@ieee.org> |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 4 | 1 | VERSION = 4 |
2 | PATCHLEVEL = 13 | 2 | PATCHLEVEL = 13 |
3 | SUBLEVEL = 0 | 3 | SUBLEVEL = 0 |
4 | EXTRAVERSION = -rc1 | 4 | EXTRAVERSION = -rc2 |
5 | NAME = Fearless Coyote | 5 | NAME = Fearless Coyote |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/alpha/include/uapi/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h index ff67b8373bf7..1cd7dc7d4870 100644 --- a/arch/alpha/include/uapi/asm/ioctls.h +++ b/arch/alpha/include/uapi/asm/ioctls.h | |||
@@ -100,7 +100,7 @@ | |||
100 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ | 100 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
101 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ | 101 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
102 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ | 102 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
103 | #define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */ | 103 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ |
104 | 104 | ||
105 | #define TIOCSERCONFIG 0x5453 | 105 | #define TIOCSERCONFIG 0x5453 |
106 | #define TIOCSERGWILD 0x5454 | 106 | #define TIOCSERGWILD 0x5454 |
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h index 4e6e88a6b2f4..2244a94ed9c9 100644 --- a/arch/arm/include/asm/bug.h +++ b/arch/arm/include/asm/bug.h | |||
@@ -37,7 +37,7 @@ do { \ | |||
37 | ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \ | 37 | ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \ |
38 | "2:\t.asciz " #__file "\n" \ | 38 | "2:\t.asciz " #__file "\n" \ |
39 | ".popsection\n" \ | 39 | ".popsection\n" \ |
40 | ".pushsection __bug_table,\"a\"\n" \ | 40 | ".pushsection __bug_table,\"aw\"\n" \ |
41 | ".align 2\n" \ | 41 | ".align 2\n" \ |
42 | "3:\t.word 1b, 2b\n" \ | 42 | "3:\t.word 1b, 2b\n" \ |
43 | "\t.hword " #__line ", 0\n" \ | 43 | "\t.hword " #__line ", 0\n" \ |
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index d69bebf697e7..74504b154256 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -116,7 +116,7 @@ struct cpu_cache_fns { | |||
116 | void (*dma_unmap_area)(const void *, size_t, int); | 116 | void (*dma_unmap_area)(const void *, size_t, int); |
117 | 117 | ||
118 | void (*dma_flush_range)(const void *, const void *); | 118 | void (*dma_flush_range)(const void *, const void *); |
119 | }; | 119 | } __no_randomize_layout; |
120 | 120 | ||
121 | /* | 121 | /* |
122 | * Select the calling method | 122 | * Select the calling method |
diff --git a/arch/arm64/include/asm/bug.h b/arch/arm64/include/asm/bug.h index 366448eb0fb7..a02a57186f56 100644 --- a/arch/arm64/include/asm/bug.h +++ b/arch/arm64/include/asm/bug.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #ifdef CONFIG_GENERIC_BUG | 36 | #ifdef CONFIG_GENERIC_BUG |
37 | 37 | ||
38 | #define __BUG_ENTRY(flags) \ | 38 | #define __BUG_ENTRY(flags) \ |
39 | ".pushsection __bug_table,\"a\"\n\t" \ | 39 | ".pushsection __bug_table,\"aw\"\n\t" \ |
40 | ".align 2\n\t" \ | 40 | ".align 2\n\t" \ |
41 | "0: .long 1f - 0b\n\t" \ | 41 | "0: .long 1f - 0b\n\t" \ |
42 | _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \ | 42 | _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \ |
diff --git a/arch/blackfin/include/asm/bug.h b/arch/blackfin/include/asm/bug.h index 8d9b1eba89c4..76b2e82ee730 100644 --- a/arch/blackfin/include/asm/bug.h +++ b/arch/blackfin/include/asm/bug.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define _BUG_OR_WARN(flags) \ | 21 | #define _BUG_OR_WARN(flags) \ |
22 | asm volatile( \ | 22 | asm volatile( \ |
23 | "1: .hword %0\n" \ | 23 | "1: .hword %0\n" \ |
24 | " .section __bug_table,\"a\",@progbits\n" \ | 24 | " .section __bug_table,\"aw\",@progbits\n" \ |
25 | "2: .long 1b\n" \ | 25 | "2: .long 1b\n" \ |
26 | " .long %1\n" \ | 26 | " .long %1\n" \ |
27 | " .short %2\n" \ | 27 | " .short %2\n" \ |
@@ -38,7 +38,7 @@ | |||
38 | #define _BUG_OR_WARN(flags) \ | 38 | #define _BUG_OR_WARN(flags) \ |
39 | asm volatile( \ | 39 | asm volatile( \ |
40 | "1: .hword %0\n" \ | 40 | "1: .hword %0\n" \ |
41 | " .section __bug_table,\"a\",@progbits\n" \ | 41 | " .section __bug_table,\"aw\",@progbits\n" \ |
42 | "2: .long 1b\n" \ | 42 | "2: .long 1b\n" \ |
43 | " .short %1\n" \ | 43 | " .short %1\n" \ |
44 | " .org 2b + %2\n" \ | 44 | " .org 2b + %2\n" \ |
diff --git a/arch/blackfin/include/asm/flat.h b/arch/blackfin/include/asm/flat.h index 296d7f56fbfd..f1d6ba7afbf2 100644 --- a/arch/blackfin/include/asm/flat.h +++ b/arch/blackfin/include/asm/flat.h | |||
@@ -44,8 +44,7 @@ flat_get_relocate_addr (unsigned long relval) | |||
44 | return relval & 0x03ffffff; /* Mask out top 6 bits */ | 44 | return relval & 0x03ffffff; /* Mask out top 6 bits */ |
45 | } | 45 | } |
46 | 46 | ||
47 | static inline int flat_set_persistent(unsigned long relval, | 47 | static inline int flat_set_persistent(u32 relval, u32 *persistent) |
48 | unsigned long *persistent) | ||
49 | { | 48 | { |
50 | int type = (relval >> 26) & 7; | 49 | int type = (relval >> 26) & 7; |
51 | if (type == 3) { | 50 | if (type == 3) { |
diff --git a/arch/blackfin/kernel/flat.c b/arch/blackfin/kernel/flat.c index d29ab6a2e909..8ebc54daaa8e 100644 --- a/arch/blackfin/kernel/flat.c +++ b/arch/blackfin/kernel/flat.c | |||
@@ -32,7 +32,7 @@ unsigned long bfin_get_addr_from_rp(u32 *ptr, | |||
32 | break; | 32 | break; |
33 | 33 | ||
34 | case FLAT_BFIN_RELOC_TYPE_32_BIT: | 34 | case FLAT_BFIN_RELOC_TYPE_32_BIT: |
35 | pr_debug("*ptr = %lx", get_unaligned(ptr)); | 35 | pr_debug("*ptr = %x", get_unaligned(ptr)); |
36 | val = get_unaligned(ptr); | 36 | val = get_unaligned(ptr); |
37 | break; | 37 | break; |
38 | 38 | ||
@@ -77,7 +77,7 @@ void bfin_put_addr_at_rp(u32 *ptr, u32 addr, u32 relval) | |||
77 | 77 | ||
78 | case FLAT_BFIN_RELOC_TYPE_32_BIT: | 78 | case FLAT_BFIN_RELOC_TYPE_32_BIT: |
79 | put_unaligned(addr, ptr); | 79 | put_unaligned(addr, ptr); |
80 | pr_debug("new ptr =%lx", get_unaligned(ptr)); | 80 | pr_debug("new ptr =%x", get_unaligned(ptr)); |
81 | break; | 81 | break; |
82 | } | 82 | } |
83 | } | 83 | } |
diff --git a/arch/h8300/include/asm/flat.h b/arch/h8300/include/asm/flat.h index 18d024251738..7e0bd6fa1532 100644 --- a/arch/h8300/include/asm/flat.h +++ b/arch/h8300/include/asm/flat.h | |||
@@ -24,7 +24,7 @@ static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, | |||
24 | u32 *addr, u32 *persistent) | 24 | u32 *addr, u32 *persistent) |
25 | { | 25 | { |
26 | u32 val = get_unaligned((__force u32 *)rp); | 26 | u32 val = get_unaligned((__force u32 *)rp); |
27 | if (!(flags & FLAT_FLAG_GOTPIC) | 27 | if (!(flags & FLAT_FLAG_GOTPIC)) |
28 | val &= 0x00ffffff; | 28 | val &= 0x00ffffff; |
29 | *addr = val; | 29 | *addr = val; |
30 | return 0; | 30 | return 0; |
diff --git a/arch/m68k/include/asm/flat.h b/arch/m68k/include/asm/flat.h index 48b62790fe70..b2a41f5b3890 100644 --- a/arch/m68k/include/asm/flat.h +++ b/arch/m68k/include/asm/flat.h | |||
@@ -30,8 +30,7 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel) | |||
30 | } | 30 | } |
31 | #define flat_get_relocate_addr(rel) (rel) | 31 | #define flat_get_relocate_addr(rel) (rel) |
32 | 32 | ||
33 | static inline int flat_set_persistent(unsigned long relval, | 33 | static inline int flat_set_persistent(u32 relval, u32 *persistent) |
34 | unsigned long *persistent) | ||
35 | { | 34 | { |
36 | return 0; | 35 | return 0; |
37 | } | 36 | } |
diff --git a/arch/mips/include/uapi/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h index 68e19b689a00..1609cb0907ac 100644 --- a/arch/mips/include/uapi/asm/ioctls.h +++ b/arch/mips/include/uapi/asm/ioctls.h | |||
@@ -91,7 +91,7 @@ | |||
91 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ | 91 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
92 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ | 92 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
93 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ | 93 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
94 | #define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */ | 94 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ |
95 | 95 | ||
96 | /* I hope the range from 0x5480 on is free ... */ | 96 | /* I hope the range from 0x5480 on is free ... */ |
97 | #define TIOCSCTTY 0x5480 /* become controlling tty */ | 97 | #define TIOCSCTTY 0x5480 /* become controlling tty */ |
diff --git a/arch/mn10300/include/asm/bug.h b/arch/mn10300/include/asm/bug.h index aa6a38886391..811414fb002d 100644 --- a/arch/mn10300/include/asm/bug.h +++ b/arch/mn10300/include/asm/bug.h | |||
@@ -21,7 +21,7 @@ do { \ | |||
21 | asm volatile( \ | 21 | asm volatile( \ |
22 | " syscall 15 \n" \ | 22 | " syscall 15 \n" \ |
23 | "0: \n" \ | 23 | "0: \n" \ |
24 | " .section __bug_table,\"a\" \n" \ | 24 | " .section __bug_table,\"aw\" \n" \ |
25 | " .long 0b,%0,%1 \n" \ | 25 | " .long 0b,%0,%1 \n" \ |
26 | " .previous \n" \ | 26 | " .previous \n" \ |
27 | : \ | 27 | : \ |
diff --git a/arch/parisc/include/asm/bug.h b/arch/parisc/include/asm/bug.h index d2742273a685..07ea467f22fc 100644 --- a/arch/parisc/include/asm/bug.h +++ b/arch/parisc/include/asm/bug.h | |||
@@ -27,7 +27,7 @@ | |||
27 | do { \ | 27 | do { \ |
28 | asm volatile("\n" \ | 28 | asm volatile("\n" \ |
29 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | 29 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ |
30 | "\t.pushsection __bug_table,\"a\"\n" \ | 30 | "\t.pushsection __bug_table,\"aw\"\n" \ |
31 | "2:\t" ASM_WORD_INSN "1b, %c0\n" \ | 31 | "2:\t" ASM_WORD_INSN "1b, %c0\n" \ |
32 | "\t.short %c1, %c2\n" \ | 32 | "\t.short %c1, %c2\n" \ |
33 | "\t.org 2b+%c3\n" \ | 33 | "\t.org 2b+%c3\n" \ |
@@ -50,7 +50,7 @@ | |||
50 | do { \ | 50 | do { \ |
51 | asm volatile("\n" \ | 51 | asm volatile("\n" \ |
52 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | 52 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ |
53 | "\t.pushsection __bug_table,\"a\"\n" \ | 53 | "\t.pushsection __bug_table,\"aw\"\n" \ |
54 | "2:\t" ASM_WORD_INSN "1b, %c0\n" \ | 54 | "2:\t" ASM_WORD_INSN "1b, %c0\n" \ |
55 | "\t.short %c1, %c2\n" \ | 55 | "\t.short %c1, %c2\n" \ |
56 | "\t.org 2b+%c3\n" \ | 56 | "\t.org 2b+%c3\n" \ |
@@ -64,7 +64,7 @@ | |||
64 | do { \ | 64 | do { \ |
65 | asm volatile("\n" \ | 65 | asm volatile("\n" \ |
66 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | 66 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ |
67 | "\t.pushsection __bug_table,\"a\"\n" \ | 67 | "\t.pushsection __bug_table,\"aw\"\n" \ |
68 | "2:\t" ASM_WORD_INSN "1b\n" \ | 68 | "2:\t" ASM_WORD_INSN "1b\n" \ |
69 | "\t.short %c0\n" \ | 69 | "\t.short %c0\n" \ |
70 | "\t.org 2b+%c1\n" \ | 70 | "\t.org 2b+%c1\n" \ |
diff --git a/arch/parisc/include/uapi/asm/ioctls.h b/arch/parisc/include/uapi/asm/ioctls.h index 674c68a5bbd0..d0e3321403be 100644 --- a/arch/parisc/include/uapi/asm/ioctls.h +++ b/arch/parisc/include/uapi/asm/ioctls.h | |||
@@ -60,7 +60,7 @@ | |||
60 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ | 60 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
61 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ | 61 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
62 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ | 62 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
63 | #define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */ | 63 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ |
64 | 64 | ||
65 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 65 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
66 | #define FIOCLEX 0x5451 | 66 | #define FIOCLEX 0x5451 |
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h index 0ce513f2926f..36fc7bfe9e11 100644 --- a/arch/powerpc/include/asm/book3s/64/hash.h +++ b/arch/powerpc/include/asm/book3s/64/hash.h | |||
@@ -91,6 +91,7 @@ static inline int hash__pgd_bad(pgd_t pgd) | |||
91 | } | 91 | } |
92 | #ifdef CONFIG_STRICT_KERNEL_RWX | 92 | #ifdef CONFIG_STRICT_KERNEL_RWX |
93 | extern void hash__mark_rodata_ro(void); | 93 | extern void hash__mark_rodata_ro(void); |
94 | extern void hash__mark_initmem_nx(void); | ||
94 | #endif | 95 | #endif |
95 | 96 | ||
96 | extern void hpte_need_flush(struct mm_struct *mm, unsigned long addr, | 97 | extern void hpte_need_flush(struct mm_struct *mm, unsigned long addr, |
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index c0737c86a362..d1da415e283c 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h | |||
@@ -1192,5 +1192,6 @@ static inline const int pud_pfn(pud_t pud) | |||
1192 | BUILD_BUG(); | 1192 | BUILD_BUG(); |
1193 | return 0; | 1193 | return 0; |
1194 | } | 1194 | } |
1195 | |||
1195 | #endif /* __ASSEMBLY__ */ | 1196 | #endif /* __ASSEMBLY__ */ |
1196 | #endif /* _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ */ | 1197 | #endif /* _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ */ |
diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h index 487709ff6875..544440b5aff3 100644 --- a/arch/powerpc/include/asm/book3s/64/radix.h +++ b/arch/powerpc/include/asm/book3s/64/radix.h | |||
@@ -118,6 +118,7 @@ | |||
118 | 118 | ||
119 | #ifdef CONFIG_STRICT_KERNEL_RWX | 119 | #ifdef CONFIG_STRICT_KERNEL_RWX |
120 | extern void radix__mark_rodata_ro(void); | 120 | extern void radix__mark_rodata_ro(void); |
121 | extern void radix__mark_initmem_nx(void); | ||
121 | #endif | 122 | #endif |
122 | 123 | ||
123 | static inline unsigned long __radix_pte_update(pte_t *ptep, unsigned long clr, | 124 | static inline unsigned long __radix_pte_update(pte_t *ptep, unsigned long clr, |
diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h index 0151af6c2a50..87fcc1948817 100644 --- a/arch/powerpc/include/asm/bug.h +++ b/arch/powerpc/include/asm/bug.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/asm-offsets.h> | 18 | #include <asm/asm-offsets.h> |
19 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 19 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
20 | .macro EMIT_BUG_ENTRY addr,file,line,flags | 20 | .macro EMIT_BUG_ENTRY addr,file,line,flags |
21 | .section __bug_table,"a" | 21 | .section __bug_table,"aw" |
22 | 5001: PPC_LONG \addr, 5002f | 22 | 5001: PPC_LONG \addr, 5002f |
23 | .short \line, \flags | 23 | .short \line, \flags |
24 | .org 5001b+BUG_ENTRY_SIZE | 24 | .org 5001b+BUG_ENTRY_SIZE |
@@ -29,7 +29,7 @@ | |||
29 | .endm | 29 | .endm |
30 | #else | 30 | #else |
31 | .macro EMIT_BUG_ENTRY addr,file,line,flags | 31 | .macro EMIT_BUG_ENTRY addr,file,line,flags |
32 | .section __bug_table,"a" | 32 | .section __bug_table,"aw" |
33 | 5001: PPC_LONG \addr | 33 | 5001: PPC_LONG \addr |
34 | .short \flags | 34 | .short \flags |
35 | .org 5001b+BUG_ENTRY_SIZE | 35 | .org 5001b+BUG_ENTRY_SIZE |
@@ -42,14 +42,14 @@ | |||
42 | sizeof(struct bug_entry), respectively */ | 42 | sizeof(struct bug_entry), respectively */ |
43 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 43 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
44 | #define _EMIT_BUG_ENTRY \ | 44 | #define _EMIT_BUG_ENTRY \ |
45 | ".section __bug_table,\"a\"\n" \ | 45 | ".section __bug_table,\"aw\"\n" \ |
46 | "2:\t" PPC_LONG "1b, %0\n" \ | 46 | "2:\t" PPC_LONG "1b, %0\n" \ |
47 | "\t.short %1, %2\n" \ | 47 | "\t.short %1, %2\n" \ |
48 | ".org 2b+%3\n" \ | 48 | ".org 2b+%3\n" \ |
49 | ".previous\n" | 49 | ".previous\n" |
50 | #else | 50 | #else |
51 | #define _EMIT_BUG_ENTRY \ | 51 | #define _EMIT_BUG_ENTRY \ |
52 | ".section __bug_table,\"a\"\n" \ | 52 | ".section __bug_table,\"aw\"\n" \ |
53 | "2:\t" PPC_LONG "1b\n" \ | 53 | "2:\t" PPC_LONG "1b\n" \ |
54 | "\t.short %2\n" \ | 54 | "\t.short %2\n" \ |
55 | ".org 2b+%3\n" \ | 55 | ".org 2b+%3\n" \ |
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index dd01212935ac..afae9a336136 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h | |||
@@ -80,6 +80,13 @@ unsigned long vmalloc_to_phys(void *vmalloc_addr); | |||
80 | 80 | ||
81 | void pgtable_cache_add(unsigned shift, void (*ctor)(void *)); | 81 | void pgtable_cache_add(unsigned shift, void (*ctor)(void *)); |
82 | void pgtable_cache_init(void); | 82 | void pgtable_cache_init(void); |
83 | |||
84 | #ifdef CONFIG_STRICT_KERNEL_RWX | ||
85 | void mark_initmem_nx(void); | ||
86 | #else | ||
87 | static inline void mark_initmem_nx(void) { } | ||
88 | #endif | ||
89 | |||
83 | #endif /* __ASSEMBLY__ */ | 90 | #endif /* __ASSEMBLY__ */ |
84 | 91 | ||
85 | #endif /* _ASM_POWERPC_PGTABLE_H */ | 92 | #endif /* _ASM_POWERPC_PGTABLE_H */ |
diff --git a/arch/powerpc/include/uapi/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h index bfd609a3e928..e3b10469f787 100644 --- a/arch/powerpc/include/uapi/asm/ioctls.h +++ b/arch/powerpc/include/uapi/asm/ioctls.h | |||
@@ -100,7 +100,7 @@ | |||
100 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ | 100 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
101 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ | 101 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
102 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ | 102 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
103 | #define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */ | 103 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ |
104 | 104 | ||
105 | #define TIOCSERCONFIG 0x5453 | 105 | #define TIOCSERCONFIG 0x5453 |
106 | #define TIOCSERGWILD 0x5454 | 106 | #define TIOCSERGWILD 0x5454 |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index e6d8354d79ef..9029afd1fa2a 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -824,7 +824,7 @@ EXC_COMMON(trap_0b_common, 0xb00, unknown_exception) | |||
824 | * r3 volatile parameter and return value for status | 824 | * r3 volatile parameter and return value for status |
825 | * r4-r10 volatile input and output value | 825 | * r4-r10 volatile input and output value |
826 | * r11 volatile hypercall number and output value | 826 | * r11 volatile hypercall number and output value |
827 | * r12 volatile | 827 | * r12 volatile input and output value |
828 | * r13-r31 nonvolatile | 828 | * r13-r31 nonvolatile |
829 | * LR nonvolatile | 829 | * LR nonvolatile |
830 | * CTR volatile | 830 | * CTR volatile |
@@ -834,25 +834,26 @@ EXC_COMMON(trap_0b_common, 0xb00, unknown_exception) | |||
834 | * Other registers nonvolatile | 834 | * Other registers nonvolatile |
835 | * | 835 | * |
836 | * The intersection of volatile registers that don't contain possible | 836 | * The intersection of volatile registers that don't contain possible |
837 | * inputs is: r12, cr0, xer, ctr. We may use these as scratch regs | 837 | * inputs is: cr0, xer, ctr. We may use these as scratch regs upon entry |
838 | * upon entry without saving. | 838 | * without saving, though xer is not a good idea to use, as hardware may |
839 | * interpret some bits so it may be costly to change them. | ||
839 | */ | 840 | */ |
840 | #ifdef CONFIG_KVM_BOOK3S_64_HANDLER | 841 | #ifdef CONFIG_KVM_BOOK3S_64_HANDLER |
841 | /* | 842 | /* |
842 | * There is a little bit of juggling to get syscall and hcall | 843 | * There is a little bit of juggling to get syscall and hcall |
843 | * working well. Save r10 in ctr to be restored in case it is a | 844 | * working well. Save r13 in ctr to avoid using SPRG scratch |
844 | * hcall. | 845 | * register. |
845 | * | 846 | * |
846 | * Userspace syscalls have already saved the PPR, hcalls must save | 847 | * Userspace syscalls have already saved the PPR, hcalls must save |
847 | * it before setting HMT_MEDIUM. | 848 | * it before setting HMT_MEDIUM. |
848 | */ | 849 | */ |
849 | #define SYSCALL_KVMTEST \ | 850 | #define SYSCALL_KVMTEST \ |
850 | mr r12,r13; \ | 851 | mtctr r13; \ |
851 | GET_PACA(r13); \ | 852 | GET_PACA(r13); \ |
852 | mtctr r10; \ | 853 | std r10,PACA_EXGEN+EX_R10(r13); \ |
853 | KVMTEST_PR(0xc00); /* uses r10, branch to do_kvm_0xc00_system_call */ \ | 854 | KVMTEST_PR(0xc00); /* uses r10, branch to do_kvm_0xc00_system_call */ \ |
854 | HMT_MEDIUM; \ | 855 | HMT_MEDIUM; \ |
855 | mr r9,r12; \ | 856 | mfctr r9; |
856 | 857 | ||
857 | #else | 858 | #else |
858 | #define SYSCALL_KVMTEST \ | 859 | #define SYSCALL_KVMTEST \ |
@@ -935,8 +936,8 @@ EXC_VIRT_END(system_call, 0x4c00, 0x100) | |||
935 | * This is a hcall, so register convention is as above, with these | 936 | * This is a hcall, so register convention is as above, with these |
936 | * differences: | 937 | * differences: |
937 | * r13 = PACA | 938 | * r13 = PACA |
938 | * r12 = orig r13 | 939 | * ctr = orig r13 |
939 | * ctr = orig r10 | 940 | * orig r10 saved in PACA |
940 | */ | 941 | */ |
941 | TRAMP_KVM_BEGIN(do_kvm_0xc00) | 942 | TRAMP_KVM_BEGIN(do_kvm_0xc00) |
942 | /* | 943 | /* |
@@ -944,14 +945,13 @@ TRAMP_KVM_BEGIN(do_kvm_0xc00) | |||
944 | * HMT_MEDIUM. That allows the KVM code to save that value into the | 945 | * HMT_MEDIUM. That allows the KVM code to save that value into the |
945 | * guest state (it is the guest's PPR value). | 946 | * guest state (it is the guest's PPR value). |
946 | */ | 947 | */ |
947 | OPT_GET_SPR(r0, SPRN_PPR, CPU_FTR_HAS_PPR) | 948 | OPT_GET_SPR(r10, SPRN_PPR, CPU_FTR_HAS_PPR) |
948 | HMT_MEDIUM | 949 | HMT_MEDIUM |
949 | OPT_SAVE_REG_TO_PACA(PACA_EXGEN+EX_PPR, r0, CPU_FTR_HAS_PPR) | 950 | OPT_SAVE_REG_TO_PACA(PACA_EXGEN+EX_PPR, r10, CPU_FTR_HAS_PPR) |
950 | mfctr r10 | 951 | mfctr r10 |
951 | SET_SCRATCH0(r12) | 952 | SET_SCRATCH0(r10) |
952 | std r9,PACA_EXGEN+EX_R9(r13) | 953 | std r9,PACA_EXGEN+EX_R9(r13) |
953 | mfcr r9 | 954 | mfcr r9 |
954 | std r10,PACA_EXGEN+EX_R10(r13) | ||
955 | KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xc00) | 955 | KVM_HANDLER(PACA_EXGEN, EXC_STD, 0xc00) |
956 | #endif | 956 | #endif |
957 | 957 | ||
diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index 5adb390e773b..516ebef905c0 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S | |||
@@ -30,6 +30,7 @@ | |||
30 | * Use unused space in the interrupt stack to save and restore | 30 | * Use unused space in the interrupt stack to save and restore |
31 | * registers for winkle support. | 31 | * registers for winkle support. |
32 | */ | 32 | */ |
33 | #define _MMCR0 GPR0 | ||
33 | #define _SDR1 GPR3 | 34 | #define _SDR1 GPR3 |
34 | #define _PTCR GPR3 | 35 | #define _PTCR GPR3 |
35 | #define _RPR GPR4 | 36 | #define _RPR GPR4 |
@@ -272,6 +273,14 @@ power_enter_stop: | |||
272 | b pnv_wakeup_noloss | 273 | b pnv_wakeup_noloss |
273 | 274 | ||
274 | .Lhandle_esl_ec_set: | 275 | .Lhandle_esl_ec_set: |
276 | /* | ||
277 | * POWER9 DD2 can incorrectly set PMAO when waking up after a | ||
278 | * state-loss idle. Saving and restoring MMCR0 over idle is a | ||
279 | * workaround. | ||
280 | */ | ||
281 | mfspr r4,SPRN_MMCR0 | ||
282 | std r4,_MMCR0(r1) | ||
283 | |||
275 | /* | 284 | /* |
276 | * Check if the requested state is a deep idle state. | 285 | * Check if the requested state is a deep idle state. |
277 | */ | 286 | */ |
@@ -450,10 +459,14 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_ARCH_300) | |||
450 | pnv_restore_hyp_resource_arch300: | 459 | pnv_restore_hyp_resource_arch300: |
451 | /* | 460 | /* |
452 | * Workaround for POWER9, if we lost resources, the ERAT | 461 | * Workaround for POWER9, if we lost resources, the ERAT |
453 | * might have been mixed up and needs flushing. | 462 | * might have been mixed up and needs flushing. We also need |
463 | * to reload MMCR0 (see comment above). | ||
454 | */ | 464 | */ |
455 | blt cr3,1f | 465 | blt cr3,1f |
456 | PPC_INVALIDATE_ERAT | 466 | PPC_INVALIDATE_ERAT |
467 | ld r1,PACAR1(r13) | ||
468 | ld r4,_MMCR0(r1) | ||
469 | mtspr SPRN_MMCR0,r4 | ||
457 | 1: | 470 | 1: |
458 | /* | 471 | /* |
459 | * POWER ISA 3. Use PSSCR to determine if we | 472 | * POWER ISA 3. Use PSSCR to determine if we |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 8541f18694a4..46b4e67d2372 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -402,6 +402,7 @@ void __init mem_init(void) | |||
402 | void free_initmem(void) | 402 | void free_initmem(void) |
403 | { | 403 | { |
404 | ppc_md.progress = ppc_printk_progress; | 404 | ppc_md.progress = ppc_printk_progress; |
405 | mark_initmem_nx(); | ||
405 | free_initmem_default(POISON_FREE_INITMEM); | 406 | free_initmem_default(POISON_FREE_INITMEM); |
406 | } | 407 | } |
407 | 408 | ||
diff --git a/arch/powerpc/mm/pgtable-hash64.c b/arch/powerpc/mm/pgtable-hash64.c index 188b4107584d..443a2c66a304 100644 --- a/arch/powerpc/mm/pgtable-hash64.c +++ b/arch/powerpc/mm/pgtable-hash64.c | |||
@@ -425,33 +425,51 @@ int hash__has_transparent_hugepage(void) | |||
425 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | 425 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ |
426 | 426 | ||
427 | #ifdef CONFIG_STRICT_KERNEL_RWX | 427 | #ifdef CONFIG_STRICT_KERNEL_RWX |
428 | void hash__mark_rodata_ro(void) | 428 | static bool hash__change_memory_range(unsigned long start, unsigned long end, |
429 | unsigned long newpp) | ||
429 | { | 430 | { |
430 | unsigned long start = (unsigned long)_stext; | ||
431 | unsigned long end = (unsigned long)__init_begin; | ||
432 | unsigned long idx; | 431 | unsigned long idx; |
433 | unsigned int step, shift; | 432 | unsigned int step, shift; |
434 | unsigned long newpp = PP_RXXX; | ||
435 | 433 | ||
436 | shift = mmu_psize_defs[mmu_linear_psize].shift; | 434 | shift = mmu_psize_defs[mmu_linear_psize].shift; |
437 | step = 1 << shift; | 435 | step = 1 << shift; |
438 | 436 | ||
439 | start = ((start + step - 1) >> shift) << shift; | 437 | start = ALIGN_DOWN(start, step); |
440 | end = (end >> shift) << shift; | 438 | end = ALIGN(end, step); // aligns up |
441 | 439 | ||
442 | pr_devel("marking ro start %lx, end %lx, step %x\n", | 440 | if (start >= end) |
443 | start, end, step); | 441 | return false; |
444 | 442 | ||
445 | if (start == end) { | 443 | pr_debug("Changing page protection on range 0x%lx-0x%lx, to 0x%lx, step 0x%x\n", |
446 | pr_warn("could not set rodata ro, relocate the start" | 444 | start, end, newpp, step); |
447 | " of the kernel to a 0x%x boundary\n", step); | ||
448 | return; | ||
449 | } | ||
450 | 445 | ||
451 | for (idx = start; idx < end; idx += step) | 446 | for (idx = start; idx < end; idx += step) |
452 | /* Not sure if we can do much with the return value */ | 447 | /* Not sure if we can do much with the return value */ |
453 | mmu_hash_ops.hpte_updateboltedpp(newpp, idx, mmu_linear_psize, | 448 | mmu_hash_ops.hpte_updateboltedpp(newpp, idx, mmu_linear_psize, |
454 | mmu_kernel_ssize); | 449 | mmu_kernel_ssize); |
455 | 450 | ||
451 | return true; | ||
452 | } | ||
453 | |||
454 | void hash__mark_rodata_ro(void) | ||
455 | { | ||
456 | unsigned long start, end; | ||
457 | |||
458 | start = (unsigned long)_stext; | ||
459 | end = (unsigned long)__init_begin; | ||
460 | |||
461 | WARN_ON(!hash__change_memory_range(start, end, PP_RXXX)); | ||
462 | } | ||
463 | |||
464 | void hash__mark_initmem_nx(void) | ||
465 | { | ||
466 | unsigned long start, end, pp; | ||
467 | |||
468 | start = (unsigned long)__init_begin; | ||
469 | end = (unsigned long)__init_end; | ||
470 | |||
471 | pp = htab_convert_pte_flags(pgprot_val(PAGE_KERNEL)); | ||
472 | |||
473 | WARN_ON(!hash__change_memory_range(start, end, pp)); | ||
456 | } | 474 | } |
457 | #endif | 475 | #endif |
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 8c13e4282308..5cc50d47ce3f 100644 --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c | |||
@@ -112,10 +112,9 @@ set_the_pte: | |||
112 | } | 112 | } |
113 | 113 | ||
114 | #ifdef CONFIG_STRICT_KERNEL_RWX | 114 | #ifdef CONFIG_STRICT_KERNEL_RWX |
115 | void radix__mark_rodata_ro(void) | 115 | void radix__change_memory_range(unsigned long start, unsigned long end, |
116 | unsigned long clear) | ||
116 | { | 117 | { |
117 | unsigned long start = (unsigned long)_stext; | ||
118 | unsigned long end = (unsigned long)__init_begin; | ||
119 | unsigned long idx; | 118 | unsigned long idx; |
120 | pgd_t *pgdp; | 119 | pgd_t *pgdp; |
121 | pud_t *pudp; | 120 | pud_t *pudp; |
@@ -125,7 +124,8 @@ void radix__mark_rodata_ro(void) | |||
125 | start = ALIGN_DOWN(start, PAGE_SIZE); | 124 | start = ALIGN_DOWN(start, PAGE_SIZE); |
126 | end = PAGE_ALIGN(end); // aligns up | 125 | end = PAGE_ALIGN(end); // aligns up |
127 | 126 | ||
128 | pr_devel("marking ro start %lx, end %lx\n", start, end); | 127 | pr_debug("Changing flags on range %lx-%lx removing 0x%lx\n", |
128 | start, end, clear); | ||
129 | 129 | ||
130 | for (idx = start; idx < end; idx += PAGE_SIZE) { | 130 | for (idx = start; idx < end; idx += PAGE_SIZE) { |
131 | pgdp = pgd_offset_k(idx); | 131 | pgdp = pgd_offset_k(idx); |
@@ -147,11 +147,29 @@ void radix__mark_rodata_ro(void) | |||
147 | if (!ptep) | 147 | if (!ptep) |
148 | continue; | 148 | continue; |
149 | update_the_pte: | 149 | update_the_pte: |
150 | radix__pte_update(&init_mm, idx, ptep, _PAGE_WRITE, 0, 0); | 150 | radix__pte_update(&init_mm, idx, ptep, clear, 0, 0); |
151 | } | 151 | } |
152 | 152 | ||
153 | radix__flush_tlb_kernel_range(start, end); | 153 | radix__flush_tlb_kernel_range(start, end); |
154 | } | 154 | } |
155 | |||
156 | void radix__mark_rodata_ro(void) | ||
157 | { | ||
158 | unsigned long start, end; | ||
159 | |||
160 | start = (unsigned long)_stext; | ||
161 | end = (unsigned long)__init_begin; | ||
162 | |||
163 | radix__change_memory_range(start, end, _PAGE_WRITE); | ||
164 | } | ||
165 | |||
166 | void radix__mark_initmem_nx(void) | ||
167 | { | ||
168 | unsigned long start = (unsigned long)__init_begin; | ||
169 | unsigned long end = (unsigned long)__init_end; | ||
170 | |||
171 | radix__change_memory_range(start, end, _PAGE_EXEC); | ||
172 | } | ||
155 | #endif /* CONFIG_STRICT_KERNEL_RWX */ | 173 | #endif /* CONFIG_STRICT_KERNEL_RWX */ |
156 | 174 | ||
157 | static inline void __meminit print_mapping(unsigned long start, | 175 | static inline void __meminit print_mapping(unsigned long start, |
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 5c0b795d656c..0736e94c7615 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -505,4 +505,12 @@ void mark_rodata_ro(void) | |||
505 | else | 505 | else |
506 | hash__mark_rodata_ro(); | 506 | hash__mark_rodata_ro(); |
507 | } | 507 | } |
508 | |||
509 | void mark_initmem_nx(void) | ||
510 | { | ||
511 | if (radix_enabled()) | ||
512 | radix__mark_initmem_nx(); | ||
513 | else | ||
514 | hash__mark_initmem_nx(); | ||
515 | } | ||
508 | #endif | 516 | #endif |
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 9b87abb178f0..cad6b57ce494 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c | |||
@@ -78,7 +78,7 @@ void opal_configure_cores(void) | |||
78 | * ie. Host hash supports hash guests | 78 | * ie. Host hash supports hash guests |
79 | * Host radix supports hash/radix guests | 79 | * Host radix supports hash/radix guests |
80 | */ | 80 | */ |
81 | if (cpu_has_feature(CPU_FTR_ARCH_300)) { | 81 | if (early_cpu_has_feature(CPU_FTR_ARCH_300)) { |
82 | reinit_flags |= OPAL_REINIT_CPUS_MMU_HASH; | 82 | reinit_flags |= OPAL_REINIT_CPUS_MMU_HASH; |
83 | if (early_radix_enabled()) | 83 | if (early_radix_enabled()) |
84 | reinit_flags |= OPAL_REINIT_CPUS_MMU_RADIX; | 84 | reinit_flags |= OPAL_REINIT_CPUS_MMU_RADIX; |
diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index 1bbd9dbfe4e0..ce9cc123988b 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h | |||
@@ -14,7 +14,7 @@ | |||
14 | ".section .rodata.str,\"aMS\",@progbits,1\n" \ | 14 | ".section .rodata.str,\"aMS\",@progbits,1\n" \ |
15 | "2: .asciz \""__FILE__"\"\n" \ | 15 | "2: .asciz \""__FILE__"\"\n" \ |
16 | ".previous\n" \ | 16 | ".previous\n" \ |
17 | ".section __bug_table,\"a\"\n" \ | 17 | ".section __bug_table,\"aw\"\n" \ |
18 | "3: .long 1b-3b,2b-3b\n" \ | 18 | "3: .long 1b-3b,2b-3b\n" \ |
19 | " .short %0,%1\n" \ | 19 | " .short %0,%1\n" \ |
20 | " .org 3b+%2\n" \ | 20 | " .org 3b+%2\n" \ |
@@ -30,7 +30,7 @@ | |||
30 | asm volatile( \ | 30 | asm volatile( \ |
31 | "0: j 0b+2\n" \ | 31 | "0: j 0b+2\n" \ |
32 | "1:\n" \ | 32 | "1:\n" \ |
33 | ".section __bug_table,\"a\"\n" \ | 33 | ".section __bug_table,\"aw\"\n" \ |
34 | "2: .long 1b-2b\n" \ | 34 | "2: .long 1b-2b\n" \ |
35 | " .short %0\n" \ | 35 | " .short %0\n" \ |
36 | " .org 2b+%1\n" \ | 36 | " .org 2b+%1\n" \ |
diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h index c9828f785ca0..5b5086367639 100644 --- a/arch/sh/include/asm/bug.h +++ b/arch/sh/include/asm/bug.h | |||
@@ -24,14 +24,14 @@ | |||
24 | */ | 24 | */ |
25 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 25 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
26 | #define _EMIT_BUG_ENTRY \ | 26 | #define _EMIT_BUG_ENTRY \ |
27 | "\t.pushsection __bug_table,\"a\"\n" \ | 27 | "\t.pushsection __bug_table,\"aw\"\n" \ |
28 | "2:\t.long 1b, %O1\n" \ | 28 | "2:\t.long 1b, %O1\n" \ |
29 | "\t.short %O2, %O3\n" \ | 29 | "\t.short %O2, %O3\n" \ |
30 | "\t.org 2b+%O4\n" \ | 30 | "\t.org 2b+%O4\n" \ |
31 | "\t.popsection\n" | 31 | "\t.popsection\n" |
32 | #else | 32 | #else |
33 | #define _EMIT_BUG_ENTRY \ | 33 | #define _EMIT_BUG_ENTRY \ |
34 | "\t.pushsection __bug_table,\"a\"\n" \ | 34 | "\t.pushsection __bug_table,\"aw\"\n" \ |
35 | "2:\t.long 1b\n" \ | 35 | "2:\t.long 1b\n" \ |
36 | "\t.short %O3\n" \ | 36 | "\t.short %O3\n" \ |
37 | "\t.org 2b+%O4\n" \ | 37 | "\t.org 2b+%O4\n" \ |
diff --git a/arch/sh/include/uapi/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h index eec7901e9e65..787bac9f67da 100644 --- a/arch/sh/include/uapi/asm/ioctls.h +++ b/arch/sh/include/uapi/asm/ioctls.h | |||
@@ -93,7 +93,7 @@ | |||
93 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ | 93 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
94 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ | 94 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
95 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ | 95 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
96 | #define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */ | 96 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ |
97 | 97 | ||
98 | #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */ | 98 | #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */ |
99 | #define TIOCSERGWILD _IOR('T', 84, int) /* 0x5454 */ | 99 | #define TIOCSERGWILD _IOR('T', 84, int) /* 0x5454 */ |
diff --git a/arch/sparc/include/asm/trap_block.h b/arch/sparc/include/asm/trap_block.h index ec9c04de3664..ff05992dae7a 100644 --- a/arch/sparc/include/asm/trap_block.h +++ b/arch/sparc/include/asm/trap_block.h | |||
@@ -54,6 +54,7 @@ extern struct trap_per_cpu trap_block[NR_CPUS]; | |||
54 | void init_cur_cpu_trap(struct thread_info *); | 54 | void init_cur_cpu_trap(struct thread_info *); |
55 | void setup_tba(void); | 55 | void setup_tba(void); |
56 | extern int ncpus_probed; | 56 | extern int ncpus_probed; |
57 | extern u64 cpu_mondo_counter[NR_CPUS]; | ||
57 | 58 | ||
58 | unsigned long real_hard_smp_processor_id(void); | 59 | unsigned long real_hard_smp_processor_id(void); |
59 | 60 | ||
diff --git a/arch/sparc/include/uapi/asm/ioctls.h b/arch/sparc/include/uapi/asm/ioctls.h index 6d27398632ea..f5df72b93bb2 100644 --- a/arch/sparc/include/uapi/asm/ioctls.h +++ b/arch/sparc/include/uapi/asm/ioctls.h | |||
@@ -88,7 +88,7 @@ | |||
88 | #define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ | 88 | #define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ |
89 | #define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ | 89 | #define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ |
90 | #define TIOCSIG _IOW('t', 136, int) /* Generate signal on Pty slave */ | 90 | #define TIOCSIG _IOW('t', 136, int) /* Generate signal on Pty slave */ |
91 | #define TIOCGPTPEER _IOR('t', 137, int) /* Safely open the slave */ | 91 | #define TIOCGPTPEER _IO('t', 137) /* Safely open the slave */ |
92 | 92 | ||
93 | /* Little f */ | 93 | /* Little f */ |
94 | #define FIOCLEX _IO('f', 1) | 94 | #define FIOCLEX _IO('f', 1) |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 24f21c726dfa..f10e2f712394 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -673,12 +673,14 @@ static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist, | |||
673 | static int dma_4v_supported(struct device *dev, u64 device_mask) | 673 | static int dma_4v_supported(struct device *dev, u64 device_mask) |
674 | { | 674 | { |
675 | struct iommu *iommu = dev->archdata.iommu; | 675 | struct iommu *iommu = dev->archdata.iommu; |
676 | u64 dma_addr_mask; | 676 | u64 dma_addr_mask = iommu->dma_addr_mask; |
677 | 677 | ||
678 | if (device_mask > DMA_BIT_MASK(32) && iommu->atu) | 678 | if (device_mask > DMA_BIT_MASK(32)) { |
679 | dma_addr_mask = iommu->atu->dma_addr_mask; | 679 | if (iommu->atu) |
680 | else | 680 | dma_addr_mask = iommu->atu->dma_addr_mask; |
681 | dma_addr_mask = iommu->dma_addr_mask; | 681 | else |
682 | return 0; | ||
683 | } | ||
682 | 684 | ||
683 | if ((device_mask & dma_addr_mask) == dma_addr_mask) | 685 | if ((device_mask & dma_addr_mask) == dma_addr_mask) |
684 | return 1; | 686 | return 1; |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index fdf31040a7dc..3218bc43302e 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -622,22 +622,48 @@ retry: | |||
622 | } | 622 | } |
623 | } | 623 | } |
624 | 624 | ||
625 | /* Multi-cpu list version. */ | 625 | #define CPU_MONDO_COUNTER(cpuid) (cpu_mondo_counter[cpuid]) |
626 | #define MONDO_USEC_WAIT_MIN 2 | ||
627 | #define MONDO_USEC_WAIT_MAX 100 | ||
628 | #define MONDO_RETRY_LIMIT 500000 | ||
629 | |||
630 | /* Multi-cpu list version. | ||
631 | * | ||
632 | * Deliver xcalls to 'cnt' number of cpus in 'cpu_list'. | ||
633 | * Sometimes not all cpus receive the mondo, requiring us to re-send | ||
634 | * the mondo until all cpus have received, or cpus are truly stuck | ||
635 | * unable to receive mondo, and we timeout. | ||
636 | * Occasionally a target cpu strand is borrowed briefly by hypervisor to | ||
637 | * perform guest service, such as PCIe error handling. Consider the | ||
638 | * service time, 1 second overall wait is reasonable for 1 cpu. | ||
639 | * Here two in-between mondo check wait time are defined: 2 usec for | ||
640 | * single cpu quick turn around and up to 100usec for large cpu count. | ||
641 | * Deliver mondo to large number of cpus could take longer, we adjusts | ||
642 | * the retry count as long as target cpus are making forward progress. | ||
643 | */ | ||
626 | static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt) | 644 | static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt) |
627 | { | 645 | { |
628 | int retries, this_cpu, prev_sent, i, saw_cpu_error; | 646 | int this_cpu, tot_cpus, prev_sent, i, rem; |
647 | int usec_wait, retries, tot_retries; | ||
648 | u16 first_cpu = 0xffff; | ||
649 | unsigned long xc_rcvd = 0; | ||
629 | unsigned long status; | 650 | unsigned long status; |
651 | int ecpuerror_id = 0; | ||
652 | int enocpu_id = 0; | ||
630 | u16 *cpu_list; | 653 | u16 *cpu_list; |
654 | u16 cpu; | ||
631 | 655 | ||
632 | this_cpu = smp_processor_id(); | 656 | this_cpu = smp_processor_id(); |
633 | |||
634 | cpu_list = __va(tb->cpu_list_pa); | 657 | cpu_list = __va(tb->cpu_list_pa); |
635 | 658 | usec_wait = cnt * MONDO_USEC_WAIT_MIN; | |
636 | saw_cpu_error = 0; | 659 | if (usec_wait > MONDO_USEC_WAIT_MAX) |
637 | retries = 0; | 660 | usec_wait = MONDO_USEC_WAIT_MAX; |
661 | retries = tot_retries = 0; | ||
662 | tot_cpus = cnt; | ||
638 | prev_sent = 0; | 663 | prev_sent = 0; |
664 | |||
639 | do { | 665 | do { |
640 | int forward_progress, n_sent; | 666 | int n_sent, mondo_delivered, target_cpu_busy; |
641 | 667 | ||
642 | status = sun4v_cpu_mondo_send(cnt, | 668 | status = sun4v_cpu_mondo_send(cnt, |
643 | tb->cpu_list_pa, | 669 | tb->cpu_list_pa, |
@@ -645,94 +671,113 @@ static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt) | |||
645 | 671 | ||
646 | /* HV_EOK means all cpus received the xcall, we're done. */ | 672 | /* HV_EOK means all cpus received the xcall, we're done. */ |
647 | if (likely(status == HV_EOK)) | 673 | if (likely(status == HV_EOK)) |
648 | break; | 674 | goto xcall_done; |
675 | |||
676 | /* If not these non-fatal errors, panic */ | ||
677 | if (unlikely((status != HV_EWOULDBLOCK) && | ||
678 | (status != HV_ECPUERROR) && | ||
679 | (status != HV_ENOCPU))) | ||
680 | goto fatal_errors; | ||
649 | 681 | ||
650 | /* First, see if we made any forward progress. | 682 | /* First, see if we made any forward progress. |
651 | * | 683 | * |
684 | * Go through the cpu_list, count the target cpus that have | ||
685 | * received our mondo (n_sent), and those that did not (rem). | ||
686 | * Re-pack cpu_list with the cpus remain to be retried in the | ||
687 | * front - this simplifies tracking the truly stalled cpus. | ||
688 | * | ||
652 | * The hypervisor indicates successful sends by setting | 689 | * The hypervisor indicates successful sends by setting |
653 | * cpu list entries to the value 0xffff. | 690 | * cpu list entries to the value 0xffff. |
691 | * | ||
692 | * EWOULDBLOCK means some target cpus did not receive the | ||
693 | * mondo and retry usually helps. | ||
694 | * | ||
695 | * ECPUERROR means at least one target cpu is in error state, | ||
696 | * it's usually safe to skip the faulty cpu and retry. | ||
697 | * | ||
698 | * ENOCPU means one of the target cpu doesn't belong to the | ||
699 | * domain, perhaps offlined which is unexpected, but not | ||
700 | * fatal and it's okay to skip the offlined cpu. | ||
654 | */ | 701 | */ |
702 | rem = 0; | ||
655 | n_sent = 0; | 703 | n_sent = 0; |
656 | for (i = 0; i < cnt; i++) { | 704 | for (i = 0; i < cnt; i++) { |
657 | if (likely(cpu_list[i] == 0xffff)) | 705 | cpu = cpu_list[i]; |
706 | if (likely(cpu == 0xffff)) { | ||
658 | n_sent++; | 707 | n_sent++; |
708 | } else if ((status == HV_ECPUERROR) && | ||
709 | (sun4v_cpu_state(cpu) == HV_CPU_STATE_ERROR)) { | ||
710 | ecpuerror_id = cpu + 1; | ||
711 | } else if (status == HV_ENOCPU && !cpu_online(cpu)) { | ||
712 | enocpu_id = cpu + 1; | ||
713 | } else { | ||
714 | cpu_list[rem++] = cpu; | ||
715 | } | ||
659 | } | 716 | } |
660 | 717 | ||
661 | forward_progress = 0; | 718 | /* No cpu remained, we're done. */ |
662 | if (n_sent > prev_sent) | 719 | if (rem == 0) |
663 | forward_progress = 1; | 720 | break; |
664 | 721 | ||
665 | prev_sent = n_sent; | 722 | /* Otherwise, update the cpu count for retry. */ |
723 | cnt = rem; | ||
666 | 724 | ||
667 | /* If we get a HV_ECPUERROR, then one or more of the cpus | 725 | /* Record the overall number of mondos received by the |
668 | * in the list are in error state. Use the cpu_state() | 726 | * first of the remaining cpus. |
669 | * hypervisor call to find out which cpus are in error state. | ||
670 | */ | 727 | */ |
671 | if (unlikely(status == HV_ECPUERROR)) { | 728 | if (first_cpu != cpu_list[0]) { |
672 | for (i = 0; i < cnt; i++) { | 729 | first_cpu = cpu_list[0]; |
673 | long err; | 730 | xc_rcvd = CPU_MONDO_COUNTER(first_cpu); |
674 | u16 cpu; | 731 | } |
675 | 732 | ||
676 | cpu = cpu_list[i]; | 733 | /* Was any mondo delivered successfully? */ |
677 | if (cpu == 0xffff) | 734 | mondo_delivered = (n_sent > prev_sent); |
678 | continue; | 735 | prev_sent = n_sent; |
679 | 736 | ||
680 | err = sun4v_cpu_state(cpu); | 737 | /* or, was any target cpu busy processing other mondos? */ |
681 | if (err == HV_CPU_STATE_ERROR) { | 738 | target_cpu_busy = (xc_rcvd < CPU_MONDO_COUNTER(first_cpu)); |
682 | saw_cpu_error = (cpu + 1); | 739 | xc_rcvd = CPU_MONDO_COUNTER(first_cpu); |
683 | cpu_list[i] = 0xffff; | ||
684 | } | ||
685 | } | ||
686 | } else if (unlikely(status != HV_EWOULDBLOCK)) | ||
687 | goto fatal_mondo_error; | ||
688 | 740 | ||
689 | /* Don't bother rewriting the CPU list, just leave the | 741 | /* Retry count is for no progress. If we're making progress, |
690 | * 0xffff and non-0xffff entries in there and the | 742 | * reset the retry count. |
691 | * hypervisor will do the right thing. | ||
692 | * | ||
693 | * Only advance timeout state if we didn't make any | ||
694 | * forward progress. | ||
695 | */ | 743 | */ |
696 | if (unlikely(!forward_progress)) { | 744 | if (likely(mondo_delivered || target_cpu_busy)) { |
697 | if (unlikely(++retries > 10000)) | 745 | tot_retries += retries; |
698 | goto fatal_mondo_timeout; | 746 | retries = 0; |
699 | 747 | } else if (unlikely(retries > MONDO_RETRY_LIMIT)) { | |
700 | /* Delay a little bit to let other cpus catch up | 748 | goto fatal_mondo_timeout; |
701 | * on their cpu mondo queue work. | ||
702 | */ | ||
703 | udelay(2 * cnt); | ||
704 | } | 749 | } |
705 | } while (1); | ||
706 | 750 | ||
707 | if (unlikely(saw_cpu_error)) | 751 | /* Delay a little bit to let other cpus catch up on |
708 | goto fatal_mondo_cpu_error; | 752 | * their cpu mondo queue work. |
753 | */ | ||
754 | if (!mondo_delivered) | ||
755 | udelay(usec_wait); | ||
709 | 756 | ||
710 | return; | 757 | retries++; |
758 | } while (1); | ||
711 | 759 | ||
712 | fatal_mondo_cpu_error: | 760 | xcall_done: |
713 | printk(KERN_CRIT "CPU[%d]: SUN4V mondo cpu error, some target cpus " | 761 | if (unlikely(ecpuerror_id > 0)) { |
714 | "(including %d) were in error state\n", | 762 | pr_crit("CPU[%d]: SUN4V mondo cpu error, target cpu(%d) was in error state\n", |
715 | this_cpu, saw_cpu_error - 1); | 763 | this_cpu, ecpuerror_id - 1); |
764 | } else if (unlikely(enocpu_id > 0)) { | ||
765 | pr_crit("CPU[%d]: SUN4V mondo cpu error, target cpu(%d) does not belong to the domain\n", | ||
766 | this_cpu, enocpu_id - 1); | ||
767 | } | ||
716 | return; | 768 | return; |
717 | 769 | ||
770 | fatal_errors: | ||
771 | /* fatal errors include bad alignment, etc */ | ||
772 | pr_crit("CPU[%d]: Args were cnt(%d) cpulist_pa(%lx) mondo_block_pa(%lx)\n", | ||
773 | this_cpu, tot_cpus, tb->cpu_list_pa, tb->cpu_mondo_block_pa); | ||
774 | panic("Unexpected SUN4V mondo error %lu\n", status); | ||
775 | |||
718 | fatal_mondo_timeout: | 776 | fatal_mondo_timeout: |
719 | printk(KERN_CRIT "CPU[%d]: SUN4V mondo timeout, no forward " | 777 | /* some cpus being non-responsive to the cpu mondo */ |
720 | " progress after %d retries.\n", | 778 | pr_crit("CPU[%d]: SUN4V mondo timeout, cpu(%d) made no forward progress after %d retries. Total target cpus(%d).\n", |
721 | this_cpu, retries); | 779 | this_cpu, first_cpu, (tot_retries + retries), tot_cpus); |
722 | goto dump_cpu_list_and_out; | 780 | panic("SUN4V mondo timeout panic\n"); |
723 | |||
724 | fatal_mondo_error: | ||
725 | printk(KERN_CRIT "CPU[%d]: Unexpected SUN4V mondo error %lu\n", | ||
726 | this_cpu, status); | ||
727 | printk(KERN_CRIT "CPU[%d]: Args were cnt(%d) cpulist_pa(%lx) " | ||
728 | "mondo_block_pa(%lx)\n", | ||
729 | this_cpu, cnt, tb->cpu_list_pa, tb->cpu_mondo_block_pa); | ||
730 | |||
731 | dump_cpu_list_and_out: | ||
732 | printk(KERN_CRIT "CPU[%d]: CPU list [ ", this_cpu); | ||
733 | for (i = 0; i < cnt; i++) | ||
734 | printk("%u ", cpu_list[i]); | ||
735 | printk("]\n"); | ||
736 | } | 781 | } |
737 | 782 | ||
738 | static void (*xcall_deliver_impl)(struct trap_per_cpu *, int); | 783 | static void (*xcall_deliver_impl)(struct trap_per_cpu *, int); |
diff --git a/arch/sparc/kernel/sun4v_ivec.S b/arch/sparc/kernel/sun4v_ivec.S index 559bc5e9c199..34631995859a 100644 --- a/arch/sparc/kernel/sun4v_ivec.S +++ b/arch/sparc/kernel/sun4v_ivec.S | |||
@@ -26,6 +26,21 @@ sun4v_cpu_mondo: | |||
26 | ldxa [%g0] ASI_SCRATCHPAD, %g4 | 26 | ldxa [%g0] ASI_SCRATCHPAD, %g4 |
27 | sub %g4, TRAP_PER_CPU_FAULT_INFO, %g4 | 27 | sub %g4, TRAP_PER_CPU_FAULT_INFO, %g4 |
28 | 28 | ||
29 | /* Get smp_processor_id() into %g3 */ | ||
30 | sethi %hi(trap_block), %g5 | ||
31 | or %g5, %lo(trap_block), %g5 | ||
32 | sub %g4, %g5, %g3 | ||
33 | srlx %g3, TRAP_BLOCK_SZ_SHIFT, %g3 | ||
34 | |||
35 | /* Increment cpu_mondo_counter[smp_processor_id()] */ | ||
36 | sethi %hi(cpu_mondo_counter), %g5 | ||
37 | or %g5, %lo(cpu_mondo_counter), %g5 | ||
38 | sllx %g3, 3, %g3 | ||
39 | add %g5, %g3, %g5 | ||
40 | ldx [%g5], %g3 | ||
41 | add %g3, 1, %g3 | ||
42 | stx %g3, [%g5] | ||
43 | |||
29 | /* Get CPU mondo queue base phys address into %g7. */ | 44 | /* Get CPU mondo queue base phys address into %g7. */ |
30 | ldx [%g4 + TRAP_PER_CPU_CPU_MONDO_PA], %g7 | 45 | ldx [%g4 + TRAP_PER_CPU_CPU_MONDO_PA], %g7 |
31 | 46 | ||
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index 196ee5eb4d48..ad31af1dd726 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -2733,6 +2733,7 @@ void do_getpsr(struct pt_regs *regs) | |||
2733 | } | 2733 | } |
2734 | } | 2734 | } |
2735 | 2735 | ||
2736 | u64 cpu_mondo_counter[NR_CPUS] = {0}; | ||
2736 | struct trap_per_cpu trap_block[NR_CPUS]; | 2737 | struct trap_per_cpu trap_block[NR_CPUS]; |
2737 | EXPORT_SYMBOL(trap_block); | 2738 | EXPORT_SYMBOL(trap_block); |
2738 | 2739 | ||
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index fcb7604172ce..cd20ca0b4043 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -348,6 +348,7 @@ config X86_DEBUG_FPU | |||
348 | 348 | ||
349 | config PUNIT_ATOM_DEBUG | 349 | config PUNIT_ATOM_DEBUG |
350 | tristate "ATOM Punit debug driver" | 350 | tristate "ATOM Punit debug driver" |
351 | depends on PCI | ||
351 | select DEBUG_FS | 352 | select DEBUG_FS |
352 | select IOSF_MBI | 353 | select IOSF_MBI |
353 | ---help--- | 354 | ---help--- |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 0d810fb15eac..d88a2fddba8c 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -73,12 +73,13 @@ UBSAN_SANITIZE := n | |||
73 | $(obj)/bzImage: asflags-y := $(SVGA_MODE) | 73 | $(obj)/bzImage: asflags-y := $(SVGA_MODE) |
74 | 74 | ||
75 | quiet_cmd_image = BUILD $@ | 75 | quiet_cmd_image = BUILD $@ |
76 | silent_redirect_image = >/dev/null | ||
76 | cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \ | 77 | cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \ |
77 | $(obj)/zoffset.h $@ | 78 | $(obj)/zoffset.h $@ $($(quiet)redirect_image) |
78 | 79 | ||
79 | $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE | 80 | $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE |
80 | $(call if_changed,image) | 81 | $(call if_changed,image) |
81 | @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' | 82 | @$(kecho) 'Kernel: $@ is ready' ' (#'`cat .version`')' |
82 | 83 | ||
83 | OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note -R .comment -S | 84 | OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note -R .comment -S |
84 | $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE | 85 | $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE |
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig index 6cf79e1a6830..0eb9f92f3717 100644 --- a/arch/x86/configs/i386_defconfig +++ b/arch/x86/configs/i386_defconfig | |||
@@ -1,5 +1,4 @@ | |||
1 | # CONFIG_64BIT is not set | 1 | # CONFIG_64BIT is not set |
2 | CONFIG_EXPERIMENTAL=y | ||
3 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
4 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
5 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
@@ -125,7 +124,6 @@ CONFIG_NF_CONNTRACK_IPV4=y | |||
125 | CONFIG_IP_NF_IPTABLES=y | 124 | CONFIG_IP_NF_IPTABLES=y |
126 | CONFIG_IP_NF_FILTER=y | 125 | CONFIG_IP_NF_FILTER=y |
127 | CONFIG_IP_NF_TARGET_REJECT=y | 126 | CONFIG_IP_NF_TARGET_REJECT=y |
128 | CONFIG_IP_NF_TARGET_ULOG=y | ||
129 | CONFIG_NF_NAT=y | 127 | CONFIG_NF_NAT=y |
130 | CONFIG_IP_NF_TARGET_MASQUERADE=y | 128 | CONFIG_IP_NF_TARGET_MASQUERADE=y |
131 | CONFIG_IP_NF_MANGLE=y | 129 | CONFIG_IP_NF_MANGLE=y |
@@ -255,7 +253,6 @@ CONFIG_USB_OHCI_HCD=y | |||
255 | CONFIG_USB_UHCI_HCD=y | 253 | CONFIG_USB_UHCI_HCD=y |
256 | CONFIG_USB_PRINTER=y | 254 | CONFIG_USB_PRINTER=y |
257 | CONFIG_USB_STORAGE=y | 255 | CONFIG_USB_STORAGE=y |
258 | CONFIG_USB_LIBUSUAL=y | ||
259 | CONFIG_EDAC=y | 256 | CONFIG_EDAC=y |
260 | CONFIG_RTC_CLASS=y | 257 | CONFIG_RTC_CLASS=y |
261 | # CONFIG_RTC_HCTOSYS is not set | 258 | # CONFIG_RTC_HCTOSYS is not set |
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig index de45f57b410d..4a4b16e56d35 100644 --- a/arch/x86/configs/x86_64_defconfig +++ b/arch/x86/configs/x86_64_defconfig | |||
@@ -1,4 +1,3 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 1 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 3 | CONFIG_POSIX_MQUEUE=y |
@@ -124,7 +123,6 @@ CONFIG_NF_CONNTRACK_IPV4=y | |||
124 | CONFIG_IP_NF_IPTABLES=y | 123 | CONFIG_IP_NF_IPTABLES=y |
125 | CONFIG_IP_NF_FILTER=y | 124 | CONFIG_IP_NF_FILTER=y |
126 | CONFIG_IP_NF_TARGET_REJECT=y | 125 | CONFIG_IP_NF_TARGET_REJECT=y |
127 | CONFIG_IP_NF_TARGET_ULOG=y | ||
128 | CONFIG_NF_NAT=y | 126 | CONFIG_NF_NAT=y |
129 | CONFIG_IP_NF_TARGET_MASQUERADE=y | 127 | CONFIG_IP_NF_TARGET_MASQUERADE=y |
130 | CONFIG_IP_NF_MANGLE=y | 128 | CONFIG_IP_NF_MANGLE=y |
@@ -251,7 +249,6 @@ CONFIG_USB_OHCI_HCD=y | |||
251 | CONFIG_USB_UHCI_HCD=y | 249 | CONFIG_USB_UHCI_HCD=y |
252 | CONFIG_USB_PRINTER=y | 250 | CONFIG_USB_PRINTER=y |
253 | CONFIG_USB_STORAGE=y | 251 | CONFIG_USB_STORAGE=y |
254 | CONFIG_USB_LIBUSUAL=y | ||
255 | CONFIG_EDAC=y | 252 | CONFIG_EDAC=y |
256 | CONFIG_RTC_CLASS=y | 253 | CONFIG_RTC_CLASS=y |
257 | # CONFIG_RTC_HCTOSYS is not set | 254 | # CONFIG_RTC_HCTOSYS is not set |
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index ff1ea2fb9705..8e3db8f642a7 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c | |||
@@ -191,8 +191,8 @@ static void release_pmc_hardware(void) {} | |||
191 | 191 | ||
192 | static bool check_hw_exists(void) | 192 | static bool check_hw_exists(void) |
193 | { | 193 | { |
194 | u64 val, val_fail, val_new= ~0; | 194 | u64 val, val_fail = -1, val_new= ~0; |
195 | int i, reg, reg_fail, ret = 0; | 195 | int i, reg, reg_fail = -1, ret = 0; |
196 | int bios_fail = 0; | 196 | int bios_fail = 0; |
197 | int reg_safe = -1; | 197 | int reg_safe = -1; |
198 | 198 | ||
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index aa62437d1aa1..98b0f0729527 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c | |||
@@ -1708,6 +1708,120 @@ static __initconst const u64 glm_hw_cache_extra_regs | |||
1708 | }, | 1708 | }, |
1709 | }; | 1709 | }; |
1710 | 1710 | ||
1711 | static __initconst const u64 glp_hw_cache_event_ids | ||
1712 | [PERF_COUNT_HW_CACHE_MAX] | ||
1713 | [PERF_COUNT_HW_CACHE_OP_MAX] | ||
1714 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { | ||
1715 | [C(L1D)] = { | ||
1716 | [C(OP_READ)] = { | ||
1717 | [C(RESULT_ACCESS)] = 0x81d0, /* MEM_UOPS_RETIRED.ALL_LOADS */ | ||
1718 | [C(RESULT_MISS)] = 0x0, | ||
1719 | }, | ||
1720 | [C(OP_WRITE)] = { | ||
1721 | [C(RESULT_ACCESS)] = 0x82d0, /* MEM_UOPS_RETIRED.ALL_STORES */ | ||
1722 | [C(RESULT_MISS)] = 0x0, | ||
1723 | }, | ||
1724 | [C(OP_PREFETCH)] = { | ||
1725 | [C(RESULT_ACCESS)] = 0x0, | ||
1726 | [C(RESULT_MISS)] = 0x0, | ||
1727 | }, | ||
1728 | }, | ||
1729 | [C(L1I)] = { | ||
1730 | [C(OP_READ)] = { | ||
1731 | [C(RESULT_ACCESS)] = 0x0380, /* ICACHE.ACCESSES */ | ||
1732 | [C(RESULT_MISS)] = 0x0280, /* ICACHE.MISSES */ | ||
1733 | }, | ||
1734 | [C(OP_WRITE)] = { | ||
1735 | [C(RESULT_ACCESS)] = -1, | ||
1736 | [C(RESULT_MISS)] = -1, | ||
1737 | }, | ||
1738 | [C(OP_PREFETCH)] = { | ||
1739 | [C(RESULT_ACCESS)] = 0x0, | ||
1740 | [C(RESULT_MISS)] = 0x0, | ||
1741 | }, | ||
1742 | }, | ||
1743 | [C(LL)] = { | ||
1744 | [C(OP_READ)] = { | ||
1745 | [C(RESULT_ACCESS)] = 0x1b7, /* OFFCORE_RESPONSE */ | ||
1746 | [C(RESULT_MISS)] = 0x1b7, /* OFFCORE_RESPONSE */ | ||
1747 | }, | ||
1748 | [C(OP_WRITE)] = { | ||
1749 | [C(RESULT_ACCESS)] = 0x1b7, /* OFFCORE_RESPONSE */ | ||
1750 | [C(RESULT_MISS)] = 0x1b7, /* OFFCORE_RESPONSE */ | ||
1751 | }, | ||
1752 | [C(OP_PREFETCH)] = { | ||
1753 | [C(RESULT_ACCESS)] = 0x0, | ||
1754 | [C(RESULT_MISS)] = 0x0, | ||
1755 | }, | ||
1756 | }, | ||
1757 | [C(DTLB)] = { | ||
1758 | [C(OP_READ)] = { | ||
1759 | [C(RESULT_ACCESS)] = 0x81d0, /* MEM_UOPS_RETIRED.ALL_LOADS */ | ||
1760 | [C(RESULT_MISS)] = 0xe08, /* DTLB_LOAD_MISSES.WALK_COMPLETED */ | ||
1761 | }, | ||
1762 | [C(OP_WRITE)] = { | ||
1763 | [C(RESULT_ACCESS)] = 0x82d0, /* MEM_UOPS_RETIRED.ALL_STORES */ | ||
1764 | [C(RESULT_MISS)] = 0xe49, /* DTLB_STORE_MISSES.WALK_COMPLETED */ | ||
1765 | }, | ||
1766 | [C(OP_PREFETCH)] = { | ||
1767 | [C(RESULT_ACCESS)] = 0x0, | ||
1768 | [C(RESULT_MISS)] = 0x0, | ||
1769 | }, | ||
1770 | }, | ||
1771 | [C(ITLB)] = { | ||
1772 | [C(OP_READ)] = { | ||
1773 | [C(RESULT_ACCESS)] = 0x00c0, /* INST_RETIRED.ANY_P */ | ||
1774 | [C(RESULT_MISS)] = 0x0481, /* ITLB.MISS */ | ||
1775 | }, | ||
1776 | [C(OP_WRITE)] = { | ||
1777 | [C(RESULT_ACCESS)] = -1, | ||
1778 | [C(RESULT_MISS)] = -1, | ||
1779 | }, | ||
1780 | [C(OP_PREFETCH)] = { | ||
1781 | [C(RESULT_ACCESS)] = -1, | ||
1782 | [C(RESULT_MISS)] = -1, | ||
1783 | }, | ||
1784 | }, | ||
1785 | [C(BPU)] = { | ||
1786 | [C(OP_READ)] = { | ||
1787 | [C(RESULT_ACCESS)] = 0x00c4, /* BR_INST_RETIRED.ALL_BRANCHES */ | ||
1788 | [C(RESULT_MISS)] = 0x00c5, /* BR_MISP_RETIRED.ALL_BRANCHES */ | ||
1789 | }, | ||
1790 | [C(OP_WRITE)] = { | ||
1791 | [C(RESULT_ACCESS)] = -1, | ||
1792 | [C(RESULT_MISS)] = -1, | ||
1793 | }, | ||
1794 | [C(OP_PREFETCH)] = { | ||
1795 | [C(RESULT_ACCESS)] = -1, | ||
1796 | [C(RESULT_MISS)] = -1, | ||
1797 | }, | ||
1798 | }, | ||
1799 | }; | ||
1800 | |||
1801 | static __initconst const u64 glp_hw_cache_extra_regs | ||
1802 | [PERF_COUNT_HW_CACHE_MAX] | ||
1803 | [PERF_COUNT_HW_CACHE_OP_MAX] | ||
1804 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { | ||
1805 | [C(LL)] = { | ||
1806 | [C(OP_READ)] = { | ||
1807 | [C(RESULT_ACCESS)] = GLM_DEMAND_READ| | ||
1808 | GLM_LLC_ACCESS, | ||
1809 | [C(RESULT_MISS)] = GLM_DEMAND_READ| | ||
1810 | GLM_LLC_MISS, | ||
1811 | }, | ||
1812 | [C(OP_WRITE)] = { | ||
1813 | [C(RESULT_ACCESS)] = GLM_DEMAND_WRITE| | ||
1814 | GLM_LLC_ACCESS, | ||
1815 | [C(RESULT_MISS)] = GLM_DEMAND_WRITE| | ||
1816 | GLM_LLC_MISS, | ||
1817 | }, | ||
1818 | [C(OP_PREFETCH)] = { | ||
1819 | [C(RESULT_ACCESS)] = 0x0, | ||
1820 | [C(RESULT_MISS)] = 0x0, | ||
1821 | }, | ||
1822 | }, | ||
1823 | }; | ||
1824 | |||
1711 | #define KNL_OT_L2_HITE BIT_ULL(19) /* Other Tile L2 Hit */ | 1825 | #define KNL_OT_L2_HITE BIT_ULL(19) /* Other Tile L2 Hit */ |
1712 | #define KNL_OT_L2_HITF BIT_ULL(20) /* Other Tile L2 Hit */ | 1826 | #define KNL_OT_L2_HITF BIT_ULL(20) /* Other Tile L2 Hit */ |
1713 | #define KNL_MCDRAM_LOCAL BIT_ULL(21) | 1827 | #define KNL_MCDRAM_LOCAL BIT_ULL(21) |
@@ -3016,6 +3130,9 @@ static int hsw_hw_config(struct perf_event *event) | |||
3016 | return 0; | 3130 | return 0; |
3017 | } | 3131 | } |
3018 | 3132 | ||
3133 | static struct event_constraint counter0_constraint = | ||
3134 | INTEL_ALL_EVENT_CONSTRAINT(0, 0x1); | ||
3135 | |||
3019 | static struct event_constraint counter2_constraint = | 3136 | static struct event_constraint counter2_constraint = |
3020 | EVENT_CONSTRAINT(0, 0x4, 0); | 3137 | EVENT_CONSTRAINT(0, 0x4, 0); |
3021 | 3138 | ||
@@ -3037,6 +3154,21 @@ hsw_get_event_constraints(struct cpu_hw_events *cpuc, int idx, | |||
3037 | return c; | 3154 | return c; |
3038 | } | 3155 | } |
3039 | 3156 | ||
3157 | static struct event_constraint * | ||
3158 | glp_get_event_constraints(struct cpu_hw_events *cpuc, int idx, | ||
3159 | struct perf_event *event) | ||
3160 | { | ||
3161 | struct event_constraint *c; | ||
3162 | |||
3163 | /* :ppp means to do reduced skid PEBS which is PMC0 only. */ | ||
3164 | if (event->attr.precise_ip == 3) | ||
3165 | return &counter0_constraint; | ||
3166 | |||
3167 | c = intel_get_event_constraints(cpuc, idx, event); | ||
3168 | |||
3169 | return c; | ||
3170 | } | ||
3171 | |||
3040 | /* | 3172 | /* |
3041 | * Broadwell: | 3173 | * Broadwell: |
3042 | * | 3174 | * |
@@ -3265,10 +3397,8 @@ static void intel_pmu_cpu_dying(int cpu) | |||
3265 | static void intel_pmu_sched_task(struct perf_event_context *ctx, | 3397 | static void intel_pmu_sched_task(struct perf_event_context *ctx, |
3266 | bool sched_in) | 3398 | bool sched_in) |
3267 | { | 3399 | { |
3268 | if (x86_pmu.pebs_active) | 3400 | intel_pmu_pebs_sched_task(ctx, sched_in); |
3269 | intel_pmu_pebs_sched_task(ctx, sched_in); | 3401 | intel_pmu_lbr_sched_task(ctx, sched_in); |
3270 | if (x86_pmu.lbr_nr) | ||
3271 | intel_pmu_lbr_sched_task(ctx, sched_in); | ||
3272 | } | 3402 | } |
3273 | 3403 | ||
3274 | PMU_FORMAT_ATTR(offcore_rsp, "config1:0-63"); | 3404 | PMU_FORMAT_ATTR(offcore_rsp, "config1:0-63"); |
@@ -3838,6 +3968,32 @@ __init int intel_pmu_init(void) | |||
3838 | pr_cont("Goldmont events, "); | 3968 | pr_cont("Goldmont events, "); |
3839 | break; | 3969 | break; |
3840 | 3970 | ||
3971 | case INTEL_FAM6_ATOM_GEMINI_LAKE: | ||
3972 | memcpy(hw_cache_event_ids, glp_hw_cache_event_ids, | ||
3973 | sizeof(hw_cache_event_ids)); | ||
3974 | memcpy(hw_cache_extra_regs, glp_hw_cache_extra_regs, | ||
3975 | sizeof(hw_cache_extra_regs)); | ||
3976 | |||
3977 | intel_pmu_lbr_init_skl(); | ||
3978 | |||
3979 | x86_pmu.event_constraints = intel_slm_event_constraints; | ||
3980 | x86_pmu.pebs_constraints = intel_glp_pebs_event_constraints; | ||
3981 | x86_pmu.extra_regs = intel_glm_extra_regs; | ||
3982 | /* | ||
3983 | * It's recommended to use CPU_CLK_UNHALTED.CORE_P + NPEBS | ||
3984 | * for precise cycles. | ||
3985 | */ | ||
3986 | x86_pmu.pebs_aliases = NULL; | ||
3987 | x86_pmu.pebs_prec_dist = true; | ||
3988 | x86_pmu.lbr_pt_coexist = true; | ||
3989 | x86_pmu.flags |= PMU_FL_HAS_RSP_1; | ||
3990 | x86_pmu.get_event_constraints = glp_get_event_constraints; | ||
3991 | x86_pmu.cpu_events = glm_events_attrs; | ||
3992 | /* Goldmont Plus has 4-wide pipeline */ | ||
3993 | event_attr_td_total_slots_scale_glm.event_str = "4"; | ||
3994 | pr_cont("Goldmont plus events, "); | ||
3995 | break; | ||
3996 | |||
3841 | case INTEL_FAM6_WESTMERE: | 3997 | case INTEL_FAM6_WESTMERE: |
3842 | case INTEL_FAM6_WESTMERE_EP: | 3998 | case INTEL_FAM6_WESTMERE_EP: |
3843 | case INTEL_FAM6_WESTMERE_EX: | 3999 | case INTEL_FAM6_WESTMERE_EX: |
diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c index 238ae3248ba5..4cf100ff2a37 100644 --- a/arch/x86/events/intel/cstate.c +++ b/arch/x86/events/intel/cstate.c | |||
@@ -40,16 +40,16 @@ | |||
40 | * Model specific counters: | 40 | * Model specific counters: |
41 | * MSR_CORE_C1_RES: CORE C1 Residency Counter | 41 | * MSR_CORE_C1_RES: CORE C1 Residency Counter |
42 | * perf code: 0x00 | 42 | * perf code: 0x00 |
43 | * Available model: SLM,AMT | 43 | * Available model: SLM,AMT,GLM |
44 | * Scope: Core (each processor core has a MSR) | 44 | * Scope: Core (each processor core has a MSR) |
45 | * MSR_CORE_C3_RESIDENCY: CORE C3 Residency Counter | 45 | * MSR_CORE_C3_RESIDENCY: CORE C3 Residency Counter |
46 | * perf code: 0x01 | 46 | * perf code: 0x01 |
47 | * Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL | 47 | * Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,GLM |
48 | * Scope: Core | 48 | * Scope: Core |
49 | * MSR_CORE_C6_RESIDENCY: CORE C6 Residency Counter | 49 | * MSR_CORE_C6_RESIDENCY: CORE C6 Residency Counter |
50 | * perf code: 0x02 | 50 | * perf code: 0x02 |
51 | * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW | 51 | * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW |
52 | * SKL,KNL | 52 | * SKL,KNL,GLM |
53 | * Scope: Core | 53 | * Scope: Core |
54 | * MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter | 54 | * MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter |
55 | * perf code: 0x03 | 55 | * perf code: 0x03 |
@@ -57,16 +57,17 @@ | |||
57 | * Scope: Core | 57 | * Scope: Core |
58 | * MSR_PKG_C2_RESIDENCY: Package C2 Residency Counter. | 58 | * MSR_PKG_C2_RESIDENCY: Package C2 Residency Counter. |
59 | * perf code: 0x00 | 59 | * perf code: 0x00 |
60 | * Available model: SNB,IVB,HSW,BDW,SKL,KNL | 60 | * Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM |
61 | * Scope: Package (physical package) | 61 | * Scope: Package (physical package) |
62 | * MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter. | 62 | * MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter. |
63 | * perf code: 0x01 | 63 | * perf code: 0x01 |
64 | * Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,KNL | 64 | * Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,KNL |
65 | * GLM | ||
65 | * Scope: Package (physical package) | 66 | * Scope: Package (physical package) |
66 | * MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter. | 67 | * MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter. |
67 | * perf code: 0x02 | 68 | * perf code: 0x02 |
68 | * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW | 69 | * Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW |
69 | * SKL,KNL | 70 | * SKL,KNL,GLM |
70 | * Scope: Package (physical package) | 71 | * Scope: Package (physical package) |
71 | * MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter. | 72 | * MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter. |
72 | * perf code: 0x03 | 73 | * perf code: 0x03 |
@@ -82,7 +83,7 @@ | |||
82 | * Scope: Package (physical package) | 83 | * Scope: Package (physical package) |
83 | * MSR_PKG_C10_RESIDENCY: Package C10 Residency Counter. | 84 | * MSR_PKG_C10_RESIDENCY: Package C10 Residency Counter. |
84 | * perf code: 0x06 | 85 | * perf code: 0x06 |
85 | * Available model: HSW ULT only | 86 | * Available model: HSW ULT, GLM |
86 | * Scope: Package (physical package) | 87 | * Scope: Package (physical package) |
87 | * | 88 | * |
88 | */ | 89 | */ |
@@ -504,6 +505,17 @@ static const struct cstate_model knl_cstates __initconst = { | |||
504 | }; | 505 | }; |
505 | 506 | ||
506 | 507 | ||
508 | static const struct cstate_model glm_cstates __initconst = { | ||
509 | .core_events = BIT(PERF_CSTATE_CORE_C1_RES) | | ||
510 | BIT(PERF_CSTATE_CORE_C3_RES) | | ||
511 | BIT(PERF_CSTATE_CORE_C6_RES), | ||
512 | |||
513 | .pkg_events = BIT(PERF_CSTATE_PKG_C2_RES) | | ||
514 | BIT(PERF_CSTATE_PKG_C3_RES) | | ||
515 | BIT(PERF_CSTATE_PKG_C6_RES) | | ||
516 | BIT(PERF_CSTATE_PKG_C10_RES), | ||
517 | }; | ||
518 | |||
507 | 519 | ||
508 | #define X86_CSTATES_MODEL(model, states) \ | 520 | #define X86_CSTATES_MODEL(model, states) \ |
509 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long) &(states) } | 521 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long) &(states) } |
@@ -546,6 +558,8 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = { | |||
546 | 558 | ||
547 | X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNL, knl_cstates), | 559 | X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNL, knl_cstates), |
548 | X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNM, knl_cstates), | 560 | X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNM, knl_cstates), |
561 | |||
562 | X86_CSTATES_MODEL(INTEL_FAM6_ATOM_GOLDMONT, glm_cstates), | ||
549 | { }, | 563 | { }, |
550 | }; | 564 | }; |
551 | MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match); | 565 | MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match); |
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index c6d23ffe422d..a322fed5f8ed 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c | |||
@@ -606,12 +606,6 @@ static inline void intel_pmu_drain_pebs_buffer(void) | |||
606 | x86_pmu.drain_pebs(®s); | 606 | x86_pmu.drain_pebs(®s); |
607 | } | 607 | } |
608 | 608 | ||
609 | void intel_pmu_pebs_sched_task(struct perf_event_context *ctx, bool sched_in) | ||
610 | { | ||
611 | if (!sched_in) | ||
612 | intel_pmu_drain_pebs_buffer(); | ||
613 | } | ||
614 | |||
615 | /* | 609 | /* |
616 | * PEBS | 610 | * PEBS |
617 | */ | 611 | */ |
@@ -651,6 +645,12 @@ struct event_constraint intel_glm_pebs_event_constraints[] = { | |||
651 | EVENT_CONSTRAINT_END | 645 | EVENT_CONSTRAINT_END |
652 | }; | 646 | }; |
653 | 647 | ||
648 | struct event_constraint intel_glp_pebs_event_constraints[] = { | ||
649 | /* Allow all events as PEBS with no flags */ | ||
650 | INTEL_ALL_EVENT_CONSTRAINT(0, 0xf), | ||
651 | EVENT_CONSTRAINT_END | ||
652 | }; | ||
653 | |||
654 | struct event_constraint intel_nehalem_pebs_event_constraints[] = { | 654 | struct event_constraint intel_nehalem_pebs_event_constraints[] = { |
655 | INTEL_PLD_CONSTRAINT(0x100b, 0xf), /* MEM_INST_RETIRED.* */ | 655 | INTEL_PLD_CONSTRAINT(0x100b, 0xf), /* MEM_INST_RETIRED.* */ |
656 | INTEL_FLAGS_EVENT_CONSTRAINT(0x0f, 0xf), /* MEM_UNCORE_RETIRED.* */ | 656 | INTEL_FLAGS_EVENT_CONSTRAINT(0x0f, 0xf), /* MEM_UNCORE_RETIRED.* */ |
@@ -816,6 +816,14 @@ static inline bool pebs_needs_sched_cb(struct cpu_hw_events *cpuc) | |||
816 | return cpuc->n_pebs && (cpuc->n_pebs == cpuc->n_large_pebs); | 816 | return cpuc->n_pebs && (cpuc->n_pebs == cpuc->n_large_pebs); |
817 | } | 817 | } |
818 | 818 | ||
819 | void intel_pmu_pebs_sched_task(struct perf_event_context *ctx, bool sched_in) | ||
820 | { | ||
821 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); | ||
822 | |||
823 | if (!sched_in && pebs_needs_sched_cb(cpuc)) | ||
824 | intel_pmu_drain_pebs_buffer(); | ||
825 | } | ||
826 | |||
819 | static inline void pebs_update_threshold(struct cpu_hw_events *cpuc) | 827 | static inline void pebs_update_threshold(struct cpu_hw_events *cpuc) |
820 | { | 828 | { |
821 | struct debug_store *ds = cpuc->ds; | 829 | struct debug_store *ds = cpuc->ds; |
@@ -889,6 +897,8 @@ void intel_pmu_pebs_enable(struct perf_event *event) | |||
889 | if (hwc->flags & PERF_X86_EVENT_AUTO_RELOAD) { | 897 | if (hwc->flags & PERF_X86_EVENT_AUTO_RELOAD) { |
890 | ds->pebs_event_reset[hwc->idx] = | 898 | ds->pebs_event_reset[hwc->idx] = |
891 | (u64)(-hwc->sample_period) & x86_pmu.cntval_mask; | 899 | (u64)(-hwc->sample_period) & x86_pmu.cntval_mask; |
900 | } else { | ||
901 | ds->pebs_event_reset[hwc->idx] = 0; | ||
892 | } | 902 | } |
893 | } | 903 | } |
894 | 904 | ||
diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c index eb261656a320..955457a30197 100644 --- a/arch/x86/events/intel/lbr.c +++ b/arch/x86/events/intel/lbr.c | |||
@@ -380,8 +380,12 @@ static void __intel_pmu_lbr_save(struct x86_perf_task_context *task_ctx) | |||
380 | 380 | ||
381 | void intel_pmu_lbr_sched_task(struct perf_event_context *ctx, bool sched_in) | 381 | void intel_pmu_lbr_sched_task(struct perf_event_context *ctx, bool sched_in) |
382 | { | 382 | { |
383 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); | ||
383 | struct x86_perf_task_context *task_ctx; | 384 | struct x86_perf_task_context *task_ctx; |
384 | 385 | ||
386 | if (!cpuc->lbr_users) | ||
387 | return; | ||
388 | |||
385 | /* | 389 | /* |
386 | * If LBR callstack feature is enabled and the stack was saved when | 390 | * If LBR callstack feature is enabled and the stack was saved when |
387 | * the task was scheduled out, restore the stack. Otherwise flush | 391 | * the task was scheduled out, restore the stack. Otherwise flush |
diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h index 53728eea1bed..476aec3a4cab 100644 --- a/arch/x86/events/perf_event.h +++ b/arch/x86/events/perf_event.h | |||
@@ -879,6 +879,8 @@ extern struct event_constraint intel_slm_pebs_event_constraints[]; | |||
879 | 879 | ||
880 | extern struct event_constraint intel_glm_pebs_event_constraints[]; | 880 | extern struct event_constraint intel_glm_pebs_event_constraints[]; |
881 | 881 | ||
882 | extern struct event_constraint intel_glp_pebs_event_constraints[]; | ||
883 | |||
882 | extern struct event_constraint intel_nehalem_pebs_event_constraints[]; | 884 | extern struct event_constraint intel_nehalem_pebs_event_constraints[]; |
883 | 885 | ||
884 | extern struct event_constraint intel_westmere_pebs_event_constraints[]; | 886 | extern struct event_constraint intel_westmere_pebs_event_constraints[]; |
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h index 39e702d90cdb..aa6b2023d8f8 100644 --- a/arch/x86/include/asm/bug.h +++ b/arch/x86/include/asm/bug.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #define _BUG_FLAGS(ins, flags) \ | 35 | #define _BUG_FLAGS(ins, flags) \ |
36 | do { \ | 36 | do { \ |
37 | asm volatile("1:\t" ins "\n" \ | 37 | asm volatile("1:\t" ins "\n" \ |
38 | ".pushsection __bug_table,\"a\"\n" \ | 38 | ".pushsection __bug_table,\"aw\"\n" \ |
39 | "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ | 39 | "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ |
40 | "\t" __BUG_REL(%c0) "\t# bug_entry::file\n" \ | 40 | "\t" __BUG_REL(%c0) "\t# bug_entry::file\n" \ |
41 | "\t.word %c1" "\t# bug_entry::line\n" \ | 41 | "\t.word %c1" "\t# bug_entry::line\n" \ |
@@ -52,7 +52,7 @@ do { \ | |||
52 | #define _BUG_FLAGS(ins, flags) \ | 52 | #define _BUG_FLAGS(ins, flags) \ |
53 | do { \ | 53 | do { \ |
54 | asm volatile("1:\t" ins "\n" \ | 54 | asm volatile("1:\t" ins "\n" \ |
55 | ".pushsection __bug_table,\"a\"\n" \ | 55 | ".pushsection __bug_table,\"aw\"\n" \ |
56 | "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ | 56 | "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ |
57 | "\t.word %c0" "\t# bug_entry::flags\n" \ | 57 | "\t.word %c0" "\t# bug_entry::flags\n" \ |
58 | "\t.org 2b+%c1\n" \ | 58 | "\t.org 2b+%c1\n" \ |
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 7afb0e2f07f4..48febf07e828 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
@@ -328,13 +328,13 @@ static inline unsigned type in##bwl##_p(int port) \ | |||
328 | static inline void outs##bwl(int port, const void *addr, unsigned long count) \ | 328 | static inline void outs##bwl(int port, const void *addr, unsigned long count) \ |
329 | { \ | 329 | { \ |
330 | asm volatile("rep; outs" #bwl \ | 330 | asm volatile("rep; outs" #bwl \ |
331 | : "+S"(addr), "+c"(count) : "d"(port)); \ | 331 | : "+S"(addr), "+c"(count) : "d"(port) : "memory"); \ |
332 | } \ | 332 | } \ |
333 | \ | 333 | \ |
334 | static inline void ins##bwl(int port, void *addr, unsigned long count) \ | 334 | static inline void ins##bwl(int port, void *addr, unsigned long count) \ |
335 | { \ | 335 | { \ |
336 | asm volatile("rep; ins" #bwl \ | 336 | asm volatile("rep; ins" #bwl \ |
337 | : "+D"(addr), "+c"(count) : "d"(port)); \ | 337 | : "+D"(addr), "+c"(count) : "d"(port) : "memory"); \ |
338 | } | 338 | } |
339 | 339 | ||
340 | BUILDIO(b, b, char) | 340 | BUILDIO(b, b, char) |
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h index 34b984c60790..6cf65437b5e5 100644 --- a/arch/x86/include/asm/kprobes.h +++ b/arch/x86/include/asm/kprobes.h | |||
@@ -52,10 +52,10 @@ typedef u8 kprobe_opcode_t; | |||
52 | #define flush_insn_slot(p) do { } while (0) | 52 | #define flush_insn_slot(p) do { } while (0) |
53 | 53 | ||
54 | /* optinsn template addresses */ | 54 | /* optinsn template addresses */ |
55 | extern __visible kprobe_opcode_t optprobe_template_entry; | 55 | extern __visible kprobe_opcode_t optprobe_template_entry[]; |
56 | extern __visible kprobe_opcode_t optprobe_template_val; | 56 | extern __visible kprobe_opcode_t optprobe_template_val[]; |
57 | extern __visible kprobe_opcode_t optprobe_template_call; | 57 | extern __visible kprobe_opcode_t optprobe_template_call[]; |
58 | extern __visible kprobe_opcode_t optprobe_template_end; | 58 | extern __visible kprobe_opcode_t optprobe_template_end[]; |
59 | #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) | 59 | #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) |
60 | #define MAX_OPTINSN_SIZE \ | 60 | #define MAX_OPTINSN_SIZE \ |
61 | (((unsigned long)&optprobe_template_end - \ | 61 | (((unsigned long)&optprobe_template_end - \ |
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index ecfcb6643c9b..265c907d7d4c 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h | |||
@@ -293,7 +293,7 @@ static inline unsigned long __get_current_cr3_fast(void) | |||
293 | unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd); | 293 | unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd); |
294 | 294 | ||
295 | /* For now, be very restrictive about when this can be called. */ | 295 | /* For now, be very restrictive about when this can be called. */ |
296 | VM_WARN_ON(in_nmi() || !in_atomic()); | 296 | VM_WARN_ON(in_nmi() || preemptible()); |
297 | 297 | ||
298 | VM_BUG_ON(cr3 != __read_cr3()); | 298 | VM_BUG_ON(cr3 != __read_cr3()); |
299 | return cr3; | 299 | return cr3; |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index cb976bab6299..9ffc36bfe4cd 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
@@ -84,7 +84,7 @@ struct pv_init_ops { | |||
84 | */ | 84 | */ |
85 | unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, | 85 | unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, |
86 | unsigned long addr, unsigned len); | 86 | unsigned long addr, unsigned len); |
87 | }; | 87 | } __no_randomize_layout; |
88 | 88 | ||
89 | 89 | ||
90 | struct pv_lazy_ops { | 90 | struct pv_lazy_ops { |
@@ -92,12 +92,12 @@ struct pv_lazy_ops { | |||
92 | void (*enter)(void); | 92 | void (*enter)(void); |
93 | void (*leave)(void); | 93 | void (*leave)(void); |
94 | void (*flush)(void); | 94 | void (*flush)(void); |
95 | }; | 95 | } __no_randomize_layout; |
96 | 96 | ||
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 | }; | 100 | } __no_randomize_layout; |
101 | 101 | ||
102 | struct pv_cpu_ops { | 102 | struct pv_cpu_ops { |
103 | /* hooks for various privileged instructions */ | 103 | /* hooks for various privileged instructions */ |
@@ -176,7 +176,7 @@ struct pv_cpu_ops { | |||
176 | 176 | ||
177 | void (*start_context_switch)(struct task_struct *prev); | 177 | void (*start_context_switch)(struct task_struct *prev); |
178 | void (*end_context_switch)(struct task_struct *next); | 178 | void (*end_context_switch)(struct task_struct *next); |
179 | }; | 179 | } __no_randomize_layout; |
180 | 180 | ||
181 | struct pv_irq_ops { | 181 | struct pv_irq_ops { |
182 | /* | 182 | /* |
@@ -199,7 +199,7 @@ struct pv_irq_ops { | |||
199 | #ifdef CONFIG_X86_64 | 199 | #ifdef CONFIG_X86_64 |
200 | void (*adjust_exception_frame)(void); | 200 | void (*adjust_exception_frame)(void); |
201 | #endif | 201 | #endif |
202 | }; | 202 | } __no_randomize_layout; |
203 | 203 | ||
204 | struct pv_mmu_ops { | 204 | struct pv_mmu_ops { |
205 | unsigned long (*read_cr2)(void); | 205 | unsigned long (*read_cr2)(void); |
@@ -305,7 +305,7 @@ struct pv_mmu_ops { | |||
305 | an mfn. We can tell which is which from the index. */ | 305 | an mfn. We can tell which is which from the index. */ |
306 | void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx, | 306 | void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx, |
307 | phys_addr_t phys, pgprot_t flags); | 307 | phys_addr_t phys, pgprot_t flags); |
308 | }; | 308 | } __no_randomize_layout; |
309 | 309 | ||
310 | struct arch_spinlock; | 310 | struct arch_spinlock; |
311 | #ifdef CONFIG_SMP | 311 | #ifdef CONFIG_SMP |
@@ -322,7 +322,7 @@ struct pv_lock_ops { | |||
322 | void (*kick)(int cpu); | 322 | void (*kick)(int cpu); |
323 | 323 | ||
324 | struct paravirt_callee_save vcpu_is_preempted; | 324 | struct paravirt_callee_save vcpu_is_preempted; |
325 | }; | 325 | } __no_randomize_layout; |
326 | 326 | ||
327 | /* This contains all the paravirt structures: we get a convenient | 327 | /* This contains all the paravirt structures: we get a convenient |
328 | * number for each function using the offset which we use to indicate | 328 | * number for each function using the offset which we use to indicate |
@@ -334,7 +334,7 @@ struct paravirt_patch_template { | |||
334 | struct pv_irq_ops pv_irq_ops; | 334 | struct pv_irq_ops pv_irq_ops; |
335 | struct pv_mmu_ops pv_mmu_ops; | 335 | struct pv_mmu_ops pv_mmu_ops; |
336 | struct pv_lock_ops pv_lock_ops; | 336 | struct pv_lock_ops pv_lock_ops; |
337 | }; | 337 | } __no_randomize_layout; |
338 | 338 | ||
339 | extern struct pv_info pv_info; | 339 | extern struct pv_info pv_info; |
340 | extern struct pv_init_ops pv_init_ops; | 340 | extern struct pv_init_ops pv_init_ops; |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 6a79547e8ee0..028245e1c42b 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -129,7 +129,7 @@ struct cpuinfo_x86 { | |||
129 | /* Index into per_cpu list: */ | 129 | /* Index into per_cpu list: */ |
130 | u16 cpu_index; | 130 | u16 cpu_index; |
131 | u32 microcode; | 131 | u32 microcode; |
132 | }; | 132 | } __randomize_layout; |
133 | 133 | ||
134 | struct cpuid_regs { | 134 | struct cpuid_regs { |
135 | u32 eax, ebx, ecx, edx; | 135 | u32 eax, ebx, ecx, edx; |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 6bb680671088..7491e73d9253 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -347,6 +347,14 @@ static void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, | |||
347 | struct mpc_intsrc mp_irq; | 347 | struct mpc_intsrc mp_irq; |
348 | 348 | ||
349 | /* | 349 | /* |
350 | * Check bus_irq boundary. | ||
351 | */ | ||
352 | if (bus_irq >= NR_IRQS_LEGACY) { | ||
353 | pr_warn("Invalid bus_irq %u for legacy override\n", bus_irq); | ||
354 | return; | ||
355 | } | ||
356 | |||
357 | /* | ||
350 | * Convert 'gsi' to 'ioapic.pin'. | 358 | * Convert 'gsi' to 'ioapic.pin'. |
351 | */ | 359 | */ |
352 | ioapic = mp_find_ioapic(gsi); | 360 | ioapic = mp_find_ioapic(gsi); |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index b4f5f73febdb..237e9c2341c7 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2093,7 +2093,7 @@ static inline void __init check_timer(void) | |||
2093 | int idx; | 2093 | int idx; |
2094 | idx = find_irq_entry(apic1, pin1, mp_INT); | 2094 | idx = find_irq_entry(apic1, pin1, mp_INT); |
2095 | if (idx != -1 && irq_trigger(idx)) | 2095 | if (idx != -1 && irq_trigger(idx)) |
2096 | unmask_ioapic_irq(irq_get_chip_data(0)); | 2096 | unmask_ioapic_irq(irq_get_irq_data(0)); |
2097 | } | 2097 | } |
2098 | irq_domain_deactivate_irq(irq_data); | 2098 | irq_domain_deactivate_irq(irq_data); |
2099 | irq_domain_activate_irq(irq_data); | 2099 | irq_domain_activate_irq(irq_data); |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index bb5abe8f5fd4..3b9e220621f8 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -134,6 +134,7 @@ static void init_amd_k6(struct cpuinfo_x86 *c) | |||
134 | 134 | ||
135 | n = K6_BUG_LOOP; | 135 | n = K6_BUG_LOOP; |
136 | f_vide = vide; | 136 | f_vide = vide; |
137 | OPTIMIZER_HIDE_VAR(f_vide); | ||
137 | d = rdtsc(); | 138 | d = rdtsc(); |
138 | while (n--) | 139 | while (n--) |
139 | f_vide(); | 140 | f_vide(); |
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 3fe45f84ced4..cbf1f6ba39a8 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -235,8 +235,7 @@ static void __init dtb_add_ioapic(struct device_node *dn) | |||
235 | 235 | ||
236 | ret = of_address_to_resource(dn, 0, &r); | 236 | ret = of_address_to_resource(dn, 0, &r); |
237 | if (ret) { | 237 | if (ret) { |
238 | printk(KERN_ERR "Can't obtain address from node %s.\n", | 238 | printk(KERN_ERR "Can't obtain address from device node %pOF.\n", dn); |
239 | dn->full_name); | ||
240 | return; | 239 | return; |
241 | } | 240 | } |
242 | mp_register_ioapic(++ioapic_id, r.start, gsi_top, &cfg); | 241 | mp_register_ioapic(++ioapic_id, r.start, gsi_top, &cfg); |
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 760433b2574a..2688c7dc5323 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig | |||
@@ -22,7 +22,7 @@ config KVM | |||
22 | depends on HAVE_KVM | 22 | depends on HAVE_KVM |
23 | depends on HIGH_RES_TIMERS | 23 | depends on HIGH_RES_TIMERS |
24 | # for TASKSTATS/TASK_DELAY_ACCT: | 24 | # for TASKSTATS/TASK_DELAY_ACCT: |
25 | depends on NET | 25 | depends on NET && MULTIUSER |
26 | select PREEMPT_NOTIFIERS | 26 | select PREEMPT_NOTIFIERS |
27 | select MMU_NOTIFIER | 27 | select MMU_NOTIFIER |
28 | select ANON_INODES | 28 | select ANON_INODES |
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 2695a34fa1c5..337b6d2730fa 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c | |||
@@ -649,9 +649,10 @@ void kvm_hv_process_stimers(struct kvm_vcpu *vcpu) | |||
649 | } | 649 | } |
650 | 650 | ||
651 | if ((stimer->config & HV_STIMER_ENABLE) && | 651 | if ((stimer->config & HV_STIMER_ENABLE) && |
652 | stimer->count) | 652 | stimer->count) { |
653 | stimer_start(stimer); | 653 | if (!stimer->msg_pending) |
654 | else | 654 | stimer_start(stimer); |
655 | } else | ||
655 | stimer_cleanup(stimer); | 656 | stimer_cleanup(stimer); |
656 | } | 657 | } |
657 | } | 658 | } |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 84e62acf2dd8..29fd8af5c347 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -198,7 +198,8 @@ struct loaded_vmcs { | |||
198 | struct vmcs *vmcs; | 198 | struct vmcs *vmcs; |
199 | struct vmcs *shadow_vmcs; | 199 | struct vmcs *shadow_vmcs; |
200 | int cpu; | 200 | int cpu; |
201 | int launched; | 201 | bool launched; |
202 | bool nmi_known_unmasked; | ||
202 | struct list_head loaded_vmcss_on_cpu_link; | 203 | struct list_head loaded_vmcss_on_cpu_link; |
203 | }; | 204 | }; |
204 | 205 | ||
@@ -2326,6 +2327,11 @@ static void vmx_vcpu_put(struct kvm_vcpu *vcpu) | |||
2326 | __vmx_load_host_state(to_vmx(vcpu)); | 2327 | __vmx_load_host_state(to_vmx(vcpu)); |
2327 | } | 2328 | } |
2328 | 2329 | ||
2330 | static bool emulation_required(struct kvm_vcpu *vcpu) | ||
2331 | { | ||
2332 | return emulate_invalid_guest_state && !guest_state_valid(vcpu); | ||
2333 | } | ||
2334 | |||
2329 | static void vmx_decache_cr0_guest_bits(struct kvm_vcpu *vcpu); | 2335 | static void vmx_decache_cr0_guest_bits(struct kvm_vcpu *vcpu); |
2330 | 2336 | ||
2331 | /* | 2337 | /* |
@@ -2363,6 +2369,8 @@ static unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu) | |||
2363 | 2369 | ||
2364 | static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) | 2370 | static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) |
2365 | { | 2371 | { |
2372 | unsigned long old_rflags = vmx_get_rflags(vcpu); | ||
2373 | |||
2366 | __set_bit(VCPU_EXREG_RFLAGS, (ulong *)&vcpu->arch.regs_avail); | 2374 | __set_bit(VCPU_EXREG_RFLAGS, (ulong *)&vcpu->arch.regs_avail); |
2367 | to_vmx(vcpu)->rflags = rflags; | 2375 | to_vmx(vcpu)->rflags = rflags; |
2368 | if (to_vmx(vcpu)->rmode.vm86_active) { | 2376 | if (to_vmx(vcpu)->rmode.vm86_active) { |
@@ -2370,6 +2378,9 @@ static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) | |||
2370 | rflags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM; | 2378 | rflags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM; |
2371 | } | 2379 | } |
2372 | vmcs_writel(GUEST_RFLAGS, rflags); | 2380 | vmcs_writel(GUEST_RFLAGS, rflags); |
2381 | |||
2382 | if ((old_rflags ^ to_vmx(vcpu)->rflags) & X86_EFLAGS_VM) | ||
2383 | to_vmx(vcpu)->emulation_required = emulation_required(vcpu); | ||
2373 | } | 2384 | } |
2374 | 2385 | ||
2375 | static u32 vmx_get_pkru(struct kvm_vcpu *vcpu) | 2386 | static u32 vmx_get_pkru(struct kvm_vcpu *vcpu) |
@@ -3857,11 +3868,6 @@ static __init int alloc_kvm_area(void) | |||
3857 | return 0; | 3868 | return 0; |
3858 | } | 3869 | } |
3859 | 3870 | ||
3860 | static bool emulation_required(struct kvm_vcpu *vcpu) | ||
3861 | { | ||
3862 | return emulate_invalid_guest_state && !guest_state_valid(vcpu); | ||
3863 | } | ||
3864 | |||
3865 | static void fix_pmode_seg(struct kvm_vcpu *vcpu, int seg, | 3871 | static void fix_pmode_seg(struct kvm_vcpu *vcpu, int seg, |
3866 | struct kvm_segment *save) | 3872 | struct kvm_segment *save) |
3867 | { | 3873 | { |
@@ -5510,10 +5516,8 @@ static void vmx_inject_nmi(struct kvm_vcpu *vcpu) | |||
5510 | { | 5516 | { |
5511 | struct vcpu_vmx *vmx = to_vmx(vcpu); | 5517 | struct vcpu_vmx *vmx = to_vmx(vcpu); |
5512 | 5518 | ||
5513 | if (!is_guest_mode(vcpu)) { | 5519 | ++vcpu->stat.nmi_injections; |
5514 | ++vcpu->stat.nmi_injections; | 5520 | vmx->loaded_vmcs->nmi_known_unmasked = false; |
5515 | vmx->nmi_known_unmasked = false; | ||
5516 | } | ||
5517 | 5521 | ||
5518 | if (vmx->rmode.vm86_active) { | 5522 | if (vmx->rmode.vm86_active) { |
5519 | if (kvm_inject_realmode_interrupt(vcpu, NMI_VECTOR, 0) != EMULATE_DONE) | 5523 | if (kvm_inject_realmode_interrupt(vcpu, NMI_VECTOR, 0) != EMULATE_DONE) |
@@ -5527,16 +5531,21 @@ static void vmx_inject_nmi(struct kvm_vcpu *vcpu) | |||
5527 | 5531 | ||
5528 | static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu) | 5532 | static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu) |
5529 | { | 5533 | { |
5530 | if (to_vmx(vcpu)->nmi_known_unmasked) | 5534 | struct vcpu_vmx *vmx = to_vmx(vcpu); |
5535 | bool masked; | ||
5536 | |||
5537 | if (vmx->loaded_vmcs->nmi_known_unmasked) | ||
5531 | return false; | 5538 | return false; |
5532 | return vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & GUEST_INTR_STATE_NMI; | 5539 | masked = vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & GUEST_INTR_STATE_NMI; |
5540 | vmx->loaded_vmcs->nmi_known_unmasked = !masked; | ||
5541 | return masked; | ||
5533 | } | 5542 | } |
5534 | 5543 | ||
5535 | static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) | 5544 | static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) |
5536 | { | 5545 | { |
5537 | struct vcpu_vmx *vmx = to_vmx(vcpu); | 5546 | struct vcpu_vmx *vmx = to_vmx(vcpu); |
5538 | 5547 | ||
5539 | vmx->nmi_known_unmasked = !masked; | 5548 | vmx->loaded_vmcs->nmi_known_unmasked = !masked; |
5540 | if (masked) | 5549 | if (masked) |
5541 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, | 5550 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, |
5542 | GUEST_INTR_STATE_NMI); | 5551 | GUEST_INTR_STATE_NMI); |
@@ -8736,7 +8745,7 @@ static void vmx_recover_nmi_blocking(struct vcpu_vmx *vmx) | |||
8736 | 8745 | ||
8737 | idtv_info_valid = vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK; | 8746 | idtv_info_valid = vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK; |
8738 | 8747 | ||
8739 | if (vmx->nmi_known_unmasked) | 8748 | if (vmx->loaded_vmcs->nmi_known_unmasked) |
8740 | return; | 8749 | return; |
8741 | /* | 8750 | /* |
8742 | * Can't use vmx->exit_intr_info since we're not sure what | 8751 | * Can't use vmx->exit_intr_info since we're not sure what |
@@ -8760,7 +8769,7 @@ static void vmx_recover_nmi_blocking(struct vcpu_vmx *vmx) | |||
8760 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, | 8769 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, |
8761 | GUEST_INTR_STATE_NMI); | 8770 | GUEST_INTR_STATE_NMI); |
8762 | else | 8771 | else |
8763 | vmx->nmi_known_unmasked = | 8772 | vmx->loaded_vmcs->nmi_known_unmasked = |
8764 | !(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) | 8773 | !(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) |
8765 | & GUEST_INTR_STATE_NMI); | 8774 | & GUEST_INTR_STATE_NMI); |
8766 | } | 8775 | } |
@@ -10488,6 +10497,7 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch) | |||
10488 | { | 10497 | { |
10489 | struct vmcs12 *vmcs12; | 10498 | struct vmcs12 *vmcs12; |
10490 | struct vcpu_vmx *vmx = to_vmx(vcpu); | 10499 | struct vcpu_vmx *vmx = to_vmx(vcpu); |
10500 | u32 interrupt_shadow = vmx_get_interrupt_shadow(vcpu); | ||
10491 | u32 exit_qual; | 10501 | u32 exit_qual; |
10492 | int ret; | 10502 | int ret; |
10493 | 10503 | ||
@@ -10512,6 +10522,12 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch) | |||
10512 | * for misconfigurations which will anyway be caught by the processor | 10522 | * for misconfigurations which will anyway be caught by the processor |
10513 | * when using the merged vmcs02. | 10523 | * when using the merged vmcs02. |
10514 | */ | 10524 | */ |
10525 | if (interrupt_shadow & KVM_X86_SHADOW_INT_MOV_SS) { | ||
10526 | nested_vmx_failValid(vcpu, | ||
10527 | VMXERR_ENTRY_EVENTS_BLOCKED_BY_MOV_SS); | ||
10528 | goto out; | ||
10529 | } | ||
10530 | |||
10515 | if (vmcs12->launch_state == launch) { | 10531 | if (vmcs12->launch_state == launch) { |
10516 | nested_vmx_failValid(vcpu, | 10532 | nested_vmx_failValid(vcpu, |
10517 | launch ? VMXERR_VMLAUNCH_NONCLEAR_VMCS | 10533 | launch ? VMXERR_VMLAUNCH_NONCLEAR_VMCS |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 5b8f07889f6a..82a63c59f77b 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -597,8 +597,8 @@ bool pdptrs_changed(struct kvm_vcpu *vcpu) | |||
597 | (unsigned long *)&vcpu->arch.regs_avail)) | 597 | (unsigned long *)&vcpu->arch.regs_avail)) |
598 | return true; | 598 | return true; |
599 | 599 | ||
600 | gfn = (kvm_read_cr3(vcpu) & ~31u) >> PAGE_SHIFT; | 600 | gfn = (kvm_read_cr3(vcpu) & ~31ul) >> PAGE_SHIFT; |
601 | offset = (kvm_read_cr3(vcpu) & ~31u) & (PAGE_SIZE - 1); | 601 | offset = (kvm_read_cr3(vcpu) & ~31ul) & (PAGE_SIZE - 1); |
602 | r = kvm_read_nested_guest_page(vcpu, gfn, pdpte, offset, sizeof(pdpte), | 602 | r = kvm_read_nested_guest_page(vcpu, gfn, pdpte, offset, sizeof(pdpte), |
603 | PFERR_USER_MASK | PFERR_WRITE_MASK); | 603 | PFERR_USER_MASK | PFERR_WRITE_MASK); |
604 | if (r < 0) | 604 | if (r < 0) |
diff --git a/arch/x86/math-emu/Makefile b/arch/x86/math-emu/Makefile index 9b0c63b60302..1b2dac174321 100644 --- a/arch/x86/math-emu/Makefile +++ b/arch/x86/math-emu/Makefile | |||
@@ -5,8 +5,8 @@ | |||
5 | #DEBUG = -DDEBUGGING | 5 | #DEBUG = -DDEBUGGING |
6 | DEBUG = | 6 | DEBUG = |
7 | PARANOID = -DPARANOID | 7 | PARANOID = -DPARANOID |
8 | EXTRA_CFLAGS := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) | 8 | ccflags-y += $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION) |
9 | EXTRA_AFLAGS := $(PARANOID) | 9 | asflags-y += $(PARANOID) |
10 | 10 | ||
11 | # From 'C' language sources: | 11 | # From 'C' language sources: |
12 | C_OBJS =fpu_entry.o errors.o \ | 12 | C_OBJS =fpu_entry.o errors.o \ |
diff --git a/arch/x86/math-emu/fpu_emu.h b/arch/x86/math-emu/fpu_emu.h index afbc4d805d66..c9c320dccca1 100644 --- a/arch/x86/math-emu/fpu_emu.h +++ b/arch/x86/math-emu/fpu_emu.h | |||
@@ -157,7 +157,7 @@ extern u_char const data_sizes_16[32]; | |||
157 | 157 | ||
158 | #define signbyte(a) (((u_char *)(a))[9]) | 158 | #define signbyte(a) (((u_char *)(a))[9]) |
159 | #define getsign(a) (signbyte(a) & 0x80) | 159 | #define getsign(a) (signbyte(a) & 0x80) |
160 | #define setsign(a,b) { if (b) signbyte(a) |= 0x80; else signbyte(a) &= 0x7f; } | 160 | #define setsign(a,b) { if ((b) != 0) signbyte(a) |= 0x80; else signbyte(a) &= 0x7f; } |
161 | #define copysign(a,b) { if (getsign(a)) signbyte(b) |= 0x80; \ | 161 | #define copysign(a,b) { if (getsign(a)) signbyte(b) |= 0x80; \ |
162 | else signbyte(b) &= 0x7f; } | 162 | else signbyte(b) &= 0x7f; } |
163 | #define changesign(a) { signbyte(a) ^= 0x80; } | 163 | #define changesign(a) { signbyte(a) ^= 0x80; } |
diff --git a/arch/x86/math-emu/reg_compare.c b/arch/x86/math-emu/reg_compare.c index b77360fdbf4a..19b33b50adfa 100644 --- a/arch/x86/math-emu/reg_compare.c +++ b/arch/x86/math-emu/reg_compare.c | |||
@@ -168,7 +168,7 @@ static int compare(FPU_REG const *b, int tagb) | |||
168 | /* This function requires that st(0) is not empty */ | 168 | /* This function requires that st(0) is not empty */ |
169 | int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag) | 169 | int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag) |
170 | { | 170 | { |
171 | int f = 0, c; | 171 | int f, c; |
172 | 172 | ||
173 | c = compare(loaded_data, loaded_tag); | 173 | c = compare(loaded_data, loaded_tag); |
174 | 174 | ||
@@ -189,12 +189,12 @@ int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag) | |||
189 | case COMP_No_Comp: | 189 | case COMP_No_Comp: |
190 | f = SW_C3 | SW_C2 | SW_C0; | 190 | f = SW_C3 | SW_C2 | SW_C0; |
191 | break; | 191 | break; |
192 | #ifdef PARANOID | ||
193 | default: | 192 | default: |
193 | #ifdef PARANOID | ||
194 | EXCEPTION(EX_INTERNAL | 0x121); | 194 | EXCEPTION(EX_INTERNAL | 0x121); |
195 | #endif /* PARANOID */ | ||
195 | f = SW_C3 | SW_C2 | SW_C0; | 196 | f = SW_C3 | SW_C2 | SW_C0; |
196 | break; | 197 | break; |
197 | #endif /* PARANOID */ | ||
198 | } | 198 | } |
199 | setcc(f); | 199 | setcc(f); |
200 | if (c & COMP_Denormal) { | 200 | if (c & COMP_Denormal) { |
@@ -205,7 +205,7 @@ int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag) | |||
205 | 205 | ||
206 | static int compare_st_st(int nr) | 206 | static int compare_st_st(int nr) |
207 | { | 207 | { |
208 | int f = 0, c; | 208 | int f, c; |
209 | FPU_REG *st_ptr; | 209 | FPU_REG *st_ptr; |
210 | 210 | ||
211 | if (!NOT_EMPTY(0) || !NOT_EMPTY(nr)) { | 211 | if (!NOT_EMPTY(0) || !NOT_EMPTY(nr)) { |
@@ -235,12 +235,12 @@ static int compare_st_st(int nr) | |||
235 | case COMP_No_Comp: | 235 | case COMP_No_Comp: |
236 | f = SW_C3 | SW_C2 | SW_C0; | 236 | f = SW_C3 | SW_C2 | SW_C0; |
237 | break; | 237 | break; |
238 | #ifdef PARANOID | ||
239 | default: | 238 | default: |
239 | #ifdef PARANOID | ||
240 | EXCEPTION(EX_INTERNAL | 0x122); | 240 | EXCEPTION(EX_INTERNAL | 0x122); |
241 | #endif /* PARANOID */ | ||
241 | f = SW_C3 | SW_C2 | SW_C0; | 242 | f = SW_C3 | SW_C2 | SW_C0; |
242 | break; | 243 | break; |
243 | #endif /* PARANOID */ | ||
244 | } | 244 | } |
245 | setcc(f); | 245 | setcc(f); |
246 | if (c & COMP_Denormal) { | 246 | if (c & COMP_Denormal) { |
@@ -283,12 +283,12 @@ static int compare_i_st_st(int nr) | |||
283 | case COMP_No_Comp: | 283 | case COMP_No_Comp: |
284 | f = X86_EFLAGS_ZF | X86_EFLAGS_PF | X86_EFLAGS_CF; | 284 | f = X86_EFLAGS_ZF | X86_EFLAGS_PF | X86_EFLAGS_CF; |
285 | break; | 285 | break; |
286 | #ifdef PARANOID | ||
287 | default: | 286 | default: |
287 | #ifdef PARANOID | ||
288 | EXCEPTION(EX_INTERNAL | 0x122); | 288 | EXCEPTION(EX_INTERNAL | 0x122); |
289 | #endif /* PARANOID */ | ||
289 | f = 0; | 290 | f = 0; |
290 | break; | 291 | break; |
291 | #endif /* PARANOID */ | ||
292 | } | 292 | } |
293 | FPU_EFLAGS = (FPU_EFLAGS & ~(X86_EFLAGS_ZF | X86_EFLAGS_PF | X86_EFLAGS_CF)) | f; | 293 | FPU_EFLAGS = (FPU_EFLAGS & ~(X86_EFLAGS_ZF | X86_EFLAGS_PF | X86_EFLAGS_CF)) | f; |
294 | if (c & COMP_Denormal) { | 294 | if (c & COMP_Denormal) { |
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_max7315.c b/arch/x86/platform/intel-mid/device_libs/platform_max7315.c index 6e075afa7877..58337b2bc682 100644 --- a/arch/x86/platform/intel-mid/device_libs/platform_max7315.c +++ b/arch/x86/platform/intel-mid/device_libs/platform_max7315.c | |||
@@ -38,8 +38,10 @@ static void __init *max7315_platform_data(void *info) | |||
38 | */ | 38 | */ |
39 | strcpy(i2c_info->type, "max7315"); | 39 | strcpy(i2c_info->type, "max7315"); |
40 | if (nr++) { | 40 | if (nr++) { |
41 | sprintf(base_pin_name, "max7315_%d_base", nr); | 41 | snprintf(base_pin_name, sizeof(base_pin_name), |
42 | sprintf(intr_pin_name, "max7315_%d_int", nr); | 42 | "max7315_%d_base", nr); |
43 | snprintf(intr_pin_name, sizeof(intr_pin_name), | ||
44 | "max7315_%d_int", nr); | ||
43 | } else { | 45 | } else { |
44 | strcpy(base_pin_name, "max7315_base"); | 46 | strcpy(base_pin_name, "max7315_base"); |
45 | strcpy(intr_pin_name, "max7315_int"); | 47 | strcpy(intr_pin_name, "max7315_int"); |
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index d4a61ddf9e62..3e4bdb442fbc 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c | |||
@@ -40,7 +40,6 @@ static int timeout_base_ns[] = { | |||
40 | static int timeout_us; | 40 | static int timeout_us; |
41 | static bool nobau = true; | 41 | static bool nobau = true; |
42 | static int nobau_perm; | 42 | static int nobau_perm; |
43 | static cycles_t congested_cycles; | ||
44 | 43 | ||
45 | /* tunables: */ | 44 | /* tunables: */ |
46 | static int max_concurr = MAX_BAU_CONCURRENT; | 45 | static int max_concurr = MAX_BAU_CONCURRENT; |
@@ -829,10 +828,10 @@ static void record_send_stats(cycles_t time1, cycles_t time2, | |||
829 | if ((completion_status == FLUSH_COMPLETE) && (try == 1)) { | 828 | if ((completion_status == FLUSH_COMPLETE) && (try == 1)) { |
830 | bcp->period_requests++; | 829 | bcp->period_requests++; |
831 | bcp->period_time += elapsed; | 830 | bcp->period_time += elapsed; |
832 | if ((elapsed > congested_cycles) && | 831 | if ((elapsed > usec_2_cycles(bcp->cong_response_us)) && |
833 | (bcp->period_requests > bcp->cong_reps) && | 832 | (bcp->period_requests > bcp->cong_reps) && |
834 | ((bcp->period_time / bcp->period_requests) > | 833 | ((bcp->period_time / bcp->period_requests) > |
835 | congested_cycles)) { | 834 | usec_2_cycles(bcp->cong_response_us))) { |
836 | stat->s_congested++; | 835 | stat->s_congested++; |
837 | disable_for_period(bcp, stat); | 836 | disable_for_period(bcp, stat); |
838 | } | 837 | } |
@@ -2222,14 +2221,17 @@ static int __init uv_bau_init(void) | |||
2222 | else if (is_uv1_hub()) | 2221 | else if (is_uv1_hub()) |
2223 | ops = uv1_bau_ops; | 2222 | ops = uv1_bau_ops; |
2224 | 2223 | ||
2224 | nuvhubs = uv_num_possible_blades(); | ||
2225 | if (nuvhubs < 2) { | ||
2226 | pr_crit("UV: BAU disabled - insufficient hub count\n"); | ||
2227 | goto err_bau_disable; | ||
2228 | } | ||
2229 | |||
2225 | for_each_possible_cpu(cur_cpu) { | 2230 | for_each_possible_cpu(cur_cpu) { |
2226 | mask = &per_cpu(uv_flush_tlb_mask, cur_cpu); | 2231 | mask = &per_cpu(uv_flush_tlb_mask, cur_cpu); |
2227 | zalloc_cpumask_var_node(mask, GFP_KERNEL, cpu_to_node(cur_cpu)); | 2232 | zalloc_cpumask_var_node(mask, GFP_KERNEL, cpu_to_node(cur_cpu)); |
2228 | } | 2233 | } |
2229 | 2234 | ||
2230 | nuvhubs = uv_num_possible_blades(); | ||
2231 | congested_cycles = usec_2_cycles(congested_respns_us); | ||
2232 | |||
2233 | uv_base_pnode = 0x7fffffff; | 2235 | uv_base_pnode = 0x7fffffff; |
2234 | for (uvhub = 0; uvhub < nuvhubs; uvhub++) { | 2236 | for (uvhub = 0; uvhub < nuvhubs; uvhub++) { |
2235 | cpus = uv_blade_nr_possible_cpus(uvhub); | 2237 | cpus = uv_blade_nr_possible_cpus(uvhub); |
@@ -2242,9 +2244,8 @@ static int __init uv_bau_init(void) | |||
2242 | enable_timeouts(); | 2244 | enable_timeouts(); |
2243 | 2245 | ||
2244 | if (init_per_cpu(nuvhubs, uv_base_pnode)) { | 2246 | if (init_per_cpu(nuvhubs, uv_base_pnode)) { |
2245 | set_bau_off(); | 2247 | pr_crit("UV: BAU disabled - per CPU init failed\n"); |
2246 | nobau_perm = 1; | 2248 | goto err_bau_disable; |
2247 | return 0; | ||
2248 | } | 2249 | } |
2249 | 2250 | ||
2250 | vector = UV_BAU_MESSAGE; | 2251 | vector = UV_BAU_MESSAGE; |
@@ -2270,6 +2271,16 @@ static int __init uv_bau_init(void) | |||
2270 | } | 2271 | } |
2271 | 2272 | ||
2272 | return 0; | 2273 | return 0; |
2274 | |||
2275 | err_bau_disable: | ||
2276 | |||
2277 | for_each_possible_cpu(cur_cpu) | ||
2278 | free_cpumask_var(per_cpu(uv_flush_tlb_mask, cur_cpu)); | ||
2279 | |||
2280 | set_bau_off(); | ||
2281 | nobau_perm = 1; | ||
2282 | |||
2283 | return -EINVAL; | ||
2273 | } | 2284 | } |
2274 | core_initcall(uv_bau_init); | 2285 | core_initcall(uv_bau_init); |
2275 | fs_initcall(uv_ptc_init); | 2286 | fs_initcall(uv_ptc_init); |
diff --git a/arch/x86/xen/smp_pv.c b/arch/x86/xen/smp_pv.c index 1ea598e5f030..51471408fdd1 100644 --- a/arch/x86/xen/smp_pv.c +++ b/arch/x86/xen/smp_pv.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/irq_work.h> | 19 | #include <linux/irq_work.h> |
20 | #include <linux/tick.h> | 20 | #include <linux/tick.h> |
21 | #include <linux/nmi.h> | 21 | #include <linux/nmi.h> |
22 | #include <linux/cpuhotplug.h> | ||
22 | 23 | ||
23 | #include <asm/paravirt.h> | 24 | #include <asm/paravirt.h> |
24 | #include <asm/desc.h> | 25 | #include <asm/desc.h> |
@@ -413,7 +414,7 @@ static void xen_pv_play_dead(void) /* used only with HOTPLUG_CPU */ | |||
413 | */ | 414 | */ |
414 | tick_nohz_idle_enter(); | 415 | tick_nohz_idle_enter(); |
415 | 416 | ||
416 | cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); | 417 | cpuhp_online_idle(CPUHP_AP_ONLINE_IDLE); |
417 | } | 418 | } |
418 | 419 | ||
419 | #else /* !CONFIG_HOTPLUG_CPU */ | 420 | #else /* !CONFIG_HOTPLUG_CPU */ |
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index a1895a8e85c1..1ecb05db3632 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
@@ -309,7 +309,6 @@ static irqreturn_t xen_timer_interrupt(int irq, void *dev_id) | |||
309 | void xen_teardown_timer(int cpu) | 309 | void xen_teardown_timer(int cpu) |
310 | { | 310 | { |
311 | struct clock_event_device *evt; | 311 | struct clock_event_device *evt; |
312 | BUG_ON(cpu == 0); | ||
313 | evt = &per_cpu(xen_clock_events, cpu).evt; | 312 | evt = &per_cpu(xen_clock_events, cpu).evt; |
314 | 313 | ||
315 | if (evt->irq >= 0) { | 314 | if (evt->irq >= 0) { |
diff --git a/arch/xtensa/include/uapi/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h index 98b004e24e85..47d82c09be7b 100644 --- a/arch/xtensa/include/uapi/asm/ioctls.h +++ b/arch/xtensa/include/uapi/asm/ioctls.h | |||
@@ -105,7 +105,7 @@ | |||
105 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ | 105 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
106 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ | 106 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
107 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ | 107 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
108 | #define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */ | 108 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ |
109 | 109 | ||
110 | #define TIOCSERCONFIG _IO('T', 83) | 110 | #define TIOCSERCONFIG _IO('T', 83) |
111 | #define TIOCSERGWILD _IOR('T', 84, int) | 111 | #define TIOCSERGWILD _IOR('T', 84, int) |
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 60a6835265fc..436b6ca6b175 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c | |||
@@ -4299,6 +4299,9 @@ static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd) | |||
4299 | bfq_bfqq_expire(bfqd, bfqq, false, | 4299 | bfq_bfqq_expire(bfqd, bfqq, false, |
4300 | BFQQE_NO_MORE_REQUESTS); | 4300 | BFQQE_NO_MORE_REQUESTS); |
4301 | } | 4301 | } |
4302 | |||
4303 | if (!bfqd->rq_in_driver) | ||
4304 | bfq_schedule_dispatch(bfqd); | ||
4302 | } | 4305 | } |
4303 | 4306 | ||
4304 | static void bfq_put_rq_priv_body(struct bfq_queue *bfqq) | 4307 | static void bfq_put_rq_priv_body(struct bfq_queue *bfqq) |
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h index 8fd83b885774..63e771ab56d8 100644 --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h | |||
@@ -52,7 +52,7 @@ struct bfq_entity; | |||
52 | struct bfq_service_tree { | 52 | struct bfq_service_tree { |
53 | /* tree for active entities (i.e., those backlogged) */ | 53 | /* tree for active entities (i.e., those backlogged) */ |
54 | struct rb_root active; | 54 | struct rb_root active; |
55 | /* tree for idle entities (i.e., not backlogged, with V <= F_i)*/ | 55 | /* tree for idle entities (i.e., not backlogged, with V < F_i)*/ |
56 | struct rb_root idle; | 56 | struct rb_root idle; |
57 | 57 | ||
58 | /* idle entity with minimum F_i */ | 58 | /* idle entity with minimum F_i */ |
diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c index 5ec05cd42b80..979f8f21b7e2 100644 --- a/block/bfq-wf2q.c +++ b/block/bfq-wf2q.c | |||
@@ -1297,7 +1297,7 @@ static void bfq_update_vtime(struct bfq_service_tree *st, u64 new_value) | |||
1297 | * | 1297 | * |
1298 | * This function searches the first schedulable entity, starting from the | 1298 | * This function searches the first schedulable entity, starting from the |
1299 | * root of the tree and going on the left every time on this side there is | 1299 | * root of the tree and going on the left every time on this side there is |
1300 | * a subtree with at least one eligible (start >= vtime) entity. The path on | 1300 | * a subtree with at least one eligible (start <= vtime) entity. The path on |
1301 | * the right is followed only if a) the left subtree contains no eligible | 1301 | * the right is followed only if a) the left subtree contains no eligible |
1302 | * entities and b) no eligible entity has been found yet. | 1302 | * entities and b) no eligible entity has been found yet. |
1303 | */ | 1303 | */ |
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index b75b734ee73a..19182d091587 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c | |||
@@ -3160,6 +3160,8 @@ static struct acpi_driver acpi_nfit_driver = { | |||
3160 | 3160 | ||
3161 | static __init int nfit_init(void) | 3161 | static __init int nfit_init(void) |
3162 | { | 3162 | { |
3163 | int ret; | ||
3164 | |||
3163 | BUILD_BUG_ON(sizeof(struct acpi_table_nfit) != 40); | 3165 | BUILD_BUG_ON(sizeof(struct acpi_table_nfit) != 40); |
3164 | BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 56); | 3166 | BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 56); |
3165 | BUILD_BUG_ON(sizeof(struct acpi_nfit_memory_map) != 48); | 3167 | BUILD_BUG_ON(sizeof(struct acpi_nfit_memory_map) != 48); |
@@ -3187,8 +3189,14 @@ static __init int nfit_init(void) | |||
3187 | return -ENOMEM; | 3189 | return -ENOMEM; |
3188 | 3190 | ||
3189 | nfit_mce_register(); | 3191 | nfit_mce_register(); |
3192 | ret = acpi_bus_register_driver(&acpi_nfit_driver); | ||
3193 | if (ret) { | ||
3194 | nfit_mce_unregister(); | ||
3195 | destroy_workqueue(nfit_wq); | ||
3196 | } | ||
3197 | |||
3198 | return ret; | ||
3190 | 3199 | ||
3191 | return acpi_bus_register_driver(&acpi_nfit_driver); | ||
3192 | } | 3200 | } |
3193 | 3201 | ||
3194 | static __exit void nfit_exit(void) | 3202 | static __exit void nfit_exit(void) |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index edb0c79f7c64..917f1cc0fda4 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -443,7 +443,7 @@ int __init acpi_numa_init(void) | |||
443 | * So go over all cpu entries in SRAT to get apicid to node mapping. | 443 | * So go over all cpu entries in SRAT to get apicid to node mapping. |
444 | */ | 444 | */ |
445 | 445 | ||
446 | /* SRAT: Static Resource Affinity Table */ | 446 | /* SRAT: System Resource Affinity Table */ |
447 | if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { | 447 | if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { |
448 | struct acpi_subtable_proc srat_proc[3]; | 448 | struct acpi_subtable_proc srat_proc[3]; |
449 | 449 | ||
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index aae4d8d4be36..f7665c31feca 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c | |||
@@ -2200,8 +2200,12 @@ static void binder_transaction(struct binder_proc *proc, | |||
2200 | list_add_tail(&t->work.entry, target_list); | 2200 | list_add_tail(&t->work.entry, target_list); |
2201 | tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE; | 2201 | tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE; |
2202 | list_add_tail(&tcomplete->entry, &thread->todo); | 2202 | list_add_tail(&tcomplete->entry, &thread->todo); |
2203 | if (target_wait) | 2203 | if (target_wait) { |
2204 | wake_up_interruptible(target_wait); | 2204 | if (reply || !(t->flags & TF_ONE_WAY)) |
2205 | wake_up_interruptible_sync(target_wait); | ||
2206 | else | ||
2207 | wake_up_interruptible(target_wait); | ||
2208 | } | ||
2205 | return; | 2209 | return; |
2206 | 2210 | ||
2207 | err_translate_failed: | 2211 | err_translate_failed: |
@@ -3247,10 +3251,6 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
3247 | /*pr_info("binder_ioctl: %d:%d %x %lx\n", | 3251 | /*pr_info("binder_ioctl: %d:%d %x %lx\n", |
3248 | proc->pid, current->pid, cmd, arg);*/ | 3252 | proc->pid, current->pid, cmd, arg);*/ |
3249 | 3253 | ||
3250 | if (unlikely(current->mm != proc->vma_vm_mm)) { | ||
3251 | pr_err("current mm mismatch proc mm\n"); | ||
3252 | return -EINVAL; | ||
3253 | } | ||
3254 | trace_binder_ioctl(cmd, arg); | 3254 | trace_binder_ioctl(cmd, arg); |
3255 | 3255 | ||
3256 | ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2); | 3256 | ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2); |
@@ -3464,9 +3464,8 @@ static int binder_open(struct inode *nodp, struct file *filp) | |||
3464 | proc = kzalloc(sizeof(*proc), GFP_KERNEL); | 3464 | proc = kzalloc(sizeof(*proc), GFP_KERNEL); |
3465 | if (proc == NULL) | 3465 | if (proc == NULL) |
3466 | return -ENOMEM; | 3466 | return -ENOMEM; |
3467 | get_task_struct(current); | 3467 | get_task_struct(current->group_leader); |
3468 | proc->tsk = current; | 3468 | proc->tsk = current->group_leader; |
3469 | proc->vma_vm_mm = current->mm; | ||
3470 | INIT_LIST_HEAD(&proc->todo); | 3469 | INIT_LIST_HEAD(&proc->todo); |
3471 | init_waitqueue_head(&proc->wait); | 3470 | init_waitqueue_head(&proc->wait); |
3472 | proc->default_priority = task_nice(current); | 3471 | proc->default_priority = task_nice(current); |
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 292dec18ffb8..07bdd51b3b9a 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
@@ -1613,7 +1613,7 @@ static int zatm_init_one(struct pci_dev *pci_dev, | |||
1613 | 1613 | ||
1614 | ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32)); | 1614 | ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32)); |
1615 | if (ret < 0) | 1615 | if (ret < 0) |
1616 | goto out_disable; | 1616 | goto out_release; |
1617 | 1617 | ||
1618 | zatm_dev->pci_dev = pci_dev; | 1618 | zatm_dev->pci_dev = pci_dev; |
1619 | dev->dev_data = zatm_dev; | 1619 | dev->dev_data = zatm_dev; |
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 3b8210ebb50e..60303aa28587 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -1222,8 +1222,6 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev, | |||
1222 | 1222 | ||
1223 | spin_unlock_irq(&dev->power.lock); | 1223 | spin_unlock_irq(&dev->power.lock); |
1224 | 1224 | ||
1225 | dev_pm_domain_set(dev, &genpd->domain); | ||
1226 | |||
1227 | return gpd_data; | 1225 | return gpd_data; |
1228 | 1226 | ||
1229 | err_free: | 1227 | err_free: |
@@ -1237,8 +1235,6 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev, | |||
1237 | static void genpd_free_dev_data(struct device *dev, | 1235 | static void genpd_free_dev_data(struct device *dev, |
1238 | struct generic_pm_domain_data *gpd_data) | 1236 | struct generic_pm_domain_data *gpd_data) |
1239 | { | 1237 | { |
1240 | dev_pm_domain_set(dev, NULL); | ||
1241 | |||
1242 | spin_lock_irq(&dev->power.lock); | 1238 | spin_lock_irq(&dev->power.lock); |
1243 | 1239 | ||
1244 | dev->power.subsys_data->domain_data = NULL; | 1240 | dev->power.subsys_data->domain_data = NULL; |
@@ -1275,6 +1271,8 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, | |||
1275 | if (ret) | 1271 | if (ret) |
1276 | goto out; | 1272 | goto out; |
1277 | 1273 | ||
1274 | dev_pm_domain_set(dev, &genpd->domain); | ||
1275 | |||
1278 | genpd->device_count++; | 1276 | genpd->device_count++; |
1279 | genpd->max_off_time_changed = true; | 1277 | genpd->max_off_time_changed = true; |
1280 | 1278 | ||
@@ -1336,6 +1334,8 @@ static int genpd_remove_device(struct generic_pm_domain *genpd, | |||
1336 | if (genpd->detach_dev) | 1334 | if (genpd->detach_dev) |
1337 | genpd->detach_dev(genpd, dev); | 1335 | genpd->detach_dev(genpd, dev); |
1338 | 1336 | ||
1337 | dev_pm_domain_set(dev, NULL); | ||
1338 | |||
1339 | list_del_init(&pdd->list_node); | 1339 | list_del_init(&pdd->list_node); |
1340 | 1340 | ||
1341 | genpd_unlock(genpd); | 1341 | genpd_unlock(genpd); |
diff --git a/drivers/base/regmap/regmap-w1.c b/drivers/base/regmap/regmap-w1.c index 5f04e7bf063e..e6c64b0be5b2 100644 --- a/drivers/base/regmap/regmap-w1.c +++ b/drivers/base/regmap/regmap-w1.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Register map access API - W1 (1-Wire) support | 2 | * Register map access API - W1 (1-Wire) support |
3 | * | 3 | * |
4 | * Copyright (C) 2017 OAO Radioavionica | 4 | * Copyright (c) 2017 Radioavionica Corporation |
5 | * Author: Alex A. Mihaylov <minimumlaw@rambler.ru> | 5 | * Author: Alex A. Mihaylov <minimumlaw@rambler.ru> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/regmap.h> | 12 | #include <linux/regmap.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include "../../w1/w1.h" | 14 | #include <linux/w1.h> |
15 | 15 | ||
16 | #include "internal.h" | 16 | #include "internal.h" |
17 | 17 | ||
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index dea7d85134ee..87a0a29f6e7e 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -626,7 +626,6 @@ static void recv_work(struct work_struct *work) | |||
626 | struct nbd_device *nbd = args->nbd; | 626 | struct nbd_device *nbd = args->nbd; |
627 | struct nbd_config *config = nbd->config; | 627 | struct nbd_config *config = nbd->config; |
628 | struct nbd_cmd *cmd; | 628 | struct nbd_cmd *cmd; |
629 | int ret = 0; | ||
630 | 629 | ||
631 | while (1) { | 630 | while (1) { |
632 | cmd = nbd_read_stat(nbd, args->index); | 631 | cmd = nbd_read_stat(nbd, args->index); |
@@ -636,7 +635,6 @@ static void recv_work(struct work_struct *work) | |||
636 | mutex_lock(&nsock->tx_lock); | 635 | mutex_lock(&nsock->tx_lock); |
637 | nbd_mark_nsock_dead(nbd, nsock, 1); | 636 | nbd_mark_nsock_dead(nbd, nsock, 1); |
638 | mutex_unlock(&nsock->tx_lock); | 637 | mutex_unlock(&nsock->tx_lock); |
639 | ret = PTR_ERR(cmd); | ||
640 | break; | 638 | break; |
641 | } | 639 | } |
642 | 640 | ||
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index f6e7491c873c..d509b500a7b5 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c | |||
@@ -41,8 +41,16 @@ static __init int timer_irq_init(struct device_node *np, | |||
41 | struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); | 41 | struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); |
42 | struct clock_event_device *clkevt = &to->clkevt; | 42 | struct clock_event_device *clkevt = &to->clkevt; |
43 | 43 | ||
44 | of_irq->irq = of_irq->name ? of_irq_get_byname(np, of_irq->name): | 44 | if (of_irq->name) { |
45 | irq_of_parse_and_map(np, of_irq->index); | 45 | of_irq->irq = ret = of_irq_get_byname(np, of_irq->name); |
46 | if (ret < 0) { | ||
47 | pr_err("Failed to get interrupt %s for %s\n", | ||
48 | of_irq->name, np->full_name); | ||
49 | return ret; | ||
50 | } | ||
51 | } else { | ||
52 | of_irq->irq = irq_of_parse_and_map(np, of_irq->index); | ||
53 | } | ||
46 | if (!of_irq->irq) { | 54 | if (!of_irq->irq) { |
47 | pr_err("Failed to map interrupt for %s\n", np->full_name); | 55 | pr_err("Failed to map interrupt for %s\n", np->full_name); |
48 | return -EINVAL; | 56 | return -EINVAL; |
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index b7fb8b7c980d..6cd503525638 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -225,6 +225,9 @@ struct global_params { | |||
225 | * @vid: Stores VID limits for this CPU | 225 | * @vid: Stores VID limits for this CPU |
226 | * @pid: Stores PID parameters for this CPU | 226 | * @pid: Stores PID parameters for this CPU |
227 | * @last_sample_time: Last Sample time | 227 | * @last_sample_time: Last Sample time |
228 | * @aperf_mperf_shift: Number of clock cycles after aperf, merf is incremented | ||
229 | * This shift is a multiplier to mperf delta to | ||
230 | * calculate CPU busy. | ||
228 | * @prev_aperf: Last APERF value read from APERF MSR | 231 | * @prev_aperf: Last APERF value read from APERF MSR |
229 | * @prev_mperf: Last MPERF value read from MPERF MSR | 232 | * @prev_mperf: Last MPERF value read from MPERF MSR |
230 | * @prev_tsc: Last timestamp counter (TSC) value | 233 | * @prev_tsc: Last timestamp counter (TSC) value |
@@ -259,6 +262,7 @@ struct cpudata { | |||
259 | 262 | ||
260 | u64 last_update; | 263 | u64 last_update; |
261 | u64 last_sample_time; | 264 | u64 last_sample_time; |
265 | u64 aperf_mperf_shift; | ||
262 | u64 prev_aperf; | 266 | u64 prev_aperf; |
263 | u64 prev_mperf; | 267 | u64 prev_mperf; |
264 | u64 prev_tsc; | 268 | u64 prev_tsc; |
@@ -321,6 +325,7 @@ struct pstate_funcs { | |||
321 | int (*get_min)(void); | 325 | int (*get_min)(void); |
322 | int (*get_turbo)(void); | 326 | int (*get_turbo)(void); |
323 | int (*get_scaling)(void); | 327 | int (*get_scaling)(void); |
328 | int (*get_aperf_mperf_shift)(void); | ||
324 | u64 (*get_val)(struct cpudata*, int pstate); | 329 | u64 (*get_val)(struct cpudata*, int pstate); |
325 | void (*get_vid)(struct cpudata *); | 330 | void (*get_vid)(struct cpudata *); |
326 | void (*update_util)(struct update_util_data *data, u64 time, | 331 | void (*update_util)(struct update_util_data *data, u64 time, |
@@ -1486,6 +1491,11 @@ static u64 core_get_val(struct cpudata *cpudata, int pstate) | |||
1486 | return val; | 1491 | return val; |
1487 | } | 1492 | } |
1488 | 1493 | ||
1494 | static int knl_get_aperf_mperf_shift(void) | ||
1495 | { | ||
1496 | return 10; | ||
1497 | } | ||
1498 | |||
1489 | static int knl_get_turbo_pstate(void) | 1499 | static int knl_get_turbo_pstate(void) |
1490 | { | 1500 | { |
1491 | u64 value; | 1501 | u64 value; |
@@ -1543,6 +1553,9 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) | |||
1543 | cpu->pstate.max_freq = cpu->pstate.max_pstate * cpu->pstate.scaling; | 1553 | cpu->pstate.max_freq = cpu->pstate.max_pstate * cpu->pstate.scaling; |
1544 | cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * cpu->pstate.scaling; | 1554 | cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * cpu->pstate.scaling; |
1545 | 1555 | ||
1556 | if (pstate_funcs.get_aperf_mperf_shift) | ||
1557 | cpu->aperf_mperf_shift = pstate_funcs.get_aperf_mperf_shift(); | ||
1558 | |||
1546 | if (pstate_funcs.get_vid) | 1559 | if (pstate_funcs.get_vid) |
1547 | pstate_funcs.get_vid(cpu); | 1560 | pstate_funcs.get_vid(cpu); |
1548 | 1561 | ||
@@ -1616,7 +1629,8 @@ static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu) | |||
1616 | int32_t busy_frac, boost; | 1629 | int32_t busy_frac, boost; |
1617 | int target, avg_pstate; | 1630 | int target, avg_pstate; |
1618 | 1631 | ||
1619 | busy_frac = div_fp(sample->mperf, sample->tsc); | 1632 | busy_frac = div_fp(sample->mperf << cpu->aperf_mperf_shift, |
1633 | sample->tsc); | ||
1620 | 1634 | ||
1621 | boost = cpu->iowait_boost; | 1635 | boost = cpu->iowait_boost; |
1622 | cpu->iowait_boost >>= 1; | 1636 | cpu->iowait_boost >>= 1; |
@@ -1675,7 +1689,8 @@ static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu) | |||
1675 | sample_ratio = div_fp(pid_params.sample_rate_ns, duration_ns); | 1689 | sample_ratio = div_fp(pid_params.sample_rate_ns, duration_ns); |
1676 | perf_scaled = mul_fp(perf_scaled, sample_ratio); | 1690 | perf_scaled = mul_fp(perf_scaled, sample_ratio); |
1677 | } else { | 1691 | } else { |
1678 | sample_ratio = div_fp(100 * cpu->sample.mperf, cpu->sample.tsc); | 1692 | sample_ratio = div_fp(100 * (cpu->sample.mperf << cpu->aperf_mperf_shift), |
1693 | cpu->sample.tsc); | ||
1679 | if (sample_ratio < int_tofp(1)) | 1694 | if (sample_ratio < int_tofp(1)) |
1680 | perf_scaled = 0; | 1695 | perf_scaled = 0; |
1681 | } | 1696 | } |
@@ -1807,6 +1822,7 @@ static const struct pstate_funcs knl_funcs = { | |||
1807 | .get_max_physical = core_get_max_pstate_physical, | 1822 | .get_max_physical = core_get_max_pstate_physical, |
1808 | .get_min = core_get_min_pstate, | 1823 | .get_min = core_get_min_pstate, |
1809 | .get_turbo = knl_get_turbo_pstate, | 1824 | .get_turbo = knl_get_turbo_pstate, |
1825 | .get_aperf_mperf_shift = knl_get_aperf_mperf_shift, | ||
1810 | .get_scaling = core_get_scaling, | 1826 | .get_scaling = core_get_scaling, |
1811 | .get_val = core_get_val, | 1827 | .get_val = core_get_val, |
1812 | .update_util = intel_pstate_update_util_pid, | 1828 | .update_util = intel_pstate_update_util_pid, |
@@ -2403,6 +2419,7 @@ static void __init copy_cpu_funcs(struct pstate_funcs *funcs) | |||
2403 | pstate_funcs.get_val = funcs->get_val; | 2419 | pstate_funcs.get_val = funcs->get_val; |
2404 | pstate_funcs.get_vid = funcs->get_vid; | 2420 | pstate_funcs.get_vid = funcs->get_vid; |
2405 | pstate_funcs.update_util = funcs->update_util; | 2421 | pstate_funcs.update_util = funcs->update_util; |
2422 | pstate_funcs.get_aperf_mperf_shift = funcs->get_aperf_mperf_shift; | ||
2406 | 2423 | ||
2407 | intel_pstate_use_acpi_profile(); | 2424 | intel_pstate_use_acpi_profile(); |
2408 | } | 2425 | } |
diff --git a/drivers/dax/device-dax.h b/drivers/dax/device-dax.h index fdcd9769ffde..688b051750bd 100644 --- a/drivers/dax/device-dax.h +++ b/drivers/dax/device-dax.h | |||
@@ -21,5 +21,5 @@ struct dax_region *alloc_dax_region(struct device *parent, | |||
21 | int region_id, struct resource *res, unsigned int align, | 21 | int region_id, struct resource *res, unsigned int align, |
22 | void *addr, unsigned long flags); | 22 | void *addr, unsigned long flags); |
23 | struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, | 23 | struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, |
24 | struct resource *res, int count); | 24 | int id, struct resource *res, int count); |
25 | #endif /* __DEVICE_DAX_H__ */ | 25 | #endif /* __DEVICE_DAX_H__ */ |
diff --git a/drivers/dax/device.c b/drivers/dax/device.c index 12943d19bfc4..e9f3b3e4bbf4 100644 --- a/drivers/dax/device.c +++ b/drivers/dax/device.c | |||
@@ -529,7 +529,8 @@ static void dev_dax_release(struct device *dev) | |||
529 | struct dax_region *dax_region = dev_dax->region; | 529 | struct dax_region *dax_region = dev_dax->region; |
530 | struct dax_device *dax_dev = dev_dax->dax_dev; | 530 | struct dax_device *dax_dev = dev_dax->dax_dev; |
531 | 531 | ||
532 | ida_simple_remove(&dax_region->ida, dev_dax->id); | 532 | if (dev_dax->id >= 0) |
533 | ida_simple_remove(&dax_region->ida, dev_dax->id); | ||
533 | dax_region_put(dax_region); | 534 | dax_region_put(dax_region); |
534 | put_dax(dax_dev); | 535 | put_dax(dax_dev); |
535 | kfree(dev_dax); | 536 | kfree(dev_dax); |
@@ -559,7 +560,7 @@ static void unregister_dev_dax(void *dev) | |||
559 | } | 560 | } |
560 | 561 | ||
561 | struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, | 562 | struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, |
562 | struct resource *res, int count) | 563 | int id, struct resource *res, int count) |
563 | { | 564 | { |
564 | struct device *parent = dax_region->dev; | 565 | struct device *parent = dax_region->dev; |
565 | struct dax_device *dax_dev; | 566 | struct dax_device *dax_dev; |
@@ -567,7 +568,10 @@ struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, | |||
567 | struct inode *inode; | 568 | struct inode *inode; |
568 | struct device *dev; | 569 | struct device *dev; |
569 | struct cdev *cdev; | 570 | struct cdev *cdev; |
570 | int rc = 0, i; | 571 | int rc, i; |
572 | |||
573 | if (!count) | ||
574 | return ERR_PTR(-EINVAL); | ||
571 | 575 | ||
572 | dev_dax = kzalloc(sizeof(*dev_dax) + sizeof(*res) * count, GFP_KERNEL); | 576 | dev_dax = kzalloc(sizeof(*dev_dax) + sizeof(*res) * count, GFP_KERNEL); |
573 | if (!dev_dax) | 577 | if (!dev_dax) |
@@ -587,10 +591,16 @@ struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, | |||
587 | if (i < count) | 591 | if (i < count) |
588 | goto err_id; | 592 | goto err_id; |
589 | 593 | ||
590 | dev_dax->id = ida_simple_get(&dax_region->ida, 0, 0, GFP_KERNEL); | 594 | if (id < 0) { |
591 | if (dev_dax->id < 0) { | 595 | id = ida_simple_get(&dax_region->ida, 0, 0, GFP_KERNEL); |
592 | rc = dev_dax->id; | 596 | dev_dax->id = id; |
593 | goto err_id; | 597 | if (id < 0) { |
598 | rc = id; | ||
599 | goto err_id; | ||
600 | } | ||
601 | } else { | ||
602 | /* region provider owns @id lifetime */ | ||
603 | dev_dax->id = -1; | ||
594 | } | 604 | } |
595 | 605 | ||
596 | /* | 606 | /* |
@@ -598,8 +608,10 @@ struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, | |||
598 | * device outside of mmap of the resulting character device. | 608 | * device outside of mmap of the resulting character device. |
599 | */ | 609 | */ |
600 | dax_dev = alloc_dax(dev_dax, NULL, NULL); | 610 | dax_dev = alloc_dax(dev_dax, NULL, NULL); |
601 | if (!dax_dev) | 611 | if (!dax_dev) { |
612 | rc = -ENOMEM; | ||
602 | goto err_dax; | 613 | goto err_dax; |
614 | } | ||
603 | 615 | ||
604 | /* from here on we're committed to teardown via dax_dev_release() */ | 616 | /* from here on we're committed to teardown via dax_dev_release() */ |
605 | dev = &dev_dax->dev; | 617 | dev = &dev_dax->dev; |
@@ -620,7 +632,7 @@ struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, | |||
620 | dev->parent = parent; | 632 | dev->parent = parent; |
621 | dev->groups = dax_attribute_groups; | 633 | dev->groups = dax_attribute_groups; |
622 | dev->release = dev_dax_release; | 634 | dev->release = dev_dax_release; |
623 | dev_set_name(dev, "dax%d.%d", dax_region->id, dev_dax->id); | 635 | dev_set_name(dev, "dax%d.%d", dax_region->id, id); |
624 | 636 | ||
625 | rc = cdev_device_add(cdev, dev); | 637 | rc = cdev_device_add(cdev, dev); |
626 | if (rc) { | 638 | if (rc) { |
@@ -636,7 +648,8 @@ struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, | |||
636 | return dev_dax; | 648 | return dev_dax; |
637 | 649 | ||
638 | err_dax: | 650 | err_dax: |
639 | ida_simple_remove(&dax_region->ida, dev_dax->id); | 651 | if (dev_dax->id >= 0) |
652 | ida_simple_remove(&dax_region->ida, dev_dax->id); | ||
640 | err_id: | 653 | err_id: |
641 | kfree(dev_dax); | 654 | kfree(dev_dax); |
642 | 655 | ||
diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c index 9f2a0b4fd801..8d8c852ba8f2 100644 --- a/drivers/dax/pmem.c +++ b/drivers/dax/pmem.c | |||
@@ -58,13 +58,12 @@ static void dax_pmem_percpu_kill(void *data) | |||
58 | 58 | ||
59 | static int dax_pmem_probe(struct device *dev) | 59 | static int dax_pmem_probe(struct device *dev) |
60 | { | 60 | { |
61 | int rc; | ||
62 | void *addr; | 61 | void *addr; |
63 | struct resource res; | 62 | struct resource res; |
63 | int rc, id, region_id; | ||
64 | struct nd_pfn_sb *pfn_sb; | 64 | struct nd_pfn_sb *pfn_sb; |
65 | struct dev_dax *dev_dax; | 65 | struct dev_dax *dev_dax; |
66 | struct dax_pmem *dax_pmem; | 66 | struct dax_pmem *dax_pmem; |
67 | struct nd_region *nd_region; | ||
68 | struct nd_namespace_io *nsio; | 67 | struct nd_namespace_io *nsio; |
69 | struct dax_region *dax_region; | 68 | struct dax_region *dax_region; |
70 | struct nd_namespace_common *ndns; | 69 | struct nd_namespace_common *ndns; |
@@ -123,14 +122,17 @@ static int dax_pmem_probe(struct device *dev) | |||
123 | /* adjust the dax_region resource to the start of data */ | 122 | /* adjust the dax_region resource to the start of data */ |
124 | res.start += le64_to_cpu(pfn_sb->dataoff); | 123 | res.start += le64_to_cpu(pfn_sb->dataoff); |
125 | 124 | ||
126 | nd_region = to_nd_region(dev->parent); | 125 | rc = sscanf(dev_name(&ndns->dev), "namespace%d.%d", ®ion_id, &id); |
127 | dax_region = alloc_dax_region(dev, nd_region->id, &res, | 126 | if (rc != 2) |
127 | return -EINVAL; | ||
128 | |||
129 | dax_region = alloc_dax_region(dev, region_id, &res, | ||
128 | le32_to_cpu(pfn_sb->align), addr, PFN_DEV|PFN_MAP); | 130 | le32_to_cpu(pfn_sb->align), addr, PFN_DEV|PFN_MAP); |
129 | if (!dax_region) | 131 | if (!dax_region) |
130 | return -ENOMEM; | 132 | return -ENOMEM; |
131 | 133 | ||
132 | /* TODO: support for subdividing a dax region... */ | 134 | /* TODO: support for subdividing a dax region... */ |
133 | dev_dax = devm_create_dev_dax(dax_region, &res, 1); | 135 | dev_dax = devm_create_dev_dax(dax_region, id, &res, 1); |
134 | 136 | ||
135 | /* child dev_dax instances now own the lifetime of the dax_region */ | 137 | /* child dev_dax instances now own the lifetime of the dax_region */ |
136 | dax_region_put(dax_region); | 138 | dax_region_put(dax_region); |
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 57da14c15987..56e0a0e1b600 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c | |||
@@ -75,11 +75,6 @@ int dma_fence_signal_locked(struct dma_fence *fence) | |||
75 | if (WARN_ON(!fence)) | 75 | if (WARN_ON(!fence)) |
76 | return -EINVAL; | 76 | return -EINVAL; |
77 | 77 | ||
78 | if (!ktime_to_ns(fence->timestamp)) { | ||
79 | fence->timestamp = ktime_get(); | ||
80 | smp_mb__before_atomic(); | ||
81 | } | ||
82 | |||
83 | if (test_and_set_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) { | 78 | if (test_and_set_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) { |
84 | ret = -EINVAL; | 79 | ret = -EINVAL; |
85 | 80 | ||
@@ -87,8 +82,11 @@ int dma_fence_signal_locked(struct dma_fence *fence) | |||
87 | * we might have raced with the unlocked dma_fence_signal, | 82 | * we might have raced with the unlocked dma_fence_signal, |
88 | * still run through all callbacks | 83 | * still run through all callbacks |
89 | */ | 84 | */ |
90 | } else | 85 | } else { |
86 | fence->timestamp = ktime_get(); | ||
87 | set_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags); | ||
91 | trace_dma_fence_signaled(fence); | 88 | trace_dma_fence_signaled(fence); |
89 | } | ||
92 | 90 | ||
93 | list_for_each_entry_safe(cur, tmp, &fence->cb_list, node) { | 91 | list_for_each_entry_safe(cur, tmp, &fence->cb_list, node) { |
94 | list_del_init(&cur->node); | 92 | list_del_init(&cur->node); |
@@ -115,14 +113,11 @@ int dma_fence_signal(struct dma_fence *fence) | |||
115 | if (!fence) | 113 | if (!fence) |
116 | return -EINVAL; | 114 | return -EINVAL; |
117 | 115 | ||
118 | if (!ktime_to_ns(fence->timestamp)) { | ||
119 | fence->timestamp = ktime_get(); | ||
120 | smp_mb__before_atomic(); | ||
121 | } | ||
122 | |||
123 | if (test_and_set_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) | 116 | if (test_and_set_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) |
124 | return -EINVAL; | 117 | return -EINVAL; |
125 | 118 | ||
119 | fence->timestamp = ktime_get(); | ||
120 | set_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags); | ||
126 | trace_dma_fence_signaled(fence); | 121 | trace_dma_fence_signaled(fence); |
127 | 122 | ||
128 | if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &fence->flags)) { | 123 | if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &fence->flags)) { |
diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c index 82a6e7f6d37f..59a3b2f8ee91 100644 --- a/drivers/dma-buf/sync_debug.c +++ b/drivers/dma-buf/sync_debug.c | |||
@@ -84,7 +84,7 @@ static void sync_print_fence(struct seq_file *s, | |||
84 | show ? "_" : "", | 84 | show ? "_" : "", |
85 | sync_status_str(status)); | 85 | sync_status_str(status)); |
86 | 86 | ||
87 | if (status) { | 87 | if (test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags)) { |
88 | struct timespec64 ts64 = | 88 | struct timespec64 ts64 = |
89 | ktime_to_timespec64(fence->timestamp); | 89 | ktime_to_timespec64(fence->timestamp); |
90 | 90 | ||
diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c index 545e2c5c4815..d7e219d2669d 100644 --- a/drivers/dma-buf/sync_file.c +++ b/drivers/dma-buf/sync_file.c | |||
@@ -391,7 +391,13 @@ static void sync_fill_fence_info(struct dma_fence *fence, | |||
391 | sizeof(info->driver_name)); | 391 | sizeof(info->driver_name)); |
392 | 392 | ||
393 | info->status = dma_fence_get_status(fence); | 393 | info->status = dma_fence_get_status(fence); |
394 | info->timestamp_ns = ktime_to_ns(fence->timestamp); | 394 | while (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) && |
395 | !test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags)) | ||
396 | cpu_relax(); | ||
397 | info->timestamp_ns = | ||
398 | test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags) ? | ||
399 | ktime_to_ns(fence->timestamp) : | ||
400 | ktime_set(0, 0); | ||
395 | } | 401 | } |
396 | 402 | ||
397 | static long sync_file_ioctl_fence_info(struct sync_file *sync_file, | 403 | static long sync_file_ioctl_fence_info(struct sync_file *sync_file, |
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index a485864cb512..06432d84cbf8 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c | |||
@@ -532,7 +532,7 @@ static inline uint32_t fsi_smode_sid(int x) | |||
532 | return (x & FSI_SMODE_SID_MASK) << FSI_SMODE_SID_SHIFT; | 532 | return (x & FSI_SMODE_SID_MASK) << FSI_SMODE_SID_SHIFT; |
533 | } | 533 | } |
534 | 534 | ||
535 | static const uint32_t fsi_slave_smode(int id) | 535 | static uint32_t fsi_slave_smode(int id) |
536 | { | 536 | { |
537 | return FSI_SMODE_WSC | FSI_SMODE_ECRC | 537 | return FSI_SMODE_WSC | FSI_SMODE_ECRC |
538 | | fsi_smode_sid(id) | 538 | | fsi_smode_sid(id) |
@@ -883,17 +883,16 @@ struct bus_type fsi_bus_type = { | |||
883 | }; | 883 | }; |
884 | EXPORT_SYMBOL_GPL(fsi_bus_type); | 884 | EXPORT_SYMBOL_GPL(fsi_bus_type); |
885 | 885 | ||
886 | static int fsi_init(void) | 886 | static int __init fsi_init(void) |
887 | { | 887 | { |
888 | return bus_register(&fsi_bus_type); | 888 | return bus_register(&fsi_bus_type); |
889 | } | 889 | } |
890 | postcore_initcall(fsi_init); | ||
890 | 891 | ||
891 | static void fsi_exit(void) | 892 | static void fsi_exit(void) |
892 | { | 893 | { |
893 | bus_unregister(&fsi_bus_type); | 894 | bus_unregister(&fsi_bus_type); |
894 | } | 895 | } |
895 | |||
896 | module_init(fsi_init); | ||
897 | module_exit(fsi_exit); | 896 | module_exit(fsi_exit); |
898 | module_param(discard_errors, int, 0664); | 897 | module_param(discard_errors, int, 0664); |
899 | MODULE_LICENSE("GPL"); | 898 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index 5f8ada1d872b..37971d9402e3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | |||
@@ -101,7 +101,6 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev) | |||
101 | if (adev->kfd) { | 101 | if (adev->kfd) { |
102 | struct kgd2kfd_shared_resources gpu_resources = { | 102 | struct kgd2kfd_shared_resources gpu_resources = { |
103 | .compute_vmid_bitmap = 0xFF00, | 103 | .compute_vmid_bitmap = 0xFF00, |
104 | .num_mec = adev->gfx.mec.num_mec, | ||
105 | .num_pipe_per_mec = adev->gfx.mec.num_pipe_per_mec, | 104 | .num_pipe_per_mec = adev->gfx.mec.num_pipe_per_mec, |
106 | .num_queue_per_pipe = adev->gfx.mec.num_queue_per_pipe | 105 | .num_queue_per_pipe = adev->gfx.mec.num_queue_per_pipe |
107 | }; | 106 | }; |
@@ -122,7 +121,7 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev) | |||
122 | 121 | ||
123 | /* According to linux/bitmap.h we shouldn't use bitmap_clear if | 122 | /* According to linux/bitmap.h we shouldn't use bitmap_clear if |
124 | * nbits is not compile time constant */ | 123 | * nbits is not compile time constant */ |
125 | last_valid_bit = adev->gfx.mec.num_mec | 124 | last_valid_bit = 1 /* only first MEC can have compute queues */ |
126 | * adev->gfx.mec.num_pipe_per_mec | 125 | * adev->gfx.mec.num_pipe_per_mec |
127 | * adev->gfx.mec.num_queue_per_pipe; | 126 | * adev->gfx.mec.num_queue_per_pipe; |
128 | for (i = last_valid_bit; i < KGD_MAX_QUEUES; ++i) | 127 | for (i = last_valid_bit; i < KGD_MAX_QUEUES; ++i) |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 88187bfc5ea3..3f95f7cb4019 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c | |||
@@ -226,10 +226,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, | |||
226 | 226 | ||
227 | kfd->shared_resources = *gpu_resources; | 227 | kfd->shared_resources = *gpu_resources; |
228 | 228 | ||
229 | /* We only use the first MEC */ | ||
230 | if (kfd->shared_resources.num_mec > 1) | ||
231 | kfd->shared_resources.num_mec = 1; | ||
232 | |||
233 | /* calculate max size of mqds needed for queues */ | 229 | /* calculate max size of mqds needed for queues */ |
234 | size = max_num_of_queues_per_device * | 230 | size = max_num_of_queues_per_device * |
235 | kfd->device_info->mqd_size_aligned; | 231 | kfd->device_info->mqd_size_aligned; |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 955aa304ff48..602769ced3bd 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | |||
@@ -77,13 +77,6 @@ static bool is_pipe_enabled(struct device_queue_manager *dqm, int mec, int pipe) | |||
77 | return false; | 77 | return false; |
78 | } | 78 | } |
79 | 79 | ||
80 | unsigned int get_mec_num(struct device_queue_manager *dqm) | ||
81 | { | ||
82 | BUG_ON(!dqm || !dqm->dev); | ||
83 | |||
84 | return dqm->dev->shared_resources.num_mec; | ||
85 | } | ||
86 | |||
87 | unsigned int get_queues_num(struct device_queue_manager *dqm) | 80 | unsigned int get_queues_num(struct device_queue_manager *dqm) |
88 | { | 81 | { |
89 | BUG_ON(!dqm || !dqm->dev); | 82 | BUG_ON(!dqm || !dqm->dev); |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h index 66b9615bc3c1..faf820a06400 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | |||
@@ -180,7 +180,6 @@ void device_queue_manager_init_cik(struct device_queue_manager_asic_ops *ops); | |||
180 | void device_queue_manager_init_vi(struct device_queue_manager_asic_ops *ops); | 180 | void device_queue_manager_init_vi(struct device_queue_manager_asic_ops *ops); |
181 | void program_sh_mem_settings(struct device_queue_manager *dqm, | 181 | void program_sh_mem_settings(struct device_queue_manager *dqm, |
182 | struct qcm_process_device *qpd); | 182 | struct qcm_process_device *qpd); |
183 | unsigned int get_mec_num(struct device_queue_manager *dqm); | ||
184 | unsigned int get_queues_num(struct device_queue_manager *dqm); | 183 | unsigned int get_queues_num(struct device_queue_manager *dqm); |
185 | unsigned int get_queues_per_pipe(struct device_queue_manager *dqm); | 184 | unsigned int get_queues_per_pipe(struct device_queue_manager *dqm); |
186 | unsigned int get_pipes_per_mec(struct device_queue_manager *dqm); | 185 | unsigned int get_pipes_per_mec(struct device_queue_manager *dqm); |
diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h index 91ef1484b3bb..36f376677a53 100644 --- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h +++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h | |||
@@ -63,9 +63,6 @@ struct kgd2kfd_shared_resources { | |||
63 | /* Bit n == 1 means VMID n is available for KFD. */ | 63 | /* Bit n == 1 means VMID n is available for KFD. */ |
64 | unsigned int compute_vmid_bitmap; | 64 | unsigned int compute_vmid_bitmap; |
65 | 65 | ||
66 | /* number of mec available from the hardware */ | ||
67 | uint32_t num_mec; | ||
68 | |||
69 | /* number of pipes per mec */ | 66 | /* number of pipes per mec */ |
70 | uint32_t num_pipe_per_mec; | 67 | uint32_t num_pipe_per_mec; |
71 | 68 | ||
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index bfd237c15e76..ae5f06895562 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c | |||
@@ -330,6 +330,13 @@ static bool drm_dp_sideband_msg_build(struct drm_dp_sideband_msg_rx *msg, | |||
330 | return false; | 330 | return false; |
331 | } | 331 | } |
332 | 332 | ||
333 | /* | ||
334 | * ignore out-of-order messages or messages that are part of a | ||
335 | * failed transaction | ||
336 | */ | ||
337 | if (!recv_hdr.somt && !msg->have_somt) | ||
338 | return false; | ||
339 | |||
333 | /* get length contained in this portion */ | 340 | /* get length contained in this portion */ |
334 | msg->curchunk_len = recv_hdr.msg_len; | 341 | msg->curchunk_len = recv_hdr.msg_len; |
335 | msg->curchunk_hdrlen = hdrlen; | 342 | msg->curchunk_hdrlen = hdrlen; |
@@ -2164,7 +2171,7 @@ out_unlock: | |||
2164 | } | 2171 | } |
2165 | EXPORT_SYMBOL(drm_dp_mst_topology_mgr_resume); | 2172 | EXPORT_SYMBOL(drm_dp_mst_topology_mgr_resume); |
2166 | 2173 | ||
2167 | static void drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up) | 2174 | static bool drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up) |
2168 | { | 2175 | { |
2169 | int len; | 2176 | int len; |
2170 | u8 replyblock[32]; | 2177 | u8 replyblock[32]; |
@@ -2179,12 +2186,12 @@ static void drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up) | |||
2179 | replyblock, len); | 2186 | replyblock, len); |
2180 | if (ret != len) { | 2187 | if (ret != len) { |
2181 | DRM_DEBUG_KMS("failed to read DPCD down rep %d %d\n", len, ret); | 2188 | DRM_DEBUG_KMS("failed to read DPCD down rep %d %d\n", len, ret); |
2182 | return; | 2189 | return false; |
2183 | } | 2190 | } |
2184 | ret = drm_dp_sideband_msg_build(msg, replyblock, len, true); | 2191 | ret = drm_dp_sideband_msg_build(msg, replyblock, len, true); |
2185 | if (!ret) { | 2192 | if (!ret) { |
2186 | DRM_DEBUG_KMS("sideband msg build failed %d\n", replyblock[0]); | 2193 | DRM_DEBUG_KMS("sideband msg build failed %d\n", replyblock[0]); |
2187 | return; | 2194 | return false; |
2188 | } | 2195 | } |
2189 | replylen = msg->curchunk_len + msg->curchunk_hdrlen; | 2196 | replylen = msg->curchunk_len + msg->curchunk_hdrlen; |
2190 | 2197 | ||
@@ -2196,21 +2203,32 @@ static void drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up) | |||
2196 | ret = drm_dp_dpcd_read(mgr->aux, basereg + curreply, | 2203 | ret = drm_dp_dpcd_read(mgr->aux, basereg + curreply, |
2197 | replyblock, len); | 2204 | replyblock, len); |
2198 | if (ret != len) { | 2205 | if (ret != len) { |
2199 | DRM_DEBUG_KMS("failed to read a chunk\n"); | 2206 | DRM_DEBUG_KMS("failed to read a chunk (len %d, ret %d)\n", |
2207 | len, ret); | ||
2208 | return false; | ||
2200 | } | 2209 | } |
2210 | |||
2201 | ret = drm_dp_sideband_msg_build(msg, replyblock, len, false); | 2211 | ret = drm_dp_sideband_msg_build(msg, replyblock, len, false); |
2202 | if (ret == false) | 2212 | if (!ret) { |
2203 | DRM_DEBUG_KMS("failed to build sideband msg\n"); | 2213 | DRM_DEBUG_KMS("failed to build sideband msg\n"); |
2214 | return false; | ||
2215 | } | ||
2216 | |||
2204 | curreply += len; | 2217 | curreply += len; |
2205 | replylen -= len; | 2218 | replylen -= len; |
2206 | } | 2219 | } |
2220 | return true; | ||
2207 | } | 2221 | } |
2208 | 2222 | ||
2209 | static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr) | 2223 | static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr) |
2210 | { | 2224 | { |
2211 | int ret = 0; | 2225 | int ret = 0; |
2212 | 2226 | ||
2213 | drm_dp_get_one_sb_msg(mgr, false); | 2227 | if (!drm_dp_get_one_sb_msg(mgr, false)) { |
2228 | memset(&mgr->down_rep_recv, 0, | ||
2229 | sizeof(struct drm_dp_sideband_msg_rx)); | ||
2230 | return 0; | ||
2231 | } | ||
2214 | 2232 | ||
2215 | if (mgr->down_rep_recv.have_eomt) { | 2233 | if (mgr->down_rep_recv.have_eomt) { |
2216 | struct drm_dp_sideband_msg_tx *txmsg; | 2234 | struct drm_dp_sideband_msg_tx *txmsg; |
@@ -2266,7 +2284,12 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr) | |||
2266 | static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) | 2284 | static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) |
2267 | { | 2285 | { |
2268 | int ret = 0; | 2286 | int ret = 0; |
2269 | drm_dp_get_one_sb_msg(mgr, true); | 2287 | |
2288 | if (!drm_dp_get_one_sb_msg(mgr, true)) { | ||
2289 | memset(&mgr->up_req_recv, 0, | ||
2290 | sizeof(struct drm_dp_sideband_msg_rx)); | ||
2291 | return 0; | ||
2292 | } | ||
2270 | 2293 | ||
2271 | if (mgr->up_req_recv.have_eomt) { | 2294 | if (mgr->up_req_recv.have_eomt) { |
2272 | struct drm_dp_sideband_msg_req_body msg; | 2295 | struct drm_dp_sideband_msg_req_body msg; |
@@ -2318,7 +2341,9 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) | |||
2318 | DRM_DEBUG_KMS("Got RSN: pn: %d avail_pbn %d\n", msg.u.resource_stat.port_number, msg.u.resource_stat.available_pbn); | 2341 | DRM_DEBUG_KMS("Got RSN: pn: %d avail_pbn %d\n", msg.u.resource_stat.port_number, msg.u.resource_stat.available_pbn); |
2319 | } | 2342 | } |
2320 | 2343 | ||
2321 | drm_dp_put_mst_branch_device(mstb); | 2344 | if (mstb) |
2345 | drm_dp_put_mst_branch_device(mstb); | ||
2346 | |||
2322 | memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); | 2347 | memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); |
2323 | } | 2348 | } |
2324 | return ret; | 2349 | return ret; |
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 49546222c6d3..6276bb834b4f 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c | |||
@@ -54,7 +54,7 @@ static const uint32_t ipu_plane_formats[] = { | |||
54 | DRM_FORMAT_RGBA8888, | 54 | DRM_FORMAT_RGBA8888, |
55 | DRM_FORMAT_RGBX8888, | 55 | DRM_FORMAT_RGBX8888, |
56 | DRM_FORMAT_BGRA8888, | 56 | DRM_FORMAT_BGRA8888, |
57 | DRM_FORMAT_BGRA8888, | 57 | DRM_FORMAT_BGRX8888, |
58 | DRM_FORMAT_UYVY, | 58 | DRM_FORMAT_UYVY, |
59 | DRM_FORMAT_VYUY, | 59 | DRM_FORMAT_VYUY, |
60 | DRM_FORMAT_YUYV, | 60 | DRM_FORMAT_YUYV, |
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c index 636031a30e17..8aca20209cb8 100644 --- a/drivers/gpu/drm/imx/parallel-display.c +++ b/drivers/gpu/drm/imx/parallel-display.c | |||
@@ -237,7 +237,7 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) | |||
237 | 237 | ||
238 | /* port@1 is the output port */ | 238 | /* port@1 is the output port */ |
239 | ret = drm_of_find_panel_or_bridge(np, 1, 0, &imxpd->panel, &imxpd->bridge); | 239 | ret = drm_of_find_panel_or_bridge(np, 1, 0, &imxpd->panel, &imxpd->bridge); |
240 | if (ret) | 240 | if (ret && ret != -ENODEV) |
241 | return ret; | 241 | return ret; |
242 | 242 | ||
243 | imxpd->dev = dev; | 243 | imxpd->dev = dev; |
diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c index 699fe7f9b8bf..a2ab6dcdf4a2 100644 --- a/drivers/gpu/drm/radeon/radeon_kfd.c +++ b/drivers/gpu/drm/radeon/radeon_kfd.c | |||
@@ -184,7 +184,6 @@ void radeon_kfd_device_init(struct radeon_device *rdev) | |||
184 | if (rdev->kfd) { | 184 | if (rdev->kfd) { |
185 | struct kgd2kfd_shared_resources gpu_resources = { | 185 | struct kgd2kfd_shared_resources gpu_resources = { |
186 | .compute_vmid_bitmap = 0xFF00, | 186 | .compute_vmid_bitmap = 0xFF00, |
187 | .num_mec = 1, | ||
188 | .num_pipe_per_mec = 4, | 187 | .num_pipe_per_mec = 4, |
189 | .num_queue_per_pipe = 8 | 188 | .num_queue_per_pipe = 8 |
190 | }; | 189 | }; |
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 403bbd5f99a9..a12cc7ea99b6 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c | |||
@@ -520,6 +520,34 @@ static void vc4_crtc_disable(struct drm_crtc *crtc) | |||
520 | SCALER_DISPSTATX_EMPTY); | 520 | SCALER_DISPSTATX_EMPTY); |
521 | } | 521 | } |
522 | 522 | ||
523 | static void vc4_crtc_update_dlist(struct drm_crtc *crtc) | ||
524 | { | ||
525 | struct drm_device *dev = crtc->dev; | ||
526 | struct vc4_dev *vc4 = to_vc4_dev(dev); | ||
527 | struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); | ||
528 | struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); | ||
529 | |||
530 | if (crtc->state->event) { | ||
531 | unsigned long flags; | ||
532 | |||
533 | crtc->state->event->pipe = drm_crtc_index(crtc); | ||
534 | |||
535 | WARN_ON(drm_crtc_vblank_get(crtc) != 0); | ||
536 | |||
537 | spin_lock_irqsave(&dev->event_lock, flags); | ||
538 | vc4_crtc->event = crtc->state->event; | ||
539 | crtc->state->event = NULL; | ||
540 | |||
541 | HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), | ||
542 | vc4_state->mm.start); | ||
543 | |||
544 | spin_unlock_irqrestore(&dev->event_lock, flags); | ||
545 | } else { | ||
546 | HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), | ||
547 | vc4_state->mm.start); | ||
548 | } | ||
549 | } | ||
550 | |||
523 | static void vc4_crtc_enable(struct drm_crtc *crtc) | 551 | static void vc4_crtc_enable(struct drm_crtc *crtc) |
524 | { | 552 | { |
525 | struct drm_device *dev = crtc->dev; | 553 | struct drm_device *dev = crtc->dev; |
@@ -530,6 +558,12 @@ static void vc4_crtc_enable(struct drm_crtc *crtc) | |||
530 | 558 | ||
531 | require_hvs_enabled(dev); | 559 | require_hvs_enabled(dev); |
532 | 560 | ||
561 | /* Enable vblank irq handling before crtc is started otherwise | ||
562 | * drm_crtc_get_vblank() fails in vc4_crtc_update_dlist(). | ||
563 | */ | ||
564 | drm_crtc_vblank_on(crtc); | ||
565 | vc4_crtc_update_dlist(crtc); | ||
566 | |||
533 | /* Turn on the scaler, which will wait for vstart to start | 567 | /* Turn on the scaler, which will wait for vstart to start |
534 | * compositing. | 568 | * compositing. |
535 | */ | 569 | */ |
@@ -541,9 +575,6 @@ static void vc4_crtc_enable(struct drm_crtc *crtc) | |||
541 | /* Turn on the pixel valve, which will emit the vstart signal. */ | 575 | /* Turn on the pixel valve, which will emit the vstart signal. */ |
542 | CRTC_WRITE(PV_V_CONTROL, | 576 | CRTC_WRITE(PV_V_CONTROL, |
543 | CRTC_READ(PV_V_CONTROL) | PV_VCONTROL_VIDEN); | 577 | CRTC_READ(PV_V_CONTROL) | PV_VCONTROL_VIDEN); |
544 | |||
545 | /* Enable vblank irq handling after crtc is started. */ | ||
546 | drm_crtc_vblank_on(crtc); | ||
547 | } | 578 | } |
548 | 579 | ||
549 | static bool vc4_crtc_mode_fixup(struct drm_crtc *crtc, | 580 | static bool vc4_crtc_mode_fixup(struct drm_crtc *crtc, |
@@ -598,7 +629,6 @@ static void vc4_crtc_atomic_flush(struct drm_crtc *crtc, | |||
598 | { | 629 | { |
599 | struct drm_device *dev = crtc->dev; | 630 | struct drm_device *dev = crtc->dev; |
600 | struct vc4_dev *vc4 = to_vc4_dev(dev); | 631 | struct vc4_dev *vc4 = to_vc4_dev(dev); |
601 | struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); | ||
602 | struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); | 632 | struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); |
603 | struct drm_plane *plane; | 633 | struct drm_plane *plane; |
604 | bool debug_dump_regs = false; | 634 | bool debug_dump_regs = false; |
@@ -620,25 +650,15 @@ static void vc4_crtc_atomic_flush(struct drm_crtc *crtc, | |||
620 | 650 | ||
621 | WARN_ON_ONCE(dlist_next - dlist_start != vc4_state->mm.size); | 651 | WARN_ON_ONCE(dlist_next - dlist_start != vc4_state->mm.size); |
622 | 652 | ||
623 | if (crtc->state->event) { | 653 | /* Only update DISPLIST if the CRTC was already running and is not |
624 | unsigned long flags; | 654 | * being disabled. |
625 | 655 | * vc4_crtc_enable() takes care of updating the dlist just after | |
626 | crtc->state->event->pipe = drm_crtc_index(crtc); | 656 | * re-enabling VBLANK interrupts and before enabling the engine. |
627 | 657 | * If the CRTC is being disabled, there's no point in updating this | |
628 | WARN_ON(drm_crtc_vblank_get(crtc) != 0); | 658 | * information. |
629 | 659 | */ | |
630 | spin_lock_irqsave(&dev->event_lock, flags); | 660 | if (crtc->state->active && old_state->active) |
631 | vc4_crtc->event = crtc->state->event; | 661 | vc4_crtc_update_dlist(crtc); |
632 | crtc->state->event = NULL; | ||
633 | |||
634 | HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), | ||
635 | vc4_state->mm.start); | ||
636 | |||
637 | spin_unlock_irqrestore(&dev->event_lock, flags); | ||
638 | } else { | ||
639 | HVS_WRITE(SCALER_DISPLISTX(vc4_crtc->channel), | ||
640 | vc4_state->mm.start); | ||
641 | } | ||
642 | 662 | ||
643 | if (debug_dump_regs) { | 663 | if (debug_dump_regs) { |
644 | DRM_INFO("CRTC %d HVS after:\n", drm_crtc_index(crtc)); | 664 | DRM_INFO("CRTC %d HVS after:\n", drm_crtc_index(crtc)); |
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 41b39464ded8..501e16a9227d 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c | |||
@@ -2732,6 +2732,9 @@ static int hidpp_initialize_battery(struct hidpp_device *hidpp) | |||
2732 | hidpp_battery_props, | 2732 | hidpp_battery_props, |
2733 | sizeof(hidpp_battery_props), | 2733 | sizeof(hidpp_battery_props), |
2734 | GFP_KERNEL); | 2734 | GFP_KERNEL); |
2735 | if (!battery_props) | ||
2736 | return -ENOMEM; | ||
2737 | |||
2735 | num_battery_props = ARRAY_SIZE(hidpp_battery_props) - 2; | 2738 | num_battery_props = ARRAY_SIZE(hidpp_battery_props) - 2; |
2736 | 2739 | ||
2737 | if (hidpp->capabilities & HIDPP_CAPABILITY_BATTERY_MILEAGE) | 2740 | if (hidpp->capabilities & HIDPP_CAPABILITY_BATTERY_MILEAGE) |
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index f3e35e7a189d..aff20f4b6d97 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -620,16 +620,6 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
620 | return 0; | 620 | return 0; |
621 | } | 621 | } |
622 | 622 | ||
623 | static int mt_touch_input_mapped(struct hid_device *hdev, struct hid_input *hi, | ||
624 | struct hid_field *field, struct hid_usage *usage, | ||
625 | unsigned long **bit, int *max) | ||
626 | { | ||
627 | if (usage->type == EV_KEY || usage->type == EV_ABS) | ||
628 | set_bit(usage->type, hi->input->evbit); | ||
629 | |||
630 | return -1; | ||
631 | } | ||
632 | |||
633 | static int mt_compute_slot(struct mt_device *td, struct input_dev *input) | 623 | static int mt_compute_slot(struct mt_device *td, struct input_dev *input) |
634 | { | 624 | { |
635 | __s32 quirks = td->mtclass.quirks; | 625 | __s32 quirks = td->mtclass.quirks; |
@@ -969,8 +959,10 @@ static int mt_input_mapped(struct hid_device *hdev, struct hid_input *hi, | |||
969 | return 0; | 959 | return 0; |
970 | 960 | ||
971 | if (field->application == HID_DG_TOUCHSCREEN || | 961 | if (field->application == HID_DG_TOUCHSCREEN || |
972 | field->application == HID_DG_TOUCHPAD) | 962 | field->application == HID_DG_TOUCHPAD) { |
973 | return mt_touch_input_mapped(hdev, hi, field, usage, bit, max); | 963 | /* We own these mappings, tell hid-input to ignore them */ |
964 | return -1; | ||
965 | } | ||
974 | 966 | ||
975 | /* let hid-core decide for the others */ | 967 | /* let hid-core decide for the others */ |
976 | return 0; | 968 | return 0; |
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index e9bf0bb87ac4..e57cc40cb768 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c | |||
@@ -606,6 +606,8 @@ static int vmbus_close_internal(struct vmbus_channel *channel) | |||
606 | get_order(channel->ringbuffer_pagecount * PAGE_SIZE)); | 606 | get_order(channel->ringbuffer_pagecount * PAGE_SIZE)); |
607 | 607 | ||
608 | out: | 608 | out: |
609 | /* re-enable tasklet for use on re-open */ | ||
610 | tasklet_enable(&channel->callback_event); | ||
609 | return ret; | 611 | return ret; |
610 | } | 612 | } |
611 | 613 | ||
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 0af7fd311979..76c34f4fde13 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c | |||
@@ -566,6 +566,8 @@ static int applesmc_init_smcreg_try(void) | |||
566 | if (ret) | 566 | if (ret) |
567 | return ret; | 567 | return ret; |
568 | s->fan_count = tmp[0]; | 568 | s->fan_count = tmp[0]; |
569 | if (s->fan_count > 10) | ||
570 | s->fan_count = 10; | ||
569 | 571 | ||
570 | ret = applesmc_get_lower_bound(&s->temp_begin, "T"); | 572 | ret = applesmc_get_lower_bound(&s->temp_begin, "T"); |
571 | if (ret) | 573 | if (ret) |
@@ -811,7 +813,8 @@ static ssize_t applesmc_show_fan_speed(struct device *dev, | |||
811 | char newkey[5]; | 813 | char newkey[5]; |
812 | u8 buffer[2]; | 814 | u8 buffer[2]; |
813 | 815 | ||
814 | sprintf(newkey, fan_speed_fmt[to_option(attr)], to_index(attr)); | 816 | scnprintf(newkey, sizeof(newkey), fan_speed_fmt[to_option(attr)], |
817 | to_index(attr)); | ||
815 | 818 | ||
816 | ret = applesmc_read_key(newkey, buffer, 2); | 819 | ret = applesmc_read_key(newkey, buffer, 2); |
817 | speed = ((buffer[0] << 8 | buffer[1]) >> 2); | 820 | speed = ((buffer[0] << 8 | buffer[1]) >> 2); |
@@ -834,7 +837,8 @@ static ssize_t applesmc_store_fan_speed(struct device *dev, | |||
834 | if (kstrtoul(sysfsbuf, 10, &speed) < 0 || speed >= 0x4000) | 837 | if (kstrtoul(sysfsbuf, 10, &speed) < 0 || speed >= 0x4000) |
835 | return -EINVAL; /* Bigger than a 14-bit value */ | 838 | return -EINVAL; /* Bigger than a 14-bit value */ |
836 | 839 | ||
837 | sprintf(newkey, fan_speed_fmt[to_option(attr)], to_index(attr)); | 840 | scnprintf(newkey, sizeof(newkey), fan_speed_fmt[to_option(attr)], |
841 | to_index(attr)); | ||
838 | 842 | ||
839 | buffer[0] = (speed >> 6) & 0xff; | 843 | buffer[0] = (speed >> 6) & 0xff; |
840 | buffer[1] = (speed << 2) & 0xff; | 844 | buffer[1] = (speed << 2) & 0xff; |
@@ -903,7 +907,7 @@ static ssize_t applesmc_show_fan_position(struct device *dev, | |||
903 | char newkey[5]; | 907 | char newkey[5]; |
904 | u8 buffer[17]; | 908 | u8 buffer[17]; |
905 | 909 | ||
906 | sprintf(newkey, FAN_ID_FMT, to_index(attr)); | 910 | scnprintf(newkey, sizeof(newkey), FAN_ID_FMT, to_index(attr)); |
907 | 911 | ||
908 | ret = applesmc_read_key(newkey, buffer, 16); | 912 | ret = applesmc_read_key(newkey, buffer, 16); |
909 | buffer[16] = 0; | 913 | buffer[16] = 0; |
@@ -1116,7 +1120,8 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num) | |||
1116 | } | 1120 | } |
1117 | for (i = 0; i < num; i++) { | 1121 | for (i = 0; i < num; i++) { |
1118 | node = &grp->nodes[i]; | 1122 | node = &grp->nodes[i]; |
1119 | sprintf(node->name, grp->format, i + 1); | 1123 | scnprintf(node->name, sizeof(node->name), grp->format, |
1124 | i + 1); | ||
1120 | node->sda.index = (grp->option << 16) | (i & 0xffff); | 1125 | node->sda.index = (grp->option << 16) | (i & 0xffff); |
1121 | node->sda.dev_attr.show = grp->show; | 1126 | node->sda.dev_attr.show = grp->show; |
1122 | node->sda.dev_attr.store = grp->store; | 1127 | node->sda.dev_attr.store = grp->store; |
diff --git a/drivers/ide/ide-timings.c b/drivers/ide/ide-timings.c index 0e05f75934c9..1858e3ce3993 100644 --- a/drivers/ide/ide-timings.c +++ b/drivers/ide/ide-timings.c | |||
@@ -104,19 +104,19 @@ u16 ide_pio_cycle_time(ide_drive_t *drive, u8 pio) | |||
104 | EXPORT_SYMBOL_GPL(ide_pio_cycle_time); | 104 | EXPORT_SYMBOL_GPL(ide_pio_cycle_time); |
105 | 105 | ||
106 | #define ENOUGH(v, unit) (((v) - 1) / (unit) + 1) | 106 | #define ENOUGH(v, unit) (((v) - 1) / (unit) + 1) |
107 | #define EZ(v, unit) ((v) ? ENOUGH(v, unit) : 0) | 107 | #define EZ(v, unit) ((v) ? ENOUGH((v) * 1000, unit) : 0) |
108 | 108 | ||
109 | static void ide_timing_quantize(struct ide_timing *t, struct ide_timing *q, | 109 | static void ide_timing_quantize(struct ide_timing *t, struct ide_timing *q, |
110 | int T, int UT) | 110 | int T, int UT) |
111 | { | 111 | { |
112 | q->setup = EZ(t->setup * 1000, T); | 112 | q->setup = EZ(t->setup, T); |
113 | q->act8b = EZ(t->act8b * 1000, T); | 113 | q->act8b = EZ(t->act8b, T); |
114 | q->rec8b = EZ(t->rec8b * 1000, T); | 114 | q->rec8b = EZ(t->rec8b, T); |
115 | q->cyc8b = EZ(t->cyc8b * 1000, T); | 115 | q->cyc8b = EZ(t->cyc8b, T); |
116 | q->active = EZ(t->active * 1000, T); | 116 | q->active = EZ(t->active, T); |
117 | q->recover = EZ(t->recover * 1000, T); | 117 | q->recover = EZ(t->recover, T); |
118 | q->cycle = EZ(t->cycle * 1000, T); | 118 | q->cycle = EZ(t->cycle, T); |
119 | q->udma = EZ(t->udma * 1000, UT); | 119 | q->udma = EZ(t->udma, UT); |
120 | } | 120 | } |
121 | 121 | ||
122 | void ide_timing_merge(struct ide_timing *a, struct ide_timing *b, | 122 | void ide_timing_merge(struct ide_timing *a, struct ide_timing *b, |
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index a6cb379a4ebc..01236cef7bfb 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -268,6 +268,7 @@ int rdma_translate_ip(const struct sockaddr *addr, | |||
268 | return ret; | 268 | return ret; |
269 | 269 | ||
270 | ret = rdma_copy_addr(dev_addr, dev, NULL); | 270 | ret = rdma_copy_addr(dev_addr, dev, NULL); |
271 | dev_addr->bound_dev_if = dev->ifindex; | ||
271 | if (vlan_id) | 272 | if (vlan_id) |
272 | *vlan_id = rdma_vlan_dev_vlan_id(dev); | 273 | *vlan_id = rdma_vlan_dev_vlan_id(dev); |
273 | dev_put(dev); | 274 | dev_put(dev); |
@@ -280,6 +281,7 @@ int rdma_translate_ip(const struct sockaddr *addr, | |||
280 | &((const struct sockaddr_in6 *)addr)->sin6_addr, | 281 | &((const struct sockaddr_in6 *)addr)->sin6_addr, |
281 | dev, 1)) { | 282 | dev, 1)) { |
282 | ret = rdma_copy_addr(dev_addr, dev, NULL); | 283 | ret = rdma_copy_addr(dev_addr, dev, NULL); |
284 | dev_addr->bound_dev_if = dev->ifindex; | ||
283 | if (vlan_id) | 285 | if (vlan_id) |
284 | *vlan_id = rdma_vlan_dev_vlan_id(dev); | 286 | *vlan_id = rdma_vlan_dev_vlan_id(dev); |
285 | break; | 287 | break; |
@@ -405,10 +407,10 @@ static int addr4_resolve(struct sockaddr_in *src_in, | |||
405 | fl4.saddr = src_ip; | 407 | fl4.saddr = src_ip; |
406 | fl4.flowi4_oif = addr->bound_dev_if; | 408 | fl4.flowi4_oif = addr->bound_dev_if; |
407 | rt = ip_route_output_key(addr->net, &fl4); | 409 | rt = ip_route_output_key(addr->net, &fl4); |
408 | if (IS_ERR(rt)) { | 410 | ret = PTR_ERR_OR_ZERO(rt); |
409 | ret = PTR_ERR(rt); | 411 | if (ret) |
410 | goto out; | 412 | return ret; |
411 | } | 413 | |
412 | src_in->sin_family = AF_INET; | 414 | src_in->sin_family = AF_INET; |
413 | src_in->sin_addr.s_addr = fl4.saddr; | 415 | src_in->sin_addr.s_addr = fl4.saddr; |
414 | 416 | ||
@@ -423,8 +425,6 @@ static int addr4_resolve(struct sockaddr_in *src_in, | |||
423 | 425 | ||
424 | *prt = rt; | 426 | *prt = rt; |
425 | return 0; | 427 | return 0; |
426 | out: | ||
427 | return ret; | ||
428 | } | 428 | } |
429 | 429 | ||
430 | #if IS_ENABLED(CONFIG_IPV6) | 430 | #if IS_ENABLED(CONFIG_IPV6) |
@@ -509,6 +509,11 @@ static int addr_resolve(struct sockaddr *src_in, | |||
509 | struct dst_entry *dst; | 509 | struct dst_entry *dst; |
510 | int ret; | 510 | int ret; |
511 | 511 | ||
512 | if (!addr->net) { | ||
513 | pr_warn_ratelimited("%s: missing namespace\n", __func__); | ||
514 | return -EINVAL; | ||
515 | } | ||
516 | |||
512 | if (src_in->sa_family == AF_INET) { | 517 | if (src_in->sa_family == AF_INET) { |
513 | struct rtable *rt = NULL; | 518 | struct rtable *rt = NULL; |
514 | const struct sockaddr_in *dst_in4 = | 519 | const struct sockaddr_in *dst_in4 = |
@@ -522,8 +527,12 @@ static int addr_resolve(struct sockaddr *src_in, | |||
522 | if (resolve_neigh) | 527 | if (resolve_neigh) |
523 | ret = addr_resolve_neigh(&rt->dst, dst_in, addr, seq); | 528 | ret = addr_resolve_neigh(&rt->dst, dst_in, addr, seq); |
524 | 529 | ||
525 | ndev = rt->dst.dev; | 530 | if (addr->bound_dev_if) { |
526 | dev_hold(ndev); | 531 | ndev = dev_get_by_index(addr->net, addr->bound_dev_if); |
532 | } else { | ||
533 | ndev = rt->dst.dev; | ||
534 | dev_hold(ndev); | ||
535 | } | ||
527 | 536 | ||
528 | ip_rt_put(rt); | 537 | ip_rt_put(rt); |
529 | } else { | 538 | } else { |
@@ -539,14 +548,27 @@ static int addr_resolve(struct sockaddr *src_in, | |||
539 | if (resolve_neigh) | 548 | if (resolve_neigh) |
540 | ret = addr_resolve_neigh(dst, dst_in, addr, seq); | 549 | ret = addr_resolve_neigh(dst, dst_in, addr, seq); |
541 | 550 | ||
542 | ndev = dst->dev; | 551 | if (addr->bound_dev_if) { |
543 | dev_hold(ndev); | 552 | ndev = dev_get_by_index(addr->net, addr->bound_dev_if); |
553 | } else { | ||
554 | ndev = dst->dev; | ||
555 | dev_hold(ndev); | ||
556 | } | ||
544 | 557 | ||
545 | dst_release(dst); | 558 | dst_release(dst); |
546 | } | 559 | } |
547 | 560 | ||
548 | addr->bound_dev_if = ndev->ifindex; | 561 | if (ndev->flags & IFF_LOOPBACK) { |
549 | addr->net = dev_net(ndev); | 562 | ret = rdma_translate_ip(dst_in, addr, NULL); |
563 | /* | ||
564 | * Put the loopback device and get the translated | ||
565 | * device instead. | ||
566 | */ | ||
567 | dev_put(ndev); | ||
568 | ndev = dev_get_by_index(addr->net, addr->bound_dev_if); | ||
569 | } else { | ||
570 | addr->bound_dev_if = ndev->ifindex; | ||
571 | } | ||
550 | dev_put(ndev); | 572 | dev_put(ndev); |
551 | 573 | ||
552 | return ret; | 574 | return ret; |
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 31bb82d8ecd7..0eb393237ba2 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -623,22 +623,11 @@ static inline int cma_validate_port(struct ib_device *device, u8 port, | |||
623 | if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port)) | 623 | if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port)) |
624 | return ret; | 624 | return ret; |
625 | 625 | ||
626 | if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port)) { | 626 | if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port)) |
627 | ndev = dev_get_by_index(&init_net, bound_if_index); | 627 | ndev = dev_get_by_index(&init_net, bound_if_index); |
628 | if (ndev && ndev->flags & IFF_LOOPBACK) { | 628 | else |
629 | pr_info("detected loopback device\n"); | ||
630 | dev_put(ndev); | ||
631 | |||
632 | if (!device->get_netdev) | ||
633 | return -EOPNOTSUPP; | ||
634 | |||
635 | ndev = device->get_netdev(device, port); | ||
636 | if (!ndev) | ||
637 | return -ENODEV; | ||
638 | } | ||
639 | } else { | ||
640 | gid_type = IB_GID_TYPE_IB; | 629 | gid_type = IB_GID_TYPE_IB; |
641 | } | 630 | |
642 | 631 | ||
643 | ret = ib_find_cached_gid_by_port(device, gid, gid_type, port, | 632 | ret = ib_find_cached_gid_by_port(device, gid, gid_type, port, |
644 | ndev, NULL); | 633 | ndev, NULL); |
@@ -1044,6 +1033,8 @@ int rdma_init_qp_attr(struct rdma_cm_id *id, struct ib_qp_attr *qp_attr, | |||
1044 | } else | 1033 | } else |
1045 | ret = iw_cm_init_qp_attr(id_priv->cm_id.iw, qp_attr, | 1034 | ret = iw_cm_init_qp_attr(id_priv->cm_id.iw, qp_attr, |
1046 | qp_attr_mask); | 1035 | qp_attr_mask); |
1036 | qp_attr->port_num = id_priv->id.port_num; | ||
1037 | *qp_attr_mask |= IB_QP_PORT; | ||
1047 | } else | 1038 | } else |
1048 | ret = -ENOSYS; | 1039 | ret = -ENOSYS; |
1049 | 1040 | ||
@@ -2569,21 +2560,6 @@ static int cma_resolve_iboe_route(struct rdma_id_private *id_priv) | |||
2569 | goto err2; | 2560 | goto err2; |
2570 | } | 2561 | } |
2571 | 2562 | ||
2572 | if (ndev->flags & IFF_LOOPBACK) { | ||
2573 | dev_put(ndev); | ||
2574 | if (!id_priv->id.device->get_netdev) { | ||
2575 | ret = -EOPNOTSUPP; | ||
2576 | goto err2; | ||
2577 | } | ||
2578 | |||
2579 | ndev = id_priv->id.device->get_netdev(id_priv->id.device, | ||
2580 | id_priv->id.port_num); | ||
2581 | if (!ndev) { | ||
2582 | ret = -ENODEV; | ||
2583 | goto err2; | ||
2584 | } | ||
2585 | } | ||
2586 | |||
2587 | supported_gids = roce_gid_type_mask_support(id_priv->id.device, | 2563 | supported_gids = roce_gid_type_mask_support(id_priv->id.device, |
2588 | id_priv->id.port_num); | 2564 | id_priv->id.port_num); |
2589 | gid_type = cma_route_gid_type(addr->dev_addr.network, | 2565 | gid_type = cma_route_gid_type(addr->dev_addr.network, |
diff --git a/drivers/infiniband/core/roce_gid_mgmt.c b/drivers/infiniband/core/roce_gid_mgmt.c index db958d3207ef..94a9eefb3cfc 100644 --- a/drivers/infiniband/core/roce_gid_mgmt.c +++ b/drivers/infiniband/core/roce_gid_mgmt.c | |||
@@ -42,6 +42,8 @@ | |||
42 | #include <rdma/ib_cache.h> | 42 | #include <rdma/ib_cache.h> |
43 | #include <rdma/ib_addr.h> | 43 | #include <rdma/ib_addr.h> |
44 | 44 | ||
45 | static struct workqueue_struct *gid_cache_wq; | ||
46 | |||
45 | enum gid_op_type { | 47 | enum gid_op_type { |
46 | GID_DEL = 0, | 48 | GID_DEL = 0, |
47 | GID_ADD | 49 | GID_ADD |
@@ -560,7 +562,7 @@ static int netdevice_queue_work(struct netdev_event_work_cmd *cmds, | |||
560 | } | 562 | } |
561 | INIT_WORK(&ndev_work->work, netdevice_event_work_handler); | 563 | INIT_WORK(&ndev_work->work, netdevice_event_work_handler); |
562 | 564 | ||
563 | queue_work(ib_wq, &ndev_work->work); | 565 | queue_work(gid_cache_wq, &ndev_work->work); |
564 | 566 | ||
565 | return NOTIFY_DONE; | 567 | return NOTIFY_DONE; |
566 | } | 568 | } |
@@ -693,7 +695,7 @@ static int addr_event(struct notifier_block *this, unsigned long event, | |||
693 | dev_hold(ndev); | 695 | dev_hold(ndev); |
694 | work->gid_attr.ndev = ndev; | 696 | work->gid_attr.ndev = ndev; |
695 | 697 | ||
696 | queue_work(ib_wq, &work->work); | 698 | queue_work(gid_cache_wq, &work->work); |
697 | 699 | ||
698 | return NOTIFY_DONE; | 700 | return NOTIFY_DONE; |
699 | } | 701 | } |
@@ -740,6 +742,10 @@ static struct notifier_block nb_inet6addr = { | |||
740 | 742 | ||
741 | int __init roce_gid_mgmt_init(void) | 743 | int __init roce_gid_mgmt_init(void) |
742 | { | 744 | { |
745 | gid_cache_wq = alloc_ordered_workqueue("gid-cache-wq", 0); | ||
746 | if (!gid_cache_wq) | ||
747 | return -ENOMEM; | ||
748 | |||
743 | register_inetaddr_notifier(&nb_inetaddr); | 749 | register_inetaddr_notifier(&nb_inetaddr); |
744 | if (IS_ENABLED(CONFIG_IPV6)) | 750 | if (IS_ENABLED(CONFIG_IPV6)) |
745 | register_inet6addr_notifier(&nb_inet6addr); | 751 | register_inet6addr_notifier(&nb_inet6addr); |
@@ -764,4 +770,5 @@ void __exit roce_gid_mgmt_cleanup(void) | |||
764 | * ib-core is removed, all physical devices have been removed, | 770 | * ib-core is removed, all physical devices have been removed, |
765 | * so no issue with remaining hardware contexts. | 771 | * so no issue with remaining hardware contexts. |
766 | */ | 772 | */ |
773 | destroy_workqueue(gid_cache_wq); | ||
767 | } | 774 | } |
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 8ba9bfb073d1..2c98533a0203 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c | |||
@@ -1296,7 +1296,6 @@ ssize_t ib_uverbs_destroy_cq(struct ib_uverbs_file *file, | |||
1296 | struct ib_uobject *uobj; | 1296 | struct ib_uobject *uobj; |
1297 | struct ib_cq *cq; | 1297 | struct ib_cq *cq; |
1298 | struct ib_ucq_object *obj; | 1298 | struct ib_ucq_object *obj; |
1299 | struct ib_uverbs_event_queue *ev_queue; | ||
1300 | int ret = -EINVAL; | 1299 | int ret = -EINVAL; |
1301 | 1300 | ||
1302 | if (copy_from_user(&cmd, buf, sizeof cmd)) | 1301 | if (copy_from_user(&cmd, buf, sizeof cmd)) |
@@ -1313,7 +1312,6 @@ ssize_t ib_uverbs_destroy_cq(struct ib_uverbs_file *file, | |||
1313 | */ | 1312 | */ |
1314 | uverbs_uobject_get(uobj); | 1313 | uverbs_uobject_get(uobj); |
1315 | cq = uobj->object; | 1314 | cq = uobj->object; |
1316 | ev_queue = cq->cq_context; | ||
1317 | obj = container_of(cq->uobject, struct ib_ucq_object, uobject); | 1315 | obj = container_of(cq->uobject, struct ib_ucq_object, uobject); |
1318 | 1316 | ||
1319 | memset(&resp, 0, sizeof(resp)); | 1317 | memset(&resp, 0, sizeof(resp)); |
@@ -1935,7 +1933,8 @@ static int modify_qp(struct ib_uverbs_file *file, | |||
1935 | goto out; | 1933 | goto out; |
1936 | } | 1934 | } |
1937 | 1935 | ||
1938 | if (!rdma_is_port_valid(qp->device, cmd->base.port_num)) { | 1936 | if ((cmd->base.attr_mask & IB_QP_PORT) && |
1937 | !rdma_is_port_valid(qp->device, cmd->base.port_num)) { | ||
1939 | ret = -EINVAL; | 1938 | ret = -EINVAL; |
1940 | goto release_qp; | 1939 | goto release_qp; |
1941 | } | 1940 | } |
@@ -2005,28 +2004,13 @@ static int modify_qp(struct ib_uverbs_file *file, | |||
2005 | rdma_ah_set_port_num(&attr->alt_ah_attr, | 2004 | rdma_ah_set_port_num(&attr->alt_ah_attr, |
2006 | cmd->base.alt_dest.port_num); | 2005 | cmd->base.alt_dest.port_num); |
2007 | 2006 | ||
2008 | if (qp->real_qp == qp) { | 2007 | ret = ib_modify_qp_with_udata(qp, attr, |
2009 | if (cmd->base.attr_mask & IB_QP_AV) { | 2008 | modify_qp_mask(qp->qp_type, |
2010 | ret = ib_resolve_eth_dmac(qp->device, &attr->ah_attr); | 2009 | cmd->base.attr_mask), |
2011 | if (ret) | 2010 | udata); |
2012 | goto release_qp; | ||
2013 | } | ||
2014 | ret = ib_security_modify_qp(qp, | ||
2015 | attr, | ||
2016 | modify_qp_mask(qp->qp_type, | ||
2017 | cmd->base.attr_mask), | ||
2018 | udata); | ||
2019 | } else { | ||
2020 | ret = ib_security_modify_qp(qp, | ||
2021 | attr, | ||
2022 | modify_qp_mask(qp->qp_type, | ||
2023 | cmd->base.attr_mask), | ||
2024 | NULL); | ||
2025 | } | ||
2026 | 2011 | ||
2027 | release_qp: | 2012 | release_qp: |
2028 | uobj_put_obj_read(qp); | 2013 | uobj_put_obj_read(qp); |
2029 | |||
2030 | out: | 2014 | out: |
2031 | kfree(attr); | 2015 | kfree(attr); |
2032 | 2016 | ||
@@ -2103,7 +2087,6 @@ ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file, | |||
2103 | struct ib_uverbs_destroy_qp cmd; | 2087 | struct ib_uverbs_destroy_qp cmd; |
2104 | struct ib_uverbs_destroy_qp_resp resp; | 2088 | struct ib_uverbs_destroy_qp_resp resp; |
2105 | struct ib_uobject *uobj; | 2089 | struct ib_uobject *uobj; |
2106 | struct ib_qp *qp; | ||
2107 | struct ib_uqp_object *obj; | 2090 | struct ib_uqp_object *obj; |
2108 | int ret = -EINVAL; | 2091 | int ret = -EINVAL; |
2109 | 2092 | ||
@@ -2117,7 +2100,6 @@ ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file, | |||
2117 | if (IS_ERR(uobj)) | 2100 | if (IS_ERR(uobj)) |
2118 | return PTR_ERR(uobj); | 2101 | return PTR_ERR(uobj); |
2119 | 2102 | ||
2120 | qp = uobj->object; | ||
2121 | obj = container_of(uobj, struct ib_uqp_object, uevent.uobject); | 2103 | obj = container_of(uobj, struct ib_uqp_object, uevent.uobject); |
2122 | /* | 2104 | /* |
2123 | * Make sure we don't free the memory in remove_commit as we still | 2105 | * Make sure we don't free the memory in remove_commit as we still |
@@ -3019,7 +3001,6 @@ int ib_uverbs_ex_destroy_wq(struct ib_uverbs_file *file, | |||
3019 | { | 3001 | { |
3020 | struct ib_uverbs_ex_destroy_wq cmd = {}; | 3002 | struct ib_uverbs_ex_destroy_wq cmd = {}; |
3021 | struct ib_uverbs_ex_destroy_wq_resp resp = {}; | 3003 | struct ib_uverbs_ex_destroy_wq_resp resp = {}; |
3022 | struct ib_wq *wq; | ||
3023 | struct ib_uobject *uobj; | 3004 | struct ib_uobject *uobj; |
3024 | struct ib_uwq_object *obj; | 3005 | struct ib_uwq_object *obj; |
3025 | size_t required_cmd_sz; | 3006 | size_t required_cmd_sz; |
@@ -3053,7 +3034,6 @@ int ib_uverbs_ex_destroy_wq(struct ib_uverbs_file *file, | |||
3053 | if (IS_ERR(uobj)) | 3034 | if (IS_ERR(uobj)) |
3054 | return PTR_ERR(uobj); | 3035 | return PTR_ERR(uobj); |
3055 | 3036 | ||
3056 | wq = uobj->object; | ||
3057 | obj = container_of(uobj, struct ib_uwq_object, uevent.uobject); | 3037 | obj = container_of(uobj, struct ib_uwq_object, uevent.uobject); |
3058 | /* | 3038 | /* |
3059 | * Make sure we don't free the memory in remove_commit as we still | 3039 | * Make sure we don't free the memory in remove_commit as we still |
@@ -3743,10 +3723,8 @@ ssize_t ib_uverbs_destroy_srq(struct ib_uverbs_file *file, | |||
3743 | struct ib_uverbs_destroy_srq cmd; | 3723 | struct ib_uverbs_destroy_srq cmd; |
3744 | struct ib_uverbs_destroy_srq_resp resp; | 3724 | struct ib_uverbs_destroy_srq_resp resp; |
3745 | struct ib_uobject *uobj; | 3725 | struct ib_uobject *uobj; |
3746 | struct ib_srq *srq; | ||
3747 | struct ib_uevent_object *obj; | 3726 | struct ib_uevent_object *obj; |
3748 | int ret = -EINVAL; | 3727 | int ret = -EINVAL; |
3749 | enum ib_srq_type srq_type; | ||
3750 | 3728 | ||
3751 | if (copy_from_user(&cmd, buf, sizeof cmd)) | 3729 | if (copy_from_user(&cmd, buf, sizeof cmd)) |
3752 | return -EFAULT; | 3730 | return -EFAULT; |
@@ -3756,9 +3734,7 @@ ssize_t ib_uverbs_destroy_srq(struct ib_uverbs_file *file, | |||
3756 | if (IS_ERR(uobj)) | 3734 | if (IS_ERR(uobj)) |
3757 | return PTR_ERR(uobj); | 3735 | return PTR_ERR(uobj); |
3758 | 3736 | ||
3759 | srq = uobj->object; | ||
3760 | obj = container_of(uobj, struct ib_uevent_object, uobject); | 3737 | obj = container_of(uobj, struct ib_uevent_object, uobject); |
3761 | srq_type = srq->srq_type; | ||
3762 | /* | 3738 | /* |
3763 | * Make sure we don't free the memory in remove_commit as we still | 3739 | * Make sure we don't free the memory in remove_commit as we still |
3764 | * needs the uobject memory to create the response. | 3740 | * needs the uobject memory to create the response. |
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index c973a83c898b..fb98ed67d5bc 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c | |||
@@ -452,6 +452,19 @@ int ib_get_gids_from_rdma_hdr(const union rdma_network_hdr *hdr, | |||
452 | } | 452 | } |
453 | EXPORT_SYMBOL(ib_get_gids_from_rdma_hdr); | 453 | EXPORT_SYMBOL(ib_get_gids_from_rdma_hdr); |
454 | 454 | ||
455 | /* | ||
456 | * This function creates ah from the incoming packet. | ||
457 | * Incoming packet has dgid of the receiver node on which this code is | ||
458 | * getting executed and, sgid contains the GID of the sender. | ||
459 | * | ||
460 | * When resolving mac address of destination, the arrived dgid is used | ||
461 | * as sgid and, sgid is used as dgid because sgid contains destinations | ||
462 | * GID whom to respond to. | ||
463 | * | ||
464 | * This is why when calling rdma_addr_find_l2_eth_by_grh() function, the | ||
465 | * position of arguments dgid and sgid do not match the order of the | ||
466 | * parameters. | ||
467 | */ | ||
455 | int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, | 468 | int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, |
456 | const struct ib_wc *wc, const struct ib_grh *grh, | 469 | const struct ib_wc *wc, const struct ib_grh *grh, |
457 | struct rdma_ah_attr *ah_attr) | 470 | struct rdma_ah_attr *ah_attr) |
@@ -507,11 +520,6 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, | |||
507 | } | 520 | } |
508 | 521 | ||
509 | resolved_dev = dev_get_by_index(&init_net, if_index); | 522 | resolved_dev = dev_get_by_index(&init_net, if_index); |
510 | if (resolved_dev->flags & IFF_LOOPBACK) { | ||
511 | dev_put(resolved_dev); | ||
512 | resolved_dev = idev; | ||
513 | dev_hold(resolved_dev); | ||
514 | } | ||
515 | rcu_read_lock(); | 523 | rcu_read_lock(); |
516 | if (resolved_dev != idev && !rdma_is_upper_dev_rcu(idev, | 524 | if (resolved_dev != idev && !rdma_is_upper_dev_rcu(idev, |
517 | resolved_dev)) | 525 | resolved_dev)) |
@@ -887,6 +895,7 @@ static const struct { | |||
887 | } qp_state_table[IB_QPS_ERR + 1][IB_QPS_ERR + 1] = { | 895 | } qp_state_table[IB_QPS_ERR + 1][IB_QPS_ERR + 1] = { |
888 | [IB_QPS_RESET] = { | 896 | [IB_QPS_RESET] = { |
889 | [IB_QPS_RESET] = { .valid = 1 }, | 897 | [IB_QPS_RESET] = { .valid = 1 }, |
898 | [IB_QPS_ERR] = { .valid = 1 }, | ||
890 | [IB_QPS_INIT] = { | 899 | [IB_QPS_INIT] = { |
891 | .valid = 1, | 900 | .valid = 1, |
892 | .req_param = { | 901 | .req_param = { |
@@ -1268,20 +1277,36 @@ out: | |||
1268 | } | 1277 | } |
1269 | EXPORT_SYMBOL(ib_resolve_eth_dmac); | 1278 | EXPORT_SYMBOL(ib_resolve_eth_dmac); |
1270 | 1279 | ||
1271 | int ib_modify_qp(struct ib_qp *qp, | 1280 | /** |
1272 | struct ib_qp_attr *qp_attr, | 1281 | * ib_modify_qp_with_udata - Modifies the attributes for the specified QP. |
1273 | int qp_attr_mask) | 1282 | * @qp: The QP to modify. |
1283 | * @attr: On input, specifies the QP attributes to modify. On output, | ||
1284 | * the current values of selected QP attributes are returned. | ||
1285 | * @attr_mask: A bit-mask used to specify which attributes of the QP | ||
1286 | * are being modified. | ||
1287 | * @udata: pointer to user's input output buffer information | ||
1288 | * are being modified. | ||
1289 | * It returns 0 on success and returns appropriate error code on error. | ||
1290 | */ | ||
1291 | int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr, | ||
1292 | int attr_mask, struct ib_udata *udata) | ||
1274 | { | 1293 | { |
1294 | int ret; | ||
1275 | 1295 | ||
1276 | if (qp_attr_mask & IB_QP_AV) { | 1296 | if (attr_mask & IB_QP_AV) { |
1277 | int ret; | 1297 | ret = ib_resolve_eth_dmac(qp->device, &attr->ah_attr); |
1278 | |||
1279 | ret = ib_resolve_eth_dmac(qp->device, &qp_attr->ah_attr); | ||
1280 | if (ret) | 1298 | if (ret) |
1281 | return ret; | 1299 | return ret; |
1282 | } | 1300 | } |
1301 | return ib_security_modify_qp(qp, attr, attr_mask, udata); | ||
1302 | } | ||
1303 | EXPORT_SYMBOL(ib_modify_qp_with_udata); | ||
1283 | 1304 | ||
1284 | return ib_security_modify_qp(qp->real_qp, qp_attr, qp_attr_mask, NULL); | 1305 | int ib_modify_qp(struct ib_qp *qp, |
1306 | struct ib_qp_attr *qp_attr, | ||
1307 | int qp_attr_mask) | ||
1308 | { | ||
1309 | return ib_modify_qp_with_udata(qp, qp_attr, qp_attr_mask, NULL); | ||
1285 | } | 1310 | } |
1286 | EXPORT_SYMBOL(ib_modify_qp); | 1311 | EXPORT_SYMBOL(ib_modify_qp); |
1287 | 1312 | ||
diff --git a/drivers/infiniband/hw/bnxt_re/bnxt_re.h b/drivers/infiniband/hw/bnxt_re/bnxt_re.h index 08772836fded..85527532c49d 100644 --- a/drivers/infiniband/hw/bnxt_re/bnxt_re.h +++ b/drivers/infiniband/hw/bnxt_re/bnxt_re.h | |||
@@ -51,6 +51,8 @@ | |||
51 | #define BNXT_RE_PAGE_SIZE_8M BIT(23) | 51 | #define BNXT_RE_PAGE_SIZE_8M BIT(23) |
52 | #define BNXT_RE_PAGE_SIZE_1G BIT(30) | 52 | #define BNXT_RE_PAGE_SIZE_1G BIT(30) |
53 | 53 | ||
54 | #define BNXT_RE_MAX_MR_SIZE BIT(30) | ||
55 | |||
54 | #define BNXT_RE_MAX_QPC_COUNT (64 * 1024) | 56 | #define BNXT_RE_MAX_QPC_COUNT (64 * 1024) |
55 | #define BNXT_RE_MAX_MRW_COUNT (64 * 1024) | 57 | #define BNXT_RE_MAX_MRW_COUNT (64 * 1024) |
56 | #define BNXT_RE_MAX_SRQC_COUNT (64 * 1024) | 58 | #define BNXT_RE_MAX_SRQC_COUNT (64 * 1024) |
@@ -60,6 +62,13 @@ | |||
60 | 62 | ||
61 | #define BNXT_RE_RQ_WQE_THRESHOLD 32 | 63 | #define BNXT_RE_RQ_WQE_THRESHOLD 32 |
62 | 64 | ||
65 | /* | ||
66 | * Setting the default ack delay value to 16, which means | ||
67 | * the default timeout is approx. 260ms(4 usec * 2 ^(timeout)) | ||
68 | */ | ||
69 | |||
70 | #define BNXT_RE_DEFAULT_ACK_DELAY 16 | ||
71 | |||
63 | struct bnxt_re_work { | 72 | struct bnxt_re_work { |
64 | struct work_struct work; | 73 | struct work_struct work; |
65 | unsigned long event; | 74 | unsigned long event; |
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index c7bd68311d0c..f0e01b3ac711 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c | |||
@@ -145,10 +145,8 @@ int bnxt_re_query_device(struct ib_device *ibdev, | |||
145 | ib_attr->fw_ver = (u64)(unsigned long)(dev_attr->fw_ver); | 145 | ib_attr->fw_ver = (u64)(unsigned long)(dev_attr->fw_ver); |
146 | bnxt_qplib_get_guid(rdev->netdev->dev_addr, | 146 | bnxt_qplib_get_guid(rdev->netdev->dev_addr, |
147 | (u8 *)&ib_attr->sys_image_guid); | 147 | (u8 *)&ib_attr->sys_image_guid); |
148 | ib_attr->max_mr_size = ~0ull; | 148 | ib_attr->max_mr_size = BNXT_RE_MAX_MR_SIZE; |
149 | ib_attr->page_size_cap = BNXT_RE_PAGE_SIZE_4K | BNXT_RE_PAGE_SIZE_8K | | 149 | ib_attr->page_size_cap = BNXT_RE_PAGE_SIZE_4K; |
150 | BNXT_RE_PAGE_SIZE_64K | BNXT_RE_PAGE_SIZE_2M | | ||
151 | BNXT_RE_PAGE_SIZE_8M | BNXT_RE_PAGE_SIZE_1G; | ||
152 | 150 | ||
153 | ib_attr->vendor_id = rdev->en_dev->pdev->vendor; | 151 | ib_attr->vendor_id = rdev->en_dev->pdev->vendor; |
154 | ib_attr->vendor_part_id = rdev->en_dev->pdev->device; | 152 | ib_attr->vendor_part_id = rdev->en_dev->pdev->device; |
@@ -174,9 +172,11 @@ int bnxt_re_query_device(struct ib_device *ibdev, | |||
174 | ib_attr->max_mr = dev_attr->max_mr; | 172 | ib_attr->max_mr = dev_attr->max_mr; |
175 | ib_attr->max_pd = dev_attr->max_pd; | 173 | ib_attr->max_pd = dev_attr->max_pd; |
176 | ib_attr->max_qp_rd_atom = dev_attr->max_qp_rd_atom; | 174 | ib_attr->max_qp_rd_atom = dev_attr->max_qp_rd_atom; |
177 | ib_attr->max_qp_init_rd_atom = dev_attr->max_qp_rd_atom; | 175 | ib_attr->max_qp_init_rd_atom = dev_attr->max_qp_init_rd_atom; |
178 | ib_attr->atomic_cap = IB_ATOMIC_HCA; | 176 | if (dev_attr->is_atomic) { |
179 | ib_attr->masked_atomic_cap = IB_ATOMIC_HCA; | 177 | ib_attr->atomic_cap = IB_ATOMIC_HCA; |
178 | ib_attr->masked_atomic_cap = IB_ATOMIC_HCA; | ||
179 | } | ||
180 | 180 | ||
181 | ib_attr->max_ee_rd_atom = 0; | 181 | ib_attr->max_ee_rd_atom = 0; |
182 | ib_attr->max_res_rd_atom = 0; | 182 | ib_attr->max_res_rd_atom = 0; |
@@ -201,7 +201,7 @@ int bnxt_re_query_device(struct ib_device *ibdev, | |||
201 | ib_attr->max_fast_reg_page_list_len = MAX_PBL_LVL_1_PGS; | 201 | ib_attr->max_fast_reg_page_list_len = MAX_PBL_LVL_1_PGS; |
202 | 202 | ||
203 | ib_attr->max_pkeys = 1; | 203 | ib_attr->max_pkeys = 1; |
204 | ib_attr->local_ca_ack_delay = 0; | 204 | ib_attr->local_ca_ack_delay = BNXT_RE_DEFAULT_ACK_DELAY; |
205 | return 0; | 205 | return 0; |
206 | } | 206 | } |
207 | 207 | ||
@@ -390,15 +390,17 @@ int bnxt_re_del_gid(struct ib_device *ibdev, u8 port_num, | |||
390 | return -EINVAL; | 390 | return -EINVAL; |
391 | ctx->refcnt--; | 391 | ctx->refcnt--; |
392 | if (!ctx->refcnt) { | 392 | if (!ctx->refcnt) { |
393 | rc = bnxt_qplib_del_sgid | 393 | rc = bnxt_qplib_del_sgid(sgid_tbl, |
394 | (sgid_tbl, | 394 | &sgid_tbl->tbl[ctx->idx], |
395 | &sgid_tbl->tbl[ctx->idx], true); | 395 | true); |
396 | if (rc) | 396 | if (rc) { |
397 | dev_err(rdev_to_dev(rdev), | 397 | dev_err(rdev_to_dev(rdev), |
398 | "Failed to remove GID: %#x", rc); | 398 | "Failed to remove GID: %#x", rc); |
399 | ctx_tbl = sgid_tbl->ctx; | 399 | } else { |
400 | ctx_tbl[ctx->idx] = NULL; | 400 | ctx_tbl = sgid_tbl->ctx; |
401 | kfree(ctx); | 401 | ctx_tbl[ctx->idx] = NULL; |
402 | kfree(ctx); | ||
403 | } | ||
402 | } | 404 | } |
403 | } else { | 405 | } else { |
404 | return -EINVAL; | 406 | return -EINVAL; |
@@ -588,10 +590,10 @@ static int bnxt_re_create_fence_mr(struct bnxt_re_pd *pd) | |||
588 | 590 | ||
589 | /* Create a fence MW only for kernel consumers */ | 591 | /* Create a fence MW only for kernel consumers */ |
590 | mw = bnxt_re_alloc_mw(&pd->ib_pd, IB_MW_TYPE_1, NULL); | 592 | mw = bnxt_re_alloc_mw(&pd->ib_pd, IB_MW_TYPE_1, NULL); |
591 | if (!mw) { | 593 | if (IS_ERR(mw)) { |
592 | dev_err(rdev_to_dev(rdev), | 594 | dev_err(rdev_to_dev(rdev), |
593 | "Failed to create fence-MW for PD: %p\n", pd); | 595 | "Failed to create fence-MW for PD: %p\n", pd); |
594 | rc = -EINVAL; | 596 | rc = PTR_ERR(mw); |
595 | goto fail; | 597 | goto fail; |
596 | } | 598 | } |
597 | fence->mw = mw; | 599 | fence->mw = mw; |
@@ -612,30 +614,13 @@ int bnxt_re_dealloc_pd(struct ib_pd *ib_pd) | |||
612 | int rc; | 614 | int rc; |
613 | 615 | ||
614 | bnxt_re_destroy_fence_mr(pd); | 616 | bnxt_re_destroy_fence_mr(pd); |
615 | if (ib_pd->uobject && pd->dpi.dbr) { | ||
616 | struct ib_ucontext *ib_uctx = ib_pd->uobject->context; | ||
617 | struct bnxt_re_ucontext *ucntx; | ||
618 | 617 | ||
619 | /* Free DPI only if this is the first PD allocated by the | 618 | if (pd->qplib_pd.id) { |
620 | * application and mark the context dpi as NULL | 619 | rc = bnxt_qplib_dealloc_pd(&rdev->qplib_res, |
621 | */ | 620 | &rdev->qplib_res.pd_tbl, |
622 | ucntx = container_of(ib_uctx, struct bnxt_re_ucontext, ib_uctx); | 621 | &pd->qplib_pd); |
623 | |||
624 | rc = bnxt_qplib_dealloc_dpi(&rdev->qplib_res, | ||
625 | &rdev->qplib_res.dpi_tbl, | ||
626 | &pd->dpi); | ||
627 | if (rc) | 622 | if (rc) |
628 | dev_err(rdev_to_dev(rdev), "Failed to deallocate HW DPI"); | 623 | dev_err(rdev_to_dev(rdev), "Failed to deallocate HW PD"); |
629 | /* Don't fail, continue*/ | ||
630 | ucntx->dpi = NULL; | ||
631 | } | ||
632 | |||
633 | rc = bnxt_qplib_dealloc_pd(&rdev->qplib_res, | ||
634 | &rdev->qplib_res.pd_tbl, | ||
635 | &pd->qplib_pd); | ||
636 | if (rc) { | ||
637 | dev_err(rdev_to_dev(rdev), "Failed to deallocate HW PD"); | ||
638 | return rc; | ||
639 | } | 624 | } |
640 | 625 | ||
641 | kfree(pd); | 626 | kfree(pd); |
@@ -667,23 +652,22 @@ struct ib_pd *bnxt_re_alloc_pd(struct ib_device *ibdev, | |||
667 | if (udata) { | 652 | if (udata) { |
668 | struct bnxt_re_pd_resp resp; | 653 | struct bnxt_re_pd_resp resp; |
669 | 654 | ||
670 | if (!ucntx->dpi) { | 655 | if (!ucntx->dpi.dbr) { |
671 | /* Allocate DPI in alloc_pd to avoid failing of | 656 | /* Allocate DPI in alloc_pd to avoid failing of |
672 | * ibv_devinfo and family of application when DPIs | 657 | * ibv_devinfo and family of application when DPIs |
673 | * are depleted. | 658 | * are depleted. |
674 | */ | 659 | */ |
675 | if (bnxt_qplib_alloc_dpi(&rdev->qplib_res.dpi_tbl, | 660 | if (bnxt_qplib_alloc_dpi(&rdev->qplib_res.dpi_tbl, |
676 | &pd->dpi, ucntx)) { | 661 | &ucntx->dpi, ucntx)) { |
677 | rc = -ENOMEM; | 662 | rc = -ENOMEM; |
678 | goto dbfail; | 663 | goto dbfail; |
679 | } | 664 | } |
680 | ucntx->dpi = &pd->dpi; | ||
681 | } | 665 | } |
682 | 666 | ||
683 | resp.pdid = pd->qplib_pd.id; | 667 | resp.pdid = pd->qplib_pd.id; |
684 | /* Still allow mapping this DBR to the new user PD. */ | 668 | /* Still allow mapping this DBR to the new user PD. */ |
685 | resp.dpi = ucntx->dpi->dpi; | 669 | resp.dpi = ucntx->dpi.dpi; |
686 | resp.dbr = (u64)ucntx->dpi->umdbr; | 670 | resp.dbr = (u64)ucntx->dpi.umdbr; |
687 | 671 | ||
688 | rc = ib_copy_to_udata(udata, &resp, sizeof(resp)); | 672 | rc = ib_copy_to_udata(udata, &resp, sizeof(resp)); |
689 | if (rc) { | 673 | if (rc) { |
@@ -960,7 +944,7 @@ static int bnxt_re_init_user_qp(struct bnxt_re_dev *rdev, struct bnxt_re_pd *pd, | |||
960 | qplib_qp->rq.nmap = umem->nmap; | 944 | qplib_qp->rq.nmap = umem->nmap; |
961 | } | 945 | } |
962 | 946 | ||
963 | qplib_qp->dpi = cntx->dpi; | 947 | qplib_qp->dpi = &cntx->dpi; |
964 | return 0; | 948 | return 0; |
965 | rqfail: | 949 | rqfail: |
966 | ib_umem_release(qp->sumem); | 950 | ib_umem_release(qp->sumem); |
@@ -1530,13 +1514,24 @@ int bnxt_re_modify_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr, | |||
1530 | if (qp_attr_mask & IB_QP_MAX_QP_RD_ATOMIC) { | 1514 | if (qp_attr_mask & IB_QP_MAX_QP_RD_ATOMIC) { |
1531 | qp->qplib_qp.modify_flags |= | 1515 | qp->qplib_qp.modify_flags |= |
1532 | CMDQ_MODIFY_QP_MODIFY_MASK_MAX_RD_ATOMIC; | 1516 | CMDQ_MODIFY_QP_MODIFY_MASK_MAX_RD_ATOMIC; |
1533 | qp->qplib_qp.max_rd_atomic = qp_attr->max_rd_atomic; | 1517 | /* Cap the max_rd_atomic to device max */ |
1518 | qp->qplib_qp.max_rd_atomic = min_t(u32, qp_attr->max_rd_atomic, | ||
1519 | dev_attr->max_qp_rd_atom); | ||
1534 | } | 1520 | } |
1535 | if (qp_attr_mask & IB_QP_SQ_PSN) { | 1521 | if (qp_attr_mask & IB_QP_SQ_PSN) { |
1536 | qp->qplib_qp.modify_flags |= CMDQ_MODIFY_QP_MODIFY_MASK_SQ_PSN; | 1522 | qp->qplib_qp.modify_flags |= CMDQ_MODIFY_QP_MODIFY_MASK_SQ_PSN; |
1537 | qp->qplib_qp.sq.psn = qp_attr->sq_psn; | 1523 | qp->qplib_qp.sq.psn = qp_attr->sq_psn; |
1538 | } | 1524 | } |
1539 | if (qp_attr_mask & IB_QP_MAX_DEST_RD_ATOMIC) { | 1525 | if (qp_attr_mask & IB_QP_MAX_DEST_RD_ATOMIC) { |
1526 | if (qp_attr->max_dest_rd_atomic > | ||
1527 | dev_attr->max_qp_init_rd_atom) { | ||
1528 | dev_err(rdev_to_dev(rdev), | ||
1529 | "max_dest_rd_atomic requested%d is > dev_max%d", | ||
1530 | qp_attr->max_dest_rd_atomic, | ||
1531 | dev_attr->max_qp_init_rd_atom); | ||
1532 | return -EINVAL; | ||
1533 | } | ||
1534 | |||
1540 | qp->qplib_qp.modify_flags |= | 1535 | qp->qplib_qp.modify_flags |= |
1541 | CMDQ_MODIFY_QP_MODIFY_MASK_MAX_DEST_RD_ATOMIC; | 1536 | CMDQ_MODIFY_QP_MODIFY_MASK_MAX_DEST_RD_ATOMIC; |
1542 | qp->qplib_qp.max_dest_rd_atomic = qp_attr->max_dest_rd_atomic; | 1537 | qp->qplib_qp.max_dest_rd_atomic = qp_attr->max_dest_rd_atomic; |
@@ -2403,7 +2398,7 @@ struct ib_cq *bnxt_re_create_cq(struct ib_device *ibdev, | |||
2403 | } | 2398 | } |
2404 | cq->qplib_cq.sghead = cq->umem->sg_head.sgl; | 2399 | cq->qplib_cq.sghead = cq->umem->sg_head.sgl; |
2405 | cq->qplib_cq.nmap = cq->umem->nmap; | 2400 | cq->qplib_cq.nmap = cq->umem->nmap; |
2406 | cq->qplib_cq.dpi = uctx->dpi; | 2401 | cq->qplib_cq.dpi = &uctx->dpi; |
2407 | } else { | 2402 | } else { |
2408 | cq->max_cql = min_t(u32, entries, MAX_CQL_PER_POLL); | 2403 | cq->max_cql = min_t(u32, entries, MAX_CQL_PER_POLL); |
2409 | cq->cql = kcalloc(cq->max_cql, sizeof(struct bnxt_qplib_cqe), | 2404 | cq->cql = kcalloc(cq->max_cql, sizeof(struct bnxt_qplib_cqe), |
@@ -2905,6 +2900,7 @@ int bnxt_re_poll_cq(struct ib_cq *ib_cq, int num_entries, struct ib_wc *wc) | |||
2905 | 2900 | ||
2906 | spin_lock_irqsave(&cq->cq_lock, flags); | 2901 | spin_lock_irqsave(&cq->cq_lock, flags); |
2907 | budget = min_t(u32, num_entries, cq->max_cql); | 2902 | budget = min_t(u32, num_entries, cq->max_cql); |
2903 | num_entries = budget; | ||
2908 | if (!cq->cql) { | 2904 | if (!cq->cql) { |
2909 | dev_err(rdev_to_dev(cq->rdev), "POLL CQ : no CQL to use"); | 2905 | dev_err(rdev_to_dev(cq->rdev), "POLL CQ : no CQL to use"); |
2910 | goto exit; | 2906 | goto exit; |
@@ -3031,6 +3027,11 @@ int bnxt_re_req_notify_cq(struct ib_cq *ib_cq, | |||
3031 | else if (ib_cqn_flags & IB_CQ_SOLICITED) | 3027 | else if (ib_cqn_flags & IB_CQ_SOLICITED) |
3032 | type = DBR_DBR_TYPE_CQ_ARMSE; | 3028 | type = DBR_DBR_TYPE_CQ_ARMSE; |
3033 | 3029 | ||
3030 | /* Poll to see if there are missed events */ | ||
3031 | if ((ib_cqn_flags & IB_CQ_REPORT_MISSED_EVENTS) && | ||
3032 | !(bnxt_qplib_is_cq_empty(&cq->qplib_cq))) | ||
3033 | return 1; | ||
3034 | |||
3034 | bnxt_qplib_req_notify_cq(&cq->qplib_cq, type); | 3035 | bnxt_qplib_req_notify_cq(&cq->qplib_cq, type); |
3035 | 3036 | ||
3036 | return 0; | 3037 | return 0; |
@@ -3245,6 +3246,12 @@ struct ib_mr *bnxt_re_reg_user_mr(struct ib_pd *ib_pd, u64 start, u64 length, | |||
3245 | struct scatterlist *sg; | 3246 | struct scatterlist *sg; |
3246 | int entry; | 3247 | int entry; |
3247 | 3248 | ||
3249 | if (length > BNXT_RE_MAX_MR_SIZE) { | ||
3250 | dev_err(rdev_to_dev(rdev), "MR Size: %lld > Max supported:%ld\n", | ||
3251 | length, BNXT_RE_MAX_MR_SIZE); | ||
3252 | return ERR_PTR(-ENOMEM); | ||
3253 | } | ||
3254 | |||
3248 | mr = kzalloc(sizeof(*mr), GFP_KERNEL); | 3255 | mr = kzalloc(sizeof(*mr), GFP_KERNEL); |
3249 | if (!mr) | 3256 | if (!mr) |
3250 | return ERR_PTR(-ENOMEM); | 3257 | return ERR_PTR(-ENOMEM); |
@@ -3388,8 +3395,26 @@ int bnxt_re_dealloc_ucontext(struct ib_ucontext *ib_uctx) | |||
3388 | struct bnxt_re_ucontext *uctx = container_of(ib_uctx, | 3395 | struct bnxt_re_ucontext *uctx = container_of(ib_uctx, |
3389 | struct bnxt_re_ucontext, | 3396 | struct bnxt_re_ucontext, |
3390 | ib_uctx); | 3397 | ib_uctx); |
3398 | |||
3399 | struct bnxt_re_dev *rdev = uctx->rdev; | ||
3400 | int rc = 0; | ||
3401 | |||
3391 | if (uctx->shpg) | 3402 | if (uctx->shpg) |
3392 | free_page((unsigned long)uctx->shpg); | 3403 | free_page((unsigned long)uctx->shpg); |
3404 | |||
3405 | if (uctx->dpi.dbr) { | ||
3406 | /* Free DPI only if this is the first PD allocated by the | ||
3407 | * application and mark the context dpi as NULL | ||
3408 | */ | ||
3409 | rc = bnxt_qplib_dealloc_dpi(&rdev->qplib_res, | ||
3410 | &rdev->qplib_res.dpi_tbl, | ||
3411 | &uctx->dpi); | ||
3412 | if (rc) | ||
3413 | dev_err(rdev_to_dev(rdev), "Deallocte HW DPI failed!"); | ||
3414 | /* Don't fail, continue*/ | ||
3415 | uctx->dpi.dbr = NULL; | ||
3416 | } | ||
3417 | |||
3393 | kfree(uctx); | 3418 | kfree(uctx); |
3394 | return 0; | 3419 | return 0; |
3395 | } | 3420 | } |
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.h b/drivers/infiniband/hw/bnxt_re/ib_verbs.h index 6c160f6a5398..a0bb7e33d7ca 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.h +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.h | |||
@@ -59,7 +59,6 @@ struct bnxt_re_pd { | |||
59 | struct bnxt_re_dev *rdev; | 59 | struct bnxt_re_dev *rdev; |
60 | struct ib_pd ib_pd; | 60 | struct ib_pd ib_pd; |
61 | struct bnxt_qplib_pd qplib_pd; | 61 | struct bnxt_qplib_pd qplib_pd; |
62 | struct bnxt_qplib_dpi dpi; | ||
63 | struct bnxt_re_fence_data fence; | 62 | struct bnxt_re_fence_data fence; |
64 | }; | 63 | }; |
65 | 64 | ||
@@ -127,7 +126,7 @@ struct bnxt_re_mw { | |||
127 | struct bnxt_re_ucontext { | 126 | struct bnxt_re_ucontext { |
128 | struct bnxt_re_dev *rdev; | 127 | struct bnxt_re_dev *rdev; |
129 | struct ib_ucontext ib_uctx; | 128 | struct ib_ucontext ib_uctx; |
130 | struct bnxt_qplib_dpi *dpi; | 129 | struct bnxt_qplib_dpi dpi; |
131 | void *shpg; | 130 | void *shpg; |
132 | spinlock_t sh_lock; /* protect shpg */ | 131 | spinlock_t sh_lock; /* protect shpg */ |
133 | }; | 132 | }; |
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 1fce5e73216b..ceae2d92fb08 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c | |||
@@ -333,6 +333,7 @@ static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev, | |||
333 | bnxt_re_init_hwrm_hdr(rdev, (void *)&req, HWRM_STAT_CTX_ALLOC, -1, -1); | 333 | bnxt_re_init_hwrm_hdr(rdev, (void *)&req, HWRM_STAT_CTX_ALLOC, -1, -1); |
334 | req.update_period_ms = cpu_to_le32(1000); | 334 | req.update_period_ms = cpu_to_le32(1000); |
335 | req.stats_dma_addr = cpu_to_le64(dma_map); | 335 | req.stats_dma_addr = cpu_to_le64(dma_map); |
336 | req.stat_ctx_flags = STAT_CTX_ALLOC_REQ_STAT_CTX_FLAGS_ROCE; | ||
336 | bnxt_re_fill_fw_msg(&fw_msg, (void *)&req, sizeof(req), (void *)&resp, | 337 | bnxt_re_fill_fw_msg(&fw_msg, (void *)&req, sizeof(req), (void *)&resp, |
337 | sizeof(resp), DFLT_HWRM_CMD_TIMEOUT); | 338 | sizeof(resp), DFLT_HWRM_CMD_TIMEOUT); |
338 | rc = en_dev->en_ops->bnxt_send_fw_msg(en_dev, BNXT_ROCE_ULP, &fw_msg); | 339 | rc = en_dev->en_ops->bnxt_send_fw_msg(en_dev, BNXT_ROCE_ULP, &fw_msg); |
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index f05500bcdcf1..9af1514e5944 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c | |||
@@ -1128,6 +1128,11 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, | |||
1128 | } | 1128 | } |
1129 | /* Each SGE entry = 1 WQE size16 */ | 1129 | /* Each SGE entry = 1 WQE size16 */ |
1130 | wqe_size16 = wqe->num_sge; | 1130 | wqe_size16 = wqe->num_sge; |
1131 | /* HW requires wqe size has room for atleast one SGE even if | ||
1132 | * none was supplied by ULP | ||
1133 | */ | ||
1134 | if (!wqe->num_sge) | ||
1135 | wqe_size16++; | ||
1131 | } | 1136 | } |
1132 | 1137 | ||
1133 | /* Specifics */ | 1138 | /* Specifics */ |
@@ -1364,6 +1369,11 @@ int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp, | |||
1364 | rqe->flags = wqe->flags; | 1369 | rqe->flags = wqe->flags; |
1365 | rqe->wqe_size = wqe->num_sge + | 1370 | rqe->wqe_size = wqe->num_sge + |
1366 | ((offsetof(typeof(*rqe), data) + 15) >> 4); | 1371 | ((offsetof(typeof(*rqe), data) + 15) >> 4); |
1372 | /* HW requires wqe size has room for atleast one SGE even if none | ||
1373 | * was supplied by ULP | ||
1374 | */ | ||
1375 | if (!wqe->num_sge) | ||
1376 | rqe->wqe_size++; | ||
1367 | 1377 | ||
1368 | /* Supply the rqe->wr_id index to the wr_id_tbl for now */ | 1378 | /* Supply the rqe->wr_id index to the wr_id_tbl for now */ |
1369 | rqe->wr_id[0] = cpu_to_le32(sw_prod); | 1379 | rqe->wr_id[0] = cpu_to_le32(sw_prod); |
@@ -1885,6 +1895,25 @@ flush_rq: | |||
1885 | return rc; | 1895 | return rc; |
1886 | } | 1896 | } |
1887 | 1897 | ||
1898 | bool bnxt_qplib_is_cq_empty(struct bnxt_qplib_cq *cq) | ||
1899 | { | ||
1900 | struct cq_base *hw_cqe, **hw_cqe_ptr; | ||
1901 | unsigned long flags; | ||
1902 | u32 sw_cons, raw_cons; | ||
1903 | bool rc = true; | ||
1904 | |||
1905 | spin_lock_irqsave(&cq->hwq.lock, flags); | ||
1906 | raw_cons = cq->hwq.cons; | ||
1907 | sw_cons = HWQ_CMP(raw_cons, &cq->hwq); | ||
1908 | hw_cqe_ptr = (struct cq_base **)cq->hwq.pbl_ptr; | ||
1909 | hw_cqe = &hw_cqe_ptr[CQE_PG(sw_cons)][CQE_IDX(sw_cons)]; | ||
1910 | |||
1911 | /* Check for Valid bit. If the CQE is valid, return false */ | ||
1912 | rc = !CQE_CMP_VALID(hw_cqe, raw_cons, cq->hwq.max_elements); | ||
1913 | spin_unlock_irqrestore(&cq->hwq.lock, flags); | ||
1914 | return rc; | ||
1915 | } | ||
1916 | |||
1888 | static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq, | 1917 | static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq, |
1889 | struct cq_res_raweth_qp1 *hwcqe, | 1918 | struct cq_res_raweth_qp1 *hwcqe, |
1890 | struct bnxt_qplib_cqe **pcqe, | 1919 | struct bnxt_qplib_cqe **pcqe, |
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.h b/drivers/infiniband/hw/bnxt_re/qplib_fp.h index 36b7b7db0e3f..19176e06c98a 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.h +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.h | |||
@@ -449,6 +449,7 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq); | |||
449 | int bnxt_qplib_destroy_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq); | 449 | int bnxt_qplib_destroy_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq); |
450 | int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, | 450 | int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, |
451 | int num, struct bnxt_qplib_qp **qp); | 451 | int num, struct bnxt_qplib_qp **qp); |
452 | bool bnxt_qplib_is_cq_empty(struct bnxt_qplib_cq *cq); | ||
452 | void bnxt_qplib_req_notify_cq(struct bnxt_qplib_cq *cq, u32 arm_type); | 453 | void bnxt_qplib_req_notify_cq(struct bnxt_qplib_cq *cq, u32 arm_type); |
453 | void bnxt_qplib_free_nq(struct bnxt_qplib_nq *nq); | 454 | void bnxt_qplib_free_nq(struct bnxt_qplib_nq *nq); |
454 | int bnxt_qplib_alloc_nq(struct pci_dev *pdev, struct bnxt_qplib_nq *nq); | 455 | int bnxt_qplib_alloc_nq(struct pci_dev *pdev, struct bnxt_qplib_nq *nq); |
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c index fde18cf0e406..ef91ab786dd4 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c | |||
@@ -51,6 +51,19 @@ const struct bnxt_qplib_gid bnxt_qplib_gid_zero = {{ 0, 0, 0, 0, 0, 0, 0, 0, | |||
51 | 0, 0, 0, 0, 0, 0, 0, 0 } }; | 51 | 0, 0, 0, 0, 0, 0, 0, 0 } }; |
52 | 52 | ||
53 | /* Device */ | 53 | /* Device */ |
54 | |||
55 | static bool bnxt_qplib_is_atomic_cap(struct bnxt_qplib_rcfw *rcfw) | ||
56 | { | ||
57 | int rc; | ||
58 | u16 pcie_ctl2; | ||
59 | |||
60 | rc = pcie_capability_read_word(rcfw->pdev, PCI_EXP_DEVCTL2, | ||
61 | &pcie_ctl2); | ||
62 | if (rc) | ||
63 | return false; | ||
64 | return !!(pcie_ctl2 & PCI_EXP_DEVCTL2_ATOMIC_REQ); | ||
65 | } | ||
66 | |||
54 | int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, | 67 | int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, |
55 | struct bnxt_qplib_dev_attr *attr) | 68 | struct bnxt_qplib_dev_attr *attr) |
56 | { | 69 | { |
@@ -81,6 +94,8 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, | |||
81 | 94 | ||
82 | /* Extract the context from the side buffer */ | 95 | /* Extract the context from the side buffer */ |
83 | attr->max_qp = le32_to_cpu(sb->max_qp); | 96 | attr->max_qp = le32_to_cpu(sb->max_qp); |
97 | /* max_qp value reported by FW for PF doesn't include the QP1 for PF */ | ||
98 | attr->max_qp += 1; | ||
84 | attr->max_qp_rd_atom = | 99 | attr->max_qp_rd_atom = |
85 | sb->max_qp_rd_atom > BNXT_QPLIB_MAX_OUT_RD_ATOM ? | 100 | sb->max_qp_rd_atom > BNXT_QPLIB_MAX_OUT_RD_ATOM ? |
86 | BNXT_QPLIB_MAX_OUT_RD_ATOM : sb->max_qp_rd_atom; | 101 | BNXT_QPLIB_MAX_OUT_RD_ATOM : sb->max_qp_rd_atom; |
@@ -129,6 +144,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, | |||
129 | attr->tqm_alloc_reqs[i * 4 + 3] = *(++tqm_alloc); | 144 | attr->tqm_alloc_reqs[i * 4 + 3] = *(++tqm_alloc); |
130 | } | 145 | } |
131 | 146 | ||
147 | attr->is_atomic = bnxt_qplib_is_atomic_cap(rcfw); | ||
132 | bail: | 148 | bail: |
133 | bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf); | 149 | bnxt_qplib_rcfw_free_sbuf(rcfw, sbuf); |
134 | return rc; | 150 | return rc; |
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.h b/drivers/infiniband/hw/bnxt_re/qplib_sp.h index a543f959098b..2ce7e2a32cf0 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_sp.h +++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.h | |||
@@ -42,6 +42,8 @@ | |||
42 | 42 | ||
43 | #define BNXT_QPLIB_RESERVED_QP_WRS 128 | 43 | #define BNXT_QPLIB_RESERVED_QP_WRS 128 |
44 | 44 | ||
45 | #define PCI_EXP_DEVCTL2_ATOMIC_REQ 0x0040 | ||
46 | |||
45 | struct bnxt_qplib_dev_attr { | 47 | struct bnxt_qplib_dev_attr { |
46 | char fw_ver[32]; | 48 | char fw_ver[32]; |
47 | u16 max_sgid; | 49 | u16 max_sgid; |
@@ -70,6 +72,7 @@ struct bnxt_qplib_dev_attr { | |||
70 | u32 max_inline_data; | 72 | u32 max_inline_data; |
71 | u32 l2_db_size; | 73 | u32 l2_db_size; |
72 | u8 tqm_alloc_reqs[MAX_TQM_ALLOC_REQ]; | 74 | u8 tqm_alloc_reqs[MAX_TQM_ALLOC_REQ]; |
75 | bool is_atomic; | ||
73 | }; | 76 | }; |
74 | 77 | ||
75 | struct bnxt_qplib_pd { | 78 | struct bnxt_qplib_pd { |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 29d30744d6c9..0cd0c1fa27d4 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -718,7 +718,7 @@ static struct ib_mr *iwch_alloc_mr(struct ib_pd *pd, | |||
718 | struct iwch_mr *mhp; | 718 | struct iwch_mr *mhp; |
719 | u32 mmid; | 719 | u32 mmid; |
720 | u32 stag = 0; | 720 | u32 stag = 0; |
721 | int ret = 0; | 721 | int ret = -ENOMEM; |
722 | 722 | ||
723 | if (mr_type != IB_MR_TYPE_MEM_REG || | 723 | if (mr_type != IB_MR_TYPE_MEM_REG || |
724 | max_num_sg > T3_MAX_FASTREG_DEPTH) | 724 | max_num_sg > T3_MAX_FASTREG_DEPTH) |
@@ -731,10 +731,8 @@ static struct ib_mr *iwch_alloc_mr(struct ib_pd *pd, | |||
731 | goto err; | 731 | goto err; |
732 | 732 | ||
733 | mhp->pages = kcalloc(max_num_sg, sizeof(u64), GFP_KERNEL); | 733 | mhp->pages = kcalloc(max_num_sg, sizeof(u64), GFP_KERNEL); |
734 | if (!mhp->pages) { | 734 | if (!mhp->pages) |
735 | ret = -ENOMEM; | ||
736 | goto pl_err; | 735 | goto pl_err; |
737 | } | ||
738 | 736 | ||
739 | mhp->rhp = rhp; | 737 | mhp->rhp = rhp; |
740 | ret = iwch_alloc_pbl(mhp, max_num_sg); | 738 | ret = iwch_alloc_pbl(mhp, max_num_sg); |
@@ -751,7 +749,8 @@ static struct ib_mr *iwch_alloc_mr(struct ib_pd *pd, | |||
751 | mhp->attr.state = 1; | 749 | mhp->attr.state = 1; |
752 | mmid = (stag) >> 8; | 750 | mmid = (stag) >> 8; |
753 | mhp->ibmr.rkey = mhp->ibmr.lkey = stag; | 751 | mhp->ibmr.rkey = mhp->ibmr.lkey = stag; |
754 | if (insert_handle(rhp, &rhp->mmidr, mhp, mmid)) | 752 | ret = insert_handle(rhp, &rhp->mmidr, mhp, mmid); |
753 | if (ret) | ||
755 | goto err3; | 754 | goto err3; |
756 | 755 | ||
757 | pr_debug("%s mmid 0x%x mhp %p stag 0x%x\n", __func__, mmid, mhp, stag); | 756 | pr_debug("%s mmid 0x%x mhp %p stag 0x%x\n", __func__, mmid, mhp, stag); |
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index e16fcaf6b5a3..be07da1997e6 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c | |||
@@ -963,6 +963,7 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, | |||
963 | goto err3; | 963 | goto err3; |
964 | 964 | ||
965 | if (ucontext) { | 965 | if (ucontext) { |
966 | ret = -ENOMEM; | ||
966 | mm = kmalloc(sizeof *mm, GFP_KERNEL); | 967 | mm = kmalloc(sizeof *mm, GFP_KERNEL); |
967 | if (!mm) | 968 | if (!mm) |
968 | goto err4; | 969 | goto err4; |
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index bfc77596acbe..cb7fc0d35d1d 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c | |||
@@ -569,7 +569,7 @@ static int build_rdma_read(union t4_wr *wqe, struct ib_send_wr *wr, u8 *len16) | |||
569 | { | 569 | { |
570 | if (wr->num_sge > 1) | 570 | if (wr->num_sge > 1) |
571 | return -EINVAL; | 571 | return -EINVAL; |
572 | if (wr->num_sge) { | 572 | if (wr->num_sge && wr->sg_list[0].length) { |
573 | wqe->read.stag_src = cpu_to_be32(rdma_wr(wr)->rkey); | 573 | wqe->read.stag_src = cpu_to_be32(rdma_wr(wr)->rkey); |
574 | wqe->read.to_src_hi = cpu_to_be32((u32)(rdma_wr(wr)->remote_addr | 574 | wqe->read.to_src_hi = cpu_to_be32((u32)(rdma_wr(wr)->remote_addr |
575 | >> 32)); | 575 | >> 32)); |
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c index 2ba00b89df6a..94b54850ec75 100644 --- a/drivers/infiniband/hw/hfi1/chip.c +++ b/drivers/infiniband/hw/hfi1/chip.c | |||
@@ -12847,7 +12847,12 @@ static void remap_intr(struct hfi1_devdata *dd, int isrc, int msix_intr) | |||
12847 | /* clear from the handled mask of the general interrupt */ | 12847 | /* clear from the handled mask of the general interrupt */ |
12848 | m = isrc / 64; | 12848 | m = isrc / 64; |
12849 | n = isrc % 64; | 12849 | n = isrc % 64; |
12850 | dd->gi_mask[m] &= ~((u64)1 << n); | 12850 | if (likely(m < CCE_NUM_INT_CSRS)) { |
12851 | dd->gi_mask[m] &= ~((u64)1 << n); | ||
12852 | } else { | ||
12853 | dd_dev_err(dd, "remap interrupt err\n"); | ||
12854 | return; | ||
12855 | } | ||
12851 | 12856 | ||
12852 | /* direct the chip source to the given MSI-X interrupt */ | 12857 | /* direct the chip source to the given MSI-X interrupt */ |
12853 | m = isrc / 8; | 12858 | m = isrc / 8; |
diff --git a/drivers/infiniband/hw/hfi1/qp.c b/drivers/infiniband/hw/hfi1/qp.c index 650305cc0373..1a7af9f60c13 100644 --- a/drivers/infiniband/hw/hfi1/qp.c +++ b/drivers/infiniband/hw/hfi1/qp.c | |||
@@ -647,18 +647,17 @@ void qp_iter_print(struct seq_file *s, struct qp_iter *iter) | |||
647 | qp->pid); | 647 | qp->pid); |
648 | } | 648 | } |
649 | 649 | ||
650 | void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, | 650 | void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp) |
651 | gfp_t gfp) | ||
652 | { | 651 | { |
653 | struct hfi1_qp_priv *priv; | 652 | struct hfi1_qp_priv *priv; |
654 | 653 | ||
655 | priv = kzalloc_node(sizeof(*priv), gfp, rdi->dparms.node); | 654 | priv = kzalloc_node(sizeof(*priv), GFP_KERNEL, rdi->dparms.node); |
656 | if (!priv) | 655 | if (!priv) |
657 | return ERR_PTR(-ENOMEM); | 656 | return ERR_PTR(-ENOMEM); |
658 | 657 | ||
659 | priv->owner = qp; | 658 | priv->owner = qp; |
660 | 659 | ||
661 | priv->s_ahg = kzalloc_node(sizeof(*priv->s_ahg), gfp, | 660 | priv->s_ahg = kzalloc_node(sizeof(*priv->s_ahg), GFP_KERNEL, |
662 | rdi->dparms.node); | 661 | rdi->dparms.node); |
663 | if (!priv->s_ahg) { | 662 | if (!priv->s_ahg) { |
664 | kfree(priv); | 663 | kfree(priv); |
diff --git a/drivers/infiniband/hw/hfi1/qp.h b/drivers/infiniband/hw/hfi1/qp.h index 1eb9cd7b8c19..6fe542b6a927 100644 --- a/drivers/infiniband/hw/hfi1/qp.h +++ b/drivers/infiniband/hw/hfi1/qp.h | |||
@@ -123,8 +123,7 @@ void hfi1_migrate_qp(struct rvt_qp *qp); | |||
123 | /* | 123 | /* |
124 | * Functions provided by hfi1 driver for rdmavt to use | 124 | * Functions provided by hfi1 driver for rdmavt to use |
125 | */ | 125 | */ |
126 | void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, | 126 | void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp); |
127 | gfp_t gfp); | ||
128 | void qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp); | 127 | void qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp); |
129 | unsigned free_all_qps(struct rvt_dev_info *rdi); | 128 | unsigned free_all_qps(struct rvt_dev_info *rdi); |
130 | void notify_qp_reset(struct rvt_qp *qp); | 129 | void notify_qp_reset(struct rvt_qp *qp); |
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c index 37d5d29597a4..23fad6d96944 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c | |||
@@ -228,14 +228,14 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
228 | switch (wr->opcode) { | 228 | switch (wr->opcode) { |
229 | case IB_WR_RDMA_READ: | 229 | case IB_WR_RDMA_READ: |
230 | ps_opcode = HNS_ROCE_WQE_OPCODE_RDMA_READ; | 230 | ps_opcode = HNS_ROCE_WQE_OPCODE_RDMA_READ; |
231 | set_raddr_seg(wqe, atomic_wr(wr)->remote_addr, | 231 | set_raddr_seg(wqe, rdma_wr(wr)->remote_addr, |
232 | atomic_wr(wr)->rkey); | 232 | rdma_wr(wr)->rkey); |
233 | break; | 233 | break; |
234 | case IB_WR_RDMA_WRITE: | 234 | case IB_WR_RDMA_WRITE: |
235 | case IB_WR_RDMA_WRITE_WITH_IMM: | 235 | case IB_WR_RDMA_WRITE_WITH_IMM: |
236 | ps_opcode = HNS_ROCE_WQE_OPCODE_RDMA_WRITE; | 236 | ps_opcode = HNS_ROCE_WQE_OPCODE_RDMA_WRITE; |
237 | set_raddr_seg(wqe, atomic_wr(wr)->remote_addr, | 237 | set_raddr_seg(wqe, rdma_wr(wr)->remote_addr, |
238 | atomic_wr(wr)->rkey); | 238 | rdma_wr(wr)->rkey); |
239 | break; | 239 | break; |
240 | case IB_WR_SEND: | 240 | case IB_WR_SEND: |
241 | case IB_WR_SEND_WITH_INV: | 241 | case IB_WR_SEND_WITH_INV: |
@@ -661,9 +661,11 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev) | |||
661 | union ib_gid dgid; | 661 | union ib_gid dgid; |
662 | u64 subnet_prefix; | 662 | u64 subnet_prefix; |
663 | int attr_mask = 0; | 663 | int attr_mask = 0; |
664 | int i; | 664 | int i, j; |
665 | int ret; | 665 | int ret; |
666 | u8 queue_en[HNS_ROCE_V1_RESV_QP] = { 0 }; | ||
666 | u8 phy_port; | 667 | u8 phy_port; |
668 | u8 port = 0; | ||
667 | u8 sl; | 669 | u8 sl; |
668 | 670 | ||
669 | priv = (struct hns_roce_v1_priv *)hr_dev->hw->priv; | 671 | priv = (struct hns_roce_v1_priv *)hr_dev->hw->priv; |
@@ -709,11 +711,27 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev) | |||
709 | attr.rnr_retry = 7; | 711 | attr.rnr_retry = 7; |
710 | attr.timeout = 0x12; | 712 | attr.timeout = 0x12; |
711 | attr.path_mtu = IB_MTU_256; | 713 | attr.path_mtu = IB_MTU_256; |
714 | attr.ah_attr.type = RDMA_AH_ATTR_TYPE_ROCE; | ||
712 | rdma_ah_set_grh(&attr.ah_attr, NULL, 0, 0, 1, 0); | 715 | rdma_ah_set_grh(&attr.ah_attr, NULL, 0, 0, 1, 0); |
713 | rdma_ah_set_static_rate(&attr.ah_attr, 3); | 716 | rdma_ah_set_static_rate(&attr.ah_attr, 3); |
714 | 717 | ||
715 | subnet_prefix = cpu_to_be64(0xfe80000000000000LL); | 718 | subnet_prefix = cpu_to_be64(0xfe80000000000000LL); |
716 | for (i = 0; i < HNS_ROCE_V1_RESV_QP; i++) { | 719 | for (i = 0; i < HNS_ROCE_V1_RESV_QP; i++) { |
720 | phy_port = (i >= HNS_ROCE_MAX_PORTS) ? (i - 2) : | ||
721 | (i % HNS_ROCE_MAX_PORTS); | ||
722 | sl = i / HNS_ROCE_MAX_PORTS; | ||
723 | |||
724 | for (j = 0; j < caps->num_ports; j++) { | ||
725 | if (hr_dev->iboe.phy_port[j] == phy_port) { | ||
726 | queue_en[i] = 1; | ||
727 | port = j; | ||
728 | break; | ||
729 | } | ||
730 | } | ||
731 | |||
732 | if (!queue_en[i]) | ||
733 | continue; | ||
734 | |||
717 | free_mr->mr_free_qp[i] = hns_roce_v1_create_lp_qp(hr_dev, pd); | 735 | free_mr->mr_free_qp[i] = hns_roce_v1_create_lp_qp(hr_dev, pd); |
718 | if (IS_ERR(free_mr->mr_free_qp[i])) { | 736 | if (IS_ERR(free_mr->mr_free_qp[i])) { |
719 | dev_err(dev, "Create loop qp failed!\n"); | 737 | dev_err(dev, "Create loop qp failed!\n"); |
@@ -721,15 +739,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev) | |||
721 | } | 739 | } |
722 | hr_qp = free_mr->mr_free_qp[i]; | 740 | hr_qp = free_mr->mr_free_qp[i]; |
723 | 741 | ||
724 | sl = i / caps->num_ports; | 742 | hr_qp->port = port; |
725 | |||
726 | if (caps->num_ports == HNS_ROCE_MAX_PORTS) | ||
727 | phy_port = (i >= HNS_ROCE_MAX_PORTS) ? (i - 2) : | ||
728 | (i % caps->num_ports); | ||
729 | else | ||
730 | phy_port = i % caps->num_ports; | ||
731 | |||
732 | hr_qp->port = phy_port + 1; | ||
733 | hr_qp->phy_port = phy_port; | 743 | hr_qp->phy_port = phy_port; |
734 | hr_qp->ibqp.qp_type = IB_QPT_RC; | 744 | hr_qp->ibqp.qp_type = IB_QPT_RC; |
735 | hr_qp->ibqp.device = &hr_dev->ib_dev; | 745 | hr_qp->ibqp.device = &hr_dev->ib_dev; |
@@ -739,23 +749,22 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev) | |||
739 | hr_qp->ibqp.recv_cq = cq; | 749 | hr_qp->ibqp.recv_cq = cq; |
740 | hr_qp->ibqp.send_cq = cq; | 750 | hr_qp->ibqp.send_cq = cq; |
741 | 751 | ||
742 | rdma_ah_set_port_num(&attr.ah_attr, phy_port + 1); | 752 | rdma_ah_set_port_num(&attr.ah_attr, port + 1); |
743 | rdma_ah_set_sl(&attr.ah_attr, phy_port + 1); | 753 | rdma_ah_set_sl(&attr.ah_attr, sl); |
744 | attr.port_num = phy_port + 1; | 754 | attr.port_num = port + 1; |
745 | 755 | ||
746 | attr.dest_qp_num = hr_qp->qpn; | 756 | attr.dest_qp_num = hr_qp->qpn; |
747 | memcpy(rdma_ah_retrieve_dmac(&attr.ah_attr), | 757 | memcpy(rdma_ah_retrieve_dmac(&attr.ah_attr), |
748 | hr_dev->dev_addr[phy_port], | 758 | hr_dev->dev_addr[port], |
749 | MAC_ADDR_OCTET_NUM); | 759 | MAC_ADDR_OCTET_NUM); |
750 | 760 | ||
751 | memcpy(&dgid.raw, &subnet_prefix, sizeof(u64)); | 761 | memcpy(&dgid.raw, &subnet_prefix, sizeof(u64)); |
752 | memcpy(&dgid.raw[8], hr_dev->dev_addr[phy_port], 3); | 762 | memcpy(&dgid.raw[8], hr_dev->dev_addr[port], 3); |
753 | memcpy(&dgid.raw[13], hr_dev->dev_addr[phy_port] + 3, 3); | 763 | memcpy(&dgid.raw[13], hr_dev->dev_addr[port] + 3, 3); |
754 | dgid.raw[11] = 0xff; | 764 | dgid.raw[11] = 0xff; |
755 | dgid.raw[12] = 0xfe; | 765 | dgid.raw[12] = 0xfe; |
756 | dgid.raw[8] ^= 2; | 766 | dgid.raw[8] ^= 2; |
757 | rdma_ah_set_dgid_raw(&attr.ah_attr, dgid.raw); | 767 | rdma_ah_set_dgid_raw(&attr.ah_attr, dgid.raw); |
758 | attr_mask |= IB_QP_PORT; | ||
759 | 768 | ||
760 | ret = hr_dev->hw->modify_qp(&hr_qp->ibqp, &attr, attr_mask, | 769 | ret = hr_dev->hw->modify_qp(&hr_qp->ibqp, &attr, attr_mask, |
761 | IB_QPS_RESET, IB_QPS_INIT); | 770 | IB_QPS_RESET, IB_QPS_INIT); |
@@ -812,6 +821,9 @@ static void hns_roce_v1_release_lp_qp(struct hns_roce_dev *hr_dev) | |||
812 | 821 | ||
813 | for (i = 0; i < HNS_ROCE_V1_RESV_QP; i++) { | 822 | for (i = 0; i < HNS_ROCE_V1_RESV_QP; i++) { |
814 | hr_qp = free_mr->mr_free_qp[i]; | 823 | hr_qp = free_mr->mr_free_qp[i]; |
824 | if (!hr_qp) | ||
825 | continue; | ||
826 | |||
815 | ret = hns_roce_v1_destroy_qp(&hr_qp->ibqp); | 827 | ret = hns_roce_v1_destroy_qp(&hr_qp->ibqp); |
816 | if (ret) | 828 | if (ret) |
817 | dev_err(dev, "Destroy qp %d for mr free failed(%d)!\n", | 829 | dev_err(dev, "Destroy qp %d for mr free failed(%d)!\n", |
@@ -963,7 +975,7 @@ static void hns_roce_v1_mr_free_work_fn(struct work_struct *work) | |||
963 | msecs_to_jiffies(HNS_ROCE_V1_FREE_MR_TIMEOUT_MSECS) + jiffies; | 975 | msecs_to_jiffies(HNS_ROCE_V1_FREE_MR_TIMEOUT_MSECS) + jiffies; |
964 | int i; | 976 | int i; |
965 | int ret; | 977 | int ret; |
966 | int ne; | 978 | int ne = 0; |
967 | 979 | ||
968 | mr_work = container_of(work, struct hns_roce_mr_free_work, work); | 980 | mr_work = container_of(work, struct hns_roce_mr_free_work, work); |
969 | hr_mr = (struct hns_roce_mr *)mr_work->mr; | 981 | hr_mr = (struct hns_roce_mr *)mr_work->mr; |
@@ -976,6 +988,10 @@ static void hns_roce_v1_mr_free_work_fn(struct work_struct *work) | |||
976 | 988 | ||
977 | for (i = 0; i < HNS_ROCE_V1_RESV_QP; i++) { | 989 | for (i = 0; i < HNS_ROCE_V1_RESV_QP; i++) { |
978 | hr_qp = free_mr->mr_free_qp[i]; | 990 | hr_qp = free_mr->mr_free_qp[i]; |
991 | if (!hr_qp) | ||
992 | continue; | ||
993 | ne++; | ||
994 | |||
979 | ret = hns_roce_v1_send_lp_wqe(hr_qp); | 995 | ret = hns_roce_v1_send_lp_wqe(hr_qp); |
980 | if (ret) { | 996 | if (ret) { |
981 | dev_err(dev, | 997 | dev_err(dev, |
@@ -985,7 +1001,6 @@ static void hns_roce_v1_mr_free_work_fn(struct work_struct *work) | |||
985 | } | 1001 | } |
986 | } | 1002 | } |
987 | 1003 | ||
988 | ne = HNS_ROCE_V1_RESV_QP; | ||
989 | do { | 1004 | do { |
990 | ret = hns_roce_v1_poll_cq(&mr_free_cq->ib_cq, ne, wc); | 1005 | ret = hns_roce_v1_poll_cq(&mr_free_cq->ib_cq, ne, wc); |
991 | if (ret < 0) { | 1006 | if (ret < 0) { |
@@ -995,7 +1010,8 @@ static void hns_roce_v1_mr_free_work_fn(struct work_struct *work) | |||
995 | goto free_work; | 1010 | goto free_work; |
996 | } | 1011 | } |
997 | ne -= ret; | 1012 | ne -= ret; |
998 | msleep(HNS_ROCE_V1_FREE_MR_WAIT_VALUE); | 1013 | usleep_range(HNS_ROCE_V1_FREE_MR_WAIT_VALUE * 1000, |
1014 | (1 + HNS_ROCE_V1_FREE_MR_WAIT_VALUE) * 1000); | ||
999 | } while (ne && time_before_eq(jiffies, end)); | 1015 | } while (ne && time_before_eq(jiffies, end)); |
1000 | 1016 | ||
1001 | if (ne != 0) | 1017 | if (ne != 0) |
@@ -2181,7 +2197,7 @@ static int hns_roce_v1_poll_one(struct hns_roce_cq *hr_cq, | |||
2181 | } | 2197 | } |
2182 | wc->wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)]; | 2198 | wc->wr_id = wq->wrid[wq->tail & (wq->wqe_cnt - 1)]; |
2183 | ++wq->tail; | 2199 | ++wq->tail; |
2184 | } else { | 2200 | } else { |
2185 | /* RQ conrespond to CQE */ | 2201 | /* RQ conrespond to CQE */ |
2186 | wc->byte_len = le32_to_cpu(cqe->byte_cnt); | 2202 | wc->byte_len = le32_to_cpu(cqe->byte_cnt); |
2187 | opcode = roce_get_field(cqe->cqe_byte_4, | 2203 | opcode = roce_get_field(cqe->cqe_byte_4, |
@@ -3533,10 +3549,12 @@ static int check_qp_db_process_status(struct hns_roce_dev *hr_dev, | |||
3533 | old_cnt = roce_get_field(old_send, | 3549 | old_cnt = roce_get_field(old_send, |
3534 | ROCEE_SDB_SEND_PTR_SDB_SEND_PTR_M, | 3550 | ROCEE_SDB_SEND_PTR_SDB_SEND_PTR_M, |
3535 | ROCEE_SDB_SEND_PTR_SDB_SEND_PTR_S); | 3551 | ROCEE_SDB_SEND_PTR_SDB_SEND_PTR_S); |
3536 | if (cur_cnt - old_cnt > SDB_ST_CMP_VAL) | 3552 | if (cur_cnt - old_cnt > |
3553 | SDB_ST_CMP_VAL) { | ||
3537 | success_flags = 1; | 3554 | success_flags = 1; |
3538 | else { | 3555 | } else { |
3539 | send_ptr = roce_get_field(old_send, | 3556 | send_ptr = |
3557 | roce_get_field(old_send, | ||
3540 | ROCEE_SDB_SEND_PTR_SDB_SEND_PTR_M, | 3558 | ROCEE_SDB_SEND_PTR_SDB_SEND_PTR_M, |
3541 | ROCEE_SDB_SEND_PTR_SDB_SEND_PTR_S) + | 3559 | ROCEE_SDB_SEND_PTR_SDB_SEND_PTR_S) + |
3542 | roce_get_field(sdb_retry_cnt, | 3560 | roce_get_field(sdb_retry_cnt, |
@@ -3641,6 +3659,7 @@ static void hns_roce_v1_destroy_qp_work_fn(struct work_struct *work) | |||
3641 | struct hns_roce_dev *hr_dev; | 3659 | struct hns_roce_dev *hr_dev; |
3642 | struct hns_roce_qp *hr_qp; | 3660 | struct hns_roce_qp *hr_qp; |
3643 | struct device *dev; | 3661 | struct device *dev; |
3662 | unsigned long qpn; | ||
3644 | int ret; | 3663 | int ret; |
3645 | 3664 | ||
3646 | qp_work_entry = container_of(work, struct hns_roce_qp_work, work); | 3665 | qp_work_entry = container_of(work, struct hns_roce_qp_work, work); |
@@ -3648,8 +3667,9 @@ static void hns_roce_v1_destroy_qp_work_fn(struct work_struct *work) | |||
3648 | dev = &hr_dev->pdev->dev; | 3667 | dev = &hr_dev->pdev->dev; |
3649 | priv = (struct hns_roce_v1_priv *)hr_dev->hw->priv; | 3668 | priv = (struct hns_roce_v1_priv *)hr_dev->hw->priv; |
3650 | hr_qp = qp_work_entry->qp; | 3669 | hr_qp = qp_work_entry->qp; |
3670 | qpn = hr_qp->qpn; | ||
3651 | 3671 | ||
3652 | dev_dbg(dev, "Schedule destroy QP(0x%lx) work.\n", hr_qp->qpn); | 3672 | dev_dbg(dev, "Schedule destroy QP(0x%lx) work.\n", qpn); |
3653 | 3673 | ||
3654 | qp_work_entry->sche_cnt++; | 3674 | qp_work_entry->sche_cnt++; |
3655 | 3675 | ||
@@ -3660,7 +3680,7 @@ static void hns_roce_v1_destroy_qp_work_fn(struct work_struct *work) | |||
3660 | &qp_work_entry->db_wait_stage); | 3680 | &qp_work_entry->db_wait_stage); |
3661 | if (ret) { | 3681 | if (ret) { |
3662 | dev_err(dev, "Check QP(0x%lx) db process status failed!\n", | 3682 | dev_err(dev, "Check QP(0x%lx) db process status failed!\n", |
3663 | hr_qp->qpn); | 3683 | qpn); |
3664 | return; | 3684 | return; |
3665 | } | 3685 | } |
3666 | 3686 | ||
@@ -3674,7 +3694,7 @@ static void hns_roce_v1_destroy_qp_work_fn(struct work_struct *work) | |||
3674 | ret = hns_roce_v1_modify_qp(&hr_qp->ibqp, NULL, 0, hr_qp->state, | 3694 | ret = hns_roce_v1_modify_qp(&hr_qp->ibqp, NULL, 0, hr_qp->state, |
3675 | IB_QPS_RESET); | 3695 | IB_QPS_RESET); |
3676 | if (ret) { | 3696 | if (ret) { |
3677 | dev_err(dev, "Modify QP(0x%lx) to RST failed!\n", hr_qp->qpn); | 3697 | dev_err(dev, "Modify QP(0x%lx) to RST failed!\n", qpn); |
3678 | return; | 3698 | return; |
3679 | } | 3699 | } |
3680 | 3700 | ||
@@ -3683,14 +3703,14 @@ static void hns_roce_v1_destroy_qp_work_fn(struct work_struct *work) | |||
3683 | 3703 | ||
3684 | if (hr_qp->ibqp.qp_type == IB_QPT_RC) { | 3704 | if (hr_qp->ibqp.qp_type == IB_QPT_RC) { |
3685 | /* RC QP, release QPN */ | 3705 | /* RC QP, release QPN */ |
3686 | hns_roce_release_range_qp(hr_dev, hr_qp->qpn, 1); | 3706 | hns_roce_release_range_qp(hr_dev, qpn, 1); |
3687 | kfree(hr_qp); | 3707 | kfree(hr_qp); |
3688 | } else | 3708 | } else |
3689 | kfree(hr_to_hr_sqp(hr_qp)); | 3709 | kfree(hr_to_hr_sqp(hr_qp)); |
3690 | 3710 | ||
3691 | kfree(qp_work_entry); | 3711 | kfree(qp_work_entry); |
3692 | 3712 | ||
3693 | dev_dbg(dev, "Accomplished destroy QP(0x%lx) work.\n", hr_qp->qpn); | 3713 | dev_dbg(dev, "Accomplished destroy QP(0x%lx) work.\n", qpn); |
3694 | } | 3714 | } |
3695 | 3715 | ||
3696 | int hns_roce_v1_destroy_qp(struct ib_qp *ibqp) | 3716 | int hns_roce_v1_destroy_qp(struct ib_qp *ibqp) |
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index c3b41f95e70a..d9777b662eba 100644 --- a/drivers/infiniband/hw/hns/hns_roce_main.c +++ b/drivers/infiniband/hw/hns/hns_roce_main.c | |||
@@ -125,8 +125,6 @@ static int handle_en_event(struct hns_roce_dev *hr_dev, u8 port, | |||
125 | return -ENODEV; | 125 | return -ENODEV; |
126 | } | 126 | } |
127 | 127 | ||
128 | spin_lock_bh(&hr_dev->iboe.lock); | ||
129 | |||
130 | switch (event) { | 128 | switch (event) { |
131 | case NETDEV_UP: | 129 | case NETDEV_UP: |
132 | case NETDEV_CHANGE: | 130 | case NETDEV_CHANGE: |
@@ -144,7 +142,6 @@ static int handle_en_event(struct hns_roce_dev *hr_dev, u8 port, | |||
144 | break; | 142 | break; |
145 | } | 143 | } |
146 | 144 | ||
147 | spin_unlock_bh(&hr_dev->iboe.lock); | ||
148 | return 0; | 145 | return 0; |
149 | } | 146 | } |
150 | 147 | ||
diff --git a/drivers/infiniband/hw/i40iw/i40iw.h b/drivers/infiniband/hw/i40iw/i40iw.h index da2eb5a281fa..9b1566468744 100644 --- a/drivers/infiniband/hw/i40iw/i40iw.h +++ b/drivers/infiniband/hw/i40iw/i40iw.h | |||
@@ -527,6 +527,7 @@ enum i40iw_status_code i40iw_add_mac_addr(struct i40iw_device *iwdev, | |||
527 | int i40iw_modify_qp(struct ib_qp *, struct ib_qp_attr *, int, struct ib_udata *); | 527 | int i40iw_modify_qp(struct ib_qp *, struct ib_qp_attr *, int, struct ib_udata *); |
528 | void i40iw_cq_wq_destroy(struct i40iw_device *iwdev, struct i40iw_sc_cq *cq); | 528 | void i40iw_cq_wq_destroy(struct i40iw_device *iwdev, struct i40iw_sc_cq *cq); |
529 | 529 | ||
530 | void i40iw_cleanup_pending_cqp_op(struct i40iw_device *iwdev); | ||
530 | void i40iw_rem_pdusecount(struct i40iw_pd *iwpd, struct i40iw_device *iwdev); | 531 | void i40iw_rem_pdusecount(struct i40iw_pd *iwpd, struct i40iw_device *iwdev); |
531 | void i40iw_add_pdusecount(struct i40iw_pd *iwpd); | 532 | void i40iw_add_pdusecount(struct i40iw_pd *iwpd); |
532 | void i40iw_rem_devusecount(struct i40iw_device *iwdev); | 533 | void i40iw_rem_devusecount(struct i40iw_device *iwdev); |
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c index 6ae98aa7f74e..5a2fa743676c 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_cm.c +++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c | |||
@@ -3487,7 +3487,8 @@ static void i40iw_cm_disconn_true(struct i40iw_qp *iwqp) | |||
3487 | if (((original_hw_tcp_state == I40IW_TCP_STATE_CLOSED) || | 3487 | if (((original_hw_tcp_state == I40IW_TCP_STATE_CLOSED) || |
3488 | (original_hw_tcp_state == I40IW_TCP_STATE_TIME_WAIT) || | 3488 | (original_hw_tcp_state == I40IW_TCP_STATE_TIME_WAIT) || |
3489 | (last_ae == I40IW_AE_RDMAP_ROE_BAD_LLP_CLOSE) || | 3489 | (last_ae == I40IW_AE_RDMAP_ROE_BAD_LLP_CLOSE) || |
3490 | (last_ae == I40IW_AE_LLP_CONNECTION_RESET))) { | 3490 | (last_ae == I40IW_AE_LLP_CONNECTION_RESET) || |
3491 | iwdev->reset)) { | ||
3491 | issue_close = 1; | 3492 | issue_close = 1; |
3492 | iwqp->cm_id = NULL; | 3493 | iwqp->cm_id = NULL; |
3493 | if (!iwqp->flush_issued) { | 3494 | if (!iwqp->flush_issued) { |
@@ -4265,6 +4266,8 @@ void i40iw_cm_disconnect_all(struct i40iw_device *iwdev) | |||
4265 | cm_node = container_of(list_node, struct i40iw_cm_node, connected_entry); | 4266 | cm_node = container_of(list_node, struct i40iw_cm_node, connected_entry); |
4266 | attr.qp_state = IB_QPS_ERR; | 4267 | attr.qp_state = IB_QPS_ERR; |
4267 | i40iw_modify_qp(&cm_node->iwqp->ibqp, &attr, IB_QP_STATE, NULL); | 4268 | i40iw_modify_qp(&cm_node->iwqp->ibqp, &attr, IB_QP_STATE, NULL); |
4269 | if (iwdev->reset) | ||
4270 | i40iw_cm_disconn(cm_node->iwqp); | ||
4268 | i40iw_rem_ref_cm_node(cm_node); | 4271 | i40iw_rem_ref_cm_node(cm_node); |
4269 | } | 4272 | } |
4270 | } | 4273 | } |
diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c index a027e2072477..9ec1ae9a82c9 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c +++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c | |||
@@ -1970,6 +1970,8 @@ static enum i40iw_status_code i40iw_sc_ccq_destroy(struct i40iw_sc_cq *ccq, | |||
1970 | ret_code = i40iw_cqp_poll_registers(cqp, tail, 1000); | 1970 | ret_code = i40iw_cqp_poll_registers(cqp, tail, 1000); |
1971 | } | 1971 | } |
1972 | 1972 | ||
1973 | cqp->process_cqp_sds = i40iw_update_sds_noccq; | ||
1974 | |||
1973 | return ret_code; | 1975 | return ret_code; |
1974 | } | 1976 | } |
1975 | 1977 | ||
diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c index e0f47cc2effc..ae8463ff59a7 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_main.c +++ b/drivers/infiniband/hw/i40iw/i40iw_main.c | |||
@@ -243,6 +243,8 @@ static void i40iw_destroy_cqp(struct i40iw_device *iwdev, bool free_hwcqp) | |||
243 | if (free_hwcqp) | 243 | if (free_hwcqp) |
244 | dev->cqp_ops->cqp_destroy(dev->cqp); | 244 | dev->cqp_ops->cqp_destroy(dev->cqp); |
245 | 245 | ||
246 | i40iw_cleanup_pending_cqp_op(iwdev); | ||
247 | |||
246 | i40iw_free_dma_mem(dev->hw, &cqp->sq); | 248 | i40iw_free_dma_mem(dev->hw, &cqp->sq); |
247 | kfree(cqp->scratch_array); | 249 | kfree(cqp->scratch_array); |
248 | iwdev->cqp.scratch_array = NULL; | 250 | iwdev->cqp.scratch_array = NULL; |
@@ -274,13 +276,12 @@ static void i40iw_disable_irq(struct i40iw_sc_dev *dev, | |||
274 | /** | 276 | /** |
275 | * i40iw_destroy_aeq - destroy aeq | 277 | * i40iw_destroy_aeq - destroy aeq |
276 | * @iwdev: iwarp device | 278 | * @iwdev: iwarp device |
277 | * @reset: true if called before reset | ||
278 | * | 279 | * |
279 | * Issue a destroy aeq request and | 280 | * Issue a destroy aeq request and |
280 | * free the resources associated with the aeq | 281 | * free the resources associated with the aeq |
281 | * The function is called during driver unload | 282 | * The function is called during driver unload |
282 | */ | 283 | */ |
283 | static void i40iw_destroy_aeq(struct i40iw_device *iwdev, bool reset) | 284 | static void i40iw_destroy_aeq(struct i40iw_device *iwdev) |
284 | { | 285 | { |
285 | enum i40iw_status_code status = I40IW_ERR_NOT_READY; | 286 | enum i40iw_status_code status = I40IW_ERR_NOT_READY; |
286 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; | 287 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; |
@@ -288,7 +289,7 @@ static void i40iw_destroy_aeq(struct i40iw_device *iwdev, bool reset) | |||
288 | 289 | ||
289 | if (!iwdev->msix_shared) | 290 | if (!iwdev->msix_shared) |
290 | i40iw_disable_irq(dev, iwdev->iw_msixtbl, (void *)iwdev); | 291 | i40iw_disable_irq(dev, iwdev->iw_msixtbl, (void *)iwdev); |
291 | if (reset) | 292 | if (iwdev->reset) |
292 | goto exit; | 293 | goto exit; |
293 | 294 | ||
294 | if (!dev->aeq_ops->aeq_destroy(&aeq->sc_aeq, 0, 1)) | 295 | if (!dev->aeq_ops->aeq_destroy(&aeq->sc_aeq, 0, 1)) |
@@ -304,19 +305,17 @@ exit: | |||
304 | * i40iw_destroy_ceq - destroy ceq | 305 | * i40iw_destroy_ceq - destroy ceq |
305 | * @iwdev: iwarp device | 306 | * @iwdev: iwarp device |
306 | * @iwceq: ceq to be destroyed | 307 | * @iwceq: ceq to be destroyed |
307 | * @reset: true if called before reset | ||
308 | * | 308 | * |
309 | * Issue a destroy ceq request and | 309 | * Issue a destroy ceq request and |
310 | * free the resources associated with the ceq | 310 | * free the resources associated with the ceq |
311 | */ | 311 | */ |
312 | static void i40iw_destroy_ceq(struct i40iw_device *iwdev, | 312 | static void i40iw_destroy_ceq(struct i40iw_device *iwdev, |
313 | struct i40iw_ceq *iwceq, | 313 | struct i40iw_ceq *iwceq) |
314 | bool reset) | ||
315 | { | 314 | { |
316 | enum i40iw_status_code status; | 315 | enum i40iw_status_code status; |
317 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; | 316 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; |
318 | 317 | ||
319 | if (reset) | 318 | if (iwdev->reset) |
320 | goto exit; | 319 | goto exit; |
321 | 320 | ||
322 | status = dev->ceq_ops->ceq_destroy(&iwceq->sc_ceq, 0, 1); | 321 | status = dev->ceq_ops->ceq_destroy(&iwceq->sc_ceq, 0, 1); |
@@ -335,12 +334,11 @@ exit: | |||
335 | /** | 334 | /** |
336 | * i40iw_dele_ceqs - destroy all ceq's | 335 | * i40iw_dele_ceqs - destroy all ceq's |
337 | * @iwdev: iwarp device | 336 | * @iwdev: iwarp device |
338 | * @reset: true if called before reset | ||
339 | * | 337 | * |
340 | * Go through all of the device ceq's and for each ceq | 338 | * Go through all of the device ceq's and for each ceq |
341 | * disable the ceq interrupt and destroy the ceq | 339 | * disable the ceq interrupt and destroy the ceq |
342 | */ | 340 | */ |
343 | static void i40iw_dele_ceqs(struct i40iw_device *iwdev, bool reset) | 341 | static void i40iw_dele_ceqs(struct i40iw_device *iwdev) |
344 | { | 342 | { |
345 | u32 i = 0; | 343 | u32 i = 0; |
346 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; | 344 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; |
@@ -349,32 +347,31 @@ static void i40iw_dele_ceqs(struct i40iw_device *iwdev, bool reset) | |||
349 | 347 | ||
350 | if (iwdev->msix_shared) { | 348 | if (iwdev->msix_shared) { |
351 | i40iw_disable_irq(dev, msix_vec, (void *)iwdev); | 349 | i40iw_disable_irq(dev, msix_vec, (void *)iwdev); |
352 | i40iw_destroy_ceq(iwdev, iwceq, reset); | 350 | i40iw_destroy_ceq(iwdev, iwceq); |
353 | iwceq++; | 351 | iwceq++; |
354 | i++; | 352 | i++; |
355 | } | 353 | } |
356 | 354 | ||
357 | for (msix_vec++; i < iwdev->ceqs_count; i++, msix_vec++, iwceq++) { | 355 | for (msix_vec++; i < iwdev->ceqs_count; i++, msix_vec++, iwceq++) { |
358 | i40iw_disable_irq(dev, msix_vec, (void *)iwceq); | 356 | i40iw_disable_irq(dev, msix_vec, (void *)iwceq); |
359 | i40iw_destroy_ceq(iwdev, iwceq, reset); | 357 | i40iw_destroy_ceq(iwdev, iwceq); |
360 | } | 358 | } |
361 | } | 359 | } |
362 | 360 | ||
363 | /** | 361 | /** |
364 | * i40iw_destroy_ccq - destroy control cq | 362 | * i40iw_destroy_ccq - destroy control cq |
365 | * @iwdev: iwarp device | 363 | * @iwdev: iwarp device |
366 | * @reset: true if called before reset | ||
367 | * | 364 | * |
368 | * Issue destroy ccq request and | 365 | * Issue destroy ccq request and |
369 | * free the resources associated with the ccq | 366 | * free the resources associated with the ccq |
370 | */ | 367 | */ |
371 | static void i40iw_destroy_ccq(struct i40iw_device *iwdev, bool reset) | 368 | static void i40iw_destroy_ccq(struct i40iw_device *iwdev) |
372 | { | 369 | { |
373 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; | 370 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; |
374 | struct i40iw_ccq *ccq = &iwdev->ccq; | 371 | struct i40iw_ccq *ccq = &iwdev->ccq; |
375 | enum i40iw_status_code status = 0; | 372 | enum i40iw_status_code status = 0; |
376 | 373 | ||
377 | if (!reset) | 374 | if (!iwdev->reset) |
378 | status = dev->ccq_ops->ccq_destroy(dev->ccq, 0, true); | 375 | status = dev->ccq_ops->ccq_destroy(dev->ccq, 0, true); |
379 | if (status) | 376 | if (status) |
380 | i40iw_pr_err("ccq destroy failed %d\n", status); | 377 | i40iw_pr_err("ccq destroy failed %d\n", status); |
@@ -810,7 +807,7 @@ static enum i40iw_status_code i40iw_setup_ceqs(struct i40iw_device *iwdev, | |||
810 | iwceq->msix_idx = msix_vec->idx; | 807 | iwceq->msix_idx = msix_vec->idx; |
811 | status = i40iw_configure_ceq_vector(iwdev, iwceq, ceq_id, msix_vec); | 808 | status = i40iw_configure_ceq_vector(iwdev, iwceq, ceq_id, msix_vec); |
812 | if (status) { | 809 | if (status) { |
813 | i40iw_destroy_ceq(iwdev, iwceq, false); | 810 | i40iw_destroy_ceq(iwdev, iwceq); |
814 | break; | 811 | break; |
815 | } | 812 | } |
816 | i40iw_enable_intr(&iwdev->sc_dev, msix_vec->idx); | 813 | i40iw_enable_intr(&iwdev->sc_dev, msix_vec->idx); |
@@ -912,7 +909,7 @@ static enum i40iw_status_code i40iw_setup_aeq(struct i40iw_device *iwdev) | |||
912 | 909 | ||
913 | status = i40iw_configure_aeq_vector(iwdev); | 910 | status = i40iw_configure_aeq_vector(iwdev); |
914 | if (status) { | 911 | if (status) { |
915 | i40iw_destroy_aeq(iwdev, false); | 912 | i40iw_destroy_aeq(iwdev); |
916 | return status; | 913 | return status; |
917 | } | 914 | } |
918 | 915 | ||
@@ -1442,12 +1439,11 @@ static enum i40iw_status_code i40iw_save_msix_info(struct i40iw_device *iwdev, | |||
1442 | /** | 1439 | /** |
1443 | * i40iw_deinit_device - clean up the device resources | 1440 | * i40iw_deinit_device - clean up the device resources |
1444 | * @iwdev: iwarp device | 1441 | * @iwdev: iwarp device |
1445 | * @reset: true if called before reset | ||
1446 | * | 1442 | * |
1447 | * Destroy the ib device interface, remove the mac ip entry and ipv4/ipv6 addresses, | 1443 | * Destroy the ib device interface, remove the mac ip entry and ipv4/ipv6 addresses, |
1448 | * destroy the device queues and free the pble and the hmc objects | 1444 | * destroy the device queues and free the pble and the hmc objects |
1449 | */ | 1445 | */ |
1450 | static void i40iw_deinit_device(struct i40iw_device *iwdev, bool reset) | 1446 | static void i40iw_deinit_device(struct i40iw_device *iwdev) |
1451 | { | 1447 | { |
1452 | struct i40e_info *ldev = iwdev->ldev; | 1448 | struct i40e_info *ldev = iwdev->ldev; |
1453 | 1449 | ||
@@ -1464,7 +1460,7 @@ static void i40iw_deinit_device(struct i40iw_device *iwdev, bool reset) | |||
1464 | i40iw_destroy_rdma_device(iwdev->iwibdev); | 1460 | i40iw_destroy_rdma_device(iwdev->iwibdev); |
1465 | /* fallthrough */ | 1461 | /* fallthrough */ |
1466 | case IP_ADDR_REGISTERED: | 1462 | case IP_ADDR_REGISTERED: |
1467 | if (!reset) | 1463 | if (!iwdev->reset) |
1468 | i40iw_del_macip_entry(iwdev, (u8)iwdev->mac_ip_table_idx); | 1464 | i40iw_del_macip_entry(iwdev, (u8)iwdev->mac_ip_table_idx); |
1469 | /* fallthrough */ | 1465 | /* fallthrough */ |
1470 | case INET_NOTIFIER: | 1466 | case INET_NOTIFIER: |
@@ -1474,26 +1470,26 @@ static void i40iw_deinit_device(struct i40iw_device *iwdev, bool reset) | |||
1474 | unregister_inet6addr_notifier(&i40iw_inetaddr6_notifier); | 1470 | unregister_inet6addr_notifier(&i40iw_inetaddr6_notifier); |
1475 | } | 1471 | } |
1476 | /* fallthrough */ | 1472 | /* fallthrough */ |
1473 | case PBLE_CHUNK_MEM: | ||
1474 | i40iw_destroy_pble_pool(dev, iwdev->pble_rsrc); | ||
1475 | /* fallthrough */ | ||
1477 | case CEQ_CREATED: | 1476 | case CEQ_CREATED: |
1478 | i40iw_dele_ceqs(iwdev, reset); | 1477 | i40iw_dele_ceqs(iwdev); |
1479 | /* fallthrough */ | 1478 | /* fallthrough */ |
1480 | case AEQ_CREATED: | 1479 | case AEQ_CREATED: |
1481 | i40iw_destroy_aeq(iwdev, reset); | 1480 | i40iw_destroy_aeq(iwdev); |
1482 | /* fallthrough */ | 1481 | /* fallthrough */ |
1483 | case IEQ_CREATED: | 1482 | case IEQ_CREATED: |
1484 | i40iw_puda_dele_resources(&iwdev->vsi, I40IW_PUDA_RSRC_TYPE_IEQ, reset); | 1483 | i40iw_puda_dele_resources(&iwdev->vsi, I40IW_PUDA_RSRC_TYPE_IEQ, iwdev->reset); |
1485 | /* fallthrough */ | 1484 | /* fallthrough */ |
1486 | case ILQ_CREATED: | 1485 | case ILQ_CREATED: |
1487 | i40iw_puda_dele_resources(&iwdev->vsi, I40IW_PUDA_RSRC_TYPE_ILQ, reset); | 1486 | i40iw_puda_dele_resources(&iwdev->vsi, I40IW_PUDA_RSRC_TYPE_ILQ, iwdev->reset); |
1488 | /* fallthrough */ | 1487 | /* fallthrough */ |
1489 | case CCQ_CREATED: | 1488 | case CCQ_CREATED: |
1490 | i40iw_destroy_ccq(iwdev, reset); | 1489 | i40iw_destroy_ccq(iwdev); |
1491 | /* fallthrough */ | ||
1492 | case PBLE_CHUNK_MEM: | ||
1493 | i40iw_destroy_pble_pool(dev, iwdev->pble_rsrc); | ||
1494 | /* fallthrough */ | 1490 | /* fallthrough */ |
1495 | case HMC_OBJS_CREATED: | 1491 | case HMC_OBJS_CREATED: |
1496 | i40iw_del_hmc_objects(dev, dev->hmc_info, true, reset); | 1492 | i40iw_del_hmc_objects(dev, dev->hmc_info, true, iwdev->reset); |
1497 | /* fallthrough */ | 1493 | /* fallthrough */ |
1498 | case CQP_CREATED: | 1494 | case CQP_CREATED: |
1499 | i40iw_destroy_cqp(iwdev, true); | 1495 | i40iw_destroy_cqp(iwdev, true); |
@@ -1670,6 +1666,7 @@ static int i40iw_open(struct i40e_info *ldev, struct i40e_client *client) | |||
1670 | status = i40iw_hmc_init_pble(&iwdev->sc_dev, iwdev->pble_rsrc); | 1666 | status = i40iw_hmc_init_pble(&iwdev->sc_dev, iwdev->pble_rsrc); |
1671 | if (status) | 1667 | if (status) |
1672 | break; | 1668 | break; |
1669 | iwdev->init_state = PBLE_CHUNK_MEM; | ||
1673 | iwdev->virtchnl_wq = alloc_ordered_workqueue("iwvch", WQ_MEM_RECLAIM); | 1670 | iwdev->virtchnl_wq = alloc_ordered_workqueue("iwvch", WQ_MEM_RECLAIM); |
1674 | i40iw_register_notifiers(); | 1671 | i40iw_register_notifiers(); |
1675 | iwdev->init_state = INET_NOTIFIER; | 1672 | iwdev->init_state = INET_NOTIFIER; |
@@ -1693,7 +1690,7 @@ static int i40iw_open(struct i40e_info *ldev, struct i40e_client *client) | |||
1693 | } while (0); | 1690 | } while (0); |
1694 | 1691 | ||
1695 | i40iw_pr_err("status = %d last completion = %d\n", status, iwdev->init_state); | 1692 | i40iw_pr_err("status = %d last completion = %d\n", status, iwdev->init_state); |
1696 | i40iw_deinit_device(iwdev, false); | 1693 | i40iw_deinit_device(iwdev); |
1697 | return -ERESTART; | 1694 | return -ERESTART; |
1698 | } | 1695 | } |
1699 | 1696 | ||
@@ -1774,9 +1771,12 @@ static void i40iw_close(struct i40e_info *ldev, struct i40e_client *client, bool | |||
1774 | iwdev = &hdl->device; | 1771 | iwdev = &hdl->device; |
1775 | iwdev->closing = true; | 1772 | iwdev->closing = true; |
1776 | 1773 | ||
1774 | if (reset) | ||
1775 | iwdev->reset = true; | ||
1776 | |||
1777 | i40iw_cm_disconnect_all(iwdev); | 1777 | i40iw_cm_disconnect_all(iwdev); |
1778 | destroy_workqueue(iwdev->virtchnl_wq); | 1778 | destroy_workqueue(iwdev->virtchnl_wq); |
1779 | i40iw_deinit_device(iwdev, reset); | 1779 | i40iw_deinit_device(iwdev); |
1780 | } | 1780 | } |
1781 | 1781 | ||
1782 | /** | 1782 | /** |
diff --git a/drivers/infiniband/hw/i40iw/i40iw_puda.c b/drivers/infiniband/hw/i40iw/i40iw_puda.c index db41ab40da9c..71050c5d29a0 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_puda.c +++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c | |||
@@ -408,6 +408,9 @@ enum i40iw_status_code i40iw_puda_send(struct i40iw_sc_qp *qp, | |||
408 | set_64bit_val(wqe, 0, info->paddr); | 408 | set_64bit_val(wqe, 0, info->paddr); |
409 | set_64bit_val(wqe, 8, LS_64(info->len, I40IWQPSQ_FRAG_LEN)); | 409 | set_64bit_val(wqe, 8, LS_64(info->len, I40IWQPSQ_FRAG_LEN)); |
410 | set_64bit_val(wqe, 16, header[0]); | 410 | set_64bit_val(wqe, 16, header[0]); |
411 | |||
412 | /* Ensure all data is written before writing valid bit */ | ||
413 | wmb(); | ||
411 | set_64bit_val(wqe, 24, header[1]); | 414 | set_64bit_val(wqe, 24, header[1]); |
412 | 415 | ||
413 | i40iw_debug_buf(qp->dev, I40IW_DEBUG_PUDA, "PUDA SEND WQE", wqe, 32); | 416 | i40iw_debug_buf(qp->dev, I40IW_DEBUG_PUDA, "PUDA SEND WQE", wqe, 32); |
@@ -1411,10 +1414,10 @@ static void i40iw_ieq_handle_exception(struct i40iw_puda_rsrc *ieq, | |||
1411 | 1414 | ||
1412 | if (!list_empty(rxlist)) { | 1415 | if (!list_empty(rxlist)) { |
1413 | tmpbuf = (struct i40iw_puda_buf *)rxlist->next; | 1416 | tmpbuf = (struct i40iw_puda_buf *)rxlist->next; |
1414 | plist = &tmpbuf->list; | ||
1415 | while ((struct list_head *)tmpbuf != rxlist) { | 1417 | while ((struct list_head *)tmpbuf != rxlist) { |
1416 | if ((int)(buf->seqnum - tmpbuf->seqnum) < 0) | 1418 | if ((int)(buf->seqnum - tmpbuf->seqnum) < 0) |
1417 | break; | 1419 | break; |
1420 | plist = &tmpbuf->list; | ||
1418 | tmpbuf = (struct i40iw_puda_buf *)plist->next; | 1421 | tmpbuf = (struct i40iw_puda_buf *)plist->next; |
1419 | } | 1422 | } |
1420 | /* Insert buf before tmpbuf */ | 1423 | /* Insert buf before tmpbuf */ |
diff --git a/drivers/infiniband/hw/i40iw/i40iw_utils.c b/drivers/infiniband/hw/i40iw/i40iw_utils.c index 56d986924a4c..e311ec559f4e 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_utils.c +++ b/drivers/infiniband/hw/i40iw/i40iw_utils.c | |||
@@ -337,6 +337,7 @@ struct i40iw_cqp_request *i40iw_get_cqp_request(struct i40iw_cqp *cqp, bool wait | |||
337 | */ | 337 | */ |
338 | void i40iw_free_cqp_request(struct i40iw_cqp *cqp, struct i40iw_cqp_request *cqp_request) | 338 | void i40iw_free_cqp_request(struct i40iw_cqp *cqp, struct i40iw_cqp_request *cqp_request) |
339 | { | 339 | { |
340 | struct i40iw_device *iwdev = container_of(cqp, struct i40iw_device, cqp); | ||
340 | unsigned long flags; | 341 | unsigned long flags; |
341 | 342 | ||
342 | if (cqp_request->dynamic) { | 343 | if (cqp_request->dynamic) { |
@@ -350,6 +351,7 @@ void i40iw_free_cqp_request(struct i40iw_cqp *cqp, struct i40iw_cqp_request *cqp | |||
350 | list_add_tail(&cqp_request->list, &cqp->cqp_avail_reqs); | 351 | list_add_tail(&cqp_request->list, &cqp->cqp_avail_reqs); |
351 | spin_unlock_irqrestore(&cqp->req_lock, flags); | 352 | spin_unlock_irqrestore(&cqp->req_lock, flags); |
352 | } | 353 | } |
354 | wake_up(&iwdev->close_wq); | ||
353 | } | 355 | } |
354 | 356 | ||
355 | /** | 357 | /** |
@@ -365,6 +367,56 @@ void i40iw_put_cqp_request(struct i40iw_cqp *cqp, | |||
365 | } | 367 | } |
366 | 368 | ||
367 | /** | 369 | /** |
370 | * i40iw_free_pending_cqp_request -free pending cqp request objs | ||
371 | * @cqp: cqp ptr | ||
372 | * @cqp_request: to be put back in cqp list | ||
373 | */ | ||
374 | static void i40iw_free_pending_cqp_request(struct i40iw_cqp *cqp, | ||
375 | struct i40iw_cqp_request *cqp_request) | ||
376 | { | ||
377 | struct i40iw_device *iwdev = container_of(cqp, struct i40iw_device, cqp); | ||
378 | |||
379 | if (cqp_request->waiting) { | ||
380 | cqp_request->compl_info.error = true; | ||
381 | cqp_request->request_done = true; | ||
382 | wake_up(&cqp_request->waitq); | ||
383 | } | ||
384 | i40iw_put_cqp_request(cqp, cqp_request); | ||
385 | wait_event_timeout(iwdev->close_wq, | ||
386 | !atomic_read(&cqp_request->refcount), | ||
387 | 1000); | ||
388 | } | ||
389 | |||
390 | /** | ||
391 | * i40iw_cleanup_pending_cqp_op - clean-up cqp with no completions | ||
392 | * @iwdev: iwarp device | ||
393 | */ | ||
394 | void i40iw_cleanup_pending_cqp_op(struct i40iw_device *iwdev) | ||
395 | { | ||
396 | struct i40iw_sc_dev *dev = &iwdev->sc_dev; | ||
397 | struct i40iw_cqp *cqp = &iwdev->cqp; | ||
398 | struct i40iw_cqp_request *cqp_request = NULL; | ||
399 | struct cqp_commands_info *pcmdinfo = NULL; | ||
400 | u32 i, pending_work, wqe_idx; | ||
401 | |||
402 | pending_work = I40IW_RING_WORK_AVAILABLE(cqp->sc_cqp.sq_ring); | ||
403 | wqe_idx = I40IW_RING_GETCURRENT_TAIL(cqp->sc_cqp.sq_ring); | ||
404 | for (i = 0; i < pending_work; i++) { | ||
405 | cqp_request = (struct i40iw_cqp_request *)(unsigned long)cqp->scratch_array[wqe_idx]; | ||
406 | if (cqp_request) | ||
407 | i40iw_free_pending_cqp_request(cqp, cqp_request); | ||
408 | wqe_idx = (wqe_idx + 1) % I40IW_RING_GETSIZE(cqp->sc_cqp.sq_ring); | ||
409 | } | ||
410 | |||
411 | while (!list_empty(&dev->cqp_cmd_head)) { | ||
412 | pcmdinfo = (struct cqp_commands_info *)i40iw_remove_head(&dev->cqp_cmd_head); | ||
413 | cqp_request = container_of(pcmdinfo, struct i40iw_cqp_request, info); | ||
414 | if (cqp_request) | ||
415 | i40iw_free_pending_cqp_request(cqp, cqp_request); | ||
416 | } | ||
417 | } | ||
418 | |||
419 | /** | ||
368 | * i40iw_free_qp - callback after destroy cqp completes | 420 | * i40iw_free_qp - callback after destroy cqp completes |
369 | * @cqp_request: cqp request for destroy qp | 421 | * @cqp_request: cqp request for destroy qp |
370 | * @num: not used | 422 | * @num: not used |
@@ -546,8 +598,12 @@ void i40iw_rem_ref(struct ib_qp *ibqp) | |||
546 | cqp_info->in.u.qp_destroy.scratch = (uintptr_t)cqp_request; | 598 | cqp_info->in.u.qp_destroy.scratch = (uintptr_t)cqp_request; |
547 | cqp_info->in.u.qp_destroy.remove_hash_idx = true; | 599 | cqp_info->in.u.qp_destroy.remove_hash_idx = true; |
548 | status = i40iw_handle_cqp_op(iwdev, cqp_request); | 600 | status = i40iw_handle_cqp_op(iwdev, cqp_request); |
549 | if (status) | 601 | if (!status) |
550 | i40iw_pr_err("CQP-OP Destroy QP fail"); | 602 | return; |
603 | |||
604 | i40iw_rem_pdusecount(iwqp->iwpd, iwdev); | ||
605 | i40iw_free_qp_resources(iwdev, iwqp, qp_num); | ||
606 | i40iw_rem_devusecount(iwdev); | ||
551 | } | 607 | } |
552 | 608 | ||
553 | /** | 609 | /** |
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index 4dbe61ec7a77..02d871db7ca5 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c | |||
@@ -426,9 +426,13 @@ void i40iw_free_qp_resources(struct i40iw_device *iwdev, | |||
426 | struct i40iw_qp *iwqp, | 426 | struct i40iw_qp *iwqp, |
427 | u32 qp_num) | 427 | u32 qp_num) |
428 | { | 428 | { |
429 | struct i40iw_pbl *iwpbl = &iwqp->iwpbl; | ||
430 | |||
429 | i40iw_dealloc_push_page(iwdev, &iwqp->sc_qp); | 431 | i40iw_dealloc_push_page(iwdev, &iwqp->sc_qp); |
430 | if (qp_num) | 432 | if (qp_num) |
431 | i40iw_free_resource(iwdev, iwdev->allocated_qps, qp_num); | 433 | i40iw_free_resource(iwdev, iwdev->allocated_qps, qp_num); |
434 | if (iwpbl->pbl_allocated) | ||
435 | i40iw_free_pble(iwdev->pble_rsrc, &iwpbl->pble_alloc); | ||
432 | i40iw_free_dma_mem(iwdev->sc_dev.hw, &iwqp->q2_ctx_mem); | 436 | i40iw_free_dma_mem(iwdev->sc_dev.hw, &iwqp->q2_ctx_mem); |
433 | i40iw_free_dma_mem(iwdev->sc_dev.hw, &iwqp->kqp.dma_mem); | 437 | i40iw_free_dma_mem(iwdev->sc_dev.hw, &iwqp->kqp.dma_mem); |
434 | kfree(iwqp->kqp.wrid_mem); | 438 | kfree(iwqp->kqp.wrid_mem); |
@@ -483,7 +487,7 @@ static int i40iw_setup_virt_qp(struct i40iw_device *iwdev, | |||
483 | struct i40iw_qp *iwqp, | 487 | struct i40iw_qp *iwqp, |
484 | struct i40iw_qp_init_info *init_info) | 488 | struct i40iw_qp_init_info *init_info) |
485 | { | 489 | { |
486 | struct i40iw_pbl *iwpbl = iwqp->iwpbl; | 490 | struct i40iw_pbl *iwpbl = &iwqp->iwpbl; |
487 | struct i40iw_qp_mr *qpmr = &iwpbl->qp_mr; | 491 | struct i40iw_qp_mr *qpmr = &iwpbl->qp_mr; |
488 | 492 | ||
489 | iwqp->page = qpmr->sq_page; | 493 | iwqp->page = qpmr->sq_page; |
@@ -688,19 +692,22 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd, | |||
688 | ucontext = to_ucontext(ibpd->uobject->context); | 692 | ucontext = to_ucontext(ibpd->uobject->context); |
689 | 693 | ||
690 | if (req.user_wqe_buffers) { | 694 | if (req.user_wqe_buffers) { |
695 | struct i40iw_pbl *iwpbl; | ||
696 | |||
691 | spin_lock_irqsave( | 697 | spin_lock_irqsave( |
692 | &ucontext->qp_reg_mem_list_lock, flags); | 698 | &ucontext->qp_reg_mem_list_lock, flags); |
693 | iwqp->iwpbl = i40iw_get_pbl( | 699 | iwpbl = i40iw_get_pbl( |
694 | (unsigned long)req.user_wqe_buffers, | 700 | (unsigned long)req.user_wqe_buffers, |
695 | &ucontext->qp_reg_mem_list); | 701 | &ucontext->qp_reg_mem_list); |
696 | spin_unlock_irqrestore( | 702 | spin_unlock_irqrestore( |
697 | &ucontext->qp_reg_mem_list_lock, flags); | 703 | &ucontext->qp_reg_mem_list_lock, flags); |
698 | 704 | ||
699 | if (!iwqp->iwpbl) { | 705 | if (!iwpbl) { |
700 | err_code = -ENODATA; | 706 | err_code = -ENODATA; |
701 | i40iw_pr_err("no pbl info\n"); | 707 | i40iw_pr_err("no pbl info\n"); |
702 | goto error; | 708 | goto error; |
703 | } | 709 | } |
710 | memcpy(&iwqp->iwpbl, iwpbl, sizeof(iwqp->iwpbl)); | ||
704 | } | 711 | } |
705 | } | 712 | } |
706 | err_code = i40iw_setup_virt_qp(iwdev, iwqp, &init_info); | 713 | err_code = i40iw_setup_virt_qp(iwdev, iwqp, &init_info); |
@@ -1161,8 +1168,10 @@ static struct ib_cq *i40iw_create_cq(struct ib_device *ibdev, | |||
1161 | memset(&req, 0, sizeof(req)); | 1168 | memset(&req, 0, sizeof(req)); |
1162 | iwcq->user_mode = true; | 1169 | iwcq->user_mode = true; |
1163 | ucontext = to_ucontext(context); | 1170 | ucontext = to_ucontext(context); |
1164 | if (ib_copy_from_udata(&req, udata, sizeof(struct i40iw_create_cq_req))) | 1171 | if (ib_copy_from_udata(&req, udata, sizeof(struct i40iw_create_cq_req))) { |
1172 | err_code = -EFAULT; | ||
1165 | goto cq_free_resources; | 1173 | goto cq_free_resources; |
1174 | } | ||
1166 | 1175 | ||
1167 | spin_lock_irqsave(&ucontext->cq_reg_mem_list_lock, flags); | 1176 | spin_lock_irqsave(&ucontext->cq_reg_mem_list_lock, flags); |
1168 | iwpbl = i40iw_get_pbl((unsigned long)req.user_cq_buffer, | 1177 | iwpbl = i40iw_get_pbl((unsigned long)req.user_cq_buffer, |
@@ -2063,7 +2072,7 @@ static int i40iw_dereg_mr(struct ib_mr *ib_mr) | |||
2063 | ucontext = to_ucontext(ibpd->uobject->context); | 2072 | ucontext = to_ucontext(ibpd->uobject->context); |
2064 | i40iw_del_memlist(iwmr, ucontext); | 2073 | i40iw_del_memlist(iwmr, ucontext); |
2065 | } | 2074 | } |
2066 | if (iwpbl->pbl_allocated) | 2075 | if (iwpbl->pbl_allocated && iwmr->type != IW_MEMREG_TYPE_QP) |
2067 | i40iw_free_pble(iwdev->pble_rsrc, palloc); | 2076 | i40iw_free_pble(iwdev->pble_rsrc, palloc); |
2068 | kfree(iwmr); | 2077 | kfree(iwmr); |
2069 | return 0; | 2078 | return 0; |
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.h b/drivers/infiniband/hw/i40iw/i40iw_verbs.h index 07c3fec77de6..9067443cd311 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.h +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.h | |||
@@ -170,7 +170,7 @@ struct i40iw_qp { | |||
170 | struct i40iw_qp_kmode kqp; | 170 | struct i40iw_qp_kmode kqp; |
171 | struct i40iw_dma_mem host_ctx; | 171 | struct i40iw_dma_mem host_ctx; |
172 | struct timer_list terminate_timer; | 172 | struct timer_list terminate_timer; |
173 | struct i40iw_pbl *iwpbl; | 173 | struct i40iw_pbl iwpbl; |
174 | struct i40iw_dma_mem q2_ctx_mem; | 174 | struct i40iw_dma_mem q2_ctx_mem; |
175 | struct i40iw_dma_mem ietf_mem; | 175 | struct i40iw_dma_mem ietf_mem; |
176 | struct completion sq_drained; | 176 | struct completion sq_drained; |
diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c index 1e6c526450d9..fedaf8260105 100644 --- a/drivers/infiniband/hw/mlx4/cm.c +++ b/drivers/infiniband/hw/mlx4/cm.c | |||
@@ -323,6 +323,9 @@ int mlx4_ib_multiplex_cm_handler(struct ib_device *ibdev, int port, int slave_id | |||
323 | mad->mad_hdr.attr_id == CM_REP_ATTR_ID || | 323 | mad->mad_hdr.attr_id == CM_REP_ATTR_ID || |
324 | mad->mad_hdr.attr_id == CM_SIDR_REQ_ATTR_ID) { | 324 | mad->mad_hdr.attr_id == CM_SIDR_REQ_ATTR_ID) { |
325 | sl_cm_id = get_local_comm_id(mad); | 325 | sl_cm_id = get_local_comm_id(mad); |
326 | id = id_map_get(ibdev, &pv_cm_id, slave_id, sl_cm_id); | ||
327 | if (id) | ||
328 | goto cont; | ||
326 | id = id_map_alloc(ibdev, slave_id, sl_cm_id); | 329 | id = id_map_alloc(ibdev, slave_id, sl_cm_id); |
327 | if (IS_ERR(id)) { | 330 | if (IS_ERR(id)) { |
328 | mlx4_ib_warn(ibdev, "%s: id{slave: %d, sl_cm_id: 0x%x} Failed to id_map_alloc\n", | 331 | mlx4_ib_warn(ibdev, "%s: id{slave: %d, sl_cm_id: 0x%x} Failed to id_map_alloc\n", |
@@ -343,6 +346,7 @@ int mlx4_ib_multiplex_cm_handler(struct ib_device *ibdev, int port, int slave_id | |||
343 | return -EINVAL; | 346 | return -EINVAL; |
344 | } | 347 | } |
345 | 348 | ||
349 | cont: | ||
346 | set_local_comm_id(mad, id->pv_cm_id); | 350 | set_local_comm_id(mad, id->pv_cm_id); |
347 | 351 | ||
348 | if (mad->mad_hdr.attr_id == CM_DREQ_ATTR_ID) | 352 | if (mad->mad_hdr.attr_id == CM_DREQ_ATTR_ID) |
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index 4f5a143fc0a7..ff931c580557 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c | |||
@@ -102,7 +102,7 @@ static int mlx4_ib_alloc_cq_buf(struct mlx4_ib_dev *dev, struct mlx4_ib_cq_buf * | |||
102 | int err; | 102 | int err; |
103 | 103 | ||
104 | err = mlx4_buf_alloc(dev->dev, nent * dev->dev->caps.cqe_size, | 104 | err = mlx4_buf_alloc(dev->dev, nent * dev->dev->caps.cqe_size, |
105 | PAGE_SIZE * 2, &buf->buf, GFP_KERNEL); | 105 | PAGE_SIZE * 2, &buf->buf); |
106 | 106 | ||
107 | if (err) | 107 | if (err) |
108 | goto out; | 108 | goto out; |
@@ -113,7 +113,7 @@ static int mlx4_ib_alloc_cq_buf(struct mlx4_ib_dev *dev, struct mlx4_ib_cq_buf * | |||
113 | if (err) | 113 | if (err) |
114 | goto err_buf; | 114 | goto err_buf; |
115 | 115 | ||
116 | err = mlx4_buf_write_mtt(dev->dev, &buf->mtt, &buf->buf, GFP_KERNEL); | 116 | err = mlx4_buf_write_mtt(dev->dev, &buf->mtt, &buf->buf); |
117 | if (err) | 117 | if (err) |
118 | goto err_mtt; | 118 | goto err_mtt; |
119 | 119 | ||
@@ -219,7 +219,7 @@ struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev, | |||
219 | 219 | ||
220 | uar = &to_mucontext(context)->uar; | 220 | uar = &to_mucontext(context)->uar; |
221 | } else { | 221 | } else { |
222 | err = mlx4_db_alloc(dev->dev, &cq->db, 1, GFP_KERNEL); | 222 | err = mlx4_db_alloc(dev->dev, &cq->db, 1); |
223 | if (err) | 223 | if (err) |
224 | goto err_cq; | 224 | goto err_cq; |
225 | 225 | ||
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 75b2f7d4cd95..d1b43cbbfea7 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -1155,7 +1155,7 @@ static void mlx4_ib_disassociate_ucontext(struct ib_ucontext *ibcontext) | |||
1155 | * call to mlx4_ib_vma_close. | 1155 | * call to mlx4_ib_vma_close. |
1156 | */ | 1156 | */ |
1157 | put_task_struct(owning_process); | 1157 | put_task_struct(owning_process); |
1158 | msleep(1); | 1158 | usleep_range(1000, 2000); |
1159 | owning_process = get_pid_task(ibcontext->tgid, | 1159 | owning_process = get_pid_task(ibcontext->tgid, |
1160 | PIDTYPE_PID); | 1160 | PIDTYPE_PID); |
1161 | if (!owning_process || | 1161 | if (!owning_process || |
diff --git a/drivers/infiniband/hw/mlx4/mcg.c b/drivers/infiniband/hw/mlx4/mcg.c index 3405e947dc1e..b73f89700ef9 100644 --- a/drivers/infiniband/hw/mlx4/mcg.c +++ b/drivers/infiniband/hw/mlx4/mcg.c | |||
@@ -1091,7 +1091,7 @@ static void _mlx4_ib_mcg_port_cleanup(struct mlx4_ib_demux_ctx *ctx, int destroy | |||
1091 | if (!count) | 1091 | if (!count) |
1092 | break; | 1092 | break; |
1093 | 1093 | ||
1094 | msleep(1); | 1094 | usleep_range(1000, 2000); |
1095 | } while (time_after(end, jiffies)); | 1095 | } while (time_after(end, jiffies)); |
1096 | 1096 | ||
1097 | flush_workqueue(ctx->mcg_wq); | 1097 | flush_workqueue(ctx->mcg_wq); |
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h index c2b9cbf4da05..9db82e67e959 100644 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h | |||
@@ -185,7 +185,6 @@ enum mlx4_ib_qp_flags { | |||
185 | MLX4_IB_QP_LSO = IB_QP_CREATE_IPOIB_UD_LSO, | 185 | MLX4_IB_QP_LSO = IB_QP_CREATE_IPOIB_UD_LSO, |
186 | MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK = IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK, | 186 | MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK = IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK, |
187 | MLX4_IB_QP_NETIF = IB_QP_CREATE_NETIF_QP, | 187 | MLX4_IB_QP_NETIF = IB_QP_CREATE_NETIF_QP, |
188 | MLX4_IB_QP_CREATE_USE_GFP_NOIO = IB_QP_CREATE_USE_GFP_NOIO, | ||
189 | 188 | ||
190 | /* Mellanox specific flags start from IB_QP_CREATE_RESERVED_START */ | 189 | /* Mellanox specific flags start from IB_QP_CREATE_RESERVED_START */ |
191 | MLX4_IB_ROCE_V2_GSI_QP = MLX4_IB_QP_CREATE_ROCE_V2_GSI, | 190 | MLX4_IB_ROCE_V2_GSI_QP = MLX4_IB_QP_CREATE_ROCE_V2_GSI, |
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 996e9058e515..75c0e6c5dd56 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -634,8 +634,8 @@ static void mlx4_ib_free_qp_counter(struct mlx4_ib_dev *dev, | |||
634 | 634 | ||
635 | static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, | 635 | static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, |
636 | struct ib_qp_init_attr *init_attr, | 636 | struct ib_qp_init_attr *init_attr, |
637 | struct ib_udata *udata, int sqpn, struct mlx4_ib_qp **caller_qp, | 637 | struct ib_udata *udata, int sqpn, |
638 | gfp_t gfp) | 638 | struct mlx4_ib_qp **caller_qp) |
639 | { | 639 | { |
640 | int qpn; | 640 | int qpn; |
641 | int err; | 641 | int err; |
@@ -691,14 +691,14 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, | |||
691 | if (qp_type == MLX4_IB_QPT_SMI || qp_type == MLX4_IB_QPT_GSI || | 691 | if (qp_type == MLX4_IB_QPT_SMI || qp_type == MLX4_IB_QPT_GSI || |
692 | (qp_type & (MLX4_IB_QPT_PROXY_SMI | MLX4_IB_QPT_PROXY_SMI_OWNER | | 692 | (qp_type & (MLX4_IB_QPT_PROXY_SMI | MLX4_IB_QPT_PROXY_SMI_OWNER | |
693 | MLX4_IB_QPT_PROXY_GSI | MLX4_IB_QPT_TUN_SMI_OWNER))) { | 693 | MLX4_IB_QPT_PROXY_GSI | MLX4_IB_QPT_TUN_SMI_OWNER))) { |
694 | sqp = kzalloc(sizeof (struct mlx4_ib_sqp), gfp); | 694 | sqp = kzalloc(sizeof(struct mlx4_ib_sqp), GFP_KERNEL); |
695 | if (!sqp) | 695 | if (!sqp) |
696 | return -ENOMEM; | 696 | return -ENOMEM; |
697 | qp = &sqp->qp; | 697 | qp = &sqp->qp; |
698 | qp->pri.vid = 0xFFFF; | 698 | qp->pri.vid = 0xFFFF; |
699 | qp->alt.vid = 0xFFFF; | 699 | qp->alt.vid = 0xFFFF; |
700 | } else { | 700 | } else { |
701 | qp = kzalloc(sizeof (struct mlx4_ib_qp), gfp); | 701 | qp = kzalloc(sizeof(struct mlx4_ib_qp), GFP_KERNEL); |
702 | if (!qp) | 702 | if (!qp) |
703 | return -ENOMEM; | 703 | return -ENOMEM; |
704 | qp->pri.vid = 0xFFFF; | 704 | qp->pri.vid = 0xFFFF; |
@@ -780,7 +780,7 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, | |||
780 | goto err; | 780 | goto err; |
781 | 781 | ||
782 | if (qp_has_rq(init_attr)) { | 782 | if (qp_has_rq(init_attr)) { |
783 | err = mlx4_db_alloc(dev->dev, &qp->db, 0, gfp); | 783 | err = mlx4_db_alloc(dev->dev, &qp->db, 0); |
784 | if (err) | 784 | if (err) |
785 | goto err; | 785 | goto err; |
786 | 786 | ||
@@ -788,7 +788,7 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, | |||
788 | } | 788 | } |
789 | 789 | ||
790 | if (mlx4_buf_alloc(dev->dev, qp->buf_size, qp->buf_size, | 790 | if (mlx4_buf_alloc(dev->dev, qp->buf_size, qp->buf_size, |
791 | &qp->buf, gfp)) { | 791 | &qp->buf)) { |
792 | memcpy(&init_attr->cap, &backup_cap, | 792 | memcpy(&init_attr->cap, &backup_cap, |
793 | sizeof(backup_cap)); | 793 | sizeof(backup_cap)); |
794 | err = set_kernel_sq_size(dev, &init_attr->cap, qp_type, | 794 | err = set_kernel_sq_size(dev, &init_attr->cap, qp_type, |
@@ -797,7 +797,7 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, | |||
797 | goto err_db; | 797 | goto err_db; |
798 | 798 | ||
799 | if (mlx4_buf_alloc(dev->dev, qp->buf_size, | 799 | if (mlx4_buf_alloc(dev->dev, qp->buf_size, |
800 | PAGE_SIZE * 2, &qp->buf, gfp)) { | 800 | PAGE_SIZE * 2, &qp->buf)) { |
801 | err = -ENOMEM; | 801 | err = -ENOMEM; |
802 | goto err_db; | 802 | goto err_db; |
803 | } | 803 | } |
@@ -808,20 +808,20 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, | |||
808 | if (err) | 808 | if (err) |
809 | goto err_buf; | 809 | goto err_buf; |
810 | 810 | ||
811 | err = mlx4_buf_write_mtt(dev->dev, &qp->mtt, &qp->buf, gfp); | 811 | err = mlx4_buf_write_mtt(dev->dev, &qp->mtt, &qp->buf); |
812 | if (err) | 812 | if (err) |
813 | goto err_mtt; | 813 | goto err_mtt; |
814 | 814 | ||
815 | qp->sq.wrid = kmalloc_array(qp->sq.wqe_cnt, sizeof(u64), | 815 | qp->sq.wrid = kmalloc_array(qp->sq.wqe_cnt, sizeof(u64), |
816 | gfp | __GFP_NOWARN); | 816 | GFP_KERNEL | __GFP_NOWARN); |
817 | if (!qp->sq.wrid) | 817 | if (!qp->sq.wrid) |
818 | qp->sq.wrid = __vmalloc(qp->sq.wqe_cnt * sizeof(u64), | 818 | qp->sq.wrid = __vmalloc(qp->sq.wqe_cnt * sizeof(u64), |
819 | gfp, PAGE_KERNEL); | 819 | GFP_KERNEL, PAGE_KERNEL); |
820 | qp->rq.wrid = kmalloc_array(qp->rq.wqe_cnt, sizeof(u64), | 820 | qp->rq.wrid = kmalloc_array(qp->rq.wqe_cnt, sizeof(u64), |
821 | gfp | __GFP_NOWARN); | 821 | GFP_KERNEL | __GFP_NOWARN); |
822 | if (!qp->rq.wrid) | 822 | if (!qp->rq.wrid) |
823 | qp->rq.wrid = __vmalloc(qp->rq.wqe_cnt * sizeof(u64), | 823 | qp->rq.wrid = __vmalloc(qp->rq.wqe_cnt * sizeof(u64), |
824 | gfp, PAGE_KERNEL); | 824 | GFP_KERNEL, PAGE_KERNEL); |
825 | if (!qp->sq.wrid || !qp->rq.wrid) { | 825 | if (!qp->sq.wrid || !qp->rq.wrid) { |
826 | err = -ENOMEM; | 826 | err = -ENOMEM; |
827 | goto err_wrid; | 827 | goto err_wrid; |
@@ -859,7 +859,7 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd, | |||
859 | if (init_attr->create_flags & IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) | 859 | if (init_attr->create_flags & IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) |
860 | qp->flags |= MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK; | 860 | qp->flags |= MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK; |
861 | 861 | ||
862 | err = mlx4_qp_alloc(dev->dev, qpn, &qp->mqp, gfp); | 862 | err = mlx4_qp_alloc(dev->dev, qpn, &qp->mqp); |
863 | if (err) | 863 | if (err) |
864 | goto err_qpn; | 864 | goto err_qpn; |
865 | 865 | ||
@@ -1127,10 +1127,7 @@ static struct ib_qp *_mlx4_ib_create_qp(struct ib_pd *pd, | |||
1127 | int err; | 1127 | int err; |
1128 | int sup_u_create_flags = MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK; | 1128 | int sup_u_create_flags = MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK; |
1129 | u16 xrcdn = 0; | 1129 | u16 xrcdn = 0; |
1130 | gfp_t gfp; | ||
1131 | 1130 | ||
1132 | gfp = (init_attr->create_flags & MLX4_IB_QP_CREATE_USE_GFP_NOIO) ? | ||
1133 | GFP_NOIO : GFP_KERNEL; | ||
1134 | /* | 1131 | /* |
1135 | * We only support LSO, vendor flag1, and multicast loopback blocking, | 1132 | * We only support LSO, vendor flag1, and multicast loopback blocking, |
1136 | * and only for kernel UD QPs. | 1133 | * and only for kernel UD QPs. |
@@ -1140,8 +1137,7 @@ static struct ib_qp *_mlx4_ib_create_qp(struct ib_pd *pd, | |||
1140 | MLX4_IB_SRIOV_TUNNEL_QP | | 1137 | MLX4_IB_SRIOV_TUNNEL_QP | |
1141 | MLX4_IB_SRIOV_SQP | | 1138 | MLX4_IB_SRIOV_SQP | |
1142 | MLX4_IB_QP_NETIF | | 1139 | MLX4_IB_QP_NETIF | |
1143 | MLX4_IB_QP_CREATE_ROCE_V2_GSI | | 1140 | MLX4_IB_QP_CREATE_ROCE_V2_GSI)) |
1144 | MLX4_IB_QP_CREATE_USE_GFP_NOIO)) | ||
1145 | return ERR_PTR(-EINVAL); | 1141 | return ERR_PTR(-EINVAL); |
1146 | 1142 | ||
1147 | if (init_attr->create_flags & IB_QP_CREATE_NETIF_QP) { | 1143 | if (init_attr->create_flags & IB_QP_CREATE_NETIF_QP) { |
@@ -1154,7 +1150,6 @@ static struct ib_qp *_mlx4_ib_create_qp(struct ib_pd *pd, | |||
1154 | return ERR_PTR(-EINVAL); | 1150 | return ERR_PTR(-EINVAL); |
1155 | 1151 | ||
1156 | if ((init_attr->create_flags & ~(MLX4_IB_SRIOV_SQP | | 1152 | if ((init_attr->create_flags & ~(MLX4_IB_SRIOV_SQP | |
1157 | MLX4_IB_QP_CREATE_USE_GFP_NOIO | | ||
1158 | MLX4_IB_QP_CREATE_ROCE_V2_GSI | | 1153 | MLX4_IB_QP_CREATE_ROCE_V2_GSI | |
1159 | MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK) && | 1154 | MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK) && |
1160 | init_attr->qp_type != IB_QPT_UD) || | 1155 | init_attr->qp_type != IB_QPT_UD) || |
@@ -1179,7 +1174,7 @@ static struct ib_qp *_mlx4_ib_create_qp(struct ib_pd *pd, | |||
1179 | case IB_QPT_RC: | 1174 | case IB_QPT_RC: |
1180 | case IB_QPT_UC: | 1175 | case IB_QPT_UC: |
1181 | case IB_QPT_RAW_PACKET: | 1176 | case IB_QPT_RAW_PACKET: |
1182 | qp = kzalloc(sizeof *qp, gfp); | 1177 | qp = kzalloc(sizeof(*qp), GFP_KERNEL); |
1183 | if (!qp) | 1178 | if (!qp) |
1184 | return ERR_PTR(-ENOMEM); | 1179 | return ERR_PTR(-ENOMEM); |
1185 | qp->pri.vid = 0xFFFF; | 1180 | qp->pri.vid = 0xFFFF; |
@@ -1188,7 +1183,7 @@ static struct ib_qp *_mlx4_ib_create_qp(struct ib_pd *pd, | |||
1188 | case IB_QPT_UD: | 1183 | case IB_QPT_UD: |
1189 | { | 1184 | { |
1190 | err = create_qp_common(to_mdev(pd->device), pd, init_attr, | 1185 | err = create_qp_common(to_mdev(pd->device), pd, init_attr, |
1191 | udata, 0, &qp, gfp); | 1186 | udata, 0, &qp); |
1192 | if (err) { | 1187 | if (err) { |
1193 | kfree(qp); | 1188 | kfree(qp); |
1194 | return ERR_PTR(err); | 1189 | return ERR_PTR(err); |
@@ -1217,8 +1212,7 @@ static struct ib_qp *_mlx4_ib_create_qp(struct ib_pd *pd, | |||
1217 | } | 1212 | } |
1218 | 1213 | ||
1219 | err = create_qp_common(to_mdev(pd->device), pd, init_attr, udata, | 1214 | err = create_qp_common(to_mdev(pd->device), pd, init_attr, udata, |
1220 | sqpn, | 1215 | sqpn, &qp); |
1221 | &qp, gfp); | ||
1222 | if (err) | 1216 | if (err) |
1223 | return ERR_PTR(err); | 1217 | return ERR_PTR(err); |
1224 | 1218 | ||
diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c index e32dd58937a8..0facaf5f6d23 100644 --- a/drivers/infiniband/hw/mlx4/srq.c +++ b/drivers/infiniband/hw/mlx4/srq.c | |||
@@ -135,14 +135,14 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, | |||
135 | if (err) | 135 | if (err) |
136 | goto err_mtt; | 136 | goto err_mtt; |
137 | } else { | 137 | } else { |
138 | err = mlx4_db_alloc(dev->dev, &srq->db, 0, GFP_KERNEL); | 138 | err = mlx4_db_alloc(dev->dev, &srq->db, 0); |
139 | if (err) | 139 | if (err) |
140 | goto err_srq; | 140 | goto err_srq; |
141 | 141 | ||
142 | *srq->db.db = 0; | 142 | *srq->db.db = 0; |
143 | 143 | ||
144 | if (mlx4_buf_alloc(dev->dev, buf_size, PAGE_SIZE * 2, &srq->buf, | 144 | if (mlx4_buf_alloc(dev->dev, buf_size, PAGE_SIZE * 2, |
145 | GFP_KERNEL)) { | 145 | &srq->buf)) { |
146 | err = -ENOMEM; | 146 | err = -ENOMEM; |
147 | goto err_db; | 147 | goto err_db; |
148 | } | 148 | } |
@@ -167,7 +167,7 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, | |||
167 | if (err) | 167 | if (err) |
168 | goto err_buf; | 168 | goto err_buf; |
169 | 169 | ||
170 | err = mlx4_buf_write_mtt(dev->dev, &srq->mtt, &srq->buf, GFP_KERNEL); | 170 | err = mlx4_buf_write_mtt(dev->dev, &srq->mtt, &srq->buf); |
171 | if (err) | 171 | if (err) |
172 | goto err_mtt; | 172 | goto err_mtt; |
173 | 173 | ||
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 763bb5b36144..2c40a2e989d2 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c | |||
@@ -582,6 +582,15 @@ static void clean_keys(struct mlx5_ib_dev *dev, int c) | |||
582 | } | 582 | } |
583 | } | 583 | } |
584 | 584 | ||
585 | static void mlx5_mr_cache_debugfs_cleanup(struct mlx5_ib_dev *dev) | ||
586 | { | ||
587 | if (!mlx5_debugfs_root) | ||
588 | return; | ||
589 | |||
590 | debugfs_remove_recursive(dev->cache.root); | ||
591 | dev->cache.root = NULL; | ||
592 | } | ||
593 | |||
585 | static int mlx5_mr_cache_debugfs_init(struct mlx5_ib_dev *dev) | 594 | static int mlx5_mr_cache_debugfs_init(struct mlx5_ib_dev *dev) |
586 | { | 595 | { |
587 | struct mlx5_mr_cache *cache = &dev->cache; | 596 | struct mlx5_mr_cache *cache = &dev->cache; |
@@ -600,38 +609,34 @@ static int mlx5_mr_cache_debugfs_init(struct mlx5_ib_dev *dev) | |||
600 | sprintf(ent->name, "%d", ent->order); | 609 | sprintf(ent->name, "%d", ent->order); |
601 | ent->dir = debugfs_create_dir(ent->name, cache->root); | 610 | ent->dir = debugfs_create_dir(ent->name, cache->root); |
602 | if (!ent->dir) | 611 | if (!ent->dir) |
603 | return -ENOMEM; | 612 | goto err; |
604 | 613 | ||
605 | ent->fsize = debugfs_create_file("size", 0600, ent->dir, ent, | 614 | ent->fsize = debugfs_create_file("size", 0600, ent->dir, ent, |
606 | &size_fops); | 615 | &size_fops); |
607 | if (!ent->fsize) | 616 | if (!ent->fsize) |
608 | return -ENOMEM; | 617 | goto err; |
609 | 618 | ||
610 | ent->flimit = debugfs_create_file("limit", 0600, ent->dir, ent, | 619 | ent->flimit = debugfs_create_file("limit", 0600, ent->dir, ent, |
611 | &limit_fops); | 620 | &limit_fops); |
612 | if (!ent->flimit) | 621 | if (!ent->flimit) |
613 | return -ENOMEM; | 622 | goto err; |
614 | 623 | ||
615 | ent->fcur = debugfs_create_u32("cur", 0400, ent->dir, | 624 | ent->fcur = debugfs_create_u32("cur", 0400, ent->dir, |
616 | &ent->cur); | 625 | &ent->cur); |
617 | if (!ent->fcur) | 626 | if (!ent->fcur) |
618 | return -ENOMEM; | 627 | goto err; |
619 | 628 | ||
620 | ent->fmiss = debugfs_create_u32("miss", 0600, ent->dir, | 629 | ent->fmiss = debugfs_create_u32("miss", 0600, ent->dir, |
621 | &ent->miss); | 630 | &ent->miss); |
622 | if (!ent->fmiss) | 631 | if (!ent->fmiss) |
623 | return -ENOMEM; | 632 | goto err; |
624 | } | 633 | } |
625 | 634 | ||
626 | return 0; | 635 | return 0; |
627 | } | 636 | err: |
628 | 637 | mlx5_mr_cache_debugfs_cleanup(dev); | |
629 | static void mlx5_mr_cache_debugfs_cleanup(struct mlx5_ib_dev *dev) | ||
630 | { | ||
631 | if (!mlx5_debugfs_root) | ||
632 | return; | ||
633 | 638 | ||
634 | debugfs_remove_recursive(dev->cache.root); | 639 | return -ENOMEM; |
635 | } | 640 | } |
636 | 641 | ||
637 | static void delay_time_func(unsigned long ctx) | 642 | static void delay_time_func(unsigned long ctx) |
@@ -692,6 +697,11 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev) | |||
692 | if (err) | 697 | if (err) |
693 | mlx5_ib_warn(dev, "cache debugfs failure\n"); | 698 | mlx5_ib_warn(dev, "cache debugfs failure\n"); |
694 | 699 | ||
700 | /* | ||
701 | * We don't want to fail driver if debugfs failed to initialize, | ||
702 | * so we are not forwarding error to the user. | ||
703 | */ | ||
704 | |||
695 | return 0; | 705 | return 0; |
696 | } | 706 | } |
697 | 707 | ||
@@ -825,7 +835,7 @@ static int mr_umem_get(struct ib_pd *pd, u64 start, u64 length, | |||
825 | access_flags, 0); | 835 | access_flags, 0); |
826 | err = PTR_ERR_OR_ZERO(*umem); | 836 | err = PTR_ERR_OR_ZERO(*umem); |
827 | if (err < 0) { | 837 | if (err < 0) { |
828 | mlx5_ib_err(dev, "umem get failed (%ld)\n", PTR_ERR(umem)); | 838 | mlx5_ib_err(dev, "umem get failed (%d)\n", err); |
829 | return err; | 839 | return err; |
830 | } | 840 | } |
831 | 841 | ||
@@ -1779,7 +1789,7 @@ mlx5_ib_sg_to_klms(struct mlx5_ib_mr *mr, | |||
1779 | mr->ndescs = sg_nents; | 1789 | mr->ndescs = sg_nents; |
1780 | 1790 | ||
1781 | for_each_sg(sgl, sg, sg_nents, i) { | 1791 | for_each_sg(sgl, sg, sg_nents, i) { |
1782 | if (unlikely(i > mr->max_descs)) | 1792 | if (unlikely(i >= mr->max_descs)) |
1783 | break; | 1793 | break; |
1784 | klms[i].va = cpu_to_be64(sg_dma_address(sg) + sg_offset); | 1794 | klms[i].va = cpu_to_be64(sg_dma_address(sg) + sg_offset); |
1785 | klms[i].bcount = cpu_to_be32(sg_dma_len(sg) - sg_offset); | 1795 | klms[i].bcount = cpu_to_be32(sg_dma_len(sg) - sg_offset); |
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 8f9d8b4ad583..b0adf65e4bdb 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
@@ -551,7 +551,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) { | |||
551 | if ((0x0F000100 == (pcs_control_status0 & 0x0F000100)) | 551 | if ((0x0F000100 == (pcs_control_status0 & 0x0F000100)) |
552 | || (0x0F000100 == (pcs_control_status1 & 0x0F000100))) | 552 | || (0x0F000100 == (pcs_control_status1 & 0x0F000100))) |
553 | int_cnt++; | 553 | int_cnt++; |
554 | msleep(1); | 554 | usleep_range(1000, 2000); |
555 | } | 555 | } |
556 | if (int_cnt > 1) { | 556 | if (int_cnt > 1) { |
557 | spin_lock_irqsave(&nesadapter->phy_lock, flags); | 557 | spin_lock_irqsave(&nesadapter->phy_lock, flags); |
@@ -592,7 +592,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) { | |||
592 | break; | 592 | break; |
593 | } | 593 | } |
594 | } | 594 | } |
595 | msleep(1); | 595 | usleep_range(1000, 2000); |
596 | } | 596 | } |
597 | } | 597 | } |
598 | } | 598 | } |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 2f30bda8457a..27d5e8d9f08d 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -744,7 +744,8 @@ err: | |||
744 | if (is_uctx_pd) { | 744 | if (is_uctx_pd) { |
745 | ocrdma_release_ucontext_pd(uctx); | 745 | ocrdma_release_ucontext_pd(uctx); |
746 | } else { | 746 | } else { |
747 | status = _ocrdma_dealloc_pd(dev, pd); | 747 | if (_ocrdma_dealloc_pd(dev, pd)) |
748 | pr_err("%s: _ocrdma_dealloc_pd() failed\n", __func__); | ||
748 | } | 749 | } |
749 | exit: | 750 | exit: |
750 | return ERR_PTR(status); | 751 | return ERR_PTR(status); |
@@ -1901,6 +1902,7 @@ struct ib_srq *ocrdma_create_srq(struct ib_pd *ibpd, | |||
1901 | goto err; | 1902 | goto err; |
1902 | 1903 | ||
1903 | if (udata == NULL) { | 1904 | if (udata == NULL) { |
1905 | status = -ENOMEM; | ||
1904 | srq->rqe_wr_id_tbl = kzalloc(sizeof(u64) * srq->rq.max_cnt, | 1906 | srq->rqe_wr_id_tbl = kzalloc(sizeof(u64) * srq->rq.max_cnt, |
1905 | GFP_KERNEL); | 1907 | GFP_KERNEL); |
1906 | if (srq->rqe_wr_id_tbl == NULL) | 1908 | if (srq->rqe_wr_id_tbl == NULL) |
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 548e4d1e998f..2ae71b8f1ba8 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c | |||
@@ -53,6 +53,14 @@ | |||
53 | 53 | ||
54 | #define DB_ADDR_SHIFT(addr) ((addr) << DB_PWM_ADDR_OFFSET_SHIFT) | 54 | #define DB_ADDR_SHIFT(addr) ((addr) << DB_PWM_ADDR_OFFSET_SHIFT) |
55 | 55 | ||
56 | static inline int qedr_ib_copy_to_udata(struct ib_udata *udata, void *src, | ||
57 | size_t len) | ||
58 | { | ||
59 | size_t min_len = min_t(size_t, len, udata->outlen); | ||
60 | |||
61 | return ib_copy_to_udata(udata, src, min_len); | ||
62 | } | ||
63 | |||
56 | int qedr_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey) | 64 | int qedr_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey) |
57 | { | 65 | { |
58 | if (index > QEDR_ROCE_PKEY_TABLE_LEN) | 66 | if (index > QEDR_ROCE_PKEY_TABLE_LEN) |
@@ -378,7 +386,7 @@ struct ib_ucontext *qedr_alloc_ucontext(struct ib_device *ibdev, | |||
378 | uresp.sges_per_srq_wr = dev->attr.max_srq_sge; | 386 | uresp.sges_per_srq_wr = dev->attr.max_srq_sge; |
379 | uresp.max_cqes = QEDR_MAX_CQES; | 387 | uresp.max_cqes = QEDR_MAX_CQES; |
380 | 388 | ||
381 | rc = ib_copy_to_udata(udata, &uresp, sizeof(uresp)); | 389 | rc = qedr_ib_copy_to_udata(udata, &uresp, sizeof(uresp)); |
382 | if (rc) | 390 | if (rc) |
383 | goto err; | 391 | goto err; |
384 | 392 | ||
@@ -499,7 +507,7 @@ struct ib_pd *qedr_alloc_pd(struct ib_device *ibdev, | |||
499 | 507 | ||
500 | uresp.pd_id = pd_id; | 508 | uresp.pd_id = pd_id; |
501 | 509 | ||
502 | rc = ib_copy_to_udata(udata, &uresp, sizeof(uresp)); | 510 | rc = qedr_ib_copy_to_udata(udata, &uresp, sizeof(uresp)); |
503 | if (rc) { | 511 | if (rc) { |
504 | DP_ERR(dev, "copy error pd_id=0x%x.\n", pd_id); | 512 | DP_ERR(dev, "copy error pd_id=0x%x.\n", pd_id); |
505 | dev->ops->rdma_dealloc_pd(dev->rdma_ctx, pd_id); | 513 | dev->ops->rdma_dealloc_pd(dev->rdma_ctx, pd_id); |
@@ -729,7 +737,7 @@ static int qedr_copy_cq_uresp(struct qedr_dev *dev, | |||
729 | uresp.db_offset = DB_ADDR_SHIFT(DQ_PWM_OFFSET_UCM_RDMA_CQ_CONS_32BIT); | 737 | uresp.db_offset = DB_ADDR_SHIFT(DQ_PWM_OFFSET_UCM_RDMA_CQ_CONS_32BIT); |
730 | uresp.icid = cq->icid; | 738 | uresp.icid = cq->icid; |
731 | 739 | ||
732 | rc = ib_copy_to_udata(udata, &uresp, sizeof(uresp)); | 740 | rc = qedr_ib_copy_to_udata(udata, &uresp, sizeof(uresp)); |
733 | if (rc) | 741 | if (rc) |
734 | DP_ERR(dev, "copy error cqid=0x%x.\n", cq->icid); | 742 | DP_ERR(dev, "copy error cqid=0x%x.\n", cq->icid); |
735 | 743 | ||
@@ -1238,7 +1246,7 @@ static int qedr_copy_qp_uresp(struct qedr_dev *dev, | |||
1238 | uresp.atomic_supported = dev->atomic_cap != IB_ATOMIC_NONE; | 1246 | uresp.atomic_supported = dev->atomic_cap != IB_ATOMIC_NONE; |
1239 | uresp.qp_id = qp->qp_id; | 1247 | uresp.qp_id = qp->qp_id; |
1240 | 1248 | ||
1241 | rc = ib_copy_to_udata(udata, &uresp, sizeof(uresp)); | 1249 | rc = qedr_ib_copy_to_udata(udata, &uresp, sizeof(uresp)); |
1242 | if (rc) | 1250 | if (rc) |
1243 | DP_ERR(dev, | 1251 | DP_ERR(dev, |
1244 | "create qp: failed a copy to user space with qp icid=0x%x.\n", | 1252 | "create qp: failed a copy to user space with qp icid=0x%x.\n", |
diff --git a/drivers/infiniband/hw/qib/qib_qp.c b/drivers/infiniband/hw/qib/qib_qp.c index 5984981e7dd4..a343e3b5d4cb 100644 --- a/drivers/infiniband/hw/qib/qib_qp.c +++ b/drivers/infiniband/hw/qib/qib_qp.c | |||
@@ -104,10 +104,9 @@ const struct rvt_operation_params qib_post_parms[RVT_OPERATION_MAX] = { | |||
104 | 104 | ||
105 | }; | 105 | }; |
106 | 106 | ||
107 | static void get_map_page(struct rvt_qpn_table *qpt, struct rvt_qpn_map *map, | 107 | static void get_map_page(struct rvt_qpn_table *qpt, struct rvt_qpn_map *map) |
108 | gfp_t gfp) | ||
109 | { | 108 | { |
110 | unsigned long page = get_zeroed_page(gfp); | 109 | unsigned long page = get_zeroed_page(GFP_KERNEL); |
111 | 110 | ||
112 | /* | 111 | /* |
113 | * Free the page if someone raced with us installing it. | 112 | * Free the page if someone raced with us installing it. |
@@ -126,7 +125,7 @@ static void get_map_page(struct rvt_qpn_table *qpt, struct rvt_qpn_map *map, | |||
126 | * zero/one for QP type IB_QPT_SMI/IB_QPT_GSI. | 125 | * zero/one for QP type IB_QPT_SMI/IB_QPT_GSI. |
127 | */ | 126 | */ |
128 | int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, | 127 | int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, |
129 | enum ib_qp_type type, u8 port, gfp_t gfp) | 128 | enum ib_qp_type type, u8 port) |
130 | { | 129 | { |
131 | u32 i, offset, max_scan, qpn; | 130 | u32 i, offset, max_scan, qpn; |
132 | struct rvt_qpn_map *map; | 131 | struct rvt_qpn_map *map; |
@@ -160,7 +159,7 @@ int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, | |||
160 | max_scan = qpt->nmaps - !offset; | 159 | max_scan = qpt->nmaps - !offset; |
161 | for (i = 0;;) { | 160 | for (i = 0;;) { |
162 | if (unlikely(!map->page)) { | 161 | if (unlikely(!map->page)) { |
163 | get_map_page(qpt, map, gfp); | 162 | get_map_page(qpt, map); |
164 | if (unlikely(!map->page)) | 163 | if (unlikely(!map->page)) |
165 | break; | 164 | break; |
166 | } | 165 | } |
@@ -317,16 +316,16 @@ u32 qib_mtu_from_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp, u32 pmtu) | |||
317 | return ib_mtu_enum_to_int(pmtu); | 316 | return ib_mtu_enum_to_int(pmtu); |
318 | } | 317 | } |
319 | 318 | ||
320 | void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp) | 319 | void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp) |
321 | { | 320 | { |
322 | struct qib_qp_priv *priv; | 321 | struct qib_qp_priv *priv; |
323 | 322 | ||
324 | priv = kzalloc(sizeof(*priv), gfp); | 323 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
325 | if (!priv) | 324 | if (!priv) |
326 | return ERR_PTR(-ENOMEM); | 325 | return ERR_PTR(-ENOMEM); |
327 | priv->owner = qp; | 326 | priv->owner = qp; |
328 | 327 | ||
329 | priv->s_hdr = kzalloc(sizeof(*priv->s_hdr), gfp); | 328 | priv->s_hdr = kzalloc(sizeof(*priv->s_hdr), GFP_KERNEL); |
330 | if (!priv->s_hdr) { | 329 | if (!priv->s_hdr) { |
331 | kfree(priv); | 330 | kfree(priv); |
332 | return ERR_PTR(-ENOMEM); | 331 | return ERR_PTR(-ENOMEM); |
diff --git a/drivers/infiniband/hw/qib/qib_verbs.h b/drivers/infiniband/hw/qib/qib_verbs.h index da0db5485ddc..a52fc67b40d7 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.h +++ b/drivers/infiniband/hw/qib/qib_verbs.h | |||
@@ -274,11 +274,11 @@ int qib_get_counters(struct qib_pportdata *ppd, | |||
274 | * Functions provided by qib driver for rdmavt to use | 274 | * Functions provided by qib driver for rdmavt to use |
275 | */ | 275 | */ |
276 | unsigned qib_free_all_qps(struct rvt_dev_info *rdi); | 276 | unsigned qib_free_all_qps(struct rvt_dev_info *rdi); |
277 | void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, gfp_t gfp); | 277 | void *qib_qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp); |
278 | void qib_qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp); | 278 | void qib_qp_priv_free(struct rvt_dev_info *rdi, struct rvt_qp *qp); |
279 | void qib_notify_qp_reset(struct rvt_qp *qp); | 279 | void qib_notify_qp_reset(struct rvt_qp *qp); |
280 | int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, | 280 | int qib_alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, |
281 | enum ib_qp_type type, u8 port, gfp_t gfp); | 281 | enum ib_qp_type type, u8 port); |
282 | void qib_restart_rc(struct rvt_qp *qp, u32 psn, int wait); | 282 | void qib_restart_rc(struct rvt_qp *qp, u32 psn, int wait); |
283 | #ifdef CONFIG_DEBUG_FS | 283 | #ifdef CONFIG_DEBUG_FS |
284 | 284 | ||
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c index 727e81cc2c8f..8876ee7bc326 100644 --- a/drivers/infiniband/sw/rdmavt/qp.c +++ b/drivers/infiniband/sw/rdmavt/qp.c | |||
@@ -118,10 +118,9 @@ const int ib_rvt_state_ops[IB_QPS_ERR + 1] = { | |||
118 | EXPORT_SYMBOL(ib_rvt_state_ops); | 118 | EXPORT_SYMBOL(ib_rvt_state_ops); |
119 | 119 | ||
120 | static void get_map_page(struct rvt_qpn_table *qpt, | 120 | static void get_map_page(struct rvt_qpn_table *qpt, |
121 | struct rvt_qpn_map *map, | 121 | struct rvt_qpn_map *map) |
122 | gfp_t gfp) | ||
123 | { | 122 | { |
124 | unsigned long page = get_zeroed_page(gfp); | 123 | unsigned long page = get_zeroed_page(GFP_KERNEL); |
125 | 124 | ||
126 | /* | 125 | /* |
127 | * Free the page if someone raced with us installing it. | 126 | * Free the page if someone raced with us installing it. |
@@ -173,7 +172,7 @@ static int init_qpn_table(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt) | |||
173 | rdi->dparms.qpn_res_start, rdi->dparms.qpn_res_end); | 172 | rdi->dparms.qpn_res_start, rdi->dparms.qpn_res_end); |
174 | for (i = rdi->dparms.qpn_res_start; i <= rdi->dparms.qpn_res_end; i++) { | 173 | for (i = rdi->dparms.qpn_res_start; i <= rdi->dparms.qpn_res_end; i++) { |
175 | if (!map->page) { | 174 | if (!map->page) { |
176 | get_map_page(qpt, map, GFP_KERNEL); | 175 | get_map_page(qpt, map); |
177 | if (!map->page) { | 176 | if (!map->page) { |
178 | ret = -ENOMEM; | 177 | ret = -ENOMEM; |
179 | break; | 178 | break; |
@@ -342,14 +341,14 @@ static inline unsigned mk_qpn(struct rvt_qpn_table *qpt, | |||
342 | * Return: The queue pair number | 341 | * Return: The queue pair number |
343 | */ | 342 | */ |
344 | static int alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, | 343 | static int alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, |
345 | enum ib_qp_type type, u8 port_num, gfp_t gfp) | 344 | enum ib_qp_type type, u8 port_num) |
346 | { | 345 | { |
347 | u32 i, offset, max_scan, qpn; | 346 | u32 i, offset, max_scan, qpn; |
348 | struct rvt_qpn_map *map; | 347 | struct rvt_qpn_map *map; |
349 | u32 ret; | 348 | u32 ret; |
350 | 349 | ||
351 | if (rdi->driver_f.alloc_qpn) | 350 | if (rdi->driver_f.alloc_qpn) |
352 | return rdi->driver_f.alloc_qpn(rdi, qpt, type, port_num, gfp); | 351 | return rdi->driver_f.alloc_qpn(rdi, qpt, type, port_num); |
353 | 352 | ||
354 | if (type == IB_QPT_SMI || type == IB_QPT_GSI) { | 353 | if (type == IB_QPT_SMI || type == IB_QPT_GSI) { |
355 | unsigned n; | 354 | unsigned n; |
@@ -374,7 +373,7 @@ static int alloc_qpn(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, | |||
374 | max_scan = qpt->nmaps - !offset; | 373 | max_scan = qpt->nmaps - !offset; |
375 | for (i = 0;;) { | 374 | for (i = 0;;) { |
376 | if (unlikely(!map->page)) { | 375 | if (unlikely(!map->page)) { |
377 | get_map_page(qpt, map, gfp); | 376 | get_map_page(qpt, map); |
378 | if (unlikely(!map->page)) | 377 | if (unlikely(!map->page)) |
379 | break; | 378 | break; |
380 | } | 379 | } |
@@ -672,7 +671,6 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd, | |||
672 | struct ib_qp *ret = ERR_PTR(-ENOMEM); | 671 | struct ib_qp *ret = ERR_PTR(-ENOMEM); |
673 | struct rvt_dev_info *rdi = ib_to_rvt(ibpd->device); | 672 | struct rvt_dev_info *rdi = ib_to_rvt(ibpd->device); |
674 | void *priv = NULL; | 673 | void *priv = NULL; |
675 | gfp_t gfp; | ||
676 | size_t sqsize; | 674 | size_t sqsize; |
677 | 675 | ||
678 | if (!rdi) | 676 | if (!rdi) |
@@ -680,18 +678,9 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd, | |||
680 | 678 | ||
681 | if (init_attr->cap.max_send_sge > rdi->dparms.props.max_sge || | 679 | if (init_attr->cap.max_send_sge > rdi->dparms.props.max_sge || |
682 | init_attr->cap.max_send_wr > rdi->dparms.props.max_qp_wr || | 680 | init_attr->cap.max_send_wr > rdi->dparms.props.max_qp_wr || |
683 | init_attr->create_flags & ~(IB_QP_CREATE_USE_GFP_NOIO)) | 681 | init_attr->create_flags) |
684 | return ERR_PTR(-EINVAL); | 682 | return ERR_PTR(-EINVAL); |
685 | 683 | ||
686 | /* GFP_NOIO is applicable to RC QP's only */ | ||
687 | |||
688 | if (init_attr->create_flags & IB_QP_CREATE_USE_GFP_NOIO && | ||
689 | init_attr->qp_type != IB_QPT_RC) | ||
690 | return ERR_PTR(-EINVAL); | ||
691 | |||
692 | gfp = init_attr->create_flags & IB_QP_CREATE_USE_GFP_NOIO ? | ||
693 | GFP_NOIO : GFP_KERNEL; | ||
694 | |||
695 | /* Check receive queue parameters if no SRQ is specified. */ | 684 | /* Check receive queue parameters if no SRQ is specified. */ |
696 | if (!init_attr->srq) { | 685 | if (!init_attr->srq) { |
697 | if (init_attr->cap.max_recv_sge > rdi->dparms.props.max_sge || | 686 | if (init_attr->cap.max_recv_sge > rdi->dparms.props.max_sge || |
@@ -719,14 +708,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd, | |||
719 | sz = sizeof(struct rvt_sge) * | 708 | sz = sizeof(struct rvt_sge) * |
720 | init_attr->cap.max_send_sge + | 709 | init_attr->cap.max_send_sge + |
721 | sizeof(struct rvt_swqe); | 710 | sizeof(struct rvt_swqe); |
722 | if (gfp == GFP_NOIO) | 711 | swq = vzalloc_node(sqsize * sz, rdi->dparms.node); |
723 | swq = __vmalloc( | ||
724 | sqsize * sz, | ||
725 | gfp | __GFP_ZERO, PAGE_KERNEL); | ||
726 | else | ||
727 | swq = vzalloc_node( | ||
728 | sqsize * sz, | ||
729 | rdi->dparms.node); | ||
730 | if (!swq) | 712 | if (!swq) |
731 | return ERR_PTR(-ENOMEM); | 713 | return ERR_PTR(-ENOMEM); |
732 | 714 | ||
@@ -741,7 +723,8 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd, | |||
741 | } else if (init_attr->cap.max_recv_sge > 1) | 723 | } else if (init_attr->cap.max_recv_sge > 1) |
742 | sg_list_sz = sizeof(*qp->r_sg_list) * | 724 | sg_list_sz = sizeof(*qp->r_sg_list) * |
743 | (init_attr->cap.max_recv_sge - 1); | 725 | (init_attr->cap.max_recv_sge - 1); |
744 | qp = kzalloc_node(sz + sg_list_sz, gfp, rdi->dparms.node); | 726 | qp = kzalloc_node(sz + sg_list_sz, GFP_KERNEL, |
727 | rdi->dparms.node); | ||
745 | if (!qp) | 728 | if (!qp) |
746 | goto bail_swq; | 729 | goto bail_swq; |
747 | 730 | ||
@@ -751,7 +734,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd, | |||
751 | kzalloc_node( | 734 | kzalloc_node( |
752 | sizeof(*qp->s_ack_queue) * | 735 | sizeof(*qp->s_ack_queue) * |
753 | rvt_max_atomic(rdi), | 736 | rvt_max_atomic(rdi), |
754 | gfp, | 737 | GFP_KERNEL, |
755 | rdi->dparms.node); | 738 | rdi->dparms.node); |
756 | if (!qp->s_ack_queue) | 739 | if (!qp->s_ack_queue) |
757 | goto bail_qp; | 740 | goto bail_qp; |
@@ -766,7 +749,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd, | |||
766 | * Driver needs to set up it's private QP structure and do any | 749 | * Driver needs to set up it's private QP structure and do any |
767 | * initialization that is needed. | 750 | * initialization that is needed. |
768 | */ | 751 | */ |
769 | priv = rdi->driver_f.qp_priv_alloc(rdi, qp, gfp); | 752 | priv = rdi->driver_f.qp_priv_alloc(rdi, qp); |
770 | if (IS_ERR(priv)) { | 753 | if (IS_ERR(priv)) { |
771 | ret = priv; | 754 | ret = priv; |
772 | goto bail_qp; | 755 | goto bail_qp; |
@@ -786,11 +769,6 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd, | |||
786 | qp->r_rq.wq = vmalloc_user( | 769 | qp->r_rq.wq = vmalloc_user( |
787 | sizeof(struct rvt_rwq) + | 770 | sizeof(struct rvt_rwq) + |
788 | qp->r_rq.size * sz); | 771 | qp->r_rq.size * sz); |
789 | else if (gfp == GFP_NOIO) | ||
790 | qp->r_rq.wq = __vmalloc( | ||
791 | sizeof(struct rvt_rwq) + | ||
792 | qp->r_rq.size * sz, | ||
793 | gfp | __GFP_ZERO, PAGE_KERNEL); | ||
794 | else | 772 | else |
795 | qp->r_rq.wq = vzalloc_node( | 773 | qp->r_rq.wq = vzalloc_node( |
796 | sizeof(struct rvt_rwq) + | 774 | sizeof(struct rvt_rwq) + |
@@ -824,7 +802,7 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd, | |||
824 | 802 | ||
825 | err = alloc_qpn(rdi, &rdi->qp_dev->qpn_table, | 803 | err = alloc_qpn(rdi, &rdi->qp_dev->qpn_table, |
826 | init_attr->qp_type, | 804 | init_attr->qp_type, |
827 | init_attr->port_num, gfp); | 805 | init_attr->port_num); |
828 | if (err < 0) { | 806 | if (err < 0) { |
829 | ret = ERR_PTR(err); | 807 | ret = ERR_PTR(err); |
830 | goto bail_rq_wq; | 808 | goto bail_rq_wq; |
@@ -1280,9 +1258,7 @@ int rvt_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
1280 | 1258 | ||
1281 | if (attr_mask & IB_QP_TIMEOUT) { | 1259 | if (attr_mask & IB_QP_TIMEOUT) { |
1282 | qp->timeout = attr->timeout; | 1260 | qp->timeout = attr->timeout; |
1283 | qp->timeout_jiffies = | 1261 | qp->timeout_jiffies = rvt_timeout_to_jiffies(qp->timeout); |
1284 | usecs_to_jiffies((4096UL * (1UL << qp->timeout)) / | ||
1285 | 1000UL); | ||
1286 | } | 1262 | } |
1287 | 1263 | ||
1288 | if (attr_mask & IB_QP_QKEY) | 1264 | if (attr_mask & IB_QP_QKEY) |
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c index c3a140ed4df2..08f3f90d2912 100644 --- a/drivers/infiniband/sw/rxe/rxe_net.c +++ b/drivers/infiniband/sw/rxe/rxe_net.c | |||
@@ -441,6 +441,8 @@ static void rxe_skb_tx_dtor(struct sk_buff *skb) | |||
441 | if (unlikely(qp->need_req_skb && | 441 | if (unlikely(qp->need_req_skb && |
442 | skb_out < RXE_INFLIGHT_SKBS_PER_QP_LOW)) | 442 | skb_out < RXE_INFLIGHT_SKBS_PER_QP_LOW)) |
443 | rxe_run_task(&qp->req.task, 1); | 443 | rxe_run_task(&qp->req.task, 1); |
444 | |||
445 | rxe_drop_ref(qp); | ||
444 | } | 446 | } |
445 | 447 | ||
446 | int rxe_send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, struct sk_buff *skb) | 448 | int rxe_send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, struct sk_buff *skb) |
@@ -473,6 +475,7 @@ int rxe_send(struct rxe_dev *rxe, struct rxe_pkt_info *pkt, struct sk_buff *skb) | |||
473 | return -EAGAIN; | 475 | return -EAGAIN; |
474 | } | 476 | } |
475 | 477 | ||
478 | rxe_add_ref(pkt->qp); | ||
476 | atomic_inc(&pkt->qp->skb_out); | 479 | atomic_inc(&pkt->qp->skb_out); |
477 | kfree_skb(skb); | 480 | kfree_skb(skb); |
478 | 481 | ||
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index be944d5aa9af..a958ee918a49 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c | |||
@@ -1219,6 +1219,9 @@ void rxe_drain_req_pkts(struct rxe_qp *qp, bool notify) | |||
1219 | kfree_skb(skb); | 1219 | kfree_skb(skb); |
1220 | } | 1220 | } |
1221 | 1221 | ||
1222 | if (notify) | ||
1223 | return; | ||
1224 | |||
1222 | while (!qp->srq && qp->rq.queue && queue_head(qp->rq.queue)) | 1225 | while (!qp->srq && qp->rq.queue && queue_head(qp->rq.queue)) |
1223 | advance_consumer(qp->rq.queue); | 1226 | advance_consumer(qp->rq.queue); |
1224 | } | 1227 | } |
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c index 073e66783f1d..af90a7d42b96 100644 --- a/drivers/infiniband/sw/rxe/rxe_verbs.c +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c | |||
@@ -914,6 +914,9 @@ static int rxe_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr, | |||
914 | 914 | ||
915 | spin_unlock_irqrestore(&rq->producer_lock, flags); | 915 | spin_unlock_irqrestore(&rq->producer_lock, flags); |
916 | 916 | ||
917 | if (qp->resp.state == QP_STATE_ERROR) | ||
918 | rxe_run_task(&qp->resp.task, 1); | ||
919 | |||
917 | err1: | 920 | err1: |
918 | return err; | 921 | return err; |
919 | } | 922 | } |
@@ -1240,6 +1243,8 @@ int rxe_register_device(struct rxe_dev *rxe) | |||
1240 | addrconf_addr_eui48((unsigned char *)&dev->node_guid, | 1243 | addrconf_addr_eui48((unsigned char *)&dev->node_guid, |
1241 | rxe->ndev->dev_addr); | 1244 | rxe->ndev->dev_addr); |
1242 | dev->dev.dma_ops = &dma_virt_ops; | 1245 | dev->dev.dma_ops = &dma_virt_ops; |
1246 | dma_coerce_mask_and_coherent(&dev->dev, | ||
1247 | dma_get_required_mask(dev->dev.parent)); | ||
1243 | 1248 | ||
1244 | dev->uverbs_abi_ver = RXE_UVERBS_ABI_VERSION; | 1249 | dev->uverbs_abi_ver = RXE_UVERBS_ABI_VERSION; |
1245 | dev->uverbs_cmd_mask = BIT_ULL(IB_USER_VERBS_CMD_GET_CONTEXT) | 1250 | dev->uverbs_cmd_mask = BIT_ULL(IB_USER_VERBS_CMD_GET_CONTEXT) |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 7cbcfdac6529..f87d104837dc 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/vmalloc.h> | 39 | #include <linux/vmalloc.h> |
40 | #include <linux/moduleparam.h> | 40 | #include <linux/moduleparam.h> |
41 | #include <linux/sched/signal.h> | 41 | #include <linux/sched/signal.h> |
42 | #include <linux/sched/mm.h> | ||
42 | 43 | ||
43 | #include "ipoib.h" | 44 | #include "ipoib.h" |
44 | 45 | ||
@@ -954,7 +955,7 @@ void ipoib_cm_dev_stop(struct net_device *dev) | |||
954 | break; | 955 | break; |
955 | } | 956 | } |
956 | spin_unlock_irq(&priv->lock); | 957 | spin_unlock_irq(&priv->lock); |
957 | msleep(1); | 958 | usleep_range(1000, 2000); |
958 | ipoib_drain_cq(dev); | 959 | ipoib_drain_cq(dev); |
959 | spin_lock_irq(&priv->lock); | 960 | spin_lock_irq(&priv->lock); |
960 | } | 961 | } |
@@ -1047,9 +1048,8 @@ static struct ib_qp *ipoib_cm_create_tx_qp(struct net_device *dev, struct ipoib_ | |||
1047 | .sq_sig_type = IB_SIGNAL_ALL_WR, | 1048 | .sq_sig_type = IB_SIGNAL_ALL_WR, |
1048 | .qp_type = IB_QPT_RC, | 1049 | .qp_type = IB_QPT_RC, |
1049 | .qp_context = tx, | 1050 | .qp_context = tx, |
1050 | .create_flags = IB_QP_CREATE_USE_GFP_NOIO | 1051 | .create_flags = 0 |
1051 | }; | 1052 | }; |
1052 | |||
1053 | struct ib_qp *tx_qp; | 1053 | struct ib_qp *tx_qp; |
1054 | 1054 | ||
1055 | if (dev->features & NETIF_F_SG) | 1055 | if (dev->features & NETIF_F_SG) |
@@ -1057,10 +1057,6 @@ static struct ib_qp *ipoib_cm_create_tx_qp(struct net_device *dev, struct ipoib_ | |||
1057 | min_t(u32, priv->ca->attrs.max_sge, MAX_SKB_FRAGS + 1); | 1057 | min_t(u32, priv->ca->attrs.max_sge, MAX_SKB_FRAGS + 1); |
1058 | 1058 | ||
1059 | tx_qp = ib_create_qp(priv->pd, &attr); | 1059 | tx_qp = ib_create_qp(priv->pd, &attr); |
1060 | if (PTR_ERR(tx_qp) == -EINVAL) { | ||
1061 | attr.create_flags &= ~IB_QP_CREATE_USE_GFP_NOIO; | ||
1062 | tx_qp = ib_create_qp(priv->pd, &attr); | ||
1063 | } | ||
1064 | tx->max_send_sge = attr.cap.max_send_sge; | 1060 | tx->max_send_sge = attr.cap.max_send_sge; |
1065 | return tx_qp; | 1061 | return tx_qp; |
1066 | } | 1062 | } |
@@ -1131,10 +1127,11 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn, | |||
1131 | struct sa_path_rec *pathrec) | 1127 | struct sa_path_rec *pathrec) |
1132 | { | 1128 | { |
1133 | struct ipoib_dev_priv *priv = ipoib_priv(p->dev); | 1129 | struct ipoib_dev_priv *priv = ipoib_priv(p->dev); |
1130 | unsigned int noio_flag; | ||
1134 | int ret; | 1131 | int ret; |
1135 | 1132 | ||
1136 | p->tx_ring = __vmalloc(ipoib_sendq_size * sizeof *p->tx_ring, | 1133 | noio_flag = memalloc_noio_save(); |
1137 | GFP_NOIO, PAGE_KERNEL); | 1134 | p->tx_ring = vzalloc(ipoib_sendq_size * sizeof(*p->tx_ring)); |
1138 | if (!p->tx_ring) { | 1135 | if (!p->tx_ring) { |
1139 | ret = -ENOMEM; | 1136 | ret = -ENOMEM; |
1140 | goto err_tx; | 1137 | goto err_tx; |
@@ -1142,9 +1139,10 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn, | |||
1142 | memset(p->tx_ring, 0, ipoib_sendq_size * sizeof *p->tx_ring); | 1139 | memset(p->tx_ring, 0, ipoib_sendq_size * sizeof *p->tx_ring); |
1143 | 1140 | ||
1144 | p->qp = ipoib_cm_create_tx_qp(p->dev, p); | 1141 | p->qp = ipoib_cm_create_tx_qp(p->dev, p); |
1142 | memalloc_noio_restore(noio_flag); | ||
1145 | if (IS_ERR(p->qp)) { | 1143 | if (IS_ERR(p->qp)) { |
1146 | ret = PTR_ERR(p->qp); | 1144 | ret = PTR_ERR(p->qp); |
1147 | ipoib_warn(priv, "failed to allocate tx qp: %d\n", ret); | 1145 | ipoib_warn(priv, "failed to create tx qp: %d\n", ret); |
1148 | goto err_qp; | 1146 | goto err_qp; |
1149 | } | 1147 | } |
1150 | 1148 | ||
@@ -1206,7 +1204,7 @@ static void ipoib_cm_tx_destroy(struct ipoib_cm_tx *p) | |||
1206 | goto timeout; | 1204 | goto timeout; |
1207 | } | 1205 | } |
1208 | 1206 | ||
1209 | msleep(1); | 1207 | usleep_range(1000, 2000); |
1210 | } | 1208 | } |
1211 | } | 1209 | } |
1212 | 1210 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index efe7402f4885..57a9655e844d 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -770,7 +770,7 @@ int ipoib_ib_dev_stop_default(struct net_device *dev) | |||
770 | 770 | ||
771 | ipoib_drain_cq(dev); | 771 | ipoib_drain_cq(dev); |
772 | 772 | ||
773 | msleep(1); | 773 | usleep_range(1000, 2000); |
774 | } | 774 | } |
775 | 775 | ||
776 | ipoib_dbg(priv, "All sends and receives done.\n"); | 776 | ipoib_dbg(priv, "All sends and receives done.\n"); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 6e86eeee370e..4ce315c92b48 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -233,6 +233,7 @@ static netdev_features_t ipoib_fix_features(struct net_device *dev, netdev_featu | |||
233 | static int ipoib_change_mtu(struct net_device *dev, int new_mtu) | 233 | static int ipoib_change_mtu(struct net_device *dev, int new_mtu) |
234 | { | 234 | { |
235 | struct ipoib_dev_priv *priv = ipoib_priv(dev); | 235 | struct ipoib_dev_priv *priv = ipoib_priv(dev); |
236 | int ret = 0; | ||
236 | 237 | ||
237 | /* dev->mtu > 2K ==> connected mode */ | 238 | /* dev->mtu > 2K ==> connected mode */ |
238 | if (ipoib_cm_admin_enabled(dev)) { | 239 | if (ipoib_cm_admin_enabled(dev)) { |
@@ -256,9 +257,34 @@ static int ipoib_change_mtu(struct net_device *dev, int new_mtu) | |||
256 | ipoib_dbg(priv, "MTU must be smaller than the underlying " | 257 | ipoib_dbg(priv, "MTU must be smaller than the underlying " |
257 | "link layer MTU - 4 (%u)\n", priv->mcast_mtu); | 258 | "link layer MTU - 4 (%u)\n", priv->mcast_mtu); |
258 | 259 | ||
259 | dev->mtu = min(priv->mcast_mtu, priv->admin_mtu); | 260 | new_mtu = min(priv->mcast_mtu, priv->admin_mtu); |
260 | 261 | ||
261 | return 0; | 262 | if (priv->rn_ops->ndo_change_mtu) { |
263 | bool carrier_status = netif_carrier_ok(dev); | ||
264 | |||
265 | netif_carrier_off(dev); | ||
266 | |||
267 | /* notify lower level on the real mtu */ | ||
268 | ret = priv->rn_ops->ndo_change_mtu(dev, new_mtu); | ||
269 | |||
270 | if (carrier_status) | ||
271 | netif_carrier_on(dev); | ||
272 | } else { | ||
273 | dev->mtu = new_mtu; | ||
274 | } | ||
275 | |||
276 | return ret; | ||
277 | } | ||
278 | |||
279 | static void ipoib_get_stats(struct net_device *dev, | ||
280 | struct rtnl_link_stats64 *stats) | ||
281 | { | ||
282 | struct ipoib_dev_priv *priv = ipoib_priv(dev); | ||
283 | |||
284 | if (priv->rn_ops->ndo_get_stats64) | ||
285 | priv->rn_ops->ndo_get_stats64(dev, stats); | ||
286 | else | ||
287 | netdev_stats_to_stats64(stats, &dev->stats); | ||
262 | } | 288 | } |
263 | 289 | ||
264 | /* Called with an RCU read lock taken */ | 290 | /* Called with an RCU read lock taken */ |
@@ -1808,6 +1834,7 @@ static const struct net_device_ops ipoib_netdev_ops_pf = { | |||
1808 | .ndo_get_vf_stats = ipoib_get_vf_stats, | 1834 | .ndo_get_vf_stats = ipoib_get_vf_stats, |
1809 | .ndo_set_vf_guid = ipoib_set_vf_guid, | 1835 | .ndo_set_vf_guid = ipoib_set_vf_guid, |
1810 | .ndo_set_mac_address = ipoib_set_mac, | 1836 | .ndo_set_mac_address = ipoib_set_mac, |
1837 | .ndo_get_stats64 = ipoib_get_stats, | ||
1811 | }; | 1838 | }; |
1812 | 1839 | ||
1813 | static const struct net_device_ops ipoib_netdev_ops_vf = { | 1840 | static const struct net_device_ops ipoib_netdev_ops_vf = { |
@@ -2212,6 +2239,7 @@ static struct net_device *ipoib_add_port(const char *format, | |||
2212 | goto register_failed; | 2239 | goto register_failed; |
2213 | } | 2240 | } |
2214 | 2241 | ||
2242 | result = -ENOMEM; | ||
2215 | if (ipoib_cm_add_mode_attr(priv->dev)) | 2243 | if (ipoib_cm_add_mode_attr(priv->dev)) |
2216 | goto sysfs_failed; | 2244 | goto sysfs_failed; |
2217 | if (ipoib_add_pkey_attr(priv->dev)) | 2245 | if (ipoib_add_pkey_attr(priv->dev)) |
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 5a887efb4bdf..37b33d708c2d 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -83,6 +83,7 @@ static struct scsi_host_template iscsi_iser_sht; | |||
83 | static struct iscsi_transport iscsi_iser_transport; | 83 | static struct iscsi_transport iscsi_iser_transport; |
84 | static struct scsi_transport_template *iscsi_iser_scsi_transport; | 84 | static struct scsi_transport_template *iscsi_iser_scsi_transport; |
85 | static struct workqueue_struct *release_wq; | 85 | static struct workqueue_struct *release_wq; |
86 | static DEFINE_MUTEX(unbind_iser_conn_mutex); | ||
86 | struct iser_global ig; | 87 | struct iser_global ig; |
87 | 88 | ||
88 | int iser_debug_level = 0; | 89 | int iser_debug_level = 0; |
@@ -550,12 +551,14 @@ iscsi_iser_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) | |||
550 | */ | 551 | */ |
551 | if (iser_conn) { | 552 | if (iser_conn) { |
552 | mutex_lock(&iser_conn->state_mutex); | 553 | mutex_lock(&iser_conn->state_mutex); |
554 | mutex_lock(&unbind_iser_conn_mutex); | ||
553 | iser_conn_terminate(iser_conn); | 555 | iser_conn_terminate(iser_conn); |
554 | iscsi_conn_stop(cls_conn, flag); | 556 | iscsi_conn_stop(cls_conn, flag); |
555 | 557 | ||
556 | /* unbind */ | 558 | /* unbind */ |
557 | iser_conn->iscsi_conn = NULL; | 559 | iser_conn->iscsi_conn = NULL; |
558 | conn->dd_data = NULL; | 560 | conn->dd_data = NULL; |
561 | mutex_unlock(&unbind_iser_conn_mutex); | ||
559 | 562 | ||
560 | complete(&iser_conn->stop_completion); | 563 | complete(&iser_conn->stop_completion); |
561 | mutex_unlock(&iser_conn->state_mutex); | 564 | mutex_unlock(&iser_conn->state_mutex); |
@@ -977,13 +980,21 @@ static int iscsi_iser_slave_alloc(struct scsi_device *sdev) | |||
977 | struct iser_conn *iser_conn; | 980 | struct iser_conn *iser_conn; |
978 | struct ib_device *ib_dev; | 981 | struct ib_device *ib_dev; |
979 | 982 | ||
983 | mutex_lock(&unbind_iser_conn_mutex); | ||
984 | |||
980 | session = starget_to_session(scsi_target(sdev))->dd_data; | 985 | session = starget_to_session(scsi_target(sdev))->dd_data; |
981 | iser_conn = session->leadconn->dd_data; | 986 | iser_conn = session->leadconn->dd_data; |
987 | if (!iser_conn) { | ||
988 | mutex_unlock(&unbind_iser_conn_mutex); | ||
989 | return -ENOTCONN; | ||
990 | } | ||
982 | ib_dev = iser_conn->ib_conn.device->ib_device; | 991 | ib_dev = iser_conn->ib_conn.device->ib_device; |
983 | 992 | ||
984 | if (!(ib_dev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG)) | 993 | if (!(ib_dev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG)) |
985 | blk_queue_virt_boundary(sdev->request_queue, ~MASK_4K); | 994 | blk_queue_virt_boundary(sdev->request_queue, ~MASK_4K); |
986 | 995 | ||
996 | mutex_unlock(&unbind_iser_conn_mutex); | ||
997 | |||
987 | return 0; | 998 | return 0; |
988 | } | 999 | } |
989 | 1000 | ||
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 12ed62ce9ff7..2a07692007bd 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c | |||
@@ -137,8 +137,10 @@ iser_prepare_write_cmd(struct iscsi_task *task, | |||
137 | 137 | ||
138 | if (unsol_sz < edtl) { | 138 | if (unsol_sz < edtl) { |
139 | hdr->flags |= ISER_WSV; | 139 | hdr->flags |= ISER_WSV; |
140 | hdr->write_stag = cpu_to_be32(mem_reg->rkey); | 140 | if (buf_out->data_len > imm_sz) { |
141 | hdr->write_va = cpu_to_be64(mem_reg->sge.addr + unsol_sz); | 141 | hdr->write_stag = cpu_to_be32(mem_reg->rkey); |
142 | hdr->write_va = cpu_to_be64(mem_reg->sge.addr + unsol_sz); | ||
143 | } | ||
142 | 144 | ||
143 | iser_dbg("Cmd itt:%d, WRITE tags, RKEY:%#.4X " | 145 | iser_dbg("Cmd itt:%d, WRITE tags, RKEY:%#.4X " |
144 | "VA:%#llX + unsol:%d\n", | 146 | "VA:%#llX + unsol:%d\n", |
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index c538a38c91ce..26a004e97ae0 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c | |||
@@ -708,8 +708,14 @@ iser_calc_scsi_params(struct iser_conn *iser_conn, | |||
708 | unsigned short sg_tablesize, sup_sg_tablesize; | 708 | unsigned short sg_tablesize, sup_sg_tablesize; |
709 | 709 | ||
710 | sg_tablesize = DIV_ROUND_UP(max_sectors * 512, SIZE_4K); | 710 | sg_tablesize = DIV_ROUND_UP(max_sectors * 512, SIZE_4K); |
711 | sup_sg_tablesize = min_t(unsigned, ISCSI_ISER_MAX_SG_TABLESIZE, | 711 | if (device->ib_device->attrs.device_cap_flags & |
712 | device->ib_device->attrs.max_fast_reg_page_list_len); | 712 | IB_DEVICE_MEM_MGT_EXTENSIONS) |
713 | sup_sg_tablesize = | ||
714 | min_t( | ||
715 | uint, ISCSI_ISER_MAX_SG_TABLESIZE, | ||
716 | device->ib_device->attrs.max_fast_reg_page_list_len); | ||
717 | else | ||
718 | sup_sg_tablesize = ISCSI_ISER_MAX_SG_TABLESIZE; | ||
713 | 719 | ||
714 | iser_conn->scsi_sg_tablesize = min(sg_tablesize, sup_sg_tablesize); | 720 | iser_conn->scsi_sg_tablesize = min(sg_tablesize, sup_sg_tablesize); |
715 | } | 721 | } |
diff --git a/drivers/irqchip/irq-digicolor.c b/drivers/irqchip/irq-digicolor.c index dad85e74c37c..3aae015469a5 100644 --- a/drivers/irqchip/irq-digicolor.c +++ b/drivers/irqchip/irq-digicolor.c | |||
@@ -71,7 +71,7 @@ static void __init digicolor_set_gc(void __iomem *reg_base, unsigned irq_base, | |||
71 | static int __init digicolor_of_init(struct device_node *node, | 71 | static int __init digicolor_of_init(struct device_node *node, |
72 | struct device_node *parent) | 72 | struct device_node *parent) |
73 | { | 73 | { |
74 | static void __iomem *reg_base; | 74 | void __iomem *reg_base; |
75 | unsigned int clr = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; | 75 | unsigned int clr = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; |
76 | struct regmap *ucregs; | 76 | struct regmap *ucregs; |
77 | int ret; | 77 | int ret; |
diff --git a/drivers/irqchip/irq-gic-realview.c b/drivers/irqchip/irq-gic-realview.c index 54c296401525..18d58d2b4ffe 100644 --- a/drivers/irqchip/irq-gic-realview.c +++ b/drivers/irqchip/irq-gic-realview.c | |||
@@ -43,7 +43,7 @@ static const struct of_device_id syscon_pldset_of_match[] = { | |||
43 | static int __init | 43 | static int __init |
44 | realview_gic_of_init(struct device_node *node, struct device_node *parent) | 44 | realview_gic_of_init(struct device_node *node, struct device_node *parent) |
45 | { | 45 | { |
46 | static struct regmap *map; | 46 | struct regmap *map; |
47 | struct device_node *np; | 47 | struct device_node *np; |
48 | const struct of_device_id *gic_id; | 48 | const struct of_device_id *gic_id; |
49 | u32 pld1_ctrl; | 49 | u32 pld1_ctrl; |
diff --git a/drivers/irqchip/irq-mips-cpu.c b/drivers/irqchip/irq-mips-cpu.c index 0a8ed1c05518..14461cbfab2f 100644 --- a/drivers/irqchip/irq-mips-cpu.c +++ b/drivers/irqchip/irq-mips-cpu.c | |||
@@ -154,7 +154,7 @@ asmlinkage void __weak plat_irq_dispatch(void) | |||
154 | static int mips_cpu_intc_map(struct irq_domain *d, unsigned int irq, | 154 | static int mips_cpu_intc_map(struct irq_domain *d, unsigned int irq, |
155 | irq_hw_number_t hw) | 155 | irq_hw_number_t hw) |
156 | { | 156 | { |
157 | static struct irq_chip *chip; | 157 | struct irq_chip *chip; |
158 | 158 | ||
159 | if (hw < 2 && cpu_has_mipsmt) { | 159 | if (hw < 2 && cpu_has_mipsmt) { |
160 | /* Software interrupts are used for MT/CMT IPI */ | 160 | /* Software interrupts are used for MT/CMT IPI */ |
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index 832ebf4062f7..6ab1d3afec02 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c | |||
@@ -950,7 +950,6 @@ static void __init __gic_init(unsigned long gic_base_addr, | |||
950 | &gic_irq_domain_ops, NULL); | 950 | &gic_irq_domain_ops, NULL); |
951 | if (!gic_irq_domain) | 951 | if (!gic_irq_domain) |
952 | panic("Failed to add GIC IRQ domain"); | 952 | panic("Failed to add GIC IRQ domain"); |
953 | gic_irq_domain->name = "mips-gic-irq"; | ||
954 | 953 | ||
955 | gic_ipi_domain = irq_domain_add_hierarchy(gic_irq_domain, | 954 | gic_ipi_domain = irq_domain_add_hierarchy(gic_irq_domain, |
956 | IRQ_DOMAIN_FLAG_IPI_PER_CPU, | 955 | IRQ_DOMAIN_FLAG_IPI_PER_CPU, |
@@ -959,7 +958,6 @@ static void __init __gic_init(unsigned long gic_base_addr, | |||
959 | if (!gic_ipi_domain) | 958 | if (!gic_ipi_domain) |
960 | panic("Failed to add GIC IPI domain"); | 959 | panic("Failed to add GIC IPI domain"); |
961 | 960 | ||
962 | gic_ipi_domain->name = "mips-gic-ipi"; | ||
963 | irq_domain_update_bus_token(gic_ipi_domain, DOMAIN_BUS_IPI); | 961 | irq_domain_update_bus_token(gic_ipi_domain, DOMAIN_BUS_IPI); |
964 | 962 | ||
965 | if (node && | 963 | if (node && |
diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c index 060d357f107f..6f423bc49d0d 100644 --- a/drivers/isdn/divert/isdn_divert.c +++ b/drivers/isdn/divert/isdn_divert.c | |||
@@ -485,18 +485,19 @@ static int isdn_divert_icall(isdn_ctrl *ic) | |||
485 | cs->deflect_dest[0] = '\0'; | 485 | cs->deflect_dest[0] = '\0'; |
486 | retval = 4; /* only proceed */ | 486 | retval = 4; /* only proceed */ |
487 | } | 487 | } |
488 | sprintf(cs->info, "%d 0x%lx %s %s %s %s 0x%x 0x%x %d %d %s\n", | 488 | snprintf(cs->info, sizeof(cs->info), |
489 | cs->akt_state, | 489 | "%d 0x%lx %s %s %s %s 0x%x 0x%x %d %d %s\n", |
490 | cs->divert_id, | 490 | cs->akt_state, |
491 | divert_if.drv_to_name(cs->ics.driver), | 491 | cs->divert_id, |
492 | (ic->command == ISDN_STAT_ICALLW) ? "1" : "0", | 492 | divert_if.drv_to_name(cs->ics.driver), |
493 | cs->ics.parm.setup.phone, | 493 | (ic->command == ISDN_STAT_ICALLW) ? "1" : "0", |
494 | cs->ics.parm.setup.eazmsn, | 494 | cs->ics.parm.setup.phone, |
495 | cs->ics.parm.setup.si1, | 495 | cs->ics.parm.setup.eazmsn, |
496 | cs->ics.parm.setup.si2, | 496 | cs->ics.parm.setup.si1, |
497 | cs->ics.parm.setup.screen, | 497 | cs->ics.parm.setup.si2, |
498 | dv->rule.waittime, | 498 | cs->ics.parm.setup.screen, |
499 | cs->deflect_dest); | 499 | dv->rule.waittime, |
500 | cs->deflect_dest); | ||
500 | if ((dv->rule.action == DEFLECT_REPORT) || | 501 | if ((dv->rule.action == DEFLECT_REPORT) || |
501 | (dv->rule.action == DEFLECT_REJECT)) { | 502 | (dv->rule.action == DEFLECT_REJECT)) { |
502 | put_info_buffer(cs->info); | 503 | put_info_buffer(cs->info); |
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index 40c7e2cf423b..034cabac699d 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c | |||
@@ -42,7 +42,7 @@ static char *revision = "$Revision: 1.1.2.2 $"; | |||
42 | 42 | ||
43 | static bool suppress_pollack; | 43 | static bool suppress_pollack; |
44 | 44 | ||
45 | static struct pci_device_id c4_pci_tbl[] = { | 45 | static const struct pci_device_id c4_pci_tbl[] = { |
46 | { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C4, 0, 0, (unsigned long)4 }, | 46 | { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C4, 0, 0, (unsigned long)4 }, |
47 | { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C2, 0, 0, (unsigned long)2 }, | 47 | { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C2, 0, 0, (unsigned long)2 }, |
48 | { } /* Terminating entry */ | 48 | { } /* Terminating entry */ |
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index 8b7ad4f1ab01..b2023e08dcd2 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c | |||
@@ -110,7 +110,7 @@ typedef struct _diva_os_thread_dpc { | |||
110 | /* | 110 | /* |
111 | This table should be sorted by PCI device ID | 111 | This table should be sorted by PCI device ID |
112 | */ | 112 | */ |
113 | static struct pci_device_id divas_pci_tbl[] = { | 113 | static const struct pci_device_id divas_pci_tbl[] = { |
114 | /* Diva Server BRI-2M PCI 0xE010 */ | 114 | /* Diva Server BRI-2M PCI 0xE010 */ |
115 | { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRA), | 115 | { PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRA), |
116 | CARDTYPE_MAESTRA_PCI }, | 116 | CARDTYPE_MAESTRA_PCI }, |
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c index e3fa1cd64470..dce6632daae1 100644 --- a/drivers/isdn/hardware/mISDN/avmfritz.c +++ b/drivers/isdn/hardware/mISDN/avmfritz.c | |||
@@ -1142,7 +1142,7 @@ fritz_remove_pci(struct pci_dev *pdev) | |||
1142 | pr_info("%s: drvdata already removed\n", __func__); | 1142 | pr_info("%s: drvdata already removed\n", __func__); |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | static struct pci_device_id fcpci_ids[] = { | 1145 | static const struct pci_device_id fcpci_ids[] = { |
1146 | { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID, | 1146 | { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID, |
1147 | 0, 0, (unsigned long) "Fritz!Card PCI"}, | 1147 | 0, 0, (unsigned long) "Fritz!Card PCI"}, |
1148 | { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID, | 1148 | { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID, |
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index aea0c9616ea5..3cf07b8ced1c 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -5348,7 +5348,7 @@ static const struct hm_map hfcm_map[] = { | |||
5348 | 5348 | ||
5349 | #undef H | 5349 | #undef H |
5350 | #define H(x) ((unsigned long)&hfcm_map[x]) | 5350 | #define H(x) ((unsigned long)&hfcm_map[x]) |
5351 | static struct pci_device_id hfmultipci_ids[] = { | 5351 | static const struct pci_device_id hfmultipci_ids[] = { |
5352 | 5352 | ||
5353 | /* Cards with HFC-4S Chip */ | 5353 | /* Cards with HFC-4S Chip */ |
5354 | { PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD, | 5354 | { PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD, |
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 5dc246d71c16..d2e401a8090e 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
@@ -2161,7 +2161,7 @@ static const struct _hfc_map hfc_map[] = | |||
2161 | {}, | 2161 | {}, |
2162 | }; | 2162 | }; |
2163 | 2163 | ||
2164 | static struct pci_device_id hfc_ids[] = | 2164 | static const struct pci_device_id hfc_ids[] = |
2165 | { | 2165 | { |
2166 | { PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_2BD0), | 2166 | { PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_2BD0), |
2167 | (unsigned long) &hfc_map[0] }, | 2167 | (unsigned long) &hfc_map[0] }, |
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index afde4edef9ae..6a6d848bd18e 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c | |||
@@ -1137,7 +1137,7 @@ static void nj_remove(struct pci_dev *pdev) | |||
1137 | /* We cannot select cards with PCI_SUB... IDs, since here are cards with | 1137 | /* We cannot select cards with PCI_SUB... IDs, since here are cards with |
1138 | * SUB IDs set to PCI_ANY_ID, so we need to match all and reject | 1138 | * SUB IDs set to PCI_ANY_ID, so we need to match all and reject |
1139 | * known other cards which not work with this driver - see probe function */ | 1139 | * known other cards which not work with this driver - see probe function */ |
1140 | static struct pci_device_id nj_pci_ids[] = { | 1140 | static const struct pci_device_id nj_pci_ids[] = { |
1141 | { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300, | 1141 | { PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300, |
1142 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 1142 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
1143 | { } | 1143 | { } |
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c index 3052c836b89f..d80072fef434 100644 --- a/drivers/isdn/hardware/mISDN/w6692.c +++ b/drivers/isdn/hardware/mISDN/w6692.c | |||
@@ -1398,7 +1398,7 @@ w6692_remove_pci(struct pci_dev *pdev) | |||
1398 | pr_notice("%s: drvdata already removed\n", __func__); | 1398 | pr_notice("%s: drvdata already removed\n", __func__); |
1399 | } | 1399 | } |
1400 | 1400 | ||
1401 | static struct pci_device_id w6692_ids[] = { | 1401 | static const struct pci_device_id w6692_ids[] = { |
1402 | { PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH, | 1402 | { PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH, |
1403 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, (ulong)&w6692_map[0]}, | 1403 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, (ulong)&w6692_map[0]}, |
1404 | { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692, | 1404 | { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692, |
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index c7d68675b028..7108bdb8742e 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c | |||
@@ -1909,7 +1909,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if) | |||
1909 | #ifdef CONFIG_PCI | 1909 | #ifdef CONFIG_PCI |
1910 | #include <linux/pci.h> | 1910 | #include <linux/pci.h> |
1911 | 1911 | ||
1912 | static struct pci_device_id hisax_pci_tbl[] __used = { | 1912 | static const struct pci_device_id hisax_pci_tbl[] __used = { |
1913 | #ifdef CONFIG_HISAX_FRITZPCI | 1913 | #ifdef CONFIG_HISAX_FRITZPCI |
1914 | {PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) }, | 1914 | {PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) }, |
1915 | #endif | 1915 | #endif |
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index 90f051ce0259..9090cc1e1f29 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c | |||
@@ -86,7 +86,7 @@ typedef struct { | |||
86 | char *device_name; | 86 | char *device_name; |
87 | } hfc4s8s_param; | 87 | } hfc4s8s_param; |
88 | 88 | ||
89 | static struct pci_device_id hfc4s8s_ids[] = { | 89 | static const struct pci_device_id hfc4s8s_ids[] = { |
90 | {.vendor = PCI_VENDOR_ID_CCD, | 90 | {.vendor = PCI_VENDOR_ID_CCD, |
91 | .device = PCI_DEVICE_ID_4S, | 91 | .device = PCI_DEVICE_ID_4S, |
92 | .subvendor = 0x1397, | 92 | .subvendor = 0x1397, |
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index 5a9f39ed1d5d..e4f7573ba9bf 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c | |||
@@ -52,7 +52,7 @@ module_param(debug, int, 0); | |||
52 | MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Karsten Keil <kkeil@suse.de>"); | 52 | MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Karsten Keil <kkeil@suse.de>"); |
53 | MODULE_DESCRIPTION("AVM Fritz!PCI/PnP ISDN driver"); | 53 | MODULE_DESCRIPTION("AVM Fritz!PCI/PnP ISDN driver"); |
54 | 54 | ||
55 | static struct pci_device_id fcpci_ids[] = { | 55 | static const struct pci_device_id fcpci_ids[] = { |
56 | { .vendor = PCI_VENDOR_ID_AVM, | 56 | { .vendor = PCI_VENDOR_ID_AVM, |
57 | .device = PCI_DEVICE_ID_AVM_A1, | 57 | .device = PCI_DEVICE_ID_AVM_A1, |
58 | .subvendor = PCI_ANY_ID, | 58 | .subvendor = PCI_ANY_ID, |
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index f4eace5ea184..40f3cd7eab0f 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -156,7 +156,8 @@ static int read_sb_page(struct mddev *mddev, loff_t offset, | |||
156 | 156 | ||
157 | rdev_for_each(rdev, mddev) { | 157 | rdev_for_each(rdev, mddev) { |
158 | if (! test_bit(In_sync, &rdev->flags) | 158 | if (! test_bit(In_sync, &rdev->flags) |
159 | || test_bit(Faulty, &rdev->flags)) | 159 | || test_bit(Faulty, &rdev->flags) |
160 | || test_bit(Bitmap_sync, &rdev->flags)) | ||
160 | continue; | 161 | continue; |
161 | 162 | ||
162 | target = offset + index * (PAGE_SIZE/512); | 163 | target = offset + index * (PAGE_SIZE/512); |
diff --git a/drivers/md/md.h b/drivers/md/md.h index 991f0fe2dcc6..b50eb4ac1b82 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -134,7 +134,9 @@ enum flag_bits { | |||
134 | Faulty, /* device is known to have a fault */ | 134 | Faulty, /* device is known to have a fault */ |
135 | In_sync, /* device is in_sync with rest of array */ | 135 | In_sync, /* device is in_sync with rest of array */ |
136 | Bitmap_sync, /* ..actually, not quite In_sync. Need a | 136 | Bitmap_sync, /* ..actually, not quite In_sync. Need a |
137 | * bitmap-based recovery to get fully in sync | 137 | * bitmap-based recovery to get fully in sync. |
138 | * The bit is only meaningful before device | ||
139 | * has been passed to pers->hot_add_disk. | ||
138 | */ | 140 | */ |
139 | WriteMostly, /* Avoid reading if at all possible */ | 141 | WriteMostly, /* Avoid reading if at all possible */ |
140 | AutoDetected, /* added by auto-detect */ | 142 | AutoDetected, /* added by auto-detect */ |
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c index 77cce3573aa8..44ad5baf3206 100644 --- a/drivers/md/raid5-ppl.c +++ b/drivers/md/raid5-ppl.c | |||
@@ -1150,7 +1150,7 @@ int ppl_init_log(struct r5conf *conf) | |||
1150 | goto err; | 1150 | goto err; |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | ppl_conf->bs = bioset_create(conf->raid_disks, 0, 0); | 1153 | ppl_conf->bs = bioset_create(conf->raid_disks, 0, BIOSET_NEED_BVECS); |
1154 | if (!ppl_conf->bs) { | 1154 | if (!ppl_conf->bs) { |
1155 | ret = -ENOMEM; | 1155 | ret = -ENOMEM; |
1156 | goto err; | 1156 | goto err; |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 2ceb338b094b..aeeb8d6854e2 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -7951,12 +7951,10 @@ static void end_reshape(struct r5conf *conf) | |||
7951 | { | 7951 | { |
7952 | 7952 | ||
7953 | if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { | 7953 | if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { |
7954 | struct md_rdev *rdev; | ||
7955 | 7954 | ||
7956 | spin_lock_irq(&conf->device_lock); | 7955 | spin_lock_irq(&conf->device_lock); |
7957 | conf->previous_raid_disks = conf->raid_disks; | 7956 | conf->previous_raid_disks = conf->raid_disks; |
7958 | rdev_for_each(rdev, conf->mddev) | 7957 | md_finish_reshape(conf->mddev); |
7959 | rdev->data_offset = rdev->new_data_offset; | ||
7960 | smp_wmb(); | 7958 | smp_wmb(); |
7961 | conf->reshape_progress = MaxSector; | 7959 | conf->reshape_progress = MaxSector; |
7962 | conf->mddev->reshape_position = MaxSector; | 7960 | conf->mddev->reshape_position = MaxSector; |
diff --git a/drivers/mux/Kconfig b/drivers/mux/Kconfig index 7c754a0f14bb..19e4e904c9bf 100644 --- a/drivers/mux/Kconfig +++ b/drivers/mux/Kconfig | |||
@@ -2,20 +2,11 @@ | |||
2 | # Multiplexer devices | 2 | # Multiplexer devices |
3 | # | 3 | # |
4 | 4 | ||
5 | menuconfig MULTIPLEXER | 5 | config MULTIPLEXER |
6 | tristate "Multiplexer subsystem" | 6 | tristate |
7 | help | ||
8 | Multiplexer controller subsystem. Multiplexers are used in a | ||
9 | variety of settings, and this subsystem abstracts their use | ||
10 | so that the rest of the kernel sees a common interface. When | ||
11 | multiple parallel multiplexers are controlled by one single | ||
12 | multiplexer controller, this subsystem also coordinates the | ||
13 | multiplexer accesses. | ||
14 | |||
15 | To compile the subsystem as a module, choose M here: the module will | ||
16 | be called mux-core. | ||
17 | 7 | ||
18 | if MULTIPLEXER | 8 | menu "Multiplexer drivers" |
9 | depends on MULTIPLEXER | ||
19 | 10 | ||
20 | config MUX_ADG792A | 11 | config MUX_ADG792A |
21 | tristate "Analog Devices ADG792A/ADG792G Multiplexers" | 12 | tristate "Analog Devices ADG792A/ADG792G Multiplexers" |
@@ -56,4 +47,4 @@ config MUX_MMIO | |||
56 | To compile the driver as a module, choose M here: the module will | 47 | To compile the driver as a module, choose M here: the module will |
57 | be called mux-mmio. | 48 | be called mux-mmio. |
58 | 49 | ||
59 | endif | 50 | endmenu |
diff --git a/drivers/mux/mux-core.c b/drivers/mux/mux-core.c index 90b8995f07cb..2fe96c470112 100644 --- a/drivers/mux/mux-core.c +++ b/drivers/mux/mux-core.c | |||
@@ -46,7 +46,7 @@ static int __init mux_init(void) | |||
46 | 46 | ||
47 | static void __exit mux_exit(void) | 47 | static void __exit mux_exit(void) |
48 | { | 48 | { |
49 | class_register(&mux_class); | 49 | class_unregister(&mux_class); |
50 | ida_destroy(&mux_ida); | 50 | ida_destroy(&mux_ida); |
51 | } | 51 | } |
52 | 52 | ||
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 14ff622190a5..181839d6fbea 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -4596,7 +4596,7 @@ static int bond_check_params(struct bond_params *params) | |||
4596 | } | 4596 | } |
4597 | ad_user_port_key = valptr->value; | 4597 | ad_user_port_key = valptr->value; |
4598 | 4598 | ||
4599 | if (bond_mode == BOND_MODE_TLB) { | 4599 | if ((bond_mode == BOND_MODE_TLB) || (bond_mode == BOND_MODE_ALB)) { |
4600 | bond_opt_initstr(&newval, "default"); | 4600 | bond_opt_initstr(&newval, "default"); |
4601 | valptr = bond_opt_parse(bond_opt_get(BOND_OPT_TLB_DYNAMIC_LB), | 4601 | valptr = bond_opt_parse(bond_opt_get(BOND_OPT_TLB_DYNAMIC_LB), |
4602 | &newval); | 4602 | &newval); |
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index e68d368e20ac..7f36d3e3c98b 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c | |||
@@ -1665,6 +1665,7 @@ static const struct b53_chip_data b53_switch_chips[] = { | |||
1665 | .dev_name = "BCM53125", | 1665 | .dev_name = "BCM53125", |
1666 | .vlans = 4096, | 1666 | .vlans = 4096, |
1667 | .enabled_ports = 0xff, | 1667 | .enabled_ports = 0xff, |
1668 | .arl_entries = 4, | ||
1668 | .cpu_port = B53_CPU_PORT, | 1669 | .cpu_port = B53_CPU_PORT, |
1669 | .vta_regs = B53_VTA_REGS, | 1670 | .vta_regs = B53_VTA_REGS, |
1670 | .duplex_reg = B53_DUPLEX_STAT_GE, | 1671 | .duplex_reg = B53_DUPLEX_STAT_GE, |
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 53b088166c28..5bcdd33101b0 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c | |||
@@ -3178,6 +3178,7 @@ static const struct mv88e6xxx_ops mv88e6390x_ops = { | |||
3178 | .port_set_jumbo_size = mv88e6165_port_set_jumbo_size, | 3178 | .port_set_jumbo_size = mv88e6165_port_set_jumbo_size, |
3179 | .port_egress_rate_limiting = mv88e6097_port_egress_rate_limiting, | 3179 | .port_egress_rate_limiting = mv88e6097_port_egress_rate_limiting, |
3180 | .port_pause_limit = mv88e6390_port_pause_limit, | 3180 | .port_pause_limit = mv88e6390_port_pause_limit, |
3181 | .port_set_cmode = mv88e6390x_port_set_cmode, | ||
3181 | .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, | 3182 | .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, |
3182 | .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, | 3183 | .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, |
3183 | .stats_snapshot = mv88e6390_g1_stats_snapshot, | 3184 | .stats_snapshot = mv88e6390_g1_stats_snapshot, |
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c index d3906f6b01bd..86058a9f3417 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c | |||
@@ -1785,16 +1785,18 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) | |||
1785 | 1785 | ||
1786 | xgene_enet_gpiod_get(pdata); | 1786 | xgene_enet_gpiod_get(pdata); |
1787 | 1787 | ||
1788 | pdata->clk = devm_clk_get(&pdev->dev, NULL); | 1788 | if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) { |
1789 | if (IS_ERR(pdata->clk)) { | 1789 | pdata->clk = devm_clk_get(&pdev->dev, NULL); |
1790 | /* Abort if the clock is defined but couldn't be retrived. | 1790 | if (IS_ERR(pdata->clk)) { |
1791 | * Always abort if the clock is missing on DT system as | 1791 | /* Abort if the clock is defined but couldn't be |
1792 | * the driver can't cope with this case. | 1792 | * retrived. Always abort if the clock is missing on |
1793 | */ | 1793 | * DT system as the driver can't cope with this case. |
1794 | if (PTR_ERR(pdata->clk) != -ENOENT || dev->of_node) | 1794 | */ |
1795 | return PTR_ERR(pdata->clk); | 1795 | if (PTR_ERR(pdata->clk) != -ENOENT || dev->of_node) |
1796 | /* Firmware may have set up the clock already. */ | 1796 | return PTR_ERR(pdata->clk); |
1797 | dev_info(dev, "clocks have been setup already\n"); | 1797 | /* Firmware may have set up the clock already. */ |
1798 | dev_info(dev, "clocks have been setup already\n"); | ||
1799 | } | ||
1798 | } | 1800 | } |
1799 | 1801 | ||
1800 | if (pdata->phy_mode != PHY_INTERFACE_MODE_XGMII) | 1802 | if (pdata->phy_mode != PHY_INTERFACE_MODE_XGMII) |
diff --git a/drivers/net/ethernet/broadcom/bgmac-platform.c b/drivers/net/ethernet/broadcom/bgmac-platform.c index 73aca97a96bc..d937083db9a4 100644 --- a/drivers/net/ethernet/broadcom/bgmac-platform.c +++ b/drivers/net/ethernet/broadcom/bgmac-platform.c | |||
@@ -50,11 +50,14 @@ static u32 platform_bgmac_idm_read(struct bgmac *bgmac, u16 offset) | |||
50 | 50 | ||
51 | static void platform_bgmac_idm_write(struct bgmac *bgmac, u16 offset, u32 value) | 51 | static void platform_bgmac_idm_write(struct bgmac *bgmac, u16 offset, u32 value) |
52 | { | 52 | { |
53 | return writel(value, bgmac->plat.idm_base + offset); | 53 | writel(value, bgmac->plat.idm_base + offset); |
54 | } | 54 | } |
55 | 55 | ||
56 | static bool platform_bgmac_clk_enabled(struct bgmac *bgmac) | 56 | static bool platform_bgmac_clk_enabled(struct bgmac *bgmac) |
57 | { | 57 | { |
58 | if (!bgmac->plat.idm_base) | ||
59 | return true; | ||
60 | |||
58 | if ((bgmac_idm_read(bgmac, BCMA_IOCTL) & BGMAC_CLK_EN) != BGMAC_CLK_EN) | 61 | if ((bgmac_idm_read(bgmac, BCMA_IOCTL) & BGMAC_CLK_EN) != BGMAC_CLK_EN) |
59 | return false; | 62 | return false; |
60 | if (bgmac_idm_read(bgmac, BCMA_RESET_CTL) & BCMA_RESET_CTL_RESET) | 63 | if (bgmac_idm_read(bgmac, BCMA_RESET_CTL) & BCMA_RESET_CTL_RESET) |
@@ -66,6 +69,9 @@ static void platform_bgmac_clk_enable(struct bgmac *bgmac, u32 flags) | |||
66 | { | 69 | { |
67 | u32 val; | 70 | u32 val; |
68 | 71 | ||
72 | if (!bgmac->plat.idm_base) | ||
73 | return; | ||
74 | |||
69 | /* The Reset Control register only contains a single bit to show if the | 75 | /* The Reset Control register only contains a single bit to show if the |
70 | * controller is currently in reset. Do a sanity check here, just in | 76 | * controller is currently in reset. Do a sanity check here, just in |
71 | * case the bootloader happened to leave the device in reset. | 77 | * case the bootloader happened to leave the device in reset. |
@@ -180,6 +186,7 @@ static int bgmac_probe(struct platform_device *pdev) | |||
180 | bgmac->feature_flags |= BGMAC_FEAT_CMDCFG_SR_REV4; | 186 | bgmac->feature_flags |= BGMAC_FEAT_CMDCFG_SR_REV4; |
181 | bgmac->feature_flags |= BGMAC_FEAT_TX_MASK_SETUP; | 187 | bgmac->feature_flags |= BGMAC_FEAT_TX_MASK_SETUP; |
182 | bgmac->feature_flags |= BGMAC_FEAT_RX_MASK_SETUP; | 188 | bgmac->feature_flags |= BGMAC_FEAT_RX_MASK_SETUP; |
189 | bgmac->feature_flags |= BGMAC_FEAT_IDM_MASK; | ||
183 | 190 | ||
184 | bgmac->dev = &pdev->dev; | 191 | bgmac->dev = &pdev->dev; |
185 | bgmac->dma_dev = &pdev->dev; | 192 | bgmac->dma_dev = &pdev->dev; |
@@ -207,15 +214,13 @@ static int bgmac_probe(struct platform_device *pdev) | |||
207 | return PTR_ERR(bgmac->plat.base); | 214 | return PTR_ERR(bgmac->plat.base); |
208 | 215 | ||
209 | regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "idm_base"); | 216 | regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "idm_base"); |
210 | if (!regs) { | 217 | if (regs) { |
211 | dev_err(&pdev->dev, "Unable to obtain idm resource\n"); | 218 | bgmac->plat.idm_base = devm_ioremap_resource(&pdev->dev, regs); |
212 | return -EINVAL; | 219 | if (IS_ERR(bgmac->plat.idm_base)) |
220 | return PTR_ERR(bgmac->plat.idm_base); | ||
221 | bgmac->feature_flags &= ~BGMAC_FEAT_IDM_MASK; | ||
213 | } | 222 | } |
214 | 223 | ||
215 | bgmac->plat.idm_base = devm_ioremap_resource(&pdev->dev, regs); | ||
216 | if (IS_ERR(bgmac->plat.idm_base)) | ||
217 | return PTR_ERR(bgmac->plat.idm_base); | ||
218 | |||
219 | regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nicpm_base"); | 224 | regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nicpm_base"); |
220 | if (regs) { | 225 | if (regs) { |
221 | bgmac->plat.nicpm_base = devm_ioremap_resource(&pdev->dev, | 226 | bgmac->plat.nicpm_base = devm_ioremap_resource(&pdev->dev, |
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c index ba4d2e145bb9..48d672b204a4 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c | |||
@@ -622,9 +622,11 @@ static int bgmac_dma_alloc(struct bgmac *bgmac) | |||
622 | BUILD_BUG_ON(BGMAC_MAX_TX_RINGS > ARRAY_SIZE(ring_base)); | 622 | BUILD_BUG_ON(BGMAC_MAX_TX_RINGS > ARRAY_SIZE(ring_base)); |
623 | BUILD_BUG_ON(BGMAC_MAX_RX_RINGS > ARRAY_SIZE(ring_base)); | 623 | BUILD_BUG_ON(BGMAC_MAX_RX_RINGS > ARRAY_SIZE(ring_base)); |
624 | 624 | ||
625 | if (!(bgmac_idm_read(bgmac, BCMA_IOST) & BCMA_IOST_DMA64)) { | 625 | if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) { |
626 | dev_err(bgmac->dev, "Core does not report 64-bit DMA\n"); | 626 | if (!(bgmac_idm_read(bgmac, BCMA_IOST) & BCMA_IOST_DMA64)) { |
627 | return -ENOTSUPP; | 627 | dev_err(bgmac->dev, "Core does not report 64-bit DMA\n"); |
628 | return -ENOTSUPP; | ||
629 | } | ||
628 | } | 630 | } |
629 | 631 | ||
630 | for (i = 0; i < BGMAC_MAX_TX_RINGS; i++) { | 632 | for (i = 0; i < BGMAC_MAX_TX_RINGS; i++) { |
@@ -855,9 +857,11 @@ static void bgmac_mac_speed(struct bgmac *bgmac) | |||
855 | static void bgmac_miiconfig(struct bgmac *bgmac) | 857 | static void bgmac_miiconfig(struct bgmac *bgmac) |
856 | { | 858 | { |
857 | if (bgmac->feature_flags & BGMAC_FEAT_FORCE_SPEED_2500) { | 859 | if (bgmac->feature_flags & BGMAC_FEAT_FORCE_SPEED_2500) { |
858 | bgmac_idm_write(bgmac, BCMA_IOCTL, | 860 | if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) { |
859 | bgmac_idm_read(bgmac, BCMA_IOCTL) | 0x40 | | 861 | bgmac_idm_write(bgmac, BCMA_IOCTL, |
860 | BGMAC_BCMA_IOCTL_SW_CLKEN); | 862 | bgmac_idm_read(bgmac, BCMA_IOCTL) | |
863 | 0x40 | BGMAC_BCMA_IOCTL_SW_CLKEN); | ||
864 | } | ||
861 | bgmac->mac_speed = SPEED_2500; | 865 | bgmac->mac_speed = SPEED_2500; |
862 | bgmac->mac_duplex = DUPLEX_FULL; | 866 | bgmac->mac_duplex = DUPLEX_FULL; |
863 | bgmac_mac_speed(bgmac); | 867 | bgmac_mac_speed(bgmac); |
@@ -874,11 +878,36 @@ static void bgmac_miiconfig(struct bgmac *bgmac) | |||
874 | } | 878 | } |
875 | } | 879 | } |
876 | 880 | ||
881 | static void bgmac_chip_reset_idm_config(struct bgmac *bgmac) | ||
882 | { | ||
883 | u32 iost; | ||
884 | |||
885 | iost = bgmac_idm_read(bgmac, BCMA_IOST); | ||
886 | if (bgmac->feature_flags & BGMAC_FEAT_IOST_ATTACHED) | ||
887 | iost &= ~BGMAC_BCMA_IOST_ATTACHED; | ||
888 | |||
889 | /* 3GMAC: for BCM4707 & BCM47094, only do core reset at bgmac_probe() */ | ||
890 | if (!(bgmac->feature_flags & BGMAC_FEAT_NO_RESET)) { | ||
891 | u32 flags = 0; | ||
892 | |||
893 | if (iost & BGMAC_BCMA_IOST_ATTACHED) { | ||
894 | flags = BGMAC_BCMA_IOCTL_SW_CLKEN; | ||
895 | if (!bgmac->has_robosw) | ||
896 | flags |= BGMAC_BCMA_IOCTL_SW_RESET; | ||
897 | } | ||
898 | bgmac_clk_enable(bgmac, flags); | ||
899 | } | ||
900 | |||
901 | if (iost & BGMAC_BCMA_IOST_ATTACHED && !bgmac->has_robosw) | ||
902 | bgmac_idm_write(bgmac, BCMA_IOCTL, | ||
903 | bgmac_idm_read(bgmac, BCMA_IOCTL) & | ||
904 | ~BGMAC_BCMA_IOCTL_SW_RESET); | ||
905 | } | ||
906 | |||
877 | /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipreset */ | 907 | /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipreset */ |
878 | static void bgmac_chip_reset(struct bgmac *bgmac) | 908 | static void bgmac_chip_reset(struct bgmac *bgmac) |
879 | { | 909 | { |
880 | u32 cmdcfg_sr; | 910 | u32 cmdcfg_sr; |
881 | u32 iost; | ||
882 | int i; | 911 | int i; |
883 | 912 | ||
884 | if (bgmac_clk_enabled(bgmac)) { | 913 | if (bgmac_clk_enabled(bgmac)) { |
@@ -899,20 +928,8 @@ static void bgmac_chip_reset(struct bgmac *bgmac) | |||
899 | /* TODO: Clear software multicast filter list */ | 928 | /* TODO: Clear software multicast filter list */ |
900 | } | 929 | } |
901 | 930 | ||
902 | iost = bgmac_idm_read(bgmac, BCMA_IOST); | 931 | if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) |
903 | if (bgmac->feature_flags & BGMAC_FEAT_IOST_ATTACHED) | 932 | bgmac_chip_reset_idm_config(bgmac); |
904 | iost &= ~BGMAC_BCMA_IOST_ATTACHED; | ||
905 | |||
906 | /* 3GMAC: for BCM4707 & BCM47094, only do core reset at bgmac_probe() */ | ||
907 | if (!(bgmac->feature_flags & BGMAC_FEAT_NO_RESET)) { | ||
908 | u32 flags = 0; | ||
909 | if (iost & BGMAC_BCMA_IOST_ATTACHED) { | ||
910 | flags = BGMAC_BCMA_IOCTL_SW_CLKEN; | ||
911 | if (!bgmac->has_robosw) | ||
912 | flags |= BGMAC_BCMA_IOCTL_SW_RESET; | ||
913 | } | ||
914 | bgmac_clk_enable(bgmac, flags); | ||
915 | } | ||
916 | 933 | ||
917 | /* Request Misc PLL for corerev > 2 */ | 934 | /* Request Misc PLL for corerev > 2 */ |
918 | if (bgmac->feature_flags & BGMAC_FEAT_MISC_PLL_REQ) { | 935 | if (bgmac->feature_flags & BGMAC_FEAT_MISC_PLL_REQ) { |
@@ -970,11 +987,6 @@ static void bgmac_chip_reset(struct bgmac *bgmac) | |||
970 | BGMAC_CHIPCTL_7_IF_TYPE_RGMII); | 987 | BGMAC_CHIPCTL_7_IF_TYPE_RGMII); |
971 | } | 988 | } |
972 | 989 | ||
973 | if (iost & BGMAC_BCMA_IOST_ATTACHED && !bgmac->has_robosw) | ||
974 | bgmac_idm_write(bgmac, BCMA_IOCTL, | ||
975 | bgmac_idm_read(bgmac, BCMA_IOCTL) & | ||
976 | ~BGMAC_BCMA_IOCTL_SW_RESET); | ||
977 | |||
978 | /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/gmac_reset | 990 | /* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/gmac_reset |
979 | * Specs don't say about using BGMAC_CMDCFG_SR, but in this routine | 991 | * Specs don't say about using BGMAC_CMDCFG_SR, but in this routine |
980 | * BGMAC_CMDCFG is read _after_ putting chip in a reset. So it has to | 992 | * BGMAC_CMDCFG is read _after_ putting chip in a reset. So it has to |
@@ -1497,8 +1509,10 @@ int bgmac_enet_probe(struct bgmac *bgmac) | |||
1497 | bgmac_clk_enable(bgmac, 0); | 1509 | bgmac_clk_enable(bgmac, 0); |
1498 | 1510 | ||
1499 | /* This seems to be fixing IRQ by assigning OOB #6 to the core */ | 1511 | /* This seems to be fixing IRQ by assigning OOB #6 to the core */ |
1500 | if (bgmac->feature_flags & BGMAC_FEAT_IRQ_ID_OOB_6) | 1512 | if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) { |
1501 | bgmac_idm_write(bgmac, BCMA_OOB_SEL_OUT_A30, 0x86); | 1513 | if (bgmac->feature_flags & BGMAC_FEAT_IRQ_ID_OOB_6) |
1514 | bgmac_idm_write(bgmac, BCMA_OOB_SEL_OUT_A30, 0x86); | ||
1515 | } | ||
1502 | 1516 | ||
1503 | bgmac_chip_reset(bgmac); | 1517 | bgmac_chip_reset(bgmac); |
1504 | 1518 | ||
diff --git a/drivers/net/ethernet/broadcom/bgmac.h b/drivers/net/ethernet/broadcom/bgmac.h index c1818766c501..443d57b10264 100644 --- a/drivers/net/ethernet/broadcom/bgmac.h +++ b/drivers/net/ethernet/broadcom/bgmac.h | |||
@@ -425,6 +425,7 @@ | |||
425 | #define BGMAC_FEAT_CC4_IF_SW_TYPE BIT(17) | 425 | #define BGMAC_FEAT_CC4_IF_SW_TYPE BIT(17) |
426 | #define BGMAC_FEAT_CC4_IF_SW_TYPE_RGMII BIT(18) | 426 | #define BGMAC_FEAT_CC4_IF_SW_TYPE_RGMII BIT(18) |
427 | #define BGMAC_FEAT_CC7_IF_TYPE_RGMII BIT(19) | 427 | #define BGMAC_FEAT_CC7_IF_TYPE_RGMII BIT(19) |
428 | #define BGMAC_FEAT_IDM_MASK BIT(20) | ||
428 | 429 | ||
429 | struct bgmac_slot_info { | 430 | struct bgmac_slot_info { |
430 | union { | 431 | union { |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 43423744fdfa..1e33abde4a3e 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
@@ -2886,7 +2886,7 @@ static int bnx2x_test_nvram_tbl(struct bnx2x *bp, | |||
2886 | 2886 | ||
2887 | static int bnx2x_test_nvram(struct bnx2x *bp) | 2887 | static int bnx2x_test_nvram(struct bnx2x *bp) |
2888 | { | 2888 | { |
2889 | const struct crc_pair nvram_tbl[] = { | 2889 | static const struct crc_pair nvram_tbl[] = { |
2890 | { 0, 0x14 }, /* bootstrap */ | 2890 | { 0, 0x14 }, /* bootstrap */ |
2891 | { 0x14, 0xec }, /* dir */ | 2891 | { 0x14, 0xec }, /* dir */ |
2892 | { 0x100, 0x350 }, /* manuf_info */ | 2892 | { 0x100, 0x350 }, /* manuf_info */ |
@@ -2895,7 +2895,7 @@ static int bnx2x_test_nvram(struct bnx2x *bp) | |||
2895 | { 0x708, 0x70 }, /* manuf_key_info */ | 2895 | { 0x708, 0x70 }, /* manuf_key_info */ |
2896 | { 0, 0 } | 2896 | { 0, 0 } |
2897 | }; | 2897 | }; |
2898 | const struct crc_pair nvram_tbl2[] = { | 2898 | static const struct crc_pair nvram_tbl2[] = { |
2899 | { 0x7e8, 0x350 }, /* manuf_info2 */ | 2899 | { 0x7e8, 0x350 }, /* manuf_info2 */ |
2900 | { 0xb38, 0xf0 }, /* feature_info */ | 2900 | { 0xb38, 0xf0 }, /* feature_info */ |
2901 | { 0, 0 } | 2901 | { 0, 0 } |
@@ -3162,7 +3162,8 @@ static void bnx2x_get_strings(struct net_device *dev, u32 stringset, u8 *buf) | |||
3162 | if (is_multi(bp)) { | 3162 | if (is_multi(bp)) { |
3163 | for_each_eth_queue(bp, i) { | 3163 | for_each_eth_queue(bp, i) { |
3164 | memset(queue_name, 0, sizeof(queue_name)); | 3164 | memset(queue_name, 0, sizeof(queue_name)); |
3165 | sprintf(queue_name, "%d", i); | 3165 | snprintf(queue_name, sizeof(queue_name), |
3166 | "%d", i); | ||
3166 | for (j = 0; j < BNX2X_NUM_Q_STATS; j++) | 3167 | for (j = 0; j < BNX2X_NUM_Q_STATS; j++) |
3167 | snprintf(buf + (k + j)*ETH_GSTRING_LEN, | 3168 | snprintf(buf + (k + j)*ETH_GSTRING_LEN, |
3168 | ETH_GSTRING_LEN, | 3169 | ETH_GSTRING_LEN, |
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index daca1c9d254b..7b0b399aaedd 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c | |||
@@ -1202,12 +1202,21 @@ static struct enet_cb *bcmgenet_get_txcb(struct bcmgenet_priv *priv, | |||
1202 | return tx_cb_ptr; | 1202 | return tx_cb_ptr; |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | /* Simple helper to free a control block's resources */ | 1205 | static struct enet_cb *bcmgenet_put_txcb(struct bcmgenet_priv *priv, |
1206 | static void bcmgenet_free_cb(struct enet_cb *cb) | 1206 | struct bcmgenet_tx_ring *ring) |
1207 | { | 1207 | { |
1208 | dev_kfree_skb_any(cb->skb); | 1208 | struct enet_cb *tx_cb_ptr; |
1209 | cb->skb = NULL; | 1209 | |
1210 | dma_unmap_addr_set(cb, dma_addr, 0); | 1210 | tx_cb_ptr = ring->cbs; |
1211 | tx_cb_ptr += ring->write_ptr - ring->cb_ptr; | ||
1212 | |||
1213 | /* Rewinding local write pointer */ | ||
1214 | if (ring->write_ptr == ring->cb_ptr) | ||
1215 | ring->write_ptr = ring->end_ptr; | ||
1216 | else | ||
1217 | ring->write_ptr--; | ||
1218 | |||
1219 | return tx_cb_ptr; | ||
1211 | } | 1220 | } |
1212 | 1221 | ||
1213 | static inline void bcmgenet_rx_ring16_int_disable(struct bcmgenet_rx_ring *ring) | 1222 | static inline void bcmgenet_rx_ring16_int_disable(struct bcmgenet_rx_ring *ring) |
@@ -1260,18 +1269,72 @@ static inline void bcmgenet_tx_ring_int_disable(struct bcmgenet_tx_ring *ring) | |||
1260 | INTRL2_CPU_MASK_SET); | 1269 | INTRL2_CPU_MASK_SET); |
1261 | } | 1270 | } |
1262 | 1271 | ||
1272 | /* Simple helper to free a transmit control block's resources | ||
1273 | * Returns an skb when the last transmit control block associated with the | ||
1274 | * skb is freed. The skb should be freed by the caller if necessary. | ||
1275 | */ | ||
1276 | static struct sk_buff *bcmgenet_free_tx_cb(struct device *dev, | ||
1277 | struct enet_cb *cb) | ||
1278 | { | ||
1279 | struct sk_buff *skb; | ||
1280 | |||
1281 | skb = cb->skb; | ||
1282 | |||
1283 | if (skb) { | ||
1284 | cb->skb = NULL; | ||
1285 | if (cb == GENET_CB(skb)->first_cb) | ||
1286 | dma_unmap_single(dev, dma_unmap_addr(cb, dma_addr), | ||
1287 | dma_unmap_len(cb, dma_len), | ||
1288 | DMA_TO_DEVICE); | ||
1289 | else | ||
1290 | dma_unmap_page(dev, dma_unmap_addr(cb, dma_addr), | ||
1291 | dma_unmap_len(cb, dma_len), | ||
1292 | DMA_TO_DEVICE); | ||
1293 | dma_unmap_addr_set(cb, dma_addr, 0); | ||
1294 | |||
1295 | if (cb == GENET_CB(skb)->last_cb) | ||
1296 | return skb; | ||
1297 | |||
1298 | } else if (dma_unmap_addr(cb, dma_addr)) { | ||
1299 | dma_unmap_page(dev, | ||
1300 | dma_unmap_addr(cb, dma_addr), | ||
1301 | dma_unmap_len(cb, dma_len), | ||
1302 | DMA_TO_DEVICE); | ||
1303 | dma_unmap_addr_set(cb, dma_addr, 0); | ||
1304 | } | ||
1305 | |||
1306 | return 0; | ||
1307 | } | ||
1308 | |||
1309 | /* Simple helper to free a receive control block's resources */ | ||
1310 | static struct sk_buff *bcmgenet_free_rx_cb(struct device *dev, | ||
1311 | struct enet_cb *cb) | ||
1312 | { | ||
1313 | struct sk_buff *skb; | ||
1314 | |||
1315 | skb = cb->skb; | ||
1316 | cb->skb = NULL; | ||
1317 | |||
1318 | if (dma_unmap_addr(cb, dma_addr)) { | ||
1319 | dma_unmap_single(dev, dma_unmap_addr(cb, dma_addr), | ||
1320 | dma_unmap_len(cb, dma_len), DMA_FROM_DEVICE); | ||
1321 | dma_unmap_addr_set(cb, dma_addr, 0); | ||
1322 | } | ||
1323 | |||
1324 | return skb; | ||
1325 | } | ||
1326 | |||
1263 | /* Unlocked version of the reclaim routine */ | 1327 | /* Unlocked version of the reclaim routine */ |
1264 | static unsigned int __bcmgenet_tx_reclaim(struct net_device *dev, | 1328 | static unsigned int __bcmgenet_tx_reclaim(struct net_device *dev, |
1265 | struct bcmgenet_tx_ring *ring) | 1329 | struct bcmgenet_tx_ring *ring) |
1266 | { | 1330 | { |
1267 | struct bcmgenet_priv *priv = netdev_priv(dev); | 1331 | struct bcmgenet_priv *priv = netdev_priv(dev); |
1268 | struct device *kdev = &priv->pdev->dev; | 1332 | unsigned int txbds_processed = 0; |
1269 | struct enet_cb *tx_cb_ptr; | ||
1270 | unsigned int pkts_compl = 0; | ||
1271 | unsigned int bytes_compl = 0; | 1333 | unsigned int bytes_compl = 0; |
1272 | unsigned int c_index; | 1334 | unsigned int pkts_compl = 0; |
1273 | unsigned int txbds_ready; | 1335 | unsigned int txbds_ready; |
1274 | unsigned int txbds_processed = 0; | 1336 | unsigned int c_index; |
1337 | struct sk_buff *skb; | ||
1275 | 1338 | ||
1276 | /* Clear status before servicing to reduce spurious interrupts */ | 1339 | /* Clear status before servicing to reduce spurious interrupts */ |
1277 | if (ring->index == DESC_INDEX) | 1340 | if (ring->index == DESC_INDEX) |
@@ -1292,21 +1355,12 @@ static unsigned int __bcmgenet_tx_reclaim(struct net_device *dev, | |||
1292 | 1355 | ||
1293 | /* Reclaim transmitted buffers */ | 1356 | /* Reclaim transmitted buffers */ |
1294 | while (txbds_processed < txbds_ready) { | 1357 | while (txbds_processed < txbds_ready) { |
1295 | tx_cb_ptr = &priv->tx_cbs[ring->clean_ptr]; | 1358 | skb = bcmgenet_free_tx_cb(&priv->pdev->dev, |
1296 | if (tx_cb_ptr->skb) { | 1359 | &priv->tx_cbs[ring->clean_ptr]); |
1360 | if (skb) { | ||
1297 | pkts_compl++; | 1361 | pkts_compl++; |
1298 | bytes_compl += GENET_CB(tx_cb_ptr->skb)->bytes_sent; | 1362 | bytes_compl += GENET_CB(skb)->bytes_sent; |
1299 | dma_unmap_single(kdev, | 1363 | dev_kfree_skb_any(skb); |
1300 | dma_unmap_addr(tx_cb_ptr, dma_addr), | ||
1301 | dma_unmap_len(tx_cb_ptr, dma_len), | ||
1302 | DMA_TO_DEVICE); | ||
1303 | bcmgenet_free_cb(tx_cb_ptr); | ||
1304 | } else if (dma_unmap_addr(tx_cb_ptr, dma_addr)) { | ||
1305 | dma_unmap_page(kdev, | ||
1306 | dma_unmap_addr(tx_cb_ptr, dma_addr), | ||
1307 | dma_unmap_len(tx_cb_ptr, dma_len), | ||
1308 | DMA_TO_DEVICE); | ||
1309 | dma_unmap_addr_set(tx_cb_ptr, dma_addr, 0); | ||
1310 | } | 1364 | } |
1311 | 1365 | ||
1312 | txbds_processed++; | 1366 | txbds_processed++; |
@@ -1380,95 +1434,6 @@ static void bcmgenet_tx_reclaim_all(struct net_device *dev) | |||
1380 | bcmgenet_tx_reclaim(dev, &priv->tx_rings[DESC_INDEX]); | 1434 | bcmgenet_tx_reclaim(dev, &priv->tx_rings[DESC_INDEX]); |
1381 | } | 1435 | } |
1382 | 1436 | ||
1383 | /* Transmits a single SKB (either head of a fragment or a single SKB) | ||
1384 | * caller must hold priv->lock | ||
1385 | */ | ||
1386 | static int bcmgenet_xmit_single(struct net_device *dev, | ||
1387 | struct sk_buff *skb, | ||
1388 | u16 dma_desc_flags, | ||
1389 | struct bcmgenet_tx_ring *ring) | ||
1390 | { | ||
1391 | struct bcmgenet_priv *priv = netdev_priv(dev); | ||
1392 | struct device *kdev = &priv->pdev->dev; | ||
1393 | struct enet_cb *tx_cb_ptr; | ||
1394 | unsigned int skb_len; | ||
1395 | dma_addr_t mapping; | ||
1396 | u32 length_status; | ||
1397 | int ret; | ||
1398 | |||
1399 | tx_cb_ptr = bcmgenet_get_txcb(priv, ring); | ||
1400 | |||
1401 | if (unlikely(!tx_cb_ptr)) | ||
1402 | BUG(); | ||
1403 | |||
1404 | tx_cb_ptr->skb = skb; | ||
1405 | |||
1406 | skb_len = skb_headlen(skb); | ||
1407 | |||
1408 | mapping = dma_map_single(kdev, skb->data, skb_len, DMA_TO_DEVICE); | ||
1409 | ret = dma_mapping_error(kdev, mapping); | ||
1410 | if (ret) { | ||
1411 | priv->mib.tx_dma_failed++; | ||
1412 | netif_err(priv, tx_err, dev, "Tx DMA map failed\n"); | ||
1413 | dev_kfree_skb(skb); | ||
1414 | return ret; | ||
1415 | } | ||
1416 | |||
1417 | dma_unmap_addr_set(tx_cb_ptr, dma_addr, mapping); | ||
1418 | dma_unmap_len_set(tx_cb_ptr, dma_len, skb_len); | ||
1419 | length_status = (skb_len << DMA_BUFLENGTH_SHIFT) | dma_desc_flags | | ||
1420 | (priv->hw_params->qtag_mask << DMA_TX_QTAG_SHIFT) | | ||
1421 | DMA_TX_APPEND_CRC; | ||
1422 | |||
1423 | if (skb->ip_summed == CHECKSUM_PARTIAL) | ||
1424 | length_status |= DMA_TX_DO_CSUM; | ||
1425 | |||
1426 | dmadesc_set(priv, tx_cb_ptr->bd_addr, mapping, length_status); | ||
1427 | |||
1428 | return 0; | ||
1429 | } | ||
1430 | |||
1431 | /* Transmit a SKB fragment */ | ||
1432 | static int bcmgenet_xmit_frag(struct net_device *dev, | ||
1433 | skb_frag_t *frag, | ||
1434 | u16 dma_desc_flags, | ||
1435 | struct bcmgenet_tx_ring *ring) | ||
1436 | { | ||
1437 | struct bcmgenet_priv *priv = netdev_priv(dev); | ||
1438 | struct device *kdev = &priv->pdev->dev; | ||
1439 | struct enet_cb *tx_cb_ptr; | ||
1440 | unsigned int frag_size; | ||
1441 | dma_addr_t mapping; | ||
1442 | int ret; | ||
1443 | |||
1444 | tx_cb_ptr = bcmgenet_get_txcb(priv, ring); | ||
1445 | |||
1446 | if (unlikely(!tx_cb_ptr)) | ||
1447 | BUG(); | ||
1448 | |||
1449 | tx_cb_ptr->skb = NULL; | ||
1450 | |||
1451 | frag_size = skb_frag_size(frag); | ||
1452 | |||
1453 | mapping = skb_frag_dma_map(kdev, frag, 0, frag_size, DMA_TO_DEVICE); | ||
1454 | ret = dma_mapping_error(kdev, mapping); | ||
1455 | if (ret) { | ||
1456 | priv->mib.tx_dma_failed++; | ||
1457 | netif_err(priv, tx_err, dev, "%s: Tx DMA map failed\n", | ||
1458 | __func__); | ||
1459 | return ret; | ||
1460 | } | ||
1461 | |||
1462 | dma_unmap_addr_set(tx_cb_ptr, dma_addr, mapping); | ||
1463 | dma_unmap_len_set(tx_cb_ptr, dma_len, frag_size); | ||
1464 | |||
1465 | dmadesc_set(priv, tx_cb_ptr->bd_addr, mapping, | ||
1466 | (frag_size << DMA_BUFLENGTH_SHIFT) | dma_desc_flags | | ||
1467 | (priv->hw_params->qtag_mask << DMA_TX_QTAG_SHIFT)); | ||
1468 | |||
1469 | return 0; | ||
1470 | } | ||
1471 | |||
1472 | /* Reallocate the SKB to put enough headroom in front of it and insert | 1437 | /* Reallocate the SKB to put enough headroom in front of it and insert |
1473 | * the transmit checksum offsets in the descriptors | 1438 | * the transmit checksum offsets in the descriptors |
1474 | */ | 1439 | */ |
@@ -1535,11 +1500,16 @@ static struct sk_buff *bcmgenet_put_tx_csum(struct net_device *dev, | |||
1535 | static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) | 1500 | static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) |
1536 | { | 1501 | { |
1537 | struct bcmgenet_priv *priv = netdev_priv(dev); | 1502 | struct bcmgenet_priv *priv = netdev_priv(dev); |
1503 | struct device *kdev = &priv->pdev->dev; | ||
1538 | struct bcmgenet_tx_ring *ring = NULL; | 1504 | struct bcmgenet_tx_ring *ring = NULL; |
1505 | struct enet_cb *tx_cb_ptr; | ||
1539 | struct netdev_queue *txq; | 1506 | struct netdev_queue *txq; |
1540 | unsigned long flags = 0; | 1507 | unsigned long flags = 0; |
1541 | int nr_frags, index; | 1508 | int nr_frags, index; |
1542 | u16 dma_desc_flags; | 1509 | dma_addr_t mapping; |
1510 | unsigned int size; | ||
1511 | skb_frag_t *frag; | ||
1512 | u32 len_stat; | ||
1543 | int ret; | 1513 | int ret; |
1544 | int i; | 1514 | int i; |
1545 | 1515 | ||
@@ -1592,29 +1562,53 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1592 | } | 1562 | } |
1593 | } | 1563 | } |
1594 | 1564 | ||
1595 | dma_desc_flags = DMA_SOP; | 1565 | for (i = 0; i <= nr_frags; i++) { |
1596 | if (nr_frags == 0) | 1566 | tx_cb_ptr = bcmgenet_get_txcb(priv, ring); |
1597 | dma_desc_flags |= DMA_EOP; | ||
1598 | 1567 | ||
1599 | /* Transmit single SKB or head of fragment list */ | 1568 | if (unlikely(!tx_cb_ptr)) |
1600 | ret = bcmgenet_xmit_single(dev, skb, dma_desc_flags, ring); | 1569 | BUG(); |
1601 | if (ret) { | 1570 | |
1602 | ret = NETDEV_TX_OK; | 1571 | if (!i) { |
1603 | goto out; | 1572 | /* Transmit single SKB or head of fragment list */ |
1604 | } | 1573 | GENET_CB(skb)->first_cb = tx_cb_ptr; |
1574 | size = skb_headlen(skb); | ||
1575 | mapping = dma_map_single(kdev, skb->data, size, | ||
1576 | DMA_TO_DEVICE); | ||
1577 | } else { | ||
1578 | /* xmit fragment */ | ||
1579 | frag = &skb_shinfo(skb)->frags[i - 1]; | ||
1580 | size = skb_frag_size(frag); | ||
1581 | mapping = skb_frag_dma_map(kdev, frag, 0, size, | ||
1582 | DMA_TO_DEVICE); | ||
1583 | } | ||
1605 | 1584 | ||
1606 | /* xmit fragment */ | 1585 | ret = dma_mapping_error(kdev, mapping); |
1607 | for (i = 0; i < nr_frags; i++) { | ||
1608 | ret = bcmgenet_xmit_frag(dev, | ||
1609 | &skb_shinfo(skb)->frags[i], | ||
1610 | (i == nr_frags - 1) ? DMA_EOP : 0, | ||
1611 | ring); | ||
1612 | if (ret) { | 1586 | if (ret) { |
1587 | priv->mib.tx_dma_failed++; | ||
1588 | netif_err(priv, tx_err, dev, "Tx DMA map failed\n"); | ||
1613 | ret = NETDEV_TX_OK; | 1589 | ret = NETDEV_TX_OK; |
1614 | goto out; | 1590 | goto out_unmap_frags; |
1591 | } | ||
1592 | dma_unmap_addr_set(tx_cb_ptr, dma_addr, mapping); | ||
1593 | dma_unmap_len_set(tx_cb_ptr, dma_len, size); | ||
1594 | |||
1595 | tx_cb_ptr->skb = skb; | ||
1596 | |||
1597 | len_stat = (size << DMA_BUFLENGTH_SHIFT) | | ||
1598 | (priv->hw_params->qtag_mask << DMA_TX_QTAG_SHIFT); | ||
1599 | |||
1600 | if (!i) { | ||
1601 | len_stat |= DMA_TX_APPEND_CRC | DMA_SOP; | ||
1602 | if (skb->ip_summed == CHECKSUM_PARTIAL) | ||
1603 | len_stat |= DMA_TX_DO_CSUM; | ||
1615 | } | 1604 | } |
1605 | if (i == nr_frags) | ||
1606 | len_stat |= DMA_EOP; | ||
1607 | |||
1608 | dmadesc_set(priv, tx_cb_ptr->bd_addr, mapping, len_stat); | ||
1616 | } | 1609 | } |
1617 | 1610 | ||
1611 | GENET_CB(skb)->last_cb = tx_cb_ptr; | ||
1618 | skb_tx_timestamp(skb); | 1612 | skb_tx_timestamp(skb); |
1619 | 1613 | ||
1620 | /* Decrement total BD count and advance our write pointer */ | 1614 | /* Decrement total BD count and advance our write pointer */ |
@@ -1635,6 +1629,19 @@ out: | |||
1635 | spin_unlock_irqrestore(&ring->lock, flags); | 1629 | spin_unlock_irqrestore(&ring->lock, flags); |
1636 | 1630 | ||
1637 | return ret; | 1631 | return ret; |
1632 | |||
1633 | out_unmap_frags: | ||
1634 | /* Back up for failed control block mapping */ | ||
1635 | bcmgenet_put_txcb(priv, ring); | ||
1636 | |||
1637 | /* Unmap successfully mapped control blocks */ | ||
1638 | while (i-- > 0) { | ||
1639 | tx_cb_ptr = bcmgenet_put_txcb(priv, ring); | ||
1640 | bcmgenet_free_tx_cb(kdev, tx_cb_ptr); | ||
1641 | } | ||
1642 | |||
1643 | dev_kfree_skb(skb); | ||
1644 | goto out; | ||
1638 | } | 1645 | } |
1639 | 1646 | ||
1640 | static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv, | 1647 | static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv, |
@@ -1666,14 +1673,12 @@ static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv, | |||
1666 | } | 1673 | } |
1667 | 1674 | ||
1668 | /* Grab the current Rx skb from the ring and DMA-unmap it */ | 1675 | /* Grab the current Rx skb from the ring and DMA-unmap it */ |
1669 | rx_skb = cb->skb; | 1676 | rx_skb = bcmgenet_free_rx_cb(kdev, cb); |
1670 | if (likely(rx_skb)) | ||
1671 | dma_unmap_single(kdev, dma_unmap_addr(cb, dma_addr), | ||
1672 | priv->rx_buf_len, DMA_FROM_DEVICE); | ||
1673 | 1677 | ||
1674 | /* Put the new Rx skb on the ring */ | 1678 | /* Put the new Rx skb on the ring */ |
1675 | cb->skb = skb; | 1679 | cb->skb = skb; |
1676 | dma_unmap_addr_set(cb, dma_addr, mapping); | 1680 | dma_unmap_addr_set(cb, dma_addr, mapping); |
1681 | dma_unmap_len_set(cb, dma_len, priv->rx_buf_len); | ||
1677 | dmadesc_set_addr(priv, cb->bd_addr, mapping); | 1682 | dmadesc_set_addr(priv, cb->bd_addr, mapping); |
1678 | 1683 | ||
1679 | /* Return the current Rx skb to caller */ | 1684 | /* Return the current Rx skb to caller */ |
@@ -1880,22 +1885,16 @@ static int bcmgenet_alloc_rx_buffers(struct bcmgenet_priv *priv, | |||
1880 | 1885 | ||
1881 | static void bcmgenet_free_rx_buffers(struct bcmgenet_priv *priv) | 1886 | static void bcmgenet_free_rx_buffers(struct bcmgenet_priv *priv) |
1882 | { | 1887 | { |
1883 | struct device *kdev = &priv->pdev->dev; | 1888 | struct sk_buff *skb; |
1884 | struct enet_cb *cb; | 1889 | struct enet_cb *cb; |
1885 | int i; | 1890 | int i; |
1886 | 1891 | ||
1887 | for (i = 0; i < priv->num_rx_bds; i++) { | 1892 | for (i = 0; i < priv->num_rx_bds; i++) { |
1888 | cb = &priv->rx_cbs[i]; | 1893 | cb = &priv->rx_cbs[i]; |
1889 | 1894 | ||
1890 | if (dma_unmap_addr(cb, dma_addr)) { | 1895 | skb = bcmgenet_free_rx_cb(&priv->pdev->dev, cb); |
1891 | dma_unmap_single(kdev, | 1896 | if (skb) |
1892 | dma_unmap_addr(cb, dma_addr), | 1897 | dev_kfree_skb_any(skb); |
1893 | priv->rx_buf_len, DMA_FROM_DEVICE); | ||
1894 | dma_unmap_addr_set(cb, dma_addr, 0); | ||
1895 | } | ||
1896 | |||
1897 | if (cb->skb) | ||
1898 | bcmgenet_free_cb(cb); | ||
1899 | } | 1898 | } |
1900 | } | 1899 | } |
1901 | 1900 | ||
@@ -2479,8 +2478,10 @@ static int bcmgenet_dma_teardown(struct bcmgenet_priv *priv) | |||
2479 | 2478 | ||
2480 | static void bcmgenet_fini_dma(struct bcmgenet_priv *priv) | 2479 | static void bcmgenet_fini_dma(struct bcmgenet_priv *priv) |
2481 | { | 2480 | { |
2482 | int i; | ||
2483 | struct netdev_queue *txq; | 2481 | struct netdev_queue *txq; |
2482 | struct sk_buff *skb; | ||
2483 | struct enet_cb *cb; | ||
2484 | int i; | ||
2484 | 2485 | ||
2485 | bcmgenet_fini_rx_napi(priv); | 2486 | bcmgenet_fini_rx_napi(priv); |
2486 | bcmgenet_fini_tx_napi(priv); | 2487 | bcmgenet_fini_tx_napi(priv); |
@@ -2489,10 +2490,10 @@ static void bcmgenet_fini_dma(struct bcmgenet_priv *priv) | |||
2489 | bcmgenet_dma_teardown(priv); | 2490 | bcmgenet_dma_teardown(priv); |
2490 | 2491 | ||
2491 | for (i = 0; i < priv->num_tx_bds; i++) { | 2492 | for (i = 0; i < priv->num_tx_bds; i++) { |
2492 | if (priv->tx_cbs[i].skb != NULL) { | 2493 | cb = priv->tx_cbs + i; |
2493 | dev_kfree_skb(priv->tx_cbs[i].skb); | 2494 | skb = bcmgenet_free_tx_cb(&priv->pdev->dev, cb); |
2494 | priv->tx_cbs[i].skb = NULL; | 2495 | if (skb) |
2495 | } | 2496 | dev_kfree_skb(skb); |
2496 | } | 2497 | } |
2497 | 2498 | ||
2498 | for (i = 0; i < priv->hw_params->tx_queues; i++) { | 2499 | for (i = 0; i < priv->hw_params->tx_queues; i++) { |
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h index efd07020b89f..b9344de669f8 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.h +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.h | |||
@@ -544,6 +544,8 @@ struct bcmgenet_hw_params { | |||
544 | }; | 544 | }; |
545 | 545 | ||
546 | struct bcmgenet_skb_cb { | 546 | struct bcmgenet_skb_cb { |
547 | struct enet_cb *first_cb; /* First control block of SKB */ | ||
548 | struct enet_cb *last_cb; /* Last control block of SKB */ | ||
547 | unsigned int bytes_sent; /* bytes on the wire (no TSB) */ | 549 | unsigned int bytes_sent; /* bytes on the wire (no TSB) */ |
548 | }; | 550 | }; |
549 | 551 | ||
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c index 28ecda3d3404..ebd353bc78ff 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | |||
@@ -335,7 +335,7 @@ lio_ethtool_get_channels(struct net_device *dev, | |||
335 | 335 | ||
336 | static int lio_get_eeprom_len(struct net_device *netdev) | 336 | static int lio_get_eeprom_len(struct net_device *netdev) |
337 | { | 337 | { |
338 | u8 buf[128]; | 338 | u8 buf[192]; |
339 | struct lio *lio = GET_LIO(netdev); | 339 | struct lio *lio = GET_LIO(netdev); |
340 | struct octeon_device *oct_dev = lio->oct_dev; | 340 | struct octeon_device *oct_dev = lio->oct_dev; |
341 | struct octeon_board_info *board_info; | 341 | struct octeon_board_info *board_info; |
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index a0ca68ce3fbb..79112563a25a 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c | |||
@@ -1008,7 +1008,7 @@ static void bgx_print_qlm_mode(struct bgx *bgx, u8 lmacid) | |||
1008 | { | 1008 | { |
1009 | struct device *dev = &bgx->pdev->dev; | 1009 | struct device *dev = &bgx->pdev->dev; |
1010 | struct lmac *lmac; | 1010 | struct lmac *lmac; |
1011 | char str[20]; | 1011 | char str[27]; |
1012 | 1012 | ||
1013 | if (!bgx->is_dlm && lmacid) | 1013 | if (!bgx->is_dlm && lmacid) |
1014 | return; | 1014 | return; |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c index 50517cfd9671..9f9d6cae39d5 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c | |||
@@ -441,7 +441,8 @@ void cxgb4_ptp_init(struct adapter *adapter) | |||
441 | 441 | ||
442 | adapter->ptp_clock = ptp_clock_register(&adapter->ptp_clock_info, | 442 | adapter->ptp_clock = ptp_clock_register(&adapter->ptp_clock_info, |
443 | &adapter->pdev->dev); | 443 | &adapter->pdev->dev); |
444 | if (!adapter->ptp_clock) { | 444 | if (IS_ERR_OR_NULL(adapter->ptp_clock)) { |
445 | adapter->ptp_clock = NULL; | ||
445 | dev_err(adapter->pdev_dev, | 446 | dev_err(adapter->pdev_dev, |
446 | "PTP %s Clock registration has failed\n", __func__); | 447 | "PTP %s Clock registration has failed\n", __func__); |
447 | return; | 448 | return; |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h index 99987d8e437e..aa28299aef5f 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | |||
@@ -174,6 +174,8 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN | |||
174 | CH_PCI_ID_TABLE_FENTRY(0x50a0), /* Custom T540-CR */ | 174 | CH_PCI_ID_TABLE_FENTRY(0x50a0), /* Custom T540-CR */ |
175 | CH_PCI_ID_TABLE_FENTRY(0x50a1), /* Custom T540-CR */ | 175 | CH_PCI_ID_TABLE_FENTRY(0x50a1), /* Custom T540-CR */ |
176 | CH_PCI_ID_TABLE_FENTRY(0x50a2), /* Custom T540-KR4 */ | 176 | CH_PCI_ID_TABLE_FENTRY(0x50a2), /* Custom T540-KR4 */ |
177 | CH_PCI_ID_TABLE_FENTRY(0x50a3), /* Custom T580-KR4 */ | ||
178 | CH_PCI_ID_TABLE_FENTRY(0x50a4), /* Custom 2x T540-CR */ | ||
177 | 179 | ||
178 | /* T6 adapters: | 180 | /* T6 adapters: |
179 | */ | 181 | */ |
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c index ff864a187d5a..a37166ee577b 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | |||
@@ -776,8 +776,9 @@ void hns_ae_update_led_status(struct hnae_handle *handle) | |||
776 | 776 | ||
777 | assert(handle); | 777 | assert(handle); |
778 | mac_cb = hns_get_mac_cb(handle); | 778 | mac_cb = hns_get_mac_cb(handle); |
779 | if (!mac_cb->cpld_ctrl) | 779 | if (mac_cb->media_type != HNAE_MEDIA_TYPE_FIBER) |
780 | return; | 780 | return; |
781 | |||
781 | hns_set_led_opt(mac_cb); | 782 | hns_set_led_opt(mac_cb); |
782 | } | 783 | } |
783 | 784 | ||
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c index 7a8addda726e..408b63faf9a8 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | |||
@@ -53,6 +53,34 @@ static u32 dsaf_read_sub(struct dsaf_device *dsaf_dev, u32 reg) | |||
53 | return ret; | 53 | return ret; |
54 | } | 54 | } |
55 | 55 | ||
56 | static void hns_dsaf_acpi_ledctrl_by_port(struct hns_mac_cb *mac_cb, u8 op_type, | ||
57 | u32 link, u32 port, u32 act) | ||
58 | { | ||
59 | union acpi_object *obj; | ||
60 | union acpi_object obj_args[3], argv4; | ||
61 | |||
62 | obj_args[0].integer.type = ACPI_TYPE_INTEGER; | ||
63 | obj_args[0].integer.value = link; | ||
64 | obj_args[1].integer.type = ACPI_TYPE_INTEGER; | ||
65 | obj_args[1].integer.value = port; | ||
66 | obj_args[2].integer.type = ACPI_TYPE_INTEGER; | ||
67 | obj_args[2].integer.value = act; | ||
68 | |||
69 | argv4.type = ACPI_TYPE_PACKAGE; | ||
70 | argv4.package.count = 3; | ||
71 | argv4.package.elements = obj_args; | ||
72 | |||
73 | obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev), | ||
74 | &hns_dsaf_acpi_dsm_guid, 0, op_type, &argv4); | ||
75 | if (!obj) { | ||
76 | dev_warn(mac_cb->dev, "ledctrl fail, link:%d port:%d act:%d!\n", | ||
77 | link, port, act); | ||
78 | return; | ||
79 | } | ||
80 | |||
81 | ACPI_FREE(obj); | ||
82 | } | ||
83 | |||
56 | static void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status, | 84 | static void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status, |
57 | u16 speed, int data) | 85 | u16 speed, int data) |
58 | { | 86 | { |
@@ -93,6 +121,18 @@ static void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status, | |||
93 | } | 121 | } |
94 | } | 122 | } |
95 | 123 | ||
124 | static void hns_cpld_set_led_acpi(struct hns_mac_cb *mac_cb, int link_status, | ||
125 | u16 speed, int data) | ||
126 | { | ||
127 | if (!mac_cb) { | ||
128 | pr_err("cpld_led_set mac_cb is null!\n"); | ||
129 | return; | ||
130 | } | ||
131 | |||
132 | hns_dsaf_acpi_ledctrl_by_port(mac_cb, HNS_OP_LED_SET_FUNC, | ||
133 | link_status, mac_cb->mac_id, data); | ||
134 | } | ||
135 | |||
96 | static void cpld_led_reset(struct hns_mac_cb *mac_cb) | 136 | static void cpld_led_reset(struct hns_mac_cb *mac_cb) |
97 | { | 137 | { |
98 | if (!mac_cb || !mac_cb->cpld_ctrl) | 138 | if (!mac_cb || !mac_cb->cpld_ctrl) |
@@ -103,6 +143,20 @@ static void cpld_led_reset(struct hns_mac_cb *mac_cb) | |||
103 | mac_cb->cpld_led_value = CPLD_LED_DEFAULT_VALUE; | 143 | mac_cb->cpld_led_value = CPLD_LED_DEFAULT_VALUE; |
104 | } | 144 | } |
105 | 145 | ||
146 | static void cpld_led_reset_acpi(struct hns_mac_cb *mac_cb) | ||
147 | { | ||
148 | if (!mac_cb) { | ||
149 | pr_err("cpld_led_reset mac_cb is null!\n"); | ||
150 | return; | ||
151 | } | ||
152 | |||
153 | if (mac_cb->media_type != HNAE_MEDIA_TYPE_FIBER) | ||
154 | return; | ||
155 | |||
156 | hns_dsaf_acpi_ledctrl_by_port(mac_cb, HNS_OP_LED_SET_FUNC, | ||
157 | 0, mac_cb->mac_id, 0); | ||
158 | } | ||
159 | |||
106 | static int cpld_set_led_id(struct hns_mac_cb *mac_cb, | 160 | static int cpld_set_led_id(struct hns_mac_cb *mac_cb, |
107 | enum hnae_led_state status) | 161 | enum hnae_led_state status) |
108 | { | 162 | { |
@@ -604,8 +658,8 @@ struct dsaf_misc_op *hns_misc_op_get(struct dsaf_device *dsaf_dev) | |||
604 | 658 | ||
605 | misc_op->cfg_serdes_loopback = hns_mac_config_sds_loopback; | 659 | misc_op->cfg_serdes_loopback = hns_mac_config_sds_loopback; |
606 | } else if (is_acpi_node(dsaf_dev->dev->fwnode)) { | 660 | } else if (is_acpi_node(dsaf_dev->dev->fwnode)) { |
607 | misc_op->cpld_set_led = hns_cpld_set_led; | 661 | misc_op->cpld_set_led = hns_cpld_set_led_acpi; |
608 | misc_op->cpld_reset_led = cpld_led_reset; | 662 | misc_op->cpld_reset_led = cpld_led_reset_acpi; |
609 | misc_op->cpld_set_led_id = cpld_set_led_id; | 663 | misc_op->cpld_set_led_id = cpld_set_led_id; |
610 | 664 | ||
611 | misc_op->dsaf_reset = hns_dsaf_rst_acpi; | 665 | misc_op->dsaf_reset = hns_dsaf_rst_acpi; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c index 249a4584401a..b651c1210555 100644 --- a/drivers/net/ethernet/mellanox/mlx4/alloc.c +++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c | |||
@@ -283,7 +283,7 @@ int mlx4_zone_add_one(struct mlx4_zone_allocator *zone_alloc, | |||
283 | } | 283 | } |
284 | 284 | ||
285 | /* Should be called under a lock */ | 285 | /* Should be called under a lock */ |
286 | static int __mlx4_zone_remove_one_entry(struct mlx4_zone_entry *entry) | 286 | static void __mlx4_zone_remove_one_entry(struct mlx4_zone_entry *entry) |
287 | { | 287 | { |
288 | struct mlx4_zone_allocator *zone_alloc = entry->allocator; | 288 | struct mlx4_zone_allocator *zone_alloc = entry->allocator; |
289 | 289 | ||
@@ -315,8 +315,6 @@ static int __mlx4_zone_remove_one_entry(struct mlx4_zone_entry *entry) | |||
315 | } | 315 | } |
316 | zone_alloc->mask = mask; | 316 | zone_alloc->mask = mask; |
317 | } | 317 | } |
318 | |||
319 | return 0; | ||
320 | } | 318 | } |
321 | 319 | ||
322 | void mlx4_zone_allocator_destroy(struct mlx4_zone_allocator *zone_alloc) | 320 | void mlx4_zone_allocator_destroy(struct mlx4_zone_allocator *zone_alloc) |
@@ -457,7 +455,7 @@ struct mlx4_bitmap *mlx4_zone_get_bitmap(struct mlx4_zone_allocator *zones, u32 | |||
457 | int mlx4_zone_remove_one(struct mlx4_zone_allocator *zones, u32 uid) | 455 | int mlx4_zone_remove_one(struct mlx4_zone_allocator *zones, u32 uid) |
458 | { | 456 | { |
459 | struct mlx4_zone_entry *zone; | 457 | struct mlx4_zone_entry *zone; |
460 | int res; | 458 | int res = 0; |
461 | 459 | ||
462 | spin_lock(&zones->lock); | 460 | spin_lock(&zones->lock); |
463 | 461 | ||
@@ -468,7 +466,7 @@ int mlx4_zone_remove_one(struct mlx4_zone_allocator *zones, u32 uid) | |||
468 | goto out; | 466 | goto out; |
469 | } | 467 | } |
470 | 468 | ||
471 | res = __mlx4_zone_remove_one_entry(zone); | 469 | __mlx4_zone_remove_one_entry(zone); |
472 | 470 | ||
473 | out: | 471 | out: |
474 | spin_unlock(&zones->lock); | 472 | spin_unlock(&zones->lock); |
@@ -578,7 +576,7 @@ out: | |||
578 | } | 576 | } |
579 | 577 | ||
580 | static int mlx4_buf_direct_alloc(struct mlx4_dev *dev, int size, | 578 | static int mlx4_buf_direct_alloc(struct mlx4_dev *dev, int size, |
581 | struct mlx4_buf *buf, gfp_t gfp) | 579 | struct mlx4_buf *buf) |
582 | { | 580 | { |
583 | dma_addr_t t; | 581 | dma_addr_t t; |
584 | 582 | ||
@@ -587,7 +585,7 @@ static int mlx4_buf_direct_alloc(struct mlx4_dev *dev, int size, | |||
587 | buf->page_shift = get_order(size) + PAGE_SHIFT; | 585 | buf->page_shift = get_order(size) + PAGE_SHIFT; |
588 | buf->direct.buf = | 586 | buf->direct.buf = |
589 | dma_zalloc_coherent(&dev->persist->pdev->dev, | 587 | dma_zalloc_coherent(&dev->persist->pdev->dev, |
590 | size, &t, gfp); | 588 | size, &t, GFP_KERNEL); |
591 | if (!buf->direct.buf) | 589 | if (!buf->direct.buf) |
592 | return -ENOMEM; | 590 | return -ENOMEM; |
593 | 591 | ||
@@ -607,10 +605,10 @@ static int mlx4_buf_direct_alloc(struct mlx4_dev *dev, int size, | |||
607 | * multiple pages, so we don't require too much contiguous memory. | 605 | * multiple pages, so we don't require too much contiguous memory. |
608 | */ | 606 | */ |
609 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | 607 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, |
610 | struct mlx4_buf *buf, gfp_t gfp) | 608 | struct mlx4_buf *buf) |
611 | { | 609 | { |
612 | if (size <= max_direct) { | 610 | if (size <= max_direct) { |
613 | return mlx4_buf_direct_alloc(dev, size, buf, gfp); | 611 | return mlx4_buf_direct_alloc(dev, size, buf); |
614 | } else { | 612 | } else { |
615 | dma_addr_t t; | 613 | dma_addr_t t; |
616 | int i; | 614 | int i; |
@@ -620,14 +618,14 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | |||
620 | buf->npages = buf->nbufs; | 618 | buf->npages = buf->nbufs; |
621 | buf->page_shift = PAGE_SHIFT; | 619 | buf->page_shift = PAGE_SHIFT; |
622 | buf->page_list = kcalloc(buf->nbufs, sizeof(*buf->page_list), | 620 | buf->page_list = kcalloc(buf->nbufs, sizeof(*buf->page_list), |
623 | gfp); | 621 | GFP_KERNEL); |
624 | if (!buf->page_list) | 622 | if (!buf->page_list) |
625 | return -ENOMEM; | 623 | return -ENOMEM; |
626 | 624 | ||
627 | for (i = 0; i < buf->nbufs; ++i) { | 625 | for (i = 0; i < buf->nbufs; ++i) { |
628 | buf->page_list[i].buf = | 626 | buf->page_list[i].buf = |
629 | dma_zalloc_coherent(&dev->persist->pdev->dev, | 627 | dma_zalloc_coherent(&dev->persist->pdev->dev, |
630 | PAGE_SIZE, &t, gfp); | 628 | PAGE_SIZE, &t, GFP_KERNEL); |
631 | if (!buf->page_list[i].buf) | 629 | if (!buf->page_list[i].buf) |
632 | goto err_free; | 630 | goto err_free; |
633 | 631 | ||
@@ -663,12 +661,11 @@ void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf) | |||
663 | } | 661 | } |
664 | EXPORT_SYMBOL_GPL(mlx4_buf_free); | 662 | EXPORT_SYMBOL_GPL(mlx4_buf_free); |
665 | 663 | ||
666 | static struct mlx4_db_pgdir *mlx4_alloc_db_pgdir(struct device *dma_device, | 664 | static struct mlx4_db_pgdir *mlx4_alloc_db_pgdir(struct device *dma_device) |
667 | gfp_t gfp) | ||
668 | { | 665 | { |
669 | struct mlx4_db_pgdir *pgdir; | 666 | struct mlx4_db_pgdir *pgdir; |
670 | 667 | ||
671 | pgdir = kzalloc(sizeof *pgdir, gfp); | 668 | pgdir = kzalloc(sizeof(*pgdir), GFP_KERNEL); |
672 | if (!pgdir) | 669 | if (!pgdir) |
673 | return NULL; | 670 | return NULL; |
674 | 671 | ||
@@ -676,7 +673,7 @@ static struct mlx4_db_pgdir *mlx4_alloc_db_pgdir(struct device *dma_device, | |||
676 | pgdir->bits[0] = pgdir->order0; | 673 | pgdir->bits[0] = pgdir->order0; |
677 | pgdir->bits[1] = pgdir->order1; | 674 | pgdir->bits[1] = pgdir->order1; |
678 | pgdir->db_page = dma_alloc_coherent(dma_device, PAGE_SIZE, | 675 | pgdir->db_page = dma_alloc_coherent(dma_device, PAGE_SIZE, |
679 | &pgdir->db_dma, gfp); | 676 | &pgdir->db_dma, GFP_KERNEL); |
680 | if (!pgdir->db_page) { | 677 | if (!pgdir->db_page) { |
681 | kfree(pgdir); | 678 | kfree(pgdir); |
682 | return NULL; | 679 | return NULL; |
@@ -716,7 +713,7 @@ found: | |||
716 | return 0; | 713 | return 0; |
717 | } | 714 | } |
718 | 715 | ||
719 | int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order, gfp_t gfp) | 716 | int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order) |
720 | { | 717 | { |
721 | struct mlx4_priv *priv = mlx4_priv(dev); | 718 | struct mlx4_priv *priv = mlx4_priv(dev); |
722 | struct mlx4_db_pgdir *pgdir; | 719 | struct mlx4_db_pgdir *pgdir; |
@@ -728,7 +725,7 @@ int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order, gfp_t gfp | |||
728 | if (!mlx4_alloc_db_from_pgdir(pgdir, db, order)) | 725 | if (!mlx4_alloc_db_from_pgdir(pgdir, db, order)) |
729 | goto out; | 726 | goto out; |
730 | 727 | ||
731 | pgdir = mlx4_alloc_db_pgdir(&dev->persist->pdev->dev, gfp); | 728 | pgdir = mlx4_alloc_db_pgdir(&dev->persist->pdev->dev); |
732 | if (!pgdir) { | 729 | if (!pgdir) { |
733 | ret = -ENOMEM; | 730 | ret = -ENOMEM; |
734 | goto out; | 731 | goto out; |
@@ -780,13 +777,13 @@ int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, | |||
780 | { | 777 | { |
781 | int err; | 778 | int err; |
782 | 779 | ||
783 | err = mlx4_db_alloc(dev, &wqres->db, 1, GFP_KERNEL); | 780 | err = mlx4_db_alloc(dev, &wqres->db, 1); |
784 | if (err) | 781 | if (err) |
785 | return err; | 782 | return err; |
786 | 783 | ||
787 | *wqres->db.db = 0; | 784 | *wqres->db.db = 0; |
788 | 785 | ||
789 | err = mlx4_buf_direct_alloc(dev, size, &wqres->buf, GFP_KERNEL); | 786 | err = mlx4_buf_direct_alloc(dev, size, &wqres->buf); |
790 | if (err) | 787 | if (err) |
791 | goto err_db; | 788 | goto err_db; |
792 | 789 | ||
@@ -795,7 +792,7 @@ int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, | |||
795 | if (err) | 792 | if (err) |
796 | goto err_buf; | 793 | goto err_buf; |
797 | 794 | ||
798 | err = mlx4_buf_write_mtt(dev, &wqres->mtt, &wqres->buf, GFP_KERNEL); | 795 | err = mlx4_buf_write_mtt(dev, &wqres->mtt, &wqres->buf); |
799 | if (err) | 796 | if (err) |
800 | goto err_mtt; | 797 | goto err_mtt; |
801 | 798 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c b/drivers/net/ethernet/mellanox/mlx4/cq.c index fa6d2354a0e9..c56a511b918e 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cq.c +++ b/drivers/net/ethernet/mellanox/mlx4/cq.c | |||
@@ -224,11 +224,11 @@ int __mlx4_cq_alloc_icm(struct mlx4_dev *dev, int *cqn) | |||
224 | if (*cqn == -1) | 224 | if (*cqn == -1) |
225 | return -ENOMEM; | 225 | return -ENOMEM; |
226 | 226 | ||
227 | err = mlx4_table_get(dev, &cq_table->table, *cqn, GFP_KERNEL); | 227 | err = mlx4_table_get(dev, &cq_table->table, *cqn); |
228 | if (err) | 228 | if (err) |
229 | goto err_out; | 229 | goto err_out; |
230 | 230 | ||
231 | err = mlx4_table_get(dev, &cq_table->cmpt_table, *cqn, GFP_KERNEL); | 231 | err = mlx4_table_get(dev, &cq_table->cmpt_table, *cqn); |
232 | if (err) | 232 | if (err) |
233 | goto err_put; | 233 | goto err_put; |
234 | return 0; | 234 | return 0; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index e5fb89505a13..436f7689a032 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c | |||
@@ -1042,7 +1042,7 @@ static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, int qpn, | |||
1042 | if (!context) | 1042 | if (!context) |
1043 | return -ENOMEM; | 1043 | return -ENOMEM; |
1044 | 1044 | ||
1045 | err = mlx4_qp_alloc(mdev->dev, qpn, qp, GFP_KERNEL); | 1045 | err = mlx4_qp_alloc(mdev->dev, qpn, qp); |
1046 | if (err) { | 1046 | if (err) { |
1047 | en_err(priv, "Failed to allocate qp #%x\n", qpn); | 1047 | en_err(priv, "Failed to allocate qp #%x\n", qpn); |
1048 | goto out; | 1048 | goto out; |
@@ -1086,7 +1086,7 @@ int mlx4_en_create_drop_qp(struct mlx4_en_priv *priv) | |||
1086 | en_err(priv, "Failed reserving drop qpn\n"); | 1086 | en_err(priv, "Failed reserving drop qpn\n"); |
1087 | return err; | 1087 | return err; |
1088 | } | 1088 | } |
1089 | err = mlx4_qp_alloc(priv->mdev->dev, qpn, &priv->drop_qp, GFP_KERNEL); | 1089 | err = mlx4_qp_alloc(priv->mdev->dev, qpn, &priv->drop_qp); |
1090 | if (err) { | 1090 | if (err) { |
1091 | en_err(priv, "Failed allocating drop qp\n"); | 1091 | en_err(priv, "Failed allocating drop qp\n"); |
1092 | mlx4_qp_release_range(priv->mdev->dev, qpn, 1); | 1092 | mlx4_qp_release_range(priv->mdev->dev, qpn, 1); |
@@ -1158,8 +1158,7 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv) | |||
1158 | } | 1158 | } |
1159 | 1159 | ||
1160 | /* Configure RSS indirection qp */ | 1160 | /* Configure RSS indirection qp */ |
1161 | err = mlx4_qp_alloc(mdev->dev, priv->base_qpn, rss_map->indir_qp, | 1161 | err = mlx4_qp_alloc(mdev->dev, priv->base_qpn, rss_map->indir_qp); |
1162 | GFP_KERNEL); | ||
1163 | if (err) { | 1162 | if (err) { |
1164 | en_err(priv, "Failed to allocate RSS indirection QP\n"); | 1163 | en_err(priv, "Failed to allocate RSS indirection QP\n"); |
1165 | goto rss_err; | 1164 | goto rss_err; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c index 4f3a9b27ce4a..73faa3d77921 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c | |||
@@ -111,7 +111,7 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv, | |||
111 | goto err_hwq_res; | 111 | goto err_hwq_res; |
112 | } | 112 | } |
113 | 113 | ||
114 | err = mlx4_qp_alloc(mdev->dev, ring->qpn, &ring->sp_qp, GFP_KERNEL); | 114 | err = mlx4_qp_alloc(mdev->dev, ring->qpn, &ring->sp_qp); |
115 | if (err) { | 115 | if (err) { |
116 | en_err(priv, "Failed allocating qp %d\n", ring->qpn); | 116 | en_err(priv, "Failed allocating qp %d\n", ring->qpn); |
117 | goto err_reserve; | 117 | goto err_reserve; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.c b/drivers/net/ethernet/mellanox/mlx4/icm.c index e1f9e7cebf8f..5a7816e7c7b4 100644 --- a/drivers/net/ethernet/mellanox/mlx4/icm.c +++ b/drivers/net/ethernet/mellanox/mlx4/icm.c | |||
@@ -251,8 +251,7 @@ int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev) | |||
251 | MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE); | 251 | MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE); |
252 | } | 252 | } |
253 | 253 | ||
254 | int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj, | 254 | int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj) |
255 | gfp_t gfp) | ||
256 | { | 255 | { |
257 | u32 i = (obj & (table->num_obj - 1)) / | 256 | u32 i = (obj & (table->num_obj - 1)) / |
258 | (MLX4_TABLE_CHUNK_SIZE / table->obj_size); | 257 | (MLX4_TABLE_CHUNK_SIZE / table->obj_size); |
@@ -266,7 +265,7 @@ int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj, | |||
266 | } | 265 | } |
267 | 266 | ||
268 | table->icm[i] = mlx4_alloc_icm(dev, MLX4_TABLE_CHUNK_SIZE >> PAGE_SHIFT, | 267 | table->icm[i] = mlx4_alloc_icm(dev, MLX4_TABLE_CHUNK_SIZE >> PAGE_SHIFT, |
269 | (table->lowmem ? gfp : GFP_HIGHUSER) | | 268 | (table->lowmem ? GFP_KERNEL : GFP_HIGHUSER) | |
270 | __GFP_NOWARN, table->coherent); | 269 | __GFP_NOWARN, table->coherent); |
271 | if (!table->icm[i]) { | 270 | if (!table->icm[i]) { |
272 | ret = -ENOMEM; | 271 | ret = -ENOMEM; |
@@ -363,7 +362,7 @@ int mlx4_table_get_range(struct mlx4_dev *dev, struct mlx4_icm_table *table, | |||
363 | u32 i; | 362 | u32 i; |
364 | 363 | ||
365 | for (i = start; i <= end; i += inc) { | 364 | for (i = start; i <= end; i += inc) { |
366 | err = mlx4_table_get(dev, table, i, GFP_KERNEL); | 365 | err = mlx4_table_get(dev, table, i); |
367 | if (err) | 366 | if (err) |
368 | goto fail; | 367 | goto fail; |
369 | } | 368 | } |
diff --git a/drivers/net/ethernet/mellanox/mlx4/icm.h b/drivers/net/ethernet/mellanox/mlx4/icm.h index 0c7364550150..dee67fa39107 100644 --- a/drivers/net/ethernet/mellanox/mlx4/icm.h +++ b/drivers/net/ethernet/mellanox/mlx4/icm.h | |||
@@ -71,8 +71,7 @@ struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages, | |||
71 | gfp_t gfp_mask, int coherent); | 71 | gfp_t gfp_mask, int coherent); |
72 | void mlx4_free_icm(struct mlx4_dev *dev, struct mlx4_icm *icm, int coherent); | 72 | void mlx4_free_icm(struct mlx4_dev *dev, struct mlx4_icm *icm, int coherent); |
73 | 73 | ||
74 | int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj, | 74 | int mlx4_table_get(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj); |
75 | gfp_t gfp); | ||
76 | void mlx4_table_put(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj); | 75 | void mlx4_table_put(struct mlx4_dev *dev, struct mlx4_icm_table *table, u32 obj); |
77 | int mlx4_table_get_range(struct mlx4_dev *dev, struct mlx4_icm_table *table, | 76 | int mlx4_table_get_range(struct mlx4_dev *dev, struct mlx4_icm_table *table, |
78 | u32 start, u32 end); | 77 | u32 start, u32 end); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h index 30616cd0140d..706d7f21ac5c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h | |||
@@ -969,7 +969,7 @@ void mlx4_cleanup_cq_table(struct mlx4_dev *dev); | |||
969 | void mlx4_cleanup_qp_table(struct mlx4_dev *dev); | 969 | void mlx4_cleanup_qp_table(struct mlx4_dev *dev); |
970 | void mlx4_cleanup_srq_table(struct mlx4_dev *dev); | 970 | void mlx4_cleanup_srq_table(struct mlx4_dev *dev); |
971 | void mlx4_cleanup_mcg_table(struct mlx4_dev *dev); | 971 | void mlx4_cleanup_mcg_table(struct mlx4_dev *dev); |
972 | int __mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn, gfp_t gfp); | 972 | int __mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn); |
973 | void __mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn); | 973 | void __mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn); |
974 | int __mlx4_cq_alloc_icm(struct mlx4_dev *dev, int *cqn); | 974 | int __mlx4_cq_alloc_icm(struct mlx4_dev *dev, int *cqn); |
975 | void __mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn); | 975 | void __mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn); |
@@ -977,7 +977,7 @@ int __mlx4_srq_alloc_icm(struct mlx4_dev *dev, int *srqn); | |||
977 | void __mlx4_srq_free_icm(struct mlx4_dev *dev, int srqn); | 977 | void __mlx4_srq_free_icm(struct mlx4_dev *dev, int srqn); |
978 | int __mlx4_mpt_reserve(struct mlx4_dev *dev); | 978 | int __mlx4_mpt_reserve(struct mlx4_dev *dev); |
979 | void __mlx4_mpt_release(struct mlx4_dev *dev, u32 index); | 979 | void __mlx4_mpt_release(struct mlx4_dev *dev, u32 index); |
980 | int __mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index, gfp_t gfp); | 980 | int __mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index); |
981 | void __mlx4_mpt_free_icm(struct mlx4_dev *dev, u32 index); | 981 | void __mlx4_mpt_free_icm(struct mlx4_dev *dev, u32 index); |
982 | u32 __mlx4_alloc_mtt_range(struct mlx4_dev *dev, int order); | 982 | u32 __mlx4_alloc_mtt_range(struct mlx4_dev *dev, int order); |
983 | void __mlx4_free_mtt_range(struct mlx4_dev *dev, u32 first_seg, int order); | 983 | void __mlx4_free_mtt_range(struct mlx4_dev *dev, u32 first_seg, int order); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c index ce852ca22a96..24282cd017d3 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mr.c +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c | |||
@@ -479,14 +479,14 @@ static void mlx4_mpt_release(struct mlx4_dev *dev, u32 index) | |||
479 | __mlx4_mpt_release(dev, index); | 479 | __mlx4_mpt_release(dev, index); |
480 | } | 480 | } |
481 | 481 | ||
482 | int __mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index, gfp_t gfp) | 482 | int __mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index) |
483 | { | 483 | { |
484 | struct mlx4_mr_table *mr_table = &mlx4_priv(dev)->mr_table; | 484 | struct mlx4_mr_table *mr_table = &mlx4_priv(dev)->mr_table; |
485 | 485 | ||
486 | return mlx4_table_get(dev, &mr_table->dmpt_table, index, gfp); | 486 | return mlx4_table_get(dev, &mr_table->dmpt_table, index); |
487 | } | 487 | } |
488 | 488 | ||
489 | static int mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index, gfp_t gfp) | 489 | static int mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index) |
490 | { | 490 | { |
491 | u64 param = 0; | 491 | u64 param = 0; |
492 | 492 | ||
@@ -497,7 +497,7 @@ static int mlx4_mpt_alloc_icm(struct mlx4_dev *dev, u32 index, gfp_t gfp) | |||
497 | MLX4_CMD_TIME_CLASS_A, | 497 | MLX4_CMD_TIME_CLASS_A, |
498 | MLX4_CMD_WRAPPED); | 498 | MLX4_CMD_WRAPPED); |
499 | } | 499 | } |
500 | return __mlx4_mpt_alloc_icm(dev, index, gfp); | 500 | return __mlx4_mpt_alloc_icm(dev, index); |
501 | } | 501 | } |
502 | 502 | ||
503 | void __mlx4_mpt_free_icm(struct mlx4_dev *dev, u32 index) | 503 | void __mlx4_mpt_free_icm(struct mlx4_dev *dev, u32 index) |
@@ -629,7 +629,7 @@ int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr) | |||
629 | struct mlx4_mpt_entry *mpt_entry; | 629 | struct mlx4_mpt_entry *mpt_entry; |
630 | int err; | 630 | int err; |
631 | 631 | ||
632 | err = mlx4_mpt_alloc_icm(dev, key_to_hw_index(mr->key), GFP_KERNEL); | 632 | err = mlx4_mpt_alloc_icm(dev, key_to_hw_index(mr->key)); |
633 | if (err) | 633 | if (err) |
634 | return err; | 634 | return err; |
635 | 635 | ||
@@ -787,14 +787,13 @@ int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | |||
787 | EXPORT_SYMBOL_GPL(mlx4_write_mtt); | 787 | EXPORT_SYMBOL_GPL(mlx4_write_mtt); |
788 | 788 | ||
789 | int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | 789 | int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, |
790 | struct mlx4_buf *buf, gfp_t gfp) | 790 | struct mlx4_buf *buf) |
791 | { | 791 | { |
792 | u64 *page_list; | 792 | u64 *page_list; |
793 | int err; | 793 | int err; |
794 | int i; | 794 | int i; |
795 | 795 | ||
796 | page_list = kmalloc(buf->npages * sizeof *page_list, | 796 | page_list = kcalloc(buf->npages, sizeof(*page_list), GFP_KERNEL); |
797 | gfp); | ||
798 | if (!page_list) | 797 | if (!page_list) |
799 | return -ENOMEM; | 798 | return -ENOMEM; |
800 | 799 | ||
@@ -841,7 +840,7 @@ int mlx4_mw_enable(struct mlx4_dev *dev, struct mlx4_mw *mw) | |||
841 | struct mlx4_mpt_entry *mpt_entry; | 840 | struct mlx4_mpt_entry *mpt_entry; |
842 | int err; | 841 | int err; |
843 | 842 | ||
844 | err = mlx4_mpt_alloc_icm(dev, key_to_hw_index(mw->key), GFP_KERNEL); | 843 | err = mlx4_mpt_alloc_icm(dev, key_to_hw_index(mw->key)); |
845 | if (err) | 844 | if (err) |
846 | return err; | 845 | return err; |
847 | 846 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c index 5a310d313e94..26747212526b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/qp.c +++ b/drivers/net/ethernet/mellanox/mlx4/qp.c | |||
@@ -301,29 +301,29 @@ void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt) | |||
301 | } | 301 | } |
302 | EXPORT_SYMBOL_GPL(mlx4_qp_release_range); | 302 | EXPORT_SYMBOL_GPL(mlx4_qp_release_range); |
303 | 303 | ||
304 | int __mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn, gfp_t gfp) | 304 | int __mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn) |
305 | { | 305 | { |
306 | struct mlx4_priv *priv = mlx4_priv(dev); | 306 | struct mlx4_priv *priv = mlx4_priv(dev); |
307 | struct mlx4_qp_table *qp_table = &priv->qp_table; | 307 | struct mlx4_qp_table *qp_table = &priv->qp_table; |
308 | int err; | 308 | int err; |
309 | 309 | ||
310 | err = mlx4_table_get(dev, &qp_table->qp_table, qpn, gfp); | 310 | err = mlx4_table_get(dev, &qp_table->qp_table, qpn); |
311 | if (err) | 311 | if (err) |
312 | goto err_out; | 312 | goto err_out; |
313 | 313 | ||
314 | err = mlx4_table_get(dev, &qp_table->auxc_table, qpn, gfp); | 314 | err = mlx4_table_get(dev, &qp_table->auxc_table, qpn); |
315 | if (err) | 315 | if (err) |
316 | goto err_put_qp; | 316 | goto err_put_qp; |
317 | 317 | ||
318 | err = mlx4_table_get(dev, &qp_table->altc_table, qpn, gfp); | 318 | err = mlx4_table_get(dev, &qp_table->altc_table, qpn); |
319 | if (err) | 319 | if (err) |
320 | goto err_put_auxc; | 320 | goto err_put_auxc; |
321 | 321 | ||
322 | err = mlx4_table_get(dev, &qp_table->rdmarc_table, qpn, gfp); | 322 | err = mlx4_table_get(dev, &qp_table->rdmarc_table, qpn); |
323 | if (err) | 323 | if (err) |
324 | goto err_put_altc; | 324 | goto err_put_altc; |
325 | 325 | ||
326 | err = mlx4_table_get(dev, &qp_table->cmpt_table, qpn, gfp); | 326 | err = mlx4_table_get(dev, &qp_table->cmpt_table, qpn); |
327 | if (err) | 327 | if (err) |
328 | goto err_put_rdmarc; | 328 | goto err_put_rdmarc; |
329 | 329 | ||
@@ -345,7 +345,7 @@ err_out: | |||
345 | return err; | 345 | return err; |
346 | } | 346 | } |
347 | 347 | ||
348 | static int mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn, gfp_t gfp) | 348 | static int mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn) |
349 | { | 349 | { |
350 | u64 param = 0; | 350 | u64 param = 0; |
351 | 351 | ||
@@ -355,7 +355,7 @@ static int mlx4_qp_alloc_icm(struct mlx4_dev *dev, int qpn, gfp_t gfp) | |||
355 | MLX4_CMD_ALLOC_RES, MLX4_CMD_TIME_CLASS_A, | 355 | MLX4_CMD_ALLOC_RES, MLX4_CMD_TIME_CLASS_A, |
356 | MLX4_CMD_WRAPPED); | 356 | MLX4_CMD_WRAPPED); |
357 | } | 357 | } |
358 | return __mlx4_qp_alloc_icm(dev, qpn, gfp); | 358 | return __mlx4_qp_alloc_icm(dev, qpn); |
359 | } | 359 | } |
360 | 360 | ||
361 | void __mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn) | 361 | void __mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn) |
@@ -397,7 +397,7 @@ struct mlx4_qp *mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn) | |||
397 | return qp; | 397 | return qp; |
398 | } | 398 | } |
399 | 399 | ||
400 | int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp, gfp_t gfp) | 400 | int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp) |
401 | { | 401 | { |
402 | struct mlx4_priv *priv = mlx4_priv(dev); | 402 | struct mlx4_priv *priv = mlx4_priv(dev); |
403 | struct mlx4_qp_table *qp_table = &priv->qp_table; | 403 | struct mlx4_qp_table *qp_table = &priv->qp_table; |
@@ -408,7 +408,7 @@ int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp, gfp_t gfp) | |||
408 | 408 | ||
409 | qp->qpn = qpn; | 409 | qp->qpn = qpn; |
410 | 410 | ||
411 | err = mlx4_qp_alloc_icm(dev, qpn, gfp); | 411 | err = mlx4_qp_alloc_icm(dev, qpn); |
412 | if (err) | 412 | if (err) |
413 | return err; | 413 | return err; |
414 | 414 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index 812783865205..215e21c3dc8a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | |||
@@ -1822,7 +1822,7 @@ static int qp_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, | |||
1822 | return err; | 1822 | return err; |
1823 | 1823 | ||
1824 | if (!fw_reserved(dev, qpn)) { | 1824 | if (!fw_reserved(dev, qpn)) { |
1825 | err = __mlx4_qp_alloc_icm(dev, qpn, GFP_KERNEL); | 1825 | err = __mlx4_qp_alloc_icm(dev, qpn); |
1826 | if (err) { | 1826 | if (err) { |
1827 | res_abort_move(dev, slave, RES_QP, qpn); | 1827 | res_abort_move(dev, slave, RES_QP, qpn); |
1828 | return err; | 1828 | return err; |
@@ -1909,7 +1909,7 @@ static int mpt_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, | |||
1909 | if (err) | 1909 | if (err) |
1910 | return err; | 1910 | return err; |
1911 | 1911 | ||
1912 | err = __mlx4_mpt_alloc_icm(dev, mpt->key, GFP_KERNEL); | 1912 | err = __mlx4_mpt_alloc_icm(dev, mpt->key); |
1913 | if (err) { | 1913 | if (err) { |
1914 | res_abort_move(dev, slave, RES_MPT, id); | 1914 | res_abort_move(dev, slave, RES_MPT, id); |
1915 | return err; | 1915 | return err; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/srq.c b/drivers/net/ethernet/mellanox/mlx4/srq.c index f44d089e2ca6..bedf52126824 100644 --- a/drivers/net/ethernet/mellanox/mlx4/srq.c +++ b/drivers/net/ethernet/mellanox/mlx4/srq.c | |||
@@ -100,11 +100,11 @@ int __mlx4_srq_alloc_icm(struct mlx4_dev *dev, int *srqn) | |||
100 | if (*srqn == -1) | 100 | if (*srqn == -1) |
101 | return -ENOMEM; | 101 | return -ENOMEM; |
102 | 102 | ||
103 | err = mlx4_table_get(dev, &srq_table->table, *srqn, GFP_KERNEL); | 103 | err = mlx4_table_get(dev, &srq_table->table, *srqn); |
104 | if (err) | 104 | if (err) |
105 | goto err_out; | 105 | goto err_out; |
106 | 106 | ||
107 | err = mlx4_table_get(dev, &srq_table->cmpt_table, *srqn, GFP_KERNEL); | 107 | err = mlx4_table_get(dev, &srq_table->cmpt_table, *srqn); |
108 | if (err) | 108 | if (err) |
109 | goto err_put; | 109 | goto err_put; |
110 | return 0; | 110 | return 0; |
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c index 746d94e28470..60850bfa3d32 100644 --- a/drivers/net/ethernet/qualcomm/emac/emac.c +++ b/drivers/net/ethernet/qualcomm/emac/emac.c | |||
@@ -766,11 +766,13 @@ static void emac_shutdown(struct platform_device *pdev) | |||
766 | struct emac_adapter *adpt = netdev_priv(netdev); | 766 | struct emac_adapter *adpt = netdev_priv(netdev); |
767 | struct emac_sgmii *sgmii = &adpt->phy; | 767 | struct emac_sgmii *sgmii = &adpt->phy; |
768 | 768 | ||
769 | /* Closing the SGMII turns off its interrupts */ | 769 | if (netdev->flags & IFF_UP) { |
770 | sgmii->close(adpt); | 770 | /* Closing the SGMII turns off its interrupts */ |
771 | sgmii->close(adpt); | ||
771 | 772 | ||
772 | /* Resetting the MAC turns off all DMA and its interrupts */ | 773 | /* Resetting the MAC turns off all DMA and its interrupts */ |
773 | emac_mac_reset(adpt); | 774 | emac_mac_reset(adpt); |
775 | } | ||
774 | } | 776 | } |
775 | 777 | ||
776 | static struct platform_driver emac_platform_driver = { | 778 | static struct platform_driver emac_platform_driver = { |
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c index b607936e1b3e..9c0488e0f08e 100644 --- a/drivers/net/ethernet/sgi/ioc3-eth.c +++ b/drivers/net/ethernet/sgi/ioc3-eth.c | |||
@@ -90,17 +90,13 @@ struct ioc3_private { | |||
90 | spinlock_t ioc3_lock; | 90 | spinlock_t ioc3_lock; |
91 | struct mii_if_info mii; | 91 | struct mii_if_info mii; |
92 | 92 | ||
93 | struct net_device *dev; | ||
93 | struct pci_dev *pdev; | 94 | struct pci_dev *pdev; |
94 | 95 | ||
95 | /* Members used by autonegotiation */ | 96 | /* Members used by autonegotiation */ |
96 | struct timer_list ioc3_timer; | 97 | struct timer_list ioc3_timer; |
97 | }; | 98 | }; |
98 | 99 | ||
99 | static inline struct net_device *priv_netdev(struct ioc3_private *dev) | ||
100 | { | ||
101 | return (void *)dev - ((sizeof(struct net_device) + 31) & ~31); | ||
102 | } | ||
103 | |||
104 | static int ioc3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); | 100 | static int ioc3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
105 | static void ioc3_set_multicast_list(struct net_device *dev); | 101 | static void ioc3_set_multicast_list(struct net_device *dev); |
106 | static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev); | 102 | static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev); |
@@ -427,7 +423,7 @@ static void ioc3_get_eaddr_nic(struct ioc3_private *ip) | |||
427 | nic[i] = nic_read_byte(ioc3); | 423 | nic[i] = nic_read_byte(ioc3); |
428 | 424 | ||
429 | for (i = 2; i < 8; i++) | 425 | for (i = 2; i < 8; i++) |
430 | priv_netdev(ip)->dev_addr[i - 2] = nic[i]; | 426 | ip->dev->dev_addr[i - 2] = nic[i]; |
431 | } | 427 | } |
432 | 428 | ||
433 | /* | 429 | /* |
@@ -439,7 +435,7 @@ static void ioc3_get_eaddr(struct ioc3_private *ip) | |||
439 | { | 435 | { |
440 | ioc3_get_eaddr_nic(ip); | 436 | ioc3_get_eaddr_nic(ip); |
441 | 437 | ||
442 | printk("Ethernet address is %pM.\n", priv_netdev(ip)->dev_addr); | 438 | printk("Ethernet address is %pM.\n", ip->dev->dev_addr); |
443 | } | 439 | } |
444 | 440 | ||
445 | static void __ioc3_set_mac_address(struct net_device *dev) | 441 | static void __ioc3_set_mac_address(struct net_device *dev) |
@@ -790,13 +786,12 @@ static void ioc3_timer(unsigned long data) | |||
790 | */ | 786 | */ |
791 | static int ioc3_mii_init(struct ioc3_private *ip) | 787 | static int ioc3_mii_init(struct ioc3_private *ip) |
792 | { | 788 | { |
793 | struct net_device *dev = priv_netdev(ip); | ||
794 | int i, found = 0, res = 0; | 789 | int i, found = 0, res = 0; |
795 | int ioc3_phy_workaround = 1; | 790 | int ioc3_phy_workaround = 1; |
796 | u16 word; | 791 | u16 word; |
797 | 792 | ||
798 | for (i = 0; i < 32; i++) { | 793 | for (i = 0; i < 32; i++) { |
799 | word = ioc3_mdio_read(dev, i, MII_PHYSID1); | 794 | word = ioc3_mdio_read(ip->dev, i, MII_PHYSID1); |
800 | 795 | ||
801 | if (word != 0xffff && word != 0x0000) { | 796 | if (word != 0xffff && word != 0x0000) { |
802 | found = 1; | 797 | found = 1; |
@@ -1276,6 +1271,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1276 | SET_NETDEV_DEV(dev, &pdev->dev); | 1271 | SET_NETDEV_DEV(dev, &pdev->dev); |
1277 | 1272 | ||
1278 | ip = netdev_priv(dev); | 1273 | ip = netdev_priv(dev); |
1274 | ip->dev = dev; | ||
1279 | 1275 | ||
1280 | dev->irq = pdev->irq; | 1276 | dev->irq = pdev->irq; |
1281 | 1277 | ||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index f233bf8b4ebb..c4407e8e39a3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | |||
@@ -117,7 +117,7 @@ static void dwmac4_tx_queue_routing(struct mac_device_info *hw, | |||
117 | void __iomem *ioaddr = hw->pcsr; | 117 | void __iomem *ioaddr = hw->pcsr; |
118 | u32 value; | 118 | u32 value; |
119 | 119 | ||
120 | const struct stmmac_rx_routing route_possibilities[] = { | 120 | static const struct stmmac_rx_routing route_possibilities[] = { |
121 | { GMAC_RXQCTRL_AVCPQ_MASK, GMAC_RXQCTRL_AVCPQ_SHIFT }, | 121 | { GMAC_RXQCTRL_AVCPQ_MASK, GMAC_RXQCTRL_AVCPQ_SHIFT }, |
122 | { GMAC_RXQCTRL_PTPQ_MASK, GMAC_RXQCTRL_PTPQ_SHIFT }, | 122 | { GMAC_RXQCTRL_PTPQ_MASK, GMAC_RXQCTRL_PTPQ_SHIFT }, |
123 | { GMAC_RXQCTRL_DCBCPQ_MASK, GMAC_RXQCTRL_DCBCPQ_SHIFT }, | 123 | { GMAC_RXQCTRL_DCBCPQ_MASK, GMAC_RXQCTRL_DCBCPQ_SHIFT }, |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 1853f7ff6657..1763e48c84e2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -4120,8 +4120,15 @@ int stmmac_dvr_probe(struct device *device, | |||
4120 | if ((phyaddr >= 0) && (phyaddr <= 31)) | 4120 | if ((phyaddr >= 0) && (phyaddr <= 31)) |
4121 | priv->plat->phy_addr = phyaddr; | 4121 | priv->plat->phy_addr = phyaddr; |
4122 | 4122 | ||
4123 | if (priv->plat->stmmac_rst) | 4123 | if (priv->plat->stmmac_rst) { |
4124 | ret = reset_control_assert(priv->plat->stmmac_rst); | ||
4124 | reset_control_deassert(priv->plat->stmmac_rst); | 4125 | reset_control_deassert(priv->plat->stmmac_rst); |
4126 | /* Some reset controllers have only reset callback instead of | ||
4127 | * assert + deassert callbacks pair. | ||
4128 | */ | ||
4129 | if (ret == -ENOTSUPP) | ||
4130 | reset_control_reset(priv->plat->stmmac_rst); | ||
4131 | } | ||
4125 | 4132 | ||
4126 | /* Init MAC and get the capabilities */ | 4133 | /* Init MAC and get the capabilities */ |
4127 | ret = stmmac_hw_init(priv); | 4134 | ret = stmmac_hw_init(priv); |
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 46cb7f8955a2..4bb04aaf9650 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -9532,7 +9532,7 @@ static struct niu_parent *niu_get_parent(struct niu *np, | |||
9532 | p = niu_new_parent(np, id, ptype); | 9532 | p = niu_new_parent(np, id, ptype); |
9533 | 9533 | ||
9534 | if (p) { | 9534 | if (p) { |
9535 | char port_name[6]; | 9535 | char port_name[8]; |
9536 | int err; | 9536 | int err; |
9537 | 9537 | ||
9538 | sprintf(port_name, "port%d", port); | 9538 | sprintf(port_name, "port%d", port); |
@@ -9553,7 +9553,7 @@ static void niu_put_parent(struct niu *np) | |||
9553 | { | 9553 | { |
9554 | struct niu_parent *p = np->parent; | 9554 | struct niu_parent *p = np->parent; |
9555 | u8 port = np->port; | 9555 | u8 port = np->port; |
9556 | char port_name[6]; | 9556 | char port_name[8]; |
9557 | 9557 | ||
9558 | BUG_ON(!p || p->ports[port] != np); | 9558 | BUG_ON(!p || p->ports[port] != np); |
9559 | 9559 | ||
diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c index 711fbbbc4b1f..163d8d16bc24 100644 --- a/drivers/net/ethernet/tehuti/tehuti.c +++ b/drivers/net/ethernet/tehuti/tehuti.c | |||
@@ -654,6 +654,8 @@ static int bdx_ioctl_priv(struct net_device *ndev, struct ifreq *ifr, int cmd) | |||
654 | RET(-EFAULT); | 654 | RET(-EFAULT); |
655 | } | 655 | } |
656 | DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]); | 656 | DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]); |
657 | } else { | ||
658 | return -EOPNOTSUPP; | ||
657 | } | 659 | } |
658 | 660 | ||
659 | if (!capable(CAP_SYS_RAWIO)) | 661 | if (!capable(CAP_SYS_RAWIO)) |
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 1850e348f555..badd0a8caeb9 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
@@ -3089,6 +3089,31 @@ static int cpsw_probe(struct platform_device *pdev) | |||
3089 | cpsw->quirk_irq = true; | 3089 | cpsw->quirk_irq = true; |
3090 | } | 3090 | } |
3091 | 3091 | ||
3092 | ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; | ||
3093 | |||
3094 | ndev->netdev_ops = &cpsw_netdev_ops; | ||
3095 | ndev->ethtool_ops = &cpsw_ethtool_ops; | ||
3096 | netif_napi_add(ndev, &cpsw->napi_rx, cpsw_rx_poll, CPSW_POLL_WEIGHT); | ||
3097 | netif_tx_napi_add(ndev, &cpsw->napi_tx, cpsw_tx_poll, CPSW_POLL_WEIGHT); | ||
3098 | cpsw_split_res(ndev); | ||
3099 | |||
3100 | /* register the network device */ | ||
3101 | SET_NETDEV_DEV(ndev, &pdev->dev); | ||
3102 | ret = register_netdev(ndev); | ||
3103 | if (ret) { | ||
3104 | dev_err(priv->dev, "error registering net device\n"); | ||
3105 | ret = -ENODEV; | ||
3106 | goto clean_ale_ret; | ||
3107 | } | ||
3108 | |||
3109 | if (cpsw->data.dual_emac) { | ||
3110 | ret = cpsw_probe_dual_emac(priv); | ||
3111 | if (ret) { | ||
3112 | cpsw_err(priv, probe, "error probe slave 2 emac interface\n"); | ||
3113 | goto clean_unregister_netdev_ret; | ||
3114 | } | ||
3115 | } | ||
3116 | |||
3092 | /* Grab RX and TX IRQs. Note that we also have RX_THRESHOLD and | 3117 | /* Grab RX and TX IRQs. Note that we also have RX_THRESHOLD and |
3093 | * MISC IRQs which are always kept disabled with this driver so | 3118 | * MISC IRQs which are always kept disabled with this driver so |
3094 | * we will not request them. | 3119 | * we will not request them. |
@@ -3127,33 +3152,9 @@ static int cpsw_probe(struct platform_device *pdev) | |||
3127 | goto clean_ale_ret; | 3152 | goto clean_ale_ret; |
3128 | } | 3153 | } |
3129 | 3154 | ||
3130 | ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; | ||
3131 | |||
3132 | ndev->netdev_ops = &cpsw_netdev_ops; | ||
3133 | ndev->ethtool_ops = &cpsw_ethtool_ops; | ||
3134 | netif_napi_add(ndev, &cpsw->napi_rx, cpsw_rx_poll, CPSW_POLL_WEIGHT); | ||
3135 | netif_tx_napi_add(ndev, &cpsw->napi_tx, cpsw_tx_poll, CPSW_POLL_WEIGHT); | ||
3136 | cpsw_split_res(ndev); | ||
3137 | |||
3138 | /* register the network device */ | ||
3139 | SET_NETDEV_DEV(ndev, &pdev->dev); | ||
3140 | ret = register_netdev(ndev); | ||
3141 | if (ret) { | ||
3142 | dev_err(priv->dev, "error registering net device\n"); | ||
3143 | ret = -ENODEV; | ||
3144 | goto clean_ale_ret; | ||
3145 | } | ||
3146 | |||
3147 | cpsw_notice(priv, probe, | 3155 | cpsw_notice(priv, probe, |
3148 | "initialized device (regs %pa, irq %d, pool size %d)\n", | 3156 | "initialized device (regs %pa, irq %d, pool size %d)\n", |
3149 | &ss_res->start, ndev->irq, dma_params.descs_pool_size); | 3157 | &ss_res->start, ndev->irq, dma_params.descs_pool_size); |
3150 | if (cpsw->data.dual_emac) { | ||
3151 | ret = cpsw_probe_dual_emac(priv); | ||
3152 | if (ret) { | ||
3153 | cpsw_err(priv, probe, "error probe slave 2 emac interface\n"); | ||
3154 | goto clean_unregister_netdev_ret; | ||
3155 | } | ||
3156 | } | ||
3157 | 3158 | ||
3158 | pm_runtime_put(&pdev->dev); | 3159 | pm_runtime_put(&pdev->dev); |
3159 | 3160 | ||
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 00755b6a42cf..c608e1dfaf09 100644 --- a/drivers/net/phy/mdio-mux.c +++ b/drivers/net/phy/mdio-mux.c | |||
@@ -135,8 +135,8 @@ int mdio_mux_init(struct device *dev, | |||
135 | for_each_available_child_of_node(dev->of_node, child_bus_node) { | 135 | for_each_available_child_of_node(dev->of_node, child_bus_node) { |
136 | int v; | 136 | int v; |
137 | 137 | ||
138 | v = of_mdio_parse_addr(dev, child_bus_node); | 138 | r = of_property_read_u32(child_bus_node, "reg", &v); |
139 | if (v < 0) { | 139 | if (r) { |
140 | dev_err(dev, | 140 | dev_err(dev, |
141 | "Error: Failed to find reg for child %s\n", | 141 | "Error: Failed to find reg for child %s\n", |
142 | of_node_full_name(child_bus_node)); | 142 | of_node_full_name(child_bus_node)); |
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 13028833bee3..bd4303944e44 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
@@ -120,6 +120,7 @@ struct ppp { | |||
120 | int n_channels; /* how many channels are attached 54 */ | 120 | int n_channels; /* how many channels are attached 54 */ |
121 | spinlock_t rlock; /* lock for receive side 58 */ | 121 | spinlock_t rlock; /* lock for receive side 58 */ |
122 | spinlock_t wlock; /* lock for transmit side 5c */ | 122 | spinlock_t wlock; /* lock for transmit side 5c */ |
123 | int *xmit_recursion __percpu; /* xmit recursion detect */ | ||
123 | int mru; /* max receive unit 60 */ | 124 | int mru; /* max receive unit 60 */ |
124 | unsigned int flags; /* control bits 64 */ | 125 | unsigned int flags; /* control bits 64 */ |
125 | unsigned int xstate; /* transmit state bits 68 */ | 126 | unsigned int xstate; /* transmit state bits 68 */ |
@@ -1025,6 +1026,7 @@ static int ppp_dev_configure(struct net *src_net, struct net_device *dev, | |||
1025 | struct ppp *ppp = netdev_priv(dev); | 1026 | struct ppp *ppp = netdev_priv(dev); |
1026 | int indx; | 1027 | int indx; |
1027 | int err; | 1028 | int err; |
1029 | int cpu; | ||
1028 | 1030 | ||
1029 | ppp->dev = dev; | 1031 | ppp->dev = dev; |
1030 | ppp->ppp_net = src_net; | 1032 | ppp->ppp_net = src_net; |
@@ -1039,6 +1041,15 @@ static int ppp_dev_configure(struct net *src_net, struct net_device *dev, | |||
1039 | INIT_LIST_HEAD(&ppp->channels); | 1041 | INIT_LIST_HEAD(&ppp->channels); |
1040 | spin_lock_init(&ppp->rlock); | 1042 | spin_lock_init(&ppp->rlock); |
1041 | spin_lock_init(&ppp->wlock); | 1043 | spin_lock_init(&ppp->wlock); |
1044 | |||
1045 | ppp->xmit_recursion = alloc_percpu(int); | ||
1046 | if (!ppp->xmit_recursion) { | ||
1047 | err = -ENOMEM; | ||
1048 | goto err1; | ||
1049 | } | ||
1050 | for_each_possible_cpu(cpu) | ||
1051 | (*per_cpu_ptr(ppp->xmit_recursion, cpu)) = 0; | ||
1052 | |||
1042 | #ifdef CONFIG_PPP_MULTILINK | 1053 | #ifdef CONFIG_PPP_MULTILINK |
1043 | ppp->minseq = -1; | 1054 | ppp->minseq = -1; |
1044 | skb_queue_head_init(&ppp->mrq); | 1055 | skb_queue_head_init(&ppp->mrq); |
@@ -1050,11 +1061,15 @@ static int ppp_dev_configure(struct net *src_net, struct net_device *dev, | |||
1050 | 1061 | ||
1051 | err = ppp_unit_register(ppp, conf->unit, conf->ifname_is_set); | 1062 | err = ppp_unit_register(ppp, conf->unit, conf->ifname_is_set); |
1052 | if (err < 0) | 1063 | if (err < 0) |
1053 | return err; | 1064 | goto err2; |
1054 | 1065 | ||
1055 | conf->file->private_data = &ppp->file; | 1066 | conf->file->private_data = &ppp->file; |
1056 | 1067 | ||
1057 | return 0; | 1068 | return 0; |
1069 | err2: | ||
1070 | free_percpu(ppp->xmit_recursion); | ||
1071 | err1: | ||
1072 | return err; | ||
1058 | } | 1073 | } |
1059 | 1074 | ||
1060 | static const struct nla_policy ppp_nl_policy[IFLA_PPP_MAX + 1] = { | 1075 | static const struct nla_policy ppp_nl_policy[IFLA_PPP_MAX + 1] = { |
@@ -1400,18 +1415,16 @@ static void __ppp_xmit_process(struct ppp *ppp) | |||
1400 | ppp_xmit_unlock(ppp); | 1415 | ppp_xmit_unlock(ppp); |
1401 | } | 1416 | } |
1402 | 1417 | ||
1403 | static DEFINE_PER_CPU(int, ppp_xmit_recursion); | ||
1404 | |||
1405 | static void ppp_xmit_process(struct ppp *ppp) | 1418 | static void ppp_xmit_process(struct ppp *ppp) |
1406 | { | 1419 | { |
1407 | local_bh_disable(); | 1420 | local_bh_disable(); |
1408 | 1421 | ||
1409 | if (unlikely(__this_cpu_read(ppp_xmit_recursion))) | 1422 | if (unlikely(*this_cpu_ptr(ppp->xmit_recursion))) |
1410 | goto err; | 1423 | goto err; |
1411 | 1424 | ||
1412 | __this_cpu_inc(ppp_xmit_recursion); | 1425 | (*this_cpu_ptr(ppp->xmit_recursion))++; |
1413 | __ppp_xmit_process(ppp); | 1426 | __ppp_xmit_process(ppp); |
1414 | __this_cpu_dec(ppp_xmit_recursion); | 1427 | (*this_cpu_ptr(ppp->xmit_recursion))--; |
1415 | 1428 | ||
1416 | local_bh_enable(); | 1429 | local_bh_enable(); |
1417 | 1430 | ||
@@ -1905,7 +1918,7 @@ static void __ppp_channel_push(struct channel *pch) | |||
1905 | read_lock(&pch->upl); | 1918 | read_lock(&pch->upl); |
1906 | ppp = pch->ppp; | 1919 | ppp = pch->ppp; |
1907 | if (ppp) | 1920 | if (ppp) |
1908 | __ppp_xmit_process(ppp); | 1921 | ppp_xmit_process(ppp); |
1909 | read_unlock(&pch->upl); | 1922 | read_unlock(&pch->upl); |
1910 | } | 1923 | } |
1911 | } | 1924 | } |
@@ -1914,9 +1927,7 @@ static void ppp_channel_push(struct channel *pch) | |||
1914 | { | 1927 | { |
1915 | local_bh_disable(); | 1928 | local_bh_disable(); |
1916 | 1929 | ||
1917 | __this_cpu_inc(ppp_xmit_recursion); | ||
1918 | __ppp_channel_push(pch); | 1930 | __ppp_channel_push(pch); |
1919 | __this_cpu_dec(ppp_xmit_recursion); | ||
1920 | 1931 | ||
1921 | local_bh_enable(); | 1932 | local_bh_enable(); |
1922 | } | 1933 | } |
@@ -3057,6 +3068,7 @@ static void ppp_destroy_interface(struct ppp *ppp) | |||
3057 | #endif /* CONFIG_PPP_FILTER */ | 3068 | #endif /* CONFIG_PPP_FILTER */ |
3058 | 3069 | ||
3059 | kfree_skb(ppp->xmit_pending); | 3070 | kfree_skb(ppp->xmit_pending); |
3071 | free_percpu(ppp->xmit_recursion); | ||
3060 | 3072 | ||
3061 | free_netdev(ppp->dev); | 3073 | free_netdev(ppp->dev); |
3062 | } | 3074 | } |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index d103a1d4fb36..8f572b9f3625 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -768,8 +768,10 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ | |||
768 | u8 *buf; | 768 | u8 *buf; |
769 | int len; | 769 | int len; |
770 | int temp; | 770 | int temp; |
771 | int err; | ||
771 | u8 iface_no; | 772 | u8 iface_no; |
772 | struct usb_cdc_parsed_header hdr; | 773 | struct usb_cdc_parsed_header hdr; |
774 | u16 curr_ntb_format; | ||
773 | 775 | ||
774 | ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); | 776 | ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); |
775 | if (!ctx) | 777 | if (!ctx) |
@@ -874,6 +876,32 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ | |||
874 | goto error2; | 876 | goto error2; |
875 | } | 877 | } |
876 | 878 | ||
879 | /* | ||
880 | * Some Huawei devices have been observed to come out of reset in NDP32 mode. | ||
881 | * Let's check if this is the case, and set the device to NDP16 mode again if | ||
882 | * needed. | ||
883 | */ | ||
884 | if (ctx->drvflags & CDC_NCM_FLAG_RESET_NTB16) { | ||
885 | err = usbnet_read_cmd(dev, USB_CDC_GET_NTB_FORMAT, | ||
886 | USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE, | ||
887 | 0, iface_no, &curr_ntb_format, 2); | ||
888 | if (err < 0) { | ||
889 | goto error2; | ||
890 | } | ||
891 | |||
892 | if (curr_ntb_format == USB_CDC_NCM_NTB32_FORMAT) { | ||
893 | dev_info(&intf->dev, "resetting NTB format to 16-bit"); | ||
894 | err = usbnet_write_cmd(dev, USB_CDC_SET_NTB_FORMAT, | ||
895 | USB_TYPE_CLASS | USB_DIR_OUT | ||
896 | | USB_RECIP_INTERFACE, | ||
897 | USB_CDC_NCM_NTB16_FORMAT, | ||
898 | iface_no, NULL, 0); | ||
899 | |||
900 | if (err < 0) | ||
901 | goto error2; | ||
902 | } | ||
903 | } | ||
904 | |||
877 | cdc_ncm_find_endpoints(dev, ctx->data); | 905 | cdc_ncm_find_endpoints(dev, ctx->data); |
878 | cdc_ncm_find_endpoints(dev, ctx->control); | 906 | cdc_ncm_find_endpoints(dev, ctx->control); |
879 | if (!dev->in || !dev->out || !dev->status) { | 907 | if (!dev->in || !dev->out || !dev->status) { |
diff --git a/drivers/net/usb/huawei_cdc_ncm.c b/drivers/net/usb/huawei_cdc_ncm.c index 2680a65cd5e4..63f28908afda 100644 --- a/drivers/net/usb/huawei_cdc_ncm.c +++ b/drivers/net/usb/huawei_cdc_ncm.c | |||
@@ -80,6 +80,12 @@ static int huawei_cdc_ncm_bind(struct usbnet *usbnet_dev, | |||
80 | * be at the end of the frame. | 80 | * be at the end of the frame. |
81 | */ | 81 | */ |
82 | drvflags |= CDC_NCM_FLAG_NDP_TO_END; | 82 | drvflags |= CDC_NCM_FLAG_NDP_TO_END; |
83 | |||
84 | /* Additionally, it has been reported that some Huawei E3372H devices, with | ||
85 | * firmware version 21.318.01.00.541, come out of reset in NTB32 format mode, hence | ||
86 | * needing to be set to the NTB16 one again. | ||
87 | */ | ||
88 | drvflags |= CDC_NCM_FLAG_RESET_NTB16; | ||
83 | ret = cdc_ncm_bind_common(usbnet_dev, intf, 1, drvflags); | 89 | ret = cdc_ncm_bind_common(usbnet_dev, intf, 1, drvflags); |
84 | if (ret) | 90 | if (ret) |
85 | goto err; | 91 | goto err; |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 2dfca96a63b6..340c13484e5c 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -898,6 +898,7 @@ static const struct ethtool_ops smsc95xx_ethtool_ops = { | |||
898 | .set_wol = smsc95xx_ethtool_set_wol, | 898 | .set_wol = smsc95xx_ethtool_set_wol, |
899 | .get_link_ksettings = smsc95xx_get_link_ksettings, | 899 | .get_link_ksettings = smsc95xx_get_link_ksettings, |
900 | .set_link_ksettings = smsc95xx_set_link_ksettings, | 900 | .set_link_ksettings = smsc95xx_set_link_ksettings, |
901 | .get_ts_info = ethtool_op_get_ts_info, | ||
901 | }; | 902 | }; |
902 | 903 | ||
903 | static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) | 904 | static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) |
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index ba1c9f93592b..9c51b8be0038 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h | |||
@@ -311,7 +311,7 @@ struct vmxnet3_intr { | |||
311 | u8 num_intrs; /* # of intr vectors */ | 311 | u8 num_intrs; /* # of intr vectors */ |
312 | u8 event_intr_idx; /* idx of the intr vector for event */ | 312 | u8 event_intr_idx; /* idx of the intr vector for event */ |
313 | u8 mod_levels[VMXNET3_LINUX_MAX_MSIX_VECT]; /* moderation level */ | 313 | u8 mod_levels[VMXNET3_LINUX_MAX_MSIX_VECT]; /* moderation level */ |
314 | char event_msi_vector_name[IFNAMSIZ+11]; | 314 | char event_msi_vector_name[IFNAMSIZ+17]; |
315 | #ifdef CONFIG_PCI_MSI | 315 | #ifdef CONFIG_PCI_MSI |
316 | struct msix_entry msix_entries[VMXNET3_LINUX_MAX_MSIX_VECT]; | 316 | struct msix_entry msix_entries[VMXNET3_LINUX_MAX_MSIX_VECT]; |
317 | #endif | 317 | #endif |
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index 6e2e760d98b1..0b75def39c6c 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c | |||
@@ -5704,7 +5704,7 @@ static void rt2800_init_freq_calibration(struct rt2x00_dev *rt2x00dev) | |||
5704 | 5704 | ||
5705 | static void rt2800_init_bbp_5592_glrt(struct rt2x00_dev *rt2x00dev) | 5705 | static void rt2800_init_bbp_5592_glrt(struct rt2x00_dev *rt2x00dev) |
5706 | { | 5706 | { |
5707 | const u8 glrt_table[] = { | 5707 | static const u8 glrt_table[] = { |
5708 | 0xE0, 0x1F, 0X38, 0x32, 0x08, 0x28, 0x19, 0x0A, 0xFF, 0x00, /* 128 ~ 137 */ | 5708 | 0xE0, 0x1F, 0X38, 0x32, 0x08, 0x28, 0x19, 0x0A, 0xFF, 0x00, /* 128 ~ 137 */ |
5709 | 0x16, 0x10, 0x10, 0x0B, 0x36, 0x2C, 0x26, 0x24, 0x42, 0x36, /* 138 ~ 147 */ | 5709 | 0x16, 0x10, 0x10, 0x0B, 0x36, 0x2C, 0x26, 0x24, 0x42, 0x36, /* 138 ~ 147 */ |
5710 | 0x30, 0x2D, 0x4C, 0x46, 0x3D, 0x40, 0x3E, 0x42, 0x3D, 0x40, /* 148 ~ 157 */ | 5710 | 0x30, 0x2D, 0x4C, 0x46, 0x3D, 0x40, 0x3E, 0x42, 0x3D, 0x40, /* 148 ~ 157 */ |
diff --git a/drivers/nvdimm/core.c b/drivers/nvdimm/core.c index 7cd99b1f8596..75bc08c6838c 100644 --- a/drivers/nvdimm/core.c +++ b/drivers/nvdimm/core.c | |||
@@ -421,14 +421,15 @@ static void set_badblock(struct badblocks *bb, sector_t s, int num) | |||
421 | static void __add_badblock_range(struct badblocks *bb, u64 ns_offset, u64 len) | 421 | static void __add_badblock_range(struct badblocks *bb, u64 ns_offset, u64 len) |
422 | { | 422 | { |
423 | const unsigned int sector_size = 512; | 423 | const unsigned int sector_size = 512; |
424 | sector_t start_sector; | 424 | sector_t start_sector, end_sector; |
425 | u64 num_sectors; | 425 | u64 num_sectors; |
426 | u32 rem; | 426 | u32 rem; |
427 | 427 | ||
428 | start_sector = div_u64(ns_offset, sector_size); | 428 | start_sector = div_u64(ns_offset, sector_size); |
429 | num_sectors = div_u64_rem(len, sector_size, &rem); | 429 | end_sector = div_u64_rem(ns_offset + len, sector_size, &rem); |
430 | if (rem) | 430 | if (rem) |
431 | num_sectors++; | 431 | end_sector++; |
432 | num_sectors = end_sector - start_sector; | ||
432 | 433 | ||
433 | if (unlikely(num_sectors > (u64)INT_MAX)) { | 434 | if (unlikely(num_sectors > (u64)INT_MAX)) { |
434 | u64 remaining = num_sectors; | 435 | u64 remaining = num_sectors; |
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index cb96f4a7ae3a..3b77cfe5aa1e 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c | |||
@@ -336,7 +336,7 @@ static int nvme_get_stream_params(struct nvme_ctrl *ctrl, | |||
336 | 336 | ||
337 | c.directive.opcode = nvme_admin_directive_recv; | 337 | c.directive.opcode = nvme_admin_directive_recv; |
338 | c.directive.nsid = cpu_to_le32(nsid); | 338 | c.directive.nsid = cpu_to_le32(nsid); |
339 | c.directive.numd = sizeof(*s); | 339 | c.directive.numd = cpu_to_le32(sizeof(*s)); |
340 | c.directive.doper = NVME_DIR_RCV_ST_OP_PARAM; | 340 | c.directive.doper = NVME_DIR_RCV_ST_OP_PARAM; |
341 | c.directive.dtype = NVME_DIR_STREAMS; | 341 | c.directive.dtype = NVME_DIR_STREAMS; |
342 | 342 | ||
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index d10d2f279d19..8569ee771269 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c | |||
@@ -539,7 +539,7 @@ static void nvme_dif_complete(u32 p, u32 v, struct t10_pi_tuple *pi) | |||
539 | } | 539 | } |
540 | #endif | 540 | #endif |
541 | 541 | ||
542 | static bool nvme_setup_prps(struct nvme_dev *dev, struct request *req) | 542 | static blk_status_t nvme_setup_prps(struct nvme_dev *dev, struct request *req) |
543 | { | 543 | { |
544 | struct nvme_iod *iod = blk_mq_rq_to_pdu(req); | 544 | struct nvme_iod *iod = blk_mq_rq_to_pdu(req); |
545 | struct dma_pool *pool; | 545 | struct dma_pool *pool; |
@@ -556,7 +556,7 @@ static bool nvme_setup_prps(struct nvme_dev *dev, struct request *req) | |||
556 | 556 | ||
557 | length -= (page_size - offset); | 557 | length -= (page_size - offset); |
558 | if (length <= 0) | 558 | if (length <= 0) |
559 | return true; | 559 | return BLK_STS_OK; |
560 | 560 | ||
561 | dma_len -= (page_size - offset); | 561 | dma_len -= (page_size - offset); |
562 | if (dma_len) { | 562 | if (dma_len) { |
@@ -569,7 +569,7 @@ static bool nvme_setup_prps(struct nvme_dev *dev, struct request *req) | |||
569 | 569 | ||
570 | if (length <= page_size) { | 570 | if (length <= page_size) { |
571 | iod->first_dma = dma_addr; | 571 | iod->first_dma = dma_addr; |
572 | return true; | 572 | return BLK_STS_OK; |
573 | } | 573 | } |
574 | 574 | ||
575 | nprps = DIV_ROUND_UP(length, page_size); | 575 | nprps = DIV_ROUND_UP(length, page_size); |
@@ -585,7 +585,7 @@ static bool nvme_setup_prps(struct nvme_dev *dev, struct request *req) | |||
585 | if (!prp_list) { | 585 | if (!prp_list) { |
586 | iod->first_dma = dma_addr; | 586 | iod->first_dma = dma_addr; |
587 | iod->npages = -1; | 587 | iod->npages = -1; |
588 | return false; | 588 | return BLK_STS_RESOURCE; |
589 | } | 589 | } |
590 | list[0] = prp_list; | 590 | list[0] = prp_list; |
591 | iod->first_dma = prp_dma; | 591 | iod->first_dma = prp_dma; |
@@ -595,7 +595,7 @@ static bool nvme_setup_prps(struct nvme_dev *dev, struct request *req) | |||
595 | __le64 *old_prp_list = prp_list; | 595 | __le64 *old_prp_list = prp_list; |
596 | prp_list = dma_pool_alloc(pool, GFP_ATOMIC, &prp_dma); | 596 | prp_list = dma_pool_alloc(pool, GFP_ATOMIC, &prp_dma); |
597 | if (!prp_list) | 597 | if (!prp_list) |
598 | return false; | 598 | return BLK_STS_RESOURCE; |
599 | list[iod->npages++] = prp_list; | 599 | list[iod->npages++] = prp_list; |
600 | prp_list[0] = old_prp_list[i - 1]; | 600 | prp_list[0] = old_prp_list[i - 1]; |
601 | old_prp_list[i - 1] = cpu_to_le64(prp_dma); | 601 | old_prp_list[i - 1] = cpu_to_le64(prp_dma); |
@@ -609,13 +609,29 @@ static bool nvme_setup_prps(struct nvme_dev *dev, struct request *req) | |||
609 | break; | 609 | break; |
610 | if (dma_len > 0) | 610 | if (dma_len > 0) |
611 | continue; | 611 | continue; |
612 | BUG_ON(dma_len < 0); | 612 | if (unlikely(dma_len < 0)) |
613 | goto bad_sgl; | ||
613 | sg = sg_next(sg); | 614 | sg = sg_next(sg); |
614 | dma_addr = sg_dma_address(sg); | 615 | dma_addr = sg_dma_address(sg); |
615 | dma_len = sg_dma_len(sg); | 616 | dma_len = sg_dma_len(sg); |
616 | } | 617 | } |
617 | 618 | ||
618 | return true; | 619 | return BLK_STS_OK; |
620 | |||
621 | bad_sgl: | ||
622 | if (WARN_ONCE(1, "Invalid SGL for payload:%d nents:%d\n", | ||
623 | blk_rq_payload_bytes(req), iod->nents)) { | ||
624 | for_each_sg(iod->sg, sg, iod->nents, i) { | ||
625 | dma_addr_t phys = sg_phys(sg); | ||
626 | pr_warn("sg[%d] phys_addr:%pad offset:%d length:%d " | ||
627 | "dma_address:%pad dma_length:%d\n", i, &phys, | ||
628 | sg->offset, sg->length, | ||
629 | &sg_dma_address(sg), | ||
630 | sg_dma_len(sg)); | ||
631 | } | ||
632 | } | ||
633 | return BLK_STS_IOERR; | ||
634 | |||
619 | } | 635 | } |
620 | 636 | ||
621 | static blk_status_t nvme_map_data(struct nvme_dev *dev, struct request *req, | 637 | static blk_status_t nvme_map_data(struct nvme_dev *dev, struct request *req, |
@@ -637,7 +653,8 @@ static blk_status_t nvme_map_data(struct nvme_dev *dev, struct request *req, | |||
637 | DMA_ATTR_NO_WARN)) | 653 | DMA_ATTR_NO_WARN)) |
638 | goto out; | 654 | goto out; |
639 | 655 | ||
640 | if (!nvme_setup_prps(dev, req)) | 656 | ret = nvme_setup_prps(dev, req); |
657 | if (ret != BLK_STS_OK) | ||
641 | goto out_unmap; | 658 | goto out_unmap; |
642 | 659 | ||
643 | ret = BLK_STS_IOERR; | 660 | ret = BLK_STS_IOERR; |
@@ -2282,7 +2299,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2282 | 2299 | ||
2283 | result = nvme_dev_map(dev); | 2300 | result = nvme_dev_map(dev); |
2284 | if (result) | 2301 | if (result) |
2285 | goto free; | 2302 | goto put_pci; |
2286 | 2303 | ||
2287 | INIT_WORK(&dev->ctrl.reset_work, nvme_reset_work); | 2304 | INIT_WORK(&dev->ctrl.reset_work, nvme_reset_work); |
2288 | INIT_WORK(&dev->remove_work, nvme_remove_dead_ctrl_work); | 2305 | INIT_WORK(&dev->remove_work, nvme_remove_dead_ctrl_work); |
@@ -2291,7 +2308,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2291 | 2308 | ||
2292 | result = nvme_setup_prp_pools(dev); | 2309 | result = nvme_setup_prp_pools(dev); |
2293 | if (result) | 2310 | if (result) |
2294 | goto put_pci; | 2311 | goto unmap; |
2295 | 2312 | ||
2296 | quirks |= check_dell_samsung_bug(pdev); | 2313 | quirks |= check_dell_samsung_bug(pdev); |
2297 | 2314 | ||
@@ -2308,9 +2325,10 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2308 | 2325 | ||
2309 | release_pools: | 2326 | release_pools: |
2310 | nvme_release_prp_pools(dev); | 2327 | nvme_release_prp_pools(dev); |
2328 | unmap: | ||
2329 | nvme_dev_unmap(dev); | ||
2311 | put_pci: | 2330 | put_pci: |
2312 | put_device(dev->dev); | 2331 | put_device(dev->dev); |
2313 | nvme_dev_unmap(dev); | ||
2314 | free: | 2332 | free: |
2315 | kfree(dev->queues); | 2333 | kfree(dev->queues); |
2316 | kfree(dev); | 2334 | kfree(dev); |
@@ -2466,6 +2484,9 @@ static const struct pci_device_id nvme_id_table[] = { | |||
2466 | { PCI_VDEVICE(INTEL, 0x0a54), | 2484 | { PCI_VDEVICE(INTEL, 0x0a54), |
2467 | .driver_data = NVME_QUIRK_STRIPE_SIZE | | 2485 | .driver_data = NVME_QUIRK_STRIPE_SIZE | |
2468 | NVME_QUIRK_DEALLOCATE_ZEROES, }, | 2486 | NVME_QUIRK_DEALLOCATE_ZEROES, }, |
2487 | { PCI_VDEVICE(INTEL, 0x0a55), | ||
2488 | .driver_data = NVME_QUIRK_STRIPE_SIZE | | ||
2489 | NVME_QUIRK_DEALLOCATE_ZEROES, }, | ||
2469 | { PCI_VDEVICE(INTEL, 0xf1a5), /* Intel 600P/P3100 */ | 2490 | { PCI_VDEVICE(INTEL, 0xf1a5), /* Intel 600P/P3100 */ |
2470 | .driver_data = NVME_QUIRK_NO_DEEPEST_PS }, | 2491 | .driver_data = NVME_QUIRK_NO_DEEPEST_PS }, |
2471 | { PCI_VDEVICE(INTEL, 0x5845), /* Qemu emulated controller */ | 2492 | { PCI_VDEVICE(INTEL, 0x5845), /* Qemu emulated controller */ |
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 35f930db3c02..2d7a98ab53fb 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c | |||
@@ -168,11 +168,21 @@ out: | |||
168 | nvmet_req_complete(req, status); | 168 | nvmet_req_complete(req, status); |
169 | } | 169 | } |
170 | 170 | ||
171 | static void copy_and_pad(char *dst, int dst_len, const char *src, int src_len) | ||
172 | { | ||
173 | int len = min(src_len, dst_len); | ||
174 | |||
175 | memcpy(dst, src, len); | ||
176 | if (dst_len > len) | ||
177 | memset(dst + len, ' ', dst_len - len); | ||
178 | } | ||
179 | |||
171 | static void nvmet_execute_identify_ctrl(struct nvmet_req *req) | 180 | static void nvmet_execute_identify_ctrl(struct nvmet_req *req) |
172 | { | 181 | { |
173 | struct nvmet_ctrl *ctrl = req->sq->ctrl; | 182 | struct nvmet_ctrl *ctrl = req->sq->ctrl; |
174 | struct nvme_id_ctrl *id; | 183 | struct nvme_id_ctrl *id; |
175 | u16 status = 0; | 184 | u16 status = 0; |
185 | const char model[] = "Linux"; | ||
176 | 186 | ||
177 | id = kzalloc(sizeof(*id), GFP_KERNEL); | 187 | id = kzalloc(sizeof(*id), GFP_KERNEL); |
178 | if (!id) { | 188 | if (!id) { |
@@ -184,8 +194,10 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req) | |||
184 | id->vid = 0; | 194 | id->vid = 0; |
185 | id->ssvid = 0; | 195 | id->ssvid = 0; |
186 | 196 | ||
187 | memset(id->sn, ' ', sizeof(id->sn)); | 197 | bin2hex(id->sn, &ctrl->subsys->serial, |
188 | snprintf(id->sn, sizeof(id->sn), "%llx", ctrl->serial); | 198 | min(sizeof(ctrl->subsys->serial), sizeof(id->sn) / 2)); |
199 | copy_and_pad(id->mn, sizeof(id->mn), model, sizeof(model) - 1); | ||
200 | copy_and_pad(id->fr, sizeof(id->fr), UTS_RELEASE, strlen(UTS_RELEASE)); | ||
189 | 201 | ||
190 | memset(id->mn, ' ', sizeof(id->mn)); | 202 | memset(id->mn, ' ', sizeof(id->mn)); |
191 | strncpy((char *)id->mn, "Linux", sizeof(id->mn)); | 203 | strncpy((char *)id->mn, "Linux", sizeof(id->mn)); |
diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c index a358ecd93e11..0a0067e771f5 100644 --- a/drivers/nvme/target/configfs.c +++ b/drivers/nvme/target/configfs.c | |||
@@ -650,7 +650,7 @@ out_unlock: | |||
650 | 650 | ||
651 | CONFIGFS_ATTR(nvmet_subsys_, attr_allow_any_host); | 651 | CONFIGFS_ATTR(nvmet_subsys_, attr_allow_any_host); |
652 | 652 | ||
653 | static ssize_t nvmet_subsys_version_show(struct config_item *item, | 653 | static ssize_t nvmet_subsys_attr_version_show(struct config_item *item, |
654 | char *page) | 654 | char *page) |
655 | { | 655 | { |
656 | struct nvmet_subsys *subsys = to_subsys(item); | 656 | struct nvmet_subsys *subsys = to_subsys(item); |
@@ -666,7 +666,7 @@ static ssize_t nvmet_subsys_version_show(struct config_item *item, | |||
666 | (int)NVME_MINOR(subsys->ver)); | 666 | (int)NVME_MINOR(subsys->ver)); |
667 | } | 667 | } |
668 | 668 | ||
669 | static ssize_t nvmet_subsys_version_store(struct config_item *item, | 669 | static ssize_t nvmet_subsys_attr_version_store(struct config_item *item, |
670 | const char *page, size_t count) | 670 | const char *page, size_t count) |
671 | { | 671 | { |
672 | struct nvmet_subsys *subsys = to_subsys(item); | 672 | struct nvmet_subsys *subsys = to_subsys(item); |
@@ -684,11 +684,33 @@ static ssize_t nvmet_subsys_version_store(struct config_item *item, | |||
684 | 684 | ||
685 | return count; | 685 | return count; |
686 | } | 686 | } |
687 | CONFIGFS_ATTR(nvmet_subsys_, version); | 687 | CONFIGFS_ATTR(nvmet_subsys_, attr_version); |
688 | |||
689 | static ssize_t nvmet_subsys_attr_serial_show(struct config_item *item, | ||
690 | char *page) | ||
691 | { | ||
692 | struct nvmet_subsys *subsys = to_subsys(item); | ||
693 | |||
694 | return snprintf(page, PAGE_SIZE, "%llx\n", subsys->serial); | ||
695 | } | ||
696 | |||
697 | static ssize_t nvmet_subsys_attr_serial_store(struct config_item *item, | ||
698 | const char *page, size_t count) | ||
699 | { | ||
700 | struct nvmet_subsys *subsys = to_subsys(item); | ||
701 | |||
702 | down_write(&nvmet_config_sem); | ||
703 | sscanf(page, "%llx\n", &subsys->serial); | ||
704 | up_write(&nvmet_config_sem); | ||
705 | |||
706 | return count; | ||
707 | } | ||
708 | CONFIGFS_ATTR(nvmet_subsys_, attr_serial); | ||
688 | 709 | ||
689 | static struct configfs_attribute *nvmet_subsys_attrs[] = { | 710 | static struct configfs_attribute *nvmet_subsys_attrs[] = { |
690 | &nvmet_subsys_attr_attr_allow_any_host, | 711 | &nvmet_subsys_attr_attr_allow_any_host, |
691 | &nvmet_subsys_attr_version, | 712 | &nvmet_subsys_attr_attr_version, |
713 | &nvmet_subsys_attr_attr_serial, | ||
692 | NULL, | 714 | NULL, |
693 | }; | 715 | }; |
694 | 716 | ||
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index b5b4ac103748..f4b02bb4a1a8 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c | |||
@@ -767,9 +767,6 @@ u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, | |||
767 | memcpy(ctrl->subsysnqn, subsysnqn, NVMF_NQN_SIZE); | 767 | memcpy(ctrl->subsysnqn, subsysnqn, NVMF_NQN_SIZE); |
768 | memcpy(ctrl->hostnqn, hostnqn, NVMF_NQN_SIZE); | 768 | memcpy(ctrl->hostnqn, hostnqn, NVMF_NQN_SIZE); |
769 | 769 | ||
770 | /* generate a random serial number as our controllers are ephemeral: */ | ||
771 | get_random_bytes(&ctrl->serial, sizeof(ctrl->serial)); | ||
772 | |||
773 | kref_init(&ctrl->ref); | 770 | kref_init(&ctrl->ref); |
774 | ctrl->subsys = subsys; | 771 | ctrl->subsys = subsys; |
775 | 772 | ||
@@ -928,6 +925,8 @@ struct nvmet_subsys *nvmet_subsys_alloc(const char *subsysnqn, | |||
928 | return NULL; | 925 | return NULL; |
929 | 926 | ||
930 | subsys->ver = NVME_VS(1, 3, 0); /* NVMe 1.3.0 */ | 927 | subsys->ver = NVME_VS(1, 3, 0); /* NVMe 1.3.0 */ |
928 | /* generate a random serial number as our controllers are ephemeral: */ | ||
929 | get_random_bytes(&subsys->serial, sizeof(subsys->serial)); | ||
931 | 930 | ||
932 | switch (type) { | 931 | switch (type) { |
933 | case NVME_NQN_NVME: | 932 | case NVME_NQN_NVME: |
diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c index 1e6dcc241b3c..d5801c150b1c 100644 --- a/drivers/nvme/target/fc.c +++ b/drivers/nvme/target/fc.c | |||
@@ -1174,14 +1174,14 @@ nvmet_fc_ls_create_association(struct nvmet_fc_tgtport *tgtport, | |||
1174 | */ | 1174 | */ |
1175 | if (iod->rqstdatalen < FCNVME_LSDESC_CRA_RQST_MINLEN) | 1175 | if (iod->rqstdatalen < FCNVME_LSDESC_CRA_RQST_MINLEN) |
1176 | ret = VERR_CR_ASSOC_LEN; | 1176 | ret = VERR_CR_ASSOC_LEN; |
1177 | else if (rqst->desc_list_len < | 1177 | else if (be32_to_cpu(rqst->desc_list_len) < |
1178 | cpu_to_be32(FCNVME_LSDESC_CRA_RQST_MIN_LISTLEN)) | 1178 | FCNVME_LSDESC_CRA_RQST_MIN_LISTLEN) |
1179 | ret = VERR_CR_ASSOC_RQST_LEN; | 1179 | ret = VERR_CR_ASSOC_RQST_LEN; |
1180 | else if (rqst->assoc_cmd.desc_tag != | 1180 | else if (rqst->assoc_cmd.desc_tag != |
1181 | cpu_to_be32(FCNVME_LSDESC_CREATE_ASSOC_CMD)) | 1181 | cpu_to_be32(FCNVME_LSDESC_CREATE_ASSOC_CMD)) |
1182 | ret = VERR_CR_ASSOC_CMD; | 1182 | ret = VERR_CR_ASSOC_CMD; |
1183 | else if (rqst->assoc_cmd.desc_len < | 1183 | else if (be32_to_cpu(rqst->assoc_cmd.desc_len) < |
1184 | cpu_to_be32(FCNVME_LSDESC_CRA_CMD_DESC_MIN_DESCLEN)) | 1184 | FCNVME_LSDESC_CRA_CMD_DESC_MIN_DESCLEN) |
1185 | ret = VERR_CR_ASSOC_CMD_LEN; | 1185 | ret = VERR_CR_ASSOC_CMD_LEN; |
1186 | else if (!rqst->assoc_cmd.ersp_ratio || | 1186 | else if (!rqst->assoc_cmd.ersp_ratio || |
1187 | (be16_to_cpu(rqst->assoc_cmd.ersp_ratio) >= | 1187 | (be16_to_cpu(rqst->assoc_cmd.ersp_ratio) >= |
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h index 747bbdb4f9c6..e3b244c7e443 100644 --- a/drivers/nvme/target/nvmet.h +++ b/drivers/nvme/target/nvmet.h | |||
@@ -112,7 +112,6 @@ struct nvmet_ctrl { | |||
112 | 112 | ||
113 | struct mutex lock; | 113 | struct mutex lock; |
114 | u64 cap; | 114 | u64 cap; |
115 | u64 serial; | ||
116 | u32 cc; | 115 | u32 cc; |
117 | u32 csts; | 116 | u32 csts; |
118 | 117 | ||
@@ -152,6 +151,7 @@ struct nvmet_subsys { | |||
152 | u16 max_qid; | 151 | u16 max_qid; |
153 | 152 | ||
154 | u64 ver; | 153 | u64 ver; |
154 | u64 serial; | ||
155 | char *subsysnqn; | 155 | char *subsysnqn; |
156 | 156 | ||
157 | struct config_group group; | 157 | struct config_group group; |
diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c index a0d4ede9b8fc..63e3eb55f3ac 100644 --- a/drivers/nvmem/rockchip-efuse.c +++ b/drivers/nvmem/rockchip-efuse.c | |||
@@ -170,7 +170,7 @@ static const struct of_device_id rockchip_efuse_match[] = { | |||
170 | .data = (void *)&rockchip_rk3288_efuse_read, | 170 | .data = (void *)&rockchip_rk3288_efuse_read, |
171 | }, | 171 | }, |
172 | { | 172 | { |
173 | .compatible = "rockchip,rk322x-efuse", | 173 | .compatible = "rockchip,rk3228-efuse", |
174 | .data = (void *)&rockchip_rk3288_efuse_read, | 174 | .data = (void *)&rockchip_rk3288_efuse_read, |
175 | }, | 175 | }, |
176 | { | 176 | { |
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 077f62e208aa..6a4367cc9caa 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c | |||
@@ -3401,9 +3401,10 @@ static int cxlflash_afu_debug(struct cxlflash_cfg *cfg, | |||
3401 | if (is_write) { | 3401 | if (is_write) { |
3402 | req_flags |= SISL_REQ_FLAGS_HOST_WRITE; | 3402 | req_flags |= SISL_REQ_FLAGS_HOST_WRITE; |
3403 | 3403 | ||
3404 | rc = copy_from_user(kbuf, ubuf, ulen); | 3404 | if (copy_from_user(kbuf, ubuf, ulen)) { |
3405 | if (unlikely(rc)) | 3405 | rc = -EFAULT; |
3406 | goto out; | 3406 | goto out; |
3407 | } | ||
3407 | } | 3408 | } |
3408 | } | 3409 | } |
3409 | 3410 | ||
@@ -3431,8 +3432,10 @@ static int cxlflash_afu_debug(struct cxlflash_cfg *cfg, | |||
3431 | goto out; | 3432 | goto out; |
3432 | } | 3433 | } |
3433 | 3434 | ||
3434 | if (ulen && !is_write) | 3435 | if (ulen && !is_write) { |
3435 | rc = copy_to_user(ubuf, kbuf, ulen); | 3436 | if (copy_to_user(ubuf, kbuf, ulen)) |
3437 | rc = -EFAULT; | ||
3438 | } | ||
3436 | out: | 3439 | out: |
3437 | kfree(buf); | 3440 | kfree(buf); |
3438 | dev_dbg(dev, "%s: returning rc=%d\n", __func__, rc); | 3441 | dev_dbg(dev, "%s: returning rc=%d\n", __func__, rc); |
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 551d103c27f1..2bfea7082e3a 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | |||
@@ -1693,7 +1693,7 @@ static int prep_ssp_v2_hw(struct hisi_hba *hisi_hba, | |||
1693 | 1693 | ||
1694 | static int parse_trans_tx_err_code_v2_hw(u32 err_msk) | 1694 | static int parse_trans_tx_err_code_v2_hw(u32 err_msk) |
1695 | { | 1695 | { |
1696 | const u8 trans_tx_err_code_prio[] = { | 1696 | static const u8 trans_tx_err_code_prio[] = { |
1697 | TRANS_TX_OPEN_FAIL_WITH_IT_NEXUS_LOSS, | 1697 | TRANS_TX_OPEN_FAIL_WITH_IT_NEXUS_LOSS, |
1698 | TRANS_TX_ERR_PHY_NOT_ENABLE, | 1698 | TRANS_TX_ERR_PHY_NOT_ENABLE, |
1699 | TRANS_TX_OPEN_CNX_ERR_WRONG_DESTINATION, | 1699 | TRANS_TX_OPEN_CNX_ERR_WRONG_DESTINATION, |
@@ -1738,7 +1738,7 @@ static int parse_trans_tx_err_code_v2_hw(u32 err_msk) | |||
1738 | 1738 | ||
1739 | static int parse_trans_rx_err_code_v2_hw(u32 err_msk) | 1739 | static int parse_trans_rx_err_code_v2_hw(u32 err_msk) |
1740 | { | 1740 | { |
1741 | const u8 trans_rx_err_code_prio[] = { | 1741 | static const u8 trans_rx_err_code_prio[] = { |
1742 | TRANS_RX_ERR_WITH_RXFRAME_CRC_ERR, | 1742 | TRANS_RX_ERR_WITH_RXFRAME_CRC_ERR, |
1743 | TRANS_RX_ERR_WITH_RXFIS_8B10B_DISP_ERR, | 1743 | TRANS_RX_ERR_WITH_RXFIS_8B10B_DISP_ERR, |
1744 | TRANS_RX_ERR_WITH_RXFRAME_HAVE_ERRPRM, | 1744 | TRANS_RX_ERR_WITH_RXFRAME_HAVE_ERRPRM, |
@@ -1784,7 +1784,7 @@ static int parse_trans_rx_err_code_v2_hw(u32 err_msk) | |||
1784 | 1784 | ||
1785 | static int parse_dma_tx_err_code_v2_hw(u32 err_msk) | 1785 | static int parse_dma_tx_err_code_v2_hw(u32 err_msk) |
1786 | { | 1786 | { |
1787 | const u8 dma_tx_err_code_prio[] = { | 1787 | static const u8 dma_tx_err_code_prio[] = { |
1788 | DMA_TX_UNEXP_XFER_ERR, | 1788 | DMA_TX_UNEXP_XFER_ERR, |
1789 | DMA_TX_UNEXP_RETRANS_ERR, | 1789 | DMA_TX_UNEXP_RETRANS_ERR, |
1790 | DMA_TX_XFER_LEN_OVERFLOW, | 1790 | DMA_TX_XFER_LEN_OVERFLOW, |
@@ -1810,7 +1810,7 @@ static int parse_dma_tx_err_code_v2_hw(u32 err_msk) | |||
1810 | 1810 | ||
1811 | static int parse_sipc_rx_err_code_v2_hw(u32 err_msk) | 1811 | static int parse_sipc_rx_err_code_v2_hw(u32 err_msk) |
1812 | { | 1812 | { |
1813 | const u8 sipc_rx_err_code_prio[] = { | 1813 | static const u8 sipc_rx_err_code_prio[] = { |
1814 | SIPC_RX_FIS_STATUS_ERR_BIT_VLD, | 1814 | SIPC_RX_FIS_STATUS_ERR_BIT_VLD, |
1815 | SIPC_RX_PIO_WRSETUP_STATUS_DRQ_ERR, | 1815 | SIPC_RX_PIO_WRSETUP_STATUS_DRQ_ERR, |
1816 | SIPC_RX_FIS_STATUS_BSY_BIT_ERR, | 1816 | SIPC_RX_FIS_STATUS_BSY_BIT_ERR, |
@@ -1836,7 +1836,7 @@ static int parse_sipc_rx_err_code_v2_hw(u32 err_msk) | |||
1836 | 1836 | ||
1837 | static int parse_dma_rx_err_code_v2_hw(u32 err_msk) | 1837 | static int parse_dma_rx_err_code_v2_hw(u32 err_msk) |
1838 | { | 1838 | { |
1839 | const u8 dma_rx_err_code_prio[] = { | 1839 | static const u8 dma_rx_err_code_prio[] = { |
1840 | DMA_RX_UNKNOWN_FRM_ERR, | 1840 | DMA_RX_UNKNOWN_FRM_ERR, |
1841 | DMA_RX_DATA_LEN_OVERFLOW, | 1841 | DMA_RX_DATA_LEN_OVERFLOW, |
1842 | DMA_RX_DATA_LEN_UNDERFLOW, | 1842 | DMA_RX_DATA_LEN_UNDERFLOW, |
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index 47f66e949745..ed197bc8e801 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -213,7 +213,7 @@ static void sci_task_request_build_ssp_task_iu(struct isci_request *ireq) | |||
213 | * @task_context: | 213 | * @task_context: |
214 | * | 214 | * |
215 | */ | 215 | */ |
216 | static void scu_ssp_reqeust_construct_task_context( | 216 | static void scu_ssp_request_construct_task_context( |
217 | struct isci_request *ireq, | 217 | struct isci_request *ireq, |
218 | struct scu_task_context *task_context) | 218 | struct scu_task_context *task_context) |
219 | { | 219 | { |
@@ -425,7 +425,7 @@ static void scu_ssp_io_request_construct_task_context(struct isci_request *ireq, | |||
425 | u8 prot_type = scsi_get_prot_type(scmd); | 425 | u8 prot_type = scsi_get_prot_type(scmd); |
426 | u8 prot_op = scsi_get_prot_op(scmd); | 426 | u8 prot_op = scsi_get_prot_op(scmd); |
427 | 427 | ||
428 | scu_ssp_reqeust_construct_task_context(ireq, task_context); | 428 | scu_ssp_request_construct_task_context(ireq, task_context); |
429 | 429 | ||
430 | task_context->ssp_command_iu_length = | 430 | task_context->ssp_command_iu_length = |
431 | sizeof(struct ssp_cmd_iu) / sizeof(u32); | 431 | sizeof(struct ssp_cmd_iu) / sizeof(u32); |
@@ -472,7 +472,7 @@ static void scu_ssp_task_request_construct_task_context(struct isci_request *ire | |||
472 | { | 472 | { |
473 | struct scu_task_context *task_context = ireq->tc; | 473 | struct scu_task_context *task_context = ireq->tc; |
474 | 474 | ||
475 | scu_ssp_reqeust_construct_task_context(ireq, task_context); | 475 | scu_ssp_request_construct_task_context(ireq, task_context); |
476 | 476 | ||
477 | task_context->control_frame = 1; | 477 | task_context->control_frame = 1; |
478 | task_context->priority = SCU_TASK_PRIORITY_HIGH; | 478 | task_context->priority = SCU_TASK_PRIORITY_HIGH; |
@@ -495,7 +495,7 @@ static void scu_ssp_task_request_construct_task_context(struct isci_request *ire | |||
495 | * the command buffer is complete. none Revisit task context construction to | 495 | * the command buffer is complete. none Revisit task context construction to |
496 | * determine what is common for SSP/SMP/STP task context structures. | 496 | * determine what is common for SSP/SMP/STP task context structures. |
497 | */ | 497 | */ |
498 | static void scu_sata_reqeust_construct_task_context( | 498 | static void scu_sata_request_construct_task_context( |
499 | struct isci_request *ireq, | 499 | struct isci_request *ireq, |
500 | struct scu_task_context *task_context) | 500 | struct scu_task_context *task_context) |
501 | { | 501 | { |
@@ -562,7 +562,7 @@ static void scu_stp_raw_request_construct_task_context(struct isci_request *ireq | |||
562 | { | 562 | { |
563 | struct scu_task_context *task_context = ireq->tc; | 563 | struct scu_task_context *task_context = ireq->tc; |
564 | 564 | ||
565 | scu_sata_reqeust_construct_task_context(ireq, task_context); | 565 | scu_sata_request_construct_task_context(ireq, task_context); |
566 | 566 | ||
567 | task_context->control_frame = 0; | 567 | task_context->control_frame = 0; |
568 | task_context->priority = SCU_TASK_PRIORITY_NORMAL; | 568 | task_context->priority = SCU_TASK_PRIORITY_NORMAL; |
@@ -613,7 +613,7 @@ static void sci_stp_optimized_request_construct(struct isci_request *ireq, | |||
613 | struct scu_task_context *task_context = ireq->tc; | 613 | struct scu_task_context *task_context = ireq->tc; |
614 | 614 | ||
615 | /* Build the STP task context structure */ | 615 | /* Build the STP task context structure */ |
616 | scu_sata_reqeust_construct_task_context(ireq, task_context); | 616 | scu_sata_request_construct_task_context(ireq, task_context); |
617 | 617 | ||
618 | /* Copy over the SGL elements */ | 618 | /* Copy over the SGL elements */ |
619 | sci_request_build_sgl(ireq); | 619 | sci_request_build_sgl(ireq); |
@@ -1401,7 +1401,7 @@ static enum sci_status sci_stp_request_pio_data_out_transmit_data(struct isci_re | |||
1401 | * @data_buffer: The buffer of data to be copied. | 1401 | * @data_buffer: The buffer of data to be copied. |
1402 | * @length: The length of the data transfer. | 1402 | * @length: The length of the data transfer. |
1403 | * | 1403 | * |
1404 | * Copy the data from the buffer for the length specified to the IO reqeust SGL | 1404 | * Copy the data from the buffer for the length specified to the IO request SGL |
1405 | * specified data region. enum sci_status | 1405 | * specified data region. enum sci_status |
1406 | */ | 1406 | */ |
1407 | static enum sci_status | 1407 | static enum sci_status |
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index fd501f8dbb11..8660f923ace0 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -573,7 +573,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp, | |||
573 | event = DISC_EV_FAILED; | 573 | event = DISC_EV_FAILED; |
574 | } | 574 | } |
575 | if (error) | 575 | if (error) |
576 | fc_disc_error(disc, fp); | 576 | fc_disc_error(disc, ERR_PTR(error)); |
577 | else if (event != DISC_EV_NONE) | 577 | else if (event != DISC_EV_NONE) |
578 | fc_disc_done(disc, event); | 578 | fc_disc_done(disc, event); |
579 | fc_frame_free(fp); | 579 | fc_frame_free(fp); |
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index b58bba4604e8..7786c97e033f 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c | |||
@@ -1227,7 +1227,7 @@ static void qedf_rport_event_handler(struct fc_lport *lport, | |||
1227 | 1227 | ||
1228 | if (rdata->spp_type != FC_TYPE_FCP) { | 1228 | if (rdata->spp_type != FC_TYPE_FCP) { |
1229 | QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, | 1229 | QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, |
1230 | "Not offlading since since spp type isn't FCP\n"); | 1230 | "Not offloading since spp type isn't FCP\n"); |
1231 | break; | 1231 | break; |
1232 | } | 1232 | } |
1233 | if (!(rdata->ids.roles & FC_RPORT_ROLE_FCP_TARGET)) { | 1233 | if (!(rdata->ids.roles & FC_RPORT_ROLE_FCP_TARGET)) { |
diff --git a/drivers/scsi/qedi/qedi.h b/drivers/scsi/qedi/qedi.h index 32632c9b2276..91d2f51c351b 100644 --- a/drivers/scsi/qedi/qedi.h +++ b/drivers/scsi/qedi/qedi.h | |||
@@ -23,11 +23,17 @@ | |||
23 | #include <linux/qed/qed_iscsi_if.h> | 23 | #include <linux/qed/qed_iscsi_if.h> |
24 | #include <linux/qed/qed_ll2_if.h> | 24 | #include <linux/qed/qed_ll2_if.h> |
25 | #include "qedi_version.h" | 25 | #include "qedi_version.h" |
26 | #include "qedi_nvm_iscsi_cfg.h" | ||
26 | 27 | ||
27 | #define QEDI_MODULE_NAME "qedi" | 28 | #define QEDI_MODULE_NAME "qedi" |
28 | 29 | ||
29 | struct qedi_endpoint; | 30 | struct qedi_endpoint; |
30 | 31 | ||
32 | #ifndef GET_FIELD2 | ||
33 | #define GET_FIELD2(value, name) \ | ||
34 | (((value) & (name ## _MASK)) >> (name ## _OFFSET)) | ||
35 | #endif | ||
36 | |||
31 | /* | 37 | /* |
32 | * PCI function probe defines | 38 | * PCI function probe defines |
33 | */ | 39 | */ |
@@ -66,6 +72,11 @@ struct qedi_endpoint; | |||
66 | #define QEDI_HW_DMA_BOUNDARY 0xfff | 72 | #define QEDI_HW_DMA_BOUNDARY 0xfff |
67 | #define QEDI_PATH_HANDLE 0xFE0000000UL | 73 | #define QEDI_PATH_HANDLE 0xFE0000000UL |
68 | 74 | ||
75 | enum qedi_nvm_tgts { | ||
76 | QEDI_NVM_TGT_PRI, | ||
77 | QEDI_NVM_TGT_SEC, | ||
78 | }; | ||
79 | |||
69 | struct qedi_uio_ctrl { | 80 | struct qedi_uio_ctrl { |
70 | /* meta data */ | 81 | /* meta data */ |
71 | u32 uio_hsi_version; | 82 | u32 uio_hsi_version; |
@@ -283,6 +294,8 @@ struct qedi_ctx { | |||
283 | void *bdq_pbl_list; | 294 | void *bdq_pbl_list; |
284 | dma_addr_t bdq_pbl_list_dma; | 295 | dma_addr_t bdq_pbl_list_dma; |
285 | u8 bdq_pbl_list_num_entries; | 296 | u8 bdq_pbl_list_num_entries; |
297 | struct nvm_iscsi_cfg *iscsi_cfg; | ||
298 | dma_addr_t nvm_buf_dma; | ||
286 | void __iomem *bdq_primary_prod; | 299 | void __iomem *bdq_primary_prod; |
287 | void __iomem *bdq_secondary_prod; | 300 | void __iomem *bdq_secondary_prod; |
288 | u16 bdq_prod_idx; | 301 | u16 bdq_prod_idx; |
@@ -337,6 +350,10 @@ struct qedi_ctx { | |||
337 | bool use_fast_sge; | 350 | bool use_fast_sge; |
338 | 351 | ||
339 | atomic_t num_offloads; | 352 | atomic_t num_offloads; |
353 | #define SYSFS_FLAG_FW_SEL_BOOT 2 | ||
354 | #define IPV6_LEN 41 | ||
355 | #define IPV4_LEN 17 | ||
356 | struct iscsi_boot_kset *boot_kset; | ||
340 | }; | 357 | }; |
341 | 358 | ||
342 | struct qedi_work { | 359 | struct qedi_work { |
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index 19254bd739d9..93d54acd4a22 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c | |||
@@ -1411,7 +1411,7 @@ static void qedi_tmf_work(struct work_struct *work) | |||
1411 | 1411 | ||
1412 | list_work = kzalloc(sizeof(*list_work), GFP_ATOMIC); | 1412 | list_work = kzalloc(sizeof(*list_work), GFP_ATOMIC); |
1413 | if (!list_work) { | 1413 | if (!list_work) { |
1414 | QEDI_ERR(&qedi->dbg_ctx, "Memory alloction failed\n"); | 1414 | QEDI_ERR(&qedi->dbg_ctx, "Memory allocation failed\n"); |
1415 | goto abort_ret; | 1415 | goto abort_ret; |
1416 | } | 1416 | } |
1417 | 1417 | ||
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 5f5a4ef2e529..2c3783684815 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/if_vlan.h> | 20 | #include <linux/if_vlan.h> |
21 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
22 | #include <linux/iscsi_boot_sysfs.h> | ||
22 | 23 | ||
23 | #include <scsi/scsi_cmnd.h> | 24 | #include <scsi/scsi_cmnd.h> |
24 | #include <scsi/scsi_device.h> | 25 | #include <scsi/scsi_device.h> |
@@ -1143,6 +1144,30 @@ exit_setup_int: | |||
1143 | return rc; | 1144 | return rc; |
1144 | } | 1145 | } |
1145 | 1146 | ||
1147 | static void qedi_free_nvm_iscsi_cfg(struct qedi_ctx *qedi) | ||
1148 | { | ||
1149 | if (qedi->iscsi_cfg) | ||
1150 | dma_free_coherent(&qedi->pdev->dev, | ||
1151 | sizeof(struct nvm_iscsi_cfg), | ||
1152 | qedi->iscsi_cfg, qedi->nvm_buf_dma); | ||
1153 | } | ||
1154 | |||
1155 | static int qedi_alloc_nvm_iscsi_cfg(struct qedi_ctx *qedi) | ||
1156 | { | ||
1157 | qedi->iscsi_cfg = dma_zalloc_coherent(&qedi->pdev->dev, | ||
1158 | sizeof(struct nvm_iscsi_cfg), | ||
1159 | &qedi->nvm_buf_dma, GFP_KERNEL); | ||
1160 | if (!qedi->iscsi_cfg) { | ||
1161 | QEDI_ERR(&qedi->dbg_ctx, "Could not allocate NVM BUF.\n"); | ||
1162 | return -ENOMEM; | ||
1163 | } | ||
1164 | QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, | ||
1165 | "NVM BUF addr=0x%p dma=0x%llx.\n", qedi->iscsi_cfg, | ||
1166 | qedi->nvm_buf_dma); | ||
1167 | |||
1168 | return 0; | ||
1169 | } | ||
1170 | |||
1146 | static void qedi_free_bdq(struct qedi_ctx *qedi) | 1171 | static void qedi_free_bdq(struct qedi_ctx *qedi) |
1147 | { | 1172 | { |
1148 | int i; | 1173 | int i; |
@@ -1183,6 +1208,7 @@ static void qedi_free_global_queues(struct qedi_ctx *qedi) | |||
1183 | kfree(gl[i]); | 1208 | kfree(gl[i]); |
1184 | } | 1209 | } |
1185 | qedi_free_bdq(qedi); | 1210 | qedi_free_bdq(qedi); |
1211 | qedi_free_nvm_iscsi_cfg(qedi); | ||
1186 | } | 1212 | } |
1187 | 1213 | ||
1188 | static int qedi_alloc_bdq(struct qedi_ctx *qedi) | 1214 | static int qedi_alloc_bdq(struct qedi_ctx *qedi) |
@@ -1309,6 +1335,11 @@ static int qedi_alloc_global_queues(struct qedi_ctx *qedi) | |||
1309 | if (rc) | 1335 | if (rc) |
1310 | goto mem_alloc_failure; | 1336 | goto mem_alloc_failure; |
1311 | 1337 | ||
1338 | /* Allocate DMA coherent buffers for NVM_ISCSI_CFG */ | ||
1339 | rc = qedi_alloc_nvm_iscsi_cfg(qedi); | ||
1340 | if (rc) | ||
1341 | goto mem_alloc_failure; | ||
1342 | |||
1312 | /* Allocate a CQ and an associated PBL for each MSI-X | 1343 | /* Allocate a CQ and an associated PBL for each MSI-X |
1313 | * vector. | 1344 | * vector. |
1314 | */ | 1345 | */ |
@@ -1671,6 +1702,387 @@ void qedi_reset_host_mtu(struct qedi_ctx *qedi, u16 mtu) | |||
1671 | qedi_ops->ll2->start(qedi->cdev, ¶ms); | 1702 | qedi_ops->ll2->start(qedi->cdev, ¶ms); |
1672 | } | 1703 | } |
1673 | 1704 | ||
1705 | /** | ||
1706 | * qedi_get_nvram_block: - Scan through the iSCSI NVRAM block (while accounting | ||
1707 | * for gaps) for the matching absolute-pf-id of the QEDI device. | ||
1708 | */ | ||
1709 | static struct nvm_iscsi_block * | ||
1710 | qedi_get_nvram_block(struct qedi_ctx *qedi) | ||
1711 | { | ||
1712 | int i; | ||
1713 | u8 pf; | ||
1714 | u32 flags; | ||
1715 | struct nvm_iscsi_block *block; | ||
1716 | |||
1717 | pf = qedi->dev_info.common.abs_pf_id; | ||
1718 | block = &qedi->iscsi_cfg->block[0]; | ||
1719 | for (i = 0; i < NUM_OF_ISCSI_PF_SUPPORTED; i++, block++) { | ||
1720 | flags = ((block->id) & NVM_ISCSI_CFG_BLK_CTRL_FLAG_MASK) >> | ||
1721 | NVM_ISCSI_CFG_BLK_CTRL_FLAG_OFFSET; | ||
1722 | if (flags & (NVM_ISCSI_CFG_BLK_CTRL_FLAG_IS_NOT_EMPTY | | ||
1723 | NVM_ISCSI_CFG_BLK_CTRL_FLAG_PF_MAPPED) && | ||
1724 | (pf == (block->id & NVM_ISCSI_CFG_BLK_MAPPED_PF_ID_MASK) | ||
1725 | >> NVM_ISCSI_CFG_BLK_MAPPED_PF_ID_OFFSET)) | ||
1726 | return block; | ||
1727 | } | ||
1728 | return NULL; | ||
1729 | } | ||
1730 | |||
1731 | static ssize_t qedi_show_boot_eth_info(void *data, int type, char *buf) | ||
1732 | { | ||
1733 | struct qedi_ctx *qedi = data; | ||
1734 | struct nvm_iscsi_initiator *initiator; | ||
1735 | char *str = buf; | ||
1736 | int rc = 1; | ||
1737 | u32 ipv6_en, dhcp_en, ip_len; | ||
1738 | struct nvm_iscsi_block *block; | ||
1739 | char *fmt, *ip, *sub, *gw; | ||
1740 | |||
1741 | block = qedi_get_nvram_block(qedi); | ||
1742 | if (!block) | ||
1743 | return 0; | ||
1744 | |||
1745 | initiator = &block->initiator; | ||
1746 | ipv6_en = block->generic.ctrl_flags & | ||
1747 | NVM_ISCSI_CFG_GEN_IPV6_ENABLED; | ||
1748 | dhcp_en = block->generic.ctrl_flags & | ||
1749 | NVM_ISCSI_CFG_GEN_DHCP_TCPIP_CONFIG_ENABLED; | ||
1750 | /* Static IP assignments. */ | ||
1751 | fmt = ipv6_en ? "%pI6\n" : "%pI4\n"; | ||
1752 | ip = ipv6_en ? initiator->ipv6.addr.byte : initiator->ipv4.addr.byte; | ||
1753 | ip_len = ipv6_en ? IPV6_LEN : IPV4_LEN; | ||
1754 | sub = ipv6_en ? initiator->ipv6.subnet_mask.byte : | ||
1755 | initiator->ipv4.subnet_mask.byte; | ||
1756 | gw = ipv6_en ? initiator->ipv6.gateway.byte : | ||
1757 | initiator->ipv4.gateway.byte; | ||
1758 | /* DHCP IP adjustments. */ | ||
1759 | fmt = dhcp_en ? "%s\n" : fmt; | ||
1760 | if (dhcp_en) { | ||
1761 | ip = ipv6_en ? "0::0" : "0.0.0.0"; | ||
1762 | sub = ip; | ||
1763 | gw = ip; | ||
1764 | ip_len = ipv6_en ? 5 : 8; | ||
1765 | } | ||
1766 | |||
1767 | switch (type) { | ||
1768 | case ISCSI_BOOT_ETH_IP_ADDR: | ||
1769 | rc = snprintf(str, ip_len, fmt, ip); | ||
1770 | break; | ||
1771 | case ISCSI_BOOT_ETH_SUBNET_MASK: | ||
1772 | rc = snprintf(str, ip_len, fmt, sub); | ||
1773 | break; | ||
1774 | case ISCSI_BOOT_ETH_GATEWAY: | ||
1775 | rc = snprintf(str, ip_len, fmt, gw); | ||
1776 | break; | ||
1777 | case ISCSI_BOOT_ETH_FLAGS: | ||
1778 | rc = snprintf(str, 3, "%hhd\n", | ||
1779 | SYSFS_FLAG_FW_SEL_BOOT); | ||
1780 | break; | ||
1781 | case ISCSI_BOOT_ETH_INDEX: | ||
1782 | rc = snprintf(str, 3, "0\n"); | ||
1783 | break; | ||
1784 | case ISCSI_BOOT_ETH_MAC: | ||
1785 | rc = sysfs_format_mac(str, qedi->mac, ETH_ALEN); | ||
1786 | break; | ||
1787 | case ISCSI_BOOT_ETH_VLAN: | ||
1788 | rc = snprintf(str, 12, "%d\n", | ||
1789 | GET_FIELD2(initiator->generic_cont0, | ||
1790 | NVM_ISCSI_CFG_INITIATOR_VLAN)); | ||
1791 | break; | ||
1792 | case ISCSI_BOOT_ETH_ORIGIN: | ||
1793 | if (dhcp_en) | ||
1794 | rc = snprintf(str, 3, "3\n"); | ||
1795 | break; | ||
1796 | default: | ||
1797 | rc = 0; | ||
1798 | break; | ||
1799 | } | ||
1800 | |||
1801 | return rc; | ||
1802 | } | ||
1803 | |||
1804 | static umode_t qedi_eth_get_attr_visibility(void *data, int type) | ||
1805 | { | ||
1806 | int rc = 1; | ||
1807 | |||
1808 | switch (type) { | ||
1809 | case ISCSI_BOOT_ETH_FLAGS: | ||
1810 | case ISCSI_BOOT_ETH_MAC: | ||
1811 | case ISCSI_BOOT_ETH_INDEX: | ||
1812 | case ISCSI_BOOT_ETH_IP_ADDR: | ||
1813 | case ISCSI_BOOT_ETH_SUBNET_MASK: | ||
1814 | case ISCSI_BOOT_ETH_GATEWAY: | ||
1815 | case ISCSI_BOOT_ETH_ORIGIN: | ||
1816 | case ISCSI_BOOT_ETH_VLAN: | ||
1817 | rc = 0444; | ||
1818 | break; | ||
1819 | default: | ||
1820 | rc = 0; | ||
1821 | break; | ||
1822 | } | ||
1823 | return rc; | ||
1824 | } | ||
1825 | |||
1826 | static ssize_t qedi_show_boot_ini_info(void *data, int type, char *buf) | ||
1827 | { | ||
1828 | struct qedi_ctx *qedi = data; | ||
1829 | struct nvm_iscsi_initiator *initiator; | ||
1830 | char *str = buf; | ||
1831 | int rc; | ||
1832 | struct nvm_iscsi_block *block; | ||
1833 | |||
1834 | block = qedi_get_nvram_block(qedi); | ||
1835 | if (!block) | ||
1836 | return 0; | ||
1837 | |||
1838 | initiator = &block->initiator; | ||
1839 | |||
1840 | switch (type) { | ||
1841 | case ISCSI_BOOT_INI_INITIATOR_NAME: | ||
1842 | rc = snprintf(str, NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN, "%s\n", | ||
1843 | initiator->initiator_name.byte); | ||
1844 | break; | ||
1845 | default: | ||
1846 | rc = 0; | ||
1847 | break; | ||
1848 | } | ||
1849 | return rc; | ||
1850 | } | ||
1851 | |||
1852 | static umode_t qedi_ini_get_attr_visibility(void *data, int type) | ||
1853 | { | ||
1854 | int rc; | ||
1855 | |||
1856 | switch (type) { | ||
1857 | case ISCSI_BOOT_INI_INITIATOR_NAME: | ||
1858 | rc = 0444; | ||
1859 | break; | ||
1860 | default: | ||
1861 | rc = 0; | ||
1862 | break; | ||
1863 | } | ||
1864 | return rc; | ||
1865 | } | ||
1866 | |||
1867 | static ssize_t | ||
1868 | qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type, | ||
1869 | char *buf, enum qedi_nvm_tgts idx) | ||
1870 | { | ||
1871 | char *str = buf; | ||
1872 | int rc = 1; | ||
1873 | u32 ctrl_flags, ipv6_en, chap_en, mchap_en, ip_len; | ||
1874 | struct nvm_iscsi_block *block; | ||
1875 | char *chap_name, *chap_secret; | ||
1876 | char *mchap_name, *mchap_secret; | ||
1877 | |||
1878 | block = qedi_get_nvram_block(qedi); | ||
1879 | if (!block) | ||
1880 | goto exit_show_tgt_info; | ||
1881 | |||
1882 | QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_EVT, | ||
1883 | "Port:%d, tgt_idx:%d\n", | ||
1884 | GET_FIELD2(block->id, NVM_ISCSI_CFG_BLK_MAPPED_PF_ID), idx); | ||
1885 | |||
1886 | ctrl_flags = block->target[idx].ctrl_flags & | ||
1887 | NVM_ISCSI_CFG_TARGET_ENABLED; | ||
1888 | |||
1889 | if (!ctrl_flags) { | ||
1890 | QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_EVT, | ||
1891 | "Target disabled\n"); | ||
1892 | goto exit_show_tgt_info; | ||
1893 | } | ||
1894 | |||
1895 | ipv6_en = block->generic.ctrl_flags & | ||
1896 | NVM_ISCSI_CFG_GEN_IPV6_ENABLED; | ||
1897 | ip_len = ipv6_en ? IPV6_LEN : IPV4_LEN; | ||
1898 | chap_en = block->generic.ctrl_flags & | ||
1899 | NVM_ISCSI_CFG_GEN_CHAP_ENABLED; | ||
1900 | chap_name = chap_en ? block->initiator.chap_name.byte : NULL; | ||
1901 | chap_secret = chap_en ? block->initiator.chap_password.byte : NULL; | ||
1902 | |||
1903 | mchap_en = block->generic.ctrl_flags & | ||
1904 | NVM_ISCSI_CFG_GEN_CHAP_MUTUAL_ENABLED; | ||
1905 | mchap_name = mchap_en ? block->target[idx].chap_name.byte : NULL; | ||
1906 | mchap_secret = mchap_en ? block->target[idx].chap_password.byte : NULL; | ||
1907 | |||
1908 | switch (type) { | ||
1909 | case ISCSI_BOOT_TGT_NAME: | ||
1910 | rc = snprintf(str, NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN, "%s\n", | ||
1911 | block->target[idx].target_name.byte); | ||
1912 | break; | ||
1913 | case ISCSI_BOOT_TGT_IP_ADDR: | ||
1914 | if (ipv6_en) | ||
1915 | rc = snprintf(str, ip_len, "%pI6\n", | ||
1916 | block->target[idx].ipv6_addr.byte); | ||
1917 | else | ||
1918 | rc = snprintf(str, ip_len, "%pI4\n", | ||
1919 | block->target[idx].ipv4_addr.byte); | ||
1920 | break; | ||
1921 | case ISCSI_BOOT_TGT_PORT: | ||
1922 | rc = snprintf(str, 12, "%d\n", | ||
1923 | GET_FIELD2(block->target[idx].generic_cont0, | ||
1924 | NVM_ISCSI_CFG_TARGET_TCP_PORT)); | ||
1925 | break; | ||
1926 | case ISCSI_BOOT_TGT_LUN: | ||
1927 | rc = snprintf(str, 22, "%.*d\n", | ||
1928 | block->target[idx].lun.value[1], | ||
1929 | block->target[idx].lun.value[0]); | ||
1930 | break; | ||
1931 | case ISCSI_BOOT_TGT_CHAP_NAME: | ||
1932 | rc = snprintf(str, NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN, "%s\n", | ||
1933 | chap_name); | ||
1934 | break; | ||
1935 | case ISCSI_BOOT_TGT_CHAP_SECRET: | ||
1936 | rc = snprintf(str, NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN, "%s\n", | ||
1937 | chap_secret); | ||
1938 | break; | ||
1939 | case ISCSI_BOOT_TGT_REV_CHAP_NAME: | ||
1940 | rc = snprintf(str, NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN, "%s\n", | ||
1941 | mchap_name); | ||
1942 | break; | ||
1943 | case ISCSI_BOOT_TGT_REV_CHAP_SECRET: | ||
1944 | rc = snprintf(str, NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN, "%s\n", | ||
1945 | mchap_secret); | ||
1946 | break; | ||
1947 | case ISCSI_BOOT_TGT_FLAGS: | ||
1948 | rc = snprintf(str, 3, "%hhd\n", SYSFS_FLAG_FW_SEL_BOOT); | ||
1949 | break; | ||
1950 | case ISCSI_BOOT_TGT_NIC_ASSOC: | ||
1951 | rc = snprintf(str, 3, "0\n"); | ||
1952 | break; | ||
1953 | default: | ||
1954 | rc = 0; | ||
1955 | break; | ||
1956 | } | ||
1957 | |||
1958 | exit_show_tgt_info: | ||
1959 | return rc; | ||
1960 | } | ||
1961 | |||
1962 | static ssize_t qedi_show_boot_tgt_pri_info(void *data, int type, char *buf) | ||
1963 | { | ||
1964 | struct qedi_ctx *qedi = data; | ||
1965 | |||
1966 | return qedi_show_boot_tgt_info(qedi, type, buf, QEDI_NVM_TGT_PRI); | ||
1967 | } | ||
1968 | |||
1969 | static ssize_t qedi_show_boot_tgt_sec_info(void *data, int type, char *buf) | ||
1970 | { | ||
1971 | struct qedi_ctx *qedi = data; | ||
1972 | |||
1973 | return qedi_show_boot_tgt_info(qedi, type, buf, QEDI_NVM_TGT_SEC); | ||
1974 | } | ||
1975 | |||
1976 | static umode_t qedi_tgt_get_attr_visibility(void *data, int type) | ||
1977 | { | ||
1978 | int rc; | ||
1979 | |||
1980 | switch (type) { | ||
1981 | case ISCSI_BOOT_TGT_NAME: | ||
1982 | case ISCSI_BOOT_TGT_IP_ADDR: | ||
1983 | case ISCSI_BOOT_TGT_PORT: | ||
1984 | case ISCSI_BOOT_TGT_LUN: | ||
1985 | case ISCSI_BOOT_TGT_CHAP_NAME: | ||
1986 | case ISCSI_BOOT_TGT_CHAP_SECRET: | ||
1987 | case ISCSI_BOOT_TGT_REV_CHAP_NAME: | ||
1988 | case ISCSI_BOOT_TGT_REV_CHAP_SECRET: | ||
1989 | case ISCSI_BOOT_TGT_NIC_ASSOC: | ||
1990 | case ISCSI_BOOT_TGT_FLAGS: | ||
1991 | rc = 0444; | ||
1992 | break; | ||
1993 | default: | ||
1994 | rc = 0; | ||
1995 | break; | ||
1996 | } | ||
1997 | return rc; | ||
1998 | } | ||
1999 | |||
2000 | static void qedi_boot_release(void *data) | ||
2001 | { | ||
2002 | struct qedi_ctx *qedi = data; | ||
2003 | |||
2004 | scsi_host_put(qedi->shost); | ||
2005 | } | ||
2006 | |||
2007 | static int qedi_get_boot_info(struct qedi_ctx *qedi) | ||
2008 | { | ||
2009 | int ret = 1; | ||
2010 | u16 len; | ||
2011 | |||
2012 | len = sizeof(struct nvm_iscsi_cfg); | ||
2013 | |||
2014 | QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, | ||
2015 | "Get NVM iSCSI CFG image\n"); | ||
2016 | ret = qedi_ops->common->nvm_get_image(qedi->cdev, | ||
2017 | QED_NVM_IMAGE_ISCSI_CFG, | ||
2018 | (char *)qedi->iscsi_cfg, len); | ||
2019 | if (ret) | ||
2020 | QEDI_ERR(&qedi->dbg_ctx, | ||
2021 | "Could not get NVM image. ret = %d\n", ret); | ||
2022 | |||
2023 | return ret; | ||
2024 | } | ||
2025 | |||
2026 | static int qedi_setup_boot_info(struct qedi_ctx *qedi) | ||
2027 | { | ||
2028 | struct iscsi_boot_kobj *boot_kobj; | ||
2029 | |||
2030 | if (qedi_get_boot_info(qedi)) | ||
2031 | return -EPERM; | ||
2032 | |||
2033 | qedi->boot_kset = iscsi_boot_create_host_kset(qedi->shost->host_no); | ||
2034 | if (!qedi->boot_kset) | ||
2035 | goto kset_free; | ||
2036 | |||
2037 | if (!scsi_host_get(qedi->shost)) | ||
2038 | goto kset_free; | ||
2039 | |||
2040 | boot_kobj = iscsi_boot_create_target(qedi->boot_kset, 0, qedi, | ||
2041 | qedi_show_boot_tgt_pri_info, | ||
2042 | qedi_tgt_get_attr_visibility, | ||
2043 | qedi_boot_release); | ||
2044 | if (!boot_kobj) | ||
2045 | goto put_host; | ||
2046 | |||
2047 | if (!scsi_host_get(qedi->shost)) | ||
2048 | goto kset_free; | ||
2049 | |||
2050 | boot_kobj = iscsi_boot_create_target(qedi->boot_kset, 1, qedi, | ||
2051 | qedi_show_boot_tgt_sec_info, | ||
2052 | qedi_tgt_get_attr_visibility, | ||
2053 | qedi_boot_release); | ||
2054 | if (!boot_kobj) | ||
2055 | goto put_host; | ||
2056 | |||
2057 | if (!scsi_host_get(qedi->shost)) | ||
2058 | goto kset_free; | ||
2059 | |||
2060 | boot_kobj = iscsi_boot_create_initiator(qedi->boot_kset, 0, qedi, | ||
2061 | qedi_show_boot_ini_info, | ||
2062 | qedi_ini_get_attr_visibility, | ||
2063 | qedi_boot_release); | ||
2064 | if (!boot_kobj) | ||
2065 | goto put_host; | ||
2066 | |||
2067 | if (!scsi_host_get(qedi->shost)) | ||
2068 | goto kset_free; | ||
2069 | |||
2070 | boot_kobj = iscsi_boot_create_ethernet(qedi->boot_kset, 0, qedi, | ||
2071 | qedi_show_boot_eth_info, | ||
2072 | qedi_eth_get_attr_visibility, | ||
2073 | qedi_boot_release); | ||
2074 | if (!boot_kobj) | ||
2075 | goto put_host; | ||
2076 | |||
2077 | return 0; | ||
2078 | |||
2079 | put_host: | ||
2080 | scsi_host_put(qedi->shost); | ||
2081 | kset_free: | ||
2082 | iscsi_boot_destroy_kset(qedi->boot_kset); | ||
2083 | return -ENOMEM; | ||
2084 | } | ||
2085 | |||
1674 | static void __qedi_remove(struct pci_dev *pdev, int mode) | 2086 | static void __qedi_remove(struct pci_dev *pdev, int mode) |
1675 | { | 2087 | { |
1676 | struct qedi_ctx *qedi = pci_get_drvdata(pdev); | 2088 | struct qedi_ctx *qedi = pci_get_drvdata(pdev); |
@@ -1724,6 +2136,9 @@ static void __qedi_remove(struct pci_dev *pdev, int mode) | |||
1724 | qedi->ll2_recv_thread = NULL; | 2136 | qedi->ll2_recv_thread = NULL; |
1725 | } | 2137 | } |
1726 | qedi_ll2_free_skbs(qedi); | 2138 | qedi_ll2_free_skbs(qedi); |
2139 | |||
2140 | if (qedi->boot_kset) | ||
2141 | iscsi_boot_destroy_kset(qedi->boot_kset); | ||
1727 | } | 2142 | } |
1728 | } | 2143 | } |
1729 | 2144 | ||
@@ -1967,6 +2382,10 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) | |||
1967 | /* F/w needs 1st task context memory entry for performance */ | 2382 | /* F/w needs 1st task context memory entry for performance */ |
1968 | set_bit(QEDI_RESERVE_TASK_ID, qedi->task_idx_map); | 2383 | set_bit(QEDI_RESERVE_TASK_ID, qedi->task_idx_map); |
1969 | atomic_set(&qedi->num_offloads, 0); | 2384 | atomic_set(&qedi->num_offloads, 0); |
2385 | |||
2386 | if (qedi_setup_boot_info(qedi)) | ||
2387 | QEDI_ERR(&qedi->dbg_ctx, | ||
2388 | "No iSCSI boot target configured\n"); | ||
1970 | } | 2389 | } |
1971 | 2390 | ||
1972 | return 0; | 2391 | return 0; |
diff --git a/drivers/scsi/qedi/qedi_nvm_iscsi_cfg.h b/drivers/scsi/qedi/qedi_nvm_iscsi_cfg.h new file mode 100644 index 000000000000..df39b69b366d --- /dev/null +++ b/drivers/scsi/qedi/qedi_nvm_iscsi_cfg.h | |||
@@ -0,0 +1,210 @@ | |||
1 | /* | ||
2 | * QLogic iSCSI Offload Driver | ||
3 | * Copyright (c) 2016 Cavium Inc. | ||
4 | * | ||
5 | * This software is available under the terms of the GNU General Public License | ||
6 | * (GPL) Version 2, available from the file COPYING in the main directory of | ||
7 | * this source tree. | ||
8 | */ | ||
9 | |||
10 | #ifndef NVM_ISCSI_CFG_H | ||
11 | #define NVM_ISCSI_CFG_H | ||
12 | |||
13 | #define NUM_OF_ISCSI_TARGET_PER_PF 4 /* Defined as per the | ||
14 | * ISCSI IBFT constraint | ||
15 | */ | ||
16 | #define NUM_OF_ISCSI_PF_SUPPORTED 4 /* One PF per Port - | ||
17 | * assuming 4 port card | ||
18 | */ | ||
19 | |||
20 | #define NVM_ISCSI_CFG_DHCP_NAME_MAX_LEN 256 | ||
21 | |||
22 | union nvm_iscsi_dhcp_vendor_id { | ||
23 | u32 value[NVM_ISCSI_CFG_DHCP_NAME_MAX_LEN / 4]; | ||
24 | u8 byte[NVM_ISCSI_CFG_DHCP_NAME_MAX_LEN]; | ||
25 | }; | ||
26 | |||
27 | #define NVM_ISCSI_IPV4_ADDR_BYTE_LEN 4 | ||
28 | union nvm_iscsi_ipv4_addr { | ||
29 | u32 addr; | ||
30 | u8 byte[NVM_ISCSI_IPV4_ADDR_BYTE_LEN]; | ||
31 | }; | ||
32 | |||
33 | #define NVM_ISCSI_IPV6_ADDR_BYTE_LEN 16 | ||
34 | union nvm_iscsi_ipv6_addr { | ||
35 | u32 addr[4]; | ||
36 | u8 byte[NVM_ISCSI_IPV6_ADDR_BYTE_LEN]; | ||
37 | }; | ||
38 | |||
39 | struct nvm_iscsi_initiator_ipv4 { | ||
40 | union nvm_iscsi_ipv4_addr addr; /* 0x0 */ | ||
41 | union nvm_iscsi_ipv4_addr subnet_mask; /* 0x4 */ | ||
42 | union nvm_iscsi_ipv4_addr gateway; /* 0x8 */ | ||
43 | union nvm_iscsi_ipv4_addr primary_dns; /* 0xC */ | ||
44 | union nvm_iscsi_ipv4_addr secondary_dns; /* 0x10 */ | ||
45 | union nvm_iscsi_ipv4_addr dhcp_addr; /* 0x14 */ | ||
46 | |||
47 | union nvm_iscsi_ipv4_addr isns_server; /* 0x18 */ | ||
48 | union nvm_iscsi_ipv4_addr slp_server; /* 0x1C */ | ||
49 | union nvm_iscsi_ipv4_addr primay_radius_server; /* 0x20 */ | ||
50 | union nvm_iscsi_ipv4_addr secondary_radius_server; /* 0x24 */ | ||
51 | |||
52 | union nvm_iscsi_ipv4_addr rsvd[4]; /* 0x28 */ | ||
53 | }; | ||
54 | |||
55 | struct nvm_iscsi_initiator_ipv6 { | ||
56 | union nvm_iscsi_ipv6_addr addr; /* 0x0 */ | ||
57 | union nvm_iscsi_ipv6_addr subnet_mask; /* 0x10 */ | ||
58 | union nvm_iscsi_ipv6_addr gateway; /* 0x20 */ | ||
59 | union nvm_iscsi_ipv6_addr primary_dns; /* 0x30 */ | ||
60 | union nvm_iscsi_ipv6_addr secondary_dns; /* 0x40 */ | ||
61 | union nvm_iscsi_ipv6_addr dhcp_addr; /* 0x50 */ | ||
62 | |||
63 | union nvm_iscsi_ipv6_addr isns_server; /* 0x60 */ | ||
64 | union nvm_iscsi_ipv6_addr slp_server; /* 0x70 */ | ||
65 | union nvm_iscsi_ipv6_addr primay_radius_server; /* 0x80 */ | ||
66 | union nvm_iscsi_ipv6_addr secondary_radius_server; /* 0x90 */ | ||
67 | |||
68 | union nvm_iscsi_ipv6_addr rsvd[3]; /* 0xA0 */ | ||
69 | |||
70 | u32 config; /* 0xD0 */ | ||
71 | #define NVM_ISCSI_CFG_INITIATOR_IPV6_SUBNET_MASK_PREFIX_MASK 0x000000FF | ||
72 | #define NVM_ISCSI_CFG_INITIATOR_IPV6_SUBNET_MASK_PREFIX_OFFSET 0 | ||
73 | |||
74 | u32 rsvd_1[3]; | ||
75 | }; | ||
76 | |||
77 | #define NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN 256 | ||
78 | union nvm_iscsi_name { | ||
79 | u32 value[NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN / 4]; | ||
80 | u8 byte[NVM_ISCSI_CFG_ISCSI_NAME_MAX_LEN]; | ||
81 | }; | ||
82 | |||
83 | #define NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN 256 | ||
84 | union nvm_iscsi_chap_name { | ||
85 | u32 value[NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN / 4]; | ||
86 | u8 byte[NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN]; | ||
87 | }; | ||
88 | |||
89 | #define NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN 16 /* md5 need per RFC1996 | ||
90 | * is 16 octets | ||
91 | */ | ||
92 | union nvm_iscsi_chap_password { | ||
93 | u32 value[NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN / 4]; | ||
94 | u8 byte[NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN]; | ||
95 | }; | ||
96 | |||
97 | union nvm_iscsi_lun { | ||
98 | u8 byte[8]; | ||
99 | u32 value[2]; | ||
100 | }; | ||
101 | |||
102 | struct nvm_iscsi_generic { | ||
103 | u32 ctrl_flags; /* 0x0 */ | ||
104 | #define NVM_ISCSI_CFG_GEN_CHAP_ENABLED BIT(0) | ||
105 | #define NVM_ISCSI_CFG_GEN_DHCP_TCPIP_CONFIG_ENABLED BIT(1) | ||
106 | #define NVM_ISCSI_CFG_GEN_DHCP_ISCSI_CONFIG_ENABLED BIT(2) | ||
107 | #define NVM_ISCSI_CFG_GEN_IPV6_ENABLED BIT(3) | ||
108 | #define NVM_ISCSI_CFG_GEN_IPV4_FALLBACK_ENABLED BIT(4) | ||
109 | #define NVM_ISCSI_CFG_GEN_ISNS_WORLD_LOGIN BIT(5) | ||
110 | #define NVM_ISCSI_CFG_GEN_ISNS_SELECTIVE_LOGIN BIT(6) | ||
111 | #define NVM_ISCSI_CFG_GEN_ADDR_REDIRECT_ENABLED BIT(7) | ||
112 | #define NVM_ISCSI_CFG_GEN_CHAP_MUTUAL_ENABLED BIT(8) | ||
113 | |||
114 | u32 timeout; /* 0x4 */ | ||
115 | #define NVM_ISCSI_CFG_GEN_DHCP_REQUEST_TIMEOUT_MASK 0x0000FFFF | ||
116 | #define NVM_ISCSI_CFG_GEN_DHCP_REQUEST_TIMEOUT_OFFSET 0 | ||
117 | #define NVM_ISCSI_CFG_GEN_PORT_LOGIN_TIMEOUT_MASK 0xFFFF0000 | ||
118 | #define NVM_ISCSI_CFG_GEN_PORT_LOGIN_TIMEOUT_OFFSET 16 | ||
119 | |||
120 | union nvm_iscsi_dhcp_vendor_id dhcp_vendor_id; /* 0x8 */ | ||
121 | u32 rsvd[62]; /* 0x108 */ | ||
122 | }; | ||
123 | |||
124 | struct nvm_iscsi_initiator { | ||
125 | struct nvm_iscsi_initiator_ipv4 ipv4; /* 0x0 */ | ||
126 | struct nvm_iscsi_initiator_ipv6 ipv6; /* 0x38 */ | ||
127 | |||
128 | union nvm_iscsi_name initiator_name; /* 0x118 */ | ||
129 | union nvm_iscsi_chap_name chap_name; /* 0x218 */ | ||
130 | union nvm_iscsi_chap_password chap_password; /* 0x318 */ | ||
131 | |||
132 | u32 generic_cont0; /* 0x398 */ | ||
133 | #define NVM_ISCSI_CFG_INITIATOR_VLAN_MASK 0x0000FFFF | ||
134 | #define NVM_ISCSI_CFG_INITIATOR_VLAN_OFFSET 0 | ||
135 | #define NVM_ISCSI_CFG_INITIATOR_IP_VERSION_MASK 0x00030000 | ||
136 | #define NVM_ISCSI_CFG_INITIATOR_IP_VERSION_OFFSET 16 | ||
137 | #define NVM_ISCSI_CFG_INITIATOR_IP_VERSION_4 1 | ||
138 | #define NVM_ISCSI_CFG_INITIATOR_IP_VERSION_6 2 | ||
139 | #define NVM_ISCSI_CFG_INITIATOR_IP_VERSION_4_AND_6 3 | ||
140 | |||
141 | u32 ctrl_flags; | ||
142 | #define NVM_ISCSI_CFG_INITIATOR_IP_VERSION_PRIORITY_V6 BIT(0) | ||
143 | #define NVM_ISCSI_CFG_INITIATOR_VLAN_ENABLED BIT(1) | ||
144 | |||
145 | u32 rsvd[116]; /* 0x32C */ | ||
146 | }; | ||
147 | |||
148 | struct nvm_iscsi_target { | ||
149 | u32 ctrl_flags; /* 0x0 */ | ||
150 | #define NVM_ISCSI_CFG_TARGET_ENABLED BIT(0) | ||
151 | #define NVM_ISCSI_CFG_BOOT_TIME_LOGIN_STATUS BIT(1) | ||
152 | |||
153 | u32 generic_cont0; /* 0x4 */ | ||
154 | #define NVM_ISCSI_CFG_TARGET_TCP_PORT_MASK 0x0000FFFF | ||
155 | #define NVM_ISCSI_CFG_TARGET_TCP_PORT_OFFSET 0 | ||
156 | |||
157 | u32 ip_ver; | ||
158 | #define NVM_ISCSI_CFG_IPv4 4 | ||
159 | #define NVM_ISCSI_CFG_IPv6 6 | ||
160 | |||
161 | u32 rsvd_1[7]; /* 0x24 */ | ||
162 | union nvm_iscsi_ipv4_addr ipv4_addr; /* 0x28 */ | ||
163 | union nvm_iscsi_ipv6_addr ipv6_addr; /* 0x2C */ | ||
164 | union nvm_iscsi_lun lun; /* 0x3C */ | ||
165 | |||
166 | union nvm_iscsi_name target_name; /* 0x44 */ | ||
167 | union nvm_iscsi_chap_name chap_name; /* 0x144 */ | ||
168 | union nvm_iscsi_chap_password chap_password; /* 0x244 */ | ||
169 | |||
170 | u32 rsvd_2[107]; /* 0x2C4 */ | ||
171 | }; | ||
172 | |||
173 | struct nvm_iscsi_block { | ||
174 | u32 id; /* 0x0 */ | ||
175 | #define NVM_ISCSI_CFG_BLK_MAPPED_PF_ID_MASK 0x0000000F | ||
176 | #define NVM_ISCSI_CFG_BLK_MAPPED_PF_ID_OFFSET 0 | ||
177 | #define NVM_ISCSI_CFG_BLK_CTRL_FLAG_MASK 0x00000FF0 | ||
178 | #define NVM_ISCSI_CFG_BLK_CTRL_FLAG_OFFSET 4 | ||
179 | #define NVM_ISCSI_CFG_BLK_CTRL_FLAG_IS_NOT_EMPTY BIT(0) | ||
180 | #define NVM_ISCSI_CFG_BLK_CTRL_FLAG_PF_MAPPED BIT(1) | ||
181 | |||
182 | u32 rsvd_1[5]; /* 0x4 */ | ||
183 | |||
184 | struct nvm_iscsi_generic generic; /* 0x18 */ | ||
185 | struct nvm_iscsi_initiator initiator; /* 0x218 */ | ||
186 | struct nvm_iscsi_target target[NUM_OF_ISCSI_TARGET_PER_PF]; | ||
187 | /* 0x718 */ | ||
188 | |||
189 | u32 rsvd_2[58]; /* 0x1718 */ | ||
190 | /* total size - 0x1800 - 6K block */ | ||
191 | }; | ||
192 | |||
193 | struct nvm_iscsi_cfg { | ||
194 | u32 id; /* 0x0 */ | ||
195 | #define NVM_ISCSI_CFG_BLK_VERSION_MINOR_MASK 0x000000FF | ||
196 | #define NVM_ISCSI_CFG_BLK_VERSION_MAJOR_MASK 0x0000FF00 | ||
197 | #define NVM_ISCSI_CFG_BLK_SIGNATURE_MASK 0xFFFF0000 | ||
198 | #define NVM_ISCSI_CFG_BLK_SIGNATURE 0x49430000 /* IC - Iscsi | ||
199 | * Config | ||
200 | */ | ||
201 | |||
202 | #define NVM_ISCSI_CFG_BLK_VERSION_MAJOR 0 | ||
203 | #define NVM_ISCSI_CFG_BLK_VERSION_MINOR 10 | ||
204 | #define NVM_ISCSI_CFG_BLK_VERSION ((NVM_ISCSI_CFG_BLK_VERSION_MAJOR << 8) | \ | ||
205 | NVM_ISCSI_CFG_BLK_VERSION_MINOR) | ||
206 | |||
207 | struct nvm_iscsi_block block[NUM_OF_ISCSI_PF_SUPPORTED]; /* 0x4 */ | ||
208 | }; | ||
209 | |||
210 | #endif | ||
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index c2dc836dc484..e101cd3043b9 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c | |||
@@ -3727,7 +3727,7 @@ static struct qla_tgt_cmd *qlt_ctio_to_cmd(struct scsi_qla_host *vha, | |||
3727 | h &= QLA_CMD_HANDLE_MASK; | 3727 | h &= QLA_CMD_HANDLE_MASK; |
3728 | 3728 | ||
3729 | if (h != QLA_TGT_NULL_HANDLE) { | 3729 | if (h != QLA_TGT_NULL_HANDLE) { |
3730 | if (unlikely(h > req->num_outstanding_cmds)) { | 3730 | if (unlikely(h >= req->num_outstanding_cmds)) { |
3731 | ql_dbg(ql_dbg_tgt, vha, 0xe052, | 3731 | ql_dbg(ql_dbg_tgt, vha, 0xe052, |
3732 | "qla_target(%d): Wrong handle %x received\n", | 3732 | "qla_target(%d): Wrong handle %x received\n", |
3733 | vha->vp_idx, handle); | 3733 | vha->vp_idx, handle); |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 21225d62b0c1..1e82d4128a84 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -758,8 +758,11 @@ static bool sg_is_valid_dxfer(sg_io_hdr_t *hp) | |||
758 | if (hp->dxferp || hp->dxfer_len > 0) | 758 | if (hp->dxferp || hp->dxfer_len > 0) |
759 | return false; | 759 | return false; |
760 | return true; | 760 | return true; |
761 | case SG_DXFER_TO_DEV: | ||
762 | case SG_DXFER_FROM_DEV: | 761 | case SG_DXFER_FROM_DEV: |
762 | if (hp->dxfer_len < 0) | ||
763 | return false; | ||
764 | return true; | ||
765 | case SG_DXFER_TO_DEV: | ||
763 | case SG_DXFER_TO_FROM_DEV: | 766 | case SG_DXFER_TO_FROM_DEV: |
764 | if (!hp->dxferp || hp->dxfer_len == 0) | 767 | if (!hp->dxferp || hp->dxfer_len == 0) |
765 | return false; | 768 | return false; |
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 8b93197daefe..9be211d68b15 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c | |||
@@ -837,6 +837,7 @@ static struct scsi_host_template virtscsi_host_template_multi = { | |||
837 | .eh_abort_handler = virtscsi_abort, | 837 | .eh_abort_handler = virtscsi_abort, |
838 | .eh_device_reset_handler = virtscsi_device_reset, | 838 | .eh_device_reset_handler = virtscsi_device_reset, |
839 | .eh_timed_out = virtscsi_eh_timed_out, | 839 | .eh_timed_out = virtscsi_eh_timed_out, |
840 | .slave_alloc = virtscsi_device_alloc, | ||
840 | 841 | ||
841 | .can_queue = 1024, | 842 | .can_queue = 1024, |
842 | .dma_boundary = UINT_MAX, | 843 | .dma_boundary = UINT_MAX, |
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index 2afe3597982e..f4b7a98a7913 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c | |||
@@ -134,7 +134,6 @@ struct apid_data { | |||
134 | * @spmic: SPMI controller object | 134 | * @spmic: SPMI controller object |
135 | * @ver_ops: version dependent operations. | 135 | * @ver_ops: version dependent operations. |
136 | * @ppid_to_apid in-memory copy of PPID -> channel (APID) mapping table. | 136 | * @ppid_to_apid in-memory copy of PPID -> channel (APID) mapping table. |
137 | * v2 only. | ||
138 | */ | 137 | */ |
139 | struct spmi_pmic_arb { | 138 | struct spmi_pmic_arb { |
140 | void __iomem *rd_base; | 139 | void __iomem *rd_base; |
@@ -1016,6 +1015,13 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) | |||
1016 | goto err_put_ctrl; | 1015 | goto err_put_ctrl; |
1017 | } | 1016 | } |
1018 | 1017 | ||
1018 | pa->ppid_to_apid = devm_kcalloc(&ctrl->dev, PMIC_ARB_MAX_PPID, | ||
1019 | sizeof(*pa->ppid_to_apid), GFP_KERNEL); | ||
1020 | if (!pa->ppid_to_apid) { | ||
1021 | err = -ENOMEM; | ||
1022 | goto err_put_ctrl; | ||
1023 | } | ||
1024 | |||
1019 | hw_ver = readl_relaxed(core + PMIC_ARB_VERSION); | 1025 | hw_ver = readl_relaxed(core + PMIC_ARB_VERSION); |
1020 | 1026 | ||
1021 | if (hw_ver < PMIC_ARB_VERSION_V2_MIN) { | 1027 | if (hw_ver < PMIC_ARB_VERSION_V2_MIN) { |
@@ -1048,15 +1054,6 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev) | |||
1048 | err = PTR_ERR(pa->wr_base); | 1054 | err = PTR_ERR(pa->wr_base); |
1049 | goto err_put_ctrl; | 1055 | goto err_put_ctrl; |
1050 | } | 1056 | } |
1051 | |||
1052 | pa->ppid_to_apid = devm_kcalloc(&ctrl->dev, | ||
1053 | PMIC_ARB_MAX_PPID, | ||
1054 | sizeof(*pa->ppid_to_apid), | ||
1055 | GFP_KERNEL); | ||
1056 | if (!pa->ppid_to_apid) { | ||
1057 | err = -ENOMEM; | ||
1058 | goto err_put_ctrl; | ||
1059 | } | ||
1060 | } | 1057 | } |
1061 | 1058 | ||
1062 | dev_info(&ctrl->dev, "PMIC arbiter version %s (0x%x)\n", | 1059 | dev_info(&ctrl->dev, "PMIC arbiter version %s (0x%x)\n", |
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index 2b9b0941d9eb..6d23226e5f69 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c | |||
@@ -365,11 +365,23 @@ static int spmi_drv_remove(struct device *dev) | |||
365 | return 0; | 365 | return 0; |
366 | } | 366 | } |
367 | 367 | ||
368 | static int spmi_drv_uevent(struct device *dev, struct kobj_uevent_env *env) | ||
369 | { | ||
370 | int ret; | ||
371 | |||
372 | ret = of_device_uevent_modalias(dev, env); | ||
373 | if (ret != -ENODEV) | ||
374 | return ret; | ||
375 | |||
376 | return 0; | ||
377 | } | ||
378 | |||
368 | static struct bus_type spmi_bus_type = { | 379 | static struct bus_type spmi_bus_type = { |
369 | .name = "spmi", | 380 | .name = "spmi", |
370 | .match = spmi_device_match, | 381 | .match = spmi_device_match, |
371 | .probe = spmi_drv_probe, | 382 | .probe = spmi_drv_probe, |
372 | .remove = spmi_drv_remove, | 383 | .remove = spmi_drv_remove, |
384 | .uevent = spmi_drv_uevent, | ||
373 | }; | 385 | }; |
374 | 386 | ||
375 | /** | 387 | /** |
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 268d4e6ef48a..ef28a1cb64ae 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig | |||
@@ -110,4 +110,6 @@ source "drivers/staging/ccree/Kconfig" | |||
110 | 110 | ||
111 | source "drivers/staging/typec/Kconfig" | 111 | source "drivers/staging/typec/Kconfig" |
112 | 112 | ||
113 | source "drivers/staging/vboxvideo/Kconfig" | ||
114 | |||
113 | endif # STAGING | 115 | endif # STAGING |
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index b93e6f5f0f6e..2918580bdb9e 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile | |||
@@ -44,3 +44,4 @@ obj-$(CONFIG_KS7010) += ks7010/ | |||
44 | obj-$(CONFIG_GREYBUS) += greybus/ | 44 | obj-$(CONFIG_GREYBUS) += greybus/ |
45 | obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/ | 45 | obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/ |
46 | obj-$(CONFIG_CRYPTO_DEV_CCREE) += ccree/ | 46 | obj-$(CONFIG_CRYPTO_DEV_CCREE) += ccree/ |
47 | obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/ | ||
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index b2e382888981..2f7bfc1c59e5 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c | |||
@@ -3116,8 +3116,7 @@ static void ni_ao_cmd_set_update(struct comedi_device *dev, | |||
3116 | /* following line: 2-1 per STC */ | 3116 | /* following line: 2-1 per STC */ |
3117 | ni_stc_writel(dev, 1, NISTC_AO_UI_LOADA_REG); | 3117 | ni_stc_writel(dev, 1, NISTC_AO_UI_LOADA_REG); |
3118 | ni_stc_writew(dev, NISTC_AO_CMD1_UI_LOAD, NISTC_AO_CMD1_REG); | 3118 | ni_stc_writew(dev, NISTC_AO_CMD1_UI_LOAD, NISTC_AO_CMD1_REG); |
3119 | /* following line: N-1 per STC */ | 3119 | ni_stc_writel(dev, trigvar, NISTC_AO_UI_LOADA_REG); |
3120 | ni_stc_writel(dev, trigvar - 1, NISTC_AO_UI_LOADA_REG); | ||
3121 | } else { /* TRIG_EXT */ | 3120 | } else { /* TRIG_EXT */ |
3122 | /* FIXME: assert scan_begin_arg != 0, ret failure otherwise */ | 3121 | /* FIXME: assert scan_begin_arg != 0, ret failure otherwise */ |
3123 | devpriv->ao_cmd2 |= NISTC_AO_CMD2_BC_GATE_ENA; | 3122 | devpriv->ao_cmd2 |= NISTC_AO_CMD2_BC_GATE_ENA; |
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index 85b242ec5f9b..8fc191d99927 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | |||
@@ -1640,8 +1640,13 @@ kiblnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) | |||
1640 | ibmsg = tx->tx_msg; | 1640 | ibmsg = tx->tx_msg; |
1641 | ibmsg->ibm_u.immediate.ibim_hdr = *hdr; | 1641 | ibmsg->ibm_u.immediate.ibim_hdr = *hdr; |
1642 | 1642 | ||
1643 | copy_from_iter(&ibmsg->ibm_u.immediate.ibim_payload, IBLND_MSG_SIZE, | 1643 | rc = copy_from_iter(&ibmsg->ibm_u.immediate.ibim_payload, payload_nob, |
1644 | &from); | 1644 | &from); |
1645 | if (rc != payload_nob) { | ||
1646 | kiblnd_pool_free_node(&tx->tx_pool->tpo_pool, &tx->tx_list); | ||
1647 | return -EFAULT; | ||
1648 | } | ||
1649 | |||
1645 | nob = offsetof(struct kib_immediate_msg, ibim_payload[payload_nob]); | 1650 | nob = offsetof(struct kib_immediate_msg, ibim_payload[payload_nob]); |
1646 | kiblnd_init_tx_msg(ni, tx, IBLND_MSG_IMMEDIATE, nob); | 1651 | kiblnd_init_tx_msg(ni, tx, IBLND_MSG_IMMEDIATE, nob); |
1647 | 1652 | ||
@@ -1741,8 +1746,14 @@ kiblnd_recv(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg, | |||
1741 | break; | 1746 | break; |
1742 | } | 1747 | } |
1743 | 1748 | ||
1744 | copy_to_iter(&rxmsg->ibm_u.immediate.ibim_payload, | 1749 | rc = copy_to_iter(&rxmsg->ibm_u.immediate.ibim_payload, rlen, |
1745 | IBLND_MSG_SIZE, to); | 1750 | to); |
1751 | if (rc != rlen) { | ||
1752 | rc = -EFAULT; | ||
1753 | break; | ||
1754 | } | ||
1755 | |||
1756 | rc = 0; | ||
1746 | lnet_finalize(ni, lntmsg, 0); | 1757 | lnet_finalize(ni, lntmsg, 0); |
1747 | break; | 1758 | break; |
1748 | 1759 | ||
diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 002d09159896..a69007ef77bf 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c | |||
@@ -132,7 +132,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd) | |||
132 | kfree(pcmd->parmbuf); | 132 | kfree(pcmd->parmbuf); |
133 | } | 133 | } |
134 | 134 | ||
135 | if (!pcmd->rsp) { | 135 | if (pcmd->rsp) { |
136 | if (pcmd->rspsz != 0) { | 136 | if (pcmd->rspsz != 0) { |
137 | /* free rsp in cmd_obj */ | 137 | /* free rsp in cmd_obj */ |
138 | kfree(pcmd->rsp); | 138 | kfree(pcmd->rsp); |
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 963235fd7292..d283341cfe43 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c | |||
@@ -43,6 +43,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = { | |||
43 | {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ | 43 | {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ |
44 | {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ | 44 | {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ |
45 | {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ | 45 | {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ |
46 | {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ | ||
46 | {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ | 47 | {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ |
47 | {} /* Terminating entry */ | 48 | {} /* Terminating entry */ |
48 | }; | 49 | }; |
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c index 944dd25924be..4754f7a20684 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c | |||
@@ -40,7 +40,7 @@ static unsigned int get_mxclk_freq(void) | |||
40 | 40 | ||
41 | pll_reg = peek32(MXCLK_PLL_CTRL); | 41 | pll_reg = peek32(MXCLK_PLL_CTRL); |
42 | M = (pll_reg & PLL_CTRL_M_MASK) >> PLL_CTRL_M_SHIFT; | 42 | M = (pll_reg & PLL_CTRL_M_MASK) >> PLL_CTRL_M_SHIFT; |
43 | N = (pll_reg & PLL_CTRL_N_MASK) >> PLL_CTRL_M_SHIFT; | 43 | N = (pll_reg & PLL_CTRL_N_MASK) >> PLL_CTRL_N_SHIFT; |
44 | OD = (pll_reg & PLL_CTRL_OD_MASK) >> PLL_CTRL_OD_SHIFT; | 44 | OD = (pll_reg & PLL_CTRL_OD_MASK) >> PLL_CTRL_OD_SHIFT; |
45 | POD = (pll_reg & PLL_CTRL_POD_MASK) >> PLL_CTRL_POD_SHIFT; | 45 | POD = (pll_reg & PLL_CTRL_POD_MASK) >> PLL_CTRL_POD_SHIFT; |
46 | 46 | ||
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 3aa4128703d5..67207b0554cd 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c | |||
@@ -1053,6 +1053,26 @@ release_fb: | |||
1053 | return err; | 1053 | return err; |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | static int lynxfb_kick_out_firmware_fb(struct pci_dev *pdev) | ||
1057 | { | ||
1058 | struct apertures_struct *ap; | ||
1059 | bool primary = false; | ||
1060 | |||
1061 | ap = alloc_apertures(1); | ||
1062 | if (!ap) | ||
1063 | return -ENOMEM; | ||
1064 | |||
1065 | ap->ranges[0].base = pci_resource_start(pdev, 0); | ||
1066 | ap->ranges[0].size = pci_resource_len(pdev, 0); | ||
1067 | #ifdef CONFIG_X86 | ||
1068 | primary = pdev->resource[PCI_ROM_RESOURCE].flags & | ||
1069 | IORESOURCE_ROM_SHADOW; | ||
1070 | #endif | ||
1071 | remove_conflicting_framebuffers(ap, "sm750_fb1", primary); | ||
1072 | kfree(ap); | ||
1073 | return 0; | ||
1074 | } | ||
1075 | |||
1056 | static int lynxfb_pci_probe(struct pci_dev *pdev, | 1076 | static int lynxfb_pci_probe(struct pci_dev *pdev, |
1057 | const struct pci_device_id *ent) | 1077 | const struct pci_device_id *ent) |
1058 | { | 1078 | { |
@@ -1061,6 +1081,10 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, | |||
1061 | int fbidx; | 1081 | int fbidx; |
1062 | int err; | 1082 | int err; |
1063 | 1083 | ||
1084 | err = lynxfb_kick_out_firmware_fb(pdev); | ||
1085 | if (err) | ||
1086 | return err; | ||
1087 | |||
1064 | /* enable device */ | 1088 | /* enable device */ |
1065 | err = pcim_enable_device(pdev); | 1089 | err = pcim_enable_device(pdev); |
1066 | if (err) | 1090 | if (err) |
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 82e5de248947..67956e24779c 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c | |||
@@ -2314,6 +2314,7 @@ static void __exit speakup_exit(void) | |||
2314 | mutex_lock(&spk_mutex); | 2314 | mutex_lock(&spk_mutex); |
2315 | synth_release(); | 2315 | synth_release(); |
2316 | mutex_unlock(&spk_mutex); | 2316 | mutex_unlock(&spk_mutex); |
2317 | spk_ttyio_unregister_ldisc(); | ||
2317 | 2318 | ||
2318 | speakup_kobj_exit(); | 2319 | speakup_kobj_exit(); |
2319 | 2320 | ||
@@ -2376,6 +2377,7 @@ static int __init speakup_init(void) | |||
2376 | if (err) | 2377 | if (err) |
2377 | goto error_kobjects; | 2378 | goto error_kobjects; |
2378 | 2379 | ||
2380 | spk_ttyio_register_ldisc(); | ||
2379 | synth_init(synth_name); | 2381 | synth_init(synth_name); |
2380 | speakup_register_devsynth(); | 2382 | speakup_register_devsynth(); |
2381 | /* | 2383 | /* |
diff --git a/drivers/staging/speakup/spk_priv.h b/drivers/staging/speakup/spk_priv.h index 87b6a0a4c54d..046040ac074c 100644 --- a/drivers/staging/speakup/spk_priv.h +++ b/drivers/staging/speakup/spk_priv.h | |||
@@ -48,6 +48,8 @@ void spk_stop_serial_interrupt(void); | |||
48 | int spk_wait_for_xmitr(struct spk_synth *in_synth); | 48 | int spk_wait_for_xmitr(struct spk_synth *in_synth); |
49 | void spk_serial_release(void); | 49 | void spk_serial_release(void); |
50 | void spk_ttyio_release(void); | 50 | void spk_ttyio_release(void); |
51 | void spk_ttyio_register_ldisc(void); | ||
52 | void spk_ttyio_unregister_ldisc(void); | ||
51 | 53 | ||
52 | void synth_buffer_skip_nonlatin1(void); | 54 | void synth_buffer_skip_nonlatin1(void); |
53 | u16 synth_buffer_getc(void); | 55 | u16 synth_buffer_getc(void); |
diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c index ed8e96b06ead..fe340b07c482 100644 --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c | |||
@@ -154,12 +154,6 @@ static int spk_ttyio_initialise_ldisc(struct spk_synth *synth) | |||
154 | struct ktermios tmp_termios; | 154 | struct ktermios tmp_termios; |
155 | dev_t dev; | 155 | dev_t dev; |
156 | 156 | ||
157 | ret = tty_register_ldisc(N_SPEAKUP, &spk_ttyio_ldisc_ops); | ||
158 | if (ret) { | ||
159 | pr_err("Error registering line discipline.\n"); | ||
160 | return ret; | ||
161 | } | ||
162 | |||
163 | ret = get_dev_to_use(synth, &dev); | 157 | ret = get_dev_to_use(synth, &dev); |
164 | if (ret) | 158 | if (ret) |
165 | return ret; | 159 | return ret; |
@@ -196,10 +190,24 @@ static int spk_ttyio_initialise_ldisc(struct spk_synth *synth) | |||
196 | tty_unlock(tty); | 190 | tty_unlock(tty); |
197 | 191 | ||
198 | ret = tty_set_ldisc(tty, N_SPEAKUP); | 192 | ret = tty_set_ldisc(tty, N_SPEAKUP); |
193 | if (ret) | ||
194 | pr_err("speakup: Failed to set N_SPEAKUP on tty\n"); | ||
199 | 195 | ||
200 | return ret; | 196 | return ret; |
201 | } | 197 | } |
202 | 198 | ||
199 | void spk_ttyio_register_ldisc(void) | ||
200 | { | ||
201 | if (tty_register_ldisc(N_SPEAKUP, &spk_ttyio_ldisc_ops)) | ||
202 | pr_warn("speakup: Error registering line discipline. Most synths won't work.\n"); | ||
203 | } | ||
204 | |||
205 | void spk_ttyio_unregister_ldisc(void) | ||
206 | { | ||
207 | if (tty_unregister_ldisc(N_SPEAKUP)) | ||
208 | pr_warn("speakup: Couldn't unregister ldisc\n"); | ||
209 | } | ||
210 | |||
203 | static int spk_ttyio_out(struct spk_synth *in_synth, const char ch) | 211 | static int spk_ttyio_out(struct spk_synth *in_synth, const char ch) |
204 | { | 212 | { |
205 | if (in_synth->alive && speakup_tty && speakup_tty->ops->write) { | 213 | if (in_synth->alive && speakup_tty && speakup_tty->ops->write) { |
@@ -300,7 +308,7 @@ void spk_ttyio_release(void) | |||
300 | 308 | ||
301 | tty_ldisc_flush(speakup_tty); | 309 | tty_ldisc_flush(speakup_tty); |
302 | tty_unlock(speakup_tty); | 310 | tty_unlock(speakup_tty); |
303 | tty_ldisc_release(speakup_tty); | 311 | tty_release_struct(speakup_tty, speakup_tty->index); |
304 | } | 312 | } |
305 | EXPORT_SYMBOL_GPL(spk_ttyio_release); | 313 | EXPORT_SYMBOL_GPL(spk_ttyio_release); |
306 | 314 | ||
diff --git a/drivers/staging/vboxvideo/Kconfig b/drivers/staging/vboxvideo/Kconfig new file mode 100644 index 000000000000..a52746f9a670 --- /dev/null +++ b/drivers/staging/vboxvideo/Kconfig | |||
@@ -0,0 +1,12 @@ | |||
1 | config DRM_VBOXVIDEO | ||
2 | tristate "Virtual Box Graphics Card" | ||
3 | depends on DRM && X86 && PCI | ||
4 | select DRM_KMS_HELPER | ||
5 | help | ||
6 | This is a KMS driver for the virtual Graphics Card used in | ||
7 | Virtual Box virtual machines. | ||
8 | |||
9 | Although it is possible to builtin this module, it is advised | ||
10 | to build this driver as a module, so that it can be updated | ||
11 | independently of the kernel. Select M to built this driver as a | ||
12 | module and add support for these devices via drm/kms interfaces. | ||
diff --git a/drivers/staging/vboxvideo/Makefile b/drivers/staging/vboxvideo/Makefile new file mode 100644 index 000000000000..2d0b3bc7ad73 --- /dev/null +++ b/drivers/staging/vboxvideo/Makefile | |||
@@ -0,0 +1,7 @@ | |||
1 | ccflags-y := -Iinclude/drm | ||
2 | |||
3 | vboxvideo-y := hgsmi_base.o modesetting.o vbva_base.o \ | ||
4 | vbox_drv.o vbox_fb.o vbox_hgsmi.o vbox_irq.o vbox_main.o \ | ||
5 | vbox_mode.o vbox_prime.o vbox_ttm.o | ||
6 | |||
7 | obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo.o | ||
diff --git a/drivers/staging/vboxvideo/TODO b/drivers/staging/vboxvideo/TODO new file mode 100644 index 000000000000..ce764309b079 --- /dev/null +++ b/drivers/staging/vboxvideo/TODO | |||
@@ -0,0 +1,9 @@ | |||
1 | TODO: | ||
2 | -Move the driver over to the atomic API | ||
3 | -Stop using old load / unload drm_driver hooks | ||
4 | -Get a full review from the drm-maintainers on dri-devel done on this driver | ||
5 | -Extend this TODO with the results of that review | ||
6 | |||
7 | Please send any patches to Greg Kroah-Hartman <gregkh@linuxfoundation.org>, | ||
8 | Hans de Goede <hdegoede@redhat.com> and | ||
9 | Michael Thayer <michael.thayer@oracle.com>. | ||
diff --git a/drivers/staging/vboxvideo/hgsmi_base.c b/drivers/staging/vboxvideo/hgsmi_base.c new file mode 100644 index 000000000000..15ff5f42e2cd --- /dev/null +++ b/drivers/staging/vboxvideo/hgsmi_base.c | |||
@@ -0,0 +1,246 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #include "vbox_drv.h" | ||
24 | #include "vbox_err.h" | ||
25 | #include "vboxvideo_guest.h" | ||
26 | #include "vboxvideo_vbe.h" | ||
27 | #include "hgsmi_channels.h" | ||
28 | #include "hgsmi_ch_setup.h" | ||
29 | |||
30 | /** | ||
31 | * Inform the host of the location of the host flags in VRAM via an HGSMI cmd. | ||
32 | * @param ctx the context of the guest heap to use. | ||
33 | * @param location the offset chosen for the flags within guest VRAM. | ||
34 | * @returns 0 on success, -errno on failure | ||
35 | */ | ||
36 | int hgsmi_report_flags_location(struct gen_pool *ctx, u32 location) | ||
37 | { | ||
38 | struct hgsmi_buffer_location *p; | ||
39 | |||
40 | p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_HGSMI, | ||
41 | HGSMI_CC_HOST_FLAGS_LOCATION); | ||
42 | if (!p) | ||
43 | return -ENOMEM; | ||
44 | |||
45 | p->buf_location = location; | ||
46 | p->buf_len = sizeof(struct hgsmi_host_flags); | ||
47 | |||
48 | hgsmi_buffer_submit(ctx, p); | ||
49 | hgsmi_buffer_free(ctx, p); | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * Notify the host of HGSMI-related guest capabilities via an HGSMI command. | ||
56 | * @param ctx the context of the guest heap to use. | ||
57 | * @param caps the capabilities to report, see vbva_caps. | ||
58 | * @returns 0 on success, -errno on failure | ||
59 | */ | ||
60 | int hgsmi_send_caps_info(struct gen_pool *ctx, u32 caps) | ||
61 | { | ||
62 | struct vbva_caps *p; | ||
63 | |||
64 | p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA, VBVA_INFO_CAPS); | ||
65 | if (!p) | ||
66 | return -ENOMEM; | ||
67 | |||
68 | p->rc = VERR_NOT_IMPLEMENTED; | ||
69 | p->caps = caps; | ||
70 | |||
71 | hgsmi_buffer_submit(ctx, p); | ||
72 | |||
73 | WARN_ON_ONCE(RT_FAILURE(p->rc)); | ||
74 | |||
75 | hgsmi_buffer_free(ctx, p); | ||
76 | |||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | int hgsmi_test_query_conf(struct gen_pool *ctx) | ||
81 | { | ||
82 | u32 value = 0; | ||
83 | int ret; | ||
84 | |||
85 | ret = hgsmi_query_conf(ctx, U32_MAX, &value); | ||
86 | if (ret) | ||
87 | return ret; | ||
88 | |||
89 | return value == U32_MAX ? 0 : -EIO; | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * Query the host for an HGSMI configuration parameter via an HGSMI command. | ||
94 | * @param ctx the context containing the heap used | ||
95 | * @param index the index of the parameter to query, | ||
96 | * @see vbva_conf32::index | ||
97 | * @param value_ret where to store the value of the parameter on success | ||
98 | * @returns 0 on success, -errno on failure | ||
99 | */ | ||
100 | int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret) | ||
101 | { | ||
102 | struct vbva_conf32 *p; | ||
103 | |||
104 | p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA, | ||
105 | VBVA_QUERY_CONF32); | ||
106 | if (!p) | ||
107 | return -ENOMEM; | ||
108 | |||
109 | p->index = index; | ||
110 | p->value = U32_MAX; | ||
111 | |||
112 | hgsmi_buffer_submit(ctx, p); | ||
113 | |||
114 | *value_ret = p->value; | ||
115 | |||
116 | hgsmi_buffer_free(ctx, p); | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * Pass the host a new mouse pointer shape via an HGSMI command. | ||
123 | * | ||
124 | * @param ctx the context containing the heap to be used | ||
125 | * @param flags cursor flags, @see VMMDevReqMousePointer::flags | ||
126 | * @param hot_x horizontal position of the hot spot | ||
127 | * @param hot_y vertical position of the hot spot | ||
128 | * @param width width in pixels of the cursor | ||
129 | * @param height height in pixels of the cursor | ||
130 | * @param pixels pixel data, @see VMMDevReqMousePointer for the format | ||
131 | * @param len size in bytes of the pixel data | ||
132 | * @returns 0 on success, -errno on failure | ||
133 | */ | ||
134 | int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags, | ||
135 | u32 hot_x, u32 hot_y, u32 width, u32 height, | ||
136 | u8 *pixels, u32 len) | ||
137 | { | ||
138 | struct vbva_mouse_pointer_shape *p; | ||
139 | u32 pixel_len = 0; | ||
140 | int rc; | ||
141 | |||
142 | if (flags & VBOX_MOUSE_POINTER_SHAPE) { | ||
143 | /* | ||
144 | * Size of the pointer data: | ||
145 | * sizeof (AND mask) + sizeof (XOR_MASK) | ||
146 | */ | ||
147 | pixel_len = ((((width + 7) / 8) * height + 3) & ~3) + | ||
148 | width * 4 * height; | ||
149 | if (pixel_len > len) | ||
150 | return -EINVAL; | ||
151 | |||
152 | /* | ||
153 | * If shape is supplied, then always create the pointer visible. | ||
154 | * See comments in 'vboxUpdatePointerShape' | ||
155 | */ | ||
156 | flags |= VBOX_MOUSE_POINTER_VISIBLE; | ||
157 | } | ||
158 | |||
159 | p = hgsmi_buffer_alloc(ctx, sizeof(*p) + pixel_len, HGSMI_CH_VBVA, | ||
160 | VBVA_MOUSE_POINTER_SHAPE); | ||
161 | if (!p) | ||
162 | return -ENOMEM; | ||
163 | |||
164 | p->result = VINF_SUCCESS; | ||
165 | p->flags = flags; | ||
166 | p->hot_X = hot_x; | ||
167 | p->hot_y = hot_y; | ||
168 | p->width = width; | ||
169 | p->height = height; | ||
170 | if (pixel_len) | ||
171 | memcpy(p->data, pixels, pixel_len); | ||
172 | |||
173 | hgsmi_buffer_submit(ctx, p); | ||
174 | |||
175 | switch (p->result) { | ||
176 | case VINF_SUCCESS: | ||
177 | rc = 0; | ||
178 | break; | ||
179 | case VERR_NO_MEMORY: | ||
180 | rc = -ENOMEM; | ||
181 | break; | ||
182 | case VERR_NOT_SUPPORTED: | ||
183 | rc = -EBUSY; | ||
184 | break; | ||
185 | default: | ||
186 | rc = -EINVAL; | ||
187 | } | ||
188 | |||
189 | hgsmi_buffer_free(ctx, p); | ||
190 | |||
191 | return rc; | ||
192 | } | ||
193 | |||
194 | /** | ||
195 | * Report the guest cursor position. The host may wish to use this information | ||
196 | * to re-position its own cursor (though this is currently unlikely). The | ||
197 | * current host cursor position is returned. | ||
198 | * @param ctx The context containing the heap used. | ||
199 | * @param report_position Are we reporting a position? | ||
200 | * @param x Guest cursor X position. | ||
201 | * @param y Guest cursor Y position. | ||
202 | * @param x_host Host cursor X position is stored here. Optional. | ||
203 | * @param y_host Host cursor Y position is stored here. Optional. | ||
204 | * @returns 0 on success, -errno on failure | ||
205 | */ | ||
206 | int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position, | ||
207 | u32 x, u32 y, u32 *x_host, u32 *y_host) | ||
208 | { | ||
209 | struct vbva_cursor_position *p; | ||
210 | |||
211 | p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA, | ||
212 | VBVA_CURSOR_POSITION); | ||
213 | if (!p) | ||
214 | return -ENOMEM; | ||
215 | |||
216 | p->report_position = report_position; | ||
217 | p->x = x; | ||
218 | p->y = y; | ||
219 | |||
220 | hgsmi_buffer_submit(ctx, p); | ||
221 | |||
222 | *x_host = p->x; | ||
223 | *y_host = p->y; | ||
224 | |||
225 | hgsmi_buffer_free(ctx, p); | ||
226 | |||
227 | return 0; | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * @todo Mouse pointer position to be read from VMMDev memory, address of the | ||
232 | * memory region can be queried from VMMDev via an IOCTL. This VMMDev memory | ||
233 | * region will contain host information which is needed by the guest. | ||
234 | * | ||
235 | * Reading will not cause a switch to the host. | ||
236 | * | ||
237 | * Have to take into account: | ||
238 | * * synchronization: host must write to the memory only from EMT, | ||
239 | * large structures must be read under flag, which tells the host | ||
240 | * that the guest is currently reading the memory (OWNER flag?). | ||
241 | * * guest writes: may be allocate a page for the host info and make | ||
242 | * the page readonly for the guest. | ||
243 | * * the information should be available only for additions drivers. | ||
244 | * * VMMDev additions driver will inform the host which version of the info | ||
245 | * it expects, host must support all versions. | ||
246 | */ | ||
diff --git a/drivers/staging/vboxvideo/hgsmi_ch_setup.h b/drivers/staging/vboxvideo/hgsmi_ch_setup.h new file mode 100644 index 000000000000..8e6d9e11a69c --- /dev/null +++ b/drivers/staging/vboxvideo/hgsmi_ch_setup.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __HGSMI_CH_SETUP_H__ | ||
24 | #define __HGSMI_CH_SETUP_H__ | ||
25 | |||
26 | /* | ||
27 | * Tell the host the location of hgsmi_host_flags structure, where the host | ||
28 | * can write information about pending buffers, etc, and which can be quickly | ||
29 | * polled by the guest without a need to port IO. | ||
30 | */ | ||
31 | #define HGSMI_CC_HOST_FLAGS_LOCATION 0 | ||
32 | |||
33 | struct hgsmi_buffer_location { | ||
34 | u32 buf_location; | ||
35 | u32 buf_len; | ||
36 | } __packed; | ||
37 | |||
38 | /* HGSMI setup and configuration data structures. */ | ||
39 | /* host->guest commands pending, should be accessed under FIFO lock only */ | ||
40 | #define HGSMIHOSTFLAGS_COMMANDS_PENDING 0x01u | ||
41 | /* IRQ is fired, should be accessed under VGAState::lock only */ | ||
42 | #define HGSMIHOSTFLAGS_IRQ 0x02u | ||
43 | /* vsync interrupt flag, should be accessed under VGAState::lock only */ | ||
44 | #define HGSMIHOSTFLAGS_VSYNC 0x10u | ||
45 | /** monitor hotplug flag, should be accessed under VGAState::lock only */ | ||
46 | #define HGSMIHOSTFLAGS_HOTPLUG 0x20u | ||
47 | /** | ||
48 | * Cursor capability state change flag, should be accessed under | ||
49 | * VGAState::lock only. @see vbva_conf32. | ||
50 | */ | ||
51 | #define HGSMIHOSTFLAGS_CURSOR_CAPABILITIES 0x40u | ||
52 | |||
53 | struct hgsmi_host_flags { | ||
54 | /* | ||
55 | * Host flags can be accessed and modified in multiple threads | ||
56 | * concurrently, e.g. CrOpenGL HGCM and GUI threads when completing | ||
57 | * HGSMI 3D and Video Accel respectively, EMT thread when dealing with | ||
58 | * HGSMI command processing, etc. | ||
59 | * Besides settings/cleaning flags atomically, some flags have their | ||
60 | * own special sync restrictions, see comments for flags above. | ||
61 | */ | ||
62 | u32 host_flags; | ||
63 | u32 reserved[3]; | ||
64 | } __packed; | ||
65 | |||
66 | #endif | ||
diff --git a/drivers/staging/vboxvideo/hgsmi_channels.h b/drivers/staging/vboxvideo/hgsmi_channels.h new file mode 100644 index 000000000000..a2a34b2167b4 --- /dev/null +++ b/drivers/staging/vboxvideo/hgsmi_channels.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __HGSMI_CHANNELS_H__ | ||
24 | #define __HGSMI_CHANNELS_H__ | ||
25 | |||
26 | /* | ||
27 | * Each channel has an 8 bit identifier. There are a number of predefined | ||
28 | * (hardcoded) channels. | ||
29 | * | ||
30 | * HGSMI_CH_HGSMI channel can be used to map a string channel identifier | ||
31 | * to a free 16 bit numerical value. values are allocated in range | ||
32 | * [HGSMI_CH_STRING_FIRST;HGSMI_CH_STRING_LAST]. | ||
33 | */ | ||
34 | |||
35 | /* A reserved channel value */ | ||
36 | #define HGSMI_CH_RESERVED 0x00 | ||
37 | /* HGCMI: setup and configuration */ | ||
38 | #define HGSMI_CH_HGSMI 0x01 | ||
39 | /* Graphics: VBVA */ | ||
40 | #define HGSMI_CH_VBVA 0x02 | ||
41 | /* Graphics: Seamless with a single guest region */ | ||
42 | #define HGSMI_CH_SEAMLESS 0x03 | ||
43 | /* Graphics: Seamless with separate host windows */ | ||
44 | #define HGSMI_CH_SEAMLESS2 0x04 | ||
45 | /* Graphics: OpenGL HW acceleration */ | ||
46 | #define HGSMI_CH_OPENGL 0x05 | ||
47 | |||
48 | /* The first channel index to be used for string mappings (inclusive) */ | ||
49 | #define HGSMI_CH_STRING_FIRST 0x20 | ||
50 | /* The last channel index for string mappings (inclusive) */ | ||
51 | #define HGSMI_CH_STRING_LAST 0xff | ||
52 | |||
53 | #endif | ||
diff --git a/drivers/staging/vboxvideo/hgsmi_defs.h b/drivers/staging/vboxvideo/hgsmi_defs.h new file mode 100644 index 000000000000..5b21fb974d20 --- /dev/null +++ b/drivers/staging/vboxvideo/hgsmi_defs.h | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __HGSMI_DEFS_H__ | ||
24 | #define __HGSMI_DEFS_H__ | ||
25 | |||
26 | /* Buffer sequence type mask. */ | ||
27 | #define HGSMI_BUFFER_HEADER_F_SEQ_MASK 0x03 | ||
28 | /* Single buffer, not a part of a sequence. */ | ||
29 | #define HGSMI_BUFFER_HEADER_F_SEQ_SINGLE 0x00 | ||
30 | /* The first buffer in a sequence. */ | ||
31 | #define HGSMI_BUFFER_HEADER_F_SEQ_START 0x01 | ||
32 | /* A middle buffer in a sequence. */ | ||
33 | #define HGSMI_BUFFER_HEADER_F_SEQ_CONTINUE 0x02 | ||
34 | /* The last buffer in a sequence. */ | ||
35 | #define HGSMI_BUFFER_HEADER_F_SEQ_END 0x03 | ||
36 | |||
37 | /* 16 bytes buffer header. */ | ||
38 | struct hgsmi_buffer_header { | ||
39 | u32 data_size; /* Size of data that follows the header. */ | ||
40 | u8 flags; /* HGSMI_BUFFER_HEADER_F_* */ | ||
41 | u8 channel; /* The channel the data must be routed to. */ | ||
42 | u16 channel_info; /* Opaque to the HGSMI, used by the channel. */ | ||
43 | |||
44 | union { | ||
45 | /* Opaque placeholder to make the union 8 bytes. */ | ||
46 | u8 header_data[8]; | ||
47 | |||
48 | /* HGSMI_BUFFER_HEADER_F_SEQ_SINGLE */ | ||
49 | struct { | ||
50 | u32 reserved1; /* A reserved field, initialize to 0. */ | ||
51 | u32 reserved2; /* A reserved field, initialize to 0. */ | ||
52 | } buffer; | ||
53 | |||
54 | /* HGSMI_BUFFER_HEADER_F_SEQ_START */ | ||
55 | struct { | ||
56 | /* Must be the same for all buffers in the sequence. */ | ||
57 | u32 sequence_number; | ||
58 | /* The total size of the sequence. */ | ||
59 | u32 sequence_size; | ||
60 | } sequence_start; | ||
61 | |||
62 | /* | ||
63 | * HGSMI_BUFFER_HEADER_F_SEQ_CONTINUE and | ||
64 | * HGSMI_BUFFER_HEADER_F_SEQ_END | ||
65 | */ | ||
66 | struct { | ||
67 | /* Must be the same for all buffers in the sequence. */ | ||
68 | u32 sequence_number; | ||
69 | /* Data offset in the entire sequence. */ | ||
70 | u32 sequence_offset; | ||
71 | } sequence_continue; | ||
72 | } u; | ||
73 | } __packed; | ||
74 | |||
75 | /* 8 bytes buffer tail. */ | ||
76 | struct hgsmi_buffer_tail { | ||
77 | /* Reserved, must be initialized to 0. */ | ||
78 | u32 reserved; | ||
79 | /* | ||
80 | * One-at-a-Time Hash: http://www.burtleburtle.net/bob/hash/doobs.html | ||
81 | * Over the header, offset and for first 4 bytes of the tail. | ||
82 | */ | ||
83 | u32 checksum; | ||
84 | } __packed; | ||
85 | |||
86 | /* | ||
87 | * The size of the array of channels. Array indexes are u8. | ||
88 | * Note: the value must not be changed. | ||
89 | */ | ||
90 | #define HGSMI_NUMBER_OF_CHANNELS 0x100 | ||
91 | |||
92 | #endif | ||
diff --git a/drivers/staging/vboxvideo/modesetting.c b/drivers/staging/vboxvideo/modesetting.c new file mode 100644 index 000000000000..7616b8aab23a --- /dev/null +++ b/drivers/staging/vboxvideo/modesetting.c | |||
@@ -0,0 +1,142 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #include "vbox_drv.h" | ||
24 | #include "vbox_err.h" | ||
25 | #include "vboxvideo_guest.h" | ||
26 | #include "vboxvideo_vbe.h" | ||
27 | #include "hgsmi_channels.h" | ||
28 | |||
29 | /** | ||
30 | * Set a video mode via an HGSMI request. The views must have been | ||
31 | * initialised first using @a VBoxHGSMISendViewInfo and if the mode is being | ||
32 | * set on the first display then it must be set first using registers. | ||
33 | * @param ctx The context containing the heap to use | ||
34 | * @param display The screen number | ||
35 | * @param origin_x The horizontal displacement relative to the first scrn | ||
36 | * @param origin_y The vertical displacement relative to the first screen | ||
37 | * @param start_offset The offset of the visible area of the framebuffer | ||
38 | * relative to the framebuffer start | ||
39 | * @param pitch The offset in bytes between the starts of two adjecent | ||
40 | * scan lines in video RAM | ||
41 | * @param width The mode width | ||
42 | * @param height The mode height | ||
43 | * @param bpp The colour depth of the mode | ||
44 | * @param flags Flags | ||
45 | */ | ||
46 | void hgsmi_process_display_info(struct gen_pool *ctx, u32 display, | ||
47 | s32 origin_x, s32 origin_y, u32 start_offset, | ||
48 | u32 pitch, u32 width, u32 height, | ||
49 | u16 bpp, u16 flags) | ||
50 | { | ||
51 | struct vbva_infoscreen *p; | ||
52 | |||
53 | p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA, | ||
54 | VBVA_INFO_SCREEN); | ||
55 | if (!p) | ||
56 | return; | ||
57 | |||
58 | p->view_index = display; | ||
59 | p->origin_x = origin_x; | ||
60 | p->origin_y = origin_y; | ||
61 | p->start_offset = start_offset; | ||
62 | p->line_size = pitch; | ||
63 | p->width = width; | ||
64 | p->height = height; | ||
65 | p->bits_per_pixel = bpp; | ||
66 | p->flags = flags; | ||
67 | |||
68 | hgsmi_buffer_submit(ctx, p); | ||
69 | hgsmi_buffer_free(ctx, p); | ||
70 | } | ||
71 | |||
72 | /** | ||
73 | * Report the rectangle relative to which absolute pointer events should be | ||
74 | * expressed. This information remains valid until the next VBVA resize event | ||
75 | * for any screen, at which time it is reset to the bounding rectangle of all | ||
76 | * virtual screens. | ||
77 | * @param ctx The context containing the heap to use. | ||
78 | * @param origin_x Upper left X co-ordinate relative to the first screen. | ||
79 | * @param origin_y Upper left Y co-ordinate relative to the first screen. | ||
80 | * @param width Rectangle width. | ||
81 | * @param height Rectangle height. | ||
82 | * @returns 0 on success, -errno on failure | ||
83 | */ | ||
84 | int hgsmi_update_input_mapping(struct gen_pool *ctx, s32 origin_x, s32 origin_y, | ||
85 | u32 width, u32 height) | ||
86 | { | ||
87 | struct vbva_report_input_mapping *p; | ||
88 | |||
89 | p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA, | ||
90 | VBVA_REPORT_INPUT_MAPPING); | ||
91 | if (!p) | ||
92 | return -ENOMEM; | ||
93 | |||
94 | p->x = origin_x; | ||
95 | p->y = origin_y; | ||
96 | p->cx = width; | ||
97 | p->cy = height; | ||
98 | |||
99 | hgsmi_buffer_submit(ctx, p); | ||
100 | hgsmi_buffer_free(ctx, p); | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * Get most recent video mode hints. | ||
107 | * @param ctx The context containing the heap to use. | ||
108 | * @param screens The number of screens to query hints for, starting at 0. | ||
109 | * @param hints Array of vbva_modehint structures for receiving the hints. | ||
110 | * @returns 0 on success, -errno on failure | ||
111 | */ | ||
112 | int hgsmi_get_mode_hints(struct gen_pool *ctx, unsigned int screens, | ||
113 | struct vbva_modehint *hints) | ||
114 | { | ||
115 | struct vbva_query_mode_hints *p; | ||
116 | size_t size; | ||
117 | |||
118 | if (WARN_ON(!hints)) | ||
119 | return -EINVAL; | ||
120 | |||
121 | size = screens * sizeof(struct vbva_modehint); | ||
122 | p = hgsmi_buffer_alloc(ctx, sizeof(*p) + size, HGSMI_CH_VBVA, | ||
123 | VBVA_QUERY_MODE_HINTS); | ||
124 | if (!p) | ||
125 | return -ENOMEM; | ||
126 | |||
127 | p->hints_queried_count = screens; | ||
128 | p->hint_structure_guest_size = sizeof(struct vbva_modehint); | ||
129 | p->rc = VERR_NOT_SUPPORTED; | ||
130 | |||
131 | hgsmi_buffer_submit(ctx, p); | ||
132 | |||
133 | if (RT_FAILURE(p->rc)) { | ||
134 | hgsmi_buffer_free(ctx, p); | ||
135 | return -EIO; | ||
136 | } | ||
137 | |||
138 | memcpy(hints, ((u8 *)p) + sizeof(struct vbva_query_mode_hints), size); | ||
139 | hgsmi_buffer_free(ctx, p); | ||
140 | |||
141 | return 0; | ||
142 | } | ||
diff --git a/drivers/staging/vboxvideo/vbox_drv.c b/drivers/staging/vboxvideo/vbox_drv.c new file mode 100644 index 000000000000..92ae1560a16d --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_drv.c | |||
@@ -0,0 +1,286 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013-2017 Oracle Corporation | ||
3 | * This file is based on ast_drv.c | ||
4 | * Copyright 2012 Red Hat Inc. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the | ||
8 | * "Software"), to deal in the Software without restriction, including | ||
9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
11 | * permit persons to whom the Software is furnished to do so, subject to | ||
12 | * the following conditions: | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
19 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
20 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * The above copyright notice and this permission notice (including the | ||
23 | * next paragraph) shall be included in all copies or substantial portions | ||
24 | * of the Software. | ||
25 | * | ||
26 | * Authors: Dave Airlie <airlied@redhat.com> | ||
27 | * Michael Thayer <michael.thayer@oracle.com, | ||
28 | * Hans de Goede <hdegoede@redhat.com> | ||
29 | */ | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/console.h> | ||
32 | #include <linux/vt_kern.h> | ||
33 | |||
34 | #include <drm/drmP.h> | ||
35 | #include <drm/drm_crtc_helper.h> | ||
36 | |||
37 | #include "vbox_drv.h" | ||
38 | |||
39 | int vbox_modeset = -1; | ||
40 | |||
41 | MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); | ||
42 | module_param_named(modeset, vbox_modeset, int, 0400); | ||
43 | |||
44 | static struct drm_driver driver; | ||
45 | |||
46 | static const struct pci_device_id pciidlist[] = { | ||
47 | { 0x80ee, 0xbeef, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | ||
48 | { 0, 0, 0}, | ||
49 | }; | ||
50 | MODULE_DEVICE_TABLE(pci, pciidlist); | ||
51 | |||
52 | static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
53 | { | ||
54 | return drm_get_pci_dev(pdev, ent, &driver); | ||
55 | } | ||
56 | |||
57 | static void vbox_pci_remove(struct pci_dev *pdev) | ||
58 | { | ||
59 | struct drm_device *dev = pci_get_drvdata(pdev); | ||
60 | |||
61 | drm_put_dev(dev); | ||
62 | } | ||
63 | |||
64 | static int vbox_drm_freeze(struct drm_device *dev) | ||
65 | { | ||
66 | struct vbox_private *vbox = dev->dev_private; | ||
67 | |||
68 | drm_kms_helper_poll_disable(dev); | ||
69 | |||
70 | pci_save_state(dev->pdev); | ||
71 | |||
72 | drm_fb_helper_set_suspend_unlocked(&vbox->fbdev->helper, true); | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static int vbox_drm_thaw(struct drm_device *dev) | ||
78 | { | ||
79 | struct vbox_private *vbox = dev->dev_private; | ||
80 | |||
81 | drm_mode_config_reset(dev); | ||
82 | drm_helper_resume_force_mode(dev); | ||
83 | drm_fb_helper_set_suspend_unlocked(&vbox->fbdev->helper, false); | ||
84 | |||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | static int vbox_drm_resume(struct drm_device *dev) | ||
89 | { | ||
90 | int ret; | ||
91 | |||
92 | if (pci_enable_device(dev->pdev)) | ||
93 | return -EIO; | ||
94 | |||
95 | ret = vbox_drm_thaw(dev); | ||
96 | if (ret) | ||
97 | return ret; | ||
98 | |||
99 | drm_kms_helper_poll_enable(dev); | ||
100 | |||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | static int vbox_pm_suspend(struct device *dev) | ||
105 | { | ||
106 | struct pci_dev *pdev = to_pci_dev(dev); | ||
107 | struct drm_device *ddev = pci_get_drvdata(pdev); | ||
108 | int error; | ||
109 | |||
110 | error = vbox_drm_freeze(ddev); | ||
111 | if (error) | ||
112 | return error; | ||
113 | |||
114 | pci_disable_device(pdev); | ||
115 | pci_set_power_state(pdev, PCI_D3hot); | ||
116 | |||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | static int vbox_pm_resume(struct device *dev) | ||
121 | { | ||
122 | struct drm_device *ddev = pci_get_drvdata(to_pci_dev(dev)); | ||
123 | |||
124 | return vbox_drm_resume(ddev); | ||
125 | } | ||
126 | |||
127 | static int vbox_pm_freeze(struct device *dev) | ||
128 | { | ||
129 | struct pci_dev *pdev = to_pci_dev(dev); | ||
130 | struct drm_device *ddev = pci_get_drvdata(pdev); | ||
131 | |||
132 | if (!ddev || !ddev->dev_private) | ||
133 | return -ENODEV; | ||
134 | |||
135 | return vbox_drm_freeze(ddev); | ||
136 | } | ||
137 | |||
138 | static int vbox_pm_thaw(struct device *dev) | ||
139 | { | ||
140 | struct drm_device *ddev = pci_get_drvdata(to_pci_dev(dev)); | ||
141 | |||
142 | return vbox_drm_thaw(ddev); | ||
143 | } | ||
144 | |||
145 | static int vbox_pm_poweroff(struct device *dev) | ||
146 | { | ||
147 | struct drm_device *ddev = pci_get_drvdata(to_pci_dev(dev)); | ||
148 | |||
149 | return vbox_drm_freeze(ddev); | ||
150 | } | ||
151 | |||
152 | static const struct dev_pm_ops vbox_pm_ops = { | ||
153 | .suspend = vbox_pm_suspend, | ||
154 | .resume = vbox_pm_resume, | ||
155 | .freeze = vbox_pm_freeze, | ||
156 | .thaw = vbox_pm_thaw, | ||
157 | .poweroff = vbox_pm_poweroff, | ||
158 | .restore = vbox_pm_resume, | ||
159 | }; | ||
160 | |||
161 | static struct pci_driver vbox_pci_driver = { | ||
162 | .name = DRIVER_NAME, | ||
163 | .id_table = pciidlist, | ||
164 | .probe = vbox_pci_probe, | ||
165 | .remove = vbox_pci_remove, | ||
166 | .driver.pm = &vbox_pm_ops, | ||
167 | }; | ||
168 | |||
169 | static const struct file_operations vbox_fops = { | ||
170 | .owner = THIS_MODULE, | ||
171 | .open = drm_open, | ||
172 | .release = drm_release, | ||
173 | .unlocked_ioctl = drm_ioctl, | ||
174 | .mmap = vbox_mmap, | ||
175 | .poll = drm_poll, | ||
176 | #ifdef CONFIG_COMPAT | ||
177 | .compat_ioctl = drm_compat_ioctl, | ||
178 | #endif | ||
179 | .read = drm_read, | ||
180 | }; | ||
181 | |||
182 | static int vbox_master_set(struct drm_device *dev, | ||
183 | struct drm_file *file_priv, bool from_open) | ||
184 | { | ||
185 | struct vbox_private *vbox = dev->dev_private; | ||
186 | |||
187 | /* | ||
188 | * We do not yet know whether the new owner can handle hotplug, so we | ||
189 | * do not advertise dynamic modes on the first query and send a | ||
190 | * tentative hotplug notification after that to see if they query again. | ||
191 | */ | ||
192 | vbox->initial_mode_queried = false; | ||
193 | |||
194 | mutex_lock(&vbox->hw_mutex); | ||
195 | /* | ||
196 | * Disable VBVA when someone releases master in case the next person | ||
197 | * tries tries to do VESA. | ||
198 | */ | ||
199 | /** @todo work out if anyone is likely to and whether it will work. */ | ||
200 | /* | ||
201 | * Update: we also disable it because if the new master does not do | ||
202 | * dirty rectangle reporting (e.g. old versions of Plymouth) then at | ||
203 | * least the first screen will still be updated. We enable it as soon | ||
204 | * as we receive a dirty rectangle report. | ||
205 | */ | ||
206 | vbox_disable_accel(vbox); | ||
207 | mutex_unlock(&vbox->hw_mutex); | ||
208 | |||
209 | return 0; | ||
210 | } | ||
211 | |||
212 | static void vbox_master_drop(struct drm_device *dev, struct drm_file *file_priv) | ||
213 | { | ||
214 | struct vbox_private *vbox = dev->dev_private; | ||
215 | |||
216 | /* See vbox_master_set() */ | ||
217 | vbox->initial_mode_queried = false; | ||
218 | |||
219 | mutex_lock(&vbox->hw_mutex); | ||
220 | vbox_disable_accel(vbox); | ||
221 | mutex_unlock(&vbox->hw_mutex); | ||
222 | } | ||
223 | |||
224 | static struct drm_driver driver = { | ||
225 | .driver_features = | ||
226 | DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | | ||
227 | DRIVER_PRIME, | ||
228 | .dev_priv_size = 0, | ||
229 | |||
230 | .load = vbox_driver_load, | ||
231 | .unload = vbox_driver_unload, | ||
232 | .lastclose = vbox_driver_lastclose, | ||
233 | .master_set = vbox_master_set, | ||
234 | .master_drop = vbox_master_drop, | ||
235 | .set_busid = drm_pci_set_busid, | ||
236 | |||
237 | .fops = &vbox_fops, | ||
238 | .irq_handler = vbox_irq_handler, | ||
239 | .name = DRIVER_NAME, | ||
240 | .desc = DRIVER_DESC, | ||
241 | .date = DRIVER_DATE, | ||
242 | .major = DRIVER_MAJOR, | ||
243 | .minor = DRIVER_MINOR, | ||
244 | .patchlevel = DRIVER_PATCHLEVEL, | ||
245 | |||
246 | .gem_free_object = vbox_gem_free_object, | ||
247 | .dumb_create = vbox_dumb_create, | ||
248 | .dumb_map_offset = vbox_dumb_mmap_offset, | ||
249 | .dumb_destroy = drm_gem_dumb_destroy, | ||
250 | .prime_handle_to_fd = drm_gem_prime_handle_to_fd, | ||
251 | .prime_fd_to_handle = drm_gem_prime_fd_to_handle, | ||
252 | .gem_prime_export = drm_gem_prime_export, | ||
253 | .gem_prime_import = drm_gem_prime_import, | ||
254 | .gem_prime_pin = vbox_gem_prime_pin, | ||
255 | .gem_prime_unpin = vbox_gem_prime_unpin, | ||
256 | .gem_prime_get_sg_table = vbox_gem_prime_get_sg_table, | ||
257 | .gem_prime_import_sg_table = vbox_gem_prime_import_sg_table, | ||
258 | .gem_prime_vmap = vbox_gem_prime_vmap, | ||
259 | .gem_prime_vunmap = vbox_gem_prime_vunmap, | ||
260 | .gem_prime_mmap = vbox_gem_prime_mmap, | ||
261 | }; | ||
262 | |||
263 | static int __init vbox_init(void) | ||
264 | { | ||
265 | #ifdef CONFIG_VGA_CONSOLE | ||
266 | if (vgacon_text_force() && vbox_modeset == -1) | ||
267 | return -EINVAL; | ||
268 | #endif | ||
269 | |||
270 | if (vbox_modeset == 0) | ||
271 | return -EINVAL; | ||
272 | |||
273 | return drm_pci_init(&driver, &vbox_pci_driver); | ||
274 | } | ||
275 | |||
276 | static void __exit vbox_exit(void) | ||
277 | { | ||
278 | drm_pci_exit(&driver, &vbox_pci_driver); | ||
279 | } | ||
280 | |||
281 | module_init(vbox_init); | ||
282 | module_exit(vbox_exit); | ||
283 | |||
284 | MODULE_AUTHOR("Oracle Corporation"); | ||
285 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
286 | MODULE_LICENSE("GPL and additional rights"); | ||
diff --git a/drivers/staging/vboxvideo/vbox_drv.h b/drivers/staging/vboxvideo/vbox_drv.h new file mode 100644 index 000000000000..4b9302703b36 --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_drv.h | |||
@@ -0,0 +1,296 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013-2017 Oracle Corporation | ||
3 | * This file is based on ast_drv.h | ||
4 | * Copyright 2012 Red Hat Inc. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the | ||
8 | * "Software"), to deal in the Software without restriction, including | ||
9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
11 | * permit persons to whom the Software is furnished to do so, subject to | ||
12 | * the following conditions: | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
19 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
20 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * The above copyright notice and this permission notice (including the | ||
23 | * next paragraph) shall be included in all copies or substantial portions | ||
24 | * of the Software. | ||
25 | * | ||
26 | * Authors: Dave Airlie <airlied@redhat.com> | ||
27 | * Michael Thayer <michael.thayer@oracle.com, | ||
28 | * Hans de Goede <hdegoede@redhat.com> | ||
29 | */ | ||
30 | #ifndef __VBOX_DRV_H__ | ||
31 | #define __VBOX_DRV_H__ | ||
32 | |||
33 | #include <linux/genalloc.h> | ||
34 | #include <linux/io.h> | ||
35 | #include <linux/string.h> | ||
36 | #include <linux/version.h> | ||
37 | |||
38 | #include <drm/drmP.h> | ||
39 | #include <drm/drm_encoder.h> | ||
40 | #include <drm/drm_fb_helper.h> | ||
41 | #include <drm/drm_gem.h> | ||
42 | |||
43 | #include <drm/ttm/ttm_bo_api.h> | ||
44 | #include <drm/ttm/ttm_bo_driver.h> | ||
45 | #include <drm/ttm/ttm_placement.h> | ||
46 | #include <drm/ttm/ttm_memory.h> | ||
47 | #include <drm/ttm/ttm_module.h> | ||
48 | |||
49 | #include "vboxvideo_guest.h" | ||
50 | #include "vboxvideo_vbe.h" | ||
51 | #include "hgsmi_ch_setup.h" | ||
52 | |||
53 | #define DRIVER_NAME "vboxvideo" | ||
54 | #define DRIVER_DESC "Oracle VM VirtualBox Graphics Card" | ||
55 | #define DRIVER_DATE "20130823" | ||
56 | |||
57 | #define DRIVER_MAJOR 1 | ||
58 | #define DRIVER_MINOR 0 | ||
59 | #define DRIVER_PATCHLEVEL 0 | ||
60 | |||
61 | #define VBOX_MAX_CURSOR_WIDTH 64 | ||
62 | #define VBOX_MAX_CURSOR_HEIGHT 64 | ||
63 | #define CURSOR_PIXEL_COUNT (VBOX_MAX_CURSOR_WIDTH * VBOX_MAX_CURSOR_HEIGHT) | ||
64 | #define CURSOR_DATA_SIZE (CURSOR_PIXEL_COUNT * 4 + CURSOR_PIXEL_COUNT / 8) | ||
65 | |||
66 | #define VBOX_MAX_SCREENS 32 | ||
67 | |||
68 | #define GUEST_HEAP_OFFSET(vbox) ((vbox)->full_vram_size - \ | ||
69 | VBVA_ADAPTER_INFORMATION_SIZE) | ||
70 | #define GUEST_HEAP_SIZE VBVA_ADAPTER_INFORMATION_SIZE | ||
71 | #define GUEST_HEAP_USABLE_SIZE (VBVA_ADAPTER_INFORMATION_SIZE - \ | ||
72 | sizeof(struct hgsmi_host_flags)) | ||
73 | #define HOST_FLAGS_OFFSET GUEST_HEAP_USABLE_SIZE | ||
74 | |||
75 | struct vbox_fbdev; | ||
76 | |||
77 | struct vbox_private { | ||
78 | struct drm_device *dev; | ||
79 | |||
80 | u8 __iomem *guest_heap; | ||
81 | u8 __iomem *vbva_buffers; | ||
82 | struct gen_pool *guest_pool; | ||
83 | struct vbva_buf_ctx *vbva_info; | ||
84 | bool any_pitch; | ||
85 | u32 num_crtcs; | ||
86 | /** Amount of available VRAM, including space used for buffers. */ | ||
87 | u32 full_vram_size; | ||
88 | /** Amount of available VRAM, not including space used for buffers. */ | ||
89 | u32 available_vram_size; | ||
90 | /** Array of structures for receiving mode hints. */ | ||
91 | struct vbva_modehint *last_mode_hints; | ||
92 | |||
93 | struct vbox_fbdev *fbdev; | ||
94 | |||
95 | int fb_mtrr; | ||
96 | |||
97 | struct { | ||
98 | struct drm_global_reference mem_global_ref; | ||
99 | struct ttm_bo_global_ref bo_global_ref; | ||
100 | struct ttm_bo_device bdev; | ||
101 | } ttm; | ||
102 | |||
103 | struct mutex hw_mutex; /* protects modeset and accel/vbva accesses */ | ||
104 | /** | ||
105 | * We decide whether or not user-space supports display hot-plug | ||
106 | * depending on whether they react to a hot-plug event after the initial | ||
107 | * mode query. | ||
108 | */ | ||
109 | bool initial_mode_queried; | ||
110 | struct work_struct hotplug_work; | ||
111 | u32 input_mapping_width; | ||
112 | u32 input_mapping_height; | ||
113 | /** | ||
114 | * Is user-space using an X.Org-style layout of one large frame-buffer | ||
115 | * encompassing all screen ones or is the fbdev console active? | ||
116 | */ | ||
117 | bool single_framebuffer; | ||
118 | u32 cursor_width; | ||
119 | u32 cursor_height; | ||
120 | u32 cursor_hot_x; | ||
121 | u32 cursor_hot_y; | ||
122 | size_t cursor_data_size; | ||
123 | u8 cursor_data[CURSOR_DATA_SIZE]; | ||
124 | }; | ||
125 | |||
126 | #undef CURSOR_PIXEL_COUNT | ||
127 | #undef CURSOR_DATA_SIZE | ||
128 | |||
129 | int vbox_driver_load(struct drm_device *dev, unsigned long flags); | ||
130 | void vbox_driver_unload(struct drm_device *dev); | ||
131 | void vbox_driver_lastclose(struct drm_device *dev); | ||
132 | |||
133 | struct vbox_gem_object; | ||
134 | |||
135 | struct vbox_connector { | ||
136 | struct drm_connector base; | ||
137 | char name[32]; | ||
138 | struct vbox_crtc *vbox_crtc; | ||
139 | struct { | ||
140 | u16 width; | ||
141 | u16 height; | ||
142 | bool disconnected; | ||
143 | } mode_hint; | ||
144 | }; | ||
145 | |||
146 | struct vbox_crtc { | ||
147 | struct drm_crtc base; | ||
148 | bool blanked; | ||
149 | bool disconnected; | ||
150 | unsigned int crtc_id; | ||
151 | u32 fb_offset; | ||
152 | bool cursor_enabled; | ||
153 | u16 x_hint; | ||
154 | u16 y_hint; | ||
155 | }; | ||
156 | |||
157 | struct vbox_encoder { | ||
158 | struct drm_encoder base; | ||
159 | }; | ||
160 | |||
161 | struct vbox_framebuffer { | ||
162 | struct drm_framebuffer base; | ||
163 | struct drm_gem_object *obj; | ||
164 | }; | ||
165 | |||
166 | struct vbox_fbdev { | ||
167 | struct drm_fb_helper helper; | ||
168 | struct vbox_framebuffer afb; | ||
169 | int size; | ||
170 | struct ttm_bo_kmap_obj mapping; | ||
171 | int x1, y1, x2, y2; /* dirty rect */ | ||
172 | spinlock_t dirty_lock; | ||
173 | }; | ||
174 | |||
175 | #define to_vbox_crtc(x) container_of(x, struct vbox_crtc, base) | ||
176 | #define to_vbox_connector(x) container_of(x, struct vbox_connector, base) | ||
177 | #define to_vbox_encoder(x) container_of(x, struct vbox_encoder, base) | ||
178 | #define to_vbox_framebuffer(x) container_of(x, struct vbox_framebuffer, base) | ||
179 | |||
180 | int vbox_mode_init(struct drm_device *dev); | ||
181 | void vbox_mode_fini(struct drm_device *dev); | ||
182 | |||
183 | #define DRM_MODE_FB_CMD drm_mode_fb_cmd2 | ||
184 | #define CRTC_FB(crtc) ((crtc)->primary->fb) | ||
185 | |||
186 | void vbox_enable_accel(struct vbox_private *vbox); | ||
187 | void vbox_disable_accel(struct vbox_private *vbox); | ||
188 | void vbox_report_caps(struct vbox_private *vbox); | ||
189 | |||
190 | void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb, | ||
191 | struct drm_clip_rect *rects, | ||
192 | unsigned int num_rects); | ||
193 | |||
194 | int vbox_framebuffer_init(struct drm_device *dev, | ||
195 | struct vbox_framebuffer *vbox_fb, | ||
196 | const struct DRM_MODE_FB_CMD *mode_cmd, | ||
197 | struct drm_gem_object *obj); | ||
198 | |||
199 | int vbox_fbdev_init(struct drm_device *dev); | ||
200 | void vbox_fbdev_fini(struct drm_device *dev); | ||
201 | void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr); | ||
202 | |||
203 | struct vbox_bo { | ||
204 | struct ttm_buffer_object bo; | ||
205 | struct ttm_placement placement; | ||
206 | struct ttm_bo_kmap_obj kmap; | ||
207 | struct drm_gem_object gem; | ||
208 | struct ttm_place placements[3]; | ||
209 | int pin_count; | ||
210 | }; | ||
211 | |||
212 | #define gem_to_vbox_bo(gobj) container_of((gobj), struct vbox_bo, gem) | ||
213 | |||
214 | static inline struct vbox_bo *vbox_bo(struct ttm_buffer_object *bo) | ||
215 | { | ||
216 | return container_of(bo, struct vbox_bo, bo); | ||
217 | } | ||
218 | |||
219 | #define to_vbox_obj(x) container_of(x, struct vbox_gem_object, base) | ||
220 | |||
221 | int vbox_dumb_create(struct drm_file *file, | ||
222 | struct drm_device *dev, | ||
223 | struct drm_mode_create_dumb *args); | ||
224 | |||
225 | void vbox_gem_free_object(struct drm_gem_object *obj); | ||
226 | int vbox_dumb_mmap_offset(struct drm_file *file, | ||
227 | struct drm_device *dev, | ||
228 | u32 handle, u64 *offset); | ||
229 | |||
230 | #define DRM_FILE_PAGE_OFFSET (0x10000000ULL >> PAGE_SHIFT) | ||
231 | |||
232 | int vbox_mm_init(struct vbox_private *vbox); | ||
233 | void vbox_mm_fini(struct vbox_private *vbox); | ||
234 | |||
235 | int vbox_bo_create(struct drm_device *dev, int size, int align, | ||
236 | u32 flags, struct vbox_bo **pvboxbo); | ||
237 | |||
238 | int vbox_gem_create(struct drm_device *dev, | ||
239 | u32 size, bool iskernel, struct drm_gem_object **obj); | ||
240 | |||
241 | int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr); | ||
242 | int vbox_bo_unpin(struct vbox_bo *bo); | ||
243 | |||
244 | static inline int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait) | ||
245 | { | ||
246 | int ret; | ||
247 | |||
248 | ret = ttm_bo_reserve(&bo->bo, true, no_wait, NULL); | ||
249 | if (ret) { | ||
250 | if (ret != -ERESTARTSYS && ret != -EBUSY) | ||
251 | DRM_ERROR("reserve failed %p\n", bo); | ||
252 | return ret; | ||
253 | } | ||
254 | return 0; | ||
255 | } | ||
256 | |||
257 | static inline void vbox_bo_unreserve(struct vbox_bo *bo) | ||
258 | { | ||
259 | ttm_bo_unreserve(&bo->bo); | ||
260 | } | ||
261 | |||
262 | void vbox_ttm_placement(struct vbox_bo *bo, int domain); | ||
263 | int vbox_bo_push_sysram(struct vbox_bo *bo); | ||
264 | int vbox_mmap(struct file *filp, struct vm_area_struct *vma); | ||
265 | |||
266 | /* vbox_prime.c */ | ||
267 | int vbox_gem_prime_pin(struct drm_gem_object *obj); | ||
268 | void vbox_gem_prime_unpin(struct drm_gem_object *obj); | ||
269 | struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj); | ||
270 | struct drm_gem_object *vbox_gem_prime_import_sg_table( | ||
271 | struct drm_device *dev, struct dma_buf_attachment *attach, | ||
272 | struct sg_table *table); | ||
273 | void *vbox_gem_prime_vmap(struct drm_gem_object *obj); | ||
274 | void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr); | ||
275 | int vbox_gem_prime_mmap(struct drm_gem_object *obj, | ||
276 | struct vm_area_struct *area); | ||
277 | |||
278 | /* vbox_irq.c */ | ||
279 | int vbox_irq_init(struct vbox_private *vbox); | ||
280 | void vbox_irq_fini(struct vbox_private *vbox); | ||
281 | void vbox_report_hotplug(struct vbox_private *vbox); | ||
282 | irqreturn_t vbox_irq_handler(int irq, void *arg); | ||
283 | |||
284 | /* vbox_hgsmi.c */ | ||
285 | void *hgsmi_buffer_alloc(struct gen_pool *guest_pool, size_t size, | ||
286 | u8 channel, u16 channel_info); | ||
287 | void hgsmi_buffer_free(struct gen_pool *guest_pool, void *buf); | ||
288 | int hgsmi_buffer_submit(struct gen_pool *guest_pool, void *buf); | ||
289 | |||
290 | static inline void vbox_write_ioport(u16 index, u16 data) | ||
291 | { | ||
292 | outw(index, VBE_DISPI_IOPORT_INDEX); | ||
293 | outw(data, VBE_DISPI_IOPORT_DATA); | ||
294 | } | ||
295 | |||
296 | #endif | ||
diff --git a/drivers/staging/vboxvideo/vbox_err.h b/drivers/staging/vboxvideo/vbox_err.h new file mode 100644 index 000000000000..562db8630eb0 --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_err.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __VBOX_ERR_H__ | ||
24 | #define __VBOX_ERR_H__ | ||
25 | |||
26 | /** | ||
27 | * @name VirtualBox virtual-hardware error macros | ||
28 | * @{ | ||
29 | */ | ||
30 | |||
31 | #define VINF_SUCCESS 0 | ||
32 | #define VERR_INVALID_PARAMETER (-2) | ||
33 | #define VERR_INVALID_POINTER (-6) | ||
34 | #define VERR_NO_MEMORY (-8) | ||
35 | #define VERR_NOT_IMPLEMENTED (-12) | ||
36 | #define VERR_INVALID_FUNCTION (-36) | ||
37 | #define VERR_NOT_SUPPORTED (-37) | ||
38 | #define VERR_TOO_MUCH_DATA (-42) | ||
39 | #define VERR_INVALID_STATE (-79) | ||
40 | #define VERR_OUT_OF_RESOURCES (-80) | ||
41 | #define VERR_ALREADY_EXISTS (-105) | ||
42 | #define VERR_INTERNAL_ERROR (-225) | ||
43 | |||
44 | #define RT_SUCCESS_NP(rc) ((int)(rc) >= VINF_SUCCESS) | ||
45 | #define RT_SUCCESS(rc) (likely(RT_SUCCESS_NP(rc))) | ||
46 | #define RT_FAILURE(rc) (unlikely(!RT_SUCCESS_NP(rc))) | ||
47 | |||
48 | /** @} */ | ||
49 | |||
50 | #endif | ||
diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c new file mode 100644 index 000000000000..35f6d9f8c203 --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_fb.c | |||
@@ -0,0 +1,412 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013-2017 Oracle Corporation | ||
3 | * This file is based on ast_fb.c | ||
4 | * Copyright 2012 Red Hat Inc. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the | ||
8 | * "Software"), to deal in the Software without restriction, including | ||
9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
11 | * permit persons to whom the Software is furnished to do so, subject to | ||
12 | * the following conditions: | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
19 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
20 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * The above copyright notice and this permission notice (including the | ||
23 | * next paragraph) shall be included in all copies or substantial portions | ||
24 | * of the Software. | ||
25 | * | ||
26 | * Authors: Dave Airlie <airlied@redhat.com> | ||
27 | * Michael Thayer <michael.thayer@oracle.com, | ||
28 | */ | ||
29 | #include <linux/module.h> | ||
30 | #include <linux/kernel.h> | ||
31 | #include <linux/errno.h> | ||
32 | #include <linux/string.h> | ||
33 | #include <linux/mm.h> | ||
34 | #include <linux/tty.h> | ||
35 | #include <linux/sysrq.h> | ||
36 | #include <linux/delay.h> | ||
37 | #include <linux/fb.h> | ||
38 | #include <linux/init.h> | ||
39 | |||
40 | #include <drm/drmP.h> | ||
41 | #include <drm/drm_crtc.h> | ||
42 | #include <drm/drm_fb_helper.h> | ||
43 | #include <drm/drm_crtc_helper.h> | ||
44 | |||
45 | #include "vbox_drv.h" | ||
46 | #include "vboxvideo.h" | ||
47 | |||
48 | #define VBOX_DIRTY_DELAY (HZ / 30) | ||
49 | /** | ||
50 | * Tell the host about dirty rectangles to update. | ||
51 | */ | ||
52 | static void vbox_dirty_update(struct vbox_fbdev *fbdev, | ||
53 | int x, int y, int width, int height) | ||
54 | { | ||
55 | struct drm_gem_object *obj; | ||
56 | struct vbox_bo *bo; | ||
57 | int ret = -EBUSY; | ||
58 | bool store_for_later = false; | ||
59 | int x2, y2; | ||
60 | unsigned long flags; | ||
61 | struct drm_clip_rect rect; | ||
62 | |||
63 | obj = fbdev->afb.obj; | ||
64 | bo = gem_to_vbox_bo(obj); | ||
65 | |||
66 | /* | ||
67 | * try and reserve the BO, if we fail with busy | ||
68 | * then the BO is being moved and we should | ||
69 | * store up the damage until later. | ||
70 | */ | ||
71 | if (drm_can_sleep()) | ||
72 | ret = vbox_bo_reserve(bo, true); | ||
73 | if (ret) { | ||
74 | if (ret != -EBUSY) | ||
75 | return; | ||
76 | |||
77 | store_for_later = true; | ||
78 | } | ||
79 | |||
80 | x2 = x + width - 1; | ||
81 | y2 = y + height - 1; | ||
82 | spin_lock_irqsave(&fbdev->dirty_lock, flags); | ||
83 | |||
84 | if (fbdev->y1 < y) | ||
85 | y = fbdev->y1; | ||
86 | if (fbdev->y2 > y2) | ||
87 | y2 = fbdev->y2; | ||
88 | if (fbdev->x1 < x) | ||
89 | x = fbdev->x1; | ||
90 | if (fbdev->x2 > x2) | ||
91 | x2 = fbdev->x2; | ||
92 | |||
93 | if (store_for_later) { | ||
94 | fbdev->x1 = x; | ||
95 | fbdev->x2 = x2; | ||
96 | fbdev->y1 = y; | ||
97 | fbdev->y2 = y2; | ||
98 | spin_unlock_irqrestore(&fbdev->dirty_lock, flags); | ||
99 | return; | ||
100 | } | ||
101 | |||
102 | fbdev->x1 = INT_MAX; | ||
103 | fbdev->y1 = INT_MAX; | ||
104 | fbdev->x2 = 0; | ||
105 | fbdev->y2 = 0; | ||
106 | |||
107 | spin_unlock_irqrestore(&fbdev->dirty_lock, flags); | ||
108 | |||
109 | /* | ||
110 | * Not sure why the original code subtracted 1 here, but I will keep | ||
111 | * it that way to avoid unnecessary differences. | ||
112 | */ | ||
113 | rect.x1 = x; | ||
114 | rect.x2 = x2 + 1; | ||
115 | rect.y1 = y; | ||
116 | rect.y2 = y2 + 1; | ||
117 | vbox_framebuffer_dirty_rectangles(&fbdev->afb.base, &rect, 1); | ||
118 | |||
119 | vbox_bo_unreserve(bo); | ||
120 | } | ||
121 | |||
122 | #ifdef CONFIG_FB_DEFERRED_IO | ||
123 | static void vbox_deferred_io(struct fb_info *info, struct list_head *pagelist) | ||
124 | { | ||
125 | struct vbox_fbdev *fbdev = info->par; | ||
126 | unsigned long start, end, min, max; | ||
127 | struct page *page; | ||
128 | int y1, y2; | ||
129 | |||
130 | min = ULONG_MAX; | ||
131 | max = 0; | ||
132 | list_for_each_entry(page, pagelist, lru) { | ||
133 | start = page->index << PAGE_SHIFT; | ||
134 | end = start + PAGE_SIZE - 1; | ||
135 | min = min(min, start); | ||
136 | max = max(max, end); | ||
137 | } | ||
138 | |||
139 | if (min < max) { | ||
140 | y1 = min / info->fix.line_length; | ||
141 | y2 = (max / info->fix.line_length) + 1; | ||
142 | DRM_INFO("%s: Calling dirty update: 0, %d, %d, %d\n", | ||
143 | __func__, y1, info->var.xres, y2 - y1 - 1); | ||
144 | vbox_dirty_update(fbdev, 0, y1, info->var.xres, y2 - y1 - 1); | ||
145 | } | ||
146 | } | ||
147 | |||
148 | static struct fb_deferred_io vbox_defio = { | ||
149 | .delay = VBOX_DIRTY_DELAY, | ||
150 | .deferred_io = vbox_deferred_io, | ||
151 | }; | ||
152 | #endif | ||
153 | |||
154 | static void vbox_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | ||
155 | { | ||
156 | struct vbox_fbdev *fbdev = info->par; | ||
157 | |||
158 | sys_fillrect(info, rect); | ||
159 | vbox_dirty_update(fbdev, rect->dx, rect->dy, rect->width, rect->height); | ||
160 | } | ||
161 | |||
162 | static void vbox_copyarea(struct fb_info *info, const struct fb_copyarea *area) | ||
163 | { | ||
164 | struct vbox_fbdev *fbdev = info->par; | ||
165 | |||
166 | sys_copyarea(info, area); | ||
167 | vbox_dirty_update(fbdev, area->dx, area->dy, area->width, area->height); | ||
168 | } | ||
169 | |||
170 | static void vbox_imageblit(struct fb_info *info, const struct fb_image *image) | ||
171 | { | ||
172 | struct vbox_fbdev *fbdev = info->par; | ||
173 | |||
174 | sys_imageblit(info, image); | ||
175 | vbox_dirty_update(fbdev, image->dx, image->dy, image->width, | ||
176 | image->height); | ||
177 | } | ||
178 | |||
179 | static struct fb_ops vboxfb_ops = { | ||
180 | .owner = THIS_MODULE, | ||
181 | .fb_check_var = drm_fb_helper_check_var, | ||
182 | .fb_set_par = drm_fb_helper_set_par, | ||
183 | .fb_fillrect = vbox_fillrect, | ||
184 | .fb_copyarea = vbox_copyarea, | ||
185 | .fb_imageblit = vbox_imageblit, | ||
186 | .fb_pan_display = drm_fb_helper_pan_display, | ||
187 | .fb_blank = drm_fb_helper_blank, | ||
188 | .fb_setcmap = drm_fb_helper_setcmap, | ||
189 | .fb_debug_enter = drm_fb_helper_debug_enter, | ||
190 | .fb_debug_leave = drm_fb_helper_debug_leave, | ||
191 | }; | ||
192 | |||
193 | static int vboxfb_create_object(struct vbox_fbdev *fbdev, | ||
194 | struct DRM_MODE_FB_CMD *mode_cmd, | ||
195 | struct drm_gem_object **gobj_p) | ||
196 | { | ||
197 | struct drm_device *dev = fbdev->helper.dev; | ||
198 | u32 size; | ||
199 | struct drm_gem_object *gobj; | ||
200 | u32 pitch = mode_cmd->pitches[0]; | ||
201 | int ret; | ||
202 | |||
203 | size = pitch * mode_cmd->height; | ||
204 | ret = vbox_gem_create(dev, size, true, &gobj); | ||
205 | if (ret) | ||
206 | return ret; | ||
207 | |||
208 | *gobj_p = gobj; | ||
209 | |||
210 | return 0; | ||
211 | } | ||
212 | |||
213 | static int vboxfb_create(struct drm_fb_helper *helper, | ||
214 | struct drm_fb_helper_surface_size *sizes) | ||
215 | { | ||
216 | struct vbox_fbdev *fbdev = | ||
217 | container_of(helper, struct vbox_fbdev, helper); | ||
218 | struct drm_device *dev = fbdev->helper.dev; | ||
219 | struct DRM_MODE_FB_CMD mode_cmd; | ||
220 | struct drm_framebuffer *fb; | ||
221 | struct fb_info *info; | ||
222 | struct device *device = &dev->pdev->dev; | ||
223 | struct drm_gem_object *gobj; | ||
224 | struct vbox_bo *bo; | ||
225 | int size, ret; | ||
226 | u32 pitch; | ||
227 | |||
228 | mode_cmd.width = sizes->surface_width; | ||
229 | mode_cmd.height = sizes->surface_height; | ||
230 | pitch = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); | ||
231 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, | ||
232 | sizes->surface_depth); | ||
233 | mode_cmd.pitches[0] = pitch; | ||
234 | |||
235 | size = pitch * mode_cmd.height; | ||
236 | |||
237 | ret = vboxfb_create_object(fbdev, &mode_cmd, &gobj); | ||
238 | if (ret) { | ||
239 | DRM_ERROR("failed to create fbcon backing object %d\n", ret); | ||
240 | return ret; | ||
241 | } | ||
242 | |||
243 | ret = vbox_framebuffer_init(dev, &fbdev->afb, &mode_cmd, gobj); | ||
244 | if (ret) | ||
245 | return ret; | ||
246 | |||
247 | bo = gem_to_vbox_bo(gobj); | ||
248 | |||
249 | ret = vbox_bo_reserve(bo, false); | ||
250 | if (ret) | ||
251 | return ret; | ||
252 | |||
253 | ret = vbox_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL); | ||
254 | if (ret) { | ||
255 | vbox_bo_unreserve(bo); | ||
256 | return ret; | ||
257 | } | ||
258 | |||
259 | ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap); | ||
260 | vbox_bo_unreserve(bo); | ||
261 | if (ret) { | ||
262 | DRM_ERROR("failed to kmap fbcon\n"); | ||
263 | return ret; | ||
264 | } | ||
265 | |||
266 | info = framebuffer_alloc(0, device); | ||
267 | if (!info) | ||
268 | return -ENOMEM; | ||
269 | info->par = fbdev; | ||
270 | |||
271 | fbdev->size = size; | ||
272 | |||
273 | fb = &fbdev->afb.base; | ||
274 | fbdev->helper.fb = fb; | ||
275 | fbdev->helper.fbdev = info; | ||
276 | |||
277 | strcpy(info->fix.id, "vboxdrmfb"); | ||
278 | |||
279 | /* | ||
280 | * The last flag forces a mode set on VT switches even if the kernel | ||
281 | * does not think it is needed. | ||
282 | */ | ||
283 | info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT | | ||
284 | FBINFO_MISC_ALWAYS_SETPAR; | ||
285 | info->fbops = &vboxfb_ops; | ||
286 | |||
287 | ret = fb_alloc_cmap(&info->cmap, 256, 0); | ||
288 | if (ret) | ||
289 | return -ENOMEM; | ||
290 | |||
291 | /* | ||
292 | * This seems to be done for safety checking that the framebuffer | ||
293 | * is not registered twice by different drivers. | ||
294 | */ | ||
295 | info->apertures = alloc_apertures(1); | ||
296 | if (!info->apertures) | ||
297 | return -ENOMEM; | ||
298 | info->apertures->ranges[0].base = pci_resource_start(dev->pdev, 0); | ||
299 | info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0); | ||
300 | |||
301 | drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); | ||
302 | drm_fb_helper_fill_var(info, &fbdev->helper, sizes->fb_width, | ||
303 | sizes->fb_height); | ||
304 | |||
305 | info->screen_base = bo->kmap.virtual; | ||
306 | info->screen_size = size; | ||
307 | |||
308 | #ifdef CONFIG_FB_DEFERRED_IO | ||
309 | info->fbdefio = &vbox_defio; | ||
310 | fb_deferred_io_init(info); | ||
311 | #endif | ||
312 | |||
313 | info->pixmap.flags = FB_PIXMAP_SYSTEM; | ||
314 | |||
315 | DRM_DEBUG_KMS("allocated %dx%d\n", fb->width, fb->height); | ||
316 | |||
317 | return 0; | ||
318 | } | ||
319 | |||
320 | static void vbox_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, | ||
321 | u16 blue, int regno) | ||
322 | { | ||
323 | } | ||
324 | |||
325 | static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, | ||
326 | u16 *blue, int regno) | ||
327 | { | ||
328 | *red = regno; | ||
329 | *green = regno; | ||
330 | *blue = regno; | ||
331 | } | ||
332 | |||
333 | static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { | ||
334 | .gamma_set = vbox_fb_gamma_set, | ||
335 | .gamma_get = vbox_fb_gamma_get, | ||
336 | .fb_probe = vboxfb_create, | ||
337 | }; | ||
338 | |||
339 | void vbox_fbdev_fini(struct drm_device *dev) | ||
340 | { | ||
341 | struct vbox_private *vbox = dev->dev_private; | ||
342 | struct vbox_fbdev *fbdev = vbox->fbdev; | ||
343 | struct vbox_framebuffer *afb = &fbdev->afb; | ||
344 | |||
345 | drm_fb_helper_unregister_fbi(&fbdev->helper); | ||
346 | |||
347 | if (afb->obj) { | ||
348 | struct vbox_bo *bo = gem_to_vbox_bo(afb->obj); | ||
349 | |||
350 | if (!vbox_bo_reserve(bo, false)) { | ||
351 | if (bo->kmap.virtual) | ||
352 | ttm_bo_kunmap(&bo->kmap); | ||
353 | /* | ||
354 | * QXL does this, but is it really needed before | ||
355 | * freeing? | ||
356 | */ | ||
357 | if (bo->pin_count) | ||
358 | vbox_bo_unpin(bo); | ||
359 | vbox_bo_unreserve(bo); | ||
360 | } | ||
361 | drm_gem_object_unreference_unlocked(afb->obj); | ||
362 | afb->obj = NULL; | ||
363 | } | ||
364 | drm_fb_helper_fini(&fbdev->helper); | ||
365 | |||
366 | drm_framebuffer_unregister_private(&afb->base); | ||
367 | drm_framebuffer_cleanup(&afb->base); | ||
368 | } | ||
369 | |||
370 | int vbox_fbdev_init(struct drm_device *dev) | ||
371 | { | ||
372 | struct vbox_private *vbox = dev->dev_private; | ||
373 | struct vbox_fbdev *fbdev; | ||
374 | int ret; | ||
375 | |||
376 | fbdev = devm_kzalloc(dev->dev, sizeof(*fbdev), GFP_KERNEL); | ||
377 | if (!fbdev) | ||
378 | return -ENOMEM; | ||
379 | |||
380 | vbox->fbdev = fbdev; | ||
381 | spin_lock_init(&fbdev->dirty_lock); | ||
382 | |||
383 | drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs); | ||
384 | ret = drm_fb_helper_init(dev, &fbdev->helper, vbox->num_crtcs); | ||
385 | if (ret) | ||
386 | return ret; | ||
387 | |||
388 | ret = drm_fb_helper_single_add_all_connectors(&fbdev->helper); | ||
389 | if (ret) | ||
390 | goto err_fini; | ||
391 | |||
392 | /* disable all the possible outputs/crtcs before entering KMS mode */ | ||
393 | drm_helper_disable_unused_functions(dev); | ||
394 | |||
395 | ret = drm_fb_helper_initial_config(&fbdev->helper, 32); | ||
396 | if (ret) | ||
397 | goto err_fini; | ||
398 | |||
399 | return 0; | ||
400 | |||
401 | err_fini: | ||
402 | drm_fb_helper_fini(&fbdev->helper); | ||
403 | return ret; | ||
404 | } | ||
405 | |||
406 | void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr) | ||
407 | { | ||
408 | struct fb_info *fbdev = vbox->fbdev->helper.fbdev; | ||
409 | |||
410 | fbdev->fix.smem_start = fbdev->apertures->ranges[0].base + gpu_addr; | ||
411 | fbdev->fix.smem_len = vbox->available_vram_size - gpu_addr; | ||
412 | } | ||
diff --git a/drivers/staging/vboxvideo/vbox_hgsmi.c b/drivers/staging/vboxvideo/vbox_hgsmi.c new file mode 100644 index 000000000000..822fd31121cb --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_hgsmi.c | |||
@@ -0,0 +1,115 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the | ||
6 | * "Software"), to deal in the Software without restriction, including | ||
7 | * without limitation the rights to use, copy, modify, merge, publish, | ||
8 | * distribute, sub license, and/or sell copies of the Software, and to | ||
9 | * permit persons to whom the Software is furnished to do so, subject to | ||
10 | * the following conditions: | ||
11 | * | ||
12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
13 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
15 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
16 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
17 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
18 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
19 | * | ||
20 | * The above copyright notice and this permission notice (including the | ||
21 | * next paragraph) shall be included in all copies or substantial portions | ||
22 | * of the Software. | ||
23 | * | ||
24 | * Authors: Hans de Goede <hdegoede@redhat.com> | ||
25 | */ | ||
26 | |||
27 | #include "vbox_drv.h" | ||
28 | #include "vboxvideo_vbe.h" | ||
29 | #include "hgsmi_defs.h" | ||
30 | |||
31 | /* One-at-a-Time Hash from http://www.burtleburtle.net/bob/hash/doobs.html */ | ||
32 | static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) | ||
33 | { | ||
34 | while (size--) { | ||
35 | hash += *data++; | ||
36 | hash += (hash << 10); | ||
37 | hash ^= (hash >> 6); | ||
38 | } | ||
39 | |||
40 | return hash; | ||
41 | } | ||
42 | |||
43 | static u32 hgsmi_hash_end(u32 hash) | ||
44 | { | ||
45 | hash += (hash << 3); | ||
46 | hash ^= (hash >> 11); | ||
47 | hash += (hash << 15); | ||
48 | |||
49 | return hash; | ||
50 | } | ||
51 | |||
52 | /* Not really a checksum but that is the naming used in all vbox code */ | ||
53 | static u32 hgsmi_checksum(u32 offset, | ||
54 | const struct hgsmi_buffer_header *header, | ||
55 | const struct hgsmi_buffer_tail *tail) | ||
56 | { | ||
57 | u32 checksum; | ||
58 | |||
59 | checksum = hgsmi_hash_process(0, (u8 *)&offset, sizeof(offset)); | ||
60 | checksum = hgsmi_hash_process(checksum, (u8 *)header, sizeof(*header)); | ||
61 | /* 4 -> Do not checksum the checksum itself */ | ||
62 | checksum = hgsmi_hash_process(checksum, (u8 *)tail, 4); | ||
63 | |||
64 | return hgsmi_hash_end(checksum); | ||
65 | } | ||
66 | |||
67 | void *hgsmi_buffer_alloc(struct gen_pool *guest_pool, size_t size, | ||
68 | u8 channel, u16 channel_info) | ||
69 | { | ||
70 | struct hgsmi_buffer_header *h; | ||
71 | struct hgsmi_buffer_tail *t; | ||
72 | size_t total_size; | ||
73 | dma_addr_t offset; | ||
74 | |||
75 | total_size = size + sizeof(*h) + sizeof(*t); | ||
76 | h = gen_pool_dma_alloc(guest_pool, total_size, &offset); | ||
77 | if (!h) | ||
78 | return NULL; | ||
79 | |||
80 | t = (struct hgsmi_buffer_tail *)((u8 *)h + sizeof(*h) + size); | ||
81 | |||
82 | h->flags = HGSMI_BUFFER_HEADER_F_SEQ_SINGLE; | ||
83 | h->data_size = size; | ||
84 | h->channel = channel; | ||
85 | h->channel_info = channel_info; | ||
86 | memset(&h->u.header_data, 0, sizeof(h->u.header_data)); | ||
87 | |||
88 | t->reserved = 0; | ||
89 | t->checksum = hgsmi_checksum(offset, h, t); | ||
90 | |||
91 | return (u8 *)h + sizeof(*h); | ||
92 | } | ||
93 | |||
94 | void hgsmi_buffer_free(struct gen_pool *guest_pool, void *buf) | ||
95 | { | ||
96 | struct hgsmi_buffer_header *h = | ||
97 | (struct hgsmi_buffer_header *)((u8 *)buf - sizeof(*h)); | ||
98 | size_t total_size = h->data_size + sizeof(*h) + | ||
99 | sizeof(struct hgsmi_buffer_tail); | ||
100 | |||
101 | gen_pool_free(guest_pool, (unsigned long)h, total_size); | ||
102 | } | ||
103 | |||
104 | int hgsmi_buffer_submit(struct gen_pool *guest_pool, void *buf) | ||
105 | { | ||
106 | phys_addr_t offset; | ||
107 | |||
108 | offset = gen_pool_virt_to_phys(guest_pool, (unsigned long)buf - | ||
109 | sizeof(struct hgsmi_buffer_header)); | ||
110 | outl(offset, VGA_PORT_HGSMI_GUEST); | ||
111 | /* Make the compiler aware that the host has changed memory. */ | ||
112 | mb(); | ||
113 | |||
114 | return 0; | ||
115 | } | ||
diff --git a/drivers/staging/vboxvideo/vbox_irq.c b/drivers/staging/vboxvideo/vbox_irq.c new file mode 100644 index 000000000000..3ca8bec62ac4 --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_irq.c | |||
@@ -0,0 +1,197 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016-2017 Oracle Corporation | ||
3 | * This file is based on qxl_irq.c | ||
4 | * Copyright 2013 Red Hat Inc. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the "Software"), | ||
8 | * to deal in the Software without restriction, including without limitation | ||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
11 | * Software is furnished to do so, subject to the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice shall be included in | ||
14 | * all copies or substantial portions of the Software. | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
19 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
22 | * OTHER DEALINGS IN THE SOFTWARE. | ||
23 | * | ||
24 | * Authors: Dave Airlie | ||
25 | * Alon Levy | ||
26 | * Michael Thayer <michael.thayer@oracle.com, | ||
27 | * Hans de Goede <hdegoede@redhat.com> | ||
28 | */ | ||
29 | |||
30 | #include <drm/drm_crtc_helper.h> | ||
31 | |||
32 | #include "vbox_drv.h" | ||
33 | #include "vboxvideo.h" | ||
34 | |||
35 | static void vbox_clear_irq(void) | ||
36 | { | ||
37 | outl((u32)~0, VGA_PORT_HGSMI_HOST); | ||
38 | } | ||
39 | |||
40 | static u32 vbox_get_flags(struct vbox_private *vbox) | ||
41 | { | ||
42 | return readl(vbox->guest_heap + HOST_FLAGS_OFFSET); | ||
43 | } | ||
44 | |||
45 | void vbox_report_hotplug(struct vbox_private *vbox) | ||
46 | { | ||
47 | schedule_work(&vbox->hotplug_work); | ||
48 | } | ||
49 | |||
50 | irqreturn_t vbox_irq_handler(int irq, void *arg) | ||
51 | { | ||
52 | struct drm_device *dev = (struct drm_device *)arg; | ||
53 | struct vbox_private *vbox = (struct vbox_private *)dev->dev_private; | ||
54 | u32 host_flags = vbox_get_flags(vbox); | ||
55 | |||
56 | if (!(host_flags & HGSMIHOSTFLAGS_IRQ)) | ||
57 | return IRQ_NONE; | ||
58 | |||
59 | /* | ||
60 | * Due to a bug in the initial host implementation of hot-plug irqs, | ||
61 | * the hot-plug and cursor capability flags were never cleared. | ||
62 | * Fortunately we can tell when they would have been set by checking | ||
63 | * that the VSYNC flag is not set. | ||
64 | */ | ||
65 | if (host_flags & | ||
66 | (HGSMIHOSTFLAGS_HOTPLUG | HGSMIHOSTFLAGS_CURSOR_CAPABILITIES) && | ||
67 | !(host_flags & HGSMIHOSTFLAGS_VSYNC)) | ||
68 | vbox_report_hotplug(vbox); | ||
69 | |||
70 | vbox_clear_irq(); | ||
71 | |||
72 | return IRQ_HANDLED; | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * Check that the position hints provided by the host are suitable for GNOME | ||
77 | * shell (i.e. all screens disjoint and hints for all enabled screens) and if | ||
78 | * not replace them with default ones. Providing valid hints improves the | ||
79 | * chances that we will get a known screen layout for pointer mapping. | ||
80 | */ | ||
81 | static void validate_or_set_position_hints(struct vbox_private *vbox) | ||
82 | { | ||
83 | struct vbva_modehint *hintsi, *hintsj; | ||
84 | bool valid = true; | ||
85 | u16 currentx = 0; | ||
86 | int i, j; | ||
87 | |||
88 | for (i = 0; i < vbox->num_crtcs; ++i) { | ||
89 | for (j = 0; j < i; ++j) { | ||
90 | hintsi = &vbox->last_mode_hints[i]; | ||
91 | hintsj = &vbox->last_mode_hints[j]; | ||
92 | |||
93 | if (hintsi->enabled && hintsj->enabled) { | ||
94 | if (hintsi->dx >= 0xffff || | ||
95 | hintsi->dy >= 0xffff || | ||
96 | hintsj->dx >= 0xffff || | ||
97 | hintsj->dy >= 0xffff || | ||
98 | (hintsi->dx < | ||
99 | hintsj->dx + (hintsj->cx & 0x8fff) && | ||
100 | hintsi->dx + (hintsi->cx & 0x8fff) > | ||
101 | hintsj->dx) || | ||
102 | (hintsi->dy < | ||
103 | hintsj->dy + (hintsj->cy & 0x8fff) && | ||
104 | hintsi->dy + (hintsi->cy & 0x8fff) > | ||
105 | hintsj->dy)) | ||
106 | valid = false; | ||
107 | } | ||
108 | } | ||
109 | } | ||
110 | if (!valid) | ||
111 | for (i = 0; i < vbox->num_crtcs; ++i) { | ||
112 | if (vbox->last_mode_hints[i].enabled) { | ||
113 | vbox->last_mode_hints[i].dx = currentx; | ||
114 | vbox->last_mode_hints[i].dy = 0; | ||
115 | currentx += | ||
116 | vbox->last_mode_hints[i].cx & 0x8fff; | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * Query the host for the most recent video mode hints. | ||
123 | */ | ||
124 | static void vbox_update_mode_hints(struct vbox_private *vbox) | ||
125 | { | ||
126 | struct drm_device *dev = vbox->dev; | ||
127 | struct drm_connector *connector; | ||
128 | struct vbox_connector *vbox_conn; | ||
129 | struct vbva_modehint *hints; | ||
130 | u16 flags; | ||
131 | bool disconnected; | ||
132 | unsigned int crtc_id; | ||
133 | int ret; | ||
134 | |||
135 | ret = hgsmi_get_mode_hints(vbox->guest_pool, vbox->num_crtcs, | ||
136 | vbox->last_mode_hints); | ||
137 | if (ret) { | ||
138 | DRM_ERROR("vboxvideo: hgsmi_get_mode_hints failed: %d\n", ret); | ||
139 | return; | ||
140 | } | ||
141 | |||
142 | validate_or_set_position_hints(vbox); | ||
143 | drm_modeset_lock_all(dev); | ||
144 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { | ||
145 | vbox_conn = to_vbox_connector(connector); | ||
146 | |||
147 | hints = &vbox->last_mode_hints[vbox_conn->vbox_crtc->crtc_id]; | ||
148 | if (hints->magic != VBVAMODEHINT_MAGIC) | ||
149 | continue; | ||
150 | |||
151 | disconnected = !(hints->enabled); | ||
152 | crtc_id = vbox_conn->vbox_crtc->crtc_id; | ||
153 | vbox_conn->mode_hint.width = hints->cx & 0x8fff; | ||
154 | vbox_conn->mode_hint.height = hints->cy & 0x8fff; | ||
155 | vbox_conn->vbox_crtc->x_hint = hints->dx; | ||
156 | vbox_conn->vbox_crtc->y_hint = hints->dy; | ||
157 | vbox_conn->mode_hint.disconnected = disconnected; | ||
158 | |||
159 | if (vbox_conn->vbox_crtc->disconnected == disconnected) | ||
160 | continue; | ||
161 | |||
162 | if (disconnected) | ||
163 | flags = VBVA_SCREEN_F_ACTIVE | VBVA_SCREEN_F_DISABLED; | ||
164 | else | ||
165 | flags = VBVA_SCREEN_F_ACTIVE | VBVA_SCREEN_F_BLANK; | ||
166 | |||
167 | hgsmi_process_display_info(vbox->guest_pool, crtc_id, 0, 0, 0, | ||
168 | hints->cx * 4, hints->cx, | ||
169 | hints->cy, 0, flags); | ||
170 | |||
171 | vbox_conn->vbox_crtc->disconnected = disconnected; | ||
172 | } | ||
173 | drm_modeset_unlock_all(dev); | ||
174 | } | ||
175 | |||
176 | static void vbox_hotplug_worker(struct work_struct *work) | ||
177 | { | ||
178 | struct vbox_private *vbox = container_of(work, struct vbox_private, | ||
179 | hotplug_work); | ||
180 | |||
181 | vbox_update_mode_hints(vbox); | ||
182 | drm_kms_helper_hotplug_event(vbox->dev); | ||
183 | } | ||
184 | |||
185 | int vbox_irq_init(struct vbox_private *vbox) | ||
186 | { | ||
187 | INIT_WORK(&vbox->hotplug_work, vbox_hotplug_worker); | ||
188 | vbox_update_mode_hints(vbox); | ||
189 | |||
190 | return drm_irq_install(vbox->dev, vbox->dev->pdev->irq); | ||
191 | } | ||
192 | |||
193 | void vbox_irq_fini(struct vbox_private *vbox) | ||
194 | { | ||
195 | drm_irq_uninstall(vbox->dev); | ||
196 | flush_work(&vbox->hotplug_work); | ||
197 | } | ||
diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c new file mode 100644 index 000000000000..d0c6ec75a3c7 --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_main.c | |||
@@ -0,0 +1,534 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013-2017 Oracle Corporation | ||
3 | * This file is based on ast_main.c | ||
4 | * Copyright 2012 Red Hat Inc. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the | ||
8 | * "Software"), to deal in the Software without restriction, including | ||
9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
11 | * permit persons to whom the Software is furnished to do so, subject to | ||
12 | * the following conditions: | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
19 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
20 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * The above copyright notice and this permission notice (including the | ||
23 | * next paragraph) shall be included in all copies or substantial portions | ||
24 | * of the Software. | ||
25 | * | ||
26 | * Authors: Dave Airlie <airlied@redhat.com>, | ||
27 | * Michael Thayer <michael.thayer@oracle.com, | ||
28 | * Hans de Goede <hdegoede@redhat.com> | ||
29 | */ | ||
30 | #include <drm/drm_fb_helper.h> | ||
31 | #include <drm/drm_crtc_helper.h> | ||
32 | |||
33 | #include "vbox_drv.h" | ||
34 | #include "vbox_err.h" | ||
35 | #include "vboxvideo_guest.h" | ||
36 | #include "vboxvideo_vbe.h" | ||
37 | |||
38 | static void vbox_user_framebuffer_destroy(struct drm_framebuffer *fb) | ||
39 | { | ||
40 | struct vbox_framebuffer *vbox_fb = to_vbox_framebuffer(fb); | ||
41 | |||
42 | if (vbox_fb->obj) | ||
43 | drm_gem_object_unreference_unlocked(vbox_fb->obj); | ||
44 | |||
45 | drm_framebuffer_cleanup(fb); | ||
46 | kfree(fb); | ||
47 | } | ||
48 | |||
49 | void vbox_enable_accel(struct vbox_private *vbox) | ||
50 | { | ||
51 | unsigned int i; | ||
52 | struct vbva_buffer *vbva; | ||
53 | |||
54 | if (!vbox->vbva_info || !vbox->vbva_buffers) { | ||
55 | /* Should never happen... */ | ||
56 | DRM_ERROR("vboxvideo: failed to set up VBVA.\n"); | ||
57 | return; | ||
58 | } | ||
59 | |||
60 | for (i = 0; i < vbox->num_crtcs; ++i) { | ||
61 | if (vbox->vbva_info[i].vbva) | ||
62 | continue; | ||
63 | |||
64 | vbva = (void *)vbox->vbva_buffers + i * VBVA_MIN_BUFFER_SIZE; | ||
65 | if (!vbva_enable(&vbox->vbva_info[i], | ||
66 | vbox->guest_pool, vbva, i)) { | ||
67 | /* very old host or driver error. */ | ||
68 | DRM_ERROR("vboxvideo: vbva_enable failed\n"); | ||
69 | return; | ||
70 | } | ||
71 | } | ||
72 | } | ||
73 | |||
74 | void vbox_disable_accel(struct vbox_private *vbox) | ||
75 | { | ||
76 | unsigned int i; | ||
77 | |||
78 | for (i = 0; i < vbox->num_crtcs; ++i) | ||
79 | vbva_disable(&vbox->vbva_info[i], vbox->guest_pool, i); | ||
80 | } | ||
81 | |||
82 | void vbox_report_caps(struct vbox_private *vbox) | ||
83 | { | ||
84 | u32 caps = VBVACAPS_DISABLE_CURSOR_INTEGRATION | | ||
85 | VBVACAPS_IRQ | VBVACAPS_USE_VBVA_ONLY; | ||
86 | |||
87 | if (vbox->initial_mode_queried) | ||
88 | caps |= VBVACAPS_VIDEO_MODE_HINTS; | ||
89 | |||
90 | hgsmi_send_caps_info(vbox->guest_pool, caps); | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * Send information about dirty rectangles to VBVA. If necessary we enable | ||
95 | * VBVA first, as this is normally disabled after a change of master in case | ||
96 | * the new master does not send dirty rectangle information (is this even | ||
97 | * allowed?) | ||
98 | */ | ||
99 | void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb, | ||
100 | struct drm_clip_rect *rects, | ||
101 | unsigned int num_rects) | ||
102 | { | ||
103 | struct vbox_private *vbox = fb->dev->dev_private; | ||
104 | struct drm_crtc *crtc; | ||
105 | unsigned int i; | ||
106 | |||
107 | mutex_lock(&vbox->hw_mutex); | ||
108 | list_for_each_entry(crtc, &fb->dev->mode_config.crtc_list, head) { | ||
109 | if (CRTC_FB(crtc) != fb) | ||
110 | continue; | ||
111 | |||
112 | vbox_enable_accel(vbox); | ||
113 | |||
114 | for (i = 0; i < num_rects; ++i) { | ||
115 | struct vbva_cmd_hdr cmd_hdr; | ||
116 | unsigned int crtc_id = to_vbox_crtc(crtc)->crtc_id; | ||
117 | |||
118 | if ((rects[i].x1 > crtc->x + crtc->hwmode.hdisplay) || | ||
119 | (rects[i].y1 > crtc->y + crtc->hwmode.vdisplay) || | ||
120 | (rects[i].x2 < crtc->x) || | ||
121 | (rects[i].y2 < crtc->y)) | ||
122 | continue; | ||
123 | |||
124 | cmd_hdr.x = (s16)rects[i].x1; | ||
125 | cmd_hdr.y = (s16)rects[i].y1; | ||
126 | cmd_hdr.w = (u16)rects[i].x2 - rects[i].x1; | ||
127 | cmd_hdr.h = (u16)rects[i].y2 - rects[i].y1; | ||
128 | |||
129 | if (!vbva_buffer_begin_update(&vbox->vbva_info[crtc_id], | ||
130 | vbox->guest_pool)) | ||
131 | continue; | ||
132 | |||
133 | vbva_write(&vbox->vbva_info[crtc_id], vbox->guest_pool, | ||
134 | &cmd_hdr, sizeof(cmd_hdr)); | ||
135 | vbva_buffer_end_update(&vbox->vbva_info[crtc_id]); | ||
136 | } | ||
137 | } | ||
138 | mutex_unlock(&vbox->hw_mutex); | ||
139 | } | ||
140 | |||
141 | static int vbox_user_framebuffer_dirty(struct drm_framebuffer *fb, | ||
142 | struct drm_file *file_priv, | ||
143 | unsigned int flags, unsigned int color, | ||
144 | struct drm_clip_rect *rects, | ||
145 | unsigned int num_rects) | ||
146 | { | ||
147 | vbox_framebuffer_dirty_rectangles(fb, rects, num_rects); | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | static const struct drm_framebuffer_funcs vbox_fb_funcs = { | ||
153 | .destroy = vbox_user_framebuffer_destroy, | ||
154 | .dirty = vbox_user_framebuffer_dirty, | ||
155 | }; | ||
156 | |||
157 | int vbox_framebuffer_init(struct drm_device *dev, | ||
158 | struct vbox_framebuffer *vbox_fb, | ||
159 | const struct DRM_MODE_FB_CMD *mode_cmd, | ||
160 | struct drm_gem_object *obj) | ||
161 | { | ||
162 | int ret; | ||
163 | |||
164 | drm_helper_mode_fill_fb_struct(dev, &vbox_fb->base, mode_cmd); | ||
165 | vbox_fb->obj = obj; | ||
166 | ret = drm_framebuffer_init(dev, &vbox_fb->base, &vbox_fb_funcs); | ||
167 | if (ret) { | ||
168 | DRM_ERROR("framebuffer init failed %d\n", ret); | ||
169 | return ret; | ||
170 | } | ||
171 | |||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | static struct drm_framebuffer *vbox_user_framebuffer_create( | ||
176 | struct drm_device *dev, | ||
177 | struct drm_file *filp, | ||
178 | const struct drm_mode_fb_cmd2 *mode_cmd) | ||
179 | { | ||
180 | struct drm_gem_object *obj; | ||
181 | struct vbox_framebuffer *vbox_fb; | ||
182 | int ret = -ENOMEM; | ||
183 | |||
184 | obj = drm_gem_object_lookup(filp, mode_cmd->handles[0]); | ||
185 | if (!obj) | ||
186 | return ERR_PTR(-ENOENT); | ||
187 | |||
188 | vbox_fb = kzalloc(sizeof(*vbox_fb), GFP_KERNEL); | ||
189 | if (!vbox_fb) | ||
190 | goto err_unref_obj; | ||
191 | |||
192 | ret = vbox_framebuffer_init(dev, vbox_fb, mode_cmd, obj); | ||
193 | if (ret) | ||
194 | goto err_free_vbox_fb; | ||
195 | |||
196 | return &vbox_fb->base; | ||
197 | |||
198 | err_free_vbox_fb: | ||
199 | kfree(vbox_fb); | ||
200 | err_unref_obj: | ||
201 | drm_gem_object_unreference_unlocked(obj); | ||
202 | return ERR_PTR(ret); | ||
203 | } | ||
204 | |||
205 | static const struct drm_mode_config_funcs vbox_mode_funcs = { | ||
206 | .fb_create = vbox_user_framebuffer_create, | ||
207 | }; | ||
208 | |||
209 | static int vbox_accel_init(struct vbox_private *vbox) | ||
210 | { | ||
211 | unsigned int i; | ||
212 | |||
213 | vbox->vbva_info = devm_kcalloc(vbox->dev->dev, vbox->num_crtcs, | ||
214 | sizeof(*vbox->vbva_info), GFP_KERNEL); | ||
215 | if (!vbox->vbva_info) | ||
216 | return -ENOMEM; | ||
217 | |||
218 | /* Take a command buffer for each screen from the end of usable VRAM. */ | ||
219 | vbox->available_vram_size -= vbox->num_crtcs * VBVA_MIN_BUFFER_SIZE; | ||
220 | |||
221 | vbox->vbva_buffers = pci_iomap_range(vbox->dev->pdev, 0, | ||
222 | vbox->available_vram_size, | ||
223 | vbox->num_crtcs * | ||
224 | VBVA_MIN_BUFFER_SIZE); | ||
225 | if (!vbox->vbva_buffers) | ||
226 | return -ENOMEM; | ||
227 | |||
228 | for (i = 0; i < vbox->num_crtcs; ++i) | ||
229 | vbva_setup_buffer_context(&vbox->vbva_info[i], | ||
230 | vbox->available_vram_size + | ||
231 | i * VBVA_MIN_BUFFER_SIZE, | ||
232 | VBVA_MIN_BUFFER_SIZE); | ||
233 | |||
234 | return 0; | ||
235 | } | ||
236 | |||
237 | static void vbox_accel_fini(struct vbox_private *vbox) | ||
238 | { | ||
239 | vbox_disable_accel(vbox); | ||
240 | pci_iounmap(vbox->dev->pdev, vbox->vbva_buffers); | ||
241 | } | ||
242 | |||
243 | /** Do we support the 4.3 plus mode hint reporting interface? */ | ||
244 | static bool have_hgsmi_mode_hints(struct vbox_private *vbox) | ||
245 | { | ||
246 | u32 have_hints, have_cursor; | ||
247 | int ret; | ||
248 | |||
249 | ret = hgsmi_query_conf(vbox->guest_pool, | ||
250 | VBOX_VBVA_CONF32_MODE_HINT_REPORTING, | ||
251 | &have_hints); | ||
252 | if (ret) | ||
253 | return false; | ||
254 | |||
255 | ret = hgsmi_query_conf(vbox->guest_pool, | ||
256 | VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING, | ||
257 | &have_cursor); | ||
258 | if (ret) | ||
259 | return false; | ||
260 | |||
261 | return have_hints == VINF_SUCCESS && have_cursor == VINF_SUCCESS; | ||
262 | } | ||
263 | |||
264 | static bool vbox_check_supported(u16 id) | ||
265 | { | ||
266 | u16 dispi_id; | ||
267 | |||
268 | vbox_write_ioport(VBE_DISPI_INDEX_ID, id); | ||
269 | dispi_id = inw(VBE_DISPI_IOPORT_DATA); | ||
270 | |||
271 | return dispi_id == id; | ||
272 | } | ||
273 | |||
274 | /** | ||
275 | * Set up our heaps and data exchange buffers in VRAM before handing the rest | ||
276 | * to the memory manager. | ||
277 | */ | ||
278 | static int vbox_hw_init(struct vbox_private *vbox) | ||
279 | { | ||
280 | int ret = -ENOMEM; | ||
281 | |||
282 | vbox->full_vram_size = inl(VBE_DISPI_IOPORT_DATA); | ||
283 | vbox->any_pitch = vbox_check_supported(VBE_DISPI_ID_ANYX); | ||
284 | |||
285 | DRM_INFO("VRAM %08x\n", vbox->full_vram_size); | ||
286 | |||
287 | /* Map guest-heap at end of vram */ | ||
288 | vbox->guest_heap = | ||
289 | pci_iomap_range(vbox->dev->pdev, 0, GUEST_HEAP_OFFSET(vbox), | ||
290 | GUEST_HEAP_SIZE); | ||
291 | if (!vbox->guest_heap) | ||
292 | return -ENOMEM; | ||
293 | |||
294 | /* Create guest-heap mem-pool use 2^4 = 16 byte chunks */ | ||
295 | vbox->guest_pool = gen_pool_create(4, -1); | ||
296 | if (!vbox->guest_pool) | ||
297 | goto err_unmap_guest_heap; | ||
298 | |||
299 | ret = gen_pool_add_virt(vbox->guest_pool, | ||
300 | (unsigned long)vbox->guest_heap, | ||
301 | GUEST_HEAP_OFFSET(vbox), | ||
302 | GUEST_HEAP_USABLE_SIZE, -1); | ||
303 | if (ret) | ||
304 | goto err_destroy_guest_pool; | ||
305 | |||
306 | ret = hgsmi_test_query_conf(vbox->guest_pool); | ||
307 | if (ret) { | ||
308 | DRM_ERROR("vboxvideo: hgsmi_test_query_conf failed\n"); | ||
309 | goto err_destroy_guest_pool; | ||
310 | } | ||
311 | |||
312 | /* Reduce available VRAM size to reflect the guest heap. */ | ||
313 | vbox->available_vram_size = GUEST_HEAP_OFFSET(vbox); | ||
314 | /* Linux drm represents monitors as a 32-bit array. */ | ||
315 | hgsmi_query_conf(vbox->guest_pool, VBOX_VBVA_CONF32_MONITOR_COUNT, | ||
316 | &vbox->num_crtcs); | ||
317 | vbox->num_crtcs = clamp_t(u32, vbox->num_crtcs, 1, VBOX_MAX_SCREENS); | ||
318 | |||
319 | if (!have_hgsmi_mode_hints(vbox)) { | ||
320 | ret = -ENOTSUPP; | ||
321 | goto err_destroy_guest_pool; | ||
322 | } | ||
323 | |||
324 | vbox->last_mode_hints = devm_kcalloc(vbox->dev->dev, vbox->num_crtcs, | ||
325 | sizeof(struct vbva_modehint), | ||
326 | GFP_KERNEL); | ||
327 | if (!vbox->last_mode_hints) { | ||
328 | ret = -ENOMEM; | ||
329 | goto err_destroy_guest_pool; | ||
330 | } | ||
331 | |||
332 | ret = vbox_accel_init(vbox); | ||
333 | if (ret) | ||
334 | goto err_destroy_guest_pool; | ||
335 | |||
336 | return 0; | ||
337 | |||
338 | err_destroy_guest_pool: | ||
339 | gen_pool_destroy(vbox->guest_pool); | ||
340 | err_unmap_guest_heap: | ||
341 | pci_iounmap(vbox->dev->pdev, vbox->guest_heap); | ||
342 | return ret; | ||
343 | } | ||
344 | |||
345 | static void vbox_hw_fini(struct vbox_private *vbox) | ||
346 | { | ||
347 | vbox_accel_fini(vbox); | ||
348 | gen_pool_destroy(vbox->guest_pool); | ||
349 | pci_iounmap(vbox->dev->pdev, vbox->guest_heap); | ||
350 | } | ||
351 | |||
352 | int vbox_driver_load(struct drm_device *dev, unsigned long flags) | ||
353 | { | ||
354 | struct vbox_private *vbox; | ||
355 | int ret = 0; | ||
356 | |||
357 | if (!vbox_check_supported(VBE_DISPI_ID_HGSMI)) | ||
358 | return -ENODEV; | ||
359 | |||
360 | vbox = devm_kzalloc(dev->dev, sizeof(*vbox), GFP_KERNEL); | ||
361 | if (!vbox) | ||
362 | return -ENOMEM; | ||
363 | |||
364 | dev->dev_private = vbox; | ||
365 | vbox->dev = dev; | ||
366 | |||
367 | mutex_init(&vbox->hw_mutex); | ||
368 | |||
369 | ret = vbox_hw_init(vbox); | ||
370 | if (ret) | ||
371 | return ret; | ||
372 | |||
373 | ret = vbox_mm_init(vbox); | ||
374 | if (ret) | ||
375 | goto err_hw_fini; | ||
376 | |||
377 | drm_mode_config_init(dev); | ||
378 | |||
379 | dev->mode_config.funcs = (void *)&vbox_mode_funcs; | ||
380 | dev->mode_config.min_width = 64; | ||
381 | dev->mode_config.min_height = 64; | ||
382 | dev->mode_config.preferred_depth = 24; | ||
383 | dev->mode_config.max_width = VBE_DISPI_MAX_XRES; | ||
384 | dev->mode_config.max_height = VBE_DISPI_MAX_YRES; | ||
385 | |||
386 | ret = vbox_mode_init(dev); | ||
387 | if (ret) | ||
388 | goto err_drm_mode_cleanup; | ||
389 | |||
390 | ret = vbox_irq_init(vbox); | ||
391 | if (ret) | ||
392 | goto err_mode_fini; | ||
393 | |||
394 | ret = vbox_fbdev_init(dev); | ||
395 | if (ret) | ||
396 | goto err_irq_fini; | ||
397 | |||
398 | return 0; | ||
399 | |||
400 | err_irq_fini: | ||
401 | vbox_irq_fini(vbox); | ||
402 | err_mode_fini: | ||
403 | vbox_mode_fini(dev); | ||
404 | err_drm_mode_cleanup: | ||
405 | drm_mode_config_cleanup(dev); | ||
406 | vbox_mm_fini(vbox); | ||
407 | err_hw_fini: | ||
408 | vbox_hw_fini(vbox); | ||
409 | return ret; | ||
410 | } | ||
411 | |||
412 | void vbox_driver_unload(struct drm_device *dev) | ||
413 | { | ||
414 | struct vbox_private *vbox = dev->dev_private; | ||
415 | |||
416 | vbox_fbdev_fini(dev); | ||
417 | vbox_irq_fini(vbox); | ||
418 | vbox_mode_fini(dev); | ||
419 | drm_mode_config_cleanup(dev); | ||
420 | vbox_mm_fini(vbox); | ||
421 | vbox_hw_fini(vbox); | ||
422 | } | ||
423 | |||
424 | /** | ||
425 | * @note this is described in the DRM framework documentation. AST does not | ||
426 | * have it, but we get an oops on driver unload if it is not present. | ||
427 | */ | ||
428 | void vbox_driver_lastclose(struct drm_device *dev) | ||
429 | { | ||
430 | struct vbox_private *vbox = dev->dev_private; | ||
431 | |||
432 | if (vbox->fbdev) | ||
433 | drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper); | ||
434 | } | ||
435 | |||
436 | int vbox_gem_create(struct drm_device *dev, | ||
437 | u32 size, bool iskernel, struct drm_gem_object **obj) | ||
438 | { | ||
439 | struct vbox_bo *vboxbo; | ||
440 | int ret; | ||
441 | |||
442 | *obj = NULL; | ||
443 | |||
444 | size = roundup(size, PAGE_SIZE); | ||
445 | if (size == 0) | ||
446 | return -EINVAL; | ||
447 | |||
448 | ret = vbox_bo_create(dev, size, 0, 0, &vboxbo); | ||
449 | if (ret) { | ||
450 | if (ret != -ERESTARTSYS) | ||
451 | DRM_ERROR("failed to allocate GEM object\n"); | ||
452 | return ret; | ||
453 | } | ||
454 | |||
455 | *obj = &vboxbo->gem; | ||
456 | |||
457 | return 0; | ||
458 | } | ||
459 | |||
460 | int vbox_dumb_create(struct drm_file *file, | ||
461 | struct drm_device *dev, struct drm_mode_create_dumb *args) | ||
462 | { | ||
463 | int ret; | ||
464 | struct drm_gem_object *gobj; | ||
465 | u32 handle; | ||
466 | |||
467 | args->pitch = args->width * ((args->bpp + 7) / 8); | ||
468 | args->size = args->pitch * args->height; | ||
469 | |||
470 | ret = vbox_gem_create(dev, args->size, false, &gobj); | ||
471 | if (ret) | ||
472 | return ret; | ||
473 | |||
474 | ret = drm_gem_handle_create(file, gobj, &handle); | ||
475 | drm_gem_object_unreference_unlocked(gobj); | ||
476 | if (ret) | ||
477 | return ret; | ||
478 | |||
479 | args->handle = handle; | ||
480 | |||
481 | return 0; | ||
482 | } | ||
483 | |||
484 | static void vbox_bo_unref(struct vbox_bo **bo) | ||
485 | { | ||
486 | struct ttm_buffer_object *tbo; | ||
487 | |||
488 | if ((*bo) == NULL) | ||
489 | return; | ||
490 | |||
491 | tbo = &((*bo)->bo); | ||
492 | ttm_bo_unref(&tbo); | ||
493 | if (!tbo) | ||
494 | *bo = NULL; | ||
495 | } | ||
496 | |||
497 | void vbox_gem_free_object(struct drm_gem_object *obj) | ||
498 | { | ||
499 | struct vbox_bo *vbox_bo = gem_to_vbox_bo(obj); | ||
500 | |||
501 | vbox_bo_unref(&vbox_bo); | ||
502 | } | ||
503 | |||
504 | static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo) | ||
505 | { | ||
506 | return drm_vma_node_offset_addr(&bo->bo.vma_node); | ||
507 | } | ||
508 | |||
509 | int | ||
510 | vbox_dumb_mmap_offset(struct drm_file *file, | ||
511 | struct drm_device *dev, | ||
512 | u32 handle, u64 *offset) | ||
513 | { | ||
514 | struct drm_gem_object *obj; | ||
515 | int ret; | ||
516 | struct vbox_bo *bo; | ||
517 | |||
518 | mutex_lock(&dev->struct_mutex); | ||
519 | obj = drm_gem_object_lookup(file, handle); | ||
520 | if (!obj) { | ||
521 | ret = -ENOENT; | ||
522 | goto out_unlock; | ||
523 | } | ||
524 | |||
525 | bo = gem_to_vbox_bo(obj); | ||
526 | *offset = vbox_bo_mmap_offset(bo); | ||
527 | |||
528 | drm_gem_object_unreference(obj); | ||
529 | ret = 0; | ||
530 | |||
531 | out_unlock: | ||
532 | mutex_unlock(&dev->struct_mutex); | ||
533 | return ret; | ||
534 | } | ||
diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c new file mode 100644 index 000000000000..f2b85f3256fa --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_mode.c | |||
@@ -0,0 +1,877 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013-2017 Oracle Corporation | ||
3 | * This file is based on ast_mode.c | ||
4 | * Copyright 2012 Red Hat Inc. | ||
5 | * Parts based on xf86-video-ast | ||
6 | * Copyright (c) 2005 ASPEED Technology Inc. | ||
7 | * | ||
8 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
9 | * copy of this software and associated documentation files (the | ||
10 | * "Software"), to deal in the Software without restriction, including | ||
11 | * without limitation the rights to use, copy, modify, merge, publish, | ||
12 | * distribute, sub license, and/or sell copies of the Software, and to | ||
13 | * permit persons to whom the Software is furnished to do so, subject to | ||
14 | * the following conditions: | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
19 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
20 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
21 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
22 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
23 | * | ||
24 | * The above copyright notice and this permission notice (including the | ||
25 | * next paragraph) shall be included in all copies or substantial portions | ||
26 | * of the Software. | ||
27 | * | ||
28 | */ | ||
29 | /* | ||
30 | * Authors: Dave Airlie <airlied@redhat.com> | ||
31 | * Michael Thayer <michael.thayer@oracle.com, | ||
32 | * Hans de Goede <hdegoede@redhat.com> | ||
33 | */ | ||
34 | #include <linux/export.h> | ||
35 | #include <drm/drm_crtc_helper.h> | ||
36 | #include <drm/drm_plane_helper.h> | ||
37 | |||
38 | #include "vbox_drv.h" | ||
39 | #include "vboxvideo.h" | ||
40 | #include "hgsmi_channels.h" | ||
41 | |||
42 | static int vbox_cursor_set2(struct drm_crtc *crtc, struct drm_file *file_priv, | ||
43 | u32 handle, u32 width, u32 height, | ||
44 | s32 hot_x, s32 hot_y); | ||
45 | static int vbox_cursor_move(struct drm_crtc *crtc, int x, int y); | ||
46 | |||
47 | /** | ||
48 | * Set a graphics mode. Poke any required values into registers, do an HGSMI | ||
49 | * mode set and tell the host we support advanced graphics functions. | ||
50 | */ | ||
51 | static void vbox_do_modeset(struct drm_crtc *crtc, | ||
52 | const struct drm_display_mode *mode) | ||
53 | { | ||
54 | struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); | ||
55 | struct vbox_private *vbox; | ||
56 | int width, height, bpp, pitch; | ||
57 | unsigned int crtc_id; | ||
58 | u16 flags; | ||
59 | s32 x_offset, y_offset; | ||
60 | |||
61 | vbox = crtc->dev->dev_private; | ||
62 | width = mode->hdisplay ? mode->hdisplay : 640; | ||
63 | height = mode->vdisplay ? mode->vdisplay : 480; | ||
64 | crtc_id = vbox_crtc->crtc_id; | ||
65 | bpp = crtc->enabled ? CRTC_FB(crtc)->format->cpp[0] * 8 : 32; | ||
66 | pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8; | ||
67 | x_offset = vbox->single_framebuffer ? crtc->x : vbox_crtc->x_hint; | ||
68 | y_offset = vbox->single_framebuffer ? crtc->y : vbox_crtc->y_hint; | ||
69 | |||
70 | /* | ||
71 | * This is the old way of setting graphics modes. It assumed one screen | ||
72 | * and a frame-buffer at the start of video RAM. On older versions of | ||
73 | * VirtualBox, certain parts of the code still assume that the first | ||
74 | * screen is programmed this way, so try to fake it. | ||
75 | */ | ||
76 | if (vbox_crtc->crtc_id == 0 && crtc->enabled && | ||
77 | vbox_crtc->fb_offset / pitch < 0xffff - crtc->y && | ||
78 | vbox_crtc->fb_offset % (bpp / 8) == 0) { | ||
79 | vbox_write_ioport(VBE_DISPI_INDEX_XRES, width); | ||
80 | vbox_write_ioport(VBE_DISPI_INDEX_YRES, height); | ||
81 | vbox_write_ioport(VBE_DISPI_INDEX_VIRT_WIDTH, pitch * 8 / bpp); | ||
82 | vbox_write_ioport(VBE_DISPI_INDEX_BPP, | ||
83 | CRTC_FB(crtc)->format->cpp[0] * 8); | ||
84 | vbox_write_ioport(VBE_DISPI_INDEX_ENABLE, VBE_DISPI_ENABLED); | ||
85 | vbox_write_ioport( | ||
86 | VBE_DISPI_INDEX_X_OFFSET, | ||
87 | vbox_crtc->fb_offset % pitch / bpp * 8 + crtc->x); | ||
88 | vbox_write_ioport(VBE_DISPI_INDEX_Y_OFFSET, | ||
89 | vbox_crtc->fb_offset / pitch + crtc->y); | ||
90 | } | ||
91 | |||
92 | flags = VBVA_SCREEN_F_ACTIVE; | ||
93 | flags |= (crtc->enabled && !vbox_crtc->blanked) ? | ||
94 | 0 : VBVA_SCREEN_F_BLANK; | ||
95 | flags |= vbox_crtc->disconnected ? VBVA_SCREEN_F_DISABLED : 0; | ||
96 | hgsmi_process_display_info(vbox->guest_pool, vbox_crtc->crtc_id, | ||
97 | x_offset, y_offset, | ||
98 | crtc->x * bpp / 8 + crtc->y * pitch, | ||
99 | pitch, width, height, | ||
100 | vbox_crtc->blanked ? 0 : bpp, flags); | ||
101 | } | ||
102 | |||
103 | static int vbox_set_view(struct drm_crtc *crtc) | ||
104 | { | ||
105 | struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); | ||
106 | struct vbox_private *vbox = crtc->dev->dev_private; | ||
107 | struct vbva_infoview *p; | ||
108 | |||
109 | /* | ||
110 | * Tell the host about the view. This design originally targeted the | ||
111 | * Windows XP driver architecture and assumed that each screen would | ||
112 | * have a dedicated frame buffer with the command buffer following it, | ||
113 | * the whole being a "view". The host works out which screen a command | ||
114 | * buffer belongs to by checking whether it is in the first view, then | ||
115 | * whether it is in the second and so on. The first match wins. We | ||
116 | * cheat around this by making the first view be the managed memory | ||
117 | * plus the first command buffer, the second the same plus the second | ||
118 | * buffer and so on. | ||
119 | */ | ||
120 | p = hgsmi_buffer_alloc(vbox->guest_pool, sizeof(*p), | ||
121 | HGSMI_CH_VBVA, VBVA_INFO_VIEW); | ||
122 | if (!p) | ||
123 | return -ENOMEM; | ||
124 | |||
125 | p->view_index = vbox_crtc->crtc_id; | ||
126 | p->view_offset = vbox_crtc->fb_offset; | ||
127 | p->view_size = vbox->available_vram_size - vbox_crtc->fb_offset + | ||
128 | vbox_crtc->crtc_id * VBVA_MIN_BUFFER_SIZE; | ||
129 | p->max_screen_size = vbox->available_vram_size - vbox_crtc->fb_offset; | ||
130 | |||
131 | hgsmi_buffer_submit(vbox->guest_pool, p); | ||
132 | hgsmi_buffer_free(vbox->guest_pool, p); | ||
133 | |||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | static void vbox_crtc_load_lut(struct drm_crtc *crtc) | ||
138 | { | ||
139 | } | ||
140 | |||
141 | static void vbox_crtc_dpms(struct drm_crtc *crtc, int mode) | ||
142 | { | ||
143 | struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); | ||
144 | struct vbox_private *vbox = crtc->dev->dev_private; | ||
145 | |||
146 | switch (mode) { | ||
147 | case DRM_MODE_DPMS_ON: | ||
148 | vbox_crtc->blanked = false; | ||
149 | break; | ||
150 | case DRM_MODE_DPMS_STANDBY: | ||
151 | case DRM_MODE_DPMS_SUSPEND: | ||
152 | case DRM_MODE_DPMS_OFF: | ||
153 | vbox_crtc->blanked = true; | ||
154 | break; | ||
155 | } | ||
156 | |||
157 | mutex_lock(&vbox->hw_mutex); | ||
158 | vbox_do_modeset(crtc, &crtc->hwmode); | ||
159 | mutex_unlock(&vbox->hw_mutex); | ||
160 | } | ||
161 | |||
162 | static bool vbox_crtc_mode_fixup(struct drm_crtc *crtc, | ||
163 | const struct drm_display_mode *mode, | ||
164 | struct drm_display_mode *adjusted_mode) | ||
165 | { | ||
166 | return true; | ||
167 | } | ||
168 | |||
169 | /* | ||
170 | * Try to map the layout of virtual screens to the range of the input device. | ||
171 | * Return true if we need to re-set the crtc modes due to screen offset | ||
172 | * changes. | ||
173 | */ | ||
174 | static bool vbox_set_up_input_mapping(struct vbox_private *vbox) | ||
175 | { | ||
176 | struct drm_crtc *crtci; | ||
177 | struct drm_connector *connectori; | ||
178 | struct drm_framebuffer *fb1 = NULL; | ||
179 | bool single_framebuffer = true; | ||
180 | bool old_single_framebuffer = vbox->single_framebuffer; | ||
181 | u16 width = 0, height = 0; | ||
182 | |||
183 | /* | ||
184 | * Are we using an X.Org-style single large frame-buffer for all crtcs? | ||
185 | * If so then screen layout can be deduced from the crtc offsets. | ||
186 | * Same fall-back if this is the fbdev frame-buffer. | ||
187 | */ | ||
188 | list_for_each_entry(crtci, &vbox->dev->mode_config.crtc_list, head) { | ||
189 | if (!fb1) { | ||
190 | fb1 = CRTC_FB(crtci); | ||
191 | if (to_vbox_framebuffer(fb1) == &vbox->fbdev->afb) | ||
192 | break; | ||
193 | } else if (CRTC_FB(crtci) && fb1 != CRTC_FB(crtci)) { | ||
194 | single_framebuffer = false; | ||
195 | } | ||
196 | } | ||
197 | if (single_framebuffer) { | ||
198 | list_for_each_entry(crtci, &vbox->dev->mode_config.crtc_list, | ||
199 | head) { | ||
200 | if (to_vbox_crtc(crtci)->crtc_id != 0) | ||
201 | continue; | ||
202 | |||
203 | vbox->single_framebuffer = true; | ||
204 | vbox->input_mapping_width = CRTC_FB(crtci)->width; | ||
205 | vbox->input_mapping_height = CRTC_FB(crtci)->height; | ||
206 | return old_single_framebuffer != | ||
207 | vbox->single_framebuffer; | ||
208 | } | ||
209 | } | ||
210 | /* Otherwise calculate the total span of all screens. */ | ||
211 | list_for_each_entry(connectori, &vbox->dev->mode_config.connector_list, | ||
212 | head) { | ||
213 | struct vbox_connector *vbox_connector = | ||
214 | to_vbox_connector(connectori); | ||
215 | struct vbox_crtc *vbox_crtc = vbox_connector->vbox_crtc; | ||
216 | |||
217 | width = max_t(u16, width, vbox_crtc->x_hint + | ||
218 | vbox_connector->mode_hint.width); | ||
219 | height = max_t(u16, height, vbox_crtc->y_hint + | ||
220 | vbox_connector->mode_hint.height); | ||
221 | } | ||
222 | |||
223 | vbox->single_framebuffer = false; | ||
224 | vbox->input_mapping_width = width; | ||
225 | vbox->input_mapping_height = height; | ||
226 | |||
227 | return old_single_framebuffer != vbox->single_framebuffer; | ||
228 | } | ||
229 | |||
230 | static int vbox_crtc_do_set_base(struct drm_crtc *crtc, | ||
231 | struct drm_framebuffer *old_fb, int x, int y) | ||
232 | { | ||
233 | struct vbox_private *vbox = crtc->dev->dev_private; | ||
234 | struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); | ||
235 | struct drm_gem_object *obj; | ||
236 | struct vbox_framebuffer *vbox_fb; | ||
237 | struct vbox_bo *bo; | ||
238 | int ret; | ||
239 | u64 gpu_addr; | ||
240 | |||
241 | /* Unpin the previous fb. */ | ||
242 | if (old_fb) { | ||
243 | vbox_fb = to_vbox_framebuffer(old_fb); | ||
244 | obj = vbox_fb->obj; | ||
245 | bo = gem_to_vbox_bo(obj); | ||
246 | ret = vbox_bo_reserve(bo, false); | ||
247 | if (ret) | ||
248 | return ret; | ||
249 | |||
250 | vbox_bo_unpin(bo); | ||
251 | vbox_bo_unreserve(bo); | ||
252 | } | ||
253 | |||
254 | vbox_fb = to_vbox_framebuffer(CRTC_FB(crtc)); | ||
255 | obj = vbox_fb->obj; | ||
256 | bo = gem_to_vbox_bo(obj); | ||
257 | |||
258 | ret = vbox_bo_reserve(bo, false); | ||
259 | if (ret) | ||
260 | return ret; | ||
261 | |||
262 | ret = vbox_bo_pin(bo, TTM_PL_FLAG_VRAM, &gpu_addr); | ||
263 | if (ret) { | ||
264 | vbox_bo_unreserve(bo); | ||
265 | return ret; | ||
266 | } | ||
267 | |||
268 | if (&vbox->fbdev->afb == vbox_fb) | ||
269 | vbox_fbdev_set_base(vbox, gpu_addr); | ||
270 | vbox_bo_unreserve(bo); | ||
271 | |||
272 | /* vbox_set_start_address_crt1(crtc, (u32)gpu_addr); */ | ||
273 | vbox_crtc->fb_offset = gpu_addr; | ||
274 | if (vbox_set_up_input_mapping(vbox)) { | ||
275 | struct drm_crtc *crtci; | ||
276 | |||
277 | list_for_each_entry(crtci, &vbox->dev->mode_config.crtc_list, | ||
278 | head) { | ||
279 | vbox_set_view(crtc); | ||
280 | vbox_do_modeset(crtci, &crtci->mode); | ||
281 | } | ||
282 | } | ||
283 | |||
284 | return 0; | ||
285 | } | ||
286 | |||
287 | static int vbox_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, | ||
288 | struct drm_framebuffer *old_fb) | ||
289 | { | ||
290 | return vbox_crtc_do_set_base(crtc, old_fb, x, y); | ||
291 | } | ||
292 | |||
293 | static int vbox_crtc_mode_set(struct drm_crtc *crtc, | ||
294 | struct drm_display_mode *mode, | ||
295 | struct drm_display_mode *adjusted_mode, | ||
296 | int x, int y, struct drm_framebuffer *old_fb) | ||
297 | { | ||
298 | struct vbox_private *vbox = crtc->dev->dev_private; | ||
299 | int ret; | ||
300 | |||
301 | vbox_crtc_mode_set_base(crtc, x, y, old_fb); | ||
302 | |||
303 | mutex_lock(&vbox->hw_mutex); | ||
304 | ret = vbox_set_view(crtc); | ||
305 | if (!ret) | ||
306 | vbox_do_modeset(crtc, mode); | ||
307 | hgsmi_update_input_mapping(vbox->guest_pool, 0, 0, | ||
308 | vbox->input_mapping_width, | ||
309 | vbox->input_mapping_height); | ||
310 | mutex_unlock(&vbox->hw_mutex); | ||
311 | |||
312 | return ret; | ||
313 | } | ||
314 | |||
315 | static void vbox_crtc_disable(struct drm_crtc *crtc) | ||
316 | { | ||
317 | } | ||
318 | |||
319 | static void vbox_crtc_prepare(struct drm_crtc *crtc) | ||
320 | { | ||
321 | } | ||
322 | |||
323 | static void vbox_crtc_commit(struct drm_crtc *crtc) | ||
324 | { | ||
325 | } | ||
326 | |||
327 | static const struct drm_crtc_helper_funcs vbox_crtc_helper_funcs = { | ||
328 | .dpms = vbox_crtc_dpms, | ||
329 | .mode_fixup = vbox_crtc_mode_fixup, | ||
330 | .mode_set = vbox_crtc_mode_set, | ||
331 | /* .mode_set_base = vbox_crtc_mode_set_base, */ | ||
332 | .disable = vbox_crtc_disable, | ||
333 | .load_lut = vbox_crtc_load_lut, | ||
334 | .prepare = vbox_crtc_prepare, | ||
335 | .commit = vbox_crtc_commit, | ||
336 | }; | ||
337 | |||
338 | static void vbox_crtc_reset(struct drm_crtc *crtc) | ||
339 | { | ||
340 | } | ||
341 | |||
342 | static void vbox_crtc_destroy(struct drm_crtc *crtc) | ||
343 | { | ||
344 | drm_crtc_cleanup(crtc); | ||
345 | kfree(crtc); | ||
346 | } | ||
347 | |||
348 | static const struct drm_crtc_funcs vbox_crtc_funcs = { | ||
349 | .cursor_move = vbox_cursor_move, | ||
350 | .cursor_set2 = vbox_cursor_set2, | ||
351 | .reset = vbox_crtc_reset, | ||
352 | .set_config = drm_crtc_helper_set_config, | ||
353 | /* .gamma_set = vbox_crtc_gamma_set, */ | ||
354 | .destroy = vbox_crtc_destroy, | ||
355 | }; | ||
356 | |||
357 | static struct vbox_crtc *vbox_crtc_init(struct drm_device *dev, unsigned int i) | ||
358 | { | ||
359 | struct vbox_crtc *vbox_crtc; | ||
360 | |||
361 | vbox_crtc = kzalloc(sizeof(*vbox_crtc), GFP_KERNEL); | ||
362 | if (!vbox_crtc) | ||
363 | return NULL; | ||
364 | |||
365 | vbox_crtc->crtc_id = i; | ||
366 | |||
367 | drm_crtc_init(dev, &vbox_crtc->base, &vbox_crtc_funcs); | ||
368 | drm_mode_crtc_set_gamma_size(&vbox_crtc->base, 256); | ||
369 | drm_crtc_helper_add(&vbox_crtc->base, &vbox_crtc_helper_funcs); | ||
370 | |||
371 | return vbox_crtc; | ||
372 | } | ||
373 | |||
374 | static void vbox_encoder_destroy(struct drm_encoder *encoder) | ||
375 | { | ||
376 | drm_encoder_cleanup(encoder); | ||
377 | kfree(encoder); | ||
378 | } | ||
379 | |||
380 | static struct drm_encoder *vbox_best_single_encoder(struct drm_connector | ||
381 | *connector) | ||
382 | { | ||
383 | int enc_id = connector->encoder_ids[0]; | ||
384 | |||
385 | /* pick the encoder ids */ | ||
386 | if (enc_id) | ||
387 | return drm_encoder_find(connector->dev, enc_id); | ||
388 | |||
389 | return NULL; | ||
390 | } | ||
391 | |||
392 | static const struct drm_encoder_funcs vbox_enc_funcs = { | ||
393 | .destroy = vbox_encoder_destroy, | ||
394 | }; | ||
395 | |||
396 | static void vbox_encoder_dpms(struct drm_encoder *encoder, int mode) | ||
397 | { | ||
398 | } | ||
399 | |||
400 | static bool vbox_mode_fixup(struct drm_encoder *encoder, | ||
401 | const struct drm_display_mode *mode, | ||
402 | struct drm_display_mode *adjusted_mode) | ||
403 | { | ||
404 | return true; | ||
405 | } | ||
406 | |||
407 | static void vbox_encoder_mode_set(struct drm_encoder *encoder, | ||
408 | struct drm_display_mode *mode, | ||
409 | struct drm_display_mode *adjusted_mode) | ||
410 | { | ||
411 | } | ||
412 | |||
413 | static void vbox_encoder_prepare(struct drm_encoder *encoder) | ||
414 | { | ||
415 | } | ||
416 | |||
417 | static void vbox_encoder_commit(struct drm_encoder *encoder) | ||
418 | { | ||
419 | } | ||
420 | |||
421 | static const struct drm_encoder_helper_funcs vbox_enc_helper_funcs = { | ||
422 | .dpms = vbox_encoder_dpms, | ||
423 | .mode_fixup = vbox_mode_fixup, | ||
424 | .prepare = vbox_encoder_prepare, | ||
425 | .commit = vbox_encoder_commit, | ||
426 | .mode_set = vbox_encoder_mode_set, | ||
427 | }; | ||
428 | |||
429 | static struct drm_encoder *vbox_encoder_init(struct drm_device *dev, | ||
430 | unsigned int i) | ||
431 | { | ||
432 | struct vbox_encoder *vbox_encoder; | ||
433 | |||
434 | vbox_encoder = kzalloc(sizeof(*vbox_encoder), GFP_KERNEL); | ||
435 | if (!vbox_encoder) | ||
436 | return NULL; | ||
437 | |||
438 | drm_encoder_init(dev, &vbox_encoder->base, &vbox_enc_funcs, | ||
439 | DRM_MODE_ENCODER_DAC, NULL); | ||
440 | drm_encoder_helper_add(&vbox_encoder->base, &vbox_enc_helper_funcs); | ||
441 | |||
442 | vbox_encoder->base.possible_crtcs = 1 << i; | ||
443 | return &vbox_encoder->base; | ||
444 | } | ||
445 | |||
446 | /** | ||
447 | * Generate EDID data with a mode-unique serial number for the virtual | ||
448 | * monitor to try to persuade Unity that different modes correspond to | ||
449 | * different monitors and it should not try to force the same resolution on | ||
450 | * them. | ||
451 | */ | ||
452 | static void vbox_set_edid(struct drm_connector *connector, int width, | ||
453 | int height) | ||
454 | { | ||
455 | enum { EDID_SIZE = 128 }; | ||
456 | unsigned char edid[EDID_SIZE] = { | ||
457 | 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, /* header */ | ||
458 | 0x58, 0x58, /* manufacturer (VBX) */ | ||
459 | 0x00, 0x00, /* product code */ | ||
460 | 0x00, 0x00, 0x00, 0x00, /* serial number goes here */ | ||
461 | 0x01, /* week of manufacture */ | ||
462 | 0x00, /* year of manufacture */ | ||
463 | 0x01, 0x03, /* EDID version */ | ||
464 | 0x80, /* capabilities - digital */ | ||
465 | 0x00, /* horiz. res in cm, zero for projectors */ | ||
466 | 0x00, /* vert. res in cm */ | ||
467 | 0x78, /* display gamma (120 == 2.2). */ | ||
468 | 0xEE, /* features (standby, suspend, off, RGB, std */ | ||
469 | /* colour space, preferred timing mode) */ | ||
470 | 0xEE, 0x91, 0xA3, 0x54, 0x4C, 0x99, 0x26, 0x0F, 0x50, 0x54, | ||
471 | /* chromaticity for standard colour space. */ | ||
472 | 0x00, 0x00, 0x00, /* no default timings */ | ||
473 | 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, | ||
474 | 0x01, 0x01, | ||
475 | 0x01, 0x01, 0x01, 0x01, /* no standard timings */ | ||
476 | 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x02, 0x02, | ||
477 | 0x02, 0x02, | ||
478 | /* descriptor block 1 goes below */ | ||
479 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
480 | /* descriptor block 2, monitor ranges */ | ||
481 | 0x00, 0x00, 0x00, 0xFD, 0x00, | ||
482 | 0x00, 0xC8, 0x00, 0xC8, 0x64, 0x00, 0x0A, 0x20, 0x20, 0x20, | ||
483 | 0x20, 0x20, | ||
484 | /* 0-200Hz vertical, 0-200KHz horizontal, 1000MHz pixel clock */ | ||
485 | 0x20, | ||
486 | /* descriptor block 3, monitor name */ | ||
487 | 0x00, 0x00, 0x00, 0xFC, 0x00, | ||
488 | 'V', 'B', 'O', 'X', ' ', 'm', 'o', 'n', 'i', 't', 'o', 'r', | ||
489 | '\n', | ||
490 | /* descriptor block 4: dummy data */ | ||
491 | 0x00, 0x00, 0x00, 0x10, 0x00, | ||
492 | 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, | ||
493 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | ||
494 | 0x20, | ||
495 | 0x00, /* number of extensions */ | ||
496 | 0x00 /* checksum goes here */ | ||
497 | }; | ||
498 | int clock = (width + 6) * (height + 6) * 60 / 10000; | ||
499 | unsigned int i, sum = 0; | ||
500 | |||
501 | edid[12] = width & 0xff; | ||
502 | edid[13] = width >> 8; | ||
503 | edid[14] = height & 0xff; | ||
504 | edid[15] = height >> 8; | ||
505 | edid[54] = clock & 0xff; | ||
506 | edid[55] = clock >> 8; | ||
507 | edid[56] = width & 0xff; | ||
508 | edid[58] = (width >> 4) & 0xf0; | ||
509 | edid[59] = height & 0xff; | ||
510 | edid[61] = (height >> 4) & 0xf0; | ||
511 | for (i = 0; i < EDID_SIZE - 1; ++i) | ||
512 | sum += edid[i]; | ||
513 | edid[EDID_SIZE - 1] = (0x100 - (sum & 0xFF)) & 0xFF; | ||
514 | drm_mode_connector_update_edid_property(connector, (struct edid *)edid); | ||
515 | } | ||
516 | |||
517 | static int vbox_get_modes(struct drm_connector *connector) | ||
518 | { | ||
519 | struct vbox_connector *vbox_connector = NULL; | ||
520 | struct drm_display_mode *mode = NULL; | ||
521 | struct vbox_private *vbox = NULL; | ||
522 | unsigned int num_modes = 0; | ||
523 | int preferred_width, preferred_height; | ||
524 | |||
525 | vbox_connector = to_vbox_connector(connector); | ||
526 | vbox = connector->dev->dev_private; | ||
527 | /* | ||
528 | * Heuristic: we do not want to tell the host that we support dynamic | ||
529 | * resizing unless we feel confident that the user space client using | ||
530 | * the video driver can handle hot-plug events. So the first time modes | ||
531 | * are queried after a "master" switch we tell the host that we do not, | ||
532 | * and immediately after we send the client a hot-plug notification as | ||
533 | * a test to see if they will respond and query again. | ||
534 | * That is also the reason why capabilities are reported to the host at | ||
535 | * this place in the code rather than elsewhere. | ||
536 | * We need to report the flags location before reporting the IRQ | ||
537 | * capability. | ||
538 | */ | ||
539 | hgsmi_report_flags_location(vbox->guest_pool, GUEST_HEAP_OFFSET(vbox) + | ||
540 | HOST_FLAGS_OFFSET); | ||
541 | if (vbox_connector->vbox_crtc->crtc_id == 0) | ||
542 | vbox_report_caps(vbox); | ||
543 | if (!vbox->initial_mode_queried) { | ||
544 | if (vbox_connector->vbox_crtc->crtc_id == 0) { | ||
545 | vbox->initial_mode_queried = true; | ||
546 | vbox_report_hotplug(vbox); | ||
547 | } | ||
548 | return drm_add_modes_noedid(connector, 800, 600); | ||
549 | } | ||
550 | num_modes = drm_add_modes_noedid(connector, 2560, 1600); | ||
551 | preferred_width = vbox_connector->mode_hint.width ? | ||
552 | vbox_connector->mode_hint.width : 1024; | ||
553 | preferred_height = vbox_connector->mode_hint.height ? | ||
554 | vbox_connector->mode_hint.height : 768; | ||
555 | mode = drm_cvt_mode(connector->dev, preferred_width, preferred_height, | ||
556 | 60, false, false, false); | ||
557 | if (mode) { | ||
558 | mode->type |= DRM_MODE_TYPE_PREFERRED; | ||
559 | drm_mode_probed_add(connector, mode); | ||
560 | ++num_modes; | ||
561 | } | ||
562 | vbox_set_edid(connector, preferred_width, preferred_height); | ||
563 | drm_object_property_set_value( | ||
564 | &connector->base, vbox->dev->mode_config.suggested_x_property, | ||
565 | vbox_connector->vbox_crtc->x_hint); | ||
566 | drm_object_property_set_value( | ||
567 | &connector->base, vbox->dev->mode_config.suggested_y_property, | ||
568 | vbox_connector->vbox_crtc->y_hint); | ||
569 | |||
570 | return num_modes; | ||
571 | } | ||
572 | |||
573 | static int vbox_mode_valid(struct drm_connector *connector, | ||
574 | struct drm_display_mode *mode) | ||
575 | { | ||
576 | return MODE_OK; | ||
577 | } | ||
578 | |||
579 | static void vbox_connector_destroy(struct drm_connector *connector) | ||
580 | { | ||
581 | struct vbox_connector *vbox_connector; | ||
582 | |||
583 | vbox_connector = to_vbox_connector(connector); | ||
584 | drm_connector_unregister(connector); | ||
585 | drm_connector_cleanup(connector); | ||
586 | kfree(connector); | ||
587 | } | ||
588 | |||
589 | static enum drm_connector_status | ||
590 | vbox_connector_detect(struct drm_connector *connector, bool force) | ||
591 | { | ||
592 | struct vbox_connector *vbox_connector; | ||
593 | |||
594 | vbox_connector = to_vbox_connector(connector); | ||
595 | |||
596 | return vbox_connector->mode_hint.disconnected ? | ||
597 | connector_status_disconnected : connector_status_connected; | ||
598 | } | ||
599 | |||
600 | static int vbox_fill_modes(struct drm_connector *connector, u32 max_x, | ||
601 | u32 max_y) | ||
602 | { | ||
603 | struct vbox_connector *vbox_connector; | ||
604 | struct drm_device *dev; | ||
605 | struct drm_display_mode *mode, *iterator; | ||
606 | |||
607 | vbox_connector = to_vbox_connector(connector); | ||
608 | dev = vbox_connector->base.dev; | ||
609 | list_for_each_entry_safe(mode, iterator, &connector->modes, head) { | ||
610 | list_del(&mode->head); | ||
611 | drm_mode_destroy(dev, mode); | ||
612 | } | ||
613 | |||
614 | return drm_helper_probe_single_connector_modes(connector, max_x, max_y); | ||
615 | } | ||
616 | |||
617 | static const struct drm_connector_helper_funcs vbox_connector_helper_funcs = { | ||
618 | .mode_valid = vbox_mode_valid, | ||
619 | .get_modes = vbox_get_modes, | ||
620 | .best_encoder = vbox_best_single_encoder, | ||
621 | }; | ||
622 | |||
623 | static const struct drm_connector_funcs vbox_connector_funcs = { | ||
624 | .dpms = drm_helper_connector_dpms, | ||
625 | .detect = vbox_connector_detect, | ||
626 | .fill_modes = vbox_fill_modes, | ||
627 | .destroy = vbox_connector_destroy, | ||
628 | }; | ||
629 | |||
630 | static int vbox_connector_init(struct drm_device *dev, | ||
631 | struct vbox_crtc *vbox_crtc, | ||
632 | struct drm_encoder *encoder) | ||
633 | { | ||
634 | struct vbox_connector *vbox_connector; | ||
635 | struct drm_connector *connector; | ||
636 | |||
637 | vbox_connector = kzalloc(sizeof(*vbox_connector), GFP_KERNEL); | ||
638 | if (!vbox_connector) | ||
639 | return -ENOMEM; | ||
640 | |||
641 | connector = &vbox_connector->base; | ||
642 | vbox_connector->vbox_crtc = vbox_crtc; | ||
643 | |||
644 | drm_connector_init(dev, connector, &vbox_connector_funcs, | ||
645 | DRM_MODE_CONNECTOR_VGA); | ||
646 | drm_connector_helper_add(connector, &vbox_connector_helper_funcs); | ||
647 | |||
648 | connector->interlace_allowed = 0; | ||
649 | connector->doublescan_allowed = 0; | ||
650 | |||
651 | drm_mode_create_suggested_offset_properties(dev); | ||
652 | drm_object_attach_property(&connector->base, | ||
653 | dev->mode_config.suggested_x_property, -1); | ||
654 | drm_object_attach_property(&connector->base, | ||
655 | dev->mode_config.suggested_y_property, -1); | ||
656 | drm_connector_register(connector); | ||
657 | |||
658 | drm_mode_connector_attach_encoder(connector, encoder); | ||
659 | |||
660 | return 0; | ||
661 | } | ||
662 | |||
663 | int vbox_mode_init(struct drm_device *dev) | ||
664 | { | ||
665 | struct vbox_private *vbox = dev->dev_private; | ||
666 | struct drm_encoder *encoder; | ||
667 | struct vbox_crtc *vbox_crtc; | ||
668 | unsigned int i; | ||
669 | int ret; | ||
670 | |||
671 | /* vbox_cursor_init(dev); */ | ||
672 | for (i = 0; i < vbox->num_crtcs; ++i) { | ||
673 | vbox_crtc = vbox_crtc_init(dev, i); | ||
674 | if (!vbox_crtc) | ||
675 | return -ENOMEM; | ||
676 | encoder = vbox_encoder_init(dev, i); | ||
677 | if (!encoder) | ||
678 | return -ENOMEM; | ||
679 | ret = vbox_connector_init(dev, vbox_crtc, encoder); | ||
680 | if (ret) | ||
681 | return ret; | ||
682 | } | ||
683 | |||
684 | return 0; | ||
685 | } | ||
686 | |||
687 | void vbox_mode_fini(struct drm_device *dev) | ||
688 | { | ||
689 | /* vbox_cursor_fini(dev); */ | ||
690 | } | ||
691 | |||
692 | /** | ||
693 | * Copy the ARGB image and generate the mask, which is needed in case the host | ||
694 | * does not support ARGB cursors. The mask is a 1BPP bitmap with the bit set | ||
695 | * if the corresponding alpha value in the ARGB image is greater than 0xF0. | ||
696 | */ | ||
697 | static void copy_cursor_image(u8 *src, u8 *dst, u32 width, u32 height, | ||
698 | size_t mask_size) | ||
699 | { | ||
700 | size_t line_size = (width + 7) / 8; | ||
701 | u32 i, j; | ||
702 | |||
703 | memcpy(dst + mask_size, src, width * height * 4); | ||
704 | for (i = 0; i < height; ++i) | ||
705 | for (j = 0; j < width; ++j) | ||
706 | if (((u32 *)src)[i * width + j] > 0xf0000000) | ||
707 | dst[i * line_size + j / 8] |= (0x80 >> (j % 8)); | ||
708 | } | ||
709 | |||
710 | static int vbox_cursor_set2(struct drm_crtc *crtc, struct drm_file *file_priv, | ||
711 | u32 handle, u32 width, u32 height, | ||
712 | s32 hot_x, s32 hot_y) | ||
713 | { | ||
714 | struct vbox_private *vbox = crtc->dev->dev_private; | ||
715 | struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); | ||
716 | struct ttm_bo_kmap_obj uobj_map; | ||
717 | size_t data_size, mask_size; | ||
718 | struct drm_gem_object *obj; | ||
719 | u32 flags, caps = 0; | ||
720 | struct vbox_bo *bo; | ||
721 | bool src_isiomem; | ||
722 | u8 *dst = NULL; | ||
723 | u8 *src; | ||
724 | int ret; | ||
725 | |||
726 | /* | ||
727 | * Re-set this regularly as in 5.0.20 and earlier the information was | ||
728 | * lost on save and restore. | ||
729 | */ | ||
730 | hgsmi_update_input_mapping(vbox->guest_pool, 0, 0, | ||
731 | vbox->input_mapping_width, | ||
732 | vbox->input_mapping_height); | ||
733 | if (!handle) { | ||
734 | bool cursor_enabled = false; | ||
735 | struct drm_crtc *crtci; | ||
736 | |||
737 | /* Hide cursor. */ | ||
738 | vbox_crtc->cursor_enabled = false; | ||
739 | list_for_each_entry(crtci, &vbox->dev->mode_config.crtc_list, | ||
740 | head) { | ||
741 | if (to_vbox_crtc(crtci)->cursor_enabled) | ||
742 | cursor_enabled = true; | ||
743 | } | ||
744 | |||
745 | if (!cursor_enabled) | ||
746 | hgsmi_update_pointer_shape(vbox->guest_pool, 0, 0, 0, | ||
747 | 0, 0, NULL, 0); | ||
748 | return 0; | ||
749 | } | ||
750 | |||
751 | vbox_crtc->cursor_enabled = true; | ||
752 | |||
753 | if (width > VBOX_MAX_CURSOR_WIDTH || height > VBOX_MAX_CURSOR_HEIGHT || | ||
754 | width == 0 || height == 0) | ||
755 | return -EINVAL; | ||
756 | |||
757 | ret = hgsmi_query_conf(vbox->guest_pool, | ||
758 | VBOX_VBVA_CONF32_CURSOR_CAPABILITIES, &caps); | ||
759 | if (ret) | ||
760 | return ret; | ||
761 | |||
762 | if (!(caps & VBOX_VBVA_CURSOR_CAPABILITY_HARDWARE)) { | ||
763 | /* | ||
764 | * -EINVAL means cursor_set2() not supported, -EAGAIN means | ||
765 | * retry at once. | ||
766 | */ | ||
767 | return -EBUSY; | ||
768 | } | ||
769 | |||
770 | obj = drm_gem_object_lookup(file_priv, handle); | ||
771 | if (!obj) { | ||
772 | DRM_ERROR("Cannot find cursor object %x for crtc\n", handle); | ||
773 | return -ENOENT; | ||
774 | } | ||
775 | |||
776 | bo = gem_to_vbox_bo(obj); | ||
777 | ret = vbox_bo_reserve(bo, false); | ||
778 | if (ret) | ||
779 | goto out_unref_obj; | ||
780 | |||
781 | /* | ||
782 | * The mask must be calculated based on the alpha | ||
783 | * channel, one bit per ARGB word, and must be 32-bit | ||
784 | * padded. | ||
785 | */ | ||
786 | mask_size = ((width + 7) / 8 * height + 3) & ~3; | ||
787 | data_size = width * height * 4 + mask_size; | ||
788 | vbox->cursor_hot_x = min_t(u32, max(hot_x, 0), width); | ||
789 | vbox->cursor_hot_y = min_t(u32, max(hot_y, 0), height); | ||
790 | vbox->cursor_width = width; | ||
791 | vbox->cursor_height = height; | ||
792 | vbox->cursor_data_size = data_size; | ||
793 | dst = vbox->cursor_data; | ||
794 | |||
795 | ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &uobj_map); | ||
796 | if (ret) { | ||
797 | vbox->cursor_data_size = 0; | ||
798 | goto out_unreserve_bo; | ||
799 | } | ||
800 | |||
801 | src = ttm_kmap_obj_virtual(&uobj_map, &src_isiomem); | ||
802 | if (src_isiomem) { | ||
803 | DRM_ERROR("src cursor bo not in main memory\n"); | ||
804 | ret = -EIO; | ||
805 | goto out_unmap_bo; | ||
806 | } | ||
807 | |||
808 | copy_cursor_image(src, dst, width, height, mask_size); | ||
809 | |||
810 | flags = VBOX_MOUSE_POINTER_VISIBLE | VBOX_MOUSE_POINTER_SHAPE | | ||
811 | VBOX_MOUSE_POINTER_ALPHA; | ||
812 | ret = hgsmi_update_pointer_shape(vbox->guest_pool, flags, | ||
813 | vbox->cursor_hot_x, vbox->cursor_hot_y, | ||
814 | width, height, dst, data_size); | ||
815 | out_unmap_bo: | ||
816 | ttm_bo_kunmap(&uobj_map); | ||
817 | out_unreserve_bo: | ||
818 | vbox_bo_unreserve(bo); | ||
819 | out_unref_obj: | ||
820 | drm_gem_object_unreference_unlocked(obj); | ||
821 | |||
822 | return ret; | ||
823 | } | ||
824 | |||
825 | static int vbox_cursor_move(struct drm_crtc *crtc, int x, int y) | ||
826 | { | ||
827 | struct vbox_private *vbox = crtc->dev->dev_private; | ||
828 | u32 flags = VBOX_MOUSE_POINTER_VISIBLE | | ||
829 | VBOX_MOUSE_POINTER_SHAPE | VBOX_MOUSE_POINTER_ALPHA; | ||
830 | s32 crtc_x = | ||
831 | vbox->single_framebuffer ? crtc->x : to_vbox_crtc(crtc)->x_hint; | ||
832 | s32 crtc_y = | ||
833 | vbox->single_framebuffer ? crtc->y : to_vbox_crtc(crtc)->y_hint; | ||
834 | u32 host_x, host_y; | ||
835 | u32 hot_x = 0; | ||
836 | u32 hot_y = 0; | ||
837 | int ret; | ||
838 | |||
839 | /* | ||
840 | * We compare these to unsigned later and don't | ||
841 | * need to handle negative. | ||
842 | */ | ||
843 | if (x + crtc_x < 0 || y + crtc_y < 0 || vbox->cursor_data_size == 0) | ||
844 | return 0; | ||
845 | |||
846 | ret = hgsmi_cursor_position(vbox->guest_pool, true, x + crtc_x, | ||
847 | y + crtc_y, &host_x, &host_y); | ||
848 | |||
849 | /* | ||
850 | * The only reason we have vbox_cursor_move() is that some older clients | ||
851 | * might use DRM_IOCTL_MODE_CURSOR instead of DRM_IOCTL_MODE_CURSOR2 and | ||
852 | * use DRM_MODE_CURSOR_MOVE to set the hot-spot. | ||
853 | * | ||
854 | * However VirtualBox 5.0.20 and earlier has a bug causing it to return | ||
855 | * 0,0 as host cursor location after a save and restore. | ||
856 | * | ||
857 | * To work around this we ignore a 0, 0 return, since missing the odd | ||
858 | * time when it legitimately happens is not going to hurt much. | ||
859 | */ | ||
860 | if (ret || (host_x == 0 && host_y == 0)) | ||
861 | return ret; | ||
862 | |||
863 | if (x + crtc_x < host_x) | ||
864 | hot_x = min(host_x - x - crtc_x, vbox->cursor_width); | ||
865 | if (y + crtc_y < host_y) | ||
866 | hot_y = min(host_y - y - crtc_y, vbox->cursor_height); | ||
867 | |||
868 | if (hot_x == vbox->cursor_hot_x && hot_y == vbox->cursor_hot_y) | ||
869 | return 0; | ||
870 | |||
871 | vbox->cursor_hot_x = hot_x; | ||
872 | vbox->cursor_hot_y = hot_y; | ||
873 | |||
874 | return hgsmi_update_pointer_shape(vbox->guest_pool, flags, | ||
875 | hot_x, hot_y, vbox->cursor_width, vbox->cursor_height, | ||
876 | vbox->cursor_data, vbox->cursor_data_size); | ||
877 | } | ||
diff --git a/drivers/staging/vboxvideo/vbox_prime.c b/drivers/staging/vboxvideo/vbox_prime.c new file mode 100644 index 000000000000..b7453e427a1d --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_prime.c | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 Oracle Corporation | ||
3 | * Copyright 2017 Canonical | ||
4 | * | ||
5 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
6 | * copy of this software and associated documentation files (the "Software"), | ||
7 | * to deal in the Software without restriction, including without limitation | ||
8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
9 | * and/or sell copies of the Software, and to permit persons to whom the | ||
10 | * Software is furnished to do so, subject to the following conditions: | ||
11 | * | ||
12 | * The above copyright notice and this permission notice shall be included in | ||
13 | * all copies or substantial portions of the Software. | ||
14 | * | ||
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
18 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
19 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
20 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
21 | * OTHER DEALINGS IN THE SOFTWARE. | ||
22 | * | ||
23 | * Authors: Andreas Pokorny | ||
24 | */ | ||
25 | |||
26 | #include "vbox_drv.h" | ||
27 | |||
28 | /* | ||
29 | * Based on qxl_prime.c: | ||
30 | * Empty Implementations as there should not be any other driver for a virtual | ||
31 | * device that might share buffers with vboxvideo | ||
32 | */ | ||
33 | |||
34 | int vbox_gem_prime_pin(struct drm_gem_object *obj) | ||
35 | { | ||
36 | WARN_ONCE(1, "not implemented"); | ||
37 | return -ENOSYS; | ||
38 | } | ||
39 | |||
40 | void vbox_gem_prime_unpin(struct drm_gem_object *obj) | ||
41 | { | ||
42 | WARN_ONCE(1, "not implemented"); | ||
43 | } | ||
44 | |||
45 | struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj) | ||
46 | { | ||
47 | WARN_ONCE(1, "not implemented"); | ||
48 | return ERR_PTR(-ENOSYS); | ||
49 | } | ||
50 | |||
51 | struct drm_gem_object *vbox_gem_prime_import_sg_table( | ||
52 | struct drm_device *dev, struct dma_buf_attachment *attach, | ||
53 | struct sg_table *table) | ||
54 | { | ||
55 | WARN_ONCE(1, "not implemented"); | ||
56 | return ERR_PTR(-ENOSYS); | ||
57 | } | ||
58 | |||
59 | void *vbox_gem_prime_vmap(struct drm_gem_object *obj) | ||
60 | { | ||
61 | WARN_ONCE(1, "not implemented"); | ||
62 | return ERR_PTR(-ENOSYS); | ||
63 | } | ||
64 | |||
65 | void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr) | ||
66 | { | ||
67 | WARN_ONCE(1, "not implemented"); | ||
68 | } | ||
69 | |||
70 | int vbox_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *area) | ||
71 | { | ||
72 | WARN_ONCE(1, "not implemented"); | ||
73 | return -ENOSYS; | ||
74 | } | ||
diff --git a/drivers/staging/vboxvideo/vbox_ttm.c b/drivers/staging/vboxvideo/vbox_ttm.c new file mode 100644 index 000000000000..34a905d40735 --- /dev/null +++ b/drivers/staging/vboxvideo/vbox_ttm.c | |||
@@ -0,0 +1,472 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013-2017 Oracle Corporation | ||
3 | * This file is based on ast_ttm.c | ||
4 | * Copyright 2012 Red Hat Inc. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the | ||
8 | * "Software"), to deal in the Software without restriction, including | ||
9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
11 | * permit persons to whom the Software is furnished to do so, subject to | ||
12 | * the following conditions: | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
19 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
20 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * The above copyright notice and this permission notice (including the | ||
23 | * next paragraph) shall be included in all copies or substantial portions | ||
24 | * of the Software. | ||
25 | * | ||
26 | * | ||
27 | * Authors: Dave Airlie <airlied@redhat.com> | ||
28 | * Michael Thayer <michael.thayer@oracle.com> | ||
29 | */ | ||
30 | #include "vbox_drv.h" | ||
31 | #include <ttm/ttm_page_alloc.h> | ||
32 | |||
33 | static inline struct vbox_private *vbox_bdev(struct ttm_bo_device *bd) | ||
34 | { | ||
35 | return container_of(bd, struct vbox_private, ttm.bdev); | ||
36 | } | ||
37 | |||
38 | static int vbox_ttm_mem_global_init(struct drm_global_reference *ref) | ||
39 | { | ||
40 | return ttm_mem_global_init(ref->object); | ||
41 | } | ||
42 | |||
43 | static void vbox_ttm_mem_global_release(struct drm_global_reference *ref) | ||
44 | { | ||
45 | ttm_mem_global_release(ref->object); | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | * Adds the vbox memory manager object/structures to the global memory manager. | ||
50 | */ | ||
51 | static int vbox_ttm_global_init(struct vbox_private *vbox) | ||
52 | { | ||
53 | struct drm_global_reference *global_ref; | ||
54 | int ret; | ||
55 | |||
56 | global_ref = &vbox->ttm.mem_global_ref; | ||
57 | global_ref->global_type = DRM_GLOBAL_TTM_MEM; | ||
58 | global_ref->size = sizeof(struct ttm_mem_global); | ||
59 | global_ref->init = &vbox_ttm_mem_global_init; | ||
60 | global_ref->release = &vbox_ttm_mem_global_release; | ||
61 | ret = drm_global_item_ref(global_ref); | ||
62 | if (ret) { | ||
63 | DRM_ERROR("Failed setting up TTM memory subsystem.\n"); | ||
64 | return ret; | ||
65 | } | ||
66 | |||
67 | vbox->ttm.bo_global_ref.mem_glob = vbox->ttm.mem_global_ref.object; | ||
68 | global_ref = &vbox->ttm.bo_global_ref.ref; | ||
69 | global_ref->global_type = DRM_GLOBAL_TTM_BO; | ||
70 | global_ref->size = sizeof(struct ttm_bo_global); | ||
71 | global_ref->init = &ttm_bo_global_init; | ||
72 | global_ref->release = &ttm_bo_global_release; | ||
73 | |||
74 | ret = drm_global_item_ref(global_ref); | ||
75 | if (ret) { | ||
76 | DRM_ERROR("Failed setting up TTM BO subsystem.\n"); | ||
77 | drm_global_item_unref(&vbox->ttm.mem_global_ref); | ||
78 | return ret; | ||
79 | } | ||
80 | |||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * Removes the vbox memory manager object from the global memory manager. | ||
86 | */ | ||
87 | static void vbox_ttm_global_release(struct vbox_private *vbox) | ||
88 | { | ||
89 | drm_global_item_unref(&vbox->ttm.bo_global_ref.ref); | ||
90 | drm_global_item_unref(&vbox->ttm.mem_global_ref); | ||
91 | } | ||
92 | |||
93 | static void vbox_bo_ttm_destroy(struct ttm_buffer_object *tbo) | ||
94 | { | ||
95 | struct vbox_bo *bo; | ||
96 | |||
97 | bo = container_of(tbo, struct vbox_bo, bo); | ||
98 | |||
99 | drm_gem_object_release(&bo->gem); | ||
100 | kfree(bo); | ||
101 | } | ||
102 | |||
103 | static bool vbox_ttm_bo_is_vbox_bo(struct ttm_buffer_object *bo) | ||
104 | { | ||
105 | if (bo->destroy == &vbox_bo_ttm_destroy) | ||
106 | return true; | ||
107 | |||
108 | return false; | ||
109 | } | ||
110 | |||
111 | static int | ||
112 | vbox_bo_init_mem_type(struct ttm_bo_device *bdev, u32 type, | ||
113 | struct ttm_mem_type_manager *man) | ||
114 | { | ||
115 | switch (type) { | ||
116 | case TTM_PL_SYSTEM: | ||
117 | man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; | ||
118 | man->available_caching = TTM_PL_MASK_CACHING; | ||
119 | man->default_caching = TTM_PL_FLAG_CACHED; | ||
120 | break; | ||
121 | case TTM_PL_VRAM: | ||
122 | man->func = &ttm_bo_manager_func; | ||
123 | man->flags = TTM_MEMTYPE_FLAG_FIXED | TTM_MEMTYPE_FLAG_MAPPABLE; | ||
124 | man->available_caching = TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC; | ||
125 | man->default_caching = TTM_PL_FLAG_WC; | ||
126 | break; | ||
127 | default: | ||
128 | DRM_ERROR("Unsupported memory type %u\n", (unsigned int)type); | ||
129 | return -EINVAL; | ||
130 | } | ||
131 | |||
132 | return 0; | ||
133 | } | ||
134 | |||
135 | static void | ||
136 | vbox_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *pl) | ||
137 | { | ||
138 | struct vbox_bo *vboxbo = vbox_bo(bo); | ||
139 | |||
140 | if (!vbox_ttm_bo_is_vbox_bo(bo)) | ||
141 | return; | ||
142 | |||
143 | vbox_ttm_placement(vboxbo, TTM_PL_FLAG_SYSTEM); | ||
144 | *pl = vboxbo->placement; | ||
145 | } | ||
146 | |||
147 | static int vbox_bo_verify_access(struct ttm_buffer_object *bo, | ||
148 | struct file *filp) | ||
149 | { | ||
150 | return 0; | ||
151 | } | ||
152 | |||
153 | static int vbox_ttm_io_mem_reserve(struct ttm_bo_device *bdev, | ||
154 | struct ttm_mem_reg *mem) | ||
155 | { | ||
156 | struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; | ||
157 | struct vbox_private *vbox = vbox_bdev(bdev); | ||
158 | |||
159 | mem->bus.addr = NULL; | ||
160 | mem->bus.offset = 0; | ||
161 | mem->bus.size = mem->num_pages << PAGE_SHIFT; | ||
162 | mem->bus.base = 0; | ||
163 | mem->bus.is_iomem = false; | ||
164 | if (!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE)) | ||
165 | return -EINVAL; | ||
166 | switch (mem->mem_type) { | ||
167 | case TTM_PL_SYSTEM: | ||
168 | /* system memory */ | ||
169 | return 0; | ||
170 | case TTM_PL_VRAM: | ||
171 | mem->bus.offset = mem->start << PAGE_SHIFT; | ||
172 | mem->bus.base = pci_resource_start(vbox->dev->pdev, 0); | ||
173 | mem->bus.is_iomem = true; | ||
174 | break; | ||
175 | default: | ||
176 | return -EINVAL; | ||
177 | } | ||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | static void vbox_ttm_io_mem_free(struct ttm_bo_device *bdev, | ||
182 | struct ttm_mem_reg *mem) | ||
183 | { | ||
184 | } | ||
185 | |||
186 | static int vbox_bo_move(struct ttm_buffer_object *bo, | ||
187 | bool evict, bool interruptible, | ||
188 | bool no_wait_gpu, struct ttm_mem_reg *new_mem) | ||
189 | { | ||
190 | return ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu, new_mem); | ||
191 | } | ||
192 | |||
193 | static void vbox_ttm_backend_destroy(struct ttm_tt *tt) | ||
194 | { | ||
195 | ttm_tt_fini(tt); | ||
196 | kfree(tt); | ||
197 | } | ||
198 | |||
199 | static struct ttm_backend_func vbox_tt_backend_func = { | ||
200 | .destroy = &vbox_ttm_backend_destroy, | ||
201 | }; | ||
202 | |||
203 | static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev, | ||
204 | unsigned long size, | ||
205 | u32 page_flags, | ||
206 | struct page *dummy_read_page) | ||
207 | { | ||
208 | struct ttm_tt *tt; | ||
209 | |||
210 | tt = kzalloc(sizeof(*tt), GFP_KERNEL); | ||
211 | if (!tt) | ||
212 | return NULL; | ||
213 | |||
214 | tt->func = &vbox_tt_backend_func; | ||
215 | if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) { | ||
216 | kfree(tt); | ||
217 | return NULL; | ||
218 | } | ||
219 | |||
220 | return tt; | ||
221 | } | ||
222 | |||
223 | static int vbox_ttm_tt_populate(struct ttm_tt *ttm) | ||
224 | { | ||
225 | return ttm_pool_populate(ttm); | ||
226 | } | ||
227 | |||
228 | static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm) | ||
229 | { | ||
230 | ttm_pool_unpopulate(ttm); | ||
231 | } | ||
232 | |||
233 | struct ttm_bo_driver vbox_bo_driver = { | ||
234 | .ttm_tt_create = vbox_ttm_tt_create, | ||
235 | .ttm_tt_populate = vbox_ttm_tt_populate, | ||
236 | .ttm_tt_unpopulate = vbox_ttm_tt_unpopulate, | ||
237 | .init_mem_type = vbox_bo_init_mem_type, | ||
238 | .eviction_valuable = ttm_bo_eviction_valuable, | ||
239 | .evict_flags = vbox_bo_evict_flags, | ||
240 | .move = vbox_bo_move, | ||
241 | .verify_access = vbox_bo_verify_access, | ||
242 | .io_mem_reserve = &vbox_ttm_io_mem_reserve, | ||
243 | .io_mem_free = &vbox_ttm_io_mem_free, | ||
244 | .io_mem_pfn = ttm_bo_default_io_mem_pfn, | ||
245 | }; | ||
246 | |||
247 | int vbox_mm_init(struct vbox_private *vbox) | ||
248 | { | ||
249 | int ret; | ||
250 | struct drm_device *dev = vbox->dev; | ||
251 | struct ttm_bo_device *bdev = &vbox->ttm.bdev; | ||
252 | |||
253 | ret = vbox_ttm_global_init(vbox); | ||
254 | if (ret) | ||
255 | return ret; | ||
256 | |||
257 | ret = ttm_bo_device_init(&vbox->ttm.bdev, | ||
258 | vbox->ttm.bo_global_ref.ref.object, | ||
259 | &vbox_bo_driver, | ||
260 | dev->anon_inode->i_mapping, | ||
261 | DRM_FILE_PAGE_OFFSET, true); | ||
262 | if (ret) { | ||
263 | DRM_ERROR("Error initialising bo driver; %d\n", ret); | ||
264 | goto err_ttm_global_release; | ||
265 | } | ||
266 | |||
267 | ret = ttm_bo_init_mm(bdev, TTM_PL_VRAM, | ||
268 | vbox->available_vram_size >> PAGE_SHIFT); | ||
269 | if (ret) { | ||
270 | DRM_ERROR("Failed ttm VRAM init: %d\n", ret); | ||
271 | goto err_device_release; | ||
272 | } | ||
273 | |||
274 | #ifdef DRM_MTRR_WC | ||
275 | vbox->fb_mtrr = drm_mtrr_add(pci_resource_start(dev->pdev, 0), | ||
276 | pci_resource_len(dev->pdev, 0), | ||
277 | DRM_MTRR_WC); | ||
278 | #else | ||
279 | vbox->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0), | ||
280 | pci_resource_len(dev->pdev, 0)); | ||
281 | #endif | ||
282 | return 0; | ||
283 | |||
284 | err_device_release: | ||
285 | ttm_bo_device_release(&vbox->ttm.bdev); | ||
286 | err_ttm_global_release: | ||
287 | vbox_ttm_global_release(vbox); | ||
288 | return ret; | ||
289 | } | ||
290 | |||
291 | void vbox_mm_fini(struct vbox_private *vbox) | ||
292 | { | ||
293 | #ifdef DRM_MTRR_WC | ||
294 | drm_mtrr_del(vbox->fb_mtrr, | ||
295 | pci_resource_start(vbox->dev->pdev, 0), | ||
296 | pci_resource_len(vbox->dev->pdev, 0), DRM_MTRR_WC); | ||
297 | #else | ||
298 | arch_phys_wc_del(vbox->fb_mtrr); | ||
299 | #endif | ||
300 | ttm_bo_device_release(&vbox->ttm.bdev); | ||
301 | vbox_ttm_global_release(vbox); | ||
302 | } | ||
303 | |||
304 | void vbox_ttm_placement(struct vbox_bo *bo, int domain) | ||
305 | { | ||
306 | unsigned int i; | ||
307 | u32 c = 0; | ||
308 | |||
309 | bo->placement.placement = bo->placements; | ||
310 | bo->placement.busy_placement = bo->placements; | ||
311 | |||
312 | if (domain & TTM_PL_FLAG_VRAM) | ||
313 | bo->placements[c++].flags = | ||
314 | TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM; | ||
315 | if (domain & TTM_PL_FLAG_SYSTEM) | ||
316 | bo->placements[c++].flags = | ||
317 | TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM; | ||
318 | if (!c) | ||
319 | bo->placements[c++].flags = | ||
320 | TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM; | ||
321 | |||
322 | bo->placement.num_placement = c; | ||
323 | bo->placement.num_busy_placement = c; | ||
324 | |||
325 | for (i = 0; i < c; ++i) { | ||
326 | bo->placements[i].fpfn = 0; | ||
327 | bo->placements[i].lpfn = 0; | ||
328 | } | ||
329 | } | ||
330 | |||
331 | int vbox_bo_create(struct drm_device *dev, int size, int align, | ||
332 | u32 flags, struct vbox_bo **pvboxbo) | ||
333 | { | ||
334 | struct vbox_private *vbox = dev->dev_private; | ||
335 | struct vbox_bo *vboxbo; | ||
336 | size_t acc_size; | ||
337 | int ret; | ||
338 | |||
339 | vboxbo = kzalloc(sizeof(*vboxbo), GFP_KERNEL); | ||
340 | if (!vboxbo) | ||
341 | return -ENOMEM; | ||
342 | |||
343 | ret = drm_gem_object_init(dev, &vboxbo->gem, size); | ||
344 | if (ret) | ||
345 | goto err_free_vboxbo; | ||
346 | |||
347 | vboxbo->bo.bdev = &vbox->ttm.bdev; | ||
348 | |||
349 | vbox_ttm_placement(vboxbo, TTM_PL_FLAG_VRAM | TTM_PL_FLAG_SYSTEM); | ||
350 | |||
351 | acc_size = ttm_bo_dma_acc_size(&vbox->ttm.bdev, size, | ||
352 | sizeof(struct vbox_bo)); | ||
353 | |||
354 | ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size, | ||
355 | ttm_bo_type_device, &vboxbo->placement, | ||
356 | align >> PAGE_SHIFT, false, NULL, acc_size, | ||
357 | NULL, NULL, vbox_bo_ttm_destroy); | ||
358 | if (ret) | ||
359 | goto err_free_vboxbo; | ||
360 | |||
361 | *pvboxbo = vboxbo; | ||
362 | |||
363 | return 0; | ||
364 | |||
365 | err_free_vboxbo: | ||
366 | kfree(vboxbo); | ||
367 | return ret; | ||
368 | } | ||
369 | |||
370 | static inline u64 vbox_bo_gpu_offset(struct vbox_bo *bo) | ||
371 | { | ||
372 | return bo->bo.offset; | ||
373 | } | ||
374 | |||
375 | int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr) | ||
376 | { | ||
377 | int i, ret; | ||
378 | |||
379 | if (bo->pin_count) { | ||
380 | bo->pin_count++; | ||
381 | if (gpu_addr) | ||
382 | *gpu_addr = vbox_bo_gpu_offset(bo); | ||
383 | |||
384 | return 0; | ||
385 | } | ||
386 | |||
387 | vbox_ttm_placement(bo, pl_flag); | ||
388 | |||
389 | for (i = 0; i < bo->placement.num_placement; i++) | ||
390 | bo->placements[i].flags |= TTM_PL_FLAG_NO_EVICT; | ||
391 | |||
392 | ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); | ||
393 | if (ret) | ||
394 | return ret; | ||
395 | |||
396 | bo->pin_count = 1; | ||
397 | |||
398 | if (gpu_addr) | ||
399 | *gpu_addr = vbox_bo_gpu_offset(bo); | ||
400 | |||
401 | return 0; | ||
402 | } | ||
403 | |||
404 | int vbox_bo_unpin(struct vbox_bo *bo) | ||
405 | { | ||
406 | int i, ret; | ||
407 | |||
408 | if (!bo->pin_count) { | ||
409 | DRM_ERROR("unpin bad %p\n", bo); | ||
410 | return 0; | ||
411 | } | ||
412 | bo->pin_count--; | ||
413 | if (bo->pin_count) | ||
414 | return 0; | ||
415 | |||
416 | for (i = 0; i < bo->placement.num_placement; i++) | ||
417 | bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT; | ||
418 | |||
419 | ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); | ||
420 | if (ret) | ||
421 | return ret; | ||
422 | |||
423 | return 0; | ||
424 | } | ||
425 | |||
426 | /* | ||
427 | * Move a vbox-owned buffer object to system memory if no one else has it | ||
428 | * pinned. The caller must have pinned it previously, and this call will | ||
429 | * release the caller's pin. | ||
430 | */ | ||
431 | int vbox_bo_push_sysram(struct vbox_bo *bo) | ||
432 | { | ||
433 | int i, ret; | ||
434 | |||
435 | if (!bo->pin_count) { | ||
436 | DRM_ERROR("unpin bad %p\n", bo); | ||
437 | return 0; | ||
438 | } | ||
439 | bo->pin_count--; | ||
440 | if (bo->pin_count) | ||
441 | return 0; | ||
442 | |||
443 | if (bo->kmap.virtual) | ||
444 | ttm_bo_kunmap(&bo->kmap); | ||
445 | |||
446 | vbox_ttm_placement(bo, TTM_PL_FLAG_SYSTEM); | ||
447 | |||
448 | for (i = 0; i < bo->placement.num_placement; i++) | ||
449 | bo->placements[i].flags |= TTM_PL_FLAG_NO_EVICT; | ||
450 | |||
451 | ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); | ||
452 | if (ret) { | ||
453 | DRM_ERROR("pushing to VRAM failed\n"); | ||
454 | return ret; | ||
455 | } | ||
456 | |||
457 | return 0; | ||
458 | } | ||
459 | |||
460 | int vbox_mmap(struct file *filp, struct vm_area_struct *vma) | ||
461 | { | ||
462 | struct drm_file *file_priv; | ||
463 | struct vbox_private *vbox; | ||
464 | |||
465 | if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET)) | ||
466 | return -EINVAL; | ||
467 | |||
468 | file_priv = filp->private_data; | ||
469 | vbox = file_priv->minor->dev->dev_private; | ||
470 | |||
471 | return ttm_bo_mmap(filp, vma, &vbox->ttm.bdev); | ||
472 | } | ||
diff --git a/drivers/staging/vboxvideo/vboxvideo.h b/drivers/staging/vboxvideo/vboxvideo.h new file mode 100644 index 000000000000..d835d75d761c --- /dev/null +++ b/drivers/staging/vboxvideo/vboxvideo.h | |||
@@ -0,0 +1,491 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2016 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the | ||
6 | * "Software"), to deal in the Software without restriction, including | ||
7 | * without limitation the rights to use, copy, modify, merge, publish, | ||
8 | * distribute, sub license, and/or sell copies of the Software, and to | ||
9 | * permit persons to whom the Software is furnished to do so, subject to | ||
10 | * the following conditions: | ||
11 | * | ||
12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
13 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
15 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
16 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
17 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
18 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
19 | * | ||
20 | * The above copyright notice and this permission notice shall be included in | ||
21 | * all copies or substantial portions of the Software. | ||
22 | */ | ||
23 | |||
24 | #ifndef __VBOXVIDEO_H__ | ||
25 | #define __VBOXVIDEO_H__ | ||
26 | |||
27 | /* | ||
28 | * This should be in sync with monitorCount <xsd:maxInclusive value="64"/> in | ||
29 | * src/VBox/Main/xml/VirtualBox-settings-common.xsd | ||
30 | */ | ||
31 | #define VBOX_VIDEO_MAX_SCREENS 64 | ||
32 | |||
33 | /* | ||
34 | * The last 4096 bytes of the guest VRAM contains the generic info for all | ||
35 | * DualView chunks: sizes and offsets of chunks. This is filled by miniport. | ||
36 | * | ||
37 | * Last 4096 bytes of each chunk contain chunk specific data: framebuffer info, | ||
38 | * etc. This is used exclusively by the corresponding instance of a display | ||
39 | * driver. | ||
40 | * | ||
41 | * The VRAM layout: | ||
42 | * Last 4096 bytes - Adapter information area. | ||
43 | * 4096 bytes aligned miniport heap (value specified in the config rouded up). | ||
44 | * Slack - what left after dividing the VRAM. | ||
45 | * 4096 bytes aligned framebuffers: | ||
46 | * last 4096 bytes of each framebuffer is the display information area. | ||
47 | * | ||
48 | * The Virtual Graphics Adapter information in the guest VRAM is stored by the | ||
49 | * guest video driver using structures prepended by VBOXVIDEOINFOHDR. | ||
50 | * | ||
51 | * When the guest driver writes dword 0 to the VBE_DISPI_INDEX_VBOX_VIDEO | ||
52 | * the host starts to process the info. The first element at the start of | ||
53 | * the 4096 bytes region should be normally be a LINK that points to | ||
54 | * actual information chain. That way the guest driver can have some | ||
55 | * fixed layout of the information memory block and just rewrite | ||
56 | * the link to point to relevant memory chain. | ||
57 | * | ||
58 | * The processing stops at the END element. | ||
59 | * | ||
60 | * The host can access the memory only when the port IO is processed. | ||
61 | * All data that will be needed later must be copied from these 4096 bytes. | ||
62 | * But other VRAM can be used by host until the mode is disabled. | ||
63 | * | ||
64 | * The guest driver writes dword 0xffffffff to the VBE_DISPI_INDEX_VBOX_VIDEO | ||
65 | * to disable the mode. | ||
66 | * | ||
67 | * VBE_DISPI_INDEX_VBOX_VIDEO is used to read the configuration information | ||
68 | * from the host and issue commands to the host. | ||
69 | * | ||
70 | * The guest writes the VBE_DISPI_INDEX_VBOX_VIDEO index register, the the | ||
71 | * following operations with the VBE data register can be performed: | ||
72 | * | ||
73 | * Operation Result | ||
74 | * write 16 bit value NOP | ||
75 | * read 16 bit value count of monitors | ||
76 | * write 32 bit value set the vbox cmd value and the cmd processed by the host | ||
77 | * read 32 bit value result of the last vbox command is returned | ||
78 | */ | ||
79 | |||
80 | /** | ||
81 | * VBVA command header. | ||
82 | * | ||
83 | * @todo Where does this fit in? | ||
84 | */ | ||
85 | struct vbva_cmd_hdr { | ||
86 | /** Coordinates of affected rectangle. */ | ||
87 | s16 x; | ||
88 | s16 y; | ||
89 | u16 w; | ||
90 | u16 h; | ||
91 | } __packed; | ||
92 | |||
93 | /** @name VBVA ring defines. | ||
94 | * | ||
95 | * The VBVA ring buffer is suitable for transferring large (< 2GB) amount of | ||
96 | * data. For example big bitmaps which do not fit to the buffer. | ||
97 | * | ||
98 | * Guest starts writing to the buffer by initializing a record entry in the | ||
99 | * records queue. VBVA_F_RECORD_PARTIAL indicates that the record is being | ||
100 | * written. As data is written to the ring buffer, the guest increases | ||
101 | * free_offset. | ||
102 | * | ||
103 | * The host reads the records on flushes and processes all completed records. | ||
104 | * When host encounters situation when only a partial record presents and | ||
105 | * len_and_flags & ~VBVA_F_RECORD_PARTIAL >= VBVA_RING_BUFFER_SIZE - | ||
106 | * VBVA_RING_BUFFER_THRESHOLD, the host fetched all record data and updates | ||
107 | * data_offset. After that on each flush the host continues fetching the data | ||
108 | * until the record is completed. | ||
109 | * | ||
110 | */ | ||
111 | #define VBVA_RING_BUFFER_SIZE (4194304 - 1024) | ||
112 | #define VBVA_RING_BUFFER_THRESHOLD (4096) | ||
113 | |||
114 | #define VBVA_MAX_RECORDS (64) | ||
115 | |||
116 | #define VBVA_F_MODE_ENABLED 0x00000001u | ||
117 | #define VBVA_F_MODE_VRDP 0x00000002u | ||
118 | #define VBVA_F_MODE_VRDP_RESET 0x00000004u | ||
119 | #define VBVA_F_MODE_VRDP_ORDER_MASK 0x00000008u | ||
120 | |||
121 | #define VBVA_F_STATE_PROCESSING 0x00010000u | ||
122 | |||
123 | #define VBVA_F_RECORD_PARTIAL 0x80000000u | ||
124 | |||
125 | /** | ||
126 | * VBVA record. | ||
127 | */ | ||
128 | struct vbva_record { | ||
129 | /** The length of the record. Changed by guest. */ | ||
130 | u32 len_and_flags; | ||
131 | } __packed; | ||
132 | |||
133 | /* | ||
134 | * The minimum HGSMI heap size is PAGE_SIZE (4096 bytes) and is a restriction of | ||
135 | * the runtime heapsimple API. Use minimum 2 pages here, because the info area | ||
136 | * also may contain other data (for example hgsmi_host_flags structure). | ||
137 | */ | ||
138 | #define VBVA_ADAPTER_INFORMATION_SIZE 65536 | ||
139 | #define VBVA_MIN_BUFFER_SIZE 65536 | ||
140 | |||
141 | /* The value for port IO to let the adapter to interpret the adapter memory. */ | ||
142 | #define VBOX_VIDEO_DISABLE_ADAPTER_MEMORY 0xFFFFFFFF | ||
143 | |||
144 | /* The value for port IO to let the adapter to interpret the adapter memory. */ | ||
145 | #define VBOX_VIDEO_INTERPRET_ADAPTER_MEMORY 0x00000000 | ||
146 | |||
147 | /* The value for port IO to let the adapter to interpret the display memory. | ||
148 | * The display number is encoded in low 16 bits. | ||
149 | */ | ||
150 | #define VBOX_VIDEO_INTERPRET_DISPLAY_MEMORY_BASE 0x00010000 | ||
151 | |||
152 | struct vbva_host_flags { | ||
153 | u32 host_events; | ||
154 | u32 supported_orders; | ||
155 | } __packed; | ||
156 | |||
157 | struct vbva_buffer { | ||
158 | struct vbva_host_flags host_flags; | ||
159 | |||
160 | /* The offset where the data start in the buffer. */ | ||
161 | u32 data_offset; | ||
162 | /* The offset where next data must be placed in the buffer. */ | ||
163 | u32 free_offset; | ||
164 | |||
165 | /* The queue of record descriptions. */ | ||
166 | struct vbva_record records[VBVA_MAX_RECORDS]; | ||
167 | u32 record_first_index; | ||
168 | u32 record_free_index; | ||
169 | |||
170 | /* Space to leave free when large partial records are transferred. */ | ||
171 | u32 partial_write_tresh; | ||
172 | |||
173 | u32 data_len; | ||
174 | /* variable size for the rest of the vbva_buffer area in VRAM. */ | ||
175 | u8 data[0]; | ||
176 | } __packed; | ||
177 | |||
178 | #define VBVA_MAX_RECORD_SIZE (128 * 1024 * 1024) | ||
179 | |||
180 | /* guest->host commands */ | ||
181 | #define VBVA_QUERY_CONF32 1 | ||
182 | #define VBVA_SET_CONF32 2 | ||
183 | #define VBVA_INFO_VIEW 3 | ||
184 | #define VBVA_INFO_HEAP 4 | ||
185 | #define VBVA_FLUSH 5 | ||
186 | #define VBVA_INFO_SCREEN 6 | ||
187 | #define VBVA_ENABLE 7 | ||
188 | #define VBVA_MOUSE_POINTER_SHAPE 8 | ||
189 | /* informs host about HGSMI caps. see vbva_caps below */ | ||
190 | #define VBVA_INFO_CAPS 12 | ||
191 | /* configures scanline, see VBVASCANLINECFG below */ | ||
192 | #define VBVA_SCANLINE_CFG 13 | ||
193 | /* requests scanline info, see VBVASCANLINEINFO below */ | ||
194 | #define VBVA_SCANLINE_INFO 14 | ||
195 | /* inform host about VBVA Command submission */ | ||
196 | #define VBVA_CMDVBVA_SUBMIT 16 | ||
197 | /* inform host about VBVA Command submission */ | ||
198 | #define VBVA_CMDVBVA_FLUSH 17 | ||
199 | /* G->H DMA command */ | ||
200 | #define VBVA_CMDVBVA_CTL 18 | ||
201 | /* Query most recent mode hints sent */ | ||
202 | #define VBVA_QUERY_MODE_HINTS 19 | ||
203 | /** | ||
204 | * Report the guest virtual desktop position and size for mapping host and | ||
205 | * guest pointer positions. | ||
206 | */ | ||
207 | #define VBVA_REPORT_INPUT_MAPPING 20 | ||
208 | /** Report the guest cursor position and query the host position. */ | ||
209 | #define VBVA_CURSOR_POSITION 21 | ||
210 | |||
211 | /* host->guest commands */ | ||
212 | #define VBVAHG_EVENT 1 | ||
213 | #define VBVAHG_DISPLAY_CUSTOM 2 | ||
214 | |||
215 | /* vbva_conf32::index */ | ||
216 | #define VBOX_VBVA_CONF32_MONITOR_COUNT 0 | ||
217 | #define VBOX_VBVA_CONF32_HOST_HEAP_SIZE 1 | ||
218 | /** | ||
219 | * Returns VINF_SUCCESS if the host can report mode hints via VBVA. | ||
220 | * Set value to VERR_NOT_SUPPORTED before calling. | ||
221 | */ | ||
222 | #define VBOX_VBVA_CONF32_MODE_HINT_REPORTING 2 | ||
223 | /** | ||
224 | * Returns VINF_SUCCESS if the host can report guest cursor enabled status via | ||
225 | * VBVA. Set value to VERR_NOT_SUPPORTED before calling. | ||
226 | */ | ||
227 | #define VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING 3 | ||
228 | /** | ||
229 | * Returns the currently available host cursor capabilities. Available if | ||
230 | * vbva_conf32::VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING returns success. | ||
231 | * @see VMMDevReqMouseStatus::mouseFeatures. | ||
232 | */ | ||
233 | #define VBOX_VBVA_CONF32_CURSOR_CAPABILITIES 4 | ||
234 | /** Returns the supported flags in vbva_infoscreen::flags. */ | ||
235 | #define VBOX_VBVA_CONF32_SCREEN_FLAGS 5 | ||
236 | /** Returns the max size of VBVA record. */ | ||
237 | #define VBOX_VBVA_CONF32_MAX_RECORD_SIZE 6 | ||
238 | |||
239 | struct vbva_conf32 { | ||
240 | u32 index; | ||
241 | u32 value; | ||
242 | } __packed; | ||
243 | |||
244 | /** Reserved for historical reasons. */ | ||
245 | #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED0 BIT(0) | ||
246 | /** | ||
247 | * Guest cursor capability: can the host show a hardware cursor at the host | ||
248 | * pointer location? | ||
249 | */ | ||
250 | #define VBOX_VBVA_CURSOR_CAPABILITY_HARDWARE BIT(1) | ||
251 | /** Reserved for historical reasons. */ | ||
252 | #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED2 BIT(2) | ||
253 | /** Reserved for historical reasons. Must always be unset. */ | ||
254 | #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED3 BIT(3) | ||
255 | /** Reserved for historical reasons. */ | ||
256 | #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED4 BIT(4) | ||
257 | /** Reserved for historical reasons. */ | ||
258 | #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED5 BIT(5) | ||
259 | |||
260 | struct vbva_infoview { | ||
261 | /* Index of the screen, assigned by the guest. */ | ||
262 | u32 view_index; | ||
263 | |||
264 | /* The screen offset in VRAM, the framebuffer starts here. */ | ||
265 | u32 view_offset; | ||
266 | |||
267 | /* The size of the VRAM memory that can be used for the view. */ | ||
268 | u32 view_size; | ||
269 | |||
270 | /* The recommended maximum size of the VRAM memory for the screen. */ | ||
271 | u32 max_screen_size; | ||
272 | } __packed; | ||
273 | |||
274 | struct vbva_flush { | ||
275 | u32 reserved; | ||
276 | } __packed; | ||
277 | |||
278 | /* vbva_infoscreen::flags */ | ||
279 | #define VBVA_SCREEN_F_NONE 0x0000 | ||
280 | #define VBVA_SCREEN_F_ACTIVE 0x0001 | ||
281 | /** | ||
282 | * The virtual monitor has been disabled by the guest and should be removed | ||
283 | * by the host and ignored for purposes of pointer position calculation. | ||
284 | */ | ||
285 | #define VBVA_SCREEN_F_DISABLED 0x0002 | ||
286 | /** | ||
287 | * The virtual monitor has been blanked by the guest and should be blacked | ||
288 | * out by the host using width, height, etc values from the vbva_infoscreen | ||
289 | * request. | ||
290 | */ | ||
291 | #define VBVA_SCREEN_F_BLANK 0x0004 | ||
292 | /** | ||
293 | * The virtual monitor has been blanked by the guest and should be blacked | ||
294 | * out by the host using the previous mode values for width. height, etc. | ||
295 | */ | ||
296 | #define VBVA_SCREEN_F_BLANK2 0x0008 | ||
297 | |||
298 | struct vbva_infoscreen { | ||
299 | /* Which view contains the screen. */ | ||
300 | u32 view_index; | ||
301 | |||
302 | /* Physical X origin relative to the primary screen. */ | ||
303 | s32 origin_x; | ||
304 | |||
305 | /* Physical Y origin relative to the primary screen. */ | ||
306 | s32 origin_y; | ||
307 | |||
308 | /* Offset of visible framebuffer relative to the framebuffer start. */ | ||
309 | u32 start_offset; | ||
310 | |||
311 | /* The scan line size in bytes. */ | ||
312 | u32 line_size; | ||
313 | |||
314 | /* Width of the screen. */ | ||
315 | u32 width; | ||
316 | |||
317 | /* Height of the screen. */ | ||
318 | u32 height; | ||
319 | |||
320 | /* Color depth. */ | ||
321 | u16 bits_per_pixel; | ||
322 | |||
323 | /* VBVA_SCREEN_F_* */ | ||
324 | u16 flags; | ||
325 | } __packed; | ||
326 | |||
327 | /* vbva_enable::flags */ | ||
328 | #define VBVA_F_NONE 0x00000000 | ||
329 | #define VBVA_F_ENABLE 0x00000001 | ||
330 | #define VBVA_F_DISABLE 0x00000002 | ||
331 | /* extended VBVA to be used with WDDM */ | ||
332 | #define VBVA_F_EXTENDED 0x00000004 | ||
333 | /* vbva offset is absolute VRAM offset */ | ||
334 | #define VBVA_F_ABSOFFSET 0x00000008 | ||
335 | |||
336 | struct vbva_enable { | ||
337 | u32 flags; | ||
338 | u32 offset; | ||
339 | s32 result; | ||
340 | } __packed; | ||
341 | |||
342 | struct vbva_enable_ex { | ||
343 | struct vbva_enable base; | ||
344 | u32 screen_id; | ||
345 | } __packed; | ||
346 | |||
347 | struct vbva_mouse_pointer_shape { | ||
348 | /* The host result. */ | ||
349 | s32 result; | ||
350 | |||
351 | /* VBOX_MOUSE_POINTER_* bit flags. */ | ||
352 | u32 flags; | ||
353 | |||
354 | /* X coordinate of the hot spot. */ | ||
355 | u32 hot_X; | ||
356 | |||
357 | /* Y coordinate of the hot spot. */ | ||
358 | u32 hot_y; | ||
359 | |||
360 | /* Width of the pointer in pixels. */ | ||
361 | u32 width; | ||
362 | |||
363 | /* Height of the pointer in scanlines. */ | ||
364 | u32 height; | ||
365 | |||
366 | /* Pointer data. | ||
367 | * | ||
368 | **** | ||
369 | * The data consists of 1 bpp AND mask followed by 32 bpp XOR (color) | ||
370 | * mask. | ||
371 | * | ||
372 | * For pointers without alpha channel the XOR mask pixels are 32 bit | ||
373 | * values: (lsb)BGR0(msb). For pointers with alpha channel the XOR mask | ||
374 | * consists of (lsb)BGRA(msb) 32 bit values. | ||
375 | * | ||
376 | * Guest driver must create the AND mask for pointers with alpha chan., | ||
377 | * so if host does not support alpha, the pointer could be displayed as | ||
378 | * a normal color pointer. The AND mask can be constructed from alpha | ||
379 | * values. For example alpha value >= 0xf0 means bit 0 in the AND mask. | ||
380 | * | ||
381 | * The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND | ||
382 | * mask, therefore, is and_len = (width + 7) / 8 * height. The padding | ||
383 | * bits at the end of any scanline are undefined. | ||
384 | * | ||
385 | * The XOR mask follows the AND mask on the next 4 bytes aligned offset: | ||
386 | * u8 *xor = and + (and_len + 3) & ~3 | ||
387 | * Bytes in the gap between the AND and the XOR mask are undefined. | ||
388 | * XOR mask scanlines have no gap between them and size of XOR mask is: | ||
389 | * xor_len = width * 4 * height. | ||
390 | **** | ||
391 | * | ||
392 | * Preallocate 4 bytes for accessing actual data as p->data. | ||
393 | */ | ||
394 | u8 data[4]; | ||
395 | } __packed; | ||
396 | |||
397 | /** | ||
398 | * @name vbva_mouse_pointer_shape::flags | ||
399 | * @note The VBOX_MOUSE_POINTER_* flags are used in the guest video driver, | ||
400 | * values must be <= 0x8000 and must not be changed. (try make more sense | ||
401 | * of this, please). | ||
402 | * @{ | ||
403 | */ | ||
404 | |||
405 | /** pointer is visible */ | ||
406 | #define VBOX_MOUSE_POINTER_VISIBLE 0x0001 | ||
407 | /** pointer has alpha channel */ | ||
408 | #define VBOX_MOUSE_POINTER_ALPHA 0x0002 | ||
409 | /** pointerData contains new pointer shape */ | ||
410 | #define VBOX_MOUSE_POINTER_SHAPE 0x0004 | ||
411 | |||
412 | /** @} */ | ||
413 | |||
414 | /* | ||
415 | * The guest driver can handle asynch guest cmd completion by reading the | ||
416 | * command offset from io port. | ||
417 | */ | ||
418 | #define VBVACAPS_COMPLETEGCMD_BY_IOREAD 0x00000001 | ||
419 | /* the guest driver can handle video adapter IRQs */ | ||
420 | #define VBVACAPS_IRQ 0x00000002 | ||
421 | /** The guest can read video mode hints sent via VBVA. */ | ||
422 | #define VBVACAPS_VIDEO_MODE_HINTS 0x00000004 | ||
423 | /** The guest can switch to a software cursor on demand. */ | ||
424 | #define VBVACAPS_DISABLE_CURSOR_INTEGRATION 0x00000008 | ||
425 | /** The guest does not depend on host handling the VBE registers. */ | ||
426 | #define VBVACAPS_USE_VBVA_ONLY 0x00000010 | ||
427 | |||
428 | struct vbva_caps { | ||
429 | s32 rc; | ||
430 | u32 caps; | ||
431 | } __packed; | ||
432 | |||
433 | /** Query the most recent mode hints received from the host. */ | ||
434 | struct vbva_query_mode_hints { | ||
435 | /** The maximum number of screens to return hints for. */ | ||
436 | u16 hints_queried_count; | ||
437 | /** The size of the mode hint structures directly following this one. */ | ||
438 | u16 hint_structure_guest_size; | ||
439 | /** Return code for the operation. Initialise to VERR_NOT_SUPPORTED. */ | ||
440 | s32 rc; | ||
441 | } __packed; | ||
442 | |||
443 | /** | ||
444 | * Structure in which a mode hint is returned. The guest allocates an array | ||
445 | * of these immediately after the vbva_query_mode_hints structure. | ||
446 | * To accommodate future extensions, the vbva_query_mode_hints structure | ||
447 | * specifies the size of the vbva_modehint structures allocated by the guest, | ||
448 | * and the host only fills out structure elements which fit into that size. The | ||
449 | * host should fill any unused members (e.g. dx, dy) or structure space on the | ||
450 | * end with ~0. The whole structure can legally be set to ~0 to skip a screen. | ||
451 | */ | ||
452 | struct vbva_modehint { | ||
453 | u32 magic; | ||
454 | u32 cx; | ||
455 | u32 cy; | ||
456 | u32 bpp; /* Which has never been used... */ | ||
457 | u32 display; | ||
458 | u32 dx; /**< X offset into the virtual frame-buffer. */ | ||
459 | u32 dy; /**< Y offset into the virtual frame-buffer. */ | ||
460 | u32 enabled; /* Not flags. Add new members for new flags. */ | ||
461 | } __packed; | ||
462 | |||
463 | #define VBVAMODEHINT_MAGIC 0x0801add9u | ||
464 | |||
465 | /** | ||
466 | * Report the rectangle relative to which absolute pointer events should be | ||
467 | * expressed. This information remains valid until the next VBVA resize event | ||
468 | * for any screen, at which time it is reset to the bounding rectangle of all | ||
469 | * virtual screens and must be re-set. | ||
470 | * @see VBVA_REPORT_INPUT_MAPPING. | ||
471 | */ | ||
472 | struct vbva_report_input_mapping { | ||
473 | s32 x; /**< Upper left X co-ordinate relative to the first screen. */ | ||
474 | s32 y; /**< Upper left Y co-ordinate relative to the first screen. */ | ||
475 | u32 cx; /**< Rectangle width. */ | ||
476 | u32 cy; /**< Rectangle height. */ | ||
477 | } __packed; | ||
478 | |||
479 | /** | ||
480 | * Report the guest cursor position and query the host one. The host may wish | ||
481 | * to use the guest information to re-position its own cursor (though this is | ||
482 | * currently unlikely). | ||
483 | * @see VBVA_CURSOR_POSITION | ||
484 | */ | ||
485 | struct vbva_cursor_position { | ||
486 | u32 report_position; /**< Are we reporting a position? */ | ||
487 | u32 x; /**< Guest cursor X position */ | ||
488 | u32 y; /**< Guest cursor Y position */ | ||
489 | } __packed; | ||
490 | |||
491 | #endif | ||
diff --git a/drivers/staging/vboxvideo/vboxvideo_guest.h b/drivers/staging/vboxvideo/vboxvideo_guest.h new file mode 100644 index 000000000000..d09da841711a --- /dev/null +++ b/drivers/staging/vboxvideo/vboxvideo_guest.h | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __VBOXVIDEO_GUEST_H__ | ||
24 | #define __VBOXVIDEO_GUEST_H__ | ||
25 | |||
26 | #include <linux/genalloc.h> | ||
27 | #include "vboxvideo.h" | ||
28 | |||
29 | /** | ||
30 | * Structure grouping the context needed for sending graphics acceleration | ||
31 | * information to the host via VBVA. Each screen has its own VBVA buffer. | ||
32 | */ | ||
33 | struct vbva_buf_ctx { | ||
34 | /** Offset of the buffer in the VRAM section for the screen */ | ||
35 | u32 buffer_offset; | ||
36 | /** Length of the buffer in bytes */ | ||
37 | u32 buffer_length; | ||
38 | /** Set if we wrote to the buffer faster than the host could read it */ | ||
39 | bool buffer_overflow; | ||
40 | /** VBVA record that we are currently preparing for the host, or NULL */ | ||
41 | struct vbva_record *record; | ||
42 | /** | ||
43 | * Pointer to the VBVA buffer mapped into the current address space. | ||
44 | * Will be NULL if VBVA is not enabled. | ||
45 | */ | ||
46 | struct vbva_buffer *vbva; | ||
47 | }; | ||
48 | |||
49 | /** | ||
50 | * @name Base HGSMI APIs | ||
51 | * @{ | ||
52 | */ | ||
53 | int hgsmi_report_flags_location(struct gen_pool *ctx, u32 location); | ||
54 | int hgsmi_send_caps_info(struct gen_pool *ctx, u32 caps); | ||
55 | int hgsmi_test_query_conf(struct gen_pool *ctx); | ||
56 | int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret); | ||
57 | int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags, | ||
58 | u32 hot_x, u32 hot_y, u32 width, u32 height, | ||
59 | u8 *pixels, u32 len); | ||
60 | int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position, | ||
61 | u32 x, u32 y, u32 *x_host, u32 *y_host); | ||
62 | /** @} */ | ||
63 | |||
64 | /** | ||
65 | * @name VBVA APIs | ||
66 | * @{ | ||
67 | */ | ||
68 | bool vbva_enable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx, | ||
69 | struct vbva_buffer *vbva, s32 screen); | ||
70 | void vbva_disable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx, | ||
71 | s32 screen); | ||
72 | bool vbva_buffer_begin_update(struct vbva_buf_ctx *vbva_ctx, | ||
73 | struct gen_pool *ctx); | ||
74 | void vbva_buffer_end_update(struct vbva_buf_ctx *vbva_ctx); | ||
75 | bool vbva_write(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx, | ||
76 | const void *p, u32 len); | ||
77 | void vbva_setup_buffer_context(struct vbva_buf_ctx *vbva_ctx, | ||
78 | u32 buffer_offset, u32 buffer_length); | ||
79 | /** @} */ | ||
80 | |||
81 | /** | ||
82 | * @name Modesetting APIs | ||
83 | * @{ | ||
84 | */ | ||
85 | void hgsmi_process_display_info(struct gen_pool *ctx, u32 display, | ||
86 | s32 origin_x, s32 origin_y, u32 start_offset, | ||
87 | u32 pitch, u32 width, u32 height, | ||
88 | u16 bpp, u16 flags); | ||
89 | int hgsmi_update_input_mapping(struct gen_pool *ctx, s32 origin_x, s32 origin_y, | ||
90 | u32 width, u32 height); | ||
91 | int hgsmi_get_mode_hints(struct gen_pool *ctx, unsigned int screens, | ||
92 | struct vbva_modehint *hints); | ||
93 | /** @} */ | ||
94 | |||
95 | #endif | ||
diff --git a/drivers/staging/vboxvideo/vboxvideo_vbe.h b/drivers/staging/vboxvideo/vboxvideo_vbe.h new file mode 100644 index 000000000000..f842f4d9c80a --- /dev/null +++ b/drivers/staging/vboxvideo/vboxvideo_vbe.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __VBOXVIDEO_VBE_H__ | ||
24 | #define __VBOXVIDEO_VBE_H__ | ||
25 | |||
26 | /* GUEST <-> HOST Communication API */ | ||
27 | |||
28 | /** | ||
29 | * @todo FIXME: Either dynamicly ask host for this or put somewhere high in | ||
30 | * physical memory like 0xE0000000. | ||
31 | */ | ||
32 | |||
33 | #define VBE_DISPI_BANK_ADDRESS 0xA0000 | ||
34 | #define VBE_DISPI_BANK_SIZE_KB 64 | ||
35 | |||
36 | #define VBE_DISPI_MAX_XRES 16384 | ||
37 | #define VBE_DISPI_MAX_YRES 16384 | ||
38 | #define VBE_DISPI_MAX_BPP 32 | ||
39 | |||
40 | #define VBE_DISPI_IOPORT_INDEX 0x01CE | ||
41 | #define VBE_DISPI_IOPORT_DATA 0x01CF | ||
42 | |||
43 | #define VBE_DISPI_IOPORT_DAC_WRITE_INDEX 0x03C8 | ||
44 | #define VBE_DISPI_IOPORT_DAC_DATA 0x03C9 | ||
45 | |||
46 | #define VBE_DISPI_INDEX_ID 0x0 | ||
47 | #define VBE_DISPI_INDEX_XRES 0x1 | ||
48 | #define VBE_DISPI_INDEX_YRES 0x2 | ||
49 | #define VBE_DISPI_INDEX_BPP 0x3 | ||
50 | #define VBE_DISPI_INDEX_ENABLE 0x4 | ||
51 | #define VBE_DISPI_INDEX_BANK 0x5 | ||
52 | #define VBE_DISPI_INDEX_VIRT_WIDTH 0x6 | ||
53 | #define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7 | ||
54 | #define VBE_DISPI_INDEX_X_OFFSET 0x8 | ||
55 | #define VBE_DISPI_INDEX_Y_OFFSET 0x9 | ||
56 | #define VBE_DISPI_INDEX_VBOX_VIDEO 0xa | ||
57 | #define VBE_DISPI_INDEX_FB_BASE_HI 0xb | ||
58 | |||
59 | #define VBE_DISPI_ID0 0xB0C0 | ||
60 | #define VBE_DISPI_ID1 0xB0C1 | ||
61 | #define VBE_DISPI_ID2 0xB0C2 | ||
62 | #define VBE_DISPI_ID3 0xB0C3 | ||
63 | #define VBE_DISPI_ID4 0xB0C4 | ||
64 | |||
65 | #define VBE_DISPI_ID_VBOX_VIDEO 0xBE00 | ||
66 | /* The VBOX interface id. Indicates support for VBVA shared memory interface. */ | ||
67 | #define VBE_DISPI_ID_HGSMI 0xBE01 | ||
68 | #define VBE_DISPI_ID_ANYX 0xBE02 | ||
69 | |||
70 | #define VBE_DISPI_DISABLED 0x00 | ||
71 | #define VBE_DISPI_ENABLED 0x01 | ||
72 | #define VBE_DISPI_GETCAPS 0x02 | ||
73 | #define VBE_DISPI_8BIT_DAC 0x20 | ||
74 | /** | ||
75 | * @note this definition is a BOCHS legacy, used only in the video BIOS | ||
76 | * code and ignored by the emulated hardware. | ||
77 | */ | ||
78 | #define VBE_DISPI_LFB_ENABLED 0x40 | ||
79 | #define VBE_DISPI_NOCLEARMEM 0x80 | ||
80 | |||
81 | #define VGA_PORT_HGSMI_HOST 0x3b0 | ||
82 | #define VGA_PORT_HGSMI_GUEST 0x3d0 | ||
83 | |||
84 | #endif | ||
diff --git a/drivers/staging/vboxvideo/vbva_base.c b/drivers/staging/vboxvideo/vbva_base.c new file mode 100644 index 000000000000..c10c782f94e1 --- /dev/null +++ b/drivers/staging/vboxvideo/vbva_base.c | |||
@@ -0,0 +1,233 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006-2017 Oracle Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #include "vbox_drv.h" | ||
24 | #include "vbox_err.h" | ||
25 | #include "vboxvideo_guest.h" | ||
26 | #include "hgsmi_channels.h" | ||
27 | |||
28 | /* | ||
29 | * There is a hardware ring buffer in the graphics device video RAM, formerly | ||
30 | * in the VBox VMMDev PCI memory space. | ||
31 | * All graphics commands go there serialized by vbva_buffer_begin_update. | ||
32 | * and vbva_buffer_end_update. | ||
33 | * | ||
34 | * free_offset is writing position. data_offset is reading position. | ||
35 | * free_offset == data_offset means buffer is empty. | ||
36 | * There must be always gap between data_offset and free_offset when data | ||
37 | * are in the buffer. | ||
38 | * Guest only changes free_offset, host changes data_offset. | ||
39 | */ | ||
40 | |||
41 | static u32 vbva_buffer_available(const struct vbva_buffer *vbva) | ||
42 | { | ||
43 | s32 diff = vbva->data_offset - vbva->free_offset; | ||
44 | |||
45 | return diff > 0 ? diff : vbva->data_len + diff; | ||
46 | } | ||
47 | |||
48 | static void vbva_buffer_place_data_at(struct vbva_buf_ctx *vbva_ctx, | ||
49 | const void *p, u32 len, u32 offset) | ||
50 | { | ||
51 | struct vbva_buffer *vbva = vbva_ctx->vbva; | ||
52 | u32 bytes_till_boundary = vbva->data_len - offset; | ||
53 | u8 *dst = &vbva->data[offset]; | ||
54 | s32 diff = len - bytes_till_boundary; | ||
55 | |||
56 | if (diff <= 0) { | ||
57 | /* Chunk will not cross buffer boundary. */ | ||
58 | memcpy(dst, p, len); | ||
59 | } else { | ||
60 | /* Chunk crosses buffer boundary. */ | ||
61 | memcpy(dst, p, bytes_till_boundary); | ||
62 | memcpy(&vbva->data[0], (u8 *)p + bytes_till_boundary, diff); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | static void vbva_buffer_flush(struct gen_pool *ctx) | ||
67 | { | ||
68 | struct vbva_flush *p; | ||
69 | |||
70 | p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA, VBVA_FLUSH); | ||
71 | if (!p) | ||
72 | return; | ||
73 | |||
74 | p->reserved = 0; | ||
75 | |||
76 | hgsmi_buffer_submit(ctx, p); | ||
77 | hgsmi_buffer_free(ctx, p); | ||
78 | } | ||
79 | |||
80 | bool vbva_write(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx, | ||
81 | const void *p, u32 len) | ||
82 | { | ||
83 | struct vbva_record *record; | ||
84 | struct vbva_buffer *vbva; | ||
85 | u32 available; | ||
86 | |||
87 | vbva = vbva_ctx->vbva; | ||
88 | record = vbva_ctx->record; | ||
89 | |||
90 | if (!vbva || vbva_ctx->buffer_overflow || | ||
91 | !record || !(record->len_and_flags & VBVA_F_RECORD_PARTIAL)) | ||
92 | return false; | ||
93 | |||
94 | available = vbva_buffer_available(vbva); | ||
95 | |||
96 | while (len > 0) { | ||
97 | u32 chunk = len; | ||
98 | |||
99 | if (chunk >= available) { | ||
100 | vbva_buffer_flush(ctx); | ||
101 | available = vbva_buffer_available(vbva); | ||
102 | } | ||
103 | |||
104 | if (chunk >= available) { | ||
105 | if (WARN_ON(available <= vbva->partial_write_tresh)) { | ||
106 | vbva_ctx->buffer_overflow = true; | ||
107 | return false; | ||
108 | } | ||
109 | chunk = available - vbva->partial_write_tresh; | ||
110 | } | ||
111 | |||
112 | vbva_buffer_place_data_at(vbva_ctx, p, chunk, | ||
113 | vbva->free_offset); | ||
114 | |||
115 | vbva->free_offset = (vbva->free_offset + chunk) % | ||
116 | vbva->data_len; | ||
117 | record->len_and_flags += chunk; | ||
118 | available -= chunk; | ||
119 | len -= chunk; | ||
120 | p += chunk; | ||
121 | } | ||
122 | |||
123 | return true; | ||
124 | } | ||
125 | |||
126 | static bool vbva_inform_host(struct vbva_buf_ctx *vbva_ctx, | ||
127 | struct gen_pool *ctx, s32 screen, bool enable) | ||
128 | { | ||
129 | struct vbva_enable_ex *p; | ||
130 | bool ret; | ||
131 | |||
132 | p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA, VBVA_ENABLE); | ||
133 | if (!p) | ||
134 | return false; | ||
135 | |||
136 | p->base.flags = enable ? VBVA_F_ENABLE : VBVA_F_DISABLE; | ||
137 | p->base.offset = vbva_ctx->buffer_offset; | ||
138 | p->base.result = VERR_NOT_SUPPORTED; | ||
139 | if (screen >= 0) { | ||
140 | p->base.flags |= VBVA_F_EXTENDED | VBVA_F_ABSOFFSET; | ||
141 | p->screen_id = screen; | ||
142 | } | ||
143 | |||
144 | hgsmi_buffer_submit(ctx, p); | ||
145 | |||
146 | if (enable) | ||
147 | ret = RT_SUCCESS(p->base.result); | ||
148 | else | ||
149 | ret = true; | ||
150 | |||
151 | hgsmi_buffer_free(ctx, p); | ||
152 | |||
153 | return ret; | ||
154 | } | ||
155 | |||
156 | bool vbva_enable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx, | ||
157 | struct vbva_buffer *vbva, s32 screen) | ||
158 | { | ||
159 | bool ret = false; | ||
160 | |||
161 | memset(vbva, 0, sizeof(*vbva)); | ||
162 | vbva->partial_write_tresh = 256; | ||
163 | vbva->data_len = vbva_ctx->buffer_length - sizeof(struct vbva_buffer); | ||
164 | vbva_ctx->vbva = vbva; | ||
165 | |||
166 | ret = vbva_inform_host(vbva_ctx, ctx, screen, true); | ||
167 | if (!ret) | ||
168 | vbva_disable(vbva_ctx, ctx, screen); | ||
169 | |||
170 | return ret; | ||
171 | } | ||
172 | |||
173 | void vbva_disable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx, | ||
174 | s32 screen) | ||
175 | { | ||
176 | vbva_ctx->buffer_overflow = false; | ||
177 | vbva_ctx->record = NULL; | ||
178 | vbva_ctx->vbva = NULL; | ||
179 | |||
180 | vbva_inform_host(vbva_ctx, ctx, screen, false); | ||
181 | } | ||
182 | |||
183 | bool vbva_buffer_begin_update(struct vbva_buf_ctx *vbva_ctx, | ||
184 | struct gen_pool *ctx) | ||
185 | { | ||
186 | struct vbva_record *record; | ||
187 | u32 next; | ||
188 | |||
189 | if (!vbva_ctx->vbva || | ||
190 | !(vbva_ctx->vbva->host_flags.host_events & VBVA_F_MODE_ENABLED)) | ||
191 | return false; | ||
192 | |||
193 | WARN_ON(vbva_ctx->buffer_overflow || vbva_ctx->record); | ||
194 | |||
195 | next = (vbva_ctx->vbva->record_free_index + 1) % VBVA_MAX_RECORDS; | ||
196 | |||
197 | /* Flush if all slots in the records queue are used */ | ||
198 | if (next == vbva_ctx->vbva->record_first_index) | ||
199 | vbva_buffer_flush(ctx); | ||
200 | |||
201 | /* If even after flush there is no place then fail the request */ | ||
202 | if (next == vbva_ctx->vbva->record_first_index) | ||
203 | return false; | ||
204 | |||
205 | record = &vbva_ctx->vbva->records[vbva_ctx->vbva->record_free_index]; | ||
206 | record->len_and_flags = VBVA_F_RECORD_PARTIAL; | ||
207 | vbva_ctx->vbva->record_free_index = next; | ||
208 | /* Remember which record we are using. */ | ||
209 | vbva_ctx->record = record; | ||
210 | |||
211 | return true; | ||
212 | } | ||
213 | |||
214 | void vbva_buffer_end_update(struct vbva_buf_ctx *vbva_ctx) | ||
215 | { | ||
216 | struct vbva_record *record = vbva_ctx->record; | ||
217 | |||
218 | WARN_ON(!vbva_ctx->vbva || !record || | ||
219 | !(record->len_and_flags & VBVA_F_RECORD_PARTIAL)); | ||
220 | |||
221 | /* Mark the record completed. */ | ||
222 | record->len_and_flags &= ~VBVA_F_RECORD_PARTIAL; | ||
223 | |||
224 | vbva_ctx->buffer_overflow = false; | ||
225 | vbva_ctx->record = NULL; | ||
226 | } | ||
227 | |||
228 | void vbva_setup_buffer_context(struct vbva_buf_ctx *vbva_ctx, | ||
229 | u32 buffer_offset, u32 buffer_length) | ||
230 | { | ||
231 | vbva_ctx->buffer_offset = buffer_offset; | ||
232 | vbva_ctx->buffer_length = buffer_length; | ||
233 | } | ||
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 030bec855d86..314ffac50bb8 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | |||
@@ -3391,7 +3391,6 @@ static int vchiq_probe(struct platform_device *pdev) | |||
3391 | struct device_node *fw_node; | 3391 | struct device_node *fw_node; |
3392 | struct rpi_firmware *fw; | 3392 | struct rpi_firmware *fw; |
3393 | int err; | 3393 | int err; |
3394 | void *ptr_err; | ||
3395 | 3394 | ||
3396 | fw_node = of_parse_phandle(pdev->dev.of_node, "firmware", 0); | 3395 | fw_node = of_parse_phandle(pdev->dev.of_node, "firmware", 0); |
3397 | if (!fw_node) { | 3396 | if (!fw_node) { |
@@ -3427,14 +3426,14 @@ static int vchiq_probe(struct platform_device *pdev) | |||
3427 | 3426 | ||
3428 | /* create sysfs entries */ | 3427 | /* create sysfs entries */ |
3429 | vchiq_class = class_create(THIS_MODULE, DEVICE_NAME); | 3428 | vchiq_class = class_create(THIS_MODULE, DEVICE_NAME); |
3430 | ptr_err = vchiq_class; | 3429 | err = PTR_ERR(vchiq_class); |
3431 | if (IS_ERR(ptr_err)) | 3430 | if (IS_ERR(vchiq_class)) |
3432 | goto failed_class_create; | 3431 | goto failed_class_create; |
3433 | 3432 | ||
3434 | vchiq_dev = device_create(vchiq_class, NULL, | 3433 | vchiq_dev = device_create(vchiq_class, NULL, |
3435 | vchiq_devid, NULL, "vchiq"); | 3434 | vchiq_devid, NULL, "vchiq"); |
3436 | ptr_err = vchiq_dev; | 3435 | err = PTR_ERR(vchiq_dev); |
3437 | if (IS_ERR(ptr_err)) | 3436 | if (IS_ERR(vchiq_dev)) |
3438 | goto failed_device_create; | 3437 | goto failed_device_create; |
3439 | 3438 | ||
3440 | /* create debugfs entries */ | 3439 | /* create debugfs entries */ |
@@ -3455,7 +3454,6 @@ failed_device_create: | |||
3455 | class_destroy(vchiq_class); | 3454 | class_destroy(vchiq_class); |
3456 | failed_class_create: | 3455 | failed_class_create: |
3457 | cdev_del(&vchiq_cdev); | 3456 | cdev_del(&vchiq_cdev); |
3458 | err = PTR_ERR(ptr_err); | ||
3459 | failed_cdev_add: | 3457 | failed_cdev_add: |
3460 | unregister_chrdev_region(vchiq_devid, 1); | 3458 | unregister_chrdev_region(vchiq_devid, 1); |
3461 | failed_platform_init: | 3459 | failed_platform_init: |
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index ab3e8f410444..40219a706309 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c | |||
@@ -281,9 +281,11 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id, | |||
281 | if (active) { | 281 | if (active) { |
282 | config.name = "nvm_active"; | 282 | config.name = "nvm_active"; |
283 | config.reg_read = tb_switch_nvm_read; | 283 | config.reg_read = tb_switch_nvm_read; |
284 | config.read_only = true; | ||
284 | } else { | 285 | } else { |
285 | config.name = "nvm_non_active"; | 286 | config.name = "nvm_non_active"; |
286 | config.reg_write = tb_switch_nvm_write; | 287 | config.reg_write = tb_switch_nvm_write; |
288 | config.root_only = true; | ||
287 | } | 289 | } |
288 | 290 | ||
289 | config.id = id; | 291 | config.id = id; |
@@ -292,7 +294,6 @@ static struct nvmem_device *register_nvmem(struct tb_switch *sw, int id, | |||
292 | config.size = size; | 294 | config.size = size; |
293 | config.dev = &sw->dev; | 295 | config.dev = &sw->dev; |
294 | config.owner = THIS_MODULE; | 296 | config.owner = THIS_MODULE; |
295 | config.root_only = true; | ||
296 | config.priv = sw; | 297 | config.priv = sw; |
297 | 298 | ||
298 | return nvmem_register(&config); | 299 | return nvmem_register(&config); |
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index d1399aac05a1..284749fb0f6b 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -448,48 +448,6 @@ err: | |||
448 | return retval; | 448 | return retval; |
449 | } | 449 | } |
450 | 450 | ||
451 | /** | ||
452 | * pty_open_peer - open the peer of a pty | ||
453 | * @tty: the peer of the pty being opened | ||
454 | * | ||
455 | * Open the cached dentry in tty->link, providing a safe way for userspace | ||
456 | * to get the slave end of a pty (where they have the master fd and cannot | ||
457 | * access or trust the mount namespace /dev/pts was mounted inside). | ||
458 | */ | ||
459 | static struct file *pty_open_peer(struct tty_struct *tty, int flags) | ||
460 | { | ||
461 | if (tty->driver->subtype != PTY_TYPE_MASTER) | ||
462 | return ERR_PTR(-EIO); | ||
463 | return dentry_open(tty->link->driver_data, flags, current_cred()); | ||
464 | } | ||
465 | |||
466 | static int pty_get_peer(struct tty_struct *tty, int flags) | ||
467 | { | ||
468 | int fd = -1; | ||
469 | struct file *filp = NULL; | ||
470 | int retval = -EINVAL; | ||
471 | |||
472 | fd = get_unused_fd_flags(0); | ||
473 | if (fd < 0) { | ||
474 | retval = fd; | ||
475 | goto err; | ||
476 | } | ||
477 | |||
478 | filp = pty_open_peer(tty, flags); | ||
479 | if (IS_ERR(filp)) { | ||
480 | retval = PTR_ERR(filp); | ||
481 | goto err_put; | ||
482 | } | ||
483 | |||
484 | fd_install(fd, filp); | ||
485 | return fd; | ||
486 | |||
487 | err_put: | ||
488 | put_unused_fd(fd); | ||
489 | err: | ||
490 | return retval; | ||
491 | } | ||
492 | |||
493 | static void pty_cleanup(struct tty_struct *tty) | 451 | static void pty_cleanup(struct tty_struct *tty) |
494 | { | 452 | { |
495 | tty_port_put(tty->port); | 453 | tty_port_put(tty->port); |
@@ -646,9 +604,50 @@ static inline void legacy_pty_init(void) { } | |||
646 | 604 | ||
647 | /* Unix98 devices */ | 605 | /* Unix98 devices */ |
648 | #ifdef CONFIG_UNIX98_PTYS | 606 | #ifdef CONFIG_UNIX98_PTYS |
649 | |||
650 | static struct cdev ptmx_cdev; | 607 | static struct cdev ptmx_cdev; |
651 | 608 | ||
609 | /** | ||
610 | * pty_open_peer - open the peer of a pty | ||
611 | * @tty: the peer of the pty being opened | ||
612 | * | ||
613 | * Open the cached dentry in tty->link, providing a safe way for userspace | ||
614 | * to get the slave end of a pty (where they have the master fd and cannot | ||
615 | * access or trust the mount namespace /dev/pts was mounted inside). | ||
616 | */ | ||
617 | static struct file *pty_open_peer(struct tty_struct *tty, int flags) | ||
618 | { | ||
619 | if (tty->driver->subtype != PTY_TYPE_MASTER) | ||
620 | return ERR_PTR(-EIO); | ||
621 | return dentry_open(tty->link->driver_data, flags, current_cred()); | ||
622 | } | ||
623 | |||
624 | static int pty_get_peer(struct tty_struct *tty, int flags) | ||
625 | { | ||
626 | int fd = -1; | ||
627 | struct file *filp = NULL; | ||
628 | int retval = -EINVAL; | ||
629 | |||
630 | fd = get_unused_fd_flags(0); | ||
631 | if (fd < 0) { | ||
632 | retval = fd; | ||
633 | goto err; | ||
634 | } | ||
635 | |||
636 | filp = pty_open_peer(tty, flags); | ||
637 | if (IS_ERR(filp)) { | ||
638 | retval = PTR_ERR(filp); | ||
639 | goto err_put; | ||
640 | } | ||
641 | |||
642 | fd_install(fd, filp); | ||
643 | return fd; | ||
644 | |||
645 | err_put: | ||
646 | put_unused_fd(fd); | ||
647 | err: | ||
648 | return retval; | ||
649 | } | ||
650 | |||
652 | static int pty_unix98_ioctl(struct tty_struct *tty, | 651 | static int pty_unix98_ioctl(struct tty_struct *tty, |
653 | unsigned int cmd, unsigned long arg) | 652 | unsigned int cmd, unsigned long arg) |
654 | { | 653 | { |
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 343de8c384b0..898dcb091a27 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c | |||
@@ -619,6 +619,12 @@ static unsigned int lpuart32_tx_empty(struct uart_port *port) | |||
619 | TIOCSER_TEMT : 0; | 619 | TIOCSER_TEMT : 0; |
620 | } | 620 | } |
621 | 621 | ||
622 | static bool lpuart_is_32(struct lpuart_port *sport) | ||
623 | { | ||
624 | return sport->port.iotype == UPIO_MEM32 || | ||
625 | sport->port.iotype == UPIO_MEM32BE; | ||
626 | } | ||
627 | |||
622 | static irqreturn_t lpuart_txint(int irq, void *dev_id) | 628 | static irqreturn_t lpuart_txint(int irq, void *dev_id) |
623 | { | 629 | { |
624 | struct lpuart_port *sport = dev_id; | 630 | struct lpuart_port *sport = dev_id; |
@@ -627,7 +633,7 @@ static irqreturn_t lpuart_txint(int irq, void *dev_id) | |||
627 | 633 | ||
628 | spin_lock_irqsave(&sport->port.lock, flags); | 634 | spin_lock_irqsave(&sport->port.lock, flags); |
629 | if (sport->port.x_char) { | 635 | if (sport->port.x_char) { |
630 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) | 636 | if (lpuart_is_32(sport)) |
631 | lpuart32_write(&sport->port, sport->port.x_char, UARTDATA); | 637 | lpuart32_write(&sport->port, sport->port.x_char, UARTDATA); |
632 | else | 638 | else |
633 | writeb(sport->port.x_char, sport->port.membase + UARTDR); | 639 | writeb(sport->port.x_char, sport->port.membase + UARTDR); |
@@ -635,14 +641,14 @@ static irqreturn_t lpuart_txint(int irq, void *dev_id) | |||
635 | } | 641 | } |
636 | 642 | ||
637 | if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { | 643 | if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { |
638 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) | 644 | if (lpuart_is_32(sport)) |
639 | lpuart32_stop_tx(&sport->port); | 645 | lpuart32_stop_tx(&sport->port); |
640 | else | 646 | else |
641 | lpuart_stop_tx(&sport->port); | 647 | lpuart_stop_tx(&sport->port); |
642 | goto out; | 648 | goto out; |
643 | } | 649 | } |
644 | 650 | ||
645 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) | 651 | if (lpuart_is_32(sport)) |
646 | lpuart32_transmit_buffer(sport); | 652 | lpuart32_transmit_buffer(sport); |
647 | else | 653 | else |
648 | lpuart_transmit_buffer(sport); | 654 | lpuart_transmit_buffer(sport); |
@@ -1978,12 +1984,12 @@ static int __init lpuart_console_setup(struct console *co, char *options) | |||
1978 | if (options) | 1984 | if (options) |
1979 | uart_parse_options(options, &baud, &parity, &bits, &flow); | 1985 | uart_parse_options(options, &baud, &parity, &bits, &flow); |
1980 | else | 1986 | else |
1981 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) | 1987 | if (lpuart_is_32(sport)) |
1982 | lpuart32_console_get_options(sport, &baud, &parity, &bits); | 1988 | lpuart32_console_get_options(sport, &baud, &parity, &bits); |
1983 | else | 1989 | else |
1984 | lpuart_console_get_options(sport, &baud, &parity, &bits); | 1990 | lpuart_console_get_options(sport, &baud, &parity, &bits); |
1985 | 1991 | ||
1986 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) | 1992 | if (lpuart_is_32(sport)) |
1987 | lpuart32_setup_watermark(sport); | 1993 | lpuart32_setup_watermark(sport); |
1988 | else | 1994 | else |
1989 | lpuart_setup_watermark(sport); | 1995 | lpuart_setup_watermark(sport); |
@@ -2118,7 +2124,7 @@ static int lpuart_probe(struct platform_device *pdev) | |||
2118 | } | 2124 | } |
2119 | sport->port.irq = ret; | 2125 | sport->port.irq = ret; |
2120 | sport->port.iotype = sdata->iotype; | 2126 | sport->port.iotype = sdata->iotype; |
2121 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) | 2127 | if (lpuart_is_32(sport)) |
2122 | sport->port.ops = &lpuart32_pops; | 2128 | sport->port.ops = &lpuart32_pops; |
2123 | else | 2129 | else |
2124 | sport->port.ops = &lpuart_pops; | 2130 | sport->port.ops = &lpuart_pops; |
@@ -2145,7 +2151,7 @@ static int lpuart_probe(struct platform_device *pdev) | |||
2145 | 2151 | ||
2146 | platform_set_drvdata(pdev, &sport->port); | 2152 | platform_set_drvdata(pdev, &sport->port); |
2147 | 2153 | ||
2148 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) | 2154 | if (lpuart_is_32(sport)) |
2149 | lpuart_reg.cons = LPUART32_CONSOLE; | 2155 | lpuart_reg.cons = LPUART32_CONSOLE; |
2150 | else | 2156 | else |
2151 | lpuart_reg.cons = LPUART_CONSOLE; | 2157 | lpuart_reg.cons = LPUART_CONSOLE; |
@@ -2198,7 +2204,7 @@ static int lpuart_suspend(struct device *dev) | |||
2198 | struct lpuart_port *sport = dev_get_drvdata(dev); | 2204 | struct lpuart_port *sport = dev_get_drvdata(dev); |
2199 | unsigned long temp; | 2205 | unsigned long temp; |
2200 | 2206 | ||
2201 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) { | 2207 | if (lpuart_is_32(sport)) { |
2202 | /* disable Rx/Tx and interrupts */ | 2208 | /* disable Rx/Tx and interrupts */ |
2203 | temp = lpuart32_read(&sport->port, UARTCTRL); | 2209 | temp = lpuart32_read(&sport->port, UARTCTRL); |
2204 | temp &= ~(UARTCTRL_TE | UARTCTRL_TIE | UARTCTRL_TCIE); | 2210 | temp &= ~(UARTCTRL_TE | UARTCTRL_TIE | UARTCTRL_TCIE); |
@@ -2249,7 +2255,7 @@ static int lpuart_resume(struct device *dev) | |||
2249 | if (sport->port.suspended && !sport->port.irq_wake) | 2255 | if (sport->port.suspended && !sport->port.irq_wake) |
2250 | clk_prepare_enable(sport->clk); | 2256 | clk_prepare_enable(sport->clk); |
2251 | 2257 | ||
2252 | if (sport->port.iotype & (UPIO_MEM32 | UPIO_MEM32BE)) { | 2258 | if (lpuart_is_32(sport)) { |
2253 | lpuart32_setup_watermark(sport); | 2259 | lpuart32_setup_watermark(sport); |
2254 | temp = lpuart32_read(&sport->port, UARTCTRL); | 2260 | temp = lpuart32_read(&sport->port, UARTCTRL); |
2255 | temp |= (UARTCTRL_RIE | UARTCTRL_TIE | UARTCTRL_RE | | 2261 | temp |= (UARTCTRL_RIE | UARTCTRL_TIE | UARTCTRL_RE | |
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 9e3162bf3bd1..80934e7bd67f 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -186,11 +186,6 @@ | |||
186 | 186 | ||
187 | #define UART_NR 8 | 187 | #define UART_NR 8 |
188 | 188 | ||
189 | /* RX DMA buffer periods */ | ||
190 | #define RX_DMA_PERIODS 4 | ||
191 | #define RX_BUF_SIZE (PAGE_SIZE) | ||
192 | |||
193 | |||
194 | /* i.MX21 type uart runs on all i.mx except i.MX1 and i.MX6q */ | 189 | /* i.MX21 type uart runs on all i.mx except i.MX1 and i.MX6q */ |
195 | enum imx_uart_type { | 190 | enum imx_uart_type { |
196 | IMX1_UART, | 191 | IMX1_UART, |
@@ -226,7 +221,6 @@ struct imx_port { | |||
226 | struct dma_chan *dma_chan_rx, *dma_chan_tx; | 221 | struct dma_chan *dma_chan_rx, *dma_chan_tx; |
227 | struct scatterlist rx_sgl, tx_sgl[2]; | 222 | struct scatterlist rx_sgl, tx_sgl[2]; |
228 | void *rx_buf; | 223 | void *rx_buf; |
229 | unsigned int rx_buf_size; | ||
230 | struct circ_buf rx_ring; | 224 | struct circ_buf rx_ring; |
231 | unsigned int rx_periods; | 225 | unsigned int rx_periods; |
232 | dma_cookie_t rx_cookie; | 226 | dma_cookie_t rx_cookie; |
@@ -464,7 +458,7 @@ static inline void imx_transmit_buffer(struct imx_port *sport) | |||
464 | } | 458 | } |
465 | } | 459 | } |
466 | 460 | ||
467 | while (!uart_circ_empty(xmit) && | 461 | while (!uart_circ_empty(xmit) && !sport->dma_is_txing && |
468 | !(readl(sport->port.membase + uts_reg(sport)) & UTS_TXFULL)) { | 462 | !(readl(sport->port.membase + uts_reg(sport)) & UTS_TXFULL)) { |
469 | /* send xmit->buf[xmit->tail] | 463 | /* send xmit->buf[xmit->tail] |
470 | * out the port here */ | 464 | * out the port here */ |
@@ -967,6 +961,8 @@ static void imx_timeout(unsigned long data) | |||
967 | } | 961 | } |
968 | } | 962 | } |
969 | 963 | ||
964 | #define RX_BUF_SIZE (PAGE_SIZE) | ||
965 | |||
970 | /* | 966 | /* |
971 | * There are two kinds of RX DMA interrupts(such as in the MX6Q): | 967 | * There are two kinds of RX DMA interrupts(such as in the MX6Q): |
972 | * [1] the RX DMA buffer is full. | 968 | * [1] the RX DMA buffer is full. |
@@ -1049,6 +1045,9 @@ static void dma_rx_callback(void *data) | |||
1049 | } | 1045 | } |
1050 | } | 1046 | } |
1051 | 1047 | ||
1048 | /* RX DMA buffer periods */ | ||
1049 | #define RX_DMA_PERIODS 4 | ||
1050 | |||
1052 | static int start_rx_dma(struct imx_port *sport) | 1051 | static int start_rx_dma(struct imx_port *sport) |
1053 | { | 1052 | { |
1054 | struct scatterlist *sgl = &sport->rx_sgl; | 1053 | struct scatterlist *sgl = &sport->rx_sgl; |
@@ -1059,8 +1058,9 @@ static int start_rx_dma(struct imx_port *sport) | |||
1059 | 1058 | ||
1060 | sport->rx_ring.head = 0; | 1059 | sport->rx_ring.head = 0; |
1061 | sport->rx_ring.tail = 0; | 1060 | sport->rx_ring.tail = 0; |
1061 | sport->rx_periods = RX_DMA_PERIODS; | ||
1062 | 1062 | ||
1063 | sg_init_one(sgl, sport->rx_buf, sport->rx_buf_size); | 1063 | sg_init_one(sgl, sport->rx_buf, RX_BUF_SIZE); |
1064 | ret = dma_map_sg(dev, sgl, 1, DMA_FROM_DEVICE); | 1064 | ret = dma_map_sg(dev, sgl, 1, DMA_FROM_DEVICE); |
1065 | if (ret == 0) { | 1065 | if (ret == 0) { |
1066 | dev_err(dev, "DMA mapping error for RX.\n"); | 1066 | dev_err(dev, "DMA mapping error for RX.\n"); |
@@ -1171,7 +1171,7 @@ static int imx_uart_dma_init(struct imx_port *sport) | |||
1171 | goto err; | 1171 | goto err; |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | sport->rx_buf = kzalloc(sport->rx_buf_size, GFP_KERNEL); | 1174 | sport->rx_buf = kzalloc(PAGE_SIZE, GFP_KERNEL); |
1175 | if (!sport->rx_buf) { | 1175 | if (!sport->rx_buf) { |
1176 | ret = -ENOMEM; | 1176 | ret = -ENOMEM; |
1177 | goto err; | 1177 | goto err; |
@@ -2036,7 +2036,6 @@ static int serial_imx_probe_dt(struct imx_port *sport, | |||
2036 | { | 2036 | { |
2037 | struct device_node *np = pdev->dev.of_node; | 2037 | struct device_node *np = pdev->dev.of_node; |
2038 | int ret; | 2038 | int ret; |
2039 | u32 dma_buf_size[2]; | ||
2040 | 2039 | ||
2041 | sport->devdata = of_device_get_match_data(&pdev->dev); | 2040 | sport->devdata = of_device_get_match_data(&pdev->dev); |
2042 | if (!sport->devdata) | 2041 | if (!sport->devdata) |
@@ -2060,14 +2059,6 @@ static int serial_imx_probe_dt(struct imx_port *sport, | |||
2060 | if (of_get_property(np, "rts-gpios", NULL)) | 2059 | if (of_get_property(np, "rts-gpios", NULL)) |
2061 | sport->have_rtsgpio = 1; | 2060 | sport->have_rtsgpio = 1; |
2062 | 2061 | ||
2063 | if (!of_property_read_u32_array(np, "fsl,dma-size", dma_buf_size, 2)) { | ||
2064 | sport->rx_buf_size = dma_buf_size[0] * dma_buf_size[1]; | ||
2065 | sport->rx_periods = dma_buf_size[1]; | ||
2066 | } else { | ||
2067 | sport->rx_buf_size = RX_BUF_SIZE; | ||
2068 | sport->rx_periods = RX_DMA_PERIODS; | ||
2069 | } | ||
2070 | |||
2071 | return 0; | 2062 | return 0; |
2072 | } | 2063 | } |
2073 | #else | 2064 | #else |
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index da5ddfc14778..e08b16b070c0 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -1085,10 +1085,12 @@ static ssize_t rx_trigger_store(struct device *dev, | |||
1085 | { | 1085 | { |
1086 | struct uart_port *port = dev_get_drvdata(dev); | 1086 | struct uart_port *port = dev_get_drvdata(dev); |
1087 | struct sci_port *sci = to_sci_port(port); | 1087 | struct sci_port *sci = to_sci_port(port); |
1088 | int ret; | ||
1088 | long r; | 1089 | long r; |
1089 | 1090 | ||
1090 | if (kstrtol(buf, 0, &r) == -EINVAL) | 1091 | ret = kstrtol(buf, 0, &r); |
1091 | return -EINVAL; | 1092 | if (ret) |
1093 | return ret; | ||
1092 | 1094 | ||
1093 | sci->rx_trigger = scif_set_rtrg(port, r); | 1095 | sci->rx_trigger = scif_set_rtrg(port, r); |
1094 | if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) | 1096 | if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) |
@@ -1116,10 +1118,12 @@ static ssize_t rx_fifo_timeout_store(struct device *dev, | |||
1116 | { | 1118 | { |
1117 | struct uart_port *port = dev_get_drvdata(dev); | 1119 | struct uart_port *port = dev_get_drvdata(dev); |
1118 | struct sci_port *sci = to_sci_port(port); | 1120 | struct sci_port *sci = to_sci_port(port); |
1121 | int ret; | ||
1119 | long r; | 1122 | long r; |
1120 | 1123 | ||
1121 | if (kstrtol(buf, 0, &r) == -EINVAL) | 1124 | ret = kstrtol(buf, 0, &r); |
1122 | return -EINVAL; | 1125 | if (ret) |
1126 | return ret; | ||
1123 | sci->rx_fifo_timeout = r; | 1127 | sci->rx_fifo_timeout = r; |
1124 | scif_set_rtrg(port, 1); | 1128 | scif_set_rtrg(port, 1); |
1125 | if (r > 0) | 1129 | if (r > 0) |
diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index f5335be344f6..6b0ca65027d0 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c | |||
@@ -758,6 +758,7 @@ static int asc_init_port(struct asc_port *ascport, | |||
758 | if (IS_ERR(ascport->pinctrl)) { | 758 | if (IS_ERR(ascport->pinctrl)) { |
759 | ret = PTR_ERR(ascport->pinctrl); | 759 | ret = PTR_ERR(ascport->pinctrl); |
760 | dev_err(&pdev->dev, "Failed to get Pinctrl: %d\n", ret); | 760 | dev_err(&pdev->dev, "Failed to get Pinctrl: %d\n", ret); |
761 | return ret; | ||
761 | } | 762 | } |
762 | 763 | ||
763 | ascport->states[DEFAULT] = | 764 | ascport->states[DEFAULT] = |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 5357d83bbda2..5e056064259c 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -1829,6 +1829,9 @@ static const struct usb_device_id acm_ids[] = { | |||
1829 | { USB_DEVICE(0x1576, 0x03b1), /* Maretron USB100 */ | 1829 | { USB_DEVICE(0x1576, 0x03b1), /* Maretron USB100 */ |
1830 | .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ | 1830 | .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ |
1831 | }, | 1831 | }, |
1832 | { USB_DEVICE(0xfff0, 0x0100), /* DATECS FP-2000 */ | ||
1833 | .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ | ||
1834 | }, | ||
1832 | 1835 | ||
1833 | { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */ | 1836 | { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */ |
1834 | .driver_info = CLEAR_HALT_CONDITIONS, | 1837 | .driver_info = CLEAR_HALT_CONDITIONS, |
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index bc3b3fda5000..c4066cd77e47 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c | |||
@@ -3573,6 +3573,9 @@ irq_retry: | |||
3573 | /* Report disconnection if it is not already done. */ | 3573 | /* Report disconnection if it is not already done. */ |
3574 | dwc2_hsotg_disconnect(hsotg); | 3574 | dwc2_hsotg_disconnect(hsotg); |
3575 | 3575 | ||
3576 | /* Reset device address to zero */ | ||
3577 | __bic32(hsotg->regs + DCFG, DCFG_DEVADDR_MASK); | ||
3578 | |||
3576 | if (usb_status & GOTGCTL_BSESVLD && connected) | 3579 | if (usb_status & GOTGCTL_BSESVLD && connected) |
3577 | dwc2_hsotg_core_init_disconnected(hsotg, true); | 3580 | dwc2_hsotg_core_init_disconnected(hsotg, true); |
3578 | } | 3581 | } |
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 326b302fc440..03474d3575ab 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -766,15 +766,15 @@ static int dwc3_core_init(struct dwc3 *dwc) | |||
766 | dwc->maximum_speed = USB_SPEED_HIGH; | 766 | dwc->maximum_speed = USB_SPEED_HIGH; |
767 | } | 767 | } |
768 | 768 | ||
769 | ret = dwc3_core_soft_reset(dwc); | 769 | ret = dwc3_core_get_phy(dwc); |
770 | if (ret) | 770 | if (ret) |
771 | goto err0; | 771 | goto err0; |
772 | 772 | ||
773 | ret = dwc3_phy_setup(dwc); | 773 | ret = dwc3_core_soft_reset(dwc); |
774 | if (ret) | 774 | if (ret) |
775 | goto err0; | 775 | goto err0; |
776 | 776 | ||
777 | ret = dwc3_core_get_phy(dwc); | 777 | ret = dwc3_phy_setup(dwc); |
778 | if (ret) | 778 | if (ret) |
779 | goto err0; | 779 | goto err0; |
780 | 780 | ||
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 98926504b55b..f5aaa0cf3873 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c | |||
@@ -512,15 +512,6 @@ static int dwc3_omap_probe(struct platform_device *pdev) | |||
512 | 512 | ||
513 | /* check the DMA Status */ | 513 | /* check the DMA Status */ |
514 | reg = dwc3_omap_readl(omap->base, USBOTGSS_SYSCONFIG); | 514 | reg = dwc3_omap_readl(omap->base, USBOTGSS_SYSCONFIG); |
515 | irq_set_status_flags(omap->irq, IRQ_NOAUTOEN); | ||
516 | ret = devm_request_threaded_irq(dev, omap->irq, dwc3_omap_interrupt, | ||
517 | dwc3_omap_interrupt_thread, IRQF_SHARED, | ||
518 | "dwc3-omap", omap); | ||
519 | if (ret) { | ||
520 | dev_err(dev, "failed to request IRQ #%d --> %d\n", | ||
521 | omap->irq, ret); | ||
522 | goto err1; | ||
523 | } | ||
524 | 515 | ||
525 | ret = dwc3_omap_extcon_register(omap); | 516 | ret = dwc3_omap_extcon_register(omap); |
526 | if (ret < 0) | 517 | if (ret < 0) |
@@ -532,8 +523,15 @@ static int dwc3_omap_probe(struct platform_device *pdev) | |||
532 | goto err1; | 523 | goto err1; |
533 | } | 524 | } |
534 | 525 | ||
526 | ret = devm_request_threaded_irq(dev, omap->irq, dwc3_omap_interrupt, | ||
527 | dwc3_omap_interrupt_thread, IRQF_SHARED, | ||
528 | "dwc3-omap", omap); | ||
529 | if (ret) { | ||
530 | dev_err(dev, "failed to request IRQ #%d --> %d\n", | ||
531 | omap->irq, ret); | ||
532 | goto err1; | ||
533 | } | ||
535 | dwc3_omap_enable_irqs(omap); | 534 | dwc3_omap_enable_irqs(omap); |
536 | enable_irq(omap->irq); | ||
537 | return 0; | 535 | return 0; |
538 | 536 | ||
539 | err1: | 537 | err1: |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 9e41605a276b..6b299c7b7656 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -191,14 +191,16 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, | |||
191 | 191 | ||
192 | req->started = false; | 192 | req->started = false; |
193 | list_del(&req->list); | 193 | list_del(&req->list); |
194 | req->trb = NULL; | ||
195 | req->remaining = 0; | 194 | req->remaining = 0; |
196 | 195 | ||
197 | if (req->request.status == -EINPROGRESS) | 196 | if (req->request.status == -EINPROGRESS) |
198 | req->request.status = status; | 197 | req->request.status = status; |
199 | 198 | ||
200 | usb_gadget_unmap_request_by_dev(dwc->sysdev, | 199 | if (req->trb) |
201 | &req->request, req->direction); | 200 | usb_gadget_unmap_request_by_dev(dwc->sysdev, |
201 | &req->request, req->direction); | ||
202 | |||
203 | req->trb = NULL; | ||
202 | 204 | ||
203 | trace_dwc3_gadget_giveback(req); | 205 | trace_dwc3_gadget_giveback(req); |
204 | 206 | ||
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index e80b9c123a9d..f95bddd6513f 100644 --- a/drivers/usb/gadget/function/f_mass_storage.c +++ b/drivers/usb/gadget/function/f_mass_storage.c | |||
@@ -2490,7 +2490,7 @@ static int fsg_main_thread(void *common_) | |||
2490 | int i; | 2490 | int i; |
2491 | 2491 | ||
2492 | down_write(&common->filesem); | 2492 | down_write(&common->filesem); |
2493 | for (i = 0; i < ARRAY_SIZE(common->luns); --i) { | 2493 | for (i = 0; i < ARRAY_SIZE(common->luns); i++) { |
2494 | struct fsg_lun *curlun = common->luns[i]; | 2494 | struct fsg_lun *curlun = common->luns[i]; |
2495 | if (!curlun || !fsg_lun_is_open(curlun)) | 2495 | if (!curlun || !fsg_lun_is_open(curlun)) |
2496 | continue; | 2496 | continue; |
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c index 8656f84e17d9..29efbedc91f9 100644 --- a/drivers/usb/gadget/function/f_uac1.c +++ b/drivers/usb/gadget/function/f_uac1.c | |||
@@ -92,9 +92,9 @@ static struct uac_input_terminal_descriptor usb_out_it_desc = { | |||
92 | .bDescriptorType = USB_DT_CS_INTERFACE, | 92 | .bDescriptorType = USB_DT_CS_INTERFACE, |
93 | .bDescriptorSubtype = UAC_INPUT_TERMINAL, | 93 | .bDescriptorSubtype = UAC_INPUT_TERMINAL, |
94 | .bTerminalID = USB_OUT_IT_ID, | 94 | .bTerminalID = USB_OUT_IT_ID, |
95 | .wTerminalType = UAC_TERMINAL_STREAMING, | 95 | .wTerminalType = cpu_to_le16(UAC_TERMINAL_STREAMING), |
96 | .bAssocTerminal = 0, | 96 | .bAssocTerminal = 0, |
97 | .wChannelConfig = 0x3, | 97 | .wChannelConfig = cpu_to_le16(0x3), |
98 | }; | 98 | }; |
99 | 99 | ||
100 | #define IO_OUT_OT_ID 2 | 100 | #define IO_OUT_OT_ID 2 |
@@ -103,7 +103,7 @@ static struct uac1_output_terminal_descriptor io_out_ot_desc = { | |||
103 | .bDescriptorType = USB_DT_CS_INTERFACE, | 103 | .bDescriptorType = USB_DT_CS_INTERFACE, |
104 | .bDescriptorSubtype = UAC_OUTPUT_TERMINAL, | 104 | .bDescriptorSubtype = UAC_OUTPUT_TERMINAL, |
105 | .bTerminalID = IO_OUT_OT_ID, | 105 | .bTerminalID = IO_OUT_OT_ID, |
106 | .wTerminalType = UAC_OUTPUT_TERMINAL_SPEAKER, | 106 | .wTerminalType = cpu_to_le16(UAC_OUTPUT_TERMINAL_SPEAKER), |
107 | .bAssocTerminal = 0, | 107 | .bAssocTerminal = 0, |
108 | .bSourceID = USB_OUT_IT_ID, | 108 | .bSourceID = USB_OUT_IT_ID, |
109 | }; | 109 | }; |
@@ -114,9 +114,9 @@ static struct uac_input_terminal_descriptor io_in_it_desc = { | |||
114 | .bDescriptorType = USB_DT_CS_INTERFACE, | 114 | .bDescriptorType = USB_DT_CS_INTERFACE, |
115 | .bDescriptorSubtype = UAC_INPUT_TERMINAL, | 115 | .bDescriptorSubtype = UAC_INPUT_TERMINAL, |
116 | .bTerminalID = IO_IN_IT_ID, | 116 | .bTerminalID = IO_IN_IT_ID, |
117 | .wTerminalType = UAC_INPUT_TERMINAL_MICROPHONE, | 117 | .wTerminalType = cpu_to_le16(UAC_INPUT_TERMINAL_MICROPHONE), |
118 | .bAssocTerminal = 0, | 118 | .bAssocTerminal = 0, |
119 | .wChannelConfig = 0x3, | 119 | .wChannelConfig = cpu_to_le16(0x3), |
120 | }; | 120 | }; |
121 | 121 | ||
122 | #define USB_IN_OT_ID 4 | 122 | #define USB_IN_OT_ID 4 |
@@ -125,7 +125,7 @@ static struct uac1_output_terminal_descriptor usb_in_ot_desc = { | |||
125 | .bDescriptorType = USB_DT_CS_INTERFACE, | 125 | .bDescriptorType = USB_DT_CS_INTERFACE, |
126 | .bDescriptorSubtype = UAC_OUTPUT_TERMINAL, | 126 | .bDescriptorSubtype = UAC_OUTPUT_TERMINAL, |
127 | .bTerminalID = USB_IN_OT_ID, | 127 | .bTerminalID = USB_IN_OT_ID, |
128 | .wTerminalType = UAC_TERMINAL_STREAMING, | 128 | .wTerminalType = cpu_to_le16(UAC_TERMINAL_STREAMING), |
129 | .bAssocTerminal = 0, | 129 | .bAssocTerminal = 0, |
130 | .bSourceID = IO_IN_IT_ID, | 130 | .bSourceID = IO_IN_IT_ID, |
131 | }; | 131 | }; |
@@ -174,7 +174,7 @@ static struct uac1_as_header_descriptor as_out_header_desc = { | |||
174 | .bDescriptorSubtype = UAC_AS_GENERAL, | 174 | .bDescriptorSubtype = UAC_AS_GENERAL, |
175 | .bTerminalLink = USB_OUT_IT_ID, | 175 | .bTerminalLink = USB_OUT_IT_ID, |
176 | .bDelay = 1, | 176 | .bDelay = 1, |
177 | .wFormatTag = UAC_FORMAT_TYPE_I_PCM, | 177 | .wFormatTag = cpu_to_le16(UAC_FORMAT_TYPE_I_PCM), |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static struct uac1_as_header_descriptor as_in_header_desc = { | 180 | static struct uac1_as_header_descriptor as_in_header_desc = { |
@@ -183,7 +183,7 @@ static struct uac1_as_header_descriptor as_in_header_desc = { | |||
183 | .bDescriptorSubtype = UAC_AS_GENERAL, | 183 | .bDescriptorSubtype = UAC_AS_GENERAL, |
184 | .bTerminalLink = USB_IN_OT_ID, | 184 | .bTerminalLink = USB_IN_OT_ID, |
185 | .bDelay = 1, | 185 | .bDelay = 1, |
186 | .wFormatTag = UAC_FORMAT_TYPE_I_PCM, | 186 | .wFormatTag = cpu_to_le16(UAC_FORMAT_TYPE_I_PCM), |
187 | }; | 187 | }; |
188 | 188 | ||
189 | DECLARE_UAC_FORMAT_TYPE_I_DISCRETE_DESC(1); | 189 | DECLARE_UAC_FORMAT_TYPE_I_DISCRETE_DESC(1); |
@@ -606,8 +606,8 @@ static int f_audio_bind(struct usb_configuration *c, struct usb_function *f) | |||
606 | if (status) | 606 | if (status) |
607 | goto fail; | 607 | goto fail; |
608 | 608 | ||
609 | audio->out_ep_maxpsize = as_out_ep_desc.wMaxPacketSize; | 609 | audio->out_ep_maxpsize = le16_to_cpu(as_out_ep_desc.wMaxPacketSize); |
610 | audio->in_ep_maxpsize = as_in_ep_desc.wMaxPacketSize; | 610 | audio->in_ep_maxpsize = le16_to_cpu(as_in_ep_desc.wMaxPacketSize); |
611 | audio->params.c_chmask = audio_opts->c_chmask; | 611 | audio->params.c_chmask = audio_opts->c_chmask; |
612 | audio->params.c_srate = audio_opts->c_srate; | 612 | audio->params.c_srate = audio_opts->c_srate; |
613 | audio->params.c_ssize = audio_opts->c_ssize; | 613 | audio->params.c_ssize = audio_opts->c_ssize; |
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c index 9082ce261e70..f05c3f3e6103 100644 --- a/drivers/usb/gadget/function/f_uac2.c +++ b/drivers/usb/gadget/function/f_uac2.c | |||
@@ -168,7 +168,7 @@ static struct uac2_input_terminal_descriptor usb_out_it_desc = { | |||
168 | .bAssocTerminal = 0, | 168 | .bAssocTerminal = 0, |
169 | .bCSourceID = USB_OUT_CLK_ID, | 169 | .bCSourceID = USB_OUT_CLK_ID, |
170 | .iChannelNames = 0, | 170 | .iChannelNames = 0, |
171 | .bmControls = (CONTROL_RDWR << COPY_CTRL), | 171 | .bmControls = cpu_to_le16(CONTROL_RDWR << COPY_CTRL), |
172 | }; | 172 | }; |
173 | 173 | ||
174 | /* Input Terminal for I/O-In */ | 174 | /* Input Terminal for I/O-In */ |
@@ -182,7 +182,7 @@ static struct uac2_input_terminal_descriptor io_in_it_desc = { | |||
182 | .bAssocTerminal = 0, | 182 | .bAssocTerminal = 0, |
183 | .bCSourceID = USB_IN_CLK_ID, | 183 | .bCSourceID = USB_IN_CLK_ID, |
184 | .iChannelNames = 0, | 184 | .iChannelNames = 0, |
185 | .bmControls = (CONTROL_RDWR << COPY_CTRL), | 185 | .bmControls = cpu_to_le16(CONTROL_RDWR << COPY_CTRL), |
186 | }; | 186 | }; |
187 | 187 | ||
188 | /* Ouput Terminal for USB_IN */ | 188 | /* Ouput Terminal for USB_IN */ |
@@ -196,7 +196,7 @@ static struct uac2_output_terminal_descriptor usb_in_ot_desc = { | |||
196 | .bAssocTerminal = 0, | 196 | .bAssocTerminal = 0, |
197 | .bSourceID = IO_IN_IT_ID, | 197 | .bSourceID = IO_IN_IT_ID, |
198 | .bCSourceID = USB_IN_CLK_ID, | 198 | .bCSourceID = USB_IN_CLK_ID, |
199 | .bmControls = (CONTROL_RDWR << COPY_CTRL), | 199 | .bmControls = cpu_to_le16(CONTROL_RDWR << COPY_CTRL), |
200 | }; | 200 | }; |
201 | 201 | ||
202 | /* Ouput Terminal for I/O-Out */ | 202 | /* Ouput Terminal for I/O-Out */ |
@@ -210,7 +210,7 @@ static struct uac2_output_terminal_descriptor io_out_ot_desc = { | |||
210 | .bAssocTerminal = 0, | 210 | .bAssocTerminal = 0, |
211 | .bSourceID = USB_OUT_IT_ID, | 211 | .bSourceID = USB_OUT_IT_ID, |
212 | .bCSourceID = USB_OUT_CLK_ID, | 212 | .bCSourceID = USB_OUT_CLK_ID, |
213 | .bmControls = (CONTROL_RDWR << COPY_CTRL), | 213 | .bmControls = cpu_to_le16(CONTROL_RDWR << COPY_CTRL), |
214 | }; | 214 | }; |
215 | 215 | ||
216 | static struct uac2_ac_header_descriptor ac_hdr_desc = { | 216 | static struct uac2_ac_header_descriptor ac_hdr_desc = { |
@@ -220,9 +220,10 @@ static struct uac2_ac_header_descriptor ac_hdr_desc = { | |||
220 | .bDescriptorSubtype = UAC_MS_HEADER, | 220 | .bDescriptorSubtype = UAC_MS_HEADER, |
221 | .bcdADC = cpu_to_le16(0x200), | 221 | .bcdADC = cpu_to_le16(0x200), |
222 | .bCategory = UAC2_FUNCTION_IO_BOX, | 222 | .bCategory = UAC2_FUNCTION_IO_BOX, |
223 | .wTotalLength = sizeof in_clk_src_desc + sizeof out_clk_src_desc | 223 | .wTotalLength = cpu_to_le16(sizeof in_clk_src_desc |
224 | + sizeof usb_out_it_desc + sizeof io_in_it_desc | 224 | + sizeof out_clk_src_desc + sizeof usb_out_it_desc |
225 | + sizeof usb_in_ot_desc + sizeof io_out_ot_desc, | 225 | + sizeof io_in_it_desc + sizeof usb_in_ot_desc |
226 | + sizeof io_out_ot_desc), | ||
226 | .bmControls = 0, | 227 | .bmControls = 0, |
227 | }; | 228 | }; |
228 | 229 | ||
@@ -569,10 +570,12 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn) | |||
569 | return ret; | 570 | return ret; |
570 | } | 571 | } |
571 | 572 | ||
572 | agdev->in_ep_maxpsize = max(fs_epin_desc.wMaxPacketSize, | 573 | agdev->in_ep_maxpsize = max_t(u16, |
573 | hs_epin_desc.wMaxPacketSize); | 574 | le16_to_cpu(fs_epin_desc.wMaxPacketSize), |
574 | agdev->out_ep_maxpsize = max(fs_epout_desc.wMaxPacketSize, | 575 | le16_to_cpu(hs_epin_desc.wMaxPacketSize)); |
575 | hs_epout_desc.wMaxPacketSize); | 576 | agdev->out_ep_maxpsize = max_t(u16, |
577 | le16_to_cpu(fs_epout_desc.wMaxPacketSize), | ||
578 | le16_to_cpu(hs_epout_desc.wMaxPacketSize)); | ||
576 | 579 | ||
577 | hs_epout_desc.bEndpointAddress = fs_epout_desc.bEndpointAddress; | 580 | hs_epout_desc.bEndpointAddress = fs_epout_desc.bEndpointAddress; |
578 | hs_epin_desc.bEndpointAddress = fs_epin_desc.bEndpointAddress; | 581 | hs_epin_desc.bEndpointAddress = fs_epin_desc.bEndpointAddress; |
diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig index 9ffb11ec9ed9..7cd5c969fcbe 100644 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig | |||
@@ -192,7 +192,7 @@ config USB_RENESAS_USBHS_UDC | |||
192 | config USB_RENESAS_USB3 | 192 | config USB_RENESAS_USB3 |
193 | tristate 'Renesas USB3.0 Peripheral controller' | 193 | tristate 'Renesas USB3.0 Peripheral controller' |
194 | depends on ARCH_RENESAS || COMPILE_TEST | 194 | depends on ARCH_RENESAS || COMPILE_TEST |
195 | depends on EXTCON | 195 | depends on EXTCON && HAS_DMA |
196 | help | 196 | help |
197 | Renesas USB3.0 Peripheral controller is a USB peripheral controller | 197 | Renesas USB3.0 Peripheral controller is a USB peripheral controller |
198 | that supports super, high, and full speed USB 3.0 data transfers. | 198 | that supports super, high, and full speed USB 3.0 data transfers. |
@@ -257,6 +257,7 @@ config USB_MV_U3D | |||
257 | 257 | ||
258 | config USB_SNP_CORE | 258 | config USB_SNP_CORE |
259 | depends on (USB_AMD5536UDC || USB_SNP_UDC_PLAT) | 259 | depends on (USB_AMD5536UDC || USB_SNP_UDC_PLAT) |
260 | depends on HAS_DMA | ||
260 | tristate | 261 | tristate |
261 | help | 262 | help |
262 | This enables core driver support for Synopsys USB 2.0 Device | 263 | This enables core driver support for Synopsys USB 2.0 Device |
@@ -271,7 +272,7 @@ config USB_SNP_CORE | |||
271 | 272 | ||
272 | config USB_SNP_UDC_PLAT | 273 | config USB_SNP_UDC_PLAT |
273 | tristate "Synopsys USB 2.0 Device controller" | 274 | tristate "Synopsys USB 2.0 Device controller" |
274 | depends on (USB_GADGET && OF) | 275 | depends on USB_GADGET && OF && HAS_DMA |
275 | select USB_GADGET_DUALSPEED | 276 | select USB_GADGET_DUALSPEED |
276 | select USB_SNP_CORE | 277 | select USB_SNP_CORE |
277 | default ARCH_BCM_IPROC | 278 | default ARCH_BCM_IPROC |
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index d8278322d5ac..62dc9c7798e7 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c | |||
@@ -89,6 +89,9 @@ | |||
89 | 89 | ||
90 | /* USB_COM_CON */ | 90 | /* USB_COM_CON */ |
91 | #define USB_COM_CON_CONF BIT(24) | 91 | #define USB_COM_CON_CONF BIT(24) |
92 | #define USB_COM_CON_PN_WDATAIF_NL BIT(23) | ||
93 | #define USB_COM_CON_PN_RDATAIF_NL BIT(22) | ||
94 | #define USB_COM_CON_PN_LSTTR_PP BIT(21) | ||
92 | #define USB_COM_CON_SPD_MODE BIT(17) | 95 | #define USB_COM_CON_SPD_MODE BIT(17) |
93 | #define USB_COM_CON_EP0_EN BIT(16) | 96 | #define USB_COM_CON_EP0_EN BIT(16) |
94 | #define USB_COM_CON_DEV_ADDR_SHIFT 8 | 97 | #define USB_COM_CON_DEV_ADDR_SHIFT 8 |
@@ -686,6 +689,9 @@ static void renesas_usb3_init_controller(struct renesas_usb3 *usb3) | |||
686 | { | 689 | { |
687 | usb3_init_axi_bridge(usb3); | 690 | usb3_init_axi_bridge(usb3); |
688 | usb3_init_epc_registers(usb3); | 691 | usb3_init_epc_registers(usb3); |
692 | usb3_set_bit(usb3, USB_COM_CON_PN_WDATAIF_NL | | ||
693 | USB_COM_CON_PN_RDATAIF_NL | USB_COM_CON_PN_LSTTR_PP, | ||
694 | USB3_USB_COM_CON); | ||
689 | usb3_write(usb3, USB_OTG_IDMON, USB3_USB_OTG_INT_STA); | 695 | usb3_write(usb3, USB_OTG_IDMON, USB3_USB_OTG_INT_STA); |
690 | usb3_write(usb3, USB_OTG_IDMON, USB3_USB_OTG_INT_ENA); | 696 | usb3_write(usb3, USB_OTG_IDMON, USB3_USB_OTG_INT_ENA); |
691 | 697 | ||
@@ -1369,7 +1375,7 @@ static int renesas_usb3_dma_free_prd(struct renesas_usb3 *usb3, | |||
1369 | 1375 | ||
1370 | usb3_for_each_dma(usb3, dma, i) { | 1376 | usb3_for_each_dma(usb3, dma, i) { |
1371 | if (dma->prd) { | 1377 | if (dma->prd) { |
1372 | dma_free_coherent(dev, USB3_DMA_MAX_XFER_SIZE, | 1378 | dma_free_coherent(dev, USB3_DMA_PRD_SIZE, |
1373 | dma->prd, dma->prd_dma); | 1379 | dma->prd, dma->prd_dma); |
1374 | dma->prd = NULL; | 1380 | dma->prd = NULL; |
1375 | } | 1381 | } |
@@ -1409,12 +1415,12 @@ static void usb3_start_pipen(struct renesas_usb3_ep *usb3_ep, | |||
1409 | int ret = -EAGAIN; | 1415 | int ret = -EAGAIN; |
1410 | u32 enable_bits = 0; | 1416 | u32 enable_bits = 0; |
1411 | 1417 | ||
1418 | spin_lock_irqsave(&usb3->lock, flags); | ||
1412 | if (usb3_ep->halt || usb3_ep->started) | 1419 | if (usb3_ep->halt || usb3_ep->started) |
1413 | return; | 1420 | goto out; |
1414 | if (usb3_req != usb3_req_first) | 1421 | if (usb3_req != usb3_req_first) |
1415 | return; | 1422 | goto out; |
1416 | 1423 | ||
1417 | spin_lock_irqsave(&usb3->lock, flags); | ||
1418 | if (usb3_pn_change(usb3, usb3_ep->num) < 0) | 1424 | if (usb3_pn_change(usb3, usb3_ep->num) < 0) |
1419 | goto out; | 1425 | goto out; |
1420 | 1426 | ||
diff --git a/drivers/usb/gadget/udc/snps_udc_plat.c b/drivers/usb/gadget/udc/snps_udc_plat.c index 2e11f19e07ae..f7b4d0f159e4 100644 --- a/drivers/usb/gadget/udc/snps_udc_plat.c +++ b/drivers/usb/gadget/udc/snps_udc_plat.c | |||
@@ -28,7 +28,7 @@ | |||
28 | /* description */ | 28 | /* description */ |
29 | #define UDC_MOD_DESCRIPTION "Synopsys UDC platform driver" | 29 | #define UDC_MOD_DESCRIPTION "Synopsys UDC platform driver" |
30 | 30 | ||
31 | void start_udc(struct udc *udc) | 31 | static void start_udc(struct udc *udc) |
32 | { | 32 | { |
33 | if (udc->driver) { | 33 | if (udc->driver) { |
34 | dev_info(udc->dev, "Connecting...\n"); | 34 | dev_info(udc->dev, "Connecting...\n"); |
@@ -38,7 +38,7 @@ void start_udc(struct udc *udc) | |||
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||
41 | void stop_udc(struct udc *udc) | 41 | static void stop_udc(struct udc *udc) |
42 | { | 42 | { |
43 | int tmp; | 43 | int tmp; |
44 | u32 reg; | 44 | u32 reg; |
@@ -76,7 +76,7 @@ void stop_udc(struct udc *udc) | |||
76 | dev_info(udc->dev, "Device disconnected\n"); | 76 | dev_info(udc->dev, "Device disconnected\n"); |
77 | } | 77 | } |
78 | 78 | ||
79 | void udc_drd_work(struct work_struct *work) | 79 | static void udc_drd_work(struct work_struct *work) |
80 | { | 80 | { |
81 | struct udc *udc; | 81 | struct udc *udc; |
82 | 82 | ||
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index a9a1e4c40480..c8989c62a262 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -77,6 +77,16 @@ | |||
77 | #define USB_INTEL_USB3_PSSEN 0xD8 | 77 | #define USB_INTEL_USB3_PSSEN 0xD8 |
78 | #define USB_INTEL_USB3PRM 0xDC | 78 | #define USB_INTEL_USB3PRM 0xDC |
79 | 79 | ||
80 | /* ASMEDIA quirk use */ | ||
81 | #define ASMT_DATA_WRITE0_REG 0xF8 | ||
82 | #define ASMT_DATA_WRITE1_REG 0xFC | ||
83 | #define ASMT_CONTROL_REG 0xE0 | ||
84 | #define ASMT_CONTROL_WRITE_BIT 0x02 | ||
85 | #define ASMT_WRITEREG_CMD 0x10423 | ||
86 | #define ASMT_FLOWCTL_ADDR 0xFA30 | ||
87 | #define ASMT_FLOWCTL_DATA 0xBA | ||
88 | #define ASMT_PSEUDO_DATA 0 | ||
89 | |||
80 | /* | 90 | /* |
81 | * amd_chipset_gen values represent AMD different chipset generations | 91 | * amd_chipset_gen values represent AMD different chipset generations |
82 | */ | 92 | */ |
@@ -412,6 +422,50 @@ void usb_amd_quirk_pll_disable(void) | |||
412 | } | 422 | } |
413 | EXPORT_SYMBOL_GPL(usb_amd_quirk_pll_disable); | 423 | EXPORT_SYMBOL_GPL(usb_amd_quirk_pll_disable); |
414 | 424 | ||
425 | static int usb_asmedia_wait_write(struct pci_dev *pdev) | ||
426 | { | ||
427 | unsigned long retry_count; | ||
428 | unsigned char value; | ||
429 | |||
430 | for (retry_count = 1000; retry_count > 0; --retry_count) { | ||
431 | |||
432 | pci_read_config_byte(pdev, ASMT_CONTROL_REG, &value); | ||
433 | |||
434 | if (value == 0xff) { | ||
435 | dev_err(&pdev->dev, "%s: check_ready ERROR", __func__); | ||
436 | return -EIO; | ||
437 | } | ||
438 | |||
439 | if ((value & ASMT_CONTROL_WRITE_BIT) == 0) | ||
440 | return 0; | ||
441 | |||
442 | usleep_range(40, 60); | ||
443 | } | ||
444 | |||
445 | dev_warn(&pdev->dev, "%s: check_write_ready timeout", __func__); | ||
446 | return -ETIMEDOUT; | ||
447 | } | ||
448 | |||
449 | void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) | ||
450 | { | ||
451 | if (usb_asmedia_wait_write(pdev) != 0) | ||
452 | return; | ||
453 | |||
454 | /* send command and address to device */ | ||
455 | pci_write_config_dword(pdev, ASMT_DATA_WRITE0_REG, ASMT_WRITEREG_CMD); | ||
456 | pci_write_config_dword(pdev, ASMT_DATA_WRITE1_REG, ASMT_FLOWCTL_ADDR); | ||
457 | pci_write_config_byte(pdev, ASMT_CONTROL_REG, ASMT_CONTROL_WRITE_BIT); | ||
458 | |||
459 | if (usb_asmedia_wait_write(pdev) != 0) | ||
460 | return; | ||
461 | |||
462 | /* send data to device */ | ||
463 | pci_write_config_dword(pdev, ASMT_DATA_WRITE0_REG, ASMT_FLOWCTL_DATA); | ||
464 | pci_write_config_dword(pdev, ASMT_DATA_WRITE1_REG, ASMT_PSEUDO_DATA); | ||
465 | pci_write_config_byte(pdev, ASMT_CONTROL_REG, ASMT_CONTROL_WRITE_BIT); | ||
466 | } | ||
467 | EXPORT_SYMBOL_GPL(usb_asmedia_modifyflowcontrol); | ||
468 | |||
415 | void usb_amd_quirk_pll_enable(void) | 469 | void usb_amd_quirk_pll_enable(void) |
416 | { | 470 | { |
417 | usb_amd_quirk_pll(0); | 471 | usb_amd_quirk_pll(0); |
diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h index 0222195bd5b0..655994480198 100644 --- a/drivers/usb/host/pci-quirks.h +++ b/drivers/usb/host/pci-quirks.h | |||
@@ -11,6 +11,7 @@ bool usb_amd_prefetch_quirk(void); | |||
11 | void usb_amd_dev_put(void); | 11 | void usb_amd_dev_put(void); |
12 | void usb_amd_quirk_pll_disable(void); | 12 | void usb_amd_quirk_pll_disable(void); |
13 | void usb_amd_quirk_pll_enable(void); | 13 | void usb_amd_quirk_pll_enable(void); |
14 | void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev); | ||
14 | void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev); | 15 | void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev); |
15 | void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); | 16 | void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); |
16 | void sb800_prefetch(struct device *dev, int on); | 17 | void sb800_prefetch(struct device *dev, int on); |
@@ -18,6 +19,7 @@ void sb800_prefetch(struct device *dev, int on); | |||
18 | struct pci_dev; | 19 | struct pci_dev; |
19 | static inline void usb_amd_quirk_pll_disable(void) {} | 20 | static inline void usb_amd_quirk_pll_disable(void) {} |
20 | static inline void usb_amd_quirk_pll_enable(void) {} | 21 | static inline void usb_amd_quirk_pll_enable(void) {} |
22 | static inline void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) {} | ||
21 | static inline void usb_amd_dev_put(void) {} | 23 | static inline void usb_amd_dev_put(void) {} |
22 | static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} | 24 | static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} |
23 | static inline void sb800_prefetch(struct device *dev, int on) {} | 25 | static inline void sb800_prefetch(struct device *dev, int on) {} |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 1adae9eab831..00721e8807ab 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -398,14 +398,21 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend) | |||
398 | spin_lock_irqsave(&xhci->lock, flags); | 398 | spin_lock_irqsave(&xhci->lock, flags); |
399 | for (i = LAST_EP_INDEX; i > 0; i--) { | 399 | for (i = LAST_EP_INDEX; i > 0; i--) { |
400 | if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue) { | 400 | if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue) { |
401 | struct xhci_ep_ctx *ep_ctx; | ||
401 | struct xhci_command *command; | 402 | struct xhci_command *command; |
403 | |||
404 | ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->out_ctx, i); | ||
405 | |||
406 | /* Check ep is running, required by AMD SNPS 3.1 xHC */ | ||
407 | if (GET_EP_CTX_STATE(ep_ctx) != EP_STATE_RUNNING) | ||
408 | continue; | ||
409 | |||
402 | command = xhci_alloc_command(xhci, false, false, | 410 | command = xhci_alloc_command(xhci, false, false, |
403 | GFP_NOWAIT); | 411 | GFP_NOWAIT); |
404 | if (!command) { | 412 | if (!command) { |
405 | spin_unlock_irqrestore(&xhci->lock, flags); | 413 | spin_unlock_irqrestore(&xhci->lock, flags); |
406 | xhci_free_command(xhci, cmd); | 414 | xhci_free_command(xhci, cmd); |
407 | return -ENOMEM; | 415 | return -ENOMEM; |
408 | |||
409 | } | 416 | } |
410 | xhci_queue_stop_endpoint(xhci, command, slot_id, i, | 417 | xhci_queue_stop_endpoint(xhci, command, slot_id, i, |
411 | suspend); | 418 | suspend); |
@@ -603,12 +610,14 @@ static int xhci_enter_test_mode(struct xhci_hcd *xhci, | |||
603 | 610 | ||
604 | /* Disable all Device Slots */ | 611 | /* Disable all Device Slots */ |
605 | xhci_dbg(xhci, "Disable all slots\n"); | 612 | xhci_dbg(xhci, "Disable all slots\n"); |
613 | spin_unlock_irqrestore(&xhci->lock, *flags); | ||
606 | for (i = 1; i <= HCS_MAX_SLOTS(xhci->hcs_params1); i++) { | 614 | for (i = 1; i <= HCS_MAX_SLOTS(xhci->hcs_params1); i++) { |
607 | retval = xhci_disable_slot(xhci, NULL, i); | 615 | retval = xhci_disable_slot(xhci, NULL, i); |
608 | if (retval) | 616 | if (retval) |
609 | xhci_err(xhci, "Failed to disable slot %d, %d. Enter test mode anyway\n", | 617 | xhci_err(xhci, "Failed to disable slot %d, %d. Enter test mode anyway\n", |
610 | i, retval); | 618 | i, retval); |
611 | } | 619 | } |
620 | spin_lock_irqsave(&xhci->lock, *flags); | ||
612 | /* Put all ports to the Disable state by clear PP */ | 621 | /* Put all ports to the Disable state by clear PP */ |
613 | xhci_dbg(xhci, "Disable all port (PP = 0)\n"); | 622 | xhci_dbg(xhci, "Disable all port (PP = 0)\n"); |
614 | /* Power off USB3 ports*/ | 623 | /* Power off USB3 ports*/ |
@@ -897,6 +906,9 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd, | |||
897 | clear_bit(wIndex, &bus_state->resuming_ports); | 906 | clear_bit(wIndex, &bus_state->resuming_ports); |
898 | 907 | ||
899 | set_bit(wIndex, &bus_state->rexit_ports); | 908 | set_bit(wIndex, &bus_state->rexit_ports); |
909 | |||
910 | xhci_test_and_clear_bit(xhci, port_array, wIndex, | ||
911 | PORT_PLC); | ||
900 | xhci_set_link_state(xhci, port_array, wIndex, | 912 | xhci_set_link_state(xhci, port_array, wIndex, |
901 | XDEV_U0); | 913 | XDEV_U0); |
902 | 914 | ||
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 53882e2babbb..5b0fa553c8bc 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -59,6 +59,8 @@ | |||
59 | #define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb | 59 | #define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb |
60 | #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc | 60 | #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc |
61 | 61 | ||
62 | #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 | ||
63 | |||
62 | static const char hcd_name[] = "xhci_hcd"; | 64 | static const char hcd_name[] = "xhci_hcd"; |
63 | 65 | ||
64 | static struct hc_driver __read_mostly xhci_pci_hc_driver; | 66 | static struct hc_driver __read_mostly xhci_pci_hc_driver; |
@@ -217,6 +219,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
217 | pdev->device == 0x1142) | 219 | pdev->device == 0x1142) |
218 | xhci->quirks |= XHCI_TRUST_TX_LENGTH; | 220 | xhci->quirks |= XHCI_TRUST_TX_LENGTH; |
219 | 221 | ||
222 | if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && | ||
223 | pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) | ||
224 | xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL; | ||
225 | |||
220 | if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) | 226 | if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241) |
221 | xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7; | 227 | xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7; |
222 | 228 | ||
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index c50c902d009e..cc368ad2b51e 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -864,13 +864,16 @@ static void xhci_kill_endpoint_urbs(struct xhci_hcd *xhci, | |||
864 | (ep->ep_state & EP_GETTING_NO_STREAMS)) { | 864 | (ep->ep_state & EP_GETTING_NO_STREAMS)) { |
865 | int stream_id; | 865 | int stream_id; |
866 | 866 | ||
867 | for (stream_id = 0; stream_id < ep->stream_info->num_streams; | 867 | for (stream_id = 1; stream_id < ep->stream_info->num_streams; |
868 | stream_id++) { | 868 | stream_id++) { |
869 | ring = ep->stream_info->stream_rings[stream_id]; | ||
870 | if (!ring) | ||
871 | continue; | ||
872 | |||
869 | xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, | 873 | xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, |
870 | "Killing URBs for slot ID %u, ep index %u, stream %u", | 874 | "Killing URBs for slot ID %u, ep index %u, stream %u", |
871 | slot_id, ep_index, stream_id + 1); | 875 | slot_id, ep_index, stream_id); |
872 | xhci_kill_ring_urbs(xhci, | 876 | xhci_kill_ring_urbs(xhci, ring); |
873 | ep->stream_info->stream_rings[stream_id]); | ||
874 | } | 877 | } |
875 | } else { | 878 | } else { |
876 | ring = ep->ring; | 879 | ring = ep->ring; |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 56f85df013db..b2ff1ff1a02f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -198,6 +198,9 @@ int xhci_reset(struct xhci_hcd *xhci) | |||
198 | if (ret) | 198 | if (ret) |
199 | return ret; | 199 | return ret; |
200 | 200 | ||
201 | if (xhci->quirks & XHCI_ASMEDIA_MODIFY_FLOWCONTROL) | ||
202 | usb_asmedia_modifyflowcontrol(to_pci_dev(xhci_to_hcd(xhci)->self.controller)); | ||
203 | |||
201 | xhci_dbg_trace(xhci, trace_xhci_dbg_init, | 204 | xhci_dbg_trace(xhci, trace_xhci_dbg_init, |
202 | "Wait for controller to be ready for doorbell rings"); | 205 | "Wait for controller to be ready for doorbell rings"); |
203 | /* | 206 | /* |
@@ -622,8 +625,10 @@ int xhci_run(struct usb_hcd *hcd) | |||
622 | if (!command) | 625 | if (!command) |
623 | return -ENOMEM; | 626 | return -ENOMEM; |
624 | 627 | ||
625 | xhci_queue_vendor_command(xhci, command, 0, 0, 0, | 628 | ret = xhci_queue_vendor_command(xhci, command, 0, 0, 0, |
626 | TRB_TYPE(TRB_NEC_GET_FW)); | 629 | TRB_TYPE(TRB_NEC_GET_FW)); |
630 | if (ret) | ||
631 | xhci_free_command(xhci, command); | ||
627 | } | 632 | } |
628 | xhci_dbg_trace(xhci, trace_xhci_dbg_init, | 633 | xhci_dbg_trace(xhci, trace_xhci_dbg_init, |
629 | "Finished xhci_run for USB2 roothub"); | 634 | "Finished xhci_run for USB2 roothub"); |
@@ -1085,6 +1090,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
1085 | if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) && !comp_timer_running) | 1090 | if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) && !comp_timer_running) |
1086 | compliance_mode_recovery_timer_init(xhci); | 1091 | compliance_mode_recovery_timer_init(xhci); |
1087 | 1092 | ||
1093 | if (xhci->quirks & XHCI_ASMEDIA_MODIFY_FLOWCONTROL) | ||
1094 | usb_asmedia_modifyflowcontrol(to_pci_dev(hcd->self.controller)); | ||
1095 | |||
1088 | /* Re-enable port polling. */ | 1096 | /* Re-enable port polling. */ |
1089 | xhci_dbg(xhci, "%s: starting port polling.\n", __func__); | 1097 | xhci_dbg(xhci, "%s: starting port polling.\n", __func__); |
1090 | set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags); | 1098 | set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags); |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 3c6da1f93c84..e3e935291ed6 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1820,6 +1820,7 @@ struct xhci_hcd { | |||
1820 | #define XHCI_BROKEN_PORT_PED (1 << 25) | 1820 | #define XHCI_BROKEN_PORT_PED (1 << 25) |
1821 | #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26) | 1821 | #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26) |
1822 | #define XHCI_U2_DISABLE_WAKE (1 << 27) | 1822 | #define XHCI_U2_DISABLE_WAKE (1 << 27) |
1823 | #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28) | ||
1823 | 1824 | ||
1824 | unsigned int num_active_eps; | 1825 | unsigned int num_active_eps; |
1825 | unsigned int limit_active_eps; | 1826 | unsigned int limit_active_eps; |
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 623c51300393..f0ce304c5aaf 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c | |||
@@ -752,8 +752,10 @@ static int usbhsc_resume(struct device *dev) | |||
752 | struct usbhs_priv *priv = dev_get_drvdata(dev); | 752 | struct usbhs_priv *priv = dev_get_drvdata(dev); |
753 | struct platform_device *pdev = usbhs_priv_to_pdev(priv); | 753 | struct platform_device *pdev = usbhs_priv_to_pdev(priv); |
754 | 754 | ||
755 | if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) | 755 | if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) { |
756 | usbhsc_power_ctrl(priv, 1); | 756 | usbhsc_power_ctrl(priv, 1); |
757 | usbhs_mod_autonomy_mode(priv); | ||
758 | } | ||
757 | 759 | ||
758 | usbhs_platform_call(priv, phy_reset, pdev); | 760 | usbhs_platform_call(priv, phy_reset, pdev); |
759 | 761 | ||
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 5bc7a6138855..93fba9033b00 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -37,6 +37,7 @@ struct usbhsg_gpriv; | |||
37 | struct usbhsg_uep { | 37 | struct usbhsg_uep { |
38 | struct usb_ep ep; | 38 | struct usb_ep ep; |
39 | struct usbhs_pipe *pipe; | 39 | struct usbhs_pipe *pipe; |
40 | spinlock_t lock; /* protect the pipe */ | ||
40 | 41 | ||
41 | char ep_name[EP_NAME_SIZE]; | 42 | char ep_name[EP_NAME_SIZE]; |
42 | 43 | ||
@@ -636,10 +637,16 @@ usbhsg_ep_enable_end: | |||
636 | static int usbhsg_ep_disable(struct usb_ep *ep) | 637 | static int usbhsg_ep_disable(struct usb_ep *ep) |
637 | { | 638 | { |
638 | struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); | 639 | struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); |
639 | struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); | 640 | struct usbhs_pipe *pipe; |
641 | unsigned long flags; | ||
642 | int ret = 0; | ||
640 | 643 | ||
641 | if (!pipe) | 644 | spin_lock_irqsave(&uep->lock, flags); |
642 | return -EINVAL; | 645 | pipe = usbhsg_uep_to_pipe(uep); |
646 | if (!pipe) { | ||
647 | ret = -EINVAL; | ||
648 | goto out; | ||
649 | } | ||
643 | 650 | ||
644 | usbhsg_pipe_disable(uep); | 651 | usbhsg_pipe_disable(uep); |
645 | usbhs_pipe_free(pipe); | 652 | usbhs_pipe_free(pipe); |
@@ -647,6 +654,9 @@ static int usbhsg_ep_disable(struct usb_ep *ep) | |||
647 | uep->pipe->mod_private = NULL; | 654 | uep->pipe->mod_private = NULL; |
648 | uep->pipe = NULL; | 655 | uep->pipe = NULL; |
649 | 656 | ||
657 | out: | ||
658 | spin_unlock_irqrestore(&uep->lock, flags); | ||
659 | |||
650 | return 0; | 660 | return 0; |
651 | } | 661 | } |
652 | 662 | ||
@@ -696,8 +706,11 @@ static int usbhsg_ep_dequeue(struct usb_ep *ep, struct usb_request *req) | |||
696 | { | 706 | { |
697 | struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); | 707 | struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); |
698 | struct usbhsg_request *ureq = usbhsg_req_to_ureq(req); | 708 | struct usbhsg_request *ureq = usbhsg_req_to_ureq(req); |
699 | struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); | 709 | struct usbhs_pipe *pipe; |
710 | unsigned long flags; | ||
700 | 711 | ||
712 | spin_lock_irqsave(&uep->lock, flags); | ||
713 | pipe = usbhsg_uep_to_pipe(uep); | ||
701 | if (pipe) | 714 | if (pipe) |
702 | usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq)); | 715 | usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq)); |
703 | 716 | ||
@@ -706,6 +719,7 @@ static int usbhsg_ep_dequeue(struct usb_ep *ep, struct usb_request *req) | |||
706 | * even if the pipe is NULL. | 719 | * even if the pipe is NULL. |
707 | */ | 720 | */ |
708 | usbhsg_queue_pop(uep, ureq, -ECONNRESET); | 721 | usbhsg_queue_pop(uep, ureq, -ECONNRESET); |
722 | spin_unlock_irqrestore(&uep->lock, flags); | ||
709 | 723 | ||
710 | return 0; | 724 | return 0; |
711 | } | 725 | } |
@@ -852,10 +866,10 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status) | |||
852 | { | 866 | { |
853 | struct usbhsg_gpriv *gpriv = usbhsg_priv_to_gpriv(priv); | 867 | struct usbhsg_gpriv *gpriv = usbhsg_priv_to_gpriv(priv); |
854 | struct usbhs_mod *mod = usbhs_mod_get_current(priv); | 868 | struct usbhs_mod *mod = usbhs_mod_get_current(priv); |
855 | struct usbhsg_uep *dcp = usbhsg_gpriv_to_dcp(gpriv); | 869 | struct usbhsg_uep *uep; |
856 | struct device *dev = usbhs_priv_to_dev(priv); | 870 | struct device *dev = usbhs_priv_to_dev(priv); |
857 | unsigned long flags; | 871 | unsigned long flags; |
858 | int ret = 0; | 872 | int ret = 0, i; |
859 | 873 | ||
860 | /******************** spin lock ********************/ | 874 | /******************** spin lock ********************/ |
861 | usbhs_lock(priv, flags); | 875 | usbhs_lock(priv, flags); |
@@ -887,7 +901,9 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status) | |||
887 | usbhs_sys_set_test_mode(priv, 0); | 901 | usbhs_sys_set_test_mode(priv, 0); |
888 | usbhs_sys_function_ctrl(priv, 0); | 902 | usbhs_sys_function_ctrl(priv, 0); |
889 | 903 | ||
890 | usbhsg_ep_disable(&dcp->ep); | 904 | /* disable all eps */ |
905 | usbhsg_for_each_uep_with_dcp(uep, gpriv, i) | ||
906 | usbhsg_ep_disable(&uep->ep); | ||
891 | 907 | ||
892 | dev_dbg(dev, "stop gadget\n"); | 908 | dev_dbg(dev, "stop gadget\n"); |
893 | 909 | ||
@@ -1069,6 +1085,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) | |||
1069 | ret = -ENOMEM; | 1085 | ret = -ENOMEM; |
1070 | goto usbhs_mod_gadget_probe_err_gpriv; | 1086 | goto usbhs_mod_gadget_probe_err_gpriv; |
1071 | } | 1087 | } |
1088 | spin_lock_init(&uep->lock); | ||
1072 | 1089 | ||
1073 | gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED); | 1090 | gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED); |
1074 | dev_info(dev, "%stransceiver found\n", | 1091 | dev_info(dev, "%stransceiver found\n", |
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index fba4005dd737..6a7720e66595 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c | |||
@@ -1529,8 +1529,11 @@ static void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us) | |||
1529 | 1529 | ||
1530 | /* Make sure driver was initialized */ | 1530 | /* Make sure driver was initialized */ |
1531 | 1531 | ||
1532 | if (us->extra == NULL) | 1532 | if (us->extra == NULL) { |
1533 | usb_stor_dbg(us, "ERROR Driver not initialized\n"); | 1533 | usb_stor_dbg(us, "ERROR Driver not initialized\n"); |
1534 | srb->result = DID_ERROR << 16; | ||
1535 | return; | ||
1536 | } | ||
1534 | 1537 | ||
1535 | scsi_set_resid(srb, 0); | 1538 | scsi_set_resid(srb, 0); |
1536 | /* scsi_bufflen might change in protocol translation to ata */ | 1539 | /* scsi_bufflen might change in protocol translation to ata */ |
diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h index 6b0d2f0918c6..8a88f45822e3 100644 --- a/drivers/usb/typec/ucsi/ucsi.h +++ b/drivers/usb/typec/ucsi/ucsi.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #define __DRIVER_USB_TYPEC_UCSI_H | 3 | #define __DRIVER_USB_TYPEC_UCSI_H |
4 | 4 | ||
5 | #include <linux/bitops.h> | 5 | #include <linux/bitops.h> |
6 | #include <linux/device.h> | ||
6 | #include <linux/types.h> | 7 | #include <linux/types.h> |
7 | 8 | ||
8 | /* -------------------------------------------------------------------------- */ | 9 | /* -------------------------------------------------------------------------- */ |
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 3612542b6044..83fc9aab34e8 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c | |||
@@ -704,7 +704,8 @@ static int omap_hdq_probe(struct platform_device *pdev) | |||
704 | 704 | ||
705 | irq = platform_get_irq(pdev, 0); | 705 | irq = platform_get_irq(pdev, 0); |
706 | if (irq < 0) { | 706 | if (irq < 0) { |
707 | ret = -ENXIO; | 707 | dev_dbg(&pdev->dev, "Failed to get IRQ: %d\n", irq); |
708 | ret = irq; | ||
708 | goto err_irq; | 709 | goto err_irq; |
709 | } | 710 | } |
710 | 711 | ||
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 95ea7e6b1d99..74471e7aa5cc 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
@@ -728,6 +728,7 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) | |||
728 | memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); | 728 | memcpy(&sl->reg_num, rn, sizeof(sl->reg_num)); |
729 | atomic_set(&sl->refcnt, 1); | 729 | atomic_set(&sl->refcnt, 1); |
730 | atomic_inc(&sl->master->refcnt); | 730 | atomic_inc(&sl->master->refcnt); |
731 | dev->slave_count++; | ||
731 | 732 | ||
732 | /* slave modules need to be loaded in a context with unlocked mutex */ | 733 | /* slave modules need to be loaded in a context with unlocked mutex */ |
733 | mutex_unlock(&dev->mutex); | 734 | mutex_unlock(&dev->mutex); |
@@ -747,11 +748,11 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) | |||
747 | 748 | ||
748 | sl->family = f; | 749 | sl->family = f; |
749 | 750 | ||
750 | |||
751 | err = __w1_attach_slave_device(sl); | 751 | err = __w1_attach_slave_device(sl); |
752 | if (err < 0) { | 752 | if (err < 0) { |
753 | dev_err(&dev->dev, "%s: Attaching %s failed.\n", __func__, | 753 | dev_err(&dev->dev, "%s: Attaching %s failed.\n", __func__, |
754 | sl->name); | 754 | sl->name); |
755 | dev->slave_count--; | ||
755 | w1_family_put(sl->family); | 756 | w1_family_put(sl->family); |
756 | atomic_dec(&sl->master->refcnt); | 757 | atomic_dec(&sl->master->refcnt); |
757 | kfree(sl); | 758 | kfree(sl); |
@@ -759,7 +760,6 @@ int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) | |||
759 | } | 760 | } |
760 | 761 | ||
761 | sl->ttl = dev->slave_ttl; | 762 | sl->ttl = dev->slave_ttl; |
762 | dev->slave_count++; | ||
763 | 763 | ||
764 | memcpy(msg.id.id, rn, sizeof(msg.id)); | 764 | memcpy(msg.id.id, rn, sizeof(msg.id)); |
765 | msg.type = W1_SLAVE_ADD; | 765 | msg.type = W1_SLAVE_ADD; |
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 50dcb68d8070..ab609255a0f3 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -780,6 +780,9 @@ static int __init balloon_init(void) | |||
780 | } | 780 | } |
781 | #endif | 781 | #endif |
782 | 782 | ||
783 | /* Init the xen-balloon driver. */ | ||
784 | xen_balloon_init(); | ||
785 | |||
783 | return 0; | 786 | return 0; |
784 | } | 787 | } |
785 | subsys_initcall(balloon_init); | 788 | subsys_initcall(balloon_init); |
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index d6786b87e13b..2c6a9114d332 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/delay.h> | 42 | #include <linux/delay.h> |
43 | #include <linux/hardirq.h> | 43 | #include <linux/hardirq.h> |
44 | #include <linux/workqueue.h> | 44 | #include <linux/workqueue.h> |
45 | #include <linux/ratelimit.h> | ||
45 | 46 | ||
46 | #include <xen/xen.h> | 47 | #include <xen/xen.h> |
47 | #include <xen/interface/xen.h> | 48 | #include <xen/interface/xen.h> |
@@ -1072,8 +1073,14 @@ static int gnttab_expand(unsigned int req_entries) | |||
1072 | cur = nr_grant_frames; | 1073 | cur = nr_grant_frames; |
1073 | extra = ((req_entries + (grefs_per_grant_frame-1)) / | 1074 | extra = ((req_entries + (grefs_per_grant_frame-1)) / |
1074 | grefs_per_grant_frame); | 1075 | grefs_per_grant_frame); |
1075 | if (cur + extra > gnttab_max_grant_frames()) | 1076 | if (cur + extra > gnttab_max_grant_frames()) { |
1077 | pr_warn_ratelimited("xen/grant-table: max_grant_frames reached" | ||
1078 | " cur=%u extra=%u limit=%u" | ||
1079 | " gnttab_free_count=%u req_entries=%u\n", | ||
1080 | cur, extra, gnttab_max_grant_frames(), | ||
1081 | gnttab_free_count, req_entries); | ||
1076 | return -ENOSPC; | 1082 | return -ENOSPC; |
1083 | } | ||
1077 | 1084 | ||
1078 | rc = gnttab_map(cur, cur + extra - 1); | 1085 | rc = gnttab_map(cur, cur + extra - 1); |
1079 | if (rc == 0) | 1086 | if (rc == 0) |
diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c index e7715cb62eef..e89136ab851e 100644 --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c | |||
@@ -59,6 +59,8 @@ static void watch_target(struct xenbus_watch *watch, | |||
59 | { | 59 | { |
60 | unsigned long long new_target; | 60 | unsigned long long new_target; |
61 | int err; | 61 | int err; |
62 | static bool watch_fired; | ||
63 | static long target_diff; | ||
62 | 64 | ||
63 | err = xenbus_scanf(XBT_NIL, "memory", "target", "%llu", &new_target); | 65 | err = xenbus_scanf(XBT_NIL, "memory", "target", "%llu", &new_target); |
64 | if (err != 1) { | 66 | if (err != 1) { |
@@ -69,7 +71,14 @@ static void watch_target(struct xenbus_watch *watch, | |||
69 | /* The given memory/target value is in KiB, so it needs converting to | 71 | /* The given memory/target value is in KiB, so it needs converting to |
70 | * pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. | 72 | * pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. |
71 | */ | 73 | */ |
72 | balloon_set_new_target(new_target >> (PAGE_SHIFT - 10)); | 74 | new_target >>= PAGE_SHIFT - 10; |
75 | if (watch_fired) { | ||
76 | balloon_set_new_target(new_target - target_diff); | ||
77 | return; | ||
78 | } | ||
79 | |||
80 | watch_fired = true; | ||
81 | target_diff = new_target - balloon_stats.target_pages; | ||
73 | } | 82 | } |
74 | static struct xenbus_watch target_watch = { | 83 | static struct xenbus_watch target_watch = { |
75 | .node = "memory/target", | 84 | .node = "memory/target", |
@@ -94,22 +103,15 @@ static struct notifier_block xenstore_notifier = { | |||
94 | .notifier_call = balloon_init_watcher, | 103 | .notifier_call = balloon_init_watcher, |
95 | }; | 104 | }; |
96 | 105 | ||
97 | static int __init balloon_init(void) | 106 | void xen_balloon_init(void) |
98 | { | 107 | { |
99 | if (!xen_domain()) | ||
100 | return -ENODEV; | ||
101 | |||
102 | pr_info("Initialising balloon driver\n"); | ||
103 | |||
104 | register_balloon(&balloon_dev); | 108 | register_balloon(&balloon_dev); |
105 | 109 | ||
106 | register_xen_selfballooning(&balloon_dev); | 110 | register_xen_selfballooning(&balloon_dev); |
107 | 111 | ||
108 | register_xenstore_notifier(&xenstore_notifier); | 112 | register_xenstore_notifier(&xenstore_notifier); |
109 | |||
110 | return 0; | ||
111 | } | 113 | } |
112 | subsys_initcall(balloon_init); | 114 | EXPORT_SYMBOL_GPL(xen_balloon_init); |
113 | 115 | ||
114 | #define BALLOON_SHOW(name, format, args...) \ | 116 | #define BALLOON_SHOW(name, format, args...) \ |
115 | static ssize_t show_##name(struct device *dev, \ | 117 | static ssize_t show_##name(struct device *dev, \ |
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 69ec23daa25e..a1e6860b6f46 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -574,7 +574,7 @@ static int load_flat_file(struct linux_binprm *bprm, | |||
574 | MAX_SHARED_LIBS * sizeof(unsigned long), | 574 | MAX_SHARED_LIBS * sizeof(unsigned long), |
575 | FLAT_DATA_ALIGN); | 575 | FLAT_DATA_ALIGN); |
576 | 576 | ||
577 | pr_debug("Allocated data+bss+stack (%ld bytes): %lx\n", | 577 | pr_debug("Allocated data+bss+stack (%u bytes): %lx\n", |
578 | data_len + bss_len + stack_len, datapos); | 578 | data_len + bss_len + stack_len, datapos); |
579 | 579 | ||
580 | fpos = ntohl(hdr->data_start); | 580 | fpos = ntohl(hdr->data_start); |
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index e071d23f6148..ef7240ace576 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -271,6 +271,11 @@ out: | |||
271 | if (ret < 0) | 271 | if (ret < 0) |
272 | err = ret; | 272 | err = ret; |
273 | dput(last); | 273 | dput(last); |
274 | /* last_name no longer match cache index */ | ||
275 | if (fi->readdir_cache_idx >= 0) { | ||
276 | fi->readdir_cache_idx = -1; | ||
277 | fi->dir_release_count = 0; | ||
278 | } | ||
274 | } | 279 | } |
275 | return err; | 280 | return err; |
276 | } | 281 | } |
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index 79dafa71effd..51f0aea70cb4 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c | |||
@@ -175,11 +175,8 @@ ext2_get_acl(struct inode *inode, int type) | |||
175 | return acl; | 175 | return acl; |
176 | } | 176 | } |
177 | 177 | ||
178 | /* | 178 | static int |
179 | * inode->i_mutex: down | 179 | __ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type) |
180 | */ | ||
181 | int | ||
182 | ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type) | ||
183 | { | 180 | { |
184 | int name_index; | 181 | int name_index; |
185 | void *value = NULL; | 182 | void *value = NULL; |
@@ -189,13 +186,6 @@ ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
189 | switch(type) { | 186 | switch(type) { |
190 | case ACL_TYPE_ACCESS: | 187 | case ACL_TYPE_ACCESS: |
191 | name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS; | 188 | name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS; |
192 | if (acl) { | ||
193 | error = posix_acl_update_mode(inode, &inode->i_mode, &acl); | ||
194 | if (error) | ||
195 | return error; | ||
196 | inode->i_ctime = current_time(inode); | ||
197 | mark_inode_dirty(inode); | ||
198 | } | ||
199 | break; | 189 | break; |
200 | 190 | ||
201 | case ACL_TYPE_DEFAULT: | 191 | case ACL_TYPE_DEFAULT: |
@@ -222,6 +212,31 @@ ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
222 | } | 212 | } |
223 | 213 | ||
224 | /* | 214 | /* |
215 | * inode->i_mutex: down | ||
216 | */ | ||
217 | int | ||
218 | ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type) | ||
219 | { | ||
220 | int error; | ||
221 | int update_mode = 0; | ||
222 | umode_t mode = inode->i_mode; | ||
223 | |||
224 | if (type == ACL_TYPE_ACCESS && acl) { | ||
225 | error = posix_acl_update_mode(inode, &mode, &acl); | ||
226 | if (error) | ||
227 | return error; | ||
228 | update_mode = 1; | ||
229 | } | ||
230 | error = __ext2_set_acl(inode, acl, type); | ||
231 | if (!error && update_mode) { | ||
232 | inode->i_mode = mode; | ||
233 | inode->i_ctime = current_time(inode); | ||
234 | mark_inode_dirty(inode); | ||
235 | } | ||
236 | return error; | ||
237 | } | ||
238 | |||
239 | /* | ||
225 | * Initialize the ACLs of a new inode. Called from ext2_new_inode. | 240 | * Initialize the ACLs of a new inode. Called from ext2_new_inode. |
226 | * | 241 | * |
227 | * dir->i_mutex: down | 242 | * dir->i_mutex: down |
@@ -238,12 +253,12 @@ ext2_init_acl(struct inode *inode, struct inode *dir) | |||
238 | return error; | 253 | return error; |
239 | 254 | ||
240 | if (default_acl) { | 255 | if (default_acl) { |
241 | error = ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT); | 256 | error = __ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT); |
242 | posix_acl_release(default_acl); | 257 | posix_acl_release(default_acl); |
243 | } | 258 | } |
244 | if (acl) { | 259 | if (acl) { |
245 | if (!error) | 260 | if (!error) |
246 | error = ext2_set_acl(inode, acl, ACL_TYPE_ACCESS); | 261 | error = __ext2_set_acl(inode, acl, ACL_TYPE_ACCESS); |
247 | posix_acl_release(acl); | 262 | posix_acl_release(acl); |
248 | } | 263 | } |
249 | return error; | 264 | return error; |
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index a140c5e3dc54..b4b8438c42ef 100644 --- a/fs/f2fs/acl.c +++ b/fs/f2fs/acl.c | |||
@@ -211,7 +211,7 @@ static int __f2fs_set_acl(struct inode *inode, int type, | |||
211 | switch (type) { | 211 | switch (type) { |
212 | case ACL_TYPE_ACCESS: | 212 | case ACL_TYPE_ACCESS: |
213 | name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS; | 213 | name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS; |
214 | if (acl) { | 214 | if (acl && !ipage) { |
215 | error = posix_acl_update_mode(inode, &inode->i_mode, &acl); | 215 | error = posix_acl_update_mode(inode, &inode->i_mode, &acl); |
216 | if (error) | 216 | if (error) |
217 | return error; | 217 | return error; |
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 56bbf592e487..5b876f6d3f6b 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c | |||
@@ -879,6 +879,7 @@ int sync_dirty_inodes(struct f2fs_sb_info *sbi, enum inode_type type) | |||
879 | struct inode *inode; | 879 | struct inode *inode; |
880 | struct f2fs_inode_info *fi; | 880 | struct f2fs_inode_info *fi; |
881 | bool is_dir = (type == DIR_INODE); | 881 | bool is_dir = (type == DIR_INODE); |
882 | unsigned long ino = 0; | ||
882 | 883 | ||
883 | trace_f2fs_sync_dirty_inodes_enter(sbi->sb, is_dir, | 884 | trace_f2fs_sync_dirty_inodes_enter(sbi->sb, is_dir, |
884 | get_pages(sbi, is_dir ? | 885 | get_pages(sbi, is_dir ? |
@@ -901,8 +902,17 @@ retry: | |||
901 | inode = igrab(&fi->vfs_inode); | 902 | inode = igrab(&fi->vfs_inode); |
902 | spin_unlock(&sbi->inode_lock[type]); | 903 | spin_unlock(&sbi->inode_lock[type]); |
903 | if (inode) { | 904 | if (inode) { |
905 | unsigned long cur_ino = inode->i_ino; | ||
906 | |||
904 | filemap_fdatawrite(inode->i_mapping); | 907 | filemap_fdatawrite(inode->i_mapping); |
905 | iput(inode); | 908 | iput(inode); |
909 | /* We need to give cpu to another writers. */ | ||
910 | if (ino == cur_ino) { | ||
911 | congestion_wait(BLK_RW_ASYNC, HZ/50); | ||
912 | cond_resched(); | ||
913 | } else { | ||
914 | ino = cur_ino; | ||
915 | } | ||
906 | } else { | 916 | } else { |
907 | /* | 917 | /* |
908 | * We should submit bio, since it exists several | 918 | * We should submit bio, since it exists several |
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index a0e6d2c65a9e..2706130c261b 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -1538,7 +1538,6 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) | |||
1538 | 1538 | ||
1539 | /* Is it quota file? Do not allow user to mess with it */ | 1539 | /* Is it quota file? Do not allow user to mess with it */ |
1540 | if (IS_NOQUOTA(inode)) { | 1540 | if (IS_NOQUOTA(inode)) { |
1541 | inode_unlock(inode); | ||
1542 | ret = -EPERM; | 1541 | ret = -EPERM; |
1543 | goto unlock_out; | 1542 | goto unlock_out; |
1544 | } | 1543 | } |
@@ -1549,9 +1548,8 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) | |||
1549 | 1548 | ||
1550 | if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) { | 1549 | if ((flags ^ oldflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) { |
1551 | if (!capable(CAP_LINUX_IMMUTABLE)) { | 1550 | if (!capable(CAP_LINUX_IMMUTABLE)) { |
1552 | inode_unlock(inode); | ||
1553 | ret = -EPERM; | 1551 | ret = -EPERM; |
1554 | goto out; | 1552 | goto unlock_out; |
1555 | } | 1553 | } |
1556 | } | 1554 | } |
1557 | 1555 | ||
@@ -1564,7 +1562,6 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) | |||
1564 | f2fs_mark_inode_dirty_sync(inode, false); | 1562 | f2fs_mark_inode_dirty_sync(inode, false); |
1565 | unlock_out: | 1563 | unlock_out: |
1566 | inode_unlock(inode); | 1564 | inode_unlock(inode); |
1567 | out: | ||
1568 | mnt_drop_write_file(filp); | 1565 | mnt_drop_write_file(filp); |
1569 | return ret; | 1566 | return ret; |
1570 | } | 1567 | } |
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 9adc202fcd6f..71191d89917d 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/proc_fs.h> | 12 | #include <linux/proc_fs.h> |
13 | #include <linux/f2fs_fs.h> | 13 | #include <linux/f2fs_fs.h> |
14 | #include <linux/seq_file.h> | ||
14 | 15 | ||
15 | #include "f2fs.h" | 16 | #include "f2fs.h" |
16 | #include "segment.h" | 17 | #include "segment.h" |
diff --git a/fs/hfsplus/posix_acl.c b/fs/hfsplus/posix_acl.c index 9b92058a1240..6bb5d7c42888 100644 --- a/fs/hfsplus/posix_acl.c +++ b/fs/hfsplus/posix_acl.c | |||
@@ -51,8 +51,8 @@ struct posix_acl *hfsplus_get_posix_acl(struct inode *inode, int type) | |||
51 | return acl; | 51 | return acl; |
52 | } | 52 | } |
53 | 53 | ||
54 | int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, | 54 | static int __hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, |
55 | int type) | 55 | int type) |
56 | { | 56 | { |
57 | int err; | 57 | int err; |
58 | char *xattr_name; | 58 | char *xattr_name; |
@@ -64,12 +64,6 @@ int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, | |||
64 | switch (type) { | 64 | switch (type) { |
65 | case ACL_TYPE_ACCESS: | 65 | case ACL_TYPE_ACCESS: |
66 | xattr_name = XATTR_NAME_POSIX_ACL_ACCESS; | 66 | xattr_name = XATTR_NAME_POSIX_ACL_ACCESS; |
67 | if (acl) { | ||
68 | err = posix_acl_update_mode(inode, &inode->i_mode, &acl); | ||
69 | if (err) | ||
70 | return err; | ||
71 | } | ||
72 | err = 0; | ||
73 | break; | 67 | break; |
74 | 68 | ||
75 | case ACL_TYPE_DEFAULT: | 69 | case ACL_TYPE_DEFAULT: |
@@ -105,6 +99,18 @@ end_set_acl: | |||
105 | return err; | 99 | return err; |
106 | } | 100 | } |
107 | 101 | ||
102 | int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, int type) | ||
103 | { | ||
104 | int err; | ||
105 | |||
106 | if (type == ACL_TYPE_ACCESS && acl) { | ||
107 | err = posix_acl_update_mode(inode, &inode->i_mode, &acl); | ||
108 | if (err) | ||
109 | return err; | ||
110 | } | ||
111 | return __hfsplus_set_posix_acl(inode, acl, type); | ||
112 | } | ||
113 | |||
108 | int hfsplus_init_posix_acl(struct inode *inode, struct inode *dir) | 114 | int hfsplus_init_posix_acl(struct inode *inode, struct inode *dir) |
109 | { | 115 | { |
110 | int err = 0; | 116 | int err = 0; |
@@ -122,15 +128,15 @@ int hfsplus_init_posix_acl(struct inode *inode, struct inode *dir) | |||
122 | return err; | 128 | return err; |
123 | 129 | ||
124 | if (default_acl) { | 130 | if (default_acl) { |
125 | err = hfsplus_set_posix_acl(inode, default_acl, | 131 | err = __hfsplus_set_posix_acl(inode, default_acl, |
126 | ACL_TYPE_DEFAULT); | 132 | ACL_TYPE_DEFAULT); |
127 | posix_acl_release(default_acl); | 133 | posix_acl_release(default_acl); |
128 | } | 134 | } |
129 | 135 | ||
130 | if (acl) { | 136 | if (acl) { |
131 | if (!err) | 137 | if (!err) |
132 | err = hfsplus_set_posix_acl(inode, acl, | 138 | err = __hfsplus_set_posix_acl(inode, acl, |
133 | ACL_TYPE_ACCESS); | 139 | ACL_TYPE_ACCESS); |
134 | posix_acl_release(acl); | 140 | posix_acl_release(acl); |
135 | } | 141 | } |
136 | return err; | 142 | return err; |
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 8cf898a59730..217a5e7815da 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -410,7 +410,11 @@ static int parse_options(char *options, struct iso9660_options *popt) | |||
410 | if (match_int(&args[0], &option)) | 410 | if (match_int(&args[0], &option)) |
411 | return 0; | 411 | return 0; |
412 | n = option; | 412 | n = option; |
413 | if (n > 99) | 413 | /* |
414 | * Track numbers are supposed to be in range 1-99, the | ||
415 | * mount option starts indexing at 0. | ||
416 | */ | ||
417 | if (n >= 99) | ||
414 | return 0; | 418 | return 0; |
415 | popt->session = n + 1; | 419 | popt->session = n + 1; |
416 | break; | 420 | break; |
@@ -543,7 +547,7 @@ static unsigned int isofs_get_last_session(struct super_block *sb, s32 session) | |||
543 | 547 | ||
544 | vol_desc_start=0; | 548 | vol_desc_start=0; |
545 | ms_info.addr_format=CDROM_LBA; | 549 | ms_info.addr_format=CDROM_LBA; |
546 | if(session >= 0 && session <= 99) { | 550 | if (session > 0) { |
547 | struct cdrom_tocentry Te; | 551 | struct cdrom_tocentry Te; |
548 | Te.cdte_track=session; | 552 | Te.cdte_track=session; |
549 | Te.cdte_format=CDROM_LBA; | 553 | Te.cdte_format=CDROM_LBA; |
diff --git a/fs/mount.h b/fs/mount.h index de45d9e76748..6790767d1883 100644 --- a/fs/mount.h +++ b/fs/mount.h | |||
@@ -16,7 +16,7 @@ struct mnt_namespace { | |||
16 | u64 event; | 16 | u64 event; |
17 | unsigned int mounts; /* # of mounts in the namespace */ | 17 | unsigned int mounts; /* # of mounts in the namespace */ |
18 | unsigned int pending_mounts; | 18 | unsigned int pending_mounts; |
19 | }; | 19 | } __randomize_layout; |
20 | 20 | ||
21 | struct mnt_pcp { | 21 | struct mnt_pcp { |
22 | int mnt_count; | 22 | int mnt_count; |
@@ -69,7 +69,7 @@ struct mount { | |||
69 | struct hlist_head mnt_pins; | 69 | struct hlist_head mnt_pins; |
70 | struct fs_pin mnt_umount; | 70 | struct fs_pin mnt_umount; |
71 | struct dentry *mnt_ex_mountpoint; | 71 | struct dentry *mnt_ex_mountpoint; |
72 | }; | 72 | } __randomize_layout; |
73 | 73 | ||
74 | #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */ | 74 | #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */ |
75 | 75 | ||
diff --git a/fs/namei.c b/fs/namei.c index 88fd38d1e3e7..ddb6a7c2b3d4 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -524,7 +524,7 @@ struct nameidata { | |||
524 | struct inode *link_inode; | 524 | struct inode *link_inode; |
525 | unsigned root_seq; | 525 | unsigned root_seq; |
526 | int dfd; | 526 | int dfd; |
527 | }; | 527 | } __randomize_layout; |
528 | 528 | ||
529 | static void set_nameidata(struct nameidata *p, int dfd, struct filename *name) | 529 | static void set_nameidata(struct nameidata *p, int dfd, struct filename *name) |
530 | { | 530 | { |
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index ee5ddbd36088..efebe6cf4378 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -820,6 +820,7 @@ void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_server *sour | |||
820 | target->caps = source->caps; | 820 | target->caps = source->caps; |
821 | target->options = source->options; | 821 | target->options = source->options; |
822 | target->auth_info = source->auth_info; | 822 | target->auth_info = source->auth_info; |
823 | target->port = source->port; | ||
823 | } | 824 | } |
824 | EXPORT_SYMBOL_GPL(nfs_server_copy_userdata); | 825 | EXPORT_SYMBOL_GPL(nfs_server_copy_userdata); |
825 | 826 | ||
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 5ac484fe0dee..3522b1249019 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -2372,16 +2372,40 @@ void nfs_access_add_cache(struct inode *inode, struct nfs_access_entry *set) | |||
2372 | } | 2372 | } |
2373 | EXPORT_SYMBOL_GPL(nfs_access_add_cache); | 2373 | EXPORT_SYMBOL_GPL(nfs_access_add_cache); |
2374 | 2374 | ||
2375 | #define NFS_MAY_READ (NFS4_ACCESS_READ) | ||
2376 | #define NFS_MAY_WRITE (NFS4_ACCESS_MODIFY | \ | ||
2377 | NFS4_ACCESS_EXTEND | \ | ||
2378 | NFS4_ACCESS_DELETE) | ||
2379 | #define NFS_FILE_MAY_WRITE (NFS4_ACCESS_MODIFY | \ | ||
2380 | NFS4_ACCESS_EXTEND) | ||
2381 | #define NFS_DIR_MAY_WRITE NFS_MAY_WRITE | ||
2382 | #define NFS_MAY_LOOKUP (NFS4_ACCESS_LOOKUP) | ||
2383 | #define NFS_MAY_EXECUTE (NFS4_ACCESS_EXECUTE) | ||
2384 | static int | ||
2385 | nfs_access_calc_mask(u32 access_result, umode_t umode) | ||
2386 | { | ||
2387 | int mask = 0; | ||
2388 | |||
2389 | if (access_result & NFS_MAY_READ) | ||
2390 | mask |= MAY_READ; | ||
2391 | if (S_ISDIR(umode)) { | ||
2392 | if ((access_result & NFS_DIR_MAY_WRITE) == NFS_DIR_MAY_WRITE) | ||
2393 | mask |= MAY_WRITE; | ||
2394 | if ((access_result & NFS_MAY_LOOKUP) == NFS_MAY_LOOKUP) | ||
2395 | mask |= MAY_EXEC; | ||
2396 | } else if (S_ISREG(umode)) { | ||
2397 | if ((access_result & NFS_FILE_MAY_WRITE) == NFS_FILE_MAY_WRITE) | ||
2398 | mask |= MAY_WRITE; | ||
2399 | if ((access_result & NFS_MAY_EXECUTE) == NFS_MAY_EXECUTE) | ||
2400 | mask |= MAY_EXEC; | ||
2401 | } else if (access_result & NFS_MAY_WRITE) | ||
2402 | mask |= MAY_WRITE; | ||
2403 | return mask; | ||
2404 | } | ||
2405 | |||
2375 | void nfs_access_set_mask(struct nfs_access_entry *entry, u32 access_result) | 2406 | void nfs_access_set_mask(struct nfs_access_entry *entry, u32 access_result) |
2376 | { | 2407 | { |
2377 | entry->mask = 0; | 2408 | entry->mask = access_result; |
2378 | if (access_result & NFS4_ACCESS_READ) | ||
2379 | entry->mask |= MAY_READ; | ||
2380 | if (access_result & | ||
2381 | (NFS4_ACCESS_MODIFY | NFS4_ACCESS_EXTEND | NFS4_ACCESS_DELETE)) | ||
2382 | entry->mask |= MAY_WRITE; | ||
2383 | if (access_result & (NFS4_ACCESS_LOOKUP|NFS4_ACCESS_EXECUTE)) | ||
2384 | entry->mask |= MAY_EXEC; | ||
2385 | } | 2409 | } |
2386 | EXPORT_SYMBOL_GPL(nfs_access_set_mask); | 2410 | EXPORT_SYMBOL_GPL(nfs_access_set_mask); |
2387 | 2411 | ||
@@ -2389,6 +2413,7 @@ static int nfs_do_access(struct inode *inode, struct rpc_cred *cred, int mask) | |||
2389 | { | 2413 | { |
2390 | struct nfs_access_entry cache; | 2414 | struct nfs_access_entry cache; |
2391 | bool may_block = (mask & MAY_NOT_BLOCK) == 0; | 2415 | bool may_block = (mask & MAY_NOT_BLOCK) == 0; |
2416 | int cache_mask; | ||
2392 | int status; | 2417 | int status; |
2393 | 2418 | ||
2394 | trace_nfs_access_enter(inode); | 2419 | trace_nfs_access_enter(inode); |
@@ -2404,7 +2429,8 @@ static int nfs_do_access(struct inode *inode, struct rpc_cred *cred, int mask) | |||
2404 | goto out; | 2429 | goto out; |
2405 | 2430 | ||
2406 | /* Be clever: ask server to check for all possible rights */ | 2431 | /* Be clever: ask server to check for all possible rights */ |
2407 | cache.mask = MAY_EXEC | MAY_WRITE | MAY_READ; | 2432 | cache.mask = NFS_MAY_LOOKUP | NFS_MAY_EXECUTE |
2433 | | NFS_MAY_WRITE | NFS_MAY_READ; | ||
2408 | cache.cred = cred; | 2434 | cache.cred = cred; |
2409 | cache.jiffies = jiffies; | 2435 | cache.jiffies = jiffies; |
2410 | status = NFS_PROTO(inode)->access(inode, &cache); | 2436 | status = NFS_PROTO(inode)->access(inode, &cache); |
@@ -2418,7 +2444,8 @@ static int nfs_do_access(struct inode *inode, struct rpc_cred *cred, int mask) | |||
2418 | } | 2444 | } |
2419 | nfs_access_add_cache(inode, &cache); | 2445 | nfs_access_add_cache(inode, &cache); |
2420 | out_cached: | 2446 | out_cached: |
2421 | if ((mask & ~cache.mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) != 0) | 2447 | cache_mask = nfs_access_calc_mask(cache.mask, inode->i_mode); |
2448 | if ((mask & ~cache_mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) != 0) | ||
2422 | status = -EACCES; | 2449 | status = -EACCES; |
2423 | out: | 2450 | out: |
2424 | trace_nfs_access_exit(inode, status); | 2451 | trace_nfs_access_exit(inode, status); |
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index 080fc6b278bd..44c638b7876c 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c | |||
@@ -542,6 +542,10 @@ filelayout_check_deviceid(struct pnfs_layout_hdr *lo, | |||
542 | struct nfs4_file_layout_dsaddr *dsaddr; | 542 | struct nfs4_file_layout_dsaddr *dsaddr; |
543 | int status = -EINVAL; | 543 | int status = -EINVAL; |
544 | 544 | ||
545 | /* Is the deviceid already set? If so, we're good. */ | ||
546 | if (fl->dsaddr != NULL) | ||
547 | return 0; | ||
548 | |||
545 | /* find and reference the deviceid */ | 549 | /* find and reference the deviceid */ |
546 | d = nfs4_find_get_deviceid(NFS_SERVER(lo->plh_inode), &fl->deviceid, | 550 | d = nfs4_find_get_deviceid(NFS_SERVER(lo->plh_inode), &fl->deviceid, |
547 | lo->plh_lc_cred, gfp_flags); | 551 | lo->plh_lc_cred, gfp_flags); |
@@ -553,8 +557,6 @@ filelayout_check_deviceid(struct pnfs_layout_hdr *lo, | |||
553 | if (filelayout_test_devid_unavailable(&dsaddr->id_node)) | 557 | if (filelayout_test_devid_unavailable(&dsaddr->id_node)) |
554 | goto out_put; | 558 | goto out_put; |
555 | 559 | ||
556 | fl->dsaddr = dsaddr; | ||
557 | |||
558 | if (fl->first_stripe_index >= dsaddr->stripe_count) { | 560 | if (fl->first_stripe_index >= dsaddr->stripe_count) { |
559 | dprintk("%s Bad first_stripe_index %u\n", | 561 | dprintk("%s Bad first_stripe_index %u\n", |
560 | __func__, fl->first_stripe_index); | 562 | __func__, fl->first_stripe_index); |
@@ -570,6 +572,13 @@ filelayout_check_deviceid(struct pnfs_layout_hdr *lo, | |||
570 | goto out_put; | 572 | goto out_put; |
571 | } | 573 | } |
572 | status = 0; | 574 | status = 0; |
575 | |||
576 | /* | ||
577 | * Atomic compare and xchange to ensure we don't scribble | ||
578 | * over a non-NULL pointer. | ||
579 | */ | ||
580 | if (cmpxchg(&fl->dsaddr, NULL, dsaddr) != NULL) | ||
581 | goto out_put; | ||
573 | out: | 582 | out: |
574 | return status; | 583 | return status; |
575 | out_put: | 584 | out_put: |
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 1f2ac3dd0fe5..b0fa83a60754 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c | |||
@@ -1842,6 +1842,10 @@ static int ff_layout_initiate_commit(struct nfs_commit_data *data, int how) | |||
1842 | int vers, ret; | 1842 | int vers, ret; |
1843 | struct nfs_fh *fh; | 1843 | struct nfs_fh *fh; |
1844 | 1844 | ||
1845 | if (!lseg || !(pnfs_is_valid_lseg(lseg) || | ||
1846 | test_bit(NFS_LSEG_LAYOUTRETURN, &lseg->pls_flags))) | ||
1847 | goto out_err; | ||
1848 | |||
1845 | idx = calc_ds_index_from_commit(lseg, data->ds_commit_index); | 1849 | idx = calc_ds_index_from_commit(lseg, data->ds_commit_index); |
1846 | ds = nfs4_ff_layout_prepare_ds(lseg, idx, true); | 1850 | ds = nfs4_ff_layout_prepare_ds(lseg, idx, true); |
1847 | if (!ds) | 1851 | if (!ds) |
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 3efe946672be..60bad882c123 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -512,7 +512,7 @@ static const struct rpc_version mnt_version1 = { | |||
512 | .counts = mnt_counts, | 512 | .counts = mnt_counts, |
513 | }; | 513 | }; |
514 | 514 | ||
515 | static unsigned int mnt3_counts[ARRAY_SIZE(mnt_procedures)]; | 515 | static unsigned int mnt3_counts[ARRAY_SIZE(mnt3_procedures)]; |
516 | static const struct rpc_version mnt_version3 = { | 516 | static const struct rpc_version mnt_version3 = { |
517 | .number = 3, | 517 | .number = 3, |
518 | .nrprocs = ARRAY_SIZE(mnt3_procedures), | 518 | .nrprocs = ARRAY_SIZE(mnt3_procedures), |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index df4a7d3ab915..d1e87ec0df84 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -220,15 +220,8 @@ static int nfs3_proc_access(struct inode *inode, struct nfs_access_entry *entry) | |||
220 | 220 | ||
221 | status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0); | 221 | status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0); |
222 | nfs_refresh_inode(inode, res.fattr); | 222 | nfs_refresh_inode(inode, res.fattr); |
223 | if (status == 0) { | 223 | if (status == 0) |
224 | entry->mask = 0; | 224 | nfs_access_set_mask(entry, res.access); |
225 | if (res.access & NFS3_ACCESS_READ) | ||
226 | entry->mask |= MAY_READ; | ||
227 | if (res.access & (NFS3_ACCESS_MODIFY | NFS3_ACCESS_EXTEND | NFS3_ACCESS_DELETE)) | ||
228 | entry->mask |= MAY_WRITE; | ||
229 | if (res.access & (NFS3_ACCESS_LOOKUP|NFS3_ACCESS_EXECUTE)) | ||
230 | entry->mask |= MAY_EXEC; | ||
231 | } | ||
232 | nfs_free_fattr(res.fattr); | 225 | nfs_free_fattr(res.fattr); |
233 | out: | 226 | out: |
234 | dprintk("NFS reply access: %d\n", status); | 227 | dprintk("NFS reply access: %d\n", status); |
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c index d40755a0984b..25f28fa64c57 100644 --- a/fs/nfs/pnfs_nfs.c +++ b/fs/nfs/pnfs_nfs.c | |||
@@ -159,13 +159,18 @@ void pnfs_generic_recover_commit_reqs(struct list_head *dst, | |||
159 | { | 159 | { |
160 | struct pnfs_commit_bucket *b; | 160 | struct pnfs_commit_bucket *b; |
161 | struct pnfs_layout_segment *freeme; | 161 | struct pnfs_layout_segment *freeme; |
162 | int nwritten; | ||
162 | int i; | 163 | int i; |
163 | 164 | ||
164 | lockdep_assert_held(&cinfo->inode->i_lock); | 165 | lockdep_assert_held(&cinfo->inode->i_lock); |
165 | restart: | 166 | restart: |
166 | for (i = 0, b = cinfo->ds->buckets; i < cinfo->ds->nbuckets; i++, b++) { | 167 | for (i = 0, b = cinfo->ds->buckets; i < cinfo->ds->nbuckets; i++, b++) { |
167 | if (pnfs_generic_transfer_commit_list(&b->written, dst, | 168 | nwritten = pnfs_generic_transfer_commit_list(&b->written, |
168 | cinfo, 0)) { | 169 | dst, cinfo, 0); |
170 | if (!nwritten) | ||
171 | continue; | ||
172 | cinfo->ds->nwritten -= nwritten; | ||
173 | if (list_empty(&b->written)) { | ||
169 | freeme = b->wlseg; | 174 | freeme = b->wlseg; |
170 | b->wlseg = NULL; | 175 | b->wlseg = NULL; |
171 | spin_unlock(&cinfo->inode->i_lock); | 176 | spin_unlock(&cinfo->inode->i_lock); |
@@ -174,7 +179,6 @@ restart: | |||
174 | goto restart; | 179 | goto restart; |
175 | } | 180 | } |
176 | } | 181 | } |
177 | cinfo->ds->nwritten = 0; | ||
178 | } | 182 | } |
179 | EXPORT_SYMBOL_GPL(pnfs_generic_recover_commit_reqs); | 183 | EXPORT_SYMBOL_GPL(pnfs_generic_recover_commit_reqs); |
180 | 184 | ||
@@ -183,6 +187,7 @@ static void pnfs_generic_retry_commit(struct nfs_commit_info *cinfo, int idx) | |||
183 | struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds; | 187 | struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds; |
184 | struct pnfs_commit_bucket *bucket; | 188 | struct pnfs_commit_bucket *bucket; |
185 | struct pnfs_layout_segment *freeme; | 189 | struct pnfs_layout_segment *freeme; |
190 | struct list_head *pos; | ||
186 | LIST_HEAD(pages); | 191 | LIST_HEAD(pages); |
187 | int i; | 192 | int i; |
188 | 193 | ||
@@ -193,6 +198,8 @@ static void pnfs_generic_retry_commit(struct nfs_commit_info *cinfo, int idx) | |||
193 | continue; | 198 | continue; |
194 | freeme = bucket->clseg; | 199 | freeme = bucket->clseg; |
195 | bucket->clseg = NULL; | 200 | bucket->clseg = NULL; |
201 | list_for_each(pos, &bucket->committing) | ||
202 | cinfo->ds->ncommitting--; | ||
196 | list_splice_init(&bucket->committing, &pages); | 203 | list_splice_init(&bucket->committing, &pages); |
197 | spin_unlock(&cinfo->inode->i_lock); | 204 | spin_unlock(&cinfo->inode->i_lock); |
198 | nfs_retry_commit(&pages, freeme, cinfo, i); | 205 | nfs_retry_commit(&pages, freeme, cinfo, i); |
@@ -217,13 +224,6 @@ pnfs_generic_alloc_ds_commits(struct nfs_commit_info *cinfo, | |||
217 | for (i = 0; i < fl_cinfo->nbuckets; i++, bucket++) { | 224 | for (i = 0; i < fl_cinfo->nbuckets; i++, bucket++) { |
218 | if (list_empty(&bucket->committing)) | 225 | if (list_empty(&bucket->committing)) |
219 | continue; | 226 | continue; |
220 | /* | ||
221 | * If the layout segment is invalid, then let | ||
222 | * pnfs_generic_retry_commit() clean up the bucket. | ||
223 | */ | ||
224 | if (bucket->clseg && !pnfs_is_valid_lseg(bucket->clseg) && | ||
225 | !test_bit(NFS_LSEG_LAYOUTRETURN, &bucket->clseg->pls_flags)) | ||
226 | break; | ||
227 | data = nfs_commitdata_alloc(false); | 227 | data = nfs_commitdata_alloc(false); |
228 | if (!data) | 228 | if (!data) |
229 | break; | 229 | break; |
@@ -243,9 +243,12 @@ void pnfs_fetch_commit_bucket_list(struct list_head *pages, | |||
243 | struct nfs_commit_info *cinfo) | 243 | struct nfs_commit_info *cinfo) |
244 | { | 244 | { |
245 | struct pnfs_commit_bucket *bucket; | 245 | struct pnfs_commit_bucket *bucket; |
246 | struct list_head *pos; | ||
246 | 247 | ||
247 | bucket = &cinfo->ds->buckets[data->ds_commit_index]; | 248 | bucket = &cinfo->ds->buckets[data->ds_commit_index]; |
248 | spin_lock(&cinfo->inode->i_lock); | 249 | spin_lock(&cinfo->inode->i_lock); |
250 | list_for_each(pos, &bucket->committing) | ||
251 | cinfo->ds->ncommitting--; | ||
249 | list_splice_init(&bucket->committing, pages); | 252 | list_splice_init(&bucket->committing, pages); |
250 | data->lseg = bucket->clseg; | 253 | data->lseg = bucket->clseg; |
251 | bucket->clseg = NULL; | 254 | bucket->clseg = NULL; |
@@ -330,7 +333,6 @@ pnfs_generic_commit_pagelist(struct inode *inode, struct list_head *mds_pages, | |||
330 | } | 333 | } |
331 | } | 334 | } |
332 | out: | 335 | out: |
333 | cinfo->ds->ncommitting = 0; | ||
334 | return PNFS_ATTEMPTED; | 336 | return PNFS_ATTEMPTED; |
335 | } | 337 | } |
336 | EXPORT_SYMBOL_GPL(pnfs_generic_commit_pagelist); | 338 | EXPORT_SYMBOL_GPL(pnfs_generic_commit_pagelist); |
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index b45083c0f9ae..49b0a9e7ff18 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -720,8 +720,8 @@ static const struct rpc_version nfs_cb_version4 = { | |||
720 | .counts = nfs4_cb_counts, | 720 | .counts = nfs4_cb_counts, |
721 | }; | 721 | }; |
722 | 722 | ||
723 | static const struct rpc_version *nfs_cb_version[] = { | 723 | static const struct rpc_version *nfs_cb_version[2] = { |
724 | &nfs_cb_version4, | 724 | [1] = &nfs_cb_version4, |
725 | }; | 725 | }; |
726 | 726 | ||
727 | static const struct rpc_program cb_program; | 727 | static const struct rpc_program cb_program; |
@@ -795,7 +795,7 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c | |||
795 | .saddress = (struct sockaddr *) &conn->cb_saddr, | 795 | .saddress = (struct sockaddr *) &conn->cb_saddr, |
796 | .timeout = &timeparms, | 796 | .timeout = &timeparms, |
797 | .program = &cb_program, | 797 | .program = &cb_program, |
798 | .version = 0, | 798 | .version = 1, |
799 | .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), | 799 | .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), |
800 | }; | 800 | }; |
801 | struct rpc_clnt *client; | 801 | struct rpc_clnt *client; |
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 641d9ee97f91..48b70e6490f3 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c | |||
@@ -481,17 +481,30 @@ out_cleanup: | |||
481 | } | 481 | } |
482 | 482 | ||
483 | static int ovl_create_or_link(struct dentry *dentry, struct inode *inode, | 483 | static int ovl_create_or_link(struct dentry *dentry, struct inode *inode, |
484 | struct cattr *attr, struct dentry *hardlink) | 484 | struct cattr *attr, struct dentry *hardlink, |
485 | bool origin) | ||
485 | { | 486 | { |
486 | int err; | 487 | int err; |
487 | const struct cred *old_cred; | 488 | const struct cred *old_cred; |
488 | struct cred *override_cred; | 489 | struct cred *override_cred; |
490 | struct dentry *parent = dentry->d_parent; | ||
489 | 491 | ||
490 | err = ovl_copy_up(dentry->d_parent); | 492 | err = ovl_copy_up(parent); |
491 | if (err) | 493 | if (err) |
492 | return err; | 494 | return err; |
493 | 495 | ||
494 | old_cred = ovl_override_creds(dentry->d_sb); | 496 | old_cred = ovl_override_creds(dentry->d_sb); |
497 | |||
498 | /* | ||
499 | * When linking a file with copy up origin into a new parent, mark the | ||
500 | * new parent dir "impure". | ||
501 | */ | ||
502 | if (origin) { | ||
503 | err = ovl_set_impure(parent, ovl_dentry_upper(parent)); | ||
504 | if (err) | ||
505 | goto out_revert_creds; | ||
506 | } | ||
507 | |||
495 | err = -ENOMEM; | 508 | err = -ENOMEM; |
496 | override_cred = prepare_creds(); | 509 | override_cred = prepare_creds(); |
497 | if (override_cred) { | 510 | if (override_cred) { |
@@ -550,7 +563,7 @@ static int ovl_create_object(struct dentry *dentry, int mode, dev_t rdev, | |||
550 | inode_init_owner(inode, dentry->d_parent->d_inode, mode); | 563 | inode_init_owner(inode, dentry->d_parent->d_inode, mode); |
551 | attr.mode = inode->i_mode; | 564 | attr.mode = inode->i_mode; |
552 | 565 | ||
553 | err = ovl_create_or_link(dentry, inode, &attr, NULL); | 566 | err = ovl_create_or_link(dentry, inode, &attr, NULL, false); |
554 | if (err) | 567 | if (err) |
555 | iput(inode); | 568 | iput(inode); |
556 | 569 | ||
@@ -609,7 +622,8 @@ static int ovl_link(struct dentry *old, struct inode *newdir, | |||
609 | inode = d_inode(old); | 622 | inode = d_inode(old); |
610 | ihold(inode); | 623 | ihold(inode); |
611 | 624 | ||
612 | err = ovl_create_or_link(new, inode, NULL, ovl_dentry_upper(old)); | 625 | err = ovl_create_or_link(new, inode, NULL, ovl_dentry_upper(old), |
626 | ovl_type_origin(old)); | ||
613 | if (err) | 627 | if (err) |
614 | iput(inode); | 628 | iput(inode); |
615 | 629 | ||
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 69f4fc26ee39..5bc71642b226 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c | |||
@@ -202,37 +202,38 @@ bool ovl_is_private_xattr(const char *name) | |||
202 | sizeof(OVL_XATTR_PREFIX) - 1) == 0; | 202 | sizeof(OVL_XATTR_PREFIX) - 1) == 0; |
203 | } | 203 | } |
204 | 204 | ||
205 | int ovl_xattr_set(struct dentry *dentry, const char *name, const void *value, | 205 | int ovl_xattr_set(struct dentry *dentry, struct inode *inode, const char *name, |
206 | size_t size, int flags) | 206 | const void *value, size_t size, int flags) |
207 | { | 207 | { |
208 | int err; | 208 | int err; |
209 | struct path realpath; | 209 | struct dentry *upperdentry = ovl_i_dentry_upper(inode); |
210 | enum ovl_path_type type = ovl_path_real(dentry, &realpath); | 210 | struct dentry *realdentry = upperdentry ?: ovl_dentry_lower(dentry); |
211 | const struct cred *old_cred; | 211 | const struct cred *old_cred; |
212 | 212 | ||
213 | err = ovl_want_write(dentry); | 213 | err = ovl_want_write(dentry); |
214 | if (err) | 214 | if (err) |
215 | goto out; | 215 | goto out; |
216 | 216 | ||
217 | if (!value && !OVL_TYPE_UPPER(type)) { | 217 | if (!value && !upperdentry) { |
218 | err = vfs_getxattr(realpath.dentry, name, NULL, 0); | 218 | err = vfs_getxattr(realdentry, name, NULL, 0); |
219 | if (err < 0) | 219 | if (err < 0) |
220 | goto out_drop_write; | 220 | goto out_drop_write; |
221 | } | 221 | } |
222 | 222 | ||
223 | err = ovl_copy_up(dentry); | 223 | if (!upperdentry) { |
224 | if (err) | 224 | err = ovl_copy_up(dentry); |
225 | goto out_drop_write; | 225 | if (err) |
226 | goto out_drop_write; | ||
226 | 227 | ||
227 | if (!OVL_TYPE_UPPER(type)) | 228 | realdentry = ovl_dentry_upper(dentry); |
228 | ovl_path_upper(dentry, &realpath); | 229 | } |
229 | 230 | ||
230 | old_cred = ovl_override_creds(dentry->d_sb); | 231 | old_cred = ovl_override_creds(dentry->d_sb); |
231 | if (value) | 232 | if (value) |
232 | err = vfs_setxattr(realpath.dentry, name, value, size, flags); | 233 | err = vfs_setxattr(realdentry, name, value, size, flags); |
233 | else { | 234 | else { |
234 | WARN_ON(flags != XATTR_REPLACE); | 235 | WARN_ON(flags != XATTR_REPLACE); |
235 | err = vfs_removexattr(realpath.dentry, name); | 236 | err = vfs_removexattr(realdentry, name); |
236 | } | 237 | } |
237 | revert_creds(old_cred); | 238 | revert_creds(old_cred); |
238 | 239 | ||
@@ -242,12 +243,13 @@ out: | |||
242 | return err; | 243 | return err; |
243 | } | 244 | } |
244 | 245 | ||
245 | int ovl_xattr_get(struct dentry *dentry, const char *name, | 246 | int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name, |
246 | void *value, size_t size) | 247 | void *value, size_t size) |
247 | { | 248 | { |
248 | struct dentry *realdentry = ovl_dentry_real(dentry); | ||
249 | ssize_t res; | 249 | ssize_t res; |
250 | const struct cred *old_cred; | 250 | const struct cred *old_cred; |
251 | struct dentry *realdentry = | ||
252 | ovl_i_dentry_upper(inode) ?: ovl_dentry_lower(dentry); | ||
251 | 253 | ||
252 | old_cred = ovl_override_creds(dentry->d_sb); | 254 | old_cred = ovl_override_creds(dentry->d_sb); |
253 | res = vfs_getxattr(realdentry, name, value, size); | 255 | res = vfs_getxattr(realdentry, name, value, size); |
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index 9bc0e580a5b3..8aef2b304b2d 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c | |||
@@ -397,8 +397,19 @@ int ovl_verify_index(struct dentry *index, struct path *lowerstack, | |||
397 | if (!d_inode(index)) | 397 | if (!d_inode(index)) |
398 | return 0; | 398 | return 0; |
399 | 399 | ||
400 | err = -EISDIR; | 400 | /* |
401 | if (d_is_dir(index)) | 401 | * Directory index entries are going to be used for looking up |
402 | * redirected upper dirs by lower dir fh when decoding an overlay | ||
403 | * file handle of a merge dir. Whiteout index entries are going to be | ||
404 | * used as an indication that an exported overlay file handle should | ||
405 | * be treated as stale (i.e. after unlink of the overlay inode). | ||
406 | * We don't know the verification rules for directory and whiteout | ||
407 | * index entries, because they have not been implemented yet, so return | ||
408 | * EROFS if those entries are found to avoid corrupting an index that | ||
409 | * was created by a newer kernel. | ||
410 | */ | ||
411 | err = -EROFS; | ||
412 | if (d_is_dir(index) || ovl_is_whiteout(index)) | ||
402 | goto fail; | 413 | goto fail; |
403 | 414 | ||
404 | err = -EINVAL; | 415 | err = -EINVAL; |
@@ -436,8 +447,8 @@ out: | |||
436 | return err; | 447 | return err; |
437 | 448 | ||
438 | fail: | 449 | fail: |
439 | pr_warn_ratelimited("overlayfs: failed to verify index (%pd2, err=%i)\n", | 450 | pr_warn_ratelimited("overlayfs: failed to verify index (%pd2, ftype=%x, err=%i)\n", |
440 | index, err); | 451 | index, d_inode(index)->i_mode & S_IFMT, err); |
441 | goto out; | 452 | goto out; |
442 | } | 453 | } |
443 | 454 | ||
@@ -502,6 +513,7 @@ static struct dentry *ovl_lookup_index(struct dentry *dentry, | |||
502 | goto out; | 513 | goto out; |
503 | } | 514 | } |
504 | 515 | ||
516 | inode = d_inode(index); | ||
505 | if (d_is_negative(index)) { | 517 | if (d_is_negative(index)) { |
506 | if (upper && d_inode(origin)->i_nlink > 1) { | 518 | if (upper && d_inode(origin)->i_nlink > 1) { |
507 | pr_warn_ratelimited("overlayfs: hard link with origin but no index (ino=%lu).\n", | 519 | pr_warn_ratelimited("overlayfs: hard link with origin but no index (ino=%lu).\n", |
@@ -511,11 +523,22 @@ static struct dentry *ovl_lookup_index(struct dentry *dentry, | |||
511 | 523 | ||
512 | dput(index); | 524 | dput(index); |
513 | index = NULL; | 525 | index = NULL; |
514 | } else if (upper && d_inode(index) != d_inode(upper)) { | 526 | } else if (upper && d_inode(upper) != inode) { |
515 | inode = d_inode(index); | 527 | pr_warn_ratelimited("overlayfs: wrong index found (index=%pd2, ino=%lu, upper ino=%lu).\n", |
516 | pr_warn_ratelimited("overlayfs: wrong index found (index ino: %lu, upper ino: %lu).\n", | 528 | index, inode->i_ino, d_inode(upper)->i_ino); |
517 | d_inode(index)->i_ino, | 529 | goto fail; |
518 | d_inode(upper)->i_ino); | 530 | } else if (ovl_dentry_weird(index) || ovl_is_whiteout(index) || |
531 | ((inode->i_mode ^ d_inode(origin)->i_mode) & S_IFMT)) { | ||
532 | /* | ||
533 | * Index should always be of the same file type as origin | ||
534 | * except for the case of a whiteout index. A whiteout | ||
535 | * index should only exist if all lower aliases have been | ||
536 | * unlinked, which means that finding a lower origin on lookup | ||
537 | * whose index is a whiteout should be treated as an error. | ||
538 | */ | ||
539 | pr_warn_ratelimited("overlayfs: bad index found (index=%pd2, ftype=%x, origin ftype=%x).\n", | ||
540 | index, d_inode(index)->i_mode & S_IFMT, | ||
541 | d_inode(origin)->i_mode & S_IFMT); | ||
519 | goto fail; | 542 | goto fail; |
520 | } | 543 | } |
521 | 544 | ||
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index 60d26605e039..e927a62c97ae 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h | |||
@@ -47,7 +47,8 @@ enum ovl_flag { | |||
47 | /* Is the real inode encoded in fid an upper inode? */ | 47 | /* Is the real inode encoded in fid an upper inode? */ |
48 | #define OVL_FH_FLAG_PATH_UPPER (1 << 2) | 48 | #define OVL_FH_FLAG_PATH_UPPER (1 << 2) |
49 | 49 | ||
50 | #define OVL_FH_FLAG_ALL (OVL_FH_FLAG_BIG_ENDIAN | OVL_FH_FLAG_ANY_ENDIAN) | 50 | #define OVL_FH_FLAG_ALL (OVL_FH_FLAG_BIG_ENDIAN | OVL_FH_FLAG_ANY_ENDIAN | \ |
51 | OVL_FH_FLAG_PATH_UPPER) | ||
51 | 52 | ||
52 | #if defined(__LITTLE_ENDIAN) | 53 | #if defined(__LITTLE_ENDIAN) |
53 | #define OVL_FH_FLAG_CPU_ENDIAN 0 | 54 | #define OVL_FH_FLAG_CPU_ENDIAN 0 |
@@ -199,6 +200,7 @@ enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path); | |||
199 | struct dentry *ovl_dentry_upper(struct dentry *dentry); | 200 | struct dentry *ovl_dentry_upper(struct dentry *dentry); |
200 | struct dentry *ovl_dentry_lower(struct dentry *dentry); | 201 | struct dentry *ovl_dentry_lower(struct dentry *dentry); |
201 | struct dentry *ovl_dentry_real(struct dentry *dentry); | 202 | struct dentry *ovl_dentry_real(struct dentry *dentry); |
203 | struct dentry *ovl_i_dentry_upper(struct inode *inode); | ||
202 | struct inode *ovl_inode_upper(struct inode *inode); | 204 | struct inode *ovl_inode_upper(struct inode *inode); |
203 | struct inode *ovl_inode_lower(struct inode *inode); | 205 | struct inode *ovl_inode_lower(struct inode *inode); |
204 | struct inode *ovl_inode_real(struct inode *inode); | 206 | struct inode *ovl_inode_real(struct inode *inode); |
@@ -270,9 +272,9 @@ int ovl_setattr(struct dentry *dentry, struct iattr *attr); | |||
270 | int ovl_getattr(const struct path *path, struct kstat *stat, | 272 | int ovl_getattr(const struct path *path, struct kstat *stat, |
271 | u32 request_mask, unsigned int flags); | 273 | u32 request_mask, unsigned int flags); |
272 | int ovl_permission(struct inode *inode, int mask); | 274 | int ovl_permission(struct inode *inode, int mask); |
273 | int ovl_xattr_set(struct dentry *dentry, const char *name, const void *value, | 275 | int ovl_xattr_set(struct dentry *dentry, struct inode *inode, const char *name, |
274 | size_t size, int flags); | 276 | const void *value, size_t size, int flags); |
275 | int ovl_xattr_get(struct dentry *dentry, const char *name, | 277 | int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name, |
276 | void *value, size_t size); | 278 | void *value, size_t size); |
277 | ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size); | 279 | ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size); |
278 | struct posix_acl *ovl_get_acl(struct inode *inode, int type); | 280 | struct posix_acl *ovl_get_acl(struct inode *inode, int type); |
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c index 0298463cf9c3..3d424a51cabb 100644 --- a/fs/overlayfs/readdir.c +++ b/fs/overlayfs/readdir.c | |||
@@ -703,7 +703,10 @@ int ovl_indexdir_cleanup(struct dentry *dentry, struct vfsmount *mnt, | |||
703 | err = PTR_ERR(index); | 703 | err = PTR_ERR(index); |
704 | break; | 704 | break; |
705 | } | 705 | } |
706 | if (ovl_verify_index(index, lowerstack, numlower)) { | 706 | err = ovl_verify_index(index, lowerstack, numlower); |
707 | if (err) { | ||
708 | if (err == -EROFS) | ||
709 | break; | ||
707 | err = ovl_cleanup(dir, index); | 710 | err = ovl_cleanup(dir, index); |
708 | if (err) | 711 | if (err) |
709 | break; | 712 | break; |
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 44dc2d6ffe0f..d86e89f97201 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c | |||
@@ -692,7 +692,7 @@ ovl_posix_acl_xattr_get(const struct xattr_handler *handler, | |||
692 | struct dentry *dentry, struct inode *inode, | 692 | struct dentry *dentry, struct inode *inode, |
693 | const char *name, void *buffer, size_t size) | 693 | const char *name, void *buffer, size_t size) |
694 | { | 694 | { |
695 | return ovl_xattr_get(dentry, handler->name, buffer, size); | 695 | return ovl_xattr_get(dentry, inode, handler->name, buffer, size); |
696 | } | 696 | } |
697 | 697 | ||
698 | static int __maybe_unused | 698 | static int __maybe_unused |
@@ -742,7 +742,7 @@ ovl_posix_acl_xattr_set(const struct xattr_handler *handler, | |||
742 | return err; | 742 | return err; |
743 | } | 743 | } |
744 | 744 | ||
745 | err = ovl_xattr_set(dentry, handler->name, value, size, flags); | 745 | err = ovl_xattr_set(dentry, inode, handler->name, value, size, flags); |
746 | if (!err) | 746 | if (!err) |
747 | ovl_copyattr(ovl_inode_real(inode), inode); | 747 | ovl_copyattr(ovl_inode_real(inode), inode); |
748 | 748 | ||
@@ -772,7 +772,7 @@ static int ovl_other_xattr_get(const struct xattr_handler *handler, | |||
772 | struct dentry *dentry, struct inode *inode, | 772 | struct dentry *dentry, struct inode *inode, |
773 | const char *name, void *buffer, size_t size) | 773 | const char *name, void *buffer, size_t size) |
774 | { | 774 | { |
775 | return ovl_xattr_get(dentry, name, buffer, size); | 775 | return ovl_xattr_get(dentry, inode, name, buffer, size); |
776 | } | 776 | } |
777 | 777 | ||
778 | static int ovl_other_xattr_set(const struct xattr_handler *handler, | 778 | static int ovl_other_xattr_set(const struct xattr_handler *handler, |
@@ -780,7 +780,7 @@ static int ovl_other_xattr_set(const struct xattr_handler *handler, | |||
780 | const char *name, const void *value, | 780 | const char *name, const void *value, |
781 | size_t size, int flags) | 781 | size_t size, int flags) |
782 | { | 782 | { |
783 | return ovl_xattr_set(dentry, name, value, size, flags); | 783 | return ovl_xattr_set(dentry, inode, name, value, size, flags); |
784 | } | 784 | } |
785 | 785 | ||
786 | static const struct xattr_handler __maybe_unused | 786 | static const struct xattr_handler __maybe_unused |
@@ -1058,10 +1058,6 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) | |||
1058 | 1058 | ||
1059 | ufs->indexdir = ovl_workdir_create(sb, ufs, workpath.dentry, | 1059 | ufs->indexdir = ovl_workdir_create(sb, ufs, workpath.dentry, |
1060 | OVL_INDEXDIR_NAME, true); | 1060 | OVL_INDEXDIR_NAME, true); |
1061 | err = PTR_ERR(ufs->indexdir); | ||
1062 | if (IS_ERR(ufs->indexdir)) | ||
1063 | goto out_put_lower_mnt; | ||
1064 | |||
1065 | if (ufs->indexdir) { | 1061 | if (ufs->indexdir) { |
1066 | /* Verify upper root is index dir origin */ | 1062 | /* Verify upper root is index dir origin */ |
1067 | err = ovl_verify_origin(ufs->indexdir, ufs->upper_mnt, | 1063 | err = ovl_verify_origin(ufs->indexdir, ufs->upper_mnt, |
@@ -1090,6 +1086,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) | |||
1090 | else | 1086 | else |
1091 | sb->s_d_op = &ovl_dentry_operations; | 1087 | sb->s_d_op = &ovl_dentry_operations; |
1092 | 1088 | ||
1089 | err = -ENOMEM; | ||
1093 | ufs->creator_cred = cred = prepare_creds(); | 1090 | ufs->creator_cred = cred = prepare_creds(); |
1094 | if (!cred) | 1091 | if (!cred) |
1095 | goto out_put_indexdir; | 1092 | goto out_put_indexdir; |
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index c492ba75c659..f46ad75dc96a 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c | |||
@@ -157,9 +157,14 @@ struct dentry *ovl_dentry_real(struct dentry *dentry) | |||
157 | return ovl_dentry_upper(dentry) ?: ovl_dentry_lower(dentry); | 157 | return ovl_dentry_upper(dentry) ?: ovl_dentry_lower(dentry); |
158 | } | 158 | } |
159 | 159 | ||
160 | struct dentry *ovl_i_dentry_upper(struct inode *inode) | ||
161 | { | ||
162 | return ovl_upperdentry_dereference(OVL_I(inode)); | ||
163 | } | ||
164 | |||
160 | struct inode *ovl_inode_upper(struct inode *inode) | 165 | struct inode *ovl_inode_upper(struct inode *inode) |
161 | { | 166 | { |
162 | struct dentry *upperdentry = ovl_upperdentry_dereference(OVL_I(inode)); | 167 | struct dentry *upperdentry = ovl_i_dentry_upper(inode); |
163 | 168 | ||
164 | return upperdentry ? d_inode(upperdentry) : NULL; | 169 | return upperdentry ? d_inode(upperdentry) : NULL; |
165 | } | 170 | } |
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 18694598bebf..aa2b89071630 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h | |||
@@ -51,7 +51,7 @@ struct proc_dir_entry { | |||
51 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ | 51 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ |
52 | u8 namelen; | 52 | u8 namelen; |
53 | char name[]; | 53 | char name[]; |
54 | }; | 54 | } __randomize_layout; |
55 | 55 | ||
56 | union proc_op { | 56 | union proc_op { |
57 | int (*proc_get_link)(struct dentry *, struct path *); | 57 | int (*proc_get_link)(struct dentry *, struct path *); |
@@ -70,7 +70,7 @@ struct proc_inode { | |||
70 | struct hlist_node sysctl_inodes; | 70 | struct hlist_node sysctl_inodes; |
71 | const struct proc_ns_operations *ns_ops; | 71 | const struct proc_ns_operations *ns_ops; |
72 | struct inode vfs_inode; | 72 | struct inode vfs_inode; |
73 | }; | 73 | } __randomize_layout; |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * General functions | 76 | * General functions |
@@ -279,7 +279,7 @@ struct proc_maps_private { | |||
279 | #ifdef CONFIG_NUMA | 279 | #ifdef CONFIG_NUMA |
280 | struct mempolicy *task_mempolicy; | 280 | struct mempolicy *task_mempolicy; |
281 | #endif | 281 | #endif |
282 | }; | 282 | } __randomize_layout; |
283 | 283 | ||
284 | struct mm_struct *proc_mem_open(struct inode *inode, unsigned int mode); | 284 | struct mm_struct *proc_mem_open(struct inode *inode, unsigned int mode); |
285 | 285 | ||
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index 3d2256a425ee..54415f0e3d18 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c | |||
@@ -23,7 +23,8 @@ reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
23 | struct reiserfs_transaction_handle th; | 23 | struct reiserfs_transaction_handle th; |
24 | size_t jcreate_blocks; | 24 | size_t jcreate_blocks; |
25 | int size = acl ? posix_acl_xattr_size(acl->a_count) : 0; | 25 | int size = acl ? posix_acl_xattr_size(acl->a_count) : 0; |
26 | 26 | int update_mode = 0; | |
27 | umode_t mode = inode->i_mode; | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * Pessimism: We can't assume that anything from the xattr root up | 30 | * Pessimism: We can't assume that anything from the xattr root up |
@@ -37,7 +38,16 @@ reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
37 | error = journal_begin(&th, inode->i_sb, jcreate_blocks); | 38 | error = journal_begin(&th, inode->i_sb, jcreate_blocks); |
38 | reiserfs_write_unlock(inode->i_sb); | 39 | reiserfs_write_unlock(inode->i_sb); |
39 | if (error == 0) { | 40 | if (error == 0) { |
41 | if (type == ACL_TYPE_ACCESS && acl) { | ||
42 | error = posix_acl_update_mode(inode, &mode, &acl); | ||
43 | if (error) | ||
44 | goto unlock; | ||
45 | update_mode = 1; | ||
46 | } | ||
40 | error = __reiserfs_set_acl(&th, inode, type, acl); | 47 | error = __reiserfs_set_acl(&th, inode, type, acl); |
48 | if (!error && update_mode) | ||
49 | inode->i_mode = mode; | ||
50 | unlock: | ||
41 | reiserfs_write_lock(inode->i_sb); | 51 | reiserfs_write_lock(inode->i_sb); |
42 | error2 = journal_end(&th); | 52 | error2 = journal_end(&th); |
43 | reiserfs_write_unlock(inode->i_sb); | 53 | reiserfs_write_unlock(inode->i_sb); |
@@ -241,11 +251,6 @@ __reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
241 | switch (type) { | 251 | switch (type) { |
242 | case ACL_TYPE_ACCESS: | 252 | case ACL_TYPE_ACCESS: |
243 | name = XATTR_NAME_POSIX_ACL_ACCESS; | 253 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
244 | if (acl) { | ||
245 | error = posix_acl_update_mode(inode, &inode->i_mode, &acl); | ||
246 | if (error) | ||
247 | return error; | ||
248 | } | ||
249 | break; | 254 | break; |
250 | case ACL_TYPE_DEFAULT: | 255 | case ACL_TYPE_DEFAULT: |
251 | name = XATTR_NAME_POSIX_ACL_DEFAULT; | 256 | name = XATTR_NAME_POSIX_ACL_DEFAULT; |
diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h index d4b72944ccda..1e3a74f94131 100644 --- a/include/acpi/acpi_numa.h +++ b/include/acpi/acpi_numa.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_ACPI_NUMA | 4 | #ifdef CONFIG_ACPI_NUMA |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/numa.h> | ||
6 | 7 | ||
7 | /* Proximity bitmap length */ | 8 | /* Proximity bitmap length */ |
8 | #if MAX_NUMNODES > 256 | 9 | #if MAX_NUMNODES > 256 |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 05488da3aee9..3ae9013eeaaa 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -46,7 +46,7 @@ struct linux_binprm { | |||
46 | unsigned interp_flags; | 46 | unsigned interp_flags; |
47 | unsigned interp_data; | 47 | unsigned interp_data; |
48 | unsigned long loader, exec; | 48 | unsigned long loader, exec; |
49 | }; | 49 | } __randomize_layout; |
50 | 50 | ||
51 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 | 51 | #define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 |
52 | #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) | 52 | #define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) |
@@ -81,7 +81,7 @@ struct linux_binfmt { | |||
81 | int (*load_shlib)(struct file *); | 81 | int (*load_shlib)(struct file *); |
82 | int (*core_dump)(struct coredump_params *cprm); | 82 | int (*core_dump)(struct coredump_params *cprm); |
83 | unsigned long min_coredump; /* minimal dump size */ | 83 | unsigned long min_coredump; /* minimal dump size */ |
84 | }; | 84 | } __randomize_layout; |
85 | 85 | ||
86 | extern void __register_binfmt(struct linux_binfmt *fmt, int insert); | 86 | extern void __register_binfmt(struct linux_binfmt *fmt, int insert); |
87 | 87 | ||
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h index 360c082e885c..d41d40ac3efd 100644 --- a/include/linux/bpf-cgroup.h +++ b/include/linux/bpf-cgroup.h | |||
@@ -85,7 +85,7 @@ int __cgroup_bpf_run_filter_sock_ops(struct sock *sk, | |||
85 | int __ret = 0; \ | 85 | int __ret = 0; \ |
86 | if (cgroup_bpf_enabled && (sock_ops)->sk) { \ | 86 | if (cgroup_bpf_enabled && (sock_ops)->sk) { \ |
87 | typeof(sk) __sk = sk_to_full_sk((sock_ops)->sk); \ | 87 | typeof(sk) __sk = sk_to_full_sk((sock_ops)->sk); \ |
88 | if (sk_fullsock(__sk)) \ | 88 | if (__sk && sk_fullsock(__sk)) \ |
89 | __ret = __cgroup_bpf_run_filter_sock_ops(__sk, \ | 89 | __ret = __cgroup_bpf_run_filter_sock_ops(__sk, \ |
90 | sock_ops, \ | 90 | sock_ops, \ |
91 | BPF_CGROUP_SOCK_OPS); \ | 91 | BPF_CGROUP_SOCK_OPS); \ |
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 621076f56251..8e5d31f6faef 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h | |||
@@ -43,6 +43,7 @@ struct bpf_reg_state { | |||
43 | u32 min_align; | 43 | u32 min_align; |
44 | u32 aux_off; | 44 | u32 aux_off; |
45 | u32 aux_off_align; | 45 | u32 aux_off_align; |
46 | bool value_from_signed; | ||
46 | }; | 47 | }; |
47 | 48 | ||
48 | enum bpf_stack_slot_type { | 49 | enum bpf_stack_slot_type { |
diff --git a/include/linux/cdev.h b/include/linux/cdev.h index 408bc09ce497..cb28eb21e3ca 100644 --- a/include/linux/cdev.h +++ b/include/linux/cdev.h | |||
@@ -17,7 +17,7 @@ struct cdev { | |||
17 | struct list_head list; | 17 | struct list_head list; |
18 | dev_t dev; | 18 | dev_t dev; |
19 | unsigned int count; | 19 | unsigned int count; |
20 | }; | 20 | } __randomize_layout; |
21 | 21 | ||
22 | void cdev_init(struct cdev *, const struct file_operations *); | 22 | void cdev_init(struct cdev *, const struct file_operations *); |
23 | 23 | ||
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h index f0f6c537b64c..040dd105c3e7 100644 --- a/include/linux/ceph/ceph_features.h +++ b/include/linux/ceph/ceph_features.h | |||
@@ -10,14 +10,14 @@ | |||
10 | #define CEPH_FEATURE_INCARNATION_2 (1ull<<57) // CEPH_FEATURE_SERVER_JEWEL | 10 | #define CEPH_FEATURE_INCARNATION_2 (1ull<<57) // CEPH_FEATURE_SERVER_JEWEL |
11 | 11 | ||
12 | #define DEFINE_CEPH_FEATURE(bit, incarnation, name) \ | 12 | #define DEFINE_CEPH_FEATURE(bit, incarnation, name) \ |
13 | const static uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \ | 13 | static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \ |
14 | const static uint64_t CEPH_FEATUREMASK_##name = \ | 14 | static const uint64_t CEPH_FEATUREMASK_##name = \ |
15 | (1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation); | 15 | (1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation); |
16 | 16 | ||
17 | /* this bit is ignored but still advertised by release *when* */ | 17 | /* this bit is ignored but still advertised by release *when* */ |
18 | #define DEFINE_CEPH_FEATURE_DEPRECATED(bit, incarnation, name, when) \ | 18 | #define DEFINE_CEPH_FEATURE_DEPRECATED(bit, incarnation, name, when) \ |
19 | const static uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \ | 19 | static const uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \ |
20 | const static uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \ | 20 | static const uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \ |
21 | (1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation); | 21 | (1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation); |
22 | 22 | ||
23 | /* | 23 | /* |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index cd4bbe8242bd..bdb80c4aef6e 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -235,6 +235,7 @@ | |||
235 | #endif /* GCC_VERSION >= 40500 */ | 235 | #endif /* GCC_VERSION >= 40500 */ |
236 | 236 | ||
237 | #if GCC_VERSION >= 40600 | 237 | #if GCC_VERSION >= 40600 |
238 | |||
238 | /* | 239 | /* |
239 | * When used with Link Time Optimization, gcc can optimize away C functions or | 240 | * When used with Link Time Optimization, gcc can optimize away C functions or |
240 | * variables which are referenced only from assembly code. __visible tells the | 241 | * variables which are referenced only from assembly code. __visible tells the |
@@ -242,7 +243,17 @@ | |||
242 | * this. | 243 | * this. |
243 | */ | 244 | */ |
244 | #define __visible __attribute__((externally_visible)) | 245 | #define __visible __attribute__((externally_visible)) |
245 | #endif | 246 | |
247 | /* | ||
248 | * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only | ||
249 | * possible since GCC 4.6. To provide as much build testing coverage | ||
250 | * as possible, this is used for all GCC 4.6+ builds, and not just on | ||
251 | * RANDSTRUCT_PLUGIN builds. | ||
252 | */ | ||
253 | #define randomized_struct_fields_start struct { | ||
254 | #define randomized_struct_fields_end } __randomize_layout; | ||
255 | |||
256 | #endif /* GCC_VERSION >= 40600 */ | ||
246 | 257 | ||
247 | 258 | ||
248 | #if GCC_VERSION >= 40900 && !defined(__CHECKER__) | 259 | #if GCC_VERSION >= 40900 && !defined(__CHECKER__) |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 219f82f3ec1a..eca8ad75e28b 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -452,6 +452,11 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s | |||
452 | # define __no_randomize_layout | 452 | # define __no_randomize_layout |
453 | #endif | 453 | #endif |
454 | 454 | ||
455 | #ifndef randomized_struct_fields_start | ||
456 | # define randomized_struct_fields_start | ||
457 | # define randomized_struct_fields_end | ||
458 | #endif | ||
459 | |||
455 | /* | 460 | /* |
456 | * Tell gcc if a function is cold. The compiler will assume any path | 461 | * Tell gcc if a function is cold. The compiler will assume any path |
457 | * directly leading to the call is unlikely. | 462 | * directly leading to the call is unlikely. |
diff --git a/include/linux/cred.h b/include/linux/cred.h index c728d515e5e2..099058e1178b 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -31,7 +31,7 @@ struct group_info { | |||
31 | atomic_t usage; | 31 | atomic_t usage; |
32 | int ngroups; | 32 | int ngroups; |
33 | kgid_t gid[0]; | 33 | kgid_t gid[0]; |
34 | }; | 34 | } __randomize_layout; |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * get_group_info - Get a reference to a group info structure | 37 | * get_group_info - Get a reference to a group info structure |
@@ -145,7 +145,7 @@ struct cred { | |||
145 | struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */ | 145 | struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */ |
146 | struct group_info *group_info; /* supplementary groups for euid/fsgid */ | 146 | struct group_info *group_info; /* supplementary groups for euid/fsgid */ |
147 | struct rcu_head rcu; /* RCU deletion hook */ | 147 | struct rcu_head rcu; /* RCU deletion hook */ |
148 | }; | 148 | } __randomize_layout; |
149 | 149 | ||
150 | extern void __put_cred(struct cred *); | 150 | extern void __put_cred(struct cred *); |
151 | extern void exit_creds(struct task_struct *); | 151 | extern void exit_creds(struct task_struct *); |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 3f3ff4ccdc3f..aae1cdb76851 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -118,7 +118,7 @@ struct dentry { | |||
118 | struct hlist_bl_node d_in_lookup_hash; /* only for in-lookup ones */ | 118 | struct hlist_bl_node d_in_lookup_hash; /* only for in-lookup ones */ |
119 | struct rcu_head d_rcu; | 119 | struct rcu_head d_rcu; |
120 | } d_u; | 120 | } d_u; |
121 | }; | 121 | } __randomize_layout; |
122 | 122 | ||
123 | /* | 123 | /* |
124 | * dentry->d_lock spinlock nesting subclasses: | 124 | * dentry->d_lock spinlock nesting subclasses: |
diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index a5195a7d6f77..0a186c4f3981 100644 --- a/include/linux/dma-fence.h +++ b/include/linux/dma-fence.h | |||
@@ -55,6 +55,7 @@ struct dma_fence_cb; | |||
55 | * of the time. | 55 | * of the time. |
56 | * | 56 | * |
57 | * DMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled | 57 | * DMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled |
58 | * DMA_FENCE_FLAG_TIMESTAMP_BIT - timestamp recorded for fence signaling | ||
58 | * DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT - enable_signaling might have been called | 59 | * DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT - enable_signaling might have been called |
59 | * DMA_FENCE_FLAG_USER_BITS - start of the unused bits, can be used by the | 60 | * DMA_FENCE_FLAG_USER_BITS - start of the unused bits, can be used by the |
60 | * implementer of the fence for its own purposes. Can be used in different | 61 | * implementer of the fence for its own purposes. Can be used in different |
@@ -84,6 +85,7 @@ struct dma_fence { | |||
84 | 85 | ||
85 | enum dma_fence_flag_bits { | 86 | enum dma_fence_flag_bits { |
86 | DMA_FENCE_FLAG_SIGNALED_BIT, | 87 | DMA_FENCE_FLAG_SIGNALED_BIT, |
88 | DMA_FENCE_FLAG_TIMESTAMP_BIT, | ||
87 | DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, | 89 | DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, |
88 | DMA_FENCE_FLAG_USER_BITS, /* must always be last member */ | 90 | DMA_FENCE_FLAG_USER_BITS, /* must always be last member */ |
89 | }; | 91 | }; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7b5d6816542b..6e1fd5d21248 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -296,7 +296,7 @@ struct kiocb { | |||
296 | void *private; | 296 | void *private; |
297 | int ki_flags; | 297 | int ki_flags; |
298 | enum rw_hint ki_hint; | 298 | enum rw_hint ki_hint; |
299 | }; | 299 | } __randomize_layout; |
300 | 300 | ||
301 | static inline bool is_sync_kiocb(struct kiocb *kiocb) | 301 | static inline bool is_sync_kiocb(struct kiocb *kiocb) |
302 | { | 302 | { |
@@ -404,7 +404,7 @@ struct address_space { | |||
404 | struct list_head private_list; /* ditto */ | 404 | struct list_head private_list; /* ditto */ |
405 | void *private_data; /* ditto */ | 405 | void *private_data; /* ditto */ |
406 | errseq_t wb_err; | 406 | errseq_t wb_err; |
407 | } __attribute__((aligned(sizeof(long)))); | 407 | } __attribute__((aligned(sizeof(long)))) __randomize_layout; |
408 | /* | 408 | /* |
409 | * On most architectures that alignment is already the case; but | 409 | * On most architectures that alignment is already the case; but |
410 | * must be enforced here for CRIS, to let the least significant bit | 410 | * must be enforced here for CRIS, to let the least significant bit |
@@ -447,7 +447,7 @@ struct block_device { | |||
447 | int bd_fsfreeze_count; | 447 | int bd_fsfreeze_count; |
448 | /* Mutex for freeze */ | 448 | /* Mutex for freeze */ |
449 | struct mutex bd_fsfreeze_mutex; | 449 | struct mutex bd_fsfreeze_mutex; |
450 | }; | 450 | } __randomize_layout; |
451 | 451 | ||
452 | /* | 452 | /* |
453 | * Radix-tree tags, for tagging dirty and writeback pages within the pagecache | 453 | * Radix-tree tags, for tagging dirty and writeback pages within the pagecache |
@@ -666,7 +666,7 @@ struct inode { | |||
666 | #endif | 666 | #endif |
667 | 667 | ||
668 | void *i_private; /* fs or device private pointer */ | 668 | void *i_private; /* fs or device private pointer */ |
669 | }; | 669 | } __randomize_layout; |
670 | 670 | ||
671 | static inline unsigned int i_blocksize(const struct inode *node) | 671 | static inline unsigned int i_blocksize(const struct inode *node) |
672 | { | 672 | { |
@@ -883,7 +883,8 @@ struct file { | |||
883 | #endif /* #ifdef CONFIG_EPOLL */ | 883 | #endif /* #ifdef CONFIG_EPOLL */ |
884 | struct address_space *f_mapping; | 884 | struct address_space *f_mapping; |
885 | errseq_t f_wb_err; | 885 | errseq_t f_wb_err; |
886 | } __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ | 886 | } __randomize_layout |
887 | __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */ | ||
887 | 888 | ||
888 | struct file_handle { | 889 | struct file_handle { |
889 | __u32 handle_bytes; | 890 | __u32 handle_bytes; |
@@ -1020,7 +1021,7 @@ struct file_lock { | |||
1020 | int state; /* state of grant or error if -ve */ | 1021 | int state; /* state of grant or error if -ve */ |
1021 | } afs; | 1022 | } afs; |
1022 | } fl_u; | 1023 | } fl_u; |
1023 | }; | 1024 | } __randomize_layout; |
1024 | 1025 | ||
1025 | struct file_lock_context { | 1026 | struct file_lock_context { |
1026 | spinlock_t flc_lock; | 1027 | spinlock_t flc_lock; |
@@ -1412,7 +1413,7 @@ struct super_block { | |||
1412 | 1413 | ||
1413 | spinlock_t s_inode_wblist_lock; | 1414 | spinlock_t s_inode_wblist_lock; |
1414 | struct list_head s_inodes_wb; /* writeback inodes */ | 1415 | struct list_head s_inodes_wb; /* writeback inodes */ |
1415 | }; | 1416 | } __randomize_layout; |
1416 | 1417 | ||
1417 | /* Helper functions so that in most cases filesystems will | 1418 | /* Helper functions so that in most cases filesystems will |
1418 | * not need to deal directly with kuid_t and kgid_t and can | 1419 | * not need to deal directly with kuid_t and kgid_t and can |
@@ -1698,7 +1699,7 @@ struct file_operations { | |||
1698 | u64); | 1699 | u64); |
1699 | ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *, | 1700 | ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *, |
1700 | u64); | 1701 | u64); |
1701 | }; | 1702 | } __randomize_layout; |
1702 | 1703 | ||
1703 | struct inode_operations { | 1704 | struct inode_operations { |
1704 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); | 1705 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 0efc3e62843a..7a026240cbb1 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
@@ -12,7 +12,7 @@ struct fs_struct { | |||
12 | int umask; | 12 | int umask; |
13 | int in_exec; | 13 | int in_exec; |
14 | struct path root, pwd; | 14 | struct path root, pwd; |
15 | }; | 15 | } __randomize_layout; |
16 | 16 | ||
17 | extern struct kmem_cache *fs_cachep; | 17 | extern struct kmem_cache *fs_cachep; |
18 | 18 | ||
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 5857390ac35a..6383115e9d2c 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -145,8 +145,8 @@ enum { | |||
145 | #ifdef CONFIG_DYNAMIC_FTRACE | 145 | #ifdef CONFIG_DYNAMIC_FTRACE |
146 | /* The hash used to know what functions callbacks trace */ | 146 | /* The hash used to know what functions callbacks trace */ |
147 | struct ftrace_ops_hash { | 147 | struct ftrace_ops_hash { |
148 | struct ftrace_hash *notrace_hash; | 148 | struct ftrace_hash __rcu *notrace_hash; |
149 | struct ftrace_hash *filter_hash; | 149 | struct ftrace_hash __rcu *filter_hash; |
150 | struct mutex regex_lock; | 150 | struct mutex regex_lock; |
151 | }; | 151 | }; |
152 | 152 | ||
@@ -168,7 +168,7 @@ static inline void ftrace_free_init_mem(void) { } | |||
168 | */ | 168 | */ |
169 | struct ftrace_ops { | 169 | struct ftrace_ops { |
170 | ftrace_func_t func; | 170 | ftrace_func_t func; |
171 | struct ftrace_ops *next; | 171 | struct ftrace_ops __rcu *next; |
172 | unsigned long flags; | 172 | unsigned long flags; |
173 | void *private; | 173 | void *private; |
174 | ftrace_func_t saved_func; | 174 | ftrace_func_t saved_func; |
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index 5591f055e13f..fadd579d577d 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
@@ -23,6 +23,6 @@ struct kern_ipc_perm { | |||
23 | 23 | ||
24 | struct rcu_head rcu; | 24 | struct rcu_head rcu; |
25 | atomic_t refcount; | 25 | atomic_t refcount; |
26 | } ____cacheline_aligned_in_smp; | 26 | } ____cacheline_aligned_in_smp __randomize_layout; |
27 | 27 | ||
28 | #endif /* _LINUX_IPC_H */ | 28 | #endif /* _LINUX_IPC_H */ |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 848e5796400e..65327ee0936b 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -61,7 +61,7 @@ struct ipc_namespace { | |||
61 | struct ucounts *ucounts; | 61 | struct ucounts *ucounts; |
62 | 62 | ||
63 | struct ns_common ns; | 63 | struct ns_common ns; |
64 | }; | 64 | } __randomize_layout; |
65 | 65 | ||
66 | extern struct ipc_namespace init_ipc_ns; | 66 | extern struct ipc_namespace init_ipc_ns; |
67 | extern spinlock_t mq_lock; | 67 | extern spinlock_t mq_lock; |
diff --git a/include/linux/jhash.h b/include/linux/jhash.h index 348c6f47e4cc..8037850f3104 100644 --- a/include/linux/jhash.h +++ b/include/linux/jhash.h | |||
@@ -85,19 +85,18 @@ static inline u32 jhash(const void *key, u32 length, u32 initval) | |||
85 | k += 12; | 85 | k += 12; |
86 | } | 86 | } |
87 | /* Last block: affect all 32 bits of (c) */ | 87 | /* Last block: affect all 32 bits of (c) */ |
88 | /* All the case statements fall through */ | ||
89 | switch (length) { | 88 | switch (length) { |
90 | case 12: c += (u32)k[11]<<24; | 89 | case 12: c += (u32)k[11]<<24; /* fall through */ |
91 | case 11: c += (u32)k[10]<<16; | 90 | case 11: c += (u32)k[10]<<16; /* fall through */ |
92 | case 10: c += (u32)k[9]<<8; | 91 | case 10: c += (u32)k[9]<<8; /* fall through */ |
93 | case 9: c += k[8]; | 92 | case 9: c += k[8]; /* fall through */ |
94 | case 8: b += (u32)k[7]<<24; | 93 | case 8: b += (u32)k[7]<<24; /* fall through */ |
95 | case 7: b += (u32)k[6]<<16; | 94 | case 7: b += (u32)k[6]<<16; /* fall through */ |
96 | case 6: b += (u32)k[5]<<8; | 95 | case 6: b += (u32)k[5]<<8; /* fall through */ |
97 | case 5: b += k[4]; | 96 | case 5: b += k[4]; /* fall through */ |
98 | case 4: a += (u32)k[3]<<24; | 97 | case 4: a += (u32)k[3]<<24; /* fall through */ |
99 | case 3: a += (u32)k[2]<<16; | 98 | case 3: a += (u32)k[2]<<16; /* fall through */ |
100 | case 2: a += (u32)k[1]<<8; | 99 | case 2: a += (u32)k[1]<<8; /* fall through */ |
101 | case 1: a += k[0]; | 100 | case 1: a += k[0]; |
102 | __jhash_final(a, b, c); | 101 | __jhash_final(a, b, c); |
103 | case 0: /* Nothing left to add */ | 102 | case 0: /* Nothing left to add */ |
@@ -131,10 +130,10 @@ static inline u32 jhash2(const u32 *k, u32 length, u32 initval) | |||
131 | k += 3; | 130 | k += 3; |
132 | } | 131 | } |
133 | 132 | ||
134 | /* Handle the last 3 u32's: all the case statements fall through */ | 133 | /* Handle the last 3 u32's */ |
135 | switch (length) { | 134 | switch (length) { |
136 | case 3: c += k[2]; | 135 | case 3: c += k[2]; /* fall through */ |
137 | case 2: b += k[1]; | 136 | case 2: b += k[1]; /* fall through */ |
138 | case 1: a += k[0]; | 137 | case 1: a += k[0]; |
139 | __jhash_final(a, b, c); | 138 | __jhash_final(a, b, c); |
140 | case 0: /* Nothing left to add */ | 139 | case 0: /* Nothing left to add */ |
diff --git a/include/linux/key-type.h b/include/linux/key-type.h index 8496cf64575c..9520fc3c3b9a 100644 --- a/include/linux/key-type.h +++ b/include/linux/key-type.h | |||
@@ -45,7 +45,7 @@ struct key_preparsed_payload { | |||
45 | size_t datalen; /* Raw datalen */ | 45 | size_t datalen; /* Raw datalen */ |
46 | size_t quotalen; /* Quota length for proposed payload */ | 46 | size_t quotalen; /* Quota length for proposed payload */ |
47 | time_t expiry; /* Expiry time of key */ | 47 | time_t expiry; /* Expiry time of key */ |
48 | }; | 48 | } __randomize_layout; |
49 | 49 | ||
50 | typedef int (*request_key_actor_t)(struct key_construction *key, | 50 | typedef int (*request_key_actor_t)(struct key_construction *key, |
51 | const char *op, void *aux); | 51 | const char *op, void *aux); |
@@ -158,7 +158,7 @@ struct key_type { | |||
158 | /* internal fields */ | 158 | /* internal fields */ |
159 | struct list_head link; /* link in types list */ | 159 | struct list_head link; /* link in types list */ |
160 | struct lock_class_key lock_class; /* key->sem lock class */ | 160 | struct lock_class_key lock_class; /* key->sem lock class */ |
161 | }; | 161 | } __randomize_layout; |
162 | 162 | ||
163 | extern struct key_type key_type_keyring; | 163 | extern struct key_type key_type_keyring; |
164 | 164 | ||
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index c4e441e00db5..655082c88fd9 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -64,7 +64,7 @@ struct subprocess_info { | |||
64 | int (*init)(struct subprocess_info *info, struct cred *new); | 64 | int (*init)(struct subprocess_info *info, struct cred *new); |
65 | void (*cleanup)(struct subprocess_info *info); | 65 | void (*cleanup)(struct subprocess_info *info); |
66 | void *data; | 66 | void *data; |
67 | }; | 67 | } __randomize_layout; |
68 | 68 | ||
69 | extern int | 69 | extern int |
70 | call_usermodehelper(const char *path, char **argv, char **envp, int wait); | 70 | call_usermodehelper(const char *path, char **argv, char **envp, int wait); |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index eeab34b0f589..4d800c79475a 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -172,7 +172,7 @@ struct kset { | |||
172 | spinlock_t list_lock; | 172 | spinlock_t list_lock; |
173 | struct kobject kobj; | 173 | struct kobject kobj; |
174 | const struct kset_uevent_ops *uevent_ops; | 174 | const struct kset_uevent_ops *uevent_ops; |
175 | }; | 175 | } __randomize_layout; |
176 | 176 | ||
177 | extern void kset_init(struct kset *kset); | 177 | extern void kset_init(struct kset *kset); |
178 | extern int __must_check kset_register(struct kset *kset); | 178 | extern int __must_check kset_register(struct kset *kset); |
diff --git a/include/linux/llist.h b/include/linux/llist.h index d11738110a7a..1957635e6d5f 100644 --- a/include/linux/llist.h +++ b/include/linux/llist.h | |||
@@ -93,6 +93,23 @@ static inline void init_llist_head(struct llist_head *list) | |||
93 | container_of(ptr, type, member) | 93 | container_of(ptr, type, member) |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * member_address_is_nonnull - check whether the member address is not NULL | ||
97 | * @ptr: the object pointer (struct type * that contains the llist_node) | ||
98 | * @member: the name of the llist_node within the struct. | ||
99 | * | ||
100 | * This macro is conceptually the same as | ||
101 | * &ptr->member != NULL | ||
102 | * but it works around the fact that compilers can decide that taking a member | ||
103 | * address is never a NULL pointer. | ||
104 | * | ||
105 | * Real objects that start at a high address and have a member at NULL are | ||
106 | * unlikely to exist, but such pointers may be returned e.g. by the | ||
107 | * container_of() macro. | ||
108 | */ | ||
109 | #define member_address_is_nonnull(ptr, member) \ | ||
110 | ((uintptr_t)(ptr) + offsetof(typeof(*(ptr)), member) != 0) | ||
111 | |||
112 | /** | ||
96 | * llist_for_each - iterate over some deleted entries of a lock-less list | 113 | * llist_for_each - iterate over some deleted entries of a lock-less list |
97 | * @pos: the &struct llist_node to use as a loop cursor | 114 | * @pos: the &struct llist_node to use as a loop cursor |
98 | * @node: the first entry of deleted list entries | 115 | * @node: the first entry of deleted list entries |
@@ -145,7 +162,7 @@ static inline void init_llist_head(struct llist_head *list) | |||
145 | */ | 162 | */ |
146 | #define llist_for_each_entry(pos, node, member) \ | 163 | #define llist_for_each_entry(pos, node, member) \ |
147 | for ((pos) = llist_entry((node), typeof(*(pos)), member); \ | 164 | for ((pos) = llist_entry((node), typeof(*(pos)), member); \ |
148 | &(pos)->member != NULL; \ | 165 | member_address_is_nonnull(pos, member); \ |
149 | (pos) = llist_entry((pos)->member.next, typeof(*(pos)), member)) | 166 | (pos) = llist_entry((pos)->member.next, typeof(*(pos)), member)) |
150 | 167 | ||
151 | /** | 168 | /** |
@@ -167,7 +184,7 @@ static inline void init_llist_head(struct llist_head *list) | |||
167 | */ | 184 | */ |
168 | #define llist_for_each_entry_safe(pos, n, node, member) \ | 185 | #define llist_for_each_entry_safe(pos, n, node, member) \ |
169 | for (pos = llist_entry((node), typeof(*pos), member); \ | 186 | for (pos = llist_entry((node), typeof(*pos), member); \ |
170 | &pos->member != NULL && \ | 187 | member_address_is_nonnull(pos, member) && \ |
171 | (n = llist_entry(pos->member.next, typeof(*n), member), true); \ | 188 | (n = llist_entry(pos->member.next, typeof(*n), member), true); \ |
172 | pos = n) | 189 | pos = n) |
173 | 190 | ||
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index 7a86925ba8f3..3a90febadbe2 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h | |||
@@ -1912,7 +1912,7 @@ struct security_hook_heads { | |||
1912 | struct list_head audit_rule_match; | 1912 | struct list_head audit_rule_match; |
1913 | struct list_head audit_rule_free; | 1913 | struct list_head audit_rule_free; |
1914 | #endif /* CONFIG_AUDIT */ | 1914 | #endif /* CONFIG_AUDIT */ |
1915 | }; | 1915 | } __randomize_layout; |
1916 | 1916 | ||
1917 | /* | 1917 | /* |
1918 | * Security module hook list structure. | 1918 | * Security module hook list structure. |
@@ -1923,7 +1923,7 @@ struct security_hook_list { | |||
1923 | struct list_head *head; | 1923 | struct list_head *head; |
1924 | union security_list_options hook; | 1924 | union security_list_options hook; |
1925 | char *lsm; | 1925 | char *lsm; |
1926 | }; | 1926 | } __randomize_layout; |
1927 | 1927 | ||
1928 | /* | 1928 | /* |
1929 | * Initializing a security_hook_list structure takes | 1929 | * Initializing a security_hook_list structure takes |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index d5bed0875d30..aad5d81dfb44 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -1068,7 +1068,7 @@ static inline int mlx4_is_eth(struct mlx4_dev *dev, int port) | |||
1068 | } | 1068 | } |
1069 | 1069 | ||
1070 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | 1070 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, |
1071 | struct mlx4_buf *buf, gfp_t gfp); | 1071 | struct mlx4_buf *buf); |
1072 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); | 1072 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); |
1073 | static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) | 1073 | static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) |
1074 | { | 1074 | { |
@@ -1105,10 +1105,9 @@ int mlx4_mw_enable(struct mlx4_dev *dev, struct mlx4_mw *mw); | |||
1105 | int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | 1105 | int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, |
1106 | int start_index, int npages, u64 *page_list); | 1106 | int start_index, int npages, u64 *page_list); |
1107 | int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | 1107 | int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, |
1108 | struct mlx4_buf *buf, gfp_t gfp); | 1108 | struct mlx4_buf *buf); |
1109 | 1109 | ||
1110 | int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order, | 1110 | int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order); |
1111 | gfp_t gfp); | ||
1112 | void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db); | 1111 | void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db); |
1113 | 1112 | ||
1114 | int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, | 1113 | int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres, |
@@ -1124,8 +1123,7 @@ int mlx4_qp_reserve_range(struct mlx4_dev *dev, int cnt, int align, | |||
1124 | int *base, u8 flags); | 1123 | int *base, u8 flags); |
1125 | void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt); | 1124 | void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt); |
1126 | 1125 | ||
1127 | int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp, | 1126 | int mlx4_qp_alloc(struct mlx4_dev *dev, int qpn, struct mlx4_qp *qp); |
1128 | gfp_t gfp); | ||
1129 | void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp); | 1127 | void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp); |
1130 | 1128 | ||
1131 | int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcdn, | 1129 | int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcdn, |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 45cdb27791a3..ff151814a02d 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -342,7 +342,7 @@ struct vm_area_struct { | |||
342 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ | 342 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ |
343 | #endif | 343 | #endif |
344 | struct vm_userfaultfd_ctx vm_userfaultfd_ctx; | 344 | struct vm_userfaultfd_ctx vm_userfaultfd_ctx; |
345 | }; | 345 | } __randomize_layout; |
346 | 346 | ||
347 | struct core_thread { | 347 | struct core_thread { |
348 | struct task_struct *task; | 348 | struct task_struct *task; |
@@ -500,7 +500,7 @@ struct mm_struct { | |||
500 | atomic_long_t hugetlb_usage; | 500 | atomic_long_t hugetlb_usage; |
501 | #endif | 501 | #endif |
502 | struct work_struct async_put_work; | 502 | struct work_struct async_put_work; |
503 | }; | 503 | } __randomize_layout; |
504 | 504 | ||
505 | extern struct mm_struct init_mm; | 505 | extern struct mm_struct init_mm; |
506 | 506 | ||
diff --git a/include/linux/module.h b/include/linux/module.h index 8eb9a1e693e5..e7bdd549e527 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -45,7 +45,7 @@ struct module_kobject { | |||
45 | struct kobject *drivers_dir; | 45 | struct kobject *drivers_dir; |
46 | struct module_param_attrs *mp; | 46 | struct module_param_attrs *mp; |
47 | struct completion *kobj_completion; | 47 | struct completion *kobj_completion; |
48 | }; | 48 | } __randomize_layout; |
49 | 49 | ||
50 | struct module_attribute { | 50 | struct module_attribute { |
51 | struct attribute attr; | 51 | struct attribute attr; |
@@ -475,7 +475,7 @@ struct module { | |||
475 | ctor_fn_t *ctors; | 475 | ctor_fn_t *ctors; |
476 | unsigned int num_ctors; | 476 | unsigned int num_ctors; |
477 | #endif | 477 | #endif |
478 | } ____cacheline_aligned; | 478 | } ____cacheline_aligned __randomize_layout; |
479 | #ifndef MODULE_ARCH_INIT | 479 | #ifndef MODULE_ARCH_INIT |
480 | #define MODULE_ARCH_INIT {} | 480 | #define MODULE_ARCH_INIT {} |
481 | #endif | 481 | #endif |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 8e0352af06b7..1ce85e6fd95f 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -67,7 +67,7 @@ struct vfsmount { | |||
67 | struct dentry *mnt_root; /* root of the mounted tree */ | 67 | struct dentry *mnt_root; /* root of the mounted tree */ |
68 | struct super_block *mnt_sb; /* pointer to superblock */ | 68 | struct super_block *mnt_sb; /* pointer to superblock */ |
69 | int mnt_flags; | 69 | int mnt_flags; |
70 | }; | 70 | } __randomize_layout; |
71 | 71 | ||
72 | struct file; /* forward dec */ | 72 | struct file; /* forward dec */ |
73 | struct path; | 73 | struct path; |
diff --git a/include/linux/msg.h b/include/linux/msg.h index f3f302f9c197..a001305f5a79 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -29,7 +29,7 @@ struct msg_queue { | |||
29 | struct list_head q_messages; | 29 | struct list_head q_messages; |
30 | struct list_head q_receivers; | 30 | struct list_head q_receivers; |
31 | struct list_head q_senders; | 31 | struct list_head q_senders; |
32 | }; | 32 | } __randomize_layout; |
33 | 33 | ||
34 | /* Helper routines for sys_msgsnd and sys_msgrcv */ | 34 | /* Helper routines for sys_msgsnd and sys_msgrcv */ |
35 | extern long do_msgsnd(int msqid, long mtype, void __user *mtext, | 35 | extern long do_msgsnd(int msqid, long mtype, void __user *mtext, |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index a4b97be30b28..22f081065d49 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -61,8 +61,6 @@ typedef unsigned int nf_hookfn(void *priv, | |||
61 | struct sk_buff *skb, | 61 | struct sk_buff *skb, |
62 | const struct nf_hook_state *state); | 62 | const struct nf_hook_state *state); |
63 | struct nf_hook_ops { | 63 | struct nf_hook_ops { |
64 | struct list_head list; | ||
65 | |||
66 | /* User fills in from here down. */ | 64 | /* User fills in from here down. */ |
67 | nf_hookfn *hook; | 65 | nf_hookfn *hook; |
68 | struct net_device *dev; | 66 | struct net_device *dev; |
@@ -160,13 +158,6 @@ int nf_register_net_hooks(struct net *net, const struct nf_hook_ops *reg, | |||
160 | void nf_unregister_net_hooks(struct net *net, const struct nf_hook_ops *reg, | 158 | void nf_unregister_net_hooks(struct net *net, const struct nf_hook_ops *reg, |
161 | unsigned int n); | 159 | unsigned int n); |
162 | 160 | ||
163 | int nf_register_hook(struct nf_hook_ops *reg); | ||
164 | void nf_unregister_hook(struct nf_hook_ops *reg); | ||
165 | int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n); | ||
166 | void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n); | ||
167 | int _nf_register_hooks(struct nf_hook_ops *reg, unsigned int n); | ||
168 | void _nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n); | ||
169 | |||
170 | /* Functions to register get/setsockopt ranges (non-inclusive). You | 161 | /* Functions to register get/setsockopt ranges (non-inclusive). You |
171 | need to check permissions yourself! */ | 162 | need to check permissions yourself! */ |
172 | int nf_register_sockopt(struct nf_sockopt_ops *reg); | 163 | int nf_register_sockopt(struct nf_sockopt_ops *reg); |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index e52cc55ac300..5cc91d6381a3 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -51,7 +51,7 @@ struct nfs_access_entry { | |||
51 | struct list_head lru; | 51 | struct list_head lru; |
52 | unsigned long jiffies; | 52 | unsigned long jiffies; |
53 | struct rpc_cred * cred; | 53 | struct rpc_cred * cred; |
54 | int mask; | 54 | __u32 mask; |
55 | struct rcu_head rcu_head; | 55 | struct rcu_head rcu_head; |
56 | }; | 56 | }; |
57 | 57 | ||
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 6b8ee9e628e1..bc74da018bdc 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
@@ -963,14 +963,14 @@ struct nvme_dbbuf { | |||
963 | }; | 963 | }; |
964 | 964 | ||
965 | struct streams_directive_params { | 965 | struct streams_directive_params { |
966 | __u16 msl; | 966 | __le16 msl; |
967 | __u16 nssa; | 967 | __le16 nssa; |
968 | __u16 nsso; | 968 | __le16 nsso; |
969 | __u8 rsvd[10]; | 969 | __u8 rsvd[10]; |
970 | __u32 sws; | 970 | __le32 sws; |
971 | __u16 sgs; | 971 | __le16 sgs; |
972 | __u16 nsa; | 972 | __le16 nsa; |
973 | __u16 nso; | 973 | __le16 nso; |
974 | __u8 rsvd2[6]; | 974 | __u8 rsvd2[6]; |
975 | }; | 975 | }; |
976 | 976 | ||
diff --git a/include/linux/path.h b/include/linux/path.h index d1372186f431..cde895cc4af4 100644 --- a/include/linux/path.h +++ b/include/linux/path.h | |||
@@ -7,7 +7,7 @@ struct vfsmount; | |||
7 | struct path { | 7 | struct path { |
8 | struct vfsmount *mnt; | 8 | struct vfsmount *mnt; |
9 | struct dentry *dentry; | 9 | struct dentry *dentry; |
10 | }; | 10 | } __randomize_layout; |
11 | 11 | ||
12 | extern void path_get(const struct path *); | 12 | extern void path_get(const struct path *); |
13 | extern void path_put(const struct path *); | 13 | extern void path_put(const struct path *); |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index c2a989dee876..b09136f88cf4 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -52,7 +52,7 @@ struct pid_namespace { | |||
52 | int hide_pid; | 52 | int hide_pid; |
53 | int reboot; /* group exit code if this pidns was rebooted */ | 53 | int reboot; /* group exit code if this pidns was rebooted */ |
54 | struct ns_common ns; | 54 | struct ns_common ns; |
55 | }; | 55 | } __randomize_layout; |
56 | 56 | ||
57 | extern struct pid_namespace init_pid_ns; | 57 | extern struct pid_namespace init_pid_ns; |
58 | 58 | ||
diff --git a/include/linux/proc_ns.h b/include/linux/proc_ns.h index 58ab28d81fc2..06844b54dfc1 100644 --- a/include/linux/proc_ns.h +++ b/include/linux/proc_ns.h | |||
@@ -21,7 +21,7 @@ struct proc_ns_operations { | |||
21 | int (*install)(struct nsproxy *nsproxy, struct ns_common *ns); | 21 | int (*install)(struct nsproxy *nsproxy, struct ns_common *ns); |
22 | struct user_namespace *(*owner)(struct ns_common *ns); | 22 | struct user_namespace *(*owner)(struct ns_common *ns); |
23 | struct ns_common *(*get_parent)(struct ns_common *ns); | 23 | struct ns_common *(*get_parent)(struct ns_common *ns); |
24 | }; | 24 | } __randomize_layout; |
25 | 25 | ||
26 | extern const struct proc_ns_operations netns_operations; | 26 | extern const struct proc_ns_operations netns_operations; |
27 | extern const struct proc_ns_operations utsns_operations; | 27 | extern const struct proc_ns_operations utsns_operations; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2ba9ec93423f..8337e2db0bb2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -426,7 +426,7 @@ struct sched_rt_entity { | |||
426 | /* rq "owned" by this entity/group: */ | 426 | /* rq "owned" by this entity/group: */ |
427 | struct rt_rq *my_q; | 427 | struct rt_rq *my_q; |
428 | #endif | 428 | #endif |
429 | }; | 429 | } __randomize_layout; |
430 | 430 | ||
431 | struct sched_dl_entity { | 431 | struct sched_dl_entity { |
432 | struct rb_node rb_node; | 432 | struct rb_node rb_node; |
@@ -526,6 +526,13 @@ struct task_struct { | |||
526 | #endif | 526 | #endif |
527 | /* -1 unrunnable, 0 runnable, >0 stopped: */ | 527 | /* -1 unrunnable, 0 runnable, >0 stopped: */ |
528 | volatile long state; | 528 | volatile long state; |
529 | |||
530 | /* | ||
531 | * This begins the randomizable portion of task_struct. Only | ||
532 | * scheduling-critical items should be added above here. | ||
533 | */ | ||
534 | randomized_struct_fields_start | ||
535 | |||
529 | void *stack; | 536 | void *stack; |
530 | atomic_t usage; | 537 | atomic_t usage; |
531 | /* Per task flags (PF_*), defined further below: */ | 538 | /* Per task flags (PF_*), defined further below: */ |
@@ -1079,6 +1086,13 @@ struct task_struct { | |||
1079 | /* Used by LSM modules for access restriction: */ | 1086 | /* Used by LSM modules for access restriction: */ |
1080 | void *security; | 1087 | void *security; |
1081 | #endif | 1088 | #endif |
1089 | |||
1090 | /* | ||
1091 | * New fields for task_struct should be added above here, so that | ||
1092 | * they are included in the randomized portion of task_struct. | ||
1093 | */ | ||
1094 | randomized_struct_fields_end | ||
1095 | |||
1082 | /* CPU-specific state of this task: */ | 1096 | /* CPU-specific state of this task: */ |
1083 | struct thread_struct thread; | 1097 | struct thread_struct thread; |
1084 | 1098 | ||
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index c06d63b3a583..2a0dd40b15db 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h | |||
@@ -222,7 +222,7 @@ struct signal_struct { | |||
222 | struct mutex cred_guard_mutex; /* guard against foreign influences on | 222 | struct mutex cred_guard_mutex; /* guard against foreign influences on |
223 | * credential calculations | 223 | * credential calculations |
224 | * (notably. ptrace) */ | 224 | * (notably. ptrace) */ |
225 | }; | 225 | } __randomize_layout; |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Bits in flags field of signal_struct. | 228 | * Bits in flags field of signal_struct. |
diff --git a/include/linux/sem.h b/include/linux/sem.h index be5cf2ea14ad..de2deb8676bd 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -41,7 +41,7 @@ struct sem_array { | |||
41 | unsigned int use_global_lock;/* >0: global lock required */ | 41 | unsigned int use_global_lock;/* >0: global lock required */ |
42 | 42 | ||
43 | struct sem sems[]; | 43 | struct sem sems[]; |
44 | }; | 44 | } __randomize_layout; |
45 | 45 | ||
46 | #ifdef CONFIG_SYSVIPC | 46 | #ifdef CONFIG_SYSVIPC |
47 | 47 | ||
diff --git a/include/linux/shm.h b/include/linux/shm.h index 04e881829625..0fb7061ec54c 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h | |||
@@ -22,7 +22,7 @@ struct shmid_kernel /* private to the kernel */ | |||
22 | /* The task created the shm object. NULL if the task is dead. */ | 22 | /* The task created the shm object. NULL if the task is dead. */ |
23 | struct task_struct *shm_creator; | 23 | struct task_struct *shm_creator; |
24 | struct list_head shm_clist; /* list by creator */ | 24 | struct list_head shm_clist; /* list by creator */ |
25 | }; | 25 | } __randomize_layout; |
26 | 26 | ||
27 | /* shm_mode upper byte flags */ | 27 | /* shm_mode upper byte flags */ |
28 | #define SHM_DEST 01000 /* segment will be destroyed on last detach */ | 28 | #define SHM_DEST 01000 /* segment will be destroyed on last detach */ |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 3a89b9ff4cdc..1d4dba490fb6 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -120,7 +120,7 @@ struct ctl_table | |||
120 | struct ctl_table_poll *poll; | 120 | struct ctl_table_poll *poll; |
121 | void *extra1; | 121 | void *extra1; |
122 | void *extra2; | 122 | void *extra2; |
123 | }; | 123 | } __randomize_layout; |
124 | 124 | ||
125 | struct ctl_node { | 125 | struct ctl_node { |
126 | struct rb_node node; | 126 | struct rb_node node; |
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index f73cedfa2e0b..536c80ff7ad9 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h | |||
@@ -338,7 +338,7 @@ enum { | |||
338 | struct trace_event_file { | 338 | struct trace_event_file { |
339 | struct list_head list; | 339 | struct list_head list; |
340 | struct trace_event_call *event_call; | 340 | struct trace_event_call *event_call; |
341 | struct event_filter *filter; | 341 | struct event_filter __rcu *filter; |
342 | struct dentry *dir; | 342 | struct dentry *dir; |
343 | struct trace_array *tr; | 343 | struct trace_array *tr; |
344 | struct trace_subsystem_dir *system; | 344 | struct trace_subsystem_dir *system; |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 69464c0d8068..79c30daf46a9 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -332,7 +332,7 @@ struct tty_struct { | |||
332 | /* If the tty has a pending do_SAK, queue it here - akpm */ | 332 | /* If the tty has a pending do_SAK, queue it here - akpm */ |
333 | struct work_struct SAK_work; | 333 | struct work_struct SAK_work; |
334 | struct tty_port *port; | 334 | struct tty_port *port; |
335 | }; | 335 | } __randomize_layout; |
336 | 336 | ||
337 | /* Each of a tty's open files has private_data pointing to tty_file_private */ | 337 | /* Each of a tty's open files has private_data pointing to tty_file_private */ |
338 | struct tty_file_private { | 338 | struct tty_file_private { |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index b742b5e47cc2..00b2213f6a35 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -291,7 +291,7 @@ struct tty_operations { | |||
291 | void (*poll_put_char)(struct tty_driver *driver, int line, char ch); | 291 | void (*poll_put_char)(struct tty_driver *driver, int line, char ch); |
292 | #endif | 292 | #endif |
293 | const struct file_operations *proc_fops; | 293 | const struct file_operations *proc_fops; |
294 | }; | 294 | } __randomize_layout; |
295 | 295 | ||
296 | struct tty_driver { | 296 | struct tty_driver { |
297 | int magic; /* magic number for this structure */ | 297 | int magic; /* magic number for this structure */ |
@@ -325,7 +325,7 @@ struct tty_driver { | |||
325 | 325 | ||
326 | const struct tty_operations *ops; | 326 | const struct tty_operations *ops; |
327 | struct list_head tty_drivers; | 327 | struct list_head tty_drivers; |
328 | }; | 328 | } __randomize_layout; |
329 | 329 | ||
330 | extern struct list_head tty_drivers; | 330 | extern struct list_head tty_drivers; |
331 | 331 | ||
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h index c5f2158ab00e..fd73bc0e9027 100644 --- a/include/linux/usb/audio-v2.h +++ b/include/linux/usb/audio-v2.h | |||
@@ -115,13 +115,13 @@ struct uac2_input_terminal_descriptor { | |||
115 | __u8 bDescriptorType; | 115 | __u8 bDescriptorType; |
116 | __u8 bDescriptorSubtype; | 116 | __u8 bDescriptorSubtype; |
117 | __u8 bTerminalID; | 117 | __u8 bTerminalID; |
118 | __u16 wTerminalType; | 118 | __le16 wTerminalType; |
119 | __u8 bAssocTerminal; | 119 | __u8 bAssocTerminal; |
120 | __u8 bCSourceID; | 120 | __u8 bCSourceID; |
121 | __u8 bNrChannels; | 121 | __u8 bNrChannels; |
122 | __u32 bmChannelConfig; | 122 | __le32 bmChannelConfig; |
123 | __u8 iChannelNames; | 123 | __u8 iChannelNames; |
124 | __u16 bmControls; | 124 | __le16 bmControls; |
125 | __u8 iTerminal; | 125 | __u8 iTerminal; |
126 | } __attribute__((packed)); | 126 | } __attribute__((packed)); |
127 | 127 | ||
@@ -132,11 +132,11 @@ struct uac2_output_terminal_descriptor { | |||
132 | __u8 bDescriptorType; | 132 | __u8 bDescriptorType; |
133 | __u8 bDescriptorSubtype; | 133 | __u8 bDescriptorSubtype; |
134 | __u8 bTerminalID; | 134 | __u8 bTerminalID; |
135 | __u16 wTerminalType; | 135 | __le16 wTerminalType; |
136 | __u8 bAssocTerminal; | 136 | __u8 bAssocTerminal; |
137 | __u8 bSourceID; | 137 | __u8 bSourceID; |
138 | __u8 bCSourceID; | 138 | __u8 bCSourceID; |
139 | __u16 bmControls; | 139 | __le16 bmControls; |
140 | __u8 iTerminal; | 140 | __u8 iTerminal; |
141 | } __attribute__((packed)); | 141 | } __attribute__((packed)); |
142 | 142 | ||
@@ -164,9 +164,9 @@ struct uac2_as_header_descriptor { | |||
164 | __u8 bTerminalLink; | 164 | __u8 bTerminalLink; |
165 | __u8 bmControls; | 165 | __u8 bmControls; |
166 | __u8 bFormatType; | 166 | __u8 bFormatType; |
167 | __u32 bmFormats; | 167 | __le32 bmFormats; |
168 | __u8 bNrChannels; | 168 | __u8 bNrChannels; |
169 | __u32 bmChannelConfig; | 169 | __le32 bmChannelConfig; |
170 | __u8 iChannelNames; | 170 | __u8 iChannelNames; |
171 | } __attribute__((packed)); | 171 | } __attribute__((packed)); |
172 | 172 | ||
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index 021f7a88f52c..1a59699cf82a 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
@@ -83,6 +83,7 @@ | |||
83 | /* Driver flags */ | 83 | /* Driver flags */ |
84 | #define CDC_NCM_FLAG_NDP_TO_END 0x02 /* NDP is placed at end of frame */ | 84 | #define CDC_NCM_FLAG_NDP_TO_END 0x02 /* NDP is placed at end of frame */ |
85 | #define CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE 0x04 /* Avoid altsetting toggle during init */ | 85 | #define CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE 0x04 /* Avoid altsetting toggle during init */ |
86 | #define CDC_NCM_FLAG_RESET_NTB16 0x08 /* set NDP16 one more time after altsetting switch */ | ||
86 | 87 | ||
87 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ | 88 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ |
88 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) | 89 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 32354b4b4b2b..b3575ce29148 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -66,7 +66,7 @@ struct user_namespace { | |||
66 | #endif | 66 | #endif |
67 | struct ucounts *ucounts; | 67 | struct ucounts *ucounts; |
68 | int ucount_max[UCOUNT_COUNTS]; | 68 | int ucount_max[UCOUNT_COUNTS]; |
69 | }; | 69 | } __randomize_layout; |
70 | 70 | ||
71 | struct ucounts { | 71 | struct ucounts { |
72 | struct hlist_node node; | 72 | struct hlist_node node; |
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index 60f0bb83b313..da826ed059cf 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
@@ -26,7 +26,7 @@ struct uts_namespace { | |||
26 | struct user_namespace *user_ns; | 26 | struct user_namespace *user_ns; |
27 | struct ucounts *ucounts; | 27 | struct ucounts *ucounts; |
28 | struct ns_common ns; | 28 | struct ns_common ns; |
29 | }; | 29 | } __randomize_layout; |
30 | extern struct uts_namespace init_uts_ns; | 30 | extern struct uts_namespace init_uts_ns; |
31 | 31 | ||
32 | #ifdef CONFIG_UTS_NS | 32 | #ifdef CONFIG_UTS_NS |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 678e4d6fa317..53b1a2cca421 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -37,7 +37,7 @@ struct unix_skb_parms { | |||
37 | u32 secid; /* Security ID */ | 37 | u32 secid; /* Security ID */ |
38 | #endif | 38 | #endif |
39 | u32 consumed; | 39 | u32 consumed; |
40 | }; | 40 | } __randomize_layout; |
41 | 41 | ||
42 | #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb)) | 42 | #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb)) |
43 | 43 | ||
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index afc39e3a3f7c..9816df225af3 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -156,7 +156,7 @@ struct neighbour { | |||
156 | struct rcu_head rcu; | 156 | struct rcu_head rcu; |
157 | struct net_device *dev; | 157 | struct net_device *dev; |
158 | u8 primary_key[0]; | 158 | u8 primary_key[0]; |
159 | }; | 159 | } __randomize_layout; |
160 | 160 | ||
161 | struct neigh_ops { | 161 | struct neigh_ops { |
162 | int family; | 162 | int family; |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 31a2b51bef2c..1c401bd4c2e0 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -148,7 +148,7 @@ struct net { | |||
148 | #endif | 148 | #endif |
149 | struct sock *diag_nlsk; | 149 | struct sock *diag_nlsk; |
150 | atomic_t fnhe_genid; | 150 | atomic_t fnhe_genid; |
151 | }; | 151 | } __randomize_layout; |
152 | 152 | ||
153 | #include <linux/seq_file_net.h> | 153 | #include <linux/seq_file_net.h> |
154 | 154 | ||
diff --git a/include/net/netlink.h b/include/net/netlink.h index 01709172b3d3..ef8e6c3a80a6 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -98,8 +98,8 @@ | |||
98 | * nla_put_u8(skb, type, value) add u8 attribute to skb | 98 | * nla_put_u8(skb, type, value) add u8 attribute to skb |
99 | * nla_put_u16(skb, type, value) add u16 attribute to skb | 99 | * nla_put_u16(skb, type, value) add u16 attribute to skb |
100 | * nla_put_u32(skb, type, value) add u32 attribute to skb | 100 | * nla_put_u32(skb, type, value) add u32 attribute to skb |
101 | * nla_put_u64_64bits(skb, type, | 101 | * nla_put_u64_64bit(skb, type, |
102 | * value, padattr) add u64 attribute to skb | 102 | * value, padattr) add u64 attribute to skb |
103 | * nla_put_s8(skb, type, value) add s8 attribute to skb | 103 | * nla_put_s8(skb, type, value) add s8 attribute to skb |
104 | * nla_put_s16(skb, type, value) add s16 attribute to skb | 104 | * nla_put_s16(skb, type, value) add s16 attribute to skb |
105 | * nla_put_s32(skb, type, value) add s32 attribute to skb | 105 | * nla_put_s32(skb, type, value) add s32 attribute to skb |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index a9519a06a23b..980807d7506f 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -469,6 +469,8 @@ _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member) | |||
469 | 469 | ||
470 | #define _sctp_walk_params(pos, chunk, end, member)\ | 470 | #define _sctp_walk_params(pos, chunk, end, member)\ |
471 | for (pos.v = chunk->member;\ | 471 | for (pos.v = chunk->member;\ |
472 | (pos.v + offsetof(struct sctp_paramhdr, length) + sizeof(pos.p->length) <\ | ||
473 | (void *)chunk + end) &&\ | ||
472 | pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ | 474 | pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ |
473 | ntohs(pos.p->length) >= sizeof(struct sctp_paramhdr);\ | 475 | ntohs(pos.p->length) >= sizeof(struct sctp_paramhdr);\ |
474 | pos.v += SCTP_PAD4(ntohs(pos.p->length))) | 476 | pos.v += SCTP_PAD4(ntohs(pos.p->length))) |
@@ -479,6 +481,8 @@ _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length)) | |||
479 | #define _sctp_walk_errors(err, chunk_hdr, end)\ | 481 | #define _sctp_walk_errors(err, chunk_hdr, end)\ |
480 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ | 482 | for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ |
481 | sizeof(struct sctp_chunkhdr));\ | 483 | sizeof(struct sctp_chunkhdr));\ |
484 | ((void *)err + offsetof(sctp_errhdr_t, length) + sizeof(err->length) <\ | ||
485 | (void *)chunk_hdr + end) &&\ | ||
482 | (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ | 486 | (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ |
483 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ | 487 | ntohs(err->length) >= sizeof(sctp_errhdr_t); \ |
484 | err = (sctp_errhdr_t *)((void *)err + SCTP_PAD4(ntohs(err->length)))) | 488 | err = (sctp_errhdr_t *)((void *)err + SCTP_PAD4(ntohs(err->length)))) |
diff --git a/include/net/sock.h b/include/net/sock.h index f69c8c2782df..7c0632c7e870 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1128,7 +1128,7 @@ struct proto { | |||
1128 | atomic_t socks; | 1128 | atomic_t socks; |
1129 | #endif | 1129 | #endif |
1130 | int (*diag_destroy)(struct sock *sk, int err); | 1130 | int (*diag_destroy)(struct sock *sk, int err); |
1131 | }; | 1131 | } __randomize_layout; |
1132 | 1132 | ||
1133 | int proto_register(struct proto *prot, int alloc_slab); | 1133 | int proto_register(struct proto *prot, int alloc_slab); |
1134 | void proto_unregister(struct proto *prot); | 1134 | void proto_unregister(struct proto *prot); |
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index 4b34c51f859e..b73a14edc85e 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h | |||
@@ -205,11 +205,13 @@ static inline void iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr, | |||
205 | dev = dev_get_by_index(&init_net, dev_addr->bound_dev_if); | 205 | dev = dev_get_by_index(&init_net, dev_addr->bound_dev_if); |
206 | if (dev) { | 206 | if (dev) { |
207 | ip4 = in_dev_get(dev); | 207 | ip4 = in_dev_get(dev); |
208 | if (ip4 && ip4->ifa_list && ip4->ifa_list->ifa_address) { | 208 | if (ip4 && ip4->ifa_list && ip4->ifa_list->ifa_address) |
209 | ipv6_addr_set_v4mapped(ip4->ifa_list->ifa_address, | 209 | ipv6_addr_set_v4mapped(ip4->ifa_list->ifa_address, |
210 | (struct in6_addr *)gid); | 210 | (struct in6_addr *)gid); |
211 | |||
212 | if (ip4) | ||
211 | in_dev_put(ip4); | 213 | in_dev_put(ip4); |
212 | } | 214 | |
213 | dev_put(dev); | 215 | dev_put(dev); |
214 | } | 216 | } |
215 | } | 217 | } |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 356953d3dbd1..b5732432bb29 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -1056,7 +1056,7 @@ enum ib_qp_create_flags { | |||
1056 | IB_QP_CREATE_MANAGED_RECV = 1 << 4, | 1056 | IB_QP_CREATE_MANAGED_RECV = 1 << 4, |
1057 | IB_QP_CREATE_NETIF_QP = 1 << 5, | 1057 | IB_QP_CREATE_NETIF_QP = 1 << 5, |
1058 | IB_QP_CREATE_SIGNATURE_EN = 1 << 6, | 1058 | IB_QP_CREATE_SIGNATURE_EN = 1 << 6, |
1059 | IB_QP_CREATE_USE_GFP_NOIO = 1 << 7, | 1059 | /* FREE = 1 << 7, */ |
1060 | IB_QP_CREATE_SCATTER_FCS = 1 << 8, | 1060 | IB_QP_CREATE_SCATTER_FCS = 1 << 8, |
1061 | IB_QP_CREATE_CVLAN_STRIPPING = 1 << 9, | 1061 | IB_QP_CREATE_CVLAN_STRIPPING = 1 << 9, |
1062 | /* reserve bits 26-31 for low level drivers' internal use */ | 1062 | /* reserve bits 26-31 for low level drivers' internal use */ |
@@ -2948,6 +2948,22 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd, | |||
2948 | struct ib_qp_init_attr *qp_init_attr); | 2948 | struct ib_qp_init_attr *qp_init_attr); |
2949 | 2949 | ||
2950 | /** | 2950 | /** |
2951 | * ib_modify_qp_with_udata - Modifies the attributes for the specified QP. | ||
2952 | * @qp: The QP to modify. | ||
2953 | * @attr: On input, specifies the QP attributes to modify. On output, | ||
2954 | * the current values of selected QP attributes are returned. | ||
2955 | * @attr_mask: A bit-mask used to specify which attributes of the QP | ||
2956 | * are being modified. | ||
2957 | * @udata: pointer to user's input output buffer information | ||
2958 | * are being modified. | ||
2959 | * It returns 0 on success and returns appropriate error code on error. | ||
2960 | */ | ||
2961 | int ib_modify_qp_with_udata(struct ib_qp *qp, | ||
2962 | struct ib_qp_attr *attr, | ||
2963 | int attr_mask, | ||
2964 | struct ib_udata *udata); | ||
2965 | |||
2966 | /** | ||
2951 | * ib_modify_qp - Modifies the attributes for the specified QP and then | 2967 | * ib_modify_qp - Modifies the attributes for the specified QP and then |
2952 | * transitions the QP to the given state. | 2968 | * transitions the QP to the given state. |
2953 | * @qp: The QP to modify. | 2969 | * @qp: The QP to modify. |
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index 4878aaf7bdff..55af69271053 100644 --- a/include/rdma/rdma_vt.h +++ b/include/rdma/rdma_vt.h | |||
@@ -229,8 +229,7 @@ struct rvt_driver_provided { | |||
229 | * ERR_PTR(err). The driver is free to return NULL or a valid | 229 | * ERR_PTR(err). The driver is free to return NULL or a valid |
230 | * pointer. | 230 | * pointer. |
231 | */ | 231 | */ |
232 | void * (*qp_priv_alloc)(struct rvt_dev_info *rdi, struct rvt_qp *qp, | 232 | void * (*qp_priv_alloc)(struct rvt_dev_info *rdi, struct rvt_qp *qp); |
233 | gfp_t gfp); | ||
234 | 233 | ||
235 | /* | 234 | /* |
236 | * Free the driver's private qp structure. | 235 | * Free the driver's private qp structure. |
@@ -319,7 +318,7 @@ struct rvt_driver_provided { | |||
319 | 318 | ||
320 | /* Let the driver pick the next queue pair number*/ | 319 | /* Let the driver pick the next queue pair number*/ |
321 | int (*alloc_qpn)(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, | 320 | int (*alloc_qpn)(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt, |
322 | enum ib_qp_type type, u8 port_num, gfp_t gfp); | 321 | enum ib_qp_type type, u8 port_num); |
323 | 322 | ||
324 | /* Determine if its safe or allowed to modify the qp */ | 323 | /* Determine if its safe or allowed to modify the qp */ |
325 | int (*check_modify_qp)(struct rvt_qp *qp, struct ib_qp_attr *attr, | 324 | int (*check_modify_qp)(struct rvt_qp *qp, struct ib_qp_attr *attr, |
diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h index be6472e5b06b..d664d2e76280 100644 --- a/include/rdma/rdmavt_qp.h +++ b/include/rdma/rdmavt_qp.h | |||
@@ -647,6 +647,20 @@ static inline u32 rvt_div_mtu(struct rvt_qp *qp, u32 len) | |||
647 | return len >> qp->log_pmtu; | 647 | return len >> qp->log_pmtu; |
648 | } | 648 | } |
649 | 649 | ||
650 | /** | ||
651 | * rvt_timeout_to_jiffies - Convert a ULP timeout input into jiffies | ||
652 | * @timeout - timeout input(0 - 31). | ||
653 | * | ||
654 | * Return a timeout value in jiffies. | ||
655 | */ | ||
656 | static inline unsigned long rvt_timeout_to_jiffies(u8 timeout) | ||
657 | { | ||
658 | if (timeout > 31) | ||
659 | timeout = 31; | ||
660 | |||
661 | return usecs_to_jiffies(1U << timeout) * 4096UL / 1000UL; | ||
662 | } | ||
663 | |||
650 | extern const int ib_rvt_state_ops[]; | 664 | extern const int ib_rvt_state_ops[]; |
651 | 665 | ||
652 | struct rvt_dev_info; | 666 | struct rvt_dev_info; |
diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h index 06d5f7ddf84e..14baf9f23a14 100644 --- a/include/uapi/asm-generic/ioctls.h +++ b/include/uapi/asm-generic/ioctls.h | |||
@@ -77,7 +77,7 @@ | |||
77 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ | 77 | #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ |
78 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ | 78 | #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ |
79 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ | 79 | #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ |
80 | #define TIOCGPTPEER _IOR('T', 0x41, int) /* Safely open the slave */ | 80 | #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ |
81 | 81 | ||
82 | #define FIONCLEX 0x5450 | 82 | #define FIONCLEX 0x5450 |
83 | #define FIOCLEX 0x5451 | 83 | #define FIOCLEX 0x5451 |
diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h index d2314be4f0c0..a4680a5bf5dd 100644 --- a/include/uapi/linux/usb/audio.h +++ b/include/uapi/linux/usb/audio.h | |||
@@ -333,7 +333,7 @@ struct uac_processing_unit_descriptor { | |||
333 | __u8 bDescriptorType; | 333 | __u8 bDescriptorType; |
334 | __u8 bDescriptorSubtype; | 334 | __u8 bDescriptorSubtype; |
335 | __u8 bUnitID; | 335 | __u8 bUnitID; |
336 | __u16 wProcessType; | 336 | __le16 wProcessType; |
337 | __u8 bNrInPins; | 337 | __u8 bNrInPins; |
338 | __u8 baSourceID[]; | 338 | __u8 baSourceID[]; |
339 | } __attribute__ ((packed)); | 339 | } __attribute__ ((packed)); |
@@ -491,8 +491,8 @@ struct uac_format_type_ii_ext_descriptor { | |||
491 | __u8 bDescriptorType; | 491 | __u8 bDescriptorType; |
492 | __u8 bDescriptorSubtype; | 492 | __u8 bDescriptorSubtype; |
493 | __u8 bFormatType; | 493 | __u8 bFormatType; |
494 | __u16 wMaxBitRate; | 494 | __le16 wMaxBitRate; |
495 | __u16 wSamplesPerFrame; | 495 | __le16 wSamplesPerFrame; |
496 | __u8 bHeaderLength; | 496 | __u8 bHeaderLength; |
497 | __u8 bSideBandProtocol; | 497 | __u8 bSideBandProtocol; |
498 | } __attribute__((packed)); | 498 | } __attribute__((packed)); |
diff --git a/include/xen/balloon.h b/include/xen/balloon.h index d1767dfb0d95..8906361bb50c 100644 --- a/include/xen/balloon.h +++ b/include/xen/balloon.h | |||
@@ -35,3 +35,11 @@ static inline int register_xen_selfballooning(struct device *dev) | |||
35 | return -ENOSYS; | 35 | return -ENOSYS; |
36 | } | 36 | } |
37 | #endif | 37 | #endif |
38 | |||
39 | #ifdef CONFIG_XEN_BALLOON | ||
40 | void xen_balloon_init(void); | ||
41 | #else | ||
42 | static inline void xen_balloon_init(void) | ||
43 | { | ||
44 | } | ||
45 | #endif | ||
diff --git a/kernel/audit.c b/kernel/audit.c index 833267bbd80b..6dd556931739 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -641,6 +641,7 @@ static int auditd_send_unicast_skb(struct sk_buff *skb) | |||
641 | ac = rcu_dereference(auditd_conn); | 641 | ac = rcu_dereference(auditd_conn); |
642 | if (!ac) { | 642 | if (!ac) { |
643 | rcu_read_unlock(); | 643 | rcu_read_unlock(); |
644 | kfree_skb(skb); | ||
644 | rc = -ECONNREFUSED; | 645 | rc = -ECONNREFUSED; |
645 | goto err; | 646 | goto err; |
646 | } | 647 | } |
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 6a86723c5b64..af9e84a4944e 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c | |||
@@ -504,6 +504,7 @@ static void reset_reg_range_values(struct bpf_reg_state *regs, u32 regno) | |||
504 | { | 504 | { |
505 | regs[regno].min_value = BPF_REGISTER_MIN_RANGE; | 505 | regs[regno].min_value = BPF_REGISTER_MIN_RANGE; |
506 | regs[regno].max_value = BPF_REGISTER_MAX_RANGE; | 506 | regs[regno].max_value = BPF_REGISTER_MAX_RANGE; |
507 | regs[regno].value_from_signed = false; | ||
507 | regs[regno].min_align = 0; | 508 | regs[regno].min_align = 0; |
508 | } | 509 | } |
509 | 510 | ||
@@ -777,12 +778,13 @@ static int check_ctx_access(struct bpf_verifier_env *env, int insn_idx, int off, | |||
777 | return -EACCES; | 778 | return -EACCES; |
778 | } | 779 | } |
779 | 780 | ||
780 | static bool is_pointer_value(struct bpf_verifier_env *env, int regno) | 781 | static bool __is_pointer_value(bool allow_ptr_leaks, |
782 | const struct bpf_reg_state *reg) | ||
781 | { | 783 | { |
782 | if (env->allow_ptr_leaks) | 784 | if (allow_ptr_leaks) |
783 | return false; | 785 | return false; |
784 | 786 | ||
785 | switch (env->cur_state.regs[regno].type) { | 787 | switch (reg->type) { |
786 | case UNKNOWN_VALUE: | 788 | case UNKNOWN_VALUE: |
787 | case CONST_IMM: | 789 | case CONST_IMM: |
788 | return false; | 790 | return false; |
@@ -791,6 +793,11 @@ static bool is_pointer_value(struct bpf_verifier_env *env, int regno) | |||
791 | } | 793 | } |
792 | } | 794 | } |
793 | 795 | ||
796 | static bool is_pointer_value(struct bpf_verifier_env *env, int regno) | ||
797 | { | ||
798 | return __is_pointer_value(env->allow_ptr_leaks, &env->cur_state.regs[regno]); | ||
799 | } | ||
800 | |||
794 | static int check_pkt_ptr_alignment(const struct bpf_reg_state *reg, | 801 | static int check_pkt_ptr_alignment(const struct bpf_reg_state *reg, |
795 | int off, int size, bool strict) | 802 | int off, int size, bool strict) |
796 | { | 803 | { |
@@ -1832,10 +1839,24 @@ static void adjust_reg_min_max_vals(struct bpf_verifier_env *env, | |||
1832 | dst_align = dst_reg->min_align; | 1839 | dst_align = dst_reg->min_align; |
1833 | 1840 | ||
1834 | /* We don't know anything about what was done to this register, mark it | 1841 | /* We don't know anything about what was done to this register, mark it |
1835 | * as unknown. | 1842 | * as unknown. Also, if both derived bounds came from signed/unsigned |
1843 | * mixed compares and one side is unbounded, we cannot really do anything | ||
1844 | * with them as boundaries cannot be trusted. Thus, arithmetic of two | ||
1845 | * regs of such kind will get invalidated bounds on the dst side. | ||
1836 | */ | 1846 | */ |
1837 | if (min_val == BPF_REGISTER_MIN_RANGE && | 1847 | if ((min_val == BPF_REGISTER_MIN_RANGE && |
1838 | max_val == BPF_REGISTER_MAX_RANGE) { | 1848 | max_val == BPF_REGISTER_MAX_RANGE) || |
1849 | (BPF_SRC(insn->code) == BPF_X && | ||
1850 | ((min_val != BPF_REGISTER_MIN_RANGE && | ||
1851 | max_val == BPF_REGISTER_MAX_RANGE) || | ||
1852 | (min_val == BPF_REGISTER_MIN_RANGE && | ||
1853 | max_val != BPF_REGISTER_MAX_RANGE) || | ||
1854 | (dst_reg->min_value != BPF_REGISTER_MIN_RANGE && | ||
1855 | dst_reg->max_value == BPF_REGISTER_MAX_RANGE) || | ||
1856 | (dst_reg->min_value == BPF_REGISTER_MIN_RANGE && | ||
1857 | dst_reg->max_value != BPF_REGISTER_MAX_RANGE)) && | ||
1858 | regs[insn->dst_reg].value_from_signed != | ||
1859 | regs[insn->src_reg].value_from_signed)) { | ||
1839 | reset_reg_range_values(regs, insn->dst_reg); | 1860 | reset_reg_range_values(regs, insn->dst_reg); |
1840 | return; | 1861 | return; |
1841 | } | 1862 | } |
@@ -2023,6 +2044,7 @@ static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) | |||
2023 | regs[insn->dst_reg].max_value = insn->imm; | 2044 | regs[insn->dst_reg].max_value = insn->imm; |
2024 | regs[insn->dst_reg].min_value = insn->imm; | 2045 | regs[insn->dst_reg].min_value = insn->imm; |
2025 | regs[insn->dst_reg].min_align = calc_align(insn->imm); | 2046 | regs[insn->dst_reg].min_align = calc_align(insn->imm); |
2047 | regs[insn->dst_reg].value_from_signed = false; | ||
2026 | } | 2048 | } |
2027 | 2049 | ||
2028 | } else if (opcode > BPF_END) { | 2050 | } else if (opcode > BPF_END) { |
@@ -2198,40 +2220,63 @@ static void reg_set_min_max(struct bpf_reg_state *true_reg, | |||
2198 | struct bpf_reg_state *false_reg, u64 val, | 2220 | struct bpf_reg_state *false_reg, u64 val, |
2199 | u8 opcode) | 2221 | u8 opcode) |
2200 | { | 2222 | { |
2223 | bool value_from_signed = true; | ||
2224 | bool is_range = true; | ||
2225 | |||
2201 | switch (opcode) { | 2226 | switch (opcode) { |
2202 | case BPF_JEQ: | 2227 | case BPF_JEQ: |
2203 | /* If this is false then we know nothing Jon Snow, but if it is | 2228 | /* If this is false then we know nothing Jon Snow, but if it is |
2204 | * true then we know for sure. | 2229 | * true then we know for sure. |
2205 | */ | 2230 | */ |
2206 | true_reg->max_value = true_reg->min_value = val; | 2231 | true_reg->max_value = true_reg->min_value = val; |
2232 | is_range = false; | ||
2207 | break; | 2233 | break; |
2208 | case BPF_JNE: | 2234 | case BPF_JNE: |
2209 | /* If this is true we know nothing Jon Snow, but if it is false | 2235 | /* If this is true we know nothing Jon Snow, but if it is false |
2210 | * we know the value for sure; | 2236 | * we know the value for sure; |
2211 | */ | 2237 | */ |
2212 | false_reg->max_value = false_reg->min_value = val; | 2238 | false_reg->max_value = false_reg->min_value = val; |
2239 | is_range = false; | ||
2213 | break; | 2240 | break; |
2214 | case BPF_JGT: | 2241 | case BPF_JGT: |
2215 | /* Unsigned comparison, the minimum value is 0. */ | 2242 | value_from_signed = false; |
2216 | false_reg->min_value = 0; | ||
2217 | /* fallthrough */ | 2243 | /* fallthrough */ |
2218 | case BPF_JSGT: | 2244 | case BPF_JSGT: |
2245 | if (true_reg->value_from_signed != value_from_signed) | ||
2246 | reset_reg_range_values(true_reg, 0); | ||
2247 | if (false_reg->value_from_signed != value_from_signed) | ||
2248 | reset_reg_range_values(false_reg, 0); | ||
2249 | if (opcode == BPF_JGT) { | ||
2250 | /* Unsigned comparison, the minimum value is 0. */ | ||
2251 | false_reg->min_value = 0; | ||
2252 | } | ||
2219 | /* If this is false then we know the maximum val is val, | 2253 | /* If this is false then we know the maximum val is val, |
2220 | * otherwise we know the min val is val+1. | 2254 | * otherwise we know the min val is val+1. |
2221 | */ | 2255 | */ |
2222 | false_reg->max_value = val; | 2256 | false_reg->max_value = val; |
2257 | false_reg->value_from_signed = value_from_signed; | ||
2223 | true_reg->min_value = val + 1; | 2258 | true_reg->min_value = val + 1; |
2259 | true_reg->value_from_signed = value_from_signed; | ||
2224 | break; | 2260 | break; |
2225 | case BPF_JGE: | 2261 | case BPF_JGE: |
2226 | /* Unsigned comparison, the minimum value is 0. */ | 2262 | value_from_signed = false; |
2227 | false_reg->min_value = 0; | ||
2228 | /* fallthrough */ | 2263 | /* fallthrough */ |
2229 | case BPF_JSGE: | 2264 | case BPF_JSGE: |
2265 | if (true_reg->value_from_signed != value_from_signed) | ||
2266 | reset_reg_range_values(true_reg, 0); | ||
2267 | if (false_reg->value_from_signed != value_from_signed) | ||
2268 | reset_reg_range_values(false_reg, 0); | ||
2269 | if (opcode == BPF_JGE) { | ||
2270 | /* Unsigned comparison, the minimum value is 0. */ | ||
2271 | false_reg->min_value = 0; | ||
2272 | } | ||
2230 | /* If this is false then we know the maximum value is val - 1, | 2273 | /* If this is false then we know the maximum value is val - 1, |
2231 | * otherwise we know the mimimum value is val. | 2274 | * otherwise we know the mimimum value is val. |
2232 | */ | 2275 | */ |
2233 | false_reg->max_value = val - 1; | 2276 | false_reg->max_value = val - 1; |
2277 | false_reg->value_from_signed = value_from_signed; | ||
2234 | true_reg->min_value = val; | 2278 | true_reg->min_value = val; |
2279 | true_reg->value_from_signed = value_from_signed; | ||
2235 | break; | 2280 | break; |
2236 | default: | 2281 | default: |
2237 | break; | 2282 | break; |
@@ -2239,6 +2284,12 @@ static void reg_set_min_max(struct bpf_reg_state *true_reg, | |||
2239 | 2284 | ||
2240 | check_reg_overflow(false_reg); | 2285 | check_reg_overflow(false_reg); |
2241 | check_reg_overflow(true_reg); | 2286 | check_reg_overflow(true_reg); |
2287 | if (is_range) { | ||
2288 | if (__is_pointer_value(false, false_reg)) | ||
2289 | reset_reg_range_values(false_reg, 0); | ||
2290 | if (__is_pointer_value(false, true_reg)) | ||
2291 | reset_reg_range_values(true_reg, 0); | ||
2292 | } | ||
2242 | } | 2293 | } |
2243 | 2294 | ||
2244 | /* Same as above, but for the case that dst_reg is a CONST_IMM reg and src_reg | 2295 | /* Same as above, but for the case that dst_reg is a CONST_IMM reg and src_reg |
@@ -2248,41 +2299,64 @@ static void reg_set_min_max_inv(struct bpf_reg_state *true_reg, | |||
2248 | struct bpf_reg_state *false_reg, u64 val, | 2299 | struct bpf_reg_state *false_reg, u64 val, |
2249 | u8 opcode) | 2300 | u8 opcode) |
2250 | { | 2301 | { |
2302 | bool value_from_signed = true; | ||
2303 | bool is_range = true; | ||
2304 | |||
2251 | switch (opcode) { | 2305 | switch (opcode) { |
2252 | case BPF_JEQ: | 2306 | case BPF_JEQ: |
2253 | /* If this is false then we know nothing Jon Snow, but if it is | 2307 | /* If this is false then we know nothing Jon Snow, but if it is |
2254 | * true then we know for sure. | 2308 | * true then we know for sure. |
2255 | */ | 2309 | */ |
2256 | true_reg->max_value = true_reg->min_value = val; | 2310 | true_reg->max_value = true_reg->min_value = val; |
2311 | is_range = false; | ||
2257 | break; | 2312 | break; |
2258 | case BPF_JNE: | 2313 | case BPF_JNE: |
2259 | /* If this is true we know nothing Jon Snow, but if it is false | 2314 | /* If this is true we know nothing Jon Snow, but if it is false |
2260 | * we know the value for sure; | 2315 | * we know the value for sure; |
2261 | */ | 2316 | */ |
2262 | false_reg->max_value = false_reg->min_value = val; | 2317 | false_reg->max_value = false_reg->min_value = val; |
2318 | is_range = false; | ||
2263 | break; | 2319 | break; |
2264 | case BPF_JGT: | 2320 | case BPF_JGT: |
2265 | /* Unsigned comparison, the minimum value is 0. */ | 2321 | value_from_signed = false; |
2266 | true_reg->min_value = 0; | ||
2267 | /* fallthrough */ | 2322 | /* fallthrough */ |
2268 | case BPF_JSGT: | 2323 | case BPF_JSGT: |
2324 | if (true_reg->value_from_signed != value_from_signed) | ||
2325 | reset_reg_range_values(true_reg, 0); | ||
2326 | if (false_reg->value_from_signed != value_from_signed) | ||
2327 | reset_reg_range_values(false_reg, 0); | ||
2328 | if (opcode == BPF_JGT) { | ||
2329 | /* Unsigned comparison, the minimum value is 0. */ | ||
2330 | true_reg->min_value = 0; | ||
2331 | } | ||
2269 | /* | 2332 | /* |
2270 | * If this is false, then the val is <= the register, if it is | 2333 | * If this is false, then the val is <= the register, if it is |
2271 | * true the register <= to the val. | 2334 | * true the register <= to the val. |
2272 | */ | 2335 | */ |
2273 | false_reg->min_value = val; | 2336 | false_reg->min_value = val; |
2337 | false_reg->value_from_signed = value_from_signed; | ||
2274 | true_reg->max_value = val - 1; | 2338 | true_reg->max_value = val - 1; |
2339 | true_reg->value_from_signed = value_from_signed; | ||
2275 | break; | 2340 | break; |
2276 | case BPF_JGE: | 2341 | case BPF_JGE: |
2277 | /* Unsigned comparison, the minimum value is 0. */ | 2342 | value_from_signed = false; |
2278 | true_reg->min_value = 0; | ||
2279 | /* fallthrough */ | 2343 | /* fallthrough */ |
2280 | case BPF_JSGE: | 2344 | case BPF_JSGE: |
2345 | if (true_reg->value_from_signed != value_from_signed) | ||
2346 | reset_reg_range_values(true_reg, 0); | ||
2347 | if (false_reg->value_from_signed != value_from_signed) | ||
2348 | reset_reg_range_values(false_reg, 0); | ||
2349 | if (opcode == BPF_JGE) { | ||
2350 | /* Unsigned comparison, the minimum value is 0. */ | ||
2351 | true_reg->min_value = 0; | ||
2352 | } | ||
2281 | /* If this is false then constant < register, if it is true then | 2353 | /* If this is false then constant < register, if it is true then |
2282 | * the register < constant. | 2354 | * the register < constant. |
2283 | */ | 2355 | */ |
2284 | false_reg->min_value = val + 1; | 2356 | false_reg->min_value = val + 1; |
2357 | false_reg->value_from_signed = value_from_signed; | ||
2285 | true_reg->max_value = val; | 2358 | true_reg->max_value = val; |
2359 | true_reg->value_from_signed = value_from_signed; | ||
2286 | break; | 2360 | break; |
2287 | default: | 2361 | default: |
2288 | break; | 2362 | break; |
@@ -2290,6 +2364,12 @@ static void reg_set_min_max_inv(struct bpf_reg_state *true_reg, | |||
2290 | 2364 | ||
2291 | check_reg_overflow(false_reg); | 2365 | check_reg_overflow(false_reg); |
2292 | check_reg_overflow(true_reg); | 2366 | check_reg_overflow(true_reg); |
2367 | if (is_range) { | ||
2368 | if (__is_pointer_value(false, false_reg)) | ||
2369 | reset_reg_range_values(false_reg, 0); | ||
2370 | if (__is_pointer_value(false, true_reg)) | ||
2371 | reset_reg_range_values(true_reg, 0); | ||
2372 | } | ||
2293 | } | 2373 | } |
2294 | 2374 | ||
2295 | static void mark_map_reg(struct bpf_reg_state *regs, u32 regno, u32 id, | 2375 | static void mark_map_reg(struct bpf_reg_state *regs, u32 regno, u32 id, |
diff --git a/kernel/cpu.c b/kernel/cpu.c index ab860453841d..eee033134262 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -279,7 +279,8 @@ static int bringup_wait_for_ap(unsigned int cpu) | |||
279 | 279 | ||
280 | /* Wait for the CPU to reach CPUHP_AP_ONLINE_IDLE */ | 280 | /* Wait for the CPU to reach CPUHP_AP_ONLINE_IDLE */ |
281 | wait_for_completion(&st->done); | 281 | wait_for_completion(&st->done); |
282 | BUG_ON(!cpu_online(cpu)); | 282 | if (WARN_ON_ONCE((!cpu_online(cpu)))) |
283 | return -ECANCELED; | ||
283 | 284 | ||
284 | /* Unpark the stopper thread and the hotplug thread of the target cpu */ | 285 | /* Unpark the stopper thread and the hotplug thread of the target cpu */ |
285 | stop_machine_unpark(cpu); | 286 | stop_machine_unpark(cpu); |
diff --git a/kernel/events/core.c b/kernel/events/core.c index 1538df9b2b65..426c2ffba16d 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -1452,6 +1452,13 @@ static enum event_type_t get_event_type(struct perf_event *event) | |||
1452 | 1452 | ||
1453 | lockdep_assert_held(&ctx->lock); | 1453 | lockdep_assert_held(&ctx->lock); |
1454 | 1454 | ||
1455 | /* | ||
1456 | * It's 'group type', really, because if our group leader is | ||
1457 | * pinned, so are we. | ||
1458 | */ | ||
1459 | if (event->group_leader != event) | ||
1460 | event = event->group_leader; | ||
1461 | |||
1455 | event_type = event->attr.pinned ? EVENT_PINNED : EVENT_FLEXIBLE; | 1462 | event_type = event->attr.pinned ? EVENT_PINNED : EVENT_FLEXIBLE; |
1456 | if (!ctx->task) | 1463 | if (!ctx->task) |
1457 | event_type |= EVENT_CPU; | 1464 | event_type |= EVENT_CPU; |
@@ -4378,7 +4385,9 @@ EXPORT_SYMBOL_GPL(perf_event_read_value); | |||
4378 | static int __perf_read_group_add(struct perf_event *leader, | 4385 | static int __perf_read_group_add(struct perf_event *leader, |
4379 | u64 read_format, u64 *values) | 4386 | u64 read_format, u64 *values) |
4380 | { | 4387 | { |
4388 | struct perf_event_context *ctx = leader->ctx; | ||
4381 | struct perf_event *sub; | 4389 | struct perf_event *sub; |
4390 | unsigned long flags; | ||
4382 | int n = 1; /* skip @nr */ | 4391 | int n = 1; /* skip @nr */ |
4383 | int ret; | 4392 | int ret; |
4384 | 4393 | ||
@@ -4408,12 +4417,15 @@ static int __perf_read_group_add(struct perf_event *leader, | |||
4408 | if (read_format & PERF_FORMAT_ID) | 4417 | if (read_format & PERF_FORMAT_ID) |
4409 | values[n++] = primary_event_id(leader); | 4418 | values[n++] = primary_event_id(leader); |
4410 | 4419 | ||
4420 | raw_spin_lock_irqsave(&ctx->lock, flags); | ||
4421 | |||
4411 | list_for_each_entry(sub, &leader->sibling_list, group_entry) { | 4422 | list_for_each_entry(sub, &leader->sibling_list, group_entry) { |
4412 | values[n++] += perf_event_count(sub); | 4423 | values[n++] += perf_event_count(sub); |
4413 | if (read_format & PERF_FORMAT_ID) | 4424 | if (read_format & PERF_FORMAT_ID) |
4414 | values[n++] = primary_event_id(sub); | 4425 | values[n++] = primary_event_id(sub); |
4415 | } | 4426 | } |
4416 | 4427 | ||
4428 | raw_spin_unlock_irqrestore(&ctx->lock, flags); | ||
4417 | return 0; | 4429 | return 0; |
4418 | } | 4430 | } |
4419 | 4431 | ||
@@ -7321,21 +7333,6 @@ int perf_event_account_interrupt(struct perf_event *event) | |||
7321 | return __perf_event_account_interrupt(event, 1); | 7333 | return __perf_event_account_interrupt(event, 1); |
7322 | } | 7334 | } |
7323 | 7335 | ||
7324 | static bool sample_is_allowed(struct perf_event *event, struct pt_regs *regs) | ||
7325 | { | ||
7326 | /* | ||
7327 | * Due to interrupt latency (AKA "skid"), we may enter the | ||
7328 | * kernel before taking an overflow, even if the PMU is only | ||
7329 | * counting user events. | ||
7330 | * To avoid leaking information to userspace, we must always | ||
7331 | * reject kernel samples when exclude_kernel is set. | ||
7332 | */ | ||
7333 | if (event->attr.exclude_kernel && !user_mode(regs)) | ||
7334 | return false; | ||
7335 | |||
7336 | return true; | ||
7337 | } | ||
7338 | |||
7339 | /* | 7336 | /* |
7340 | * Generic event overflow handling, sampling. | 7337 | * Generic event overflow handling, sampling. |
7341 | */ | 7338 | */ |
@@ -7357,12 +7354,6 @@ static int __perf_event_overflow(struct perf_event *event, | |||
7357 | ret = __perf_event_account_interrupt(event, throttle); | 7354 | ret = __perf_event_account_interrupt(event, throttle); |
7358 | 7355 | ||
7359 | /* | 7356 | /* |
7360 | * For security, drop the skid kernel samples if necessary. | ||
7361 | */ | ||
7362 | if (!sample_is_allowed(event, regs)) | ||
7363 | return ret; | ||
7364 | |||
7365 | /* | ||
7366 | * XXX event_limit might not quite work as expected on inherited | 7357 | * XXX event_limit might not quite work as expected on inherited |
7367 | * events | 7358 | * events |
7368 | */ | 7359 | */ |
diff --git a/kernel/futex.c b/kernel/futex.c index c934689043b2..16dbe4c93895 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -212,7 +212,7 @@ struct futex_pi_state { | |||
212 | atomic_t refcount; | 212 | atomic_t refcount; |
213 | 213 | ||
214 | union futex_key key; | 214 | union futex_key key; |
215 | }; | 215 | } __randomize_layout; |
216 | 216 | ||
217 | /** | 217 | /** |
218 | * struct futex_q - The hashed futex queue entry, one per waiting task | 218 | * struct futex_q - The hashed futex queue entry, one per waiting task |
@@ -246,7 +246,7 @@ struct futex_q { | |||
246 | struct rt_mutex_waiter *rt_waiter; | 246 | struct rt_mutex_waiter *rt_waiter; |
247 | union futex_key *requeue_pi_key; | 247 | union futex_key *requeue_pi_key; |
248 | u32 bitset; | 248 | u32 bitset; |
249 | }; | 249 | } __randomize_layout; |
250 | 250 | ||
251 | static const struct futex_q futex_q_init = { | 251 | static const struct futex_q futex_q_init = { |
252 | /* list gets initialized in queue_me()*/ | 252 | /* list gets initialized in queue_me()*/ |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index d171bc57e1e0..a3cc37c0c85e 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -170,21 +170,11 @@ static void irq_state_clr_disabled(struct irq_desc *desc) | |||
170 | irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); | 170 | irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); |
171 | } | 171 | } |
172 | 172 | ||
173 | static void irq_state_set_disabled(struct irq_desc *desc) | ||
174 | { | ||
175 | irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED); | ||
176 | } | ||
177 | |||
178 | static void irq_state_clr_masked(struct irq_desc *desc) | 173 | static void irq_state_clr_masked(struct irq_desc *desc) |
179 | { | 174 | { |
180 | irqd_clear(&desc->irq_data, IRQD_IRQ_MASKED); | 175 | irqd_clear(&desc->irq_data, IRQD_IRQ_MASKED); |
181 | } | 176 | } |
182 | 177 | ||
183 | static void irq_state_set_masked(struct irq_desc *desc) | ||
184 | { | ||
185 | irqd_set(&desc->irq_data, IRQD_IRQ_MASKED); | ||
186 | } | ||
187 | |||
188 | static void irq_state_clr_started(struct irq_desc *desc) | 178 | static void irq_state_clr_started(struct irq_desc *desc) |
189 | { | 179 | { |
190 | irqd_clear(&desc->irq_data, IRQD_IRQ_STARTED); | 180 | irqd_clear(&desc->irq_data, IRQD_IRQ_STARTED); |
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index dbfba9933ed2..a2c48058354c 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
@@ -227,6 +227,16 @@ static inline bool irqd_has_set(struct irq_data *d, unsigned int mask) | |||
227 | return __irqd_to_state(d) & mask; | 227 | return __irqd_to_state(d) & mask; |
228 | } | 228 | } |
229 | 229 | ||
230 | static inline void irq_state_set_disabled(struct irq_desc *desc) | ||
231 | { | ||
232 | irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED); | ||
233 | } | ||
234 | |||
235 | static inline void irq_state_set_masked(struct irq_desc *desc) | ||
236 | { | ||
237 | irqd_set(&desc->irq_data, IRQD_IRQ_MASKED); | ||
238 | } | ||
239 | |||
230 | #undef __irqd_to_state | 240 | #undef __irqd_to_state |
231 | 241 | ||
232 | static inline void kstat_incr_irqs_this_cpu(struct irq_desc *desc) | 242 | static inline void kstat_incr_irqs_this_cpu(struct irq_desc *desc) |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 5624b2dd6b58..1d1a5b945ab4 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -1090,6 +1090,16 @@ setup_irq_thread(struct irqaction *new, unsigned int irq, bool secondary) | |||
1090 | /* | 1090 | /* |
1091 | * Internal function to register an irqaction - typically used to | 1091 | * Internal function to register an irqaction - typically used to |
1092 | * allocate special interrupts that are part of the architecture. | 1092 | * allocate special interrupts that are part of the architecture. |
1093 | * | ||
1094 | * Locking rules: | ||
1095 | * | ||
1096 | * desc->request_mutex Provides serialization against a concurrent free_irq() | ||
1097 | * chip_bus_lock Provides serialization for slow bus operations | ||
1098 | * desc->lock Provides serialization against hard interrupts | ||
1099 | * | ||
1100 | * chip_bus_lock and desc->lock are sufficient for all other management and | ||
1101 | * interrupt related functions. desc->request_mutex solely serializes | ||
1102 | * request/free_irq(). | ||
1093 | */ | 1103 | */ |
1094 | static int | 1104 | static int |
1095 | __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | 1105 | __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) |
@@ -1167,20 +1177,35 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
1167 | if (desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE) | 1177 | if (desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE) |
1168 | new->flags &= ~IRQF_ONESHOT; | 1178 | new->flags &= ~IRQF_ONESHOT; |
1169 | 1179 | ||
1180 | /* | ||
1181 | * Protects against a concurrent __free_irq() call which might wait | ||
1182 | * for synchronize_irq() to complete without holding the optional | ||
1183 | * chip bus lock and desc->lock. | ||
1184 | */ | ||
1170 | mutex_lock(&desc->request_mutex); | 1185 | mutex_lock(&desc->request_mutex); |
1186 | |||
1187 | /* | ||
1188 | * Acquire bus lock as the irq_request_resources() callback below | ||
1189 | * might rely on the serialization or the magic power management | ||
1190 | * functions which are abusing the irq_bus_lock() callback, | ||
1191 | */ | ||
1192 | chip_bus_lock(desc); | ||
1193 | |||
1194 | /* First installed action requests resources. */ | ||
1171 | if (!desc->action) { | 1195 | if (!desc->action) { |
1172 | ret = irq_request_resources(desc); | 1196 | ret = irq_request_resources(desc); |
1173 | if (ret) { | 1197 | if (ret) { |
1174 | pr_err("Failed to request resources for %s (irq %d) on irqchip %s\n", | 1198 | pr_err("Failed to request resources for %s (irq %d) on irqchip %s\n", |
1175 | new->name, irq, desc->irq_data.chip->name); | 1199 | new->name, irq, desc->irq_data.chip->name); |
1176 | goto out_mutex; | 1200 | goto out_bus_unlock; |
1177 | } | 1201 | } |
1178 | } | 1202 | } |
1179 | 1203 | ||
1180 | chip_bus_lock(desc); | ||
1181 | |||
1182 | /* | 1204 | /* |
1183 | * The following block of code has to be executed atomically | 1205 | * The following block of code has to be executed atomically |
1206 | * protected against a concurrent interrupt and any of the other | ||
1207 | * management calls which are not serialized via | ||
1208 | * desc->request_mutex or the optional bus lock. | ||
1184 | */ | 1209 | */ |
1185 | raw_spin_lock_irqsave(&desc->lock, flags); | 1210 | raw_spin_lock_irqsave(&desc->lock, flags); |
1186 | old_ptr = &desc->action; | 1211 | old_ptr = &desc->action; |
@@ -1286,10 +1311,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
1286 | ret = __irq_set_trigger(desc, | 1311 | ret = __irq_set_trigger(desc, |
1287 | new->flags & IRQF_TRIGGER_MASK); | 1312 | new->flags & IRQF_TRIGGER_MASK); |
1288 | 1313 | ||
1289 | if (ret) { | 1314 | if (ret) |
1290 | irq_release_resources(desc); | ||
1291 | goto out_unlock; | 1315 | goto out_unlock; |
1292 | } | ||
1293 | } | 1316 | } |
1294 | 1317 | ||
1295 | desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \ | 1318 | desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \ |
@@ -1385,12 +1408,10 @@ mismatch: | |||
1385 | out_unlock: | 1408 | out_unlock: |
1386 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 1409 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
1387 | 1410 | ||
1388 | chip_bus_sync_unlock(desc); | ||
1389 | |||
1390 | if (!desc->action) | 1411 | if (!desc->action) |
1391 | irq_release_resources(desc); | 1412 | irq_release_resources(desc); |
1392 | 1413 | out_bus_unlock: | |
1393 | out_mutex: | 1414 | chip_bus_sync_unlock(desc); |
1394 | mutex_unlock(&desc->request_mutex); | 1415 | mutex_unlock(&desc->request_mutex); |
1395 | 1416 | ||
1396 | out_thread: | 1417 | out_thread: |
@@ -1472,6 +1493,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id) | |||
1472 | WARN(1, "Trying to free already-free IRQ %d\n", irq); | 1493 | WARN(1, "Trying to free already-free IRQ %d\n", irq); |
1473 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 1494 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
1474 | chip_bus_sync_unlock(desc); | 1495 | chip_bus_sync_unlock(desc); |
1496 | mutex_unlock(&desc->request_mutex); | ||
1475 | return NULL; | 1497 | return NULL; |
1476 | } | 1498 | } |
1477 | 1499 | ||
@@ -1498,6 +1520,20 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id) | |||
1498 | #endif | 1520 | #endif |
1499 | 1521 | ||
1500 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 1522 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
1523 | /* | ||
1524 | * Drop bus_lock here so the changes which were done in the chip | ||
1525 | * callbacks above are synced out to the irq chips which hang | ||
1526 | * behind a slow bus (I2C, SPI) before calling synchronize_irq(). | ||
1527 | * | ||
1528 | * Aside of that the bus_lock can also be taken from the threaded | ||
1529 | * handler in irq_finalize_oneshot() which results in a deadlock | ||
1530 | * because synchronize_irq() would wait forever for the thread to | ||
1531 | * complete, which is blocked on the bus lock. | ||
1532 | * | ||
1533 | * The still held desc->request_mutex() protects against a | ||
1534 | * concurrent request_irq() of this irq so the release of resources | ||
1535 | * and timing data is properly serialized. | ||
1536 | */ | ||
1501 | chip_bus_sync_unlock(desc); | 1537 | chip_bus_sync_unlock(desc); |
1502 | 1538 | ||
1503 | unregister_handler_proc(irq, action); | 1539 | unregister_handler_proc(irq, action); |
@@ -1530,8 +1566,15 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id) | |||
1530 | } | 1566 | } |
1531 | } | 1567 | } |
1532 | 1568 | ||
1569 | /* Last action releases resources */ | ||
1533 | if (!desc->action) { | 1570 | if (!desc->action) { |
1571 | /* | ||
1572 | * Reaquire bus lock as irq_release_resources() might | ||
1573 | * require it to deallocate resources over the slow bus. | ||
1574 | */ | ||
1575 | chip_bus_lock(desc); | ||
1534 | irq_release_resources(desc); | 1576 | irq_release_resources(desc); |
1577 | chip_bus_sync_unlock(desc); | ||
1535 | irq_remove_timings(desc); | 1578 | irq_remove_timings(desc); |
1536 | } | 1579 | } |
1537 | 1580 | ||
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c index cea1de0161f1..6bd9b58429cc 100644 --- a/kernel/irq/pm.c +++ b/kernel/irq/pm.c | |||
@@ -149,6 +149,8 @@ static void resume_irq(struct irq_desc *desc) | |||
149 | 149 | ||
150 | /* Pretend that it got disabled ! */ | 150 | /* Pretend that it got disabled ! */ |
151 | desc->depth++; | 151 | desc->depth++; |
152 | irq_state_set_disabled(desc); | ||
153 | irq_state_set_masked(desc); | ||
152 | resume: | 154 | resume: |
153 | desc->istate &= ~IRQS_SUSPENDED; | 155 | desc->istate &= ~IRQS_SUSPENDED; |
154 | __enable_irq(desc); | 156 | __enable_irq(desc); |
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 78069895032a..649dc9d3951a 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c | |||
@@ -963,7 +963,6 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, | |||
963 | return -EDEADLK; | 963 | return -EDEADLK; |
964 | 964 | ||
965 | raw_spin_lock(&task->pi_lock); | 965 | raw_spin_lock(&task->pi_lock); |
966 | rt_mutex_adjust_prio(task); | ||
967 | waiter->task = task; | 966 | waiter->task = task; |
968 | waiter->lock = lock; | 967 | waiter->lock = lock; |
969 | waiter->prio = task->prio; | 968 | waiter->prio = task->prio; |
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 6e3ea4ac1bda..14d2dbf97c53 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c | |||
@@ -683,7 +683,7 @@ static u64 vtime_delta(struct vtime *vtime) | |||
683 | { | 683 | { |
684 | unsigned long long clock; | 684 | unsigned long long clock; |
685 | 685 | ||
686 | clock = sched_clock_cpu(smp_processor_id()); | 686 | clock = sched_clock(); |
687 | if (clock < vtime->starttime) | 687 | if (clock < vtime->starttime) |
688 | return 0; | 688 | return 0; |
689 | 689 | ||
@@ -814,7 +814,7 @@ void arch_vtime_task_switch(struct task_struct *prev) | |||
814 | 814 | ||
815 | write_seqcount_begin(&vtime->seqcount); | 815 | write_seqcount_begin(&vtime->seqcount); |
816 | vtime->state = VTIME_SYS; | 816 | vtime->state = VTIME_SYS; |
817 | vtime->starttime = sched_clock_cpu(smp_processor_id()); | 817 | vtime->starttime = sched_clock(); |
818 | write_seqcount_end(&vtime->seqcount); | 818 | write_seqcount_end(&vtime->seqcount); |
819 | } | 819 | } |
820 | 820 | ||
@@ -826,7 +826,7 @@ void vtime_init_idle(struct task_struct *t, int cpu) | |||
826 | local_irq_save(flags); | 826 | local_irq_save(flags); |
827 | write_seqcount_begin(&vtime->seqcount); | 827 | write_seqcount_begin(&vtime->seqcount); |
828 | vtime->state = VTIME_SYS; | 828 | vtime->state = VTIME_SYS; |
829 | vtime->starttime = sched_clock_cpu(cpu); | 829 | vtime->starttime = sched_clock(); |
830 | write_seqcount_end(&vtime->seqcount); | 830 | write_seqcount_end(&vtime->seqcount); |
831 | local_irq_restore(flags); | 831 | local_irq_restore(flags); |
832 | } | 832 | } |
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index a84299f44b5d..755bd3f1a1a9 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c | |||
@@ -1392,17 +1392,19 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags) | |||
1392 | struct sched_dl_entity *pi_se = &p->dl; | 1392 | struct sched_dl_entity *pi_se = &p->dl; |
1393 | 1393 | ||
1394 | /* | 1394 | /* |
1395 | * Use the scheduling parameters of the top pi-waiter | 1395 | * Use the scheduling parameters of the top pi-waiter task if: |
1396 | * task if we have one and its (absolute) deadline is | 1396 | * - we have a top pi-waiter which is a SCHED_DEADLINE task AND |
1397 | * smaller than our one... OTW we keep our runtime and | 1397 | * - our dl_boosted is set (i.e. the pi-waiter's (absolute) deadline is |
1398 | * deadline. | 1398 | * smaller than our deadline OR we are a !SCHED_DEADLINE task getting |
1399 | * boosted due to a SCHED_DEADLINE pi-waiter). | ||
1400 | * Otherwise we keep our runtime and deadline. | ||
1399 | */ | 1401 | */ |
1400 | if (pi_task && p->dl.dl_boosted && dl_prio(pi_task->normal_prio)) { | 1402 | if (pi_task && dl_prio(pi_task->normal_prio) && p->dl.dl_boosted) { |
1401 | pi_se = &pi_task->dl; | 1403 | pi_se = &pi_task->dl; |
1402 | } else if (!dl_prio(p->normal_prio)) { | 1404 | } else if (!dl_prio(p->normal_prio)) { |
1403 | /* | 1405 | /* |
1404 | * Special case in which we have a !SCHED_DEADLINE task | 1406 | * Special case in which we have a !SCHED_DEADLINE task |
1405 | * that is going to be deboosted, but exceedes its | 1407 | * that is going to be deboosted, but exceeds its |
1406 | * runtime while doing so. No point in replenishing | 1408 | * runtime while doing so. No point in replenishing |
1407 | * it, as it's going to return back to its original | 1409 | * it, as it's going to return back to its original |
1408 | * scheduling class after this. | 1410 | * scheduling class after this. |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 53f6b6401cf0..02004ae91860 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -113,7 +113,7 @@ static int ftrace_disabled __read_mostly; | |||
113 | 113 | ||
114 | static DEFINE_MUTEX(ftrace_lock); | 114 | static DEFINE_MUTEX(ftrace_lock); |
115 | 115 | ||
116 | static struct ftrace_ops *ftrace_ops_list __read_mostly = &ftrace_list_end; | 116 | static struct ftrace_ops __rcu *ftrace_ops_list __read_mostly = &ftrace_list_end; |
117 | ftrace_func_t ftrace_trace_function __read_mostly = ftrace_stub; | 117 | ftrace_func_t ftrace_trace_function __read_mostly = ftrace_stub; |
118 | static struct ftrace_ops global_ops; | 118 | static struct ftrace_ops global_ops; |
119 | 119 | ||
@@ -169,8 +169,11 @@ int ftrace_nr_registered_ops(void) | |||
169 | 169 | ||
170 | mutex_lock(&ftrace_lock); | 170 | mutex_lock(&ftrace_lock); |
171 | 171 | ||
172 | for (ops = ftrace_ops_list; | 172 | for (ops = rcu_dereference_protected(ftrace_ops_list, |
173 | ops != &ftrace_list_end; ops = ops->next) | 173 | lockdep_is_held(&ftrace_lock)); |
174 | ops != &ftrace_list_end; | ||
175 | ops = rcu_dereference_protected(ops->next, | ||
176 | lockdep_is_held(&ftrace_lock))) | ||
174 | cnt++; | 177 | cnt++; |
175 | 178 | ||
176 | mutex_unlock(&ftrace_lock); | 179 | mutex_unlock(&ftrace_lock); |
@@ -275,10 +278,11 @@ static void update_ftrace_function(void) | |||
275 | * If there's only one ftrace_ops registered, the ftrace_ops_list | 278 | * If there's only one ftrace_ops registered, the ftrace_ops_list |
276 | * will point to the ops we want. | 279 | * will point to the ops we want. |
277 | */ | 280 | */ |
278 | set_function_trace_op = ftrace_ops_list; | 281 | set_function_trace_op = rcu_dereference_protected(ftrace_ops_list, |
282 | lockdep_is_held(&ftrace_lock)); | ||
279 | 283 | ||
280 | /* If there's no ftrace_ops registered, just call the stub function */ | 284 | /* If there's no ftrace_ops registered, just call the stub function */ |
281 | if (ftrace_ops_list == &ftrace_list_end) { | 285 | if (set_function_trace_op == &ftrace_list_end) { |
282 | func = ftrace_stub; | 286 | func = ftrace_stub; |
283 | 287 | ||
284 | /* | 288 | /* |
@@ -286,7 +290,8 @@ static void update_ftrace_function(void) | |||
286 | * recursion safe and not dynamic and the arch supports passing ops, | 290 | * recursion safe and not dynamic and the arch supports passing ops, |
287 | * then have the mcount trampoline call the function directly. | 291 | * then have the mcount trampoline call the function directly. |
288 | */ | 292 | */ |
289 | } else if (ftrace_ops_list->next == &ftrace_list_end) { | 293 | } else if (rcu_dereference_protected(ftrace_ops_list->next, |
294 | lockdep_is_held(&ftrace_lock)) == &ftrace_list_end) { | ||
290 | func = ftrace_ops_get_list_func(ftrace_ops_list); | 295 | func = ftrace_ops_get_list_func(ftrace_ops_list); |
291 | 296 | ||
292 | } else { | 297 | } else { |
@@ -348,9 +353,11 @@ int using_ftrace_ops_list_func(void) | |||
348 | return ftrace_trace_function == ftrace_ops_list_func; | 353 | return ftrace_trace_function == ftrace_ops_list_func; |
349 | } | 354 | } |
350 | 355 | ||
351 | static void add_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) | 356 | static void add_ftrace_ops(struct ftrace_ops __rcu **list, |
357 | struct ftrace_ops *ops) | ||
352 | { | 358 | { |
353 | ops->next = *list; | 359 | rcu_assign_pointer(ops->next, *list); |
360 | |||
354 | /* | 361 | /* |
355 | * We are entering ops into the list but another | 362 | * We are entering ops into the list but another |
356 | * CPU might be walking that list. We need to make sure | 363 | * CPU might be walking that list. We need to make sure |
@@ -360,7 +367,8 @@ static void add_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) | |||
360 | rcu_assign_pointer(*list, ops); | 367 | rcu_assign_pointer(*list, ops); |
361 | } | 368 | } |
362 | 369 | ||
363 | static int remove_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) | 370 | static int remove_ftrace_ops(struct ftrace_ops __rcu **list, |
371 | struct ftrace_ops *ops) | ||
364 | { | 372 | { |
365 | struct ftrace_ops **p; | 373 | struct ftrace_ops **p; |
366 | 374 | ||
@@ -368,7 +376,10 @@ static int remove_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops) | |||
368 | * If we are removing the last function, then simply point | 376 | * If we are removing the last function, then simply point |
369 | * to the ftrace_stub. | 377 | * to the ftrace_stub. |
370 | */ | 378 | */ |
371 | if (*list == ops && ops->next == &ftrace_list_end) { | 379 | if (rcu_dereference_protected(*list, |
380 | lockdep_is_held(&ftrace_lock)) == ops && | ||
381 | rcu_dereference_protected(ops->next, | ||
382 | lockdep_is_held(&ftrace_lock)) == &ftrace_list_end) { | ||
372 | *list = &ftrace_list_end; | 383 | *list = &ftrace_list_end; |
373 | return 0; | 384 | return 0; |
374 | } | 385 | } |
@@ -1569,8 +1580,8 @@ ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs) | |||
1569 | return 0; | 1580 | return 0; |
1570 | #endif | 1581 | #endif |
1571 | 1582 | ||
1572 | hash.filter_hash = rcu_dereference_raw_notrace(ops->func_hash->filter_hash); | 1583 | rcu_assign_pointer(hash.filter_hash, ops->func_hash->filter_hash); |
1573 | hash.notrace_hash = rcu_dereference_raw_notrace(ops->func_hash->notrace_hash); | 1584 | rcu_assign_pointer(hash.notrace_hash, ops->func_hash->notrace_hash); |
1574 | 1585 | ||
1575 | if (hash_contains_ip(ip, &hash)) | 1586 | if (hash_contains_ip(ip, &hash)) |
1576 | ret = 1; | 1587 | ret = 1; |
@@ -2840,7 +2851,8 @@ static int ftrace_shutdown(struct ftrace_ops *ops, int command) | |||
2840 | * If there's no more ops registered with ftrace, run a | 2851 | * If there's no more ops registered with ftrace, run a |
2841 | * sanity check to make sure all rec flags are cleared. | 2852 | * sanity check to make sure all rec flags are cleared. |
2842 | */ | 2853 | */ |
2843 | if (ftrace_ops_list == &ftrace_list_end) { | 2854 | if (rcu_dereference_protected(ftrace_ops_list, |
2855 | lockdep_is_held(&ftrace_lock)) == &ftrace_list_end) { | ||
2844 | struct ftrace_page *pg; | 2856 | struct ftrace_page *pg; |
2845 | struct dyn_ftrace *rec; | 2857 | struct dyn_ftrace *rec; |
2846 | 2858 | ||
@@ -6453,7 +6465,8 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, | |||
6453 | if (ftrace_enabled) { | 6465 | if (ftrace_enabled) { |
6454 | 6466 | ||
6455 | /* we are starting ftrace again */ | 6467 | /* we are starting ftrace again */ |
6456 | if (ftrace_ops_list != &ftrace_list_end) | 6468 | if (rcu_dereference_protected(ftrace_ops_list, |
6469 | lockdep_is_held(&ftrace_lock)) != &ftrace_list_end) | ||
6457 | update_ftrace_function(); | 6470 | update_ftrace_function(); |
6458 | 6471 | ||
6459 | ftrace_startup_sysctl(); | 6472 | ftrace_startup_sysctl(); |
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 4ae268e687fe..529cc50d7243 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -1136,12 +1136,12 @@ static int __rb_allocate_pages(long nr_pages, struct list_head *pages, int cpu) | |||
1136 | for (i = 0; i < nr_pages; i++) { | 1136 | for (i = 0; i < nr_pages; i++) { |
1137 | struct page *page; | 1137 | struct page *page; |
1138 | /* | 1138 | /* |
1139 | * __GFP_NORETRY flag makes sure that the allocation fails | 1139 | * __GFP_RETRY_MAYFAIL flag makes sure that the allocation fails |
1140 | * gracefully without invoking oom-killer and the system is | 1140 | * gracefully without invoking oom-killer and the system is not |
1141 | * not destabilized. | 1141 | * destabilized. |
1142 | */ | 1142 | */ |
1143 | bpage = kzalloc_node(ALIGN(sizeof(*bpage), cache_line_size()), | 1143 | bpage = kzalloc_node(ALIGN(sizeof(*bpage), cache_line_size()), |
1144 | GFP_KERNEL | __GFP_NORETRY, | 1144 | GFP_KERNEL | __GFP_RETRY_MAYFAIL, |
1145 | cpu_to_node(cpu)); | 1145 | cpu_to_node(cpu)); |
1146 | if (!bpage) | 1146 | if (!bpage) |
1147 | goto free_pages; | 1147 | goto free_pages; |
@@ -1149,7 +1149,7 @@ static int __rb_allocate_pages(long nr_pages, struct list_head *pages, int cpu) | |||
1149 | list_add(&bpage->list, pages); | 1149 | list_add(&bpage->list, pages); |
1150 | 1150 | ||
1151 | page = alloc_pages_node(cpu_to_node(cpu), | 1151 | page = alloc_pages_node(cpu_to_node(cpu), |
1152 | GFP_KERNEL | __GFP_NORETRY, 0); | 1152 | GFP_KERNEL | __GFP_RETRY_MAYFAIL, 0); |
1153 | if (!page) | 1153 | if (!page) |
1154 | goto free_pages; | 1154 | goto free_pages; |
1155 | bpage->page = page_address(page); | 1155 | bpage->page = page_address(page); |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2d0ffcc49dba..42b9355033d4 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -7774,6 +7774,7 @@ static int instance_rmdir(const char *name) | |||
7774 | } | 7774 | } |
7775 | kfree(tr->topts); | 7775 | kfree(tr->topts); |
7776 | 7776 | ||
7777 | free_cpumask_var(tr->tracing_cpumask); | ||
7777 | kfree(tr->name); | 7778 | kfree(tr->name); |
7778 | kfree(tr); | 7779 | kfree(tr); |
7779 | 7780 | ||
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 6ade1c55cc3a..490ba229931d 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -1210,9 +1210,9 @@ struct ftrace_event_field { | |||
1210 | struct event_filter { | 1210 | struct event_filter { |
1211 | int n_preds; /* Number assigned */ | 1211 | int n_preds; /* Number assigned */ |
1212 | int a_preds; /* allocated */ | 1212 | int a_preds; /* allocated */ |
1213 | struct filter_pred *preds; | 1213 | struct filter_pred __rcu *preds; |
1214 | struct filter_pred *root; | 1214 | struct filter_pred __rcu *root; |
1215 | char *filter_string; | 1215 | char *filter_string; |
1216 | }; | 1216 | }; |
1217 | 1217 | ||
1218 | struct event_subsystem { | 1218 | struct event_subsystem { |
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index f0f3447e8aa4..861ae2a165f4 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -34,11 +34,11 @@ static struct lock_class_key bridge_netdev_addr_lock_key; | |||
34 | netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) | 34 | netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) |
35 | { | 35 | { |
36 | struct net_bridge *br = netdev_priv(dev); | 36 | struct net_bridge *br = netdev_priv(dev); |
37 | const unsigned char *dest = skb->data; | ||
38 | struct net_bridge_fdb_entry *dst; | 37 | struct net_bridge_fdb_entry *dst; |
39 | struct net_bridge_mdb_entry *mdst; | 38 | struct net_bridge_mdb_entry *mdst; |
40 | struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); | 39 | struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); |
41 | const struct nf_br_ops *nf_ops; | 40 | const struct nf_br_ops *nf_ops; |
41 | const unsigned char *dest; | ||
42 | u16 vid = 0; | 42 | u16 vid = 0; |
43 | 43 | ||
44 | rcu_read_lock(); | 44 | rcu_read_lock(); |
@@ -61,6 +61,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
61 | if (!br_allowed_ingress(br, br_vlan_group_rcu(br), skb, &vid)) | 61 | if (!br_allowed_ingress(br, br_vlan_group_rcu(br), skb, &vid)) |
62 | goto out; | 62 | goto out; |
63 | 63 | ||
64 | dest = eth_hdr(skb)->h_dest; | ||
64 | if (is_broadcast_ether_addr(dest)) { | 65 | if (is_broadcast_ether_addr(dest)) { |
65 | br_flood(br, skb, BR_PKT_BROADCAST, false, true); | 66 | br_flood(br, skb, BR_PKT_BROADCAST, false, true); |
66 | } else if (is_multicast_ether_addr(dest)) { | 67 | } else if (is_multicast_ether_addr(dest)) { |
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 013f2290bfa5..7637f58c1226 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
@@ -131,11 +131,11 @@ static void br_do_proxy_arp(struct sk_buff *skb, struct net_bridge *br, | |||
131 | int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb) | 131 | int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb) |
132 | { | 132 | { |
133 | struct net_bridge_port *p = br_port_get_rcu(skb->dev); | 133 | struct net_bridge_port *p = br_port_get_rcu(skb->dev); |
134 | const unsigned char *dest = eth_hdr(skb)->h_dest; | ||
135 | enum br_pkt_type pkt_type = BR_PKT_UNICAST; | 134 | enum br_pkt_type pkt_type = BR_PKT_UNICAST; |
136 | struct net_bridge_fdb_entry *dst = NULL; | 135 | struct net_bridge_fdb_entry *dst = NULL; |
137 | struct net_bridge_mdb_entry *mdst; | 136 | struct net_bridge_mdb_entry *mdst; |
138 | bool local_rcv, mcast_hit = false; | 137 | bool local_rcv, mcast_hit = false; |
138 | const unsigned char *dest; | ||
139 | struct net_bridge *br; | 139 | struct net_bridge *br; |
140 | u16 vid = 0; | 140 | u16 vid = 0; |
141 | 141 | ||
@@ -153,6 +153,7 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb | |||
153 | br_fdb_update(br, p, eth_hdr(skb)->h_source, vid, false); | 153 | br_fdb_update(br, p, eth_hdr(skb)->h_source, vid, false); |
154 | 154 | ||
155 | local_rcv = !!(br->dev->flags & IFF_PROMISC); | 155 | local_rcv = !!(br->dev->flags & IFF_PROMISC); |
156 | dest = eth_hdr(skb)->h_dest; | ||
156 | if (is_multicast_ether_addr(dest)) { | 157 | if (is_multicast_ether_addr(dest)) { |
157 | /* by definition the broadcast is also a multicast address */ | 158 | /* by definition the broadcast is also a multicast address */ |
158 | if (is_broadcast_ether_addr(dest)) { | 159 | if (is_broadcast_ether_addr(dest)) { |
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 0c31035bbfee..b7cc615d42ef 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -3203,8 +3203,10 @@ static struct ceph_msg_data *ceph_msg_data_create(enum ceph_msg_data_type type) | |||
3203 | return NULL; | 3203 | return NULL; |
3204 | 3204 | ||
3205 | data = kmem_cache_zalloc(ceph_msg_data_cache, GFP_NOFS); | 3205 | data = kmem_cache_zalloc(ceph_msg_data_cache, GFP_NOFS); |
3206 | if (data) | 3206 | if (!data) |
3207 | data->type = type; | 3207 | return NULL; |
3208 | |||
3209 | data->type = type; | ||
3208 | INIT_LIST_HEAD(&data->links); | 3210 | INIT_LIST_HEAD(&data->links); |
3209 | 3211 | ||
3210 | return data; | 3212 | return data; |
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 86a9737d8e3f..901bb8221366 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -5310,7 +5310,10 @@ static int invalidate_authorizer(struct ceph_connection *con) | |||
5310 | 5310 | ||
5311 | static void osd_reencode_message(struct ceph_msg *msg) | 5311 | static void osd_reencode_message(struct ceph_msg *msg) |
5312 | { | 5312 | { |
5313 | encode_request_finish(msg); | 5313 | int type = le16_to_cpu(msg->hdr.type); |
5314 | |||
5315 | if (type == CEPH_MSG_OSD_OP) | ||
5316 | encode_request_finish(msg); | ||
5314 | } | 5317 | } |
5315 | 5318 | ||
5316 | static int osd_sign_message(struct ceph_msg *msg) | 5319 | static int osd_sign_message(struct ceph_msg *msg) |
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 864789c5974e..64ae9f89773a 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c | |||
@@ -338,7 +338,7 @@ static void crush_finalize(struct crush_map *c) | |||
338 | static struct crush_map *crush_decode(void *pbyval, void *end) | 338 | static struct crush_map *crush_decode(void *pbyval, void *end) |
339 | { | 339 | { |
340 | struct crush_map *c; | 340 | struct crush_map *c; |
341 | int err = -EINVAL; | 341 | int err; |
342 | int i, j; | 342 | int i, j; |
343 | void **p = &pbyval; | 343 | void **p = &pbyval; |
344 | void *start = pbyval; | 344 | void *start = pbyval; |
@@ -407,7 +407,6 @@ static struct crush_map *crush_decode(void *pbyval, void *end) | |||
407 | size = sizeof(struct crush_bucket_straw2); | 407 | size = sizeof(struct crush_bucket_straw2); |
408 | break; | 408 | break; |
409 | default: | 409 | default: |
410 | err = -EINVAL; | ||
411 | goto bad; | 410 | goto bad; |
412 | } | 411 | } |
413 | BUG_ON(size == 0); | 412 | BUG_ON(size == 0); |
@@ -439,31 +438,31 @@ static struct crush_map *crush_decode(void *pbyval, void *end) | |||
439 | err = crush_decode_uniform_bucket(p, end, | 438 | err = crush_decode_uniform_bucket(p, end, |
440 | (struct crush_bucket_uniform *)b); | 439 | (struct crush_bucket_uniform *)b); |
441 | if (err < 0) | 440 | if (err < 0) |
442 | goto bad; | 441 | goto fail; |
443 | break; | 442 | break; |
444 | case CRUSH_BUCKET_LIST: | 443 | case CRUSH_BUCKET_LIST: |
445 | err = crush_decode_list_bucket(p, end, | 444 | err = crush_decode_list_bucket(p, end, |
446 | (struct crush_bucket_list *)b); | 445 | (struct crush_bucket_list *)b); |
447 | if (err < 0) | 446 | if (err < 0) |
448 | goto bad; | 447 | goto fail; |
449 | break; | 448 | break; |
450 | case CRUSH_BUCKET_TREE: | 449 | case CRUSH_BUCKET_TREE: |
451 | err = crush_decode_tree_bucket(p, end, | 450 | err = crush_decode_tree_bucket(p, end, |
452 | (struct crush_bucket_tree *)b); | 451 | (struct crush_bucket_tree *)b); |
453 | if (err < 0) | 452 | if (err < 0) |
454 | goto bad; | 453 | goto fail; |
455 | break; | 454 | break; |
456 | case CRUSH_BUCKET_STRAW: | 455 | case CRUSH_BUCKET_STRAW: |
457 | err = crush_decode_straw_bucket(p, end, | 456 | err = crush_decode_straw_bucket(p, end, |
458 | (struct crush_bucket_straw *)b); | 457 | (struct crush_bucket_straw *)b); |
459 | if (err < 0) | 458 | if (err < 0) |
460 | goto bad; | 459 | goto fail; |
461 | break; | 460 | break; |
462 | case CRUSH_BUCKET_STRAW2: | 461 | case CRUSH_BUCKET_STRAW2: |
463 | err = crush_decode_straw2_bucket(p, end, | 462 | err = crush_decode_straw2_bucket(p, end, |
464 | (struct crush_bucket_straw2 *)b); | 463 | (struct crush_bucket_straw2 *)b); |
465 | if (err < 0) | 464 | if (err < 0) |
466 | goto bad; | 465 | goto fail; |
467 | break; | 466 | break; |
468 | } | 467 | } |
469 | } | 468 | } |
@@ -474,7 +473,6 @@ static struct crush_map *crush_decode(void *pbyval, void *end) | |||
474 | u32 yes; | 473 | u32 yes; |
475 | struct crush_rule *r; | 474 | struct crush_rule *r; |
476 | 475 | ||
477 | err = -EINVAL; | ||
478 | ceph_decode_32_safe(p, end, yes, bad); | 476 | ceph_decode_32_safe(p, end, yes, bad); |
479 | if (!yes) { | 477 | if (!yes) { |
480 | dout("crush_decode NO rule %d off %x %p to %p\n", | 478 | dout("crush_decode NO rule %d off %x %p to %p\n", |
@@ -489,7 +487,6 @@ static struct crush_map *crush_decode(void *pbyval, void *end) | |||
489 | /* len */ | 487 | /* len */ |
490 | ceph_decode_32_safe(p, end, yes, bad); | 488 | ceph_decode_32_safe(p, end, yes, bad); |
491 | #if BITS_PER_LONG == 32 | 489 | #if BITS_PER_LONG == 32 |
492 | err = -EINVAL; | ||
493 | if (yes > (ULONG_MAX - sizeof(*r)) | 490 | if (yes > (ULONG_MAX - sizeof(*r)) |
494 | / sizeof(struct crush_rule_step)) | 491 | / sizeof(struct crush_rule_step)) |
495 | goto bad; | 492 | goto bad; |
@@ -557,7 +554,7 @@ static struct crush_map *crush_decode(void *pbyval, void *end) | |||
557 | if (*p != end) { | 554 | if (*p != end) { |
558 | err = decode_choose_args(p, end, c); | 555 | err = decode_choose_args(p, end, c); |
559 | if (err) | 556 | if (err) |
560 | goto bad; | 557 | goto fail; |
561 | } | 558 | } |
562 | 559 | ||
563 | done: | 560 | done: |
@@ -567,10 +564,14 @@ done: | |||
567 | 564 | ||
568 | badmem: | 565 | badmem: |
569 | err = -ENOMEM; | 566 | err = -ENOMEM; |
570 | bad: | 567 | fail: |
571 | dout("crush_decode fail %d\n", err); | 568 | dout("crush_decode fail %d\n", err); |
572 | crush_destroy(c); | 569 | crush_destroy(c); |
573 | return ERR_PTR(err); | 570 | return ERR_PTR(err); |
571 | |||
572 | bad: | ||
573 | err = -EINVAL; | ||
574 | goto fail; | ||
574 | } | 575 | } |
575 | 576 | ||
576 | int ceph_pg_compare(const struct ceph_pg *lhs, const struct ceph_pg *rhs) | 577 | int ceph_pg_compare(const struct ceph_pg *lhs, const struct ceph_pg *rhs) |
@@ -1399,7 +1400,7 @@ static struct ceph_pg_mapping *__decode_pg_upmap_items(void **p, void *end, | |||
1399 | return ERR_PTR(-EINVAL); | 1400 | return ERR_PTR(-EINVAL); |
1400 | 1401 | ||
1401 | ceph_decode_need(p, end, 2 * len * sizeof(u32), e_inval); | 1402 | ceph_decode_need(p, end, 2 * len * sizeof(u32), e_inval); |
1402 | pg = kzalloc(sizeof(*pg) + 2 * len * sizeof(u32), GFP_NOIO); | 1403 | pg = alloc_pg_mapping(2 * len * sizeof(u32)); |
1403 | if (!pg) | 1404 | if (!pg) |
1404 | return ERR_PTR(-ENOMEM); | 1405 | return ERR_PTR(-ENOMEM); |
1405 | 1406 | ||
@@ -1544,7 +1545,7 @@ static int osdmap_decode(void **p, void *end, struct ceph_osdmap *map) | |||
1544 | if (struct_v >= 3) { | 1545 | if (struct_v >= 3) { |
1545 | /* erasure_code_profiles */ | 1546 | /* erasure_code_profiles */ |
1546 | ceph_decode_skip_map_of_map(p, end, string, string, string, | 1547 | ceph_decode_skip_map_of_map(p, end, string, string, string, |
1547 | bad); | 1548 | e_inval); |
1548 | } | 1549 | } |
1549 | 1550 | ||
1550 | if (struct_v >= 4) { | 1551 | if (struct_v >= 4) { |
@@ -1825,9 +1826,9 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, | |||
1825 | if (struct_v >= 3) { | 1826 | if (struct_v >= 3) { |
1826 | /* new_erasure_code_profiles */ | 1827 | /* new_erasure_code_profiles */ |
1827 | ceph_decode_skip_map_of_map(p, end, string, string, string, | 1828 | ceph_decode_skip_map_of_map(p, end, string, string, string, |
1828 | bad); | 1829 | e_inval); |
1829 | /* old_erasure_code_profiles */ | 1830 | /* old_erasure_code_profiles */ |
1830 | ceph_decode_skip_set(p, end, string, bad); | 1831 | ceph_decode_skip_set(p, end, string, e_inval); |
1831 | } | 1832 | } |
1832 | 1833 | ||
1833 | if (struct_v >= 4) { | 1834 | if (struct_v >= 4) { |
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 82fd4c9c4a1b..06b147d7d9e2 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c | |||
@@ -28,6 +28,7 @@ static int dev_ifname(struct net *net, struct ifreq __user *arg) | |||
28 | 28 | ||
29 | if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) | 29 | if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) |
30 | return -EFAULT; | 30 | return -EFAULT; |
31 | ifr.ifr_name[IFNAMSIZ-1] = 0; | ||
31 | 32 | ||
32 | error = netdev_get_name(net, ifr.ifr_name, ifr.ifr_ifindex); | 33 | error = netdev_get_name(net, ifr.ifr_name, ifr.ifr_ifindex); |
33 | if (error) | 34 | if (error) |
@@ -424,6 +425,8 @@ int dev_ioctl(struct net *net, unsigned int cmd, void __user *arg) | |||
424 | if (copy_from_user(&iwr, arg, sizeof(iwr))) | 425 | if (copy_from_user(&iwr, arg, sizeof(iwr))) |
425 | return -EFAULT; | 426 | return -EFAULT; |
426 | 427 | ||
428 | iwr.ifr_name[sizeof(iwr.ifr_name) - 1] = 0; | ||
429 | |||
427 | return wext_handle_ioctl(net, &iwr, cmd, arg); | 430 | return wext_handle_ioctl(net, &iwr, cmd, arg); |
428 | } | 431 | } |
429 | 432 | ||
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index a0093e1b0235..fdcb1bcd2afa 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -400,6 +400,7 @@ int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
400 | err = -ENOMEM; | 400 | err = -ENOMEM; |
401 | goto errout; | 401 | goto errout; |
402 | } | 402 | } |
403 | refcount_set(&rule->refcnt, 1); | ||
403 | rule->fr_net = net; | 404 | rule->fr_net = net; |
404 | 405 | ||
405 | rule->pref = tb[FRA_PRIORITY] ? nla_get_u32(tb[FRA_PRIORITY]) | 406 | rule->pref = tb[FRA_PRIORITY] ? nla_get_u32(tb[FRA_PRIORITY]) |
@@ -517,8 +518,6 @@ int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
517 | last = r; | 518 | last = r; |
518 | } | 519 | } |
519 | 520 | ||
520 | refcount_set(&rule->refcnt, 1); | ||
521 | |||
522 | if (last) | 521 | if (last) |
523 | list_add_rcu(&rule->list, &last->list); | 522 | list_add_rcu(&rule->list, &last->list); |
524 | else | 523 | else |
diff --git a/net/core/filter.c b/net/core/filter.c index c7f737058d89..f44fc22fd45a 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -2248,7 +2248,7 @@ static int bpf_skb_adjust_net(struct sk_buff *skb, s32 len_diff) | |||
2248 | bpf_skb_net_grow(skb, len_diff_abs); | 2248 | bpf_skb_net_grow(skb, len_diff_abs); |
2249 | 2249 | ||
2250 | bpf_compute_data_end(skb); | 2250 | bpf_compute_data_end(skb); |
2251 | return 0; | 2251 | return ret; |
2252 | } | 2252 | } |
2253 | 2253 | ||
2254 | BPF_CALL_4(bpf_skb_adjust_room, struct sk_buff *, skb, s32, len_diff, | 2254 | BPF_CALL_4(bpf_skb_adjust_room, struct sk_buff *, skb, s32, len_diff, |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index d3408a693166..8357f164c660 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -277,7 +277,7 @@ static void zap_completion_queue(void) | |||
277 | struct sk_buff *skb = clist; | 277 | struct sk_buff *skb = clist; |
278 | clist = clist->next; | 278 | clist = clist->next; |
279 | if (!skb_irq_freeable(skb)) { | 279 | if (!skb_irq_freeable(skb)) { |
280 | refcount_inc(&skb->users); | 280 | refcount_set(&skb->users, 1); |
281 | dev_kfree_skb_any(skb); /* put this one back */ | 281 | dev_kfree_skb_any(skb); /* put this one back */ |
282 | } else { | 282 | } else { |
283 | __kfree_skb(skb); | 283 | __kfree_skb(skb); |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index d1ba90980be1..9201e3621351 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -2031,7 +2031,8 @@ static int do_setlink(const struct sk_buff *skb, | |||
2031 | struct sockaddr *sa; | 2031 | struct sockaddr *sa; |
2032 | int len; | 2032 | int len; |
2033 | 2033 | ||
2034 | len = sizeof(sa_family_t) + dev->addr_len; | 2034 | len = sizeof(sa_family_t) + max_t(size_t, dev->addr_len, |
2035 | sizeof(*sa)); | ||
2035 | sa = kmalloc(len, GFP_KERNEL); | 2036 | sa = kmalloc(len, GFP_KERNEL); |
2036 | if (!sa) { | 2037 | if (!sa) { |
2037 | err = -ENOMEM; | 2038 | err = -ENOMEM; |
@@ -4241,6 +4242,7 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi | |||
4241 | 4242 | ||
4242 | switch (event) { | 4243 | switch (event) { |
4243 | case NETDEV_REBOOT: | 4244 | case NETDEV_REBOOT: |
4245 | case NETDEV_CHANGEADDR: | ||
4244 | case NETDEV_CHANGENAME: | 4246 | case NETDEV_CHANGENAME: |
4245 | case NETDEV_FEAT_CHANGE: | 4247 | case NETDEV_FEAT_CHANGE: |
4246 | case NETDEV_BONDING_FAILOVER: | 4248 | case NETDEV_BONDING_FAILOVER: |
diff --git a/net/dccp/input.c b/net/dccp/input.c index 4a05d7876850..fa6be9750bb4 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -126,7 +126,7 @@ static int dccp_rcv_closereq(struct sock *sk, struct sk_buff *skb) | |||
126 | 126 | ||
127 | static u16 dccp_reset_code_convert(const u8 code) | 127 | static u16 dccp_reset_code_convert(const u8 code) |
128 | { | 128 | { |
129 | const u16 error_code[] = { | 129 | static const u16 error_code[] = { |
130 | [DCCP_RESET_CODE_CLOSED] = 0, /* normal termination */ | 130 | [DCCP_RESET_CODE_CLOSED] = 0, /* normal termination */ |
131 | [DCCP_RESET_CODE_UNSPECIFIED] = 0, /* nothing known */ | 131 | [DCCP_RESET_CODE_UNSPECIFIED] = 0, /* nothing known */ |
132 | [DCCP_RESET_CODE_ABORTED] = ECONNRESET, | 132 | [DCCP_RESET_CODE_ABORTED] = ECONNRESET, |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 4e678fa892dd..044d2a159a3c 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -1334,13 +1334,14 @@ static struct pernet_operations fib_net_ops = { | |||
1334 | 1334 | ||
1335 | void __init ip_fib_init(void) | 1335 | void __init ip_fib_init(void) |
1336 | { | 1336 | { |
1337 | rtnl_register(PF_INET, RTM_NEWROUTE, inet_rtm_newroute, NULL, NULL); | 1337 | fib_trie_init(); |
1338 | rtnl_register(PF_INET, RTM_DELROUTE, inet_rtm_delroute, NULL, NULL); | ||
1339 | rtnl_register(PF_INET, RTM_GETROUTE, NULL, inet_dump_fib, NULL); | ||
1340 | 1338 | ||
1341 | register_pernet_subsys(&fib_net_ops); | 1339 | register_pernet_subsys(&fib_net_ops); |
1340 | |||
1342 | register_netdevice_notifier(&fib_netdev_notifier); | 1341 | register_netdevice_notifier(&fib_netdev_notifier); |
1343 | register_inetaddr_notifier(&fib_inetaddr_notifier); | 1342 | register_inetaddr_notifier(&fib_inetaddr_notifier); |
1344 | 1343 | ||
1345 | fib_trie_init(); | 1344 | rtnl_register(PF_INET, RTM_NEWROUTE, inet_rtm_newroute, NULL, NULL); |
1345 | rtnl_register(PF_INET, RTM_DELROUTE, inet_rtm_delroute, NULL, NULL); | ||
1346 | rtnl_register(PF_INET, RTM_GETROUTE, NULL, inet_dump_fib, NULL); | ||
1346 | } | 1347 | } |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 7eb252dcecee..50c74cd890bc 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -599,6 +599,7 @@ int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, | |||
599 | hlen = iph->ihl * 4; | 599 | hlen = iph->ihl * 4; |
600 | mtu = mtu - hlen; /* Size of data space */ | 600 | mtu = mtu - hlen; /* Size of data space */ |
601 | IPCB(skb)->flags |= IPSKB_FRAG_COMPLETE; | 601 | IPCB(skb)->flags |= IPSKB_FRAG_COMPLETE; |
602 | ll_rs = LL_RESERVED_SPACE(rt->dst.dev); | ||
602 | 603 | ||
603 | /* When frag_list is given, use it. First, check its validity: | 604 | /* When frag_list is given, use it. First, check its validity: |
604 | * some transformers could create wrong frag_list or break existing | 605 | * some transformers could create wrong frag_list or break existing |
@@ -614,14 +615,15 @@ int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, | |||
614 | if (first_len - hlen > mtu || | 615 | if (first_len - hlen > mtu || |
615 | ((first_len - hlen) & 7) || | 616 | ((first_len - hlen) & 7) || |
616 | ip_is_fragment(iph) || | 617 | ip_is_fragment(iph) || |
617 | skb_cloned(skb)) | 618 | skb_cloned(skb) || |
619 | skb_headroom(skb) < ll_rs) | ||
618 | goto slow_path; | 620 | goto slow_path; |
619 | 621 | ||
620 | skb_walk_frags(skb, frag) { | 622 | skb_walk_frags(skb, frag) { |
621 | /* Correct geometry. */ | 623 | /* Correct geometry. */ |
622 | if (frag->len > mtu || | 624 | if (frag->len > mtu || |
623 | ((frag->len & 7) && frag->next) || | 625 | ((frag->len & 7) && frag->next) || |
624 | skb_headroom(frag) < hlen) | 626 | skb_headroom(frag) < hlen + ll_rs) |
625 | goto slow_path_clean; | 627 | goto slow_path_clean; |
626 | 628 | ||
627 | /* Partially cloned skb? */ | 629 | /* Partially cloned skb? */ |
@@ -711,8 +713,6 @@ slow_path: | |||
711 | left = skb->len - hlen; /* Space per frame */ | 713 | left = skb->len - hlen; /* Space per frame */ |
712 | ptr = hlen; /* Where to start from */ | 714 | ptr = hlen; /* Where to start from */ |
713 | 715 | ||
714 | ll_rs = LL_RESERVED_SPACE(rt->dst.dev); | ||
715 | |||
716 | /* | 716 | /* |
717 | * Fragment the datagram. | 717 | * Fragment the datagram. |
718 | */ | 718 | */ |
diff --git a/net/ipv4/netfilter/nf_tables_arp.c b/net/ipv4/netfilter/nf_tables_arp.c index 805c8ddfe860..4bbc273b45e8 100644 --- a/net/ipv4/netfilter/nf_tables_arp.c +++ b/net/ipv4/netfilter/nf_tables_arp.c | |||
@@ -72,8 +72,7 @@ static const struct nf_chain_type filter_arp = { | |||
72 | .family = NFPROTO_ARP, | 72 | .family = NFPROTO_ARP, |
73 | .owner = THIS_MODULE, | 73 | .owner = THIS_MODULE, |
74 | .hook_mask = (1 << NF_ARP_IN) | | 74 | .hook_mask = (1 << NF_ARP_IN) | |
75 | (1 << NF_ARP_OUT) | | 75 | (1 << NF_ARP_OUT), |
76 | (1 << NF_ARP_FORWARD), | ||
77 | }; | 76 | }; |
78 | 77 | ||
79 | static int __init nf_tables_arp_init(void) | 78 | static int __init nf_tables_arp_init(void) |
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 0905cf04c2a4..03ad8778c395 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -335,6 +335,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb) | |||
335 | treq->rcv_isn = ntohl(th->seq) - 1; | 335 | treq->rcv_isn = ntohl(th->seq) - 1; |
336 | treq->snt_isn = cookie; | 336 | treq->snt_isn = cookie; |
337 | treq->ts_off = 0; | 337 | treq->ts_off = 0; |
338 | treq->txhash = net_tx_rndhash(); | ||
338 | req->mss = mss; | 339 | req->mss = mss; |
339 | ireq->ir_num = ntohs(th->dest); | 340 | ireq->ir_num = ntohs(th->dest); |
340 | ireq->ir_rmt_port = th->source; | 341 | ireq->ir_rmt_port = th->source; |
diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c index dbcc9352a48f..69ee877574d0 100644 --- a/net/ipv4/tcp_bbr.c +++ b/net/ipv4/tcp_bbr.c | |||
@@ -112,7 +112,8 @@ struct bbr { | |||
112 | cwnd_gain:10, /* current gain for setting cwnd */ | 112 | cwnd_gain:10, /* current gain for setting cwnd */ |
113 | full_bw_cnt:3, /* number of rounds without large bw gains */ | 113 | full_bw_cnt:3, /* number of rounds without large bw gains */ |
114 | cycle_idx:3, /* current index in pacing_gain cycle array */ | 114 | cycle_idx:3, /* current index in pacing_gain cycle array */ |
115 | unused_b:6; | 115 | has_seen_rtt:1, /* have we seen an RTT sample yet? */ |
116 | unused_b:5; | ||
116 | u32 prior_cwnd; /* prior cwnd upon entering loss recovery */ | 117 | u32 prior_cwnd; /* prior cwnd upon entering loss recovery */ |
117 | u32 full_bw; /* recent bw, to estimate if pipe is full */ | 118 | u32 full_bw; /* recent bw, to estimate if pipe is full */ |
118 | }; | 119 | }; |
@@ -211,6 +212,35 @@ static u64 bbr_rate_bytes_per_sec(struct sock *sk, u64 rate, int gain) | |||
211 | return rate >> BW_SCALE; | 212 | return rate >> BW_SCALE; |
212 | } | 213 | } |
213 | 214 | ||
215 | /* Convert a BBR bw and gain factor to a pacing rate in bytes per second. */ | ||
216 | static u32 bbr_bw_to_pacing_rate(struct sock *sk, u32 bw, int gain) | ||
217 | { | ||
218 | u64 rate = bw; | ||
219 | |||
220 | rate = bbr_rate_bytes_per_sec(sk, rate, gain); | ||
221 | rate = min_t(u64, rate, sk->sk_max_pacing_rate); | ||
222 | return rate; | ||
223 | } | ||
224 | |||
225 | /* Initialize pacing rate to: high_gain * init_cwnd / RTT. */ | ||
226 | static void bbr_init_pacing_rate_from_rtt(struct sock *sk) | ||
227 | { | ||
228 | struct tcp_sock *tp = tcp_sk(sk); | ||
229 | struct bbr *bbr = inet_csk_ca(sk); | ||
230 | u64 bw; | ||
231 | u32 rtt_us; | ||
232 | |||
233 | if (tp->srtt_us) { /* any RTT sample yet? */ | ||
234 | rtt_us = max(tp->srtt_us >> 3, 1U); | ||
235 | bbr->has_seen_rtt = 1; | ||
236 | } else { /* no RTT sample yet */ | ||
237 | rtt_us = USEC_PER_MSEC; /* use nominal default RTT */ | ||
238 | } | ||
239 | bw = (u64)tp->snd_cwnd * BW_UNIT; | ||
240 | do_div(bw, rtt_us); | ||
241 | sk->sk_pacing_rate = bbr_bw_to_pacing_rate(sk, bw, bbr_high_gain); | ||
242 | } | ||
243 | |||
214 | /* Pace using current bw estimate and a gain factor. In order to help drive the | 244 | /* Pace using current bw estimate and a gain factor. In order to help drive the |
215 | * network toward lower queues while maintaining high utilization and low | 245 | * network toward lower queues while maintaining high utilization and low |
216 | * latency, the average pacing rate aims to be slightly (~1%) lower than the | 246 | * latency, the average pacing rate aims to be slightly (~1%) lower than the |
@@ -220,12 +250,13 @@ static u64 bbr_rate_bytes_per_sec(struct sock *sk, u64 rate, int gain) | |||
220 | */ | 250 | */ |
221 | static void bbr_set_pacing_rate(struct sock *sk, u32 bw, int gain) | 251 | static void bbr_set_pacing_rate(struct sock *sk, u32 bw, int gain) |
222 | { | 252 | { |
253 | struct tcp_sock *tp = tcp_sk(sk); | ||
223 | struct bbr *bbr = inet_csk_ca(sk); | 254 | struct bbr *bbr = inet_csk_ca(sk); |
224 | u64 rate = bw; | 255 | u32 rate = bbr_bw_to_pacing_rate(sk, bw, gain); |
225 | 256 | ||
226 | rate = bbr_rate_bytes_per_sec(sk, rate, gain); | 257 | if (unlikely(!bbr->has_seen_rtt && tp->srtt_us)) |
227 | rate = min_t(u64, rate, sk->sk_max_pacing_rate); | 258 | bbr_init_pacing_rate_from_rtt(sk); |
228 | if (bbr->mode != BBR_STARTUP || rate > sk->sk_pacing_rate) | 259 | if (bbr_full_bw_reached(sk) || rate > sk->sk_pacing_rate) |
229 | sk->sk_pacing_rate = rate; | 260 | sk->sk_pacing_rate = rate; |
230 | } | 261 | } |
231 | 262 | ||
@@ -798,7 +829,6 @@ static void bbr_init(struct sock *sk) | |||
798 | { | 829 | { |
799 | struct tcp_sock *tp = tcp_sk(sk); | 830 | struct tcp_sock *tp = tcp_sk(sk); |
800 | struct bbr *bbr = inet_csk_ca(sk); | 831 | struct bbr *bbr = inet_csk_ca(sk); |
801 | u64 bw; | ||
802 | 832 | ||
803 | bbr->prior_cwnd = 0; | 833 | bbr->prior_cwnd = 0; |
804 | bbr->tso_segs_goal = 0; /* default segs per skb until first ACK */ | 834 | bbr->tso_segs_goal = 0; /* default segs per skb until first ACK */ |
@@ -814,11 +844,8 @@ static void bbr_init(struct sock *sk) | |||
814 | 844 | ||
815 | minmax_reset(&bbr->bw, bbr->rtt_cnt, 0); /* init max bw to 0 */ | 845 | minmax_reset(&bbr->bw, bbr->rtt_cnt, 0); /* init max bw to 0 */ |
816 | 846 | ||
817 | /* Initialize pacing rate to: high_gain * init_cwnd / RTT. */ | 847 | bbr->has_seen_rtt = 0; |
818 | bw = (u64)tp->snd_cwnd * BW_UNIT; | 848 | bbr_init_pacing_rate_from_rtt(sk); |
819 | do_div(bw, (tp->srtt_us >> 3) ? : USEC_PER_MSEC); | ||
820 | sk->sk_pacing_rate = 0; /* force an update of sk_pacing_rate */ | ||
821 | bbr_set_pacing_rate(sk, bw, bbr_high_gain); | ||
822 | 849 | ||
823 | bbr->restore_cwnd = 0; | 850 | bbr->restore_cwnd = 0; |
824 | bbr->round_start = 0; | 851 | bbr->round_start = 0; |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 25294d43e147..b057653ceca9 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1388,6 +1388,11 @@ void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len) | |||
1388 | unlock_sock_fast(sk, slow); | 1388 | unlock_sock_fast(sk, slow); |
1389 | } | 1389 | } |
1390 | 1390 | ||
1391 | /* we cleared the head states previously only if the skb lacks any IP | ||
1392 | * options, see __udp_queue_rcv_skb(). | ||
1393 | */ | ||
1394 | if (unlikely(IPCB(skb)->opt.optlen > 0)) | ||
1395 | skb_release_head_state(skb); | ||
1391 | consume_stateless_skb(skb); | 1396 | consume_stateless_skb(skb); |
1392 | } | 1397 | } |
1393 | EXPORT_SYMBOL_GPL(skb_consume_udp); | 1398 | EXPORT_SYMBOL_GPL(skb_consume_udp); |
@@ -1779,8 +1784,12 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
1779 | sk_mark_napi_id_once(sk, skb); | 1784 | sk_mark_napi_id_once(sk, skb); |
1780 | } | 1785 | } |
1781 | 1786 | ||
1782 | /* clear all pending head states while they are hot in the cache */ | 1787 | /* At recvmsg() time we need skb->dst to process IP options-related |
1783 | skb_release_head_state(skb); | 1788 | * cmsg, elsewhere can we clear all pending head states while they are |
1789 | * hot in the cache | ||
1790 | */ | ||
1791 | if (likely(IPCB(skb)->opt.optlen == 0)) | ||
1792 | skb_release_head_state(skb); | ||
1784 | 1793 | ||
1785 | rc = __udp_enqueue_schedule_skb(sk, skb); | 1794 | rc = __udp_enqueue_schedule_skb(sk, skb); |
1786 | if (rc < 0) { | 1795 | if (rc < 0) { |
diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c index e9065b8d3af8..abb2c307fbe8 100644 --- a/net/ipv6/output_core.c +++ b/net/ipv6/output_core.c | |||
@@ -78,7 +78,7 @@ EXPORT_SYMBOL(ipv6_select_ident); | |||
78 | 78 | ||
79 | int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) | 79 | int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) |
80 | { | 80 | { |
81 | u16 offset = sizeof(struct ipv6hdr); | 81 | unsigned int offset = sizeof(struct ipv6hdr); |
82 | unsigned int packet_len = skb_tail_pointer(skb) - | 82 | unsigned int packet_len = skb_tail_pointer(skb) - |
83 | skb_network_header(skb); | 83 | skb_network_header(skb); |
84 | int found_rhdr = 0; | 84 | int found_rhdr = 0; |
@@ -86,6 +86,7 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) | |||
86 | 86 | ||
87 | while (offset <= packet_len) { | 87 | while (offset <= packet_len) { |
88 | struct ipv6_opt_hdr *exthdr; | 88 | struct ipv6_opt_hdr *exthdr; |
89 | unsigned int len; | ||
89 | 90 | ||
90 | switch (**nexthdr) { | 91 | switch (**nexthdr) { |
91 | 92 | ||
@@ -111,7 +112,10 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) | |||
111 | 112 | ||
112 | exthdr = (struct ipv6_opt_hdr *)(skb_network_header(skb) + | 113 | exthdr = (struct ipv6_opt_hdr *)(skb_network_header(skb) + |
113 | offset); | 114 | offset); |
114 | offset += ipv6_optlen(exthdr); | 115 | len = ipv6_optlen(exthdr); |
116 | if (len + offset >= IPV6_MAXPLEN) | ||
117 | return -EINVAL; | ||
118 | offset += len; | ||
115 | *nexthdr = &exthdr->nexthdr; | 119 | *nexthdr = &exthdr->nexthdr; |
116 | } | 120 | } |
117 | 121 | ||
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index 7b75b0620730..4e7817abc0b9 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -216,6 +216,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
216 | treq->rcv_isn = ntohl(th->seq) - 1; | 216 | treq->rcv_isn = ntohl(th->seq) - 1; |
217 | treq->snt_isn = cookie; | 217 | treq->snt_isn = cookie; |
218 | treq->ts_off = 0; | 218 | treq->ts_off = 0; |
219 | treq->txhash = net_tx_rndhash(); | ||
219 | 220 | ||
220 | /* | 221 | /* |
221 | * We need to lookup the dst_entry to get the correct window size. | 222 | * We need to lookup the dst_entry to get the correct window size. |
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 552d606e57ca..974cf2a3795a 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -227,114 +227,6 @@ void nf_unregister_net_hooks(struct net *net, const struct nf_hook_ops *reg, | |||
227 | } | 227 | } |
228 | EXPORT_SYMBOL(nf_unregister_net_hooks); | 228 | EXPORT_SYMBOL(nf_unregister_net_hooks); |
229 | 229 | ||
230 | static LIST_HEAD(nf_hook_list); | ||
231 | |||
232 | static int _nf_register_hook(struct nf_hook_ops *reg) | ||
233 | { | ||
234 | struct net *net, *last; | ||
235 | int ret; | ||
236 | |||
237 | for_each_net(net) { | ||
238 | ret = nf_register_net_hook(net, reg); | ||
239 | if (ret && ret != -ENOENT) | ||
240 | goto rollback; | ||
241 | } | ||
242 | list_add_tail(®->list, &nf_hook_list); | ||
243 | |||
244 | return 0; | ||
245 | rollback: | ||
246 | last = net; | ||
247 | for_each_net(net) { | ||
248 | if (net == last) | ||
249 | break; | ||
250 | nf_unregister_net_hook(net, reg); | ||
251 | } | ||
252 | return ret; | ||
253 | } | ||
254 | |||
255 | int nf_register_hook(struct nf_hook_ops *reg) | ||
256 | { | ||
257 | int ret; | ||
258 | |||
259 | rtnl_lock(); | ||
260 | ret = _nf_register_hook(reg); | ||
261 | rtnl_unlock(); | ||
262 | |||
263 | return ret; | ||
264 | } | ||
265 | EXPORT_SYMBOL(nf_register_hook); | ||
266 | |||
267 | static void _nf_unregister_hook(struct nf_hook_ops *reg) | ||
268 | { | ||
269 | struct net *net; | ||
270 | |||
271 | list_del(®->list); | ||
272 | for_each_net(net) | ||
273 | nf_unregister_net_hook(net, reg); | ||
274 | } | ||
275 | |||
276 | void nf_unregister_hook(struct nf_hook_ops *reg) | ||
277 | { | ||
278 | rtnl_lock(); | ||
279 | _nf_unregister_hook(reg); | ||
280 | rtnl_unlock(); | ||
281 | } | ||
282 | EXPORT_SYMBOL(nf_unregister_hook); | ||
283 | |||
284 | int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n) | ||
285 | { | ||
286 | unsigned int i; | ||
287 | int err = 0; | ||
288 | |||
289 | for (i = 0; i < n; i++) { | ||
290 | err = nf_register_hook(®[i]); | ||
291 | if (err) | ||
292 | goto err; | ||
293 | } | ||
294 | return err; | ||
295 | |||
296 | err: | ||
297 | if (i > 0) | ||
298 | nf_unregister_hooks(reg, i); | ||
299 | return err; | ||
300 | } | ||
301 | EXPORT_SYMBOL(nf_register_hooks); | ||
302 | |||
303 | /* Caller MUST take rtnl_lock() */ | ||
304 | int _nf_register_hooks(struct nf_hook_ops *reg, unsigned int n) | ||
305 | { | ||
306 | unsigned int i; | ||
307 | int err = 0; | ||
308 | |||
309 | for (i = 0; i < n; i++) { | ||
310 | err = _nf_register_hook(®[i]); | ||
311 | if (err) | ||
312 | goto err; | ||
313 | } | ||
314 | return err; | ||
315 | |||
316 | err: | ||
317 | if (i > 0) | ||
318 | _nf_unregister_hooks(reg, i); | ||
319 | return err; | ||
320 | } | ||
321 | EXPORT_SYMBOL(_nf_register_hooks); | ||
322 | |||
323 | void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n) | ||
324 | { | ||
325 | while (n-- > 0) | ||
326 | nf_unregister_hook(®[n]); | ||
327 | } | ||
328 | EXPORT_SYMBOL(nf_unregister_hooks); | ||
329 | |||
330 | /* Caller MUST take rtnl_lock */ | ||
331 | void _nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n) | ||
332 | { | ||
333 | while (n-- > 0) | ||
334 | _nf_unregister_hook(®[n]); | ||
335 | } | ||
336 | EXPORT_SYMBOL(_nf_unregister_hooks); | ||
337 | |||
338 | /* Returns 1 if okfn() needs to be executed by the caller, | 230 | /* Returns 1 if okfn() needs to be executed by the caller, |
339 | * -EPERM for NF_DROP, 0 otherwise. Caller must hold rcu_read_lock. */ | 231 | * -EPERM for NF_DROP, 0 otherwise. Caller must hold rcu_read_lock. */ |
340 | int nf_hook_slow(struct sk_buff *skb, struct nf_hook_state *state, | 232 | int nf_hook_slow(struct sk_buff *skb, struct nf_hook_state *state, |
@@ -450,40 +342,9 @@ void (*nf_nat_decode_session_hook)(struct sk_buff *, struct flowi *); | |||
450 | EXPORT_SYMBOL(nf_nat_decode_session_hook); | 342 | EXPORT_SYMBOL(nf_nat_decode_session_hook); |
451 | #endif | 343 | #endif |
452 | 344 | ||
453 | static int nf_register_hook_list(struct net *net) | ||
454 | { | ||
455 | struct nf_hook_ops *elem; | ||
456 | int ret; | ||
457 | |||
458 | rtnl_lock(); | ||
459 | list_for_each_entry(elem, &nf_hook_list, list) { | ||
460 | ret = nf_register_net_hook(net, elem); | ||
461 | if (ret && ret != -ENOENT) | ||
462 | goto out_undo; | ||
463 | } | ||
464 | rtnl_unlock(); | ||
465 | return 0; | ||
466 | |||
467 | out_undo: | ||
468 | list_for_each_entry_continue_reverse(elem, &nf_hook_list, list) | ||
469 | nf_unregister_net_hook(net, elem); | ||
470 | rtnl_unlock(); | ||
471 | return ret; | ||
472 | } | ||
473 | |||
474 | static void nf_unregister_hook_list(struct net *net) | ||
475 | { | ||
476 | struct nf_hook_ops *elem; | ||
477 | |||
478 | rtnl_lock(); | ||
479 | list_for_each_entry(elem, &nf_hook_list, list) | ||
480 | nf_unregister_net_hook(net, elem); | ||
481 | rtnl_unlock(); | ||
482 | } | ||
483 | |||
484 | static int __net_init netfilter_net_init(struct net *net) | 345 | static int __net_init netfilter_net_init(struct net *net) |
485 | { | 346 | { |
486 | int i, h, ret; | 347 | int i, h; |
487 | 348 | ||
488 | for (i = 0; i < ARRAY_SIZE(net->nf.hooks); i++) { | 349 | for (i = 0; i < ARRAY_SIZE(net->nf.hooks); i++) { |
489 | for (h = 0; h < NF_MAX_HOOKS; h++) | 350 | for (h = 0; h < NF_MAX_HOOKS; h++) |
@@ -500,16 +361,12 @@ static int __net_init netfilter_net_init(struct net *net) | |||
500 | return -ENOMEM; | 361 | return -ENOMEM; |
501 | } | 362 | } |
502 | #endif | 363 | #endif |
503 | ret = nf_register_hook_list(net); | ||
504 | if (ret) | ||
505 | remove_proc_entry("netfilter", net->proc_net); | ||
506 | 364 | ||
507 | return ret; | 365 | return 0; |
508 | } | 366 | } |
509 | 367 | ||
510 | static void __net_exit netfilter_net_exit(struct net *net) | 368 | static void __net_exit netfilter_net_exit(struct net *net) |
511 | { | 369 | { |
512 | nf_unregister_hook_list(net); | ||
513 | remove_proc_entry("netfilter", net->proc_net); | 370 | remove_proc_entry("netfilter", net->proc_net); |
514 | } | 371 | } |
515 | 372 | ||
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index e03d16ed550d..899c2c36da13 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -422,7 +422,7 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect) | |||
422 | h = nf_ct_expect_dst_hash(net, &expect->tuple); | 422 | h = nf_ct_expect_dst_hash(net, &expect->tuple); |
423 | hlist_for_each_entry_safe(i, next, &nf_ct_expect_hash[h], hnode) { | 423 | hlist_for_each_entry_safe(i, next, &nf_ct_expect_hash[h], hnode) { |
424 | if (expect_matches(i, expect)) { | 424 | if (expect_matches(i, expect)) { |
425 | if (nf_ct_remove_expect(expect)) | 425 | if (nf_ct_remove_expect(i)) |
426 | break; | 426 | break; |
427 | } else if (expect_clash(i, expect)) { | 427 | } else if (expect_clash(i, expect)) { |
428 | ret = -EBUSY; | 428 | ret = -EBUSY; |
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 832c5a08d9a5..eb541786ccb7 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c | |||
@@ -222,20 +222,21 @@ find_appropriate_src(struct net *net, | |||
222 | .tuple = tuple, | 222 | .tuple = tuple, |
223 | .zone = zone | 223 | .zone = zone |
224 | }; | 224 | }; |
225 | struct rhlist_head *hl; | 225 | struct rhlist_head *hl, *h; |
226 | 226 | ||
227 | hl = rhltable_lookup(&nf_nat_bysource_table, &key, | 227 | hl = rhltable_lookup(&nf_nat_bysource_table, &key, |
228 | nf_nat_bysource_params); | 228 | nf_nat_bysource_params); |
229 | if (!hl) | ||
230 | return 0; | ||
231 | 229 | ||
232 | ct = container_of(hl, typeof(*ct), nat_bysource); | 230 | rhl_for_each_entry_rcu(ct, h, hl, nat_bysource) { |
231 | nf_ct_invert_tuplepr(result, | ||
232 | &ct->tuplehash[IP_CT_DIR_REPLY].tuple); | ||
233 | result->dst = tuple->dst; | ||
233 | 234 | ||
234 | nf_ct_invert_tuplepr(result, | 235 | if (in_range(l3proto, l4proto, result, range)) |
235 | &ct->tuplehash[IP_CT_DIR_REPLY].tuple); | 236 | return 1; |
236 | result->dst = tuple->dst; | 237 | } |
237 | 238 | ||
238 | return in_range(l3proto, l4proto, result, range); | 239 | return 0; |
239 | } | 240 | } |
240 | 241 | ||
241 | /* For [FUTURE] fragmentation handling, we want the least-used | 242 | /* For [FUTURE] fragmentation handling, we want the least-used |
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 92b05e188fd1..733d3e4a30d8 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c | |||
@@ -472,8 +472,7 @@ static void nfnetlink_rcv_skb_batch(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
472 | if (msglen > skb->len) | 472 | if (msglen > skb->len) |
473 | msglen = skb->len; | 473 | msglen = skb->len; |
474 | 474 | ||
475 | if (nlh->nlmsg_len < NLMSG_HDRLEN || | 475 | if (skb->len < NLMSG_HDRLEN + sizeof(struct nfgenmsg)) |
476 | skb->len < NLMSG_HDRLEN + sizeof(struct nfgenmsg)) | ||
477 | return; | 476 | return; |
478 | 477 | ||
479 | err = nla_parse(cda, NFNL_BATCH_MAX, attr, attrlen, nfnl_batch_policy, | 478 | err = nla_parse(cda, NFNL_BATCH_MAX, attr, attrlen, nfnl_batch_policy, |
@@ -500,7 +499,8 @@ static void nfnetlink_rcv(struct sk_buff *skb) | |||
500 | { | 499 | { |
501 | struct nlmsghdr *nlh = nlmsg_hdr(skb); | 500 | struct nlmsghdr *nlh = nlmsg_hdr(skb); |
502 | 501 | ||
503 | if (nlh->nlmsg_len < NLMSG_HDRLEN || | 502 | if (skb->len < NLMSG_HDRLEN || |
503 | nlh->nlmsg_len < NLMSG_HDRLEN || | ||
504 | skb->len < nlh->nlmsg_len) | 504 | skb->len < nlh->nlmsg_len) |
505 | return; | 505 | return; |
506 | 506 | ||
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 08679ebb3068..e3c4c6c3fef7 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c | |||
@@ -629,6 +629,34 @@ ovs_ct_find_existing(struct net *net, const struct nf_conntrack_zone *zone, | |||
629 | return ct; | 629 | return ct; |
630 | } | 630 | } |
631 | 631 | ||
632 | static | ||
633 | struct nf_conn *ovs_ct_executed(struct net *net, | ||
634 | const struct sw_flow_key *key, | ||
635 | const struct ovs_conntrack_info *info, | ||
636 | struct sk_buff *skb, | ||
637 | bool *ct_executed) | ||
638 | { | ||
639 | struct nf_conn *ct = NULL; | ||
640 | |||
641 | /* If no ct, check if we have evidence that an existing conntrack entry | ||
642 | * might be found for this skb. This happens when we lose a skb->_nfct | ||
643 | * due to an upcall, or if the direction is being forced. If the | ||
644 | * connection was not confirmed, it is not cached and needs to be run | ||
645 | * through conntrack again. | ||
646 | */ | ||
647 | *ct_executed = (key->ct_state & OVS_CS_F_TRACKED) && | ||
648 | !(key->ct_state & OVS_CS_F_INVALID) && | ||
649 | (key->ct_zone == info->zone.id); | ||
650 | |||
651 | if (*ct_executed || (!key->ct_state && info->force)) { | ||
652 | ct = ovs_ct_find_existing(net, &info->zone, info->family, skb, | ||
653 | !!(key->ct_state & | ||
654 | OVS_CS_F_NAT_MASK)); | ||
655 | } | ||
656 | |||
657 | return ct; | ||
658 | } | ||
659 | |||
632 | /* Determine whether skb->_nfct is equal to the result of conntrack lookup. */ | 660 | /* Determine whether skb->_nfct is equal to the result of conntrack lookup. */ |
633 | static bool skb_nfct_cached(struct net *net, | 661 | static bool skb_nfct_cached(struct net *net, |
634 | const struct sw_flow_key *key, | 662 | const struct sw_flow_key *key, |
@@ -637,24 +665,17 @@ static bool skb_nfct_cached(struct net *net, | |||
637 | { | 665 | { |
638 | enum ip_conntrack_info ctinfo; | 666 | enum ip_conntrack_info ctinfo; |
639 | struct nf_conn *ct; | 667 | struct nf_conn *ct; |
668 | bool ct_executed = true; | ||
640 | 669 | ||
641 | ct = nf_ct_get(skb, &ctinfo); | 670 | ct = nf_ct_get(skb, &ctinfo); |
642 | /* If no ct, check if we have evidence that an existing conntrack entry | ||
643 | * might be found for this skb. This happens when we lose a skb->_nfct | ||
644 | * due to an upcall. If the connection was not confirmed, it is not | ||
645 | * cached and needs to be run through conntrack again. | ||
646 | */ | ||
647 | if (!ct && key->ct_state & OVS_CS_F_TRACKED && | ||
648 | !(key->ct_state & OVS_CS_F_INVALID) && | ||
649 | key->ct_zone == info->zone.id) { | ||
650 | ct = ovs_ct_find_existing(net, &info->zone, info->family, skb, | ||
651 | !!(key->ct_state | ||
652 | & OVS_CS_F_NAT_MASK)); | ||
653 | if (ct) | ||
654 | nf_ct_get(skb, &ctinfo); | ||
655 | } | ||
656 | if (!ct) | 671 | if (!ct) |
672 | ct = ovs_ct_executed(net, key, info, skb, &ct_executed); | ||
673 | |||
674 | if (ct) | ||
675 | nf_ct_get(skb, &ctinfo); | ||
676 | else | ||
657 | return false; | 677 | return false; |
678 | |||
658 | if (!net_eq(net, read_pnet(&ct->ct_net))) | 679 | if (!net_eq(net, read_pnet(&ct->ct_net))) |
659 | return false; | 680 | return false; |
660 | if (!nf_ct_zone_equal_any(info->ct, nf_ct_zone(ct))) | 681 | if (!nf_ct_zone_equal_any(info->ct, nf_ct_zone(ct))) |
@@ -679,7 +700,7 @@ static bool skb_nfct_cached(struct net *net, | |||
679 | return false; | 700 | return false; |
680 | } | 701 | } |
681 | 702 | ||
682 | return true; | 703 | return ct_executed; |
683 | } | 704 | } |
684 | 705 | ||
685 | #ifdef CONFIG_NF_NAT_NEEDED | 706 | #ifdef CONFIG_NF_NAT_NEEDED |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index e3beb28203eb..008bb34ee324 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -214,6 +214,7 @@ static void prb_clear_rxhash(struct tpacket_kbdq_core *, | |||
214 | static void prb_fill_vlan_info(struct tpacket_kbdq_core *, | 214 | static void prb_fill_vlan_info(struct tpacket_kbdq_core *, |
215 | struct tpacket3_hdr *); | 215 | struct tpacket3_hdr *); |
216 | static void packet_flush_mclist(struct sock *sk); | 216 | static void packet_flush_mclist(struct sock *sk); |
217 | static void packet_pick_tx_queue(struct net_device *dev, struct sk_buff *skb); | ||
217 | 218 | ||
218 | struct packet_skb_cb { | 219 | struct packet_skb_cb { |
219 | union { | 220 | union { |
@@ -260,6 +261,7 @@ static int packet_direct_xmit(struct sk_buff *skb) | |||
260 | if (skb != orig_skb) | 261 | if (skb != orig_skb) |
261 | goto drop; | 262 | goto drop; |
262 | 263 | ||
264 | packet_pick_tx_queue(dev, skb); | ||
263 | txq = skb_get_tx_queue(dev, skb); | 265 | txq = skb_get_tx_queue(dev, skb); |
264 | 266 | ||
265 | local_bh_disable(); | 267 | local_bh_disable(); |
@@ -2747,8 +2749,6 @@ tpacket_error: | |||
2747 | goto tpacket_error; | 2749 | goto tpacket_error; |
2748 | } | 2750 | } |
2749 | 2751 | ||
2750 | packet_pick_tx_queue(dev, skb); | ||
2751 | |||
2752 | skb->destructor = tpacket_destruct_skb; | 2752 | skb->destructor = tpacket_destruct_skb; |
2753 | __packet_set_status(po, ph, TP_STATUS_SENDING); | 2753 | __packet_set_status(po, ph, TP_STATUS_SENDING); |
2754 | packet_inc_pending(&po->tx_ring); | 2754 | packet_inc_pending(&po->tx_ring); |
@@ -2931,8 +2931,6 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len) | |||
2931 | skb->priority = sk->sk_priority; | 2931 | skb->priority = sk->sk_priority; |
2932 | skb->mark = sockc.mark; | 2932 | skb->mark = sockc.mark; |
2933 | 2933 | ||
2934 | packet_pick_tx_queue(dev, skb); | ||
2935 | |||
2936 | if (po->has_vnet_hdr) { | 2934 | if (po->has_vnet_hdr) { |
2937 | err = virtio_net_hdr_to_skb(skb, &vnet_hdr, vio_le()); | 2935 | err = virtio_net_hdr_to_skb(skb, &vnet_hdr, vio_le()); |
2938 | if (err) | 2936 | if (err) |
diff --git a/net/rds/send.c b/net/rds/send.c index e81aa176f4e2..41b9f0f5bb9c 100644 --- a/net/rds/send.c +++ b/net/rds/send.c | |||
@@ -170,8 +170,8 @@ restart: | |||
170 | * The acquire_in_xmit() check above ensures that only one | 170 | * The acquire_in_xmit() check above ensures that only one |
171 | * caller can increment c_send_gen at any time. | 171 | * caller can increment c_send_gen at any time. |
172 | */ | 172 | */ |
173 | cp->cp_send_gen++; | 173 | send_gen = READ_ONCE(cp->cp_send_gen) + 1; |
174 | send_gen = cp->cp_send_gen; | 174 | WRITE_ONCE(cp->cp_send_gen, send_gen); |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * rds_conn_shutdown() sets the conn state and then tests RDS_IN_XMIT, | 177 | * rds_conn_shutdown() sets the conn state and then tests RDS_IN_XMIT, |
@@ -431,7 +431,7 @@ over_batch: | |||
431 | smp_mb(); | 431 | smp_mb(); |
432 | if ((test_bit(0, &conn->c_map_queued) || | 432 | if ((test_bit(0, &conn->c_map_queued) || |
433 | !list_empty(&cp->cp_send_queue)) && | 433 | !list_empty(&cp->cp_send_queue)) && |
434 | send_gen == cp->cp_send_gen) { | 434 | send_gen == READ_ONCE(cp->cp_send_gen)) { |
435 | rds_stats_inc(s_send_lock_queue_raced); | 435 | rds_stats_inc(s_send_lock_queue_raced); |
436 | if (batch_count < send_batch_count) | 436 | if (batch_count < send_batch_count) |
437 | goto restart; | 437 | goto restart; |
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index aed6cf2e9fd8..f2e9ed34a963 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -835,7 +835,7 @@ out_nlmsg_trim: | |||
835 | } | 835 | } |
836 | 836 | ||
837 | static int | 837 | static int |
838 | act_get_notify(struct net *net, u32 portid, struct nlmsghdr *n, | 838 | tcf_get_notify(struct net *net, u32 portid, struct nlmsghdr *n, |
839 | struct list_head *actions, int event) | 839 | struct list_head *actions, int event) |
840 | { | 840 | { |
841 | struct sk_buff *skb; | 841 | struct sk_buff *skb; |
@@ -1018,7 +1018,7 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n, | |||
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | if (event == RTM_GETACTION) | 1020 | if (event == RTM_GETACTION) |
1021 | ret = act_get_notify(net, portid, n, &actions, event); | 1021 | ret = tcf_get_notify(net, portid, n, &actions, event); |
1022 | else { /* delete */ | 1022 | else { /* delete */ |
1023 | ret = tcf_del_notify(net, n, &actions, portid); | 1023 | ret = tcf_del_notify(net, n, &actions, portid); |
1024 | if (ret) | 1024 | if (ret) |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 4e16b02ed832..6110447fe51d 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -228,7 +228,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, | |||
228 | sctp_adaptation_ind_param_t aiparam; | 228 | sctp_adaptation_ind_param_t aiparam; |
229 | sctp_supported_ext_param_t ext_param; | 229 | sctp_supported_ext_param_t ext_param; |
230 | int num_ext = 0; | 230 | int num_ext = 0; |
231 | __u8 extensions[3]; | 231 | __u8 extensions[4]; |
232 | struct sctp_paramhdr *auth_chunks = NULL, | 232 | struct sctp_paramhdr *auth_chunks = NULL, |
233 | *auth_hmacs = NULL; | 233 | *auth_hmacs = NULL; |
234 | 234 | ||
@@ -396,7 +396,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, | |||
396 | sctp_adaptation_ind_param_t aiparam; | 396 | sctp_adaptation_ind_param_t aiparam; |
397 | sctp_supported_ext_param_t ext_param; | 397 | sctp_supported_ext_param_t ext_param; |
398 | int num_ext = 0; | 398 | int num_ext = 0; |
399 | __u8 extensions[3]; | 399 | __u8 extensions[4]; |
400 | struct sctp_paramhdr *auth_chunks = NULL, | 400 | struct sctp_paramhdr *auth_chunks = NULL, |
401 | *auth_hmacs = NULL, | 401 | *auth_hmacs = NULL, |
402 | *auth_random = NULL; | 402 | *auth_random = NULL; |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index d5b54c020dec..4f154d388748 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -1624,6 +1624,8 @@ static void xs_tcp_state_change(struct sock *sk) | |||
1624 | if (test_and_clear_bit(XPRT_SOCK_CONNECTING, | 1624 | if (test_and_clear_bit(XPRT_SOCK_CONNECTING, |
1625 | &transport->sock_state)) | 1625 | &transport->sock_state)) |
1626 | xprt_clear_connecting(xprt); | 1626 | xprt_clear_connecting(xprt); |
1627 | if (sk->sk_err) | ||
1628 | xprt_wake_pending_tasks(xprt, -sk->sk_err); | ||
1627 | xs_sock_mark_closed(xprt); | 1629 | xs_sock_mark_closed(xprt); |
1628 | } | 1630 | } |
1629 | out: | 1631 | out: |
diff --git a/scripts/parse-maintainers.pl b/scripts/parse-maintainers.pl new file mode 100644 index 000000000000..a0fe34349b24 --- /dev/null +++ b/scripts/parse-maintainers.pl | |||
@@ -0,0 +1,77 @@ | |||
1 | #!/usr/bin/perl -w | ||
2 | |||
3 | use strict; | ||
4 | |||
5 | my %map; | ||
6 | |||
7 | # sort comparison function | ||
8 | sub by_category($$) { | ||
9 | my ($a, $b) = @_; | ||
10 | |||
11 | $a = uc $a; | ||
12 | $b = uc $b; | ||
13 | |||
14 | # This always sorts last | ||
15 | $a =~ s/THE REST/ZZZZZZ/g; | ||
16 | $b =~ s/THE REST/ZZZZZZ/g; | ||
17 | |||
18 | $a cmp $b; | ||
19 | } | ||
20 | |||
21 | sub alpha_output { | ||
22 | my $key; | ||
23 | my $sort_method = \&by_category; | ||
24 | my $sep = ""; | ||
25 | |||
26 | foreach $key (sort $sort_method keys %map) { | ||
27 | if ($key ne " ") { | ||
28 | print $sep . $key . "\n"; | ||
29 | $sep = "\n"; | ||
30 | } | ||
31 | print $map{$key}; | ||
32 | } | ||
33 | } | ||
34 | |||
35 | sub trim { | ||
36 | my $s = shift; | ||
37 | $s =~ s/\s+$//; | ||
38 | $s =~ s/^\s+//; | ||
39 | return $s; | ||
40 | } | ||
41 | |||
42 | sub file_input { | ||
43 | my $lastline = ""; | ||
44 | my $case = " "; | ||
45 | $map{$case} = ""; | ||
46 | |||
47 | while (<>) { | ||
48 | my $line = $_; | ||
49 | |||
50 | # Pattern line? | ||
51 | if ($line =~ m/^([A-Z]):\s*(.*)/) { | ||
52 | $line = $1 . ":\t" . trim($2) . "\n"; | ||
53 | if ($lastline eq "") { | ||
54 | $map{$case} = $map{$case} . $line; | ||
55 | next; | ||
56 | } | ||
57 | $case = trim($lastline); | ||
58 | exists $map{$case} and die "Header '$case' already exists"; | ||
59 | $map{$case} = $line; | ||
60 | $lastline = ""; | ||
61 | next; | ||
62 | } | ||
63 | |||
64 | if ($case eq " ") { | ||
65 | $map{$case} = $map{$case} . $lastline; | ||
66 | $lastline = $line; | ||
67 | next; | ||
68 | } | ||
69 | trim($lastline) eq "" or die ("Odd non-pattern line '$lastline' for '$case'"); | ||
70 | $lastline = $line; | ||
71 | } | ||
72 | $map{$case} = $map{$case} . $lastline; | ||
73 | } | ||
74 | |||
75 | &file_input; | ||
76 | &alpha_output; | ||
77 | exit(0); | ||
diff --git a/security/keys/internal.h b/security/keys/internal.h index 91bc6214ae57..1c02c6547038 100644 --- a/security/keys/internal.h +++ b/security/keys/internal.h | |||
@@ -198,7 +198,7 @@ struct request_key_auth { | |||
198 | void *callout_info; | 198 | void *callout_info; |
199 | size_t callout_len; | 199 | size_t callout_len; |
200 | pid_t pid; | 200 | pid_t pid; |
201 | }; | 201 | } __randomize_layout; |
202 | 202 | ||
203 | extern struct key_type key_type_request_key_auth; | 203 | extern struct key_type key_type_request_key_auth; |
204 | extern struct key *request_key_auth_new(struct key *target, | 204 | extern struct key *request_key_auth_new(struct key *target, |
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 7e0405e1651d..412a7c82995a 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c | |||
@@ -120,7 +120,7 @@ int bpf_load_program(enum bpf_prog_type type, const struct bpf_insn *insns, | |||
120 | int bpf_verify_program(enum bpf_prog_type type, const struct bpf_insn *insns, | 120 | int bpf_verify_program(enum bpf_prog_type type, const struct bpf_insn *insns, |
121 | size_t insns_cnt, int strict_alignment, | 121 | size_t insns_cnt, int strict_alignment, |
122 | const char *license, __u32 kern_version, | 122 | const char *license, __u32 kern_version, |
123 | char *log_buf, size_t log_buf_sz) | 123 | char *log_buf, size_t log_buf_sz, int log_level) |
124 | { | 124 | { |
125 | union bpf_attr attr; | 125 | union bpf_attr attr; |
126 | 126 | ||
@@ -131,7 +131,7 @@ int bpf_verify_program(enum bpf_prog_type type, const struct bpf_insn *insns, | |||
131 | attr.license = ptr_to_u64(license); | 131 | attr.license = ptr_to_u64(license); |
132 | attr.log_buf = ptr_to_u64(log_buf); | 132 | attr.log_buf = ptr_to_u64(log_buf); |
133 | attr.log_size = log_buf_sz; | 133 | attr.log_size = log_buf_sz; |
134 | attr.log_level = 2; | 134 | attr.log_level = log_level; |
135 | log_buf[0] = 0; | 135 | log_buf[0] = 0; |
136 | attr.kern_version = kern_version; | 136 | attr.kern_version = kern_version; |
137 | attr.prog_flags = strict_alignment ? BPF_F_STRICT_ALIGNMENT : 0; | 137 | attr.prog_flags = strict_alignment ? BPF_F_STRICT_ALIGNMENT : 0; |
diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h index 16de44a14b48..418c86e69bcb 100644 --- a/tools/lib/bpf/bpf.h +++ b/tools/lib/bpf/bpf.h | |||
@@ -38,7 +38,7 @@ int bpf_load_program(enum bpf_prog_type type, const struct bpf_insn *insns, | |||
38 | int bpf_verify_program(enum bpf_prog_type type, const struct bpf_insn *insns, | 38 | int bpf_verify_program(enum bpf_prog_type type, const struct bpf_insn *insns, |
39 | size_t insns_cnt, int strict_alignment, | 39 | size_t insns_cnt, int strict_alignment, |
40 | const char *license, __u32 kern_version, | 40 | const char *license, __u32 kern_version, |
41 | char *log_buf, size_t log_buf_sz); | 41 | char *log_buf, size_t log_buf_sz, int log_level); |
42 | 42 | ||
43 | int bpf_map_update_elem(int fd, const void *key, const void *value, | 43 | int bpf_map_update_elem(int fd, const void *key, const void *value, |
44 | __u64 flags); | 44 | __u64 flags); |
diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index a4d3762cd825..83874b0e266c 100644 --- a/tools/perf/ui/browser.c +++ b/tools/perf/ui/browser.c | |||
@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser, | |||
704 | ui_browser__gotorc(browser, row, column + 1); | 704 | ui_browser__gotorc(browser, row, column + 1); |
705 | SLsmg_draw_hline(2); | 705 | SLsmg_draw_hline(2); |
706 | 706 | ||
707 | if (row++ == 0) | 707 | if (++row == 0) |
708 | goto out; | 708 | goto out; |
709 | } else | 709 | } else |
710 | row = 0; | 710 | row = 0; |
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 87b431886670..413f74df08de 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -273,7 +273,7 @@ struct perf_evsel *perf_evsel__new_cycles(void) | |||
273 | struct perf_event_attr attr = { | 273 | struct perf_event_attr attr = { |
274 | .type = PERF_TYPE_HARDWARE, | 274 | .type = PERF_TYPE_HARDWARE, |
275 | .config = PERF_COUNT_HW_CPU_CYCLES, | 275 | .config = PERF_COUNT_HW_CPU_CYCLES, |
276 | .exclude_kernel = 1, | 276 | .exclude_kernel = geteuid() != 0, |
277 | }; | 277 | }; |
278 | struct perf_evsel *evsel; | 278 | struct perf_evsel *evsel; |
279 | 279 | ||
@@ -298,8 +298,10 @@ struct perf_evsel *perf_evsel__new_cycles(void) | |||
298 | goto out; | 298 | goto out; |
299 | 299 | ||
300 | /* use asprintf() because free(evsel) assumes name is allocated */ | 300 | /* use asprintf() because free(evsel) assumes name is allocated */ |
301 | if (asprintf(&evsel->name, "cycles%.*s", | 301 | if (asprintf(&evsel->name, "cycles%s%s%.*s", |
302 | attr.precise_ip ? attr.precise_ip + 1 : 0, ":ppp") < 0) | 302 | (attr.precise_ip || attr.exclude_kernel) ? ":" : "", |
303 | attr.exclude_kernel ? "u" : "", | ||
304 | attr.precise_ip ? attr.precise_ip + 1 : 0, "ppp") < 0) | ||
303 | goto error_free; | 305 | goto error_free; |
304 | out: | 306 | out: |
305 | return evsel; | 307 | return evsel; |
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 5de2b86b9880..2e9eb6aa3ce2 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c | |||
@@ -2209,7 +2209,7 @@ int machine__get_kernel_start(struct machine *machine) | |||
2209 | machine->kernel_start = 1ULL << 63; | 2209 | machine->kernel_start = 1ULL << 63; |
2210 | if (map) { | 2210 | if (map) { |
2211 | err = map__load(map); | 2211 | err = map__load(map); |
2212 | if (map->start) | 2212 | if (!err) |
2213 | machine->kernel_start = map->start; | 2213 | machine->kernel_start = map->start; |
2214 | } | 2214 | } |
2215 | return err; | 2215 | return err; |
diff --git a/tools/testing/selftests/bpf/test_align.c b/tools/testing/selftests/bpf/test_align.c index bccebd935907..29793694cbc7 100644 --- a/tools/testing/selftests/bpf/test_align.c +++ b/tools/testing/selftests/bpf/test_align.c | |||
@@ -380,7 +380,7 @@ static int do_test_single(struct bpf_align_test *test) | |||
380 | prog_len = probe_filter_length(prog); | 380 | prog_len = probe_filter_length(prog); |
381 | fd_prog = bpf_verify_program(prog_type ? : BPF_PROG_TYPE_SOCKET_FILTER, | 381 | fd_prog = bpf_verify_program(prog_type ? : BPF_PROG_TYPE_SOCKET_FILTER, |
382 | prog, prog_len, 1, "GPL", 0, | 382 | prog, prog_len, 1, "GPL", 0, |
383 | bpf_vlog, sizeof(bpf_vlog)); | 383 | bpf_vlog, sizeof(bpf_vlog), 2); |
384 | if (fd_prog < 0) { | 384 | if (fd_prog < 0) { |
385 | printf("Failed to load program.\n"); | 385 | printf("Failed to load program.\n"); |
386 | printf("%s", bpf_vlog); | 386 | printf("%s", bpf_vlog); |
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c index 404aec520812..af7d173910f4 100644 --- a/tools/testing/selftests/bpf/test_verifier.c +++ b/tools/testing/selftests/bpf/test_verifier.c | |||
@@ -4969,7 +4969,7 @@ static struct bpf_test tests[] = { | |||
4969 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_2, | 4969 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_2, |
4970 | sizeof(struct test_val), 4), | 4970 | sizeof(struct test_val), 4), |
4971 | BPF_MOV64_IMM(BPF_REG_4, 0), | 4971 | BPF_MOV64_IMM(BPF_REG_4, 0), |
4972 | BPF_JMP_REG(BPF_JGE, BPF_REG_4, BPF_REG_2, 2), | 4972 | BPF_JMP_REG(BPF_JSGE, BPF_REG_4, BPF_REG_2, 2), |
4973 | BPF_MOV64_IMM(BPF_REG_3, 0), | 4973 | BPF_MOV64_IMM(BPF_REG_3, 0), |
4974 | BPF_EMIT_CALL(BPF_FUNC_probe_read), | 4974 | BPF_EMIT_CALL(BPF_FUNC_probe_read), |
4975 | BPF_MOV64_IMM(BPF_REG_0, 0), | 4975 | BPF_MOV64_IMM(BPF_REG_0, 0), |
@@ -4995,7 +4995,7 @@ static struct bpf_test tests[] = { | |||
4995 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_2, | 4995 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_2, |
4996 | sizeof(struct test_val) + 1, 4), | 4996 | sizeof(struct test_val) + 1, 4), |
4997 | BPF_MOV64_IMM(BPF_REG_4, 0), | 4997 | BPF_MOV64_IMM(BPF_REG_4, 0), |
4998 | BPF_JMP_REG(BPF_JGE, BPF_REG_4, BPF_REG_2, 2), | 4998 | BPF_JMP_REG(BPF_JSGE, BPF_REG_4, BPF_REG_2, 2), |
4999 | BPF_MOV64_IMM(BPF_REG_3, 0), | 4999 | BPF_MOV64_IMM(BPF_REG_3, 0), |
5000 | BPF_EMIT_CALL(BPF_FUNC_probe_read), | 5000 | BPF_EMIT_CALL(BPF_FUNC_probe_read), |
5001 | BPF_MOV64_IMM(BPF_REG_0, 0), | 5001 | BPF_MOV64_IMM(BPF_REG_0, 0), |
@@ -5023,7 +5023,7 @@ static struct bpf_test tests[] = { | |||
5023 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_2, | 5023 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_2, |
5024 | sizeof(struct test_val) - 20, 4), | 5024 | sizeof(struct test_val) - 20, 4), |
5025 | BPF_MOV64_IMM(BPF_REG_4, 0), | 5025 | BPF_MOV64_IMM(BPF_REG_4, 0), |
5026 | BPF_JMP_REG(BPF_JGE, BPF_REG_4, BPF_REG_2, 2), | 5026 | BPF_JMP_REG(BPF_JSGE, BPF_REG_4, BPF_REG_2, 2), |
5027 | BPF_MOV64_IMM(BPF_REG_3, 0), | 5027 | BPF_MOV64_IMM(BPF_REG_3, 0), |
5028 | BPF_EMIT_CALL(BPF_FUNC_probe_read), | 5028 | BPF_EMIT_CALL(BPF_FUNC_probe_read), |
5029 | BPF_MOV64_IMM(BPF_REG_0, 0), | 5029 | BPF_MOV64_IMM(BPF_REG_0, 0), |
@@ -5050,7 +5050,7 @@ static struct bpf_test tests[] = { | |||
5050 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_2, | 5050 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_2, |
5051 | sizeof(struct test_val) - 19, 4), | 5051 | sizeof(struct test_val) - 19, 4), |
5052 | BPF_MOV64_IMM(BPF_REG_4, 0), | 5052 | BPF_MOV64_IMM(BPF_REG_4, 0), |
5053 | BPF_JMP_REG(BPF_JGE, BPF_REG_4, BPF_REG_2, 2), | 5053 | BPF_JMP_REG(BPF_JSGE, BPF_REG_4, BPF_REG_2, 2), |
5054 | BPF_MOV64_IMM(BPF_REG_3, 0), | 5054 | BPF_MOV64_IMM(BPF_REG_3, 0), |
5055 | BPF_EMIT_CALL(BPF_FUNC_probe_read), | 5055 | BPF_EMIT_CALL(BPF_FUNC_probe_read), |
5056 | BPF_MOV64_IMM(BPF_REG_0, 0), | 5056 | BPF_MOV64_IMM(BPF_REG_0, 0), |
@@ -5510,6 +5510,476 @@ static struct bpf_test tests[] = { | |||
5510 | .errstr = "invalid bpf_context access", | 5510 | .errstr = "invalid bpf_context access", |
5511 | .prog_type = BPF_PROG_TYPE_LWT_IN, | 5511 | .prog_type = BPF_PROG_TYPE_LWT_IN, |
5512 | }, | 5512 | }, |
5513 | { | ||
5514 | "bounds checks mixing signed and unsigned, positive bounds", | ||
5515 | .insns = { | ||
5516 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5517 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5518 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5519 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5520 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5521 | BPF_FUNC_map_lookup_elem), | ||
5522 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 7), | ||
5523 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5524 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5525 | BPF_MOV64_IMM(BPF_REG_2, 2), | ||
5526 | BPF_JMP_REG(BPF_JGE, BPF_REG_2, BPF_REG_1, 3), | ||
5527 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 4, 2), | ||
5528 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5529 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5530 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5531 | BPF_EXIT_INSN(), | ||
5532 | }, | ||
5533 | .fixup_map1 = { 3 }, | ||
5534 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5535 | .errstr = "R0 min value is negative", | ||
5536 | .result = REJECT, | ||
5537 | .result_unpriv = REJECT, | ||
5538 | }, | ||
5539 | { | ||
5540 | "bounds checks mixing signed and unsigned", | ||
5541 | .insns = { | ||
5542 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5543 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5544 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5545 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5546 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5547 | BPF_FUNC_map_lookup_elem), | ||
5548 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 7), | ||
5549 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5550 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5551 | BPF_MOV64_IMM(BPF_REG_2, -1), | ||
5552 | BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_2, 3), | ||
5553 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5554 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5555 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5556 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5557 | BPF_EXIT_INSN(), | ||
5558 | }, | ||
5559 | .fixup_map1 = { 3 }, | ||
5560 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5561 | .errstr = "R0 min value is negative", | ||
5562 | .result = REJECT, | ||
5563 | .result_unpriv = REJECT, | ||
5564 | }, | ||
5565 | { | ||
5566 | "bounds checks mixing signed and unsigned, variant 2", | ||
5567 | .insns = { | ||
5568 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5569 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5570 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5571 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5572 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5573 | BPF_FUNC_map_lookup_elem), | ||
5574 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9), | ||
5575 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5576 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5577 | BPF_MOV64_IMM(BPF_REG_2, -1), | ||
5578 | BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_2, 5), | ||
5579 | BPF_MOV64_IMM(BPF_REG_8, 0), | ||
5580 | BPF_ALU64_REG(BPF_ADD, BPF_REG_8, BPF_REG_1), | ||
5581 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_8, 1, 2), | ||
5582 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_8), | ||
5583 | BPF_ST_MEM(BPF_B, BPF_REG_8, 0, 0), | ||
5584 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5585 | BPF_EXIT_INSN(), | ||
5586 | }, | ||
5587 | .fixup_map1 = { 3 }, | ||
5588 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5589 | .errstr = "R8 invalid mem access 'inv'", | ||
5590 | .result = REJECT, | ||
5591 | .result_unpriv = REJECT, | ||
5592 | }, | ||
5593 | { | ||
5594 | "bounds checks mixing signed and unsigned, variant 3", | ||
5595 | .insns = { | ||
5596 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5597 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5598 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5599 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5600 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5601 | BPF_FUNC_map_lookup_elem), | ||
5602 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 8), | ||
5603 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5604 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5605 | BPF_MOV64_IMM(BPF_REG_2, -1), | ||
5606 | BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_2, 4), | ||
5607 | BPF_MOV64_REG(BPF_REG_8, BPF_REG_1), | ||
5608 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_8, 1, 2), | ||
5609 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_8), | ||
5610 | BPF_ST_MEM(BPF_B, BPF_REG_8, 0, 0), | ||
5611 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5612 | BPF_EXIT_INSN(), | ||
5613 | }, | ||
5614 | .fixup_map1 = { 3 }, | ||
5615 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5616 | .errstr = "R8 invalid mem access 'inv'", | ||
5617 | .result = REJECT, | ||
5618 | .result_unpriv = REJECT, | ||
5619 | }, | ||
5620 | { | ||
5621 | "bounds checks mixing signed and unsigned, variant 4", | ||
5622 | .insns = { | ||
5623 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5624 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5625 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5626 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5627 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5628 | BPF_FUNC_map_lookup_elem), | ||
5629 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 7), | ||
5630 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5631 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5632 | BPF_MOV64_IMM(BPF_REG_2, 1), | ||
5633 | BPF_ALU64_REG(BPF_AND, BPF_REG_1, BPF_REG_2), | ||
5634 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5635 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5636 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5637 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5638 | BPF_EXIT_INSN(), | ||
5639 | }, | ||
5640 | .fixup_map1 = { 3 }, | ||
5641 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5642 | .errstr = "R0 min value is negative", | ||
5643 | .result = REJECT, | ||
5644 | .result_unpriv = REJECT, | ||
5645 | }, | ||
5646 | { | ||
5647 | "bounds checks mixing signed and unsigned, variant 5", | ||
5648 | .insns = { | ||
5649 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5650 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5651 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5652 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5653 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5654 | BPF_FUNC_map_lookup_elem), | ||
5655 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9), | ||
5656 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5657 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5658 | BPF_MOV64_IMM(BPF_REG_2, -1), | ||
5659 | BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_2, 5), | ||
5660 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 4), | ||
5661 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_0, 4), | ||
5662 | BPF_ALU64_REG(BPF_SUB, BPF_REG_0, BPF_REG_1), | ||
5663 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5664 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5665 | BPF_EXIT_INSN(), | ||
5666 | }, | ||
5667 | .fixup_map1 = { 3 }, | ||
5668 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5669 | .errstr = "R0 invalid mem access", | ||
5670 | .result = REJECT, | ||
5671 | .result_unpriv = REJECT, | ||
5672 | }, | ||
5673 | { | ||
5674 | "bounds checks mixing signed and unsigned, variant 6", | ||
5675 | .insns = { | ||
5676 | BPF_MOV64_IMM(BPF_REG_2, 0), | ||
5677 | BPF_MOV64_REG(BPF_REG_3, BPF_REG_10), | ||
5678 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_3, -512), | ||
5679 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5680 | BPF_LDX_MEM(BPF_DW, BPF_REG_4, BPF_REG_10, -16), | ||
5681 | BPF_MOV64_IMM(BPF_REG_6, -1), | ||
5682 | BPF_JMP_REG(BPF_JGT, BPF_REG_4, BPF_REG_6, 5), | ||
5683 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_4, 1, 4), | ||
5684 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_4, 1), | ||
5685 | BPF_MOV64_IMM(BPF_REG_5, 0), | ||
5686 | BPF_ST_MEM(BPF_H, BPF_REG_10, -512, 0), | ||
5687 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5688 | BPF_FUNC_skb_load_bytes), | ||
5689 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5690 | BPF_EXIT_INSN(), | ||
5691 | }, | ||
5692 | .errstr_unpriv = "R4 min value is negative, either use unsigned", | ||
5693 | .errstr = "R4 min value is negative, either use unsigned", | ||
5694 | .result = REJECT, | ||
5695 | .result_unpriv = REJECT, | ||
5696 | }, | ||
5697 | { | ||
5698 | "bounds checks mixing signed and unsigned, variant 7", | ||
5699 | .insns = { | ||
5700 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5701 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5702 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5703 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5704 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5705 | BPF_FUNC_map_lookup_elem), | ||
5706 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 7), | ||
5707 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5708 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5709 | BPF_MOV64_IMM(BPF_REG_2, 1024 * 1024 * 1024), | ||
5710 | BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_2, 3), | ||
5711 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5712 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5713 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5714 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5715 | BPF_EXIT_INSN(), | ||
5716 | }, | ||
5717 | .fixup_map1 = { 3 }, | ||
5718 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5719 | .errstr = "R0 min value is negative", | ||
5720 | .result = REJECT, | ||
5721 | .result_unpriv = REJECT, | ||
5722 | }, | ||
5723 | { | ||
5724 | "bounds checks mixing signed and unsigned, variant 8", | ||
5725 | .insns = { | ||
5726 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5727 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5728 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5729 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5730 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5731 | BPF_FUNC_map_lookup_elem), | ||
5732 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 7), | ||
5733 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5734 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5735 | BPF_MOV64_IMM(BPF_REG_2, 1024 * 1024 * 1024 + 1), | ||
5736 | BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_2, 3), | ||
5737 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5738 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5739 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5740 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5741 | BPF_EXIT_INSN(), | ||
5742 | }, | ||
5743 | .fixup_map1 = { 3 }, | ||
5744 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5745 | .errstr = "R0 min value is negative", | ||
5746 | .result = REJECT, | ||
5747 | .result_unpriv = REJECT, | ||
5748 | }, | ||
5749 | { | ||
5750 | "bounds checks mixing signed and unsigned, variant 9", | ||
5751 | .insns = { | ||
5752 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5753 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5754 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5755 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5756 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5757 | BPF_FUNC_map_lookup_elem), | ||
5758 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9), | ||
5759 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5760 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5761 | BPF_MOV64_IMM(BPF_REG_2, -1), | ||
5762 | BPF_JMP_REG(BPF_JGT, BPF_REG_2, BPF_REG_1, 2), | ||
5763 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5764 | BPF_EXIT_INSN(), | ||
5765 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5766 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5767 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5768 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5769 | BPF_EXIT_INSN(), | ||
5770 | }, | ||
5771 | .fixup_map1 = { 3 }, | ||
5772 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5773 | .errstr = "R0 min value is negative", | ||
5774 | .result = REJECT, | ||
5775 | .result_unpriv = REJECT, | ||
5776 | }, | ||
5777 | { | ||
5778 | "bounds checks mixing signed and unsigned, variant 10", | ||
5779 | .insns = { | ||
5780 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5781 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5782 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5783 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5784 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5785 | BPF_FUNC_map_lookup_elem), | ||
5786 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 10), | ||
5787 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5788 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5789 | BPF_LD_IMM64(BPF_REG_2, -9223372036854775808ULL), | ||
5790 | BPF_JMP_REG(BPF_JGT, BPF_REG_2, BPF_REG_1, 2), | ||
5791 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5792 | BPF_EXIT_INSN(), | ||
5793 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5794 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5795 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5796 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5797 | BPF_EXIT_INSN(), | ||
5798 | }, | ||
5799 | .fixup_map1 = { 3 }, | ||
5800 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5801 | .errstr = "R0 min value is negative", | ||
5802 | .result = REJECT, | ||
5803 | .result_unpriv = REJECT, | ||
5804 | }, | ||
5805 | { | ||
5806 | "bounds checks mixing signed and unsigned, variant 11", | ||
5807 | .insns = { | ||
5808 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5809 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5810 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5811 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5812 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5813 | BPF_FUNC_map_lookup_elem), | ||
5814 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9), | ||
5815 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5816 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5817 | BPF_MOV64_IMM(BPF_REG_2, 0), | ||
5818 | BPF_JMP_REG(BPF_JGT, BPF_REG_2, BPF_REG_1, 2), | ||
5819 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5820 | BPF_EXIT_INSN(), | ||
5821 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5822 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5823 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5824 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5825 | BPF_EXIT_INSN(), | ||
5826 | }, | ||
5827 | .fixup_map1 = { 3 }, | ||
5828 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5829 | .errstr = "R0 min value is negative", | ||
5830 | .result = REJECT, | ||
5831 | .result_unpriv = REJECT, | ||
5832 | }, | ||
5833 | { | ||
5834 | "bounds checks mixing signed and unsigned, variant 12", | ||
5835 | .insns = { | ||
5836 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5837 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5838 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5839 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5840 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5841 | BPF_FUNC_map_lookup_elem), | ||
5842 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9), | ||
5843 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5844 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5845 | BPF_MOV64_IMM(BPF_REG_2, -1), | ||
5846 | BPF_JMP_REG(BPF_JGE, BPF_REG_2, BPF_REG_1, 2), | ||
5847 | /* Dead branch. */ | ||
5848 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5849 | BPF_EXIT_INSN(), | ||
5850 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5851 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5852 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5853 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5854 | BPF_EXIT_INSN(), | ||
5855 | }, | ||
5856 | .fixup_map1 = { 3 }, | ||
5857 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5858 | .errstr = "R0 min value is negative", | ||
5859 | .result = REJECT, | ||
5860 | .result_unpriv = REJECT, | ||
5861 | }, | ||
5862 | { | ||
5863 | "bounds checks mixing signed and unsigned, variant 13", | ||
5864 | .insns = { | ||
5865 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5866 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5867 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5868 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5869 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5870 | BPF_FUNC_map_lookup_elem), | ||
5871 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9), | ||
5872 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5873 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5874 | BPF_MOV64_IMM(BPF_REG_2, -6), | ||
5875 | BPF_JMP_REG(BPF_JGE, BPF_REG_2, BPF_REG_1, 2), | ||
5876 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5877 | BPF_EXIT_INSN(), | ||
5878 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5879 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5880 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5881 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5882 | BPF_EXIT_INSN(), | ||
5883 | }, | ||
5884 | .fixup_map1 = { 3 }, | ||
5885 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5886 | .errstr = "R0 min value is negative", | ||
5887 | .result = REJECT, | ||
5888 | .result_unpriv = REJECT, | ||
5889 | }, | ||
5890 | { | ||
5891 | "bounds checks mixing signed and unsigned, variant 14", | ||
5892 | .insns = { | ||
5893 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5894 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5895 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5896 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5897 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5898 | BPF_FUNC_map_lookup_elem), | ||
5899 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 6), | ||
5900 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5901 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5902 | BPF_MOV64_IMM(BPF_REG_2, 2), | ||
5903 | BPF_JMP_REG(BPF_JGE, BPF_REG_2, BPF_REG_1, 2), | ||
5904 | BPF_MOV64_IMM(BPF_REG_7, 1), | ||
5905 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_7, 0, 2), | ||
5906 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5907 | BPF_EXIT_INSN(), | ||
5908 | BPF_ALU64_REG(BPF_ADD, BPF_REG_7, BPF_REG_1), | ||
5909 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_7, 4, 2), | ||
5910 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_7), | ||
5911 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5912 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5913 | BPF_EXIT_INSN(), | ||
5914 | }, | ||
5915 | .fixup_map1 = { 3 }, | ||
5916 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5917 | .errstr = "R0 min value is negative", | ||
5918 | .result = REJECT, | ||
5919 | .result_unpriv = REJECT, | ||
5920 | }, | ||
5921 | { | ||
5922 | "bounds checks mixing signed and unsigned, variant 15", | ||
5923 | .insns = { | ||
5924 | BPF_LDX_MEM(BPF_W, BPF_REG_9, BPF_REG_1, | ||
5925 | offsetof(struct __sk_buff, mark)), | ||
5926 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5927 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5928 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5929 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5930 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5931 | BPF_FUNC_map_lookup_elem), | ||
5932 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 8), | ||
5933 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5934 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5935 | BPF_MOV64_IMM(BPF_REG_2, -1), | ||
5936 | BPF_MOV64_IMM(BPF_REG_8, 2), | ||
5937 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_9, 42, 6), | ||
5938 | BPF_JMP_REG(BPF_JSGT, BPF_REG_8, BPF_REG_1, 3), | ||
5939 | BPF_JMP_IMM(BPF_JSGT, BPF_REG_1, 1, 2), | ||
5940 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5941 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5942 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5943 | BPF_EXIT_INSN(), | ||
5944 | BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_2, -3), | ||
5945 | BPF_JMP_IMM(BPF_JA, 0, 0, -7), | ||
5946 | }, | ||
5947 | .fixup_map1 = { 4 }, | ||
5948 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5949 | .errstr = "R0 min value is negative", | ||
5950 | .result = REJECT, | ||
5951 | .result_unpriv = REJECT, | ||
5952 | }, | ||
5953 | { | ||
5954 | "bounds checks mixing signed and unsigned, variant 16", | ||
5955 | .insns = { | ||
5956 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), | ||
5957 | BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), | ||
5958 | BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), | ||
5959 | BPF_LD_MAP_FD(BPF_REG_1, 0), | ||
5960 | BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, | ||
5961 | BPF_FUNC_map_lookup_elem), | ||
5962 | BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 4), | ||
5963 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -16, -8), | ||
5964 | BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), | ||
5965 | BPF_MOV64_IMM(BPF_REG_2, -6), | ||
5966 | BPF_JMP_REG(BPF_JGE, BPF_REG_2, BPF_REG_1, 2), | ||
5967 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5968 | BPF_EXIT_INSN(), | ||
5969 | BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1), | ||
5970 | BPF_JMP_IMM(BPF_JGT, BPF_REG_0, 1, 2), | ||
5971 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5972 | BPF_EXIT_INSN(), | ||
5973 | BPF_ST_MEM(BPF_B, BPF_REG_0, 0, 0), | ||
5974 | BPF_MOV64_IMM(BPF_REG_0, 0), | ||
5975 | BPF_EXIT_INSN(), | ||
5976 | }, | ||
5977 | .fixup_map1 = { 3 }, | ||
5978 | .errstr_unpriv = "R0 pointer arithmetic prohibited", | ||
5979 | .errstr = "R0 min value is negative", | ||
5980 | .result = REJECT, | ||
5981 | .result_unpriv = REJECT, | ||
5982 | }, | ||
5513 | }; | 5983 | }; |
5514 | 5984 | ||
5515 | static int probe_filter_length(const struct bpf_insn *fp) | 5985 | static int probe_filter_length(const struct bpf_insn *fp) |
@@ -5633,7 +6103,7 @@ static void do_test_single(struct bpf_test *test, bool unpriv, | |||
5633 | 6103 | ||
5634 | fd_prog = bpf_verify_program(prog_type ? : BPF_PROG_TYPE_SOCKET_FILTER, | 6104 | fd_prog = bpf_verify_program(prog_type ? : BPF_PROG_TYPE_SOCKET_FILTER, |
5635 | prog, prog_len, test->flags & F_LOAD_WITH_STRICT_ALIGNMENT, | 6105 | prog, prog_len, test->flags & F_LOAD_WITH_STRICT_ALIGNMENT, |
5636 | "GPL", 0, bpf_vlog, sizeof(bpf_vlog)); | 6106 | "GPL", 0, bpf_vlog, sizeof(bpf_vlog), 1); |
5637 | 6107 | ||
5638 | expected_ret = unpriv && test->result_unpriv != UNDEF ? | 6108 | expected_ret = unpriv && test->result_unpriv != UNDEF ? |
5639 | test->result_unpriv : test->result; | 6109 | test->result_unpriv : test->result; |