diff options
Diffstat (limited to 'include/linux')
30 files changed, 337 insertions, 91 deletions
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index ca16c3801a1e..be33b3affc8a 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
| @@ -150,6 +150,7 @@ struct clcd_fb { | |||
| 150 | u16 off_cntl; | 150 | u16 off_cntl; |
| 151 | u32 clcd_cntl; | 151 | u32 clcd_cntl; |
| 152 | u32 cmap[16]; | 152 | u32 cmap[16]; |
| 153 | bool clk_enabled; | ||
| 153 | }; | 154 | }; |
| 154 | 155 | ||
| 155 | static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | 156 | static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index c809e286d213..a065612fc928 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -50,8 +50,8 @@ struct linux_binprm{ | |||
| 50 | int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */ | 50 | int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */ |
| 51 | unsigned int per_clear; /* bits to clear in current->personality */ | 51 | unsigned int per_clear; /* bits to clear in current->personality */ |
| 52 | int argc, envc; | 52 | int argc, envc; |
| 53 | char * filename; /* Name of binary as seen by procps */ | 53 | const char * filename; /* Name of binary as seen by procps */ |
| 54 | char * interp; /* Name of the binary really executed. Most | 54 | const char * interp; /* Name of the binary really executed. Most |
| 55 | of the time same as filename, but could be | 55 | of the time same as filename, but could be |
| 56 | different for binfmt_{misc,script} */ | 56 | different for binfmt_{misc,script} */ |
| 57 | unsigned interp_flags; | 57 | unsigned interp_flags; |
| @@ -126,7 +126,8 @@ extern int setup_arg_pages(struct linux_binprm * bprm, | |||
| 126 | unsigned long stack_top, | 126 | unsigned long stack_top, |
| 127 | int executable_stack); | 127 | int executable_stack); |
| 128 | extern int bprm_mm_init(struct linux_binprm *bprm); | 128 | extern int bprm_mm_init(struct linux_binprm *bprm); |
| 129 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | 129 | extern int copy_strings_kernel(int argc, const char *const *argv, |
| 130 | struct linux_binprm *bprm); | ||
| 130 | extern int prepare_bprm_creds(struct linux_binprm *bprm); | 131 | extern int prepare_bprm_creds(struct linux_binprm *bprm); |
| 131 | extern void install_exec_creds(struct linux_binprm *bprm); | 132 | extern void install_exec_creds(struct linux_binprm *bprm); |
| 132 | extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); | 133 | extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 43e649a72529..ec94c12f21da 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -32,7 +32,6 @@ enum bh_state_bits { | |||
| 32 | BH_Delay, /* Buffer is not yet allocated on disk */ | 32 | BH_Delay, /* Buffer is not yet allocated on disk */ |
| 33 | BH_Boundary, /* Block is followed by a discontiguity */ | 33 | BH_Boundary, /* Block is followed by a discontiguity */ |
| 34 | BH_Write_EIO, /* I/O error on write */ | 34 | BH_Write_EIO, /* I/O error on write */ |
| 35 | BH_Ordered, /* ordered write */ | ||
| 36 | BH_Eopnotsupp, /* operation not supported (barrier) */ | 35 | BH_Eopnotsupp, /* operation not supported (barrier) */ |
| 37 | BH_Unwritten, /* Buffer is allocated on disk but not written */ | 36 | BH_Unwritten, /* Buffer is allocated on disk but not written */ |
| 38 | BH_Quiet, /* Buffer Error Prinks to be quiet */ | 37 | BH_Quiet, /* Buffer Error Prinks to be quiet */ |
| @@ -125,7 +124,6 @@ BUFFER_FNS(Async_Write, async_write) | |||
| 125 | BUFFER_FNS(Delay, delay) | 124 | BUFFER_FNS(Delay, delay) |
| 126 | BUFFER_FNS(Boundary, boundary) | 125 | BUFFER_FNS(Boundary, boundary) |
| 127 | BUFFER_FNS(Write_EIO, write_io_error) | 126 | BUFFER_FNS(Write_EIO, write_io_error) |
| 128 | BUFFER_FNS(Ordered, ordered) | ||
| 129 | BUFFER_FNS(Eopnotsupp, eopnotsupp) | 127 | BUFFER_FNS(Eopnotsupp, eopnotsupp) |
| 130 | BUFFER_FNS(Unwritten, unwritten) | 128 | BUFFER_FNS(Unwritten, unwritten) |
| 131 | 129 | ||
| @@ -183,6 +181,8 @@ void unlock_buffer(struct buffer_head *bh); | |||
| 183 | void __lock_buffer(struct buffer_head *bh); | 181 | void __lock_buffer(struct buffer_head *bh); |
| 184 | void ll_rw_block(int, int, struct buffer_head * bh[]); | 182 | void ll_rw_block(int, int, struct buffer_head * bh[]); |
| 185 | int sync_dirty_buffer(struct buffer_head *bh); | 183 | int sync_dirty_buffer(struct buffer_head *bh); |
| 184 | int __sync_dirty_buffer(struct buffer_head *bh, int rw); | ||
| 185 | void write_dirty_buffer(struct buffer_head *bh, int rw); | ||
| 186 | int submit_bh(int, struct buffer_head *); | 186 | int submit_bh(int, struct buffer_head *); |
| 187 | void write_boundary_block(struct block_device *bdev, | 187 | void write_boundary_block(struct block_device *bdev, |
| 188 | sector_t bblock, unsigned blocksize); | 188 | sector_t bblock, unsigned blocksize); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9a96b4d83fc1..76041b614758 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -125,9 +125,6 @@ struct inodes_stat_t { | |||
| 125 | * block layer could (in theory) choose to ignore this | 125 | * block layer could (in theory) choose to ignore this |
| 126 | * request if it runs into resource problems. | 126 | * request if it runs into resource problems. |
| 127 | * WRITE A normal async write. Device will be plugged. | 127 | * WRITE A normal async write. Device will be plugged. |
| 128 | * SWRITE Like WRITE, but a special case for ll_rw_block() that | ||
| 129 | * tells it to lock the buffer first. Normally a buffer | ||
| 130 | * must be locked before doing IO. | ||
| 131 | * WRITE_SYNC_PLUG Synchronous write. Identical to WRITE, but passes down | 128 | * WRITE_SYNC_PLUG Synchronous write. Identical to WRITE, but passes down |
| 132 | * the hint that someone will be waiting on this IO | 129 | * the hint that someone will be waiting on this IO |
| 133 | * shortly. The device must still be unplugged explicitly, | 130 | * shortly. The device must still be unplugged explicitly, |
| @@ -138,9 +135,6 @@ struct inodes_stat_t { | |||
| 138 | * immediately after submission. The write equivalent | 135 | * immediately after submission. The write equivalent |
| 139 | * of READ_SYNC. | 136 | * of READ_SYNC. |
| 140 | * WRITE_ODIRECT_PLUG Special case write for O_DIRECT only. | 137 | * WRITE_ODIRECT_PLUG Special case write for O_DIRECT only. |
| 141 | * SWRITE_SYNC | ||
| 142 | * SWRITE_SYNC_PLUG Like WRITE_SYNC/WRITE_SYNC_PLUG, but locks the buffer. | ||
| 143 | * See SWRITE. | ||
| 144 | * WRITE_BARRIER Like WRITE_SYNC, but tells the block layer that all | 138 | * WRITE_BARRIER Like WRITE_SYNC, but tells the block layer that all |
| 145 | * previously submitted writes must be safely on storage | 139 | * previously submitted writes must be safely on storage |
| 146 | * before this one is started. Also guarantees that when | 140 | * before this one is started. Also guarantees that when |
| @@ -155,7 +149,6 @@ struct inodes_stat_t { | |||
| 155 | #define READ 0 | 149 | #define READ 0 |
| 156 | #define WRITE RW_MASK | 150 | #define WRITE RW_MASK |
| 157 | #define READA RWA_MASK | 151 | #define READA RWA_MASK |
| 158 | #define SWRITE (WRITE | READA) | ||
| 159 | 152 | ||
| 160 | #define READ_SYNC (READ | REQ_SYNC | REQ_UNPLUG) | 153 | #define READ_SYNC (READ | REQ_SYNC | REQ_UNPLUG) |
| 161 | #define READ_META (READ | REQ_META) | 154 | #define READ_META (READ | REQ_META) |
| @@ -165,8 +158,6 @@ struct inodes_stat_t { | |||
| 165 | #define WRITE_META (WRITE | REQ_META) | 158 | #define WRITE_META (WRITE | REQ_META) |
| 166 | #define WRITE_BARRIER (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \ | 159 | #define WRITE_BARRIER (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \ |
| 167 | REQ_HARDBARRIER) | 160 | REQ_HARDBARRIER) |
| 168 | #define SWRITE_SYNC_PLUG (SWRITE | REQ_SYNC | REQ_NOIDLE) | ||
| 169 | #define SWRITE_SYNC (SWRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG) | ||
| 170 | 161 | ||
| 171 | /* | 162 | /* |
| 172 | * These aren't really reads or writes, they pass down information about | 163 | * These aren't really reads or writes, they pass down information about |
| @@ -929,6 +920,9 @@ struct file { | |||
| 929 | #define f_vfsmnt f_path.mnt | 920 | #define f_vfsmnt f_path.mnt |
| 930 | const struct file_operations *f_op; | 921 | const struct file_operations *f_op; |
| 931 | spinlock_t f_lock; /* f_ep_links, f_flags, no IRQ */ | 922 | spinlock_t f_lock; /* f_ep_links, f_flags, no IRQ */ |
| 923 | #ifdef CONFIG_SMP | ||
| 924 | int f_sb_list_cpu; | ||
| 925 | #endif | ||
| 932 | atomic_long_t f_count; | 926 | atomic_long_t f_count; |
| 933 | unsigned int f_flags; | 927 | unsigned int f_flags; |
| 934 | fmode_t f_mode; | 928 | fmode_t f_mode; |
| @@ -953,9 +947,6 @@ struct file { | |||
| 953 | unsigned long f_mnt_write_state; | 947 | unsigned long f_mnt_write_state; |
| 954 | #endif | 948 | #endif |
| 955 | }; | 949 | }; |
| 956 | extern spinlock_t files_lock; | ||
| 957 | #define file_list_lock() spin_lock(&files_lock); | ||
| 958 | #define file_list_unlock() spin_unlock(&files_lock); | ||
| 959 | 950 | ||
| 960 | #define get_file(x) atomic_long_inc(&(x)->f_count) | 951 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
| 961 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | 952 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) |
| @@ -1346,7 +1337,11 @@ struct super_block { | |||
| 1346 | 1337 | ||
| 1347 | struct list_head s_inodes; /* all inodes */ | 1338 | struct list_head s_inodes; /* all inodes */ |
| 1348 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ | 1339 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ |
| 1340 | #ifdef CONFIG_SMP | ||
| 1341 | struct list_head __percpu *s_files; | ||
| 1342 | #else | ||
| 1349 | struct list_head s_files; | 1343 | struct list_head s_files; |
| 1344 | #endif | ||
| 1350 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ | 1345 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ |
| 1351 | struct list_head s_dentry_lru; /* unused dentry lru */ | 1346 | struct list_head s_dentry_lru; /* unused dentry lru */ |
| 1352 | int s_nr_dentry_unused; /* # of dentry on lru */ | 1347 | int s_nr_dentry_unused; /* # of dentry on lru */ |
| @@ -2197,8 +2192,6 @@ static inline void insert_inode_hash(struct inode *inode) { | |||
| 2197 | __insert_inode_hash(inode, inode->i_ino); | 2192 | __insert_inode_hash(inode, inode->i_ino); |
| 2198 | } | 2193 | } |
| 2199 | 2194 | ||
| 2200 | extern void file_move(struct file *f, struct list_head *list); | ||
| 2201 | extern void file_kill(struct file *f); | ||
| 2202 | #ifdef CONFIG_BLOCK | 2195 | #ifdef CONFIG_BLOCK |
| 2203 | extern void submit_bio(int, struct bio *); | 2196 | extern void submit_bio(int, struct bio *); |
| 2204 | extern int bdev_read_only(struct block_device *); | 2197 | extern int bdev_read_only(struct block_device *); |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index eca3d5202138..a42b5bf02f8b 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | struct fs_struct { | 6 | struct fs_struct { |
| 7 | int users; | 7 | int users; |
| 8 | rwlock_t lock; | 8 | spinlock_t lock; |
| 9 | int umask; | 9 | int umask; |
| 10 | int in_exec; | 10 | int in_exec; |
| 11 | struct path root, pwd; | 11 | struct path root, pwd; |
| @@ -23,29 +23,29 @@ extern int unshare_fs_struct(void); | |||
| 23 | 23 | ||
| 24 | static inline void get_fs_root(struct fs_struct *fs, struct path *root) | 24 | static inline void get_fs_root(struct fs_struct *fs, struct path *root) |
| 25 | { | 25 | { |
| 26 | read_lock(&fs->lock); | 26 | spin_lock(&fs->lock); |
| 27 | *root = fs->root; | 27 | *root = fs->root; |
| 28 | path_get(root); | 28 | path_get(root); |
| 29 | read_unlock(&fs->lock); | 29 | spin_unlock(&fs->lock); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd) | 32 | static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd) |
| 33 | { | 33 | { |
| 34 | read_lock(&fs->lock); | 34 | spin_lock(&fs->lock); |
| 35 | *pwd = fs->pwd; | 35 | *pwd = fs->pwd; |
| 36 | path_get(pwd); | 36 | path_get(pwd); |
| 37 | read_unlock(&fs->lock); | 37 | spin_unlock(&fs->lock); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, | 40 | static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, |
| 41 | struct path *pwd) | 41 | struct path *pwd) |
| 42 | { | 42 | { |
| 43 | read_lock(&fs->lock); | 43 | spin_lock(&fs->lock); |
| 44 | *root = fs->root; | 44 | *root = fs->root; |
| 45 | path_get(root); | 45 | path_get(root); |
| 46 | *pwd = fs->pwd; | 46 | *pwd = fs->pwd; |
| 47 | path_get(pwd); | 47 | path_get(pwd); |
| 48 | read_unlock(&fs->lock); | 48 | spin_unlock(&fs->lock); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | #endif /* _LINUX_FS_STRUCT_H */ | 51 | #endif /* _LINUX_FS_STRUCT_H */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index c831467774d0..bed7a4682b90 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
| @@ -119,7 +119,7 @@ struct ethhdr { | |||
| 119 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ | 119 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
| 120 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ | 120 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
| 121 | __be16 h_proto; /* packet type ID field */ | 121 | __be16 h_proto; /* packet type ID field */ |
| 122 | } __packed; | 122 | } __attribute__((packed)); |
| 123 | 123 | ||
| 124 | #ifdef __KERNEL__ | 124 | #ifdef __KERNEL__ |
| 125 | #include <linux/skbuff.h> | 125 | #include <linux/skbuff.h> |
diff --git a/include/linux/if_fddi.h b/include/linux/if_fddi.h index 9947c39e62f6..e6dc11e7f9a5 100644 --- a/include/linux/if_fddi.h +++ b/include/linux/if_fddi.h | |||
| @@ -67,7 +67,7 @@ struct fddi_8022_1_hdr { | |||
| 67 | __u8 dsap; /* destination service access point */ | 67 | __u8 dsap; /* destination service access point */ |
| 68 | __u8 ssap; /* source service access point */ | 68 | __u8 ssap; /* source service access point */ |
| 69 | __u8 ctrl; /* control byte #1 */ | 69 | __u8 ctrl; /* control byte #1 */ |
| 70 | } __packed; | 70 | } __attribute__((packed)); |
| 71 | 71 | ||
| 72 | /* Define 802.2 Type 2 header */ | 72 | /* Define 802.2 Type 2 header */ |
| 73 | struct fddi_8022_2_hdr { | 73 | struct fddi_8022_2_hdr { |
| @@ -75,7 +75,7 @@ struct fddi_8022_2_hdr { | |||
| 75 | __u8 ssap; /* source service access point */ | 75 | __u8 ssap; /* source service access point */ |
| 76 | __u8 ctrl_1; /* control byte #1 */ | 76 | __u8 ctrl_1; /* control byte #1 */ |
| 77 | __u8 ctrl_2; /* control byte #2 */ | 77 | __u8 ctrl_2; /* control byte #2 */ |
| 78 | } __packed; | 78 | } __attribute__((packed)); |
| 79 | 79 | ||
| 80 | /* Define 802.2 SNAP header */ | 80 | /* Define 802.2 SNAP header */ |
| 81 | #define FDDI_K_OUI_LEN 3 | 81 | #define FDDI_K_OUI_LEN 3 |
| @@ -85,7 +85,7 @@ struct fddi_snap_hdr { | |||
| 85 | __u8 ctrl; /* always 0x03 */ | 85 | __u8 ctrl; /* always 0x03 */ |
| 86 | __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ | 86 | __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ |
| 87 | __be16 ethertype; /* packet type ID field */ | 87 | __be16 ethertype; /* packet type ID field */ |
| 88 | } __packed; | 88 | } __attribute__((packed)); |
| 89 | 89 | ||
| 90 | /* Define FDDI LLC frame header */ | 90 | /* Define FDDI LLC frame header */ |
| 91 | struct fddihdr { | 91 | struct fddihdr { |
| @@ -98,7 +98,7 @@ struct fddihdr { | |||
| 98 | struct fddi_8022_2_hdr llc_8022_2; | 98 | struct fddi_8022_2_hdr llc_8022_2; |
| 99 | struct fddi_snap_hdr llc_snap; | 99 | struct fddi_snap_hdr llc_snap; |
| 100 | } hdr; | 100 | } hdr; |
| 101 | } __packed; | 101 | } __attribute__((packed)); |
| 102 | 102 | ||
| 103 | #ifdef __KERNEL__ | 103 | #ifdef __KERNEL__ |
| 104 | #include <linux/netdevice.h> | 104 | #include <linux/netdevice.h> |
diff --git a/include/linux/if_hippi.h b/include/linux/if_hippi.h index 5fe5f307c6f5..cdc049f1829a 100644 --- a/include/linux/if_hippi.h +++ b/include/linux/if_hippi.h | |||
| @@ -104,7 +104,7 @@ struct hippi_fp_hdr { | |||
| 104 | __be32 fixed; | 104 | __be32 fixed; |
| 105 | #endif | 105 | #endif |
| 106 | __be32 d2_size; | 106 | __be32 d2_size; |
| 107 | } __packed; | 107 | } __attribute__((packed)); |
| 108 | 108 | ||
| 109 | struct hippi_le_hdr { | 109 | struct hippi_le_hdr { |
| 110 | #if defined (__BIG_ENDIAN_BITFIELD) | 110 | #if defined (__BIG_ENDIAN_BITFIELD) |
| @@ -129,7 +129,7 @@ struct hippi_le_hdr { | |||
| 129 | __u8 daddr[HIPPI_ALEN]; | 129 | __u8 daddr[HIPPI_ALEN]; |
| 130 | __u16 locally_administered; | 130 | __u16 locally_administered; |
| 131 | __u8 saddr[HIPPI_ALEN]; | 131 | __u8 saddr[HIPPI_ALEN]; |
| 132 | } __packed; | 132 | } __attribute__((packed)); |
| 133 | 133 | ||
| 134 | #define HIPPI_OUI_LEN 3 | 134 | #define HIPPI_OUI_LEN 3 |
| 135 | /* | 135 | /* |
| @@ -142,12 +142,12 @@ struct hippi_snap_hdr { | |||
| 142 | __u8 ctrl; /* always 0x03 */ | 142 | __u8 ctrl; /* always 0x03 */ |
| 143 | __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/ | 143 | __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/ |
| 144 | __be16 ethertype; /* packet type ID field */ | 144 | __be16 ethertype; /* packet type ID field */ |
| 145 | } __packed; | 145 | } __attribute__((packed)); |
| 146 | 146 | ||
| 147 | struct hippi_hdr { | 147 | struct hippi_hdr { |
| 148 | struct hippi_fp_hdr fp; | 148 | struct hippi_fp_hdr fp; |
| 149 | struct hippi_le_hdr le; | 149 | struct hippi_le_hdr le; |
| 150 | struct hippi_snap_hdr snap; | 150 | struct hippi_snap_hdr snap; |
| 151 | } __packed; | 151 | } __attribute__((packed)); |
| 152 | 152 | ||
| 153 | #endif /* _LINUX_IF_HIPPI_H */ | 153 | #endif /* _LINUX_IF_HIPPI_H */ |
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 1925e0c3f162..27741e05446f 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
| @@ -59,7 +59,7 @@ struct sockaddr_pppox { | |||
| 59 | union{ | 59 | union{ |
| 60 | struct pppoe_addr pppoe; | 60 | struct pppoe_addr pppoe; |
| 61 | }sa_addr; | 61 | }sa_addr; |
| 62 | } __packed; | 62 | } __attribute__((packed)); |
| 63 | 63 | ||
| 64 | /* The use of the above union isn't viable because the size of this | 64 | /* The use of the above union isn't viable because the size of this |
| 65 | * struct must stay fixed over time -- applications use sizeof(struct | 65 | * struct must stay fixed over time -- applications use sizeof(struct |
| @@ -70,7 +70,7 @@ struct sockaddr_pppol2tp { | |||
| 70 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 70 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 71 | unsigned int sa_protocol; /* protocol identifier */ | 71 | unsigned int sa_protocol; /* protocol identifier */ |
| 72 | struct pppol2tp_addr pppol2tp; | 72 | struct pppol2tp_addr pppol2tp; |
| 73 | } __packed; | 73 | } __attribute__((packed)); |
| 74 | 74 | ||
| 75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 | 75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 |
| 76 | * bits. So we need a different sockaddr structure. | 76 | * bits. So we need a different sockaddr structure. |
| @@ -79,7 +79,7 @@ struct sockaddr_pppol2tpv3 { | |||
| 79 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 79 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 80 | unsigned int sa_protocol; /* protocol identifier */ | 80 | unsigned int sa_protocol; /* protocol identifier */ |
| 81 | struct pppol2tpv3_addr pppol2tp; | 81 | struct pppol2tpv3_addr pppol2tp; |
| 82 | } __packed; | 82 | } __attribute__((packed)); |
| 83 | 83 | ||
| 84 | /********************************************************************* | 84 | /********************************************************************* |
| 85 | * | 85 | * |
| @@ -101,7 +101,7 @@ struct pppoe_tag { | |||
| 101 | __be16 tag_type; | 101 | __be16 tag_type; |
| 102 | __be16 tag_len; | 102 | __be16 tag_len; |
| 103 | char tag_data[0]; | 103 | char tag_data[0]; |
| 104 | } __attribute ((packed)); | 104 | } __attribute__ ((packed)); |
| 105 | 105 | ||
| 106 | /* Tag identifiers */ | 106 | /* Tag identifiers */ |
| 107 | #define PTT_EOL __cpu_to_be16(0x0000) | 107 | #define PTT_EOL __cpu_to_be16(0x0000) |
| @@ -129,7 +129,7 @@ struct pppoe_hdr { | |||
| 129 | __be16 sid; | 129 | __be16 sid; |
| 130 | __be16 length; | 130 | __be16 length; |
| 131 | struct pppoe_tag tag[0]; | 131 | struct pppoe_tag tag[0]; |
| 132 | } __packed; | 132 | } __attribute__((packed)); |
| 133 | 133 | ||
| 134 | /* Length of entire PPPoE + PPP header */ | 134 | /* Length of entire PPPoE + PPP header */ |
| 135 | #define PPPOE_SES_HLEN 8 | 135 | #define PPPOE_SES_HLEN 8 |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index ab9e9e89e407..e62683ba88e6 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -58,7 +58,7 @@ struct ipv6_opt_hdr { | |||
| 58 | /* | 58 | /* |
| 59 | * TLV encoded option data follows. | 59 | * TLV encoded option data follows. |
| 60 | */ | 60 | */ |
| 61 | } __packed; /* required for some archs */ | 61 | } __attribute__((packed)); /* required for some archs */ |
| 62 | 62 | ||
| 63 | #define ipv6_destopt_hdr ipv6_opt_hdr | 63 | #define ipv6_destopt_hdr ipv6_opt_hdr |
| 64 | #define ipv6_hopopt_hdr ipv6_opt_hdr | 64 | #define ipv6_hopopt_hdr ipv6_opt_hdr |
| @@ -99,7 +99,7 @@ struct ipv6_destopt_hao { | |||
| 99 | __u8 type; | 99 | __u8 type; |
| 100 | __u8 length; | 100 | __u8 length; |
| 101 | struct in6_addr addr; | 101 | struct in6_addr addr; |
| 102 | } __packed; | 102 | } __attribute__((packed)); |
| 103 | 103 | ||
| 104 | /* | 104 | /* |
| 105 | * IPv6 fixed header | 105 | * IPv6 fixed header |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 311f8753d713..4aa95f203f3e 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -836,6 +836,8 @@ extern void __kfifo_dma_out_finish_r(struct __kfifo *fifo, size_t recsize); | |||
| 836 | 836 | ||
| 837 | extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize); | 837 | extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize); |
| 838 | 838 | ||
| 839 | extern void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize); | ||
| 840 | |||
| 839 | extern unsigned int __kfifo_out_peek_r(struct __kfifo *fifo, | 841 | extern unsigned int __kfifo_out_peek_r(struct __kfifo *fifo, |
| 840 | void *buf, unsigned int len, size_t recsize); | 842 | void *buf, unsigned int len, size_t recsize); |
| 841 | 843 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index cf343a852534..7950a37a7146 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/compiler.h> | 22 | #include <linux/compiler.h> |
| 23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 24 | #include <linux/kref.h> | 24 | #include <linux/kref.h> |
| 25 | #include <linux/kobject_ns.h> | ||
| 25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
| 26 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
| 27 | #include <asm/atomic.h> | 28 | #include <asm/atomic.h> |
| @@ -136,42 +137,8 @@ struct kobj_attribute { | |||
| 136 | 137 | ||
| 137 | extern const struct sysfs_ops kobj_sysfs_ops; | 138 | extern const struct sysfs_ops kobj_sysfs_ops; |
| 138 | 139 | ||
| 139 | /* | ||
| 140 | * Namespace types which are used to tag kobjects and sysfs entries. | ||
| 141 | * Network namespace will likely be the first. | ||
| 142 | */ | ||
| 143 | enum kobj_ns_type { | ||
| 144 | KOBJ_NS_TYPE_NONE = 0, | ||
| 145 | KOBJ_NS_TYPE_NET, | ||
| 146 | KOBJ_NS_TYPES | ||
| 147 | }; | ||
| 148 | |||
| 149 | struct sock; | 140 | struct sock; |
| 150 | 141 | ||
| 151 | /* | ||
| 152 | * Callbacks so sysfs can determine namespaces | ||
| 153 | * @current_ns: return calling task's namespace | ||
| 154 | * @netlink_ns: return namespace to which a sock belongs (right?) | ||
| 155 | * @initial_ns: return the initial namespace (i.e. init_net_ns) | ||
| 156 | */ | ||
| 157 | struct kobj_ns_type_operations { | ||
| 158 | enum kobj_ns_type type; | ||
| 159 | const void *(*current_ns)(void); | ||
| 160 | const void *(*netlink_ns)(struct sock *sk); | ||
| 161 | const void *(*initial_ns)(void); | ||
| 162 | }; | ||
| 163 | |||
| 164 | int kobj_ns_type_register(const struct kobj_ns_type_operations *ops); | ||
| 165 | int kobj_ns_type_registered(enum kobj_ns_type type); | ||
| 166 | const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent); | ||
| 167 | const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj); | ||
| 168 | |||
| 169 | const void *kobj_ns_current(enum kobj_ns_type type); | ||
| 170 | const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk); | ||
| 171 | const void *kobj_ns_initial(enum kobj_ns_type type); | ||
| 172 | void kobj_ns_exit(enum kobj_ns_type type, const void *ns); | ||
| 173 | |||
| 174 | |||
| 175 | /** | 142 | /** |
| 176 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. | 143 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. |
| 177 | * | 144 | * |
diff --git a/include/linux/kobject_ns.h b/include/linux/kobject_ns.h new file mode 100644 index 000000000000..82cb5bf461fb --- /dev/null +++ b/include/linux/kobject_ns.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* Kernel object name space definitions | ||
| 2 | * | ||
| 3 | * Copyright (c) 2002-2003 Patrick Mochel | ||
| 4 | * Copyright (c) 2002-2003 Open Source Development Labs | ||
| 5 | * Copyright (c) 2006-2008 Greg Kroah-Hartman <greg@kroah.com> | ||
| 6 | * Copyright (c) 2006-2008 Novell Inc. | ||
| 7 | * | ||
| 8 | * Split from kobject.h by David Howells (dhowells@redhat.com) | ||
| 9 | * | ||
| 10 | * This file is released under the GPLv2. | ||
| 11 | * | ||
| 12 | * Please read Documentation/kobject.txt before using the kobject | ||
| 13 | * interface, ESPECIALLY the parts about reference counts and object | ||
| 14 | * destructors. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _LINUX_KOBJECT_NS_H | ||
| 18 | #define _LINUX_KOBJECT_NS_H | ||
| 19 | |||
| 20 | struct sock; | ||
| 21 | struct kobject; | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Namespace types which are used to tag kobjects and sysfs entries. | ||
| 25 | * Network namespace will likely be the first. | ||
| 26 | */ | ||
| 27 | enum kobj_ns_type { | ||
| 28 | KOBJ_NS_TYPE_NONE = 0, | ||
| 29 | KOBJ_NS_TYPE_NET, | ||
| 30 | KOBJ_NS_TYPES | ||
| 31 | }; | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Callbacks so sysfs can determine namespaces | ||
| 35 | * @current_ns: return calling task's namespace | ||
| 36 | * @netlink_ns: return namespace to which a sock belongs (right?) | ||
| 37 | * @initial_ns: return the initial namespace (i.e. init_net_ns) | ||
| 38 | */ | ||
| 39 | struct kobj_ns_type_operations { | ||
| 40 | enum kobj_ns_type type; | ||
| 41 | const void *(*current_ns)(void); | ||
| 42 | const void *(*netlink_ns)(struct sock *sk); | ||
| 43 | const void *(*initial_ns)(void); | ||
| 44 | }; | ||
| 45 | |||
| 46 | int kobj_ns_type_register(const struct kobj_ns_type_operations *ops); | ||
| 47 | int kobj_ns_type_registered(enum kobj_ns_type type); | ||
| 48 | const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent); | ||
| 49 | const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj); | ||
| 50 | |||
| 51 | const void *kobj_ns_current(enum kobj_ns_type type); | ||
| 52 | const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk); | ||
| 53 | const void *kobj_ns_initial(enum kobj_ns_type type); | ||
| 54 | void kobj_ns_exit(enum kobj_ns_type type, const void *ns); | ||
| 55 | |||
| 56 | #endif /* _LINUX_KOBJECT_NS_H */ | ||
diff --git a/include/linux/lglock.h b/include/linux/lglock.h new file mode 100644 index 000000000000..b288cb713b90 --- /dev/null +++ b/include/linux/lglock.h | |||
| @@ -0,0 +1,172 @@ | |||
| 1 | /* | ||
| 2 | * Specialised local-global spinlock. Can only be declared as global variables | ||
| 3 | * to avoid overhead and keep things simple (and we don't want to start using | ||
| 4 | * these inside dynamically allocated structures). | ||
| 5 | * | ||
| 6 | * "local/global locks" (lglocks) can be used to: | ||
| 7 | * | ||
| 8 | * - Provide fast exclusive access to per-CPU data, with exclusive access to | ||
| 9 | * another CPU's data allowed but possibly subject to contention, and to | ||
| 10 | * provide very slow exclusive access to all per-CPU data. | ||
| 11 | * - Or to provide very fast and scalable read serialisation, and to provide | ||
| 12 | * very slow exclusive serialisation of data (not necessarily per-CPU data). | ||
| 13 | * | ||
| 14 | * Brlocks are also implemented as a short-hand notation for the latter use | ||
| 15 | * case. | ||
| 16 | * | ||
| 17 | * Copyright 2009, 2010, Nick Piggin, Novell Inc. | ||
| 18 | */ | ||
| 19 | #ifndef __LINUX_LGLOCK_H | ||
| 20 | #define __LINUX_LGLOCK_H | ||
| 21 | |||
| 22 | #include <linux/spinlock.h> | ||
| 23 | #include <linux/lockdep.h> | ||
| 24 | #include <linux/percpu.h> | ||
| 25 | |||
| 26 | /* can make br locks by using local lock for read side, global lock for write */ | ||
| 27 | #define br_lock_init(name) name##_lock_init() | ||
| 28 | #define br_read_lock(name) name##_local_lock() | ||
| 29 | #define br_read_unlock(name) name##_local_unlock() | ||
| 30 | #define br_write_lock(name) name##_global_lock_online() | ||
| 31 | #define br_write_unlock(name) name##_global_unlock_online() | ||
| 32 | |||
| 33 | #define DECLARE_BRLOCK(name) DECLARE_LGLOCK(name) | ||
| 34 | #define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) | ||
| 35 | |||
| 36 | |||
| 37 | #define lg_lock_init(name) name##_lock_init() | ||
| 38 | #define lg_local_lock(name) name##_local_lock() | ||
| 39 | #define lg_local_unlock(name) name##_local_unlock() | ||
| 40 | #define lg_local_lock_cpu(name, cpu) name##_local_lock_cpu(cpu) | ||
| 41 | #define lg_local_unlock_cpu(name, cpu) name##_local_unlock_cpu(cpu) | ||
| 42 | #define lg_global_lock(name) name##_global_lock() | ||
| 43 | #define lg_global_unlock(name) name##_global_unlock() | ||
| 44 | #define lg_global_lock_online(name) name##_global_lock_online() | ||
| 45 | #define lg_global_unlock_online(name) name##_global_unlock_online() | ||
| 46 | |||
| 47 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 48 | #define LOCKDEP_INIT_MAP lockdep_init_map | ||
| 49 | |||
| 50 | #define DEFINE_LGLOCK_LOCKDEP(name) \ | ||
| 51 | struct lock_class_key name##_lock_key; \ | ||
| 52 | struct lockdep_map name##_lock_dep_map; \ | ||
| 53 | EXPORT_SYMBOL(name##_lock_dep_map) | ||
| 54 | |||
| 55 | #else | ||
| 56 | #define LOCKDEP_INIT_MAP(a, b, c, d) | ||
| 57 | |||
| 58 | #define DEFINE_LGLOCK_LOCKDEP(name) | ||
| 59 | #endif | ||
| 60 | |||
| 61 | |||
| 62 | #define DECLARE_LGLOCK(name) \ | ||
| 63 | extern void name##_lock_init(void); \ | ||
| 64 | extern void name##_local_lock(void); \ | ||
| 65 | extern void name##_local_unlock(void); \ | ||
| 66 | extern void name##_local_lock_cpu(int cpu); \ | ||
| 67 | extern void name##_local_unlock_cpu(int cpu); \ | ||
| 68 | extern void name##_global_lock(void); \ | ||
| 69 | extern void name##_global_unlock(void); \ | ||
| 70 | extern void name##_global_lock_online(void); \ | ||
| 71 | extern void name##_global_unlock_online(void); \ | ||
| 72 | |||
| 73 | #define DEFINE_LGLOCK(name) \ | ||
| 74 | \ | ||
| 75 | DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ | ||
| 76 | DEFINE_LGLOCK_LOCKDEP(name); \ | ||
| 77 | \ | ||
| 78 | void name##_lock_init(void) { \ | ||
| 79 | int i; \ | ||
| 80 | LOCKDEP_INIT_MAP(&name##_lock_dep_map, #name, &name##_lock_key, 0); \ | ||
| 81 | for_each_possible_cpu(i) { \ | ||
| 82 | arch_spinlock_t *lock; \ | ||
| 83 | lock = &per_cpu(name##_lock, i); \ | ||
| 84 | *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ | ||
| 85 | } \ | ||
| 86 | } \ | ||
| 87 | EXPORT_SYMBOL(name##_lock_init); \ | ||
| 88 | \ | ||
| 89 | void name##_local_lock(void) { \ | ||
| 90 | arch_spinlock_t *lock; \ | ||
| 91 | preempt_disable(); \ | ||
| 92 | rwlock_acquire_read(&name##_lock_dep_map, 0, 0, _THIS_IP_); \ | ||
| 93 | lock = &__get_cpu_var(name##_lock); \ | ||
| 94 | arch_spin_lock(lock); \ | ||
| 95 | } \ | ||
| 96 | EXPORT_SYMBOL(name##_local_lock); \ | ||
| 97 | \ | ||
| 98 | void name##_local_unlock(void) { \ | ||
| 99 | arch_spinlock_t *lock; \ | ||
| 100 | rwlock_release(&name##_lock_dep_map, 1, _THIS_IP_); \ | ||
| 101 | lock = &__get_cpu_var(name##_lock); \ | ||
| 102 | arch_spin_unlock(lock); \ | ||
| 103 | preempt_enable(); \ | ||
| 104 | } \ | ||
| 105 | EXPORT_SYMBOL(name##_local_unlock); \ | ||
| 106 | \ | ||
| 107 | void name##_local_lock_cpu(int cpu) { \ | ||
| 108 | arch_spinlock_t *lock; \ | ||
| 109 | preempt_disable(); \ | ||
| 110 | rwlock_acquire_read(&name##_lock_dep_map, 0, 0, _THIS_IP_); \ | ||
| 111 | lock = &per_cpu(name##_lock, cpu); \ | ||
| 112 | arch_spin_lock(lock); \ | ||
| 113 | } \ | ||
| 114 | EXPORT_SYMBOL(name##_local_lock_cpu); \ | ||
| 115 | \ | ||
| 116 | void name##_local_unlock_cpu(int cpu) { \ | ||
| 117 | arch_spinlock_t *lock; \ | ||
| 118 | rwlock_release(&name##_lock_dep_map, 1, _THIS_IP_); \ | ||
| 119 | lock = &per_cpu(name##_lock, cpu); \ | ||
| 120 | arch_spin_unlock(lock); \ | ||
| 121 | preempt_enable(); \ | ||
| 122 | } \ | ||
| 123 | EXPORT_SYMBOL(name##_local_unlock_cpu); \ | ||
| 124 | \ | ||
| 125 | void name##_global_lock_online(void) { \ | ||
| 126 | int i; \ | ||
| 127 | preempt_disable(); \ | ||
| 128 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | ||
| 129 | for_each_online_cpu(i) { \ | ||
| 130 | arch_spinlock_t *lock; \ | ||
| 131 | lock = &per_cpu(name##_lock, i); \ | ||
| 132 | arch_spin_lock(lock); \ | ||
| 133 | } \ | ||
| 134 | } \ | ||
| 135 | EXPORT_SYMBOL(name##_global_lock_online); \ | ||
| 136 | \ | ||
| 137 | void name##_global_unlock_online(void) { \ | ||
| 138 | int i; \ | ||
| 139 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | ||
| 140 | for_each_online_cpu(i) { \ | ||
| 141 | arch_spinlock_t *lock; \ | ||
| 142 | lock = &per_cpu(name##_lock, i); \ | ||
| 143 | arch_spin_unlock(lock); \ | ||
| 144 | } \ | ||
| 145 | preempt_enable(); \ | ||
| 146 | } \ | ||
| 147 | EXPORT_SYMBOL(name##_global_unlock_online); \ | ||
| 148 | \ | ||
| 149 | void name##_global_lock(void) { \ | ||
| 150 | int i; \ | ||
| 151 | preempt_disable(); \ | ||
| 152 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | ||
| 153 | for_each_online_cpu(i) { \ | ||
| 154 | arch_spinlock_t *lock; \ | ||
| 155 | lock = &per_cpu(name##_lock, i); \ | ||
| 156 | arch_spin_lock(lock); \ | ||
| 157 | } \ | ||
| 158 | } \ | ||
| 159 | EXPORT_SYMBOL(name##_global_lock); \ | ||
| 160 | \ | ||
| 161 | void name##_global_unlock(void) { \ | ||
| 162 | int i; \ | ||
| 163 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | ||
| 164 | for_each_online_cpu(i) { \ | ||
| 165 | arch_spinlock_t *lock; \ | ||
| 166 | lock = &per_cpu(name##_lock, i); \ | ||
| 167 | arch_spin_unlock(lock); \ | ||
| 168 | } \ | ||
| 169 | preempt_enable(); \ | ||
| 170 | } \ | ||
| 171 | EXPORT_SYMBOL(name##_global_unlock); | ||
| 172 | #endif | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 709f6728fc90..831c693416b2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -78,7 +78,11 @@ extern unsigned int kobjsize(const void *objp); | |||
| 78 | #define VM_MAYSHARE 0x00000080 | 78 | #define VM_MAYSHARE 0x00000080 |
| 79 | 79 | ||
| 80 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ | 80 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ |
| 81 | #if defined(CONFIG_STACK_GROWSUP) || defined(CONFIG_IA64) | ||
| 81 | #define VM_GROWSUP 0x00000200 | 82 | #define VM_GROWSUP 0x00000200 |
| 83 | #else | ||
| 84 | #define VM_GROWSUP 0x00000000 | ||
| 85 | #endif | ||
| 82 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ | 86 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ |
| 83 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 87 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
| 84 | 88 | ||
| @@ -1330,8 +1334,10 @@ unsigned long ra_submit(struct file_ra_state *ra, | |||
| 1330 | 1334 | ||
| 1331 | /* Do stack extension */ | 1335 | /* Do stack extension */ |
| 1332 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); | 1336 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); |
| 1333 | #ifdef CONFIG_IA64 | 1337 | #if VM_GROWSUP |
| 1334 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); | 1338 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); |
| 1339 | #else | ||
| 1340 | #define expand_upwards(vma, address) do { } while (0) | ||
| 1335 | #endif | 1341 | #endif |
| 1336 | extern int expand_stack_downwards(struct vm_area_struct *vma, | 1342 | extern int expand_stack_downwards(struct vm_area_struct *vma, |
| 1337 | unsigned long address); | 1343 | unsigned long address); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index b8bb9a6a1f37..ee7e258627f9 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -134,7 +134,7 @@ struct vm_area_struct { | |||
| 134 | within vm_mm. */ | 134 | within vm_mm. */ |
| 135 | 135 | ||
| 136 | /* linked list of VM areas per task, sorted by address */ | 136 | /* linked list of VM areas per task, sorted by address */ |
| 137 | struct vm_area_struct *vm_next; | 137 | struct vm_area_struct *vm_next, *vm_prev; |
| 138 | 138 | ||
| 139 | pgprot_t vm_page_prot; /* Access permissions of this VMA. */ | 139 | pgprot_t vm_page_prot; /* Access permissions of this VMA. */ |
| 140 | unsigned long vm_flags; /* Flags, see mm.h. */ | 140 | unsigned long vm_flags; /* Flags, see mm.h. */ |
diff --git a/include/linux/nbd.h b/include/linux/nbd.h index bb58854a8061..d146ca10c0f5 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h | |||
| @@ -88,7 +88,7 @@ struct nbd_request { | |||
| 88 | char handle[8]; | 88 | char handle[8]; |
| 89 | __be64 from; | 89 | __be64 from; |
| 90 | __be32 len; | 90 | __be32 len; |
| 91 | } __packed; | 91 | } __attribute__((packed)); |
| 92 | 92 | ||
| 93 | /* | 93 | /* |
| 94 | * This is the reply packet that nbd-server sends back to the client after | 94 | * This is the reply packet that nbd-server sends back to the client after |
diff --git a/include/linux/ncp.h b/include/linux/ncp.h index 3ace8370e61e..99f0adeeb3f3 100644 --- a/include/linux/ncp.h +++ b/include/linux/ncp.h | |||
| @@ -27,7 +27,7 @@ struct ncp_request_header { | |||
| 27 | __u8 conn_high; | 27 | __u8 conn_high; |
| 28 | __u8 function; | 28 | __u8 function; |
| 29 | __u8 data[0]; | 29 | __u8 data[0]; |
| 30 | } __packed; | 30 | } __attribute__((packed)); |
| 31 | 31 | ||
| 32 | #define NCP_REPLY (0x3333) | 32 | #define NCP_REPLY (0x3333) |
| 33 | #define NCP_WATCHDOG (0x3E3E) | 33 | #define NCP_WATCHDOG (0x3E3E) |
| @@ -42,7 +42,7 @@ struct ncp_reply_header { | |||
| 42 | __u8 completion_code; | 42 | __u8 completion_code; |
| 43 | __u8 connection_state; | 43 | __u8 connection_state; |
| 44 | __u8 data[0]; | 44 | __u8 data[0]; |
| 45 | } __packed; | 45 | } __attribute__((packed)); |
| 46 | 46 | ||
| 47 | #define NCP_VOLNAME_LEN (16) | 47 | #define NCP_VOLNAME_LEN (16) |
| 48 | #define NCP_NUMBER_OF_VOLUMES (256) | 48 | #define NCP_NUMBER_OF_VOLUMES (256) |
| @@ -158,7 +158,7 @@ struct nw_info_struct { | |||
| 158 | #ifdef __KERNEL__ | 158 | #ifdef __KERNEL__ |
| 159 | struct nw_nfs_info nfs; | 159 | struct nw_nfs_info nfs; |
| 160 | #endif | 160 | #endif |
| 161 | } __packed; | 161 | } __attribute__((packed)); |
| 162 | 162 | ||
| 163 | /* modify mask - use with MODIFY_DOS_INFO structure */ | 163 | /* modify mask - use with MODIFY_DOS_INFO structure */ |
| 164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) | 164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) |
| @@ -190,12 +190,12 @@ struct nw_modify_dos_info { | |||
| 190 | __u16 inheritanceGrantMask; | 190 | __u16 inheritanceGrantMask; |
| 191 | __u16 inheritanceRevokeMask; | 191 | __u16 inheritanceRevokeMask; |
| 192 | __u32 maximumSpace; | 192 | __u32 maximumSpace; |
| 193 | } __packed; | 193 | } __attribute__((packed)); |
| 194 | 194 | ||
| 195 | struct nw_search_sequence { | 195 | struct nw_search_sequence { |
| 196 | __u8 volNumber; | 196 | __u8 volNumber; |
| 197 | __u32 dirBase; | 197 | __u32 dirBase; |
| 198 | __u32 sequence; | 198 | __u32 sequence; |
| 199 | } __packed; | 199 | } __attribute__((packed)); |
| 200 | 200 | ||
| 201 | #endif /* _LINUX_NCP_H */ | 201 | #endif /* _LINUX_NCP_H */ |
diff --git a/include/linux/netfilter/xt_IDLETIMER.h b/include/linux/netfilter/xt_IDLETIMER.h index 3e1aa1be942e..208ae9387331 100644 --- a/include/linux/netfilter/xt_IDLETIMER.h +++ b/include/linux/netfilter/xt_IDLETIMER.h | |||
| @@ -39,7 +39,7 @@ struct idletimer_tg_info { | |||
| 39 | char label[MAX_IDLETIMER_LABEL_SIZE]; | 39 | char label[MAX_IDLETIMER_LABEL_SIZE]; |
| 40 | 40 | ||
| 41 | /* for kernel module internal use only */ | 41 | /* for kernel module internal use only */ |
| 42 | struct idletimer_tg *timer __attribute((aligned(8))); | 42 | struct idletimer_tg *timer __attribute__((aligned(8))); |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | #endif | 45 | #endif |
diff --git a/include/linux/netfilter/xt_ipvs.h b/include/linux/netfilter/xt_ipvs.h index 1167aeb7a347..eff34ac18808 100644 --- a/include/linux/netfilter/xt_ipvs.h +++ b/include/linux/netfilter/xt_ipvs.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_IPVS_H | 1 | #ifndef _XT_IPVS_H |
| 2 | #define _XT_IPVS_H | 2 | #define _XT_IPVS_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum { | 6 | enum { |
| 5 | XT_IPVS_IPVS_PROPERTY = 1 << 0, /* all other options imply this one */ | 7 | XT_IPVS_IPVS_PROPERTY = 1 << 0, /* all other options imply this one */ |
| 6 | XT_IPVS_PROTO = 1 << 1, | 8 | XT_IPVS_PROTO = 1 << 1, |
diff --git a/include/linux/phonet.h b/include/linux/phonet.h index 24426c3d6b5a..76edadf046d3 100644 --- a/include/linux/phonet.h +++ b/include/linux/phonet.h | |||
| @@ -56,7 +56,7 @@ struct phonethdr { | |||
| 56 | __be16 pn_length; | 56 | __be16 pn_length; |
| 57 | __u8 pn_robj; | 57 | __u8 pn_robj; |
| 58 | __u8 pn_sobj; | 58 | __u8 pn_sobj; |
| 59 | } __packed; | 59 | } __attribute__((packed)); |
| 60 | 60 | ||
| 61 | /* Common Phonet payload header */ | 61 | /* Common Phonet payload header */ |
| 62 | struct phonetmsg { | 62 | struct phonetmsg { |
| @@ -98,7 +98,7 @@ struct sockaddr_pn { | |||
| 98 | __u8 spn_dev; | 98 | __u8 spn_dev; |
| 99 | __u8 spn_resource; | 99 | __u8 spn_resource; |
| 100 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; | 100 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; |
| 101 | } __packed; | 101 | } __attribute__((packed)); |
| 102 | 102 | ||
| 103 | /* Well known address */ | 103 | /* Well known address */ |
| 104 | #define PN_DEV_PC 0x10 | 104 | #define PN_DEV_PC 0x10 |
diff --git a/include/linux/pxa168_eth.h b/include/linux/pxa168_eth.h new file mode 100644 index 000000000000..18d75e795606 --- /dev/null +++ b/include/linux/pxa168_eth.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | *pxa168 ethernet platform device data definition file. | ||
| 3 | */ | ||
| 4 | #ifndef __LINUX_PXA168_ETH_H | ||
| 5 | #define __LINUX_PXA168_ETH_H | ||
| 6 | |||
| 7 | struct pxa168_eth_platform_data { | ||
| 8 | int port_number; | ||
| 9 | int phy_addr; | ||
| 10 | |||
| 11 | /* | ||
| 12 | * If speed is 0, then speed and duplex are autonegotiated. | ||
| 13 | */ | ||
| 14 | int speed; /* 0, SPEED_10, SPEED_100 */ | ||
| 15 | int duplex; /* DUPLEX_HALF or DUPLEX_FULL */ | ||
| 16 | |||
| 17 | /* | ||
| 18 | * Override default RX/TX queue sizes if nonzero. | ||
| 19 | */ | ||
| 20 | int rx_queue_size; | ||
| 21 | int tx_queue_size; | ||
| 22 | |||
| 23 | /* | ||
| 24 | * init callback is used for board specific initialization | ||
| 25 | * e.g on Aspenite its used to initialize the PHY transceiver. | ||
| 26 | */ | ||
| 27 | int (*init)(void); | ||
| 28 | }; | ||
| 29 | |||
| 30 | #endif /* __LINUX_PXA168_ETH_H */ | ||
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 4f82326eb294..08c32e4f261a 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -81,7 +81,7 @@ struct rfkill_event { | |||
| 81 | __u8 type; | 81 | __u8 type; |
| 82 | __u8 op; | 82 | __u8 op; |
| 83 | __u8 soft, hard; | 83 | __u8 soft, hard; |
| 84 | } __packed; | 84 | } __attribute__((packed)); |
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | * We are planning to be backward and forward compatible with changes | 87 | * We are planning to be backward and forward compatible with changes |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ce160d68f5e7..1e2a6db2d7dd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -2109,7 +2109,9 @@ extern void daemonize(const char *, ...); | |||
| 2109 | extern int allow_signal(int); | 2109 | extern int allow_signal(int); |
| 2110 | extern int disallow_signal(int); | 2110 | extern int disallow_signal(int); |
| 2111 | 2111 | ||
| 2112 | extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); | 2112 | extern int do_execve(const char *, |
| 2113 | const char __user * const __user *, | ||
| 2114 | const char __user * const __user *, struct pt_regs *); | ||
| 2113 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); | 2115 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); |
| 2114 | struct task_struct *fork_idle(int); | 2116 | struct task_struct *fork_idle(int); |
| 2115 | 2117 | ||
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 6d14409c4d9a..9f63538928c0 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -68,7 +68,7 @@ struct kmem_cache_order_objects { | |||
| 68 | * Slab cache management. | 68 | * Slab cache management. |
| 69 | */ | 69 | */ |
| 70 | struct kmem_cache { | 70 | struct kmem_cache { |
| 71 | struct kmem_cache_cpu *cpu_slab; | 71 | struct kmem_cache_cpu __percpu *cpu_slab; |
| 72 | /* Used for retriving partial slabs etc */ | 72 | /* Used for retriving partial slabs etc */ |
| 73 | unsigned long flags; | 73 | unsigned long flags; |
| 74 | int size; /* The size of an object including meta data */ | 74 | int size; /* The size of an object including meta data */ |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index ae0a5286f558..92e52a1e6af3 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -213,6 +213,9 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 213 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. | 213 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. |
| 214 | * @mode_bits: flags understood by this controller driver | 214 | * @mode_bits: flags understood by this controller driver |
| 215 | * @flags: other constraints relevant to this driver | 215 | * @flags: other constraints relevant to this driver |
| 216 | * @bus_lock_spinlock: spinlock for SPI bus locking | ||
| 217 | * @bus_lock_mutex: mutex for SPI bus locking | ||
| 218 | * @bus_lock_flag: indicates that the SPI bus is locked for exclusive use | ||
| 216 | * @setup: updates the device mode and clocking records used by a | 219 | * @setup: updates the device mode and clocking records used by a |
| 217 | * device's SPI controller; protocol code may call this. This | 220 | * device's SPI controller; protocol code may call this. This |
| 218 | * must fail if an unrecognized or unsupported mode is requested. | 221 | * must fail if an unrecognized or unsupported mode is requested. |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 6e5d19788634..e6319d18a55d 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -820,7 +820,7 @@ asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, | |||
| 820 | u64 mask, int fd, | 820 | u64 mask, int fd, |
| 821 | const char __user *pathname); | 821 | const char __user *pathname); |
| 822 | 822 | ||
| 823 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]); | 823 | int kernel_execve(const char *filename, const char *const argv[], const char *const envp[]); |
| 824 | 824 | ||
| 825 | 825 | ||
| 826 | asmlinkage long sys_perf_event_open( | 826 | asmlinkage long sys_perf_event_open( |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 3c92121ba9af..96eb576d82fd 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
| 17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 18 | #include <linux/lockdep.h> | 18 | #include <linux/lockdep.h> |
| 19 | #include <linux/kobject_ns.h> | ||
| 19 | #include <asm/atomic.h> | 20 | #include <asm/atomic.h> |
| 20 | 21 | ||
| 21 | struct kobject; | 22 | struct kobject; |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 1437da3ddc62..67d64e6efe7a 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -329,6 +329,13 @@ struct tty_struct { | |||
| 329 | struct tty_port *port; | 329 | struct tty_port *port; |
| 330 | }; | 330 | }; |
| 331 | 331 | ||
| 332 | /* Each of a tty's open files has private_data pointing to tty_file_private */ | ||
| 333 | struct tty_file_private { | ||
| 334 | struct tty_struct *tty; | ||
| 335 | struct file *file; | ||
| 336 | struct list_head list; | ||
| 337 | }; | ||
| 338 | |||
| 332 | /* tty magic number */ | 339 | /* tty magic number */ |
| 333 | #define TTY_MAGIC 0x5401 | 340 | #define TTY_MAGIC 0x5401 |
| 334 | 341 | ||
| @@ -458,6 +465,7 @@ extern void proc_clear_tty(struct task_struct *p); | |||
| 458 | extern struct tty_struct *get_current_tty(void); | 465 | extern struct tty_struct *get_current_tty(void); |
| 459 | extern void tty_default_fops(struct file_operations *fops); | 466 | extern void tty_default_fops(struct file_operations *fops); |
| 460 | extern struct tty_struct *alloc_tty_struct(void); | 467 | extern struct tty_struct *alloc_tty_struct(void); |
| 468 | extern void tty_add_file(struct tty_struct *tty, struct file *file); | ||
| 461 | extern void free_tty_struct(struct tty_struct *tty); | 469 | extern void free_tty_struct(struct tty_struct *tty); |
| 462 | extern void initialize_tty_struct(struct tty_struct *tty, | 470 | extern void initialize_tty_struct(struct tty_struct *tty, |
| 463 | struct tty_driver *driver, int idx); | 471 | struct tty_driver *driver, int idx); |
| @@ -470,6 +478,7 @@ extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty); | |||
| 470 | extern struct tty_struct *tty_pair_get_pty(struct tty_struct *tty); | 478 | extern struct tty_struct *tty_pair_get_pty(struct tty_struct *tty); |
| 471 | 479 | ||
| 472 | extern struct mutex tty_mutex; | 480 | extern struct mutex tty_mutex; |
| 481 | extern spinlock_t tty_files_lock; | ||
| 473 | 482 | ||
| 474 | extern void tty_write_unlock(struct tty_struct *tty); | 483 | extern void tty_write_unlock(struct tty_struct *tty); |
| 475 | extern int tty_write_lock(struct tty_struct *tty, int ndelay); | 484 | extern int tty_write_lock(struct tty_struct *tty, int ndelay); |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 890bc1472190..617068134ae8 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -247,6 +247,7 @@ int usb_add_config(struct usb_composite_dev *, | |||
| 247 | * value; it should return zero on successful initialization. | 247 | * value; it should return zero on successful initialization. |
| 248 | * @unbind: Reverses @bind(); called as a side effect of unregistering | 248 | * @unbind: Reverses @bind(); called as a side effect of unregistering |
| 249 | * this driver. | 249 | * this driver. |
| 250 | * @disconnect: optional driver disconnect method | ||
| 250 | * @suspend: Notifies when the host stops sending USB traffic, | 251 | * @suspend: Notifies when the host stops sending USB traffic, |
| 251 | * after function notifications | 252 | * after function notifications |
| 252 | * @resume: Notifies configuration when the host restarts USB traffic, | 253 | * @resume: Notifies configuration when the host restarts USB traffic, |
