aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/platform/aclinux.h2
-rw-r--r--include/drm/drmP.h2
-rw-r--r--include/drm/drm_mode.h1
-rw-r--r--include/drm/i915_drm.h54
-rw-r--r--include/linux/acpi.h6
-rw-r--r--include/linux/blkdev.h9
-rw-r--r--include/linux/decompress/unlzo.h10
-rw-r--r--include/linux/drbd.h2
-rw-r--r--include/linux/drbd_nl.h1
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/genhd.h6
-rw-r--r--include/linux/highmem.h2
-rw-r--r--include/linux/i2c/adp5588.h12
-rw-r--r--include/linux/iocontext.h27
-rw-r--r--include/linux/kernel.h4
-rw-r--r--include/linux/kfifo.h42
-rw-r--r--include/linux/kgdb.h7
-rw-r--r--include/linux/kmemcheck.h110
-rw-r--r--include/linux/kmsg_dump.h1
-rw-r--r--include/linux/libata.h3
-rw-r--r--include/linux/list_sort.h11
-rw-r--r--include/linux/mfd/tmio.h39
-rw-r--r--include/linux/mfd/wm8350/pmic.h28
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/mm_types.h6
-rw-r--r--include/linux/mtd/pismo.h17
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/perf_event.h11
-rw-r--r--include/linux/phy.h2
-rw-r--r--include/linux/poison.h16
-rw-r--r--include/linux/sched.h7
-rw-r--r--include/linux/serio.h19
-rw-r--r--include/linux/string.h5
-rw-r--r--include/linux/topology.h2
-rw-r--r--include/linux/tty.h4
-rw-r--r--include/linux/uaccess.h4
-rw-r--r--include/linux/usb.h1
-rw-r--r--include/net/ip.h16
-rw-r--r--include/net/netns/xfrm.h6
-rw-r--r--include/net/netrom.h2
-rw-r--r--include/net/xfrm.h4
41 files changed, 343 insertions, 162 deletions
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 9d7febde10a1..09469971472f 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -152,7 +152,7 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
152#include <linux/hardirq.h> 152#include <linux/hardirq.h>
153#define ACPI_PREEMPTION_POINT() \ 153#define ACPI_PREEMPTION_POINT() \
154 do { \ 154 do { \
155 if (!in_atomic_preempt_off()) \ 155 if (!in_atomic_preempt_off() && !irqs_disabled()) \
156 cond_resched(); \ 156 cond_resched(); \
157 } while (0) 157 } while (0)
158 158
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 71dafb69cfeb..ffac157fb5b2 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1408,7 +1408,7 @@ extern int drm_ati_pcigart_cleanup(struct drm_device *dev,
1408 struct drm_ati_pcigart_info * gart_info); 1408 struct drm_ati_pcigart_info * gart_info);
1409 1409
1410extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, 1410extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
1411 size_t align, dma_addr_t maxaddr); 1411 size_t align);
1412extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); 1412extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
1413extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); 1413extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah);
1414 1414
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index 43009bc2e757..bc4fdf27bd2e 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -160,6 +160,7 @@ struct drm_mode_get_encoder {
160#define DRM_MODE_CONNECTOR_HDMIA 11 160#define DRM_MODE_CONNECTOR_HDMIA 11
161#define DRM_MODE_CONNECTOR_HDMIB 12 161#define DRM_MODE_CONNECTOR_HDMIB 12
162#define DRM_MODE_CONNECTOR_TV 13 162#define DRM_MODE_CONNECTOR_TV 13
163#define DRM_MODE_CONNECTOR_eDP 14
163 164
164struct drm_mode_get_connector { 165struct drm_mode_get_connector {
165 166
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index ec3f5e80a5df..b64a8d7cdf6d 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -188,6 +188,7 @@ typedef struct _drm_i915_sarea {
188#define DRM_I915_GEM_MADVISE 0x26 188#define DRM_I915_GEM_MADVISE 0x26
189#define DRM_I915_OVERLAY_PUT_IMAGE 0x27 189#define DRM_I915_OVERLAY_PUT_IMAGE 0x27
190#define DRM_I915_OVERLAY_ATTRS 0x28 190#define DRM_I915_OVERLAY_ATTRS 0x28
191#define DRM_I915_GEM_EXECBUFFER2 0x29
191 192
192#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) 193#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
193#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) 194#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -207,6 +208,7 @@ typedef struct _drm_i915_sarea {
207#define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) 208#define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t)
208#define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init) 209#define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init)
209#define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer) 210#define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer)
211#define DRM_IOCTL_I915_GEM_EXECBUFFER2 DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2)
210#define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin) 212#define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin)
211#define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin) 213#define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin)
212#define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy) 214#define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy)
@@ -272,6 +274,7 @@ typedef struct drm_i915_irq_wait {
272#define I915_PARAM_NUM_FENCES_AVAIL 6 274#define I915_PARAM_NUM_FENCES_AVAIL 6
273#define I915_PARAM_HAS_OVERLAY 7 275#define I915_PARAM_HAS_OVERLAY 7
274#define I915_PARAM_HAS_PAGEFLIPPING 8 276#define I915_PARAM_HAS_PAGEFLIPPING 8
277#define I915_PARAM_HAS_EXECBUF2 9
275 278
276typedef struct drm_i915_getparam { 279typedef struct drm_i915_getparam {
277 int param; 280 int param;
@@ -567,6 +570,57 @@ struct drm_i915_gem_execbuffer {
567 __u64 cliprects_ptr; 570 __u64 cliprects_ptr;
568}; 571};
569 572
573struct drm_i915_gem_exec_object2 {
574 /**
575 * User's handle for a buffer to be bound into the GTT for this
576 * operation.
577 */
578 __u32 handle;
579
580 /** Number of relocations to be performed on this buffer */
581 __u32 relocation_count;
582 /**
583 * Pointer to array of struct drm_i915_gem_relocation_entry containing
584 * the relocations to be performed in this buffer.
585 */
586 __u64 relocs_ptr;
587
588 /** Required alignment in graphics aperture */
589 __u64 alignment;
590
591 /**
592 * Returned value of the updated offset of the object, for future
593 * presumed_offset writes.
594 */
595 __u64 offset;
596
597#define EXEC_OBJECT_NEEDS_FENCE (1<<0)
598 __u64 flags;
599 __u64 rsvd1;
600 __u64 rsvd2;
601};
602
603struct drm_i915_gem_execbuffer2 {
604 /**
605 * List of gem_exec_object2 structs
606 */
607 __u64 buffers_ptr;
608 __u32 buffer_count;
609
610 /** Offset in the batchbuffer to start execution from. */
611 __u32 batch_start_offset;
612 /** Bytes used in batchbuffer from batch_start_offset */
613 __u32 batch_len;
614 __u32 DR1;
615 __u32 DR4;
616 __u32 num_cliprects;
617 /** This is a struct drm_clip_rect *cliprects */
618 __u64 cliprects_ptr;
619 __u64 flags; /* currently unused */
620 __u64 rsvd1;
621 __u64 rsvd2;
622};
623
570struct drm_i915_gem_pin { 624struct drm_i915_gem_pin {
571 /** Handle of the buffer to be pinned. */ 625 /** Handle of the buffer to be pinned. */
572 __u32 handle; 626 __u32 handle;
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 36924255c0d5..b926afe8c03e 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -80,7 +80,7 @@ char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
80void __acpi_unmap_table(char *map, unsigned long size); 80void __acpi_unmap_table(char *map, unsigned long size);
81int early_acpi_boot_init(void); 81int early_acpi_boot_init(void);
82int acpi_boot_init (void); 82int acpi_boot_init (void);
83int acpi_boot_table_init (void); 83void acpi_boot_table_init (void);
84int acpi_mps_check (void); 84int acpi_mps_check (void);
85int acpi_numa_init (void); 85int acpi_numa_init (void);
86 86
@@ -321,9 +321,9 @@ static inline int acpi_boot_init(void)
321 return 0; 321 return 0;
322} 322}
323 323
324static inline int acpi_boot_table_init(void) 324static inline void acpi_boot_table_init(void)
325{ 325{
326 return 0; 326 return;
327} 327}
328 328
329static inline int acpi_mps_check(void) 329static inline int acpi_mps_check(void)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 9b98173a8184..5c8018977efa 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -938,6 +938,8 @@ extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt);
938extern void blk_set_default_limits(struct queue_limits *lim); 938extern void blk_set_default_limits(struct queue_limits *lim);
939extern int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, 939extern int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
940 sector_t offset); 940 sector_t offset);
941extern int bdev_stack_limits(struct queue_limits *t, struct block_device *bdev,
942 sector_t offset);
941extern void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, 943extern void disk_stack_limits(struct gendisk *disk, struct block_device *bdev,
942 sector_t offset); 944 sector_t offset);
943extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); 945extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b);
@@ -1148,8 +1150,11 @@ static inline int queue_discard_alignment(struct request_queue *q)
1148static inline int queue_sector_discard_alignment(struct request_queue *q, 1150static inline int queue_sector_discard_alignment(struct request_queue *q,
1149 sector_t sector) 1151 sector_t sector)
1150{ 1152{
1151 return ((sector << 9) - q->limits.discard_alignment) 1153 struct queue_limits *lim = &q->limits;
1152 & (q->limits.discard_granularity - 1); 1154 unsigned int alignment = (sector << 9) & (lim->discard_granularity - 1);
1155
1156 return (lim->discard_granularity + lim->discard_alignment - alignment)
1157 & (lim->discard_granularity - 1);
1153} 1158}
1154 1159
1155static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) 1160static inline unsigned int queue_discard_zeroes_data(struct request_queue *q)
diff --git a/include/linux/decompress/unlzo.h b/include/linux/decompress/unlzo.h
new file mode 100644
index 000000000000..987229752519
--- /dev/null
+++ b/include/linux/decompress/unlzo.h
@@ -0,0 +1,10 @@
1#ifndef DECOMPRESS_UNLZO_H
2#define DECOMPRESS_UNLZO_H
3
4int unlzo(unsigned char *inbuf, int len,
5 int(*fill)(void*, unsigned int),
6 int(*flush)(void*, unsigned int),
7 unsigned char *output,
8 int *pos,
9 void(*error)(char *x));
10#endif
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index e84f4733cb55..78962272338a 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -53,7 +53,7 @@
53 53
54 54
55extern const char *drbd_buildtag(void); 55extern const char *drbd_buildtag(void);
56#define REL_VERSION "8.3.6" 56#define REL_VERSION "8.3.7"
57#define API_VERSION 88 57#define API_VERSION 88
58#define PRO_VERSION_MIN 86 58#define PRO_VERSION_MIN 86
59#define PRO_VERSION_MAX 91 59#define PRO_VERSION_MAX 91
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h
index db5721ad50d1..a4d82f895994 100644
--- a/include/linux/drbd_nl.h
+++ b/include/linux/drbd_nl.h
@@ -69,6 +69,7 @@ NL_PACKET(disconnect, 6, )
69 69
70NL_PACKET(resize, 7, 70NL_PACKET(resize, 7,
71 NL_INT64( 29, T_MAY_IGNORE, resize_size) 71 NL_INT64( 29, T_MAY_IGNORE, resize_size)
72 NL_BIT( 68, T_MAY_IGNORE, resize_force)
72) 73)
73 74
74NL_PACKET(syncer_conf, 8, 75NL_PACKET(syncer_conf, 8,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9147ca88f253..b1bcb275b596 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2463,7 +2463,7 @@ int proc_nr_files(struct ctl_table *table, int write,
2463 2463
2464int __init get_filesystem_list(char *buf); 2464int __init get_filesystem_list(char *buf);
2465 2465
2466#define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE]) 2466#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
2467#define OPEN_FMODE(flag) ((__force fmode_t)((flag + 1) & O_ACCMODE)) 2467#define OPEN_FMODE(flag) ((__force fmode_t)((flag + 1) & O_ACCMODE))
2468 2468
2469#endif /* __KERNEL__ */ 2469#endif /* __KERNEL__ */
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index c6c0c41af35f..9717081c75ad 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -256,9 +256,9 @@ extern struct hd_struct *disk_map_sector_rcu(struct gendisk *disk,
256#define part_stat_read(part, field) \ 256#define part_stat_read(part, field) \
257({ \ 257({ \
258 typeof((part)->dkstats->field) res = 0; \ 258 typeof((part)->dkstats->field) res = 0; \
259 int i; \ 259 unsigned int _cpu; \
260 for_each_possible_cpu(i) \ 260 for_each_possible_cpu(_cpu) \
261 res += per_cpu_ptr((part)->dkstats, i)->field; \ 261 res += per_cpu_ptr((part)->dkstats, _cpu)->field; \
262 res; \ 262 res; \
263}) 263})
264 264
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 211ff4497269..ab2cc20e21a5 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -46,7 +46,7 @@ void kmap_flush_unused(void);
46 46
47static inline unsigned int nr_free_highpages(void) { return 0; } 47static inline unsigned int nr_free_highpages(void) { return 0; }
48 48
49#define totalhigh_pages 0 49#define totalhigh_pages 0UL
50 50
51#ifndef ARCH_HAS_KMAP 51#ifndef ARCH_HAS_KMAP
52static inline void *kmap(struct page *page) 52static inline void *kmap(struct page *page)
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h
index fc5db826b48e..02c9af374741 100644
--- a/include/linux/i2c/adp5588.h
+++ b/include/linux/i2c/adp5588.h
@@ -89,4 +89,16 @@ struct adp5588_kpad_platform_data {
89 unsigned short unlock_key2; /* Unlock Key 2 */ 89 unsigned short unlock_key2; /* Unlock Key 2 */
90}; 90};
91 91
92struct adp5588_gpio_platform_data {
93 unsigned gpio_start; /* GPIO Chip base # */
94 unsigned pullup_dis_mask; /* Pull-Up Disable Mask */
95 int (*setup)(struct i2c_client *client,
96 int gpio, unsigned ngpio,
97 void *context);
98 int (*teardown)(struct i2c_client *client,
99 int gpio, unsigned ngpio,
100 void *context);
101 void *context;
102};
103
92#endif 104#endif
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
index a63235996309..78ef023227d4 100644
--- a/include/linux/iocontext.h
+++ b/include/linux/iocontext.h
@@ -4,32 +4,6 @@
4#include <linux/radix-tree.h> 4#include <linux/radix-tree.h>
5#include <linux/rcupdate.h> 5#include <linux/rcupdate.h>
6 6
7/*
8 * This is the per-process anticipatory I/O scheduler state.
9 */
10struct as_io_context {
11 spinlock_t lock;
12
13 void (*dtor)(struct as_io_context *aic); /* destructor */
14 void (*exit)(struct as_io_context *aic); /* called on task exit */
15
16 unsigned long state;
17 atomic_t nr_queued; /* queued reads & sync writes */
18 atomic_t nr_dispatched; /* number of requests gone to the drivers */
19
20 /* IO History tracking */
21 /* Thinktime */
22 unsigned long last_end_request;
23 unsigned long ttime_total;
24 unsigned long ttime_samples;
25 unsigned long ttime_mean;
26 /* Layout pattern */
27 unsigned int seek_samples;
28 sector_t last_request_pos;
29 u64 seek_total;
30 sector_t seek_mean;
31};
32
33struct cfq_queue; 7struct cfq_queue;
34struct cfq_io_context { 8struct cfq_io_context {
35 void *key; 9 void *key;
@@ -78,7 +52,6 @@ struct io_context {
78 unsigned long last_waited; /* Time last woken after wait for request */ 52 unsigned long last_waited; /* Time last woken after wait for request */
79 int nr_batch_requests; /* Number of requests left in the batch */ 53 int nr_batch_requests; /* Number of requests left in the batch */
80 54
81 struct as_io_context *aic;
82 struct radix_tree_root radix_root; 55 struct radix_tree_root radix_root;
83 struct hlist_head cic_list; 56 struct hlist_head cic_list;
84 void *ioc_data; 57 void *ioc_data;
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 3fc9f5aab5f8..328bca609b9b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -734,6 +734,10 @@ struct sysinfo {
734/* Force a compilation error if condition is constant and true */ 734/* Force a compilation error if condition is constant and true */
735#define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) 735#define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)]))
736 736
737/* Force a compilation error if a constant expression is not a power of 2 */
738#define BUILD_BUG_ON_NOT_POWER_OF_2(n) \
739 BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0))
740
737/* Force a compilation error if condition is true, but also produce a 741/* Force a compilation error if condition is true, but also produce a
738 result (of value 0 and type size_t), so the expression can be used 742 result (of value 0 and type size_t), so the expression can be used
739 e.g. in a structure initializer (or where-ever else comma expressions 743 e.g. in a structure initializer (or where-ever else comma expressions
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 7c6b32a1421c..6f6c5f300af6 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -67,7 +67,7 @@ struct kfifo {
67/** 67/**
68 * DECLARE_KFIFO - macro to declare a kfifo and the associated buffer 68 * DECLARE_KFIFO - macro to declare a kfifo and the associated buffer
69 * @name: name of the declared kfifo datatype 69 * @name: name of the declared kfifo datatype
70 * @size: size of the fifo buffer 70 * @size: size of the fifo buffer. Must be a power of two.
71 * 71 *
72 * Note1: the macro can be used inside struct or union declaration 72 * Note1: the macro can be used inside struct or union declaration
73 * Note2: the macro creates two objects: 73 * Note2: the macro creates two objects:
@@ -91,7 +91,7 @@ union { \
91/** 91/**
92 * DEFINE_KFIFO - macro to define and initialize a kfifo 92 * DEFINE_KFIFO - macro to define and initialize a kfifo
93 * @name: name of the declared kfifo datatype 93 * @name: name of the declared kfifo datatype
94 * @size: size of the fifo buffer 94 * @size: size of the fifo buffer. Must be a power of two.
95 * 95 *
96 * Note1: the macro can be used for global and local kfifo data type variables 96 * Note1: the macro can be used for global and local kfifo data type variables
97 * Note2: the macro creates two objects: 97 * Note2: the macro creates two objects:
@@ -104,15 +104,28 @@ union { \
104 104
105#undef __kfifo_initializer 105#undef __kfifo_initializer
106 106
107extern void kfifo_init(struct kfifo *fifo, unsigned char *buffer, 107extern void kfifo_init(struct kfifo *fifo, void *buffer,
108 unsigned int size); 108 unsigned int size);
109extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, 109extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size,
110 gfp_t gfp_mask); 110 gfp_t gfp_mask);
111extern void kfifo_free(struct kfifo *fifo); 111extern void kfifo_free(struct kfifo *fifo);
112extern unsigned int kfifo_in(struct kfifo *fifo, 112extern unsigned int kfifo_in(struct kfifo *fifo,
113 const unsigned char *from, unsigned int len); 113 const void *from, unsigned int len);
114extern __must_check unsigned int kfifo_out(struct kfifo *fifo, 114extern __must_check unsigned int kfifo_out(struct kfifo *fifo,
115 unsigned char *to, unsigned int len); 115 void *to, unsigned int len);
116extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo,
117 void *to, unsigned int len, unsigned offset);
118
119/**
120 * kfifo_initialized - Check if kfifo is initialized.
121 * @fifo: fifo to check
122 * Return %true if FIFO is initialized, otherwise %false.
123 * Assumes the fifo was 0 before.
124 */
125static inline bool kfifo_initialized(struct kfifo *fifo)
126{
127 return fifo->buffer != 0;
128}
116 129
117/** 130/**
118 * kfifo_reset - removes the entire FIFO contents 131 * kfifo_reset - removes the entire FIFO contents
@@ -194,7 +207,7 @@ static inline __must_check unsigned int kfifo_avail(struct kfifo *fifo)
194 * bytes copied. 207 * bytes copied.
195 */ 208 */
196static inline unsigned int kfifo_in_locked(struct kfifo *fifo, 209static inline unsigned int kfifo_in_locked(struct kfifo *fifo,
197 const unsigned char *from, unsigned int n, spinlock_t *lock) 210 const void *from, unsigned int n, spinlock_t *lock)
198{ 211{
199 unsigned long flags; 212 unsigned long flags;
200 unsigned int ret; 213 unsigned int ret;
@@ -219,7 +232,7 @@ static inline unsigned int kfifo_in_locked(struct kfifo *fifo,
219 * @to buffer and returns the number of copied bytes. 232 * @to buffer and returns the number of copied bytes.
220 */ 233 */
221static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo, 234static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo,
222 unsigned char *to, unsigned int n, spinlock_t *lock) 235 void *to, unsigned int n, spinlock_t *lock)
223{ 236{
224 unsigned long flags; 237 unsigned long flags;
225 unsigned int ret; 238 unsigned int ret;
@@ -228,13 +241,6 @@ static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo,
228 241
229 ret = kfifo_out(fifo, to, n); 242 ret = kfifo_out(fifo, to, n);
230 243
231 /*
232 * optimization: if the FIFO is empty, set the indices to 0
233 * so we don't wrap the next time
234 */
235 if (kfifo_is_empty(fifo))
236 kfifo_reset(fifo);
237
238 spin_unlock_irqrestore(lock, flags); 244 spin_unlock_irqrestore(lock, flags);
239 245
240 return ret; 246 return ret;
@@ -242,11 +248,11 @@ static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo,
242 248
243extern void kfifo_skip(struct kfifo *fifo, unsigned int len); 249extern void kfifo_skip(struct kfifo *fifo, unsigned int len);
244 250
245extern __must_check unsigned int kfifo_from_user(struct kfifo *fifo, 251extern __must_check int kfifo_from_user(struct kfifo *fifo,
246 const void __user *from, unsigned int n); 252 const void __user *from, unsigned int n, unsigned *lenout);
247 253
248extern __must_check unsigned int kfifo_to_user(struct kfifo *fifo, 254extern __must_check int kfifo_to_user(struct kfifo *fifo,
249 void __user *to, unsigned int n); 255 void __user *to, unsigned int n, unsigned *lenout);
250 256
251/* 257/*
252 * __kfifo_add_out internal helper function for updating the out offset 258 * __kfifo_add_out internal helper function for updating the out offset
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 6adcc297e354..19ec41a183f5 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -29,8 +29,7 @@ struct pt_regs;
29 * 29 *
30 * On some architectures it is required to skip a breakpoint 30 * On some architectures it is required to skip a breakpoint
31 * exception when it occurs after a breakpoint has been removed. 31 * exception when it occurs after a breakpoint has been removed.
32 * This can be implemented in the architecture specific portion of 32 * This can be implemented in the architecture specific portion of kgdb.
33 * for kgdb.
34 */ 33 */
35extern int kgdb_skipexception(int exception, struct pt_regs *regs); 34extern int kgdb_skipexception(int exception, struct pt_regs *regs);
36 35
@@ -65,7 +64,7 @@ struct uart_port;
65/** 64/**
66 * kgdb_breakpoint - compiled in breakpoint 65 * kgdb_breakpoint - compiled in breakpoint
67 * 66 *
68 * This will be impelmented a static inline per architecture. This 67 * This will be implemented as a static inline per architecture. This
69 * function is called by the kgdb core to execute an architecture 68 * function is called by the kgdb core to execute an architecture
70 * specific trap to cause kgdb to enter the exception processing. 69 * specific trap to cause kgdb to enter the exception processing.
71 * 70 *
@@ -190,7 +189,7 @@ kgdb_arch_handle_exception(int vector, int signo, int err_code,
190 * @flags: Current IRQ state 189 * @flags: Current IRQ state
191 * 190 *
192 * On SMP systems, we need to get the attention of the other CPUs 191 * On SMP systems, we need to get the attention of the other CPUs
193 * and get them be in a known state. This should do what is needed 192 * and get them into a known state. This should do what is needed
194 * to get the other CPUs to call kgdb_wait(). Note that on some arches, 193 * to get the other CPUs to call kgdb_wait(). Note that on some arches,
195 * the NMI approach is not used for rounding up all the CPUs. For example, 194 * the NMI approach is not used for rounding up all the CPUs. For example,
196 * in case of MIPS, smp_call_function() is used to roundup CPUs. In 195 * in case of MIPS, smp_call_function() is used to roundup CPUs. In
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h
index e880d4cf9e22..08d7dc4ddf40 100644
--- a/include/linux/kmemcheck.h
+++ b/include/linux/kmemcheck.h
@@ -36,6 +36,56 @@ int kmemcheck_hide_addr(unsigned long address);
36 36
37bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size); 37bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size);
38 38
39/*
40 * Bitfield annotations
41 *
42 * How to use: If you have a struct using bitfields, for example
43 *
44 * struct a {
45 * int x:8, y:8;
46 * };
47 *
48 * then this should be rewritten as
49 *
50 * struct a {
51 * kmemcheck_bitfield_begin(flags);
52 * int x:8, y:8;
53 * kmemcheck_bitfield_end(flags);
54 * };
55 *
56 * Now the "flags_begin" and "flags_end" members may be used to refer to the
57 * beginning and end, respectively, of the bitfield (and things like
58 * &x.flags_begin is allowed). As soon as the struct is allocated, the bit-
59 * fields should be annotated:
60 *
61 * struct a *a = kmalloc(sizeof(struct a), GFP_KERNEL);
62 * kmemcheck_annotate_bitfield(a, flags);
63 */
64#define kmemcheck_bitfield_begin(name) \
65 int name##_begin[0];
66
67#define kmemcheck_bitfield_end(name) \
68 int name##_end[0];
69
70#define kmemcheck_annotate_bitfield(ptr, name) \
71 do { \
72 int _n; \
73 \
74 if (!ptr) \
75 break; \
76 \
77 _n = (long) &((ptr)->name##_end) \
78 - (long) &((ptr)->name##_begin); \
79 MAYBE_BUILD_BUG_ON(_n < 0); \
80 \
81 kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \
82 } while (0)
83
84#define kmemcheck_annotate_variable(var) \
85 do { \
86 kmemcheck_mark_initialized(&(var), sizeof(var)); \
87 } while (0) \
88
39#else 89#else
40#define kmemcheck_enabled 0 90#define kmemcheck_enabled 0
41 91
@@ -106,60 +156,16 @@ static inline bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size)
106 return true; 156 return true;
107} 157}
108 158
109#endif /* CONFIG_KMEMCHECK */ 159#define kmemcheck_bitfield_begin(name)
110 160#define kmemcheck_bitfield_end(name)
111/* 161#define kmemcheck_annotate_bitfield(ptr, name) \
112 * Bitfield annotations 162 do { \
113 * 163 } while (0)
114 * How to use: If you have a struct using bitfields, for example
115 *
116 * struct a {
117 * int x:8, y:8;
118 * };
119 *
120 * then this should be rewritten as
121 *
122 * struct a {
123 * kmemcheck_bitfield_begin(flags);
124 * int x:8, y:8;
125 * kmemcheck_bitfield_end(flags);
126 * };
127 *
128 * Now the "flags_begin" and "flags_end" members may be used to refer to the
129 * beginning and end, respectively, of the bitfield (and things like
130 * &x.flags_begin is allowed). As soon as the struct is allocated, the bit-
131 * fields should be annotated:
132 *
133 * struct a *a = kmalloc(sizeof(struct a), GFP_KERNEL);
134 * kmemcheck_annotate_bitfield(a, flags);
135 *
136 * Note: We provide the same definitions for both kmemcheck and non-
137 * kmemcheck kernels. This makes it harder to introduce accidental errors. It
138 * is also allowed to pass NULL pointers to kmemcheck_annotate_bitfield().
139 */
140#define kmemcheck_bitfield_begin(name) \
141 int name##_begin[0];
142
143#define kmemcheck_bitfield_end(name) \
144 int name##_end[0];
145 164
146#define kmemcheck_annotate_bitfield(ptr, name) \ 165#define kmemcheck_annotate_variable(var) \
147 do { \ 166 do { \
148 int _n; \
149 \
150 if (!ptr) \
151 break; \
152 \
153 _n = (long) &((ptr)->name##_end) \
154 - (long) &((ptr)->name##_begin); \
155 MAYBE_BUILD_BUG_ON(_n < 0); \
156 \
157 kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \
158 } while (0) 167 } while (0)
159 168
160#define kmemcheck_annotate_variable(var) \ 169#endif /* CONFIG_KMEMCHECK */
161 do { \
162 kmemcheck_mark_initialized(&(var), sizeof(var)); \
163 } while (0) \
164 170
165#endif /* LINUX_KMEMCHECK_H */ 171#endif /* LINUX_KMEMCHECK_H */
diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h
index e32aa268efac..24b44145a886 100644
--- a/include/linux/kmsg_dump.h
+++ b/include/linux/kmsg_dump.h
@@ -17,6 +17,7 @@
17enum kmsg_dump_reason { 17enum kmsg_dump_reason {
18 KMSG_DUMP_OOPS, 18 KMSG_DUMP_OOPS,
19 KMSG_DUMP_PANIC, 19 KMSG_DUMP_PANIC,
20 KMSG_DUMP_KEXEC,
20}; 21};
21 22
22/** 23/**
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 6a9c4ddd3d95..73112250862c 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -354,6 +354,9 @@ enum {
354 /* max tries if error condition is still set after ->error_handler */ 354 /* max tries if error condition is still set after ->error_handler */
355 ATA_EH_MAX_TRIES = 5, 355 ATA_EH_MAX_TRIES = 5,
356 356
357 /* sometimes resuming a link requires several retries */
358 ATA_LINK_RESUME_TRIES = 5,
359
357 /* how hard are we gonna try to probe/recover devices */ 360 /* how hard are we gonna try to probe/recover devices */
358 ATA_PROBE_MAX_TRIES = 3, 361 ATA_PROBE_MAX_TRIES = 3,
359 ATA_EH_DEV_TRIES = 3, 362 ATA_EH_DEV_TRIES = 3,
diff --git a/include/linux/list_sort.h b/include/linux/list_sort.h
new file mode 100644
index 000000000000..1a2df2efb771
--- /dev/null
+++ b/include/linux/list_sort.h
@@ -0,0 +1,11 @@
1#ifndef _LINUX_LIST_SORT_H
2#define _LINUX_LIST_SORT_H
3
4#include <linux/types.h>
5
6struct list_head;
7
8void list_sort(void *priv, struct list_head *head,
9 int (*cmp)(void *priv, struct list_head *a,
10 struct list_head *b));
11#endif
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 6b9c5d06690c..9cb1834deffa 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -2,6 +2,8 @@
2#define MFD_TMIO_H 2#define MFD_TMIO_H
3 3
4#include <linux/fb.h> 4#include <linux/fb.h>
5#include <linux/io.h>
6#include <linux/platform_device.h>
5 7
6#define tmio_ioread8(addr) readb(addr) 8#define tmio_ioread8(addr) readb(addr)
7#define tmio_ioread16(addr) readw(addr) 9#define tmio_ioread16(addr) readw(addr)
@@ -18,11 +20,48 @@
18 writew((val) >> 16, (addr) + 2); \ 20 writew((val) >> 16, (addr) + 2); \
19 } while (0) 21 } while (0)
20 22
23#define CNF_CMD 0x04
24#define CNF_CTL_BASE 0x10
25#define CNF_INT_PIN 0x3d
26#define CNF_STOP_CLK_CTL 0x40
27#define CNF_GCLK_CTL 0x41
28#define CNF_SD_CLK_MODE 0x42
29#define CNF_PIN_STATUS 0x44
30#define CNF_PWR_CTL_1 0x48
31#define CNF_PWR_CTL_2 0x49
32#define CNF_PWR_CTL_3 0x4a
33#define CNF_CARD_DETECT_MODE 0x4c
34#define CNF_SD_SLOT 0x50
35#define CNF_EXT_GCLK_CTL_1 0xf0
36#define CNF_EXT_GCLK_CTL_2 0xf1
37#define CNF_EXT_GCLK_CTL_3 0xf9
38#define CNF_SD_LED_EN_1 0xfa
39#define CNF_SD_LED_EN_2 0xfe
40
41#define SDCREN 0x2 /* Enable access to MMC CTL regs. (flag in COMMAND_REG)*/
42
43#define sd_config_write8(base, shift, reg, val) \
44 tmio_iowrite8((val), (base) + ((reg) << (shift)))
45#define sd_config_write16(base, shift, reg, val) \
46 tmio_iowrite16((val), (base) + ((reg) << (shift)))
47#define sd_config_write32(base, shift, reg, val) \
48 do { \
49 tmio_iowrite16((val), (base) + ((reg) << (shift))); \
50 tmio_iowrite16((val) >> 16, (base) + ((reg + 2) << (shift))); \
51 } while (0)
52
53int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
54int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base);
55void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state);
56void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state);
57
21/* 58/*
22 * data for the MMC controller 59 * data for the MMC controller
23 */ 60 */
24struct tmio_mmc_data { 61struct tmio_mmc_data {
25 const unsigned int hclk; 62 const unsigned int hclk;
63 void (*set_pwr)(struct platform_device *host, int state);
64 void (*set_clk_div)(struct platform_device *host, int state);
26}; 65};
27 66
28/* 67/*
diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h
index be3264e286e0..e786fe9841ef 100644
--- a/include/linux/mfd/wm8350/pmic.h
+++ b/include/linux/mfd/wm8350/pmic.h
@@ -666,20 +666,20 @@
666#define WM8350_ISINK_FLASH_DUR_64MS (1 << 8) 666#define WM8350_ISINK_FLASH_DUR_64MS (1 << 8)
667#define WM8350_ISINK_FLASH_DUR_96MS (2 << 8) 667#define WM8350_ISINK_FLASH_DUR_96MS (2 << 8)
668#define WM8350_ISINK_FLASH_DUR_1024MS (3 << 8) 668#define WM8350_ISINK_FLASH_DUR_1024MS (3 << 8)
669#define WM8350_ISINK_FLASH_ON_INSTANT (0 << 4) 669#define WM8350_ISINK_FLASH_ON_INSTANT (0 << 0)
670#define WM8350_ISINK_FLASH_ON_0_25S (1 << 4) 670#define WM8350_ISINK_FLASH_ON_0_25S (1 << 0)
671#define WM8350_ISINK_FLASH_ON_0_50S (2 << 4) 671#define WM8350_ISINK_FLASH_ON_0_50S (2 << 0)
672#define WM8350_ISINK_FLASH_ON_1_00S (3 << 4) 672#define WM8350_ISINK_FLASH_ON_1_00S (3 << 0)
673#define WM8350_ISINK_FLASH_ON_1_95S (1 << 4) 673#define WM8350_ISINK_FLASH_ON_1_95S (1 << 0)
674#define WM8350_ISINK_FLASH_ON_3_91S (2 << 4) 674#define WM8350_ISINK_FLASH_ON_3_91S (2 << 0)
675#define WM8350_ISINK_FLASH_ON_7_80S (3 << 4) 675#define WM8350_ISINK_FLASH_ON_7_80S (3 << 0)
676#define WM8350_ISINK_FLASH_OFF_INSTANT (0 << 0) 676#define WM8350_ISINK_FLASH_OFF_INSTANT (0 << 4)
677#define WM8350_ISINK_FLASH_OFF_0_25S (1 << 0) 677#define WM8350_ISINK_FLASH_OFF_0_25S (1 << 4)
678#define WM8350_ISINK_FLASH_OFF_0_50S (2 << 0) 678#define WM8350_ISINK_FLASH_OFF_0_50S (2 << 4)
679#define WM8350_ISINK_FLASH_OFF_1_00S (3 << 0) 679#define WM8350_ISINK_FLASH_OFF_1_00S (3 << 4)
680#define WM8350_ISINK_FLASH_OFF_1_95S (1 << 0) 680#define WM8350_ISINK_FLASH_OFF_1_95S (1 << 4)
681#define WM8350_ISINK_FLASH_OFF_3_91S (2 << 0) 681#define WM8350_ISINK_FLASH_OFF_3_91S (2 << 4)
682#define WM8350_ISINK_FLASH_OFF_7_80S (3 << 0) 682#define WM8350_ISINK_FLASH_OFF_7_80S (3 << 4)
683 683
684/* 684/*
685 * Regulator Interrupts. 685 * Regulator Interrupts.
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 2265f28eb47a..60c467bfbabd 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1089,6 +1089,7 @@ extern void zone_pcp_update(struct zone *zone);
1089 1089
1090/* nommu.c */ 1090/* nommu.c */
1091extern atomic_long_t mmap_pages_allocated; 1091extern atomic_long_t mmap_pages_allocated;
1092extern int nommu_shrink_inode_mappings(struct inode *, size_t, size_t);
1092 1093
1093/* prio_tree.c */ 1094/* prio_tree.c */
1094void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); 1095void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 84a524afb3dc..36f96271306c 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -122,7 +122,9 @@ struct vm_region {
122 unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ 122 unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
123 struct file *vm_file; /* the backing file or NULL */ 123 struct file *vm_file; /* the backing file or NULL */
124 124
125 atomic_t vm_usage; /* region usage count */ 125 int vm_usage; /* region usage count (access under nommu_region_sem) */
126 bool vm_icache_flushed : 1; /* true if the icache has been flushed for
127 * this region */
126}; 128};
127 129
128/* 130/*
@@ -203,10 +205,12 @@ struct mm_struct {
203 struct vm_area_struct * mmap; /* list of VMAs */ 205 struct vm_area_struct * mmap; /* list of VMAs */
204 struct rb_root mm_rb; 206 struct rb_root mm_rb;
205 struct vm_area_struct * mmap_cache; /* last find_vma result */ 207 struct vm_area_struct * mmap_cache; /* last find_vma result */
208#ifdef CONFIG_MMU
206 unsigned long (*get_unmapped_area) (struct file *filp, 209 unsigned long (*get_unmapped_area) (struct file *filp,
207 unsigned long addr, unsigned long len, 210 unsigned long addr, unsigned long len,
208 unsigned long pgoff, unsigned long flags); 211 unsigned long pgoff, unsigned long flags);
209 void (*unmap_area) (struct mm_struct *mm, unsigned long addr); 212 void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
213#endif
210 unsigned long mmap_base; /* base of mmap area */ 214 unsigned long mmap_base; /* base of mmap area */
211 unsigned long task_size; /* size of task vm space */ 215 unsigned long task_size; /* size of task vm space */
212 unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ 216 unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */
diff --git a/include/linux/mtd/pismo.h b/include/linux/mtd/pismo.h
new file mode 100644
index 000000000000..8dfb7e1421c5
--- /dev/null
+++ b/include/linux/mtd/pismo.h
@@ -0,0 +1,17 @@
1/*
2 * PISMO memory driver - http://www.pismoworld.org/
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License.
7 */
8#ifndef __LINUX_MTD_PISMO_H
9#define __LINUX_MTD_PISMO_H
10
11struct pismo_pdata {
12 void (*set_vpp)(void *, int);
13 void *vpp_data;
14 phys_addr_t cs_addrs[5];
15};
16
17#endif
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 5da0690d9cee..174e5392e51e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -243,6 +243,7 @@ struct pci_dev {
243 unsigned int d2_support:1; /* Low power state D2 is supported */ 243 unsigned int d2_support:1; /* Low power state D2 is supported */
244 unsigned int no_d1d2:1; /* Only allow D0 and D3 */ 244 unsigned int no_d1d2:1; /* Only allow D0 and D3 */
245 unsigned int wakeup_prepared:1; 245 unsigned int wakeup_prepared:1;
246 unsigned int d3_delay; /* D3->D0 transition time in ms */
246 247
247#ifdef CONFIG_PCIEASPM 248#ifdef CONFIG_PCIEASPM
248 struct pcie_link_state *link_state; /* ASPM link state. */ 249 struct pcie_link_state *link_state; /* ASPM link state. */
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index c66b34f75eea..8fa71874113f 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -814,9 +814,14 @@ extern int perf_event_overflow(struct perf_event *event, int nmi,
814 */ 814 */
815static inline int is_software_event(struct perf_event *event) 815static inline int is_software_event(struct perf_event *event)
816{ 816{
817 return (event->attr.type != PERF_TYPE_RAW) && 817 switch (event->attr.type) {
818 (event->attr.type != PERF_TYPE_HARDWARE) && 818 case PERF_TYPE_SOFTWARE:
819 (event->attr.type != PERF_TYPE_HW_CACHE); 819 case PERF_TYPE_TRACEPOINT:
820 /* for now the breakpoint stuff also works as software event */
821 case PERF_TYPE_BREAKPOINT:
822 return 1;
823 }
824 return 0;
820} 825}
821 826
822extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; 827extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX];
diff --git a/include/linux/phy.h b/include/linux/phy.h
index b1368b8f6572..6a7eb402165d 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -447,6 +447,7 @@ struct phy_device* get_phy_device(struct mii_bus *bus, int addr);
447int phy_device_register(struct phy_device *phy); 447int phy_device_register(struct phy_device *phy);
448int phy_clear_interrupt(struct phy_device *phydev); 448int phy_clear_interrupt(struct phy_device *phydev);
449int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); 449int phy_config_interrupt(struct phy_device *phydev, u32 interrupts);
450int phy_init_hw(struct phy_device *phydev);
450int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, 451int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
451 u32 flags, phy_interface_t interface); 452 u32 flags, phy_interface_t interface);
452struct phy_device * phy_attach(struct net_device *dev, 453struct phy_device * phy_attach(struct net_device *dev,
@@ -484,6 +485,7 @@ void phy_driver_unregister(struct phy_driver *drv);
484int phy_driver_register(struct phy_driver *new_driver); 485int phy_driver_register(struct phy_driver *new_driver);
485void phy_prepare_link(struct phy_device *phydev, 486void phy_prepare_link(struct phy_device *phydev,
486 void (*adjust_link)(struct net_device *)); 487 void (*adjust_link)(struct net_device *));
488void phy_state_machine(struct work_struct *work);
487void phy_start_machine(struct phy_device *phydev, 489void phy_start_machine(struct phy_device *phydev,
488 void (*handler)(struct net_device *)); 490 void (*handler)(struct net_device *));
489void phy_stop_machine(struct phy_device *phydev); 491void phy_stop_machine(struct phy_device *phydev);
diff --git a/include/linux/poison.h b/include/linux/poison.h
index 7fc194aef8c2..2110a81c5e2a 100644
--- a/include/linux/poison.h
+++ b/include/linux/poison.h
@@ -2,13 +2,25 @@
2#define _LINUX_POISON_H 2#define _LINUX_POISON_H
3 3
4/********** include/linux/list.h **********/ 4/********** include/linux/list.h **********/
5
6/*
7 * Architectures might want to move the poison pointer offset
8 * into some well-recognized area such as 0xdead000000000000,
9 * that is also not mappable by user-space exploits:
10 */
11#ifdef CONFIG_ILLEGAL_POINTER_VALUE
12# define POISON_POINTER_DELTA _AC(CONFIG_ILLEGAL_POINTER_VALUE, UL)
13#else
14# define POISON_POINTER_DELTA 0
15#endif
16
5/* 17/*
6 * These are non-NULL pointers that will result in page faults 18 * These are non-NULL pointers that will result in page faults
7 * under normal circumstances, used to verify that nobody uses 19 * under normal circumstances, used to verify that nobody uses
8 * non-initialized list entries. 20 * non-initialized list entries.
9 */ 21 */
10#define LIST_POISON1 ((void *) 0x00100100) 22#define LIST_POISON1 ((void *) 0x00100100 + POISON_POINTER_DELTA)
11#define LIST_POISON2 ((void *) 0x00200200) 23#define LIST_POISON2 ((void *) 0x00200200 + POISON_POINTER_DELTA)
12 24
13/********** include/linux/timer.h **********/ 25/********** include/linux/timer.h **********/
14/* 26/*
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8d4991be9d53..6f7bba93929b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -377,6 +377,8 @@ extern int sysctl_max_map_count;
377 377
378#include <linux/aio.h> 378#include <linux/aio.h>
379 379
380#ifdef CONFIG_MMU
381extern void arch_pick_mmap_layout(struct mm_struct *mm);
380extern unsigned long 382extern unsigned long
381arch_get_unmapped_area(struct file *, unsigned long, unsigned long, 383arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
382 unsigned long, unsigned long); 384 unsigned long, unsigned long);
@@ -386,6 +388,9 @@ arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
386 unsigned long flags); 388 unsigned long flags);
387extern void arch_unmap_area(struct mm_struct *, unsigned long); 389extern void arch_unmap_area(struct mm_struct *, unsigned long);
388extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); 390extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
391#else
392static inline void arch_pick_mmap_layout(struct mm_struct *mm) {}
393#endif
389 394
390#if USE_SPLIT_PTLOCKS 395#if USE_SPLIT_PTLOCKS
391/* 396/*
@@ -2491,8 +2496,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
2491 2496
2492#endif /* CONFIG_SMP */ 2497#endif /* CONFIG_SMP */
2493 2498
2494extern void arch_pick_mmap_layout(struct mm_struct *mm);
2495
2496#ifdef CONFIG_TRACING 2499#ifdef CONFIG_TRACING
2497extern void 2500extern void
2498__trace_special(void *__tr, void *__data, 2501__trace_special(void *__tr, void *__data,
diff --git a/include/linux/serio.h b/include/linux/serio.h
index e2f3044d4a4a..813d26c247ec 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -136,25 +136,6 @@ static inline void serio_continue_rx(struct serio *serio)
136 spin_unlock_irq(&serio->lock); 136 spin_unlock_irq(&serio->lock);
137} 137}
138 138
139/*
140 * Use the following functions to pin serio's driver in process context
141 */
142static inline int serio_pin_driver(struct serio *serio)
143{
144 return mutex_lock_interruptible(&serio->drv_mutex);
145}
146
147static inline void serio_pin_driver_uninterruptible(struct serio *serio)
148{
149 mutex_lock(&serio->drv_mutex);
150}
151
152static inline void serio_unpin_driver(struct serio *serio)
153{
154 mutex_unlock(&serio->drv_mutex);
155}
156
157
158#endif 139#endif
159 140
160/* 141/*
diff --git a/include/linux/string.h b/include/linux/string.h
index 651839a2a755..a716ee2a8adb 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -72,7 +72,10 @@ static inline __must_check char *strstrip(char *str)
72} 72}
73 73
74#ifndef __HAVE_ARCH_STRSTR 74#ifndef __HAVE_ARCH_STRSTR
75extern char * strstr(const char *,const char *); 75extern char * strstr(const char *, const char *);
76#endif
77#ifndef __HAVE_ARCH_STRNSTR
78extern char * strnstr(const char *, const char *, size_t);
76#endif 79#endif
77#ifndef __HAVE_ARCH_STRLEN 80#ifndef __HAVE_ARCH_STRLEN
78extern __kernel_size_t strlen(const char *); 81extern __kernel_size_t strlen(const char *);
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 57e63579bfdd..5b81156780b1 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -99,7 +99,7 @@ int arch_update_cpu_topology(void);
99 | 1*SD_WAKE_AFFINE \ 99 | 1*SD_WAKE_AFFINE \
100 | 1*SD_SHARE_CPUPOWER \ 100 | 1*SD_SHARE_CPUPOWER \
101 | 0*SD_POWERSAVINGS_BALANCE \ 101 | 0*SD_POWERSAVINGS_BALANCE \
102 | 0*SD_SHARE_PKG_RESOURCES \ 102 | 1*SD_SHARE_PKG_RESOURCES \
103 | 0*SD_SERIALIZE \ 103 | 0*SD_SERIALIZE \
104 | 0*SD_PREFER_SIBLING \ 104 | 0*SD_PREFER_SIBLING \
105 , \ 105 , \
diff --git a/include/linux/tty.h b/include/linux/tty.h
index ef3a2947b102..6abfcf5b5887 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -464,7 +464,7 @@ extern int tty_port_alloc_xmit_buf(struct tty_port *port);
464extern void tty_port_free_xmit_buf(struct tty_port *port); 464extern void tty_port_free_xmit_buf(struct tty_port *port);
465extern void tty_port_put(struct tty_port *port); 465extern void tty_port_put(struct tty_port *port);
466 466
467extern inline struct tty_port *tty_port_get(struct tty_port *port) 467static inline struct tty_port *tty_port_get(struct tty_port *port)
468{ 468{
469 if (port) 469 if (port)
470 kref_get(&port->kref); 470 kref_get(&port->kref);
@@ -486,7 +486,7 @@ extern void tty_port_close(struct tty_port *port,
486 struct tty_struct *tty, struct file *filp); 486 struct tty_struct *tty, struct file *filp);
487extern int tty_port_open(struct tty_port *port, 487extern int tty_port_open(struct tty_port *port,
488 struct tty_struct *tty, struct file *filp); 488 struct tty_struct *tty, struct file *filp);
489extern inline int tty_port_users(struct tty_port *port) 489static inline int tty_port_users(struct tty_port *port)
490{ 490{
491 return port->count + port->blocked_open; 491 return port->count + port->blocked_open;
492} 492}
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index 6b58367d145e..d512d98dfb7d 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -94,6 +94,7 @@ static inline unsigned long __copy_from_user_nocache(void *to,
94 * happens, handle that and return -EFAULT. 94 * happens, handle that and return -EFAULT.
95 */ 95 */
96extern long probe_kernel_read(void *dst, void *src, size_t size); 96extern long probe_kernel_read(void *dst, void *src, size_t size);
97extern long __probe_kernel_read(void *dst, void *src, size_t size);
97 98
98/* 99/*
99 * probe_kernel_write(): safely attempt to write to a location 100 * probe_kernel_write(): safely attempt to write to a location
@@ -104,6 +105,7 @@ extern long probe_kernel_read(void *dst, void *src, size_t size);
104 * Safely write to address @dst from the buffer at @src. If a kernel fault 105 * Safely write to address @dst from the buffer at @src. If a kernel fault
105 * happens, handle that and return -EFAULT. 106 * happens, handle that and return -EFAULT.
106 */ 107 */
107extern long probe_kernel_write(void *dst, void *src, size_t size); 108extern long notrace probe_kernel_write(void *dst, void *src, size_t size);
109extern long notrace __probe_kernel_write(void *dst, void *src, size_t size);
108 110
109#endif /* __LINUX_UACCESS_H__ */ 111#endif /* __LINUX_UACCESS_H__ */
diff --git a/include/linux/usb.h b/include/linux/usb.h
index e101a2d04d75..d7ace1b80f09 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -192,6 +192,7 @@ struct usb_interface {
192 unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ 192 unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */
193 unsigned needs_binding:1; /* needs delayed unbind/rebind */ 193 unsigned needs_binding:1; /* needs delayed unbind/rebind */
194 unsigned reset_running:1; 194 unsigned reset_running:1;
195 unsigned resetting_device:1; /* true: bandwidth alloc after reset */
195 196
196 struct device dev; /* interface specific device info */ 197 struct device dev; /* interface specific device info */
197 struct device *usb_dev; 198 struct device *usb_dev;
diff --git a/include/net/ip.h b/include/net/ip.h
index 85108cfbb1ae..fb63371c07a8 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -326,6 +326,22 @@ static __inline__ void inet_reset_saddr(struct sock *sk)
326 326
327#endif 327#endif
328 328
329static inline int sk_mc_loop(struct sock *sk)
330{
331 if (!sk)
332 return 1;
333 switch (sk->sk_family) {
334 case AF_INET:
335 return inet_sk(sk)->mc_loop;
336#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
337 case AF_INET6:
338 return inet6_sk(sk)->mc_loop;
339#endif
340 }
341 WARN_ON(1);
342 return 1;
343}
344
329extern int ip_call_ra_chain(struct sk_buff *skb); 345extern int ip_call_ra_chain(struct sk_buff *skb);
330 346
331/* 347/*
diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h
index 56f8e5585df7..74f119a2829a 100644
--- a/include/net/netns/xfrm.h
+++ b/include/net/netns/xfrm.h
@@ -5,6 +5,7 @@
5#include <linux/wait.h> 5#include <linux/wait.h>
6#include <linux/workqueue.h> 6#include <linux/workqueue.h>
7#include <linux/xfrm.h> 7#include <linux/xfrm.h>
8#include <net/dst_ops.h>
8 9
9struct ctl_table_header; 10struct ctl_table_header;
10 11
@@ -42,6 +43,11 @@ struct netns_xfrm {
42 unsigned int policy_count[XFRM_POLICY_MAX * 2]; 43 unsigned int policy_count[XFRM_POLICY_MAX * 2];
43 struct work_struct policy_hash_work; 44 struct work_struct policy_hash_work;
44 45
46 struct dst_ops xfrm4_dst_ops;
47#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
48 struct dst_ops xfrm6_dst_ops;
49#endif
50
45 struct sock *nlsk; 51 struct sock *nlsk;
46 struct sock *nlsk_stash; 52 struct sock *nlsk_stash;
47 53
diff --git a/include/net/netrom.h b/include/net/netrom.h
index 15696b1fd30f..ab170a60e7d3 100644
--- a/include/net/netrom.h
+++ b/include/net/netrom.h
@@ -132,6 +132,8 @@ static __inline__ void nr_node_put(struct nr_node *nr_node)
132static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh) 132static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh)
133{ 133{
134 if (atomic_dec_and_test(&nr_neigh->refcount)) { 134 if (atomic_dec_and_test(&nr_neigh->refcount)) {
135 if (nr_neigh->ax25)
136 ax25_cb_put(nr_neigh->ax25);
135 kfree(nr_neigh->digipeat); 137 kfree(nr_neigh->digipeat);
136 kfree(nr_neigh); 138 kfree(nr_neigh);
137 } 139 }
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 6d85861ab990..60c27706e7b9 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1367,8 +1367,8 @@ struct xfrmk_spdinfo {
1367extern struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 seq); 1367extern struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 seq);
1368extern int xfrm_state_delete(struct xfrm_state *x); 1368extern int xfrm_state_delete(struct xfrm_state *x);
1369extern int xfrm_state_flush(struct net *net, u8 proto, struct xfrm_audit *audit_info); 1369extern int xfrm_state_flush(struct net *net, u8 proto, struct xfrm_audit *audit_info);
1370extern void xfrm_sad_getinfo(struct xfrmk_sadinfo *si); 1370extern void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si);
1371extern void xfrm_spd_getinfo(struct xfrmk_spdinfo *si); 1371extern void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si);
1372extern int xfrm_replay_check(struct xfrm_state *x, 1372extern int xfrm_replay_check(struct xfrm_state *x,
1373 struct sk_buff *skb, __be32 seq); 1373 struct sk_buff *skb, __be32 seq);
1374extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); 1374extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq);