diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blk.h | 41 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 24 | ||||
| -rw-r--r-- | include/linux/elevator.h | 1 | ||||
| -rw-r--r-- | include/linux/elf.h | 3 | ||||
| -rw-r--r-- | include/linux/genhd.h | 8 | ||||
| -rw-r--r-- | include/linux/if_pppox.h | 5 | ||||
| -rw-r--r-- | include/linux/jhash.h | 143 | ||||
| -rw-r--r-- | include/linux/mod_devicetable.h | 16 | ||||
| -rw-r--r-- | include/linux/net.h | 9 | ||||
| -rw-r--r-- | include/linux/netfilter_bridge/ebt_arp.h | 8 | ||||
| -rw-r--r-- | include/linux/netfilter_bridge/ebt_pkttype.h | 11 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
| -rw-r--r-- | include/linux/ppp-comp.h | 5 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 3 |
14 files changed, 225 insertions, 53 deletions
diff --git a/include/linux/blk.h b/include/linux/blk.h index 9e65d6827d30..69afaa429f3b 100644 --- a/include/linux/blk.h +++ b/include/linux/blk.h @@ -1,41 +1,2 @@ -#ifndef _BLK_H -#define _BLK_H - +/* this file is obsolete, please use <linux/blkdev.h> instead */ #include <linux/blkdev.h> -#include <linux/elevator.h> -#include <linux/config.h> -#include <linux/spinlock.h> -#include <linux/compiler.h> - -extern void set_device_ro(struct block_device *bdev, int flag); -extern void set_disk_ro(struct gendisk *disk, int flag); -extern void add_disk_randomness(struct gendisk *disk); -extern void rand_initialize_disk(struct gendisk *disk); - -/* - * end_request() and friends. Must be called with the request queue spinlock - * acquired. All functions called within end_request() _must_be_ atomic. - * - * Several drivers define their own end_request and call - * end_that_request_first() and end_that_request_last() - * for parts of the original function. This prevents - * code duplication in drivers. - */ - -extern int end_that_request_first(struct request *, int, int); -extern int end_that_request_chunk(struct request *, int, int); -extern void end_that_request_last(struct request *); -extern void end_request(struct request *req, int uptodate); -struct request *elv_next_request(request_queue_t *q); - -static inline void blkdev_dequeue_request(struct request *req) -{ - BUG_ON(list_empty(&req->queuelist)); - - list_del_init(&req->queuelist); - - if (req->q) - elv_remove_request(req->q, req); -} - -#endif /* _BLK_H */ diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 3899acc8a4f1..32a8cddd2ca3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -349,6 +349,30 @@ static inline request_queue_t *bdev_get_queue(struct block_device *bdev) } /* + * end_request() and friends. Must be called with the request queue spinlock + * acquired. All functions called within end_request() _must_be_ atomic. + * + * Several drivers define their own end_request and call + * end_that_request_first() and end_that_request_last() + * for parts of the original function. This prevents + * code duplication in drivers. + */ +extern int end_that_request_first(struct request *, int, int); +extern int end_that_request_chunk(struct request *, int, int); +extern void end_that_request_last(struct request *); +extern void end_request(struct request *req, int uptodate); + +static inline void blkdev_dequeue_request(struct request *req) +{ + BUG_ON(list_empty(&req->queuelist)); + + list_del_init(&req->queuelist); + + if (req->q) + elv_remove_request(req->q, req); +} + +/* * get ready for proper ref counting */ #define blk_put_queue(q) do { } while (0) diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 8a9c22d3b16b..69648f495dc1 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -54,6 +54,7 @@ extern void elv_merge_requests(request_queue_t *, struct request *, extern void elv_merged_request(request_queue_t *, struct request *); extern void elv_remove_request(request_queue_t *, struct request *); extern int elv_queue_empty(request_queue_t *); +extern struct request *elv_next_request(struct request_queue *q); extern struct request *elv_former_request(request_queue_t *, struct request *); extern struct request *elv_latter_request(request_queue_t *, struct request *); extern int elv_register_queue(struct gendisk *); diff --git a/include/linux/elf.h b/include/linux/elf.h index 0a7a35e2722b..fb03869f90a8 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h @@ -29,8 +29,11 @@ typedef __s64 Elf64_Sxword; #define PT_NOTE 4 #define PT_SHLIB 5 #define PT_PHDR 6 +#define PT_LOOS 0x60000000 +#define PT_HIOS 0x6fffffff #define PT_LOPROC 0x70000000 #define PT_HIPROC 0x7fffffff +#define PT_GNU_EH_FRAME 0x6474e550 #define PT_MIPS_REGINFO 0x70000000 /* Flags in the e_flags field of the header */ diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 35e93e35455d..7103121f4c9a 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -190,6 +190,14 @@ extern void add_disk(struct gendisk *disk); extern void del_gendisk(struct gendisk *gp); extern void unlink_gendisk(struct gendisk *gp); extern struct gendisk *get_gendisk(dev_t dev, int *part); + +extern void set_device_ro(struct block_device *bdev, int flag); +extern void set_disk_ro(struct gendisk *disk, int flag); + +/* drivers/char/random.c */ +extern void add_disk_randomness(struct gendisk *disk); +extern void rand_initialize_disk(struct gendisk *disk); + static inline sector_t get_start_sect(struct block_device *bdev) { return bdev->bd_offset; diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 117357b14483..78ffd78ddb9e 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h @@ -140,8 +140,6 @@ struct pppox_proto { int (*create)(struct socket *sock); int (*ioctl)(struct socket *sock, unsigned int cmd, unsigned long arg); - int (*release)(struct socket *sock); - void (*sk_free)(struct sock *sk); struct module *owner; }; @@ -150,9 +148,6 @@ extern void unregister_pppox_proto(int proto_num); extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */ extern int pppox_channel_ioctl(struct ppp_channel *pc, unsigned int cmd, unsigned long arg); -extern struct sock *pppox_sk_alloc(struct socket *sock, int protocol, - int priority, int zero_it, - kmem_cache_t *slab); /* PPPoX socket states */ enum { diff --git a/include/linux/jhash.h b/include/linux/jhash.h new file mode 100644 index 000000000000..83f6af2ebcaa --- /dev/null +++ b/include/linux/jhash.h @@ -0,0 +1,143 @@ +#ifndef _LINUX_JHASH_H +#define _LINUX_JHASH_H + +/* jhash.h: Jenkins hash support. + * + * Copyright (C) 1996 Bob Jenkins (bob_jenkins@burtleburtle.net) + * + * http://burtleburtle.net/bob/hash/ + * + * These are the credits from Bob's sources: + * + * lookup2.c, by Bob Jenkins, December 1996, Public Domain. + * hash(), hash2(), hash3, and mix() are externally useful functions. + * Routines to test the hash are included if SELF_TEST is defined. + * You can use this free for any purpose. It has no warranty. + * + * Copyright (C) 2003 David S. Miller (davem@redhat.com) + * + * I've modified Bob's hash to be useful in the Linux kernel, and + * any bugs present are surely my fault. -DaveM + */ + +/* NOTE: Arguments are modified. */ +#define __jhash_mix(a, b, c) \ +{ \ + a -= b; a -= c; a ^= (c>>13); \ + b -= c; b -= a; b ^= (a<<8); \ + c -= a; c -= b; c ^= (b>>13); \ + a -= b; a -= c; a ^= (c>>12); \ + b -= c; b -= a; b ^= (a<<16); \ + c -= a; c -= b; c ^= (b>>5); \ + a -= b; a -= c; a ^= (c>>3); \ + b -= c; b -= a; b ^= (a<<10); \ + c -= a; c -= b; c ^= (b>>15); \ +} + +/* The golden ration: an arbitrary value */ +#define JHASH_GOLDEN_RATIO 0x9e3779b9 + +/* The most generic version, hashes an arbitrary sequence + * of bytes. No alignment or length assumptions are made about + * the input key. + */ +static inline u32 jhash(void *key, u32 length, u32 initval) +{ + u32 a, b, c, len; + u8 *k = key; + + len = length; + a = b = JHASH_GOLDEN_RATIO; + c = initval; + + while (len >= 12) { + a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24)); + b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24)); + c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24)); + + __jhash_mix(a,b,c); + + k += 12; + len -= 12; + } + + c += length; + switch (len) { + case 11: c += ((u32)k[10]<<24); + case 10: c += ((u32)k[9]<<16); + case 9 : c += ((u32)k[8]<<8); + case 8 : b += ((u32)k[7]<<24); + case 7 : b += ((u32)k[6]<<16); + case 6 : b += ((u32)k[5]<<8); + case 5 : b += k[4]; + case 4 : a += ((u32)k[3]<<24); + case 3 : a += ((u32)k[2]<<16); + case 2 : a += ((u32)k[1]<<8); + case 1 : a += k[0]; + }; + + __jhash_mix(a,b,c); + + return c; +} + +/* A special optimized version that handles 1 or more of u32s. + * The length parameter here is the number of u32s in the key. + */ +static inline u32 jhash2(u32 *k, u32 length, u32 initval) +{ + u32 a, b, c, len; + + a = b = JHASH_GOLDEN_RATIO; + c = initval; + len = length; + + while (len >= 3) { + a += k[0]; + b += k[1]; + c += k[2]; + __jhash_mix(a, b, c); + k += 3; len -= 3; + } + + c += length * 4; + + switch (len) { + case 2 : b += k[1]; + case 1 : a += k[0]; + }; + + __jhash_mix(a,b,c); + + return c; +} + + +/* A special ultra-optimized versions that knows they are hashing exactly + * 3, 2 or 1 word(s). + * + * NOTE: In partilar the "c += length; __jhash_mix(a,b,c);" normally + * done at the end is not done here. + */ +static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval) +{ + a += JHASH_GOLDEN_RATIO; + b += JHASH_GOLDEN_RATIO; + c += initval; + + __jhash_mix(a, b, c); + + return c; +} + +static inline u32 jhash_2words(u32 a, u32 b, u32 initval) +{ + return jhash_3words(a, b, 0, initval); +} + +static inline u32 jhash_1word(u32 a, u32 initval) +{ + return jhash_3words(a, 0, 0, initval); +} + +#endif /* _LINUX_JHASH_H */ diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 9baa5a448684..4442b47c8dc2 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -21,6 +21,22 @@ struct pci_device_id { kernel_ulong_t driver_data; /* Data private to the driver */ }; + +#define IEEE1394_MATCH_VENDOR_ID 0x0001 +#define IEEE1394_MATCH_MODEL_ID 0x0002 +#define IEEE1394_MATCH_SPECIFIER_ID 0x0004 +#define IEEE1394_MATCH_VERSION 0x0008 + +struct ieee1394_device_id { + __u32 match_flags; + __u32 vendor_id; + __u32 model_id; + __u32 specifier_id; + __u32 version; + kernel_ulong_t driver_data; +}; + + /* * Device table entry for "new style" table-driven USB drivers. * User mode code can read these tables to choose which modules to load. diff --git a/include/linux/net.h b/include/linux/net.h index 8b012430f49d..04bd681473db 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -89,9 +89,11 @@ struct page; struct kiocb; struct sockaddr; struct msghdr; +struct module; struct proto_ops { int family; + struct module *owner; int (*release) (struct socket *sock); int (*bind) (struct socket *sock, struct sockaddr *umyaddr, @@ -127,8 +129,6 @@ struct proto_ops { int offset, size_t size, int flags); }; -struct module; - struct net_proto_family { int family; int (*create)(struct socket *sock, int protocol); @@ -140,9 +140,6 @@ struct net_proto_family { struct module *owner; }; -extern int net_family_get(int family); -extern void net_family_put(int family); - struct iovec; extern int sock_wake_async(struct socket *sk, int how, int band); @@ -227,7 +224,7 @@ SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_are \ static struct proto_ops name##_ops = { \ .family = fam, \ - \ + .owner = THIS_MODULE, \ .release = __lock_##name##_release, \ .bind = __lock_##name##_bind, \ .connect = __lock_##name##_connect, \ diff --git a/include/linux/netfilter_bridge/ebt_arp.h b/include/linux/netfilter_bridge/ebt_arp.h index 8967ddae114d..537ec6b487a2 100644 --- a/include/linux/netfilter_bridge/ebt_arp.h +++ b/include/linux/netfilter_bridge/ebt_arp.h @@ -6,8 +6,10 @@ #define EBT_ARP_PTYPE 0x04 #define EBT_ARP_SRC_IP 0x08 #define EBT_ARP_DST_IP 0x10 +#define EBT_ARP_SRC_MAC 0x20 +#define EBT_ARP_DST_MAC 0x40 #define EBT_ARP_MASK (EBT_ARP_OPCODE | EBT_ARP_HTYPE | EBT_ARP_PTYPE | \ - EBT_ARP_SRC_IP | EBT_ARP_DST_IP) + EBT_ARP_SRC_IP | EBT_ARP_DST_IP | EBT_ARP_SRC_MAC | EBT_ARP_DST_MAC) #define EBT_ARP_MATCH "arp" struct ebt_arp_info @@ -19,6 +21,10 @@ struct ebt_arp_info uint32_t smsk; uint32_t daddr; uint32_t dmsk; + unsigned char smaddr[ETH_ALEN]; + unsigned char smmsk[ETH_ALEN]; + unsigned char dmaddr[ETH_ALEN]; + unsigned char dmmsk[ETH_ALEN]; uint8_t bitmask; uint8_t invflags; }; diff --git a/include/linux/netfilter_bridge/ebt_pkttype.h b/include/linux/netfilter_bridge/ebt_pkttype.h new file mode 100644 index 000000000000..0d64bbb29c66 --- /dev/null +++ b/include/linux/netfilter_bridge/ebt_pkttype.h @@ -0,0 +1,11 @@ +#ifndef __LINUX_BRIDGE_EBT_PKTTYPE_H +#define __LINUX_BRIDGE_EBT_PKTTYPE_H + +struct ebt_pkttype_info +{ + uint8_t pkt_type; + uint8_t invert; +}; +#define EBT_PKTTYPE_MATCH "pkttype" + +#endif diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d001cf50ebfd..21043f2716a3 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2025,6 +2025,7 @@ #define PCI_DEVICE_ID_MICROGATE_USC 0x0010 #define PCI_DEVICE_ID_MICROGATE_SCC 0x0020 #define PCI_DEVICE_ID_MICROGATE_SCA 0x0030 +#define PCI_DEVICE_ID_MICROGATE_USC2 0x0210 #define PCI_VENDOR_ID_HINT 0x3388 #define PCI_DEVICE_ID_HINT_VXPROII_IDE 0x8013 diff --git a/include/linux/ppp-comp.h b/include/linux/ppp-comp.h index 8de67f77dfb7..0841f8d31b59 100644 --- a/include/linux/ppp-comp.h +++ b/include/linux/ppp-comp.h @@ -42,6 +42,8 @@ #ifndef _NET_PPP_COMP_H #define _NET_PPP_COMP_H +struct module; + /* * The following symbols control whether we include code for * various compression methods. @@ -106,6 +108,9 @@ struct compressor { /* Return decompression statistics */ void (*decomp_stat) (void *state, struct compstat *stats); + + /* Used in locking compressor modules */ + struct module *owner; }; /* diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 79b779f29c9f..2cce1f2ffb2c 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -327,7 +327,8 @@ enum { NET_IPV4_ROUTE_GC_ELASTICITY=14, NET_IPV4_ROUTE_MTU_EXPIRES=15, NET_IPV4_ROUTE_MIN_PMTU=16, - NET_IPV4_ROUTE_MIN_ADVMSS=17 + NET_IPV4_ROUTE_MIN_ADVMSS=17, + NET_IPV4_ROUTE_SECRET_INTERVAL=18, }; enum |
