History

Merge v5.4-rc4 into drm-next

Thierry needs fd70c7755bf0 ("drm/bridge: tc358767: fix max_tu_symbol value") to be able to merge his dp_link patch series. Some adjacent changes conflicts, plus some clashes in i915 due to cherry-picking and git trying to be helpful and leaving both versions in.

Daniel Vetter committed 7 years ago

Commit 2e79e222 parents f1b4a92 7d194c2706 files · +6338 −6326Browse files

Showing the changes to include/linux (19 of 706 files). Show all

Unified · Split

19 files
  1. include/linux/bitmap.h +2 −1
  2. include/linux/compiler_attributes.h +17 −0
  3. include/linux/export.h +5 −5
  4. include/linux/gpio/driver.h +8 −0
  5. include/linux/hwmon.h +1 −1
  6. include/linux/leds.h +2 −3
  7. include/linux/memcontrol.h +29 −0
  8. include/linux/micrel_phy.h +1 −1
  9. include/linux/page_ext.h +9 −1
  10. include/linux/platform_device.h +2 −0
  11. include/linux/sched.h +1 −0
  12. include/linux/skbuff.h +3 −2
  13. include/linux/slab.h +4 −0
  14. include/linux/string.h +20 −1
  15. include/linux/sunrpc/xprtsock.h +1 −0
  16. include/linux/tcp.h +3 −3
  17. include/linux/tpm_eventlog.h +12 −4
  18. include/linux/uaccess.h +4 −2
  19. include/linux/xarray.h +2 −2
