summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2003-01-03 22:54:29 -0600
committerPatrick Mochel <mochel@osdl.org>2003-01-03 22:54:29 -0600
commit8624ae3d2d3928a83d54585dd053583d81d781f2 (patch)
tree852d8331f5f12d5040c6fa7d22d1c49aeb41b67c /include
parent6223578142a8216a64063d22903ae215d885fb32 (diff)
parent6b4e1e926ae0ee936914e4fd729382af433938fb (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')
-rw-r--r--include/asm-i386/io_apic.h3
-rw-r--r--include/asm-ia64/compat.h8
-rw-r--r--include/asm-ia64/ia32.h9
-rw-r--r--include/asm-ppc64/compat.h9
-rw-r--r--include/asm-ppc64/ppc32.h9
-rw-r--r--include/asm-s390x/compat.h9
-rw-r--r--include/asm-sparc/bitops.h3
-rw-r--r--include/asm-sparc/ide.h4
-rw-r--r--include/asm-sparc/sbus.h11
-rw-r--r--include/asm-sparc/system.h1
-rw-r--r--include/asm-sparc/thread_info.h2
-rw-r--r--include/asm-sparc64/compat.h9
-rw-r--r--include/asm-sparc64/fcntl.h11
-rw-r--r--include/asm-sparc64/ide.h4
-rw-r--r--include/asm-sparc64/smp.h4
-rw-r--r--include/asm-x86_64/compat.h8
-rw-r--r--include/asm-x86_64/ia32.h10
-rw-r--r--include/linux/compat.h3
-rw-r--r--include/linux/crc32.h12
19 files changed, 77 insertions, 52 deletions
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h
index 500053c36f82..57d8cf06ddc5 100644
--- a/include/asm-i386/io_apic.h
+++ b/include/asm-i386/io_apic.h
@@ -16,7 +16,8 @@
#define APIC_MISMATCH_DEBUG
#define IO_APIC_BASE(idx) \
- ((volatile int *)__fix_to_virt(FIX_IO_APIC_BASE_0 + idx))
+ ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
+ + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
/*
* The structure of the IO-APIC:
diff --git a/include/asm-ia64/compat.h b/include/asm-ia64/compat.h
index a01babfd700e..69bf8481be81 100644
--- a/include/asm-ia64/compat.h
+++ b/include/asm-ia64/compat.h
@@ -53,4 +53,12 @@ struct compat_stat {
u32 __unused5;
};
+struct compat_flock {
+ short l_type;
+ short l_whence;
+ compat_off_t l_start;
+ compat_off_t l_len;
+ compat_pid_t l_pid;
+};
+
#endif /* _ASM_IA64_COMPAT_H */
diff --git a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h
index 1c23e5189319..bb2f802fe3dc 100644
--- a/include/asm-ia64/ia32.h
+++ b/include/asm-ia64/ia32.h
@@ -29,15 +29,6 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
#define IA32_PAGE_ALIGN(addr) (((addr) + IA32_PAGE_SIZE - 1) & IA32_PAGE_MASK)
#define IA32_CLOCKS_PER_SEC 100 /* Cast in stone for IA32 Linux */
-/* fcntl.h */
-struct flock32 {
- short l_type;
- short l_whence;
- compat_off_t l_start;
- compat_off_t l_len;
- compat_pid_t l_pid;
-};
-
#define F_GETLK64 12
#define F_SETLK64 13
#define F_SETLKW64 14
diff --git a/include/asm-ppc64/compat.h b/include/asm-ppc64/compat.h
index 8ad44c0e53d4..a32b56af16b5 100644
--- a/include/asm-ppc64/compat.h
+++ b/include/asm-ppc64/compat.h
@@ -55,4 +55,13 @@ struct compat_stat {
u32 __unused4[2];
};
+struct compat_flock {
+ short l_type;
+ short l_whence;
+ compat_off_t l_start;
+ compat_off_t l_len;
+ compat_pid_t l_pid;
+ short __unused;
+};
+
#endif /* _ASM_PPC64_COMPAT_H */
diff --git a/include/asm-ppc64/ppc32.h b/include/asm-ppc64/ppc32.h
index 5b7a8dc91bda..019ae718e38b 100644
--- a/include/asm-ppc64/ppc32.h
+++ b/include/asm-ppc64/ppc32.h
@@ -141,15 +141,6 @@ typedef struct sigaltstack_32 {
compat_size_t ss_size;
} stack_32_t;
-struct flock32 {
- short l_type;
- short l_whence;
- compat_off_t l_start;
- compat_off_t l_len;
- compat_pid_t l_pid;
- short __unused;
-};
-
struct sigcontext32 {
unsigned int _unused[4];
int signal;
diff --git a/include/asm-s390x/compat.h b/include/asm-s390x/compat.h
index e376c77f391c..d84bb8d4020d 100644
--- a/include/asm-s390x/compat.h
+++ b/include/asm-s390x/compat.h
@@ -58,4 +58,13 @@ struct compat_stat {
u32 __unused5;
};
+struct compat_flock {
+ short l_type;
+ short l_whence;
+ compat_off_t l_start;
+ compat_off_t l_len;
+ compat_pid_t l_pid;
+ short __unused;
+};
+
#endif /* _ASM_S390X_COMPAT_H */
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h
index dae6d062eeb5..5b9707927b43 100644
--- a/include/asm-sparc/bitops.h
+++ b/include/asm-sparc/bitops.h
@@ -9,9 +9,8 @@
#ifndef _SPARC_BITOPS_H
#define _SPARC_BITOPS_H
-#include <linux/kernel.h>
+#include <linux/compiler.h>
#include <asm/byteorder.h>
-#include <asm/system.h>
#ifdef __KERNEL__
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h
index c8a97fd7ef6a..40c498bd2445 100644
--- a/include/asm-sparc/ide.h
+++ b/include/asm-sparc/ide.h
@@ -78,11 +78,9 @@ static __inline__ void ide_init_default_hwifs(void)
#define ide_release_region(from,extent) release_region((from), (extent))
/*
- * The following are not needed for the non-m68k ports
+ * The following is not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1)
-#define ide_release_lock(lock) do {} while (0)
-#define ide_get_lock(lock, hdlr, data) do {} while (0)
/* XXX Known to be broken. Axboe will fix the problems this
* XXX has by making seperate IN/OUT macros for IDE_DATA
diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h
index 6a95593c2d52..bf09706e88ea 100644
--- a/include/asm-sparc/sbus.h
+++ b/include/asm-sparc/sbus.h
@@ -121,4 +121,15 @@ extern void sbus_unmap_sg(struct sbus_dev *, struct scatterlist *, int, int);
extern void sbus_dma_sync_single(struct sbus_dev *, dma_addr_t, size_t, int);
extern void sbus_dma_sync_sg(struct sbus_dev *, struct scatterlist *, int, int);
+/* Eric Brower (ebrower@usa.net)
+ * Translate SBus interrupt levels to ino values--
+ * this is used when converting sbus "interrupts" OBP
+ * node values to "intr" node values, and is platform
+ * dependent. If only we could call OBP with
+ * "sbus-intr>cpu (sbint -- ino)" from kernel...
+ * See .../drivers/sbus/sbus.c for details.
+ */
+BTFIXUPDEF_CALL(unsigned int, sbint_to_irq, struct sbus_dev *sdev, unsigned int)
+#define sbint_to_irq(sdev, sbint) BTFIXUP_CALL(sbint_to_irq)(sdev, sbint)
+
#endif /* !(_SPARC_SBUS_H) */
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h
index b743926155c5..244647dc22c4 100644
--- a/include/asm-sparc/system.h
+++ b/include/asm-sparc/system.h
@@ -7,6 +7,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/threads.h> /* NR_CPUS */
+#include <linux/thread_info.h>
#include <asm/segment.h>
#include <asm/page.h>
diff --git a/include/asm-sparc/thread_info.h b/include/asm-sparc/thread_info.h
index f724a01c94ff..bc004d4c0e3b 100644
--- a/include/asm-sparc/thread_info.h
+++ b/include/asm-sparc/thread_info.h
@@ -11,8 +11,6 @@
#ifndef _ASM_THREAD_INFO_H
#define _ASM_THREAD_INFO_H
-// XXX todo: comment thread_info components and see what breaks.
-
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
diff --git a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h
index 36fcfd6ced5f..f384c300e5e3 100644
--- a/include/asm-sparc64/compat.h
+++ b/include/asm-sparc64/compat.h
@@ -42,4 +42,13 @@ struct compat_timeval {
s32 tv_usec;
};
+struct compat_flock {
+ short l_type;
+ short l_whence;
+ __kernel_off_t32 l_start;
+ __kernel_off_t32 l_len;
+ __kernel_pid_t32 l_pid;
+ short __unused;
+};
+
#endif /* _ASM_SPARC64_COMPAT_H */
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h
index 38ee2703ede9..902daf86f13b 100644
--- a/include/asm-sparc64/fcntl.h
+++ b/include/asm-sparc64/fcntl.h
@@ -79,17 +79,6 @@ struct flock {
};
#ifdef __KERNEL__
-struct flock32 {
- short l_type;
- short l_whence;
- __kernel_off_t32 l_start;
- __kernel_off_t32 l_len;
- __kernel_pid_t32 l_pid;
- short __unused;
-};
-#endif
-
-#ifdef __KERNEL__
#define flock64 flock
#endif
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h
index 8adfd4967c1c..32aab1e59203 100644
--- a/include/asm-sparc64/ide.h
+++ b/include/asm-sparc64/ide.h
@@ -75,11 +75,9 @@ static __inline__ void ide_init_default_hwifs(void)
#define ide_release_region(from,extent) release_region((from), (extent))
/*
- * The following are not needed for the non-m68k ports
+ * The following is not needed for the non-m68k ports
*/
#define ide_ack_intr(hwif) (1)
-#define ide_release_lock(lock) do {} while (0)
-#define ide_get_lock(lock, hdlr, data) do {} while (0)
/* XXX Known to be broken. Axboe will fix the problems this
* XXX has by making seperate IN/OUT macros for IDE_DATA
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
index babbfe5f916b..b57fd36a1193 100644
--- a/include/asm-sparc64/smp.h
+++ b/include/asm-sparc64/smp.h
@@ -8,12 +8,14 @@
#include <linux/config.h>
#include <linux/threads.h>
-#include <linux/cache.h>
#include <asm/asi.h>
#include <asm/starfire.h>
#include <asm/spitfire.h>
#ifndef __ASSEMBLY__
+
+#include <linux/cache.h>
+
/* PROM provided per-processor information we need
* to start them all up.
*/
diff --git a/include/asm-x86_64/compat.h b/include/asm-x86_64/compat.h
index 47e4aa499cc2..adc5293b3a2b 100644
--- a/include/asm-x86_64/compat.h
+++ b/include/asm-x86_64/compat.h
@@ -54,4 +54,12 @@ struct compat_stat {
u32 __unused5;
};
+struct compat_flock {
+ short l_type;
+ short l_whence;
+ compat_off_t l_start;
+ compat_off_t l_len;
+ compat_pid_t l_pid;
+};
+
#endif /* _ASM_X86_64_COMPAT_H */
diff --git a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h
index 23d4d607a398..802b85d4750f 100644
--- a/include/asm-x86_64/ia32.h
+++ b/include/asm-x86_64/ia32.h
@@ -22,16 +22,6 @@ typedef long __kernel_loff_t32;
typedef __kernel_fsid_t __kernel_fsid_t32;
-/* fcntl.h */
-struct flock32 {
- short l_type;
- short l_whence;
- compat_off_t l_start;
- compat_off_t l_len;
- compat_pid_t l_pid;
-};
-
-
struct ia32_flock64 {
short l_type;
short l_whence;
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 3f634baef539..39405f5a06ea 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -10,6 +10,7 @@
#include <linux/stat.h>
#include <linux/param.h> /* for HZ */
+#include <linux/fcntl.h> /* for struct flock */
#include <asm/compat.h>
#define compat_jiffies_to_clock_t(x) \
@@ -33,6 +34,8 @@ struct compat_tms {
};
extern int cp_compat_stat(struct kstat *, struct compat_stat *);
+extern int get_compat_flock(struct flock *, struct compat_flock *);
+extern int put_compat_flock(struct flock *, struct compat_flock *);
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */
diff --git a/include/linux/crc32.h b/include/linux/crc32.h
index a0033ffee91c..56c0645789a9 100644
--- a/include/linux/crc32.h
+++ b/include/linux/crc32.h
@@ -9,9 +9,19 @@
extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len);
+extern u32 bitreverse(u32 in);
#define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)data, length)
+
+/*
+ * Helpers for hash table generation of ethernet nics:
+ *
+ * Ethernet sends the least significant bit of a byte first, thus crc32_le
+ * is used. The output of crc32_le is bit reversed [most significant bit
+ * is in bit nr 0], thus it must be reversed before use. Except for
+ * nics that bit swap the result internally...
+ */
+#define ether_crc(length, data) bitreverse(crc32_le(~0, data, length))
#define ether_crc_le(length, data) crc32_le(~0, data, length)
-#define ether_crc(length, data) crc32_be(~0, data, length)
#endif /* _LINUX_CRC32_H */