diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 08:45:08 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-02 08:45:08 -0400 |
commit | 59458f40e25915a355d8b1d701425fe9f4f9ea23 (patch) | |
tree | f1c9a2934df686e36d75f759ab7313b6f0e0e5f9 /include/linux | |
parent | 825f9075d74028d11d7f5932f04e1b5db3022b51 (diff) | |
parent | d834c16516d1ebec4766fc58c059bf01311e6045 (diff) |
Merge branch 'master' into gfs2
Diffstat (limited to 'include/linux')
120 files changed, 1356 insertions, 809 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 4811ca5cdc92..839a97ee1f7c 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -59,6 +59,7 @@ header-y += elf-em.h | |||
59 | header-y += fadvise.h | 59 | header-y += fadvise.h |
60 | header-y += fd.h | 60 | header-y += fd.h |
61 | header-y += fdreg.h | 61 | header-y += fdreg.h |
62 | header-y += fib_rules.h | ||
62 | header-y += ftape-header-segment.h | 63 | header-y += ftape-header-segment.h |
63 | header-y += ftape-vendors.h | 64 | header-y += ftape-vendors.h |
64 | header-y += fuse.h | 65 | header-y += fuse.h |
@@ -71,6 +72,7 @@ header-y += hysdn_if.h | |||
71 | header-y += i2c-dev.h | 72 | header-y += i2c-dev.h |
72 | header-y += i8k.h | 73 | header-y += i8k.h |
73 | header-y += icmp.h | 74 | header-y += icmp.h |
75 | header-y += if_addr.h | ||
74 | header-y += if_arcnet.h | 76 | header-y += if_arcnet.h |
75 | header-y += if_arp.h | 77 | header-y += if_arp.h |
76 | header-y += if_bonding.h | 78 | header-y += if_bonding.h |
@@ -80,6 +82,7 @@ header-y += if_fddi.h | |||
80 | header-y += if.h | 82 | header-y += if.h |
81 | header-y += if_hippi.h | 83 | header-y += if_hippi.h |
82 | header-y += if_infiniband.h | 84 | header-y += if_infiniband.h |
85 | header-y += if_link.h | ||
83 | header-y += if_packet.h | 86 | header-y += if_packet.h |
84 | header-y += if_plip.h | 87 | header-y += if_plip.h |
85 | header-y += if_ppp.h | 88 | header-y += if_ppp.h |
@@ -112,6 +115,7 @@ header-y += mmtimer.h | |||
112 | header-y += mqueue.h | 115 | header-y += mqueue.h |
113 | header-y += mtio.h | 116 | header-y += mtio.h |
114 | header-y += ncp_no.h | 117 | header-y += ncp_no.h |
118 | header-y += neighbour.h | ||
115 | header-y += netfilter_arp.h | 119 | header-y += netfilter_arp.h |
116 | header-y += netrom.h | 120 | header-y += netrom.h |
117 | header-y += nfs2.h | 121 | header-y += nfs2.h |
diff --git a/include/linux/acct.h b/include/linux/acct.h index e86bae7324d2..0496d1f09952 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -124,16 +124,12 @@ extern void acct_auto_close(struct super_block *sb); | |||
124 | extern void acct_init_pacct(struct pacct_struct *pacct); | 124 | extern void acct_init_pacct(struct pacct_struct *pacct); |
125 | extern void acct_collect(long exitcode, int group_dead); | 125 | extern void acct_collect(long exitcode, int group_dead); |
126 | extern void acct_process(void); | 126 | extern void acct_process(void); |
127 | extern void acct_update_integrals(struct task_struct *tsk); | ||
128 | extern void acct_clear_integrals(struct task_struct *tsk); | ||
129 | #else | 127 | #else |
130 | #define acct_auto_close_mnt(x) do { } while (0) | 128 | #define acct_auto_close_mnt(x) do { } while (0) |
131 | #define acct_auto_close(x) do { } while (0) | 129 | #define acct_auto_close(x) do { } while (0) |
132 | #define acct_init_pacct(x) do { } while (0) | 130 | #define acct_init_pacct(x) do { } while (0) |
133 | #define acct_collect(x,y) do { } while (0) | 131 | #define acct_collect(x,y) do { } while (0) |
134 | #define acct_process() do { } while (0) | 132 | #define acct_process() do { } while (0) |
135 | #define acct_update_integrals(x) do { } while (0) | ||
136 | #define acct_clear_integrals(task) do { } while (0) | ||
137 | #endif | 133 | #endif |
138 | 134 | ||
139 | /* | 135 | /* |
diff --git a/include/linux/aio.h b/include/linux/aio.h index 00c8efa95cc3..0d71c0041f13 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -4,8 +4,10 @@ | |||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/workqueue.h> | 5 | #include <linux/workqueue.h> |
6 | #include <linux/aio_abi.h> | 6 | #include <linux/aio_abi.h> |
7 | #include <linux/uio.h> | ||
7 | 8 | ||
8 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
10 | #include <linux/uio.h> | ||
9 | 11 | ||
10 | #define AIO_MAXSEGS 4 | 12 | #define AIO_MAXSEGS 4 |
11 | #define AIO_KIOGRP_NR_ATOMIC 8 | 13 | #define AIO_KIOGRP_NR_ATOMIC 8 |
@@ -110,8 +112,10 @@ struct kiocb { | |||
110 | char __user *ki_buf; /* remaining iocb->aio_buf */ | 112 | char __user *ki_buf; /* remaining iocb->aio_buf */ |
111 | size_t ki_left; /* remaining bytes */ | 113 | size_t ki_left; /* remaining bytes */ |
112 | long ki_retried; /* just for testing */ | 114 | long ki_retried; /* just for testing */ |
113 | long ki_kicked; /* just for testing */ | 115 | struct iovec ki_inline_vec; /* inline vector */ |
114 | long ki_queued; /* just for testing */ | 116 | struct iovec *ki_iovec; |
117 | unsigned long ki_nr_segs; | ||
118 | unsigned long ki_cur_seg; | ||
115 | 119 | ||
116 | struct list_head ki_list; /* the aio core uses this | 120 | struct list_head ki_list; /* the aio core uses this |
117 | * for cancellation */ | 121 | * for cancellation */ |
@@ -213,11 +217,11 @@ int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, | |||
213 | struct iocb *iocb)); | 217 | struct iocb *iocb)); |
214 | 218 | ||
215 | #define get_ioctx(kioctx) do { \ | 219 | #define get_ioctx(kioctx) do { \ |
216 | BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0)); \ | 220 | BUG_ON(atomic_read(&(kioctx)->users) <= 0); \ |
217 | atomic_inc(&(kioctx)->users); \ | 221 | atomic_inc(&(kioctx)->users); \ |
218 | } while (0) | 222 | } while (0) |
219 | #define put_ioctx(kioctx) do { \ | 223 | #define put_ioctx(kioctx) do { \ |
220 | BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0)); \ | 224 | BUG_ON(atomic_read(&(kioctx)->users) <= 0); \ |
221 | if (unlikely(atomic_dec_and_test(&(kioctx)->users))) \ | 225 | if (unlikely(atomic_dec_and_test(&(kioctx)->users))) \ |
222 | __put_ioctx(kioctx); \ | 226 | __put_ioctx(kioctx); \ |
223 | } while (0) | 227 | } while (0) |
diff --git a/include/linux/aio_abi.h b/include/linux/aio_abi.h index 30fdcc89d142..3466b1d0ffd2 100644 --- a/include/linux/aio_abi.h +++ b/include/linux/aio_abi.h | |||
@@ -41,6 +41,8 @@ enum { | |||
41 | * IOCB_CMD_POLL = 5, | 41 | * IOCB_CMD_POLL = 5, |
42 | */ | 42 | */ |
43 | IOCB_CMD_NOOP = 6, | 43 | IOCB_CMD_NOOP = 6, |
44 | IOCB_CMD_PREADV = 7, | ||
45 | IOCB_CMD_PWRITEV = 8, | ||
44 | }; | 46 | }; |
45 | 47 | ||
46 | /* read() from /dev/aio returns these structures. */ | 48 | /* read() from /dev/aio returns these structures. */ |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 6ba3aa8a81f4..75b8baca08f3 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -88,15 +88,7 @@ static inline struct atalk_sock *at_sk(struct sock *sk) | |||
88 | #include <asm/byteorder.h> | 88 | #include <asm/byteorder.h> |
89 | 89 | ||
90 | struct ddpehdr { | 90 | struct ddpehdr { |
91 | #ifdef __LITTLE_ENDIAN_BITFIELD | 91 | __be16 deh_len_hops; /* lower 10 bits are length, next 4 - hops */ |
92 | __u16 deh_len:10, | ||
93 | deh_hops:4, | ||
94 | deh_pad:2; | ||
95 | #else | ||
96 | __u16 deh_pad:2, | ||
97 | deh_hops:4, | ||
98 | deh_len:10; | ||
99 | #endif | ||
100 | __be16 deh_sum; | 92 | __be16 deh_sum; |
101 | __be16 deh_dnet; | 93 | __be16 deh_dnet; |
102 | __be16 deh_snet; | 94 | __be16 deh_snet; |
@@ -112,36 +104,6 @@ static __inline__ struct ddpehdr *ddp_hdr(struct sk_buff *skb) | |||
112 | return (struct ddpehdr *)skb->h.raw; | 104 | return (struct ddpehdr *)skb->h.raw; |
113 | } | 105 | } |
114 | 106 | ||
115 | /* | ||
116 | * Don't drop the struct into the struct above. You'll get some | ||
117 | * surprise padding. | ||
118 | */ | ||
119 | struct ddpebits { | ||
120 | #ifdef __LITTLE_ENDIAN_BITFIELD | ||
121 | __u16 deh_len:10, | ||
122 | deh_hops:4, | ||
123 | deh_pad:2; | ||
124 | #else | ||
125 | __u16 deh_pad:2, | ||
126 | deh_hops:4, | ||
127 | deh_len:10; | ||
128 | #endif | ||
129 | }; | ||
130 | |||
131 | /* Short form header */ | ||
132 | struct ddpshdr { | ||
133 | #ifdef __LITTLE_ENDIAN_BITFIELD | ||
134 | __u16 dsh_len:10, | ||
135 | dsh_pad:6; | ||
136 | #else | ||
137 | __u16 dsh_pad:6, | ||
138 | dsh_len:10; | ||
139 | #endif | ||
140 | __u8 dsh_dport; | ||
141 | __u8 dsh_sport; | ||
142 | /* And netatalk apps expect to stick the type in themselves */ | ||
143 | }; | ||
144 | |||
145 | /* AppleTalk AARP headers */ | 107 | /* AppleTalk AARP headers */ |
146 | struct elapaarp { | 108 | struct elapaarp { |
147 | __be16 hw_type; | 109 | __be16 hw_type; |
diff --git a/include/linux/atmlec.h b/include/linux/atmlec.h index f267f2442766..6f5a1bab8f50 100644 --- a/include/linux/atmlec.h +++ b/include/linux/atmlec.h | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * ATM Lan Emulation Daemon driver interface |
3 | * ATM Lan Emulation Daemon vs. driver interface | ||
4 | * | ||
5 | * mkiiskila@yahoo.com | ||
6 | * | 3 | * |
4 | * Marko Kiiskila <mkiiskila@yahoo.com> | ||
7 | */ | 5 | */ |
8 | 6 | ||
9 | #ifndef _ATMLEC_H_ | 7 | #ifndef _ATMLEC_H_ |
@@ -13,76 +11,87 @@ | |||
13 | #include <linux/atmioc.h> | 11 | #include <linux/atmioc.h> |
14 | #include <linux/atm.h> | 12 | #include <linux/atm.h> |
15 | #include <linux/if_ether.h> | 13 | #include <linux/if_ether.h> |
14 | |||
16 | /* ATM lec daemon control socket */ | 15 | /* ATM lec daemon control socket */ |
17 | #define ATMLEC_CTRL _IO('a',ATMIOC_LANE) | 16 | #define ATMLEC_CTRL _IO('a', ATMIOC_LANE) |
18 | #define ATMLEC_DATA _IO('a',ATMIOC_LANE+1) | 17 | #define ATMLEC_DATA _IO('a', ATMIOC_LANE+1) |
19 | #define ATMLEC_MCAST _IO('a',ATMIOC_LANE+2) | 18 | #define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2) |
20 | 19 | ||
21 | /* Maximum number of LEC interfaces (tweakable) */ | 20 | /* Maximum number of LEC interfaces (tweakable) */ |
22 | #define MAX_LEC_ITF 48 | 21 | #define MAX_LEC_ITF 48 |
23 | 22 | ||
24 | /* From the total of MAX_LEC_ITF, last NUM_TR_DEVS are reserved for Token Ring. | 23 | /* |
24 | * From the total of MAX_LEC_ITF, last NUM_TR_DEVS are reserved for Token Ring. | ||
25 | * E.g. if MAX_LEC_ITF = 48 and NUM_TR_DEVS = 8, then lec0-lec39 are for | 25 | * E.g. if MAX_LEC_ITF = 48 and NUM_TR_DEVS = 8, then lec0-lec39 are for |
26 | * Ethernet ELANs and lec40-lec47 are for Token Ring ELANS. | 26 | * Ethernet ELANs and lec40-lec47 are for Token Ring ELANS. |
27 | */ | 27 | */ |
28 | #define NUM_TR_DEVS 8 | 28 | #define NUM_TR_DEVS 8 |
29 | 29 | ||
30 | typedef enum { | 30 | typedef enum { |
31 | l_set_mac_addr, l_del_mac_addr, | 31 | l_set_mac_addr, |
32 | l_svc_setup, | 32 | l_del_mac_addr, |
33 | l_addr_delete, l_topology_change, | 33 | l_svc_setup, |
34 | l_flush_complete, l_arp_update, | 34 | l_addr_delete, |
35 | l_narp_req, /* LANE2 mandates the use of this */ | 35 | l_topology_change, |
36 | l_config, l_flush_tran_id, | 36 | l_flush_complete, |
37 | l_set_lecid, l_arp_xmt, | 37 | l_arp_update, |
38 | l_rdesc_arp_xmt, | 38 | l_narp_req, /* LANE2 mandates the use of this */ |
39 | l_associate_req, | 39 | l_config, |
40 | l_should_bridge /* should we bridge this MAC? */ | 40 | l_flush_tran_id, |
41 | l_set_lecid, | ||
42 | l_arp_xmt, | ||
43 | l_rdesc_arp_xmt, | ||
44 | l_associate_req, | ||
45 | l_should_bridge /* should we bridge this MAC? */ | ||
41 | } atmlec_msg_type; | 46 | } atmlec_msg_type; |
42 | 47 | ||
43 | #define ATMLEC_MSG_TYPE_MAX l_should_bridge | 48 | #define ATMLEC_MSG_TYPE_MAX l_should_bridge |
44 | 49 | ||
45 | struct atmlec_config_msg { | 50 | struct atmlec_config_msg { |
46 | unsigned int maximum_unknown_frame_count; | 51 | unsigned int maximum_unknown_frame_count; |
47 | unsigned int max_unknown_frame_time; | 52 | unsigned int max_unknown_frame_time; |
48 | unsigned short max_retry_count; | 53 | unsigned short max_retry_count; |
49 | unsigned int aging_time; | 54 | unsigned int aging_time; |
50 | unsigned int forward_delay_time; | 55 | unsigned int forward_delay_time; |
51 | unsigned int arp_response_time; | 56 | unsigned int arp_response_time; |
52 | unsigned int flush_timeout; | 57 | unsigned int flush_timeout; |
53 | unsigned int path_switching_delay; | 58 | unsigned int path_switching_delay; |
54 | unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */ | 59 | unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */ |
55 | int mtu; | 60 | int mtu; |
56 | int is_proxy; | 61 | int is_proxy; |
57 | }; | 62 | }; |
58 | 63 | ||
59 | struct atmlec_msg { | 64 | struct atmlec_msg { |
60 | atmlec_msg_type type; | 65 | atmlec_msg_type type; |
61 | int sizeoftlvs; /* LANE2: if != 0, tlvs follow */ | 66 | int sizeoftlvs; /* LANE2: if != 0, tlvs follow */ |
62 | union { | 67 | union { |
63 | struct { | 68 | struct { |
64 | unsigned char mac_addr[ETH_ALEN]; | 69 | unsigned char mac_addr[ETH_ALEN]; |
65 | unsigned char atm_addr[ATM_ESA_LEN]; | 70 | unsigned char atm_addr[ATM_ESA_LEN]; |
66 | unsigned int flag;/* Topology_change flag, | 71 | unsigned int flag; /* |
67 | remoteflag, permanent flag, | 72 | * Topology_change flag, |
68 | lecid, transaction id */ | 73 | * remoteflag, permanent flag, |
69 | unsigned int targetless_le_arp; /* LANE2 */ | 74 | * lecid, transaction id |
70 | unsigned int no_source_le_narp; /* LANE2 */ | 75 | */ |
71 | } normal; | 76 | unsigned int targetless_le_arp; /* LANE2 */ |
72 | struct atmlec_config_msg config; | 77 | unsigned int no_source_le_narp; /* LANE2 */ |
73 | struct { | 78 | } normal; |
74 | uint16_t lec_id; /* requestor lec_id */ | 79 | struct atmlec_config_msg config; |
75 | uint32_t tran_id; /* transaction id */ | 80 | struct { |
76 | unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ | 81 | uint16_t lec_id; /* requestor lec_id */ |
77 | unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ | 82 | uint32_t tran_id; /* transaction id */ |
78 | } proxy; | 83 | unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ |
79 | /* For mapping LE_ARP requests to responses. Filled by */ | 84 | unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ |
80 | } content; /* zeppelin, returned by kernel. Used only when proxying */ | 85 | } proxy; /* |
86 | * For mapping LE_ARP requests to responses. Filled by | ||
87 | * zeppelin, returned by kernel. Used only when proxying | ||
88 | */ | ||
89 | } content; | ||
81 | } __ATM_API_ALIGN; | 90 | } __ATM_API_ALIGN; |
82 | 91 | ||
83 | struct atmlec_ioc { | 92 | struct atmlec_ioc { |
84 | int dev_num; | 93 | int dev_num; |
85 | unsigned char atm_addr[ATM_ESA_LEN]; | 94 | unsigned char atm_addr[ATM_ESA_LEN]; |
86 | unsigned char receive; /* 1= receive vcc, 0 = send vcc */ | 95 | unsigned char receive; /* 1= receive vcc, 0 = send vcc */ |
87 | }; | 96 | }; |
88 | #endif /* _ATMLEC_H_ */ | 97 | #endif /* _ATMLEC_H_ */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 40a6c26294ae..c3aa09751814 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -95,6 +95,11 @@ | |||
95 | #define AUDIT_MAC_POLICY_LOAD 1403 /* Policy file load */ | 95 | #define AUDIT_MAC_POLICY_LOAD 1403 /* Policy file load */ |
96 | #define AUDIT_MAC_STATUS 1404 /* Changed enforcing,permissive,off */ | 96 | #define AUDIT_MAC_STATUS 1404 /* Changed enforcing,permissive,off */ |
97 | #define AUDIT_MAC_CONFIG_CHANGE 1405 /* Changes to booleans */ | 97 | #define AUDIT_MAC_CONFIG_CHANGE 1405 /* Changes to booleans */ |
98 | #define AUDIT_MAC_UNLBL_ALLOW 1406 /* NetLabel: allow unlabeled traffic */ | ||
99 | #define AUDIT_MAC_CIPSOV4_ADD 1407 /* NetLabel: add CIPSOv4 DOI entry */ | ||
100 | #define AUDIT_MAC_CIPSOV4_DEL 1408 /* NetLabel: del CIPSOv4 DOI entry */ | ||
101 | #define AUDIT_MAC_MAP_ADD 1409 /* NetLabel: add LSM domain mapping */ | ||
102 | #define AUDIT_MAC_MAP_DEL 1410 /* NetLabel: del LSM domain mapping */ | ||
98 | 103 | ||
99 | #define AUDIT_FIRST_KERN_ANOM_MSG 1700 | 104 | #define AUDIT_FIRST_KERN_ANOM_MSG 1700 |
100 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 | 105 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 76bdaeab6f62..711c321a7011 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -148,6 +148,7 @@ struct bio { | |||
148 | #define BIO_RW_BARRIER 2 | 148 | #define BIO_RW_BARRIER 2 |
149 | #define BIO_RW_FAILFAST 3 | 149 | #define BIO_RW_FAILFAST 3 |
150 | #define BIO_RW_SYNC 4 | 150 | #define BIO_RW_SYNC 4 |
151 | #define BIO_RW_META 5 | ||
151 | 152 | ||
152 | /* | 153 | /* |
153 | * upper 16 bits of bi_rw define the io priority of this bio | 154 | * upper 16 bits of bi_rw define the io priority of this bio |
@@ -178,6 +179,7 @@ struct bio { | |||
178 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) | 179 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) |
179 | #define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST)) | 180 | #define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST)) |
180 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) | 181 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) |
182 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) | ||
181 | 183 | ||
182 | /* | 184 | /* |
183 | * will die | 185 | * will die |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c773ee545ebd..1d79b8d4ca6d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_BLKDEV_H | 1 | #ifndef _LINUX_BLKDEV_H |
2 | #define _LINUX_BLKDEV_H | 2 | #define _LINUX_BLKDEV_H |
3 | 3 | ||
4 | #include <linux/sched.h> | ||
4 | #include <linux/major.h> | 5 | #include <linux/major.h> |
5 | #include <linux/genhd.h> | 6 | #include <linux/genhd.h> |
6 | #include <linux/list.h> | 7 | #include <linux/list.h> |
@@ -16,6 +17,22 @@ | |||
16 | 17 | ||
17 | #include <asm/scatterlist.h> | 18 | #include <asm/scatterlist.h> |
18 | 19 | ||
20 | #ifdef CONFIG_LBD | ||
21 | # include <asm/div64.h> | ||
22 | # define sector_div(a, b) do_div(a, b) | ||
23 | #else | ||
24 | # define sector_div(n, b)( \ | ||
25 | { \ | ||
26 | int _res; \ | ||
27 | _res = (n) % (b); \ | ||
28 | (n) /= (b); \ | ||
29 | _res; \ | ||
30 | } \ | ||
31 | ) | ||
32 | #endif | ||
33 | |||
34 | #ifdef CONFIG_BLOCK | ||
35 | |||
19 | struct scsi_ioctl_command; | 36 | struct scsi_ioctl_command; |
20 | 37 | ||
21 | struct request_queue; | 38 | struct request_queue; |
@@ -90,7 +107,7 @@ struct io_context { | |||
90 | atomic_t refcount; | 107 | atomic_t refcount; |
91 | struct task_struct *task; | 108 | struct task_struct *task; |
92 | 109 | ||
93 | int (*set_ioprio)(struct io_context *, unsigned int); | 110 | unsigned int ioprio_changed; |
94 | 111 | ||
95 | /* | 112 | /* |
96 | * For request batching | 113 | * For request batching |
@@ -104,8 +121,7 @@ struct io_context { | |||
104 | 121 | ||
105 | void put_io_context(struct io_context *ioc); | 122 | void put_io_context(struct io_context *ioc); |
106 | void exit_io_context(void); | 123 | void exit_io_context(void); |
107 | struct io_context *current_io_context(gfp_t gfp_flags); | 124 | struct io_context *get_io_context(gfp_t gfp_flags, int node); |
108 | struct io_context *get_io_context(gfp_t gfp_flags); | ||
109 | void copy_io_context(struct io_context **pdst, struct io_context **psrc); | 125 | void copy_io_context(struct io_context **pdst, struct io_context **psrc); |
110 | void swap_io_context(struct io_context **ioc1, struct io_context **ioc2); | 126 | void swap_io_context(struct io_context **ioc1, struct io_context **ioc2); |
111 | 127 | ||
@@ -120,6 +136,90 @@ struct request_list { | |||
120 | wait_queue_head_t wait[2]; | 136 | wait_queue_head_t wait[2]; |
121 | }; | 137 | }; |
122 | 138 | ||
139 | /* | ||
140 | * request command types | ||
141 | */ | ||
142 | enum rq_cmd_type_bits { | ||
143 | REQ_TYPE_FS = 1, /* fs request */ | ||
144 | REQ_TYPE_BLOCK_PC, /* scsi command */ | ||
145 | REQ_TYPE_SENSE, /* sense request */ | ||
146 | REQ_TYPE_PM_SUSPEND, /* suspend request */ | ||
147 | REQ_TYPE_PM_RESUME, /* resume request */ | ||
148 | REQ_TYPE_PM_SHUTDOWN, /* shutdown request */ | ||
149 | REQ_TYPE_FLUSH, /* flush request */ | ||
150 | REQ_TYPE_SPECIAL, /* driver defined type */ | ||
151 | REQ_TYPE_LINUX_BLOCK, /* generic block layer message */ | ||
152 | /* | ||
153 | * for ATA/ATAPI devices. this really doesn't belong here, ide should | ||
154 | * use REQ_TYPE_SPECIAL and use rq->cmd[0] with the range of driver | ||
155 | * private REQ_LB opcodes to differentiate what type of request this is | ||
156 | */ | ||
157 | REQ_TYPE_ATA_CMD, | ||
158 | REQ_TYPE_ATA_TASK, | ||
159 | REQ_TYPE_ATA_TASKFILE, | ||
160 | }; | ||
161 | |||
162 | /* | ||
163 | * For request of type REQ_TYPE_LINUX_BLOCK, rq->cmd[0] is the opcode being | ||
164 | * sent down (similar to how REQ_TYPE_BLOCK_PC means that ->cmd[] holds a | ||
165 | * SCSI cdb. | ||
166 | * | ||
167 | * 0x00 -> 0x3f are driver private, to be used for whatever purpose they need, | ||
168 | * typically to differentiate REQ_TYPE_SPECIAL requests. | ||
169 | * | ||
170 | */ | ||
171 | enum { | ||
172 | /* | ||
173 | * just examples for now | ||
174 | */ | ||
175 | REQ_LB_OP_EJECT = 0x40, /* eject request */ | ||
176 | REQ_LB_OP_FLUSH = 0x41, /* flush device */ | ||
177 | }; | ||
178 | |||
179 | /* | ||
180 | * request type modified bits. first three bits match BIO_RW* bits, important | ||
181 | */ | ||
182 | enum rq_flag_bits { | ||
183 | __REQ_RW, /* not set, read. set, write */ | ||
184 | __REQ_FAILFAST, /* no low level driver retries */ | ||
185 | __REQ_SORTED, /* elevator knows about this request */ | ||
186 | __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */ | ||
187 | __REQ_HARDBARRIER, /* may not be passed by drive either */ | ||
188 | __REQ_FUA, /* forced unit access */ | ||
189 | __REQ_NOMERGE, /* don't touch this for merging */ | ||
190 | __REQ_STARTED, /* drive already may have started this one */ | ||
191 | __REQ_DONTPREP, /* don't call prep for this one */ | ||
192 | __REQ_QUEUED, /* uses queueing */ | ||
193 | __REQ_ELVPRIV, /* elevator private data attached */ | ||
194 | __REQ_FAILED, /* set if the request failed */ | ||
195 | __REQ_QUIET, /* don't worry about errors */ | ||
196 | __REQ_PREEMPT, /* set for "ide_preempt" requests */ | ||
197 | __REQ_ORDERED_COLOR, /* is before or after barrier */ | ||
198 | __REQ_RW_SYNC, /* request is sync (O_DIRECT) */ | ||
199 | __REQ_ALLOCED, /* request came from our alloc pool */ | ||
200 | __REQ_RW_META, /* metadata io request */ | ||
201 | __REQ_NR_BITS, /* stops here */ | ||
202 | }; | ||
203 | |||
204 | #define REQ_RW (1 << __REQ_RW) | ||
205 | #define REQ_FAILFAST (1 << __REQ_FAILFAST) | ||
206 | #define REQ_SORTED (1 << __REQ_SORTED) | ||
207 | #define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER) | ||
208 | #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) | ||
209 | #define REQ_FUA (1 << __REQ_FUA) | ||
210 | #define REQ_NOMERGE (1 << __REQ_NOMERGE) | ||
211 | #define REQ_STARTED (1 << __REQ_STARTED) | ||
212 | #define REQ_DONTPREP (1 << __REQ_DONTPREP) | ||
213 | #define REQ_QUEUED (1 << __REQ_QUEUED) | ||
214 | #define REQ_ELVPRIV (1 << __REQ_ELVPRIV) | ||
215 | #define REQ_FAILED (1 << __REQ_FAILED) | ||
216 | #define REQ_QUIET (1 << __REQ_QUIET) | ||
217 | #define REQ_PREEMPT (1 << __REQ_PREEMPT) | ||
218 | #define REQ_ORDERED_COLOR (1 << __REQ_ORDERED_COLOR) | ||
219 | #define REQ_RW_SYNC (1 << __REQ_RW_SYNC) | ||
220 | #define REQ_ALLOCED (1 << __REQ_ALLOCED) | ||
221 | #define REQ_RW_META (1 << __REQ_RW_META) | ||
222 | |||
123 | #define BLK_MAX_CDB 16 | 223 | #define BLK_MAX_CDB 16 |
124 | 224 | ||
125 | /* | 225 | /* |
@@ -129,30 +229,46 @@ struct request { | |||
129 | struct list_head queuelist; | 229 | struct list_head queuelist; |
130 | struct list_head donelist; | 230 | struct list_head donelist; |
131 | 231 | ||
132 | unsigned long flags; /* see REQ_ bits below */ | 232 | request_queue_t *q; |
233 | |||
234 | unsigned int cmd_flags; | ||
235 | enum rq_cmd_type_bits cmd_type; | ||
133 | 236 | ||
134 | /* Maintain bio traversal state for part by part I/O submission. | 237 | /* Maintain bio traversal state for part by part I/O submission. |
135 | * hard_* are block layer internals, no driver should touch them! | 238 | * hard_* are block layer internals, no driver should touch them! |
136 | */ | 239 | */ |
137 | 240 | ||
138 | sector_t sector; /* next sector to submit */ | 241 | sector_t sector; /* next sector to submit */ |
242 | sector_t hard_sector; /* next sector to complete */ | ||
139 | unsigned long nr_sectors; /* no. of sectors left to submit */ | 243 | unsigned long nr_sectors; /* no. of sectors left to submit */ |
244 | unsigned long hard_nr_sectors; /* no. of sectors left to complete */ | ||
140 | /* no. of sectors left to submit in the current segment */ | 245 | /* no. of sectors left to submit in the current segment */ |
141 | unsigned int current_nr_sectors; | 246 | unsigned int current_nr_sectors; |
142 | 247 | ||
143 | sector_t hard_sector; /* next sector to complete */ | ||
144 | unsigned long hard_nr_sectors; /* no. of sectors left to complete */ | ||
145 | /* no. of sectors left to complete in the current segment */ | 248 | /* no. of sectors left to complete in the current segment */ |
146 | unsigned int hard_cur_sectors; | 249 | unsigned int hard_cur_sectors; |
147 | 250 | ||
148 | struct bio *bio; | 251 | struct bio *bio; |
149 | struct bio *biotail; | 252 | struct bio *biotail; |
150 | 253 | ||
254 | struct hlist_node hash; /* merge hash */ | ||
255 | /* | ||
256 | * The rb_node is only used inside the io scheduler, requests | ||
257 | * are pruned when moved to the dispatch queue. So let the | ||
258 | * completion_data share space with the rb_node. | ||
259 | */ | ||
260 | union { | ||
261 | struct rb_node rb_node; /* sort/lookup */ | ||
262 | void *completion_data; | ||
263 | }; | ||
264 | |||
265 | /* | ||
266 | * two pointers are available for the IO schedulers, if they need | ||
267 | * more they have to dynamically allocate it. | ||
268 | */ | ||
151 | void *elevator_private; | 269 | void *elevator_private; |
152 | void *completion_data; | 270 | void *elevator_private2; |
153 | 271 | ||
154 | int rq_status; /* should split this into a few status bits */ | ||
155 | int errors; | ||
156 | struct gendisk *rq_disk; | 272 | struct gendisk *rq_disk; |
157 | unsigned long start_time; | 273 | unsigned long start_time; |
158 | 274 | ||
@@ -170,15 +286,13 @@ struct request { | |||
170 | 286 | ||
171 | unsigned short ioprio; | 287 | unsigned short ioprio; |
172 | 288 | ||
289 | void *special; | ||
290 | char *buffer; | ||
291 | |||
173 | int tag; | 292 | int tag; |
293 | int errors; | ||
174 | 294 | ||
175 | int ref_count; | 295 | int ref_count; |
176 | request_queue_t *q; | ||
177 | struct request_list *rl; | ||
178 | |||
179 | struct completion *waiting; | ||
180 | void *special; | ||
181 | char *buffer; | ||
182 | 296 | ||
183 | /* | 297 | /* |
184 | * when request is used as a packet command carrier | 298 | * when request is used as a packet command carrier |
@@ -195,80 +309,14 @@ struct request { | |||
195 | int retries; | 309 | int retries; |
196 | 310 | ||
197 | /* | 311 | /* |
198 | * completion callback. end_io_data should be folded in with waiting | 312 | * completion callback. |
199 | */ | 313 | */ |
200 | rq_end_io_fn *end_io; | 314 | rq_end_io_fn *end_io; |
201 | void *end_io_data; | 315 | void *end_io_data; |
202 | }; | 316 | }; |
203 | 317 | ||
204 | /* | 318 | /* |
205 | * first three bits match BIO_RW* bits, important | 319 | * State information carried for REQ_TYPE_PM_SUSPEND and REQ_TYPE_PM_RESUME |
206 | */ | ||
207 | enum rq_flag_bits { | ||
208 | __REQ_RW, /* not set, read. set, write */ | ||
209 | __REQ_FAILFAST, /* no low level driver retries */ | ||
210 | __REQ_SORTED, /* elevator knows about this request */ | ||
211 | __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */ | ||
212 | __REQ_HARDBARRIER, /* may not be passed by drive either */ | ||
213 | __REQ_FUA, /* forced unit access */ | ||
214 | __REQ_CMD, /* is a regular fs rw request */ | ||
215 | __REQ_NOMERGE, /* don't touch this for merging */ | ||
216 | __REQ_STARTED, /* drive already may have started this one */ | ||
217 | __REQ_DONTPREP, /* don't call prep for this one */ | ||
218 | __REQ_QUEUED, /* uses queueing */ | ||
219 | __REQ_ELVPRIV, /* elevator private data attached */ | ||
220 | /* | ||
221 | * for ATA/ATAPI devices | ||
222 | */ | ||
223 | __REQ_PC, /* packet command (special) */ | ||
224 | __REQ_BLOCK_PC, /* queued down pc from block layer */ | ||
225 | __REQ_SENSE, /* sense retrival */ | ||
226 | |||
227 | __REQ_FAILED, /* set if the request failed */ | ||
228 | __REQ_QUIET, /* don't worry about errors */ | ||
229 | __REQ_SPECIAL, /* driver suplied command */ | ||
230 | __REQ_DRIVE_CMD, | ||
231 | __REQ_DRIVE_TASK, | ||
232 | __REQ_DRIVE_TASKFILE, | ||
233 | __REQ_PREEMPT, /* set for "ide_preempt" requests */ | ||
234 | __REQ_PM_SUSPEND, /* suspend request */ | ||
235 | __REQ_PM_RESUME, /* resume request */ | ||
236 | __REQ_PM_SHUTDOWN, /* shutdown request */ | ||
237 | __REQ_ORDERED_COLOR, /* is before or after barrier */ | ||
238 | __REQ_RW_SYNC, /* request is sync (O_DIRECT) */ | ||
239 | __REQ_NR_BITS, /* stops here */ | ||
240 | }; | ||
241 | |||
242 | #define REQ_RW (1 << __REQ_RW) | ||
243 | #define REQ_FAILFAST (1 << __REQ_FAILFAST) | ||
244 | #define REQ_SORTED (1 << __REQ_SORTED) | ||
245 | #define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER) | ||
246 | #define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER) | ||
247 | #define REQ_FUA (1 << __REQ_FUA) | ||
248 | #define REQ_CMD (1 << __REQ_CMD) | ||
249 | #define REQ_NOMERGE (1 << __REQ_NOMERGE) | ||
250 | #define REQ_STARTED (1 << __REQ_STARTED) | ||
251 | #define REQ_DONTPREP (1 << __REQ_DONTPREP) | ||
252 | #define REQ_QUEUED (1 << __REQ_QUEUED) | ||
253 | #define REQ_ELVPRIV (1 << __REQ_ELVPRIV) | ||
254 | #define REQ_PC (1 << __REQ_PC) | ||
255 | #define REQ_BLOCK_PC (1 << __REQ_BLOCK_PC) | ||
256 | #define REQ_SENSE (1 << __REQ_SENSE) | ||
257 | #define REQ_FAILED (1 << __REQ_FAILED) | ||
258 | #define REQ_QUIET (1 << __REQ_QUIET) | ||
259 | #define REQ_SPECIAL (1 << __REQ_SPECIAL) | ||
260 | #define REQ_DRIVE_CMD (1 << __REQ_DRIVE_CMD) | ||
261 | #define REQ_DRIVE_TASK (1 << __REQ_DRIVE_TASK) | ||
262 | #define REQ_DRIVE_TASKFILE (1 << __REQ_DRIVE_TASKFILE) | ||
263 | #define REQ_PREEMPT (1 << __REQ_PREEMPT) | ||
264 | #define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND) | ||
265 | #define REQ_PM_RESUME (1 << __REQ_PM_RESUME) | ||
266 | #define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN) | ||
267 | #define REQ_ORDERED_COLOR (1 << __REQ_ORDERED_COLOR) | ||
268 | #define REQ_RW_SYNC (1 << __REQ_RW_SYNC) | ||
269 | |||
270 | /* | ||
271 | * State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME | ||
272 | * requests. Some step values could eventually be made generic. | 320 | * requests. Some step values could eventually be made generic. |
273 | */ | 321 | */ |
274 | struct request_pm_state | 322 | struct request_pm_state |
@@ -417,9 +465,9 @@ struct request_queue | |||
417 | unsigned int sg_timeout; | 465 | unsigned int sg_timeout; |
418 | unsigned int sg_reserved_size; | 466 | unsigned int sg_reserved_size; |
419 | int node; | 467 | int node; |
420 | 468 | #ifdef CONFIG_BLK_DEV_IO_TRACE | |
421 | struct blk_trace *blk_trace; | 469 | struct blk_trace *blk_trace; |
422 | 470 | #endif | |
423 | /* | 471 | /* |
424 | * reserved for flush operations | 472 | * reserved for flush operations |
425 | */ | 473 | */ |
@@ -432,9 +480,6 @@ struct request_queue | |||
432 | struct mutex sysfs_lock; | 480 | struct mutex sysfs_lock; |
433 | }; | 481 | }; |
434 | 482 | ||
435 | #define RQ_INACTIVE (-1) | ||
436 | #define RQ_ACTIVE 1 | ||
437 | |||
438 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 483 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
439 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ | 484 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ |
440 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ | 485 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ |
@@ -490,25 +535,34 @@ enum { | |||
490 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) | 535 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) |
491 | #define blk_queue_flushing(q) ((q)->ordseq) | 536 | #define blk_queue_flushing(q) ((q)->ordseq) |
492 | 537 | ||
493 | #define blk_fs_request(rq) ((rq)->flags & REQ_CMD) | 538 | #define blk_fs_request(rq) ((rq)->cmd_type == REQ_TYPE_FS) |
494 | #define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC) | 539 | #define blk_pc_request(rq) ((rq)->cmd_type == REQ_TYPE_BLOCK_PC) |
495 | #define blk_noretry_request(rq) ((rq)->flags & REQ_FAILFAST) | 540 | #define blk_special_request(rq) ((rq)->cmd_type == REQ_TYPE_SPECIAL) |
496 | #define blk_rq_started(rq) ((rq)->flags & REQ_STARTED) | 541 | #define blk_sense_request(rq) ((rq)->cmd_type == REQ_TYPE_SENSE) |
542 | |||
543 | #define blk_noretry_request(rq) ((rq)->cmd_flags & REQ_FAILFAST) | ||
544 | #define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED) | ||
497 | 545 | ||
498 | #define blk_account_rq(rq) (blk_rq_started(rq) && blk_fs_request(rq)) | 546 | #define blk_account_rq(rq) (blk_rq_started(rq) && blk_fs_request(rq)) |
499 | 547 | ||
500 | #define blk_pm_suspend_request(rq) ((rq)->flags & REQ_PM_SUSPEND) | 548 | #define blk_pm_suspend_request(rq) ((rq)->cmd_type == REQ_TYPE_PM_SUSPEND) |
501 | #define blk_pm_resume_request(rq) ((rq)->flags & REQ_PM_RESUME) | 549 | #define blk_pm_resume_request(rq) ((rq)->cmd_type == REQ_TYPE_PM_RESUME) |
502 | #define blk_pm_request(rq) \ | 550 | #define blk_pm_request(rq) \ |
503 | ((rq)->flags & (REQ_PM_SUSPEND | REQ_PM_RESUME)) | 551 | (blk_pm_suspend_request(rq) || blk_pm_resume_request(rq)) |
504 | 552 | ||
505 | #define blk_sorted_rq(rq) ((rq)->flags & REQ_SORTED) | 553 | #define blk_sorted_rq(rq) ((rq)->cmd_flags & REQ_SORTED) |
506 | #define blk_barrier_rq(rq) ((rq)->flags & REQ_HARDBARRIER) | 554 | #define blk_barrier_rq(rq) ((rq)->cmd_flags & REQ_HARDBARRIER) |
507 | #define blk_fua_rq(rq) ((rq)->flags & REQ_FUA) | 555 | #define blk_fua_rq(rq) ((rq)->cmd_flags & REQ_FUA) |
508 | 556 | ||
509 | #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) | 557 | #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) |
510 | 558 | ||
511 | #define rq_data_dir(rq) ((rq)->flags & 1) | 559 | #define rq_data_dir(rq) ((rq)->cmd_flags & 1) |
560 | |||
561 | /* | ||
562 | * We regard a request as sync, if it's a READ or a SYNC write. | ||
563 | */ | ||
564 | #define rq_is_sync(rq) (rq_data_dir((rq)) == READ || (rq)->cmd_flags & REQ_RW_SYNC) | ||
565 | #define rq_is_meta(rq) ((rq)->cmd_flags & REQ_RW_META) | ||
512 | 566 | ||
513 | static inline int blk_queue_full(struct request_queue *q, int rw) | 567 | static inline int blk_queue_full(struct request_queue *q, int rw) |
514 | { | 568 | { |
@@ -541,13 +595,7 @@ static inline void blk_clear_queue_full(struct request_queue *q, int rw) | |||
541 | #define RQ_NOMERGE_FLAGS \ | 595 | #define RQ_NOMERGE_FLAGS \ |
542 | (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER) | 596 | (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER) |
543 | #define rq_mergeable(rq) \ | 597 | #define rq_mergeable(rq) \ |
544 | (!((rq)->flags & RQ_NOMERGE_FLAGS) && blk_fs_request((rq))) | 598 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && blk_fs_request((rq))) |
545 | |||
546 | /* | ||
547 | * noop, requests are automagically marked as active/inactive by I/O | ||
548 | * scheduler -- see elv_next_request | ||
549 | */ | ||
550 | #define blk_queue_headactive(q, head_active) | ||
551 | 599 | ||
552 | /* | 600 | /* |
553 | * q->prep_rq_fn return values | 601 | * q->prep_rq_fn return values |
@@ -586,11 +634,6 @@ static inline void blk_queue_bounce(request_queue_t *q, struct bio **bio) | |||
586 | if ((rq->bio)) \ | 634 | if ((rq->bio)) \ |
587 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) | 635 | for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next) |
588 | 636 | ||
589 | struct sec_size { | ||
590 | unsigned block_size; | ||
591 | unsigned block_size_bits; | ||
592 | }; | ||
593 | |||
594 | extern int blk_register_queue(struct gendisk *disk); | 637 | extern int blk_register_queue(struct gendisk *disk); |
595 | extern void blk_unregister_queue(struct gendisk *disk); | 638 | extern void blk_unregister_queue(struct gendisk *disk); |
596 | extern void register_disk(struct gendisk *dev); | 639 | extern void register_disk(struct gendisk *dev); |
@@ -612,6 +655,7 @@ extern void blk_stop_queue(request_queue_t *q); | |||
612 | extern void blk_sync_queue(struct request_queue *q); | 655 | extern void blk_sync_queue(struct request_queue *q); |
613 | extern void __blk_stop_queue(request_queue_t *q); | 656 | extern void __blk_stop_queue(request_queue_t *q); |
614 | extern void blk_run_queue(request_queue_t *); | 657 | extern void blk_run_queue(request_queue_t *); |
658 | extern void blk_start_queueing(request_queue_t *); | ||
615 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); | 659 | extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *); |
616 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int); | 660 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int); |
617 | extern int blk_rq_unmap_user(struct bio *, unsigned int); | 661 | extern int blk_rq_unmap_user(struct bio *, unsigned int); |
@@ -655,16 +699,6 @@ extern void end_that_request_last(struct request *, int); | |||
655 | extern void end_request(struct request *req, int uptodate); | 699 | extern void end_request(struct request *req, int uptodate); |
656 | extern void blk_complete_request(struct request *); | 700 | extern void blk_complete_request(struct request *); |
657 | 701 | ||
658 | static inline int rq_all_done(struct request *rq, unsigned int nr_bytes) | ||
659 | { | ||
660 | if (blk_fs_request(rq)) | ||
661 | return (nr_bytes >= (rq->hard_nr_sectors << 9)); | ||
662 | else if (blk_pc_request(rq)) | ||
663 | return nr_bytes >= rq->data_len; | ||
664 | |||
665 | return 0; | ||
666 | } | ||
667 | |||
668 | /* | 702 | /* |
669 | * end_that_request_first/chunk() takes an uptodate argument. we account | 703 | * end_that_request_first/chunk() takes an uptodate argument. we account |
670 | * any value <= as an io error. 0 means -EIO for compatability reasons, | 704 | * any value <= as an io error. 0 means -EIO for compatability reasons, |
@@ -679,21 +713,6 @@ static inline void blkdev_dequeue_request(struct request *req) | |||
679 | } | 713 | } |
680 | 714 | ||
681 | /* | 715 | /* |
682 | * This should be in elevator.h, but that requires pulling in rq and q | ||
683 | */ | ||
684 | static inline void elv_dispatch_add_tail(struct request_queue *q, | ||
685 | struct request *rq) | ||
686 | { | ||
687 | if (q->last_merge == rq) | ||
688 | q->last_merge = NULL; | ||
689 | q->nr_sorted--; | ||
690 | |||
691 | q->end_sector = rq_end_sector(rq); | ||
692 | q->boundary_rq = rq; | ||
693 | list_add_tail(&rq->queuelist, &q->queue_head); | ||
694 | } | ||
695 | |||
696 | /* | ||
697 | * Access functions for manipulating queue properties | 716 | * Access functions for manipulating queue properties |
698 | */ | 717 | */ |
699 | extern request_queue_t *blk_init_queue_node(request_fn_proc *rfn, | 718 | extern request_queue_t *blk_init_queue_node(request_fn_proc *rfn, |
@@ -737,7 +756,7 @@ extern void blk_put_queue(request_queue_t *); | |||
737 | */ | 756 | */ |
738 | #define blk_queue_tag_depth(q) ((q)->queue_tags->busy) | 757 | #define blk_queue_tag_depth(q) ((q)->queue_tags->busy) |
739 | #define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth) | 758 | #define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth) |
740 | #define blk_rq_tagged(rq) ((rq)->flags & REQ_QUEUED) | 759 | #define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED) |
741 | extern int blk_queue_start_tag(request_queue_t *, struct request *); | 760 | extern int blk_queue_start_tag(request_queue_t *, struct request *); |
742 | extern struct request *blk_queue_find_tag(request_queue_t *, int); | 761 | extern struct request *blk_queue_find_tag(request_queue_t *, int); |
743 | extern void blk_queue_end_tag(request_queue_t *, struct request *); | 762 | extern void blk_queue_end_tag(request_queue_t *, struct request *); |
@@ -787,14 +806,6 @@ static inline int queue_dma_alignment(request_queue_t *q) | |||
787 | return retval; | 806 | return retval; |
788 | } | 807 | } |
789 | 808 | ||
790 | static inline int bdev_dma_aligment(struct block_device *bdev) | ||
791 | { | ||
792 | return queue_dma_alignment(bdev_get_queue(bdev)); | ||
793 | } | ||
794 | |||
795 | #define blk_finished_io(nsects) do { } while (0) | ||
796 | #define blk_started_io(nsects) do { } while (0) | ||
797 | |||
798 | /* assumes size > 256 */ | 809 | /* assumes size > 256 */ |
799 | static inline unsigned int blksize_bits(unsigned int size) | 810 | static inline unsigned int blksize_bits(unsigned int size) |
800 | { | 811 | { |
@@ -824,24 +835,32 @@ struct work_struct; | |||
824 | int kblockd_schedule_work(struct work_struct *work); | 835 | int kblockd_schedule_work(struct work_struct *work); |
825 | void kblockd_flush(void); | 836 | void kblockd_flush(void); |
826 | 837 | ||
827 | #ifdef CONFIG_LBD | ||
828 | # include <asm/div64.h> | ||
829 | # define sector_div(a, b) do_div(a, b) | ||
830 | #else | ||
831 | # define sector_div(n, b)( \ | ||
832 | { \ | ||
833 | int _res; \ | ||
834 | _res = (n) % (b); \ | ||
835 | (n) /= (b); \ | ||
836 | _res; \ | ||
837 | } \ | ||
838 | ) | ||
839 | #endif | ||
840 | |||
841 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ | 838 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ |
842 | MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) | 839 | MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) |
843 | #define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \ | 840 | #define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \ |
844 | MODULE_ALIAS("block-major-" __stringify(major) "-*") | 841 | MODULE_ALIAS("block-major-" __stringify(major) "-*") |
845 | 842 | ||
846 | 843 | ||
844 | #else /* CONFIG_BLOCK */ | ||
845 | /* | ||
846 | * stubs for when the block layer is configured out | ||
847 | */ | ||
848 | #define buffer_heads_over_limit 0 | ||
849 | |||
850 | static inline long blk_congestion_wait(int rw, long timeout) | ||
851 | { | ||
852 | return io_schedule_timeout(timeout); | ||
853 | } | ||
854 | |||
855 | static inline long nr_blockdev_pages(void) | ||
856 | { | ||
857 | return 0; | ||
858 | } | ||
859 | |||
860 | static inline void exit_io_context(void) | ||
861 | { | ||
862 | } | ||
863 | |||
864 | #endif /* CONFIG_BLOCK */ | ||
865 | |||
847 | #endif | 866 | #endif |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 7520cc1ff9e2..b99a714fcac6 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -20,6 +20,7 @@ enum blktrace_cat { | |||
20 | BLK_TC_PC = 1 << 9, /* pc requests */ | 20 | BLK_TC_PC = 1 << 9, /* pc requests */ |
21 | BLK_TC_NOTIFY = 1 << 10, /* special message */ | 21 | BLK_TC_NOTIFY = 1 << 10, /* special message */ |
22 | BLK_TC_AHEAD = 1 << 11, /* readahead */ | 22 | BLK_TC_AHEAD = 1 << 11, /* readahead */ |
23 | BLK_TC_META = 1 << 12, /* metadata */ | ||
23 | 24 | ||
24 | BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ | 25 | BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ |
25 | }; | 26 | }; |
@@ -148,7 +149,7 @@ static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq, | |||
148 | u32 what) | 149 | u32 what) |
149 | { | 150 | { |
150 | struct blk_trace *bt = q->blk_trace; | 151 | struct blk_trace *bt = q->blk_trace; |
151 | int rw = rq->flags & 0x03; | 152 | int rw = rq->cmd_flags & 0x03; |
152 | 153 | ||
153 | if (likely(!bt)) | 154 | if (likely(!bt)) |
154 | return; | 155 | return; |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 737e407d0cd1..131ffd37e716 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
15 | #include <asm/atomic.h> | 15 | #include <asm/atomic.h> |
16 | 16 | ||
17 | #ifdef CONFIG_BLOCK | ||
18 | |||
17 | enum bh_state_bits { | 19 | enum bh_state_bits { |
18 | BH_Uptodate, /* Contains valid data */ | 20 | BH_Uptodate, /* Contains valid data */ |
19 | BH_Dirty, /* Is dirty */ | 21 | BH_Dirty, /* Is dirty */ |
@@ -190,9 +192,7 @@ extern int buffer_heads_over_limit; | |||
190 | * Generic address_space_operations implementations for buffer_head-backed | 192 | * Generic address_space_operations implementations for buffer_head-backed |
191 | * address_spaces. | 193 | * address_spaces. |
192 | */ | 194 | */ |
193 | int try_to_release_page(struct page * page, gfp_t gfp_mask); | ||
194 | void block_invalidatepage(struct page *page, unsigned long offset); | 195 | void block_invalidatepage(struct page *page, unsigned long offset); |
195 | void do_invalidatepage(struct page *page, unsigned long offset); | ||
196 | int block_write_full_page(struct page *page, get_block_t *get_block, | 196 | int block_write_full_page(struct page *page, get_block_t *get_block, |
197 | struct writeback_control *wbc); | 197 | struct writeback_control *wbc); |
198 | int block_read_full_page(struct page*, get_block_t*); | 198 | int block_read_full_page(struct page*, get_block_t*); |
@@ -302,4 +302,19 @@ static inline void lock_buffer(struct buffer_head *bh) | |||
302 | __lock_buffer(bh); | 302 | __lock_buffer(bh); |
303 | } | 303 | } |
304 | 304 | ||
305 | extern int __set_page_dirty_buffers(struct page *page); | ||
306 | |||
307 | #else /* CONFIG_BLOCK */ | ||
308 | |||
309 | static inline void buffer_init(void) {} | ||
310 | static inline int try_to_free_buffers(struct page *page) { return 1; } | ||
311 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } | ||
312 | static inline int inode_has_buffers(struct inode *inode) { return 0; } | ||
313 | static inline void invalidate_inode_buffers(struct inode *inode) {} | ||
314 | static inline int remove_inode_buffers(struct inode *inode) { return 1; } | ||
315 | static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } | ||
316 | static inline void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) {} | ||
317 | |||
318 | |||
319 | #endif /* CONFIG_BLOCK */ | ||
305 | #endif /* _LINUX_BUFFER_HEAD_H */ | 320 | #endif /* _LINUX_BUFFER_HEAD_H */ |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index bea0255196c4..d5b7abc4f409 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -90,6 +90,7 @@ COMPATIBLE_IOCTL(FDTWADDLE) | |||
90 | COMPATIBLE_IOCTL(FDFMTTRK) | 90 | COMPATIBLE_IOCTL(FDFMTTRK) |
91 | COMPATIBLE_IOCTL(FDRAWCMD) | 91 | COMPATIBLE_IOCTL(FDRAWCMD) |
92 | /* 0x12 */ | 92 | /* 0x12 */ |
93 | #ifdef CONFIG_BLOCK | ||
93 | COMPATIBLE_IOCTL(BLKRASET) | 94 | COMPATIBLE_IOCTL(BLKRASET) |
94 | COMPATIBLE_IOCTL(BLKROSET) | 95 | COMPATIBLE_IOCTL(BLKROSET) |
95 | COMPATIBLE_IOCTL(BLKROGET) | 96 | COMPATIBLE_IOCTL(BLKROGET) |
@@ -103,6 +104,7 @@ COMPATIBLE_IOCTL(BLKTRACESETUP) | |||
103 | COMPATIBLE_IOCTL(BLKTRACETEARDOWN) | 104 | COMPATIBLE_IOCTL(BLKTRACETEARDOWN) |
104 | ULONG_IOCTL(BLKRASET) | 105 | ULONG_IOCTL(BLKRASET) |
105 | ULONG_IOCTL(BLKFRASET) | 106 | ULONG_IOCTL(BLKFRASET) |
107 | #endif | ||
106 | /* RAID */ | 108 | /* RAID */ |
107 | COMPATIBLE_IOCTL(RAID_VERSION) | 109 | COMPATIBLE_IOCTL(RAID_VERSION) |
108 | COMPATIBLE_IOCTL(GET_ARRAY_INFO) | 110 | COMPATIBLE_IOCTL(GET_ARRAY_INFO) |
@@ -395,12 +397,6 @@ COMPATIBLE_IOCTL(DVD_WRITE_STRUCT) | |||
395 | COMPATIBLE_IOCTL(DVD_AUTH) | 397 | COMPATIBLE_IOCTL(DVD_AUTH) |
396 | /* pktcdvd */ | 398 | /* pktcdvd */ |
397 | COMPATIBLE_IOCTL(PACKET_CTRL_CMD) | 399 | COMPATIBLE_IOCTL(PACKET_CTRL_CMD) |
398 | /* Big L */ | ||
399 | ULONG_IOCTL(LOOP_SET_FD) | ||
400 | ULONG_IOCTL(LOOP_CHANGE_FD) | ||
401 | COMPATIBLE_IOCTL(LOOP_CLR_FD) | ||
402 | COMPATIBLE_IOCTL(LOOP_GET_STATUS64) | ||
403 | COMPATIBLE_IOCTL(LOOP_SET_STATUS64) | ||
404 | /* Big A */ | 400 | /* Big A */ |
405 | /* sparc only */ | 401 | /* sparc only */ |
406 | /* Big Q for sound/OSS */ | 402 | /* Big Q for sound/OSS */ |
@@ -573,18 +569,6 @@ COMPATIBLE_IOCTL(RAW_SETBIND) | |||
573 | COMPATIBLE_IOCTL(RAW_GETBIND) | 569 | COMPATIBLE_IOCTL(RAW_GETBIND) |
574 | /* SMB ioctls which do not need any translations */ | 570 | /* SMB ioctls which do not need any translations */ |
575 | COMPATIBLE_IOCTL(SMB_IOC_NEWCONN) | 571 | COMPATIBLE_IOCTL(SMB_IOC_NEWCONN) |
576 | /* NCP ioctls which do not need any translations */ | ||
577 | COMPATIBLE_IOCTL(NCP_IOC_CONN_LOGGED_IN) | ||
578 | COMPATIBLE_IOCTL(NCP_IOC_SIGN_INIT) | ||
579 | COMPATIBLE_IOCTL(NCP_IOC_SIGN_WANTED) | ||
580 | COMPATIBLE_IOCTL(NCP_IOC_SET_SIGN_WANTED) | ||
581 | COMPATIBLE_IOCTL(NCP_IOC_LOCKUNLOCK) | ||
582 | COMPATIBLE_IOCTL(NCP_IOC_GETROOT) | ||
583 | COMPATIBLE_IOCTL(NCP_IOC_SETROOT) | ||
584 | COMPATIBLE_IOCTL(NCP_IOC_GETCHARSETS) | ||
585 | COMPATIBLE_IOCTL(NCP_IOC_SETCHARSETS) | ||
586 | COMPATIBLE_IOCTL(NCP_IOC_GETDENTRYTTL) | ||
587 | COMPATIBLE_IOCTL(NCP_IOC_SETDENTRYTTL) | ||
588 | /* Little a */ | 572 | /* Little a */ |
589 | COMPATIBLE_IOCTL(ATMSIGD_CTRL) | 573 | COMPATIBLE_IOCTL(ATMSIGD_CTRL) |
590 | COMPATIBLE_IOCTL(ATMARPD_CTRL) | 574 | COMPATIBLE_IOCTL(ATMARPD_CTRL) |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 060b96112ec6..538423d4a865 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -10,11 +10,11 @@ | |||
10 | # define __force __attribute__((force)) | 10 | # define __force __attribute__((force)) |
11 | # define __nocast __attribute__((nocast)) | 11 | # define __nocast __attribute__((nocast)) |
12 | # define __iomem __attribute__((noderef, address_space(2))) | 12 | # define __iomem __attribute__((noderef, address_space(2))) |
13 | # define __acquires(x) __attribute__((context(0,1))) | 13 | # define __acquires(x) __attribute__((context(x,0,1))) |
14 | # define __releases(x) __attribute__((context(1,0))) | 14 | # define __releases(x) __attribute__((context(x,1,0))) |
15 | # define __acquire(x) __context__(1) | 15 | # define __acquire(x) __context__(x,1) |
16 | # define __release(x) __context__(-1) | 16 | # define __release(x) __context__(x,-1) |
17 | # define __cond_lock(x) ((x) ? ({ __context__(1); 1; }) : 0) | 17 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) |
18 | extern void __chk_user_ptr(void __user *); | 18 | extern void __chk_user_ptr(void __user *); |
19 | extern void __chk_io_ptr(void __iomem *); | 19 | extern void __chk_io_ptr(void __iomem *); |
20 | #else | 20 | #else |
@@ -31,7 +31,7 @@ extern void __chk_io_ptr(void __iomem *); | |||
31 | # define __releases(x) | 31 | # define __releases(x) |
32 | # define __acquire(x) (void)0 | 32 | # define __acquire(x) (void)0 |
33 | # define __release(x) (void)0 | 33 | # define __release(x) (void)0 |
34 | # define __cond_lock(x) (x) | 34 | # define __cond_lock(x,c) (c) |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifdef __KERNEL__ | 37 | #ifdef __KERNEL__ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 9354722a9217..4d8adf663681 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -63,6 +63,8 @@ static inline int cpuset_do_slab_mem_spread(void) | |||
63 | return current->flags & PF_SPREAD_SLAB; | 63 | return current->flags & PF_SPREAD_SLAB; |
64 | } | 64 | } |
65 | 65 | ||
66 | extern void cpuset_track_online_nodes(void); | ||
67 | |||
66 | #else /* !CONFIG_CPUSETS */ | 68 | #else /* !CONFIG_CPUSETS */ |
67 | 69 | ||
68 | static inline int cpuset_init_early(void) { return 0; } | 70 | static inline int cpuset_init_early(void) { return 0; } |
@@ -126,6 +128,8 @@ static inline int cpuset_do_slab_mem_spread(void) | |||
126 | return 0; | 128 | return 0; |
127 | } | 129 | } |
128 | 130 | ||
131 | static inline void cpuset_track_online_nodes(void) {} | ||
132 | |||
129 | #endif /* !CONFIG_CPUSETS */ | 133 | #endif /* !CONFIG_CPUSETS */ |
130 | 134 | ||
131 | #endif /* _LINUX_CPUSET_H */ | 135 | #endif /* _LINUX_CPUSET_H */ |
diff --git a/include/linux/cramfs_fs.h b/include/linux/cramfs_fs.h index a41f38428c37..1dba681e428d 100644 --- a/include/linux/cramfs_fs.h +++ b/include/linux/cramfs_fs.h | |||
@@ -87,6 +87,6 @@ struct cramfs_super { | |||
87 | /* Uncompression interfaces to the underlying zlib */ | 87 | /* Uncompression interfaces to the underlying zlib */ |
88 | int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen); | 88 | int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen); |
89 | int cramfs_uncompress_init(void); | 89 | int cramfs_uncompress_init(void); |
90 | int cramfs_uncompress_exit(void); | 90 | void cramfs_uncompress_exit(void); |
91 | 91 | ||
92 | #endif | 92 | #endif |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 635690cf3e3d..ff203c465fed 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -24,6 +24,13 @@ enum dma_data_direction { | |||
24 | #define DMA_28BIT_MASK 0x000000000fffffffULL | 24 | #define DMA_28BIT_MASK 0x000000000fffffffULL |
25 | #define DMA_24BIT_MASK 0x0000000000ffffffULL | 25 | #define DMA_24BIT_MASK 0x0000000000ffffffULL |
26 | 26 | ||
27 | static inline int valid_dma_direction(int dma_direction) | ||
28 | { | ||
29 | return ((dma_direction == DMA_BIDIRECTIONAL) || | ||
30 | (dma_direction == DMA_TO_DEVICE) || | ||
31 | (dma_direction == DMA_FROM_DEVICE)); | ||
32 | } | ||
33 | |||
27 | #include <asm/dma-mapping.h> | 34 | #include <asm/dma-mapping.h> |
28 | 35 | ||
29 | /* Backwards compat, remove in 2.7.x */ | 36 | /* Backwards compat, remove in 2.7.x */ |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index b2cd2071d432..38dc403be70b 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -27,7 +27,8 @@ enum dmi_device_type { | |||
27 | DMI_DEV_TYPE_ETHERNET, | 27 | DMI_DEV_TYPE_ETHERNET, |
28 | DMI_DEV_TYPE_TOKENRING, | 28 | DMI_DEV_TYPE_TOKENRING, |
29 | DMI_DEV_TYPE_SOUND, | 29 | DMI_DEV_TYPE_SOUND, |
30 | DMI_DEV_TYPE_IPMI = -1 | 30 | DMI_DEV_TYPE_IPMI = -1, |
31 | DMI_DEV_TYPE_OEM_STRING = -2 | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | struct dmi_header { | 34 | struct dmi_header { |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 1713ace808bf..b3370ef5164d 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -1,12 +1,16 @@ | |||
1 | #ifndef _LINUX_ELEVATOR_H | 1 | #ifndef _LINUX_ELEVATOR_H |
2 | #define _LINUX_ELEVATOR_H | 2 | #define _LINUX_ELEVATOR_H |
3 | 3 | ||
4 | #include <linux/percpu.h> | ||
5 | |||
6 | #ifdef CONFIG_BLOCK | ||
7 | |||
4 | typedef int (elevator_merge_fn) (request_queue_t *, struct request **, | 8 | typedef int (elevator_merge_fn) (request_queue_t *, struct request **, |
5 | struct bio *); | 9 | struct bio *); |
6 | 10 | ||
7 | typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *); | 11 | typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *); |
8 | 12 | ||
9 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *); | 13 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *, int); |
10 | 14 | ||
11 | typedef int (elevator_dispatch_fn) (request_queue_t *, int); | 15 | typedef int (elevator_dispatch_fn) (request_queue_t *, int); |
12 | 16 | ||
@@ -14,9 +18,9 @@ typedef void (elevator_add_req_fn) (request_queue_t *, struct request *); | |||
14 | typedef int (elevator_queue_empty_fn) (request_queue_t *); | 18 | typedef int (elevator_queue_empty_fn) (request_queue_t *); |
15 | typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); | 19 | typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); |
16 | typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); | 20 | typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); |
17 | typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *); | 21 | typedef int (elevator_may_queue_fn) (request_queue_t *, int); |
18 | 22 | ||
19 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, gfp_t); | 23 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t); |
20 | typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); | 24 | typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); |
21 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); | 25 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); |
22 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); | 26 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); |
@@ -82,19 +86,21 @@ struct elevator_queue | |||
82 | struct kobject kobj; | 86 | struct kobject kobj; |
83 | struct elevator_type *elevator_type; | 87 | struct elevator_type *elevator_type; |
84 | struct mutex sysfs_lock; | 88 | struct mutex sysfs_lock; |
89 | struct hlist_head *hash; | ||
85 | }; | 90 | }; |
86 | 91 | ||
87 | /* | 92 | /* |
88 | * block elevator interface | 93 | * block elevator interface |
89 | */ | 94 | */ |
90 | extern void elv_dispatch_sort(request_queue_t *, struct request *); | 95 | extern void elv_dispatch_sort(request_queue_t *, struct request *); |
96 | extern void elv_dispatch_add_tail(request_queue_t *, struct request *); | ||
91 | extern void elv_add_request(request_queue_t *, struct request *, int, int); | 97 | extern void elv_add_request(request_queue_t *, struct request *, int, int); |
92 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); | 98 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); |
93 | extern void elv_insert(request_queue_t *, struct request *, int); | 99 | extern void elv_insert(request_queue_t *, struct request *, int); |
94 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); | 100 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); |
95 | extern void elv_merge_requests(request_queue_t *, struct request *, | 101 | extern void elv_merge_requests(request_queue_t *, struct request *, |
96 | struct request *); | 102 | struct request *); |
97 | extern void elv_merged_request(request_queue_t *, struct request *); | 103 | extern void elv_merged_request(request_queue_t *, struct request *, int); |
98 | extern void elv_dequeue_request(request_queue_t *, struct request *); | 104 | extern void elv_dequeue_request(request_queue_t *, struct request *); |
99 | extern void elv_requeue_request(request_queue_t *, struct request *); | 105 | extern void elv_requeue_request(request_queue_t *, struct request *); |
100 | extern int elv_queue_empty(request_queue_t *); | 106 | extern int elv_queue_empty(request_queue_t *); |
@@ -103,9 +109,9 @@ extern struct request *elv_former_request(request_queue_t *, struct request *); | |||
103 | extern struct request *elv_latter_request(request_queue_t *, struct request *); | 109 | extern struct request *elv_latter_request(request_queue_t *, struct request *); |
104 | extern int elv_register_queue(request_queue_t *q); | 110 | extern int elv_register_queue(request_queue_t *q); |
105 | extern void elv_unregister_queue(request_queue_t *q); | 111 | extern void elv_unregister_queue(request_queue_t *q); |
106 | extern int elv_may_queue(request_queue_t *, int, struct bio *); | 112 | extern int elv_may_queue(request_queue_t *, int); |
107 | extern void elv_completed_request(request_queue_t *, struct request *); | 113 | extern void elv_completed_request(request_queue_t *, struct request *); |
108 | extern int elv_set_request(request_queue_t *, struct request *, struct bio *, gfp_t); | 114 | extern int elv_set_request(request_queue_t *, struct request *, gfp_t); |
109 | extern void elv_put_request(request_queue_t *, struct request *); | 115 | extern void elv_put_request(request_queue_t *, struct request *); |
110 | 116 | ||
111 | /* | 117 | /* |
@@ -125,6 +131,19 @@ extern void elevator_exit(elevator_t *); | |||
125 | extern int elv_rq_merge_ok(struct request *, struct bio *); | 131 | extern int elv_rq_merge_ok(struct request *, struct bio *); |
126 | 132 | ||
127 | /* | 133 | /* |
134 | * Helper functions. | ||
135 | */ | ||
136 | extern struct request *elv_rb_former_request(request_queue_t *, struct request *); | ||
137 | extern struct request *elv_rb_latter_request(request_queue_t *, struct request *); | ||
138 | |||
139 | /* | ||
140 | * rb support functions. | ||
141 | */ | ||
142 | extern struct request *elv_rb_add(struct rb_root *, struct request *); | ||
143 | extern void elv_rb_del(struct rb_root *, struct request *); | ||
144 | extern struct request *elv_rb_find(struct rb_root *, sector_t); | ||
145 | |||
146 | /* | ||
128 | * Return values from elevator merger | 147 | * Return values from elevator merger |
129 | */ | 148 | */ |
130 | #define ELEVATOR_NO_MERGE 0 | 149 | #define ELEVATOR_NO_MERGE 0 |
@@ -149,5 +168,42 @@ enum { | |||
149 | }; | 168 | }; |
150 | 169 | ||
151 | #define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors) | 170 | #define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors) |
171 | #define rb_entry_rq(node) rb_entry((node), struct request, rb_node) | ||
172 | |||
173 | /* | ||
174 | * Hack to reuse the donelist list_head as the fifo time holder while | ||
175 | * the request is in the io scheduler. Saves an unsigned long in rq. | ||
176 | */ | ||
177 | #define rq_fifo_time(rq) ((unsigned long) (rq)->donelist.next) | ||
178 | #define rq_set_fifo_time(rq,exp) ((rq)->donelist.next = (void *) (exp)) | ||
179 | #define rq_entry_fifo(ptr) list_entry((ptr), struct request, queuelist) | ||
180 | #define rq_fifo_clear(rq) do { \ | ||
181 | list_del_init(&(rq)->queuelist); \ | ||
182 | INIT_LIST_HEAD(&(rq)->donelist); \ | ||
183 | } while (0) | ||
152 | 184 | ||
185 | /* | ||
186 | * io context count accounting | ||
187 | */ | ||
188 | #define elv_ioc_count_mod(name, __val) \ | ||
189 | do { \ | ||
190 | preempt_disable(); \ | ||
191 | __get_cpu_var(name) += (__val); \ | ||
192 | preempt_enable(); \ | ||
193 | } while (0) | ||
194 | |||
195 | #define elv_ioc_count_inc(name) elv_ioc_count_mod(name, 1) | ||
196 | #define elv_ioc_count_dec(name) elv_ioc_count_mod(name, -1) | ||
197 | |||
198 | #define elv_ioc_count_read(name) \ | ||
199 | ({ \ | ||
200 | unsigned long __val = 0; \ | ||
201 | int __cpu; \ | ||
202 | smp_wmb(); \ | ||
203 | for_each_possible_cpu(__cpu) \ | ||
204 | __val += per_cpu(name, __cpu); \ | ||
205 | __val; \ | ||
206 | }) | ||
207 | |||
208 | #endif /* CONFIG_BLOCK */ | ||
153 | #endif | 209 | #endif |
diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h index 408118a07763..92f8d4fab32b 100644 --- a/include/linux/errqueue.h +++ b/include/linux/errqueue.h | |||
@@ -38,7 +38,7 @@ struct sock_exterr_skb | |||
38 | } header; | 38 | } header; |
39 | struct sock_extended_err ee; | 39 | struct sock_extended_err ee; |
40 | u16 addr_offset; | 40 | u16 addr_offset; |
41 | u16 port; | 41 | __be16 port; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #endif | 44 | #endif |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 33a1aa107329..153d755376a4 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -165,41 +165,49 @@ struct ext2_group_desc | |||
165 | #define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1) | 165 | #define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1) |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * Inode flags | 168 | * Inode flags (GETFLAGS/SETFLAGS) |
169 | */ | 169 | */ |
170 | #define EXT2_SECRM_FL 0x00000001 /* Secure deletion */ | 170 | #define EXT2_SECRM_FL FS_SECRM_FL /* Secure deletion */ |
171 | #define EXT2_UNRM_FL 0x00000002 /* Undelete */ | 171 | #define EXT2_UNRM_FL FS_UNRM_FL /* Undelete */ |
172 | #define EXT2_COMPR_FL 0x00000004 /* Compress file */ | 172 | #define EXT2_COMPR_FL FS_COMPR_FL /* Compress file */ |
173 | #define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */ | 173 | #define EXT2_SYNC_FL FS_SYNC_FL /* Synchronous updates */ |
174 | #define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */ | 174 | #define EXT2_IMMUTABLE_FL FS_IMMUTABLE_FL /* Immutable file */ |
175 | #define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */ | 175 | #define EXT2_APPEND_FL FS_APPEND_FL /* writes to file may only append */ |
176 | #define EXT2_NODUMP_FL 0x00000040 /* do not dump file */ | 176 | #define EXT2_NODUMP_FL FS_NODUMP_FL /* do not dump file */ |
177 | #define EXT2_NOATIME_FL 0x00000080 /* do not update atime */ | 177 | #define EXT2_NOATIME_FL FS_NOATIME_FL /* do not update atime */ |
178 | /* Reserved for compression usage... */ | 178 | /* Reserved for compression usage... */ |
179 | #define EXT2_DIRTY_FL 0x00000100 | 179 | #define EXT2_DIRTY_FL FS_DIRTY_FL |
180 | #define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */ | 180 | #define EXT2_COMPRBLK_FL FS_COMPRBLK_FL /* One or more compressed clusters */ |
181 | #define EXT2_NOCOMP_FL 0x00000400 /* Don't compress */ | 181 | #define EXT2_NOCOMP_FL FS_NOCOMP_FL /* Don't compress */ |
182 | #define EXT2_ECOMPR_FL 0x00000800 /* Compression error */ | 182 | #define EXT2_ECOMPR_FL FS_ECOMPR_FL /* Compression error */ |
183 | /* End compression flags --- maybe not all used */ | 183 | /* End compression flags --- maybe not all used */ |
184 | #define EXT2_BTREE_FL 0x00001000 /* btree format dir */ | 184 | #define EXT2_BTREE_FL FS_BTREE_FL /* btree format dir */ |
185 | #define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */ | 185 | #define EXT2_INDEX_FL FS_INDEX_FL /* hash-indexed directory */ |
186 | #define EXT2_IMAGIC_FL 0x00002000 /* AFS directory */ | 186 | #define EXT2_IMAGIC_FL FS_IMAGIC_FL /* AFS directory */ |
187 | #define EXT2_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */ | 187 | #define EXT2_JOURNAL_DATA_FL FS_JOURNAL_DATA_FL /* Reserved for ext3 */ |
188 | #define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */ | 188 | #define EXT2_NOTAIL_FL FS_NOTAIL_FL /* file tail should not be merged */ |
189 | #define EXT2_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ | 189 | #define EXT2_DIRSYNC_FL FS_DIRSYNC_FL /* dirsync behaviour (directories only) */ |
190 | #define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ | 190 | #define EXT2_TOPDIR_FL FS_TOPDIR_FL /* Top of directory hierarchies*/ |
191 | #define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | 191 | #define EXT2_RESERVED_FL FS_RESERVED_FL /* reserved for ext2 lib */ |
192 | 192 | ||
193 | #define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | 193 | #define EXT2_FL_USER_VISIBLE FS_FL_USER_VISIBLE /* User visible flags */ |
194 | #define EXT2_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ | 194 | #define EXT2_FL_USER_MODIFIABLE FS_FL_USER_MODIFIABLE /* User modifiable flags */ |
195 | 195 | ||
196 | /* | 196 | /* |
197 | * ioctl commands | 197 | * ioctl commands |
198 | */ | 198 | */ |
199 | #define EXT2_IOC_GETFLAGS _IOR('f', 1, long) | 199 | #define EXT2_IOC_GETFLAGS FS_IOC_GETFLAGS |
200 | #define EXT2_IOC_SETFLAGS _IOW('f', 2, long) | 200 | #define EXT2_IOC_SETFLAGS FS_IOC_SETFLAGS |
201 | #define EXT2_IOC_GETVERSION _IOR('v', 1, long) | 201 | #define EXT2_IOC_GETVERSION FS_IOC_GETVERSION |
202 | #define EXT2_IOC_SETVERSION _IOW('v', 2, long) | 202 | #define EXT2_IOC_SETVERSION FS_IOC_SETVERSION |
203 | |||
204 | /* | ||
205 | * ioctl commands in 32 bit emulation | ||
206 | */ | ||
207 | #define EXT2_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
208 | #define EXT2_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
209 | #define EXT2_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
210 | #define EXT2_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
203 | 211 | ||
204 | /* | 212 | /* |
205 | * Structure of an inode on the disk | 213 | * Structure of an inode on the disk |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index cc08f56750da..11cca1bdc0c7 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -216,14 +216,14 @@ struct ext3_new_group_data { | |||
216 | /* | 216 | /* |
217 | * ioctl commands | 217 | * ioctl commands |
218 | */ | 218 | */ |
219 | #define EXT3_IOC_GETFLAGS _IOR('f', 1, long) | 219 | #define EXT3_IOC_GETFLAGS FS_IOC_GETFLAGS |
220 | #define EXT3_IOC_SETFLAGS _IOW('f', 2, long) | 220 | #define EXT3_IOC_SETFLAGS FS_IOC_SETFLAGS |
221 | #define EXT3_IOC_GETVERSION _IOR('f', 3, long) | 221 | #define EXT3_IOC_GETVERSION _IOR('f', 3, long) |
222 | #define EXT3_IOC_SETVERSION _IOW('f', 4, long) | 222 | #define EXT3_IOC_SETVERSION _IOW('f', 4, long) |
223 | #define EXT3_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long) | 223 | #define EXT3_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long) |
224 | #define EXT3_IOC_GROUP_ADD _IOW('f', 8,struct ext3_new_group_input) | 224 | #define EXT3_IOC_GROUP_ADD _IOW('f', 8,struct ext3_new_group_input) |
225 | #define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long) | 225 | #define EXT3_IOC_GETVERSION_OLD FS_IOC_GETVERSION |
226 | #define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long) | 226 | #define EXT3_IOC_SETVERSION_OLD FS_IOC_SETVERSION |
227 | #ifdef CONFIG_JBD_DEBUG | 227 | #ifdef CONFIG_JBD_DEBUG |
228 | #define EXT3_IOC_WAIT_FOR_READONLY _IOR('f', 99, long) | 228 | #define EXT3_IOC_WAIT_FOR_READONLY _IOR('f', 99, long) |
229 | #endif | 229 | #endif |
@@ -231,6 +231,23 @@ struct ext3_new_group_data { | |||
231 | #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) | 231 | #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) |
232 | 232 | ||
233 | /* | 233 | /* |
234 | * ioctl commands in 32 bit emulation | ||
235 | */ | ||
236 | #define EXT3_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
237 | #define EXT3_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
238 | #define EXT3_IOC32_GETVERSION _IOR('f', 3, int) | ||
239 | #define EXT3_IOC32_SETVERSION _IOW('f', 4, int) | ||
240 | #define EXT3_IOC32_GETRSVSZ _IOR('f', 5, int) | ||
241 | #define EXT3_IOC32_SETRSVSZ _IOW('f', 6, int) | ||
242 | #define EXT3_IOC32_GROUP_EXTEND _IOW('f', 7, unsigned int) | ||
243 | #ifdef CONFIG_JBD_DEBUG | ||
244 | #define EXT3_IOC32_WAIT_FOR_READONLY _IOR('f', 99, int) | ||
245 | #endif | ||
246 | #define EXT3_IOC32_GETVERSION_OLD FS_IOC32_GETVERSION | ||
247 | #define EXT3_IOC32_SETVERSION_OLD FS_IOC32_SETVERSION | ||
248 | |||
249 | |||
250 | /* | ||
234 | * Mount options | 251 | * Mount options |
235 | */ | 252 | */ |
236 | struct ext3_mount_options { | 253 | struct ext3_mount_options { |
@@ -812,6 +829,7 @@ extern void ext3_set_aops(struct inode *inode); | |||
812 | /* ioctl.c */ | 829 | /* ioctl.c */ |
813 | extern int ext3_ioctl (struct inode *, struct file *, unsigned int, | 830 | extern int ext3_ioctl (struct inode *, struct file *, unsigned int, |
814 | unsigned long); | 831 | unsigned long); |
832 | extern long ext3_compat_ioctl (struct file *, unsigned int, unsigned long); | ||
815 | 833 | ||
816 | /* namei.c */ | 834 | /* namei.c */ |
817 | extern int ext3_orphan_add(handle_t *, struct inode *); | 835 | extern int ext3_orphan_add(handle_t *, struct inode *); |
diff --git a/include/linux/file.h b/include/linux/file.h index 9f7c2513866f..74183e6f7f45 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -112,5 +112,6 @@ struct task_struct; | |||
112 | 112 | ||
113 | struct files_struct *get_files_struct(struct task_struct *); | 113 | struct files_struct *get_files_struct(struct task_struct *); |
114 | void FASTCALL(put_files_struct(struct files_struct *fs)); | 114 | void FASTCALL(put_files_struct(struct files_struct *fs)); |
115 | void reset_files_struct(struct task_struct *, struct files_struct *); | ||
115 | 116 | ||
116 | #endif /* __LINUX_FILE_H */ | 117 | #endif /* __LINUX_FILE_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 8f74dfbb2edd..2e29a2edaeec 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -79,8 +79,8 @@ extern int dir_notify_enable; | |||
79 | #define WRITE 1 | 79 | #define WRITE 1 |
80 | #define READA 2 /* read-ahead - don't block if no resources */ | 80 | #define READA 2 /* read-ahead - don't block if no resources */ |
81 | #define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ | 81 | #define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ |
82 | #define SPECIAL 4 /* For non-blockdevice requests in request queue */ | ||
83 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) | 82 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) |
83 | #define READ_META (READ | (1 << BIO_RW_META)) | ||
84 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) | 84 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) |
85 | #define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) | 85 | #define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) |
86 | 86 | ||
@@ -217,6 +217,45 @@ extern int dir_notify_enable; | |||
217 | #define FIBMAP _IO(0x00,1) /* bmap access */ | 217 | #define FIBMAP _IO(0x00,1) /* bmap access */ |
218 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ | 218 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ |
219 | 219 | ||
220 | #define FS_IOC_GETFLAGS _IOR('f', 1, long) | ||
221 | #define FS_IOC_SETFLAGS _IOW('f', 2, long) | ||
222 | #define FS_IOC_GETVERSION _IOR('v', 1, long) | ||
223 | #define FS_IOC_SETVERSION _IOW('v', 2, long) | ||
224 | #define FS_IOC32_GETFLAGS _IOR('f', 1, int) | ||
225 | #define FS_IOC32_SETFLAGS _IOW('f', 2, int) | ||
226 | #define FS_IOC32_GETVERSION _IOR('v', 1, int) | ||
227 | #define FS_IOC32_SETVERSION _IOW('v', 2, int) | ||
228 | |||
229 | /* | ||
230 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) | ||
231 | */ | ||
232 | #define FS_SECRM_FL 0x00000001 /* Secure deletion */ | ||
233 | #define FS_UNRM_FL 0x00000002 /* Undelete */ | ||
234 | #define FS_COMPR_FL 0x00000004 /* Compress file */ | ||
235 | #define FS_SYNC_FL 0x00000008 /* Synchronous updates */ | ||
236 | #define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */ | ||
237 | #define FS_APPEND_FL 0x00000020 /* writes to file may only append */ | ||
238 | #define FS_NODUMP_FL 0x00000040 /* do not dump file */ | ||
239 | #define FS_NOATIME_FL 0x00000080 /* do not update atime */ | ||
240 | /* Reserved for compression usage... */ | ||
241 | #define FS_DIRTY_FL 0x00000100 | ||
242 | #define FS_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */ | ||
243 | #define FS_NOCOMP_FL 0x00000400 /* Don't compress */ | ||
244 | #define FS_ECOMPR_FL 0x00000800 /* Compression error */ | ||
245 | /* End compression flags --- maybe not all used */ | ||
246 | #define FS_BTREE_FL 0x00001000 /* btree format dir */ | ||
247 | #define FS_INDEX_FL 0x00001000 /* hash-indexed directory */ | ||
248 | #define FS_IMAGIC_FL 0x00002000 /* AFS directory */ | ||
249 | #define FS_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */ | ||
250 | #define FS_NOTAIL_FL 0x00008000 /* file tail should not be merged */ | ||
251 | #define FS_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ | ||
252 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ | ||
253 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | ||
254 | |||
255 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | ||
256 | #define FS_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ | ||
257 | |||
258 | |||
220 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 | 259 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 |
221 | #define SYNC_FILE_RANGE_WRITE 2 | 260 | #define SYNC_FILE_RANGE_WRITE 2 |
222 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | 261 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 |
@@ -553,7 +592,9 @@ struct inode { | |||
553 | unsigned int i_flags; | 592 | unsigned int i_flags; |
554 | 593 | ||
555 | atomic_t i_writecount; | 594 | atomic_t i_writecount; |
595 | #ifdef CONFIG_SECURITY | ||
556 | void *i_security; | 596 | void *i_security; |
597 | #endif | ||
557 | void *i_private; /* fs or device private pointer */ | 598 | void *i_private; /* fs or device private pointer */ |
558 | #ifdef __NEED_I_SIZE_ORDERED | 599 | #ifdef __NEED_I_SIZE_ORDERED |
559 | seqcount_t i_size_seqcount; | 600 | seqcount_t i_size_seqcount; |
@@ -645,7 +686,6 @@ struct fown_struct { | |||
645 | rwlock_t lock; /* protects pid, uid, euid fields */ | 686 | rwlock_t lock; /* protects pid, uid, euid fields */ |
646 | int pid; /* pid or -pgrp where SIGIO should be sent */ | 687 | int pid; /* pid or -pgrp where SIGIO should be sent */ |
647 | uid_t uid, euid; /* uid/euid of process setting the owner */ | 688 | uid_t uid, euid; /* uid/euid of process setting the owner */ |
648 | void *security; | ||
649 | int signum; /* posix.1b rt signal to be delivered on IO */ | 689 | int signum; /* posix.1b rt signal to be delivered on IO */ |
650 | }; | 690 | }; |
651 | 691 | ||
@@ -688,8 +728,9 @@ struct file { | |||
688 | struct file_ra_state f_ra; | 728 | struct file_ra_state f_ra; |
689 | 729 | ||
690 | unsigned long f_version; | 730 | unsigned long f_version; |
731 | #ifdef CONFIG_SECURITY | ||
691 | void *f_security; | 732 | void *f_security; |
692 | 733 | #endif | |
693 | /* needed for tty driver, and maybe others */ | 734 | /* needed for tty driver, and maybe others */ |
694 | void *private_data; | 735 | void *private_data; |
695 | 736 | ||
@@ -877,7 +918,9 @@ struct super_block { | |||
877 | int s_syncing; | 918 | int s_syncing; |
878 | int s_need_sync_fs; | 919 | int s_need_sync_fs; |
879 | atomic_t s_active; | 920 | atomic_t s_active; |
921 | #ifdef CONFIG_SECURITY | ||
880 | void *s_security; | 922 | void *s_security; |
923 | #endif | ||
881 | struct xattr_handler **s_xattr; | 924 | struct xattr_handler **s_xattr; |
882 | 925 | ||
883 | struct list_head s_inodes; /* all inodes */ | 926 | struct list_head s_inodes; /* all inodes */ |
@@ -1054,9 +1097,9 @@ struct file_operations { | |||
1054 | struct module *owner; | 1097 | struct module *owner; |
1055 | loff_t (*llseek) (struct file *, loff_t, int); | 1098 | loff_t (*llseek) (struct file *, loff_t, int); |
1056 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); | 1099 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); |
1057 | ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t); | ||
1058 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 1100 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
1059 | ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, loff_t); | 1101 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
1102 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | ||
1060 | int (*readdir) (struct file *, void *, filldir_t); | 1103 | int (*readdir) (struct file *, void *, filldir_t); |
1061 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 1104 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
1062 | int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); | 1105 | int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); |
@@ -1070,8 +1113,6 @@ struct file_operations { | |||
1070 | int (*aio_fsync) (struct kiocb *, int datasync); | 1113 | int (*aio_fsync) (struct kiocb *, int datasync); |
1071 | int (*fasync) (int, struct file *, int); | 1114 | int (*fasync) (int, struct file *, int); |
1072 | int (*lock) (struct file *, int, struct file_lock *); | 1115 | int (*lock) (struct file *, int, struct file_lock *); |
1073 | ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *); | ||
1074 | ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *); | ||
1075 | ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *); | 1116 | ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *); |
1076 | ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); | 1117 | ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); |
1077 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1118 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
@@ -1109,6 +1150,11 @@ struct inode_operations { | |||
1109 | 1150 | ||
1110 | struct seq_file; | 1151 | struct seq_file; |
1111 | 1152 | ||
1153 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, | ||
1154 | unsigned long nr_segs, unsigned long fast_segs, | ||
1155 | struct iovec *fast_pointer, | ||
1156 | struct iovec **ret_pointer); | ||
1157 | |||
1112 | extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); | 1158 | extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); |
1113 | extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); | 1159 | extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); |
1114 | extern ssize_t vfs_readv(struct file *, const struct iovec __user *, | 1160 | extern ssize_t vfs_readv(struct file *, const struct iovec __user *, |
@@ -1143,9 +1189,10 @@ struct super_operations { | |||
1143 | 1189 | ||
1144 | int (*show_options)(struct seq_file *, struct vfsmount *); | 1190 | int (*show_options)(struct seq_file *, struct vfsmount *); |
1145 | int (*show_stats)(struct seq_file *, struct vfsmount *); | 1191 | int (*show_stats)(struct seq_file *, struct vfsmount *); |
1146 | 1192 | #ifdef CONFIG_QUOTA | |
1147 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); | 1193 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); |
1148 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 1194 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
1195 | #endif | ||
1149 | }; | 1196 | }; |
1150 | 1197 | ||
1151 | /* Inode state bits. Protected by inode_lock. */ | 1198 | /* Inode state bits. Protected by inode_lock. */ |
@@ -1172,15 +1219,30 @@ static inline void mark_inode_dirty_sync(struct inode *inode) | |||
1172 | __mark_inode_dirty(inode, I_DIRTY_SYNC); | 1219 | __mark_inode_dirty(inode, I_DIRTY_SYNC); |
1173 | } | 1220 | } |
1174 | 1221 | ||
1175 | static inline void inode_inc_link_count(struct inode *inode) | 1222 | static inline void inc_nlink(struct inode *inode) |
1176 | { | 1223 | { |
1177 | inode->i_nlink++; | 1224 | inode->i_nlink++; |
1225 | } | ||
1226 | |||
1227 | static inline void inode_inc_link_count(struct inode *inode) | ||
1228 | { | ||
1229 | inc_nlink(inode); | ||
1178 | mark_inode_dirty(inode); | 1230 | mark_inode_dirty(inode); |
1179 | } | 1231 | } |
1180 | 1232 | ||
1181 | static inline void inode_dec_link_count(struct inode *inode) | 1233 | static inline void drop_nlink(struct inode *inode) |
1182 | { | 1234 | { |
1183 | inode->i_nlink--; | 1235 | inode->i_nlink--; |
1236 | } | ||
1237 | |||
1238 | static inline void clear_nlink(struct inode *inode) | ||
1239 | { | ||
1240 | inode->i_nlink = 0; | ||
1241 | } | ||
1242 | |||
1243 | static inline void inode_dec_link_count(struct inode *inode) | ||
1244 | { | ||
1245 | drop_nlink(inode); | ||
1184 | mark_inode_dirty(inode); | 1246 | mark_inode_dirty(inode); |
1185 | } | 1247 | } |
1186 | 1248 | ||
@@ -1438,6 +1500,7 @@ extern void __init vfs_caches_init(unsigned long); | |||
1438 | extern void putname(const char *name); | 1500 | extern void putname(const char *name); |
1439 | #endif | 1501 | #endif |
1440 | 1502 | ||
1503 | #ifdef CONFIG_BLOCK | ||
1441 | extern int register_blkdev(unsigned int, const char *); | 1504 | extern int register_blkdev(unsigned int, const char *); |
1442 | extern int unregister_blkdev(unsigned int, const char *); | 1505 | extern int unregister_blkdev(unsigned int, const char *); |
1443 | extern struct block_device *bdget(dev_t); | 1506 | extern struct block_device *bdget(dev_t); |
@@ -1446,11 +1509,15 @@ extern void bd_forget(struct inode *inode); | |||
1446 | extern void bdput(struct block_device *); | 1509 | extern void bdput(struct block_device *); |
1447 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1510 | extern struct block_device *open_by_devnum(dev_t, unsigned); |
1448 | extern struct block_device *open_partition_by_devnum(dev_t, unsigned); | 1511 | extern struct block_device *open_partition_by_devnum(dev_t, unsigned); |
1449 | extern const struct file_operations def_blk_fops; | ||
1450 | extern const struct address_space_operations def_blk_aops; | 1512 | extern const struct address_space_operations def_blk_aops; |
1513 | #else | ||
1514 | static inline void bd_forget(struct inode *inode) {} | ||
1515 | #endif | ||
1516 | extern const struct file_operations def_blk_fops; | ||
1451 | extern const struct file_operations def_chr_fops; | 1517 | extern const struct file_operations def_chr_fops; |
1452 | extern const struct file_operations bad_sock_fops; | 1518 | extern const struct file_operations bad_sock_fops; |
1453 | extern const struct file_operations def_fifo_fops; | 1519 | extern const struct file_operations def_fifo_fops; |
1520 | #ifdef CONFIG_BLOCK | ||
1454 | extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); | 1521 | extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); |
1455 | extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); | 1522 | extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); |
1456 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); | 1523 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); |
@@ -1466,6 +1533,7 @@ extern void bd_release_from_disk(struct block_device *, struct gendisk *); | |||
1466 | #define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder) | 1533 | #define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder) |
1467 | #define bd_release_from_disk(bdev, disk) bd_release(bdev) | 1534 | #define bd_release_from_disk(bdev, disk) bd_release(bdev) |
1468 | #endif | 1535 | #endif |
1536 | #endif | ||
1469 | 1537 | ||
1470 | /* fs/char_dev.c */ | 1538 | /* fs/char_dev.c */ |
1471 | #define CHRDEV_MAJOR_HASH_SIZE 255 | 1539 | #define CHRDEV_MAJOR_HASH_SIZE 255 |
@@ -1479,14 +1547,19 @@ extern int chrdev_open(struct inode *, struct file *); | |||
1479 | extern void chrdev_show(struct seq_file *,off_t); | 1547 | extern void chrdev_show(struct seq_file *,off_t); |
1480 | 1548 | ||
1481 | /* fs/block_dev.c */ | 1549 | /* fs/block_dev.c */ |
1482 | #define BLKDEV_MAJOR_HASH_SIZE 255 | ||
1483 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ | 1550 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ |
1551 | |||
1552 | #ifdef CONFIG_BLOCK | ||
1553 | #define BLKDEV_MAJOR_HASH_SIZE 255 | ||
1484 | extern const char *__bdevname(dev_t, char *buffer); | 1554 | extern const char *__bdevname(dev_t, char *buffer); |
1485 | extern const char *bdevname(struct block_device *bdev, char *buffer); | 1555 | extern const char *bdevname(struct block_device *bdev, char *buffer); |
1486 | extern struct block_device *lookup_bdev(const char *); | 1556 | extern struct block_device *lookup_bdev(const char *); |
1487 | extern struct block_device *open_bdev_excl(const char *, int, void *); | 1557 | extern struct block_device *open_bdev_excl(const char *, int, void *); |
1488 | extern void close_bdev_excl(struct block_device *); | 1558 | extern void close_bdev_excl(struct block_device *); |
1489 | extern void blkdev_show(struct seq_file *,off_t); | 1559 | extern void blkdev_show(struct seq_file *,off_t); |
1560 | #else | ||
1561 | #define BLKDEV_MAJOR_HASH_SIZE 0 | ||
1562 | #endif | ||
1490 | 1563 | ||
1491 | extern void init_special_inode(struct inode *, umode_t, dev_t); | 1564 | extern void init_special_inode(struct inode *, umode_t, dev_t); |
1492 | 1565 | ||
@@ -1500,6 +1573,7 @@ extern const struct file_operations rdwr_fifo_fops; | |||
1500 | 1573 | ||
1501 | extern int fs_may_remount_ro(struct super_block *); | 1574 | extern int fs_may_remount_ro(struct super_block *); |
1502 | 1575 | ||
1576 | #ifdef CONFIG_BLOCK | ||
1503 | /* | 1577 | /* |
1504 | * return READ, READA, or WRITE | 1578 | * return READ, READA, or WRITE |
1505 | */ | 1579 | */ |
@@ -1511,9 +1585,10 @@ extern int fs_may_remount_ro(struct super_block *); | |||
1511 | #define bio_data_dir(bio) ((bio)->bi_rw & 1) | 1585 | #define bio_data_dir(bio) ((bio)->bi_rw & 1) |
1512 | 1586 | ||
1513 | extern int check_disk_change(struct block_device *); | 1587 | extern int check_disk_change(struct block_device *); |
1514 | extern int invalidate_inodes(struct super_block *); | ||
1515 | extern int __invalidate_device(struct block_device *); | 1588 | extern int __invalidate_device(struct block_device *); |
1516 | extern int invalidate_partition(struct gendisk *, int); | 1589 | extern int invalidate_partition(struct gendisk *, int); |
1590 | #endif | ||
1591 | extern int invalidate_inodes(struct super_block *); | ||
1517 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1592 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1518 | pgoff_t start, pgoff_t end); | 1593 | pgoff_t start, pgoff_t end); |
1519 | unsigned long invalidate_inode_pages(struct address_space *mapping); | 1594 | unsigned long invalidate_inode_pages(struct address_space *mapping); |
@@ -1541,11 +1616,14 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping, | |||
1541 | extern long do_fsync(struct file *file, int datasync); | 1616 | extern long do_fsync(struct file *file, int datasync); |
1542 | extern void sync_supers(void); | 1617 | extern void sync_supers(void); |
1543 | extern void sync_filesystems(int wait); | 1618 | extern void sync_filesystems(int wait); |
1619 | extern void __fsync_super(struct super_block *sb); | ||
1544 | extern void emergency_sync(void); | 1620 | extern void emergency_sync(void); |
1545 | extern void emergency_remount(void); | 1621 | extern void emergency_remount(void); |
1546 | extern int do_remount_sb(struct super_block *sb, int flags, | 1622 | extern int do_remount_sb(struct super_block *sb, int flags, |
1547 | void *data, int force); | 1623 | void *data, int force); |
1624 | #ifdef CONFIG_BLOCK | ||
1548 | extern sector_t bmap(struct inode *, sector_t); | 1625 | extern sector_t bmap(struct inode *, sector_t); |
1626 | #endif | ||
1549 | extern int notify_change(struct dentry *, struct iattr *); | 1627 | extern int notify_change(struct dentry *, struct iattr *); |
1550 | extern int permission(struct inode *, int, struct nameidata *); | 1628 | extern int permission(struct inode *, int, struct nameidata *); |
1551 | extern int generic_permission(struct inode *, int, | 1629 | extern int generic_permission(struct inode *, int, |
@@ -1563,6 +1641,9 @@ static inline void allow_write_access(struct file *file) | |||
1563 | atomic_inc(&file->f_dentry->d_inode->i_writecount); | 1641 | atomic_inc(&file->f_dentry->d_inode->i_writecount); |
1564 | } | 1642 | } |
1565 | extern int do_pipe(int *); | 1643 | extern int do_pipe(int *); |
1644 | extern struct file *create_read_pipe(struct file *f); | ||
1645 | extern struct file *create_write_pipe(void); | ||
1646 | extern void free_write_pipe(struct file *); | ||
1566 | 1647 | ||
1567 | extern int open_namei(int dfd, const char *, int, int, struct nameidata *); | 1648 | extern int open_namei(int dfd, const char *, int, int, struct nameidata *); |
1568 | extern int may_open(struct nameidata *, int, int); | 1649 | extern int may_open(struct nameidata *, int, int); |
@@ -1628,9 +1709,11 @@ static inline void insert_inode_hash(struct inode *inode) { | |||
1628 | extern struct file * get_empty_filp(void); | 1709 | extern struct file * get_empty_filp(void); |
1629 | extern void file_move(struct file *f, struct list_head *list); | 1710 | extern void file_move(struct file *f, struct list_head *list); |
1630 | extern void file_kill(struct file *f); | 1711 | extern void file_kill(struct file *f); |
1712 | #ifdef CONFIG_BLOCK | ||
1631 | struct bio; | 1713 | struct bio; |
1632 | extern void submit_bio(int, struct bio *); | 1714 | extern void submit_bio(int, struct bio *); |
1633 | extern int bdev_read_only(struct block_device *); | 1715 | extern int bdev_read_only(struct block_device *); |
1716 | #endif | ||
1634 | extern int set_blocksize(struct block_device *, int); | 1717 | extern int set_blocksize(struct block_device *, int); |
1635 | extern int sb_set_blocksize(struct super_block *, int); | 1718 | extern int sb_set_blocksize(struct super_block *, int); |
1636 | extern int sb_min_blocksize(struct super_block *, int); | 1719 | extern int sb_min_blocksize(struct super_block *, int); |
@@ -1639,22 +1722,17 @@ extern int generic_file_mmap(struct file *, struct vm_area_struct *); | |||
1639 | extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); | 1722 | extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); |
1640 | extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); | 1723 | extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); |
1641 | extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); | 1724 | extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); |
1642 | extern ssize_t generic_file_read(struct file *, char __user *, size_t, loff_t *); | ||
1643 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); | 1725 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); |
1644 | extern ssize_t generic_file_write(struct file *, const char __user *, size_t, loff_t *); | 1726 | extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
1645 | extern ssize_t generic_file_aio_read(struct kiocb *, char __user *, size_t, loff_t); | 1727 | extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
1646 | extern ssize_t __generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t *); | ||
1647 | extern ssize_t generic_file_aio_write(struct kiocb *, const char __user *, size_t, loff_t); | ||
1648 | extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, | 1728 | extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, |
1649 | unsigned long, loff_t *); | 1729 | unsigned long, loff_t); |
1650 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, | 1730 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, |
1651 | unsigned long *, loff_t, loff_t *, size_t, size_t); | 1731 | unsigned long *, loff_t, loff_t *, size_t, size_t); |
1652 | extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, | 1732 | extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, |
1653 | unsigned long, loff_t, loff_t *, size_t, ssize_t); | 1733 | unsigned long, loff_t, loff_t *, size_t, ssize_t); |
1654 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); | 1734 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); |
1655 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); | 1735 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); |
1656 | ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov, | ||
1657 | unsigned long nr_segs, loff_t *ppos); | ||
1658 | extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); | 1736 | extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); |
1659 | extern void do_generic_mapping_read(struct address_space *mapping, | 1737 | extern void do_generic_mapping_read(struct address_space *mapping, |
1660 | struct file_ra_state *, struct file *, | 1738 | struct file_ra_state *, struct file *, |
@@ -1672,10 +1750,6 @@ extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | |||
1672 | 1750 | ||
1673 | extern void | 1751 | extern void |
1674 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 1752 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
1675 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, | ||
1676 | unsigned long nr_segs, loff_t *ppos); | ||
1677 | ssize_t generic_file_writev(struct file *filp, const struct iovec *iov, | ||
1678 | unsigned long nr_segs, loff_t *ppos); | ||
1679 | extern loff_t no_llseek(struct file *file, loff_t offset, int origin); | 1753 | extern loff_t no_llseek(struct file *file, loff_t offset, int origin); |
1680 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); | 1754 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); |
1681 | extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); | 1755 | extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); |
@@ -1711,6 +1785,7 @@ static inline void do_generic_file_read(struct file * filp, loff_t *ppos, | |||
1711 | actor); | 1785 | actor); |
1712 | } | 1786 | } |
1713 | 1787 | ||
1788 | #ifdef CONFIG_BLOCK | ||
1714 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 1789 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
1715 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 1790 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
1716 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | 1791 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
@@ -1748,6 +1823,7 @@ static inline ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, | |||
1748 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 1823 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
1749 | nr_segs, get_block, end_io, DIO_OWN_LOCKING); | 1824 | nr_segs, get_block, end_io, DIO_OWN_LOCKING); |
1750 | } | 1825 | } |
1826 | #endif | ||
1751 | 1827 | ||
1752 | extern const struct file_operations generic_ro_fops; | 1828 | extern const struct file_operations generic_ro_fops; |
1753 | 1829 | ||
diff --git a/include/linux/generic_acl.h b/include/linux/generic_acl.h new file mode 100644 index 000000000000..80764f40be75 --- /dev/null +++ b/include/linux/generic_acl.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * fs/generic_acl.c | ||
3 | * | ||
4 | * (C) 2005 Andreas Gruenbacher <agruen@suse.de> | ||
5 | * | ||
6 | * This file is released under the GPL. | ||
7 | */ | ||
8 | |||
9 | #ifndef GENERIC_ACL_H | ||
10 | #define GENERIC_ACL_H | ||
11 | |||
12 | #include <linux/posix_acl.h> | ||
13 | #include <linux/posix_acl_xattr.h> | ||
14 | |||
15 | /** | ||
16 | * struct generic_acl_operations - filesystem operations | ||
17 | * | ||
18 | * Filesystems must make these operations available to the generic | ||
19 | * operations. | ||
20 | */ | ||
21 | struct generic_acl_operations { | ||
22 | struct posix_acl *(*getacl)(struct inode *, int); | ||
23 | void (*setacl)(struct inode *, int, struct posix_acl *); | ||
24 | }; | ||
25 | |||
26 | size_t generic_acl_list(struct inode *, struct generic_acl_operations *, int, | ||
27 | char *, size_t); | ||
28 | int generic_acl_get(struct inode *, struct generic_acl_operations *, int, | ||
29 | void *, size_t); | ||
30 | int generic_acl_set(struct inode *, struct generic_acl_operations *, int, | ||
31 | const void *, size_t); | ||
32 | int generic_acl_init(struct inode *, struct inode *, | ||
33 | struct generic_acl_operations *); | ||
34 | int generic_acl_chmod(struct inode *, struct generic_acl_operations *); | ||
35 | |||
36 | #endif | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index e4af57e87c17..41f276fdd185 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | 13 | ||
14 | #ifdef CONFIG_BLOCK | ||
15 | |||
14 | enum { | 16 | enum { |
15 | /* These three have identical behaviour; use the second one if DOS FDISK gets | 17 | /* These three have identical behaviour; use the second one if DOS FDISK gets |
16 | confused about extended/logical partitions starting past cylinder 1023. */ | 18 | confused about extended/logical partitions starting past cylinder 1023. */ |
@@ -420,3 +422,5 @@ static inline struct block_device *bdget_disk(struct gendisk *disk, int index) | |||
420 | #endif | 422 | #endif |
421 | 423 | ||
422 | #endif | 424 | #endif |
425 | |||
426 | #endif | ||
diff --git a/include/linux/getcpu.h b/include/linux/getcpu.h index 031ed3780e45..c7372d7a97be 100644 --- a/include/linux/getcpu.h +++ b/include/linux/getcpu.h | |||
@@ -1,16 +1,18 @@ | |||
1 | #ifndef _LINUX_GETCPU_H | 1 | #ifndef _LINUX_GETCPU_H |
2 | #define _LINUX_GETCPU_H 1 | 2 | #define _LINUX_GETCPU_H 1 |
3 | 3 | ||
4 | /* Cache for getcpu() to speed it up. Results might be upto a jiffie | 4 | /* Cache for getcpu() to speed it up. Results might be a short time |
5 | out of date, but will be faster. | 5 | out of date, but will be faster. |
6 | |||
6 | User programs should not refer to the contents of this structure. | 7 | User programs should not refer to the contents of this structure. |
7 | It is only a cache for vgetcpu(). It might change in future kernels. | 8 | I repeat they should not refer to it. If they do they will break |
9 | in future kernels. | ||
10 | |||
11 | It is only a private cache for vgetcpu(). It will change in future kernels. | ||
8 | The user program must store this information per thread (__thread) | 12 | The user program must store this information per thread (__thread) |
9 | If you want 100% accurate information pass NULL instead. */ | 13 | If you want 100% accurate information pass NULL instead. */ |
10 | struct getcpu_cache { | 14 | struct getcpu_cache { |
11 | unsigned long t0; | 15 | unsigned long blob[128 / sizeof(long)]; |
12 | unsigned long t1; | ||
13 | unsigned long res[4]; | ||
14 | }; | 16 | }; |
15 | 17 | ||
16 | #endif | 18 | #endif |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 4fc379de6c2f..fca93025ab51 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -138,6 +138,7 @@ extern long hrtimer_nanosleep(struct timespec *rqtp, | |||
138 | struct timespec __user *rmtp, | 138 | struct timespec __user *rmtp, |
139 | const enum hrtimer_mode mode, | 139 | const enum hrtimer_mode mode, |
140 | const clockid_t clockid); | 140 | const clockid_t clockid); |
141 | extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); | ||
141 | 142 | ||
142 | extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, | 143 | extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, |
143 | struct task_struct *tsk); | 144 | struct task_struct *tsk); |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 9418519a55d1..0a8f750cbede 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -193,6 +193,7 @@ | |||
193 | #define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */ | 193 | #define I2C_HW_B_RADEON 0x01001e /* radeon framebuffer driver */ |
194 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ | 194 | #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ |
195 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ | 195 | #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ |
196 | #define I2C_HW_B_INTELFB 0x010021 /* intel framebuffer driver */ | ||
196 | 197 | ||
197 | /* --- PCF 8584 based algorithms */ | 198 | /* --- PCF 8584 based algorithms */ |
198 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ | 199 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ |
diff --git a/include/linux/icmp.h b/include/linux/icmp.h index f0b571f1060b..878cfe4e587f 100644 --- a/include/linux/icmp.h +++ b/include/linux/icmp.h | |||
@@ -68,16 +68,16 @@ | |||
68 | struct icmphdr { | 68 | struct icmphdr { |
69 | __u8 type; | 69 | __u8 type; |
70 | __u8 code; | 70 | __u8 code; |
71 | __u16 checksum; | 71 | __be16 checksum; |
72 | union { | 72 | union { |
73 | struct { | 73 | struct { |
74 | __u16 id; | 74 | __be16 id; |
75 | __u16 sequence; | 75 | __be16 sequence; |
76 | } echo; | 76 | } echo; |
77 | __u32 gateway; | 77 | __be32 gateway; |
78 | struct { | 78 | struct { |
79 | __u16 __unused; | 79 | __be16 __unused; |
80 | __u16 mtu; | 80 | __be16 mtu; |
81 | } frag; | 81 | } frag; |
82 | } un; | 82 | } un; |
83 | }; | 83 | }; |
diff --git a/include/linux/if.h b/include/linux/if.h index 8018c2e22c0c..32bf419351f1 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -214,134 +214,4 @@ struct ifconf | |||
214 | #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ | 214 | #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ |
215 | #define ifc_req ifc_ifcu.ifcu_req /* array of structures */ | 215 | #define ifc_req ifc_ifcu.ifcu_req /* array of structures */ |
216 | 216 | ||
217 | /* The struct should be in sync with struct net_device_stats */ | ||
218 | struct rtnl_link_stats | ||
219 | { | ||
220 | __u32 rx_packets; /* total packets received */ | ||
221 | __u32 tx_packets; /* total packets transmitted */ | ||
222 | __u32 rx_bytes; /* total bytes received */ | ||
223 | __u32 tx_bytes; /* total bytes transmitted */ | ||
224 | __u32 rx_errors; /* bad packets received */ | ||
225 | __u32 tx_errors; /* packet transmit problems */ | ||
226 | __u32 rx_dropped; /* no space in linux buffers */ | ||
227 | __u32 tx_dropped; /* no space available in linux */ | ||
228 | __u32 multicast; /* multicast packets received */ | ||
229 | __u32 collisions; | ||
230 | |||
231 | /* detailed rx_errors: */ | ||
232 | __u32 rx_length_errors; | ||
233 | __u32 rx_over_errors; /* receiver ring buff overflow */ | ||
234 | __u32 rx_crc_errors; /* recved pkt with crc error */ | ||
235 | __u32 rx_frame_errors; /* recv'd frame alignment error */ | ||
236 | __u32 rx_fifo_errors; /* recv'r fifo overrun */ | ||
237 | __u32 rx_missed_errors; /* receiver missed packet */ | ||
238 | |||
239 | /* detailed tx_errors */ | ||
240 | __u32 tx_aborted_errors; | ||
241 | __u32 tx_carrier_errors; | ||
242 | __u32 tx_fifo_errors; | ||
243 | __u32 tx_heartbeat_errors; | ||
244 | __u32 tx_window_errors; | ||
245 | |||
246 | /* for cslip etc */ | ||
247 | __u32 rx_compressed; | ||
248 | __u32 tx_compressed; | ||
249 | }; | ||
250 | |||
251 | /* The struct should be in sync with struct ifmap */ | ||
252 | struct rtnl_link_ifmap | ||
253 | { | ||
254 | __u64 mem_start; | ||
255 | __u64 mem_end; | ||
256 | __u64 base_addr; | ||
257 | __u16 irq; | ||
258 | __u8 dma; | ||
259 | __u8 port; | ||
260 | }; | ||
261 | |||
262 | enum | ||
263 | { | ||
264 | IFLA_UNSPEC, | ||
265 | IFLA_ADDRESS, | ||
266 | IFLA_BROADCAST, | ||
267 | IFLA_IFNAME, | ||
268 | IFLA_MTU, | ||
269 | IFLA_LINK, | ||
270 | IFLA_QDISC, | ||
271 | IFLA_STATS, | ||
272 | IFLA_COST, | ||
273 | #define IFLA_COST IFLA_COST | ||
274 | IFLA_PRIORITY, | ||
275 | #define IFLA_PRIORITY IFLA_PRIORITY | ||
276 | IFLA_MASTER, | ||
277 | #define IFLA_MASTER IFLA_MASTER | ||
278 | IFLA_WIRELESS, /* Wireless Extension event - see wireless.h */ | ||
279 | #define IFLA_WIRELESS IFLA_WIRELESS | ||
280 | IFLA_PROTINFO, /* Protocol specific information for a link */ | ||
281 | #define IFLA_PROTINFO IFLA_PROTINFO | ||
282 | IFLA_TXQLEN, | ||
283 | #define IFLA_TXQLEN IFLA_TXQLEN | ||
284 | IFLA_MAP, | ||
285 | #define IFLA_MAP IFLA_MAP | ||
286 | IFLA_WEIGHT, | ||
287 | #define IFLA_WEIGHT IFLA_WEIGHT | ||
288 | IFLA_OPERSTATE, | ||
289 | IFLA_LINKMODE, | ||
290 | __IFLA_MAX | ||
291 | }; | ||
292 | |||
293 | |||
294 | #define IFLA_MAX (__IFLA_MAX - 1) | ||
295 | |||
296 | /* ifi_flags. | ||
297 | |||
298 | IFF_* flags. | ||
299 | |||
300 | The only change is: | ||
301 | IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are | ||
302 | more not changeable by user. They describe link media | ||
303 | characteristics and set by device driver. | ||
304 | |||
305 | Comments: | ||
306 | - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid | ||
307 | - If neither of these three flags are set; | ||
308 | the interface is NBMA. | ||
309 | |||
310 | - IFF_MULTICAST does not mean anything special: | ||
311 | multicasts can be used on all not-NBMA links. | ||
312 | IFF_MULTICAST means that this media uses special encapsulation | ||
313 | for multicast frames. Apparently, all IFF_POINTOPOINT and | ||
314 | IFF_BROADCAST devices are able to use multicasts too. | ||
315 | */ | ||
316 | |||
317 | /* IFLA_LINK. | ||
318 | For usual devices it is equal ifi_index. | ||
319 | If it is a "virtual interface" (f.e. tunnel), ifi_link | ||
320 | can point to real physical interface (f.e. for bandwidth calculations), | ||
321 | or maybe 0, what means, that real media is unknown (usual | ||
322 | for IPIP tunnels, when route to endpoint is allowed to change) | ||
323 | */ | ||
324 | |||
325 | /* Subtype attributes for IFLA_PROTINFO */ | ||
326 | enum | ||
327 | { | ||
328 | IFLA_INET6_UNSPEC, | ||
329 | IFLA_INET6_FLAGS, /* link flags */ | ||
330 | IFLA_INET6_CONF, /* sysctl parameters */ | ||
331 | IFLA_INET6_STATS, /* statistics */ | ||
332 | IFLA_INET6_MCAST, /* MC things. What of them? */ | ||
333 | IFLA_INET6_CACHEINFO, /* time values and max reasm size */ | ||
334 | __IFLA_INET6_MAX | ||
335 | }; | ||
336 | |||
337 | #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) | ||
338 | |||
339 | struct ifla_cacheinfo | ||
340 | { | ||
341 | __u32 max_reasm_len; | ||
342 | __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ | ||
343 | __u32 reachable_time; | ||
344 | __u32 retrans_time; | ||
345 | }; | ||
346 | |||
347 | #endif /* _LINUX_IF_H */ | 217 | #endif /* _LINUX_IF_H */ |
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index a8b1a2071838..7f5714214ee3 100644 --- a/include/linux/if_arp.h +++ b/include/linux/if_arp.h | |||
@@ -130,11 +130,11 @@ struct arpreq_old { | |||
130 | 130 | ||
131 | struct arphdr | 131 | struct arphdr |
132 | { | 132 | { |
133 | unsigned short ar_hrd; /* format of hardware address */ | 133 | __be16 ar_hrd; /* format of hardware address */ |
134 | unsigned short ar_pro; /* format of protocol address */ | 134 | __be16 ar_pro; /* format of protocol address */ |
135 | unsigned char ar_hln; /* length of hardware address */ | 135 | unsigned char ar_hln; /* length of hardware address */ |
136 | unsigned char ar_pln; /* length of protocol address */ | 136 | unsigned char ar_pln; /* length of protocol address */ |
137 | unsigned short ar_op; /* ARP opcode (command) */ | 137 | __be16 ar_op; /* ARP opcode (command) */ |
138 | 138 | ||
139 | #if 0 | 139 | #if 0 |
140 | /* | 140 | /* |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h new file mode 100644 index 000000000000..e963a077e6f5 --- /dev/null +++ b/include/linux/if_link.h | |||
@@ -0,0 +1,136 @@ | |||
1 | #ifndef _LINUX_IF_LINK_H | ||
2 | #define _LINUX_IF_LINK_H | ||
3 | |||
4 | #include <linux/netlink.h> | ||
5 | |||
6 | /* The struct should be in sync with struct net_device_stats */ | ||
7 | struct rtnl_link_stats | ||
8 | { | ||
9 | __u32 rx_packets; /* total packets received */ | ||
10 | __u32 tx_packets; /* total packets transmitted */ | ||
11 | __u32 rx_bytes; /* total bytes received */ | ||
12 | __u32 tx_bytes; /* total bytes transmitted */ | ||
13 | __u32 rx_errors; /* bad packets received */ | ||
14 | __u32 tx_errors; /* packet transmit problems */ | ||
15 | __u32 rx_dropped; /* no space in linux buffers */ | ||
16 | __u32 tx_dropped; /* no space available in linux */ | ||
17 | __u32 multicast; /* multicast packets received */ | ||
18 | __u32 collisions; | ||
19 | |||
20 | /* detailed rx_errors: */ | ||
21 | __u32 rx_length_errors; | ||
22 | __u32 rx_over_errors; /* receiver ring buff overflow */ | ||
23 | __u32 rx_crc_errors; /* recved pkt with crc error */ | ||
24 | __u32 rx_frame_errors; /* recv'd frame alignment error */ | ||
25 | __u32 rx_fifo_errors; /* recv'r fifo overrun */ | ||
26 | __u32 rx_missed_errors; /* receiver missed packet */ | ||
27 | |||
28 | /* detailed tx_errors */ | ||
29 | __u32 tx_aborted_errors; | ||
30 | __u32 tx_carrier_errors; | ||
31 | __u32 tx_fifo_errors; | ||
32 | __u32 tx_heartbeat_errors; | ||
33 | __u32 tx_window_errors; | ||
34 | |||
35 | /* for cslip etc */ | ||
36 | __u32 rx_compressed; | ||
37 | __u32 tx_compressed; | ||
38 | }; | ||
39 | |||
40 | /* The struct should be in sync with struct ifmap */ | ||
41 | struct rtnl_link_ifmap | ||
42 | { | ||
43 | __u64 mem_start; | ||
44 | __u64 mem_end; | ||
45 | __u64 base_addr; | ||
46 | __u16 irq; | ||
47 | __u8 dma; | ||
48 | __u8 port; | ||
49 | }; | ||
50 | |||
51 | enum | ||
52 | { | ||
53 | IFLA_UNSPEC, | ||
54 | IFLA_ADDRESS, | ||
55 | IFLA_BROADCAST, | ||
56 | IFLA_IFNAME, | ||
57 | IFLA_MTU, | ||
58 | IFLA_LINK, | ||
59 | IFLA_QDISC, | ||
60 | IFLA_STATS, | ||
61 | IFLA_COST, | ||
62 | #define IFLA_COST IFLA_COST | ||
63 | IFLA_PRIORITY, | ||
64 | #define IFLA_PRIORITY IFLA_PRIORITY | ||
65 | IFLA_MASTER, | ||
66 | #define IFLA_MASTER IFLA_MASTER | ||
67 | IFLA_WIRELESS, /* Wireless Extension event - see wireless.h */ | ||
68 | #define IFLA_WIRELESS IFLA_WIRELESS | ||
69 | IFLA_PROTINFO, /* Protocol specific information for a link */ | ||
70 | #define IFLA_PROTINFO IFLA_PROTINFO | ||
71 | IFLA_TXQLEN, | ||
72 | #define IFLA_TXQLEN IFLA_TXQLEN | ||
73 | IFLA_MAP, | ||
74 | #define IFLA_MAP IFLA_MAP | ||
75 | IFLA_WEIGHT, | ||
76 | #define IFLA_WEIGHT IFLA_WEIGHT | ||
77 | IFLA_OPERSTATE, | ||
78 | IFLA_LINKMODE, | ||
79 | __IFLA_MAX | ||
80 | }; | ||
81 | |||
82 | |||
83 | #define IFLA_MAX (__IFLA_MAX - 1) | ||
84 | |||
85 | /* ifi_flags. | ||
86 | |||
87 | IFF_* flags. | ||
88 | |||
89 | The only change is: | ||
90 | IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are | ||
91 | more not changeable by user. They describe link media | ||
92 | characteristics and set by device driver. | ||
93 | |||
94 | Comments: | ||
95 | - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid | ||
96 | - If neither of these three flags are set; | ||
97 | the interface is NBMA. | ||
98 | |||
99 | - IFF_MULTICAST does not mean anything special: | ||
100 | multicasts can be used on all not-NBMA links. | ||
101 | IFF_MULTICAST means that this media uses special encapsulation | ||
102 | for multicast frames. Apparently, all IFF_POINTOPOINT and | ||
103 | IFF_BROADCAST devices are able to use multicasts too. | ||
104 | */ | ||
105 | |||
106 | /* IFLA_LINK. | ||
107 | For usual devices it is equal ifi_index. | ||
108 | If it is a "virtual interface" (f.e. tunnel), ifi_link | ||
109 | can point to real physical interface (f.e. for bandwidth calculations), | ||
110 | or maybe 0, what means, that real media is unknown (usual | ||
111 | for IPIP tunnels, when route to endpoint is allowed to change) | ||
112 | */ | ||
113 | |||
114 | /* Subtype attributes for IFLA_PROTINFO */ | ||
115 | enum | ||
116 | { | ||
117 | IFLA_INET6_UNSPEC, | ||
118 | IFLA_INET6_FLAGS, /* link flags */ | ||
119 | IFLA_INET6_CONF, /* sysctl parameters */ | ||
120 | IFLA_INET6_STATS, /* statistics */ | ||
121 | IFLA_INET6_MCAST, /* MC things. What of them? */ | ||
122 | IFLA_INET6_CACHEINFO, /* time values and max reasm size */ | ||
123 | __IFLA_INET6_MAX | ||
124 | }; | ||
125 | |||
126 | #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) | ||
127 | |||
128 | struct ifla_cacheinfo | ||
129 | { | ||
130 | __u32 max_reasm_len; | ||
131 | __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ | ||
132 | __u32 reachable_time; | ||
133 | __u32 retrans_time; | ||
134 | }; | ||
135 | |||
136 | #endif /* _LINUX_IF_LINK_H */ | ||
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 899c3d4776f3..03f43e2893a4 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -30,8 +30,8 @@ struct igmphdr | |||
30 | { | 30 | { |
31 | __u8 type; | 31 | __u8 type; |
32 | __u8 code; /* For newer IGMP */ | 32 | __u8 code; /* For newer IGMP */ |
33 | __u16 csum; | 33 | __be16 csum; |
34 | __u32 group; | 34 | __be32 group; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | /* V3 group record types [grec_type] */ | 37 | /* V3 group record types [grec_type] */ |
@@ -45,25 +45,25 @@ struct igmphdr | |||
45 | struct igmpv3_grec { | 45 | struct igmpv3_grec { |
46 | __u8 grec_type; | 46 | __u8 grec_type; |
47 | __u8 grec_auxwords; | 47 | __u8 grec_auxwords; |
48 | __u16 grec_nsrcs; | 48 | __be16 grec_nsrcs; |
49 | __u32 grec_mca; | 49 | __be32 grec_mca; |
50 | __u32 grec_src[0]; | 50 | __be32 grec_src[0]; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct igmpv3_report { | 53 | struct igmpv3_report { |
54 | __u8 type; | 54 | __u8 type; |
55 | __u8 resv1; | 55 | __u8 resv1; |
56 | __u16 csum; | 56 | __be16 csum; |
57 | __u16 resv2; | 57 | __be16 resv2; |
58 | __u16 ngrec; | 58 | __be16 ngrec; |
59 | struct igmpv3_grec grec[0]; | 59 | struct igmpv3_grec grec[0]; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | struct igmpv3_query { | 62 | struct igmpv3_query { |
63 | __u8 type; | 63 | __u8 type; |
64 | __u8 code; | 64 | __u8 code; |
65 | __u16 csum; | 65 | __be16 csum; |
66 | __u32 group; | 66 | __be32 group; |
67 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 67 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
68 | __u8 qrv:3, | 68 | __u8 qrv:3, |
69 | suppress:1, | 69 | suppress:1, |
@@ -76,8 +76,8 @@ struct igmpv3_query { | |||
76 | #error "Please fix <asm/byteorder.h>" | 76 | #error "Please fix <asm/byteorder.h>" |
77 | #endif | 77 | #endif |
78 | __u8 qqic; | 78 | __u8 qqic; |
79 | __u16 nsrcs; | 79 | __be16 nsrcs; |
80 | __u32 srcs[0]; | 80 | __be32 srcs[0]; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | #define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* From RFC1112 */ | 83 | #define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* From RFC1112 */ |
@@ -136,11 +136,11 @@ struct ip_sf_socklist | |||
136 | { | 136 | { |
137 | unsigned int sl_max; | 137 | unsigned int sl_max; |
138 | unsigned int sl_count; | 138 | unsigned int sl_count; |
139 | __u32 sl_addr[0]; | 139 | __be32 sl_addr[0]; |
140 | }; | 140 | }; |
141 | 141 | ||
142 | #define IP_SFLSIZE(count) (sizeof(struct ip_sf_socklist) + \ | 142 | #define IP_SFLSIZE(count) (sizeof(struct ip_sf_socklist) + \ |
143 | (count) * sizeof(__u32)) | 143 | (count) * sizeof(__be32)) |
144 | 144 | ||
145 | #define IP_SFBLOCK 10 /* allocate this many at once */ | 145 | #define IP_SFBLOCK 10 /* allocate this many at once */ |
146 | 146 | ||
@@ -159,7 +159,7 @@ struct ip_mc_socklist | |||
159 | struct ip_sf_list | 159 | struct ip_sf_list |
160 | { | 160 | { |
161 | struct ip_sf_list *sf_next; | 161 | struct ip_sf_list *sf_next; |
162 | __u32 sf_inaddr; | 162 | __be32 sf_inaddr; |
163 | unsigned long sf_count[2]; /* include/exclude counts */ | 163 | unsigned long sf_count[2]; /* include/exclude counts */ |
164 | unsigned char sf_gsresp; /* include in g & s response? */ | 164 | unsigned char sf_gsresp; /* include in g & s response? */ |
165 | unsigned char sf_oldin; /* change state */ | 165 | unsigned char sf_oldin; /* change state */ |
@@ -197,7 +197,7 @@ struct ip_mc_list | |||
197 | #define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value) | 197 | #define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value) |
198 | #define IGMPV3_MRC(value) IGMPV3_EXP(0x80, 4, 3, value) | 198 | #define IGMPV3_MRC(value) IGMPV3_EXP(0x80, 4, 3, value) |
199 | 199 | ||
200 | extern int ip_check_mc(struct in_device *dev, u32 mc_addr, u32 src_addr, u16 proto); | 200 | extern int ip_check_mc(struct in_device *dev, __be32 mc_addr, __be32 src_addr, u16 proto); |
201 | extern int igmp_rcv(struct sk_buff *); | 201 | extern int igmp_rcv(struct sk_buff *); |
202 | extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr); | 202 | extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr); |
203 | extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr); | 203 | extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr); |
@@ -209,13 +209,13 @@ extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf, | |||
209 | struct ip_msfilter __user *optval, int __user *optlen); | 209 | struct ip_msfilter __user *optval, int __user *optlen); |
210 | extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, | 210 | extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, |
211 | struct group_filter __user *optval, int __user *optlen); | 211 | struct group_filter __user *optval, int __user *optlen); |
212 | extern int ip_mc_sf_allow(struct sock *sk, u32 local, u32 rmt, int dif); | 212 | extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif); |
213 | extern void ip_mr_init(void); | 213 | extern void ip_mr_init(void); |
214 | extern void ip_mc_init_dev(struct in_device *); | 214 | extern void ip_mc_init_dev(struct in_device *); |
215 | extern void ip_mc_destroy_dev(struct in_device *); | 215 | extern void ip_mc_destroy_dev(struct in_device *); |
216 | extern void ip_mc_up(struct in_device *); | 216 | extern void ip_mc_up(struct in_device *); |
217 | extern void ip_mc_down(struct in_device *); | 217 | extern void ip_mc_down(struct in_device *); |
218 | extern void ip_mc_dec_group(struct in_device *in_dev, u32 addr); | 218 | extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr); |
219 | extern void ip_mc_inc_group(struct in_device *in_dev, u32 addr); | 219 | extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr); |
220 | #endif | 220 | #endif |
221 | #endif | 221 | #endif |
diff --git a/include/linux/in.h b/include/linux/in.h index bcaca8399aed..d79fc75fa7c2 100644 --- a/include/linux/in.h +++ b/include/linux/in.h | |||
@@ -123,17 +123,17 @@ struct ip_mreqn | |||
123 | }; | 123 | }; |
124 | 124 | ||
125 | struct ip_mreq_source { | 125 | struct ip_mreq_source { |
126 | __u32 imr_multiaddr; | 126 | __be32 imr_multiaddr; |
127 | __u32 imr_interface; | 127 | __be32 imr_interface; |
128 | __u32 imr_sourceaddr; | 128 | __be32 imr_sourceaddr; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | struct ip_msfilter { | 131 | struct ip_msfilter { |
132 | __u32 imsf_multiaddr; | 132 | __be32 imsf_multiaddr; |
133 | __u32 imsf_interface; | 133 | __be32 imsf_interface; |
134 | __u32 imsf_fmode; | 134 | __u32 imsf_fmode; |
135 | __u32 imsf_numsrc; | 135 | __u32 imsf_numsrc; |
136 | __u32 imsf_slist[1]; | 136 | __be32 imsf_slist[1]; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | #define IP_MSFILTER_SIZE(numsrc) \ | 139 | #define IP_MSFILTER_SIZE(numsrc) \ |
diff --git a/include/linux/in6.h b/include/linux/in6.h index d776829b443f..9be6a4756f0b 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -32,8 +32,8 @@ struct in6_addr | |||
32 | union | 32 | union |
33 | { | 33 | { |
34 | __u8 u6_addr8[16]; | 34 | __u8 u6_addr8[16]; |
35 | __u16 u6_addr16[8]; | 35 | __be16 u6_addr16[8]; |
36 | __u32 u6_addr32[4]; | 36 | __be32 u6_addr32[4]; |
37 | } in6_u; | 37 | } in6_u; |
38 | #define s6_addr in6_u.u6_addr8 | 38 | #define s6_addr in6_u.u6_addr8 |
39 | #define s6_addr16 in6_u.u6_addr16 | 39 | #define s6_addr16 in6_u.u6_addr16 |
@@ -53,7 +53,7 @@ extern const struct in6_addr in6addr_loopback; | |||
53 | 53 | ||
54 | struct sockaddr_in6 { | 54 | struct sockaddr_in6 { |
55 | unsigned short int sin6_family; /* AF_INET6 */ | 55 | unsigned short int sin6_family; /* AF_INET6 */ |
56 | __u16 sin6_port; /* Transport layer port # */ | 56 | __be16 sin6_port; /* Transport layer port # */ |
57 | __u32 sin6_flowinfo; /* IPv6 flow information */ | 57 | __u32 sin6_flowinfo; /* IPv6 flow information */ |
58 | struct in6_addr sin6_addr; /* IPv6 address */ | 58 | struct in6_addr sin6_addr; /* IPv6 address */ |
59 | __u32 sin6_scope_id; /* scope id (new in RFC2553) */ | 59 | __u32 sin6_scope_id; /* scope id (new in RFC2553) */ |
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index a4606e5810e5..6e8bc548635a 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
@@ -9,10 +9,10 @@ | |||
9 | 9 | ||
10 | /* Socket identity */ | 10 | /* Socket identity */ |
11 | struct inet_diag_sockid { | 11 | struct inet_diag_sockid { |
12 | __u16 idiag_sport; | 12 | __be16 idiag_sport; |
13 | __u16 idiag_dport; | 13 | __be16 idiag_dport; |
14 | __u32 idiag_src[4]; | 14 | __be32 idiag_src[4]; |
15 | __u32 idiag_dst[4]; | 15 | __be32 idiag_dst[4]; |
16 | __u32 idiag_if; | 16 | __u32 idiag_if; |
17 | __u32 idiag_cookie[2]; | 17 | __u32 idiag_cookie[2]; |
18 | #define INET_DIAG_NOCOOKIE (~0U) | 18 | #define INET_DIAG_NOCOOKIE (~0U) |
@@ -67,7 +67,7 @@ struct inet_diag_hostcond { | |||
67 | __u8 family; | 67 | __u8 family; |
68 | __u8 prefix_len; | 68 | __u8 prefix_len; |
69 | int port; | 69 | int port; |
70 | __u32 addr[0]; | 70 | __be32 addr[0]; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | /* Base info structure. It contains socket identity (addrs/ports/cookie) | 73 | /* Base info structure. It contains socket identity (addrs/ports/cookie) |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 92297ff24e85..5a0ab04627bc 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -90,11 +90,11 @@ struct in_ifaddr | |||
90 | struct in_ifaddr *ifa_next; | 90 | struct in_ifaddr *ifa_next; |
91 | struct in_device *ifa_dev; | 91 | struct in_device *ifa_dev; |
92 | struct rcu_head rcu_head; | 92 | struct rcu_head rcu_head; |
93 | u32 ifa_local; | 93 | __be32 ifa_local; |
94 | u32 ifa_address; | 94 | __be32 ifa_address; |
95 | u32 ifa_mask; | 95 | __be32 ifa_mask; |
96 | u32 ifa_broadcast; | 96 | __be32 ifa_broadcast; |
97 | u32 ifa_anycast; | 97 | __be32 ifa_anycast; |
98 | unsigned char ifa_scope; | 98 | unsigned char ifa_scope; |
99 | unsigned char ifa_flags; | 99 | unsigned char ifa_flags; |
100 | unsigned char ifa_prefixlen; | 100 | unsigned char ifa_prefixlen; |
@@ -104,18 +104,18 @@ struct in_ifaddr | |||
104 | extern int register_inetaddr_notifier(struct notifier_block *nb); | 104 | extern int register_inetaddr_notifier(struct notifier_block *nb); |
105 | extern int unregister_inetaddr_notifier(struct notifier_block *nb); | 105 | extern int unregister_inetaddr_notifier(struct notifier_block *nb); |
106 | 106 | ||
107 | extern struct net_device *ip_dev_find(u32 addr); | 107 | extern struct net_device *ip_dev_find(__be32 addr); |
108 | extern int inet_addr_onlink(struct in_device *in_dev, u32 a, u32 b); | 108 | extern int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b); |
109 | extern int devinet_ioctl(unsigned int cmd, void __user *); | 109 | extern int devinet_ioctl(unsigned int cmd, void __user *); |
110 | extern void devinet_init(void); | 110 | extern void devinet_init(void); |
111 | extern struct in_device *inetdev_init(struct net_device *dev); | 111 | extern struct in_device *inetdev_init(struct net_device *dev); |
112 | extern struct in_device *inetdev_by_index(int); | 112 | extern struct in_device *inetdev_by_index(int); |
113 | extern u32 inet_select_addr(const struct net_device *dev, u32 dst, int scope); | 113 | extern __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope); |
114 | extern u32 inet_confirm_addr(const struct net_device *dev, u32 dst, u32 local, int scope); | 114 | extern __be32 inet_confirm_addr(const struct net_device *dev, __be32 dst, __be32 local, int scope); |
115 | extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, u32 mask); | 115 | extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix, __be32 mask); |
116 | extern void inet_forward_change(void); | 116 | extern void inet_forward_change(void); |
117 | 117 | ||
118 | static __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa) | 118 | static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) |
119 | { | 119 | { |
120 | return !((addr^ifa->ifa_address)&ifa->ifa_mask); | 120 | return !((addr^ifa->ifa_address)&ifa->ifa_mask); |
121 | } | 121 | } |
@@ -183,7 +183,7 @@ static inline void in_dev_put(struct in_device *idev) | |||
183 | 183 | ||
184 | #endif /* __KERNEL__ */ | 184 | #endif /* __KERNEL__ */ |
185 | 185 | ||
186 | static __inline__ __u32 inet_make_mask(int logmask) | 186 | static __inline__ __be32 inet_make_mask(int logmask) |
187 | { | 187 | { |
188 | if (logmask) | 188 | if (logmask) |
189 | return htonl(~((1<<(32-logmask))-1)); | 189 | return htonl(~((1<<(32-logmask))-1)); |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index d5afee95fd43..1f97e3d92639 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -123,6 +123,14 @@ static inline void disable_irq_nosync_lockdep(unsigned int irq) | |||
123 | #endif | 123 | #endif |
124 | } | 124 | } |
125 | 125 | ||
126 | static inline void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags) | ||
127 | { | ||
128 | disable_irq_nosync(irq); | ||
129 | #ifdef CONFIG_LOCKDEP | ||
130 | local_irq_save(*flags); | ||
131 | #endif | ||
132 | } | ||
133 | |||
126 | static inline void disable_irq_lockdep(unsigned int irq) | 134 | static inline void disable_irq_lockdep(unsigned int irq) |
127 | { | 135 | { |
128 | disable_irq(irq); | 136 | disable_irq(irq); |
@@ -139,6 +147,14 @@ static inline void enable_irq_lockdep(unsigned int irq) | |||
139 | enable_irq(irq); | 147 | enable_irq(irq); |
140 | } | 148 | } |
141 | 149 | ||
150 | static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags) | ||
151 | { | ||
152 | #ifdef CONFIG_LOCKDEP | ||
153 | local_irq_restore(*flags); | ||
154 | #endif | ||
155 | enable_irq(irq); | ||
156 | } | ||
157 | |||
142 | /* IRQ wakeup (PM) control: */ | 158 | /* IRQ wakeup (PM) control: */ |
143 | extern int set_irq_wake(unsigned int irq, unsigned int on); | 159 | extern int set_irq_wake(unsigned int irq, unsigned int on); |
144 | 160 | ||
diff --git a/include/linux/io.h b/include/linux/io.h index 420e2fdf26f6..aa3f5af670b5 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -19,8 +19,12 @@ | |||
19 | #define _LINUX_IO_H | 19 | #define _LINUX_IO_H |
20 | 20 | ||
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/page.h> | ||
22 | 23 | ||
23 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); | 24 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); |
24 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); | 25 | void __iowrite64_copy(void __iomem *to, const void *from, size_t count); |
25 | 26 | ||
27 | int ioremap_page_range(unsigned long addr, unsigned long end, | ||
28 | unsigned long phys_addr, pgprot_t prot); | ||
29 | |||
26 | #endif /* _LINUX_IO_H */ | 30 | #endif /* _LINUX_IO_H */ |
diff --git a/include/linux/ip.h b/include/linux/ip.h index 2f4600146f83..6b25d36fc54c 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h | |||
@@ -96,7 +96,7 @@ struct iphdr { | |||
96 | __be16 frag_off; | 96 | __be16 frag_off; |
97 | __u8 ttl; | 97 | __u8 ttl; |
98 | __u8 protocol; | 98 | __u8 protocol; |
99 | __u16 check; | 99 | __be16 check; |
100 | __be32 saddr; | 100 | __be32 saddr; |
101 | __be32 daddr; | 101 | __be32 daddr; |
102 | /*The options start here. */ | 102 | /*The options start here. */ |
@@ -105,22 +105,22 @@ struct iphdr { | |||
105 | struct ip_auth_hdr { | 105 | struct ip_auth_hdr { |
106 | __u8 nexthdr; | 106 | __u8 nexthdr; |
107 | __u8 hdrlen; /* This one is measured in 32 bit units! */ | 107 | __u8 hdrlen; /* This one is measured in 32 bit units! */ |
108 | __u16 reserved; | 108 | __be16 reserved; |
109 | __u32 spi; | 109 | __be32 spi; |
110 | __u32 seq_no; /* Sequence number */ | 110 | __be32 seq_no; /* Sequence number */ |
111 | __u8 auth_data[0]; /* Variable len but >=4. Mind the 64 bit alignment! */ | 111 | __u8 auth_data[0]; /* Variable len but >=4. Mind the 64 bit alignment! */ |
112 | }; | 112 | }; |
113 | 113 | ||
114 | struct ip_esp_hdr { | 114 | struct ip_esp_hdr { |
115 | __u32 spi; | 115 | __be32 spi; |
116 | __u32 seq_no; /* Sequence number */ | 116 | __be32 seq_no; /* Sequence number */ |
117 | __u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */ | 117 | __u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */ |
118 | }; | 118 | }; |
119 | 119 | ||
120 | struct ip_comp_hdr { | 120 | struct ip_comp_hdr { |
121 | __u8 nexthdr; | 121 | __u8 nexthdr; |
122 | __u8 flags; | 122 | __u8 flags; |
123 | __u16 cpi; | 123 | __be16 cpi; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | #endif /* _LINUX_IP_H */ | 126 | #endif /* _LINUX_IP_H */ |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index d09fbeabf1dc..796ca009fd46 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -148,6 +148,13 @@ struct ipmi_lan_addr | |||
148 | #define IPMI_BMC_CHANNEL 0xf | 148 | #define IPMI_BMC_CHANNEL 0xf |
149 | #define IPMI_NUM_CHANNELS 0x10 | 149 | #define IPMI_NUM_CHANNELS 0x10 |
150 | 150 | ||
151 | /* | ||
152 | * Used to signify an "all channel" bitmask. This is more than the | ||
153 | * actual number of channels because this is used in userland and | ||
154 | * will cover us if the number of channels is extended. | ||
155 | */ | ||
156 | #define IPMI_CHAN_ALL (~0) | ||
157 | |||
151 | 158 | ||
152 | /* | 159 | /* |
153 | * A raw IPMI message without any addressing. This covers both | 160 | * A raw IPMI message without any addressing. This covers both |
@@ -350,18 +357,21 @@ int ipmi_request_supply_msgs(ipmi_user_t user, | |||
350 | 357 | ||
351 | /* | 358 | /* |
352 | * When commands come in to the SMS, the user can register to receive | 359 | * When commands come in to the SMS, the user can register to receive |
353 | * them. Only one user can be listening on a specific netfn/cmd pair | 360 | * them. Only one user can be listening on a specific netfn/cmd/chan tuple |
354 | * at a time, you will get an EBUSY error if the command is already | 361 | * at a time, you will get an EBUSY error if the command is already |
355 | * registered. If a command is received that does not have a user | 362 | * registered. If a command is received that does not have a user |
356 | * registered, the driver will automatically return the proper | 363 | * registered, the driver will automatically return the proper |
357 | * error. | 364 | * error. Channels are specified as a bitfield, use IPMI_CHAN_ALL to |
365 | * mean all channels. | ||
358 | */ | 366 | */ |
359 | int ipmi_register_for_cmd(ipmi_user_t user, | 367 | int ipmi_register_for_cmd(ipmi_user_t user, |
360 | unsigned char netfn, | 368 | unsigned char netfn, |
361 | unsigned char cmd); | 369 | unsigned char cmd, |
370 | unsigned int chans); | ||
362 | int ipmi_unregister_for_cmd(ipmi_user_t user, | 371 | int ipmi_unregister_for_cmd(ipmi_user_t user, |
363 | unsigned char netfn, | 372 | unsigned char netfn, |
364 | unsigned char cmd); | 373 | unsigned char cmd, |
374 | unsigned int chans); | ||
365 | 375 | ||
366 | /* | 376 | /* |
367 | * Allow run-to-completion mode to be set for the interface of | 377 | * Allow run-to-completion mode to be set for the interface of |
@@ -571,6 +581,36 @@ struct ipmi_cmdspec | |||
571 | #define IPMICTL_UNREGISTER_FOR_CMD _IOR(IPMI_IOC_MAGIC, 15, \ | 581 | #define IPMICTL_UNREGISTER_FOR_CMD _IOR(IPMI_IOC_MAGIC, 15, \ |
572 | struct ipmi_cmdspec) | 582 | struct ipmi_cmdspec) |
573 | 583 | ||
584 | /* | ||
585 | * Register to get commands from other entities on specific channels. | ||
586 | * This way, you can only listen on specific channels, or have messages | ||
587 | * from some channels go to one place and other channels to someplace | ||
588 | * else. The chans field is a bitmask, (1 << channel) for each channel. | ||
589 | * It may be IPMI_CHAN_ALL for all channels. | ||
590 | */ | ||
591 | struct ipmi_cmdspec_chans | ||
592 | { | ||
593 | unsigned int netfn; | ||
594 | unsigned int cmd; | ||
595 | unsigned int chans; | ||
596 | }; | ||
597 | |||
598 | /* | ||
599 | * Register to receive a specific command on specific channels. error values: | ||
600 | * - EFAULT - an address supplied was invalid. | ||
601 | * - EBUSY - One of the netfn/cmd/chans supplied was already in use. | ||
602 | * - ENOMEM - could not allocate memory for the entry. | ||
603 | */ | ||
604 | #define IPMICTL_REGISTER_FOR_CMD_CHANS _IOR(IPMI_IOC_MAGIC, 28, \ | ||
605 | struct ipmi_cmdspec_chans) | ||
606 | /* | ||
607 | * Unregister some netfn/cmd/chans. error values: | ||
608 | * - EFAULT - an address supplied was invalid. | ||
609 | * - ENOENT - None of the netfn/cmd/chans were found registered for this user. | ||
610 | */ | ||
611 | #define IPMICTL_UNREGISTER_FOR_CMD_CHANS _IOR(IPMI_IOC_MAGIC, 29, \ | ||
612 | struct ipmi_cmdspec_chans) | ||
613 | |||
574 | /* | 614 | /* |
575 | * Set whether this interface receives events. Note that the first | 615 | * Set whether this interface receives events. Note that the first |
576 | * user registered for events will get all pending events for the | 616 | * user registered for events will get all pending events for the |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index caca57df0d7d..4f435c59de06 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -99,22 +99,22 @@ struct ipv6_destopt_hao { | |||
99 | struct ipv6_auth_hdr { | 99 | struct ipv6_auth_hdr { |
100 | __u8 nexthdr; | 100 | __u8 nexthdr; |
101 | __u8 hdrlen; /* This one is measured in 32 bit units! */ | 101 | __u8 hdrlen; /* This one is measured in 32 bit units! */ |
102 | __u16 reserved; | 102 | __be16 reserved; |
103 | __u32 spi; | 103 | __be32 spi; |
104 | __u32 seq_no; /* Sequence number */ | 104 | __be32 seq_no; /* Sequence number */ |
105 | __u8 auth_data[0]; /* Length variable but >=4. Mind the 64 bit alignment! */ | 105 | __u8 auth_data[0]; /* Length variable but >=4. Mind the 64 bit alignment! */ |
106 | }; | 106 | }; |
107 | 107 | ||
108 | struct ipv6_esp_hdr { | 108 | struct ipv6_esp_hdr { |
109 | __u32 spi; | 109 | __be32 spi; |
110 | __u32 seq_no; /* Sequence number */ | 110 | __be32 seq_no; /* Sequence number */ |
111 | __u8 enc_data[0]; /* Length variable but >=8. Mind the 64 bit alignment! */ | 111 | __u8 enc_data[0]; /* Length variable but >=8. Mind the 64 bit alignment! */ |
112 | }; | 112 | }; |
113 | 113 | ||
114 | struct ipv6_comp_hdr { | 114 | struct ipv6_comp_hdr { |
115 | __u8 nexthdr; | 115 | __u8 nexthdr; |
116 | __u8 flags; | 116 | __u8 flags; |
117 | __u16 cpi; | 117 | __be16 cpi; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | /* | 120 | /* |
@@ -136,7 +136,7 @@ struct ipv6hdr { | |||
136 | #endif | 136 | #endif |
137 | __u8 flow_lbl[3]; | 137 | __u8 flow_lbl[3]; |
138 | 138 | ||
139 | __u16 payload_len; | 139 | __be16 payload_len; |
140 | __u8 nexthdr; | 140 | __u8 nexthdr; |
141 | __u8 hop_limit; | 141 | __u8 hop_limit; |
142 | 142 | ||
@@ -461,7 +461,7 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk) | |||
461 | 461 | ||
462 | #define INET6_MATCH(__sk, __hash, __saddr, __daddr, __ports, __dif)\ | 462 | #define INET6_MATCH(__sk, __hash, __saddr, __daddr, __ports, __dif)\ |
463 | (((__sk)->sk_hash == (__hash)) && \ | 463 | (((__sk)->sk_hash == (__hash)) && \ |
464 | ((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \ | 464 | ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ |
465 | ((__sk)->sk_family == AF_INET6) && \ | 465 | ((__sk)->sk_family == AF_INET6) && \ |
466 | ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ | 466 | ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ |
467 | ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \ | 467 | ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index a6d9daa38c6d..fe89444b1c6f 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -977,7 +977,6 @@ extern void journal_write_revoke_records(journal_t *, transaction_t *); | |||
977 | extern int journal_set_revoke(journal_t *, unsigned long, tid_t); | 977 | extern int journal_set_revoke(journal_t *, unsigned long, tid_t); |
978 | extern int journal_test_revoke(journal_t *, unsigned long, tid_t); | 978 | extern int journal_test_revoke(journal_t *, unsigned long, tid_t); |
979 | extern void journal_clear_revoke(journal_t *); | 979 | extern void journal_clear_revoke(journal_t *); |
980 | extern void journal_brelse_array(struct buffer_head *b[], int n); | ||
981 | extern void journal_switch_revoke_table(journal_t *journal); | 980 | extern void journal_switch_revoke_table(journal_t *journal); |
982 | 981 | ||
983 | /* | 982 | /* |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 0db22a1ab474..10f505c8431d 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -47,4 +47,8 @@ call_usermodehelper(char *path, char **argv, char **envp, int wait) | |||
47 | 47 | ||
48 | extern void usermodehelper_init(void); | 48 | extern void usermodehelper_init(void); |
49 | 49 | ||
50 | struct file; | ||
51 | extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[], | ||
52 | struct file **filp); | ||
53 | |||
50 | #endif /* __LINUX_KMOD_H__ */ | 54 | #endif /* __LINUX_KMOD_H__ */ |
diff --git a/include/linux/latency.h b/include/linux/latency.h new file mode 100644 index 000000000000..c08b52bb55b0 --- /dev/null +++ b/include/linux/latency.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * latency.h: Explicit system-wide latency-expectation infrastructure | ||
3 | * | ||
4 | * (C) Copyright 2006 Intel Corporation | ||
5 | * Author: Arjan van de Ven <arjan@linux.intel.com> | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #ifndef _INCLUDE_GUARD_LATENCY_H_ | ||
10 | #define _INCLUDE_GUARD_LATENCY_H_ | ||
11 | |||
12 | #include <linux/notifier.h> | ||
13 | |||
14 | void set_acceptable_latency(char *identifier, int usecs); | ||
15 | void modify_acceptable_latency(char *identifier, int usecs); | ||
16 | void remove_acceptable_latency(char *identifier); | ||
17 | void synchronize_acceptable_latency(void); | ||
18 | int system_latency_constraint(void); | ||
19 | |||
20 | int register_latency_notifier(struct notifier_block * nb); | ||
21 | int unregister_latency_notifier(struct notifier_block * nb); | ||
22 | |||
23 | #define INFINITE_LATENCY 1000000 | ||
24 | |||
25 | #endif | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index dc23c7c639f3..88afceffb7cb 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -12,6 +12,9 @@ | |||
12 | #ifndef __LINUX_LEDS_H_INCLUDED | 12 | #ifndef __LINUX_LEDS_H_INCLUDED |
13 | #define __LINUX_LEDS_H_INCLUDED | 13 | #define __LINUX_LEDS_H_INCLUDED |
14 | 14 | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/spinlock.h> | ||
17 | |||
15 | struct device; | 18 | struct device; |
16 | struct class_device; | 19 | struct class_device; |
17 | /* | 20 | /* |
diff --git a/include/linux/list.h b/include/linux/list.h index 65a5b5ceda49..a9c90287c0ff 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -39,6 +39,7 @@ static inline void INIT_LIST_HEAD(struct list_head *list) | |||
39 | * This is only for internal list manipulation where we know | 39 | * This is only for internal list manipulation where we know |
40 | * the prev/next entries already! | 40 | * the prev/next entries already! |
41 | */ | 41 | */ |
42 | #ifndef CONFIG_DEBUG_LIST | ||
42 | static inline void __list_add(struct list_head *new, | 43 | static inline void __list_add(struct list_head *new, |
43 | struct list_head *prev, | 44 | struct list_head *prev, |
44 | struct list_head *next) | 45 | struct list_head *next) |
@@ -48,6 +49,11 @@ static inline void __list_add(struct list_head *new, | |||
48 | new->prev = prev; | 49 | new->prev = prev; |
49 | prev->next = new; | 50 | prev->next = new; |
50 | } | 51 | } |
52 | #else | ||
53 | extern void __list_add(struct list_head *new, | ||
54 | struct list_head *prev, | ||
55 | struct list_head *next); | ||
56 | #endif | ||
51 | 57 | ||
52 | /** | 58 | /** |
53 | * list_add - add a new entry | 59 | * list_add - add a new entry |
@@ -57,10 +63,15 @@ static inline void __list_add(struct list_head *new, | |||
57 | * Insert a new entry after the specified head. | 63 | * Insert a new entry after the specified head. |
58 | * This is good for implementing stacks. | 64 | * This is good for implementing stacks. |
59 | */ | 65 | */ |
66 | #ifndef CONFIG_DEBUG_LIST | ||
60 | static inline void list_add(struct list_head *new, struct list_head *head) | 67 | static inline void list_add(struct list_head *new, struct list_head *head) |
61 | { | 68 | { |
62 | __list_add(new, head, head->next); | 69 | __list_add(new, head, head->next); |
63 | } | 70 | } |
71 | #else | ||
72 | extern void list_add(struct list_head *new, struct list_head *head); | ||
73 | #endif | ||
74 | |||
64 | 75 | ||
65 | /** | 76 | /** |
66 | * list_add_tail - add a new entry | 77 | * list_add_tail - add a new entry |
@@ -153,12 +164,16 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) | |||
153 | * Note: list_empty on entry does not return true after this, the entry is | 164 | * Note: list_empty on entry does not return true after this, the entry is |
154 | * in an undefined state. | 165 | * in an undefined state. |
155 | */ | 166 | */ |
167 | #ifndef CONFIG_DEBUG_LIST | ||
156 | static inline void list_del(struct list_head *entry) | 168 | static inline void list_del(struct list_head *entry) |
157 | { | 169 | { |
158 | __list_del(entry->prev, entry->next); | 170 | __list_del(entry->prev, entry->next); |
159 | entry->next = LIST_POISON1; | 171 | entry->next = LIST_POISON1; |
160 | entry->prev = LIST_POISON2; | 172 | entry->prev = LIST_POISON2; |
161 | } | 173 | } |
174 | #else | ||
175 | extern void list_del(struct list_head *entry); | ||
176 | #endif | ||
162 | 177 | ||
163 | /** | 178 | /** |
164 | * list_del_rcu - deletes entry from list without re-initialization | 179 | * list_del_rcu - deletes entry from list without re-initialization |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index c040a8c969aa..1314ca0f29be 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -8,13 +8,13 @@ | |||
8 | #ifndef __LINUX_LOCKDEP_H | 8 | #ifndef __LINUX_LOCKDEP_H |
9 | #define __LINUX_LOCKDEP_H | 9 | #define __LINUX_LOCKDEP_H |
10 | 10 | ||
11 | #ifdef CONFIG_LOCKDEP | ||
12 | |||
11 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
12 | #include <linux/list.h> | 14 | #include <linux/list.h> |
13 | #include <linux/debug_locks.h> | 15 | #include <linux/debug_locks.h> |
14 | #include <linux/stacktrace.h> | 16 | #include <linux/stacktrace.h> |
15 | 17 | ||
16 | #ifdef CONFIG_LOCKDEP | ||
17 | |||
18 | /* | 18 | /* |
19 | * Lock-class usage-state bits: | 19 | * Lock-class usage-state bits: |
20 | */ | 20 | */ |
diff --git a/include/linux/loop.h b/include/linux/loop.h index e76c7611d6cc..191a595055f0 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
@@ -59,10 +59,9 @@ struct loop_device { | |||
59 | struct bio *lo_bio; | 59 | struct bio *lo_bio; |
60 | struct bio *lo_biotail; | 60 | struct bio *lo_biotail; |
61 | int lo_state; | 61 | int lo_state; |
62 | struct completion lo_done; | ||
63 | struct completion lo_bh_done; | ||
64 | struct mutex lo_ctl_mutex; | 62 | struct mutex lo_ctl_mutex; |
65 | int lo_pending; | 63 | struct task_struct *lo_thread; |
64 | wait_queue_head_t lo_event; | ||
66 | 65 | ||
67 | request_queue_t *lo_queue; | 66 | request_queue_t *lo_queue; |
68 | }; | 67 | }; |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 8f04143ca363..654ef5544878 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -57,7 +57,7 @@ struct memory_block { | |||
57 | struct notifier_block; | 57 | struct notifier_block; |
58 | struct mem_section; | 58 | struct mem_section; |
59 | 59 | ||
60 | #ifndef CONFIG_MEMORY_HOTPLUG | 60 | #ifndef CONFIG_MEMORY_HOTPLUG_SPARSE |
61 | static inline int memory_dev_init(void) | 61 | static inline int memory_dev_init(void) |
62 | { | 62 | { |
63 | return 0; | 63 | return 0; |
@@ -78,7 +78,7 @@ extern int remove_memory_block(unsigned long, struct mem_section *, int); | |||
78 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) | 78 | #define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) |
79 | 79 | ||
80 | 80 | ||
81 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 81 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ |
82 | 82 | ||
83 | #define hotplug_memory_notifier(fn, pri) { \ | 83 | #define hotplug_memory_notifier(fn, pri) { \ |
84 | static struct notifier_block fn##_mem_nb = \ | 84 | static struct notifier_block fn##_mem_nb = \ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 218501cfaeb9..7b54666cea8e 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -172,5 +172,7 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, | |||
172 | extern int add_memory(int nid, u64 start, u64 size); | 172 | extern int add_memory(int nid, u64 start, u64 size); |
173 | extern int arch_add_memory(int nid, u64 start, u64 size); | 173 | extern int arch_add_memory(int nid, u64 start, u64 size); |
174 | extern int remove_memory(u64 start, u64 size); | 174 | extern int remove_memory(u64 start, u64 size); |
175 | extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, | ||
176 | int nr_pages); | ||
175 | 177 | ||
176 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ | 178 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7b703b6d4358..b7966ab8cb6a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -743,7 +743,9 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long | |||
743 | int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); | 743 | int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); |
744 | void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long); | 744 | void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long); |
745 | 745 | ||
746 | int __set_page_dirty_buffers(struct page *page); | 746 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); |
747 | extern void do_invalidatepage(struct page *page, unsigned long offset); | ||
748 | |||
747 | int __set_page_dirty_nobuffers(struct page *page); | 749 | int __set_page_dirty_nobuffers(struct page *page); |
748 | int redirty_page_for_writepage(struct writeback_control *wbc, | 750 | int redirty_page_for_writepage(struct writeback_control *wbc, |
749 | struct page *page); | 751 | struct page *page); |
@@ -944,6 +946,8 @@ extern void mem_init(void); | |||
944 | extern void show_mem(void); | 946 | extern void show_mem(void); |
945 | extern void si_meminfo(struct sysinfo * val); | 947 | extern void si_meminfo(struct sysinfo * val); |
946 | extern void si_meminfo_node(struct sysinfo *val, int nid); | 948 | extern void si_meminfo_node(struct sysinfo *val, int nid); |
949 | extern void zonetable_add(struct zone *zone, int nid, enum zone_type zid, | ||
950 | unsigned long pfn, unsigned long size); | ||
947 | 951 | ||
948 | #ifdef CONFIG_NUMA | 952 | #ifdef CONFIG_NUMA |
949 | extern void setup_per_cpu_pageset(void); | 953 | extern void setup_per_cpu_pageset(void); |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index ba095aebedff..587264a58d56 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -85,6 +85,8 @@ struct mmc_host { | |||
85 | unsigned long caps; /* Host capabilities */ | 85 | unsigned long caps; /* Host capabilities */ |
86 | 86 | ||
87 | #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ | 87 | #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ |
88 | #define MMC_CAP_MULTIWRITE (1 << 1) /* Can accurately report bytes sent to card on error */ | ||
89 | #define MMC_CAP_BYTEBLOCK (1 << 2) /* Can do non-log2 block sizes */ | ||
88 | 90 | ||
89 | /* host specific block data */ | 91 | /* host specific block data */ |
90 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 92 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 627e2c08ce41..a3594dfd6963 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -68,7 +68,6 @@ struct mmc_command { | |||
68 | struct mmc_data { | 68 | struct mmc_data { |
69 | unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */ | 69 | unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */ |
70 | unsigned int timeout_clks; /* data timeout (in clocks) */ | 70 | unsigned int timeout_clks; /* data timeout (in clocks) */ |
71 | unsigned int blksz_bits; /* data block size */ | ||
72 | unsigned int blksz; /* data block size */ | 71 | unsigned int blksz; /* data block size */ |
73 | unsigned int blocks; /* number of blocks */ | 72 | unsigned int blocks; /* number of blocks */ |
74 | unsigned int error; /* data error */ | 73 | unsigned int error; /* data error */ |
diff --git a/include/linux/module.h b/include/linux/module.h index d4486cc2e7fe..2c599175c583 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -232,17 +232,17 @@ enum module_state | |||
232 | }; | 232 | }; |
233 | 233 | ||
234 | /* Similar stuff for section attributes. */ | 234 | /* Similar stuff for section attributes. */ |
235 | #define MODULE_SECT_NAME_LEN 32 | ||
236 | struct module_sect_attr | 235 | struct module_sect_attr |
237 | { | 236 | { |
238 | struct module_attribute mattr; | 237 | struct module_attribute mattr; |
239 | char name[MODULE_SECT_NAME_LEN]; | 238 | char *name; |
240 | unsigned long address; | 239 | unsigned long address; |
241 | }; | 240 | }; |
242 | 241 | ||
243 | struct module_sect_attrs | 242 | struct module_sect_attrs |
244 | { | 243 | { |
245 | struct attribute_group grp; | 244 | struct attribute_group grp; |
245 | int nsections; | ||
246 | struct module_sect_attr attrs[0]; | 246 | struct module_sect_attr attrs[0]; |
247 | }; | 247 | }; |
248 | 248 | ||
diff --git a/include/linux/mpage.h b/include/linux/mpage.h index 3ca880463c47..cc5fb75af78a 100644 --- a/include/linux/mpage.h +++ b/include/linux/mpage.h | |||
@@ -9,6 +9,7 @@ | |||
9 | * (And no, it doesn't do the #ifdef __MPAGE_H thing, and it doesn't do | 9 | * (And no, it doesn't do the #ifdef __MPAGE_H thing, and it doesn't do |
10 | * nested includes. Get it right in the .c file). | 10 | * nested includes. Get it right in the .c file). |
11 | */ | 11 | */ |
12 | #ifdef CONFIG_BLOCK | ||
12 | 13 | ||
13 | struct writeback_control; | 14 | struct writeback_control; |
14 | typedef int (writepage_t)(struct page *page, struct writeback_control *wbc); | 15 | typedef int (writepage_t)(struct page *page, struct writeback_control *wbc); |
@@ -21,8 +22,4 @@ int mpage_writepages(struct address_space *mapping, | |||
21 | int mpage_writepage(struct page *page, get_block_t *get_block, | 22 | int mpage_writepage(struct page *page, get_block_t *get_block, |
22 | struct writeback_control *wbc); | 23 | struct writeback_control *wbc); |
23 | 24 | ||
24 | static inline int | 25 | #endif |
25 | generic_writepages(struct address_space *mapping, struct writeback_control *wbc) | ||
26 | { | ||
27 | return mpage_writepages(mapping, wbc, NULL); | ||
28 | } | ||
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index e05d54a90743..7da2cee8e132 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -142,7 +142,7 @@ struct vif_device | |||
142 | unsigned long rate_limit; /* Traffic shaping (NI) */ | 142 | unsigned long rate_limit; /* Traffic shaping (NI) */ |
143 | unsigned char threshold; /* TTL threshold */ | 143 | unsigned char threshold; /* TTL threshold */ |
144 | unsigned short flags; /* Control flags */ | 144 | unsigned short flags; /* Control flags */ |
145 | __u32 local,remote; /* Addresses(remote for tunnels)*/ | 145 | __be32 local,remote; /* Addresses(remote for tunnels)*/ |
146 | int link; /* Physical interface index */ | 146 | int link; /* Physical interface index */ |
147 | }; | 147 | }; |
148 | 148 | ||
@@ -151,8 +151,8 @@ struct vif_device | |||
151 | struct mfc_cache | 151 | struct mfc_cache |
152 | { | 152 | { |
153 | struct mfc_cache *next; /* Next entry on cache line */ | 153 | struct mfc_cache *next; /* Next entry on cache line */ |
154 | __u32 mfc_mcastgrp; /* Group the entry belongs to */ | 154 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ |
155 | __u32 mfc_origin; /* Source of packet */ | 155 | __be32 mfc_origin; /* Source of packet */ |
156 | vifi_t mfc_parent; /* Source interface */ | 156 | vifi_t mfc_parent; /* Source interface */ |
157 | int mfc_flags; /* Flags on line */ | 157 | int mfc_flags; /* Flags on line */ |
158 | 158 | ||
@@ -179,9 +179,9 @@ struct mfc_cache | |||
179 | #define MFC_LINES 64 | 179 | #define MFC_LINES 64 |
180 | 180 | ||
181 | #ifdef __BIG_ENDIAN | 181 | #ifdef __BIG_ENDIAN |
182 | #define MFC_HASH(a,b) ((((a)>>24)^((b)>>26))&(MFC_LINES-1)) | 182 | #define MFC_HASH(a,b) (((((__force u32)(__be32)a)>>24)^(((__force u32)(__be32)b)>>26))&(MFC_LINES-1)) |
183 | #else | 183 | #else |
184 | #define MFC_HASH(a,b) (((a)^((b)>>2))&(MFC_LINES-1)) | 184 | #define MFC_HASH(a,b) ((((__force u32)(__be32)a)^(((__force u32)(__be32)b)>>2))&(MFC_LINES-1)) |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | #endif | 187 | #endif |
@@ -213,8 +213,8 @@ struct pimreghdr | |||
213 | { | 213 | { |
214 | __u8 type; | 214 | __u8 type; |
215 | __u8 reserved; | 215 | __u8 reserved; |
216 | __u16 csum; | 216 | __be16 csum; |
217 | __u32 flags; | 217 | __be32 flags; |
218 | }; | 218 | }; |
219 | 219 | ||
220 | extern int pim_rcv_v1(struct sk_buff *); | 220 | extern int pim_rcv_v1(struct sk_buff *); |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index bae62d62dc3e..ce6c85815cbd 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -204,6 +204,7 @@ struct fat_mount_options { | |||
204 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ | 204 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ |
205 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ | 205 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ |
206 | atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */ | 206 | atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */ |
207 | flush:1, /* write things quickly */ | ||
207 | nocase:1; /* Does this need case conversion? 0=need case conversion*/ | 208 | nocase:1; /* Does this need case conversion? 0=need case conversion*/ |
208 | }; | 209 | }; |
209 | 210 | ||
@@ -412,6 +413,8 @@ extern int fat_sync_inode(struct inode *inode); | |||
412 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, | 413 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, |
413 | struct inode_operations *fs_dir_inode_ops, int isvfat); | 414 | struct inode_operations *fs_dir_inode_ops, int isvfat); |
414 | 415 | ||
416 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | ||
417 | struct inode *i2); | ||
415 | /* fat/misc.c */ | 418 | /* fat/misc.c */ |
416 | extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); | 419 | extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); |
417 | extern void fat_clusters_flush(struct super_block *sb); | 420 | extern void fat_clusters_flush(struct super_block *sb); |
diff --git a/include/linux/namei.h b/include/linux/namei.h index 45511a5918d3..f5f19606effb 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_NAMEI_H | 1 | #ifndef _LINUX_NAMEI_H |
2 | #define _LINUX_NAMEI_H | 2 | #define _LINUX_NAMEI_H |
3 | 3 | ||
4 | #include <linux/dcache.h> | ||
4 | #include <linux/linkage.h> | 5 | #include <linux/linkage.h> |
5 | 6 | ||
6 | struct vfsmount; | 7 | struct vfsmount; |
@@ -54,6 +55,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
54 | #define LOOKUP_OPEN (0x0100) | 55 | #define LOOKUP_OPEN (0x0100) |
55 | #define LOOKUP_CREATE (0x0200) | 56 | #define LOOKUP_CREATE (0x0200) |
56 | #define LOOKUP_ACCESS (0x0400) | 57 | #define LOOKUP_ACCESS (0x0400) |
58 | #define LOOKUP_CHDIR (0x0800) | ||
57 | 59 | ||
58 | extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); | 60 | extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); |
59 | extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *)); | 61 | extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *)); |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 02e352be717e..0ea7f89e613c 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -212,6 +212,7 @@ void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); | |||
212 | 212 | ||
213 | /* linux/fs/ncpfs/ioctl.c */ | 213 | /* linux/fs/ncpfs/ioctl.c */ |
214 | int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long); | 214 | int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long); |
215 | long ncp_compat_ioctl(struct file *, unsigned int, unsigned long); | ||
215 | 216 | ||
216 | /* linux/fs/ncpfs/sock.c */ | 217 | /* linux/fs/ncpfs/sock.c */ |
217 | int ncp_request2(struct ncp_server *server, int function, | 218 | int ncp_request2(struct ncp_server *server, int function, |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 13d6d4eb8b3a..9264139bd8df 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -187,7 +187,7 @@ struct hh_cache | |||
187 | { | 187 | { |
188 | struct hh_cache *hh_next; /* Next entry */ | 188 | struct hh_cache *hh_next; /* Next entry */ |
189 | atomic_t hh_refcnt; /* number of users */ | 189 | atomic_t hh_refcnt; /* number of users */ |
190 | unsigned short hh_type; /* protocol identifier, f.e ETH_P_IP | 190 | __be16 hh_type; /* protocol identifier, f.e ETH_P_IP |
191 | * NOTE: For VLANs, this will be the | 191 | * NOTE: For VLANs, this will be the |
192 | * encapuslated type. --BLG | 192 | * encapuslated type. --BLG |
193 | */ | 193 | */ |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 149e87c9ab13..44e39b61d9e7 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -46,11 +46,11 @@ struct arpt_arp { | |||
46 | struct arpt_devaddr_info tgt_devaddr; | 46 | struct arpt_devaddr_info tgt_devaddr; |
47 | 47 | ||
48 | /* ARP operation code. */ | 48 | /* ARP operation code. */ |
49 | u_int16_t arpop, arpop_mask; | 49 | __be16 arpop, arpop_mask; |
50 | 50 | ||
51 | /* ARP hardware address and protocol address format. */ | 51 | /* ARP hardware address and protocol address format. */ |
52 | u_int16_t arhrd, arhrd_mask; | 52 | __be16 arhrd, arhrd_mask; |
53 | u_int16_t arpro, arpro_mask; | 53 | __be16 arpro, arpro_mask; |
54 | 54 | ||
55 | /* The protocol address length is only accepted if it is 4 | 55 | /* The protocol address length is only accepted if it is 4 |
56 | * so there is no use in offering a way to do filtering on it. | 56 | * so there is no use in offering a way to do filtering on it. |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 51dbec1892c8..64e868034c4a 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -157,7 +157,7 @@ struct ip_conntrack_expect | |||
157 | unsigned int flags; | 157 | unsigned int flags; |
158 | 158 | ||
159 | #ifdef CONFIG_IP_NF_NAT_NEEDED | 159 | #ifdef CONFIG_IP_NF_NAT_NEEDED |
160 | u_int32_t saved_ip; | 160 | __be32 saved_ip; |
161 | /* This is the original per-proto part, used to map the | 161 | /* This is the original per-proto part, used to map the |
162 | * expected connection the way the recipient expects. */ | 162 | * expected connection the way the recipient expects. */ |
163 | union ip_conntrack_manip_proto saved_proto; | 163 | union ip_conntrack_manip_proto saved_proto; |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_h323.h b/include/linux/netfilter_ipv4/ip_conntrack_h323.h index 3cbff7379002..943cc6a4871d 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_h323.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_h323.h | |||
@@ -30,7 +30,7 @@ struct ip_ct_h323_master { | |||
30 | struct ip_conntrack_expect; | 30 | struct ip_conntrack_expect; |
31 | 31 | ||
32 | extern int get_h225_addr(unsigned char *data, TransportAddress * addr, | 32 | extern int get_h225_addr(unsigned char *data, TransportAddress * addr, |
33 | u_int32_t * ip, u_int16_t * port); | 33 | __be32 * ip, u_int16_t * port); |
34 | extern void ip_conntrack_h245_expect(struct ip_conntrack *new, | 34 | extern void ip_conntrack_h245_expect(struct ip_conntrack *new, |
35 | struct ip_conntrack_expect *this); | 35 | struct ip_conntrack_expect *this); |
36 | extern void ip_conntrack_q931_expect(struct ip_conntrack *new, | 36 | extern void ip_conntrack_q931_expect(struct ip_conntrack *new, |
@@ -38,11 +38,11 @@ extern void ip_conntrack_q931_expect(struct ip_conntrack *new, | |||
38 | extern int (*set_h245_addr_hook) (struct sk_buff ** pskb, | 38 | extern int (*set_h245_addr_hook) (struct sk_buff ** pskb, |
39 | unsigned char **data, int dataoff, | 39 | unsigned char **data, int dataoff, |
40 | H245_TransportAddress * addr, | 40 | H245_TransportAddress * addr, |
41 | u_int32_t ip, u_int16_t port); | 41 | __be32 ip, u_int16_t port); |
42 | extern int (*set_h225_addr_hook) (struct sk_buff ** pskb, | 42 | extern int (*set_h225_addr_hook) (struct sk_buff ** pskb, |
43 | unsigned char **data, int dataoff, | 43 | unsigned char **data, int dataoff, |
44 | TransportAddress * addr, | 44 | TransportAddress * addr, |
45 | u_int32_t ip, u_int16_t port); | 45 | __be32 ip, u_int16_t port); |
46 | extern int (*set_sig_addr_hook) (struct sk_buff ** pskb, | 46 | extern int (*set_sig_addr_hook) (struct sk_buff ** pskb, |
47 | struct ip_conntrack * ct, | 47 | struct ip_conntrack * ct, |
48 | enum ip_conntrack_info ctinfo, | 48 | enum ip_conntrack_info ctinfo, |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h index 2fdabdb4c0ef..c228bde74c33 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h | |||
@@ -23,13 +23,13 @@ union ip_conntrack_manip_proto | |||
23 | __be16 port; | 23 | __be16 port; |
24 | } tcp; | 24 | } tcp; |
25 | struct { | 25 | struct { |
26 | u_int16_t port; | 26 | __be16 port; |
27 | } udp; | 27 | } udp; |
28 | struct { | 28 | struct { |
29 | u_int16_t id; | 29 | __be16 id; |
30 | } icmp; | 30 | } icmp; |
31 | struct { | 31 | struct { |
32 | u_int16_t port; | 32 | __be16 port; |
33 | } sctp; | 33 | } sctp; |
34 | struct { | 34 | struct { |
35 | __be16 key; /* key is 32bit, pptp only uses 16 */ | 35 | __be16 key; /* key is 32bit, pptp only uses 16 */ |
@@ -39,7 +39,7 @@ union ip_conntrack_manip_proto | |||
39 | /* The manipulable part of the tuple. */ | 39 | /* The manipulable part of the tuple. */ |
40 | struct ip_conntrack_manip | 40 | struct ip_conntrack_manip |
41 | { | 41 | { |
42 | u_int32_t ip; | 42 | __be32 ip; |
43 | union ip_conntrack_manip_proto u; | 43 | union ip_conntrack_manip_proto u; |
44 | }; | 44 | }; |
45 | 45 | ||
@@ -50,22 +50,22 @@ struct ip_conntrack_tuple | |||
50 | 50 | ||
51 | /* These are the parts of the tuple which are fixed. */ | 51 | /* These are the parts of the tuple which are fixed. */ |
52 | struct { | 52 | struct { |
53 | u_int32_t ip; | 53 | __be32 ip; |
54 | union { | 54 | union { |
55 | /* Add other protocols here. */ | 55 | /* Add other protocols here. */ |
56 | u_int16_t all; | 56 | u_int16_t all; |
57 | 57 | ||
58 | struct { | 58 | struct { |
59 | u_int16_t port; | 59 | __be16 port; |
60 | } tcp; | 60 | } tcp; |
61 | struct { | 61 | struct { |
62 | u_int16_t port; | 62 | __be16 port; |
63 | } udp; | 63 | } udp; |
64 | struct { | 64 | struct { |
65 | u_int8_t type, code; | 65 | u_int8_t type, code; |
66 | } icmp; | 66 | } icmp; |
67 | struct { | 67 | struct { |
68 | u_int16_t port; | 68 | __be16 port; |
69 | } sctp; | 69 | } sctp; |
70 | struct { | 70 | struct { |
71 | __be16 key; /* key is 32bit, | 71 | __be16 key; /* key is 32bit, |
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h index 98f8407e4cb5..bdf553620ca1 100644 --- a/include/linux/netfilter_ipv4/ip_nat.h +++ b/include/linux/netfilter_ipv4/ip_nat.h | |||
@@ -33,7 +33,7 @@ struct ip_nat_range | |||
33 | unsigned int flags; | 33 | unsigned int flags; |
34 | 34 | ||
35 | /* Inclusive: network order. */ | 35 | /* Inclusive: network order. */ |
36 | u_int32_t min_ip, max_ip; | 36 | __be32 min_ip, max_ip; |
37 | 37 | ||
38 | /* Inclusive: network order */ | 38 | /* Inclusive: network order */ |
39 | union ip_conntrack_manip_proto min, max; | 39 | union ip_conntrack_manip_proto min, max; |
diff --git a/include/linux/netfilter_ipv4/ip_queue.h b/include/linux/netfilter_ipv4/ip_queue.h index aa08d68c4841..a03507f465f8 100644 --- a/include/linux/netfilter_ipv4/ip_queue.h +++ b/include/linux/netfilter_ipv4/ip_queue.h | |||
@@ -26,7 +26,7 @@ typedef struct ipq_packet_msg { | |||
26 | unsigned int hook; /* Netfilter hook we rode in on */ | 26 | unsigned int hook; /* Netfilter hook we rode in on */ |
27 | char indev_name[IFNAMSIZ]; /* Name of incoming interface */ | 27 | char indev_name[IFNAMSIZ]; /* Name of incoming interface */ |
28 | char outdev_name[IFNAMSIZ]; /* Name of outgoing interface */ | 28 | char outdev_name[IFNAMSIZ]; /* Name of outgoing interface */ |
29 | unsigned short hw_protocol; /* Hardware protocol (network order) */ | 29 | __be16 hw_protocol; /* Hardware protocol (network order) */ |
30 | unsigned short hw_type; /* Hardware type */ | 30 | unsigned short hw_type; /* Hardware type */ |
31 | unsigned char hw_addrlen; /* Hardware address length */ | 31 | unsigned char hw_addrlen; /* Hardware address length */ |
32 | unsigned char hw_addr[8]; /* Hardware address */ | 32 | unsigned char hw_addr[8]; /* Hardware address */ |
diff --git a/include/linux/netfilter_ipv4/ipt_iprange.h b/include/linux/netfilter_ipv4/ipt_iprange.h index 3ecb3bd63676..34ab0fb736e2 100644 --- a/include/linux/netfilter_ipv4/ipt_iprange.h +++ b/include/linux/netfilter_ipv4/ipt_iprange.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | struct ipt_iprange { | 9 | struct ipt_iprange { |
10 | /* Inclusive: network order. */ | 10 | /* Inclusive: network order. */ |
11 | u_int32_t min_ip, max_ip; | 11 | __be32 min_ip, max_ip; |
12 | }; | 12 | }; |
13 | 13 | ||
14 | struct ipt_iprange_info | 14 | struct ipt_iprange_info |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 98c9b9f667a5..76ff54846ada 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -367,10 +367,12 @@ extern int nfs3_removexattr (struct dentry *, const char *name); | |||
367 | */ | 367 | */ |
368 | extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, | 368 | extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, |
369 | unsigned long); | 369 | unsigned long); |
370 | extern ssize_t nfs_file_direct_read(struct kiocb *iocb, char __user *buf, | 370 | extern ssize_t nfs_file_direct_read(struct kiocb *iocb, |
371 | size_t count, loff_t pos); | 371 | const struct iovec *iov, unsigned long nr_segs, |
372 | extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, | 372 | loff_t pos); |
373 | size_t count, loff_t pos); | 373 | extern ssize_t nfs_file_direct_write(struct kiocb *iocb, |
374 | const struct iovec *iov, unsigned long nr_segs, | ||
375 | loff_t pos); | ||
374 | 376 | ||
375 | /* | 377 | /* |
376 | * linux/fs/nfs/dir.c | 378 | * linux/fs/nfs/dir.c |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index c8f4d2f627d7..e16904e28c3a 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #ifndef LINUX_NMI_H | 4 | #ifndef LINUX_NMI_H |
5 | #define LINUX_NMI_H | 5 | #define LINUX_NMI_H |
6 | 6 | ||
7 | #include <linux/sched.h> | ||
7 | #include <asm/irq.h> | 8 | #include <asm/irq.h> |
8 | 9 | ||
9 | /** | 10 | /** |
@@ -16,7 +17,7 @@ | |||
16 | #ifdef ARCH_HAS_NMI_WATCHDOG | 17 | #ifdef ARCH_HAS_NMI_WATCHDOG |
17 | extern void touch_nmi_watchdog(void); | 18 | extern void touch_nmi_watchdog(void); |
18 | #else | 19 | #else |
19 | # define touch_nmi_watchdog() do { } while(0) | 20 | # define touch_nmi_watchdog() touch_softlockup_watchdog() |
20 | #endif | 21 | #endif |
21 | 22 | ||
22 | #endif | 23 | #endif |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 9d7921dd50f0..4830a3bedfb2 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -128,12 +128,11 @@ | |||
128 | 128 | ||
129 | #define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags) | 129 | #define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags) |
130 | #ifdef CONFIG_S390 | 130 | #ifdef CONFIG_S390 |
131 | #define SetPageUptodate(_page) \ | 131 | static inline void SetPageUptodate(struct page *page) |
132 | do { \ | 132 | { |
133 | struct page *__page = (_page); \ | 133 | if (!test_and_set_bit(PG_uptodate, &page->flags)) |
134 | if (!test_and_set_bit(PG_uptodate, &__page->flags)) \ | 134 | page_test_and_clear_dirty(page); |
135 | page_test_and_clear_dirty(_page); \ | 135 | } |
136 | } while (0) | ||
137 | #else | 136 | #else |
138 | #define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags) | 137 | #define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags) |
139 | #endif | 138 | #endif |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5c3a4176eb64..4431ce4e1e6f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -787,12 +787,13 @@ enum pci_fixup_pass { | |||
787 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); | 787 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); |
788 | 788 | ||
789 | extern int pci_pci_problems; | 789 | extern int pci_pci_problems; |
790 | #define PCIPCI_FAIL 1 | 790 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ |
791 | #define PCIPCI_TRITON 2 | 791 | #define PCIPCI_TRITON 2 |
792 | #define PCIPCI_NATOMA 4 | 792 | #define PCIPCI_NATOMA 4 |
793 | #define PCIPCI_VIAETBF 8 | 793 | #define PCIPCI_VIAETBF 8 |
794 | #define PCIPCI_VSFX 16 | 794 | #define PCIPCI_VSFX 16 |
795 | #define PCIPCI_ALIMAGIK 32 | 795 | #define PCIPCI_ALIMAGIK 32 /* Need low latency setting */ |
796 | #define PCIAGP_FAIL 64 /* No PCI to AGP DMA */ | ||
796 | 797 | ||
797 | #endif /* __KERNEL__ */ | 798 | #endif /* __KERNEL__ */ |
798 | #endif /* LINUX_PCI_H */ | 799 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ab032ceafa84..c9ffbc3843d5 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -479,6 +479,7 @@ | |||
479 | 479 | ||
480 | #define PCI_VENDOR_ID_AMD 0x1022 | 480 | #define PCI_VENDOR_ID_AMD 0x1022 |
481 | #define PCI_DEVICE_ID_AMD_K8_NB 0x1100 | 481 | #define PCI_DEVICE_ID_AMD_K8_NB 0x1100 |
482 | #define PCI_DEVICE_ID_AMD_K8_NB_MISC 0x1103 | ||
482 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 483 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
483 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 484 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
484 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 | 485 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 |
@@ -506,6 +507,7 @@ | |||
506 | #define PCI_DEVICE_ID_AMD_8151_0 0x7454 | 507 | #define PCI_DEVICE_ID_AMD_8151_0 0x7454 |
507 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 | 508 | #define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450 |
508 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 | 509 | #define PCI_DEVICE_ID_AMD_8131_APIC 0x7451 |
510 | #define PCI_DEVICE_ID_AMD_8132_BRIDGE 0x7458 | ||
509 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 | 511 | #define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090 |
510 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 | 512 | #define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091 |
511 | #define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093 | 513 | #define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093 |
@@ -1903,6 +1905,7 @@ | |||
1903 | #define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 | 1905 | #define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 |
1904 | #define PCI_DEVICE_ID_TIGON3_5720 0x1658 | 1906 | #define PCI_DEVICE_ID_TIGON3_5720 0x1658 |
1905 | #define PCI_DEVICE_ID_TIGON3_5721 0x1659 | 1907 | #define PCI_DEVICE_ID_TIGON3_5721 0x1659 |
1908 | #define PCI_DEVICE_ID_TIGON3_5722 0x165a | ||
1906 | #define PCI_DEVICE_ID_TIGON3_5705M 0x165d | 1909 | #define PCI_DEVICE_ID_TIGON3_5705M 0x165d |
1907 | #define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e | 1910 | #define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e |
1908 | #define PCI_DEVICE_ID_TIGON3_5714 0x1668 | 1911 | #define PCI_DEVICE_ID_TIGON3_5714 0x1668 |
@@ -1912,6 +1915,7 @@ | |||
1912 | #define PCI_DEVICE_ID_TIGON3_5705F 0x166e | 1915 | #define PCI_DEVICE_ID_TIGON3_5705F 0x166e |
1913 | #define PCI_DEVICE_ID_TIGON3_5754M 0x1672 | 1916 | #define PCI_DEVICE_ID_TIGON3_5754M 0x1672 |
1914 | #define PCI_DEVICE_ID_TIGON3_5755M 0x1673 | 1917 | #define PCI_DEVICE_ID_TIGON3_5755M 0x1673 |
1918 | #define PCI_DEVICE_ID_TIGON3_5756 0x1674 | ||
1915 | #define PCI_DEVICE_ID_TIGON3_5750 0x1676 | 1919 | #define PCI_DEVICE_ID_TIGON3_5750 0x1676 |
1916 | #define PCI_DEVICE_ID_TIGON3_5751 0x1677 | 1920 | #define PCI_DEVICE_ID_TIGON3_5751 0x1677 |
1917 | #define PCI_DEVICE_ID_TIGON3_5715 0x1678 | 1921 | #define PCI_DEVICE_ID_TIGON3_5715 0x1678 |
@@ -1941,6 +1945,8 @@ | |||
1941 | #define PCI_DEVICE_ID_TIGON3_5901 0x170d | 1945 | #define PCI_DEVICE_ID_TIGON3_5901 0x170d |
1942 | #define PCI_DEVICE_ID_BCM4401B1 0x170c | 1946 | #define PCI_DEVICE_ID_BCM4401B1 0x170c |
1943 | #define PCI_DEVICE_ID_TIGON3_5901_2 0x170e | 1947 | #define PCI_DEVICE_ID_TIGON3_5901_2 0x170e |
1948 | #define PCI_DEVICE_ID_TIGON3_5906 0x1712 | ||
1949 | #define PCI_DEVICE_ID_TIGON3_5906M 0x1713 | ||
1944 | #define PCI_DEVICE_ID_BCM4401 0x4401 | 1950 | #define PCI_DEVICE_ID_BCM4401 0x4401 |
1945 | #define PCI_DEVICE_ID_BCM4401B0 0x4402 | 1951 | #define PCI_DEVICE_ID_BCM4401B0 0x4402 |
1946 | 1952 | ||
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 3835a9642f13..46ec72fa2c84 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -74,7 +74,7 @@ static inline int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp, | |||
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | static inline void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask) | 77 | static __always_inline void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask) |
78 | { | 78 | { |
79 | return kzalloc(size, gfp); | 79 | return kzalloc(size, gfp); |
80 | } | 80 | } |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 95572c434bc9..a7dd38f30ade 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -72,6 +72,7 @@ struct k_clock { | |||
72 | int (*timer_create) (struct k_itimer *timer); | 72 | int (*timer_create) (struct k_itimer *timer); |
73 | int (*nsleep) (const clockid_t which_clock, int flags, | 73 | int (*nsleep) (const clockid_t which_clock, int flags, |
74 | struct timespec *, struct timespec __user *); | 74 | struct timespec *, struct timespec __user *); |
75 | long (*nsleep_restart) (struct restart_block *restart_block); | ||
75 | int (*timer_set) (struct k_itimer * timr, int flags, | 76 | int (*timer_set) (struct k_itimer * timr, int flags, |
76 | struct itimerspec * new_setting, | 77 | struct itimerspec * new_setting, |
77 | struct itimerspec * old_setting); | 78 | struct itimerspec * old_setting); |
@@ -97,6 +98,7 @@ int posix_cpu_clock_set(const clockid_t which_clock, const struct timespec *ts); | |||
97 | int posix_cpu_timer_create(struct k_itimer *timer); | 98 | int posix_cpu_timer_create(struct k_itimer *timer); |
98 | int posix_cpu_nsleep(const clockid_t which_clock, int flags, | 99 | int posix_cpu_nsleep(const clockid_t which_clock, int flags, |
99 | struct timespec *rqtp, struct timespec __user *rmtp); | 100 | struct timespec *rqtp, struct timespec __user *rmtp); |
101 | long posix_cpu_nsleep_restart(struct restart_block *restart_block); | ||
100 | int posix_cpu_timer_set(struct k_itimer *timer, int flags, | 102 | int posix_cpu_timer_set(struct k_itimer *timer, int flags, |
101 | struct itimerspec *new, struct itimerspec *old); | 103 | struct itimerspec *new, struct itimerspec *old); |
102 | int posix_cpu_timer_del(struct k_itimer *timer); | 104 | int posix_cpu_timer_del(struct k_itimer *timer); |
@@ -111,4 +113,6 @@ void posix_cpu_timers_exit_group(struct task_struct *task); | |||
111 | void set_process_cpu_timer(struct task_struct *task, unsigned int clock_idx, | 113 | void set_process_cpu_timer(struct task_struct *task, unsigned int clock_idx, |
112 | cputime_t *newval, cputime_t *oldval); | 114 | cputime_t *newval, cputime_t *oldval); |
113 | 115 | ||
116 | long clock_nanosleep_restart(struct restart_block *restart_block); | ||
117 | |||
114 | #endif | 118 | #endif |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 8b2749a259dc..eeb1976ef7bf 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -16,8 +16,8 @@ | |||
16 | #define PTRACE_KILL 8 | 16 | #define PTRACE_KILL 8 |
17 | #define PTRACE_SINGLESTEP 9 | 17 | #define PTRACE_SINGLESTEP 9 |
18 | 18 | ||
19 | #define PTRACE_ATTACH 0x10 | 19 | #define PTRACE_ATTACH 16 |
20 | #define PTRACE_DETACH 0x11 | 20 | #define PTRACE_DETACH 17 |
21 | 21 | ||
22 | #define PTRACE_SYSCALL 24 | 22 | #define PTRACE_SYSCALL 24 |
23 | 23 | ||
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index eb3e547c8fee..c588709acbbc 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
@@ -53,6 +53,8 @@ | |||
53 | #include <linux/raid/md_u.h> | 53 | #include <linux/raid/md_u.h> |
54 | #include <linux/raid/md_k.h> | 54 | #include <linux/raid/md_k.h> |
55 | 55 | ||
56 | #ifdef CONFIG_MD | ||
57 | |||
56 | /* | 58 | /* |
57 | * Different major versions are not compatible. | 59 | * Different major versions are not compatible. |
58 | * Different minor versions are only downward compatible. | 60 | * Different minor versions are only downward compatible. |
@@ -95,5 +97,6 @@ extern void md_new_event(mddev_t *mddev); | |||
95 | 97 | ||
96 | extern void md_update_sb(mddev_t * mddev); | 98 | extern void md_update_sb(mddev_t * mddev); |
97 | 99 | ||
100 | #endif /* CONFIG_MD */ | ||
98 | #endif | 101 | #endif |
99 | 102 | ||
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index d28890295852..920b94fe31fa 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -18,6 +18,8 @@ | |||
18 | /* and dm-bio-list.h is not under include/linux because.... ??? */ | 18 | /* and dm-bio-list.h is not under include/linux because.... ??? */ |
19 | #include "../../../drivers/md/dm-bio-list.h" | 19 | #include "../../../drivers/md/dm-bio-list.h" |
20 | 20 | ||
21 | #ifdef CONFIG_BLOCK | ||
22 | |||
21 | #define LEVEL_MULTIPATH (-4) | 23 | #define LEVEL_MULTIPATH (-4) |
22 | #define LEVEL_LINEAR (-1) | 24 | #define LEVEL_LINEAR (-1) |
23 | #define LEVEL_FAULTY (-5) | 25 | #define LEVEL_FAULTY (-5) |
@@ -362,5 +364,6 @@ static inline void safe_put_page(struct page *p) | |||
362 | if (p) put_page(p); | 364 | if (p) put_page(p); |
363 | } | 365 | } |
364 | 366 | ||
367 | #endif /* CONFIG_BLOCK */ | ||
365 | #endif | 368 | #endif |
366 | 369 | ||
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index 00b340ba6612..b160fb18e8d6 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
@@ -17,5 +17,6 @@ extern int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma); | |||
17 | 17 | ||
18 | extern const struct file_operations ramfs_file_operations; | 18 | extern const struct file_operations ramfs_file_operations; |
19 | extern struct vm_operations_struct generic_file_vm_ops; | 19 | extern struct vm_operations_struct generic_file_vm_ops; |
20 | extern int __init init_rootfs(void); | ||
20 | 21 | ||
21 | #endif | 22 | #endif |
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 8d5382e62c08..344bc3495ddb 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
@@ -133,7 +133,7 @@ static inline void rb_set_color(struct rb_node *rb, int color) | |||
133 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) | 133 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) |
134 | 134 | ||
135 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) | 135 | #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) |
136 | #define RB_EMPTY_NODE(node) (rb_parent(node) != node) | 136 | #define RB_EMPTY_NODE(node) (rb_parent(node) == node) |
137 | #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) | 137 | #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) |
138 | 138 | ||
139 | extern void rb_insert_color(struct rb_node *, struct rb_root *); | 139 | extern void rb_insert_color(struct rb_node *, struct rb_root *); |
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h index 806ec5b06707..fe00f781a622 100644 --- a/include/linux/reiserfs_acl.h +++ b/include/linux/reiserfs_acl.h | |||
@@ -56,6 +56,16 @@ extern int reiserfs_xattr_posix_acl_init(void) __init; | |||
56 | extern int reiserfs_xattr_posix_acl_exit(void); | 56 | extern int reiserfs_xattr_posix_acl_exit(void); |
57 | extern struct reiserfs_xattr_handler posix_acl_default_handler; | 57 | extern struct reiserfs_xattr_handler posix_acl_default_handler; |
58 | extern struct reiserfs_xattr_handler posix_acl_access_handler; | 58 | extern struct reiserfs_xattr_handler posix_acl_access_handler; |
59 | |||
60 | static inline void reiserfs_init_acl_access(struct inode *inode) | ||
61 | { | ||
62 | REISERFS_I(inode)->i_acl_access = NULL; | ||
63 | } | ||
64 | |||
65 | static inline void reiserfs_init_acl_default(struct inode *inode) | ||
66 | { | ||
67 | REISERFS_I(inode)->i_acl_default = NULL; | ||
68 | } | ||
59 | #else | 69 | #else |
60 | 70 | ||
61 | #define reiserfs_cache_default_acl(inode) 0 | 71 | #define reiserfs_cache_default_acl(inode) 0 |
@@ -87,4 +97,11 @@ reiserfs_inherit_default_acl(const struct inode *dir, struct dentry *dentry, | |||
87 | return 0; | 97 | return 0; |
88 | } | 98 | } |
89 | 99 | ||
100 | static inline void reiserfs_init_acl_access(struct inode *inode) | ||
101 | { | ||
102 | } | ||
103 | |||
104 | static inline void reiserfs_init_acl_default(struct inode *inode) | ||
105 | { | ||
106 | } | ||
90 | #endif | 107 | #endif |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 28493ffaafe7..7bc6bfb86253 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -807,21 +807,19 @@ struct stat_data_v1 { | |||
807 | #define set_sd_v1_first_direct_byte(sdp,v) \ | 807 | #define set_sd_v1_first_direct_byte(sdp,v) \ |
808 | ((sdp)->sd_first_direct_byte = cpu_to_le32(v)) | 808 | ((sdp)->sd_first_direct_byte = cpu_to_le32(v)) |
809 | 809 | ||
810 | #include <linux/ext2_fs.h> | ||
811 | |||
812 | /* inode flags stored in sd_attrs (nee sd_reserved) */ | 810 | /* inode flags stored in sd_attrs (nee sd_reserved) */ |
813 | 811 | ||
814 | /* we want common flags to have the same values as in ext2, | 812 | /* we want common flags to have the same values as in ext2, |
815 | so chattr(1) will work without problems */ | 813 | so chattr(1) will work without problems */ |
816 | #define REISERFS_IMMUTABLE_FL EXT2_IMMUTABLE_FL | 814 | #define REISERFS_IMMUTABLE_FL FS_IMMUTABLE_FL |
817 | #define REISERFS_APPEND_FL EXT2_APPEND_FL | 815 | #define REISERFS_APPEND_FL FS_APPEND_FL |
818 | #define REISERFS_SYNC_FL EXT2_SYNC_FL | 816 | #define REISERFS_SYNC_FL FS_SYNC_FL |
819 | #define REISERFS_NOATIME_FL EXT2_NOATIME_FL | 817 | #define REISERFS_NOATIME_FL FS_NOATIME_FL |
820 | #define REISERFS_NODUMP_FL EXT2_NODUMP_FL | 818 | #define REISERFS_NODUMP_FL FS_NODUMP_FL |
821 | #define REISERFS_SECRM_FL EXT2_SECRM_FL | 819 | #define REISERFS_SECRM_FL FS_SECRM_FL |
822 | #define REISERFS_UNRM_FL EXT2_UNRM_FL | 820 | #define REISERFS_UNRM_FL FS_UNRM_FL |
823 | #define REISERFS_COMPR_FL EXT2_COMPR_FL | 821 | #define REISERFS_COMPR_FL FS_COMPR_FL |
824 | #define REISERFS_NOTAIL_FL EXT2_NOTAIL_FL | 822 | #define REISERFS_NOTAIL_FL FS_NOTAIL_FL |
825 | 823 | ||
826 | /* persistent flags that file inherits from the parent directory */ | 824 | /* persistent flags that file inherits from the parent directory */ |
827 | #define REISERFS_INHERIT_MASK ( REISERFS_IMMUTABLE_FL | \ | 825 | #define REISERFS_INHERIT_MASK ( REISERFS_IMMUTABLE_FL | \ |
@@ -2075,6 +2073,10 @@ void reiserfs_init_alloc_options(struct super_block *s); | |||
2075 | */ | 2073 | */ |
2076 | __le32 reiserfs_choose_packing(struct inode *dir); | 2074 | __le32 reiserfs_choose_packing(struct inode *dir); |
2077 | 2075 | ||
2076 | int reiserfs_init_bitmap_cache(struct super_block *sb); | ||
2077 | void reiserfs_free_bitmap_cache(struct super_block *sb); | ||
2078 | void reiserfs_cache_bitmap_metadata(struct super_block *sb, struct buffer_head *bh, struct reiserfs_bitmap_info *info); | ||
2079 | struct buffer_head *reiserfs_read_bitmap_block(struct super_block *sb, unsigned int bitmap); | ||
2078 | int is_reusable(struct super_block *s, b_blocknr_t block, int bit_value); | 2080 | int is_reusable(struct super_block *s, b_blocknr_t block, int bit_value); |
2079 | void reiserfs_free_block(struct reiserfs_transaction_handle *th, struct inode *, | 2081 | void reiserfs_free_block(struct reiserfs_transaction_handle *th, struct inode *, |
2080 | b_blocknr_t, int for_unformatted); | 2082 | b_blocknr_t, int for_unformatted); |
@@ -2163,15 +2165,24 @@ __u32 r5_hash(const signed char *msg, int len); | |||
2163 | /* prototypes from ioctl.c */ | 2165 | /* prototypes from ioctl.c */ |
2164 | int reiserfs_ioctl(struct inode *inode, struct file *filp, | 2166 | int reiserfs_ioctl(struct inode *inode, struct file *filp, |
2165 | unsigned int cmd, unsigned long arg); | 2167 | unsigned int cmd, unsigned long arg); |
2168 | long reiserfs_compat_ioctl(struct file *filp, | ||
2169 | unsigned int cmd, unsigned long arg); | ||
2166 | 2170 | ||
2167 | /* ioctl's command */ | 2171 | /* ioctl's command */ |
2168 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) | 2172 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) |
2169 | /* define following flags to be the same as in ext2, so that chattr(1), | 2173 | /* define following flags to be the same as in ext2, so that chattr(1), |
2170 | lsattr(1) will work with us. */ | 2174 | lsattr(1) will work with us. */ |
2171 | #define REISERFS_IOC_GETFLAGS EXT2_IOC_GETFLAGS | 2175 | #define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS |
2172 | #define REISERFS_IOC_SETFLAGS EXT2_IOC_SETFLAGS | 2176 | #define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS |
2173 | #define REISERFS_IOC_GETVERSION EXT2_IOC_GETVERSION | 2177 | #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION |
2174 | #define REISERFS_IOC_SETVERSION EXT2_IOC_SETVERSION | 2178 | #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION |
2179 | |||
2180 | /* the 32 bit compat definitions with int argument */ | ||
2181 | #define REISERFS_IOC32_UNPACK _IOW(0xCD, 1, int) | ||
2182 | #define REISERFS_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
2183 | #define REISERFS_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
2184 | #define REISERFS_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
2185 | #define REISERFS_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
2175 | 2186 | ||
2176 | /* Locking primitives */ | 2187 | /* Locking primitives */ |
2177 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | 2188 | /* Right now we are still falling back to (un)lock_kernel, but eventually that |
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h index 149be8d9a0c9..5b3b297aa2c5 100644 --- a/include/linux/reiserfs_fs_i.h +++ b/include/linux/reiserfs_fs_i.h | |||
@@ -52,10 +52,13 @@ struct reiserfs_inode_info { | |||
52 | ** flushed */ | 52 | ** flushed */ |
53 | unsigned long i_trans_id; | 53 | unsigned long i_trans_id; |
54 | struct reiserfs_journal_list *i_jl; | 54 | struct reiserfs_journal_list *i_jl; |
55 | 55 | #ifdef CONFIG_REISERFS_FS_POSIX_ACL | |
56 | struct posix_acl *i_acl_access; | 56 | struct posix_acl *i_acl_access; |
57 | struct posix_acl *i_acl_default; | 57 | struct posix_acl *i_acl_default; |
58 | #endif | ||
59 | #ifdef CONFIG_REISERFS_FS_XATTR | ||
58 | struct rw_semaphore xattr_sem; | 60 | struct rw_semaphore xattr_sem; |
61 | #endif | ||
59 | struct inode vfs_inode; | 62 | struct inode vfs_inode; |
60 | }; | 63 | }; |
61 | 64 | ||
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 31b4c0bd4fa0..73e0becec086 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -267,7 +267,6 @@ struct reiserfs_bitmap_info { | |||
267 | // FIXME: Won't work with block sizes > 8K | 267 | // FIXME: Won't work with block sizes > 8K |
268 | __u16 first_zero_hint; | 268 | __u16 first_zero_hint; |
269 | __u16 free_count; | 269 | __u16 free_count; |
270 | struct buffer_head *bh; /* the actual bitmap */ | ||
271 | }; | 270 | }; |
272 | 271 | ||
273 | struct proc_dir_entry; | 272 | struct proc_dir_entry; |
@@ -414,6 +413,7 @@ struct reiserfs_sb_info { | |||
414 | /* Definitions of reiserfs on-disk properties: */ | 413 | /* Definitions of reiserfs on-disk properties: */ |
415 | #define REISERFS_3_5 0 | 414 | #define REISERFS_3_5 0 |
416 | #define REISERFS_3_6 1 | 415 | #define REISERFS_3_6 1 |
416 | #define REISERFS_OLD_FORMAT 2 | ||
417 | 417 | ||
418 | enum reiserfs_mount_options { | 418 | enum reiserfs_mount_options { |
419 | /* Mount options */ | 419 | /* Mount options */ |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 5e961035c725..966c35851b2e 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -97,6 +97,11 @@ static inline void reiserfs_mark_inode_private(struct inode *inode) | |||
97 | inode->i_flags |= S_PRIVATE; | 97 | inode->i_flags |= S_PRIVATE; |
98 | } | 98 | } |
99 | 99 | ||
100 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | ||
101 | { | ||
102 | init_rwsem(&REISERFS_I(inode)->xattr_sem); | ||
103 | } | ||
104 | |||
100 | #else | 105 | #else |
101 | 106 | ||
102 | #define is_reiserfs_priv_object(inode) 0 | 107 | #define is_reiserfs_priv_object(inode) 0 |
@@ -129,6 +134,9 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) | |||
129 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */ | 134 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL); /* to be sure */ |
130 | return 0; | 135 | return 0; |
131 | }; | 136 | }; |
137 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | ||
138 | { | ||
139 | } | ||
132 | #endif | 140 | #endif |
133 | 141 | ||
134 | #endif /* __KERNEL__ */ | 142 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 5371e4e74595..b89f09357054 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -141,7 +141,7 @@ struct rtc_device | |||
141 | int id; | 141 | int id; |
142 | char name[RTC_DEVICE_NAME_SIZE]; | 142 | char name[RTC_DEVICE_NAME_SIZE]; |
143 | 143 | ||
144 | struct rtc_class_ops *ops; | 144 | const struct rtc_class_ops *ops; |
145 | struct mutex ops_lock; | 145 | struct mutex ops_lock; |
146 | 146 | ||
147 | struct class_device *rtc_dev; | 147 | struct class_device *rtc_dev; |
@@ -172,7 +172,7 @@ struct rtc_device | |||
172 | 172 | ||
173 | extern struct rtc_device *rtc_device_register(const char *name, | 173 | extern struct rtc_device *rtc_device_register(const char *name, |
174 | struct device *dev, | 174 | struct device *dev, |
175 | struct rtc_class_ops *ops, | 175 | const struct rtc_class_ops *ops, |
176 | struct module *owner); | 176 | struct module *owner); |
177 | extern void rtc_device_unregister(struct rtc_device *rdev); | 177 | extern void rtc_device_unregister(struct rtc_device *rdev); |
178 | extern int rtc_interface_register(struct class_interface *intf); | 178 | extern int rtc_interface_register(struct class_interface *intf); |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 9c92dc8b9a08..3a18addaed4c 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __LINUX_RTNETLINK_H | 2 | #define __LINUX_RTNETLINK_H |
3 | 3 | ||
4 | #include <linux/netlink.h> | 4 | #include <linux/netlink.h> |
5 | #include <linux/if.h> | 5 | #include <linux/if_link.h> |
6 | 6 | ||
7 | /**** | 7 | /**** |
8 | * Routing/neighbour discovery messages. | 8 | * Routing/neighbour discovery messages. |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9d4aa7f95bc8..7ef899c47c29 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -148,6 +148,7 @@ extern unsigned long weighted_cpuload(const int cpu); | |||
148 | #define EXIT_DEAD 32 | 148 | #define EXIT_DEAD 32 |
149 | /* in tsk->state again */ | 149 | /* in tsk->state again */ |
150 | #define TASK_NONINTERACTIVE 64 | 150 | #define TASK_NONINTERACTIVE 64 |
151 | #define TASK_DEAD 128 | ||
151 | 152 | ||
152 | #define __set_task_state(tsk, state_value) \ | 153 | #define __set_task_state(tsk, state_value) \ |
153 | do { (tsk)->state = (state_value); } while (0) | 154 | do { (tsk)->state = (state_value); } while (0) |
@@ -504,8 +505,8 @@ struct signal_struct { | |||
504 | #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) | 505 | #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) |
505 | #define rt_task(p) rt_prio((p)->prio) | 506 | #define rt_task(p) rt_prio((p)->prio) |
506 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | 507 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) |
507 | #define has_rt_policy(p) \ | 508 | #define is_rt_policy(p) ((p) != SCHED_NORMAL && (p) != SCHED_BATCH) |
508 | unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH) | 509 | #define has_rt_policy(p) unlikely(is_rt_policy((p)->policy)) |
509 | 510 | ||
510 | /* | 511 | /* |
511 | * Some day this will be a full-fledged user tracking system.. | 512 | * Some day this will be a full-fledged user tracking system.. |
@@ -709,7 +710,6 @@ extern unsigned int max_cache_size; | |||
709 | 710 | ||
710 | 711 | ||
711 | struct io_context; /* See blkdev.h */ | 712 | struct io_context; /* See blkdev.h */ |
712 | void exit_io_context(void); | ||
713 | struct cpuset; | 713 | struct cpuset; |
714 | 714 | ||
715 | #define NGROUPS_SMALL 32 | 715 | #define NGROUPS_SMALL 32 |
@@ -784,8 +784,9 @@ struct task_struct { | |||
784 | struct prio_array *array; | 784 | struct prio_array *array; |
785 | 785 | ||
786 | unsigned short ioprio; | 786 | unsigned short ioprio; |
787 | #ifdef CONFIG_BLK_DEV_IO_TRACE | ||
787 | unsigned int btrace_seq; | 788 | unsigned int btrace_seq; |
788 | 789 | #endif | |
789 | unsigned long sleep_avg; | 790 | unsigned long sleep_avg; |
790 | unsigned long long timestamp, last_ran; | 791 | unsigned long long timestamp, last_ran; |
791 | unsigned long long sched_time; /* sched_clock time spent running */ | 792 | unsigned long long sched_time; /* sched_clock time spent running */ |
@@ -886,8 +887,10 @@ struct task_struct { | |||
886 | - initialized normally by flush_old_exec */ | 887 | - initialized normally by flush_old_exec */ |
887 | /* file system info */ | 888 | /* file system info */ |
888 | int link_count, total_link_count; | 889 | int link_count, total_link_count; |
890 | #ifdef CONFIG_SYSVIPC | ||
889 | /* ipc stuff */ | 891 | /* ipc stuff */ |
890 | struct sysv_sem sysvsem; | 892 | struct sysv_sem sysvsem; |
893 | #endif | ||
891 | /* CPU-specific state of this task */ | 894 | /* CPU-specific state of this task */ |
892 | struct thread_struct thread; | 895 | struct thread_struct thread; |
893 | /* filesystem information */ | 896 | /* filesystem information */ |
@@ -978,10 +981,10 @@ struct task_struct { | |||
978 | wait_queue_t *io_wait; | 981 | wait_queue_t *io_wait; |
979 | /* i/o counters(bytes read/written, #syscalls */ | 982 | /* i/o counters(bytes read/written, #syscalls */ |
980 | u64 rchar, wchar, syscr, syscw; | 983 | u64 rchar, wchar, syscr, syscw; |
981 | #if defined(CONFIG_BSD_PROCESS_ACCT) | 984 | #if defined(CONFIG_TASK_XACCT) |
982 | u64 acct_rss_mem1; /* accumulated rss usage */ | 985 | u64 acct_rss_mem1; /* accumulated rss usage */ |
983 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ | 986 | u64 acct_vm_mem1; /* accumulated virtual memory usage */ |
984 | clock_t acct_stimexpd; /* clock_t-converted stime since last update */ | 987 | cputime_t acct_stimexpd;/* stime since last update */ |
985 | #endif | 988 | #endif |
986 | #ifdef CONFIG_NUMA | 989 | #ifdef CONFIG_NUMA |
987 | struct mempolicy *mempolicy; | 990 | struct mempolicy *mempolicy; |
@@ -1030,6 +1033,16 @@ static inline int pid_alive(struct task_struct *p) | |||
1030 | return p->pids[PIDTYPE_PID].pid != NULL; | 1033 | return p->pids[PIDTYPE_PID].pid != NULL; |
1031 | } | 1034 | } |
1032 | 1035 | ||
1036 | /** | ||
1037 | * is_init - check if a task structure is the first user space | ||
1038 | * task the kernel created. | ||
1039 | * @p: Task structure to be checked. | ||
1040 | */ | ||
1041 | static inline int is_init(struct task_struct *tsk) | ||
1042 | { | ||
1043 | return tsk->pid == 1; | ||
1044 | } | ||
1045 | |||
1033 | extern void free_task(struct task_struct *tsk); | 1046 | extern void free_task(struct task_struct *tsk); |
1034 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 1047 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
1035 | 1048 | ||
@@ -1048,7 +1061,6 @@ static inline void put_task_struct(struct task_struct *t) | |||
1048 | /* Not implemented yet, only for 486*/ | 1061 | /* Not implemented yet, only for 486*/ |
1049 | #define PF_STARTING 0x00000002 /* being created */ | 1062 | #define PF_STARTING 0x00000002 /* being created */ |
1050 | #define PF_EXITING 0x00000004 /* getting shut down */ | 1063 | #define PF_EXITING 0x00000004 /* getting shut down */ |
1051 | #define PF_DEAD 0x00000008 /* Dead */ | ||
1052 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ | 1064 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ |
1053 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ | 1065 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ |
1054 | #define PF_DUMPCORE 0x00000200 /* dumped core */ | 1066 | #define PF_DUMPCORE 0x00000200 /* dumped core */ |
@@ -1193,7 +1205,7 @@ extern void switch_uid(struct user_struct *); | |||
1193 | 1205 | ||
1194 | #include <asm/current.h> | 1206 | #include <asm/current.h> |
1195 | 1207 | ||
1196 | extern void do_timer(struct pt_regs *); | 1208 | extern void do_timer(unsigned long ticks); |
1197 | 1209 | ||
1198 | extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state)); | 1210 | extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state)); |
1199 | extern int FASTCALL(wake_up_process(struct task_struct * tsk)); | 1211 | extern int FASTCALL(wake_up_process(struct task_struct * tsk)); |
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 90dd069cc145..1a82d30c4b17 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
@@ -4,6 +4,7 @@ u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); | |||
4 | 4 | ||
5 | extern unsigned scx200_gpio_base; | 5 | extern unsigned scx200_gpio_base; |
6 | extern long scx200_gpio_shadow[2]; | 6 | extern long scx200_gpio_shadow[2]; |
7 | extern struct nsc_gpio_ops scx200_gpio_ops; | ||
7 | 8 | ||
8 | #define scx200_gpio_present() (scx200_gpio_base!=0) | 9 | #define scx200_gpio_present() (scx200_gpio_base!=0) |
9 | 10 | ||
diff --git a/include/linux/security.h b/include/linux/security.h index 9f56fb8a4a6c..9b5fea81f55e 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1595,6 +1595,7 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd, | |||
1595 | 1595 | ||
1596 | static inline int security_inode_alloc (struct inode *inode) | 1596 | static inline int security_inode_alloc (struct inode *inode) |
1597 | { | 1597 | { |
1598 | inode->i_security = NULL; | ||
1598 | return security_ops->inode_alloc_security (inode); | 1599 | return security_ops->inode_alloc_security (inode); |
1599 | } | 1600 | } |
1600 | 1601 | ||
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index c057f0b32318..f3c51899117f 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h | |||
@@ -19,6 +19,10 @@ struct shmem_inode_info { | |||
19 | swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* first blocks */ | 19 | swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* first blocks */ |
20 | struct list_head swaplist; /* chain of maybes on swap */ | 20 | struct list_head swaplist; /* chain of maybes on swap */ |
21 | struct inode vfs_inode; | 21 | struct inode vfs_inode; |
22 | #ifdef CONFIG_TMPFS_POSIX_ACL | ||
23 | struct posix_acl *i_acl; | ||
24 | struct posix_acl *i_default_acl; | ||
25 | #endif | ||
22 | }; | 26 | }; |
23 | 27 | ||
24 | struct shmem_sb_info { | 28 | struct shmem_sb_info { |
@@ -36,4 +40,24 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) | |||
36 | return container_of(inode, struct shmem_inode_info, vfs_inode); | 40 | return container_of(inode, struct shmem_inode_info, vfs_inode); |
37 | } | 41 | } |
38 | 42 | ||
43 | #ifdef CONFIG_TMPFS_POSIX_ACL | ||
44 | int shmem_permission(struct inode *, int, struct nameidata *); | ||
45 | int shmem_acl_init(struct inode *, struct inode *); | ||
46 | void shmem_acl_destroy_inode(struct inode *); | ||
47 | |||
48 | extern struct xattr_handler shmem_xattr_acl_access_handler; | ||
49 | extern struct xattr_handler shmem_xattr_acl_default_handler; | ||
50 | |||
51 | extern struct generic_acl_operations shmem_acl_ops; | ||
52 | |||
53 | #else | ||
54 | static inline int shmem_acl_init(struct inode *inode, struct inode *dir) | ||
55 | { | ||
56 | return 0; | ||
57 | } | ||
58 | static inline void shmem_acl_destroy_inode(struct inode *inode) | ||
59 | { | ||
60 | } | ||
61 | #endif /* CONFIG_TMPFS_POSIX_ACL */ | ||
62 | |||
39 | #endif | 63 | #endif |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 31473db92d3b..b800d2d68b32 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -167,9 +167,9 @@ do { \ | |||
167 | * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various | 167 | * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various |
168 | * methods are defined as nops in the case they are not required. | 168 | * methods are defined as nops in the case they are not required. |
169 | */ | 169 | */ |
170 | #define spin_trylock(lock) __cond_lock(_spin_trylock(lock)) | 170 | #define spin_trylock(lock) __cond_lock(lock, _spin_trylock(lock)) |
171 | #define read_trylock(lock) __cond_lock(_read_trylock(lock)) | 171 | #define read_trylock(lock) __cond_lock(lock, _read_trylock(lock)) |
172 | #define write_trylock(lock) __cond_lock(_write_trylock(lock)) | 172 | #define write_trylock(lock) __cond_lock(lock, _write_trylock(lock)) |
173 | 173 | ||
174 | #define spin_lock(lock) _spin_lock(lock) | 174 | #define spin_lock(lock) _spin_lock(lock) |
175 | 175 | ||
@@ -236,19 +236,19 @@ do { \ | |||
236 | _write_unlock_irqrestore(lock, flags) | 236 | _write_unlock_irqrestore(lock, flags) |
237 | #define write_unlock_bh(lock) _write_unlock_bh(lock) | 237 | #define write_unlock_bh(lock) _write_unlock_bh(lock) |
238 | 238 | ||
239 | #define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock)) | 239 | #define spin_trylock_bh(lock) __cond_lock(lock, _spin_trylock_bh(lock)) |
240 | 240 | ||
241 | #define spin_trylock_irq(lock) \ | 241 | #define spin_trylock_irq(lock) \ |
242 | ({ \ | 242 | ({ \ |
243 | local_irq_disable(); \ | 243 | local_irq_disable(); \ |
244 | _spin_trylock(lock) ? \ | 244 | spin_trylock(lock) ? \ |
245 | 1 : ({ local_irq_enable(); 0; }); \ | 245 | 1 : ({ local_irq_enable(); 0; }); \ |
246 | }) | 246 | }) |
247 | 247 | ||
248 | #define spin_trylock_irqsave(lock, flags) \ | 248 | #define spin_trylock_irqsave(lock, flags) \ |
249 | ({ \ | 249 | ({ \ |
250 | local_irq_save(flags); \ | 250 | local_irq_save(flags); \ |
251 | _spin_trylock(lock) ? \ | 251 | spin_trylock(lock) ? \ |
252 | 1 : ({ local_irq_restore(flags); 0; }); \ | 252 | 1 : ({ local_irq_restore(flags); 0; }); \ |
253 | }) | 253 | }) |
254 | 254 | ||
@@ -264,7 +264,7 @@ do { \ | |||
264 | */ | 264 | */ |
265 | extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); | 265 | extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); |
266 | #define atomic_dec_and_lock(atomic, lock) \ | 266 | #define atomic_dec_and_lock(atomic, lock) \ |
267 | __cond_lock(_atomic_dec_and_lock(atomic, lock)) | 267 | __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) |
268 | 268 | ||
269 | /** | 269 | /** |
270 | * spin_can_lock - would spin_trylock() succeed? | 270 | * spin_can_lock - would spin_trylock() succeed? |
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h index b2c4f8299464..8828b8155e9c 100644 --- a/include/linux/spinlock_api_smp.h +++ b/include/linux/spinlock_api_smp.h | |||
@@ -19,41 +19,41 @@ int in_lock_functions(unsigned long addr); | |||
19 | 19 | ||
20 | #define assert_spin_locked(x) BUG_ON(!spin_is_locked(x)) | 20 | #define assert_spin_locked(x) BUG_ON(!spin_is_locked(x)) |
21 | 21 | ||
22 | void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t); | 22 | void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock); |
23 | void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) | 23 | void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) |
24 | __acquires(spinlock_t); | 24 | __acquires(lock); |
25 | void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t); | 25 | void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock); |
26 | void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t); | 26 | void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock); |
27 | void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t); | 27 | void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock); |
28 | void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(rwlock_t); | 28 | void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(lock); |
29 | void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(rwlock_t); | 29 | void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(lock); |
30 | void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(spinlock_t); | 30 | void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(lock); |
31 | void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(rwlock_t); | 31 | void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(lock); |
32 | void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(rwlock_t); | 32 | void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(lock); |
33 | unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) | 33 | unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) |
34 | __acquires(spinlock_t); | 34 | __acquires(lock); |
35 | unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) | 35 | unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) |
36 | __acquires(rwlock_t); | 36 | __acquires(lock); |
37 | unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) | 37 | unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) |
38 | __acquires(rwlock_t); | 38 | __acquires(lock); |
39 | int __lockfunc _spin_trylock(spinlock_t *lock); | 39 | int __lockfunc _spin_trylock(spinlock_t *lock); |
40 | int __lockfunc _read_trylock(rwlock_t *lock); | 40 | int __lockfunc _read_trylock(rwlock_t *lock); |
41 | int __lockfunc _write_trylock(rwlock_t *lock); | 41 | int __lockfunc _write_trylock(rwlock_t *lock); |
42 | int __lockfunc _spin_trylock_bh(spinlock_t *lock); | 42 | int __lockfunc _spin_trylock_bh(spinlock_t *lock); |
43 | void __lockfunc _spin_unlock(spinlock_t *lock) __releases(spinlock_t); | 43 | void __lockfunc _spin_unlock(spinlock_t *lock) __releases(lock); |
44 | void __lockfunc _read_unlock(rwlock_t *lock) __releases(rwlock_t); | 44 | void __lockfunc _read_unlock(rwlock_t *lock) __releases(lock); |
45 | void __lockfunc _write_unlock(rwlock_t *lock) __releases(rwlock_t); | 45 | void __lockfunc _write_unlock(rwlock_t *lock) __releases(lock); |
46 | void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(spinlock_t); | 46 | void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(lock); |
47 | void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(rwlock_t); | 47 | void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(lock); |
48 | void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(rwlock_t); | 48 | void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(lock); |
49 | void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(spinlock_t); | 49 | void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(lock); |
50 | void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(rwlock_t); | 50 | void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(lock); |
51 | void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(rwlock_t); | 51 | void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(lock); |
52 | void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) | 52 | void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) |
53 | __releases(spinlock_t); | 53 | __releases(lock); |
54 | void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) | 54 | void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) |
55 | __releases(rwlock_t); | 55 | __releases(lock); |
56 | void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) | 56 | void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) |
57 | __releases(rwlock_t); | 57 | __releases(lock); |
58 | 58 | ||
59 | #endif /* __LINUX_SPINLOCK_API_SMP_H */ | 59 | #endif /* __LINUX_SPINLOCK_API_SMP_H */ |
diff --git a/include/linux/stddef.h b/include/linux/stddef.h index ea65dfb60cd8..6a40c76bdcf1 100644 --- a/include/linux/stddef.h +++ b/include/linux/stddef.h | |||
@@ -11,6 +11,12 @@ | |||
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
14 | |||
15 | enum { | ||
16 | false = 0, | ||
17 | true = 1 | ||
18 | }; | ||
19 | |||
14 | #undef offsetof | 20 | #undef offsetof |
15 | #ifdef __compiler_offsetof | 21 | #ifdef __compiler_offsetof |
16 | #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) | 22 | #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) |
diff --git a/include/linux/string.h b/include/linux/string.h index e4c755860316..4f69ef9e6eb5 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -99,6 +99,7 @@ extern void * memchr(const void *,int,__kernel_size_t); | |||
99 | #endif | 99 | #endif |
100 | 100 | ||
101 | extern char *kstrdup(const char *s, gfp_t gfp); | 101 | extern char *kstrdup(const char *s, gfp_t gfp); |
102 | extern void *kmemdup(const void *src, size_t len, gfp_t gfp); | ||
102 | 103 | ||
103 | #ifdef __cplusplus | 104 | #ifdef __cplusplus |
104 | } | 105 | } |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index a6de332e57d4..862c0d8c8381 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -109,13 +109,13 @@ struct rpc_credops { | |||
109 | void (*crdestroy)(struct rpc_cred *); | 109 | void (*crdestroy)(struct rpc_cred *); |
110 | 110 | ||
111 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); | 111 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); |
112 | u32 * (*crmarshal)(struct rpc_task *, u32 *); | 112 | __be32 * (*crmarshal)(struct rpc_task *, __be32 *); |
113 | int (*crrefresh)(struct rpc_task *); | 113 | int (*crrefresh)(struct rpc_task *); |
114 | u32 * (*crvalidate)(struct rpc_task *, u32 *); | 114 | __be32 * (*crvalidate)(struct rpc_task *, __be32 *); |
115 | int (*crwrap_req)(struct rpc_task *, kxdrproc_t, | 115 | int (*crwrap_req)(struct rpc_task *, kxdrproc_t, |
116 | void *, u32 *, void *); | 116 | void *, __be32 *, void *); |
117 | int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t, | 117 | int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t, |
118 | void *, u32 *, void *); | 118 | void *, __be32 *, void *); |
119 | }; | 119 | }; |
120 | 120 | ||
121 | extern struct rpc_authops authunix_ops; | 121 | extern struct rpc_authops authunix_ops; |
@@ -134,10 +134,10 @@ struct rpc_cred * rpcauth_bindcred(struct rpc_task *); | |||
134 | void rpcauth_holdcred(struct rpc_task *); | 134 | void rpcauth_holdcred(struct rpc_task *); |
135 | void put_rpccred(struct rpc_cred *); | 135 | void put_rpccred(struct rpc_cred *); |
136 | void rpcauth_unbindcred(struct rpc_task *); | 136 | void rpcauth_unbindcred(struct rpc_task *); |
137 | u32 * rpcauth_marshcred(struct rpc_task *, u32 *); | 137 | __be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); |
138 | u32 * rpcauth_checkverf(struct rpc_task *, u32 *); | 138 | __be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); |
139 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, u32 *data, void *obj); | 139 | int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj); |
140 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, u32 *data, void *obj); | 140 | int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, __be32 *data, void *obj); |
141 | int rpcauth_refreshcred(struct rpc_task *); | 141 | int rpcauth_refreshcred(struct rpc_task *); |
142 | void rpcauth_invalcred(struct rpc_task *); | 142 | void rpcauth_invalcred(struct rpc_task *); |
143 | int rpcauth_uptodatecred(struct rpc_task *); | 143 | int rpcauth_uptodatecred(struct rpc_task *); |
diff --git a/include/linux/sunrpc/msg_prot.h b/include/linux/sunrpc/msg_prot.h index f43f237360ae..d9f5934ac9fe 100644 --- a/include/linux/sunrpc/msg_prot.h +++ b/include/linux/sunrpc/msg_prot.h | |||
@@ -95,7 +95,7 @@ enum rpc_auth_stat { | |||
95 | * 2GB. | 95 | * 2GB. |
96 | */ | 96 | */ |
97 | 97 | ||
98 | typedef u32 rpc_fraghdr; | 98 | typedef __be32 rpc_fraghdr; |
99 | 99 | ||
100 | #define RPC_LAST_STREAM_FRAGMENT (1U << 31) | 100 | #define RPC_LAST_STREAM_FRAGMENT (1U << 31) |
101 | #define RPC_FRAGMENT_SIZE_MASK (~RPC_LAST_STREAM_FRAGMENT) | 101 | #define RPC_FRAGMENT_SIZE_MASK (~RPC_LAST_STREAM_FRAGMENT) |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 7b27c09b5604..73140ee5c638 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -78,28 +78,45 @@ struct svc_serv { | |||
78 | */ | 78 | */ |
79 | #define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 2) | 79 | #define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 2) |
80 | 80 | ||
81 | static inline u32 svc_getu32(struct kvec *iov) | 81 | static inline u32 svc_getnl(struct kvec *iov) |
82 | { | 82 | { |
83 | u32 val, *vp; | 83 | __be32 val, *vp; |
84 | vp = iov->iov_base; | 84 | vp = iov->iov_base; |
85 | val = *vp++; | 85 | val = *vp++; |
86 | iov->iov_base = (void*)vp; | 86 | iov->iov_base = (void*)vp; |
87 | iov->iov_len -= sizeof(u32); | 87 | iov->iov_len -= sizeof(__be32); |
88 | return ntohl(val); | ||
89 | } | ||
90 | |||
91 | static inline void svc_putnl(struct kvec *iov, u32 val) | ||
92 | { | ||
93 | __be32 *vp = iov->iov_base + iov->iov_len; | ||
94 | *vp = htonl(val); | ||
95 | iov->iov_len += sizeof(__be32); | ||
96 | } | ||
97 | |||
98 | static inline __be32 svc_getu32(struct kvec *iov) | ||
99 | { | ||
100 | __be32 val, *vp; | ||
101 | vp = iov->iov_base; | ||
102 | val = *vp++; | ||
103 | iov->iov_base = (void*)vp; | ||
104 | iov->iov_len -= sizeof(__be32); | ||
88 | return val; | 105 | return val; |
89 | } | 106 | } |
90 | 107 | ||
91 | static inline void svc_ungetu32(struct kvec *iov) | 108 | static inline void svc_ungetu32(struct kvec *iov) |
92 | { | 109 | { |
93 | u32 *vp = (u32 *)iov->iov_base; | 110 | __be32 *vp = (__be32 *)iov->iov_base; |
94 | iov->iov_base = (void *)(vp - 1); | 111 | iov->iov_base = (void *)(vp - 1); |
95 | iov->iov_len += sizeof(*vp); | 112 | iov->iov_len += sizeof(*vp); |
96 | } | 113 | } |
97 | 114 | ||
98 | static inline void svc_putu32(struct kvec *iov, u32 val) | 115 | static inline void svc_putu32(struct kvec *iov, __be32 val) |
99 | { | 116 | { |
100 | u32 *vp = iov->iov_base + iov->iov_len; | 117 | __be32 *vp = iov->iov_base + iov->iov_len; |
101 | *vp = val; | 118 | *vp = val; |
102 | iov->iov_len += sizeof(u32); | 119 | iov->iov_len += sizeof(__be32); |
103 | } | 120 | } |
104 | 121 | ||
105 | 122 | ||
@@ -130,7 +147,7 @@ struct svc_rqst { | |||
130 | short rq_arghi; /* pages available in argument page list */ | 147 | short rq_arghi; /* pages available in argument page list */ |
131 | short rq_resused; /* pages used for result */ | 148 | short rq_resused; /* pages used for result */ |
132 | 149 | ||
133 | u32 rq_xid; /* transmission id */ | 150 | __be32 rq_xid; /* transmission id */ |
134 | u32 rq_prog; /* program number */ | 151 | u32 rq_prog; /* program number */ |
135 | u32 rq_vers; /* program version */ | 152 | u32 rq_vers; /* program version */ |
136 | u32 rq_proc; /* procedure number */ | 153 | u32 rq_proc; /* procedure number */ |
@@ -139,7 +156,7 @@ struct svc_rqst { | |||
139 | rq_secure : 1; /* secure port */ | 156 | rq_secure : 1; /* secure port */ |
140 | 157 | ||
141 | 158 | ||
142 | __u32 rq_daddr; /* dest addr of request - reply from here */ | 159 | __be32 rq_daddr; /* dest addr of request - reply from here */ |
143 | 160 | ||
144 | void * rq_argp; /* decoded arguments */ | 161 | void * rq_argp; /* decoded arguments */ |
145 | void * rq_resp; /* xdr'd results */ | 162 | void * rq_resp; /* xdr'd results */ |
@@ -169,7 +186,7 @@ struct svc_rqst { | |||
169 | * Check buffer bounds after decoding arguments | 186 | * Check buffer bounds after decoding arguments |
170 | */ | 187 | */ |
171 | static inline int | 188 | static inline int |
172 | xdr_argsize_check(struct svc_rqst *rqstp, u32 *p) | 189 | xdr_argsize_check(struct svc_rqst *rqstp, __be32 *p) |
173 | { | 190 | { |
174 | char *cp = (char *)p; | 191 | char *cp = (char *)p; |
175 | struct kvec *vec = &rqstp->rq_arg.head[0]; | 192 | struct kvec *vec = &rqstp->rq_arg.head[0]; |
@@ -178,7 +195,7 @@ xdr_argsize_check(struct svc_rqst *rqstp, u32 *p) | |||
178 | } | 195 | } |
179 | 196 | ||
180 | static inline int | 197 | static inline int |
181 | xdr_ressize_check(struct svc_rqst *rqstp, u32 *p) | 198 | xdr_ressize_check(struct svc_rqst *rqstp, __be32 *p) |
182 | { | 199 | { |
183 | struct kvec *vec = &rqstp->rq_res.head[0]; | 200 | struct kvec *vec = &rqstp->rq_res.head[0]; |
184 | char *cp = (char*)p; | 201 | char *cp = (char*)p; |
@@ -249,10 +266,10 @@ struct svc_deferred_req { | |||
249 | u32 prot; /* protocol (UDP or TCP) */ | 266 | u32 prot; /* protocol (UDP or TCP) */ |
250 | struct sockaddr_in addr; | 267 | struct sockaddr_in addr; |
251 | struct svc_sock *svsk; /* where reply must go */ | 268 | struct svc_sock *svsk; /* where reply must go */ |
252 | u32 daddr; /* where reply must come from */ | 269 | __be32 daddr; /* where reply must come from */ |
253 | struct cache_deferred_req handle; | 270 | struct cache_deferred_req handle; |
254 | int argslen; | 271 | int argslen; |
255 | u32 args[0]; | 272 | __be32 args[0]; |
256 | }; | 273 | }; |
257 | 274 | ||
258 | /* | 275 | /* |
@@ -284,7 +301,7 @@ struct svc_version { | |||
284 | * A return value of 0 means drop the request. | 301 | * A return value of 0 means drop the request. |
285 | * vs_dispatch == NULL means use default dispatcher. | 302 | * vs_dispatch == NULL means use default dispatcher. |
286 | */ | 303 | */ |
287 | int (*vs_dispatch)(struct svc_rqst *, u32 *); | 304 | int (*vs_dispatch)(struct svc_rqst *, __be32 *); |
288 | }; | 305 | }; |
289 | 306 | ||
290 | /* | 307 | /* |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 2fe2087edd66..a6601650deeb 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -95,7 +95,7 @@ struct auth_ops { | |||
95 | char * name; | 95 | char * name; |
96 | struct module *owner; | 96 | struct module *owner; |
97 | int flavour; | 97 | int flavour; |
98 | int (*accept)(struct svc_rqst *rq, u32 *authp); | 98 | int (*accept)(struct svc_rqst *rq, __be32 *authp); |
99 | int (*release)(struct svc_rqst *rq); | 99 | int (*release)(struct svc_rqst *rq); |
100 | void (*domain_release)(struct auth_domain *); | 100 | void (*domain_release)(struct auth_domain *); |
101 | int (*set_client)(struct svc_rqst *rq); | 101 | int (*set_client)(struct svc_rqst *rq); |
@@ -112,7 +112,7 @@ struct auth_ops { | |||
112 | #define SVC_COMPLETE 9 | 112 | #define SVC_COMPLETE 9 |
113 | 113 | ||
114 | 114 | ||
115 | extern int svc_authenticate(struct svc_rqst *rqstp, u32 *authp); | 115 | extern int svc_authenticate(struct svc_rqst *rqstp, __be32 *authp); |
116 | extern int svc_authorise(struct svc_rqst *rqstp); | 116 | extern int svc_authorise(struct svc_rqst *rqstp); |
117 | extern int svc_set_client(struct svc_rqst *rqstp); | 117 | extern int svc_set_client(struct svc_rqst *rqstp); |
118 | extern int svc_auth_register(rpc_authflavor_t flavor, struct auth_ops *aops); | 118 | extern int svc_auth_register(rpc_authflavor_t flavor, struct auth_ops *aops); |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index e6d3d349506c..953723b09bc6 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -32,7 +32,7 @@ struct xdr_netobj { | |||
32 | * side) or svc_rqst pointer (server side). | 32 | * side) or svc_rqst pointer (server side). |
33 | * Encode functions always assume there's enough room in the buffer. | 33 | * Encode functions always assume there's enough room in the buffer. |
34 | */ | 34 | */ |
35 | typedef int (*kxdrproc_t)(void *rqstp, u32 *data, void *obj); | 35 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Basic structure for transmission/reception of a client XDR message. | 38 | * Basic structure for transmission/reception of a client XDR message. |
@@ -88,19 +88,19 @@ struct xdr_buf { | |||
88 | /* | 88 | /* |
89 | * Miscellaneous XDR helper functions | 89 | * Miscellaneous XDR helper functions |
90 | */ | 90 | */ |
91 | u32 * xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len); | 91 | __be32 *xdr_encode_opaque_fixed(__be32 *p, const void *ptr, unsigned int len); |
92 | u32 * xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len); | 92 | __be32 *xdr_encode_opaque(__be32 *p, const void *ptr, unsigned int len); |
93 | u32 * xdr_encode_string(u32 *p, const char *s); | 93 | __be32 *xdr_encode_string(__be32 *p, const char *s); |
94 | u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen); | 94 | __be32 *xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen); |
95 | u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *); | 95 | __be32 *xdr_encode_netobj(__be32 *p, const struct xdr_netobj *); |
96 | u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *); | 96 | __be32 *xdr_decode_netobj(__be32 *p, struct xdr_netobj *); |
97 | 97 | ||
98 | void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int, | 98 | void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int, |
99 | unsigned int); | 99 | unsigned int); |
100 | void xdr_inline_pages(struct xdr_buf *, unsigned int, | 100 | void xdr_inline_pages(struct xdr_buf *, unsigned int, |
101 | struct page **, unsigned int, unsigned int); | 101 | struct page **, unsigned int, unsigned int); |
102 | 102 | ||
103 | static inline u32 *xdr_encode_array(u32 *p, const void *s, unsigned int len) | 103 | static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int len) |
104 | { | 104 | { |
105 | return xdr_encode_opaque(p, s, len); | 105 | return xdr_encode_opaque(p, s, len); |
106 | } | 106 | } |
@@ -108,16 +108,16 @@ static inline u32 *xdr_encode_array(u32 *p, const void *s, unsigned int len) | |||
108 | /* | 108 | /* |
109 | * Decode 64bit quantities (NFSv3 support) | 109 | * Decode 64bit quantities (NFSv3 support) |
110 | */ | 110 | */ |
111 | static inline u32 * | 111 | static inline __be32 * |
112 | xdr_encode_hyper(u32 *p, __u64 val) | 112 | xdr_encode_hyper(__be32 *p, __u64 val) |
113 | { | 113 | { |
114 | *p++ = htonl(val >> 32); | 114 | *p++ = htonl(val >> 32); |
115 | *p++ = htonl(val & 0xFFFFFFFF); | 115 | *p++ = htonl(val & 0xFFFFFFFF); |
116 | return p; | 116 | return p; |
117 | } | 117 | } |
118 | 118 | ||
119 | static inline u32 * | 119 | static inline __be32 * |
120 | xdr_decode_hyper(u32 *p, __u64 *valp) | 120 | xdr_decode_hyper(__be32 *p, __u64 *valp) |
121 | { | 121 | { |
122 | *valp = ((__u64) ntohl(*p++)) << 32; | 122 | *valp = ((__u64) ntohl(*p++)) << 32; |
123 | *valp |= ntohl(*p++); | 123 | *valp |= ntohl(*p++); |
@@ -128,7 +128,7 @@ xdr_decode_hyper(u32 *p, __u64 *valp) | |||
128 | * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) | 128 | * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) |
129 | */ | 129 | */ |
130 | static inline int | 130 | static inline int |
131 | xdr_adjust_iovec(struct kvec *iov, u32 *p) | 131 | xdr_adjust_iovec(struct kvec *iov, __be32 *p) |
132 | { | 132 | { |
133 | return iov->iov_len = ((u8 *) p - (u8 *) iov->iov_base); | 133 | return iov->iov_len = ((u8 *) p - (u8 *) iov->iov_base); |
134 | } | 134 | } |
@@ -180,19 +180,19 @@ extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base, | |||
180 | * Provide some simple tools for XDR buffer overflow-checking etc. | 180 | * Provide some simple tools for XDR buffer overflow-checking etc. |
181 | */ | 181 | */ |
182 | struct xdr_stream { | 182 | struct xdr_stream { |
183 | uint32_t *p; /* start of available buffer */ | 183 | __be32 *p; /* start of available buffer */ |
184 | struct xdr_buf *buf; /* XDR buffer to read/write */ | 184 | struct xdr_buf *buf; /* XDR buffer to read/write */ |
185 | 185 | ||
186 | uint32_t *end; /* end of available buffer space */ | 186 | __be32 *end; /* end of available buffer space */ |
187 | struct kvec *iov; /* pointer to the current kvec */ | 187 | struct kvec *iov; /* pointer to the current kvec */ |
188 | }; | 188 | }; |
189 | 189 | ||
190 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p); | 190 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
191 | extern uint32_t *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | 191 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); |
192 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 192 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
193 | unsigned int base, unsigned int len); | 193 | unsigned int base, unsigned int len); |
194 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p); | 194 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
195 | extern uint32_t *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 195 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
196 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 196 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
197 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 197 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |
198 | 198 | ||
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index bdeba8538c71..6cf626580752 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -79,7 +79,7 @@ struct rpc_rqst { | |||
79 | * This is the private part | 79 | * This is the private part |
80 | */ | 80 | */ |
81 | struct rpc_task * rq_task; /* RPC task data */ | 81 | struct rpc_task * rq_task; /* RPC task data */ |
82 | __u32 rq_xid; /* request XID */ | 82 | __be32 rq_xid; /* request XID */ |
83 | int rq_cong; /* has incremented xprt->cong */ | 83 | int rq_cong; /* has incremented xprt->cong */ |
84 | int rq_received; /* receive completed */ | 84 | int rq_received; /* receive completed */ |
85 | u32 rq_seqno; /* gss seq no. used on req. */ | 85 | u32 rq_seqno; /* gss seq no. used on req. */ |
@@ -171,9 +171,9 @@ struct rpc_xprt { | |||
171 | /* | 171 | /* |
172 | * State of TCP reply receive stuff | 172 | * State of TCP reply receive stuff |
173 | */ | 173 | */ |
174 | u32 tcp_recm, /* Fragment header */ | 174 | __be32 tcp_recm, /* Fragment header */ |
175 | tcp_xid, /* Current XID */ | 175 | tcp_xid; /* Current XID */ |
176 | tcp_reclen, /* fragment length */ | 176 | u32 tcp_reclen, /* fragment length */ |
177 | tcp_offset; /* fragment offset */ | 177 | tcp_offset; /* fragment offset */ |
178 | unsigned long tcp_copied, /* copied to request */ | 178 | unsigned long tcp_copied, /* copied to request */ |
179 | tcp_flags; | 179 | tcp_flags; |
@@ -253,7 +253,7 @@ void xprt_release(struct rpc_task *task); | |||
253 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); | 253 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); |
254 | void xprt_put(struct rpc_xprt *xprt); | 254 | void xprt_put(struct rpc_xprt *xprt); |
255 | 255 | ||
256 | static inline u32 *xprt_skip_transport_header(struct rpc_xprt *xprt, u32 *p) | 256 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) |
257 | { | 257 | { |
258 | return p + xprt->tsh_size; | 258 | return p + xprt->tsh_size; |
259 | } | 259 | } |
@@ -268,7 +268,7 @@ void xprt_wait_for_buffer_space(struct rpc_task *task); | |||
268 | void xprt_write_space(struct rpc_xprt *xprt); | 268 | void xprt_write_space(struct rpc_xprt *xprt); |
269 | void xprt_update_rtt(struct rpc_task *task); | 269 | void xprt_update_rtt(struct rpc_task *task); |
270 | void xprt_adjust_cwnd(struct rpc_task *task, int result); | 270 | void xprt_adjust_cwnd(struct rpc_task *task, int result); |
271 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, u32 xid); | 271 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid); |
272 | void xprt_complete_rqst(struct rpc_task *task, int copied); | 272 | void xprt_complete_rqst(struct rpc_task *task, int copied); |
273 | void xprt_release_rqst_cong(struct rpc_task *task); | 273 | void xprt_release_rqst_cong(struct rpc_task *task); |
274 | void xprt_disconnect(struct rpc_xprt *xprt); | 274 | void xprt_disconnect(struct rpc_xprt *xprt); |
diff --git a/include/linux/synclink.h b/include/linux/synclink.h index 0577f5284cbc..c8b042667af1 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SyncLink Multiprotocol Serial Adapter Driver | 2 | * SyncLink Multiprotocol Serial Adapter Driver |
3 | * | 3 | * |
4 | * $Id: synclink.h,v 3.13 2006/05/23 18:25:06 paulkf Exp $ | 4 | * $Id: synclink.h,v 3.14 2006/07/17 20:15:43 paulkf Exp $ |
5 | * | 5 | * |
6 | * Copyright (C) 1998-2000 by Microgate Corporation | 6 | * Copyright (C) 1998-2000 by Microgate Corporation |
7 | * | 7 | * |
@@ -124,6 +124,8 @@ | |||
124 | 124 | ||
125 | #define MGSL_MODE_ASYNC 1 | 125 | #define MGSL_MODE_ASYNC 1 |
126 | #define MGSL_MODE_HDLC 2 | 126 | #define MGSL_MODE_HDLC 2 |
127 | #define MGSL_MODE_MONOSYNC 3 | ||
128 | #define MGSL_MODE_BISYNC 4 | ||
127 | #define MGSL_MODE_RAW 6 | 129 | #define MGSL_MODE_RAW 6 |
128 | 130 | ||
129 | #define MGSL_BUS_TYPE_ISA 1 | 131 | #define MGSL_BUS_TYPE_ISA 1 |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 3f0f716225ec..2d1c3d5c83ac 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -597,6 +597,6 @@ asmlinkage long sys_get_robust_list(int pid, | |||
597 | size_t __user *len_ptr); | 597 | size_t __user *len_ptr); |
598 | asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, | 598 | asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, |
599 | size_t len); | 599 | size_t len); |
600 | asmlinkage long sys_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *cache); | 600 | asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache); |
601 | 601 | ||
602 | #endif | 602 | #endif |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 4812ff60561c..e657e523b9bf 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -11,6 +11,8 @@ | |||
11 | * based upon discusions in irc://irc.openprojects.net/#kernelnewbies | 11 | * based upon discusions in irc://irc.openprojects.net/#kernelnewbies |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifndef _LINUX_SYSRQ_H | ||
15 | #define _LINUX_SYSRQ_H | ||
14 | 16 | ||
15 | struct pt_regs; | 17 | struct pt_regs; |
16 | struct tty_struct; | 18 | struct tty_struct; |
@@ -57,3 +59,5 @@ static inline int __reterr(void) | |||
57 | #define unregister_sysrq_key(ig,nore) __reterr() | 59 | #define unregister_sysrq_key(ig,nore) __reterr() |
58 | 60 | ||
59 | #endif | 61 | #endif |
62 | |||
63 | #endif /* _LINUX_SYSRQ_H */ | ||
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index f1cb6cddd19d..45248806ae9c 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
@@ -2,6 +2,7 @@ | |||
2 | * | 2 | * |
3 | * Copyright (C) Shailabh Nagar, IBM Corp. 2006 | 3 | * Copyright (C) Shailabh Nagar, IBM Corp. 2006 |
4 | * (C) Balbir Singh, IBM Corp. 2006 | 4 | * (C) Balbir Singh, IBM Corp. 2006 |
5 | * (C) Jay Lan, SGI, 2006 | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of version 2.1 of the GNU Lesser General Public License | 8 | * under the terms of version 2.1 of the GNU Lesser General Public License |
@@ -29,16 +30,25 @@ | |||
29 | * c) add new fields after version comment; maintain 64-bit alignment | 30 | * c) add new fields after version comment; maintain 64-bit alignment |
30 | */ | 31 | */ |
31 | 32 | ||
32 | #define TASKSTATS_VERSION 1 | 33 | |
34 | #define TASKSTATS_VERSION 2 | ||
35 | #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN | ||
36 | * in linux/sched.h */ | ||
33 | 37 | ||
34 | struct taskstats { | 38 | struct taskstats { |
35 | 39 | ||
36 | /* Version 1 */ | 40 | /* The version number of this struct. This field is always set to |
41 | * TAKSTATS_VERSION, which is defined in <linux/taskstats.h>. | ||
42 | * Each time the struct is changed, the value should be incremented. | ||
43 | */ | ||
37 | __u16 version; | 44 | __u16 version; |
38 | __u16 padding[3]; /* Userspace should not interpret the padding | 45 | __u32 ac_exitcode; /* Exit status */ |
39 | * field which can be replaced by useful | 46 | |
40 | * fields if struct taskstats is extended. | 47 | /* The accounting flags of a task as defined in <linux/acct.h> |
41 | */ | 48 | * Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG. |
49 | */ | ||
50 | __u8 ac_flag; /* Record flags */ | ||
51 | __u8 ac_nice; /* task_nice */ | ||
42 | 52 | ||
43 | /* Delay accounting fields start | 53 | /* Delay accounting fields start |
44 | * | 54 | * |
@@ -88,6 +98,48 @@ struct taskstats { | |||
88 | __u64 cpu_run_virtual_total; | 98 | __u64 cpu_run_virtual_total; |
89 | /* Delay accounting fields end */ | 99 | /* Delay accounting fields end */ |
90 | /* version 1 ends here */ | 100 | /* version 1 ends here */ |
101 | |||
102 | /* Basic Accounting Fields start */ | ||
103 | char ac_comm[TS_COMM_LEN]; /* Command name */ | ||
104 | __u8 ac_sched; /* Scheduling discipline */ | ||
105 | __u8 ac_pad[3]; | ||
106 | __u32 ac_uid; /* User ID */ | ||
107 | __u32 ac_gid; /* Group ID */ | ||
108 | __u32 ac_pid; /* Process ID */ | ||
109 | __u32 ac_ppid; /* Parent process ID */ | ||
110 | __u32 ac_btime; /* Begin time [sec since 1970] */ | ||
111 | __u64 ac_etime; /* Elapsed time [usec] */ | ||
112 | __u64 ac_utime; /* User CPU time [usec] */ | ||
113 | __u64 ac_stime; /* SYstem CPU time [usec] */ | ||
114 | __u64 ac_minflt; /* Minor Page Fault Count */ | ||
115 | __u64 ac_majflt; /* Major Page Fault Count */ | ||
116 | /* Basic Accounting Fields end */ | ||
117 | |||
118 | /* Extended accounting fields start */ | ||
119 | /* Accumulated RSS usage in duration of a task, in MBytes-usecs. | ||
120 | * The current rss usage is added to this counter every time | ||
121 | * a tick is charged to a task's system time. So, at the end we | ||
122 | * will have memory usage multiplied by system time. Thus an | ||
123 | * average usage per system time unit can be calculated. | ||
124 | */ | ||
125 | __u64 coremem; /* accumulated RSS usage in MB-usec */ | ||
126 | /* Accumulated virtual memory usage in duration of a task. | ||
127 | * Same as acct_rss_mem1 above except that we keep track of VM usage. | ||
128 | */ | ||
129 | __u64 virtmem; /* accumulated VM usage in MB-usec */ | ||
130 | |||
131 | /* High watermark of RSS and virtual memory usage in duration of | ||
132 | * a task, in KBytes. | ||
133 | */ | ||
134 | __u64 hiwater_rss; /* High-watermark of RSS usage, in KB */ | ||
135 | __u64 hiwater_vm; /* High-water VM usage, in KB */ | ||
136 | |||
137 | /* The following four fields are I/O statistics of a task. */ | ||
138 | __u64 read_char; /* bytes read */ | ||
139 | __u64 write_char; /* bytes written */ | ||
140 | __u64 read_syscalls; /* read syscalls */ | ||
141 | __u64 write_syscalls; /* write syscalls */ | ||
142 | /* Extended accounting fields end */ | ||
91 | }; | 143 | }; |
92 | 144 | ||
93 | 145 | ||
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 8ebf497907f8..0e058a2d1c6d 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -21,10 +21,10 @@ | |||
21 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
22 | 22 | ||
23 | struct tcphdr { | 23 | struct tcphdr { |
24 | __u16 source; | 24 | __be16 source; |
25 | __u16 dest; | 25 | __be16 dest; |
26 | __u32 seq; | 26 | __be32 seq; |
27 | __u32 ack_seq; | 27 | __be32 ack_seq; |
28 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 28 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
29 | __u16 res1:4, | 29 | __u16 res1:4, |
30 | doff:4, | 30 | doff:4, |
@@ -50,9 +50,9 @@ struct tcphdr { | |||
50 | #else | 50 | #else |
51 | #error "Adjust your <asm/byteorder.h> defines" | 51 | #error "Adjust your <asm/byteorder.h> defines" |
52 | #endif | 52 | #endif |
53 | __u16 window; | 53 | __be16 window; |
54 | __u16 check; | 54 | __be16 check; |
55 | __u16 urg_ptr; | 55 | __be16 urg_ptr; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | /* | 58 | /* |
@@ -62,7 +62,7 @@ struct tcphdr { | |||
62 | */ | 62 | */ |
63 | union tcp_word_hdr { | 63 | union tcp_word_hdr { |
64 | struct tcphdr hdr; | 64 | struct tcphdr hdr; |
65 | __u32 words[5]; | 65 | __be32 words[5]; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) | 68 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) |
@@ -166,6 +166,11 @@ struct tcp_info | |||
166 | #include <net/inet_timewait_sock.h> | 166 | #include <net/inet_timewait_sock.h> |
167 | 167 | ||
168 | /* This defines a selective acknowledgement block. */ | 168 | /* This defines a selective acknowledgement block. */ |
169 | struct tcp_sack_block_wire { | ||
170 | __be32 start_seq; | ||
171 | __be32 end_seq; | ||
172 | }; | ||
173 | |||
169 | struct tcp_sack_block { | 174 | struct tcp_sack_block { |
170 | __u32 start_seq; | 175 | __u32 start_seq; |
171 | __u32 end_seq; | 176 | __u32 end_seq; |
@@ -211,7 +216,7 @@ struct tcp_sock { | |||
211 | * Header prediction flags | 216 | * Header prediction flags |
212 | * 0x5?10 << 16 + snd_wnd in net byte order | 217 | * 0x5?10 << 16 + snd_wnd in net byte order |
213 | */ | 218 | */ |
214 | __u32 pred_flags; | 219 | __be32 pred_flags; |
215 | 220 | ||
216 | /* | 221 | /* |
217 | * RFC793 variables by their proper names. This means you can | 222 | * RFC793 variables by their proper names. This means you can |
diff --git a/include/linux/timex.h b/include/linux/timex.h index d543d3871e38..049dfe4a11f2 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -69,34 +69,28 @@ | |||
69 | * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours, | 69 | * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours, |
70 | * respectively. | 70 | * respectively. |
71 | */ | 71 | */ |
72 | #define SHIFT_KG 6 /* phase factor (shift) */ | 72 | #define SHIFT_PLL 4 /* PLL frequency factor (shift) */ |
73 | #define SHIFT_KF 16 /* PLL frequency factor (shift) */ | 73 | #define SHIFT_FLL 2 /* FLL frequency factor (shift) */ |
74 | #define SHIFT_KH 2 /* FLL frequency factor (shift) */ | 74 | #define MAXTC 10 /* maximum time constant (shift) */ |
75 | #define MAXTC 6 /* maximum time constant (shift) */ | ||
76 | 75 | ||
77 | /* | 76 | /* |
78 | * The SHIFT_SCALE define establishes the decimal point of the time_phase | 77 | * The SHIFT_UPDATE define establishes the decimal point of the |
79 | * variable which serves as an extension to the low-order bits of the | 78 | * time_offset variable which represents the current offset with |
80 | * system clock variable. The SHIFT_UPDATE define establishes the decimal | 79 | * respect to standard time. |
81 | * point of the time_offset variable which represents the current offset | ||
82 | * with respect to standard time. The FINENSEC define represents 1 nsec in | ||
83 | * scaled units. | ||
84 | * | 80 | * |
85 | * SHIFT_USEC defines the scaling (shift) of the time_freq and | 81 | * SHIFT_USEC defines the scaling (shift) of the time_freq and |
86 | * time_tolerance variables, which represent the current frequency | 82 | * time_tolerance variables, which represent the current frequency |
87 | * offset and maximum frequency tolerance. | 83 | * offset and maximum frequency tolerance. |
88 | * | ||
89 | * FINENSEC is 1 ns in SHIFT_UPDATE units of the time_phase variable. | ||
90 | */ | 84 | */ |
91 | #define SHIFT_SCALE 22 /* phase scale (shift) */ | 85 | #define SHIFT_UPDATE (SHIFT_HZ + 1) /* time offset scale (shift) */ |
92 | #define SHIFT_UPDATE (SHIFT_KG + MAXTC) /* time offset scale (shift) */ | ||
93 | #define SHIFT_USEC 16 /* frequency offset scale (shift) */ | 86 | #define SHIFT_USEC 16 /* frequency offset scale (shift) */ |
94 | #define FINENSEC (1L << (SHIFT_SCALE - 10)) /* ~1 ns in phase units */ | 87 | #define SHIFT_NSEC 12 /* kernel frequency offset scale */ |
95 | 88 | ||
96 | #define MAXPHASE 512000L /* max phase error (us) */ | 89 | #define MAXPHASE 512000L /* max phase error (us) */ |
97 | #define MAXFREQ (512L << SHIFT_USEC) /* max frequency error (ppm) */ | 90 | #define MAXFREQ (512L << SHIFT_USEC) /* max frequency error (ppm) */ |
98 | #define MINSEC 16L /* min interval between updates (s) */ | 91 | #define MAXFREQ_NSEC (512000L << SHIFT_NSEC) /* max frequency error (ppb) */ |
99 | #define MAXSEC 1200L /* max interval between updates (s) */ | 92 | #define MINSEC 256 /* min interval between updates (s) */ |
93 | #define MAXSEC 2048 /* max interval between updates (s) */ | ||
100 | #define NTP_PHASE_LIMIT (MAXPHASE << 5) /* beyond max. dispersion */ | 94 | #define NTP_PHASE_LIMIT (MAXPHASE << 5) /* beyond max. dispersion */ |
101 | 95 | ||
102 | /* | 96 | /* |
@@ -204,33 +198,15 @@ extern int tickadj; /* amount of adjustment per tick */ | |||
204 | /* | 198 | /* |
205 | * phase-lock loop variables | 199 | * phase-lock loop variables |
206 | */ | 200 | */ |
207 | extern int time_state; /* clock status */ | ||
208 | extern int time_status; /* clock synchronization status bits */ | 201 | extern int time_status; /* clock synchronization status bits */ |
209 | extern long time_offset; /* time adjustment (us) */ | ||
210 | extern long time_constant; /* pll time constant */ | ||
211 | extern long time_tolerance; /* frequency tolerance (ppm) */ | ||
212 | extern long time_precision; /* clock precision (us) */ | ||
213 | extern long time_maxerror; /* maximum error */ | 202 | extern long time_maxerror; /* maximum error */ |
214 | extern long time_esterror; /* estimated error */ | 203 | extern long time_esterror; /* estimated error */ |
215 | 204 | ||
216 | extern long time_freq; /* frequency offset (scaled ppm) */ | 205 | extern long time_freq; /* frequency offset (scaled ppm) */ |
217 | extern long time_reftime; /* time at last adjustment (s) */ | ||
218 | 206 | ||
219 | extern long time_adjust; /* The amount of adjtime left */ | 207 | extern long time_adjust; /* The amount of adjtime left */ |
220 | extern long time_next_adjust; /* Value for time_adjust at next tick */ | ||
221 | 208 | ||
222 | /** | 209 | extern void ntp_clear(void); |
223 | * ntp_clear - Clears the NTP state variables | ||
224 | * | ||
225 | * Must be called while holding a write on the xtime_lock | ||
226 | */ | ||
227 | static inline void ntp_clear(void) | ||
228 | { | ||
229 | time_adjust = 0; /* stop active adjtime() */ | ||
230 | time_status |= STA_UNSYNC; | ||
231 | time_maxerror = NTP_PHASE_LIMIT; | ||
232 | time_esterror = NTP_PHASE_LIMIT; | ||
233 | } | ||
234 | 210 | ||
235 | /** | 211 | /** |
236 | * ntp_synced - Returns 1 if the NTP status is not UNSYNC | 212 | * ntp_synced - Returns 1 if the NTP status is not UNSYNC |
@@ -294,11 +270,15 @@ extern void register_time_interpolator(struct time_interpolator *); | |||
294 | extern void unregister_time_interpolator(struct time_interpolator *); | 270 | extern void unregister_time_interpolator(struct time_interpolator *); |
295 | extern void time_interpolator_reset(void); | 271 | extern void time_interpolator_reset(void); |
296 | extern unsigned long time_interpolator_get_offset(void); | 272 | extern unsigned long time_interpolator_get_offset(void); |
273 | extern void time_interpolator_update(long delta_nsec); | ||
297 | 274 | ||
298 | #else /* !CONFIG_TIME_INTERPOLATION */ | 275 | #else /* !CONFIG_TIME_INTERPOLATION */ |
299 | 276 | ||
300 | static inline void | 277 | static inline void time_interpolator_reset(void) |
301 | time_interpolator_reset(void) | 278 | { |
279 | } | ||
280 | |||
281 | static inline void time_interpolator_update(long delta_nsec) | ||
302 | { | 282 | { |
303 | } | 283 | } |
304 | 284 | ||
@@ -309,6 +289,8 @@ time_interpolator_reset(void) | |||
309 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | 289 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ |
310 | extern u64 current_tick_length(void); | 290 | extern u64 current_tick_length(void); |
311 | 291 | ||
292 | extern void second_overflow(void); | ||
293 | extern void update_ntp_one_tick(void); | ||
312 | extern int do_adjtimex(struct timex *); | 294 | extern int do_adjtimex(struct timex *); |
313 | 295 | ||
314 | #endif /* KERNEL */ | 296 | #endif /* KERNEL */ |
diff --git a/include/linux/trdevice.h b/include/linux/trdevice.h index 99e02ef54c47..bfc84a7aecc5 100644 --- a/include/linux/trdevice.h +++ b/include/linux/trdevice.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/if_tr.h> | 28 | #include <linux/if_tr.h> |
29 | 29 | ||
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | extern unsigned short tr_type_trans(struct sk_buff *skb, struct net_device *dev); | 31 | extern __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev); |
32 | extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev); | 32 | extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev); |
33 | extern struct net_device *alloc_trdev(int sizeof_priv); | 33 | extern struct net_device *alloc_trdev(int sizeof_priv); |
34 | 34 | ||
diff --git a/include/linux/tsacct_kern.h b/include/linux/tsacct_kern.h new file mode 100644 index 000000000000..7e50ac795b0b --- /dev/null +++ b/include/linux/tsacct_kern.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * tsacct_kern.h - kernel header for system accounting over taskstats interface | ||
3 | * | ||
4 | * Copyright (C) Jay Lan SGI | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_TSACCT_KERN_H | ||
8 | #define _LINUX_TSACCT_KERN_H | ||
9 | |||
10 | #include <linux/taskstats.h> | ||
11 | |||
12 | #ifdef CONFIG_TASKSTATS | ||
13 | extern void bacct_add_tsk(struct taskstats *stats, struct task_struct *tsk); | ||
14 | #else | ||
15 | static inline void bacct_add_tsk(struct taskstats *stats, struct task_struct *tsk) | ||
16 | {} | ||
17 | #endif /* CONFIG_TASKSTATS */ | ||
18 | |||
19 | #ifdef CONFIG_TASK_XACCT | ||
20 | extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p); | ||
21 | extern void acct_update_integrals(struct task_struct *tsk); | ||
22 | extern void acct_clear_integrals(struct task_struct *tsk); | ||
23 | #else | ||
24 | static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p) | ||
25 | {} | ||
26 | static inline void acct_update_integrals(struct task_struct *tsk) | ||
27 | {} | ||
28 | static inline void acct_clear_integrals(struct task_struct *tsk) | ||
29 | {} | ||
30 | #endif /* CONFIG_TASK_XACCT */ | ||
31 | |||
32 | #endif | ||
33 | |||
34 | |||
diff --git a/include/linux/tty.h b/include/linux/tty.h index 04827ca65781..44091c0db0b4 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -174,7 +174,7 @@ struct tty_struct { | |||
174 | struct tty_driver *driver; | 174 | struct tty_driver *driver; |
175 | int index; | 175 | int index; |
176 | struct tty_ldisc ldisc; | 176 | struct tty_ldisc ldisc; |
177 | struct semaphore termios_sem; | 177 | struct mutex termios_mutex; |
178 | struct termios *termios, *termios_locked; | 178 | struct termios *termios, *termios_locked; |
179 | char name[64]; | 179 | char name[64]; |
180 | int pgrp; | 180 | int pgrp; |
@@ -190,7 +190,6 @@ struct tty_struct { | |||
190 | struct tty_struct *link; | 190 | struct tty_struct *link; |
191 | struct fasync_struct *fasync; | 191 | struct fasync_struct *fasync; |
192 | struct tty_bufhead buf; | 192 | struct tty_bufhead buf; |
193 | int max_flip_cnt; | ||
194 | int alt_speed; /* For magic substitution of 38400 bps */ | 193 | int alt_speed; /* For magic substitution of 38400 bps */ |
195 | wait_queue_head_t write_wait; | 194 | wait_queue_head_t write_wait; |
196 | wait_queue_head_t read_wait; | 195 | wait_queue_head_t read_wait; |
@@ -308,6 +307,9 @@ extern void tty_ldisc_put(int); | |||
308 | extern void tty_wakeup(struct tty_struct *tty); | 307 | extern void tty_wakeup(struct tty_struct *tty); |
309 | extern void tty_ldisc_flush(struct tty_struct *tty); | 308 | extern void tty_ldisc_flush(struct tty_struct *tty); |
310 | 309 | ||
310 | extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | ||
311 | unsigned long arg); | ||
312 | |||
311 | extern struct mutex tty_mutex; | 313 | extern struct mutex tty_mutex; |
312 | 314 | ||
313 | /* n_tty.c */ | 315 | /* n_tty.c */ |
diff --git a/include/linux/types.h b/include/linux/types.h index 3f235660a3cd..406d4ae57631 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -33,6 +33,8 @@ typedef __kernel_clockid_t clockid_t; | |||
33 | typedef __kernel_mqd_t mqd_t; | 33 | typedef __kernel_mqd_t mqd_t; |
34 | 34 | ||
35 | #ifdef __KERNEL__ | 35 | #ifdef __KERNEL__ |
36 | typedef _Bool bool; | ||
37 | |||
36 | typedef __kernel_uid32_t uid_t; | 38 | typedef __kernel_uid32_t uid_t; |
37 | typedef __kernel_gid32_t gid_t; | 39 | typedef __kernel_gid32_t gid_t; |
38 | typedef __kernel_uid16_t uid16_t; | 40 | typedef __kernel_uid16_t uid16_t; |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 90223f057d50..014b41d1e308 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -20,10 +20,10 @@ | |||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | 21 | ||
22 | struct udphdr { | 22 | struct udphdr { |
23 | __u16 source; | 23 | __be16 source; |
24 | __u16 dest; | 24 | __be16 dest; |
25 | __u16 len; | 25 | __be16 len; |
26 | __u16 check; | 26 | __be16 check; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | /* UDP socket options */ | 29 | /* UDP socket options */ |
diff --git a/include/linux/unwind.h b/include/linux/unwind.h index ce48e2cd37a2..73e1751d03dd 100644 --- a/include/linux/unwind.h +++ b/include/linux/unwind.h | |||
@@ -12,8 +12,6 @@ | |||
12 | * is not much point in implementing the full Dwarf2 unwind API. | 12 | * is not much point in implementing the full Dwarf2 unwind API. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | |||
17 | struct module; | 15 | struct module; |
18 | 16 | ||
19 | #ifdef CONFIG_STACK_UNWIND | 17 | #ifdef CONFIG_STACK_UNWIND |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 0da15b0b02be..190cc1b78fe2 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -380,10 +380,10 @@ struct usb_device { | |||
380 | int maxchild; /* Number of ports if hub */ | 380 | int maxchild; /* Number of ports if hub */ |
381 | struct usb_device *children[USB_MAXCHILDREN]; | 381 | struct usb_device *children[USB_MAXCHILDREN]; |
382 | 382 | ||
383 | int pm_usage_cnt; /* usage counter for autosuspend */ | ||
383 | #ifdef CONFIG_PM | 384 | #ifdef CONFIG_PM |
384 | struct work_struct autosuspend; /* for delayed autosuspends */ | 385 | struct work_struct autosuspend; /* for delayed autosuspends */ |
385 | struct mutex pm_mutex; /* protects PM operations */ | 386 | struct mutex pm_mutex; /* protects PM operations */ |
386 | int pm_usage_cnt; /* usage counter for autosuspend */ | ||
387 | 387 | ||
388 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 388 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
389 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 389 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
diff --git a/include/linux/utime.h b/include/linux/utime.h index c6bf27b7897e..640be6a1959e 100644 --- a/include/linux/utime.h +++ b/include/linux/utime.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_UTIME_H | 1 | #ifndef _LINUX_UTIME_H |
2 | #define _LINUX_UTIME_H | 2 | #define _LINUX_UTIME_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | struct utimbuf { | 6 | struct utimbuf { |
5 | time_t actime; | 7 | time_t actime; |
6 | time_t modtime; | 8 | time_t modtime; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index e3715d774197..44c59da26ed2 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1135,7 +1135,8 @@ struct v4l2_sliced_vbi_cap | |||
1135 | (equals frame lines 313-336 for 625 line video | 1135 | (equals frame lines 313-336 for 625 line video |
1136 | standards, 263-286 for 525 line standards) */ | 1136 | standards, 263-286 for 525 line standards) */ |
1137 | __u16 service_lines[2][24]; | 1137 | __u16 service_lines[2][24]; |
1138 | __u32 reserved[4]; /* must be 0 */ | 1138 | enum v4l2_buf_type type; |
1139 | __u32 reserved[3]; /* must be 0 */ | ||
1139 | }; | 1140 | }; |
1140 | 1141 | ||
1141 | struct v4l2_sliced_vbi_data | 1142 | struct v4l2_sliced_vbi_data |
@@ -1242,7 +1243,7 @@ struct v4l2_streamparm | |||
1242 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) | 1243 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) |
1243 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) | 1244 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) |
1244 | #if 1 | 1245 | #if 1 |
1245 | #define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap) | 1246 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR ('V', 69, struct v4l2_sliced_vbi_cap) |
1246 | #endif | 1247 | #endif |
1247 | #define VIDIOC_LOG_STATUS _IO ('V', 70) | 1248 | #define VIDIOC_LOG_STATUS _IO ('V', 70) |
1248 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) | 1249 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 176c7f797339..c89df55f6e03 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/config.h> | ||
7 | #include <linux/mmzone.h> | 6 | #include <linux/mmzone.h> |
8 | #include <asm/atomic.h> | 7 | #include <asm/atomic.h> |
9 | 8 | ||
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 918a29763aea..1009d3fe1fc2 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -33,7 +33,8 @@ extern int fg_console, last_console, want_console; | |||
33 | int vc_allocate(unsigned int console); | 33 | int vc_allocate(unsigned int console); |
34 | int vc_cons_allocated(unsigned int console); | 34 | int vc_cons_allocated(unsigned int console); |
35 | int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines); | 35 | int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines); |
36 | void vc_disallocate(unsigned int console); | 36 | int vc_lock_resize(struct vc_data *vc, unsigned int cols, unsigned int lines); |
37 | void vc_deallocate(unsigned int console); | ||
37 | void reset_palette(struct vc_data *vc); | 38 | void reset_palette(struct vc_data *vc); |
38 | void do_blank_screen(int entering_gfx); | 39 | void do_blank_screen(int entering_gfx); |
39 | void do_unblank_screen(int leaving_gfx); | 40 | void do_unblank_screen(int leaving_gfx); |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 56a23a0e7f2e..4f4d98addb44 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -111,12 +111,15 @@ balance_dirty_pages_ratelimited(struct address_space *mapping) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); | 113 | int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); |
114 | extern int generic_writepages(struct address_space *mapping, | ||
115 | struct writeback_control *wbc); | ||
114 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); | 116 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); |
115 | int sync_page_range(struct inode *inode, struct address_space *mapping, | 117 | int sync_page_range(struct inode *inode, struct address_space *mapping, |
116 | loff_t pos, loff_t count); | 118 | loff_t pos, loff_t count); |
117 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, | 119 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, |
118 | loff_t pos, loff_t count); | 120 | loff_t pos, loff_t count); |
119 | void set_page_dirty_balance(struct page *page); | 121 | void set_page_dirty_balance(struct page *page); |
122 | void writeback_set_ratelimit(void); | ||
120 | 123 | ||
121 | /* pdflush.c */ | 124 | /* pdflush.c */ |
122 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl | 125 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 14ecd19f4cdc..430afd058269 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -12,8 +12,8 @@ | |||
12 | */ | 12 | */ |
13 | typedef union | 13 | typedef union |
14 | { | 14 | { |
15 | __u32 a4; | 15 | __be32 a4; |
16 | __u32 a6[4]; | 16 | __be32 a6[4]; |
17 | } xfrm_address_t; | 17 | } xfrm_address_t; |
18 | 18 | ||
19 | /* Ident of a specific xfrm_state. It is used on input to lookup | 19 | /* Ident of a specific xfrm_state. It is used on input to lookup |
@@ -23,7 +23,7 @@ typedef union | |||
23 | struct xfrm_id | 23 | struct xfrm_id |
24 | { | 24 | { |
25 | xfrm_address_t daddr; | 25 | xfrm_address_t daddr; |
26 | __u32 spi; | 26 | __be32 spi; |
27 | __u8 proto; | 27 | __u8 proto; |
28 | }; | 28 | }; |
29 | 29 | ||
@@ -49,10 +49,10 @@ struct xfrm_selector | |||
49 | { | 49 | { |
50 | xfrm_address_t daddr; | 50 | xfrm_address_t daddr; |
51 | xfrm_address_t saddr; | 51 | xfrm_address_t saddr; |
52 | __u16 dport; | 52 | __be16 dport; |
53 | __u16 dport_mask; | 53 | __be16 dport_mask; |
54 | __u16 sport; | 54 | __be16 sport; |
55 | __u16 sport_mask; | 55 | __be16 sport_mask; |
56 | __u16 family; | 56 | __u16 family; |
57 | __u8 prefixlen_d; | 57 | __u8 prefixlen_d; |
58 | __u8 prefixlen_s; | 58 | __u8 prefixlen_s; |
@@ -281,7 +281,7 @@ struct xfrm_usersa_info { | |||
281 | 281 | ||
282 | struct xfrm_usersa_id { | 282 | struct xfrm_usersa_id { |
283 | xfrm_address_t daddr; | 283 | xfrm_address_t daddr; |
284 | __u32 spi; | 284 | __be32 spi; |
285 | __u16 family; | 285 | __u16 family; |
286 | __u8 proto; | 286 | __u8 proto; |
287 | }; | 287 | }; |