include/linux/bitmap.h+2−1
@@ -326,10 +326,11 @@ static inline int bitmap_equal(const unsigned long *src1, · 325 unmodified lines
326326 }
327327
328328 /**
329− * bitmap_or_equal - Check whether the or of two bitnaps is equal to a third
329+ * bitmap_or_equal - Check whether the or of two bitmaps is equal to a third
330330 * @src1: Pointer to bitmap 1
331331 * @src2: Pointer to bitmap 2 will be or'ed with bitmap 1
332332 * @src3: Pointer to bitmap 3. Compare to the result of *@src1 | *@src2
333+ * @nbits: number of bits in each of these bitmaps
333334 *
334335 * Returns: True if (*@src1 | *@src2) == *@src3, false otherwise
335336 */
include/linux/compiler_attributes.h+17−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
4040 # define __GCC4_has_attribute___noclone__ 1
4141 # define __GCC4_has_attribute___nonstring__ 0
4242 # define __GCC4_has_attribute___no_sanitize_address__ (__GNUC_MINOR__ >= 8)
43+# define __GCC4_has_attribute___fallthrough__ 0
4344 #endif
4445
4546 /*
@@ -185,6 +186,22 @@ · 139 unmodified lines
185186 # define __noclone
186187 #endif
187188
189+/*
190+ * Add the pseudo keyword 'fallthrough' so case statement blocks
191+ * must end with any of these keywords:
192+ * break;
193+ * fallthrough;
194+ * goto <label>;
195+ * return [expression];
196+ *
197+ * gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attributes
198+ */
199+#if __has_attribute(__fallthrough__)
200+# define fallthrough __attribute__((__fallthrough__))
201+#else
202+# define fallthrough do {} while (0) /* fallthrough */
203+#endif
204+
188205 /*
189206 * Note the missing underscores.
190207 *
include/linux/export.h+5−5
@@ -52,10 +52,10 @@ extern struct module __this_module; · 51 unmodified lines
5252 __ADDRESSABLE(sym) \
5353 asm(" .section \"___ksymtab" sec "+" #sym "\", \"a\" \n" \
5454 " .balign 4 \n" \
55− "__ksymtab_" #sym NS_SEPARATOR #ns ": \n" \
55+ "__ksymtab_" #ns NS_SEPARATOR #sym ": \n" \
5656 " .long " #sym "- . \n" \
5757 " .long __kstrtab_" #sym "- . \n" \
58− " .long __kstrtab_ns_" #sym "- . \n" \
58+ " .long __kstrtabns_" #sym "- . \n" \
5959 " .previous \n")
6060
6161 #define __KSYMTAB_ENTRY(sym, sec) \
@@ -76,10 +76,10 @@ struct kernel_symbol { · 14 unmodified lines
7676 #else
7777 #define __KSYMTAB_ENTRY_NS(sym, sec, ns) \
7878 static const struct kernel_symbol __ksymtab_##sym##__##ns \
79− asm("__ksymtab_" #sym NS_SEPARATOR #ns) \
79+ asm("__ksymtab_" #ns NS_SEPARATOR #sym) \
8080 __attribute__((section("___ksymtab" sec "+" #sym), used)) \
8181 __aligned(sizeof(void *)) \
82− = { (unsigned long)&sym, __kstrtab_##sym, __kstrtab_ns_##sym }
82+ = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym }
8383
8484 #define __KSYMTAB_ENTRY(sym, sec) \
8585 static const struct kernel_symbol __ksymtab_##sym \
@@ -112,7 +112,7 @@ struct kernel_symbol { · 26 unmodified lines
112112 /* For every exported symbol, place a struct in the __ksymtab section */
113113 #define ___EXPORT_SYMBOL_NS(sym, sec, ns) \
114114 ___export_symbol_common(sym, sec); \
115− static const char __kstrtab_ns_##sym[] \
115+ static const char __kstrtabns_##sym[] \
116116 __attribute__((section("__ksymtab_strings"), used, aligned(1))) \
117117 = #ns; \
118118 __KSYMTAB_ENTRY_NS(sym, sec, ns)
include/linux/gpio/driver.h+8−0
@@ -201,6 +201,14 @@ struct gpio_irq_chip { · 200 unmodified lines
201201 */
202202 bool threaded;
203203
204+ /**
205+ * @init_hw: optional routine to initialize hardware before
206+ * an IRQ chip will be added. This is quite useful when
207+ * a particular driver wants to clear IRQ related registers
208+ * in order to avoid undesired events.
209+ */
210+ int (*init_hw)(struct gpio_chip *chip);
211+
204212 /**
205213 * @init_valid_mask: optional routine to initialize @valid_mask, to be
206214 * used if not all GPIO lines are valid interrupts. Sometimes some
include/linux/hwmon.h+1−1
@@ -235,7 +235,7 @@ enum hwmon_power_attributes { · 234 unmodified lines
235235 #define HWMON_P_LABEL BIT(hwmon_power_label)
236236 #define HWMON_P_ALARM BIT(hwmon_power_alarm)
237237 #define HWMON_P_CAP_ALARM BIT(hwmon_power_cap_alarm)
238−#define HWMON_P_MIN_ALARM BIT(hwmon_power_max_alarm)
238+#define HWMON_P_MIN_ALARM BIT(hwmon_power_min_alarm)
239239 #define HWMON_P_MAX_ALARM BIT(hwmon_power_max_alarm)
240240 #define HWMON_P_LCRIT_ALARM BIT(hwmon_power_lcrit_alarm)
241241 #define HWMON_P_CRIT_ALARM BIT(hwmon_power_crit_alarm)
include/linux/leds.h+2−3
@@ -247,7 +247,7 @@ extern void led_set_brightness(struct led_classdev *led_cdev, · 246 unmodified lines
247247 /**
248248 * led_set_brightness_sync - set LED brightness synchronously
249249 * @led_cdev: the LED to set
250− * @brightness: the brightness to set it to
250+ * @value: the brightness to set it to
251251 *
252252 * Set an LED's brightness immediately. This function will block
253253 * the caller for the time required for accessing device registers,
@@ -301,8 +301,7 @@ extern void led_sysfs_enable(struct led_classdev *led_cdev); · 47 unmodified lines
301301 /**
302302 * led_compose_name - compose LED class device name
303303 * @dev: LED controller device object
304− * @child: child fwnode_handle describing a LED or a group of synchronized LEDs;
305− * it must be provided only for fwnode based LEDs
304+ * @init_data: the LED class device initialization data
306305 * @led_classdev_name: composed LED class device name
307306 *
308307 * Create LED class device name basing on the provided init_data argument.
include/linux/memcontrol.h+29−0
@@ -356,6 +356,19 @@ static inline bool mem_cgroup_disabled(void) · 355 unmodified lines
356356 return !cgroup_subsys_enabled(memory_cgrp_subsys);
357357 }
358358
359+static inline unsigned long mem_cgroup_protection(struct mem_cgroup *memcg,
360+ bool in_low_reclaim)
361+{
362+ if (mem_cgroup_disabled())
363+ return 0;
364+
365+ if (in_low_reclaim)
366+ return READ_ONCE(memcg->memory.emin);
367+
368+ return max(READ_ONCE(memcg->memory.emin),
369+ READ_ONCE(memcg->memory.elow));
370+}
371+
359372 enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root,
360373 struct mem_cgroup *memcg);
361374
@@ -537,6 +550,8 @@ void mem_cgroup_handle_over_high(void); · 175 unmodified lines
537550
538551 unsigned long mem_cgroup_get_max(struct mem_cgroup *memcg);
539552
553+unsigned long mem_cgroup_size(struct mem_cgroup *memcg);
554+
540555 void mem_cgroup_print_oom_context(struct mem_cgroup *memcg,
541556 struct task_struct *p);
542557
@@ -829,6 +844,12 @@ static inline void memcg_memory_event_mm(struct mm_struct *mm, · 286 unmodified lines
829844 {
830845 }
831846
847+static inline unsigned long mem_cgroup_protection(struct mem_cgroup *memcg,
848+ bool in_low_reclaim)
849+{
850+ return 0;
851+}
852+
832853 static inline enum mem_cgroup_protection mem_cgroup_protected(
833854 struct mem_cgroup *root, struct mem_cgroup *memcg)
834855 {
@@ -968,6 +989,11 @@ static inline unsigned long mem_cgroup_get_max(struct mem_cgroup *memcg) · 133 unmodified lines
968989 return 0;
969990 }
970991
992+static inline unsigned long mem_cgroup_size(struct mem_cgroup *memcg)
993+{
994+ return 0;
995+}
996+
971997 static inline void
972998 mem_cgroup_print_oom_context(struct mem_cgroup *memcg, struct task_struct *p)
973999 {
@@ -1264,6 +1290,9 @@ void mem_cgroup_track_foreign_dirty_slowpath(struct page *page, · 290 unmodified lines
12641290 static inline void mem_cgroup_track_foreign_dirty(struct page *page,
12651291 struct bdi_writeback *wb)
12661292 {
1293+ if (mem_cgroup_disabled())
1294+ return;
1295+
12671296 if (unlikely(&page->mem_cgroup->css != wb->memcg_css))
12681297 mem_cgroup_track_foreign_dirty_slowpath(page, wb);
12691298 }
include/linux/micrel_phy.h+1−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
3131 #define PHY_ID_KSZ886X 0x00221430
3232 #define PHY_ID_KSZ8863 0x00221435
3333
34−#define PHY_ID_KSZ8795 0x00221550
34+#define PHY_ID_KSZ87XX 0x00221550
3535
3636 #define PHY_ID_KSZ9477 0x00221631
3737
include/linux/page_ext.h+9−1
@@ -18,7 +18,7 @@ struct page_ext_operations { · 17 unmodified lines
1818
1919 enum page_ext_flags {
2020 PAGE_EXT_OWNER,
21− PAGE_EXT_OWNER_ACTIVE,
21+ PAGE_EXT_OWNER_ALLOCATED,
2222 #if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT)
2323 PAGE_EXT_YOUNG,
2424 PAGE_EXT_IDLE,
@@ -36,6 +36,7 @@ struct page_ext { · 11 unmodified lines
3636 unsigned long flags;
3737 };
3838
39+extern unsigned long page_ext_size;
3940 extern void pgdat_page_ext_init(struct pglist_data *pgdat);
4041
4142 #ifdef CONFIG_SPARSEMEM
@@ -52,6 +53,13 @@ static inline void page_ext_init(void) · 10 unmodified lines
5253
5354 struct page_ext *lookup_page_ext(const struct page *page);
5455
56+static inline struct page_ext *page_ext_next(struct page_ext *curr)
57+{
58+ void *next = curr;
59+ next += page_ext_size;
60+ return next;
61+}
62+
5563 #else /* !CONFIG_PAGE_EXTENSION */
5664 struct page_ext;
5765
include/linux/platform_device.h+2−0
@@ -64,6 +64,8 @@ extern struct resource *platform_get_resource_byname(struct platform_device *, · 63 unmodified lines
6464 unsigned int,
6565 const char *);
6666 extern int platform_get_irq_byname(struct platform_device *, const char *);
67+extern int platform_get_irq_byname_optional(struct platform_device *dev,
68+ const char *name);
6769 extern int platform_add_devices(struct platform_device **, int);
6870
6971 struct platform_device_info {
include/linux/sched.h+1−0
@@ -223,6 +223,7 @@ extern long schedule_timeout_uninterruptible(long timeout); · 222 unmodified lines
223223 extern long schedule_timeout_idle(long timeout);
224224 asmlinkage void schedule(void);
225225 extern void schedule_preempt_disabled(void);
226+asmlinkage void preempt_schedule_irq(void);
226227
227228 extern int __must_check io_schedule_prepare(void);
228229 extern void io_schedule_finish(int token);
include/linux/skbuff.h+3−2
@@ -3510,8 +3510,9 @@ int skb_ensure_writable(struct sk_buff *skb, int write_len); · 3509 unmodified lines
35103510 int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci);
35113511 int skb_vlan_pop(struct sk_buff *skb);
35123512 int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci);
3513−int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto);
3514−int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto);
3513+int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto,
3514+ int mac_len);
3515+int skb_mpls_pop(struct sk_buff *skb, __be16 next_proto, int mac_len);
35153516 int skb_mpls_update_lse(struct sk_buff *skb, __be32 mpls_lse);
35163517 int skb_mpls_dec_ttl(struct sk_buff *skb);
35173518 struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy,
include/linux/slab.h+4−0
@@ -493,6 +493,10 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) · 492 unmodified lines
493493 * kmalloc is the normal method of allocating memory
494494 * for objects smaller than page size in the kernel.
495495 *
496+ * The allocated object address is aligned to at least ARCH_KMALLOC_MINALIGN
497+ * bytes. For @size of power of two bytes, the alignment is also guaranteed
498+ * to be at least to the size.
499+ *
496500 * The @flags argument may be one of the GFP flags defined at
497501 * include/linux/gfp.h and described at
498502 * :ref:`Documentation/core-api/mm-api.rst <mm-api-gfp-flags>`
include/linux/string.h+20−1
@@ -227,7 +227,26 @@ static inline bool strstarts(const char *str, const char *prefix) · 226 unmodified lines
227227 }
228228
229229 size_t memweight(const void *ptr, size_t bytes);
230−void memzero_explicit(void *s, size_t count);
230+
231+/**
232+ * memzero_explicit - Fill a region of memory (e.g. sensitive
233+ * keying data) with 0s.
234+ * @s: Pointer to the start of the area.
235+ * @count: The size of the area.
236+ *
237+ * Note: usually using memset() is just fine (!), but in cases
238+ * where clearing out _local_ data at the end of a scope is
239+ * necessary, memzero_explicit() should be used instead in
240+ * order to prevent the compiler from optimising away zeroing.
241+ *
242+ * memzero_explicit() doesn't need an arch-specific version as
243+ * it just invokes the one of memset() implicitly.
244+ */
245+static inline void memzero_explicit(void *s, size_t count)
246+{
247+ memset(s, 0, count);
248+ barrier_data(s);
249+}
231250
232251 /**
233252 * kbasename - return the last part of a pathname.
include/linux/sunrpc/xprtsock.h+1−0
@@ -61,6 +61,7 @@ struct sock_xprt { · 60 unmodified lines
6161 struct mutex recv_mutex;
6262 struct sockaddr_storage srcaddr;
6363 unsigned short srcport;
64+ int xprt_err;
6465
6566 /*
6667 * UDP socket buffer size parameters
include/linux/tcp.h+3−3
@@ -393,7 +393,7 @@ struct tcp_sock { · 392 unmodified lines
393393 /* fastopen_rsk points to request_sock that resulted in this big
394394 * socket. Used to retransmit SYNACKs etc.
395395 */
396− struct request_sock *fastopen_rsk;
396+ struct request_sock __rcu *fastopen_rsk;
397397 u32 *saved_syn;
398398 };
399399
@@ -447,8 +447,8 @@ static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) · 47 unmodified lines
447447
448448 static inline bool tcp_passive_fastopen(const struct sock *sk)
449449 {
450− return (sk->sk_state == TCP_SYN_RECV &&
451− tcp_sk(sk)->fastopen_rsk != NULL);
450+ return sk->sk_state == TCP_SYN_RECV &&
451+ rcu_access_pointer(tcp_sk(sk)->fastopen_rsk) != NULL;
452452 }
453453
454454 static inline void fastopen_queue_tune(struct sock *sk, int backlog)
include/linux/tpm_eventlog.h+12−4
@@ -152,7 +152,7 @@ struct tcg_algorithm_info { · 151 unmodified lines
152152 * total. Once we've done this we know the offset of the data length field,
153153 * and can calculate the total size of the event.
154154 *
155− * Return: size of the event on success, <0 on failure
155+ * Return: size of the event on success, 0 on failure
156156 */
157157
158158 static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event,
@@ -170,6 +170,7 @@ static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, · 11 unmodified lines
170170 u16 halg;
171171 int i;
172172 int j;
173+ u32 count, event_type;
173174
174175 marker = event;
175176 marker_start = marker;
@@ -190,16 +191,22 @@ static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, · 14 unmodified lines
190191 }
191192
192193 event = (struct tcg_pcr_event2_head *)mapping;
194+ /*
195+ * The loop below will unmap these fields if the log is larger than
196+ * one page, so save them here for reference:
197+ */
198+ count = READ_ONCE(event->count);
199+ event_type = READ_ONCE(event->event_type);
193200
194201 efispecid = (struct tcg_efi_specid_event_head *)event_header->event;
195202
196203 /* Check if event is malformed. */
197− if (event->count > efispecid->num_algs) {
204+ if (count > efispecid->num_algs) {
198205 size = 0;
199206 goto out;
200207 }
201208
202− for (i = 0; i < event->count; i++) {
209+ for (i = 0; i < count; i++) {
203210 halg_size = sizeof(event->digests[i].alg_id);
204211
205212 /* Map the digest's algorithm identifier */
@@ -256,8 +263,9 @@ static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, · 50 unmodified lines
256263 + event_field->event_size;
257264 size = marker - marker_start;
258265
259− if ((event->event_type == 0) && (event_field->event_size == 0))
266+ if (event_type == 0 && event_field->event_size == 0)
260267 size = 0;
268+
261269 out:
262270 if (do_mapping)
263271 TPM_MEMUNMAP(mapping, mapping_size);
include/linux/uaccess.h+4−2
@@ -355,8 +355,10 @@ extern long strnlen_unsafe_user(const void __user *unsafe_addr, long count); · 354 unmodified lines
355355 #ifndef user_access_begin
356356 #define user_access_begin(ptr,len) access_ok(ptr, len)
357357 #define user_access_end() do { } while (0)
358−#define unsafe_get_user(x, ptr, err) do { if (unlikely(__get_user(x, ptr))) goto err; } while (0)
359−#define unsafe_put_user(x, ptr, err) do { if (unlikely(__put_user(x, ptr))) goto err; } while (0)
358+#define unsafe_op_wrap(op, err) do { if (unlikely(op)) goto err; } while (0)
359+#define unsafe_get_user(x,p,e) unsafe_op_wrap(__get_user(x,p),e)
360+#define unsafe_put_user(x,p,e) unsafe_op_wrap(__put_user(x,p),e)
361+#define unsafe_copy_to_user(d,s,l,e) unsafe_op_wrap(__copy_to_user(d,s,l),e)
360362 static inline unsigned long user_access_save(void) { return 0UL; }
361363 static inline void user_access_restore(unsigned long flags) { }
362364 #endif
include/linux/xarray.h+2−2
@@ -230,8 +230,8 @@ static inline int xa_err(void *entry) · 229 unmodified lines
230230 * This structure is used either directly or via the XA_LIMIT() macro
231231 * to communicate the range of IDs that are valid for allocation.
232232 * Two common ranges are predefined for you:
233− * * xa_limit_32b - [0 - UINT_MAX]
234− * * xa_limit_31b - [0 - INT_MAX]
233+ * * xa_limit_32b - [0 - UINT_MAX]
234+ * * xa_limit_31b - [0 - INT_MAX]
235235 */
236236 struct xa_limit {
237237 u32 max;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t