aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acct.h1
-rw-r--r--include/linux/ata.h14
-rw-r--r--include/linux/cpu.h8
-rw-r--r--include/linux/elf.h7
-rw-r--r--include/linux/fs.h37
-rw-r--r--include/linux/igmp.h1
-rw-r--r--include/linux/kernelcapi.h2
-rw-r--r--include/linux/libata.h52
-rw-r--r--include/linux/module.h13
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack.h1
-rw-r--r--include/linux/pata_platform.h13
-rw-r--r--include/linux/poll.h3
-rw-r--r--include/linux/radix-tree.h1
-rw-r--r--include/linux/skbuff.h22
-rw-r--r--include/linux/types.h14
16 files changed, 81 insertions, 109 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h
index 0496d1f09952..302eb727ecb8 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -119,6 +119,7 @@ struct acct_v3
119#ifdef CONFIG_BSD_PROCESS_ACCT 119#ifdef CONFIG_BSD_PROCESS_ACCT
120struct vfsmount; 120struct vfsmount;
121struct super_block; 121struct super_block;
122struct pacct_struct;
122extern void acct_auto_close_mnt(struct vfsmount *m); 123extern void acct_auto_close_mnt(struct vfsmount *m);
123extern void acct_auto_close(struct super_block *sb); 124extern void acct_auto_close(struct super_block *sb);
124extern void acct_init_pacct(struct pacct_struct *pacct); 125extern void acct_init_pacct(struct pacct_struct *pacct);
diff --git a/include/linux/ata.h b/include/linux/ata.h
index d89441907024..1df941648a57 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -200,8 +200,9 @@ enum {
200 ATA_CBL_NONE = 0, 200 ATA_CBL_NONE = 0,
201 ATA_CBL_PATA40 = 1, 201 ATA_CBL_PATA40 = 1,
202 ATA_CBL_PATA80 = 2, 202 ATA_CBL_PATA80 = 2,
203 ATA_CBL_PATA_UNK = 3, 203 ATA_CBL_PATA40_SHORT = 3, /* 40 wire cable to high UDMA spec */
204 ATA_CBL_SATA = 4, 204 ATA_CBL_PATA_UNK = 4,
205 ATA_CBL_SATA = 5,
205 206
206 /* SATA Status and Control Registers */ 207 /* SATA Status and Control Registers */
207 SCR_STATUS = 0, 208 SCR_STATUS = 0,
@@ -342,6 +343,15 @@ static inline int ata_id_is_cfa(const u16 *id)
342 return 0; 343 return 0;
343} 344}
344 345
346static inline int ata_drive_40wire(const u16 *dev_id)
347{
348 if (ata_id_major_version(dev_id) >= 5 && ata_id_is_sata(dev_id))
349 return 0; /* SATA */
350 if (dev_id[93] & 0x4000)
351 return 0; /* 80 wire */
352 return 1;
353}
354
345static inline int atapi_cdb_len(const u16 *dev_id) 355static inline int atapi_cdb_len(const u16 *dev_id)
346{ 356{
347 u16 tmp = dev_id[0] & 0x3; 357 u16 tmp = dev_id[0] & 0x3;
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 3fef7d67aedc..f02d71bf6894 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -33,6 +33,14 @@ struct cpu {
33 33
34extern int register_cpu(struct cpu *cpu, int num); 34extern int register_cpu(struct cpu *cpu, int num);
35extern struct sys_device *get_cpu_sysdev(unsigned cpu); 35extern struct sys_device *get_cpu_sysdev(unsigned cpu);
36
37extern int cpu_add_sysdev_attr(struct sysdev_attribute *attr);
38extern void cpu_remove_sysdev_attr(struct sysdev_attribute *attr);
39
40extern int cpu_add_sysdev_attr_group(struct attribute_group *attrs);
41extern void cpu_remove_sysdev_attr_group(struct attribute_group *attrs);
42
43
36#ifdef CONFIG_HOTPLUG_CPU 44#ifdef CONFIG_HOTPLUG_CPU
37extern void unregister_cpu(struct cpu *cpu); 45extern void unregister_cpu(struct cpu *cpu);
38#endif 46#endif
diff --git a/include/linux/elf.h b/include/linux/elf.h
index b70d1d2c8d28..743d5c8e6d36 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -368,5 +368,12 @@ extern Elf64_Dyn _DYNAMIC [];
368 368
369#endif 369#endif
370 370
371#ifndef ARCH_HAVE_EXTRA_ELF_NOTES
372static inline int arch_notes_size(void) { return 0; }
373static inline void arch_write_notes(struct file *file) { }
374
375#define ELF_CORE_EXTRA_NOTES_SIZE arch_notes_size()
376#define ELF_CORE_WRITE_EXTRA_NOTES arch_write_notes(file)
377#endif /* ARCH_HAVE_EXTRA_ELF_NOTES */
371 378
372#endif /* _LINUX_ELF_H */ 379#endif /* _LINUX_ELF_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2fe6e3f900ba..cac7b1ef9543 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -276,7 +276,7 @@ extern int dir_notify_enable;
276#include <linux/radix-tree.h> 276#include <linux/radix-tree.h>
277#include <linux/prio_tree.h> 277#include <linux/prio_tree.h>
278#include <linux/init.h> 278#include <linux/init.h>
279#include <linux/sched.h> 279#include <linux/pid.h>
280#include <linux/mutex.h> 280#include <linux/mutex.h>
281 281
282#include <asm/atomic.h> 282#include <asm/atomic.h>
@@ -977,36 +977,13 @@ enum {
977#define vfs_check_frozen(sb, level) \ 977#define vfs_check_frozen(sb, level) \
978 wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) 978 wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level)))
979 979
980static inline void get_fs_excl(void) 980#define get_fs_excl() atomic_inc(&current->fs_excl)
981{ 981#define put_fs_excl() atomic_dec(&current->fs_excl)
982 atomic_inc(&current->fs_excl); 982#define has_fs_excl() atomic_read(&current->fs_excl)
983}
984
985static inline void put_fs_excl(void)
986{
987 atomic_dec(&current->fs_excl);
988}
989
990static inline int has_fs_excl(void)
991{
992 return atomic_read(&current->fs_excl);
993}
994 983
995 984/* not quite ready to be deprecated, but... */
996/* 985extern void lock_super(struct super_block *);
997 * Superblock locking. 986extern void unlock_super(struct super_block *);
998 */
999static inline void lock_super(struct super_block * sb)
1000{
1001 get_fs_excl();
1002 mutex_lock(&sb->s_lock);
1003}
1004
1005static inline void unlock_super(struct super_block * sb)
1006{
1007 put_fs_excl();
1008 mutex_unlock(&sb->s_lock);
1009}
1010 987
1011/* 988/*
1012 * VFS helper functions.. 989 * VFS helper functions..
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index 6e7ea2f0a57c..9dbb525c5178 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -127,6 +127,7 @@ struct igmpv3_query {
127 127
128#ifdef __KERNEL__ 128#ifdef __KERNEL__
129#include <linux/skbuff.h> 129#include <linux/skbuff.h>
130#include <linux/timer.h>
130#include <linux/in.h> 131#include <linux/in.h>
131 132
132extern int sysctl_igmp_max_memberships; 133extern int sysctl_igmp_max_memberships;
diff --git a/include/linux/kernelcapi.h b/include/linux/kernelcapi.h
index 891bb2cf0aa8..aea34e74c496 100644
--- a/include/linux/kernelcapi.h
+++ b/include/linux/kernelcapi.h
@@ -47,6 +47,8 @@ typedef struct kcapi_carddef {
47 47
48#include <linux/list.h> 48#include <linux/list.h>
49#include <linux/skbuff.h> 49#include <linux/skbuff.h>
50#include <linux/workqueue.h>
51#include <asm/semaphore.h>
50 52
51#define KCI_CONTRUP 0 /* arg: struct capi_profile */ 53#define KCI_CONTRUP 0 /* arg: struct capi_profile */
52#define KCI_CONTRDOWN 1 /* arg: NULL */ 54#define KCI_CONTRDOWN 1 /* arg: NULL */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b3f32eadbef5..ab2754830322 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -140,6 +140,7 @@ enum {
140 ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */ 140 ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */
141 ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ 141 ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */
142 ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ 142 ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */
143 ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */
143 ATA_DFLAG_CFG_MASK = (1 << 8) - 1, 144 ATA_DFLAG_CFG_MASK = (1 << 8) - 1,
144 145
145 ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ 146 ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */
@@ -175,6 +176,7 @@ enum {
175 ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H 176 ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H
176 * Register FIS clearing BSY */ 177 * Register FIS clearing BSY */
177 ATA_FLAG_DEBUGMSG = (1 << 13), 178 ATA_FLAG_DEBUGMSG = (1 << 13),
179 ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */
178 180
179 /* The following flag belongs to ap->pflags but is kept in 181 /* The following flag belongs to ap->pflags but is kept in
180 * ap->flags because it's referenced in many LLDs and will be 182 * ap->flags because it's referenced in many LLDs and will be
@@ -283,6 +285,9 @@ enum {
283 ATA_EHI_QUIET = (1 << 3), /* be quiet */ 285 ATA_EHI_QUIET = (1 << 3), /* be quiet */
284 286
285 ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */ 287 ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */
288 ATA_EHI_PRINTINFO = (1 << 17), /* print configuration info */
289 ATA_EHI_SETMODE = (1 << 18), /* configure transfer mode */
290 ATA_EHI_POST_SETMODE = (1 << 19), /* revaildating after setmode */
286 291
287 ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK, 292 ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK,
288 293
@@ -307,10 +312,11 @@ enum {
307 (some horkage may be drive/controller pair dependant */ 312 (some horkage may be drive/controller pair dependant */
308 313
309 ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ 314 ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */
315 ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */
316 ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */
310}; 317};
311 318
312enum hsm_task_states { 319enum hsm_task_states {
313 HSM_ST_UNKNOWN, /* state unknown */
314 HSM_ST_IDLE, /* no command on going */ 320 HSM_ST_IDLE, /* no command on going */
315 HSM_ST, /* (waiting the device to) transfer data */ 321 HSM_ST, /* (waiting the device to) transfer data */
316 HSM_ST_LAST, /* (waiting the device to) complete command */ 322 HSM_ST_LAST, /* (waiting the device to) complete command */
@@ -329,6 +335,7 @@ enum ata_completion_errors {
329 AC_ERR_SYSTEM = (1 << 6), /* system error */ 335 AC_ERR_SYSTEM = (1 << 6), /* system error */
330 AC_ERR_INVALID = (1 << 7), /* invalid argument */ 336 AC_ERR_INVALID = (1 << 7), /* invalid argument */
331 AC_ERR_OTHER = (1 << 8), /* unknown */ 337 AC_ERR_OTHER = (1 << 8), /* unknown */
338 AC_ERR_NODEV_HINT = (1 << 9), /* polling device detection hint */
332}; 339};
333 340
334/* forward declarations */ 341/* forward declarations */
@@ -701,6 +708,8 @@ extern int sata_phy_debounce(struct ata_port *ap, const unsigned long *param);
701extern int sata_phy_resume(struct ata_port *ap, const unsigned long *param); 708extern int sata_phy_resume(struct ata_port *ap, const unsigned long *param);
702extern int ata_std_prereset(struct ata_port *ap); 709extern int ata_std_prereset(struct ata_port *ap);
703extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); 710extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes);
711extern int sata_port_hardreset(struct ata_port *ap,
712 const unsigned long *timing);
704extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); 713extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class);
705extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); 714extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
706extern void ata_port_disable(struct ata_port *); 715extern void ata_port_disable(struct ata_port *);
@@ -745,9 +754,8 @@ extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg);
745extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); 754extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
746extern void ata_host_resume(struct ata_host *host); 755extern void ata_host_resume(struct ata_host *host);
747extern int ata_ratelimit(void); 756extern int ata_ratelimit(void);
748extern unsigned int ata_busy_sleep(struct ata_port *ap, 757extern int ata_busy_sleep(struct ata_port *ap,
749 unsigned long timeout_pat, 758 unsigned long timeout_pat, unsigned long timeout);
750 unsigned long timeout);
751extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, 759extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn,
752 void *data, unsigned long delay); 760 void *data, unsigned long delay);
753extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, 761extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
@@ -788,6 +796,7 @@ extern void ata_id_string(const u16 *id, unsigned char *s,
788 unsigned int ofs, unsigned int len); 796 unsigned int ofs, unsigned int len);
789extern void ata_id_c_string(const u16 *id, unsigned char *s, 797extern void ata_id_c_string(const u16 *id, unsigned char *s,
790 unsigned int ofs, unsigned int len); 798 unsigned int ofs, unsigned int len);
799extern unsigned long ata_device_blacklisted(const struct ata_device *dev);
791extern void ata_bmdma_setup (struct ata_queued_cmd *qc); 800extern void ata_bmdma_setup (struct ata_queued_cmd *qc);
792extern void ata_bmdma_start (struct ata_queued_cmd *qc); 801extern void ata_bmdma_start (struct ata_queued_cmd *qc);
793extern void ata_bmdma_stop(struct ata_queued_cmd *qc); 802extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
@@ -1062,7 +1071,7 @@ static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits,
1062 udelay(10); 1071 udelay(10);
1063 status = ata_chk_status(ap); 1072 status = ata_chk_status(ap);
1064 max--; 1073 max--;
1065 } while ((status & bits) && (max > 0)); 1074 } while (status != 0xff && (status & bits) && (max > 0));
1066 1075
1067 return status; 1076 return status;
1068} 1077}
@@ -1083,7 +1092,7 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
1083{ 1092{
1084 u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); 1093 u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
1085 1094
1086 if (status & (ATA_BUSY | ATA_DRQ)) { 1095 if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) {
1087 unsigned long l = ap->ioaddr.status_addr; 1096 unsigned long l = ap->ioaddr.status_addr;
1088 if (ata_msg_warn(ap)) 1097 if (ata_msg_warn(ap))
1089 printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n", 1098 printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n",
@@ -1149,37 +1158,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
1149} 1158}
1150 1159
1151/** 1160/**
1152 * ata_irq_on - Enable interrupts on a port.
1153 * @ap: Port on which interrupts are enabled.
1154 *
1155 * Enable interrupts on a legacy IDE device using MMIO or PIO,
1156 * wait for idle, clear any pending interrupts.
1157 *
1158 * LOCKING:
1159 * Inherited from caller.
1160 */
1161
1162static inline u8 ata_irq_on(struct ata_port *ap)
1163{
1164 struct ata_ioports *ioaddr = &ap->ioaddr;
1165 u8 tmp;
1166
1167 ap->ctl &= ~ATA_NIEN;
1168 ap->last_ctl = ap->ctl;
1169
1170 if (ap->flags & ATA_FLAG_MMIO)
1171 writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr);
1172 else
1173 outb(ap->ctl, ioaddr->ctl_addr);
1174 tmp = ata_wait_idle(ap);
1175
1176 ap->ops->irq_clear(ap);
1177
1178 return tmp;
1179}
1180
1181
1182/**
1183 * ata_irq_ack - Acknowledge a device interrupt. 1161 * ata_irq_ack - Acknowledge a device interrupt.
1184 * @ap: Port on which interrupts are enabled. 1162 * @ap: Port on which interrupts are enabled.
1185 * 1163 *
diff --git a/include/linux/module.h b/include/linux/module.h
index 9258ffd8a7f0..d33df2408e05 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -6,7 +6,6 @@
6 * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 6 * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996
7 * Rewritten again by Rusty Russell, 2002 7 * Rewritten again by Rusty Russell, 2002
8 */ 8 */
9#include <linux/sched.h>
10#include <linux/spinlock.h> 9#include <linux/spinlock.h>
11#include <linux/list.h> 10#include <linux/list.h>
12#include <linux/stat.h> 11#include <linux/stat.h>
@@ -411,17 +410,7 @@ static inline int try_module_get(struct module *module)
411 return ret; 410 return ret;
412} 411}
413 412
414static inline void module_put(struct module *module) 413extern void module_put(struct module *module);
415{
416 if (module) {
417 unsigned int cpu = get_cpu();
418 local_dec(&module->ref[cpu].count);
419 /* Maybe they're waiting for us to drop reference? */
420 if (unlikely(!module_is_live(module)))
421 wake_up_process(module->waiter);
422 put_cpu();
423 }
424}
425 414
426#else /*!CONFIG_MODULE_UNLOAD*/ 415#else /*!CONFIG_MODULE_UNLOAD*/
427static inline int try_module_get(struct module *module) 416static inline int try_module_get(struct module *module)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 949eada46ce1..c57088f575a3 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -30,6 +30,7 @@
30#include <linux/if_packet.h> 30#include <linux/if_packet.h>
31 31
32#ifdef __KERNEL__ 32#ifdef __KERNEL__
33#include <linux/timer.h>
33#include <asm/atomic.h> 34#include <asm/atomic.h>
34#include <asm/cache.h> 35#include <asm/cache.h>
35#include <asm/byteorder.h> 36#include <asm/byteorder.h>
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
index 61da56941dce..33581c13d947 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -9,6 +9,7 @@
9#include <linux/compiler.h> 9#include <linux/compiler.h>
10#include <asm/atomic.h> 10#include <asm/atomic.h>
11 11
12#include <linux/timer.h>
12#include <linux/netfilter_ipv4/ip_conntrack_tcp.h> 13#include <linux/netfilter_ipv4/ip_conntrack_tcp.h>
13#include <linux/netfilter_ipv4/ip_conntrack_icmp.h> 14#include <linux/netfilter_ipv4/ip_conntrack_icmp.h>
14#include <linux/netfilter_ipv4/ip_conntrack_proto_gre.h> 15#include <linux/netfilter_ipv4/ip_conntrack_proto_gre.h>
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h
new file mode 100644
index 000000000000..2d5fd647e0e9
--- /dev/null
+++ b/include/linux/pata_platform.h
@@ -0,0 +1,13 @@
1#ifndef __LINUX_PATA_PLATFORM_H
2#define __LINUX_PATA_PLATFORM_H
3
4struct pata_platform_info {
5 /*
6 * I/O port shift, for platforms with ports that are
7 * constantly spaced and need larger than the 1-byte
8 * spacing used by ata_std_ports().
9 */
10 unsigned int ioport_shift;
11};
12
13#endif /* __LINUX_PATA_PLATFORM_H */
diff --git a/include/linux/poll.h b/include/linux/poll.h
index 51e1b56741fb..27690798623f 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -8,7 +8,8 @@
8#include <linux/compiler.h> 8#include <linux/compiler.h>
9#include <linux/wait.h> 9#include <linux/wait.h>
10#include <linux/string.h> 10#include <linux/string.h>
11#include <linux/mm.h> 11#include <linux/fs.h>
12#include <linux/sched.h>
12#include <asm/uaccess.h> 13#include <asm/uaccess.h>
13 14
14/* ~832 bytes of stack space used max in sys_select/sys_poll before allocating 15/* ~832 bytes of stack space used max in sys_select/sys_poll before allocating
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 9158a68140c9..cbfa11537421 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -19,7 +19,6 @@
19#ifndef _LINUX_RADIX_TREE_H 19#ifndef _LINUX_RADIX_TREE_H
20#define _LINUX_RADIX_TREE_H 20#define _LINUX_RADIX_TREE_H
21 21
22#include <linux/sched.h>
23#include <linux/preempt.h> 22#include <linux/preempt.h>
24#include <linux/types.h> 23#include <linux/types.h>
25 24
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 14ec16d2d9ba..a05a5f7c0b73 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -22,12 +22,10 @@
22#include <asm/atomic.h> 22#include <asm/atomic.h>
23#include <asm/types.h> 23#include <asm/types.h>
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/mm.h>
26#include <linux/highmem.h>
27#include <linux/poll.h>
28#include <linux/net.h> 25#include <linux/net.h>
29#include <linux/textsearch.h> 26#include <linux/textsearch.h>
30#include <net/checksum.h> 27#include <net/checksum.h>
28#include <linux/rcupdate.h>
31#include <linux/dmaengine.h> 29#include <linux/dmaengine.h>
32 30
33#define HAVE_ALLOC_SKB /* For the drivers to know */ 31#define HAVE_ALLOC_SKB /* For the drivers to know */
@@ -1295,24 +1293,6 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
1295 return __pskb_trim(skb, len); 1293 return __pskb_trim(skb, len);
1296} 1294}
1297 1295
1298static inline void *kmap_skb_frag(const skb_frag_t *frag)
1299{
1300#ifdef CONFIG_HIGHMEM
1301 BUG_ON(in_irq());
1302
1303 local_bh_disable();
1304#endif
1305 return kmap_atomic(frag->page, KM_SKB_DATA_SOFTIRQ);
1306}
1307
1308static inline void kunmap_skb_frag(void *vaddr)
1309{
1310 kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
1311#ifdef CONFIG_HIGHMEM
1312 local_bh_enable();
1313#endif
1314}
1315
1316#define skb_queue_walk(queue, skb) \ 1296#define skb_queue_walk(queue, skb) \
1317 for (skb = (queue)->next; \ 1297 for (skb = (queue)->next; \
1318 prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ 1298 prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \
diff --git a/include/linux/types.h b/include/linux/types.h
index 745c409ebbb5..0351bf2fac85 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -136,15 +136,19 @@ typedef __s64 int64_t;
136 * 136 *
137 * Linux always considers sectors to be 512 bytes long independently 137 * Linux always considers sectors to be 512 bytes long independently
138 * of the devices real block size. 138 * of the devices real block size.
139 *
140 * If required, asm/types.h can override it and define
141 * HAVE_SECTOR_T
142 */ 139 */
143#ifndef HAVE_SECTOR_T 140#ifdef CONFIG_LBD
141typedef u64 sector_t;
142#else
144typedef unsigned long sector_t; 143typedef unsigned long sector_t;
145#endif 144#endif
146 145
147#ifndef HAVE_BLKCNT_T 146/*
147 * The type of the inode's block count.
148 */
149#ifdef CONFIG_LSF
150typedef u64 blkcnt_t;
151#else
148typedef unsigned long blkcnt_t; 152typedef unsigned long blkcnt_t;
149#endif 153#endif
150 154