diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/etherdevice.h | 3 | ||||
| -rw-r--r-- | include/linux/ethtool.h | 1 | ||||
| -rw-r--r-- | include/linux/fs.h | 1 | ||||
| -rw-r--r-- | include/linux/if_ec.h | 3 | ||||
| -rw-r--r-- | include/linux/if_ether.h | 6 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 2 | ||||
| -rw-r--r-- | include/linux/ntfs_fs_i.h | 23 | ||||
| -rw-r--r-- | include/linux/ntfs_fs_sb.h | 17 | ||||
| -rw-r--r-- | include/linux/pci.h | 11 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 82 | ||||
| -rw-r--r-- | include/linux/proc_fs.h | 30 | ||||
| -rw-r--r-- | include/linux/rwsem-spinlock.h | 10 | ||||
| -rw-r--r-- | include/linux/rwsem.h | 14 | ||||
| -rw-r--r-- | include/linux/sched.h | 2 |
14 files changed, 144 insertions, 61 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 6c72b8d596b6..bac9b4d5ad03 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h @@ -51,7 +51,8 @@ static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, i * @addr: Pointer to a six-byte array containing the Ethernet address * * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not - * a multicast address, and is not FF:FF:FF:FF:FF:FF. + * a multicast address, and is not FF:FF:FF:FF:FF:FF. The multicast + * and FF:FF:... tests are combined into the single test "!(addr[0]&1)". * * Return true if the address is valid. */ diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index c1106729db92..e5e4075c18d2 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -2,6 +2,7 @@ * ethtool.h: Defines for Linux ethtool. * * Copyright (C) 1998 David S. Miller (davem@redhat.com) + * Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com> */ #ifndef _LINUX_ETHTOOL_H diff --git a/include/linux/fs.h b/include/linux/fs.h index 2664334a076d..ae22bc2d0f00 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1252,7 +1252,6 @@ static inline void bforget(struct buffer_head *buf) __bforget(buf); } extern void set_blocksize(kdev_t, int); -extern unsigned int get_hardblocksize(kdev_t); extern struct buffer_head * bread(kdev_t, int, int); extern void wakeup_bdflush(int wait); diff --git a/include/linux/if_ec.h b/include/linux/if_ec.h index 8de2f6b69cfb..74818238ad82 100644 --- a/include/linux/if_ec.h +++ b/include/linux/if_ec.h @@ -60,9 +60,6 @@ struct ec_device unsigned char station, net; /* Econet protocol address */ }; -extern struct sock *ec_listening_socket(unsigned char port, unsigned char - station, unsigned char net); - #endif #endif diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 9c746e873e8d..e9191ba97fe2 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h @@ -37,12 +37,14 @@ */ #define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ -#define ETH_P_ECHO 0x0200 /* Ethernet Echo packet */ -#define ETH_P_PUP 0x0400 /* Xerox PUP packet */ +#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ +#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ #define ETH_P_IP 0x0800 /* Internet Protocol packet */ #define ETH_P_X25 0x0805 /* CCITT X.25 */ #define ETH_P_ARP 0x0806 /* Address Resolution packet */ #define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ +#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ #define ETH_P_DEC 0x6000 /* DEC Assigned proto */ #define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ #define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 06c7b4c87365..830d9113645e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -565,7 +565,7 @@ extern int netdev_nit; static inline void dev_init_buffers(struct net_device *dev) { - /* DO NOTHING */ + /* WILL BE REMOVED IN 2.5.0 */ } extern int netdev_finish_unregister(struct net_device *dev); diff --git a/include/linux/ntfs_fs_i.h b/include/linux/ntfs_fs_i.h index 3ac18ea47e07..291c1cc0b2b7 100644 --- a/include/linux/ntfs_fs_i.h +++ b/include/linux/ntfs_fs_i.h @@ -60,24 +60,23 @@ typedef unsigned long long ntfs_time64_t; typedef unsigned int ntfs_cluster_t; #endif -/* Definition of NTFS in-memory inode structure */ +/* Definition of the NTFS in-memory inode structure. */ struct ntfs_inode_info{ unsigned long mmu_private; struct ntfs_sb_info *vol; - int i_number; /* should be really 48 bits */ - unsigned sequence_number; - unsigned char* attr; /* array of the attributes */ - int attr_count; /* size of attrs[] */ + int i_number; /* Should be really 48 bits. */ + __u16 sequence_number; /* The current sequence number. */ + unsigned char* attr; /* Array of the attributes. */ + int attr_count; /* Size of attrs[]. */ struct ntfs_attribute *attrs; - int record_count; /* size of records[] */ - /* array of the record numbers of the MFT - whose attributes have been inserted in the inode */ - int *records; - union{ - struct{ + int record_count; /* Size of records[]. */ + int *records; /* Array of the record numbers of the $Mft whose + * attributes have been inserted in the inode. */ + union { + struct { int recordsize; int clusters_per_record; - }index; + } index; } u; }; diff --git a/include/linux/ntfs_fs_sb.h b/include/linux/ntfs_fs_sb.h index 4b958337ffb7..6dd718c99ea2 100644 --- a/include/linux/ntfs_fs_sb.h +++ b/include/linux/ntfs_fs_sb.h @@ -2,16 +2,17 @@ #define _LINUX_NTFS_FS_SB_H struct ntfs_sb_info{ - /* Configuration provided by user at mount time */ + /* Configuration provided by user at mount time. */ ntfs_uid_t uid; ntfs_gid_t gid; ntmode_t umask; unsigned int nct; void *nls_map; unsigned int ngt; - /* Configuration provided by user with ntfstools */ - ntfs_size_t partition_bias; /* for access to underlying device */ - /* Attribute definitions */ + /* Configuration provided by user with the ntfstools. + * FIXME: This is no longer possible. What is this good for? (AIA) */ + ntfs_size_t partition_bias; /* For access to underlying device. */ + /* Attribute definitions. */ ntfs_u32 at_standard_information; ntfs_u32 at_attribute_list; ntfs_u32 at_file_name; @@ -24,20 +25,20 @@ struct ntfs_sb_info{ ntfs_u32 at_index_allocation; ntfs_u32 at_bitmap; ntfs_u32 at_symlink; /* aka SYMBOLIC_LINK or REPARSE_POINT */ - /* Data read from the boot file */ + /* Data read / calculated from the boot file. */ int blocksize; - int clusterfactor; + int clusterfactorbits; int clustersize; int mft_recordsize; int mft_clusters_per_record; int index_recordsize; int index_clusters_per_record; int mft_cluster; - /* data read from special files */ + /* Data read from special files. */ unsigned char *mft; unsigned short *upcase; unsigned int upcase_length; - /* inodes we always hold onto */ + /* Inodes we always hold onto. */ struct ntfs_inode_info *mft_ino; struct ntfs_inode_info *mftmirr; struct ntfs_inode_info *bitmap; diff --git a/include/linux/pci.h b/include/linux/pci.h index 6545dd7fc5dc..ffea2d01aea8 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -525,7 +525,9 @@ int pci_write_config_byte(struct pci_dev *dev, int where, u8 val); int pci_write_config_word(struct pci_dev *dev, int where, u16 val); int pci_write_config_dword(struct pci_dev *dev, int where, u32 val); +#define HAVE_PCI_DISABLE_DEVICE int pci_enable_device(struct pci_dev *dev); +void pci_disable_device(struct pci_dev *dev); void pci_set_master(struct pci_dev *dev); int pci_set_dma_mask(struct pci_dev *dev, dma_addr_t mask); int pci_set_power_state(struct pci_dev *dev, int state); @@ -552,6 +554,14 @@ void pci_remove_device(struct pci_dev *); struct pci_driver *pci_dev_driver(const struct pci_dev *); const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev); +/* kmem_cache style wrapper around pci_alloc_consistent() */ +struct pci_pool *pci_pool_create (const char *name, struct pci_dev *dev, + size_t size, size_t align, size_t allocation, int flags); +void pci_pool_destroy (struct pci_pool *pool); + +void *pci_pool_alloc (struct pci_pool *pool, int flags, dma_addr_t *handle); +void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr); + #endif /* CONFIG_PCI */ /* Include architecture-dependent settings and functions */ @@ -594,6 +604,7 @@ unsigned int ss_vendor, unsigned int ss_device, const struct pci_dev *from) static inline void pci_set_master(struct pci_dev *dev) { } static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } +static inline void pci_disable_device(struct pci_dev *dev) { } static inline int pci_module_init(struct pci_driver *drv) { return -ENODEV; } static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} static inline int pci_register_driver(struct pci_driver *drv) { return 0;} diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 6cb093241600..ee6d0eb47f8d 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -174,14 +174,62 @@ #define PCI_DEVICE_ID_ATI_215LG 0x4c47 #define PCI_DEVICE_ID_ATI_264LT 0x4c54 #define PCI_DEVICE_ID_ATI_264VT 0x5654 +/* Rage128 Pro GL */ +#define PCI_DEVICE_ID_ATI_Rage128_PA 0x5041 +#define PCI_DEVICE_ID_ATI_Rage128_PB 0x5042 +#define PCI_DEVICE_ID_ATI_Rage128_PC 0x5043 +#define PCI_DEVICE_ID_ATI_Rage128_PD 0x5044 +#define PCI_DEVICE_ID_ATI_Rage128_PE 0x5045 +#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046 +/* Rage128 Pro VR */ +#define PCI_DEVICE_ID_ATI_RAGE128_PG 0x5047 +#define PCI_DEVICE_ID_ATI_RAGE128_PH 0x5048 +#define PCI_DEVICE_ID_ATI_RAGE128_PI 0x5049 +#define PCI_DEVICE_ID_ATI_RAGE128_PJ 0x504A +#define PCI_DEVICE_ID_ATI_RAGE128_PK 0x504B +#define PCI_DEVICE_ID_ATI_RAGE128_PL 0x504C +#define PCI_DEVICE_ID_ATI_RAGE128_PM 0x504D +#define PCI_DEVICE_ID_ATI_RAGE128_PN 0x504E +#define PCI_DEVICE_ID_ATI_RAGE128_PO 0x504F +#define PCI_DEVICE_ID_ATI_RAGE128_PP 0x5050 +#define PCI_DEVICE_ID_ATI_RAGE128_PQ 0x5051 +#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052 +#define PCI_DEVICE_ID_ATI_RAGE128_PS 0x5053 +#define PCI_DEVICE_ID_ATI_RAGE128_PT 0x5054 +#define PCI_DEVICE_ID_ATI_RAGE128_PU 0x5055 +#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056 +#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057 +#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058 +/* Rage128 GL */ #define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245 #define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246 +#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x534b +#define PCI_DEVICE_ID_ATI_RAGE128_RH 0x534c +#define PCI_DEVICE_ID_ATI_RAGE128_RI 0x534d +/* Rage128 VR */ #define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b #define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c -#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046 -#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052 +#define PCI_DEVICE_ID_ATI_RAGE128_RM 0x5345 +#define PCI_DEVICE_ID_ATI_RAGE128_RN 0x5346 +#define PCI_DEVICE_ID_ATI_RAGE128_RO 0x5347 +/* Rage128 M3 */ #define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45 #define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46 +/* Rage128 Pro Ultra */ +#define PCI_DEVICE_ID_ATI_RAGE128_U1 0x5446 +#define PCI_DEVICE_ID_ATI_RAGE128_U2 0x544C +#define PCI_DEVICE_ID_ATI_RAGE128_U3 0x5452 +/* Radeon M4 */ +#define PCI_DEVICE_ID_ATI_RADEON_LE 0x4d45 +#define PCI_DEVICE_ID_ATI_RADEON_LF 0x4d46 +/* Radeon NV-100 */ +#define PCI_DEVICE_ID_ATI_RADEON_N1 0x5159 +#define PCI_DEVICE_ID_ATI_RADEON_N2 0x515a +/* Radeon */ +#define PCI_DEVICE_ID_ATI_RADEON_RA 0x5144 +#define PCI_DEVICE_ID_ATI_RADEON_RB 0x5145 +#define PCI_DEVICE_ID_ATI_RADEON_RC 0x5146 +#define PCI_DEVICE_ID_ATI_RADEON_RD 0x5147 #define PCI_VENDOR_ID_VLSI 0x1004 #define PCI_DEVICE_ID_VLSI_82C592 0x0005 @@ -376,8 +424,15 @@ #define PCI_DEVICE_ID_SI_7001 0x7001 #define PCI_VENDOR_ID_HP 0x103c +#define PCI_DEVICE_ID_HP_DONNER_GFX 0x1008 +#define PCI_DEVICE_ID_HP_TACHYON 0x1028 +#define PCI_DEVICE_ID_HP_TACHLITE 0x1029 #define PCI_DEVICE_ID_HP_J2585A 0x1030 #define PCI_DEVICE_ID_HP_J2585B 0x1031 +#define PCI_DEVICE_ID_HP_SAS 0x1048 +#define PCI_DEVICE_ID_HP_DIVA1 0x1049 +#define PCI_DEVICE_ID_HP_DIVA2 0x104A +#define PCI_DEVICE_ID_HP_SP2_0 0x104B #define PCI_VENDOR_ID_PCTECH 0x1042 #define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 @@ -408,6 +463,10 @@ #define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 #define PCI_DEVICE_ID_ELSA_QS3000 0x3000 +#define PCI_VENDOR_ID_ELSA 0x1048 +#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 +#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 + #define PCI_VENDOR_ID_SGS 0x104a #define PCI_DEVICE_ID_SGS_2000 0x0008 #define PCI_DEVICE_ID_SGS_1764 0x0009 @@ -658,6 +717,11 @@ #define PCI_DEVICE_ID_AL_M1531 0x1531 #define PCI_DEVICE_ID_AL_M1533 0x1533 #define PCI_DEVICE_ID_AL_M1541 0x1541 +#define PCI_DEVICE_ID_AL_M1621 0x1621 +#define PCI_DEVICE_ID_AL_M1631 0x1631 +#define PCI_DEVICE_ID_AL_M1641 0x1641 +#define PCI_DEVICE_ID_AL_M1647 0x1647 +#define PCI_DEVICE_ID_AL_M1651 0x1651 #define PCI_DEVICE_ID_AL_M1543 0x1543 #define PCI_DEVICE_ID_AL_M3307 0x3307 #define PCI_DEVICE_ID_AL_M4803 0x5215 @@ -811,6 +875,9 @@ #define PCI_DEVICE_ID_VIA_8633_1 0xB091 #define PCI_DEVICE_ID_VIA_8367_1 0xB099 +#define PCI_VENDOR_ID_SIEMENS 0x110A +#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 + #define PCI_VENDOR_ID_SMC2 0x1113 #define PCI_DEVICE_ID_SMC2_1211TX 0x1211 @@ -962,6 +1029,10 @@ #define PCI_VENDOR_ID_OMEGA 0x119b #define PCI_DEVICE_ID_OMEGA_82C092G 0x1221 +#define PCI_VENDOR_ID_FUJITSU_ME 0x119e +#define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 +#define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 + #define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9 #define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 @@ -993,6 +1064,9 @@ #define PCI_VENDOR_ID_AURAVISION 0x11d1 #define PCI_DEVICE_ID_AURAVISION_VXP524 0x01f7 +#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 +#define PCI_DEVICE_ID_AD1889JS 0x1889 + #define PCI_VENDOR_ID_IKON 0x11d5 #define PCI_DEVICE_ID_IKON_10115 0x0115 #define PCI_DEVICE_ID_IKON_10117 0x0117 @@ -1087,7 +1161,8 @@ #define PCI_DEVICE_ID_HUGHES_DIRECPC 0x0002 #define PCI_VENDOR_ID_ENSONIQ 0x1274 -#define PCI_DEVICE_ID_ENSONIQ_AUDIOPCI 0x5000 +#define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 +#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 #define PCI_DEVICE_ID_ENSONIQ_ES1371 0x1371 #define PCI_VENDOR_ID_ROCKWELL 0x127A @@ -1345,6 +1420,7 @@ #define PCI_VENDOR_ID_DCI 0x6666 #define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 +#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 #define PCI_VENDOR_ID_GENROCO 0x5555 #define PCI_DEVICE_ID_GENROCO_HFP832 0x0003 diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index e142bb812a6e..61a823354a34 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -132,7 +132,7 @@ extern struct proc_dir_entry *proc_mknod(const char *,mode_t, struct proc_dir_entry *,kdev_t); extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); -extern inline struct proc_dir_entry *create_proc_read_entry(const char *name, +static inline struct proc_dir_entry *create_proc_read_entry(const char *name, mode_t mode, struct proc_dir_entry *base, read_proc_t *read_proc, void * data) { @@ -144,7 +144,7 @@ extern inline struct proc_dir_entry *create_proc_read_entry(const char *name, return res; } -extern inline struct proc_dir_entry *create_proc_info_entry(const char *name, +static inline struct proc_dir_entry *create_proc_info_entry(const char *name, mode_t mode, struct proc_dir_entry *base, get_info_t *get_info) { struct proc_dir_entry *res=create_proc_entry(name,mode,base); @@ -152,44 +152,44 @@ extern inline struct proc_dir_entry *create_proc_info_entry(const char *name, return res; } -extern inline struct proc_dir_entry *proc_net_create(const char *name, +static inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode, get_info_t *get_info) { return create_proc_info_entry(name,mode,proc_net,get_info); } -extern inline void proc_net_remove(const char *name) +static inline void proc_net_remove(const char *name) { remove_proc_entry(name,proc_net); } #else -extern inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode, +static inline struct proc_dir_entry *proc_net_create(const char *name, mode_t mode, get_info_t *get_info) {return NULL;} -extern inline void proc_net_remove(const char *name) {} +static inline void proc_net_remove(const char *name) {} -extern inline struct proc_dir_entry *create_proc_entry(const char *name, +static inline struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, struct proc_dir_entry *parent) { return NULL; } -extern inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {}; -extern inline struct proc_dir_entry *proc_symlink(const char *name, +static inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {}; +static inline struct proc_dir_entry *proc_symlink(const char *name, struct proc_dir_entry *parent,char *dest) {return NULL;} -extern inline struct proc_dir_entry *proc_mknod(const char *name,mode_t mode, +static inline struct proc_dir_entry *proc_mknod(const char *name,mode_t mode, struct proc_dir_entry *parent,kdev_t rdev) {return NULL;} -extern inline struct proc_dir_entry *proc_mkdir(const char *name, +static inline struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent) {return NULL;} -extern inline struct proc_dir_entry *create_proc_read_entry(const char *name, +static inline struct proc_dir_entry *create_proc_read_entry(const char *name, mode_t mode, struct proc_dir_entry *base, int (*read_proc)(char *, char **, off_t, int, int *, void *), void * data) { return NULL; } -extern inline struct proc_dir_entry *create_proc_info_entry(const char *name, +static inline struct proc_dir_entry *create_proc_info_entry(const char *name, mode_t mode, struct proc_dir_entry *base, get_info_t *get_info) { return NULL; } -extern inline void proc_tty_register_driver(struct tty_driver *driver) {}; -extern inline void proc_tty_unregister_driver(struct tty_driver *driver) {}; +static inline void proc_tty_register_driver(struct tty_driver *driver) {}; +static inline void proc_tty_unregister_driver(struct tty_driver *driver) {}; extern struct proc_dir_entry proc_root; diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h index 6aad59b97174..5b00b52fd3da 100644 --- a/include/linux/rwsem-spinlock.h +++ b/include/linux/rwsem-spinlock.h @@ -54,17 +54,13 @@ struct rw_semaphore { #define __RWSEM_DEBUG_MINIT(name) /* */ #endif -#define __RWSEM_INITIALIZER(name,count) \ +#define __RWSEM_INITIALIZER(name) \ { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ __RWSEM_DEBUG_INIT __RWSEM_DEBUG_MINIT(name) } -#define __DECLARE_RWSEM_GENERIC(name,count) \ - struct rw_semaphore name = __RWSEM_INITIALIZER(name,count) - -#define DECLARE_RWSEM(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS) -#define DECLARE_RWSEM_READ_LOCKED(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS-1) -#define DECLARE_RWSEM_WRITE_LOCKED(name) __DECLARE_RWSEM_GENERIC(name,0) +#define DECLARE_RWSEM(name) \ + struct rw_semaphore name = __RWSEM_INITIALIZER(name) static inline void init_rwsem(struct rw_semaphore *sem) { diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index c72a19496c75..9e72e4991094 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h @@ -42,22 +42,22 @@ #include <asm/atomic.h> #include <linux/wait.h> -#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK -#include <linux/rwsem-spinlock.h> /* use a generic implementation */ -#else -#include <asm/rwsem.h> /* use an arch-specific implementation */ -#endif - /* defined contention handler functions for the generic case * - these are also used for the exchange-and-add based algorithm */ -#if defined(CONFIG_RWSEM_GENERIC) || defined(CONFIG_RWSEM_XCHGADD_ALGORITHM) +#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) || defined(CONFIG_RWSEM_XCHGADD_ALGORITHM) /* we use FASTCALL convention for the helpers */ extern struct rw_semaphore *FASTCALL(rwsem_down_read_failed(struct rw_semaphore *sem)); extern struct rw_semaphore *FASTCALL(rwsem_down_write_failed(struct rw_semaphore *sem)); extern struct rw_semaphore *FASTCALL(rwsem_wake(struct rw_semaphore *sem)); #endif +#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK +#include <linux/rwsem-spinlock.h> /* use a generic implementation */ +#else +#include <asm/rwsem.h> /* use an arch-specific implementation */ +#endif + #ifndef rwsemtrace #if RWSEM_DEBUG #include <asm/current.h> diff --git a/include/linux/sched.h b/include/linux/sched.h index 3ca56d69a646..893d0d7bbef1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -239,7 +239,7 @@ extern int mmlist_nr; mm_users: ATOMIC_INIT(2), \ mm_count: ATOMIC_INIT(1), \ map_count: 1, \ - mmap_sem: __RWSEM_INITIALIZER(name.mmap_sem, RW_LOCK_BIAS), \ + mmap_sem: __RWSEM_INITIALIZER(name.mmap_sem), \ page_table_lock: SPIN_LOCK_UNLOCKED, \ mmlist: LIST_HEAD_INIT(name.mmlist), \ } |
