diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-18 00:32:32 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-18 00:32:32 -0700 |
| commit | 367c46394099d2cd79ef899bc85337d158dcb5b5 (patch) | |
| tree | e85b9bc5c784a582c2fff3f7a16f7f0015c8978c /include | |
| parent | a1bed4d5ff69bcf8fa484ad1ab5ba54a08b2593f (diff) | |
| parent | 3932252874162e2c7f7b87ba91f34155b67404a5 (diff) | |
Merge bk://linux-bt.bkbits.net/bt-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/io_apic.h | 7 | ||||
| -rw-r--r-- | include/asm-ppc/div64.h | 23 | ||||
| -rw-r--r-- | include/asm-ppc/pci-bridge.h | 5 | ||||
| -rw-r--r-- | include/asm-ppc/sections.h | 16 | ||||
| -rw-r--r-- | include/asm-ppc/system.h | 6 | ||||
| -rw-r--r-- | include/asm-sparc/ptrace.h | 7 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 1 | ||||
| -rw-r--r-- | include/linux/cdrom.h | 9 | ||||
| -rw-r--r-- | include/linux/device.h | 49 | ||||
| -rw-r--r-- | include/linux/driverfs_fs.h | 2 | ||||
| -rw-r--r-- | include/linux/fs.h | 19 | ||||
| -rw-r--r-- | include/linux/genhd.h | 10 | ||||
| -rw-r--r-- | include/linux/ide.h | 13 | ||||
| -rw-r--r-- | include/linux/isdn.h | 39 | ||||
| -rw-r--r-- | include/linux/isdn_ppp.h | 46 | ||||
| -rw-r--r-- | include/linux/mm.h | 15 | ||||
| -rw-r--r-- | include/linux/security.h | 5 | ||||
| -rw-r--r-- | include/linux/sysfs.h | 51 | ||||
| -rw-r--r-- | include/scsi/sg.h | 2 |
19 files changed, 202 insertions, 123 deletions
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h index 865d995c4312..e26ea03e7347 100644 --- a/include/asm-i386/io_apic.h +++ b/include/asm-i386/io_apic.h @@ -22,9 +22,12 @@ * The structure of the IO-APIC: */ struct IO_APIC_reg_00 { - __u32 __reserved_2 : 24, + __u32 __reserved_2 : 14, + LTS : 1, + delivery_type : 1, + __reserved_1 : 8, ID : 4, - __reserved_1 : 4; + __reserved_0 : 4; } __attribute__ ((packed)); struct IO_APIC_reg_01 { diff --git a/include/asm-ppc/div64.h b/include/asm-ppc/div64.h index 114e6ab34147..ec3ae5bcb3de 100644 --- a/include/asm-ppc/div64.h +++ b/include/asm-ppc/div64.h @@ -1,10 +1,23 @@ #ifndef __PPC_DIV64 #define __PPC_DIV64 -#define do_div(n,base) ({ \ -int __res; \ -__res = ((unsigned long) n) % (unsigned) base; \ -n = ((unsigned long) n) / (unsigned) base; \ -__res; }) +#include <linux/types.h> + +extern u32 __div64_32(u64 *dividend, u32 div); + +#define do_div(n, div) ({ \ + u64 __n = (n); \ + u32 __d = (div); \ + u32 __q, __r; \ + if ((__n >> 32) == 0) { \ + __q = (u32)__n / __d; \ + __r = (u32)__n - __q * __d; \ + (n) = __q; \ + } else { \ + __r = __div64_32(&__n, __d); \ + (n) = __n; \ + } \ + __r; \ +}) #endif diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h index 1d7bec303e02..f17cca329ed9 100644 --- a/include/asm-ppc/pci-bridge.h +++ b/include/asm-ppc/pci-bridge.h @@ -68,6 +68,11 @@ struct pci_controller { struct pci_ops *ops; volatile unsigned int *cfg_addr; volatile unsigned char *cfg_data; + /* + * If set, indirect method will set the cfg_type bit as + * needed to generate type 1 configuration transactions. + */ + int set_cfg_type; /* Currently, we limit ourselves to 1 IO range and 3 mem * ranges since the common pci_bus structure can't handle more diff --git a/include/asm-ppc/sections.h b/include/asm-ppc/sections.h index 1f2f5fd05966..564e1e58f141 100644 --- a/include/asm-ppc/sections.h +++ b/include/asm-ppc/sections.h @@ -2,27 +2,27 @@ #ifndef _PPC_SECTIONS_H #define _PPC_SECTIONS_H -#define __pmac __attribute__ ((__section__ (".text.pmac"))) -#define __pmacdata __attribute__ ((__section__ (".data.pmac"))) +#define __pmac __attribute__ ((__section__ (".pmac.text"))) +#define __pmacdata __attribute__ ((__section__ (".pmac.data"))) #define __pmacfunc(__argpmac) \ __argpmac __pmac; \ __argpmac -#define __prep __attribute__ ((__section__ (".text.prep"))) -#define __prepdata __attribute__ ((__section__ (".data.prep"))) +#define __prep __attribute__ ((__section__ (".prep.text"))) +#define __prepdata __attribute__ ((__section__ (".prep.data"))) #define __prepfunc(__argprep) \ __argprep __prep; \ __argprep -#define __chrp __attribute__ ((__section__ (".text.chrp"))) -#define __chrpdata __attribute__ ((__section__ (".data.chrp"))) +#define __chrp __attribute__ ((__section__ (".chrp.text"))) +#define __chrpdata __attribute__ ((__section__ (".chrp.data"))) #define __chrpfunc(__argchrp) \ __argchrp __chrp; \ __argchrp /* this is actually just common chrp/pmac code, not OF code -- Cort */ -#define __openfirmware __attribute__ ((__section__ (".text.openfirmware"))) -#define __openfirmwaredata __attribute__ ((__section__ (".data.openfirmware"))) +#define __openfirmware __attribute__ ((__section__ (".openfirmware.text"))) +#define __openfirmwaredata __attribute__ ((__section__ (".openfirmware.data"))) #define __openfirmwarefunc(__argopenfirmware) \ __argopenfirmware __openfirmware; \ __argopenfirmware diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index 58a305b6b0c7..8cbe28a3dc91 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h @@ -119,14 +119,14 @@ extern void __xchg_called_with_bad_pointer(void); #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) #define tas(ptr) (xchg((ptr),1)) -static inline unsigned long __xchg(unsigned long x, void * ptr, int size) +static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) { switch (size) { case 4: - return (unsigned long )xchg_u32(ptr, x); + return (unsigned long) xchg_u32(ptr, x); #if 0 /* xchg_u64 doesn't exist on 32-bit PPC */ case 8: - return (unsigned long )xchg_u64(ptr, x); + return (unsigned long) xchg_u64(ptr, x); #endif /* 0 */ } __xchg_called_with_bad_pointer(); diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h index ff3bd04a3253..53d4136efb91 100644 --- a/include/asm-sparc/ptrace.h +++ b/include/asm-sparc/ptrace.h @@ -73,7 +73,12 @@ extern void show_regs(struct pt_regs *); #define REGWIN_SZ 0x40 #endif -#include <asm/asm_offsets.h> +/* + * The asm_offsets.h is a generated file, so we cannot include it. + * It may be OK for glibc headers, but it's utterly pointless for C code. + * The assembly code using those offsets has to include it explicitly. + */ +/* #include <asm/asm_offsets.h> */ /* These are for pt_regs. */ #define PT_PSR 0x0 diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ccb56d58de6a..42e81a4a0cab 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -235,6 +235,7 @@ struct request_queue #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) #define blk_queue_empty(q) elv_queue_empty(q) #define blk_fs_request(rq) ((rq)->flags & REQ_CMD) +#define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC) #define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist) #define rq_data_dir(rq) ((rq)->flags & 1) diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 4387203c95b7..7ac3926382f8 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h @@ -731,7 +731,6 @@ struct cdrom_device_info { struct cdrom_device_info *next; /* next device_info for this major */ void *handle; /* driver-dependent data */ /* specifications */ - kdev_t dev; /* device number */ int mask; /* mask of capability: disables them */ int speed; /* maximum speed for reading data */ int capacity; /* number of discs in jukebox */ @@ -776,10 +775,10 @@ struct cdrom_device_ops { }; /* the general block_device operations structure: */ -extern int cdrom_open(struct inode *, struct file *); -extern int cdrom_release(struct inode *, struct file *); -extern int cdrom_ioctl(struct inode *, struct file *, unsigned, unsigned long); -extern int cdrom_media_changed(kdev_t); +extern int cdrom_open(struct cdrom_device_info *, struct inode *, struct file *); +extern int cdrom_release(struct cdrom_device_info *, struct file *); +extern int cdrom_ioctl(struct cdrom_device_info *, struct inode *, unsigned, unsigned long); +extern int cdrom_media_changed(struct cdrom_device_info *); extern int register_cdrom(struct cdrom_device_info *cdi); extern int unregister_cdrom(struct cdrom_device_info *cdi); diff --git a/include/linux/device.h b/include/linux/device.h index 80a63939f924..3dd9a4081298 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -48,14 +48,22 @@ enum { RESUME_ENABLE, }; +enum device_state { + DEVICE_UNINITIALIZED = 0, + DEVICE_INITIALIZED = 1, + DEVICE_REGISTERED = 2, + DEVICE_GONE = 3, +}; + struct device; struct device_driver; struct device_class; struct bus_type { char * name; - rwlock_t lock; + struct rw_semaphore rwsem; atomic_t refcount; + u32 present; struct list_head node; struct list_head devices; @@ -73,14 +81,9 @@ struct bus_type { extern int bus_register(struct bus_type * bus); +extern void bus_unregister(struct bus_type * bus); -static inline struct bus_type * get_bus(struct bus_type * bus) -{ - BUG_ON(!atomic_read(&bus->refcount)); - atomic_inc(&bus->refcount); - return bus; -} - +extern struct bus_type * get_bus(struct bus_type * bus); extern void put_bus(struct bus_type * bus); extern int bus_for_each_dev(struct bus_type * bus, void * data, @@ -114,6 +117,7 @@ struct device_driver { rwlock_t lock; atomic_t refcount; + u32 present; struct list_head bus_list; struct list_head class_list; @@ -123,7 +127,7 @@ struct device_driver { int (*probe) (struct device * dev); int (*remove) (struct device * dev); - + void (*shutdown) (struct device * dev); int (*suspend) (struct device * dev, u32 state, u32 level); int (*resume) (struct device * dev, u32 level); @@ -131,16 +135,10 @@ struct device_driver { }; - extern int driver_register(struct device_driver * drv); +extern void driver_unregister(struct device_driver * drv); -static inline struct device_driver * get_driver(struct device_driver * drv) -{ - BUG_ON(!atomic_read(&drv->refcount)); - atomic_inc(&drv->refcount); - return drv; -} - +extern struct device_driver * get_driver(struct device_driver * drv); extern void put_driver(struct device_driver * drv); extern void remove_driver(struct device_driver * drv); @@ -172,6 +170,11 @@ extern void driver_remove_file(struct device_driver *, struct driver_attribute * */ struct device_class { char * name; + struct rw_semaphore rwsem; + + atomic_t refcount; + u32 present; + u32 devnum; struct list_head node; @@ -189,6 +192,9 @@ struct device_class { extern int devclass_register(struct device_class *); extern void devclass_unregister(struct device_class *); +extern struct device_class * get_devclass(struct device_class *); +extern void put_devclass(struct device_class *); + struct devclass_attribute { struct attribute attr; @@ -289,8 +295,8 @@ struct device { void *platform_data; /* Platform specific data (e.g. ACPI, BIOS data relevant to device) */ - u32 present; - u32 current_state; /* Current operating state. In + enum device_state state; + u32 power_state; /* Current operating state. In ACPI-speak, this is D0-D3, D0 being fully functional, and D3 being off. */ @@ -362,6 +368,11 @@ extern int (*platform_notify)(struct device * dev); extern int (*platform_notify_remove)(struct device * dev); +static inline int device_present(struct device * dev) +{ + return (dev && (dev->state == DEVICE_INITIALIZED || dev->state == DEVICE_REGISTERED)); +} + /* device and bus locking helpers. * * FIXME: Is there anything else we need to do? diff --git a/include/linux/driverfs_fs.h b/include/linux/driverfs_fs.h index d859f8c2e041..b4270e947a1e 100644 --- a/include/linux/driverfs_fs.h +++ b/include/linux/driverfs_fs.h @@ -65,6 +65,4 @@ driverfs_create_symlink(struct driver_dir_entry * parent, extern void driverfs_remove_file(struct driver_dir_entry *, const char * name); -extern int init_driverfs_fs(void); - #endif /* _DDFS_H_ */ diff --git a/include/linux/fs.h b/include/linux/fs.h index bca164f4265a..c2e39a247227 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -730,8 +730,8 @@ struct block_device_operations { int (*open) (struct inode *, struct file *); int (*release) (struct inode *, struct file *); int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); - int (*check_media_change) (kdev_t); - int (*revalidate) (kdev_t); + int (*media_changed) (struct gendisk *); + int (*revalidate_disk) (struct gendisk *); struct module *owner; }; @@ -1251,7 +1251,8 @@ extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, lof ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *ppos); extern ssize_t generic_file_sendfile(struct file *, struct file *, loff_t *, size_t); -extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t); +extern void do_generic_mapping_read(struct address_space *, struct file_ra_state *, struct file *, + loff_t *, read_descriptor_t *, read_actor_t); extern ssize_t generic_file_direct_IO(int rw, struct file *file, const struct iovec *iov, loff_t offset, unsigned long nr_segs); extern int generic_direct_IO(int rw, struct inode *inode, const struct iovec @@ -1268,6 +1269,18 @@ extern int generic_file_open(struct inode * inode, struct file * filp); extern int generic_vm_writeback(struct page *page, struct writeback_control *wbc); +static inline void do_generic_file_read(struct file * filp, loff_t *ppos, + read_descriptor_t * desc, + read_actor_t actor) +{ + do_generic_mapping_read(filp->f_dentry->d_inode->i_mapping, + &filp->f_ra, + filp, + ppos, + desc, + actor); +} + extern struct file_operations generic_ro_fops; extern int vfs_readlink(struct dentry *, char *, int, const char *); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 9de2f51ae935..8cd8a826bf6f 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -80,6 +80,8 @@ struct gendisk { char disk_name[16]; /* name of major driver */ struct hd_struct *part; /* [indexed by minor] */ struct block_device_operations *fops; + struct request_queue *queue; + void *private_data; sector_t capacity; struct list_head list; struct list_head full_list; @@ -273,8 +275,12 @@ extern struct gendisk *alloc_disk(int minors); extern struct gendisk *get_disk(struct gendisk *disk); extern void put_disk(struct gendisk *disk); -/* will go away */ -extern void blk_set_probe(int major, struct gendisk *(p)(int)); +extern void blk_register_region(dev_t dev, unsigned long range, + struct module *module, + struct gendisk *(*probe)(dev_t, int *, void *), + void (*lock)(dev_t, void *), + void *data); +extern void blk_unregister_region(dev_t dev, unsigned long range); #endif diff --git a/include/linux/ide.h b/include/linux/ide.h index 44cb38c00b96..607464f740f5 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1256,7 +1256,6 @@ extern int noautodma; */ #define IDE_DRIVER /* Toggle some magic bits in blk.h */ #define LOCAL_END_REQUEST /* Don't generate end_request in blk.h */ -#define DEVICE_NR(device) (minor(device) >> PARTN_BITS) #include <linux/blk.h> extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); @@ -1316,12 +1315,7 @@ extern int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long * This routine is called from the partition-table code in genhd.c * to "convert" a drive to a logical geometry with fewer than 1024 cyls. */ -extern int ide_xlate_1024 (kdev_t, int, int, const char *); - -/* - * Convert kdev_t structure into ide_drive_t * one. - */ -extern ide_drive_t *get_info_ptr (kdev_t i_rdev); +extern int ide_xlate_1024(struct block_device *, int, int, const char *); /* * Return the current idea about the total capacity of this drive. @@ -1577,11 +1571,6 @@ extern int ide_system_bus_speed(void); extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); /* - * ide_get_queue() returns the queue which corresponds to a given device. - */ -extern request_queue_t *ide_get_queue (kdev_t dev); - -/* * CompactFlash cards and their brethern pretend to be removable hard disks, * but they never have a slave unit, and they don't have doorlock mechanisms. * This test catches them, and is invoked elsewhere when setting appropriate diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 8203314e2cb7..0d0ce25b333e 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -338,16 +338,35 @@ typedef struct isdn_net_local_s { /* phone[0] = Incoming Numbers */ /* phone[1] = Outgoing Numbers */ - struct list_head slaves; /* list of all bundled channels */ - struct list_head online; /* list of all bundled channels, - which are currently online */ - spinlock_t online_lock; /* lock to protect online list */ + struct list_head slaves; /* list of all bundled channels + protected by serializing config + ioctls / no change allowed when + interface is running */ + struct list_head online; /* list of all bundled channels + which can be used for actual + data (IP) transfer + protected by xmit_lock */ + + spinlock_t xmit_lock; /* used to protect the xmit path of + a net_device, including all + associated channels's frame_cnt */ struct list_head running_devs; /* member of global running_devs */ atomic_t refcnt; /* references held by ISDN code */ #ifdef CONFIG_ISDN_X25 struct concap_device_ops *dops; /* callbacks used by encapsulator */ #endif +#ifdef CONFIG_ISDN_PPP + unsigned int mpppcfg; + long mp_seqno; + struct ippp_ccp *ccp; + unsigned long debug; +#ifdef CONFIG_ISDN_PPP_VJ + unsigned char *cbuf; + struct slcompress *slcomp; +#endif +#endif + /* use an own struct for that in later versions */ ulong cisco_myseq; /* Local keepalive seq. for Cisco */ ulong cisco_mineseen; /* returned keepalive seq. from remote */ @@ -391,14 +410,11 @@ typedef struct isdn_net_dev_s { int chargeint; /* Interval between charge-infos */ int pppbind; /* ippp device for bindings */ - int ppp_slot; /* PPPD device slot number */ + struct ipppd *ipppd; /* /dev/ipppX which controls us */ - spinlock_t xmit_lock; /* used to protect the xmit path of */ - /* a particular channel (including */ - /* the frame_cnt */ struct sk_buff_head super_tx_queue; /* List of supervisory frames to */ /* be transmitted asap */ - atomic_t frame_cnt; /* number of frames currently */ + int frame_cnt; /* number of frames currently */ /* queued in HL driver */ struct tasklet_struct tlet; @@ -410,6 +426,11 @@ typedef struct isdn_net_dev_s { char name[10]; /* Name of device */ struct list_head global_list; /* global list of all isdn_net_devs */ #ifdef CONFIG_ISDN_PPP + unsigned int pppcfg; + unsigned int pppseq; /* last seq no seen */ + struct ippp_ccp *ccp; + unsigned long debug; + ippp_bundle * pb; /* pointer to the common bundle structure * with the per-bundle data */ #endif diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 68353a39b98c..ec6016c37421 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h @@ -8,7 +8,6 @@ #ifndef _LINUX_ISDN_PPP_H #define _LINUX_ISDN_PPP_H - #define CALLTYPE_INCOMING 0x1 #define CALLTYPE_OUTGOING 0x2 #define CALLTYPE_CALLBACK 0x4 @@ -39,15 +38,6 @@ struct pppcallinfo #define SC_OUT_SHORT_SEQ 0x00000800 #define SC_IN_SHORT_SEQ 0x00004000 -#define SC_DECOMP_ON 0x01 -#define SC_COMP_ON 0x02 -#define SC_DECOMP_DISCARD 0x04 -#define SC_COMP_DISCARD 0x08 -#define SC_LINK_DECOMP_ON 0x10 -#define SC_LINK_COMP_ON 0x20 -#define SC_LINK_DECOMP_DISCARD 0x40 -#define SC_LINK_COMP_DISCARD 0x80 - #define ISDN_PPP_COMP_MAX_OPTIONS 16 #define IPPP_COMP_FLAG_XMIT 0x1 @@ -64,7 +54,8 @@ struct isdn_ppp_comp_data { #include <linux/config.h> - +#include <linux/skbuff.h> +#include <linux/ppp_defs.h> #define DECOMP_ERR_NOMEM (-10) @@ -172,8 +163,8 @@ enum ippp_ccp_reset_states { struct ippp_ccp_reset_state { enum ippp_ccp_reset_states state; /* State of this transaction */ - struct ippp_struct *is; /* Backlink to device stuff */ - unsigned char id; /* Backlink id index */ + struct ippp_ccp *ccp; /* Backlink */ + unsigned char id; /* id index */ unsigned char ta:1; /* The timer is active (flag) */ unsigned char expra:1; /* We expect a ResetAck at all */ int dlen; /* Databytes stored in data */ @@ -191,34 +182,5 @@ struct ippp_ccp_reset { unsigned char lastid; /* Last id allocated by the engine */ }; -struct ippp_struct { - struct ippp_struct *next_link; - int state; - struct sk_buff_head rq; - wait_queue_head_t wq; - struct task_struct *tk; - unsigned int mpppcfg; - unsigned int pppcfg; - unsigned int mru; - unsigned int mpmru; - unsigned int mpmtu; - unsigned int maxcid; - struct isdn_net_dev_s *idev; - int unit; - int minor; - unsigned int last_link_seqno; - long mp_seqno; -#ifdef CONFIG_ISDN_PPP_VJ - unsigned char *cbuf; - struct slcompress *slcomp; -#endif - unsigned long debug; - struct isdn_ppp_compressor *compressor,*decompressor; - struct isdn_ppp_compressor *link_compressor,*link_decompressor; - void *decomp_stat,*comp_stat,*link_decomp_stat,*link_comp_stat; - struct ippp_ccp_reset *reset; /* Allocated on demand, may never be needed */ - unsigned long compflags; -}; - #endif /* __KERNEL__ */ #endif /* _LINUX_ISDN_PPP_H */ diff --git a/include/linux/mm.h b/include/linux/mm.h index d0b9bdb97523..cab2c4342047 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -512,11 +512,18 @@ int write_one_page(struct page *page, int wait); /* readahead.c */ #define VM_MAX_READAHEAD 128 /* kbytes */ #define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ -int do_page_cache_readahead(struct file *file, +int do_page_cache_readahead(struct address_space *mapping, struct file *filp, unsigned long offset, unsigned long nr_to_read); -void page_cache_readahead(struct file *file, unsigned long offset); -void page_cache_readaround(struct file *file, unsigned long offset); -void handle_ra_miss(struct file *file); +void page_cache_readahead(struct address_space *mapping, + struct file_ra_state *ra, + struct file *filp, + unsigned long offset); +void page_cache_readaround(struct address_space *mapping, + struct file_ra_state *ra, + struct file *filp, + unsigned long offset); +void handle_ra_miss(struct address_space *mapping, + struct file_ra_state *ra); /* Do stack extension */ extern int expand_stack(struct vm_area_struct * vma, unsigned long address); diff --git a/include/linux/security.h b/include/linux/security.h index 072fbe94dd8b..e2f80f6a9dba 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -376,10 +376,6 @@ struct swap_info_struct; * @file_free_security: * Deallocate and free any security structures stored in file->f_security. * @file contains the file structure being modified. - * @file_llseek: - * Check permission before re-positioning the file offset in @file. - * @file contains the file structure being modified. - * Return 0 if permission is granted. * @file_ioctl: * @file contains the file structure. * @cmd contains the operation to perform. @@ -790,7 +786,6 @@ struct security_operations { int (*file_permission) (struct file * file, int mask); int (*file_alloc_security) (struct file * file); void (*file_free_security) (struct file * file); - int (*file_llseek) (struct file * file); int (*file_ioctl) (struct file * file, unsigned int cmd, unsigned long arg); int (*file_mmap) (struct file * file, diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h new file mode 100644 index 000000000000..6479902e1d20 --- /dev/null +++ b/include/linux/sysfs.h @@ -0,0 +1,51 @@ +/* + * sysfs.h - definitions for the device driver filesystem + * + * Copyright (c) 2001,2002 Patrick Mochel + * + * Please see Documentation/filesystems/sysfs.txt for more information. + */ + +#ifndef _SYSFS_H_ +#define _SYSFS_H_ + +struct driver_dir_entry; +struct attribute; + +struct sysfs_ops { + int (*open)(struct driver_dir_entry *); + int (*close)(struct driver_dir_entry *); + ssize_t (*show)(struct driver_dir_entry *, struct attribute *,char *, size_t, loff_t); + ssize_t (*store)(struct driver_dir_entry *,struct attribute *,const char *, size_t, loff_t); +}; + +struct driver_dir_entry { + char * name; + struct dentry * dentry; + mode_t mode; + struct sysfs_ops * ops; +}; + +struct attribute { + char * name; + mode_t mode; +}; + +extern int +sysfs_create_dir(struct driver_dir_entry *, struct driver_dir_entry *); + +extern void +sysfs_remove_dir(struct driver_dir_entry * entry); + +extern int +sysfs_create_file(struct attribute * attr, + struct driver_dir_entry * parent); + +extern int +sysfs_create_symlink(struct driver_dir_entry * parent, + char * name, char * target); + +extern void +sysfs_remove_file(struct driver_dir_entry *, const char * name); + +#endif /* _SYSFS_H_ */ diff --git a/include/scsi/sg.h b/include/scsi/sg.h index ddf83957b343..b5f80d97f07b 100644 --- a/include/scsi/sg.h +++ b/include/scsi/sg.h @@ -130,7 +130,7 @@ typedef struct sg_io_hdr /* following flag values can be "or"-ed together */ #define SG_FLAG_DIRECT_IO 1 /* default is indirect IO */ -#define SG_FLAG_LUN_INHIBIT 2 /* default is overwrite lun in SCSI */ +#define SG_FLAG_UNUSED_LUN_INHIBIT 2 /* default is overwrite lun in SCSI */ /* command block (when <= SCSI_2) */ #define SG_FLAG_MMAP_IO 4 /* request memory mapped IO */ #define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */ |
