summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2003-05-06 06:57:02 +1000
committerAnton Blanchard <anton@samba.org>2003-05-06 06:57:02 +1000
commit269d44df29728c7869c006717a88c970f0d1ff73 (patch)
tree655bfcd1f6de9515e8ff3c9bd6611b664c0defc9 /include
parent175967cf592fb068172c1bd7679f5aed12ce5595 (diff)
parentefeed5ae7f1e4a06abb331da64a7c14de52b5ac9 (diff)
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/tmp3
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/elf.h55
-rw-r--r--include/asm-i386/pgalloc.h8
-rw-r--r--include/asm-i386/pgtable-3level.h2
-rw-r--r--include/asm-i386/pgtable.h14
-rw-r--r--include/asm-sparc/page.h1
-rw-r--r--include/linux/blk.h41
-rw-r--r--include/linux/blkdev.h24
-rw-r--r--include/linux/elevator.h1
-rw-r--r--include/linux/elf.h3
-rw-r--r--include/linux/genhd.h8
-rw-r--r--include/linux/if_pppox.h5
-rw-r--r--include/linux/jhash.h143
-rw-r--r--include/linux/mod_devicetable.h16
-rw-r--r--include/linux/net.h9
-rw-r--r--include/linux/netfilter_bridge/ebt_arp.h8
-rw-r--r--include/linux/netfilter_bridge/ebt_pkttype.h11
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/ppp-comp.h5
-rw-r--r--include/linux/sysctl.h3
-rw-r--r--include/net/ip.h1
-rw-r--r--include/net/sock.h20
-rw-r--r--include/net/tcp.h1
-rw-r--r--include/net/xfrm.h6
-rw-r--r--include/video/mach64.h75
24 files changed, 320 insertions, 141 deletions
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h
index 637838d7f85a..a87a45df75e2 100644
--- a/include/asm-i386/elf.h
+++ b/include/asm-i386/elf.h
@@ -101,7 +101,7 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
* for more of them, start the x86-specific ones at 32.
*/
#define AT_SYSINFO 32
-#define AT_SYSINFO_EH_FRAME 33
+#define AT_SYSINFO_EHDR 33
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
@@ -119,15 +119,56 @@ extern void dump_smp_unlazy_fpu(void);
#define ELF_CORE_SYNC dump_smp_unlazy_fpu
#endif
-/* Offset from the beginning of the page where the .eh_frame information
- for the code in the vsyscall page starts. */
-#define EH_FRAME_OFFSET 96
+#define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL))
+#define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE)
+#define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall)
+extern void __kernel_vsyscall;
#define ARCH_DLINFO \
do { \
- NEW_AUX_ENT(AT_SYSINFO, 0xffffe000); \
- NEW_AUX_ENT(AT_SYSINFO_EH_FRAME, \
- 0xffffe000 + EH_FRAME_OFFSET); \
+ NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \
+ NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE); \
+} while (0)
+
+/*
+ * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out
+ * extra segments containing the vsyscall DSO contents. Dumping its
+ * contents makes post-mortem fully interpretable later without matching up
+ * the same kernel and hardware config to see what PC values meant.
+ * Dumping its extra ELF program headers includes all the other information
+ * a debugger needs to easily find how the vsyscall DSO was being used.
+ */
+#define ELF_CORE_EXTRA_PHDRS (VSYSCALL_EHDR->e_phnum)
+#define ELF_CORE_WRITE_EXTRA_PHDRS \
+do { \
+ const struct elf_phdr *const vsyscall_phdrs = \
+ (const struct elf_phdr *) (VSYSCALL_BASE \
+ + VSYSCALL_EHDR->e_phoff); \
+ int i; \
+ Elf32_Off ofs = 0; \
+ for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \
+ struct elf_phdr phdr = vsyscall_phdrs[i]; \
+ if (phdr.p_type == PT_LOAD) { \
+ ofs = phdr.p_offset = offset; \
+ offset += phdr.p_filesz; \
+ } \
+ else \
+ phdr.p_offset += ofs; \
+ phdr.p_paddr = 0; /* match other core phdrs */ \
+ DUMP_WRITE(&phdr, sizeof(phdr)); \
+ } \
+} while (0)
+#define ELF_CORE_WRITE_EXTRA_DATA \
+do { \
+ const struct elf_phdr *const vsyscall_phdrs = \
+ (const struct elf_phdr *) (VSYSCALL_BASE \
+ + VSYSCALL_EHDR->e_phoff); \
+ int i; \
+ for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \
+ if (vsyscall_phdrs[i].p_type == PT_LOAD) \
+ DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \
+ vsyscall_phdrs[i].p_filesz); \
+ } \
} while (0)
#endif
diff --git a/include/asm-i386/pgalloc.h b/include/asm-i386/pgalloc.h
index 640ca76d0ad2..a44e266934f6 100644
--- a/include/asm-i386/pgalloc.h
+++ b/include/asm-i386/pgalloc.h
@@ -20,11 +20,11 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p
* Allocate and free page tables.
*/
-pgd_t *pgd_alloc(struct mm_struct *);
-void pgd_free(pgd_t *pgd);
+extern pgd_t *pgd_alloc(struct mm_struct *);
+extern void pgd_free(pgd_t *pgd);
-pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
-struct page *pte_alloc_one(struct mm_struct *, unsigned long);
+extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
+extern struct page *pte_alloc_one(struct mm_struct *, unsigned long);
static inline void pte_free_kernel(pte_t *pte)
{
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h
index 147acd8530e2..0ca6393cbe4c 100644
--- a/include/asm-i386/pgtable-3level.h
+++ b/include/asm-i386/pgtable-3level.h
@@ -123,4 +123,6 @@ static inline pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot)
#define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) })
#define PTE_FILE_MAX_BITS 32
+extern struct kmem_cache_s *pae_pgd_cachep;
+
#endif /* _I386_PGTABLE_3LEVEL_H */
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 1c557c87abf1..6d7508ca9b4e 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -41,13 +41,22 @@ extern unsigned long empty_zero_page[1024];
#ifndef __ASSEMBLY__
#ifdef CONFIG_X86_PAE
# include <asm/pgtable-3level.h>
+
+/*
+ * Need to initialise the X86 PAE caches
+ */
+extern void pgtable_cache_init(void);
+
#else
# include <asm/pgtable-2level.h>
-#endif
-void pgtable_cache_init(void);
+/*
+ * No page table caches to initialise
+ */
+#define pgtable_cache_init() do { } while (0)
#endif
+#endif
#define PMD_SIZE (1UL << PMD_SHIFT)
#define PMD_MASK (~(PMD_SIZE-1))
@@ -183,6 +192,7 @@ extern unsigned long pg0[1024];
* The following only work if pte_present() is true.
* Undefined behaviour if not..
*/
+static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
static inline int pte_exec(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; }
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h
index 2c4560f70f1d..bed19a83acbc 100644
--- a/include/asm-sparc/page.h
+++ b/include/asm-sparc/page.h
@@ -24,7 +24,6 @@
#ifdef __KERNEL__
-/* #include <asm/head.h> XXX */ /* for KERNBASE */
#include <asm/btfixup.h>
#ifndef __ASSEMBLY__
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
diff --git a/include/net/ip.h b/include/net/ip.h
index da0dab10f4f0..25e95ec9b4fb 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -47,6 +47,7 @@ struct inet_skb_parm
#define IPSKB_MASQUERADED 1
#define IPSKB_TRANSLATED 2
#define IPSKB_FORWARDED 4
+#define IPSKB_XFRM_TUNNEL_SIZE 8
};
struct ipcm_cookie
diff --git a/include/net/sock.h b/include/net/sock.h
index 4f5b79f30880..53639300bc3c 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -43,7 +43,7 @@
#include <linux/config.h>
#include <linux/timer.h>
#include <linux/cache.h>
-
+#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h> /* struct sk_buff */
#include <linux/security.h>
@@ -197,6 +197,7 @@ struct sock {
void *user_data;
/* Callbacks */
+ struct module *owner;
void (*state_change)(struct sock *sk);
void (*data_ready)(struct sock *sk,int bytes);
void (*write_space)(struct sock *sk);
@@ -270,6 +271,23 @@ struct proto {
} stats[NR_CPUS];
};
+static __inline__ void sk_set_owner(struct sock *sk, struct module *owner)
+{
+ /*
+ * One should use sk_set_owner just once, after struct sock creation,
+ * be it shortly after sk_alloc or after a function that returns a new
+ * struct sock (and that down the call chain called sk_alloc), e.g. the
+ * IPv4 and IPv6 modules share tcp_create_openreq_child, so if
+ * tcp_create_openreq_child called sk_set_owner IPv6 would have to
+ * change the ownership of this struct sock, with one not needed
+ * transient sk_set_owner call.
+ */
+ if (unlikely(sk->owner != NULL))
+ BUG();
+ sk->owner = owner;
+ __module_get(owner);
+}
+
/* Called with local bh disabled */
static __inline__ void sock_prot_inc_use(struct proto *prot)
{
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 8844d3f3d8f9..e3a111ce24b3 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1627,6 +1627,7 @@ struct tcp_listen_opt
int qlen;
int qlen_young;
int clock_hand;
+ u32 hash_rnd;
struct open_request *syn_table[TCP_SYNQ_HSIZE];
};
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index b3a67d100b4d..f83e9d2bb928 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -484,6 +484,10 @@ xfrm_selector_match(struct xfrm_selector *sel, struct flowi *fl,
return 0;
}
+/* placeholder until xfrm6_tunnel.c is written */
+static inline int xfrm6_tunnel_check_size(struct sk_buff *skb)
+{ return 0; }
+
/* A struct encoding bundle of transformations to apply to some set of flow.
*
* dst->child points to the next element of bundle.
@@ -756,10 +760,12 @@ extern void xfrm_state_flush(u8 proto);
extern int xfrm_replay_check(struct xfrm_state *x, u32 seq);
extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq);
extern int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl);
+extern int xfrm_check_output(struct xfrm_state *x, struct sk_buff *skb, unsigned short family);
extern int xfrm4_rcv(struct sk_buff *skb);
extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type);
extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler);
extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler);
+extern int xfrm4_tunnel_check_size(struct sk_buff *skb);
extern int xfrm6_rcv(struct sk_buff **pskb, unsigned int *nhoffp);
extern int xfrm6_clear_mutable_options(struct sk_buff *skb, u16 *nh_offset, int dir);
extern int xfrm_user_policy(struct sock *sk, int optname, u8 *optval, int optlen);
diff --git a/include/video/mach64.h b/include/video/mach64.h
index 9a03f7fa724a..8ca47b74ac7e 100644
--- a/include/video/mach64.h
+++ b/include/video/mach64.h
@@ -558,7 +558,7 @@
#define CRTC_CSYNC_EN 0x00000010
#define CRTC_PIX_BY_2_EN 0x00000020 /* unused on RAGE */
#define CRTC_DISPLAY_DIS 0x00000040
-#define CRTC_VGA_XOVERSCAN 0x00000080
+#define CRTC_VGA_XOVERSCAN 0x00000040
#define CRTC_PIX_WIDTH_MASK 0x00000700
#define CRTC_PIX_WIDTH_4BPP 0x00000100
@@ -849,19 +849,7 @@
#define LI_CHIP_ID 0x4c49 /* RAGE LT PRO */
#define LP_CHIP_ID 0x4c50 /* RAGE LT PRO */
#define LT_CHIP_ID 0x4c54 /* RAGE LT */
-
-/* mach64CT family / (Rage XL) class */
-#define GR_CHIP_ID 0x4752 /* RAGE XL, BGA, PCI33 */
-#define GS_CHIP_ID 0x4753 /* RAGE XL, PQFP, PCI33 */
-#define GM_CHIP_ID 0x474d /* RAGE XL, BGA, AGP 1x,2x */
-#define GN_CHIP_ID 0x474e /* RAGE XL, PQFP,AGP 1x,2x */
-#define GO_CHIP_ID 0x474f /* RAGE XL, BGA, PCI66 */
-#define GL_CHIP_ID 0x474c /* RAGE XL, PQFP, PCI66 */
-
-#define IS_XL(id) ((id)==GR_CHIP_ID || (id)==GS_CHIP_ID || \
- (id)==GM_CHIP_ID || (id)==GN_CHIP_ID || \
- (id)==GO_CHIP_ID || (id)==GL_CHIP_ID)
-
+#define XL_CHIP_ID 0x4752 /* RAGE (XL) */
#define GT_CHIP_ID 0x4754 /* RAGE (GT) */
#define GU_CHIP_ID 0x4755 /* RAGE II/II+ (GTB) */
#define GV_CHIP_ID 0x4756 /* RAGE IIC, PCI */
@@ -1160,65 +1148,6 @@
#define APC_LUT_MN 0x39
#define APC_LUT_OP 0x3A
-/* Values in LCD_GEN_CTRL */
-#define CRT_ON 0x00000001ul
-#define LCD_ON 0x00000002ul
-#define HORZ_DIVBY2_EN 0x00000004ul
-#define DONT_DS_ICON 0x00000008ul
-#define LOCK_8DOT 0x00000010ul
-#define ICON_ENABLE 0x00000020ul
-#define DONT_SHADOW_VPAR 0x00000040ul
-#define V2CLK_PM_EN 0x00000080ul
-#define RST_FM 0x00000100ul
-#define DISABLE_PCLK_RESET 0x00000200ul /* XC/XL */
-#define DIS_HOR_CRT_DIVBY2 0x00000400ul
-#define SCLK_SEL 0x00000800ul
-#define SCLK_DELAY 0x0000f000ul
-#define TVCLK_PM_EN 0x00010000ul
-#define VCLK_DAC_PM_EN 0x00020000ul
-#define VCLK_LCD_OFF 0x00040000ul
-#define SELECT_WAIT_4MS 0x00080000ul
-#define XTALIN_PM_EN 0x00080000ul /* XC/XL */
-#define V2CLK_DAC_PM_EN 0x00100000ul
-#define LVDS_EN 0x00200000ul
-#define LVDS_PLL_EN 0x00400000ul
-#define LVDS_PLL_RESET 0x00800000ul
-#define LVDS_RESERVED_BITS 0x07000000ul
-#define CRTC_RW_SELECT 0x08000000ul /* LTPro */
-#define USE_SHADOWED_VEND 0x10000000ul
-#define USE_SHADOWED_ROWCUR 0x20000000ul
-#define SHADOW_EN 0x40000000ul
-#define SHADOW_RW_EN 0x80000000ul
-
-/* Values in HORZ_STRETCHING */
-#define HORZ_STRETCH_BLEND 0x00000ffful
-#define HORZ_STRETCH_RATIO 0x0000fffful
-#define HORZ_STRETCH_LOOP 0x00070000ul
-#define HORZ_STRETCH_LOOP09 0x00000000ul
-#define HORZ_STRETCH_LOOP11 0x00010000ul
-#define HORZ_STRETCH_LOOP12 0x00020000ul
-#define HORZ_STRETCH_LOOP14 0x00030000ul
-#define HORZ_STRETCH_LOOP15 0x00040000ul
-/* ? 0x00050000ul */
-/* ? 0x00060000ul */
-/* ? 0x00070000ul */
-/* ? 0x00080000ul */
-#define HORZ_PANEL_SIZE 0x0ff00000ul /* XC/XL */
-/* ? 0x10000000ul */
-#define AUTO_HORZ_RATIO 0x20000000ul /* XC/XL */
-#define HORZ_STRETCH_MODE 0x40000000ul
-#define HORZ_STRETCH_EN 0x80000000ul
-
-/* Values in VERT_STRETCHING */
-#define VERT_STRETCH_RATIO0 0x000003fful
-#define VERT_STRETCH_RATIO1 0x000ffc00ul
-#define VERT_STRETCH_RATIO2 0x3ff00000ul
-#define VERT_STRETCH_USE0 0x40000000ul
-#define VERT_STRETCH_EN 0x80000000ul
-
-/* Values in EXT_VERT_STRETCH */
-#define AUTO_VERT_RATIO 0x00400000ul
-#define VERT_STRETCH_MODE 0x00000400ul
/* Values in LCD_MISC_CNTL */
#define BIAS_MOD_LEVEL_MASK 0x0000ff00