diff options
author | David S. Miller <davem@davemloft.net> | 2016-12-10 16:21:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-10 16:21:55 -0500 |
commit | 821781a9f40673c2aa0f29d9d8226ec320dff20c (patch) | |
tree | c9d5cb8a184fff84a9d841d8cb5da4b26be5c551 | |
parent | 3174fed9820edc95cff74ad0934c3240c7fb5115 (diff) | |
parent | 045169816b31b10faed984b01c390db1b32ee4c1 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
80 files changed, 864 insertions, 280 deletions
diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 0d7d5ac6257b..2b6cb05bc01a 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi | |||
@@ -643,9 +643,8 @@ | |||
643 | reg = <0x30730000 0x10000>; | 643 | reg = <0x30730000 0x10000>; |
644 | interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; | 644 | interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; |
645 | clocks = <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>, | 645 | clocks = <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>, |
646 | <&clks IMX7D_CLK_DUMMY>, | 646 | <&clks IMX7D_LCDIF_PIXEL_ROOT_CLK>; |
647 | <&clks IMX7D_CLK_DUMMY>; | 647 | clock-names = "pix", "axi"; |
648 | clock-names = "pix", "axi", "disp_axi"; | ||
649 | status = "disabled"; | 648 | status = "disabled"; |
650 | }; | 649 | }; |
651 | }; | 650 | }; |
diff --git a/arch/arm/boot/dts/orion5x-linkstation-lsgl.dts b/arch/arm/boot/dts/orion5x-linkstation-lsgl.dts index 1cf644bfd7ea..51dc734cd5b9 100644 --- a/arch/arm/boot/dts/orion5x-linkstation-lsgl.dts +++ b/arch/arm/boot/dts/orion5x-linkstation-lsgl.dts | |||
@@ -82,6 +82,10 @@ | |||
82 | gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; | 82 | gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | &sata { | ||
86 | nr-ports = <2>; | ||
87 | }; | ||
88 | |||
85 | &ehci1 { | 89 | &ehci1 { |
86 | status = "okay"; | 90 | status = "okay"; |
87 | }; | 91 | }; |
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi index 75a865406d3e..f4ba088b225e 100644 --- a/arch/arm/boot/dts/sun8i-h3.dtsi +++ b/arch/arm/boot/dts/sun8i-h3.dtsi | |||
@@ -410,7 +410,7 @@ | |||
410 | }; | 410 | }; |
411 | 411 | ||
412 | uart3_pins: uart3 { | 412 | uart3_pins: uart3 { |
413 | allwinner,pins = "PG13", "PG14"; | 413 | allwinner,pins = "PA13", "PA14"; |
414 | allwinner,function = "uart3"; | 414 | allwinner,function = "uart3"; |
415 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; | 415 | allwinner,drive = <SUN4I_PINCTRL_10_MA>; |
416 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; | 416 | allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; |
diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig index 55be7e3ff109..b98acd15ca22 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_defconfig | |||
@@ -95,9 +95,10 @@ CONFIG_NF_TABLES_INET=m | |||
95 | CONFIG_NF_TABLES_NETDEV=m | 95 | CONFIG_NF_TABLES_NETDEV=m |
96 | CONFIG_NFT_EXTHDR=m | 96 | CONFIG_NFT_EXTHDR=m |
97 | CONFIG_NFT_META=m | 97 | CONFIG_NFT_META=m |
98 | CONFIG_NFT_NUMGEN=m | ||
98 | CONFIG_NFT_CT=m | 99 | CONFIG_NFT_CT=m |
99 | CONFIG_NFT_RBTREE=m | 100 | CONFIG_NFT_SET_RBTREE=m |
100 | CONFIG_NFT_HASH=m | 101 | CONFIG_NFT_SET_HASH=m |
101 | CONFIG_NFT_COUNTER=m | 102 | CONFIG_NFT_COUNTER=m |
102 | CONFIG_NFT_LOG=m | 103 | CONFIG_NFT_LOG=m |
103 | CONFIG_NFT_LIMIT=m | 104 | CONFIG_NFT_LIMIT=m |
@@ -105,8 +106,10 @@ CONFIG_NFT_MASQ=m | |||
105 | CONFIG_NFT_REDIR=m | 106 | CONFIG_NFT_REDIR=m |
106 | CONFIG_NFT_NAT=m | 107 | CONFIG_NFT_NAT=m |
107 | CONFIG_NFT_QUEUE=m | 108 | CONFIG_NFT_QUEUE=m |
109 | CONFIG_NFT_QUOTA=m | ||
108 | CONFIG_NFT_REJECT=m | 110 | CONFIG_NFT_REJECT=m |
109 | CONFIG_NFT_COMPAT=m | 111 | CONFIG_NFT_COMPAT=m |
112 | CONFIG_NFT_HASH=m | ||
110 | CONFIG_NFT_DUP_NETDEV=m | 113 | CONFIG_NFT_DUP_NETDEV=m |
111 | CONFIG_NFT_FWD_NETDEV=m | 114 | CONFIG_NFT_FWD_NETDEV=m |
112 | CONFIG_NETFILTER_XT_SET=m | 115 | CONFIG_NETFILTER_XT_SET=m |
@@ -366,6 +369,7 @@ CONFIG_NETCONSOLE=m | |||
366 | CONFIG_NETCONSOLE_DYNAMIC=y | 369 | CONFIG_NETCONSOLE_DYNAMIC=y |
367 | CONFIG_VETH=m | 370 | CONFIG_VETH=m |
368 | # CONFIG_NET_VENDOR_3COM is not set | 371 | # CONFIG_NET_VENDOR_3COM is not set |
372 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
369 | CONFIG_A2065=y | 373 | CONFIG_A2065=y |
370 | CONFIG_ARIADNE=y | 374 | CONFIG_ARIADNE=y |
371 | # CONFIG_NET_VENDOR_ARC is not set | 375 | # CONFIG_NET_VENDOR_ARC is not set |
diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig index 365dda66b0e6..f80dc57e6374 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_defconfig | |||
@@ -93,9 +93,10 @@ CONFIG_NF_TABLES_INET=m | |||
93 | CONFIG_NF_TABLES_NETDEV=m | 93 | CONFIG_NF_TABLES_NETDEV=m |
94 | CONFIG_NFT_EXTHDR=m | 94 | CONFIG_NFT_EXTHDR=m |
95 | CONFIG_NFT_META=m | 95 | CONFIG_NFT_META=m |
96 | CONFIG_NFT_NUMGEN=m | ||
96 | CONFIG_NFT_CT=m | 97 | CONFIG_NFT_CT=m |
97 | CONFIG_NFT_RBTREE=m | 98 | CONFIG_NFT_SET_RBTREE=m |
98 | CONFIG_NFT_HASH=m | 99 | CONFIG_NFT_SET_HASH=m |
99 | CONFIG_NFT_COUNTER=m | 100 | CONFIG_NFT_COUNTER=m |
100 | CONFIG_NFT_LOG=m | 101 | CONFIG_NFT_LOG=m |
101 | CONFIG_NFT_LIMIT=m | 102 | CONFIG_NFT_LIMIT=m |
@@ -103,8 +104,10 @@ CONFIG_NFT_MASQ=m | |||
103 | CONFIG_NFT_REDIR=m | 104 | CONFIG_NFT_REDIR=m |
104 | CONFIG_NFT_NAT=m | 105 | CONFIG_NFT_NAT=m |
105 | CONFIG_NFT_QUEUE=m | 106 | CONFIG_NFT_QUEUE=m |
107 | CONFIG_NFT_QUOTA=m | ||
106 | CONFIG_NFT_REJECT=m | 108 | CONFIG_NFT_REJECT=m |
107 | CONFIG_NFT_COMPAT=m | 109 | CONFIG_NFT_COMPAT=m |
110 | CONFIG_NFT_HASH=m | ||
108 | CONFIG_NFT_DUP_NETDEV=m | 111 | CONFIG_NFT_DUP_NETDEV=m |
109 | CONFIG_NFT_FWD_NETDEV=m | 112 | CONFIG_NFT_FWD_NETDEV=m |
110 | CONFIG_NETFILTER_XT_SET=m | 113 | CONFIG_NETFILTER_XT_SET=m |
@@ -347,6 +350,7 @@ CONFIG_MACSEC=m | |||
347 | CONFIG_NETCONSOLE=m | 350 | CONFIG_NETCONSOLE=m |
348 | CONFIG_NETCONSOLE_DYNAMIC=y | 351 | CONFIG_NETCONSOLE_DYNAMIC=y |
349 | CONFIG_VETH=m | 352 | CONFIG_VETH=m |
353 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
350 | # CONFIG_NET_VENDOR_ARC is not set | 354 | # CONFIG_NET_VENDOR_ARC is not set |
351 | # CONFIG_NET_CADENCE is not set | 355 | # CONFIG_NET_CADENCE is not set |
352 | # CONFIG_NET_VENDOR_BROADCOM is not set | 356 | # CONFIG_NET_VENDOR_BROADCOM is not set |
diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig index ce3cbfd16fcd..4e16b1821fbb 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_defconfig | |||
@@ -93,9 +93,10 @@ CONFIG_NF_TABLES_INET=m | |||
93 | CONFIG_NF_TABLES_NETDEV=m | 93 | CONFIG_NF_TABLES_NETDEV=m |
94 | CONFIG_NFT_EXTHDR=m | 94 | CONFIG_NFT_EXTHDR=m |
95 | CONFIG_NFT_META=m | 95 | CONFIG_NFT_META=m |
96 | CONFIG_NFT_NUMGEN=m | ||
96 | CONFIG_NFT_CT=m | 97 | CONFIG_NFT_CT=m |
97 | CONFIG_NFT_RBTREE=m | 98 | CONFIG_NFT_SET_RBTREE=m |
98 | CONFIG_NFT_HASH=m | 99 | CONFIG_NFT_SET_HASH=m |
99 | CONFIG_NFT_COUNTER=m | 100 | CONFIG_NFT_COUNTER=m |
100 | CONFIG_NFT_LOG=m | 101 | CONFIG_NFT_LOG=m |
101 | CONFIG_NFT_LIMIT=m | 102 | CONFIG_NFT_LIMIT=m |
@@ -103,8 +104,10 @@ CONFIG_NFT_MASQ=m | |||
103 | CONFIG_NFT_REDIR=m | 104 | CONFIG_NFT_REDIR=m |
104 | CONFIG_NFT_NAT=m | 105 | CONFIG_NFT_NAT=m |
105 | CONFIG_NFT_QUEUE=m | 106 | CONFIG_NFT_QUEUE=m |
107 | CONFIG_NFT_QUOTA=m | ||
106 | CONFIG_NFT_REJECT=m | 108 | CONFIG_NFT_REJECT=m |
107 | CONFIG_NFT_COMPAT=m | 109 | CONFIG_NFT_COMPAT=m |
110 | CONFIG_NFT_HASH=m | ||
108 | CONFIG_NFT_DUP_NETDEV=m | 111 | CONFIG_NFT_DUP_NETDEV=m |
109 | CONFIG_NFT_FWD_NETDEV=m | 112 | CONFIG_NFT_FWD_NETDEV=m |
110 | CONFIG_NETFILTER_XT_SET=m | 113 | CONFIG_NETFILTER_XT_SET=m |
@@ -356,6 +359,7 @@ CONFIG_MACSEC=m | |||
356 | CONFIG_NETCONSOLE=m | 359 | CONFIG_NETCONSOLE=m |
357 | CONFIG_NETCONSOLE_DYNAMIC=y | 360 | CONFIG_NETCONSOLE_DYNAMIC=y |
358 | CONFIG_VETH=m | 361 | CONFIG_VETH=m |
362 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
359 | CONFIG_ATARILANCE=y | 363 | CONFIG_ATARILANCE=y |
360 | # CONFIG_NET_VENDOR_ARC is not set | 364 | # CONFIG_NET_VENDOR_ARC is not set |
361 | # CONFIG_NET_CADENCE is not set | 365 | # CONFIG_NET_CADENCE is not set |
diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig index 8db496a9797d..2767bbf5ad61 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_defconfig | |||
@@ -91,9 +91,10 @@ CONFIG_NF_TABLES_INET=m | |||
91 | CONFIG_NF_TABLES_NETDEV=m | 91 | CONFIG_NF_TABLES_NETDEV=m |
92 | CONFIG_NFT_EXTHDR=m | 92 | CONFIG_NFT_EXTHDR=m |
93 | CONFIG_NFT_META=m | 93 | CONFIG_NFT_META=m |
94 | CONFIG_NFT_NUMGEN=m | ||
94 | CONFIG_NFT_CT=m | 95 | CONFIG_NFT_CT=m |
95 | CONFIG_NFT_RBTREE=m | 96 | CONFIG_NFT_SET_RBTREE=m |
96 | CONFIG_NFT_HASH=m | 97 | CONFIG_NFT_SET_HASH=m |
97 | CONFIG_NFT_COUNTER=m | 98 | CONFIG_NFT_COUNTER=m |
98 | CONFIG_NFT_LOG=m | 99 | CONFIG_NFT_LOG=m |
99 | CONFIG_NFT_LIMIT=m | 100 | CONFIG_NFT_LIMIT=m |
@@ -101,8 +102,10 @@ CONFIG_NFT_MASQ=m | |||
101 | CONFIG_NFT_REDIR=m | 102 | CONFIG_NFT_REDIR=m |
102 | CONFIG_NFT_NAT=m | 103 | CONFIG_NFT_NAT=m |
103 | CONFIG_NFT_QUEUE=m | 104 | CONFIG_NFT_QUEUE=m |
105 | CONFIG_NFT_QUOTA=m | ||
104 | CONFIG_NFT_REJECT=m | 106 | CONFIG_NFT_REJECT=m |
105 | CONFIG_NFT_COMPAT=m | 107 | CONFIG_NFT_COMPAT=m |
108 | CONFIG_NFT_HASH=m | ||
106 | CONFIG_NFT_DUP_NETDEV=m | 109 | CONFIG_NFT_DUP_NETDEV=m |
107 | CONFIG_NFT_FWD_NETDEV=m | 110 | CONFIG_NFT_FWD_NETDEV=m |
108 | CONFIG_NETFILTER_XT_SET=m | 111 | CONFIG_NETFILTER_XT_SET=m |
@@ -346,6 +349,7 @@ CONFIG_MACSEC=m | |||
346 | CONFIG_NETCONSOLE=m | 349 | CONFIG_NETCONSOLE=m |
347 | CONFIG_NETCONSOLE_DYNAMIC=y | 350 | CONFIG_NETCONSOLE_DYNAMIC=y |
348 | CONFIG_VETH=m | 351 | CONFIG_VETH=m |
352 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
349 | # CONFIG_NET_VENDOR_ARC is not set | 353 | # CONFIG_NET_VENDOR_ARC is not set |
350 | # CONFIG_NET_CADENCE is not set | 354 | # CONFIG_NET_CADENCE is not set |
351 | # CONFIG_NET_VENDOR_BROADCOM is not set | 355 | # CONFIG_NET_VENDOR_BROADCOM is not set |
diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig index 8314156f7149..d13ba309265e 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_defconfig | |||
@@ -93,9 +93,10 @@ CONFIG_NF_TABLES_INET=m | |||
93 | CONFIG_NF_TABLES_NETDEV=m | 93 | CONFIG_NF_TABLES_NETDEV=m |
94 | CONFIG_NFT_EXTHDR=m | 94 | CONFIG_NFT_EXTHDR=m |
95 | CONFIG_NFT_META=m | 95 | CONFIG_NFT_META=m |
96 | CONFIG_NFT_NUMGEN=m | ||
96 | CONFIG_NFT_CT=m | 97 | CONFIG_NFT_CT=m |
97 | CONFIG_NFT_RBTREE=m | 98 | CONFIG_NFT_SET_RBTREE=m |
98 | CONFIG_NFT_HASH=m | 99 | CONFIG_NFT_SET_HASH=m |
99 | CONFIG_NFT_COUNTER=m | 100 | CONFIG_NFT_COUNTER=m |
100 | CONFIG_NFT_LOG=m | 101 | CONFIG_NFT_LOG=m |
101 | CONFIG_NFT_LIMIT=m | 102 | CONFIG_NFT_LIMIT=m |
@@ -103,8 +104,10 @@ CONFIG_NFT_MASQ=m | |||
103 | CONFIG_NFT_REDIR=m | 104 | CONFIG_NFT_REDIR=m |
104 | CONFIG_NFT_NAT=m | 105 | CONFIG_NFT_NAT=m |
105 | CONFIG_NFT_QUEUE=m | 106 | CONFIG_NFT_QUEUE=m |
107 | CONFIG_NFT_QUOTA=m | ||
106 | CONFIG_NFT_REJECT=m | 108 | CONFIG_NFT_REJECT=m |
107 | CONFIG_NFT_COMPAT=m | 109 | CONFIG_NFT_COMPAT=m |
110 | CONFIG_NFT_HASH=m | ||
108 | CONFIG_NFT_DUP_NETDEV=m | 111 | CONFIG_NFT_DUP_NETDEV=m |
109 | CONFIG_NFT_FWD_NETDEV=m | 112 | CONFIG_NFT_FWD_NETDEV=m |
110 | CONFIG_NETFILTER_XT_SET=m | 113 | CONFIG_NETFILTER_XT_SET=m |
@@ -347,6 +350,7 @@ CONFIG_MACSEC=m | |||
347 | CONFIG_NETCONSOLE=m | 350 | CONFIG_NETCONSOLE=m |
348 | CONFIG_NETCONSOLE_DYNAMIC=y | 351 | CONFIG_NETCONSOLE_DYNAMIC=y |
349 | CONFIG_VETH=m | 352 | CONFIG_VETH=m |
353 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
350 | CONFIG_HPLANCE=y | 354 | CONFIG_HPLANCE=y |
351 | # CONFIG_NET_VENDOR_ARC is not set | 355 | # CONFIG_NET_VENDOR_ARC is not set |
352 | # CONFIG_NET_CADENCE is not set | 356 | # CONFIG_NET_CADENCE is not set |
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig index 6600270b9622..78b5101c1aa6 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig | |||
@@ -92,9 +92,10 @@ CONFIG_NF_TABLES_INET=m | |||
92 | CONFIG_NF_TABLES_NETDEV=m | 92 | CONFIG_NF_TABLES_NETDEV=m |
93 | CONFIG_NFT_EXTHDR=m | 93 | CONFIG_NFT_EXTHDR=m |
94 | CONFIG_NFT_META=m | 94 | CONFIG_NFT_META=m |
95 | CONFIG_NFT_NUMGEN=m | ||
95 | CONFIG_NFT_CT=m | 96 | CONFIG_NFT_CT=m |
96 | CONFIG_NFT_RBTREE=m | 97 | CONFIG_NFT_SET_RBTREE=m |
97 | CONFIG_NFT_HASH=m | 98 | CONFIG_NFT_SET_HASH=m |
98 | CONFIG_NFT_COUNTER=m | 99 | CONFIG_NFT_COUNTER=m |
99 | CONFIG_NFT_LOG=m | 100 | CONFIG_NFT_LOG=m |
100 | CONFIG_NFT_LIMIT=m | 101 | CONFIG_NFT_LIMIT=m |
@@ -102,8 +103,10 @@ CONFIG_NFT_MASQ=m | |||
102 | CONFIG_NFT_REDIR=m | 103 | CONFIG_NFT_REDIR=m |
103 | CONFIG_NFT_NAT=m | 104 | CONFIG_NFT_NAT=m |
104 | CONFIG_NFT_QUEUE=m | 105 | CONFIG_NFT_QUEUE=m |
106 | CONFIG_NFT_QUOTA=m | ||
105 | CONFIG_NFT_REJECT=m | 107 | CONFIG_NFT_REJECT=m |
106 | CONFIG_NFT_COMPAT=m | 108 | CONFIG_NFT_COMPAT=m |
109 | CONFIG_NFT_HASH=m | ||
107 | CONFIG_NFT_DUP_NETDEV=m | 110 | CONFIG_NFT_DUP_NETDEV=m |
108 | CONFIG_NFT_FWD_NETDEV=m | 111 | CONFIG_NFT_FWD_NETDEV=m |
109 | CONFIG_NETFILTER_XT_SET=m | 112 | CONFIG_NETFILTER_XT_SET=m |
@@ -363,6 +366,7 @@ CONFIG_MACSEC=m | |||
363 | CONFIG_NETCONSOLE=m | 366 | CONFIG_NETCONSOLE=m |
364 | CONFIG_NETCONSOLE_DYNAMIC=y | 367 | CONFIG_NETCONSOLE_DYNAMIC=y |
365 | CONFIG_VETH=m | 368 | CONFIG_VETH=m |
369 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
366 | CONFIG_MACMACE=y | 370 | CONFIG_MACMACE=y |
367 | # CONFIG_NET_VENDOR_ARC is not set | 371 | # CONFIG_NET_VENDOR_ARC is not set |
368 | # CONFIG_NET_CADENCE is not set | 372 | # CONFIG_NET_CADENCE is not set |
diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig index 90abfe9eabba..38e5bcbd0d62 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig | |||
@@ -102,9 +102,10 @@ CONFIG_NF_TABLES_INET=m | |||
102 | CONFIG_NF_TABLES_NETDEV=m | 102 | CONFIG_NF_TABLES_NETDEV=m |
103 | CONFIG_NFT_EXTHDR=m | 103 | CONFIG_NFT_EXTHDR=m |
104 | CONFIG_NFT_META=m | 104 | CONFIG_NFT_META=m |
105 | CONFIG_NFT_NUMGEN=m | ||
105 | CONFIG_NFT_CT=m | 106 | CONFIG_NFT_CT=m |
106 | CONFIG_NFT_RBTREE=m | 107 | CONFIG_NFT_SET_RBTREE=m |
107 | CONFIG_NFT_HASH=m | 108 | CONFIG_NFT_SET_HASH=m |
108 | CONFIG_NFT_COUNTER=m | 109 | CONFIG_NFT_COUNTER=m |
109 | CONFIG_NFT_LOG=m | 110 | CONFIG_NFT_LOG=m |
110 | CONFIG_NFT_LIMIT=m | 111 | CONFIG_NFT_LIMIT=m |
@@ -112,8 +113,10 @@ CONFIG_NFT_MASQ=m | |||
112 | CONFIG_NFT_REDIR=m | 113 | CONFIG_NFT_REDIR=m |
113 | CONFIG_NFT_NAT=m | 114 | CONFIG_NFT_NAT=m |
114 | CONFIG_NFT_QUEUE=m | 115 | CONFIG_NFT_QUEUE=m |
116 | CONFIG_NFT_QUOTA=m | ||
115 | CONFIG_NFT_REJECT=m | 117 | CONFIG_NFT_REJECT=m |
116 | CONFIG_NFT_COMPAT=m | 118 | CONFIG_NFT_COMPAT=m |
119 | CONFIG_NFT_HASH=m | ||
117 | CONFIG_NFT_DUP_NETDEV=m | 120 | CONFIG_NFT_DUP_NETDEV=m |
118 | CONFIG_NFT_FWD_NETDEV=m | 121 | CONFIG_NFT_FWD_NETDEV=m |
119 | CONFIG_NETFILTER_XT_SET=m | 122 | CONFIG_NETFILTER_XT_SET=m |
@@ -397,6 +400,7 @@ CONFIG_NETCONSOLE=m | |||
397 | CONFIG_NETCONSOLE_DYNAMIC=y | 400 | CONFIG_NETCONSOLE_DYNAMIC=y |
398 | CONFIG_VETH=m | 401 | CONFIG_VETH=m |
399 | # CONFIG_NET_VENDOR_3COM is not set | 402 | # CONFIG_NET_VENDOR_3COM is not set |
403 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
400 | CONFIG_A2065=y | 404 | CONFIG_A2065=y |
401 | CONFIG_ARIADNE=y | 405 | CONFIG_ARIADNE=y |
402 | CONFIG_ATARILANCE=y | 406 | CONFIG_ATARILANCE=y |
diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig index 0d502c2f73d5..28687192b68e 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_defconfig | |||
@@ -90,9 +90,10 @@ CONFIG_NF_TABLES_INET=m | |||
90 | CONFIG_NF_TABLES_NETDEV=m | 90 | CONFIG_NF_TABLES_NETDEV=m |
91 | CONFIG_NFT_EXTHDR=m | 91 | CONFIG_NFT_EXTHDR=m |
92 | CONFIG_NFT_META=m | 92 | CONFIG_NFT_META=m |
93 | CONFIG_NFT_NUMGEN=m | ||
93 | CONFIG_NFT_CT=m | 94 | CONFIG_NFT_CT=m |
94 | CONFIG_NFT_RBTREE=m | 95 | CONFIG_NFT_SET_RBTREE=m |
95 | CONFIG_NFT_HASH=m | 96 | CONFIG_NFT_SET_HASH=m |
96 | CONFIG_NFT_COUNTER=m | 97 | CONFIG_NFT_COUNTER=m |
97 | CONFIG_NFT_LOG=m | 98 | CONFIG_NFT_LOG=m |
98 | CONFIG_NFT_LIMIT=m | 99 | CONFIG_NFT_LIMIT=m |
@@ -100,8 +101,10 @@ CONFIG_NFT_MASQ=m | |||
100 | CONFIG_NFT_REDIR=m | 101 | CONFIG_NFT_REDIR=m |
101 | CONFIG_NFT_NAT=m | 102 | CONFIG_NFT_NAT=m |
102 | CONFIG_NFT_QUEUE=m | 103 | CONFIG_NFT_QUEUE=m |
104 | CONFIG_NFT_QUOTA=m | ||
103 | CONFIG_NFT_REJECT=m | 105 | CONFIG_NFT_REJECT=m |
104 | CONFIG_NFT_COMPAT=m | 106 | CONFIG_NFT_COMPAT=m |
107 | CONFIG_NFT_HASH=m | ||
105 | CONFIG_NFT_DUP_NETDEV=m | 108 | CONFIG_NFT_DUP_NETDEV=m |
106 | CONFIG_NFT_FWD_NETDEV=m | 109 | CONFIG_NFT_FWD_NETDEV=m |
107 | CONFIG_NETFILTER_XT_SET=m | 110 | CONFIG_NETFILTER_XT_SET=m |
@@ -345,6 +348,7 @@ CONFIG_MACSEC=m | |||
345 | CONFIG_NETCONSOLE=m | 348 | CONFIG_NETCONSOLE=m |
346 | CONFIG_NETCONSOLE_DYNAMIC=y | 349 | CONFIG_NETCONSOLE_DYNAMIC=y |
347 | CONFIG_VETH=m | 350 | CONFIG_VETH=m |
351 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
348 | CONFIG_MVME147_NET=y | 352 | CONFIG_MVME147_NET=y |
349 | # CONFIG_NET_VENDOR_ARC is not set | 353 | # CONFIG_NET_VENDOR_ARC is not set |
350 | # CONFIG_NET_CADENCE is not set | 354 | # CONFIG_NET_CADENCE is not set |
diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig index 5930e91fc710..5a5f109ab3cd 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_defconfig | |||
@@ -91,9 +91,10 @@ CONFIG_NF_TABLES_INET=m | |||
91 | CONFIG_NF_TABLES_NETDEV=m | 91 | CONFIG_NF_TABLES_NETDEV=m |
92 | CONFIG_NFT_EXTHDR=m | 92 | CONFIG_NFT_EXTHDR=m |
93 | CONFIG_NFT_META=m | 93 | CONFIG_NFT_META=m |
94 | CONFIG_NFT_NUMGEN=m | ||
94 | CONFIG_NFT_CT=m | 95 | CONFIG_NFT_CT=m |
95 | CONFIG_NFT_RBTREE=m | 96 | CONFIG_NFT_SET_RBTREE=m |
96 | CONFIG_NFT_HASH=m | 97 | CONFIG_NFT_SET_HASH=m |
97 | CONFIG_NFT_COUNTER=m | 98 | CONFIG_NFT_COUNTER=m |
98 | CONFIG_NFT_LOG=m | 99 | CONFIG_NFT_LOG=m |
99 | CONFIG_NFT_LIMIT=m | 100 | CONFIG_NFT_LIMIT=m |
@@ -101,8 +102,10 @@ CONFIG_NFT_MASQ=m | |||
101 | CONFIG_NFT_REDIR=m | 102 | CONFIG_NFT_REDIR=m |
102 | CONFIG_NFT_NAT=m | 103 | CONFIG_NFT_NAT=m |
103 | CONFIG_NFT_QUEUE=m | 104 | CONFIG_NFT_QUEUE=m |
105 | CONFIG_NFT_QUOTA=m | ||
104 | CONFIG_NFT_REJECT=m | 106 | CONFIG_NFT_REJECT=m |
105 | CONFIG_NFT_COMPAT=m | 107 | CONFIG_NFT_COMPAT=m |
108 | CONFIG_NFT_HASH=m | ||
106 | CONFIG_NFT_DUP_NETDEV=m | 109 | CONFIG_NFT_DUP_NETDEV=m |
107 | CONFIG_NFT_FWD_NETDEV=m | 110 | CONFIG_NFT_FWD_NETDEV=m |
108 | CONFIG_NETFILTER_XT_SET=m | 111 | CONFIG_NETFILTER_XT_SET=m |
@@ -346,6 +349,7 @@ CONFIG_MACSEC=m | |||
346 | CONFIG_NETCONSOLE=m | 349 | CONFIG_NETCONSOLE=m |
347 | CONFIG_NETCONSOLE_DYNAMIC=y | 350 | CONFIG_NETCONSOLE_DYNAMIC=y |
348 | CONFIG_VETH=m | 351 | CONFIG_VETH=m |
352 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
349 | # CONFIG_NET_VENDOR_ARC is not set | 353 | # CONFIG_NET_VENDOR_ARC is not set |
350 | # CONFIG_NET_CADENCE is not set | 354 | # CONFIG_NET_CADENCE is not set |
351 | # CONFIG_NET_VENDOR_BROADCOM is not set | 355 | # CONFIG_NET_VENDOR_BROADCOM is not set |
diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig index 74e3ad82eca9..e557c9de3fbc 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_defconfig | |||
@@ -91,9 +91,10 @@ CONFIG_NF_TABLES_INET=m | |||
91 | CONFIG_NF_TABLES_NETDEV=m | 91 | CONFIG_NF_TABLES_NETDEV=m |
92 | CONFIG_NFT_EXTHDR=m | 92 | CONFIG_NFT_EXTHDR=m |
93 | CONFIG_NFT_META=m | 93 | CONFIG_NFT_META=m |
94 | CONFIG_NFT_NUMGEN=m | ||
94 | CONFIG_NFT_CT=m | 95 | CONFIG_NFT_CT=m |
95 | CONFIG_NFT_RBTREE=m | 96 | CONFIG_NFT_SET_RBTREE=m |
96 | CONFIG_NFT_HASH=m | 97 | CONFIG_NFT_SET_HASH=m |
97 | CONFIG_NFT_COUNTER=m | 98 | CONFIG_NFT_COUNTER=m |
98 | CONFIG_NFT_LOG=m | 99 | CONFIG_NFT_LOG=m |
99 | CONFIG_NFT_LIMIT=m | 100 | CONFIG_NFT_LIMIT=m |
@@ -101,8 +102,10 @@ CONFIG_NFT_MASQ=m | |||
101 | CONFIG_NFT_REDIR=m | 102 | CONFIG_NFT_REDIR=m |
102 | CONFIG_NFT_NAT=m | 103 | CONFIG_NFT_NAT=m |
103 | CONFIG_NFT_QUEUE=m | 104 | CONFIG_NFT_QUEUE=m |
105 | CONFIG_NFT_QUOTA=m | ||
104 | CONFIG_NFT_REJECT=m | 106 | CONFIG_NFT_REJECT=m |
105 | CONFIG_NFT_COMPAT=m | 107 | CONFIG_NFT_COMPAT=m |
108 | CONFIG_NFT_HASH=m | ||
106 | CONFIG_NFT_DUP_NETDEV=m | 109 | CONFIG_NFT_DUP_NETDEV=m |
107 | CONFIG_NFT_FWD_NETDEV=m | 110 | CONFIG_NFT_FWD_NETDEV=m |
108 | CONFIG_NETFILTER_XT_SET=m | 111 | CONFIG_NETFILTER_XT_SET=m |
@@ -353,6 +356,7 @@ CONFIG_NETCONSOLE=m | |||
353 | CONFIG_NETCONSOLE_DYNAMIC=y | 356 | CONFIG_NETCONSOLE_DYNAMIC=y |
354 | CONFIG_VETH=m | 357 | CONFIG_VETH=m |
355 | # CONFIG_NET_VENDOR_3COM is not set | 358 | # CONFIG_NET_VENDOR_3COM is not set |
359 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
356 | # CONFIG_NET_VENDOR_AMD is not set | 360 | # CONFIG_NET_VENDOR_AMD is not set |
357 | # CONFIG_NET_VENDOR_ARC is not set | 361 | # CONFIG_NET_VENDOR_ARC is not set |
358 | # CONFIG_NET_CADENCE is not set | 362 | # CONFIG_NET_CADENCE is not set |
diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig index 4ba8606a4e69..c6a748a36daf 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_defconfig | |||
@@ -88,9 +88,10 @@ CONFIG_NF_TABLES_INET=m | |||
88 | CONFIG_NF_TABLES_NETDEV=m | 88 | CONFIG_NF_TABLES_NETDEV=m |
89 | CONFIG_NFT_EXTHDR=m | 89 | CONFIG_NFT_EXTHDR=m |
90 | CONFIG_NFT_META=m | 90 | CONFIG_NFT_META=m |
91 | CONFIG_NFT_NUMGEN=m | ||
91 | CONFIG_NFT_CT=m | 92 | CONFIG_NFT_CT=m |
92 | CONFIG_NFT_RBTREE=m | 93 | CONFIG_NFT_SET_RBTREE=m |
93 | CONFIG_NFT_HASH=m | 94 | CONFIG_NFT_SET_HASH=m |
94 | CONFIG_NFT_COUNTER=m | 95 | CONFIG_NFT_COUNTER=m |
95 | CONFIG_NFT_LOG=m | 96 | CONFIG_NFT_LOG=m |
96 | CONFIG_NFT_LIMIT=m | 97 | CONFIG_NFT_LIMIT=m |
@@ -98,8 +99,10 @@ CONFIG_NFT_MASQ=m | |||
98 | CONFIG_NFT_REDIR=m | 99 | CONFIG_NFT_REDIR=m |
99 | CONFIG_NFT_NAT=m | 100 | CONFIG_NFT_NAT=m |
100 | CONFIG_NFT_QUEUE=m | 101 | CONFIG_NFT_QUEUE=m |
102 | CONFIG_NFT_QUOTA=m | ||
101 | CONFIG_NFT_REJECT=m | 103 | CONFIG_NFT_REJECT=m |
102 | CONFIG_NFT_COMPAT=m | 104 | CONFIG_NFT_COMPAT=m |
105 | CONFIG_NFT_HASH=m | ||
103 | CONFIG_NFT_DUP_NETDEV=m | 106 | CONFIG_NFT_DUP_NETDEV=m |
104 | CONFIG_NFT_FWD_NETDEV=m | 107 | CONFIG_NFT_FWD_NETDEV=m |
105 | CONFIG_NETFILTER_XT_SET=m | 108 | CONFIG_NETFILTER_XT_SET=m |
@@ -343,6 +346,7 @@ CONFIG_MACSEC=m | |||
343 | CONFIG_NETCONSOLE=m | 346 | CONFIG_NETCONSOLE=m |
344 | CONFIG_NETCONSOLE_DYNAMIC=y | 347 | CONFIG_NETCONSOLE_DYNAMIC=y |
345 | CONFIG_VETH=m | 348 | CONFIG_VETH=m |
349 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
346 | CONFIG_SUN3LANCE=y | 350 | CONFIG_SUN3LANCE=y |
347 | # CONFIG_NET_VENDOR_ARC is not set | 351 | # CONFIG_NET_VENDOR_ARC is not set |
348 | # CONFIG_NET_CADENCE is not set | 352 | # CONFIG_NET_CADENCE is not set |
diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig index c6f49726a6c9..10d60857b9a6 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_defconfig | |||
@@ -88,9 +88,10 @@ CONFIG_NF_TABLES_INET=m | |||
88 | CONFIG_NF_TABLES_NETDEV=m | 88 | CONFIG_NF_TABLES_NETDEV=m |
89 | CONFIG_NFT_EXTHDR=m | 89 | CONFIG_NFT_EXTHDR=m |
90 | CONFIG_NFT_META=m | 90 | CONFIG_NFT_META=m |
91 | CONFIG_NFT_NUMGEN=m | ||
91 | CONFIG_NFT_CT=m | 92 | CONFIG_NFT_CT=m |
92 | CONFIG_NFT_RBTREE=m | 93 | CONFIG_NFT_SET_RBTREE=m |
93 | CONFIG_NFT_HASH=m | 94 | CONFIG_NFT_SET_HASH=m |
94 | CONFIG_NFT_COUNTER=m | 95 | CONFIG_NFT_COUNTER=m |
95 | CONFIG_NFT_LOG=m | 96 | CONFIG_NFT_LOG=m |
96 | CONFIG_NFT_LIMIT=m | 97 | CONFIG_NFT_LIMIT=m |
@@ -98,8 +99,10 @@ CONFIG_NFT_MASQ=m | |||
98 | CONFIG_NFT_REDIR=m | 99 | CONFIG_NFT_REDIR=m |
99 | CONFIG_NFT_NAT=m | 100 | CONFIG_NFT_NAT=m |
100 | CONFIG_NFT_QUEUE=m | 101 | CONFIG_NFT_QUEUE=m |
102 | CONFIG_NFT_QUOTA=m | ||
101 | CONFIG_NFT_REJECT=m | 103 | CONFIG_NFT_REJECT=m |
102 | CONFIG_NFT_COMPAT=m | 104 | CONFIG_NFT_COMPAT=m |
105 | CONFIG_NFT_HASH=m | ||
103 | CONFIG_NFT_DUP_NETDEV=m | 106 | CONFIG_NFT_DUP_NETDEV=m |
104 | CONFIG_NFT_FWD_NETDEV=m | 107 | CONFIG_NFT_FWD_NETDEV=m |
105 | CONFIG_NETFILTER_XT_SET=m | 108 | CONFIG_NETFILTER_XT_SET=m |
@@ -343,6 +346,7 @@ CONFIG_MACSEC=m | |||
343 | CONFIG_NETCONSOLE=m | 346 | CONFIG_NETCONSOLE=m |
344 | CONFIG_NETCONSOLE_DYNAMIC=y | 347 | CONFIG_NETCONSOLE_DYNAMIC=y |
345 | CONFIG_VETH=m | 348 | CONFIG_VETH=m |
349 | # CONFIG_NET_VENDOR_AMAZON is not set | ||
346 | CONFIG_SUN3LANCE=y | 350 | CONFIG_SUN3LANCE=y |
347 | # CONFIG_NET_VENDOR_ARC is not set | 351 | # CONFIG_NET_VENDOR_ARC is not set |
348 | # CONFIG_NET_CADENCE is not set | 352 | # CONFIG_NET_CADENCE is not set |
diff --git a/arch/m68k/include/asm/delay.h b/arch/m68k/include/asm/delay.h index d28fa8fe26fe..c598d847d56b 100644 --- a/arch/m68k/include/asm/delay.h +++ b/arch/m68k/include/asm/delay.h | |||
@@ -114,6 +114,6 @@ static inline void __udelay(unsigned long usecs) | |||
114 | */ | 114 | */ |
115 | #define HZSCALE (268435456 / (1000000 / HZ)) | 115 | #define HZSCALE (268435456 / (1000000 / HZ)) |
116 | 116 | ||
117 | #define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000)); | 117 | #define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000)) |
118 | 118 | ||
119 | #endif /* defined(_M68K_DELAY_H) */ | 119 | #endif /* defined(_M68K_DELAY_H) */ |
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index c2c43f714684..3a4ed9f91d57 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h | |||
@@ -65,9 +65,9 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr) | |||
65 | unsigned long flags; \ | 65 | unsigned long flags; \ |
66 | spin_lock_irqsave(&pa_tlb_lock, flags); \ | 66 | spin_lock_irqsave(&pa_tlb_lock, flags); \ |
67 | old_pte = *ptep; \ | 67 | old_pte = *ptep; \ |
68 | set_pte(ptep, pteval); \ | ||
69 | if (pte_inserted(old_pte)) \ | 68 | if (pte_inserted(old_pte)) \ |
70 | purge_tlb_entries(mm, addr); \ | 69 | purge_tlb_entries(mm, addr); \ |
70 | set_pte(ptep, pteval); \ | ||
71 | spin_unlock_irqrestore(&pa_tlb_lock, flags); \ | 71 | spin_unlock_irqrestore(&pa_tlb_lock, flags); \ |
72 | } while (0) | 72 | } while (0) |
73 | 73 | ||
@@ -478,8 +478,8 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned | |||
478 | spin_unlock_irqrestore(&pa_tlb_lock, flags); | 478 | spin_unlock_irqrestore(&pa_tlb_lock, flags); |
479 | return 0; | 479 | return 0; |
480 | } | 480 | } |
481 | set_pte(ptep, pte_mkold(pte)); | ||
482 | purge_tlb_entries(vma->vm_mm, addr); | 481 | purge_tlb_entries(vma->vm_mm, addr); |
482 | set_pte(ptep, pte_mkold(pte)); | ||
483 | spin_unlock_irqrestore(&pa_tlb_lock, flags); | 483 | spin_unlock_irqrestore(&pa_tlb_lock, flags); |
484 | return 1; | 484 | return 1; |
485 | } | 485 | } |
@@ -492,9 +492,9 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
492 | 492 | ||
493 | spin_lock_irqsave(&pa_tlb_lock, flags); | 493 | spin_lock_irqsave(&pa_tlb_lock, flags); |
494 | old_pte = *ptep; | 494 | old_pte = *ptep; |
495 | set_pte(ptep, __pte(0)); | ||
496 | if (pte_inserted(old_pte)) | 495 | if (pte_inserted(old_pte)) |
497 | purge_tlb_entries(mm, addr); | 496 | purge_tlb_entries(mm, addr); |
497 | set_pte(ptep, __pte(0)); | ||
498 | spin_unlock_irqrestore(&pa_tlb_lock, flags); | 498 | spin_unlock_irqrestore(&pa_tlb_lock, flags); |
499 | 499 | ||
500 | return old_pte; | 500 | return old_pte; |
@@ -504,8 +504,8 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
504 | { | 504 | { |
505 | unsigned long flags; | 505 | unsigned long flags; |
506 | spin_lock_irqsave(&pa_tlb_lock, flags); | 506 | spin_lock_irqsave(&pa_tlb_lock, flags); |
507 | set_pte(ptep, pte_wrprotect(*ptep)); | ||
508 | purge_tlb_entries(mm, addr); | 507 | purge_tlb_entries(mm, addr); |
508 | set_pte(ptep, pte_wrprotect(*ptep)); | ||
509 | spin_unlock_irqrestore(&pa_tlb_lock, flags); | 509 | spin_unlock_irqrestore(&pa_tlb_lock, flags); |
510 | } | 510 | } |
511 | 511 | ||
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index c263301648f3..977f0a4f5ecf 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -393,6 +393,15 @@ void __init parisc_setup_cache_timing(void) | |||
393 | 393 | ||
394 | /* calculate TLB flush threshold */ | 394 | /* calculate TLB flush threshold */ |
395 | 395 | ||
396 | /* On SMP machines, skip the TLB measure of kernel text which | ||
397 | * has been mapped as huge pages. */ | ||
398 | if (num_online_cpus() > 1 && !parisc_requires_coherency()) { | ||
399 | threshold = max(cache_info.it_size, cache_info.dt_size); | ||
400 | threshold *= PAGE_SIZE; | ||
401 | threshold /= num_online_cpus(); | ||
402 | goto set_tlb_threshold; | ||
403 | } | ||
404 | |||
396 | alltime = mfctl(16); | 405 | alltime = mfctl(16); |
397 | flush_tlb_all(); | 406 | flush_tlb_all(); |
398 | alltime = mfctl(16) - alltime; | 407 | alltime = mfctl(16) - alltime; |
@@ -411,6 +420,8 @@ void __init parisc_setup_cache_timing(void) | |||
411 | alltime, size, rangetime); | 420 | alltime, size, rangetime); |
412 | 421 | ||
413 | threshold = PAGE_ALIGN(num_online_cpus() * size * alltime / rangetime); | 422 | threshold = PAGE_ALIGN(num_online_cpus() * size * alltime / rangetime); |
423 | |||
424 | set_tlb_threshold: | ||
414 | if (threshold) | 425 | if (threshold) |
415 | parisc_tlb_flush_threshold = threshold; | 426 | parisc_tlb_flush_threshold = threshold; |
416 | printk(KERN_INFO "TLB flush threshold set to %lu KiB\n", | 427 | printk(KERN_INFO "TLB flush threshold set to %lu KiB\n", |
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index 1b39a2acaadf..adf7187f8951 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -892,19 +892,10 @@ ENTRY_CFI(flush_dcache_page_asm) | |||
892 | fdc,m r31(%r28) | 892 | fdc,m r31(%r28) |
893 | fdc,m r31(%r28) | 893 | fdc,m r31(%r28) |
894 | fdc,m r31(%r28) | 894 | fdc,m r31(%r28) |
895 | cmpb,COND(<<) %r28, %r25,1b | 895 | cmpb,COND(<<) %r28, %r25,1b |
896 | fdc,m r31(%r28) | 896 | fdc,m r31(%r28) |
897 | 897 | ||
898 | sync | 898 | sync |
899 | |||
900 | #ifdef CONFIG_PA20 | ||
901 | pdtlb,l %r0(%r25) | ||
902 | #else | ||
903 | tlb_lock %r20,%r21,%r22 | ||
904 | pdtlb %r0(%r25) | ||
905 | tlb_unlock %r20,%r21,%r22 | ||
906 | #endif | ||
907 | |||
908 | bv %r0(%r2) | 899 | bv %r0(%r2) |
909 | nop | 900 | nop |
910 | .exit | 901 | .exit |
@@ -979,17 +970,6 @@ ENTRY_CFI(flush_icache_page_asm) | |||
979 | fic,m %r31(%sr4,%r28) | 970 | fic,m %r31(%sr4,%r28) |
980 | 971 | ||
981 | sync | 972 | sync |
982 | |||
983 | #ifdef CONFIG_PA20 | ||
984 | pdtlb,l %r0(%r28) | ||
985 | pitlb,l %r0(%sr4,%r25) | ||
986 | #else | ||
987 | tlb_lock %r20,%r21,%r22 | ||
988 | pdtlb %r0(%r28) | ||
989 | pitlb %r0(%sr4,%r25) | ||
990 | tlb_unlock %r20,%r21,%r22 | ||
991 | #endif | ||
992 | |||
993 | bv %r0(%r2) | 973 | bv %r0(%r2) |
994 | nop | 974 | nop |
995 | .exit | 975 | .exit |
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 9d4bf3ab049e..6e395c996900 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c | |||
@@ -69,7 +69,7 @@ u64 x86_perf_event_update(struct perf_event *event) | |||
69 | int shift = 64 - x86_pmu.cntval_bits; | 69 | int shift = 64 - x86_pmu.cntval_bits; |
70 | u64 prev_raw_count, new_raw_count; | 70 | u64 prev_raw_count, new_raw_count; |
71 | int idx = hwc->idx; | 71 | int idx = hwc->idx; |
72 | s64 delta; | 72 | u64 delta; |
73 | 73 | ||
74 | if (idx == INTEL_PMC_IDX_FIXED_BTS) | 74 | if (idx == INTEL_PMC_IDX_FIXED_BTS) |
75 | return 0; | 75 | return 0; |
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index a74a2dbc0180..cb8522290e6a 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c | |||
@@ -4034,7 +4034,7 @@ __init int intel_pmu_init(void) | |||
4034 | 4034 | ||
4035 | /* Support full width counters using alternative MSR range */ | 4035 | /* Support full width counters using alternative MSR range */ |
4036 | if (x86_pmu.intel_cap.full_width_write) { | 4036 | if (x86_pmu.intel_cap.full_width_write) { |
4037 | x86_pmu.max_period = x86_pmu.cntval_mask; | 4037 | x86_pmu.max_period = x86_pmu.cntval_mask >> 1; |
4038 | x86_pmu.perfctr = MSR_IA32_PMC0; | 4038 | x86_pmu.perfctr = MSR_IA32_PMC0; |
4039 | pr_cont("full-width counters, "); | 4039 | pr_cont("full-width counters, "); |
4040 | } | 4040 | } |
diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c index 4f5ac726335f..da51e5a3e2ff 100644 --- a/arch/x86/events/intel/cstate.c +++ b/arch/x86/events/intel/cstate.c | |||
@@ -540,6 +540,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = { | |||
540 | X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_DESKTOP, snb_cstates), | 540 | X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_DESKTOP, snb_cstates), |
541 | 541 | ||
542 | X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNL, knl_cstates), | 542 | X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNL, knl_cstates), |
543 | X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNM, knl_cstates), | ||
543 | { }, | 544 | { }, |
544 | }; | 545 | }; |
545 | MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match); | 546 | MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match); |
diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index 03d269bed941..24118c0b4640 100644 --- a/arch/x86/include/asm/compat.h +++ b/arch/x86/include/asm/compat.h | |||
@@ -272,7 +272,6 @@ struct compat_shmid64_ds { | |||
272 | /* | 272 | /* |
273 | * The type of struct elf_prstatus.pr_reg in compatible core dumps. | 273 | * The type of struct elf_prstatus.pr_reg in compatible core dumps. |
274 | */ | 274 | */ |
275 | #ifdef CONFIG_X86_X32_ABI | ||
276 | typedef struct user_regs_struct compat_elf_gregset_t; | 275 | typedef struct user_regs_struct compat_elf_gregset_t; |
277 | 276 | ||
278 | /* Full regset -- prstatus on x32, otherwise on ia32 */ | 277 | /* Full regset -- prstatus on x32, otherwise on ia32 */ |
@@ -281,10 +280,9 @@ typedef struct user_regs_struct compat_elf_gregset_t; | |||
281 | do { *(int *) (((void *) &((S)->pr_reg)) + R) = (V); } \ | 280 | do { *(int *) (((void *) &((S)->pr_reg)) + R) = (V); } \ |
282 | while (0) | 281 | while (0) |
283 | 282 | ||
283 | #ifdef CONFIG_X86_X32_ABI | ||
284 | #define COMPAT_USE_64BIT_TIME \ | 284 | #define COMPAT_USE_64BIT_TIME \ |
285 | (!!(task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT)) | 285 | (!!(task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT)) |
286 | #else | ||
287 | typedef struct user_regs_struct32 compat_elf_gregset_t; | ||
288 | #endif | 286 | #endif |
289 | 287 | ||
290 | /* | 288 | /* |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index aeef53ce93e1..35690a168cf7 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -815,9 +815,9 @@ static __init void map_mmioh_high_uv3(int index, int min_pnode, int max_pnode) | |||
815 | l = li; | 815 | l = li; |
816 | } | 816 | } |
817 | addr1 = (base << shift) + | 817 | addr1 = (base << shift) + |
818 | f * (unsigned long)(1 << m_io); | 818 | f * (1ULL << m_io); |
819 | addr2 = (base << shift) + | 819 | addr2 = (base << shift) + |
820 | (l + 1) * (unsigned long)(1 << m_io); | 820 | (l + 1) * (1ULL << m_io); |
821 | pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n", | 821 | pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n", |
822 | id, fi, li, lnasid, addr1, addr2); | 822 | id, fi, li, lnasid, addr1, addr2); |
823 | if (max_io < l) | 823 | if (max_io < l) |
diff --git a/arch/x86/kernel/unwind_guess.c b/arch/x86/kernel/unwind_guess.c index b80e8bf43cc6..22881ddcbb9f 100644 --- a/arch/x86/kernel/unwind_guess.c +++ b/arch/x86/kernel/unwind_guess.c | |||
@@ -7,11 +7,13 @@ | |||
7 | 7 | ||
8 | unsigned long unwind_get_return_address(struct unwind_state *state) | 8 | unsigned long unwind_get_return_address(struct unwind_state *state) |
9 | { | 9 | { |
10 | unsigned long addr = READ_ONCE_NOCHECK(*state->sp); | 10 | unsigned long addr; |
11 | 11 | ||
12 | if (unwind_done(state)) | 12 | if (unwind_done(state)) |
13 | return 0; | 13 | return 0; |
14 | 14 | ||
15 | addr = READ_ONCE_NOCHECK(*state->sp); | ||
16 | |||
15 | return ftrace_graph_ret_addr(state->task, &state->graph_idx, | 17 | return ftrace_graph_ret_addr(state->task, &state->graph_idx, |
16 | addr, state->sp); | 18 | addr, state->sp); |
17 | } | 19 | } |
@@ -25,11 +27,12 @@ bool unwind_next_frame(struct unwind_state *state) | |||
25 | return false; | 27 | return false; |
26 | 28 | ||
27 | do { | 29 | do { |
28 | unsigned long addr = READ_ONCE_NOCHECK(*state->sp); | 30 | for (state->sp++; state->sp < info->end; state->sp++) { |
31 | unsigned long addr = READ_ONCE_NOCHECK(*state->sp); | ||
29 | 32 | ||
30 | for (state->sp++; state->sp < info->end; state->sp++) | ||
31 | if (__kernel_text_address(addr)) | 33 | if (__kernel_text_address(addr)) |
32 | return true; | 34 | return true; |
35 | } | ||
33 | 36 | ||
34 | state->sp = info->next_sp; | 37 | state->sp = info->next_sp; |
35 | 38 | ||
diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c b/arch/x86/platform/olpc/olpc-xo15-sci.c index 55130846ac87..c0533fbc39e3 100644 --- a/arch/x86/platform/olpc/olpc-xo15-sci.c +++ b/arch/x86/platform/olpc/olpc-xo15-sci.c | |||
@@ -196,6 +196,7 @@ static int xo15_sci_remove(struct acpi_device *device) | |||
196 | return 0; | 196 | return 0; |
197 | } | 197 | } |
198 | 198 | ||
199 | #ifdef CONFIG_PM_SLEEP | ||
199 | static int xo15_sci_resume(struct device *dev) | 200 | static int xo15_sci_resume(struct device *dev) |
200 | { | 201 | { |
201 | /* Enable all EC events */ | 202 | /* Enable all EC events */ |
@@ -207,6 +208,7 @@ static int xo15_sci_resume(struct device *dev) | |||
207 | 208 | ||
208 | return 0; | 209 | return 0; |
209 | } | 210 | } |
211 | #endif | ||
210 | 212 | ||
211 | static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume); | 213 | static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume); |
212 | 214 | ||
diff --git a/arch/x86/tools/relocs.h b/arch/x86/tools/relocs.h index f59590645b68..1d23bf953a4a 100644 --- a/arch/x86/tools/relocs.h +++ b/arch/x86/tools/relocs.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <regex.h> | 16 | #include <regex.h> |
17 | #include <tools/le_byteshift.h> | 17 | #include <tools/le_byteshift.h> |
18 | 18 | ||
19 | void die(char *fmt, ...); | 19 | void die(char *fmt, ...) __attribute__((noreturn)); |
20 | 20 | ||
21 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 21 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
22 | 22 | ||
diff --git a/block/blk-map.c b/block/blk-map.c index b8657fa8dc9a..27fd8d92892d 100644 --- a/block/blk-map.c +++ b/block/blk-map.c | |||
@@ -118,6 +118,9 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, | |||
118 | struct iov_iter i; | 118 | struct iov_iter i; |
119 | int ret; | 119 | int ret; |
120 | 120 | ||
121 | if (!iter_is_iovec(iter)) | ||
122 | goto fail; | ||
123 | |||
121 | if (map_data) | 124 | if (map_data) |
122 | copy = true; | 125 | copy = true; |
123 | else if (iov_iter_alignment(iter) & align) | 126 | else if (iov_iter_alignment(iter) & align) |
@@ -140,6 +143,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, | |||
140 | 143 | ||
141 | unmap_rq: | 144 | unmap_rq: |
142 | __blk_rq_unmap_user(bio); | 145 | __blk_rq_unmap_user(bio); |
146 | fail: | ||
143 | rq->bio = NULL; | 147 | rq->bio = NULL; |
144 | return -EINVAL; | 148 | return -EINVAL; |
145 | } | 149 | } |
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index 8948392c0525..235f54d4f8a9 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c | |||
@@ -81,7 +81,11 @@ static inline bool aead_sufficient_data(struct aead_ctx *ctx) | |||
81 | { | 81 | { |
82 | unsigned as = crypto_aead_authsize(crypto_aead_reqtfm(&ctx->aead_req)); | 82 | unsigned as = crypto_aead_authsize(crypto_aead_reqtfm(&ctx->aead_req)); |
83 | 83 | ||
84 | return ctx->used >= ctx->aead_assoclen + as; | 84 | /* |
85 | * The minimum amount of memory needed for an AEAD cipher is | ||
86 | * the AAD and in case of decryption the tag. | ||
87 | */ | ||
88 | return ctx->used >= ctx->aead_assoclen + (ctx->enc ? 0 : as); | ||
85 | } | 89 | } |
86 | 90 | ||
87 | static void aead_reset_ctx(struct aead_ctx *ctx) | 91 | static void aead_reset_ctx(struct aead_ctx *ctx) |
@@ -415,7 +419,7 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg, | |||
415 | unsigned int i, reqlen = GET_REQ_SIZE(tfm); | 419 | unsigned int i, reqlen = GET_REQ_SIZE(tfm); |
416 | int err = -ENOMEM; | 420 | int err = -ENOMEM; |
417 | unsigned long used; | 421 | unsigned long used; |
418 | size_t outlen; | 422 | size_t outlen = 0; |
419 | size_t usedpages = 0; | 423 | size_t usedpages = 0; |
420 | 424 | ||
421 | lock_sock(sk); | 425 | lock_sock(sk); |
@@ -425,12 +429,15 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg, | |||
425 | goto unlock; | 429 | goto unlock; |
426 | } | 430 | } |
427 | 431 | ||
428 | used = ctx->used; | ||
429 | outlen = used; | ||
430 | |||
431 | if (!aead_sufficient_data(ctx)) | 432 | if (!aead_sufficient_data(ctx)) |
432 | goto unlock; | 433 | goto unlock; |
433 | 434 | ||
435 | used = ctx->used; | ||
436 | if (ctx->enc) | ||
437 | outlen = used + as; | ||
438 | else | ||
439 | outlen = used - as; | ||
440 | |||
434 | req = sock_kmalloc(sk, reqlen, GFP_KERNEL); | 441 | req = sock_kmalloc(sk, reqlen, GFP_KERNEL); |
435 | if (unlikely(!req)) | 442 | if (unlikely(!req)) |
436 | goto unlock; | 443 | goto unlock; |
@@ -444,7 +451,7 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg, | |||
444 | aead_request_set_ad(req, ctx->aead_assoclen); | 451 | aead_request_set_ad(req, ctx->aead_assoclen); |
445 | aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, | 452 | aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, |
446 | aead_async_cb, sk); | 453 | aead_async_cb, sk); |
447 | used -= ctx->aead_assoclen + (ctx->enc ? as : 0); | 454 | used -= ctx->aead_assoclen; |
448 | 455 | ||
449 | /* take over all tx sgls from ctx */ | 456 | /* take over all tx sgls from ctx */ |
450 | areq->tsgl = sock_kmalloc(sk, sizeof(*areq->tsgl) * sgl->cur, | 457 | areq->tsgl = sock_kmalloc(sk, sizeof(*areq->tsgl) * sgl->cur, |
@@ -460,7 +467,7 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg, | |||
460 | areq->tsgls = sgl->cur; | 467 | areq->tsgls = sgl->cur; |
461 | 468 | ||
462 | /* create rx sgls */ | 469 | /* create rx sgls */ |
463 | while (iov_iter_count(&msg->msg_iter)) { | 470 | while (outlen > usedpages && iov_iter_count(&msg->msg_iter)) { |
464 | size_t seglen = min_t(size_t, iov_iter_count(&msg->msg_iter), | 471 | size_t seglen = min_t(size_t, iov_iter_count(&msg->msg_iter), |
465 | (outlen - usedpages)); | 472 | (outlen - usedpages)); |
466 | 473 | ||
@@ -490,16 +497,14 @@ static int aead_recvmsg_async(struct socket *sock, struct msghdr *msg, | |||
490 | 497 | ||
491 | last_rsgl = rsgl; | 498 | last_rsgl = rsgl; |
492 | 499 | ||
493 | /* we do not need more iovecs as we have sufficient memory */ | ||
494 | if (outlen <= usedpages) | ||
495 | break; | ||
496 | |||
497 | iov_iter_advance(&msg->msg_iter, err); | 500 | iov_iter_advance(&msg->msg_iter, err); |
498 | } | 501 | } |
499 | err = -EINVAL; | 502 | |
500 | /* ensure output buffer is sufficiently large */ | 503 | /* ensure output buffer is sufficiently large */ |
501 | if (usedpages < outlen) | 504 | if (usedpages < outlen) { |
502 | goto free; | 505 | err = -EINVAL; |
506 | goto unlock; | ||
507 | } | ||
503 | 508 | ||
504 | aead_request_set_crypt(req, areq->tsgl, areq->first_rsgl.sgl.sg, used, | 509 | aead_request_set_crypt(req, areq->tsgl, areq->first_rsgl.sgl.sg, used, |
505 | areq->iv); | 510 | areq->iv); |
@@ -570,6 +575,7 @@ static int aead_recvmsg_sync(struct socket *sock, struct msghdr *msg, int flags) | |||
570 | goto unlock; | 575 | goto unlock; |
571 | } | 576 | } |
572 | 577 | ||
578 | /* data length provided by caller via sendmsg/sendpage */ | ||
573 | used = ctx->used; | 579 | used = ctx->used; |
574 | 580 | ||
575 | /* | 581 | /* |
@@ -584,16 +590,27 @@ static int aead_recvmsg_sync(struct socket *sock, struct msghdr *msg, int flags) | |||
584 | if (!aead_sufficient_data(ctx)) | 590 | if (!aead_sufficient_data(ctx)) |
585 | goto unlock; | 591 | goto unlock; |
586 | 592 | ||
587 | outlen = used; | 593 | /* |
594 | * Calculate the minimum output buffer size holding the result of the | ||
595 | * cipher operation. When encrypting data, the receiving buffer is | ||
596 | * larger by the tag length compared to the input buffer as the | ||
597 | * encryption operation generates the tag. For decryption, the input | ||
598 | * buffer provides the tag which is consumed resulting in only the | ||
599 | * plaintext without a buffer for the tag returned to the caller. | ||
600 | */ | ||
601 | if (ctx->enc) | ||
602 | outlen = used + as; | ||
603 | else | ||
604 | outlen = used - as; | ||
588 | 605 | ||
589 | /* | 606 | /* |
590 | * The cipher operation input data is reduced by the associated data | 607 | * The cipher operation input data is reduced by the associated data |
591 | * length as this data is processed separately later on. | 608 | * length as this data is processed separately later on. |
592 | */ | 609 | */ |
593 | used -= ctx->aead_assoclen + (ctx->enc ? as : 0); | 610 | used -= ctx->aead_assoclen; |
594 | 611 | ||
595 | /* convert iovecs of output buffers into scatterlists */ | 612 | /* convert iovecs of output buffers into scatterlists */ |
596 | while (iov_iter_count(&msg->msg_iter)) { | 613 | while (outlen > usedpages && iov_iter_count(&msg->msg_iter)) { |
597 | size_t seglen = min_t(size_t, iov_iter_count(&msg->msg_iter), | 614 | size_t seglen = min_t(size_t, iov_iter_count(&msg->msg_iter), |
598 | (outlen - usedpages)); | 615 | (outlen - usedpages)); |
599 | 616 | ||
@@ -620,16 +637,14 @@ static int aead_recvmsg_sync(struct socket *sock, struct msghdr *msg, int flags) | |||
620 | 637 | ||
621 | last_rsgl = rsgl; | 638 | last_rsgl = rsgl; |
622 | 639 | ||
623 | /* we do not need more iovecs as we have sufficient memory */ | ||
624 | if (outlen <= usedpages) | ||
625 | break; | ||
626 | iov_iter_advance(&msg->msg_iter, err); | 640 | iov_iter_advance(&msg->msg_iter, err); |
627 | } | 641 | } |
628 | 642 | ||
629 | err = -EINVAL; | ||
630 | /* ensure output buffer is sufficiently large */ | 643 | /* ensure output buffer is sufficiently large */ |
631 | if (usedpages < outlen) | 644 | if (usedpages < outlen) { |
645 | err = -EINVAL; | ||
632 | goto unlock; | 646 | goto unlock; |
647 | } | ||
633 | 648 | ||
634 | sg_mark_end(sgl->sg + sgl->cur - 1); | 649 | sg_mark_end(sgl->sg + sgl->cur - 1); |
635 | aead_request_set_crypt(&ctx->aead_req, sgl->sg, ctx->first_rsgl.sgl.sg, | 650 | aead_request_set_crypt(&ctx->aead_req, sgl->sg, ctx->first_rsgl.sgl.sg, |
diff --git a/crypto/mcryptd.c b/crypto/mcryptd.c index 94ee44acd465..c207458d6299 100644 --- a/crypto/mcryptd.c +++ b/crypto/mcryptd.c | |||
@@ -254,18 +254,22 @@ out_free_inst: | |||
254 | goto out; | 254 | goto out; |
255 | } | 255 | } |
256 | 256 | ||
257 | static inline void mcryptd_check_internal(struct rtattr **tb, u32 *type, | 257 | static inline bool mcryptd_check_internal(struct rtattr **tb, u32 *type, |
258 | u32 *mask) | 258 | u32 *mask) |
259 | { | 259 | { |
260 | struct crypto_attr_type *algt; | 260 | struct crypto_attr_type *algt; |
261 | 261 | ||
262 | algt = crypto_get_attr_type(tb); | 262 | algt = crypto_get_attr_type(tb); |
263 | if (IS_ERR(algt)) | 263 | if (IS_ERR(algt)) |
264 | return; | 264 | return false; |
265 | if ((algt->type & CRYPTO_ALG_INTERNAL)) | 265 | |
266 | *type |= CRYPTO_ALG_INTERNAL; | 266 | *type |= algt->type & CRYPTO_ALG_INTERNAL; |
267 | if ((algt->mask & CRYPTO_ALG_INTERNAL)) | 267 | *mask |= algt->mask & CRYPTO_ALG_INTERNAL; |
268 | *mask |= CRYPTO_ALG_INTERNAL; | 268 | |
269 | if (*type & *mask & CRYPTO_ALG_INTERNAL) | ||
270 | return true; | ||
271 | else | ||
272 | return false; | ||
269 | } | 273 | } |
270 | 274 | ||
271 | static int mcryptd_hash_init_tfm(struct crypto_tfm *tfm) | 275 | static int mcryptd_hash_init_tfm(struct crypto_tfm *tfm) |
@@ -492,7 +496,8 @@ static int mcryptd_create_hash(struct crypto_template *tmpl, struct rtattr **tb, | |||
492 | u32 mask = 0; | 496 | u32 mask = 0; |
493 | int err; | 497 | int err; |
494 | 498 | ||
495 | mcryptd_check_internal(tb, &type, &mask); | 499 | if (!mcryptd_check_internal(tb, &type, &mask)) |
500 | return -EINVAL; | ||
496 | 501 | ||
497 | halg = ahash_attr_alg(tb[1], type, mask); | 502 | halg = ahash_attr_alg(tb[1], type, mask); |
498 | if (IS_ERR(halg)) | 503 | if (IS_ERR(halg)) |
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 71a7d07c28c9..312c4b4dc363 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c | |||
@@ -94,7 +94,7 @@ static struct acpi_device *to_acpi_dev(struct acpi_nfit_desc *acpi_desc) | |||
94 | return to_acpi_device(acpi_desc->dev); | 94 | return to_acpi_device(acpi_desc->dev); |
95 | } | 95 | } |
96 | 96 | ||
97 | static int xlat_status(void *buf, unsigned int cmd, u32 status) | 97 | static int xlat_bus_status(void *buf, unsigned int cmd, u32 status) |
98 | { | 98 | { |
99 | struct nd_cmd_clear_error *clear_err; | 99 | struct nd_cmd_clear_error *clear_err; |
100 | struct nd_cmd_ars_status *ars_status; | 100 | struct nd_cmd_ars_status *ars_status; |
@@ -113,7 +113,7 @@ static int xlat_status(void *buf, unsigned int cmd, u32 status) | |||
113 | flags = ND_ARS_PERSISTENT | ND_ARS_VOLATILE; | 113 | flags = ND_ARS_PERSISTENT | ND_ARS_VOLATILE; |
114 | if ((status >> 16 & flags) == 0) | 114 | if ((status >> 16 & flags) == 0) |
115 | return -ENOTTY; | 115 | return -ENOTTY; |
116 | break; | 116 | return 0; |
117 | case ND_CMD_ARS_START: | 117 | case ND_CMD_ARS_START: |
118 | /* ARS is in progress */ | 118 | /* ARS is in progress */ |
119 | if ((status & 0xffff) == NFIT_ARS_START_BUSY) | 119 | if ((status & 0xffff) == NFIT_ARS_START_BUSY) |
@@ -122,7 +122,7 @@ static int xlat_status(void *buf, unsigned int cmd, u32 status) | |||
122 | /* Command failed */ | 122 | /* Command failed */ |
123 | if (status & 0xffff) | 123 | if (status & 0xffff) |
124 | return -EIO; | 124 | return -EIO; |
125 | break; | 125 | return 0; |
126 | case ND_CMD_ARS_STATUS: | 126 | case ND_CMD_ARS_STATUS: |
127 | ars_status = buf; | 127 | ars_status = buf; |
128 | /* Command failed */ | 128 | /* Command failed */ |
@@ -146,7 +146,8 @@ static int xlat_status(void *buf, unsigned int cmd, u32 status) | |||
146 | * then just continue with the returned results. | 146 | * then just continue with the returned results. |
147 | */ | 147 | */ |
148 | if (status == NFIT_ARS_STATUS_INTR) { | 148 | if (status == NFIT_ARS_STATUS_INTR) { |
149 | if (ars_status->flags & NFIT_ARS_F_OVERFLOW) | 149 | if (ars_status->out_length >= 40 && (ars_status->flags |
150 | & NFIT_ARS_F_OVERFLOW)) | ||
150 | return -ENOSPC; | 151 | return -ENOSPC; |
151 | return 0; | 152 | return 0; |
152 | } | 153 | } |
@@ -154,7 +155,7 @@ static int xlat_status(void *buf, unsigned int cmd, u32 status) | |||
154 | /* Unknown status */ | 155 | /* Unknown status */ |
155 | if (status >> 16) | 156 | if (status >> 16) |
156 | return -EIO; | 157 | return -EIO; |
157 | break; | 158 | return 0; |
158 | case ND_CMD_CLEAR_ERROR: | 159 | case ND_CMD_CLEAR_ERROR: |
159 | clear_err = buf; | 160 | clear_err = buf; |
160 | if (status & 0xffff) | 161 | if (status & 0xffff) |
@@ -163,7 +164,7 @@ static int xlat_status(void *buf, unsigned int cmd, u32 status) | |||
163 | return -EIO; | 164 | return -EIO; |
164 | if (clear_err->length > clear_err->cleared) | 165 | if (clear_err->length > clear_err->cleared) |
165 | return clear_err->cleared; | 166 | return clear_err->cleared; |
166 | break; | 167 | return 0; |
167 | default: | 168 | default: |
168 | break; | 169 | break; |
169 | } | 170 | } |
@@ -174,9 +175,18 @@ static int xlat_status(void *buf, unsigned int cmd, u32 status) | |||
174 | return 0; | 175 | return 0; |
175 | } | 176 | } |
176 | 177 | ||
177 | static int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, | 178 | static int xlat_status(struct nvdimm *nvdimm, void *buf, unsigned int cmd, |
178 | struct nvdimm *nvdimm, unsigned int cmd, void *buf, | 179 | u32 status) |
179 | unsigned int buf_len, int *cmd_rc) | 180 | { |
181 | if (!nvdimm) | ||
182 | return xlat_bus_status(buf, cmd, status); | ||
183 | if (status) | ||
184 | return -EIO; | ||
185 | return 0; | ||
186 | } | ||
187 | |||
188 | int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, | ||
189 | unsigned int cmd, void *buf, unsigned int buf_len, int *cmd_rc) | ||
180 | { | 190 | { |
181 | struct acpi_nfit_desc *acpi_desc = to_acpi_nfit_desc(nd_desc); | 191 | struct acpi_nfit_desc *acpi_desc = to_acpi_nfit_desc(nd_desc); |
182 | union acpi_object in_obj, in_buf, *out_obj; | 192 | union acpi_object in_obj, in_buf, *out_obj; |
@@ -298,7 +308,8 @@ static int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, | |||
298 | 308 | ||
299 | for (i = 0, offset = 0; i < desc->out_num; i++) { | 309 | for (i = 0, offset = 0; i < desc->out_num; i++) { |
300 | u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf, | 310 | u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf, |
301 | (u32 *) out_obj->buffer.pointer); | 311 | (u32 *) out_obj->buffer.pointer, |
312 | out_obj->buffer.length - offset); | ||
302 | 313 | ||
303 | if (offset + out_size > out_obj->buffer.length) { | 314 | if (offset + out_size > out_obj->buffer.length) { |
304 | dev_dbg(dev, "%s:%s output object underflow cmd: %s field: %d\n", | 315 | dev_dbg(dev, "%s:%s output object underflow cmd: %s field: %d\n", |
@@ -333,7 +344,8 @@ static int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, | |||
333 | */ | 344 | */ |
334 | rc = buf_len - offset - in_buf.buffer.length; | 345 | rc = buf_len - offset - in_buf.buffer.length; |
335 | if (cmd_rc) | 346 | if (cmd_rc) |
336 | *cmd_rc = xlat_status(buf, cmd, fw_status); | 347 | *cmd_rc = xlat_status(nvdimm, buf, cmd, |
348 | fw_status); | ||
337 | } else { | 349 | } else { |
338 | dev_err(dev, "%s:%s underrun cmd: %s buf_len: %d out_len: %d\n", | 350 | dev_err(dev, "%s:%s underrun cmd: %s buf_len: %d out_len: %d\n", |
339 | __func__, dimm_name, cmd_name, buf_len, | 351 | __func__, dimm_name, cmd_name, buf_len, |
@@ -343,7 +355,7 @@ static int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, | |||
343 | } else { | 355 | } else { |
344 | rc = 0; | 356 | rc = 0; |
345 | if (cmd_rc) | 357 | if (cmd_rc) |
346 | *cmd_rc = xlat_status(buf, cmd, fw_status); | 358 | *cmd_rc = xlat_status(nvdimm, buf, cmd, fw_status); |
347 | } | 359 | } |
348 | 360 | ||
349 | out: | 361 | out: |
@@ -351,6 +363,7 @@ static int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, | |||
351 | 363 | ||
352 | return rc; | 364 | return rc; |
353 | } | 365 | } |
366 | EXPORT_SYMBOL_GPL(acpi_nfit_ctl); | ||
354 | 367 | ||
355 | static const char *spa_type_name(u16 type) | 368 | static const char *spa_type_name(u16 type) |
356 | { | 369 | { |
@@ -2001,19 +2014,32 @@ static int ars_get_status(struct acpi_nfit_desc *acpi_desc) | |||
2001 | return cmd_rc; | 2014 | return cmd_rc; |
2002 | } | 2015 | } |
2003 | 2016 | ||
2004 | static int ars_status_process_records(struct nvdimm_bus *nvdimm_bus, | 2017 | static int ars_status_process_records(struct acpi_nfit_desc *acpi_desc, |
2005 | struct nd_cmd_ars_status *ars_status) | 2018 | struct nd_cmd_ars_status *ars_status) |
2006 | { | 2019 | { |
2020 | struct nvdimm_bus *nvdimm_bus = acpi_desc->nvdimm_bus; | ||
2007 | int rc; | 2021 | int rc; |
2008 | u32 i; | 2022 | u32 i; |
2009 | 2023 | ||
2024 | /* | ||
2025 | * First record starts at 44 byte offset from the start of the | ||
2026 | * payload. | ||
2027 | */ | ||
2028 | if (ars_status->out_length < 44) | ||
2029 | return 0; | ||
2010 | for (i = 0; i < ars_status->num_records; i++) { | 2030 | for (i = 0; i < ars_status->num_records; i++) { |
2031 | /* only process full records */ | ||
2032 | if (ars_status->out_length | ||
2033 | < 44 + sizeof(struct nd_ars_record) * (i + 1)) | ||
2034 | break; | ||
2011 | rc = nvdimm_bus_add_poison(nvdimm_bus, | 2035 | rc = nvdimm_bus_add_poison(nvdimm_bus, |
2012 | ars_status->records[i].err_address, | 2036 | ars_status->records[i].err_address, |
2013 | ars_status->records[i].length); | 2037 | ars_status->records[i].length); |
2014 | if (rc) | 2038 | if (rc) |
2015 | return rc; | 2039 | return rc; |
2016 | } | 2040 | } |
2041 | if (i < ars_status->num_records) | ||
2042 | dev_warn(acpi_desc->dev, "detected truncated ars results\n"); | ||
2017 | 2043 | ||
2018 | return 0; | 2044 | return 0; |
2019 | } | 2045 | } |
@@ -2266,8 +2292,7 @@ static int acpi_nfit_query_poison(struct acpi_nfit_desc *acpi_desc, | |||
2266 | if (rc < 0 && rc != -ENOSPC) | 2292 | if (rc < 0 && rc != -ENOSPC) |
2267 | return rc; | 2293 | return rc; |
2268 | 2294 | ||
2269 | if (ars_status_process_records(acpi_desc->nvdimm_bus, | 2295 | if (ars_status_process_records(acpi_desc, acpi_desc->ars_status)) |
2270 | acpi_desc->ars_status)) | ||
2271 | return -ENOMEM; | 2296 | return -ENOMEM; |
2272 | 2297 | ||
2273 | return 0; | 2298 | return 0; |
diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h index 14296f5267c8..fc29c2e9832e 100644 --- a/drivers/acpi/nfit/nfit.h +++ b/drivers/acpi/nfit/nfit.h | |||
@@ -240,5 +240,7 @@ const u8 *to_nfit_uuid(enum nfit_uuids id); | |||
240 | int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *nfit, acpi_size sz); | 240 | int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *nfit, acpi_size sz); |
241 | void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event); | 241 | void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event); |
242 | void __acpi_nvdimm_notify(struct device *dev, u32 event); | 242 | void __acpi_nvdimm_notify(struct device *dev, u32 event); |
243 | int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, | ||
244 | unsigned int cmd, void *buf, unsigned int buf_len, int *cmd_rc); | ||
243 | void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev); | 245 | void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev); |
244 | #endif /* __NFIT_H__ */ | 246 | #endif /* __NFIT_H__ */ |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index c4eb4ae9c3aa..8e575fbdf31d 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1159,6 +1159,7 @@ static void ata_scsi_sdev_config(struct scsi_device *sdev) | |||
1159 | { | 1159 | { |
1160 | sdev->use_10_for_rw = 1; | 1160 | sdev->use_10_for_rw = 1; |
1161 | sdev->use_10_for_ms = 1; | 1161 | sdev->use_10_for_ms = 1; |
1162 | sdev->no_write_same = 1; | ||
1162 | 1163 | ||
1163 | /* Schedule policy is determined by ->qc_defer() callback and | 1164 | /* Schedule policy is determined by ->qc_defer() callback and |
1164 | * it needs to see every deferred qc. Set dev_blocked to 1 to | 1165 | * it needs to see every deferred qc. Set dev_blocked to 1 to |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index efc48bf89d51..823e938c9a78 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -4090,7 +4090,20 @@ static int mv_platform_probe(struct platform_device *pdev) | |||
4090 | 4090 | ||
4091 | /* allocate host */ | 4091 | /* allocate host */ |
4092 | if (pdev->dev.of_node) { | 4092 | if (pdev->dev.of_node) { |
4093 | of_property_read_u32(pdev->dev.of_node, "nr-ports", &n_ports); | 4093 | rc = of_property_read_u32(pdev->dev.of_node, "nr-ports", |
4094 | &n_ports); | ||
4095 | if (rc) { | ||
4096 | dev_err(&pdev->dev, | ||
4097 | "error parsing nr-ports property: %d\n", rc); | ||
4098 | return rc; | ||
4099 | } | ||
4100 | |||
4101 | if (n_ports <= 0) { | ||
4102 | dev_err(&pdev->dev, "nr-ports must be positive: %d\n", | ||
4103 | n_ports); | ||
4104 | return -EINVAL; | ||
4105 | } | ||
4106 | |||
4094 | irq = irq_of_parse_and_map(pdev->dev.of_node, 0); | 4107 | irq = irq_of_parse_and_map(pdev->dev.of_node, 0); |
4095 | } else { | 4108 | } else { |
4096 | mv_platform_data = dev_get_platdata(&pdev->dev); | 4109 | mv_platform_data = dev_get_platdata(&pdev->dev); |
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 5163c8f918cb..5497f7fc44d0 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c | |||
@@ -1413,8 +1413,14 @@ static ssize_t hot_remove_store(struct class *class, | |||
1413 | return ret ? ret : count; | 1413 | return ret ? ret : count; |
1414 | } | 1414 | } |
1415 | 1415 | ||
1416 | /* | ||
1417 | * NOTE: hot_add attribute is not the usual read-only sysfs attribute. In a | ||
1418 | * sense that reading from this file does alter the state of your system -- it | ||
1419 | * creates a new un-initialized zram device and returns back this device's | ||
1420 | * device_id (or an error code if it fails to create a new device). | ||
1421 | */ | ||
1416 | static struct class_attribute zram_control_class_attrs[] = { | 1422 | static struct class_attribute zram_control_class_attrs[] = { |
1417 | __ATTR_RO(hot_add), | 1423 | __ATTR(hot_add, 0400, hot_add_show, NULL), |
1418 | __ATTR_WO(hot_remove), | 1424 | __ATTR_WO(hot_remove), |
1419 | __ATTR_NULL, | 1425 | __ATTR_NULL, |
1420 | }; | 1426 | }; |
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 72ff19658985..e483b78c6343 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c | |||
@@ -558,8 +558,9 @@ static int caam_probe(struct platform_device *pdev) | |||
558 | * Enable DECO watchdogs and, if this is a PHYS_ADDR_T_64BIT kernel, | 558 | * Enable DECO watchdogs and, if this is a PHYS_ADDR_T_64BIT kernel, |
559 | * long pointers in master configuration register | 559 | * long pointers in master configuration register |
560 | */ | 560 | */ |
561 | clrsetbits_32(&ctrl->mcr, MCFGR_AWCACHE_MASK, MCFGR_AWCACHE_CACH | | 561 | clrsetbits_32(&ctrl->mcr, MCFGR_AWCACHE_MASK | MCFGR_LONG_PTR, |
562 | MCFGR_AWCACHE_BUFF | MCFGR_WDENABLE | MCFGR_LARGE_BURST | | 562 | MCFGR_AWCACHE_CACH | MCFGR_AWCACHE_BUFF | |
563 | MCFGR_WDENABLE | MCFGR_LARGE_BURST | | ||
563 | (sizeof(dma_addr_t) == sizeof(u64) ? MCFGR_LONG_PTR : 0)); | 564 | (sizeof(dma_addr_t) == sizeof(u64) ? MCFGR_LONG_PTR : 0)); |
564 | 565 | ||
565 | /* | 566 | /* |
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c index 9f284682c091..77712b375b84 100644 --- a/drivers/crypto/marvell/hash.c +++ b/drivers/crypto/marvell/hash.c | |||
@@ -168,12 +168,11 @@ static void mv_cesa_ahash_std_step(struct ahash_request *req) | |||
168 | mv_cesa_adjust_op(engine, &creq->op_tmpl); | 168 | mv_cesa_adjust_op(engine, &creq->op_tmpl); |
169 | memcpy_toio(engine->sram, &creq->op_tmpl, sizeof(creq->op_tmpl)); | 169 | memcpy_toio(engine->sram, &creq->op_tmpl, sizeof(creq->op_tmpl)); |
170 | 170 | ||
171 | digsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(req)); | 171 | if (!sreq->offset) { |
172 | for (i = 0; i < digsize / 4; i++) | 172 | digsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(req)); |
173 | writel_relaxed(creq->state[i], engine->regs + CESA_IVDIG(i)); | 173 | for (i = 0; i < digsize / 4; i++) |
174 | 174 | writel_relaxed(creq->state[i], engine->regs + CESA_IVDIG(i)); | |
175 | mv_cesa_adjust_op(engine, &creq->op_tmpl); | 175 | } |
176 | memcpy_toio(engine->sram, &creq->op_tmpl, sizeof(creq->op_tmpl)); | ||
177 | 176 | ||
178 | if (creq->cache_ptr) | 177 | if (creq->cache_ptr) |
179 | memcpy_toio(engine->sram + CESA_SA_DATA_SRAM_OFFSET, | 178 | memcpy_toio(engine->sram + CESA_SA_DATA_SRAM_OFFSET, |
diff --git a/drivers/dax/dax.c b/drivers/dax/dax.c index 3d94ff20fdca..286447a83dab 100644 --- a/drivers/dax/dax.c +++ b/drivers/dax/dax.c | |||
@@ -271,7 +271,7 @@ static int check_vma(struct dax_dev *dax_dev, struct vm_area_struct *vma, | |||
271 | return -ENXIO; | 271 | return -ENXIO; |
272 | 272 | ||
273 | /* prevent private mappings from being established */ | 273 | /* prevent private mappings from being established */ |
274 | if ((vma->vm_flags & VM_SHARED) != VM_SHARED) { | 274 | if ((vma->vm_flags & VM_MAYSHARE) != VM_MAYSHARE) { |
275 | dev_info(dev, "%s: %s: fail, attempted private mapping\n", | 275 | dev_info(dev, "%s: %s: fail, attempted private mapping\n", |
276 | current->comm, func); | 276 | current->comm, func); |
277 | return -EINVAL; | 277 | return -EINVAL; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 496f72b134eb..05c2850c04b0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -2472,6 +2472,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, | |||
2472 | struct drm_file *file_priv); | 2472 | struct drm_file *file_priv); |
2473 | void amdgpu_driver_preclose_kms(struct drm_device *dev, | 2473 | void amdgpu_driver_preclose_kms(struct drm_device *dev, |
2474 | struct drm_file *file_priv); | 2474 | struct drm_file *file_priv); |
2475 | int amdgpu_suspend(struct amdgpu_device *adev); | ||
2475 | int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon); | 2476 | int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon); |
2476 | int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon); | 2477 | int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon); |
2477 | u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe); | 2478 | u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 3161d77bf299..e41d4baebf86 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -1493,7 +1493,7 @@ static int amdgpu_fini(struct amdgpu_device *adev) | |||
1493 | return 0; | 1493 | return 0; |
1494 | } | 1494 | } |
1495 | 1495 | ||
1496 | static int amdgpu_suspend(struct amdgpu_device *adev) | 1496 | int amdgpu_suspend(struct amdgpu_device *adev) |
1497 | { | 1497 | { |
1498 | int i, r; | 1498 | int i, r; |
1499 | 1499 | ||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 02ff0747197c..e0890deccb2f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |||
@@ -479,12 +479,15 @@ amdgpu_pci_remove(struct pci_dev *pdev) | |||
479 | static void | 479 | static void |
480 | amdgpu_pci_shutdown(struct pci_dev *pdev) | 480 | amdgpu_pci_shutdown(struct pci_dev *pdev) |
481 | { | 481 | { |
482 | struct drm_device *dev = pci_get_drvdata(pdev); | ||
483 | struct amdgpu_device *adev = dev->dev_private; | ||
484 | |||
482 | /* if we are running in a VM, make sure the device | 485 | /* if we are running in a VM, make sure the device |
483 | * torn down properly on reboot/shutdown. | 486 | * torn down properly on reboot/shutdown. |
484 | * unfortunately we can't detect certain | 487 | * unfortunately we can't detect certain |
485 | * hypervisors so just do this all the time. | 488 | * hypervisors so just do this all the time. |
486 | */ | 489 | */ |
487 | amdgpu_pci_remove(pdev); | 490 | amdgpu_suspend(adev); |
488 | } | 491 | } |
489 | 492 | ||
490 | static int amdgpu_pmops_suspend(struct device *dev) | 493 | static int amdgpu_pmops_suspend(struct device *dev) |
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index d1f8ab915b15..b90776ef56ec 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c | |||
@@ -755,8 +755,10 @@ static int __init ser_gigaset_init(void) | |||
755 | driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, | 755 | driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, |
756 | GIGASET_MODULENAME, GIGASET_DEVNAME, | 756 | GIGASET_MODULENAME, GIGASET_DEVNAME, |
757 | &ops, THIS_MODULE); | 757 | &ops, THIS_MODULE); |
758 | if (!driver) | 758 | if (!driver) { |
759 | rc = -ENOMEM; | ||
759 | goto error; | 760 | goto error; |
761 | } | ||
760 | 762 | ||
761 | rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc); | 763 | rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc); |
762 | if (rc != 0) { | 764 | if (rc != 0) { |
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index f3141ca56bc3..0b0302af3bd2 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c | |||
@@ -870,23 +870,25 @@ lbl_free_candev: | |||
870 | static void peak_usb_disconnect(struct usb_interface *intf) | 870 | static void peak_usb_disconnect(struct usb_interface *intf) |
871 | { | 871 | { |
872 | struct peak_usb_device *dev; | 872 | struct peak_usb_device *dev; |
873 | struct peak_usb_device *dev_prev_siblings; | ||
873 | 874 | ||
874 | /* unregister as many netdev devices as siblings */ | 875 | /* unregister as many netdev devices as siblings */ |
875 | for (dev = usb_get_intfdata(intf); dev; dev = dev->prev_siblings) { | 876 | for (dev = usb_get_intfdata(intf); dev; dev = dev_prev_siblings) { |
876 | struct net_device *netdev = dev->netdev; | 877 | struct net_device *netdev = dev->netdev; |
877 | char name[IFNAMSIZ]; | 878 | char name[IFNAMSIZ]; |
878 | 879 | ||
880 | dev_prev_siblings = dev->prev_siblings; | ||
879 | dev->state &= ~PCAN_USB_STATE_CONNECTED; | 881 | dev->state &= ~PCAN_USB_STATE_CONNECTED; |
880 | strncpy(name, netdev->name, IFNAMSIZ); | 882 | strncpy(name, netdev->name, IFNAMSIZ); |
881 | 883 | ||
882 | unregister_netdev(netdev); | 884 | unregister_netdev(netdev); |
883 | free_candev(netdev); | ||
884 | 885 | ||
885 | kfree(dev->cmd_buf); | 886 | kfree(dev->cmd_buf); |
886 | dev->next_siblings = NULL; | 887 | dev->next_siblings = NULL; |
887 | if (dev->adapter->dev_free) | 888 | if (dev->adapter->dev_free) |
888 | dev->adapter->dev_free(dev); | 889 | dev->adapter->dev_free(dev); |
889 | 890 | ||
891 | free_candev(netdev); | ||
890 | dev_info(&intf->dev, "%s removed\n", name); | 892 | dev_info(&intf->dev, "%s removed\n", name); |
891 | } | 893 | } |
892 | 894 | ||
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 48113c6609db..66c37fac59b2 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -4921,6 +4921,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
4921 | */ | 4921 | */ |
4922 | for_each_port(adapter, i) { | 4922 | for_each_port(adapter, i) { |
4923 | pi = adap2pinfo(adapter, i); | 4923 | pi = adap2pinfo(adapter, i); |
4924 | adapter->port[i]->dev_port = pi->lport; | ||
4924 | netif_set_real_num_tx_queues(adapter->port[i], pi->nqsets); | 4925 | netif_set_real_num_tx_queues(adapter->port[i], pi->nqsets); |
4925 | netif_set_real_num_rx_queues(adapter->port[i], pi->nqsets); | 4926 | netif_set_real_num_rx_queues(adapter->port[i], pi->nqsets); |
4926 | 4927 | ||
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index 20dec85da63d..e8139514d32c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | |||
@@ -7851,7 +7851,6 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf) | |||
7851 | return ret; | 7851 | return ret; |
7852 | 7852 | ||
7853 | memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN); | 7853 | memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN); |
7854 | adap->port[i]->dev_port = j; | ||
7855 | j++; | 7854 | j++; |
7856 | } | 7855 | } |
7857 | return 0; | 7856 | return 0; |
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index fa43e06d3a29..0d1a134c8174 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | |||
@@ -2960,6 +2960,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev, | |||
2960 | 2960 | ||
2961 | netdev->netdev_ops = &cxgb4vf_netdev_ops; | 2961 | netdev->netdev_ops = &cxgb4vf_netdev_ops; |
2962 | netdev->ethtool_ops = &cxgb4vf_ethtool_ops; | 2962 | netdev->ethtool_ops = &cxgb4vf_ethtool_ops; |
2963 | netdev->dev_port = pi->port_id; | ||
2963 | 2964 | ||
2964 | /* | 2965 | /* |
2965 | * Initialize the hardware/software state for the port. | 2966 | * Initialize the hardware/software state for the port. |
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c index 4a81c892fc31..fbece63395a8 100644 --- a/drivers/net/ethernet/ibm/ibmveth.c +++ b/drivers/net/ethernet/ibm/ibmveth.c | |||
@@ -58,7 +58,7 @@ static struct kobj_type ktype_veth_pool; | |||
58 | 58 | ||
59 | static const char ibmveth_driver_name[] = "ibmveth"; | 59 | static const char ibmveth_driver_name[] = "ibmveth"; |
60 | static const char ibmveth_driver_string[] = "IBM Power Virtual Ethernet Driver"; | 60 | static const char ibmveth_driver_string[] = "IBM Power Virtual Ethernet Driver"; |
61 | #define ibmveth_driver_version "1.05" | 61 | #define ibmveth_driver_version "1.06" |
62 | 62 | ||
63 | MODULE_AUTHOR("Santiago Leon <santil@linux.vnet.ibm.com>"); | 63 | MODULE_AUTHOR("Santiago Leon <santil@linux.vnet.ibm.com>"); |
64 | MODULE_DESCRIPTION("IBM Power Virtual Ethernet Driver"); | 64 | MODULE_DESCRIPTION("IBM Power Virtual Ethernet Driver"); |
@@ -137,6 +137,11 @@ static inline int ibmveth_rxq_frame_offset(struct ibmveth_adapter *adapter) | |||
137 | return ibmveth_rxq_flags(adapter) & IBMVETH_RXQ_OFF_MASK; | 137 | return ibmveth_rxq_flags(adapter) & IBMVETH_RXQ_OFF_MASK; |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline int ibmveth_rxq_large_packet(struct ibmveth_adapter *adapter) | ||
141 | { | ||
142 | return ibmveth_rxq_flags(adapter) & IBMVETH_RXQ_LRG_PKT; | ||
143 | } | ||
144 | |||
140 | static inline int ibmveth_rxq_frame_length(struct ibmveth_adapter *adapter) | 145 | static inline int ibmveth_rxq_frame_length(struct ibmveth_adapter *adapter) |
141 | { | 146 | { |
142 | return be32_to_cpu(adapter->rx_queue.queue_addr[adapter->rx_queue.index].length); | 147 | return be32_to_cpu(adapter->rx_queue.queue_addr[adapter->rx_queue.index].length); |
@@ -1174,6 +1179,45 @@ map_failed: | |||
1174 | goto retry_bounce; | 1179 | goto retry_bounce; |
1175 | } | 1180 | } |
1176 | 1181 | ||
1182 | static void ibmveth_rx_mss_helper(struct sk_buff *skb, u16 mss, int lrg_pkt) | ||
1183 | { | ||
1184 | int offset = 0; | ||
1185 | |||
1186 | /* only TCP packets will be aggregated */ | ||
1187 | if (skb->protocol == htons(ETH_P_IP)) { | ||
1188 | struct iphdr *iph = (struct iphdr *)skb->data; | ||
1189 | |||
1190 | if (iph->protocol == IPPROTO_TCP) { | ||
1191 | offset = iph->ihl * 4; | ||
1192 | skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4; | ||
1193 | } else { | ||
1194 | return; | ||
1195 | } | ||
1196 | } else if (skb->protocol == htons(ETH_P_IPV6)) { | ||
1197 | struct ipv6hdr *iph6 = (struct ipv6hdr *)skb->data; | ||
1198 | |||
1199 | if (iph6->nexthdr == IPPROTO_TCP) { | ||
1200 | offset = sizeof(struct ipv6hdr); | ||
1201 | skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6; | ||
1202 | } else { | ||
1203 | return; | ||
1204 | } | ||
1205 | } else { | ||
1206 | return; | ||
1207 | } | ||
1208 | /* if mss is not set through Large Packet bit/mss in rx buffer, | ||
1209 | * expect that the mss will be written to the tcp header checksum. | ||
1210 | */ | ||
1211 | if (lrg_pkt) { | ||
1212 | skb_shinfo(skb)->gso_size = mss; | ||
1213 | } else if (offset) { | ||
1214 | struct tcphdr *tcph = (struct tcphdr *)(skb->data + offset); | ||
1215 | |||
1216 | skb_shinfo(skb)->gso_size = ntohs(tcph->check); | ||
1217 | tcph->check = 0; | ||
1218 | } | ||
1219 | } | ||
1220 | |||
1177 | static int ibmveth_poll(struct napi_struct *napi, int budget) | 1221 | static int ibmveth_poll(struct napi_struct *napi, int budget) |
1178 | { | 1222 | { |
1179 | struct ibmveth_adapter *adapter = | 1223 | struct ibmveth_adapter *adapter = |
@@ -1182,6 +1226,7 @@ static int ibmveth_poll(struct napi_struct *napi, int budget) | |||
1182 | int frames_processed = 0; | 1226 | int frames_processed = 0; |
1183 | unsigned long lpar_rc; | 1227 | unsigned long lpar_rc; |
1184 | struct iphdr *iph; | 1228 | struct iphdr *iph; |
1229 | u16 mss = 0; | ||
1185 | 1230 | ||
1186 | restart_poll: | 1231 | restart_poll: |
1187 | while (frames_processed < budget) { | 1232 | while (frames_processed < budget) { |
@@ -1199,9 +1244,21 @@ restart_poll: | |||
1199 | int length = ibmveth_rxq_frame_length(adapter); | 1244 | int length = ibmveth_rxq_frame_length(adapter); |
1200 | int offset = ibmveth_rxq_frame_offset(adapter); | 1245 | int offset = ibmveth_rxq_frame_offset(adapter); |
1201 | int csum_good = ibmveth_rxq_csum_good(adapter); | 1246 | int csum_good = ibmveth_rxq_csum_good(adapter); |
1247 | int lrg_pkt = ibmveth_rxq_large_packet(adapter); | ||
1202 | 1248 | ||
1203 | skb = ibmveth_rxq_get_buffer(adapter); | 1249 | skb = ibmveth_rxq_get_buffer(adapter); |
1204 | 1250 | ||
1251 | /* if the large packet bit is set in the rx queue | ||
1252 | * descriptor, the mss will be written by PHYP eight | ||
1253 | * bytes from the start of the rx buffer, which is | ||
1254 | * skb->data at this stage | ||
1255 | */ | ||
1256 | if (lrg_pkt) { | ||
1257 | __be64 *rxmss = (__be64 *)(skb->data + 8); | ||
1258 | |||
1259 | mss = (u16)be64_to_cpu(*rxmss); | ||
1260 | } | ||
1261 | |||
1205 | new_skb = NULL; | 1262 | new_skb = NULL; |
1206 | if (length < rx_copybreak) | 1263 | if (length < rx_copybreak) |
1207 | new_skb = netdev_alloc_skb(netdev, length); | 1264 | new_skb = netdev_alloc_skb(netdev, length); |
@@ -1235,11 +1292,15 @@ restart_poll: | |||
1235 | if (iph->check == 0xffff) { | 1292 | if (iph->check == 0xffff) { |
1236 | iph->check = 0; | 1293 | iph->check = 0; |
1237 | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); | 1294 | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
1238 | adapter->rx_large_packets++; | ||
1239 | } | 1295 | } |
1240 | } | 1296 | } |
1241 | } | 1297 | } |
1242 | 1298 | ||
1299 | if (length > netdev->mtu + ETH_HLEN) { | ||
1300 | ibmveth_rx_mss_helper(skb, mss, lrg_pkt); | ||
1301 | adapter->rx_large_packets++; | ||
1302 | } | ||
1303 | |||
1243 | napi_gro_receive(napi, skb); /* send it up */ | 1304 | napi_gro_receive(napi, skb); /* send it up */ |
1244 | 1305 | ||
1245 | netdev->stats.rx_packets++; | 1306 | netdev->stats.rx_packets++; |
diff --git a/drivers/net/ethernet/ibm/ibmveth.h b/drivers/net/ethernet/ibm/ibmveth.h index 4eade67fe30c..7acda04d034e 100644 --- a/drivers/net/ethernet/ibm/ibmveth.h +++ b/drivers/net/ethernet/ibm/ibmveth.h | |||
@@ -209,6 +209,7 @@ struct ibmveth_rx_q_entry { | |||
209 | #define IBMVETH_RXQ_TOGGLE 0x80000000 | 209 | #define IBMVETH_RXQ_TOGGLE 0x80000000 |
210 | #define IBMVETH_RXQ_TOGGLE_SHIFT 31 | 210 | #define IBMVETH_RXQ_TOGGLE_SHIFT 31 |
211 | #define IBMVETH_RXQ_VALID 0x40000000 | 211 | #define IBMVETH_RXQ_VALID 0x40000000 |
212 | #define IBMVETH_RXQ_LRG_PKT 0x04000000 | ||
212 | #define IBMVETH_RXQ_NO_CSUM 0x02000000 | 213 | #define IBMVETH_RXQ_NO_CSUM 0x02000000 |
213 | #define IBMVETH_RXQ_CSUM_GOOD 0x01000000 | 214 | #define IBMVETH_RXQ_CSUM_GOOD 0x01000000 |
214 | #define IBMVETH_RXQ_OFF_MASK 0x0000FFFF | 215 | #define IBMVETH_RXQ_OFF_MASK 0x0000FFFF |
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 9d931373a9b9..faea52da8dae 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c | |||
@@ -696,6 +696,7 @@ ltq_etop_probe(struct platform_device *pdev) | |||
696 | priv->pldata = dev_get_platdata(&pdev->dev); | 696 | priv->pldata = dev_get_platdata(&pdev->dev); |
697 | priv->netdev = dev; | 697 | priv->netdev = dev; |
698 | spin_lock_init(&priv->lock); | 698 | spin_lock_init(&priv->lock); |
699 | SET_NETDEV_DEV(dev, &pdev->dev); | ||
699 | 700 | ||
700 | for (i = 0; i < MAX_DMA_CHAN; i++) { | 701 | for (i = 0; i < MAX_DMA_CHAN; i++) { |
701 | if (IS_TX(i)) | 702 | if (IS_TX(i)) |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig index aae46884bf93..521cfdb7d11e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig +++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig | |||
@@ -18,8 +18,6 @@ config MLX5_CORE_EN | |||
18 | default n | 18 | default n |
19 | ---help--- | 19 | ---help--- |
20 | Ethernet support in Mellanox Technologies ConnectX-4 NIC. | 20 | Ethernet support in Mellanox Technologies ConnectX-4 NIC. |
21 | Ethernet and Infiniband support in ConnectX-4 are currently mutually | ||
22 | exclusive. | ||
23 | 21 | ||
24 | config MLX5_CORE_EN_DCB | 22 | config MLX5_CORE_EN_DCB |
25 | bool "Data Center Bridging (DCB) Support" | 23 | bool "Data Center Bridging (DCB) Support" |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index be09573c6ced..c48fc0c4abd9 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -438,9 +438,16 @@ static int smsc911x_request_resources(struct platform_device *pdev) | |||
438 | ret = regulator_bulk_get(&pdev->dev, | 438 | ret = regulator_bulk_get(&pdev->dev, |
439 | ARRAY_SIZE(pdata->supplies), | 439 | ARRAY_SIZE(pdata->supplies), |
440 | pdata->supplies); | 440 | pdata->supplies); |
441 | if (ret) | 441 | if (ret) { |
442 | /* | ||
443 | * Retry on deferrals, else just report the error | ||
444 | * and try to continue. | ||
445 | */ | ||
446 | if (ret == -EPROBE_DEFER) | ||
447 | return ret; | ||
442 | netdev_err(ndev, "couldn't get regulators %d\n", | 448 | netdev_err(ndev, "couldn't get regulators %d\n", |
443 | ret); | 449 | ret); |
450 | } | ||
444 | 451 | ||
445 | /* Request optional RESET GPIO */ | 452 | /* Request optional RESET GPIO */ |
446 | pdata->reset_gpiod = devm_gpiod_get_optional(&pdev->dev, | 453 | pdata->reset_gpiod = devm_gpiod_get_optional(&pdev->dev, |
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c index c56e7030c44e..77c88fcf2b86 100644 --- a/drivers/net/ethernet/ti/cpmac.c +++ b/drivers/net/ethernet/ti/cpmac.c | |||
@@ -1112,6 +1112,7 @@ static int cpmac_probe(struct platform_device *pdev) | |||
1112 | if (!dev) | 1112 | if (!dev) |
1113 | return -ENOMEM; | 1113 | return -ENOMEM; |
1114 | 1114 | ||
1115 | SET_NETDEV_DEV(dev, &pdev->dev); | ||
1115 | platform_set_drvdata(pdev, dev); | 1116 | platform_set_drvdata(pdev, dev); |
1116 | priv = netdev_priv(dev); | 1117 | priv = netdev_priv(dev); |
1117 | 1118 | ||
diff --git a/drivers/net/ethernet/ti/cpsw-phy-sel.c b/drivers/net/ethernet/ti/cpsw-phy-sel.c index ba1e45ff6aae..18013645e76c 100644 --- a/drivers/net/ethernet/ti/cpsw-phy-sel.c +++ b/drivers/net/ethernet/ti/cpsw-phy-sel.c | |||
@@ -81,6 +81,7 @@ static void cpsw_gmii_sel_am3352(struct cpsw_phy_sel_priv *priv, | |||
81 | }; | 81 | }; |
82 | 82 | ||
83 | mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6); | 83 | mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6); |
84 | mask |= BIT(slave + 4); | ||
84 | mode <<= slave * 2; | 85 | mode <<= slave * 2; |
85 | 86 | ||
86 | if (priv->rmii_clock_external) { | 87 | if (priv->rmii_clock_external) { |
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 9522763c8faf..c9414c054852 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c | |||
@@ -47,6 +47,10 @@ | |||
47 | NETIF_F_TSO | \ | 47 | NETIF_F_TSO | \ |
48 | NETIF_F_TSO6 | \ | 48 | NETIF_F_TSO6 | \ |
49 | NETIF_F_HW_CSUM) | 49 | NETIF_F_HW_CSUM) |
50 | |||
51 | /* Restrict GSO size to account for NVGRE */ | ||
52 | #define NETVSC_GSO_MAX_SIZE 62768 | ||
53 | |||
50 | static int ring_size = 128; | 54 | static int ring_size = 128; |
51 | module_param(ring_size, int, S_IRUGO); | 55 | module_param(ring_size, int, S_IRUGO); |
52 | MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)"); | 56 | MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)"); |
@@ -1393,6 +1397,7 @@ static int netvsc_probe(struct hv_device *dev, | |||
1393 | nvdev = net_device_ctx->nvdev; | 1397 | nvdev = net_device_ctx->nvdev; |
1394 | netif_set_real_num_tx_queues(net, nvdev->num_chn); | 1398 | netif_set_real_num_tx_queues(net, nvdev->num_chn); |
1395 | netif_set_real_num_rx_queues(net, nvdev->num_chn); | 1399 | netif_set_real_num_rx_queues(net, nvdev->num_chn); |
1400 | netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE); | ||
1396 | 1401 | ||
1397 | /* MTU range: 68 - 1500 or 65521 */ | 1402 | /* MTU range: 68 - 1500 or 65521 */ |
1398 | net->min_mtu = NETVSC_MTU_MIN; | 1403 | net->min_mtu = NETVSC_MTU_MIN; |
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index ffe8994e64fc..693ec5b66222 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c | |||
@@ -546,13 +546,15 @@ static int ipvlan_link_new(struct net *src_net, struct net_device *dev, | |||
546 | } | 546 | } |
547 | err = ipvlan_set_port_mode(port, mode); | 547 | err = ipvlan_set_port_mode(port, mode); |
548 | if (err) { | 548 | if (err) { |
549 | goto unregister_netdev; | 549 | goto unlink_netdev; |
550 | } | 550 | } |
551 | 551 | ||
552 | list_add_tail_rcu(&ipvlan->pnode, &port->ipvlans); | 552 | list_add_tail_rcu(&ipvlan->pnode, &port->ipvlans); |
553 | netif_stacked_transfer_operstate(phy_dev, dev); | 553 | netif_stacked_transfer_operstate(phy_dev, dev); |
554 | return 0; | 554 | return 0; |
555 | 555 | ||
556 | unlink_netdev: | ||
557 | netdev_upper_dev_unlink(phy_dev, dev); | ||
556 | unregister_netdev: | 558 | unregister_netdev: |
557 | unregister_netdevice(dev); | 559 | unregister_netdevice(dev); |
558 | destroy_ipvlan_port: | 560 | destroy_ipvlan_port: |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 32fa7c76f29c..0aadef9fc7dd 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -905,11 +905,17 @@ EXPORT_SYMBOL(phy_attached_print); | |||
905 | int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | 905 | int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, |
906 | u32 flags, phy_interface_t interface) | 906 | u32 flags, phy_interface_t interface) |
907 | { | 907 | { |
908 | struct module *ndev_owner = dev->dev.parent->driver->owner; | ||
908 | struct mii_bus *bus = phydev->mdio.bus; | 909 | struct mii_bus *bus = phydev->mdio.bus; |
909 | struct device *d = &phydev->mdio.dev; | 910 | struct device *d = &phydev->mdio.dev; |
910 | int err; | 911 | int err; |
911 | 912 | ||
912 | if (!try_module_get(bus->owner)) { | 913 | /* For Ethernet device drivers that register their own MDIO bus, we |
914 | * will have bus->owner match ndev_mod, so we do not want to increment | ||
915 | * our own module->refcnt here, otherwise we would not be able to | ||
916 | * unload later on. | ||
917 | */ | ||
918 | if (ndev_owner != bus->owner && !try_module_get(bus->owner)) { | ||
913 | dev_err(&dev->dev, "failed to get the bus module\n"); | 919 | dev_err(&dev->dev, "failed to get the bus module\n"); |
914 | return -EIO; | 920 | return -EIO; |
915 | } | 921 | } |
@@ -971,7 +977,8 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | |||
971 | error: | 977 | error: |
972 | phy_detach(phydev); | 978 | phy_detach(phydev); |
973 | put_device(d); | 979 | put_device(d); |
974 | module_put(bus->owner); | 980 | if (ndev_owner != bus->owner) |
981 | module_put(bus->owner); | ||
975 | return err; | 982 | return err; |
976 | } | 983 | } |
977 | EXPORT_SYMBOL(phy_attach_direct); | 984 | EXPORT_SYMBOL(phy_attach_direct); |
@@ -1021,6 +1028,8 @@ EXPORT_SYMBOL(phy_attach); | |||
1021 | */ | 1028 | */ |
1022 | void phy_detach(struct phy_device *phydev) | 1029 | void phy_detach(struct phy_device *phydev) |
1023 | { | 1030 | { |
1031 | struct net_device *dev = phydev->attached_dev; | ||
1032 | struct module *ndev_owner = dev->dev.parent->driver->owner; | ||
1024 | struct mii_bus *bus; | 1033 | struct mii_bus *bus; |
1025 | int i; | 1034 | int i; |
1026 | 1035 | ||
@@ -1050,7 +1059,8 @@ void phy_detach(struct phy_device *phydev) | |||
1050 | bus = phydev->mdio.bus; | 1059 | bus = phydev->mdio.bus; |
1051 | 1060 | ||
1052 | put_device(&phydev->mdio.dev); | 1061 | put_device(&phydev->mdio.dev); |
1053 | module_put(bus->owner); | 1062 | if (ndev_owner != bus->owner) |
1063 | module_put(bus->owner); | ||
1054 | } | 1064 | } |
1055 | EXPORT_SYMBOL(phy_detach); | 1065 | EXPORT_SYMBOL(phy_detach); |
1056 | 1066 | ||
diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c index 96a5028621c8..3a98f3762a4c 100644 --- a/drivers/net/usb/cdc_mbim.c +++ b/drivers/net/usb/cdc_mbim.c | |||
@@ -602,6 +602,21 @@ static const struct driver_info cdc_mbim_info_ndp_to_end = { | |||
602 | .data = CDC_NCM_FLAG_NDP_TO_END, | 602 | .data = CDC_NCM_FLAG_NDP_TO_END, |
603 | }; | 603 | }; |
604 | 604 | ||
605 | /* Some modems (e.g. Telit LE922A6) do not work properly with altsetting | ||
606 | * toggle done in cdc_ncm_bind_common. CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE | ||
607 | * flag is used to avoid this procedure. | ||
608 | */ | ||
609 | static const struct driver_info cdc_mbim_info_avoid_altsetting_toggle = { | ||
610 | .description = "CDC MBIM", | ||
611 | .flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET | FLAG_WWAN, | ||
612 | .bind = cdc_mbim_bind, | ||
613 | .unbind = cdc_mbim_unbind, | ||
614 | .manage_power = cdc_mbim_manage_power, | ||
615 | .rx_fixup = cdc_mbim_rx_fixup, | ||
616 | .tx_fixup = cdc_mbim_tx_fixup, | ||
617 | .data = CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE, | ||
618 | }; | ||
619 | |||
605 | static const struct usb_device_id mbim_devs[] = { | 620 | static const struct usb_device_id mbim_devs[] = { |
606 | /* This duplicate NCM entry is intentional. MBIM devices can | 621 | /* This duplicate NCM entry is intentional. MBIM devices can |
607 | * be disguised as NCM by default, and this is necessary to | 622 | * be disguised as NCM by default, and this is necessary to |
@@ -626,6 +641,12 @@ static const struct usb_device_id mbim_devs[] = { | |||
626 | { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | 641 | { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), |
627 | .driver_info = (unsigned long)&cdc_mbim_info_ndp_to_end, | 642 | .driver_info = (unsigned long)&cdc_mbim_info_ndp_to_end, |
628 | }, | 643 | }, |
644 | |||
645 | /* Telit LE922A6 in MBIM composition */ | ||
646 | { USB_DEVICE_AND_INTERFACE_INFO(0x1bc7, 0x1041, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | ||
647 | .driver_info = (unsigned long)&cdc_mbim_info_avoid_altsetting_toggle, | ||
648 | }, | ||
649 | |||
629 | /* default entry */ | 650 | /* default entry */ |
630 | { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | 651 | { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), |
631 | .driver_info = (unsigned long)&cdc_mbim_info_zlp, | 652 | .driver_info = (unsigned long)&cdc_mbim_info_zlp, |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 7141817946f0..2d1a6f2e16ab 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -835,11 +835,18 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ | |||
835 | 835 | ||
836 | iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; | 836 | iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; |
837 | 837 | ||
838 | /* Device-specific flags */ | ||
839 | ctx->drvflags = drvflags; | ||
840 | |||
838 | /* Reset data interface. Some devices will not reset properly | 841 | /* Reset data interface. Some devices will not reset properly |
839 | * unless they are configured first. Toggle the altsetting to | 842 | * unless they are configured first. Toggle the altsetting to |
840 | * force a reset | 843 | * force a reset. |
844 | * Some other devices do not work properly with this procedure | ||
845 | * that can be avoided using quirk CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE | ||
841 | */ | 846 | */ |
842 | usb_set_interface(dev->udev, iface_no, data_altsetting); | 847 | if (!(ctx->drvflags & CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE)) |
848 | usb_set_interface(dev->udev, iface_no, data_altsetting); | ||
849 | |||
843 | temp = usb_set_interface(dev->udev, iface_no, 0); | 850 | temp = usb_set_interface(dev->udev, iface_no, 0); |
844 | if (temp) { | 851 | if (temp) { |
845 | dev_dbg(&intf->dev, "set interface failed\n"); | 852 | dev_dbg(&intf->dev, "set interface failed\n"); |
@@ -886,9 +893,6 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ | |||
886 | /* finish setting up the device specific data */ | 893 | /* finish setting up the device specific data */ |
887 | cdc_ncm_setup(dev); | 894 | cdc_ncm_setup(dev); |
888 | 895 | ||
889 | /* Device-specific flags */ | ||
890 | ctx->drvflags = drvflags; | ||
891 | |||
892 | /* Allocate the delayed NDP if needed. */ | 896 | /* Allocate the delayed NDP if needed. */ |
893 | if (ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END) { | 897 | if (ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END) { |
894 | ctx->delayed_ndp16 = kzalloc(ctx->max_ndp_size, GFP_KERNEL); | 898 | ctx->delayed_ndp16 = kzalloc(ctx->max_ndp_size, GFP_KERNEL); |
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index a8b6949a8778..23d4a1728cdf 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c | |||
@@ -715,7 +715,7 @@ EXPORT_SYMBOL_GPL(nd_cmd_in_size); | |||
715 | 715 | ||
716 | u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, | 716 | u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, |
717 | const struct nd_cmd_desc *desc, int idx, const u32 *in_field, | 717 | const struct nd_cmd_desc *desc, int idx, const u32 *in_field, |
718 | const u32 *out_field) | 718 | const u32 *out_field, unsigned long remainder) |
719 | { | 719 | { |
720 | if (idx >= desc->out_num) | 720 | if (idx >= desc->out_num) |
721 | return UINT_MAX; | 721 | return UINT_MAX; |
@@ -727,9 +727,24 @@ u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, | |||
727 | return in_field[1]; | 727 | return in_field[1]; |
728 | else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) | 728 | else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) |
729 | return out_field[1]; | 729 | return out_field[1]; |
730 | else if (!nvdimm && cmd == ND_CMD_ARS_STATUS && idx == 2) | 730 | else if (!nvdimm && cmd == ND_CMD_ARS_STATUS && idx == 2) { |
731 | return out_field[1] - 8; | 731 | /* |
732 | else if (cmd == ND_CMD_CALL) { | 732 | * Per table 9-276 ARS Data in ACPI 6.1, out_field[1] is |
733 | * "Size of Output Buffer in bytes, including this | ||
734 | * field." | ||
735 | */ | ||
736 | if (out_field[1] < 4) | ||
737 | return 0; | ||
738 | /* | ||
739 | * ACPI 6.1 is ambiguous if 'status' is included in the | ||
740 | * output size. If we encounter an output size that | ||
741 | * overshoots the remainder by 4 bytes, assume it was | ||
742 | * including 'status'. | ||
743 | */ | ||
744 | if (out_field[1] - 8 == remainder) | ||
745 | return remainder; | ||
746 | return out_field[1] - 4; | ||
747 | } else if (cmd == ND_CMD_CALL) { | ||
733 | struct nd_cmd_pkg *pkg = (struct nd_cmd_pkg *) in_field; | 748 | struct nd_cmd_pkg *pkg = (struct nd_cmd_pkg *) in_field; |
734 | 749 | ||
735 | return pkg->nd_size_out; | 750 | return pkg->nd_size_out; |
@@ -876,7 +891,7 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm, | |||
876 | /* process an output envelope */ | 891 | /* process an output envelope */ |
877 | for (i = 0; i < desc->out_num; i++) { | 892 | for (i = 0; i < desc->out_num; i++) { |
878 | u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, | 893 | u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, |
879 | (u32 *) in_env, (u32 *) out_env); | 894 | (u32 *) in_env, (u32 *) out_env, 0); |
880 | u32 copy; | 895 | u32 copy; |
881 | 896 | ||
882 | if (out_size == UINT_MAX) { | 897 | if (out_size == UINT_MAX) { |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index c5326055beee..f4f77c5b0c83 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -1323,18 +1323,20 @@ lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
1323 | { | 1323 | { |
1324 | lockdep_assert_held(&phba->hbalock); | 1324 | lockdep_assert_held(&phba->hbalock); |
1325 | 1325 | ||
1326 | BUG_ON(!piocb || !piocb->vport); | 1326 | BUG_ON(!piocb); |
1327 | 1327 | ||
1328 | list_add_tail(&piocb->list, &pring->txcmplq); | 1328 | list_add_tail(&piocb->list, &pring->txcmplq); |
1329 | piocb->iocb_flag |= LPFC_IO_ON_TXCMPLQ; | 1329 | piocb->iocb_flag |= LPFC_IO_ON_TXCMPLQ; |
1330 | 1330 | ||
1331 | if ((unlikely(pring->ringno == LPFC_ELS_RING)) && | 1331 | if ((unlikely(pring->ringno == LPFC_ELS_RING)) && |
1332 | (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) && | 1332 | (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) && |
1333 | (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN) && | 1333 | (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN)) { |
1334 | (!(piocb->vport->load_flag & FC_UNLOADING))) | 1334 | BUG_ON(!piocb->vport); |
1335 | mod_timer(&piocb->vport->els_tmofunc, | 1335 | if (!(piocb->vport->load_flag & FC_UNLOADING)) |
1336 | jiffies + | 1336 | mod_timer(&piocb->vport->els_tmofunc, |
1337 | msecs_to_jiffies(1000 * (phba->fc_ratov << 1))); | 1337 | jiffies + |
1338 | msecs_to_jiffies(1000 * (phba->fc_ratov << 1))); | ||
1339 | } | ||
1338 | 1340 | ||
1339 | return 0; | 1341 | return 0; |
1340 | } | 1342 | } |
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 9c3c68b9a49e..e6b70966c19d 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c | |||
@@ -503,7 +503,7 @@ static void vhost_vsock_reset_orphans(struct sock *sk) | |||
503 | * executing. | 503 | * executing. |
504 | */ | 504 | */ |
505 | 505 | ||
506 | if (!vhost_vsock_get(vsk->local_addr.svm_cid)) { | 506 | if (!vhost_vsock_get(vsk->remote_addr.svm_cid)) { |
507 | sock_set_flag(sk, SOCK_DONE); | 507 | sock_set_flag(sk, SOCK_DONE); |
508 | vsk->peer_shutdown = SHUTDOWN_MASK; | 508 | vsk->peer_shutdown = SHUTDOWN_MASK; |
509 | sk->sk_state = SS_UNCONNECTED; | 509 | sk->sk_state = SS_UNCONNECTED; |
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 78180d151730..a594c7879cc2 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -1261,26 +1261,30 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags) | |||
1261 | return -ECHILD; | 1261 | return -ECHILD; |
1262 | 1262 | ||
1263 | op = ceph_snap(dir) == CEPH_SNAPDIR ? | 1263 | op = ceph_snap(dir) == CEPH_SNAPDIR ? |
1264 | CEPH_MDS_OP_LOOKUPSNAP : CEPH_MDS_OP_LOOKUP; | 1264 | CEPH_MDS_OP_LOOKUPSNAP : CEPH_MDS_OP_GETATTR; |
1265 | req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); | 1265 | req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); |
1266 | if (!IS_ERR(req)) { | 1266 | if (!IS_ERR(req)) { |
1267 | req->r_dentry = dget(dentry); | 1267 | req->r_dentry = dget(dentry); |
1268 | req->r_num_caps = 2; | 1268 | req->r_num_caps = op == CEPH_MDS_OP_GETATTR ? 1 : 2; |
1269 | 1269 | ||
1270 | mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED; | 1270 | mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED; |
1271 | if (ceph_security_xattr_wanted(dir)) | 1271 | if (ceph_security_xattr_wanted(dir)) |
1272 | mask |= CEPH_CAP_XATTR_SHARED; | 1272 | mask |= CEPH_CAP_XATTR_SHARED; |
1273 | req->r_args.getattr.mask = mask; | 1273 | req->r_args.getattr.mask = mask; |
1274 | 1274 | ||
1275 | req->r_locked_dir = dir; | ||
1276 | err = ceph_mdsc_do_request(mdsc, NULL, req); | 1275 | err = ceph_mdsc_do_request(mdsc, NULL, req); |
1277 | if (err == 0 || err == -ENOENT) { | 1276 | switch (err) { |
1278 | if (dentry == req->r_dentry) { | 1277 | case 0: |
1279 | valid = !d_unhashed(dentry); | 1278 | if (d_really_is_positive(dentry) && |
1280 | } else { | 1279 | d_inode(dentry) == req->r_target_inode) |
1281 | d_invalidate(req->r_dentry); | 1280 | valid = 1; |
1282 | err = -EAGAIN; | 1281 | break; |
1283 | } | 1282 | case -ENOENT: |
1283 | if (d_really_is_negative(dentry)) | ||
1284 | valid = 1; | ||
1285 | /* Fallthrough */ | ||
1286 | default: | ||
1287 | break; | ||
1284 | } | 1288 | } |
1285 | ceph_mdsc_put_request(req); | 1289 | ceph_mdsc_put_request(req); |
1286 | dout("d_revalidate %p lookup result=%d\n", | 1290 | dout("d_revalidate %p lookup result=%d\n", |
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index b3ebe512d64c..096f79997f75 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -1739,8 +1739,6 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr) | |||
1739 | * This should be done on write(), truncate() and chown(). | 1739 | * This should be done on write(), truncate() and chown(). |
1740 | */ | 1740 | */ |
1741 | if (!fc->handle_killpriv) { | 1741 | if (!fc->handle_killpriv) { |
1742 | int kill; | ||
1743 | |||
1744 | /* | 1742 | /* |
1745 | * ia_mode calculation may have used stale i_mode. | 1743 | * ia_mode calculation may have used stale i_mode. |
1746 | * Refresh and recalculate. | 1744 | * Refresh and recalculate. |
@@ -1750,12 +1748,11 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr) | |||
1750 | return ret; | 1748 | return ret; |
1751 | 1749 | ||
1752 | attr->ia_mode = inode->i_mode; | 1750 | attr->ia_mode = inode->i_mode; |
1753 | kill = should_remove_suid(entry); | 1751 | if (inode->i_mode & S_ISUID) { |
1754 | if (kill & ATTR_KILL_SUID) { | ||
1755 | attr->ia_valid |= ATTR_MODE; | 1752 | attr->ia_valid |= ATTR_MODE; |
1756 | attr->ia_mode &= ~S_ISUID; | 1753 | attr->ia_mode &= ~S_ISUID; |
1757 | } | 1754 | } |
1758 | if (kill & ATTR_KILL_SGID) { | 1755 | if ((inode->i_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { |
1759 | attr->ia_valid |= ATTR_MODE; | 1756 | attr->ia_valid |= ATTR_MODE; |
1760 | attr->ia_mode &= ~S_ISGID; | 1757 | attr->ia_mode &= ~S_ISGID; |
1761 | } | 1758 | } |
diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h index 59a3b2f58c22..63554e9f6e0c 100644 --- a/include/asm-generic/export.h +++ b/include/asm-generic/export.h | |||
@@ -54,7 +54,6 @@ KSYM(__kstrtab_\name): | |||
54 | KSYM(__kcrctab_\name): | 54 | KSYM(__kcrctab_\name): |
55 | __put KSYM(__crc_\name) | 55 | __put KSYM(__crc_\name) |
56 | .weak KSYM(__crc_\name) | 56 | .weak KSYM(__crc_\name) |
57 | .set KSYM(__crc_\name), 0 | ||
58 | .previous | 57 | .previous |
59 | #endif | 58 | #endif |
60 | #endif | 59 | #endif |
diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h index f4947fda11e7..8458c5351e56 100644 --- a/include/linux/libnvdimm.h +++ b/include/linux/libnvdimm.h | |||
@@ -143,7 +143,7 @@ u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd, | |||
143 | const struct nd_cmd_desc *desc, int idx, void *buf); | 143 | const struct nd_cmd_desc *desc, int idx, void *buf); |
144 | u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, | 144 | u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, |
145 | const struct nd_cmd_desc *desc, int idx, const u32 *in_field, | 145 | const struct nd_cmd_desc *desc, int idx, const u32 *in_field, |
146 | const u32 *out_field); | 146 | const u32 *out_field, unsigned long remainder); |
147 | int nvdimm_bus_check_dimm_count(struct nvdimm_bus *nvdimm_bus, int dimm_count); | 147 | int nvdimm_bus_check_dimm_count(struct nvdimm_bus *nvdimm_bus, int dimm_count); |
148 | struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus, | 148 | struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus, |
149 | struct nd_region_desc *ndr_desc); | 149 | struct nd_region_desc *ndr_desc); |
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index 3a375d07d0dc..00d232406f18 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
@@ -81,7 +81,8 @@ | |||
81 | #define CDC_NCM_TIMER_INTERVAL_MAX (U32_MAX / NSEC_PER_USEC) | 81 | #define CDC_NCM_TIMER_INTERVAL_MAX (U32_MAX / NSEC_PER_USEC) |
82 | 82 | ||
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 | 86 | ||
86 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ | 87 | #define cdc_ncm_comm_intf_is_mbim(x) ((x)->desc.bInterfaceSubClass == USB_CDC_SUBCLASS_MBIM && \ |
87 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) | 88 | (x)->desc.bInterfaceProtocol == USB_CDC_PROTO_NONE) |
diff --git a/include/uapi/linux/can.h b/include/uapi/linux/can.h index 9692cda5f8fc..c48d93a28d1a 100644 --- a/include/uapi/linux/can.h +++ b/include/uapi/linux/can.h | |||
@@ -196,5 +196,6 @@ struct can_filter { | |||
196 | }; | 196 | }; |
197 | 197 | ||
198 | #define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */ | 198 | #define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */ |
199 | #define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */ | ||
199 | 200 | ||
200 | #endif /* !_UAPI_CAN_H */ | 201 | #endif /* !_UAPI_CAN_H */ |
diff --git a/kernel/events/core.c b/kernel/events/core.c index 22cc734aa1b2..faf073d0287f 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -903,17 +903,14 @@ list_update_cgroup_event(struct perf_event *event, | |||
903 | */ | 903 | */ |
904 | cpuctx = __get_cpu_context(ctx); | 904 | cpuctx = __get_cpu_context(ctx); |
905 | 905 | ||
906 | /* Only set/clear cpuctx->cgrp if current task uses event->cgrp. */ | 906 | /* |
907 | if (perf_cgroup_from_task(current, ctx) != event->cgrp) { | 907 | * cpuctx->cgrp is NULL until a cgroup event is sched in or |
908 | /* | 908 | * ctx->nr_cgroup == 0 . |
909 | * We are removing the last cpu event in this context. | 909 | */ |
910 | * If that event is not active in this cpu, cpuctx->cgrp | 910 | if (add && perf_cgroup_from_task(current, ctx) == event->cgrp) |
911 | * should've been cleared by perf_cgroup_switch. | 911 | cpuctx->cgrp = event->cgrp; |
912 | */ | 912 | else if (!add) |
913 | WARN_ON_ONCE(!add && cpuctx->cgrp); | 913 | cpuctx->cgrp = NULL; |
914 | return; | ||
915 | } | ||
916 | cpuctx->cgrp = add ? event->cgrp : NULL; | ||
917 | } | 914 | } |
918 | 915 | ||
919 | #else /* !CONFIG_CGROUP_PERF */ | 916 | #else /* !CONFIG_CGROUP_PERF */ |
diff --git a/kernel/kcov.c b/kernel/kcov.c index 30e6d05aa5a9..3cbb0c879705 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/printk.h> | 9 | #include <linux/printk.h> |
10 | #include <linux/sched.h> | ||
10 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
11 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
12 | #include <linux/vmalloc.h> | 13 | #include <linux/vmalloc.h> |
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 589d763a49b3..4d7ffc0a0d00 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c | |||
@@ -506,13 +506,13 @@ static void __print_lock_name(struct lock_class *class) | |||
506 | name = class->name; | 506 | name = class->name; |
507 | if (!name) { | 507 | if (!name) { |
508 | name = __get_key_name(class->key, str); | 508 | name = __get_key_name(class->key, str); |
509 | printk("%s", name); | 509 | printk(KERN_CONT "%s", name); |
510 | } else { | 510 | } else { |
511 | printk("%s", name); | 511 | printk(KERN_CONT "%s", name); |
512 | if (class->name_version > 1) | 512 | if (class->name_version > 1) |
513 | printk("#%d", class->name_version); | 513 | printk(KERN_CONT "#%d", class->name_version); |
514 | if (class->subclass) | 514 | if (class->subclass) |
515 | printk("/%d", class->subclass); | 515 | printk(KERN_CONT "/%d", class->subclass); |
516 | } | 516 | } |
517 | } | 517 | } |
518 | 518 | ||
@@ -522,9 +522,9 @@ static void print_lock_name(struct lock_class *class) | |||
522 | 522 | ||
523 | get_usage_chars(class, usage); | 523 | get_usage_chars(class, usage); |
524 | 524 | ||
525 | printk(" ("); | 525 | printk(KERN_CONT " ("); |
526 | __print_lock_name(class); | 526 | __print_lock_name(class); |
527 | printk("){%s}", usage); | 527 | printk(KERN_CONT "){%s}", usage); |
528 | } | 528 | } |
529 | 529 | ||
530 | static void print_lockdep_cache(struct lockdep_map *lock) | 530 | static void print_lockdep_cache(struct lockdep_map *lock) |
@@ -536,7 +536,7 @@ static void print_lockdep_cache(struct lockdep_map *lock) | |||
536 | if (!name) | 536 | if (!name) |
537 | name = __get_key_name(lock->key->subkeys, str); | 537 | name = __get_key_name(lock->key->subkeys, str); |
538 | 538 | ||
539 | printk("%s", name); | 539 | printk(KERN_CONT "%s", name); |
540 | } | 540 | } |
541 | 541 | ||
542 | static void print_lock(struct held_lock *hlock) | 542 | static void print_lock(struct held_lock *hlock) |
@@ -551,13 +551,13 @@ static void print_lock(struct held_lock *hlock) | |||
551 | barrier(); | 551 | barrier(); |
552 | 552 | ||
553 | if (!class_idx || (class_idx - 1) >= MAX_LOCKDEP_KEYS) { | 553 | if (!class_idx || (class_idx - 1) >= MAX_LOCKDEP_KEYS) { |
554 | printk("<RELEASED>\n"); | 554 | printk(KERN_CONT "<RELEASED>\n"); |
555 | return; | 555 | return; |
556 | } | 556 | } |
557 | 557 | ||
558 | print_lock_name(lock_classes + class_idx - 1); | 558 | print_lock_name(lock_classes + class_idx - 1); |
559 | printk(", at: "); | 559 | printk(KERN_CONT ", at: [<%p>] %pS\n", |
560 | print_ip_sym(hlock->acquire_ip); | 560 | (void *)hlock->acquire_ip, (void *)hlock->acquire_ip); |
561 | } | 561 | } |
562 | 562 | ||
563 | static void lockdep_print_held_locks(struct task_struct *curr) | 563 | static void lockdep_print_held_locks(struct task_struct *curr) |
@@ -792,8 +792,8 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) | |||
792 | 792 | ||
793 | printk("\nnew class %p: %s", class->key, class->name); | 793 | printk("\nnew class %p: %s", class->key, class->name); |
794 | if (class->name_version > 1) | 794 | if (class->name_version > 1) |
795 | printk("#%d", class->name_version); | 795 | printk(KERN_CONT "#%d", class->name_version); |
796 | printk("\n"); | 796 | printk(KERN_CONT "\n"); |
797 | dump_stack(); | 797 | dump_stack(); |
798 | 798 | ||
799 | if (!graph_lock()) { | 799 | if (!graph_lock()) { |
@@ -1071,7 +1071,7 @@ print_circular_bug_entry(struct lock_list *target, int depth) | |||
1071 | return 0; | 1071 | return 0; |
1072 | printk("\n-> #%u", depth); | 1072 | printk("\n-> #%u", depth); |
1073 | print_lock_name(target->class); | 1073 | print_lock_name(target->class); |
1074 | printk(":\n"); | 1074 | printk(KERN_CONT ":\n"); |
1075 | print_stack_trace(&target->trace, 6); | 1075 | print_stack_trace(&target->trace, 6); |
1076 | 1076 | ||
1077 | return 0; | 1077 | return 0; |
@@ -1102,11 +1102,11 @@ print_circular_lock_scenario(struct held_lock *src, | |||
1102 | if (parent != source) { | 1102 | if (parent != source) { |
1103 | printk("Chain exists of:\n "); | 1103 | printk("Chain exists of:\n "); |
1104 | __print_lock_name(source); | 1104 | __print_lock_name(source); |
1105 | printk(" --> "); | 1105 | printk(KERN_CONT " --> "); |
1106 | __print_lock_name(parent); | 1106 | __print_lock_name(parent); |
1107 | printk(" --> "); | 1107 | printk(KERN_CONT " --> "); |
1108 | __print_lock_name(target); | 1108 | __print_lock_name(target); |
1109 | printk("\n\n"); | 1109 | printk(KERN_CONT "\n\n"); |
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | printk(" Possible unsafe locking scenario:\n\n"); | 1112 | printk(" Possible unsafe locking scenario:\n\n"); |
@@ -1114,16 +1114,16 @@ print_circular_lock_scenario(struct held_lock *src, | |||
1114 | printk(" ---- ----\n"); | 1114 | printk(" ---- ----\n"); |
1115 | printk(" lock("); | 1115 | printk(" lock("); |
1116 | __print_lock_name(target); | 1116 | __print_lock_name(target); |
1117 | printk(");\n"); | 1117 | printk(KERN_CONT ");\n"); |
1118 | printk(" lock("); | 1118 | printk(" lock("); |
1119 | __print_lock_name(parent); | 1119 | __print_lock_name(parent); |
1120 | printk(");\n"); | 1120 | printk(KERN_CONT ");\n"); |
1121 | printk(" lock("); | 1121 | printk(" lock("); |
1122 | __print_lock_name(target); | 1122 | __print_lock_name(target); |
1123 | printk(");\n"); | 1123 | printk(KERN_CONT ");\n"); |
1124 | printk(" lock("); | 1124 | printk(" lock("); |
1125 | __print_lock_name(source); | 1125 | __print_lock_name(source); |
1126 | printk(");\n"); | 1126 | printk(KERN_CONT ");\n"); |
1127 | printk("\n *** DEADLOCK ***\n\n"); | 1127 | printk("\n *** DEADLOCK ***\n\n"); |
1128 | } | 1128 | } |
1129 | 1129 | ||
@@ -1359,22 +1359,22 @@ static void print_lock_class_header(struct lock_class *class, int depth) | |||
1359 | 1359 | ||
1360 | printk("%*s->", depth, ""); | 1360 | printk("%*s->", depth, ""); |
1361 | print_lock_name(class); | 1361 | print_lock_name(class); |
1362 | printk(" ops: %lu", class->ops); | 1362 | printk(KERN_CONT " ops: %lu", class->ops); |
1363 | printk(" {\n"); | 1363 | printk(KERN_CONT " {\n"); |
1364 | 1364 | ||
1365 | for (bit = 0; bit < LOCK_USAGE_STATES; bit++) { | 1365 | for (bit = 0; bit < LOCK_USAGE_STATES; bit++) { |
1366 | if (class->usage_mask & (1 << bit)) { | 1366 | if (class->usage_mask & (1 << bit)) { |
1367 | int len = depth; | 1367 | int len = depth; |
1368 | 1368 | ||
1369 | len += printk("%*s %s", depth, "", usage_str[bit]); | 1369 | len += printk("%*s %s", depth, "", usage_str[bit]); |
1370 | len += printk(" at:\n"); | 1370 | len += printk(KERN_CONT " at:\n"); |
1371 | print_stack_trace(class->usage_traces + bit, len); | 1371 | print_stack_trace(class->usage_traces + bit, len); |
1372 | } | 1372 | } |
1373 | } | 1373 | } |
1374 | printk("%*s }\n", depth, ""); | 1374 | printk("%*s }\n", depth, ""); |
1375 | 1375 | ||
1376 | printk("%*s ... key at: ",depth,""); | 1376 | printk("%*s ... key at: [<%p>] %pS\n", |
1377 | print_ip_sym((unsigned long)class->key); | 1377 | depth, "", class->key, class->key); |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | /* | 1380 | /* |
@@ -1437,11 +1437,11 @@ print_irq_lock_scenario(struct lock_list *safe_entry, | |||
1437 | if (middle_class != unsafe_class) { | 1437 | if (middle_class != unsafe_class) { |
1438 | printk("Chain exists of:\n "); | 1438 | printk("Chain exists of:\n "); |
1439 | __print_lock_name(safe_class); | 1439 | __print_lock_name(safe_class); |
1440 | printk(" --> "); | 1440 | printk(KERN_CONT " --> "); |
1441 | __print_lock_name(middle_class); | 1441 | __print_lock_name(middle_class); |
1442 | printk(" --> "); | 1442 | printk(KERN_CONT " --> "); |
1443 | __print_lock_name(unsafe_class); | 1443 | __print_lock_name(unsafe_class); |
1444 | printk("\n\n"); | 1444 | printk(KERN_CONT "\n\n"); |
1445 | } | 1445 | } |
1446 | 1446 | ||
1447 | printk(" Possible interrupt unsafe locking scenario:\n\n"); | 1447 | printk(" Possible interrupt unsafe locking scenario:\n\n"); |
@@ -1449,18 +1449,18 @@ print_irq_lock_scenario(struct lock_list *safe_entry, | |||
1449 | printk(" ---- ----\n"); | 1449 | printk(" ---- ----\n"); |
1450 | printk(" lock("); | 1450 | printk(" lock("); |
1451 | __print_lock_name(unsafe_class); | 1451 | __print_lock_name(unsafe_class); |
1452 | printk(");\n"); | 1452 | printk(KERN_CONT ");\n"); |
1453 | printk(" local_irq_disable();\n"); | 1453 | printk(" local_irq_disable();\n"); |
1454 | printk(" lock("); | 1454 | printk(" lock("); |
1455 | __print_lock_name(safe_class); | 1455 | __print_lock_name(safe_class); |
1456 | printk(");\n"); | 1456 | printk(KERN_CONT ");\n"); |
1457 | printk(" lock("); | 1457 | printk(" lock("); |
1458 | __print_lock_name(middle_class); | 1458 | __print_lock_name(middle_class); |
1459 | printk(");\n"); | 1459 | printk(KERN_CONT ");\n"); |
1460 | printk(" <Interrupt>\n"); | 1460 | printk(" <Interrupt>\n"); |
1461 | printk(" lock("); | 1461 | printk(" lock("); |
1462 | __print_lock_name(safe_class); | 1462 | __print_lock_name(safe_class); |
1463 | printk(");\n"); | 1463 | printk(KERN_CONT ");\n"); |
1464 | printk("\n *** DEADLOCK ***\n\n"); | 1464 | printk("\n *** DEADLOCK ***\n\n"); |
1465 | } | 1465 | } |
1466 | 1466 | ||
@@ -1497,9 +1497,9 @@ print_bad_irq_dependency(struct task_struct *curr, | |||
1497 | print_lock(prev); | 1497 | print_lock(prev); |
1498 | printk("which would create a new lock dependency:\n"); | 1498 | printk("which would create a new lock dependency:\n"); |
1499 | print_lock_name(hlock_class(prev)); | 1499 | print_lock_name(hlock_class(prev)); |
1500 | printk(" ->"); | 1500 | printk(KERN_CONT " ->"); |
1501 | print_lock_name(hlock_class(next)); | 1501 | print_lock_name(hlock_class(next)); |
1502 | printk("\n"); | 1502 | printk(KERN_CONT "\n"); |
1503 | 1503 | ||
1504 | printk("\nbut this new dependency connects a %s-irq-safe lock:\n", | 1504 | printk("\nbut this new dependency connects a %s-irq-safe lock:\n", |
1505 | irqclass); | 1505 | irqclass); |
@@ -1521,8 +1521,7 @@ print_bad_irq_dependency(struct task_struct *curr, | |||
1521 | 1521 | ||
1522 | lockdep_print_held_locks(curr); | 1522 | lockdep_print_held_locks(curr); |
1523 | 1523 | ||
1524 | printk("\nthe dependencies between %s-irq-safe lock", irqclass); | 1524 | printk("\nthe dependencies between %s-irq-safe lock and the holding lock:\n", irqclass); |
1525 | printk(" and the holding lock:\n"); | ||
1526 | if (!save_trace(&prev_root->trace)) | 1525 | if (!save_trace(&prev_root->trace)) |
1527 | return 0; | 1526 | return 0; |
1528 | print_shortest_lock_dependencies(backwards_entry, prev_root); | 1527 | print_shortest_lock_dependencies(backwards_entry, prev_root); |
@@ -1694,10 +1693,10 @@ print_deadlock_scenario(struct held_lock *nxt, | |||
1694 | printk(" ----\n"); | 1693 | printk(" ----\n"); |
1695 | printk(" lock("); | 1694 | printk(" lock("); |
1696 | __print_lock_name(prev); | 1695 | __print_lock_name(prev); |
1697 | printk(");\n"); | 1696 | printk(KERN_CONT ");\n"); |
1698 | printk(" lock("); | 1697 | printk(" lock("); |
1699 | __print_lock_name(next); | 1698 | __print_lock_name(next); |
1700 | printk(");\n"); | 1699 | printk(KERN_CONT ");\n"); |
1701 | printk("\n *** DEADLOCK ***\n\n"); | 1700 | printk("\n *** DEADLOCK ***\n\n"); |
1702 | printk(" May be due to missing lock nesting notation\n\n"); | 1701 | printk(" May be due to missing lock nesting notation\n\n"); |
1703 | } | 1702 | } |
@@ -1891,9 +1890,9 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev, | |||
1891 | graph_unlock(); | 1890 | graph_unlock(); |
1892 | printk("\n new dependency: "); | 1891 | printk("\n new dependency: "); |
1893 | print_lock_name(hlock_class(prev)); | 1892 | print_lock_name(hlock_class(prev)); |
1894 | printk(" => "); | 1893 | printk(KERN_CONT " => "); |
1895 | print_lock_name(hlock_class(next)); | 1894 | print_lock_name(hlock_class(next)); |
1896 | printk("\n"); | 1895 | printk(KERN_CONT "\n"); |
1897 | dump_stack(); | 1896 | dump_stack(); |
1898 | return graph_lock(); | 1897 | return graph_lock(); |
1899 | } | 1898 | } |
@@ -2343,11 +2342,11 @@ print_usage_bug_scenario(struct held_lock *lock) | |||
2343 | printk(" ----\n"); | 2342 | printk(" ----\n"); |
2344 | printk(" lock("); | 2343 | printk(" lock("); |
2345 | __print_lock_name(class); | 2344 | __print_lock_name(class); |
2346 | printk(");\n"); | 2345 | printk(KERN_CONT ");\n"); |
2347 | printk(" <Interrupt>\n"); | 2346 | printk(" <Interrupt>\n"); |
2348 | printk(" lock("); | 2347 | printk(" lock("); |
2349 | __print_lock_name(class); | 2348 | __print_lock_name(class); |
2350 | printk(");\n"); | 2349 | printk(KERN_CONT ");\n"); |
2351 | printk("\n *** DEADLOCK ***\n\n"); | 2350 | printk("\n *** DEADLOCK ***\n\n"); |
2352 | } | 2351 | } |
2353 | 2352 | ||
@@ -2522,14 +2521,18 @@ check_usage_backwards(struct task_struct *curr, struct held_lock *this, | |||
2522 | void print_irqtrace_events(struct task_struct *curr) | 2521 | void print_irqtrace_events(struct task_struct *curr) |
2523 | { | 2522 | { |
2524 | printk("irq event stamp: %u\n", curr->irq_events); | 2523 | printk("irq event stamp: %u\n", curr->irq_events); |
2525 | printk("hardirqs last enabled at (%u): ", curr->hardirq_enable_event); | 2524 | printk("hardirqs last enabled at (%u): [<%p>] %pS\n", |
2526 | print_ip_sym(curr->hardirq_enable_ip); | 2525 | curr->hardirq_enable_event, (void *)curr->hardirq_enable_ip, |
2527 | printk("hardirqs last disabled at (%u): ", curr->hardirq_disable_event); | 2526 | (void *)curr->hardirq_enable_ip); |
2528 | print_ip_sym(curr->hardirq_disable_ip); | 2527 | printk("hardirqs last disabled at (%u): [<%p>] %pS\n", |
2529 | printk("softirqs last enabled at (%u): ", curr->softirq_enable_event); | 2528 | curr->hardirq_disable_event, (void *)curr->hardirq_disable_ip, |
2530 | print_ip_sym(curr->softirq_enable_ip); | 2529 | (void *)curr->hardirq_disable_ip); |
2531 | printk("softirqs last disabled at (%u): ", curr->softirq_disable_event); | 2530 | printk("softirqs last enabled at (%u): [<%p>] %pS\n", |
2532 | print_ip_sym(curr->softirq_disable_ip); | 2531 | curr->softirq_enable_event, (void *)curr->softirq_enable_ip, |
2532 | (void *)curr->softirq_enable_ip); | ||
2533 | printk("softirqs last disabled at (%u): [<%p>] %pS\n", | ||
2534 | curr->softirq_disable_event, (void *)curr->softirq_disable_ip, | ||
2535 | (void *)curr->softirq_disable_ip); | ||
2533 | } | 2536 | } |
2534 | 2537 | ||
2535 | static int HARDIRQ_verbose(struct lock_class *class) | 2538 | static int HARDIRQ_verbose(struct lock_class *class) |
@@ -3235,8 +3238,8 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
3235 | if (very_verbose(class)) { | 3238 | if (very_verbose(class)) { |
3236 | printk("\nacquire class [%p] %s", class->key, class->name); | 3239 | printk("\nacquire class [%p] %s", class->key, class->name); |
3237 | if (class->name_version > 1) | 3240 | if (class->name_version > 1) |
3238 | printk("#%d", class->name_version); | 3241 | printk(KERN_CONT "#%d", class->name_version); |
3239 | printk("\n"); | 3242 | printk(KERN_CONT "\n"); |
3240 | dump_stack(); | 3243 | dump_stack(); |
3241 | } | 3244 | } |
3242 | 3245 | ||
@@ -3378,7 +3381,7 @@ print_unlock_imbalance_bug(struct task_struct *curr, struct lockdep_map *lock, | |||
3378 | printk("%s/%d is trying to release lock (", | 3381 | printk("%s/%d is trying to release lock (", |
3379 | curr->comm, task_pid_nr(curr)); | 3382 | curr->comm, task_pid_nr(curr)); |
3380 | print_lockdep_cache(lock); | 3383 | print_lockdep_cache(lock); |
3381 | printk(") at:\n"); | 3384 | printk(KERN_CONT ") at:\n"); |
3382 | print_ip_sym(ip); | 3385 | print_ip_sym(ip); |
3383 | printk("but there are no more locks to release!\n"); | 3386 | printk("but there are no more locks to release!\n"); |
3384 | printk("\nother info that might help us debug this:\n"); | 3387 | printk("\nother info that might help us debug this:\n"); |
@@ -3871,7 +3874,7 @@ print_lock_contention_bug(struct task_struct *curr, struct lockdep_map *lock, | |||
3871 | printk("%s/%d is trying to contend lock (", | 3874 | printk("%s/%d is trying to contend lock (", |
3872 | curr->comm, task_pid_nr(curr)); | 3875 | curr->comm, task_pid_nr(curr)); |
3873 | print_lockdep_cache(lock); | 3876 | print_lockdep_cache(lock); |
3874 | printk(") at:\n"); | 3877 | printk(KERN_CONT ") at:\n"); |
3875 | print_ip_sym(ip); | 3878 | print_ip_sym(ip); |
3876 | printk("but there are no locks held!\n"); | 3879 | printk("but there are no locks held!\n"); |
3877 | printk("\nother info that might help us debug this:\n"); | 3880 | printk("\nother info that might help us debug this:\n"); |
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 1ec0f48962b3..2c49d76f96c3 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c | |||
@@ -65,8 +65,72 @@ static inline void clear_rt_mutex_waiters(struct rt_mutex *lock) | |||
65 | 65 | ||
66 | static void fixup_rt_mutex_waiters(struct rt_mutex *lock) | 66 | static void fixup_rt_mutex_waiters(struct rt_mutex *lock) |
67 | { | 67 | { |
68 | if (!rt_mutex_has_waiters(lock)) | 68 | unsigned long owner, *p = (unsigned long *) &lock->owner; |
69 | clear_rt_mutex_waiters(lock); | 69 | |
70 | if (rt_mutex_has_waiters(lock)) | ||
71 | return; | ||
72 | |||
73 | /* | ||
74 | * The rbtree has no waiters enqueued, now make sure that the | ||
75 | * lock->owner still has the waiters bit set, otherwise the | ||
76 | * following can happen: | ||
77 | * | ||
78 | * CPU 0 CPU 1 CPU2 | ||
79 | * l->owner=T1 | ||
80 | * rt_mutex_lock(l) | ||
81 | * lock(l->lock) | ||
82 | * l->owner = T1 | HAS_WAITERS; | ||
83 | * enqueue(T2) | ||
84 | * boost() | ||
85 | * unlock(l->lock) | ||
86 | * block() | ||
87 | * | ||
88 | * rt_mutex_lock(l) | ||
89 | * lock(l->lock) | ||
90 | * l->owner = T1 | HAS_WAITERS; | ||
91 | * enqueue(T3) | ||
92 | * boost() | ||
93 | * unlock(l->lock) | ||
94 | * block() | ||
95 | * signal(->T2) signal(->T3) | ||
96 | * lock(l->lock) | ||
97 | * dequeue(T2) | ||
98 | * deboost() | ||
99 | * unlock(l->lock) | ||
100 | * lock(l->lock) | ||
101 | * dequeue(T3) | ||
102 | * ==> wait list is empty | ||
103 | * deboost() | ||
104 | * unlock(l->lock) | ||
105 | * lock(l->lock) | ||
106 | * fixup_rt_mutex_waiters() | ||
107 | * if (wait_list_empty(l) { | ||
108 | * l->owner = owner | ||
109 | * owner = l->owner & ~HAS_WAITERS; | ||
110 | * ==> l->owner = T1 | ||
111 | * } | ||
112 | * lock(l->lock) | ||
113 | * rt_mutex_unlock(l) fixup_rt_mutex_waiters() | ||
114 | * if (wait_list_empty(l) { | ||
115 | * owner = l->owner & ~HAS_WAITERS; | ||
116 | * cmpxchg(l->owner, T1, NULL) | ||
117 | * ===> Success (l->owner = NULL) | ||
118 | * | ||
119 | * l->owner = owner | ||
120 | * ==> l->owner = T1 | ||
121 | * } | ||
122 | * | ||
123 | * With the check for the waiter bit in place T3 on CPU2 will not | ||
124 | * overwrite. All tasks fiddling with the waiters bit are | ||
125 | * serialized by l->lock, so nothing else can modify the waiters | ||
126 | * bit. If the bit is set then nothing can change l->owner either | ||
127 | * so the simple RMW is safe. The cmpxchg() will simply fail if it | ||
128 | * happens in the middle of the RMW because the waiters bit is | ||
129 | * still set. | ||
130 | */ | ||
131 | owner = READ_ONCE(*p); | ||
132 | if (owner & RT_MUTEX_HAS_WAITERS) | ||
133 | WRITE_ONCE(*p, owner & ~RT_MUTEX_HAS_WAITERS); | ||
70 | } | 134 | } |
71 | 135 | ||
72 | /* | 136 | /* |
diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h index 4f5f83c7d2d3..e317e1cbb3eb 100644 --- a/kernel/locking/rtmutex_common.h +++ b/kernel/locking/rtmutex_common.h | |||
@@ -75,8 +75,9 @@ task_top_pi_waiter(struct task_struct *p) | |||
75 | 75 | ||
76 | static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock) | 76 | static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock) |
77 | { | 77 | { |
78 | return (struct task_struct *) | 78 | unsigned long owner = (unsigned long) READ_ONCE(lock->owner); |
79 | ((unsigned long)lock->owner & ~RT_MUTEX_OWNER_MASKALL); | 79 | |
80 | return (struct task_struct *) (owner & ~RT_MUTEX_OWNER_MASKALL); | ||
80 | } | 81 | } |
81 | 82 | ||
82 | /* | 83 | /* |
diff --git a/kernel/sched/auto_group.c b/kernel/sched/auto_group.c index f1c8fd566246..da39489d2d80 100644 --- a/kernel/sched/auto_group.c +++ b/kernel/sched/auto_group.c | |||
@@ -212,6 +212,7 @@ int proc_sched_autogroup_set_nice(struct task_struct *p, int nice) | |||
212 | { | 212 | { |
213 | static unsigned long next = INITIAL_JIFFIES; | 213 | static unsigned long next = INITIAL_JIFFIES; |
214 | struct autogroup *ag; | 214 | struct autogroup *ag; |
215 | unsigned long shares; | ||
215 | int err; | 216 | int err; |
216 | 217 | ||
217 | if (nice < MIN_NICE || nice > MAX_NICE) | 218 | if (nice < MIN_NICE || nice > MAX_NICE) |
@@ -230,9 +231,10 @@ int proc_sched_autogroup_set_nice(struct task_struct *p, int nice) | |||
230 | 231 | ||
231 | next = HZ / 10 + jiffies; | 232 | next = HZ / 10 + jiffies; |
232 | ag = autogroup_task_get(p); | 233 | ag = autogroup_task_get(p); |
234 | shares = scale_load(sched_prio_to_weight[nice + 20]); | ||
233 | 235 | ||
234 | down_write(&ag->lock); | 236 | down_write(&ag->lock); |
235 | err = sched_group_set_shares(ag->tg, sched_prio_to_weight[nice + 20]); | 237 | err = sched_group_set_shares(ag->tg, shares); |
236 | if (!err) | 238 | if (!err) |
237 | ag->nice = nice; | 239 | ag->nice = nice; |
238 | up_write(&ag->lock); | 240 | up_write(&ag->lock); |
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index 872a15a2a637..f3a217ea0388 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c | |||
@@ -980,23 +980,23 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask) | |||
980 | #ifndef CONFIG_PROVE_LOCKING | 980 | #ifndef CONFIG_PROVE_LOCKING |
981 | if (expected == FAILURE && debug_locks) { | 981 | if (expected == FAILURE && debug_locks) { |
982 | expected_testcase_failures++; | 982 | expected_testcase_failures++; |
983 | printk("failed|"); | 983 | pr_cont("failed|"); |
984 | } | 984 | } |
985 | else | 985 | else |
986 | #endif | 986 | #endif |
987 | if (debug_locks != expected) { | 987 | if (debug_locks != expected) { |
988 | unexpected_testcase_failures++; | 988 | unexpected_testcase_failures++; |
989 | printk("FAILED|"); | 989 | pr_cont("FAILED|"); |
990 | 990 | ||
991 | dump_stack(); | 991 | dump_stack(); |
992 | } else { | 992 | } else { |
993 | testcase_successes++; | 993 | testcase_successes++; |
994 | printk(" ok |"); | 994 | pr_cont(" ok |"); |
995 | } | 995 | } |
996 | testcase_total++; | 996 | testcase_total++; |
997 | 997 | ||
998 | if (debug_locks_verbose) | 998 | if (debug_locks_verbose) |
999 | printk(" lockclass mask: %x, debug_locks: %d, expected: %d\n", | 999 | pr_cont(" lockclass mask: %x, debug_locks: %d, expected: %d\n", |
1000 | lockclass_mask, debug_locks, expected); | 1000 | lockclass_mask, debug_locks, expected); |
1001 | /* | 1001 | /* |
1002 | * Some tests (e.g. double-unlock) might corrupt the preemption | 1002 | * Some tests (e.g. double-unlock) might corrupt the preemption |
@@ -1021,26 +1021,26 @@ static inline void print_testname(const char *testname) | |||
1021 | #define DO_TESTCASE_1(desc, name, nr) \ | 1021 | #define DO_TESTCASE_1(desc, name, nr) \ |
1022 | print_testname(desc"/"#nr); \ | 1022 | print_testname(desc"/"#nr); \ |
1023 | dotest(name##_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ | 1023 | dotest(name##_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ |
1024 | printk("\n"); | 1024 | pr_cont("\n"); |
1025 | 1025 | ||
1026 | #define DO_TESTCASE_1B(desc, name, nr) \ | 1026 | #define DO_TESTCASE_1B(desc, name, nr) \ |
1027 | print_testname(desc"/"#nr); \ | 1027 | print_testname(desc"/"#nr); \ |
1028 | dotest(name##_##nr, FAILURE, LOCKTYPE_RWLOCK); \ | 1028 | dotest(name##_##nr, FAILURE, LOCKTYPE_RWLOCK); \ |
1029 | printk("\n"); | 1029 | pr_cont("\n"); |
1030 | 1030 | ||
1031 | #define DO_TESTCASE_3(desc, name, nr) \ | 1031 | #define DO_TESTCASE_3(desc, name, nr) \ |
1032 | print_testname(desc"/"#nr); \ | 1032 | print_testname(desc"/"#nr); \ |
1033 | dotest(name##_spin_##nr, FAILURE, LOCKTYPE_SPIN); \ | 1033 | dotest(name##_spin_##nr, FAILURE, LOCKTYPE_SPIN); \ |
1034 | dotest(name##_wlock_##nr, FAILURE, LOCKTYPE_RWLOCK); \ | 1034 | dotest(name##_wlock_##nr, FAILURE, LOCKTYPE_RWLOCK); \ |
1035 | dotest(name##_rlock_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ | 1035 | dotest(name##_rlock_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ |
1036 | printk("\n"); | 1036 | pr_cont("\n"); |
1037 | 1037 | ||
1038 | #define DO_TESTCASE_3RW(desc, name, nr) \ | 1038 | #define DO_TESTCASE_3RW(desc, name, nr) \ |
1039 | print_testname(desc"/"#nr); \ | 1039 | print_testname(desc"/"#nr); \ |
1040 | dotest(name##_spin_##nr, FAILURE, LOCKTYPE_SPIN|LOCKTYPE_RWLOCK);\ | 1040 | dotest(name##_spin_##nr, FAILURE, LOCKTYPE_SPIN|LOCKTYPE_RWLOCK);\ |
1041 | dotest(name##_wlock_##nr, FAILURE, LOCKTYPE_RWLOCK); \ | 1041 | dotest(name##_wlock_##nr, FAILURE, LOCKTYPE_RWLOCK); \ |
1042 | dotest(name##_rlock_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ | 1042 | dotest(name##_rlock_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ |
1043 | printk("\n"); | 1043 | pr_cont("\n"); |
1044 | 1044 | ||
1045 | #define DO_TESTCASE_6(desc, name) \ | 1045 | #define DO_TESTCASE_6(desc, name) \ |
1046 | print_testname(desc); \ | 1046 | print_testname(desc); \ |
@@ -1050,7 +1050,7 @@ static inline void print_testname(const char *testname) | |||
1050 | dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX); \ | 1050 | dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX); \ |
1051 | dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM); \ | 1051 | dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM); \ |
1052 | dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM); \ | 1052 | dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM); \ |
1053 | printk("\n"); | 1053 | pr_cont("\n"); |
1054 | 1054 | ||
1055 | #define DO_TESTCASE_6_SUCCESS(desc, name) \ | 1055 | #define DO_TESTCASE_6_SUCCESS(desc, name) \ |
1056 | print_testname(desc); \ | 1056 | print_testname(desc); \ |
@@ -1060,7 +1060,7 @@ static inline void print_testname(const char *testname) | |||
1060 | dotest(name##_mutex, SUCCESS, LOCKTYPE_MUTEX); \ | 1060 | dotest(name##_mutex, SUCCESS, LOCKTYPE_MUTEX); \ |
1061 | dotest(name##_wsem, SUCCESS, LOCKTYPE_RWSEM); \ | 1061 | dotest(name##_wsem, SUCCESS, LOCKTYPE_RWSEM); \ |
1062 | dotest(name##_rsem, SUCCESS, LOCKTYPE_RWSEM); \ | 1062 | dotest(name##_rsem, SUCCESS, LOCKTYPE_RWSEM); \ |
1063 | printk("\n"); | 1063 | pr_cont("\n"); |
1064 | 1064 | ||
1065 | /* | 1065 | /* |
1066 | * 'read' variant: rlocks must not trigger. | 1066 | * 'read' variant: rlocks must not trigger. |
@@ -1073,7 +1073,7 @@ static inline void print_testname(const char *testname) | |||
1073 | dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX); \ | 1073 | dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX); \ |
1074 | dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM); \ | 1074 | dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM); \ |
1075 | dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM); \ | 1075 | dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM); \ |
1076 | printk("\n"); | 1076 | pr_cont("\n"); |
1077 | 1077 | ||
1078 | #define DO_TESTCASE_2I(desc, name, nr) \ | 1078 | #define DO_TESTCASE_2I(desc, name, nr) \ |
1079 | DO_TESTCASE_1("hard-"desc, name##_hard, nr); \ | 1079 | DO_TESTCASE_1("hard-"desc, name##_hard, nr); \ |
@@ -1726,25 +1726,25 @@ static void ww_tests(void) | |||
1726 | dotest(ww_test_fail_acquire, SUCCESS, LOCKTYPE_WW); | 1726 | dotest(ww_test_fail_acquire, SUCCESS, LOCKTYPE_WW); |
1727 | dotest(ww_test_normal, SUCCESS, LOCKTYPE_WW); | 1727 | dotest(ww_test_normal, SUCCESS, LOCKTYPE_WW); |
1728 | dotest(ww_test_unneeded_slow, FAILURE, LOCKTYPE_WW); | 1728 | dotest(ww_test_unneeded_slow, FAILURE, LOCKTYPE_WW); |
1729 | printk("\n"); | 1729 | pr_cont("\n"); |
1730 | 1730 | ||
1731 | print_testname("ww contexts mixing"); | 1731 | print_testname("ww contexts mixing"); |
1732 | dotest(ww_test_two_contexts, FAILURE, LOCKTYPE_WW); | 1732 | dotest(ww_test_two_contexts, FAILURE, LOCKTYPE_WW); |
1733 | dotest(ww_test_diff_class, FAILURE, LOCKTYPE_WW); | 1733 | dotest(ww_test_diff_class, FAILURE, LOCKTYPE_WW); |
1734 | printk("\n"); | 1734 | pr_cont("\n"); |
1735 | 1735 | ||
1736 | print_testname("finishing ww context"); | 1736 | print_testname("finishing ww context"); |
1737 | dotest(ww_test_context_done_twice, FAILURE, LOCKTYPE_WW); | 1737 | dotest(ww_test_context_done_twice, FAILURE, LOCKTYPE_WW); |
1738 | dotest(ww_test_context_unlock_twice, FAILURE, LOCKTYPE_WW); | 1738 | dotest(ww_test_context_unlock_twice, FAILURE, LOCKTYPE_WW); |
1739 | dotest(ww_test_context_fini_early, FAILURE, LOCKTYPE_WW); | 1739 | dotest(ww_test_context_fini_early, FAILURE, LOCKTYPE_WW); |
1740 | dotest(ww_test_context_lock_after_done, FAILURE, LOCKTYPE_WW); | 1740 | dotest(ww_test_context_lock_after_done, FAILURE, LOCKTYPE_WW); |
1741 | printk("\n"); | 1741 | pr_cont("\n"); |
1742 | 1742 | ||
1743 | print_testname("locking mismatches"); | 1743 | print_testname("locking mismatches"); |
1744 | dotest(ww_test_object_unlock_twice, FAILURE, LOCKTYPE_WW); | 1744 | dotest(ww_test_object_unlock_twice, FAILURE, LOCKTYPE_WW); |
1745 | dotest(ww_test_object_lock_unbalanced, FAILURE, LOCKTYPE_WW); | 1745 | dotest(ww_test_object_lock_unbalanced, FAILURE, LOCKTYPE_WW); |
1746 | dotest(ww_test_object_lock_stale_context, FAILURE, LOCKTYPE_WW); | 1746 | dotest(ww_test_object_lock_stale_context, FAILURE, LOCKTYPE_WW); |
1747 | printk("\n"); | 1747 | pr_cont("\n"); |
1748 | 1748 | ||
1749 | print_testname("EDEADLK handling"); | 1749 | print_testname("EDEADLK handling"); |
1750 | dotest(ww_test_edeadlk_normal, SUCCESS, LOCKTYPE_WW); | 1750 | dotest(ww_test_edeadlk_normal, SUCCESS, LOCKTYPE_WW); |
@@ -1757,11 +1757,11 @@ static void ww_tests(void) | |||
1757 | dotest(ww_test_edeadlk_acquire_more_edeadlk_slow, FAILURE, LOCKTYPE_WW); | 1757 | dotest(ww_test_edeadlk_acquire_more_edeadlk_slow, FAILURE, LOCKTYPE_WW); |
1758 | dotest(ww_test_edeadlk_acquire_wrong, FAILURE, LOCKTYPE_WW); | 1758 | dotest(ww_test_edeadlk_acquire_wrong, FAILURE, LOCKTYPE_WW); |
1759 | dotest(ww_test_edeadlk_acquire_wrong_slow, FAILURE, LOCKTYPE_WW); | 1759 | dotest(ww_test_edeadlk_acquire_wrong_slow, FAILURE, LOCKTYPE_WW); |
1760 | printk("\n"); | 1760 | pr_cont("\n"); |
1761 | 1761 | ||
1762 | print_testname("spinlock nest unlocked"); | 1762 | print_testname("spinlock nest unlocked"); |
1763 | dotest(ww_test_spin_nest_unlocked, FAILURE, LOCKTYPE_WW); | 1763 | dotest(ww_test_spin_nest_unlocked, FAILURE, LOCKTYPE_WW); |
1764 | printk("\n"); | 1764 | pr_cont("\n"); |
1765 | 1765 | ||
1766 | printk(" -----------------------------------------------------\n"); | 1766 | printk(" -----------------------------------------------------\n"); |
1767 | printk(" |block | try |context|\n"); | 1767 | printk(" |block | try |context|\n"); |
@@ -1771,25 +1771,25 @@ static void ww_tests(void) | |||
1771 | dotest(ww_test_context_block, FAILURE, LOCKTYPE_WW); | 1771 | dotest(ww_test_context_block, FAILURE, LOCKTYPE_WW); |
1772 | dotest(ww_test_context_try, SUCCESS, LOCKTYPE_WW); | 1772 | dotest(ww_test_context_try, SUCCESS, LOCKTYPE_WW); |
1773 | dotest(ww_test_context_context, SUCCESS, LOCKTYPE_WW); | 1773 | dotest(ww_test_context_context, SUCCESS, LOCKTYPE_WW); |
1774 | printk("\n"); | 1774 | pr_cont("\n"); |
1775 | 1775 | ||
1776 | print_testname("try"); | 1776 | print_testname("try"); |
1777 | dotest(ww_test_try_block, FAILURE, LOCKTYPE_WW); | 1777 | dotest(ww_test_try_block, FAILURE, LOCKTYPE_WW); |
1778 | dotest(ww_test_try_try, SUCCESS, LOCKTYPE_WW); | 1778 | dotest(ww_test_try_try, SUCCESS, LOCKTYPE_WW); |
1779 | dotest(ww_test_try_context, FAILURE, LOCKTYPE_WW); | 1779 | dotest(ww_test_try_context, FAILURE, LOCKTYPE_WW); |
1780 | printk("\n"); | 1780 | pr_cont("\n"); |
1781 | 1781 | ||
1782 | print_testname("block"); | 1782 | print_testname("block"); |
1783 | dotest(ww_test_block_block, FAILURE, LOCKTYPE_WW); | 1783 | dotest(ww_test_block_block, FAILURE, LOCKTYPE_WW); |
1784 | dotest(ww_test_block_try, SUCCESS, LOCKTYPE_WW); | 1784 | dotest(ww_test_block_try, SUCCESS, LOCKTYPE_WW); |
1785 | dotest(ww_test_block_context, FAILURE, LOCKTYPE_WW); | 1785 | dotest(ww_test_block_context, FAILURE, LOCKTYPE_WW); |
1786 | printk("\n"); | 1786 | pr_cont("\n"); |
1787 | 1787 | ||
1788 | print_testname("spinlock"); | 1788 | print_testname("spinlock"); |
1789 | dotest(ww_test_spin_block, FAILURE, LOCKTYPE_WW); | 1789 | dotest(ww_test_spin_block, FAILURE, LOCKTYPE_WW); |
1790 | dotest(ww_test_spin_try, SUCCESS, LOCKTYPE_WW); | 1790 | dotest(ww_test_spin_try, SUCCESS, LOCKTYPE_WW); |
1791 | dotest(ww_test_spin_context, FAILURE, LOCKTYPE_WW); | 1791 | dotest(ww_test_spin_context, FAILURE, LOCKTYPE_WW); |
1792 | printk("\n"); | 1792 | pr_cont("\n"); |
1793 | } | 1793 | } |
1794 | 1794 | ||
1795 | void locking_selftest(void) | 1795 | void locking_selftest(void) |
@@ -1829,32 +1829,32 @@ void locking_selftest(void) | |||
1829 | 1829 | ||
1830 | printk(" --------------------------------------------------------------------------\n"); | 1830 | printk(" --------------------------------------------------------------------------\n"); |
1831 | print_testname("recursive read-lock"); | 1831 | print_testname("recursive read-lock"); |
1832 | printk(" |"); | 1832 | pr_cont(" |"); |
1833 | dotest(rlock_AA1, SUCCESS, LOCKTYPE_RWLOCK); | 1833 | dotest(rlock_AA1, SUCCESS, LOCKTYPE_RWLOCK); |
1834 | printk(" |"); | 1834 | pr_cont(" |"); |
1835 | dotest(rsem_AA1, FAILURE, LOCKTYPE_RWSEM); | 1835 | dotest(rsem_AA1, FAILURE, LOCKTYPE_RWSEM); |
1836 | printk("\n"); | 1836 | pr_cont("\n"); |
1837 | 1837 | ||
1838 | print_testname("recursive read-lock #2"); | 1838 | print_testname("recursive read-lock #2"); |
1839 | printk(" |"); | 1839 | pr_cont(" |"); |
1840 | dotest(rlock_AA1B, SUCCESS, LOCKTYPE_RWLOCK); | 1840 | dotest(rlock_AA1B, SUCCESS, LOCKTYPE_RWLOCK); |
1841 | printk(" |"); | 1841 | pr_cont(" |"); |
1842 | dotest(rsem_AA1B, FAILURE, LOCKTYPE_RWSEM); | 1842 | dotest(rsem_AA1B, FAILURE, LOCKTYPE_RWSEM); |
1843 | printk("\n"); | 1843 | pr_cont("\n"); |
1844 | 1844 | ||
1845 | print_testname("mixed read-write-lock"); | 1845 | print_testname("mixed read-write-lock"); |
1846 | printk(" |"); | 1846 | pr_cont(" |"); |
1847 | dotest(rlock_AA2, FAILURE, LOCKTYPE_RWLOCK); | 1847 | dotest(rlock_AA2, FAILURE, LOCKTYPE_RWLOCK); |
1848 | printk(" |"); | 1848 | pr_cont(" |"); |
1849 | dotest(rsem_AA2, FAILURE, LOCKTYPE_RWSEM); | 1849 | dotest(rsem_AA2, FAILURE, LOCKTYPE_RWSEM); |
1850 | printk("\n"); | 1850 | pr_cont("\n"); |
1851 | 1851 | ||
1852 | print_testname("mixed write-read-lock"); | 1852 | print_testname("mixed write-read-lock"); |
1853 | printk(" |"); | 1853 | pr_cont(" |"); |
1854 | dotest(rlock_AA3, FAILURE, LOCKTYPE_RWLOCK); | 1854 | dotest(rlock_AA3, FAILURE, LOCKTYPE_RWLOCK); |
1855 | printk(" |"); | 1855 | pr_cont(" |"); |
1856 | dotest(rsem_AA3, FAILURE, LOCKTYPE_RWSEM); | 1856 | dotest(rsem_AA3, FAILURE, LOCKTYPE_RWSEM); |
1857 | printk("\n"); | 1857 | pr_cont("\n"); |
1858 | 1858 | ||
1859 | printk(" --------------------------------------------------------------------------\n"); | 1859 | printk(" --------------------------------------------------------------------------\n"); |
1860 | 1860 | ||
diff --git a/net/can/raw.c b/net/can/raw.c index 972c187d40ab..b075f028d7e2 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -499,6 +499,9 @@ static int raw_setsockopt(struct socket *sock, int level, int optname, | |||
499 | if (optlen % sizeof(struct can_filter) != 0) | 499 | if (optlen % sizeof(struct can_filter) != 0) |
500 | return -EINVAL; | 500 | return -EINVAL; |
501 | 501 | ||
502 | if (optlen > CAN_RAW_FILTER_MAX * sizeof(struct can_filter)) | ||
503 | return -EINVAL; | ||
504 | |||
502 | count = optlen / sizeof(struct can_filter); | 505 | count = optlen / sizeof(struct can_filter); |
503 | 506 | ||
504 | if (count > 1) { | 507 | if (count > 1) { |
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c index b63a31be1218..5e0dea2cdc01 100644 --- a/tools/objtool/arch/x86/decode.c +++ b/tools/objtool/arch/x86/decode.c | |||
@@ -99,7 +99,7 @@ int arch_decode_instruction(struct elf *elf, struct section *sec, | |||
99 | break; | 99 | break; |
100 | 100 | ||
101 | case 0x8d: | 101 | case 0x8d: |
102 | if (insn.rex_prefix.bytes && | 102 | if (insn.rex_prefix.nbytes && |
103 | insn.rex_prefix.bytes[0] == 0x48 && | 103 | insn.rex_prefix.bytes[0] == 0x48 && |
104 | insn.modrm.nbytes && insn.modrm.bytes[0] == 0x2c && | 104 | insn.modrm.nbytes && insn.modrm.bytes[0] == 0x2c && |
105 | insn.sib.nbytes && insn.sib.bytes[0] == 0x24) | 105 | insn.sib.nbytes && insn.sib.bytes[0] == 0x24) |
diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild index 582db95127ed..405212be044a 100644 --- a/tools/testing/nvdimm/Kbuild +++ b/tools/testing/nvdimm/Kbuild | |||
@@ -14,6 +14,7 @@ ldflags-y += --wrap=devm_memremap_pages | |||
14 | ldflags-y += --wrap=insert_resource | 14 | ldflags-y += --wrap=insert_resource |
15 | ldflags-y += --wrap=remove_resource | 15 | ldflags-y += --wrap=remove_resource |
16 | ldflags-y += --wrap=acpi_evaluate_object | 16 | ldflags-y += --wrap=acpi_evaluate_object |
17 | ldflags-y += --wrap=acpi_evaluate_dsm | ||
17 | 18 | ||
18 | DRIVERS := ../../../drivers | 19 | DRIVERS := ../../../drivers |
19 | NVDIMM_SRC := $(DRIVERS)/nvdimm | 20 | NVDIMM_SRC := $(DRIVERS)/nvdimm |
diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c index 3ccef732fce9..64cae1a5deff 100644 --- a/tools/testing/nvdimm/test/iomap.c +++ b/tools/testing/nvdimm/test/iomap.c | |||
@@ -26,14 +26,17 @@ static LIST_HEAD(iomap_head); | |||
26 | 26 | ||
27 | static struct iomap_ops { | 27 | static struct iomap_ops { |
28 | nfit_test_lookup_fn nfit_test_lookup; | 28 | nfit_test_lookup_fn nfit_test_lookup; |
29 | nfit_test_evaluate_dsm_fn evaluate_dsm; | ||
29 | struct list_head list; | 30 | struct list_head list; |
30 | } iomap_ops = { | 31 | } iomap_ops = { |
31 | .list = LIST_HEAD_INIT(iomap_ops.list), | 32 | .list = LIST_HEAD_INIT(iomap_ops.list), |
32 | }; | 33 | }; |
33 | 34 | ||
34 | void nfit_test_setup(nfit_test_lookup_fn lookup) | 35 | void nfit_test_setup(nfit_test_lookup_fn lookup, |
36 | nfit_test_evaluate_dsm_fn evaluate) | ||
35 | { | 37 | { |
36 | iomap_ops.nfit_test_lookup = lookup; | 38 | iomap_ops.nfit_test_lookup = lookup; |
39 | iomap_ops.evaluate_dsm = evaluate; | ||
37 | list_add_rcu(&iomap_ops.list, &iomap_head); | 40 | list_add_rcu(&iomap_ops.list, &iomap_head); |
38 | } | 41 | } |
39 | EXPORT_SYMBOL(nfit_test_setup); | 42 | EXPORT_SYMBOL(nfit_test_setup); |
@@ -367,4 +370,22 @@ acpi_status __wrap_acpi_evaluate_object(acpi_handle handle, acpi_string path, | |||
367 | } | 370 | } |
368 | EXPORT_SYMBOL(__wrap_acpi_evaluate_object); | 371 | EXPORT_SYMBOL(__wrap_acpi_evaluate_object); |
369 | 372 | ||
373 | union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, | ||
374 | u64 rev, u64 func, union acpi_object *argv4) | ||
375 | { | ||
376 | union acpi_object *obj = ERR_PTR(-ENXIO); | ||
377 | struct iomap_ops *ops; | ||
378 | |||
379 | rcu_read_lock(); | ||
380 | ops = list_first_or_null_rcu(&iomap_head, typeof(*ops), list); | ||
381 | if (ops) | ||
382 | obj = ops->evaluate_dsm(handle, uuid, rev, func, argv4); | ||
383 | rcu_read_unlock(); | ||
384 | |||
385 | if (IS_ERR(obj)) | ||
386 | return acpi_evaluate_dsm(handle, uuid, rev, func, argv4); | ||
387 | return obj; | ||
388 | } | ||
389 | EXPORT_SYMBOL(__wrap_acpi_evaluate_dsm); | ||
390 | |||
370 | MODULE_LICENSE("GPL v2"); | 391 | MODULE_LICENSE("GPL v2"); |
diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c index c9a6458cb63e..71620fa95953 100644 --- a/tools/testing/nvdimm/test/nfit.c +++ b/tools/testing/nvdimm/test/nfit.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/sizes.h> | 23 | #include <linux/sizes.h> |
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <nd-core.h> | ||
26 | #include <nfit.h> | 27 | #include <nfit.h> |
27 | #include <nd.h> | 28 | #include <nd.h> |
28 | #include "nfit_test.h" | 29 | #include "nfit_test.h" |
@@ -1506,6 +1507,225 @@ static int nfit_test_blk_do_io(struct nd_blk_region *ndbr, resource_size_t dpa, | |||
1506 | return 0; | 1507 | return 0; |
1507 | } | 1508 | } |
1508 | 1509 | ||
1510 | static unsigned long nfit_ctl_handle; | ||
1511 | |||
1512 | union acpi_object *result; | ||
1513 | |||
1514 | static union acpi_object *nfit_test_evaluate_dsm(acpi_handle handle, | ||
1515 | const u8 *uuid, u64 rev, u64 func, union acpi_object *argv4) | ||
1516 | { | ||
1517 | if (handle != &nfit_ctl_handle) | ||
1518 | return ERR_PTR(-ENXIO); | ||
1519 | |||
1520 | return result; | ||
1521 | } | ||
1522 | |||
1523 | static int setup_result(void *buf, size_t size) | ||
1524 | { | ||
1525 | result = kmalloc(sizeof(union acpi_object) + size, GFP_KERNEL); | ||
1526 | if (!result) | ||
1527 | return -ENOMEM; | ||
1528 | result->package.type = ACPI_TYPE_BUFFER, | ||
1529 | result->buffer.pointer = (void *) (result + 1); | ||
1530 | result->buffer.length = size; | ||
1531 | memcpy(result->buffer.pointer, buf, size); | ||
1532 | memset(buf, 0, size); | ||
1533 | return 0; | ||
1534 | } | ||
1535 | |||
1536 | static int nfit_ctl_test(struct device *dev) | ||
1537 | { | ||
1538 | int rc, cmd_rc; | ||
1539 | struct nvdimm *nvdimm; | ||
1540 | struct acpi_device *adev; | ||
1541 | struct nfit_mem *nfit_mem; | ||
1542 | struct nd_ars_record *record; | ||
1543 | struct acpi_nfit_desc *acpi_desc; | ||
1544 | const u64 test_val = 0x0123456789abcdefULL; | ||
1545 | unsigned long mask, cmd_size, offset; | ||
1546 | union { | ||
1547 | struct nd_cmd_get_config_size cfg_size; | ||
1548 | struct nd_cmd_ars_status ars_stat; | ||
1549 | struct nd_cmd_ars_cap ars_cap; | ||
1550 | char buf[sizeof(struct nd_cmd_ars_status) | ||
1551 | + sizeof(struct nd_ars_record)]; | ||
1552 | } cmds; | ||
1553 | |||
1554 | adev = devm_kzalloc(dev, sizeof(*adev), GFP_KERNEL); | ||
1555 | if (!adev) | ||
1556 | return -ENOMEM; | ||
1557 | *adev = (struct acpi_device) { | ||
1558 | .handle = &nfit_ctl_handle, | ||
1559 | .dev = { | ||
1560 | .init_name = "test-adev", | ||
1561 | }, | ||
1562 | }; | ||
1563 | |||
1564 | acpi_desc = devm_kzalloc(dev, sizeof(*acpi_desc), GFP_KERNEL); | ||
1565 | if (!acpi_desc) | ||
1566 | return -ENOMEM; | ||
1567 | *acpi_desc = (struct acpi_nfit_desc) { | ||
1568 | .nd_desc = { | ||
1569 | .cmd_mask = 1UL << ND_CMD_ARS_CAP | ||
1570 | | 1UL << ND_CMD_ARS_START | ||
1571 | | 1UL << ND_CMD_ARS_STATUS | ||
1572 | | 1UL << ND_CMD_CLEAR_ERROR, | ||
1573 | .module = THIS_MODULE, | ||
1574 | .provider_name = "ACPI.NFIT", | ||
1575 | .ndctl = acpi_nfit_ctl, | ||
1576 | }, | ||
1577 | .dev = &adev->dev, | ||
1578 | }; | ||
1579 | |||
1580 | nfit_mem = devm_kzalloc(dev, sizeof(*nfit_mem), GFP_KERNEL); | ||
1581 | if (!nfit_mem) | ||
1582 | return -ENOMEM; | ||
1583 | |||
1584 | mask = 1UL << ND_CMD_SMART | 1UL << ND_CMD_SMART_THRESHOLD | ||
1585 | | 1UL << ND_CMD_DIMM_FLAGS | 1UL << ND_CMD_GET_CONFIG_SIZE | ||
1586 | | 1UL << ND_CMD_GET_CONFIG_DATA | 1UL << ND_CMD_SET_CONFIG_DATA | ||
1587 | | 1UL << ND_CMD_VENDOR; | ||
1588 | *nfit_mem = (struct nfit_mem) { | ||
1589 | .adev = adev, | ||
1590 | .family = NVDIMM_FAMILY_INTEL, | ||
1591 | .dsm_mask = mask, | ||
1592 | }; | ||
1593 | |||
1594 | nvdimm = devm_kzalloc(dev, sizeof(*nvdimm), GFP_KERNEL); | ||
1595 | if (!nvdimm) | ||
1596 | return -ENOMEM; | ||
1597 | *nvdimm = (struct nvdimm) { | ||
1598 | .provider_data = nfit_mem, | ||
1599 | .cmd_mask = mask, | ||
1600 | .dev = { | ||
1601 | .init_name = "test-dimm", | ||
1602 | }, | ||
1603 | }; | ||
1604 | |||
1605 | |||
1606 | /* basic checkout of a typical 'get config size' command */ | ||
1607 | cmd_size = sizeof(cmds.cfg_size); | ||
1608 | cmds.cfg_size = (struct nd_cmd_get_config_size) { | ||
1609 | .status = 0, | ||
1610 | .config_size = SZ_128K, | ||
1611 | .max_xfer = SZ_4K, | ||
1612 | }; | ||
1613 | rc = setup_result(cmds.buf, cmd_size); | ||
1614 | if (rc) | ||
1615 | return rc; | ||
1616 | rc = acpi_nfit_ctl(&acpi_desc->nd_desc, nvdimm, ND_CMD_GET_CONFIG_SIZE, | ||
1617 | cmds.buf, cmd_size, &cmd_rc); | ||
1618 | |||
1619 | if (rc < 0 || cmd_rc || cmds.cfg_size.status != 0 | ||
1620 | || cmds.cfg_size.config_size != SZ_128K | ||
1621 | || cmds.cfg_size.max_xfer != SZ_4K) { | ||
1622 | dev_dbg(dev, "%s: failed at: %d rc: %d cmd_rc: %d\n", | ||
1623 | __func__, __LINE__, rc, cmd_rc); | ||
1624 | return -EIO; | ||
1625 | } | ||
1626 | |||
1627 | |||
1628 | /* test ars_status with zero output */ | ||
1629 | cmd_size = offsetof(struct nd_cmd_ars_status, address); | ||
1630 | cmds.ars_stat = (struct nd_cmd_ars_status) { | ||
1631 | .out_length = 0, | ||
1632 | }; | ||
1633 | rc = setup_result(cmds.buf, cmd_size); | ||
1634 | if (rc) | ||
1635 | return rc; | ||
1636 | rc = acpi_nfit_ctl(&acpi_desc->nd_desc, NULL, ND_CMD_ARS_STATUS, | ||
1637 | cmds.buf, cmd_size, &cmd_rc); | ||
1638 | |||
1639 | if (rc < 0 || cmd_rc) { | ||
1640 | dev_dbg(dev, "%s: failed at: %d rc: %d cmd_rc: %d\n", | ||
1641 | __func__, __LINE__, rc, cmd_rc); | ||
1642 | return -EIO; | ||
1643 | } | ||
1644 | |||
1645 | |||
1646 | /* test ars_cap with benign extended status */ | ||
1647 | cmd_size = sizeof(cmds.ars_cap); | ||
1648 | cmds.ars_cap = (struct nd_cmd_ars_cap) { | ||
1649 | .status = ND_ARS_PERSISTENT << 16, | ||
1650 | }; | ||
1651 | offset = offsetof(struct nd_cmd_ars_cap, status); | ||
1652 | rc = setup_result(cmds.buf + offset, cmd_size - offset); | ||
1653 | if (rc) | ||
1654 | return rc; | ||
1655 | rc = acpi_nfit_ctl(&acpi_desc->nd_desc, NULL, ND_CMD_ARS_CAP, | ||
1656 | cmds.buf, cmd_size, &cmd_rc); | ||
1657 | |||
1658 | if (rc < 0 || cmd_rc) { | ||
1659 | dev_dbg(dev, "%s: failed at: %d rc: %d cmd_rc: %d\n", | ||
1660 | __func__, __LINE__, rc, cmd_rc); | ||
1661 | return -EIO; | ||
1662 | } | ||
1663 | |||
1664 | |||
1665 | /* test ars_status with 'status' trimmed from 'out_length' */ | ||
1666 | cmd_size = sizeof(cmds.ars_stat) + sizeof(struct nd_ars_record); | ||
1667 | cmds.ars_stat = (struct nd_cmd_ars_status) { | ||
1668 | .out_length = cmd_size - 4, | ||
1669 | }; | ||
1670 | record = &cmds.ars_stat.records[0]; | ||
1671 | *record = (struct nd_ars_record) { | ||
1672 | .length = test_val, | ||
1673 | }; | ||
1674 | rc = setup_result(cmds.buf, cmd_size); | ||
1675 | if (rc) | ||
1676 | return rc; | ||
1677 | rc = acpi_nfit_ctl(&acpi_desc->nd_desc, NULL, ND_CMD_ARS_STATUS, | ||
1678 | cmds.buf, cmd_size, &cmd_rc); | ||
1679 | |||
1680 | if (rc < 0 || cmd_rc || record->length != test_val) { | ||
1681 | dev_dbg(dev, "%s: failed at: %d rc: %d cmd_rc: %d\n", | ||
1682 | __func__, __LINE__, rc, cmd_rc); | ||
1683 | return -EIO; | ||
1684 | } | ||
1685 | |||
1686 | |||
1687 | /* test ars_status with 'Output (Size)' including 'status' */ | ||
1688 | cmd_size = sizeof(cmds.ars_stat) + sizeof(struct nd_ars_record); | ||
1689 | cmds.ars_stat = (struct nd_cmd_ars_status) { | ||
1690 | .out_length = cmd_size, | ||
1691 | }; | ||
1692 | record = &cmds.ars_stat.records[0]; | ||
1693 | *record = (struct nd_ars_record) { | ||
1694 | .length = test_val, | ||
1695 | }; | ||
1696 | rc = setup_result(cmds.buf, cmd_size); | ||
1697 | if (rc) | ||
1698 | return rc; | ||
1699 | rc = acpi_nfit_ctl(&acpi_desc->nd_desc, NULL, ND_CMD_ARS_STATUS, | ||
1700 | cmds.buf, cmd_size, &cmd_rc); | ||
1701 | |||
1702 | if (rc < 0 || cmd_rc || record->length != test_val) { | ||
1703 | dev_dbg(dev, "%s: failed at: %d rc: %d cmd_rc: %d\n", | ||
1704 | __func__, __LINE__, rc, cmd_rc); | ||
1705 | return -EIO; | ||
1706 | } | ||
1707 | |||
1708 | |||
1709 | /* test extended status for get_config_size results in failure */ | ||
1710 | cmd_size = sizeof(cmds.cfg_size); | ||
1711 | cmds.cfg_size = (struct nd_cmd_get_config_size) { | ||
1712 | .status = 1 << 16, | ||
1713 | }; | ||
1714 | rc = setup_result(cmds.buf, cmd_size); | ||
1715 | if (rc) | ||
1716 | return rc; | ||
1717 | rc = acpi_nfit_ctl(&acpi_desc->nd_desc, nvdimm, ND_CMD_GET_CONFIG_SIZE, | ||
1718 | cmds.buf, cmd_size, &cmd_rc); | ||
1719 | |||
1720 | if (rc < 0 || cmd_rc >= 0) { | ||
1721 | dev_dbg(dev, "%s: failed at: %d rc: %d cmd_rc: %d\n", | ||
1722 | __func__, __LINE__, rc, cmd_rc); | ||
1723 | return -EIO; | ||
1724 | } | ||
1725 | |||
1726 | return 0; | ||
1727 | } | ||
1728 | |||
1509 | static int nfit_test_probe(struct platform_device *pdev) | 1729 | static int nfit_test_probe(struct platform_device *pdev) |
1510 | { | 1730 | { |
1511 | struct nvdimm_bus_descriptor *nd_desc; | 1731 | struct nvdimm_bus_descriptor *nd_desc; |
@@ -1516,6 +1736,12 @@ static int nfit_test_probe(struct platform_device *pdev) | |||
1516 | union acpi_object *obj; | 1736 | union acpi_object *obj; |
1517 | int rc; | 1737 | int rc; |
1518 | 1738 | ||
1739 | if (strcmp(dev_name(&pdev->dev), "nfit_test.0") == 0) { | ||
1740 | rc = nfit_ctl_test(&pdev->dev); | ||
1741 | if (rc) | ||
1742 | return rc; | ||
1743 | } | ||
1744 | |||
1519 | nfit_test = to_nfit_test(&pdev->dev); | 1745 | nfit_test = to_nfit_test(&pdev->dev); |
1520 | 1746 | ||
1521 | /* common alloc */ | 1747 | /* common alloc */ |
@@ -1639,11 +1865,13 @@ static __init int nfit_test_init(void) | |||
1639 | { | 1865 | { |
1640 | int rc, i; | 1866 | int rc, i; |
1641 | 1867 | ||
1642 | nfit_test_dimm = class_create(THIS_MODULE, "nfit_test_dimm"); | 1868 | nfit_test_setup(nfit_test_lookup, nfit_test_evaluate_dsm); |
1643 | if (IS_ERR(nfit_test_dimm)) | ||
1644 | return PTR_ERR(nfit_test_dimm); | ||
1645 | 1869 | ||
1646 | nfit_test_setup(nfit_test_lookup); | 1870 | nfit_test_dimm = class_create(THIS_MODULE, "nfit_test_dimm"); |
1871 | if (IS_ERR(nfit_test_dimm)) { | ||
1872 | rc = PTR_ERR(nfit_test_dimm); | ||
1873 | goto err_register; | ||
1874 | } | ||
1647 | 1875 | ||
1648 | for (i = 0; i < NUM_NFITS; i++) { | 1876 | for (i = 0; i < NUM_NFITS; i++) { |
1649 | struct nfit_test *nfit_test; | 1877 | struct nfit_test *nfit_test; |
diff --git a/tools/testing/nvdimm/test/nfit_test.h b/tools/testing/nvdimm/test/nfit_test.h index c281dd2e5e2d..f54c0032c6ff 100644 --- a/tools/testing/nvdimm/test/nfit_test.h +++ b/tools/testing/nvdimm/test/nfit_test.h | |||
@@ -31,11 +31,17 @@ struct nfit_test_resource { | |||
31 | void *buf; | 31 | void *buf; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | union acpi_object; | ||
35 | typedef void *acpi_handle; | ||
36 | |||
34 | typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t); | 37 | typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t); |
38 | typedef union acpi_object *(*nfit_test_evaluate_dsm_fn)(acpi_handle handle, | ||
39 | const u8 *uuid, u64 rev, u64 func, union acpi_object *argv4); | ||
35 | void __iomem *__wrap_ioremap_nocache(resource_size_t offset, | 40 | void __iomem *__wrap_ioremap_nocache(resource_size_t offset, |
36 | unsigned long size); | 41 | unsigned long size); |
37 | void __wrap_iounmap(volatile void __iomem *addr); | 42 | void __wrap_iounmap(volatile void __iomem *addr); |
38 | void nfit_test_setup(nfit_test_lookup_fn lookup); | 43 | void nfit_test_setup(nfit_test_lookup_fn lookup, |
44 | nfit_test_evaluate_dsm_fn evaluate); | ||
39 | void nfit_test_teardown(void); | 45 | void nfit_test_teardown(void); |
40 | struct nfit_test_resource *get_nfit_res(resource_size_t resource); | 46 | struct nfit_test_resource *get_nfit_res(resource_size_t resource); |
41 | #endif | 47 | #endif |