summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2003-01-05 22:23:32 -0600
committerPatrick Mochel <mochel@osdl.org>2003-01-05 22:23:32 -0600
commit199578c4252ac04f55cc4463a0eefe0c9c1a1ff3 (patch)
tree7697d798ac5207d807ed200b0f09c723e4b65314 /include/linux
parentefd526efbaad0b5a6789f6c40e75c6a3bf28eae9 (diff)
parent5103c926d715ca7df1ed9fb40214f6ee995b64b6 (diff)
Merge bk://linux.bkbits.net/linux-2.5
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dirent.h13
-rw-r--r--include/linux/elf.h35
-rw-r--r--include/linux/highmem.h9
-rw-r--r--include/linux/init.h3
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/linux/module.h82
-rw-r--r--include/linux/nfsd/xdr4.h1
-rw-r--r--include/linux/pagemap.h8
-rw-r--r--include/linux/radix-tree.h8
-rw-r--r--include/linux/raid/md_k.h5
-rw-r--r--include/linux/raid/md_p.h7
-rw-r--r--include/linux/rmap-locking.h14
-rw-r--r--include/linux/smp.h1
-rw-r--r--include/linux/sunrpc/cache.h7
-rw-r--r--include/linux/sunrpc/svcauth.h7
-rw-r--r--include/linux/swap.h12
16 files changed, 176 insertions, 38 deletions
diff --git a/include/linux/dirent.h b/include/linux/dirent.h
index bef1120cba96..5d6023b87800 100644
--- a/include/linux/dirent.h
+++ b/include/linux/dirent.h
@@ -16,4 +16,17 @@ struct dirent64 {
char d_name[256];
};
+#ifdef __KERNEL__
+
+struct linux_dirent64 {
+ u64 d_ino;
+ s64 d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[0];
+};
+
+#endif /* __KERNEL__ */
+
+
#endif
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 2745227ff929..4435d0be3575 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -159,6 +159,9 @@ typedef __s64 Elf64_Sxword;
#define ELF32_ST_BIND(x) ((x) >> 4)
#define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF64_ST_BIND(x) ((x) >> 4)
+#define ELF64_ST_TYPE(x) (((unsigned int) x) & 0xf)
+
/* Symbolic values for the entries in the auxiliary table
put on the initial stack */
#define AT_NULL 0 /* end of vector */
@@ -362,22 +365,30 @@ typedef struct {
#define R_ALPHA_SREL16 9 /* PC relative 16 bit */
#define R_ALPHA_SREL32 10 /* PC relative 32 bit */
#define R_ALPHA_SREL64 11 /* PC relative 64 bit */
-#define R_ALPHA_OP_PUSH 12 /* OP stack push */
-#define R_ALPHA_OP_STORE 13 /* OP stack pop and store */
-#define R_ALPHA_OP_PSUB 14 /* OP stack subtract */
-#define R_ALPHA_OP_PRSHIFT 15 /* OP stack right shift */
-#define R_ALPHA_GPVALUE 16
-#define R_ALPHA_GPRELHIGH 17
-#define R_ALPHA_GPRELLOW 18
-#define R_ALPHA_IMMED_GP_16 19
-#define R_ALPHA_IMMED_GP_HI32 20
-#define R_ALPHA_IMMED_SCN_HI32 21
-#define R_ALPHA_IMMED_BR_HI32 22
-#define R_ALPHA_IMMED_LO32 23
+#define R_ALPHA_GPRELHIGH 17 /* GP relative 32 bit, high 16 bits */
+#define R_ALPHA_GPRELLOW 18 /* GP relative 32 bit, low 16 bits */
+#define R_ALPHA_GPREL16 19 /* GP relative 16 bit */
#define R_ALPHA_COPY 24 /* Copy symbol at runtime */
#define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */
#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */
#define R_ALPHA_RELATIVE 27 /* Adjust by program base */
+#define R_ALPHA_BRSGP 28
+#define R_ALPHA_TLSGD 29
+#define R_ALPHA_TLS_LDM 30
+#define R_ALPHA_DTPMOD64 31
+#define R_ALPHA_GOTDTPREL 32
+#define R_ALPHA_DTPREL64 33
+#define R_ALPHA_DTPRELHI 34
+#define R_ALPHA_DTPRELLO 35
+#define R_ALPHA_DTPREL16 36
+#define R_ALPHA_GOTTPREL 37
+#define R_ALPHA_TPREL64 38
+#define R_ALPHA_TPRELHI 39
+#define R_ALPHA_TPRELLO 40
+#define R_ALPHA_TPREL16 41
+
+#define SHF_ALPHA_GPREL 0x10000000
+
/* PowerPC relocations defined by the ABIs */
#define R_PPC_NONE 0
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 1586beac00fb..b8334a2df0d8 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -14,8 +14,6 @@ extern struct page *highmem_start_page;
/* declarations for linux/mm/highmem.c */
unsigned int nr_free_highpages(void);
-extern void check_highmem_ptes(void);
-
#else /* CONFIG_HIGHMEM */
static inline unsigned int nr_free_highpages(void) { return 0; }
@@ -30,6 +28,13 @@ static inline void *kmap(struct page *page) { return page_address(page); }
#endif /* CONFIG_HIGHMEM */
+#if defined(CONFIG_DEBUG_HIGHMEM) && defined(CONFIG_HIGHMEM)
+extern void check_highmem_ptes(void);
+#else
+static inline void check_highmem_ptes(void)
+{}
+#endif
+
/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
{
diff --git a/include/linux/init.h b/include/linux/init.h
index b7c6363478aa..a3ad7dd1a38f 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -111,7 +111,8 @@ struct obs_kernel_param {
*
* module_init() will either be called during do_initcalls (if
* builtin) or at module insertion time (if a module). There can only
- * be one per module. */
+ * be one per module.
+ */
#define module_init(x) __initcall(x);
/**
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 9cb6277f5b86..e6b95f3bb173 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -105,7 +105,7 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in
extern int tainted;
extern const char *print_tainted(void);
-#define TAINT_PROPRIETORY_MODULE (1<<0)
+#define TAINT_PROPRIETARY_MODULE (1<<0)
#define TAINT_FORCED_MODULE (1<<1)
#define TAINT_UNSAFE_SMP (1<<2)
#define TAINT_FORCED_RMMOD (1<<3)
diff --git a/include/linux/module.h b/include/linux/module.h
index 8e1954a89913..24fa571c4cc9 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -21,7 +21,6 @@
#include <asm/uaccess.h> /* For struct exception_table_entry */
/* Not Yet Implemented */
-#define MODULE_LICENSE(name)
#define MODULE_AUTHOR(name)
#define MODULE_DESCRIPTION(desc)
#define MODULE_SUPPORTED_DEVICE(name)
@@ -44,6 +43,12 @@ struct kernel_symbol
extern int init_module(void);
extern void cleanup_module(void);
+/* Archs provide a method of finding the correct exception table. */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+ const struct exception_table_entry *last,
+ unsigned long value);
+
#ifdef MODULE
/* For replacement modutils, use an alias not a pointer. */
@@ -57,11 +62,41 @@ extern const struct gtype##_id __mod_##gtype##_table \
#define THIS_MODULE (&__this_module)
+/*
+ * The following license idents are currently accepted as indicating free
+ * software modules
+ *
+ * "GPL" [GNU Public License v2 or later]
+ * "GPL v2" [GNU Public License v2]
+ * "GPL and additional rights" [GNU Public License v2 rights and more]
+ * "Dual BSD/GPL" [GNU Public License v2
+ * or BSD license choice]
+ * "Dual MPL/GPL" [GNU Public License v2
+ * or Mozilla license choice]
+ *
+ * The following other idents are available
+ *
+ * "Proprietary" [Non free products]
+ *
+ * There are dual licensed components, but when running with Linux it is the
+ * GPL that is relevant so this is a non issue. Similarly LGPL linked with GPL
+ * is a GPL combined work.
+ *
+ * This exists for several reasons
+ * 1. So modinfo can show license info for users wanting to vet their setup
+ * is free
+ * 2. So the community can ignore bug reports including proprietary modules
+ * 3. So vendors can do likewise based on their own policies
+ */
+#define MODULE_LICENSE(license) \
+ static const char __module_license[] \
+ __attribute__((section(".init.license"))) = license
+
#else /* !MODULE */
#define MODULE_GENERIC_TABLE(gtype,name)
#define THIS_MODULE ((struct module *)0)
-
+#define MODULE_LICENSE(license)
#endif
#define MODULE_DEVICE_TABLE(type,name) \
@@ -75,10 +110,16 @@ struct kernel_symbol_group
/* Module which owns it (if any) */
struct module *owner;
+ /* Are we internal use only? */
+ int gplonly;
+
unsigned int num_syms;
const struct kernel_symbol *syms;
};
+/* Given an address, look for it in the exception tables */
+const struct exception_table_entry *search_exception_tables(unsigned long add);
+
struct exception_table
{
struct list_head list;
@@ -101,7 +142,11 @@ void *__symbol_get_gpl(const char *symbol);
= { (unsigned long)&sym, MODULE_SYMBOL_PREFIX #sym }
#define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym)
-#define EXPORT_SYMBOL_GPL(sym) EXPORT_SYMBOL(sym)
+
+#define EXPORT_SYMBOL_GPL(sym) \
+ const struct kernel_symbol __ksymtab_##sym \
+ __attribute__((section("__gpl_ksymtab"))) \
+ = { (unsigned long)&sym, #sym }
struct module_ref
{
@@ -128,6 +173,9 @@ struct module
/* Exported symbols */
struct kernel_symbol_group symbols;
+ /* GPL-only exported symbols. */
+ struct kernel_symbol_group gpl_symbols;
+
/* Exception tables */
struct exception_table extable;
@@ -149,6 +197,9 @@ struct module
/* Am I unsafe to unload? */
int unsafe;
+ /* Am I GPL-compatible */
+ int license_gplok;
+
#ifdef CONFIG_MODULE_UNLOAD
/* Reference counts */
struct module_ref ref[NR_CPUS];
@@ -258,18 +309,34 @@ const char *module_address_lookup(unsigned long addr,
unsigned long *offset,
char **modname);
+/* For extable.c to search modules' exception tables. */
+const struct exception_table_entry *search_module_extables(unsigned long addr);
+
#else /* !CONFIG_MODULES... */
#define EXPORT_SYMBOL(sym)
#define EXPORT_SYMBOL_GPL(sym)
#define EXPORT_SYMBOL_NOVERS(sym)
+/* Given an address, look for it in the exception tables. */
+static inline const struct exception_table_entry *
+search_module_extables(unsigned long addr)
+{
+ return NULL;
+}
+
/* Get/put a kernel symbol (calls should be symmetric) */
#define symbol_get(x) (&(x))
#define symbol_put(x) do { } while(0)
#define symbol_put_addr(x) do { } while(0)
-#define try_module_get(module) 1
-#define module_put(module) do { } while(0)
+static inline int try_module_get(struct module *module)
+{
+ return 1;
+}
+
+static inline void module_put(struct module *module)
+{
+}
#define module_name(mod) "kernel"
@@ -293,6 +360,7 @@ struct module __this_module
__attribute__((section(".gnu.linkonce.this_module"))) = {
.name = __stringify(KBUILD_MODNAME),
.symbols = { .owner = &__this_module },
+ .gpl_symbols = { .owner = &__this_module, .gplonly = 1 },
.init = init_module,
#ifdef CONFIG_MODULE_UNLOAD
.exit = cleanup_module,
@@ -301,10 +369,6 @@ __attribute__((section(".gnu.linkonce.this_module"))) = {
#endif /* KBUILD_MODNAME */
#endif /* MODULE */
-/* For archs to search exception tables */
-extern struct list_head extables;
-extern spinlock_t modlist_lock;
-
#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
/* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
index 8359679908ab..c29972812936 100644
--- a/include/linux/nfsd/xdr4.h
+++ b/include/linux/nfsd/xdr4.h
@@ -320,6 +320,7 @@ struct nfsd4_compoundres {
u32 taglen;
char * tag;
u32 opcnt;
+ u32 * tagp; /* where to encode tag and opcount */
};
#define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 9707f467b2be..1a297ca9d00a 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -66,10 +66,10 @@ extern struct page * read_cache_page(struct address_space *mapping,
extern int read_cache_pages(struct address_space *mapping,
struct list_head *pages, filler_t *filler, void *data);
-extern int add_to_page_cache(struct page *page,
- struct address_space *mapping, unsigned long index);
-extern int add_to_page_cache_lru(struct page *page,
- struct address_space *mapping, unsigned long index);
+int add_to_page_cache(struct page *page, struct address_space *mapping,
+ unsigned long index, int gfp_mask);
+int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
+ unsigned long index, int gfp_mask);
extern void remove_from_page_cache(struct page *page);
extern void __remove_from_page_cache(struct page *page);
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 4e58eb79abeb..f4a78d52b5ce 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -19,6 +19,8 @@
#ifndef _LINUX_RADIX_TREE_H
#define _LINUX_RADIX_TREE_H
+#include <linux/preempt.h>
+
struct radix_tree_node;
struct radix_tree_root {
@@ -45,5 +47,11 @@ extern int radix_tree_delete(struct radix_tree_root *, unsigned long);
extern unsigned int
radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
unsigned long first_index, unsigned int max_items);
+int radix_tree_preload(int gfp_mask);
+
+static inline void radix_tree_preload_end(void)
+{
+ preempt_enable();
+}
#endif /* _LINUX_RADIX_TREE_H */
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index f658735d28b2..d6f2928fc8c7 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -28,6 +28,8 @@
#define LEVEL_MULTIPATH (-4)
#define LEVEL_LINEAR (-1)
+#define MaxSector (~(sector_t)0)
+
static inline int pers_to_level (int pers)
{
switch (pers) {
@@ -198,7 +200,6 @@ struct mddev_s
int level, layout;
int raid_disks;
int max_disks;
- unsigned long state;
sector_t size; /* used size of component devices */
__u64 events;
@@ -215,6 +216,7 @@ struct mddev_s
* it can only be set > 0 under reconfig_sem
*/
int recovery_running;
+ int recovery_error; /* error from recovery write */
int in_sync; /* know to not need resync */
struct semaphore reconfig_sem;
atomic_t active;
@@ -226,6 +228,7 @@ struct mddev_s
atomic_t recovery_active; /* blocks scheduled, but not written */
wait_queue_head_t recovery_wait;
+ sector_t recovery_cp;
request_queue_t queue; /* for plugging ... */
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index d6bb37a810b3..cb002ba3556f 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -131,11 +131,16 @@ typedef struct mdp_superblock_s {
#ifdef __BIG_ENDIAN
__u32 events_hi; /* 7 high-order of superblock update count */
__u32 events_lo; /* 8 low-order of superblock update count */
+ __u32 cp_events_hi; /* 9 high-order of checkpoint update count */
+ __u32 cp_events_lo; /* 10 low-order of checkpoint update count */
#else
__u32 events_lo; /* 7 low-order of superblock update count */
__u32 events_hi; /* 8 high-order of superblock update count */
+ __u32 cp_events_lo; /* 9 low-order of checkpoint update count */
+ __u32 cp_events_hi; /* 10 high-order of checkpoint update count */
#endif
- __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 9];
+ __u32 recovery_cp; /* 11 recovery checkpoint sector count */
+ __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 12];
/*
* Personality information
diff --git a/include/linux/rmap-locking.h b/include/linux/rmap-locking.h
index 302a58f54ca3..51f6697f3794 100644
--- a/include/linux/rmap-locking.h
+++ b/include/linux/rmap-locking.h
@@ -5,6 +5,11 @@
* pte chain.
*/
+#include <linux/slab.h>
+
+struct pte_chain;
+extern kmem_cache_t *pte_chain_cache;
+
static inline void pte_chain_lock(struct page *page)
{
/*
@@ -31,3 +36,12 @@ static inline void pte_chain_unlock(struct page *page)
#endif
preempt_enable();
}
+
+struct pte_chain *pte_chain_alloc(int gfp_flags);
+void __pte_chain_free(struct pte_chain *pte_chain);
+
+static inline void pte_chain_free(struct pte_chain *pte_chain)
+{
+ if (pte_chain)
+ __pte_chain_free(pte_chain);
+}
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 8243c6bec130..06ac1c4f1530 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -86,6 +86,7 @@ int cpu_up(unsigned int cpu);
void smp_prepare_boot_cpu(void);
#else /* !SMP */
+#include <asm/page.h> /* For BUG() */
/*
* These macros fold the SMP functionality into a single CPU system
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
index 74e53a04907e..a3cdc080dd85 100644
--- a/include/linux/sunrpc/cache.h
+++ b/include/linux/sunrpc/cache.h
@@ -78,6 +78,11 @@ struct cache_detail {
int (*cache_parse)(struct cache_detail *,
char *buf, int len);
+ int (*cache_show)(struct seq_file *m,
+ struct cache_detail *cd,
+ struct cache_head *h,
+ char *pbuf);
+
/* fields below this comment are for internal use
* and should not be touched by cache owners
*/
@@ -171,7 +176,7 @@ RTN *FNAME ARGS \
if (!new) break; \
\
new->MEMBER.next = tmp->MEMBER.next; \
- *head = &new->MEMBER; \
+ *hp = &new->MEMBER; \
tmp->MEMBER.next = NULL; \
set_bit(CACHE_HASHED, &new->MEMBER.flags); \
clear_bit(CACHE_HASHED, &tmp->MEMBER.flags); \
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h
index 9c6bf43a26b8..7b8d7d4d9078 100644
--- a/include/linux/sunrpc/svcauth.h
+++ b/include/linux/sunrpc/svcauth.h
@@ -13,6 +13,7 @@
#include <linux/sunrpc/msg_prot.h>
#include <linux/sunrpc/cache.h>
+#include <linux/string.h>
struct svc_cred {
uid_t cr_uid;
@@ -111,7 +112,11 @@ extern struct auth_domain *auth_unix_lookup(struct in_addr addr);
extern int auth_unix_forget_old(struct auth_domain *dom);
extern void svcauth_unix_purge(void);
-extern int name_hash(char *name, int size);
+extern int hash_mem(char *buf, int len, int bits);
+static inline int hash_str(char *name, int bits)
+{
+ return hash_mem(name, strlen(name), bits);
+}
extern struct cache_detail auth_domain_cache, ip_map_cache;
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 9ab02098aad5..d20061e6cb08 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -169,11 +169,13 @@ extern int vm_swappiness;
extern void out_of_memory(void);
/* linux/mm/rmap.c */
-extern int FASTCALL(page_referenced(struct page *));
-extern void FASTCALL(page_add_rmap(struct page *, pte_t *));
-extern void FASTCALL(page_remove_rmap(struct page *, pte_t *));
-extern int FASTCALL(try_to_unmap(struct page *));
-extern int FASTCALL(page_over_rsslimit(struct page *));
+struct pte_chain;
+int FASTCALL(page_referenced(struct page *));
+struct pte_chain *FASTCALL(page_add_rmap(struct page *, pte_t *,
+ struct pte_chain *));
+void FASTCALL(page_remove_rmap(struct page *, pte_t *));
+int FASTCALL(try_to_unmap(struct page *));
+int FASTCALL(page_over_rsslimit(struct page *));
/* return values of try_to_unmap */
#define SWAP_SUCCESS 0