summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc/atomic.h11
-rw-r--r--include/asm-ppc/hardirq.h2
-rw-r--r--include/asm-ppc/module.h37
-rw-r--r--include/asm-ppc/page.h13
-rw-r--r--include/asm-ppc/processor.h60
-rw-r--r--include/linux/coda_psdev.h10
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/module.h18
-rw-r--r--include/linux/pci.h17
-rw-r--r--include/linux/umsdos_fs.p2
-rw-r--r--include/linux/umsdos_fs_i.h6
11 files changed, 78 insertions, 102 deletions
diff --git a/include/asm-ppc/atomic.h b/include/asm-ppc/atomic.h
index e541fd274241..e9c091d591bf 100644
--- a/include/asm-ppc/atomic.h
+++ b/include/asm-ppc/atomic.h
@@ -17,8 +17,10 @@ typedef struct { volatile int counter; } atomic_t;
extern void atomic_clear_mask(unsigned long mask, unsigned long *addr);
#ifdef CONFIG_SMP
+#define SMP_SYNC "sync"
#define SMP_ISYNC "\n\tisync"
#else
+#define SMP_SYNC ""
#define SMP_ISYNC
#endif
@@ -192,10 +194,11 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
return t;
}
-#define smp_mb__before_atomic_dec() smp_mb()
-#define smp_mb__after_atomic_dec() smp_mb()
-#define smp_mb__before_atomic_inc() smp_mb()
-#define smp_mb__after_atomic_inc() smp_mb()
+#define __MB __asm__ __volatile__ (SMP_SYNC : : : "memory")
+#define smp_mb__before_atomic_dec() __MB
+#define smp_mb__after_atomic_dec() __MB
+#define smp_mb__before_atomic_inc() __MB
+#define smp_mb__after_atomic_inc() __MB
#endif /* __KERNEL__ */
#endif /* _ASM_PPC_ATOMIC_H_ */
diff --git a/include/asm-ppc/hardirq.h b/include/asm-ppc/hardirq.h
index 3138ad56ec18..c96e72a0235e 100644
--- a/include/asm-ppc/hardirq.h
+++ b/include/asm-ppc/hardirq.h
@@ -3,7 +3,7 @@
#define __ASM_HARDIRQ_H
#include <linux/config.h>
-#include <asm/smp.h>
+#include <linux/cache.h>
/* The __last_jiffy_stamp field is needed to ensure that no decrementer
* interrupt is lost on SMP machines. Since on most CPUs it is in the same
diff --git a/include/asm-ppc/module.h b/include/asm-ppc/module.h
index 43ddf7c6aaab..7d75a3e3e2ee 100644
--- a/include/asm-ppc/module.h
+++ b/include/asm-ppc/module.h
@@ -1,12 +1,33 @@
#ifndef _ASM_PPC_MODULE_H
#define _ASM_PPC_MODULE_H
-/*
- * This file contains the PPC architecture specific module code.
- */
-
-#define module_map(x) vmalloc(x)
-#define module_unmap(x) vfree(x)
-#define module_arch_init(x) (0)
-#define arch_init_modules(x) do { } while (0)
+/* Module stuff for PPC. (C) 2001 Rusty Russell */
+
+/* Thanks to Paul M for explaining this.
+
+ PPC can only do rel jumps += 32MB, and often the kernel and other
+ modules are furthur away than this. So, we jump to a table of
+ trampolines attached to the module (the Procedure Linkage Table)
+ whenever that happens.
+*/
+
+struct ppc_plt_entry
+{
+ /* 16 byte jump instruction sequence (4 instructions) */
+ unsigned int jump[4];
+};
+
+struct mod_arch_specific
+{
+ /* How much of the core is actually taken up with core (then
+ we know the rest is for the PLT */
+ unsigned int core_plt_offset;
+
+ /* Same for init */
+ unsigned int init_plt_offset;
+};
+
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Ehdr Elf32_Ehdr
#endif /* _ASM_PPC_MODULE_H */
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 07fcedee5912..4834d006adb6 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -14,19 +14,8 @@
#define KERNELBASE PAGE_OFFSET
#ifndef __ASSEMBLY__
-#include <asm/system.h> /* for xmon definition */
+#include <asm/processor.h> /* for BUG definition */
-#ifdef CONFIG_XMON
-#define BUG() do { \
- printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
- xmon(0); \
-} while (0)
-#else
-#define BUG() do { \
- printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
- __asm__ __volatile__(".long 0x0"); \
-} while (0)
-#endif
#define PAGE_BUG(page) do { BUG(); } while (0)
#define STRICT_MM_TYPECHECKS
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index cd08cd136e32..cd7e330c1eb1 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -519,47 +519,6 @@
#define PVR_MAJ(pvr) (((pvr) >> 4) & 0xF) /* Major revision field */
#define PVR_MIN(pvr) (((pvr) >> 0) & 0xF) /* Minor revision field */
-/* Processor Version Numbers */
-
-#define PVR_403GA 0x00200000
-#define PVR_403GB 0x00200100
-#define PVR_403GC 0x00200200
-#define PVR_403GCX 0x00201400
-#define PVR_405GP 0x40110000
-#define PVR_STB03XXX 0x40310000
-#define PVR_NP405H 0x41410000
-#define PVR_NP405L 0x41610000
-#define PVR_601 0x00010000
-#define PVR_602 0x00050000
-#define PVR_603 0x00030000
-#define PVR_603e 0x00060000
-#define PVR_603ev 0x00070000
-#define PVR_603r 0x00071000
-#define PVR_604 0x00040000
-#define PVR_604e 0x00090000
-#define PVR_604r 0x000A0000
-#define PVR_620 0x00140000
-#define PVR_740 0x00080000
-#define PVR_750 PVR_740
-#define PVR_740P 0x10080000
-#define PVR_750P PVR_740P
-#define PVR_7400 0x000C0000
-#define PVR_7410 0x800C0000
-#define PVR_7450 0x80000000
-/*
- * For the 8xx processors, all of them report the same PVR family for
- * the PowerPC core. The various versions of these processors must be
- * differentiated by the version number in the Communication Processor
- * Module (CPM).
- */
-#define PVR_821 0x00500000
-#define PVR_823 PVR_821
-#define PVR_850 PVR_821
-#define PVR_860 PVR_821
-#define PVR_8240 0x00810100
-#define PVR_8245 0x80811014
-#define PVR_8260 PVR_8240
-
/* We only need to define a new _MACH_xxx for machines which are part of
* a configuration which supports more than one type of different machine.
* This is currently limited to CONFIG_ALL_PPC and CHRP/PReP/PMac. -- Tom
@@ -690,11 +649,7 @@ extern struct task_struct *last_task_used_altivec;
* as soon as I get around to remapping the io areas with the BATs
* to match the mac we can raise this. -- Cort
*/
-#ifdef CONFIG_TASK_SIZE_BOOL
-#define TASK_SIZE CONFIG_TASK_SIZE
-#else
-#define TASK_SIZE (0x80000000UL)
-#endif
+#define TASK_SIZE (CONFIG_TASK_SIZE)
/* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
@@ -788,6 +743,19 @@ extern inline void prefetchw(const void *x)
#define spin_lock_prefetch(x) prefetchw(x)
+#ifdef CONFIG_XMON
+extern void xmon(struct pt_regs *);
+#define BUG() do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ xmon(0); \
+} while (0)
+#else
+#define BUG() do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ __asm__ __volatile__(".long 0x0"); \
+} while (0)
+#endif
+
#endif /* !__ASSEMBLY__ */
#endif /* __ASM_PPC_PROCESSOR_H */
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index defce1be68ce..0e3f73f7a73e 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -47,13 +47,13 @@ int venus_close(struct super_block *sb, struct ViceFid *fid, int flags,
int venus_open(struct super_block *sb, struct ViceFid *fid,
int flags, struct file **f);
int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid,
- const char *name, int length,
- struct ViceFid *newfid, struct coda_vattr *attrs);
+ const char *name, int length,
+ struct ViceFid *newfid, struct coda_vattr *attrs);
int venus_create(struct super_block *sb, struct ViceFid *dirfid,
- const char *name, int length, int excl, int mode, int rdev,
- struct ViceFid *newfid, struct coda_vattr *attrs) ;
+ const char *name, int length, int excl, int mode, dev_t rdev,
+ struct ViceFid *newfid, struct coda_vattr *attrs) ;
int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid,
- const char *name, int length);
+ const char *name, int length);
int venus_remove(struct super_block *sb, struct ViceFid *dirfid,
const char *name, int length);
int venus_readlink(struct super_block *sb, struct ViceFid *fid,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7aa6498d7d5d..bbb4e2cacecc 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -773,7 +773,7 @@ struct inode_operations {
int (*symlink) (struct inode *,struct dentry *,const char *);
int (*mkdir) (struct inode *,struct dentry *,int);
int (*rmdir) (struct inode *,struct dentry *);
- int (*mknod) (struct inode *,struct dentry *,int,int);
+ int (*mknod) (struct inode *,struct dentry *,int,dev_t);
int (*rename) (struct inode *, struct dentry *,
struct inode *, struct dentry *);
int (*readlink) (struct dentry *, char *,int);
@@ -1109,7 +1109,7 @@ extern inline const char *bdevname(struct block_device *bdev)
}
extern const char * cdevname(kdev_t);
extern const char * kdevname(kdev_t);
-extern void init_special_inode(struct inode *, umode_t, int);
+extern void init_special_inode(struct inode *, umode_t, dev_t);
/* Invalid inode operations -- fs/bad_inode.c */
extern void make_bad_inode(struct inode *);
diff --git a/include/linux/module.h b/include/linux/module.h
index 47ff2bc63e33..927341a26c0e 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -28,8 +28,6 @@
#define MODULE_AUTHOR(name)
#define MODULE_DESCRIPTION(desc)
#define MODULE_SUPPORTED_DEVICE(name)
-#define MODULE_GENERIC_TABLE(gtype,name)
-#define MODULE_DEVICE_TABLE(type,name)
#define MODULE_PARM_DESC(var,desc)
#define print_modules()
@@ -41,14 +39,28 @@ struct kernel_symbol
};
#ifdef MODULE
+
+#define MODULE_GENERIC_TABLE(gtype,name) \
+static const unsigned long __module_##gtype##_size \
+ __attribute__ ((unused)) = sizeof(struct gtype##_id); \
+static const struct gtype##_id * __module_##gtype##_table \
+ __attribute__ ((unused)) = name
+
/* This is magically filled in by the linker, but THIS_MODULE must be
a constant so it works in initializers. */
extern struct module __this_module;
#define THIS_MODULE (&__this_module)
-#else
+
+#else /* !MODULE */
+
+#define MODULE_GENERIC_TABLE(gtype,name)
#define THIS_MODULE ((struct module *)0)
+
#endif
+#define MODULE_DEVICE_TABLE(type,name) \
+ MODULE_GENERIC_TABLE(type##_device,name)
+
struct kernel_symbol_group
{
/* Links us into the global symbol list */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7206acd7870b..3fa04d5f93f8 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -517,21 +517,6 @@ void pcibios_update_resource(struct pci_dev *, struct resource *,
void pcibios_update_irq(struct pci_dev *, int irq);
void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *);
-/* Backward compatibility, don't use in new code! */
-
-int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn,
- unsigned char where, unsigned char *val);
-int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn,
- unsigned char where, unsigned short *val);
-int pcibios_read_config_dword (unsigned char bus, unsigned char dev_fn,
- unsigned char where, unsigned int *val);
-int pcibios_write_config_byte (unsigned char bus, unsigned char dev_fn,
- unsigned char where, unsigned char val);
-int pcibios_write_config_word (unsigned char bus, unsigned char dev_fn,
- unsigned char where, unsigned short val);
-int pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn,
- unsigned char where, unsigned int val);
-
/* Generic PCI functions used internally */
int pci_bus_exists(const struct list_head *list, int nr);
@@ -668,8 +653,6 @@ extern struct pci_dev *isa_bridge;
static inline int pci_present(void) { return 0; }
#define _PCI_NOP(o,s,t) \
- static inline int pcibios_##o##_config_##s (u8 bus, u8 dfn, u8 where, t val) \
- { return PCIBIOS_FUNC_NOT_SUPPORTED; } \
static inline int pci_##o##_config_##s (struct pci_dev *dev, int where, t val) \
{ return PCIBIOS_FUNC_NOT_SUPPORTED; }
#define _PCI_NOP_ALL(o,x) _PCI_NOP(o,byte,u8 x) \
diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p
index 99e6eefa8229..7034b7eb6b16 100644
--- a/include/linux/umsdos_fs.p
+++ b/include/linux/umsdos_fs.p
@@ -82,7 +82,7 @@ int UMSDOS_mkdir (struct inode *dir,
int UMSDOS_mknod (struct inode *dir,
struct dentry *dentry,
int mode,
- int rdev);
+ dev_t rdev);
int UMSDOS_rmdir (struct inode *dir,struct dentry *dentry);
int UMSDOS_unlink (struct inode *dir, struct dentry *dentry);
int UMSDOS_rename (struct inode *old_dir,
diff --git a/include/linux/umsdos_fs_i.h b/include/linux/umsdos_fs_i.h
index 0edfb1d541a4..f4c992b44cd2 100644
--- a/include/linux/umsdos_fs_i.h
+++ b/include/linux/umsdos_fs_i.h
@@ -50,9 +50,9 @@ struct dir_locking_info {
struct umsdos_inode_info {
struct msdos_inode_info msdos_info;
struct dir_locking_info dir_info;
- int i_patched; /* Inode has been patched */
- int i_is_hlink; /* Resolved hardlink inode? */
- off_t pos; /* Entry offset in the emd_owner file */
+ int i_patched; /* Inode has been patched */
+ int i_is_hlink; /* Resolved hardlink inode? */
+ off_t pos; /* Entry offset in the emd_owner file */
};
#endif