summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Grover <agrover@groveronline.com>2002-11-18 20:35:36 -0800
committerAndy Grover <agrover@groveronline.com>2002-11-18 20:35:36 -0800
commit8ea430ce380233c1945a31d5cb42d6695b06514b (patch)
tree522e3b6ebb808f4f4a354b63954cd0964e45b294 /include/linux
parentf16897fa7b64209a58bf920999639ddb0c5217e9 (diff)
parentfdea9fc98bc266f5992b35c01737e5e6f70ffdd1 (diff)
Merge groveronline.com:/root/bk/linux-2.5
into groveronline.com:/root/bk/linux-acpi
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h4
-rw-r--r--include/linux/jffs2.h103
-rw-r--r--include/linux/jffs2_fs_i.h5
-rw-r--r--include/linux/jffs2_fs_sb.h6
-rw-r--r--include/linux/module.h39
-rw-r--r--include/linux/nfs_fs.h18
-rw-r--r--include/linux/nfs_xdr.h12
-rw-r--r--include/linux/udf_fs_i.h5
-rw-r--r--include/linux/udf_fs_sb.h2
9 files changed, 113 insertions, 81 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 6ce7d11cc8f9..b434f2725c23 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -438,9 +438,9 @@ extern void device_resume(u32 level);
extern void device_shutdown(void);
-/* drivrs/base/firmware.c */
+/* drivers/base/firmware.c */
extern int firmware_register(struct subsystem *);
-extern void firmware_uregister(struct subsystem *);
+extern void firmware_unregister(struct subsystem *);
/* debugging and troubleshooting/diagnostic helpers. */
#ifdef DEBUG
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h
index 89ed92acf87a..958cab16d8a7 100644
--- a/include/linux/jffs2.h
+++ b/include/linux/jffs2.h
@@ -8,7 +8,7 @@
* For licensing information, see the file 'LICENCE' in the
* jffs2 directory.
*
- * $Id: jffs2.h,v 1.24 2002/05/20 14:56:37 dwmw2 Exp $
+ * $Id: jffs2.h,v 1.25 2002/08/20 21:37:27 dwmw2 Exp $
*
*/
@@ -68,30 +68,65 @@
compression type */
+/* These can go once we've made sure we've caught all uses without
+ byteswapping */
+
+typedef struct {
+ uint32_t v32;
+} __attribute__((packed)) jint32_t;
+
+typedef struct {
+ uint16_t v16;
+} __attribute__((packed)) jint16_t;
+
+#define JFFS2_NATIVE_ENDIAN
+
+#if defined(JFFS2_NATIVE_ENDIAN)
+#define cpu_to_je16(x) ((jint16_t){x})
+#define cpu_to_je32(x) ((jint32_t){x})
+
+#define je16_to_cpu(x) ((x).v16)
+#define je32_to_cpu(x) ((x).v32)
+#elif defined(JFFS2_BIG_ENDIAN)
+#define cpu_to_je16(x) ((jint16_t){cpu_to_be16(x)})
+#define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)})
+
+#define je16_to_cpu(x) (be16_to_cpu(x.v16))
+#define je32_to_cpu(x) (be32_to_cpu(x.v32))
+#elif defined(JFFS2_LITTLE_ENDIAN)
+#define cpu_to_je16(x) ((jint16_t){cpu_to_le16(x)})
+#define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)})
+
+#define je16_to_cpu(x) (le16_to_cpu(x.v16))
+#define je32_to_cpu(x) (le32_to_cpu(x.v32))
+#else
+#error wibble
+#endif
+
struct jffs2_unknown_node
{
/* All start like this */
- uint16_t magic;
- uint16_t nodetype;
- uint32_t totlen; /* So we can skip over nodes we don't grok */
- uint32_t hdr_crc;
+ jint16_t magic;
+ jint16_t nodetype;
+ jint32_t totlen; /* So we can skip over nodes we don't grok */
+ jint32_t hdr_crc;
} __attribute__((packed));
struct jffs2_raw_dirent
{
- uint16_t magic;
- uint16_t nodetype; /* == JFFS_NODETYPE_DIRENT */
- uint32_t totlen;
- uint32_t hdr_crc;
- uint32_t pino;
- uint32_t version;
- uint32_t ino; /* == zero for unlink */
- uint32_t mctime;
+ jint16_t magic;
+ jint16_t nodetype; /* == JFFS_NODETYPE_DIRENT */
+ jint32_t totlen;
+ jint32_t hdr_crc;
+ jint32_t pino;
+ jint32_t version;
+ jint32_t ino; /* == zero for unlink */
+ jint32_t mctime;
uint8_t nsize;
uint8_t type;
uint8_t unused[2];
- uint32_t node_crc;
- uint32_t name_crc;
+ jint32_t node_crc;
+ jint32_t name_crc;
uint8_t name[0];
} __attribute__((packed));
@@ -103,27 +138,27 @@ struct jffs2_raw_dirent
*/
struct jffs2_raw_inode
{
- uint16_t magic; /* A constant magic number. */
- uint16_t nodetype; /* == JFFS_NODETYPE_INODE */
- uint32_t totlen; /* Total length of this node (inc data, etc.) */
- uint32_t hdr_crc;
- uint32_t ino; /* Inode number. */
- uint32_t version; /* Version number. */
- uint32_t mode; /* The file's type or mode. */
- uint16_t uid; /* The file's owner. */
- uint16_t gid; /* The file's group. */
- uint32_t isize; /* Total resultant size of this inode (used for truncations) */
- uint32_t atime; /* Last access time. */
- uint32_t mtime; /* Last modification time. */
- uint32_t ctime; /* Change time. */
- uint32_t offset; /* Where to begin to write. */
- uint32_t csize; /* (Compressed) data size */
- uint32_t dsize; /* Size of the node's data. (after decompression) */
+ jint16_t magic; /* A constant magic number. */
+ jint16_t nodetype; /* == JFFS_NODETYPE_INODE */
+ jint32_t totlen; /* Total length of this node (inc data, etc.) */
+ jint32_t hdr_crc;
+ jint32_t ino; /* Inode number. */
+ jint32_t version; /* Version number. */
+ jint32_t mode; /* The file's type or mode. */
+ jint16_t uid; /* The file's owner. */
+ jint16_t gid; /* The file's group. */
+ jint32_t isize; /* Total resultant size of this inode (used for truncations) */
+ jint32_t atime; /* Last access time. */
+ jint32_t mtime; /* Last modification time. */
+ jint32_t ctime; /* Change time. */
+ jint32_t offset; /* Where to begin to write. */
+ jint32_t csize; /* (Compressed) data size */
+ jint32_t dsize; /* Size of the node's data. (after decompression) */
uint8_t compr; /* Compression algorithm used */
uint8_t usercompr; /* Compression algorithm requested by the user */
- uint16_t flags; /* See JFFS2_INO_FLAG_* */
- uint32_t data_crc; /* CRC for the (compressed) data. */
- uint32_t node_crc; /* CRC for the raw inode (excluding data) */
+ jint16_t flags; /* See JFFS2_INO_FLAG_* */
+ jint32_t data_crc; /* CRC for the (compressed) data. */
+ jint32_t node_crc; /* CRC for the raw inode (excluding data) */
// uint8_t data[dsize];
} __attribute__((packed));
diff --git a/include/linux/jffs2_fs_i.h b/include/linux/jffs2_fs_i.h
index 03530b6065d9..db91aa6c0322 100644
--- a/include/linux/jffs2_fs_i.h
+++ b/include/linux/jffs2_fs_i.h
@@ -1,9 +1,10 @@
-/* $Id: jffs2_fs_i.h,v 1.12 2002/03/06 13:59:21 dwmw2 Exp $ */
+/* $Id: jffs2_fs_i.h,v 1.15 2002/11/12 09:42:49 dwmw2 Exp $ */
#ifndef _JFFS2_FS_I
#define _JFFS2_FS_I
#include <linux/version.h>
+#include <linux/rbtree.h>
struct jffs2_inode_info {
/* We need an internal semaphore similar to inode->i_sem.
@@ -18,7 +19,7 @@ struct jffs2_inode_info {
uint32_t highest_version;
/* List of data fragments which make up the file */
- struct jffs2_node_frag *fraglist;
+ struct rb_root fragtree;
/* There may be one datanode which isn't referenced by any of the
above fragments, if it contains a metadata update but no actual
diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h
index 611aa1b5b129..7cfabbd614cb 100644
--- a/include/linux/jffs2_fs_sb.h
+++ b/include/linux/jffs2_fs_sb.h
@@ -1,4 +1,4 @@
-/* $Id: jffs2_fs_sb.h,v 1.32 2002/07/23 14:35:34 dwmw2 Exp $ */
+/* $Id: jffs2_fs_sb.h,v 1.35 2002/11/12 09:42:18 dwmw2 Exp $ */
#ifndef _JFFS2_FS_SB
#define _JFFS2_FS_SB
@@ -21,6 +21,8 @@ struct jffs2_sb_info {
struct mtd_info *mtd;
uint32_t highest_ino;
+ uint32_t checked_ino;
+
unsigned int flags;
struct task_struct *gc_task; /* GC task struct */
@@ -38,10 +40,12 @@ struct jffs2_sb_info {
uint32_t flash_size;
uint32_t used_size;
uint32_t dirty_size;
+ uint32_t wasted_size;
uint32_t free_size;
uint32_t erasing_size;
uint32_t bad_size;
uint32_t sector_size;
+ uint32_t unchecked_size;
uint32_t nr_free_blocks;
uint32_t nr_erasing_blocks;
diff --git a/include/linux/module.h b/include/linux/module.h
index 4f440aa11f21..47ff2bc63e33 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -49,21 +49,6 @@ extern struct module __this_module;
#define THIS_MODULE ((struct module *)0)
#endif
-#ifdef CONFIG_MODULES
-/* Get/put a kernel symbol (calls must be symmetric) */
-void *__symbol_get(const char *symbol);
-void *__symbol_get_gpl(const char *symbol);
-#define symbol_get(x) ((typeof(&x))(__symbol_get(#x)))
-
-/* For every exported symbol, place a struct in the __ksymtab section */
-#define EXPORT_SYMBOL(sym) \
- const struct kernel_symbol __ksymtab_##sym \
- __attribute__((section("__ksymtab"))) \
- = { (unsigned long)&sym, #sym }
-
-#define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym)
-#define EXPORT_SYMBOL_GPL(sym) EXPORT_SYMBOL(sym)
-
struct kernel_symbol_group
{
/* Links us into the global symbol list */
@@ -84,6 +69,22 @@ struct exception_table
const struct exception_table_entry *entry;
};
+
+#ifdef CONFIG_MODULES
+/* Get/put a kernel symbol (calls must be symmetric) */
+void *__symbol_get(const char *symbol);
+void *__symbol_get_gpl(const char *symbol);
+#define symbol_get(x) ((typeof(&x))(__symbol_get(#x)))
+
+/* For every exported symbol, place a struct in the __ksymtab section */
+#define EXPORT_SYMBOL(sym) \
+ const struct kernel_symbol __ksymtab_##sym \
+ __attribute__((section("__ksymtab"))) \
+ = { (unsigned long)&sym, #sym }
+
+#define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym)
+#define EXPORT_SYMBOL_GPL(sym) EXPORT_SYMBOL(sym)
+
struct module_ref
{
atomic_t count;
@@ -302,6 +303,14 @@ extern int module_dummy_usage;
#define cleanup_module(voidarg) __exitfn(void)
#endif
+/*
+ * The exception and symbol tables, and the lock
+ * to protect them.
+ */
+extern spinlock_t modlist_lock;
+extern struct list_head extables;
+extern struct list_head symbols;
+
/* Use symbol_get and symbol_put instead. You'll thank me. */
#define HAVE_INTER_MODULE
extern void inter_module_register(const char *, struct module *, const void *);
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index d6f510d638d0..8d15e17c0b94 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -118,8 +118,8 @@ struct nfs_inode {
* mtime != read_cache_mtime
*/
unsigned long read_cache_jiffies;
- __u64 read_cache_ctime;
- __u64 read_cache_mtime;
+ struct timespec read_cache_ctime;
+ struct timespec read_cache_mtime;
__u64 read_cache_isize;
unsigned long attrtimeo;
unsigned long attrtimeo_timestamp;
@@ -416,20 +416,6 @@ nfs_fileid_to_ino_t(u64 fileid)
return ino;
}
-static inline time_t
-nfs_time_to_secs(__u64 time)
-{
- return (time_t)(time >> 32);
-}
-
-
-static inline u32
-nfs_time_to_nsecs(__u64 time)
-{
- return time & 0xffffffff;
-}
-
-
/* NFS root */
extern void * nfs_root_data(void);
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 4bb5125056e7..6c82048e2acf 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -6,8 +6,8 @@
struct nfs_fattr {
unsigned short valid; /* which fields are valid */
__u64 pre_size; /* pre_op_attr.size */
- __u64 pre_mtime; /* pre_op_attr.mtime */
- __u64 pre_ctime; /* pre_op_attr.ctime */
+ struct timespec pre_mtime; /* pre_op_attr.mtime */
+ struct timespec pre_ctime; /* pre_op_attr.ctime */
enum nfs_ftype type; /* always use NFSv2 types */
__u32 mode;
__u32 nlink;
@@ -32,9 +32,9 @@ struct nfs_fattr {
} nfs4;
} fsid_u;
__u64 fileid;
- __u64 atime;
- __u64 mtime;
- __u64 ctime;
+ struct timespec atime;
+ struct timespec mtime;
+ struct timespec ctime;
__u64 change_attr; /* NFSv4 change attribute */
__u64 pre_change_attr;/* pre-op NFSv4 change attribute */
unsigned long timestamp;
@@ -219,7 +219,7 @@ struct nfs3_sattrargs {
struct nfs_fh * fh;
struct iattr * sattr;
unsigned int guard;
- __u64 guardtime;
+ struct timespec guardtime;
};
struct nfs3_diropargs {
diff --git a/include/linux/udf_fs_i.h b/include/linux/udf_fs_i.h
index f297d528aded..186a5a47b50b 100644
--- a/include/linux/udf_fs_i.h
+++ b/include/linux/udf_fs_i.h
@@ -43,10 +43,7 @@ typedef struct
struct udf_inode_info
{
- long i_umtime;
- long i_uctime;
- long i_crtime;
- long i_ucrtime;
+ struct timespec i_crtime;
/* Physical address of inode */
lb_addr i_location;
__u64 i_unique;
diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h
index e898136bf947..b73cebba5551 100644
--- a/include/linux/udf_fs_sb.h
+++ b/include/linux/udf_fs_sb.h
@@ -97,7 +97,7 @@ struct udf_sb_info
uid_t s_uid;
/* Root Info */
- time_t s_recordtime;
+ struct timespec s_recordtime;
/* Fileset Info */
__u16 s_serialnum;