aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/processor.h8
-rw-r--r--include/asm-generic/tlb.h8
-rw-r--r--include/drm/drmP.h4
-rw-r--r--include/drm/drm_gem.h7
-rw-r--r--include/dt-bindings/interrupt-controller/arm-gic.h4
-rw-r--r--include/dt-bindings/thermal/thermal.h2
-rw-r--r--include/linux/acpi.h4
-rw-r--r--include/linux/ahci_platform.h6
-rw-r--r--include/linux/ata.h2
-rw-r--r--include/linux/ata_platform.h5
-rw-r--r--include/linux/audit.h4
-rw-r--r--include/linux/blk-mq.h8
-rw-r--r--include/linux/blk_types.h2
-rw-r--r--include/linux/ceph/osd_client.h4
-rw-r--r--include/linux/cgroup.h4
-rw-r--r--include/linux/cgroup_subsys.h8
-rw-r--r--include/linux/compiler.h14
-rw-r--r--include/linux/cpu_cooling.h6
-rw-r--r--include/linux/cpuidle.h3
-rw-r--r--include/linux/efi.h2
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/ftrace_event.h2
-rw-r--r--include/linux/genetlink.h4
-rw-r--r--include/linux/hrtimer.h2
-rw-r--r--include/linux/i2c.h6
-rw-r--r--include/linux/if_vlan.h60
-rw-r--r--include/linux/kdb.h62
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/linux/ktime.h17
-rw-r--r--include/linux/libata.h8
-rw-r--r--include/linux/mfd/samsung/s2mps13.h2
-rw-r--r--include/linux/mfd/stmpe.h22
-rw-r--r--include/linux/mlx4/device.h2
-rw-r--r--include/linux/mm.h16
-rw-r--r--include/linux/mmc/sdhci.h1
-rw-r--r--include/linux/module.h2
-rw-r--r--include/linux/moduleloader.h4
-rw-r--r--include/linux/netdevice.h26
-rw-r--r--include/linux/netlink.h4
-rw-r--r--include/linux/nfs_fs_sb.h3
-rw-r--r--include/linux/oom.h5
-rw-r--r--include/linux/osq_lock.h12
-rw-r--r--include/linux/page-flags.h5
-rw-r--r--include/linux/pagemap.h13
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/percpu-refcount.h34
-rw-r--r--include/linux/perf_event.h48
-rw-r--r--include/linux/perf_regs.h16
-rw-r--r--include/linux/phy/omap_control_phy.h6
-rw-r--r--include/linux/pm_domain.h8
-rw-r--r--include/linux/printk.h15
-rw-r--r--include/linux/pxa2xx_ssp.h1
-rw-r--r--include/linux/quota.h47
-rw-r--r--include/linux/quotaops.h4
-rw-r--r--include/linux/rculist.h16
-rw-r--r--include/linux/rcupdate.h13
-rw-r--r--include/linux/rcutiny.h45
-rw-r--r--include/linux/rcutree.h11
-rw-r--r--include/linux/regmap.h2
-rw-r--r--include/linux/regulator/da9211.h2
-rw-r--r--include/linux/regulator/driver.h13
-rw-r--r--include/linux/regulator/machine.h13
-rw-r--r--include/linux/regulator/mt6397-regulator.h49
-rw-r--r--include/linux/regulator/pfuze100.h14
-rw-r--r--include/linux/rmap.h10
-rw-r--r--include/linux/rtc.h2
-rw-r--r--include/linux/smp.h7
-rw-r--r--include/linux/spi/at86rf230.h4
-rw-r--r--include/linux/spi/l4f00242t03.h4
-rw-r--r--include/linux/spi/lms283gf05.h4
-rw-r--r--include/linux/spi/mxs-spi.h4
-rw-r--r--include/linux/spi/pxa2xx_spi.h5
-rw-r--r--include/linux/spi/rspi.h5
-rw-r--r--include/linux/spi/sh_hspi.h4
-rw-r--r--include/linux/spi/sh_msiof.h2
-rw-r--r--include/linux/spi/spi.h6
-rw-r--r--include/linux/spi/tle62x0.h4
-rw-r--r--include/linux/spi/tsc2005.h5
-rw-r--r--include/linux/srcu.h14
-rw-r--r--include/linux/thermal.h2
-rw-r--r--include/linux/time.h13
-rw-r--r--include/linux/timekeeping.h21
-rw-r--r--include/linux/tracepoint.h2
-rw-r--r--include/linux/wait.h27
-rw-r--r--include/linux/workqueue.h8
-rw-r--r--include/linux/writeback.h1
-rw-r--r--include/net/flow_keys.h6
-rw-r--r--include/net/genetlink.h14
-rw-r--r--include/net/ip.h13
-rw-r--r--include/net/ipv6.h7
-rw-r--r--include/net/mac80211.h7
-rw-r--r--include/net/neighbour.h1
-rw-r--r--include/net/netfilter/nf_tables.h2
-rw-r--r--include/net/netns/ipv4.h1
-rw-r--r--include/net/sch_generic.h13
-rw-r--r--include/net/tcp.h4
-rw-r--r--include/net/vxlan.h28
-rw-r--r--include/rdma/ib_verbs.h5
-rw-r--r--include/sound/ak4113.h2
-rw-r--r--include/sound/ak4114.h2
-rw-r--r--include/sound/pcm.h10
-rw-r--r--include/sound/soc.h1
-rw-r--r--include/target/target_core_backend.h1
-rw-r--r--include/target/target_core_backend_configfs.h2
-rw-r--r--include/target/target_core_base.h3
-rw-r--r--include/trace/events/kvm.h16
-rw-r--r--include/trace/events/tlb.h4
-rw-r--r--include/trace/ftrace.h7
-rw-r--r--include/uapi/asm-generic/fcntl.h2
-rw-r--r--include/uapi/linux/can/netlink.h1
-rw-r--r--include/uapi/linux/in6.h3
-rw-r--r--include/uapi/linux/kfd_ioctl.h37
-rw-r--r--include/uapi/linux/libc-compat.h3
-rw-r--r--include/uapi/linux/openvswitch.h4
-rw-r--r--include/uapi/linux/uinput.h4
-rw-r--r--include/uapi/linux/virtio_ring.h7
-rw-r--r--include/uapi/rdma/ib_user_verbs.h27
-rw-r--r--include/xen/grant_table.h43
-rw-r--r--include/xen/interface/features.h6
-rw-r--r--include/xen/interface/grant_table.h7
-rw-r--r--include/xen/interface/nmi.h51
121 files changed, 889 insertions, 354 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 3ca9b751f122..b95dc32a6e6b 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -196,8 +196,8 @@ struct acpi_processor_flags {
196struct acpi_processor { 196struct acpi_processor {
197 acpi_handle handle; 197 acpi_handle handle;
198 u32 acpi_id; 198 u32 acpi_id;
199 u32 apic_id; 199 u32 phys_id; /* CPU hardware ID such as APIC ID for x86 */
200 u32 id; 200 u32 id; /* CPU logical ID allocated by OS */
201 u32 pblk; 201 u32 pblk;
202 int performance_platform_limit; 202 int performance_platform_limit;
203 int throttling_platform_limit; 203 int throttling_platform_limit;
@@ -310,8 +310,8 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)
310#endif /* CONFIG_CPU_FREQ */ 310#endif /* CONFIG_CPU_FREQ */
311 311
312/* in processor_core.c */ 312/* in processor_core.c */
313int acpi_get_apicid(acpi_handle, int type, u32 acpi_id); 313int acpi_get_phys_id(acpi_handle, int type, u32 acpi_id);
314int acpi_map_cpuid(int apic_id, u32 acpi_id); 314int acpi_map_cpuid(int phys_id, u32 acpi_id);
315int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id); 315int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id);
316 316
317/* in processor_pdc.c */ 317/* in processor_pdc.c */
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index 08848050922e..db284bff29dc 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -136,8 +136,12 @@ static inline void __tlb_adjust_range(struct mmu_gather *tlb,
136 136
137static inline void __tlb_reset_range(struct mmu_gather *tlb) 137static inline void __tlb_reset_range(struct mmu_gather *tlb)
138{ 138{
139 tlb->start = TASK_SIZE; 139 if (tlb->fullmm) {
140 tlb->end = 0; 140 tlb->start = tlb->end = ~0;
141 } else {
142 tlb->start = TASK_SIZE;
143 tlb->end = 0;
144 }
141} 145}
142 146
143/* 147/*
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 8ba35c622e22..e1b2e8b98af7 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -901,11 +901,15 @@ extern int drm_vblank_init(struct drm_device *dev, int num_crtcs);
901extern int drm_wait_vblank(struct drm_device *dev, void *data, 901extern int drm_wait_vblank(struct drm_device *dev, void *data,
902 struct drm_file *filp); 902 struct drm_file *filp);
903extern u32 drm_vblank_count(struct drm_device *dev, int crtc); 903extern u32 drm_vblank_count(struct drm_device *dev, int crtc);
904extern u32 drm_crtc_vblank_count(struct drm_crtc *crtc);
904extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc, 905extern u32 drm_vblank_count_and_time(struct drm_device *dev, int crtc,
905 struct timeval *vblanktime); 906 struct timeval *vblanktime);
906extern void drm_send_vblank_event(struct drm_device *dev, int crtc, 907extern void drm_send_vblank_event(struct drm_device *dev, int crtc,
907 struct drm_pending_vblank_event *e); 908 struct drm_pending_vblank_event *e);
909extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
910 struct drm_pending_vblank_event *e);
908extern bool drm_handle_vblank(struct drm_device *dev, int crtc); 911extern bool drm_handle_vblank(struct drm_device *dev, int crtc);
912extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc);
909extern int drm_vblank_get(struct drm_device *dev, int crtc); 913extern int drm_vblank_get(struct drm_device *dev, int crtc);
910extern void drm_vblank_put(struct drm_device *dev, int crtc); 914extern void drm_vblank_put(struct drm_device *dev, int crtc);
911extern int drm_crtc_vblank_get(struct drm_crtc *crtc); 915extern int drm_crtc_vblank_get(struct drm_crtc *crtc);
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
index 780511a459c0..1e6ae1458f7a 100644
--- a/include/drm/drm_gem.h
+++ b/include/drm/drm_gem.h
@@ -119,13 +119,6 @@ struct drm_gem_object {
119 * simply leave it as NULL. 119 * simply leave it as NULL.
120 */ 120 */
121 struct dma_buf_attachment *import_attach; 121 struct dma_buf_attachment *import_attach;
122
123 /**
124 * dumb - created as dumb buffer
125 * Whether the gem object was created using the dumb buffer interface
126 * as such it may not be used for GPU rendering.
127 */
128 bool dumb;
129}; 122};
130 123
131void drm_gem_object_release(struct drm_gem_object *obj); 124void drm_gem_object_release(struct drm_gem_object *obj);
diff --git a/include/dt-bindings/interrupt-controller/arm-gic.h b/include/dt-bindings/interrupt-controller/arm-gic.h
index 1ea1b702fec2..d4110d5caa3e 100644
--- a/include/dt-bindings/interrupt-controller/arm-gic.h
+++ b/include/dt-bindings/interrupt-controller/arm-gic.h
@@ -7,14 +7,14 @@
7 7
8#include <dt-bindings/interrupt-controller/irq.h> 8#include <dt-bindings/interrupt-controller/irq.h>
9 9
10/* interrupt specific cell 0 */ 10/* interrupt specifier cell 0 */
11 11
12#define GIC_SPI 0 12#define GIC_SPI 0
13#define GIC_PPI 1 13#define GIC_PPI 1
14 14
15/* 15/*
16 * Interrupt specifier cell 2. 16 * Interrupt specifier cell 2.
17 * The flaggs in irq.h are valid, plus those below. 17 * The flags in irq.h are valid, plus those below.
18 */ 18 */
19#define GIC_CPU_MASK_RAW(x) ((x) << 8) 19#define GIC_CPU_MASK_RAW(x) ((x) << 8)
20#define GIC_CPU_MASK_SIMPLE(num) GIC_CPU_MASK_RAW((1 << (num)) - 1) 20#define GIC_CPU_MASK_SIMPLE(num) GIC_CPU_MASK_RAW((1 << (num)) - 1)
diff --git a/include/dt-bindings/thermal/thermal.h b/include/dt-bindings/thermal/thermal.h
index 59822a995858..b5e6b0069ac7 100644
--- a/include/dt-bindings/thermal/thermal.h
+++ b/include/dt-bindings/thermal/thermal.h
@@ -11,7 +11,7 @@
11#define _DT_BINDINGS_THERMAL_THERMAL_H 11#define _DT_BINDINGS_THERMAL_THERMAL_H
12 12
13/* On cooling devices upper and lower limits */ 13/* On cooling devices upper and lower limits */
14#define THERMAL_NO_LIMIT (-1UL) 14#define THERMAL_NO_LIMIT (~0)
15 15
16#endif 16#endif
17 17
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 856d381b1d5b..d459cd17b477 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -147,8 +147,8 @@ void acpi_numa_arch_fixup(void);
147 147
148#ifdef CONFIG_ACPI_HOTPLUG_CPU 148#ifdef CONFIG_ACPI_HOTPLUG_CPU
149/* Arch dependent functions for cpu hotplug support */ 149/* Arch dependent functions for cpu hotplug support */
150int acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu); 150int acpi_map_cpu(acpi_handle handle, int physid, int *pcpu);
151int acpi_unmap_lsapic(int cpu); 151int acpi_unmap_cpu(int cpu);
152#endif /* CONFIG_ACPI_HOTPLUG_CPU */ 152#endif /* CONFIG_ACPI_HOTPLUG_CPU */
153 153
154int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); 154int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base);
diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h
index 642d6ae4030c..a270f25ee7c7 100644
--- a/include/linux/ahci_platform.h
+++ b/include/linux/ahci_platform.h
@@ -21,16 +21,20 @@ struct device;
21struct ata_port_info; 21struct ata_port_info;
22struct ahci_host_priv; 22struct ahci_host_priv;
23struct platform_device; 23struct platform_device;
24struct scsi_host_template;
24 25
25int ahci_platform_enable_clks(struct ahci_host_priv *hpriv); 26int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
26void ahci_platform_disable_clks(struct ahci_host_priv *hpriv); 27void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
28int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv);
29void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv);
27int ahci_platform_enable_resources(struct ahci_host_priv *hpriv); 30int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
28void ahci_platform_disable_resources(struct ahci_host_priv *hpriv); 31void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
29struct ahci_host_priv *ahci_platform_get_resources( 32struct ahci_host_priv *ahci_platform_get_resources(
30 struct platform_device *pdev); 33 struct platform_device *pdev);
31int ahci_platform_init_host(struct platform_device *pdev, 34int ahci_platform_init_host(struct platform_device *pdev,
32 struct ahci_host_priv *hpriv, 35 struct ahci_host_priv *hpriv,
33 const struct ata_port_info *pi_template); 36 const struct ata_port_info *pi_template,
37 struct scsi_host_template *sht);
34 38
35int ahci_platform_suspend_host(struct device *dev); 39int ahci_platform_suspend_host(struct device *dev);
36int ahci_platform_resume_host(struct device *dev); 40int ahci_platform_resume_host(struct device *dev);
diff --git a/include/linux/ata.h b/include/linux/ata.h
index f2f4d8da97c0..1648026e06b4 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -503,7 +503,7 @@ struct ata_bmdma_prd {
503#define ata_id_has_dma(id) ((id)[ATA_ID_CAPABILITY] & (1 << 8)) 503#define ata_id_has_dma(id) ((id)[ATA_ID_CAPABILITY] & (1 << 8))
504#define ata_id_has_ncq(id) ((id)[ATA_ID_SATA_CAPABILITY] & (1 << 8)) 504#define ata_id_has_ncq(id) ((id)[ATA_ID_SATA_CAPABILITY] & (1 << 8))
505#define ata_id_queue_depth(id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1) 505#define ata_id_queue_depth(id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1)
506#define ata_id_removeable(id) ((id)[ATA_ID_CONFIG] & (1 << 7)) 506#define ata_id_removable(id) ((id)[ATA_ID_CONFIG] & (1 << 7))
507#define ata_id_has_atapi_AN(id) \ 507#define ata_id_has_atapi_AN(id) \
508 ((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \ 508 ((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \
509 ((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \ 509 ((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \
diff --git a/include/linux/ata_platform.h b/include/linux/ata_platform.h
index 5c618a084225..619d9e78e644 100644
--- a/include/linux/ata_platform.h
+++ b/include/linux/ata_platform.h
@@ -10,12 +10,15 @@ struct pata_platform_info {
10 unsigned int ioport_shift; 10 unsigned int ioport_shift;
11}; 11};
12 12
13struct scsi_host_template;
14
13extern int __pata_platform_probe(struct device *dev, 15extern int __pata_platform_probe(struct device *dev,
14 struct resource *io_res, 16 struct resource *io_res,
15 struct resource *ctl_res, 17 struct resource *ctl_res,
16 struct resource *irq_res, 18 struct resource *irq_res,
17 unsigned int ioport_shift, 19 unsigned int ioport_shift,
18 int __pio_mask); 20 int __pio_mask,
21 struct scsi_host_template *sht);
19 22
20/* 23/*
21 * Marvell SATA private data 24 * Marvell SATA private data
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 0c04917c2f12..af84234e1f6e 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -47,6 +47,7 @@ struct sk_buff;
47 47
48struct audit_krule { 48struct audit_krule {
49 int vers_ops; 49 int vers_ops;
50 u32 pflags;
50 u32 flags; 51 u32 flags;
51 u32 listnr; 52 u32 listnr;
52 u32 action; 53 u32 action;
@@ -64,6 +65,9 @@ struct audit_krule {
64 u64 prio; 65 u64 prio;
65}; 66};
66 67
68/* Flag to indicate legacy AUDIT_LOGINUID unset usage */
69#define AUDIT_LOGINUID_LEGACY 0x1
70
67struct audit_field { 71struct audit_field {
68 u32 type; 72 u32 type;
69 union { 73 union {
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 8aded9ab2e4e..5735e7130d63 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -34,7 +34,6 @@ struct blk_mq_hw_ctx {
34 unsigned long flags; /* BLK_MQ_F_* flags */ 34 unsigned long flags; /* BLK_MQ_F_* flags */
35 35
36 struct request_queue *queue; 36 struct request_queue *queue;
37 unsigned int queue_num;
38 struct blk_flush_queue *fq; 37 struct blk_flush_queue *fq;
39 38
40 void *driver_data; 39 void *driver_data;
@@ -54,7 +53,7 @@ struct blk_mq_hw_ctx {
54 unsigned long dispatched[BLK_MQ_MAX_DISPATCH_ORDER]; 53 unsigned long dispatched[BLK_MQ_MAX_DISPATCH_ORDER];
55 54
56 unsigned int numa_node; 55 unsigned int numa_node;
57 unsigned int cmd_size; /* per-request extra data */ 56 unsigned int queue_num;
58 57
59 atomic_t nr_active; 58 atomic_t nr_active;
60 59
@@ -195,13 +194,16 @@ static inline u16 blk_mq_unique_tag_to_tag(u32 unique_tag)
195struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index); 194struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index);
196struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int); 195struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int);
197 196
197int blk_mq_request_started(struct request *rq);
198void blk_mq_start_request(struct request *rq); 198void blk_mq_start_request(struct request *rq);
199void blk_mq_end_request(struct request *rq, int error); 199void blk_mq_end_request(struct request *rq, int error);
200void __blk_mq_end_request(struct request *rq, int error); 200void __blk_mq_end_request(struct request *rq, int error);
201 201
202void blk_mq_requeue_request(struct request *rq); 202void blk_mq_requeue_request(struct request *rq);
203void blk_mq_add_to_requeue_list(struct request *rq, bool at_head); 203void blk_mq_add_to_requeue_list(struct request *rq, bool at_head);
204void blk_mq_cancel_requeue_work(struct request_queue *q);
204void blk_mq_kick_requeue_list(struct request_queue *q); 205void blk_mq_kick_requeue_list(struct request_queue *q);
206void blk_mq_abort_requeue_list(struct request_queue *q);
205void blk_mq_complete_request(struct request *rq); 207void blk_mq_complete_request(struct request *rq);
206 208
207void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx); 209void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx);
@@ -212,6 +214,8 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async);
212void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); 214void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs);
213void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn, 215void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn,
214 void *priv); 216 void *priv);
217void blk_mq_unfreeze_queue(struct request_queue *q);
218void blk_mq_freeze_queue_start(struct request_queue *q);
215 219
216/* 220/*
217 * Driver command data is immediately after the request. So subtract request 221 * Driver command data is immediately after the request. So subtract request
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 445d59231bc4..c294e3e25e37 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -190,6 +190,7 @@ enum rq_flag_bits {
190 __REQ_PM, /* runtime pm request */ 190 __REQ_PM, /* runtime pm request */
191 __REQ_HASHED, /* on IO scheduler merge hash */ 191 __REQ_HASHED, /* on IO scheduler merge hash */
192 __REQ_MQ_INFLIGHT, /* track inflight for MQ */ 192 __REQ_MQ_INFLIGHT, /* track inflight for MQ */
193 __REQ_NO_TIMEOUT, /* requests may never expire */
193 __REQ_NR_BITS, /* stops here */ 194 __REQ_NR_BITS, /* stops here */
194}; 195};
195 196
@@ -243,5 +244,6 @@ enum rq_flag_bits {
243#define REQ_PM (1ULL << __REQ_PM) 244#define REQ_PM (1ULL << __REQ_PM)
244#define REQ_HASHED (1ULL << __REQ_HASHED) 245#define REQ_HASHED (1ULL << __REQ_HASHED)
245#define REQ_MQ_INFLIGHT (1ULL << __REQ_MQ_INFLIGHT) 246#define REQ_MQ_INFLIGHT (1ULL << __REQ_MQ_INFLIGHT)
247#define REQ_NO_TIMEOUT (1ULL << __REQ_NO_TIMEOUT)
246 248
247#endif /* __LINUX_BLK_TYPES_H */ 249#endif /* __LINUX_BLK_TYPES_H */
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 5d86416d35f2..61b19c46bdb3 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -87,8 +87,8 @@ struct ceph_osd_req_op {
87 struct ceph_osd_data osd_data; 87 struct ceph_osd_data osd_data;
88 } extent; 88 } extent;
89 struct { 89 struct {
90 __le32 name_len; 90 u32 name_len;
91 __le32 value_len; 91 u32 value_len;
92 __u8 cmp_op; /* CEPH_OSD_CMPXATTR_OP_* */ 92 __u8 cmp_op; /* CEPH_OSD_CMPXATTR_OP_* */
93 __u8 cmp_mode; /* CEPH_OSD_CMPXATTR_MODE_* */ 93 __u8 cmp_mode; /* CEPH_OSD_CMPXATTR_MODE_* */
94 struct ceph_osd_data osd_data; 94 struct ceph_osd_data osd_data;
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index da0dae0600e6..b9cb94c3102a 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -943,6 +943,8 @@ struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry,
943 943
944#else /* !CONFIG_CGROUPS */ 944#else /* !CONFIG_CGROUPS */
945 945
946struct cgroup_subsys_state;
947
946static inline int cgroup_init_early(void) { return 0; } 948static inline int cgroup_init_early(void) { return 0; }
947static inline int cgroup_init(void) { return 0; } 949static inline int cgroup_init(void) { return 0; }
948static inline void cgroup_fork(struct task_struct *p) {} 950static inline void cgroup_fork(struct task_struct *p) {}
@@ -955,6 +957,8 @@ static inline int cgroupstats_build(struct cgroupstats *stats,
955 return -EINVAL; 957 return -EINVAL;
956} 958}
957 959
960static inline void css_put(struct cgroup_subsys_state *css) {}
961
958/* No cgroups - nothing to do */ 962/* No cgroups - nothing to do */
959static inline int cgroup_attach_task_all(struct task_struct *from, 963static inline int cgroup_attach_task_all(struct task_struct *from,
960 struct task_struct *t) 964 struct task_struct *t)
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h
index 98c4f9b12b03..e4a96fb14403 100644
--- a/include/linux/cgroup_subsys.h
+++ b/include/linux/cgroup_subsys.h
@@ -15,6 +15,10 @@ SUBSYS(cpu)
15SUBSYS(cpuacct) 15SUBSYS(cpuacct)
16#endif 16#endif
17 17
18#if IS_ENABLED(CONFIG_BLK_CGROUP)
19SUBSYS(blkio)
20#endif
21
18#if IS_ENABLED(CONFIG_MEMCG) 22#if IS_ENABLED(CONFIG_MEMCG)
19SUBSYS(memory) 23SUBSYS(memory)
20#endif 24#endif
@@ -31,10 +35,6 @@ SUBSYS(freezer)
31SUBSYS(net_cls) 35SUBSYS(net_cls)
32#endif 36#endif
33 37
34#if IS_ENABLED(CONFIG_BLK_CGROUP)
35SUBSYS(blkio)
36#endif
37
38#if IS_ENABLED(CONFIG_CGROUP_PERF) 38#if IS_ENABLED(CONFIG_CGROUP_PERF)
39SUBSYS(perf_event) 39SUBSYS(perf_event)
40#endif 40#endif
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index a1c81f80978e..176bf816875e 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -215,7 +215,7 @@ static __always_inline void __read_once_size(volatile void *p, void *res, int si
215 } 215 }
216} 216}
217 217
218static __always_inline void __assign_once_size(volatile void *p, void *res, int size) 218static __always_inline void __write_once_size(volatile void *p, void *res, int size)
219{ 219{
220 switch (size) { 220 switch (size) {
221 case 1: *(volatile __u8 *)p = *(__u8 *)res; break; 221 case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
@@ -235,15 +235,15 @@ static __always_inline void __assign_once_size(volatile void *p, void *res, int
235/* 235/*
236 * Prevent the compiler from merging or refetching reads or writes. The 236 * Prevent the compiler from merging or refetching reads or writes. The
237 * compiler is also forbidden from reordering successive instances of 237 * compiler is also forbidden from reordering successive instances of
238 * READ_ONCE, ASSIGN_ONCE and ACCESS_ONCE (see below), but only when the 238 * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the
239 * compiler is aware of some particular ordering. One way to make the 239 * compiler is aware of some particular ordering. One way to make the
240 * compiler aware of ordering is to put the two invocations of READ_ONCE, 240 * compiler aware of ordering is to put the two invocations of READ_ONCE,
241 * ASSIGN_ONCE or ACCESS_ONCE() in different C statements. 241 * WRITE_ONCE or ACCESS_ONCE() in different C statements.
242 * 242 *
243 * In contrast to ACCESS_ONCE these two macros will also work on aggregate 243 * In contrast to ACCESS_ONCE these two macros will also work on aggregate
244 * data types like structs or unions. If the size of the accessed data 244 * data types like structs or unions. If the size of the accessed data
245 * type exceeds the word size of the machine (e.g., 32 bits or 64 bits) 245 * type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
246 * READ_ONCE() and ASSIGN_ONCE() will fall back to memcpy and print a 246 * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a
247 * compile-time warning. 247 * compile-time warning.
248 * 248 *
249 * Their two major use cases are: (1) Mediating communication between 249 * Their two major use cases are: (1) Mediating communication between
@@ -257,8 +257,8 @@ static __always_inline void __assign_once_size(volatile void *p, void *res, int
257#define READ_ONCE(x) \ 257#define READ_ONCE(x) \
258 ({ typeof(x) __val; __read_once_size(&x, &__val, sizeof(__val)); __val; }) 258 ({ typeof(x) __val; __read_once_size(&x, &__val, sizeof(__val)); __val; })
259 259
260#define ASSIGN_ONCE(val, x) \ 260#define WRITE_ONCE(x, val) \
261 ({ typeof(x) __val; __val = val; __assign_once_size(&x, &__val, sizeof(__val)); __val; }) 261 ({ typeof(x) __val; __val = val; __write_once_size(&x, &__val, sizeof(__val)); __val; })
262 262
263#endif /* __KERNEL__ */ 263#endif /* __KERNEL__ */
264 264
@@ -385,7 +385,7 @@ static __always_inline void __assign_once_size(volatile void *p, void *res, int
385 385
386/* Is this type a native word size -- useful for atomic operations */ 386/* Is this type a native word size -- useful for atomic operations */
387#ifndef __native_word 387#ifndef __native_word
388# define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) 388# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
389#endif 389#endif
390 390
391/* Compile time object size, -1 for unknown */ 391/* Compile time object size, -1 for unknown */
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index c303d383def1..bd955270d5aa 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -50,7 +50,7 @@ static inline struct thermal_cooling_device *
50of_cpufreq_cooling_register(struct device_node *np, 50of_cpufreq_cooling_register(struct device_node *np,
51 const struct cpumask *clip_cpus) 51 const struct cpumask *clip_cpus)
52{ 52{
53 return NULL; 53 return ERR_PTR(-ENOSYS);
54} 54}
55#endif 55#endif
56 56
@@ -65,13 +65,13 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq);
65static inline struct thermal_cooling_device * 65static inline struct thermal_cooling_device *
66cpufreq_cooling_register(const struct cpumask *clip_cpus) 66cpufreq_cooling_register(const struct cpumask *clip_cpus)
67{ 67{
68 return NULL; 68 return ERR_PTR(-ENOSYS);
69} 69}
70static inline struct thermal_cooling_device * 70static inline struct thermal_cooling_device *
71of_cpufreq_cooling_register(struct device_node *np, 71of_cpufreq_cooling_register(struct device_node *np,
72 const struct cpumask *clip_cpus) 72 const struct cpumask *clip_cpus)
73{ 73{
74 return NULL; 74 return ERR_PTR(-ENOSYS);
75} 75}
76static inline 76static inline
77void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) 77void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index a07e087f54b2..ab70f3bc44ad 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -53,7 +53,6 @@ struct cpuidle_state {
53}; 53};
54 54
55/* Idle State Flags */ 55/* Idle State Flags */
56#define CPUIDLE_FLAG_TIME_INVALID (0x01) /* is residency time measurable? */
57#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ 56#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */
58#define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */ 57#define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */
59 58
@@ -89,8 +88,6 @@ DECLARE_PER_CPU(struct cpuidle_device, cpuidle_dev);
89/** 88/**
90 * cpuidle_get_last_residency - retrieves the last state's residency time 89 * cpuidle_get_last_residency - retrieves the last state's residency time
91 * @dev: the target CPU 90 * @dev: the target CPU
92 *
93 * NOTE: this value is invalid if CPUIDLE_FLAG_TIME_INVALID is set
94 */ 91 */
95static inline int cpuidle_get_last_residency(struct cpuidle_device *dev) 92static inline int cpuidle_get_last_residency(struct cpuidle_device *dev)
96{ 93{
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 0238d612750e..b674837e2b98 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -848,7 +848,7 @@ efi_guidcmp (efi_guid_t left, efi_guid_t right)
848} 848}
849 849
850static inline char * 850static inline char *
851efi_guid_unparse(efi_guid_t *guid, char *out) 851efi_guid_to_str(efi_guid_t *guid, char *out)
852{ 852{
853 sprintf(out, "%pUl", guid->b); 853 sprintf(out, "%pUl", guid->b);
854 return out; 854 return out;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f90c0282c114..42efe13077b6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -135,7 +135,7 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
135#define FMODE_CAN_WRITE ((__force fmode_t)0x40000) 135#define FMODE_CAN_WRITE ((__force fmode_t)0x40000)
136 136
137/* File was opened by fanotify and shouldn't generate fanotify events */ 137/* File was opened by fanotify and shouldn't generate fanotify events */
138#define FMODE_NONOTIFY ((__force fmode_t)0x1000000) 138#define FMODE_NONOTIFY ((__force fmode_t)0x4000000)
139 139
140/* 140/*
141 * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector 141 * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 0bebb5c348b8..d36f68b08acc 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -595,7 +595,7 @@ extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
595 char *filter_str); 595 char *filter_str);
596extern void ftrace_profile_free_filter(struct perf_event *event); 596extern void ftrace_profile_free_filter(struct perf_event *event);
597extern void *perf_trace_buf_prepare(int size, unsigned short type, 597extern void *perf_trace_buf_prepare(int size, unsigned short type,
598 struct pt_regs *regs, int *rctxp); 598 struct pt_regs **regs, int *rctxp);
599 599
600static inline void 600static inline void
601perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, 601perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr,
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h
index 55b685719d52..09460d6d6682 100644
--- a/include/linux/genetlink.h
+++ b/include/linux/genetlink.h
@@ -11,6 +11,10 @@ extern void genl_unlock(void);
11extern int lockdep_genl_is_held(void); 11extern int lockdep_genl_is_held(void);
12#endif 12#endif
13 13
14/* for synchronisation between af_netlink and genetlink */
15extern atomic_t genl_sk_destructing_cnt;
16extern wait_queue_head_t genl_sk_destructing_waitq;
17
14/** 18/**
15 * rcu_dereference_genl - rcu_dereference with debug checking 19 * rcu_dereference_genl - rcu_dereference with debug checking
16 * @p: The pointer to read, prior to dereferencing 20 * @p: The pointer to read, prior to dereferencing
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index a036d058a249..05f6df1fdf5b 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -170,6 +170,7 @@ enum hrtimer_base_type {
170 * @clock_was_set: Indicates that clock was set from irq context. 170 * @clock_was_set: Indicates that clock was set from irq context.
171 * @expires_next: absolute time of the next event which was scheduled 171 * @expires_next: absolute time of the next event which was scheduled
172 * via clock_set_next_event() 172 * via clock_set_next_event()
173 * @in_hrtirq: hrtimer_interrupt() is currently executing
173 * @hres_active: State of high resolution mode 174 * @hres_active: State of high resolution mode
174 * @hang_detected: The last hrtimer interrupt detected a hang 175 * @hang_detected: The last hrtimer interrupt detected a hang
175 * @nr_events: Total number of hrtimer interrupt events 176 * @nr_events: Total number of hrtimer interrupt events
@@ -185,6 +186,7 @@ struct hrtimer_cpu_base {
185 unsigned int clock_was_set; 186 unsigned int clock_was_set;
186#ifdef CONFIG_HIGH_RES_TIMERS 187#ifdef CONFIG_HIGH_RES_TIMERS
187 ktime_t expires_next; 188 ktime_t expires_next;
189 int in_hrtirq;
188 int hres_active; 190 int hres_active;
189 int hang_detected; 191 int hang_detected;
190 unsigned long nr_events; 192 unsigned long nr_events;
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)
256enum i2c_slave_event { 259enum 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/if_vlan.h b/include/linux/if_vlan.h
index 515a35e2a48a..960e666c51e4 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -472,27 +472,59 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)
472/** 472/**
473 * vlan_get_protocol - get protocol EtherType. 473 * vlan_get_protocol - get protocol EtherType.
474 * @skb: skbuff to query 474 * @skb: skbuff to query
475 * @type: first vlan protocol
476 * @depth: buffer to store length of eth and vlan tags in bytes
475 * 477 *
476 * Returns the EtherType of the packet, regardless of whether it is 478 * Returns the EtherType of the packet, regardless of whether it is
477 * vlan encapsulated (normal or hardware accelerated) or not. 479 * vlan encapsulated (normal or hardware accelerated) or not.
478 */ 480 */
479static inline __be16 vlan_get_protocol(const struct sk_buff *skb) 481static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type,
482 int *depth)
480{ 483{
481 __be16 protocol = 0; 484 unsigned int vlan_depth = skb->mac_len;
482 485
483 if (vlan_tx_tag_present(skb) || 486 /* if type is 802.1Q/AD then the header should already be
484 skb->protocol != cpu_to_be16(ETH_P_8021Q)) 487 * present at mac_len - VLAN_HLEN (if mac_len > 0), or at
485 protocol = skb->protocol; 488 * ETH_HLEN otherwise
486 else { 489 */
487 __be16 proto, *protop; 490 if (type == htons(ETH_P_8021Q) || type == htons(ETH_P_8021AD)) {
488 protop = skb_header_pointer(skb, offsetof(struct vlan_ethhdr, 491 if (vlan_depth) {
489 h_vlan_encapsulated_proto), 492 if (WARN_ON(vlan_depth < VLAN_HLEN))
490 sizeof(proto), &proto); 493 return 0;
491 if (likely(protop)) 494 vlan_depth -= VLAN_HLEN;
492 protocol = *protop; 495 } else {
496 vlan_depth = ETH_HLEN;
497 }
498 do {
499 struct vlan_hdr *vh;
500
501 if (unlikely(!pskb_may_pull(skb,
502 vlan_depth + VLAN_HLEN)))
503 return 0;
504
505 vh = (struct vlan_hdr *)(skb->data + vlan_depth);
506 type = vh->h_vlan_encapsulated_proto;
507 vlan_depth += VLAN_HLEN;
508 } while (type == htons(ETH_P_8021Q) ||
509 type == htons(ETH_P_8021AD));
493 } 510 }
494 511
495 return protocol; 512 if (depth)
513 *depth = vlan_depth;
514
515 return type;
516}
517
518/**
519 * vlan_get_protocol - get protocol EtherType.
520 * @skb: skbuff to query
521 *
522 * Returns the EtherType of the packet, regardless of whether it is
523 * vlan encapsulated (normal or hardware accelerated) or not.
524 */
525static inline __be16 vlan_get_protocol(struct sk_buff *skb)
526{
527 return __vlan_get_protocol(skb, skb->protocol, NULL);
496} 528}
497 529
498static inline void vlan_set_encap_proto(struct sk_buff *skb, 530static inline void vlan_set_encap_proto(struct sk_buff *skb,
diff --git a/include/linux/kdb.h b/include/linux/kdb.h
index 290db1269c4c..75ae2e2631fc 100644
--- a/include/linux/kdb.h
+++ b/include/linux/kdb.h
@@ -13,11 +13,54 @@
13 * Copyright (C) 2009 Jason Wessel <jason.wessel@windriver.com> 13 * Copyright (C) 2009 Jason Wessel <jason.wessel@windriver.com>
14 */ 14 */
15 15
16/* Shifted versions of the command enable bits are be used if the command
17 * has no arguments (see kdb_check_flags). This allows commands, such as
18 * go, to have different permissions depending upon whether it is called
19 * with an argument.
20 */
21#define KDB_ENABLE_NO_ARGS_SHIFT 10
22
16typedef enum { 23typedef enum {
17 KDB_REPEAT_NONE = 0, /* Do not repeat this command */ 24 KDB_ENABLE_ALL = (1 << 0), /* Enable everything */
18 KDB_REPEAT_NO_ARGS, /* Repeat the command without arguments */ 25 KDB_ENABLE_MEM_READ = (1 << 1),
19 KDB_REPEAT_WITH_ARGS, /* Repeat the command including its arguments */ 26 KDB_ENABLE_MEM_WRITE = (1 << 2),
20} kdb_repeat_t; 27 KDB_ENABLE_REG_READ = (1 << 3),
28 KDB_ENABLE_REG_WRITE = (1 << 4),
29 KDB_ENABLE_INSPECT = (1 << 5),
30 KDB_ENABLE_FLOW_CTRL = (1 << 6),
31 KDB_ENABLE_SIGNAL = (1 << 7),
32 KDB_ENABLE_REBOOT = (1 << 8),
33 /* User exposed values stop here, all remaining flags are
34 * exclusively used to describe a commands behaviour.
35 */
36
37 KDB_ENABLE_ALWAYS_SAFE = (1 << 9),
38 KDB_ENABLE_MASK = (1 << KDB_ENABLE_NO_ARGS_SHIFT) - 1,
39
40 KDB_ENABLE_ALL_NO_ARGS = KDB_ENABLE_ALL << KDB_ENABLE_NO_ARGS_SHIFT,
41 KDB_ENABLE_MEM_READ_NO_ARGS = KDB_ENABLE_MEM_READ
42 << KDB_ENABLE_NO_ARGS_SHIFT,
43 KDB_ENABLE_MEM_WRITE_NO_ARGS = KDB_ENABLE_MEM_WRITE
44 << KDB_ENABLE_NO_ARGS_SHIFT,
45 KDB_ENABLE_REG_READ_NO_ARGS = KDB_ENABLE_REG_READ
46 << KDB_ENABLE_NO_ARGS_SHIFT,
47 KDB_ENABLE_REG_WRITE_NO_ARGS = KDB_ENABLE_REG_WRITE
48 << KDB_ENABLE_NO_ARGS_SHIFT,
49 KDB_ENABLE_INSPECT_NO_ARGS = KDB_ENABLE_INSPECT
50 << KDB_ENABLE_NO_ARGS_SHIFT,
51 KDB_ENABLE_FLOW_CTRL_NO_ARGS = KDB_ENABLE_FLOW_CTRL
52 << KDB_ENABLE_NO_ARGS_SHIFT,
53 KDB_ENABLE_SIGNAL_NO_ARGS = KDB_ENABLE_SIGNAL
54 << KDB_ENABLE_NO_ARGS_SHIFT,
55 KDB_ENABLE_REBOOT_NO_ARGS = KDB_ENABLE_REBOOT
56 << KDB_ENABLE_NO_ARGS_SHIFT,
57 KDB_ENABLE_ALWAYS_SAFE_NO_ARGS = KDB_ENABLE_ALWAYS_SAFE
58 << KDB_ENABLE_NO_ARGS_SHIFT,
59 KDB_ENABLE_MASK_NO_ARGS = KDB_ENABLE_MASK << KDB_ENABLE_NO_ARGS_SHIFT,
60
61 KDB_REPEAT_NO_ARGS = 0x40000000, /* Repeat the command w/o arguments */
62 KDB_REPEAT_WITH_ARGS = 0x80000000, /* Repeat the command with args */
63} kdb_cmdflags_t;
21 64
22typedef int (*kdb_func_t)(int, const char **); 65typedef int (*kdb_func_t)(int, const char **);
23 66
@@ -62,6 +105,7 @@ extern atomic_t kdb_event;
62#define KDB_BADLENGTH (-19) 105#define KDB_BADLENGTH (-19)
63#define KDB_NOBP (-20) 106#define KDB_NOBP (-20)
64#define KDB_BADADDR (-21) 107#define KDB_BADADDR (-21)
108#define KDB_NOPERM (-22)
65 109
66/* 110/*
67 * kdb_diemsg 111 * kdb_diemsg
@@ -146,17 +190,17 @@ static inline const char *kdb_walk_kallsyms(loff_t *pos)
146 190
147/* Dynamic kdb shell command registration */ 191/* Dynamic kdb shell command registration */
148extern int kdb_register(char *, kdb_func_t, char *, char *, short); 192extern int kdb_register(char *, kdb_func_t, char *, char *, short);
149extern int kdb_register_repeat(char *, kdb_func_t, char *, char *, 193extern int kdb_register_flags(char *, kdb_func_t, char *, char *,
150 short, kdb_repeat_t); 194 short, kdb_cmdflags_t);
151extern int kdb_unregister(char *); 195extern int kdb_unregister(char *);
152#else /* ! CONFIG_KGDB_KDB */ 196#else /* ! CONFIG_KGDB_KDB */
153static inline __printf(1, 2) int kdb_printf(const char *fmt, ...) { return 0; } 197static inline __printf(1, 2) int kdb_printf(const char *fmt, ...) { return 0; }
154static inline void kdb_init(int level) {} 198static inline void kdb_init(int level) {}
155static inline int kdb_register(char *cmd, kdb_func_t func, char *usage, 199static inline int kdb_register(char *cmd, kdb_func_t func, char *usage,
156 char *help, short minlen) { return 0; } 200 char *help, short minlen) { return 0; }
157static inline int kdb_register_repeat(char *cmd, kdb_func_t func, char *usage, 201static inline int kdb_register_flags(char *cmd, kdb_func_t func, char *usage,
158 char *help, short minlen, 202 char *help, short minlen,
159 kdb_repeat_t repeat) { return 0; } 203 kdb_cmdflags_t flags) { return 0; }
160static inline int kdb_unregister(char *cmd) { return 0; } 204static inline int kdb_unregister(char *cmd) { return 0; }
161#endif /* CONFIG_KGDB_KDB */ 205#endif /* CONFIG_KGDB_KDB */
162enum { 206enum {
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/ktime.h b/include/linux/ktime.h
index c9d645ad98ff..5fc3d1083071 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -166,7 +166,17 @@ static inline bool ktime_before(const ktime_t cmp1, const ktime_t cmp2)
166} 166}
167 167
168#if BITS_PER_LONG < 64 168#if BITS_PER_LONG < 64
169extern u64 ktime_divns(const ktime_t kt, s64 div); 169extern u64 __ktime_divns(const ktime_t kt, s64 div);
170static inline u64 ktime_divns(const ktime_t kt, s64 div)
171{
172 if (__builtin_constant_p(div) && !(div >> 32)) {
173 u64 ns = kt.tv64;
174 do_div(ns, div);
175 return ns;
176 } else {
177 return __ktime_divns(kt, div);
178 }
179}
170#else /* BITS_PER_LONG < 64 */ 180#else /* BITS_PER_LONG < 64 */
171# define ktime_divns(kt, div) (u64)((kt).tv64 / (div)) 181# define ktime_divns(kt, div) (u64)((kt).tv64 / (div))
172#endif 182#endif
@@ -186,6 +196,11 @@ static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier)
186 return ktime_to_us(ktime_sub(later, earlier)); 196 return ktime_to_us(ktime_sub(later, earlier));
187} 197}
188 198
199static inline s64 ktime_ms_delta(const ktime_t later, const ktime_t earlier)
200{
201 return ktime_to_ms(ktime_sub(later, earlier));
202}
203
189static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec) 204static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec)
190{ 205{
191 return ktime_add_ns(kt, usec * NSEC_PER_USEC); 206 return ktime_add_ns(kt, usec * NSEC_PER_USEC);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2d182413b1db..61df823ac86a 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -231,6 +231,7 @@ enum {
231 ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity 231 ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity
232 * led */ 232 * led */
233 ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */ 233 ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */
234 ATA_FLAG_LOWTAG = (1 << 24), /* host wants lowest available tag */
234 235
235 /* bits 24:31 of ap->flags are reserved for LLD specific flags */ 236 /* bits 24:31 of ap->flags are reserved for LLD specific flags */
236 237
@@ -422,6 +423,7 @@ enum {
422 ATA_HORKAGE_NO_NCQ_TRIM = (1 << 19), /* don't use queued TRIM */ 423 ATA_HORKAGE_NO_NCQ_TRIM = (1 << 19), /* don't use queued TRIM */
423 ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */ 424 ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */
424 ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */ 425 ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */
426 ATA_HORKAGE_ZERO_AFTER_TRIM = (1 << 22),/* guarantees zero after trim */
425 427
426 /* DMA mask for user DMA control: User visible values; DO NOT 428 /* DMA mask for user DMA control: User visible values; DO NOT
427 renumber */ 429 renumber */
@@ -1338,6 +1340,12 @@ extern const struct ata_port_operations ata_base_port_ops;
1338extern const struct ata_port_operations sata_port_ops; 1340extern const struct ata_port_operations sata_port_ops;
1339extern struct device_attribute *ata_common_sdev_attrs[]; 1341extern struct device_attribute *ata_common_sdev_attrs[];
1340 1342
1343/*
1344 * All sht initializers (BASE, PIO, BMDMA, NCQ) must be instantiated
1345 * by the edge drivers. Because the 'module' field of sht must be the
1346 * edge driver's module reference, otherwise the driver can be unloaded
1347 * even if the scsi_device is being accessed.
1348 */
1341#define ATA_BASE_SHT(drv_name) \ 1349#define ATA_BASE_SHT(drv_name) \
1342 .module = THIS_MODULE, \ 1350 .module = THIS_MODULE, \
1343 .name = drv_name, \ 1351 .name = drv_name, \
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/mfd/stmpe.h b/include/linux/mfd/stmpe.h
index 575a86c7fcbd..f742b6717d52 100644
--- a/include/linux/mfd/stmpe.h
+++ b/include/linux/mfd/stmpe.h
@@ -50,6 +50,8 @@ enum {
50 STMPE_IDX_GPEDR_MSB, 50 STMPE_IDX_GPEDR_MSB,
51 STMPE_IDX_GPRER_LSB, 51 STMPE_IDX_GPRER_LSB,
52 STMPE_IDX_GPFER_LSB, 52 STMPE_IDX_GPFER_LSB,
53 STMPE_IDX_GPPUR_LSB,
54 STMPE_IDX_GPPDR_LSB,
53 STMPE_IDX_GPAFR_U_MSB, 55 STMPE_IDX_GPAFR_U_MSB,
54 STMPE_IDX_IEGPIOR_LSB, 56 STMPE_IDX_IEGPIOR_LSB,
55 STMPE_IDX_ISGPIOR_LSB, 57 STMPE_IDX_ISGPIOR_LSB,
@@ -113,24 +115,6 @@ extern int stmpe_set_altfunc(struct stmpe *stmpe, u32 pins,
113extern int stmpe_enable(struct stmpe *stmpe, unsigned int blocks); 115extern int stmpe_enable(struct stmpe *stmpe, unsigned int blocks);
114extern int stmpe_disable(struct stmpe *stmpe, unsigned int blocks); 116extern int stmpe_disable(struct stmpe *stmpe, unsigned int blocks);
115 117
116struct matrix_keymap_data;
117
118/**
119 * struct stmpe_keypad_platform_data - STMPE keypad platform data
120 * @keymap_data: key map table and size
121 * @debounce_ms: debounce interval, in ms. Maximum is
122 * %STMPE_KEYPAD_MAX_DEBOUNCE.
123 * @scan_count: number of key scanning cycles to confirm key data.
124 * Maximum is %STMPE_KEYPAD_MAX_SCAN_COUNT.
125 * @no_autorepeat: disable key autorepeat
126 */
127struct stmpe_keypad_platform_data {
128 const struct matrix_keymap_data *keymap_data;
129 unsigned int debounce_ms;
130 unsigned int scan_count;
131 bool no_autorepeat;
132};
133
134#define STMPE_GPIO_NOREQ_811_TOUCH (0xf0) 118#define STMPE_GPIO_NOREQ_811_TOUCH (0xf0)
135 119
136/** 120/**
@@ -199,7 +183,6 @@ struct stmpe_ts_platform_data {
199 * @irq_gpio: gpio number over which irq will be requested (significant only if 183 * @irq_gpio: gpio number over which irq will be requested (significant only if
200 * irq_over_gpio is true) 184 * irq_over_gpio is true)
201 * @gpio: GPIO-specific platform data 185 * @gpio: GPIO-specific platform data
202 * @keypad: keypad-specific platform data
203 * @ts: touchscreen-specific platform data 186 * @ts: touchscreen-specific platform data
204 */ 187 */
205struct stmpe_platform_data { 188struct stmpe_platform_data {
@@ -212,7 +195,6 @@ struct stmpe_platform_data {
212 int autosleep_timeout; 195 int autosleep_timeout;
213 196
214 struct stmpe_gpio_platform_data *gpio; 197 struct stmpe_gpio_platform_data *gpio;
215 struct stmpe_keypad_platform_data *keypad;
216 struct stmpe_ts_platform_data *ts; 198 struct stmpe_ts_platform_data *ts;
217}; 199};
218 200
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 25c791e295fd..5f3a9aa7225d 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -97,7 +97,7 @@ enum {
97 MLX4_MAX_NUM_PF = 16, 97 MLX4_MAX_NUM_PF = 16,
98 MLX4_MAX_NUM_VF = 126, 98 MLX4_MAX_NUM_VF = 126,
99 MLX4_MAX_NUM_VF_P_PORT = 64, 99 MLX4_MAX_NUM_VF_P_PORT = 64,
100 MLX4_MFUNC_MAX = 80, 100 MLX4_MFUNC_MAX = 128,
101 MLX4_MAX_EQ_NUM = 1024, 101 MLX4_MAX_EQ_NUM = 1024,
102 MLX4_MFUNC_EQ_NUM = 4, 102 MLX4_MFUNC_EQ_NUM = 4,
103 MLX4_MFUNC_MAX_EQES = 8, 103 MLX4_MFUNC_MAX_EQES = 8,
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f80d0194c9bc..237b3ba29225 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -290,6 +290,14 @@ struct vm_operations_struct {
290 /* called by sys_remap_file_pages() to populate non-linear mapping */ 290 /* called by sys_remap_file_pages() to populate non-linear mapping */
291 int (*remap_pages)(struct vm_area_struct *vma, unsigned long addr, 291 int (*remap_pages)(struct vm_area_struct *vma, unsigned long addr,
292 unsigned long size, pgoff_t pgoff); 292 unsigned long size, pgoff_t pgoff);
293
294 /*
295 * Called by vm_normal_page() for special PTEs to find the
296 * page for @addr. This is useful if the default behavior
297 * (using pte_page()) would not find the correct page.
298 */
299 struct page *(*find_special_page)(struct vm_area_struct *vma,
300 unsigned long addr);
293}; 301};
294 302
295struct mmu_gather; 303struct mmu_gather;
@@ -1070,6 +1078,7 @@ static inline int page_mapped(struct page *page)
1070#define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ 1078#define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */
1071#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ 1079#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 */ 1080#define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */
1081#define VM_FAULT_SIGSEGV 0x0040
1073 1082
1074#define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ 1083#define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */
1075#define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ 1084#define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */
@@ -1078,8 +1087,9 @@ static inline int page_mapped(struct page *page)
1078 1087
1079#define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ 1088#define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */
1080 1089
1081#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ 1090#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \
1082 VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE) 1091 VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \
1092 VM_FAULT_FALLBACK)
1083 1093
1084/* Encode hstate index for a hwpoisoned large page */ 1094/* Encode hstate index for a hwpoisoned large page */
1085#define VM_FAULT_SET_HINDEX(x) ((x) << 12) 1095#define VM_FAULT_SET_HINDEX(x) ((x) << 12)
@@ -1952,7 +1962,7 @@ extern int expand_downwards(struct vm_area_struct *vma,
1952#if VM_GROWSUP 1962#if VM_GROWSUP
1953extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); 1963extern int expand_upwards(struct vm_area_struct *vma, unsigned long address);
1954#else 1964#else
1955 #define expand_upwards(vma, address) do { } while (0) 1965 #define expand_upwards(vma, address) (0)
1956#endif 1966#endif
1957 1967
1958/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ 1968/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index 375af80bde7d..f767a0de611f 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -137,6 +137,7 @@ struct sdhci_host {
137#define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */ 137#define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */
138#define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ 138#define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */
139#define SDHCI_USE_64_BIT_DMA (1<<12) /* Use 64-bit DMA */ 139#define SDHCI_USE_64_BIT_DMA (1<<12) /* Use 64-bit DMA */
140#define SDHCI_HS400_TUNING (1<<13) /* Tuning for HS400 */
140 141
141 unsigned int version; /* SDHCI spec. version */ 142 unsigned int version; /* SDHCI spec. version */
142 143
diff --git a/include/linux/module.h b/include/linux/module.h
index ebfb0e153c6a..b653d7c0a05a 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -444,7 +444,7 @@ extern void __module_put_and_exit(struct module *mod, long code)
444#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code) 444#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
445 445
446#ifdef CONFIG_MODULE_UNLOAD 446#ifdef CONFIG_MODULE_UNLOAD
447unsigned long module_refcount(struct module *mod); 447int module_refcount(struct module *mod);
448void __symbol_put(const char *symbol); 448void __symbol_put(const char *symbol);
449#define symbol_put(x) __symbol_put(VMLINUX_SYMBOL_STR(x)) 449#define symbol_put(x) __symbol_put(VMLINUX_SYMBOL_STR(x))
450void symbol_put_addr(void *addr); 450void symbol_put_addr(void *addr);
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
index 7eeb9bbfb816..f7556261fe3c 100644
--- a/include/linux/moduleloader.h
+++ b/include/linux/moduleloader.h
@@ -26,7 +26,7 @@ unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section);
26void *module_alloc(unsigned long size); 26void *module_alloc(unsigned long size);
27 27
28/* Free memory returned from module_alloc. */ 28/* Free memory returned from module_alloc. */
29void module_free(struct module *mod, void *module_region); 29void module_memfree(void *module_region);
30 30
31/* 31/*
32 * Apply the given relocation to the (simplified) ELF. Return -error 32 * Apply the given relocation to the (simplified) ELF. Return -error
@@ -82,4 +82,6 @@ int module_finalize(const Elf_Ehdr *hdr,
82/* Any cleanup needed when module leaves. */ 82/* Any cleanup needed when module leaves. */
83void module_arch_cleanup(struct module *mod); 83void module_arch_cleanup(struct module *mod);
84 84
85/* Any cleanup before freeing mod->module_init */
86void module_arch_freeing_init(struct module *mod);
85#endif 87#endif
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c31f74d76ebd..52fd8e8694cf 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -852,11 +852,11 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
852 * 3. Update dev->stats asynchronously and atomically, and define 852 * 3. Update dev->stats asynchronously and atomically, and define
853 * neither operation. 853 * neither operation.
854 * 854 *
855 * int (*ndo_vlan_rx_add_vid)(struct net_device *dev, __be16 proto, u16t vid); 855 * int (*ndo_vlan_rx_add_vid)(struct net_device *dev, __be16 proto, u16 vid);
856 * If device support VLAN filtering this function is called when a 856 * If device support VLAN filtering this function is called when a
857 * VLAN id is registered. 857 * VLAN id is registered.
858 * 858 *
859 * int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, unsigned short vid); 859 * int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, __be16 proto, u16 vid);
860 * If device support VLAN filtering this function is called when a 860 * If device support VLAN filtering this function is called when a
861 * VLAN id is unregistered. 861 * VLAN id is unregistered.
862 * 862 *
@@ -1012,12 +1012,15 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
1012 * Callback to use for xmit over the accelerated station. This 1012 * Callback to use for xmit over the accelerated station. This
1013 * is used in place of ndo_start_xmit on accelerated net 1013 * is used in place of ndo_start_xmit on accelerated net
1014 * devices. 1014 * devices.
1015 * bool (*ndo_gso_check) (struct sk_buff *skb, 1015 * netdev_features_t (*ndo_features_check) (struct sk_buff *skb,
1016 * struct net_device *dev); 1016 * struct net_device *dev
1017 * netdev_features_t features);
1017 * Called by core transmit path to determine if device is capable of 1018 * Called by core transmit path to determine if device is capable of
1018 * performing GSO on a packet. The device returns true if it is 1019 * performing offload operations on a given packet. This is to give
1019 * able to GSO the packet, false otherwise. If the return value is 1020 * the device an opportunity to implement any restrictions that cannot
1020 * false the stack will do software GSO. 1021 * be otherwise expressed by feature flags. The check is called with
1022 * the set of features that the stack has calculated and it returns
1023 * those the driver believes to be appropriate.
1021 * 1024 *
1022 * int (*ndo_switch_parent_id_get)(struct net_device *dev, 1025 * int (*ndo_switch_parent_id_get)(struct net_device *dev,
1023 * struct netdev_phys_item_id *psid); 1026 * struct netdev_phys_item_id *psid);
@@ -1178,8 +1181,9 @@ struct net_device_ops {
1178 struct net_device *dev, 1181 struct net_device *dev,
1179 void *priv); 1182 void *priv);
1180 int (*ndo_get_lock_subclass)(struct net_device *dev); 1183 int (*ndo_get_lock_subclass)(struct net_device *dev);
1181 bool (*ndo_gso_check) (struct sk_buff *skb, 1184 netdev_features_t (*ndo_features_check) (struct sk_buff *skb,
1182 struct net_device *dev); 1185 struct net_device *dev,
1186 netdev_features_t features);
1183#ifdef CONFIG_NET_SWITCHDEV 1187#ifdef CONFIG_NET_SWITCHDEV
1184 int (*ndo_switch_parent_id_get)(struct net_device *dev, 1188 int (*ndo_switch_parent_id_get)(struct net_device *dev,
1185 struct netdev_phys_item_id *psid); 1189 struct netdev_phys_item_id *psid);
@@ -2081,7 +2085,7 @@ extern rwlock_t dev_base_lock; /* Device list lock */
2081 list_for_each_entry_continue_rcu(d, &(net)->dev_base_head, dev_list) 2085 list_for_each_entry_continue_rcu(d, &(net)->dev_base_head, dev_list)
2082#define for_each_netdev_in_bond_rcu(bond, slave) \ 2086#define for_each_netdev_in_bond_rcu(bond, slave) \
2083 for_each_netdev_rcu(&init_net, slave) \ 2087 for_each_netdev_rcu(&init_net, slave) \
2084 if (netdev_master_upper_dev_get_rcu(slave) == bond) 2088 if (netdev_master_upper_dev_get_rcu(slave) == (bond))
2085#define net_device_entry(lh) list_entry(lh, struct net_device, dev_list) 2089#define net_device_entry(lh) list_entry(lh, struct net_device, dev_list)
2086 2090
2087static inline struct net_device *next_net_device(struct net_device *dev) 2091static inline struct net_device *next_net_device(struct net_device *dev)
@@ -3611,8 +3615,6 @@ static inline bool netif_needs_gso(struct net_device *dev, struct sk_buff *skb,
3611 netdev_features_t features) 3615 netdev_features_t features)
3612{ 3616{
3613 return skb_is_gso(skb) && (!skb_gso_ok(skb, features) || 3617 return skb_is_gso(skb) && (!skb_gso_ok(skb, features) ||
3614 (dev->netdev_ops->ndo_gso_check &&
3615 !dev->netdev_ops->ndo_gso_check(skb, dev)) ||
3616 unlikely((skb->ip_summed != CHECKSUM_PARTIAL) && 3618 unlikely((skb->ip_summed != CHECKSUM_PARTIAL) &&
3617 (skb->ip_summed != CHECKSUM_UNNECESSARY))); 3619 (skb->ip_summed != CHECKSUM_UNNECESSARY)));
3618} 3620}
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 9e572daa15d5..02fc86d2348e 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -46,8 +46,8 @@ struct netlink_kernel_cfg {
46 unsigned int flags; 46 unsigned int flags;
47 void (*input)(struct sk_buff *skb); 47 void (*input)(struct sk_buff *skb);
48 struct mutex *cb_mutex; 48 struct mutex *cb_mutex;
49 int (*bind)(int group); 49 int (*bind)(struct net *net, int group);
50 void (*unbind)(int group); 50 void (*unbind)(struct net *net, int group);
51 bool (*compare)(struct net *net, struct sock *sk); 51 bool (*compare)(struct net *net, struct sock *sk);
52}; 52};
53 53
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 1e37fbb78f7a..ddea982355f3 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -74,6 +74,9 @@ struct nfs_client {
74 /* idmapper */ 74 /* idmapper */
75 struct idmap * cl_idmap; 75 struct idmap * cl_idmap;
76 76
77 /* Client owner identifier */
78 const char * cl_owner_id;
79
77 /* Our own IP address, as a null-terminated string. 80 /* Our own IP address, as a null-terminated string.
78 * This is used to generate the mv0 callback address. 81 * This is used to generate the mv0 callback address.
79 */ 82 */
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
88static inline bool oom_gfp_allowed(gfp_t gfp_mask)
89{
90 return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY);
91}
92
93extern struct task_struct *find_lock_task_mm(struct task_struct *p); 88extern struct task_struct *find_lock_task_mm(struct task_struct *p);
94 89
95static inline bool task_will_free_mem(struct task_struct *task) 90static inline bool task_will_free_mem(struct task_struct *task)
diff --git a/include/linux/osq_lock.h b/include/linux/osq_lock.h
index 90230d5811c5..3a6490e81b28 100644
--- a/include/linux/osq_lock.h
+++ b/include/linux/osq_lock.h
@@ -5,8 +5,11 @@
5 * An MCS like lock especially tailored for optimistic spinning for sleeping 5 * An MCS like lock especially tailored for optimistic spinning for sleeping
6 * lock implementations (mutex, rwsem, etc). 6 * lock implementations (mutex, rwsem, etc).
7 */ 7 */
8 8struct optimistic_spin_node {
9#define OSQ_UNLOCKED_VAL (0) 9 struct optimistic_spin_node *next, *prev;
10 int locked; /* 1 if lock acquired */
11 int cpu; /* encoded CPU # + 1 value */
12};
10 13
11struct optimistic_spin_queue { 14struct optimistic_spin_queue {
12 /* 15 /*
@@ -16,6 +19,8 @@ struct optimistic_spin_queue {
16 atomic_t tail; 19 atomic_t tail;
17}; 20};
18 21
22#define OSQ_UNLOCKED_VAL (0)
23
19/* Init macro and function. */ 24/* Init macro and function. */
20#define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) } 25#define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) }
21 26
@@ -24,4 +29,7 @@ static inline void osq_lock_init(struct optimistic_spin_queue *lock)
24 atomic_set(&lock->tail, OSQ_UNLOCKED_VAL); 29 atomic_set(&lock->tail, OSQ_UNLOCKED_VAL);
25} 30}
26 31
32extern bool osq_lock(struct optimistic_spin_queue *lock);
33extern void osq_unlock(struct optimistic_spin_queue *lock);
34
27#endif 35#endif
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index e1f5fcd79792..5ed7bdaf22d5 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -121,8 +121,12 @@ enum pageflags {
121 PG_fscache = PG_private_2, /* page backed by cache */ 121 PG_fscache = PG_private_2, /* page backed by cache */
122 122
123 /* XEN */ 123 /* XEN */
124 /* Pinned in Xen as a read-only pagetable page. */
124 PG_pinned = PG_owner_priv_1, 125 PG_pinned = PG_owner_priv_1,
126 /* Pinned as part of domain save (see xen_mm_pin_all()). */
125 PG_savepinned = PG_dirty, 127 PG_savepinned = PG_dirty,
128 /* Has a grant mapping of another (foreign) domain's page. */
129 PG_foreign = PG_owner_priv_1,
126 130
127 /* SLOB */ 131 /* SLOB */
128 PG_slob_free = PG_private, 132 PG_slob_free = PG_private,
@@ -215,6 +219,7 @@ __PAGEFLAG(Slab, slab)
215PAGEFLAG(Checked, checked) /* Used by some filesystems */ 219PAGEFLAG(Checked, checked) /* Used by some filesystems */
216PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen */ 220PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen */
217PAGEFLAG(SavePinned, savepinned); /* Xen */ 221PAGEFLAG(SavePinned, savepinned); /* Xen */
222PAGEFLAG(Foreign, foreign); /* Xen */
218PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved) 223PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
219PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked) 224PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked)
220 __SETPAGEFLAG(SwapBacked, swapbacked) 225 __SETPAGEFLAG(SwapBacked, swapbacked)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 7ea069cd3257..4b3736f7065c 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -251,7 +251,7 @@ pgoff_t page_cache_prev_hole(struct address_space *mapping,
251#define FGP_NOWAIT 0x00000020 251#define FGP_NOWAIT 0x00000020
252 252
253struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset, 253struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset,
254 int fgp_flags, gfp_t cache_gfp_mask, gfp_t radix_gfp_mask); 254 int fgp_flags, gfp_t cache_gfp_mask);
255 255
256/** 256/**
257 * find_get_page - find and get a page reference 257 * find_get_page - find and get a page reference
@@ -266,13 +266,13 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset,
266static inline struct page *find_get_page(struct address_space *mapping, 266static inline struct page *find_get_page(struct address_space *mapping,
267 pgoff_t offset) 267 pgoff_t offset)
268{ 268{
269 return pagecache_get_page(mapping, offset, 0, 0, 0); 269 return pagecache_get_page(mapping, offset, 0, 0);
270} 270}
271 271
272static inline struct page *find_get_page_flags(struct address_space *mapping, 272static inline struct page *find_get_page_flags(struct address_space *mapping,
273 pgoff_t offset, int fgp_flags) 273 pgoff_t offset, int fgp_flags)
274{ 274{
275 return pagecache_get_page(mapping, offset, fgp_flags, 0, 0); 275 return pagecache_get_page(mapping, offset, fgp_flags, 0);
276} 276}
277 277
278/** 278/**
@@ -292,7 +292,7 @@ static inline struct page *find_get_page_flags(struct address_space *mapping,
292static inline struct page *find_lock_page(struct address_space *mapping, 292static inline struct page *find_lock_page(struct address_space *mapping,
293 pgoff_t offset) 293 pgoff_t offset)
294{ 294{
295 return pagecache_get_page(mapping, offset, FGP_LOCK, 0, 0); 295 return pagecache_get_page(mapping, offset, FGP_LOCK, 0);
296} 296}
297 297
298/** 298/**
@@ -319,7 +319,7 @@ static inline struct page *find_or_create_page(struct address_space *mapping,
319{ 319{
320 return pagecache_get_page(mapping, offset, 320 return pagecache_get_page(mapping, offset,
321 FGP_LOCK|FGP_ACCESSED|FGP_CREAT, 321 FGP_LOCK|FGP_ACCESSED|FGP_CREAT,
322 gfp_mask, gfp_mask & GFP_RECLAIM_MASK); 322 gfp_mask);
323} 323}
324 324
325/** 325/**
@@ -340,8 +340,7 @@ static inline struct page *grab_cache_page_nowait(struct address_space *mapping,
340{ 340{
341 return pagecache_get_page(mapping, index, 341 return pagecache_get_page(mapping, index,
342 FGP_LOCK|FGP_CREAT|FGP_NOFS|FGP_NOWAIT, 342 FGP_LOCK|FGP_CREAT|FGP_NOFS|FGP_NOWAIT,
343 mapping_gfp_mask(mapping), 343 mapping_gfp_mask(mapping));
344 GFP_NOFS);
345} 344}
346 345
347struct page *find_get_entry(struct address_space *mapping, pgoff_t offset); 346struct page *find_get_entry(struct address_space *mapping, pgoff_t offset);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 3f835a049d6a..421eb6a9e600 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1080,6 +1080,7 @@ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx);
1080void pci_bus_assign_resources(const struct pci_bus *bus); 1080void pci_bus_assign_resources(const struct pci_bus *bus);
1081void pci_bus_size_bridges(struct pci_bus *bus); 1081void pci_bus_size_bridges(struct pci_bus *bus);
1082int pci_claim_resource(struct pci_dev *, int); 1082int pci_claim_resource(struct pci_dev *, int);
1083int pci_claim_bridge_resource(struct pci_dev *bridge, int i);
1083void pci_assign_unassigned_resources(void); 1084void pci_assign_unassigned_resources(void);
1084void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); 1085void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge);
1085void pci_assign_unassigned_bus_resources(struct pci_bus *bus); 1086void pci_assign_unassigned_bus_resources(struct pci_bus *bus);
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h
index b4337646388b..12c9b485beb7 100644
--- a/include/linux/percpu-refcount.h
+++ b/include/linux/percpu-refcount.h
@@ -128,8 +128,22 @@ static inline void percpu_ref_kill(struct percpu_ref *ref)
128static inline bool __ref_is_percpu(struct percpu_ref *ref, 128static inline bool __ref_is_percpu(struct percpu_ref *ref,
129 unsigned long __percpu **percpu_countp) 129 unsigned long __percpu **percpu_countp)
130{ 130{
131 /* paired with smp_store_release() in percpu_ref_reinit() */ 131 unsigned long percpu_ptr;
132 unsigned long percpu_ptr = lockless_dereference(ref->percpu_count_ptr); 132
133 /*
134 * The value of @ref->percpu_count_ptr is tested for
135 * !__PERCPU_REF_ATOMIC, which may be set asynchronously, and then
136 * used as a pointer. If the compiler generates a separate fetch
137 * when using it as a pointer, __PERCPU_REF_ATOMIC may be set in
138 * between contaminating the pointer value, meaning that
139 * ACCESS_ONCE() is required when fetching it.
140 *
141 * Also, we need a data dependency barrier to be paired with
142 * smp_store_release() in __percpu_ref_switch_to_percpu().
143 *
144 * Use lockless deref which contains both.
145 */
146 percpu_ptr = lockless_dereference(ref->percpu_count_ptr);
133 147
134 /* 148 /*
135 * Theoretically, the following could test just ATOMIC; however, 149 * Theoretically, the following could test just ATOMIC; however,
@@ -233,7 +247,7 @@ static inline bool percpu_ref_tryget_live(struct percpu_ref *ref)
233 if (__ref_is_percpu(ref, &percpu_count)) { 247 if (__ref_is_percpu(ref, &percpu_count)) {
234 this_cpu_inc(*percpu_count); 248 this_cpu_inc(*percpu_count);
235 ret = true; 249 ret = true;
236 } else if (!(ACCESS_ONCE(ref->percpu_count_ptr) & __PERCPU_REF_DEAD)) { 250 } else if (!(ref->percpu_count_ptr & __PERCPU_REF_DEAD)) {
237 ret = atomic_long_inc_not_zero(&ref->count); 251 ret = atomic_long_inc_not_zero(&ref->count);
238 } 252 }
239 253
@@ -281,6 +295,20 @@ static inline void percpu_ref_put(struct percpu_ref *ref)
281} 295}
282 296
283/** 297/**
298 * percpu_ref_is_dying - test whether a percpu refcount is dying or dead
299 * @ref: percpu_ref to test
300 *
301 * Returns %true if @ref is dying or dead.
302 *
303 * This function is safe to call as long as @ref is between init and exit
304 * and the caller is responsible for synchronizing against state changes.
305 */
306static inline bool percpu_ref_is_dying(struct percpu_ref *ref)
307{
308 return ref->percpu_count_ptr & __PERCPU_REF_DEAD;
309}
310
311/**
284 * percpu_ref_is_zero - test whether a percpu refcount reached zero 312 * percpu_ref_is_zero - test whether a percpu refcount reached zero
285 * @ref: percpu_ref to test 313 * @ref: percpu_ref to test
286 * 314 *
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 486e84ccb1f9..5cad0e6f3552 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -79,11 +79,6 @@ struct perf_branch_stack {
79 struct perf_branch_entry entries[0]; 79 struct perf_branch_entry entries[0];
80}; 80};
81 81
82struct perf_regs {
83 __u64 abi;
84 struct pt_regs *regs;
85};
86
87struct task_struct; 82struct task_struct;
88 83
89/* 84/*
@@ -455,11 +450,6 @@ struct perf_event {
455#endif /* CONFIG_PERF_EVENTS */ 450#endif /* CONFIG_PERF_EVENTS */
456}; 451};
457 452
458enum perf_event_context_type {
459 task_context,
460 cpu_context,
461};
462
463/** 453/**
464 * struct perf_event_context - event context structure 454 * struct perf_event_context - event context structure
465 * 455 *
@@ -467,7 +457,6 @@ enum perf_event_context_type {
467 */ 457 */
468struct perf_event_context { 458struct perf_event_context {
469 struct pmu *pmu; 459 struct pmu *pmu;
470 enum perf_event_context_type type;
471 /* 460 /*
472 * Protect the states of the events in the list, 461 * Protect the states of the events in the list,
473 * nr_active, and the list: 462 * nr_active, and the list:
@@ -480,6 +469,7 @@ struct perf_event_context {
480 */ 469 */
481 struct mutex mutex; 470 struct mutex mutex;
482 471
472 struct list_head active_ctx_list;
483 struct list_head pinned_groups; 473 struct list_head pinned_groups;
484 struct list_head flexible_groups; 474 struct list_head flexible_groups;
485 struct list_head event_list; 475 struct list_head event_list;
@@ -530,7 +520,6 @@ struct perf_cpu_context {
530 int exclusive; 520 int exclusive;
531 struct hrtimer hrtimer; 521 struct hrtimer hrtimer;
532 ktime_t hrtimer_interval; 522 ktime_t hrtimer_interval;
533 struct list_head rotation_list;
534 struct pmu *unique_pmu; 523 struct pmu *unique_pmu;
535 struct perf_cgroup *cgrp; 524 struct perf_cgroup *cgrp;
536}; 525};
@@ -610,7 +599,14 @@ struct perf_sample_data {
610 u32 reserved; 599 u32 reserved;
611 } cpu_entry; 600 } cpu_entry;
612 struct perf_callchain_entry *callchain; 601 struct perf_callchain_entry *callchain;
602
603 /*
604 * regs_user may point to task_pt_regs or to regs_user_copy, depending
605 * on arch details.
606 */
613 struct perf_regs regs_user; 607 struct perf_regs regs_user;
608 struct pt_regs regs_user_copy;
609
614 struct perf_regs regs_intr; 610 struct perf_regs regs_intr;
615 u64 stack_user_size; 611 u64 stack_user_size;
616} ____cacheline_aligned; 612} ____cacheline_aligned;
@@ -663,6 +659,7 @@ static inline int is_software_event(struct perf_event *event)
663 659
664extern struct static_key perf_swevent_enabled[PERF_COUNT_SW_MAX]; 660extern struct static_key perf_swevent_enabled[PERF_COUNT_SW_MAX];
665 661
662extern void ___perf_sw_event(u32, u64, struct pt_regs *, u64);
666extern void __perf_sw_event(u32, u64, struct pt_regs *, u64); 663extern void __perf_sw_event(u32, u64, struct pt_regs *, u64);
667 664
668#ifndef perf_arch_fetch_caller_regs 665#ifndef perf_arch_fetch_caller_regs
@@ -687,14 +684,25 @@ static inline void perf_fetch_caller_regs(struct pt_regs *regs)
687static __always_inline void 684static __always_inline void
688perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) 685perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr)
689{ 686{
690 struct pt_regs hot_regs; 687 if (static_key_false(&perf_swevent_enabled[event_id]))
688 __perf_sw_event(event_id, nr, regs, addr);
689}
690
691DECLARE_PER_CPU(struct pt_regs, __perf_regs[4]);
691 692
693/*
694 * 'Special' version for the scheduler, it hard assumes no recursion,
695 * which is guaranteed by us not actually scheduling inside other swevents
696 * because those disable preemption.
697 */
698static __always_inline void
699perf_sw_event_sched(u32 event_id, u64 nr, u64 addr)
700{
692 if (static_key_false(&perf_swevent_enabled[event_id])) { 701 if (static_key_false(&perf_swevent_enabled[event_id])) {
693 if (!regs) { 702 struct pt_regs *regs = this_cpu_ptr(&__perf_regs[0]);
694 perf_fetch_caller_regs(&hot_regs); 703
695 regs = &hot_regs; 704 perf_fetch_caller_regs(regs);
696 } 705 ___perf_sw_event(event_id, nr, regs, addr);
697 __perf_sw_event(event_id, nr, regs, addr);
698 } 706 }
699} 707}
700 708
@@ -710,7 +718,7 @@ static inline void perf_event_task_sched_in(struct task_struct *prev,
710static inline void perf_event_task_sched_out(struct task_struct *prev, 718static inline void perf_event_task_sched_out(struct task_struct *prev,
711 struct task_struct *next) 719 struct task_struct *next)
712{ 720{
713 perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0); 721 perf_sw_event_sched(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 0);
714 722
715 if (static_key_false(&perf_sched_events.key)) 723 if (static_key_false(&perf_sched_events.key))
716 __perf_event_task_sched_out(prev, next); 724 __perf_event_task_sched_out(prev, next);
@@ -821,6 +829,8 @@ static inline int perf_event_refresh(struct perf_event *event, int refresh)
821static inline void 829static inline void
822perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) { } 830perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) { }
823static inline void 831static inline void
832perf_sw_event_sched(u32 event_id, u64 nr, u64 addr) { }
833static inline void
824perf_bp_event(struct perf_event *event, void *data) { } 834perf_bp_event(struct perf_event *event, void *data) { }
825 835
826static inline int perf_register_guest_info_callbacks 836static inline int perf_register_guest_info_callbacks
diff --git a/include/linux/perf_regs.h b/include/linux/perf_regs.h
index 3c73d5fe18be..a5f98d53d732 100644
--- a/include/linux/perf_regs.h
+++ b/include/linux/perf_regs.h
@@ -1,11 +1,19 @@
1#ifndef _LINUX_PERF_REGS_H 1#ifndef _LINUX_PERF_REGS_H
2#define _LINUX_PERF_REGS_H 2#define _LINUX_PERF_REGS_H
3 3
4struct perf_regs {
5 __u64 abi;
6 struct pt_regs *regs;
7};
8
4#ifdef CONFIG_HAVE_PERF_REGS 9#ifdef CONFIG_HAVE_PERF_REGS
5#include <asm/perf_regs.h> 10#include <asm/perf_regs.h>
6u64 perf_reg_value(struct pt_regs *regs, int idx); 11u64 perf_reg_value(struct pt_regs *regs, int idx);
7int perf_reg_validate(u64 mask); 12int perf_reg_validate(u64 mask);
8u64 perf_reg_abi(struct task_struct *task); 13u64 perf_reg_abi(struct task_struct *task);
14void perf_get_regs_user(struct perf_regs *regs_user,
15 struct pt_regs *regs,
16 struct pt_regs *regs_user_copy);
9#else 17#else
10static inline u64 perf_reg_value(struct pt_regs *regs, int idx) 18static inline u64 perf_reg_value(struct pt_regs *regs, int idx)
11{ 19{
@@ -21,5 +29,13 @@ static inline u64 perf_reg_abi(struct task_struct *task)
21{ 29{
22 return PERF_SAMPLE_REGS_ABI_NONE; 30 return PERF_SAMPLE_REGS_ABI_NONE;
23} 31}
32
33static inline void perf_get_regs_user(struct perf_regs *regs_user,
34 struct pt_regs *regs,
35 struct pt_regs *regs_user_copy)
36{
37 regs_user->regs = task_pt_regs(current);
38 regs_user->abi = perf_reg_abi(current);
39}
24#endif /* CONFIG_HAVE_PERF_REGS */ 40#endif /* CONFIG_HAVE_PERF_REGS */
25#endif /* _LINUX_PERF_REGS_H */ 41#endif /* _LINUX_PERF_REGS_H */
diff --git a/include/linux/phy/omap_control_phy.h b/include/linux/phy/omap_control_phy.h
index e9e6cfbfbb58..eb7d4a135a9e 100644
--- a/include/linux/phy/omap_control_phy.h
+++ b/include/linux/phy/omap_control_phy.h
@@ -66,7 +66,7 @@ enum omap_control_usb_mode {
66#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0 66#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0
67 67
68#define OMAP_CTRL_PCIE_PCS_MASK 0xff 68#define OMAP_CTRL_PCIE_PCS_MASK 0xff
69#define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 0x8 69#define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 16
70 70
71#define OMAP_CTRL_USB2_PHY_PD BIT(28) 71#define OMAP_CTRL_USB2_PHY_PD BIT(28)
72 72
@@ -79,7 +79,7 @@ enum omap_control_usb_mode {
79void omap_control_phy_power(struct device *dev, int on); 79void omap_control_phy_power(struct device *dev, int on);
80void omap_control_usb_set_mode(struct device *dev, 80void omap_control_usb_set_mode(struct device *dev,
81 enum omap_control_usb_mode mode); 81 enum omap_control_usb_mode mode);
82void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay); 82void omap_control_pcie_pcs(struct device *dev, u8 delay);
83#else 83#else
84 84
85static inline void omap_control_phy_power(struct device *dev, int on) 85static inline void omap_control_phy_power(struct device *dev, int on)
@@ -91,7 +91,7 @@ static inline void omap_control_usb_set_mode(struct device *dev,
91{ 91{
92} 92}
93 93
94static inline void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay) 94static inline void omap_control_pcie_pcs(struct device *dev, u8 delay)
95{ 95{
96} 96}
97#endif 97#endif
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 6cd20d5e651b..a9edab2c787a 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -271,6 +271,8 @@ typedef struct generic_pm_domain *(*genpd_xlate_t)(struct of_phandle_args *args,
271int __of_genpd_add_provider(struct device_node *np, genpd_xlate_t xlate, 271int __of_genpd_add_provider(struct device_node *np, genpd_xlate_t xlate,
272 void *data); 272 void *data);
273void of_genpd_del_provider(struct device_node *np); 273void of_genpd_del_provider(struct device_node *np);
274struct generic_pm_domain *of_genpd_get_from_provider(
275 struct of_phandle_args *genpdspec);
274 276
275struct generic_pm_domain *__of_genpd_xlate_simple( 277struct generic_pm_domain *__of_genpd_xlate_simple(
276 struct of_phandle_args *genpdspec, 278 struct of_phandle_args *genpdspec,
@@ -288,6 +290,12 @@ static inline int __of_genpd_add_provider(struct device_node *np,
288} 290}
289static inline void of_genpd_del_provider(struct device_node *np) {} 291static inline void of_genpd_del_provider(struct device_node *np) {}
290 292
293static inline struct generic_pm_domain *of_genpd_get_from_provider(
294 struct of_phandle_args *genpdspec)
295{
296 return NULL;
297}
298
291#define __of_genpd_xlate_simple NULL 299#define __of_genpd_xlate_simple NULL
292#define __of_genpd_xlate_onecell NULL 300#define __of_genpd_xlate_onecell NULL
293 301
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 @@
10extern const char linux_banner[]; 10extern const char linux_banner[];
11extern const char linux_proc_banner[]; 11extern const char linux_proc_banner[];
12 12
13extern char *log_buf_addr_get(void);
14extern u32 log_buf_len_get(void);
15
16static inline int printk_get_level(const char *buffer) 13static 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
164extern void wake_up_klogd(void); 161extern void wake_up_klogd(void);
165 162
163char *log_buf_addr_get(void);
164u32 log_buf_len_get(void);
166void log_buf_kexec_setup(void); 165void log_buf_kexec_setup(void);
167void __init setup_log_buf(int early); 166void __init setup_log_buf(int early);
168void dump_stack_set_arch_desc(const char *fmt, ...); 167void 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
200static inline char *log_buf_addr_get(void)
201{
202 return NULL;
203}
204
205static inline u32 log_buf_len_get(void)
206{
207 return 0;
208}
209
201static inline void log_buf_kexec_setup(void) 210static inline void log_buf_kexec_setup(void)
202{ 211{
203} 212}
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h
index 77aed9ea1d26..dab545bb66b3 100644
--- a/include/linux/pxa2xx_ssp.h
+++ b/include/linux/pxa2xx_ssp.h
@@ -37,6 +37,7 @@
37#define SSDR (0x10) /* SSP Data Write/Data Read Register */ 37#define SSDR (0x10) /* SSP Data Write/Data Read Register */
38 38
39#define SSTO (0x28) /* SSP Time Out Register */ 39#define SSTO (0x28) /* SSP Time Out Register */
40#define DDS_RATE (0x28) /* SSP DDS Clock Rate Register (Intel Quark) */
40#define SSPSP (0x2C) /* SSP Programmable Serial Protocol */ 41#define SSPSP (0x2C) /* SSP Programmable Serial Protocol */
41#define SSTSA (0x30) /* SSP Tx Timeslot Active */ 42#define SSTSA (0x30) /* SSP Tx Timeslot Active */
42#define SSRSA (0x34) /* SSP Rx Timeslot Active */ 43#define SSRSA (0x34) /* SSP Rx Timeslot Active */
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
322struct path; 322struct path;
323 323
324/* Structure for communicating via ->get_dqblk() & ->set_dqblk() */
325struct 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 */
325struct quotactl_ops { 368struct 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);
98int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 98int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
99int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 99int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
100int dquot_get_dqblk(struct super_block *sb, struct kqid id, 100int dquot_get_dqblk(struct super_block *sb, struct kqid id,
101 struct fs_disk_quota *di); 101 struct qc_dqblk *di);
102int dquot_set_dqblk(struct super_block *sb, struct kqid id, 102int dquot_set_dqblk(struct super_block *sb, struct kqid id,
103 struct fs_disk_quota *di); 103 struct qc_dqblk *di);
104 104
105int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); 105int __dquot_transfer(struct inode *inode, struct dquot **transfer_to);
106int dquot_transfer(struct inode *inode, struct iattr *iattr); 106int dquot_transfer(struct inode *inode, struct iattr *iattr);
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 529bc946f450..a18b16f1dc0e 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -524,11 +524,11 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n,
524 * @member: the name of the hlist_node within the struct. 524 * @member: the name of the hlist_node within the struct.
525 */ 525 */
526#define hlist_for_each_entry_continue_rcu(pos, member) \ 526#define hlist_for_each_entry_continue_rcu(pos, member) \
527 for (pos = hlist_entry_safe(rcu_dereference((pos)->member.next),\ 527 for (pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \
528 typeof(*(pos)), member); \ 528 &(pos)->member)), typeof(*(pos)), member); \
529 pos; \ 529 pos; \
530 pos = hlist_entry_safe(rcu_dereference((pos)->member.next),\ 530 pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \
531 typeof(*(pos)), member)) 531 &(pos)->member)), typeof(*(pos)), member))
532 532
533/** 533/**
534 * hlist_for_each_entry_continue_rcu_bh - iterate over a hlist continuing after current point 534 * hlist_for_each_entry_continue_rcu_bh - iterate over a hlist continuing after current point
@@ -536,11 +536,11 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n,
536 * @member: the name of the hlist_node within the struct. 536 * @member: the name of the hlist_node within the struct.
537 */ 537 */
538#define hlist_for_each_entry_continue_rcu_bh(pos, member) \ 538#define hlist_for_each_entry_continue_rcu_bh(pos, member) \
539 for (pos = hlist_entry_safe(rcu_dereference_bh((pos)->member.next),\ 539 for (pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu( \
540 typeof(*(pos)), member); \ 540 &(pos)->member)), typeof(*(pos)), member); \
541 pos; \ 541 pos; \
542 pos = hlist_entry_safe(rcu_dereference_bh((pos)->member.next),\ 542 pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu( \
543 typeof(*(pos)), member)) 543 &(pos)->member)), typeof(*(pos)), member))
544 544
545/** 545/**
546 * hlist_for_each_entry_from_rcu - iterate over a hlist continuing from current point 546 * hlist_for_each_entry_from_rcu - iterate over a hlist continuing from current point
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index ed4f5939a452..78097491cd99 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -331,12 +331,13 @@ static inline void rcu_init_nohz(void)
331extern struct srcu_struct tasks_rcu_exit_srcu; 331extern struct srcu_struct tasks_rcu_exit_srcu;
332#define rcu_note_voluntary_context_switch(t) \ 332#define rcu_note_voluntary_context_switch(t) \
333 do { \ 333 do { \
334 rcu_all_qs(); \
334 if (ACCESS_ONCE((t)->rcu_tasks_holdout)) \ 335 if (ACCESS_ONCE((t)->rcu_tasks_holdout)) \
335 ACCESS_ONCE((t)->rcu_tasks_holdout) = false; \ 336 ACCESS_ONCE((t)->rcu_tasks_holdout) = false; \
336 } while (0) 337 } while (0)
337#else /* #ifdef CONFIG_TASKS_RCU */ 338#else /* #ifdef CONFIG_TASKS_RCU */
338#define TASKS_RCU(x) do { } while (0) 339#define TASKS_RCU(x) do { } while (0)
339#define rcu_note_voluntary_context_switch(t) do { } while (0) 340#define rcu_note_voluntary_context_switch(t) rcu_all_qs()
340#endif /* #else #ifdef CONFIG_TASKS_RCU */ 341#endif /* #else #ifdef CONFIG_TASKS_RCU */
341 342
342/** 343/**
@@ -582,11 +583,11 @@ static inline void rcu_preempt_sleep_check(void)
582}) 583})
583#define __rcu_dereference_check(p, c, space) \ 584#define __rcu_dereference_check(p, c, space) \
584({ \ 585({ \
585 typeof(*p) *_________p1 = (typeof(*p) *__force)ACCESS_ONCE(p); \ 586 /* Dependency order vs. p above. */ \
587 typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
586 rcu_lockdep_assert(c, "suspicious rcu_dereference_check() usage"); \ 588 rcu_lockdep_assert(c, "suspicious rcu_dereference_check() usage"); \
587 rcu_dereference_sparse(p, space); \ 589 rcu_dereference_sparse(p, space); \
588 smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ 590 ((typeof(*p) __force __kernel *)(________p1)); \
589 ((typeof(*p) __force __kernel *)(_________p1)); \
590}) 591})
591#define __rcu_dereference_protected(p, c, space) \ 592#define __rcu_dereference_protected(p, c, space) \
592({ \ 593({ \
@@ -603,10 +604,10 @@ static inline void rcu_preempt_sleep_check(void)
603}) 604})
604#define __rcu_dereference_index_check(p, c) \ 605#define __rcu_dereference_index_check(p, c) \
605({ \ 606({ \
606 typeof(p) _________p1 = ACCESS_ONCE(p); \ 607 /* Dependency order vs. p above. */ \
608 typeof(p) _________p1 = lockless_dereference(p); \
607 rcu_lockdep_assert(c, \ 609 rcu_lockdep_assert(c, \
608 "suspicious rcu_dereference_index_check() usage"); \ 610 "suspicious rcu_dereference_index_check() usage"); \
609 smp_read_barrier_depends(); /* Dependency order vs. p above. */ \
610 (_________p1); \ 611 (_________p1); \
611}) 612})
612 613
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 0e5366200154..937edaeb150d 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -92,17 +92,49 @@ static inline void rcu_virt_note_context_switch(int cpu)
92} 92}
93 93
94/* 94/*
95 * Return the number of grace periods. 95 * Return the number of grace periods started.
96 */ 96 */
97static inline long rcu_batches_completed(void) 97static inline unsigned long rcu_batches_started(void)
98{ 98{
99 return 0; 99 return 0;
100} 100}
101 101
102/* 102/*
103 * Return the number of bottom-half grace periods. 103 * Return the number of bottom-half grace periods started.
104 */ 104 */
105static inline long rcu_batches_completed_bh(void) 105static inline unsigned long rcu_batches_started_bh(void)
106{
107 return 0;
108}
109
110/*
111 * Return the number of sched grace periods started.
112 */
113static inline unsigned long rcu_batches_started_sched(void)
114{
115 return 0;
116}
117
118/*
119 * Return the number of grace periods completed.
120 */
121static inline unsigned long rcu_batches_completed(void)
122{
123 return 0;
124}
125
126/*
127 * Return the number of bottom-half grace periods completed.
128 */
129static inline unsigned long rcu_batches_completed_bh(void)
130{
131 return 0;
132}
133
134/*
135 * Return the number of sched grace periods completed.
136 */
137static inline unsigned long rcu_batches_completed_sched(void)
106{ 138{
107 return 0; 139 return 0;
108} 140}
@@ -154,7 +186,10 @@ static inline bool rcu_is_watching(void)
154 return true; 186 return true;
155} 187}
156 188
157
158#endif /* #else defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) */ 189#endif /* #else defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) */
159 190
191static inline void rcu_all_qs(void)
192{
193}
194
160#endif /* __LINUX_RCUTINY_H */ 195#endif /* __LINUX_RCUTINY_H */
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 52953790dcca..d2e583a6aaca 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -81,9 +81,12 @@ void cond_synchronize_rcu(unsigned long oldstate);
81 81
82extern unsigned long rcutorture_testseq; 82extern unsigned long rcutorture_testseq;
83extern unsigned long rcutorture_vernum; 83extern unsigned long rcutorture_vernum;
84long rcu_batches_completed(void); 84unsigned long rcu_batches_started(void);
85long rcu_batches_completed_bh(void); 85unsigned long rcu_batches_started_bh(void);
86long rcu_batches_completed_sched(void); 86unsigned long rcu_batches_started_sched(void);
87unsigned long rcu_batches_completed(void);
88unsigned long rcu_batches_completed_bh(void);
89unsigned long rcu_batches_completed_sched(void);
87void show_rcu_gp_kthreads(void); 90void show_rcu_gp_kthreads(void);
88 91
89void rcu_force_quiescent_state(void); 92void rcu_force_quiescent_state(void);
@@ -97,4 +100,6 @@ extern int rcu_scheduler_active __read_mostly;
97 100
98bool rcu_is_watching(void); 101bool rcu_is_watching(void);
99 102
103void rcu_all_qs(void);
104
100#endif /* __LINUX_RCUTREE_H */ 105#endif /* __LINUX_RCUTREE_H */
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 4419b99d8d6e..116655d92269 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -468,7 +468,7 @@ bool regmap_reg_in_ranges(unsigned int reg,
468 * 468 *
469 * @reg: Offset of the register within the regmap bank 469 * @reg: Offset of the register within the regmap bank
470 * @lsb: lsb of the register field. 470 * @lsb: lsb of the register field.
471 * @reg: msb of the register field. 471 * @msb: msb of the register field.
472 * @id_size: port size if it has some ports 472 * @id_size: port size if it has some ports
473 * @id_offset: address offset for each ports 473 * @id_offset: address offset for each ports
474 */ 474 */
diff --git a/include/linux/regulator/da9211.h b/include/linux/regulator/da9211.h
index 5479394fefce..5dd65acc2a69 100644
--- a/include/linux/regulator/da9211.h
+++ b/include/linux/regulator/da9211.h
@@ -32,6 +32,8 @@ struct da9211_pdata {
32 * 2 : 2 phase 2 buck 32 * 2 : 2 phase 2 buck
33 */ 33 */
34 int num_buck; 34 int num_buck;
35 int gpio_ren[DA9211_MAX_REGULATORS];
36 struct device_node *reg_node[DA9211_MAX_REGULATORS];
35 struct regulator_init_data *init_data[DA9211_MAX_REGULATORS]; 37 struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
36}; 38};
37#endif 39#endif
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 5f1e9ca47417..d4ad5b5a02bb 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -21,6 +21,7 @@
21 21
22struct regmap; 22struct regmap;
23struct regulator_dev; 23struct regulator_dev;
24struct regulator_config;
24struct regulator_init_data; 25struct regulator_init_data;
25struct regulator_enable_gpio; 26struct regulator_enable_gpio;
26 27
@@ -205,6 +206,15 @@ enum regulator_type {
205 * @supply_name: Identifying the regulator supply 206 * @supply_name: Identifying the regulator supply
206 * @of_match: Name used to identify regulator in DT. 207 * @of_match: Name used to identify regulator in DT.
207 * @regulators_node: Name of node containing regulator definitions in DT. 208 * @regulators_node: Name of node containing regulator definitions in DT.
209 * @of_parse_cb: Optional callback called only if of_match is present.
210 * Will be called for each regulator parsed from DT, during
211 * init_data parsing.
212 * The regulator_config passed as argument to the callback will
213 * be a copy of config passed to regulator_register, valid only
214 * for this particular call. Callback may freely change the
215 * config but it cannot store it for later usage.
216 * Callback should return 0 on success or negative ERRNO
217 * indicating failure.
208 * @id: Numerical identifier for the regulator. 218 * @id: Numerical identifier for the regulator.
209 * @ops: Regulator operations table. 219 * @ops: Regulator operations table.
210 * @irq: Interrupt number for the regulator. 220 * @irq: Interrupt number for the regulator.
@@ -251,6 +261,9 @@ struct regulator_desc {
251 const char *supply_name; 261 const char *supply_name;
252 const char *of_match; 262 const char *of_match;
253 const char *regulators_node; 263 const char *regulators_node;
264 int (*of_parse_cb)(struct device_node *,
265 const struct regulator_desc *,
266 struct regulator_config *);
254 int id; 267 int id;
255 bool continuous_voltage_range; 268 bool continuous_voltage_range;
256 unsigned n_voltages; 269 unsigned n_voltages;
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
index 0b08d05d470b..b07562e082c4 100644
--- a/include/linux/regulator/machine.h
+++ b/include/linux/regulator/machine.h
@@ -191,15 +191,22 @@ struct regulator_init_data {
191 void *driver_data; /* core does not touch this */ 191 void *driver_data; /* core does not touch this */
192}; 192};
193 193
194int regulator_suspend_prepare(suspend_state_t state);
195int regulator_suspend_finish(void);
196
197#ifdef CONFIG_REGULATOR 194#ifdef CONFIG_REGULATOR
198void regulator_has_full_constraints(void); 195void regulator_has_full_constraints(void);
196int regulator_suspend_prepare(suspend_state_t state);
197int regulator_suspend_finish(void);
199#else 198#else
200static inline void regulator_has_full_constraints(void) 199static inline void regulator_has_full_constraints(void)
201{ 200{
202} 201}
202static inline int regulator_suspend_prepare(suspend_state_t state)
203{
204 return 0;
205}
206static inline int regulator_suspend_finish(void)
207{
208 return 0;
209}
203#endif 210#endif
204 211
205#endif 212#endif
diff --git a/include/linux/regulator/mt6397-regulator.h b/include/linux/regulator/mt6397-regulator.h
new file mode 100644
index 000000000000..30cc5963e265
--- /dev/null
+++ b/include/linux/regulator/mt6397-regulator.h
@@ -0,0 +1,49 @@
1/*
2 * Copyright (c) 2014 MediaTek Inc.
3 * Author: Flora Fu <flora.fu@mediatek.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef __LINUX_REGULATOR_MT6397_H
16#define __LINUX_REGULATOR_MT6397_H
17
18enum {
19 MT6397_ID_VPCA15 = 0,
20 MT6397_ID_VPCA7,
21 MT6397_ID_VSRAMCA15,
22 MT6397_ID_VSRAMCA7,
23 MT6397_ID_VCORE,
24 MT6397_ID_VGPU,
25 MT6397_ID_VDRM,
26 MT6397_ID_VIO18 = 7,
27 MT6397_ID_VTCXO,
28 MT6397_ID_VA28,
29 MT6397_ID_VCAMA,
30 MT6397_ID_VIO28,
31 MT6397_ID_VUSB,
32 MT6397_ID_VMC,
33 MT6397_ID_VMCH,
34 MT6397_ID_VEMC3V3,
35 MT6397_ID_VGP1,
36 MT6397_ID_VGP2,
37 MT6397_ID_VGP3,
38 MT6397_ID_VGP4,
39 MT6397_ID_VGP5,
40 MT6397_ID_VGP6,
41 MT6397_ID_VIBR,
42 MT6397_ID_RG_MAX,
43};
44
45#define MT6397_MAX_REGULATOR MT6397_ID_RG_MAX
46#define MT6397_REGULATOR_ID97 0x97
47#define MT6397_REGULATOR_ID91 0x91
48
49#endif /* __LINUX_REGULATOR_MT6397_H */
diff --git a/include/linux/regulator/pfuze100.h b/include/linux/regulator/pfuze100.h
index 364f7a7c43db..70c6c66c5bcf 100644
--- a/include/linux/regulator/pfuze100.h
+++ b/include/linux/regulator/pfuze100.h
@@ -49,6 +49,20 @@
49#define PFUZE200_VGEN5 11 49#define PFUZE200_VGEN5 11
50#define PFUZE200_VGEN6 12 50#define PFUZE200_VGEN6 12
51 51
52#define PFUZE3000_SW1A 0
53#define PFUZE3000_SW1B 1
54#define PFUZE3000_SW2 2
55#define PFUZE3000_SW3 3
56#define PFUZE3000_SWBST 4
57#define PFUZE3000_VSNVS 5
58#define PFUZE3000_VREFDDR 6
59#define PFUZE3000_VLDO1 7
60#define PFUZE3000_VLDO2 8
61#define PFUZE3000_VCCSD 9
62#define PFUZE3000_V33 10
63#define PFUZE3000_VLDO3 11
64#define PFUZE3000_VLDO4 12
65
52struct regulator_init_data; 66struct regulator_init_data;
53 67
54struct pfuze_regulator_platform_data { 68struct pfuze_regulator_platform_data {
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index c0c2bce6b0b7..d9d7e7e56352 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -37,6 +37,16 @@ struct anon_vma {
37 atomic_t refcount; 37 atomic_t refcount;
38 38
39 /* 39 /*
40 * Count of child anon_vmas and VMAs which points to this anon_vma.
41 *
42 * This counter is used for making decision about reusing anon_vma
43 * instead of forking new one. See comments in function anon_vma_clone.
44 */
45 unsigned degree;
46
47 struct anon_vma *parent; /* Parent of this anon_vma */
48
49 /*
40 * NOTE: the LSB of the rb_root.rb_node is set by 50 * NOTE: the LSB of the rb_root.rb_node is set by
41 * mm_take_all_locks() _after_ taking the above lock. So the 51 * mm_take_all_locks() _after_ taking the above lock. So the
42 * rb_root must only be read/written after taking the above lock 52 * rb_root must only be read/written after taking the above lock
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 6d6be09a2fe5..dcad7ee0d746 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -161,7 +161,7 @@ extern void devm_rtc_device_unregister(struct device *dev,
161extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); 161extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm);
162extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); 162extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm);
163extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); 163extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs);
164extern int rtc_set_ntp_time(struct timespec now); 164extern int rtc_set_ntp_time(struct timespec64 now);
165int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); 165int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm);
166extern int rtc_read_alarm(struct rtc_device *rtc, 166extern int rtc_read_alarm(struct rtc_device *rtc,
167 struct rtc_wkalrm *alrm); 167 struct rtc_wkalrm *alrm);
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 93dff5fff524..be91db2a7017 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -151,6 +151,13 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func,
151static inline void kick_all_cpus_sync(void) { } 151static inline void kick_all_cpus_sync(void) { }
152static inline void wake_up_all_idle_cpus(void) { } 152static inline void wake_up_all_idle_cpus(void) { }
153 153
154#ifdef CONFIG_UP_LATE_INIT
155extern void __init up_late_init(void);
156static inline void smp_init(void) { up_late_init(); }
157#else
158static inline void smp_init(void) { }
159#endif
160
154#endif /* !SMP */ 161#endif /* !SMP */
155 162
156/* 163/*
diff --git a/include/linux/spi/at86rf230.h b/include/linux/spi/at86rf230.h
index b2b1afbb3202..cd519a11c2c6 100644
--- a/include/linux/spi/at86rf230.h
+++ b/include/linux/spi/at86rf230.h
@@ -12,10 +12,6 @@
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Written by: 15 * Written by:
20 * Dmitry Eremin-Solenikov <dmitry.baryshkov@siemens.com> 16 * Dmitry Eremin-Solenikov <dmitry.baryshkov@siemens.com>
21 */ 17 */
diff --git a/include/linux/spi/l4f00242t03.h b/include/linux/spi/l4f00242t03.h
index bc8677c8eba9..e69e9b51b21a 100644
--- a/include/linux/spi/l4f00242t03.h
+++ b/include/linux/spi/l4f00242t03.h
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*/ 15*/
20 16
21#ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_ 17#ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_
diff --git a/include/linux/spi/lms283gf05.h b/include/linux/spi/lms283gf05.h
index 555d254e6606..fdd1d1d51da5 100644
--- a/include/linux/spi/lms283gf05.h
+++ b/include/linux/spi/lms283gf05.h
@@ -11,10 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/ 14*/
19 15
20#ifndef _INCLUDE_LINUX_SPI_LMS283GF05_H_ 16#ifndef _INCLUDE_LINUX_SPI_LMS283GF05_H_
diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h
index 4835486f58e5..381d368b91b4 100644
--- a/include/linux/spi/mxs-spi.h
+++ b/include/linux/spi/mxs-spi.h
@@ -15,10 +15,6 @@
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details. 17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */ 18 */
23 19
24#ifndef __LINUX_SPI_MXS_SPI_H__ 20#ifndef __LINUX_SPI_MXS_SPI_H__
diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h
index d5a316550177..6d36dacec4ba 100644
--- a/include/linux/spi/pxa2xx_spi.h
+++ b/include/linux/spi/pxa2xx_spi.h
@@ -10,10 +10,6 @@
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 13 */
18#ifndef __linux_pxa2xx_spi_h 14#ifndef __linux_pxa2xx_spi_h
19#define __linux_pxa2xx_spi_h 15#define __linux_pxa2xx_spi_h
@@ -57,7 +53,6 @@ struct pxa2xx_spi_chip {
57#if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP) 53#if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP)
58 54
59#include <linux/clk.h> 55#include <linux/clk.h>
60#include <mach/dma.h>
61 56
62extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info); 57extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info);
63 58
diff --git a/include/linux/spi/rspi.h b/include/linux/spi/rspi.h
index e546b2ceb623..a693188cc08b 100644
--- a/include/linux/spi/rspi.h
+++ b/include/linux/spi/rspi.h
@@ -11,11 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 */ 14 */
20 15
21#ifndef __LINUX_SPI_RENESAS_SPI_H__ 16#ifndef __LINUX_SPI_RENESAS_SPI_H__
diff --git a/include/linux/spi/sh_hspi.h b/include/linux/spi/sh_hspi.h
index a1121f872ac1..aa0d440ab4f0 100644
--- a/include/linux/spi/sh_hspi.h
+++ b/include/linux/spi/sh_hspi.h
@@ -9,10 +9,6 @@
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */ 12 */
17#ifndef SH_HSPI_H 13#ifndef SH_HSPI_H
18#define SH_HSPI_H 14#define SH_HSPI_H
diff --git a/include/linux/spi/sh_msiof.h b/include/linux/spi/sh_msiof.h
index 88a14d81c49e..b087a85f5f72 100644
--- a/include/linux/spi/sh_msiof.h
+++ b/include/linux/spi/sh_msiof.h
@@ -7,6 +7,8 @@ struct sh_msiof_spi_info {
7 u16 num_chipselect; 7 u16 num_chipselect;
8 unsigned int dma_tx_id; 8 unsigned int dma_tx_id;
9 unsigned int dma_rx_id; 9 unsigned int dma_rx_id;
10 u32 dtdl;
11 u32 syncdl;
10}; 12};
11 13
12#endif /* __SPI_SH_MSIOF_H__ */ 14#endif /* __SPI_SH_MSIOF_H__ */
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index a6ef2a8e6de4..ed9489d893a4 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -10,10 +10,6 @@
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 13 */
18 14
19#ifndef __LINUX_SPI_H 15#ifndef __LINUX_SPI_H
@@ -260,6 +256,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
260 * @pump_messages: work struct for scheduling work to the message pump 256 * @pump_messages: work struct for scheduling work to the message pump
261 * @queue_lock: spinlock to syncronise access to message queue 257 * @queue_lock: spinlock to syncronise access to message queue
262 * @queue: message queue 258 * @queue: message queue
259 * @idling: the device is entering idle state
263 * @cur_msg: the currently in-flight message 260 * @cur_msg: the currently in-flight message
264 * @cur_msg_prepared: spi_prepare_message was called for the currently 261 * @cur_msg_prepared: spi_prepare_message was called for the currently
265 * in-flight message 262 * in-flight message
@@ -425,6 +422,7 @@ struct spi_master {
425 spinlock_t queue_lock; 422 spinlock_t queue_lock;
426 struct list_head queue; 423 struct list_head queue;
427 struct spi_message *cur_msg; 424 struct spi_message *cur_msg;
425 bool idling;
428 bool busy; 426 bool busy;
429 bool running; 427 bool running;
430 bool rt; 428 bool rt;
diff --git a/include/linux/spi/tle62x0.h b/include/linux/spi/tle62x0.h
index 60b59187e590..414c6fddfcf0 100644
--- a/include/linux/spi/tle62x0.h
+++ b/include/linux/spi/tle62x0.h
@@ -12,10 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*/ 15*/
20 16
21struct tle62x0_pdata { 17struct tle62x0_pdata {
diff --git a/include/linux/spi/tsc2005.h b/include/linux/spi/tsc2005.h
index 8f721e465e05..563b3b1799a8 100644
--- a/include/linux/spi/tsc2005.h
+++ b/include/linux/spi/tsc2005.h
@@ -12,11 +12,6 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */ 15 */
21 16
22#ifndef _LINUX_SPI_TSC2005_H 17#ifndef _LINUX_SPI_TSC2005_H
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index a2783cb5d275..9cfd9623fb03 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -45,7 +45,7 @@ struct rcu_batch {
45#define RCU_BATCH_INIT(name) { NULL, &(name.head) } 45#define RCU_BATCH_INIT(name) { NULL, &(name.head) }
46 46
47struct srcu_struct { 47struct srcu_struct {
48 unsigned completed; 48 unsigned long completed;
49 struct srcu_struct_array __percpu *per_cpu_ref; 49 struct srcu_struct_array __percpu *per_cpu_ref;
50 spinlock_t queue_lock; /* protect ->batch_queue, ->running */ 50 spinlock_t queue_lock; /* protect ->batch_queue, ->running */
51 bool running; 51 bool running;
@@ -102,13 +102,11 @@ void process_srcu(struct work_struct *work);
102 * define and init a srcu struct at build time. 102 * define and init a srcu struct at build time.
103 * dont't call init_srcu_struct() nor cleanup_srcu_struct() on it. 103 * dont't call init_srcu_struct() nor cleanup_srcu_struct() on it.
104 */ 104 */
105#define DEFINE_SRCU(name) \ 105#define __DEFINE_SRCU(name, is_static) \
106 static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\ 106 static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\
107 struct srcu_struct name = __SRCU_STRUCT_INIT(name); 107 is_static struct srcu_struct name = __SRCU_STRUCT_INIT(name)
108 108#define DEFINE_SRCU(name) __DEFINE_SRCU(name, /* not static */)
109#define DEFINE_STATIC_SRCU(name) \ 109#define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static)
110 static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\
111 static struct srcu_struct name = __SRCU_STRUCT_INIT(name);
112 110
113/** 111/**
114 * call_srcu() - Queue a callback for invocation after an SRCU grace period 112 * call_srcu() - Queue a callback for invocation after an SRCU grace period
@@ -135,7 +133,7 @@ int __srcu_read_lock(struct srcu_struct *sp) __acquires(sp);
135void __srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp); 133void __srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp);
136void synchronize_srcu(struct srcu_struct *sp); 134void synchronize_srcu(struct srcu_struct *sp);
137void synchronize_srcu_expedited(struct srcu_struct *sp); 135void synchronize_srcu_expedited(struct srcu_struct *sp);
138long srcu_batches_completed(struct srcu_struct *sp); 136unsigned long srcu_batches_completed(struct srcu_struct *sp);
139void srcu_barrier(struct srcu_struct *sp); 137void srcu_barrier(struct srcu_struct *sp);
140 138
141#ifdef CONFIG_DEBUG_LOCK_ALLOC 139#ifdef CONFIG_DEBUG_LOCK_ALLOC
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index c611a02fbc51..fc52e307efab 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -38,7 +38,7 @@
38#define THERMAL_CSTATE_INVALID -1UL 38#define THERMAL_CSTATE_INVALID -1UL
39 39
40/* No upper/lower limit requirement */ 40/* No upper/lower limit requirement */
41#define THERMAL_NO_LIMIT THERMAL_CSTATE_INVALID 41#define THERMAL_NO_LIMIT ((u32)~0)
42 42
43/* Unit conversion macros */ 43/* Unit conversion macros */
44#define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \ 44#define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \
diff --git a/include/linux/time.h b/include/linux/time.h
index 203c2ad40d71..beebe3a02d43 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -110,6 +110,19 @@ static inline bool timespec_valid_strict(const struct timespec *ts)
110 return true; 110 return true;
111} 111}
112 112
113static inline bool timeval_valid(const struct timeval *tv)
114{
115 /* Dates before 1970 are bogus */
116 if (tv->tv_sec < 0)
117 return false;
118
119 /* Can't have more microseconds then a second */
120 if (tv->tv_usec < 0 || tv->tv_usec >= USEC_PER_SEC)
121 return false;
122
123 return true;
124}
125
113extern struct timespec timespec_trunc(struct timespec t, unsigned gran); 126extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
114 127
115#define CURRENT_TIME (current_kernel_time()) 128#define CURRENT_TIME (current_kernel_time())
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 9b63d13ba82b..3eaae4754275 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -33,6 +33,7 @@ extern time64_t ktime_get_real_seconds(void);
33 33
34extern int __getnstimeofday64(struct timespec64 *tv); 34extern int __getnstimeofday64(struct timespec64 *tv);
35extern void getnstimeofday64(struct timespec64 *tv); 35extern void getnstimeofday64(struct timespec64 *tv);
36extern void getboottime64(struct timespec64 *ts);
36 37
37#if BITS_PER_LONG == 64 38#if BITS_PER_LONG == 64
38/** 39/**
@@ -72,6 +73,11 @@ static inline struct timespec get_monotonic_coarse(void)
72{ 73{
73 return get_monotonic_coarse64(); 74 return get_monotonic_coarse64();
74} 75}
76
77static inline void getboottime(struct timespec *ts)
78{
79 return getboottime64(ts);
80}
75#else 81#else
76/** 82/**
77 * Deprecated. Use do_settimeofday64(). 83 * Deprecated. Use do_settimeofday64().
@@ -129,9 +135,15 @@ static inline struct timespec get_monotonic_coarse(void)
129{ 135{
130 return timespec64_to_timespec(get_monotonic_coarse64()); 136 return timespec64_to_timespec(get_monotonic_coarse64());
131} 137}
132#endif
133 138
134extern void getboottime(struct timespec *ts); 139static inline void getboottime(struct timespec *ts)
140{
141 struct timespec64 ts64;
142
143 getboottime64(&ts64);
144 *ts = timespec64_to_timespec(ts64);
145}
146#endif
135 147
136#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) 148#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts)
137#define ktime_get_real_ts64(ts) getnstimeofday64(ts) 149#define ktime_get_real_ts64(ts) getnstimeofday64(ts)
@@ -217,6 +229,11 @@ static inline void get_monotonic_boottime(struct timespec *ts)
217 *ts = ktime_to_timespec(ktime_get_boottime()); 229 *ts = ktime_to_timespec(ktime_get_boottime());
218} 230}
219 231
232static inline void get_monotonic_boottime64(struct timespec64 *ts)
233{
234 *ts = ktime_to_timespec64(ktime_get_boottime());
235}
236
220static inline void timekeeping_clocktai(struct timespec *ts) 237static inline void timekeeping_clocktai(struct timespec *ts)
221{ 238{
222 *ts = ktime_to_timespec(ktime_get_clocktai()); 239 *ts = ktime_to_timespec(ktime_get_clocktai());
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index e08e21e5f601..c72851328ca9 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -173,7 +173,7 @@ extern void syscall_unregfunc(void);
173 TP_PROTO(data_proto), \ 173 TP_PROTO(data_proto), \
174 TP_ARGS(data_args), \ 174 TP_ARGS(data_args), \
175 TP_CONDITION(cond),,); \ 175 TP_CONDITION(cond),,); \
176 if (IS_ENABLED(CONFIG_LOCKDEP)) { \ 176 if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
177 rcu_read_lock_sched_notrace(); \ 177 rcu_read_lock_sched_notrace(); \
178 rcu_dereference_sched(__tracepoint_##name.funcs);\ 178 rcu_dereference_sched(__tracepoint_##name.funcs);\
179 rcu_read_unlock_sched_notrace(); \ 179 rcu_read_unlock_sched_notrace(); \
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 2232ed16635a..537d58eea8a0 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -363,7 +363,6 @@ do { \
363 */ 363 */
364#define wait_event_cmd(wq, condition, cmd1, cmd2) \ 364#define wait_event_cmd(wq, condition, cmd1, cmd2) \
365do { \ 365do { \
366 might_sleep(); \
367 if (condition) \ 366 if (condition) \
368 break; \ 367 break; \
369 __wait_event_cmd(wq, condition, cmd1, cmd2); \ 368 __wait_event_cmd(wq, condition, cmd1, cmd2); \
@@ -991,6 +990,32 @@ wait_on_bit_io(void *word, int bit, unsigned mode)
991} 990}
992 991
993/** 992/**
993 * wait_on_bit_timeout - wait for a bit to be cleared or a timeout elapses
994 * @word: the word being waited on, a kernel virtual address
995 * @bit: the bit of the word being waited on
996 * @mode: the task state to sleep in
997 * @timeout: timeout, in jiffies
998 *
999 * Use the standard hashed waitqueue table to wait for a bit
1000 * to be cleared. This is similar to wait_on_bit(), except also takes a
1001 * timeout parameter.
1002 *
1003 * Returned value will be zero if the bit was cleared before the
1004 * @timeout elapsed, or non-zero if the @timeout elapsed or process
1005 * received a signal and the mode permitted wakeup on that signal.
1006 */
1007static inline int
1008wait_on_bit_timeout(void *word, int bit, unsigned mode, unsigned long timeout)
1009{
1010 might_sleep();
1011 if (!test_bit(bit, word))
1012 return 0;
1013 return out_of_line_wait_on_bit_timeout(word, bit,
1014 bit_wait_timeout,
1015 mode, timeout);
1016}
1017
1018/**
994 * wait_on_bit_action - wait for a bit to be cleared 1019 * wait_on_bit_action - wait for a bit to be cleared
995 * @word: the word being waited on, a kernel virtual address 1020 * @word: the word being waited on, a kernel virtual address
996 * @bit: the bit of the word being waited on 1021 * @bit: the bit of the word being waited on
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b996e6cde6bb..74db135f9957 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -220,14 +220,10 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
220#endif 220#endif
221 221
222#define INIT_WORK(_work, _func) \ 222#define INIT_WORK(_work, _func) \
223 do { \ 223 __INIT_WORK((_work), (_func), 0)
224 __INIT_WORK((_work), (_func), 0); \
225 } while (0)
226 224
227#define INIT_WORK_ONSTACK(_work, _func) \ 225#define INIT_WORK_ONSTACK(_work, _func) \
228 do { \ 226 __INIT_WORK((_work), (_func), 1)
229 __INIT_WORK((_work), (_func), 1); \
230 } while (0)
231 227
232#define __INIT_DELAYED_WORK(_work, _func, _tflags) \ 228#define __INIT_DELAYED_WORK(_work, _func, _tflags) \
233 do { \ 229 do { \
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index a219be961c0a..00048339c23e 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -177,7 +177,6 @@ int write_cache_pages(struct address_space *mapping,
177 struct writeback_control *wbc, writepage_t writepage, 177 struct writeback_control *wbc, writepage_t writepage,
178 void *data); 178 void *data);
179int do_writepages(struct address_space *mapping, struct writeback_control *wbc); 179int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
180void set_page_dirty_balance(struct page *page);
181void writeback_set_ratelimit(void); 180void writeback_set_ratelimit(void);
182void tag_pages_for_writeback(struct address_space *mapping, 181void tag_pages_for_writeback(struct address_space *mapping,
183 pgoff_t start, pgoff_t end); 182 pgoff_t start, pgoff_t end);
diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h
index 7ee2df083542..dc8fd81412bf 100644
--- a/include/net/flow_keys.h
+++ b/include/net/flow_keys.h
@@ -22,9 +22,9 @@ struct flow_keys {
22 __be32 ports; 22 __be32 ports;
23 __be16 port16[2]; 23 __be16 port16[2];
24 }; 24 };
25 u16 thoff; 25 u16 thoff;
26 u16 n_proto; 26 __be16 n_proto;
27 u8 ip_proto; 27 u8 ip_proto;
28}; 28};
29 29
30bool __skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow, 30bool __skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow,
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index af10c2cf8a1d..6c92415311ca 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -27,10 +27,18 @@ struct genl_info;
27 * @maxattr: maximum number of attributes supported 27 * @maxattr: maximum number of attributes supported
28 * @netnsok: set to true if the family can handle network 28 * @netnsok: set to true if the family can handle network
29 * namespaces and should be presented in all of them 29 * namespaces and should be presented in all of them
30 * @parallel_ops: operations can be called in parallel and aren't
31 * synchronized by the core genetlink code
30 * @pre_doit: called before an operation's doit callback, it may 32 * @pre_doit: called before an operation's doit callback, it may
31 * do additional, common, filtering and return an error 33 * do additional, common, filtering and return an error
32 * @post_doit: called after an operation's doit callback, it may 34 * @post_doit: called after an operation's doit callback, it may
33 * undo operations done by pre_doit, for example release locks 35 * undo operations done by pre_doit, for example release locks
36 * @mcast_bind: a socket bound to the given multicast group (which
37 * is given as the offset into the groups array)
38 * @mcast_unbind: a socket was unbound from the given multicast group.
39 * Note that unbind() will not be called symmetrically if the
40 * generic netlink family is removed while there are still open
41 * sockets.
34 * @attrbuf: buffer to store parsed attributes 42 * @attrbuf: buffer to store parsed attributes
35 * @family_list: family list 43 * @family_list: family list
36 * @mcgrps: multicast groups used by this family (private) 44 * @mcgrps: multicast groups used by this family (private)
@@ -53,6 +61,8 @@ struct genl_family {
53 void (*post_doit)(const struct genl_ops *ops, 61 void (*post_doit)(const struct genl_ops *ops,
54 struct sk_buff *skb, 62 struct sk_buff *skb,
55 struct genl_info *info); 63 struct genl_info *info);
64 int (*mcast_bind)(struct net *net, int group);
65 void (*mcast_unbind)(struct net *net, int group);
56 struct nlattr ** attrbuf; /* private */ 66 struct nlattr ** attrbuf; /* private */
57 const struct genl_ops * ops; /* private */ 67 const struct genl_ops * ops; /* private */
58 const struct genl_multicast_group *mcgrps; /* private */ 68 const struct genl_multicast_group *mcgrps; /* private */
@@ -395,11 +405,11 @@ static inline int genl_set_err(struct genl_family *family, struct net *net,
395} 405}
396 406
397static inline int genl_has_listeners(struct genl_family *family, 407static inline int genl_has_listeners(struct genl_family *family,
398 struct sock *sk, unsigned int group) 408 struct net *net, unsigned int group)
399{ 409{
400 if (WARN_ON_ONCE(group >= family->n_mcgrps)) 410 if (WARN_ON_ONCE(group >= family->n_mcgrps))
401 return -EINVAL; 411 return -EINVAL;
402 group = family->mcgrp_offset + group; 412 group = family->mcgrp_offset + group;
403 return netlink_has_listeners(sk, group); 413 return netlink_has_listeners(net->genl_sock, group);
404} 414}
405#endif /* __NET_GENERIC_NETLINK_H */ 415#endif /* __NET_GENERIC_NETLINK_H */
diff --git a/include/net/ip.h b/include/net/ip.h
index 0bb620702929..09cf5aebb283 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -39,11 +39,12 @@ struct inet_skb_parm {
39 struct ip_options opt; /* Compiled IP options */ 39 struct ip_options opt; /* Compiled IP options */
40 unsigned char flags; 40 unsigned char flags;
41 41
42#define IPSKB_FORWARDED 1 42#define IPSKB_FORWARDED BIT(0)
43#define IPSKB_XFRM_TUNNEL_SIZE 2 43#define IPSKB_XFRM_TUNNEL_SIZE BIT(1)
44#define IPSKB_XFRM_TRANSFORMED 4 44#define IPSKB_XFRM_TRANSFORMED BIT(2)
45#define IPSKB_FRAG_COMPLETE 8 45#define IPSKB_FRAG_COMPLETE BIT(3)
46#define IPSKB_REROUTED 16 46#define IPSKB_REROUTED BIT(4)
47#define IPSKB_DOREDIRECT BIT(5)
47 48
48 u16 frag_max_size; 49 u16 frag_max_size;
49}; 50};
@@ -180,7 +181,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
180 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0; 181 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0;
181} 182}
182 183
183void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, 184void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb,
184 const struct ip_options *sopt, 185 const struct ip_options *sopt,
185 __be32 daddr, __be32 saddr, 186 __be32 daddr, __be32 saddr,
186 const struct ip_reply_arg *arg, 187 const struct ip_reply_arg *arg,
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 4292929392b0..6e416f6d3e3c 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -671,6 +671,9 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add
671 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); 671 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
672} 672}
673 673
674u32 __ipv6_select_ident(u32 hashrnd, struct in6_addr *dst,
675 struct in6_addr *src);
676void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt);
674void ipv6_proxy_select_ident(struct sk_buff *skb); 677void ipv6_proxy_select_ident(struct sk_buff *skb);
675 678
676int ip6_dst_hoplimit(struct dst_entry *dst); 679int ip6_dst_hoplimit(struct dst_entry *dst);
@@ -708,7 +711,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
708 __be32 flowlabel, bool autolabel) 711 __be32 flowlabel, bool autolabel)
709{ 712{
710 if (!flowlabel && (autolabel || net->ipv6.sysctl.auto_flowlabels)) { 713 if (!flowlabel && (autolabel || net->ipv6.sysctl.auto_flowlabels)) {
711 __be32 hash; 714 u32 hash;
712 715
713 hash = skb_get_hash(skb); 716 hash = skb_get_hash(skb);
714 717
@@ -718,7 +721,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
718 */ 721 */
719 hash ^= hash >> 12; 722 hash ^= hash >> 12;
720 723
721 flowlabel = hash & IPV6_FLOWLABEL_MASK; 724 flowlabel = (__force __be32)hash & IPV6_FLOWLABEL_MASK;
722 } 725 }
723 726
724 return flowlabel; 727 return flowlabel;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 58d719ddaa60..29c7be8808d5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1270,8 +1270,7 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
1270 * 1270 *
1271 * @IEEE80211_KEY_FLAG_GENERATE_IV: This flag should be set by the 1271 * @IEEE80211_KEY_FLAG_GENERATE_IV: This flag should be set by the
1272 * driver to indicate that it requires IV generation for this 1272 * driver to indicate that it requires IV generation for this
1273 * particular key. Setting this flag does not necessarily mean that SKBs 1273 * particular key.
1274 * will have sufficient tailroom for ICV or MIC.
1275 * @IEEE80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by 1274 * @IEEE80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by
1276 * the driver for a TKIP key if it requires Michael MIC 1275 * the driver for a TKIP key if it requires Michael MIC
1277 * generation in software. 1276 * generation in software.
@@ -1283,9 +1282,7 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
1283 * @IEEE80211_KEY_FLAG_PUT_IV_SPACE: This flag should be set by the driver 1282 * @IEEE80211_KEY_FLAG_PUT_IV_SPACE: This flag should be set by the driver
1284 * if space should be prepared for the IV, but the IV 1283 * if space should be prepared for the IV, but the IV
1285 * itself should not be generated. Do not set together with 1284 * itself should not be generated. Do not set together with
1286 * @IEEE80211_KEY_FLAG_GENERATE_IV on the same key. Setting this flag does 1285 * @IEEE80211_KEY_FLAG_GENERATE_IV on the same key.
1287 * not necessarily mean that SKBs will have sufficient tailroom for ICV or
1288 * MIC.
1289 * @IEEE80211_KEY_FLAG_RX_MGMT: This key will be used to decrypt received 1286 * @IEEE80211_KEY_FLAG_RX_MGMT: This key will be used to decrypt received
1290 * management frames. The flag can help drivers that have a hardware 1287 * management frames. The flag can help drivers that have a hardware
1291 * crypto implementation that doesn't deal with management frames 1288 * crypto implementation that doesn't deal with management frames
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index eb070b3674a1..76f708486aae 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -190,7 +190,6 @@ struct neigh_hash_table {
190 190
191 191
192struct neigh_table { 192struct neigh_table {
193 struct neigh_table *next;
194 int family; 193 int family;
195 int entry_size; 194 int entry_size;
196 int key_len; 195 int key_len;
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 3ae969e3acf0..9eaaa7884586 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -530,6 +530,8 @@ enum nft_chain_type {
530 530
531int nft_chain_validate_dependency(const struct nft_chain *chain, 531int nft_chain_validate_dependency(const struct nft_chain *chain,
532 enum nft_chain_type type); 532 enum nft_chain_type type);
533int nft_chain_validate_hooks(const struct nft_chain *chain,
534 unsigned int hook_flags);
533 535
534struct nft_stats { 536struct nft_stats {
535 u64 bytes; 537 u64 bytes;
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 24945cefc4fd..0ffef1a38efc 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -52,6 +52,7 @@ struct netns_ipv4 {
52 struct inet_peer_base *peers; 52 struct inet_peer_base *peers;
53 struct tcpm_hash_bucket *tcp_metrics_hash; 53 struct tcpm_hash_bucket *tcp_metrics_hash;
54 unsigned int tcp_metrics_hash_log; 54 unsigned int tcp_metrics_hash_log;
55 struct sock * __percpu *tcp_sk;
55 struct netns_frags frags; 56 struct netns_frags frags;
56#ifdef CONFIG_NETFILTER 57#ifdef CONFIG_NETFILTER
57 struct xt_table *iptable_filter; 58 struct xt_table *iptable_filter;
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 3d282cbb66bf..c605d305c577 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -79,6 +79,9 @@ struct Qdisc {
79 struct netdev_queue *dev_queue; 79 struct netdev_queue *dev_queue;
80 80
81 struct gnet_stats_rate_est64 rate_est; 81 struct gnet_stats_rate_est64 rate_est;
82 struct gnet_stats_basic_cpu __percpu *cpu_bstats;
83 struct gnet_stats_queue __percpu *cpu_qstats;
84
82 struct Qdisc *next_sched; 85 struct Qdisc *next_sched;
83 struct sk_buff *gso_skb; 86 struct sk_buff *gso_skb;
84 /* 87 /*
@@ -86,15 +89,9 @@ struct Qdisc {
86 */ 89 */
87 unsigned long state; 90 unsigned long state;
88 struct sk_buff_head q; 91 struct sk_buff_head q;
89 union { 92 struct gnet_stats_basic_packed bstats;
90 struct gnet_stats_basic_packed bstats;
91 struct gnet_stats_basic_cpu __percpu *cpu_bstats;
92 } __packed;
93 unsigned int __state; 93 unsigned int __state;
94 union { 94 struct gnet_stats_queue qstats;
95 struct gnet_stats_queue qstats;
96 struct gnet_stats_queue __percpu *cpu_qstats;
97 } __packed;
98 struct rcu_head rcu_head; 95 struct rcu_head rcu_head;
99 int padded; 96 int padded;
100 atomic_t refcnt; 97 atomic_t refcnt;
diff --git a/include/net/tcp.h b/include/net/tcp.h
index f50f29faf76f..9d9111ef43ae 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -834,8 +834,8 @@ void tcp_get_available_congestion_control(char *buf, size_t len);
834void tcp_get_allowed_congestion_control(char *buf, size_t len); 834void tcp_get_allowed_congestion_control(char *buf, size_t len);
835int tcp_set_allowed_congestion_control(char *allowed); 835int tcp_set_allowed_congestion_control(char *allowed);
836int tcp_set_congestion_control(struct sock *sk, const char *name); 836int tcp_set_congestion_control(struct sock *sk, const char *name);
837void tcp_slow_start(struct tcp_sock *tp, u32 acked); 837u32 tcp_slow_start(struct tcp_sock *tp, u32 acked);
838void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w); 838void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked);
839 839
840u32 tcp_reno_ssthresh(struct sock *sk); 840u32 tcp_reno_ssthresh(struct sock *sk);
841void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked); 841void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked);
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 57cccd0052e5..903461aa5644 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -1,6 +1,9 @@
1#ifndef __NET_VXLAN_H 1#ifndef __NET_VXLAN_H
2#define __NET_VXLAN_H 1 2#define __NET_VXLAN_H 1
3 3
4#include <linux/ip.h>
5#include <linux/ipv6.h>
6#include <linux/if_vlan.h>
4#include <linux/skbuff.h> 7#include <linux/skbuff.h>
5#include <linux/netdevice.h> 8#include <linux/netdevice.h>
6#include <linux/udp.h> 9#include <linux/udp.h>
@@ -51,16 +54,33 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
51 __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df, 54 __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df,
52 __be16 src_port, __be16 dst_port, __be32 vni, bool xnet); 55 __be16 src_port, __be16 dst_port, __be32 vni, bool xnet);
53 56
54static inline bool vxlan_gso_check(struct sk_buff *skb) 57static inline netdev_features_t vxlan_features_check(struct sk_buff *skb,
58 netdev_features_t features)
55{ 59{
56 if ((skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL) && 60 u8 l4_hdr = 0;
61
62 if (!skb->encapsulation)
63 return features;
64
65 switch (vlan_get_protocol(skb)) {
66 case htons(ETH_P_IP):
67 l4_hdr = ip_hdr(skb)->protocol;
68 break;
69 case htons(ETH_P_IPV6):
70 l4_hdr = ipv6_hdr(skb)->nexthdr;
71 break;
72 default:
73 return features;;
74 }
75
76 if ((l4_hdr == IPPROTO_UDP) &&
57 (skb->inner_protocol_type != ENCAP_TYPE_ETHER || 77 (skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
58 skb->inner_protocol != htons(ETH_P_TEB) || 78 skb->inner_protocol != htons(ETH_P_TEB) ||
59 (skb_inner_mac_header(skb) - skb_transport_header(skb) != 79 (skb_inner_mac_header(skb) - skb_transport_header(skb) !=
60 sizeof(struct udphdr) + sizeof(struct vxlanhdr)))) 80 sizeof(struct udphdr) + sizeof(struct vxlanhdr))))
61 return false; 81 return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
62 82
63 return true; 83 return features;
64} 84}
65 85
66/* IP header + UDP + VXLAN + Ethernet header */ 86/* IP header + UDP + VXLAN + Ethernet header */
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 0d74f1de99aa..65994a19e840 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1707,10 +1707,7 @@ static inline int ib_copy_from_udata(void *dest, struct ib_udata *udata, size_t
1707 1707
1708static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len) 1708static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len)
1709{ 1709{
1710 size_t copy_sz; 1710 return copy_to_user(udata->outbuf, src, len) ? -EFAULT : 0;
1711
1712 copy_sz = min_t(size_t, len, udata->outlen);
1713 return copy_to_user(udata->outbuf, src, copy_sz) ? -EFAULT : 0;
1714} 1711}
1715 1712
1716/** 1713/**
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h
index 2609048c1d44..3a34f6edc2d1 100644
--- a/include/sound/ak4113.h
+++ b/include/sound/ak4113.h
@@ -286,7 +286,7 @@ struct ak4113 {
286 ak4113_write_t *write; 286 ak4113_write_t *write;
287 ak4113_read_t *read; 287 ak4113_read_t *read;
288 void *private_data; 288 void *private_data;
289 unsigned int init:1; 289 atomic_t wq_processing;
290 spinlock_t lock; 290 spinlock_t lock;
291 unsigned char regmap[AK4113_WRITABLE_REGS]; 291 unsigned char regmap[AK4113_WRITABLE_REGS];
292 struct snd_kcontrol *kctls[AK4113_CONTROLS]; 292 struct snd_kcontrol *kctls[AK4113_CONTROLS];
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h
index 52f02a60dba7..069299a88915 100644
--- a/include/sound/ak4114.h
+++ b/include/sound/ak4114.h
@@ -168,7 +168,7 @@ struct ak4114 {
168 ak4114_write_t * write; 168 ak4114_write_t * write;
169 ak4114_read_t * read; 169 ak4114_read_t * read;
170 void * private_data; 170 void * private_data;
171 unsigned int init: 1; 171 atomic_t wq_processing;
172 spinlock_t lock; 172 spinlock_t lock;
173 unsigned char regmap[6]; 173 unsigned char regmap[6];
174 unsigned char txcsb[5]; 174 unsigned char txcsb[5];
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 1e7f74acc2ec..b429b73e875e 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -857,7 +857,7 @@ static inline unsigned int params_channels(const struct snd_pcm_hw_params *p)
857} 857}
858 858
859/** 859/**
860 * params_channels - Get the sample rate from the hw params 860 * params_rate - Get the sample rate from the hw params
861 * @p: hw params 861 * @p: hw params
862 */ 862 */
863static inline unsigned int params_rate(const struct snd_pcm_hw_params *p) 863static inline unsigned int params_rate(const struct snd_pcm_hw_params *p)
@@ -866,7 +866,7 @@ static inline unsigned int params_rate(const struct snd_pcm_hw_params *p)
866} 866}
867 867
868/** 868/**
869 * params_channels - Get the period size (in frames) from the hw params 869 * params_period_size - Get the period size (in frames) from the hw params
870 * @p: hw params 870 * @p: hw params
871 */ 871 */
872static inline unsigned int params_period_size(const struct snd_pcm_hw_params *p) 872static inline unsigned int params_period_size(const struct snd_pcm_hw_params *p)
@@ -875,7 +875,7 @@ static inline unsigned int params_period_size(const struct snd_pcm_hw_params *p)
875} 875}
876 876
877/** 877/**
878 * params_channels - Get the number of periods from the hw params 878 * params_periods - Get the number of periods from the hw params
879 * @p: hw params 879 * @p: hw params
880 */ 880 */
881static inline unsigned int params_periods(const struct snd_pcm_hw_params *p) 881static inline unsigned int params_periods(const struct snd_pcm_hw_params *p)
@@ -884,7 +884,7 @@ static inline unsigned int params_periods(const struct snd_pcm_hw_params *p)
884} 884}
885 885
886/** 886/**
887 * params_channels - Get the buffer size (in frames) from the hw params 887 * params_buffer_size - Get the buffer size (in frames) from the hw params
888 * @p: hw params 888 * @p: hw params
889 */ 889 */
890static inline unsigned int params_buffer_size(const struct snd_pcm_hw_params *p) 890static inline unsigned int params_buffer_size(const struct snd_pcm_hw_params *p)
@@ -893,7 +893,7 @@ static inline unsigned int params_buffer_size(const struct snd_pcm_hw_params *p)
893} 893}
894 894
895/** 895/**
896 * params_channels - Get the buffer size (in bytes) from the hw params 896 * params_buffer_bytes - Get the buffer size (in bytes) from the hw params
897 * @p: hw params 897 * @p: hw params
898 */ 898 */
899static inline unsigned int params_buffer_bytes(const struct snd_pcm_hw_params *p) 899static inline unsigned int params_buffer_bytes(const struct snd_pcm_hw_params *p)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index b4fca9aed2a2..ac8b333acb4d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -498,6 +498,7 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg,
498 unsigned int mask, unsigned int value); 498 unsigned int mask, unsigned int value);
499 499
500#ifdef CONFIG_SND_SOC_AC97_BUS 500#ifdef CONFIG_SND_SOC_AC97_BUS
501struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec);
501struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); 502struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec);
502void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); 503void snd_soc_free_ac97_codec(struct snd_ac97 *ac97);
503 504
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h
index 430cfaf92285..db81c65b8f48 100644
--- a/include/target/target_core_backend.h
+++ b/include/target/target_core_backend.h
@@ -135,7 +135,6 @@ int se_dev_set_is_nonrot(struct se_device *, int);
135int se_dev_set_emulate_rest_reord(struct se_device *dev, int); 135int se_dev_set_emulate_rest_reord(struct se_device *dev, int);
136int se_dev_set_queue_depth(struct se_device *, u32); 136int se_dev_set_queue_depth(struct se_device *, u32);
137int se_dev_set_max_sectors(struct se_device *, u32); 137int se_dev_set_max_sectors(struct se_device *, u32);
138int se_dev_set_fabric_max_sectors(struct se_device *, u32);
139int se_dev_set_optimal_sectors(struct se_device *, u32); 138int se_dev_set_optimal_sectors(struct se_device *, u32);
140int se_dev_set_block_size(struct se_device *, u32); 139int se_dev_set_block_size(struct se_device *, u32);
141 140
diff --git a/include/target/target_core_backend_configfs.h b/include/target/target_core_backend_configfs.h
index 3247d7530107..186f7a923570 100644
--- a/include/target/target_core_backend_configfs.h
+++ b/include/target/target_core_backend_configfs.h
@@ -98,8 +98,6 @@ static struct target_backend_dev_attrib_attribute _backend##_dev_attrib_##_name
98 TB_DEV_ATTR(_backend, block_size, S_IRUGO | S_IWUSR); \ 98 TB_DEV_ATTR(_backend, block_size, S_IRUGO | S_IWUSR); \
99 DEF_TB_DEV_ATTRIB_RO(_backend, hw_max_sectors); \ 99 DEF_TB_DEV_ATTRIB_RO(_backend, hw_max_sectors); \
100 TB_DEV_ATTR_RO(_backend, hw_max_sectors); \ 100 TB_DEV_ATTR_RO(_backend, hw_max_sectors); \
101 DEF_TB_DEV_ATTRIB(_backend, fabric_max_sectors); \
102 TB_DEV_ATTR(_backend, fabric_max_sectors, S_IRUGO | S_IWUSR); \
103 DEF_TB_DEV_ATTRIB(_backend, optimal_sectors); \ 101 DEF_TB_DEV_ATTRIB(_backend, optimal_sectors); \
104 TB_DEV_ATTR(_backend, optimal_sectors, S_IRUGO | S_IWUSR); \ 102 TB_DEV_ATTR(_backend, optimal_sectors, S_IRUGO | S_IWUSR); \
105 DEF_TB_DEV_ATTRIB_RO(_backend, hw_queue_depth); \ 103 DEF_TB_DEV_ATTRIB_RO(_backend, hw_queue_depth); \
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 397fb635766a..4a8795a87b9e 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -77,8 +77,6 @@
77#define DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT 0 77#define DA_UNMAP_GRANULARITY_ALIGNMENT_DEFAULT 0
78/* Default max_write_same_len, disabled by default */ 78/* Default max_write_same_len, disabled by default */
79#define DA_MAX_WRITE_SAME_LEN 0 79#define DA_MAX_WRITE_SAME_LEN 0
80/* Default max transfer length */
81#define DA_FABRIC_MAX_SECTORS 8192
82/* Use a model alias based on the configfs backend device name */ 80/* Use a model alias based on the configfs backend device name */
83#define DA_EMULATE_MODEL_ALIAS 0 81#define DA_EMULATE_MODEL_ALIAS 0
84/* Emulation for Direct Page Out */ 82/* Emulation for Direct Page Out */
@@ -694,7 +692,6 @@ struct se_dev_attrib {
694 u32 hw_block_size; 692 u32 hw_block_size;
695 u32 block_size; 693 u32 block_size;
696 u32 hw_max_sectors; 694 u32 hw_max_sectors;
697 u32 fabric_max_sectors;
698 u32 optimal_sectors; 695 u32 optimal_sectors;
699 u32 hw_queue_depth; 696 u32 hw_queue_depth;
700 u32 queue_depth; 697 u32 queue_depth;
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index 6edf1f2028cd..86b399c66c3d 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -146,6 +146,14 @@ TRACE_EVENT(kvm_msi_set_irq,
146 146
147#if defined(CONFIG_HAVE_KVM_IRQFD) 147#if defined(CONFIG_HAVE_KVM_IRQFD)
148 148
149#ifdef kvm_irqchips
150#define kvm_ack_irq_string "irqchip %s pin %u"
151#define kvm_ack_irq_parm __print_symbolic(__entry->irqchip, kvm_irqchips), __entry->pin
152#else
153#define kvm_ack_irq_string "irqchip %d pin %u"
154#define kvm_ack_irq_parm __entry->irqchip, __entry->pin
155#endif
156
149TRACE_EVENT(kvm_ack_irq, 157TRACE_EVENT(kvm_ack_irq,
150 TP_PROTO(unsigned int irqchip, unsigned int pin), 158 TP_PROTO(unsigned int irqchip, unsigned int pin),
151 TP_ARGS(irqchip, pin), 159 TP_ARGS(irqchip, pin),
@@ -160,13 +168,7 @@ TRACE_EVENT(kvm_ack_irq,
160 __entry->pin = pin; 168 __entry->pin = pin;
161 ), 169 ),
162 170
163#ifdef kvm_irqchips 171 TP_printk(kvm_ack_irq_string, kvm_ack_irq_parm)
164 TP_printk("irqchip %s pin %u",
165 __print_symbolic(__entry->irqchip, kvm_irqchips),
166 __entry->pin)
167#else
168 TP_printk("irqchip %d pin %u", __entry->irqchip, __entry->pin)
169#endif
170); 172);
171 173
172#endif /* defined(CONFIG_HAVE_KVM_IRQFD) */ 174#endif /* defined(CONFIG_HAVE_KVM_IRQFD) */
diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h
index 13391d288107..0e7635765153 100644
--- a/include/trace/events/tlb.h
+++ b/include/trace/events/tlb.h
@@ -13,11 +13,13 @@
13 { TLB_LOCAL_SHOOTDOWN, "local shootdown" }, \ 13 { TLB_LOCAL_SHOOTDOWN, "local shootdown" }, \
14 { TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" } 14 { TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" }
15 15
16TRACE_EVENT(tlb_flush, 16TRACE_EVENT_CONDITION(tlb_flush,
17 17
18 TP_PROTO(int reason, unsigned long pages), 18 TP_PROTO(int reason, unsigned long pages),
19 TP_ARGS(reason, pages), 19 TP_ARGS(reason, pages),
20 20
21 TP_CONDITION(cpu_online(smp_processor_id())),
22
21 TP_STRUCT__entry( 23 TP_STRUCT__entry(
22 __field( int, reason) 24 __field( int, reason)
23 __field(unsigned long, pages) 25 __field(unsigned long, pages)
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 139b5067345b..27609dfcce25 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -763,7 +763,7 @@ perf_trace_##call(void *__data, proto) \
763 struct ftrace_event_call *event_call = __data; \ 763 struct ftrace_event_call *event_call = __data; \
764 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ 764 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
765 struct ftrace_raw_##call *entry; \ 765 struct ftrace_raw_##call *entry; \
766 struct pt_regs __regs; \ 766 struct pt_regs *__regs; \
767 u64 __addr = 0, __count = 1; \ 767 u64 __addr = 0, __count = 1; \
768 struct task_struct *__task = NULL; \ 768 struct task_struct *__task = NULL; \
769 struct hlist_head *head; \ 769 struct hlist_head *head; \
@@ -782,18 +782,19 @@ perf_trace_##call(void *__data, proto) \
782 sizeof(u64)); \ 782 sizeof(u64)); \
783 __entry_size -= sizeof(u32); \ 783 __entry_size -= sizeof(u32); \
784 \ 784 \
785 perf_fetch_caller_regs(&__regs); \
786 entry = perf_trace_buf_prepare(__entry_size, \ 785 entry = perf_trace_buf_prepare(__entry_size, \
787 event_call->event.type, &__regs, &rctx); \ 786 event_call->event.type, &__regs, &rctx); \
788 if (!entry) \ 787 if (!entry) \
789 return; \ 788 return; \
790 \ 789 \
790 perf_fetch_caller_regs(__regs); \
791 \
791 tstruct \ 792 tstruct \
792 \ 793 \
793 { assign; } \ 794 { assign; } \
794 \ 795 \
795 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ 796 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
796 __count, &__regs, head, __task); \ 797 __count, __regs, head, __task); \
797} 798}
798 799
799/* 800/*
diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
index 7543b3e51331..e063effe0cc1 100644
--- a/include/uapi/asm-generic/fcntl.h
+++ b/include/uapi/asm-generic/fcntl.h
@@ -5,7 +5,7 @@
5 5
6/* 6/*
7 * FMODE_EXEC is 0x20 7 * FMODE_EXEC is 0x20
8 * FMODE_NONOTIFY is 0x1000000 8 * FMODE_NONOTIFY is 0x4000000
9 * These cannot be used by userspace O_* until internal and external open 9 * These cannot be used by userspace O_* until internal and external open
10 * flags are split. 10 * flags are split.
11 * -Eric Paris 11 * -Eric Paris
diff --git a/include/uapi/linux/can/netlink.h b/include/uapi/linux/can/netlink.h
index 3e4323a3918d..94ffe0c83ce7 100644
--- a/include/uapi/linux/can/netlink.h
+++ b/include/uapi/linux/can/netlink.h
@@ -98,6 +98,7 @@ struct can_ctrlmode {
98#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */ 98#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */
99#define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */ 99#define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */
100#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */ 100#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */
101#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */
101 102
102/* 103/*
103 * CAN device statistics 104 * CAN device statistics
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h
index 74a2a1773494..79b12b004ade 100644
--- a/include/uapi/linux/in6.h
+++ b/include/uapi/linux/in6.h
@@ -149,7 +149,7 @@ struct in6_flowlabel_req {
149/* 149/*
150 * IPV6 socket options 150 * IPV6 socket options
151 */ 151 */
152 152#if __UAPI_DEF_IPV6_OPTIONS
153#define IPV6_ADDRFORM 1 153#define IPV6_ADDRFORM 1
154#define IPV6_2292PKTINFO 2 154#define IPV6_2292PKTINFO 2
155#define IPV6_2292HOPOPTS 3 155#define IPV6_2292HOPOPTS 3
@@ -196,6 +196,7 @@ struct in6_flowlabel_req {
196 196
197#define IPV6_IPSEC_POLICY 34 197#define IPV6_IPSEC_POLICY 34
198#define IPV6_XFRM_POLICY 35 198#define IPV6_XFRM_POLICY 35
199#endif
199 200
200/* 201/*
201 * Multicast: 202 * Multicast:
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index 7acef41fc209..af94f31e33ac 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -128,27 +128,34 @@ struct kfd_ioctl_get_process_apertures_args {
128 uint32_t pad; 128 uint32_t pad;
129}; 129};
130 130
131#define KFD_IOC_MAGIC 'K' 131#define AMDKFD_IOCTL_BASE 'K'
132#define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
133#define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
134#define AMDKFD_IOW(nr, type) _IOW(AMDKFD_IOCTL_BASE, nr, type)
135#define AMDKFD_IOWR(nr, type) _IOWR(AMDKFD_IOCTL_BASE, nr, type)
132 136
133#define KFD_IOC_GET_VERSION \ 137#define AMDKFD_IOC_GET_VERSION \
134 _IOR(KFD_IOC_MAGIC, 1, struct kfd_ioctl_get_version_args) 138 AMDKFD_IOR(0x01, struct kfd_ioctl_get_version_args)
135 139
136#define KFD_IOC_CREATE_QUEUE \ 140#define AMDKFD_IOC_CREATE_QUEUE \
137 _IOWR(KFD_IOC_MAGIC, 2, struct kfd_ioctl_create_queue_args) 141 AMDKFD_IOWR(0x02, struct kfd_ioctl_create_queue_args)
138 142
139#define KFD_IOC_DESTROY_QUEUE \ 143#define AMDKFD_IOC_DESTROY_QUEUE \
140 _IOWR(KFD_IOC_MAGIC, 3, struct kfd_ioctl_destroy_queue_args) 144 AMDKFD_IOWR(0x03, struct kfd_ioctl_destroy_queue_args)
141 145
142#define KFD_IOC_SET_MEMORY_POLICY \ 146#define AMDKFD_IOC_SET_MEMORY_POLICY \
143 _IOW(KFD_IOC_MAGIC, 4, struct kfd_ioctl_set_memory_policy_args) 147 AMDKFD_IOW(0x04, struct kfd_ioctl_set_memory_policy_args)
144 148
145#define KFD_IOC_GET_CLOCK_COUNTERS \ 149#define AMDKFD_IOC_GET_CLOCK_COUNTERS \
146 _IOWR(KFD_IOC_MAGIC, 5, struct kfd_ioctl_get_clock_counters_args) 150 AMDKFD_IOWR(0x05, struct kfd_ioctl_get_clock_counters_args)
147 151
148#define KFD_IOC_GET_PROCESS_APERTURES \ 152#define AMDKFD_IOC_GET_PROCESS_APERTURES \
149 _IOR(KFD_IOC_MAGIC, 6, struct kfd_ioctl_get_process_apertures_args) 153 AMDKFD_IOR(0x06, struct kfd_ioctl_get_process_apertures_args)
150 154
151#define KFD_IOC_UPDATE_QUEUE \ 155#define AMDKFD_IOC_UPDATE_QUEUE \
152 _IOW(KFD_IOC_MAGIC, 7, struct kfd_ioctl_update_queue_args) 156 AMDKFD_IOW(0x07, struct kfd_ioctl_update_queue_args)
157
158#define AMDKFD_COMMAND_START 0x01
159#define AMDKFD_COMMAND_END 0x08
153 160
154#endif 161#endif
diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
index c140620dad92..e28807ad17fa 100644
--- a/include/uapi/linux/libc-compat.h
+++ b/include/uapi/linux/libc-compat.h
@@ -69,6 +69,7 @@
69#define __UAPI_DEF_SOCKADDR_IN6 0 69#define __UAPI_DEF_SOCKADDR_IN6 0
70#define __UAPI_DEF_IPV6_MREQ 0 70#define __UAPI_DEF_IPV6_MREQ 0
71#define __UAPI_DEF_IPPROTO_V6 0 71#define __UAPI_DEF_IPPROTO_V6 0
72#define __UAPI_DEF_IPV6_OPTIONS 0
72 73
73#else 74#else
74 75
@@ -82,6 +83,7 @@
82#define __UAPI_DEF_SOCKADDR_IN6 1 83#define __UAPI_DEF_SOCKADDR_IN6 1
83#define __UAPI_DEF_IPV6_MREQ 1 84#define __UAPI_DEF_IPV6_MREQ 1
84#define __UAPI_DEF_IPPROTO_V6 1 85#define __UAPI_DEF_IPPROTO_V6 1
86#define __UAPI_DEF_IPV6_OPTIONS 1
85 87
86#endif /* _NETINET_IN_H */ 88#endif /* _NETINET_IN_H */
87 89
@@ -103,6 +105,7 @@
103#define __UAPI_DEF_SOCKADDR_IN6 1 105#define __UAPI_DEF_SOCKADDR_IN6 1
104#define __UAPI_DEF_IPV6_MREQ 1 106#define __UAPI_DEF_IPV6_MREQ 1
105#define __UAPI_DEF_IPPROTO_V6 1 107#define __UAPI_DEF_IPPROTO_V6 1
108#define __UAPI_DEF_IPV6_OPTIONS 1
106 109
107/* Definitions for xattr.h */ 110/* Definitions for xattr.h */
108#define __UAPI_DEF_XATTR 1 111#define __UAPI_DEF_XATTR 1
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index 3a6dcaa359b7..f714e8633352 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -174,6 +174,10 @@ enum ovs_packet_attr {
174 OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */ 174 OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */
175 OVS_PACKET_ATTR_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_* 175 OVS_PACKET_ATTR_EGRESS_TUN_KEY, /* Nested OVS_TUNNEL_KEY_ATTR_*
176 attributes. */ 176 attributes. */
177 OVS_PACKET_ATTR_UNUSED1,
178 OVS_PACKET_ATTR_UNUSED2,
179 OVS_PACKET_ATTR_PROBE, /* Packet operation is a feature probe,
180 error logging should be suppressed. */
177 __OVS_PACKET_ATTR_MAX 181 __OVS_PACKET_ATTR_MAX
178}; 182};
179 183
diff --git a/include/uapi/linux/uinput.h b/include/uapi/linux/uinput.h
index baeab83deb64..013c9d8db372 100644
--- a/include/uapi/linux/uinput.h
+++ b/include/uapi/linux/uinput.h
@@ -82,7 +82,7 @@ struct uinput_ff_erase {
82 * The complete sysfs path is then /sys/devices/virtual/input/--NAME-- 82 * The complete sysfs path is then /sys/devices/virtual/input/--NAME--
83 * Usually, it is in the form "inputN" 83 * Usually, it is in the form "inputN"
84 */ 84 */
85#define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len) 85#define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 44, len)
86 86
87/** 87/**
88 * UI_GET_VERSION - Return version of uinput protocol 88 * UI_GET_VERSION - Return version of uinput protocol
@@ -91,7 +91,7 @@ struct uinput_ff_erase {
91 * the integer pointed to by the ioctl argument. The protocol version 91 * the integer pointed to by the ioctl argument. The protocol version
92 * is hard-coded in the kernel and is independent of the uinput device. 92 * is hard-coded in the kernel and is independent of the uinput device.
93 */ 93 */
94#define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 301, unsigned int) 94#define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 45, unsigned int)
95 95
96/* 96/*
97 * To write a force-feedback-capable driver, the upload_effect 97 * To write a force-feedback-capable driver, the upload_effect
diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h
index 61c818a7fe70..a3318f31e8e7 100644
--- a/include/uapi/linux/virtio_ring.h
+++ b/include/uapi/linux/virtio_ring.h
@@ -101,6 +101,13 @@ struct vring {
101 struct vring_used *used; 101 struct vring_used *used;
102}; 102};
103 103
104/* Alignment requirements for vring elements.
105 * When using pre-virtio 1.0 layout, these fall out naturally.
106 */
107#define VRING_AVAIL_ALIGN_SIZE 2
108#define VRING_USED_ALIGN_SIZE 4
109#define VRING_DESC_ALIGN_SIZE 16
110
104/* The standard layout for the ring is a continuous chunk of memory which looks 111/* The standard layout for the ring is a continuous chunk of memory which looks
105 * like this. We assume num is a power of 2. 112 * like this. We assume num is a power of 2.
106 * 113 *
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h
index 4275b961bf60..867cc5084afb 100644
--- a/include/uapi/rdma/ib_user_verbs.h
+++ b/include/uapi/rdma/ib_user_verbs.h
@@ -90,7 +90,6 @@ enum {
90}; 90};
91 91
92enum { 92enum {
93 IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
94 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, 93 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
95 IB_USER_VERBS_EX_CMD_DESTROY_FLOW, 94 IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
96}; 95};
@@ -202,32 +201,6 @@ struct ib_uverbs_query_device_resp {
202 __u8 reserved[4]; 201 __u8 reserved[4];
203}; 202};
204 203
205enum {
206 IB_USER_VERBS_EX_QUERY_DEVICE_ODP = 1ULL << 0,
207};
208
209struct ib_uverbs_ex_query_device {
210 __u32 comp_mask;
211 __u32 reserved;
212};
213
214struct ib_uverbs_odp_caps {
215 __u64 general_caps;
216 struct {
217 __u32 rc_odp_caps;
218 __u32 uc_odp_caps;
219 __u32 ud_odp_caps;
220 } per_transport_caps;
221 __u32 reserved;
222};
223
224struct ib_uverbs_ex_query_device_resp {
225 struct ib_uverbs_query_device_resp base;
226 __u32 comp_mask;
227 __u32 reserved;
228 struct ib_uverbs_odp_caps odp_caps;
229};
230
231struct ib_uverbs_query_port { 204struct ib_uverbs_query_port {
232 __u64 response; 205 __u64 response;
233 __u8 port_num; 206 __u8 port_num;
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h
index 3387465b9caa..143ca5ffab7a 100644
--- a/include/xen/grant_table.h
+++ b/include/xen/grant_table.h
@@ -45,6 +45,8 @@
45#include <asm/xen/hypervisor.h> 45#include <asm/xen/hypervisor.h>
46 46
47#include <xen/features.h> 47#include <xen/features.h>
48#include <linux/mm_types.h>
49#include <linux/page-flags.h>
48 50
49#define GNTTAB_RESERVED_XENSTORE 1 51#define GNTTAB_RESERVED_XENSTORE 1
50 52
@@ -58,6 +60,22 @@ struct gnttab_free_callback {
58 u16 count; 60 u16 count;
59}; 61};
60 62
63struct gntab_unmap_queue_data;
64
65typedef void (*gnttab_unmap_refs_done)(int result, struct gntab_unmap_queue_data *data);
66
67struct gntab_unmap_queue_data
68{
69 struct delayed_work gnttab_work;
70 void *data;
71 gnttab_unmap_refs_done done;
72 struct gnttab_unmap_grant_ref *unmap_ops;
73 struct gnttab_unmap_grant_ref *kunmap_ops;
74 struct page **pages;
75 unsigned int count;
76 unsigned int age;
77};
78
61int gnttab_init(void); 79int gnttab_init(void);
62int gnttab_suspend(void); 80int gnttab_suspend(void);
63int gnttab_resume(void); 81int gnttab_resume(void);
@@ -163,12 +181,17 @@ void gnttab_free_auto_xlat_frames(void);
163 181
164#define gnttab_map_vaddr(map) ((void *)(map.host_virt_addr)) 182#define gnttab_map_vaddr(map) ((void *)(map.host_virt_addr))
165 183
184int gnttab_alloc_pages(int nr_pages, struct page **pages);
185void gnttab_free_pages(int nr_pages, struct page **pages);
186
166int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, 187int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops,
167 struct gnttab_map_grant_ref *kmap_ops, 188 struct gnttab_map_grant_ref *kmap_ops,
168 struct page **pages, unsigned int count); 189 struct page **pages, unsigned int count);
169int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, 190int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops,
170 struct gnttab_map_grant_ref *kunmap_ops, 191 struct gnttab_unmap_grant_ref *kunmap_ops,
171 struct page **pages, unsigned int count); 192 struct page **pages, unsigned int count);
193void gnttab_unmap_refs_async(struct gntab_unmap_queue_data* item);
194
172 195
173/* Perform a batch of grant map/copy operations. Retry every batch slot 196/* Perform a batch of grant map/copy operations. Retry every batch slot
174 * for which the hypervisor returns GNTST_eagain. This is typically due 197 * for which the hypervisor returns GNTST_eagain. This is typically due
@@ -182,4 +205,22 @@ int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops,
182void gnttab_batch_map(struct gnttab_map_grant_ref *batch, unsigned count); 205void gnttab_batch_map(struct gnttab_map_grant_ref *batch, unsigned count);
183void gnttab_batch_copy(struct gnttab_copy *batch, unsigned count); 206void gnttab_batch_copy(struct gnttab_copy *batch, unsigned count);
184 207
208
209struct xen_page_foreign {
210 domid_t domid;
211 grant_ref_t gref;
212};
213
214static inline struct xen_page_foreign *xen_page_foreign(struct page *page)
215{
216 if (!PageForeign(page))
217 return NULL;
218#if BITS_PER_LONG < 64
219 return (struct xen_page_foreign *)page->private;
220#else
221 BUILD_BUG_ON(sizeof(struct xen_page_foreign) > BITS_PER_LONG);
222 return (struct xen_page_foreign *)&page->private;
223#endif
224}
225
185#endif /* __ASM_GNTTAB_H__ */ 226#endif /* __ASM_GNTTAB_H__ */
diff --git a/include/xen/interface/features.h b/include/xen/interface/features.h
index 131a6ccdba25..6ad3d110bb81 100644
--- a/include/xen/interface/features.h
+++ b/include/xen/interface/features.h
@@ -41,6 +41,12 @@
41/* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */ 41/* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */
42#define XENFEAT_mmu_pt_update_preserve_ad 5 42#define XENFEAT_mmu_pt_update_preserve_ad 5
43 43
44/*
45 * If set, GNTTABOP_map_grant_ref honors flags to be placed into guest kernel
46 * available pte bits.
47 */
48#define XENFEAT_gnttab_map_avail_bits 7
49
44/* x86: Does this Xen host support the HVM callback vector type? */ 50/* x86: Does this Xen host support the HVM callback vector type? */
45#define XENFEAT_hvm_callback_vector 8 51#define XENFEAT_hvm_callback_vector 8
46 52
diff --git a/include/xen/interface/grant_table.h b/include/xen/interface/grant_table.h
index bcce56439d64..56806bc90c2f 100644
--- a/include/xen/interface/grant_table.h
+++ b/include/xen/interface/grant_table.h
@@ -526,6 +526,13 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_cache_flush);
526#define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte) 526#define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte)
527 527
528/* 528/*
529 * Bits to be placed in guest kernel available PTE bits (architecture
530 * dependent; only supported when XENFEAT_gnttab_map_avail_bits is set).
531 */
532#define _GNTMAP_guest_avail0 (16)
533#define GNTMAP_guest_avail_mask ((uint32_t)~0 << _GNTMAP_guest_avail0)
534
535/*
529 * Values for error status returns. All errors are -ve. 536 * Values for error status returns. All errors are -ve.
530 */ 537 */
531#define GNTST_okay (0) /* Normal return. */ 538#define GNTST_okay (0) /* Normal return. */
diff --git a/include/xen/interface/nmi.h b/include/xen/interface/nmi.h
new file mode 100644
index 000000000000..b47d9d06fade
--- /dev/null
+++ b/include/xen/interface/nmi.h
@@ -0,0 +1,51 @@
1/******************************************************************************
2 * nmi.h
3 *
4 * NMI callback registration and reason codes.
5 *
6 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
7 */
8
9#ifndef __XEN_PUBLIC_NMI_H__
10#define __XEN_PUBLIC_NMI_H__
11
12#include <xen/interface/xen.h>
13
14/*
15 * NMI reason codes:
16 * Currently these are x86-specific, stored in arch_shared_info.nmi_reason.
17 */
18 /* I/O-check error reported via ISA port 0x61, bit 6. */
19#define _XEN_NMIREASON_io_error 0
20#define XEN_NMIREASON_io_error (1UL << _XEN_NMIREASON_io_error)
21 /* PCI SERR reported via ISA port 0x61, bit 7. */
22#define _XEN_NMIREASON_pci_serr 1
23#define XEN_NMIREASON_pci_serr (1UL << _XEN_NMIREASON_pci_serr)
24 /* Unknown hardware-generated NMI. */
25#define _XEN_NMIREASON_unknown 2
26#define XEN_NMIREASON_unknown (1UL << _XEN_NMIREASON_unknown)
27
28/*
29 * long nmi_op(unsigned int cmd, void *arg)
30 * NB. All ops return zero on success, else a negative error code.
31 */
32
33/*
34 * Register NMI callback for this (calling) VCPU. Currently this only makes
35 * sense for domain 0, vcpu 0. All other callers will be returned EINVAL.
36 * arg == pointer to xennmi_callback structure.
37 */
38#define XENNMI_register_callback 0
39struct xennmi_callback {
40 unsigned long handler_address;
41 unsigned long pad;
42};
43DEFINE_GUEST_HANDLE_STRUCT(xennmi_callback);
44
45/*
46 * Deregister NMI callback for this (calling) VCPU.
47 * arg == NULL.
48 */
49#define XENNMI_unregister_callback 1
50
51#endif /* __XEN_PUBLIC_NMI_H__ */