diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i2c.h | 6 | ||||
| -rw-r--r-- | include/linux/iopoll.h | 144 | ||||
| -rw-r--r-- | include/linux/iova.h | 41 | ||||
| -rw-r--r-- | include/linux/kernel.h | 2 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/s2mps13.h | 2 | ||||
| -rw-r--r-- | include/linux/mm.h | 6 | ||||
| -rw-r--r-- | include/linux/oom.h | 5 | ||||
| -rw-r--r-- | include/linux/perf_event.h | 6 | ||||
| -rw-r--r-- | include/linux/platform_data/ipmmu-vmsa.h | 24 | ||||
| -rw-r--r-- | include/linux/printk.h | 15 | ||||
| -rw-r--r-- | include/linux/quota.h | 47 | ||||
| -rw-r--r-- | include/linux/quotaops.h | 4 |
12 files changed, 253 insertions, 49 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index e3a1721c8354..7c7695940ddd 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -228,7 +228,9 @@ struct i2c_client { | |||
| 228 | struct device dev; /* the device structure */ | 228 | struct device dev; /* the device structure */ |
| 229 | int irq; /* irq issued by device */ | 229 | int irq; /* irq issued by device */ |
| 230 | struct list_head detected; | 230 | struct list_head detected; |
| 231 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
| 231 | i2c_slave_cb_t slave_cb; /* callback for slave mode */ | 232 | i2c_slave_cb_t slave_cb; /* callback for slave mode */ |
| 233 | #endif | ||
| 232 | }; | 234 | }; |
| 233 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) | 235 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) |
| 234 | 236 | ||
| @@ -253,6 +255,7 @@ static inline void i2c_set_clientdata(struct i2c_client *dev, void *data) | |||
| 253 | 255 | ||
| 254 | /* I2C slave support */ | 256 | /* I2C slave support */ |
| 255 | 257 | ||
| 258 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
| 256 | enum i2c_slave_event { | 259 | enum i2c_slave_event { |
| 257 | I2C_SLAVE_REQ_READ_START, | 260 | I2C_SLAVE_REQ_READ_START, |
| 258 | I2C_SLAVE_REQ_READ_END, | 261 | I2C_SLAVE_REQ_READ_END, |
| @@ -269,6 +272,7 @@ static inline int i2c_slave_event(struct i2c_client *client, | |||
| 269 | { | 272 | { |
| 270 | return client->slave_cb(client, event, val); | 273 | return client->slave_cb(client, event, val); |
| 271 | } | 274 | } |
| 275 | #endif | ||
| 272 | 276 | ||
| 273 | /** | 277 | /** |
| 274 | * struct i2c_board_info - template for device creation | 278 | * struct i2c_board_info - template for device creation |
| @@ -404,8 +408,10 @@ struct i2c_algorithm { | |||
| 404 | /* To determine what the adapter supports */ | 408 | /* To determine what the adapter supports */ |
| 405 | u32 (*functionality) (struct i2c_adapter *); | 409 | u32 (*functionality) (struct i2c_adapter *); |
| 406 | 410 | ||
| 411 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
| 407 | int (*reg_slave)(struct i2c_client *client); | 412 | int (*reg_slave)(struct i2c_client *client); |
| 408 | int (*unreg_slave)(struct i2c_client *client); | 413 | int (*unreg_slave)(struct i2c_client *client); |
| 414 | #endif | ||
| 409 | }; | 415 | }; |
| 410 | 416 | ||
| 411 | /** | 417 | /** |
diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h new file mode 100644 index 000000000000..1c30014ed176 --- /dev/null +++ b/include/linux/iopoll.h | |||
| @@ -0,0 +1,144 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. | ||
| 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 and | ||
| 6 | * only version 2 as published by the Free Software Foundation. | ||
| 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 | |||
| 15 | #ifndef _LINUX_IOPOLL_H | ||
| 16 | #define _LINUX_IOPOLL_H | ||
| 17 | |||
| 18 | #include <linux/kernel.h> | ||
| 19 | #include <linux/types.h> | ||
| 20 | #include <linux/hrtimer.h> | ||
| 21 | #include <linux/delay.h> | ||
| 22 | #include <linux/errno.h> | ||
| 23 | #include <linux/io.h> | ||
| 24 | |||
| 25 | /** | ||
| 26 | * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs | ||
| 27 | * @op: accessor function (takes @addr as its only argument) | ||
| 28 | * @addr: Address to poll | ||
| 29 | * @val: Variable to read the value into | ||
| 30 | * @cond: Break condition (usually involving @val) | ||
| 31 | * @sleep_us: Maximum time to sleep between reads in us (0 | ||
| 32 | * tight-loops). Should be less than ~20ms since usleep_range | ||
| 33 | * is used (see Documentation/timers/timers-howto.txt). | ||
| 34 | * @timeout_us: Timeout in us, 0 means never timeout | ||
| 35 | * | ||
| 36 | * Returns 0 on success and -ETIMEDOUT upon a timeout. In either | ||
| 37 | * case, the last read value at @addr is stored in @val. Must not | ||
| 38 | * be called from atomic context if sleep_us or timeout_us are used. | ||
| 39 | * | ||
| 40 | * When available, you'll probably want to use one of the specialized | ||
| 41 | * macros defined below rather than this macro directly. | ||
| 42 | */ | ||
| 43 | #define readx_poll_timeout(op, addr, val, cond, sleep_us, timeout_us) \ | ||
| 44 | ({ \ | ||
| 45 | ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \ | ||
| 46 | might_sleep_if(sleep_us); \ | ||
| 47 | for (;;) { \ | ||
| 48 | (val) = op(addr); \ | ||
| 49 | if (cond) \ | ||
| 50 | break; \ | ||
| 51 | if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \ | ||
| 52 | (val) = op(addr); \ | ||
| 53 | break; \ | ||
| 54 | } \ | ||
| 55 | if (sleep_us) \ | ||
| 56 | usleep_range((sleep_us >> 2) + 1, sleep_us); \ | ||
| 57 | } \ | ||
| 58 | (cond) ? 0 : -ETIMEDOUT; \ | ||
| 59 | }) | ||
| 60 | |||
| 61 | /** | ||
| 62 | * readx_poll_timeout_atomic - Periodically poll an address until a condition is met or a timeout occurs | ||
| 63 | * @op: accessor function (takes @addr as its only argument) | ||
| 64 | * @addr: Address to poll | ||
| 65 | * @val: Variable to read the value into | ||
| 66 | * @cond: Break condition (usually involving @val) | ||
| 67 | * @delay_us: Time to udelay between reads in us (0 tight-loops). Should | ||
| 68 | * be less than ~10us since udelay is used (see | ||
| 69 | * Documentation/timers/timers-howto.txt). | ||
| 70 | * @timeout_us: Timeout in us, 0 means never timeout | ||
| 71 | * | ||
| 72 | * Returns 0 on success and -ETIMEDOUT upon a timeout. In either | ||
| 73 | * case, the last read value at @addr is stored in @val. | ||
| 74 | * | ||
| 75 | * When available, you'll probably want to use one of the specialized | ||
| 76 | * macros defined below rather than this macro directly. | ||
| 77 | */ | ||
| 78 | #define readx_poll_timeout_atomic(op, addr, val, cond, delay_us, timeout_us) \ | ||
| 79 | ({ \ | ||
| 80 | ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \ | ||
| 81 | for (;;) { \ | ||
| 82 | (val) = op(addr); \ | ||
| 83 | if (cond) \ | ||
| 84 | break; \ | ||
| 85 | if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \ | ||
| 86 | (val) = op(addr); \ | ||
| 87 | break; \ | ||
| 88 | } \ | ||
| 89 | if (delay_us) \ | ||
| 90 | udelay(delay_us); \ | ||
| 91 | } \ | ||
| 92 | (cond) ? 0 : -ETIMEDOUT; \ | ||
| 93 | }) | ||
| 94 | |||
| 95 | |||
| 96 | #define readb_poll_timeout(addr, val, cond, delay_us, timeout_us) \ | ||
| 97 | readx_poll_timeout(readb, addr, val, cond, delay_us, timeout_us) | ||
| 98 | |||
| 99 | #define readb_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \ | ||
| 100 | readx_poll_timeout_atomic(readb, addr, val, cond, delay_us, timeout_us) | ||
| 101 | |||
| 102 | #define readw_poll_timeout(addr, val, cond, delay_us, timeout_us) \ | ||
| 103 | readx_poll_timeout(readw, addr, val, cond, delay_us, timeout_us) | ||
| 104 | |||
| 105 | #define readw_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \ | ||
| 106 | readx_poll_timeout_atomic(readw, addr, val, cond, delay_us, timeout_us) | ||
| 107 | |||
| 108 | #define readl_poll_timeout(addr, val, cond, delay_us, timeout_us) \ | ||
| 109 | readx_poll_timeout(readl, addr, val, cond, delay_us, timeout_us) | ||
| 110 | |||
| 111 | #define readl_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \ | ||
| 112 | readx_poll_timeout_atomic(readl, addr, val, cond, delay_us, timeout_us) | ||
| 113 | |||
| 114 | #define readq_poll_timeout(addr, val, cond, delay_us, timeout_us) \ | ||
| 115 | readx_poll_timeout(readq, addr, val, cond, delay_us, timeout_us) | ||
| 116 | |||
| 117 | #define readq_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \ | ||
| 118 | readx_poll_timeout_atomic(readq, addr, val, cond, delay_us, timeout_us) | ||
| 119 | |||
| 120 | #define readb_relaxed_poll_timeout(addr, val, cond, delay_us, timeout_us) \ | ||
| 121 | readx_poll_timeout(readb_relaxed, addr, val, cond, delay_us, timeout_us) | ||
| 122 | |||
| 123 | #define readb_relaxed_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \ | ||
| 124 | readx_poll_timeout_atomic(readb_relaxed, addr, val, cond, delay_us, timeout_us) | ||
| 125 | |||
| 126 | #define readw_relaxed_poll_timeout(addr, val, cond, delay_us, timeout_us) \ | ||
| 127 | readx_poll_timeout(readw_relaxed, addr, val, cond, delay_us, timeout_us) | ||
| 128 | |||
| 129 | #define readw_relaxed_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \ | ||
| 130 | readx_poll_timeout_atomic(readw_relaxed, addr, val, cond, delay_us, timeout_us) | ||
| 131 | |||
| 132 | #define readl_relaxed_poll_timeout(addr, val, cond, delay_us, timeout_us) \ | ||
| 133 | readx_poll_timeout(readl_relaxed, addr, val, cond, delay_us, timeout_us) | ||
| 134 | |||
| 135 | #define readl_relaxed_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \ | ||
| 136 | readx_poll_timeout_atomic(readl_relaxed, addr, val, cond, delay_us, timeout_us) | ||
| 137 | |||
| 138 | #define readq_relaxed_poll_timeout(addr, val, cond, delay_us, timeout_us) \ | ||
| 139 | readx_poll_timeout(readq_relaxed, addr, val, cond, delay_us, timeout_us) | ||
| 140 | |||
| 141 | #define readq_relaxed_poll_timeout_atomic(addr, val, cond, delay_us, timeout_us) \ | ||
| 142 | readx_poll_timeout_atomic(readq_relaxed, addr, val, cond, delay_us, timeout_us) | ||
| 143 | |||
| 144 | #endif /* _LINUX_IOPOLL_H */ | ||
diff --git a/include/linux/iova.h b/include/linux/iova.h index 19e81d5ccb6d..3920a19d8194 100644 --- a/include/linux/iova.h +++ b/include/linux/iova.h | |||
| @@ -16,9 +16,6 @@ | |||
| 16 | #include <linux/rbtree.h> | 16 | #include <linux/rbtree.h> |
| 17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
| 18 | 18 | ||
| 19 | /* IO virtual address start page frame number */ | ||
| 20 | #define IOVA_START_PFN (1) | ||
| 21 | |||
| 22 | /* iova structure */ | 19 | /* iova structure */ |
| 23 | struct iova { | 20 | struct iova { |
| 24 | struct rb_node node; | 21 | struct rb_node node; |
| @@ -31,6 +28,8 @@ struct iova_domain { | |||
| 31 | spinlock_t iova_rbtree_lock; /* Lock to protect update of rbtree */ | 28 | spinlock_t iova_rbtree_lock; /* Lock to protect update of rbtree */ |
| 32 | struct rb_root rbroot; /* iova domain rbtree root */ | 29 | struct rb_root rbroot; /* iova domain rbtree root */ |
| 33 | struct rb_node *cached32_node; /* Save last alloced node */ | 30 | struct rb_node *cached32_node; /* Save last alloced node */ |
| 31 | unsigned long granule; /* pfn granularity for this domain */ | ||
| 32 | unsigned long start_pfn; /* Lower limit for this domain */ | ||
| 34 | unsigned long dma_32bit_pfn; | 33 | unsigned long dma_32bit_pfn; |
| 35 | }; | 34 | }; |
| 36 | 35 | ||
| @@ -39,6 +38,39 @@ static inline unsigned long iova_size(struct iova *iova) | |||
| 39 | return iova->pfn_hi - iova->pfn_lo + 1; | 38 | return iova->pfn_hi - iova->pfn_lo + 1; |
| 40 | } | 39 | } |
| 41 | 40 | ||
| 41 | static inline unsigned long iova_shift(struct iova_domain *iovad) | ||
| 42 | { | ||
| 43 | return __ffs(iovad->granule); | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline unsigned long iova_mask(struct iova_domain *iovad) | ||
| 47 | { | ||
| 48 | return iovad->granule - 1; | ||
| 49 | } | ||
| 50 | |||
| 51 | static inline size_t iova_offset(struct iova_domain *iovad, dma_addr_t iova) | ||
| 52 | { | ||
| 53 | return iova & iova_mask(iovad); | ||
| 54 | } | ||
| 55 | |||
| 56 | static inline size_t iova_align(struct iova_domain *iovad, size_t size) | ||
| 57 | { | ||
| 58 | return ALIGN(size, iovad->granule); | ||
| 59 | } | ||
| 60 | |||
| 61 | static inline dma_addr_t iova_dma_addr(struct iova_domain *iovad, struct iova *iova) | ||
| 62 | { | ||
| 63 | return (dma_addr_t)iova->pfn_lo << iova_shift(iovad); | ||
| 64 | } | ||
| 65 | |||
| 66 | static inline unsigned long iova_pfn(struct iova_domain *iovad, dma_addr_t iova) | ||
| 67 | { | ||
| 68 | return iova >> iova_shift(iovad); | ||
| 69 | } | ||
| 70 | |||
| 71 | int iommu_iova_cache_init(void); | ||
| 72 | void iommu_iova_cache_destroy(void); | ||
| 73 | |||
| 42 | struct iova *alloc_iova_mem(void); | 74 | struct iova *alloc_iova_mem(void); |
| 43 | void free_iova_mem(struct iova *iova); | 75 | void free_iova_mem(struct iova *iova); |
| 44 | void free_iova(struct iova_domain *iovad, unsigned long pfn); | 76 | void free_iova(struct iova_domain *iovad, unsigned long pfn); |
| @@ -49,7 +81,8 @@ struct iova *alloc_iova(struct iova_domain *iovad, unsigned long size, | |||
| 49 | struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo, | 81 | struct iova *reserve_iova(struct iova_domain *iovad, unsigned long pfn_lo, |
| 50 | unsigned long pfn_hi); | 82 | unsigned long pfn_hi); |
| 51 | void copy_reserved_iova(struct iova_domain *from, struct iova_domain *to); | 83 | void copy_reserved_iova(struct iova_domain *from, struct iova_domain *to); |
| 52 | void init_iova_domain(struct iova_domain *iovad, unsigned long pfn_32bit); | 84 | void init_iova_domain(struct iova_domain *iovad, unsigned long granule, |
| 85 | unsigned long start_pfn, unsigned long pfn_32bit); | ||
| 53 | struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn); | 86 | struct iova *find_iova(struct iova_domain *iovad, unsigned long pfn); |
| 54 | void put_iova_domain(struct iova_domain *iovad); | 87 | void put_iova_domain(struct iova_domain *iovad); |
| 55 | struct iova *split_and_remove_iova(struct iova_domain *iovad, | 88 | struct iova *split_and_remove_iova(struct iova_domain *iovad, |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5449d2f4a1ef..64ce58bee6f5 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -176,7 +176,7 @@ extern int _cond_resched(void); | |||
| 176 | */ | 176 | */ |
| 177 | # define might_sleep() \ | 177 | # define might_sleep() \ |
| 178 | do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) | 178 | do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) |
| 179 | # define sched_annotate_sleep() __set_current_state(TASK_RUNNING) | 179 | # define sched_annotate_sleep() (current->task_state_change = 0) |
| 180 | #else | 180 | #else |
| 181 | static inline void ___might_sleep(const char *file, int line, | 181 | static inline void ___might_sleep(const char *file, int line, |
| 182 | int preempt_offset) { } | 182 | int preempt_offset) { } |
diff --git a/include/linux/mfd/samsung/s2mps13.h b/include/linux/mfd/samsung/s2mps13.h index ce5dda8958fe..b1fd675fa36f 100644 --- a/include/linux/mfd/samsung/s2mps13.h +++ b/include/linux/mfd/samsung/s2mps13.h | |||
| @@ -59,6 +59,7 @@ enum s2mps13_reg { | |||
| 59 | S2MPS13_REG_B6CTRL, | 59 | S2MPS13_REG_B6CTRL, |
| 60 | S2MPS13_REG_B6OUT, | 60 | S2MPS13_REG_B6OUT, |
| 61 | S2MPS13_REG_B7CTRL, | 61 | S2MPS13_REG_B7CTRL, |
| 62 | S2MPS13_REG_B7SW, | ||
| 62 | S2MPS13_REG_B7OUT, | 63 | S2MPS13_REG_B7OUT, |
| 63 | S2MPS13_REG_B8CTRL, | 64 | S2MPS13_REG_B8CTRL, |
| 64 | S2MPS13_REG_B8OUT, | 65 | S2MPS13_REG_B8OUT, |
| @@ -102,6 +103,7 @@ enum s2mps13_reg { | |||
| 102 | S2MPS13_REG_L26CTRL, | 103 | S2MPS13_REG_L26CTRL, |
| 103 | S2MPS13_REG_L27CTRL, | 104 | S2MPS13_REG_L27CTRL, |
| 104 | S2MPS13_REG_L28CTRL, | 105 | S2MPS13_REG_L28CTRL, |
| 106 | S2MPS13_REG_L29CTRL, | ||
| 105 | S2MPS13_REG_L30CTRL, | 107 | S2MPS13_REG_L30CTRL, |
| 106 | S2MPS13_REG_L31CTRL, | 108 | S2MPS13_REG_L31CTRL, |
| 107 | S2MPS13_REG_L32CTRL, | 109 | S2MPS13_REG_L32CTRL, |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 80fc92a49649..dd5ea3016fc4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -1070,6 +1070,7 @@ static inline int page_mapped(struct page *page) | |||
| 1070 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 1070 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
| 1071 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ | 1071 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ |
| 1072 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ | 1072 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ |
| 1073 | #define VM_FAULT_SIGSEGV 0x0040 | ||
| 1073 | 1074 | ||
| 1074 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 1075 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
| 1075 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 1076 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
| @@ -1078,8 +1079,9 @@ static inline int page_mapped(struct page *page) | |||
| 1078 | 1079 | ||
| 1079 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ | 1080 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ |
| 1080 | 1081 | ||
| 1081 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ | 1082 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \ |
| 1082 | VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE) | 1083 | VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \ |
| 1084 | VM_FAULT_FALLBACK) | ||
| 1083 | 1085 | ||
| 1084 | /* Encode hstate index for a hwpoisoned large page */ | 1086 | /* Encode hstate index for a hwpoisoned large page */ |
| 1085 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) | 1087 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) |
diff --git a/include/linux/oom.h b/include/linux/oom.h index 853698c721f7..76200984d1e2 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
| @@ -85,11 +85,6 @@ static inline void oom_killer_enable(void) | |||
| 85 | oom_killer_disabled = false; | 85 | oom_killer_disabled = false; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | static inline bool oom_gfp_allowed(gfp_t gfp_mask) | ||
| 89 | { | ||
| 90 | return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY); | ||
| 91 | } | ||
| 92 | |||
| 93 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); | 88 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); |
| 94 | 89 | ||
| 95 | static inline bool task_will_free_mem(struct task_struct *task) | 90 | static inline bool task_will_free_mem(struct task_struct *task) |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 4f7a61ca4b39..664de5a4ec46 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -450,11 +450,6 @@ struct perf_event { | |||
| 450 | #endif /* CONFIG_PERF_EVENTS */ | 450 | #endif /* CONFIG_PERF_EVENTS */ |
| 451 | }; | 451 | }; |
| 452 | 452 | ||
| 453 | enum perf_event_context_type { | ||
| 454 | task_context, | ||
| 455 | cpu_context, | ||
| 456 | }; | ||
| 457 | |||
| 458 | /** | 453 | /** |
| 459 | * struct perf_event_context - event context structure | 454 | * struct perf_event_context - event context structure |
| 460 | * | 455 | * |
| @@ -462,7 +457,6 @@ enum perf_event_context_type { | |||
| 462 | */ | 457 | */ |
| 463 | struct perf_event_context { | 458 | struct perf_event_context { |
| 464 | struct pmu *pmu; | 459 | struct pmu *pmu; |
| 465 | enum perf_event_context_type type; | ||
| 466 | /* | 460 | /* |
| 467 | * Protect the states of the events in the list, | 461 | * Protect the states of the events in the list, |
| 468 | * nr_active, and the list: | 462 | * nr_active, and the list: |
diff --git a/include/linux/platform_data/ipmmu-vmsa.h b/include/linux/platform_data/ipmmu-vmsa.h deleted file mode 100644 index 5275b3ac6d37..000000000000 --- a/include/linux/platform_data/ipmmu-vmsa.h +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * IPMMU VMSA Platform Data | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Renesas Electronics Corporation | ||
| 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 as published by | ||
| 8 | * the Free Software Foundation; version 2 of the License. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __IPMMU_VMSA_H__ | ||
| 12 | #define __IPMMU_VMSA_H__ | ||
| 13 | |||
| 14 | struct ipmmu_vmsa_master { | ||
| 15 | const char *name; | ||
| 16 | unsigned int utlb; | ||
| 17 | }; | ||
| 18 | |||
| 19 | struct ipmmu_vmsa_platform_data { | ||
| 20 | const struct ipmmu_vmsa_master *masters; | ||
| 21 | unsigned int num_masters; | ||
| 22 | }; | ||
| 23 | |||
| 24 | #endif /* __IPMMU_VMSA_H__ */ | ||
diff --git a/include/linux/printk.h b/include/linux/printk.h index c8f170324e64..4d5bf5726578 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -10,9 +10,6 @@ | |||
| 10 | extern const char linux_banner[]; | 10 | extern const char linux_banner[]; |
| 11 | extern const char linux_proc_banner[]; | 11 | extern const char linux_proc_banner[]; |
| 12 | 12 | ||
| 13 | extern char *log_buf_addr_get(void); | ||
| 14 | extern u32 log_buf_len_get(void); | ||
| 15 | |||
| 16 | static inline int printk_get_level(const char *buffer) | 13 | static inline int printk_get_level(const char *buffer) |
| 17 | { | 14 | { |
| 18 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { | 15 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { |
| @@ -163,6 +160,8 @@ extern int kptr_restrict; | |||
| 163 | 160 | ||
| 164 | extern void wake_up_klogd(void); | 161 | extern void wake_up_klogd(void); |
| 165 | 162 | ||
| 163 | char *log_buf_addr_get(void); | ||
| 164 | u32 log_buf_len_get(void); | ||
| 166 | void log_buf_kexec_setup(void); | 165 | void log_buf_kexec_setup(void); |
| 167 | void __init setup_log_buf(int early); | 166 | void __init setup_log_buf(int early); |
| 168 | void dump_stack_set_arch_desc(const char *fmt, ...); | 167 | void dump_stack_set_arch_desc(const char *fmt, ...); |
| @@ -198,6 +197,16 @@ static inline void wake_up_klogd(void) | |||
| 198 | { | 197 | { |
| 199 | } | 198 | } |
| 200 | 199 | ||
| 200 | static inline char *log_buf_addr_get(void) | ||
| 201 | { | ||
| 202 | return NULL; | ||
| 203 | } | ||
| 204 | |||
| 205 | static inline u32 log_buf_len_get(void) | ||
| 206 | { | ||
| 207 | return 0; | ||
| 208 | } | ||
| 209 | |||
| 201 | static inline void log_buf_kexec_setup(void) | 210 | static inline void log_buf_kexec_setup(void) |
| 202 | { | 211 | { |
| 203 | } | 212 | } |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 50978b781a19..097d7eb2441e 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
| @@ -321,6 +321,49 @@ struct dquot_operations { | |||
| 321 | 321 | ||
| 322 | struct path; | 322 | struct path; |
| 323 | 323 | ||
| 324 | /* Structure for communicating via ->get_dqblk() & ->set_dqblk() */ | ||
| 325 | struct qc_dqblk { | ||
| 326 | int d_fieldmask; /* mask of fields to change in ->set_dqblk() */ | ||
| 327 | u64 d_spc_hardlimit; /* absolute limit on used space */ | ||
| 328 | u64 d_spc_softlimit; /* preferred limit on used space */ | ||
| 329 | u64 d_ino_hardlimit; /* maximum # allocated inodes */ | ||
| 330 | u64 d_ino_softlimit; /* preferred inode limit */ | ||
| 331 | u64 d_space; /* Space owned by the user */ | ||
| 332 | u64 d_ino_count; /* # inodes owned by the user */ | ||
| 333 | s64 d_ino_timer; /* zero if within inode limits */ | ||
| 334 | /* if not, we refuse service */ | ||
| 335 | s64 d_spc_timer; /* similar to above; for space */ | ||
| 336 | int d_ino_warns; /* # warnings issued wrt num inodes */ | ||
| 337 | int d_spc_warns; /* # warnings issued wrt used space */ | ||
| 338 | u64 d_rt_spc_hardlimit; /* absolute limit on realtime space */ | ||
| 339 | u64 d_rt_spc_softlimit; /* preferred limit on RT space */ | ||
| 340 | u64 d_rt_space; /* realtime space owned */ | ||
| 341 | s64 d_rt_spc_timer; /* similar to above; for RT space */ | ||
| 342 | int d_rt_spc_warns; /* # warnings issued wrt RT space */ | ||
| 343 | }; | ||
| 344 | |||
| 345 | /* Field specifiers for ->set_dqblk() in struct qc_dqblk */ | ||
| 346 | #define QC_INO_SOFT (1<<0) | ||
| 347 | #define QC_INO_HARD (1<<1) | ||
| 348 | #define QC_SPC_SOFT (1<<2) | ||
| 349 | #define QC_SPC_HARD (1<<3) | ||
| 350 | #define QC_RT_SPC_SOFT (1<<4) | ||
| 351 | #define QC_RT_SPC_HARD (1<<5) | ||
| 352 | #define QC_LIMIT_MASK (QC_INO_SOFT | QC_INO_HARD | QC_SPC_SOFT | QC_SPC_HARD | \ | ||
| 353 | QC_RT_SPC_SOFT | QC_RT_SPC_HARD) | ||
| 354 | #define QC_SPC_TIMER (1<<6) | ||
| 355 | #define QC_INO_TIMER (1<<7) | ||
| 356 | #define QC_RT_SPC_TIMER (1<<8) | ||
| 357 | #define QC_TIMER_MASK (QC_SPC_TIMER | QC_INO_TIMER | QC_RT_SPC_TIMER) | ||
| 358 | #define QC_SPC_WARNS (1<<9) | ||
| 359 | #define QC_INO_WARNS (1<<10) | ||
| 360 | #define QC_RT_SPC_WARNS (1<<11) | ||
| 361 | #define QC_WARNS_MASK (QC_SPC_WARNS | QC_INO_WARNS | QC_RT_SPC_WARNS) | ||
| 362 | #define QC_SPACE (1<<12) | ||
| 363 | #define QC_INO_COUNT (1<<13) | ||
| 364 | #define QC_RT_SPACE (1<<14) | ||
| 365 | #define QC_ACCT_MASK (QC_SPACE | QC_INO_COUNT | QC_RT_SPACE) | ||
| 366 | |||
| 324 | /* Operations handling requests from userspace */ | 367 | /* Operations handling requests from userspace */ |
| 325 | struct quotactl_ops { | 368 | struct quotactl_ops { |
| 326 | int (*quota_on)(struct super_block *, int, int, struct path *); | 369 | int (*quota_on)(struct super_block *, int, int, struct path *); |
| @@ -329,8 +372,8 @@ struct quotactl_ops { | |||
| 329 | int (*quota_sync)(struct super_block *, int); | 372 | int (*quota_sync)(struct super_block *, int); |
| 330 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); | 373 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); |
| 331 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); | 374 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); |
| 332 | int (*get_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); | 375 | int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
| 333 | int (*set_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); | 376 | int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
| 334 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); | 377 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); |
| 335 | int (*set_xstate)(struct super_block *, unsigned int, int); | 378 | int (*set_xstate)(struct super_block *, unsigned int, int); |
| 336 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); | 379 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index f23538a6e411..29e3455f7d41 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -98,9 +98,9 @@ int dquot_quota_sync(struct super_block *sb, int type); | |||
| 98 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 98 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
| 99 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 99 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
| 100 | int dquot_get_dqblk(struct super_block *sb, struct kqid id, | 100 | int dquot_get_dqblk(struct super_block *sb, struct kqid id, |
| 101 | struct fs_disk_quota *di); | 101 | struct qc_dqblk *di); |
| 102 | int dquot_set_dqblk(struct super_block *sb, struct kqid id, | 102 | int dquot_set_dqblk(struct super_block *sb, struct kqid id, |
| 103 | struct fs_disk_quota *di); | 103 | struct qc_dqblk *di); |
| 104 | 104 | ||
| 105 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); | 105 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); |
| 106 | int dquot_transfer(struct inode *inode, struct iattr *iattr); | 106 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
