diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2018-08-20 12:05:17 -0400 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2018-08-20 12:05:17 -0400 |
| commit | 415d2b3392d7a80903e0f97f051201aa02bf20e9 (patch) | |
| tree | 47492d2386a0e7f00ef645313cb44ae4960b7e7e /include | |
| parent | 4f65245f2d178b9cba48350620d76faa4a098841 (diff) | |
| parent | b8e759b8f6dab1c473c30ac12709095d0b81078e (diff) | |
Merge branch 'for-4.19/cougar' into for-linus
New device support for hid-cougar
Diffstat (limited to 'include')
246 files changed, 4531 insertions, 1634 deletions
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 0a6c5bd92256..3a26aa7ead23 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
| @@ -80,7 +80,8 @@ | |||
| 80 | #define ACPI_LV_ALLOCATIONS 0x00100000 | 80 | #define ACPI_LV_ALLOCATIONS 0x00100000 |
| 81 | #define ACPI_LV_FUNCTIONS 0x00200000 | 81 | #define ACPI_LV_FUNCTIONS 0x00200000 |
| 82 | #define ACPI_LV_OPTIMIZATIONS 0x00400000 | 82 | #define ACPI_LV_OPTIMIZATIONS 0x00400000 |
| 83 | #define ACPI_LV_VERBOSITY2 0x00700000 | ACPI_LV_VERBOSITY1 | 83 | #define ACPI_LV_PARSE_TREES 0x00800000 |
| 84 | #define ACPI_LV_VERBOSITY2 0x00F00000 | ACPI_LV_VERBOSITY1 | ||
| 84 | #define ACPI_LV_ALL ACPI_LV_VERBOSITY2 | 85 | #define ACPI_LV_ALL ACPI_LV_VERBOSITY2 |
| 85 | 86 | ||
| 86 | /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */ | 87 | /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */ |
| @@ -131,6 +132,7 @@ | |||
| 131 | #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES) | 132 | #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES) |
| 132 | #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS) | 133 | #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS) |
| 133 | #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS) | 134 | #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS) |
| 135 | #define ACPI_DB_PARSE_TREES ACPI_DEBUG_LEVEL (ACPI_LV_PARSE_TREES) | ||
| 134 | #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES) | 136 | #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES) |
| 135 | #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS) | 137 | #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS) |
| 136 | #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS) | 138 | #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS) |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 77d71bd1be39..48d84f0d9547 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 13 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 14 | 14 | ||
| 15 | #define ACPI_CA_VERSION 0x20180508 | 15 | #define ACPI_CA_VERSION 0x20180531 |
| 16 | 16 | ||
| 17 | #include <acpi/acconfig.h> | 17 | #include <acpi/acconfig.h> |
| 18 | #include <acpi/actypes.h> | 18 | #include <acpi/actypes.h> |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 876012da8e6e..c50ef7e6b942 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | * IORT - IO Remapping Table | 67 | * IORT - IO Remapping Table |
| 68 | * | 68 | * |
| 69 | * Conforms to "IO Remapping Table System Software on ARM Platforms", | 69 | * Conforms to "IO Remapping Table System Software on ARM Platforms", |
| 70 | * Document number: ARM DEN 0049C, May 2017 | 70 | * Document number: ARM DEN 0049D, March 2018 |
| 71 | * | 71 | * |
| 72 | ******************************************************************************/ | 72 | ******************************************************************************/ |
| 73 | 73 | ||
| @@ -98,7 +98,8 @@ enum acpi_iort_node_type { | |||
| 98 | ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, | 98 | ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, |
| 99 | ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, | 99 | ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, |
| 100 | ACPI_IORT_NODE_SMMU = 0x03, | 100 | ACPI_IORT_NODE_SMMU = 0x03, |
| 101 | ACPI_IORT_NODE_SMMU_V3 = 0x04 | 101 | ACPI_IORT_NODE_SMMU_V3 = 0x04, |
| 102 | ACPI_IORT_NODE_PMCG = 0x05 | ||
| 102 | }; | 103 | }; |
| 103 | 104 | ||
| 104 | struct acpi_iort_id_mapping { | 105 | struct acpi_iort_id_mapping { |
| @@ -152,10 +153,17 @@ struct acpi_iort_named_component { | |||
| 152 | char device_name[1]; /* Path of namespace object */ | 153 | char device_name[1]; /* Path of namespace object */ |
| 153 | }; | 154 | }; |
| 154 | 155 | ||
| 156 | /* Masks for Flags field above */ | ||
| 157 | |||
| 158 | #define ACPI_IORT_NC_STALL_SUPPORTED (1) | ||
| 159 | #define ACPI_IORT_NC_PASID_BITS (31<<1) | ||
| 160 | |||
| 155 | struct acpi_iort_root_complex { | 161 | struct acpi_iort_root_complex { |
| 156 | u64 memory_properties; /* Memory access properties */ | 162 | u64 memory_properties; /* Memory access properties */ |
| 157 | u32 ats_attribute; | 163 | u32 ats_attribute; |
| 158 | u32 pci_segment_number; | 164 | u32 pci_segment_number; |
| 165 | u8 memory_address_limit; /* Memory address size limit */ | ||
| 166 | u8 reserved[3]; /* Reserved, must be zero */ | ||
| 159 | }; | 167 | }; |
| 160 | 168 | ||
| 161 | /* Values for ats_attribute field above */ | 169 | /* Values for ats_attribute field above */ |
| @@ -209,9 +217,7 @@ struct acpi_iort_smmu_v3 { | |||
| 209 | u32 pri_gsiv; | 217 | u32 pri_gsiv; |
| 210 | u32 gerr_gsiv; | 218 | u32 gerr_gsiv; |
| 211 | u32 sync_gsiv; | 219 | u32 sync_gsiv; |
| 212 | u8 pxm; | 220 | u32 pxm; |
| 213 | u8 reserved1; | ||
| 214 | u16 reserved2; | ||
| 215 | u32 id_mapping_index; | 221 | u32 id_mapping_index; |
| 216 | }; | 222 | }; |
| 217 | 223 | ||
| @@ -224,9 +230,16 @@ struct acpi_iort_smmu_v3 { | |||
| 224 | /* Masks for Flags field above */ | 230 | /* Masks for Flags field above */ |
| 225 | 231 | ||
| 226 | #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) | 232 | #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) |
| 227 | #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) | 233 | #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1) |
| 228 | #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) | 234 | #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) |
| 229 | 235 | ||
| 236 | struct acpi_iort_pmcg { | ||
| 237 | u64 page0_base_address; | ||
| 238 | u32 overflow_gsiv; | ||
| 239 | u32 node_reference; | ||
| 240 | u64 page1_base_address; | ||
| 241 | }; | ||
| 242 | |||
| 230 | /******************************************************************************* | 243 | /******************************************************************************* |
| 231 | * | 244 | * |
| 232 | * IVRS - I/O Virtualization Reporting Structure | 245 | * IVRS - I/O Virtualization Reporting Structure |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 2b1bafa197c0..66ceb12ebc63 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -1272,6 +1272,7 @@ typedef enum { | |||
| 1272 | #define ACPI_OSI_WIN_10 0x0D | 1272 | #define ACPI_OSI_WIN_10 0x0D |
| 1273 | #define ACPI_OSI_WIN_10_RS1 0x0E | 1273 | #define ACPI_OSI_WIN_10_RS1 0x0E |
| 1274 | #define ACPI_OSI_WIN_10_RS2 0x0F | 1274 | #define ACPI_OSI_WIN_10_RS2 0x0F |
| 1275 | #define ACPI_OSI_WIN_10_RS3 0x10 | ||
| 1275 | 1276 | ||
| 1276 | /* Definitions of getopt */ | 1277 | /* Definitions of getopt */ |
| 1277 | 1278 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 40a916efd7c0..1194a4c78d55 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
| @@ -309,7 +309,7 @@ static inline void acpi_processor_ppc_exit(void) | |||
| 309 | { | 309 | { |
| 310 | return; | 310 | return; |
| 311 | } | 311 | } |
| 312 | static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr, | 312 | static inline void acpi_processor_ppc_has_changed(struct acpi_processor *pr, |
| 313 | int event_flag) | 313 | int event_flag) |
| 314 | { | 314 | { |
| 315 | static unsigned int printout = 1; | 315 | static unsigned int printout = 1; |
| @@ -320,7 +320,6 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr, | |||
| 320 | "Consider compiling CPUfreq support into your kernel.\n"); | 320 | "Consider compiling CPUfreq support into your kernel.\n"); |
| 321 | printout = 0; | 321 | printout = 0; |
| 322 | } | 322 | } |
| 323 | return 0; | ||
| 324 | } | 323 | } |
| 325 | static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) | 324 | static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) |
| 326 | { | 325 | { |
diff --git a/include/asm-generic/qspinlock_types.h b/include/asm-generic/qspinlock_types.h index 0763f065b975..d10f1e7d6ba8 100644 --- a/include/asm-generic/qspinlock_types.h +++ b/include/asm-generic/qspinlock_types.h | |||
| @@ -63,7 +63,7 @@ typedef struct qspinlock { | |||
| 63 | /* | 63 | /* |
| 64 | * Initializier | 64 | * Initializier |
| 65 | */ | 65 | */ |
| 66 | #define __ARCH_SPIN_LOCK_UNLOCKED { .val = ATOMIC_INIT(0) } | 66 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } |
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * Bitfields in the atomic value: | 69 | * Bitfields in the atomic value: |
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h index cc414db9da0a..482461d8931d 100644 --- a/include/crypto/if_alg.h +++ b/include/crypto/if_alg.h | |||
| @@ -245,7 +245,8 @@ ssize_t af_alg_sendpage(struct socket *sock, struct page *page, | |||
| 245 | int offset, size_t size, int flags); | 245 | int offset, size_t size, int flags); |
| 246 | void af_alg_free_resources(struct af_alg_async_req *areq); | 246 | void af_alg_free_resources(struct af_alg_async_req *areq); |
| 247 | void af_alg_async_cb(struct crypto_async_request *_req, int err); | 247 | void af_alg_async_cb(struct crypto_async_request *_req, int err); |
| 248 | __poll_t af_alg_poll_mask(struct socket *sock, __poll_t events); | 248 | __poll_t af_alg_poll(struct file *file, struct socket *sock, |
| 249 | poll_table *wait); | ||
| 249 | struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, | 250 | struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk, |
| 250 | unsigned int areqlen); | 251 | unsigned int areqlen); |
| 251 | int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, | 252 | int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, |
diff --git a/include/dt-bindings/clock/actions,s900-cmu.h b/include/dt-bindings/clock/actions,s900-cmu.h new file mode 100644 index 000000000000..7c1251565f43 --- /dev/null +++ b/include/dt-bindings/clock/actions,s900-cmu.h | |||
| @@ -0,0 +1,129 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0+ | ||
| 2 | // | ||
| 3 | // Device Tree binding constants for Actions Semi S900 Clock Management Unit | ||
| 4 | // | ||
| 5 | // Copyright (c) 2014 Actions Semi Inc. | ||
| 6 | // Copyright (c) 2018 Linaro Ltd. | ||
| 7 | |||
| 8 | #ifndef __DT_BINDINGS_CLOCK_S900_CMU_H | ||
| 9 | #define __DT_BINDINGS_CLOCK_S900_CMU_H | ||
| 10 | |||
| 11 | #define CLK_NONE 0 | ||
| 12 | |||
| 13 | /* fixed rate clocks */ | ||
| 14 | #define CLK_LOSC 1 | ||
| 15 | #define CLK_HOSC 2 | ||
| 16 | |||
| 17 | /* pll clocks */ | ||
| 18 | #define CLK_CORE_PLL 3 | ||
| 19 | #define CLK_DEV_PLL 4 | ||
| 20 | #define CLK_DDR_PLL 5 | ||
| 21 | #define CLK_NAND_PLL 6 | ||
| 22 | #define CLK_DISPLAY_PLL 7 | ||
| 23 | #define CLK_DSI_PLL 8 | ||
| 24 | #define CLK_ASSIST_PLL 9 | ||
| 25 | #define CLK_AUDIO_PLL 10 | ||
| 26 | |||
| 27 | /* system clock */ | ||
| 28 | #define CLK_CPU 15 | ||
| 29 | #define CLK_DEV 16 | ||
| 30 | #define CLK_NOC 17 | ||
| 31 | #define CLK_NOC_MUX 18 | ||
| 32 | #define CLK_NOC_DIV 19 | ||
| 33 | #define CLK_AHB 20 | ||
| 34 | #define CLK_APB 21 | ||
| 35 | #define CLK_DMAC 22 | ||
| 36 | |||
| 37 | /* peripheral device clock */ | ||
| 38 | #define CLK_GPIO 23 | ||
| 39 | |||
| 40 | #define CLK_BISP 24 | ||
| 41 | #define CLK_CSI0 25 | ||
| 42 | #define CLK_CSI1 26 | ||
| 43 | |||
| 44 | #define CLK_DE0 27 | ||
| 45 | #define CLK_DE1 28 | ||
| 46 | #define CLK_DE2 29 | ||
| 47 | #define CLK_DE3 30 | ||
| 48 | #define CLK_DSI 32 | ||
| 49 | |||
| 50 | #define CLK_GPU 33 | ||
| 51 | #define CLK_GPU_CORE 34 | ||
| 52 | #define CLK_GPU_MEM 35 | ||
| 53 | #define CLK_GPU_SYS 36 | ||
| 54 | |||
| 55 | #define CLK_HDE 37 | ||
| 56 | #define CLK_I2C0 38 | ||
| 57 | #define CLK_I2C1 39 | ||
| 58 | #define CLK_I2C2 40 | ||
| 59 | #define CLK_I2C3 41 | ||
| 60 | #define CLK_I2C4 42 | ||
| 61 | #define CLK_I2C5 43 | ||
| 62 | #define CLK_I2SRX 44 | ||
| 63 | #define CLK_I2STX 45 | ||
| 64 | #define CLK_IMX 46 | ||
| 65 | #define CLK_LCD 47 | ||
| 66 | #define CLK_NAND0 48 | ||
| 67 | #define CLK_NAND1 49 | ||
| 68 | #define CLK_PWM0 50 | ||
| 69 | #define CLK_PWM1 51 | ||
| 70 | #define CLK_PWM2 52 | ||
| 71 | #define CLK_PWM3 53 | ||
| 72 | #define CLK_PWM4 54 | ||
| 73 | #define CLK_PWM5 55 | ||
| 74 | #define CLK_SD0 56 | ||
| 75 | #define CLK_SD1 57 | ||
| 76 | #define CLK_SD2 58 | ||
| 77 | #define CLK_SD3 59 | ||
| 78 | #define CLK_SENSOR 60 | ||
| 79 | #define CLK_SPEED_SENSOR 61 | ||
| 80 | #define CLK_SPI0 62 | ||
| 81 | #define CLK_SPI1 63 | ||
| 82 | #define CLK_SPI2 64 | ||
| 83 | #define CLK_SPI3 65 | ||
| 84 | #define CLK_THERMAL_SENSOR 66 | ||
| 85 | #define CLK_UART0 67 | ||
| 86 | #define CLK_UART1 68 | ||
| 87 | #define CLK_UART2 69 | ||
| 88 | #define CLK_UART3 70 | ||
| 89 | #define CLK_UART4 71 | ||
| 90 | #define CLK_UART5 72 | ||
| 91 | #define CLK_UART6 73 | ||
| 92 | #define CLK_VCE 74 | ||
| 93 | #define CLK_VDE 75 | ||
| 94 | |||
| 95 | #define CLK_USB3_480MPLL0 76 | ||
| 96 | #define CLK_USB3_480MPHY0 77 | ||
| 97 | #define CLK_USB3_5GPHY 78 | ||
| 98 | #define CLK_USB3_CCE 79 | ||
| 99 | #define CLK_USB3_MAC 80 | ||
| 100 | |||
| 101 | #define CLK_TIMER 83 | ||
| 102 | |||
| 103 | #define CLK_HDMI_AUDIO 84 | ||
| 104 | |||
| 105 | #define CLK_24M 85 | ||
| 106 | |||
| 107 | #define CLK_EDP 86 | ||
| 108 | |||
| 109 | #define CLK_24M_EDP 87 | ||
| 110 | #define CLK_EDP_PLL 88 | ||
| 111 | #define CLK_EDP_LINK 89 | ||
| 112 | |||
| 113 | #define CLK_USB2H0_PLLEN 90 | ||
| 114 | #define CLK_USB2H0_PHY 91 | ||
| 115 | #define CLK_USB2H0_CCE 92 | ||
| 116 | #define CLK_USB2H1_PLLEN 93 | ||
| 117 | #define CLK_USB2H1_PHY 94 | ||
| 118 | #define CLK_USB2H1_CCE 95 | ||
| 119 | |||
| 120 | #define CLK_DDR0 96 | ||
| 121 | #define CLK_DDR1 97 | ||
| 122 | #define CLK_DMM 98 | ||
| 123 | |||
| 124 | #define CLK_ETH_MAC 99 | ||
| 125 | #define CLK_RMII_REF 100 | ||
| 126 | |||
| 127 | #define CLK_NR_CLKS (CLK_RMII_REF + 1) | ||
| 128 | |||
| 129 | #endif /* __DT_BINDINGS_CLOCK_S900_CMU_H */ | ||
diff --git a/include/dt-bindings/clock/aspeed-clock.h b/include/dt-bindings/clock/aspeed-clock.h index d3558d897a4d..44761849fcbe 100644 --- a/include/dt-bindings/clock/aspeed-clock.h +++ b/include/dt-bindings/clock/aspeed-clock.h | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #define ASPEED_CLK_MAC 32 | 38 | #define ASPEED_CLK_MAC 32 |
| 39 | #define ASPEED_CLK_BCLK 33 | 39 | #define ASPEED_CLK_BCLK 33 |
| 40 | #define ASPEED_CLK_MPLL 34 | 40 | #define ASPEED_CLK_MPLL 34 |
| 41 | #define ASPEED_CLK_24M 35 | ||
| 41 | 42 | ||
| 42 | #define ASPEED_RESET_XDMA 0 | 43 | #define ASPEED_RESET_XDMA 0 |
| 43 | #define ASPEED_RESET_MCTP 1 | 44 | #define ASPEED_RESET_MCTP 1 |
| @@ -45,8 +46,9 @@ | |||
| 45 | #define ASPEED_RESET_JTAG_MASTER 3 | 46 | #define ASPEED_RESET_JTAG_MASTER 3 |
| 46 | #define ASPEED_RESET_MIC 4 | 47 | #define ASPEED_RESET_MIC 4 |
| 47 | #define ASPEED_RESET_PWM 5 | 48 | #define ASPEED_RESET_PWM 5 |
| 48 | #define ASPEED_RESET_PCIVGA 6 | 49 | #define ASPEED_RESET_PECI 6 |
| 49 | #define ASPEED_RESET_I2C 7 | 50 | #define ASPEED_RESET_I2C 7 |
| 50 | #define ASPEED_RESET_AHB 8 | 51 | #define ASPEED_RESET_AHB 8 |
| 52 | #define ASPEED_RESET_CRT1 9 | ||
| 51 | 53 | ||
| 52 | #endif | 54 | #endif |
diff --git a/include/dt-bindings/clock/axg-aoclkc.h b/include/dt-bindings/clock/axg-aoclkc.h new file mode 100644 index 000000000000..61955016a55b --- /dev/null +++ b/include/dt-bindings/clock/axg-aoclkc.h | |||
| @@ -0,0 +1,26 @@ | |||
| 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_AXG_AOCLK | ||
| 11 | #define DT_BINDINGS_CLOCK_AMLOGIC_MESON_AXG_AOCLK | ||
| 12 | |||
| 13 | #define CLKID_AO_REMOTE 0 | ||
| 14 | #define CLKID_AO_I2C_MASTER 1 | ||
| 15 | #define CLKID_AO_I2C_SLAVE 2 | ||
| 16 | #define CLKID_AO_UART1 3 | ||
| 17 | #define CLKID_AO_UART2 4 | ||
| 18 | #define CLKID_AO_IR_BLASTER 5 | ||
| 19 | #define CLKID_AO_SAR_ADC 6 | ||
| 20 | #define CLKID_AO_CLK81 7 | ||
| 21 | #define CLKID_AO_SAR_ADC_SEL 8 | ||
| 22 | #define CLKID_AO_SAR_ADC_DIV 9 | ||
| 23 | #define CLKID_AO_SAR_ADC_CLK 10 | ||
| 24 | #define CLKID_AO_ALT_XTAL 11 | ||
| 25 | |||
| 26 | #endif | ||
diff --git a/include/dt-bindings/clock/bcm-sr.h b/include/dt-bindings/clock/bcm-sr.h index cff6c6fe2947..419011ba1a94 100644 --- a/include/dt-bindings/clock/bcm-sr.h +++ b/include/dt-bindings/clock/bcm-sr.h | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | /* GENPLL 0 clock channel ID SCR HSLS FS PCIE */ | 36 | /* GENPLL 0 clock channel ID SCR HSLS FS PCIE */ |
| 37 | #define BCM_SR_GENPLL0 0 | 37 | #define BCM_SR_GENPLL0 0 |
| 38 | #define BCM_SR_GENPLL0_SATA_CLK 1 | 38 | #define BCM_SR_GENPLL0_125M_CLK 1 |
| 39 | #define BCM_SR_GENPLL0_SCR_CLK 2 | 39 | #define BCM_SR_GENPLL0_SCR_CLK 2 |
| 40 | #define BCM_SR_GENPLL0_250M_CLK 3 | 40 | #define BCM_SR_GENPLL0_250M_CLK 3 |
| 41 | #define BCM_SR_GENPLL0_PCIE_AXI_CLK 4 | 41 | #define BCM_SR_GENPLL0_PCIE_AXI_CLK 4 |
| @@ -50,9 +50,11 @@ | |||
| 50 | /* GENPLL 2 clock channel ID NITRO MHB*/ | 50 | /* GENPLL 2 clock channel ID NITRO MHB*/ |
| 51 | #define BCM_SR_GENPLL2 0 | 51 | #define BCM_SR_GENPLL2 0 |
| 52 | #define BCM_SR_GENPLL2_NIC_CLK 1 | 52 | #define BCM_SR_GENPLL2_NIC_CLK 1 |
| 53 | #define BCM_SR_GENPLL2_250_NITRO_CLK 2 | 53 | #define BCM_SR_GENPLL2_TS_500_CLK 2 |
| 54 | #define BCM_SR_GENPLL2_125_NITRO_CLK 3 | 54 | #define BCM_SR_GENPLL2_125_NITRO_CLK 3 |
| 55 | #define BCM_SR_GENPLL2_CHIMP_CLK 4 | 55 | #define BCM_SR_GENPLL2_CHIMP_CLK 4 |
| 56 | #define BCM_SR_GENPLL2_NIC_FLASH_CLK 5 | ||
| 57 | #define BCM_SR_GENPLL2_FS4_CLK 6 | ||
| 56 | 58 | ||
| 57 | /* GENPLL 3 HSLS clock channel ID */ | 59 | /* GENPLL 3 HSLS clock channel ID */ |
| 58 | #define BCM_SR_GENPLL3 0 | 60 | #define BCM_SR_GENPLL3 0 |
| @@ -62,11 +64,16 @@ | |||
| 62 | /* GENPLL 4 SCR clock channel ID */ | 64 | /* GENPLL 4 SCR clock channel ID */ |
| 63 | #define BCM_SR_GENPLL4 0 | 65 | #define BCM_SR_GENPLL4 0 |
| 64 | #define BCM_SR_GENPLL4_CCN_CLK 1 | 66 | #define BCM_SR_GENPLL4_CCN_CLK 1 |
| 67 | #define BCM_SR_GENPLL4_TPIU_PLL_CLK 2 | ||
| 68 | #define BCM_SR_GENPLL4_NOC_CLK 3 | ||
| 69 | #define BCM_SR_GENPLL4_CHCLK_FS4_CLK 4 | ||
| 70 | #define BCM_SR_GENPLL4_BRIDGE_FSCPU_CLK 5 | ||
| 65 | 71 | ||
| 66 | /* GENPLL 5 FS4 clock channel ID */ | 72 | /* GENPLL 5 FS4 clock channel ID */ |
| 67 | #define BCM_SR_GENPLL5 0 | 73 | #define BCM_SR_GENPLL5 0 |
| 68 | #define BCM_SR_GENPLL5_FS_CLK 1 | 74 | #define BCM_SR_GENPLL5_FS4_HF_CLK 1 |
| 69 | #define BCM_SR_GENPLL5_SPU_CLK 2 | 75 | #define BCM_SR_GENPLL5_CRYPTO_AE_CLK 2 |
| 76 | #define BCM_SR_GENPLL5_RAID_AE_CLK 3 | ||
| 70 | 77 | ||
| 71 | /* GENPLL 6 NITRO clock channel ID */ | 78 | /* GENPLL 6 NITRO clock channel ID */ |
| 72 | #define BCM_SR_GENPLL6 0 | 79 | #define BCM_SR_GENPLL6 0 |
| @@ -74,13 +81,16 @@ | |||
| 74 | 81 | ||
| 75 | /* LCPLL0 clock channel ID */ | 82 | /* LCPLL0 clock channel ID */ |
| 76 | #define BCM_SR_LCPLL0 0 | 83 | #define BCM_SR_LCPLL0 0 |
| 77 | #define BCM_SR_LCPLL0_SATA_REF_CLK 1 | 84 | #define BCM_SR_LCPLL0_SATA_REFP_CLK 1 |
| 78 | #define BCM_SR_LCPLL0_USB_REF_CLK 2 | 85 | #define BCM_SR_LCPLL0_SATA_REFN_CLK 2 |
| 79 | #define BCM_SR_LCPLL0_SATA_REFPN_CLK 3 | 86 | #define BCM_SR_LCPLL0_SATA_350_CLK 3 |
| 87 | #define BCM_SR_LCPLL0_SATA_500_CLK 4 | ||
| 80 | 88 | ||
| 81 | /* LCPLL1 clock channel ID */ | 89 | /* LCPLL1 clock channel ID */ |
| 82 | #define BCM_SR_LCPLL1 0 | 90 | #define BCM_SR_LCPLL1 0 |
| 83 | #define BCM_SR_LCPLL1_WAN_CLK 1 | 91 | #define BCM_SR_LCPLL1_WAN_CLK 1 |
| 92 | #define BCM_SR_LCPLL1_USB_REF_CLK 2 | ||
| 93 | #define BCM_SR_LCPLL1_CRMU_TS_CLK 3 | ||
| 84 | 94 | ||
| 85 | /* LCPLL PCIE clock channel ID */ | 95 | /* LCPLL PCIE clock channel ID */ |
| 86 | #define BCM_SR_LCPLL_PCIE 0 | 96 | #define BCM_SR_LCPLL_PCIE 0 |
diff --git a/include/dt-bindings/clock/gxbb-clkc.h b/include/dt-bindings/clock/gxbb-clkc.h index 8ba99a5e3fd3..7a892be90549 100644 --- a/include/dt-bindings/clock/gxbb-clkc.h +++ b/include/dt-bindings/clock/gxbb-clkc.h | |||
| @@ -125,5 +125,7 @@ | |||
| 125 | #define CLKID_VAPB_1 138 | 125 | #define CLKID_VAPB_1 138 |
| 126 | #define CLKID_VAPB_SEL 139 | 126 | #define CLKID_VAPB_SEL 139 |
| 127 | #define CLKID_VAPB 140 | 127 | #define CLKID_VAPB 140 |
| 128 | #define CLKID_VDEC_1 153 | ||
| 129 | #define CLKID_VDEC_HEVC 156 | ||
| 128 | 130 | ||
| 129 | #endif /* __GXBB_CLKC_H */ | 131 | #endif /* __GXBB_CLKC_H */ |
diff --git a/include/dt-bindings/clock/histb-clock.h b/include/dt-bindings/clock/histb-clock.h index fab30b3f78b2..136de24733be 100644 --- a/include/dt-bindings/clock/histb-clock.h +++ b/include/dt-bindings/clock/histb-clock.h | |||
| @@ -62,6 +62,14 @@ | |||
| 62 | #define HISTB_USB2_PHY1_REF_CLK 40 | 62 | #define HISTB_USB2_PHY1_REF_CLK 40 |
| 63 | #define HISTB_USB2_PHY2_REF_CLK 41 | 63 | #define HISTB_USB2_PHY2_REF_CLK 41 |
| 64 | #define HISTB_COMBPHY0_CLK 42 | 64 | #define HISTB_COMBPHY0_CLK 42 |
| 65 | #define HISTB_USB3_BUS_CLK 43 | ||
| 66 | #define HISTB_USB3_UTMI_CLK 44 | ||
| 67 | #define HISTB_USB3_PIPE_CLK 45 | ||
| 68 | #define HISTB_USB3_SUSPEND_CLK 46 | ||
| 69 | #define HISTB_USB3_BUS_CLK1 47 | ||
| 70 | #define HISTB_USB3_UTMI_CLK1 48 | ||
| 71 | #define HISTB_USB3_PIPE_CLK1 49 | ||
| 72 | #define HISTB_USB3_SUSPEND_CLK1 50 | ||
| 65 | 73 | ||
| 66 | /* clocks provided by mcu CRG */ | 74 | /* clocks provided by mcu CRG */ |
| 67 | #define HISTB_MCE_CLK 1 | 75 | #define HISTB_MCE_CLK 1 |
diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h index da59fd9cdb5e..7ad171b8f3bf 100644 --- a/include/dt-bindings/clock/imx6qdl-clock.h +++ b/include/dt-bindings/clock/imx6qdl-clock.h | |||
| @@ -271,6 +271,8 @@ | |||
| 271 | #define IMX6QDL_CLK_PRE_AXI 258 | 271 | #define IMX6QDL_CLK_PRE_AXI 258 |
| 272 | #define IMX6QDL_CLK_MLB_SEL 259 | 272 | #define IMX6QDL_CLK_MLB_SEL 259 |
| 273 | #define IMX6QDL_CLK_MLB_PODF 260 | 273 | #define IMX6QDL_CLK_MLB_PODF 260 |
| 274 | #define IMX6QDL_CLK_END 261 | 274 | #define IMX6QDL_CLK_EPIT1 261 |
| 275 | #define IMX6QDL_CLK_EPIT2 262 | ||
| 276 | #define IMX6QDL_CLK_END 263 | ||
| 275 | 277 | ||
| 276 | #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ | 278 | #endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */ |
diff --git a/include/dt-bindings/clock/imx6sx-clock.h b/include/dt-bindings/clock/imx6sx-clock.h index 36f0324902a5..cd2d6c570e86 100644 --- a/include/dt-bindings/clock/imx6sx-clock.h +++ b/include/dt-bindings/clock/imx6sx-clock.h | |||
| @@ -275,6 +275,10 @@ | |||
| 275 | #define IMX6SX_PLL6_BYPASS 262 | 275 | #define IMX6SX_PLL6_BYPASS 262 |
| 276 | #define IMX6SX_PLL7_BYPASS 263 | 276 | #define IMX6SX_PLL7_BYPASS 263 |
| 277 | #define IMX6SX_CLK_SPDIF_GCLK 264 | 277 | #define IMX6SX_CLK_SPDIF_GCLK 264 |
| 278 | #define IMX6SX_CLK_CLK_END 265 | 278 | #define IMX6SX_CLK_LVDS2_SEL 265 |
| 279 | #define IMX6SX_CLK_LVDS2_OUT 266 | ||
| 280 | #define IMX6SX_CLK_LVDS2_IN 267 | ||
| 281 | #define IMX6SX_CLK_ANACLK2 268 | ||
| 282 | #define IMX6SX_CLK_CLK_END 269 | ||
| 279 | 283 | ||
| 280 | #endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */ | 284 | #endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */ |
diff --git a/include/dt-bindings/clock/imx6ul-clock.h b/include/dt-bindings/clock/imx6ul-clock.h index ee9f1a508d2f..0aa1d9c3e0b9 100644 --- a/include/dt-bindings/clock/imx6ul-clock.h +++ b/include/dt-bindings/clock/imx6ul-clock.h | |||
| @@ -235,8 +235,6 @@ | |||
| 235 | #define IMX6UL_CLK_CSI_PODF 222 | 235 | #define IMX6UL_CLK_CSI_PODF 222 |
| 236 | #define IMX6UL_CLK_PLL3_120M 223 | 236 | #define IMX6UL_CLK_PLL3_120M 223 |
| 237 | #define IMX6UL_CLK_KPP 224 | 237 | #define IMX6UL_CLK_KPP 224 |
| 238 | |||
| 239 | /* For i.MX6ULL */ | ||
| 240 | #define IMX6ULL_CLK_ESAI_PRED 225 | 238 | #define IMX6ULL_CLK_ESAI_PRED 225 |
| 241 | #define IMX6ULL_CLK_ESAI_PODF 226 | 239 | #define IMX6ULL_CLK_ESAI_PODF 226 |
| 242 | #define IMX6ULL_CLK_ESAI_EXTAL 227 | 240 | #define IMX6ULL_CLK_ESAI_EXTAL 227 |
| @@ -249,6 +247,13 @@ | |||
| 249 | #define IMX6ULL_CLK_EPDC_ACLK 234 | 247 | #define IMX6ULL_CLK_EPDC_ACLK 234 |
| 250 | #define IMX6ULL_CLK_EPDC_PIX 235 | 248 | #define IMX6ULL_CLK_EPDC_PIX 235 |
| 251 | #define IMX6ULL_CLK_ESAI_SEL 236 | 249 | #define IMX6ULL_CLK_ESAI_SEL 236 |
| 252 | #define IMX6UL_CLK_END 237 | 250 | #define IMX6UL_CLK_CKO1_SEL 237 |
| 251 | #define IMX6UL_CLK_CKO1_PODF 238 | ||
| 252 | #define IMX6UL_CLK_CKO1 239 | ||
| 253 | #define IMX6UL_CLK_CKO2_SEL 240 | ||
| 254 | #define IMX6UL_CLK_CKO2_PODF 241 | ||
| 255 | #define IMX6UL_CLK_CKO2 242 | ||
| 256 | #define IMX6UL_CLK_CKO 243 | ||
| 257 | #define IMX6UL_CLK_END 244 | ||
| 253 | 258 | ||
| 254 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ | 259 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ |
diff --git a/include/dt-bindings/clock/imx7d-clock.h b/include/dt-bindings/clock/imx7d-clock.h index b2325d3e236a..0d67f53bba93 100644 --- a/include/dt-bindings/clock/imx7d-clock.h +++ b/include/dt-bindings/clock/imx7d-clock.h | |||
| @@ -168,7 +168,7 @@ | |||
| 168 | #define IMX7D_SPDIF_ROOT_SRC 155 | 168 | #define IMX7D_SPDIF_ROOT_SRC 155 |
| 169 | #define IMX7D_SPDIF_ROOT_CG 156 | 169 | #define IMX7D_SPDIF_ROOT_CG 156 |
| 170 | #define IMX7D_SPDIF_ROOT_DIV 157 | 170 | #define IMX7D_SPDIF_ROOT_DIV 157 |
| 171 | #define IMX7D_ENET1_REF_ROOT_CLK 158 | 171 | #define IMX7D_ENET1_IPG_ROOT_CLK 158 |
| 172 | #define IMX7D_ENET1_REF_ROOT_SRC 159 | 172 | #define IMX7D_ENET1_REF_ROOT_SRC 159 |
| 173 | #define IMX7D_ENET1_REF_ROOT_CG 160 | 173 | #define IMX7D_ENET1_REF_ROOT_CG 160 |
| 174 | #define IMX7D_ENET1_REF_ROOT_DIV 161 | 174 | #define IMX7D_ENET1_REF_ROOT_DIV 161 |
| @@ -176,7 +176,7 @@ | |||
| 176 | #define IMX7D_ENET1_TIME_ROOT_SRC 163 | 176 | #define IMX7D_ENET1_TIME_ROOT_SRC 163 |
| 177 | #define IMX7D_ENET1_TIME_ROOT_CG 164 | 177 | #define IMX7D_ENET1_TIME_ROOT_CG 164 |
| 178 | #define IMX7D_ENET1_TIME_ROOT_DIV 165 | 178 | #define IMX7D_ENET1_TIME_ROOT_DIV 165 |
| 179 | #define IMX7D_ENET2_REF_ROOT_CLK 166 | 179 | #define IMX7D_ENET2_IPG_ROOT_CLK 166 |
| 180 | #define IMX7D_ENET2_REF_ROOT_SRC 167 | 180 | #define IMX7D_ENET2_REF_ROOT_SRC 167 |
| 181 | #define IMX7D_ENET2_REF_ROOT_CG 168 | 181 | #define IMX7D_ENET2_REF_ROOT_CG 168 |
| 182 | #define IMX7D_ENET2_REF_ROOT_DIV 169 | 182 | #define IMX7D_ENET2_REF_ROOT_DIV 169 |
diff --git a/include/dt-bindings/clock/meson8b-clkc.h b/include/dt-bindings/clock/meson8b-clkc.h index dea9d46d4fa7..a60f47b49231 100644 --- a/include/dt-bindings/clock/meson8b-clkc.h +++ b/include/dt-bindings/clock/meson8b-clkc.h | |||
| @@ -102,5 +102,6 @@ | |||
| 102 | #define CLKID_MPLL0 93 | 102 | #define CLKID_MPLL0 93 |
| 103 | #define CLKID_MPLL1 94 | 103 | #define CLKID_MPLL1 94 |
| 104 | #define CLKID_MPLL2 95 | 104 | #define CLKID_MPLL2 95 |
| 105 | #define CLKID_NAND_CLK 112 | ||
| 105 | 106 | ||
| 106 | #endif /* __MESON8B_CLKC_H */ | 107 | #endif /* __MESON8B_CLKC_H */ |
diff --git a/include/dt-bindings/clock/mt2701-clk.h b/include/dt-bindings/clock/mt2701-clk.h index 24e93dfcee9f..9ac2f2b5710a 100644 --- a/include/dt-bindings/clock/mt2701-clk.h +++ b/include/dt-bindings/clock/mt2701-clk.h | |||
| @@ -171,13 +171,12 @@ | |||
| 171 | #define CLK_TOP_8BDAC 151 | 171 | #define CLK_TOP_8BDAC 151 |
| 172 | #define CLK_TOP_WBG_DIG_416M 152 | 172 | #define CLK_TOP_WBG_DIG_416M 152 |
| 173 | #define CLK_TOP_DPI 153 | 173 | #define CLK_TOP_DPI 153 |
| 174 | #define CLK_TOP_HDMITX_CLKDIG_CTS 154 | 174 | #define CLK_TOP_DSI0_LNTC_DSI 154 |
| 175 | #define CLK_TOP_DSI0_LNTC_DSI 155 | 175 | #define CLK_TOP_AUD_EXT1 155 |
| 176 | #define CLK_TOP_AUD_EXT1 156 | 176 | #define CLK_TOP_AUD_EXT2 156 |
| 177 | #define CLK_TOP_AUD_EXT2 157 | 177 | #define CLK_TOP_NFI1X_PAD 157 |
| 178 | #define CLK_TOP_NFI1X_PAD 158 | 178 | #define CLK_TOP_AXISEL_D4 158 |
| 179 | #define CLK_TOP_AXISEL_D4 159 | 179 | #define CLK_TOP_NR 159 |
| 180 | #define CLK_TOP_NR 160 | ||
| 181 | 180 | ||
| 182 | /* APMIXEDSYS */ | 181 | /* APMIXEDSYS */ |
| 183 | 182 | ||
| @@ -194,7 +193,8 @@ | |||
| 194 | #define CLK_APMIXED_HADDS2PLL 11 | 193 | #define CLK_APMIXED_HADDS2PLL 11 |
| 195 | #define CLK_APMIXED_AUD2PLL 12 | 194 | #define CLK_APMIXED_AUD2PLL 12 |
| 196 | #define CLK_APMIXED_TVD2PLL 13 | 195 | #define CLK_APMIXED_TVD2PLL 13 |
| 197 | #define CLK_APMIXED_NR 14 | 196 | #define CLK_APMIXED_HDMI_REF 14 |
| 197 | #define CLK_APMIXED_NR 15 | ||
| 198 | 198 | ||
| 199 | /* DDRPHY */ | 199 | /* DDRPHY */ |
| 200 | 200 | ||
| @@ -431,6 +431,10 @@ | |||
| 431 | #define CLK_ETHSYS_CRYPTO 8 | 431 | #define CLK_ETHSYS_CRYPTO 8 |
| 432 | #define CLK_ETHSYS_NR 9 | 432 | #define CLK_ETHSYS_NR 9 |
| 433 | 433 | ||
| 434 | /* G3DSYS */ | ||
| 435 | #define CLK_G3DSYS_CORE 1 | ||
| 436 | #define CLK_G3DSYS_NR 2 | ||
| 437 | |||
| 434 | /* BDP */ | 438 | /* BDP */ |
| 435 | 439 | ||
| 436 | #define CLK_BDP_BRG_BA 1 | 440 | #define CLK_BDP_BRG_BA 1 |
diff --git a/include/dt-bindings/clock/nuvoton,npcm7xx-clock.h b/include/dt-bindings/clock/nuvoton,npcm7xx-clock.h new file mode 100644 index 000000000000..f21522605b94 --- /dev/null +++ b/include/dt-bindings/clock/nuvoton,npcm7xx-clock.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * Nuvoton NPCM7xx Clock Generator binding | ||
| 4 | * clock binding number for all clocks supportted by nuvoton,npcm7xx-clk | ||
| 5 | * | ||
| 6 | * Copyright (C) 2018 Nuvoton Technologies tali.perry@nuvoton.com | ||
| 7 | * | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __DT_BINDINGS_CLOCK_NPCM7XX_H | ||
| 11 | #define __DT_BINDINGS_CLOCK_NPCM7XX_H | ||
| 12 | |||
| 13 | |||
| 14 | #define NPCM7XX_CLK_CPU 0 | ||
| 15 | #define NPCM7XX_CLK_GFX_PIXEL 1 | ||
| 16 | #define NPCM7XX_CLK_MC 2 | ||
| 17 | #define NPCM7XX_CLK_ADC 3 | ||
| 18 | #define NPCM7XX_CLK_AHB 4 | ||
| 19 | #define NPCM7XX_CLK_TIMER 5 | ||
| 20 | #define NPCM7XX_CLK_UART 6 | ||
| 21 | #define NPCM7XX_CLK_MMC 7 | ||
| 22 | #define NPCM7XX_CLK_SPI3 8 | ||
| 23 | #define NPCM7XX_CLK_PCI 9 | ||
| 24 | #define NPCM7XX_CLK_AXI 10 | ||
| 25 | #define NPCM7XX_CLK_APB4 11 | ||
| 26 | #define NPCM7XX_CLK_APB3 12 | ||
| 27 | #define NPCM7XX_CLK_APB2 13 | ||
| 28 | #define NPCM7XX_CLK_APB1 14 | ||
| 29 | #define NPCM7XX_CLK_APB5 15 | ||
| 30 | #define NPCM7XX_CLK_CLKOUT 16 | ||
| 31 | #define NPCM7XX_CLK_GFX 17 | ||
| 32 | #define NPCM7XX_CLK_SU 18 | ||
| 33 | #define NPCM7XX_CLK_SU48 19 | ||
| 34 | #define NPCM7XX_CLK_SDHC 20 | ||
| 35 | #define NPCM7XX_CLK_SPI0 21 | ||
| 36 | #define NPCM7XX_CLK_SPIX 22 | ||
| 37 | |||
| 38 | #define NPCM7XX_CLK_REFCLK 23 | ||
| 39 | #define NPCM7XX_CLK_SYSBYPCK 24 | ||
| 40 | #define NPCM7XX_CLK_MCBYPCK 25 | ||
| 41 | |||
| 42 | #define NPCM7XX_NUM_CLOCKS (NPCM7XX_CLK_MCBYPCK+1) | ||
| 43 | |||
| 44 | #endif | ||
diff --git a/include/dt-bindings/clock/qcom,gcc-msm8998.h b/include/dt-bindings/clock/qcom,gcc-msm8998.h new file mode 100644 index 000000000000..58a242e656b1 --- /dev/null +++ b/include/dt-bindings/clock/qcom,gcc-msm8998.h | |||
| @@ -0,0 +1,208 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2016, The Linux Foundation. All rights reserved. | ||
| 3 | * | ||
| 4 | * This software is licensed under the terms of the GNU General Public | ||
| 5 | * License version 2, as published by the Free Software Foundation, and | ||
| 6 | * may be copied, distributed, and modified under those terms. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef _DT_BINDINGS_CLK_MSM_GCC_COBALT_H | ||
| 15 | #define _DT_BINDINGS_CLK_MSM_GCC_COBALT_H | ||
| 16 | |||
| 17 | #define BLSP1_QUP1_I2C_APPS_CLK_SRC 0 | ||
| 18 | #define BLSP1_QUP1_SPI_APPS_CLK_SRC 1 | ||
| 19 | #define BLSP1_QUP2_I2C_APPS_CLK_SRC 2 | ||
| 20 | #define BLSP1_QUP2_SPI_APPS_CLK_SRC 3 | ||
| 21 | #define BLSP1_QUP3_I2C_APPS_CLK_SRC 4 | ||
| 22 | #define BLSP1_QUP3_SPI_APPS_CLK_SRC 5 | ||
| 23 | #define BLSP1_QUP4_I2C_APPS_CLK_SRC 6 | ||
| 24 | #define BLSP1_QUP4_SPI_APPS_CLK_SRC 7 | ||
| 25 | #define BLSP1_QUP5_I2C_APPS_CLK_SRC 8 | ||
| 26 | #define BLSP1_QUP5_SPI_APPS_CLK_SRC 9 | ||
| 27 | #define BLSP1_QUP6_I2C_APPS_CLK_SRC 10 | ||
| 28 | #define BLSP1_QUP6_SPI_APPS_CLK_SRC 11 | ||
| 29 | #define BLSP1_UART1_APPS_CLK_SRC 12 | ||
| 30 | #define BLSP1_UART2_APPS_CLK_SRC 13 | ||
| 31 | #define BLSP1_UART3_APPS_CLK_SRC 14 | ||
| 32 | #define BLSP2_QUP1_I2C_APPS_CLK_SRC 15 | ||
| 33 | #define BLSP2_QUP1_SPI_APPS_CLK_SRC 16 | ||
| 34 | #define BLSP2_QUP2_I2C_APPS_CLK_SRC 17 | ||
| 35 | #define BLSP2_QUP2_SPI_APPS_CLK_SRC 18 | ||
| 36 | #define BLSP2_QUP3_I2C_APPS_CLK_SRC 19 | ||
| 37 | #define BLSP2_QUP3_SPI_APPS_CLK_SRC 20 | ||
| 38 | #define BLSP2_QUP4_I2C_APPS_CLK_SRC 21 | ||
| 39 | #define BLSP2_QUP4_SPI_APPS_CLK_SRC 22 | ||
| 40 | #define BLSP2_QUP5_I2C_APPS_CLK_SRC 23 | ||
| 41 | #define BLSP2_QUP5_SPI_APPS_CLK_SRC 24 | ||
| 42 | #define BLSP2_QUP6_I2C_APPS_CLK_SRC 25 | ||
| 43 | #define BLSP2_QUP6_SPI_APPS_CLK_SRC 26 | ||
| 44 | #define BLSP2_UART1_APPS_CLK_SRC 27 | ||
| 45 | #define BLSP2_UART2_APPS_CLK_SRC 28 | ||
| 46 | #define BLSP2_UART3_APPS_CLK_SRC 29 | ||
| 47 | #define GCC_AGGRE1_NOC_XO_CLK 30 | ||
| 48 | #define GCC_AGGRE1_UFS_AXI_CLK 31 | ||
| 49 | #define GCC_AGGRE1_USB3_AXI_CLK 32 | ||
| 50 | #define GCC_APSS_QDSS_TSCTR_DIV2_CLK 33 | ||
| 51 | #define GCC_APSS_QDSS_TSCTR_DIV8_CLK 34 | ||
| 52 | #define GCC_BIMC_HMSS_AXI_CLK 35 | ||
| 53 | #define GCC_BIMC_MSS_Q6_AXI_CLK 36 | ||
| 54 | #define GCC_BLSP1_AHB_CLK 37 | ||
| 55 | #define GCC_BLSP1_QUP1_I2C_APPS_CLK 38 | ||
| 56 | #define GCC_BLSP1_QUP1_SPI_APPS_CLK 39 | ||
| 57 | #define GCC_BLSP1_QUP2_I2C_APPS_CLK 40 | ||
| 58 | #define GCC_BLSP1_QUP2_SPI_APPS_CLK 41 | ||
| 59 | #define GCC_BLSP1_QUP3_I2C_APPS_CLK 42 | ||
| 60 | #define GCC_BLSP1_QUP3_SPI_APPS_CLK 43 | ||
| 61 | #define GCC_BLSP1_QUP4_I2C_APPS_CLK 44 | ||
| 62 | #define GCC_BLSP1_QUP4_SPI_APPS_CLK 45 | ||
| 63 | #define GCC_BLSP1_QUP5_I2C_APPS_CLK 46 | ||
| 64 | #define GCC_BLSP1_QUP5_SPI_APPS_CLK 47 | ||
| 65 | #define GCC_BLSP1_QUP6_I2C_APPS_CLK 48 | ||
| 66 | #define GCC_BLSP1_QUP6_SPI_APPS_CLK 49 | ||
| 67 | #define GCC_BLSP1_SLEEP_CLK 50 | ||
| 68 | #define GCC_BLSP1_UART1_APPS_CLK 51 | ||
| 69 | #define GCC_BLSP1_UART2_APPS_CLK 52 | ||
| 70 | #define GCC_BLSP1_UART3_APPS_CLK 53 | ||
| 71 | #define GCC_BLSP2_AHB_CLK 54 | ||
| 72 | #define GCC_BLSP2_QUP1_I2C_APPS_CLK 55 | ||
| 73 | #define GCC_BLSP2_QUP1_SPI_APPS_CLK 56 | ||
| 74 | #define GCC_BLSP2_QUP2_I2C_APPS_CLK 57 | ||
| 75 | #define GCC_BLSP2_QUP2_SPI_APPS_CLK 58 | ||
| 76 | #define GCC_BLSP2_QUP3_I2C_APPS_CLK 59 | ||
| 77 | #define GCC_BLSP2_QUP3_SPI_APPS_CLK 60 | ||
| 78 | #define GCC_BLSP2_QUP4_I2C_APPS_CLK 61 | ||
| 79 | #define GCC_BLSP2_QUP4_SPI_APPS_CLK 62 | ||
| 80 | #define GCC_BLSP2_QUP5_I2C_APPS_CLK 63 | ||
| 81 | #define GCC_BLSP2_QUP5_SPI_APPS_CLK 64 | ||
| 82 | #define GCC_BLSP2_QUP6_I2C_APPS_CLK 65 | ||
| 83 | #define GCC_BLSP2_QUP6_SPI_APPS_CLK 66 | ||
| 84 | #define GCC_BLSP2_SLEEP_CLK 67 | ||
| 85 | #define GCC_BLSP2_UART1_APPS_CLK 68 | ||
| 86 | #define GCC_BLSP2_UART2_APPS_CLK 69 | ||
| 87 | #define GCC_BLSP2_UART3_APPS_CLK 70 | ||
| 88 | #define GCC_CFG_NOC_USB3_AXI_CLK 71 | ||
| 89 | #define GCC_GP1_CLK 72 | ||
| 90 | #define GCC_GP2_CLK 73 | ||
| 91 | #define GCC_GP3_CLK 74 | ||
| 92 | #define GCC_GPU_BIMC_GFX_CLK 75 | ||
| 93 | #define GCC_GPU_BIMC_GFX_SRC_CLK 76 | ||
| 94 | #define GCC_GPU_CFG_AHB_CLK 77 | ||
| 95 | #define GCC_GPU_SNOC_DVM_GFX_CLK 78 | ||
| 96 | #define GCC_HMSS_AHB_CLK 79 | ||
| 97 | #define GCC_HMSS_AT_CLK 80 | ||
| 98 | #define GCC_HMSS_DVM_BUS_CLK 81 | ||
| 99 | #define GCC_HMSS_RBCPR_CLK 82 | ||
| 100 | #define GCC_HMSS_TRIG_CLK 83 | ||
| 101 | #define GCC_LPASS_AT_CLK 84 | ||
| 102 | #define GCC_LPASS_TRIG_CLK 85 | ||
| 103 | #define GCC_MMSS_NOC_CFG_AHB_CLK 86 | ||
| 104 | #define GCC_MMSS_QM_AHB_CLK 87 | ||
| 105 | #define GCC_MMSS_QM_CORE_CLK 88 | ||
| 106 | #define GCC_MMSS_SYS_NOC_AXI_CLK 89 | ||
| 107 | #define GCC_MSS_AT_CLK 90 | ||
| 108 | #define GCC_PCIE_0_AUX_CLK 91 | ||
| 109 | #define GCC_PCIE_0_CFG_AHB_CLK 92 | ||
| 110 | #define GCC_PCIE_0_MSTR_AXI_CLK 93 | ||
| 111 | #define GCC_PCIE_0_PIPE_CLK 94 | ||
| 112 | #define GCC_PCIE_0_SLV_AXI_CLK 95 | ||
| 113 | #define GCC_PCIE_PHY_AUX_CLK 96 | ||
| 114 | #define GCC_PDM2_CLK 97 | ||
| 115 | #define GCC_PDM_AHB_CLK 98 | ||
| 116 | #define GCC_PDM_XO4_CLK 99 | ||
| 117 | #define GCC_PRNG_AHB_CLK 100 | ||
| 118 | #define GCC_SDCC2_AHB_CLK 101 | ||
| 119 | #define GCC_SDCC2_APPS_CLK 102 | ||
| 120 | #define GCC_SDCC4_AHB_CLK 103 | ||
| 121 | #define GCC_SDCC4_APPS_CLK 104 | ||
| 122 | #define GCC_TSIF_AHB_CLK 105 | ||
| 123 | #define GCC_TSIF_INACTIVITY_TIMERS_CLK 106 | ||
| 124 | #define GCC_TSIF_REF_CLK 107 | ||
| 125 | #define GCC_UFS_AHB_CLK 108 | ||
| 126 | #define GCC_UFS_AXI_CLK 109 | ||
| 127 | #define GCC_UFS_ICE_CORE_CLK 110 | ||
| 128 | #define GCC_UFS_PHY_AUX_CLK 111 | ||
| 129 | #define GCC_UFS_RX_SYMBOL_0_CLK 112 | ||
| 130 | #define GCC_UFS_RX_SYMBOL_1_CLK 113 | ||
| 131 | #define GCC_UFS_TX_SYMBOL_0_CLK 114 | ||
| 132 | #define GCC_UFS_UNIPRO_CORE_CLK 115 | ||
| 133 | #define GCC_USB30_MASTER_CLK 116 | ||
| 134 | #define GCC_USB30_MOCK_UTMI_CLK 117 | ||
| 135 | #define GCC_USB30_SLEEP_CLK 118 | ||
| 136 | #define GCC_USB3_PHY_AUX_CLK 119 | ||
| 137 | #define GCC_USB3_PHY_PIPE_CLK 120 | ||
| 138 | #define GCC_USB_PHY_CFG_AHB2PHY_CLK 121 | ||
| 139 | #define GP1_CLK_SRC 122 | ||
| 140 | #define GP2_CLK_SRC 123 | ||
| 141 | #define GP3_CLK_SRC 124 | ||
| 142 | #define GPLL0 125 | ||
| 143 | #define GPLL0_OUT_EVEN 126 | ||
| 144 | #define GPLL0_OUT_MAIN 127 | ||
| 145 | #define GPLL0_OUT_ODD 128 | ||
| 146 | #define GPLL0_OUT_TEST 129 | ||
| 147 | #define GPLL1 130 | ||
| 148 | #define GPLL1_OUT_EVEN 131 | ||
| 149 | #define GPLL1_OUT_MAIN 132 | ||
| 150 | #define GPLL1_OUT_ODD 133 | ||
| 151 | #define GPLL1_OUT_TEST 134 | ||
| 152 | #define GPLL2 135 | ||
| 153 | #define GPLL2_OUT_EVEN 136 | ||
| 154 | #define GPLL2_OUT_MAIN 137 | ||
| 155 | #define GPLL2_OUT_ODD 138 | ||
| 156 | #define GPLL2_OUT_TEST 139 | ||
| 157 | #define GPLL3 140 | ||
| 158 | #define GPLL3_OUT_EVEN 141 | ||
| 159 | #define GPLL3_OUT_MAIN 142 | ||
| 160 | #define GPLL3_OUT_ODD 143 | ||
| 161 | #define GPLL3_OUT_TEST 144 | ||
| 162 | #define GPLL4 145 | ||
| 163 | #define GPLL4_OUT_EVEN 146 | ||
| 164 | #define GPLL4_OUT_MAIN 147 | ||
| 165 | #define GPLL4_OUT_ODD 148 | ||
| 166 | #define GPLL4_OUT_TEST 149 | ||
| 167 | #define GPLL6 150 | ||
| 168 | #define GPLL6_OUT_EVEN 151 | ||
| 169 | #define GPLL6_OUT_MAIN 152 | ||
| 170 | #define GPLL6_OUT_ODD 153 | ||
| 171 | #define GPLL6_OUT_TEST 154 | ||
| 172 | #define HMSS_AHB_CLK_SRC 155 | ||
| 173 | #define HMSS_RBCPR_CLK_SRC 156 | ||
| 174 | #define PCIE_AUX_CLK_SRC 157 | ||
| 175 | #define PDM2_CLK_SRC 158 | ||
| 176 | #define SDCC2_APPS_CLK_SRC 159 | ||
| 177 | #define SDCC4_APPS_CLK_SRC 160 | ||
| 178 | #define TSIF_REF_CLK_SRC 161 | ||
| 179 | #define UFS_AXI_CLK_SRC 162 | ||
| 180 | #define USB30_MASTER_CLK_SRC 163 | ||
| 181 | #define USB30_MOCK_UTMI_CLK_SRC 164 | ||
| 182 | #define USB3_PHY_AUX_CLK_SRC 165 | ||
| 183 | |||
| 184 | #define PCIE_0_GDSC 0 | ||
| 185 | #define UFS_GDSC 1 | ||
| 186 | #define USB_30_GDSC 2 | ||
| 187 | |||
| 188 | #define GCC_BLSP1_QUP1_BCR 0 | ||
| 189 | #define GCC_BLSP1_QUP2_BCR 1 | ||
| 190 | #define GCC_BLSP1_QUP3_BCR 2 | ||
| 191 | #define GCC_BLSP1_QUP4_BCR 3 | ||
| 192 | #define GCC_BLSP1_QUP5_BCR 4 | ||
| 193 | #define GCC_BLSP1_QUP6_BCR 5 | ||
| 194 | #define GCC_BLSP2_QUP1_BCR 6 | ||
| 195 | #define GCC_BLSP2_QUP2_BCR 7 | ||
| 196 | #define GCC_BLSP2_QUP3_BCR 8 | ||
| 197 | #define GCC_BLSP2_QUP4_BCR 9 | ||
| 198 | #define GCC_BLSP2_QUP5_BCR 10 | ||
| 199 | #define GCC_BLSP2_QUP6_BCR 11 | ||
| 200 | #define GCC_PCIE_0_BCR 12 | ||
| 201 | #define GCC_PDM_BCR 13 | ||
| 202 | #define GCC_SDCC2_BCR 14 | ||
| 203 | #define GCC_SDCC4_BCR 15 | ||
| 204 | #define GCC_TSIF_BCR 16 | ||
| 205 | #define GCC_UFS_BCR 17 | ||
| 206 | #define GCC_USB_30_BCR 18 | ||
| 207 | |||
| 208 | #endif | ||
diff --git a/include/dt-bindings/clock/qcom,gcc-sdm845.h b/include/dt-bindings/clock/qcom,gcc-sdm845.h new file mode 100644 index 000000000000..aca61264f12c --- /dev/null +++ b/include/dt-bindings/clock/qcom,gcc-sdm845.h | |||
| @@ -0,0 +1,239 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2018, The Linux Foundation. All rights reserved. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _DT_BINDINGS_CLK_SDM_GCC_SDM845_H | ||
| 7 | #define _DT_BINDINGS_CLK_SDM_GCC_SDM845_H | ||
| 8 | |||
| 9 | /* GCC clock registers */ | ||
| 10 | #define GCC_AGGRE_NOC_PCIE_TBU_CLK 0 | ||
| 11 | #define GCC_AGGRE_UFS_CARD_AXI_CLK 1 | ||
| 12 | #define GCC_AGGRE_UFS_PHY_AXI_CLK 2 | ||
| 13 | #define GCC_AGGRE_USB3_PRIM_AXI_CLK 3 | ||
| 14 | #define GCC_AGGRE_USB3_SEC_AXI_CLK 4 | ||
| 15 | #define GCC_BOOT_ROM_AHB_CLK 5 | ||
| 16 | #define GCC_CAMERA_AHB_CLK 6 | ||
| 17 | #define GCC_CAMERA_AXI_CLK 7 | ||
| 18 | #define GCC_CAMERA_XO_CLK 8 | ||
| 19 | #define GCC_CE1_AHB_CLK 9 | ||
| 20 | #define GCC_CE1_AXI_CLK 10 | ||
| 21 | #define GCC_CE1_CLK 11 | ||
| 22 | #define GCC_CFG_NOC_USB3_PRIM_AXI_CLK 12 | ||
| 23 | #define GCC_CFG_NOC_USB3_SEC_AXI_CLK 13 | ||
| 24 | #define GCC_CPUSS_AHB_CLK 14 | ||
| 25 | #define GCC_CPUSS_AHB_CLK_SRC 15 | ||
| 26 | #define GCC_CPUSS_RBCPR_CLK 16 | ||
| 27 | #define GCC_CPUSS_RBCPR_CLK_SRC 17 | ||
| 28 | #define GCC_DDRSS_GPU_AXI_CLK 18 | ||
| 29 | #define GCC_DISP_AHB_CLK 19 | ||
| 30 | #define GCC_DISP_AXI_CLK 20 | ||
| 31 | #define GCC_DISP_GPLL0_CLK_SRC 21 | ||
| 32 | #define GCC_DISP_GPLL0_DIV_CLK_SRC 22 | ||
| 33 | #define GCC_DISP_XO_CLK 23 | ||
| 34 | #define GCC_GP1_CLK 24 | ||
| 35 | #define GCC_GP1_CLK_SRC 25 | ||
| 36 | #define GCC_GP2_CLK 26 | ||
| 37 | #define GCC_GP2_CLK_SRC 27 | ||
| 38 | #define GCC_GP3_CLK 28 | ||
| 39 | #define GCC_GP3_CLK_SRC 29 | ||
| 40 | #define GCC_GPU_CFG_AHB_CLK 30 | ||
| 41 | #define GCC_GPU_GPLL0_CLK_SRC 31 | ||
| 42 | #define GCC_GPU_GPLL0_DIV_CLK_SRC 32 | ||
| 43 | #define GCC_GPU_MEMNOC_GFX_CLK 33 | ||
| 44 | #define GCC_GPU_SNOC_DVM_GFX_CLK 34 | ||
| 45 | #define GCC_MSS_AXIS2_CLK 35 | ||
| 46 | #define GCC_MSS_CFG_AHB_CLK 36 | ||
| 47 | #define GCC_MSS_GPLL0_DIV_CLK_SRC 37 | ||
| 48 | #define GCC_MSS_MFAB_AXIS_CLK 38 | ||
| 49 | #define GCC_MSS_Q6_MEMNOC_AXI_CLK 39 | ||
| 50 | #define GCC_MSS_SNOC_AXI_CLK 40 | ||
| 51 | #define GCC_PCIE_0_AUX_CLK 41 | ||
| 52 | #define GCC_PCIE_0_AUX_CLK_SRC 42 | ||
| 53 | #define GCC_PCIE_0_CFG_AHB_CLK 43 | ||
| 54 | #define GCC_PCIE_0_CLKREF_CLK 44 | ||
| 55 | #define GCC_PCIE_0_MSTR_AXI_CLK 45 | ||
| 56 | #define GCC_PCIE_0_PIPE_CLK 46 | ||
| 57 | #define GCC_PCIE_0_SLV_AXI_CLK 47 | ||
| 58 | #define GCC_PCIE_0_SLV_Q2A_AXI_CLK 48 | ||
| 59 | #define GCC_PCIE_1_AUX_CLK 49 | ||
| 60 | #define GCC_PCIE_1_AUX_CLK_SRC 50 | ||
| 61 | #define GCC_PCIE_1_CFG_AHB_CLK 51 | ||
| 62 | #define GCC_PCIE_1_CLKREF_CLK 52 | ||
| 63 | #define GCC_PCIE_1_MSTR_AXI_CLK 53 | ||
| 64 | #define GCC_PCIE_1_PIPE_CLK 54 | ||
| 65 | #define GCC_PCIE_1_SLV_AXI_CLK 55 | ||
| 66 | #define GCC_PCIE_1_SLV_Q2A_AXI_CLK 56 | ||
| 67 | #define GCC_PCIE_PHY_AUX_CLK 57 | ||
| 68 | #define GCC_PCIE_PHY_REFGEN_CLK 58 | ||
| 69 | #define GCC_PCIE_PHY_REFGEN_CLK_SRC 59 | ||
| 70 | #define GCC_PDM2_CLK 60 | ||
| 71 | #define GCC_PDM2_CLK_SRC 61 | ||
| 72 | #define GCC_PDM_AHB_CLK 62 | ||
| 73 | #define GCC_PDM_XO4_CLK 63 | ||
| 74 | #define GCC_PRNG_AHB_CLK 64 | ||
| 75 | #define GCC_QMIP_CAMERA_AHB_CLK 65 | ||
| 76 | #define GCC_QMIP_DISP_AHB_CLK 66 | ||
| 77 | #define GCC_QMIP_VIDEO_AHB_CLK 67 | ||
| 78 | #define GCC_QUPV3_WRAP0_S0_CLK 68 | ||
| 79 | #define GCC_QUPV3_WRAP0_S0_CLK_SRC 69 | ||
| 80 | #define GCC_QUPV3_WRAP0_S1_CLK 70 | ||
| 81 | #define GCC_QUPV3_WRAP0_S1_CLK_SRC 71 | ||
| 82 | #define GCC_QUPV3_WRAP0_S2_CLK 72 | ||
| 83 | #define GCC_QUPV3_WRAP0_S2_CLK_SRC 73 | ||
| 84 | #define GCC_QUPV3_WRAP0_S3_CLK 74 | ||
| 85 | #define GCC_QUPV3_WRAP0_S3_CLK_SRC 75 | ||
| 86 | #define GCC_QUPV3_WRAP0_S4_CLK 76 | ||
| 87 | #define GCC_QUPV3_WRAP0_S4_CLK_SRC 77 | ||
| 88 | #define GCC_QUPV3_WRAP0_S5_CLK 78 | ||
| 89 | #define GCC_QUPV3_WRAP0_S5_CLK_SRC 79 | ||
| 90 | #define GCC_QUPV3_WRAP0_S6_CLK 80 | ||
| 91 | #define GCC_QUPV3_WRAP0_S6_CLK_SRC 81 | ||
| 92 | #define GCC_QUPV3_WRAP0_S7_CLK 82 | ||
| 93 | #define GCC_QUPV3_WRAP0_S7_CLK_SRC 83 | ||
| 94 | #define GCC_QUPV3_WRAP1_S0_CLK 84 | ||
| 95 | #define GCC_QUPV3_WRAP1_S0_CLK_SRC 85 | ||
| 96 | #define GCC_QUPV3_WRAP1_S1_CLK 86 | ||
| 97 | #define GCC_QUPV3_WRAP1_S1_CLK_SRC 87 | ||
| 98 | #define GCC_QUPV3_WRAP1_S2_CLK 88 | ||
| 99 | #define GCC_QUPV3_WRAP1_S2_CLK_SRC 89 | ||
| 100 | #define GCC_QUPV3_WRAP1_S3_CLK 90 | ||
| 101 | #define GCC_QUPV3_WRAP1_S3_CLK_SRC 91 | ||
| 102 | #define GCC_QUPV3_WRAP1_S4_CLK 92 | ||
| 103 | #define GCC_QUPV3_WRAP1_S4_CLK_SRC 93 | ||
| 104 | #define GCC_QUPV3_WRAP1_S5_CLK 94 | ||
| 105 | #define GCC_QUPV3_WRAP1_S5_CLK_SRC 95 | ||
| 106 | #define GCC_QUPV3_WRAP1_S6_CLK 96 | ||
| 107 | #define GCC_QUPV3_WRAP1_S6_CLK_SRC 97 | ||
| 108 | #define GCC_QUPV3_WRAP1_S7_CLK 98 | ||
| 109 | #define GCC_QUPV3_WRAP1_S7_CLK_SRC 99 | ||
| 110 | #define GCC_QUPV3_WRAP_0_M_AHB_CLK 100 | ||
| 111 | #define GCC_QUPV3_WRAP_0_S_AHB_CLK 101 | ||
| 112 | #define GCC_QUPV3_WRAP_1_M_AHB_CLK 102 | ||
| 113 | #define GCC_QUPV3_WRAP_1_S_AHB_CLK 103 | ||
| 114 | #define GCC_SDCC2_AHB_CLK 104 | ||
| 115 | #define GCC_SDCC2_APPS_CLK 105 | ||
| 116 | #define GCC_SDCC2_APPS_CLK_SRC 106 | ||
| 117 | #define GCC_SDCC4_AHB_CLK 107 | ||
| 118 | #define GCC_SDCC4_APPS_CLK 108 | ||
| 119 | #define GCC_SDCC4_APPS_CLK_SRC 109 | ||
| 120 | #define GCC_SYS_NOC_CPUSS_AHB_CLK 110 | ||
| 121 | #define GCC_TSIF_AHB_CLK 111 | ||
| 122 | #define GCC_TSIF_INACTIVITY_TIMERS_CLK 112 | ||
| 123 | #define GCC_TSIF_REF_CLK 113 | ||
| 124 | #define GCC_TSIF_REF_CLK_SRC 114 | ||
| 125 | #define GCC_UFS_CARD_AHB_CLK 115 | ||
| 126 | #define GCC_UFS_CARD_AXI_CLK 116 | ||
| 127 | #define GCC_UFS_CARD_AXI_CLK_SRC 117 | ||
| 128 | #define GCC_UFS_CARD_CLKREF_CLK 118 | ||
| 129 | #define GCC_UFS_CARD_ICE_CORE_CLK 119 | ||
| 130 | #define GCC_UFS_CARD_ICE_CORE_CLK_SRC 120 | ||
| 131 | #define GCC_UFS_CARD_PHY_AUX_CLK 121 | ||
| 132 | #define GCC_UFS_CARD_PHY_AUX_CLK_SRC 122 | ||
| 133 | #define GCC_UFS_CARD_RX_SYMBOL_0_CLK 123 | ||
| 134 | #define GCC_UFS_CARD_RX_SYMBOL_1_CLK 124 | ||
| 135 | #define GCC_UFS_CARD_TX_SYMBOL_0_CLK 125 | ||
| 136 | #define GCC_UFS_CARD_UNIPRO_CORE_CLK 126 | ||
| 137 | #define GCC_UFS_CARD_UNIPRO_CORE_CLK_SRC 127 | ||
| 138 | #define GCC_UFS_MEM_CLKREF_CLK 128 | ||
| 139 | #define GCC_UFS_PHY_AHB_CLK 129 | ||
| 140 | #define GCC_UFS_PHY_AXI_CLK 130 | ||
| 141 | #define GCC_UFS_PHY_AXI_CLK_SRC 131 | ||
| 142 | #define GCC_UFS_PHY_ICE_CORE_CLK 132 | ||
| 143 | #define GCC_UFS_PHY_ICE_CORE_CLK_SRC 133 | ||
| 144 | #define GCC_UFS_PHY_PHY_AUX_CLK 134 | ||
| 145 | #define GCC_UFS_PHY_PHY_AUX_CLK_SRC 135 | ||
| 146 | #define GCC_UFS_PHY_RX_SYMBOL_0_CLK 136 | ||
| 147 | #define GCC_UFS_PHY_RX_SYMBOL_1_CLK 137 | ||
| 148 | #define GCC_UFS_PHY_TX_SYMBOL_0_CLK 138 | ||
| 149 | #define GCC_UFS_PHY_UNIPRO_CORE_CLK 139 | ||
| 150 | #define GCC_UFS_PHY_UNIPRO_CORE_CLK_SRC 140 | ||
| 151 | #define GCC_USB30_PRIM_MASTER_CLK 141 | ||
| 152 | #define GCC_USB30_PRIM_MASTER_CLK_SRC 142 | ||
| 153 | #define GCC_USB30_PRIM_MOCK_UTMI_CLK 143 | ||
| 154 | #define GCC_USB30_PRIM_MOCK_UTMI_CLK_SRC 144 | ||
| 155 | #define GCC_USB30_PRIM_SLEEP_CLK 145 | ||
| 156 | #define GCC_USB30_SEC_MASTER_CLK 146 | ||
| 157 | #define GCC_USB30_SEC_MASTER_CLK_SRC 147 | ||
| 158 | #define GCC_USB30_SEC_MOCK_UTMI_CLK 148 | ||
| 159 | #define GCC_USB30_SEC_MOCK_UTMI_CLK_SRC 149 | ||
| 160 | #define GCC_USB30_SEC_SLEEP_CLK 150 | ||
| 161 | #define GCC_USB3_PRIM_CLKREF_CLK 151 | ||
| 162 | #define GCC_USB3_PRIM_PHY_AUX_CLK 152 | ||
| 163 | #define GCC_USB3_PRIM_PHY_AUX_CLK_SRC 153 | ||
| 164 | #define GCC_USB3_PRIM_PHY_COM_AUX_CLK 154 | ||
| 165 | #define GCC_USB3_PRIM_PHY_PIPE_CLK 155 | ||
| 166 | #define GCC_USB3_SEC_CLKREF_CLK 156 | ||
| 167 | #define GCC_USB3_SEC_PHY_AUX_CLK 157 | ||
| 168 | #define GCC_USB3_SEC_PHY_AUX_CLK_SRC 158 | ||
| 169 | #define GCC_USB3_SEC_PHY_PIPE_CLK 159 | ||
| 170 | #define GCC_USB3_SEC_PHY_COM_AUX_CLK 160 | ||
| 171 | #define GCC_USB_PHY_CFG_AHB2PHY_CLK 161 | ||
| 172 | #define GCC_VIDEO_AHB_CLK 162 | ||
| 173 | #define GCC_VIDEO_AXI_CLK 163 | ||
| 174 | #define GCC_VIDEO_XO_CLK 164 | ||
| 175 | #define GPLL0 165 | ||
| 176 | #define GPLL0_OUT_EVEN 166 | ||
| 177 | #define GPLL0_OUT_MAIN 167 | ||
| 178 | #define GCC_GPU_IREF_CLK 168 | ||
| 179 | #define GCC_SDCC1_AHB_CLK 169 | ||
| 180 | #define GCC_SDCC1_APPS_CLK 170 | ||
| 181 | #define GCC_SDCC1_ICE_CORE_CLK 171 | ||
| 182 | #define GCC_SDCC1_APPS_CLK_SRC 172 | ||
| 183 | #define GCC_SDCC1_ICE_CORE_CLK_SRC 173 | ||
| 184 | #define GCC_APC_VS_CLK 174 | ||
| 185 | #define GCC_GPU_VS_CLK 175 | ||
| 186 | #define GCC_MSS_VS_CLK 176 | ||
| 187 | #define GCC_VDDA_VS_CLK 177 | ||
| 188 | #define GCC_VDDCX_VS_CLK 178 | ||
| 189 | #define GCC_VDDMX_VS_CLK 179 | ||
| 190 | #define GCC_VS_CTRL_AHB_CLK 180 | ||
| 191 | #define GCC_VS_CTRL_CLK 181 | ||
| 192 | #define GCC_VS_CTRL_CLK_SRC 182 | ||
| 193 | #define GCC_VSENSOR_CLK_SRC 183 | ||
| 194 | #define GPLL4 184 | ||
| 195 | |||
| 196 | /* GCC Resets */ | ||
| 197 | #define GCC_MMSS_BCR 0 | ||
| 198 | #define GCC_PCIE_0_BCR 1 | ||
| 199 | #define GCC_PCIE_1_BCR 2 | ||
| 200 | #define GCC_PCIE_PHY_BCR 3 | ||
| 201 | #define GCC_PDM_BCR 4 | ||
| 202 | #define GCC_PRNG_BCR 5 | ||
| 203 | #define GCC_QUPV3_WRAPPER_0_BCR 6 | ||
| 204 | #define GCC_QUPV3_WRAPPER_1_BCR 7 | ||
| 205 | #define GCC_QUSB2PHY_PRIM_BCR 8 | ||
| 206 | #define GCC_QUSB2PHY_SEC_BCR 9 | ||
| 207 | #define GCC_SDCC2_BCR 10 | ||
| 208 | #define GCC_SDCC4_BCR 11 | ||
| 209 | #define GCC_TSIF_BCR 12 | ||
| 210 | #define GCC_UFS_CARD_BCR 13 | ||
| 211 | #define GCC_UFS_PHY_BCR 14 | ||
| 212 | #define GCC_USB30_PRIM_BCR 15 | ||
| 213 | #define GCC_USB30_SEC_BCR 16 | ||
| 214 | #define GCC_USB3_PHY_PRIM_BCR 17 | ||
| 215 | #define GCC_USB3PHY_PHY_PRIM_BCR 18 | ||
| 216 | #define GCC_USB3_DP_PHY_PRIM_BCR 19 | ||
| 217 | #define GCC_USB3_PHY_SEC_BCR 20 | ||
| 218 | #define GCC_USB3PHY_PHY_SEC_BCR 21 | ||
| 219 | #define GCC_USB3_DP_PHY_SEC_BCR 22 | ||
| 220 | #define GCC_USB_PHY_CFG_AHB2PHY_BCR 23 | ||
| 221 | #define GCC_PCIE_0_PHY_BCR 24 | ||
| 222 | #define GCC_PCIE_1_PHY_BCR 25 | ||
| 223 | |||
| 224 | /* GCC GDSCRs */ | ||
| 225 | #define PCIE_0_GDSC 0 | ||
| 226 | #define PCIE_1_GDSC 1 | ||
| 227 | #define UFS_CARD_GDSC 2 | ||
| 228 | #define UFS_PHY_GDSC 3 | ||
| 229 | #define USB30_PRIM_GDSC 4 | ||
| 230 | #define USB30_SEC_GDSC 5 | ||
| 231 | #define HLOS1_VOTE_AGGRE_NOC_MMU_AUDIO_TBU_GDSC 6 | ||
| 232 | #define HLOS1_VOTE_AGGRE_NOC_MMU_PCIE_TBU_GDSC 7 | ||
| 233 | #define HLOS1_VOTE_AGGRE_NOC_MMU_TBU1_GDSC 8 | ||
| 234 | #define HLOS1_VOTE_AGGRE_NOC_MMU_TBU2_GDSC 9 | ||
| 235 | #define HLOS1_VOTE_MMNOC_MMU_TBU_HF0_GDSC 10 | ||
| 236 | #define HLOS1_VOTE_MMNOC_MMU_TBU_HF1_GDSC 11 | ||
| 237 | #define HLOS1_VOTE_MMNOC_MMU_TBU_SF_GDSC 12 | ||
| 238 | |||
| 239 | #endif | ||
diff --git a/include/dt-bindings/clock/qcom,rpmh.h b/include/dt-bindings/clock/qcom,rpmh.h new file mode 100644 index 000000000000..f48fbd6f2095 --- /dev/null +++ b/include/dt-bindings/clock/qcom,rpmh.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* Copyright (c) 2018, The Linux Foundation. All rights reserved. */ | ||
| 3 | |||
| 4 | |||
| 5 | #ifndef _DT_BINDINGS_CLK_MSM_RPMH_H | ||
| 6 | #define _DT_BINDINGS_CLK_MSM_RPMH_H | ||
| 7 | |||
| 8 | /* RPMh controlled clocks */ | ||
| 9 | #define RPMH_CXO_CLK 0 | ||
| 10 | #define RPMH_CXO_CLK_A 1 | ||
| 11 | #define RPMH_LN_BB_CLK2 2 | ||
| 12 | #define RPMH_LN_BB_CLK2_A 3 | ||
| 13 | #define RPMH_LN_BB_CLK3 4 | ||
| 14 | #define RPMH_LN_BB_CLK3_A 5 | ||
| 15 | #define RPMH_RF_CLK1 6 | ||
| 16 | #define RPMH_RF_CLK1_A 7 | ||
| 17 | #define RPMH_RF_CLK2 8 | ||
| 18 | #define RPMH_RF_CLK2_A 9 | ||
| 19 | #define RPMH_RF_CLK3 10 | ||
| 20 | #define RPMH_RF_CLK3_A 11 | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/dt-bindings/clock/qcom,videocc-sdm845.h b/include/dt-bindings/clock/qcom,videocc-sdm845.h new file mode 100644 index 000000000000..1b868165e8ce --- /dev/null +++ b/include/dt-bindings/clock/qcom,videocc-sdm845.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2018, The Linux Foundation. All rights reserved. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _DT_BINDINGS_CLK_SDM_VIDEO_CC_SDM845_H | ||
| 7 | #define _DT_BINDINGS_CLK_SDM_VIDEO_CC_SDM845_H | ||
| 8 | |||
| 9 | /* VIDEO_CC clock registers */ | ||
| 10 | #define VIDEO_CC_APB_CLK 0 | ||
| 11 | #define VIDEO_CC_AT_CLK 1 | ||
| 12 | #define VIDEO_CC_QDSS_TRIG_CLK 2 | ||
| 13 | #define VIDEO_CC_QDSS_TSCTR_DIV8_CLK 3 | ||
| 14 | #define VIDEO_CC_VCODEC0_AXI_CLK 4 | ||
| 15 | #define VIDEO_CC_VCODEC0_CORE_CLK 5 | ||
| 16 | #define VIDEO_CC_VCODEC1_AXI_CLK 6 | ||
| 17 | #define VIDEO_CC_VCODEC1_CORE_CLK 7 | ||
| 18 | #define VIDEO_CC_VENUS_AHB_CLK 8 | ||
| 19 | #define VIDEO_CC_VENUS_CLK_SRC 9 | ||
| 20 | #define VIDEO_CC_VENUS_CTL_AXI_CLK 10 | ||
| 21 | #define VIDEO_CC_VENUS_CTL_CORE_CLK 11 | ||
| 22 | #define VIDEO_PLL0 12 | ||
| 23 | |||
| 24 | /* VIDEO_CC Resets */ | ||
| 25 | #define VIDEO_CC_VENUS_BCR 0 | ||
| 26 | #define VIDEO_CC_VCODEC0_BCR 1 | ||
| 27 | #define VIDEO_CC_VCODEC1_BCR 2 | ||
| 28 | #define VIDEO_CC_INTERFACE_BCR 3 | ||
| 29 | |||
| 30 | /* VIDEO_CC GDSCRs */ | ||
| 31 | #define VENUS_GDSC 0 | ||
| 32 | #define VCODEC0_GDSC 1 | ||
| 33 | #define VCODEC1_GDSC 2 | ||
| 34 | |||
| 35 | #endif | ||
diff --git a/include/dt-bindings/clock/r8a77470-cpg-mssr.h b/include/dt-bindings/clock/r8a77470-cpg-mssr.h new file mode 100644 index 000000000000..34cba49d0f84 --- /dev/null +++ b/include/dt-bindings/clock/r8a77470-cpg-mssr.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 | ||
| 2 | * | ||
| 3 | * Copyright (C) 2018 Renesas Electronics Corp. | ||
| 4 | */ | ||
| 5 | #ifndef __DT_BINDINGS_CLOCK_R8A77470_CPG_MSSR_H__ | ||
| 6 | #define __DT_BINDINGS_CLOCK_R8A77470_CPG_MSSR_H__ | ||
| 7 | |||
| 8 | #include <dt-bindings/clock/renesas-cpg-mssr.h> | ||
| 9 | |||
| 10 | /* r8a77470 CPG Core Clocks */ | ||
| 11 | #define R8A77470_CLK_Z2 0 | ||
| 12 | #define R8A77470_CLK_ZTR 1 | ||
| 13 | #define R8A77470_CLK_ZTRD2 2 | ||
| 14 | #define R8A77470_CLK_ZT 3 | ||
| 15 | #define R8A77470_CLK_ZX 4 | ||
| 16 | #define R8A77470_CLK_ZS 5 | ||
| 17 | #define R8A77470_CLK_HP 6 | ||
| 18 | #define R8A77470_CLK_B 7 | ||
| 19 | #define R8A77470_CLK_LB 8 | ||
| 20 | #define R8A77470_CLK_P 9 | ||
| 21 | #define R8A77470_CLK_CL 10 | ||
| 22 | #define R8A77470_CLK_CP 11 | ||
| 23 | #define R8A77470_CLK_M2 12 | ||
| 24 | #define R8A77470_CLK_ZB3 13 | ||
| 25 | #define R8A77470_CLK_SDH 14 | ||
| 26 | #define R8A77470_CLK_SD0 15 | ||
| 27 | #define R8A77470_CLK_SD1 16 | ||
| 28 | #define R8A77470_CLK_SD2 17 | ||
| 29 | #define R8A77470_CLK_MP 18 | ||
| 30 | #define R8A77470_CLK_QSPI 19 | ||
| 31 | #define R8A77470_CLK_CPEX 20 | ||
| 32 | #define R8A77470_CLK_RCAN 21 | ||
| 33 | #define R8A77470_CLK_R 22 | ||
| 34 | #define R8A77470_CLK_OSC 23 | ||
| 35 | |||
| 36 | #endif /* __DT_BINDINGS_CLOCK_R8A77470_CPG_MSSR_H__ */ | ||
diff --git a/include/dt-bindings/clock/r8a77990-cpg-mssr.h b/include/dt-bindings/clock/r8a77990-cpg-mssr.h new file mode 100644 index 000000000000..a596a482f3a9 --- /dev/null +++ b/include/dt-bindings/clock/r8a77990-cpg-mssr.h | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2018 Renesas Electronics Corp. | ||
| 4 | */ | ||
| 5 | #ifndef __DT_BINDINGS_CLOCK_R8A77990_CPG_MSSR_H__ | ||
| 6 | #define __DT_BINDINGS_CLOCK_R8A77990_CPG_MSSR_H__ | ||
| 7 | |||
| 8 | #include <dt-bindings/clock/renesas-cpg-mssr.h> | ||
| 9 | |||
| 10 | /* r8a77990 CPG Core Clocks */ | ||
| 11 | #define R8A77990_CLK_Z2 0 | ||
| 12 | #define R8A77990_CLK_ZR 1 | ||
| 13 | #define R8A77990_CLK_ZG 2 | ||
| 14 | #define R8A77990_CLK_ZTR 3 | ||
| 15 | #define R8A77990_CLK_ZT 4 | ||
| 16 | #define R8A77990_CLK_ZX 5 | ||
| 17 | #define R8A77990_CLK_S0D1 6 | ||
| 18 | #define R8A77990_CLK_S0D3 7 | ||
| 19 | #define R8A77990_CLK_S0D6 8 | ||
| 20 | #define R8A77990_CLK_S0D12 9 | ||
| 21 | #define R8A77990_CLK_S0D24 10 | ||
| 22 | #define R8A77990_CLK_S1D1 11 | ||
| 23 | #define R8A77990_CLK_S1D2 12 | ||
| 24 | #define R8A77990_CLK_S1D4 13 | ||
| 25 | #define R8A77990_CLK_S2D1 14 | ||
| 26 | #define R8A77990_CLK_S2D2 15 | ||
| 27 | #define R8A77990_CLK_S2D4 16 | ||
| 28 | #define R8A77990_CLK_S3D1 17 | ||
| 29 | #define R8A77990_CLK_S3D2 18 | ||
| 30 | #define R8A77990_CLK_S3D4 19 | ||
| 31 | #define R8A77990_CLK_S0D6C 20 | ||
| 32 | #define R8A77990_CLK_S3D1C 21 | ||
| 33 | #define R8A77990_CLK_S3D2C 22 | ||
| 34 | #define R8A77990_CLK_S3D4C 23 | ||
| 35 | #define R8A77990_CLK_LB 24 | ||
| 36 | #define R8A77990_CLK_CL 25 | ||
| 37 | #define R8A77990_CLK_ZB3 26 | ||
| 38 | #define R8A77990_CLK_ZB3D2 27 | ||
| 39 | #define R8A77990_CLK_CR 28 | ||
| 40 | #define R8A77990_CLK_CRD2 29 | ||
| 41 | #define R8A77990_CLK_SD0H 30 | ||
| 42 | #define R8A77990_CLK_SD0 31 | ||
| 43 | #define R8A77990_CLK_SD1H 32 | ||
| 44 | #define R8A77990_CLK_SD1 33 | ||
| 45 | #define R8A77990_CLK_SD3H 34 | ||
| 46 | #define R8A77990_CLK_SD3 35 | ||
| 47 | #define R8A77990_CLK_RPC 36 | ||
| 48 | #define R8A77990_CLK_RPCD2 37 | ||
| 49 | #define R8A77990_CLK_ZA2 38 | ||
| 50 | #define R8A77990_CLK_ZA8 39 | ||
| 51 | #define R8A77990_CLK_Z2D 40 | ||
| 52 | #define R8A77990_CLK_CANFD 41 | ||
| 53 | #define R8A77990_CLK_MSO 42 | ||
| 54 | #define R8A77990_CLK_R 43 | ||
| 55 | #define R8A77990_CLK_OSC 44 | ||
| 56 | #define R8A77990_CLK_LV0 45 | ||
| 57 | #define R8A77990_CLK_LV1 46 | ||
| 58 | #define R8A77990_CLK_CSI0 47 | ||
| 59 | #define R8A77990_CLK_CP 48 | ||
| 60 | #define R8A77990_CLK_CPEX 49 | ||
| 61 | |||
| 62 | #endif /* __DT_BINDINGS_CLOCK_R8A77990_CPG_MSSR_H__ */ | ||
diff --git a/include/dt-bindings/clock/sun50i-h6-r-ccu.h b/include/dt-bindings/clock/sun50i-h6-r-ccu.h new file mode 100644 index 000000000000..76136132a13e --- /dev/null +++ b/include/dt-bindings/clock/sun50i-h6-r-ccu.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.xyz> | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _DT_BINDINGS_CLK_SUN50I_H6_R_CCU_H_ | ||
| 7 | #define _DT_BINDINGS_CLK_SUN50I_H6_R_CCU_H_ | ||
| 8 | |||
| 9 | #define CLK_AR100 0 | ||
| 10 | |||
| 11 | #define CLK_R_APB1 2 | ||
| 12 | |||
| 13 | #define CLK_R_APB1_TIMER 4 | ||
| 14 | #define CLK_R_APB1_TWD 5 | ||
| 15 | #define CLK_R_APB1_PWM 6 | ||
| 16 | #define CLK_R_APB2_UART 7 | ||
| 17 | #define CLK_R_APB2_I2C 8 | ||
| 18 | #define CLK_R_APB1_IR 9 | ||
| 19 | #define CLK_R_APB1_W1 10 | ||
| 20 | |||
| 21 | #define CLK_IR 11 | ||
| 22 | #define CLK_W1 12 | ||
| 23 | |||
| 24 | #endif /* _DT_BINDINGS_CLK_SUN50I_H6_R_CCU_H_ */ | ||
diff --git a/include/dt-bindings/memory/tegra114-mc.h b/include/dt-bindings/memory/tegra114-mc.h index 27c8386987ff..dfe99c8a5ba5 100644 --- a/include/dt-bindings/memory/tegra114-mc.h +++ b/include/dt-bindings/memory/tegra114-mc.h | |||
| @@ -23,4 +23,21 @@ | |||
| 23 | #define TEGRA_SWGROUP_EMUCIF 18 | 23 | #define TEGRA_SWGROUP_EMUCIF 18 |
| 24 | #define TEGRA_SWGROUP_TSEC 19 | 24 | #define TEGRA_SWGROUP_TSEC 19 |
| 25 | 25 | ||
| 26 | #define TEGRA114_MC_RESET_AVPC 0 | ||
| 27 | #define TEGRA114_MC_RESET_DC 1 | ||
| 28 | #define TEGRA114_MC_RESET_DCB 2 | ||
| 29 | #define TEGRA114_MC_RESET_EPP 3 | ||
| 30 | #define TEGRA114_MC_RESET_2D 4 | ||
| 31 | #define TEGRA114_MC_RESET_HC 5 | ||
| 32 | #define TEGRA114_MC_RESET_HDA 6 | ||
| 33 | #define TEGRA114_MC_RESET_ISP 7 | ||
| 34 | #define TEGRA114_MC_RESET_MPCORE 8 | ||
| 35 | #define TEGRA114_MC_RESET_MPCORELP 9 | ||
| 36 | #define TEGRA114_MC_RESET_MPE 10 | ||
| 37 | #define TEGRA114_MC_RESET_3D 11 | ||
| 38 | #define TEGRA114_MC_RESET_3D2 12 | ||
| 39 | #define TEGRA114_MC_RESET_PPCS 13 | ||
| 40 | #define TEGRA114_MC_RESET_VDE 14 | ||
| 41 | #define TEGRA114_MC_RESET_VI 15 | ||
| 42 | |||
| 26 | #endif | 43 | #endif |
diff --git a/include/dt-bindings/memory/tegra124-mc.h b/include/dt-bindings/memory/tegra124-mc.h index f534d7c06019..186e6b7e9b35 100644 --- a/include/dt-bindings/memory/tegra124-mc.h +++ b/include/dt-bindings/memory/tegra124-mc.h | |||
| @@ -29,4 +29,29 @@ | |||
| 29 | #define TEGRA_SWGROUP_VIC 24 | 29 | #define TEGRA_SWGROUP_VIC 24 |
| 30 | #define TEGRA_SWGROUP_VI 25 | 30 | #define TEGRA_SWGROUP_VI 25 |
| 31 | 31 | ||
| 32 | #define TEGRA124_MC_RESET_AFI 0 | ||
| 33 | #define TEGRA124_MC_RESET_AVPC 1 | ||
| 34 | #define TEGRA124_MC_RESET_DC 2 | ||
| 35 | #define TEGRA124_MC_RESET_DCB 3 | ||
| 36 | #define TEGRA124_MC_RESET_HC 4 | ||
| 37 | #define TEGRA124_MC_RESET_HDA 5 | ||
| 38 | #define TEGRA124_MC_RESET_ISP2 6 | ||
| 39 | #define TEGRA124_MC_RESET_MPCORE 7 | ||
| 40 | #define TEGRA124_MC_RESET_MPCORELP 8 | ||
| 41 | #define TEGRA124_MC_RESET_MSENC 9 | ||
| 42 | #define TEGRA124_MC_RESET_PPCS 10 | ||
| 43 | #define TEGRA124_MC_RESET_SATA 11 | ||
| 44 | #define TEGRA124_MC_RESET_VDE 12 | ||
| 45 | #define TEGRA124_MC_RESET_VI 13 | ||
| 46 | #define TEGRA124_MC_RESET_VIC 14 | ||
| 47 | #define TEGRA124_MC_RESET_XUSB_HOST 15 | ||
| 48 | #define TEGRA124_MC_RESET_XUSB_DEV 16 | ||
| 49 | #define TEGRA124_MC_RESET_TSEC 17 | ||
| 50 | #define TEGRA124_MC_RESET_SDMMC1 18 | ||
| 51 | #define TEGRA124_MC_RESET_SDMMC2 19 | ||
| 52 | #define TEGRA124_MC_RESET_SDMMC3 20 | ||
| 53 | #define TEGRA124_MC_RESET_SDMMC4 21 | ||
| 54 | #define TEGRA124_MC_RESET_ISP2B 22 | ||
| 55 | #define TEGRA124_MC_RESET_GPU 23 | ||
| 56 | |||
| 32 | #endif | 57 | #endif |
diff --git a/include/dt-bindings/memory/tegra20-mc.h b/include/dt-bindings/memory/tegra20-mc.h new file mode 100644 index 000000000000..35e131eee198 --- /dev/null +++ b/include/dt-bindings/memory/tegra20-mc.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef DT_BINDINGS_MEMORY_TEGRA20_MC_H | ||
| 3 | #define DT_BINDINGS_MEMORY_TEGRA20_MC_H | ||
| 4 | |||
| 5 | #define TEGRA20_MC_RESET_AVPC 0 | ||
| 6 | #define TEGRA20_MC_RESET_DC 1 | ||
| 7 | #define TEGRA20_MC_RESET_DCB 2 | ||
| 8 | #define TEGRA20_MC_RESET_EPP 3 | ||
| 9 | #define TEGRA20_MC_RESET_2D 4 | ||
| 10 | #define TEGRA20_MC_RESET_HC 5 | ||
| 11 | #define TEGRA20_MC_RESET_ISP 6 | ||
| 12 | #define TEGRA20_MC_RESET_MPCORE 7 | ||
| 13 | #define TEGRA20_MC_RESET_MPEA 8 | ||
| 14 | #define TEGRA20_MC_RESET_MPEB 9 | ||
| 15 | #define TEGRA20_MC_RESET_MPEC 10 | ||
| 16 | #define TEGRA20_MC_RESET_3D 11 | ||
| 17 | #define TEGRA20_MC_RESET_PPCS 12 | ||
| 18 | #define TEGRA20_MC_RESET_VDE 13 | ||
| 19 | #define TEGRA20_MC_RESET_VI 14 | ||
| 20 | |||
| 21 | #endif | ||
diff --git a/include/dt-bindings/memory/tegra210-mc.h b/include/dt-bindings/memory/tegra210-mc.h index 4490f7cf4772..cacf05617e03 100644 --- a/include/dt-bindings/memory/tegra210-mc.h +++ b/include/dt-bindings/memory/tegra210-mc.h | |||
| @@ -34,4 +34,35 @@ | |||
| 34 | #define TEGRA_SWGROUP_ETR 29 | 34 | #define TEGRA_SWGROUP_ETR 29 |
| 35 | #define TEGRA_SWGROUP_TSECB 30 | 35 | #define TEGRA_SWGROUP_TSECB 30 |
| 36 | 36 | ||
| 37 | #define TEGRA210_MC_RESET_AFI 0 | ||
| 38 | #define TEGRA210_MC_RESET_AVPC 1 | ||
| 39 | #define TEGRA210_MC_RESET_DC 2 | ||
| 40 | #define TEGRA210_MC_RESET_DCB 3 | ||
| 41 | #define TEGRA210_MC_RESET_HC 4 | ||
| 42 | #define TEGRA210_MC_RESET_HDA 5 | ||
| 43 | #define TEGRA210_MC_RESET_ISP2 6 | ||
| 44 | #define TEGRA210_MC_RESET_MPCORE 7 | ||
| 45 | #define TEGRA210_MC_RESET_NVENC 8 | ||
| 46 | #define TEGRA210_MC_RESET_PPCS 9 | ||
| 47 | #define TEGRA210_MC_RESET_SATA 10 | ||
| 48 | #define TEGRA210_MC_RESET_VI 11 | ||
| 49 | #define TEGRA210_MC_RESET_VIC 12 | ||
| 50 | #define TEGRA210_MC_RESET_XUSB_HOST 13 | ||
| 51 | #define TEGRA210_MC_RESET_XUSB_DEV 14 | ||
| 52 | #define TEGRA210_MC_RESET_A9AVP 15 | ||
| 53 | #define TEGRA210_MC_RESET_TSEC 16 | ||
| 54 | #define TEGRA210_MC_RESET_SDMMC1 17 | ||
| 55 | #define TEGRA210_MC_RESET_SDMMC2 18 | ||
| 56 | #define TEGRA210_MC_RESET_SDMMC3 19 | ||
| 57 | #define TEGRA210_MC_RESET_SDMMC4 20 | ||
| 58 | #define TEGRA210_MC_RESET_ISP2B 21 | ||
| 59 | #define TEGRA210_MC_RESET_GPU 22 | ||
| 60 | #define TEGRA210_MC_RESET_NVDEC 23 | ||
| 61 | #define TEGRA210_MC_RESET_APE 24 | ||
| 62 | #define TEGRA210_MC_RESET_SE 25 | ||
| 63 | #define TEGRA210_MC_RESET_NVJPG 26 | ||
| 64 | #define TEGRA210_MC_RESET_AXIAP 27 | ||
| 65 | #define TEGRA210_MC_RESET_ETR 28 | ||
| 66 | #define TEGRA210_MC_RESET_TSECB 29 | ||
| 67 | |||
| 37 | #endif | 68 | #endif |
diff --git a/include/dt-bindings/memory/tegra30-mc.h b/include/dt-bindings/memory/tegra30-mc.h index 3cac81919023..169f005fbc78 100644 --- a/include/dt-bindings/memory/tegra30-mc.h +++ b/include/dt-bindings/memory/tegra30-mc.h | |||
| @@ -22,4 +22,23 @@ | |||
| 22 | #define TEGRA_SWGROUP_MPCORE 17 | 22 | #define TEGRA_SWGROUP_MPCORE 17 |
| 23 | #define TEGRA_SWGROUP_ISP 18 | 23 | #define TEGRA_SWGROUP_ISP 18 |
| 24 | 24 | ||
| 25 | #define TEGRA30_MC_RESET_AFI 0 | ||
| 26 | #define TEGRA30_MC_RESET_AVPC 1 | ||
| 27 | #define TEGRA30_MC_RESET_DC 2 | ||
| 28 | #define TEGRA30_MC_RESET_DCB 3 | ||
| 29 | #define TEGRA30_MC_RESET_EPP 4 | ||
| 30 | #define TEGRA30_MC_RESET_2D 5 | ||
| 31 | #define TEGRA30_MC_RESET_HC 6 | ||
| 32 | #define TEGRA30_MC_RESET_HDA 7 | ||
| 33 | #define TEGRA30_MC_RESET_ISP 8 | ||
| 34 | #define TEGRA30_MC_RESET_MPCORE 9 | ||
| 35 | #define TEGRA30_MC_RESET_MPCORELP 10 | ||
| 36 | #define TEGRA30_MC_RESET_MPE 11 | ||
| 37 | #define TEGRA30_MC_RESET_3D 12 | ||
| 38 | #define TEGRA30_MC_RESET_3D2 13 | ||
| 39 | #define TEGRA30_MC_RESET_PPCS 14 | ||
| 40 | #define TEGRA30_MC_RESET_SATA 15 | ||
| 41 | #define TEGRA30_MC_RESET_VDE 16 | ||
| 42 | #define TEGRA30_MC_RESET_VI 17 | ||
| 43 | |||
| 25 | #endif | 44 | #endif |
diff --git a/include/dt-bindings/power/px30-power.h b/include/dt-bindings/power/px30-power.h new file mode 100644 index 000000000000..30917a99ad20 --- /dev/null +++ b/include/dt-bindings/power/px30-power.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef __DT_BINDINGS_POWER_PX30_POWER_H__ | ||
| 3 | #define __DT_BINDINGS_POWER_PX30_POWER_H__ | ||
| 4 | |||
| 5 | /* VD_CORE */ | ||
| 6 | #define PX30_PD_A35_0 0 | ||
| 7 | #define PX30_PD_A35_1 1 | ||
| 8 | #define PX30_PD_A35_2 2 | ||
| 9 | #define PX30_PD_A35_3 3 | ||
| 10 | #define PX30_PD_SCU 4 | ||
| 11 | |||
| 12 | /* VD_LOGIC */ | ||
| 13 | #define PX30_PD_USB 5 | ||
| 14 | #define PX30_PD_DDR 6 | ||
| 15 | #define PX30_PD_SDCARD 7 | ||
| 16 | #define PX30_PD_CRYPTO 8 | ||
| 17 | #define PX30_PD_GMAC 9 | ||
| 18 | #define PX30_PD_MMC_NAND 10 | ||
| 19 | #define PX30_PD_VPU 11 | ||
| 20 | #define PX30_PD_VO 12 | ||
| 21 | #define PX30_PD_VI 13 | ||
| 22 | #define PX30_PD_GPU 14 | ||
| 23 | |||
| 24 | /* VD_PMU */ | ||
| 25 | #define PX30_PD_PMU 15 | ||
| 26 | |||
| 27 | #endif | ||
diff --git a/include/dt-bindings/power/r8a77470-sysc.h b/include/dt-bindings/power/r8a77470-sysc.h new file mode 100644 index 000000000000..8bf4db187c31 --- /dev/null +++ b/include/dt-bindings/power/r8a77470-sysc.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 | ||
| 2 | * | ||
| 3 | * Copyright (C) 2018 Renesas Electronics Corp. | ||
| 4 | */ | ||
| 5 | #ifndef __DT_BINDINGS_POWER_R8A77470_SYSC_H__ | ||
| 6 | #define __DT_BINDINGS_POWER_R8A77470_SYSC_H__ | ||
| 7 | |||
| 8 | /* | ||
| 9 | * These power domain indices match the numbers of the interrupt bits | ||
| 10 | * representing the power areas in the various Interrupt Registers | ||
| 11 | * (e.g. SYSCISR, Interrupt Status Register) | ||
| 12 | */ | ||
| 13 | |||
| 14 | #define R8A77470_PD_CA7_CPU0 5 | ||
| 15 | #define R8A77470_PD_CA7_CPU1 6 | ||
| 16 | #define R8A77470_PD_SGX 20 | ||
| 17 | #define R8A77470_PD_CA7_SCU 21 | ||
| 18 | |||
| 19 | /* Always-on power area */ | ||
| 20 | #define R8A77470_PD_ALWAYS_ON 32 | ||
| 21 | |||
| 22 | #endif /* __DT_BINDINGS_POWER_R8A77470_SYSC_H__ */ | ||
diff --git a/include/dt-bindings/power/r8a77990-sysc.h b/include/dt-bindings/power/r8a77990-sysc.h new file mode 100644 index 000000000000..944d85beec15 --- /dev/null +++ b/include/dt-bindings/power/r8a77990-sysc.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2018 Renesas Electronics Corp. | ||
| 4 | */ | ||
| 5 | #ifndef __DT_BINDINGS_POWER_R8A77990_SYSC_H__ | ||
| 6 | #define __DT_BINDINGS_POWER_R8A77990_SYSC_H__ | ||
| 7 | |||
| 8 | /* | ||
| 9 | * These power domain indices match the numbers of the interrupt bits | ||
| 10 | * representing the power areas in the various Interrupt Registers | ||
| 11 | * (e.g. SYSCISR, Interrupt Status Register) | ||
| 12 | */ | ||
| 13 | |||
| 14 | #define R8A77990_PD_CA53_CPU0 5 | ||
| 15 | #define R8A77990_PD_CA53_CPU1 6 | ||
| 16 | #define R8A77990_PD_CR7 13 | ||
| 17 | #define R8A77990_PD_A3VC 14 | ||
| 18 | #define R8A77990_PD_3DG_A 17 | ||
| 19 | #define R8A77990_PD_3DG_B 18 | ||
| 20 | #define R8A77990_PD_CA53_SCU 21 | ||
| 21 | #define R8A77990_PD_A2VC1 26 | ||
| 22 | |||
| 23 | /* Always-on power area */ | ||
| 24 | #define R8A77990_PD_ALWAYS_ON 32 | ||
| 25 | |||
| 26 | #endif /* __DT_BINDINGS_POWER_R8A77990_SYSC_H__ */ | ||
diff --git a/include/dt-bindings/power/rk3036-power.h b/include/dt-bindings/power/rk3036-power.h new file mode 100644 index 000000000000..0bc6b5d5075e --- /dev/null +++ b/include/dt-bindings/power/rk3036-power.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef __DT_BINDINGS_POWER_RK3036_POWER_H__ | ||
| 3 | #define __DT_BINDINGS_POWER_RK3036_POWER_H__ | ||
| 4 | |||
| 5 | #define RK3036_PD_MSCH 0 | ||
| 6 | #define RK3036_PD_CORE 1 | ||
| 7 | #define RK3036_PD_PERI 2 | ||
| 8 | #define RK3036_PD_VIO 3 | ||
| 9 | #define RK3036_PD_VPU 4 | ||
| 10 | #define RK3036_PD_GPU 5 | ||
| 11 | #define RK3036_PD_SYS 6 | ||
| 12 | |||
| 13 | #endif | ||
diff --git a/include/dt-bindings/power/rk3128-power.h b/include/dt-bindings/power/rk3128-power.h new file mode 100644 index 000000000000..c051dc3108db --- /dev/null +++ b/include/dt-bindings/power/rk3128-power.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef __DT_BINDINGS_POWER_RK3128_POWER_H__ | ||
| 3 | #define __DT_BINDINGS_POWER_RK3128_POWER_H__ | ||
| 4 | |||
| 5 | /* VD_CORE */ | ||
| 6 | #define RK3128_PD_CORE 0 | ||
| 7 | |||
| 8 | /* VD_LOGIC */ | ||
| 9 | #define RK3128_PD_VIO 1 | ||
| 10 | #define RK3128_PD_VIDEO 2 | ||
| 11 | #define RK3128_PD_GPU 3 | ||
| 12 | #define RK3128_PD_MSCH 4 | ||
| 13 | |||
| 14 | #endif | ||
diff --git a/include/dt-bindings/power/rk3228-power.h b/include/dt-bindings/power/rk3228-power.h new file mode 100644 index 000000000000..6a8dc1bf76ce --- /dev/null +++ b/include/dt-bindings/power/rk3228-power.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef __DT_BINDINGS_POWER_RK3228_POWER_H__ | ||
| 3 | #define __DT_BINDINGS_POWER_RK3228_POWER_H__ | ||
| 4 | |||
| 5 | /** | ||
| 6 | * RK3228 idle id Summary. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #define RK3228_PD_CORE 0 | ||
| 10 | #define RK3228_PD_MSCH 1 | ||
| 11 | #define RK3228_PD_BUS 2 | ||
| 12 | #define RK3228_PD_SYS 3 | ||
| 13 | #define RK3228_PD_VIO 4 | ||
| 14 | #define RK3228_PD_VOP 5 | ||
| 15 | #define RK3228_PD_VPU 6 | ||
| 16 | #define RK3228_PD_RKVDEC 7 | ||
| 17 | #define RK3228_PD_GPU 8 | ||
| 18 | #define RK3228_PD_PERI 9 | ||
| 19 | #define RK3228_PD_GMAC 10 | ||
| 20 | |||
| 21 | #endif | ||
diff --git a/include/dt-bindings/reset/axg-aoclkc.h b/include/dt-bindings/reset/axg-aoclkc.h new file mode 100644 index 000000000000..d342c0b6b2a7 --- /dev/null +++ b/include/dt-bindings/reset/axg-aoclkc.h | |||
| @@ -0,0 +1,20 @@ | |||
| 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_RESET_AMLOGIC_MESON_AXG_AOCLK | ||
| 11 | #define DT_BINDINGS_RESET_AMLOGIC_MESON_AXG_AOCLK | ||
| 12 | |||
| 13 | #define RESET_AO_REMOTE 0 | ||
| 14 | #define RESET_AO_I2C_MASTER 1 | ||
| 15 | #define RESET_AO_I2C_SLAVE 2 | ||
| 16 | #define RESET_AO_UART1 3 | ||
| 17 | #define RESET_AO_UART2 4 | ||
| 18 | #define RESET_AO_IR_BLASTER 5 | ||
| 19 | |||
| 20 | #endif | ||
diff --git a/include/dt-bindings/reset/mt2701-resets.h b/include/dt-bindings/reset/mt2701-resets.h index 21deb547cfa4..50b7f066da9a 100644 --- a/include/dt-bindings/reset/mt2701-resets.h +++ b/include/dt-bindings/reset/mt2701-resets.h | |||
| @@ -87,4 +87,7 @@ | |||
| 87 | #define MT2701_ETHSYS_GMAC_RST 23 | 87 | #define MT2701_ETHSYS_GMAC_RST 23 |
| 88 | #define MT2701_ETHSYS_PPE_RST 31 | 88 | #define MT2701_ETHSYS_PPE_RST 31 |
| 89 | 89 | ||
| 90 | /* G3DSYS resets */ | ||
| 91 | #define MT2701_G3DSYS_CORE_RST 0 | ||
| 92 | |||
| 90 | #endif /* _DT_BINDINGS_RESET_CONTROLLER_MT2701 */ | 93 | #endif /* _DT_BINDINGS_RESET_CONTROLLER_MT2701 */ |
diff --git a/include/dt-bindings/reset/sun50i-h6-r-ccu.h b/include/dt-bindings/reset/sun50i-h6-r-ccu.h new file mode 100644 index 000000000000..01c84dba49a4 --- /dev/null +++ b/include/dt-bindings/reset/sun50i-h6-r-ccu.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* SPDX-License-Identifier: (GPL-2.0+ or MIT) */ | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _DT_BINDINGS_RST_SUN50I_H6_R_CCU_H_ | ||
| 7 | #define _DT_BINDINGS_RST_SUN50I_H6_R_CCU_H_ | ||
| 8 | |||
| 9 | #define RST_R_APB1_TIMER 0 | ||
| 10 | #define RST_R_APB1_TWD 1 | ||
| 11 | #define RST_R_APB1_PWM 2 | ||
| 12 | #define RST_R_APB2_UART 3 | ||
| 13 | #define RST_R_APB2_I2C 4 | ||
| 14 | #define RST_R_APB1_IR 5 | ||
| 15 | #define RST_R_APB1_W1 6 | ||
| 16 | |||
| 17 | #endif /* _DT_BINDINGS_RST_SUN50I_H6_R_CCU_H_ */ | ||
diff --git a/include/keys/asymmetric-subtype.h b/include/keys/asymmetric-subtype.h index 2480469ce8fb..e0a9c2368872 100644 --- a/include/keys/asymmetric-subtype.h +++ b/include/keys/asymmetric-subtype.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Asymmetric public-key cryptography key subtype | 1 | /* Asymmetric public-key cryptography key subtype |
| 2 | * | 2 | * |
| 3 | * See Documentation/security/asymmetric-keys.txt | 3 | * See Documentation/crypto/asymmetric-keys.txt |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. | 5 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. |
| 6 | * Written by David Howells (dhowells@redhat.com) | 6 | * Written by David Howells (dhowells@redhat.com) |
diff --git a/include/keys/asymmetric-type.h b/include/keys/asymmetric-type.h index b38240716d41..1cb77cd5135e 100644 --- a/include/keys/asymmetric-type.h +++ b/include/keys/asymmetric-type.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Asymmetric Public-key cryptography key type interface | 1 | /* Asymmetric Public-key cryptography key type interface |
| 2 | * | 2 | * |
| 3 | * See Documentation/security/asymmetric-keys.txt | 3 | * See Documentation/crypto/asymmetric-keys.txt |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. | 5 | * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. |
| 6 | * Written by David Howells (dhowells@redhat.com) | 6 | * Written by David Howells (dhowells@redhat.com) |
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index e7efe12a81bd..cfdd2484cc42 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | #include <linux/irqchip/arm-gic-v4.h> | 29 | #include <linux/irqchip/arm-gic-v4.h> |
| 30 | 30 | ||
| 31 | #define VGIC_V3_MAX_CPUS 255 | 31 | #define VGIC_V3_MAX_CPUS 512 |
| 32 | #define VGIC_V2_MAX_CPUS 8 | 32 | #define VGIC_V2_MAX_CPUS 8 |
| 33 | #define VGIC_NR_IRQS_LEGACY 256 | 33 | #define VGIC_NR_IRQS_LEGACY 256 |
| 34 | #define VGIC_NR_SGIS 16 | 34 | #define VGIC_NR_SGIS 16 |
| @@ -201,6 +201,14 @@ struct vgic_its { | |||
| 201 | 201 | ||
| 202 | struct vgic_state_iter; | 202 | struct vgic_state_iter; |
| 203 | 203 | ||
| 204 | struct vgic_redist_region { | ||
| 205 | u32 index; | ||
| 206 | gpa_t base; | ||
| 207 | u32 count; /* number of redistributors or 0 if single region */ | ||
| 208 | u32 free_index; /* index of the next free redistributor */ | ||
| 209 | struct list_head list; | ||
| 210 | }; | ||
| 211 | |||
| 204 | struct vgic_dist { | 212 | struct vgic_dist { |
| 205 | bool in_kernel; | 213 | bool in_kernel; |
| 206 | bool ready; | 214 | bool ready; |
| @@ -220,10 +228,7 @@ struct vgic_dist { | |||
| 220 | /* either a GICv2 CPU interface */ | 228 | /* either a GICv2 CPU interface */ |
| 221 | gpa_t vgic_cpu_base; | 229 | gpa_t vgic_cpu_base; |
| 222 | /* or a number of GICv3 redistributor regions */ | 230 | /* or a number of GICv3 redistributor regions */ |
| 223 | struct { | 231 | struct list_head rd_regions; |
| 224 | gpa_t vgic_redist_base; | ||
| 225 | gpa_t vgic_redist_free_offset; | ||
| 226 | }; | ||
| 227 | }; | 232 | }; |
| 228 | 233 | ||
| 229 | /* distributor enabled */ | 234 | /* distributor enabled */ |
| @@ -311,6 +316,7 @@ struct vgic_cpu { | |||
| 311 | */ | 316 | */ |
| 312 | struct vgic_io_device rd_iodev; | 317 | struct vgic_io_device rd_iodev; |
| 313 | struct vgic_io_device sgi_iodev; | 318 | struct vgic_io_device sgi_iodev; |
| 319 | struct vgic_redist_region *rdreg; | ||
| 314 | 320 | ||
| 315 | /* Contains the attributes and gpa of the LPI pending tables. */ | 321 | /* Contains the attributes and gpa of the LPI pending tables. */ |
| 316 | u64 pendbaser; | 322 | u64 pendbaser; |
| @@ -332,7 +338,6 @@ void kvm_vgic_early_init(struct kvm *kvm); | |||
| 332 | int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu); | 338 | int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu); |
| 333 | int kvm_vgic_create(struct kvm *kvm, u32 type); | 339 | int kvm_vgic_create(struct kvm *kvm, u32 type); |
| 334 | void kvm_vgic_destroy(struct kvm *kvm); | 340 | void kvm_vgic_destroy(struct kvm *kvm); |
| 335 | void kvm_vgic_vcpu_early_init(struct kvm_vcpu *vcpu); | ||
| 336 | void kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu); | 341 | void kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu); |
| 337 | int kvm_vgic_map_resources(struct kvm *kvm); | 342 | int kvm_vgic_map_resources(struct kvm *kvm); |
| 338 | int kvm_vgic_hyp_init(void); | 343 | int kvm_vgic_hyp_init(void); |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 8758a2a9e6c1..e54f40974eb0 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -443,6 +443,9 @@ int acpi_check_resource_conflict(const struct resource *res); | |||
| 443 | int acpi_check_region(resource_size_t start, resource_size_t n, | 443 | int acpi_check_region(resource_size_t start, resource_size_t n, |
| 444 | const char *name); | 444 | const char *name); |
| 445 | 445 | ||
| 446 | acpi_status acpi_release_memory(acpi_handle handle, struct resource *res, | ||
| 447 | u32 level); | ||
| 448 | |||
| 446 | int acpi_resources_are_enforced(void); | 449 | int acpi_resources_are_enforced(void); |
| 447 | 450 | ||
| 448 | #ifdef CONFIG_HIBERNATION | 451 | #ifdef CONFIG_HIBERNATION |
| @@ -1299,4 +1302,23 @@ static inline int lpit_read_residency_count_address(u64 *address) | |||
| 1299 | } | 1302 | } |
| 1300 | #endif | 1303 | #endif |
| 1301 | 1304 | ||
| 1305 | #ifdef CONFIG_ACPI_PPTT | ||
| 1306 | int find_acpi_cpu_topology(unsigned int cpu, int level); | ||
| 1307 | int find_acpi_cpu_topology_package(unsigned int cpu); | ||
| 1308 | int find_acpi_cpu_cache_topology(unsigned int cpu, int level); | ||
| 1309 | #else | ||
| 1310 | static inline int find_acpi_cpu_topology(unsigned int cpu, int level) | ||
| 1311 | { | ||
| 1312 | return -EINVAL; | ||
| 1313 | } | ||
| 1314 | static inline int find_acpi_cpu_topology_package(unsigned int cpu) | ||
| 1315 | { | ||
| 1316 | return -EINVAL; | ||
| 1317 | } | ||
| 1318 | static inline int find_acpi_cpu_cache_topology(unsigned int cpu, int level) | ||
| 1319 | { | ||
| 1320 | return -EINVAL; | ||
| 1321 | } | ||
| 1322 | #endif | ||
| 1323 | |||
| 1302 | #endif /*_LINUX_ACPI_H*/ | 1324 | #endif /*_LINUX_ACPI_H*/ |
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index a031897fca76..ca1d2cc2cdfa 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h | |||
| @@ -80,6 +80,11 @@ | |||
| 80 | ARM_SMCCC_SMC_32, \ | 80 | ARM_SMCCC_SMC_32, \ |
| 81 | 0, 0x8000) | 81 | 0, 0x8000) |
| 82 | 82 | ||
| 83 | #define ARM_SMCCC_ARCH_WORKAROUND_2 \ | ||
| 84 | ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ | ||
| 85 | ARM_SMCCC_SMC_32, \ | ||
| 86 | 0, 0x7fff) | ||
| 87 | |||
| 83 | #ifndef __ASSEMBLY__ | 88 | #ifndef __ASSEMBLY__ |
| 84 | 89 | ||
| 85 | #include <linux/linkage.h> | 90 | #include <linux/linkage.h> |
| @@ -291,5 +296,10 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1, | |||
| 291 | */ | 296 | */ |
| 292 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) | 297 | #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) |
| 293 | 298 | ||
| 299 | /* Return codes defined in ARM DEN 0070A */ | ||
| 300 | #define SMCCC_RET_SUCCESS 0 | ||
| 301 | #define SMCCC_RET_NOT_SUPPORTED -1 | ||
| 302 | #define SMCCC_RET_NOT_REQUIRED -2 | ||
| 303 | |||
| 294 | #endif /*__ASSEMBLY__*/ | 304 | #endif /*__ASSEMBLY__*/ |
| 295 | #endif /*__LINUX_ARM_SMCCC_H*/ | 305 | #endif /*__LINUX_ARM_SMCCC_H*/ |
diff --git a/include/linux/assoc_array.h b/include/linux/assoc_array.h index a89df3be1686..65e3832f96b2 100644 --- a/include/linux/assoc_array.h +++ b/include/linux/assoc_array.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Generic associative array implementation. | 1 | /* Generic associative array implementation. |
| 2 | * | 2 | * |
| 3 | * See Documentation/assoc_array.txt for information. | 3 | * See Documentation/core-api/assoc_array.rst for information. |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. | 5 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. |
| 6 | * Written by David Howells (dhowells@redhat.com) | 6 | * Written by David Howells (dhowells@redhat.com) |
diff --git a/include/linux/assoc_array_priv.h b/include/linux/assoc_array_priv.h index 711275e6681c..a00a06550c10 100644 --- a/include/linux/assoc_array_priv.h +++ b/include/linux/assoc_array_priv.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Private definitions for the generic associative array implementation. | 1 | /* Private definitions for the generic associative array implementation. |
| 2 | * | 2 | * |
| 3 | * See Documentation/assoc_array.txt for information. | 3 | * See Documentation/core-api/assoc_array.rst for information. |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. | 5 | * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. |
| 6 | * Written by David Howells (dhowells@redhat.com) | 6 | * Written by David Howells (dhowells@redhat.com) |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 0c27515d2cf6..8124815eb121 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
| @@ -214,6 +214,7 @@ struct atmphy_ops { | |||
| 214 | struct atm_skb_data { | 214 | struct atm_skb_data { |
| 215 | struct atm_vcc *vcc; /* ATM VCC */ | 215 | struct atm_vcc *vcc; /* ATM VCC */ |
| 216 | unsigned long atm_options; /* ATM layer options */ | 216 | unsigned long atm_options; /* ATM layer options */ |
| 217 | unsigned int acct_truesize; /* truesize accounted to vcc */ | ||
| 217 | }; | 218 | }; |
| 218 | 219 | ||
| 219 | #define VCC_HTABLE_SIZE 32 | 220 | #define VCC_HTABLE_SIZE 32 |
| @@ -241,6 +242,20 @@ void vcc_insert_socket(struct sock *sk); | |||
| 241 | 242 | ||
| 242 | void atm_dev_release_vccs(struct atm_dev *dev); | 243 | void atm_dev_release_vccs(struct atm_dev *dev); |
| 243 | 244 | ||
| 245 | static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb) | ||
| 246 | { | ||
| 247 | /* | ||
| 248 | * Because ATM skbs may not belong to a sock (and we don't | ||
| 249 | * necessarily want to), skb->truesize may be adjusted, | ||
| 250 | * escaping the hack in pskb_expand_head() which avoids | ||
| 251 | * doing so for some cases. So stash the value of truesize | ||
| 252 | * at the time we accounted it, and atm_pop_raw() can use | ||
| 253 | * that value later, in case it changes. | ||
| 254 | */ | ||
| 255 | refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); | ||
| 256 | ATM_SKB(skb)->acct_truesize = skb->truesize; | ||
| 257 | ATM_SKB(skb)->atm_options = vcc->atm_options; | ||
| 258 | } | ||
| 244 | 259 | ||
| 245 | static inline void atm_force_charge(struct atm_vcc *vcc,int truesize) | 260 | static inline void atm_force_charge(struct atm_vcc *vcc,int truesize) |
| 246 | { | 261 | { |
diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h index 0bd432a4d7bd..24251762c20c 100644 --- a/include/linux/backing-dev-defs.h +++ b/include/linux/backing-dev-defs.h | |||
| @@ -22,7 +22,6 @@ struct dentry; | |||
| 22 | */ | 22 | */ |
| 23 | enum wb_state { | 23 | enum wb_state { |
| 24 | WB_registered, /* bdi_register() was done */ | 24 | WB_registered, /* bdi_register() was done */ |
| 25 | WB_shutting_down, /* wb_shutdown() in progress */ | ||
| 26 | WB_writeback_running, /* Writeback is in progress */ | 25 | WB_writeback_running, /* Writeback is in progress */ |
| 27 | WB_has_dirty_io, /* Dirty inodes on ->b_{dirty|io|more_io} */ | 26 | WB_has_dirty_io, /* Dirty inodes on ->b_{dirty|io|more_io} */ |
| 28 | WB_start_all, /* nr_pages == 0 (all) work pending */ | 27 | WB_start_all, /* nr_pages == 0 (all) work pending */ |
| @@ -189,6 +188,7 @@ struct backing_dev_info { | |||
| 189 | #ifdef CONFIG_CGROUP_WRITEBACK | 188 | #ifdef CONFIG_CGROUP_WRITEBACK |
| 190 | struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */ | 189 | struct radix_tree_root cgwb_tree; /* radix tree of active cgroup wbs */ |
| 191 | struct rb_root cgwb_congested_tree; /* their congested states */ | 190 | struct rb_root cgwb_congested_tree; /* their congested states */ |
| 191 | struct mutex cgwb_release_mutex; /* protect shutdown of wb structs */ | ||
| 192 | #else | 192 | #else |
| 193 | struct bdi_writeback_congested *wb_congested; | 193 | struct bdi_writeback_congested *wb_congested; |
| 194 | #endif | 194 | #endif |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 2baab6f3861d..7fbf0539e14a 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
| @@ -84,10 +84,6 @@ struct backlight_properties { | |||
| 84 | 84 | ||
| 85 | #define BL_CORE_SUSPENDED (1 << 0) /* backlight is suspended */ | 85 | #define BL_CORE_SUSPENDED (1 << 0) /* backlight is suspended */ |
| 86 | #define BL_CORE_FBBLANK (1 << 1) /* backlight is under an fb blank event */ | 86 | #define BL_CORE_FBBLANK (1 << 1) /* backlight is under an fb blank event */ |
| 87 | #define BL_CORE_DRIVER4 (1 << 28) /* reserved for driver specific use */ | ||
| 88 | #define BL_CORE_DRIVER3 (1 << 29) /* reserved for driver specific use */ | ||
| 89 | #define BL_CORE_DRIVER2 (1 << 30) /* reserved for driver specific use */ | ||
| 90 | #define BL_CORE_DRIVER1 (1 << 31) /* reserved for driver specific use */ | ||
| 91 | 87 | ||
| 92 | }; | 88 | }; |
| 93 | 89 | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index 397a38aca182..f08f5fe7bd08 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -422,6 +422,7 @@ enum { | |||
| 422 | extern int bioset_init(struct bio_set *, unsigned int, unsigned int, int flags); | 422 | extern int bioset_init(struct bio_set *, unsigned int, unsigned int, int flags); |
| 423 | extern void bioset_exit(struct bio_set *); | 423 | extern void bioset_exit(struct bio_set *); |
| 424 | extern int biovec_init_pool(mempool_t *pool, int pool_entries); | 424 | extern int biovec_init_pool(mempool_t *pool, int pool_entries); |
| 425 | extern int bioset_init_from_src(struct bio_set *bs, struct bio_set *src); | ||
| 425 | 426 | ||
| 426 | extern struct bio *bio_alloc_bioset(gfp_t, unsigned int, struct bio_set *); | 427 | extern struct bio *bio_alloc_bioset(gfp_t, unsigned int, struct bio_set *); |
| 427 | extern void bio_put(struct bio *); | 428 | extern void bio_put(struct bio *); |
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index fb355173f3c7..e3147eb74222 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
| @@ -281,8 +281,6 @@ void blk_freeze_queue_start(struct request_queue *q); | |||
| 281 | void blk_mq_freeze_queue_wait(struct request_queue *q); | 281 | void blk_mq_freeze_queue_wait(struct request_queue *q); |
| 282 | int blk_mq_freeze_queue_wait_timeout(struct request_queue *q, | 282 | int blk_mq_freeze_queue_wait_timeout(struct request_queue *q, |
| 283 | unsigned long timeout); | 283 | unsigned long timeout); |
| 284 | int blk_mq_tagset_iter(struct blk_mq_tag_set *set, void *data, | ||
| 285 | int (reinit_request)(void *, struct request *)); | ||
| 286 | 284 | ||
| 287 | int blk_mq_map_queues(struct blk_mq_tag_set *set); | 285 | int blk_mq_map_queues(struct blk_mq_tag_set *set); |
| 288 | void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues); | 286 | void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index bca3a92eb55f..79226ca8f80f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -127,6 +127,8 @@ typedef __u32 __bitwise req_flags_t; | |||
| 127 | #define RQF_ZONE_WRITE_LOCKED ((__force req_flags_t)(1 << 19)) | 127 | #define RQF_ZONE_WRITE_LOCKED ((__force req_flags_t)(1 << 19)) |
| 128 | /* already slept for hybrid poll */ | 128 | /* already slept for hybrid poll */ |
| 129 | #define RQF_MQ_POLL_SLEPT ((__force req_flags_t)(1 << 20)) | 129 | #define RQF_MQ_POLL_SLEPT ((__force req_flags_t)(1 << 20)) |
| 130 | /* ->timeout has been called, don't expire again */ | ||
| 131 | #define RQF_TIMED_OUT ((__force req_flags_t)(1 << 21)) | ||
| 130 | 132 | ||
| 131 | /* flags that prevent us from merging requests: */ | 133 | /* flags that prevent us from merging requests: */ |
| 132 | #define RQF_NOMERGE_FLAGS \ | 134 | #define RQF_NOMERGE_FLAGS \ |
| @@ -560,7 +562,6 @@ struct request_queue { | |||
| 560 | unsigned int dma_alignment; | 562 | unsigned int dma_alignment; |
| 561 | 563 | ||
| 562 | struct blk_queue_tag *queue_tags; | 564 | struct blk_queue_tag *queue_tags; |
| 563 | struct list_head tag_busy_list; | ||
| 564 | 565 | ||
| 565 | unsigned int nr_sorted; | 566 | unsigned int nr_sorted; |
| 566 | unsigned int in_flight[2]; | 567 | unsigned int in_flight[2]; |
| @@ -1118,8 +1119,8 @@ static inline unsigned int blk_max_size_offset(struct request_queue *q, | |||
| 1118 | if (!q->limits.chunk_sectors) | 1119 | if (!q->limits.chunk_sectors) |
| 1119 | return q->limits.max_sectors; | 1120 | return q->limits.max_sectors; |
| 1120 | 1121 | ||
| 1121 | return q->limits.chunk_sectors - | 1122 | return min(q->limits.max_sectors, (unsigned int)(q->limits.chunk_sectors - |
| 1122 | (offset & (q->limits.chunk_sectors - 1)); | 1123 | (offset & (q->limits.chunk_sectors - 1)))); |
| 1123 | } | 1124 | } |
| 1124 | 1125 | ||
| 1125 | static inline unsigned int blk_rq_get_max_sectors(struct request *rq, | 1126 | static inline unsigned int blk_rq_get_max_sectors(struct request *rq, |
| @@ -1373,7 +1374,6 @@ extern void blk_queue_end_tag(struct request_queue *, struct request *); | |||
| 1373 | extern int blk_queue_init_tags(struct request_queue *, int, struct blk_queue_tag *, int); | 1374 | extern int blk_queue_init_tags(struct request_queue *, int, struct blk_queue_tag *, int); |
| 1374 | extern void blk_queue_free_tags(struct request_queue *); | 1375 | extern void blk_queue_free_tags(struct request_queue *); |
| 1375 | extern int blk_queue_resize_tags(struct request_queue *, int); | 1376 | extern int blk_queue_resize_tags(struct request_queue *, int); |
| 1376 | extern void blk_queue_invalidate_tags(struct request_queue *); | ||
| 1377 | extern struct blk_queue_tag *blk_init_tags(int, int); | 1377 | extern struct blk_queue_tag *blk_init_tags(int, int); |
| 1378 | extern void blk_free_tags(struct blk_queue_tag *); | 1378 | extern void blk_free_tags(struct blk_queue_tag *); |
| 1379 | 1379 | ||
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h index 975fb4cf1bb7..79795c5fa7c3 100644 --- a/include/linux/bpf-cgroup.h +++ b/include/linux/bpf-cgroup.h | |||
| @@ -188,12 +188,38 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, | |||
| 188 | \ | 188 | \ |
| 189 | __ret; \ | 189 | __ret; \ |
| 190 | }) | 190 | }) |
| 191 | int cgroup_bpf_prog_attach(const union bpf_attr *attr, | ||
| 192 | enum bpf_prog_type ptype, struct bpf_prog *prog); | ||
| 193 | int cgroup_bpf_prog_detach(const union bpf_attr *attr, | ||
| 194 | enum bpf_prog_type ptype); | ||
| 195 | int cgroup_bpf_prog_query(const union bpf_attr *attr, | ||
| 196 | union bpf_attr __user *uattr); | ||
| 191 | #else | 197 | #else |
| 192 | 198 | ||
| 199 | struct bpf_prog; | ||
| 193 | struct cgroup_bpf {}; | 200 | struct cgroup_bpf {}; |
| 194 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} | 201 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} |
| 195 | static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } | 202 | static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } |
| 196 | 203 | ||
| 204 | static inline int cgroup_bpf_prog_attach(const union bpf_attr *attr, | ||
| 205 | enum bpf_prog_type ptype, | ||
| 206 | struct bpf_prog *prog) | ||
| 207 | { | ||
| 208 | return -EINVAL; | ||
| 209 | } | ||
| 210 | |||
| 211 | static inline int cgroup_bpf_prog_detach(const union bpf_attr *attr, | ||
| 212 | enum bpf_prog_type ptype) | ||
| 213 | { | ||
| 214 | return -EINVAL; | ||
| 215 | } | ||
| 216 | |||
| 217 | static inline int cgroup_bpf_prog_query(const union bpf_attr *attr, | ||
| 218 | union bpf_attr __user *uattr) | ||
| 219 | { | ||
| 220 | return -EINVAL; | ||
| 221 | } | ||
| 222 | |||
| 197 | #define cgroup_bpf_enabled (0) | 223 | #define cgroup_bpf_enabled (0) |
| 198 | #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) | 224 | #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) |
| 199 | #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; }) | 225 | #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; }) |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 995c3b1e59bf..8827e797ff97 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -488,12 +488,15 @@ void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth); | |||
| 488 | 488 | ||
| 489 | /* Map specifics */ | 489 | /* Map specifics */ |
| 490 | struct xdp_buff; | 490 | struct xdp_buff; |
| 491 | struct sk_buff; | ||
| 491 | 492 | ||
| 492 | struct bpf_dtab_netdev *__dev_map_lookup_elem(struct bpf_map *map, u32 key); | 493 | struct bpf_dtab_netdev *__dev_map_lookup_elem(struct bpf_map *map, u32 key); |
| 493 | void __dev_map_insert_ctx(struct bpf_map *map, u32 index); | 494 | void __dev_map_insert_ctx(struct bpf_map *map, u32 index); |
| 494 | void __dev_map_flush(struct bpf_map *map); | 495 | void __dev_map_flush(struct bpf_map *map); |
| 495 | int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, | 496 | int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, |
| 496 | struct net_device *dev_rx); | 497 | struct net_device *dev_rx); |
| 498 | int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, struct sk_buff *skb, | ||
| 499 | struct bpf_prog *xdp_prog); | ||
| 497 | 500 | ||
| 498 | struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key); | 501 | struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key); |
| 499 | void __cpu_map_insert_ctx(struct bpf_map *map, u32 index); | 502 | void __cpu_map_insert_ctx(struct bpf_map *map, u32 index); |
| @@ -586,6 +589,15 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, | |||
| 586 | return 0; | 589 | return 0; |
| 587 | } | 590 | } |
| 588 | 591 | ||
| 592 | struct sk_buff; | ||
| 593 | |||
| 594 | static inline int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, | ||
| 595 | struct sk_buff *skb, | ||
| 596 | struct bpf_prog *xdp_prog) | ||
| 597 | { | ||
| 598 | return 0; | ||
| 599 | } | ||
| 600 | |||
| 589 | static inline | 601 | static inline |
| 590 | struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) | 602 | struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) |
| 591 | { | 603 | { |
| @@ -684,6 +696,8 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map) | |||
| 684 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); | 696 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); |
| 685 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); | 697 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); |
| 686 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); | 698 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); |
| 699 | int sockmap_get_from_fd(const union bpf_attr *attr, int type, | ||
| 700 | struct bpf_prog *prog); | ||
| 687 | #else | 701 | #else |
| 688 | static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) | 702 | static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) |
| 689 | { | 703 | { |
| @@ -702,6 +716,12 @@ static inline int sock_map_prog(struct bpf_map *map, | |||
| 702 | { | 716 | { |
| 703 | return -EOPNOTSUPP; | 717 | return -EOPNOTSUPP; |
| 704 | } | 718 | } |
| 719 | |||
| 720 | static inline int sockmap_get_from_fd(const union bpf_attr *attr, int type, | ||
| 721 | struct bpf_prog *prog) | ||
| 722 | { | ||
| 723 | return -EINVAL; | ||
| 724 | } | ||
| 705 | #endif | 725 | #endif |
| 706 | 726 | ||
| 707 | #if defined(CONFIG_XDP_SOCKETS) | 727 | #if defined(CONFIG_XDP_SOCKETS) |
diff --git a/include/linux/bpf_lirc.h b/include/linux/bpf_lirc.h index 5f8a4283092d..9d9ff755ec29 100644 --- a/include/linux/bpf_lirc.h +++ b/include/linux/bpf_lirc.h | |||
| @@ -5,11 +5,12 @@ | |||
| 5 | #include <uapi/linux/bpf.h> | 5 | #include <uapi/linux/bpf.h> |
| 6 | 6 | ||
| 7 | #ifdef CONFIG_BPF_LIRC_MODE2 | 7 | #ifdef CONFIG_BPF_LIRC_MODE2 |
| 8 | int lirc_prog_attach(const union bpf_attr *attr); | 8 | int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); |
| 9 | int lirc_prog_detach(const union bpf_attr *attr); | 9 | int lirc_prog_detach(const union bpf_attr *attr); |
| 10 | int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); | 10 | int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); |
| 11 | #else | 11 | #else |
| 12 | static inline int lirc_prog_attach(const union bpf_attr *attr) | 12 | static inline int lirc_prog_attach(const union bpf_attr *attr, |
| 13 | struct bpf_prog *prog) | ||
| 13 | { | 14 | { |
| 14 | return -EINVAL; | 15 | return -EINVAL; |
| 15 | } | 16 | } |
diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h index 3d9805297cda..70e19bc6cc9f 100644 --- a/include/linux/cacheinfo.h +++ b/include/linux/cacheinfo.h | |||
| @@ -34,9 +34,8 @@ enum cache_type { | |||
| 34 | * @shared_cpu_map: logical cpumask representing all the cpus sharing | 34 | * @shared_cpu_map: logical cpumask representing all the cpus sharing |
| 35 | * this cache node | 35 | * this cache node |
| 36 | * @attributes: bitfield representing various cache attributes | 36 | * @attributes: bitfield representing various cache attributes |
| 37 | * @of_node: if devicetree is used, this represents either the cpu node in | 37 | * @fw_token: Unique value used to determine if different cacheinfo |
| 38 | * case there's no explicit cache node or the cache node itself in the | 38 | * structures represent a single hardware cache instance. |
| 39 | * device tree | ||
| 40 | * @disable_sysfs: indicates whether this node is visible to the user via | 39 | * @disable_sysfs: indicates whether this node is visible to the user via |
| 41 | * sysfs or not | 40 | * sysfs or not |
| 42 | * @priv: pointer to any private data structure specific to particular | 41 | * @priv: pointer to any private data structure specific to particular |
| @@ -65,8 +64,7 @@ struct cacheinfo { | |||
| 65 | #define CACHE_ALLOCATE_POLICY_MASK \ | 64 | #define CACHE_ALLOCATE_POLICY_MASK \ |
| 66 | (CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE) | 65 | (CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE) |
| 67 | #define CACHE_ID BIT(4) | 66 | #define CACHE_ID BIT(4) |
| 68 | 67 | void *fw_token; | |
| 69 | struct device_node *of_node; | ||
| 70 | bool disable_sysfs; | 68 | bool disable_sysfs; |
| 71 | void *priv; | 69 | void *priv; |
| 72 | }; | 70 | }; |
| @@ -99,6 +97,23 @@ int func(unsigned int cpu) \ | |||
| 99 | struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); | 97 | struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); |
| 100 | int init_cache_level(unsigned int cpu); | 98 | int init_cache_level(unsigned int cpu); |
| 101 | int populate_cache_leaves(unsigned int cpu); | 99 | int populate_cache_leaves(unsigned int cpu); |
| 100 | int cache_setup_acpi(unsigned int cpu); | ||
| 101 | #ifndef CONFIG_ACPI_PPTT | ||
| 102 | /* | ||
| 103 | * acpi_find_last_cache_level is only called on ACPI enabled | ||
| 104 | * platforms using the PPTT for topology. This means that if | ||
| 105 | * the platform supports other firmware configuration methods | ||
| 106 | * we need to stub out the call when ACPI is disabled. | ||
| 107 | * ACPI enabled platforms not using PPTT won't be making calls | ||
| 108 | * to this function so we need not worry about them. | ||
| 109 | */ | ||
| 110 | static inline int acpi_find_last_cache_level(unsigned int cpu) | ||
| 111 | { | ||
| 112 | return 0; | ||
| 113 | } | ||
| 114 | #else | ||
| 115 | int acpi_find_last_cache_level(unsigned int cpu); | ||
| 116 | #endif | ||
| 102 | 117 | ||
| 103 | const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf); | 118 | const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf); |
| 104 | 119 | ||
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h index 7ecfc88314d8..4903deb0777a 100644 --- a/include/linux/ceph/ceph_fs.h +++ b/include/linux/ceph/ceph_fs.h | |||
| @@ -628,6 +628,7 @@ int ceph_flags_to_mode(int flags); | |||
| 628 | CEPH_CAP_XATTR_SHARED) | 628 | CEPH_CAP_XATTR_SHARED) |
| 629 | #define CEPH_STAT_CAP_INLINE_DATA (CEPH_CAP_FILE_SHARED | \ | 629 | #define CEPH_STAT_CAP_INLINE_DATA (CEPH_CAP_FILE_SHARED | \ |
| 630 | CEPH_CAP_FILE_RD) | 630 | CEPH_CAP_FILE_RD) |
| 631 | #define CEPH_STAT_RSTAT CEPH_CAP_FILE_WREXTEND | ||
| 631 | 632 | ||
| 632 | #define CEPH_CAP_ANY_SHARED (CEPH_CAP_AUTH_SHARED | \ | 633 | #define CEPH_CAP_ANY_SHARED (CEPH_CAP_AUTH_SHARED | \ |
| 633 | CEPH_CAP_LINK_SHARED | \ | 634 | CEPH_CAP_LINK_SHARED | \ |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 96bb32285989..0d6ee04b4c41 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -170,6 +170,7 @@ struct ceph_osd_request { | |||
| 170 | u64 r_tid; /* unique for this client */ | 170 | u64 r_tid; /* unique for this client */ |
| 171 | struct rb_node r_node; | 171 | struct rb_node r_node; |
| 172 | struct rb_node r_mc_node; /* map check */ | 172 | struct rb_node r_mc_node; /* map check */ |
| 173 | struct work_struct r_complete_work; | ||
| 173 | struct ceph_osd *r_osd; | 174 | struct ceph_osd *r_osd; |
| 174 | 175 | ||
| 175 | struct ceph_osd_request_target r_t; | 176 | struct ceph_osd_request_target r_t; |
| @@ -201,7 +202,6 @@ struct ceph_osd_request { | |||
| 201 | struct timespec r_mtime; /* ditto */ | 202 | struct timespec r_mtime; /* ditto */ |
| 202 | u64 r_data_offset; /* ditto */ | 203 | u64 r_data_offset; /* ditto */ |
| 203 | bool r_linger; /* don't resend on failure */ | 204 | bool r_linger; /* don't resend on failure */ |
| 204 | bool r_abort_on_full; /* return ENOSPC when full */ | ||
| 205 | 205 | ||
| 206 | /* internal */ | 206 | /* internal */ |
| 207 | unsigned long r_stamp; /* jiffies, send or check time */ | 207 | unsigned long r_stamp; /* jiffies, send or check time */ |
| @@ -347,6 +347,8 @@ struct ceph_osd_client { | |||
| 347 | struct rb_root linger_map_checks; | 347 | struct rb_root linger_map_checks; |
| 348 | atomic_t num_requests; | 348 | atomic_t num_requests; |
| 349 | atomic_t num_homeless; | 349 | atomic_t num_homeless; |
| 350 | bool abort_on_full; /* abort w/ ENOSPC when full */ | ||
| 351 | int abort_err; | ||
| 350 | struct delayed_work timeout_work; | 352 | struct delayed_work timeout_work; |
| 351 | struct delayed_work osds_timeout_work; | 353 | struct delayed_work osds_timeout_work; |
| 352 | #ifdef CONFIG_DEBUG_FS | 354 | #ifdef CONFIG_DEBUG_FS |
| @@ -359,6 +361,7 @@ struct ceph_osd_client { | |||
| 359 | struct ceph_msgpool msgpool_op_reply; | 361 | struct ceph_msgpool msgpool_op_reply; |
| 360 | 362 | ||
| 361 | struct workqueue_struct *notify_wq; | 363 | struct workqueue_struct *notify_wq; |
| 364 | struct workqueue_struct *completion_wq; | ||
| 362 | }; | 365 | }; |
| 363 | 366 | ||
| 364 | static inline bool ceph_osdmap_flag(struct ceph_osd_client *osdc, int flag) | 367 | static inline bool ceph_osdmap_flag(struct ceph_osd_client *osdc, int flag) |
| @@ -378,6 +381,7 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc, | |||
| 378 | extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc, | 381 | extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc, |
| 379 | struct ceph_msg *msg); | 382 | struct ceph_msg *msg); |
| 380 | void ceph_osdc_update_epoch_barrier(struct ceph_osd_client *osdc, u32 eb); | 383 | void ceph_osdc_update_epoch_barrier(struct ceph_osd_client *osdc, u32 eb); |
| 384 | void ceph_osdc_abort_requests(struct ceph_osd_client *osdc, int err); | ||
| 381 | 385 | ||
| 382 | extern void osd_req_op_init(struct ceph_osd_request *osd_req, | 386 | extern void osd_req_op_init(struct ceph_osd_request *osd_req, |
| 383 | unsigned int which, u16 opcode, u32 flags); | 387 | unsigned int which, u16 opcode, u32 flags); |
| @@ -440,7 +444,7 @@ extern void osd_req_op_cls_response_data_pages(struct ceph_osd_request *, | |||
| 440 | struct page **pages, u64 length, | 444 | struct page **pages, u64 length, |
| 441 | u32 alignment, bool pages_from_pool, | 445 | u32 alignment, bool pages_from_pool, |
| 442 | bool own_pages); | 446 | bool own_pages); |
| 443 | extern void osd_req_op_cls_init(struct ceph_osd_request *osd_req, | 447 | extern int osd_req_op_cls_init(struct ceph_osd_request *osd_req, |
| 444 | unsigned int which, u16 opcode, | 448 | unsigned int which, u16 opcode, |
| 445 | const char *class, const char *method); | 449 | const char *class, const char *method); |
| 446 | extern int osd_req_op_xattr_init(struct ceph_osd_request *osd_req, unsigned int which, | 450 | extern int osd_req_op_xattr_init(struct ceph_osd_request *osd_req, unsigned int which, |
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index e71fb222c7c3..5675b1f09bc5 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
| @@ -279,10 +279,10 @@ bool ceph_osds_changed(const struct ceph_osds *old_acting, | |||
| 279 | const struct ceph_osds *new_acting, | 279 | const struct ceph_osds *new_acting, |
| 280 | bool any_change); | 280 | bool any_change); |
| 281 | 281 | ||
| 282 | int __ceph_object_locator_to_pg(struct ceph_pg_pool_info *pi, | 282 | void __ceph_object_locator_to_pg(struct ceph_pg_pool_info *pi, |
| 283 | const struct ceph_object_id *oid, | 283 | const struct ceph_object_id *oid, |
| 284 | const struct ceph_object_locator *oloc, | 284 | const struct ceph_object_locator *oloc, |
| 285 | struct ceph_pg *raw_pgid); | 285 | struct ceph_pg *raw_pgid); |
| 286 | int ceph_object_locator_to_pg(struct ceph_osdmap *osdmap, | 286 | int ceph_object_locator_to_pg(struct ceph_osdmap *osdmap, |
| 287 | const struct ceph_object_id *oid, | 287 | const struct ceph_object_id *oid, |
| 288 | const struct ceph_object_locator *oloc, | 288 | const struct ceph_object_locator *oloc, |
diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index 7cf262a421c3..b3233e8202f9 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* | 2 | /* |
| 3 | * See Documentation/circular-buffers.txt for more information. | 3 | * See Documentation/core-api/circular-buffers.rst for more information. |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef _LINUX_CIRC_BUF_H | 6 | #ifndef _LINUX_CIRC_BUF_H |
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 1d25e149c1c5..b7cfa037e593 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | #include <linux/of_clk.h> | ||
| 16 | 17 | ||
| 17 | #ifdef CONFIG_COMMON_CLK | 18 | #ifdef CONFIG_COMMON_CLK |
| 18 | 19 | ||
| @@ -218,7 +219,7 @@ struct clk_ops { | |||
| 218 | int (*get_phase)(struct clk_hw *hw); | 219 | int (*get_phase)(struct clk_hw *hw); |
| 219 | int (*set_phase)(struct clk_hw *hw, int degrees); | 220 | int (*set_phase)(struct clk_hw *hw, int degrees); |
| 220 | void (*init)(struct clk_hw *hw); | 221 | void (*init)(struct clk_hw *hw); |
| 221 | int (*debug_init)(struct clk_hw *hw, struct dentry *dentry); | 222 | void (*debug_init)(struct clk_hw *hw, struct dentry *dentry); |
| 222 | }; | 223 | }; |
| 223 | 224 | ||
| 224 | /** | 225 | /** |
| @@ -805,8 +806,6 @@ unsigned long clk_hw_round_rate(struct clk_hw *hw, unsigned long rate); | |||
| 805 | 806 | ||
| 806 | struct of_device_id; | 807 | struct of_device_id; |
| 807 | 808 | ||
| 808 | typedef void (*of_clk_init_cb_t)(struct device_node *); | ||
| 809 | |||
| 810 | struct clk_onecell_data { | 809 | struct clk_onecell_data { |
| 811 | struct clk **clks; | 810 | struct clk **clks; |
| 812 | unsigned int clk_num; | 811 | unsigned int clk_num; |
| @@ -893,13 +892,10 @@ struct clk_hw *of_clk_hw_simple_get(struct of_phandle_args *clkspec, | |||
| 893 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); | 892 | struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); |
| 894 | struct clk_hw *of_clk_hw_onecell_get(struct of_phandle_args *clkspec, | 893 | struct clk_hw *of_clk_hw_onecell_get(struct of_phandle_args *clkspec, |
| 895 | void *data); | 894 | void *data); |
| 896 | unsigned int of_clk_get_parent_count(struct device_node *np); | ||
| 897 | int of_clk_parent_fill(struct device_node *np, const char **parents, | 895 | int of_clk_parent_fill(struct device_node *np, const char **parents, |
| 898 | unsigned int size); | 896 | unsigned int size); |
| 899 | const char *of_clk_get_parent_name(struct device_node *np, int index); | ||
| 900 | int of_clk_detect_critical(struct device_node *np, int index, | 897 | int of_clk_detect_critical(struct device_node *np, int index, |
| 901 | unsigned long *flags); | 898 | unsigned long *flags); |
| 902 | void of_clk_init(const struct of_device_id *matches); | ||
| 903 | 899 | ||
| 904 | #else /* !CONFIG_OF */ | 900 | #else /* !CONFIG_OF */ |
| 905 | 901 | ||
| @@ -946,26 +942,16 @@ of_clk_hw_onecell_get(struct of_phandle_args *clkspec, void *data) | |||
| 946 | { | 942 | { |
| 947 | return ERR_PTR(-ENOENT); | 943 | return ERR_PTR(-ENOENT); |
| 948 | } | 944 | } |
| 949 | static inline unsigned int of_clk_get_parent_count(struct device_node *np) | ||
| 950 | { | ||
| 951 | return 0; | ||
| 952 | } | ||
| 953 | static inline int of_clk_parent_fill(struct device_node *np, | 945 | static inline int of_clk_parent_fill(struct device_node *np, |
| 954 | const char **parents, unsigned int size) | 946 | const char **parents, unsigned int size) |
| 955 | { | 947 | { |
| 956 | return 0; | 948 | return 0; |
| 957 | } | 949 | } |
| 958 | static inline const char *of_clk_get_parent_name(struct device_node *np, | ||
| 959 | int index) | ||
| 960 | { | ||
| 961 | return NULL; | ||
| 962 | } | ||
| 963 | static inline int of_clk_detect_critical(struct device_node *np, int index, | 950 | static inline int of_clk_detect_critical(struct device_node *np, int index, |
| 964 | unsigned long *flags) | 951 | unsigned long *flags) |
| 965 | { | 952 | { |
| 966 | return 0; | 953 | return 0; |
| 967 | } | 954 | } |
| 968 | static inline void of_clk_init(const struct of_device_id *matches) {} | ||
| 969 | #endif /* CONFIG_OF */ | 955 | #endif /* CONFIG_OF */ |
| 970 | 956 | ||
| 971 | /* | 957 | /* |
| @@ -999,10 +985,5 @@ static inline void clk_writel(u32 val, u32 __iomem *reg) | |||
| 999 | 985 | ||
| 1000 | #endif /* platform dependent I/O accessors */ | 986 | #endif /* platform dependent I/O accessors */ |
| 1001 | 987 | ||
| 1002 | #ifdef CONFIG_DEBUG_FS | ||
| 1003 | struct dentry *clk_debugfs_add_file(struct clk_hw *hw, char *name, umode_t mode, | ||
| 1004 | void *data, const struct file_operations *fops); | ||
| 1005 | #endif | ||
| 1006 | |||
| 1007 | #endif /* CONFIG_COMMON_CLK */ | 988 | #endif /* CONFIG_COMMON_CLK */ |
| 1008 | #endif /* CLK_PROVIDER_H */ | 989 | #endif /* CLK_PROVIDER_H */ |
diff --git a/include/linux/clk/davinci.h b/include/linux/clk/davinci.h new file mode 100644 index 000000000000..8a7b5cd7eac0 --- /dev/null +++ b/include/linux/clk/davinci.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0 | ||
| 2 | /* | ||
| 3 | * Clock drivers for TI DaVinci PLL and PSC controllers | ||
| 4 | * | ||
| 5 | * Copyright (C) 2018 David Lechner <david@lechnology.com> | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef __LINUX_CLK_DAVINCI_PLL_H___ | ||
| 9 | #define __LINUX_CLK_DAVINCI_PLL_H___ | ||
| 10 | |||
| 11 | #include <linux/device.h> | ||
| 12 | #include <linux/regmap.h> | ||
| 13 | |||
| 14 | /* function for registering clocks in early boot */ | ||
| 15 | |||
| 16 | #ifdef CONFIG_ARCH_DAVINCI_DA830 | ||
| 17 | int da830_pll_init(struct device *dev, void __iomem *base, struct regmap *cfgchip); | ||
| 18 | #endif | ||
| 19 | #ifdef CONFIG_ARCH_DAVINCI_DA850 | ||
| 20 | int da850_pll0_init(struct device *dev, void __iomem *base, struct regmap *cfgchip); | ||
| 21 | #endif | ||
| 22 | #ifdef CONFIG_ARCH_DAVINCI_DM355 | ||
| 23 | int dm355_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip); | ||
| 24 | int dm355_psc_init(struct device *dev, void __iomem *base); | ||
| 25 | #endif | ||
| 26 | #ifdef CONFIG_ARCH_DAVINCI_DM365 | ||
| 27 | int dm365_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip); | ||
| 28 | int dm365_pll2_init(struct device *dev, void __iomem *base, struct regmap *cfgchip); | ||
| 29 | int dm365_psc_init(struct device *dev, void __iomem *base); | ||
| 30 | #endif | ||
| 31 | #ifdef CONFIG_ARCH_DAVINCI_DM644x | ||
| 32 | int dm644x_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip); | ||
| 33 | int dm644x_psc_init(struct device *dev, void __iomem *base); | ||
| 34 | #endif | ||
| 35 | #ifdef CONFIG_ARCH_DAVINCI_DM646x | ||
| 36 | int dm646x_pll1_init(struct device *dev, void __iomem *base, struct regmap *cfgchip); | ||
| 37 | int dm646x_psc_init(struct device *dev, void __iomem *base); | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #endif /* __LINUX_CLK_DAVINCI_PLL_H___ */ | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index b1a5562b3215..c68acc47da57 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -72,6 +72,9 @@ | |||
| 72 | */ | 72 | */ |
| 73 | #ifndef COMPAT_SYSCALL_DEFINEx | 73 | #ifndef COMPAT_SYSCALL_DEFINEx |
| 74 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | 74 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ |
| 75 | __diag_push(); \ | ||
| 76 | __diag_ignore(GCC, 8, "-Wattribute-alias", \ | ||
| 77 | "Type aliasing is used to sanitize syscall arguments");\ | ||
| 75 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ | 78 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ |
| 76 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ | 79 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ |
| 77 | __attribute__((alias(__stringify(__se_compat_sys##name)))); \ | 80 | __attribute__((alias(__stringify(__se_compat_sys##name)))); \ |
| @@ -80,8 +83,11 @@ | |||
| 80 | asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ | 83 | asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ |
| 81 | asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ | 84 | asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ |
| 82 | { \ | 85 | { \ |
| 83 | return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ | 86 | long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ |
| 87 | __MAP(x,__SC_TEST,__VA_ARGS__); \ | ||
| 88 | return ret; \ | ||
| 84 | } \ | 89 | } \ |
| 90 | __diag_pop(); \ | ||
| 85 | static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) | 91 | static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
| 86 | #endif /* COMPAT_SYSCALL_DEFINEx */ | 92 | #endif /* COMPAT_SYSCALL_DEFINEx */ |
| 87 | 93 | ||
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index f1a7492a5cc8..573f5a7d42d4 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -66,25 +66,40 @@ | |||
| 66 | #endif | 66 | #endif |
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * Feature detection for gnu_inline (gnu89 extern inline semantics). Either | ||
| 70 | * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics, | ||
| 71 | * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not | ||
| 72 | * defined so the gnu89 semantics are the default. | ||
| 73 | */ | ||
| 74 | #ifdef __GNUC_STDC_INLINE__ | ||
| 75 | # define __gnu_inline __attribute__((gnu_inline)) | ||
| 76 | #else | ||
| 77 | # define __gnu_inline | ||
| 78 | #endif | ||
| 79 | |||
| 80 | /* | ||
| 69 | * Force always-inline if the user requests it so via the .config, | 81 | * Force always-inline if the user requests it so via the .config, |
| 70 | * or if gcc is too old. | 82 | * or if gcc is too old. |
| 71 | * GCC does not warn about unused static inline functions for | 83 | * GCC does not warn about unused static inline functions for |
| 72 | * -Wunused-function. This turns out to avoid the need for complex #ifdef | 84 | * -Wunused-function. This turns out to avoid the need for complex #ifdef |
| 73 | * directives. Suppress the warning in clang as well by using "unused" | 85 | * directives. Suppress the warning in clang as well by using "unused" |
| 74 | * function attribute, which is redundant but not harmful for gcc. | 86 | * function attribute, which is redundant but not harmful for gcc. |
| 87 | * Prefer gnu_inline, so that extern inline functions do not emit an | ||
| 88 | * externally visible function. This makes extern inline behave as per gnu89 | ||
| 89 | * semantics rather than c99. This prevents multiple symbol definition errors | ||
| 90 | * of extern inline functions at link time. | ||
| 91 | * A lot of inline functions can cause havoc with function tracing. | ||
| 75 | */ | 92 | */ |
| 76 | #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ | 93 | #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ |
| 77 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) | 94 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) |
| 78 | #define inline inline __attribute__((always_inline,unused)) notrace | 95 | #define inline \ |
| 79 | #define __inline__ __inline__ __attribute__((always_inline,unused)) notrace | 96 | inline __attribute__((always_inline, unused)) notrace __gnu_inline |
| 80 | #define __inline __inline __attribute__((always_inline,unused)) notrace | ||
| 81 | #else | 97 | #else |
| 82 | /* A lot of inline functions can cause havoc with function tracing */ | 98 | #define inline inline __attribute__((unused)) notrace __gnu_inline |
| 83 | #define inline inline __attribute__((unused)) notrace | ||
| 84 | #define __inline__ __inline__ __attribute__((unused)) notrace | ||
| 85 | #define __inline __inline __attribute__((unused)) notrace | ||
| 86 | #endif | 99 | #endif |
| 87 | 100 | ||
| 101 | #define __inline__ inline | ||
| 102 | #define __inline inline | ||
| 88 | #define __always_inline inline __attribute__((always_inline)) | 103 | #define __always_inline inline __attribute__((always_inline)) |
| 89 | #define noinline __attribute__((noinline)) | 104 | #define noinline __attribute__((noinline)) |
| 90 | 105 | ||
| @@ -347,3 +362,28 @@ | |||
| 347 | #if GCC_VERSION >= 50100 | 362 | #if GCC_VERSION >= 50100 |
| 348 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 | 363 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 |
| 349 | #endif | 364 | #endif |
| 365 | |||
| 366 | /* | ||
| 367 | * Turn individual warnings and errors on and off locally, depending | ||
| 368 | * on version. | ||
| 369 | */ | ||
| 370 | #define __diag_GCC(version, severity, s) \ | ||
| 371 | __diag_GCC_ ## version(__diag_GCC_ ## severity s) | ||
| 372 | |||
| 373 | /* Severity used in pragma directives */ | ||
| 374 | #define __diag_GCC_ignore ignored | ||
| 375 | #define __diag_GCC_warn warning | ||
| 376 | #define __diag_GCC_error error | ||
| 377 | |||
| 378 | /* Compilers before gcc-4.6 do not understand "#pragma GCC diagnostic push" */ | ||
| 379 | #if GCC_VERSION >= 40600 | ||
| 380 | #define __diag_str1(s) #s | ||
| 381 | #define __diag_str(s) __diag_str1(s) | ||
| 382 | #define __diag(s) _Pragma(__diag_str(GCC diagnostic s)) | ||
| 383 | #endif | ||
| 384 | |||
| 385 | #if GCC_VERSION >= 80000 | ||
| 386 | #define __diag_GCC_8(s) __diag(s) | ||
| 387 | #else | ||
| 388 | #define __diag_GCC_8(s) | ||
| 389 | #endif | ||
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 6b79a9bba9a7..a8ba6b04152c 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h | |||
| @@ -271,4 +271,22 @@ struct ftrace_likely_data { | |||
| 271 | # define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | 271 | # define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) |
| 272 | #endif | 272 | #endif |
| 273 | 273 | ||
| 274 | #ifndef __diag | ||
| 275 | #define __diag(string) | ||
| 276 | #endif | ||
| 277 | |||
| 278 | #ifndef __diag_GCC | ||
| 279 | #define __diag_GCC(version, severity, string) | ||
| 280 | #endif | ||
| 281 | |||
| 282 | #define __diag_push() __diag(push) | ||
| 283 | #define __diag_pop() __diag(pop) | ||
| 284 | |||
| 285 | #define __diag_ignore(compiler, version, option, comment) \ | ||
| 286 | __diag_ ## compiler(version, ignore, option) | ||
| 287 | #define __diag_warn(compiler, version, option, comment) \ | ||
| 288 | __diag_ ## compiler(version, warn, option) | ||
| 289 | #define __diag_error(compiler, version, option, comment) \ | ||
| 290 | __diag_ ## compiler(version, error, option) | ||
| 291 | |||
| 274 | #endif /* __LINUX_COMPILER_TYPES_H */ | 292 | #endif /* __LINUX_COMPILER_TYPES_H */ |
diff --git a/include/linux/dax.h b/include/linux/dax.h index 88504e87cd6c..deb0f663252f 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h | |||
| @@ -20,6 +20,9 @@ struct dax_operations { | |||
| 20 | /* copy_from_iter: required operation for fs-dax direct-i/o */ | 20 | /* copy_from_iter: required operation for fs-dax direct-i/o */ |
| 21 | size_t (*copy_from_iter)(struct dax_device *, pgoff_t, void *, size_t, | 21 | size_t (*copy_from_iter)(struct dax_device *, pgoff_t, void *, size_t, |
| 22 | struct iov_iter *); | 22 | struct iov_iter *); |
| 23 | /* copy_to_iter: required operation for fs-dax direct-i/o */ | ||
| 24 | size_t (*copy_to_iter)(struct dax_device *, pgoff_t, void *, size_t, | ||
| 25 | struct iov_iter *); | ||
| 23 | }; | 26 | }; |
| 24 | 27 | ||
| 25 | extern struct attribute_group dax_attribute_group; | 28 | extern struct attribute_group dax_attribute_group; |
| @@ -83,6 +86,8 @@ static inline void fs_put_dax(struct dax_device *dax_dev) | |||
| 83 | struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev); | 86 | struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev); |
| 84 | int dax_writeback_mapping_range(struct address_space *mapping, | 87 | int dax_writeback_mapping_range(struct address_space *mapping, |
| 85 | struct block_device *bdev, struct writeback_control *wbc); | 88 | struct block_device *bdev, struct writeback_control *wbc); |
| 89 | |||
| 90 | struct page *dax_layout_busy_page(struct address_space *mapping); | ||
| 86 | #else | 91 | #else |
| 87 | static inline bool bdev_dax_supported(struct block_device *bdev, | 92 | static inline bool bdev_dax_supported(struct block_device *bdev, |
| 88 | int blocksize) | 93 | int blocksize) |
| @@ -104,6 +109,11 @@ static inline struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev) | |||
| 104 | return NULL; | 109 | return NULL; |
| 105 | } | 110 | } |
| 106 | 111 | ||
| 112 | static inline struct page *dax_layout_busy_page(struct address_space *mapping) | ||
| 113 | { | ||
| 114 | return NULL; | ||
| 115 | } | ||
| 116 | |||
| 107 | static inline int dax_writeback_mapping_range(struct address_space *mapping, | 117 | static inline int dax_writeback_mapping_range(struct address_space *mapping, |
| 108 | struct block_device *bdev, struct writeback_control *wbc) | 118 | struct block_device *bdev, struct writeback_control *wbc) |
| 109 | { | 119 | { |
| @@ -119,11 +129,13 @@ long dax_direct_access(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages, | |||
| 119 | void **kaddr, pfn_t *pfn); | 129 | void **kaddr, pfn_t *pfn); |
| 120 | size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, | 130 | size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, |
| 121 | size_t bytes, struct iov_iter *i); | 131 | size_t bytes, struct iov_iter *i); |
| 132 | size_t dax_copy_to_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, | ||
| 133 | size_t bytes, struct iov_iter *i); | ||
| 122 | void dax_flush(struct dax_device *dax_dev, void *addr, size_t size); | 134 | void dax_flush(struct dax_device *dax_dev, void *addr, size_t size); |
| 123 | 135 | ||
| 124 | ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, | 136 | ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, |
| 125 | const struct iomap_ops *ops); | 137 | const struct iomap_ops *ops); |
| 126 | int dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size, | 138 | vm_fault_t dax_iomap_fault(struct vm_fault *vmf, enum page_entry_size pe_size, |
| 127 | pfn_t *pfnp, int *errp, const struct iomap_ops *ops); | 139 | pfn_t *pfnp, int *errp, const struct iomap_ops *ops); |
| 128 | vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf, | 140 | vm_fault_t dax_finish_sync_fault(struct vm_fault *vmf, |
| 129 | enum page_entry_size pe_size, pfn_t pfn); | 141 | enum page_entry_size pe_size, pfn_t pfn); |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 31fef7c34185..6fb0808e87c8 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -133,7 +133,7 @@ typedef int (*dm_busy_fn) (struct dm_target *ti); | |||
| 133 | */ | 133 | */ |
| 134 | typedef long (*dm_dax_direct_access_fn) (struct dm_target *ti, pgoff_t pgoff, | 134 | typedef long (*dm_dax_direct_access_fn) (struct dm_target *ti, pgoff_t pgoff, |
| 135 | long nr_pages, void **kaddr, pfn_t *pfn); | 135 | long nr_pages, void **kaddr, pfn_t *pfn); |
| 136 | typedef size_t (*dm_dax_copy_from_iter_fn)(struct dm_target *ti, pgoff_t pgoff, | 136 | typedef size_t (*dm_dax_copy_iter_fn)(struct dm_target *ti, pgoff_t pgoff, |
| 137 | void *addr, size_t bytes, struct iov_iter *i); | 137 | void *addr, size_t bytes, struct iov_iter *i); |
| 138 | #define PAGE_SECTORS (PAGE_SIZE / 512) | 138 | #define PAGE_SECTORS (PAGE_SIZE / 512) |
| 139 | 139 | ||
| @@ -184,7 +184,8 @@ struct target_type { | |||
| 184 | dm_iterate_devices_fn iterate_devices; | 184 | dm_iterate_devices_fn iterate_devices; |
| 185 | dm_io_hints_fn io_hints; | 185 | dm_io_hints_fn io_hints; |
| 186 | dm_dax_direct_access_fn direct_access; | 186 | dm_dax_direct_access_fn direct_access; |
| 187 | dm_dax_copy_from_iter_fn dax_copy_from_iter; | 187 | dm_dax_copy_iter_fn dax_copy_from_iter; |
| 188 | dm_dax_copy_iter_fn dax_copy_to_iter; | ||
| 188 | 189 | ||
| 189 | /* For internal device-mapper use. */ | 190 | /* For internal device-mapper use. */ |
| 190 | struct list_head list; | 191 | struct list_head list; |
diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h index b67bf6ac907d..3c5a4cb3eb95 100644 --- a/include/linux/dma-contiguous.h +++ b/include/linux/dma-contiguous.h | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | * CMA should not be used by the device drivers directly. It is | 48 | * CMA should not be used by the device drivers directly. It is |
| 49 | * only a helper framework for dma-mapping subsystem. | 49 | * only a helper framework for dma-mapping subsystem. |
| 50 | * | 50 | * |
| 51 | * For more information, see kernel-docs in drivers/base/dma-contiguous.c | 51 | * For more information, see kernel-docs in kernel/dma/contiguous.c |
| 52 | */ | 52 | */ |
| 53 | 53 | ||
| 54 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
diff --git a/include/linux/dma/sprd-dma.h b/include/linux/dma/sprd-dma.h new file mode 100644 index 000000000000..b0115e340fbc --- /dev/null +++ b/include/linux/dma/sprd-dma.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | |||
| 3 | #ifndef _SPRD_DMA_H_ | ||
| 4 | #define _SPRD_DMA_H_ | ||
| 5 | |||
| 6 | #define SPRD_DMA_REQ_SHIFT 16 | ||
| 7 | #define SPRD_DMA_FLAGS(req_mode, int_type) \ | ||
| 8 | ((req_mode) << SPRD_DMA_REQ_SHIFT | (int_type)) | ||
| 9 | |||
| 10 | /* | ||
| 11 | * enum sprd_dma_req_mode: define the DMA request mode | ||
| 12 | * @SPRD_DMA_FRAG_REQ: fragment request mode | ||
| 13 | * @SPRD_DMA_BLK_REQ: block request mode | ||
| 14 | * @SPRD_DMA_TRANS_REQ: transaction request mode | ||
| 15 | * @SPRD_DMA_LIST_REQ: link-list request mode | ||
| 16 | * | ||
| 17 | * We have 4 types request mode: fragment mode, block mode, transaction mode | ||
| 18 | * and linklist mode. One transaction can contain several blocks, one block can | ||
| 19 | * contain several fragments. Link-list mode means we can save several DMA | ||
| 20 | * configuration into one reserved memory, then DMA can fetch each DMA | ||
| 21 | * configuration automatically to start transfer. | ||
| 22 | */ | ||
| 23 | enum sprd_dma_req_mode { | ||
| 24 | SPRD_DMA_FRAG_REQ, | ||
| 25 | SPRD_DMA_BLK_REQ, | ||
| 26 | SPRD_DMA_TRANS_REQ, | ||
| 27 | SPRD_DMA_LIST_REQ, | ||
| 28 | }; | ||
| 29 | |||
| 30 | /* | ||
| 31 | * enum sprd_dma_int_type: define the DMA interrupt type | ||
| 32 | * @SPRD_DMA_NO_INT: do not need generate DMA interrupts. | ||
| 33 | * @SPRD_DMA_FRAG_INT: fragment done interrupt when one fragment request | ||
| 34 | * is done. | ||
| 35 | * @SPRD_DMA_BLK_INT: block done interrupt when one block request is done. | ||
| 36 | * @SPRD_DMA_BLK_FRAG_INT: block and fragment interrupt when one fragment | ||
| 37 | * or one block request is done. | ||
| 38 | * @SPRD_DMA_TRANS_INT: tansaction done interrupt when one transaction | ||
| 39 | * request is done. | ||
| 40 | * @SPRD_DMA_TRANS_FRAG_INT: transaction and fragment interrupt when one | ||
| 41 | * transaction request or fragment request is done. | ||
| 42 | * @SPRD_DMA_TRANS_BLK_INT: transaction and block interrupt when one | ||
| 43 | * transaction request or block request is done. | ||
| 44 | * @SPRD_DMA_LIST_INT: link-list done interrupt when one link-list request | ||
| 45 | * is done. | ||
| 46 | * @SPRD_DMA_CFGERR_INT: configure error interrupt when configuration is | ||
| 47 | * incorrect. | ||
| 48 | */ | ||
| 49 | enum sprd_dma_int_type { | ||
| 50 | SPRD_DMA_NO_INT, | ||
| 51 | SPRD_DMA_FRAG_INT, | ||
| 52 | SPRD_DMA_BLK_INT, | ||
| 53 | SPRD_DMA_BLK_FRAG_INT, | ||
| 54 | SPRD_DMA_TRANS_INT, | ||
| 55 | SPRD_DMA_TRANS_FRAG_INT, | ||
| 56 | SPRD_DMA_TRANS_BLK_INT, | ||
| 57 | SPRD_DMA_LIST_INT, | ||
| 58 | SPRD_DMA_CFGERR_INT, | ||
| 59 | }; | ||
| 60 | |||
| 61 | #endif | ||
diff --git a/include/linux/filter.h b/include/linux/filter.h index 45fc0f5000d8..300baad62c88 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/cryptohash.h> | 19 | #include <linux/cryptohash.h> |
| 20 | #include <linux/set_memory.h> | 20 | #include <linux/set_memory.h> |
| 21 | #include <linux/kallsyms.h> | 21 | #include <linux/kallsyms.h> |
| 22 | #include <linux/if_vlan.h> | ||
| 22 | 23 | ||
| 23 | #include <net/sch_generic.h> | 24 | #include <net/sch_generic.h> |
| 24 | 25 | ||
| @@ -469,15 +470,16 @@ struct sock_fprog_kern { | |||
| 469 | }; | 470 | }; |
| 470 | 471 | ||
| 471 | struct bpf_binary_header { | 472 | struct bpf_binary_header { |
| 472 | unsigned int pages; | 473 | u32 pages; |
| 473 | u8 image[]; | 474 | /* Some arches need word alignment for their instructions */ |
| 475 | u8 image[] __aligned(4); | ||
| 474 | }; | 476 | }; |
| 475 | 477 | ||
| 476 | struct bpf_prog { | 478 | struct bpf_prog { |
| 477 | u16 pages; /* Number of allocated pages */ | 479 | u16 pages; /* Number of allocated pages */ |
| 478 | u16 jited:1, /* Is our filter JIT'ed? */ | 480 | u16 jited:1, /* Is our filter JIT'ed? */ |
| 479 | jit_requested:1,/* archs need to JIT the prog */ | 481 | jit_requested:1,/* archs need to JIT the prog */ |
| 480 | locked:1, /* Program image locked? */ | 482 | undo_set_mem:1, /* Passed set_memory_ro() checkpoint */ |
| 481 | gpl_compatible:1, /* Is filter GPL compatible? */ | 483 | gpl_compatible:1, /* Is filter GPL compatible? */ |
| 482 | cb_access:1, /* Is control block accessed? */ | 484 | cb_access:1, /* Is control block accessed? */ |
| 483 | dst_needed:1, /* Do we need dst entry? */ | 485 | dst_needed:1, /* Do we need dst entry? */ |
| @@ -671,50 +673,27 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default) | |||
| 671 | 673 | ||
| 672 | #define bpf_classic_proglen(fprog) (fprog->len * sizeof(fprog->filter[0])) | 674 | #define bpf_classic_proglen(fprog) (fprog->len * sizeof(fprog->filter[0])) |
| 673 | 675 | ||
| 674 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | ||
| 675 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) | ||
| 676 | { | ||
| 677 | fp->locked = 1; | ||
| 678 | WARN_ON_ONCE(set_memory_ro((unsigned long)fp, fp->pages)); | ||
| 679 | } | ||
| 680 | |||
| 681 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) | ||
| 682 | { | ||
| 683 | if (fp->locked) { | ||
| 684 | WARN_ON_ONCE(set_memory_rw((unsigned long)fp, fp->pages)); | ||
| 685 | /* In case set_memory_rw() fails, we want to be the first | ||
| 686 | * to crash here instead of some random place later on. | ||
| 687 | */ | ||
| 688 | fp->locked = 0; | ||
| 689 | } | ||
| 690 | } | ||
| 691 | |||
| 692 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) | ||
| 693 | { | ||
| 694 | WARN_ON_ONCE(set_memory_ro((unsigned long)hdr, hdr->pages)); | ||
| 695 | } | ||
| 696 | |||
| 697 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) | ||
| 698 | { | ||
| 699 | WARN_ON_ONCE(set_memory_rw((unsigned long)hdr, hdr->pages)); | ||
| 700 | } | ||
| 701 | #else | ||
| 702 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) | 676 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) |
| 703 | { | 677 | { |
| 678 | fp->undo_set_mem = 1; | ||
| 679 | set_memory_ro((unsigned long)fp, fp->pages); | ||
| 704 | } | 680 | } |
| 705 | 681 | ||
| 706 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) | 682 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) |
| 707 | { | 683 | { |
| 684 | if (fp->undo_set_mem) | ||
| 685 | set_memory_rw((unsigned long)fp, fp->pages); | ||
| 708 | } | 686 | } |
| 709 | 687 | ||
| 710 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) | 688 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) |
| 711 | { | 689 | { |
| 690 | set_memory_ro((unsigned long)hdr, hdr->pages); | ||
| 712 | } | 691 | } |
| 713 | 692 | ||
| 714 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) | 693 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) |
| 715 | { | 694 | { |
| 695 | set_memory_rw((unsigned long)hdr, hdr->pages); | ||
| 716 | } | 696 | } |
| 717 | #endif /* CONFIG_ARCH_HAS_SET_MEMORY */ | ||
| 718 | 697 | ||
| 719 | static inline struct bpf_binary_header * | 698 | static inline struct bpf_binary_header * |
| 720 | bpf_jit_binary_hdr(const struct bpf_prog *fp) | 699 | bpf_jit_binary_hdr(const struct bpf_prog *fp) |
| @@ -786,6 +765,21 @@ static inline bool bpf_dump_raw_ok(void) | |||
| 786 | struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, | 765 | struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, |
| 787 | const struct bpf_insn *patch, u32 len); | 766 | const struct bpf_insn *patch, u32 len); |
| 788 | 767 | ||
| 768 | static inline int __xdp_generic_ok_fwd_dev(struct sk_buff *skb, | ||
| 769 | struct net_device *fwd) | ||
| 770 | { | ||
| 771 | unsigned int len; | ||
| 772 | |||
| 773 | if (unlikely(!(fwd->flags & IFF_UP))) | ||
| 774 | return -ENETDOWN; | ||
| 775 | |||
| 776 | len = fwd->mtu + fwd->hard_header_len + VLAN_HLEN; | ||
| 777 | if (skb->len > len) | ||
| 778 | return -EMSGSIZE; | ||
| 779 | |||
| 780 | return 0; | ||
| 781 | } | ||
| 782 | |||
| 789 | /* The pair of xdp_do_redirect and xdp_do_flush_map MUST be called in the | 783 | /* The pair of xdp_do_redirect and xdp_do_flush_map MUST be called in the |
| 790 | * same cpu context. Further for best results no more than a single map | 784 | * same cpu context. Further for best results no more than a single map |
| 791 | * for the do_redirect/do_flush pair should be used. This limitation is | 785 | * for the do_redirect/do_flush pair should be used. This limitation is |
| @@ -961,6 +955,9 @@ static inline void bpf_prog_kallsyms_del(struct bpf_prog *fp) | |||
| 961 | } | 955 | } |
| 962 | #endif /* CONFIG_BPF_JIT */ | 956 | #endif /* CONFIG_BPF_JIT */ |
| 963 | 957 | ||
| 958 | void bpf_prog_kallsyms_del_subprogs(struct bpf_prog *fp); | ||
| 959 | void bpf_prog_kallsyms_del_all(struct bpf_prog *fp); | ||
| 960 | |||
| 964 | #define BPF_ANC BIT(15) | 961 | #define BPF_ANC BIT(15) |
| 965 | 962 | ||
| 966 | static inline bool bpf_needs_clear_a(const struct sock_filter *first) | 963 | static inline bool bpf_needs_clear_a(const struct sock_filter *first) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7207de8c4e9a..d78d146a98da 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -207,9 +207,9 @@ struct iattr { | |||
| 207 | kuid_t ia_uid; | 207 | kuid_t ia_uid; |
| 208 | kgid_t ia_gid; | 208 | kgid_t ia_gid; |
| 209 | loff_t ia_size; | 209 | loff_t ia_size; |
| 210 | struct timespec ia_atime; | 210 | struct timespec64 ia_atime; |
| 211 | struct timespec ia_mtime; | 211 | struct timespec64 ia_mtime; |
| 212 | struct timespec ia_ctime; | 212 | struct timespec64 ia_ctime; |
| 213 | 213 | ||
| 214 | /* | 214 | /* |
| 215 | * Not an attribute, but an auxiliary info for filesystems wanting to | 215 | * Not an attribute, but an auxiliary info for filesystems wanting to |
| @@ -604,9 +604,9 @@ struct inode { | |||
| 604 | }; | 604 | }; |
| 605 | dev_t i_rdev; | 605 | dev_t i_rdev; |
| 606 | loff_t i_size; | 606 | loff_t i_size; |
| 607 | struct timespec i_atime; | 607 | struct timespec64 i_atime; |
| 608 | struct timespec i_mtime; | 608 | struct timespec64 i_mtime; |
| 609 | struct timespec i_ctime; | 609 | struct timespec64 i_ctime; |
| 610 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 610 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
| 611 | unsigned short i_bytes; | 611 | unsigned short i_bytes; |
| 612 | unsigned int i_blkbits; | 612 | unsigned int i_blkbits; |
| @@ -1093,7 +1093,7 @@ extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct | |||
| 1093 | extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); | 1093 | extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); |
| 1094 | extern int locks_lock_inode_wait(struct inode *inode, struct file_lock *fl); | 1094 | extern int locks_lock_inode_wait(struct inode *inode, struct file_lock *fl); |
| 1095 | extern int __break_lease(struct inode *inode, unsigned int flags, unsigned int type); | 1095 | extern int __break_lease(struct inode *inode, unsigned int flags, unsigned int type); |
| 1096 | extern void lease_get_mtime(struct inode *, struct timespec *time); | 1096 | extern void lease_get_mtime(struct inode *, struct timespec64 *time); |
| 1097 | extern int generic_setlease(struct file *, long, struct file_lock **, void **priv); | 1097 | extern int generic_setlease(struct file *, long, struct file_lock **, void **priv); |
| 1098 | extern int vfs_setlease(struct file *, long, struct file_lock **, void **); | 1098 | extern int vfs_setlease(struct file *, long, struct file_lock **, void **); |
| 1099 | extern int lease_modify(struct file_lock *, int, struct list_head *); | 1099 | extern int lease_modify(struct file_lock *, int, struct list_head *); |
| @@ -1208,7 +1208,8 @@ static inline int __break_lease(struct inode *inode, unsigned int mode, unsigned | |||
| 1208 | return 0; | 1208 | return 0; |
| 1209 | } | 1209 | } |
| 1210 | 1210 | ||
| 1211 | static inline void lease_get_mtime(struct inode *inode, struct timespec *time) | 1211 | static inline void lease_get_mtime(struct inode *inode, |
| 1212 | struct timespec64 *time) | ||
| 1212 | { | 1213 | { |
| 1213 | return; | 1214 | return; |
| 1214 | } | 1215 | } |
| @@ -1478,7 +1479,8 @@ static inline void i_gid_write(struct inode *inode, gid_t gid) | |||
| 1478 | inode->i_gid = make_kgid(inode->i_sb->s_user_ns, gid); | 1479 | inode->i_gid = make_kgid(inode->i_sb->s_user_ns, gid); |
| 1479 | } | 1480 | } |
| 1480 | 1481 | ||
| 1481 | extern struct timespec current_time(struct inode *inode); | 1482 | extern struct timespec64 timespec64_trunc(struct timespec64 t, unsigned gran); |
| 1483 | extern struct timespec64 current_time(struct inode *inode); | ||
| 1482 | 1484 | ||
| 1483 | /* | 1485 | /* |
| 1484 | * Snapshotting support. | 1486 | * Snapshotting support. |
| @@ -1718,8 +1720,6 @@ struct file_operations { | |||
| 1718 | int (*iterate) (struct file *, struct dir_context *); | 1720 | int (*iterate) (struct file *, struct dir_context *); |
| 1719 | int (*iterate_shared) (struct file *, struct dir_context *); | 1721 | int (*iterate_shared) (struct file *, struct dir_context *); |
| 1720 | __poll_t (*poll) (struct file *, struct poll_table_struct *); | 1722 | __poll_t (*poll) (struct file *, struct poll_table_struct *); |
| 1721 | struct wait_queue_head * (*get_poll_head)(struct file *, __poll_t); | ||
| 1722 | __poll_t (*poll_mask) (struct file *, __poll_t); | ||
| 1723 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 1723 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
| 1724 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); | 1724 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); |
| 1725 | int (*mmap) (struct file *, struct vm_area_struct *); | 1725 | int (*mmap) (struct file *, struct vm_area_struct *); |
| @@ -1773,7 +1773,7 @@ struct inode_operations { | |||
| 1773 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 1773 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
| 1774 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, | 1774 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, |
| 1775 | u64 len); | 1775 | u64 len); |
| 1776 | int (*update_time)(struct inode *, struct timespec *, int); | 1776 | int (*update_time)(struct inode *, struct timespec64 *, int); |
| 1777 | int (*atomic_open)(struct inode *, struct dentry *, | 1777 | int (*atomic_open)(struct inode *, struct dentry *, |
| 1778 | struct file *, unsigned open_flag, | 1778 | struct file *, unsigned open_flag, |
| 1779 | umode_t create_mode, int *opened); | 1779 | umode_t create_mode, int *opened); |
| @@ -2217,7 +2217,7 @@ extern int current_umask(void); | |||
| 2217 | 2217 | ||
| 2218 | extern void ihold(struct inode * inode); | 2218 | extern void ihold(struct inode * inode); |
| 2219 | extern void iput(struct inode *); | 2219 | extern void iput(struct inode *); |
| 2220 | extern int generic_update_time(struct inode *, struct timespec *, int); | 2220 | extern int generic_update_time(struct inode *, struct timespec64 *, int); |
| 2221 | 2221 | ||
| 2222 | /* /sys/fs */ | 2222 | /* /sys/fs */ |
| 2223 | extern struct kobject *fs_kobj; | 2223 | extern struct kobject *fs_kobj; |
diff --git a/include/linux/fscrypt_notsupp.h b/include/linux/fscrypt_notsupp.h index 25b6492de6e5..ee8b43e4c15a 100644 --- a/include/linux/fscrypt_notsupp.h +++ b/include/linux/fscrypt_notsupp.h | |||
| @@ -25,6 +25,10 @@ static inline bool fscrypt_dummy_context_enabled(struct inode *inode) | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | /* crypto.c */ | 27 | /* crypto.c */ |
| 28 | static inline void fscrypt_enqueue_decrypt_work(struct work_struct *work) | ||
| 29 | { | ||
| 30 | } | ||
| 31 | |||
| 28 | static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode, | 32 | static inline struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *inode, |
| 29 | gfp_t gfp_flags) | 33 | gfp_t gfp_flags) |
| 30 | { | 34 | { |
| @@ -150,10 +154,13 @@ static inline bool fscrypt_match_name(const struct fscrypt_name *fname, | |||
| 150 | } | 154 | } |
| 151 | 155 | ||
| 152 | /* bio.c */ | 156 | /* bio.c */ |
| 153 | static inline void fscrypt_decrypt_bio_pages(struct fscrypt_ctx *ctx, | 157 | static inline void fscrypt_decrypt_bio(struct bio *bio) |
| 154 | struct bio *bio) | 158 | { |
| 159 | } | ||
| 160 | |||
| 161 | static inline void fscrypt_enqueue_decrypt_bio(struct fscrypt_ctx *ctx, | ||
| 162 | struct bio *bio) | ||
| 155 | { | 163 | { |
| 156 | return; | ||
| 157 | } | 164 | } |
| 158 | 165 | ||
| 159 | static inline void fscrypt_pullback_bio_page(struct page **page, bool restore) | 166 | static inline void fscrypt_pullback_bio_page(struct page **page, bool restore) |
diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index 5080cb1bec4c..6456c6b2005f 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h | |||
| @@ -59,6 +59,7 @@ static inline bool fscrypt_dummy_context_enabled(struct inode *inode) | |||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | /* crypto.c */ | 61 | /* crypto.c */ |
| 62 | extern void fscrypt_enqueue_decrypt_work(struct work_struct *); | ||
| 62 | extern struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *, gfp_t); | 63 | extern struct fscrypt_ctx *fscrypt_get_ctx(const struct inode *, gfp_t); |
| 63 | extern void fscrypt_release_ctx(struct fscrypt_ctx *); | 64 | extern void fscrypt_release_ctx(struct fscrypt_ctx *); |
| 64 | extern struct page *fscrypt_encrypt_page(const struct inode *, struct page *, | 65 | extern struct page *fscrypt_encrypt_page(const struct inode *, struct page *, |
| @@ -174,7 +175,9 @@ static inline bool fscrypt_match_name(const struct fscrypt_name *fname, | |||
| 174 | } | 175 | } |
| 175 | 176 | ||
| 176 | /* bio.c */ | 177 | /* bio.c */ |
| 177 | extern void fscrypt_decrypt_bio_pages(struct fscrypt_ctx *, struct bio *); | 178 | extern void fscrypt_decrypt_bio(struct bio *); |
| 179 | extern void fscrypt_enqueue_decrypt_bio(struct fscrypt_ctx *ctx, | ||
| 180 | struct bio *bio); | ||
| 178 | extern void fscrypt_pullback_bio_page(struct page **, bool); | 181 | extern void fscrypt_pullback_bio_page(struct page **, bool); |
| 179 | extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t, | 182 | extern int fscrypt_zeroout_range(const struct inode *, pgoff_t, sector_t, |
| 180 | unsigned int); | 183 | unsigned int); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index e64c0294f50b..b38964a7a521 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -98,8 +98,6 @@ struct fsnotify_iter_info; | |||
| 98 | struct fsnotify_ops { | 98 | struct fsnotify_ops { |
| 99 | int (*handle_event)(struct fsnotify_group *group, | 99 | int (*handle_event)(struct fsnotify_group *group, |
| 100 | struct inode *inode, | 100 | struct inode *inode, |
| 101 | struct fsnotify_mark *inode_mark, | ||
| 102 | struct fsnotify_mark *vfsmount_mark, | ||
| 103 | u32 mask, const void *data, int data_type, | 101 | u32 mask, const void *data, int data_type, |
| 104 | const unsigned char *file_name, u32 cookie, | 102 | const unsigned char *file_name, u32 cookie, |
| 105 | struct fsnotify_iter_info *iter_info); | 103 | struct fsnotify_iter_info *iter_info); |
| @@ -201,6 +199,57 @@ struct fsnotify_group { | |||
| 201 | #define FSNOTIFY_EVENT_PATH 1 | 199 | #define FSNOTIFY_EVENT_PATH 1 |
| 202 | #define FSNOTIFY_EVENT_INODE 2 | 200 | #define FSNOTIFY_EVENT_INODE 2 |
| 203 | 201 | ||
| 202 | enum fsnotify_obj_type { | ||
| 203 | FSNOTIFY_OBJ_TYPE_INODE, | ||
| 204 | FSNOTIFY_OBJ_TYPE_VFSMOUNT, | ||
| 205 | FSNOTIFY_OBJ_TYPE_COUNT, | ||
| 206 | FSNOTIFY_OBJ_TYPE_DETACHED = FSNOTIFY_OBJ_TYPE_COUNT | ||
| 207 | }; | ||
| 208 | |||
| 209 | #define FSNOTIFY_OBJ_TYPE_INODE_FL (1U << FSNOTIFY_OBJ_TYPE_INODE) | ||
| 210 | #define FSNOTIFY_OBJ_TYPE_VFSMOUNT_FL (1U << FSNOTIFY_OBJ_TYPE_VFSMOUNT) | ||
| 211 | #define FSNOTIFY_OBJ_ALL_TYPES_MASK ((1U << FSNOTIFY_OBJ_TYPE_COUNT) - 1) | ||
| 212 | |||
| 213 | struct fsnotify_iter_info { | ||
| 214 | struct fsnotify_mark *marks[FSNOTIFY_OBJ_TYPE_COUNT]; | ||
| 215 | unsigned int report_mask; | ||
| 216 | int srcu_idx; | ||
| 217 | }; | ||
| 218 | |||
| 219 | static inline bool fsnotify_iter_should_report_type( | ||
| 220 | struct fsnotify_iter_info *iter_info, int type) | ||
| 221 | { | ||
| 222 | return (iter_info->report_mask & (1U << type)); | ||
| 223 | } | ||
| 224 | |||
| 225 | static inline void fsnotify_iter_set_report_type( | ||
| 226 | struct fsnotify_iter_info *iter_info, int type) | ||
| 227 | { | ||
| 228 | iter_info->report_mask |= (1U << type); | ||
| 229 | } | ||
| 230 | |||
| 231 | static inline void fsnotify_iter_set_report_type_mark( | ||
| 232 | struct fsnotify_iter_info *iter_info, int type, | ||
| 233 | struct fsnotify_mark *mark) | ||
| 234 | { | ||
| 235 | iter_info->marks[type] = mark; | ||
| 236 | iter_info->report_mask |= (1U << type); | ||
| 237 | } | ||
| 238 | |||
| 239 | #define FSNOTIFY_ITER_FUNCS(name, NAME) \ | ||
| 240 | static inline struct fsnotify_mark *fsnotify_iter_##name##_mark( \ | ||
| 241 | struct fsnotify_iter_info *iter_info) \ | ||
| 242 | { \ | ||
| 243 | return (iter_info->report_mask & FSNOTIFY_OBJ_TYPE_##NAME##_FL) ? \ | ||
| 244 | iter_info->marks[FSNOTIFY_OBJ_TYPE_##NAME] : NULL; \ | ||
| 245 | } | ||
| 246 | |||
| 247 | FSNOTIFY_ITER_FUNCS(inode, INODE) | ||
| 248 | FSNOTIFY_ITER_FUNCS(vfsmount, VFSMOUNT) | ||
| 249 | |||
| 250 | #define fsnotify_foreach_obj_type(type) \ | ||
| 251 | for (type = 0; type < FSNOTIFY_OBJ_TYPE_COUNT; type++) | ||
| 252 | |||
| 204 | /* | 253 | /* |
| 205 | * Inode / vfsmount point to this structure which tracks all marks attached to | 254 | * Inode / vfsmount point to this structure which tracks all marks attached to |
| 206 | * the inode / vfsmount. The reference to inode / vfsmount is held by this | 255 | * the inode / vfsmount. The reference to inode / vfsmount is held by this |
| @@ -209,11 +258,7 @@ struct fsnotify_group { | |||
| 209 | */ | 258 | */ |
| 210 | struct fsnotify_mark_connector { | 259 | struct fsnotify_mark_connector { |
| 211 | spinlock_t lock; | 260 | spinlock_t lock; |
| 212 | #define FSNOTIFY_OBJ_TYPE_INODE 0x01 | 261 | unsigned int type; /* Type of object [lock] */ |
| 213 | #define FSNOTIFY_OBJ_TYPE_VFSMOUNT 0x02 | ||
| 214 | #define FSNOTIFY_OBJ_ALL_TYPES (FSNOTIFY_OBJ_TYPE_INODE | \ | ||
| 215 | FSNOTIFY_OBJ_TYPE_VFSMOUNT) | ||
| 216 | unsigned int flags; /* Type of object [lock] */ | ||
| 217 | union { /* Object pointer [lock] */ | 262 | union { /* Object pointer [lock] */ |
| 218 | struct inode *inode; | 263 | struct inode *inode; |
| 219 | struct vfsmount *mnt; | 264 | struct vfsmount *mnt; |
| @@ -356,7 +401,21 @@ extern struct fsnotify_mark *fsnotify_find_mark( | |||
| 356 | extern int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode, | 401 | extern int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode, |
| 357 | struct vfsmount *mnt, int allow_dups); | 402 | struct vfsmount *mnt, int allow_dups); |
| 358 | extern int fsnotify_add_mark_locked(struct fsnotify_mark *mark, | 403 | extern int fsnotify_add_mark_locked(struct fsnotify_mark *mark, |
| 359 | struct inode *inode, struct vfsmount *mnt, int allow_dups); | 404 | struct inode *inode, struct vfsmount *mnt, |
| 405 | int allow_dups); | ||
| 406 | /* attach the mark to the inode */ | ||
| 407 | static inline int fsnotify_add_inode_mark(struct fsnotify_mark *mark, | ||
| 408 | struct inode *inode, | ||
| 409 | int allow_dups) | ||
| 410 | { | ||
| 411 | return fsnotify_add_mark(mark, inode, NULL, allow_dups); | ||
| 412 | } | ||
| 413 | static inline int fsnotify_add_inode_mark_locked(struct fsnotify_mark *mark, | ||
| 414 | struct inode *inode, | ||
| 415 | int allow_dups) | ||
| 416 | { | ||
| 417 | return fsnotify_add_mark_locked(mark, inode, NULL, allow_dups); | ||
| 418 | } | ||
| 360 | /* given a group and a mark, flag mark to be freed when all references are dropped */ | 419 | /* given a group and a mark, flag mark to be freed when all references are dropped */ |
| 361 | extern void fsnotify_destroy_mark(struct fsnotify_mark *mark, | 420 | extern void fsnotify_destroy_mark(struct fsnotify_mark *mark, |
| 362 | struct fsnotify_group *group); | 421 | struct fsnotify_group *group); |
| @@ -369,12 +428,12 @@ extern void fsnotify_clear_marks_by_group(struct fsnotify_group *group, unsigned | |||
| 369 | /* run all the marks in a group, and clear all of the vfsmount marks */ | 428 | /* run all the marks in a group, and clear all of the vfsmount marks */ |
| 370 | static inline void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group) | 429 | static inline void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group) |
| 371 | { | 430 | { |
| 372 | fsnotify_clear_marks_by_group(group, FSNOTIFY_OBJ_TYPE_VFSMOUNT); | 431 | fsnotify_clear_marks_by_group(group, FSNOTIFY_OBJ_TYPE_VFSMOUNT_FL); |
| 373 | } | 432 | } |
| 374 | /* run all the marks in a group, and clear all of the inode marks */ | 433 | /* run all the marks in a group, and clear all of the inode marks */ |
| 375 | static inline void fsnotify_clear_inode_marks_by_group(struct fsnotify_group *group) | 434 | static inline void fsnotify_clear_inode_marks_by_group(struct fsnotify_group *group) |
| 376 | { | 435 | { |
| 377 | fsnotify_clear_marks_by_group(group, FSNOTIFY_OBJ_TYPE_INODE); | 436 | fsnotify_clear_marks_by_group(group, FSNOTIFY_OBJ_TYPE_INODE_FL); |
| 378 | } | 437 | } |
| 379 | extern void fsnotify_get_mark(struct fsnotify_mark *mark); | 438 | extern void fsnotify_get_mark(struct fsnotify_mark *mark); |
| 380 | extern void fsnotify_put_mark(struct fsnotify_mark *mark); | 439 | extern void fsnotify_put_mark(struct fsnotify_mark *mark); |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 9c3c9a319e48..ebb77674be90 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* | 2 | /* |
| 3 | * Ftrace header. For implementation details beyond the random comments | 3 | * Ftrace header. For implementation details beyond the random comments |
| 4 | * scattered below, see: Documentation/trace/ftrace-design.txt | 4 | * scattered below, see: Documentation/trace/ftrace-design.rst |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #ifndef _LINUX_FTRACE_H | 7 | #ifndef _LINUX_FTRACE_H |
| @@ -223,7 +223,6 @@ extern enum ftrace_tracing_type_t ftrace_tracing_type; | |||
| 223 | */ | 223 | */ |
| 224 | int register_ftrace_function(struct ftrace_ops *ops); | 224 | int register_ftrace_function(struct ftrace_ops *ops); |
| 225 | int unregister_ftrace_function(struct ftrace_ops *ops); | 225 | int unregister_ftrace_function(struct ftrace_ops *ops); |
| 226 | void clear_ftrace_function(void); | ||
| 227 | 226 | ||
| 228 | extern void ftrace_stub(unsigned long a0, unsigned long a1, | 227 | extern void ftrace_stub(unsigned long a0, unsigned long a1, |
| 229 | struct ftrace_ops *op, struct pt_regs *regs); | 228 | struct ftrace_ops *op, struct pt_regs *regs); |
| @@ -239,7 +238,6 @@ static inline int ftrace_nr_registered_ops(void) | |||
| 239 | { | 238 | { |
| 240 | return 0; | 239 | return 0; |
| 241 | } | 240 | } |
| 242 | static inline void clear_ftrace_function(void) { } | ||
| 243 | static inline void ftrace_kill(void) { } | 241 | static inline void ftrace_kill(void) { } |
| 244 | static inline void ftrace_free_init_mem(void) { } | 242 | static inline void ftrace_free_init_mem(void) { } |
| 245 | static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } | 243 | static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } |
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index dbd065963296..243112c7fa7d 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h | |||
| @@ -116,7 +116,7 @@ int gpiod_get_raw_array_value(unsigned int array_size, | |||
| 116 | struct gpio_desc **desc_array, | 116 | struct gpio_desc **desc_array, |
| 117 | int *value_array); | 117 | int *value_array); |
| 118 | void gpiod_set_raw_value(struct gpio_desc *desc, int value); | 118 | void gpiod_set_raw_value(struct gpio_desc *desc, int value); |
| 119 | void gpiod_set_raw_array_value(unsigned int array_size, | 119 | int gpiod_set_raw_array_value(unsigned int array_size, |
| 120 | struct gpio_desc **desc_array, | 120 | struct gpio_desc **desc_array, |
| 121 | int *value_array); | 121 | int *value_array); |
| 122 | 122 | ||
| @@ -134,7 +134,7 @@ int gpiod_get_raw_array_value_cansleep(unsigned int array_size, | |||
| 134 | struct gpio_desc **desc_array, | 134 | struct gpio_desc **desc_array, |
| 135 | int *value_array); | 135 | int *value_array); |
| 136 | void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, int value); | 136 | void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, int value); |
| 137 | void gpiod_set_raw_array_value_cansleep(unsigned int array_size, | 137 | int gpiod_set_raw_array_value_cansleep(unsigned int array_size, |
| 138 | struct gpio_desc **desc_array, | 138 | struct gpio_desc **desc_array, |
| 139 | int *value_array); | 139 | int *value_array); |
| 140 | 140 | ||
| @@ -369,12 +369,13 @@ static inline void gpiod_set_raw_value(struct gpio_desc *desc, int value) | |||
| 369 | /* GPIO can never have been requested */ | 369 | /* GPIO can never have been requested */ |
| 370 | WARN_ON(1); | 370 | WARN_ON(1); |
| 371 | } | 371 | } |
| 372 | static inline void gpiod_set_raw_array_value(unsigned int array_size, | 372 | static inline int gpiod_set_raw_array_value(unsigned int array_size, |
| 373 | struct gpio_desc **desc_array, | 373 | struct gpio_desc **desc_array, |
| 374 | int *value_array) | 374 | int *value_array) |
| 375 | { | 375 | { |
| 376 | /* GPIO can never have been requested */ | 376 | /* GPIO can never have been requested */ |
| 377 | WARN_ON(1); | 377 | WARN_ON(1); |
| 378 | return 0; | ||
| 378 | } | 379 | } |
| 379 | 380 | ||
| 380 | static inline int gpiod_get_value_cansleep(const struct gpio_desc *desc) | 381 | static inline int gpiod_get_value_cansleep(const struct gpio_desc *desc) |
| @@ -423,12 +424,13 @@ static inline void gpiod_set_raw_value_cansleep(struct gpio_desc *desc, | |||
| 423 | /* GPIO can never have been requested */ | 424 | /* GPIO can never have been requested */ |
| 424 | WARN_ON(1); | 425 | WARN_ON(1); |
| 425 | } | 426 | } |
| 426 | static inline void gpiod_set_raw_array_value_cansleep(unsigned int array_size, | 427 | static inline int gpiod_set_raw_array_value_cansleep(unsigned int array_size, |
| 427 | struct gpio_desc **desc_array, | 428 | struct gpio_desc **desc_array, |
| 428 | int *value_array) | 429 | int *value_array) |
| 429 | { | 430 | { |
| 430 | /* GPIO can never have been requested */ | 431 | /* GPIO can never have been requested */ |
| 431 | WARN_ON(1); | 432 | WARN_ON(1); |
| 433 | return 0; | ||
| 432 | } | 434 | } |
| 433 | 435 | ||
| 434 | static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce) | 436 | static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce) |
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h index b2f2dc638463..daa44eac9241 100644 --- a/include/linux/gpio/machine.h +++ b/include/linux/gpio/machine.h | |||
| @@ -39,6 +39,23 @@ struct gpiod_lookup_table { | |||
| 39 | struct gpiod_lookup table[]; | 39 | struct gpiod_lookup table[]; |
| 40 | }; | 40 | }; |
| 41 | 41 | ||
| 42 | /** | ||
| 43 | * struct gpiod_hog - GPIO line hog table | ||
| 44 | * @chip_label: name of the chip the GPIO belongs to | ||
| 45 | * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO | ||
| 46 | * @line_name: consumer name for the hogged line | ||
| 47 | * @lflags: mask of GPIO lookup flags | ||
| 48 | * @dflags: GPIO flags used to specify the direction and value | ||
| 49 | */ | ||
| 50 | struct gpiod_hog { | ||
| 51 | struct list_head list; | ||
| 52 | const char *chip_label; | ||
| 53 | u16 chip_hwnum; | ||
| 54 | const char *line_name; | ||
| 55 | enum gpio_lookup_flags lflags; | ||
| 56 | int dflags; | ||
| 57 | }; | ||
| 58 | |||
| 42 | /* | 59 | /* |
| 43 | * Simple definition of a single GPIO under a con_id | 60 | * Simple definition of a single GPIO under a con_id |
| 44 | */ | 61 | */ |
| @@ -59,10 +76,23 @@ struct gpiod_lookup_table { | |||
| 59 | .flags = _flags, \ | 76 | .flags = _flags, \ |
| 60 | } | 77 | } |
| 61 | 78 | ||
| 79 | /* | ||
| 80 | * Simple definition of a single GPIO hog in an array. | ||
| 81 | */ | ||
| 82 | #define GPIO_HOG(_chip_label, _chip_hwnum, _line_name, _lflags, _dflags) \ | ||
| 83 | { \ | ||
| 84 | .chip_label = _chip_label, \ | ||
| 85 | .chip_hwnum = _chip_hwnum, \ | ||
| 86 | .line_name = _line_name, \ | ||
| 87 | .lflags = _lflags, \ | ||
| 88 | .dflags = _dflags, \ | ||
| 89 | } | ||
| 90 | |||
| 62 | #ifdef CONFIG_GPIOLIB | 91 | #ifdef CONFIG_GPIOLIB |
| 63 | void gpiod_add_lookup_table(struct gpiod_lookup_table *table); | 92 | void gpiod_add_lookup_table(struct gpiod_lookup_table *table); |
| 64 | void gpiod_add_lookup_tables(struct gpiod_lookup_table **tables, size_t n); | 93 | void gpiod_add_lookup_tables(struct gpiod_lookup_table **tables, size_t n); |
| 65 | void gpiod_remove_lookup_table(struct gpiod_lookup_table *table); | 94 | void gpiod_remove_lookup_table(struct gpiod_lookup_table *table); |
| 95 | void gpiod_add_hogs(struct gpiod_hog *hogs); | ||
| 66 | #else | 96 | #else |
| 67 | static inline | 97 | static inline |
| 68 | void gpiod_add_lookup_table(struct gpiod_lookup_table *table) {} | 98 | void gpiod_add_lookup_table(struct gpiod_lookup_table *table) {} |
| @@ -70,6 +100,7 @@ static inline | |||
| 70 | void gpiod_add_lookup_tables(struct gpiod_lookup_table **tables, size_t n) {} | 100 | void gpiod_add_lookup_tables(struct gpiod_lookup_table **tables, size_t n) {} |
| 71 | static inline | 101 | static inline |
| 72 | void gpiod_remove_lookup_table(struct gpiod_lookup_table *table) {} | 102 | void gpiod_remove_lookup_table(struct gpiod_lookup_table *table) {} |
| 103 | static inline void gpiod_add_hogs(struct gpiod_hog *hogs) {} | ||
| 73 | #endif | 104 | #endif |
| 74 | 105 | ||
| 75 | #endif /* __LINUX_GPIO_MACHINE_H */ | 106 | #endif /* __LINUX_GPIO_MACHINE_H */ |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 773bcb1d4044..938d9ba6d7cd 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
| @@ -894,6 +894,8 @@ const struct hid_device_id *hid_match_id(const struct hid_device *hdev, | |||
| 894 | const struct hid_device_id *id); | 894 | const struct hid_device_id *id); |
| 895 | const struct hid_device_id *hid_match_device(struct hid_device *hdev, | 895 | const struct hid_device_id *hid_match_device(struct hid_device *hdev, |
| 896 | struct hid_driver *hdrv); | 896 | struct hid_driver *hdrv); |
| 897 | bool hid_compare_device_paths(struct hid_device *hdev_a, | ||
| 898 | struct hid_device *hdev_b, char separator); | ||
| 897 | s32 hid_snto32(__u32 value, unsigned n); | 899 | s32 hid_snto32(__u32 value, unsigned n); |
| 898 | __u32 hid_field_extract(const struct hid_device *hid, __u8 *report, | 900 | __u32 hid_field_extract(const struct hid_device *hid, __u8 *report, |
| 899 | unsigned offset, unsigned n); | 901 | unsigned offset, unsigned n); |
diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h index 859d673d98c8..57537e67b468 100644 --- a/include/linux/hwspinlock.h +++ b/include/linux/hwspinlock.h | |||
| @@ -1,18 +1,10 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 1 | /* | 2 | /* |
| 2 | * Hardware spinlock public header | 3 | * Hardware spinlock public header |
| 3 | * | 4 | * |
| 4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com | 5 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com |
| 5 | * | 6 | * |
| 6 | * Contact: Ohad Ben-Cohen <ohad@wizery.com> | 7 | * Contact: Ohad Ben-Cohen <ohad@wizery.com> |
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License version 2 as published | ||
| 10 | * by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | */ | 8 | */ |
| 17 | 9 | ||
| 18 | #ifndef __LINUX_HWSPINLOCK_H | 10 | #ifndef __LINUX_HWSPINLOCK_H |
| @@ -24,6 +16,7 @@ | |||
| 24 | /* hwspinlock mode argument */ | 16 | /* hwspinlock mode argument */ |
| 25 | #define HWLOCK_IRQSTATE 0x01 /* Disable interrupts, save state */ | 17 | #define HWLOCK_IRQSTATE 0x01 /* Disable interrupts, save state */ |
| 26 | #define HWLOCK_IRQ 0x02 /* Disable interrupts, don't save state */ | 18 | #define HWLOCK_IRQ 0x02 /* Disable interrupts, don't save state */ |
| 19 | #define HWLOCK_RAW 0x03 | ||
| 27 | 20 | ||
| 28 | struct device; | 21 | struct device; |
| 29 | struct device_node; | 22 | struct device_node; |
| @@ -176,6 +169,25 @@ static inline int hwspin_trylock_irq(struct hwspinlock *hwlock) | |||
| 176 | } | 169 | } |
| 177 | 170 | ||
| 178 | /** | 171 | /** |
| 172 | * hwspin_trylock_raw() - attempt to lock a specific hwspinlock | ||
| 173 | * @hwlock: an hwspinlock which we want to trylock | ||
| 174 | * | ||
| 175 | * This function attempts to lock an hwspinlock, and will immediately fail | ||
| 176 | * if the hwspinlock is already taken. | ||
| 177 | * | ||
| 178 | * Caution: User must protect the routine of getting hardware lock with mutex | ||
| 179 | * or spinlock to avoid dead-lock, that will let user can do some time-consuming | ||
| 180 | * or sleepable operations under the hardware lock. | ||
| 181 | * | ||
| 182 | * Returns 0 if we successfully locked the hwspinlock, -EBUSY if | ||
| 183 | * the hwspinlock was already taken, and -EINVAL if @hwlock is invalid. | ||
| 184 | */ | ||
| 185 | static inline int hwspin_trylock_raw(struct hwspinlock *hwlock) | ||
| 186 | { | ||
| 187 | return __hwspin_trylock(hwlock, HWLOCK_RAW, NULL); | ||
| 188 | } | ||
| 189 | |||
| 190 | /** | ||
| 179 | * hwspin_trylock() - attempt to lock a specific hwspinlock | 191 | * hwspin_trylock() - attempt to lock a specific hwspinlock |
| 180 | * @hwlock: an hwspinlock which we want to trylock | 192 | * @hwlock: an hwspinlock which we want to trylock |
| 181 | * | 193 | * |
| @@ -243,6 +255,29 @@ int hwspin_lock_timeout_irq(struct hwspinlock *hwlock, unsigned int to) | |||
| 243 | } | 255 | } |
| 244 | 256 | ||
| 245 | /** | 257 | /** |
| 258 | * hwspin_lock_timeout_raw() - lock an hwspinlock with timeout limit | ||
| 259 | * @hwlock: the hwspinlock to be locked | ||
| 260 | * @to: timeout value in msecs | ||
| 261 | * | ||
| 262 | * This function locks the underlying @hwlock. If the @hwlock | ||
| 263 | * is already taken, the function will busy loop waiting for it to | ||
| 264 | * be released, but give up when @timeout msecs have elapsed. | ||
| 265 | * | ||
| 266 | * Caution: User must protect the routine of getting hardware lock with mutex | ||
| 267 | * or spinlock to avoid dead-lock, that will let user can do some time-consuming | ||
| 268 | * or sleepable operations under the hardware lock. | ||
| 269 | * | ||
| 270 | * Returns 0 when the @hwlock was successfully taken, and an appropriate | ||
| 271 | * error code otherwise (most notably an -ETIMEDOUT if the @hwlock is still | ||
| 272 | * busy after @timeout msecs). The function will never sleep. | ||
| 273 | */ | ||
| 274 | static inline | ||
| 275 | int hwspin_lock_timeout_raw(struct hwspinlock *hwlock, unsigned int to) | ||
| 276 | { | ||
| 277 | return __hwspin_lock_timeout(hwlock, to, HWLOCK_RAW, NULL); | ||
| 278 | } | ||
| 279 | |||
| 280 | /** | ||
| 246 | * hwspin_lock_timeout() - lock an hwspinlock with timeout limit | 281 | * hwspin_lock_timeout() - lock an hwspinlock with timeout limit |
| 247 | * @hwlock: the hwspinlock to be locked | 282 | * @hwlock: the hwspinlock to be locked |
| 248 | * @to: timeout value in msecs | 283 | * @to: timeout value in msecs |
| @@ -302,6 +337,21 @@ static inline void hwspin_unlock_irq(struct hwspinlock *hwlock) | |||
| 302 | } | 337 | } |
| 303 | 338 | ||
| 304 | /** | 339 | /** |
| 340 | * hwspin_unlock_raw() - unlock hwspinlock | ||
| 341 | * @hwlock: a previously-acquired hwspinlock which we want to unlock | ||
| 342 | * | ||
| 343 | * This function will unlock a specific hwspinlock. | ||
| 344 | * | ||
| 345 | * @hwlock must be already locked (e.g. by hwspin_trylock()) before calling | ||
| 346 | * this function: it is a bug to call unlock on a @hwlock that is already | ||
| 347 | * unlocked. | ||
| 348 | */ | ||
| 349 | static inline void hwspin_unlock_raw(struct hwspinlock *hwlock) | ||
| 350 | { | ||
| 351 | __hwspin_unlock(hwlock, HWLOCK_RAW, NULL); | ||
| 352 | } | ||
| 353 | |||
| 354 | /** | ||
| 305 | * hwspin_unlock() - unlock hwspinlock | 355 | * hwspin_unlock() - unlock hwspinlock |
| 306 | * @hwlock: a previously-acquired hwspinlock which we want to unlock | 356 | * @hwlock: a previously-acquired hwspinlock which we want to unlock |
| 307 | * | 357 | * |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 11b5612dc066..3a3012f57be4 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/device.h> | 35 | #include <linux/device.h> |
| 36 | #include <linux/mod_devicetable.h> | 36 | #include <linux/mod_devicetable.h> |
| 37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
| 38 | #include <linux/reciprocal_div.h> | ||
| 38 | 39 | ||
| 39 | #define MAX_PAGE_BUFFER_COUNT 32 | 40 | #define MAX_PAGE_BUFFER_COUNT 32 |
| 40 | #define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */ | 41 | #define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */ |
| @@ -120,6 +121,7 @@ struct hv_ring_buffer { | |||
| 120 | struct hv_ring_buffer_info { | 121 | struct hv_ring_buffer_info { |
| 121 | struct hv_ring_buffer *ring_buffer; | 122 | struct hv_ring_buffer *ring_buffer; |
| 122 | u32 ring_size; /* Include the shared header */ | 123 | u32 ring_size; /* Include the shared header */ |
| 124 | struct reciprocal_value ring_size_div10_reciprocal; | ||
| 123 | spinlock_t ring_lock; | 125 | spinlock_t ring_lock; |
| 124 | 126 | ||
| 125 | u32 ring_datasize; /* < ring_size */ | 127 | u32 ring_datasize; /* < ring_size */ |
| @@ -154,6 +156,16 @@ static inline u32 hv_get_bytes_to_write(const struct hv_ring_buffer_info *rbi) | |||
| 154 | return write; | 156 | return write; |
| 155 | } | 157 | } |
| 156 | 158 | ||
| 159 | static inline u32 hv_get_avail_to_write_percent( | ||
| 160 | const struct hv_ring_buffer_info *rbi) | ||
| 161 | { | ||
| 162 | u32 avail_write = hv_get_bytes_to_write(rbi); | ||
| 163 | |||
| 164 | return reciprocal_divide( | ||
| 165 | (avail_write << 3) + (avail_write << 1), | ||
| 166 | rbi->ring_size_div10_reciprocal); | ||
| 167 | } | ||
| 168 | |||
| 157 | /* | 169 | /* |
| 158 | * VMBUS version is 32 bit entity broken up into | 170 | * VMBUS version is 32 bit entity broken up into |
| 159 | * two 16 bit quantities: major_number. minor_number. | 171 | * two 16 bit quantities: major_number. minor_number. |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h deleted file mode 100644 index 5388326fbbff..000000000000 --- a/include/linux/i2c-pnx.h +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Header file for I2C support on PNX010x/4008. | ||
| 3 | * | ||
| 4 | * Author: Dennis Kovalev <dkovalev@ru.mvista.com> | ||
| 5 | * | ||
| 6 | * 2004-2006 (c) MontaVista Software, Inc. This file is licensed under | ||
| 7 | * the terms of the GNU General Public License version 2. This program | ||
| 8 | * is licensed "as is" without any warranty of any kind, whether express | ||
| 9 | * or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __I2C_PNX_H__ | ||
| 13 | #define __I2C_PNX_H__ | ||
| 14 | |||
| 15 | struct platform_device; | ||
| 16 | struct clk; | ||
| 17 | |||
| 18 | struct i2c_pnx_mif { | ||
| 19 | int ret; /* Return value */ | ||
| 20 | int mode; /* Interface mode */ | ||
| 21 | struct completion complete; /* I/O completion */ | ||
| 22 | struct timer_list timer; /* Timeout */ | ||
| 23 | u8 * buf; /* Data buffer */ | ||
| 24 | int len; /* Length of data buffer */ | ||
| 25 | int order; /* RX Bytes to order via TX */ | ||
| 26 | }; | ||
| 27 | |||
| 28 | struct i2c_pnx_algo_data { | ||
| 29 | void __iomem *ioaddr; | ||
| 30 | struct i2c_pnx_mif mif; | ||
| 31 | int last; | ||
| 32 | struct clk *clk; | ||
| 33 | struct i2c_adapter adapter; | ||
| 34 | int irq; | ||
| 35 | u32 timeout; | ||
| 36 | }; | ||
| 37 | |||
| 38 | #endif /* __I2C_PNX_H__ */ | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 44ad14e016b5..254cd34eeae2 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -394,7 +394,6 @@ static inline bool i2c_detect_slave_mode(struct device *dev) { return false; } | |||
| 394 | * @addr: stored in i2c_client.addr | 394 | * @addr: stored in i2c_client.addr |
| 395 | * @dev_name: Overrides the default <busnr>-<addr> dev_name if set | 395 | * @dev_name: Overrides the default <busnr>-<addr> dev_name if set |
| 396 | * @platform_data: stored in i2c_client.dev.platform_data | 396 | * @platform_data: stored in i2c_client.dev.platform_data |
| 397 | * @archdata: copied into i2c_client.dev.archdata | ||
| 398 | * @of_node: pointer to OpenFirmware device node | 397 | * @of_node: pointer to OpenFirmware device node |
| 399 | * @fwnode: device node supplied by the platform firmware | 398 | * @fwnode: device node supplied by the platform firmware |
| 400 | * @properties: additional device properties for the device | 399 | * @properties: additional device properties for the device |
| @@ -419,7 +418,6 @@ struct i2c_board_info { | |||
| 419 | unsigned short addr; | 418 | unsigned short addr; |
| 420 | const char *dev_name; | 419 | const char *dev_name; |
| 421 | void *platform_data; | 420 | void *platform_data; |
| 422 | struct dev_archdata *archdata; | ||
| 423 | struct device_node *of_node; | 421 | struct device_node *of_node; |
| 424 | struct fwnode_handle *fwnode; | 422 | struct fwnode_handle *fwnode; |
| 425 | const struct property_entry *properties; | 423 | const struct property_entry *properties; |
| @@ -903,6 +901,9 @@ extern const struct of_device_id | |||
| 903 | *i2c_of_match_device(const struct of_device_id *matches, | 901 | *i2c_of_match_device(const struct of_device_id *matches, |
| 904 | struct i2c_client *client); | 902 | struct i2c_client *client); |
| 905 | 903 | ||
| 904 | int of_i2c_get_board_info(struct device *dev, struct device_node *node, | ||
| 905 | struct i2c_board_info *info); | ||
| 906 | |||
| 906 | #else | 907 | #else |
| 907 | 908 | ||
| 908 | static inline struct i2c_client *of_find_i2c_device_by_node(struct device_node *node) | 909 | static inline struct i2c_client *of_find_i2c_device_by_node(struct device_node *node) |
| @@ -927,6 +928,13 @@ static inline const struct of_device_id | |||
| 927 | return NULL; | 928 | return NULL; |
| 928 | } | 929 | } |
| 929 | 930 | ||
| 931 | static inline int of_i2c_get_board_info(struct device *dev, | ||
| 932 | struct device_node *node, | ||
| 933 | struct i2c_board_info *info) | ||
| 934 | { | ||
| 935 | return -ENOTSUPP; | ||
| 936 | } | ||
| 937 | |||
| 930 | #endif /* CONFIG_OF */ | 938 | #endif /* CONFIG_OF */ |
| 931 | 939 | ||
| 932 | #if IS_ENABLED(CONFIG_ACPI) | 940 | #if IS_ENABLED(CONFIG_ACPI) |
diff --git a/include/linux/iio/adc/ad_sigma_delta.h b/include/linux/iio/adc/ad_sigma_delta.h index 1fc7abd28b0b..730ead1a46df 100644 --- a/include/linux/iio/adc/ad_sigma_delta.h +++ b/include/linux/iio/adc/ad_sigma_delta.h | |||
| @@ -127,7 +127,7 @@ void ad_sd_cleanup_buffer_and_trigger(struct iio_dev *indio_dev); | |||
| 127 | int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig); | 127 | int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig); |
| 128 | 128 | ||
| 129 | #define __AD_SD_CHANNEL(_si, _channel1, _channel2, _address, _bits, \ | 129 | #define __AD_SD_CHANNEL(_si, _channel1, _channel2, _address, _bits, \ |
| 130 | _storagebits, _shift, _extend_name, _type) \ | 130 | _storagebits, _shift, _extend_name, _type, _mask_all) \ |
| 131 | { \ | 131 | { \ |
| 132 | .type = (_type), \ | 132 | .type = (_type), \ |
| 133 | .differential = (_channel2 == -1 ? 0 : 1), \ | 133 | .differential = (_channel2 == -1 ? 0 : 1), \ |
| @@ -139,7 +139,7 @@ int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig); | |||
| 139 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ | 139 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
| 140 | BIT(IIO_CHAN_INFO_OFFSET), \ | 140 | BIT(IIO_CHAN_INFO_OFFSET), \ |
| 141 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ | 141 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ |
| 142 | .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ), \ | 142 | .info_mask_shared_by_all = _mask_all, \ |
| 143 | .scan_index = (_si), \ | 143 | .scan_index = (_si), \ |
| 144 | .scan_type = { \ | 144 | .scan_type = { \ |
| 145 | .sign = 'u', \ | 145 | .sign = 'u', \ |
| @@ -153,25 +153,35 @@ int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig); | |||
| 153 | #define AD_SD_DIFF_CHANNEL(_si, _channel1, _channel2, _address, _bits, \ | 153 | #define AD_SD_DIFF_CHANNEL(_si, _channel1, _channel2, _address, _bits, \ |
| 154 | _storagebits, _shift) \ | 154 | _storagebits, _shift) \ |
| 155 | __AD_SD_CHANNEL(_si, _channel1, _channel2, _address, _bits, \ | 155 | __AD_SD_CHANNEL(_si, _channel1, _channel2, _address, _bits, \ |
| 156 | _storagebits, _shift, NULL, IIO_VOLTAGE) | 156 | _storagebits, _shift, NULL, IIO_VOLTAGE, \ |
| 157 | BIT(IIO_CHAN_INFO_SAMP_FREQ)) | ||
| 157 | 158 | ||
| 158 | #define AD_SD_SHORTED_CHANNEL(_si, _channel, _address, _bits, \ | 159 | #define AD_SD_SHORTED_CHANNEL(_si, _channel, _address, _bits, \ |
| 159 | _storagebits, _shift) \ | 160 | _storagebits, _shift) \ |
| 160 | __AD_SD_CHANNEL(_si, _channel, _channel, _address, _bits, \ | 161 | __AD_SD_CHANNEL(_si, _channel, _channel, _address, _bits, \ |
| 161 | _storagebits, _shift, "shorted", IIO_VOLTAGE) | 162 | _storagebits, _shift, "shorted", IIO_VOLTAGE, \ |
| 163 | BIT(IIO_CHAN_INFO_SAMP_FREQ)) | ||
| 162 | 164 | ||
| 163 | #define AD_SD_CHANNEL(_si, _channel, _address, _bits, \ | 165 | #define AD_SD_CHANNEL(_si, _channel, _address, _bits, \ |
| 164 | _storagebits, _shift) \ | 166 | _storagebits, _shift) \ |
| 165 | __AD_SD_CHANNEL(_si, _channel, -1, _address, _bits, \ | 167 | __AD_SD_CHANNEL(_si, _channel, -1, _address, _bits, \ |
| 166 | _storagebits, _shift, NULL, IIO_VOLTAGE) | 168 | _storagebits, _shift, NULL, IIO_VOLTAGE, \ |
| 169 | BIT(IIO_CHAN_INFO_SAMP_FREQ)) | ||
| 170 | |||
| 171 | #define AD_SD_CHANNEL_NO_SAMP_FREQ(_si, _channel, _address, _bits, \ | ||
| 172 | _storagebits, _shift) \ | ||
| 173 | __AD_SD_CHANNEL(_si, _channel, -1, _address, _bits, \ | ||
| 174 | _storagebits, _shift, NULL, IIO_VOLTAGE, 0) | ||
| 167 | 175 | ||
| 168 | #define AD_SD_TEMP_CHANNEL(_si, _address, _bits, _storagebits, _shift) \ | 176 | #define AD_SD_TEMP_CHANNEL(_si, _address, _bits, _storagebits, _shift) \ |
| 169 | __AD_SD_CHANNEL(_si, 0, -1, _address, _bits, \ | 177 | __AD_SD_CHANNEL(_si, 0, -1, _address, _bits, \ |
| 170 | _storagebits, _shift, NULL, IIO_TEMP) | 178 | _storagebits, _shift, NULL, IIO_TEMP, \ |
| 179 | BIT(IIO_CHAN_INFO_SAMP_FREQ)) | ||
| 171 | 180 | ||
| 172 | #define AD_SD_SUPPLY_CHANNEL(_si, _channel, _address, _bits, _storagebits, \ | 181 | #define AD_SD_SUPPLY_CHANNEL(_si, _channel, _address, _bits, _storagebits, \ |
| 173 | _shift) \ | 182 | _shift) \ |
| 174 | __AD_SD_CHANNEL(_si, _channel, -1, _address, _bits, \ | 183 | __AD_SD_CHANNEL(_si, _channel, -1, _address, _bits, \ |
| 175 | _storagebits, _shift, "supply", IIO_VOLTAGE) | 184 | _storagebits, _shift, "supply", IIO_VOLTAGE, \ |
| 185 | BIT(IIO_CHAN_INFO_SAMP_FREQ)) | ||
| 176 | 186 | ||
| 177 | #endif | 187 | #endif |
diff --git a/include/linux/iio/adc/stm32-dfsdm-adc.h b/include/linux/iio/adc/stm32-dfsdm-adc.h index e7dc7a542a4e..0da298b41737 100644 --- a/include/linux/iio/adc/stm32-dfsdm-adc.h +++ b/include/linux/iio/adc/stm32-dfsdm-adc.h | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | #ifndef STM32_DFSDM_ADC_H | 9 | #ifndef STM32_DFSDM_ADC_H |
| 10 | #define STM32_DFSDM_ADC_H | 10 | #define STM32_DFSDM_ADC_H |
| 11 | 11 | ||
| 12 | #include <linux/iio/iio.h> | ||
| 13 | |||
| 12 | int stm32_dfsdm_get_buff_cb(struct iio_dev *iio_dev, | 14 | int stm32_dfsdm_get_buff_cb(struct iio_dev *iio_dev, |
| 13 | int (*cb)(const void *data, size_t size, | 15 | int (*cb)(const void *data, size_t size, |
| 14 | void *private), | 16 | void *private), |
diff --git a/include/linux/iio/buffer-dma.h b/include/linux/iio/buffer-dma.h index 767467d886de..67c75372b691 100644 --- a/include/linux/iio/buffer-dma.h +++ b/include/linux/iio/buffer-dma.h | |||
| @@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n, | |||
| 141 | char __user *user_buffer); | 141 | char __user *user_buffer); |
| 142 | size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); | 142 | size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); |
| 143 | int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); | 143 | int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); |
| 144 | int iio_dma_buffer_set_length(struct iio_buffer *buffer, int length); | 144 | int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length); |
| 145 | int iio_dma_buffer_request_update(struct iio_buffer *buffer); | 145 | int iio_dma_buffer_request_update(struct iio_buffer *buffer); |
| 146 | 146 | ||
| 147 | int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, | 147 | int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, |
diff --git a/include/linux/iio/common/cros_ec_sensors_core.h b/include/linux/iio/common/cros_ec_sensors_core.h new file mode 100644 index 000000000000..ce16445411ac --- /dev/null +++ b/include/linux/iio/common/cros_ec_sensors_core.h | |||
| @@ -0,0 +1,180 @@ | |||
| 1 | /* | ||
| 2 | * ChromeOS EC sensor hub | ||
| 3 | * | ||
| 4 | * Copyright (C) 2016 Google, Inc | ||
| 5 | * | ||
| 6 | * This software is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2, as published by the Free Software Foundation, and | ||
| 8 | * may be copied, distributed, and modified under those terms. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef __CROS_EC_SENSORS_CORE_H | ||
| 17 | #define __CROS_EC_SENSORS_CORE_H | ||
| 18 | |||
| 19 | #include <linux/iio/iio.h> | ||
| 20 | #include <linux/irqreturn.h> | ||
| 21 | #include <linux/mfd/cros_ec.h> | ||
| 22 | |||
| 23 | enum { | ||
| 24 | CROS_EC_SENSOR_X, | ||
| 25 | CROS_EC_SENSOR_Y, | ||
| 26 | CROS_EC_SENSOR_Z, | ||
| 27 | CROS_EC_SENSOR_MAX_AXIS, | ||
| 28 | }; | ||
| 29 | |||
| 30 | /* EC returns sensor values using signed 16 bit registers */ | ||
| 31 | #define CROS_EC_SENSOR_BITS 16 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * 4 16 bit channels are allowed. | ||
| 35 | * Good enough for current sensors, they use up to 3 16 bit vectors. | ||
| 36 | */ | ||
| 37 | #define CROS_EC_SAMPLE_SIZE (sizeof(s64) * 2) | ||
| 38 | |||
| 39 | /* Minimum sampling period to use when device is suspending */ | ||
| 40 | #define CROS_EC_MIN_SUSPEND_SAMPLING_FREQUENCY 1000 /* 1 second */ | ||
| 41 | |||
| 42 | /** | ||
| 43 | * struct cros_ec_sensors_core_state - state data for EC sensors IIO driver | ||
| 44 | * @ec: cros EC device structure | ||
| 45 | * @cmd_lock: lock used to prevent simultaneous access to the | ||
| 46 | * commands. | ||
| 47 | * @msg: cros EC command structure | ||
| 48 | * @param: motion sensor parameters structure | ||
| 49 | * @resp: motion sensor response structure | ||
| 50 | * @type: type of motion sensor | ||
| 51 | * @loc: location where the motion sensor is placed | ||
| 52 | * @calib: calibration parameters. Note that trigger | ||
| 53 | * captured data will always provide the calibrated | ||
| 54 | * data | ||
| 55 | * @samples: static array to hold data from a single capture. | ||
| 56 | * For each channel we need 2 bytes, except for | ||
| 57 | * the timestamp. The timestamp is always last and | ||
| 58 | * is always 8-byte aligned. | ||
| 59 | * @read_ec_sensors_data: function used for accessing sensors values | ||
| 60 | * @cuur_sampl_freq: current sampling period | ||
| 61 | */ | ||
| 62 | struct cros_ec_sensors_core_state { | ||
| 63 | struct cros_ec_device *ec; | ||
| 64 | struct mutex cmd_lock; | ||
| 65 | |||
| 66 | struct cros_ec_command *msg; | ||
| 67 | struct ec_params_motion_sense param; | ||
| 68 | struct ec_response_motion_sense *resp; | ||
| 69 | |||
| 70 | enum motionsensor_type type; | ||
| 71 | enum motionsensor_location loc; | ||
| 72 | |||
| 73 | s16 calib[CROS_EC_SENSOR_MAX_AXIS]; | ||
| 74 | |||
| 75 | u8 samples[CROS_EC_SAMPLE_SIZE]; | ||
| 76 | |||
| 77 | int (*read_ec_sensors_data)(struct iio_dev *indio_dev, | ||
| 78 | unsigned long scan_mask, s16 *data); | ||
| 79 | |||
| 80 | int curr_sampl_freq; | ||
| 81 | }; | ||
| 82 | |||
| 83 | /** | ||
| 84 | * cros_ec_sensors_read_lpc() - retrieve data from EC shared memory | ||
| 85 | * @indio_dev: pointer to IIO device | ||
| 86 | * @scan_mask: bitmap of the sensor indices to scan | ||
| 87 | * @data: location to store data | ||
| 88 | * | ||
| 89 | * This is the safe function for reading the EC data. It guarantees that the | ||
| 90 | * data sampled was not modified by the EC while being read. | ||
| 91 | * | ||
| 92 | * Return: 0 on success, -errno on failure. | ||
| 93 | */ | ||
| 94 | int cros_ec_sensors_read_lpc(struct iio_dev *indio_dev, unsigned long scan_mask, | ||
| 95 | s16 *data); | ||
| 96 | |||
| 97 | /** | ||
| 98 | * cros_ec_sensors_read_cmd() - retrieve data using the EC command protocol | ||
| 99 | * @indio_dev: pointer to IIO device | ||
| 100 | * @scan_mask: bitmap of the sensor indices to scan | ||
| 101 | * @data: location to store data | ||
| 102 | * | ||
| 103 | * Return: 0 on success, -errno on failure. | ||
| 104 | */ | ||
| 105 | int cros_ec_sensors_read_cmd(struct iio_dev *indio_dev, unsigned long scan_mask, | ||
| 106 | s16 *data); | ||
| 107 | |||
| 108 | struct platform_device; | ||
| 109 | /** | ||
| 110 | * cros_ec_sensors_core_init() - basic initialization of the core structure | ||
| 111 | * @pdev: platform device created for the sensors | ||
| 112 | * @indio_dev: iio device structure of the device | ||
| 113 | * @physical_device: true if the device refers to a physical device | ||
| 114 | * | ||
| 115 | * Return: 0 on success, -errno on failure. | ||
| 116 | */ | ||
| 117 | int cros_ec_sensors_core_init(struct platform_device *pdev, | ||
| 118 | struct iio_dev *indio_dev, bool physical_device); | ||
| 119 | |||
| 120 | /** | ||
| 121 | * cros_ec_sensors_capture() - the trigger handler function | ||
| 122 | * @irq: the interrupt number. | ||
| 123 | * @p: a pointer to the poll function. | ||
| 124 | * | ||
| 125 | * On a trigger event occurring, if the pollfunc is attached then this | ||
| 126 | * handler is called as a threaded interrupt (and hence may sleep). It | ||
| 127 | * is responsible for grabbing data from the device and pushing it into | ||
| 128 | * the associated buffer. | ||
| 129 | * | ||
| 130 | * Return: IRQ_HANDLED | ||
| 131 | */ | ||
| 132 | irqreturn_t cros_ec_sensors_capture(int irq, void *p); | ||
| 133 | |||
| 134 | /** | ||
| 135 | * cros_ec_motion_send_host_cmd() - send motion sense host command | ||
| 136 | * @st: pointer to state information for device | ||
| 137 | * @opt_length: optional length to reduce the response size, useful on the data | ||
| 138 | * path. Otherwise, the maximal allowed response size is used | ||
| 139 | * | ||
| 140 | * When called, the sub-command is assumed to be set in param->cmd. | ||
| 141 | * | ||
| 142 | * Return: 0 on success, -errno on failure. | ||
| 143 | */ | ||
| 144 | int cros_ec_motion_send_host_cmd(struct cros_ec_sensors_core_state *st, | ||
| 145 | u16 opt_length); | ||
| 146 | |||
| 147 | /** | ||
| 148 | * cros_ec_sensors_core_read() - function to request a value from the sensor | ||
| 149 | * @st: pointer to state information for device | ||
| 150 | * @chan: channel specification structure table | ||
| 151 | * @val: will contain one element making up the returned value | ||
| 152 | * @val2: will contain another element making up the returned value | ||
| 153 | * @mask: specifies which values to be requested | ||
| 154 | * | ||
| 155 | * Return: the type of value returned by the device | ||
| 156 | */ | ||
| 157 | int cros_ec_sensors_core_read(struct cros_ec_sensors_core_state *st, | ||
| 158 | struct iio_chan_spec const *chan, | ||
| 159 | int *val, int *val2, long mask); | ||
| 160 | |||
| 161 | /** | ||
| 162 | * cros_ec_sensors_core_write() - function to write a value to the sensor | ||
| 163 | * @st: pointer to state information for device | ||
| 164 | * @chan: channel specification structure table | ||
| 165 | * @val: first part of value to write | ||
| 166 | * @val2: second part of value to write | ||
| 167 | * @mask: specifies which values to write | ||
| 168 | * | ||
| 169 | * Return: the type of value returned by the device | ||
| 170 | */ | ||
| 171 | int cros_ec_sensors_core_write(struct cros_ec_sensors_core_state *st, | ||
| 172 | struct iio_chan_spec const *chan, | ||
| 173 | int val, int val2, long mask); | ||
| 174 | |||
| 175 | extern const struct dev_pm_ops cros_ec_sensors_pm_ops; | ||
| 176 | |||
| 177 | /* List of extended channel specification for all sensors */ | ||
| 178 | extern const struct iio_chan_spec_ext_info cros_ec_sensors_ext_info[]; | ||
| 179 | |||
| 180 | #endif /* __CROS_EC_SENSORS_CORE_H */ | ||
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 11579fd4126e..a74cb177dc6f 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
| @@ -183,18 +183,18 @@ struct iio_event_spec { | |||
| 183 | * @address: Driver specific identifier. | 183 | * @address: Driver specific identifier. |
| 184 | * @scan_index: Monotonic index to give ordering in scans when read | 184 | * @scan_index: Monotonic index to give ordering in scans when read |
| 185 | * from a buffer. | 185 | * from a buffer. |
| 186 | * @scan_type: sign: 's' or 'u' to specify signed or unsigned | 186 | * @scan_type: struct describing the scan type |
| 187 | * realbits: Number of valid bits of data | 187 | * @scan_type.sign: 's' or 'u' to specify signed or unsigned |
| 188 | * storagebits: Realbits + padding | 188 | * @scan_type.realbits: Number of valid bits of data |
| 189 | * shift: Shift right by this before masking out | 189 | * @scan_type.storagebits: Realbits + padding |
| 190 | * realbits. | 190 | * @scan_type.shift: Shift right by this before masking out |
| 191 | * repeat: Number of times real/storage bits | 191 | * realbits. |
| 192 | * repeats. When the repeat element is | 192 | * @scan_type.repeat: Number of times real/storage bits repeats. |
| 193 | * more than 1, then the type element in | 193 | * When the repeat element is more than 1, then |
| 194 | * sysfs will show a repeat value. | 194 | * the type element in sysfs will show a repeat |
| 195 | * Otherwise, the number of repetitions is | 195 | * value. Otherwise, the number of repetitions |
| 196 | * omitted. | 196 | * is omitted. |
| 197 | * endianness: little or big endian | 197 | * @scan_type.endianness: little or big endian |
| 198 | * @info_mask_separate: What information is to be exported that is specific to | 198 | * @info_mask_separate: What information is to be exported that is specific to |
| 199 | * this channel. | 199 | * this channel. |
| 200 | * @info_mask_separate_available: What availability information is to be | 200 | * @info_mask_separate_available: What availability information is to be |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index d7188de4db96..3f4bf60b0bb5 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
| @@ -100,7 +100,7 @@ static inline bool input_is_mt_axis(int axis) | |||
| 100 | return axis == ABS_MT_SLOT || input_is_mt_value(axis); | 100 | return axis == ABS_MT_SLOT || input_is_mt_value(axis); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void input_mt_report_slot_state(struct input_dev *dev, | 103 | bool input_mt_report_slot_state(struct input_dev *dev, |
| 104 | unsigned int tool_type, bool active); | 104 | unsigned int tool_type, bool active); |
| 105 | 105 | ||
| 106 | void input_mt_report_finger_count(struct input_dev *dev, int count); | 106 | void input_mt_report_finger_count(struct input_dev *dev, int count); |
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index ef169d67df92..1df940196ab2 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
| @@ -121,7 +121,6 @@ | |||
| 121 | #define ecap_srs(e) ((e >> 31) & 0x1) | 121 | #define ecap_srs(e) ((e >> 31) & 0x1) |
| 122 | #define ecap_ers(e) ((e >> 30) & 0x1) | 122 | #define ecap_ers(e) ((e >> 30) & 0x1) |
| 123 | #define ecap_prs(e) ((e >> 29) & 0x1) | 123 | #define ecap_prs(e) ((e >> 29) & 0x1) |
| 124 | #define ecap_broken_pasid(e) ((e >> 28) & 0x1) | ||
| 125 | #define ecap_dis(e) ((e >> 27) & 0x1) | 124 | #define ecap_dis(e) ((e >> 27) & 0x1) |
| 126 | #define ecap_nest(e) ((e >> 26) & 0x1) | 125 | #define ecap_nest(e) ((e >> 26) & 0x1) |
| 127 | #define ecap_mts(e) ((e >> 25) & 0x1) | 126 | #define ecap_mts(e) ((e >> 25) & 0x1) |
diff --git a/include/linux/irq.h b/include/linux/irq.h index b2067083aa94..201de12a9957 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -503,6 +503,7 @@ struct irq_chip { | |||
| 503 | * IRQCHIP_SKIP_SET_WAKE: Skip chip.irq_set_wake(), for this irq chip | 503 | * IRQCHIP_SKIP_SET_WAKE: Skip chip.irq_set_wake(), for this irq chip |
| 504 | * IRQCHIP_ONESHOT_SAFE: One shot does not require mask/unmask | 504 | * IRQCHIP_ONESHOT_SAFE: One shot does not require mask/unmask |
| 505 | * IRQCHIP_EOI_THREADED: Chip requires eoi() on unmask in threaded mode | 505 | * IRQCHIP_EOI_THREADED: Chip requires eoi() on unmask in threaded mode |
| 506 | * IRQCHIP_SUPPORTS_LEVEL_MSI Chip can provide two doorbells for Level MSIs | ||
| 506 | */ | 507 | */ |
| 507 | enum { | 508 | enum { |
| 508 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | 509 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), |
| @@ -552,7 +553,12 @@ extern int irq_affinity_online_cpu(unsigned int cpu); | |||
| 552 | #endif | 553 | #endif |
| 553 | 554 | ||
| 554 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) | 555 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) |
| 555 | void irq_move_irq(struct irq_data *data); | 556 | void __irq_move_irq(struct irq_data *data); |
| 557 | static inline void irq_move_irq(struct irq_data *data) | ||
| 558 | { | ||
| 559 | if (unlikely(irqd_is_setaffinity_pending(data))) | ||
| 560 | __irq_move_irq(data); | ||
| 561 | } | ||
| 556 | void irq_move_masked_irq(struct irq_data *data); | 562 | void irq_move_masked_irq(struct irq_data *data); |
| 557 | void irq_force_complete_move(struct irq_desc *desc); | 563 | void irq_force_complete_move(struct irq_desc *desc); |
| 558 | #else | 564 | #else |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 25b33b664537..dd1e40ddac7d 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -145,11 +145,6 @@ static inline void *irq_desc_get_handler_data(struct irq_desc *desc) | |||
| 145 | return desc->irq_common_data.handler_data; | 145 | return desc->irq_common_data.handler_data; |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) | ||
| 149 | { | ||
| 150 | return desc->irq_common_data.msi_desc; | ||
| 151 | } | ||
| 152 | |||
| 153 | /* | 148 | /* |
| 154 | * Architectures call this to let the generic IRQ layer | 149 | * Architectures call this to let the generic IRQ layer |
| 155 | * handle an interrupt. | 150 | * handle an interrupt. |
diff --git a/include/linux/kcov.h b/include/linux/kcov.h index 3ecf6f5e3a5f..b76a1807028d 100644 --- a/include/linux/kcov.h +++ b/include/linux/kcov.h | |||
| @@ -22,13 +22,27 @@ enum kcov_mode { | |||
| 22 | KCOV_MODE_TRACE_CMP = 3, | 22 | KCOV_MODE_TRACE_CMP = 3, |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | #define KCOV_IN_CTXSW (1 << 30) | ||
| 26 | |||
| 25 | void kcov_task_init(struct task_struct *t); | 27 | void kcov_task_init(struct task_struct *t); |
| 26 | void kcov_task_exit(struct task_struct *t); | 28 | void kcov_task_exit(struct task_struct *t); |
| 27 | 29 | ||
| 30 | #define kcov_prepare_switch(t) \ | ||
| 31 | do { \ | ||
| 32 | (t)->kcov_mode |= KCOV_IN_CTXSW; \ | ||
| 33 | } while (0) | ||
| 34 | |||
| 35 | #define kcov_finish_switch(t) \ | ||
| 36 | do { \ | ||
| 37 | (t)->kcov_mode &= ~KCOV_IN_CTXSW; \ | ||
| 38 | } while (0) | ||
| 39 | |||
| 28 | #else | 40 | #else |
| 29 | 41 | ||
| 30 | static inline void kcov_task_init(struct task_struct *t) {} | 42 | static inline void kcov_task_init(struct task_struct *t) {} |
| 31 | static inline void kcov_task_exit(struct task_struct *t) {} | 43 | static inline void kcov_task_exit(struct task_struct *t) {} |
| 44 | static inline void kcov_prepare_switch(struct task_struct *t) {} | ||
| 45 | static inline void kcov_finish_switch(struct task_struct *t) {} | ||
| 32 | 46 | ||
| 33 | #endif /* CONFIG_KCOV */ | 47 | #endif /* CONFIG_KCOV */ |
| 34 | #endif /* _LINUX_KCOV_H */ | 48 | #endif /* _LINUX_KCOV_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7c4e8f1f72d8..941dc0a5a877 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -666,7 +666,7 @@ do { \ | |||
| 666 | * your code. (Extra memory is used for special buffers that are | 666 | * your code. (Extra memory is used for special buffers that are |
| 667 | * allocated when trace_printk() is used.) | 667 | * allocated when trace_printk() is used.) |
| 668 | * | 668 | * |
| 669 | * A little optization trick is done here. If there's only one | 669 | * A little optimization trick is done here. If there's only one |
| 670 | * argument, there's no need to scan the string for printf formats. | 670 | * argument, there's no need to scan the string for printf formats. |
| 671 | * The trace_puts() will suffice. But how can we take advantage of | 671 | * The trace_puts() will suffice. But how can we take advantage of |
| 672 | * using trace_puts() when trace_printk() has only one argument? | 672 | * using trace_puts() when trace_printk() has only one argument? |
| @@ -966,6 +966,22 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 966 | "pointer type mismatch in container_of()"); \ | 966 | "pointer type mismatch in container_of()"); \ |
| 967 | ((type *)(__mptr - offsetof(type, member))); }) | 967 | ((type *)(__mptr - offsetof(type, member))); }) |
| 968 | 968 | ||
| 969 | /** | ||
| 970 | * container_of_safe - cast a member of a structure out to the containing structure | ||
| 971 | * @ptr: the pointer to the member. | ||
| 972 | * @type: the type of the container struct this is embedded in. | ||
| 973 | * @member: the name of the member within the struct. | ||
| 974 | * | ||
| 975 | * If IS_ERR_OR_NULL(ptr), ptr is returned unchanged. | ||
| 976 | */ | ||
| 977 | #define container_of_safe(ptr, type, member) ({ \ | ||
| 978 | void *__mptr = (void *)(ptr); \ | ||
| 979 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ | ||
| 980 | !__same_type(*(ptr), void), \ | ||
| 981 | "pointer type mismatch in container_of()"); \ | ||
| 982 | IS_ERR_OR_NULL(__mptr) ? ERR_CAST(__mptr) : \ | ||
| 983 | ((type *)(__mptr - offsetof(type, member))); }) | ||
| 984 | |||
| 969 | /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ | 985 | /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ |
| 970 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 986 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
| 971 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD | 987 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 2803264c512f..c1961761311d 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -62,7 +62,6 @@ void *kthread_probe_data(struct task_struct *k); | |||
| 62 | int kthread_park(struct task_struct *k); | 62 | int kthread_park(struct task_struct *k); |
| 63 | void kthread_unpark(struct task_struct *k); | 63 | void kthread_unpark(struct task_struct *k); |
| 64 | void kthread_parkme(void); | 64 | void kthread_parkme(void); |
| 65 | void kthread_park_complete(struct task_struct *k); | ||
| 66 | 65 | ||
| 67 | int kthreadd(void *unused); | 66 | int kthreadd(void *unused); |
| 68 | extern struct task_struct *kthreadd_task; | 67 | extern struct task_struct *kthreadd_task; |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 6d6e79c59e68..4ee7bc548a83 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/preempt.h> | 19 | #include <linux/preempt.h> |
| 20 | #include <linux/msi.h> | 20 | #include <linux/msi.h> |
| 21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
| 22 | #include <linux/vmalloc.h> | ||
| 22 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
| 23 | #include <linux/ratelimit.h> | 24 | #include <linux/ratelimit.h> |
| 24 | #include <linux/err.h> | 25 | #include <linux/err.h> |
| @@ -730,13 +731,16 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu); | |||
| 730 | 731 | ||
| 731 | void kvm_flush_remote_tlbs(struct kvm *kvm); | 732 | void kvm_flush_remote_tlbs(struct kvm *kvm); |
| 732 | void kvm_reload_remote_mmus(struct kvm *kvm); | 733 | void kvm_reload_remote_mmus(struct kvm *kvm); |
| 734 | |||
| 735 | bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req, | ||
| 736 | unsigned long *vcpu_bitmap, cpumask_var_t tmp); | ||
| 733 | bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req); | 737 | bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req); |
| 734 | 738 | ||
| 735 | long kvm_arch_dev_ioctl(struct file *filp, | 739 | long kvm_arch_dev_ioctl(struct file *filp, |
| 736 | unsigned int ioctl, unsigned long arg); | 740 | unsigned int ioctl, unsigned long arg); |
| 737 | long kvm_arch_vcpu_ioctl(struct file *filp, | 741 | long kvm_arch_vcpu_ioctl(struct file *filp, |
| 738 | unsigned int ioctl, unsigned long arg); | 742 | unsigned int ioctl, unsigned long arg); |
| 739 | int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); | 743 | vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); |
| 740 | 744 | ||
| 741 | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext); | 745 | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext); |
| 742 | 746 | ||
| @@ -808,6 +812,10 @@ bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu); | |||
| 808 | int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu); | 812 | int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu); |
| 809 | 813 | ||
| 810 | #ifndef __KVM_HAVE_ARCH_VM_ALLOC | 814 | #ifndef __KVM_HAVE_ARCH_VM_ALLOC |
| 815 | /* | ||
| 816 | * All architectures that want to use vzalloc currently also | ||
| 817 | * need their own kvm_arch_alloc_vm implementation. | ||
| 818 | */ | ||
| 811 | static inline struct kvm *kvm_arch_alloc_vm(void) | 819 | static inline struct kvm *kvm_arch_alloc_vm(void) |
| 812 | { | 820 | { |
| 813 | return kzalloc(sizeof(struct kvm), GFP_KERNEL); | 821 | return kzalloc(sizeof(struct kvm), GFP_KERNEL); |
| @@ -1270,4 +1278,13 @@ static inline long kvm_arch_vcpu_async_ioctl(struct file *filp, | |||
| 1270 | void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm, | 1278 | void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm, |
| 1271 | unsigned long start, unsigned long end); | 1279 | unsigned long start, unsigned long end); |
| 1272 | 1280 | ||
| 1281 | #ifdef CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE | ||
| 1282 | int kvm_arch_vcpu_run_pid_change(struct kvm_vcpu *vcpu); | ||
| 1283 | #else | ||
| 1284 | static inline int kvm_arch_vcpu_run_pid_change(struct kvm_vcpu *vcpu) | ||
| 1285 | { | ||
| 1286 | return 0; | ||
| 1287 | } | ||
| 1288 | #endif /* CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE */ | ||
| 1289 | |||
| 1273 | #endif | 1290 | #endif |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 9db904344c75..8b8946dd63b9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -1130,6 +1130,8 @@ extern void ata_sas_async_probe(struct ata_port *ap); | |||
| 1130 | extern int ata_sas_sync_probe(struct ata_port *ap); | 1130 | extern int ata_sas_sync_probe(struct ata_port *ap); |
| 1131 | extern int ata_sas_port_init(struct ata_port *); | 1131 | extern int ata_sas_port_init(struct ata_port *); |
| 1132 | extern int ata_sas_port_start(struct ata_port *ap); | 1132 | extern int ata_sas_port_start(struct ata_port *ap); |
| 1133 | extern int ata_sas_tport_add(struct device *parent, struct ata_port *ap); | ||
| 1134 | extern void ata_sas_tport_delete(struct ata_port *ap); | ||
| 1133 | extern void ata_sas_port_stop(struct ata_port *ap); | 1135 | extern void ata_sas_port_stop(struct ata_port *ap); |
| 1134 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); | 1136 | extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *); |
| 1135 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap); | 1137 | extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap); |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index f68db9e450eb..d7618c41f74c 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
| @@ -24,16 +24,16 @@ | |||
| 24 | 24 | ||
| 25 | #ifndef cond_syscall | 25 | #ifndef cond_syscall |
| 26 | #define cond_syscall(x) asm( \ | 26 | #define cond_syscall(x) asm( \ |
| 27 | ".weak " VMLINUX_SYMBOL_STR(x) "\n\t" \ | 27 | ".weak " __stringify(x) "\n\t" \ |
| 28 | ".set " VMLINUX_SYMBOL_STR(x) "," \ | 28 | ".set " __stringify(x) "," \ |
| 29 | VMLINUX_SYMBOL_STR(sys_ni_syscall)) | 29 | __stringify(sys_ni_syscall)) |
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| 32 | #ifndef SYSCALL_ALIAS | 32 | #ifndef SYSCALL_ALIAS |
| 33 | #define SYSCALL_ALIAS(alias, name) asm( \ | 33 | #define SYSCALL_ALIAS(alias, name) asm( \ |
| 34 | ".globl " VMLINUX_SYMBOL_STR(alias) "\n\t" \ | 34 | ".globl " __stringify(alias) "\n\t" \ |
| 35 | ".set " VMLINUX_SYMBOL_STR(alias) "," \ | 35 | ".set " __stringify(alias) "," \ |
| 36 | VMLINUX_SYMBOL_STR(name)) | 36 | __stringify(name)) |
| 37 | #endif | 37 | #endif |
| 38 | 38 | ||
| 39 | #define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE) | 39 | #define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE) |
diff --git a/include/linux/log2.h b/include/linux/log2.h index 41a1ae010993..2af7f77866d0 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h | |||
| @@ -72,16 +72,13 @@ unsigned long __rounddown_pow_of_two(unsigned long n) | |||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | /** | 74 | /** |
| 75 | * ilog2 - log base 2 of 32-bit or a 64-bit unsigned value | 75 | * const_ilog2 - log base 2 of 32-bit or a 64-bit constant unsigned value |
| 76 | * @n: parameter | 76 | * @n: parameter |
| 77 | * | 77 | * |
| 78 | * constant-capable log of base 2 calculation | 78 | * Use this where sparse expects a true constant expression, e.g. for array |
| 79 | * - this can be used to initialise global variables from constant data, hence | 79 | * indices. |
| 80 | * the massive ternary operator construction | ||
| 81 | * | ||
| 82 | * selects the appropriately-sized optimised version depending on sizeof(n) | ||
| 83 | */ | 80 | */ |
| 84 | #define ilog2(n) \ | 81 | #define const_ilog2(n) \ |
| 85 | ( \ | 82 | ( \ |
| 86 | __builtin_constant_p(n) ? ( \ | 83 | __builtin_constant_p(n) ? ( \ |
| 87 | (n) < 2 ? 0 : \ | 84 | (n) < 2 ? 0 : \ |
| @@ -147,10 +144,26 @@ unsigned long __rounddown_pow_of_two(unsigned long n) | |||
| 147 | (n) & (1ULL << 4) ? 4 : \ | 144 | (n) & (1ULL << 4) ? 4 : \ |
| 148 | (n) & (1ULL << 3) ? 3 : \ | 145 | (n) & (1ULL << 3) ? 3 : \ |
| 149 | (n) & (1ULL << 2) ? 2 : \ | 146 | (n) & (1ULL << 2) ? 2 : \ |
| 150 | 1 ) : \ | 147 | 1) : \ |
| 151 | (sizeof(n) <= 4) ? \ | 148 | -1) |
| 152 | __ilog2_u32(n) : \ | 149 | |
| 153 | __ilog2_u64(n) \ | 150 | /** |
| 151 | * ilog2 - log base 2 of 32-bit or a 64-bit unsigned value | ||
| 152 | * @n: parameter | ||
| 153 | * | ||
| 154 | * constant-capable log of base 2 calculation | ||
| 155 | * - this can be used to initialise global variables from constant data, hence | ||
| 156 | * the massive ternary operator construction | ||
| 157 | * | ||
| 158 | * selects the appropriately-sized optimised version depending on sizeof(n) | ||
| 159 | */ | ||
| 160 | #define ilog2(n) \ | ||
| 161 | ( \ | ||
| 162 | __builtin_constant_p(n) ? \ | ||
| 163 | const_ilog2(n) : \ | ||
| 164 | (sizeof(n) <= 4) ? \ | ||
| 165 | __ilog2_u32(n) : \ | ||
| 166 | __ilog2_u64(n) \ | ||
| 154 | ) | 167 | ) |
| 155 | 168 | ||
| 156 | /** | 169 | /** |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 4f52ec755725..6c6fb116e925 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -53,6 +53,7 @@ enum memcg_memory_event { | |||
| 53 | MEMCG_HIGH, | 53 | MEMCG_HIGH, |
| 54 | MEMCG_MAX, | 54 | MEMCG_MAX, |
| 55 | MEMCG_OOM, | 55 | MEMCG_OOM, |
| 56 | MEMCG_OOM_KILL, | ||
| 56 | MEMCG_SWAP_MAX, | 57 | MEMCG_SWAP_MAX, |
| 57 | MEMCG_SWAP_FAIL, | 58 | MEMCG_SWAP_FAIL, |
| 58 | MEMCG_NR_MEMORY_EVENTS, | 59 | MEMCG_NR_MEMORY_EVENTS, |
| @@ -720,11 +721,8 @@ static inline void count_memcg_event_mm(struct mm_struct *mm, | |||
| 720 | 721 | ||
| 721 | rcu_read_lock(); | 722 | rcu_read_lock(); |
| 722 | memcg = mem_cgroup_from_task(rcu_dereference(mm->owner)); | 723 | memcg = mem_cgroup_from_task(rcu_dereference(mm->owner)); |
| 723 | if (likely(memcg)) { | 724 | if (likely(memcg)) |
| 724 | count_memcg_events(memcg, idx, 1); | 725 | count_memcg_events(memcg, idx, 1); |
| 725 | if (idx == OOM_KILL) | ||
| 726 | cgroup_file_notify(&memcg->events_file); | ||
| 727 | } | ||
| 728 | rcu_read_unlock(); | 726 | rcu_read_unlock(); |
| 729 | } | 727 | } |
| 730 | 728 | ||
| @@ -735,6 +733,21 @@ static inline void memcg_memory_event(struct mem_cgroup *memcg, | |||
| 735 | cgroup_file_notify(&memcg->events_file); | 733 | cgroup_file_notify(&memcg->events_file); |
| 736 | } | 734 | } |
| 737 | 735 | ||
| 736 | static inline void memcg_memory_event_mm(struct mm_struct *mm, | ||
| 737 | enum memcg_memory_event event) | ||
| 738 | { | ||
| 739 | struct mem_cgroup *memcg; | ||
| 740 | |||
| 741 | if (mem_cgroup_disabled()) | ||
| 742 | return; | ||
| 743 | |||
| 744 | rcu_read_lock(); | ||
| 745 | memcg = mem_cgroup_from_task(rcu_dereference(mm->owner)); | ||
| 746 | if (likely(memcg)) | ||
| 747 | memcg_memory_event(memcg, event); | ||
| 748 | rcu_read_unlock(); | ||
| 749 | } | ||
| 750 | |||
| 738 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 751 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| 739 | void mem_cgroup_split_huge_fixup(struct page *head); | 752 | void mem_cgroup_split_huge_fixup(struct page *head); |
| 740 | #endif | 753 | #endif |
| @@ -756,6 +769,11 @@ static inline void memcg_memory_event(struct mem_cgroup *memcg, | |||
| 756 | { | 769 | { |
| 757 | } | 770 | } |
| 758 | 771 | ||
| 772 | static inline void memcg_memory_event_mm(struct mm_struct *mm, | ||
| 773 | enum memcg_memory_event event) | ||
| 774 | { | ||
| 775 | } | ||
| 776 | |||
| 759 | static inline enum mem_cgroup_protection mem_cgroup_protected( | 777 | static inline enum mem_cgroup_protection mem_cgroup_protected( |
| 760 | struct mem_cgroup *root, struct mem_cgroup *memcg) | 778 | struct mem_cgroup *root, struct mem_cgroup *memcg) |
| 761 | { | 779 | { |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 31ca3e28b0eb..a6ddefc60517 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -38,6 +38,7 @@ struct memory_block { | |||
| 38 | 38 | ||
| 39 | int arch_get_memory_phys_device(unsigned long start_pfn); | 39 | int arch_get_memory_phys_device(unsigned long start_pfn); |
| 40 | unsigned long memory_block_size_bytes(void); | 40 | unsigned long memory_block_size_bytes(void); |
| 41 | int set_memory_block_size_order(unsigned int order); | ||
| 41 | 42 | ||
| 42 | /* These states are exposed to userspace as text strings in sysfs */ | 43 | /* These states are exposed to userspace as text strings in sysfs */ |
| 43 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ | 44 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ |
diff --git a/include/linux/memremap.h b/include/linux/memremap.h index 74ea5e2310a8..f91f9e763557 100644 --- a/include/linux/memremap.h +++ b/include/linux/memremap.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _LINUX_MEMREMAP_H_ | 2 | #ifndef _LINUX_MEMREMAP_H_ |
| 3 | #define _LINUX_MEMREMAP_H_ | 3 | #define _LINUX_MEMREMAP_H_ |
| 4 | #include <linux/mm.h> | ||
| 5 | #include <linux/ioport.h> | 4 | #include <linux/ioport.h> |
| 6 | #include <linux/percpu-refcount.h> | 5 | #include <linux/percpu-refcount.h> |
| 7 | 6 | ||
| @@ -30,13 +29,6 @@ struct vmem_altmap { | |||
| 30 | * Specialize ZONE_DEVICE memory into multiple types each having differents | 29 | * Specialize ZONE_DEVICE memory into multiple types each having differents |
| 31 | * usage. | 30 | * usage. |
| 32 | * | 31 | * |
| 33 | * MEMORY_DEVICE_HOST: | ||
| 34 | * Persistent device memory (pmem): struct page might be allocated in different | ||
| 35 | * memory and architecture might want to perform special actions. It is similar | ||
| 36 | * to regular memory, in that the CPU can access it transparently. However, | ||
| 37 | * it is likely to have different bandwidth and latency than regular memory. | ||
| 38 | * See Documentation/nvdimm/nvdimm.txt for more information. | ||
| 39 | * | ||
| 40 | * MEMORY_DEVICE_PRIVATE: | 32 | * MEMORY_DEVICE_PRIVATE: |
| 41 | * Device memory that is not directly addressable by the CPU: CPU can neither | 33 | * Device memory that is not directly addressable by the CPU: CPU can neither |
| 42 | * read nor write private memory. In this case, we do still have struct pages | 34 | * read nor write private memory. In this case, we do still have struct pages |
| @@ -53,11 +45,19 @@ struct vmem_altmap { | |||
| 53 | * driver can hotplug the device memory using ZONE_DEVICE and with that memory | 45 | * driver can hotplug the device memory using ZONE_DEVICE and with that memory |
| 54 | * type. Any page of a process can be migrated to such memory. However no one | 46 | * type. Any page of a process can be migrated to such memory. However no one |
| 55 | * should be allow to pin such memory so that it can always be evicted. | 47 | * should be allow to pin such memory so that it can always be evicted. |
| 48 | * | ||
| 49 | * MEMORY_DEVICE_FS_DAX: | ||
| 50 | * Host memory that has similar access semantics as System RAM i.e. DMA | ||
| 51 | * coherent and supports page pinning. In support of coordinating page | ||
| 52 | * pinning vs other operations MEMORY_DEVICE_FS_DAX arranges for a | ||
| 53 | * wakeup event whenever a page is unpinned and becomes idle. This | ||
| 54 | * wakeup is used to coordinate physical address space management (ex: | ||
| 55 | * fs truncate/hole punch) vs pinned pages (ex: device dma). | ||
| 56 | */ | 56 | */ |
| 57 | enum memory_type { | 57 | enum memory_type { |
| 58 | MEMORY_DEVICE_HOST = 0, | 58 | MEMORY_DEVICE_PRIVATE = 1, |
| 59 | MEMORY_DEVICE_PRIVATE, | ||
| 60 | MEMORY_DEVICE_PUBLIC, | 59 | MEMORY_DEVICE_PUBLIC, |
| 60 | MEMORY_DEVICE_FS_DAX, | ||
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | /* | 63 | /* |
| @@ -129,8 +129,6 @@ struct dev_pagemap *get_dev_pagemap(unsigned long pfn, | |||
| 129 | 129 | ||
| 130 | unsigned long vmem_altmap_offset(struct vmem_altmap *altmap); | 130 | unsigned long vmem_altmap_offset(struct vmem_altmap *altmap); |
| 131 | void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns); | 131 | void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns); |
| 132 | |||
| 133 | static inline bool is_zone_device_page(const struct page *page); | ||
| 134 | #else | 132 | #else |
| 135 | static inline void *devm_memremap_pages(struct device *dev, | 133 | static inline void *devm_memremap_pages(struct device *dev, |
| 136 | struct dev_pagemap *pgmap) | 134 | struct dev_pagemap *pgmap) |
| @@ -161,20 +159,6 @@ static inline void vmem_altmap_free(struct vmem_altmap *altmap, | |||
| 161 | } | 159 | } |
| 162 | #endif /* CONFIG_ZONE_DEVICE */ | 160 | #endif /* CONFIG_ZONE_DEVICE */ |
| 163 | 161 | ||
| 164 | #if defined(CONFIG_DEVICE_PRIVATE) || defined(CONFIG_DEVICE_PUBLIC) | ||
| 165 | static inline bool is_device_private_page(const struct page *page) | ||
| 166 | { | ||
| 167 | return is_zone_device_page(page) && | ||
| 168 | page->pgmap->type == MEMORY_DEVICE_PRIVATE; | ||
| 169 | } | ||
| 170 | |||
| 171 | static inline bool is_device_public_page(const struct page *page) | ||
| 172 | { | ||
| 173 | return is_zone_device_page(page) && | ||
| 174 | page->pgmap->type == MEMORY_DEVICE_PUBLIC; | ||
| 175 | } | ||
| 176 | #endif /* CONFIG_DEVICE_PRIVATE || CONFIG_DEVICE_PUBLIC */ | ||
| 177 | |||
| 178 | static inline void put_dev_pagemap(struct dev_pagemap *pgmap) | 162 | static inline void put_dev_pagemap(struct dev_pagemap *pgmap) |
| 179 | { | 163 | { |
| 180 | if (pgmap) | 164 | if (pgmap) |
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 44412c9d26e1..aa09414756db 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
| @@ -271,7 +271,6 @@ struct abx500_bm_data { | |||
| 271 | bool autopower_cfg; | 271 | bool autopower_cfg; |
| 272 | bool ac_enabled; | 272 | bool ac_enabled; |
| 273 | bool usb_enabled; | 273 | bool usb_enabled; |
| 274 | bool usb_power_path; | ||
| 275 | bool no_maintenance; | 274 | bool no_maintenance; |
| 276 | bool capacity_scaling; | 275 | bool capacity_scaling; |
| 277 | bool chg_unknown_bat; | 276 | bool chg_unknown_bat; |
diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h index e63681eb6c62..c06daf3d490a 100644 --- a/include/linux/mfd/abx500/ab8500-bm.h +++ b/include/linux/mfd/abx500/ab8500-bm.h | |||
| @@ -248,8 +248,6 @@ enum bup_vch_sel { | |||
| 248 | #define BAT_CTRL_20U_ENA 0x02 | 248 | #define BAT_CTRL_20U_ENA 0x02 |
| 249 | #define BAT_CTRL_18U_ENA 0x01 | 249 | #define BAT_CTRL_18U_ENA 0x01 |
| 250 | #define BAT_CTRL_16U_ENA 0x02 | 250 | #define BAT_CTRL_16U_ENA 0x02 |
| 251 | #define BAT_CTRL_60U_ENA 0x01 | ||
| 252 | #define BAT_CTRL_120U_ENA 0x02 | ||
| 253 | #define BAT_CTRL_CMP_ENA 0x04 | 251 | #define BAT_CTRL_CMP_ENA 0x04 |
| 254 | #define FORCE_BAT_CTRL_CMP_HIGH 0x08 | 252 | #define FORCE_BAT_CTRL_CMP_HIGH 0x08 |
| 255 | #define BAT_CTRL_PULL_UP_ENA 0x10 | 253 | #define BAT_CTRL_PULL_UP_ENA 0x10 |
diff --git a/include/linux/mfd/abx500/ux500_chargalg.h b/include/linux/mfd/abx500/ux500_chargalg.h index 67703f23e7ba..669894f434f5 100644 --- a/include/linux/mfd/abx500/ux500_chargalg.h +++ b/include/linux/mfd/abx500/ux500_chargalg.h | |||
| @@ -25,8 +25,6 @@ struct ux500_charger_ops { | |||
| 25 | int (*check_enable) (struct ux500_charger *, int, int); | 25 | int (*check_enable) (struct ux500_charger *, int, int); |
| 26 | int (*kick_wd) (struct ux500_charger *); | 26 | int (*kick_wd) (struct ux500_charger *); |
| 27 | int (*update_curr) (struct ux500_charger *, int); | 27 | int (*update_curr) (struct ux500_charger *, int); |
| 28 | int (*pp_enable) (struct ux500_charger *, bool); | ||
| 29 | int (*pre_chg_enable) (struct ux500_charger *, bool); | ||
| 30 | }; | 28 | }; |
| 31 | 29 | ||
| 32 | /** | 30 | /** |
| @@ -37,7 +35,6 @@ struct ux500_charger_ops { | |||
| 37 | * @max_out_curr maximum output charger current in mA | 35 | * @max_out_curr maximum output charger current in mA |
| 38 | * @enabled indicates if this charger is used or not | 36 | * @enabled indicates if this charger is used or not |
| 39 | * @external external charger unit (pm2xxx) | 37 | * @external external charger unit (pm2xxx) |
| 40 | * @power_path USB power path support | ||
| 41 | */ | 38 | */ |
| 42 | struct ux500_charger { | 39 | struct ux500_charger { |
| 43 | struct power_supply *psy; | 40 | struct power_supply *psy; |
| @@ -47,7 +44,6 @@ struct ux500_charger { | |||
| 47 | int wdt_refresh; | 44 | int wdt_refresh; |
| 48 | bool enabled; | 45 | bool enabled; |
| 49 | bool external; | 46 | bool external; |
| 50 | bool power_path; | ||
| 51 | }; | 47 | }; |
| 52 | 48 | ||
| 53 | extern struct blocking_notifier_head charger_notifier_list; | 49 | extern struct blocking_notifier_head charger_notifier_list; |
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index f72dc53848d7..0013075d4cda 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h | |||
| @@ -56,6 +56,7 @@ | |||
| 56 | #define ARIZONA_MAX_PDM_SPK 2 | 56 | #define ARIZONA_MAX_PDM_SPK 2 |
| 57 | 57 | ||
| 58 | struct regulator_init_data; | 58 | struct regulator_init_data; |
| 59 | struct gpio_desc; | ||
| 59 | 60 | ||
| 60 | struct arizona_micbias { | 61 | struct arizona_micbias { |
| 61 | int mV; /** Regulated voltage */ | 62 | int mV; /** Regulated voltage */ |
| @@ -77,7 +78,7 @@ struct arizona_micd_range { | |||
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| 79 | struct arizona_pdata { | 80 | struct arizona_pdata { |
| 80 | int reset; /** GPIO controlling /RESET, if any */ | 81 | struct gpio_desc *reset; /** GPIO controlling /RESET, if any */ |
| 81 | 82 | ||
| 82 | /** Regulator configuration for MICVDD */ | 83 | /** Regulator configuration for MICVDD */ |
| 83 | struct arizona_micsupp_pdata micvdd; | 84 | struct arizona_micsupp_pdata micvdd; |
diff --git a/include/linux/mfd/as3711.h b/include/linux/mfd/as3711.h index 34cc85864be5..ddd0b953323b 100644 --- a/include/linux/mfd/as3711.h +++ b/include/linux/mfd/as3711.h | |||
| @@ -108,9 +108,9 @@ struct as3711_regulator_pdata { | |||
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | struct as3711_bl_pdata { | 110 | struct as3711_bl_pdata { |
| 111 | const char *su1_fb; | 111 | bool su1_fb; |
| 112 | int su1_max_uA; | 112 | int su1_max_uA; |
| 113 | const char *su2_fb; | 113 | bool su2_fb; |
| 114 | int su2_max_uA; | 114 | int su2_max_uA; |
| 115 | enum as3711_su2_feedback su2_feedback; | 115 | enum as3711_su2_feedback su2_feedback; |
| 116 | enum as3711_su2_fbprot su2_fbprot; | 116 | enum as3711_su2_fbprot su2_fbprot; |
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 82bf7747b312..517e60eecbcb 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h | |||
| @@ -592,11 +592,11 @@ enum axp806_irqs { | |||
| 592 | AXP806_IRQ_DCDCC_V_LOW, | 592 | AXP806_IRQ_DCDCC_V_LOW, |
| 593 | AXP806_IRQ_DCDCD_V_LOW, | 593 | AXP806_IRQ_DCDCD_V_LOW, |
| 594 | AXP806_IRQ_DCDCE_V_LOW, | 594 | AXP806_IRQ_DCDCE_V_LOW, |
| 595 | AXP806_IRQ_PWROK_LONG, | 595 | AXP806_IRQ_POK_LONG, |
| 596 | AXP806_IRQ_PWROK_SHORT, | 596 | AXP806_IRQ_POK_SHORT, |
| 597 | AXP806_IRQ_WAKEUP, | 597 | AXP806_IRQ_WAKEUP, |
| 598 | AXP806_IRQ_PWROK_FALL, | 598 | AXP806_IRQ_POK_FALL, |
| 599 | AXP806_IRQ_PWROK_RISE, | 599 | AXP806_IRQ_POK_RISE, |
| 600 | }; | 600 | }; |
| 601 | 601 | ||
| 602 | enum axp809_irqs { | 602 | enum axp809_irqs { |
| @@ -642,7 +642,7 @@ struct axp20x_dev { | |||
| 642 | struct regmap_irq_chip_data *regmap_irqc; | 642 | struct regmap_irq_chip_data *regmap_irqc; |
| 643 | long variant; | 643 | long variant; |
| 644 | int nr_cells; | 644 | int nr_cells; |
| 645 | struct mfd_cell *cells; | 645 | const struct mfd_cell *cells; |
| 646 | const struct regmap_config *regmap_cfg; | 646 | const struct regmap_config *regmap_cfg; |
| 647 | const struct regmap_irq_chip *regmap_irq_chip; | 647 | const struct regmap_irq_chip *regmap_irq_chip; |
| 648 | }; | 648 | }; |
diff --git a/include/linux/mfd/bd9571mwv.h b/include/linux/mfd/bd9571mwv.h index f0708ba4cbba..eb05569f752b 100644 --- a/include/linux/mfd/bd9571mwv.h +++ b/include/linux/mfd/bd9571mwv.h | |||
| @@ -33,6 +33,11 @@ | |||
| 33 | #define BD9571MWV_I2C_MD2_E1_BIT_2 0x12 | 33 | #define BD9571MWV_I2C_MD2_E1_BIT_2 0x12 |
| 34 | 34 | ||
| 35 | #define BD9571MWV_BKUP_MODE_CNT 0x20 | 35 | #define BD9571MWV_BKUP_MODE_CNT 0x20 |
| 36 | #define BD9571MWV_BKUP_MODE_CNT_KEEPON_MASK GENMASK(3, 0) | ||
| 37 | #define BD9571MWV_BKUP_MODE_CNT_KEEPON_DDR0 BIT(0) | ||
| 38 | #define BD9571MWV_BKUP_MODE_CNT_KEEPON_DDR1 BIT(1) | ||
| 39 | #define BD9571MWV_BKUP_MODE_CNT_KEEPON_DDR0C BIT(2) | ||
| 40 | #define BD9571MWV_BKUP_MODE_CNT_KEEPON_DDR1C BIT(3) | ||
| 36 | #define BD9571MWV_BKUP_MODE_STATUS 0x21 | 41 | #define BD9571MWV_BKUP_MODE_STATUS 0x21 |
| 37 | #define BD9571MWV_BKUP_RECOVERY_CNT 0x22 | 42 | #define BD9571MWV_BKUP_RECOVERY_CNT 0x22 |
| 38 | #define BD9571MWV_BKUP_CTRL_TIM_CNT 0x23 | 43 | #define BD9571MWV_BKUP_CTRL_TIM_CNT 0x23 |
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h index f09e9cf2e4ab..32421dfeb996 100644 --- a/include/linux/mfd/cros_ec.h +++ b/include/linux/mfd/cros_ec.h | |||
| @@ -329,23 +329,7 @@ extern struct attribute_group cros_ec_vbc_attr_group; | |||
| 329 | /* debugfs stuff */ | 329 | /* debugfs stuff */ |
| 330 | int cros_ec_debugfs_init(struct cros_ec_dev *ec); | 330 | int cros_ec_debugfs_init(struct cros_ec_dev *ec); |
| 331 | void cros_ec_debugfs_remove(struct cros_ec_dev *ec); | 331 | void cros_ec_debugfs_remove(struct cros_ec_dev *ec); |
| 332 | 332 | void cros_ec_debugfs_suspend(struct cros_ec_dev *ec); | |
| 333 | /* ACPI GPE handler */ | 333 | void cros_ec_debugfs_resume(struct cros_ec_dev *ec); |
| 334 | #ifdef CONFIG_ACPI | ||
| 335 | |||
| 336 | int cros_ec_acpi_install_gpe_handler(struct device *dev); | ||
| 337 | void cros_ec_acpi_remove_gpe_handler(void); | ||
| 338 | void cros_ec_acpi_clear_gpe(void); | ||
| 339 | |||
| 340 | #else /* CONFIG_ACPI */ | ||
| 341 | |||
| 342 | static inline int cros_ec_acpi_install_gpe_handler(struct device *dev) | ||
| 343 | { | ||
| 344 | return -ENODEV; | ||
| 345 | } | ||
| 346 | static inline void cros_ec_acpi_remove_gpe_handler(void) {} | ||
| 347 | static inline void cros_ec_acpi_clear_gpe(void) {} | ||
| 348 | |||
| 349 | #endif /* CONFIG_ACPI */ | ||
| 350 | 334 | ||
| 351 | #endif /* __LINUX_MFD_CROS_EC_H */ | 335 | #endif /* __LINUX_MFD_CROS_EC_H */ |
diff --git a/include/linux/mfd/lp8788.h b/include/linux/mfd/lp8788.h index 786bf6679a28..2010e0de3e34 100644 --- a/include/linux/mfd/lp8788.h +++ b/include/linux/mfd/lp8788.h | |||
| @@ -182,20 +182,6 @@ struct lp8788_buck2_dvs { | |||
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | /* | 184 | /* |
| 185 | * struct lp8788_ldo_enable_pin | ||
| 186 | * | ||
| 187 | * Basically, all LDOs are enabled through the I2C commands. | ||
| 188 | * But ALDO 1 ~ 5, 7, DLDO 7, 9, 11 can be enabled by external gpio pins. | ||
| 189 | * | ||
| 190 | * @gpio : gpio number which is used for enabling ldos | ||
| 191 | * @init_state : initial gpio state (ex. GPIOF_OUT_INIT_LOW) | ||
| 192 | */ | ||
| 193 | struct lp8788_ldo_enable_pin { | ||
| 194 | int gpio; | ||
| 195 | int init_state; | ||
| 196 | }; | ||
| 197 | |||
| 198 | /* | ||
| 199 | * struct lp8788_chg_param | 185 | * struct lp8788_chg_param |
| 200 | * @addr : charging control register address (range : 0x11 ~ 0x1C) | 186 | * @addr : charging control register address (range : 0x11 ~ 0x1C) |
| 201 | * @val : charging parameter value | 187 | * @val : charging parameter value |
| @@ -288,7 +274,6 @@ struct lp8788_vib_platform_data { | |||
| 288 | * @aldo_data : regulator initial data for analog ldo | 274 | * @aldo_data : regulator initial data for analog ldo |
| 289 | * @buck1_dvs : gpio configurations for buck1 dvs | 275 | * @buck1_dvs : gpio configurations for buck1 dvs |
| 290 | * @buck2_dvs : gpio configurations for buck2 dvs | 276 | * @buck2_dvs : gpio configurations for buck2 dvs |
| 291 | * @ldo_pin : gpio configurations for enabling LDOs | ||
| 292 | * @chg_pdata : platform data for charger driver | 277 | * @chg_pdata : platform data for charger driver |
| 293 | * @alarm_sel : rtc alarm selection (1 or 2) | 278 | * @alarm_sel : rtc alarm selection (1 or 2) |
| 294 | * @bl_pdata : configurable data for backlight driver | 279 | * @bl_pdata : configurable data for backlight driver |
| @@ -306,7 +291,6 @@ struct lp8788_platform_data { | |||
| 306 | struct regulator_init_data *aldo_data[LP8788_NUM_ALDOS]; | 291 | struct regulator_init_data *aldo_data[LP8788_NUM_ALDOS]; |
| 307 | struct lp8788_buck1_dvs *buck1_dvs; | 292 | struct lp8788_buck1_dvs *buck1_dvs; |
| 308 | struct lp8788_buck2_dvs *buck2_dvs; | 293 | struct lp8788_buck2_dvs *buck2_dvs; |
| 309 | struct lp8788_ldo_enable_pin *ldo_pin[EN_LDOS_MAX]; | ||
| 310 | 294 | ||
| 311 | /* charger */ | 295 | /* charger */ |
| 312 | struct lp8788_charger_platform_data *chg_pdata; | 296 | struct lp8788_charger_platform_data *chg_pdata; |
diff --git a/include/linux/mfd/rave-sp.h b/include/linux/mfd/rave-sp.h index 796fb9794c9e..fe0ce7bc59cf 100644 --- a/include/linux/mfd/rave-sp.h +++ b/include/linux/mfd/rave-sp.h | |||
| @@ -21,6 +21,7 @@ enum rave_sp_command { | |||
| 21 | RAVE_SP_CMD_STATUS = 0xA0, | 21 | RAVE_SP_CMD_STATUS = 0xA0, |
| 22 | RAVE_SP_CMD_SW_WDT = 0xA1, | 22 | RAVE_SP_CMD_SW_WDT = 0xA1, |
| 23 | RAVE_SP_CMD_PET_WDT = 0xA2, | 23 | RAVE_SP_CMD_PET_WDT = 0xA2, |
| 24 | RAVE_SP_CMD_SET_BACKLIGHT = 0xA6, | ||
| 24 | RAVE_SP_CMD_RESET = 0xA7, | 25 | RAVE_SP_CMD_RESET = 0xA7, |
| 25 | RAVE_SP_CMD_RESET_REASON = 0xA8, | 26 | RAVE_SP_CMD_RESET_REASON = 0xA8, |
| 26 | 27 | ||
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 5a23dd4df432..28f4ae76271d 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -39,6 +39,8 @@ | |||
| 39 | #define STEP_12_5_MV 12500 | 39 | #define STEP_12_5_MV 12500 |
| 40 | #define STEP_6_25_MV 6250 | 40 | #define STEP_6_25_MV 6250 |
| 41 | 41 | ||
| 42 | struct gpio_desc; | ||
| 43 | |||
| 42 | enum sec_device_type { | 44 | enum sec_device_type { |
| 43 | S5M8751X, | 45 | S5M8751X, |
| 44 | S5M8763X, | 46 | S5M8763X, |
| @@ -151,7 +153,7 @@ struct sec_regulator_data { | |||
| 151 | int id; | 153 | int id; |
| 152 | struct regulator_init_data *initdata; | 154 | struct regulator_init_data *initdata; |
| 153 | struct device_node *reg_node; | 155 | struct device_node *reg_node; |
| 154 | int ext_control_gpio; | 156 | struct gpio_desc *ext_control_gpiod; |
| 155 | }; | 157 | }; |
| 156 | 158 | ||
| 157 | /* | 159 | /* |
diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h index 2aadab6f34a1..067d14655c28 100644 --- a/include/linux/mfd/stm32-timers.h +++ b/include/linux/mfd/stm32-timers.h | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | #define _LINUX_STM32_GPTIMER_H_ | 8 | #define _LINUX_STM32_GPTIMER_H_ |
| 9 | 9 | ||
| 10 | #include <linux/clk.h> | 10 | #include <linux/clk.h> |
| 11 | #include <linux/dmaengine.h> | ||
| 12 | #include <linux/dma-mapping.h> | ||
| 11 | #include <linux/regmap.h> | 13 | #include <linux/regmap.h> |
| 12 | 14 | ||
| 13 | #define TIM_CR1 0x00 /* Control Register 1 */ | 15 | #define TIM_CR1 0x00 /* Control Register 1 */ |
| @@ -27,6 +29,8 @@ | |||
| 27 | #define TIM_CCR3 0x3C /* Capt/Comp Register 3 */ | 29 | #define TIM_CCR3 0x3C /* Capt/Comp Register 3 */ |
| 28 | #define TIM_CCR4 0x40 /* Capt/Comp Register 4 */ | 30 | #define TIM_CCR4 0x40 /* Capt/Comp Register 4 */ |
| 29 | #define TIM_BDTR 0x44 /* Break and Dead-Time Reg */ | 31 | #define TIM_BDTR 0x44 /* Break and Dead-Time Reg */ |
| 32 | #define TIM_DCR 0x48 /* DMA control register */ | ||
| 33 | #define TIM_DMAR 0x4C /* DMA register for transfer */ | ||
| 30 | 34 | ||
| 31 | #define TIM_CR1_CEN BIT(0) /* Counter Enable */ | 35 | #define TIM_CR1_CEN BIT(0) /* Counter Enable */ |
| 32 | #define TIM_CR1_DIR BIT(4) /* Counter Direction */ | 36 | #define TIM_CR1_DIR BIT(4) /* Counter Direction */ |
| @@ -36,17 +40,35 @@ | |||
| 36 | #define TIM_SMCR_SMS (BIT(0) | BIT(1) | BIT(2)) /* Slave mode selection */ | 40 | #define TIM_SMCR_SMS (BIT(0) | BIT(1) | BIT(2)) /* Slave mode selection */ |
| 37 | #define TIM_SMCR_TS (BIT(4) | BIT(5) | BIT(6)) /* Trigger selection */ | 41 | #define TIM_SMCR_TS (BIT(4) | BIT(5) | BIT(6)) /* Trigger selection */ |
| 38 | #define TIM_DIER_UIE BIT(0) /* Update interrupt */ | 42 | #define TIM_DIER_UIE BIT(0) /* Update interrupt */ |
| 43 | #define TIM_DIER_UDE BIT(8) /* Update DMA request Enable */ | ||
| 44 | #define TIM_DIER_CC1DE BIT(9) /* CC1 DMA request Enable */ | ||
| 45 | #define TIM_DIER_CC2DE BIT(10) /* CC2 DMA request Enable */ | ||
| 46 | #define TIM_DIER_CC3DE BIT(11) /* CC3 DMA request Enable */ | ||
| 47 | #define TIM_DIER_CC4DE BIT(12) /* CC4 DMA request Enable */ | ||
| 48 | #define TIM_DIER_COMDE BIT(13) /* COM DMA request Enable */ | ||
| 49 | #define TIM_DIER_TDE BIT(14) /* Trigger DMA request Enable */ | ||
| 39 | #define TIM_SR_UIF BIT(0) /* Update interrupt flag */ | 50 | #define TIM_SR_UIF BIT(0) /* Update interrupt flag */ |
| 40 | #define TIM_EGR_UG BIT(0) /* Update Generation */ | 51 | #define TIM_EGR_UG BIT(0) /* Update Generation */ |
| 41 | #define TIM_CCMR_PE BIT(3) /* Channel Preload Enable */ | 52 | #define TIM_CCMR_PE BIT(3) /* Channel Preload Enable */ |
| 42 | #define TIM_CCMR_M1 (BIT(6) | BIT(5)) /* Channel PWM Mode 1 */ | 53 | #define TIM_CCMR_M1 (BIT(6) | BIT(5)) /* Channel PWM Mode 1 */ |
| 54 | #define TIM_CCMR_CC1S (BIT(0) | BIT(1)) /* Capture/compare 1 sel */ | ||
| 55 | #define TIM_CCMR_IC1PSC GENMASK(3, 2) /* Input capture 1 prescaler */ | ||
| 56 | #define TIM_CCMR_CC2S (BIT(8) | BIT(9)) /* Capture/compare 2 sel */ | ||
| 57 | #define TIM_CCMR_IC2PSC GENMASK(11, 10) /* Input capture 2 prescaler */ | ||
| 58 | #define TIM_CCMR_CC1S_TI1 BIT(0) /* IC1/IC3 selects TI1/TI3 */ | ||
| 59 | #define TIM_CCMR_CC1S_TI2 BIT(1) /* IC1/IC3 selects TI2/TI4 */ | ||
| 60 | #define TIM_CCMR_CC2S_TI2 BIT(8) /* IC2/IC4 selects TI2/TI4 */ | ||
| 61 | #define TIM_CCMR_CC2S_TI1 BIT(9) /* IC2/IC4 selects TI1/TI3 */ | ||
| 43 | #define TIM_CCER_CC1E BIT(0) /* Capt/Comp 1 out Ena */ | 62 | #define TIM_CCER_CC1E BIT(0) /* Capt/Comp 1 out Ena */ |
| 44 | #define TIM_CCER_CC1P BIT(1) /* Capt/Comp 1 Polarity */ | 63 | #define TIM_CCER_CC1P BIT(1) /* Capt/Comp 1 Polarity */ |
| 45 | #define TIM_CCER_CC1NE BIT(2) /* Capt/Comp 1N out Ena */ | 64 | #define TIM_CCER_CC1NE BIT(2) /* Capt/Comp 1N out Ena */ |
| 46 | #define TIM_CCER_CC1NP BIT(3) /* Capt/Comp 1N Polarity */ | 65 | #define TIM_CCER_CC1NP BIT(3) /* Capt/Comp 1N Polarity */ |
| 47 | #define TIM_CCER_CC2E BIT(4) /* Capt/Comp 2 out Ena */ | 66 | #define TIM_CCER_CC2E BIT(4) /* Capt/Comp 2 out Ena */ |
| 67 | #define TIM_CCER_CC2P BIT(5) /* Capt/Comp 2 Polarity */ | ||
| 48 | #define TIM_CCER_CC3E BIT(8) /* Capt/Comp 3 out Ena */ | 68 | #define TIM_CCER_CC3E BIT(8) /* Capt/Comp 3 out Ena */ |
| 69 | #define TIM_CCER_CC3P BIT(9) /* Capt/Comp 3 Polarity */ | ||
| 49 | #define TIM_CCER_CC4E BIT(12) /* Capt/Comp 4 out Ena */ | 70 | #define TIM_CCER_CC4E BIT(12) /* Capt/Comp 4 out Ena */ |
| 71 | #define TIM_CCER_CC4P BIT(13) /* Capt/Comp 4 Polarity */ | ||
| 50 | #define TIM_CCER_CCXE (BIT(0) | BIT(4) | BIT(8) | BIT(12)) | 72 | #define TIM_CCER_CCXE (BIT(0) | BIT(4) | BIT(8) | BIT(12)) |
| 51 | #define TIM_BDTR_BKE BIT(12) /* Break input enable */ | 73 | #define TIM_BDTR_BKE BIT(12) /* Break input enable */ |
| 52 | #define TIM_BDTR_BKP BIT(13) /* Break input polarity */ | 74 | #define TIM_BDTR_BKP BIT(13) /* Break input polarity */ |
| @@ -56,8 +78,11 @@ | |||
| 56 | #define TIM_BDTR_BK2F (BIT(20) | BIT(21) | BIT(22) | BIT(23)) | 78 | #define TIM_BDTR_BK2F (BIT(20) | BIT(21) | BIT(22) | BIT(23)) |
| 57 | #define TIM_BDTR_BK2E BIT(24) /* Break 2 input enable */ | 79 | #define TIM_BDTR_BK2E BIT(24) /* Break 2 input enable */ |
| 58 | #define TIM_BDTR_BK2P BIT(25) /* Break 2 input polarity */ | 80 | #define TIM_BDTR_BK2P BIT(25) /* Break 2 input polarity */ |
| 81 | #define TIM_DCR_DBA GENMASK(4, 0) /* DMA base addr */ | ||
| 82 | #define TIM_DCR_DBL GENMASK(12, 8) /* DMA burst len */ | ||
| 59 | 83 | ||
| 60 | #define MAX_TIM_PSC 0xFFFF | 84 | #define MAX_TIM_PSC 0xFFFF |
| 85 | #define MAX_TIM_ICPSC 0x3 | ||
| 61 | #define TIM_CR2_MMS_SHIFT 4 | 86 | #define TIM_CR2_MMS_SHIFT 4 |
| 62 | #define TIM_CR2_MMS2_SHIFT 20 | 87 | #define TIM_CR2_MMS2_SHIFT 20 |
| 63 | #define TIM_SMCR_TS_SHIFT 4 | 88 | #define TIM_SMCR_TS_SHIFT 4 |
| @@ -65,9 +90,54 @@ | |||
| 65 | #define TIM_BDTR_BKF_SHIFT 16 | 90 | #define TIM_BDTR_BKF_SHIFT 16 |
| 66 | #define TIM_BDTR_BK2F_SHIFT 20 | 91 | #define TIM_BDTR_BK2F_SHIFT 20 |
| 67 | 92 | ||
| 93 | enum stm32_timers_dmas { | ||
| 94 | STM32_TIMERS_DMA_CH1, | ||
| 95 | STM32_TIMERS_DMA_CH2, | ||
| 96 | STM32_TIMERS_DMA_CH3, | ||
| 97 | STM32_TIMERS_DMA_CH4, | ||
| 98 | STM32_TIMERS_DMA_UP, | ||
| 99 | STM32_TIMERS_DMA_TRIG, | ||
| 100 | STM32_TIMERS_DMA_COM, | ||
| 101 | STM32_TIMERS_MAX_DMAS, | ||
| 102 | }; | ||
| 103 | |||
| 104 | /** | ||
| 105 | * struct stm32_timers_dma - STM32 timer DMA handling. | ||
| 106 | * @completion: end of DMA transfer completion | ||
| 107 | * @phys_base: control registers physical base address | ||
| 108 | * @lock: protect DMA access | ||
| 109 | * @chan: DMA channel in use | ||
| 110 | * @chans: DMA channels available for this timer instance | ||
| 111 | */ | ||
| 112 | struct stm32_timers_dma { | ||
| 113 | struct completion completion; | ||
| 114 | phys_addr_t phys_base; | ||
| 115 | struct mutex lock; | ||
| 116 | struct dma_chan *chan; | ||
| 117 | struct dma_chan *chans[STM32_TIMERS_MAX_DMAS]; | ||
| 118 | }; | ||
| 119 | |||
| 68 | struct stm32_timers { | 120 | struct stm32_timers { |
| 69 | struct clk *clk; | 121 | struct clk *clk; |
| 70 | struct regmap *regmap; | 122 | struct regmap *regmap; |
| 71 | u32 max_arr; | 123 | u32 max_arr; |
| 124 | struct stm32_timers_dma dma; /* Only to be used by the parent */ | ||
| 72 | }; | 125 | }; |
| 126 | |||
| 127 | #if IS_REACHABLE(CONFIG_MFD_STM32_TIMERS) | ||
| 128 | int stm32_timers_dma_burst_read(struct device *dev, u32 *buf, | ||
| 129 | enum stm32_timers_dmas id, u32 reg, | ||
| 130 | unsigned int num_reg, unsigned int bursts, | ||
| 131 | unsigned long tmo_ms); | ||
| 132 | #else | ||
| 133 | static inline int stm32_timers_dma_burst_read(struct device *dev, u32 *buf, | ||
| 134 | enum stm32_timers_dmas id, | ||
| 135 | u32 reg, | ||
| 136 | unsigned int num_reg, | ||
| 137 | unsigned int bursts, | ||
| 138 | unsigned long tmo_ms) | ||
| 139 | { | ||
| 140 | return -ENODEV; | ||
| 141 | } | ||
| 142 | #endif | ||
| 73 | #endif | 143 | #endif |
diff --git a/include/linux/mfd/syscon/exynos4-pmu.h b/include/linux/mfd/syscon/exynos4-pmu.h deleted file mode 100644 index 278b1b1549e9..000000000000 --- a/include/linux/mfd/syscon/exynos4-pmu.h +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2015 Samsung Electronics Co., Ltd. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _LINUX_MFD_SYSCON_PMU_EXYNOS4_H_ | ||
| 10 | #define _LINUX_MFD_SYSCON_PMU_EXYNOS4_H_ | ||
| 11 | |||
| 12 | /* Exynos4 PMU register definitions */ | ||
| 13 | |||
| 14 | /* MIPI_PHYn_CONTROL register offset: n = 0..1 */ | ||
| 15 | #define EXYNOS4_MIPI_PHY_CONTROL(n) (0x710 + (n) * 4) | ||
| 16 | #define EXYNOS4_MIPI_PHY_ENABLE (1 << 0) | ||
| 17 | #define EXYNOS4_MIPI_PHY_SRESETN (1 << 1) | ||
| 18 | #define EXYNOS4_MIPI_PHY_MRESETN (1 << 2) | ||
| 19 | #define EXYNOS4_MIPI_PHY_RESET_MASK (3 << 1) | ||
| 20 | |||
| 21 | #endif /* _LINUX_MFD_SYSCON_PMU_EXYNOS4_H_ */ | ||
diff --git a/include/linux/mfd/syscon/exynos5-pmu.h b/include/linux/mfd/syscon/exynos5-pmu.h deleted file mode 100644 index b4942a32b81d..000000000000 --- a/include/linux/mfd/syscon/exynos5-pmu.h +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Exynos5 SoC series Power Management Unit (PMU) register offsets | ||
| 3 | * and bit definitions. | ||
| 4 | * | ||
| 5 | * Copyright (C) 2014 Samsung Electronics Co., Ltd. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ | ||
| 13 | #define _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ | ||
| 14 | |||
| 15 | #define EXYNOS5_PHY_ENABLE BIT(0) | ||
| 16 | #define EXYNOS5_MIPI_PHY_S_RESETN BIT(1) | ||
| 17 | #define EXYNOS5_MIPI_PHY_M_RESETN BIT(2) | ||
| 18 | |||
| 19 | #endif /* _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ */ | ||
diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h index 67d144b3b8f9..f05bf4a146e2 100644 --- a/include/linux/mfd/tps65090.h +++ b/include/linux/mfd/tps65090.h | |||
| @@ -83,6 +83,8 @@ enum { | |||
| 83 | #define TPS65090_MAX_REG TPS65090_REG_AD_OUT2 | 83 | #define TPS65090_MAX_REG TPS65090_REG_AD_OUT2 |
| 84 | #define TPS65090_NUM_REGS (TPS65090_MAX_REG + 1) | 84 | #define TPS65090_NUM_REGS (TPS65090_MAX_REG + 1) |
| 85 | 85 | ||
| 86 | struct gpio_desc; | ||
| 87 | |||
| 86 | struct tps65090 { | 88 | struct tps65090 { |
| 87 | struct device *dev; | 89 | struct device *dev; |
| 88 | struct regmap *rmap; | 90 | struct regmap *rmap; |
| @@ -95,8 +97,8 @@ struct tps65090 { | |||
| 95 | * @reg_init_data: The regulator init data. | 97 | * @reg_init_data: The regulator init data. |
| 96 | * @enable_ext_control: Enable extrenal control or not. Only available for | 98 | * @enable_ext_control: Enable extrenal control or not. Only available for |
| 97 | * DCDC1, DCDC2 and DCDC3. | 99 | * DCDC1, DCDC2 and DCDC3. |
| 98 | * @gpio: Gpio number if external control is enabled and controlled through | 100 | * @gpiod: Gpio descriptor if external control is enabled and controlled through |
| 99 | * gpio. | 101 | * gpio |
| 100 | * @overcurrent_wait_valid: True if the overcurrent_wait should be applied. | 102 | * @overcurrent_wait_valid: True if the overcurrent_wait should be applied. |
| 101 | * @overcurrent_wait: Value to set as the overcurrent wait time. This is the | 103 | * @overcurrent_wait: Value to set as the overcurrent wait time. This is the |
| 102 | * actual bitfield value, not a time in ms (valid value are 0 - 3). | 104 | * actual bitfield value, not a time in ms (valid value are 0 - 3). |
| @@ -104,7 +106,7 @@ struct tps65090 { | |||
| 104 | struct tps65090_regulator_plat_data { | 106 | struct tps65090_regulator_plat_data { |
| 105 | struct regulator_init_data *reg_init_data; | 107 | struct regulator_init_data *reg_init_data; |
| 106 | bool enable_ext_control; | 108 | bool enable_ext_control; |
| 107 | int gpio; | 109 | struct gpio_desc *gpiod; |
| 108 | bool overcurrent_wait_valid; | 110 | bool overcurrent_wait_valid; |
| 109 | int overcurrent_wait; | 111 | int overcurrent_wait; |
| 110 | }; | 112 | }; |
diff --git a/include/linux/mfd/tps65218.h b/include/linux/mfd/tps65218.h index f069c518c0ed..c204d9a79436 100644 --- a/include/linux/mfd/tps65218.h +++ b/include/linux/mfd/tps65218.h | |||
| @@ -205,10 +205,10 @@ enum tps65218_regulator_id { | |||
| 205 | TPS65218_DCDC_4, | 205 | TPS65218_DCDC_4, |
| 206 | TPS65218_DCDC_5, | 206 | TPS65218_DCDC_5, |
| 207 | TPS65218_DCDC_6, | 207 | TPS65218_DCDC_6, |
| 208 | /* LS's */ | ||
| 209 | TPS65218_LS_3, | ||
| 210 | /* LDOs */ | 208 | /* LDOs */ |
| 211 | TPS65218_LDO_1, | 209 | TPS65218_LDO_1, |
| 210 | /* LS's */ | ||
| 211 | TPS65218_LS_3, | ||
| 212 | }; | 212 | }; |
| 213 | 213 | ||
| 214 | #define TPS65218_MAX_REG_ID TPS65218_LDO_1 | 214 | #define TPS65218_MAX_REG_ID TPS65218_LDO_1 |
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h index 2fe68e481230..b19c2801a30e 100644 --- a/include/linux/mfd/tps6586x.h +++ b/include/linux/mfd/tps6586x.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #define TPS658621A 0x15 | 18 | #define TPS658621A 0x15 |
| 19 | #define TPS658621CD 0x2c | 19 | #define TPS658621CD 0x2c |
| 20 | #define TPS658623 0x1b | 20 | #define TPS658623 0x1b |
| 21 | #define TPS658624 0x0a | ||
| 21 | #define TPS658640 0x01 | 22 | #define TPS658640 0x01 |
| 22 | #define TPS658640v2 0x02 | 23 | #define TPS658640v2 0x02 |
| 23 | #define TPS658643 0x03 | 24 | #define TPS658643 0x03 |
diff --git a/include/linux/mfd/tps68470.h b/include/linux/mfd/tps68470.h index 44f9d9f647ed..ffe81127d91c 100644 --- a/include/linux/mfd/tps68470.h +++ b/include/linux/mfd/tps68470.h | |||
| @@ -1,17 +1,6 @@ | |||
| 1 | /* | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | * Copyright (c) 2017 Intel Corporation | 2 | /* Copyright (C) 2017 Intel Corporation */ |
| 3 | * | 3 | /* Functions to access TPS68470 power management chip. */ |
| 4 | * Functions to access TPS68470 power management chip. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License as | ||
| 8 | * published by the Free Software Foundation version 2. | ||
| 9 | * | ||
| 10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 11 | * kind, whether express or implied; without even the implied warranty | ||
| 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | */ | ||
| 15 | 4 | ||
| 16 | #ifndef __LINUX_MFD_TPS68470_H | 5 | #ifndef __LINUX_MFD_TPS68470_H |
| 17 | #define __LINUX_MFD_TPS68470_H | 6 | #define __LINUX_MFD_TPS68470_H |
diff --git a/include/linux/mlx5/eswitch.h b/include/linux/mlx5/eswitch.h index d3c9db492b30..fab5121ffb8f 100644 --- a/include/linux/mlx5/eswitch.h +++ b/include/linux/mlx5/eswitch.h | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/mlx5/driver.h> | 9 | #include <linux/mlx5/driver.h> |
| 10 | 10 | ||
| 11 | #define MLX5_ESWITCH_MANAGER(mdev) MLX5_CAP_GEN(mdev, eswitch_manager) | ||
| 12 | |||
| 11 | enum { | 13 | enum { |
| 12 | SRIOV_NONE, | 14 | SRIOV_NONE, |
| 13 | SRIOV_LEGACY, | 15 | SRIOV_LEGACY, |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 27134c4fcb76..ac281f5ec9b8 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
| @@ -922,7 +922,7 @@ struct mlx5_ifc_cmd_hca_cap_bits { | |||
| 922 | u8 vnic_env_queue_counters[0x1]; | 922 | u8 vnic_env_queue_counters[0x1]; |
| 923 | u8 ets[0x1]; | 923 | u8 ets[0x1]; |
| 924 | u8 nic_flow_table[0x1]; | 924 | u8 nic_flow_table[0x1]; |
| 925 | u8 eswitch_flow_table[0x1]; | 925 | u8 eswitch_manager[0x1]; |
| 926 | u8 device_memory[0x1]; | 926 | u8 device_memory[0x1]; |
| 927 | u8 mcam_reg[0x1]; | 927 | u8 mcam_reg[0x1]; |
| 928 | u8 pcam_reg[0x1]; | 928 | u8 pcam_reg[0x1]; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 4c3881b44ef1..a0fbb9ffe380 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -575,6 +575,11 @@ static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags) | |||
| 575 | return kvmalloc(bytes, flags); | 575 | return kvmalloc(bytes, flags); |
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) | ||
| 579 | { | ||
| 580 | return kvmalloc_array(n, size, flags | __GFP_ZERO); | ||
| 581 | } | ||
| 582 | |||
| 578 | extern void kvfree(const void *addr); | 583 | extern void kvfree(const void *addr); |
| 579 | 584 | ||
| 580 | static inline atomic_t *compound_mapcount_ptr(struct page *page) | 585 | static inline atomic_t *compound_mapcount_ptr(struct page *page) |
| @@ -830,27 +835,65 @@ static inline bool is_zone_device_page(const struct page *page) | |||
| 830 | } | 835 | } |
| 831 | #endif | 836 | #endif |
| 832 | 837 | ||
| 833 | #if defined(CONFIG_DEVICE_PRIVATE) || defined(CONFIG_DEVICE_PUBLIC) | 838 | #ifdef CONFIG_DEV_PAGEMAP_OPS |
| 834 | void put_zone_device_private_or_public_page(struct page *page); | 839 | void dev_pagemap_get_ops(void); |
| 835 | DECLARE_STATIC_KEY_FALSE(device_private_key); | 840 | void dev_pagemap_put_ops(void); |
| 836 | #define IS_HMM_ENABLED static_branch_unlikely(&device_private_key) | 841 | void __put_devmap_managed_page(struct page *page); |
| 837 | static inline bool is_device_private_page(const struct page *page); | 842 | DECLARE_STATIC_KEY_FALSE(devmap_managed_key); |
| 838 | static inline bool is_device_public_page(const struct page *page); | 843 | static inline bool put_devmap_managed_page(struct page *page) |
| 839 | #else /* CONFIG_DEVICE_PRIVATE || CONFIG_DEVICE_PUBLIC */ | ||
| 840 | static inline void put_zone_device_private_or_public_page(struct page *page) | ||
| 841 | { | 844 | { |
| 845 | if (!static_branch_unlikely(&devmap_managed_key)) | ||
| 846 | return false; | ||
| 847 | if (!is_zone_device_page(page)) | ||
| 848 | return false; | ||
| 849 | switch (page->pgmap->type) { | ||
| 850 | case MEMORY_DEVICE_PRIVATE: | ||
| 851 | case MEMORY_DEVICE_PUBLIC: | ||
| 852 | case MEMORY_DEVICE_FS_DAX: | ||
| 853 | __put_devmap_managed_page(page); | ||
| 854 | return true; | ||
| 855 | default: | ||
| 856 | break; | ||
| 857 | } | ||
| 858 | return false; | ||
| 842 | } | 859 | } |
| 843 | #define IS_HMM_ENABLED 0 | 860 | |
| 844 | static inline bool is_device_private_page(const struct page *page) | 861 | static inline bool is_device_private_page(const struct page *page) |
| 845 | { | 862 | { |
| 846 | return false; | 863 | return is_zone_device_page(page) && |
| 864 | page->pgmap->type == MEMORY_DEVICE_PRIVATE; | ||
| 847 | } | 865 | } |
| 866 | |||
| 848 | static inline bool is_device_public_page(const struct page *page) | 867 | static inline bool is_device_public_page(const struct page *page) |
| 849 | { | 868 | { |
| 869 | return is_zone_device_page(page) && | ||
| 870 | page->pgmap->type == MEMORY_DEVICE_PUBLIC; | ||
| 871 | } | ||
| 872 | |||
| 873 | #else /* CONFIG_DEV_PAGEMAP_OPS */ | ||
| 874 | static inline void dev_pagemap_get_ops(void) | ||
| 875 | { | ||
| 876 | } | ||
| 877 | |||
| 878 | static inline void dev_pagemap_put_ops(void) | ||
| 879 | { | ||
| 880 | } | ||
| 881 | |||
| 882 | static inline bool put_devmap_managed_page(struct page *page) | ||
| 883 | { | ||
| 884 | return false; | ||
| 885 | } | ||
| 886 | |||
| 887 | static inline bool is_device_private_page(const struct page *page) | ||
| 888 | { | ||
| 850 | return false; | 889 | return false; |
| 851 | } | 890 | } |
| 852 | #endif /* CONFIG_DEVICE_PRIVATE || CONFIG_DEVICE_PUBLIC */ | ||
| 853 | 891 | ||
| 892 | static inline bool is_device_public_page(const struct page *page) | ||
| 893 | { | ||
| 894 | return false; | ||
| 895 | } | ||
| 896 | #endif /* CONFIG_DEV_PAGEMAP_OPS */ | ||
| 854 | 897 | ||
| 855 | static inline void get_page(struct page *page) | 898 | static inline void get_page(struct page *page) |
| 856 | { | 899 | { |
| @@ -868,16 +911,13 @@ static inline void put_page(struct page *page) | |||
| 868 | page = compound_head(page); | 911 | page = compound_head(page); |
| 869 | 912 | ||
| 870 | /* | 913 | /* |
| 871 | * For private device pages we need to catch refcount transition from | 914 | * For devmap managed pages we need to catch refcount transition from |
| 872 | * 2 to 1, when refcount reach one it means the private device page is | 915 | * 2 to 1, when refcount reach one it means the page is free and we |
| 873 | * free and we need to inform the device driver through callback. See | 916 | * need to inform the device driver through callback. See |
| 874 | * include/linux/memremap.h and HMM for details. | 917 | * include/linux/memremap.h and HMM for details. |
| 875 | */ | 918 | */ |
| 876 | if (IS_HMM_ENABLED && unlikely(is_device_private_page(page) || | 919 | if (put_devmap_managed_page(page)) |
| 877 | unlikely(is_device_public_page(page)))) { | ||
| 878 | put_zone_device_private_or_public_page(page); | ||
| 879 | return; | 920 | return; |
| 880 | } | ||
| 881 | 921 | ||
| 882 | if (put_page_testzero(page)) | 922 | if (put_page_testzero(page)) |
| 883 | __put_page(page); | 923 | __put_page(page); |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 2014bd19f28e..96a71a648eed 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -501,6 +501,7 @@ enum dmi_field { | |||
| 501 | DMI_PRODUCT_VERSION, | 501 | DMI_PRODUCT_VERSION, |
| 502 | DMI_PRODUCT_SERIAL, | 502 | DMI_PRODUCT_SERIAL, |
| 503 | DMI_PRODUCT_UUID, | 503 | DMI_PRODUCT_UUID, |
| 504 | DMI_PRODUCT_SKU, | ||
| 504 | DMI_PRODUCT_FAMILY, | 505 | DMI_PRODUCT_FAMILY, |
| 505 | DMI_BOARD_VENDOR, | 506 | DMI_BOARD_VENDOR, |
| 506 | DMI_BOARD_NAME, | 507 | DMI_BOARD_NAME, |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 792ea5c26329..abe975c87b90 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -86,6 +86,7 @@ struct nand_pos { | |||
| 86 | * @ooboffs: the OOB offset within the page | 86 | * @ooboffs: the OOB offset within the page |
| 87 | * @ooblen: the number of OOB bytes to read from/write to this page | 87 | * @ooblen: the number of OOB bytes to read from/write to this page |
| 88 | * @oobbuf: buffer to store OOB data in or get OOB data from | 88 | * @oobbuf: buffer to store OOB data in or get OOB data from |
| 89 | * @mode: one of the %MTD_OPS_XXX mode | ||
| 89 | * | 90 | * |
| 90 | * This object is used to pass per-page I/O requests to NAND sub-layers. This | 91 | * This object is used to pass per-page I/O requests to NAND sub-layers. This |
| 91 | * way all useful information are already formatted in a useful way and | 92 | * way all useful information are already formatted in a useful way and |
| @@ -106,6 +107,7 @@ struct nand_page_io_req { | |||
| 106 | const void *out; | 107 | const void *out; |
| 107 | void *in; | 108 | void *in; |
| 108 | } oobbuf; | 109 | } oobbuf; |
| 110 | int mode; | ||
| 109 | }; | 111 | }; |
| 110 | 112 | ||
| 111 | /** | 113 | /** |
| @@ -599,6 +601,7 @@ static inline void nanddev_io_iter_init(struct nand_device *nand, | |||
| 599 | { | 601 | { |
| 600 | struct mtd_info *mtd = nanddev_to_mtd(nand); | 602 | struct mtd_info *mtd = nanddev_to_mtd(nand); |
| 601 | 603 | ||
| 604 | iter->req.mode = req->mode; | ||
| 602 | iter->req.dataoffs = nanddev_offs_to_pos(nand, offs, &iter->req.pos); | 605 | iter->req.dataoffs = nanddev_offs_to_pos(nand, offs, &iter->req.pos); |
| 603 | iter->req.ooboffs = req->ooboffs; | 606 | iter->req.ooboffs = req->ooboffs; |
| 604 | iter->oobbytes_per_page = mtd_oobavail(mtd, req); | 607 | iter->oobbytes_per_page = mtd_oobavail(mtd, req); |
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index 17c919436f48..3e8ec3b8a39c 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h | |||
| @@ -28,7 +28,14 @@ struct nand_flash_dev; | |||
| 28 | struct device_node; | 28 | struct device_node; |
| 29 | 29 | ||
| 30 | /* Scan and identify a NAND device */ | 30 | /* Scan and identify a NAND device */ |
| 31 | int nand_scan(struct mtd_info *mtd, int max_chips); | 31 | int nand_scan_with_ids(struct mtd_info *mtd, int max_chips, |
| 32 | struct nand_flash_dev *ids); | ||
| 33 | |||
| 34 | static inline int nand_scan(struct mtd_info *mtd, int max_chips) | ||
| 35 | { | ||
| 36 | return nand_scan_with_ids(mtd, max_chips, NULL); | ||
| 37 | } | ||
| 38 | |||
| 32 | /* | 39 | /* |
| 33 | * Separate phases of nand_scan(), allowing board driver to intervene | 40 | * Separate phases of nand_scan(), allowing board driver to intervene |
| 34 | * and override command or ECC setup according to flash type. | 41 | * and override command or ECC setup according to flash type. |
| @@ -740,8 +747,9 @@ enum nand_data_interface_type { | |||
| 740 | 747 | ||
| 741 | /** | 748 | /** |
| 742 | * struct nand_data_interface - NAND interface timing | 749 | * struct nand_data_interface - NAND interface timing |
| 743 | * @type: type of the timing | 750 | * @type: type of the timing |
| 744 | * @timings: The timing, type according to @type | 751 | * @timings: The timing, type according to @type |
| 752 | * @timings.sdr: Use it when @type is %NAND_SDR_IFACE. | ||
| 745 | */ | 753 | */ |
| 746 | struct nand_data_interface { | 754 | struct nand_data_interface { |
| 747 | enum nand_data_interface_type type; | 755 | enum nand_data_interface_type type; |
| @@ -798,8 +806,9 @@ struct nand_op_addr_instr { | |||
| 798 | /** | 806 | /** |
| 799 | * struct nand_op_data_instr - Definition of a data instruction | 807 | * struct nand_op_data_instr - Definition of a data instruction |
| 800 | * @len: number of data bytes to move | 808 | * @len: number of data bytes to move |
| 801 | * @in: buffer to fill when reading from the NAND chip | 809 | * @buf: buffer to fill |
| 802 | * @out: buffer to read from when writing to the NAND chip | 810 | * @buf.in: buffer to fill when reading from the NAND chip |
| 811 | * @buf.out: buffer to read from when writing to the NAND chip | ||
| 803 | * @force_8bit: force 8-bit access | 812 | * @force_8bit: force 8-bit access |
| 804 | * | 813 | * |
| 805 | * Please note that "in" and "out" are inverted from the ONFI specification | 814 | * Please note that "in" and "out" are inverted from the ONFI specification |
| @@ -842,9 +851,13 @@ enum nand_op_instr_type { | |||
| 842 | /** | 851 | /** |
| 843 | * struct nand_op_instr - Instruction object | 852 | * struct nand_op_instr - Instruction object |
| 844 | * @type: the instruction type | 853 | * @type: the instruction type |
| 845 | * @cmd/@addr/@data/@waitrdy: extra data associated to the instruction. | 854 | * @ctx: extra data associated to the instruction. You'll have to use the |
| 846 | * You'll have to use the appropriate element | 855 | * appropriate element depending on @type |
| 847 | * depending on @type | 856 | * @ctx.cmd: use it if @type is %NAND_OP_CMD_INSTR |
| 857 | * @ctx.addr: use it if @type is %NAND_OP_ADDR_INSTR | ||
| 858 | * @ctx.data: use it if @type is %NAND_OP_DATA_IN_INSTR | ||
| 859 | * or %NAND_OP_DATA_OUT_INSTR | ||
| 860 | * @ctx.waitrdy: use it if @type is %NAND_OP_WAITRDY_INSTR | ||
| 848 | * @delay_ns: delay the controller should apply after the instruction has been | 861 | * @delay_ns: delay the controller should apply after the instruction has been |
| 849 | * issued on the bus. Most modern controllers have internal timings | 862 | * issued on the bus. Most modern controllers have internal timings |
| 850 | * control logic, and in this case, the controller driver can ignore | 863 | * control logic, and in this case, the controller driver can ignore |
| @@ -1003,7 +1016,9 @@ struct nand_op_parser_data_constraints { | |||
| 1003 | * struct nand_op_parser_pattern_elem - One element of a pattern | 1016 | * struct nand_op_parser_pattern_elem - One element of a pattern |
| 1004 | * @type: the instructuction type | 1017 | * @type: the instructuction type |
| 1005 | * @optional: whether this element of the pattern is optional or mandatory | 1018 | * @optional: whether this element of the pattern is optional or mandatory |
| 1006 | * @addr/@data: address or data constraint (number of cycles or data length) | 1019 | * @ctx: address or data constraint |
| 1020 | * @ctx.addr: address constraint (number of cycles) | ||
| 1021 | * @ctx.data: data constraint (data length) | ||
| 1007 | */ | 1022 | */ |
| 1008 | struct nand_op_parser_pattern_elem { | 1023 | struct nand_op_parser_pattern_elem { |
| 1009 | enum nand_op_instr_type type; | 1024 | enum nand_op_instr_type type; |
| @@ -1230,6 +1245,8 @@ int nand_op_parser_exec_op(struct nand_chip *chip, | |||
| 1230 | * devices. | 1245 | * devices. |
| 1231 | * @priv: [OPTIONAL] pointer to private chip data | 1246 | * @priv: [OPTIONAL] pointer to private chip data |
| 1232 | * @manufacturer: [INTERN] Contains manufacturer information | 1247 | * @manufacturer: [INTERN] Contains manufacturer information |
| 1248 | * @manufacturer.desc: [INTERN] Contains manufacturer's description | ||
| 1249 | * @manufacturer.priv: [INTERN] Contains manufacturer private information | ||
| 1233 | */ | 1250 | */ |
| 1234 | 1251 | ||
| 1235 | struct nand_chip { | 1252 | struct nand_chip { |
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index de36969eb359..e60da0d34cc1 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h | |||
| @@ -62,6 +62,8 @@ | |||
| 62 | #define SPINOR_OP_RDCR 0x35 /* Read configuration register */ | 62 | #define SPINOR_OP_RDCR 0x35 /* Read configuration register */ |
| 63 | #define SPINOR_OP_RDFSR 0x70 /* Read flag status register */ | 63 | #define SPINOR_OP_RDFSR 0x70 /* Read flag status register */ |
| 64 | #define SPINOR_OP_CLFSR 0x50 /* Clear flag status register */ | 64 | #define SPINOR_OP_CLFSR 0x50 /* Clear flag status register */ |
| 65 | #define SPINOR_OP_RDEAR 0xc8 /* Read Extended Address Register */ | ||
| 66 | #define SPINOR_OP_WREAR 0xc5 /* Write Extended Address Register */ | ||
| 65 | 67 | ||
| 66 | /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */ | 68 | /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */ |
| 67 | #define SPINOR_OP_READ_4B 0x13 /* Read data bytes (low frequency) */ | 69 | #define SPINOR_OP_READ_4B 0x13 /* Read data bytes (low frequency) */ |
diff --git a/include/linux/namei.h b/include/linux/namei.h index a982bb7cd480..a78606e8e3df 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
| @@ -81,6 +81,7 @@ extern void done_path_create(struct path *, struct dentry *); | |||
| 81 | extern struct dentry *kern_path_locked(const char *, struct path *); | 81 | extern struct dentry *kern_path_locked(const char *, struct path *); |
| 82 | extern int kern_path_mountpoint(int, const char *, struct path *, unsigned int); | 82 | extern int kern_path_mountpoint(int, const char *, struct path *, unsigned int); |
| 83 | 83 | ||
| 84 | extern struct dentry *try_lookup_one_len(const char *, struct dentry *, int); | ||
| 84 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); | 85 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); |
| 85 | extern struct dentry *lookup_one_len_unlocked(const char *, struct dentry *, int); | 86 | extern struct dentry *lookup_one_len_unlocked(const char *, struct dentry *, int); |
| 86 | 87 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index 08b6eb964dd6..6554d3ba4396 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -147,7 +147,6 @@ struct proto_ops { | |||
| 147 | int (*getname) (struct socket *sock, | 147 | int (*getname) (struct socket *sock, |
| 148 | struct sockaddr *addr, | 148 | struct sockaddr *addr, |
| 149 | int peer); | 149 | int peer); |
| 150 | __poll_t (*poll_mask) (struct socket *sock, __poll_t events); | ||
| 151 | __poll_t (*poll) (struct file *file, struct socket *sock, | 150 | __poll_t (*poll) (struct file *file, struct socket *sock, |
| 152 | struct poll_table_struct *wait); | 151 | struct poll_table_struct *wait); |
| 153 | int (*ioctl) (struct socket *sock, unsigned int cmd, | 152 | int (*ioctl) (struct socket *sock, unsigned int cmd, |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3ec9850c7936..3d0cc0b5cec2 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2789,11 +2789,31 @@ static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, | |||
| 2789 | if (PTR_ERR(pp) != -EINPROGRESS) | 2789 | if (PTR_ERR(pp) != -EINPROGRESS) |
| 2790 | NAPI_GRO_CB(skb)->flush |= flush; | 2790 | NAPI_GRO_CB(skb)->flush |= flush; |
| 2791 | } | 2791 | } |
| 2792 | static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb, | ||
| 2793 | struct sk_buff **pp, | ||
| 2794 | int flush, | ||
| 2795 | struct gro_remcsum *grc) | ||
| 2796 | { | ||
| 2797 | if (PTR_ERR(pp) != -EINPROGRESS) { | ||
| 2798 | NAPI_GRO_CB(skb)->flush |= flush; | ||
| 2799 | skb_gro_remcsum_cleanup(skb, grc); | ||
| 2800 | skb->remcsum_offload = 0; | ||
| 2801 | } | ||
| 2802 | } | ||
| 2792 | #else | 2803 | #else |
| 2793 | static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush) | 2804 | static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush) |
| 2794 | { | 2805 | { |
| 2795 | NAPI_GRO_CB(skb)->flush |= flush; | 2806 | NAPI_GRO_CB(skb)->flush |= flush; |
| 2796 | } | 2807 | } |
| 2808 | static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb, | ||
| 2809 | struct sk_buff **pp, | ||
| 2810 | int flush, | ||
| 2811 | struct gro_remcsum *grc) | ||
| 2812 | { | ||
| 2813 | NAPI_GRO_CB(skb)->flush |= flush; | ||
| 2814 | skb_gro_remcsum_cleanup(skb, grc); | ||
| 2815 | skb->remcsum_offload = 0; | ||
| 2816 | } | ||
| 2797 | #endif | 2817 | #endif |
| 2798 | 2818 | ||
| 2799 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 2819 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 04551af2ff23..dd2052f0efb7 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
| @@ -345,7 +345,7 @@ nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) | |||
| 345 | 345 | ||
| 346 | rcu_read_lock(); | 346 | rcu_read_lock(); |
| 347 | nat_hook = rcu_dereference(nf_nat_hook); | 347 | nat_hook = rcu_dereference(nf_nat_hook); |
| 348 | if (nat_hook->decode_session) | 348 | if (nat_hook && nat_hook->decode_session) |
| 349 | nat_hook->decode_session(skb, fl); | 349 | nat_hook->decode_session(skb, fl); |
| 350 | rcu_read_unlock(); | 350 | rcu_read_unlock(); |
| 351 | #endif | 351 | #endif |
diff --git a/include/linux/netfilter/ipset/ip_set_timeout.h b/include/linux/netfilter/ipset/ip_set_timeout.h index bfb3531fd88a..8ce271e187b6 100644 --- a/include/linux/netfilter/ipset/ip_set_timeout.h +++ b/include/linux/netfilter/ipset/ip_set_timeout.h | |||
| @@ -23,6 +23,9 @@ | |||
| 23 | /* Set is defined with timeout support: timeout value may be 0 */ | 23 | /* Set is defined with timeout support: timeout value may be 0 */ |
| 24 | #define IPSET_NO_TIMEOUT UINT_MAX | 24 | #define IPSET_NO_TIMEOUT UINT_MAX |
| 25 | 25 | ||
| 26 | /* Max timeout value, see msecs_to_jiffies() in jiffies.h */ | ||
| 27 | #define IPSET_MAX_TIMEOUT (UINT_MAX >> 1)/MSEC_PER_SEC | ||
| 28 | |||
| 26 | #define ip_set_adt_opt_timeout(opt, set) \ | 29 | #define ip_set_adt_opt_timeout(opt, set) \ |
| 27 | ((opt)->ext.timeout != IPSET_NO_TIMEOUT ? (opt)->ext.timeout : (set)->timeout) | 30 | ((opt)->ext.timeout != IPSET_NO_TIMEOUT ? (opt)->ext.timeout : (set)->timeout) |
| 28 | 31 | ||
| @@ -32,11 +35,10 @@ ip_set_timeout_uget(struct nlattr *tb) | |||
| 32 | unsigned int timeout = ip_set_get_h32(tb); | 35 | unsigned int timeout = ip_set_get_h32(tb); |
| 33 | 36 | ||
| 34 | /* Normalize to fit into jiffies */ | 37 | /* Normalize to fit into jiffies */ |
| 35 | if (timeout > UINT_MAX/MSEC_PER_SEC) | 38 | if (timeout > IPSET_MAX_TIMEOUT) |
| 36 | timeout = UINT_MAX/MSEC_PER_SEC; | 39 | timeout = IPSET_MAX_TIMEOUT; |
| 37 | 40 | ||
| 38 | /* Userspace supplied TIMEOUT parameter: adjust crazy size */ | 41 | return timeout; |
| 39 | return timeout == IPSET_NO_TIMEOUT ? IPSET_NO_TIMEOUT - 1 : timeout; | ||
| 40 | } | 42 | } |
| 41 | 43 | ||
| 42 | static inline bool | 44 | static inline bool |
| @@ -65,8 +67,14 @@ ip_set_timeout_set(unsigned long *timeout, u32 value) | |||
| 65 | static inline u32 | 67 | static inline u32 |
| 66 | ip_set_timeout_get(const unsigned long *timeout) | 68 | ip_set_timeout_get(const unsigned long *timeout) |
| 67 | { | 69 | { |
| 68 | return *timeout == IPSET_ELEM_PERMANENT ? 0 : | 70 | u32 t; |
| 69 | jiffies_to_msecs(*timeout - jiffies)/MSEC_PER_SEC; | 71 | |
| 72 | if (*timeout == IPSET_ELEM_PERMANENT) | ||
| 73 | return 0; | ||
| 74 | |||
| 75 | t = jiffies_to_msecs(*timeout - jiffies)/MSEC_PER_SEC; | ||
| 76 | /* Zero value in userspace means no timeout */ | ||
| 77 | return t == 0 ? 1 : t; | ||
| 70 | } | 78 | } |
| 71 | 79 | ||
| 72 | #endif /* __KERNEL__ */ | 80 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 4e735be53e70..74ae3e1d19a0 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -28,6 +28,7 @@ struct nfs41_impl_id; | |||
| 28 | struct nfs_client { | 28 | struct nfs_client { |
| 29 | refcount_t cl_count; | 29 | refcount_t cl_count; |
| 30 | atomic_t cl_mds_count; | 30 | atomic_t cl_mds_count; |
| 31 | seqcount_t cl_callback_count; | ||
| 31 | int cl_cons_state; /* current construction state (-ve: init error) */ | 32 | int cl_cons_state; /* current construction state (-ve: init error) */ |
| 32 | #define NFS_CS_READY 0 /* ready to be used */ | 33 | #define NFS_CS_READY 0 /* ready to be used */ |
| 33 | #define NFS_CS_INITING 1 /* busy initialising */ | 34 | #define NFS_CS_INITING 1 /* busy initialising */ |
| @@ -235,6 +236,7 @@ struct nfs_server { | |||
| 235 | #define NFS_CAP_ACLS (1U << 3) | 236 | #define NFS_CAP_ACLS (1U << 3) |
| 236 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) | 237 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) |
| 237 | /* #define NFS_CAP_CHANGE_ATTR (1U << 5) */ | 238 | /* #define NFS_CAP_CHANGE_ATTR (1U << 5) */ |
| 239 | #define NFS_CAP_LGOPEN (1U << 5) | ||
| 238 | #define NFS_CAP_FILEID (1U << 6) | 240 | #define NFS_CAP_FILEID (1U << 6) |
| 239 | #define NFS_CAP_MODE (1U << 7) | 241 | #define NFS_CAP_MODE (1U << 7) |
| 240 | #define NFS_CAP_NLINK (1U << 8) | 242 | #define NFS_CAP_NLINK (1U << 8) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 34d28564ecf3..712eed156d09 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -259,6 +259,7 @@ struct nfs4_layoutget_args { | |||
| 259 | 259 | ||
| 260 | struct nfs4_layoutget_res { | 260 | struct nfs4_layoutget_res { |
| 261 | struct nfs4_sequence_res seq_res; | 261 | struct nfs4_sequence_res seq_res; |
| 262 | int status; | ||
| 262 | __u32 return_on_close; | 263 | __u32 return_on_close; |
| 263 | struct pnfs_layout_range range; | 264 | struct pnfs_layout_range range; |
| 264 | __u32 type; | 265 | __u32 type; |
| @@ -270,6 +271,7 @@ struct nfs4_layoutget { | |||
| 270 | struct nfs4_layoutget_args args; | 271 | struct nfs4_layoutget_args args; |
| 271 | struct nfs4_layoutget_res res; | 272 | struct nfs4_layoutget_res res; |
| 272 | struct rpc_cred *cred; | 273 | struct rpc_cred *cred; |
| 274 | unsigned callback_count; | ||
| 273 | gfp_t gfp_flags; | 275 | gfp_t gfp_flags; |
| 274 | }; | 276 | }; |
| 275 | 277 | ||
| @@ -435,6 +437,7 @@ struct nfs_openargs { | |||
| 435 | enum createmode4 createmode; | 437 | enum createmode4 createmode; |
| 436 | const struct nfs4_label *label; | 438 | const struct nfs4_label *label; |
| 437 | umode_t umask; | 439 | umode_t umask; |
| 440 | struct nfs4_layoutget_args *lg_args; | ||
| 438 | }; | 441 | }; |
| 439 | 442 | ||
| 440 | struct nfs_openres { | 443 | struct nfs_openres { |
| @@ -457,6 +460,7 @@ struct nfs_openres { | |||
| 457 | __u32 access_request; | 460 | __u32 access_request; |
| 458 | __u32 access_supported; | 461 | __u32 access_supported; |
| 459 | __u32 access_result; | 462 | __u32 access_result; |
| 463 | struct nfs4_layoutget_res *lg_res; | ||
| 460 | }; | 464 | }; |
| 461 | 465 | ||
| 462 | /* | 466 | /* |
| @@ -1434,6 +1438,8 @@ enum { | |||
| 1434 | NFS_IOHDR_EOF, | 1438 | NFS_IOHDR_EOF, |
| 1435 | NFS_IOHDR_REDO, | 1439 | NFS_IOHDR_REDO, |
| 1436 | NFS_IOHDR_STAT, | 1440 | NFS_IOHDR_STAT, |
| 1441 | NFS_IOHDR_RESEND_PNFS, | ||
| 1442 | NFS_IOHDR_RESEND_MDS, | ||
| 1437 | }; | 1443 | }; |
| 1438 | 1444 | ||
| 1439 | struct nfs_io_completion; | 1445 | struct nfs_io_completion; |
| @@ -1577,7 +1583,8 @@ struct nfs_rpc_ops { | |||
| 1577 | struct dentry *(*try_mount) (int, const char *, struct nfs_mount_info *, | 1583 | struct dentry *(*try_mount) (int, const char *, struct nfs_mount_info *, |
| 1578 | struct nfs_subversion *); | 1584 | struct nfs_subversion *); |
| 1579 | int (*getattr) (struct nfs_server *, struct nfs_fh *, | 1585 | int (*getattr) (struct nfs_server *, struct nfs_fh *, |
| 1580 | struct nfs_fattr *, struct nfs4_label *); | 1586 | struct nfs_fattr *, struct nfs4_label *, |
| 1587 | struct inode *); | ||
| 1581 | int (*setattr) (struct dentry *, struct nfs_fattr *, | 1588 | int (*setattr) (struct dentry *, struct nfs_fattr *, |
| 1582 | struct iattr *); | 1589 | struct iattr *); |
| 1583 | int (*lookup) (struct inode *, const struct qstr *, | 1590 | int (*lookup) (struct inode *, const struct qstr *, |
| @@ -1591,7 +1598,7 @@ struct nfs_rpc_ops { | |||
| 1591 | int (*create) (struct inode *, struct dentry *, | 1598 | int (*create) (struct inode *, struct dentry *, |
| 1592 | struct iattr *, int); | 1599 | struct iattr *, int); |
| 1593 | int (*remove) (struct inode *, struct dentry *); | 1600 | int (*remove) (struct inode *, struct dentry *); |
| 1594 | void (*unlink_setup) (struct rpc_message *, struct dentry *); | 1601 | void (*unlink_setup) (struct rpc_message *, struct dentry *, struct inode *); |
| 1595 | void (*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *); | 1602 | void (*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *); |
| 1596 | int (*unlink_done) (struct rpc_task *, struct inode *); | 1603 | int (*unlink_done) (struct rpc_task *, struct inode *); |
| 1597 | void (*rename_setup) (struct rpc_message *msg, | 1604 | void (*rename_setup) (struct rpc_message *msg, |
| @@ -1620,9 +1627,11 @@ struct nfs_rpc_ops { | |||
| 1620 | struct nfs_pgio_header *); | 1627 | struct nfs_pgio_header *); |
| 1621 | void (*read_setup)(struct nfs_pgio_header *, struct rpc_message *); | 1628 | void (*read_setup)(struct nfs_pgio_header *, struct rpc_message *); |
| 1622 | int (*read_done)(struct rpc_task *, struct nfs_pgio_header *); | 1629 | int (*read_done)(struct rpc_task *, struct nfs_pgio_header *); |
| 1623 | void (*write_setup)(struct nfs_pgio_header *, struct rpc_message *); | 1630 | void (*write_setup)(struct nfs_pgio_header *, struct rpc_message *, |
| 1631 | struct rpc_clnt **); | ||
| 1624 | int (*write_done)(struct rpc_task *, struct nfs_pgio_header *); | 1632 | int (*write_done)(struct rpc_task *, struct nfs_pgio_header *); |
| 1625 | void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *); | 1633 | void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *, |
| 1634 | struct rpc_clnt **); | ||
| 1626 | void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *); | 1635 | void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *); |
| 1627 | int (*commit_done) (struct rpc_task *, struct nfs_commit_data *); | 1636 | int (*commit_done) (struct rpc_task *, struct nfs_commit_data *); |
| 1628 | int (*lock)(struct file *, int, struct file_lock *); | 1637 | int (*lock)(struct file *, int, struct file_lock *); |
diff --git a/include/linux/of_clk.h b/include/linux/of_clk.h new file mode 100644 index 000000000000..b27da9f164cb --- /dev/null +++ b/include/linux/of_clk.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * OF clock helpers | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef __LINUX_OF_CLK_H | ||
| 7 | #define __LINUX_OF_CLK_H | ||
| 8 | |||
| 9 | #if defined(CONFIG_COMMON_CLK) && defined(CONFIG_OF) | ||
| 10 | |||
| 11 | unsigned int of_clk_get_parent_count(struct device_node *np); | ||
| 12 | const char *of_clk_get_parent_name(struct device_node *np, int index); | ||
| 13 | void of_clk_init(const struct of_device_id *matches); | ||
| 14 | |||
| 15 | #else /* !CONFIG_COMMON_CLK || !CONFIG_OF */ | ||
| 16 | |||
| 17 | static inline unsigned int of_clk_get_parent_count(struct device_node *np) | ||
| 18 | { | ||
| 19 | return 0; | ||
| 20 | } | ||
| 21 | static inline const char *of_clk_get_parent_name(struct device_node *np, | ||
| 22 | int index) | ||
| 23 | { | ||
| 24 | return NULL; | ||
| 25 | } | ||
| 26 | static inline void of_clk_init(const struct of_device_id *matches) {} | ||
| 27 | |||
| 28 | #endif /* !CONFIG_COMMON_CLK || !CONFIG_OF */ | ||
| 29 | |||
| 30 | #endif /* __LINUX_OF_CLK_H */ | ||
diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index 40036a57d072..ad5444491975 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h | |||
| @@ -78,7 +78,7 @@ struct arm_pmu { | |||
| 78 | struct pmu pmu; | 78 | struct pmu pmu; |
| 79 | cpumask_t supported_cpus; | 79 | cpumask_t supported_cpus; |
| 80 | char *name; | 80 | char *name; |
| 81 | irqreturn_t (*handle_irq)(int irq_num, void *dev); | 81 | irqreturn_t (*handle_irq)(struct arm_pmu *pmu); |
| 82 | void (*enable)(struct perf_event *event); | 82 | void (*enable)(struct perf_event *event); |
| 83 | void (*disable)(struct perf_event *event); | 83 | void (*disable)(struct perf_event *event); |
| 84 | int (*get_event_idx)(struct pmu_hw_events *hw_events, | 84 | int (*get_event_idx)(struct pmu_hw_events *hw_events, |
diff --git a/include/linux/platform_data/gpio-dwapb.h b/include/linux/platform_data/gpio-dwapb.h index 2dc7f4a8ab09..419cfacb4b42 100644 --- a/include/linux/platform_data/gpio-dwapb.h +++ b/include/linux/platform_data/gpio-dwapb.h | |||
| @@ -19,7 +19,8 @@ struct dwapb_port_property { | |||
| 19 | unsigned int idx; | 19 | unsigned int idx; |
| 20 | unsigned int ngpio; | 20 | unsigned int ngpio; |
| 21 | unsigned int gpio_base; | 21 | unsigned int gpio_base; |
| 22 | unsigned int irq; | 22 | int irq[32]; |
| 23 | bool has_irq; | ||
| 23 | bool irq_shared; | 24 | bool irq_shared; |
| 24 | }; | 25 | }; |
| 25 | 26 | ||
diff --git a/include/linux/i2c-gpio.h b/include/linux/platform_data/i2c-gpio.h index 352c1426fd4d..352c1426fd4d 100644 --- a/include/linux/i2c-gpio.h +++ b/include/linux/platform_data/i2c-gpio.h | |||
diff --git a/include/linux/i2c-mux-gpio.h b/include/linux/platform_data/i2c-mux-gpio.h index 4406108201fe..4406108201fe 100644 --- a/include/linux/i2c-mux-gpio.h +++ b/include/linux/platform_data/i2c-mux-gpio.h | |||
diff --git a/include/linux/i2c-ocores.h b/include/linux/platform_data/i2c-ocores.h index 01edd96fe1f7..01edd96fe1f7 100644 --- a/include/linux/i2c-ocores.h +++ b/include/linux/platform_data/i2c-ocores.h | |||
diff --git a/include/linux/i2c-omap.h b/include/linux/platform_data/i2c-omap.h index 3444265ee8ee..3444265ee8ee 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/platform_data/i2c-omap.h | |||
diff --git a/include/linux/i2c-pca-platform.h b/include/linux/platform_data/i2c-pca-platform.h index c37329432a8e..c37329432a8e 100644 --- a/include/linux/i2c-pca-platform.h +++ b/include/linux/platform_data/i2c-pca-platform.h | |||
diff --git a/include/linux/i2c-xiic.h b/include/linux/platform_data/i2c-xiic.h index 4f9f2256a97e..4f9f2256a97e 100644 --- a/include/linux/i2c-xiic.h +++ b/include/linux/platform_data/i2c-xiic.h | |||
diff --git a/include/linux/platform_data/media/ir-rx51.h b/include/linux/platform_data/media/ir-rx51.h deleted file mode 100644 index 9d127aa648e7..000000000000 --- a/include/linux/platform_data/media/ir-rx51.h +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef _IR_RX51_H | ||
| 3 | #define _IR_RX51_H | ||
| 4 | |||
| 5 | struct ir_rx51_platform_data { | ||
| 6 | int(*set_max_mpu_wakeup_lat)(struct device *dev, long t); | ||
| 7 | }; | ||
| 8 | |||
| 9 | #endif | ||
diff --git a/include/linux/platform_data/mlxreg.h b/include/linux/platform_data/mlxreg.h index 2744cff1b297..19f5cb618c55 100644 --- a/include/linux/platform_data/mlxreg.h +++ b/include/linux/platform_data/mlxreg.h | |||
| @@ -58,11 +58,10 @@ struct mlxreg_hotplug_device { | |||
| 58 | * struct mlxreg_core_data - attributes control data: | 58 | * struct mlxreg_core_data - attributes control data: |
| 59 | * | 59 | * |
| 60 | * @label: attribute label; | 60 | * @label: attribute label; |
| 61 | * @label: attribute register offset; | ||
| 62 | * @reg: attribute register; | 61 | * @reg: attribute register; |
| 63 | * @mask: attribute access mask; | 62 | * @mask: attribute access mask; |
| 64 | * @mode: access mode; | ||
| 65 | * @bit: attribute effective bit; | 63 | * @bit: attribute effective bit; |
| 64 | * @mode: access mode; | ||
| 66 | * @np - pointer to node platform associated with attribute; | 65 | * @np - pointer to node platform associated with attribute; |
| 67 | * @hpdev - hotplug device data; | 66 | * @hpdev - hotplug device data; |
| 68 | * @health_cntr: dynamic device health indication counter; | 67 | * @health_cntr: dynamic device health indication counter; |
diff --git a/include/linux/platform_data/mtd-davinci.h b/include/linux/platform_data/mtd-davinci.h index f1a2cf655bdb..1bbfa27cccb4 100644 --- a/include/linux/platform_data/mtd-davinci.h +++ b/include/linux/platform_data/mtd-davinci.h | |||
| @@ -56,6 +56,16 @@ struct davinci_nand_pdata { /* platform_data */ | |||
| 56 | uint32_t mask_ale; | 56 | uint32_t mask_ale; |
| 57 | uint32_t mask_cle; | 57 | uint32_t mask_cle; |
| 58 | 58 | ||
| 59 | /* | ||
| 60 | * 0-indexed chip-select number of the asynchronous | ||
| 61 | * interface to which the NAND device has been connected. | ||
| 62 | * | ||
| 63 | * So, if you have NAND connected to CS3 of DA850, you | ||
| 64 | * will pass '1' here. Since the asynchronous interface | ||
| 65 | * on DA850 starts from CS2. | ||
| 66 | */ | ||
| 67 | uint32_t core_chipsel; | ||
| 68 | |||
| 59 | /* for packages using two chipselects */ | 69 | /* for packages using two chipselects */ |
| 60 | uint32_t mask_chipsel; | 70 | uint32_t mask_chipsel; |
| 61 | 71 | ||
diff --git a/include/linux/platform_data/sc18is602.h b/include/linux/platform_data/sc18is602.h index 997b06634152..18602cab7799 100644 --- a/include/linux/platform_data/sc18is602.h +++ b/include/linux/platform_data/sc18is602.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | * | 9 | * |
| 10 | * For further information, see the Documentation/spi/sc18is602 file. | 10 | * For further information, see the Documentation/spi/spi-sc18is602 file. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | /** | 13 | /** |
diff --git a/include/linux/platform_data/shmob_drm.h b/include/linux/platform_data/shmob_drm.h index 7c686d335c12..ee495d707f17 100644 --- a/include/linux/platform_data/shmob_drm.h +++ b/include/linux/platform_data/shmob_drm.h | |||
| @@ -18,9 +18,6 @@ | |||
| 18 | 18 | ||
| 19 | #include <drm/drm_mode.h> | 19 | #include <drm/drm_mode.h> |
| 20 | 20 | ||
| 21 | struct sh_mobile_meram_cfg; | ||
| 22 | struct sh_mobile_meram_info; | ||
| 23 | |||
| 24 | enum shmob_drm_clk_source { | 21 | enum shmob_drm_clk_source { |
| 25 | SHMOB_DRM_CLK_BUS, | 22 | SHMOB_DRM_CLK_BUS, |
| 26 | SHMOB_DRM_CLK_PERIPHERAL, | 23 | SHMOB_DRM_CLK_PERIPHERAL, |
| @@ -93,7 +90,6 @@ struct shmob_drm_platform_data { | |||
| 93 | struct shmob_drm_interface_data iface; | 90 | struct shmob_drm_interface_data iface; |
| 94 | struct shmob_drm_panel_data panel; | 91 | struct shmob_drm_panel_data panel; |
| 95 | struct shmob_drm_backlight_data backlight; | 92 | struct shmob_drm_backlight_data backlight; |
| 96 | const struct sh_mobile_meram_cfg *meram; | ||
| 97 | }; | 93 | }; |
| 98 | 94 | ||
| 99 | #endif /* __SHMOB_DRM_H__ */ | 95 | #endif /* __SHMOB_DRM_H__ */ |
diff --git a/include/linux/platform_data/spi-imx.h b/include/linux/platform_data/spi-imx.h index 6f012fefa1a2..328f670d10bd 100644 --- a/include/linux/platform_data/spi-imx.h +++ b/include/linux/platform_data/spi-imx.h | |||
| @@ -5,24 +5,29 @@ | |||
| 5 | 5 | ||
| 6 | /* | 6 | /* |
| 7 | * struct spi_imx_master - device.platform_data for SPI controller devices. | 7 | * struct spi_imx_master - device.platform_data for SPI controller devices. |
| 8 | * @chipselect: Array of chipselects for this master. Numbers >= 0 mean gpio | 8 | * @chipselect: Array of chipselects for this master or NULL. Numbers >= 0 |
| 9 | * pins, numbers < 0 mean internal CSPI chipselects according | 9 | * mean GPIO pins, -ENOENT means internal CSPI chipselect |
| 10 | * to MXC_SPI_CS(). Normally you want to use gpio based chip | 10 | * matching the position in the array. E.g., if chipselect[1] = |
| 11 | * selects as the CSPI module tries to be intelligent about | 11 | * -ENOENT then a SPI slave using chip select 1 will use the |
| 12 | * when to assert the chipselect: The CSPI module deasserts the | 12 | * native SS1 line of the CSPI. Omitting the array will use |
| 13 | * chipselect once it runs out of input data. The other problem | 13 | * all native chip selects. |
| 14 | * is that it is not possible to mix between high active and low | 14 | |
| 15 | * active chipselects on one single bus using the internal | 15 | * Normally you want to use gpio based chip selects as the CSPI |
| 16 | * chipselects. Unfortunately Freescale decided to put some | 16 | * module tries to be intelligent about when to assert the |
| 17 | * chipselect: The CSPI module deasserts the chipselect once it | ||
| 18 | * runs out of input data. The other problem is that it is not | ||
| 19 | * possible to mix between high active and low active chipselects | ||
| 20 | * on one single bus using the internal chipselects. | ||
| 21 | * Unfortunately, on some SoCs, Freescale decided to put some | ||
| 17 | * chipselects on dedicated pins which are not usable as gpios, | 22 | * chipselects on dedicated pins which are not usable as gpios, |
| 18 | * so we have to support the internal chipselects. | 23 | * so we have to support the internal chipselects. |
| 19 | * @num_chipselect: ARRAY_SIZE(chipselect) | 24 | * |
| 25 | * @num_chipselect: If @chipselect is specified, ARRAY_SIZE(chipselect), | ||
| 26 | * otherwise the number of native chip selects. | ||
| 20 | */ | 27 | */ |
| 21 | struct spi_imx_master { | 28 | struct spi_imx_master { |
| 22 | int *chipselect; | 29 | int *chipselect; |
| 23 | int num_chipselect; | 30 | int num_chipselect; |
| 24 | }; | 31 | }; |
| 25 | 32 | ||
| 26 | #define MXC_SPI_CS(no) ((no) - 32) | ||
| 27 | |||
| 28 | #endif /* __MACH_SPI_H_*/ | 33 | #endif /* __MACH_SPI_H_*/ |
diff --git a/include/linux/platform_data/ti-aemif.h b/include/linux/platform_data/ti-aemif.h index ac72e115093c..e6407bafcbf8 100644 --- a/include/linux/platform_data/ti-aemif.h +++ b/include/linux/platform_data/ti-aemif.h | |||
| @@ -16,8 +16,33 @@ | |||
| 16 | 16 | ||
| 17 | #include <linux/of_platform.h> | 17 | #include <linux/of_platform.h> |
| 18 | 18 | ||
| 19 | /** | ||
| 20 | * struct aemif_abus_data - Async bus configuration parameters. | ||
| 21 | * | ||
| 22 | * @cs - Chip-select number. | ||
| 23 | */ | ||
| 24 | struct aemif_abus_data { | ||
| 25 | u32 cs; | ||
| 26 | }; | ||
| 27 | |||
| 28 | /** | ||
| 29 | * struct aemif_platform_data - Data to set up the TI aemif driver. | ||
| 30 | * | ||
| 31 | * @dev_lookup: of_dev_auxdata passed to of_platform_populate() for aemif | ||
| 32 | * subdevices. | ||
| 33 | * @cs_offset: Lowest allowed chip-select number. | ||
| 34 | * @abus_data: Array of async bus configuration entries. | ||
| 35 | * @num_abus_data: Number of abus entries. | ||
| 36 | * @sub_devices: Array of platform subdevices. | ||
| 37 | * @num_sub_devices: Number of subdevices. | ||
| 38 | */ | ||
| 19 | struct aemif_platform_data { | 39 | struct aemif_platform_data { |
| 20 | struct of_dev_auxdata *dev_lookup; | 40 | struct of_dev_auxdata *dev_lookup; |
| 41 | u32 cs_offset; | ||
| 42 | struct aemif_abus_data *abus_data; | ||
| 43 | size_t num_abus_data; | ||
| 44 | struct platform_device *sub_devices; | ||
| 45 | size_t num_sub_devices; | ||
| 21 | }; | 46 | }; |
| 22 | 47 | ||
| 23 | #endif /* __TI_DAVINCI_AEMIF_DATA_H__ */ | 48 | #endif /* __TI_DAVINCI_AEMIF_DATA_H__ */ |
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h index 80ce28d40832..990aad477458 100644 --- a/include/linux/platform_data/ti-sysc.h +++ b/include/linux/platform_data/ti-sysc.h | |||
| @@ -45,6 +45,7 @@ struct sysc_regbits { | |||
| 45 | s8 emufree_shift; | 45 | s8 emufree_shift; |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | #define SYSC_QUIRK_RESOURCE_PROVIDER BIT(9) | ||
| 48 | #define SYSC_QUIRK_LEGACY_IDLE BIT(8) | 49 | #define SYSC_QUIRK_LEGACY_IDLE BIT(8) |
| 49 | #define SYSC_QUIRK_RESET_STATUS BIT(7) | 50 | #define SYSC_QUIRK_RESET_STATUS BIT(7) |
| 50 | #define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6) | 51 | #define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6) |
diff --git a/include/linux/platform_data/tsl2772.h b/include/linux/platform_data/tsl2772.h new file mode 100644 index 000000000000..f8ade15a35e2 --- /dev/null +++ b/include/linux/platform_data/tsl2772.h | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ */ | ||
| 2 | /* | ||
| 3 | * Device driver for monitoring ambient light intensity (lux) | ||
| 4 | * and proximity (prox) within the TAOS TSL2772 family of devices. | ||
| 5 | * | ||
| 6 | * Copyright (c) 2012, TAOS Corporation. | ||
| 7 | * Copyright (c) 2017-2018 Brian Masney <masneyb@onstation.org> | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __TSL2772_H | ||
| 11 | #define __TSL2772_H | ||
| 12 | |||
| 13 | struct tsl2772_lux { | ||
| 14 | unsigned int ch0; | ||
| 15 | unsigned int ch1; | ||
| 16 | }; | ||
| 17 | |||
| 18 | /* Max number of segments allowable in LUX table */ | ||
| 19 | #define TSL2772_MAX_LUX_TABLE_SIZE 6 | ||
| 20 | /* The default LUX tables all have 3 elements. */ | ||
| 21 | #define TSL2772_DEF_LUX_TABLE_SZ 3 | ||
| 22 | #define TSL2772_DEFAULT_TABLE_BYTES (sizeof(struct tsl2772_lux) * \ | ||
| 23 | TSL2772_DEF_LUX_TABLE_SZ) | ||
| 24 | |||
| 25 | /* Proximity diode to use */ | ||
| 26 | #define TSL2772_DIODE0 0x01 | ||
| 27 | #define TSL2772_DIODE1 0x02 | ||
| 28 | #define TSL2772_DIODE_BOTH 0x03 | ||
| 29 | |||
| 30 | /* LED Power */ | ||
| 31 | #define TSL2772_100_mA 0x00 | ||
| 32 | #define TSL2772_50_mA 0x01 | ||
| 33 | #define TSL2772_25_mA 0x02 | ||
| 34 | #define TSL2772_13_mA 0x03 | ||
| 35 | |||
| 36 | /** | ||
| 37 | * struct tsl2772_settings - Settings for the tsl2772 driver | ||
| 38 | * @als_time: Integration time of the ALS channel ADCs in 2.73 ms | ||
| 39 | * increments. Total integration time is | ||
| 40 | * (256 - als_time) * 2.73. | ||
| 41 | * @als_gain: Index into the tsl2772_als_gain array. | ||
| 42 | * @als_gain_trim: Default gain trim to account for aperture effects. | ||
| 43 | * @wait_time: Time between proximity and ALS cycles in 2.73 | ||
| 44 | * periods. | ||
| 45 | * @prox_time: Integration time of the proximity ADC in 2.73 ms | ||
| 46 | * increments. Total integration time is | ||
| 47 | * (256 - prx_time) * 2.73. | ||
| 48 | * @prox_gain: Index into the tsl2772_prx_gain array. | ||
| 49 | * @als_prox_config: The value of the ALS / Proximity configuration | ||
| 50 | * register. | ||
| 51 | * @als_cal_target: Known external ALS reading for calibration. | ||
| 52 | * @als_persistence: H/W Filters, Number of 'out of limits' ALS readings. | ||
| 53 | * @als_interrupt_en: Enable/Disable ALS interrupts | ||
| 54 | * @als_thresh_low: CH0 'low' count to trigger interrupt. | ||
| 55 | * @als_thresh_high: CH0 'high' count to trigger interrupt. | ||
| 56 | * @prox_persistence: H/W Filters, Number of 'out of limits' proximity | ||
| 57 | * readings. | ||
| 58 | * @prox_interrupt_en: Enable/Disable proximity interrupts. | ||
| 59 | * @prox_thres_low: Low threshold proximity detection. | ||
| 60 | * @prox_thres_high: High threshold proximity detection. | ||
| 61 | * @prox_pulse_count: Number if proximity emitter pulses. | ||
| 62 | * @prox_max_samples_cal: The number of samples that are taken when performing | ||
| 63 | * a proximity calibration. | ||
| 64 | * @prox_diode Which diode(s) to use for driving the external | ||
| 65 | * LED(s) for proximity sensing. | ||
| 66 | * @prox_power The amount of power to use for the external LED(s). | ||
| 67 | */ | ||
| 68 | struct tsl2772_settings { | ||
| 69 | int als_time; | ||
| 70 | int als_gain; | ||
| 71 | int als_gain_trim; | ||
| 72 | int wait_time; | ||
| 73 | int prox_time; | ||
| 74 | int prox_gain; | ||
| 75 | int als_prox_config; | ||
| 76 | int als_cal_target; | ||
| 77 | u8 als_persistence; | ||
| 78 | bool als_interrupt_en; | ||
| 79 | int als_thresh_low; | ||
| 80 | int als_thresh_high; | ||
| 81 | u8 prox_persistence; | ||
| 82 | bool prox_interrupt_en; | ||
| 83 | int prox_thres_low; | ||
| 84 | int prox_thres_high; | ||
| 85 | int prox_pulse_count; | ||
| 86 | int prox_max_samples_cal; | ||
| 87 | int prox_diode; | ||
| 88 | int prox_power; | ||
| 89 | }; | ||
| 90 | |||
| 91 | /** | ||
| 92 | * struct tsl2772_platform_data - Platform callback, glass and defaults | ||
| 93 | * @platform_lux_table: Device specific glass coefficents | ||
| 94 | * @platform_default_settings: Device specific power on defaults | ||
| 95 | */ | ||
| 96 | struct tsl2772_platform_data { | ||
| 97 | struct tsl2772_lux platform_lux_table[TSL2772_MAX_LUX_TABLE_SIZE]; | ||
| 98 | struct tsl2772_settings *platform_default_settings; | ||
| 99 | }; | ||
| 100 | |||
| 101 | #endif /* __TSL2772_H */ | ||
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 42e0d649e653..cb8d84090cfb 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
| @@ -234,9 +234,11 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); | |||
| 234 | int of_genpd_parse_idle_states(struct device_node *dn, | 234 | int of_genpd_parse_idle_states(struct device_node *dn, |
| 235 | struct genpd_power_state **states, int *n); | 235 | struct genpd_power_state **states, int *n); |
| 236 | unsigned int of_genpd_opp_to_performance_state(struct device *dev, | 236 | unsigned int of_genpd_opp_to_performance_state(struct device *dev, |
| 237 | struct device_node *opp_node); | 237 | struct device_node *np); |
| 238 | 238 | ||
| 239 | int genpd_dev_pm_attach(struct device *dev); | 239 | int genpd_dev_pm_attach(struct device *dev); |
| 240 | struct device *genpd_dev_pm_attach_by_id(struct device *dev, | ||
| 241 | unsigned int index); | ||
| 240 | #else /* !CONFIG_PM_GENERIC_DOMAINS_OF */ | 242 | #else /* !CONFIG_PM_GENERIC_DOMAINS_OF */ |
| 241 | static inline int of_genpd_add_provider_simple(struct device_node *np, | 243 | static inline int of_genpd_add_provider_simple(struct device_node *np, |
| 242 | struct generic_pm_domain *genpd) | 244 | struct generic_pm_domain *genpd) |
| @@ -272,9 +274,9 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn, | |||
| 272 | 274 | ||
| 273 | static inline unsigned int | 275 | static inline unsigned int |
| 274 | of_genpd_opp_to_performance_state(struct device *dev, | 276 | of_genpd_opp_to_performance_state(struct device *dev, |
| 275 | struct device_node *opp_node) | 277 | struct device_node *np) |
| 276 | { | 278 | { |
| 277 | return -ENODEV; | 279 | return 0; |
| 278 | } | 280 | } |
| 279 | 281 | ||
| 280 | static inline int genpd_dev_pm_attach(struct device *dev) | 282 | static inline int genpd_dev_pm_attach(struct device *dev) |
| @@ -282,6 +284,12 @@ static inline int genpd_dev_pm_attach(struct device *dev) | |||
| 282 | return 0; | 284 | return 0; |
| 283 | } | 285 | } |
| 284 | 286 | ||
| 287 | static inline struct device *genpd_dev_pm_attach_by_id(struct device *dev, | ||
| 288 | unsigned int index) | ||
| 289 | { | ||
| 290 | return NULL; | ||
| 291 | } | ||
| 292 | |||
| 285 | static inline | 293 | static inline |
| 286 | struct generic_pm_domain *of_genpd_remove_last(struct device_node *np) | 294 | struct generic_pm_domain *of_genpd_remove_last(struct device_node *np) |
| 287 | { | 295 | { |
| @@ -291,6 +299,8 @@ struct generic_pm_domain *of_genpd_remove_last(struct device_node *np) | |||
| 291 | 299 | ||
| 292 | #ifdef CONFIG_PM | 300 | #ifdef CONFIG_PM |
| 293 | int dev_pm_domain_attach(struct device *dev, bool power_on); | 301 | int dev_pm_domain_attach(struct device *dev, bool power_on); |
| 302 | struct device *dev_pm_domain_attach_by_id(struct device *dev, | ||
| 303 | unsigned int index); | ||
| 294 | void dev_pm_domain_detach(struct device *dev, bool power_off); | 304 | void dev_pm_domain_detach(struct device *dev, bool power_off); |
| 295 | void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd); | 305 | void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd); |
| 296 | #else | 306 | #else |
| @@ -298,6 +308,11 @@ static inline int dev_pm_domain_attach(struct device *dev, bool power_on) | |||
| 298 | { | 308 | { |
| 299 | return 0; | 309 | return 0; |
| 300 | } | 310 | } |
| 311 | static inline struct device *dev_pm_domain_attach_by_id(struct device *dev, | ||
| 312 | unsigned int index) | ||
| 313 | { | ||
| 314 | return NULL; | ||
| 315 | } | ||
| 301 | static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {} | 316 | static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {} |
| 302 | static inline void dev_pm_domain_set(struct device *dev, | 317 | static inline void dev_pm_domain_set(struct device *dev, |
| 303 | struct dev_pm_domain *pd) {} | 318 | struct dev_pm_domain *pd) {} |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index db5dbbf7a48d..f0fc4700b6ff 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -56,7 +56,8 @@ extern void pm_runtime_update_max_time_suspended(struct device *dev, | |||
| 56 | s64 delta_ns); | 56 | s64 delta_ns); |
| 57 | extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable); | 57 | extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable); |
| 58 | extern void pm_runtime_clean_up_links(struct device *dev); | 58 | extern void pm_runtime_clean_up_links(struct device *dev); |
| 59 | extern void pm_runtime_resume_suppliers(struct device *dev); | 59 | extern void pm_runtime_get_suppliers(struct device *dev); |
| 60 | extern void pm_runtime_put_suppliers(struct device *dev); | ||
| 60 | extern void pm_runtime_new_link(struct device *dev); | 61 | extern void pm_runtime_new_link(struct device *dev); |
| 61 | extern void pm_runtime_drop_link(struct device *dev); | 62 | extern void pm_runtime_drop_link(struct device *dev); |
| 62 | 63 | ||
| @@ -172,7 +173,8 @@ static inline unsigned long pm_runtime_autosuspend_expiration( | |||
| 172 | static inline void pm_runtime_set_memalloc_noio(struct device *dev, | 173 | static inline void pm_runtime_set_memalloc_noio(struct device *dev, |
| 173 | bool enable){} | 174 | bool enable){} |
| 174 | static inline void pm_runtime_clean_up_links(struct device *dev) {} | 175 | static inline void pm_runtime_clean_up_links(struct device *dev) {} |
| 175 | static inline void pm_runtime_resume_suppliers(struct device *dev) {} | 176 | static inline void pm_runtime_get_suppliers(struct device *dev) {} |
| 177 | static inline void pm_runtime_put_suppliers(struct device *dev) {} | ||
| 176 | static inline void pm_runtime_new_link(struct device *dev) {} | 178 | static inline void pm_runtime_new_link(struct device *dev) {} |
| 177 | static inline void pm_runtime_drop_link(struct device *dev) {} | 179 | static inline void pm_runtime_drop_link(struct device *dev) {} |
| 178 | 180 | ||
diff --git a/include/linux/poll.h b/include/linux/poll.h index fdf86b4cbc71..7e0fdcf905d2 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
| @@ -74,18 +74,18 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) | |||
| 74 | pt->_key = ~(__poll_t)0; /* all events enabled */ | 74 | pt->_key = ~(__poll_t)0; /* all events enabled */ |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | static inline bool file_has_poll_mask(struct file *file) | 77 | static inline bool file_can_poll(struct file *file) |
| 78 | { | 78 | { |
| 79 | return file->f_op->get_poll_head && file->f_op->poll_mask; | 79 | return file->f_op->poll; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | static inline bool file_can_poll(struct file *file) | 82 | static inline __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt) |
| 83 | { | 83 | { |
| 84 | return file->f_op->poll || file_has_poll_mask(file); | 84 | if (unlikely(!file->f_op->poll)) |
| 85 | return DEFAULT_POLLMASK; | ||
| 86 | return file->f_op->poll(file, pt); | ||
| 85 | } | 87 | } |
| 86 | 88 | ||
| 87 | __poll_t vfs_poll(struct file *file, struct poll_table_struct *pt); | ||
| 88 | |||
| 89 | struct poll_table_entry { | 89 | struct poll_table_entry { |
| 90 | struct file *filp; | 90 | struct file *filp; |
| 91 | __poll_t key; | 91 | __poll_t key; |
diff --git a/include/linux/power/bq27xxx_battery.h b/include/linux/power/bq27xxx_battery.h index 01fbf1b16258..d6355f49fbae 100644 --- a/include/linux/power/bq27xxx_battery.h +++ b/include/linux/power/bq27xxx_battery.h | |||
| @@ -24,8 +24,9 @@ enum bq27xxx_chip { | |||
| 24 | BQ27546, | 24 | BQ27546, |
| 25 | BQ27742, | 25 | BQ27742, |
| 26 | BQ27545, /* bq27545 */ | 26 | BQ27545, /* bq27545 */ |
| 27 | BQ27421, /* bq27421, bq27425, bq27441, bq27621 */ | 27 | BQ27421, /* bq27421, bq27441, bq27621 */ |
| 28 | BQ27425, | 28 | BQ27425, |
| 29 | BQ27426, | ||
| 29 | BQ27441, | 30 | BQ27441, |
| 30 | BQ27621, | 31 | BQ27621, |
| 31 | }; | 32 | }; |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index e518352137e7..626fc65c4336 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
| @@ -14,6 +14,8 @@ struct seq_operations; | |||
| 14 | 14 | ||
| 15 | #ifdef CONFIG_PROC_FS | 15 | #ifdef CONFIG_PROC_FS |
| 16 | 16 | ||
| 17 | typedef int (*proc_write_t)(struct file *, char *, size_t); | ||
| 18 | |||
| 17 | extern void proc_root_init(void); | 19 | extern void proc_root_init(void); |
| 18 | extern void proc_flush_task(struct task_struct *); | 20 | extern void proc_flush_task(struct task_struct *); |
| 19 | 21 | ||
| @@ -61,6 +63,16 @@ struct proc_dir_entry *proc_create_net_data(const char *name, umode_t mode, | |||
| 61 | struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode, | 63 | struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode, |
| 62 | struct proc_dir_entry *parent, | 64 | struct proc_dir_entry *parent, |
| 63 | int (*show)(struct seq_file *, void *), void *data); | 65 | int (*show)(struct seq_file *, void *), void *data); |
| 66 | struct proc_dir_entry *proc_create_net_data_write(const char *name, umode_t mode, | ||
| 67 | struct proc_dir_entry *parent, | ||
| 68 | const struct seq_operations *ops, | ||
| 69 | proc_write_t write, | ||
| 70 | unsigned int state_size, void *data); | ||
| 71 | struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mode, | ||
| 72 | struct proc_dir_entry *parent, | ||
| 73 | int (*show)(struct seq_file *, void *), | ||
| 74 | proc_write_t write, | ||
| 75 | void *data); | ||
| 64 | 76 | ||
| 65 | #else /* CONFIG_PROC_FS */ | 77 | #else /* CONFIG_PROC_FS */ |
| 66 | 78 | ||
diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 61f806a7fe29..a15bc4d48752 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h | |||
| @@ -71,7 +71,7 @@ struct pstore_record { | |||
| 71 | struct pstore_info *psi; | 71 | struct pstore_info *psi; |
| 72 | enum pstore_type_id type; | 72 | enum pstore_type_id type; |
| 73 | u64 id; | 73 | u64 id; |
| 74 | struct timespec time; | 74 | struct timespec64 time; |
| 75 | char *buf; | 75 | char *buf; |
| 76 | ssize_t size; | 76 | ssize_t size; |
| 77 | ssize_t ecc_notice_size; | 77 | ssize_t ecc_notice_size; |
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index e8afbd71a140..8ea265a022fd 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h | |||
| @@ -14,6 +14,8 @@ struct platform_pwm_backlight_data { | |||
| 14 | unsigned int lth_brightness; | 14 | unsigned int lth_brightness; |
| 15 | unsigned int pwm_period_ns; | 15 | unsigned int pwm_period_ns; |
| 16 | unsigned int *levels; | 16 | unsigned int *levels; |
| 17 | unsigned int post_pwm_on_delay; | ||
| 18 | unsigned int pwm_off_delay; | ||
| 17 | /* TODO remove once all users are switched to gpiod_* API */ | 19 | /* TODO remove once all users are switched to gpiod_* API */ |
| 18 | int enable_gpio; | 20 | int enable_gpio; |
| 19 | int (*init)(struct device *dev); | 21 | int (*init)(struct device *dev); |
diff --git a/include/linux/qcom-geni-se.h b/include/linux/qcom-geni-se.h new file mode 100644 index 000000000000..5d6144977828 --- /dev/null +++ b/include/linux/qcom-geni-se.h | |||
| @@ -0,0 +1,425 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _LINUX_QCOM_GENI_SE | ||
| 7 | #define _LINUX_QCOM_GENI_SE | ||
| 8 | |||
| 9 | /* Transfer mode supported by GENI Serial Engines */ | ||
| 10 | enum geni_se_xfer_mode { | ||
| 11 | GENI_SE_INVALID, | ||
| 12 | GENI_SE_FIFO, | ||
| 13 | GENI_SE_DMA, | ||
| 14 | }; | ||
| 15 | |||
| 16 | /* Protocols supported by GENI Serial Engines */ | ||
| 17 | enum geni_se_protocol_type { | ||
| 18 | GENI_SE_NONE, | ||
| 19 | GENI_SE_SPI, | ||
| 20 | GENI_SE_UART, | ||
| 21 | GENI_SE_I2C, | ||
| 22 | GENI_SE_I3C, | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct geni_wrapper; | ||
| 26 | struct clk; | ||
| 27 | |||
| 28 | /** | ||
| 29 | * struct geni_se - GENI Serial Engine | ||
| 30 | * @base: Base Address of the Serial Engine's register block | ||
| 31 | * @dev: Pointer to the Serial Engine device | ||
| 32 | * @wrapper: Pointer to the parent QUP Wrapper core | ||
| 33 | * @clk: Handle to the core serial engine clock | ||
| 34 | * @num_clk_levels: Number of valid clock levels in clk_perf_tbl | ||
| 35 | * @clk_perf_tbl: Table of clock frequency input to serial engine clock | ||
| 36 | */ | ||
| 37 | struct geni_se { | ||
| 38 | void __iomem *base; | ||
| 39 | struct device *dev; | ||
| 40 | struct geni_wrapper *wrapper; | ||
| 41 | struct clk *clk; | ||
| 42 | unsigned int num_clk_levels; | ||
| 43 | unsigned long *clk_perf_tbl; | ||
| 44 | }; | ||
| 45 | |||
| 46 | /* Common SE registers */ | ||
| 47 | #define GENI_FORCE_DEFAULT_REG 0x20 | ||
| 48 | #define SE_GENI_STATUS 0x40 | ||
| 49 | #define GENI_SER_M_CLK_CFG 0x48 | ||
| 50 | #define GENI_SER_S_CLK_CFG 0x4c | ||
| 51 | #define GENI_FW_REVISION_RO 0x68 | ||
| 52 | #define SE_GENI_CLK_SEL 0x7c | ||
| 53 | #define SE_GENI_DMA_MODE_EN 0x258 | ||
| 54 | #define SE_GENI_M_CMD0 0x600 | ||
| 55 | #define SE_GENI_M_CMD_CTRL_REG 0x604 | ||
| 56 | #define SE_GENI_M_IRQ_STATUS 0x610 | ||
| 57 | #define SE_GENI_M_IRQ_EN 0x614 | ||
| 58 | #define SE_GENI_M_IRQ_CLEAR 0x618 | ||
| 59 | #define SE_GENI_S_CMD0 0x630 | ||
| 60 | #define SE_GENI_S_CMD_CTRL_REG 0x634 | ||
| 61 | #define SE_GENI_S_IRQ_STATUS 0x640 | ||
| 62 | #define SE_GENI_S_IRQ_EN 0x644 | ||
| 63 | #define SE_GENI_S_IRQ_CLEAR 0x648 | ||
| 64 | #define SE_GENI_TX_FIFOn 0x700 | ||
| 65 | #define SE_GENI_RX_FIFOn 0x780 | ||
| 66 | #define SE_GENI_TX_FIFO_STATUS 0x800 | ||
| 67 | #define SE_GENI_RX_FIFO_STATUS 0x804 | ||
| 68 | #define SE_GENI_TX_WATERMARK_REG 0x80c | ||
| 69 | #define SE_GENI_RX_WATERMARK_REG 0x810 | ||
| 70 | #define SE_GENI_RX_RFR_WATERMARK_REG 0x814 | ||
| 71 | #define SE_GENI_IOS 0x908 | ||
| 72 | #define SE_DMA_TX_IRQ_STAT 0xc40 | ||
| 73 | #define SE_DMA_TX_IRQ_CLR 0xc44 | ||
| 74 | #define SE_DMA_TX_FSM_RST 0xc58 | ||
| 75 | #define SE_DMA_RX_IRQ_STAT 0xd40 | ||
| 76 | #define SE_DMA_RX_IRQ_CLR 0xd44 | ||
| 77 | #define SE_DMA_RX_FSM_RST 0xd58 | ||
| 78 | #define SE_HW_PARAM_0 0xe24 | ||
| 79 | #define SE_HW_PARAM_1 0xe28 | ||
| 80 | |||
| 81 | /* GENI_FORCE_DEFAULT_REG fields */ | ||
| 82 | #define FORCE_DEFAULT BIT(0) | ||
| 83 | |||
| 84 | /* GENI_STATUS fields */ | ||
| 85 | #define M_GENI_CMD_ACTIVE BIT(0) | ||
| 86 | #define S_GENI_CMD_ACTIVE BIT(12) | ||
| 87 | |||
| 88 | /* GENI_SER_M_CLK_CFG/GENI_SER_S_CLK_CFG */ | ||
| 89 | #define SER_CLK_EN BIT(0) | ||
| 90 | #define CLK_DIV_MSK GENMASK(15, 4) | ||
| 91 | #define CLK_DIV_SHFT 4 | ||
| 92 | |||
| 93 | /* GENI_FW_REVISION_RO fields */ | ||
| 94 | #define FW_REV_PROTOCOL_MSK GENMASK(15, 8) | ||
| 95 | #define FW_REV_PROTOCOL_SHFT 8 | ||
| 96 | |||
| 97 | /* GENI_CLK_SEL fields */ | ||
| 98 | #define CLK_SEL_MSK GENMASK(2, 0) | ||
| 99 | |||
| 100 | /* SE_GENI_DMA_MODE_EN */ | ||
| 101 | #define GENI_DMA_MODE_EN BIT(0) | ||
| 102 | |||
| 103 | /* GENI_M_CMD0 fields */ | ||
| 104 | #define M_OPCODE_MSK GENMASK(31, 27) | ||
| 105 | #define M_OPCODE_SHFT 27 | ||
| 106 | #define M_PARAMS_MSK GENMASK(26, 0) | ||
| 107 | |||
| 108 | /* GENI_M_CMD_CTRL_REG */ | ||
| 109 | #define M_GENI_CMD_CANCEL BIT(2) | ||
| 110 | #define M_GENI_CMD_ABORT BIT(1) | ||
| 111 | #define M_GENI_DISABLE BIT(0) | ||
| 112 | |||
| 113 | /* GENI_S_CMD0 fields */ | ||
| 114 | #define S_OPCODE_MSK GENMASK(31, 27) | ||
| 115 | #define S_OPCODE_SHFT 27 | ||
| 116 | #define S_PARAMS_MSK GENMASK(26, 0) | ||
| 117 | |||
| 118 | /* GENI_S_CMD_CTRL_REG */ | ||
| 119 | #define S_GENI_CMD_CANCEL BIT(2) | ||
| 120 | #define S_GENI_CMD_ABORT BIT(1) | ||
| 121 | #define S_GENI_DISABLE BIT(0) | ||
| 122 | |||
| 123 | /* GENI_M_IRQ_EN fields */ | ||
| 124 | #define M_CMD_DONE_EN BIT(0) | ||
| 125 | #define M_CMD_OVERRUN_EN BIT(1) | ||
| 126 | #define M_ILLEGAL_CMD_EN BIT(2) | ||
| 127 | #define M_CMD_FAILURE_EN BIT(3) | ||
| 128 | #define M_CMD_CANCEL_EN BIT(4) | ||
| 129 | #define M_CMD_ABORT_EN BIT(5) | ||
| 130 | #define M_TIMESTAMP_EN BIT(6) | ||
| 131 | #define M_RX_IRQ_EN BIT(7) | ||
| 132 | #define M_GP_SYNC_IRQ_0_EN BIT(8) | ||
| 133 | #define M_GP_IRQ_0_EN BIT(9) | ||
| 134 | #define M_GP_IRQ_1_EN BIT(10) | ||
| 135 | #define M_GP_IRQ_2_EN BIT(11) | ||
| 136 | #define M_GP_IRQ_3_EN BIT(12) | ||
| 137 | #define M_GP_IRQ_4_EN BIT(13) | ||
| 138 | #define M_GP_IRQ_5_EN BIT(14) | ||
| 139 | #define M_IO_DATA_DEASSERT_EN BIT(22) | ||
| 140 | #define M_IO_DATA_ASSERT_EN BIT(23) | ||
| 141 | #define M_RX_FIFO_RD_ERR_EN BIT(24) | ||
| 142 | #define M_RX_FIFO_WR_ERR_EN BIT(25) | ||
| 143 | #define M_RX_FIFO_WATERMARK_EN BIT(26) | ||
| 144 | #define M_RX_FIFO_LAST_EN BIT(27) | ||
| 145 | #define M_TX_FIFO_RD_ERR_EN BIT(28) | ||
| 146 | #define M_TX_FIFO_WR_ERR_EN BIT(29) | ||
| 147 | #define M_TX_FIFO_WATERMARK_EN BIT(30) | ||
| 148 | #define M_SEC_IRQ_EN BIT(31) | ||
| 149 | #define M_COMMON_GENI_M_IRQ_EN (GENMASK(6, 1) | \ | ||
| 150 | M_IO_DATA_DEASSERT_EN | \ | ||
| 151 | M_IO_DATA_ASSERT_EN | M_RX_FIFO_RD_ERR_EN | \ | ||
| 152 | M_RX_FIFO_WR_ERR_EN | M_TX_FIFO_RD_ERR_EN | \ | ||
| 153 | M_TX_FIFO_WR_ERR_EN) | ||
| 154 | |||
| 155 | /* GENI_S_IRQ_EN fields */ | ||
| 156 | #define S_CMD_DONE_EN BIT(0) | ||
| 157 | #define S_CMD_OVERRUN_EN BIT(1) | ||
| 158 | #define S_ILLEGAL_CMD_EN BIT(2) | ||
| 159 | #define S_CMD_FAILURE_EN BIT(3) | ||
| 160 | #define S_CMD_CANCEL_EN BIT(4) | ||
| 161 | #define S_CMD_ABORT_EN BIT(5) | ||
| 162 | #define S_GP_SYNC_IRQ_0_EN BIT(8) | ||
| 163 | #define S_GP_IRQ_0_EN BIT(9) | ||
| 164 | #define S_GP_IRQ_1_EN BIT(10) | ||
| 165 | #define S_GP_IRQ_2_EN BIT(11) | ||
| 166 | #define S_GP_IRQ_3_EN BIT(12) | ||
| 167 | #define S_GP_IRQ_4_EN BIT(13) | ||
| 168 | #define S_GP_IRQ_5_EN BIT(14) | ||
| 169 | #define S_IO_DATA_DEASSERT_EN BIT(22) | ||
| 170 | #define S_IO_DATA_ASSERT_EN BIT(23) | ||
| 171 | #define S_RX_FIFO_RD_ERR_EN BIT(24) | ||
| 172 | #define S_RX_FIFO_WR_ERR_EN BIT(25) | ||
| 173 | #define S_RX_FIFO_WATERMARK_EN BIT(26) | ||
| 174 | #define S_RX_FIFO_LAST_EN BIT(27) | ||
| 175 | #define S_COMMON_GENI_S_IRQ_EN (GENMASK(5, 1) | GENMASK(13, 9) | \ | ||
| 176 | S_RX_FIFO_RD_ERR_EN | S_RX_FIFO_WR_ERR_EN) | ||
| 177 | |||
| 178 | /* GENI_/TX/RX/RX_RFR/_WATERMARK_REG fields */ | ||
| 179 | #define WATERMARK_MSK GENMASK(5, 0) | ||
| 180 | |||
| 181 | /* GENI_TX_FIFO_STATUS fields */ | ||
| 182 | #define TX_FIFO_WC GENMASK(27, 0) | ||
| 183 | |||
| 184 | /* GENI_RX_FIFO_STATUS fields */ | ||
| 185 | #define RX_LAST BIT(31) | ||
| 186 | #define RX_LAST_BYTE_VALID_MSK GENMASK(30, 28) | ||
| 187 | #define RX_LAST_BYTE_VALID_SHFT 28 | ||
| 188 | #define RX_FIFO_WC_MSK GENMASK(24, 0) | ||
| 189 | |||
| 190 | /* SE_GENI_IOS fields */ | ||
| 191 | #define IO2_DATA_IN BIT(1) | ||
| 192 | #define RX_DATA_IN BIT(0) | ||
| 193 | |||
| 194 | /* SE_DMA_TX_IRQ_STAT Register fields */ | ||
| 195 | #define TX_DMA_DONE BIT(0) | ||
| 196 | #define TX_EOT BIT(1) | ||
| 197 | #define TX_SBE BIT(2) | ||
| 198 | #define TX_RESET_DONE BIT(3) | ||
| 199 | |||
| 200 | /* SE_DMA_RX_IRQ_STAT Register fields */ | ||
| 201 | #define RX_DMA_DONE BIT(0) | ||
| 202 | #define RX_EOT BIT(1) | ||
| 203 | #define RX_SBE BIT(2) | ||
| 204 | #define RX_RESET_DONE BIT(3) | ||
| 205 | #define RX_FLUSH_DONE BIT(4) | ||
| 206 | #define RX_GENI_GP_IRQ GENMASK(10, 5) | ||
| 207 | #define RX_GENI_CANCEL_IRQ BIT(11) | ||
| 208 | #define RX_GENI_GP_IRQ_EXT GENMASK(13, 12) | ||
| 209 | |||
| 210 | /* SE_HW_PARAM_0 fields */ | ||
| 211 | #define TX_FIFO_WIDTH_MSK GENMASK(29, 24) | ||
| 212 | #define TX_FIFO_WIDTH_SHFT 24 | ||
| 213 | #define TX_FIFO_DEPTH_MSK GENMASK(21, 16) | ||
| 214 | #define TX_FIFO_DEPTH_SHFT 16 | ||
| 215 | |||
| 216 | /* SE_HW_PARAM_1 fields */ | ||
| 217 | #define RX_FIFO_WIDTH_MSK GENMASK(29, 24) | ||
| 218 | #define RX_FIFO_WIDTH_SHFT 24 | ||
| 219 | #define RX_FIFO_DEPTH_MSK GENMASK(21, 16) | ||
| 220 | #define RX_FIFO_DEPTH_SHFT 16 | ||
| 221 | |||
| 222 | #define HW_VER_MAJOR_MASK GENMASK(31, 28) | ||
| 223 | #define HW_VER_MAJOR_SHFT 28 | ||
| 224 | #define HW_VER_MINOR_MASK GENMASK(27, 16) | ||
| 225 | #define HW_VER_MINOR_SHFT 16 | ||
| 226 | #define HW_VER_STEP_MASK GENMASK(15, 0) | ||
| 227 | |||
| 228 | #if IS_ENABLED(CONFIG_QCOM_GENI_SE) | ||
| 229 | |||
| 230 | u32 geni_se_get_qup_hw_version(struct geni_se *se); | ||
| 231 | |||
| 232 | #define geni_se_get_wrapper_version(se, major, minor, step) do { \ | ||
| 233 | u32 ver; \ | ||
| 234 | \ | ||
| 235 | ver = geni_se_get_qup_hw_version(se); \ | ||
| 236 | major = (ver & HW_VER_MAJOR_MASK) >> HW_VER_MAJOR_SHFT; \ | ||
| 237 | minor = (ver & HW_VER_MINOR_MASK) >> HW_VER_MINOR_SHFT; \ | ||
| 238 | step = version & HW_VER_STEP_MASK; \ | ||
| 239 | } while (0) | ||
| 240 | |||
| 241 | /** | ||
| 242 | * geni_se_read_proto() - Read the protocol configured for a serial engine | ||
| 243 | * @se: Pointer to the concerned serial engine. | ||
| 244 | * | ||
| 245 | * Return: Protocol value as configured in the serial engine. | ||
| 246 | */ | ||
| 247 | static inline u32 geni_se_read_proto(struct geni_se *se) | ||
| 248 | { | ||
| 249 | u32 val; | ||
| 250 | |||
| 251 | val = readl_relaxed(se->base + GENI_FW_REVISION_RO); | ||
| 252 | |||
| 253 | return (val & FW_REV_PROTOCOL_MSK) >> FW_REV_PROTOCOL_SHFT; | ||
| 254 | } | ||
| 255 | |||
| 256 | /** | ||
| 257 | * geni_se_setup_m_cmd() - Setup the primary sequencer | ||
| 258 | * @se: Pointer to the concerned serial engine. | ||
| 259 | * @cmd: Command/Operation to setup in the primary sequencer. | ||
| 260 | * @params: Parameter for the sequencer command. | ||
| 261 | * | ||
| 262 | * This function is used to configure the primary sequencer with the | ||
| 263 | * command and its associated parameters. | ||
| 264 | */ | ||
| 265 | static inline void geni_se_setup_m_cmd(struct geni_se *se, u32 cmd, u32 params) | ||
| 266 | { | ||
| 267 | u32 m_cmd; | ||
| 268 | |||
| 269 | m_cmd = (cmd << M_OPCODE_SHFT) | (params & M_PARAMS_MSK); | ||
| 270 | writel_relaxed(m_cmd, se->base + SE_GENI_M_CMD0); | ||
| 271 | } | ||
| 272 | |||
| 273 | /** | ||
| 274 | * geni_se_setup_s_cmd() - Setup the secondary sequencer | ||
| 275 | * @se: Pointer to the concerned serial engine. | ||
| 276 | * @cmd: Command/Operation to setup in the secondary sequencer. | ||
| 277 | * @params: Parameter for the sequencer command. | ||
| 278 | * | ||
| 279 | * This function is used to configure the secondary sequencer with the | ||
| 280 | * command and its associated parameters. | ||
| 281 | */ | ||
| 282 | static inline void geni_se_setup_s_cmd(struct geni_se *se, u32 cmd, u32 params) | ||
| 283 | { | ||
| 284 | u32 s_cmd; | ||
| 285 | |||
| 286 | s_cmd = readl_relaxed(se->base + SE_GENI_S_CMD0); | ||
| 287 | s_cmd &= ~(S_OPCODE_MSK | S_PARAMS_MSK); | ||
| 288 | s_cmd |= (cmd << S_OPCODE_SHFT); | ||
| 289 | s_cmd |= (params & S_PARAMS_MSK); | ||
| 290 | writel_relaxed(s_cmd, se->base + SE_GENI_S_CMD0); | ||
| 291 | } | ||
| 292 | |||
| 293 | /** | ||
| 294 | * geni_se_cancel_m_cmd() - Cancel the command configured in the primary | ||
| 295 | * sequencer | ||
| 296 | * @se: Pointer to the concerned serial engine. | ||
| 297 | * | ||
| 298 | * This function is used to cancel the currently configured command in the | ||
| 299 | * primary sequencer. | ||
| 300 | */ | ||
| 301 | static inline void geni_se_cancel_m_cmd(struct geni_se *se) | ||
| 302 | { | ||
| 303 | writel_relaxed(M_GENI_CMD_CANCEL, se->base + SE_GENI_M_CMD_CTRL_REG); | ||
| 304 | } | ||
| 305 | |||
| 306 | /** | ||
| 307 | * geni_se_cancel_s_cmd() - Cancel the command configured in the secondary | ||
| 308 | * sequencer | ||
| 309 | * @se: Pointer to the concerned serial engine. | ||
| 310 | * | ||
| 311 | * This function is used to cancel the currently configured command in the | ||
| 312 | * secondary sequencer. | ||
| 313 | */ | ||
| 314 | static inline void geni_se_cancel_s_cmd(struct geni_se *se) | ||
| 315 | { | ||
| 316 | writel_relaxed(S_GENI_CMD_CANCEL, se->base + SE_GENI_S_CMD_CTRL_REG); | ||
| 317 | } | ||
| 318 | |||
| 319 | /** | ||
| 320 | * geni_se_abort_m_cmd() - Abort the command configured in the primary sequencer | ||
| 321 | * @se: Pointer to the concerned serial engine. | ||
| 322 | * | ||
| 323 | * This function is used to force abort the currently configured command in the | ||
| 324 | * primary sequencer. | ||
| 325 | */ | ||
| 326 | static inline void geni_se_abort_m_cmd(struct geni_se *se) | ||
| 327 | { | ||
| 328 | writel_relaxed(M_GENI_CMD_ABORT, se->base + SE_GENI_M_CMD_CTRL_REG); | ||
| 329 | } | ||
| 330 | |||
| 331 | /** | ||
| 332 | * geni_se_abort_s_cmd() - Abort the command configured in the secondary | ||
| 333 | * sequencer | ||
| 334 | * @se: Pointer to the concerned serial engine. | ||
| 335 | * | ||
| 336 | * This function is used to force abort the currently configured command in the | ||
| 337 | * secondary sequencer. | ||
| 338 | */ | ||
| 339 | static inline void geni_se_abort_s_cmd(struct geni_se *se) | ||
| 340 | { | ||
| 341 | writel_relaxed(S_GENI_CMD_ABORT, se->base + SE_GENI_S_CMD_CTRL_REG); | ||
| 342 | } | ||
| 343 | |||
| 344 | /** | ||
| 345 | * geni_se_get_tx_fifo_depth() - Get the TX fifo depth of the serial engine | ||
| 346 | * @se: Pointer to the concerned serial engine. | ||
| 347 | * | ||
| 348 | * This function is used to get the depth i.e. number of elements in the | ||
| 349 | * TX fifo of the serial engine. | ||
| 350 | * | ||
| 351 | * Return: TX fifo depth in units of FIFO words. | ||
| 352 | */ | ||
| 353 | static inline u32 geni_se_get_tx_fifo_depth(struct geni_se *se) | ||
| 354 | { | ||
| 355 | u32 val; | ||
| 356 | |||
| 357 | val = readl_relaxed(se->base + SE_HW_PARAM_0); | ||
| 358 | |||
| 359 | return (val & TX_FIFO_DEPTH_MSK) >> TX_FIFO_DEPTH_SHFT; | ||
| 360 | } | ||
| 361 | |||
| 362 | /** | ||
| 363 | * geni_se_get_tx_fifo_width() - Get the TX fifo width of the serial engine | ||
| 364 | * @se: Pointer to the concerned serial engine. | ||
| 365 | * | ||
| 366 | * This function is used to get the width i.e. word size per element in the | ||
| 367 | * TX fifo of the serial engine. | ||
| 368 | * | ||
| 369 | * Return: TX fifo width in bits | ||
| 370 | */ | ||
| 371 | static inline u32 geni_se_get_tx_fifo_width(struct geni_se *se) | ||
| 372 | { | ||
| 373 | u32 val; | ||
| 374 | |||
| 375 | val = readl_relaxed(se->base + SE_HW_PARAM_0); | ||
| 376 | |||
| 377 | return (val & TX_FIFO_WIDTH_MSK) >> TX_FIFO_WIDTH_SHFT; | ||
| 378 | } | ||
| 379 | |||
| 380 | /** | ||
| 381 | * geni_se_get_rx_fifo_depth() - Get the RX fifo depth of the serial engine | ||
| 382 | * @se: Pointer to the concerned serial engine. | ||
| 383 | * | ||
| 384 | * This function is used to get the depth i.e. number of elements in the | ||
| 385 | * RX fifo of the serial engine. | ||
| 386 | * | ||
| 387 | * Return: RX fifo depth in units of FIFO words | ||
| 388 | */ | ||
| 389 | static inline u32 geni_se_get_rx_fifo_depth(struct geni_se *se) | ||
| 390 | { | ||
| 391 | u32 val; | ||
| 392 | |||
| 393 | val = readl_relaxed(se->base + SE_HW_PARAM_1); | ||
| 394 | |||
| 395 | return (val & RX_FIFO_DEPTH_MSK) >> RX_FIFO_DEPTH_SHFT; | ||
| 396 | } | ||
| 397 | |||
| 398 | void geni_se_init(struct geni_se *se, u32 rx_wm, u32 rx_rfr); | ||
| 399 | |||
| 400 | void geni_se_select_mode(struct geni_se *se, enum geni_se_xfer_mode mode); | ||
| 401 | |||
| 402 | void geni_se_config_packing(struct geni_se *se, int bpw, int pack_words, | ||
| 403 | bool msb_to_lsb, bool tx_cfg, bool rx_cfg); | ||
| 404 | |||
| 405 | int geni_se_resources_off(struct geni_se *se); | ||
| 406 | |||
| 407 | int geni_se_resources_on(struct geni_se *se); | ||
| 408 | |||
| 409 | int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl); | ||
| 410 | |||
| 411 | int geni_se_clk_freq_match(struct geni_se *se, unsigned long req_freq, | ||
| 412 | unsigned int *index, unsigned long *res_freq, | ||
| 413 | bool exact); | ||
| 414 | |||
| 415 | int geni_se_tx_dma_prep(struct geni_se *se, void *buf, size_t len, | ||
| 416 | dma_addr_t *iova); | ||
| 417 | |||
| 418 | int geni_se_rx_dma_prep(struct geni_se *se, void *buf, size_t len, | ||
| 419 | dma_addr_t *iova); | ||
| 420 | |||
| 421 | void geni_se_tx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len); | ||
| 422 | |||
| 423 | void geni_se_rx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len); | ||
| 424 | #endif | ||
| 425 | #endif | ||
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 127f534fec94..36df6ccbc874 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -404,6 +404,19 @@ static inline void list_splice_tail_init_rcu(struct list_head *list, | |||
| 404 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | 404 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) |
| 405 | 405 | ||
| 406 | /** | 406 | /** |
| 407 | * list_for_each_entry_from_rcu - iterate over a list from current point | ||
| 408 | * @pos: the type * to use as a loop cursor. | ||
| 409 | * @head: the head for your list. | ||
| 410 | * @member: the name of the list_node within the struct. | ||
| 411 | * | ||
| 412 | * Iterate over the tail of a list starting from a given position, | ||
| 413 | * which must have been in the list when the RCU read lock was taken. | ||
| 414 | */ | ||
| 415 | #define list_for_each_entry_from_rcu(pos, head, member) \ | ||
| 416 | for (; &(pos)->member != (head); \ | ||
| 417 | pos = list_entry_rcu(pos->member.next, typeof(*(pos)), member)) | ||
| 418 | |||
| 419 | /** | ||
| 407 | * hlist_del_rcu - deletes entry from hash list without re-initialization | 420 | * hlist_del_rcu - deletes entry from hash list without re-initialization |
| 408 | * @n: the element to delete from the hash list. | 421 | * @n: the element to delete from the hash list. |
| 409 | * | 422 | * |
diff --git a/include/linux/rculist_nulls.h b/include/linux/rculist_nulls.h index e4b257ff881b..bc8206a8f30e 100644 --- a/include/linux/rculist_nulls.h +++ b/include/linux/rculist_nulls.h | |||
| @@ -109,7 +109,7 @@ static inline void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n, | |||
| 109 | * | 109 | * |
| 110 | * The barrier() is needed to make sure compiler doesn't cache first element [1], | 110 | * The barrier() is needed to make sure compiler doesn't cache first element [1], |
| 111 | * as this loop can be restarted [2] | 111 | * as this loop can be restarted [2] |
| 112 | * [1] Documentation/atomic_ops.txt around line 114 | 112 | * [1] Documentation/core-api/atomic_ops.rst around line 114 |
| 113 | * [2] Documentation/RCU/rculist_nulls.txt around line 146 | 113 | * [2] Documentation/RCU/rculist_nulls.txt around line 146 |
| 114 | */ | 114 | */ |
| 115 | #define hlist_nulls_for_each_entry_rcu(tpos, pos, head, member) \ | 115 | #define hlist_nulls_for_each_entry_rcu(tpos, pos, head, member) \ |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index e679b175b411..65163aa0bb04 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -652,9 +652,7 @@ static inline void rcu_read_lock(void) | |||
| 652 | * Unfortunately, this function acquires the scheduler's runqueue and | 652 | * Unfortunately, this function acquires the scheduler's runqueue and |
| 653 | * priority-inheritance spinlocks. This means that deadlock could result | 653 | * priority-inheritance spinlocks. This means that deadlock could result |
| 654 | * if the caller of rcu_read_unlock() already holds one of these locks or | 654 | * if the caller of rcu_read_unlock() already holds one of these locks or |
| 655 | * any lock that is ever acquired while holding them; or any lock which | 655 | * any lock that is ever acquired while holding them. |
| 656 | * can be taken from interrupt context because rcu_boost()->rt_mutex_lock() | ||
| 657 | * does not disable irqs while taking ->wait_lock. | ||
| 658 | * | 656 | * |
| 659 | * That said, RCU readers are never priority boosted unless they were | 657 | * That said, RCU readers are never priority boosted unless they were |
| 660 | * preempted. Therefore, one way to avoid deadlock is to make sure | 658 | * preempted. Therefore, one way to avoid deadlock is to make sure |
diff --git a/include/linux/refcount.h b/include/linux/refcount.h index 4193c41e383a..a685da2c4522 100644 --- a/include/linux/refcount.h +++ b/include/linux/refcount.h | |||
| @@ -98,5 +98,7 @@ extern __must_check bool refcount_dec_if_one(refcount_t *r); | |||
| 98 | extern __must_check bool refcount_dec_not_one(refcount_t *r); | 98 | extern __must_check bool refcount_dec_not_one(refcount_t *r); |
| 99 | extern __must_check bool refcount_dec_and_mutex_lock(refcount_t *r, struct mutex *lock); | 99 | extern __must_check bool refcount_dec_and_mutex_lock(refcount_t *r, struct mutex *lock); |
| 100 | extern __must_check bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock); | 100 | extern __must_check bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock); |
| 101 | 101 | extern __must_check bool refcount_dec_and_lock_irqsave(refcount_t *r, | |
| 102 | spinlock_t *lock, | ||
| 103 | unsigned long *flags); | ||
| 102 | #endif /* _LINUX_REFCOUNT_H */ | 104 | #endif /* _LINUX_REFCOUNT_H */ |
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index d8ecefaf63ca..6d46f962685d 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h | |||
| @@ -49,47 +49,7 @@ enum ab8505_regulator_id { | |||
| 49 | AB8505_NUM_REGULATORS, | 49 | AB8505_NUM_REGULATORS, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | /* AB9540 regulators */ | 52 | /* AB8500 and AB8505 register initialization */ |
| 53 | enum ab9540_regulator_id { | ||
| 54 | AB9540_LDO_AUX1, | ||
| 55 | AB9540_LDO_AUX2, | ||
| 56 | AB9540_LDO_AUX3, | ||
| 57 | AB9540_LDO_AUX4, | ||
| 58 | AB9540_LDO_INTCORE, | ||
| 59 | AB9540_LDO_TVOUT, | ||
| 60 | AB9540_LDO_USB, | ||
| 61 | AB9540_LDO_AUDIO, | ||
| 62 | AB9540_LDO_ANAMIC1, | ||
| 63 | AB9540_LDO_ANAMIC2, | ||
| 64 | AB9540_LDO_DMIC, | ||
| 65 | AB9540_LDO_ANA, | ||
| 66 | AB9540_SYSCLKREQ_2, | ||
| 67 | AB9540_SYSCLKREQ_4, | ||
| 68 | AB9540_NUM_REGULATORS, | ||
| 69 | }; | ||
| 70 | |||
| 71 | /* AB8540 regulators */ | ||
| 72 | enum ab8540_regulator_id { | ||
| 73 | AB8540_LDO_AUX1, | ||
| 74 | AB8540_LDO_AUX2, | ||
| 75 | AB8540_LDO_AUX3, | ||
| 76 | AB8540_LDO_AUX4, | ||
| 77 | AB8540_LDO_AUX5, | ||
| 78 | AB8540_LDO_AUX6, | ||
| 79 | AB8540_LDO_INTCORE, | ||
| 80 | AB8540_LDO_TVOUT, | ||
| 81 | AB8540_LDO_AUDIO, | ||
| 82 | AB8540_LDO_ANAMIC1, | ||
| 83 | AB8540_LDO_ANAMIC2, | ||
| 84 | AB8540_LDO_DMIC, | ||
| 85 | AB8540_LDO_ANA, | ||
| 86 | AB8540_LDO_SDIO, | ||
| 87 | AB8540_SYSCLKREQ_2, | ||
| 88 | AB8540_SYSCLKREQ_4, | ||
| 89 | AB8540_NUM_REGULATORS, | ||
| 90 | }; | ||
| 91 | |||
| 92 | /* AB8500, AB8505, and AB9540 register initialization */ | ||
| 93 | struct ab8500_regulator_reg_init { | 53 | struct ab8500_regulator_reg_init { |
| 94 | int id; | 54 | int id; |
| 95 | u8 mask; | 55 | u8 mask; |
| @@ -185,121 +145,6 @@ enum ab8505_regulator_reg { | |||
| 185 | AB8505_NUM_REGULATOR_REGISTERS, | 145 | AB8505_NUM_REGULATOR_REGISTERS, |
| 186 | }; | 146 | }; |
| 187 | 147 | ||
| 188 | /* AB9540 registers */ | ||
| 189 | enum ab9540_regulator_reg { | ||
| 190 | AB9540_REGUREQUESTCTRL1, | ||
| 191 | AB9540_REGUREQUESTCTRL2, | ||
| 192 | AB9540_REGUREQUESTCTRL3, | ||
| 193 | AB9540_REGUREQUESTCTRL4, | ||
| 194 | AB9540_REGUSYSCLKREQ1HPVALID1, | ||
| 195 | AB9540_REGUSYSCLKREQ1HPVALID2, | ||
| 196 | AB9540_REGUHWHPREQ1VALID1, | ||
| 197 | AB9540_REGUHWHPREQ1VALID2, | ||
| 198 | AB9540_REGUHWHPREQ2VALID1, | ||
| 199 | AB9540_REGUHWHPREQ2VALID2, | ||
| 200 | AB9540_REGUSWHPREQVALID1, | ||
| 201 | AB9540_REGUSWHPREQVALID2, | ||
| 202 | AB9540_REGUSYSCLKREQVALID1, | ||
| 203 | AB9540_REGUSYSCLKREQVALID2, | ||
| 204 | AB9540_REGUVAUX4REQVALID, | ||
| 205 | AB9540_REGUMISC1, | ||
| 206 | AB9540_VAUDIOSUPPLY, | ||
| 207 | AB9540_REGUCTRL1VAMIC, | ||
| 208 | AB9540_VSMPS1REGU, | ||
| 209 | AB9540_VSMPS2REGU, | ||
| 210 | AB9540_VSMPS3REGU, /* NOTE! PRCMU register */ | ||
| 211 | AB9540_VPLLVANAREGU, | ||
| 212 | AB9540_EXTSUPPLYREGU, | ||
| 213 | AB9540_VAUX12REGU, | ||
| 214 | AB9540_VRF1VAUX3REGU, | ||
| 215 | AB9540_VSMPS1SEL1, | ||
| 216 | AB9540_VSMPS1SEL2, | ||
| 217 | AB9540_VSMPS1SEL3, | ||
| 218 | AB9540_VSMPS2SEL1, | ||
| 219 | AB9540_VSMPS2SEL2, | ||
| 220 | AB9540_VSMPS2SEL3, | ||
| 221 | AB9540_VSMPS3SEL1, /* NOTE! PRCMU register */ | ||
| 222 | AB9540_VSMPS3SEL2, /* NOTE! PRCMU register */ | ||
| 223 | AB9540_VAUX1SEL, | ||
| 224 | AB9540_VAUX2SEL, | ||
| 225 | AB9540_VRF1VAUX3SEL, | ||
| 226 | AB9540_REGUCTRL2SPARE, | ||
| 227 | AB9540_VAUX4REQCTRL, | ||
| 228 | AB9540_VAUX4REGU, | ||
| 229 | AB9540_VAUX4SEL, | ||
| 230 | AB9540_REGUCTRLDISCH, | ||
| 231 | AB9540_REGUCTRLDISCH2, | ||
| 232 | AB9540_REGUCTRLDISCH3, | ||
| 233 | AB9540_NUM_REGULATOR_REGISTERS, | ||
| 234 | }; | ||
| 235 | |||
| 236 | /* AB8540 registers */ | ||
| 237 | enum ab8540_regulator_reg { | ||
| 238 | AB8540_REGUREQUESTCTRL1, | ||
| 239 | AB8540_REGUREQUESTCTRL2, | ||
| 240 | AB8540_REGUREQUESTCTRL3, | ||
| 241 | AB8540_REGUREQUESTCTRL4, | ||
| 242 | AB8540_REGUSYSCLKREQ1HPVALID1, | ||
| 243 | AB8540_REGUSYSCLKREQ1HPVALID2, | ||
| 244 | AB8540_REGUHWHPREQ1VALID1, | ||
| 245 | AB8540_REGUHWHPREQ1VALID2, | ||
| 246 | AB8540_REGUHWHPREQ2VALID1, | ||
| 247 | AB8540_REGUHWHPREQ2VALID2, | ||
| 248 | AB8540_REGUSWHPREQVALID1, | ||
| 249 | AB8540_REGUSWHPREQVALID2, | ||
| 250 | AB8540_REGUSYSCLKREQVALID1, | ||
| 251 | AB8540_REGUSYSCLKREQVALID2, | ||
| 252 | AB8540_REGUVAUX4REQVALID, | ||
| 253 | AB8540_REGUVAUX5REQVALID, | ||
| 254 | AB8540_REGUVAUX6REQVALID, | ||
| 255 | AB8540_REGUVCLKBREQVALID, | ||
| 256 | AB8540_REGUVRF1REQVALID, | ||
| 257 | AB8540_REGUMISC1, | ||
| 258 | AB8540_VAUDIOSUPPLY, | ||
| 259 | AB8540_REGUCTRL1VAMIC, | ||
| 260 | AB8540_VHSIC, | ||
| 261 | AB8540_VSDIO, | ||
| 262 | AB8540_VSMPS1REGU, | ||
| 263 | AB8540_VSMPS2REGU, | ||
| 264 | AB8540_VSMPS3REGU, | ||
| 265 | AB8540_VPLLVANAREGU, | ||
| 266 | AB8540_EXTSUPPLYREGU, | ||
| 267 | AB8540_VAUX12REGU, | ||
| 268 | AB8540_VRF1VAUX3REGU, | ||
| 269 | AB8540_VSMPS1SEL1, | ||
| 270 | AB8540_VSMPS1SEL2, | ||
| 271 | AB8540_VSMPS1SEL3, | ||
| 272 | AB8540_VSMPS2SEL1, | ||
| 273 | AB8540_VSMPS2SEL2, | ||
| 274 | AB8540_VSMPS2SEL3, | ||
| 275 | AB8540_VSMPS3SEL1, | ||
| 276 | AB8540_VSMPS3SEL2, | ||
| 277 | AB8540_VAUX1SEL, | ||
| 278 | AB8540_VAUX2SEL, | ||
| 279 | AB8540_VRF1VAUX3SEL, | ||
| 280 | AB8540_REGUCTRL2SPARE, | ||
| 281 | AB8540_VAUX4REQCTRL, | ||
| 282 | AB8540_VAUX4REGU, | ||
| 283 | AB8540_VAUX4SEL, | ||
| 284 | AB8540_VAUX5REQCTRL, | ||
| 285 | AB8540_VAUX5REGU, | ||
| 286 | AB8540_VAUX5SEL, | ||
| 287 | AB8540_VAUX6REQCTRL, | ||
| 288 | AB8540_VAUX6REGU, | ||
| 289 | AB8540_VAUX6SEL, | ||
| 290 | AB8540_VCLKBREQCTRL, | ||
| 291 | AB8540_VCLKBREGU, | ||
| 292 | AB8540_VCLKBSEL, | ||
| 293 | AB8540_VRF1REQCTRL, | ||
| 294 | AB8540_REGUCTRLDISCH, | ||
| 295 | AB8540_REGUCTRLDISCH2, | ||
| 296 | AB8540_REGUCTRLDISCH3, | ||
| 297 | AB8540_REGUCTRLDISCH4, | ||
| 298 | AB8540_VSIMSYSCLKCTRL, | ||
| 299 | AB8540_VANAVPLLSEL, | ||
| 300 | AB8540_NUM_REGULATOR_REGISTERS, | ||
| 301 | }; | ||
| 302 | |||
| 303 | /* AB8500 external regulators */ | 148 | /* AB8500 external regulators */ |
| 304 | struct ab8500_ext_regulator_cfg { | 149 | struct ab8500_ext_regulator_cfg { |
| 305 | bool hwreq; /* requires hw mode or high power mode */ | 150 | bool hwreq; /* requires hw mode or high power mode */ |
diff --git a/include/linux/regulator/arizona-ldo1.h b/include/linux/regulator/arizona-ldo1.h index c685f1277c63..fe74ab9990e6 100644 --- a/include/linux/regulator/arizona-ldo1.h +++ b/include/linux/regulator/arizona-ldo1.h | |||
| @@ -14,9 +14,6 @@ | |||
| 14 | struct regulator_init_data; | 14 | struct regulator_init_data; |
| 15 | 15 | ||
| 16 | struct arizona_ldo1_pdata { | 16 | struct arizona_ldo1_pdata { |
| 17 | /** GPIO controlling LDOENA, if any */ | ||
| 18 | int ldoena; | ||
| 19 | |||
| 20 | /** Regulator configuration for LDO1 */ | 17 | /** Regulator configuration for LDO1 */ |
| 21 | const struct regulator_init_data *init_data; | 18 | const struct regulator_init_data *init_data; |
| 22 | }; | 19 | }; |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index df176d7c2b87..25602afd4844 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -80,6 +80,7 @@ struct regmap; | |||
| 80 | * These modes can be OR'ed together to make up a mask of valid register modes. | 80 | * These modes can be OR'ed together to make up a mask of valid register modes. |
| 81 | */ | 81 | */ |
| 82 | 82 | ||
| 83 | #define REGULATOR_MODE_INVALID 0x0 | ||
| 83 | #define REGULATOR_MODE_FAST 0x1 | 84 | #define REGULATOR_MODE_FAST 0x1 |
| 84 | #define REGULATOR_MODE_NORMAL 0x2 | 85 | #define REGULATOR_MODE_NORMAL 0x2 |
| 85 | #define REGULATOR_MODE_IDLE 0x4 | 86 | #define REGULATOR_MODE_IDLE 0x4 |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 4fc96cb8e5d7..fc2dc8df476f 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #ifndef __LINUX_REGULATOR_DRIVER_H_ | 15 | #ifndef __LINUX_REGULATOR_DRIVER_H_ |
| 16 | #define __LINUX_REGULATOR_DRIVER_H_ | 16 | #define __LINUX_REGULATOR_DRIVER_H_ |
| 17 | 17 | ||
| 18 | #define MAX_COUPLED 4 | ||
| 19 | |||
| 18 | #include <linux/device.h> | 20 | #include <linux/device.h> |
| 19 | #include <linux/notifier.h> | 21 | #include <linux/notifier.h> |
| 20 | #include <linux/regulator/consumer.h> | 22 | #include <linux/regulator/consumer.h> |
| @@ -81,9 +83,12 @@ struct regulator_linear_range { | |||
| 81 | * @set_voltage_sel: Set the voltage for the regulator using the specified | 83 | * @set_voltage_sel: Set the voltage for the regulator using the specified |
| 82 | * selector. | 84 | * selector. |
| 83 | * @map_voltage: Convert a voltage into a selector | 85 | * @map_voltage: Convert a voltage into a selector |
| 84 | * @get_voltage: Return the currently configured voltage for the regulator. | 86 | * @get_voltage: Return the currently configured voltage for the regulator; |
| 87 | * return -ENOTRECOVERABLE if regulator can't be read at | ||
| 88 | * bootup and hasn't been set yet. | ||
| 85 | * @get_voltage_sel: Return the currently configured voltage selector for the | 89 | * @get_voltage_sel: Return the currently configured voltage selector for the |
| 86 | * regulator. | 90 | * regulator; return -ENOTRECOVERABLE if regulator can't |
| 91 | * be read at bootup and hasn't been set yet. | ||
| 87 | * @list_voltage: Return one of the supported voltages, in microvolts; zero | 92 | * @list_voltage: Return one of the supported voltages, in microvolts; zero |
| 88 | * if the selector indicates a voltage that is unusable on this system; | 93 | * if the selector indicates a voltage that is unusable on this system; |
| 89 | * or negative errno. Selectors range from zero to one less than | 94 | * or negative errno. Selectors range from zero to one less than |
| @@ -407,6 +412,20 @@ struct regulator_config { | |||
| 407 | }; | 412 | }; |
| 408 | 413 | ||
| 409 | /* | 414 | /* |
| 415 | * struct coupling_desc | ||
| 416 | * | ||
| 417 | * Describes coupling of regulators. Each regulator should have | ||
| 418 | * at least a pointer to itself in coupled_rdevs array. | ||
| 419 | * When a new coupled regulator is resolved, n_resolved is | ||
| 420 | * incremented. | ||
| 421 | */ | ||
| 422 | struct coupling_desc { | ||
| 423 | struct regulator_dev *coupled_rdevs[MAX_COUPLED]; | ||
| 424 | int n_resolved; | ||
| 425 | int n_coupled; | ||
| 426 | }; | ||
| 427 | |||
| 428 | /* | ||
| 410 | * struct regulator_dev | 429 | * struct regulator_dev |
| 411 | * | 430 | * |
| 412 | * Voltage / Current regulator class device. One for each | 431 | * Voltage / Current regulator class device. One for each |
| @@ -429,8 +448,12 @@ struct regulator_dev { | |||
| 429 | /* lists we own */ | 448 | /* lists we own */ |
| 430 | struct list_head consumer_list; /* consumers we supply */ | 449 | struct list_head consumer_list; /* consumers we supply */ |
| 431 | 450 | ||
| 451 | struct coupling_desc coupling_desc; | ||
| 452 | |||
| 432 | struct blocking_notifier_head notifier; | 453 | struct blocking_notifier_head notifier; |
| 433 | struct mutex mutex; /* consumer lock */ | 454 | struct mutex mutex; /* consumer lock */ |
| 455 | struct task_struct *mutex_owner; | ||
| 456 | int ref_cnt; | ||
| 434 | struct module *owner; | 457 | struct module *owner; |
| 435 | struct device dev; | 458 | struct device dev; |
| 436 | struct regulation_constraints *constraints; | 459 | struct regulation_constraints *constraints; |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 93a04893c739..3468703d663a 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
| @@ -103,6 +103,7 @@ struct regulator_state { | |||
| 103 | * @ilim_uA: Maximum input current. | 103 | * @ilim_uA: Maximum input current. |
| 104 | * @system_load: Load that isn't captured by any consumer requests. | 104 | * @system_load: Load that isn't captured by any consumer requests. |
| 105 | * | 105 | * |
| 106 | * @max_spread: Max possible spread between coupled regulators | ||
| 106 | * @valid_modes_mask: Mask of modes which may be configured by consumers. | 107 | * @valid_modes_mask: Mask of modes which may be configured by consumers. |
| 107 | * @valid_ops_mask: Operations which may be performed by consumers. | 108 | * @valid_ops_mask: Operations which may be performed by consumers. |
| 108 | * | 109 | * |
| @@ -154,6 +155,9 @@ struct regulation_constraints { | |||
| 154 | 155 | ||
| 155 | int system_load; | 156 | int system_load; |
| 156 | 157 | ||
| 158 | /* used for coupled regulators */ | ||
| 159 | int max_spread; | ||
| 160 | |||
| 157 | /* valid regulator operating modes for this machine */ | 161 | /* valid regulator operating modes for this machine */ |
| 158 | unsigned int valid_modes_mask; | 162 | unsigned int valid_modes_mask; |
| 159 | 163 | ||
diff --git a/include/linux/regulator/max8952.h b/include/linux/regulator/max8952.h index 4dbb63a1d4ab..686c42c041b5 100644 --- a/include/linux/regulator/max8952.h +++ b/include/linux/regulator/max8952.h | |||
| @@ -120,7 +120,6 @@ enum { | |||
| 120 | struct max8952_platform_data { | 120 | struct max8952_platform_data { |
| 121 | int gpio_vid0; | 121 | int gpio_vid0; |
| 122 | int gpio_vid1; | 122 | int gpio_vid1; |
| 123 | int gpio_en; | ||
| 124 | 123 | ||
| 125 | u32 default_mode; | 124 | u32 default_mode; |
| 126 | u32 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ | 125 | u32 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ |
diff --git a/include/linux/rmi.h b/include/linux/rmi.h index 64125443f8a6..5ef5c7c412a7 100644 --- a/include/linux/rmi.h +++ b/include/linux/rmi.h | |||
| @@ -354,6 +354,8 @@ struct rmi_driver_data { | |||
| 354 | struct mutex irq_mutex; | 354 | struct mutex irq_mutex; |
| 355 | struct input_dev *input; | 355 | struct input_dev *input; |
| 356 | 356 | ||
| 357 | struct irq_domain *irqdomain; | ||
| 358 | |||
| 357 | u8 pdt_props; | 359 | u8 pdt_props; |
| 358 | 360 | ||
| 359 | u8 num_rx_electrodes; | 361 | u8 num_rx_electrodes; |
diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index ca07366c4c33..9fe156d1c018 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h | |||
| @@ -1,35 +1,10 @@ | |||
| 1 | /* SPDX-License-Identifier: BSD-3-Clause */ | ||
| 1 | /* | 2 | /* |
| 2 | * Remote processor messaging | 3 | * Remote processor messaging |
| 3 | * | 4 | * |
| 4 | * Copyright (C) 2011 Texas Instruments, Inc. | 5 | * Copyright (C) 2011 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2011 Google, Inc. | 6 | * Copyright (C) 2011 Google, Inc. |
| 6 | * All rights reserved. | 7 | * All rights reserved. |
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * * Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * * Redistributions in binary form must reproduce the above copyright | ||
| 15 | * notice, this list of conditions and the following disclaimer in | ||
| 16 | * the documentation and/or other materials provided with the | ||
| 17 | * distribution. | ||
| 18 | * * Neither the name Texas Instruments nor the names of its | ||
| 19 | * contributors may be used to endorse or promote products derived | ||
| 20 | * from this software without specific prior written permission. | ||
| 21 | * | ||
| 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 33 | */ | 8 | */ |
| 34 | 9 | ||
| 35 | #ifndef _LINUX_RPMSG_H | 10 | #ifndef _LINUX_RPMSG_H |
diff --git a/include/linux/rpmsg/qcom_glink.h b/include/linux/rpmsg/qcom_glink.h index a622f029836e..96e26d94719f 100644 --- a/include/linux/rpmsg/qcom_glink.h +++ b/include/linux/rpmsg/qcom_glink.h | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | |||
| 1 | #ifndef _LINUX_RPMSG_QCOM_GLINK_H | 3 | #ifndef _LINUX_RPMSG_QCOM_GLINK_H |
| 2 | #define _LINUX_RPMSG_QCOM_GLINK_H | 4 | #define _LINUX_RPMSG_QCOM_GLINK_H |
| 3 | 5 | ||
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 4c007f69082f..6268208760e9 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -285,7 +285,7 @@ void rtc_nvmem_unregister(struct rtc_device *rtc); | |||
| 285 | static inline int rtc_nvmem_register(struct rtc_device *rtc, | 285 | static inline int rtc_nvmem_register(struct rtc_device *rtc, |
| 286 | struct nvmem_config *nvmem_config) | 286 | struct nvmem_config *nvmem_config) |
| 287 | { | 287 | { |
| 288 | return -ENODEV; | 288 | return 0; |
| 289 | } | 289 | } |
| 290 | static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {} | 290 | static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {} |
| 291 | #endif | 291 | #endif |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 51f52020ad5f..093aa57120b0 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
| @@ -9,9 +9,6 @@ | |||
| 9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
| 10 | 10 | ||
| 11 | struct scatterlist { | 11 | struct scatterlist { |
| 12 | #ifdef CONFIG_DEBUG_SG | ||
| 13 | unsigned long sg_magic; | ||
| 14 | #endif | ||
| 15 | unsigned long page_link; | 12 | unsigned long page_link; |
| 16 | unsigned int offset; | 13 | unsigned int offset; |
| 17 | unsigned int length; | 14 | unsigned int length; |
| @@ -64,7 +61,6 @@ struct sg_table { | |||
| 64 | * | 61 | * |
| 65 | */ | 62 | */ |
| 66 | 63 | ||
| 67 | #define SG_MAGIC 0x87654321 | ||
| 68 | #define SG_CHAIN 0x01UL | 64 | #define SG_CHAIN 0x01UL |
| 69 | #define SG_END 0x02UL | 65 | #define SG_END 0x02UL |
| 70 | 66 | ||
| @@ -98,7 +94,6 @@ static inline void sg_assign_page(struct scatterlist *sg, struct page *page) | |||
| 98 | */ | 94 | */ |
| 99 | BUG_ON((unsigned long) page & (SG_CHAIN | SG_END)); | 95 | BUG_ON((unsigned long) page & (SG_CHAIN | SG_END)); |
| 100 | #ifdef CONFIG_DEBUG_SG | 96 | #ifdef CONFIG_DEBUG_SG |
| 101 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 102 | BUG_ON(sg_is_chain(sg)); | 97 | BUG_ON(sg_is_chain(sg)); |
| 103 | #endif | 98 | #endif |
| 104 | sg->page_link = page_link | (unsigned long) page; | 99 | sg->page_link = page_link | (unsigned long) page; |
| @@ -129,7 +124,6 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page, | |||
| 129 | static inline struct page *sg_page(struct scatterlist *sg) | 124 | static inline struct page *sg_page(struct scatterlist *sg) |
| 130 | { | 125 | { |
| 131 | #ifdef CONFIG_DEBUG_SG | 126 | #ifdef CONFIG_DEBUG_SG |
| 132 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 133 | BUG_ON(sg_is_chain(sg)); | 127 | BUG_ON(sg_is_chain(sg)); |
| 134 | #endif | 128 | #endif |
| 135 | return (struct page *)((sg)->page_link & ~(SG_CHAIN | SG_END)); | 129 | return (struct page *)((sg)->page_link & ~(SG_CHAIN | SG_END)); |
| @@ -195,9 +189,6 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, | |||
| 195 | **/ | 189 | **/ |
| 196 | static inline void sg_mark_end(struct scatterlist *sg) | 190 | static inline void sg_mark_end(struct scatterlist *sg) |
| 197 | { | 191 | { |
| 198 | #ifdef CONFIG_DEBUG_SG | ||
| 199 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 200 | #endif | ||
| 201 | /* | 192 | /* |
| 202 | * Set termination bit, clear potential chain bit | 193 | * Set termination bit, clear potential chain bit |
| 203 | */ | 194 | */ |
| @@ -215,9 +206,6 @@ static inline void sg_mark_end(struct scatterlist *sg) | |||
| 215 | **/ | 206 | **/ |
| 216 | static inline void sg_unmark_end(struct scatterlist *sg) | 207 | static inline void sg_unmark_end(struct scatterlist *sg) |
| 217 | { | 208 | { |
| 218 | #ifdef CONFIG_DEBUG_SG | ||
| 219 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
| 220 | #endif | ||
| 221 | sg->page_link &= ~SG_END; | 209 | sg->page_link &= ~SG_END; |
| 222 | } | 210 | } |
| 223 | 211 | ||
| @@ -260,12 +248,6 @@ static inline void *sg_virt(struct scatterlist *sg) | |||
| 260 | static inline void sg_init_marker(struct scatterlist *sgl, | 248 | static inline void sg_init_marker(struct scatterlist *sgl, |
| 261 | unsigned int nents) | 249 | unsigned int nents) |
| 262 | { | 250 | { |
| 263 | #ifdef CONFIG_DEBUG_SG | ||
| 264 | unsigned int i; | ||
| 265 | |||
| 266 | for (i = 0; i < nents; i++) | ||
| 267 | sgl[i].sg_magic = SG_MAGIC; | ||
| 268 | #endif | ||
| 269 | sg_mark_end(&sgl[nents - 1]); | 251 | sg_mark_end(&sgl[nents - 1]); |
| 270 | } | 252 | } |
| 271 | 253 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 14e4f9c12337..43731fe51c97 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/signal_types.h> | 27 | #include <linux/signal_types.h> |
| 28 | #include <linux/mm_types_task.h> | 28 | #include <linux/mm_types_task.h> |
| 29 | #include <linux/task_io_accounting.h> | 29 | #include <linux/task_io_accounting.h> |
| 30 | #include <linux/rseq.h> | ||
| 30 | 31 | ||
| 31 | /* task_struct member predeclarations (sorted alphabetically): */ | 32 | /* task_struct member predeclarations (sorted alphabetically): */ |
| 32 | struct audit_context; | 33 | struct audit_context; |
| @@ -117,7 +118,7 @@ struct task_group; | |||
| 117 | * the comment with set_special_state(). | 118 | * the comment with set_special_state(). |
| 118 | */ | 119 | */ |
| 119 | #define is_special_task_state(state) \ | 120 | #define is_special_task_state(state) \ |
| 120 | ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_DEAD)) | 121 | ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_PARKED | TASK_DEAD)) |
| 121 | 122 | ||
| 122 | #define __set_current_state(state_value) \ | 123 | #define __set_current_state(state_value) \ |
| 123 | do { \ | 124 | do { \ |
| @@ -741,7 +742,7 @@ struct task_struct { | |||
| 741 | pid_t pid; | 742 | pid_t pid; |
| 742 | pid_t tgid; | 743 | pid_t tgid; |
| 743 | 744 | ||
| 744 | #ifdef CONFIG_CC_STACKPROTECTOR | 745 | #ifdef CONFIG_STACKPROTECTOR |
| 745 | /* Canary value for the -fstack-protector GCC feature: */ | 746 | /* Canary value for the -fstack-protector GCC feature: */ |
| 746 | unsigned long stack_canary; | 747 | unsigned long stack_canary; |
| 747 | #endif | 748 | #endif |
| @@ -1047,6 +1048,17 @@ struct task_struct { | |||
| 1047 | unsigned long numa_pages_migrated; | 1048 | unsigned long numa_pages_migrated; |
| 1048 | #endif /* CONFIG_NUMA_BALANCING */ | 1049 | #endif /* CONFIG_NUMA_BALANCING */ |
| 1049 | 1050 | ||
| 1051 | #ifdef CONFIG_RSEQ | ||
| 1052 | struct rseq __user *rseq; | ||
| 1053 | u32 rseq_len; | ||
| 1054 | u32 rseq_sig; | ||
| 1055 | /* | ||
| 1056 | * RmW on rseq_event_mask must be performed atomically | ||
| 1057 | * with respect to preemption. | ||
| 1058 | */ | ||
| 1059 | unsigned long rseq_event_mask; | ||
| 1060 | #endif | ||
| 1061 | |||
| 1050 | struct tlbflush_unmap_batch tlb_ubc; | 1062 | struct tlbflush_unmap_batch tlb_ubc; |
| 1051 | 1063 | ||
| 1052 | struct rcu_head rcu; | 1064 | struct rcu_head rcu; |
| @@ -1118,7 +1130,7 @@ struct task_struct { | |||
| 1118 | 1130 | ||
| 1119 | #ifdef CONFIG_KCOV | 1131 | #ifdef CONFIG_KCOV |
| 1120 | /* Coverage collection mode enabled for this task (0 if disabled): */ | 1132 | /* Coverage collection mode enabled for this task (0 if disabled): */ |
| 1121 | enum kcov_mode kcov_mode; | 1133 | unsigned int kcov_mode; |
| 1122 | 1134 | ||
| 1123 | /* Size of the kcov_area: */ | 1135 | /* Size of the kcov_area: */ |
| 1124 | unsigned int kcov_size; | 1136 | unsigned int kcov_size; |
| @@ -1627,6 +1639,12 @@ static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag) | |||
| 1627 | clear_ti_thread_flag(task_thread_info(tsk), flag); | 1639 | clear_ti_thread_flag(task_thread_info(tsk), flag); |
| 1628 | } | 1640 | } |
| 1629 | 1641 | ||
| 1642 | static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, | ||
| 1643 | bool value) | ||
| 1644 | { | ||
| 1645 | update_ti_thread_flag(task_thread_info(tsk), flag, value); | ||
| 1646 | } | ||
| 1647 | |||
| 1630 | static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) | 1648 | static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) |
| 1631 | { | 1649 | { |
| 1632 | return test_and_set_ti_thread_flag(task_thread_info(tsk), flag); | 1650 | return test_and_set_ti_thread_flag(task_thread_info(tsk), flag); |
| @@ -1757,4 +1775,127 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask); | |||
| 1757 | #define TASK_SIZE_OF(tsk) TASK_SIZE | 1775 | #define TASK_SIZE_OF(tsk) TASK_SIZE |
| 1758 | #endif | 1776 | #endif |
| 1759 | 1777 | ||
| 1778 | #ifdef CONFIG_RSEQ | ||
| 1779 | |||
| 1780 | /* | ||
| 1781 | * Map the event mask on the user-space ABI enum rseq_cs_flags | ||
| 1782 | * for direct mask checks. | ||
| 1783 | */ | ||
| 1784 | enum rseq_event_mask_bits { | ||
| 1785 | RSEQ_EVENT_PREEMPT_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT, | ||
| 1786 | RSEQ_EVENT_SIGNAL_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT, | ||
| 1787 | RSEQ_EVENT_MIGRATE_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT, | ||
| 1788 | }; | ||
| 1789 | |||
| 1790 | enum rseq_event_mask { | ||
| 1791 | RSEQ_EVENT_PREEMPT = (1U << RSEQ_EVENT_PREEMPT_BIT), | ||
| 1792 | RSEQ_EVENT_SIGNAL = (1U << RSEQ_EVENT_SIGNAL_BIT), | ||
| 1793 | RSEQ_EVENT_MIGRATE = (1U << RSEQ_EVENT_MIGRATE_BIT), | ||
| 1794 | }; | ||
| 1795 | |||
| 1796 | static inline void rseq_set_notify_resume(struct task_struct *t) | ||
| 1797 | { | ||
| 1798 | if (t->rseq) | ||
| 1799 | set_tsk_thread_flag(t, TIF_NOTIFY_RESUME); | ||
| 1800 | } | ||
| 1801 | |||
| 1802 | void __rseq_handle_notify_resume(struct ksignal *sig, struct pt_regs *regs); | ||
| 1803 | |||
| 1804 | static inline void rseq_handle_notify_resume(struct ksignal *ksig, | ||
| 1805 | struct pt_regs *regs) | ||
| 1806 | { | ||
| 1807 | if (current->rseq) | ||
| 1808 | __rseq_handle_notify_resume(ksig, regs); | ||
| 1809 | } | ||
| 1810 | |||
| 1811 | static inline void rseq_signal_deliver(struct ksignal *ksig, | ||
| 1812 | struct pt_regs *regs) | ||
| 1813 | { | ||
| 1814 | preempt_disable(); | ||
| 1815 | __set_bit(RSEQ_EVENT_SIGNAL_BIT, ¤t->rseq_event_mask); | ||
| 1816 | preempt_enable(); | ||
| 1817 | rseq_handle_notify_resume(ksig, regs); | ||
| 1818 | } | ||
| 1819 | |||
| 1820 | /* rseq_preempt() requires preemption to be disabled. */ | ||
| 1821 | static inline void rseq_preempt(struct task_struct *t) | ||
| 1822 | { | ||
| 1823 | __set_bit(RSEQ_EVENT_PREEMPT_BIT, &t->rseq_event_mask); | ||
| 1824 | rseq_set_notify_resume(t); | ||
| 1825 | } | ||
| 1826 | |||
| 1827 | /* rseq_migrate() requires preemption to be disabled. */ | ||
| 1828 | static inline void rseq_migrate(struct task_struct *t) | ||
| 1829 | { | ||
| 1830 | __set_bit(RSEQ_EVENT_MIGRATE_BIT, &t->rseq_event_mask); | ||
| 1831 | rseq_set_notify_resume(t); | ||
| 1832 | } | ||
| 1833 | |||
| 1834 | /* | ||
| 1835 | * If parent process has a registered restartable sequences area, the | ||
| 1836 | * child inherits. Only applies when forking a process, not a thread. | ||
| 1837 | */ | ||
| 1838 | static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) | ||
| 1839 | { | ||
| 1840 | if (clone_flags & CLONE_THREAD) { | ||
| 1841 | t->rseq = NULL; | ||
| 1842 | t->rseq_len = 0; | ||
| 1843 | t->rseq_sig = 0; | ||
| 1844 | t->rseq_event_mask = 0; | ||
| 1845 | } else { | ||
| 1846 | t->rseq = current->rseq; | ||
| 1847 | t->rseq_len = current->rseq_len; | ||
| 1848 | t->rseq_sig = current->rseq_sig; | ||
| 1849 | t->rseq_event_mask = current->rseq_event_mask; | ||
| 1850 | } | ||
| 1851 | } | ||
| 1852 | |||
| 1853 | static inline void rseq_execve(struct task_struct *t) | ||
| 1854 | { | ||
| 1855 | t->rseq = NULL; | ||
| 1856 | t->rseq_len = 0; | ||
| 1857 | t->rseq_sig = 0; | ||
| 1858 | t->rseq_event_mask = 0; | ||
| 1859 | } | ||
| 1860 | |||
| 1861 | #else | ||
| 1862 | |||
| 1863 | static inline void rseq_set_notify_resume(struct task_struct *t) | ||
| 1864 | { | ||
| 1865 | } | ||
| 1866 | static inline void rseq_handle_notify_resume(struct ksignal *ksig, | ||
| 1867 | struct pt_regs *regs) | ||
| 1868 | { | ||
| 1869 | } | ||
| 1870 | static inline void rseq_signal_deliver(struct ksignal *ksig, | ||
| 1871 | struct pt_regs *regs) | ||
| 1872 | { | ||
| 1873 | } | ||
| 1874 | static inline void rseq_preempt(struct task_struct *t) | ||
| 1875 | { | ||
| 1876 | } | ||
| 1877 | static inline void rseq_migrate(struct task_struct *t) | ||
| 1878 | { | ||
| 1879 | } | ||
| 1880 | static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) | ||
| 1881 | { | ||
| 1882 | } | ||
| 1883 | static inline void rseq_execve(struct task_struct *t) | ||
| 1884 | { | ||
| 1885 | } | ||
| 1886 | |||
| 1887 | #endif | ||
| 1888 | |||
| 1889 | #ifdef CONFIG_DEBUG_RSEQ | ||
| 1890 | |||
| 1891 | void rseq_syscall(struct pt_regs *regs); | ||
| 1892 | |||
| 1893 | #else | ||
| 1894 | |||
| 1895 | static inline void rseq_syscall(struct pt_regs *regs) | ||
| 1896 | { | ||
| 1897 | } | ||
| 1898 | |||
| 1899 | #endif | ||
| 1900 | |||
| 1760 | #endif | 1901 | #endif |
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index b458c87b866c..f4c9fc0fc755 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h | |||
| @@ -85,8 +85,8 @@ struct scmi_clk_ops { | |||
| 85 | * @level_set: sets the performance level of a domain | 85 | * @level_set: sets the performance level of a domain |
| 86 | * @level_get: gets the performance level of a domain | 86 | * @level_get: gets the performance level of a domain |
| 87 | * @device_domain_id: gets the scmi domain id for a given device | 87 | * @device_domain_id: gets the scmi domain id for a given device |
| 88 | * @get_transition_latency: gets the DVFS transition latency for a given device | 88 | * @transition_latency_get: gets the DVFS transition latency for a given device |
| 89 | * @add_opps_to_device: adds all the OPPs for a given device | 89 | * @device_opps_add: adds all the OPPs for a given device |
| 90 | * @freq_set: sets the frequency for a given device using sustained frequency | 90 | * @freq_set: sets the frequency for a given device using sustained frequency |
| 91 | * to sustained performance level mapping | 91 | * to sustained performance level mapping |
| 92 | * @freq_get: gets the frequency for a given device using sustained frequency | 92 | * @freq_get: gets the frequency for a given device using sustained frequency |
| @@ -102,10 +102,10 @@ struct scmi_perf_ops { | |||
| 102 | int (*level_get)(const struct scmi_handle *handle, u32 domain, | 102 | int (*level_get)(const struct scmi_handle *handle, u32 domain, |
| 103 | u32 *level, bool poll); | 103 | u32 *level, bool poll); |
| 104 | int (*device_domain_id)(struct device *dev); | 104 | int (*device_domain_id)(struct device *dev); |
| 105 | int (*get_transition_latency)(const struct scmi_handle *handle, | 105 | int (*transition_latency_get)(const struct scmi_handle *handle, |
| 106 | struct device *dev); | 106 | struct device *dev); |
| 107 | int (*add_opps_to_device)(const struct scmi_handle *handle, | 107 | int (*device_opps_add)(const struct scmi_handle *handle, |
| 108 | struct device *dev); | 108 | struct device *dev); |
| 109 | int (*freq_set)(const struct scmi_handle *handle, u32 domain, | 109 | int (*freq_set)(const struct scmi_handle *handle, u32 domain, |
| 110 | unsigned long rate, bool poll); | 110 | unsigned long rate, bool poll); |
| 111 | int (*freq_get)(const struct scmi_handle *handle, u32 domain, | 111 | int (*freq_get)(const struct scmi_handle *handle, u32 domain, |
| @@ -189,6 +189,14 @@ struct scmi_sensor_ops { | |||
| 189 | * @perf_ops: pointer to set of performance protocol operations | 189 | * @perf_ops: pointer to set of performance protocol operations |
| 190 | * @clk_ops: pointer to set of clock protocol operations | 190 | * @clk_ops: pointer to set of clock protocol operations |
| 191 | * @sensor_ops: pointer to set of sensor protocol operations | 191 | * @sensor_ops: pointer to set of sensor protocol operations |
| 192 | * @perf_priv: pointer to private data structure specific to performance | ||
| 193 | * protocol(for internal use only) | ||
| 194 | * @clk_priv: pointer to private data structure specific to clock | ||
| 195 | * protocol(for internal use only) | ||
| 196 | * @power_priv: pointer to private data structure specific to power | ||
| 197 | * protocol(for internal use only) | ||
| 198 | * @sensor_priv: pointer to private data structure specific to sensors | ||
| 199 | * protocol(for internal use only) | ||
| 192 | */ | 200 | */ |
| 193 | struct scmi_handle { | 201 | struct scmi_handle { |
| 194 | struct device *dev; | 202 | struct device *dev; |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c86885954994..164cdedf6012 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -3252,7 +3252,8 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, | |||
| 3252 | int *peeked, int *off, int *err); | 3252 | int *peeked, int *off, int *err); |
| 3253 | struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, | 3253 | struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, |
| 3254 | int *err); | 3254 | int *err); |
| 3255 | __poll_t datagram_poll_mask(struct socket *sock, __poll_t events); | 3255 | __poll_t datagram_poll(struct file *file, struct socket *sock, |
| 3256 | struct poll_table_struct *wait); | ||
| 3256 | int skb_copy_datagram_iter(const struct sk_buff *from, int offset, | 3257 | int skb_copy_datagram_iter(const struct sk_buff *from, int offset, |
| 3257 | struct iov_iter *to, int size); | 3258 | struct iov_iter *to, int size); |
| 3258 | static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset, | 3259 | static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset, |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 4d759e1ddc33..14e3fe4bd6a1 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -600,6 +600,7 @@ struct memcg_cache_params { | |||
| 600 | struct memcg_cache_array __rcu *memcg_caches; | 600 | struct memcg_cache_array __rcu *memcg_caches; |
| 601 | struct list_head __root_caches_node; | 601 | struct list_head __root_caches_node; |
| 602 | struct list_head children; | 602 | struct list_head children; |
| 603 | bool dying; | ||
| 603 | }; | 604 | }; |
| 604 | struct { | 605 | struct { |
| 605 | struct mem_cgroup *memcg; | 606 | struct mem_cgroup *memcg; |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 09fa2c6f0e68..3a1a1dbc6f49 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -155,8 +155,12 @@ struct kmem_cache { | |||
| 155 | 155 | ||
| 156 | #ifdef CONFIG_SYSFS | 156 | #ifdef CONFIG_SYSFS |
| 157 | #define SLAB_SUPPORTS_SYSFS | 157 | #define SLAB_SUPPORTS_SYSFS |
| 158 | void sysfs_slab_unlink(struct kmem_cache *); | ||
| 158 | void sysfs_slab_release(struct kmem_cache *); | 159 | void sysfs_slab_release(struct kmem_cache *); |
| 159 | #else | 160 | #else |
| 161 | static inline void sysfs_slab_unlink(struct kmem_cache *s) | ||
| 162 | { | ||
| 163 | } | ||
| 160 | static inline void sysfs_slab_release(struct kmem_cache *s) | 164 | static inline void sysfs_slab_release(struct kmem_cache *s) |
| 161 | { | 165 | { |
| 162 | } | 166 | } |
diff --git a/include/linux/soc/qcom/smem.h b/include/linux/soc/qcom/smem.h index c1657ed27b30..86e1b358688a 100644 --- a/include/linux/soc/qcom/smem.h +++ b/include/linux/soc/qcom/smem.h | |||
| @@ -9,4 +9,6 @@ void *qcom_smem_get(unsigned host, unsigned item, size_t *size); | |||
| 9 | 9 | ||
| 10 | int qcom_smem_get_free_space(unsigned host); | 10 | int qcom_smem_get_free_space(unsigned host); |
| 11 | 11 | ||
| 12 | phys_addr_t qcom_smem_virt_to_phys(void *p); | ||
| 13 | |||
| 12 | #endif | 14 | #endif |
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h index 0ccbc138c26a..18435e5c6364 100644 --- a/include/linux/soc/ti/ti_sci_protocol.h +++ b/include/linux/soc/ti/ti_sci_protocol.h | |||
| @@ -1,17 +1,9 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0 | ||
| 1 | /* | 2 | /* |
| 2 | * Texas Instruments System Control Interface Protocol | 3 | * Texas Instruments System Control Interface Protocol |
| 3 | * | 4 | * |
| 4 | * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/ | 5 | * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/ |
| 5 | * Nishanth Menon | 6 | * Nishanth Menon |
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 12 | * kind, whether express or implied; without even the implied warranty | ||
| 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | 7 | */ |
| 16 | 8 | ||
| 17 | #ifndef __TISCI_PROTOCOL_H | 9 | #ifndef __TISCI_PROTOCOL_H |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 1e8a46435838..fd57888d4942 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -427,6 +427,11 @@ extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); | |||
| 427 | #define atomic_dec_and_lock(atomic, lock) \ | 427 | #define atomic_dec_and_lock(atomic, lock) \ |
| 428 | __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) | 428 | __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) |
| 429 | 429 | ||
| 430 | extern int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock, | ||
| 431 | unsigned long *flags); | ||
| 432 | #define atomic_dec_and_lock_irqsave(atomic, lock, flags) \ | ||
| 433 | __cond_lock(lock, _atomic_dec_and_lock_irqsave(atomic, lock, &(flags))) | ||
| 434 | |||
| 430 | int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask, | 435 | int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask, |
| 431 | size_t max_size, unsigned int cpu_mult, | 436 | size_t max_size, unsigned int cpu_mult, |
| 432 | gfp_t gfp); | 437 | gfp_t gfp); |
diff --git a/include/linux/stackprotector.h b/include/linux/stackprotector.h index 03696c729fb4..6b792d080eee 100644 --- a/include/linux/stackprotector.h +++ b/include/linux/stackprotector.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
| 7 | #include <linux/random.h> | 7 | #include <linux/random.h> |
| 8 | 8 | ||
| 9 | #ifdef CONFIG_CC_STACKPROTECTOR | 9 | #ifdef CONFIG_STACKPROTECTOR |
| 10 | # include <asm/stackprotector.h> | 10 | # include <asm/stackprotector.h> |
| 11 | #else | 11 | #else |
| 12 | static inline void boot_init_stack_canary(void) | 12 | static inline void boot_init_stack_canary(void) |
diff --git a/include/linux/stat.h b/include/linux/stat.h index 22484e44544d..765573dc17d6 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h | |||
| @@ -41,10 +41,10 @@ struct kstat { | |||
| 41 | kuid_t uid; | 41 | kuid_t uid; |
| 42 | kgid_t gid; | 42 | kgid_t gid; |
| 43 | loff_t size; | 43 | loff_t size; |
| 44 | struct timespec atime; | 44 | struct timespec64 atime; |
| 45 | struct timespec mtime; | 45 | struct timespec64 mtime; |
| 46 | struct timespec ctime; | 46 | struct timespec64 ctime; |
| 47 | struct timespec btime; /* File creation time */ | 47 | struct timespec64 btime; /* File creation time */ |
| 48 | u64 blocks; | 48 | u64 blocks; |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
diff --git a/include/linux/ste_modem_shm.h b/include/linux/ste_modem_shm.h deleted file mode 100644 index 8444a4eff1bb..000000000000 --- a/include/linux/ste_modem_shm.h +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson AB 2012 | ||
| 3 | * Author: Sjur Brendeland / sjur.brandeland@stericsson.com | ||
| 4 | * | ||
| 5 | * License terms: GNU General Public License (GPL) version 2 | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef __INC_MODEM_DEV_H | ||
| 9 | #define __INC_MODEM_DEV_H | ||
| 10 | #include <linux/types.h> | ||
| 11 | #include <linux/platform_device.h> | ||
| 12 | |||
| 13 | struct ste_modem_device; | ||
| 14 | |||
| 15 | /** | ||
| 16 | * struct ste_modem_dev_cb - Callbacks for modem initiated events. | ||
| 17 | * @kick: Called when the modem kicks the host. | ||
| 18 | * | ||
| 19 | * This structure contains callbacks for actions triggered by the modem. | ||
| 20 | */ | ||
| 21 | struct ste_modem_dev_cb { | ||
| 22 | void (*kick)(struct ste_modem_device *mdev, int notify_id); | ||
| 23 | }; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * struct ste_modem_dev_ops - Functions to control modem and modem interface. | ||
| 27 | * | ||
| 28 | * @power: Main power switch, used for cold-start or complete power off. | ||
| 29 | * @kick: Kick the modem. | ||
| 30 | * @kick_subscribe: Subscribe for notifications from the modem. | ||
| 31 | * @setup: Provide callback functions to modem device. | ||
| 32 | * | ||
| 33 | * This structure contains functions used by the ste remoteproc driver | ||
| 34 | * to manage the modem. | ||
| 35 | */ | ||
| 36 | struct ste_modem_dev_ops { | ||
| 37 | int (*power)(struct ste_modem_device *mdev, bool on); | ||
| 38 | int (*kick)(struct ste_modem_device *mdev, int notify_id); | ||
| 39 | int (*kick_subscribe)(struct ste_modem_device *mdev, int notify_id); | ||
| 40 | int (*setup)(struct ste_modem_device *mdev, | ||
| 41 | struct ste_modem_dev_cb *cfg); | ||
| 42 | }; | ||
| 43 | |||
| 44 | /** | ||
| 45 | * struct ste_modem_device - represent the STE modem device | ||
| 46 | * @pdev: Reference to platform device | ||
| 47 | * @ops: Operations used to manage the modem. | ||
| 48 | * @drv_data: Driver private data. | ||
| 49 | */ | ||
| 50 | struct ste_modem_device { | ||
| 51 | struct platform_device pdev; | ||
| 52 | struct ste_modem_dev_ops ops; | ||
| 53 | void *drv_data; | ||
| 54 | }; | ||
| 55 | |||
| 56 | #endif /*INC_MODEM_DEV_H*/ | ||
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index 4397c52ec4a4..d23c5030901a 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | 6 | ||
| 7 | struct file; | 7 | struct file; |
| 8 | struct task_struct; | ||
| 8 | 9 | ||
| 9 | /* Descriptions of the types of units to | 10 | /* Descriptions of the types of units to |
| 10 | * print in */ | 11 | * print in */ |
diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h index 8f144db73e38..92d182fd8e3b 100644 --- a/include/linux/sunrpc/rpc_rdma.h +++ b/include/linux/sunrpc/rpc_rdma.h | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright (c) 2015-2017 Oracle. All rights reserved. | 3 | * Copyright (c) 2015-2017 Oracle. All rights reserved. |
| 3 | * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved. | 4 | * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved. |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 7337e1221590..fd78f78df5c6 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright (c) 2005-2006 Network Appliance, Inc. All rights reserved. | 3 | * Copyright (c) 2005-2006 Network Appliance, Inc. All rights reserved. |
| 3 | * | 4 | * |
| @@ -70,37 +71,16 @@ extern atomic_t rdma_stat_rq_prod; | |||
| 70 | extern atomic_t rdma_stat_sq_poll; | 71 | extern atomic_t rdma_stat_sq_poll; |
| 71 | extern atomic_t rdma_stat_sq_prod; | 72 | extern atomic_t rdma_stat_sq_prod; |
| 72 | 73 | ||
| 73 | /* | ||
| 74 | * Contexts are built when an RDMA request is created and are a | ||
| 75 | * record of the resources that can be recovered when the request | ||
| 76 | * completes. | ||
| 77 | */ | ||
| 78 | struct svc_rdma_op_ctxt { | ||
| 79 | struct list_head list; | ||
| 80 | struct xdr_buf arg; | ||
| 81 | struct ib_cqe cqe; | ||
| 82 | u32 byte_len; | ||
| 83 | struct svcxprt_rdma *xprt; | ||
| 84 | enum dma_data_direction direction; | ||
| 85 | int count; | ||
| 86 | unsigned int mapped_sges; | ||
| 87 | int hdr_count; | ||
| 88 | struct ib_send_wr send_wr; | ||
| 89 | struct ib_sge sge[1 + RPCRDMA_MAX_INLINE_THRESH / PAGE_SIZE]; | ||
| 90 | struct page *pages[RPCSVC_MAXPAGES]; | ||
| 91 | }; | ||
| 92 | |||
| 93 | struct svcxprt_rdma { | 74 | struct svcxprt_rdma { |
| 94 | struct svc_xprt sc_xprt; /* SVC transport structure */ | 75 | struct svc_xprt sc_xprt; /* SVC transport structure */ |
| 95 | struct rdma_cm_id *sc_cm_id; /* RDMA connection id */ | 76 | struct rdma_cm_id *sc_cm_id; /* RDMA connection id */ |
| 96 | struct list_head sc_accept_q; /* Conn. waiting accept */ | 77 | struct list_head sc_accept_q; /* Conn. waiting accept */ |
| 97 | int sc_ord; /* RDMA read limit */ | 78 | int sc_ord; /* RDMA read limit */ |
| 98 | int sc_max_sge; | 79 | int sc_max_send_sges; |
| 99 | bool sc_snd_w_inv; /* OK to use Send With Invalidate */ | 80 | bool sc_snd_w_inv; /* OK to use Send With Invalidate */ |
| 100 | 81 | ||
| 101 | atomic_t sc_sq_avail; /* SQEs ready to be consumed */ | 82 | atomic_t sc_sq_avail; /* SQEs ready to be consumed */ |
| 102 | unsigned int sc_sq_depth; /* Depth of SQ */ | 83 | unsigned int sc_sq_depth; /* Depth of SQ */ |
| 103 | unsigned int sc_rq_depth; /* Depth of RQ */ | ||
| 104 | __be32 sc_fc_credits; /* Forward credits */ | 84 | __be32 sc_fc_credits; /* Forward credits */ |
| 105 | u32 sc_max_requests; /* Max requests */ | 85 | u32 sc_max_requests; /* Max requests */ |
| 106 | u32 sc_max_bc_requests;/* Backward credits */ | 86 | u32 sc_max_bc_requests;/* Backward credits */ |
| @@ -109,9 +89,8 @@ struct svcxprt_rdma { | |||
| 109 | 89 | ||
| 110 | struct ib_pd *sc_pd; | 90 | struct ib_pd *sc_pd; |
| 111 | 91 | ||
| 112 | spinlock_t sc_ctxt_lock; | 92 | spinlock_t sc_send_lock; |
| 113 | struct list_head sc_ctxts; | 93 | struct list_head sc_send_ctxts; |
| 114 | int sc_ctxt_used; | ||
| 115 | spinlock_t sc_rw_ctxt_lock; | 94 | spinlock_t sc_rw_ctxt_lock; |
| 116 | struct list_head sc_rw_ctxts; | 95 | struct list_head sc_rw_ctxts; |
| 117 | 96 | ||
| @@ -127,6 +106,9 @@ struct svcxprt_rdma { | |||
| 127 | unsigned long sc_flags; | 106 | unsigned long sc_flags; |
| 128 | struct list_head sc_read_complete_q; | 107 | struct list_head sc_read_complete_q; |
| 129 | struct work_struct sc_work; | 108 | struct work_struct sc_work; |
| 109 | |||
| 110 | spinlock_t sc_recv_lock; | ||
| 111 | struct list_head sc_recv_ctxts; | ||
| 130 | }; | 112 | }; |
| 131 | /* sc_flags */ | 113 | /* sc_flags */ |
| 132 | #define RDMAXPRT_CONN_PENDING 3 | 114 | #define RDMAXPRT_CONN_PENDING 3 |
| @@ -141,12 +123,30 @@ struct svcxprt_rdma { | |||
| 141 | 123 | ||
| 142 | #define RPCSVC_MAXPAYLOAD_RDMA RPCSVC_MAXPAYLOAD | 124 | #define RPCSVC_MAXPAYLOAD_RDMA RPCSVC_MAXPAYLOAD |
| 143 | 125 | ||
| 144 | /* Track DMA maps for this transport and context */ | 126 | struct svc_rdma_recv_ctxt { |
| 145 | static inline void svc_rdma_count_mappings(struct svcxprt_rdma *rdma, | 127 | struct list_head rc_list; |
| 146 | struct svc_rdma_op_ctxt *ctxt) | 128 | struct ib_recv_wr rc_recv_wr; |
| 147 | { | 129 | struct ib_cqe rc_cqe; |
| 148 | ctxt->mapped_sges++; | 130 | struct ib_sge rc_recv_sge; |
| 149 | } | 131 | void *rc_recv_buf; |
| 132 | struct xdr_buf rc_arg; | ||
| 133 | bool rc_temp; | ||
| 134 | u32 rc_byte_len; | ||
| 135 | unsigned int rc_page_count; | ||
| 136 | unsigned int rc_hdr_count; | ||
| 137 | struct page *rc_pages[RPCSVC_MAXPAGES]; | ||
| 138 | }; | ||
| 139 | |||
| 140 | struct svc_rdma_send_ctxt { | ||
| 141 | struct list_head sc_list; | ||
| 142 | struct ib_send_wr sc_send_wr; | ||
| 143 | struct ib_cqe sc_cqe; | ||
| 144 | void *sc_xprt_buf; | ||
| 145 | int sc_page_count; | ||
| 146 | int sc_cur_sge_no; | ||
| 147 | struct page *sc_pages[RPCSVC_MAXPAGES]; | ||
| 148 | struct ib_sge sc_sges[]; | ||
| 149 | }; | ||
| 150 | 150 | ||
| 151 | /* svc_rdma_backchannel.c */ | 151 | /* svc_rdma_backchannel.c */ |
| 152 | extern int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt, | 152 | extern int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt, |
| @@ -154,13 +154,18 @@ extern int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt, | |||
| 154 | struct xdr_buf *rcvbuf); | 154 | struct xdr_buf *rcvbuf); |
| 155 | 155 | ||
| 156 | /* svc_rdma_recvfrom.c */ | 156 | /* svc_rdma_recvfrom.c */ |
| 157 | extern void svc_rdma_recv_ctxts_destroy(struct svcxprt_rdma *rdma); | ||
| 158 | extern bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma); | ||
| 159 | extern void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma, | ||
| 160 | struct svc_rdma_recv_ctxt *ctxt); | ||
| 161 | extern void svc_rdma_flush_recv_queues(struct svcxprt_rdma *rdma); | ||
| 157 | extern int svc_rdma_recvfrom(struct svc_rqst *); | 162 | extern int svc_rdma_recvfrom(struct svc_rqst *); |
| 158 | 163 | ||
| 159 | /* svc_rdma_rw.c */ | 164 | /* svc_rdma_rw.c */ |
| 160 | extern void svc_rdma_destroy_rw_ctxts(struct svcxprt_rdma *rdma); | 165 | extern void svc_rdma_destroy_rw_ctxts(struct svcxprt_rdma *rdma); |
| 161 | extern int svc_rdma_recv_read_chunk(struct svcxprt_rdma *rdma, | 166 | extern int svc_rdma_recv_read_chunk(struct svcxprt_rdma *rdma, |
| 162 | struct svc_rqst *rqstp, | 167 | struct svc_rqst *rqstp, |
| 163 | struct svc_rdma_op_ctxt *head, __be32 *p); | 168 | struct svc_rdma_recv_ctxt *head, __be32 *p); |
| 164 | extern int svc_rdma_send_write_chunk(struct svcxprt_rdma *rdma, | 169 | extern int svc_rdma_send_write_chunk(struct svcxprt_rdma *rdma, |
| 165 | __be32 *wr_ch, struct xdr_buf *xdr); | 170 | __be32 *wr_ch, struct xdr_buf *xdr); |
| 166 | extern int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma, | 171 | extern int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma, |
| @@ -168,24 +173,22 @@ extern int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma, | |||
| 168 | struct xdr_buf *xdr); | 173 | struct xdr_buf *xdr); |
| 169 | 174 | ||
| 170 | /* svc_rdma_sendto.c */ | 175 | /* svc_rdma_sendto.c */ |
| 171 | extern int svc_rdma_map_reply_hdr(struct svcxprt_rdma *rdma, | 176 | extern void svc_rdma_send_ctxts_destroy(struct svcxprt_rdma *rdma); |
| 172 | struct svc_rdma_op_ctxt *ctxt, | 177 | extern struct svc_rdma_send_ctxt * |
| 173 | __be32 *rdma_resp, unsigned int len); | 178 | svc_rdma_send_ctxt_get(struct svcxprt_rdma *rdma); |
| 174 | extern int svc_rdma_post_send_wr(struct svcxprt_rdma *rdma, | 179 | extern void svc_rdma_send_ctxt_put(struct svcxprt_rdma *rdma, |
| 175 | struct svc_rdma_op_ctxt *ctxt, | 180 | struct svc_rdma_send_ctxt *ctxt); |
| 176 | int num_sge, u32 inv_rkey); | 181 | extern int svc_rdma_send(struct svcxprt_rdma *rdma, struct ib_send_wr *wr); |
| 182 | extern void svc_rdma_sync_reply_hdr(struct svcxprt_rdma *rdma, | ||
| 183 | struct svc_rdma_send_ctxt *ctxt, | ||
| 184 | unsigned int len); | ||
| 185 | extern int svc_rdma_map_reply_msg(struct svcxprt_rdma *rdma, | ||
| 186 | struct svc_rdma_send_ctxt *ctxt, | ||
| 187 | struct xdr_buf *xdr, __be32 *wr_lst); | ||
| 177 | extern int svc_rdma_sendto(struct svc_rqst *); | 188 | extern int svc_rdma_sendto(struct svc_rqst *); |
| 178 | 189 | ||
| 179 | /* svc_rdma_transport.c */ | 190 | /* svc_rdma_transport.c */ |
| 180 | extern void svc_rdma_wc_send(struct ib_cq *, struct ib_wc *); | ||
| 181 | extern void svc_rdma_wc_reg(struct ib_cq *, struct ib_wc *); | ||
| 182 | extern void svc_rdma_wc_read(struct ib_cq *, struct ib_wc *); | ||
| 183 | extern void svc_rdma_wc_inv(struct ib_cq *, struct ib_wc *); | ||
| 184 | extern int svc_rdma_send(struct svcxprt_rdma *, struct ib_send_wr *); | ||
| 185 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); | 191 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); |
| 186 | extern struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *); | ||
| 187 | extern void svc_rdma_put_context(struct svc_rdma_op_ctxt *, int); | ||
| 188 | extern void svc_rdma_unmap_dma(struct svc_rdma_op_ctxt *ctxt); | ||
| 189 | extern void svc_sq_reap(struct svcxprt_rdma *); | 192 | extern void svc_sq_reap(struct svcxprt_rdma *); |
| 190 | extern void svc_rq_reap(struct svcxprt_rdma *); | 193 | extern void svc_rq_reap(struct svcxprt_rdma *); |
| 191 | extern void svc_rdma_prep_reply_hdr(struct svc_rqst *); | 194 | extern void svc_rdma_prep_reply_hdr(struct svc_rqst *); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 5fea0fb420df..336fd1a19cca 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -84,7 +84,6 @@ struct rpc_rqst { | |||
| 84 | void (*rq_release_snd_buf)(struct rpc_rqst *); /* release rq_enc_pages */ | 84 | void (*rq_release_snd_buf)(struct rpc_rqst *); /* release rq_enc_pages */ |
| 85 | struct list_head rq_list; | 85 | struct list_head rq_list; |
| 86 | 86 | ||
| 87 | void *rq_xprtdata; /* Per-xprt private data */ | ||
| 88 | void *rq_buffer; /* Call XDR encode buffer */ | 87 | void *rq_buffer; /* Call XDR encode buffer */ |
| 89 | size_t rq_callsize; | 88 | size_t rq_callsize; |
| 90 | void *rq_rbuffer; /* Reply XDR decode buffer */ | 89 | void *rq_rbuffer; /* Reply XDR decode buffer */ |
| @@ -127,6 +126,8 @@ struct rpc_xprt_ops { | |||
| 127 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 126 | int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 128 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 127 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 129 | void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task); | 128 | void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 129 | void (*free_slot)(struct rpc_xprt *xprt, | ||
| 130 | struct rpc_rqst *req); | ||
| 130 | void (*rpcbind)(struct rpc_task *task); | 131 | void (*rpcbind)(struct rpc_task *task); |
| 131 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); | 132 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); |
| 132 | void (*connect)(struct rpc_xprt *xprt, struct rpc_task *task); | 133 | void (*connect)(struct rpc_xprt *xprt, struct rpc_task *task); |
| @@ -324,10 +325,13 @@ struct xprt_class { | |||
| 324 | struct rpc_xprt *xprt_create_transport(struct xprt_create *args); | 325 | struct rpc_xprt *xprt_create_transport(struct xprt_create *args); |
| 325 | void xprt_connect(struct rpc_task *task); | 326 | void xprt_connect(struct rpc_task *task); |
| 326 | void xprt_reserve(struct rpc_task *task); | 327 | void xprt_reserve(struct rpc_task *task); |
| 328 | void xprt_request_init(struct rpc_task *task); | ||
| 327 | void xprt_retry_reserve(struct rpc_task *task); | 329 | void xprt_retry_reserve(struct rpc_task *task); |
| 328 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 330 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
| 329 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 331 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
| 330 | void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | 332 | void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); |
| 333 | void xprt_free_slot(struct rpc_xprt *xprt, | ||
| 334 | struct rpc_rqst *req); | ||
| 331 | void xprt_lock_and_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | 335 | void xprt_lock_and_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); |
| 332 | bool xprt_prepare_transmit(struct rpc_task *task); | 336 | bool xprt_prepare_transmit(struct rpc_task *task); |
| 333 | void xprt_transmit(struct rpc_task *task); | 337 | void xprt_transmit(struct rpc_task *task); |
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h index 5859563e3c1f..86fc38ff0355 100644 --- a/include/linux/sunrpc/xprtrdma.h +++ b/include/linux/sunrpc/xprtrdma.h | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved. | 3 | * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved. |
| 3 | * | 4 | * |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 390e814fdc8d..a368a68cb667 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -66,6 +66,7 @@ struct old_linux_dirent; | |||
| 66 | struct perf_event_attr; | 66 | struct perf_event_attr; |
| 67 | struct file_handle; | 67 | struct file_handle; |
| 68 | struct sigaltstack; | 68 | struct sigaltstack; |
| 69 | struct rseq; | ||
| 69 | union bpf_attr; | 70 | union bpf_attr; |
| 70 | 71 | ||
| 71 | #include <linux/types.h> | 72 | #include <linux/types.h> |
| @@ -230,6 +231,9 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) | |||
| 230 | */ | 231 | */ |
| 231 | #ifndef __SYSCALL_DEFINEx | 232 | #ifndef __SYSCALL_DEFINEx |
| 232 | #define __SYSCALL_DEFINEx(x, name, ...) \ | 233 | #define __SYSCALL_DEFINEx(x, name, ...) \ |
| 234 | __diag_push(); \ | ||
| 235 | __diag_ignore(GCC, 8, "-Wattribute-alias", \ | ||
| 236 | "Type aliasing is used to sanitize syscall arguments");\ | ||
| 233 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ | 237 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ |
| 234 | __attribute__((alias(__stringify(__se_sys##name)))); \ | 238 | __attribute__((alias(__stringify(__se_sys##name)))); \ |
| 235 | ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ | 239 | ALLOW_ERROR_INJECTION(sys##name, ERRNO); \ |
| @@ -242,6 +246,7 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) | |||
| 242 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ | 246 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ |
| 243 | return ret; \ | 247 | return ret; \ |
| 244 | } \ | 248 | } \ |
| 249 | __diag_pop(); \ | ||
| 245 | static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) | 250 | static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
| 246 | #endif /* __SYSCALL_DEFINEx */ | 251 | #endif /* __SYSCALL_DEFINEx */ |
| 247 | 252 | ||
| @@ -897,7 +902,8 @@ asmlinkage long sys_pkey_alloc(unsigned long flags, unsigned long init_val); | |||
| 897 | asmlinkage long sys_pkey_free(int pkey); | 902 | asmlinkage long sys_pkey_free(int pkey); |
| 898 | asmlinkage long sys_statx(int dfd, const char __user *path, unsigned flags, | 903 | asmlinkage long sys_statx(int dfd, const char __user *path, unsigned flags, |
| 899 | unsigned mask, struct statx __user *buffer); | 904 | unsigned mask, struct statx __user *buffer); |
| 900 | 905 | asmlinkage long sys_rseq(struct rseq __user *rseq, uint32_t rseq_len, | |
| 906 | int flags, uint32_t sig); | ||
| 901 | 907 | ||
| 902 | /* | 908 | /* |
| 903 | * Architecture-specific system calls | 909 | * Architecture-specific system calls |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 7834be668d80..5f4705f46c2f 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -1,25 +1,10 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 1 | /* | 2 | /* |
| 2 | * thermal.h ($Revision: 0 $) | 3 | * thermal.h ($Revision: 0 $) |
| 3 | * | 4 | * |
| 4 | * Copyright (C) 2008 Intel Corp | 5 | * Copyright (C) 2008 Intel Corp |
| 5 | * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> | 6 | * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> |
| 6 | * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> | 7 | * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> |
| 7 | * | ||
| 8 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; version 2 of the License. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, but | ||
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 16 | * General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License along | ||
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 20 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
| 21 | * | ||
| 22 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 23 | */ | 8 | */ |
| 24 | 9 | ||
| 25 | #ifndef __THERMAL_H__ | 10 | #ifndef __THERMAL_H__ |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index cf2862bd134a..8d8821b3689a 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
| @@ -60,6 +60,15 @@ static inline void clear_ti_thread_flag(struct thread_info *ti, int flag) | |||
| 60 | clear_bit(flag, (unsigned long *)&ti->flags); | 60 | clear_bit(flag, (unsigned long *)&ti->flags); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | static inline void update_ti_thread_flag(struct thread_info *ti, int flag, | ||
| 64 | bool value) | ||
| 65 | { | ||
| 66 | if (value) | ||
| 67 | set_ti_thread_flag(ti, flag); | ||
| 68 | else | ||
| 69 | clear_ti_thread_flag(ti, flag); | ||
| 70 | } | ||
| 71 | |||
| 63 | static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) | 72 | static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) |
| 64 | { | 73 | { |
| 65 | return test_and_set_bit(flag, (unsigned long *)&ti->flags); | 74 | return test_and_set_bit(flag, (unsigned long *)&ti->flags); |
| @@ -79,6 +88,8 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) | |||
| 79 | set_ti_thread_flag(current_thread_info(), flag) | 88 | set_ti_thread_flag(current_thread_info(), flag) |
| 80 | #define clear_thread_flag(flag) \ | 89 | #define clear_thread_flag(flag) \ |
| 81 | clear_ti_thread_flag(current_thread_info(), flag) | 90 | clear_ti_thread_flag(current_thread_info(), flag) |
| 91 | #define update_thread_flag(flag, value) \ | ||
| 92 | update_ti_thread_flag(current_thread_info(), flag, value) | ||
| 82 | #define test_and_set_thread_flag(flag) \ | 93 | #define test_and_set_thread_flag(flag) \ |
| 83 | test_and_set_ti_thread_flag(current_thread_info(), flag) | 94 | test_and_set_ti_thread_flag(current_thread_info(), flag) |
| 84 | #define test_and_clear_thread_flag(flag) \ | 95 | #define test_and_clear_thread_flag(flag) \ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index c94f466d57ef..19a690b559ca 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * Kernel Tracepoint API. | 5 | * Kernel Tracepoint API. |
| 6 | * | 6 | * |
| 7 | * See Documentation/trace/tracepoints.txt. | 7 | * See Documentation/trace/tracepoints.rst. |
| 8 | * | 8 | * |
| 9 | * Copyright (C) 2008-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 9 | * Copyright (C) 2008-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 10 | * | 10 | * |
diff --git a/include/linux/uio.h b/include/linux/uio.h index f5766e853a77..409c845d4cd3 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
| @@ -155,7 +155,7 @@ size_t _copy_from_iter_flushcache(void *addr, size_t bytes, struct iov_iter *i); | |||
| 155 | #endif | 155 | #endif |
| 156 | 156 | ||
| 157 | #ifdef CONFIG_ARCH_HAS_UACCESS_MCSAFE | 157 | #ifdef CONFIG_ARCH_HAS_UACCESS_MCSAFE |
| 158 | size_t _copy_to_iter_mcsafe(void *addr, size_t bytes, struct iov_iter *i); | 158 | size_t _copy_to_iter_mcsafe(const void *addr, size_t bytes, struct iov_iter *i); |
| 159 | #else | 159 | #else |
| 160 | #define _copy_to_iter_mcsafe _copy_to_iter | 160 | #define _copy_to_iter_mcsafe _copy_to_iter |
| 161 | #endif | 161 | #endif |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index f144216febc6..9397628a1967 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
| @@ -58,7 +58,8 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, | |||
| 58 | static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, | 58 | static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, |
| 59 | struct virtio_net_hdr *hdr, | 59 | struct virtio_net_hdr *hdr, |
| 60 | bool little_endian, | 60 | bool little_endian, |
| 61 | bool has_data_valid) | 61 | bool has_data_valid, |
| 62 | int vlan_hlen) | ||
| 62 | { | 63 | { |
| 63 | memset(hdr, 0, sizeof(*hdr)); /* no info leak */ | 64 | memset(hdr, 0, sizeof(*hdr)); /* no info leak */ |
| 64 | 65 | ||
| @@ -83,12 +84,8 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, | |||
| 83 | 84 | ||
| 84 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 85 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
| 85 | hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM; | 86 | hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM; |
| 86 | if (skb_vlan_tag_present(skb)) | 87 | hdr->csum_start = __cpu_to_virtio16(little_endian, |
| 87 | hdr->csum_start = __cpu_to_virtio16(little_endian, | 88 | skb_checksum_start_offset(skb) + vlan_hlen); |
| 88 | skb_checksum_start_offset(skb) + VLAN_HLEN); | ||
| 89 | else | ||
| 90 | hdr->csum_start = __cpu_to_virtio16(little_endian, | ||
| 91 | skb_checksum_start_offset(skb)); | ||
| 92 | hdr->csum_offset = __cpu_to_virtio16(little_endian, | 89 | hdr->csum_offset = __cpu_to_virtio16(little_endian, |
| 93 | skb->csum_offset); | 90 | skb->csum_offset); |
| 94 | } else if (has_data_valid && | 91 | } else if (has_data_valid && |
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index bbf32524ab27..fab02133a919 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h | |||
| @@ -35,7 +35,7 @@ static inline void virtio_rmb(bool weak_barriers) | |||
| 35 | if (weak_barriers) | 35 | if (weak_barriers) |
| 36 | virt_rmb(); | 36 | virt_rmb(); |
| 37 | else | 37 | else |
| 38 | rmb(); | 38 | dma_rmb(); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | static inline void virtio_wmb(bool weak_barriers) | 41 | static inline void virtio_wmb(bool weak_barriers) |
| @@ -43,7 +43,7 @@ static inline void virtio_wmb(bool weak_barriers) | |||
| 43 | if (weak_barriers) | 43 | if (weak_barriers) |
| 44 | virt_wmb(); | 44 | virt_wmb(); |
| 45 | else | 45 | else |
| 46 | wmb(); | 46 | dma_wmb(); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | static inline void virtio_store_mb(bool weak_barriers, | 49 | static inline void virtio_store_mb(bool weak_barriers, |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 53ce8176c313..ec9d6bc65855 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
| @@ -271,7 +271,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, | |||
| 271 | int flags); | 271 | int flags); |
| 272 | int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, | 272 | int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg, |
| 273 | size_t len, int flags); | 273 | size_t len, int flags); |
| 274 | __poll_t bt_sock_poll_mask(struct socket *sock, __poll_t events); | 274 | __poll_t bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait); |
| 275 | int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | 275 | int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); |
| 276 | int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); | 276 | int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); |
| 277 | int bt_sock_wait_ready(struct sock *sk, unsigned long flags); | 277 | int bt_sock_wait_ready(struct sock *sk, unsigned long flags); |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 5cba71d2dc44..71b9043aa0e7 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
| @@ -170,6 +170,7 @@ struct fib6_info { | |||
| 170 | unused:3; | 170 | unused:3; |
| 171 | 171 | ||
| 172 | struct fib6_nh fib6_nh; | 172 | struct fib6_nh fib6_nh; |
| 173 | struct rcu_head rcu; | ||
| 173 | }; | 174 | }; |
| 174 | 175 | ||
| 175 | struct rt6_info { | 176 | struct rt6_info { |
| @@ -273,7 +274,7 @@ static inline void ip6_rt_put(struct rt6_info *rt) | |||
| 273 | } | 274 | } |
| 274 | 275 | ||
| 275 | struct fib6_info *fib6_info_alloc(gfp_t gfp_flags); | 276 | struct fib6_info *fib6_info_alloc(gfp_t gfp_flags); |
| 276 | void fib6_info_destroy(struct fib6_info *f6i); | 277 | void fib6_info_destroy_rcu(struct rcu_head *head); |
| 277 | 278 | ||
| 278 | static inline void fib6_info_hold(struct fib6_info *f6i) | 279 | static inline void fib6_info_hold(struct fib6_info *f6i) |
| 279 | { | 280 | { |
| @@ -283,7 +284,7 @@ static inline void fib6_info_hold(struct fib6_info *f6i) | |||
| 283 | static inline void fib6_info_release(struct fib6_info *f6i) | 284 | static inline void fib6_info_release(struct fib6_info *f6i) |
| 284 | { | 285 | { |
| 285 | if (f6i && atomic_dec_and_test(&f6i->fib6_ref)) | 286 | if (f6i && atomic_dec_and_test(&f6i->fib6_ref)) |
| 286 | fib6_info_destroy(f6i); | 287 | call_rcu(&f6i->rcu, fib6_info_destroy_rcu); |
| 287 | } | 288 | } |
| 288 | 289 | ||
| 289 | enum fib6_walk_state { | 290 | enum fib6_walk_state { |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 6d6e21dee462..a0bec23c6d5e 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -631,6 +631,7 @@ struct ip_vs_service { | |||
| 631 | 631 | ||
| 632 | /* alternate persistence engine */ | 632 | /* alternate persistence engine */ |
| 633 | struct ip_vs_pe __rcu *pe; | 633 | struct ip_vs_pe __rcu *pe; |
| 634 | int conntrack_afmask; | ||
| 634 | 635 | ||
| 635 | struct rcu_head rcu_head; | 636 | struct rcu_head rcu_head; |
| 636 | }; | 637 | }; |
| @@ -1611,6 +1612,35 @@ static inline bool ip_vs_conn_uses_conntrack(struct ip_vs_conn *cp, | |||
| 1611 | return false; | 1612 | return false; |
| 1612 | } | 1613 | } |
| 1613 | 1614 | ||
| 1615 | static inline int ip_vs_register_conntrack(struct ip_vs_service *svc) | ||
| 1616 | { | ||
| 1617 | #if IS_ENABLED(CONFIG_NF_CONNTRACK) | ||
| 1618 | int afmask = (svc->af == AF_INET6) ? 2 : 1; | ||
| 1619 | int ret = 0; | ||
| 1620 | |||
| 1621 | if (!(svc->conntrack_afmask & afmask)) { | ||
| 1622 | ret = nf_ct_netns_get(svc->ipvs->net, svc->af); | ||
| 1623 | if (ret >= 0) | ||
| 1624 | svc->conntrack_afmask |= afmask; | ||
| 1625 | } | ||
| 1626 | return ret; | ||
| 1627 | #else | ||
| 1628 | return 0; | ||
| 1629 | #endif | ||
| 1630 | } | ||
| 1631 | |||
| 1632 | static inline void ip_vs_unregister_conntrack(struct ip_vs_service *svc) | ||
| 1633 | { | ||
| 1634 | #if IS_ENABLED(CONFIG_NF_CONNTRACK) | ||
| 1635 | int afmask = (svc->af == AF_INET6) ? 2 : 1; | ||
| 1636 | |||
| 1637 | if (svc->conntrack_afmask & afmask) { | ||
| 1638 | nf_ct_netns_put(svc->ipvs->net, svc->af); | ||
| 1639 | svc->conntrack_afmask &= ~afmask; | ||
| 1640 | } | ||
| 1641 | #endif | ||
| 1642 | } | ||
| 1643 | |||
| 1614 | static inline int | 1644 | static inline int |
| 1615 | ip_vs_dest_conn_overhead(struct ip_vs_dest *dest) | 1645 | ip_vs_dest_conn_overhead(struct ip_vs_dest *dest) |
| 1616 | { | 1646 | { |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index b0eaeb02d46d..f4c21b5a1242 100644 --- a/include/net/iucv/af_iucv.h +++ b/include/net/iucv/af_iucv.h | |||
| @@ -153,6 +153,8 @@ struct iucv_sock_list { | |||
| 153 | atomic_t autobind_name; | 153 | atomic_t autobind_name; |
| 154 | }; | 154 | }; |
| 155 | 155 | ||
| 156 | __poll_t iucv_sock_poll(struct file *file, struct socket *sock, | ||
| 157 | poll_table *wait); | ||
| 156 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); | 158 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); |
| 157 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); | 159 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); |
| 158 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); | 160 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 47e35cce3b64..a71264d75d7f 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -128,6 +128,7 @@ struct net { | |||
| 128 | #endif | 128 | #endif |
| 129 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 129 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 130 | struct netns_nf_frag nf_frag; | 130 | struct netns_nf_frag nf_frag; |
| 131 | struct ctl_table_header *nf_frag_frags_hdr; | ||
| 131 | #endif | 132 | #endif |
| 132 | struct sock *nfnl; | 133 | struct sock *nfnl; |
| 133 | struct sock *nfnl_stash; | 134 | struct sock *nfnl_stash; |
diff --git a/include/net/netfilter/nf_conntrack_count.h b/include/net/netfilter/nf_conntrack_count.h index 1910b6572430..3a188a0923a3 100644 --- a/include/net/netfilter/nf_conntrack_count.h +++ b/include/net/netfilter/nf_conntrack_count.h | |||
| @@ -20,7 +20,8 @@ unsigned int nf_conncount_lookup(struct net *net, struct hlist_head *head, | |||
| 20 | bool *addit); | 20 | bool *addit); |
| 21 | 21 | ||
| 22 | bool nf_conncount_add(struct hlist_head *head, | 22 | bool nf_conncount_add(struct hlist_head *head, |
| 23 | const struct nf_conntrack_tuple *tuple); | 23 | const struct nf_conntrack_tuple *tuple, |
| 24 | const struct nf_conntrack_zone *zone); | ||
| 24 | 25 | ||
| 25 | void nf_conncount_cache_free(struct hlist_head *hhead); | 26 | void nf_conncount_cache_free(struct hlist_head *hhead); |
| 26 | 27 | ||
diff --git a/include/net/netfilter/nft_dup.h b/include/net/netfilter/nft_dup.h deleted file mode 100644 index 4d9d512984b2..000000000000 --- a/include/net/netfilter/nft_dup.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef _NFT_DUP_H_ | ||
| 3 | #define _NFT_DUP_H_ | ||
| 4 | |||
| 5 | struct nft_dup_inet { | ||
| 6 | enum nft_registers sreg_addr:8; | ||
| 7 | enum nft_registers sreg_dev:8; | ||
| 8 | }; | ||
| 9 | |||
| 10 | #endif /* _NFT_DUP_H_ */ | ||
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index c978a31b0f84..762ac9931b62 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h | |||
| @@ -109,7 +109,6 @@ struct netns_ipv6 { | |||
| 109 | 109 | ||
| 110 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 110 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 111 | struct netns_nf_frag { | 111 | struct netns_nf_frag { |
| 112 | struct netns_sysctl_ipv6 sysctl; | ||
| 113 | struct netns_frags frags; | 112 | struct netns_frags frags; |
| 114 | }; | 113 | }; |
| 115 | #endif | 114 | #endif |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index a3c1a2c47cd4..20b059574e60 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
| @@ -111,6 +111,11 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q, | |||
| 111 | { | 111 | { |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static inline bool tcf_block_shared(struct tcf_block *block) | ||
| 115 | { | ||
| 116 | return false; | ||
| 117 | } | ||
| 118 | |||
| 114 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) | 119 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) |
| 115 | { | 120 | { |
| 116 | return NULL; | 121 | return NULL; |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 30b3e2fe240a..8c2caa370e0f 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
| @@ -109,7 +109,8 @@ int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb); | |||
| 109 | int sctp_inet_listen(struct socket *sock, int backlog); | 109 | int sctp_inet_listen(struct socket *sock, int backlog); |
| 110 | void sctp_write_space(struct sock *sk); | 110 | void sctp_write_space(struct sock *sk); |
| 111 | void sctp_data_ready(struct sock *sk); | 111 | void sctp_data_ready(struct sock *sk); |
| 112 | __poll_t sctp_poll_mask(struct socket *sock, __poll_t events); | 112 | __poll_t sctp_poll(struct file *file, struct socket *sock, |
| 113 | poll_table *wait); | ||
| 113 | void sctp_sock_rfree(struct sk_buff *skb); | 114 | void sctp_sock_rfree(struct sk_buff *skb); |
| 114 | void sctp_copy_sock(struct sock *newsk, struct sock *sk, | 115 | void sctp_copy_sock(struct sock *newsk, struct sock *sk, |
| 115 | struct sctp_association *asoc); | 116 | struct sctp_association *asoc); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index ebf809eed33a..dbe1b911a24d 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -1133,6 +1133,11 @@ struct sctp_input_cb { | |||
| 1133 | }; | 1133 | }; |
| 1134 | #define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0])) | 1134 | #define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0])) |
| 1135 | 1135 | ||
| 1136 | struct sctp_output_cb { | ||
| 1137 | struct sk_buff *last; | ||
| 1138 | }; | ||
| 1139 | #define SCTP_OUTPUT_CB(__skb) ((struct sctp_output_cb *)&((__skb)->cb[0])) | ||
| 1140 | |||
| 1136 | static inline const struct sk_buff *sctp_gso_headskb(const struct sk_buff *skb) | 1141 | static inline const struct sk_buff *sctp_gso_headskb(const struct sk_buff *skb) |
| 1137 | { | 1142 | { |
| 1138 | const struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk; | 1143 | const struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 0448e7c5d2b4..800582b5dd54 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -388,7 +388,8 @@ bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst); | |||
| 388 | void tcp_close(struct sock *sk, long timeout); | 388 | void tcp_close(struct sock *sk, long timeout); |
| 389 | void tcp_init_sock(struct sock *sk); | 389 | void tcp_init_sock(struct sock *sk); |
| 390 | void tcp_init_transfer(struct sock *sk, int bpf_op); | 390 | void tcp_init_transfer(struct sock *sk, int bpf_op); |
| 391 | __poll_t tcp_poll_mask(struct socket *sock, __poll_t events); | 391 | __poll_t tcp_poll(struct file *file, struct socket *sock, |
| 392 | struct poll_table_struct *wait); | ||
| 392 | int tcp_getsockopt(struct sock *sk, int level, int optname, | 393 | int tcp_getsockopt(struct sock *sk, int level, int optname, |
| 393 | char __user *optval, int __user *optlen); | 394 | char __user *optval, int __user *optlen); |
| 394 | int tcp_setsockopt(struct sock *sk, int level, int optname, | 395 | int tcp_setsockopt(struct sock *sk, int level, int optname, |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index c4f5caaf3778..f6a3543e5247 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
| @@ -45,8 +45,15 @@ int ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr *msg, | |||
| 45 | struct flowi6 *fl6, struct ipcm6_cookie *ipc6, | 45 | struct flowi6 *fl6, struct ipcm6_cookie *ipc6, |
| 46 | struct sockcm_cookie *sockc); | 46 | struct sockcm_cookie *sockc); |
| 47 | 47 | ||
| 48 | void ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, | 48 | void __ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, |
| 49 | __u16 srcp, __u16 destp, int bucket); | 49 | __u16 srcp, __u16 destp, int rqueue, int bucket); |
| 50 | static inline void | ||
| 51 | ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, __u16 srcp, | ||
| 52 | __u16 destp, int bucket) | ||
| 53 | { | ||
| 54 | __ip6_dgram_sock_seq_show(seq, sp, srcp, destp, sk_rmem_alloc_get(sp), | ||
| 55 | bucket); | ||
| 56 | } | ||
| 50 | 57 | ||
| 51 | #define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) | 58 | #define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006) |
| 52 | 59 | ||
diff --git a/include/net/udp.h b/include/net/udp.h index 7ba0ed252c52..81afdacd4fff 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
| @@ -247,6 +247,11 @@ static inline __be16 udp_flow_src_port(struct net *net, struct sk_buff *skb, | |||
| 247 | return htons((((u64) hash * (max - min)) >> 32) + min); | 247 | return htons((((u64) hash * (max - min)) >> 32) + min); |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | static inline int udp_rqueue_get(struct sock *sk) | ||
| 251 | { | ||
| 252 | return sk_rmem_alloc_get(sk) - READ_ONCE(udp_sk(sk)->forward_deficit); | ||
| 253 | } | ||
| 254 | |||
| 250 | /* net/ipv4/udp.c */ | 255 | /* net/ipv4/udp.c */ |
| 251 | void udp_destruct_sock(struct sock *sk); | 256 | void udp_destruct_sock(struct sock *sk); |
| 252 | void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len); | 257 | void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len); |
| @@ -280,7 +285,7 @@ int udp_init_sock(struct sock *sk); | |||
| 280 | int udp_pre_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); | 285 | int udp_pre_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
| 281 | int __udp_disconnect(struct sock *sk, int flags); | 286 | int __udp_disconnect(struct sock *sk, int flags); |
| 282 | int udp_disconnect(struct sock *sk, int flags); | 287 | int udp_disconnect(struct sock *sk, int flags); |
| 283 | __poll_t udp_poll_mask(struct socket *sock, __poll_t events); | 288 | __poll_t udp_poll(struct file *file, struct socket *sock, poll_table *wait); |
| 284 | struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, | 289 | struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, |
| 285 | netdev_features_t features, | 290 | netdev_features_t features, |
| 286 | bool is_ipv6); | 291 | bool is_ipv6); |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 2043e1a8f851..6c003995347a 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -2093,10 +2093,7 @@ struct ib_flow_attr { | |||
| 2093 | u32 flags; | 2093 | u32 flags; |
| 2094 | u8 num_of_specs; | 2094 | u8 num_of_specs; |
| 2095 | u8 port; | 2095 | u8 port; |
| 2096 | /* Following are the optional layers according to user request | 2096 | union ib_flow_spec flows[]; |
| 2097 | * struct ib_flow_spec_xxx | ||
| 2098 | * struct ib_flow_spec_yyy | ||
| 2099 | */ | ||
| 2100 | }; | 2097 | }; |
| 2101 | 2098 | ||
| 2102 | struct ib_flow { | 2099 | struct ib_flow { |
| @@ -3394,11 +3391,14 @@ int ib_process_cq_direct(struct ib_cq *cq, int budget); | |||
| 3394 | * | 3391 | * |
| 3395 | * Users can examine the cq structure to determine the actual CQ size. | 3392 | * Users can examine the cq structure to determine the actual CQ size. |
| 3396 | */ | 3393 | */ |
| 3397 | struct ib_cq *ib_create_cq(struct ib_device *device, | 3394 | struct ib_cq *__ib_create_cq(struct ib_device *device, |
| 3398 | ib_comp_handler comp_handler, | 3395 | ib_comp_handler comp_handler, |
| 3399 | void (*event_handler)(struct ib_event *, void *), | 3396 | void (*event_handler)(struct ib_event *, void *), |
| 3400 | void *cq_context, | 3397 | void *cq_context, |
| 3401 | const struct ib_cq_init_attr *cq_attr); | 3398 | const struct ib_cq_init_attr *cq_attr, |
| 3399 | const char *caller); | ||
| 3400 | #define ib_create_cq(device, cmp_hndlr, evt_hndlr, cq_ctxt, cq_attr) \ | ||
| 3401 | __ib_create_cq((device), (cmp_hndlr), (evt_hndlr), (cq_ctxt), (cq_attr), KBUILD_MODNAME) | ||
| 3402 | 3402 | ||
| 3403 | /** | 3403 | /** |
| 3404 | * ib_resize_cq - Modifies the capacity of the CQ. | 3404 | * ib_resize_cq - Modifies the capacity of the CQ. |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 7ae177c8e399..4c36af6edd79 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
| @@ -15,7 +15,7 @@ struct scsi_cmnd; | |||
| 15 | struct scsi_lun; | 15 | struct scsi_lun; |
| 16 | struct scsi_sense_hdr; | 16 | struct scsi_sense_hdr; |
| 17 | 17 | ||
| 18 | typedef unsigned int __bitwise blist_flags_t; | 18 | typedef __u64 __bitwise blist_flags_t; |
| 19 | 19 | ||
| 20 | struct scsi_mode_data { | 20 | struct scsi_mode_data { |
| 21 | __u32 length; | 21 | __u32 length; |
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index ea67c32e870e..3fdb322d4c4b 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h | |||
| @@ -6,55 +6,80 @@ | |||
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | /* Only scan LUN 0 */ | 8 | /* Only scan LUN 0 */ |
| 9 | #define BLIST_NOLUN ((__force blist_flags_t)(1 << 0)) | 9 | #define BLIST_NOLUN ((__force blist_flags_t)(1ULL << 0)) |
| 10 | /* Known to have LUNs, force scanning. | 10 | /* Known to have LUNs, force scanning. |
| 11 | * DEPRECATED: Use max_luns=N */ | 11 | * DEPRECATED: Use max_luns=N */ |
| 12 | #define BLIST_FORCELUN ((__force blist_flags_t)(1 << 1)) | 12 | #define BLIST_FORCELUN ((__force blist_flags_t)(1ULL << 1)) |
| 13 | /* Flag for broken handshaking */ | 13 | /* Flag for broken handshaking */ |
| 14 | #define BLIST_BORKEN ((__force blist_flags_t)(1 << 2)) | 14 | #define BLIST_BORKEN ((__force blist_flags_t)(1ULL << 2)) |
| 15 | /* unlock by special command */ | 15 | /* unlock by special command */ |
| 16 | #define BLIST_KEY ((__force blist_flags_t)(1 << 3)) | 16 | #define BLIST_KEY ((__force blist_flags_t)(1ULL << 3)) |
| 17 | /* Do not use LUNs in parallel */ | 17 | /* Do not use LUNs in parallel */ |
| 18 | #define BLIST_SINGLELUN ((__force blist_flags_t)(1 << 4)) | 18 | #define BLIST_SINGLELUN ((__force blist_flags_t)(1ULL << 4)) |
| 19 | /* Buggy Tagged Command Queuing */ | 19 | /* Buggy Tagged Command Queuing */ |
| 20 | #define BLIST_NOTQ ((__force blist_flags_t)(1 << 5)) | 20 | #define BLIST_NOTQ ((__force blist_flags_t)(1ULL << 5)) |
| 21 | /* Non consecutive LUN numbering */ | 21 | /* Non consecutive LUN numbering */ |
| 22 | #define BLIST_SPARSELUN ((__force blist_flags_t)(1 << 6)) | 22 | #define BLIST_SPARSELUN ((__force blist_flags_t)(1ULL << 6)) |
| 23 | /* Avoid LUNS >= 5 */ | 23 | /* Avoid LUNS >= 5 */ |
| 24 | #define BLIST_MAX5LUN ((__force blist_flags_t)(1 << 7)) | 24 | #define BLIST_MAX5LUN ((__force blist_flags_t)(1ULL << 7)) |
| 25 | /* Treat as (removable) CD-ROM */ | 25 | /* Treat as (removable) CD-ROM */ |
| 26 | #define BLIST_ISROM ((__force blist_flags_t)(1 << 8)) | 26 | #define BLIST_ISROM ((__force blist_flags_t)(1ULL << 8)) |
| 27 | /* LUNs past 7 on a SCSI-2 device */ | 27 | /* LUNs past 7 on a SCSI-2 device */ |
| 28 | #define BLIST_LARGELUN ((__force blist_flags_t)(1 << 9)) | 28 | #define BLIST_LARGELUN ((__force blist_flags_t)(1ULL << 9)) |
| 29 | /* override additional length field */ | 29 | /* override additional length field */ |
| 30 | #define BLIST_INQUIRY_36 ((__force blist_flags_t)(1 << 10)) | 30 | #define BLIST_INQUIRY_36 ((__force blist_flags_t)(1ULL << 10)) |
| 31 | #define __BLIST_UNUSED_11 ((__force blist_flags_t)(1ULL << 11)) | ||
| 31 | /* do not do automatic start on add */ | 32 | /* do not do automatic start on add */ |
| 32 | #define BLIST_NOSTARTONADD ((__force blist_flags_t)(1 << 12)) | 33 | #define BLIST_NOSTARTONADD ((__force blist_flags_t)(1ULL << 12)) |
| 34 | #define __BLIST_UNUSED_13 ((__force blist_flags_t)(1ULL << 13)) | ||
| 35 | #define __BLIST_UNUSED_14 ((__force blist_flags_t)(1ULL << 14)) | ||
| 36 | #define __BLIST_UNUSED_15 ((__force blist_flags_t)(1ULL << 15)) | ||
| 37 | #define __BLIST_UNUSED_16 ((__force blist_flags_t)(1ULL << 16)) | ||
| 33 | /* try REPORT_LUNS even for SCSI-2 devs (if HBA supports more than 8 LUNs) */ | 38 | /* try REPORT_LUNS even for SCSI-2 devs (if HBA supports more than 8 LUNs) */ |
| 34 | #define BLIST_REPORTLUN2 ((__force blist_flags_t)(1 << 17)) | 39 | #define BLIST_REPORTLUN2 ((__force blist_flags_t)(1ULL << 17)) |
| 35 | /* don't try REPORT_LUNS scan (SCSI-3 devs) */ | 40 | /* don't try REPORT_LUNS scan (SCSI-3 devs) */ |
| 36 | #define BLIST_NOREPORTLUN ((__force blist_flags_t)(1 << 18)) | 41 | #define BLIST_NOREPORTLUN ((__force blist_flags_t)(1ULL << 18)) |
| 37 | /* don't use PREVENT-ALLOW commands */ | 42 | /* don't use PREVENT-ALLOW commands */ |
| 38 | #define BLIST_NOT_LOCKABLE ((__force blist_flags_t)(1 << 19)) | 43 | #define BLIST_NOT_LOCKABLE ((__force blist_flags_t)(1ULL << 19)) |
| 39 | /* device is actually for RAID config */ | 44 | /* device is actually for RAID config */ |
| 40 | #define BLIST_NO_ULD_ATTACH ((__force blist_flags_t)(1 << 20)) | 45 | #define BLIST_NO_ULD_ATTACH ((__force blist_flags_t)(1ULL << 20)) |
| 41 | /* select without ATN */ | 46 | /* select without ATN */ |
| 42 | #define BLIST_SELECT_NO_ATN ((__force blist_flags_t)(1 << 21)) | 47 | #define BLIST_SELECT_NO_ATN ((__force blist_flags_t)(1ULL << 21)) |
| 43 | /* retry HARDWARE_ERROR */ | 48 | /* retry HARDWARE_ERROR */ |
| 44 | #define BLIST_RETRY_HWERROR ((__force blist_flags_t)(1 << 22)) | 49 | #define BLIST_RETRY_HWERROR ((__force blist_flags_t)(1ULL << 22)) |
| 45 | /* maximum 512 sector cdb length */ | 50 | /* maximum 512 sector cdb length */ |
| 46 | #define BLIST_MAX_512 ((__force blist_flags_t)(1 << 23)) | 51 | #define BLIST_MAX_512 ((__force blist_flags_t)(1ULL << 23)) |
| 52 | #define __BLIST_UNUSED_24 ((__force blist_flags_t)(1ULL << 24)) | ||
| 47 | /* Disable T10 PI (DIF) */ | 53 | /* Disable T10 PI (DIF) */ |
| 48 | #define BLIST_NO_DIF ((__force blist_flags_t)(1 << 25)) | 54 | #define BLIST_NO_DIF ((__force blist_flags_t)(1ULL << 25)) |
| 49 | /* Ignore SBC-3 VPD pages */ | 55 | /* Ignore SBC-3 VPD pages */ |
| 50 | #define BLIST_SKIP_VPD_PAGES ((__force blist_flags_t)(1 << 26)) | 56 | #define BLIST_SKIP_VPD_PAGES ((__force blist_flags_t)(1ULL << 26)) |
| 57 | #define __BLIST_UNUSED_27 ((__force blist_flags_t)(1ULL << 27)) | ||
| 51 | /* Attempt to read VPD pages */ | 58 | /* Attempt to read VPD pages */ |
| 52 | #define BLIST_TRY_VPD_PAGES ((__force blist_flags_t)(1 << 28)) | 59 | #define BLIST_TRY_VPD_PAGES ((__force blist_flags_t)(1ULL << 28)) |
| 53 | /* don't try to issue RSOC */ | 60 | /* don't try to issue RSOC */ |
| 54 | #define BLIST_NO_RSOC ((__force blist_flags_t)(1 << 29)) | 61 | #define BLIST_NO_RSOC ((__force blist_flags_t)(1ULL << 29)) |
| 55 | /* maximum 1024 sector cdb length */ | 62 | /* maximum 1024 sector cdb length */ |
| 56 | #define BLIST_MAX_1024 ((__force blist_flags_t)(1 << 30)) | 63 | #define BLIST_MAX_1024 ((__force blist_flags_t)(1ULL << 30)) |
| 57 | /* Use UNMAP limit for WRITE SAME */ | 64 | /* Use UNMAP limit for WRITE SAME */ |
| 58 | #define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1 << 31)) | 65 | #define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1ULL << 31)) |
| 66 | /* Always retry ABORTED_COMMAND with Internal Target Failure */ | ||
| 67 | #define BLIST_RETRY_ITF ((__force blist_flags_t)(1ULL << 32)) | ||
| 68 | /* Always retry ABORTED_COMMAND with ASC 0xc1 */ | ||
| 69 | #define BLIST_RETRY_ASC_C1 ((__force blist_flags_t)(1ULL << 33)) | ||
| 70 | |||
| 71 | #define __BLIST_LAST_USED BLIST_RETRY_ASC_C1 | ||
| 72 | |||
| 73 | #define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \ | ||
| 74 | (__force blist_flags_t) \ | ||
| 75 | ((__force __u64)__BLIST_LAST_USED - 1ULL))) | ||
| 76 | #define __BLIST_UNUSED_MASK (__BLIST_UNUSED_11 | \ | ||
| 77 | __BLIST_UNUSED_13 | \ | ||
| 78 | __BLIST_UNUSED_14 | \ | ||
| 79 | __BLIST_UNUSED_15 | \ | ||
| 80 | __BLIST_UNUSED_16 | \ | ||
| 81 | __BLIST_UNUSED_24 | \ | ||
| 82 | __BLIST_UNUSED_27 | \ | ||
| 83 | __BLIST_HIGH_UNUSED) | ||
| 59 | 84 | ||
| 60 | #endif | 85 | #endif |
diff --git a/include/soc/qcom/cmd-db.h b/include/soc/qcom/cmd-db.h new file mode 100644 index 000000000000..578180cbc134 --- /dev/null +++ b/include/soc/qcom/cmd-db.h | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. */ | ||
| 3 | |||
| 4 | #ifndef __QCOM_COMMAND_DB_H__ | ||
| 5 | #define __QCOM_COMMAND_DB_H__ | ||
| 6 | |||
| 7 | |||
| 8 | enum cmd_db_hw_type { | ||
| 9 | CMD_DB_HW_INVALID = 0, | ||
| 10 | CMD_DB_HW_MIN = 3, | ||
| 11 | CMD_DB_HW_ARC = CMD_DB_HW_MIN, | ||
| 12 | CMD_DB_HW_VRM = 4, | ||
| 13 | CMD_DB_HW_BCM = 5, | ||
| 14 | CMD_DB_HW_MAX = CMD_DB_HW_BCM, | ||
| 15 | CMD_DB_HW_ALL = 0xff, | ||
| 16 | }; | ||
| 17 | |||
| 18 | #if IS_ENABLED(CONFIG_QCOM_COMMAND_DB) | ||
| 19 | u32 cmd_db_read_addr(const char *resource_id); | ||
| 20 | |||
| 21 | int cmd_db_read_aux_data(const char *resource_id, u8 *data, size_t len); | ||
| 22 | |||
| 23 | size_t cmd_db_read_aux_data_len(const char *resource_id); | ||
| 24 | |||
| 25 | enum cmd_db_hw_type cmd_db_read_slave_id(const char *resource_id); | ||
| 26 | |||
| 27 | int cmd_db_ready(void); | ||
| 28 | #else | ||
| 29 | static inline u32 cmd_db_read_addr(const char *resource_id) | ||
| 30 | { return 0; } | ||
| 31 | |||
| 32 | static inline int cmd_db_read_aux_data(const char *resource_id, u8 *data, | ||
| 33 | size_t len) | ||
| 34 | { return -ENODEV; } | ||
| 35 | |||
| 36 | static inline size_t cmd_db_read_aux_data_len(const char *resource_id) | ||
| 37 | { return -ENODEV; } | ||
| 38 | |||
| 39 | static inline enum cmd_db_hw_type cmd_db_read_slave_id(const char *resource_id) | ||
| 40 | { return -ENODEV; } | ||
| 41 | |||
| 42 | static inline int cmd_db_ready(void) | ||
| 43 | { return -ENODEV; } | ||
| 44 | #endif /* CONFIG_QCOM_COMMAND_DB */ | ||
| 45 | #endif /* __QCOM_COMMAND_DB_H__ */ | ||
diff --git a/include/soc/tegra/cpuidle.h b/include/soc/tegra/cpuidle.h index 1fae9c7800d1..b6cf32211520 100644 --- a/include/soc/tegra/cpuidle.h +++ b/include/soc/tegra/cpuidle.h | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #ifndef __SOC_TEGRA_CPUIDLE_H__ | 14 | #ifndef __SOC_TEGRA_CPUIDLE_H__ |
| 15 | #define __SOC_TEGRA_CPUIDLE_H__ | 15 | #define __SOC_TEGRA_CPUIDLE_H__ |
| 16 | 16 | ||
| 17 | #if defined(CONFIG_ARM) && defined(CONFIG_CPU_IDLE) | 17 | #if defined(CONFIG_ARM) && defined(CONFIG_ARCH_TEGRA) && defined(CONFIG_CPU_IDLE) |
| 18 | void tegra_cpuidle_pcie_irqs_in_use(void); | 18 | void tegra_cpuidle_pcie_irqs_in_use(void); |
| 19 | #else | 19 | #else |
| 20 | static inline void tegra_cpuidle_pcie_irqs_in_use(void) | 20 | static inline void tegra_cpuidle_pcie_irqs_in_use(void) |
diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h index 233bae954970..b43f37fea096 100644 --- a/include/soc/tegra/mc.h +++ b/include/soc/tegra/mc.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #ifndef __SOC_TEGRA_MC_H__ | 9 | #ifndef __SOC_TEGRA_MC_H__ |
| 10 | #define __SOC_TEGRA_MC_H__ | 10 | #define __SOC_TEGRA_MC_H__ |
| 11 | 11 | ||
| 12 | #include <linux/reset-controller.h> | ||
| 12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 13 | 14 | ||
| 14 | struct clk; | 15 | struct clk; |
| @@ -95,6 +96,30 @@ static inline void tegra_smmu_remove(struct tegra_smmu *smmu) | |||
| 95 | } | 96 | } |
| 96 | #endif | 97 | #endif |
| 97 | 98 | ||
| 99 | struct tegra_mc_reset { | ||
| 100 | const char *name; | ||
| 101 | unsigned long id; | ||
| 102 | unsigned int control; | ||
| 103 | unsigned int status; | ||
| 104 | unsigned int reset; | ||
| 105 | unsigned int bit; | ||
| 106 | }; | ||
| 107 | |||
| 108 | struct tegra_mc_reset_ops { | ||
| 109 | int (*hotreset_assert)(struct tegra_mc *mc, | ||
| 110 | const struct tegra_mc_reset *rst); | ||
| 111 | int (*hotreset_deassert)(struct tegra_mc *mc, | ||
| 112 | const struct tegra_mc_reset *rst); | ||
| 113 | int (*block_dma)(struct tegra_mc *mc, | ||
| 114 | const struct tegra_mc_reset *rst); | ||
| 115 | bool (*dma_idling)(struct tegra_mc *mc, | ||
| 116 | const struct tegra_mc_reset *rst); | ||
| 117 | int (*unblock_dma)(struct tegra_mc *mc, | ||
| 118 | const struct tegra_mc_reset *rst); | ||
| 119 | int (*reset_status)(struct tegra_mc *mc, | ||
| 120 | const struct tegra_mc_reset *rst); | ||
| 121 | }; | ||
| 122 | |||
| 98 | struct tegra_mc_soc { | 123 | struct tegra_mc_soc { |
| 99 | const struct tegra_mc_client *clients; | 124 | const struct tegra_mc_client *clients; |
| 100 | unsigned int num_clients; | 125 | unsigned int num_clients; |
| @@ -108,12 +133,18 @@ struct tegra_mc_soc { | |||
| 108 | u8 client_id_mask; | 133 | u8 client_id_mask; |
| 109 | 134 | ||
| 110 | const struct tegra_smmu_soc *smmu; | 135 | const struct tegra_smmu_soc *smmu; |
| 136 | |||
| 137 | u32 intmask; | ||
| 138 | |||
| 139 | const struct tegra_mc_reset_ops *reset_ops; | ||
| 140 | const struct tegra_mc_reset *resets; | ||
| 141 | unsigned int num_resets; | ||
| 111 | }; | 142 | }; |
| 112 | 143 | ||
| 113 | struct tegra_mc { | 144 | struct tegra_mc { |
| 114 | struct device *dev; | 145 | struct device *dev; |
| 115 | struct tegra_smmu *smmu; | 146 | struct tegra_smmu *smmu; |
| 116 | void __iomem *regs; | 147 | void __iomem *regs, *regs2; |
| 117 | struct clk *clk; | 148 | struct clk *clk; |
| 118 | int irq; | 149 | int irq; |
| 119 | 150 | ||
| @@ -122,6 +153,10 @@ struct tegra_mc { | |||
| 122 | 153 | ||
| 123 | struct tegra_mc_timing *timings; | 154 | struct tegra_mc_timing *timings; |
| 124 | unsigned int num_timings; | 155 | unsigned int num_timings; |
| 156 | |||
| 157 | struct reset_controller_dev reset; | ||
| 158 | |||
| 159 | spinlock_t lock; | ||
| 125 | }; | 160 | }; |
| 126 | 161 | ||
| 127 | void tegra_mc_write_emem_configuration(struct tegra_mc *mc, unsigned long rate); | 162 | void tegra_mc_write_emem_configuration(struct tegra_mc *mc, unsigned long rate); |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 9f9f5902af38..922a39f45abc 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -143,6 +143,7 @@ enum se_cmd_flags_table { | |||
| 143 | SCF_ACK_KREF = 0x00400000, | 143 | SCF_ACK_KREF = 0x00400000, |
| 144 | SCF_USE_CPUID = 0x00800000, | 144 | SCF_USE_CPUID = 0x00800000, |
| 145 | SCF_TASK_ATTR_SET = 0x01000000, | 145 | SCF_TASK_ATTR_SET = 0x01000000, |
| 146 | SCF_TREAT_READ_AS_NORMAL = 0x02000000, | ||
| 146 | }; | 147 | }; |
| 147 | 148 | ||
| 148 | /* | 149 | /* |
diff --git a/include/trace/events/rpcrdma.h b/include/trace/events/rpcrdma.h index 50ed3f8bf534..53df203b8057 100644 --- a/include/trace/events/rpcrdma.h +++ b/include/trace/events/rpcrdma.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2017 Oracle. All rights reserved. | 3 | * Copyright (c) 2017, 2018 Oracle. All rights reserved. |
| 4 | * | ||
| 5 | * Trace point definitions for the "rpcrdma" subsystem. | ||
| 4 | */ | 6 | */ |
| 5 | #undef TRACE_SYSTEM | 7 | #undef TRACE_SYSTEM |
| 6 | #define TRACE_SYSTEM rpcrdma | 8 | #define TRACE_SYSTEM rpcrdma |
| @@ -528,24 +530,54 @@ TRACE_EVENT(xprtrdma_post_send, | |||
| 528 | 530 | ||
| 529 | TRACE_EVENT(xprtrdma_post_recv, | 531 | TRACE_EVENT(xprtrdma_post_recv, |
| 530 | TP_PROTO( | 532 | TP_PROTO( |
| 531 | const struct rpcrdma_rep *rep, | 533 | const struct ib_cqe *cqe |
| 534 | ), | ||
| 535 | |||
| 536 | TP_ARGS(cqe), | ||
| 537 | |||
| 538 | TP_STRUCT__entry( | ||
| 539 | __field(const void *, cqe) | ||
| 540 | ), | ||
| 541 | |||
| 542 | TP_fast_assign( | ||
| 543 | __entry->cqe = cqe; | ||
| 544 | ), | ||
| 545 | |||
| 546 | TP_printk("cqe=%p", | ||
| 547 | __entry->cqe | ||
| 548 | ) | ||
| 549 | ); | ||
| 550 | |||
| 551 | TRACE_EVENT(xprtrdma_post_recvs, | ||
| 552 | TP_PROTO( | ||
| 553 | const struct rpcrdma_xprt *r_xprt, | ||
| 554 | unsigned int count, | ||
| 532 | int status | 555 | int status |
| 533 | ), | 556 | ), |
| 534 | 557 | ||
| 535 | TP_ARGS(rep, status), | 558 | TP_ARGS(r_xprt, count, status), |
| 536 | 559 | ||
| 537 | TP_STRUCT__entry( | 560 | TP_STRUCT__entry( |
| 538 | __field(const void *, rep) | 561 | __field(const void *, r_xprt) |
| 562 | __field(unsigned int, count) | ||
| 539 | __field(int, status) | 563 | __field(int, status) |
| 564 | __field(int, posted) | ||
| 565 | __string(addr, rpcrdma_addrstr(r_xprt)) | ||
| 566 | __string(port, rpcrdma_portstr(r_xprt)) | ||
| 540 | ), | 567 | ), |
| 541 | 568 | ||
| 542 | TP_fast_assign( | 569 | TP_fast_assign( |
| 543 | __entry->rep = rep; | 570 | __entry->r_xprt = r_xprt; |
| 571 | __entry->count = count; | ||
| 544 | __entry->status = status; | 572 | __entry->status = status; |
| 573 | __entry->posted = r_xprt->rx_buf.rb_posted_receives; | ||
| 574 | __assign_str(addr, rpcrdma_addrstr(r_xprt)); | ||
| 575 | __assign_str(port, rpcrdma_portstr(r_xprt)); | ||
| 545 | ), | 576 | ), |
| 546 | 577 | ||
| 547 | TP_printk("rep=%p status=%d", | 578 | TP_printk("peer=[%s]:%s r_xprt=%p: %u new recvs, %d active (rc %d)", |
| 548 | __entry->rep, __entry->status | 579 | __get_str(addr), __get_str(port), __entry->r_xprt, |
| 580 | __entry->count, __entry->posted, __entry->status | ||
| 549 | ) | 581 | ) |
| 550 | ); | 582 | ); |
| 551 | 583 | ||
| @@ -584,28 +616,32 @@ TRACE_EVENT(xprtrdma_wc_send, | |||
| 584 | 616 | ||
| 585 | TRACE_EVENT(xprtrdma_wc_receive, | 617 | TRACE_EVENT(xprtrdma_wc_receive, |
| 586 | TP_PROTO( | 618 | TP_PROTO( |
| 587 | const struct rpcrdma_rep *rep, | ||
| 588 | const struct ib_wc *wc | 619 | const struct ib_wc *wc |
| 589 | ), | 620 | ), |
| 590 | 621 | ||
| 591 | TP_ARGS(rep, wc), | 622 | TP_ARGS(wc), |
| 592 | 623 | ||
| 593 | TP_STRUCT__entry( | 624 | TP_STRUCT__entry( |
| 594 | __field(const void *, rep) | 625 | __field(const void *, cqe) |
| 595 | __field(unsigned int, byte_len) | 626 | __field(u32, byte_len) |
| 596 | __field(unsigned int, status) | 627 | __field(unsigned int, status) |
| 597 | __field(unsigned int, vendor_err) | 628 | __field(u32, vendor_err) |
| 598 | ), | 629 | ), |
| 599 | 630 | ||
| 600 | TP_fast_assign( | 631 | TP_fast_assign( |
| 601 | __entry->rep = rep; | 632 | __entry->cqe = wc->wr_cqe; |
| 602 | __entry->byte_len = wc->byte_len; | ||
| 603 | __entry->status = wc->status; | 633 | __entry->status = wc->status; |
| 604 | __entry->vendor_err = __entry->status ? wc->vendor_err : 0; | 634 | if (wc->status) { |
| 635 | __entry->byte_len = 0; | ||
| 636 | __entry->vendor_err = wc->vendor_err; | ||
| 637 | } else { | ||
| 638 | __entry->byte_len = wc->byte_len; | ||
| 639 | __entry->vendor_err = 0; | ||
| 640 | } | ||
| 605 | ), | 641 | ), |
| 606 | 642 | ||
| 607 | TP_printk("rep=%p, %u bytes: %s (%u/0x%x)", | 643 | TP_printk("cqe=%p %u bytes: %s (%u/0x%x)", |
| 608 | __entry->rep, __entry->byte_len, | 644 | __entry->cqe, __entry->byte_len, |
| 609 | rdma_show_wc_status(__entry->status), | 645 | rdma_show_wc_status(__entry->status), |
| 610 | __entry->status, __entry->vendor_err | 646 | __entry->status, __entry->vendor_err |
| 611 | ) | 647 | ) |
| @@ -616,6 +652,7 @@ DEFINE_FRWR_DONE_EVENT(xprtrdma_wc_li); | |||
| 616 | DEFINE_FRWR_DONE_EVENT(xprtrdma_wc_li_wake); | 652 | DEFINE_FRWR_DONE_EVENT(xprtrdma_wc_li_wake); |
| 617 | 653 | ||
| 618 | DEFINE_MR_EVENT(xprtrdma_localinv); | 654 | DEFINE_MR_EVENT(xprtrdma_localinv); |
| 655 | DEFINE_MR_EVENT(xprtrdma_dma_map); | ||
| 619 | DEFINE_MR_EVENT(xprtrdma_dma_unmap); | 656 | DEFINE_MR_EVENT(xprtrdma_dma_unmap); |
| 620 | DEFINE_MR_EVENT(xprtrdma_remoteinv); | 657 | DEFINE_MR_EVENT(xprtrdma_remoteinv); |
| 621 | DEFINE_MR_EVENT(xprtrdma_recover_mr); | 658 | DEFINE_MR_EVENT(xprtrdma_recover_mr); |
| @@ -799,7 +836,6 @@ TRACE_EVENT(xprtrdma_allocate, | |||
| 799 | __field(unsigned int, task_id) | 836 | __field(unsigned int, task_id) |
| 800 | __field(unsigned int, client_id) | 837 | __field(unsigned int, client_id) |
| 801 | __field(const void *, req) | 838 | __field(const void *, req) |
| 802 | __field(const void *, rep) | ||
| 803 | __field(size_t, callsize) | 839 | __field(size_t, callsize) |
| 804 | __field(size_t, rcvsize) | 840 | __field(size_t, rcvsize) |
| 805 | ), | 841 | ), |
| @@ -808,15 +844,13 @@ TRACE_EVENT(xprtrdma_allocate, | |||
| 808 | __entry->task_id = task->tk_pid; | 844 | __entry->task_id = task->tk_pid; |
| 809 | __entry->client_id = task->tk_client->cl_clid; | 845 | __entry->client_id = task->tk_client->cl_clid; |
| 810 | __entry->req = req; | 846 | __entry->req = req; |
| 811 | __entry->rep = req ? req->rl_reply : NULL; | ||
| 812 | __entry->callsize = task->tk_rqstp->rq_callsize; | 847 | __entry->callsize = task->tk_rqstp->rq_callsize; |
| 813 | __entry->rcvsize = task->tk_rqstp->rq_rcvsize; | 848 | __entry->rcvsize = task->tk_rqstp->rq_rcvsize; |
| 814 | ), | 849 | ), |
| 815 | 850 | ||
| 816 | TP_printk("task:%u@%u req=%p rep=%p (%zu, %zu)", | 851 | TP_printk("task:%u@%u req=%p (%zu, %zu)", |
| 817 | __entry->task_id, __entry->client_id, | 852 | __entry->task_id, __entry->client_id, |
| 818 | __entry->req, __entry->rep, | 853 | __entry->req, __entry->callsize, __entry->rcvsize |
| 819 | __entry->callsize, __entry->rcvsize | ||
| 820 | ) | 854 | ) |
| 821 | ); | 855 | ); |
| 822 | 856 | ||
| @@ -848,8 +882,6 @@ TRACE_EVENT(xprtrdma_rpc_done, | |||
| 848 | ) | 882 | ) |
| 849 | ); | 883 | ); |
| 850 | 884 | ||
| 851 | DEFINE_RXPRT_EVENT(xprtrdma_noreps); | ||
| 852 | |||
| 853 | /** | 885 | /** |
| 854 | ** Callback events | 886 | ** Callback events |
| 855 | **/ | 887 | **/ |
| @@ -885,6 +917,586 @@ TRACE_EVENT(xprtrdma_cb_setup, | |||
| 885 | DEFINE_CB_EVENT(xprtrdma_cb_call); | 917 | DEFINE_CB_EVENT(xprtrdma_cb_call); |
| 886 | DEFINE_CB_EVENT(xprtrdma_cb_reply); | 918 | DEFINE_CB_EVENT(xprtrdma_cb_reply); |
| 887 | 919 | ||
| 920 | /** | ||
| 921 | ** Server-side RPC/RDMA events | ||
| 922 | **/ | ||
| 923 | |||
| 924 | DECLARE_EVENT_CLASS(svcrdma_xprt_event, | ||
| 925 | TP_PROTO( | ||
| 926 | const struct svc_xprt *xprt | ||
| 927 | ), | ||
| 928 | |||
| 929 | TP_ARGS(xprt), | ||
| 930 | |||
| 931 | TP_STRUCT__entry( | ||
| 932 | __field(const void *, xprt) | ||
| 933 | __string(addr, xprt->xpt_remotebuf) | ||
| 934 | ), | ||
| 935 | |||
| 936 | TP_fast_assign( | ||
| 937 | __entry->xprt = xprt; | ||
| 938 | __assign_str(addr, xprt->xpt_remotebuf); | ||
| 939 | ), | ||
| 940 | |||
| 941 | TP_printk("xprt=%p addr=%s", | ||
| 942 | __entry->xprt, __get_str(addr) | ||
| 943 | ) | ||
| 944 | ); | ||
| 945 | |||
| 946 | #define DEFINE_XPRT_EVENT(name) \ | ||
| 947 | DEFINE_EVENT(svcrdma_xprt_event, svcrdma_xprt_##name, \ | ||
| 948 | TP_PROTO( \ | ||
| 949 | const struct svc_xprt *xprt \ | ||
| 950 | ), \ | ||
| 951 | TP_ARGS(xprt)) | ||
| 952 | |||
| 953 | DEFINE_XPRT_EVENT(accept); | ||
| 954 | DEFINE_XPRT_EVENT(fail); | ||
| 955 | DEFINE_XPRT_EVENT(free); | ||
| 956 | |||
| 957 | TRACE_DEFINE_ENUM(RDMA_MSG); | ||
| 958 | TRACE_DEFINE_ENUM(RDMA_NOMSG); | ||
| 959 | TRACE_DEFINE_ENUM(RDMA_MSGP); | ||
| 960 | TRACE_DEFINE_ENUM(RDMA_DONE); | ||
| 961 | TRACE_DEFINE_ENUM(RDMA_ERROR); | ||
| 962 | |||
| 963 | #define show_rpcrdma_proc(x) \ | ||
| 964 | __print_symbolic(x, \ | ||
| 965 | { RDMA_MSG, "RDMA_MSG" }, \ | ||
| 966 | { RDMA_NOMSG, "RDMA_NOMSG" }, \ | ||
| 967 | { RDMA_MSGP, "RDMA_MSGP" }, \ | ||
| 968 | { RDMA_DONE, "RDMA_DONE" }, \ | ||
| 969 | { RDMA_ERROR, "RDMA_ERROR" }) | ||
| 970 | |||
| 971 | TRACE_EVENT(svcrdma_decode_rqst, | ||
| 972 | TP_PROTO( | ||
| 973 | __be32 *p, | ||
| 974 | unsigned int hdrlen | ||
| 975 | ), | ||
| 976 | |||
| 977 | TP_ARGS(p, hdrlen), | ||
| 978 | |||
| 979 | TP_STRUCT__entry( | ||
| 980 | __field(u32, xid) | ||
| 981 | __field(u32, vers) | ||
| 982 | __field(u32, proc) | ||
| 983 | __field(u32, credits) | ||
| 984 | __field(unsigned int, hdrlen) | ||
| 985 | ), | ||
| 986 | |||
| 987 | TP_fast_assign( | ||
| 988 | __entry->xid = be32_to_cpup(p++); | ||
| 989 | __entry->vers = be32_to_cpup(p++); | ||
| 990 | __entry->credits = be32_to_cpup(p++); | ||
| 991 | __entry->proc = be32_to_cpup(p); | ||
| 992 | __entry->hdrlen = hdrlen; | ||
| 993 | ), | ||
| 994 | |||
| 995 | TP_printk("xid=0x%08x vers=%u credits=%u proc=%s hdrlen=%u", | ||
| 996 | __entry->xid, __entry->vers, __entry->credits, | ||
| 997 | show_rpcrdma_proc(__entry->proc), __entry->hdrlen) | ||
| 998 | ); | ||
| 999 | |||
| 1000 | TRACE_EVENT(svcrdma_decode_short, | ||
| 1001 | TP_PROTO( | ||
| 1002 | unsigned int hdrlen | ||
| 1003 | ), | ||
| 1004 | |||
| 1005 | TP_ARGS(hdrlen), | ||
| 1006 | |||
| 1007 | TP_STRUCT__entry( | ||
| 1008 | __field(unsigned int, hdrlen) | ||
| 1009 | ), | ||
| 1010 | |||
| 1011 | TP_fast_assign( | ||
| 1012 | __entry->hdrlen = hdrlen; | ||
| 1013 | ), | ||
| 1014 | |||
| 1015 | TP_printk("hdrlen=%u", __entry->hdrlen) | ||
| 1016 | ); | ||
| 1017 | |||
| 1018 | DECLARE_EVENT_CLASS(svcrdma_badreq_event, | ||
| 1019 | TP_PROTO( | ||
| 1020 | __be32 *p | ||
| 1021 | ), | ||
| 1022 | |||
| 1023 | TP_ARGS(p), | ||
| 1024 | |||
| 1025 | TP_STRUCT__entry( | ||
| 1026 | __field(u32, xid) | ||
| 1027 | __field(u32, vers) | ||
| 1028 | __field(u32, proc) | ||
| 1029 | __field(u32, credits) | ||
| 1030 | ), | ||
| 1031 | |||
| 1032 | TP_fast_assign( | ||
| 1033 | __entry->xid = be32_to_cpup(p++); | ||
| 1034 | __entry->vers = be32_to_cpup(p++); | ||
| 1035 | __entry->credits = be32_to_cpup(p++); | ||
| 1036 | __entry->proc = be32_to_cpup(p); | ||
| 1037 | ), | ||
| 1038 | |||
| 1039 | TP_printk("xid=0x%08x vers=%u credits=%u proc=%u", | ||
| 1040 | __entry->xid, __entry->vers, __entry->credits, __entry->proc) | ||
| 1041 | ); | ||
| 1042 | |||
| 1043 | #define DEFINE_BADREQ_EVENT(name) \ | ||
| 1044 | DEFINE_EVENT(svcrdma_badreq_event, svcrdma_decode_##name,\ | ||
| 1045 | TP_PROTO( \ | ||
| 1046 | __be32 *p \ | ||
| 1047 | ), \ | ||
| 1048 | TP_ARGS(p)) | ||
| 1049 | |||
| 1050 | DEFINE_BADREQ_EVENT(badvers); | ||
| 1051 | DEFINE_BADREQ_EVENT(drop); | ||
| 1052 | DEFINE_BADREQ_EVENT(badproc); | ||
| 1053 | DEFINE_BADREQ_EVENT(parse); | ||
| 1054 | |||
| 1055 | DECLARE_EVENT_CLASS(svcrdma_segment_event, | ||
| 1056 | TP_PROTO( | ||
| 1057 | u32 handle, | ||
| 1058 | u32 length, | ||
| 1059 | u64 offset | ||
| 1060 | ), | ||
| 1061 | |||
| 1062 | TP_ARGS(handle, length, offset), | ||
| 1063 | |||
| 1064 | TP_STRUCT__entry( | ||
| 1065 | __field(u32, handle) | ||
| 1066 | __field(u32, length) | ||
| 1067 | __field(u64, offset) | ||
| 1068 | ), | ||
| 1069 | |||
| 1070 | TP_fast_assign( | ||
| 1071 | __entry->handle = handle; | ||
| 1072 | __entry->length = length; | ||
| 1073 | __entry->offset = offset; | ||
| 1074 | ), | ||
| 1075 | |||
| 1076 | TP_printk("%u@0x%016llx:0x%08x", | ||
| 1077 | __entry->length, (unsigned long long)__entry->offset, | ||
| 1078 | __entry->handle | ||
| 1079 | ) | ||
| 1080 | ); | ||
| 1081 | |||
| 1082 | #define DEFINE_SEGMENT_EVENT(name) \ | ||
| 1083 | DEFINE_EVENT(svcrdma_segment_event, svcrdma_encode_##name,\ | ||
| 1084 | TP_PROTO( \ | ||
| 1085 | u32 handle, \ | ||
| 1086 | u32 length, \ | ||
| 1087 | u64 offset \ | ||
| 1088 | ), \ | ||
| 1089 | TP_ARGS(handle, length, offset)) | ||
| 1090 | |||
| 1091 | DEFINE_SEGMENT_EVENT(rseg); | ||
| 1092 | DEFINE_SEGMENT_EVENT(wseg); | ||
| 1093 | |||
| 1094 | DECLARE_EVENT_CLASS(svcrdma_chunk_event, | ||
| 1095 | TP_PROTO( | ||
| 1096 | u32 length | ||
| 1097 | ), | ||
| 1098 | |||
| 1099 | TP_ARGS(length), | ||
| 1100 | |||
| 1101 | TP_STRUCT__entry( | ||
| 1102 | __field(u32, length) | ||
| 1103 | ), | ||
| 1104 | |||
| 1105 | TP_fast_assign( | ||
| 1106 | __entry->length = length; | ||
| 1107 | ), | ||
| 1108 | |||
| 1109 | TP_printk("length=%u", | ||
| 1110 | __entry->length | ||
| 1111 | ) | ||
| 1112 | ); | ||
| 1113 | |||
| 1114 | #define DEFINE_CHUNK_EVENT(name) \ | ||
| 1115 | DEFINE_EVENT(svcrdma_chunk_event, svcrdma_encode_##name,\ | ||
| 1116 | TP_PROTO( \ | ||
| 1117 | u32 length \ | ||
| 1118 | ), \ | ||
| 1119 | TP_ARGS(length)) | ||
| 1120 | |||
| 1121 | DEFINE_CHUNK_EVENT(pzr); | ||
| 1122 | DEFINE_CHUNK_EVENT(write); | ||
| 1123 | DEFINE_CHUNK_EVENT(reply); | ||
| 1124 | |||
| 1125 | TRACE_EVENT(svcrdma_encode_read, | ||
| 1126 | TP_PROTO( | ||
| 1127 | u32 length, | ||
| 1128 | u32 position | ||
| 1129 | ), | ||
| 1130 | |||
| 1131 | TP_ARGS(length, position), | ||
| 1132 | |||
| 1133 | TP_STRUCT__entry( | ||
| 1134 | __field(u32, length) | ||
| 1135 | __field(u32, position) | ||
| 1136 | ), | ||
| 1137 | |||
| 1138 | TP_fast_assign( | ||
| 1139 | __entry->length = length; | ||
| 1140 | __entry->position = position; | ||
| 1141 | ), | ||
| 1142 | |||
| 1143 | TP_printk("length=%u position=%u", | ||
| 1144 | __entry->length, __entry->position | ||
| 1145 | ) | ||
| 1146 | ); | ||
| 1147 | |||
| 1148 | DECLARE_EVENT_CLASS(svcrdma_error_event, | ||
| 1149 | TP_PROTO( | ||
| 1150 | __be32 xid | ||
| 1151 | ), | ||
| 1152 | |||
| 1153 | TP_ARGS(xid), | ||
| 1154 | |||
| 1155 | TP_STRUCT__entry( | ||
| 1156 | __field(u32, xid) | ||
| 1157 | ), | ||
| 1158 | |||
| 1159 | TP_fast_assign( | ||
| 1160 | __entry->xid = be32_to_cpu(xid); | ||
| 1161 | ), | ||
| 1162 | |||
| 1163 | TP_printk("xid=0x%08x", | ||
| 1164 | __entry->xid | ||
| 1165 | ) | ||
| 1166 | ); | ||
| 1167 | |||
| 1168 | #define DEFINE_ERROR_EVENT(name) \ | ||
| 1169 | DEFINE_EVENT(svcrdma_error_event, svcrdma_err_##name, \ | ||
| 1170 | TP_PROTO( \ | ||
| 1171 | __be32 xid \ | ||
| 1172 | ), \ | ||
| 1173 | TP_ARGS(xid)) | ||
| 1174 | |||
| 1175 | DEFINE_ERROR_EVENT(vers); | ||
| 1176 | DEFINE_ERROR_EVENT(chunk); | ||
| 1177 | |||
| 1178 | /** | ||
| 1179 | ** Server-side RDMA API events | ||
| 1180 | **/ | ||
| 1181 | |||
| 1182 | TRACE_EVENT(svcrdma_dma_map_page, | ||
| 1183 | TP_PROTO( | ||
| 1184 | const struct svcxprt_rdma *rdma, | ||
| 1185 | const void *page | ||
| 1186 | ), | ||
| 1187 | |||
| 1188 | TP_ARGS(rdma, page), | ||
| 1189 | |||
| 1190 | TP_STRUCT__entry( | ||
| 1191 | __field(const void *, page); | ||
| 1192 | __string(device, rdma->sc_cm_id->device->name) | ||
| 1193 | __string(addr, rdma->sc_xprt.xpt_remotebuf) | ||
| 1194 | ), | ||
| 1195 | |||
| 1196 | TP_fast_assign( | ||
| 1197 | __entry->page = page; | ||
| 1198 | __assign_str(device, rdma->sc_cm_id->device->name); | ||
| 1199 | __assign_str(addr, rdma->sc_xprt.xpt_remotebuf); | ||
| 1200 | ), | ||
| 1201 | |||
| 1202 | TP_printk("addr=%s device=%s page=%p", | ||
| 1203 | __get_str(addr), __get_str(device), __entry->page | ||
| 1204 | ) | ||
| 1205 | ); | ||
| 1206 | |||
| 1207 | TRACE_EVENT(svcrdma_dma_map_rwctx, | ||
| 1208 | TP_PROTO( | ||
| 1209 | const struct svcxprt_rdma *rdma, | ||
| 1210 | int status | ||
| 1211 | ), | ||
| 1212 | |||
| 1213 | TP_ARGS(rdma, status), | ||
| 1214 | |||
| 1215 | TP_STRUCT__entry( | ||
| 1216 | __field(int, status) | ||
| 1217 | __string(device, rdma->sc_cm_id->device->name) | ||
| 1218 | __string(addr, rdma->sc_xprt.xpt_remotebuf) | ||
| 1219 | ), | ||
| 1220 | |||
| 1221 | TP_fast_assign( | ||
| 1222 | __entry->status = status; | ||
| 1223 | __assign_str(device, rdma->sc_cm_id->device->name); | ||
| 1224 | __assign_str(addr, rdma->sc_xprt.xpt_remotebuf); | ||
| 1225 | ), | ||
| 1226 | |||
| 1227 | TP_printk("addr=%s device=%s status=%d", | ||
| 1228 | __get_str(addr), __get_str(device), __entry->status | ||
| 1229 | ) | ||
| 1230 | ); | ||
| 1231 | |||
| 1232 | TRACE_EVENT(svcrdma_send_failed, | ||
| 1233 | TP_PROTO( | ||
| 1234 | const struct svc_rqst *rqst, | ||
| 1235 | int status | ||
| 1236 | ), | ||
| 1237 | |||
| 1238 | TP_ARGS(rqst, status), | ||
| 1239 | |||
| 1240 | TP_STRUCT__entry( | ||
| 1241 | __field(int, status) | ||
| 1242 | __field(u32, xid) | ||
| 1243 | __field(const void *, xprt) | ||
| 1244 | __string(addr, rqst->rq_xprt->xpt_remotebuf) | ||
| 1245 | ), | ||
| 1246 | |||
| 1247 | TP_fast_assign( | ||
| 1248 | __entry->status = status; | ||
| 1249 | __entry->xid = __be32_to_cpu(rqst->rq_xid); | ||
| 1250 | __entry->xprt = rqst->rq_xprt; | ||
| 1251 | __assign_str(addr, rqst->rq_xprt->xpt_remotebuf); | ||
| 1252 | ), | ||
| 1253 | |||
| 1254 | TP_printk("xprt=%p addr=%s xid=0x%08x status=%d", | ||
| 1255 | __entry->xprt, __get_str(addr), | ||
| 1256 | __entry->xid, __entry->status | ||
| 1257 | ) | ||
| 1258 | ); | ||
| 1259 | |||
| 1260 | DECLARE_EVENT_CLASS(svcrdma_sendcomp_event, | ||
| 1261 | TP_PROTO( | ||
| 1262 | const struct ib_wc *wc | ||
| 1263 | ), | ||
| 1264 | |||
| 1265 | TP_ARGS(wc), | ||
| 1266 | |||
| 1267 | TP_STRUCT__entry( | ||
| 1268 | __field(const void *, cqe) | ||
| 1269 | __field(unsigned int, status) | ||
| 1270 | __field(unsigned int, vendor_err) | ||
| 1271 | ), | ||
| 1272 | |||
| 1273 | TP_fast_assign( | ||
| 1274 | __entry->cqe = wc->wr_cqe; | ||
| 1275 | __entry->status = wc->status; | ||
| 1276 | if (wc->status) | ||
| 1277 | __entry->vendor_err = wc->vendor_err; | ||
| 1278 | else | ||
| 1279 | __entry->vendor_err = 0; | ||
| 1280 | ), | ||
| 1281 | |||
| 1282 | TP_printk("cqe=%p status=%s (%u/0x%x)", | ||
| 1283 | __entry->cqe, rdma_show_wc_status(__entry->status), | ||
| 1284 | __entry->status, __entry->vendor_err | ||
| 1285 | ) | ||
| 1286 | ); | ||
| 1287 | |||
| 1288 | #define DEFINE_SENDCOMP_EVENT(name) \ | ||
| 1289 | DEFINE_EVENT(svcrdma_sendcomp_event, svcrdma_wc_##name, \ | ||
| 1290 | TP_PROTO( \ | ||
| 1291 | const struct ib_wc *wc \ | ||
| 1292 | ), \ | ||
| 1293 | TP_ARGS(wc)) | ||
| 1294 | |||
| 1295 | TRACE_EVENT(svcrdma_post_send, | ||
| 1296 | TP_PROTO( | ||
| 1297 | const struct ib_send_wr *wr, | ||
| 1298 | int status | ||
| 1299 | ), | ||
| 1300 | |||
| 1301 | TP_ARGS(wr, status), | ||
| 1302 | |||
| 1303 | TP_STRUCT__entry( | ||
| 1304 | __field(const void *, cqe) | ||
| 1305 | __field(unsigned int, num_sge) | ||
| 1306 | __field(u32, inv_rkey) | ||
| 1307 | __field(int, status) | ||
| 1308 | ), | ||
| 1309 | |||
| 1310 | TP_fast_assign( | ||
| 1311 | __entry->cqe = wr->wr_cqe; | ||
| 1312 | __entry->num_sge = wr->num_sge; | ||
| 1313 | __entry->inv_rkey = (wr->opcode == IB_WR_SEND_WITH_INV) ? | ||
| 1314 | wr->ex.invalidate_rkey : 0; | ||
| 1315 | __entry->status = status; | ||
| 1316 | ), | ||
| 1317 | |||
| 1318 | TP_printk("cqe=%p num_sge=%u inv_rkey=0x%08x status=%d", | ||
| 1319 | __entry->cqe, __entry->num_sge, | ||
| 1320 | __entry->inv_rkey, __entry->status | ||
| 1321 | ) | ||
| 1322 | ); | ||
| 1323 | |||
| 1324 | DEFINE_SENDCOMP_EVENT(send); | ||
| 1325 | |||
| 1326 | TRACE_EVENT(svcrdma_post_recv, | ||
| 1327 | TP_PROTO( | ||
| 1328 | const struct ib_recv_wr *wr, | ||
| 1329 | int status | ||
| 1330 | ), | ||
| 1331 | |||
| 1332 | TP_ARGS(wr, status), | ||
| 1333 | |||
| 1334 | TP_STRUCT__entry( | ||
| 1335 | __field(const void *, cqe) | ||
| 1336 | __field(int, status) | ||
| 1337 | ), | ||
| 1338 | |||
| 1339 | TP_fast_assign( | ||
| 1340 | __entry->cqe = wr->wr_cqe; | ||
| 1341 | __entry->status = status; | ||
| 1342 | ), | ||
| 1343 | |||
| 1344 | TP_printk("cqe=%p status=%d", | ||
| 1345 | __entry->cqe, __entry->status | ||
| 1346 | ) | ||
| 1347 | ); | ||
| 1348 | |||
| 1349 | TRACE_EVENT(svcrdma_wc_receive, | ||
| 1350 | TP_PROTO( | ||
| 1351 | const struct ib_wc *wc | ||
| 1352 | ), | ||
| 1353 | |||
| 1354 | TP_ARGS(wc), | ||
| 1355 | |||
| 1356 | TP_STRUCT__entry( | ||
| 1357 | __field(const void *, cqe) | ||
| 1358 | __field(u32, byte_len) | ||
| 1359 | __field(unsigned int, status) | ||
| 1360 | __field(u32, vendor_err) | ||
| 1361 | ), | ||
| 1362 | |||
| 1363 | TP_fast_assign( | ||
| 1364 | __entry->cqe = wc->wr_cqe; | ||
| 1365 | __entry->status = wc->status; | ||
| 1366 | if (wc->status) { | ||
| 1367 | __entry->byte_len = 0; | ||
| 1368 | __entry->vendor_err = wc->vendor_err; | ||
| 1369 | } else { | ||
| 1370 | __entry->byte_len = wc->byte_len; | ||
| 1371 | __entry->vendor_err = 0; | ||
| 1372 | } | ||
| 1373 | ), | ||
| 1374 | |||
| 1375 | TP_printk("cqe=%p byte_len=%u status=%s (%u/0x%x)", | ||
| 1376 | __entry->cqe, __entry->byte_len, | ||
| 1377 | rdma_show_wc_status(__entry->status), | ||
| 1378 | __entry->status, __entry->vendor_err | ||
| 1379 | ) | ||
| 1380 | ); | ||
| 1381 | |||
| 1382 | TRACE_EVENT(svcrdma_post_rw, | ||
| 1383 | TP_PROTO( | ||
| 1384 | const void *cqe, | ||
| 1385 | int sqecount, | ||
| 1386 | int status | ||
| 1387 | ), | ||
| 1388 | |||
| 1389 | TP_ARGS(cqe, sqecount, status), | ||
| 1390 | |||
| 1391 | TP_STRUCT__entry( | ||
| 1392 | __field(const void *, cqe) | ||
| 1393 | __field(int, sqecount) | ||
| 1394 | __field(int, status) | ||
| 1395 | ), | ||
| 1396 | |||
| 1397 | TP_fast_assign( | ||
| 1398 | __entry->cqe = cqe; | ||
| 1399 | __entry->sqecount = sqecount; | ||
| 1400 | __entry->status = status; | ||
| 1401 | ), | ||
| 1402 | |||
| 1403 | TP_printk("cqe=%p sqecount=%d status=%d", | ||
| 1404 | __entry->cqe, __entry->sqecount, __entry->status | ||
| 1405 | ) | ||
| 1406 | ); | ||
| 1407 | |||
| 1408 | DEFINE_SENDCOMP_EVENT(read); | ||
| 1409 | DEFINE_SENDCOMP_EVENT(write); | ||
| 1410 | |||
| 1411 | TRACE_EVENT(svcrdma_cm_event, | ||
| 1412 | TP_PROTO( | ||
| 1413 | const struct rdma_cm_event *event, | ||
| 1414 | const struct sockaddr *sap | ||
| 1415 | ), | ||
| 1416 | |||
| 1417 | TP_ARGS(event, sap), | ||
| 1418 | |||
| 1419 | TP_STRUCT__entry( | ||
| 1420 | __field(unsigned int, event) | ||
| 1421 | __field(int, status) | ||
| 1422 | __array(__u8, addr, INET6_ADDRSTRLEN + 10) | ||
| 1423 | ), | ||
| 1424 | |||
| 1425 | TP_fast_assign( | ||
| 1426 | __entry->event = event->event; | ||
| 1427 | __entry->status = event->status; | ||
| 1428 | snprintf(__entry->addr, sizeof(__entry->addr) - 1, | ||
| 1429 | "%pISpc", sap); | ||
| 1430 | ), | ||
| 1431 | |||
| 1432 | TP_printk("addr=%s event=%s (%u/%d)", | ||
| 1433 | __entry->addr, | ||
| 1434 | rdma_show_cm_event(__entry->event), | ||
| 1435 | __entry->event, __entry->status | ||
| 1436 | ) | ||
| 1437 | ); | ||
| 1438 | |||
| 1439 | TRACE_EVENT(svcrdma_qp_error, | ||
| 1440 | TP_PROTO( | ||
| 1441 | const struct ib_event *event, | ||
| 1442 | const struct sockaddr *sap | ||
| 1443 | ), | ||
| 1444 | |||
| 1445 | TP_ARGS(event, sap), | ||
| 1446 | |||
| 1447 | TP_STRUCT__entry( | ||
| 1448 | __field(unsigned int, event) | ||
| 1449 | __string(device, event->device->name) | ||
| 1450 | __array(__u8, addr, INET6_ADDRSTRLEN + 10) | ||
| 1451 | ), | ||
| 1452 | |||
| 1453 | TP_fast_assign( | ||
| 1454 | __entry->event = event->event; | ||
| 1455 | __assign_str(device, event->device->name); | ||
| 1456 | snprintf(__entry->addr, sizeof(__entry->addr) - 1, | ||
| 1457 | "%pISpc", sap); | ||
| 1458 | ), | ||
| 1459 | |||
| 1460 | TP_printk("addr=%s dev=%s event=%s (%u)", | ||
| 1461 | __entry->addr, __get_str(device), | ||
| 1462 | rdma_show_ib_event(__entry->event), __entry->event | ||
| 1463 | ) | ||
| 1464 | ); | ||
| 1465 | |||
| 1466 | DECLARE_EVENT_CLASS(svcrdma_sendqueue_event, | ||
| 1467 | TP_PROTO( | ||
| 1468 | const struct svcxprt_rdma *rdma | ||
| 1469 | ), | ||
| 1470 | |||
| 1471 | TP_ARGS(rdma), | ||
| 1472 | |||
| 1473 | TP_STRUCT__entry( | ||
| 1474 | __field(int, avail) | ||
| 1475 | __field(int, depth) | ||
| 1476 | __string(addr, rdma->sc_xprt.xpt_remotebuf) | ||
| 1477 | ), | ||
| 1478 | |||
| 1479 | TP_fast_assign( | ||
| 1480 | __entry->avail = atomic_read(&rdma->sc_sq_avail); | ||
| 1481 | __entry->depth = rdma->sc_sq_depth; | ||
| 1482 | __assign_str(addr, rdma->sc_xprt.xpt_remotebuf); | ||
| 1483 | ), | ||
| 1484 | |||
| 1485 | TP_printk("addr=%s sc_sq_avail=%d/%d", | ||
| 1486 | __get_str(addr), __entry->avail, __entry->depth | ||
| 1487 | ) | ||
| 1488 | ); | ||
| 1489 | |||
| 1490 | #define DEFINE_SQ_EVENT(name) \ | ||
| 1491 | DEFINE_EVENT(svcrdma_sendqueue_event, svcrdma_sq_##name,\ | ||
| 1492 | TP_PROTO( \ | ||
| 1493 | const struct svcxprt_rdma *rdma \ | ||
| 1494 | ), \ | ||
| 1495 | TP_ARGS(rdma)) | ||
| 1496 | |||
| 1497 | DEFINE_SQ_EVENT(full); | ||
| 1498 | DEFINE_SQ_EVENT(retry); | ||
| 1499 | |||
| 888 | #endif /* _TRACE_RPCRDMA_H */ | 1500 | #endif /* _TRACE_RPCRDMA_H */ |
| 889 | 1501 | ||
| 890 | #include <trace/define_trace.h> | 1502 | #include <trace/define_trace.h> |
diff --git a/include/trace/events/rseq.h b/include/trace/events/rseq.h new file mode 100644 index 000000000000..a04a64bc1a00 --- /dev/null +++ b/include/trace/events/rseq.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ */ | ||
| 2 | #undef TRACE_SYSTEM | ||
| 3 | #define TRACE_SYSTEM rseq | ||
| 4 | |||
| 5 | #if !defined(_TRACE_RSEQ_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 6 | #define _TRACE_RSEQ_H | ||
| 7 | |||
| 8 | #include <linux/tracepoint.h> | ||
| 9 | #include <linux/types.h> | ||
| 10 | |||
| 11 | TRACE_EVENT(rseq_update, | ||
| 12 | |||
| 13 | TP_PROTO(struct task_struct *t), | ||
| 14 | |||
| 15 | TP_ARGS(t), | ||
| 16 | |||
| 17 | TP_STRUCT__entry( | ||
| 18 | __field(s32, cpu_id) | ||
| 19 | ), | ||
| 20 | |||
| 21 | TP_fast_assign( | ||
| 22 | __entry->cpu_id = raw_smp_processor_id(); | ||
| 23 | ), | ||
| 24 | |||
| 25 | TP_printk("cpu_id=%d", __entry->cpu_id) | ||
| 26 | ); | ||
| 27 | |||
| 28 | TRACE_EVENT(rseq_ip_fixup, | ||
| 29 | |||
| 30 | TP_PROTO(unsigned long regs_ip, unsigned long start_ip, | ||
| 31 | unsigned long post_commit_offset, unsigned long abort_ip), | ||
| 32 | |||
| 33 | TP_ARGS(regs_ip, start_ip, post_commit_offset, abort_ip), | ||
| 34 | |||
| 35 | TP_STRUCT__entry( | ||
| 36 | __field(unsigned long, regs_ip) | ||
| 37 | __field(unsigned long, start_ip) | ||
| 38 | __field(unsigned long, post_commit_offset) | ||
| 39 | __field(unsigned long, abort_ip) | ||
| 40 | ), | ||
| 41 | |||
| 42 | TP_fast_assign( | ||
| 43 | __entry->regs_ip = regs_ip; | ||
| 44 | __entry->start_ip = start_ip; | ||
| 45 | __entry->post_commit_offset = post_commit_offset; | ||
| 46 | __entry->abort_ip = abort_ip; | ||
| 47 | ), | ||
| 48 | |||
| 49 | TP_printk("regs_ip=0x%lx start_ip=0x%lx post_commit_offset=%lu abort_ip=0x%lx", | ||
| 50 | __entry->regs_ip, __entry->start_ip, | ||
| 51 | __entry->post_commit_offset, __entry->abort_ip) | ||
| 52 | ); | ||
| 53 | |||
| 54 | #endif /* _TRACE_SOCK_H */ | ||
| 55 | |||
| 56 | /* This part must be outside protection */ | ||
| 57 | #include <trace/define_trace.h> | ||
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h index 75846164290e..3c5038b587ba 100644 --- a/include/uapi/linux/aio_abi.h +++ b/include/uapi/linux/aio_abi.h | |||
| @@ -39,8 +39,10 @@ enum { | |||
| 39 | IOCB_CMD_PWRITE = 1, | 39 | IOCB_CMD_PWRITE = 1, |
| 40 | IOCB_CMD_FSYNC = 2, | 40 | IOCB_CMD_FSYNC = 2, |
| 41 | IOCB_CMD_FDSYNC = 3, | 41 | IOCB_CMD_FDSYNC = 3, |
| 42 | /* 4 was the experimental IOCB_CMD_PREADX */ | 42 | /* These two are experimental. |
| 43 | IOCB_CMD_POLL = 5, | 43 | * IOCB_CMD_PREADX = 4, |
| 44 | * IOCB_CMD_POLL = 5, | ||
| 45 | */ | ||
| 44 | IOCB_CMD_NOOP = 6, | 46 | IOCB_CMD_NOOP = 6, |
| 45 | IOCB_CMD_PREADV = 7, | 47 | IOCB_CMD_PREADV = 7, |
| 46 | IOCB_CMD_PWRITEV = 8, | 48 | IOCB_CMD_PWRITEV = 8, |
| @@ -109,7 +111,7 @@ struct iocb { | |||
| 109 | #undef IFLITTLE | 111 | #undef IFLITTLE |
| 110 | 112 | ||
| 111 | struct __aio_sigset { | 113 | struct __aio_sigset { |
| 112 | sigset_t __user *sigmask; | 114 | const sigset_t __user *sigmask; |
| 113 | size_t sigsetsize; | 115 | size_t sigsetsize; |
| 114 | }; | 116 | }; |
| 115 | 117 | ||
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 59b19b6a40d7..b7db3261c62d 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
| @@ -1857,7 +1857,8 @@ union bpf_attr { | |||
| 1857 | * is resolved), the nexthop address is returned in ipv4_dst | 1857 | * is resolved), the nexthop address is returned in ipv4_dst |
| 1858 | * or ipv6_dst based on family, smac is set to mac address of | 1858 | * or ipv6_dst based on family, smac is set to mac address of |
| 1859 | * egress device, dmac is set to nexthop mac address, rt_metric | 1859 | * egress device, dmac is set to nexthop mac address, rt_metric |
| 1860 | * is set to metric from route (IPv4/IPv6 only). | 1860 | * is set to metric from route (IPv4/IPv6 only), and ifindex |
| 1861 | * is set to the device index of the nexthop from the FIB lookup. | ||
| 1861 | * | 1862 | * |
| 1862 | * *plen* argument is the size of the passed in struct. | 1863 | * *plen* argument is the size of the passed in struct. |
| 1863 | * *flags* argument can be a combination of one or more of the | 1864 | * *flags* argument can be a combination of one or more of the |
| @@ -1873,9 +1874,10 @@ union bpf_attr { | |||
| 1873 | * *ctx* is either **struct xdp_md** for XDP programs or | 1874 | * *ctx* is either **struct xdp_md** for XDP programs or |
| 1874 | * **struct sk_buff** tc cls_act programs. | 1875 | * **struct sk_buff** tc cls_act programs. |
| 1875 | * Return | 1876 | * Return |
| 1876 | * Egress device index on success, 0 if packet needs to continue | 1877 | * * < 0 if any input argument is invalid |
| 1877 | * up the stack for further processing or a negative error in case | 1878 | * * 0 on success (packet is forwarded, nexthop neighbor exists) |
| 1878 | * of failure. | 1879 | * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the |
| 1880 | * * packet is not forwarded or needs assist from full stack | ||
| 1879 | * | 1881 | * |
| 1880 | * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) | 1882 | * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) |
| 1881 | * Description | 1883 | * Description |
| @@ -2612,6 +2614,18 @@ struct bpf_raw_tracepoint_args { | |||
| 2612 | #define BPF_FIB_LOOKUP_DIRECT BIT(0) | 2614 | #define BPF_FIB_LOOKUP_DIRECT BIT(0) |
| 2613 | #define BPF_FIB_LOOKUP_OUTPUT BIT(1) | 2615 | #define BPF_FIB_LOOKUP_OUTPUT BIT(1) |
| 2614 | 2616 | ||
| 2617 | enum { | ||
| 2618 | BPF_FIB_LKUP_RET_SUCCESS, /* lookup successful */ | ||
| 2619 | BPF_FIB_LKUP_RET_BLACKHOLE, /* dest is blackholed; can be dropped */ | ||
| 2620 | BPF_FIB_LKUP_RET_UNREACHABLE, /* dest is unreachable; can be dropped */ | ||
| 2621 | BPF_FIB_LKUP_RET_PROHIBIT, /* dest not allowed; can be dropped */ | ||
| 2622 | BPF_FIB_LKUP_RET_NOT_FWDED, /* packet is not forwarded */ | ||
| 2623 | BPF_FIB_LKUP_RET_FWD_DISABLED, /* fwding is not enabled on ingress */ | ||
| 2624 | BPF_FIB_LKUP_RET_UNSUPP_LWT, /* fwd requires encapsulation */ | ||
| 2625 | BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */ | ||
| 2626 | BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */ | ||
| 2627 | }; | ||
| 2628 | |||
| 2615 | struct bpf_fib_lookup { | 2629 | struct bpf_fib_lookup { |
| 2616 | /* input: network family for lookup (AF_INET, AF_INET6) | 2630 | /* input: network family for lookup (AF_INET, AF_INET6) |
| 2617 | * output: network family of egress nexthop | 2631 | * output: network family of egress nexthop |
| @@ -2625,7 +2639,11 @@ struct bpf_fib_lookup { | |||
| 2625 | 2639 | ||
| 2626 | /* total length of packet from network header - used for MTU check */ | 2640 | /* total length of packet from network header - used for MTU check */ |
| 2627 | __u16 tot_len; | 2641 | __u16 tot_len; |
| 2628 | __u32 ifindex; /* L3 device index for lookup */ | 2642 | |
| 2643 | /* input: L3 device index for lookup | ||
| 2644 | * output: device index from FIB lookup | ||
| 2645 | */ | ||
| 2646 | __u32 ifindex; | ||
| 2629 | 2647 | ||
| 2630 | union { | 2648 | union { |
| 2631 | /* inputs to lookup */ | 2649 | /* inputs to lookup */ |
diff --git a/include/uapi/linux/if_xdp.h b/include/uapi/linux/if_xdp.h index 1fa0e977ea8d..caed8b1614ff 100644 --- a/include/uapi/linux/if_xdp.h +++ b/include/uapi/linux/if_xdp.h | |||
| @@ -63,8 +63,8 @@ struct xdp_statistics { | |||
| 63 | /* Pgoff for mmaping the rings */ | 63 | /* Pgoff for mmaping the rings */ |
| 64 | #define XDP_PGOFF_RX_RING 0 | 64 | #define XDP_PGOFF_RX_RING 0 |
| 65 | #define XDP_PGOFF_TX_RING 0x80000000 | 65 | #define XDP_PGOFF_TX_RING 0x80000000 |
| 66 | #define XDP_UMEM_PGOFF_FILL_RING 0x100000000 | 66 | #define XDP_UMEM_PGOFF_FILL_RING 0x100000000ULL |
| 67 | #define XDP_UMEM_PGOFF_COMPLETION_RING 0x180000000 | 67 | #define XDP_UMEM_PGOFF_COMPLETION_RING 0x180000000ULL |
| 68 | 68 | ||
| 69 | /* Rx/Tx descriptor */ | 69 | /* Rx/Tx descriptor */ |
| 70 | struct xdp_desc { | 70 | struct xdp_desc { |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index b02c41e53d56..b6270a3b38e9 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -677,10 +677,10 @@ struct kvm_ioeventfd { | |||
| 677 | }; | 677 | }; |
| 678 | 678 | ||
| 679 | #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) | 679 | #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) |
| 680 | #define KVM_X86_DISABLE_EXITS_HTL (1 << 1) | 680 | #define KVM_X86_DISABLE_EXITS_HLT (1 << 1) |
| 681 | #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) | 681 | #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) |
| 682 | #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ | 682 | #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ |
| 683 | KVM_X86_DISABLE_EXITS_HTL | \ | 683 | KVM_X86_DISABLE_EXITS_HLT | \ |
| 684 | KVM_X86_DISABLE_EXITS_PAUSE) | 684 | KVM_X86_DISABLE_EXITS_PAUSE) |
| 685 | 685 | ||
| 686 | /* for KVM_ENABLE_CAP */ | 686 | /* for KVM_ENABLE_CAP */ |
| @@ -948,6 +948,7 @@ struct kvm_ppc_resize_hpt { | |||
| 948 | #define KVM_CAP_S390_BPB 152 | 948 | #define KVM_CAP_S390_BPB 152 |
| 949 | #define KVM_CAP_GET_MSR_FEATURES 153 | 949 | #define KVM_CAP_GET_MSR_FEATURES 153 |
| 950 | #define KVM_CAP_HYPERV_EVENTFD 154 | 950 | #define KVM_CAP_HYPERV_EVENTFD 154 |
| 951 | #define KVM_CAP_HYPERV_TLBFLUSH 155 | ||
| 951 | 952 | ||
| 952 | #ifdef KVM_CAP_IRQ_ROUTING | 953 | #ifdef KVM_CAP_IRQ_ROUTING |
| 953 | 954 | ||
diff --git a/include/uapi/linux/nbd.h b/include/uapi/linux/nbd.h index 85a3fb65e40a..20d6cc91435d 100644 --- a/include/uapi/linux/nbd.h +++ b/include/uapi/linux/nbd.h | |||
| @@ -53,6 +53,9 @@ enum { | |||
| 53 | /* These are client behavior specific flags. */ | 53 | /* These are client behavior specific flags. */ |
| 54 | #define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on | 54 | #define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on |
| 55 | disconnect. */ | 55 | disconnect. */ |
| 56 | #define NBD_CFLAG_DISCONNECT_ON_CLOSE (1 << 1) /* disconnect the nbd device on | ||
| 57 | * close by last opener. | ||
| 58 | */ | ||
| 56 | 59 | ||
| 57 | /* userspace doesn't need the nbd_device structure */ | 60 | /* userspace doesn't need the nbd_device structure */ |
| 58 | 61 | ||
diff --git a/include/uapi/linux/ncp.h b/include/uapi/linux/ncp.h deleted file mode 100644 index ca6f3d42c88f..000000000000 --- a/include/uapi/linux/ncp.h +++ /dev/null | |||
| @@ -1,202 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * ncp.h | ||
| 4 | * | ||
| 5 | * Copyright (C) 1995 by Volker Lendecke | ||
| 6 | * Modified for sparc by J.F. Chadima | ||
| 7 | * Modified for __constant_ntoh by Frank A. Vorstenbosch | ||
| 8 | * | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _LINUX_NCP_H | ||
| 12 | #define _LINUX_NCP_H | ||
| 13 | |||
| 14 | #include <linux/types.h> | ||
| 15 | |||
| 16 | #define NCP_PTYPE (0x11) | ||
| 17 | #define NCP_PORT (0x0451) | ||
| 18 | |||
| 19 | #define NCP_ALLOC_SLOT_REQUEST (0x1111) | ||
| 20 | #define NCP_REQUEST (0x2222) | ||
| 21 | #define NCP_DEALLOC_SLOT_REQUEST (0x5555) | ||
| 22 | |||
| 23 | struct ncp_request_header { | ||
| 24 | __u16 type; | ||
| 25 | __u8 sequence; | ||
| 26 | __u8 conn_low; | ||
| 27 | __u8 task; | ||
| 28 | __u8 conn_high; | ||
| 29 | __u8 function; | ||
| 30 | __u8 data[0]; | ||
| 31 | } __attribute__((packed)); | ||
| 32 | |||
| 33 | #define NCP_REPLY (0x3333) | ||
| 34 | #define NCP_WATCHDOG (0x3E3E) | ||
| 35 | #define NCP_POSITIVE_ACK (0x9999) | ||
| 36 | |||
| 37 | struct ncp_reply_header { | ||
| 38 | __u16 type; | ||
| 39 | __u8 sequence; | ||
| 40 | __u8 conn_low; | ||
| 41 | __u8 task; | ||
| 42 | __u8 conn_high; | ||
| 43 | __u8 completion_code; | ||
| 44 | __u8 connection_state; | ||
| 45 | __u8 data[0]; | ||
| 46 | } __attribute__((packed)); | ||
| 47 | |||
| 48 | #define NCP_VOLNAME_LEN (16) | ||
| 49 | #define NCP_NUMBER_OF_VOLUMES (256) | ||
| 50 | struct ncp_volume_info { | ||
| 51 | __u32 total_blocks; | ||
| 52 | __u32 free_blocks; | ||
| 53 | __u32 purgeable_blocks; | ||
| 54 | __u32 not_yet_purgeable_blocks; | ||
| 55 | __u32 total_dir_entries; | ||
| 56 | __u32 available_dir_entries; | ||
| 57 | __u8 sectors_per_block; | ||
| 58 | char volume_name[NCP_VOLNAME_LEN + 1]; | ||
| 59 | }; | ||
| 60 | |||
| 61 | #define AR_READ (cpu_to_le16(1)) | ||
| 62 | #define AR_WRITE (cpu_to_le16(2)) | ||
| 63 | #define AR_EXCLUSIVE (cpu_to_le16(0x20)) | ||
| 64 | |||
| 65 | #define NCP_FILE_ID_LEN 6 | ||
| 66 | |||
| 67 | /* Defines for Name Spaces */ | ||
| 68 | #define NW_NS_DOS 0 | ||
| 69 | #define NW_NS_MAC 1 | ||
| 70 | #define NW_NS_NFS 2 | ||
| 71 | #define NW_NS_FTAM 3 | ||
| 72 | #define NW_NS_OS2 4 | ||
| 73 | |||
| 74 | /* Defines for ReturnInformationMask */ | ||
| 75 | #define RIM_NAME (cpu_to_le32(1)) | ||
| 76 | #define RIM_SPACE_ALLOCATED (cpu_to_le32(2)) | ||
| 77 | #define RIM_ATTRIBUTES (cpu_to_le32(4)) | ||
| 78 | #define RIM_DATA_SIZE (cpu_to_le32(8)) | ||
| 79 | #define RIM_TOTAL_SIZE (cpu_to_le32(0x10)) | ||
| 80 | #define RIM_EXT_ATTR_INFO (cpu_to_le32(0x20)) | ||
| 81 | #define RIM_ARCHIVE (cpu_to_le32(0x40)) | ||
| 82 | #define RIM_MODIFY (cpu_to_le32(0x80)) | ||
| 83 | #define RIM_CREATION (cpu_to_le32(0x100)) | ||
| 84 | #define RIM_OWNING_NAMESPACE (cpu_to_le32(0x200)) | ||
| 85 | #define RIM_DIRECTORY (cpu_to_le32(0x400)) | ||
| 86 | #define RIM_RIGHTS (cpu_to_le32(0x800)) | ||
| 87 | #define RIM_ALL (cpu_to_le32(0xFFF)) | ||
| 88 | #define RIM_COMPRESSED_INFO (cpu_to_le32(0x80000000)) | ||
| 89 | |||
| 90 | /* Defines for NSInfoBitMask */ | ||
| 91 | #define NSIBM_NFS_NAME 0x0001 | ||
| 92 | #define NSIBM_NFS_MODE 0x0002 | ||
| 93 | #define NSIBM_NFS_GID 0x0004 | ||
| 94 | #define NSIBM_NFS_NLINKS 0x0008 | ||
| 95 | #define NSIBM_NFS_RDEV 0x0010 | ||
| 96 | #define NSIBM_NFS_LINK 0x0020 | ||
| 97 | #define NSIBM_NFS_CREATED 0x0040 | ||
| 98 | #define NSIBM_NFS_UID 0x0080 | ||
| 99 | #define NSIBM_NFS_ACSFLAG 0x0100 | ||
| 100 | #define NSIBM_NFS_MYFLAG 0x0200 | ||
| 101 | |||
| 102 | /* open/create modes */ | ||
| 103 | #define OC_MODE_OPEN 0x01 | ||
| 104 | #define OC_MODE_TRUNCATE 0x02 | ||
| 105 | #define OC_MODE_REPLACE 0x02 | ||
| 106 | #define OC_MODE_CREATE 0x08 | ||
| 107 | |||
| 108 | /* open/create results */ | ||
| 109 | #define OC_ACTION_NONE 0x00 | ||
| 110 | #define OC_ACTION_OPEN 0x01 | ||
| 111 | #define OC_ACTION_CREATE 0x02 | ||
| 112 | #define OC_ACTION_TRUNCATE 0x04 | ||
| 113 | #define OC_ACTION_REPLACE 0x04 | ||
| 114 | |||
| 115 | /* access rights attributes */ | ||
| 116 | #ifndef AR_READ_ONLY | ||
| 117 | #define AR_READ_ONLY 0x0001 | ||
| 118 | #define AR_WRITE_ONLY 0x0002 | ||
| 119 | #define AR_DENY_READ 0x0004 | ||
| 120 | #define AR_DENY_WRITE 0x0008 | ||
| 121 | #define AR_COMPATIBILITY 0x0010 | ||
| 122 | #define AR_WRITE_THROUGH 0x0040 | ||
| 123 | #define AR_OPEN_COMPRESSED 0x0100 | ||
| 124 | #endif | ||
| 125 | |||
| 126 | struct nw_nfs_info { | ||
| 127 | __u32 mode; | ||
| 128 | __u32 rdev; | ||
| 129 | }; | ||
| 130 | |||
| 131 | struct nw_info_struct { | ||
| 132 | __u32 spaceAlloc; | ||
| 133 | __le32 attributes; | ||
| 134 | __u16 flags; | ||
| 135 | __le32 dataStreamSize; | ||
| 136 | __le32 totalStreamSize; | ||
| 137 | __u16 numberOfStreams; | ||
| 138 | __le16 creationTime; | ||
| 139 | __le16 creationDate; | ||
| 140 | __u32 creatorID; | ||
| 141 | __le16 modifyTime; | ||
| 142 | __le16 modifyDate; | ||
| 143 | __u32 modifierID; | ||
| 144 | __le16 lastAccessDate; | ||
| 145 | __u16 archiveTime; | ||
| 146 | __u16 archiveDate; | ||
| 147 | __u32 archiverID; | ||
| 148 | __u16 inheritedRightsMask; | ||
| 149 | __le32 dirEntNum; | ||
| 150 | __le32 DosDirNum; | ||
| 151 | __u32 volNumber; | ||
| 152 | __u32 EADataSize; | ||
| 153 | __u32 EAKeyCount; | ||
| 154 | __u32 EAKeySize; | ||
| 155 | __u32 NSCreator; | ||
| 156 | __u8 nameLen; | ||
| 157 | __u8 entryName[256]; | ||
| 158 | /* libncp may depend on there being nothing after entryName */ | ||
| 159 | #ifdef __KERNEL__ | ||
| 160 | struct nw_nfs_info nfs; | ||
| 161 | #endif | ||
| 162 | } __attribute__((packed)); | ||
| 163 | |||
| 164 | /* modify mask - use with MODIFY_DOS_INFO structure */ | ||
| 165 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) | ||
| 166 | #define DM_CREATE_DATE (cpu_to_le32(0x04)) | ||
| 167 | #define DM_CREATE_TIME (cpu_to_le32(0x08)) | ||
| 168 | #define DM_CREATOR_ID (cpu_to_le32(0x10)) | ||
| 169 | #define DM_ARCHIVE_DATE (cpu_to_le32(0x20)) | ||
| 170 | #define DM_ARCHIVE_TIME (cpu_to_le32(0x40)) | ||
| 171 | #define DM_ARCHIVER_ID (cpu_to_le32(0x80)) | ||
| 172 | #define DM_MODIFY_DATE (cpu_to_le32(0x0100)) | ||
| 173 | #define DM_MODIFY_TIME (cpu_to_le32(0x0200)) | ||
| 174 | #define DM_MODIFIER_ID (cpu_to_le32(0x0400)) | ||
| 175 | #define DM_LAST_ACCESS_DATE (cpu_to_le32(0x0800)) | ||
| 176 | #define DM_INHERITED_RIGHTS_MASK (cpu_to_le32(0x1000)) | ||
| 177 | #define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000)) | ||
| 178 | |||
| 179 | struct nw_modify_dos_info { | ||
| 180 | __le32 attributes; | ||
| 181 | __le16 creationDate; | ||
| 182 | __le16 creationTime; | ||
| 183 | __u32 creatorID; | ||
| 184 | __le16 modifyDate; | ||
| 185 | __le16 modifyTime; | ||
| 186 | __u32 modifierID; | ||
| 187 | __u16 archiveDate; | ||
| 188 | __u16 archiveTime; | ||
| 189 | __u32 archiverID; | ||
| 190 | __le16 lastAccessDate; | ||
| 191 | __u16 inheritanceGrantMask; | ||
| 192 | __u16 inheritanceRevokeMask; | ||
| 193 | __u32 maximumSpace; | ||
| 194 | } __attribute__((packed)); | ||
| 195 | |||
| 196 | struct nw_search_sequence { | ||
| 197 | __u8 volNumber; | ||
| 198 | __u32 dirBase; | ||
| 199 | __u32 sequence; | ||
| 200 | } __attribute__((packed)); | ||
| 201 | |||
| 202 | #endif /* _LINUX_NCP_H */ | ||
diff --git a/include/uapi/linux/ncp_fs.h b/include/uapi/linux/ncp_fs.h deleted file mode 100644 index e76a44229d2f..000000000000 --- a/include/uapi/linux/ncp_fs.h +++ /dev/null | |||
| @@ -1,147 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * ncp_fs.h | ||
| 4 | * | ||
| 5 | * Copyright (C) 1995, 1996 by Volker Lendecke | ||
| 6 | * | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _LINUX_NCP_FS_H | ||
| 10 | #define _LINUX_NCP_FS_H | ||
| 11 | |||
| 12 | #include <linux/fs.h> | ||
| 13 | #include <linux/in.h> | ||
| 14 | #include <linux/types.h> | ||
| 15 | #include <linux/magic.h> | ||
| 16 | |||
| 17 | #include <linux/ipx.h> | ||
| 18 | #include <linux/ncp_no.h> | ||
| 19 | |||
| 20 | /* | ||
| 21 | * ioctl commands | ||
| 22 | */ | ||
| 23 | |||
| 24 | struct ncp_ioctl_request { | ||
| 25 | unsigned int function; | ||
| 26 | unsigned int size; | ||
| 27 | char __user *data; | ||
| 28 | }; | ||
| 29 | |||
| 30 | struct ncp_fs_info { | ||
| 31 | int version; | ||
| 32 | struct sockaddr_ipx addr; | ||
| 33 | __kernel_uid_t mounted_uid; | ||
| 34 | int connection; /* Connection number the server assigned us */ | ||
| 35 | int buffer_size; /* The negotiated buffer size, to be | ||
| 36 | used for read/write requests! */ | ||
| 37 | |||
| 38 | int volume_number; | ||
| 39 | __le32 directory_id; | ||
| 40 | }; | ||
| 41 | |||
| 42 | struct ncp_fs_info_v2 { | ||
| 43 | int version; | ||
| 44 | unsigned long mounted_uid; | ||
| 45 | unsigned int connection; | ||
| 46 | unsigned int buffer_size; | ||
| 47 | |||
| 48 | unsigned int volume_number; | ||
| 49 | __le32 directory_id; | ||
| 50 | |||
| 51 | __u32 dummy1; | ||
| 52 | __u32 dummy2; | ||
| 53 | __u32 dummy3; | ||
| 54 | }; | ||
| 55 | |||
| 56 | struct ncp_sign_init | ||
| 57 | { | ||
| 58 | char sign_root[8]; | ||
| 59 | char sign_last[16]; | ||
| 60 | }; | ||
| 61 | |||
| 62 | struct ncp_lock_ioctl | ||
| 63 | { | ||
| 64 | #define NCP_LOCK_LOG 0 | ||
| 65 | #define NCP_LOCK_SH 1 | ||
| 66 | #define NCP_LOCK_EX 2 | ||
| 67 | #define NCP_LOCK_CLEAR 256 | ||
| 68 | int cmd; | ||
| 69 | int origin; | ||
| 70 | unsigned int offset; | ||
| 71 | unsigned int length; | ||
| 72 | #define NCP_LOCK_DEFAULT_TIMEOUT 18 | ||
| 73 | #define NCP_LOCK_MAX_TIMEOUT 180 | ||
| 74 | int timeout; | ||
| 75 | }; | ||
| 76 | |||
| 77 | struct ncp_setroot_ioctl | ||
| 78 | { | ||
| 79 | int volNumber; | ||
| 80 | int namespace; | ||
| 81 | __le32 dirEntNum; | ||
| 82 | }; | ||
| 83 | |||
| 84 | struct ncp_objectname_ioctl | ||
| 85 | { | ||
| 86 | #define NCP_AUTH_NONE 0x00 | ||
| 87 | #define NCP_AUTH_BIND 0x31 | ||
| 88 | #define NCP_AUTH_NDS 0x32 | ||
| 89 | int auth_type; | ||
| 90 | size_t object_name_len; | ||
| 91 | void __user * object_name; /* a userspace data, in most cases user name */ | ||
| 92 | }; | ||
| 93 | |||
| 94 | struct ncp_privatedata_ioctl | ||
| 95 | { | ||
| 96 | size_t len; | ||
| 97 | void __user * data; /* ~1000 for NDS */ | ||
| 98 | }; | ||
| 99 | |||
| 100 | /* NLS charsets by ioctl */ | ||
| 101 | #define NCP_IOCSNAME_LEN 20 | ||
| 102 | struct ncp_nls_ioctl | ||
| 103 | { | ||
| 104 | unsigned char codepage[NCP_IOCSNAME_LEN+1]; | ||
| 105 | unsigned char iocharset[NCP_IOCSNAME_LEN+1]; | ||
| 106 | }; | ||
| 107 | |||
| 108 | #define NCP_IOC_NCPREQUEST _IOR('n', 1, struct ncp_ioctl_request) | ||
| 109 | #define NCP_IOC_GETMOUNTUID _IOW('n', 2, __kernel_old_uid_t) | ||
| 110 | #define NCP_IOC_GETMOUNTUID2 _IOW('n', 2, unsigned long) | ||
| 111 | |||
| 112 | #define NCP_IOC_CONN_LOGGED_IN _IO('n', 3) | ||
| 113 | |||
| 114 | #define NCP_GET_FS_INFO_VERSION (1) | ||
| 115 | #define NCP_IOC_GET_FS_INFO _IOWR('n', 4, struct ncp_fs_info) | ||
| 116 | #define NCP_GET_FS_INFO_VERSION_V2 (2) | ||
| 117 | #define NCP_IOC_GET_FS_INFO_V2 _IOWR('n', 4, struct ncp_fs_info_v2) | ||
| 118 | |||
| 119 | #define NCP_IOC_SIGN_INIT _IOR('n', 5, struct ncp_sign_init) | ||
| 120 | #define NCP_IOC_SIGN_WANTED _IOR('n', 6, int) | ||
| 121 | #define NCP_IOC_SET_SIGN_WANTED _IOW('n', 6, int) | ||
| 122 | |||
| 123 | #define NCP_IOC_LOCKUNLOCK _IOR('n', 7, struct ncp_lock_ioctl) | ||
| 124 | |||
| 125 | #define NCP_IOC_GETROOT _IOW('n', 8, struct ncp_setroot_ioctl) | ||
| 126 | #define NCP_IOC_SETROOT _IOR('n', 8, struct ncp_setroot_ioctl) | ||
| 127 | |||
| 128 | #define NCP_IOC_GETOBJECTNAME _IOWR('n', 9, struct ncp_objectname_ioctl) | ||
| 129 | #define NCP_IOC_SETOBJECTNAME _IOR('n', 9, struct ncp_objectname_ioctl) | ||
| 130 | #define NCP_IOC_GETPRIVATEDATA _IOWR('n', 10, struct ncp_privatedata_ioctl) | ||
| 131 | #define NCP_IOC_SETPRIVATEDATA _IOR('n', 10, struct ncp_privatedata_ioctl) | ||
| 132 | |||
| 133 | #define NCP_IOC_GETCHARSETS _IOWR('n', 11, struct ncp_nls_ioctl) | ||
| 134 | #define NCP_IOC_SETCHARSETS _IOR('n', 11, struct ncp_nls_ioctl) | ||
| 135 | |||
| 136 | #define NCP_IOC_GETDENTRYTTL _IOW('n', 12, __u32) | ||
| 137 | #define NCP_IOC_SETDENTRYTTL _IOR('n', 12, __u32) | ||
| 138 | |||
| 139 | /* | ||
| 140 | * The packet size to allocate. One page should be enough. | ||
| 141 | */ | ||
| 142 | #define NCP_PACKET_SIZE 4070 | ||
| 143 | |||
| 144 | #define NCP_MAXPATHLEN 255 | ||
| 145 | #define NCP_MAXNAMELEN 14 | ||
| 146 | |||
| 147 | #endif /* _LINUX_NCP_FS_H */ | ||
diff --git a/include/uapi/linux/ncp_mount.h b/include/uapi/linux/ncp_mount.h deleted file mode 100644 index 9bdbcd68c329..000000000000 --- a/include/uapi/linux/ncp_mount.h +++ /dev/null | |||
| @@ -1,72 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * ncp_mount.h | ||
| 4 | * | ||
| 5 | * Copyright (C) 1995, 1996 by Volker Lendecke | ||
| 6 | * | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _LINUX_NCP_MOUNT_H | ||
| 10 | #define _LINUX_NCP_MOUNT_H | ||
| 11 | |||
| 12 | #include <linux/types.h> | ||
| 13 | #include <linux/ncp.h> | ||
| 14 | |||
| 15 | #define NCP_MOUNT_VERSION 3 /* Binary */ | ||
| 16 | |||
| 17 | /* Values for flags */ | ||
| 18 | #define NCP_MOUNT_SOFT 0x0001 | ||
| 19 | #define NCP_MOUNT_INTR 0x0002 | ||
| 20 | #define NCP_MOUNT_STRONG 0x0004 /* enable delete/rename of r/o files */ | ||
| 21 | #define NCP_MOUNT_NO_OS2 0x0008 /* do not use OS/2 (LONG) namespace */ | ||
| 22 | #define NCP_MOUNT_NO_NFS 0x0010 /* do not use NFS namespace */ | ||
| 23 | #define NCP_MOUNT_EXTRAS 0x0020 | ||
| 24 | #define NCP_MOUNT_SYMLINKS 0x0040 /* enable symlinks */ | ||
| 25 | #define NCP_MOUNT_NFS_EXTRAS 0x0080 /* Enable use of NFS NS meta-info */ | ||
| 26 | |||
| 27 | struct ncp_mount_data { | ||
| 28 | int version; | ||
| 29 | unsigned int ncp_fd; /* The socket to the ncp port */ | ||
| 30 | __kernel_uid_t mounted_uid; /* Who may umount() this filesystem? */ | ||
| 31 | __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */ | ||
| 32 | |||
| 33 | unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; | ||
| 34 | unsigned int time_out; /* How long should I wait after | ||
| 35 | sending a NCP request? */ | ||
| 36 | unsigned int retry_count; /* And how often should I retry? */ | ||
| 37 | unsigned int flags; | ||
| 38 | |||
| 39 | __kernel_uid_t uid; | ||
| 40 | __kernel_gid_t gid; | ||
| 41 | __kernel_mode_t file_mode; | ||
| 42 | __kernel_mode_t dir_mode; | ||
| 43 | }; | ||
| 44 | |||
| 45 | #define NCP_MOUNT_VERSION_V4 (4) /* Binary or text */ | ||
| 46 | |||
| 47 | struct ncp_mount_data_v4 { | ||
| 48 | int version; | ||
| 49 | unsigned long flags; /* NCP_MOUNT_* flags */ | ||
| 50 | /* MIPS uses long __kernel_uid_t, but... */ | ||
| 51 | /* we neever pass -1, so it is safe */ | ||
| 52 | unsigned long mounted_uid; /* Who may umount() this filesystem? */ | ||
| 53 | /* MIPS uses long __kernel_pid_t */ | ||
| 54 | long wdog_pid; /* Who cares for our watchdog packets? */ | ||
| 55 | |||
| 56 | unsigned int ncp_fd; /* The socket to the ncp port */ | ||
| 57 | unsigned int time_out; /* How long should I wait after | ||
| 58 | sending a NCP request? */ | ||
| 59 | unsigned int retry_count; /* And how often should I retry? */ | ||
| 60 | |||
| 61 | /* MIPS uses long __kernel_uid_t... */ | ||
| 62 | /* we never pass -1, so it is safe */ | ||
| 63 | unsigned long uid; | ||
| 64 | unsigned long gid; | ||
| 65 | /* MIPS uses unsigned long __kernel_mode_t */ | ||
| 66 | unsigned long file_mode; | ||
| 67 | unsigned long dir_mode; | ||
| 68 | }; | ||
| 69 | |||
| 70 | #define NCP_MOUNT_VERSION_V5 (5) /* Text only */ | ||
| 71 | |||
| 72 | #endif | ||
diff --git a/include/uapi/linux/ncp_no.h b/include/uapi/linux/ncp_no.h deleted file mode 100644 index 654d7c7f5d92..000000000000 --- a/include/uapi/linux/ncp_no.h +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _NCP_NO | ||
| 3 | #define _NCP_NO | ||
| 4 | |||
| 5 | /* these define the attribute byte as seen by NCP */ | ||
| 6 | #define aRONLY (__cpu_to_le32(1)) | ||
| 7 | #define aHIDDEN (__cpu_to_le32(2)) | ||
| 8 | #define aSYSTEM (__cpu_to_le32(4)) | ||
| 9 | #define aEXECUTE (__cpu_to_le32(8)) | ||
| 10 | #define aDIR (__cpu_to_le32(0x10)) | ||
| 11 | #define aARCH (__cpu_to_le32(0x20)) | ||
| 12 | #define aSHARED (__cpu_to_le32(0x80)) | ||
| 13 | #define aDONTSUBALLOCATE (__cpu_to_le32(1L<<11)) | ||
| 14 | #define aTRANSACTIONAL (__cpu_to_le32(1L<<12)) | ||
| 15 | #define aPURGE (__cpu_to_le32(1L<<16)) | ||
| 16 | #define aRENAMEINHIBIT (__cpu_to_le32(1L<<17)) | ||
| 17 | #define aDELETEINHIBIT (__cpu_to_le32(1L<<18)) | ||
| 18 | #define aDONTCOMPRESS (__cpu_to_le32(1L<<27)) | ||
| 19 | |||
| 20 | #endif /* _NCP_NO */ | ||
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h index c712eb6879f1..336014bf8868 100644 --- a/include/uapi/linux/netfilter/nf_conntrack_common.h +++ b/include/uapi/linux/netfilter/nf_conntrack_common.h | |||
| @@ -112,7 +112,7 @@ enum ip_conntrack_status { | |||
| 112 | IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING | | 112 | IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING | |
| 113 | IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD), | 113 | IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD), |
| 114 | 114 | ||
| 115 | __IPS_MAX_BIT = 14, | 115 | __IPS_MAX_BIT = 15, |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | /* Connection tracking event types */ | 118 | /* Connection tracking event types */ |
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index ae00a3c49b8a..89438e68dc03 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h | |||
| @@ -266,7 +266,7 @@ enum nft_rule_compat_attributes { | |||
| 266 | * @NFT_SET_INTERVAL: set contains intervals | 266 | * @NFT_SET_INTERVAL: set contains intervals |
| 267 | * @NFT_SET_MAP: set is used as a dictionary | 267 | * @NFT_SET_MAP: set is used as a dictionary |
| 268 | * @NFT_SET_TIMEOUT: set uses timeouts | 268 | * @NFT_SET_TIMEOUT: set uses timeouts |
| 269 | * @NFT_SET_EVAL: set contains expressions for evaluation | 269 | * @NFT_SET_EVAL: set can be updated from the evaluation path |
| 270 | * @NFT_SET_OBJECT: set contains stateful objects | 270 | * @NFT_SET_OBJECT: set contains stateful objects |
| 271 | */ | 271 | */ |
| 272 | enum nft_set_flags { | 272 | enum nft_set_flags { |
| @@ -1099,9 +1099,31 @@ enum nft_log_attributes { | |||
| 1099 | #define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) | 1099 | #define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) |
| 1100 | 1100 | ||
| 1101 | /** | 1101 | /** |
| 1102 | * LOGLEVEL_AUDIT - a pseudo log level enabling audit logging | 1102 | * enum nft_log_level - nf_tables log levels |
| 1103 | */ | 1103 | * |
| 1104 | #define LOGLEVEL_AUDIT 8 | 1104 | * @NFT_LOGLEVEL_EMERG: system is unusable |
| 1105 | * @NFT_LOGLEVEL_ALERT: action must be taken immediately | ||
| 1106 | * @NFT_LOGLEVEL_CRIT: critical conditions | ||
| 1107 | * @NFT_LOGLEVEL_ERR: error conditions | ||
| 1108 | * @NFT_LOGLEVEL_WARNING: warning conditions | ||
| 1109 | * @NFT_LOGLEVEL_NOTICE: normal but significant condition | ||
| 1110 | * @NFT_LOGLEVEL_INFO: informational | ||
| 1111 | * @NFT_LOGLEVEL_DEBUG: debug-level messages | ||
| 1112 | * @NFT_LOGLEVEL_AUDIT: enabling audit logging | ||
| 1113 | */ | ||
| 1114 | enum nft_log_level { | ||
| 1115 | NFT_LOGLEVEL_EMERG, | ||
| 1116 | NFT_LOGLEVEL_ALERT, | ||
| 1117 | NFT_LOGLEVEL_CRIT, | ||
| 1118 | NFT_LOGLEVEL_ERR, | ||
| 1119 | NFT_LOGLEVEL_WARNING, | ||
| 1120 | NFT_LOGLEVEL_NOTICE, | ||
| 1121 | NFT_LOGLEVEL_INFO, | ||
| 1122 | NFT_LOGLEVEL_DEBUG, | ||
| 1123 | NFT_LOGLEVEL_AUDIT, | ||
| 1124 | __NFT_LOGLEVEL_MAX | ||
| 1125 | }; | ||
| 1126 | #define NFT_LOGLEVEL_MAX (__NFT_LOGLEVEL_MAX + 1) | ||
| 1105 | 1127 | ||
| 1106 | /** | 1128 | /** |
| 1107 | * enum nft_queue_attributes - nf_tables queue expression netlink attributes | 1129 | * enum nft_queue_attributes - nf_tables queue expression netlink attributes |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 28b36545de24..27e4e441caac 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -981,18 +981,18 @@ | |||
| 981 | * only the %NL80211_ATTR_IE data is used and updated with this command. | 981 | * only the %NL80211_ATTR_IE data is used and updated with this command. |
| 982 | * | 982 | * |
| 983 | * @NL80211_CMD_SET_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0 | 983 | * @NL80211_CMD_SET_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0 |
| 984 | * for the given authenticator address (specified with &NL80211_ATTR_MAC). | 984 | * for the given authenticator address (specified with %NL80211_ATTR_MAC). |
| 985 | * When &NL80211_ATTR_PMKR0_NAME is set, &NL80211_ATTR_PMK specifies the | 985 | * When %NL80211_ATTR_PMKR0_NAME is set, %NL80211_ATTR_PMK specifies the |
| 986 | * PMK-R0, otherwise it specifies the PMK. | 986 | * PMK-R0, otherwise it specifies the PMK. |
| 987 | * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously | 987 | * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously |
| 988 | * configured PMK for the authenticator address identified by | 988 | * configured PMK for the authenticator address identified by |
| 989 | * &NL80211_ATTR_MAC. | 989 | * %NL80211_ATTR_MAC. |
| 990 | * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way | 990 | * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way |
| 991 | * handshake was completed successfully by the driver. The BSSID is | 991 | * handshake was completed successfully by the driver. The BSSID is |
| 992 | * specified with &NL80211_ATTR_MAC. Drivers that support 4 way handshake | 992 | * specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake |
| 993 | * offload should send this event after indicating 802.11 association with | 993 | * offload should send this event after indicating 802.11 association with |
| 994 | * &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed | 994 | * %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed |
| 995 | * &NL80211_CMD_DISCONNECT should be indicated instead. | 995 | * %NL80211_CMD_DISCONNECT should be indicated instead. |
| 996 | * | 996 | * |
| 997 | * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request | 997 | * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request |
| 998 | * and RX notification. This command is used both as a request to transmit | 998 | * and RX notification. This command is used both as a request to transmit |
| @@ -1029,9 +1029,9 @@ | |||
| 1029 | * initiated the connection through the connect request. | 1029 | * initiated the connection through the connect request. |
| 1030 | * | 1030 | * |
| 1031 | * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's | 1031 | * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's |
| 1032 | * ht opmode or vht opmode changes using any of &NL80211_ATTR_SMPS_MODE, | 1032 | * ht opmode or vht opmode changes using any of %NL80211_ATTR_SMPS_MODE, |
| 1033 | * &NL80211_ATTR_CHANNEL_WIDTH,&NL80211_ATTR_NSS attributes with its | 1033 | * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its |
| 1034 | * address(specified in &NL80211_ATTR_MAC). | 1034 | * address(specified in %NL80211_ATTR_MAC). |
| 1035 | * | 1035 | * |
| 1036 | * @NL80211_CMD_MAX: highest used command number | 1036 | * @NL80211_CMD_MAX: highest used command number |
| 1037 | * @__NL80211_CMD_AFTER_LAST: internal use | 1037 | * @__NL80211_CMD_AFTER_LAST: internal use |
| @@ -2218,7 +2218,7 @@ enum nl80211_commands { | |||
| 2218 | * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external | 2218 | * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external |
| 2219 | * authentication operation (u32 attribute with an | 2219 | * authentication operation (u32 attribute with an |
| 2220 | * &enum nl80211_external_auth_action value). This is used with the | 2220 | * &enum nl80211_external_auth_action value). This is used with the |
| 2221 | * &NL80211_CMD_EXTERNAL_AUTH request event. | 2221 | * %NL80211_CMD_EXTERNAL_AUTH request event. |
| 2222 | * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user | 2222 | * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user |
| 2223 | * space supports external authentication. This attribute shall be used | 2223 | * space supports external authentication. This attribute shall be used |
| 2224 | * only with %NL80211_CMD_CONNECT request. The driver may offload | 2224 | * only with %NL80211_CMD_CONNECT request. The driver may offload |
| @@ -3491,7 +3491,7 @@ enum nl80211_sched_scan_match_attr { | |||
| 3491 | * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated | 3491 | * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated |
| 3492 | * base on contiguous rules and wider channels will be allowed to cross | 3492 | * base on contiguous rules and wider channels will be allowed to cross |
| 3493 | * multiple contiguous/overlapping frequency ranges. | 3493 | * multiple contiguous/overlapping frequency ranges. |
| 3494 | * @NL80211_RRF_IR_CONCURRENT: See &NL80211_FREQUENCY_ATTR_IR_CONCURRENT | 3494 | * @NL80211_RRF_IR_CONCURRENT: See %NL80211_FREQUENCY_ATTR_IR_CONCURRENT |
| 3495 | * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation | 3495 | * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation |
| 3496 | * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation | 3496 | * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation |
| 3497 | * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed | 3497 | * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed |
| @@ -5643,11 +5643,11 @@ enum nl80211_nan_func_attributes { | |||
| 5643 | * @NL80211_NAN_SRF_INCLUDE: present if the include bit of the SRF set. | 5643 | * @NL80211_NAN_SRF_INCLUDE: present if the include bit of the SRF set. |
| 5644 | * This is a flag. | 5644 | * This is a flag. |
| 5645 | * @NL80211_NAN_SRF_BF: Bloom Filter. Present if and only if | 5645 | * @NL80211_NAN_SRF_BF: Bloom Filter. Present if and only if |
| 5646 | * &NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary. | 5646 | * %NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary. |
| 5647 | * @NL80211_NAN_SRF_BF_IDX: index of the Bloom Filter. Mandatory if | 5647 | * @NL80211_NAN_SRF_BF_IDX: index of the Bloom Filter. Mandatory if |
| 5648 | * &NL80211_NAN_SRF_BF is present. This is a u8. | 5648 | * %NL80211_NAN_SRF_BF is present. This is a u8. |
| 5649 | * @NL80211_NAN_SRF_MAC_ADDRS: list of MAC addresses for the SRF. Present if | 5649 | * @NL80211_NAN_SRF_MAC_ADDRS: list of MAC addresses for the SRF. Present if |
| 5650 | * and only if &NL80211_NAN_SRF_BF isn't present. This is a nested | 5650 | * and only if %NL80211_NAN_SRF_BF isn't present. This is a nested |
| 5651 | * attribute. Each nested attribute is a MAC address. | 5651 | * attribute. Each nested attribute is a MAC address. |
| 5652 | * @NUM_NL80211_NAN_SRF_ATTR: internal | 5652 | * @NUM_NL80211_NAN_SRF_ATTR: internal |
| 5653 | * @NL80211_NAN_SRF_ATTR_MAX: highest NAN SRF attribute | 5653 | * @NL80211_NAN_SRF_ATTR_MAX: highest NAN SRF attribute |
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index db9f15f5db04..c0d7ea0bf5b6 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h | |||
| @@ -170,7 +170,7 @@ struct prctl_mm_map { | |||
| 170 | * asking selinux for a specific new context (e.g. with runcon) will result | 170 | * asking selinux for a specific new context (e.g. with runcon) will result |
| 171 | * in execve returning -EPERM. | 171 | * in execve returning -EPERM. |
| 172 | * | 172 | * |
| 173 | * See Documentation/prctl/no_new_privs.txt for more details. | 173 | * See Documentation/userspace-api/no_new_privs.rst for more details. |
| 174 | */ | 174 | */ |
| 175 | #define PR_SET_NO_NEW_PRIVS 38 | 175 | #define PR_SET_NO_NEW_PRIVS 38 |
| 176 | #define PR_GET_NO_NEW_PRIVS 39 | 176 | #define PR_GET_NO_NEW_PRIVS 39 |
diff --git a/include/uapi/linux/rpmsg.h b/include/uapi/linux/rpmsg.h index 225eb38705dc..e14c6dab4223 100644 --- a/include/uapi/linux/rpmsg.h +++ b/include/uapi/linux/rpmsg.h | |||
| @@ -1,15 +1,6 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2016, Linaro Ltd. | 3 | * Copyright (c) 2016, Linaro Ltd. |
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 and | ||
| 7 | * only version 2 as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | 4 | */ |
| 14 | 5 | ||
| 15 | #ifndef _UAPI_RPMSG_H_ | 6 | #ifndef _UAPI_RPMSG_H_ |
diff --git a/include/uapi/linux/rseq.h b/include/uapi/linux/rseq.h new file mode 100644 index 000000000000..d620fa43756c --- /dev/null +++ b/include/uapi/linux/rseq.h | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef _UAPI_LINUX_RSEQ_H | ||
| 3 | #define _UAPI_LINUX_RSEQ_H | ||
| 4 | |||
| 5 | /* | ||
| 6 | * linux/rseq.h | ||
| 7 | * | ||
| 8 | * Restartable sequences system call API | ||
| 9 | * | ||
| 10 | * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifdef __KERNEL__ | ||
| 14 | # include <linux/types.h> | ||
| 15 | #else | ||
| 16 | # include <stdint.h> | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #include <linux/types_32_64.h> | ||
| 20 | |||
| 21 | enum rseq_cpu_id_state { | ||
| 22 | RSEQ_CPU_ID_UNINITIALIZED = -1, | ||
| 23 | RSEQ_CPU_ID_REGISTRATION_FAILED = -2, | ||
| 24 | }; | ||
| 25 | |||
| 26 | enum rseq_flags { | ||
| 27 | RSEQ_FLAG_UNREGISTER = (1 << 0), | ||
| 28 | }; | ||
| 29 | |||
| 30 | enum rseq_cs_flags_bit { | ||
| 31 | RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0, | ||
| 32 | RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1, | ||
| 33 | RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2, | ||
| 34 | }; | ||
| 35 | |||
| 36 | enum rseq_cs_flags { | ||
| 37 | RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT = | ||
| 38 | (1U << RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT), | ||
| 39 | RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL = | ||
| 40 | (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT), | ||
| 41 | RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE = | ||
| 42 | (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT), | ||
| 43 | }; | ||
| 44 | |||
| 45 | /* | ||
| 46 | * struct rseq_cs is aligned on 4 * 8 bytes to ensure it is always | ||
| 47 | * contained within a single cache-line. It is usually declared as | ||
| 48 | * link-time constant data. | ||
| 49 | */ | ||
| 50 | struct rseq_cs { | ||
| 51 | /* Version of this structure. */ | ||
| 52 | __u32 version; | ||
| 53 | /* enum rseq_cs_flags */ | ||
| 54 | __u32 flags; | ||
| 55 | LINUX_FIELD_u32_u64(start_ip); | ||
| 56 | /* Offset from start_ip. */ | ||
| 57 | LINUX_FIELD_u32_u64(post_commit_offset); | ||
| 58 | LINUX_FIELD_u32_u64(abort_ip); | ||
| 59 | } __attribute__((aligned(4 * sizeof(__u64)))); | ||
| 60 | |||
| 61 | /* | ||
| 62 | * struct rseq is aligned on 4 * 8 bytes to ensure it is always | ||
| 63 | * contained within a single cache-line. | ||
| 64 | * | ||
| 65 | * A single struct rseq per thread is allowed. | ||
| 66 | */ | ||
| 67 | struct rseq { | ||
| 68 | /* | ||
| 69 | * Restartable sequences cpu_id_start field. Updated by the | ||
| 70 | * kernel, and read by user-space with single-copy atomicity | ||
| 71 | * semantics. Aligned on 32-bit. Always contains a value in the | ||
| 72 | * range of possible CPUs, although the value may not be the | ||
| 73 | * actual current CPU (e.g. if rseq is not initialized). This | ||
| 74 | * CPU number value should always be compared against the value | ||
| 75 | * of the cpu_id field before performing a rseq commit or | ||
| 76 | * returning a value read from a data structure indexed using | ||
| 77 | * the cpu_id_start value. | ||
| 78 | */ | ||
| 79 | __u32 cpu_id_start; | ||
| 80 | /* | ||
| 81 | * Restartable sequences cpu_id field. Updated by the kernel, | ||
| 82 | * and read by user-space with single-copy atomicity semantics. | ||
| 83 | * Aligned on 32-bit. Values RSEQ_CPU_ID_UNINITIALIZED and | ||
| 84 | * RSEQ_CPU_ID_REGISTRATION_FAILED have a special semantic: the | ||
| 85 | * former means "rseq uninitialized", and latter means "rseq | ||
| 86 | * initialization failed". This value is meant to be read within | ||
| 87 | * rseq critical sections and compared with the cpu_id_start | ||
| 88 | * value previously read, before performing the commit instruction, | ||
| 89 | * or read and compared with the cpu_id_start value before returning | ||
| 90 | * a value loaded from a data structure indexed using the | ||
| 91 | * cpu_id_start value. | ||
| 92 | */ | ||
| 93 | __u32 cpu_id; | ||
| 94 | /* | ||
| 95 | * Restartable sequences rseq_cs field. | ||
| 96 | * | ||
| 97 | * Contains NULL when no critical section is active for the current | ||
| 98 | * thread, or holds a pointer to the currently active struct rseq_cs. | ||
| 99 | * | ||
| 100 | * Updated by user-space, which sets the address of the currently | ||
| 101 | * active rseq_cs at the beginning of assembly instruction sequence | ||
| 102 | * block, and set to NULL by the kernel when it restarts an assembly | ||
| 103 | * instruction sequence block, as well as when the kernel detects that | ||
| 104 | * it is preempting or delivering a signal outside of the range | ||
| 105 | * targeted by the rseq_cs. Also needs to be set to NULL by user-space | ||
| 106 | * before reclaiming memory that contains the targeted struct rseq_cs. | ||
| 107 | * | ||
| 108 | * Read and set by the kernel with single-copy atomicity semantics. | ||
| 109 | * Set by user-space with single-copy atomicity semantics. Aligned | ||
| 110 | * on 64-bit. | ||
| 111 | */ | ||
| 112 | LINUX_FIELD_u32_u64(rseq_cs); | ||
| 113 | /* | ||
| 114 | * - RSEQ_DISABLE flag: | ||
| 115 | * | ||
| 116 | * Fallback fast-track flag for single-stepping. | ||
| 117 | * Set by user-space if lack of progress is detected. | ||
| 118 | * Cleared by user-space after rseq finish. | ||
| 119 | * Read by the kernel. | ||
| 120 | * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT | ||
| 121 | * Inhibit instruction sequence block restart and event | ||
| 122 | * counter increment on preemption for this thread. | ||
| 123 | * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL | ||
| 124 | * Inhibit instruction sequence block restart and event | ||
| 125 | * counter increment on signal delivery for this thread. | ||
| 126 | * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE | ||
| 127 | * Inhibit instruction sequence block restart and event | ||
| 128 | * counter increment on migration for this thread. | ||
| 129 | */ | ||
| 130 | __u32 flags; | ||
| 131 | } __attribute__((aligned(4 * sizeof(__u64)))); | ||
| 132 | |||
| 133 | #endif /* _UAPI_LINUX_RSEQ_H */ | ||
diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h index 0be80f72646b..b7b57967d90f 100644 --- a/include/uapi/linux/target_core_user.h +++ b/include/uapi/linux/target_core_user.h | |||
| @@ -9,21 +9,22 @@ | |||
| 9 | 9 | ||
| 10 | #define TCMU_VERSION "2.0" | 10 | #define TCMU_VERSION "2.0" |
| 11 | 11 | ||
| 12 | /* | 12 | /** |
| 13 | * DOC: Ring Design | ||
| 13 | * Ring Design | 14 | * Ring Design |
| 14 | * ----------- | 15 | * ----------- |
| 15 | * | 16 | * |
| 16 | * The mmaped area is divided into three parts: | 17 | * The mmaped area is divided into three parts: |
| 17 | * 1) The mailbox (struct tcmu_mailbox, below) | 18 | * 1) The mailbox (struct tcmu_mailbox, below); |
| 18 | * 2) The command ring | 19 | * 2) The command ring; |
| 19 | * 3) Everything beyond the command ring (data) | 20 | * 3) Everything beyond the command ring (data). |
| 20 | * | 21 | * |
| 21 | * The mailbox tells userspace the offset of the command ring from the | 22 | * The mailbox tells userspace the offset of the command ring from the |
| 22 | * start of the shared memory region, and how big the command ring is. | 23 | * start of the shared memory region, and how big the command ring is. |
| 23 | * | 24 | * |
| 24 | * The kernel passes SCSI commands to userspace by putting a struct | 25 | * The kernel passes SCSI commands to userspace by putting a struct |
| 25 | * tcmu_cmd_entry in the ring, updating mailbox->cmd_head, and poking | 26 | * tcmu_cmd_entry in the ring, updating mailbox->cmd_head, and poking |
| 26 | * userspace via uio's interrupt mechanism. | 27 | * userspace via UIO's interrupt mechanism. |
| 27 | * | 28 | * |
| 28 | * tcmu_cmd_entry contains a header. If the header type is PAD, | 29 | * tcmu_cmd_entry contains a header. If the header type is PAD, |
| 29 | * userspace should skip hdr->length bytes (mod cmdr_size) to find the | 30 | * userspace should skip hdr->length bytes (mod cmdr_size) to find the |
| @@ -43,6 +44,7 @@ | |||
| 43 | #define TCMU_MAILBOX_VERSION 2 | 44 | #define TCMU_MAILBOX_VERSION 2 |
| 44 | #define ALIGN_SIZE 64 /* Should be enough for most CPUs */ | 45 | #define ALIGN_SIZE 64 /* Should be enough for most CPUs */ |
| 45 | #define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */ | 46 | #define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */ |
| 47 | #define TCMU_MAILBOX_FLAG_CAP_READ_LEN (1 << 1) /* Read data length */ | ||
| 46 | 48 | ||
| 47 | struct tcmu_mailbox { | 49 | struct tcmu_mailbox { |
| 48 | __u16 version; | 50 | __u16 version; |
| @@ -70,6 +72,7 @@ struct tcmu_cmd_entry_hdr { | |||
| 70 | __u16 cmd_id; | 72 | __u16 cmd_id; |
| 71 | __u8 kflags; | 73 | __u8 kflags; |
| 72 | #define TCMU_UFLAG_UNKNOWN_OP 0x1 | 74 | #define TCMU_UFLAG_UNKNOWN_OP 0x1 |
| 75 | #define TCMU_UFLAG_READ_LEN 0x2 | ||
| 73 | __u8 uflags; | 76 | __u8 uflags; |
| 74 | 77 | ||
| 75 | } __packed; | 78 | } __packed; |
| @@ -118,7 +121,7 @@ struct tcmu_cmd_entry { | |||
| 118 | __u8 scsi_status; | 121 | __u8 scsi_status; |
| 119 | __u8 __pad1; | 122 | __u8 __pad1; |
| 120 | __u16 __pad2; | 123 | __u16 __pad2; |
| 121 | __u32 __pad3; | 124 | __u32 read_len; |
| 122 | char sense_buffer[TCMU_SENSE_BUFFERSIZE]; | 125 | char sense_buffer[TCMU_SENSE_BUFFERSIZE]; |
| 123 | } rsp; | 126 | } rsp; |
| 124 | }; | 127 | }; |
diff --git a/include/uapi/linux/types_32_64.h b/include/uapi/linux/types_32_64.h new file mode 100644 index 000000000000..0a87ace34a57 --- /dev/null +++ b/include/uapi/linux/types_32_64.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef _UAPI_LINUX_TYPES_32_64_H | ||
| 3 | #define _UAPI_LINUX_TYPES_32_64_H | ||
| 4 | |||
| 5 | /* | ||
| 6 | * linux/types_32_64.h | ||
| 7 | * | ||
| 8 | * Integer type declaration for pointers across 32-bit and 64-bit systems. | ||
| 9 | * | ||
| 10 | * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifdef __KERNEL__ | ||
| 14 | # include <linux/types.h> | ||
| 15 | #else | ||
| 16 | # include <stdint.h> | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #include <asm/byteorder.h> | ||
| 20 | |||
| 21 | #ifdef __BYTE_ORDER | ||
| 22 | # if (__BYTE_ORDER == __BIG_ENDIAN) | ||
| 23 | # define LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 24 | # else | ||
| 25 | # define LINUX_BYTE_ORDER_LITTLE_ENDIAN | ||
| 26 | # endif | ||
| 27 | #else | ||
| 28 | # ifdef __BIG_ENDIAN | ||
| 29 | # define LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 30 | # else | ||
| 31 | # define LINUX_BYTE_ORDER_LITTLE_ENDIAN | ||
| 32 | # endif | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifdef __LP64__ | ||
| 36 | # define LINUX_FIELD_u32_u64(field) __u64 field | ||
| 37 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) field = (intptr_t)v | ||
| 38 | #else | ||
| 39 | # ifdef LINUX_BYTE_ORDER_BIG_ENDIAN | ||
| 40 | # define LINUX_FIELD_u32_u64(field) __u32 field ## _padding, field | ||
| 41 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \ | ||
| 42 | field ## _padding = 0, field = (intptr_t)v | ||
| 43 | # else | ||
| 44 | # define LINUX_FIELD_u32_u64(field) __u32 field, field ## _padding | ||
| 45 | # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \ | ||
| 46 | field = (intptr_t)v, field ## _padding = 0 | ||
| 47 | # endif | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #endif /* _UAPI_LINUX_TYPES_32_64_H */ | ||
diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h index 13d98e6e0db1..74e520fb944f 100644 --- a/include/uapi/linux/usb/audio.h +++ b/include/uapi/linux/usb/audio.h | |||
| @@ -230,6 +230,14 @@ struct uac1_output_terminal_descriptor { | |||
| 230 | #define UAC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306 | 230 | #define UAC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306 |
| 231 | #define UAC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307 | 231 | #define UAC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307 |
| 232 | 232 | ||
| 233 | /* Terminals - 2.4 Bi-directional Terminal Types */ | ||
| 234 | #define UAC_BIDIR_TERMINAL_UNDEFINED 0x400 | ||
| 235 | #define UAC_BIDIR_TERMINAL_HANDSET 0x401 | ||
| 236 | #define UAC_BIDIR_TERMINAL_HEADSET 0x402 | ||
| 237 | #define UAC_BIDIR_TERMINAL_SPEAKER_PHONE 0x403 | ||
| 238 | #define UAC_BIDIR_TERMINAL_ECHO_SUPPRESSING 0x404 | ||
| 239 | #define UAC_BIDIR_TERMINAL_ECHO_CANCELING 0x405 | ||
| 240 | |||
| 233 | /* Set bControlSize = 2 as default setting */ | 241 | /* Set bControlSize = 2 as default setting */ |
| 234 | #define UAC_DT_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 2) | 242 | #define UAC_DT_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 2) |
| 235 | 243 | ||
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index 308e2096291f..449132c76b1c 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h | |||
| @@ -45,11 +45,14 @@ | |||
| 45 | /* We've given up on this device. */ | 45 | /* We've given up on this device. */ |
| 46 | #define VIRTIO_CONFIG_S_FAILED 0x80 | 46 | #define VIRTIO_CONFIG_S_FAILED 0x80 |
| 47 | 47 | ||
| 48 | /* Some virtio feature bits (currently bits 28 through 32) are reserved for the | 48 | /* |
| 49 | * transport being used (eg. virtio_ring), the rest are per-device feature | 49 | * Virtio feature bits VIRTIO_TRANSPORT_F_START through |
| 50 | * bits. */ | 50 | * VIRTIO_TRANSPORT_F_END are reserved for the transport |
| 51 | * being used (e.g. virtio_ring, virtio_pci etc.), the | ||
| 52 | * rest are per-device feature bits. | ||
| 53 | */ | ||
| 51 | #define VIRTIO_TRANSPORT_F_START 28 | 54 | #define VIRTIO_TRANSPORT_F_START 28 |
| 52 | #define VIRTIO_TRANSPORT_F_END 34 | 55 | #define VIRTIO_TRANSPORT_F_END 38 |
| 53 | 56 | ||
| 54 | #ifndef VIRTIO_CONFIG_NO_LEGACY | 57 | #ifndef VIRTIO_CONFIG_NO_LEGACY |
| 55 | /* Do we get callbacks when the ring is completely used, even if we've | 58 | /* Do we get callbacks when the ring is completely used, even if we've |
| @@ -71,4 +74,9 @@ | |||
| 71 | * this is for compatibility with legacy systems. | 74 | * this is for compatibility with legacy systems. |
| 72 | */ | 75 | */ |
| 73 | #define VIRTIO_F_IOMMU_PLATFORM 33 | 76 | #define VIRTIO_F_IOMMU_PLATFORM 33 |
| 77 | |||
| 78 | /* | ||
| 79 | * Does the device support Single Root I/O Virtualization? | ||
| 80 | */ | ||
| 81 | #define VIRTIO_F_SR_IOV 37 | ||
| 74 | #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */ | 82 | #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */ |
diff --git a/include/video/auo_k190xfb.h b/include/video/auo_k190xfb.h deleted file mode 100644 index ac329ee1d753..000000000000 --- a/include/video/auo_k190xfb.h +++ /dev/null | |||
| @@ -1,107 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Definitions for AUO-K190X framebuffer drivers | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _LINUX_VIDEO_AUO_K190XFB_H_ | ||
| 12 | #define _LINUX_VIDEO_AUO_K190XFB_H_ | ||
| 13 | |||
| 14 | /* Controller standby command needs a param */ | ||
| 15 | #define AUOK190X_QUIRK_STANDBYPARAM (1 << 0) | ||
| 16 | |||
| 17 | /* Controller standby is completely broken */ | ||
| 18 | #define AUOK190X_QUIRK_STANDBYBROKEN (1 << 1) | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Resolutions for the displays | ||
| 22 | */ | ||
| 23 | #define AUOK190X_RESOLUTION_800_600 0 | ||
| 24 | #define AUOK190X_RESOLUTION_1024_768 1 | ||
| 25 | #define AUOK190X_RESOLUTION_600_800 4 | ||
| 26 | #define AUOK190X_RESOLUTION_768_1024 5 | ||
| 27 | |||
| 28 | /* | ||
| 29 | * struct used by auok190x. board specific stuff comes from *board | ||
| 30 | */ | ||
| 31 | struct auok190xfb_par { | ||
| 32 | struct fb_info *info; | ||
| 33 | struct auok190x_board *board; | ||
| 34 | |||
| 35 | struct regulator *regulator; | ||
| 36 | |||
| 37 | struct mutex io_lock; | ||
| 38 | struct delayed_work work; | ||
| 39 | wait_queue_head_t waitq; | ||
| 40 | int resolution; | ||
| 41 | int rotation; | ||
| 42 | int consecutive_threshold; | ||
| 43 | int update_cnt; | ||
| 44 | |||
| 45 | /* panel and controller informations */ | ||
| 46 | int epd_type; | ||
| 47 | int panel_size_int; | ||
| 48 | int panel_size_float; | ||
| 49 | int panel_model; | ||
| 50 | int tcon_version; | ||
| 51 | int lut_version; | ||
| 52 | |||
| 53 | /* individual controller callbacks */ | ||
| 54 | void (*update_partial)(struct auok190xfb_par *par, u16 y1, u16 y2); | ||
| 55 | void (*update_all)(struct auok190xfb_par *par); | ||
| 56 | bool (*need_refresh)(struct auok190xfb_par *par); | ||
| 57 | void (*init)(struct auok190xfb_par *par); | ||
| 58 | void (*recover)(struct auok190xfb_par *par); | ||
| 59 | |||
| 60 | int update_mode; /* mode to use for updates */ | ||
| 61 | int last_mode; /* update mode last used */ | ||
| 62 | int flash; | ||
| 63 | |||
| 64 | /* power management */ | ||
| 65 | int autosuspend_delay; | ||
| 66 | bool standby; | ||
| 67 | bool manual_standby; | ||
| 68 | }; | ||
| 69 | |||
| 70 | /** | ||
| 71 | * Board specific platform-data | ||
| 72 | * @init: initialize the controller interface | ||
| 73 | * @cleanup: cleanup the controller interface | ||
| 74 | * @wait_for_rdy: wait until the controller is not busy anymore | ||
| 75 | * @set_ctl: change an interface control | ||
| 76 | * @set_hdb: write a value to the data register | ||
| 77 | * @get_hdb: read a value from the data register | ||
| 78 | * @setup_irq: method to setup the irq handling on the busy gpio | ||
| 79 | * @gpio_nsleep: sleep gpio | ||
| 80 | * @gpio_nrst: reset gpio | ||
| 81 | * @gpio_nbusy: busy gpio | ||
| 82 | * @resolution: one of the AUOK190X_RESOLUTION constants | ||
| 83 | * @rotation: rotation of the framebuffer | ||
| 84 | * @quirks: controller quirks to honor | ||
| 85 | * @fps: frames per second for defio | ||
| 86 | */ | ||
| 87 | struct auok190x_board { | ||
| 88 | int (*init)(struct auok190xfb_par *); | ||
| 89 | void (*cleanup)(struct auok190xfb_par *); | ||
| 90 | int (*wait_for_rdy)(struct auok190xfb_par *); | ||
| 91 | |||
| 92 | void (*set_ctl)(struct auok190xfb_par *, unsigned char, u8); | ||
| 93 | void (*set_hdb)(struct auok190xfb_par *, u16); | ||
| 94 | u16 (*get_hdb)(struct auok190xfb_par *); | ||
| 95 | |||
| 96 | int (*setup_irq)(struct fb_info *); | ||
| 97 | |||
| 98 | int gpio_nsleep; | ||
| 99 | int gpio_nrst; | ||
| 100 | int gpio_nbusy; | ||
| 101 | |||
| 102 | int resolution; | ||
| 103 | int quirks; | ||
| 104 | int fps; | ||
| 105 | }; | ||
| 106 | |||
| 107 | #endif | ||
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h index f706b0fed399..84aa976ca4ea 100644 --- a/include/video/sh_mobile_lcdc.h +++ b/include/video/sh_mobile_lcdc.h | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | #define __ASM_SH_MOBILE_LCDC_H__ | 3 | #define __ASM_SH_MOBILE_LCDC_H__ |
| 4 | 4 | ||
| 5 | #include <linux/fb.h> | 5 | #include <linux/fb.h> |
| 6 | #include <video/sh_mobile_meram.h> | ||
| 7 | 6 | ||
| 8 | /* Register definitions */ | 7 | /* Register definitions */ |
| 9 | #define _LDDCKR 0x410 | 8 | #define _LDDCKR 0x410 |
| @@ -184,7 +183,6 @@ struct sh_mobile_lcdc_chan_cfg { | |||
| 184 | struct sh_mobile_lcdc_panel_cfg panel_cfg; | 183 | struct sh_mobile_lcdc_panel_cfg panel_cfg; |
| 185 | struct sh_mobile_lcdc_bl_info bl_info; | 184 | struct sh_mobile_lcdc_bl_info bl_info; |
| 186 | struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */ | 185 | struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */ |
| 187 | const struct sh_mobile_meram_cfg *meram_cfg; | ||
| 188 | 186 | ||
| 189 | struct platform_device *tx_dev; /* HDMI/DSI transmitter device */ | 187 | struct platform_device *tx_dev; /* HDMI/DSI transmitter device */ |
| 190 | }; | 188 | }; |
| @@ -193,7 +191,6 @@ struct sh_mobile_lcdc_info { | |||
| 193 | int clock_source; | 191 | int clock_source; |
| 194 | struct sh_mobile_lcdc_chan_cfg ch[2]; | 192 | struct sh_mobile_lcdc_chan_cfg ch[2]; |
| 195 | struct sh_mobile_lcdc_overlay_cfg overlays[4]; | 193 | struct sh_mobile_lcdc_overlay_cfg overlays[4]; |
| 196 | struct sh_mobile_meram_info *meram_dev; | ||
| 197 | }; | 194 | }; |
| 198 | 195 | ||
| 199 | #endif /* __ASM_SH_MOBILE_LCDC_H__ */ | 196 | #endif /* __ASM_SH_MOBILE_LCDC_H__ */ |
diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h deleted file mode 100644 index f4efc21e205d..000000000000 --- a/include/video/sh_mobile_meram.h +++ /dev/null | |||
| @@ -1,95 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef __VIDEO_SH_MOBILE_MERAM_H__ | ||
| 3 | #define __VIDEO_SH_MOBILE_MERAM_H__ | ||
| 4 | |||
| 5 | /* For sh_mobile_meram_info.addr_mode */ | ||
| 6 | enum { | ||
| 7 | SH_MOBILE_MERAM_MODE0 = 0, | ||
| 8 | SH_MOBILE_MERAM_MODE1 | ||
| 9 | }; | ||
| 10 | |||
| 11 | enum { | ||
| 12 | SH_MOBILE_MERAM_PF_NV = 0, | ||
| 13 | SH_MOBILE_MERAM_PF_RGB, | ||
| 14 | SH_MOBILE_MERAM_PF_NV24 | ||
| 15 | }; | ||
| 16 | |||
| 17 | |||
| 18 | struct sh_mobile_meram_priv; | ||
| 19 | |||
| 20 | /* | ||
| 21 | * struct sh_mobile_meram_info - MERAM platform data | ||
| 22 | * @reserved_icbs: Bitmask of reserved ICBs (for instance used through UIO) | ||
| 23 | */ | ||
| 24 | struct sh_mobile_meram_info { | ||
| 25 | int addr_mode; | ||
| 26 | u32 reserved_icbs; | ||
| 27 | struct sh_mobile_meram_priv *priv; | ||
| 28 | struct platform_device *pdev; | ||
| 29 | }; | ||
| 30 | |||
| 31 | /* icb config */ | ||
| 32 | struct sh_mobile_meram_icb_cfg { | ||
| 33 | unsigned int meram_size; /* MERAM Buffer Size to use */ | ||
| 34 | }; | ||
| 35 | |||
| 36 | struct sh_mobile_meram_cfg { | ||
| 37 | struct sh_mobile_meram_icb_cfg icb[2]; | ||
| 38 | }; | ||
| 39 | |||
| 40 | #if defined(CONFIG_FB_SH_MOBILE_MERAM) || \ | ||
| 41 | defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE) | ||
| 42 | unsigned long sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, | ||
| 43 | size_t size); | ||
| 44 | void sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev, | ||
| 45 | unsigned long mem, size_t size); | ||
| 46 | void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, | ||
| 47 | const struct sh_mobile_meram_cfg *cfg, | ||
| 48 | unsigned int xres, unsigned int yres, | ||
| 49 | unsigned int pixelformat, | ||
| 50 | unsigned int *pitch); | ||
| 51 | void sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data); | ||
| 52 | void sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data, | ||
| 53 | unsigned long base_addr_y, | ||
| 54 | unsigned long base_addr_c, | ||
| 55 | unsigned long *icb_addr_y, | ||
| 56 | unsigned long *icb_addr_c); | ||
| 57 | #else | ||
| 58 | static inline unsigned long | ||
| 59 | sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, size_t size) | ||
| 60 | { | ||
| 61 | return 0; | ||
| 62 | } | ||
| 63 | |||
| 64 | static inline void | ||
| 65 | sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev, | ||
| 66 | unsigned long mem, size_t size) | ||
| 67 | { | ||
| 68 | } | ||
| 69 | |||
| 70 | static inline void * | ||
| 71 | sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, | ||
| 72 | const struct sh_mobile_meram_cfg *cfg, | ||
| 73 | unsigned int xres, unsigned int yres, | ||
| 74 | unsigned int pixelformat, | ||
| 75 | unsigned int *pitch) | ||
| 76 | { | ||
| 77 | return ERR_PTR(-ENODEV); | ||
| 78 | } | ||
| 79 | |||
| 80 | static inline void | ||
| 81 | sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data) | ||
| 82 | { | ||
| 83 | } | ||
| 84 | |||
| 85 | static inline void | ||
| 86 | sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data, | ||
| 87 | unsigned long base_addr_y, | ||
| 88 | unsigned long base_addr_c, | ||
| 89 | unsigned long *icb_addr_y, | ||
| 90 | unsigned long *icb_addr_c) | ||
| 91 | { | ||
| 92 | } | ||
| 93 | #endif | ||
| 94 | |||
| 95 | #endif /* __VIDEO_SH_MOBILE_MERAM_H__ */ | ||
diff --git a/include/xen/interface/io/kbdif.h b/include/xen/interface/io/kbdif.h index 2a9510ade701..e2340a4130cf 100644 --- a/include/xen/interface/io/kbdif.h +++ b/include/xen/interface/io/kbdif.h | |||
| @@ -317,7 +317,7 @@ struct xenkbd_position { | |||
| 317 | * Linux [2] and Windows [3] multi-touch support. | 317 | * Linux [2] and Windows [3] multi-touch support. |
| 318 | * | 318 | * |
| 319 | * [1] https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml | 319 | * [1] https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml |
| 320 | * [2] https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt | 320 | * [2] https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.rst |
| 321 | * [3] https://msdn.microsoft.com/en-us/library/jj151564(v=vs.85).aspx | 321 | * [3] https://msdn.microsoft.com/en-us/library/jj151564(v=vs.85).aspx |
| 322 | * | 322 | * |
| 323 | * | 323 | * |
diff --git a/include/xen/xen.h b/include/xen/xen.h index 9d4340c907d1..1e1d9bd0bd37 100644 --- a/include/xen/xen.h +++ b/include/xen/xen.h | |||
| @@ -25,12 +25,16 @@ extern bool xen_pvh; | |||
| 25 | #define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) | 25 | #define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) |
| 26 | #define xen_pvh_domain() (xen_pvh) | 26 | #define xen_pvh_domain() (xen_pvh) |
| 27 | 27 | ||
| 28 | #include <linux/types.h> | ||
| 29 | |||
| 30 | extern uint32_t xen_start_flags; | ||
| 31 | |||
| 28 | #ifdef CONFIG_XEN_DOM0 | 32 | #ifdef CONFIG_XEN_DOM0 |
| 29 | #include <xen/interface/xen.h> | 33 | #include <xen/interface/xen.h> |
| 30 | #include <asm/xen/hypervisor.h> | 34 | #include <asm/xen/hypervisor.h> |
| 31 | 35 | ||
| 32 | #define xen_initial_domain() (xen_domain() && \ | 36 | #define xen_initial_domain() (xen_domain() && \ |
| 33 | xen_start_info && xen_start_info->flags & SIF_INITDOMAIN) | 37 | (xen_start_flags & SIF_INITDOMAIN)) |
| 34 | #else /* !CONFIG_XEN_DOM0 */ | 38 | #else /* !CONFIG_XEN_DOM0 */ |
| 35 | #define xen_initial_domain() (0) | 39 | #define xen_initial_domain() (0) |
| 36 | #endif /* CONFIG_XEN_DOM0 */ | 40 | #endif /* CONFIG_XEN_DOM0 */ |
