aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-05 06:47:28 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-05 06:47:28 -0500
commit7df4edb07cf54a4868b9a750424c0d2aa68f8d66 (patch)
tree0ad0ad3f3dcb6f9edf26dde42ba625053dddf54f /include/linux
parent0d688da5505d77bcef2441e0a22d8cc26459702d (diff)
parent559595a985e106d2fa9f0c79b7f5805453fed593 (diff)
Merge branch 'linus' into core/iommu
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/Kbuild4
-rw-r--r--include/linux/aio_abi.h1
-rw-r--r--include/linux/async.h8
-rw-r--r--include/linux/ata.h15
-rw-r--r--include/linux/atalk.h1
-rw-r--r--include/linux/atmbr2684.h1
-rw-r--r--include/linux/auto_fs4.h1
-rw-r--r--include/linux/bfs_fs.h3
-rw-r--r--include/linux/bio.h53
-rw-r--r--include/linux/blkdev.h10
-rw-r--r--include/linux/blktrace_api.h2
-rw-r--r--include/linux/can/bcm.h2
-rw-r--r--include/linux/capability.h8
-rw-r--r--include/linux/cdrom.h1
-rw-r--r--include/linux/cgroup.h2
-rw-r--r--include/linux/cgroupstats.h1
-rw-r--r--include/linux/clockchips.h1
-rw-r--r--include/linux/crypto.h7
-rw-r--r--include/linux/dcbnl.h4
-rw-r--r--include/linux/debugfs.h7
-rw-r--r--include/linux/device.h2
-rw-r--r--include/linux/dlm_plock.h2
-rw-r--r--include/linux/dmaengine.h25
-rw-r--r--include/linux/dmi.h3
-rw-r--r--include/linux/dn.h2
-rw-r--r--include/linux/dvb/audio.h5
-rw-r--r--include/linux/dvb/dmx.h2
-rw-r--r--include/linux/dvb/frontend.h3
-rw-r--r--include/linux/dvb/net.h3
-rw-r--r--include/linux/dvb/video.h7
-rw-r--r--include/linux/edd.h2
-rw-r--r--include/linux/efs_fs_sb.h1
-rw-r--r--include/linux/elf-fdpic.h2
-rw-r--r--include/linux/elf.h3
-rw-r--r--include/linux/errqueue.h2
-rw-r--r--include/linux/fb.h15
-rw-r--r--include/linux/firmware-map.h2
-rw-r--r--include/linux/fs.h24
-rw-r--r--include/linux/genetlink.h1
-rw-r--r--include/linux/gfs2_ondisk.h2
-rw-r--r--include/linux/hid.h2
-rw-r--r--include/linux/hiddev.h2
-rw-r--r--include/linux/hugetlb.h11
-rw-r--r--include/linux/i2c-dev.h2
-rw-r--r--include/linux/i2c-id.h61
-rw-r--r--include/linux/i2c.h10
-rw-r--r--include/linux/icmpv6.h1
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/if_addr.h1
-rw-r--r--include/linux/if_addrlabel.h2
-rw-r--r--include/linux/if_fc.h1
-rw-r--r--include/linux/if_frad.h10
-rw-r--r--include/linux/if_hippi.h1
-rw-r--r--include/linux/if_link.h1
-rw-r--r--include/linux/if_ppp.h1
-rw-r--r--include/linux/if_strip.h2
-rw-r--r--include/linux/if_tr.h1
-rw-r--r--include/linux/if_tunnel.h3
-rw-r--r--include/linux/if_vlan.h1
-rw-r--r--include/linux/igmp.h1
-rw-r--r--include/linux/inet_diag.h2
-rw-r--r--include/linux/init_task.h5
-rw-r--r--include/linux/intel-iommu.h3
-rw-r--r--include/linux/io-mapping.h49
-rw-r--r--include/linux/ip6_tunnel.h2
-rw-r--r--include/linux/ipv6.h1
-rw-r--r--include/linux/ipv6_route.h2
-rw-r--r--include/linux/ipx.h1
-rw-r--r--include/linux/irda.h2
-rw-r--r--include/linux/jbd2.h6
-rw-r--r--include/linux/kernel.h3
-rw-r--r--include/linux/klist.h2
-rw-r--r--include/linux/kprobes.h47
-rw-r--r--include/linux/kvm.h10
-rw-r--r--include/linux/kvm_host.h1
-rw-r--r--include/linux/libata.h32
-rw-r--r--include/linux/minix_fs.h1
-rw-r--r--include/linux/mm.h24
-rw-r--r--include/linux/mmzone.h2
-rw-r--r--include/linux/mod_devicetable.h7
-rw-r--r--include/linux/module.h26
-rw-r--r--include/linux/msdos_fs.h1
-rw-r--r--include/linux/neighbour.h1
-rw-r--r--include/linux/netfilter/xt_NFLOG.h2
-rw-r--r--include/linux/netfilter/xt_conntrack.h1
-rw-r--r--include/linux/nfs_idmap.h2
-rw-r--r--include/linux/nfsd/export.h3
-rw-r--r--include/linux/nfsd/nfsfh.h3
-rw-r--r--include/linux/nfsd/syscall.h3
-rw-r--r--include/linux/nubus.h1
-rw-r--r--include/linux/pci.h7
-rw-r--r--include/linux/pci_ids.h10
-rw-r--r--include/linux/phonet.h2
-rw-r--r--include/linux/pkt_cls.h1
-rw-r--r--include/linux/pkt_sched.h4
-rw-r--r--include/linux/pm.h2
-rw-r--r--include/linux/ppp_defs.h2
-rw-r--r--include/linux/quotaops.h2
-rw-r--r--include/linux/raid/md_p.h2
-rw-r--r--include/linux/random.h1
-rw-r--r--include/linux/rcuclassic.h6
-rw-r--r--include/linux/rcupdate.h4
-rw-r--r--include/linux/rcupreempt.h15
-rw-r--r--include/linux/rcutree.h6
-rw-r--r--include/linux/rtnetlink.h1
-rw-r--r--include/linux/sched.h64
-rw-r--r--include/linux/seq_file.h1
-rw-r--r--include/linux/serial_core.h1
-rw-r--r--include/linux/signalfd.h1
-rw-r--r--include/linux/skbuff.h9
-rw-r--r--include/linux/slab.h1
-rw-r--r--include/linux/slab_def.h10
-rw-r--r--include/linux/sound.h2
-rw-r--r--include/linux/soundcard.h74
-rw-r--r--include/linux/spi/spi_bitbang.h7
-rw-r--r--include/linux/spi/spidev.h1
-rw-r--r--include/linux/spinlock.h5
-rw-r--r--include/linux/suspend.h2
-rw-r--r--include/linux/synclink.h2
-rw-r--r--include/linux/syscalls.h33
-rw-r--r--include/linux/taskstats.h2
-rw-r--r--include/linux/tc_act/tc_gact.h1
-rw-r--r--include/linux/tc_act/tc_mirred.h1
-rw-r--r--include/linux/tc_act/tc_pedit.h1
-rw-r--r--include/linux/tc_ematch/tc_em_cmp.h1
-rw-r--r--include/linux/tc_ematch/tc_em_meta.h1
-rw-r--r--include/linux/tc_ematch/tc_em_nbyte.h1
-rw-r--r--include/linux/tc_ematch/tc_em_text.h1
-rw-r--r--include/linux/timerfd.h16
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/usb/cdc.h2
-rw-r--r--include/linux/usb/gadgetfs.h2
-rw-r--r--include/linux/usb/usbnet.h4
-rw-r--r--include/linux/user_namespace.h1
-rw-r--r--include/linux/video_decoder.h2
-rw-r--r--include/linux/video_encoder.h2
-rw-r--r--include/linux/videodev.h1
-rw-r--r--include/linux/virtio_blk.h1
-rw-r--r--include/linux/virtio_console.h1
-rw-r--r--include/linux/virtio_net.h1
-rw-r--r--include/linux/vmalloc.h4
-rw-r--r--include/linux/wait.h11
-rw-r--r--include/linux/workqueue.h12
143 files changed, 615 insertions, 335 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 12e9a2957caf..106c3ba50844 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -41,6 +41,7 @@ header-y += baycom.h
41header-y += bfs_fs.h 41header-y += bfs_fs.h
42header-y += blkpg.h 42header-y += blkpg.h
43header-y += bpqether.h 43header-y += bpqether.h
44header-y += bsg.h
44header-y += can.h 45header-y += can.h
45header-y += cdk.h 46header-y += cdk.h
46header-y += chio.h 47header-y += chio.h
@@ -51,6 +52,7 @@ header-y += const.h
51header-y += cgroupstats.h 52header-y += cgroupstats.h
52header-y += cramfs_fs.h 53header-y += cramfs_fs.h
53header-y += cycx_cfm.h 54header-y += cycx_cfm.h
55header-y += dcbnl.h
54header-y += dlmconstants.h 56header-y += dlmconstants.h
55header-y += dlm_device.h 57header-y += dlm_device.h
56header-y += dlm_netlink.h 58header-y += dlm_netlink.h
@@ -89,7 +91,6 @@ header-y += if_ppp.h
89header-y += if_slip.h 91header-y += if_slip.h
90header-y += if_strip.h 92header-y += if_strip.h
91header-y += if_tun.h 93header-y += if_tun.h
92header-y += if_tunnel.h
93header-y += in_route.h 94header-y += in_route.h
94header-y += ioctl.h 95header-y += ioctl.h
95header-y += ip6_tunnel.h 96header-y += ip6_tunnel.h
@@ -235,6 +236,7 @@ unifdef-y += if_phonet.h
235unifdef-y += if_pppol2tp.h 236unifdef-y += if_pppol2tp.h
236unifdef-y += if_pppox.h 237unifdef-y += if_pppox.h
237unifdef-y += if_tr.h 238unifdef-y += if_tr.h
239unifdef-y += if_tunnel.h
238unifdef-y += if_vlan.h 240unifdef-y += if_vlan.h
239unifdef-y += igmp.h 241unifdef-y += igmp.h
240unifdef-y += inet_diag.h 242unifdef-y += inet_diag.h
diff --git a/include/linux/aio_abi.h b/include/linux/aio_abi.h
index 9e0172931315..2c8731664180 100644
--- a/include/linux/aio_abi.h
+++ b/include/linux/aio_abi.h
@@ -27,6 +27,7 @@
27#ifndef __LINUX__AIO_ABI_H 27#ifndef __LINUX__AIO_ABI_H
28#define __LINUX__AIO_ABI_H 28#define __LINUX__AIO_ABI_H
29 29
30#include <linux/types.h>
30#include <asm/byteorder.h> 31#include <asm/byteorder.h>
31 32
32typedef unsigned long aio_context_t; 33typedef unsigned long aio_context_t;
diff --git a/include/linux/async.h b/include/linux/async.h
index c4ecacd0b327..68a9530196f2 100644
--- a/include/linux/async.h
+++ b/include/linux/async.h
@@ -17,9 +17,11 @@ typedef u64 async_cookie_t;
17typedef void (async_func_ptr) (void *data, async_cookie_t cookie); 17typedef void (async_func_ptr) (void *data, async_cookie_t cookie);
18 18
19extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); 19extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data);
20extern async_cookie_t async_schedule_special(async_func_ptr *ptr, void *data, struct list_head *list); 20extern async_cookie_t async_schedule_domain(async_func_ptr *ptr, void *data,
21 struct list_head *list);
21extern void async_synchronize_full(void); 22extern void async_synchronize_full(void);
22extern void async_synchronize_full_special(struct list_head *list); 23extern void async_synchronize_full_domain(struct list_head *list);
23extern void async_synchronize_cookie(async_cookie_t cookie); 24extern void async_synchronize_cookie(async_cookie_t cookie);
24extern void async_synchronize_cookie_special(async_cookie_t cookie, struct list_head *list); 25extern void async_synchronize_cookie_domain(async_cookie_t cookie,
26 struct list_head *list);
25 27
diff --git a/include/linux/ata.h b/include/linux/ata.h
index a53318b8cbd0..08a86d5cdf1b 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -731,12 +731,17 @@ static inline int ata_id_current_chs_valid(const u16 *id)
731 731
732static inline int ata_id_is_cfa(const u16 *id) 732static inline int ata_id_is_cfa(const u16 *id)
733{ 733{
734 if (id[ATA_ID_CONFIG] == 0x848A) /* Standard CF */ 734 if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */
735 return 1; 735 return 1;
736 /* Could be CF hiding as standard ATA */ 736 /*
737 if (ata_id_major_version(id) >= 3 && 737 * CF specs don't require specific value in the word 0 anymore and yet
738 id[ATA_ID_COMMAND_SET_1] != 0xFFFF && 738 * they forbid to report the ATA version in the word 80 and require the
739 (id[ATA_ID_COMMAND_SET_1] & (1 << 2))) 739 * CFA feature set support to be indicated in the word 83 in this case.
740 * Unfortunately, some cards only follow either of this requirements,
741 * and while those that don't indicate CFA feature support need some
742 * sort of quirk list, it seems impractical for the ones that do...
743 */
744 if ((id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004)
740 return 1; 745 return 1;
741 return 0; 746 return 0;
742} 747}
diff --git a/include/linux/atalk.h b/include/linux/atalk.h
index e9ebac2e2ecc..d34c187432ed 100644
--- a/include/linux/atalk.h
+++ b/include/linux/atalk.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_ATALK_H__ 1#ifndef __LINUX_ATALK_H__
2#define __LINUX_ATALK_H__ 2#define __LINUX_ATALK_H__
3 3
4#include <linux/types.h>
4#include <asm/byteorder.h> 5#include <asm/byteorder.h>
5 6
6/* 7/*
diff --git a/include/linux/atmbr2684.h b/include/linux/atmbr2684.h
index 52bf72affbba..fdb2629b6189 100644
--- a/include/linux/atmbr2684.h
+++ b/include/linux/atmbr2684.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_ATMBR2684_H 1#ifndef _LINUX_ATMBR2684_H
2#define _LINUX_ATMBR2684_H 2#define _LINUX_ATMBR2684_H
3 3
4#include <linux/types.h>
4#include <linux/atm.h> 5#include <linux/atm.h>
5#include <linux/if.h> /* For IFNAMSIZ */ 6#include <linux/if.h> /* For IFNAMSIZ */
6 7
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h
index 55fa478bd639..8b49ac48a5b7 100644
--- a/include/linux/auto_fs4.h
+++ b/include/linux/auto_fs4.h
@@ -12,6 +12,7 @@
12#define _LINUX_AUTO_FS4_H 12#define _LINUX_AUTO_FS4_H
13 13
14/* Include common v3 definitions */ 14/* Include common v3 definitions */
15#include <linux/types.h>
15#include <linux/auto_fs.h> 16#include <linux/auto_fs.h>
16 17
17/* autofs v4 definitions */ 18/* autofs v4 definitions */
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h
index 8ed6dfdcd783..1c0b355aa515 100644
--- a/include/linux/bfs_fs.h
+++ b/include/linux/bfs_fs.h
@@ -6,6 +6,8 @@
6#ifndef _LINUX_BFS_FS_H 6#ifndef _LINUX_BFS_FS_H
7#define _LINUX_BFS_FS_H 7#define _LINUX_BFS_FS_H
8 8
9#include <linux/types.h>
10
9#define BFS_BSIZE_BITS 9 11#define BFS_BSIZE_BITS 9
10#define BFS_BSIZE (1<<BFS_BSIZE_BITS) 12#define BFS_BSIZE (1<<BFS_BSIZE_BITS)
11 13
@@ -17,7 +19,6 @@
17#define BFS_VDIR 2L 19#define BFS_VDIR 2L
18#define BFS_VREG 1L 20#define BFS_VREG 1L
19 21
20
21/* BFS inode layout on disk */ 22/* BFS inode layout on disk */
22struct bfs_inode { 23struct bfs_inode {
23 __le16 i_ino; 24 __le16 i_ino;
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 18462c5b8fff..1b16108a5417 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -144,7 +144,7 @@ struct bio {
144 * bit 1 -- rw-ahead when set 144 * bit 1 -- rw-ahead when set
145 * bit 2 -- barrier 145 * bit 2 -- barrier
146 * Insert a serialization point in the IO queue, forcing previously 146 * Insert a serialization point in the IO queue, forcing previously
147 * submitted IO to be completed before this oen is issued. 147 * submitted IO to be completed before this one is issued.
148 * bit 3 -- synchronous I/O hint: the block layer will unplug immediately 148 * bit 3 -- synchronous I/O hint: the block layer will unplug immediately
149 * Note that this does NOT indicate that the IO itself is sync, just 149 * Note that this does NOT indicate that the IO itself is sync, just
150 * that the block layer will not postpone issue of this IO by plugging. 150 * that the block layer will not postpone issue of this IO by plugging.
@@ -163,12 +163,31 @@ struct bio {
163#define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ 163#define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */
164#define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ 164#define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */
165#define BIO_RW_BARRIER 2 165#define BIO_RW_BARRIER 2
166#define BIO_RW_SYNC 3 166#define BIO_RW_SYNCIO 3
167#define BIO_RW_META 4 167#define BIO_RW_UNPLUG 4
168#define BIO_RW_DISCARD 5 168#define BIO_RW_META 5
169#define BIO_RW_FAILFAST_DEV 6 169#define BIO_RW_DISCARD 6
170#define BIO_RW_FAILFAST_TRANSPORT 7 170#define BIO_RW_FAILFAST_DEV 7
171#define BIO_RW_FAILFAST_DRIVER 8 171#define BIO_RW_FAILFAST_TRANSPORT 8
172#define BIO_RW_FAILFAST_DRIVER 9
173
174#define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag)))
175
176/*
177 * Old defines, these should eventually be replaced by direct usage of
178 * bio_rw_flagged()
179 */
180#define bio_barrier(bio) bio_rw_flagged(bio, BIO_RW_BARRIER)
181#define bio_sync(bio) bio_rw_flagged(bio, BIO_RW_SYNCIO)
182#define bio_unplug(bio) bio_rw_flagged(bio, BIO_RW_UNPLUG)
183#define bio_failfast_dev(bio) bio_rw_flagged(bio, BIO_RW_FAILFAST_DEV)
184#define bio_failfast_transport(bio) \
185 bio_rw_flagged(bio, BIO_RW_FAILFAST_TRANSPORT)
186#define bio_failfast_driver(bio) \
187 bio_rw_flagged(bio, BIO_RW_FAILFAST_DRIVER)
188#define bio_rw_ahead(bio) bio_rw_flagged(bio, BIO_RW_AHEAD)
189#define bio_rw_meta(bio) bio_rw_flagged(bio, BIO_RW_META)
190#define bio_discard(bio) bio_rw_flagged(bio, BIO_RW_DISCARD)
172 191
173/* 192/*
174 * upper 16 bits of bi_rw define the io priority of this bio 193 * upper 16 bits of bi_rw define the io priority of this bio
@@ -193,15 +212,6 @@ struct bio {
193#define bio_offset(bio) bio_iovec((bio))->bv_offset 212#define bio_offset(bio) bio_iovec((bio))->bv_offset
194#define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) 213#define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
195#define bio_sectors(bio) ((bio)->bi_size >> 9) 214#define bio_sectors(bio) ((bio)->bi_size >> 9)
196#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
197#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
198#define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV))
199#define bio_failfast_transport(bio) \
200 ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT))
201#define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER))
202#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
203#define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META))
204#define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD))
205#define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio)) 215#define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio))
206 216
207static inline unsigned int bio_cur_sectors(struct bio *bio) 217static inline unsigned int bio_cur_sectors(struct bio *bio)
@@ -312,7 +322,6 @@ struct bio_integrity_payload {
312 void *bip_buf; /* generated integrity data */ 322 void *bip_buf; /* generated integrity data */
313 bio_end_io_t *bip_end_io; /* saved I/O completion fn */ 323 bio_end_io_t *bip_end_io; /* saved I/O completion fn */
314 324
315 int bip_error; /* saved I/O error */
316 unsigned int bip_size; 325 unsigned int bip_size;
317 326
318 unsigned short bip_pool; /* pool the ivec came from */ 327 unsigned short bip_pool; /* pool the ivec came from */
@@ -440,12 +449,13 @@ extern struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly;
440 449
441#ifdef CONFIG_HIGHMEM 450#ifdef CONFIG_HIGHMEM
442/* 451/*
443 * remember to add offset! and never ever reenable interrupts between a 452 * remember never ever reenable interrupts between a bvec_kmap_irq and
444 * bvec_kmap_irq and bvec_kunmap_irq!! 453 * bvec_kunmap_irq!
445 * 454 *
446 * This function MUST be inlined - it plays with the CPU interrupt flags. 455 * This function MUST be inlined - it plays with the CPU interrupt flags.
447 */ 456 */
448static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) 457static __always_inline char *bvec_kmap_irq(struct bio_vec *bvec,
458 unsigned long *flags)
449{ 459{
450 unsigned long addr; 460 unsigned long addr;
451 461
@@ -461,7 +471,8 @@ static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags)
461 return (char *) addr + bvec->bv_offset; 471 return (char *) addr + bvec->bv_offset;
462} 472}
463 473
464static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags) 474static __always_inline void bvec_kunmap_irq(char *buffer,
475 unsigned long *flags)
465{ 476{
466 unsigned long ptr = (unsigned long) buffer & PAGE_MASK; 477 unsigned long ptr = (unsigned long) buffer & PAGE_MASK;
467 478
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 044467ef7b11..465d6babc847 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -108,6 +108,7 @@ enum rq_flag_bits {
108 __REQ_RW_META, /* metadata io request */ 108 __REQ_RW_META, /* metadata io request */
109 __REQ_COPY_USER, /* contains copies of user pages */ 109 __REQ_COPY_USER, /* contains copies of user pages */
110 __REQ_INTEGRITY, /* integrity metadata has been remapped */ 110 __REQ_INTEGRITY, /* integrity metadata has been remapped */
111 __REQ_UNPLUG, /* unplug queue on submission */
111 __REQ_NR_BITS, /* stops here */ 112 __REQ_NR_BITS, /* stops here */
112}; 113};
113 114
@@ -134,6 +135,7 @@ enum rq_flag_bits {
134#define REQ_RW_META (1 << __REQ_RW_META) 135#define REQ_RW_META (1 << __REQ_RW_META)
135#define REQ_COPY_USER (1 << __REQ_COPY_USER) 136#define REQ_COPY_USER (1 << __REQ_COPY_USER)
136#define REQ_INTEGRITY (1 << __REQ_INTEGRITY) 137#define REQ_INTEGRITY (1 << __REQ_INTEGRITY)
138#define REQ_UNPLUG (1 << __REQ_UNPLUG)
137 139
138#define BLK_MAX_CDB 16 140#define BLK_MAX_CDB 16
139 141
@@ -449,6 +451,11 @@ struct request_queue
449#define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ 451#define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */
450#define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ 452#define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */
451#define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ 453#define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */
454#define QUEUE_FLAG_IO_STAT 15 /* do IO stats */
455
456#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
457 (1 << QUEUE_FLAG_CLUSTER) | \
458 (1 << QUEUE_FLAG_STACKABLE))
452 459
453static inline int queue_is_locked(struct request_queue *q) 460static inline int queue_is_locked(struct request_queue *q)
454{ 461{
@@ -565,6 +572,7 @@ enum {
565#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) 572#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
566#define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) 573#define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags)
567#define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) 574#define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags)
575#define blk_queue_io_stat(q) test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags)
568#define blk_queue_flushing(q) ((q)->ordseq) 576#define blk_queue_flushing(q) ((q)->ordseq)
569#define blk_queue_stackable(q) \ 577#define blk_queue_stackable(q) \
570 test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) 578 test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags)
@@ -700,6 +708,8 @@ struct req_iterator {
700}; 708};
701 709
702/* This should not be used directly - use rq_for_each_segment */ 710/* This should not be used directly - use rq_for_each_segment */
711#define for_each_bio(_bio) \
712 for (; _bio; _bio = _bio->bi_next)
703#define __rq_for_each_bio(_bio, rq) \ 713#define __rq_for_each_bio(_bio, rq) \
704 if ((rq->bio)) \ 714 if ((rq->bio)) \
705 for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) 715 for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next)
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 1dba3493d520..6e915878e88c 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -1,6 +1,7 @@
1#ifndef BLKTRACE_H 1#ifndef BLKTRACE_H
2#define BLKTRACE_H 2#define BLKTRACE_H
3 3
4#include <linux/types.h>
4#ifdef __KERNEL__ 5#ifdef __KERNEL__
5#include <linux/blkdev.h> 6#include <linux/blkdev.h>
6#include <linux/relay.h> 7#include <linux/relay.h>
@@ -14,6 +15,7 @@ enum blktrace_cat {
14 BLK_TC_WRITE = 1 << 1, /* writes */ 15 BLK_TC_WRITE = 1 << 1, /* writes */
15 BLK_TC_BARRIER = 1 << 2, /* barrier */ 16 BLK_TC_BARRIER = 1 << 2, /* barrier */
16 BLK_TC_SYNC = 1 << 3, /* sync IO */ 17 BLK_TC_SYNC = 1 << 3, /* sync IO */
18 BLK_TC_SYNCIO = BLK_TC_SYNC,
17 BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ 19 BLK_TC_QUEUE = 1 << 4, /* queueing/merging */
18 BLK_TC_REQUEUE = 1 << 5, /* requeueing */ 20 BLK_TC_REQUEUE = 1 << 5, /* requeueing */
19 BLK_TC_ISSUE = 1 << 6, /* issue */ 21 BLK_TC_ISSUE = 1 << 6, /* issue */
diff --git a/include/linux/can/bcm.h b/include/linux/can/bcm.h
index 7f293273c444..1432b278c52d 100644
--- a/include/linux/can/bcm.h
+++ b/include/linux/can/bcm.h
@@ -14,6 +14,8 @@
14#ifndef CAN_BCM_H 14#ifndef CAN_BCM_H
15#define CAN_BCM_H 15#define CAN_BCM_H
16 16
17#include <linux/types.h>
18
17/** 19/**
18 * struct bcm_msg_head - head of messages to/from the broadcast manager 20 * struct bcm_msg_head - head of messages to/from the broadcast manager
19 * @opcode: opcode, see enum below. 21 * @opcode: opcode, see enum below.
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 02bdb768d43b..1b9872556131 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -69,10 +69,6 @@ typedef struct __user_cap_data_struct {
69#define VFS_CAP_U32 VFS_CAP_U32_2 69#define VFS_CAP_U32 VFS_CAP_U32_2
70#define VFS_CAP_REVISION VFS_CAP_REVISION_2 70#define VFS_CAP_REVISION VFS_CAP_REVISION_2
71 71
72#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
73extern int file_caps_enabled;
74#endif
75
76struct vfs_cap_data { 72struct vfs_cap_data {
77 __le32 magic_etc; /* Little endian */ 73 __le32 magic_etc; /* Little endian */
78 struct { 74 struct {
@@ -96,6 +92,10 @@ struct vfs_cap_data {
96#define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 92#define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3
97#define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 93#define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3
98 94
95#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
96extern int file_caps_enabled;
97#endif
98
99typedef struct kernel_cap_struct { 99typedef struct kernel_cap_struct {
100 __u32 cap[_KERNEL_CAPABILITY_U32S]; 100 __u32 cap[_KERNEL_CAPABILITY_U32S];
101} kernel_cap_t; 101} kernel_cap_t;
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 0b49e08d3cb0..78e904796622 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -11,6 +11,7 @@
11#ifndef _LINUX_CDROM_H 11#ifndef _LINUX_CDROM_H
12#define _LINUX_CDROM_H 12#define _LINUX_CDROM_H
13 13
14#include <linux/types.h>
14#include <asm/byteorder.h> 15#include <asm/byteorder.h>
15 16
16/******************************************************* 17/*******************************************************
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index e267e62827bb..499900d0cee7 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -99,6 +99,7 @@ static inline bool css_tryget(struct cgroup_subsys_state *css)
99 while (!atomic_inc_not_zero(&css->refcnt)) { 99 while (!atomic_inc_not_zero(&css->refcnt)) {
100 if (test_bit(CSS_REMOVED, &css->flags)) 100 if (test_bit(CSS_REMOVED, &css->flags))
101 return false; 101 return false;
102 cpu_relax();
102 } 103 }
103 return true; 104 return true;
104} 105}
@@ -377,6 +378,7 @@ struct cgroup_subsys {
377 * - initiating hotplug events 378 * - initiating hotplug events
378 */ 379 */
379 struct mutex hierarchy_mutex; 380 struct mutex hierarchy_mutex;
381 struct lock_class_key subsys_key;
380 382
381 /* 383 /*
382 * Link to parent, and list entry in parent's children. 384 * Link to parent, and list entry in parent's children.
diff --git a/include/linux/cgroupstats.h b/include/linux/cgroupstats.h
index 4f53abf6855d..3753c33160d1 100644
--- a/include/linux/cgroupstats.h
+++ b/include/linux/cgroupstats.h
@@ -15,6 +15,7 @@
15#ifndef _LINUX_CGROUPSTATS_H 15#ifndef _LINUX_CGROUPSTATS_H
16#define _LINUX_CGROUPSTATS_H 16#define _LINUX_CGROUPSTATS_H
17 17
18#include <linux/types.h>
18#include <linux/taskstats.h> 19#include <linux/taskstats.h>
19 20
20/* 21/*
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index cea153697ec7..3a1dbba4d3ae 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -36,6 +36,7 @@ enum clock_event_nofitiers {
36 CLOCK_EVT_NOTIFY_BROADCAST_EXIT, 36 CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
37 CLOCK_EVT_NOTIFY_SUSPEND, 37 CLOCK_EVT_NOTIFY_SUSPEND,
38 CLOCK_EVT_NOTIFY_RESUME, 38 CLOCK_EVT_NOTIFY_RESUME,
39 CLOCK_EVT_NOTIFY_CPU_DYING,
39 CLOCK_EVT_NOTIFY_CPU_DEAD, 40 CLOCK_EVT_NOTIFY_CPU_DEAD,
40}; 41};
41 42
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 3bacd71509fb..1f2e9020acc6 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -552,7 +552,12 @@ struct crypto_tfm *crypto_alloc_tfm(const char *alg_name,
552 const struct crypto_type *frontend, 552 const struct crypto_type *frontend,
553 u32 type, u32 mask); 553 u32 type, u32 mask);
554struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); 554struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask);
555void crypto_free_tfm(struct crypto_tfm *tfm); 555void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm);
556
557static inline void crypto_free_tfm(struct crypto_tfm *tfm)
558{
559 return crypto_destroy_tfm(tfm, tfm);
560}
556 561
557int alg_test(const char *driver, const char *alg, u32 type, u32 mask); 562int alg_test(const char *driver, const char *alg, u32 type, u32 mask);
558 563
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
index b0ef274e0031..7d2e10006188 100644
--- a/include/linux/dcbnl.h
+++ b/include/linux/dcbnl.h
@@ -20,10 +20,12 @@
20#ifndef __LINUX_DCBNL_H__ 20#ifndef __LINUX_DCBNL_H__
21#define __LINUX_DCBNL_H__ 21#define __LINUX_DCBNL_H__
22 22
23#include <linux/types.h>
24
23#define DCB_PROTO_VERSION 1 25#define DCB_PROTO_VERSION 1
24 26
25struct dcbmsg { 27struct dcbmsg {
26 unsigned char dcb_family; 28 __u8 dcb_family;
27 __u8 cmd; 29 __u8 cmd;
28 __u16 dcb_pad; 30 __u16 dcb_pad;
29}; 31};
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 23936b16426b..af0e01d4c663 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -162,6 +162,13 @@ static inline struct dentry *debugfs_create_x32(const char *name, mode_t mode,
162 return ERR_PTR(-ENODEV); 162 return ERR_PTR(-ENODEV);
163} 163}
164 164
165static inline struct dentry *debugfs_create_size_t(const char *name, mode_t mode,
166 struct dentry *parent,
167 size_t *value)
168{
169 return ERR_PTR(-ENODEV);
170}
171
165static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, 172static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode,
166 struct dentry *parent, 173 struct dentry *parent,
167 u32 *value) 174 u32 *value)
diff --git a/include/linux/device.h b/include/linux/device.h
index 45e5b1921fbb..47f343c7bdda 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -147,6 +147,8 @@ extern void put_driver(struct device_driver *drv);
147extern struct device_driver *driver_find(const char *name, 147extern struct device_driver *driver_find(const char *name,
148 struct bus_type *bus); 148 struct bus_type *bus);
149extern int driver_probe_done(void); 149extern int driver_probe_done(void);
150extern int wait_for_device_probe(void);
151
150 152
151/* sysfs interface for exporting driver attributes */ 153/* sysfs interface for exporting driver attributes */
152 154
diff --git a/include/linux/dlm_plock.h b/include/linux/dlm_plock.h
index 18d5fdbceb74..2dd21243104f 100644
--- a/include/linux/dlm_plock.h
+++ b/include/linux/dlm_plock.h
@@ -9,6 +9,8 @@
9#ifndef __DLM_PLOCK_DOT_H__ 9#ifndef __DLM_PLOCK_DOT_H__
10#define __DLM_PLOCK_DOT_H__ 10#define __DLM_PLOCK_DOT_H__
11 11
12#include <linux/types.h>
13
12#define DLM_PLOCK_MISC_NAME "dlm_plock" 14#define DLM_PLOCK_MISC_NAME "dlm_plock"
13 15
14#define DLM_PLOCK_VERSION_MAJOR 1 16#define DLM_PLOCK_VERSION_MAJOR 1
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index c73f1e2b59b7..f0413845f20e 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -121,6 +121,7 @@ struct dma_chan_percpu {
121 * @local: per-cpu pointer to a struct dma_chan_percpu 121 * @local: per-cpu pointer to a struct dma_chan_percpu
122 * @client-count: how many clients are using this channel 122 * @client-count: how many clients are using this channel
123 * @table_count: number of appearances in the mem-to-mem allocation table 123 * @table_count: number of appearances in the mem-to-mem allocation table
124 * @private: private data for certain client-channel associations
124 */ 125 */
125struct dma_chan { 126struct dma_chan {
126 struct dma_device *device; 127 struct dma_device *device;
@@ -134,6 +135,7 @@ struct dma_chan {
134 struct dma_chan_percpu *local; 135 struct dma_chan_percpu *local;
135 int client_count; 136 int client_count;
136 int table_count; 137 int table_count;
138 void *private;
137}; 139};
138 140
139/** 141/**
@@ -282,6 +284,18 @@ static inline void dmaengine_put(void)
282} 284}
283#endif 285#endif
284 286
287#ifdef CONFIG_NET_DMA
288#define net_dmaengine_get() dmaengine_get()
289#define net_dmaengine_put() dmaengine_put()
290#else
291static inline void net_dmaengine_get(void)
292{
293}
294static inline void net_dmaengine_put(void)
295{
296}
297#endif
298
285dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, 299dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
286 void *dest, void *src, size_t len); 300 void *dest, void *src, size_t len);
287dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, 301dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,
@@ -297,6 +311,11 @@ static inline void async_tx_ack(struct dma_async_tx_descriptor *tx)
297 tx->flags |= DMA_CTRL_ACK; 311 tx->flags |= DMA_CTRL_ACK;
298} 312}
299 313
314static inline void async_tx_clear_ack(struct dma_async_tx_descriptor *tx)
315{
316 tx->flags &= ~DMA_CTRL_ACK;
317}
318
300static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx) 319static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx)
301{ 320{
302 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK; 321 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK;
@@ -400,11 +419,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
400enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); 419enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
401#ifdef CONFIG_DMA_ENGINE 420#ifdef CONFIG_DMA_ENGINE
402enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); 421enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
422void dma_issue_pending_all(void);
403#else 423#else
404static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) 424static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
405{ 425{
406 return DMA_SUCCESS; 426 return DMA_SUCCESS;
407} 427}
428static inline void dma_issue_pending_all(void)
429{
430 do { } while (0);
431}
408#endif 432#endif
409 433
410/* --- DMA device --- */ 434/* --- DMA device --- */
@@ -413,7 +437,6 @@ int dma_async_device_register(struct dma_device *device);
413void dma_async_device_unregister(struct dma_device *device); 437void dma_async_device_unregister(struct dma_device *device);
414void dma_run_dependencies(struct dma_async_tx_descriptor *tx); 438void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
415struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); 439struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
416void dma_issue_pending_all(void);
417#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) 440#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
418struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); 441struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
419void dma_release_channel(struct dma_chan *chan); 442void dma_release_channel(struct dma_chan *chan);
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index 34161907b2f8..d741b9ceb0e0 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -38,6 +38,7 @@ struct dmi_device {
38#ifdef CONFIG_DMI 38#ifdef CONFIG_DMI
39 39
40extern int dmi_check_system(const struct dmi_system_id *list); 40extern int dmi_check_system(const struct dmi_system_id *list);
41const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
41extern const char * dmi_get_system_info(int field); 42extern const char * dmi_get_system_info(int field);
42extern const struct dmi_device * dmi_find_device(int type, const char *name, 43extern const struct dmi_device * dmi_find_device(int type, const char *name,
43 const struct dmi_device *from); 44 const struct dmi_device *from);
@@ -64,6 +65,8 @@ static inline int dmi_walk(void (*decode)(const struct dmi_header *))
64 { return -1; } 65 { return -1; }
65static inline bool dmi_match(enum dmi_field f, const char *str) 66static inline bool dmi_match(enum dmi_field f, const char *str)
66 { return false; } 67 { return false; }
68static inline const struct dmi_system_id *
69 dmi_first_match(const struct dmi_system_id *list) { return NULL; }
67 70
68#endif 71#endif
69 72
diff --git a/include/linux/dn.h b/include/linux/dn.h
index 02bba040fcfb..fe9990823193 100644
--- a/include/linux/dn.h
+++ b/include/linux/dn.h
@@ -1,6 +1,8 @@
1#ifndef _LINUX_DN_H 1#ifndef _LINUX_DN_H
2#define _LINUX_DN_H 2#define _LINUX_DN_H
3 3
4#include <linux/types.h>
5
4/* 6/*
5 7
6 DECnet Data Structures and Constants 8 DECnet Data Structures and Constants
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h
index 89412e18f571..bb0df2aaebfa 100644
--- a/include/linux/dvb/audio.h
+++ b/include/linux/dvb/audio.h
@@ -24,12 +24,7 @@
24#ifndef _DVBAUDIO_H_ 24#ifndef _DVBAUDIO_H_
25#define _DVBAUDIO_H_ 25#define _DVBAUDIO_H_
26 26
27#ifdef __KERNEL__
28#include <linux/types.h> 27#include <linux/types.h>
29#else
30#include <stdint.h>
31#endif
32
33 28
34typedef enum { 29typedef enum {
35 AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ 30 AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h
index 402fb7a8d922..fef943738a24 100644
--- a/include/linux/dvb/dmx.h
+++ b/include/linux/dvb/dmx.h
@@ -24,7 +24,7 @@
24#ifndef _DVBDMX_H_ 24#ifndef _DVBDMX_H_
25#define _DVBDMX_H_ 25#define _DVBDMX_H_
26 26
27#include <asm/types.h> 27#include <linux/types.h>
28#ifdef __KERNEL__ 28#ifdef __KERNEL__
29#include <linux/time.h> 29#include <linux/time.h>
30#else 30#else
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index 55026b1a40bd..51c8d2d49e42 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -26,8 +26,7 @@
26#ifndef _DVBFRONTEND_H_ 26#ifndef _DVBFRONTEND_H_
27#define _DVBFRONTEND_H_ 27#define _DVBFRONTEND_H_
28 28
29#include <asm/types.h> 29#include <linux/types.h>
30
31 30
32typedef enum fe_type { 31typedef enum fe_type {
33 FE_QPSK, 32 FE_QPSK,
diff --git a/include/linux/dvb/net.h b/include/linux/dvb/net.h
index 5be474bf0d2b..f451e7eb0b0b 100644
--- a/include/linux/dvb/net.h
+++ b/include/linux/dvb/net.h
@@ -24,8 +24,7 @@
24#ifndef _DVBNET_H_ 24#ifndef _DVBNET_H_
25#define _DVBNET_H_ 25#define _DVBNET_H_
26 26
27#include <asm/types.h> 27#include <linux/types.h>
28
29 28
30struct dvb_net_if { 29struct dvb_net_if {
31 __u16 pid; 30 __u16 pid;
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h
index 50839fe9e39e..bd49c3ebf916 100644
--- a/include/linux/dvb/video.h
+++ b/include/linux/dvb/video.h
@@ -24,17 +24,14 @@
24#ifndef _DVBVIDEO_H_ 24#ifndef _DVBVIDEO_H_
25#define _DVBVIDEO_H_ 25#define _DVBVIDEO_H_
26 26
27#include <linux/compiler.h>
28
29#ifdef __KERNEL__
30#include <linux/types.h> 27#include <linux/types.h>
28#ifdef __KERNEL__
29#include <linux/compiler.h>
31#else 30#else
32#include <asm/types.h>
33#include <stdint.h> 31#include <stdint.h>
34#include <time.h> 32#include <time.h>
35#endif 33#endif
36 34
37
38typedef enum { 35typedef enum {
39 VIDEO_FORMAT_4_3, /* Select 4:3 format */ 36 VIDEO_FORMAT_4_3, /* Select 4:3 format */
40 VIDEO_FORMAT_16_9, /* Select 16:9 format. */ 37 VIDEO_FORMAT_16_9, /* Select 16:9 format. */
diff --git a/include/linux/edd.h b/include/linux/edd.h
index 5d747c5cd0fe..4cbd0fe9df08 100644
--- a/include/linux/edd.h
+++ b/include/linux/edd.h
@@ -30,6 +30,8 @@
30#ifndef _LINUX_EDD_H 30#ifndef _LINUX_EDD_H
31#define _LINUX_EDD_H 31#define _LINUX_EDD_H
32 32
33#include <linux/types.h>
34
33#define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF 35#define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF
34 in boot_params - treat this as 1 byte */ 36 in boot_params - treat this as 1 byte */
35#define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */ 37#define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */
diff --git a/include/linux/efs_fs_sb.h b/include/linux/efs_fs_sb.h
index ff1945e37790..a01be90c58cc 100644
--- a/include/linux/efs_fs_sb.h
+++ b/include/linux/efs_fs_sb.h
@@ -9,6 +9,7 @@
9#ifndef __EFS_FS_SB_H__ 9#ifndef __EFS_FS_SB_H__
10#define __EFS_FS_SB_H__ 10#define __EFS_FS_SB_H__
11 11
12#include <linux/types.h>
12#include <linux/magic.h> 13#include <linux/magic.h>
13 14
14/* EFS superblock magic numbers */ 15/* EFS superblock magic numbers */
diff --git a/include/linux/elf-fdpic.h b/include/linux/elf-fdpic.h
index 9f5b7456bff3..7cd2e80cebc8 100644
--- a/include/linux/elf-fdpic.h
+++ b/include/linux/elf-fdpic.h
@@ -58,11 +58,13 @@ struct elf_fdpic_params {
58#define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ 58#define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */
59}; 59};
60 60
61#ifdef __KERNEL__
61#ifdef CONFIG_MMU 62#ifdef CONFIG_MMU
62extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, 63extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
63 struct elf_fdpic_params *interp_params, 64 struct elf_fdpic_params *interp_params,
64 unsigned long *start_stack, 65 unsigned long *start_stack,
65 unsigned long *start_brk); 66 unsigned long *start_brk);
66#endif 67#endif
68#endif /* __KERNEL__ */
67 69
68#endif /* _LINUX_ELF_FDPIC_H */ 70#endif /* _LINUX_ELF_FDPIC_H */
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 0b61ca41a044..45a937be6d38 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -377,6 +377,7 @@ typedef struct elf64_note {
377 Elf64_Word n_type; /* Content type */ 377 Elf64_Word n_type; /* Content type */
378} Elf64_Nhdr; 378} Elf64_Nhdr;
379 379
380#ifdef __KERNEL__
380#if ELF_CLASS == ELFCLASS32 381#if ELF_CLASS == ELFCLASS32
381 382
382extern Elf32_Dyn _DYNAMIC []; 383extern Elf32_Dyn _DYNAMIC [];
@@ -404,5 +405,5 @@ static inline int elf_coredump_extra_notes_write(struct file *file,
404extern int elf_coredump_extra_notes_size(void); 405extern int elf_coredump_extra_notes_size(void);
405extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset); 406extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset);
406#endif 407#endif
407 408#endif /* __KERNEL__ */
408#endif /* _LINUX_ELF_H */ 409#endif /* _LINUX_ELF_H */
diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h
index 92f8d4fab32b..ceb1454b6977 100644
--- a/include/linux/errqueue.h
+++ b/include/linux/errqueue.h
@@ -1,6 +1,8 @@
1#ifndef _LINUX_ERRQUEUE_H 1#ifndef _LINUX_ERRQUEUE_H
2#define _LINUX_ERRQUEUE_H 1 2#define _LINUX_ERRQUEUE_H 1
3 3
4#include <linux/types.h>
5
4struct sock_extended_err 6struct sock_extended_err
5{ 7{
6 __u32 ee_errno; 8 __u32 ee_errno;
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 818fe21257e8..31527e17076b 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -960,6 +960,21 @@ extern struct fb_info *registered_fb[FB_MAX];
960extern int num_registered_fb; 960extern int num_registered_fb;
961extern struct class *fb_class; 961extern struct class *fb_class;
962 962
963static inline int lock_fb_info(struct fb_info *info)
964{
965 mutex_lock(&info->lock);
966 if (!info->fbops) {
967 mutex_unlock(&info->lock);
968 return 0;
969 }
970 return 1;
971}
972
973static inline void unlock_fb_info(struct fb_info *info)
974{
975 mutex_unlock(&info->lock);
976}
977
963static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, 978static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
964 u8 *src, u32 s_pitch, u32 height) 979 u8 *src, u32 s_pitch, u32 height)
965{ 980{
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h
index 6e199c8dfacc..cca686b39123 100644
--- a/include/linux/firmware-map.h
+++ b/include/linux/firmware-map.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * include/linux/firmware-map.h: 2 * include/linux/firmware-map.h:
3 * Copyright (C) 2008 SUSE LINUX Products GmbH 3 * Copyright (C) 2008 SUSE LINUX Products GmbH
4 * by Bernhard Walle <bwalle@suse.de> 4 * by Bernhard Walle <bernhard.walle@gmx.de>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License v2.0 as published by 7 * it under the terms of the GNU General Public License v2.0 as published by
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6022f44043f2..92734c0012e6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -54,24 +54,30 @@ struct inodes_stat_t {
54#define MAY_ACCESS 16 54#define MAY_ACCESS 16
55#define MAY_OPEN 32 55#define MAY_OPEN 32
56 56
57/*
58 * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond
59 * to O_WRONLY and O_RDWR via the strange trick in __dentry_open()
60 */
61
57/* file is open for reading */ 62/* file is open for reading */
58#define FMODE_READ ((__force fmode_t)1) 63#define FMODE_READ ((__force fmode_t)1)
59/* file is open for writing */ 64/* file is open for writing */
60#define FMODE_WRITE ((__force fmode_t)2) 65#define FMODE_WRITE ((__force fmode_t)2)
61/* file is seekable */ 66/* file is seekable */
62#define FMODE_LSEEK ((__force fmode_t)4) 67#define FMODE_LSEEK ((__force fmode_t)4)
63/* file can be accessed using pread/pwrite */ 68/* file can be accessed using pread */
64#define FMODE_PREAD ((__force fmode_t)8) 69#define FMODE_PREAD ((__force fmode_t)8)
65#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ 70/* file can be accessed using pwrite */
71#define FMODE_PWRITE ((__force fmode_t)16)
66/* File is opened for execution with sys_execve / sys_uselib */ 72/* File is opened for execution with sys_execve / sys_uselib */
67#define FMODE_EXEC ((__force fmode_t)16) 73#define FMODE_EXEC ((__force fmode_t)32)
68/* File is opened with O_NDELAY (only set for block devices) */ 74/* File is opened with O_NDELAY (only set for block devices) */
69#define FMODE_NDELAY ((__force fmode_t)32) 75#define FMODE_NDELAY ((__force fmode_t)64)
70/* File is opened with O_EXCL (only set for block devices) */ 76/* File is opened with O_EXCL (only set for block devices) */
71#define FMODE_EXCL ((__force fmode_t)64) 77#define FMODE_EXCL ((__force fmode_t)128)
72/* File is opened using open(.., 3, ..) and is writeable only for ioctls 78/* File is opened using open(.., 3, ..) and is writeable only for ioctls
73 (specialy hack for floppy.c) */ 79 (specialy hack for floppy.c) */
74#define FMODE_WRITE_IOCTL ((__force fmode_t)128) 80#define FMODE_WRITE_IOCTL ((__force fmode_t)256)
75 81
76/* 82/*
77 * Don't update ctime and mtime. 83 * Don't update ctime and mtime.
@@ -87,10 +93,10 @@ struct inodes_stat_t {
87#define WRITE 1 93#define WRITE 1
88#define READA 2 /* read-ahead - don't block if no resources */ 94#define READA 2 /* read-ahead - don't block if no resources */
89#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ 95#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */
90#define READ_SYNC (READ | (1 << BIO_RW_SYNC)) 96#define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))
91#define READ_META (READ | (1 << BIO_RW_META)) 97#define READ_META (READ | (1 << BIO_RW_META))
92#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) 98#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))
93#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC)) 99#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG))
94#define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) 100#define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER))
95#define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) 101#define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD)
96#define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) 102#define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER))
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h
index 7da02c93002b..b834ef6d59fa 100644
--- a/include/linux/genetlink.h
+++ b/include/linux/genetlink.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_GENERIC_NETLINK_H 1#ifndef __LINUX_GENERIC_NETLINK_H
2#define __LINUX_GENERIC_NETLINK_H 2#define __LINUX_GENERIC_NETLINK_H
3 3
4#include <linux/types.h>
4#include <linux/netlink.h> 5#include <linux/netlink.h>
5 6
6#define GENL_NAMSIZ 16 /* length of family name */ 7#define GENL_NAMSIZ 16 /* length of family name */
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h
index 14d0df0b5749..c56b4bce56d0 100644
--- a/include/linux/gfs2_ondisk.h
+++ b/include/linux/gfs2_ondisk.h
@@ -10,6 +10,8 @@
10#ifndef __GFS2_ONDISK_DOT_H__ 10#ifndef __GFS2_ONDISK_DOT_H__
11#define __GFS2_ONDISK_DOT_H__ 11#define __GFS2_ONDISK_DOT_H__
12 12
13#include <linux/types.h>
14
13#define GFS2_MAGIC 0x01161970 15#define GFS2_MAGIC 0x01161970
14#define GFS2_BASIC_BLOCK 512 16#define GFS2_BASIC_BLOCK 512
15#define GFS2_BASIC_BLOCK_SHIFT 9 17#define GFS2_BASIC_BLOCK_SHIFT 9
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 81aa84d60c6b..fa8ee9cef7be 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -791,6 +791,7 @@ dbg_hid(const char *fmt, ...)
791 __FILE__ , ## arg) 791 __FILE__ , ## arg)
792#endif /* HID_FF */ 792#endif /* HID_FF */
793 793
794#ifdef __KERNEL__
794#ifdef CONFIG_HID_COMPAT 795#ifdef CONFIG_HID_COMPAT
795#define HID_COMPAT_LOAD_DRIVER(name) \ 796#define HID_COMPAT_LOAD_DRIVER(name) \
796/* prototype to avoid sparse warning */ \ 797/* prototype to avoid sparse warning */ \
@@ -804,6 +805,7 @@ EXPORT_SYMBOL(hid_compat_##name)
804 extern void hid_compat_##name(void); \ 805 extern void hid_compat_##name(void); \
805 hid_compat_##name(); \ 806 hid_compat_##name(); \
806} while (0) 807} while (0)
808#endif /* __KERNEL__ */
807 809
808#endif 810#endif
809 811
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h
index c760ae0eb6a1..bb6f58baf319 100644
--- a/include/linux/hiddev.h
+++ b/include/linux/hiddev.h
@@ -27,6 +27,8 @@
27 * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic 27 * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
28 */ 28 */
29 29
30#include <linux/types.h>
31
30/* 32/*
31 * The event structure itself 33 * The event structure itself
32 */ 34 */
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index f1d2fba19ea0..03be7f29ca01 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -33,7 +33,8 @@ unsigned long hugetlb_total_pages(void);
33int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, 33int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
34 unsigned long address, int write_access); 34 unsigned long address, int write_access);
35int hugetlb_reserve_pages(struct inode *inode, long from, long to, 35int hugetlb_reserve_pages(struct inode *inode, long from, long to,
36 struct vm_area_struct *vma); 36 struct vm_area_struct *vma,
37 int acctflags);
37void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); 38void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed);
38 39
39extern unsigned long hugepages_treat_as_movable; 40extern unsigned long hugepages_treat_as_movable;
@@ -138,7 +139,7 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
138 139
139extern const struct file_operations hugetlbfs_file_operations; 140extern const struct file_operations hugetlbfs_file_operations;
140extern struct vm_operations_struct hugetlb_vm_ops; 141extern struct vm_operations_struct hugetlb_vm_ops;
141struct file *hugetlb_file_setup(const char *name, size_t); 142struct file *hugetlb_file_setup(const char *name, size_t, int);
142int hugetlb_get_quota(struct address_space *mapping, long delta); 143int hugetlb_get_quota(struct address_space *mapping, long delta);
143void hugetlb_put_quota(struct address_space *mapping, long delta); 144void hugetlb_put_quota(struct address_space *mapping, long delta);
144 145
@@ -158,9 +159,9 @@ static inline void set_file_hugepages(struct file *file)
158} 159}
159#else /* !CONFIG_HUGETLBFS */ 160#else /* !CONFIG_HUGETLBFS */
160 161
161#define is_file_hugepages(file) 0 162#define is_file_hugepages(file) 0
162#define set_file_hugepages(file) BUG() 163#define set_file_hugepages(file) BUG()
163#define hugetlb_file_setup(name,size) ERR_PTR(-ENOSYS) 164#define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS)
164 165
165#endif /* !CONFIG_HUGETLBFS */ 166#endif /* !CONFIG_HUGETLBFS */
166 167
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
index 311315b56b61..fd53bfd26470 100644
--- a/include/linux/i2c-dev.h
+++ b/include/linux/i2c-dev.h
@@ -33,7 +33,7 @@
33 */ 33 */
34#define I2C_RETRIES 0x0701 /* number of times a device address should 34#define I2C_RETRIES 0x0701 /* number of times a device address should
35 be polled when not acknowledging */ 35 be polled when not acknowledging */
36#define I2C_TIMEOUT 0x0702 /* set timeout in jiffies - call with int */ 36#define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */
37 37
38/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses 38/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses
39 * are NOT supported! (due to code brokenness) 39 * are NOT supported! (due to code brokenness)
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 01d67ba9e985..1ffc23bc5d1e 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -40,9 +40,7 @@
40#define I2C_DRIVERID_SAA7185B 13 /* video encoder */ 40#define I2C_DRIVERID_SAA7185B 13 /* video encoder */
41#define I2C_DRIVERID_SAA7110 22 /* video decoder */ 41#define I2C_DRIVERID_SAA7110 22 /* video decoder */
42#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ 42#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */
43#define I2C_DRIVERID_PCF8583 25 /* real time clock */
44#define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ 43#define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */
45#define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */
46#define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ 44#define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */
47#define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ 45#define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */
48#define I2C_DRIVERID_BT819 40 /* video decoder */ 46#define I2C_DRIVERID_BT819 40 /* video decoder */
@@ -54,7 +52,6 @@
54#define I2C_DRIVERID_SAA7191 57 /* video decoder */ 52#define I2C_DRIVERID_SAA7191 57 /* video decoder */
55#define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ 53#define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */
56#define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ 54#define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */
57#define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */
58#define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ 55#define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */
59#define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ 56#define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */
60#define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */ 57#define I2C_DRIVERID_WM8775 69 /* wm8775 audio processor */
@@ -62,23 +59,16 @@
62#define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ 59#define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */
63#define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */ 60#define I2C_DRIVERID_SAA7127 72 /* saa7127 video encoder */
64#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ 61#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */
65#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
66#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ 62#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */
67#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */ 63#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */
68#define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */ 64#define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */
69#define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */ 65#define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */
70#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */ 66#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */
71#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */ 67#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */
72#define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */
73#define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ 68#define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */
74#define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ 69#define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */
75#define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ 70#define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */
76#define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */
77#define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */
78#define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */
79#define I2C_DRIVERID_LM4857 92 /* LM4857 Audio Amplifier */
80#define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */ 71#define I2C_DRIVERID_VP27SMPX 93 /* Panasonic VP27s tuner internal MPX */
81#define I2C_DRIVERID_CS4270 94 /* Cirrus Logic 4270 audio codec */
82#define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */ 72#define I2C_DRIVERID_M52790 95 /* Mitsubishi M52790SP/FP AV switch */
83#define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ 73#define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */
84 74
@@ -89,74 +79,23 @@
89 */ 79 */
90 80
91/* --- Bit algorithm adapters */ 81/* --- Bit algorithm adapters */
92#define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */
93#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ 82#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */
94#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */
95#define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */
96#define I2C_HW_B_I810 0x01000a /* Intel I810 */
97#define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */
98#define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */
99#define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ 83#define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */
100#define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */
101#define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */
102#define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ 84#define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */
103#define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */
104#define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ 85#define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */
105#define I2C_HW_B_NVIDIA 0x01001c /* nvidia framebuffer driver */
106#define I2C_HW_B_SAVAGE 0x01001d /* savage framebuffer driver */
107#define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */
108#define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ 86#define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */
109#define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ 87#define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */
110#define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */
111#define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ 88#define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */
112#define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ 89#define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */
113 90
114/* --- PCF 8584 based algorithms */
115#define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */
116
117/* --- PCA 9564 based algorithms */
118#define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */
119
120/* --- PowerPC on-chip adapters */
121#define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */
122
123/* --- Broadcom SiByte adapters */
124#define I2C_HW_SIBYTE 0x150000
125
126/* --- SGI adapters */ 91/* --- SGI adapters */
127#define I2C_HW_SGI_VINO 0x160000 92#define I2C_HW_SGI_VINO 0x160000
128 93
129/* --- XSCALE on-chip adapters */
130#define I2C_HW_IOP3XX 0x140000
131
132/* --- Au1550 PSC adapters adapters */
133#define I2C_HW_AU1550_PSC 0x1b0000
134
135/* --- SMBus only adapters */ 94/* --- SMBus only adapters */
136#define I2C_HW_SMBUS_PIIX4 0x040000
137#define I2C_HW_SMBUS_ALI15X3 0x040001
138#define I2C_HW_SMBUS_VIA2 0x040002
139#define I2C_HW_SMBUS_I801 0x040004
140#define I2C_HW_SMBUS_AMD756 0x040005
141#define I2C_HW_SMBUS_SIS5595 0x040006
142#define I2C_HW_SMBUS_ALI1535 0x040007
143#define I2C_HW_SMBUS_SIS630 0x040008
144#define I2C_HW_SMBUS_SIS96X 0x040009
145#define I2C_HW_SMBUS_AMD8111 0x04000a
146#define I2C_HW_SMBUS_SCX200 0x04000b
147#define I2C_HW_SMBUS_NFORCE2 0x04000c
148#define I2C_HW_SMBUS_W9968CF 0x04000d 95#define I2C_HW_SMBUS_W9968CF 0x04000d
149#define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ 96#define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */
150#define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ 97#define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */
151#define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ 98#define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */
152#define I2C_HW_SMBUS_ALI1563 0x040013
153
154/* --- MCP107 adapter */
155#define I2C_HW_MPC107 0x0d0000
156
157/* --- Embedded adapters */
158#define I2C_HW_MV64XXX 0x190000
159#define I2C_HW_BLACKFIN 0x190001 /* ADI Blackfin I2C TWI driver */
160 99
161/* --- Miscellaneous adapters */ 100/* --- Miscellaneous adapters */
162#define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ 101#define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 20873d402467..c86c3b07604c 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -151,7 +151,7 @@ struct i2c_driver {
151 * has been dynamically allocated by the driver in the function above, 151 * has been dynamically allocated by the driver in the function above,
152 * it must be freed here. (LEGACY I2C DRIVERS ONLY) 152 * it must be freed here. (LEGACY I2C DRIVERS ONLY)
153 */ 153 */
154 int (*detach_client)(struct i2c_client *); 154 int (*detach_client)(struct i2c_client *) __deprecated;
155 155
156 /* Standard driver model interfaces, for "new style" i2c drivers. 156 /* Standard driver model interfaces, for "new style" i2c drivers.
157 * With the driver model, device enumeration is NEVER done by drivers; 157 * With the driver model, device enumeration is NEVER done by drivers;
@@ -361,7 +361,7 @@ struct i2c_adapter {
361 struct mutex bus_lock; 361 struct mutex bus_lock;
362 struct mutex clist_lock; 362 struct mutex clist_lock;
363 363
364 int timeout; 364 int timeout; /* in jiffies */
365 int retries; 365 int retries;
366 struct device dev; /* the adapter device */ 366 struct device dev; /* the adapter device */
367 367
@@ -429,8 +429,10 @@ static inline int i2c_add_driver(struct i2c_driver *driver)
429 return i2c_register_driver(THIS_MODULE, driver); 429 return i2c_register_driver(THIS_MODULE, driver);
430} 430}
431 431
432extern int i2c_attach_client(struct i2c_client *); 432/* These are deprecated, your driver should use the standard .probe()
433extern int i2c_detach_client(struct i2c_client *); 433 * and .remove() methods instead. */
434extern int __deprecated i2c_attach_client(struct i2c_client *);
435extern int __deprecated i2c_detach_client(struct i2c_client *);
434 436
435extern struct i2c_client *i2c_use_client(struct i2c_client *client); 437extern struct i2c_client *i2c_use_client(struct i2c_client *client);
436extern void i2c_release_client(struct i2c_client *client); 438extern void i2c_release_client(struct i2c_client *client);
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h
index a93a8dd33118..10d701eec484 100644
--- a/include/linux/icmpv6.h
+++ b/include/linux/icmpv6.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_ICMPV6_H 1#ifndef _LINUX_ICMPV6_H
2#define _LINUX_ICMPV6_H 2#define _LINUX_ICMPV6_H
3 3
4#include <linux/types.h>
4#include <asm/byteorder.h> 5#include <asm/byteorder.h>
5 6
6struct icmp6hdr { 7struct icmp6hdr {
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 194da5a4b0d6..fe235b65207e 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -663,7 +663,7 @@ typedef struct ide_drive_s ide_drive_t;
663#define to_ide_device(dev) container_of(dev, ide_drive_t, gendev) 663#define to_ide_device(dev) container_of(dev, ide_drive_t, gendev)
664 664
665#define to_ide_drv(obj, cont_type) \ 665#define to_ide_drv(obj, cont_type) \
666 container_of(obj, struct cont_type, kref) 666 container_of(obj, struct cont_type, dev)
667 667
668#define ide_drv_g(disk, cont_type) \ 668#define ide_drv_g(disk, cont_type) \
669 container_of((disk)->private_data, struct cont_type, driver) 669 container_of((disk)->private_data, struct cont_type, driver)
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index 43f3bedaafd3..a60c821be44c 100644
--- a/include/linux/if_addr.h
+++ b/include/linux/if_addr.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_IF_ADDR_H 1#ifndef __LINUX_IF_ADDR_H
2#define __LINUX_IF_ADDR_H 2#define __LINUX_IF_ADDR_H
3 3
4#include <linux/types.h>
4#include <linux/netlink.h> 5#include <linux/netlink.h>
5 6
6struct ifaddrmsg 7struct ifaddrmsg
diff --git a/include/linux/if_addrlabel.h b/include/linux/if_addrlabel.h
index 9fe79c95dd28..89571f65d6de 100644
--- a/include/linux/if_addrlabel.h
+++ b/include/linux/if_addrlabel.h
@@ -10,6 +10,8 @@
10#ifndef __LINUX_IF_ADDRLABEL_H 10#ifndef __LINUX_IF_ADDRLABEL_H
11#define __LINUX_IF_ADDRLABEL_H 11#define __LINUX_IF_ADDRLABEL_H
12 12
13#include <linux/types.h>
14
13struct ifaddrlblmsg 15struct ifaddrlblmsg
14{ 16{
15 __u8 ifal_family; /* Address family */ 17 __u8 ifal_family; /* Address family */
diff --git a/include/linux/if_fc.h b/include/linux/if_fc.h
index 376a34ea4723..6ed7f1bf35c8 100644
--- a/include/linux/if_fc.h
+++ b/include/linux/if_fc.h
@@ -20,6 +20,7 @@
20#ifndef _LINUX_IF_FC_H 20#ifndef _LINUX_IF_FC_H
21#define _LINUX_IF_FC_H 21#define _LINUX_IF_FC_H
22 22
23#include <linux/types.h>
23 24
24#define FC_ALEN 6 /* Octets in one ethernet addr */ 25#define FC_ALEN 6 /* Octets in one ethernet addr */
25#define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc)) 26#define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc))
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h
index 5c34240de746..60e16a551dd6 100644
--- a/include/linux/if_frad.h
+++ b/include/linux/if_frad.h
@@ -26,8 +26,6 @@
26 26
27#include <linux/if.h> 27#include <linux/if.h>
28 28
29#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
30
31/* Structures and constants associated with the DLCI device driver */ 29/* Structures and constants associated with the DLCI device driver */
32 30
33struct dlci_add 31struct dlci_add
@@ -127,6 +125,8 @@ struct frad_conf
127 125
128#ifdef __KERNEL__ 126#ifdef __KERNEL__
129 127
128#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
129
130/* these are the fields of an RFC 1490 header */ 130/* these are the fields of an RFC 1490 header */
131struct frhdr 131struct frhdr
132{ 132{
@@ -190,12 +190,10 @@ struct frad_local
190 int buffer; /* current buffer for S508 firmware */ 190 int buffer; /* current buffer for S508 firmware */
191}; 191};
192 192
193#endif /* __KERNEL__ */
194
195#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */ 193#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
196 194
197#ifdef __KERNEL__
198extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)); 195extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
199#endif 196
197#endif /* __KERNEL__ */
200 198
201#endif 199#endif
diff --git a/include/linux/if_hippi.h b/include/linux/if_hippi.h
index f0f23516bb59..4a7c9940b080 100644
--- a/include/linux/if_hippi.h
+++ b/include/linux/if_hippi.h
@@ -22,6 +22,7 @@
22#ifndef _LINUX_IF_HIPPI_H 22#ifndef _LINUX_IF_HIPPI_H
23#define _LINUX_IF_HIPPI_H 23#define _LINUX_IF_HIPPI_H
24 24
25#include <linux/types.h>
25#include <asm/byteorder.h> 26#include <asm/byteorder.h>
26 27
27/* 28/*
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index f9032c88716a..176c5182c515 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_IF_LINK_H 1#ifndef _LINUX_IF_LINK_H
2#define _LINUX_IF_LINK_H 2#define _LINUX_IF_LINK_H
3 3
4#include <linux/types.h>
4#include <linux/netlink.h> 5#include <linux/netlink.h>
5 6
6/* The struct should be in sync with struct net_device_stats */ 7/* The struct should be in sync with struct net_device_stats */
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h
index c3b1f8562709..fcef103aa3f6 100644
--- a/include/linux/if_ppp.h
+++ b/include/linux/if_ppp.h
@@ -33,6 +33,7 @@
33#ifndef _IF_PPP_H_ 33#ifndef _IF_PPP_H_
34#define _IF_PPP_H_ 34#define _IF_PPP_H_
35 35
36#include <linux/types.h>
36#include <linux/compiler.h> 37#include <linux/compiler.h>
37 38
38/* 39/*
diff --git a/include/linux/if_strip.h b/include/linux/if_strip.h
index fb5c5c98442f..6526a6235832 100644
--- a/include/linux/if_strip.h
+++ b/include/linux/if_strip.h
@@ -18,6 +18,8 @@
18#ifndef __LINUX_STRIP_H 18#ifndef __LINUX_STRIP_H
19#define __LINUX_STRIP_H 19#define __LINUX_STRIP_H
20 20
21#include <linux/types.h>
22
21typedef struct { 23typedef struct {
22 __u8 c[6]; 24 __u8 c[6];
23} MetricomAddress; 25} MetricomAddress;
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h
index 5bcec8b2c5e2..fc23aeb0f201 100644
--- a/include/linux/if_tr.h
+++ b/include/linux/if_tr.h
@@ -19,6 +19,7 @@
19#ifndef _LINUX_IF_TR_H 19#ifndef _LINUX_IF_TR_H
20#define _LINUX_IF_TR_H 20#define _LINUX_IF_TR_H
21 21
22#include <linux/types.h>
22#include <asm/byteorder.h> /* For __be16 */ 23#include <asm/byteorder.h> /* For __be16 */
23 24
24/* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble 25/* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
index aeab2cb32a9c..82c43624c067 100644
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -2,7 +2,10 @@
2#define _IF_TUNNEL_H_ 2#define _IF_TUNNEL_H_
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5
6#ifdef __KERNEL__
5#include <linux/ip.h> 7#include <linux/ip.h>
8#endif
6 9
7#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) 10#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
8#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) 11#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index f8ff918c208f..e1ff5b14310e 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -210,6 +210,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
210 210
211 /* Move the mac addresses to the beginning of the new header. */ 211 /* Move the mac addresses to the beginning of the new header. */
212 memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); 212 memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN);
213 skb->mac_header -= VLAN_HLEN;
213 214
214 /* first, the ethernet type */ 215 /* first, the ethernet type */
215 veth->h_vlan_proto = htons(ETH_P_8021Q); 216 veth->h_vlan_proto = htons(ETH_P_8021Q);
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index f734a0ba0698..92fbd8cbd68f 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -16,6 +16,7 @@
16#ifndef _LINUX_IGMP_H 16#ifndef _LINUX_IGMP_H
17#define _LINUX_IGMP_H 17#define _LINUX_IGMP_H
18 18
19#include <linux/types.h>
19#include <asm/byteorder.h> 20#include <asm/byteorder.h>
20 21
21/* 22/*
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
index 6e8bc548635a..bc8c49022084 100644
--- a/include/linux/inet_diag.h
+++ b/include/linux/inet_diag.h
@@ -1,6 +1,8 @@
1#ifndef _INET_DIAG_H_ 1#ifndef _INET_DIAG_H_
2#define _INET_DIAG_H_ 1 2#define _INET_DIAG_H_ 1
3 3
4#include <linux/types.h>
5
4/* Just some random number */ 6/* Just some random number */
5#define TCPDIAG_GETSOCK 18 7#define TCPDIAG_GETSOCK 18
6#define DCCPDIAG_GETSOCK 19 8#define DCCPDIAG_GETSOCK 19
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 2f3c2d4ef73b..e752d973fa21 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -48,6 +48,11 @@ extern struct fs_struct init_fs;
48 .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ 48 .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
49 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ 49 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
50 .rlim = INIT_RLIMITS, \ 50 .rlim = INIT_RLIMITS, \
51 .cputimer = { \
52 .cputime = INIT_CPUTIME, \
53 .running = 0, \
54 .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock), \
55 }, \
51} 56}
52 57
53extern struct nsproxy init_nsproxy; 58extern struct nsproxy init_nsproxy;
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 43412aeddb53..4d6a0a2c00b0 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -194,6 +194,7 @@ static inline void dmar_writeq(void __iomem *addr, u64 val)
194/* FSTS_REG */ 194/* FSTS_REG */
195#define DMA_FSTS_PPF ((u32)2) 195#define DMA_FSTS_PPF ((u32)2)
196#define DMA_FSTS_PFO ((u32)1) 196#define DMA_FSTS_PFO ((u32)1)
197#define DMA_FSTS_IQE (1 << 4)
197#define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff) 198#define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff)
198 199
199/* FRCD_REG, 32 bits access */ 200/* FRCD_REG, 32 bits access */
@@ -328,6 +329,6 @@ extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
328 unsigned int size_order, u64 type, 329 unsigned int size_order, u64 type,
329 int non_present_entry_flush); 330 int non_present_entry_flush);
330 331
331extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); 332extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
332 333
333#endif 334#endif
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index 82df31726a54..0adb0f91568c 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -30,11 +30,14 @@
30 * See Documentation/io_mapping.txt 30 * See Documentation/io_mapping.txt
31 */ 31 */
32 32
33/* this struct isn't actually defined anywhere */
34struct io_mapping;
35
36#ifdef CONFIG_HAVE_ATOMIC_IOMAP 33#ifdef CONFIG_HAVE_ATOMIC_IOMAP
37 34
35struct io_mapping {
36 resource_size_t base;
37 unsigned long size;
38 pgprot_t prot;
39};
40
38/* 41/*
39 * For small address space machines, mapping large objects 42 * For small address space machines, mapping large objects
40 * into the kernel virtual space isn't practical. Where 43 * into the kernel virtual space isn't practical. Where
@@ -43,23 +46,40 @@ struct io_mapping;
43 */ 46 */
44 47
45static inline struct io_mapping * 48static inline struct io_mapping *
46io_mapping_create_wc(unsigned long base, unsigned long size) 49io_mapping_create_wc(resource_size_t base, unsigned long size)
47{ 50{
48 return (struct io_mapping *) base; 51 struct io_mapping *iomap;
52
53 if (!is_io_mapping_possible(base, size))
54 return NULL;
55
56 iomap = kmalloc(sizeof(*iomap), GFP_KERNEL);
57 if (!iomap)
58 return NULL;
59
60 iomap->base = base;
61 iomap->size = size;
62 iomap->prot = pgprot_writecombine(__pgprot(__PAGE_KERNEL));
63 return iomap;
49} 64}
50 65
51static inline void 66static inline void
52io_mapping_free(struct io_mapping *mapping) 67io_mapping_free(struct io_mapping *mapping)
53{ 68{
69 kfree(mapping);
54} 70}
55 71
56/* Atomic map/unmap */ 72/* Atomic map/unmap */
57static inline void * 73static inline void *
58io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) 74io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset)
59{ 75{
60 offset += (unsigned long) mapping; 76 resource_size_t phys_addr;
61 return iomap_atomic_prot_pfn(offset >> PAGE_SHIFT, KM_USER0, 77 unsigned long pfn;
62 __pgprot(__PAGE_KERNEL_WC)); 78
79 BUG_ON(offset >= mapping->size);
80 phys_addr = mapping->base + offset;
81 pfn = (unsigned long) (phys_addr >> PAGE_SHIFT);
82 return iomap_atomic_prot_pfn(pfn, KM_USER0, mapping->prot);
63} 83}
64 84
65static inline void 85static inline void
@@ -71,8 +91,12 @@ io_mapping_unmap_atomic(void *vaddr)
71static inline void * 91static inline void *
72io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) 92io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
73{ 93{
74 offset += (unsigned long) mapping; 94 resource_size_t phys_addr;
75 return ioremap_wc(offset, PAGE_SIZE); 95
96 BUG_ON(offset >= mapping->size);
97 phys_addr = mapping->base + offset;
98
99 return ioremap_wc(phys_addr, PAGE_SIZE);
76} 100}
77 101
78static inline void 102static inline void
@@ -83,9 +107,12 @@ io_mapping_unmap(void *vaddr)
83 107
84#else 108#else
85 109
110/* this struct isn't actually defined anywhere */
111struct io_mapping;
112
86/* Create the io_mapping object*/ 113/* Create the io_mapping object*/
87static inline struct io_mapping * 114static inline struct io_mapping *
88io_mapping_create_wc(unsigned long base, unsigned long size) 115io_mapping_create_wc(resource_size_t base, unsigned long size)
89{ 116{
90 return (struct io_mapping *) ioremap_wc(base, size); 117 return (struct io_mapping *) ioremap_wc(base, size);
91} 118}
diff --git a/include/linux/ip6_tunnel.h b/include/linux/ip6_tunnel.h
index 1e7cc4af40de..acb9ad684d63 100644
--- a/include/linux/ip6_tunnel.h
+++ b/include/linux/ip6_tunnel.h
@@ -1,6 +1,8 @@
1#ifndef _IP6_TUNNEL_H 1#ifndef _IP6_TUNNEL_H
2#define _IP6_TUNNEL_H 2#define _IP6_TUNNEL_H
3 3
4#include <linux/types.h>
5
4#define IPV6_TLV_TNL_ENCAP_LIMIT 4 6#define IPV6_TLV_TNL_ENCAP_LIMIT 4
5#define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4 7#define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4
6 8
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 0b816cae533e..476d9464ac82 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -1,6 +1,7 @@
1#ifndef _IPV6_H 1#ifndef _IPV6_H
2#define _IPV6_H 2#define _IPV6_H
3 3
4#include <linux/types.h>
4#include <linux/in6.h> 5#include <linux/in6.h>
5#include <asm/byteorder.h> 6#include <asm/byteorder.h>
6 7
diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h
index b323ff577967..1e7d8af2defe 100644
--- a/include/linux/ipv6_route.h
+++ b/include/linux/ipv6_route.h
@@ -13,6 +13,8 @@
13#ifndef _LINUX_IPV6_ROUTE_H 13#ifndef _LINUX_IPV6_ROUTE_H
14#define _LINUX_IPV6_ROUTE_H 14#define _LINUX_IPV6_ROUTE_H
15 15
16#include <linux/types.h>
17
16#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ 18#define RTF_DEFAULT 0x00010000 /* default - learned via ND */
17#define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) 19#define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed)
18 fallback, no routers on link */ 20 fallback, no routers on link */
diff --git a/include/linux/ipx.h b/include/linux/ipx.h
index eb19b4ea84f4..aabb1d294025 100644
--- a/include/linux/ipx.h
+++ b/include/linux/ipx.h
@@ -1,5 +1,6 @@
1#ifndef _IPX_H_ 1#ifndef _IPX_H_
2#define _IPX_H_ 2#define _IPX_H_
3#include <linux/types.h>
3#include <linux/sockios.h> 4#include <linux/sockios.h>
4#include <linux/socket.h> 5#include <linux/socket.h>
5#define IPX_NODE_LEN 6 6#define IPX_NODE_LEN 6
diff --git a/include/linux/irda.h b/include/linux/irda.h
index 28f88ecba344..00bdad0e8515 100644
--- a/include/linux/irda.h
+++ b/include/linux/irda.h
@@ -25,6 +25,8 @@
25#ifndef KERNEL_IRDA_H 25#ifndef KERNEL_IRDA_H
26#define KERNEL_IRDA_H 26#define KERNEL_IRDA_H
27 27
28#include <linux/types.h>
29
28/* Please do *not* add any #include in this file, this file is 30/* Please do *not* add any #include in this file, this file is
29 * included as-is in user space. 31 * included as-is in user space.
30 * Please fix the calling file to properly included needed files before 32 * Please fix the calling file to properly included needed files before
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index b45109c61fba..4d248b3f1323 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -308,7 +308,8 @@ void buffer_assertion_failure(struct buffer_head *bh);
308 int val = (expr); \ 308 int val = (expr); \
309 if (!val) { \ 309 if (!val) { \
310 printk(KERN_ERR \ 310 printk(KERN_ERR \
311 "EXT3-fs unexpected failure: %s;\n",# expr); \ 311 "JBD2 unexpected failure: %s: %s;\n", \
312 __func__, #expr); \
312 printk(KERN_ERR why "\n"); \ 313 printk(KERN_ERR why "\n"); \
313 } \ 314 } \
314 val; \ 315 val; \
@@ -1149,7 +1150,8 @@ extern int jbd2_journal_clear_err (journal_t *);
1149extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *); 1150extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *);
1150extern int jbd2_journal_force_commit(journal_t *); 1151extern int jbd2_journal_force_commit(journal_t *);
1151extern int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *inode); 1152extern int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *inode);
1152extern int jbd2_journal_begin_ordered_truncate(struct jbd2_inode *inode, loff_t new_size); 1153extern int jbd2_journal_begin_ordered_truncate(journal_t *journal,
1154 struct jbd2_inode *inode, loff_t new_size);
1153extern void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode); 1155extern void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode);
1154extern void jbd2_journal_release_jbd_inode(journal_t *journal, struct jbd2_inode *jinode); 1156extern void jbd2_journal_release_jbd_inode(journal_t *journal, struct jbd2_inode *jinode);
1155 1157
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 343df9ef2412..7fa371898e3e 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -480,7 +480,8 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
480/* 480/*
481 * swap - swap value of @a and @b 481 * swap - swap value of @a and @b
482 */ 482 */
483#define swap(a, b) ({ typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; }) 483#define swap(a, b) \
484 do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
484 485
485/** 486/**
486 * container_of - cast a member of a structure out to the containing structure 487 * container_of - cast a member of a structure out to the containing structure
diff --git a/include/linux/klist.h b/include/linux/klist.h
index d5a27af9dba5..e91a4e59b771 100644
--- a/include/linux/klist.h
+++ b/include/linux/klist.h
@@ -22,7 +22,7 @@ struct klist {
22 struct list_head k_list; 22 struct list_head k_list;
23 void (*get)(struct klist_node *); 23 void (*get)(struct klist_node *);
24 void (*put)(struct klist_node *); 24 void (*put)(struct klist_node *);
25}; 25} __attribute__ ((aligned (4)));
26 26
27#define KLIST_INIT(_name, _get, _put) \ 27#define KLIST_INIT(_name, _get, _put) \
28 { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ 28 { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index d6ea19e314bb..32851eef48f0 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -49,6 +49,13 @@
49 49
50/* Attach to insert probes on any functions which should be ignored*/ 50/* Attach to insert probes on any functions which should be ignored*/
51#define __kprobes __attribute__((__section__(".kprobes.text"))) notrace 51#define __kprobes __attribute__((__section__(".kprobes.text"))) notrace
52#else /* CONFIG_KPROBES */
53typedef int kprobe_opcode_t;
54struct arch_specific_insn {
55 int dummy;
56};
57#define __kprobes notrace
58#endif /* CONFIG_KPROBES */
52 59
53struct kprobe; 60struct kprobe;
54struct pt_regs; 61struct pt_regs;
@@ -131,23 +138,6 @@ struct jprobe {
131/* For backward compatibility with old code using JPROBE_ENTRY() */ 138/* For backward compatibility with old code using JPROBE_ENTRY() */
132#define JPROBE_ENTRY(handler) (handler) 139#define JPROBE_ENTRY(handler) (handler)
133 140
134DECLARE_PER_CPU(struct kprobe *, current_kprobe);
135DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
136
137#ifdef CONFIG_KRETPROBES
138extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
139 struct pt_regs *regs);
140extern int arch_trampoline_kprobe(struct kprobe *p);
141#else /* CONFIG_KRETPROBES */
142static inline void arch_prepare_kretprobe(struct kretprobe *rp,
143 struct pt_regs *regs)
144{
145}
146static inline int arch_trampoline_kprobe(struct kprobe *p)
147{
148 return 0;
149}
150#endif /* CONFIG_KRETPROBES */
151/* 141/*
152 * Function-return probe - 142 * Function-return probe -
153 * Note: 143 * Note:
@@ -188,6 +178,25 @@ struct kprobe_blackpoint {
188 unsigned long range; 178 unsigned long range;
189}; 179};
190 180
181#ifdef CONFIG_KPROBES
182DECLARE_PER_CPU(struct kprobe *, current_kprobe);
183DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
184
185#ifdef CONFIG_KRETPROBES
186extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
187 struct pt_regs *regs);
188extern int arch_trampoline_kprobe(struct kprobe *p);
189#else /* CONFIG_KRETPROBES */
190static inline void arch_prepare_kretprobe(struct kretprobe *rp,
191 struct pt_regs *regs)
192{
193}
194static inline int arch_trampoline_kprobe(struct kprobe *p)
195{
196 return 0;
197}
198#endif /* CONFIG_KRETPROBES */
199
191extern struct kretprobe_blackpoint kretprobe_blacklist[]; 200extern struct kretprobe_blackpoint kretprobe_blacklist[];
192 201
193static inline void kretprobe_assert(struct kretprobe_instance *ri, 202static inline void kretprobe_assert(struct kretprobe_instance *ri,
@@ -264,10 +273,6 @@ void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
264 273
265#else /* CONFIG_KPROBES */ 274#else /* CONFIG_KPROBES */
266 275
267#define __kprobes notrace
268struct jprobe;
269struct kretprobe;
270
271static inline struct kprobe *get_kprobe(void *addr) 276static inline struct kprobe *get_kprobe(void *addr)
272{ 277{
273 return NULL; 278 return NULL;
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 5715f1907601..0424326f1679 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -58,10 +58,10 @@ struct kvm_irqchip {
58 __u32 pad; 58 __u32 pad;
59 union { 59 union {
60 char dummy[512]; /* reserving space */ 60 char dummy[512]; /* reserving space */
61#ifdef CONFIG_X86 61#ifdef __KVM_HAVE_PIT
62 struct kvm_pic_state pic; 62 struct kvm_pic_state pic;
63#endif 63#endif
64#if defined(CONFIG_X86) || defined(CONFIG_IA64) 64#ifdef __KVM_HAVE_IOAPIC
65 struct kvm_ioapic_state ioapic; 65 struct kvm_ioapic_state ioapic;
66#endif 66#endif
67 } chip; 67 } chip;
@@ -384,16 +384,16 @@ struct kvm_trace_rec {
384#define KVM_CAP_MP_STATE 14 384#define KVM_CAP_MP_STATE 14
385#define KVM_CAP_COALESCED_MMIO 15 385#define KVM_CAP_COALESCED_MMIO 15
386#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ 386#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */
387#if defined(CONFIG_X86)||defined(CONFIG_IA64) 387#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
388#define KVM_CAP_DEVICE_ASSIGNMENT 17 388#define KVM_CAP_DEVICE_ASSIGNMENT 17
389#endif 389#endif
390#define KVM_CAP_IOMMU 18 390#define KVM_CAP_IOMMU 18
391#if defined(CONFIG_X86) 391#ifdef __KVM_HAVE_MSI
392#define KVM_CAP_DEVICE_MSI 20 392#define KVM_CAP_DEVICE_MSI 20
393#endif 393#endif
394/* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ 394/* Bug in KVM_SET_USER_MEMORY_REGION fixed: */
395#define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 395#define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21
396#if defined(CONFIG_X86) 396#ifdef __KVM_HAVE_USER_NMI
397#define KVM_CAP_USER_NMI 22 397#define KVM_CAP_USER_NMI 22
398#endif 398#endif
399 399
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ec49d0be7f52..bf6f703642fc 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -285,6 +285,7 @@ void kvm_free_physmem(struct kvm *kvm);
285struct kvm *kvm_arch_create_vm(void); 285struct kvm *kvm_arch_create_vm(void);
286void kvm_arch_destroy_vm(struct kvm *kvm); 286void kvm_arch_destroy_vm(struct kvm *kvm);
287void kvm_free_all_assigned_devices(struct kvm *kvm); 287void kvm_free_all_assigned_devices(struct kvm *kvm);
288void kvm_arch_sync_events(struct kvm *kvm);
288 289
289int kvm_cpu_get_interrupt(struct kvm_vcpu *v); 290int kvm_cpu_get_interrupt(struct kvm_vcpu *v);
290int kvm_cpu_has_interrupt(struct kvm_vcpu *v); 291int kvm_cpu_has_interrupt(struct kvm_vcpu *v);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b6b8a7f3ec66..5d87bc09a1f5 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -187,6 +187,8 @@ enum {
187 ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD 187 ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD
188 * doesn't handle PIO interrupts */ 188 * doesn't handle PIO interrupts */
189 ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ 189 ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */
190 ATA_FLAG_NO_POWEROFF_SPINDOWN = (1 << 11), /* don't spindown before poweroff */
191 ATA_FLAG_NO_HIBERNATE_SPINDOWN = (1 << 12), /* don't spindown before hibernation */
190 ATA_FLAG_DEBUGMSG = (1 << 13), 192 ATA_FLAG_DEBUGMSG = (1 << 13),
191 ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ 193 ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */
192 ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ 194 ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */
@@ -378,6 +380,7 @@ enum {
378 ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands 380 ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands
379 not multiple of 16 bytes */ 381 not multiple of 16 bytes */
380 ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ 382 ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */
383 ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */
381 384
382 /* DMA mask for user DMA control: User visible values; DO NOT 385 /* DMA mask for user DMA control: User visible values; DO NOT
383 renumber */ 386 renumber */
@@ -401,12 +404,14 @@ enum {
401 ATA_TIMING_CYC8B, 404 ATA_TIMING_CYC8B,
402 ATA_TIMING_ACTIVE = (1 << 4), 405 ATA_TIMING_ACTIVE = (1 << 4),
403 ATA_TIMING_RECOVER = (1 << 5), 406 ATA_TIMING_RECOVER = (1 << 5),
404 ATA_TIMING_CYCLE = (1 << 6), 407 ATA_TIMING_DMACK_HOLD = (1 << 6),
405 ATA_TIMING_UDMA = (1 << 7), 408 ATA_TIMING_CYCLE = (1 << 7),
409 ATA_TIMING_UDMA = (1 << 8),
406 ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | 410 ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B |
407 ATA_TIMING_REC8B | ATA_TIMING_CYC8B | 411 ATA_TIMING_REC8B | ATA_TIMING_CYC8B |
408 ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | 412 ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER |
409 ATA_TIMING_CYCLE | ATA_TIMING_UDMA, 413 ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE |
414 ATA_TIMING_UDMA,
410}; 415};
411 416
412enum ata_xfer_mask { 417enum ata_xfer_mask {
@@ -576,7 +581,7 @@ struct ata_device {
576 acpi_handle acpi_handle; 581 acpi_handle acpi_handle;
577 union acpi_object *gtf_cache; 582 union acpi_object *gtf_cache;
578#endif 583#endif
579 /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ 584 /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
580 u64 n_sectors; /* size of device, if ATA */ 585 u64 n_sectors; /* size of device, if ATA */
581 unsigned int class; /* ATA_DEV_xxx */ 586 unsigned int class; /* ATA_DEV_xxx */
582 unsigned long unpark_deadline; 587 unsigned long unpark_deadline;
@@ -601,20 +606,22 @@ struct ata_device {
601 u16 heads; /* Number of heads */ 606 u16 heads; /* Number of heads */
602 u16 sectors; /* Number of sectors per track */ 607 u16 sectors; /* Number of sectors per track */
603 608
604 /* error history */
605 int spdn_cnt;
606 struct ata_ering ering;
607
608 union { 609 union {
609 u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ 610 u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */
610 u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ 611 u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */
611 }; 612 };
613
614 /* error history */
615 int spdn_cnt;
616 /* ering is CLEAR_END, read comment above CLEAR_END */
617 struct ata_ering ering;
612}; 618};
613 619
614/* Offset into struct ata_device. Fields above it are maintained 620/* Fields between ATA_DEVICE_CLEAR_BEGIN and ATA_DEVICE_CLEAR_END are
615 * acress device init. Fields below are zeroed. 621 * cleared to zero on ata_dev_init().
616 */ 622 */
617#define ATA_DEVICE_CLEAR_OFFSET offsetof(struct ata_device, n_sectors) 623#define ATA_DEVICE_CLEAR_BEGIN offsetof(struct ata_device, n_sectors)
624#define ATA_DEVICE_CLEAR_END offsetof(struct ata_device, ering)
618 625
619struct ata_eh_info { 626struct ata_eh_info {
620 struct ata_device *dev; /* offending device */ 627 struct ata_device *dev; /* offending device */
@@ -866,6 +873,7 @@ struct ata_timing {
866 unsigned short cyc8b; /* t0 for 8-bit I/O */ 873 unsigned short cyc8b; /* t0 for 8-bit I/O */
867 unsigned short active; /* t2 or tD */ 874 unsigned short active; /* t2 or tD */
868 unsigned short recover; /* t2i or tK */ 875 unsigned short recover; /* t2i or tK */
876 unsigned short dmack_hold; /* tj */
869 unsigned short cycle; /* t0 */ 877 unsigned short cycle; /* t0 */
870 unsigned short udma; /* t2CYCTYP/2 */ 878 unsigned short udma; /* t2CYCTYP/2 */
871}; 879};
@@ -927,6 +935,8 @@ extern void ata_host_init(struct ata_host *, struct device *,
927extern int ata_scsi_detect(struct scsi_host_template *sht); 935extern int ata_scsi_detect(struct scsi_host_template *sht);
928extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); 936extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
929extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); 937extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
938extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
939 int cmd, void __user *arg);
930extern void ata_sas_port_destroy(struct ata_port *); 940extern void ata_sas_port_destroy(struct ata_port *);
931extern struct ata_port *ata_sas_port_alloc(struct ata_host *, 941extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
932 struct ata_port_info *, struct Scsi_Host *); 942 struct ata_port_info *, struct Scsi_Host *);
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h
index 0e39745f5111..13fe09e0576a 100644
--- a/include/linux/minix_fs.h
+++ b/include/linux/minix_fs.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_MINIX_FS_H 1#ifndef _LINUX_MINIX_FS_H
2#define _LINUX_MINIX_FS_H 2#define _LINUX_MINIX_FS_H
3 3
4#include <linux/types.h>
4#include <linux/magic.h> 5#include <linux/magic.h>
5 6
6/* 7/*
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e8ddc98b8405..065cdf8c09fb 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1041,10 +1041,23 @@ extern void free_bootmem_with_active_regions(int nid,
1041typedef int (*work_fn_t)(unsigned long, unsigned long, void *); 1041typedef int (*work_fn_t)(unsigned long, unsigned long, void *);
1042extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); 1042extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data);
1043extern void sparse_memory_present_with_active_regions(int nid); 1043extern void sparse_memory_present_with_active_regions(int nid);
1044#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
1045extern int early_pfn_to_nid(unsigned long pfn);
1046#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */
1047#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ 1044#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */
1045
1046#if !defined(CONFIG_ARCH_POPULATES_NODE_MAP) && \
1047 !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID)
1048static inline int __early_pfn_to_nid(unsigned long pfn)
1049{
1050 return 0;
1051}
1052#else
1053/* please see mm/page_alloc.c */
1054extern int __meminit early_pfn_to_nid(unsigned long pfn);
1055#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
1056/* there is a per-arch backend function. */
1057extern int __meminit __early_pfn_to_nid(unsigned long pfn);
1058#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */
1059#endif
1060
1048extern void set_dma_reserve(unsigned long new_dma_reserve); 1061extern void set_dma_reserve(unsigned long new_dma_reserve);
1049extern void memmap_init_zone(unsigned long, int, unsigned long, 1062extern void memmap_init_zone(unsigned long, int, unsigned long,
1050 unsigned long, enum memmap_context); 1063 unsigned long, enum memmap_context);
@@ -1129,8 +1142,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
1129 unsigned long flag, unsigned long pgoff); 1142 unsigned long flag, unsigned long pgoff);
1130extern unsigned long mmap_region(struct file *file, unsigned long addr, 1143extern unsigned long mmap_region(struct file *file, unsigned long addr,
1131 unsigned long len, unsigned long flags, 1144 unsigned long len, unsigned long flags,
1132 unsigned int vm_flags, unsigned long pgoff, 1145 unsigned int vm_flags, unsigned long pgoff);
1133 int accountable);
1134 1146
1135static inline unsigned long do_mmap(struct file *file, unsigned long addr, 1147static inline unsigned long do_mmap(struct file *file, unsigned long addr,
1136 unsigned long len, unsigned long prot, 1148 unsigned long len, unsigned long prot,
@@ -1160,6 +1172,7 @@ extern int filemap_fault(struct vm_area_struct *, struct vm_fault *);
1160 1172
1161/* mm/page-writeback.c */ 1173/* mm/page-writeback.c */
1162int write_one_page(struct page *page, int wait); 1174int write_one_page(struct page *page, int wait);
1175void task_dirty_inc(struct task_struct *tsk);
1163 1176
1164/* readahead.c */ 1177/* readahead.c */
1165#define VM_MAX_READAHEAD 128 /* kbytes */ 1178#define VM_MAX_READAHEAD 128 /* kbytes */
@@ -1305,5 +1318,6 @@ void vmemmap_populate_print_last(void);
1305 1318
1306extern void *alloc_locked_buffer(size_t size); 1319extern void *alloc_locked_buffer(size_t size);
1307extern void free_locked_buffer(void *buffer, size_t size); 1320extern void free_locked_buffer(void *buffer, size_t size);
1321extern void release_locked_buffer(void *buffer, size_t size);
1308#endif /* __KERNEL__ */ 1322#endif /* __KERNEL__ */
1309#endif /* _LINUX_MM_H */ 1323#endif /* _LINUX_MM_H */
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 09c14e213b63..1aca6cebbb78 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -1071,7 +1071,7 @@ void sparse_init(void);
1071#endif /* CONFIG_SPARSEMEM */ 1071#endif /* CONFIG_SPARSEMEM */
1072 1072
1073#ifdef CONFIG_NODES_SPAN_OTHER_NODES 1073#ifdef CONFIG_NODES_SPAN_OTHER_NODES
1074#define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid)) 1074bool early_pfn_in_nid(unsigned long pfn, int nid);
1075#else 1075#else
1076#define early_pfn_in_nid(pfn, nid) (1) 1076#define early_pfn_in_nid(pfn, nid) (1)
1077#endif 1077#endif
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 97b91d1abb43..fde86671f48f 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -443,6 +443,13 @@ struct dmi_system_id {
443 struct dmi_strmatch matches[4]; 443 struct dmi_strmatch matches[4];
444 void *driver_data; 444 void *driver_data;
445}; 445};
446/*
447 * struct dmi_device_id appears during expansion of
448 * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
449 * but this is enough for gcc 3.4.6 to error out:
450 * error: storage size of '__mod_dmi_device_table' isn't known
451 */
452#define dmi_device_id dmi_system_id
446#endif 453#endif
447 454
448#define DMI_MATCH(a, b) { a, b } 455#define DMI_MATCH(a, b) { a, b }
diff --git a/include/linux/module.h b/include/linux/module.h
index 4f7ea12463d3..145a75528cc1 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -219,11 +219,6 @@ void *__symbol_get_gpl(const char *symbol);
219 219
220#endif 220#endif
221 221
222struct module_ref
223{
224 local_t count;
225} ____cacheline_aligned;
226
227enum module_state 222enum module_state
228{ 223{
229 MODULE_STATE_LIVE, 224 MODULE_STATE_LIVE,
@@ -344,8 +339,11 @@ struct module
344 /* Destruction function. */ 339 /* Destruction function. */
345 void (*exit)(void); 340 void (*exit)(void);
346 341
347 /* Reference counts */ 342#ifdef CONFIG_SMP
348 struct module_ref ref[NR_CPUS]; 343 char *refptr;
344#else
345 local_t ref;
346#endif
349#endif 347#endif
350}; 348};
351#ifndef MODULE_ARCH_INIT 349#ifndef MODULE_ARCH_INIT
@@ -395,13 +393,21 @@ void __symbol_put(const char *symbol);
395#define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) 393#define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x)
396void symbol_put_addr(void *addr); 394void symbol_put_addr(void *addr);
397 395
396static inline local_t *__module_ref_addr(struct module *mod, int cpu)
397{
398#ifdef CONFIG_SMP
399 return (local_t *) (mod->refptr + per_cpu_offset(cpu));
400#else
401 return &mod->ref;
402#endif
403}
404
398/* Sometimes we know we already have a refcount, and it's easier not 405/* Sometimes we know we already have a refcount, and it's easier not
399 to handle the error case (which only happens with rmmod --wait). */ 406 to handle the error case (which only happens with rmmod --wait). */
400static inline void __module_get(struct module *module) 407static inline void __module_get(struct module *module)
401{ 408{
402 if (module) { 409 if (module) {
403 BUG_ON(module_refcount(module) == 0); 410 local_inc(__module_ref_addr(module, get_cpu()));
404 local_inc(&module->ref[get_cpu()].count);
405 put_cpu(); 411 put_cpu();
406 } 412 }
407} 413}
@@ -413,7 +419,7 @@ static inline int try_module_get(struct module *module)
413 if (module) { 419 if (module) {
414 unsigned int cpu = get_cpu(); 420 unsigned int cpu = get_cpu();
415 if (likely(module_is_live(module))) 421 if (likely(module_is_live(module)))
416 local_inc(&module->ref[cpu].count); 422 local_inc(__module_ref_addr(module, cpu));
417 else 423 else
418 ret = 0; 424 ret = 0;
419 put_cpu(); 425 put_cpu();
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index e0a9b207920d..ce38f1caa5e1 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_MSDOS_FS_H 1#ifndef _LINUX_MSDOS_FS_H
2#define _LINUX_MSDOS_FS_H 2#define _LINUX_MSDOS_FS_H
3 3
4#include <linux/types.h>
4#include <linux/magic.h> 5#include <linux/magic.h>
5#include <asm/byteorder.h> 6#include <asm/byteorder.h>
6 7
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h
index bd3bbf668cdb..8730d5dae1bc 100644
--- a/include/linux/neighbour.h
+++ b/include/linux/neighbour.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_NEIGHBOUR_H 1#ifndef __LINUX_NEIGHBOUR_H
2#define __LINUX_NEIGHBOUR_H 2#define __LINUX_NEIGHBOUR_H
3 3
4#include <linux/types.h>
4#include <linux/netlink.h> 5#include <linux/netlink.h>
5 6
6struct ndmsg 7struct ndmsg
diff --git a/include/linux/netfilter/xt_NFLOG.h b/include/linux/netfilter/xt_NFLOG.h
index cdcd0ed58f7a..4b36aeb46a10 100644
--- a/include/linux/netfilter/xt_NFLOG.h
+++ b/include/linux/netfilter/xt_NFLOG.h
@@ -2,7 +2,7 @@
2#define _XT_NFLOG_TARGET 2#define _XT_NFLOG_TARGET
3 3
4#define XT_NFLOG_DEFAULT_GROUP 0x1 4#define XT_NFLOG_DEFAULT_GROUP 0x1
5#define XT_NFLOG_DEFAULT_THRESHOLD 1 5#define XT_NFLOG_DEFAULT_THRESHOLD 0
6 6
7#define XT_NFLOG_MASK 0x0 7#define XT_NFLOG_MASK 0x0
8 8
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h
index f3fd83e46bab..8f5345275393 100644
--- a/include/linux/netfilter/xt_conntrack.h
+++ b/include/linux/netfilter/xt_conntrack.h
@@ -5,6 +5,7 @@
5#ifndef _XT_CONNTRACK_H 5#ifndef _XT_CONNTRACK_H
6#define _XT_CONNTRACK_H 6#define _XT_CONNTRACK_H
7 7
8#include <linux/types.h>
8#include <linux/netfilter/nf_conntrack_tuple_common.h> 9#include <linux/netfilter/nf_conntrack_tuple_common.h>
9 10
10#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) 11#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h
index 15a9f3b7289a..91a1c24e0cbf 100644
--- a/include/linux/nfs_idmap.h
+++ b/include/linux/nfs_idmap.h
@@ -37,6 +37,8 @@
37#ifndef NFS_IDMAP_H 37#ifndef NFS_IDMAP_H
38#define NFS_IDMAP_H 38#define NFS_IDMAP_H
39 39
40#include <linux/types.h>
41
40/* XXX from bits/utmp.h */ 42/* XXX from bits/utmp.h */
41#define IDMAP_NAMESZ 128 43#define IDMAP_NAMESZ 128
42 44
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 5431512b2757..bcd0201589f8 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -10,9 +10,8 @@
10#ifndef NFSD_EXPORT_H 10#ifndef NFSD_EXPORT_H
11#define NFSD_EXPORT_H 11#define NFSD_EXPORT_H
12 12
13#include <asm/types.h>
14#ifdef __KERNEL__
15# include <linux/types.h> 13# include <linux/types.h>
14#ifdef __KERNEL__
16# include <linux/in.h> 15# include <linux/in.h>
17#endif 16#endif
18 17
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index b2e093870bc6..fa317f6c154b 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -14,9 +14,8 @@
14#ifndef _LINUX_NFSD_FH_H 14#ifndef _LINUX_NFSD_FH_H
15#define _LINUX_NFSD_FH_H 15#define _LINUX_NFSD_FH_H
16 16
17#include <asm/types.h>
18#ifdef __KERNEL__
19# include <linux/types.h> 17# include <linux/types.h>
18#ifdef __KERNEL__
20# include <linux/string.h> 19# include <linux/string.h>
21# include <linux/fs.h> 20# include <linux/fs.h>
22#endif 21#endif
diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h
index 4e439765b705..7a3b565b898f 100644
--- a/include/linux/nfsd/syscall.h
+++ b/include/linux/nfsd/syscall.h
@@ -9,9 +9,8 @@
9#ifndef NFSD_SYSCALL_H 9#ifndef NFSD_SYSCALL_H
10#define NFSD_SYSCALL_H 10#define NFSD_SYSCALL_H
11 11
12#include <asm/types.h>
13#ifdef __KERNEL__
14# include <linux/types.h> 12# include <linux/types.h>
13#ifdef __KERNEL__
15# include <linux/in.h> 14# include <linux/in.h>
16#endif 15#endif
17#include <linux/posix_types.h> 16#include <linux/posix_types.h>
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index c4355076d1a5..7382af374731 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -12,6 +12,7 @@
12#ifndef LINUX_NUBUS_H 12#ifndef LINUX_NUBUS_H
13#define LINUX_NUBUS_H 13#define LINUX_NUBUS_H
14 14
15#include <linux/types.h>
15#ifdef __KERNEL__ 16#ifdef __KERNEL__
16#include <asm/nubus.h> 17#include <asm/nubus.h>
17#endif 18#endif
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 80f8b8b65fde..7bd624bfdcfd 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -117,6 +117,10 @@ typedef int __bitwise pci_power_t;
117#define PCI_UNKNOWN ((pci_power_t __force) 5) 117#define PCI_UNKNOWN ((pci_power_t __force) 5)
118#define PCI_POWER_ERROR ((pci_power_t __force) -1) 118#define PCI_POWER_ERROR ((pci_power_t __force) -1)
119 119
120#define PCI_PM_D2_DELAY 200
121#define PCI_PM_D3_WAIT 10
122#define PCI_PM_BUS_WAIT 50
123
120/** The pci_channel state describes connectivity between the CPU and 124/** The pci_channel state describes connectivity between the CPU and
121 * the pci device. If some PCI bus between here and the pci device 125 * the pci device. If some PCI bus between here and the pci device
122 * has crashed or locked up, this info is reflected here. 126 * has crashed or locked up, this info is reflected here.
@@ -252,6 +256,7 @@ struct pci_dev {
252 unsigned int ari_enabled:1; /* ARI forwarding */ 256 unsigned int ari_enabled:1; /* ARI forwarding */
253 unsigned int is_managed:1; 257 unsigned int is_managed:1;
254 unsigned int is_pcie:1; 258 unsigned int is_pcie:1;
259 unsigned int state_saved:1;
255 pci_dev_flags_t dev_flags; 260 pci_dev_flags_t dev_flags;
256 atomic_t enable_cnt; /* pci_enable_device has been called */ 261 atomic_t enable_cnt; /* pci_enable_device has been called */
257 262
@@ -679,7 +684,7 @@ int pci_enable_rom(struct pci_dev *pdev);
679void pci_disable_rom(struct pci_dev *pdev); 684void pci_disable_rom(struct pci_dev *pdev);
680void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); 685void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
681void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); 686void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom);
682size_t pci_get_rom_size(void __iomem *rom, size_t size); 687size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size);
683 688
684/* Power management related routines */ 689/* Power management related routines */
685int pci_save_state(struct pci_dev *dev); 690int pci_save_state(struct pci_dev *dev);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d56ad9c21c09..aca8c458aa8a 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1312,6 +1312,7 @@
1312#define PCI_DEVICE_ID_VIA_VT3351 0x0351 1312#define PCI_DEVICE_ID_VIA_VT3351 0x0351
1313#define PCI_DEVICE_ID_VIA_VT3364 0x0364 1313#define PCI_DEVICE_ID_VIA_VT3364 0x0364
1314#define PCI_DEVICE_ID_VIA_8371_0 0x0391 1314#define PCI_DEVICE_ID_VIA_8371_0 0x0391
1315#define PCI_DEVICE_ID_VIA_6415 0x0415
1315#define PCI_DEVICE_ID_VIA_8501_0 0x0501 1316#define PCI_DEVICE_ID_VIA_8501_0 0x0501
1316#define PCI_DEVICE_ID_VIA_82C561 0x0561 1317#define PCI_DEVICE_ID_VIA_82C561 0x0561
1317#define PCI_DEVICE_ID_VIA_82C586_1 0x0571 1318#define PCI_DEVICE_ID_VIA_82C586_1 0x0571
@@ -1357,6 +1358,7 @@
1357#define PCI_DEVICE_ID_VIA_8783_0 0x3208 1358#define PCI_DEVICE_ID_VIA_8783_0 0x3208
1358#define PCI_DEVICE_ID_VIA_8237 0x3227 1359#define PCI_DEVICE_ID_VIA_8237 0x3227
1359#define PCI_DEVICE_ID_VIA_8251 0x3287 1360#define PCI_DEVICE_ID_VIA_8251 0x3287
1361#define PCI_DEVICE_ID_VIA_8261 0x3402
1360#define PCI_DEVICE_ID_VIA_8237A 0x3337 1362#define PCI_DEVICE_ID_VIA_8237A 0x3337
1361#define PCI_DEVICE_ID_VIA_8237S 0x3372 1363#define PCI_DEVICE_ID_VIA_8237S 0x3372
1362#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324 1364#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324
@@ -1366,10 +1368,13 @@
1366#define PCI_DEVICE_ID_VIA_CX700 0x8324 1368#define PCI_DEVICE_ID_VIA_CX700 0x8324
1367#define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581 1369#define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581
1368#define PCI_DEVICE_ID_VIA_VX800 0x8353 1370#define PCI_DEVICE_ID_VIA_VX800 0x8353
1371#define PCI_DEVICE_ID_VIA_VX855 0x8409
1369#define PCI_DEVICE_ID_VIA_8371_1 0x8391 1372#define PCI_DEVICE_ID_VIA_8371_1 0x8391
1370#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 1373#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
1371#define PCI_DEVICE_ID_VIA_838X_1 0xB188 1374#define PCI_DEVICE_ID_VIA_838X_1 0xB188
1372#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198 1375#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198
1376#define PCI_DEVICE_ID_VIA_C409_IDE 0XC409
1377#define PCI_DEVICE_ID_VIA_ANON 0xFFFF
1373 1378
1374#define PCI_VENDOR_ID_SIEMENS 0x110A 1379#define PCI_VENDOR_ID_SIEMENS 0x110A
1375#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 1380#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102
@@ -1440,6 +1445,7 @@
1440#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 1445#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071
1441#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072 1446#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072
1442#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073 1447#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073
1448#define PCI_DEVICE_ID_DIGI_NEO_8 0x00B1
1443#define PCI_DEVICE_ID_NEO_2DB9 0x00C8 1449#define PCI_DEVICE_ID_NEO_2DB9 0x00C8
1444#define PCI_DEVICE_ID_NEO_2DB9PRI 0x00C9 1450#define PCI_DEVICE_ID_NEO_2DB9PRI 0x00C9
1445#define PCI_DEVICE_ID_NEO_2RJ45 0x00CA 1451#define PCI_DEVICE_ID_NEO_2RJ45 0x00CA
@@ -2317,6 +2323,9 @@
2317#define PCI_DEVICE_ID_INTEL_82378 0x0484 2323#define PCI_DEVICE_ID_INTEL_82378 0x0484
2318#define PCI_DEVICE_ID_INTEL_I960 0x0960 2324#define PCI_DEVICE_ID_INTEL_I960 0x0960
2319#define PCI_DEVICE_ID_INTEL_I960RM 0x0962 2325#define PCI_DEVICE_ID_INTEL_I960RM 0x0962
2326#define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062
2327#define PCI_DEVICE_ID_INTEL_82573E_SOL 0x1085
2328#define PCI_DEVICE_ID_INTEL_82573L_SOL 0x108F
2320#define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 2329#define PCI_DEVICE_ID_INTEL_82815_MC 0x1130
2321#define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132 2330#define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132
2322#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 2331#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221
@@ -2421,6 +2430,7 @@
2421#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 2430#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8
2422#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 2431#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
2423#define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 2432#define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0
2433#define PCI_DEVICE_ID_INTEL_TGP_LPC 0x27bc
2424#define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd 2434#define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd
2425#define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da 2435#define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da
2426#define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd 2436#define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd
diff --git a/include/linux/phonet.h b/include/linux/phonet.h
index 4157faa857b6..ee5e3c9e2bca 100644
--- a/include/linux/phonet.h
+++ b/include/linux/phonet.h
@@ -23,6 +23,8 @@
23#ifndef LINUX_PHONET_H 23#ifndef LINUX_PHONET_H
24#define LINUX_PHONET_H 24#define LINUX_PHONET_H
25 25
26#include <linux/types.h>
27
26/* Automatic protocol selection */ 28/* Automatic protocol selection */
27#define PN_PROTO_TRANSPORT 0 29#define PN_PROTO_TRANSPORT 0
28/* Phonet datagram socket */ 30/* Phonet datagram socket */
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
index e6aa8482ad7a..3c842edff388 100644
--- a/include/linux/pkt_cls.h
+++ b/include/linux/pkt_cls.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_PKT_CLS_H 1#ifndef __LINUX_PKT_CLS_H
2#define __LINUX_PKT_CLS_H 2#define __LINUX_PKT_CLS_H
3 3
4#include <linux/types.h>
4#include <linux/pkt_sched.h> 5#include <linux/pkt_sched.h>
5 6
6/* I think i could have done better macros ; for now this is stolen from 7/* I think i could have done better macros ; for now this is stolen from
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index e3f133adba78..d51a2b3e221e 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -1,6 +1,8 @@
1#ifndef __LINUX_PKT_SCHED_H 1#ifndef __LINUX_PKT_SCHED_H
2#define __LINUX_PKT_SCHED_H 2#define __LINUX_PKT_SCHED_H
3 3
4#include <linux/types.h>
5
4/* Logical priority bands not depending on specific packet scheduler. 6/* Logical priority bands not depending on specific packet scheduler.
5 Every scheduler will map them to real traffic classes, if it has 7 Every scheduler will map them to real traffic classes, if it has
6 no more precise mechanism to classify packets. 8 no more precise mechanism to classify packets.
@@ -513,7 +515,7 @@ enum
513 515
514struct tc_drr_stats 516struct tc_drr_stats
515{ 517{
516 u32 deficit; 518 __u32 deficit;
517}; 519};
518 520
519#endif 521#endif
diff --git a/include/linux/pm.h b/include/linux/pm.h
index de2e0a8f6728..24ba5f67b3a3 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -381,10 +381,12 @@ struct dev_pm_info {
381 381
382#ifdef CONFIG_PM_SLEEP 382#ifdef CONFIG_PM_SLEEP
383extern void device_pm_lock(void); 383extern void device_pm_lock(void);
384extern int sysdev_resume(void);
384extern void device_power_up(pm_message_t state); 385extern void device_power_up(pm_message_t state);
385extern void device_resume(pm_message_t state); 386extern void device_resume(pm_message_t state);
386 387
387extern void device_pm_unlock(void); 388extern void device_pm_unlock(void);
389extern int sysdev_suspend(pm_message_t state);
388extern int device_power_down(pm_message_t state); 390extern int device_power_down(pm_message_t state);
389extern int device_suspend(pm_message_t state); 391extern int device_suspend(pm_message_t state);
390extern int device_prepare_suspend(pm_message_t state); 392extern int device_prepare_suspend(pm_message_t state);
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h
index 6e8adc77522c..1c866bda2018 100644
--- a/include/linux/ppp_defs.h
+++ b/include/linux/ppp_defs.h
@@ -25,6 +25,8 @@
25 * OR MODIFICATIONS. 25 * OR MODIFICATIONS.
26 */ 26 */
27 27
28#include <linux/types.h>
29
28/* 30/*
29 * ==FILEVERSION 20000114== 31 * ==FILEVERSION 20000114==
30 * 32 *
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 21b781a3350f..0b35b3a1be05 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -24,10 +24,8 @@ void sync_dquots(struct super_block *sb, int type);
24 24
25int dquot_initialize(struct inode *inode, int type); 25int dquot_initialize(struct inode *inode, int type);
26int dquot_drop(struct inode *inode); 26int dquot_drop(struct inode *inode);
27int dquot_drop_locked(struct inode *inode);
28struct dquot *dqget(struct super_block *sb, unsigned int id, int type); 27struct dquot *dqget(struct super_block *sb, unsigned int id, int type);
29void dqput(struct dquot *dquot); 28void dqput(struct dquot *dquot);
30int dquot_is_cached(struct super_block *sb, unsigned int id, int type);
31int dquot_scan_active(struct super_block *sb, 29int dquot_scan_active(struct super_block *sb,
32 int (*fn)(struct dquot *dquot, unsigned long priv), 30 int (*fn)(struct dquot *dquot, unsigned long priv),
33 unsigned long priv); 31 unsigned long priv);
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index 9491026afe66..6ba830fa8538 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -15,6 +15,8 @@
15#ifndef _MD_P_H 15#ifndef _MD_P_H
16#define _MD_P_H 16#define _MD_P_H
17 17
18#include <linux/types.h>
19
18/* 20/*
19 * RAID superblock. 21 * RAID superblock.
20 * 22 *
diff --git a/include/linux/random.h b/include/linux/random.h
index 407ea3646f8f..25d02fe5c9b5 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -7,6 +7,7 @@
7#ifndef _LINUX_RANDOM_H 7#ifndef _LINUX_RANDOM_H
8#define _LINUX_RANDOM_H 8#define _LINUX_RANDOM_H
9 9
10#include <linux/types.h>
10#include <linux/ioctl.h> 11#include <linux/ioctl.h>
11#include <linux/irqnr.h> 12#include <linux/irqnr.h>
12 13
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h
index f3f697df1d71..80044a4f3ab9 100644
--- a/include/linux/rcuclassic.h
+++ b/include/linux/rcuclassic.h
@@ -181,4 +181,10 @@ extern long rcu_batches_completed_bh(void);
181#define rcu_enter_nohz() do { } while (0) 181#define rcu_enter_nohz() do { } while (0)
182#define rcu_exit_nohz() do { } while (0) 182#define rcu_exit_nohz() do { } while (0)
183 183
184/* A context switch is a grace period for rcuclassic. */
185static inline int rcu_blocking_is_gp(void)
186{
187 return num_online_cpus() == 1;
188}
189
184#endif /* __LINUX_RCUCLASSIC_H */ 190#endif /* __LINUX_RCUCLASSIC_H */
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 921340a7b71c..528343e6da51 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -52,6 +52,9 @@ struct rcu_head {
52 void (*func)(struct rcu_head *head); 52 void (*func)(struct rcu_head *head);
53}; 53};
54 54
55/* Internal to kernel, but needed by rcupreempt.h. */
56extern int rcu_scheduler_active;
57
55#if defined(CONFIG_CLASSIC_RCU) 58#if defined(CONFIG_CLASSIC_RCU)
56#include <linux/rcuclassic.h> 59#include <linux/rcuclassic.h>
57#elif defined(CONFIG_TREE_RCU) 60#elif defined(CONFIG_TREE_RCU)
@@ -265,6 +268,7 @@ extern void rcu_barrier_sched(void);
265 268
266/* Internal to kernel */ 269/* Internal to kernel */
267extern void rcu_init(void); 270extern void rcu_init(void);
271extern void rcu_scheduler_starting(void);
268extern int rcu_needs_cpu(int cpu); 272extern int rcu_needs_cpu(int cpu);
269 273
270#endif /* __LINUX_RCUPDATE_H */ 274#endif /* __LINUX_RCUPDATE_H */
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
index 3e05c09b54a2..74304b4538d8 100644
--- a/include/linux/rcupreempt.h
+++ b/include/linux/rcupreempt.h
@@ -142,4 +142,19 @@ static inline void rcu_exit_nohz(void)
142#define rcu_exit_nohz() do { } while (0) 142#define rcu_exit_nohz() do { } while (0)
143#endif /* CONFIG_NO_HZ */ 143#endif /* CONFIG_NO_HZ */
144 144
145/*
146 * A context switch is a grace period for rcupreempt synchronize_rcu()
147 * only during early boot, before the scheduler has been initialized.
148 * So, how the heck do we get a context switch? Well, if the caller
149 * invokes synchronize_rcu(), they are willing to accept a context
150 * switch, so we simply pretend that one happened.
151 *
152 * After boot, there might be a blocked or preempted task in an RCU
153 * read-side critical section, so we cannot then take the fastpath.
154 */
155static inline int rcu_blocking_is_gp(void)
156{
157 return num_online_cpus() == 1 && !rcu_scheduler_active;
158}
159
145#endif /* __LINUX_RCUPREEMPT_H */ 160#endif /* __LINUX_RCUPREEMPT_H */
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index d4368b7975c3..a722fb67bb2d 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -326,4 +326,10 @@ static inline void rcu_exit_nohz(void)
326} 326}
327#endif /* CONFIG_NO_HZ */ 327#endif /* CONFIG_NO_HZ */
328 328
329/* A context switch is a grace period for rcutree. */
330static inline int rcu_blocking_is_gp(void)
331{
332 return num_online_cpus() == 1;
333}
334
329#endif /* __LINUX_RCUTREE_H */ 335#endif /* __LINUX_RCUTREE_H */
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index e88f7058b3a1..1e5f6730ff31 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_RTNETLINK_H 1#ifndef __LINUX_RTNETLINK_H
2#define __LINUX_RTNETLINK_H 2#define __LINUX_RTNETLINK_H
3 3
4#include <linux/types.h>
4#include <linux/netlink.h> 5#include <linux/netlink.h>
5#include <linux/if_link.h> 6#include <linux/if_link.h>
6#include <linux/if_addr.h> 7#include <linux/if_addr.h>
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4cae9b81a1f8..8c216e057c94 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -293,6 +293,9 @@ extern void sched_show_task(struct task_struct *p);
293extern void softlockup_tick(void); 293extern void softlockup_tick(void);
294extern void touch_softlockup_watchdog(void); 294extern void touch_softlockup_watchdog(void);
295extern void touch_all_softlockup_watchdogs(void); 295extern void touch_all_softlockup_watchdogs(void);
296extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
297 struct file *filp, void __user *buffer,
298 size_t *lenp, loff_t *ppos);
296extern unsigned int softlockup_panic; 299extern unsigned int softlockup_panic;
297extern unsigned long sysctl_hung_task_check_count; 300extern unsigned long sysctl_hung_task_check_count;
298extern unsigned long sysctl_hung_task_timeout_secs; 301extern unsigned long sysctl_hung_task_timeout_secs;
@@ -456,16 +459,27 @@ struct task_cputime {
456#define virt_exp utime 459#define virt_exp utime
457#define sched_exp sum_exec_runtime 460#define sched_exp sum_exec_runtime
458 461
462#define INIT_CPUTIME \
463 (struct task_cputime) { \
464 .utime = cputime_zero, \
465 .stime = cputime_zero, \
466 .sum_exec_runtime = 0, \
467 }
468
459/** 469/**
460 * struct thread_group_cputime - thread group interval timer counts 470 * struct thread_group_cputimer - thread group interval timer counts
461 * @totals: thread group interval timers; substructure for 471 * @cputime: thread group interval timers.
462 * uniprocessor kernel, per-cpu for SMP kernel. 472 * @running: non-zero when there are timers running and
473 * @cputime receives updates.
474 * @lock: lock for fields in this struct.
463 * 475 *
464 * This structure contains the version of task_cputime, above, that is 476 * This structure contains the version of task_cputime, above, that is
465 * used for thread group CPU clock calculations. 477 * used for thread group CPU timer calculations.
466 */ 478 */
467struct thread_group_cputime { 479struct thread_group_cputimer {
468 struct task_cputime *totals; 480 struct task_cputime cputime;
481 int running;
482 spinlock_t lock;
469}; 483};
470 484
471/* 485/*
@@ -514,10 +528,10 @@ struct signal_struct {
514 cputime_t it_prof_incr, it_virt_incr; 528 cputime_t it_prof_incr, it_virt_incr;
515 529
516 /* 530 /*
517 * Thread group totals for process CPU clocks. 531 * Thread group totals for process CPU timers.
518 * See thread_group_cputime(), et al, for details. 532 * See thread_group_cputimer(), et al, for details.
519 */ 533 */
520 struct thread_group_cputime cputime; 534 struct thread_group_cputimer cputimer;
521 535
522 /* Earliest-expiration cache. */ 536 /* Earliest-expiration cache. */
523 struct task_cputime cputime_expires; 537 struct task_cputime cputime_expires;
@@ -554,7 +568,7 @@ struct signal_struct {
554 * Live threads maintain their own counters and add to these 568 * Live threads maintain their own counters and add to these
555 * in __exit_signal, except for the group leader. 569 * in __exit_signal, except for the group leader.
556 */ 570 */
557 cputime_t cutime, cstime; 571 cputime_t utime, stime, cutime, cstime;
558 cputime_t gtime; 572 cputime_t gtime;
559 cputime_t cgtime; 573 cputime_t cgtime;
560 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; 574 unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
@@ -563,6 +577,14 @@ struct signal_struct {
563 struct task_io_accounting ioac; 577 struct task_io_accounting ioac;
564 578
565 /* 579 /*
580 * Cumulative ns of schedule CPU time fo dead threads in the
581 * group, not including a zombie group leader, (This only differs
582 * from jiffies_to_ns(utime + stime) if sched_clock uses something
583 * other than jiffies.)
584 */
585 unsigned long long sum_sched_runtime;
586
587 /*
566 * We don't bother to synchronize most readers of this at all, 588 * We don't bother to synchronize most readers of this at all,
567 * because there is no reader checking a limit that actually needs 589 * because there is no reader checking a limit that actually needs
568 * to get both rlim_cur and rlim_max atomically, and either one 590 * to get both rlim_cur and rlim_max atomically, and either one
@@ -626,7 +648,6 @@ struct user_struct {
626 atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ 648 atomic_t inotify_devs; /* How many inotify devs does this user have opened? */
627#endif 649#endif
628#ifdef CONFIG_EPOLL 650#ifdef CONFIG_EPOLL
629 atomic_t epoll_devs; /* The number of epoll descriptors currently open */
630 atomic_t epoll_watches; /* The number of file descriptors currently watched */ 651 atomic_t epoll_watches; /* The number of file descriptors currently watched */
631#endif 652#endif
632#ifdef CONFIG_POSIX_MQUEUE 653#ifdef CONFIG_POSIX_MQUEUE
@@ -2179,25 +2200,18 @@ static inline int spin_needbreak(spinlock_t *lock)
2179/* 2200/*
2180 * Thread group CPU time accounting. 2201 * Thread group CPU time accounting.
2181 */ 2202 */
2182 2203void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times);
2183extern int thread_group_cputime_alloc(struct task_struct *); 2204void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times);
2184extern void thread_group_cputime(struct task_struct *, struct task_cputime *);
2185 2205
2186static inline void thread_group_cputime_init(struct signal_struct *sig) 2206static inline void thread_group_cputime_init(struct signal_struct *sig)
2187{ 2207{
2188 sig->cputime.totals = NULL; 2208 sig->cputimer.cputime = INIT_CPUTIME;
2189} 2209 spin_lock_init(&sig->cputimer.lock);
2190 2210 sig->cputimer.running = 0;
2191static inline int thread_group_cputime_clone_thread(struct task_struct *curr)
2192{
2193 if (curr->signal->cputime.totals)
2194 return 0;
2195 return thread_group_cputime_alloc(curr);
2196} 2211}
2197 2212
2198static inline void thread_group_cputime_free(struct signal_struct *sig) 2213static inline void thread_group_cputime_free(struct signal_struct *sig)
2199{ 2214{
2200 free_percpu(sig->cputime.totals);
2201} 2215}
2202 2216
2203/* 2217/*
@@ -2277,9 +2291,13 @@ extern long sched_group_rt_runtime(struct task_group *tg);
2277extern int sched_group_set_rt_period(struct task_group *tg, 2291extern int sched_group_set_rt_period(struct task_group *tg,
2278 long rt_period_us); 2292 long rt_period_us);
2279extern long sched_group_rt_period(struct task_group *tg); 2293extern long sched_group_rt_period(struct task_group *tg);
2294extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk);
2280#endif 2295#endif
2281#endif 2296#endif
2282 2297
2298extern int task_can_switch_user(struct user_struct *up,
2299 struct task_struct *tsk);
2300
2283#ifdef CONFIG_TASK_XACCT 2301#ifdef CONFIG_TASK_XACCT
2284static inline void add_rchar(struct task_struct *tsk, ssize_t amt) 2302static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
2285{ 2303{
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 40ea5058c2ec..f616f31576d7 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -19,6 +19,7 @@ struct seq_file {
19 size_t from; 19 size_t from;
20 size_t count; 20 size_t count;
21 loff_t index; 21 loff_t index;
22 loff_t read_pos;
22 u64 version; 23 u64 version;
23 struct mutex lock; 24 struct mutex lock;
24 const struct seq_operations *op; 25 const struct seq_operations *op;
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 90bbbf0b1161..df9245c7bd3b 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -296,6 +296,7 @@ struct uart_port {
296#define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) 296#define UPF_HARDPPS_CD ((__force upf_t) (1 << 11))
297#define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) 297#define UPF_LOW_LATENCY ((__force upf_t) (1 << 13))
298#define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) 298#define UPF_BUGGY_UART ((__force upf_t) (1 << 14))
299#define UPF_NO_TXEN_TEST ((__force upf_t) (1 << 15))
299#define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) 300#define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16))
300#define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) 301#define UPF_CONS_FLOW ((__force upf_t) (1 << 23))
301#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) 302#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24))
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h
index bef0c46d4713..b363b916c909 100644
--- a/include/linux/signalfd.h
+++ b/include/linux/signalfd.h
@@ -8,6 +8,7 @@
8#ifndef _LINUX_SIGNALFD_H 8#ifndef _LINUX_SIGNALFD_H
9#define _LINUX_SIGNALFD_H 9#define _LINUX_SIGNALFD_H
10 10
11#include <linux/types.h>
11/* For O_CLOEXEC and O_NONBLOCK */ 12/* For O_CLOEXEC and O_NONBLOCK */
12#include <linux/fcntl.h> 13#include <linux/fcntl.h>
13 14
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index cf2cb50f77d1..9dcf956ad18a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -416,15 +416,6 @@ extern void skb_over_panic(struct sk_buff *skb, int len,
416 void *here); 416 void *here);
417extern void skb_under_panic(struct sk_buff *skb, int len, 417extern void skb_under_panic(struct sk_buff *skb, int len,
418 void *here); 418 void *here);
419extern void skb_truesize_bug(struct sk_buff *skb);
420
421static inline void skb_truesize_check(struct sk_buff *skb)
422{
423 int len = sizeof(struct sk_buff) + skb->len;
424
425 if (unlikely((int)skb->truesize < len))
426 skb_truesize_bug(skb);
427}
428 419
429extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, 420extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
430 int getfrag(void *from, char *to, int offset, 421 int getfrag(void *from, char *to, int offset,
diff --git a/include/linux/slab.h b/include/linux/slab.h
index f96d13c281e8..24c5602bee99 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -127,6 +127,7 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
127void * __must_check __krealloc(const void *, size_t, gfp_t); 127void * __must_check __krealloc(const void *, size_t, gfp_t);
128void * __must_check krealloc(const void *, size_t, gfp_t); 128void * __must_check krealloc(const void *, size_t, gfp_t);
129void kfree(const void *); 129void kfree(const void *);
130void kzfree(const void *);
130size_t ksize(const void *); 131size_t ksize(const void *);
131 132
132/* 133/*
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index 39c3a5eb8ebe..6ca6a7b66d75 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -43,10 +43,7 @@ static inline void *kmalloc(size_t size, gfp_t flags)
43 i++; 43 i++;
44#include <linux/kmalloc_sizes.h> 44#include <linux/kmalloc_sizes.h>
45#undef CACHE 45#undef CACHE
46 { 46 return NULL;
47 extern void __you_cannot_kmalloc_that_much(void);
48 __you_cannot_kmalloc_that_much();
49 }
50found: 47found:
51#ifdef CONFIG_ZONE_DMA 48#ifdef CONFIG_ZONE_DMA
52 if (flags & GFP_DMA) 49 if (flags & GFP_DMA)
@@ -77,10 +74,7 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
77 i++; 74 i++;
78#include <linux/kmalloc_sizes.h> 75#include <linux/kmalloc_sizes.h>
79#undef CACHE 76#undef CACHE
80 { 77 return NULL;
81 extern void __you_cannot_kmalloc_that_much(void);
82 __you_cannot_kmalloc_that_much();
83 }
84found: 78found:
85#ifdef CONFIG_ZONE_DMA 79#ifdef CONFIG_ZONE_DMA
86 if (flags & GFP_DMA) 80 if (flags & GFP_DMA)
diff --git a/include/linux/sound.h b/include/linux/sound.h
index 9e2a94feed6b..44dcf0570432 100644
--- a/include/linux/sound.h
+++ b/include/linux/sound.h
@@ -25,6 +25,7 @@
25#define SND_DEV_AMIDI 13 /* Like /dev/midi (obsolete) */ 25#define SND_DEV_AMIDI 13 /* Like /dev/midi (obsolete) */
26#define SND_DEV_ADMMIDI 14 /* Like /dev/dmmidi (onsolete) */ 26#define SND_DEV_ADMMIDI 14 /* Like /dev/dmmidi (onsolete) */
27 27
28#ifdef __KERNEL__
28/* 29/*
29 * Sound core interface functions 30 * Sound core interface functions
30 */ 31 */
@@ -40,3 +41,4 @@ extern void unregister_sound_special(int unit);
40extern void unregister_sound_mixer(int unit); 41extern void unregister_sound_mixer(int unit);
41extern void unregister_sound_midi(int unit); 42extern void unregister_sound_midi(int unit);
42extern void unregister_sound_dsp(int unit); 43extern void unregister_sound_dsp(int unit);
44#endif /* __KERNEL__ */
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h
index 523d069c862c..1904afedb82f 100644
--- a/include/linux/soundcard.h
+++ b/include/linux/soundcard.h
@@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table {
1045 */ 1045 */
1046#define LOCL_STARTAUDIO 1 1046#define LOCL_STARTAUDIO 1
1047 1047
1048#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) 1048#if !defined(__KERNEL__) || defined(USE_SEQ_MACROS)
1049/* 1049/*
1050 * Some convenience macros to simplify programming of the 1050 * Some convenience macros to simplify programming of the
1051 * /dev/sequencer interface 1051 * /dev/sequencer interface
1052 * 1052 *
1053 * These macros define the API which should be used when possible. 1053 * This is a legacy interface for applications written against
1054 * the OSSlib-3.8 style interface. It is no longer possible
1055 * to actually link against OSSlib with this header, but we
1056 * still provide these macros for programs using them.
1057 *
1058 * If you want to use OSSlib, it is recommended that you get
1059 * the GPL version of OSS-4.x and build against that version
1060 * of the header.
1061 *
1062 * We redefine the extern keyword so that make headers_check
1063 * does not complain about SEQ_USE_EXTBUF.
1054 */ 1064 */
1055#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() 1065#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
1056 1066
1057void seqbuf_dump(void); /* This function must be provided by programs */ 1067void seqbuf_dump(void); /* This function must be provided by programs */
1058 1068
1059extern int OSS_init(int seqfd, int buflen);
1060extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen);
1061extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen);
1062extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen);
1063extern void OSS_patch_caching(int dev, int chn, int patch,
1064 int fd, unsigned char *buf, int buflen);
1065extern void OSS_drum_caching(int dev, int chn, int patch,
1066 int fd, unsigned char *buf, int buflen);
1067extern void OSS_write_patch(int fd, unsigned char *buf, int len);
1068extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
1069
1070#define SEQ_PM_DEFINES int __foo_bar___ 1069#define SEQ_PM_DEFINES int __foo_bar___
1071#ifdef OSSLIB 1070
1072# define SEQ_USE_EXTBUF() \ 1071#define SEQ_LOAD_GMINSTR(dev, instr)
1073 extern unsigned char *_seqbuf; \ 1072#define SEQ_LOAD_GMDRUM(dev, drum)
1074 extern int _seqbuflen;extern int _seqbufptr 1073
1075# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len 1074#define _SEQ_EXTERN extern
1076# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen) 1075#define SEQ_USE_EXTBUF() \
1077# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen) 1076 _SEQ_EXTERN unsigned char _seqbuf[]; \
1078# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen) 1077 _SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr
1079
1080# define SEQ_LOAD_GMINSTR(dev, instr) \
1081 OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
1082# define SEQ_LOAD_GMDRUM(dev, drum) \
1083 OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
1084#else /* !OSSLIB */
1085
1086# define SEQ_LOAD_GMINSTR(dev, instr)
1087# define SEQ_LOAD_GMDRUM(dev, drum)
1088
1089# define SEQ_USE_EXTBUF() \
1090 extern unsigned char _seqbuf[]; \
1091 extern int _seqbuflen;extern int _seqbufptr
1092 1078
1093#ifndef USE_SIMPLE_MACROS 1079#ifndef USE_SIMPLE_MACROS
1094/* Sample seqbuf_dump() implementation: 1080/* Sample seqbuf_dump() implementation:
@@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
1131 */ 1117 */
1132#define _SEQ_NEEDBUF(len) /* empty */ 1118#define _SEQ_NEEDBUF(len) /* empty */
1133#endif 1119#endif
1134#endif /* !OSSLIB */
1135 1120
1136#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ 1121#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
1137 _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ 1122 _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
@@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
1215 _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0) 1200 _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
1216 1201
1217#define SEQ_SET_PATCH SEQ_PGM_CHANGE 1202#define SEQ_SET_PATCH SEQ_PGM_CHANGE
1218#ifdef OSSLIB 1203#define SEQ_PGM_CHANGE(dev, chn, patch) \
1219# define SEQ_PGM_CHANGE(dev, chn, patch) \
1220 {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \
1221 _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
1222#else
1223# define SEQ_PGM_CHANGE(dev, chn, patch) \
1224 _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) 1204 _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
1225#endif
1226 1205
1227#define SEQ_CONTROL(dev, chn, controller, value) \ 1206#define SEQ_CONTROL(dev, chn, controller, value) \
1228 _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) 1207 _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
@@ -1300,19 +1279,12 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
1300/* 1279/*
1301 * Patch loading. 1280 * Patch loading.
1302 */ 1281 */
1303#ifdef OSSLIB 1282#define SEQ_WRPATCH(patchx, len) \
1304# define SEQ_WRPATCH(patchx, len) \
1305 OSS_write_patch(seqfd, (char*)(patchx), len)
1306# define SEQ_WRPATCH2(patchx, len) \
1307 OSS_write_patch2(seqfd, (char*)(patchx), len)
1308#else
1309# define SEQ_WRPATCH(patchx, len) \
1310 {if (_seqbufptr) SEQ_DUMPBUF();\ 1283 {if (_seqbufptr) SEQ_DUMPBUF();\
1311 if (write(seqfd, (char*)(patchx), len)==-1) \ 1284 if (write(seqfd, (char*)(patchx), len)==-1) \
1312 perror("Write patch: /dev/sequencer");} 1285 perror("Write patch: /dev/sequencer");}
1313# define SEQ_WRPATCH2(patchx, len) \ 1286#define SEQ_WRPATCH2(patchx, len) \
1314 (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) 1287 (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
1315#endif
1316 1288
1317#endif 1289#endif
1318#endif 1290#endif
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h
index bf8de281b4ed..eed4254bd503 100644
--- a/include/linux/spi/spi_bitbang.h
+++ b/include/linux/spi/spi_bitbang.h
@@ -83,6 +83,13 @@ extern int spi_bitbang_stop(struct spi_bitbang *spi);
83 * int getmiso(struct spi_device *); 83 * int getmiso(struct spi_device *);
84 * void spidelay(unsigned); 84 * void spidelay(unsigned);
85 * 85 *
86 * setsck()'s is_on parameter is a zero/nonzero boolean.
87 *
88 * setmosi()'s is_on parameter is a zero/nonzero boolean.
89 *
90 * getmiso() is required to return 0 or 1 only. Any other value is invalid
91 * and will result in improper operation.
92 *
86 * A non-inlined routine would call bitbang_txrx_*() routines. The 93 * A non-inlined routine would call bitbang_txrx_*() routines. The
87 * main loop could easily compile down to a handful of instructions, 94 * main loop could easily compile down to a handful of instructions,
88 * especially if the delay is a NOP (to run at peak speed). 95 * especially if the delay is a NOP (to run at peak speed).
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h
index c93ef9d42a01..95251ccd5a07 100644
--- a/include/linux/spi/spidev.h
+++ b/include/linux/spi/spidev.h
@@ -22,6 +22,7 @@
22#ifndef SPIDEV_H 22#ifndef SPIDEV_H
23#define SPIDEV_H 23#define SPIDEV_H
24 24
25#include <linux/types.h>
25 26
26/* User space versions of kernel symbols for SPI clocking modes, 27/* User space versions of kernel symbols for SPI clocking modes,
27 * matching <linux/spi/spi.h> 28 * matching <linux/spi/spi.h>
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index e0c0fccced46..a0c66a2e00ad 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -124,7 +124,12 @@ do { \
124#ifdef CONFIG_GENERIC_LOCKBREAK 124#ifdef CONFIG_GENERIC_LOCKBREAK
125#define spin_is_contended(lock) ((lock)->break_lock) 125#define spin_is_contended(lock) ((lock)->break_lock)
126#else 126#else
127
128#ifdef __raw_spin_is_contended
127#define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock) 129#define spin_is_contended(lock) __raw_spin_is_contended(&(lock)->raw_lock)
130#else
131#define spin_is_contended(lock) (((void)(lock), 0))
132#endif /*__raw_spin_is_contended*/
128#endif 133#endif
129 134
130/** 135/**
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 2b409c44db83..c7d9bb1832ba 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -237,6 +237,7 @@ extern int hibernate_nvs_alloc(void);
237extern void hibernate_nvs_free(void); 237extern void hibernate_nvs_free(void);
238extern void hibernate_nvs_save(void); 238extern void hibernate_nvs_save(void);
239extern void hibernate_nvs_restore(void); 239extern void hibernate_nvs_restore(void);
240extern bool system_entering_hibernation(void);
240#else /* CONFIG_HIBERNATION */ 241#else /* CONFIG_HIBERNATION */
241static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } 242static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
242static inline void swsusp_set_page_free(struct page *p) {} 243static inline void swsusp_set_page_free(struct page *p) {}
@@ -252,6 +253,7 @@ static inline int hibernate_nvs_alloc(void) { return 0; }
252static inline void hibernate_nvs_free(void) {} 253static inline void hibernate_nvs_free(void) {}
253static inline void hibernate_nvs_save(void) {} 254static inline void hibernate_nvs_save(void) {}
254static inline void hibernate_nvs_restore(void) {} 255static inline void hibernate_nvs_restore(void) {}
256static inline bool system_entering_hibernation(void) { return false; }
255#endif /* CONFIG_HIBERNATION */ 257#endif /* CONFIG_HIBERNATION */
256 258
257#ifdef CONFIG_PM_SLEEP 259#ifdef CONFIG_PM_SLEEP
diff --git a/include/linux/synclink.h b/include/linux/synclink.h
index c844a229acc9..99b8bdb17b2b 100644
--- a/include/linux/synclink.h
+++ b/include/linux/synclink.h
@@ -13,6 +13,8 @@
13#define _SYNCLINK_H_ 13#define _SYNCLINK_H_
14#define SYNCLINK_H_VERSION 3.6 14#define SYNCLINK_H_VERSION 3.6
15 15
16#include <linux/types.h>
17
16#define BIT0 0x0001 18#define BIT0 0x0001
17#define BIT1 0x0002 19#define BIT1 0x0002
18#define BIT2 0x0004 20#define BIT2 0x0004
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 16875f89e6a7..f9f900cfd066 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -95,42 +95,47 @@ struct old_linux_dirent;
95#define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) 95#define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__)
96#define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) 96#define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__)
97 97
98#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) 98#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void)
99#define SYSCALL_DEFINE1(...) SYSCALL_DEFINEx(1, __VA_ARGS__) 99#define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
100#define SYSCALL_DEFINE2(...) SYSCALL_DEFINEx(2, __VA_ARGS__) 100#define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
101#define SYSCALL_DEFINE3(...) SYSCALL_DEFINEx(3, __VA_ARGS__) 101#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
102#define SYSCALL_DEFINE4(...) SYSCALL_DEFINEx(4, __VA_ARGS__) 102#define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
103#define SYSCALL_DEFINE5(...) SYSCALL_DEFINEx(5, __VA_ARGS__) 103#define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
104#define SYSCALL_DEFINE6(...) SYSCALL_DEFINEx(6, __VA_ARGS__) 104#define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
105 105
106#ifdef CONFIG_PPC64 106#ifdef CONFIG_PPC64
107#define SYSCALL_ALIAS(alias, name) \ 107#define SYSCALL_ALIAS(alias, name) \
108 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ 108 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \
109 "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) 109 "\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
110#else 110#else
111#ifdef CONFIG_ALPHA
112#define SYSCALL_ALIAS(alias, name) \
113 asm ( #alias " = " #name "\n\t.globl " #alias)
114#else
111#define SYSCALL_ALIAS(alias, name) \ 115#define SYSCALL_ALIAS(alias, name) \
112 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name) 116 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name)
113#endif 117#endif
118#endif
114 119
115#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS 120#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
116 121
117#define SYSCALL_DEFINE(name) static inline long SYSC_##name 122#define SYSCALL_DEFINE(name) static inline long SYSC_##name
118#define SYSCALL_DEFINEx(x, name, ...) \ 123#define SYSCALL_DEFINEx(x, name, ...) \
119 asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)); \ 124 asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \
120 static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)); \ 125 static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)); \
121 asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__)) \ 126 asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__)) \
122 { \ 127 { \
123 __SC_TEST##x(__VA_ARGS__); \ 128 __SC_TEST##x(__VA_ARGS__); \
124 return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__)); \ 129 return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__)); \
125 } \ 130 } \
126 SYSCALL_ALIAS(sys_##name, SyS_##name); \ 131 SYSCALL_ALIAS(sys##name, SyS##name); \
127 static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)) 132 static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__))
128 133
129#else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ 134#else /* CONFIG_HAVE_SYSCALL_WRAPPERS */
130 135
131#define SYSCALL_DEFINE(name) asmlinkage long sys_##name 136#define SYSCALL_DEFINE(name) asmlinkage long sys_##name
132#define SYSCALL_DEFINEx(x, name, ...) \ 137#define SYSCALL_DEFINEx(x, name, ...) \
133 asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)) 138 asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__))
134 139
135#endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ 140#endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */
136 141
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h
index 18269e956a71..341dddb55090 100644
--- a/include/linux/taskstats.h
+++ b/include/linux/taskstats.h
@@ -16,6 +16,8 @@
16#ifndef _LINUX_TASKSTATS_H 16#ifndef _LINUX_TASKSTATS_H
17#define _LINUX_TASKSTATS_H 17#define _LINUX_TASKSTATS_H
18 18
19#include <linux/types.h>
20
19/* Format for per-task data returned to userland when 21/* Format for per-task data returned to userland when
20 * - a task exits 22 * - a task exits
21 * - listener requests stats for a task 23 * - listener requests stats for a task
diff --git a/include/linux/tc_act/tc_gact.h b/include/linux/tc_act/tc_gact.h
index 23a03eb630db..e895c0a39629 100644
--- a/include/linux/tc_act/tc_gact.h
+++ b/include/linux/tc_act/tc_gact.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_TC_GACT_H 1#ifndef __LINUX_TC_GACT_H
2#define __LINUX_TC_GACT_H 2#define __LINUX_TC_GACT_H
3 3
4#include <linux/types.h>
4#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
5 6
6#define TCA_ACT_GACT 5 7#define TCA_ACT_GACT 5
diff --git a/include/linux/tc_act/tc_mirred.h b/include/linux/tc_act/tc_mirred.h
index 71d63409d568..0a99ab60d610 100644
--- a/include/linux/tc_act/tc_mirred.h
+++ b/include/linux/tc_act/tc_mirred.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_TC_MIR_H 1#ifndef __LINUX_TC_MIR_H
2#define __LINUX_TC_MIR_H 2#define __LINUX_TC_MIR_H
3 3
4#include <linux/types.h>
4#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
5 6
6#define TCA_ACT_MIRRED 8 7#define TCA_ACT_MIRRED 8
diff --git a/include/linux/tc_act/tc_pedit.h b/include/linux/tc_act/tc_pedit.h
index 83e56e32e8e0..54ce9064115a 100644
--- a/include/linux/tc_act/tc_pedit.h
+++ b/include/linux/tc_act/tc_pedit.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_TC_PED_H 1#ifndef __LINUX_TC_PED_H
2#define __LINUX_TC_PED_H 2#define __LINUX_TC_PED_H
3 3
4#include <linux/types.h>
4#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
5 6
6#define TCA_ACT_PEDIT 7 7#define TCA_ACT_PEDIT 7
diff --git a/include/linux/tc_ematch/tc_em_cmp.h b/include/linux/tc_ematch/tc_em_cmp.h
index c7f4d43618fd..38e7f7b25ec2 100644
--- a/include/linux/tc_ematch/tc_em_cmp.h
+++ b/include/linux/tc_ematch/tc_em_cmp.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_TC_EM_CMP_H 1#ifndef __LINUX_TC_EM_CMP_H
2#define __LINUX_TC_EM_CMP_H 2#define __LINUX_TC_EM_CMP_H
3 3
4#include <linux/types.h>
4#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
5 6
6struct tcf_em_cmp 7struct tcf_em_cmp
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h
index c50d2ba5caf0..dcfb733fa1f6 100644
--- a/include/linux/tc_ematch/tc_em_meta.h
+++ b/include/linux/tc_ematch/tc_em_meta.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_TC_EM_META_H 1#ifndef __LINUX_TC_EM_META_H
2#define __LINUX_TC_EM_META_H 2#define __LINUX_TC_EM_META_H
3 3
4#include <linux/types.h>
4#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
5 6
6enum 7enum
diff --git a/include/linux/tc_ematch/tc_em_nbyte.h b/include/linux/tc_ematch/tc_em_nbyte.h
index f19d1f58ec9d..9ed8c2e58488 100644
--- a/include/linux/tc_ematch/tc_em_nbyte.h
+++ b/include/linux/tc_ematch/tc_em_nbyte.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_TC_EM_NBYTE_H 1#ifndef __LINUX_TC_EM_NBYTE_H
2#define __LINUX_TC_EM_NBYTE_H 2#define __LINUX_TC_EM_NBYTE_H
3 3
4#include <linux/types.h>
4#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
5 6
6struct tcf_em_nbyte 7struct tcf_em_nbyte
diff --git a/include/linux/tc_ematch/tc_em_text.h b/include/linux/tc_ematch/tc_em_text.h
index 7cd43e99c7f5..d12a73a225fc 100644
--- a/include/linux/tc_ematch/tc_em_text.h
+++ b/include/linux/tc_ematch/tc_em_text.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_TC_EM_TEXT_H 1#ifndef __LINUX_TC_EM_TEXT_H
2#define __LINUX_TC_EM_TEXT_H 2#define __LINUX_TC_EM_TEXT_H
3 3
4#include <linux/types.h>
4#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
5 6
6#define TC_EM_TEXT_ALGOSIZ 16 7#define TC_EM_TEXT_ALGOSIZ 16
diff --git a/include/linux/timerfd.h b/include/linux/timerfd.h
index 86cb0501d3e2..2d0792983f8c 100644
--- a/include/linux/timerfd.h
+++ b/include/linux/timerfd.h
@@ -11,13 +11,21 @@
11/* For O_CLOEXEC and O_NONBLOCK */ 11/* For O_CLOEXEC and O_NONBLOCK */
12#include <linux/fcntl.h> 12#include <linux/fcntl.h>
13 13
14/* Flags for timerfd_settime. */ 14/*
15 * CAREFUL: Check include/asm-generic/fcntl.h when defining
16 * new flags, since they might collide with O_* ones. We want
17 * to re-use O_* flags that couldn't possibly have a meaning
18 * from eventfd, in order to leave a free define-space for
19 * shared O_* flags.
20 */
15#define TFD_TIMER_ABSTIME (1 << 0) 21#define TFD_TIMER_ABSTIME (1 << 0)
16
17/* Flags for timerfd_create. */
18#define TFD_CLOEXEC O_CLOEXEC 22#define TFD_CLOEXEC O_CLOEXEC
19#define TFD_NONBLOCK O_NONBLOCK 23#define TFD_NONBLOCK O_NONBLOCK
20 24
25#define TFD_SHARED_FCNTL_FLAGS (TFD_CLOEXEC | TFD_NONBLOCK)
26/* Flags for timerfd_create. */
27#define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS
28/* Flags for timerfd_settime. */
29#define TFD_SETTIME_FLAGS TFD_TIMER_ABSTIME
21 30
22#endif /* _LINUX_TIMERFD_H */ 31#endif /* _LINUX_TIMERFD_H */
23
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 85ee9be9361e..88079fd60235 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -418,6 +418,8 @@ struct usb_tt;
418 * @autosuspend_disabled: autosuspend disabled by the user 418 * @autosuspend_disabled: autosuspend disabled by the user
419 * @autoresume_disabled: autoresume disabled by the user 419 * @autoresume_disabled: autoresume disabled by the user
420 * @skip_sys_resume: skip the next system resume 420 * @skip_sys_resume: skip the next system resume
421 * @wusb_dev: if this is a Wireless USB device, link to the WUSB
422 * specific data for the device.
421 * 423 *
422 * Notes: 424 * Notes:
423 * Usbcore drivers should not set usbdev->state directly. Instead use 425 * Usbcore drivers should not set usbdev->state directly. Instead use
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h
index 18a729343ffa..3c86ed25a04c 100644
--- a/include/linux/usb/cdc.h
+++ b/include/linux/usb/cdc.h
@@ -9,6 +9,8 @@
9#ifndef __LINUX_USB_CDC_H 9#ifndef __LINUX_USB_CDC_H
10#define __LINUX_USB_CDC_H 10#define __LINUX_USB_CDC_H
11 11
12#include <linux/types.h>
13
12#define USB_CDC_SUBCLASS_ACM 0x02 14#define USB_CDC_SUBCLASS_ACM 0x02
13#define USB_CDC_SUBCLASS_ETHERNET 0x06 15#define USB_CDC_SUBCLASS_ETHERNET 0x06
14#define USB_CDC_SUBCLASS_WHCM 0x08 16#define USB_CDC_SUBCLASS_WHCM 0x08
diff --git a/include/linux/usb/gadgetfs.h b/include/linux/usb/gadgetfs.h
index ea45f265ec05..612102e4d75e 100644
--- a/include/linux/usb/gadgetfs.h
+++ b/include/linux/usb/gadgetfs.h
@@ -18,7 +18,7 @@
18#ifndef __LINUX_USB_GADGETFS_H 18#ifndef __LINUX_USB_GADGETFS_H
19#define __LINUX_USB_GADGETFS_H 19#define __LINUX_USB_GADGETFS_H
20 20
21#include <asm/types.h> 21#include <linux/types.h>
22#include <asm/ioctl.h> 22#include <asm/ioctl.h>
23 23
24#include <linux/usb/ch9.h> 24#include <linux/usb/ch9.h>
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index ba09fe88adda..7d3822243074 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -197,7 +197,9 @@ extern int usbnet_nway_reset(struct net_device *net);
197#define devdbg(usbnet, fmt, arg...) \ 197#define devdbg(usbnet, fmt, arg...) \
198 printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg) 198 printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , ## arg)
199#else 199#else
200#define devdbg(usbnet, fmt, arg...) do {} while(0) 200#define devdbg(usbnet, fmt, arg...) \
201 ({ if (0) printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net->name , \
202 ## arg); 0; })
201#endif 203#endif
202 204
203#define deverr(usbnet, fmt, arg...) \ 205#define deverr(usbnet, fmt, arg...) \
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 315bcd375224..cc4f45361dbb 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -13,6 +13,7 @@ struct user_namespace {
13 struct kref kref; 13 struct kref kref;
14 struct hlist_head uidhash_table[UIDHASH_SZ]; 14 struct hlist_head uidhash_table[UIDHASH_SZ];
15 struct user_struct *creator; 15 struct user_struct *creator;
16 struct work_struct destroyer;
16}; 17};
17 18
18extern struct user_namespace init_user_ns; 19extern struct user_namespace init_user_ns;
diff --git a/include/linux/video_decoder.h b/include/linux/video_decoder.h
index 121e26da2c18..e26c0c86a6ea 100644
--- a/include/linux/video_decoder.h
+++ b/include/linux/video_decoder.h
@@ -1,6 +1,8 @@
1#ifndef _LINUX_VIDEO_DECODER_H 1#ifndef _LINUX_VIDEO_DECODER_H
2#define _LINUX_VIDEO_DECODER_H 2#define _LINUX_VIDEO_DECODER_H
3 3
4#include <linux/types.h>
5
4#define HAVE_VIDEO_DECODER 1 6#define HAVE_VIDEO_DECODER 1
5 7
6struct video_decoder_capability { /* this name is too long */ 8struct video_decoder_capability { /* this name is too long */
diff --git a/include/linux/video_encoder.h b/include/linux/video_encoder.h
index 4b0e6907a7b4..b7b6423bbb8a 100644
--- a/include/linux/video_encoder.h
+++ b/include/linux/video_encoder.h
@@ -1,6 +1,8 @@
1#ifndef _LINUX_VIDEO_ENCODER_H 1#ifndef _LINUX_VIDEO_ENCODER_H
2#define _LINUX_VIDEO_ENCODER_H 2#define _LINUX_VIDEO_ENCODER_H
3 3
4#include <linux/types.h>
5
4struct video_encoder_capability { /* this name is too long */ 6struct video_encoder_capability { /* this name is too long */
5 __u32 flags; 7 __u32 flags;
6#define VIDEO_ENCODER_PAL 1 /* can encode PAL signal */ 8#define VIDEO_ENCODER_PAL 1 /* can encode PAL signal */
diff --git a/include/linux/videodev.h b/include/linux/videodev.h
index 15a653d41132..837f392fbe97 100644
--- a/include/linux/videodev.h
+++ b/include/linux/videodev.h
@@ -12,6 +12,7 @@
12#ifndef __LINUX_VIDEODEV_H 12#ifndef __LINUX_VIDEODEV_H
13#define __LINUX_VIDEODEV_H 13#define __LINUX_VIDEODEV_H
14 14
15#include <linux/types.h>
15#include <linux/ioctl.h> 16#include <linux/ioctl.h>
16#include <linux/videodev2.h> 17#include <linux/videodev2.h>
17 18
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
index c1aef85243bf..94c56d29869d 100644
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -2,6 +2,7 @@
2#define _LINUX_VIRTIO_BLK_H 2#define _LINUX_VIRTIO_BLK_H
3/* This header is BSD licensed so anyone can use the definitions to implement 3/* This header is BSD licensed so anyone can use the definitions to implement
4 * compatible drivers/servers. */ 4 * compatible drivers/servers. */
5#include <linux/types.h>
5#include <linux/virtio_config.h> 6#include <linux/virtio_config.h>
6 7
7/* The ID for virtio_block */ 8/* The ID for virtio_block */
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h
index 7615ffcdd555..dc161115ae35 100644
--- a/include/linux/virtio_console.h
+++ b/include/linux/virtio_console.h
@@ -1,5 +1,6 @@
1#ifndef _LINUX_VIRTIO_CONSOLE_H 1#ifndef _LINUX_VIRTIO_CONSOLE_H
2#define _LINUX_VIRTIO_CONSOLE_H 2#define _LINUX_VIRTIO_CONSOLE_H
3#include <linux/types.h>
3#include <linux/virtio_config.h> 4#include <linux/virtio_config.h>
4/* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so 5/* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
5 * anyone can use the definitions to implement compatible drivers/servers. */ 6 * anyone can use the definitions to implement compatible drivers/servers. */
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 5cdd0aa8bde9..3efa86c3ecb3 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -2,6 +2,7 @@
2#define _LINUX_VIRTIO_NET_H 2#define _LINUX_VIRTIO_NET_H
3/* This header is BSD licensed so anyone can use the definitions to implement 3/* This header is BSD licensed so anyone can use the definitions to implement
4 * compatible drivers/servers. */ 4 * compatible drivers/servers. */
5#include <linux/types.h>
5#include <linux/virtio_config.h> 6#include <linux/virtio_config.h>
6 7
7/* The ID for virtio_net */ 8/* The ID for virtio_net */
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 506e7620a986..9c0890c7a06a 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -84,6 +84,10 @@ extern struct vm_struct *get_vm_area_caller(unsigned long size,
84 unsigned long flags, void *caller); 84 unsigned long flags, void *caller);
85extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, 85extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
86 unsigned long start, unsigned long end); 86 unsigned long start, unsigned long end);
87extern struct vm_struct *__get_vm_area_caller(unsigned long size,
88 unsigned long flags,
89 unsigned long start, unsigned long end,
90 void *caller);
87extern struct vm_struct *get_vm_area_node(unsigned long size, 91extern struct vm_struct *get_vm_area_node(unsigned long size,
88 unsigned long flags, int node, 92 unsigned long flags, int node,
89 gfp_t gfp_mask); 93 gfp_t gfp_mask);
diff --git a/include/linux/wait.h b/include/linux/wait.h
index ef609f842fac..a210ede73b56 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -132,6 +132,8 @@ static inline void __remove_wait_queue(wait_queue_head_t *head,
132 list_del(&old->task_list); 132 list_del(&old->task_list);
133} 133}
134 134
135void __wake_up_common(wait_queue_head_t *q, unsigned int mode,
136 int nr_exclusive, int sync, void *key);
135void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); 137void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);
136extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); 138extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
137extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); 139extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
@@ -333,16 +335,19 @@ do { \
333 for (;;) { \ 335 for (;;) { \
334 prepare_to_wait_exclusive(&wq, &__wait, \ 336 prepare_to_wait_exclusive(&wq, &__wait, \
335 TASK_INTERRUPTIBLE); \ 337 TASK_INTERRUPTIBLE); \
336 if (condition) \ 338 if (condition) { \
339 finish_wait(&wq, &__wait); \
337 break; \ 340 break; \
341 } \
338 if (!signal_pending(current)) { \ 342 if (!signal_pending(current)) { \
339 schedule(); \ 343 schedule(); \
340 continue; \ 344 continue; \
341 } \ 345 } \
342 ret = -ERESTARTSYS; \ 346 ret = -ERESTARTSYS; \
347 abort_exclusive_wait(&wq, &__wait, \
348 TASK_INTERRUPTIBLE, NULL); \
343 break; \ 349 break; \
344 } \ 350 } \
345 finish_wait(&wq, &__wait); \
346} while (0) 351} while (0)
347 352
348#define wait_event_interruptible_exclusive(wq, condition) \ 353#define wait_event_interruptible_exclusive(wq, condition) \
@@ -431,6 +436,8 @@ extern long interruptible_sleep_on_timeout(wait_queue_head_t *q,
431void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); 436void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
432void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); 437void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
433void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); 438void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
439void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait,
440 unsigned int mode, void *key);
434int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); 441int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
435int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); 442int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
436 443
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b36291130f22..3cd51e579ab1 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -118,12 +118,24 @@ struct execute_work {
118 init_timer(&(_work)->timer); \ 118 init_timer(&(_work)->timer); \
119 } while (0) 119 } while (0)
120 120
121#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
122 do { \
123 INIT_WORK(&(_work)->work, (_func)); \
124 init_timer_on_stack(&(_work)->timer); \
125 } while (0)
126
121#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ 127#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
122 do { \ 128 do { \
123 INIT_WORK(&(_work)->work, (_func)); \ 129 INIT_WORK(&(_work)->work, (_func)); \
124 init_timer_deferrable(&(_work)->timer); \ 130 init_timer_deferrable(&(_work)->timer); \
125 } while (0) 131 } while (0)
126 132
133#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
134 do { \
135 INIT_WORK(&(_work)->work, (_func)); \
136 init_timer_on_stack(&(_work)->timer); \
137 } while (0)
138
127/** 139/**
128 * work_pending - Find out whether a work item is currently pending 140 * work_pending - Find out whether a work item is currently pending
129 * @work: The work item in question 141 * @work: The work item in question