aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpu.h2
-rw-r--r--include/linux/dcache.h7
-rw-r--r--include/linux/filter.h21
-rw-r--r--include/linux/fs.h9
-rw-r--r--include/linux/hid-debug.h9
-rw-r--r--include/linux/irqchip/arm-gic-v3.h2
-rw-r--r--include/linux/memory_hotplug.h18
-rw-r--r--include/linux/mmc/card.h1
-rw-r--r--include/linux/netdevice.h8
-rw-r--r--include/linux/phy.h15
-rw-r--r--include/linux/pm_runtime.h2
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/sched/coredump.h1
-rw-r--r--include/linux/signal.h2
-rw-r--r--include/linux/stmmac.h1
15 files changed, 57 insertions, 43 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 218df7f4d3e1..5041357d0297 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -180,12 +180,10 @@ enum cpuhp_smt_control {
180#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT) 180#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT)
181extern enum cpuhp_smt_control cpu_smt_control; 181extern enum cpuhp_smt_control cpu_smt_control;
182extern void cpu_smt_disable(bool force); 182extern void cpu_smt_disable(bool force);
183extern void cpu_smt_check_topology_early(void);
184extern void cpu_smt_check_topology(void); 183extern void cpu_smt_check_topology(void);
185#else 184#else
186# define cpu_smt_control (CPU_SMT_ENABLED) 185# define cpu_smt_control (CPU_SMT_ENABLED)
187static inline void cpu_smt_disable(bool force) { } 186static inline void cpu_smt_disable(bool force) { }
188static inline void cpu_smt_check_topology_early(void) { }
189static inline void cpu_smt_check_topology(void) { } 187static inline void cpu_smt_check_topology(void) { }
190#endif 188#endif
191 189
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index ef4b70f64f33..60996e64c579 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -62,9 +62,10 @@ extern const struct qstr slash_name;
62struct dentry_stat_t { 62struct dentry_stat_t {
63 long nr_dentry; 63 long nr_dentry;
64 long nr_unused; 64 long nr_unused;
65 long age_limit; /* age in seconds */ 65 long age_limit; /* age in seconds */
66 long want_pages; /* pages requested by system */ 66 long want_pages; /* pages requested by system */
67 long dummy[2]; 67 long nr_negative; /* # of unused negative dentries */
68 long dummy; /* Reserved for future use */
68}; 69};
69extern struct dentry_stat_t dentry_stat; 70extern struct dentry_stat_t dentry_stat;
70 71
diff --git a/include/linux/filter.h b/include/linux/filter.h
index ad106d845b22..e532fcc6e4b5 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -591,8 +591,8 @@ static inline u8 *bpf_skb_cb(struct sk_buff *skb)
591 return qdisc_skb_cb(skb)->data; 591 return qdisc_skb_cb(skb)->data;
592} 592}
593 593
594static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog, 594static inline u32 __bpf_prog_run_save_cb(const struct bpf_prog *prog,
595 struct sk_buff *skb) 595 struct sk_buff *skb)
596{ 596{
597 u8 *cb_data = bpf_skb_cb(skb); 597 u8 *cb_data = bpf_skb_cb(skb);
598 u8 cb_saved[BPF_SKB_CB_LEN]; 598 u8 cb_saved[BPF_SKB_CB_LEN];
@@ -611,15 +611,30 @@ static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog,
611 return res; 611 return res;
612} 612}
613 613
614static inline u32 bpf_prog_run_save_cb(const struct bpf_prog *prog,
615 struct sk_buff *skb)
616{
617 u32 res;
618
619 preempt_disable();
620 res = __bpf_prog_run_save_cb(prog, skb);
621 preempt_enable();
622 return res;
623}
624
614static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, 625static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog,
615 struct sk_buff *skb) 626 struct sk_buff *skb)
616{ 627{
617 u8 *cb_data = bpf_skb_cb(skb); 628 u8 *cb_data = bpf_skb_cb(skb);
629 u32 res;
618 630
619 if (unlikely(prog->cb_access)) 631 if (unlikely(prog->cb_access))
620 memset(cb_data, 0, BPF_SKB_CB_LEN); 632 memset(cb_data, 0, BPF_SKB_CB_LEN);
621 633
622 return BPF_PROG_RUN(prog, skb); 634 preempt_disable();
635 res = BPF_PROG_RUN(prog, skb);
636 preempt_enable();
637 return res;
623} 638}
624 639
625static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, 640static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 811c77743dad..29d8e2cfed0e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1479,11 +1479,12 @@ struct super_block {
1479 struct user_namespace *s_user_ns; 1479 struct user_namespace *s_user_ns;
1480 1480
1481 /* 1481 /*
1482 * Keep the lru lists last in the structure so they always sit on their 1482 * The list_lru structure is essentially just a pointer to a table
1483 * own individual cachelines. 1483 * of per-node lru lists, each of which has its own spinlock.
1484 * There is no need to put them into separate cachelines.
1484 */ 1485 */
1485 struct list_lru s_dentry_lru ____cacheline_aligned_in_smp; 1486 struct list_lru s_dentry_lru;
1486 struct list_lru s_inode_lru ____cacheline_aligned_in_smp; 1487 struct list_lru s_inode_lru;
1487 struct rcu_head rcu; 1488 struct rcu_head rcu;
1488 struct work_struct destroy_work; 1489 struct work_struct destroy_work;
1489 1490
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h
index 8663f216c563..2d6100edf204 100644
--- a/include/linux/hid-debug.h
+++ b/include/linux/hid-debug.h
@@ -24,7 +24,10 @@
24 24
25#ifdef CONFIG_DEBUG_FS 25#ifdef CONFIG_DEBUG_FS
26 26
27#include <linux/kfifo.h>
28
27#define HID_DEBUG_BUFSIZE 512 29#define HID_DEBUG_BUFSIZE 512
30#define HID_DEBUG_FIFOSIZE 512
28 31
29void hid_dump_input(struct hid_device *, struct hid_usage *, __s32); 32void hid_dump_input(struct hid_device *, struct hid_usage *, __s32);
30void hid_dump_report(struct hid_device *, int , u8 *, int); 33void hid_dump_report(struct hid_device *, int , u8 *, int);
@@ -37,11 +40,8 @@ void hid_debug_init(void);
37void hid_debug_exit(void); 40void hid_debug_exit(void);
38void hid_debug_event(struct hid_device *, char *); 41void hid_debug_event(struct hid_device *, char *);
39 42
40
41struct hid_debug_list { 43struct hid_debug_list {
42 char *hid_debug_buf; 44 DECLARE_KFIFO_PTR(hid_debug_fifo, char);
43 int head;
44 int tail;
45 struct fasync_struct *fasync; 45 struct fasync_struct *fasync;
46 struct hid_device *hdev; 46 struct hid_device *hdev;
47 struct list_head node; 47 struct list_head node;
@@ -64,4 +64,3 @@ struct hid_debug_list {
64#endif 64#endif
65 65
66#endif 66#endif
67
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 071b4cbdf010..c848a7cc502e 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -319,7 +319,7 @@
319#define GITS_TYPER_PLPIS (1UL << 0) 319#define GITS_TYPER_PLPIS (1UL << 0)
320#define GITS_TYPER_VLPIS (1UL << 1) 320#define GITS_TYPER_VLPIS (1UL << 1)
321#define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT 4 321#define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT 4
322#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1) 322#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
323#define GITS_TYPER_IDBITS_SHIFT 8 323#define GITS_TYPER_IDBITS_SHIFT 8
324#define GITS_TYPER_DEVBITS_SHIFT 13 324#define GITS_TYPER_DEVBITS_SHIFT 13
325#define GITS_TYPER_DEVBITS(r) ((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1) 325#define GITS_TYPER_DEVBITS(r) ((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 07da5c6c5ba0..368267c1b71b 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -21,14 +21,16 @@ struct vmem_altmap;
21 * walkers which rely on the fully initialized page->flags and others 21 * walkers which rely on the fully initialized page->flags and others
22 * should use this rather than pfn_valid && pfn_to_page 22 * should use this rather than pfn_valid && pfn_to_page
23 */ 23 */
24#define pfn_to_online_page(pfn) \ 24#define pfn_to_online_page(pfn) \
25({ \ 25({ \
26 struct page *___page = NULL; \ 26 struct page *___page = NULL; \
27 unsigned long ___nr = pfn_to_section_nr(pfn); \ 27 unsigned long ___pfn = pfn; \
28 \ 28 unsigned long ___nr = pfn_to_section_nr(___pfn); \
29 if (___nr < NR_MEM_SECTIONS && online_section_nr(___nr))\ 29 \
30 ___page = pfn_to_page(pfn); \ 30 if (___nr < NR_MEM_SECTIONS && online_section_nr(___nr) && \
31 ___page; \ 31 pfn_valid_within(___pfn)) \
32 ___page = pfn_to_page(___pfn); \
33 ___page; \
32}) 34})
33 35
34/* 36/*
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index de7377815b6b..8ef330027b13 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -308,6 +308,7 @@ struct mmc_card {
308 unsigned int nr_parts; 308 unsigned int nr_parts;
309 309
310 unsigned int bouncesz; /* Bounce buffer size */ 310 unsigned int bouncesz; /* Bounce buffer size */
311 struct workqueue_struct *complete_wq; /* Private workqueue */
311}; 312};
312 313
313static inline bool mmc_large_sector(struct mmc_card *card) 314static inline bool mmc_large_sector(struct mmc_card *card)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1377d085ef99..86dbb3e29139 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1483,6 +1483,7 @@ struct net_device_ops {
1483 * @IFF_NO_RX_HANDLER: device doesn't support the rx_handler hook 1483 * @IFF_NO_RX_HANDLER: device doesn't support the rx_handler hook
1484 * @IFF_FAILOVER: device is a failover master device 1484 * @IFF_FAILOVER: device is a failover master device
1485 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device 1485 * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device
1486 * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device
1486 */ 1487 */
1487enum netdev_priv_flags { 1488enum netdev_priv_flags {
1488 IFF_802_1Q_VLAN = 1<<0, 1489 IFF_802_1Q_VLAN = 1<<0,
@@ -1514,6 +1515,7 @@ enum netdev_priv_flags {
1514 IFF_NO_RX_HANDLER = 1<<26, 1515 IFF_NO_RX_HANDLER = 1<<26,
1515 IFF_FAILOVER = 1<<27, 1516 IFF_FAILOVER = 1<<27,
1516 IFF_FAILOVER_SLAVE = 1<<28, 1517 IFF_FAILOVER_SLAVE = 1<<28,
1518 IFF_L3MDEV_RX_HANDLER = 1<<29,
1517}; 1519};
1518 1520
1519#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN 1521#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1544,6 +1546,7 @@ enum netdev_priv_flags {
1544#define IFF_NO_RX_HANDLER IFF_NO_RX_HANDLER 1546#define IFF_NO_RX_HANDLER IFF_NO_RX_HANDLER
1545#define IFF_FAILOVER IFF_FAILOVER 1547#define IFF_FAILOVER IFF_FAILOVER
1546#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE 1548#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
1549#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
1547 1550
1548/** 1551/**
1549 * struct net_device - The DEVICE structure. 1552 * struct net_device - The DEVICE structure.
@@ -4549,6 +4552,11 @@ static inline bool netif_supports_nofcs(struct net_device *dev)
4549 return dev->priv_flags & IFF_SUPP_NOFCS; 4552 return dev->priv_flags & IFF_SUPP_NOFCS;
4550} 4553}
4551 4554
4555static inline bool netif_has_l3_rx_handler(const struct net_device *dev)
4556{
4557 return dev->priv_flags & IFF_L3MDEV_RX_HANDLER;
4558}
4559
4552static inline bool netif_is_l3_master(const struct net_device *dev) 4560static inline bool netif_is_l3_master(const struct net_device *dev)
4553{ 4561{
4554 return dev->priv_flags & IFF_L3MDEV_MASTER; 4562 return dev->priv_flags & IFF_L3MDEV_MASTER;
diff --git a/include/linux/phy.h b/include/linux/phy.h
index ef20aeea10cc..127fcc9c3778 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -674,26 +674,13 @@ phy_lookup_setting(int speed, int duplex, const unsigned long *mask,
674size_t phy_speeds(unsigned int *speeds, size_t size, 674size_t phy_speeds(unsigned int *speeds, size_t size,
675 unsigned long *mask); 675 unsigned long *mask);
676 676
677static inline bool __phy_is_started(struct phy_device *phydev)
678{
679 WARN_ON(!mutex_is_locked(&phydev->lock));
680
681 return phydev->state >= PHY_UP;
682}
683
684/** 677/**
685 * phy_is_started - Convenience function to check whether PHY is started 678 * phy_is_started - Convenience function to check whether PHY is started
686 * @phydev: The phy_device struct 679 * @phydev: The phy_device struct
687 */ 680 */
688static inline bool phy_is_started(struct phy_device *phydev) 681static inline bool phy_is_started(struct phy_device *phydev)
689{ 682{
690 bool started; 683 return phydev->state >= PHY_UP;
691
692 mutex_lock(&phydev->lock);
693 started = __phy_is_started(phydev);
694 mutex_unlock(&phydev->lock);
695
696 return started;
697} 684}
698 685
699void phy_resolve_aneg_linkmode(struct phy_device *phydev); 686void phy_resolve_aneg_linkmode(struct phy_device *phydev);
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 54af4eef169f..fed5be706bc9 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -105,7 +105,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
105 105
106static inline void pm_runtime_mark_last_busy(struct device *dev) 106static inline void pm_runtime_mark_last_busy(struct device *dev)
107{ 107{
108 WRITE_ONCE(dev->power.last_busy, ktime_to_ns(ktime_get())); 108 WRITE_ONCE(dev->power.last_busy, ktime_get_mono_fast_ns());
109} 109}
110 110
111static inline bool pm_runtime_is_irq_safe(struct device *dev) 111static inline bool pm_runtime_is_irq_safe(struct device *dev)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d2f90fa92468..bba3afb4e9bf 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -995,7 +995,7 @@ struct task_struct {
995 /* cg_list protected by css_set_lock and tsk->alloc_lock: */ 995 /* cg_list protected by css_set_lock and tsk->alloc_lock: */
996 struct list_head cg_list; 996 struct list_head cg_list;
997#endif 997#endif
998#ifdef CONFIG_X86_RESCTRL 998#ifdef CONFIG_X86_CPU_RESCTRL
999 u32 closid; 999 u32 closid;
1000 u32 rmid; 1000 u32 rmid;
1001#endif 1001#endif
diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h
index ec912d01126f..ecdc6542070f 100644
--- a/include/linux/sched/coredump.h
+++ b/include/linux/sched/coredump.h
@@ -71,6 +71,7 @@ static inline int get_dumpable(struct mm_struct *mm)
71#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */ 71#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */
72#define MMF_DISABLE_THP 24 /* disable THP for all VMAs */ 72#define MMF_DISABLE_THP 24 /* disable THP for all VMAs */
73#define MMF_OOM_VICTIM 25 /* mm is the oom victim */ 73#define MMF_OOM_VICTIM 25 /* mm is the oom victim */
74#define MMF_OOM_REAP_QUEUED 26 /* mm was queued for oom_reaper */
74#define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP) 75#define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP)
75 76
76#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\ 77#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\
diff --git a/include/linux/signal.h b/include/linux/signal.h
index cc7e2c1cd444..9702016734b1 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -392,7 +392,7 @@ extern bool unhandled_signal(struct task_struct *tsk, int sig);
392#endif 392#endif
393 393
394#define siginmask(sig, mask) \ 394#define siginmask(sig, mask) \
395 ((sig) < SIGRTMIN && (rt_sigmask(sig) & (mask))) 395 ((sig) > 0 && (sig) < SIGRTMIN && (rt_sigmask(sig) & (mask)))
396 396
397#define SIG_KERNEL_ONLY_MASK (\ 397#define SIG_KERNEL_ONLY_MASK (\
398 rt_sigmask(SIGKILL) | rt_sigmask(SIGSTOP)) 398 rt_sigmask(SIGKILL) | rt_sigmask(SIGSTOP))
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 7ddfc65586b0..4335bd771ce5 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -184,6 +184,7 @@ struct plat_stmmacenet_data {
184 struct clk *pclk; 184 struct clk *pclk;
185 struct clk *clk_ptp_ref; 185 struct clk *clk_ptp_ref;
186 unsigned int clk_ptp_rate; 186 unsigned int clk_ptp_rate;
187 unsigned int clk_ref_rate;
187 struct reset_control *stmmac_rst; 188 struct reset_control *stmmac_rst;
188 struct stmmac_axi *axi; 189 struct stmmac_axi *axi;
189 int has_gmac4; 190 int has_gmac4;