diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blk_types.h | 2 | ||||
| -rw-r--r-- | include/linux/compiler-gcc.h | 16 | ||||
| -rw-r--r-- | include/linux/compiler-intel.h | 3 | ||||
| -rw-r--r-- | include/linux/compiler.h | 4 | ||||
| -rw-r--r-- | include/linux/ftrace_event.h | 2 | ||||
| -rw-r--r-- | include/linux/gfp.h | 2 | ||||
| -rw-r--r-- | include/linux/irqchip/arm-gic.h | 2 | ||||
| -rw-r--r-- | include/linux/kexec.h | 4 | ||||
| -rw-r--r-- | include/linux/libata.h | 10 | ||||
| -rw-r--r-- | include/linux/memcontrol.h | 4 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 19 | ||||
| -rw-r--r-- | include/linux/netfilter_bridge.h | 16 | ||||
| -rw-r--r-- | include/linux/nilfs2_fs.h | 2 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 4 | ||||
| -rw-r--r-- | include/linux/rhashtable.h | 3 | ||||
| -rw-r--r-- | include/linux/rtnetlink.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 8 | ||||
| -rw-r--r-- | include/linux/sched/rt.h | 7 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 1 | ||||
| -rw-r--r-- | include/linux/tcp.h | 8 | ||||
| -rw-r--r-- | include/linux/tty.h | 3 | ||||
| -rw-r--r-- | include/linux/uidgid.h | 4 | ||||
| -rw-r--r-- | include/linux/usb_usual.h | 2 | ||||
| -rw-r--r-- | include/linux/util_macros.h | 2 |
24 files changed, 93 insertions, 37 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index a1b25e35ea5f..b7299febc4b4 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
| @@ -220,7 +220,7 @@ enum rq_flag_bits { | |||
| 220 | 220 | ||
| 221 | /* This mask is used for both bio and request merge checking */ | 221 | /* This mask is used for both bio and request merge checking */ |
| 222 | #define REQ_NOMERGE_FLAGS \ | 222 | #define REQ_NOMERGE_FLAGS \ |
| 223 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA) | 223 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_FLUSH_SEQ) |
| 224 | 224 | ||
| 225 | #define REQ_RAHEAD (1ULL << __REQ_RAHEAD) | 225 | #define REQ_RAHEAD (1ULL << __REQ_RAHEAD) |
| 226 | #define REQ_THROTTLED (1ULL << __REQ_THROTTLED) | 226 | #define REQ_THROTTLED (1ULL << __REQ_THROTTLED) |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index cdf13ca7cac3..371e560d13cf 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -9,10 +9,24 @@ | |||
| 9 | + __GNUC_MINOR__ * 100 \ | 9 | + __GNUC_MINOR__ * 100 \ |
| 10 | + __GNUC_PATCHLEVEL__) | 10 | + __GNUC_PATCHLEVEL__) |
| 11 | 11 | ||
| 12 | |||
| 13 | /* Optimization barrier */ | 12 | /* Optimization barrier */ |
| 13 | |||
| 14 | /* The "volatile" is due to gcc bugs */ | 14 | /* The "volatile" is due to gcc bugs */ |
| 15 | #define barrier() __asm__ __volatile__("": : :"memory") | 15 | #define barrier() __asm__ __volatile__("": : :"memory") |
| 16 | /* | ||
| 17 | * This version is i.e. to prevent dead stores elimination on @ptr | ||
| 18 | * where gcc and llvm may behave differently when otherwise using | ||
| 19 | * normal barrier(): while gcc behavior gets along with a normal | ||
| 20 | * barrier(), llvm needs an explicit input variable to be assumed | ||
| 21 | * clobbered. The issue is as follows: while the inline asm might | ||
| 22 | * access any memory it wants, the compiler could have fit all of | ||
| 23 | * @ptr into memory registers instead, and since @ptr never escaped | ||
| 24 | * from that, it proofed that the inline asm wasn't touching any of | ||
| 25 | * it. This version works well with both compilers, i.e. we're telling | ||
| 26 | * the compiler that the inline asm absolutely may see the contents | ||
| 27 | * of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495 | ||
| 28 | */ | ||
| 29 | #define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory") | ||
| 16 | 30 | ||
| 17 | /* | 31 | /* |
| 18 | * This macro obfuscates arithmetic on a variable address so that gcc | 32 | * This macro obfuscates arithmetic on a variable address so that gcc |
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h index ba147a1727e6..0c9a2f2c2802 100644 --- a/include/linux/compiler-intel.h +++ b/include/linux/compiler-intel.h | |||
| @@ -13,9 +13,12 @@ | |||
| 13 | /* Intel ECC compiler doesn't support gcc specific asm stmts. | 13 | /* Intel ECC compiler doesn't support gcc specific asm stmts. |
| 14 | * It uses intrinsics to do the equivalent things. | 14 | * It uses intrinsics to do the equivalent things. |
| 15 | */ | 15 | */ |
| 16 | #undef barrier_data | ||
| 16 | #undef RELOC_HIDE | 17 | #undef RELOC_HIDE |
| 17 | #undef OPTIMIZER_HIDE_VAR | 18 | #undef OPTIMIZER_HIDE_VAR |
| 18 | 19 | ||
| 20 | #define barrier_data(ptr) barrier() | ||
| 21 | |||
| 19 | #define RELOC_HIDE(ptr, off) \ | 22 | #define RELOC_HIDE(ptr, off) \ |
| 20 | ({ unsigned long __ptr; \ | 23 | ({ unsigned long __ptr; \ |
| 21 | __ptr = (unsigned long) (ptr); \ | 24 | __ptr = (unsigned long) (ptr); \ |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 0e41ca0e5927..867722591be2 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -169,6 +169,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
| 169 | # define barrier() __memory_barrier() | 169 | # define barrier() __memory_barrier() |
| 170 | #endif | 170 | #endif |
| 171 | 171 | ||
| 172 | #ifndef barrier_data | ||
| 173 | # define barrier_data(ptr) barrier() | ||
| 174 | #endif | ||
| 175 | |||
| 172 | /* Unreachable code */ | 176 | /* Unreachable code */ |
| 173 | #ifndef unreachable | 177 | #ifndef unreachable |
| 174 | # define unreachable() do { } while (1) | 178 | # define unreachable() do { } while (1) |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 46e83c2156c6..f9ecf63d47f1 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -46,7 +46,7 @@ const char *ftrace_print_hex_seq(struct trace_seq *p, | |||
| 46 | const unsigned char *buf, int len); | 46 | const unsigned char *buf, int len); |
| 47 | 47 | ||
| 48 | const char *ftrace_print_array_seq(struct trace_seq *p, | 48 | const char *ftrace_print_array_seq(struct trace_seq *p, |
| 49 | const void *buf, int buf_len, | 49 | const void *buf, int count, |
| 50 | size_t el_size); | 50 | size_t el_size); |
| 51 | 51 | ||
| 52 | struct trace_iterator; | 52 | struct trace_iterator; |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 97a9373e61e8..15928f0647e4 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -30,6 +30,7 @@ struct vm_area_struct; | |||
| 30 | #define ___GFP_HARDWALL 0x20000u | 30 | #define ___GFP_HARDWALL 0x20000u |
| 31 | #define ___GFP_THISNODE 0x40000u | 31 | #define ___GFP_THISNODE 0x40000u |
| 32 | #define ___GFP_RECLAIMABLE 0x80000u | 32 | #define ___GFP_RECLAIMABLE 0x80000u |
| 33 | #define ___GFP_NOACCOUNT 0x100000u | ||
| 33 | #define ___GFP_NOTRACK 0x200000u | 34 | #define ___GFP_NOTRACK 0x200000u |
| 34 | #define ___GFP_NO_KSWAPD 0x400000u | 35 | #define ___GFP_NO_KSWAPD 0x400000u |
| 35 | #define ___GFP_OTHER_NODE 0x800000u | 36 | #define ___GFP_OTHER_NODE 0x800000u |
| @@ -87,6 +88,7 @@ struct vm_area_struct; | |||
| 87 | #define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */ | 88 | #define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */ |
| 88 | #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */ | 89 | #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */ |
| 89 | #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */ | 90 | #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */ |
| 91 | #define __GFP_NOACCOUNT ((__force gfp_t)___GFP_NOACCOUNT) /* Don't account to kmemcg */ | ||
| 90 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ | 92 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ |
| 91 | 93 | ||
| 92 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) | 94 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) |
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h index 36ec4ae74634..9de976b4f9a7 100644 --- a/include/linux/irqchip/arm-gic.h +++ b/include/linux/irqchip/arm-gic.h | |||
| @@ -95,8 +95,6 @@ | |||
| 95 | 95 | ||
| 96 | struct device_node; | 96 | struct device_node; |
| 97 | 97 | ||
| 98 | extern struct irq_chip gic_arch_extn; | ||
| 99 | |||
| 100 | void gic_set_irqchip_flags(unsigned long flags); | 98 | void gic_set_irqchip_flags(unsigned long flags); |
| 101 | void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *, | 99 | void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *, |
| 102 | u32 offset, struct device_node *); | 100 | u32 offset, struct device_node *); |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index e60a745ac198..e804306ef5e8 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -40,6 +40,10 @@ | |||
| 40 | #error KEXEC_CONTROL_MEMORY_LIMIT not defined | 40 | #error KEXEC_CONTROL_MEMORY_LIMIT not defined |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | #ifndef KEXEC_CONTROL_MEMORY_GFP | ||
| 44 | #define KEXEC_CONTROL_MEMORY_GFP GFP_KERNEL | ||
| 45 | #endif | ||
| 46 | |||
| 43 | #ifndef KEXEC_CONTROL_PAGE_SIZE | 47 | #ifndef KEXEC_CONTROL_PAGE_SIZE |
| 44 | #error KEXEC_CONTROL_PAGE_SIZE not defined | 48 | #error KEXEC_CONTROL_PAGE_SIZE not defined |
| 45 | #endif | 49 | #endif |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 8dad4a307bb8..28aeae46f355 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -205,6 +205,7 @@ enum { | |||
| 205 | ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */ | 205 | ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */ |
| 206 | ATA_LFLAG_NO_LPM = (1 << 8), /* disable LPM on this link */ | 206 | ATA_LFLAG_NO_LPM = (1 << 8), /* disable LPM on this link */ |
| 207 | ATA_LFLAG_RST_ONCE = (1 << 9), /* limit recovery to one reset */ | 207 | ATA_LFLAG_RST_ONCE = (1 << 9), /* limit recovery to one reset */ |
| 208 | ATA_LFLAG_CHANGED = (1 << 10), /* LPM state changed on this link */ | ||
| 208 | 209 | ||
| 209 | /* struct ata_port flags */ | 210 | /* struct ata_port flags */ |
| 210 | ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ | 211 | ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ |
| @@ -309,6 +310,12 @@ enum { | |||
| 309 | */ | 310 | */ |
| 310 | ATA_TMOUT_PMP_SRST_WAIT = 5000, | 311 | ATA_TMOUT_PMP_SRST_WAIT = 5000, |
| 311 | 312 | ||
| 313 | /* When the LPM policy is set to ATA_LPM_MAX_POWER, there might | ||
| 314 | * be a spurious PHY event, so ignore the first PHY event that | ||
| 315 | * occurs within 10s after the policy change. | ||
| 316 | */ | ||
| 317 | ATA_TMOUT_SPURIOUS_PHY = 10000, | ||
| 318 | |||
| 312 | /* ATA bus states */ | 319 | /* ATA bus states */ |
| 313 | BUS_UNKNOWN = 0, | 320 | BUS_UNKNOWN = 0, |
| 314 | BUS_DMA = 1, | 321 | BUS_DMA = 1, |
| @@ -788,6 +795,8 @@ struct ata_link { | |||
| 788 | struct ata_eh_context eh_context; | 795 | struct ata_eh_context eh_context; |
| 789 | 796 | ||
| 790 | struct ata_device device[ATA_MAX_DEVICES]; | 797 | struct ata_device device[ATA_MAX_DEVICES]; |
| 798 | |||
| 799 | unsigned long last_lpm_change; /* when last LPM change happened */ | ||
| 791 | }; | 800 | }; |
| 792 | #define ATA_LINK_CLEAR_BEGIN offsetof(struct ata_link, active_tag) | 801 | #define ATA_LINK_CLEAR_BEGIN offsetof(struct ata_link, active_tag) |
| 793 | #define ATA_LINK_CLEAR_END offsetof(struct ata_link, device[0]) | 802 | #define ATA_LINK_CLEAR_END offsetof(struct ata_link, device[0]) |
| @@ -1201,6 +1210,7 @@ extern struct ata_device *ata_dev_pair(struct ata_device *adev); | |||
| 1201 | extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); | 1210 | extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); |
| 1202 | extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap); | 1211 | extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap); |
| 1203 | extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q); | 1212 | extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q); |
| 1213 | extern bool sata_lpm_ignore_phy_events(struct ata_link *link); | ||
| 1204 | 1214 | ||
| 1205 | extern int ata_cable_40wire(struct ata_port *ap); | 1215 | extern int ata_cable_40wire(struct ata_port *ap); |
| 1206 | extern int ata_cable_80wire(struct ata_port *ap); | 1216 | extern int ata_cable_80wire(struct ata_port *ap); |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 72dff5fb0d0c..6c8918114804 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -463,6 +463,8 @@ memcg_kmem_newpage_charge(gfp_t gfp, struct mem_cgroup **memcg, int order) | |||
| 463 | if (!memcg_kmem_enabled()) | 463 | if (!memcg_kmem_enabled()) |
| 464 | return true; | 464 | return true; |
| 465 | 465 | ||
| 466 | if (gfp & __GFP_NOACCOUNT) | ||
| 467 | return true; | ||
| 466 | /* | 468 | /* |
| 467 | * __GFP_NOFAIL allocations will move on even if charging is not | 469 | * __GFP_NOFAIL allocations will move on even if charging is not |
| 468 | * possible. Therefore we don't even try, and have this allocation | 470 | * possible. Therefore we don't even try, and have this allocation |
| @@ -522,6 +524,8 @@ memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp) | |||
| 522 | { | 524 | { |
| 523 | if (!memcg_kmem_enabled()) | 525 | if (!memcg_kmem_enabled()) |
| 524 | return cachep; | 526 | return cachep; |
| 527 | if (gfp & __GFP_NOACCOUNT) | ||
| 528 | return cachep; | ||
| 525 | if (gfp & __GFP_NOFAIL) | 529 | if (gfp & __GFP_NOFAIL) |
| 526 | return cachep; | 530 | return cachep; |
| 527 | if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD)) | 531 | if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD)) |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index bcbde799ec69..05b9a694e213 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #ifndef _LINUX_NETDEVICE_H | 25 | #ifndef _LINUX_NETDEVICE_H |
| 26 | #define _LINUX_NETDEVICE_H | 26 | #define _LINUX_NETDEVICE_H |
| 27 | 27 | ||
| 28 | #include <linux/pm_qos.h> | ||
| 29 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
| 30 | #include <linux/bug.h> | 29 | #include <linux/bug.h> |
| 31 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
| @@ -60,6 +59,7 @@ struct phy_device; | |||
| 60 | struct wireless_dev; | 59 | struct wireless_dev; |
| 61 | /* 802.15.4 specific */ | 60 | /* 802.15.4 specific */ |
| 62 | struct wpan_dev; | 61 | struct wpan_dev; |
| 62 | struct mpls_dev; | ||
| 63 | 63 | ||
| 64 | void netdev_set_default_ethtool_ops(struct net_device *dev, | 64 | void netdev_set_default_ethtool_ops(struct net_device *dev, |
| 65 | const struct ethtool_ops *ops); | 65 | const struct ethtool_ops *ops); |
| @@ -976,7 +976,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev, | |||
| 976 | * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh, | 976 | * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh, |
| 977 | * u16 flags) | 977 | * u16 flags) |
| 978 | * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, | 978 | * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, |
| 979 | * struct net_device *dev, u32 filter_mask) | 979 | * struct net_device *dev, u32 filter_mask, |
| 980 | * int nlflags) | ||
| 980 | * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, | 981 | * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh, |
| 981 | * u16 flags); | 982 | * u16 flags); |
| 982 | * | 983 | * |
| @@ -1172,7 +1173,8 @@ struct net_device_ops { | |||
| 1172 | int (*ndo_bridge_getlink)(struct sk_buff *skb, | 1173 | int (*ndo_bridge_getlink)(struct sk_buff *skb, |
| 1173 | u32 pid, u32 seq, | 1174 | u32 pid, u32 seq, |
| 1174 | struct net_device *dev, | 1175 | struct net_device *dev, |
| 1175 | u32 filter_mask); | 1176 | u32 filter_mask, |
| 1177 | int nlflags); | ||
| 1176 | int (*ndo_bridge_dellink)(struct net_device *dev, | 1178 | int (*ndo_bridge_dellink)(struct net_device *dev, |
| 1177 | struct nlmsghdr *nlh, | 1179 | struct nlmsghdr *nlh, |
| 1178 | u16 flags); | 1180 | u16 flags); |
| @@ -1496,8 +1498,6 @@ enum netdev_priv_flags { | |||
| 1496 | * | 1498 | * |
| 1497 | * @qdisc_tx_busylock: XXX: need comments on this one | 1499 | * @qdisc_tx_busylock: XXX: need comments on this one |
| 1498 | * | 1500 | * |
| 1499 | * @pm_qos_req: Power Management QoS object | ||
| 1500 | * | ||
| 1501 | * FIXME: cleanup struct net_device such that network protocol info | 1501 | * FIXME: cleanup struct net_device such that network protocol info |
| 1502 | * moves out. | 1502 | * moves out. |
| 1503 | */ | 1503 | */ |
| @@ -1627,6 +1627,9 @@ struct net_device { | |||
| 1627 | void *ax25_ptr; | 1627 | void *ax25_ptr; |
| 1628 | struct wireless_dev *ieee80211_ptr; | 1628 | struct wireless_dev *ieee80211_ptr; |
| 1629 | struct wpan_dev *ieee802154_ptr; | 1629 | struct wpan_dev *ieee802154_ptr; |
| 1630 | #if IS_ENABLED(CONFIG_MPLS_ROUTING) | ||
| 1631 | struct mpls_dev __rcu *mpls_ptr; | ||
| 1632 | #endif | ||
| 1630 | 1633 | ||
| 1631 | /* | 1634 | /* |
| 1632 | * Cache lines mostly used on receive path (including eth_type_trans()) | 1635 | * Cache lines mostly used on receive path (including eth_type_trans()) |
| @@ -2021,10 +2024,10 @@ struct pcpu_sw_netstats { | |||
| 2021 | ({ \ | 2024 | ({ \ |
| 2022 | typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ | 2025 | typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ |
| 2023 | if (pcpu_stats) { \ | 2026 | if (pcpu_stats) { \ |
| 2024 | int i; \ | 2027 | int __cpu; \ |
| 2025 | for_each_possible_cpu(i) { \ | 2028 | for_each_possible_cpu(__cpu) { \ |
| 2026 | typeof(type) *stat; \ | 2029 | typeof(type) *stat; \ |
| 2027 | stat = per_cpu_ptr(pcpu_stats, i); \ | 2030 | stat = per_cpu_ptr(pcpu_stats, __cpu); \ |
| 2028 | u64_stats_init(&stat->syncp); \ | 2031 | u64_stats_init(&stat->syncp); \ |
| 2029 | } \ | 2032 | } \ |
| 2030 | } \ | 2033 | } \ |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index ab8f76dba668..f2fdb5a52070 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
| @@ -39,12 +39,24 @@ static inline void br_drop_fake_rtable(struct sk_buff *skb) | |||
| 39 | 39 | ||
| 40 | static inline int nf_bridge_get_physinif(const struct sk_buff *skb) | 40 | static inline int nf_bridge_get_physinif(const struct sk_buff *skb) |
| 41 | { | 41 | { |
| 42 | return skb->nf_bridge ? skb->nf_bridge->physindev->ifindex : 0; | 42 | struct nf_bridge_info *nf_bridge; |
| 43 | |||
| 44 | if (skb->nf_bridge == NULL) | ||
| 45 | return 0; | ||
| 46 | |||
| 47 | nf_bridge = skb->nf_bridge; | ||
| 48 | return nf_bridge->physindev ? nf_bridge->physindev->ifindex : 0; | ||
| 43 | } | 49 | } |
| 44 | 50 | ||
| 45 | static inline int nf_bridge_get_physoutif(const struct sk_buff *skb) | 51 | static inline int nf_bridge_get_physoutif(const struct sk_buff *skb) |
| 46 | { | 52 | { |
| 47 | return skb->nf_bridge ? skb->nf_bridge->physoutdev->ifindex : 0; | 53 | struct nf_bridge_info *nf_bridge; |
| 54 | |||
| 55 | if (skb->nf_bridge == NULL) | ||
| 56 | return 0; | ||
| 57 | |||
| 58 | nf_bridge = skb->nf_bridge; | ||
| 59 | return nf_bridge->physoutdev ? nf_bridge->physoutdev->ifindex : 0; | ||
| 48 | } | 60 | } |
| 49 | 61 | ||
| 50 | static inline struct net_device * | 62 | static inline struct net_device * |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index ff3fea3194c6..9abb763e4b86 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
| @@ -460,7 +460,7 @@ struct nilfs_btree_node { | |||
| 460 | /* level */ | 460 | /* level */ |
| 461 | #define NILFS_BTREE_LEVEL_DATA 0 | 461 | #define NILFS_BTREE_LEVEL_DATA 0 |
| 462 | #define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1) | 462 | #define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1) |
| 463 | #define NILFS_BTREE_LEVEL_MAX 14 | 463 | #define NILFS_BTREE_LEVEL_MAX 14 /* Max level (exclusive) */ |
| 464 | 464 | ||
| 465 | /** | 465 | /** |
| 466 | * struct nilfs_palloc_group_desc - block group descriptor | 466 | * struct nilfs_palloc_group_desc - block group descriptor |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 38cff8f6716d..2f7b9a40f627 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2541,10 +2541,6 @@ | |||
| 2541 | 2541 | ||
| 2542 | #define PCI_VENDOR_ID_INTEL 0x8086 | 2542 | #define PCI_VENDOR_ID_INTEL 0x8086 |
| 2543 | #define PCI_DEVICE_ID_INTEL_EESSC 0x0008 | 2543 | #define PCI_DEVICE_ID_INTEL_EESSC 0x0008 |
| 2544 | #define PCI_DEVICE_ID_INTEL_SNB_IMC 0x0100 | ||
| 2545 | #define PCI_DEVICE_ID_INTEL_IVB_IMC 0x0154 | ||
| 2546 | #define PCI_DEVICE_ID_INTEL_IVB_E3_IMC 0x0150 | ||
| 2547 | #define PCI_DEVICE_ID_INTEL_HSW_IMC 0x0c00 | ||
| 2548 | #define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320 | 2544 | #define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320 |
| 2549 | #define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321 | 2545 | #define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321 |
| 2550 | #define PCI_DEVICE_ID_INTEL_PXH_0 0x0329 | 2546 | #define PCI_DEVICE_ID_INTEL_PXH_0 0x0329 |
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index e23d242d1230..dbcbcc59aa92 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
| @@ -282,7 +282,8 @@ static inline bool rht_shrink_below_30(const struct rhashtable *ht, | |||
| 282 | static inline bool rht_grow_above_100(const struct rhashtable *ht, | 282 | static inline bool rht_grow_above_100(const struct rhashtable *ht, |
| 283 | const struct bucket_table *tbl) | 283 | const struct bucket_table *tbl) |
| 284 | { | 284 | { |
| 285 | return atomic_read(&ht->nelems) > tbl->size; | 285 | return atomic_read(&ht->nelems) > tbl->size && |
| 286 | (!ht->p.max_size || tbl->size < ht->p.max_size); | ||
| 286 | } | 287 | } |
| 287 | 288 | ||
| 288 | /* The bucket lock is selected based on the hash and protects mutations | 289 | /* The bucket lock is selected based on the hash and protects mutations |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 2da5d1081ad9..7b8e260c4a27 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
| @@ -122,5 +122,5 @@ extern int ndo_dflt_fdb_del(struct ndmsg *ndm, | |||
| 122 | 122 | ||
| 123 | extern int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, | 123 | extern int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, |
| 124 | struct net_device *dev, u16 mode, | 124 | struct net_device *dev, u16 mode, |
| 125 | u32 flags, u32 mask); | 125 | u32 flags, u32 mask, int nlflags); |
| 126 | #endif /* __LINUX_RTNETLINK_H */ | 126 | #endif /* __LINUX_RTNETLINK_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8222ae40ecb0..26a2e6122734 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -175,14 +175,6 @@ extern void get_iowait_load(unsigned long *nr_waiters, unsigned long *load); | |||
| 175 | extern void calc_global_load(unsigned long ticks); | 175 | extern void calc_global_load(unsigned long ticks); |
| 176 | extern void update_cpu_load_nohz(void); | 176 | extern void update_cpu_load_nohz(void); |
| 177 | 177 | ||
| 178 | /* Notifier for when a task gets migrated to a new CPU */ | ||
| 179 | struct task_migration_notifier { | ||
| 180 | struct task_struct *task; | ||
| 181 | int from_cpu; | ||
| 182 | int to_cpu; | ||
| 183 | }; | ||
| 184 | extern void register_task_migration_notifier(struct notifier_block *n); | ||
| 185 | |||
| 186 | extern unsigned long get_parent_ip(unsigned long addr); | 178 | extern unsigned long get_parent_ip(unsigned long addr); |
| 187 | 179 | ||
| 188 | extern void dump_cpu_task(int cpu); | 180 | extern void dump_cpu_task(int cpu); |
diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h index 6341f5be6e24..a30b172df6e1 100644 --- a/include/linux/sched/rt.h +++ b/include/linux/sched/rt.h | |||
| @@ -18,7 +18,7 @@ static inline int rt_task(struct task_struct *p) | |||
| 18 | #ifdef CONFIG_RT_MUTEXES | 18 | #ifdef CONFIG_RT_MUTEXES |
| 19 | extern int rt_mutex_getprio(struct task_struct *p); | 19 | extern int rt_mutex_getprio(struct task_struct *p); |
| 20 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 20 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
| 21 | extern int rt_mutex_check_prio(struct task_struct *task, int newprio); | 21 | extern int rt_mutex_get_effective_prio(struct task_struct *task, int newprio); |
| 22 | extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task); | 22 | extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task); |
| 23 | extern void rt_mutex_adjust_pi(struct task_struct *p); | 23 | extern void rt_mutex_adjust_pi(struct task_struct *p); |
| 24 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | 24 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) |
| @@ -31,9 +31,10 @@ static inline int rt_mutex_getprio(struct task_struct *p) | |||
| 31 | return p->normal_prio; | 31 | return p->normal_prio; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | static inline int rt_mutex_check_prio(struct task_struct *task, int newprio) | 34 | static inline int rt_mutex_get_effective_prio(struct task_struct *task, |
| 35 | int newprio) | ||
| 35 | { | 36 | { |
| 36 | return 0; | 37 | return newprio; |
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task) | 40 | static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task) |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 06793b598f44..66e374d62f64 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -773,6 +773,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, | |||
| 773 | 773 | ||
| 774 | struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags, | 774 | struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags, |
| 775 | int node); | 775 | int node); |
| 776 | struct sk_buff *__build_skb(void *data, unsigned int frag_size); | ||
| 776 | struct sk_buff *build_skb(void *data, unsigned int frag_size); | 777 | struct sk_buff *build_skb(void *data, unsigned int frag_size); |
| 777 | static inline struct sk_buff *alloc_skb(unsigned int size, | 778 | static inline struct sk_buff *alloc_skb(unsigned int size, |
| 778 | gfp_t priority) | 779 | gfp_t priority) |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 0caa3a2d4106..3b2911502a8c 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -145,11 +145,19 @@ struct tcp_sock { | |||
| 145 | * read the code and the spec side by side (and laugh ...) | 145 | * read the code and the spec side by side (and laugh ...) |
| 146 | * See RFC793 and RFC1122. The RFC writes these in capitals. | 146 | * See RFC793 and RFC1122. The RFC writes these in capitals. |
| 147 | */ | 147 | */ |
| 148 | u64 bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived | ||
| 149 | * sum(delta(rcv_nxt)), or how many bytes | ||
| 150 | * were acked. | ||
| 151 | */ | ||
| 148 | u32 rcv_nxt; /* What we want to receive next */ | 152 | u32 rcv_nxt; /* What we want to receive next */ |
| 149 | u32 copied_seq; /* Head of yet unread data */ | 153 | u32 copied_seq; /* Head of yet unread data */ |
| 150 | u32 rcv_wup; /* rcv_nxt on last window update sent */ | 154 | u32 rcv_wup; /* rcv_nxt on last window update sent */ |
| 151 | u32 snd_nxt; /* Next sequence we send */ | 155 | u32 snd_nxt; /* Next sequence we send */ |
| 152 | 156 | ||
| 157 | u64 bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked | ||
| 158 | * sum(delta(snd_una)), or how many bytes | ||
| 159 | * were acked. | ||
| 160 | */ | ||
| 153 | u32 snd_una; /* First byte we want an ack for */ | 161 | u32 snd_una; /* First byte we want an ack for */ |
| 154 | u32 snd_sml; /* Last byte of the most recently transmitted small packet */ | 162 | u32 snd_sml; /* Last byte of the most recently transmitted small packet */ |
| 155 | u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ | 163 | u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 358a337af598..d76631f615c2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -339,6 +339,7 @@ struct tty_file_private { | |||
| 339 | #define TTY_EXCLUSIVE 3 /* Exclusive open mode */ | 339 | #define TTY_EXCLUSIVE 3 /* Exclusive open mode */ |
| 340 | #define TTY_DEBUG 4 /* Debugging */ | 340 | #define TTY_DEBUG 4 /* Debugging */ |
| 341 | #define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ | 341 | #define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ |
| 342 | #define TTY_OTHER_DONE 6 /* Closed pty has completed input processing */ | ||
| 342 | #define TTY_LDISC_OPEN 11 /* Line discipline is open */ | 343 | #define TTY_LDISC_OPEN 11 /* Line discipline is open */ |
| 343 | #define TTY_PTY_LOCK 16 /* pty private */ | 344 | #define TTY_PTY_LOCK 16 /* pty private */ |
| 344 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ | 345 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ |
| @@ -462,7 +463,6 @@ extern int tty_hung_up_p(struct file *filp); | |||
| 462 | extern void do_SAK(struct tty_struct *tty); | 463 | extern void do_SAK(struct tty_struct *tty); |
| 463 | extern void __do_SAK(struct tty_struct *tty); | 464 | extern void __do_SAK(struct tty_struct *tty); |
| 464 | extern void no_tty(void); | 465 | extern void no_tty(void); |
| 465 | extern void tty_flush_to_ldisc(struct tty_struct *tty); | ||
| 466 | extern void tty_buffer_free_all(struct tty_port *port); | 466 | extern void tty_buffer_free_all(struct tty_port *port); |
| 467 | extern void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld); | 467 | extern void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld); |
| 468 | extern void tty_buffer_init(struct tty_port *port); | 468 | extern void tty_buffer_init(struct tty_port *port); |
| @@ -491,6 +491,7 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty) | |||
| 491 | 491 | ||
| 492 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); | 492 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); |
| 493 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); | 493 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); |
| 494 | extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); | ||
| 494 | 495 | ||
| 495 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); | 496 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); |
| 496 | extern void tty_ldisc_deref(struct tty_ldisc *); | 497 | extern void tty_ldisc_deref(struct tty_ldisc *); |
diff --git a/include/linux/uidgid.h b/include/linux/uidgid.h index 0ee05da38899..03835522dfcb 100644 --- a/include/linux/uidgid.h +++ b/include/linux/uidgid.h | |||
| @@ -109,12 +109,12 @@ static inline bool gid_lte(kgid_t left, kgid_t right) | |||
| 109 | 109 | ||
| 110 | static inline bool uid_valid(kuid_t uid) | 110 | static inline bool uid_valid(kuid_t uid) |
| 111 | { | 111 | { |
| 112 | return !uid_eq(uid, INVALID_UID); | 112 | return __kuid_val(uid) != (uid_t) -1; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | static inline bool gid_valid(kgid_t gid) | 115 | static inline bool gid_valid(kgid_t gid) |
| 116 | { | 116 | { |
| 117 | return !gid_eq(gid, INVALID_GID); | 117 | return __kgid_val(gid) != (gid_t) -1; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | #ifdef CONFIG_USER_NS | 120 | #ifdef CONFIG_USER_NS |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index a7f2604c5f25..7f5f78bd15ad 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
| @@ -77,6 +77,8 @@ | |||
| 77 | /* Cannot handle ATA_12 or ATA_16 CDBs */ \ | 77 | /* Cannot handle ATA_12 or ATA_16 CDBs */ \ |
| 78 | US_FLAG(NO_REPORT_OPCODES, 0x04000000) \ | 78 | US_FLAG(NO_REPORT_OPCODES, 0x04000000) \ |
| 79 | /* Cannot handle MI_REPORT_SUPPORTED_OPERATION_CODES */ \ | 79 | /* Cannot handle MI_REPORT_SUPPORTED_OPERATION_CODES */ \ |
| 80 | US_FLAG(MAX_SECTORS_240, 0x08000000) \ | ||
| 81 | /* Sets max_sectors to 240 */ \ | ||
| 80 | 82 | ||
| 81 | #define US_FLAG(name, value) US_FL_##name = value , | 83 | #define US_FLAG(name, value) US_FL_##name = value , |
| 82 | enum { US_DO_ALL_FLAGS }; | 84 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/util_macros.h b/include/linux/util_macros.h index d5f4fb69dba3..f9b2ce58039b 100644 --- a/include/linux/util_macros.h +++ b/include/linux/util_macros.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ({ \ | 5 | ({ \ |
| 6 | typeof(as) __fc_i, __fc_as = (as) - 1; \ | 6 | typeof(as) __fc_i, __fc_as = (as) - 1; \ |
| 7 | typeof(x) __fc_x = (x); \ | 7 | typeof(x) __fc_x = (x); \ |
| 8 | typeof(*a) *__fc_a = (a); \ | 8 | typeof(*a) const *__fc_a = (a); \ |
| 9 | for (__fc_i = 0; __fc_i < __fc_as; __fc_i++) { \ | 9 | for (__fc_i = 0; __fc_i < __fc_as; __fc_i++) { \ |
| 10 | if (__fc_x op DIV_ROUND_CLOSEST(__fc_a[__fc_i] + \ | 10 | if (__fc_x op DIV_ROUND_CLOSEST(__fc_a[__fc_i] + \ |
| 11 | __fc_a[__fc_i + 1], 2)) \ | 11 | __fc_a[__fc_i + 1], 2)) \ |
