aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/shmparam.h (renamed from include/uapi/asm-generic/shmparam.h)0
-rw-r--r--include/drm/drm_dp_helper.h7
-rw-r--r--include/drm/drm_dp_mst_helper.h3
-rw-r--r--include/dt-bindings/clock/actions,s500-cmu.h78
-rw-r--r--include/dt-bindings/clock/axg-aoclkc.h7
-rw-r--r--include/dt-bindings/clock/exynos5433.h8
-rw-r--r--include/dt-bindings/clock/g12a-aoclkc.h34
-rw-r--r--include/dt-bindings/clock/g12a-clkc.h135
-rw-r--r--include/dt-bindings/clock/gxbb-aoclkc.h7
-rw-r--r--include/dt-bindings/clock/imx5-clock.h3
-rw-r--r--include/dt-bindings/clock/imx8mm-clock.h244
-rw-r--r--include/dt-bindings/clock/imx8mq-clock.h35
-rw-r--r--include/dt-bindings/clock/marvell,mmp2.h2
-rw-r--r--include/dt-bindings/clock/meson8b-clkc.h1
-rw-r--r--include/dt-bindings/clock/qcom,rpmcc.h10
-rw-r--r--include/dt-bindings/clock/qcom,rpmh.h1
-rw-r--r--include/dt-bindings/clock/r8a774a1-cpg-mssr.h1
-rw-r--r--include/dt-bindings/clock/r8a774c0-cpg-mssr.h1
-rw-r--r--include/dt-bindings/clock/stm32mp1-clks.h3
-rw-r--r--include/dt-bindings/reset/amlogic,meson-axg-reset.h3
-rw-r--r--include/dt-bindings/reset/g12a-aoclkc.h18
-rw-r--r--include/keys/request_key_auth-type.h36
-rw-r--r--include/keys/user-type.h2
-rw-r--r--include/kvm/arm_vgic.h6
-rw-r--r--include/linux/backing-dev-defs.h1
-rw-r--r--include/linux/bcma/bcma_soc.h1
-rw-r--r--include/linux/blk_types.h2
-rw-r--r--include/linux/blktrace_api.h8
-rw-r--r--include/linux/bpf_verifier.h1
-rw-r--r--include/linux/bpfilter.h15
-rw-r--r--include/linux/ceph/libceph.h6
-rw-r--r--include/linux/ceph/osd_client.h1
-rw-r--r--include/linux/clk-provider.h3
-rw-r--r--include/linux/clk.h36
-rw-r--r--include/linux/clk/ti.h1
-rw-r--r--include/linux/clkdev.h4
-rw-r--r--include/linux/compiler-clang.h5
-rw-r--r--include/linux/compiler-gcc.h6
-rw-r--r--include/linux/compiler-intel.h4
-rw-r--r--include/linux/compiler.h4
-rw-r--r--include/linux/compiler_attributes.h14
-rw-r--r--include/linux/cpu.h2
-rw-r--r--include/linux/dcache.h7
-rw-r--r--include/linux/dma-mapping.h9
-rw-r--r--include/linux/efi.h7
-rw-r--r--include/linux/fb.h1
-rw-r--r--include/linux/filter.h21
-rw-r--r--include/linux/fs.h9
-rw-r--r--include/linux/hid-debug.h9
-rw-r--r--include/linux/hid.h3
-rw-r--r--include/linux/hyperv.h5
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/if_arp.h1
-rw-r--r--include/linux/interrupt.h1
-rw-r--r--include/linux/irqchip/arm-gic-v3.h2
-rw-r--r--include/linux/key-type.h22
-rw-r--r--include/linux/libnvdimm.h2
-rw-r--r--include/linux/memblock.h3
-rw-r--r--include/linux/memory_hotplug.h18
-rw-r--r--include/linux/mfd/cros_ec_commands.h94
-rw-r--r--include/linux/mfd/ingenic-tcu.h2
-rw-r--r--include/linux/mfd/madera/core.h7
-rw-r--r--include/linux/mfd/ti_am335x_tscadc.h4
-rw-r--r--include/linux/mfd/tmio.h2
-rw-r--r--include/linux/mmc/card.h1
-rw-r--r--include/linux/mmzone.h6
-rw-r--r--include/linux/module.h6
-rw-r--r--include/linux/netdev_features.h24
-rw-r--r--include/linux/netdevice.h8
-rw-r--r--include/linux/of.h1
-rw-r--r--include/linux/pci-dma-compat.h2
-rw-r--r--include/linux/perf_event.h5
-rw-r--r--include/linux/phy.h29
-rw-r--r--include/linux/phy/phy.h1
-rw-r--r--include/linux/pm_opp.h5
-rw-r--r--include/linux/pm_runtime.h2
-rw-r--r--include/linux/qcom_scm.h1
-rw-r--r--include/linux/qed/qed_chain.h31
-rw-r--r--include/linux/reset.h15
-rw-r--r--include/linux/sched.h11
-rw-r--r--include/linux/sched/coredump.h1
-rw-r--r--include/linux/sched/wake_q.h6
-rw-r--r--include/linux/signal.h2
-rw-r--r--include/linux/skbuff.h9
-rw-r--r--include/linux/stmmac.h1
-rw-r--r--include/linux/umh.h2
-rw-r--r--include/linux/virtio_config.h13
-rw-r--r--include/linux/virtio_net.h19
-rw-r--r--include/linux/xarray.h227
-rw-r--r--include/net/af_rxrpc.h16
-rw-r--r--include/net/ax25.h12
-rw-r--r--include/net/inetpeer.h1
-rw-r--r--include/net/ip_fib.h2
-rw-r--r--include/net/l3mdev.h3
-rw-r--r--include/net/netfilter/nf_flow_table.h1
-rw-r--r--include/net/netfilter/nf_tables.h17
-rw-r--r--include/net/phonet/pep.h5
-rw-r--r--include/net/sock.h2
-rw-r--r--include/net/tls.h2
-rw-r--r--include/net/xfrm.h12
-rw-r--r--include/rdma/ib_verbs.h24
-rw-r--r--include/sound/compress_driver.h6
-rw-r--r--include/sound/hda_codec.h1
-rw-r--r--include/sound/soc.h6
-rw-r--r--include/trace/events/afs.h2
-rw-r--r--include/uapi/linux/android/binderfs.h (renamed from include/uapi/linux/android/binder_ctl.h)10
-rw-r--r--include/uapi/linux/audit.h2
-rw-r--r--include/uapi/linux/blkzoned.h1
-rw-r--r--include/uapi/linux/in.h2
-rw-r--r--include/uapi/linux/inet_diag.h16
-rw-r--r--include/uapi/linux/input.h6
-rw-r--r--include/uapi/linux/ptp_clock.h2
-rw-r--r--include/uapi/linux/virtio_config.h6
-rw-r--r--include/uapi/linux/virtio_ring.h10
-rw-r--r--include/uapi/rdma/hns-abi.h5
-rw-r--r--include/uapi/rdma/vmw_pvrdma-abi.h1
-rw-r--r--include/xen/arm/page-coherent.h97
117 files changed, 1331 insertions, 357 deletions
diff --git a/include/uapi/asm-generic/shmparam.h b/include/asm-generic/shmparam.h
index 8b78c0ba08b1..8b78c0ba08b1 100644
--- a/include/uapi/asm-generic/shmparam.h
+++ b/include/asm-generic/shmparam.h
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 5736c942c85b..2d4fc2d33810 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1365,6 +1365,13 @@ enum drm_dp_quirk {
1365 * to 16 bits. So will give a constant value (0x8000) for compatability. 1365 * to 16 bits. So will give a constant value (0x8000) for compatability.
1366 */ 1366 */
1367 DP_DPCD_QUIRK_CONSTANT_N, 1367 DP_DPCD_QUIRK_CONSTANT_N,
1368 /**
1369 * @DP_DPCD_QUIRK_NO_PSR:
1370 *
1371 * The device does not support PSR even if reports that it supports or
1372 * driver still need to implement proper handling for such device.
1373 */
1374 DP_DPCD_QUIRK_NO_PSR,
1368}; 1375};
1369 1376
1370/** 1377/**
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 59f005b419cf..727af08e5ea6 100644
--- a/include/drm/drm_dp_mst_helper.h
+++ b/include/drm/drm_dp_mst_helper.h
@@ -616,7 +616,8 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
616 struct drm_dp_mst_topology_mgr *mgr); 616 struct drm_dp_mst_topology_mgr *mgr);
617 617
618void drm_dp_mst_topology_mgr_suspend(struct drm_dp_mst_topology_mgr *mgr); 618void drm_dp_mst_topology_mgr_suspend(struct drm_dp_mst_topology_mgr *mgr);
619int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr); 619int __must_check
620drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr);
620struct drm_dp_mst_topology_state *drm_atomic_get_mst_topology_state(struct drm_atomic_state *state, 621struct drm_dp_mst_topology_state *drm_atomic_get_mst_topology_state(struct drm_atomic_state *state,
621 struct drm_dp_mst_topology_mgr *mgr); 622 struct drm_dp_mst_topology_mgr *mgr);
622int drm_dp_atomic_find_vcpi_slots(struct drm_atomic_state *state, 623int drm_dp_atomic_find_vcpi_slots(struct drm_atomic_state *state,
diff --git a/include/dt-bindings/clock/actions,s500-cmu.h b/include/dt-bindings/clock/actions,s500-cmu.h
new file mode 100644
index 000000000000..030981cd2d56
--- /dev/null
+++ b/include/dt-bindings/clock/actions,s500-cmu.h
@@ -0,0 +1,78 @@
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Device Tree binding constants for Actions Semi S500 Clock Management Unit
4 *
5 * Copyright (c) 2014 Actions Semi Inc.
6 * Copyright (c) 2018 LSI-TEC - Caninos Loucos
7 */
8
9#ifndef __DT_BINDINGS_CLOCK_S500_CMU_H
10#define __DT_BINDINGS_CLOCK_S500_CMU_H
11
12#define CLK_NONE 0
13
14/* fixed rate clocks */
15#define CLK_LOSC 1
16#define CLK_HOSC 2
17
18/* pll clocks */
19#define CLK_CORE_PLL 3
20#define CLK_DEV_PLL 4
21#define CLK_DDR_PLL 5
22#define CLK_NAND_PLL 6
23#define CLK_DISPLAY_PLL 7
24#define CLK_ETHERNET_PLL 8
25#define CLK_AUDIO_PLL 9
26
27/* system clock */
28#define CLK_DEV 10
29#define CLK_H 11
30#define CLK_AHBPREDIV 12
31#define CLK_AHB 13
32#define CLK_DE 14
33#define CLK_BISP 15
34#define CLK_VCE 16
35#define CLK_VDE 17
36
37/* peripheral device clock */
38#define CLK_TIMER 18
39#define CLK_I2C0 19
40#define CLK_I2C1 20
41#define CLK_I2C2 21
42#define CLK_I2C3 22
43#define CLK_PWM0 23
44#define CLK_PWM1 24
45#define CLK_PWM2 25
46#define CLK_PWM3 26
47#define CLK_PWM4 27
48#define CLK_PWM5 28
49#define CLK_SD0 29
50#define CLK_SD1 30
51#define CLK_SD2 31
52#define CLK_SENSOR0 32
53#define CLK_SENSOR1 33
54#define CLK_SPI0 34
55#define CLK_SPI1 35
56#define CLK_SPI2 36
57#define CLK_SPI3 37
58#define CLK_UART0 38
59#define CLK_UART1 39
60#define CLK_UART2 40
61#define CLK_UART3 41
62#define CLK_UART4 42
63#define CLK_UART5 43
64#define CLK_UART6 44
65#define CLK_DE1 45
66#define CLK_DE2 46
67#define CLK_I2SRX 47
68#define CLK_I2STX 48
69#define CLK_HDMI_AUDIO 49
70#define CLK_HDMI 50
71#define CLK_SPDIF 51
72#define CLK_NAND 52
73#define CLK_ECC 53
74#define CLK_RMII_REF 54
75
76#define CLK_NR_CLKS (CLK_RMII_REF + 1)
77
78#endif /* __DT_BINDINGS_CLOCK_S500_CMU_H */
diff --git a/include/dt-bindings/clock/axg-aoclkc.h b/include/dt-bindings/clock/axg-aoclkc.h
index 61955016a55b..8ec4a269c7a6 100644
--- a/include/dt-bindings/clock/axg-aoclkc.h
+++ b/include/dt-bindings/clock/axg-aoclkc.h
@@ -21,6 +21,11 @@
21#define CLKID_AO_SAR_ADC_SEL 8 21#define CLKID_AO_SAR_ADC_SEL 8
22#define CLKID_AO_SAR_ADC_DIV 9 22#define CLKID_AO_SAR_ADC_DIV 9
23#define CLKID_AO_SAR_ADC_CLK 10 23#define CLKID_AO_SAR_ADC_CLK 10
24#define CLKID_AO_ALT_XTAL 11 24#define CLKID_AO_CTS_OSCIN 11
25#define CLKID_AO_32K_PRE 12
26#define CLKID_AO_32K_DIV 13
27#define CLKID_AO_32K_SEL 14
28#define CLKID_AO_32K 15
29#define CLKID_AO_CTS_RTC_OSCIN 16
25 30
26#endif 31#endif
diff --git a/include/dt-bindings/clock/exynos5433.h b/include/dt-bindings/clock/exynos5433.h
index 98bd85ce1e45..25ffa53573a5 100644
--- a/include/dt-bindings/clock/exynos5433.h
+++ b/include/dt-bindings/clock/exynos5433.h
@@ -156,7 +156,7 @@
156#define CLK_ACLK_G2D_266 220 156#define CLK_ACLK_G2D_266 220
157#define CLK_ACLK_G2D_400 221 157#define CLK_ACLK_G2D_400 221
158#define CLK_ACLK_G3D_400 222 158#define CLK_ACLK_G3D_400 222
159#define CLK_ACLK_IMEM_SSX_266 223 159#define CLK_ACLK_IMEM_SSSX_266 223
160#define CLK_ACLK_BUS0_400 224 160#define CLK_ACLK_BUS0_400 224
161#define CLK_ACLK_BUS1_400 225 161#define CLK_ACLK_BUS1_400 225
162#define CLK_ACLK_IMEM_200 226 162#define CLK_ACLK_IMEM_200 226
@@ -1406,4 +1406,10 @@
1406 1406
1407#define CAM1_NR_CLK 113 1407#define CAM1_NR_CLK 113
1408 1408
1409/* CMU_IMEM */
1410#define CLK_ACLK_SLIMSSS 2
1411#define CLK_PCLK_SLIMSSS 35
1412
1413#define IMEM_NR_CLK 36
1414
1409#endif /* _DT_BINDINGS_CLOCK_EXYNOS5433_H */ 1415#endif /* _DT_BINDINGS_CLOCK_EXYNOS5433_H */
diff --git a/include/dt-bindings/clock/g12a-aoclkc.h b/include/dt-bindings/clock/g12a-aoclkc.h
new file mode 100644
index 000000000000..8db01ffbeb06
--- /dev/null
+++ b/include/dt-bindings/clock/g12a-aoclkc.h
@@ -0,0 +1,34 @@
1/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
2/*
3 * Copyright (c) 2016 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 *
6 * Copyright (c) 2018 Amlogic, inc.
7 * Author: Qiufang Dai <qiufang.dai@amlogic.com>
8 */
9
10#ifndef DT_BINDINGS_CLOCK_AMLOGIC_MESON_G12A_AOCLK
11#define DT_BINDINGS_CLOCK_AMLOGIC_MESON_G12A_AOCLK
12
13#define CLKID_AO_AHB 0
14#define CLKID_AO_IR_IN 1
15#define CLKID_AO_I2C_M0 2
16#define CLKID_AO_I2C_S0 3
17#define CLKID_AO_UART 4
18#define CLKID_AO_PROD_I2C 5
19#define CLKID_AO_UART2 6
20#define CLKID_AO_IR_OUT 7
21#define CLKID_AO_SAR_ADC 8
22#define CLKID_AO_MAILBOX 9
23#define CLKID_AO_M3 10
24#define CLKID_AO_AHB_SRAM 11
25#define CLKID_AO_RTI 12
26#define CLKID_AO_M4_FCLK 13
27#define CLKID_AO_M4_HCLK 14
28#define CLKID_AO_CLK81 15
29#define CLKID_AO_SAR_ADC_CLK 18
30#define CLKID_AO_32K 23
31#define CLKID_AO_CEC 27
32#define CLKID_AO_CTS_RTC_OSCIN 28
33
34#endif
diff --git a/include/dt-bindings/clock/g12a-clkc.h b/include/dt-bindings/clock/g12a-clkc.h
new file mode 100644
index 000000000000..83b657038d1e
--- /dev/null
+++ b/include/dt-bindings/clock/g12a-clkc.h
@@ -0,0 +1,135 @@
1/* SPDX-License-Identifier: GPL-2.0+ OR MIT */
2/*
3 * Meson-G12A clock tree IDs
4 *
5 * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
6 */
7
8#ifndef __G12A_CLKC_H
9#define __G12A_CLKC_H
10
11#define CLKID_SYS_PLL 0
12#define CLKID_FIXED_PLL 1
13#define CLKID_FCLK_DIV2 2
14#define CLKID_FCLK_DIV3 3
15#define CLKID_FCLK_DIV4 4
16#define CLKID_FCLK_DIV5 5
17#define CLKID_FCLK_DIV7 6
18#define CLKID_GP0_PLL 7
19#define CLKID_CLK81 10
20#define CLKID_MPLL0 11
21#define CLKID_MPLL1 12
22#define CLKID_MPLL2 13
23#define CLKID_MPLL3 14
24#define CLKID_DDR 15
25#define CLKID_DOS 16
26#define CLKID_AUDIO_LOCKER 17
27#define CLKID_MIPI_DSI_HOST 18
28#define CLKID_ETH_PHY 19
29#define CLKID_ISA 20
30#define CLKID_PL301 21
31#define CLKID_PERIPHS 22
32#define CLKID_SPICC0 23
33#define CLKID_I2C 24
34#define CLKID_SANA 25
35#define CLKID_SD 26
36#define CLKID_RNG0 27
37#define CLKID_UART0 28
38#define CLKID_SPICC1 29
39#define CLKID_HIU_IFACE 30
40#define CLKID_MIPI_DSI_PHY 31
41#define CLKID_ASSIST_MISC 32
42#define CLKID_SD_EMMC_A 33
43#define CLKID_SD_EMMC_B 34
44#define CLKID_SD_EMMC_C 35
45#define CLKID_AUDIO_CODEC 36
46#define CLKID_AUDIO 37
47#define CLKID_ETH 38
48#define CLKID_DEMUX 39
49#define CLKID_AUDIO_IFIFO 40
50#define CLKID_ADC 41
51#define CLKID_UART1 42
52#define CLKID_G2D 43
53#define CLKID_RESET 44
54#define CLKID_PCIE_COMB 45
55#define CLKID_PARSER 46
56#define CLKID_USB 47
57#define CLKID_PCIE_PHY 48
58#define CLKID_AHB_ARB0 49
59#define CLKID_AHB_DATA_BUS 50
60#define CLKID_AHB_CTRL_BUS 51
61#define CLKID_HTX_HDCP22 52
62#define CLKID_HTX_PCLK 53
63#define CLKID_BT656 54
64#define CLKID_USB1_DDR_BRIDGE 55
65#define CLKID_MMC_PCLK 56
66#define CLKID_UART2 57
67#define CLKID_VPU_INTR 58
68#define CLKID_GIC 59
69#define CLKID_SD_EMMC_A_CLK0 60
70#define CLKID_SD_EMMC_B_CLK0 61
71#define CLKID_SD_EMMC_C_CLK0 62
72#define CLKID_HIFI_PLL 74
73#define CLKID_VCLK2_VENCI0 80
74#define CLKID_VCLK2_VENCI1 81
75#define CLKID_VCLK2_VENCP0 82
76#define CLKID_VCLK2_VENCP1 83
77#define CLKID_VCLK2_VENCT0 84
78#define CLKID_VCLK2_VENCT1 85
79#define CLKID_VCLK2_OTHER 86
80#define CLKID_VCLK2_ENCI 87
81#define CLKID_VCLK2_ENCP 88
82#define CLKID_DAC_CLK 89
83#define CLKID_AOCLK 90
84#define CLKID_IEC958 91
85#define CLKID_ENC480P 92
86#define CLKID_RNG1 93
87#define CLKID_VCLK2_ENCT 94
88#define CLKID_VCLK2_ENCL 95
89#define CLKID_VCLK2_VENCLMMC 96
90#define CLKID_VCLK2_VENCL 97
91#define CLKID_VCLK2_OTHER1 98
92#define CLKID_FCLK_DIV2P5 99
93#define CLKID_DMA 105
94#define CLKID_EFUSE 106
95#define CLKID_ROM_BOOT 107
96#define CLKID_RESET_SEC 108
97#define CLKID_SEC_AHB_APB3 109
98#define CLKID_VPU_0_SEL 110
99#define CLKID_VPU_0 112
100#define CLKID_VPU_1_SEL 113
101#define CLKID_VPU_1 115
102#define CLKID_VPU 116
103#define CLKID_VAPB_0_SEL 117
104#define CLKID_VAPB_0 119
105#define CLKID_VAPB_1_SEL 120
106#define CLKID_VAPB_1 122
107#define CLKID_VAPB_SEL 123
108#define CLKID_VAPB 124
109#define CLKID_HDMI_PLL 128
110#define CLKID_VID_PLL 129
111#define CLKID_VCLK 138
112#define CLKID_VCLK2 139
113#define CLKID_VCLK_DIV1 148
114#define CLKID_VCLK_DIV2 149
115#define CLKID_VCLK_DIV4 150
116#define CLKID_VCLK_DIV6 151
117#define CLKID_VCLK_DIV12 152
118#define CLKID_VCLK2_DIV1 153
119#define CLKID_VCLK2_DIV2 154
120#define CLKID_VCLK2_DIV4 155
121#define CLKID_VCLK2_DIV6 156
122#define CLKID_VCLK2_DIV12 157
123#define CLKID_CTS_ENCI 162
124#define CLKID_CTS_ENCP 163
125#define CLKID_CTS_VDAC 164
126#define CLKID_HDMI_TX 165
127#define CLKID_HDMI 168
128#define CLKID_MALI_0_SEL 169
129#define CLKID_MALI_0 171
130#define CLKID_MALI_1_SEL 172
131#define CLKID_MALI_1 174
132#define CLKID_MALI 175
133#define CLKID_MPLL_5OM 177
134
135#endif /* __G12A_CLKC_H */
diff --git a/include/dt-bindings/clock/gxbb-aoclkc.h b/include/dt-bindings/clock/gxbb-aoclkc.h
index 9d15e2221fdb..ec3b26319fc4 100644
--- a/include/dt-bindings/clock/gxbb-aoclkc.h
+++ b/include/dt-bindings/clock/gxbb-aoclkc.h
@@ -63,5 +63,12 @@
63#define CLKID_AO_UART2 4 63#define CLKID_AO_UART2 4
64#define CLKID_AO_IR_BLASTER 5 64#define CLKID_AO_IR_BLASTER 5
65#define CLKID_AO_CEC_32K 6 65#define CLKID_AO_CEC_32K 6
66#define CLKID_AO_CTS_OSCIN 7
67#define CLKID_AO_32K_PRE 8
68#define CLKID_AO_32K_DIV 9
69#define CLKID_AO_32K_SEL 10
70#define CLKID_AO_32K 11
71#define CLKID_AO_CTS_RTC_OSCIN 12
72#define CLKID_AO_CLK81 13
66 73
67#endif 74#endif
diff --git a/include/dt-bindings/clock/imx5-clock.h b/include/dt-bindings/clock/imx5-clock.h
index d382fc71aa83..a81be5be6700 100644
--- a/include/dt-bindings/clock/imx5-clock.h
+++ b/include/dt-bindings/clock/imx5-clock.h
@@ -214,6 +214,7 @@
214#define IMX5_CLK_IEEE1588_SEL 202 214#define IMX5_CLK_IEEE1588_SEL 202
215#define IMX5_CLK_IEEE1588_PODF 203 215#define IMX5_CLK_IEEE1588_PODF 203
216#define IMX5_CLK_IEEE1588_GATE 204 216#define IMX5_CLK_IEEE1588_GATE 204
217#define IMX5_CLK_END 205 217#define IMX5_CLK_SCC2_IPG_GATE 205
218#define IMX5_CLK_END 206
218 219
219#endif /* __DT_BINDINGS_CLOCK_IMX5_H */ 220#endif /* __DT_BINDINGS_CLOCK_IMX5_H */
diff --git a/include/dt-bindings/clock/imx8mm-clock.h b/include/dt-bindings/clock/imx8mm-clock.h
new file mode 100644
index 000000000000..1b4353e7b486
--- /dev/null
+++ b/include/dt-bindings/clock/imx8mm-clock.h
@@ -0,0 +1,244 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright 2017-2018 NXP
4 */
5
6#ifndef __DT_BINDINGS_CLOCK_IMX8MM_H
7#define __DT_BINDINGS_CLOCK_IMX8MM_H
8
9#define IMX8MM_CLK_DUMMY 0
10#define IMX8MM_CLK_32K 1
11#define IMX8MM_CLK_24M 2
12#define IMX8MM_OSC_HDMI_CLK 3
13#define IMX8MM_CLK_EXT1 4
14#define IMX8MM_CLK_EXT2 5
15#define IMX8MM_CLK_EXT3 6
16#define IMX8MM_CLK_EXT4 7
17#define IMX8MM_AUDIO_PLL1_REF_SEL 8
18#define IMX8MM_AUDIO_PLL2_REF_SEL 9
19#define IMX8MM_VIDEO_PLL1_REF_SEL 10
20#define IMX8MM_DRAM_PLL_REF_SEL 11
21#define IMX8MM_GPU_PLL_REF_SEL 12
22#define IMX8MM_VPU_PLL_REF_SEL 13
23#define IMX8MM_ARM_PLL_REF_SEL 14
24#define IMX8MM_SYS_PLL1_REF_SEL 15
25#define IMX8MM_SYS_PLL2_REF_SEL 16
26#define IMX8MM_SYS_PLL3_REF_SEL 17
27#define IMX8MM_AUDIO_PLL1 18
28#define IMX8MM_AUDIO_PLL2 19
29#define IMX8MM_VIDEO_PLL1 20
30#define IMX8MM_DRAM_PLL 21
31#define IMX8MM_GPU_PLL 22
32#define IMX8MM_VPU_PLL 23
33#define IMX8MM_ARM_PLL 24
34#define IMX8MM_SYS_PLL1 25
35#define IMX8MM_SYS_PLL2 26
36#define IMX8MM_SYS_PLL3 27
37#define IMX8MM_AUDIO_PLL1_BYPASS 28
38#define IMX8MM_AUDIO_PLL2_BYPASS 29
39#define IMX8MM_VIDEO_PLL1_BYPASS 30
40#define IMX8MM_DRAM_PLL_BYPASS 31
41#define IMX8MM_GPU_PLL_BYPASS 32
42#define IMX8MM_VPU_PLL_BYPASS 33
43#define IMX8MM_ARM_PLL_BYPASS 34
44#define IMX8MM_SYS_PLL1_BYPASS 35
45#define IMX8MM_SYS_PLL2_BYPASS 36
46#define IMX8MM_SYS_PLL3_BYPASS 37
47#define IMX8MM_AUDIO_PLL1_OUT 38
48#define IMX8MM_AUDIO_PLL2_OUT 39
49#define IMX8MM_VIDEO_PLL1_OUT 40
50#define IMX8MM_DRAM_PLL_OUT 41
51#define IMX8MM_GPU_PLL_OUT 42
52#define IMX8MM_VPU_PLL_OUT 43
53#define IMX8MM_ARM_PLL_OUT 44
54#define IMX8MM_SYS_PLL1_OUT 45
55#define IMX8MM_SYS_PLL2_OUT 46
56#define IMX8MM_SYS_PLL3_OUT 47
57#define IMX8MM_SYS_PLL1_40M 48
58#define IMX8MM_SYS_PLL1_80M 49
59#define IMX8MM_SYS_PLL1_100M 50
60#define IMX8MM_SYS_PLL1_133M 51
61#define IMX8MM_SYS_PLL1_160M 52
62#define IMX8MM_SYS_PLL1_200M 53
63#define IMX8MM_SYS_PLL1_266M 54
64#define IMX8MM_SYS_PLL1_400M 55
65#define IMX8MM_SYS_PLL1_800M 56
66#define IMX8MM_SYS_PLL2_50M 57
67#define IMX8MM_SYS_PLL2_100M 58
68#define IMX8MM_SYS_PLL2_125M 59
69#define IMX8MM_SYS_PLL2_166M 60
70#define IMX8MM_SYS_PLL2_200M 61
71#define IMX8MM_SYS_PLL2_250M 62
72#define IMX8MM_SYS_PLL2_333M 63
73#define IMX8MM_SYS_PLL2_500M 64
74#define IMX8MM_SYS_PLL2_1000M 65
75
76/* core */
77#define IMX8MM_CLK_A53_SRC 66
78#define IMX8MM_CLK_M4_SRC 67
79#define IMX8MM_CLK_VPU_SRC 68
80#define IMX8MM_CLK_GPU3D_SRC 69
81#define IMX8MM_CLK_GPU2D_SRC 70
82#define IMX8MM_CLK_A53_CG 71
83#define IMX8MM_CLK_M4_CG 72
84#define IMX8MM_CLK_VPU_CG 73
85#define IMX8MM_CLK_GPU3D_CG 74
86#define IMX8MM_CLK_GPU2D_CG 75
87#define IMX8MM_CLK_A53_DIV 76
88#define IMX8MM_CLK_M4_DIV 77
89#define IMX8MM_CLK_VPU_DIV 78
90#define IMX8MM_CLK_GPU3D_DIV 79
91#define IMX8MM_CLK_GPU2D_DIV 80
92
93/* bus */
94#define IMX8MM_CLK_MAIN_AXI 81
95#define IMX8MM_CLK_ENET_AXI 82
96#define IMX8MM_CLK_NAND_USDHC_BUS 83
97#define IMX8MM_CLK_VPU_BUS 84
98#define IMX8MM_CLK_DISP_AXI 85
99#define IMX8MM_CLK_DISP_APB 86
100#define IMX8MM_CLK_DISP_RTRM 87
101#define IMX8MM_CLK_USB_BUS 88
102#define IMX8MM_CLK_GPU_AXI 89
103#define IMX8MM_CLK_GPU_AHB 90
104#define IMX8MM_CLK_NOC 91
105#define IMX8MM_CLK_NOC_APB 92
106
107#define IMX8MM_CLK_AHB 93
108#define IMX8MM_CLK_AUDIO_AHB 94
109#define IMX8MM_CLK_IPG_ROOT 95
110#define IMX8MM_CLK_IPG_AUDIO_ROOT 96
111
112#define IMX8MM_CLK_DRAM_ALT 97
113#define IMX8MM_CLK_DRAM_APB 98
114#define IMX8MM_CLK_VPU_G1 99
115#define IMX8MM_CLK_VPU_G2 100
116#define IMX8MM_CLK_DISP_DTRC 101
117#define IMX8MM_CLK_DISP_DC8000 102
118#define IMX8MM_CLK_PCIE1_CTRL 103
119#define IMX8MM_CLK_PCIE1_PHY 104
120#define IMX8MM_CLK_PCIE1_AUX 105
121#define IMX8MM_CLK_DC_PIXEL 106
122#define IMX8MM_CLK_LCDIF_PIXEL 107
123#define IMX8MM_CLK_SAI1 108
124#define IMX8MM_CLK_SAI2 109
125#define IMX8MM_CLK_SAI3 110
126#define IMX8MM_CLK_SAI4 111
127#define IMX8MM_CLK_SAI5 112
128#define IMX8MM_CLK_SAI6 113
129#define IMX8MM_CLK_SPDIF1 114
130#define IMX8MM_CLK_SPDIF2 115
131#define IMX8MM_CLK_ENET_REF 116
132#define IMX8MM_CLK_ENET_TIMER 117
133#define IMX8MM_CLK_ENET_PHY_REF 118
134#define IMX8MM_CLK_NAND 119
135#define IMX8MM_CLK_QSPI 120
136#define IMX8MM_CLK_USDHC1 121
137#define IMX8MM_CLK_USDHC2 122
138#define IMX8MM_CLK_I2C1 123
139#define IMX8MM_CLK_I2C2 124
140#define IMX8MM_CLK_I2C3 125
141#define IMX8MM_CLK_I2C4 126
142#define IMX8MM_CLK_UART1 127
143#define IMX8MM_CLK_UART2 128
144#define IMX8MM_CLK_UART3 129
145#define IMX8MM_CLK_UART4 130
146#define IMX8MM_CLK_USB_CORE_REF 131
147#define IMX8MM_CLK_USB_PHY_REF 132
148#define IMX8MM_CLK_ECSPI1 133
149#define IMX8MM_CLK_ECSPI2 134
150#define IMX8MM_CLK_PWM1 135
151#define IMX8MM_CLK_PWM2 136
152#define IMX8MM_CLK_PWM3 137
153#define IMX8MM_CLK_PWM4 138
154#define IMX8MM_CLK_GPT1 139
155#define IMX8MM_CLK_WDOG 140
156#define IMX8MM_CLK_WRCLK 141
157#define IMX8MM_CLK_DSI_CORE 142
158#define IMX8MM_CLK_DSI_PHY_REF 143
159#define IMX8MM_CLK_DSI_DBI 144
160#define IMX8MM_CLK_USDHC3 145
161#define IMX8MM_CLK_CSI1_CORE 146
162#define IMX8MM_CLK_CSI1_PHY_REF 147
163#define IMX8MM_CLK_CSI1_ESC 148
164#define IMX8MM_CLK_CSI2_CORE 149
165#define IMX8MM_CLK_CSI2_PHY_REF 150
166#define IMX8MM_CLK_CSI2_ESC 151
167#define IMX8MM_CLK_PCIE2_CTRL 152
168#define IMX8MM_CLK_PCIE2_PHY 153
169#define IMX8MM_CLK_PCIE2_AUX 154
170#define IMX8MM_CLK_ECSPI3 155
171#define IMX8MM_CLK_PDM 156
172#define IMX8MM_CLK_VPU_H1 157
173#define IMX8MM_CLK_CLKO1 158
174
175#define IMX8MM_CLK_ECSPI1_ROOT 159
176#define IMX8MM_CLK_ECSPI2_ROOT 160
177#define IMX8MM_CLK_ECSPI3_ROOT 161
178#define IMX8MM_CLK_ENET1_ROOT 162
179#define IMX8MM_CLK_GPT1_ROOT 163
180#define IMX8MM_CLK_I2C1_ROOT 164
181#define IMX8MM_CLK_I2C2_ROOT 165
182#define IMX8MM_CLK_I2C3_ROOT 166
183#define IMX8MM_CLK_I2C4_ROOT 167
184#define IMX8MM_CLK_OCOTP_ROOT 168
185#define IMX8MM_CLK_PCIE1_ROOT 169
186#define IMX8MM_CLK_PWM1_ROOT 170
187#define IMX8MM_CLK_PWM2_ROOT 171
188#define IMX8MM_CLK_PWM3_ROOT 172
189#define IMX8MM_CLK_PWM4_ROOT 173
190#define IMX8MM_CLK_QSPI_ROOT 174
191#define IMX8MM_CLK_NAND_ROOT 175
192#define IMX8MM_CLK_SAI1_ROOT 176
193#define IMX8MM_CLK_SAI1_IPG 177
194#define IMX8MM_CLK_SAI2_ROOT 178
195#define IMX8MM_CLK_SAI2_IPG 179
196#define IMX8MM_CLK_SAI3_ROOT 180
197#define IMX8MM_CLK_SAI3_IPG 181
198#define IMX8MM_CLK_SAI4_ROOT 182
199#define IMX8MM_CLK_SAI4_IPG 183
200#define IMX8MM_CLK_SAI5_ROOT 184
201#define IMX8MM_CLK_SAI5_IPG 185
202#define IMX8MM_CLK_SAI6_ROOT 186
203#define IMX8MM_CLK_SAI6_IPG 187
204#define IMX8MM_CLK_UART1_ROOT 188
205#define IMX8MM_CLK_UART2_ROOT 189
206#define IMX8MM_CLK_UART3_ROOT 190
207#define IMX8MM_CLK_UART4_ROOT 191
208#define IMX8MM_CLK_USB1_CTRL_ROOT 192
209#define IMX8MM_CLK_GPU3D_ROOT 193
210#define IMX8MM_CLK_USDHC1_ROOT 194
211#define IMX8MM_CLK_USDHC2_ROOT 195
212#define IMX8MM_CLK_WDOG1_ROOT 196
213#define IMX8MM_CLK_WDOG2_ROOT 197
214#define IMX8MM_CLK_WDOG3_ROOT 198
215#define IMX8MM_CLK_VPU_G1_ROOT 199
216#define IMX8MM_CLK_GPU_BUS_ROOT 200
217#define IMX8MM_CLK_VPU_H1_ROOT 201
218#define IMX8MM_CLK_VPU_G2_ROOT 202
219#define IMX8MM_CLK_PDM_ROOT 203
220#define IMX8MM_CLK_DISP_ROOT 204
221#define IMX8MM_CLK_DISP_AXI_ROOT 205
222#define IMX8MM_CLK_DISP_APB_ROOT 206
223#define IMX8MM_CLK_DISP_RTRM_ROOT 207
224#define IMX8MM_CLK_USDHC3_ROOT 208
225#define IMX8MM_CLK_TMU_ROOT 209
226#define IMX8MM_CLK_VPU_DEC_ROOT 210
227#define IMX8MM_CLK_SDMA1_ROOT 211
228#define IMX8MM_CLK_SDMA2_ROOT 212
229#define IMX8MM_CLK_SDMA3_ROOT 213
230#define IMX8MM_CLK_GPT_3M 214
231#define IMX8MM_CLK_ARM 215
232#define IMX8MM_CLK_PDM_IPG 216
233#define IMX8MM_CLK_GPU2D_ROOT 217
234#define IMX8MM_CLK_MU_ROOT 218
235#define IMX8MM_CLK_CSI1_ROOT 219
236
237#define IMX8MM_CLK_DRAM_CORE 220
238#define IMX8MM_CLK_DRAM_ALT_ROOT 221
239
240#define IMX8MM_CLK_NAND_USDHC_BUS_RAWNAND_CLK 222
241
242#define IMX8MM_CLK_END 223
243
244#endif
diff --git a/include/dt-bindings/clock/imx8mq-clock.h b/include/dt-bindings/clock/imx8mq-clock.h
index b53be41929be..b58cc643c9c9 100644
--- a/include/dt-bindings/clock/imx8mq-clock.h
+++ b/include/dt-bindings/clock/imx8mq-clock.h
@@ -350,7 +350,7 @@
350#define IMX8MQ_CLK_VPU_G2_ROOT 241 350#define IMX8MQ_CLK_VPU_G2_ROOT 241
351 351
352/* SCCG PLL GATE */ 352/* SCCG PLL GATE */
353#define IMX8MQ_SYS1_PLL_OUT 232 353#define IMX8MQ_SYS1_PLL_OUT 242
354#define IMX8MQ_SYS2_PLL_OUT 243 354#define IMX8MQ_SYS2_PLL_OUT 243
355#define IMX8MQ_SYS3_PLL_OUT 244 355#define IMX8MQ_SYS3_PLL_OUT 244
356#define IMX8MQ_DRAM_PLL_OUT 245 356#define IMX8MQ_DRAM_PLL_OUT 245
@@ -372,24 +372,33 @@
372/* txesc clock */ 372/* txesc clock */
373#define IMX8MQ_CLK_DSI_IPG_DIV 256 373#define IMX8MQ_CLK_DSI_IPG_DIV 256
374 374
375#define IMX8MQ_CLK_TMU_ROOT 265 375#define IMX8MQ_CLK_TMU_ROOT 257
376 376
377/* Display root clocks */ 377/* Display root clocks */
378#define IMX8MQ_CLK_DISP_AXI_ROOT 266 378#define IMX8MQ_CLK_DISP_AXI_ROOT 258
379#define IMX8MQ_CLK_DISP_APB_ROOT 267 379#define IMX8MQ_CLK_DISP_APB_ROOT 259
380#define IMX8MQ_CLK_DISP_RTRM_ROOT 268 380#define IMX8MQ_CLK_DISP_RTRM_ROOT 260
381 381
382#define IMX8MQ_CLK_OCOTP_ROOT 269 382#define IMX8MQ_CLK_OCOTP_ROOT 261
383 383
384#define IMX8MQ_CLK_DRAM_ALT_ROOT 270 384#define IMX8MQ_CLK_DRAM_ALT_ROOT 262
385#define IMX8MQ_CLK_DRAM_CORE 271 385#define IMX8MQ_CLK_DRAM_CORE 263
386 386
387#define IMX8MQ_CLK_MU_ROOT 272 387#define IMX8MQ_CLK_MU_ROOT 264
388#define IMX8MQ_VIDEO2_PLL_OUT 273 388#define IMX8MQ_VIDEO2_PLL_OUT 265
389 389
390#define IMX8MQ_CLK_CLKO2 274 390#define IMX8MQ_CLK_CLKO2 266
391 391
392#define IMX8MQ_CLK_NAND_USDHC_BUS_RAWNAND_CLK 275 392#define IMX8MQ_CLK_NAND_USDHC_BUS_RAWNAND_CLK 267
393 393
394#define IMX8MQ_CLK_END 276 394#define IMX8MQ_CLK_CLKO1 268
395#define IMX8MQ_CLK_ARM 269
396
397#define IMX8MQ_CLK_GPIO1_ROOT 270
398#define IMX8MQ_CLK_GPIO2_ROOT 271
399#define IMX8MQ_CLK_GPIO3_ROOT 272
400#define IMX8MQ_CLK_GPIO4_ROOT 273
401#define IMX8MQ_CLK_GPIO5_ROOT 274
402
403#define IMX8MQ_CLK_END 275
395#endif /* __DT_BINDINGS_CLOCK_IMX8MQ_H */ 404#endif /* __DT_BINDINGS_CLOCK_IMX8MQ_H */
diff --git a/include/dt-bindings/clock/marvell,mmp2.h b/include/dt-bindings/clock/marvell,mmp2.h
index 7b24fc791146..e785c6eb3561 100644
--- a/include/dt-bindings/clock/marvell,mmp2.h
+++ b/include/dt-bindings/clock/marvell,mmp2.h
@@ -71,7 +71,7 @@
71#define MMP2_CLK_CCIC1_MIX 117 71#define MMP2_CLK_CCIC1_MIX 117
72#define MMP2_CLK_CCIC1_PHY 118 72#define MMP2_CLK_CCIC1_PHY 118
73#define MMP2_CLK_CCIC1_SPHY 119 73#define MMP2_CLK_CCIC1_SPHY 119
74#define MMP2_CLK_SP 120 74#define MMP2_CLK_DISP0_LCDC 120
75 75
76#define MMP2_NR_CLKS 200 76#define MMP2_NR_CLKS 200
77#endif 77#endif
diff --git a/include/dt-bindings/clock/meson8b-clkc.h b/include/dt-bindings/clock/meson8b-clkc.h
index 5fe2923382d0..8067077a62ca 100644
--- a/include/dt-bindings/clock/meson8b-clkc.h
+++ b/include/dt-bindings/clock/meson8b-clkc.h
@@ -104,6 +104,7 @@
104#define CLKID_MPLL2 95 104#define CLKID_MPLL2 95
105#define CLKID_NAND_CLK 112 105#define CLKID_NAND_CLK 112
106#define CLKID_ABP 124 106#define CLKID_ABP 124
107#define CLKID_APB 124
107#define CLKID_PERIPH 126 108#define CLKID_PERIPH 126
108#define CLKID_AXI 128 109#define CLKID_AXI 128
109#define CLKID_L2_DRAM 130 110#define CLKID_L2_DRAM 130
diff --git a/include/dt-bindings/clock/qcom,rpmcc.h b/include/dt-bindings/clock/qcom,rpmcc.h
index 3658b0c14966..ede93a0ca156 100644
--- a/include/dt-bindings/clock/qcom,rpmcc.h
+++ b/include/dt-bindings/clock/qcom,rpmcc.h
@@ -127,5 +127,15 @@
127#define RPM_SMD_BIMC_GPU_A_CLK 77 127#define RPM_SMD_BIMC_GPU_A_CLK 77
128#define RPM_SMD_QPIC_CLK 78 128#define RPM_SMD_QPIC_CLK 78
129#define RPM_SMD_QPIC_CLK_A 79 129#define RPM_SMD_QPIC_CLK_A 79
130#define RPM_SMD_LN_BB_CLK1 80
131#define RPM_SMD_LN_BB_CLK1_A 81
132#define RPM_SMD_LN_BB_CLK2 82
133#define RPM_SMD_LN_BB_CLK2_A 83
134#define RPM_SMD_LN_BB_CLK3_PIN 84
135#define RPM_SMD_LN_BB_CLK3_A_PIN 85
136#define RPM_SMD_RF_CLK3 86
137#define RPM_SMD_RF_CLK3_A 87
138#define RPM_SMD_RF_CLK3_PIN 88
139#define RPM_SMD_RF_CLK3_A_PIN 89
130 140
131#endif 141#endif
diff --git a/include/dt-bindings/clock/qcom,rpmh.h b/include/dt-bindings/clock/qcom,rpmh.h
index f48fbd6f2095..edcab3f7b7d3 100644
--- a/include/dt-bindings/clock/qcom,rpmh.h
+++ b/include/dt-bindings/clock/qcom,rpmh.h
@@ -18,5 +18,6 @@
18#define RPMH_RF_CLK2_A 9 18#define RPMH_RF_CLK2_A 9
19#define RPMH_RF_CLK3 10 19#define RPMH_RF_CLK3 10
20#define RPMH_RF_CLK3_A 11 20#define RPMH_RF_CLK3_A 11
21#define RPMH_IPA_CLK 12
21 22
22#endif 23#endif
diff --git a/include/dt-bindings/clock/r8a774a1-cpg-mssr.h b/include/dt-bindings/clock/r8a774a1-cpg-mssr.h
index 9bc5d45ff4b5..e355363f40c2 100644
--- a/include/dt-bindings/clock/r8a774a1-cpg-mssr.h
+++ b/include/dt-bindings/clock/r8a774a1-cpg-mssr.h
@@ -54,5 +54,6 @@
54#define R8A774A1_CLK_CPEX 43 54#define R8A774A1_CLK_CPEX 43
55#define R8A774A1_CLK_R 44 55#define R8A774A1_CLK_R 44
56#define R8A774A1_CLK_OSC 45 56#define R8A774A1_CLK_OSC 45
57#define R8A774A1_CLK_CANFD 46
57 58
58#endif /* __DT_BINDINGS_CLOCK_R8A774A1_CPG_MSSR_H__ */ 59#endif /* __DT_BINDINGS_CLOCK_R8A774A1_CPG_MSSR_H__ */
diff --git a/include/dt-bindings/clock/r8a774c0-cpg-mssr.h b/include/dt-bindings/clock/r8a774c0-cpg-mssr.h
index 8fe51b6aca28..8ad9cd6be8e9 100644
--- a/include/dt-bindings/clock/r8a774c0-cpg-mssr.h
+++ b/include/dt-bindings/clock/r8a774c0-cpg-mssr.h
@@ -56,5 +56,6 @@
56#define R8A774C0_CLK_CSI0 45 56#define R8A774C0_CLK_CSI0 45
57#define R8A774C0_CLK_CP 46 57#define R8A774C0_CLK_CP 46
58#define R8A774C0_CLK_CPEX 47 58#define R8A774C0_CLK_CPEX 47
59#define R8A774C0_CLK_CANFD 48
59 60
60#endif /* __DT_BINDINGS_CLOCK_R8A774C0_CPG_MSSR_H__ */ 61#endif /* __DT_BINDINGS_CLOCK_R8A774C0_CPG_MSSR_H__ */
diff --git a/include/dt-bindings/clock/stm32mp1-clks.h b/include/dt-bindings/clock/stm32mp1-clks.h
index 90ec780bfc68..4cdaf135829c 100644
--- a/include/dt-bindings/clock/stm32mp1-clks.h
+++ b/include/dt-bindings/clock/stm32mp1-clks.h
@@ -248,7 +248,4 @@
248 248
249#define STM32MP1_LAST_CLK 232 249#define STM32MP1_LAST_CLK 232
250 250
251#define LTDC_K LTDC_PX
252#define ETHMAC_K ETHCK_K
253
254#endif /* _DT_BINDINGS_STM32MP1_CLKS_H_ */ 251#endif /* _DT_BINDINGS_STM32MP1_CLKS_H_ */
diff --git a/include/dt-bindings/reset/amlogic,meson-axg-reset.h b/include/dt-bindings/reset/amlogic,meson-axg-reset.h
index ad6f55dabd6d..0f2e0fe45ca4 100644
--- a/include/dt-bindings/reset/amlogic,meson-axg-reset.h
+++ b/include/dt-bindings/reset/amlogic,meson-axg-reset.h
@@ -1,12 +1,11 @@
1/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
1/* 2/*
2 *
3 * Copyright (c) 2016 BayLibre, SAS. 3 * Copyright (c) 2016 BayLibre, SAS.
4 * Author: Neil Armstrong <narmstrong@baylibre.com> 4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 * 5 *
6 * Copyright (c) 2017 Amlogic, inc. 6 * Copyright (c) 2017 Amlogic, inc.
7 * Author: Yixun Lan <yixun.lan@amlogic.com> 7 * Author: Yixun Lan <yixun.lan@amlogic.com>
8 * 8 *
9 * SPDX-License-Identifier: (GPL-2.0+ OR BSD)
10 */ 9 */
11 10
12#ifndef _DT_BINDINGS_AMLOGIC_MESON_AXG_RESET_H 11#ifndef _DT_BINDINGS_AMLOGIC_MESON_AXG_RESET_H
diff --git a/include/dt-bindings/reset/g12a-aoclkc.h b/include/dt-bindings/reset/g12a-aoclkc.h
new file mode 100644
index 000000000000..bd2e2337135c
--- /dev/null
+++ b/include/dt-bindings/reset/g12a-aoclkc.h
@@ -0,0 +1,18 @@
1/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
2/*
3 * Copyright (c) 2016 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 */
6
7#ifndef DT_BINDINGS_RESET_AMLOGIC_MESON_G12A_AOCLK
8#define DT_BINDINGS_RESET_AMLOGIC_MESON_G12A_AOCLK
9
10#define RESET_AO_IR_IN 0
11#define RESET_AO_UART 1
12#define RESET_AO_I2C_M 2
13#define RESET_AO_I2C_S 3
14#define RESET_AO_SAR_ADC 4
15#define RESET_AO_UART2 5
16#define RESET_AO_IR_OUT 6
17
18#endif
diff --git a/include/keys/request_key_auth-type.h b/include/keys/request_key_auth-type.h
new file mode 100644
index 000000000000..a726dd3f1dc6
--- /dev/null
+++ b/include/keys/request_key_auth-type.h
@@ -0,0 +1,36 @@
1/* request_key authorisation token key type
2 *
3 * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#ifndef _KEYS_REQUEST_KEY_AUTH_TYPE_H
13#define _KEYS_REQUEST_KEY_AUTH_TYPE_H
14
15#include <linux/key.h>
16
17/*
18 * Authorisation record for request_key().
19 */
20struct request_key_auth {
21 struct key *target_key;
22 struct key *dest_keyring;
23 const struct cred *cred;
24 void *callout_info;
25 size_t callout_len;
26 pid_t pid;
27 char op[8];
28} __randomize_layout;
29
30static inline struct request_key_auth *get_request_key_auth(const struct key *key)
31{
32 return key->payload.data[0];
33}
34
35
36#endif /* _KEYS_REQUEST_KEY_AUTH_TYPE_H */
diff --git a/include/keys/user-type.h b/include/keys/user-type.h
index e098cbe27db5..12babe991594 100644
--- a/include/keys/user-type.h
+++ b/include/keys/user-type.h
@@ -31,7 +31,7 @@
31struct user_key_payload { 31struct user_key_payload {
32 struct rcu_head rcu; /* RCU destructor */ 32 struct rcu_head rcu; /* RCU destructor */
33 unsigned short datalen; /* length of this data */ 33 unsigned short datalen; /* length of this data */
34 char data[0]; /* actual data */ 34 char data[0] __aligned(__alignof__(u64)); /* actual data */
35}; 35};
36 36
37extern struct key_type key_type_user; 37extern struct key_type key_type_user;
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index 4f31f96bbfab..c36c86f1ec9a 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -100,7 +100,7 @@ enum vgic_irq_config {
100}; 100};
101 101
102struct vgic_irq { 102struct vgic_irq {
103 spinlock_t irq_lock; /* Protects the content of the struct */ 103 raw_spinlock_t irq_lock; /* Protects the content of the struct */
104 struct list_head lpi_list; /* Used to link all LPIs together */ 104 struct list_head lpi_list; /* Used to link all LPIs together */
105 struct list_head ap_list; 105 struct list_head ap_list;
106 106
@@ -256,7 +256,7 @@ struct vgic_dist {
256 u64 propbaser; 256 u64 propbaser;
257 257
258 /* Protects the lpi_list and the count value below. */ 258 /* Protects the lpi_list and the count value below. */
259 spinlock_t lpi_list_lock; 259 raw_spinlock_t lpi_list_lock;
260 struct list_head lpi_list_head; 260 struct list_head lpi_list_head;
261 int lpi_list_count; 261 int lpi_list_count;
262 262
@@ -307,7 +307,7 @@ struct vgic_cpu {
307 unsigned int used_lrs; 307 unsigned int used_lrs;
308 struct vgic_irq private_irqs[VGIC_NR_PRIVATE_IRQS]; 308 struct vgic_irq private_irqs[VGIC_NR_PRIVATE_IRQS];
309 309
310 spinlock_t ap_list_lock; /* Protects the ap_list */ 310 raw_spinlock_t ap_list_lock; /* Protects the ap_list */
311 311
312 /* 312 /*
313 * List of IRQs that this VCPU should consider because they are either 313 * List of IRQs that this VCPU should consider because they are either
diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h
index c31157135598..07e02d6df5ad 100644
--- a/include/linux/backing-dev-defs.h
+++ b/include/linux/backing-dev-defs.h
@@ -190,6 +190,7 @@ struct backing_dev_info {
190 struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */ 190 struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */
191 struct rb_root cgwb_congested_tree; /* their congested states */ 191 struct rb_root cgwb_congested_tree; /* their congested states */
192 struct mutex cgwb_release_mutex; /* protect shutdown of wb structs */ 192 struct mutex cgwb_release_mutex; /* protect shutdown of wb structs */
193 struct rw_semaphore wb_switch_rwsem; /* no cgwb switch while syncing */
193#else 194#else
194 struct bdi_writeback_congested *wb_congested; 195 struct bdi_writeback_congested *wb_congested;
195#endif 196#endif
diff --git a/include/linux/bcma/bcma_soc.h b/include/linux/bcma/bcma_soc.h
index 7cca5f859a90..f3c43519baa7 100644
--- a/include/linux/bcma/bcma_soc.h
+++ b/include/linux/bcma/bcma_soc.h
@@ -6,6 +6,7 @@
6 6
7struct bcma_soc { 7struct bcma_soc {
8 struct bcma_bus bus; 8 struct bcma_bus bus;
9 struct device *dev;
9}; 10};
10 11
11int __init bcma_host_soc_register(struct bcma_soc *soc); 12int __init bcma_host_soc_register(struct bcma_soc *soc);
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 5c7e7f859a24..d66bf5f32610 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -287,7 +287,7 @@ enum req_opf {
287 REQ_OP_DISCARD = 3, 287 REQ_OP_DISCARD = 3,
288 /* securely erase sectors */ 288 /* securely erase sectors */
289 REQ_OP_SECURE_ERASE = 5, 289 REQ_OP_SECURE_ERASE = 5,
290 /* seset a zone write pointer */ 290 /* reset a zone write pointer */
291 REQ_OP_ZONE_RESET = 6, 291 REQ_OP_ZONE_RESET = 6,
292 /* write the same sector many times */ 292 /* write the same sector many times */
293 REQ_OP_WRITE_SAME = 7, 293 REQ_OP_WRITE_SAME = 7,
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 8804753805ac..7bb2d8de9f30 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -116,7 +116,13 @@ extern void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes);
116 116
117static inline sector_t blk_rq_trace_sector(struct request *rq) 117static inline sector_t blk_rq_trace_sector(struct request *rq)
118{ 118{
119 return blk_rq_is_passthrough(rq) ? 0 : blk_rq_pos(rq); 119 /*
120 * Tracing should ignore starting sector for passthrough requests and
121 * requests where starting sector didn't get set.
122 */
123 if (blk_rq_is_passthrough(rq) || blk_rq_pos(rq) == (sector_t)-1)
124 return 0;
125 return blk_rq_pos(rq);
120} 126}
121 127
122static inline unsigned int blk_rq_trace_nr_sectors(struct request *rq) 128static inline unsigned int blk_rq_trace_nr_sectors(struct request *rq)
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
index 27b74947cd2b..573cca00a0e6 100644
--- a/include/linux/bpf_verifier.h
+++ b/include/linux/bpf_verifier.h
@@ -172,6 +172,7 @@ struct bpf_verifier_state_list {
172#define BPF_ALU_SANITIZE_SRC 1U 172#define BPF_ALU_SANITIZE_SRC 1U
173#define BPF_ALU_SANITIZE_DST 2U 173#define BPF_ALU_SANITIZE_DST 2U
174#define BPF_ALU_NEG_VALUE (1U << 2) 174#define BPF_ALU_NEG_VALUE (1U << 2)
175#define BPF_ALU_NON_POINTER (1U << 3)
175#define BPF_ALU_SANITIZE (BPF_ALU_SANITIZE_SRC | \ 176#define BPF_ALU_SANITIZE (BPF_ALU_SANITIZE_SRC | \
176 BPF_ALU_SANITIZE_DST) 177 BPF_ALU_SANITIZE_DST)
177 178
diff --git a/include/linux/bpfilter.h b/include/linux/bpfilter.h
index f02cee0225d4..d815622cd31e 100644
--- a/include/linux/bpfilter.h
+++ b/include/linux/bpfilter.h
@@ -3,13 +3,22 @@
3#define _LINUX_BPFILTER_H 3#define _LINUX_BPFILTER_H
4 4
5#include <uapi/linux/bpfilter.h> 5#include <uapi/linux/bpfilter.h>
6#include <linux/umh.h>
6 7
7struct sock; 8struct sock;
8int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval, 9int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval,
9 unsigned int optlen); 10 unsigned int optlen);
10int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval, 11int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
11 int __user *optlen); 12 int __user *optlen);
12extern int (*bpfilter_process_sockopt)(struct sock *sk, int optname, 13struct bpfilter_umh_ops {
13 char __user *optval, 14 struct umh_info info;
14 unsigned int optlen, bool is_set); 15 /* since ip_getsockopt() can run in parallel, serialize access to umh */
16 struct mutex lock;
17 int (*sockopt)(struct sock *sk, int optname,
18 char __user *optval,
19 unsigned int optlen, bool is_set);
20 int (*start)(void);
21 bool stop;
22};
23extern struct bpfilter_umh_ops bpfilter_ops;
15#endif 24#endif
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index 68bb09c29ce8..a420c07904bc 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -35,6 +35,7 @@
35#define CEPH_OPT_NOMSGAUTH (1<<4) /* don't require msg signing feat */ 35#define CEPH_OPT_NOMSGAUTH (1<<4) /* don't require msg signing feat */
36#define CEPH_OPT_TCP_NODELAY (1<<5) /* TCP_NODELAY on TCP sockets */ 36#define CEPH_OPT_TCP_NODELAY (1<<5) /* TCP_NODELAY on TCP sockets */
37#define CEPH_OPT_NOMSGSIGN (1<<6) /* don't sign msgs */ 37#define CEPH_OPT_NOMSGSIGN (1<<6) /* don't sign msgs */
38#define CEPH_OPT_ABORT_ON_FULL (1<<7) /* abort w/ ENOSPC when full */
38 39
39#define CEPH_OPT_DEFAULT (CEPH_OPT_TCP_NODELAY) 40#define CEPH_OPT_DEFAULT (CEPH_OPT_TCP_NODELAY)
40 41
@@ -53,7 +54,7 @@ struct ceph_options {
53 unsigned long osd_request_timeout; /* jiffies */ 54 unsigned long osd_request_timeout; /* jiffies */
54 55
55 /* 56 /*
56 * any type that can't be simply compared or doesn't need need 57 * any type that can't be simply compared or doesn't need
57 * to be compared should go beyond this point, 58 * to be compared should go beyond this point,
58 * ceph_compare_options() should be updated accordingly 59 * ceph_compare_options() should be updated accordingly
59 */ 60 */
@@ -281,7 +282,8 @@ extern struct ceph_options *ceph_parse_options(char *options,
281 const char *dev_name, const char *dev_name_end, 282 const char *dev_name, const char *dev_name_end,
282 int (*parse_extra_token)(char *c, void *private), 283 int (*parse_extra_token)(char *c, void *private),
283 void *private); 284 void *private);
284int ceph_print_client_options(struct seq_file *m, struct ceph_client *client); 285int ceph_print_client_options(struct seq_file *m, struct ceph_client *client,
286 bool show_all);
285extern void ceph_destroy_options(struct ceph_options *opt); 287extern void ceph_destroy_options(struct ceph_options *opt);
286extern int ceph_compare_options(struct ceph_options *new_opt, 288extern int ceph_compare_options(struct ceph_options *new_opt,
287 struct ceph_client *client); 289 struct ceph_client *client);
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 7a2af5034278..2294f963dab7 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -354,7 +354,6 @@ struct ceph_osd_client {
354 struct rb_root linger_map_checks; 354 struct rb_root linger_map_checks;
355 atomic_t num_requests; 355 atomic_t num_requests;
356 atomic_t num_homeless; 356 atomic_t num_homeless;
357 bool abort_on_full; /* abort w/ ENOSPC when full */
358 int abort_err; 357 int abort_err;
359 struct delayed_work timeout_work; 358 struct delayed_work timeout_work;
360 struct delayed_work osds_timeout_work; 359 struct delayed_work osds_timeout_work;
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index e443fa9fa859..b7cf80a71293 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -792,6 +792,9 @@ unsigned int __clk_get_enable_count(struct clk *clk);
792unsigned long clk_hw_get_rate(const struct clk_hw *hw); 792unsigned long clk_hw_get_rate(const struct clk_hw *hw);
793unsigned long __clk_get_flags(struct clk *clk); 793unsigned long __clk_get_flags(struct clk *clk);
794unsigned long clk_hw_get_flags(const struct clk_hw *hw); 794unsigned long clk_hw_get_flags(const struct clk_hw *hw);
795#define clk_hw_can_set_rate_parent(hw) \
796 (clk_hw_get_flags((hw)) & CLK_SET_RATE_PARENT)
797
795bool clk_hw_is_prepared(const struct clk_hw *hw); 798bool clk_hw_is_prepared(const struct clk_hw *hw);
796bool clk_hw_rate_is_protected(const struct clk_hw *hw); 799bool clk_hw_rate_is_protected(const struct clk_hw *hw);
797bool clk_hw_is_enabled(const struct clk_hw *hw); 800bool clk_hw_is_enabled(const struct clk_hw *hw);
diff --git a/include/linux/clk.h b/include/linux/clk.h
index a7773b5c0b9f..d8bc1a856b39 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -384,6 +384,17 @@ int __must_check devm_clk_bulk_get_all(struct device *dev,
384struct clk *devm_clk_get(struct device *dev, const char *id); 384struct clk *devm_clk_get(struct device *dev, const char *id);
385 385
386/** 386/**
387 * devm_clk_get_optional - lookup and obtain a managed reference to an optional
388 * clock producer.
389 * @dev: device for clock "consumer"
390 * @id: clock consumer ID
391 *
392 * Behaves the same as devm_clk_get() except where there is no clock producer.
393 * In this case, instead of returning -ENOENT, the function returns NULL.
394 */
395struct clk *devm_clk_get_optional(struct device *dev, const char *id);
396
397/**
387 * devm_get_clk_from_child - lookup and obtain a managed reference to a 398 * devm_get_clk_from_child - lookup and obtain a managed reference to a
388 * clock producer from child node. 399 * clock producer from child node.
389 * @dev: device for clock "consumer" 400 * @dev: device for clock "consumer"
@@ -718,6 +729,12 @@ static inline struct clk *devm_clk_get(struct device *dev, const char *id)
718 return NULL; 729 return NULL;
719} 730}
720 731
732static inline struct clk *devm_clk_get_optional(struct device *dev,
733 const char *id)
734{
735 return NULL;
736}
737
721static inline int __must_check devm_clk_bulk_get(struct device *dev, int num_clks, 738static inline int __must_check devm_clk_bulk_get(struct device *dev, int num_clks,
722 struct clk_bulk_data *clks) 739 struct clk_bulk_data *clks)
723{ 740{
@@ -862,6 +879,25 @@ static inline void clk_bulk_disable_unprepare(int num_clks,
862 clk_bulk_unprepare(num_clks, clks); 879 clk_bulk_unprepare(num_clks, clks);
863} 880}
864 881
882/**
883 * clk_get_optional - lookup and obtain a reference to an optional clock
884 * producer.
885 * @dev: device for clock "consumer"
886 * @id: clock consumer ID
887 *
888 * Behaves the same as clk_get() except where there is no clock producer. In
889 * this case, instead of returning -ENOENT, the function returns NULL.
890 */
891static inline struct clk *clk_get_optional(struct device *dev, const char *id)
892{
893 struct clk *clk = clk_get(dev, id);
894
895 if (clk == ERR_PTR(-ENOENT))
896 return NULL;
897
898 return clk;
899}
900
865#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK) 901#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
866struct clk *of_clk_get(struct device_node *np, int index); 902struct clk *of_clk_get(struct device_node *np, int index);
867struct clk *of_clk_get_by_name(struct device_node *np, const char *name); 903struct clk *of_clk_get_by_name(struct device_node *np, const char *name);
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h
index eacc5df57b99..78872efc7be0 100644
--- a/include/linux/clk/ti.h
+++ b/include/linux/clk/ti.h
@@ -160,6 +160,7 @@ struct clk_hw_omap {
160 struct clockdomain *clkdm; 160 struct clockdomain *clkdm;
161 const struct clk_hw_omap_ops *ops; 161 const struct clk_hw_omap_ops *ops;
162 u32 context; 162 u32 context;
163 int autoidle_count;
163}; 164};
164 165
165/* 166/*
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h
index 4890ff033220..ccb32af5848b 100644
--- a/include/linux/clkdev.h
+++ b/include/linux/clkdev.h
@@ -52,4 +52,8 @@ int clk_add_alias(const char *, const char *, const char *, struct device *);
52int clk_register_clkdev(struct clk *, const char *, const char *); 52int clk_register_clkdev(struct clk *, const char *, const char *);
53int clk_hw_register_clkdev(struct clk_hw *, const char *, const char *); 53int clk_hw_register_clkdev(struct clk_hw *, const char *, const char *);
54 54
55int devm_clk_hw_register_clkdev(struct device *dev, struct clk_hw *hw,
56 const char *con_id, const char *dev_id);
57void devm_clk_release_clkdev(struct device *dev, const char *con_id,
58 const char *dev_id);
55#endif 59#endif
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
index 39f668d5066b..333a6695a918 100644
--- a/include/linux/compiler-clang.h
+++ b/include/linux/compiler-clang.h
@@ -3,9 +3,8 @@
3#error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead." 3#error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
4#endif 4#endif
5 5
6/* Some compiler specific definitions are overwritten here 6/* Compiler specific definitions for Clang compiler */
7 * for Clang compiler 7
8 */
9#define uninitialized_var(x) x = *(&(x)) 8#define uninitialized_var(x) x = *(&(x))
10 9
11/* same as gcc, this was present in clang-2.6 so we can assume it works 10/* same as gcc, this was present in clang-2.6 so we can assume it works
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 5776da43da97..e8579412ad21 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -58,17 +58,13 @@
58 (typeof(ptr)) (__ptr + (off)); \ 58 (typeof(ptr)) (__ptr + (off)); \
59}) 59})
60 60
61/* Make the optimizer believe the variable can be manipulated arbitrarily. */
62#define OPTIMIZER_HIDE_VAR(var) \
63 __asm__ ("" : "=r" (var) : "0" (var))
64
65/* 61/*
66 * A trick to suppress uninitialized variable warning without generating any 62 * A trick to suppress uninitialized variable warning without generating any
67 * code 63 * code
68 */ 64 */
69#define uninitialized_var(x) x = x 65#define uninitialized_var(x) x = x
70 66
71#ifdef RETPOLINE 67#ifdef CONFIG_RETPOLINE
72#define __noretpoline __attribute__((__indirect_branch__("keep"))) 68#define __noretpoline __attribute__((__indirect_branch__("keep")))
73#endif 69#endif
74 70
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h
index 517bd14e1222..b17f3cd18334 100644
--- a/include/linux/compiler-intel.h
+++ b/include/linux/compiler-intel.h
@@ -5,9 +5,7 @@
5 5
6#ifdef __ECC 6#ifdef __ECC
7 7
8/* Some compiler specific definitions are overwritten here 8/* Compiler specific definitions for Intel ECC compiler */
9 * for Intel ECC compiler
10 */
11 9
12#include <asm/intrinsics.h> 10#include <asm/intrinsics.h>
13 11
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index fc5004a4b07d..445348facea9 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -161,7 +161,9 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
161#endif 161#endif
162 162
163#ifndef OPTIMIZER_HIDE_VAR 163#ifndef OPTIMIZER_HIDE_VAR
164#define OPTIMIZER_HIDE_VAR(var) barrier() 164/* Make the optimizer believe the variable can be manipulated arbitrarily. */
165#define OPTIMIZER_HIDE_VAR(var) \
166 __asm__ ("" : "=r" (var) : "0" (var))
165#endif 167#endif
166 168
167/* Not-quite-unique ID. */ 169/* Not-quite-unique ID. */
diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h
index 19f32b0c29af..6b318efd8a74 100644
--- a/include/linux/compiler_attributes.h
+++ b/include/linux/compiler_attributes.h
@@ -34,6 +34,7 @@
34#ifndef __has_attribute 34#ifndef __has_attribute
35# define __has_attribute(x) __GCC4_has_attribute_##x 35# define __has_attribute(x) __GCC4_has_attribute_##x
36# define __GCC4_has_attribute___assume_aligned__ (__GNUC_MINOR__ >= 9) 36# define __GCC4_has_attribute___assume_aligned__ (__GNUC_MINOR__ >= 9)
37# define __GCC4_has_attribute___copy__ 0
37# define __GCC4_has_attribute___designated_init__ 0 38# define __GCC4_has_attribute___designated_init__ 0
38# define __GCC4_has_attribute___externally_visible__ 1 39# define __GCC4_has_attribute___externally_visible__ 1
39# define __GCC4_has_attribute___noclone__ 1 40# define __GCC4_has_attribute___noclone__ 1
@@ -101,6 +102,19 @@
101#define __attribute_const__ __attribute__((__const__)) 102#define __attribute_const__ __attribute__((__const__))
102 103
103/* 104/*
105 * Optional: only supported since gcc >= 9
106 * Optional: not supported by clang
107 * Optional: not supported by icc
108 *
109 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-copy-function-attribute
110 */
111#if __has_attribute(__copy__)
112# define __copy(symbol) __attribute__((__copy__(symbol)))
113#else
114# define __copy(symbol)
115#endif
116
117/*
104 * Don't. Just don't. See commit 771c035372a0 ("deprecate the '__deprecated' 118 * Don't. Just don't. See commit 771c035372a0 ("deprecate the '__deprecated'
105 * attribute warnings entirely and for good") for more information. 119 * attribute warnings entirely and for good") for more information.
106 * 120 *
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 218df7f4d3e1..5041357d0297 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -180,12 +180,10 @@ enum cpuhp_smt_control {
180#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT) 180#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT)
181extern enum cpuhp_smt_control cpu_smt_control; 181extern enum cpuhp_smt_control cpu_smt_control;
182extern void cpu_smt_disable(bool force); 182extern void cpu_smt_disable(bool force);
183extern void cpu_smt_check_topology_early(void);
184extern void cpu_smt_check_topology(void); 183extern void cpu_smt_check_topology(void);
185#else 184#else
186# define cpu_smt_control (CPU_SMT_ENABLED) 185# define cpu_smt_control (CPU_SMT_ENABLED)
187static inline void cpu_smt_disable(bool force) { } 186static inline void cpu_smt_disable(bool force) { }
188static inline void cpu_smt_check_topology_early(void) { }
189static inline void cpu_smt_check_topology(void) { } 187static inline void cpu_smt_check_topology(void) { }
190#endif 188#endif
191 189
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index ef4b70f64f33..60996e64c579 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -62,9 +62,10 @@ extern const struct qstr slash_name;
62struct dentry_stat_t { 62struct dentry_stat_t {
63 long nr_dentry; 63 long nr_dentry;
64 long nr_unused; 64 long nr_unused;
65 long age_limit; /* age in seconds */ 65 long age_limit; /* age in seconds */
66 long want_pages; /* pages requested by system */ 66 long want_pages; /* pages requested by system */
67 long dummy[2]; 67 long nr_negative; /* # of unused negative dentries */
68 long dummy; /* Reserved for future use */
68}; 69};
69extern struct dentry_stat_t dentry_stat; 70extern struct dentry_stat_t dentry_stat;
70 71
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index cef2127e1d70..f6ded992c183 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -717,15 +717,6 @@ static inline unsigned long dma_max_pfn(struct device *dev)
717} 717}
718#endif 718#endif
719 719
720/*
721 * Please always use dma_alloc_coherent instead as it already zeroes the memory!
722 */
723static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
724 dma_addr_t *dma_handle, gfp_t flag)
725{
726 return dma_alloc_coherent(dev, size, dma_handle, flag);
727}
728
729static inline int dma_get_cache_alignment(void) 720static inline int dma_get_cache_alignment(void)
730{ 721{
731#ifdef ARCH_DMA_MINALIGN 722#ifdef ARCH_DMA_MINALIGN
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 45ff763fba76..28604a8d0aa9 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1198,8 +1198,6 @@ static inline bool efi_enabled(int feature)
1198extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); 1198extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
1199 1199
1200extern bool efi_is_table_address(unsigned long phys_addr); 1200extern bool efi_is_table_address(unsigned long phys_addr);
1201
1202extern int efi_apply_persistent_mem_reservations(void);
1203#else 1201#else
1204static inline bool efi_enabled(int feature) 1202static inline bool efi_enabled(int feature)
1205{ 1203{
@@ -1218,11 +1216,6 @@ static inline bool efi_is_table_address(unsigned long phys_addr)
1218{ 1216{
1219 return false; 1217 return false;
1220} 1218}
1221
1222static inline int efi_apply_persistent_mem_reservations(void)
1223{
1224 return 0;
1225}
1226#endif 1219#endif
1227 1220
1228extern int efi_status_to_err(efi_status_t status); 1221extern int efi_status_to_err(efi_status_t status);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 7cdd31a69719..f52ef0ad6781 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -653,6 +653,7 @@ extern int fb_new_modelist(struct fb_info *info);
653 653
654extern struct fb_info *registered_fb[FB_MAX]; 654extern struct fb_info *registered_fb[FB_MAX];
655extern int num_registered_fb; 655extern int num_registered_fb;
656extern bool fb_center_logo;
656extern struct class *fb_class; 657extern struct class *fb_class;
657 658
658#define for_each_registered_fb(i) \ 659#define for_each_registered_fb(i) \
diff --git a/include/linux/filter.h b/include/linux/filter.h
index ad106d845b22..e532fcc6e4b5 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -591,8 +591,8 @@ static inline u8 *bpf_skb_cb(struct sk_buff *skb)
591 return qdisc_skb_cb(skb)->data; 591 return qdisc_skb_cb(skb)->data;
592} 592}
593 593
594static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, 594static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog,
595 struct sk_buff *skb) 595 struct sk_buff *skb)
596{ 596{
597 u8 *cb_data = bpf_skb_cb(skb); 597 u8 *cb_data = bpf_skb_cb(skb);
598 u8 cb_saved[BPF_SKB_CB_LEN]; 598 u8 cb_saved[BPF_SKB_CB_LEN];
@@ -611,15 +611,30 @@ static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog,
611 return res; 611 return res;
612} 612}
613 613
614static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog,
615 struct sk_buff *skb)
616{
617 u32 res;
618
619 preempt_disable();
620 res = __bpf_prog_run_save_cb(prog, skb);
621 preempt_enable();
622 return res;
623}
624
614static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, 625static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog,
615 struct sk_buff *skb) 626 struct sk_buff *skb)
616{ 627{
617 u8 *cb_data = bpf_skb_cb(skb); 628 u8 *cb_data = bpf_skb_cb(skb);
629 u32 res;
618 630
619 if (unlikely(prog->cb_access)) 631 if (unlikely(prog->cb_access))
620 memset(cb_data, 0, BPF_SKB_CB_LEN); 632 memset(cb_data, 0, BPF_SKB_CB_LEN);
621 633
622 return BPF_PROG_RUN(prog, skb); 634 preempt_disable();
635 res = BPF_PROG_RUN(prog, skb);
636 preempt_enable();
637 return res;
623} 638}
624 639
625static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, 640static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 811c77743dad..29d8e2cfed0e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1479,11 +1479,12 @@ struct super_block {
1479 struct user_namespace *s_user_ns; 1479 struct user_namespace *s_user_ns;
1480 1480
1481 /* 1481 /*
1482 * Keep the lru lists last in the structure so they always sit on their 1482 * The list_lru structure is essentially just a pointer to a table
1483 * own individual cachelines. 1483 * of per-node lru lists, each of which has its own spinlock.
1484 * There is no need to put them into separate cachelines.
1484 */ 1485 */
1485 struct list_lru s_dentry_lru ____cacheline_aligned_in_smp; 1486 struct list_lru s_dentry_lru;
1486 struct list_lru s_inode_lru ____cacheline_aligned_in_smp; 1487 struct list_lru s_inode_lru;
1487 struct rcu_head rcu; 1488 struct rcu_head rcu;
1488 struct work_struct destroy_work; 1489 struct work_struct destroy_work;
1489 1490
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h
index 8663f216c563..2d6100edf204 100644
--- a/include/linux/hid-debug.h
+++ b/include/linux/hid-debug.h
@@ -24,7 +24,10 @@
24 24
25#ifdef CONFIG_DEBUG_FS 25#ifdef CONFIG_DEBUG_FS
26 26
27#include <linux/kfifo.h>
28
27#define HID_DEBUG_BUFSIZE 512 29#define HID_DEBUG_BUFSIZE 512
30#define HID_DEBUG_FIFOSIZE 512
28 31
29void hid_dump_input(struct hid_device *, struct hid_usage *, __s32); 32void hid_dump_input(struct hid_device *, struct hid_usage *, __s32);
30void hid_dump_report(struct hid_device *, int , u8 *, int); 33void hid_dump_report(struct hid_device *, int , u8 *, int);
@@ -37,11 +40,8 @@ void hid_debug_init(void);
37void hid_debug_exit(void); 40void hid_debug_exit(void);
38void hid_debug_event(struct hid_device *, char *); 41void hid_debug_event(struct hid_device *, char *);
39 42
40
41struct hid_debug_list { 43struct hid_debug_list {
42 char *hid_debug_buf; 44 DECLARE_KFIFO_PTR(hid_debug_fifo, char);
43 int head;
44 int tail;
45 struct fasync_struct *fasync; 45 struct fasync_struct *fasync;
46 struct hid_device *hdev; 46 struct hid_device *hdev;
47 struct list_head node; 47 struct list_head node;
@@ -64,4 +64,3 @@ struct hid_debug_list {
64#endif 64#endif
65 65
66#endif 66#endif
67
diff --git a/include/linux/hid.h b/include/linux/hid.h
index d99287327ef2..f9707d1dcb58 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -430,7 +430,7 @@ struct hid_local {
430 */ 430 */
431 431
432struct hid_collection { 432struct hid_collection {
433 struct hid_collection *parent; 433 int parent_idx; /* device->collection */
434 unsigned type; 434 unsigned type;
435 unsigned usage; 435 unsigned usage;
436 unsigned level; 436 unsigned level;
@@ -658,7 +658,6 @@ struct hid_parser {
658 unsigned int *collection_stack; 658 unsigned int *collection_stack;
659 unsigned int collection_stack_ptr; 659 unsigned int collection_stack_ptr;
660 unsigned int collection_stack_size; 660 unsigned int collection_stack_size;
661 struct hid_collection *active_collection;
662 struct hid_device *device; 661 struct hid_device *device;
663 unsigned int scan_flags; 662 unsigned int scan_flags;
664}; 663};
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index f0885cc01db6..dcb6977afce9 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1159,8 +1159,9 @@ struct hv_ring_buffer_debug_info {
1159 u32 bytes_avail_towrite; 1159 u32 bytes_avail_towrite;
1160}; 1160};
1161 1161
1162void hv_ringbuffer_get_debuginfo(const struct hv_ring_buffer_info *ring_info, 1162
1163 struct hv_ring_buffer_debug_info *debug_info); 1163int hv_ringbuffer_get_debuginfo(const struct hv_ring_buffer_info *ring_info,
1164 struct hv_ring_buffer_debug_info *debug_info);
1164 1165
1165/* Vmbus interface */ 1166/* Vmbus interface */
1166#define vmbus_driver_register(driver) \ 1167#define vmbus_driver_register(driver) \
diff --git a/include/linux/ide.h b/include/linux/ide.h
index e7d29ae633cd..971cf76a78a0 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -615,6 +615,7 @@ struct ide_drive_s {
615 615
616 /* current sense rq and buffer */ 616 /* current sense rq and buffer */
617 bool sense_rq_armed; 617 bool sense_rq_armed;
618 bool sense_rq_active;
618 struct request *sense_rq; 619 struct request *sense_rq;
619 struct request_sense sense_data; 620 struct request_sense sense_data;
620 621
@@ -1219,6 +1220,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout);
1219extern void ide_timer_expiry(struct timer_list *t); 1220extern void ide_timer_expiry(struct timer_list *t);
1220extern irqreturn_t ide_intr(int irq, void *dev_id); 1221extern irqreturn_t ide_intr(int irq, void *dev_id);
1221extern blk_status_t ide_queue_rq(struct blk_mq_hw_ctx *, const struct blk_mq_queue_data *); 1222extern blk_status_t ide_queue_rq(struct blk_mq_hw_ctx *, const struct blk_mq_queue_data *);
1223extern blk_status_t ide_issue_rq(ide_drive_t *, struct request *, bool);
1222extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq); 1224extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq);
1223 1225
1224void ide_init_disk(struct gendisk *, ide_drive_t *); 1226void ide_init_disk(struct gendisk *, ide_drive_t *);
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 6756fea18b69..e44746de95cd 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -54,6 +54,7 @@ static inline bool dev_is_mac_header_xmit(const struct net_device *dev)
54 case ARPHRD_IPGRE: 54 case ARPHRD_IPGRE:
55 case ARPHRD_VOID: 55 case ARPHRD_VOID:
56 case ARPHRD_NONE: 56 case ARPHRD_NONE:
57 case ARPHRD_RAWIP:
57 return false; 58 return false;
58 default: 59 default:
59 return true; 60 return true;
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index c672f34235e7..4a728dba02e2 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -260,6 +260,7 @@ struct irq_affinity {
260/** 260/**
261 * struct irq_affinity_desc - Interrupt affinity descriptor 261 * struct irq_affinity_desc - Interrupt affinity descriptor
262 * @mask: cpumask to hold the affinity assignment 262 * @mask: cpumask to hold the affinity assignment
263 * @is_managed: 1 if the interrupt is managed internally
263 */ 264 */
264struct irq_affinity_desc { 265struct irq_affinity_desc {
265 struct cpumask mask; 266 struct cpumask mask;
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 071b4cbdf010..c848a7cc502e 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -319,7 +319,7 @@
319#define GITS_TYPER_PLPIS (1UL << 0) 319#define GITS_TYPER_PLPIS (1UL << 0)
320#define GITS_TYPER_VLPIS (1UL << 1) 320#define GITS_TYPER_VLPIS (1UL << 1)
321#define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT 4 321#define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT 4
322#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1) 322#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
323#define GITS_TYPER_IDBITS_SHIFT 8 323#define GITS_TYPER_IDBITS_SHIFT 8
324#define GITS_TYPER_DEVBITS_SHIFT 13 324#define GITS_TYPER_DEVBITS_SHIFT 13
325#define GITS_TYPER_DEVBITS(r) ((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1) 325#define GITS_TYPER_DEVBITS(r) ((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
diff --git a/include/linux/key-type.h b/include/linux/key-type.h
index bc9af551fc83..e49d1de0614e 100644
--- a/include/linux/key-type.h
+++ b/include/linux/key-type.h
@@ -21,15 +21,6 @@ struct kernel_pkey_query;
21struct kernel_pkey_params; 21struct kernel_pkey_params;
22 22
23/* 23/*
24 * key under-construction record
25 * - passed to the request_key actor if supplied
26 */
27struct key_construction {
28 struct key *key; /* key being constructed */
29 struct key *authkey;/* authorisation for key being constructed */
30};
31
32/*
33 * Pre-parsed payload, used by key add, update and instantiate. 24 * Pre-parsed payload, used by key add, update and instantiate.
34 * 25 *
35 * This struct will be cleared and data and datalen will be set with the data 26 * This struct will be cleared and data and datalen will be set with the data
@@ -50,8 +41,7 @@ struct key_preparsed_payload {
50 time64_t expiry; /* Expiry time of key */ 41 time64_t expiry; /* Expiry time of key */
51} __randomize_layout; 42} __randomize_layout;
52 43
53typedef int (*request_key_actor_t)(struct key_construction *key, 44typedef int (*request_key_actor_t)(struct key *auth_key, void *aux);
54 const char *op, void *aux);
55 45
56/* 46/*
57 * Preparsed matching criterion. 47 * Preparsed matching criterion.
@@ -181,20 +171,20 @@ extern int key_instantiate_and_link(struct key *key,
181 const void *data, 171 const void *data,
182 size_t datalen, 172 size_t datalen,
183 struct key *keyring, 173 struct key *keyring,
184 struct key *instkey); 174 struct key *authkey);
185extern int key_reject_and_link(struct key *key, 175extern int key_reject_and_link(struct key *key,
186 unsigned timeout, 176 unsigned timeout,
187 unsigned error, 177 unsigned error,
188 struct key *keyring, 178 struct key *keyring,
189 struct key *instkey); 179 struct key *authkey);
190extern void complete_request_key(struct key_construction *cons, int error); 180extern void complete_request_key(struct key *authkey, int error);
191 181
192static inline int key_negate_and_link(struct key *key, 182static inline int key_negate_and_link(struct key *key,
193 unsigned timeout, 183 unsigned timeout,
194 struct key *keyring, 184 struct key *keyring,
195 struct key *instkey) 185 struct key *authkey)
196{ 186{
197 return key_reject_and_link(key, timeout, ENOKEY, keyring, instkey); 187 return key_reject_and_link(key, timeout, ENOKEY, keyring, authkey);
198} 188}
199 189
200extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep); 190extern int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep);
diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h
index 5440f11b0907..ad609617aeb8 100644
--- a/include/linux/libnvdimm.h
+++ b/include/linux/libnvdimm.h
@@ -160,6 +160,7 @@ static inline struct nd_blk_region_desc *to_blk_region_desc(
160} 160}
161 161
162enum nvdimm_security_state { 162enum nvdimm_security_state {
163 NVDIMM_SECURITY_ERROR = -1,
163 NVDIMM_SECURITY_DISABLED, 164 NVDIMM_SECURITY_DISABLED,
164 NVDIMM_SECURITY_UNLOCKED, 165 NVDIMM_SECURITY_UNLOCKED,
165 NVDIMM_SECURITY_LOCKED, 166 NVDIMM_SECURITY_LOCKED,
@@ -234,7 +235,6 @@ static inline struct nvdimm *nvdimm_create(struct nvdimm_bus *nvdimm_bus,
234 cmd_mask, num_flush, flush_wpq, NULL, NULL); 235 cmd_mask, num_flush, flush_wpq, NULL, NULL);
235} 236}
236 237
237int nvdimm_security_setup_events(struct nvdimm *nvdimm);
238const struct nd_cmd_desc *nd_cmd_dimm_desc(int cmd); 238const struct nd_cmd_desc *nd_cmd_dimm_desc(int cmd);
239const struct nd_cmd_desc *nd_cmd_bus_desc(int cmd); 239const struct nd_cmd_desc *nd_cmd_bus_desc(int cmd);
240u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd, 240u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd,
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 64c41cf45590..859b55b66db2 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -29,9 +29,6 @@ extern unsigned long max_pfn;
29 */ 29 */
30extern unsigned long long max_possible_pfn; 30extern unsigned long long max_possible_pfn;
31 31
32#define INIT_MEMBLOCK_REGIONS 128
33#define INIT_PHYSMEM_REGIONS 4
34
35/** 32/**
36 * enum memblock_flags - definition of memory region attributes 33 * enum memblock_flags - definition of memory region attributes
37 * @MEMBLOCK_NONE: no special request 34 * @MEMBLOCK_NONE: no special request
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 07da5c6c5ba0..368267c1b71b 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -21,14 +21,16 @@ struct vmem_altmap;
21 * walkers which rely on the fully initialized page->flags and others 21 * walkers which rely on the fully initialized page->flags and others
22 * should use this rather than pfn_valid && pfn_to_page 22 * should use this rather than pfn_valid && pfn_to_page
23 */ 23 */
24#define pfn_to_online_page(pfn) \ 24#define pfn_to_online_page(pfn) \
25({ \ 25({ \
26 struct page *___page = NULL; \ 26 struct page *___page = NULL; \
27 unsigned long ___nr = pfn_to_section_nr(pfn); \ 27 unsigned long ___pfn = pfn; \
28 \ 28 unsigned long ___nr = pfn_to_section_nr(___pfn); \
29 if (___nr < NR_MEM_SECTIONS && online_section_nr(___nr))\ 29 \
30 ___page = pfn_to_page(pfn); \ 30 if (___nr < NR_MEM_SECTIONS && online_section_nr(___nr) && \
31 ___page; \ 31 pfn_valid_within(___pfn)) \
32 ___page = pfn_to_page(___pfn); \
33 ___page; \
32}) 34})
33 35
34/* 36/*
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 9a9631f0559e..fc91082d4c35 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -2791,6 +2791,100 @@ struct ec_response_battery_vendor_param {
2791} __packed; 2791} __packed;
2792 2792
2793/*****************************************************************************/ 2793/*****************************************************************************/
2794/* Commands for I2S recording on audio codec. */
2795
2796#define EC_CMD_CODEC_I2S 0x00BC
2797
2798enum ec_codec_i2s_subcmd {
2799 EC_CODEC_SET_SAMPLE_DEPTH = 0x0,
2800 EC_CODEC_SET_GAIN = 0x1,
2801 EC_CODEC_GET_GAIN = 0x2,
2802 EC_CODEC_I2S_ENABLE = 0x3,
2803 EC_CODEC_I2S_SET_CONFIG = 0x4,
2804 EC_CODEC_I2S_SET_TDM_CONFIG = 0x5,
2805 EC_CODEC_I2S_SET_BCLK = 0x6,
2806};
2807
2808enum ec_sample_depth_value {
2809 EC_CODEC_SAMPLE_DEPTH_16 = 0,
2810 EC_CODEC_SAMPLE_DEPTH_24 = 1,
2811};
2812
2813enum ec_i2s_config {
2814 EC_DAI_FMT_I2S = 0,
2815 EC_DAI_FMT_RIGHT_J = 1,
2816 EC_DAI_FMT_LEFT_J = 2,
2817 EC_DAI_FMT_PCM_A = 3,
2818 EC_DAI_FMT_PCM_B = 4,
2819 EC_DAI_FMT_PCM_TDM = 5,
2820};
2821
2822struct ec_param_codec_i2s {
2823 /*
2824 * enum ec_codec_i2s_subcmd
2825 */
2826 uint8_t cmd;
2827 union {
2828 /*
2829 * EC_CODEC_SET_SAMPLE_DEPTH
2830 * Value should be one of ec_sample_depth_value.
2831 */
2832 uint8_t depth;
2833
2834 /*
2835 * EC_CODEC_SET_GAIN
2836 * Value should be 0~43 for both channels.
2837 */
2838 struct ec_param_codec_i2s_set_gain {
2839 uint8_t left;
2840 uint8_t right;
2841 } __packed gain;
2842
2843 /*
2844 * EC_CODEC_I2S_ENABLE
2845 * 1 to enable, 0 to disable.
2846 */
2847 uint8_t i2s_enable;
2848
2849 /*
2850 * EC_CODEC_I2S_SET_COFNIG
2851 * Value should be one of ec_i2s_config.
2852 */
2853 uint8_t i2s_config;
2854
2855 /*
2856 * EC_CODEC_I2S_SET_TDM_CONFIG
2857 * Value should be one of ec_i2s_config.
2858 */
2859 struct ec_param_codec_i2s_tdm {
2860 /*
2861 * 0 to 496
2862 */
2863 int16_t ch0_delay;
2864 /*
2865 * -1 to 496
2866 */
2867 int16_t ch1_delay;
2868 uint8_t adjacent_to_ch0;
2869 uint8_t adjacent_to_ch1;
2870 } __packed tdm_param;
2871
2872 /*
2873 * EC_CODEC_I2S_SET_BCLK
2874 */
2875 uint32_t bclk;
2876 };
2877} __packed;
2878
2879/*
2880 * For subcommand EC_CODEC_GET_GAIN.
2881 */
2882struct ec_response_codec_gain {
2883 uint8_t left;
2884 uint8_t right;
2885} __packed;
2886
2887/*****************************************************************************/
2794/* System commands */ 2888/* System commands */
2795 2889
2796/* 2890/*
diff --git a/include/linux/mfd/ingenic-tcu.h b/include/linux/mfd/ingenic-tcu.h
index ab16ad283def..2083fa20821d 100644
--- a/include/linux/mfd/ingenic-tcu.h
+++ b/include/linux/mfd/ingenic-tcu.h
@@ -41,7 +41,7 @@
41#define TCU_TCSR_PRESCALE_LSB 3 41#define TCU_TCSR_PRESCALE_LSB 3
42#define TCU_TCSR_PRESCALE_MASK 0x38 42#define TCU_TCSR_PRESCALE_MASK 0x38
43 43
44#define TCU_TCSR_PWM_SD BIT(9) /* 0: Shutdown abruptly 1: gracefully */ 44#define TCU_TCSR_PWM_SD BIT(9) /* 0: Shutdown gracefully 1: abruptly */
45#define TCU_TCSR_PWM_INITL_HIGH BIT(8) /* Sets the initial output level */ 45#define TCU_TCSR_PWM_INITL_HIGH BIT(8) /* Sets the initial output level */
46#define TCU_TCSR_PWM_EN BIT(7) /* PWM pin output enable */ 46#define TCU_TCSR_PWM_EN BIT(7) /* PWM pin output enable */
47 47
diff --git a/include/linux/mfd/madera/core.h b/include/linux/mfd/madera/core.h
index fe69c0f4398f..4d5d51a9c8a6 100644
--- a/include/linux/mfd/madera/core.h
+++ b/include/linux/mfd/madera/core.h
@@ -15,6 +15,7 @@
15#include <linux/gpio/consumer.h> 15#include <linux/gpio/consumer.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/mfd/madera/pdata.h> 17#include <linux/mfd/madera/pdata.h>
18#include <linux/mutex.h>
18#include <linux/notifier.h> 19#include <linux/notifier.h>
19#include <linux/regmap.h> 20#include <linux/regmap.h>
20#include <linux/regulator/consumer.h> 21#include <linux/regulator/consumer.h>
@@ -37,6 +38,8 @@ enum madera_type {
37 38
38#define MADERA_MAX_MICBIAS 4 39#define MADERA_MAX_MICBIAS 4
39 40
41#define MADERA_MAX_HP_OUTPUT 3
42
40/* Notifier events */ 43/* Notifier events */
41#define MADERA_NOTIFY_VOICE_TRIGGER 0x1 44#define MADERA_NOTIFY_VOICE_TRIGGER 0x1
42#define MADERA_NOTIFY_HPDET 0x2 45#define MADERA_NOTIFY_HPDET 0x2
@@ -183,6 +186,10 @@ struct madera {
183 unsigned int num_childbias[MADERA_MAX_MICBIAS]; 186 unsigned int num_childbias[MADERA_MAX_MICBIAS];
184 187
185 struct snd_soc_dapm_context *dapm; 188 struct snd_soc_dapm_context *dapm;
189 struct mutex dapm_ptr_lock;
190 unsigned int hp_ena;
191 bool out_clamp[MADERA_MAX_HP_OUTPUT];
192 bool out_shorted[MADERA_MAX_HP_OUTPUT];
186 193
187 struct blocking_notifier_head notifier; 194 struct blocking_notifier_head notifier;
188}; 195};
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index b9a53e013bff..483168403ae5 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -78,6 +78,8 @@
78#define STEPCONFIG_YNN BIT(8) 78#define STEPCONFIG_YNN BIT(8)
79#define STEPCONFIG_XNP BIT(9) 79#define STEPCONFIG_XNP BIT(9)
80#define STEPCONFIG_YPN BIT(10) 80#define STEPCONFIG_YPN BIT(10)
81#define STEPCONFIG_RFP(val) ((val) << 12)
82#define STEPCONFIG_RFP_VREFP (0x3 << 12)
81#define STEPCONFIG_INM_MASK (0xF << 15) 83#define STEPCONFIG_INM_MASK (0xF << 15)
82#define STEPCONFIG_INM(val) ((val) << 15) 84#define STEPCONFIG_INM(val) ((val) << 15)
83#define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) 85#define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8)
@@ -86,6 +88,8 @@
86#define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) 88#define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4)
87#define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) 89#define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8)
88#define STEPCONFIG_FIFO1 BIT(26) 90#define STEPCONFIG_FIFO1 BIT(26)
91#define STEPCONFIG_RFM(val) ((val) << 23)
92#define STEPCONFIG_RFM_VREFN (0x3 << 23)
89 93
90/* Delay register */ 94/* Delay register */
91#define STEPDELAY_OPEN_MASK (0x3FFFF << 0) 95#define STEPDELAY_OPEN_MASK (0x3FFFF << 0)
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index e2687a30e5a1..739b7bf37eaa 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -79,7 +79,7 @@
79/* Some controllers have a CBSY bit */ 79/* Some controllers have a CBSY bit */
80#define TMIO_MMC_HAVE_CBSY BIT(11) 80#define TMIO_MMC_HAVE_CBSY BIT(11)
81 81
82/* Some controllers that support HS400 use use 4 taps while others use 8. */ 82/* Some controllers that support HS400 use 4 taps while others use 8. */
83#define TMIO_MMC_HAVE_4TAP_HS400 BIT(13) 83#define TMIO_MMC_HAVE_4TAP_HS400 BIT(13)
84 84
85int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); 85int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index de7377815b6b..8ef330027b13 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -308,6 +308,7 @@ struct mmc_card {
308 unsigned int nr_parts; 308 unsigned int nr_parts;
309 309
310 unsigned int bouncesz; /* Bounce buffer size */ 310 unsigned int bouncesz; /* Bounce buffer size */
311 struct workqueue_struct *complete_wq; /* Private workqueue */
311}; 312};
312 313
313static inline bool mmc_large_sector(struct mmc_card *card) 314static inline bool mmc_large_sector(struct mmc_card *card)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index cc4a507d7ca4..842f9189537b 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -520,6 +520,12 @@ enum pgdat_flags {
520 PGDAT_RECLAIM_LOCKED, /* prevents concurrent reclaim */ 520 PGDAT_RECLAIM_LOCKED, /* prevents concurrent reclaim */
521}; 521};
522 522
523enum zone_flags {
524 ZONE_BOOSTED_WATERMARK, /* zone recently boosted watermarks.
525 * Cleared when kswapd is woken.
526 */
527};
528
523static inline unsigned long zone_managed_pages(struct zone *zone) 529static inline unsigned long zone_managed_pages(struct zone *zone)
524{ 530{
525 return (unsigned long)atomic_long_read(&zone->managed_pages); 531 return (unsigned long)atomic_long_read(&zone->managed_pages);
diff --git a/include/linux/module.h b/include/linux/module.h
index 9a21fe3509af..f5bc4c046461 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -129,13 +129,13 @@ extern void cleanup_module(void);
129#define module_init(initfn) \ 129#define module_init(initfn) \
130 static inline initcall_t __maybe_unused __inittest(void) \ 130 static inline initcall_t __maybe_unused __inittest(void) \
131 { return initfn; } \ 131 { return initfn; } \
132 int init_module(void) __attribute__((alias(#initfn))); 132 int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
133 133
134/* This is only required if you want to be unloadable. */ 134/* This is only required if you want to be unloadable. */
135#define module_exit(exitfn) \ 135#define module_exit(exitfn) \
136 static inline exitcall_t __maybe_unused __exittest(void) \ 136 static inline exitcall_t __maybe_unused __exittest(void) \
137 { return exitfn; } \ 137 { return exitfn; } \
138 void cleanup_module(void) __attribute__((alias(#exitfn))); 138 void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
139 139
140#endif 140#endif
141 141
@@ -828,7 +828,7 @@ static inline void module_bug_finalize(const Elf_Ehdr *hdr,
828static inline void module_bug_cleanup(struct module *mod) {} 828static inline void module_bug_cleanup(struct module *mod) {}
829#endif /* CONFIG_GENERIC_BUG */ 829#endif /* CONFIG_GENERIC_BUG */
830 830
831#ifdef RETPOLINE 831#ifdef CONFIG_RETPOLINE
832extern bool retpoline_module_ok(bool has_retpoline); 832extern bool retpoline_module_ok(bool has_retpoline);
833#else 833#else
834static inline bool retpoline_module_ok(bool has_retpoline) 834static inline bool retpoline_module_ok(bool has_retpoline)
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 2b2a6dce1630..4c76fe2c8488 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -11,6 +11,8 @@
11#define _LINUX_NETDEV_FEATURES_H 11#define _LINUX_NETDEV_FEATURES_H
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/bitops.h>
15#include <asm/byteorder.h>
14 16
15typedef u64 netdev_features_t; 17typedef u64 netdev_features_t;
16 18
@@ -154,8 +156,26 @@ enum {
154#define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX) 156#define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX)
155#define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX) 157#define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX)
156 158
157#define for_each_netdev_feature(mask_addr, bit) \ 159/* Finds the next feature with the highest number of the range of start till 0.
158 for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT) 160 */
161static inline int find_next_netdev_feature(u64 feature, unsigned long start)
162{
163 /* like BITMAP_LAST_WORD_MASK() for u64
164 * this sets the most significant 64 - start to 0.
165 */
166 feature &= ~0ULL >> (-start & ((sizeof(feature) * 8) - 1));
167
168 return fls64(feature) - 1;
169}
170
171/* This goes for the MSB to the LSB through the set feature bits,
172 * mask_addr should be a u64 and bit an int
173 */
174#define for_each_netdev_feature(mask_addr, bit) \
175 for ((bit) = find_next_netdev_feature((mask_addr), \
176 NETDEV_FEATURE_COUNT); \
177 (bit) >= 0; \
178 (bit) = find_next_netdev_feature((mask_addr), (bit) - 1))
159 179
160/* Features valid for ethtool to change */ 180/* Features valid for ethtool to change */
161/* = all defined minus driver/device-class-related */ 181/* = all defined minus driver/device-class-related */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1377d085ef99..86dbb3e29139 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1483,6 +1483,7 @@ struct net_device_ops {
1483 * @IFF_NO_RX_HANDLER: device doesn't support the rx_handler hook 1483 * @IFF_NO_RX_HANDLER: device doesn't support the rx_handler hook
1484 * @IFF_FAILOVER: device is a failover master device 1484 * @IFF_FAILOVER: device is a failover master device
1485 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device 1485 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device
1486 * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device
1486 */ 1487 */
1487enum netdev_priv_flags { 1488enum netdev_priv_flags {
1488 IFF_802_1Q_VLAN = 1<<0, 1489 IFF_802_1Q_VLAN = 1<<0,
@@ -1514,6 +1515,7 @@ enum netdev_priv_flags {
1514 IFF_NO_RX_HANDLER = 1<<26, 1515 IFF_NO_RX_HANDLER = 1<<26,
1515 IFF_FAILOVER = 1<<27, 1516 IFF_FAILOVER = 1<<27,
1516 IFF_FAILOVER_SLAVE = 1<<28, 1517 IFF_FAILOVER_SLAVE = 1<<28,
1518 IFF_L3MDEV_RX_HANDLER = 1<<29,
1517}; 1519};
1518 1520
1519#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN 1521#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1544,6 +1546,7 @@ enum netdev_priv_flags {
1544#define IFF_NO_RX_HANDLER IFF_NO_RX_HANDLER 1546#define IFF_NO_RX_HANDLER IFF_NO_RX_HANDLER
1545#define IFF_FAILOVER IFF_FAILOVER 1547#define IFF_FAILOVER IFF_FAILOVER
1546#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE 1548#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
1549#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
1547 1550
1548/** 1551/**
1549 * struct net_device - The DEVICE structure. 1552 * struct net_device - The DEVICE structure.
@@ -4549,6 +4552,11 @@ static inline bool netif_supports_nofcs(struct net_device *dev)
4549 return dev->priv_flags & IFF_SUPP_NOFCS; 4552 return dev->priv_flags & IFF_SUPP_NOFCS;
4550} 4553}
4551 4554
4555static inline bool netif_has_l3_rx_handler(const struct net_device *dev)
4556{
4557 return dev->priv_flags & IFF_L3MDEV_RX_HANDLER;
4558}
4559
4552static inline bool netif_is_l3_master(const struct net_device *dev) 4560static inline bool netif_is_l3_master(const struct net_device *dev)
4553{ 4561{
4554 return dev->priv_flags & IFF_L3MDEV_MASTER; 4562 return dev->priv_flags & IFF_L3MDEV_MASTER;
diff --git a/include/linux/of.h b/include/linux/of.h
index fe472e5195a9..e240992e5cb6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -50,7 +50,6 @@ struct of_irq_controller;
50 50
51struct device_node { 51struct device_node {
52 const char *name; 52 const char *name;
53 const char *type;
54 phandle phandle; 53 phandle phandle;
55 const char *full_name; 54 const char *full_name;
56 struct fwnode_handle fwnode; 55 struct fwnode_handle fwnode;
diff --git a/include/linux/pci-dma-compat.h b/include/linux/pci-dma-compat.h
index cb1adf0b78a9..249d4d7fbf18 100644
--- a/include/linux/pci-dma-compat.h
+++ b/include/linux/pci-dma-compat.h
@@ -24,7 +24,7 @@ static inline void *
24pci_zalloc_consistent(struct pci_dev *hwdev, size_t size, 24pci_zalloc_consistent(struct pci_dev *hwdev, size_t size,
25 dma_addr_t *dma_handle) 25 dma_addr_t *dma_handle)
26{ 26{
27 return dma_zalloc_coherent(&hwdev->dev, size, dma_handle, GFP_ATOMIC); 27 return dma_alloc_coherent(&hwdev->dev, size, dma_handle, GFP_ATOMIC);
28} 28}
29 29
30static inline void 30static inline void
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 1d5c551a5add..e1a051724f7e 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -447,6 +447,11 @@ struct pmu {
447 * Filter events for PMU-specific reasons. 447 * Filter events for PMU-specific reasons.
448 */ 448 */
449 int (*filter_match) (struct perf_event *event); /* optional */ 449 int (*filter_match) (struct perf_event *event); /* optional */
450
451 /*
452 * Check period value for PERF_EVENT_IOC_PERIOD ioctl.
453 */
454 int (*check_period) (struct perf_event *event, u64 value); /* optional */
450}; 455};
451 456
452enum perf_addr_filter_action_t { 457enum perf_addr_filter_action_t {
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 3b051f761450..333b56d8f746 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -48,6 +48,7 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_features) __ro_after_init;
48extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_fibre_features) __ro_after_init; 48extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_fibre_features) __ro_after_init;
49extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_all_ports_features) __ro_after_init; 49extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_all_ports_features) __ro_after_init;
50extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_features) __ro_after_init; 50extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_features) __ro_after_init;
51extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_fec_features) __ro_after_init;
51extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_init; 52extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_init;
52 53
53#define PHY_BASIC_FEATURES ((unsigned long *)&phy_basic_features) 54#define PHY_BASIC_FEATURES ((unsigned long *)&phy_basic_features)
@@ -56,6 +57,7 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_ini
56#define PHY_GBIT_FIBRE_FEATURES ((unsigned long *)&phy_gbit_fibre_features) 57#define PHY_GBIT_FIBRE_FEATURES ((unsigned long *)&phy_gbit_fibre_features)
57#define PHY_GBIT_ALL_PORTS_FEATURES ((unsigned long *)&phy_gbit_all_ports_features) 58#define PHY_GBIT_ALL_PORTS_FEATURES ((unsigned long *)&phy_gbit_all_ports_features)
58#define PHY_10GBIT_FEATURES ((unsigned long *)&phy_10gbit_features) 59#define PHY_10GBIT_FEATURES ((unsigned long *)&phy_10gbit_features)
60#define PHY_10GBIT_FEC_FEATURES ((unsigned long *)&phy_10gbit_fec_features)
59#define PHY_10GBIT_FULL_FEATURES ((unsigned long *)&phy_10gbit_full_features) 61#define PHY_10GBIT_FULL_FEATURES ((unsigned long *)&phy_10gbit_full_features)
60 62
61extern const int phy_10_100_features_array[4]; 63extern const int phy_10_100_features_array[4];
@@ -467,8 +469,8 @@ struct phy_device {
467 * only works for PHYs with IDs which match this field 469 * only works for PHYs with IDs which match this field
468 * name: The friendly name of this PHY type 470 * name: The friendly name of this PHY type
469 * phy_id_mask: Defines the important bits of the phy_id 471 * phy_id_mask: Defines the important bits of the phy_id
470 * features: A list of features (speed, duplex, etc) supported 472 * features: A mandatory list of features (speed, duplex, etc)
471 * by this PHY 473 * supported by this PHY
472 * flags: A bitfield defining certain other features this PHY 474 * flags: A bitfield defining certain other features this PHY
473 * supports (like interrupts) 475 * supports (like interrupts)
474 * 476 *
@@ -672,26 +674,13 @@ phy_lookup_setting(int speed, int duplex, const unsigned long *mask,
672size_t phy_speeds(unsigned int *speeds, size_t size, 674size_t phy_speeds(unsigned int *speeds, size_t size,
673 unsigned long *mask); 675 unsigned long *mask);
674 676
675static inline bool __phy_is_started(struct phy_device *phydev)
676{
677 WARN_ON(!mutex_is_locked(&phydev->lock));
678
679 return phydev->state >= PHY_UP;
680}
681
682/** 677/**
683 * phy_is_started - Convenience function to check whether PHY is started 678 * phy_is_started - Convenience function to check whether PHY is started
684 * @phydev: The phy_device struct 679 * @phydev: The phy_device struct
685 */ 680 */
686static inline bool phy_is_started(struct phy_device *phydev) 681static inline bool phy_is_started(struct phy_device *phydev)
687{ 682{
688 bool started; 683 return phydev->state >= PHY_UP;
689
690 mutex_lock(&phydev->lock);
691 started = __phy_is_started(phydev);
692 mutex_unlock(&phydev->lock);
693
694 return started;
695} 684}
696 685
697void phy_resolve_aneg_linkmode(struct phy_device *phydev); 686void phy_resolve_aneg_linkmode(struct phy_device *phydev);
@@ -1003,6 +992,14 @@ static inline int genphy_no_soft_reset(struct phy_device *phydev)
1003{ 992{
1004 return 0; 993 return 0;
1005} 994}
995static inline int genphy_no_ack_interrupt(struct phy_device *phydev)
996{
997 return 0;
998}
999static inline int genphy_no_config_intr(struct phy_device *phydev)
1000{
1001 return 0;
1002}
1006int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, 1003int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad,
1007 u16 regnum); 1004 u16 regnum);
1008int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum, 1005int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum,
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index e8e118d70fd7..3f350e2749fe 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -42,6 +42,7 @@ enum phy_mode {
42 PHY_MODE_PCIE, 42 PHY_MODE_PCIE,
43 PHY_MODE_ETHERNET, 43 PHY_MODE_ETHERNET,
44 PHY_MODE_MIPI_DPHY, 44 PHY_MODE_MIPI_DPHY,
45 PHY_MODE_SATA
45}; 46};
46 47
47/** 48/**
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 0a2a88e5a383..b895f4e79868 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -108,6 +108,7 @@ void dev_pm_opp_put(struct dev_pm_opp *opp);
108int dev_pm_opp_add(struct device *dev, unsigned long freq, 108int dev_pm_opp_add(struct device *dev, unsigned long freq,
109 unsigned long u_volt); 109 unsigned long u_volt);
110void dev_pm_opp_remove(struct device *dev, unsigned long freq); 110void dev_pm_opp_remove(struct device *dev, unsigned long freq);
111void dev_pm_opp_remove_all_dynamic(struct device *dev);
111 112
112int dev_pm_opp_enable(struct device *dev, unsigned long freq); 113int dev_pm_opp_enable(struct device *dev, unsigned long freq);
113 114
@@ -217,6 +218,10 @@ static inline void dev_pm_opp_remove(struct device *dev, unsigned long freq)
217{ 218{
218} 219}
219 220
221static inline void dev_pm_opp_remove_all_dynamic(struct device *dev)
222{
223}
224
220static inline int dev_pm_opp_enable(struct device *dev, unsigned long freq) 225static inline int dev_pm_opp_enable(struct device *dev, unsigned long freq)
221{ 226{
222 return 0; 227 return 0;
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 54af4eef169f..fed5be706bc9 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -105,7 +105,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
105 105
106static inline void pm_runtime_mark_last_busy(struct device *dev) 106static inline void pm_runtime_mark_last_busy(struct device *dev)
107{ 107{
108 WRITE_ONCE(dev->power.last_busy, ktime_to_ns(ktime_get())); 108 WRITE_ONCE(dev->power.last_busy, ktime_get_mono_fast_ns());
109} 109}
110 110
111static inline bool pm_runtime_is_irq_safe(struct device *dev) 111static inline bool pm_runtime_is_irq_safe(struct device *dev)
diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h
index 1637385bcc17..d0aecc04c54b 100644
--- a/include/linux/qcom_scm.h
+++ b/include/linux/qcom_scm.h
@@ -13,6 +13,7 @@
13#ifndef __QCOM_SCM_H 13#ifndef __QCOM_SCM_H
14#define __QCOM_SCM_H 14#define __QCOM_SCM_H
15 15
16#include <linux/err.h>
16#include <linux/types.h> 17#include <linux/types.h>
17#include <linux/cpumask.h> 18#include <linux/cpumask.h>
18 19
diff --git a/include/linux/qed/qed_chain.h b/include/linux/qed/qed_chain.h
index 59ddf9af909e..2dd0a9ed5b36 100644
--- a/include/linux/qed/qed_chain.h
+++ b/include/linux/qed/qed_chain.h
@@ -663,6 +663,37 @@ out:
663static inline void qed_chain_set_prod(struct qed_chain *p_chain, 663static inline void qed_chain_set_prod(struct qed_chain *p_chain,
664 u32 prod_idx, void *p_prod_elem) 664 u32 prod_idx, void *p_prod_elem)
665{ 665{
666 if (p_chain->mode == QED_CHAIN_MODE_PBL) {
667 u32 cur_prod, page_mask, page_cnt, page_diff;
668
669 cur_prod = is_chain_u16(p_chain) ? p_chain->u.chain16.prod_idx :
670 p_chain->u.chain32.prod_idx;
671
672 /* Assume that number of elements in a page is power of 2 */
673 page_mask = ~p_chain->elem_per_page_mask;
674
675 /* Use "cur_prod - 1" and "prod_idx - 1" since producer index
676 * reaches the first element of next page before the page index
677 * is incremented. See qed_chain_produce().
678 * Index wrap around is not a problem because the difference
679 * between current and given producer indices is always
680 * positive and lower than the chain's capacity.
681 */
682 page_diff = (((cur_prod - 1) & page_mask) -
683 ((prod_idx - 1) & page_mask)) /
684 p_chain->elem_per_page;
685
686 page_cnt = qed_chain_get_page_cnt(p_chain);
687 if (is_chain_u16(p_chain))
688 p_chain->pbl.c.u16.prod_page_idx =
689 (p_chain->pbl.c.u16.prod_page_idx -
690 page_diff + page_cnt) % page_cnt;
691 else
692 p_chain->pbl.c.u32.prod_page_idx =
693 (p_chain->pbl.c.u32.prod_page_idx -
694 page_diff + page_cnt) % page_cnt;
695 }
696
666 if (is_chain_u16(p_chain)) 697 if (is_chain_u16(p_chain))
667 p_chain->u.chain16.prod_idx = (u16) prod_idx; 698 p_chain->u.chain16.prod_idx = (u16) prod_idx;
668 else 699 else
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 29af6d6b2f4b..c1901b61ca30 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -32,6 +32,8 @@ struct reset_control *devm_reset_control_array_get(struct device *dev,
32struct reset_control *of_reset_control_array_get(struct device_node *np, 32struct reset_control *of_reset_control_array_get(struct device_node *np,
33 bool shared, bool optional); 33 bool shared, bool optional);
34 34
35int reset_control_get_count(struct device *dev);
36
35#else 37#else
36 38
37static inline int reset_control_reset(struct reset_control *rstc) 39static inline int reset_control_reset(struct reset_control *rstc)
@@ -97,6 +99,11 @@ of_reset_control_array_get(struct device_node *np, bool shared, bool optional)
97 return optional ? NULL : ERR_PTR(-ENOTSUPP); 99 return optional ? NULL : ERR_PTR(-ENOTSUPP);
98} 100}
99 101
102static inline int reset_control_get_count(struct device *dev)
103{
104 return -ENOENT;
105}
106
100#endif /* CONFIG_RESET_CONTROLLER */ 107#endif /* CONFIG_RESET_CONTROLLER */
101 108
102static inline int __must_check device_reset(struct device *dev) 109static inline int __must_check device_reset(struct device *dev)
@@ -138,7 +145,7 @@ __must_check reset_control_get_exclusive(struct device *dev, const char *id)
138 * 145 *
139 * Returns a struct reset_control or IS_ERR() condition containing errno. 146 * Returns a struct reset_control or IS_ERR() condition containing errno.
140 * This function is intended for use with reset-controls which are shared 147 * This function is intended for use with reset-controls which are shared
141 * between hardware-blocks. 148 * between hardware blocks.
142 * 149 *
143 * When a reset-control is shared, the behavior of reset_control_assert / 150 * When a reset-control is shared, the behavior of reset_control_assert /
144 * deassert is changed, the reset-core will keep track of a deassert_count 151 * deassert is changed, the reset-core will keep track of a deassert_count
@@ -187,7 +194,7 @@ static inline struct reset_control *of_reset_control_get_exclusive(
187} 194}
188 195
189/** 196/**
190 * of_reset_control_get_shared - Lookup and obtain an shared reference 197 * of_reset_control_get_shared - Lookup and obtain a shared reference
191 * to a reset controller. 198 * to a reset controller.
192 * @node: device to be reset by the controller 199 * @node: device to be reset by the controller
193 * @id: reset line name 200 * @id: reset line name
@@ -229,7 +236,7 @@ static inline struct reset_control *of_reset_control_get_exclusive_by_index(
229} 236}
230 237
231/** 238/**
232 * of_reset_control_get_shared_by_index - Lookup and obtain an shared 239 * of_reset_control_get_shared_by_index - Lookup and obtain a shared
233 * reference to a reset controller 240 * reference to a reset controller
234 * by index. 241 * by index.
235 * @node: device to be reset by the controller 242 * @node: device to be reset by the controller
@@ -322,7 +329,7 @@ devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
322 329
323/** 330/**
324 * devm_reset_control_get_shared_by_index - resource managed 331 * devm_reset_control_get_shared_by_index - resource managed
325 * reset_control_get_shared 332 * reset_control_get_shared
326 * @dev: device to be reset by the controller 333 * @dev: device to be reset by the controller
327 * @index: index of the reset controller 334 * @index: index of the reset controller
328 * 335 *
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 89541d248893..bba3afb4e9bf 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -995,7 +995,7 @@ struct task_struct {
995 /* cg_list protected by css_set_lock and tsk->alloc_lock: */ 995 /* cg_list protected by css_set_lock and tsk->alloc_lock: */
996 struct list_head cg_list; 996 struct list_head cg_list;
997#endif 997#endif
998#ifdef CONFIG_RESCTRL 998#ifdef CONFIG_X86_CPU_RESCTRL
999 u32 closid; 999 u32 closid;
1000 u32 rmid; 1000 u32 rmid;
1001#endif 1001#endif
@@ -1406,6 +1406,7 @@ extern struct pid *cad_pid;
1406#define PF_RANDOMIZE 0x00400000 /* Randomize virtual address space */ 1406#define PF_RANDOMIZE 0x00400000 /* Randomize virtual address space */
1407#define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ 1407#define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */
1408#define PF_MEMSTALL 0x01000000 /* Stalled due to lack of memory */ 1408#define PF_MEMSTALL 0x01000000 /* Stalled due to lack of memory */
1409#define PF_UMH 0x02000000 /* I'm an Usermodehelper process */
1409#define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */ 1410#define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */
1410#define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ 1411#define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */
1411#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ 1412#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
@@ -1904,6 +1905,14 @@ static inline void rseq_execve(struct task_struct *t)
1904 1905
1905#endif 1906#endif
1906 1907
1908void __exit_umh(struct task_struct *tsk);
1909
1910static inline void exit_umh(struct task_struct *tsk)
1911{
1912 if (unlikely(tsk->flags & PF_UMH))
1913 __exit_umh(tsk);
1914}
1915
1907#ifdef CONFIG_DEBUG_RSEQ 1916#ifdef CONFIG_DEBUG_RSEQ
1908 1917
1909void rseq_syscall(struct pt_regs *regs); 1918void rseq_syscall(struct pt_regs *regs);
diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h
index ec912d01126f..ecdc6542070f 100644
--- a/include/linux/sched/coredump.h
+++ b/include/linux/sched/coredump.h
@@ -71,6 +71,7 @@ static inline int get_dumpable(struct mm_struct *mm)
71#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */ 71#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */
72#define MMF_DISABLE_THP 24 /* disable THP for all VMAs */ 72#define MMF_DISABLE_THP 24 /* disable THP for all VMAs */
73#define MMF_OOM_VICTIM 25 /* mm is the oom victim */ 73#define MMF_OOM_VICTIM 25 /* mm is the oom victim */
74#define MMF_OOM_REAP_QUEUED 26 /* mm was queued for oom_reaper */
74#define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP) 75#define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP)
75 76
76#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\ 77#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\
diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h
index 10b19a192b2d..545f37138057 100644
--- a/include/linux/sched/wake_q.h
+++ b/include/linux/sched/wake_q.h
@@ -24,9 +24,13 @@
24 * called near the end of a function. Otherwise, the list can be 24 * called near the end of a function. Otherwise, the list can be
25 * re-initialized for later re-use by wake_q_init(). 25 * re-initialized for later re-use by wake_q_init().
26 * 26 *
27 * Note that this can cause spurious wakeups. schedule() callers 27 * NOTE that this can cause spurious wakeups. schedule() callers
28 * must ensure the call is done inside a loop, confirming that the 28 * must ensure the call is done inside a loop, confirming that the
29 * wakeup condition has in fact occurred. 29 * wakeup condition has in fact occurred.
30 *
31 * NOTE that there is no guarantee the wakeup will happen any later than the
32 * wake_q_add() location. Therefore task must be ready to be woken at the
33 * location of the wake_q_add().
30 */ 34 */
31 35
32#include <linux/sched.h> 36#include <linux/sched.h>
diff --git a/include/linux/signal.h b/include/linux/signal.h
index cc7e2c1cd444..9702016734b1 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -392,7 +392,7 @@ extern bool unhandled_signal(struct task_struct *tsk, int sig);
392#endif 392#endif
393 393
394#define siginmask(sig, mask) \ 394#define siginmask(sig, mask) \
395 ((sig) < SIGRTMIN && (rt_sigmask(sig) & (mask))) 395 ((sig) > 0 && (sig) < SIGRTMIN && (rt_sigmask(sig) & (mask)))
396 396
397#define SIG_KERNEL_ONLY_MASK (\ 397#define SIG_KERNEL_ONLY_MASK (\
398 rt_sigmask(SIGKILL) | rt_sigmask(SIGSTOP)) 398 rt_sigmask(SIGKILL) | rt_sigmask(SIGSTOP))
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 93f56fddd92a..bdb9563c64a0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2434,7 +2434,7 @@ static inline void skb_probe_transport_header(struct sk_buff *skb,
2434 2434
2435 if (skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0)) 2435 if (skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0))
2436 skb_set_transport_header(skb, keys.control.thoff); 2436 skb_set_transport_header(skb, keys.control.thoff);
2437 else 2437 else if (offset_hint >= 0)
2438 skb_set_transport_header(skb, offset_hint); 2438 skb_set_transport_header(skb, offset_hint);
2439} 2439}
2440 2440
@@ -3218,6 +3218,7 @@ int pskb_trim_rcsum_slow(struct sk_buff *skb, unsigned int len);
3218 * 3218 *
3219 * This is exactly the same as pskb_trim except that it ensures the 3219 * This is exactly the same as pskb_trim except that it ensures the
3220 * checksum of received packets are still valid after the operation. 3220 * checksum of received packets are still valid after the operation.
3221 * It can change skb pointers.
3221 */ 3222 */
3222 3223
3223static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len) 3224static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
@@ -4211,6 +4212,12 @@ static inline bool skb_is_gso_sctp(const struct sk_buff *skb)
4211 return skb_shinfo(skb)->gso_type & SKB_GSO_SCTP; 4212 return skb_shinfo(skb)->gso_type & SKB_GSO_SCTP;
4212} 4213}
4213 4214
4215static inline bool skb_is_gso_tcp(const struct sk_buff *skb)
4216{
4217 return skb_is_gso(skb) &&
4218 skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6);
4219}
4220
4214static inline void skb_gso_reset(struct sk_buff *skb) 4221static inline void skb_gso_reset(struct sk_buff *skb)
4215{ 4222{
4216 skb_shinfo(skb)->gso_size = 0; 4223 skb_shinfo(skb)->gso_size = 0;
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 7ddfc65586b0..4335bd771ce5 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -184,6 +184,7 @@ struct plat_stmmacenet_data {
184 struct clk *pclk; 184 struct clk *pclk;
185 struct clk *clk_ptp_ref; 185 struct clk *clk_ptp_ref;
186 unsigned int clk_ptp_rate; 186 unsigned int clk_ptp_rate;
187 unsigned int clk_ref_rate;
187 struct reset_control *stmmac_rst; 188 struct reset_control *stmmac_rst;
188 struct stmmac_axi *axi; 189 struct stmmac_axi *axi;
189 int has_gmac4; 190 int has_gmac4;
diff --git a/include/linux/umh.h b/include/linux/umh.h
index 235f51b62c71..0c08de356d0d 100644
--- a/include/linux/umh.h
+++ b/include/linux/umh.h
@@ -47,6 +47,8 @@ struct umh_info {
47 const char *cmdline; 47 const char *cmdline;
48 struct file *pipe_to_umh; 48 struct file *pipe_to_umh;
49 struct file *pipe_from_umh; 49 struct file *pipe_from_umh;
50 struct list_head list;
51 void (*cleanup)(struct umh_info *info);
50 pid_t pid; 52 pid_t pid;
51}; 53};
52int fork_usermode_blob(void *data, size_t len, struct umh_info *info); 54int fork_usermode_blob(void *data, size_t len, struct umh_info *info);
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 32baf8e26735..987b6491b946 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -12,6 +12,11 @@ struct irq_affinity;
12 12
13/** 13/**
14 * virtio_config_ops - operations for configuring a virtio device 14 * virtio_config_ops - operations for configuring a virtio device
15 * Note: Do not assume that a transport implements all of the operations
16 * getting/setting a value as a simple read/write! Generally speaking,
17 * any of @get/@set, @get_status/@set_status, or @get_features/
18 * @finalize_features are NOT safe to be called from an atomic
19 * context.
15 * @get: read the value of a configuration field 20 * @get: read the value of a configuration field
16 * vdev: the virtio_device 21 * vdev: the virtio_device
17 * offset: the offset of the configuration field 22 * offset: the offset of the configuration field
@@ -22,7 +27,7 @@ struct irq_affinity;
22 * offset: the offset of the configuration field 27 * offset: the offset of the configuration field
23 * buf: the buffer to read the field value from. 28 * buf: the buffer to read the field value from.
24 * len: the length of the buffer 29 * len: the length of the buffer
25 * @generation: config generation counter 30 * @generation: config generation counter (optional)
26 * vdev: the virtio_device 31 * vdev: the virtio_device
27 * Returns the config generation counter 32 * Returns the config generation counter
28 * @get_status: read the status byte 33 * @get_status: read the status byte
@@ -48,17 +53,17 @@ struct irq_affinity;
48 * @del_vqs: free virtqueues found by find_vqs(). 53 * @del_vqs: free virtqueues found by find_vqs().
49 * @get_features: get the array of feature bits for this device. 54 * @get_features: get the array of feature bits for this device.
50 * vdev: the virtio_device 55 * vdev: the virtio_device
51 * Returns the first 32 feature bits (all we currently need). 56 * Returns the first 64 feature bits (all we currently need).
52 * @finalize_features: confirm what device features we'll be using. 57 * @finalize_features: confirm what device features we'll be using.
53 * vdev: the virtio_device 58 * vdev: the virtio_device
54 * This gives the final feature bits for the device: it can change 59 * This gives the final feature bits for the device: it can change
55 * the dev->feature bits if it wants. 60 * the dev->feature bits if it wants.
56 * Returns 0 on success or error status 61 * Returns 0 on success or error status
57 * @bus_name: return the bus name associated with the device 62 * @bus_name: return the bus name associated with the device (optional)
58 * vdev: the virtio_device 63 * vdev: the virtio_device
59 * This returns a pointer to the bus name a la pci_name from which 64 * This returns a pointer to the bus name a la pci_name from which
60 * the caller can then copy. 65 * the caller can then copy.
61 * @set_vq_affinity: set the affinity for a virtqueue. 66 * @set_vq_affinity: set the affinity for a virtqueue (optional).
62 * @get_vq_affinity: get the affinity for a virtqueue (optional). 67 * @get_vq_affinity: get the affinity for a virtqueue (optional).
63 */ 68 */
64typedef void vq_callback_t(struct virtqueue *); 69typedef void vq_callback_t(struct virtqueue *);
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index cb462f9ab7dd..e0348cb0a1dd 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -57,6 +57,25 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
57 57
58 if (!skb_partial_csum_set(skb, start, off)) 58 if (!skb_partial_csum_set(skb, start, off))
59 return -EINVAL; 59 return -EINVAL;
60 } else {
61 /* gso packets without NEEDS_CSUM do not set transport_offset.
62 * probe and drop if does not match one of the above types.
63 */
64 if (gso_type && skb->network_header) {
65 if (!skb->protocol)
66 virtio_net_hdr_set_proto(skb, hdr);
67retry:
68 skb_probe_transport_header(skb, -1);
69 if (!skb_transport_header_was_set(skb)) {
70 /* UFO does not specify ipv4 or 6: try both */
71 if (gso_type & SKB_GSO_UDP &&
72 skb->protocol == htons(ETH_P_IP)) {
73 skb->protocol = htons(ETH_P_IPV6);
74 goto retry;
75 }
76 return -EINVAL;
77 }
78 }
60 } 79 }
61 80
62 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { 81 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
diff --git a/include/linux/xarray.h b/include/linux/xarray.h
index f492e21c4aa2..5d9d318bcf7a 100644
--- a/include/linux/xarray.h
+++ b/include/linux/xarray.h
@@ -176,7 +176,8 @@ static inline bool xa_is_internal(const void *entry)
176 */ 176 */
177static inline bool xa_is_err(const void *entry) 177static inline bool xa_is_err(const void *entry)
178{ 178{
179 return unlikely(xa_is_internal(entry)); 179 return unlikely(xa_is_internal(entry) &&
180 entry >= xa_mk_internal(-MAX_ERRNO));
180} 181}
181 182
182/** 183/**
@@ -286,7 +287,6 @@ struct xarray {
286 */ 287 */
287#define DEFINE_XARRAY_ALLOC(name) DEFINE_XARRAY_FLAGS(name, XA_FLAGS_ALLOC) 288#define DEFINE_XARRAY_ALLOC(name) DEFINE_XARRAY_FLAGS(name, XA_FLAGS_ALLOC)
288 289
289void xa_init_flags(struct xarray *, gfp_t flags);
290void *xa_load(struct xarray *, unsigned long index); 290void *xa_load(struct xarray *, unsigned long index);
291void *xa_store(struct xarray *, unsigned long index, void *entry, gfp_t); 291void *xa_store(struct xarray *, unsigned long index, void *entry, gfp_t);
292void *xa_erase(struct xarray *, unsigned long index); 292void *xa_erase(struct xarray *, unsigned long index);
@@ -304,6 +304,24 @@ unsigned int xa_extract(struct xarray *, void **dst, unsigned long start,
304void xa_destroy(struct xarray *); 304void xa_destroy(struct xarray *);
305 305
306/** 306/**
307 * xa_init_flags() - Initialise an empty XArray with flags.
308 * @xa: XArray.
309 * @flags: XA_FLAG values.
310 *
311 * If you need to initialise an XArray with special flags (eg you need
312 * to take the lock from interrupt context), use this function instead
313 * of xa_init().
314 *
315 * Context: Any context.
316 */
317static inline void xa_init_flags(struct xarray *xa, gfp_t flags)
318{
319 spin_lock_init(&xa->xa_lock);
320 xa->xa_flags = flags;
321 xa->xa_head = NULL;
322}
323
324/**
307 * xa_init() - Initialise an empty XArray. 325 * xa_init() - Initialise an empty XArray.
308 * @xa: XArray. 326 * @xa: XArray.
309 * 327 *
@@ -342,20 +360,45 @@ static inline bool xa_marked(const struct xarray *xa, xa_mark_t mark)
342} 360}
343 361
344/** 362/**
345 * xa_for_each() - Iterate over a portion of an XArray. 363 * xa_for_each_start() - Iterate over a portion of an XArray.
346 * @xa: XArray. 364 * @xa: XArray.
365 * @index: Index of @entry.
347 * @entry: Entry retrieved from array. 366 * @entry: Entry retrieved from array.
367 * @start: First index to retrieve from array.
368 *
369 * During the iteration, @entry will have the value of the entry stored
370 * in @xa at @index. You may modify @index during the iteration if you
371 * want to skip or reprocess indices. It is safe to modify the array
372 * during the iteration. At the end of the iteration, @entry will be set
373 * to NULL and @index will have a value less than or equal to max.
374 *
375 * xa_for_each_start() is O(n.log(n)) while xas_for_each() is O(n). You have
376 * to handle your own locking with xas_for_each(), and if you have to unlock
377 * after each iteration, it will also end up being O(n.log(n)).
378 * xa_for_each_start() will spin if it hits a retry entry; if you intend to
379 * see retry entries, you should use the xas_for_each() iterator instead.
380 * The xas_for_each() iterator will expand into more inline code than
381 * xa_for_each_start().
382 *
383 * Context: Any context. Takes and releases the RCU lock.
384 */
385#define xa_for_each_start(xa, index, entry, start) \
386 for (index = start, \
387 entry = xa_find(xa, &index, ULONG_MAX, XA_PRESENT); \
388 entry; \
389 entry = xa_find_after(xa, &index, ULONG_MAX, XA_PRESENT))
390
391/**
392 * xa_for_each() - Iterate over present entries in an XArray.
393 * @xa: XArray.
348 * @index: Index of @entry. 394 * @index: Index of @entry.
349 * @max: Maximum index to retrieve from array. 395 * @entry: Entry retrieved from array.
350 * @filter: Selection criterion.
351 * 396 *
352 * Initialise @index to the lowest index you want to retrieve from the 397 * During the iteration, @entry will have the value of the entry stored
353 * array. During the iteration, @entry will have the value of the entry 398 * in @xa at @index. You may modify @index during the iteration if you want
354 * stored in @xa at @index. The iteration will skip all entries in the 399 * to skip or reprocess indices. It is safe to modify the array during the
355 * array which do not match @filter. You may modify @index during the 400 * iteration. At the end of the iteration, @entry will be set to NULL and
356 * iteration if you want to skip or reprocess indices. It is safe to modify 401 * @index will have a value less than or equal to max.
357 * the array during the iteration. At the end of the iteration, @entry will
358 * be set to NULL and @index will have a value less than or equal to max.
359 * 402 *
360 * xa_for_each() is O(n.log(n)) while xas_for_each() is O(n). You have 403 * xa_for_each() is O(n.log(n)) while xas_for_each() is O(n). You have
361 * to handle your own locking with xas_for_each(), and if you have to unlock 404 * to handle your own locking with xas_for_each(), and if you have to unlock
@@ -366,9 +409,36 @@ static inline bool xa_marked(const struct xarray *xa, xa_mark_t mark)
366 * 409 *
367 * Context: Any context. Takes and releases the RCU lock. 410 * Context: Any context. Takes and releases the RCU lock.
368 */ 411 */
369#define xa_for_each(xa, entry, index, max, filter) \ 412#define xa_for_each(xa, index, entry) \
370 for (entry = xa_find(xa, &index, max, filter); entry; \ 413 xa_for_each_start(xa, index, entry, 0)
371 entry = xa_find_after(xa, &index, max, filter)) 414
415/**
416 * xa_for_each_marked() - Iterate over marked entries in an XArray.
417 * @xa: XArray.
418 * @index: Index of @entry.
419 * @entry: Entry retrieved from array.
420 * @filter: Selection criterion.
421 *
422 * During the iteration, @entry will have the value of the entry stored
423 * in @xa at @index. The iteration will skip all entries in the array
424 * which do not match @filter. You may modify @index during the iteration
425 * if you want to skip or reprocess indices. It is safe to modify the array
426 * during the iteration. At the end of the iteration, @entry will be set to
427 * NULL and @index will have a value less than or equal to max.
428 *
429 * xa_for_each_marked() is O(n.log(n)) while xas_for_each_marked() is O(n).
430 * You have to handle your own locking with xas_for_each(), and if you have
431 * to unlock after each iteration, it will also end up being O(n.log(n)).
432 * xa_for_each_marked() will spin if it hits a retry entry; if you intend to
433 * see retry entries, you should use the xas_for_each_marked() iterator
434 * instead. The xas_for_each_marked() iterator will expand into more inline
435 * code than xa_for_each_marked().
436 *
437 * Context: Any context. Takes and releases the RCU lock.
438 */
439#define xa_for_each_marked(xa, index, entry, filter) \
440 for (index = 0, entry = xa_find(xa, &index, ULONG_MAX, filter); \
441 entry; entry = xa_find_after(xa, &index, ULONG_MAX, filter))
372 442
373#define xa_trylock(xa) spin_trylock(&(xa)->xa_lock) 443#define xa_trylock(xa) spin_trylock(&(xa)->xa_lock)
374#define xa_lock(xa) spin_lock(&(xa)->xa_lock) 444#define xa_lock(xa) spin_lock(&(xa)->xa_lock)
@@ -393,40 +463,13 @@ void *__xa_erase(struct xarray *, unsigned long index);
393void *__xa_store(struct xarray *, unsigned long index, void *entry, gfp_t); 463void *__xa_store(struct xarray *, unsigned long index, void *entry, gfp_t);
394void *__xa_cmpxchg(struct xarray *, unsigned long index, void *old, 464void *__xa_cmpxchg(struct xarray *, unsigned long index, void *old,
395 void *entry, gfp_t); 465 void *entry, gfp_t);
466int __xa_insert(struct xarray *, unsigned long index, void *entry, gfp_t);
396int __xa_alloc(struct xarray *, u32 *id, u32 max, void *entry, gfp_t); 467int __xa_alloc(struct xarray *, u32 *id, u32 max, void *entry, gfp_t);
397int __xa_reserve(struct xarray *, unsigned long index, gfp_t); 468int __xa_reserve(struct xarray *, unsigned long index, gfp_t);
398void __xa_set_mark(struct xarray *, unsigned long index, xa_mark_t); 469void __xa_set_mark(struct xarray *, unsigned long index, xa_mark_t);
399void __xa_clear_mark(struct xarray *, unsigned long index, xa_mark_t); 470void __xa_clear_mark(struct xarray *, unsigned long index, xa_mark_t);
400 471
401/** 472/**
402 * __xa_insert() - Store this entry in the XArray unless another entry is
403 * already present.
404 * @xa: XArray.
405 * @index: Index into array.
406 * @entry: New entry.
407 * @gfp: Memory allocation flags.
408 *
409 * If you would rather see the existing entry in the array, use __xa_cmpxchg().
410 * This function is for users who don't care what the entry is, only that
411 * one is present.
412 *
413 * Context: Any context. Expects xa_lock to be held on entry. May
414 * release and reacquire xa_lock if the @gfp flags permit.
415 * Return: 0 if the store succeeded. -EEXIST if another entry was present.
416 * -ENOMEM if memory could not be allocated.
417 */
418static inline int __xa_insert(struct xarray *xa, unsigned long index,
419 void *entry, gfp_t gfp)
420{
421 void *curr = __xa_cmpxchg(xa, index, NULL, entry, gfp);
422 if (!curr)
423 return 0;
424 if (xa_is_err(curr))
425 return xa_err(curr);
426 return -EEXIST;
427}
428
429/**
430 * xa_store_bh() - Store this entry in the XArray. 473 * xa_store_bh() - Store this entry in the XArray.
431 * @xa: XArray. 474 * @xa: XArray.
432 * @index: Index into array. 475 * @index: Index into array.
@@ -453,7 +496,7 @@ static inline void *xa_store_bh(struct xarray *xa, unsigned long index,
453} 496}
454 497
455/** 498/**
456 * xa_store_irq() - Erase this entry from the XArray. 499 * xa_store_irq() - Store this entry in the XArray.
457 * @xa: XArray. 500 * @xa: XArray.
458 * @index: Index into array. 501 * @index: Index into array.
459 * @entry: New entry. 502 * @entry: New entry.
@@ -615,24 +658,83 @@ static inline void *xa_cmpxchg_irq(struct xarray *xa, unsigned long index,
615 * @entry: New entry. 658 * @entry: New entry.
616 * @gfp: Memory allocation flags. 659 * @gfp: Memory allocation flags.
617 * 660 *
618 * If you would rather see the existing entry in the array, use xa_cmpxchg(). 661 * Inserting a NULL entry will store a reserved entry (like xa_reserve())
619 * This function is for users who don't care what the entry is, only that 662 * if no entry is present. Inserting will fail if a reserved entry is
620 * one is present. 663 * present, even though loading from this index will return NULL.
621 * 664 *
622 * Context: Process context. Takes and releases the xa_lock. 665 * Context: Any context. Takes and releases the xa_lock. May sleep if
623 * May sleep if the @gfp flags permit. 666 * the @gfp flags permit.
624 * Return: 0 if the store succeeded. -EEXIST if another entry was present. 667 * Return: 0 if the store succeeded. -EEXIST if another entry was present.
625 * -ENOMEM if memory could not be allocated. 668 * -ENOMEM if memory could not be allocated.
626 */ 669 */
627static inline int xa_insert(struct xarray *xa, unsigned long index, 670static inline int xa_insert(struct xarray *xa, unsigned long index,
628 void *entry, gfp_t gfp) 671 void *entry, gfp_t gfp)
629{ 672{
630 void *curr = xa_cmpxchg(xa, index, NULL, entry, gfp); 673 int err;
631 if (!curr) 674
632 return 0; 675 xa_lock(xa);
633 if (xa_is_err(curr)) 676 err = __xa_insert(xa, index, entry, gfp);
634 return xa_err(curr); 677 xa_unlock(xa);
635 return -EEXIST; 678
679 return err;
680}
681
682/**
683 * xa_insert_bh() - Store this entry in the XArray unless another entry is
684 * already present.
685 * @xa: XArray.
686 * @index: Index into array.
687 * @entry: New entry.
688 * @gfp: Memory allocation flags.
689 *
690 * Inserting a NULL entry will store a reserved entry (like xa_reserve())
691 * if no entry is present. Inserting will fail if a reserved entry is
692 * present, even though loading from this index will return NULL.
693 *
694 * Context: Any context. Takes and releases the xa_lock while
695 * disabling softirqs. May sleep if the @gfp flags permit.
696 * Return: 0 if the store succeeded. -EEXIST if another entry was present.
697 * -ENOMEM if memory could not be allocated.
698 */
699static inline int xa_insert_bh(struct xarray *xa, unsigned long index,
700 void *entry, gfp_t gfp)
701{
702 int err;
703
704 xa_lock_bh(xa);
705 err = __xa_insert(xa, index, entry, gfp);
706 xa_unlock_bh(xa);
707
708 return err;
709}
710
711/**
712 * xa_insert_irq() - Store this entry in the XArray unless another entry is
713 * already present.
714 * @xa: XArray.
715 * @index: Index into array.
716 * @entry: New entry.
717 * @gfp: Memory allocation flags.
718 *
719 * Inserting a NULL entry will store a reserved entry (like xa_reserve())
720 * if no entry is present. Inserting will fail if a reserved entry is
721 * present, even though loading from this index will return NULL.
722 *
723 * Context: Process context. Takes and releases the xa_lock while
724 * disabling interrupts. May sleep if the @gfp flags permit.
725 * Return: 0 if the store succeeded. -EEXIST if another entry was present.
726 * -ENOMEM if memory could not be allocated.
727 */
728static inline int xa_insert_irq(struct xarray *xa, unsigned long index,
729 void *entry, gfp_t gfp)
730{
731 int err;
732
733 xa_lock_irq(xa);
734 err = __xa_insert(xa, index, entry, gfp);
735 xa_unlock_irq(xa);
736
737 return err;
636} 738}
637 739
638/** 740/**
@@ -970,8 +1072,8 @@ static inline bool xa_is_sibling(const void *entry)
970 (entry < xa_mk_sibling(XA_CHUNK_SIZE - 1)); 1072 (entry < xa_mk_sibling(XA_CHUNK_SIZE - 1));
971} 1073}
972 1074
973#define XA_ZERO_ENTRY xa_mk_internal(256) 1075#define XA_RETRY_ENTRY xa_mk_internal(256)
974#define XA_RETRY_ENTRY xa_mk_internal(257) 1076#define XA_ZERO_ENTRY xa_mk_internal(257)
975 1077
976/** 1078/**
977 * xa_is_zero() - Is the entry a zero entry? 1079 * xa_is_zero() - Is the entry a zero entry?
@@ -996,6 +1098,17 @@ static inline bool xa_is_retry(const void *entry)
996} 1098}
997 1099
998/** 1100/**
1101 * xa_is_advanced() - Is the entry only permitted for the advanced API?
1102 * @entry: Entry to be stored in the XArray.
1103 *
1104 * Return: %true if the entry cannot be stored by the normal API.
1105 */
1106static inline bool xa_is_advanced(const void *entry)
1107{
1108 return xa_is_internal(entry) && (entry <= XA_RETRY_ENTRY);
1109}
1110
1111/**
999 * typedef xa_update_node_t - A callback function from the XArray. 1112 * typedef xa_update_node_t - A callback function from the XArray.
1000 * @node: The node which is being processed 1113 * @node: The node which is being processed
1001 * 1114 *
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h
index 1adefe42c0a6..2bfb87eb98ce 100644
--- a/include/net/af_rxrpc.h
+++ b/include/net/af_rxrpc.h
@@ -21,18 +21,6 @@ struct socket;
21struct rxrpc_call; 21struct rxrpc_call;
22 22
23/* 23/*
24 * Call completion condition (state == RXRPC_CALL_COMPLETE).
25 */
26enum rxrpc_call_completion {
27 RXRPC_CALL_SUCCEEDED, /* - Normal termination */
28 RXRPC_CALL_REMOTELY_ABORTED, /* - call aborted by peer */
29 RXRPC_CALL_LOCALLY_ABORTED, /* - call aborted locally on error or close */
30 RXRPC_CALL_LOCAL_ERROR, /* - call failed due to local error */
31 RXRPC_CALL_NETWORK_ERROR, /* - call terminated by network error */
32 NR__RXRPC_CALL_COMPLETIONS
33};
34
35/*
36 * Debug ID counter for tracing. 24 * Debug ID counter for tracing.
37 */ 25 */
38extern atomic_t rxrpc_debug_id; 26extern atomic_t rxrpc_debug_id;
@@ -73,10 +61,6 @@ int rxrpc_kernel_charge_accept(struct socket *, rxrpc_notify_rx_t,
73 rxrpc_user_attach_call_t, unsigned long, gfp_t, 61 rxrpc_user_attach_call_t, unsigned long, gfp_t,
74 unsigned int); 62 unsigned int);
75void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64); 63void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
76int rxrpc_kernel_retry_call(struct socket *, struct rxrpc_call *,
77 struct sockaddr_rxrpc *, struct key *);
78int rxrpc_kernel_check_call(struct socket *, struct rxrpc_call *,
79 enum rxrpc_call_completion *, u32 *);
80u32 rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *); 64u32 rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *);
81void rxrpc_kernel_probe_life(struct socket *, struct rxrpc_call *); 65void rxrpc_kernel_probe_life(struct socket *, struct rxrpc_call *);
82u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *); 66u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *);
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 3f9aea8087e3..8b7eb46ad72d 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -201,6 +201,18 @@ static inline void ax25_hold_route(ax25_route *ax25_rt)
201 201
202void __ax25_put_route(ax25_route *ax25_rt); 202void __ax25_put_route(ax25_route *ax25_rt);
203 203
204extern rwlock_t ax25_route_lock;
205
206static inline void ax25_route_lock_use(void)
207{
208 read_lock(&ax25_route_lock);
209}
210
211static inline void ax25_route_lock_unuse(void)
212{
213 read_unlock(&ax25_route_lock);
214}
215
204static inline void ax25_put_route(ax25_route *ax25_rt) 216static inline void ax25_put_route(ax25_route *ax25_rt)
205{ 217{
206 if (refcount_dec_and_test(&ax25_rt->refcount)) 218 if (refcount_dec_and_test(&ax25_rt->refcount))
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 00b5e7825508..74ff688568a0 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -39,6 +39,7 @@ struct inet_peer {
39 39
40 u32 metrics[RTAX_MAX]; 40 u32 metrics[RTAX_MAX];
41 u32 rate_tokens; /* rate limiting for ICMP */ 41 u32 rate_tokens; /* rate limiting for ICMP */
42 u32 n_redirects;
42 unsigned long rate_last; 43 unsigned long rate_last;
43 /* 44 /*
44 * Once inet_peer is queued for deletion (refcnt == 0), following field 45 * Once inet_peer is queued for deletion (refcnt == 0), following field
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index c5969762a8f4..9c8214d2116d 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -241,7 +241,7 @@ int fib_table_delete(struct net *, struct fib_table *, struct fib_config *,
241 struct netlink_ext_ack *extack); 241 struct netlink_ext_ack *extack);
242int fib_table_dump(struct fib_table *table, struct sk_buff *skb, 242int fib_table_dump(struct fib_table *table, struct sk_buff *skb,
243 struct netlink_callback *cb, struct fib_dump_filter *filter); 243 struct netlink_callback *cb, struct fib_dump_filter *filter);
244int fib_table_flush(struct net *net, struct fib_table *table); 244int fib_table_flush(struct net *net, struct fib_table *table, bool flush_all);
245struct fib_table *fib_trie_unmerge(struct fib_table *main_tb); 245struct fib_table *fib_trie_unmerge(struct fib_table *main_tb);
246void fib_table_flush_external(struct fib_table *table); 246void fib_table_flush_external(struct fib_table *table);
247void fib_free_table(struct fib_table *tb); 247void fib_free_table(struct fib_table *tb);
diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h
index 78fa0ac4613c..5175fd63cd82 100644
--- a/include/net/l3mdev.h
+++ b/include/net/l3mdev.h
@@ -153,7 +153,8 @@ struct sk_buff *l3mdev_l3_rcv(struct sk_buff *skb, u16 proto)
153 153
154 if (netif_is_l3_slave(skb->dev)) 154 if (netif_is_l3_slave(skb->dev))
155 master = netdev_master_upper_dev_get_rcu(skb->dev); 155 master = netdev_master_upper_dev_get_rcu(skb->dev);
156 else if (netif_is_l3_master(skb->dev)) 156 else if (netif_is_l3_master(skb->dev) ||
157 netif_has_l3_rx_handler(skb->dev))
157 master = skb->dev; 158 master = skb->dev;
158 159
159 if (master && master->l3mdev_ops->l3mdev_l3_rcv) 160 if (master && master->l3mdev_ops->l3mdev_l3_rcv)
diff --git a/include/net/netfilter/nf_flow_table.h b/include/net/netfilter/nf_flow_table.h
index 7d5cda7ce32a..3e370cb36263 100644
--- a/include/net/netfilter/nf_flow_table.h
+++ b/include/net/netfilter/nf_flow_table.h
@@ -84,7 +84,6 @@ struct flow_offload {
84struct nf_flow_route { 84struct nf_flow_route {
85 struct { 85 struct {
86 struct dst_entry *dst; 86 struct dst_entry *dst;
87 int ifindex;
88 } tuple[FLOW_OFFLOAD_DIR_MAX]; 87 } tuple[FLOW_OFFLOAD_DIR_MAX];
89}; 88};
90 89
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 841835a387e1..b4984bbbe157 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -469,9 +469,7 @@ struct nft_set_binding {
469int nf_tables_bind_set(const struct nft_ctx *ctx, struct nft_set *set, 469int nf_tables_bind_set(const struct nft_ctx *ctx, struct nft_set *set,
470 struct nft_set_binding *binding); 470 struct nft_set_binding *binding);
471void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, 471void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set,
472 struct nft_set_binding *binding); 472 struct nft_set_binding *binding, bool commit);
473void nf_tables_rebind_set(const struct nft_ctx *ctx, struct nft_set *set,
474 struct nft_set_binding *binding);
475void nf_tables_destroy_set(const struct nft_ctx *ctx, struct nft_set *set); 473void nf_tables_destroy_set(const struct nft_ctx *ctx, struct nft_set *set);
476 474
477/** 475/**
@@ -721,6 +719,13 @@ struct nft_expr_type {
721#define NFT_EXPR_STATEFUL 0x1 719#define NFT_EXPR_STATEFUL 0x1
722#define NFT_EXPR_GC 0x2 720#define NFT_EXPR_GC 0x2
723 721
722enum nft_trans_phase {
723 NFT_TRANS_PREPARE,
724 NFT_TRANS_ABORT,
725 NFT_TRANS_COMMIT,
726 NFT_TRANS_RELEASE
727};
728
724/** 729/**
725 * struct nft_expr_ops - nf_tables expression operations 730 * struct nft_expr_ops - nf_tables expression operations
726 * 731 *
@@ -750,7 +755,8 @@ struct nft_expr_ops {
750 void (*activate)(const struct nft_ctx *ctx, 755 void (*activate)(const struct nft_ctx *ctx,
751 const struct nft_expr *expr); 756 const struct nft_expr *expr);
752 void (*deactivate)(const struct nft_ctx *ctx, 757 void (*deactivate)(const struct nft_ctx *ctx,
753 const struct nft_expr *expr); 758 const struct nft_expr *expr,
759 enum nft_trans_phase phase);
754 void (*destroy)(const struct nft_ctx *ctx, 760 void (*destroy)(const struct nft_ctx *ctx,
755 const struct nft_expr *expr); 761 const struct nft_expr *expr);
756 void (*destroy_clone)(const struct nft_ctx *ctx, 762 void (*destroy_clone)(const struct nft_ctx *ctx,
@@ -1323,12 +1329,15 @@ struct nft_trans_rule {
1323struct nft_trans_set { 1329struct nft_trans_set {
1324 struct nft_set *set; 1330 struct nft_set *set;
1325 u32 set_id; 1331 u32 set_id;
1332 bool bound;
1326}; 1333};
1327 1334
1328#define nft_trans_set(trans) \ 1335#define nft_trans_set(trans) \
1329 (((struct nft_trans_set *)trans->data)->set) 1336 (((struct nft_trans_set *)trans->data)->set)
1330#define nft_trans_set_id(trans) \ 1337#define nft_trans_set_id(trans) \
1331 (((struct nft_trans_set *)trans->data)->set_id) 1338 (((struct nft_trans_set *)trans->data)->set_id)
1339#define nft_trans_set_bound(trans) \
1340 (((struct nft_trans_set *)trans->data)->bound)
1332 1341
1333struct nft_trans_chain { 1342struct nft_trans_chain {
1334 bool update; 1343 bool update;
diff --git a/include/net/phonet/pep.h b/include/net/phonet/pep.h
index b669fe6dbc3b..98f31c7ea23d 100644
--- a/include/net/phonet/pep.h
+++ b/include/net/phonet/pep.h
@@ -63,10 +63,11 @@ struct pnpipehdr {
63 u8 state_after_reset; /* reset request */ 63 u8 state_after_reset; /* reset request */
64 u8 error_code; /* any response */ 64 u8 error_code; /* any response */
65 u8 pep_type; /* status indication */ 65 u8 pep_type; /* status indication */
66 u8 data[1]; 66 u8 data0; /* anything else */
67 }; 67 };
68 u8 data[];
68}; 69};
69#define other_pep_type data[1] 70#define other_pep_type data[0]
70 71
71static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb) 72static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb)
72{ 73{
diff --git a/include/net/sock.h b/include/net/sock.h
index 2b229f7be8eb..f43f935cb113 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1277,7 +1277,7 @@ static inline void sk_sockets_allocated_inc(struct sock *sk)
1277 percpu_counter_inc(sk->sk_prot->sockets_allocated); 1277 percpu_counter_inc(sk->sk_prot->sockets_allocated);
1278} 1278}
1279 1279
1280static inline int 1280static inline u64
1281sk_sockets_allocated_read_positive(struct sock *sk) 1281sk_sockets_allocated_read_positive(struct sock *sk)
1282{ 1282{
1283 return percpu_counter_read_positive(sk->sk_prot->sockets_allocated); 1283 return percpu_counter_read_positive(sk->sk_prot->sockets_allocated);
diff --git a/include/net/tls.h b/include/net/tls.h
index 2a6ac8d642af..1486b60c4de8 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -120,6 +120,8 @@ struct tls_rec {
120 struct scatterlist sg_aead_out[2]; 120 struct scatterlist sg_aead_out[2];
121 121
122 char aad_space[TLS_AAD_SPACE_SIZE]; 122 char aad_space[TLS_AAD_SPACE_SIZE];
123 u8 iv_data[TLS_CIPHER_AES_GCM_128_IV_SIZE +
124 TLS_CIPHER_AES_GCM_128_SALT_SIZE];
123 struct aead_request aead_req; 125 struct aead_request aead_req;
124 u8 aead_req_ctx[]; 126 u8 aead_req_ctx[];
125}; 127};
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 7298a53b9702..85386becbaea 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -853,7 +853,7 @@ static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
853 xfrm_pol_put(pols[i]); 853 xfrm_pol_put(pols[i]);
854} 854}
855 855
856void __xfrm_state_destroy(struct xfrm_state *); 856void __xfrm_state_destroy(struct xfrm_state *, bool);
857 857
858static inline void __xfrm_state_put(struct xfrm_state *x) 858static inline void __xfrm_state_put(struct xfrm_state *x)
859{ 859{
@@ -863,7 +863,13 @@ static inline void __xfrm_state_put(struct xfrm_state *x)
863static inline void xfrm_state_put(struct xfrm_state *x) 863static inline void xfrm_state_put(struct xfrm_state *x)
864{ 864{
865 if (refcount_dec_and_test(&x->refcnt)) 865 if (refcount_dec_and_test(&x->refcnt))
866 __xfrm_state_destroy(x); 866 __xfrm_state_destroy(x, false);
867}
868
869static inline void xfrm_state_put_sync(struct xfrm_state *x)
870{
871 if (refcount_dec_and_test(&x->refcnt))
872 __xfrm_state_destroy(x, true);
867} 873}
868 874
869static inline void xfrm_state_hold(struct xfrm_state *x) 875static inline void xfrm_state_hold(struct xfrm_state *x)
@@ -1590,7 +1596,7 @@ struct xfrmk_spdinfo {
1590 1596
1591struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 mark, u32 seq); 1597struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 mark, u32 seq);
1592int xfrm_state_delete(struct xfrm_state *x); 1598int xfrm_state_delete(struct xfrm_state *x);
1593int xfrm_state_flush(struct net *net, u8 proto, bool task_valid); 1599int xfrm_state_flush(struct net *net, u8 proto, bool task_valid, bool sync);
1594int xfrm_dev_state_flush(struct net *net, struct net_device *dev, bool task_valid); 1600int xfrm_dev_state_flush(struct net *net, struct net_device *dev, bool task_valid);
1595void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si); 1601void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si);
1596void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); 1602void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si);
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index a3ceed3a040a..80debf5982ac 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2579,9 +2579,10 @@ struct ib_device {
2579 2579
2580 const struct uapi_definition *driver_def; 2580 const struct uapi_definition *driver_def;
2581 enum rdma_driver_id driver_id; 2581 enum rdma_driver_id driver_id;
2582
2582 /* 2583 /*
2583 * Provides synchronization between device unregistration and netlink 2584 * Positive refcount indicates that the device is currently
2584 * commands on a device. To be used only by core. 2585 * registered and cannot be unregistered.
2585 */ 2586 */
2586 refcount_t refcount; 2587 refcount_t refcount;
2587 struct completion unreg_completion; 2588 struct completion unreg_completion;
@@ -3926,6 +3927,25 @@ static inline bool ib_access_writable(int access_flags)
3926int ib_check_mr_status(struct ib_mr *mr, u32 check_mask, 3927int ib_check_mr_status(struct ib_mr *mr, u32 check_mask,
3927 struct ib_mr_status *mr_status); 3928 struct ib_mr_status *mr_status);
3928 3929
3930/**
3931 * ib_device_try_get: Hold a registration lock
3932 * device: The device to lock
3933 *
3934 * A device under an active registration lock cannot become unregistered. It
3935 * is only possible to obtain a registration lock on a device that is fully
3936 * registered, otherwise this function returns false.
3937 *
3938 * The registration lock is only necessary for actions which require the
3939 * device to still be registered. Uses that only require the device pointer to
3940 * be valid should use get_device(&ibdev->dev) to hold the memory.
3941 *
3942 */
3943static inline bool ib_device_try_get(struct ib_device *dev)
3944{
3945 return refcount_inc_not_zero(&dev->refcount);
3946}
3947
3948void ib_device_put(struct ib_device *device);
3929struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u8 port, 3949struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u8 port,
3930 u16 pkey, const union ib_gid *gid, 3950 u16 pkey, const union ib_gid *gid,
3931 const struct sockaddr *addr); 3951 const struct sockaddr *addr);
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h
index 0cdc3999ecfa..c5188ff724d1 100644
--- a/include/sound/compress_driver.h
+++ b/include/sound/compress_driver.h
@@ -173,7 +173,11 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream)
173 if (snd_BUG_ON(!stream)) 173 if (snd_BUG_ON(!stream))
174 return; 174 return;
175 175
176 stream->runtime->state = SNDRV_PCM_STATE_SETUP; 176 if (stream->direction == SND_COMPRESS_PLAYBACK)
177 stream->runtime->state = SNDRV_PCM_STATE_SETUP;
178 else
179 stream->runtime->state = SNDRV_PCM_STATE_PREPARED;
180
177 wake_up(&stream->runtime->sleep); 181 wake_up(&stream->runtime->sleep);
178} 182}
179 183
diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
index 7fa48b100936..cc7c8d42d4fd 100644
--- a/include/sound/hda_codec.h
+++ b/include/sound/hda_codec.h
@@ -68,6 +68,7 @@ struct hda_bus {
68 unsigned int response_reset:1; /* controller was reset */ 68 unsigned int response_reset:1; /* controller was reset */
69 unsigned int in_reset:1; /* during reset operation */ 69 unsigned int in_reset:1; /* during reset operation */
70 unsigned int no_response_fallback:1; /* don't fallback at RIRB error */ 70 unsigned int no_response_fallback:1; /* don't fallback at RIRB error */
71 unsigned int bus_probing :1; /* during probing process */
71 72
72 int primary_dig_out_type; /* primary digital out PCM type */ 73 int primary_dig_out_type; /* primary digital out PCM type */
73 unsigned int mixer_assigned; /* codec addr for mixer name */ 74 unsigned int mixer_assigned; /* codec addr for mixer name */
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 8ec1de856ee7..e665f111b0d2 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -985,6 +985,12 @@ struct snd_soc_dai_link {
985 /* Do not create a PCM for this DAI link (Backend link) */ 985 /* Do not create a PCM for this DAI link (Backend link) */
986 unsigned int ignore:1; 986 unsigned int ignore:1;
987 987
988 /*
989 * This driver uses legacy platform naming. Set by the core, machine
990 * drivers should not modify this value.
991 */
992 unsigned int legacy_platform:1;
993
988 struct list_head list; /* DAI link list of the soc card */ 994 struct list_head list; /* DAI link list of the soc card */
989 struct snd_soc_dobj dobj; /* For topology */ 995 struct snd_soc_dobj dobj; /* For topology */
990}; 996};
diff --git a/include/trace/events/afs.h b/include/trace/events/afs.h
index 33d291888ba9..e3f005eae1f7 100644
--- a/include/trace/events/afs.h
+++ b/include/trace/events/afs.h
@@ -25,6 +25,7 @@
25enum afs_call_trace { 25enum afs_call_trace {
26 afs_call_trace_alloc, 26 afs_call_trace_alloc,
27 afs_call_trace_free, 27 afs_call_trace_free,
28 afs_call_trace_get,
28 afs_call_trace_put, 29 afs_call_trace_put,
29 afs_call_trace_wake, 30 afs_call_trace_wake,
30 afs_call_trace_work, 31 afs_call_trace_work,
@@ -159,6 +160,7 @@ enum afs_file_error {
159#define afs_call_traces \ 160#define afs_call_traces \
160 EM(afs_call_trace_alloc, "ALLOC") \ 161 EM(afs_call_trace_alloc, "ALLOC") \
161 EM(afs_call_trace_free, "FREE ") \ 162 EM(afs_call_trace_free, "FREE ") \
163 EM(afs_call_trace_get, "GET ") \
162 EM(afs_call_trace_put, "PUT ") \ 164 EM(afs_call_trace_put, "PUT ") \
163 EM(afs_call_trace_wake, "WAKE ") \ 165 EM(afs_call_trace_wake, "WAKE ") \
164 E_(afs_call_trace_work, "WORK ") 166 E_(afs_call_trace_work, "WORK ")
diff --git a/include/uapi/linux/android/binder_ctl.h b/include/uapi/linux/android/binderfs.h
index 65b2efd1a0a5..87410477aea9 100644
--- a/include/uapi/linux/android/binder_ctl.h
+++ b/include/uapi/linux/android/binderfs.h
@@ -4,8 +4,8 @@
4 * 4 *
5 */ 5 */
6 6
7#ifndef _UAPI_LINUX_BINDER_CTL_H 7#ifndef _UAPI_LINUX_BINDERFS_H
8#define _UAPI_LINUX_BINDER_CTL_H 8#define _UAPI_LINUX_BINDERFS_H
9 9
10#include <linux/android/binder.h> 10#include <linux/android/binder.h>
11#include <linux/types.h> 11#include <linux/types.h>
@@ -22,8 +22,8 @@
22 */ 22 */
23struct binderfs_device { 23struct binderfs_device {
24 char name[BINDERFS_MAX_NAME + 1]; 24 char name[BINDERFS_MAX_NAME + 1];
25 __u8 major; 25 __u32 major;
26 __u8 minor; 26 __u32 minor;
27}; 27};
28 28
29/** 29/**
@@ -31,5 +31,5 @@ struct binderfs_device {
31 */ 31 */
32#define BINDER_CTL_ADD _IOWR('b', 1, struct binderfs_device) 32#define BINDER_CTL_ADD _IOWR('b', 1, struct binderfs_device)
33 33
34#endif /* _UAPI_LINUX_BINDER_CTL_H */ 34#endif /* _UAPI_LINUX_BINDERFS_H */
35 35
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 36a7e3f18e69..f28acd952d03 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -400,6 +400,8 @@ enum {
400/* do not define AUDIT_ARCH_PPCLE since it is not supported by audit */ 400/* do not define AUDIT_ARCH_PPCLE since it is not supported by audit */
401#define AUDIT_ARCH_PPC64 (EM_PPC64|__AUDIT_ARCH_64BIT) 401#define AUDIT_ARCH_PPC64 (EM_PPC64|__AUDIT_ARCH_64BIT)
402#define AUDIT_ARCH_PPC64LE (EM_PPC64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) 402#define AUDIT_ARCH_PPC64LE (EM_PPC64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
403#define AUDIT_ARCH_RISCV32 (EM_RISCV|__AUDIT_ARCH_LE)
404#define AUDIT_ARCH_RISCV64 (EM_RISCV|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
403#define AUDIT_ARCH_S390 (EM_S390) 405#define AUDIT_ARCH_S390 (EM_S390)
404#define AUDIT_ARCH_S390X (EM_S390|__AUDIT_ARCH_64BIT) 406#define AUDIT_ARCH_S390X (EM_S390|__AUDIT_ARCH_64BIT)
405#define AUDIT_ARCH_SH (EM_SH) 407#define AUDIT_ARCH_SH (EM_SH)
diff --git a/include/uapi/linux/blkzoned.h b/include/uapi/linux/blkzoned.h
index 6fa38d001d84..498eec813494 100644
--- a/include/uapi/linux/blkzoned.h
+++ b/include/uapi/linux/blkzoned.h
@@ -138,6 +138,7 @@ struct blk_zone_range {
138 * @BLKRESETZONE: Reset the write pointer of the zones in the specified 138 * @BLKRESETZONE: Reset the write pointer of the zones in the specified
139 * sector range. The sector range must be zone aligned. 139 * sector range. The sector range must be zone aligned.
140 * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors. 140 * @BLKGETZONESZ: Get the device zone size in number of 512 B sectors.
141 * @BLKGETNRZONES: Get the total number of zones of the device.
141 */ 142 */
142#define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report) 143#define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report)
143#define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range) 144#define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range)
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
index f6052e70bf40..a55cb8b10165 100644
--- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h
@@ -268,7 +268,7 @@ struct sockaddr_in {
268#define IN_MULTICAST(a) IN_CLASSD(a) 268#define IN_MULTICAST(a) IN_CLASSD(a)
269#define IN_MULTICAST_NET 0xe0000000 269#define IN_MULTICAST_NET 0xe0000000
270 270
271#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff) 271#define IN_BADCLASS(a) (((long int) (a) ) == (long int)0xffffffff)
272#define IN_EXPERIMENTAL(a) IN_BADCLASS((a)) 272#define IN_EXPERIMENTAL(a) IN_BADCLASS((a))
273 273
274#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) 274#define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h
index 14565d703291..e8baca85bac6 100644
--- a/include/uapi/linux/inet_diag.h
+++ b/include/uapi/linux/inet_diag.h
@@ -137,15 +137,21 @@ enum {
137 INET_DIAG_TCLASS, 137 INET_DIAG_TCLASS,
138 INET_DIAG_SKMEMINFO, 138 INET_DIAG_SKMEMINFO,
139 INET_DIAG_SHUTDOWN, 139 INET_DIAG_SHUTDOWN,
140 INET_DIAG_DCTCPINFO, 140
141 INET_DIAG_PROTOCOL, /* response attribute only */ 141 /*
142 * Next extenstions cannot be requested in struct inet_diag_req_v2:
143 * its field idiag_ext has only 8 bits.
144 */
145
146 INET_DIAG_DCTCPINFO, /* request as INET_DIAG_VEGASINFO */
147 INET_DIAG_PROTOCOL, /* response attribute only */
142 INET_DIAG_SKV6ONLY, 148 INET_DIAG_SKV6ONLY,
143 INET_DIAG_LOCALS, 149 INET_DIAG_LOCALS,
144 INET_DIAG_PEERS, 150 INET_DIAG_PEERS,
145 INET_DIAG_PAD, 151 INET_DIAG_PAD,
146 INET_DIAG_MARK, 152 INET_DIAG_MARK, /* only with CAP_NET_ADMIN */
147 INET_DIAG_BBRINFO, 153 INET_DIAG_BBRINFO, /* request as INET_DIAG_VEGASINFO */
148 INET_DIAG_CLASS_ID, 154 INET_DIAG_CLASS_ID, /* request as INET_DIAG_TCLASS */
149 INET_DIAG_MD5SIG, 155 INET_DIAG_MD5SIG,
150 __INET_DIAG_MAX, 156 __INET_DIAG_MAX,
151}; 157};
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index fb78f6f500f3..f056b2a00d5c 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -26,13 +26,17 @@
26 */ 26 */
27 27
28struct input_event { 28struct input_event {
29#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL) 29#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL__)
30 struct timeval time; 30 struct timeval time;
31#define input_event_sec time.tv_sec 31#define input_event_sec time.tv_sec
32#define input_event_usec time.tv_usec 32#define input_event_usec time.tv_usec
33#else 33#else
34 __kernel_ulong_t __sec; 34 __kernel_ulong_t __sec;
35#if defined(__sparc__) && defined(__arch64__)
36 unsigned int __usec;
37#else
35 __kernel_ulong_t __usec; 38 __kernel_ulong_t __usec;
39#endif
36#define input_event_sec __sec 40#define input_event_sec __sec
37#define input_event_usec __usec 41#define input_event_usec __usec
38#endif 42#endif
diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h
index d73d83950265..1bc794ad957a 100644
--- a/include/uapi/linux/ptp_clock.h
+++ b/include/uapi/linux/ptp_clock.h
@@ -147,7 +147,7 @@ struct ptp_pin_desc {
147#define PTP_SYS_OFFSET_PRECISE \ 147#define PTP_SYS_OFFSET_PRECISE \
148 _IOWR(PTP_CLK_MAGIC, 8, struct ptp_sys_offset_precise) 148 _IOWR(PTP_CLK_MAGIC, 8, struct ptp_sys_offset_precise)
149#define PTP_SYS_OFFSET_EXTENDED \ 149#define PTP_SYS_OFFSET_EXTENDED \
150 _IOW(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended) 150 _IOWR(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended)
151 151
152struct ptp_extts_event { 152struct ptp_extts_event {
153 struct ptp_clock_time t; /* Time event occured. */ 153 struct ptp_clock_time t; /* Time event occured. */
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index 1196e1c1d4f6..ff8e7dc9d4dd 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -79,6 +79,12 @@
79#define VIRTIO_F_RING_PACKED 34 79#define VIRTIO_F_RING_PACKED 34
80 80
81/* 81/*
82 * This feature indicates that memory accesses by the driver and the
83 * device are ordered in a way described by the platform.
84 */
85#define VIRTIO_F_ORDER_PLATFORM 36
86
87/*
82 * Does the device support Single Root I/O Virtualization? 88 * Does the device support Single Root I/O Virtualization?
83 */ 89 */
84#define VIRTIO_F_SR_IOV 37 90#define VIRTIO_F_SR_IOV 37
diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h
index 2414f8af26b3..4c4e24c291a5 100644
--- a/include/uapi/linux/virtio_ring.h
+++ b/include/uapi/linux/virtio_ring.h
@@ -213,14 +213,4 @@ struct vring_packed_desc {
213 __le16 flags; 213 __le16 flags;
214}; 214};
215 215
216struct vring_packed {
217 unsigned int num;
218
219 struct vring_packed_desc *desc;
220
221 struct vring_packed_desc_event *driver;
222
223 struct vring_packed_desc_event *device;
224};
225
226#endif /* _UAPI_LINUX_VIRTIO_RING_H */ 216#endif /* _UAPI_LINUX_VIRTIO_RING_H */
diff --git a/include/uapi/rdma/hns-abi.h b/include/uapi/rdma/hns-abi.h
index ef3c7ec793a7..eb76b38a00d4 100644
--- a/include/uapi/rdma/hns-abi.h
+++ b/include/uapi/rdma/hns-abi.h
@@ -52,6 +52,11 @@ struct hns_roce_ib_create_srq {
52 __aligned_u64 que_addr; 52 __aligned_u64 que_addr;
53}; 53};
54 54
55struct hns_roce_ib_create_srq_resp {
56 __u32 srqn;
57 __u32 reserved;
58};
59
55struct hns_roce_ib_create_qp { 60struct hns_roce_ib_create_qp {
56 __aligned_u64 buf_addr; 61 __aligned_u64 buf_addr;
57 __aligned_u64 db_addr; 62 __aligned_u64 db_addr;
diff --git a/include/uapi/rdma/vmw_pvrdma-abi.h b/include/uapi/rdma/vmw_pvrdma-abi.h
index d13fd490b66d..6e73f0274e41 100644
--- a/include/uapi/rdma/vmw_pvrdma-abi.h
+++ b/include/uapi/rdma/vmw_pvrdma-abi.h
@@ -78,6 +78,7 @@ enum pvrdma_wr_opcode {
78 PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD, 78 PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD,
79 PVRDMA_WR_BIND_MW, 79 PVRDMA_WR_BIND_MW,
80 PVRDMA_WR_REG_SIG_MR, 80 PVRDMA_WR_REG_SIG_MR,
81 PVRDMA_WR_ERROR,
81}; 82};
82 83
83enum pvrdma_wc_status { 84enum pvrdma_wc_status {
diff --git a/include/xen/arm/page-coherent.h b/include/xen/arm/page-coherent.h
index 59a260712a56..2ca9164a79bf 100644
--- a/include/xen/arm/page-coherent.h
+++ b/include/xen/arm/page-coherent.h
@@ -1,17 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_ARM_XEN_PAGE_COHERENT_H 2#ifndef _XEN_ARM_PAGE_COHERENT_H
3#define _ASM_ARM_XEN_PAGE_COHERENT_H 3#define _XEN_ARM_PAGE_COHERENT_H
4
5#include <asm/page.h>
6#include <asm/dma-mapping.h>
7#include <linux/dma-mapping.h>
8
9static inline const struct dma_map_ops *xen_get_dma_ops(struct device *dev)
10{
11 if (dev && dev->archdata.dev_dma_ops)
12 return dev->archdata.dev_dma_ops;
13 return get_arch_dma_ops(NULL);
14}
15 4
16void __xen_dma_map_page(struct device *hwdev, struct page *page, 5void __xen_dma_map_page(struct device *hwdev, struct page *page,
17 dma_addr_t dev_addr, unsigned long offset, size_t size, 6 dma_addr_t dev_addr, unsigned long offset, size_t size,
@@ -21,87 +10,7 @@ void __xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
21 unsigned long attrs); 10 unsigned long attrs);
22void __xen_dma_sync_single_for_cpu(struct device *hwdev, 11void __xen_dma_sync_single_for_cpu(struct device *hwdev,
23 dma_addr_t handle, size_t size, enum dma_data_direction dir); 12 dma_addr_t handle, size_t size, enum dma_data_direction dir);
24
25void __xen_dma_sync_single_for_device(struct device *hwdev, 13void __xen_dma_sync_single_for_device(struct device *hwdev,
26 dma_addr_t handle, size_t size, enum dma_data_direction dir); 14 dma_addr_t handle, size_t size, enum dma_data_direction dir);
27 15
28static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size, 16#endif /* _XEN_ARM_PAGE_COHERENT_H */
29 dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs)
30{
31 return xen_get_dma_ops(hwdev)->alloc(hwdev, size, dma_handle, flags, attrs);
32}
33
34static inline void xen_free_coherent_pages(struct device *hwdev, size_t size,
35 void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs)
36{
37 xen_get_dma_ops(hwdev)->free(hwdev, size, cpu_addr, dma_handle, attrs);
38}
39
40static inline void xen_dma_map_page(struct device *hwdev, struct page *page,
41 dma_addr_t dev_addr, unsigned long offset, size_t size,
42 enum dma_data_direction dir, unsigned long attrs)
43{
44 unsigned long page_pfn = page_to_xen_pfn(page);
45 unsigned long dev_pfn = XEN_PFN_DOWN(dev_addr);
46 unsigned long compound_pages =
47 (1<<compound_order(page)) * XEN_PFN_PER_PAGE;
48 bool local = (page_pfn <= dev_pfn) &&
49 (dev_pfn - page_pfn < compound_pages);
50
51 /*
52 * Dom0 is mapped 1:1, while the Linux page can span across
53 * multiple Xen pages, it's not possible for it to contain a
54 * mix of local and foreign Xen pages. So if the first xen_pfn
55 * == mfn the page is local otherwise it's a foreign page
56 * grant-mapped in dom0. If the page is local we can safely
57 * call the native dma_ops function, otherwise we call the xen
58 * specific function.
59 */
60 if (local)
61 xen_get_dma_ops(hwdev)->map_page(hwdev, page, offset, size, dir, attrs);
62 else
63 __xen_dma_map_page(hwdev, page, dev_addr, offset, size, dir, attrs);
64}
65
66static inline void xen_dma_unmap_page(struct device *hwdev, dma_addr_t handle,
67 size_t size, enum dma_data_direction dir, unsigned long attrs)
68{
69 unsigned long pfn = PFN_DOWN(handle);
70 /*
71 * Dom0 is mapped 1:1, while the Linux page can be spanned accross
72 * multiple Xen page, it's not possible to have a mix of local and
73 * foreign Xen page. Dom0 is mapped 1:1, so calling pfn_valid on a
74 * foreign mfn will always return false. If the page is local we can
75 * safely call the native dma_ops function, otherwise we call the xen
76 * specific function.
77 */
78 if (pfn_valid(pfn)) {
79 if (xen_get_dma_ops(hwdev)->unmap_page)
80 xen_get_dma_ops(hwdev)->unmap_page(hwdev, handle, size, dir, attrs);
81 } else
82 __xen_dma_unmap_page(hwdev, handle, size, dir, attrs);
83}
84
85static inline void xen_dma_sync_single_for_cpu(struct device *hwdev,
86 dma_addr_t handle, size_t size, enum dma_data_direction dir)
87{
88 unsigned long pfn = PFN_DOWN(handle);
89 if (pfn_valid(pfn)) {
90 if (xen_get_dma_ops(hwdev)->sync_single_for_cpu)
91 xen_get_dma_ops(hwdev)->sync_single_for_cpu(hwdev, handle, size, dir);
92 } else
93 __xen_dma_sync_single_for_cpu(hwdev, handle, size, dir);
94}
95
96static inline void xen_dma_sync_single_for_device(struct device *hwdev,
97 dma_addr_t handle, size_t size, enum dma_data_direction dir)
98{
99 unsigned long pfn = PFN_DOWN(handle);
100 if (pfn_valid(pfn)) {
101 if (xen_get_dma_ops(hwdev)->sync_single_for_device)
102 xen_get_dma_ops(hwdev)->sync_single_for_device(hwdev, handle, size, dir);
103 } else
104 __xen_dma_sync_single_for_device(hwdev, handle, size, dir);
105}
106
107#endif /* _ASM_ARM_XEN_PAGE_COHERENT_H */