aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-11 01:48:37 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-11 01:48:37 -0400
commit1a04392bd6439876b1552793389cbb5be356ea54 (patch)
tree12af7b77e3b0848127f2d2871778c9c1f315578a /include
parent68399bb5080c1d96f2110b0a040b39d3ccd7a18a (diff)
parent3c92c2ba33cd7d666c5f83cc32aa590e794e91b0 (diff)
Merge branch 'master'
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-imx/imx-regs.h2
-rw-r--r--include/asm-arm/hardware/scoop.h2
-rw-r--r--include/asm-generic/dma-mapping.h4
-rw-r--r--include/asm-i386/dma-mapping.h2
-rw-r--r--include/asm-ppc/dma-mapping.h2
-rw-r--r--include/asm-ppc64/dma-mapping.h4
-rw-r--r--include/asm-ppc64/iommu.h2
-rw-r--r--include/asm-x86_64/smp.h1
-rw-r--r--include/linux/atmdev.h12
-rw-r--r--include/linux/bio.h6
-rw-r--r--include/linux/buffer_head.h2
-rw-r--r--include/linux/connector.h2
-rw-r--r--include/linux/cpuset.h5
-rw-r--r--include/linux/dmapool.h2
-rw-r--r--include/linux/gfp.h14
-rw-r--r--include/linux/jbd.h2
-rw-r--r--include/linux/key-ui.h91
-rw-r--r--include/linux/kfifo.h4
-rw-r--r--include/linux/mempool.h9
-rw-r--r--include/linux/netlink.h2
-rw-r--r--include/linux/pagemap.h2
-rw-r--r--include/linux/posix_acl.h6
-rw-r--r--include/linux/radix-tree.h2
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/security.h6
-rw-r--r--include/linux/skbuff.h28
-rw-r--r--include/linux/slab.h19
-rw-r--r--include/linux/string.h2
-rw-r--r--include/linux/suspend.h2
-rw-r--r--include/linux/swap.h2
-rw-r--r--include/linux/textsearch.h2
-rw-r--r--include/linux/types.h4
-rw-r--r--include/linux/vmalloc.h4
-rw-r--r--include/net/bluetooth/bluetooth.h2
-rw-r--r--include/net/bluetooth/rfcomm.h2
-rw-r--r--include/net/dn_nsp.h8
-rw-r--r--include/net/dn_route.h2
-rw-r--r--include/net/inet_connection_sock.h2
-rw-r--r--include/net/ip_vs.h2
-rw-r--r--include/net/llc_conn.h2
-rw-r--r--include/net/sctp/sctp.h2
-rw-r--r--include/net/sctp/sm.h10
-rw-r--r--include/net/sctp/structs.h24
-rw-r--r--include/net/sctp/ulpevent.h16
-rw-r--r--include/net/sctp/ulpqueue.h11
-rw-r--r--include/net/sctp/user.h33
-rw-r--r--include/net/sock.h16
-rw-r--r--include/net/tcp.h3
-rw-r--r--include/net/xfrm.h2
-rw-r--r--include/rdma/ib_mad.h2
-rw-r--r--include/rdma/ib_sa.h10
-rw-r--r--include/rxrpc/call.h2
-rw-r--r--include/rxrpc/message.h2
-rw-r--r--include/sound/ac97_codec.h2
-rw-r--r--include/sound/core.h8
-rw-r--r--include/sound/driver.h2
-rw-r--r--include/sound/emu10k1.h2
57 files changed, 179 insertions, 238 deletions
diff --git a/include/asm-arm/arch-imx/imx-regs.h b/include/asm-arm/arch-imx/imx-regs.h
index 229f7008d74f..a6912b3d8671 100644
--- a/include/asm-arm/arch-imx/imx-regs.h
+++ b/include/asm-arm/arch-imx/imx-regs.h
@@ -215,7 +215,7 @@
215#define PC31_AOUT_UART3_RX ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31) 215#define PC31_AOUT_UART3_RX ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31)
216#define PD6_PF_LSCLK ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 6 ) 216#define PD6_PF_LSCLK ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 6 )
217#define PD7_PF_REV ( GPIO_PORTD | GPIO_PF | 7 ) 217#define PD7_PF_REV ( GPIO_PORTD | GPIO_PF | 7 )
218#define PD7_AF_UART2_DTR ( GPIO_PORTD | GPIO_IN | GPIO_AF | 7 ) 218#define PD7_AF_UART2_DTR ( GPIO_GIUS | GPIO_PORTD | GPIO_IN | GPIO_AF | 7 )
219#define PD7_AIN_SPI2_SCLK ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 7 ) 219#define PD7_AIN_SPI2_SCLK ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 7 )
220#define PD8_PF_CLS ( GPIO_PORTD | GPIO_PF | 8 ) 220#define PD8_PF_CLS ( GPIO_PORTD | GPIO_PF | 8 )
221#define PD8_AF_UART2_DCD ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 8 ) 221#define PD8_AF_UART2_DCD ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 8 )
diff --git a/include/asm-arm/hardware/scoop.h b/include/asm-arm/hardware/scoop.h
index 527404b5a8df..a8f1013930e3 100644
--- a/include/asm-arm/hardware/scoop.h
+++ b/include/asm-arm/hardware/scoop.h
@@ -38,6 +38,8 @@
38struct scoop_config { 38struct scoop_config {
39 unsigned short io_out; 39 unsigned short io_out;
40 unsigned short io_dir; 40 unsigned short io_dir;
41 unsigned short suspend_clr;
42 unsigned short suspend_set;
41}; 43};
42 44
43/* Structure for linking scoop devices to PCMCIA sockets */ 45/* Structure for linking scoop devices to PCMCIA sockets */
diff --git a/include/asm-generic/dma-mapping.h b/include/asm-generic/dma-mapping.h
index 8cef663c5cd9..747d790295f3 100644
--- a/include/asm-generic/dma-mapping.h
+++ b/include/asm-generic/dma-mapping.h
@@ -35,7 +35,7 @@ dma_set_mask(struct device *dev, u64 dma_mask)
35 35
36static inline void * 36static inline void *
37dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, 37dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
38 unsigned int __nocast flag) 38 gfp_t flag)
39{ 39{
40 BUG_ON(dev->bus != &pci_bus_type); 40 BUG_ON(dev->bus != &pci_bus_type);
41 41
@@ -168,7 +168,7 @@ dma_set_mask(struct device *dev, u64 dma_mask)
168 168
169static inline void * 169static inline void *
170dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, 170dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
171 unsigned int __nocast flag) 171 gfp_t flag)
172{ 172{
173 BUG(); 173 BUG();
174 return NULL; 174 return NULL;
diff --git a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h
index 563964b2995b..e56c335f8ef9 100644
--- a/include/asm-i386/dma-mapping.h
+++ b/include/asm-i386/dma-mapping.h
@@ -11,7 +11,7 @@
11#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) 11#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
12 12
13void *dma_alloc_coherent(struct device *dev, size_t size, 13void *dma_alloc_coherent(struct device *dev, size_t size,
14 dma_addr_t *dma_handle, unsigned int __nocast flag); 14 dma_addr_t *dma_handle, gfp_t flag);
15 15
16void dma_free_coherent(struct device *dev, size_t size, 16void dma_free_coherent(struct device *dev, size_t size,
17 void *vaddr, dma_addr_t dma_handle); 17 void *vaddr, dma_addr_t dma_handle);
diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h
index 92b8ee78dcc2..061bfcac1bf1 100644
--- a/include/asm-ppc/dma-mapping.h
+++ b/include/asm-ppc/dma-mapping.h
@@ -61,7 +61,7 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask)
61 61
62static inline void *dma_alloc_coherent(struct device *dev, size_t size, 62static inline void *dma_alloc_coherent(struct device *dev, size_t size,
63 dma_addr_t * dma_handle, 63 dma_addr_t * dma_handle,
64 unsigned int __nocast gfp) 64 gfp_t gfp)
65{ 65{
66#ifdef CONFIG_NOT_COHERENT_CACHE 66#ifdef CONFIG_NOT_COHERENT_CACHE
67 return __dma_alloc_coherent(size, dma_handle, gfp); 67 return __dma_alloc_coherent(size, dma_handle, gfp);
diff --git a/include/asm-ppc64/dma-mapping.h b/include/asm-ppc64/dma-mapping.h
index 9ad8adee0067..fb68fa23bea8 100644
--- a/include/asm-ppc64/dma-mapping.h
+++ b/include/asm-ppc64/dma-mapping.h
@@ -19,7 +19,7 @@
19extern int dma_supported(struct device *dev, u64 mask); 19extern int dma_supported(struct device *dev, u64 mask);
20extern int dma_set_mask(struct device *dev, u64 dma_mask); 20extern int dma_set_mask(struct device *dev, u64 dma_mask);
21extern void *dma_alloc_coherent(struct device *dev, size_t size, 21extern void *dma_alloc_coherent(struct device *dev, size_t size,
22 dma_addr_t *dma_handle, unsigned int __nocast flag); 22 dma_addr_t *dma_handle, gfp_t flag);
23extern void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 23extern void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
24 dma_addr_t dma_handle); 24 dma_addr_t dma_handle);
25extern dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, 25extern dma_addr_t dma_map_single(struct device *dev, void *cpu_addr,
@@ -118,7 +118,7 @@ dma_cache_sync(void *vaddr, size_t size,
118 */ 118 */
119struct dma_mapping_ops { 119struct dma_mapping_ops {
120 void * (*alloc_coherent)(struct device *dev, size_t size, 120 void * (*alloc_coherent)(struct device *dev, size_t size,
121 dma_addr_t *dma_handle, unsigned int __nocast flag); 121 dma_addr_t *dma_handle, gfp_t flag);
122 void (*free_coherent)(struct device *dev, size_t size, 122 void (*free_coherent)(struct device *dev, size_t size,
123 void *vaddr, dma_addr_t dma_handle); 123 void *vaddr, dma_addr_t dma_handle);
124 dma_addr_t (*map_single)(struct device *dev, void *ptr, 124 dma_addr_t (*map_single)(struct device *dev, void *ptr,
diff --git a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h
index 72dcf8116b04..c2f3b6e8a42f 100644
--- a/include/asm-ppc64/iommu.h
+++ b/include/asm-ppc64/iommu.h
@@ -122,7 +122,7 @@ extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
122 int nelems, enum dma_data_direction direction); 122 int nelems, enum dma_data_direction direction);
123 123
124extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, 124extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
125 dma_addr_t *dma_handle, unsigned int __nocast flag); 125 dma_addr_t *dma_handle, gfp_t flag);
126extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, 126extern void iommu_free_coherent(struct iommu_table *tbl, size_t size,
127 void *vaddr, dma_addr_t dma_handle); 127 void *vaddr, dma_addr_t dma_handle);
128extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, 128extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h
index 24e32611f0bf..c57ce4071342 100644
--- a/include/asm-x86_64/smp.h
+++ b/include/asm-x86_64/smp.h
@@ -81,6 +81,7 @@ static inline int hard_smp_processor_id(void)
81extern int safe_smp_processor_id(void); 81extern int safe_smp_processor_id(void);
82extern int __cpu_disable(void); 82extern int __cpu_disable(void);
83extern void __cpu_die(unsigned int cpu); 83extern void __cpu_die(unsigned int cpu);
84extern void prefill_possible_map(void);
84 85
85#endif /* !ASSEMBLY */ 86#endif /* !ASSEMBLY */
86 87
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index f1fd849e5535..e7d0593bb576 100644
--- a/include/linux/atmdev.h
+++ b/include/linux/atmdev.h
@@ -76,6 +76,13 @@ struct atm_dev_stats {
76 /* set interface ESI */ 76 /* set interface ESI */
77#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc) 77#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
78 /* force interface ESI */ 78 /* force interface ESI */
79#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
80 /* register a LECS address */
81#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
82 /* unregister a LECS address */
83#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
84 /* retrieve LECS address(es) */
85
79#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc) 86#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
80 /* get AAL layer statistics */ 87 /* get AAL layer statistics */
81#define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc) 88#define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc)
@@ -328,6 +335,8 @@ struct atm_dev_addr {
328 struct list_head entry; /* next address */ 335 struct list_head entry; /* next address */
329}; 336};
330 337
338enum atm_addr_type_t { ATM_ADDR_LOCAL, ATM_ADDR_LECS };
339
331struct atm_dev { 340struct atm_dev {
332 const struct atmdev_ops *ops; /* device operations; NULL if unused */ 341 const struct atmdev_ops *ops; /* device operations; NULL if unused */
333 const struct atmphy_ops *phy; /* PHY operations, may be undefined */ 342 const struct atmphy_ops *phy; /* PHY operations, may be undefined */
@@ -338,6 +347,7 @@ struct atm_dev {
338 void *phy_data; /* private PHY date */ 347 void *phy_data; /* private PHY date */
339 unsigned long flags; /* device flags (ATM_DF_*) */ 348 unsigned long flags; /* device flags (ATM_DF_*) */
340 struct list_head local; /* local ATM addresses */ 349 struct list_head local; /* local ATM addresses */
350 struct list_head lecs; /* LECS ATM addresses learned via ILMI */
341 unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */ 351 unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */
342 struct atm_cirange ci_range; /* VPI/VCI range */ 352 struct atm_cirange ci_range; /* VPI/VCI range */
343 struct k_atm_dev_stats stats; /* statistics */ 353 struct k_atm_dev_stats stats; /* statistics */
@@ -457,7 +467,7 @@ static inline void atm_dev_put(struct atm_dev *dev)
457 467
458int atm_charge(struct atm_vcc *vcc,int truesize); 468int atm_charge(struct atm_vcc *vcc,int truesize);
459struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, 469struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
460 unsigned int __nocast gfp_flags); 470 gfp_t gfp_flags);
461int atm_pcr_goal(struct atm_trafprm *tp); 471int atm_pcr_goal(struct atm_trafprm *tp);
462 472
463void vcc_release_async(struct atm_vcc *vcc, int reply); 473void vcc_release_async(struct atm_vcc *vcc, int reply);
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 6e1c79c8b6bf..3344b4e8e43a 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -276,8 +276,8 @@ extern void bio_pair_release(struct bio_pair *dbio);
276extern struct bio_set *bioset_create(int, int, int); 276extern struct bio_set *bioset_create(int, int, int);
277extern void bioset_free(struct bio_set *); 277extern void bioset_free(struct bio_set *);
278 278
279extern struct bio *bio_alloc(unsigned int __nocast, int); 279extern struct bio *bio_alloc(gfp_t, int);
280extern struct bio *bio_alloc_bioset(unsigned int __nocast, int, struct bio_set *); 280extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
281extern void bio_put(struct bio *); 281extern void bio_put(struct bio *);
282extern void bio_free(struct bio *, struct bio_set *); 282extern void bio_free(struct bio *, struct bio_set *);
283 283
@@ -287,7 +287,7 @@ extern int bio_phys_segments(struct request_queue *, struct bio *);
287extern int bio_hw_segments(struct request_queue *, struct bio *); 287extern int bio_hw_segments(struct request_queue *, struct bio *);
288 288
289extern void __bio_clone(struct bio *, struct bio *); 289extern void __bio_clone(struct bio *, struct bio *);
290extern struct bio *bio_clone(struct bio *, unsigned int __nocast); 290extern struct bio *bio_clone(struct bio *, gfp_t);
291 291
292extern void bio_init(struct bio *); 292extern void bio_init(struct bio *);
293 293
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 90828493791f..6a1d154c0825 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -172,7 +172,7 @@ void __brelse(struct buffer_head *);
172void __bforget(struct buffer_head *); 172void __bforget(struct buffer_head *);
173void __breadahead(struct block_device *, sector_t block, int size); 173void __breadahead(struct block_device *, sector_t block, int size);
174struct buffer_head *__bread(struct block_device *, sector_t block, int size); 174struct buffer_head *__bread(struct block_device *, sector_t block, int size);
175struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags); 175struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
176void free_buffer_head(struct buffer_head * bh); 176void free_buffer_head(struct buffer_head * bh);
177void FASTCALL(unlock_buffer(struct buffer_head *bh)); 177void FASTCALL(unlock_buffer(struct buffer_head *bh));
178void FASTCALL(__lock_buffer(struct buffer_head *bh)); 178void FASTCALL(__lock_buffer(struct buffer_head *bh));
diff --git a/include/linux/connector.h b/include/linux/connector.h
index 96582c9911ac..95952cc1f525 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -149,7 +149,7 @@ struct cn_dev {
149 149
150int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); 150int cn_add_callback(struct cb_id *, char *, void (*callback) (void *));
151void cn_del_callback(struct cb_id *); 151void cn_del_callback(struct cb_id *);
152int cn_netlink_send(struct cn_msg *, u32, unsigned int __nocast); 152int cn_netlink_send(struct cn_msg *, u32, gfp_t);
153 153
154int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); 154int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *));
155void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); 155void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 24062a1dbf61..6e2deef96b34 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -23,7 +23,7 @@ void cpuset_init_current_mems_allowed(void);
23void cpuset_update_current_mems_allowed(void); 23void cpuset_update_current_mems_allowed(void);
24void cpuset_restrict_to_mems_allowed(unsigned long *nodes); 24void cpuset_restrict_to_mems_allowed(unsigned long *nodes);
25int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); 25int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl);
26extern int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask); 26extern int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask);
27extern int cpuset_excl_nodes_overlap(const struct task_struct *p); 27extern int cpuset_excl_nodes_overlap(const struct task_struct *p);
28extern struct file_operations proc_cpuset_operations; 28extern struct file_operations proc_cpuset_operations;
29extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); 29extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer);
@@ -49,8 +49,7 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl)
49 return 1; 49 return 1;
50} 50}
51 51
52static inline int cpuset_zone_allowed(struct zone *z, 52static inline int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
53 unsigned int __nocast gfp_mask)
54{ 53{
55 return 1; 54 return 1;
56} 55}
diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h
index 4932ee5c77f0..76f12f46db7f 100644
--- a/include/linux/dmapool.h
+++ b/include/linux/dmapool.h
@@ -19,7 +19,7 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
19 19
20void dma_pool_destroy(struct dma_pool *pool); 20void dma_pool_destroy(struct dma_pool *pool);
21 21
22void *dma_pool_alloc(struct dma_pool *pool, unsigned int __nocast mem_flags, 22void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
23 dma_addr_t *handle); 23 dma_addr_t *handle);
24 24
25void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); 25void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 4dc990f3b5cc..3010e172394d 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -85,9 +85,9 @@ static inline void arch_free_page(struct page *page, int order) { }
85#endif 85#endif
86 86
87extern struct page * 87extern struct page *
88FASTCALL(__alloc_pages(unsigned int, unsigned int, struct zonelist *)); 88FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));
89 89
90static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_mask, 90static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
91 unsigned int order) 91 unsigned int order)
92{ 92{
93 if (unlikely(order >= MAX_ORDER)) 93 if (unlikely(order >= MAX_ORDER))
@@ -98,17 +98,17 @@ static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_m
98} 98}
99 99
100#ifdef CONFIG_NUMA 100#ifdef CONFIG_NUMA
101extern struct page *alloc_pages_current(unsigned int __nocast gfp_mask, unsigned order); 101extern struct page *alloc_pages_current(gfp_t gfp_mask, unsigned order);
102 102
103static inline struct page * 103static inline struct page *
104alloc_pages(unsigned int __nocast gfp_mask, unsigned int order) 104alloc_pages(gfp_t gfp_mask, unsigned int order)
105{ 105{
106 if (unlikely(order >= MAX_ORDER)) 106 if (unlikely(order >= MAX_ORDER))
107 return NULL; 107 return NULL;
108 108
109 return alloc_pages_current(gfp_mask, order); 109 return alloc_pages_current(gfp_mask, order);
110} 110}
111extern struct page *alloc_page_vma(unsigned __nocast gfp_mask, 111extern struct page *alloc_page_vma(gfp_t gfp_mask,
112 struct vm_area_struct *vma, unsigned long addr); 112 struct vm_area_struct *vma, unsigned long addr);
113#else 113#else
114#define alloc_pages(gfp_mask, order) \ 114#define alloc_pages(gfp_mask, order) \
@@ -117,8 +117,8 @@ extern struct page *alloc_page_vma(unsigned __nocast gfp_mask,
117#endif 117#endif
118#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) 118#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
119 119
120extern unsigned long FASTCALL(__get_free_pages(unsigned int __nocast gfp_mask, unsigned int order)); 120extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order));
121extern unsigned long FASTCALL(get_zeroed_page(unsigned int __nocast gfp_mask)); 121extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask));
122 122
123#define __get_free_page(gfp_mask) \ 123#define __get_free_page(gfp_mask) \
124 __get_free_pages((gfp_mask),0) 124 __get_free_pages((gfp_mask),0)
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index de097269bd7f..ff853b3173c6 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -935,7 +935,7 @@ void journal_put_journal_head(struct journal_head *jh);
935 */ 935 */
936extern kmem_cache_t *jbd_handle_cache; 936extern kmem_cache_t *jbd_handle_cache;
937 937
938static inline handle_t *jbd_alloc_handle(unsigned int __nocast gfp_flags) 938static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
939{ 939{
940 return kmem_cache_alloc(jbd_handle_cache, gfp_flags); 940 return kmem_cache_alloc(jbd_handle_cache, gfp_flags);
941} 941}
diff --git a/include/linux/key-ui.h b/include/linux/key-ui.h
index 918c34a8347e..7a2e332067c3 100644
--- a/include/linux/key-ui.h
+++ b/include/linux/key-ui.h
@@ -38,97 +38,16 @@ struct keyring_list {
38 struct key *keys[0]; 38 struct key *keys[0];
39}; 39};
40 40
41
42/* 41/*
43 * check to see whether permission is granted to use a key in the desired way 42 * check to see whether permission is granted to use a key in the desired way
44 */ 43 */
45static inline int key_permission(const key_ref_t key_ref, key_perm_t perm) 44extern int key_task_permission(const key_ref_t key_ref,
46{ 45 struct task_struct *context,
47 struct key *key = key_ref_to_ptr(key_ref); 46 key_perm_t perm);
48 key_perm_t kperm;
49
50 if (is_key_possessed(key_ref))
51 kperm = key->perm >> 24;
52 else if (key->uid == current->fsuid)
53 kperm = key->perm >> 16;
54 else if (key->gid != -1 &&
55 key->perm & KEY_GRP_ALL &&
56 in_group_p(key->gid)
57 )
58 kperm = key->perm >> 8;
59 else
60 kperm = key->perm;
61
62 kperm = kperm & perm & KEY_ALL;
63
64 return kperm == perm;
65}
66
67/*
68 * check to see whether permission is granted to use a key in at least one of
69 * the desired ways
70 */
71static inline int key_any_permission(const key_ref_t key_ref, key_perm_t perm)
72{
73 struct key *key = key_ref_to_ptr(key_ref);
74 key_perm_t kperm;
75
76 if (is_key_possessed(key_ref))
77 kperm = key->perm >> 24;
78 else if (key->uid == current->fsuid)
79 kperm = key->perm >> 16;
80 else if (key->gid != -1 &&
81 key->perm & KEY_GRP_ALL &&
82 in_group_p(key->gid)
83 )
84 kperm = key->perm >> 8;
85 else
86 kperm = key->perm;
87 47
88 kperm = kperm & perm & KEY_ALL; 48static inline int key_permission(const key_ref_t key_ref, key_perm_t perm)
89
90 return kperm != 0;
91}
92
93static inline int key_task_groups_search(struct task_struct *tsk, gid_t gid)
94{
95 int ret;
96
97 task_lock(tsk);
98 ret = groups_search(tsk->group_info, gid);
99 task_unlock(tsk);
100 return ret;
101}
102
103static inline int key_task_permission(const key_ref_t key_ref,
104 struct task_struct *context,
105 key_perm_t perm)
106{ 49{
107 struct key *key = key_ref_to_ptr(key_ref); 50 return key_task_permission(key_ref, current, perm);
108 key_perm_t kperm;
109
110 if (is_key_possessed(key_ref)) {
111 kperm = key->perm >> 24;
112 }
113 else if (key->uid == context->fsuid) {
114 kperm = key->perm >> 16;
115 }
116 else if (key->gid != -1 &&
117 key->perm & KEY_GRP_ALL && (
118 key->gid == context->fsgid ||
119 key_task_groups_search(context, key->gid)
120 )
121 ) {
122 kperm = key->perm >> 8;
123 }
124 else {
125 kperm = key->perm;
126 }
127
128 kperm = kperm & perm & KEY_ALL;
129
130 return kperm == perm;
131
132} 51}
133 52
134extern key_ref_t lookup_user_key(struct task_struct *context, 53extern key_ref_t lookup_user_key(struct task_struct *context,
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index c27cd428d269..48eccd865bd8 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -35,8 +35,8 @@ struct kfifo {
35}; 35};
36 36
37extern struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, 37extern struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
38 unsigned int __nocast gfp_mask, spinlock_t *lock); 38 gfp_t gfp_mask, spinlock_t *lock);
39extern struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask, 39extern struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask,
40 spinlock_t *lock); 40 spinlock_t *lock);
41extern void kfifo_free(struct kfifo *fifo); 41extern void kfifo_free(struct kfifo *fifo);
42extern unsigned int __kfifo_put(struct kfifo *fifo, 42extern unsigned int __kfifo_put(struct kfifo *fifo,
diff --git a/include/linux/mempool.h b/include/linux/mempool.h
index 796220ce47cc..f2427d7394b0 100644
--- a/include/linux/mempool.h
+++ b/include/linux/mempool.h
@@ -6,7 +6,7 @@
6 6
7#include <linux/wait.h> 7#include <linux/wait.h>
8 8
9typedef void * (mempool_alloc_t)(unsigned int __nocast gfp_mask, void *pool_data); 9typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
10typedef void (mempool_free_t)(void *element, void *pool_data); 10typedef void (mempool_free_t)(void *element, void *pool_data);
11 11
12typedef struct mempool_s { 12typedef struct mempool_s {
@@ -26,17 +26,16 @@ extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
26extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn, 26extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
27 mempool_free_t *free_fn, void *pool_data, int nid); 27 mempool_free_t *free_fn, void *pool_data, int nid);
28 28
29extern int mempool_resize(mempool_t *pool, int new_min_nr, 29extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask);
30 unsigned int __nocast gfp_mask);
31extern void mempool_destroy(mempool_t *pool); 30extern void mempool_destroy(mempool_t *pool);
32extern void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask); 31extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask);
33extern void mempool_free(void *element, mempool_t *pool); 32extern void mempool_free(void *element, mempool_t *pool);
34 33
35/* 34/*
36 * A mempool_alloc_t and mempool_free_t that get the memory from 35 * A mempool_alloc_t and mempool_free_t that get the memory from
37 * a slab that is passed in through pool_data. 36 * a slab that is passed in through pool_data.
38 */ 37 */
39void *mempool_alloc_slab(unsigned int __nocast gfp_mask, void *pool_data); 38void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
40void mempool_free_slab(void *element, void *pool_data); 39void mempool_free_slab(void *element, void *pool_data);
41 40
42#endif /* _LINUX_MEMPOOL_H */ 41#endif /* _LINUX_MEMPOOL_H */
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index bdebdc564506..ba25ca874c20 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -131,7 +131,7 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (*
131extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); 131extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
132extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); 132extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
133extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, 133extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
134 __u32 group, unsigned int __nocast allocation); 134 __u32 group, gfp_t allocation);
135extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); 135extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
136extern int netlink_register_notifier(struct notifier_block *nb); 136extern int netlink_register_notifier(struct notifier_block *nb);
137extern int netlink_unregister_notifier(struct notifier_block *nb); 137extern int netlink_unregister_notifier(struct notifier_block *nb);
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index d9a25647a295..acbf31c154f8 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -19,7 +19,7 @@
19#define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */ 19#define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */
20#define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */ 20#define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */
21 21
22static inline unsigned int __nocast mapping_gfp_mask(struct address_space * mapping) 22static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
23{ 23{
24 return mapping->flags & __GFP_BITS_MASK; 24 return mapping->flags & __GFP_BITS_MASK;
25} 25}
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h
index 4caedddaa033..4bc241290c24 100644
--- a/include/linux/posix_acl.h
+++ b/include/linux/posix_acl.h
@@ -71,11 +71,11 @@ posix_acl_release(struct posix_acl *acl)
71 71
72/* posix_acl.c */ 72/* posix_acl.c */
73 73
74extern struct posix_acl *posix_acl_alloc(int, unsigned int __nocast); 74extern struct posix_acl *posix_acl_alloc(int, gfp_t);
75extern struct posix_acl *posix_acl_clone(const struct posix_acl *, unsigned int __nocast); 75extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t);
76extern int posix_acl_valid(const struct posix_acl *); 76extern int posix_acl_valid(const struct posix_acl *);
77extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); 77extern int posix_acl_permission(struct inode *, const struct posix_acl *, int);
78extern struct posix_acl *posix_acl_from_mode(mode_t, unsigned int __nocast); 78extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t);
79extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *); 79extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *);
80extern int posix_acl_create_masq(struct posix_acl *, mode_t *); 80extern int posix_acl_create_masq(struct posix_acl *, mode_t *);
81extern int posix_acl_chmod_masq(struct posix_acl *, mode_t); 81extern int posix_acl_chmod_masq(struct posix_acl *, mode_t);
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 9c51917b1cce..045d4761febc 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -50,7 +50,7 @@ void *radix_tree_delete(struct radix_tree_root *, unsigned long);
50unsigned int 50unsigned int
51radix_tree_gang_lookup(struct radix_tree_root *root, void **results, 51radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
52 unsigned long first_index, unsigned int max_items); 52 unsigned long first_index, unsigned int max_items);
53int radix_tree_preload(unsigned int __nocast gfp_mask); 53int radix_tree_preload(gfp_t gfp_mask);
54void radix_tree_init(void); 54void radix_tree_init(void);
55void *radix_tree_tag_set(struct radix_tree_root *root, 55void *radix_tree_tag_set(struct radix_tree_root *root,
56 unsigned long index, int tag); 56 unsigned long index, int tag);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c3ba31f210a9..27519df0f987 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1018,6 +1018,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *);
1018extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); 1018extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
1019extern int kill_pg_info(int, struct siginfo *, pid_t); 1019extern int kill_pg_info(int, struct siginfo *, pid_t);
1020extern int kill_proc_info(int, struct siginfo *, pid_t); 1020extern int kill_proc_info(int, struct siginfo *, pid_t);
1021extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t);
1021extern void do_notify_parent(struct task_struct *, int); 1022extern void do_notify_parent(struct task_struct *, int);
1022extern void force_sig(int, struct task_struct *); 1023extern void force_sig(int, struct task_struct *);
1023extern void force_sig_specific(int, struct task_struct *); 1024extern void force_sig_specific(int, struct task_struct *);
diff --git a/include/linux/security.h b/include/linux/security.h
index 0e43460d374e..627382e74057 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -2634,8 +2634,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o
2634 return security_ops->socket_getpeersec(sock, optval, optlen, len); 2634 return security_ops->socket_getpeersec(sock, optval, optlen, len);
2635} 2635}
2636 2636
2637static inline int security_sk_alloc(struct sock *sk, int family, 2637static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
2638 unsigned int __nocast priority)
2639{ 2638{
2640 return security_ops->sk_alloc_security(sk, family, priority); 2639 return security_ops->sk_alloc_security(sk, family, priority);
2641} 2640}
@@ -2752,8 +2751,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o
2752 return -ENOPROTOOPT; 2751 return -ENOPROTOOPT;
2753} 2752}
2754 2753
2755static inline int security_sk_alloc(struct sock *sk, int family, 2754static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
2756 unsigned int __nocast priority)
2757{ 2755{
2758 return 0; 2756 return 0;
2759} 2757}
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 466c879f82b8..8f5d9e7f8734 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -302,37 +302,37 @@ struct sk_buff {
302 302
303extern void __kfree_skb(struct sk_buff *skb); 303extern void __kfree_skb(struct sk_buff *skb);
304extern struct sk_buff *__alloc_skb(unsigned int size, 304extern struct sk_buff *__alloc_skb(unsigned int size,
305 unsigned int __nocast priority, int fclone); 305 gfp_t priority, int fclone);
306static inline struct sk_buff *alloc_skb(unsigned int size, 306static inline struct sk_buff *alloc_skb(unsigned int size,
307 unsigned int __nocast priority) 307 gfp_t priority)
308{ 308{
309 return __alloc_skb(size, priority, 0); 309 return __alloc_skb(size, priority, 0);
310} 310}
311 311
312static inline struct sk_buff *alloc_skb_fclone(unsigned int size, 312static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
313 unsigned int __nocast priority) 313 gfp_t priority)
314{ 314{
315 return __alloc_skb(size, priority, 1); 315 return __alloc_skb(size, priority, 1);
316} 316}
317 317
318extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, 318extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
319 unsigned int size, 319 unsigned int size,
320 unsigned int __nocast priority); 320 gfp_t priority);
321extern void kfree_skbmem(struct sk_buff *skb); 321extern void kfree_skbmem(struct sk_buff *skb);
322extern struct sk_buff *skb_clone(struct sk_buff *skb, 322extern struct sk_buff *skb_clone(struct sk_buff *skb,
323 unsigned int __nocast priority); 323 gfp_t priority);
324extern struct sk_buff *skb_copy(const struct sk_buff *skb, 324extern struct sk_buff *skb_copy(const struct sk_buff *skb,
325 unsigned int __nocast priority); 325 gfp_t priority);
326extern struct sk_buff *pskb_copy(struct sk_buff *skb, 326extern struct sk_buff *pskb_copy(struct sk_buff *skb,
327 unsigned int __nocast gfp_mask); 327 gfp_t gfp_mask);
328extern int pskb_expand_head(struct sk_buff *skb, 328extern int pskb_expand_head(struct sk_buff *skb,
329 int nhead, int ntail, 329 int nhead, int ntail,
330 unsigned int __nocast gfp_mask); 330 gfp_t gfp_mask);
331extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, 331extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
332 unsigned int headroom); 332 unsigned int headroom);
333extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, 333extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
334 int newheadroom, int newtailroom, 334 int newheadroom, int newtailroom,
335 unsigned int __nocast priority); 335 gfp_t priority);
336extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); 336extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad);
337#define dev_kfree_skb(a) kfree_skb(a) 337#define dev_kfree_skb(a) kfree_skb(a)
338extern void skb_over_panic(struct sk_buff *skb, int len, 338extern void skb_over_panic(struct sk_buff *skb, int len,
@@ -484,7 +484,7 @@ static inline int skb_shared(const struct sk_buff *skb)
484 * NULL is returned on a memory allocation failure. 484 * NULL is returned on a memory allocation failure.
485 */ 485 */
486static inline struct sk_buff *skb_share_check(struct sk_buff *skb, 486static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
487 unsigned int __nocast pri) 487 gfp_t pri)
488{ 488{
489 might_sleep_if(pri & __GFP_WAIT); 489 might_sleep_if(pri & __GFP_WAIT);
490 if (skb_shared(skb)) { 490 if (skb_shared(skb)) {
@@ -516,7 +516,7 @@ static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
516 * %NULL is returned on a memory allocation failure. 516 * %NULL is returned on a memory allocation failure.
517 */ 517 */
518static inline struct sk_buff *skb_unshare(struct sk_buff *skb, 518static inline struct sk_buff *skb_unshare(struct sk_buff *skb,
519 unsigned int __nocast pri) 519 gfp_t pri)
520{ 520{
521 might_sleep_if(pri & __GFP_WAIT); 521 might_sleep_if(pri & __GFP_WAIT);
522 if (skb_cloned(skb)) { 522 if (skb_cloned(skb)) {
@@ -1017,7 +1017,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
1017 * %NULL is returned in there is no free memory. 1017 * %NULL is returned in there is no free memory.
1018 */ 1018 */
1019static inline struct sk_buff *__dev_alloc_skb(unsigned int length, 1019static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
1020 unsigned int __nocast gfp_mask) 1020 gfp_t gfp_mask)
1021{ 1021{
1022 struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); 1022 struct sk_buff *skb = alloc_skb(length + 16, gfp_mask);
1023 if (likely(skb)) 1023 if (likely(skb))
@@ -1130,8 +1130,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i,
1130 * If there is no free memory -ENOMEM is returned, otherwise zero 1130 * If there is no free memory -ENOMEM is returned, otherwise zero
1131 * is returned and the old skb data released. 1131 * is returned and the old skb data released.
1132 */ 1132 */
1133extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp); 1133extern int __skb_linearize(struct sk_buff *skb, gfp_t gfp);
1134static inline int skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp) 1134static inline int skb_linearize(struct sk_buff *skb, gfp_t gfp)
1135{ 1135{
1136 return __skb_linearize(skb, gfp); 1136 return __skb_linearize(skb, gfp);
1137} 1137}
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 1f356f3bbc64..5fc04a16ecb0 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -61,11 +61,11 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo
61 void (*)(void *, kmem_cache_t *, unsigned long)); 61 void (*)(void *, kmem_cache_t *, unsigned long));
62extern int kmem_cache_destroy(kmem_cache_t *); 62extern int kmem_cache_destroy(kmem_cache_t *);
63extern int kmem_cache_shrink(kmem_cache_t *); 63extern int kmem_cache_shrink(kmem_cache_t *);
64extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); 64extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
65extern void kmem_cache_free(kmem_cache_t *, void *); 65extern void kmem_cache_free(kmem_cache_t *, void *);
66extern unsigned int kmem_cache_size(kmem_cache_t *); 66extern unsigned int kmem_cache_size(kmem_cache_t *);
67extern const char *kmem_cache_name(kmem_cache_t *); 67extern const char *kmem_cache_name(kmem_cache_t *);
68extern kmem_cache_t *kmem_find_general_cachep(size_t size, unsigned int __nocast gfpflags); 68extern kmem_cache_t *kmem_find_general_cachep(size_t size, gfp_t gfpflags);
69 69
70/* Size description struct for general caches. */ 70/* Size description struct for general caches. */
71struct cache_sizes { 71struct cache_sizes {
@@ -74,9 +74,9 @@ struct cache_sizes {
74 kmem_cache_t *cs_dmacachep; 74 kmem_cache_t *cs_dmacachep;
75}; 75};
76extern struct cache_sizes malloc_sizes[]; 76extern struct cache_sizes malloc_sizes[];
77extern void *__kmalloc(size_t, unsigned int __nocast); 77extern void *__kmalloc(size_t, gfp_t);
78 78
79static inline void *kmalloc(size_t size, unsigned int __nocast flags) 79static inline void *kmalloc(size_t size, gfp_t flags)
80{ 80{
81 if (__builtin_constant_p(size)) { 81 if (__builtin_constant_p(size)) {
82 int i = 0; 82 int i = 0;
@@ -99,7 +99,7 @@ found:
99 return __kmalloc(size, flags); 99 return __kmalloc(size, flags);
100} 100}
101 101
102extern void *kzalloc(size_t, unsigned int __nocast); 102extern void *kzalloc(size_t, gfp_t);
103 103
104/** 104/**
105 * kcalloc - allocate memory for an array. The memory is set to zero. 105 * kcalloc - allocate memory for an array. The memory is set to zero.
@@ -107,7 +107,7 @@ extern void *kzalloc(size_t, unsigned int __nocast);
107 * @size: element size. 107 * @size: element size.
108 * @flags: the type of memory to allocate. 108 * @flags: the type of memory to allocate.
109 */ 109 */
110static inline void *kcalloc(size_t n, size_t size, unsigned int __nocast flags) 110static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
111{ 111{
112 if (n != 0 && size > INT_MAX / n) 112 if (n != 0 && size > INT_MAX / n)
113 return NULL; 113 return NULL;
@@ -118,15 +118,14 @@ extern void kfree(const void *);
118extern unsigned int ksize(const void *); 118extern unsigned int ksize(const void *);
119 119
120#ifdef CONFIG_NUMA 120#ifdef CONFIG_NUMA
121extern void *kmem_cache_alloc_node(kmem_cache_t *, 121extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node);
122 unsigned int __nocast flags, int node); 122extern void *kmalloc_node(size_t size, gfp_t flags, int node);
123extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node);
124#else 123#else
125static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node) 124static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
126{ 125{
127 return kmem_cache_alloc(cachep, flags); 126 return kmem_cache_alloc(cachep, flags);
128} 127}
129static inline void *kmalloc_node(size_t size, unsigned int __nocast flags, int node) 128static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
130{ 129{
131 return kmalloc(size, flags); 130 return kmalloc(size, flags);
132} 131}
diff --git a/include/linux/string.h b/include/linux/string.h
index dab2652acbd8..369be3264a55 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -88,7 +88,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t);
88extern void * memchr(const void *,int,__kernel_size_t); 88extern void * memchr(const void *,int,__kernel_size_t);
89#endif 89#endif
90 90
91extern char *kstrdup(const char *s, unsigned int __nocast gfp); 91extern char *kstrdup(const char *s, gfp_t gfp);
92 92
93#ifdef __cplusplus 93#ifdef __cplusplus
94} 94}
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index f2e96fdfaae0..ad15a54806d8 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -71,5 +71,7 @@ void restore_processor_state(void);
71struct saved_context; 71struct saved_context;
72void __save_processor_state(struct saved_context *ctxt); 72void __save_processor_state(struct saved_context *ctxt);
73void __restore_processor_state(struct saved_context *ctxt); 73void __restore_processor_state(struct saved_context *ctxt);
74extern unsigned long get_usable_page(unsigned gfp_mask);
75extern void free_eaten_memory(void);
74 76
75#endif /* _LINUX_SWSUSP_H */ 77#endif /* _LINUX_SWSUSP_H */
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 3c9ff0048153..a7bf1a3b1496 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -147,7 +147,7 @@ struct swap_list_t {
147#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) 147#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
148 148
149/* linux/mm/oom_kill.c */ 149/* linux/mm/oom_kill.c */
150extern void out_of_memory(unsigned int __nocast gfp_mask, int order); 150extern void out_of_memory(gfp_t gfp_mask, int order);
151 151
152/* linux/mm/memory.c */ 152/* linux/mm/memory.c */
153extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); 153extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h
index 1a4990e448e9..515046d1b2f4 100644
--- a/include/linux/textsearch.h
+++ b/include/linux/textsearch.h
@@ -159,7 +159,7 @@ extern unsigned int textsearch_find_continuous(struct ts_config *,
159#define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1)) 159#define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1))
160 160
161static inline struct ts_config *alloc_ts_config(size_t payload, 161static inline struct ts_config *alloc_ts_config(size_t payload,
162 unsigned int __nocast gfp_mask) 162 gfp_t gfp_mask)
163{ 163{
164 struct ts_config *conf; 164 struct ts_config *conf;
165 165
diff --git a/include/linux/types.h b/include/linux/types.h
index 2b678c22ca4a..0aee34f9da9f 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -165,6 +165,10 @@ typedef __u64 __bitwise __le64;
165typedef __u64 __bitwise __be64; 165typedef __u64 __bitwise __be64;
166#endif 166#endif
167 167
168#ifdef __KERNEL__
169typedef unsigned __nocast gfp_t;
170#endif
171
168struct ustat { 172struct ustat {
169 __kernel_daddr_t f_tfree; 173 __kernel_daddr_t f_tfree;
170 __kernel_ino_t f_tinode; 174 __kernel_ino_t f_tinode;
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index b244f69ef682..3701a0673d2c 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -34,8 +34,8 @@ struct vm_struct {
34extern void *vmalloc(unsigned long size); 34extern void *vmalloc(unsigned long size);
35extern void *vmalloc_exec(unsigned long size); 35extern void *vmalloc_exec(unsigned long size);
36extern void *vmalloc_32(unsigned long size); 36extern void *vmalloc_32(unsigned long size);
37extern void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask, pgprot_t prot); 37extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot);
38extern void *__vmalloc_area(struct vm_struct *area, unsigned int __nocast gfp_mask, pgprot_t prot); 38extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot);
39extern void vfree(void *addr); 39extern void vfree(void *addr);
40 40
41extern void *vmap(struct page **pages, unsigned int count, 41extern void *vmap(struct page **pages, unsigned int count,
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 6dfa4a61ffd0..210458624840 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -136,7 +136,7 @@ struct bt_skb_cb {
136}; 136};
137#define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb)) 137#define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb))
138 138
139static inline struct sk_buff *bt_skb_alloc(unsigned int len, unsigned int __nocast how) 139static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
140{ 140{
141 struct sk_buff *skb; 141 struct sk_buff *skb;
142 142
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index ffea9d54071f..fbe557f7ea1d 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -230,7 +230,7 @@ int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci,
230 u8 xon_char, u8 xoff_char, u16 param_mask); 230 u8 xon_char, u8 xoff_char, u16 param_mask);
231 231
232/* ---- RFCOMM DLCs (channels) ---- */ 232/* ---- RFCOMM DLCs (channels) ---- */
233struct rfcomm_dlc *rfcomm_dlc_alloc(unsigned int __nocast prio); 233struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio);
234void rfcomm_dlc_free(struct rfcomm_dlc *d); 234void rfcomm_dlc_free(struct rfcomm_dlc *d);
235int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel); 235int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel);
236int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason); 236int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason);
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h
index 8a0891e2e888..1ba03be0af3a 100644
--- a/include/net/dn_nsp.h
+++ b/include/net/dn_nsp.h
@@ -19,9 +19,9 @@ extern void dn_nsp_send_data_ack(struct sock *sk);
19extern void dn_nsp_send_oth_ack(struct sock *sk); 19extern void dn_nsp_send_oth_ack(struct sock *sk);
20extern void dn_nsp_delayed_ack(struct sock *sk); 20extern void dn_nsp_delayed_ack(struct sock *sk);
21extern void dn_send_conn_ack(struct sock *sk); 21extern void dn_send_conn_ack(struct sock *sk);
22extern void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp); 22extern void dn_send_conn_conf(struct sock *sk, gfp_t gfp);
23extern void dn_nsp_send_disc(struct sock *sk, unsigned char type, 23extern void dn_nsp_send_disc(struct sock *sk, unsigned char type,
24 unsigned short reason, unsigned int __nocast gfp); 24 unsigned short reason, gfp_t gfp);
25extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type, 25extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type,
26 unsigned short reason); 26 unsigned short reason);
27extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval); 27extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval);
@@ -29,14 +29,14 @@ extern void dn_nsp_send_conninit(struct sock *sk, unsigned char flags);
29 29
30extern void dn_nsp_output(struct sock *sk); 30extern void dn_nsp_output(struct sock *sk);
31extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum); 31extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum);
32extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, unsigned int __nocast gfp, int oob); 32extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, gfp_t gfp, int oob);
33extern unsigned long dn_nsp_persist(struct sock *sk); 33extern unsigned long dn_nsp_persist(struct sock *sk);
34extern int dn_nsp_xmit_timeout(struct sock *sk); 34extern int dn_nsp_xmit_timeout(struct sock *sk);
35 35
36extern int dn_nsp_rx(struct sk_buff *); 36extern int dn_nsp_rx(struct sk_buff *);
37extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb); 37extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
38 38
39extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, unsigned int __nocast pri); 39extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri);
40extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err); 40extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err);
41 41
42#define NSP_REASON_OK 0 /* No error */ 42#define NSP_REASON_OK 0 /* No error */
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index 11fe973cf383..5122da3f2eb3 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -15,7 +15,7 @@
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16*******************************************************************************/ 16*******************************************************************************/
17 17
18extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, unsigned int __nocast pri); 18extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri);
19extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags); 19extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags);
20extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); 20extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb);
21extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); 21extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 651f824c1008..b0c99060b78d 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -94,7 +94,7 @@ static inline void *inet_csk_ca(const struct sock *sk)
94 94
95extern struct sock *inet_csk_clone(struct sock *sk, 95extern struct sock *inet_csk_clone(struct sock *sk,
96 const struct request_sock *req, 96 const struct request_sock *req,
97 const unsigned int __nocast priority); 97 const gfp_t priority);
98 98
99enum inet_csk_ack_state_t { 99enum inet_csk_ack_state_t {
100 ICSK_ACK_SCHED = 1, 100 ICSK_ACK_SCHED = 1,
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index ecb2b061f597..3b5559a023a4 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -832,7 +832,7 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc);
832 832
833extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb); 833extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb);
834extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb); 834extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb);
835extern int ip_vs_skb_replace(struct sk_buff *skb, unsigned int __nocast pri, 835extern int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri,
836 char *o_buf, int o_len, char *n_buf, int n_len); 836 char *o_buf, int o_len, char *n_buf, int n_len);
837extern int ip_vs_app_init(void); 837extern int ip_vs_app_init(void);
838extern void ip_vs_app_cleanup(void); 838extern void ip_vs_app_cleanup(void);
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h
index 54852ff6033b..00730d21b522 100644
--- a/include/net/llc_conn.h
+++ b/include/net/llc_conn.h
@@ -93,7 +93,7 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb)
93 return skb->cb[sizeof(skb->cb) - 1]; 93 return skb->cb[sizeof(skb->cb) - 1];
94} 94}
95 95
96extern struct sock *llc_sk_alloc(int family, unsigned int __nocast priority, 96extern struct sock *llc_sk_alloc(int family, gfp_t priority,
97 struct proto *prot); 97 struct proto *prot);
98extern void llc_sk_free(struct sock *sk); 98extern void llc_sk_free(struct sock *sk);
99 99
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index e1d5ec1c23c0..8f241216f46b 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -125,7 +125,7 @@
125 */ 125 */
126extern struct sock *sctp_get_ctl_sock(void); 126extern struct sock *sctp_get_ctl_sock(void);
127extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, 127extern int sctp_copy_local_addr_list(struct sctp_bind_addr *,
128 sctp_scope_t, unsigned int __nocast gfp, 128 sctp_scope_t, gfp_t gfp,
129 int flags); 129 int flags);
130extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family); 130extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family);
131extern int sctp_register_pf(struct sctp_pf *, sa_family_t); 131extern int sctp_register_pf(struct sctp_pf *, sa_family_t);
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 58462164d960..1eac3d0eb7a9 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -181,17 +181,17 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t,
181int sctp_chunk_iif(const struct sctp_chunk *); 181int sctp_chunk_iif(const struct sctp_chunk *);
182struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *, 182struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *,
183 struct sctp_chunk *, 183 struct sctp_chunk *,
184 unsigned int __nocast gfp); 184 gfp_t gfp);
185__u32 sctp_generate_verification_tag(void); 185__u32 sctp_generate_verification_tag(void);
186void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag); 186void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag);
187 187
188/* Prototypes for chunk-building functions. */ 188/* Prototypes for chunk-building functions. */
189struct sctp_chunk *sctp_make_init(const struct sctp_association *, 189struct sctp_chunk *sctp_make_init(const struct sctp_association *,
190 const struct sctp_bind_addr *, 190 const struct sctp_bind_addr *,
191 unsigned int __nocast gfp, int vparam_len); 191 gfp_t gfp, int vparam_len);
192struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *, 192struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *,
193 const struct sctp_chunk *, 193 const struct sctp_chunk *,
194 const unsigned int __nocast gfp, 194 const gfp_t gfp,
195 const int unkparam_len); 195 const int unkparam_len);
196struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *, 196struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *,
197 const struct sctp_chunk *); 197 const struct sctp_chunk *);
@@ -265,7 +265,7 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype,
265 struct sctp_endpoint *, 265 struct sctp_endpoint *,
266 struct sctp_association *asoc, 266 struct sctp_association *asoc,
267 void *event_arg, 267 void *event_arg,
268 unsigned int __nocast gfp); 268 gfp_t gfp);
269 269
270/* 2nd level prototypes */ 270/* 2nd level prototypes */
271void sctp_generate_t3_rtx_event(unsigned long peer); 271void sctp_generate_t3_rtx_event(unsigned long peer);
@@ -276,7 +276,7 @@ void sctp_ootb_pkt_free(struct sctp_packet *);
276struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *, 276struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *,
277 const struct sctp_association *, 277 const struct sctp_association *,
278 struct sctp_chunk *, 278 struct sctp_chunk *,
279 unsigned int __nocast gfp, int *err, 279 gfp_t gfp, int *err,
280 struct sctp_chunk **err_chk_p); 280 struct sctp_chunk **err_chk_p);
281int sctp_addip_addr_config(struct sctp_association *, sctp_param_t, 281int sctp_addip_addr_config(struct sctp_association *, sctp_param_t,
282 struct sockaddr_storage*, int); 282 struct sockaddr_storage*, int);
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 994009bbe3b4..9c385b6417c7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -446,7 +446,7 @@ struct sctp_ssnmap {
446}; 446};
447 447
448struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, 448struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
449 unsigned int __nocast gfp); 449 gfp_t gfp);
450void sctp_ssnmap_free(struct sctp_ssnmap *map); 450void sctp_ssnmap_free(struct sctp_ssnmap *map);
451void sctp_ssnmap_clear(struct sctp_ssnmap *map); 451void sctp_ssnmap_clear(struct sctp_ssnmap *map);
452 452
@@ -947,7 +947,7 @@ struct sctp_transport {
947}; 947};
948 948
949struct sctp_transport *sctp_transport_new(const union sctp_addr *, 949struct sctp_transport *sctp_transport_new(const union sctp_addr *,
950 unsigned int __nocast); 950 gfp_t);
951void sctp_transport_set_owner(struct sctp_transport *, 951void sctp_transport_set_owner(struct sctp_transport *,
952 struct sctp_association *); 952 struct sctp_association *);
953void sctp_transport_route(struct sctp_transport *, union sctp_addr *, 953void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
@@ -1095,10 +1095,10 @@ void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port);
1095void sctp_bind_addr_free(struct sctp_bind_addr *); 1095void sctp_bind_addr_free(struct sctp_bind_addr *);
1096int sctp_bind_addr_copy(struct sctp_bind_addr *dest, 1096int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
1097 const struct sctp_bind_addr *src, 1097 const struct sctp_bind_addr *src,
1098 sctp_scope_t scope, unsigned int __nocast gfp, 1098 sctp_scope_t scope, gfp_t gfp,
1099 int flags); 1099 int flags);
1100int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, 1100int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
1101 unsigned int __nocast gfp); 1101 gfp_t gfp);
1102int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); 1102int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
1103int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, 1103int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
1104 struct sctp_sock *); 1104 struct sctp_sock *);
@@ -1108,9 +1108,9 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,
1108 struct sctp_sock *opt); 1108 struct sctp_sock *opt);
1109union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, 1109union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp,
1110 int *addrs_len, 1110 int *addrs_len,
1111 unsigned int __nocast gfp); 1111 gfp_t gfp);
1112int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, 1112int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len,
1113 __u16 port, unsigned int __nocast gfp); 1113 __u16 port, gfp_t gfp);
1114 1114
1115sctp_scope_t sctp_scope(const union sctp_addr *); 1115sctp_scope_t sctp_scope(const union sctp_addr *);
1116int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope); 1116int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope);
@@ -1239,7 +1239,7 @@ static inline struct sctp_endpoint *sctp_ep(struct sctp_ep_common *base)
1239} 1239}
1240 1240
1241/* These are function signatures for manipulating endpoints. */ 1241/* These are function signatures for manipulating endpoints. */
1242struct sctp_endpoint *sctp_endpoint_new(struct sock *, unsigned int __nocast); 1242struct sctp_endpoint *sctp_endpoint_new(struct sock *, gfp_t);
1243void sctp_endpoint_free(struct sctp_endpoint *); 1243void sctp_endpoint_free(struct sctp_endpoint *);
1244void sctp_endpoint_put(struct sctp_endpoint *); 1244void sctp_endpoint_put(struct sctp_endpoint *);
1245void sctp_endpoint_hold(struct sctp_endpoint *); 1245void sctp_endpoint_hold(struct sctp_endpoint *);
@@ -1260,7 +1260,7 @@ int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t,
1260 struct sctp_chunk **err_chunk); 1260 struct sctp_chunk **err_chunk);
1261int sctp_process_init(struct sctp_association *, sctp_cid_t cid, 1261int sctp_process_init(struct sctp_association *, sctp_cid_t cid,
1262 const union sctp_addr *peer, 1262 const union sctp_addr *peer,
1263 sctp_init_chunk_t *init, unsigned int __nocast gfp); 1263 sctp_init_chunk_t *init, gfp_t gfp);
1264__u32 sctp_generate_tag(const struct sctp_endpoint *); 1264__u32 sctp_generate_tag(const struct sctp_endpoint *);
1265__u32 sctp_generate_tsn(const struct sctp_endpoint *); 1265__u32 sctp_generate_tsn(const struct sctp_endpoint *);
1266 1266
@@ -1723,7 +1723,7 @@ static inline struct sctp_association *sctp_assoc(struct sctp_ep_common *base)
1723 1723
1724struct sctp_association * 1724struct sctp_association *
1725sctp_association_new(const struct sctp_endpoint *, const struct sock *, 1725sctp_association_new(const struct sctp_endpoint *, const struct sock *,
1726 sctp_scope_t scope, unsigned int __nocast gfp); 1726 sctp_scope_t scope, gfp_t gfp);
1727void sctp_association_free(struct sctp_association *); 1727void sctp_association_free(struct sctp_association *);
1728void sctp_association_put(struct sctp_association *); 1728void sctp_association_put(struct sctp_association *);
1729void sctp_association_hold(struct sctp_association *); 1729void sctp_association_hold(struct sctp_association *);
@@ -1739,7 +1739,7 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
1739 const union sctp_addr *laddr); 1739 const union sctp_addr *laddr);
1740struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *, 1740struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *,
1741 const union sctp_addr *address, 1741 const union sctp_addr *address,
1742 const unsigned int __nocast gfp, 1742 const gfp_t gfp,
1743 const int peer_state); 1743 const int peer_state);
1744void sctp_assoc_del_peer(struct sctp_association *asoc, 1744void sctp_assoc_del_peer(struct sctp_association *asoc,
1745 const union sctp_addr *addr); 1745 const union sctp_addr *addr);
@@ -1764,10 +1764,10 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *, unsigned);
1764void sctp_assoc_set_primary(struct sctp_association *, 1764void sctp_assoc_set_primary(struct sctp_association *,
1765 struct sctp_transport *); 1765 struct sctp_transport *);
1766int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, 1766int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *,
1767 unsigned int __nocast); 1767 gfp_t);
1768int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, 1768int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
1769 struct sctp_cookie*, 1769 struct sctp_cookie*,
1770 unsigned int __nocast gfp); 1770 gfp_t gfp);
1771 1771
1772int sctp_cmp_addr_exact(const union sctp_addr *ss1, 1772int sctp_cmp_addr_exact(const union sctp_addr *ss1,
1773 const union sctp_addr *ss2); 1773 const union sctp_addr *ss2);
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h
index 90fe4bf6754f..6c40cfc4832d 100644
--- a/include/net/sctp/ulpevent.h
+++ b/include/net/sctp/ulpevent.h
@@ -88,7 +88,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
88 __u16 error, 88 __u16 error,
89 __u16 outbound, 89 __u16 outbound,
90 __u16 inbound, 90 __u16 inbound,
91 unsigned int __nocast gfp); 91 gfp_t gfp);
92 92
93struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( 93struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change(
94 const struct sctp_association *asoc, 94 const struct sctp_association *asoc,
@@ -96,35 +96,35 @@ struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change(
96 int flags, 96 int flags,
97 int state, 97 int state,
98 int error, 98 int error,
99 unsigned int __nocast gfp); 99 gfp_t gfp);
100 100
101struct sctp_ulpevent *sctp_ulpevent_make_remote_error( 101struct sctp_ulpevent *sctp_ulpevent_make_remote_error(
102 const struct sctp_association *asoc, 102 const struct sctp_association *asoc,
103 struct sctp_chunk *chunk, 103 struct sctp_chunk *chunk,
104 __u16 flags, 104 __u16 flags,
105 unsigned int __nocast gfp); 105 gfp_t gfp);
106struct sctp_ulpevent *sctp_ulpevent_make_send_failed( 106struct sctp_ulpevent *sctp_ulpevent_make_send_failed(
107 const struct sctp_association *asoc, 107 const struct sctp_association *asoc,
108 struct sctp_chunk *chunk, 108 struct sctp_chunk *chunk,
109 __u16 flags, 109 __u16 flags,
110 __u32 error, 110 __u32 error,
111 unsigned int __nocast gfp); 111 gfp_t gfp);
112 112
113struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event( 113struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event(
114 const struct sctp_association *asoc, 114 const struct sctp_association *asoc,
115 __u16 flags, 115 __u16 flags,
116 unsigned int __nocast gfp); 116 gfp_t gfp);
117 117
118struct sctp_ulpevent *sctp_ulpevent_make_pdapi( 118struct sctp_ulpevent *sctp_ulpevent_make_pdapi(
119 const struct sctp_association *asoc, 119 const struct sctp_association *asoc,
120 __u32 indication, unsigned int __nocast gfp); 120 __u32 indication, gfp_t gfp);
121 121
122struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( 122struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication(
123 const struct sctp_association *asoc, unsigned int __nocast gfp); 123 const struct sctp_association *asoc, gfp_t gfp);
124 124
125struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, 125struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
126 struct sctp_chunk *chunk, 126 struct sctp_chunk *chunk,
127 unsigned int __nocast gfp); 127 gfp_t gfp);
128 128
129void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, 129void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event,
130 struct msghdr *); 130 struct msghdr *);
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h
index 1a60c6d943c1..a43c8788b650 100644
--- a/include/net/sctp/ulpqueue.h
+++ b/include/net/sctp/ulpqueue.h
@@ -62,22 +62,19 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *,
62void sctp_ulpq_free(struct sctp_ulpq *); 62void sctp_ulpq_free(struct sctp_ulpq *);
63 63
64/* Add a new DATA chunk for processing. */ 64/* Add a new DATA chunk for processing. */
65int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, 65int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
66 unsigned int __nocast);
67 66
68/* Add a new event for propagation to the ULP. */ 67/* Add a new event for propagation to the ULP. */
69int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev); 68int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev);
70 69
71/* Renege previously received chunks. */ 70/* Renege previously received chunks. */
72void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, 71void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
73 unsigned int __nocast);
74 72
75/* Perform partial delivery. */ 73/* Perform partial delivery. */
76void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, 74void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
77 unsigned int __nocast);
78 75
79/* Abort the partial delivery. */ 76/* Abort the partial delivery. */
80void sctp_ulpq_abort_pd(struct sctp_ulpq *, unsigned int __nocast); 77void sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t);
81 78
82/* Clear the partial data delivery condition on this socket. */ 79/* Clear the partial data delivery condition on this socket. */
83int sctp_clear_pd(struct sock *sk); 80int sctp_clear_pd(struct sock *sk);
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index f6328aeddcce..1c5f19f995ad 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -103,16 +103,20 @@ enum sctp_optname {
103#define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM 103#define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM
104 SCTP_SOCKOPT_PEELOFF, /* peel off association. */ 104 SCTP_SOCKOPT_PEELOFF, /* peel off association. */
105#define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF 105#define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF
106 SCTP_GET_PEER_ADDRS_NUM, /* Get number of peer addresss. */ 106 SCTP_GET_PEER_ADDRS_NUM_OLD, /* Get number of peer addresss. */
107#define SCTP_GET_PEER_ADDRS_NUM SCTP_GET_PEER_ADDRS_NUM 107#define SCTP_GET_PEER_ADDRS_NUM_OLD SCTP_GET_PEER_ADDRS_NUM_OLD
108 SCTP_GET_PEER_ADDRS_OLD, /* Get all peer addresss. */
109#define SCTP_GET_PEER_ADDRS_OLD SCTP_GET_PEER_ADDRS_OLD
110 SCTP_GET_LOCAL_ADDRS_NUM_OLD, /* Get number of local addresss. */
111#define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD
112 SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */
113#define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD
114 SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */
115#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX
108 SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ 116 SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */
109#define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS 117#define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS
110 SCTP_GET_LOCAL_ADDRS_NUM, /* Get number of local addresss. */
111#define SCTP_GET_LOCAL_ADDRS_NUM SCTP_GET_LOCAL_ADDRS_NUM
112 SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ 118 SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */
113#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS 119#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS
114 SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */
115#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX
116}; 120};
117 121
118/* 122/*
@@ -239,7 +243,7 @@ struct sctp_paddr_change {
239 int spc_state; 243 int spc_state;
240 int spc_error; 244 int spc_error;
241 sctp_assoc_t spc_assoc_id; 245 sctp_assoc_t spc_assoc_id;
242}; 246} __attribute__((packed, aligned(4)));
243 247
244/* 248/*
245 * spc_state: 32 bits (signed integer) 249 * spc_state: 32 bits (signed integer)
@@ -464,7 +468,7 @@ struct sctp_assocparams {
464struct sctp_setpeerprim { 468struct sctp_setpeerprim {
465 sctp_assoc_t sspp_assoc_id; 469 sctp_assoc_t sspp_assoc_id;
466 struct sockaddr_storage sspp_addr; 470 struct sockaddr_storage sspp_addr;
467}; 471} __attribute__((packed, aligned(4)));
468 472
469/* 473/*
470 * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) 474 * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR)
@@ -477,7 +481,7 @@ struct sctp_setpeerprim {
477struct sctp_prim { 481struct sctp_prim {
478 sctp_assoc_t ssp_assoc_id; 482 sctp_assoc_t ssp_assoc_id;
479 struct sockaddr_storage ssp_addr; 483 struct sockaddr_storage ssp_addr;
480}; 484} __attribute__((packed, aligned(4)));
481 485
482/* 486/*
483 * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) 487 * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER)
@@ -504,7 +508,7 @@ struct sctp_paddrparams {
504 struct sockaddr_storage spp_address; 508 struct sockaddr_storage spp_address;
505 __u32 spp_hbinterval; 509 __u32 spp_hbinterval;
506 __u16 spp_pathmaxrxt; 510 __u16 spp_pathmaxrxt;
507}; 511} __attribute__((packed, aligned(4)));
508 512
509/* 513/*
510 * 7.2.2 Peer Address Information 514 * 7.2.2 Peer Address Information
@@ -523,7 +527,7 @@ struct sctp_paddrinfo {
523 __u32 spinfo_srtt; 527 __u32 spinfo_srtt;
524 __u32 spinfo_rto; 528 __u32 spinfo_rto;
525 __u32 spinfo_mtu; 529 __u32 spinfo_mtu;
526}; 530} __attribute__((packed, aligned(4)));
527 531
528/* Peer addresses's state. */ 532/* Peer addresses's state. */
529enum sctp_spinfo_state { 533enum sctp_spinfo_state {
@@ -559,11 +563,16 @@ struct sctp_status {
559 * SCTP_GET_LOCAL_ADDRS socket options used internally to implement 563 * SCTP_GET_LOCAL_ADDRS socket options used internally to implement
560 * sctp_getpaddrs() and sctp_getladdrs() API. 564 * sctp_getpaddrs() and sctp_getladdrs() API.
561 */ 565 */
562struct sctp_getaddrs { 566struct sctp_getaddrs_old {
563 sctp_assoc_t assoc_id; 567 sctp_assoc_t assoc_id;
564 int addr_num; 568 int addr_num;
565 struct sockaddr __user *addrs; 569 struct sockaddr __user *addrs;
566}; 570};
571struct sctp_getaddrs {
572 sctp_assoc_t assoc_id; /*input*/
573 __u32 addr_num; /*output*/
574 __u8 addrs[0]; /*output, variable size*/
575};
567 576
568/* These are bit fields for msghdr->msg_flags. See section 5.1. */ 577/* These are bit fields for msghdr->msg_flags. See section 5.1. */
569/* On user space Linux, these live in <bits/socket.h> as an enum. */ 578/* On user space Linux, these live in <bits/socket.h> as an enum. */
diff --git a/include/net/sock.h b/include/net/sock.h
index b6440805c420..ecb75526cba0 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -739,18 +739,18 @@ extern void FASTCALL(release_sock(struct sock *sk));
739#define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) 739#define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock))
740 740
741extern struct sock *sk_alloc(int family, 741extern struct sock *sk_alloc(int family,
742 unsigned int __nocast priority, 742 gfp_t priority,
743 struct proto *prot, int zero_it); 743 struct proto *prot, int zero_it);
744extern void sk_free(struct sock *sk); 744extern void sk_free(struct sock *sk);
745extern struct sock *sk_clone(const struct sock *sk, 745extern struct sock *sk_clone(const struct sock *sk,
746 const unsigned int __nocast priority); 746 const gfp_t priority);
747 747
748extern struct sk_buff *sock_wmalloc(struct sock *sk, 748extern struct sk_buff *sock_wmalloc(struct sock *sk,
749 unsigned long size, int force, 749 unsigned long size, int force,
750 unsigned int __nocast priority); 750 gfp_t priority);
751extern struct sk_buff *sock_rmalloc(struct sock *sk, 751extern struct sk_buff *sock_rmalloc(struct sock *sk,
752 unsigned long size, int force, 752 unsigned long size, int force,
753 unsigned int __nocast priority); 753 gfp_t priority);
754extern void sock_wfree(struct sk_buff *skb); 754extern void sock_wfree(struct sk_buff *skb);
755extern void sock_rfree(struct sk_buff *skb); 755extern void sock_rfree(struct sk_buff *skb);
756 756
@@ -766,7 +766,7 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk,
766 int noblock, 766 int noblock,
767 int *errcode); 767 int *errcode);
768extern void *sock_kmalloc(struct sock *sk, int size, 768extern void *sock_kmalloc(struct sock *sk, int size,
769 unsigned int __nocast priority); 769 gfp_t priority);
770extern void sock_kfree_s(struct sock *sk, void *mem, int size); 770extern void sock_kfree_s(struct sock *sk, void *mem, int size);
771extern void sk_send_sigurg(struct sock *sk); 771extern void sk_send_sigurg(struct sock *sk);
772 772
@@ -1201,7 +1201,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
1201 1201
1202static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, 1202static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
1203 int size, int mem, 1203 int size, int mem,
1204 unsigned int __nocast gfp) 1204 gfp_t gfp)
1205{ 1205{
1206 struct sk_buff *skb; 1206 struct sk_buff *skb;
1207 int hdr_len; 1207 int hdr_len;
@@ -1224,7 +1224,7 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
1224 1224
1225static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, 1225static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk,
1226 int size, 1226 int size,
1227 unsigned int __nocast gfp) 1227 gfp_t gfp)
1228{ 1228{
1229 return sk_stream_alloc_pskb(sk, size, 0, gfp); 1229 return sk_stream_alloc_pskb(sk, size, 0, gfp);
1230} 1230}
@@ -1255,7 +1255,7 @@ static inline int sock_writeable(const struct sock *sk)
1255 return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); 1255 return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2);
1256} 1256}
1257 1257
1258static inline unsigned int __nocast gfp_any(void) 1258static inline gfp_t gfp_any(void)
1259{ 1259{
1260 return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; 1260 return in_softirq() ? GFP_ATOMIC : GFP_KERNEL;
1261} 1261}
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 97af77c4d096..c24339c4e310 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -460,8 +460,7 @@ extern void tcp_send_probe0(struct sock *);
460extern void tcp_send_partial(struct sock *); 460extern void tcp_send_partial(struct sock *);
461extern int tcp_write_wakeup(struct sock *); 461extern int tcp_write_wakeup(struct sock *);
462extern void tcp_send_fin(struct sock *sk); 462extern void tcp_send_fin(struct sock *sk);
463extern void tcp_send_active_reset(struct sock *sk, 463extern void tcp_send_active_reset(struct sock *sk, gfp_t priority);
464 unsigned int __nocast priority);
465extern int tcp_send_synack(struct sock *); 464extern int tcp_send_synack(struct sock *);
466extern void tcp_push_one(struct sock *, unsigned int mss_now); 465extern void tcp_push_one(struct sock *, unsigned int mss_now);
467extern void tcp_send_ack(struct sock *sk); 466extern void tcp_send_ack(struct sock *sk);
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index b6e72f890c6c..5beae1ccd574 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -875,7 +875,7 @@ static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsig
875} 875}
876#endif 876#endif
877 877
878struct xfrm_policy *xfrm_policy_alloc(unsigned int __nocast gfp); 878struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp);
879extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *); 879extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *);
880int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); 880int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl);
881struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel, 881struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel,
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h
index 0e293fe733b0..4172e6841e3d 100644
--- a/include/rdma/ib_mad.h
+++ b/include/rdma/ib_mad.h
@@ -596,7 +596,7 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent,
596 u32 remote_qpn, u16 pkey_index, 596 u32 remote_qpn, u16 pkey_index,
597 struct ib_ah *ah, int rmpp_active, 597 struct ib_ah *ah, int rmpp_active,
598 int hdr_len, int data_len, 598 int hdr_len, int data_len,
599 unsigned int __nocast gfp_mask); 599 gfp_t gfp_mask);
600 600
601/** 601/**
602 * ib_free_send_mad - Returns data buffers used to send a MAD. 602 * ib_free_send_mad - Returns data buffers used to send a MAD.
diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h
index a7555c800ecf..f404fe21cc21 100644
--- a/include/rdma/ib_sa.h
+++ b/include/rdma/ib_sa.h
@@ -285,7 +285,7 @@ void ib_sa_cancel_query(int id, struct ib_sa_query *query);
285int ib_sa_path_rec_get(struct ib_device *device, u8 port_num, 285int ib_sa_path_rec_get(struct ib_device *device, u8 port_num,
286 struct ib_sa_path_rec *rec, 286 struct ib_sa_path_rec *rec,
287 ib_sa_comp_mask comp_mask, 287 ib_sa_comp_mask comp_mask,
288 int timeout_ms, unsigned int __nocast gfp_mask, 288 int timeout_ms, gfp_t gfp_mask,
289 void (*callback)(int status, 289 void (*callback)(int status,
290 struct ib_sa_path_rec *resp, 290 struct ib_sa_path_rec *resp,
291 void *context), 291 void *context),
@@ -296,7 +296,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num,
296 u8 method, 296 u8 method,
297 struct ib_sa_mcmember_rec *rec, 297 struct ib_sa_mcmember_rec *rec,
298 ib_sa_comp_mask comp_mask, 298 ib_sa_comp_mask comp_mask,
299 int timeout_ms, unsigned int __nocast gfp_mask, 299 int timeout_ms, gfp_t gfp_mask,
300 void (*callback)(int status, 300 void (*callback)(int status,
301 struct ib_sa_mcmember_rec *resp, 301 struct ib_sa_mcmember_rec *resp,
302 void *context), 302 void *context),
@@ -307,7 +307,7 @@ int ib_sa_service_rec_query(struct ib_device *device, u8 port_num,
307 u8 method, 307 u8 method,
308 struct ib_sa_service_rec *rec, 308 struct ib_sa_service_rec *rec,
309 ib_sa_comp_mask comp_mask, 309 ib_sa_comp_mask comp_mask,
310 int timeout_ms, unsigned int __nocast gfp_mask, 310 int timeout_ms, gfp_t gfp_mask,
311 void (*callback)(int status, 311 void (*callback)(int status,
312 struct ib_sa_service_rec *resp, 312 struct ib_sa_service_rec *resp,
313 void *context), 313 void *context),
@@ -342,7 +342,7 @@ static inline int
342ib_sa_mcmember_rec_set(struct ib_device *device, u8 port_num, 342ib_sa_mcmember_rec_set(struct ib_device *device, u8 port_num,
343 struct ib_sa_mcmember_rec *rec, 343 struct ib_sa_mcmember_rec *rec,
344 ib_sa_comp_mask comp_mask, 344 ib_sa_comp_mask comp_mask,
345 int timeout_ms, unsigned int __nocast gfp_mask, 345 int timeout_ms, gfp_t gfp_mask,
346 void (*callback)(int status, 346 void (*callback)(int status,
347 struct ib_sa_mcmember_rec *resp, 347 struct ib_sa_mcmember_rec *resp,
348 void *context), 348 void *context),
@@ -384,7 +384,7 @@ static inline int
384ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num, 384ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num,
385 struct ib_sa_mcmember_rec *rec, 385 struct ib_sa_mcmember_rec *rec,
386 ib_sa_comp_mask comp_mask, 386 ib_sa_comp_mask comp_mask,
387 int timeout_ms, unsigned int __nocast gfp_mask, 387 int timeout_ms, gfp_t gfp_mask,
388 void (*callback)(int status, 388 void (*callback)(int status,
389 struct ib_sa_mcmember_rec *resp, 389 struct ib_sa_mcmember_rec *resp,
390 void *context), 390 void *context),
diff --git a/include/rxrpc/call.h b/include/rxrpc/call.h
index 8118731e7d96..b86f83743510 100644
--- a/include/rxrpc/call.h
+++ b/include/rxrpc/call.h
@@ -203,7 +203,7 @@ extern int rxrpc_call_write_data(struct rxrpc_call *call,
203 size_t sioc, 203 size_t sioc,
204 struct kvec *siov, 204 struct kvec *siov,
205 uint8_t rxhdr_flags, 205 uint8_t rxhdr_flags,
206 unsigned int __nocast alloc_flags, 206 gfp_t alloc_flags,
207 int dup_data, 207 int dup_data,
208 size_t *size_sent); 208 size_t *size_sent);
209 209
diff --git a/include/rxrpc/message.h b/include/rxrpc/message.h
index 983d9f9eee1a..b318f273d4f2 100644
--- a/include/rxrpc/message.h
+++ b/include/rxrpc/message.h
@@ -63,7 +63,7 @@ extern int rxrpc_conn_newmsg(struct rxrpc_connection *conn,
63 uint8_t type, 63 uint8_t type,
64 int count, 64 int count,
65 struct kvec *diov, 65 struct kvec *diov,
66 unsigned int __nocast alloc_flags, 66 gfp_t alloc_flags,
67 struct rxrpc_message **_msg); 67 struct rxrpc_message **_msg);
68 68
69extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg); 69extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg);
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 2857cf0472df..d11f34832a97 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -527,6 +527,8 @@ struct _snd_ac97 {
527 struct device dev; 527 struct device dev;
528}; 528};
529 529
530#define to_ac97_t(d) container_of(d, struct _snd_ac97, dev)
531
530/* conditions */ 532/* conditions */
531static inline int ac97_is_audio(ac97_t * ac97) 533static inline int ac97_is_audio(ac97_t * ac97)
532{ 534{
diff --git a/include/sound/core.h b/include/sound/core.h
index 26160adcdffc..6d971a4c4ca0 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -290,13 +290,13 @@ void snd_memory_init(void);
290void snd_memory_done(void); 290void snd_memory_done(void);
291int snd_memory_info_init(void); 291int snd_memory_info_init(void);
292int snd_memory_info_done(void); 292int snd_memory_info_done(void);
293void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags); 293void *snd_hidden_kmalloc(size_t size, gfp_t flags);
294void *snd_hidden_kzalloc(size_t size, unsigned int __nocast flags); 294void *snd_hidden_kzalloc(size_t size, gfp_t flags);
295void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags); 295void *snd_hidden_kcalloc(size_t n, size_t size, gfp_t flags);
296void snd_hidden_kfree(const void *obj); 296void snd_hidden_kfree(const void *obj);
297void *snd_hidden_vmalloc(unsigned long size); 297void *snd_hidden_vmalloc(unsigned long size);
298void snd_hidden_vfree(void *obj); 298void snd_hidden_vfree(void *obj);
299char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags); 299char *snd_hidden_kstrdup(const char *s, gfp_t flags);
300#define kmalloc(size, flags) snd_hidden_kmalloc(size, flags) 300#define kmalloc(size, flags) snd_hidden_kmalloc(size, flags)
301#define kzalloc(size, flags) snd_hidden_kzalloc(size, flags) 301#define kzalloc(size, flags) snd_hidden_kzalloc(size, flags)
302#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags) 302#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags)
diff --git a/include/sound/driver.h b/include/sound/driver.h
index 0d12456ec3ae..1ec2fae050a6 100644
--- a/include/sound/driver.h
+++ b/include/sound/driver.h
@@ -51,7 +51,7 @@
51#ifdef CONFIG_SND_DEBUG_MEMORY 51#ifdef CONFIG_SND_DEBUG_MEMORY
52#include <linux/slab.h> 52#include <linux/slab.h>
53#include <linux/vmalloc.h> 53#include <linux/vmalloc.h>
54void *snd_wrapper_kmalloc(size_t, unsigned int __nocast); 54void *snd_wrapper_kmalloc(size_t, gfp_t);
55#undef kmalloc 55#undef kmalloc
56void snd_wrapper_kfree(const void *); 56void snd_wrapper_kfree(const void *);
57#undef kfree 57#undef kfree
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 67bf3f18e96a..14cb2718cb77 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1059,7 +1059,7 @@ typedef struct {
1059 unsigned char spk71; /* Has 7.1 speakers */ 1059 unsigned char spk71; /* Has 7.1 speakers */
1060 unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */ 1060 unsigned char sblive51; /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */
1061 unsigned char spdif_bug; /* Has Spdif phasing bug */ 1061 unsigned char spdif_bug; /* Has Spdif phasing bug */
1062 unsigned char ac97_chip; /* Has an AC97 chip */ 1062 unsigned char ac97_chip; /* Has an AC97 chip: 1 = mandatory, 2 = optional */
1063 unsigned char ecard; /* APS EEPROM */ 1063 unsigned char ecard; /* APS EEPROM */
1064 const char *driver; 1064 const char *driver;
1065 const char *name; 1065 const char *name;