summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
commit8624512aa908741ba2795200133eae0d7f4557ea (patch)
treed5d3036fccf2604f4c98dedc11e8adb929d6b52e /include
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/atomic.h8
-rw-r--r--include/asm-alpha/bitops.h12
-rw-r--r--include/asm-alpha/parport.h2
-rw-r--r--include/asm-alpha/pci.h19
-rw-r--r--include/asm-alpha/semaphore-helper.h4
-rw-r--r--include/asm-alpha/semaphore.h16
-rw-r--r--include/asm-alpha/spinlock.h8
-rw-r--r--include/asm-alpha/system.h36
-rw-r--r--include/asm-arm/arch-arc/io.h2
-rw-r--r--include/asm-arm/arch-cl7500/io.h2
-rw-r--r--include/asm-arm/arch-ebsa110/io.h2
-rw-r--r--include/asm-arm/arch-ebsa285/io.h4
-rw-r--r--include/asm-arm/arch-nexuspci/io.h2
-rw-r--r--include/asm-arm/arch-rpc/io.h2
-rw-r--r--include/asm-arm/arch-sa1100/io.h4
-rw-r--r--include/asm-arm/parport.h2
-rw-r--r--include/asm-i386/atomic.h11
-rw-r--r--include/asm-i386/hardirq.h32
-rw-r--r--include/asm-i386/hw_irq.h10
-rw-r--r--include/asm-i386/mpspec.h3
-rw-r--r--include/asm-i386/parport.h22
-rw-r--r--include/asm-i386/pgtable.h1
-rw-r--r--include/asm-i386/smp.h2
-rw-r--r--include/asm-i386/softirq.h8
-rw-r--r--include/asm-ia64/offsets.h6
-rw-r--r--include/asm-ia64/page.h5
-rw-r--r--include/asm-ia64/pgalloc.h21
-rw-r--r--include/asm-ia64/pgtable.h14
-rw-r--r--include/asm-ia64/processor.h36
-rw-r--r--include/asm-ia64/siginfo.h21
-rw-r--r--include/asm-mips/hardirq.h19
-rw-r--r--include/asm-mips/hw_irq.h5
-rw-r--r--include/asm-mips/parport.h22
-rw-r--r--include/asm-mips/pgtable.h3
-rw-r--r--include/asm-mips/softirq.h10
-rw-r--r--include/asm-mips64/hardirq.h15
-rw-r--r--include/asm-mips64/hw_irq.h5
-rw-r--r--include/asm-mips64/parport.h22
-rw-r--r--include/asm-mips64/pgtable.h3
-rw-r--r--include/asm-mips64/softirq.h10
-rw-r--r--include/asm-ppc/hw_irq.h21
-rw-r--r--include/asm-ppc/io.h98
-rw-r--r--include/asm-ppc/irq.h56
-rw-r--r--include/asm-ppc/pci.h3
-rw-r--r--include/asm-ppc/processor.h11
-rw-r--r--include/asm-ppc/system.h1
-rw-r--r--include/asm-ppc/types.h9
-rw-r--r--include/asm-ppc/vga.h4
-rw-r--r--include/asm-sparc/termbits.h5
-rw-r--r--include/asm-sparc64/io.h24
-rw-r--r--include/asm-sparc64/siginfo.h2
-rw-r--r--include/asm-sparc64/termbits.h5
-rw-r--r--include/linux/ac97_codec.h159
-rw-r--r--include/linux/affs_fs.h4
-rw-r--r--include/linux/bfs_fs.h2
-rw-r--r--include/linux/blkdev.h5
-rw-r--r--include/linux/coda_linux.h1
-rw-r--r--include/linux/dlists.h108
-rw-r--r--include/linux/efs_fs.h2
-rw-r--r--include/linux/ext2_fs.h15
-rw-r--r--include/linux/fb.h19
-rw-r--r--include/linux/fs.h15
-rw-r--r--include/linux/hdreg.h66
-rw-r--r--include/linux/hfs_fs.h16
-rw-r--r--include/linux/ide.h14
-rw-r--r--include/linux/irq.h34
-rw-r--r--include/linux/isdn.h27
-rw-r--r--include/linux/iso_fs.h2
-rw-r--r--include/linux/list.h3
-rw-r--r--include/linux/lists.h62
-rw-r--r--include/linux/matroxfb.h32
-rw-r--r--include/linux/minix_fs.h13
-rw-r--r--include/linux/mm.h3
-rw-r--r--include/linux/mmzone.h5
-rw-r--r--include/linux/msdos_fs.h1
-rw-r--r--include/linux/ncp_fs.h2
-rw-r--r--include/linux/netdevice.h49
-rw-r--r--include/linux/nfs_fs.h3
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/pci_ids.h8
-rw-r--r--include/linux/pm.h15
-rw-r--r--include/linux/prctl.h6
-rw-r--r--include/linux/proc_fs.h12
-rw-r--r--include/linux/qnx4_fs.h2
-rw-r--r--include/linux/raid/md_k.h4
-rw-r--r--include/linux/smb_fs.h2
-rw-r--r--include/linux/sysctl.h6
-rw-r--r--include/linux/sysv_fs.h14
-rw-r--r--include/linux/timer.h1
-rw-r--r--include/linux/ufs_fs.h15
-rw-r--r--include/linux/umsdos_fs.h3
-rw-r--r--include/linux/wait.h1
-rw-r--r--include/net/atmclip.h7
93 files changed, 811 insertions, 618 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h
index 67b74d356..81f7b8268 100644
--- a/include/asm-alpha/atomic.h
+++ b/include/asm-alpha/atomic.h
@@ -41,7 +41,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
" addl %0,%2,%0\n"
" stl_c %0,%1\n"
" beq %0,2f\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v))
@@ -56,7 +56,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v)
" subl %0,%2,%0\n"
" stl_c %0,%1\n"
" beq %0,2f\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v))
@@ -76,7 +76,7 @@ extern __inline__ long atomic_add_return(int i, atomic_t * v)
" stl_c %0,%1\n"
" beq %0,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v)), "=&r" (result)
@@ -94,7 +94,7 @@ extern __inline__ long atomic_sub_return(int i, atomic_t * v)
" stl_c %0,%1\n"
" beq %0,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v)), "=&r" (result)
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h
index c590d9e51..0d7a881a7 100644
--- a/include/asm-alpha/bitops.h
+++ b/include/asm-alpha/bitops.h
@@ -31,7 +31,7 @@ extern __inline__ void set_bit(unsigned long nr, volatile void * addr)
" stl_c %0,%1\n"
" beq %0,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
@@ -52,7 +52,7 @@ extern __inline__ void clear_bit(unsigned long nr, volatile void * addr)
" stl_c %0,%1\n"
" beq %0,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
@@ -69,7 +69,7 @@ extern __inline__ void change_bit(unsigned long nr, volatile void * addr)
" xor %0,%2,%0\n"
" stl_c %0,%1\n"
" beq %0,3f\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m)
@@ -92,7 +92,7 @@ extern __inline__ int test_and_set_bit(unsigned long nr,
" beq %0,3f\n"
" mb\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
@@ -117,7 +117,7 @@ extern __inline__ int test_and_clear_bit(unsigned long nr,
" beq %0,3f\n"
" mb\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
@@ -140,7 +140,7 @@ extern __inline__ int test_and_change_bit(unsigned long nr,
" stl_c %0,%1\n"
" beq %0,3f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
diff --git a/include/asm-alpha/parport.h b/include/asm-alpha/parport.h
index bc6b79597..d1099fd8c 100644
--- a/include/asm-alpha/parport.h
+++ b/include/asm-alpha/parport.h
@@ -43,6 +43,8 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
count++;
} while (*io && (++i < PARPORT_PC_MAX_PORTS));
} else {
+ count += parport_pc_init_superio ();
+
/* Probe all the likely ports. */
if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
count++;
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
index 0cf0e1c75..4695112ce 100644
--- a/include/asm-alpha/pci.h
+++ b/include/asm-alpha/pci.h
@@ -118,7 +118,8 @@ extern void pci_unmap_sg(struct pci_dev *, struct scatterlist *, int, int);
again owns the buffer. */
extern inline void
-pci_dma_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size, int direction)
+pci_dma_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size,
+ int direction)
{
/* Nothing to do. */
}
@@ -128,19 +129,17 @@ pci_dma_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size, int dir
for a scatter-gather list, same rules and usage. */
extern inline void
-pci_dma_sync_sg(struct pci_dev *dev, struct scatterlist *sg, int nents, int direction)
+pci_dma_sync_sg(struct pci_dev *dev, struct scatterlist *sg, int nents,
+ int direction)
{
/* Nothing to do. */
}
/* Return whether the given PCI device DMA address mask can
- * be supported properly. For example, if your device can
- * only drive the low 24-bits during PCI bus mastering, then
- * you would pass 0x00ffffff as the mask to this function.
- */
-extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
-{
- return 1;
-}
+ be supported properly. For example, if your device can
+ only drive the low 24-bits during PCI bus mastering, then
+ you would pass 0x00ffffff as the mask to this function. */
+
+extern int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask);
#endif /* __ALPHA_PCI_H */
diff --git a/include/asm-alpha/semaphore-helper.h b/include/asm-alpha/semaphore-helper.h
index 0577d2c93..2812510db 100644
--- a/include/asm-alpha/semaphore-helper.h
+++ b/include/asm-alpha/semaphore-helper.h
@@ -34,7 +34,7 @@ waking_non_zero(struct semaphore *sem)
" stl_c %0,%2\n"
" beq %0,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=r"(ret), "=r"(tmp), "=m"(__atomic_fool_gcc(&sem->waking))
@@ -104,7 +104,7 @@ waking_non_zero_interruptible(struct semaphore *sem, struct task_struct *tsk)
" stq_c %1,%4\n"
" beq %1,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), "=&r"(tmp3), "=m"(*sem)
diff --git a/include/asm-alpha/semaphore.h b/include/asm-alpha/semaphore.h
index 6cf9873f5..38bc05c6e 100644
--- a/include/asm-alpha/semaphore.h
+++ b/include/asm-alpha/semaphore.h
@@ -116,7 +116,7 @@ extern inline void down(struct semaphore * sem)
" beq $28,2f\n"
" blt $24,3f\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" jsr $28,($27),__down_failed\n"
@@ -153,7 +153,7 @@ extern inline int down_interruptible(struct semaphore * sem)
" blt $24,3f\n"
" mov $31,%0\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%2\n"
" jsr $28,($27),__down_failed_interruptible\n"
@@ -216,7 +216,7 @@ extern inline int down_trylock(struct semaphore * sem)
" stq_c %1,%4\n"
" beq %1,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), "=&r"(sub)
@@ -253,7 +253,7 @@ extern inline void up(struct semaphore * sem)
" beq $28,2f\n"
" ble $24,3f\n"
"4:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" jsr $28,($27),__up_wakeup\n"
@@ -379,7 +379,7 @@ extern inline void down_read(struct rw_semaphore *sem)
" beq $28,2f\n"
" blt $25,3f\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" jsr $28,($27),__down_read_failed\n"
@@ -429,7 +429,7 @@ extern inline void down_write(struct rw_semaphore *sem)
" beq $28,2f\n"
" bne $25,3f\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" jsr $28,($27),__down_write_failed\n"
@@ -488,7 +488,7 @@ extern inline void up_read(struct rw_semaphore *sem)
" beq $28,2f\n"
" beq $24,3f\n"
"4:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" mov 0,$25\n"
@@ -538,7 +538,7 @@ extern inline void up_write(struct rw_semaphore *sem)
" beq $28,2f\n"
" blt $24,3f\n"
"4:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: ldah $25,%3($24)\n"
/* Only do the wake if we're no longer negative. */
diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h
index 6153b2a86..c14eb0909 100644
--- a/include/asm-alpha/spinlock.h
+++ b/include/asm-alpha/spinlock.h
@@ -78,7 +78,7 @@ static inline void spin_lock(spinlock_t * lock)
" stl_c %0,%1\n"
" beq %0,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: ldl %0,%1\n"
" blbs %0,2b\n"
" br 1b\n"
@@ -114,7 +114,7 @@ static inline void write_lock(rwlock_t * lock)
" stl_c %1,%0\n"
" beq %1,6f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"6: ldl %1,%0\n"
" bne %1,6b\n"
" br 1b\n"
@@ -135,7 +135,7 @@ static inline void read_lock(rwlock_t * lock)
" stl_c %1,%0\n"
" beq %1,6f\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"6: ldl %1,%0\n"
" blbs %1,6b\n"
" br 1b\n"
@@ -160,7 +160,7 @@ static inline void read_unlock(rwlock_t * lock)
" addl %1,2,%1\n"
" stl_c %1,%0\n"
" beq %1,6f\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"6: br 1b\n"
".previous"
: "=m" (__dummy_lock(lock)), "=&r" (regx)
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index 15472dfbd..49d68b447 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -259,11 +259,31 @@ __CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long);
__CALL_PAL_W1(wrusp, unsigned long);
__CALL_PAL_W1(wrvptptr, unsigned long);
-#define __cli() ((void) swpipl(7))
-#define __sti() ((void) swpipl(0))
+#define IPL_MIN 0
+#define IPL_SW0 1
+#define IPL_SW1 2
+#define IPL_DEV0 3
+#define IPL_DEV1 4
+#define IPL_TIMER 5
+#define IPL_PERF 6
+#define IPL_POWERFAIL 6
+#define IPL_MCHECK 7
+#define IPL_MAX 7
+
+#ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK
+#undef IPL_MIN
+#define IPL_MIN __min_ipl
+extern int __min_ipl;
+#endif
+
+#define getipl() (rdps() & 7)
+#define setipl(ipl) ((void) swpipl(ipl))
+
+#define __cli() setipl(IPL_MAX)
+#define __sti() setipl(IPL_MIN)
#define __save_flags(flags) ((flags) = rdps())
-#define __save_and_cli(flags) ((flags) = swpipl(7))
-#define __restore_flags(flags) ((void) swpipl(flags))
+#define __save_and_cli(flags) ((flags) = swpipl(IPL_MAX))
+#define __restore_flags(flags) setipl(flags)
#define local_irq_save(flags) __save_and_cli(flags)
#define local_irq_restore(flags) __restore_flags(flags)
@@ -332,7 +352,7 @@ __xchg_u32(volatile int *m, unsigned long val)
" stl_c %1,%2\n"
" beq %1,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
: "=&r" (val), "=&r" (dummy), "=m" (*m)
@@ -352,7 +372,7 @@ __xchg_u64(volatile long *m, unsigned long val)
" stq_c %1,%2\n"
" beq %1,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
: "=&r" (val), "=&r" (dummy), "=m" (*m)
@@ -408,7 +428,7 @@ __cmpxchg_u32(volatile int *m, int old, int new)
" stl_c %1,%2\n"
" beq %1,3f\n"
"2: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=&r"(prev), "=&r"(cmp), "=m"(*m)
@@ -430,7 +450,7 @@ __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
" stq_c %1,%2\n"
" beq %1,3f\n"
"2: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=&r"(prev), "=&r"(cmp), "=m"(*m)
diff --git a/include/asm-arm/arch-arc/io.h b/include/asm-arm/arch-arc/io.h
index c7d6b9e2b..e42c80b02 100644
--- a/include/asm-arm/arch-arc/io.h
+++ b/include/asm-arm/arch-arc/io.h
@@ -91,7 +91,7 @@ extern __inline__ unsigned int __ioaddr (unsigned int port) \
DECLARE_IO(char,b,"b")
DECLARE_IO(short,w,"")
-DECLARE_IO(long,l,"")
+DECLARE_IO(int,l,"")
#undef DECLARE_IO
#undef DECLARE_DYN_IN
diff --git a/include/asm-arm/arch-cl7500/io.h b/include/asm-arm/arch-cl7500/io.h
index bdbbefce3..37f44316c 100644
--- a/include/asm-arm/arch-cl7500/io.h
+++ b/include/asm-arm/arch-cl7500/io.h
@@ -92,7 +92,7 @@ extern __inline__ unsigned int __ioaddr (unsigned int port) \
DECLARE_IO(char,b,"b")
DECLARE_IO(short,w,"")
-DECLARE_IO(long,l,"")
+DECLARE_IO(int,l,"")
#undef DECLARE_IO
#undef DECLARE_DYN_IN
diff --git a/include/asm-arm/arch-ebsa110/io.h b/include/asm-arm/arch-ebsa110/io.h
index 4f936f0e9..bca7df287 100644
--- a/include/asm-arm/arch-ebsa110/io.h
+++ b/include/asm-arm/arch-ebsa110/io.h
@@ -67,7 +67,7 @@ extern __inline__ unsigned int __ioaddr (unsigned int port) \
DECLARE_IO(char,b,"b")
DECLARE_IO(short,w,"")
-DECLARE_IO(long,l,"")
+DECLARE_IO(int,l,"")
#undef DECLARE_IO
#undef DECLARE_DYN_OUT
diff --git a/include/asm-arm/arch-ebsa285/io.h b/include/asm-arm/arch-ebsa285/io.h
index 877625fa8..8f24298b2 100644
--- a/include/asm-arm/arch-ebsa285/io.h
+++ b/include/asm-arm/arch-ebsa285/io.h
@@ -45,7 +45,7 @@ extern __inline__ unsigned long ___mem_isa(unsigned long a)
* Generic virtual read/write
*/
#define __arch_getb(a) (*(volatile unsigned char *)(a))
-#define __arch_getl(a) (*(volatile unsigned long *)(a))
+#define __arch_getl(a) (*(volatile unsigned int *)(a))
extern __inline__ unsigned int __arch_getw(unsigned long a)
{
@@ -58,7 +58,7 @@ extern __inline__ unsigned int __arch_getw(unsigned long a)
#define __arch_putb(v,a) (*(volatile unsigned char *)(a) = (v))
-#define __arch_putl(v,a) (*(volatile unsigned long *)(a) = (v))
+#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
extern __inline__ void __arch_putw(unsigned int value, unsigned long a)
{
diff --git a/include/asm-arm/arch-nexuspci/io.h b/include/asm-arm/arch-nexuspci/io.h
index f70fbadbd..3c8d15b3d 100644
--- a/include/asm-arm/arch-nexuspci/io.h
+++ b/include/asm-arm/arch-nexuspci/io.h
@@ -46,7 +46,7 @@ extern __inline__ unsigned int __ioaddr (unsigned int port) \
DECLARE_IO(char,b,"b","Jr")
DECLARE_IO(short,w,"h","r")
-DECLARE_IO(long,l,"","Jr")
+DECLARE_IO(int,l,"","Jr")
#undef DECLARE_IO
#undef DECLARE_DYN_OUT
diff --git a/include/asm-arm/arch-rpc/io.h b/include/asm-arm/arch-rpc/io.h
index 2e093217c..508560bda 100644
--- a/include/asm-arm/arch-rpc/io.h
+++ b/include/asm-arm/arch-rpc/io.h
@@ -90,7 +90,7 @@ extern __inline__ unsigned int __ioaddr (unsigned int port) \
DECLARE_IO(char,b,"b")
DECLARE_IO(short,w,"")
-DECLARE_IO(long,l,"")
+DECLARE_IO(int,l,"")
#undef DECLARE_IO
#undef DECLARE_DYN_IN
diff --git a/include/asm-arm/arch-sa1100/io.h b/include/asm-arm/arch-sa1100/io.h
index 3e0001a1a..d1d8aa11a 100644
--- a/include/asm-arm/arch-sa1100/io.h
+++ b/include/asm-arm/arch-sa1100/io.h
@@ -20,7 +20,7 @@
* Generic virtual read/write
*/
#define __arch_getb(a) (*(volatile unsigned char *)(a))
-#define __arch_getl(a) (*(volatile unsigned long *)(a))
+#define __arch_getl(a) (*(volatile unsigned int *)(a))
extern __inline__ unsigned int __arch_getw(unsigned long a)
{
@@ -33,7 +33,7 @@ extern __inline__ unsigned int __arch_getw(unsigned long a)
#define __arch_putb(v,a) (*(volatile unsigned char *)(a) = (v))
-#define __arch_putl(v,a) (*(volatile unsigned long *)(a) = (v))
+#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
extern __inline__ void __arch_putw(unsigned int value, unsigned long a)
{
diff --git a/include/asm-arm/parport.h b/include/asm-arm/parport.h
index b61c0d62c..fddb4f548 100644
--- a/include/asm-arm/parport.h
+++ b/include/asm-arm/parport.h
@@ -43,6 +43,8 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
count++;
} while (*io && (++i < PARPORT_PC_MAX_PORTS));
} else {
+ count += parport_pc_init_superio ();
+
/* Probe all the likely ports. */
if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
count++;
diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h
index 0112f9b35..51805488f 100644
--- a/include/asm-i386/atomic.h
+++ b/include/asm-i386/atomic.h
@@ -84,6 +84,17 @@ static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
return c != 0;
}
+static __inline__ int atomic_inc_and_test(volatile atomic_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__(
+ LOCK "incl %0; sete %1"
+ :"=m" (__atomic_fool_gcc(v)), "=qm" (c)
+ :"m" (__atomic_fool_gcc(v)));
+ return c != 0;
+}
+
extern __inline__ int atomic_add_negative(int i, volatile atomic_t *v)
{
unsigned char c;
diff --git a/include/asm-i386/hardirq.h b/include/asm-i386/hardirq.h
index 610db5633..6b8e92620 100644
--- a/include/asm-i386/hardirq.h
+++ b/include/asm-i386/hardirq.h
@@ -2,25 +2,24 @@
#define __ASM_HARDIRQ_H
#include <linux/threads.h>
-
-extern unsigned int local_irq_count[NR_CPUS];
+#include <linux/irq.h>
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
*/
#define in_interrupt() ({ int __cpu = smp_processor_id(); \
- (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); })
+ (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); })
-#define in_irq() (local_irq_count[smp_processor_id()] != 0)
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
#ifndef __SMP__
-#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
+#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0)
#define hardirq_endlock(cpu) do { } while (0)
-#define irq_enter(cpu, irq) (local_irq_count[cpu]++)
-#define irq_exit(cpu, irq) (local_irq_count[cpu]--)
+#define irq_enter(cpu, irq) (local_irq_count(cpu)++)
+#define irq_exit(cpu, irq) (local_irq_count(cpu)--)
#define synchronize_irq() barrier()
@@ -31,7 +30,16 @@ extern unsigned int local_irq_count[NR_CPUS];
extern unsigned char global_irq_holder;
extern unsigned volatile int global_irq_lock;
-extern atomic_t global_irq_count;
+
+static inline int irqs_running (void)
+{
+ int i;
+
+ for (i = 0; i < smp_num_cpus; i++)
+ if (local_irq_count(i))
+ return 1;
+ return 0;
+}
static inline void release_irqlock(int cpu)
{
@@ -44,8 +52,7 @@ static inline void release_irqlock(int cpu)
static inline void irq_enter(int cpu, int irq)
{
- ++local_irq_count[cpu];
- atomic_inc(&global_irq_count);
+ ++local_irq_count(cpu);
while (test_bit(0,&global_irq_lock)) {
/* nothing */;
@@ -54,13 +61,12 @@ static inline void irq_enter(int cpu, int irq)
static inline void irq_exit(int cpu, int irq)
{
- atomic_dec(&global_irq_count);
- --local_irq_count[cpu];
+ --local_irq_count(cpu);
}
static inline int hardirq_trylock(int cpu)
{
- return !local_irq_count[cpu] && !test_bit(0,&global_irq_lock);
+ return !local_irq_count(cpu) && !test_bit(0,&global_irq_lock);
}
#define hardirq_endlock(cpu) do { } while (0)
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index f6c102a7e..920faed06 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -179,13 +179,21 @@ SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
"pushl $"#nr"-256\n\t" \
"jmp common_interrupt");
+extern unsigned long prof_cpu_mask;
/*
* x86 profiling function, SMP safe. We might want to do this in
* assembly totally?
*/
static inline void x86_do_profile (unsigned long eip)
{
- if (prof_buffer && current->pid) {
+ /*
+ * Only measure the CPUs specified by /proc/irq/prof_cpu_mask.
+ * (default is all CPUs.)
+ */
+ if (!((1<<smp_processor_id()) & prof_cpu_mask))
+ return;
+
+ if (prof_buffer) {
eip -= (unsigned long) &_stext;
eip >>= prof_shift;
/*
diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h
index 7597fd40a..eaa803cb0 100644
--- a/include/asm-i386/mpspec.h
+++ b/include/asm-i386/mpspec.h
@@ -152,7 +152,8 @@ extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
extern unsigned int boot_cpu_id;
extern unsigned long phys_cpu_present_map;
extern int smp_found_config;
-extern void init_smp_config(void);
+extern void find_smp_config (void);
+extern void get_smp_config (void);
extern int nr_ioapics;
extern int apic_version [NR_CPUS];
extern int mp_bus_id_to_type [MAX_MP_BUSSES];
diff --git a/include/asm-i386/parport.h b/include/asm-i386/parport.h
index 1c2855bbe..432fc56f7 100644
--- a/include/asm-i386/parport.h
+++ b/include/asm-i386/parport.h
@@ -15,19 +15,10 @@
than PARPORT_MAX (in <linux/parport.h>). */
#define PARPORT_PC_MAX_PORTS 8
-/* If parport_cs (PCMCIA) is managing ports for us, we'll need the
- * probing routines forever; otherwise we can lose them at boot time. */
-#ifdef CONFIG_PARPORT_PC_PCMCIA
-#define __maybe_initdata
-#define __maybe_init
-#else
-#define __maybe_initdata __initdata
-#define __maybe_init __init
-#endif
-
-static int __maybe_init parport_pc_init_pci(int irq, int dma);
-
-static int user_specified __maybe_initdata = 0;
+static int parport_pc_init_pci(int irq, int dma);
+static int parport_pc_init_superio(void);
+
+static int user_specified __devinitdata = 0;
int __init
parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
{
@@ -43,13 +34,16 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
count++;
} while (*io && (++i < PARPORT_PC_MAX_PORTS));
} else {
- /* Probe all the likely ports. */
+ count += parport_pc_init_superio ();
+
if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
count++;
if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
count++;
if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
count++;
+
+ /* probe for other PCI parallel devices */
count += parport_pc_init_pci (irq[0], dma[0]);
}
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index f0d1b00bf..d58f5a7a6 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -18,6 +18,7 @@
#include <linux/threads.h>
extern pgd_t swapper_pg_dir[1024];
+extern void paging_init(void);
/* Caches aren't brain-dead on the intel. */
#define flush_cache_all() do { } while (0)
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index 15c2d11b0..77e8642ed 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -15,7 +15,9 @@
#include <asm/fixmap.h>
#include <asm/bitops.h>
#include <asm/mpspec.h>
+#ifdef CONFIG_X86_IO_APIC
#include <asm/io_apic.h>
+#endif
#include <asm/apic.h>
#endif
#endif
diff --git a/include/asm-i386/softirq.h b/include/asm-i386/softirq.h
index 9964ba5bc..4fe26b2b7 100644
--- a/include/asm-i386/softirq.h
+++ b/include/asm-i386/softirq.h
@@ -4,14 +4,12 @@
#include <asm/atomic.h>
#include <asm/hardirq.h>
-extern unsigned int local_bh_count[NR_CPUS];
-
-#define cpu_bh_disable(cpu) do { local_bh_count[(cpu)]++; barrier(); } while (0)
-#define cpu_bh_enable(cpu) do { barrier(); local_bh_count[(cpu)]--; } while (0)
+#define cpu_bh_disable(cpu) do { local_bh_count(cpu)++; barrier(); } while (0)
+#define cpu_bh_enable(cpu) do { barrier(); local_bh_count(cpu)--; } while (0)
#define local_bh_disable() cpu_bh_disable(smp_processor_id())
#define local_bh_enable() cpu_bh_enable(smp_processor_id())
-#define in_softirq() (local_bh_count[smp_processor_id()] != 0)
+#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
#endif /* __ASM_SOFTIRQ_H */
diff --git a/include/asm-ia64/offsets.h b/include/asm-ia64/offsets.h
index d989cb911..72eccbc24 100644
--- a/include/asm-ia64/offsets.h
+++ b/include/asm-ia64/offsets.h
@@ -10,7 +10,7 @@
#define PF_PTRACED_BIT 4
-#define IA64_TASK_SIZE 3280 /* 0xcd0 */
+#define IA64_TASK_SIZE 2800 /* 0xaf0 */
#define IA64_PT_REGS_SIZE 400 /* 0x190 */
#define IA64_SWITCH_STACK_SIZE 560 /* 0x230 */
#define IA64_SIGINFO_SIZE 136 /* 0x88 */
@@ -19,8 +19,8 @@
#define IA64_TASK_SIGPENDING_OFFSET 16 /* 0x10 */
#define IA64_TASK_NEED_RESCHED_OFFSET 40 /* 0x28 */
#define IA64_TASK_PROCESSOR_OFFSET 108 /* 0x6c */
-#define IA64_TASK_THREAD_OFFSET 1424 /* 0x590 */
-#define IA64_TASK_THREAD_KSP_OFFSET 1424 /* 0x590 */
+#define IA64_TASK_THREAD_OFFSET 928 /* 0x3a0 */
+#define IA64_TASK_THREAD_KSP_OFFSET 928 /* 0x3a0 */
#define IA64_TASK_PID_OFFSET 188 /* 0xbc */
#define IA64_TASK_MM_OFFSET 88 /* 0x58 */
#define IA64_PT_REGS_CR_IPSR_OFFSET 0 /* 0x0 */
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index 53eb9f963..2361bc06d 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -127,9 +127,10 @@ typedef union ia64_va {
#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int *)0=0; } while (0)
#define PAGE_BUG(page) do { BUG(); } while (0)
-extern __inline__ int get_order(unsigned long size)
+extern __inline__ int
+get_order (unsigned long size)
{
- double d = size - 1;
+ double d = size - 1;
long order;
__asm__ ("getf.exp %0=%1" : "=r"(order) : "f"(d));
diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h
index becc7422f..b26321422 100644
--- a/include/asm-ia64/pgalloc.h
+++ b/include/asm-ia64/pgalloc.h
@@ -8,8 +8,8 @@
* This hopefully works with any (fixed) ia-64 page-size, as defined
* in <asm/page.h> (currently 8192).
*
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998-2000 Hewlett-Packard Co
+ * Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
* Copyright (C) 2000, Goutham Rao <goutham.rao@intel.com>
*/
@@ -254,4 +254,21 @@ flush_tlb_page (struct vm_area_struct *vma, unsigned long addr)
flush_tlb_range(vma->vm_mm, addr, addr + PAGE_SIZE);
}
+/*
+ * Flush the TLB entries mapping the virtually mapped linear page
+ * table corresponding to address range [START-END).
+ */
+static inline void
+flush_tlb_pgtables (struct mm_struct *mm, unsigned long start, unsigned long end)
+{
+ /*
+ * XXX fix mmap(), munmap() et al to guarantee that there are no mappings
+ * across region boundaries. --davidm 00/02/23
+ */
+ if (rgn_index(start) != rgn_index(end)) {
+ printk("flush_tlb_pgtables: can't flush across regions!!\n");
+ }
+ flush_tlb_range(mm, ia64_thash(start), ia64_thash(end));
+}
+
#endif /* _ASM_IA64_PGALLOC_H */
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index 203005b5c..a941cfccf 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -294,6 +294,18 @@ extern pmd_t *ia64_bad_pagetable (void);
*/
#define pgprot_noncached(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_UC)
+/*
+ * Return the region index for virtual address ADDRESS.
+ */
+extern __inline__ unsigned long
+rgn_index (unsigned long address)
+{
+ ia64_va a;
+
+ a.l = address;
+ return a.f.reg;
+}
+
extern __inline__ unsigned long
pgd_index (unsigned long address)
{
@@ -347,7 +359,7 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
* execution context?).
*
*/
-#if 0
+#if 1
# define update_mmu_cache(vma,address,pte)
#else
# define update_mmu_cache(vma,address,pte) \
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index 5a49bf2c0..d31d746fa 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -27,15 +27,11 @@
*/
#define TASK_SIZE 0xa000000000000000
-#ifdef CONFIG_IA32_SUPPORT
-# define TASK_UNMAPPED_BASE 0x40000000 /* XXX fix me! */
-#else
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
-#define TASK_UNMAPPED_BASE 0x2000000000000000
-#endif
+#define TASK_UNMAPPED_BASE (current->thread.map_base)
/*
* Bus types
@@ -153,7 +149,12 @@
#define IA64_THREAD_FPH_VALID (__IA64_UL(1) << 0) /* floating-point high state valid? */
#define IA64_THREAD_DBG_VALID (__IA64_UL(1) << 1) /* debug registers valid? */
-#define IA64_KERNEL_DEATH (__IA64_UL(1) << 63) /* used for die_if_kernel() recursion detection */
+#define IA64_THREAD_UAC_NOPRINT (__IA64_UL(1) << 2) /* don't log unaligned accesses */
+#define IA64_THREAD_UAC_SIGBUS (__IA64_UL(1) << 3) /* generate SIGBUS on unaligned acc. */
+#define IA64_KERNEL_DEATH (__IA64_UL(1) << 63) /* see die_if_kernel()... */
+
+#define IA64_THREAD_UAC_SHIFT 2
+#define IA64_THREAD_UAC_MASK (IA64_THREAD_UAC_NOPRINT | IA64_THREAD_UAC_SIGBUS)
#ifndef __ASSEMBLY__
@@ -258,12 +259,24 @@ typedef struct {
unsigned long seg;
} mm_segment_t;
+#define SET_UNALIGN_CTL(task,value) \
+({ \
+ (task)->thread.flags |= ((value) << IA64_THREAD_UAC_SHIFT) & IA64_THREAD_UAC_MASK; \
+ 0; \
+})
+#define GET_UNALIGN_CTL(task,addr) \
+({ \
+ put_user(((task)->thread.flags & IA64_THREAD_UAC_MASK) >> IA64_THREAD_UAC_SHIFT, \
+ (int *) (addr)); \
+})
+
struct thread_struct {
__u64 ksp; /* kernel stack pointer */
unsigned long flags; /* various flags */
struct ia64_fpreg fph[96]; /* saved/loaded on demand */
__u64 dbr[IA64_NUM_DBG_REGS];
__u64 ibr[IA64_NUM_DBG_REGS];
+ __u64 map_base; /* base address for mmap() */
#ifdef CONFIG_IA32_SUPPORT
__u64 fsr; /* IA32 floating pt status reg */
__u64 fcr; /* IA32 floating pt control reg */
@@ -285,7 +298,8 @@ struct thread_struct {
0, /* flags */ \
{{{{0}}}, }, /* fph */ \
{0, }, /* dbr */ \
- {0, } /* ibr */ \
+ {0, }, /* ibr */ \
+ 0x2000000000000000 /* map_base */ \
INIT_THREAD_IA32 \
}
@@ -781,6 +795,14 @@ ia64_get_gp(void)
#define ia64_rotl(w,n) ia64_rotr((w),(64)-(n))
+extern __inline__ __u64
+ia64_thash (__u64 addr)
+{
+ __u64 result;
+ asm ("thash %0=%1" : "=r"(result) : "r" (addr));
+ return result;
+}
+
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_IA64_PROCESSOR_H */
diff --git a/include/asm-ia64/siginfo.h b/include/asm-ia64/siginfo.h
index 0559f5f8b..d3b71ccaf 100644
--- a/include/asm-ia64/siginfo.h
+++ b/include/asm-ia64/siginfo.h
@@ -54,12 +54,13 @@ typedef struct siginfo {
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
struct {
- void *_addr; /* faulting insn/memory ref. */
+ void *_addr; /* faulting insn/memory ref. */
+ int _imm; /* immediate value for "break" */
} _sigfault;
/* SIGPOLL */
struct {
- int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
+ long _band; /* POLL_IN, POLL_OUT, POLL_MSG (XPG requires a "long") */
int _fd;
} _sigpoll;
} _sifields;
@@ -77,6 +78,7 @@ typedef struct siginfo {
#define si_int _sifields._rt._sigval.sival_int
#define si_ptr _sifields._rt._sigval.sival_ptr
#define si_addr _sifields._sigfault._addr
+#define si_imm _sifields._sigfault._imm /* as per UNIX SysV ABI spec */
#define si_band _sifields._sigpoll._band
#define si_fd _sifields._sigpoll._fd
@@ -106,8 +108,9 @@ typedef struct siginfo {
#define ILL_PRVREG 6 /* privileged register */
#define ILL_COPROC 7 /* coprocessor error */
#define ILL_BADSTK 8 /* internal stack error */
-#define ILL_BADIADDR 9 /* Unimplemented instruction address */
-#define NSIGILL 9
+#define ILL_BADIADDR 9 /* unimplemented instruction address */
+#define __ILL_BREAK 10 /* illegal break */
+#define NSIGILL 10
/*
* SIGFPE si_codes
@@ -120,14 +123,20 @@ typedef struct siginfo {
#define FPE_FLTRES 6 /* floating point inexact result */
#define FPE_FLTINV 7 /* floating point invalid operation */
#define FPE_FLTSUB 8 /* subscript out of range */
-#define NSIGFPE 8
+#define __FPE_DECOVF 9 /* decimal overflow */
+#define __FPE_DECDIV 10 /* decimal division by zero */
+#define __FPE_DECERR 11 /* packed decimal error */
+#define __FPE_INVASC 12 /* invalid ASCII digit */
+#define __FPE_INVDEC 13 /* invalid decimal digit */
+#define NSIGFPE 13
/*
* SIGSEGV si_codes
*/
#define SEGV_MAPERR 1 /* address not mapped to object */
#define SEGV_ACCERR 2 /* invalid permissions for mapped object */
-#define NSIGSEGV 2
+#define __SEGV_PSTKOVF 3 /* paragraph stack overflow */
+#define NSIGSEGV 3
/*
* SIGBUS si_codes
diff --git a/include/asm-mips/hardirq.h b/include/asm-mips/hardirq.h
index c9ffba132..68697ef74 100644
--- a/include/asm-mips/hardirq.h
+++ b/include/asm-mips/hardirq.h
@@ -1,34 +1,33 @@
-/* $Id: hardirq.h,v 1.6 2000/02/04 07:40:53 ralf Exp $
+/* $Id: hardirq.h,v 1.7 2000/02/23 00:41:38 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1997, 1998, 1999 by Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
+ * Copyright (C) 1997, 1998, 1999, 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/
#ifndef _ASM_HARDIRQ_H
#define _ASM_HARDIRQ_H
#include <linux/threads.h>
-
-extern unsigned int local_irq_count[NR_CPUS];
+#include <linux/irq.h>
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
*/
#define in_interrupt() ({ int __cpu = smp_processor_id(); \
- (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); })
-#define in_irq() (local_irq_count[smp_processor_id()] != 0)
+ (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); })
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
#ifndef __SMP__
-#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
+#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0)
#define hardirq_endlock(cpu) do { } while (0)
-#define irq_enter(cpu) (local_irq_count[cpu]++)
-#define irq_exit(cpu) (local_irq_count[cpu]--)
+#define irq_enter(cpu) (local_irq_count(cpu)++)
+#define irq_exit(cpu) (local_irq_count(cpu)--)
#define synchronize_irq() barrier();
diff --git a/include/asm-mips/hw_irq.h b/include/asm-mips/hw_irq.h
new file mode 100644
index 000000000..1bf6629b4
--- /dev/null
+++ b/include/asm-mips/hw_irq.h
@@ -0,0 +1,5 @@
+/* This exists merely to satisfy <linux/irq.h>. There is
+ nothing that would go here of general interest.
+
+ Everything of consequence is in arch/alpha/kernel/irq_impl.h,
+ to be used only in arch/alpha/kernel/. */
diff --git a/include/asm-mips/parport.h b/include/asm-mips/parport.h
index 0ae99c2e9..57683df44 100644
--- a/include/asm-mips/parport.h
+++ b/include/asm-mips/parport.h
@@ -1,4 +1,4 @@
-/* $Id: parport.h,v 1.1 1999/10/09 00:01:43 ralf Exp $
+/* $Id: parport.h,v 1.2 2000/02/18 00:24:48 ralf Exp $
*
* parport.h: ia32-specific parport initialisation
*
@@ -15,19 +15,10 @@
than PARPORT_MAX (in <linux/parport.h>). */
#define PARPORT_PC_MAX_PORTS 8
-/* If parport_cs (PCMCIA) is managing ports for us, we'll need the
- * probing routines forever; otherwise we can lose them at boot time. */
-#ifdef CONFIG_PARPORT_PC_PCMCIA
-#define __maybe_initdata
-#define __maybe_init
-#else
-#define __maybe_initdata __initdata
-#define __maybe_init __init
-#endif
+static int parport_pc_init_pci(int irq, int dma);
+static int parport_pc_init_superio(void);
-static int __maybe_init parport_pc_init_pci(int irq, int dma);
-
-static int user_specified __maybe_initdata = 0;
+static int user_specified __devinitdata = 0;
int __init
parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
{
@@ -43,13 +34,16 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
count++;
} while (*io && (++i < PARPORT_PC_MAX_PORTS));
} else {
- /* Probe all the likely ports. */
+ count += parport_pc_init_superio ();
+
if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
count++;
if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
count++;
if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
count++;
+
+ /* probe for other PCI parallel devices */
count += parport_pc_init_pci (irq[0], dma[0]);
}
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 90f96e492..9b909eeab 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.29 2000/02/23 00:41:38 ralf Exp $
+/* $Id: pgtable.h,v 1.30 2000/02/24 00:13:19 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -438,6 +438,7 @@ extern void __bad_pte_kernel(pmd_t *pmd);
extern int do_check_pgt_cache(int, int);
extern pgd_t swapper_pg_dir[1024];
+extern void paging_init(void);
extern void update_mmu_cache(struct vm_area_struct *vma,
unsigned long address, pte_t pte);
diff --git a/include/asm-mips/softirq.h b/include/asm-mips/softirq.h
index 9248125eb..bc4af8ccb 100644
--- a/include/asm-mips/softirq.h
+++ b/include/asm-mips/softirq.h
@@ -1,4 +1,4 @@
-/* $Id: softirq.h,v 1.10 2000/02/22 21:23:52 ralf Exp $
+/* $Id: softirq.h,v 1.11 2000/02/23 00:41:38 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -13,14 +13,12 @@
#include <asm/atomic.h>
#include <asm/hardirq.h>
-extern unsigned int local_bh_count[NR_CPUS];
-
-#define cpu_bh_disable(cpu) do { local_bh_count[(cpu)]++; barrier(); } while (0)
-#define cpu_bh_enable(cpu) do { barrier(); local_bh_count[(cpu)]--; } while (0)
+#define cpu_bh_disable(cpu) do { local_bh_count(cpu)++; barrier(); } while (0)
+#define cpu_bh_enable(cpu) do { barrier(); local_bh_count(cpu)--; } while (0)
#define local_bh_disable() cpu_bh_disable(smp_processor_id())
#define local_bh_enable() cpu_bh_enable(smp_processor_id())
-#define in_softirq() (local_bh_count[smp_processor_id()] != 0)
+#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
#endif /* _ASM_SOFTIRQ_H */
diff --git a/include/asm-mips64/hardirq.h b/include/asm-mips64/hardirq.h
index 3bc56d38d..7200ad062 100644
--- a/include/asm-mips64/hardirq.h
+++ b/include/asm-mips64/hardirq.h
@@ -1,4 +1,4 @@
-/* $Id: hardirq.h,v 1.3 2000/02/04 07:40:53 ralf Exp $
+/* $Id: hardirq.h,v 1.4 2000/02/23 00:41:38 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -11,24 +11,23 @@
#define _ASM_HARDIRQ_H
#include <linux/threads.h>
-
-extern unsigned int local_irq_count[NR_CPUS];
+#include <linux/irq.h>
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
*/
#define in_interrupt() ({ int __cpu = smp_processor_id(); \
- (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); })
-#define in_irq() (local_irq_count[smp_processor_id()] != 0)
+ (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); })
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
#ifndef __SMP__
-#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
+#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0)
#define hardirq_endlock(cpu) do { } while (0)
-#define irq_enter(cpu) (local_irq_count[cpu]++)
-#define irq_exit(cpu) (local_irq_count[cpu]--)
+#define irq_enter(cpu) (local_irq_count(cpu)++)
+#define irq_exit(cpu) (local_irq_count(cpu)--)
#define synchronize_irq() barrier();
diff --git a/include/asm-mips64/hw_irq.h b/include/asm-mips64/hw_irq.h
new file mode 100644
index 000000000..1bf6629b4
--- /dev/null
+++ b/include/asm-mips64/hw_irq.h
@@ -0,0 +1,5 @@
+/* This exists merely to satisfy <linux/irq.h>. There is
+ nothing that would go here of general interest.
+
+ Everything of consequence is in arch/alpha/kernel/irq_impl.h,
+ to be used only in arch/alpha/kernel/. */
diff --git a/include/asm-mips64/parport.h b/include/asm-mips64/parport.h
index 0ae99c2e9..57683df44 100644
--- a/include/asm-mips64/parport.h
+++ b/include/asm-mips64/parport.h
@@ -1,4 +1,4 @@
-/* $Id: parport.h,v 1.1 1999/10/09 00:01:43 ralf Exp $
+/* $Id: parport.h,v 1.2 2000/02/18 00:24:48 ralf Exp $
*
* parport.h: ia32-specific parport initialisation
*
@@ -15,19 +15,10 @@
than PARPORT_MAX (in <linux/parport.h>). */
#define PARPORT_PC_MAX_PORTS 8
-/* If parport_cs (PCMCIA) is managing ports for us, we'll need the
- * probing routines forever; otherwise we can lose them at boot time. */
-#ifdef CONFIG_PARPORT_PC_PCMCIA
-#define __maybe_initdata
-#define __maybe_init
-#else
-#define __maybe_initdata __initdata
-#define __maybe_init __init
-#endif
+static int parport_pc_init_pci(int irq, int dma);
+static int parport_pc_init_superio(void);
-static int __maybe_init parport_pc_init_pci(int irq, int dma);
-
-static int user_specified __maybe_initdata = 0;
+static int user_specified __devinitdata = 0;
int __init
parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
{
@@ -43,13 +34,16 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
count++;
} while (*io && (++i < PARPORT_PC_MAX_PORTS));
} else {
- /* Probe all the likely ports. */
+ count += parport_pc_init_superio ();
+
if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
count++;
if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0], NULL))
count++;
if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
count++;
+
+ /* probe for other PCI parallel devices */
count += parport_pc_init_pci (irq[0], dma[0]);
}
diff --git a/include/asm-mips64/pgtable.h b/include/asm-mips64/pgtable.h
index dfaff3f1e..0dc2145cf 100644
--- a/include/asm-mips64/pgtable.h
+++ b/include/asm-mips64/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.11 2000/02/23 00:41:38 ralf Exp $
+/* $Id: pgtable.h,v 1.13 2000/02/27 01:03:24 kanoj Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -469,6 +469,7 @@ extern void pgd_init(unsigned long page);
extern void pmd_init(unsigned long page);
extern pgd_t swapper_pg_dir[1024];
+extern void paging_init(void);
extern void (*update_mmu_cache)(struct vm_area_struct *vma,
unsigned long address, pte_t pte);
diff --git a/include/asm-mips64/softirq.h b/include/asm-mips64/softirq.h
index 528b4f091..716cd3e17 100644
--- a/include/asm-mips64/softirq.h
+++ b/include/asm-mips64/softirq.h
@@ -1,4 +1,4 @@
-/* $Id: softirq.h,v 1.3 2000/02/22 21:23:52 ralf Exp $
+/* $Id: softirq.h,v 1.3 2000/02/23 00:41:38 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -13,14 +13,12 @@
#include <asm/atomic.h>
#include <asm/hardirq.h>
-extern unsigned int local_bh_count[NR_CPUS];
-
-#define cpu_bh_disable(cpu) do { local_bh_count[(cpu)]++; barrier(); } while (0)
-#define cpu_bh_enable(cpu) do { barrier(); local_bh_count[(cpu)]--; } while (0)
+#define cpu_bh_disable(cpu) do { local_bh_count(cpu)++; barrier(); } while (0)
+#define cpu_bh_enable(cpu) do { barrier(); local_bh_count(cpu)--; } while (0)
#define local_bh_disable() cpu_bh_disable(smp_processor_id())
#define local_bh_enable() cpu_bh_enable(smp_processor_id())
-#define in_softirq() (local_bh_count[smp_processor_id()] != 0)
+#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
#endif /* _ASM_SOFTIRQ_H */
diff --git a/include/asm-ppc/hw_irq.h b/include/asm-ppc/hw_irq.h
index 6a417940b..28a47906c 100644
--- a/include/asm-ppc/hw_irq.h
+++ b/include/asm-ppc/hw_irq.h
@@ -6,30 +6,13 @@
#ifndef _PPC_HW_IRQ_H
#define _PPC_HW_IRQ_H
-#if 0
-/* Structure describing interrupts */
-struct hw_interrupt_type {
- const char * typename;
- void (*startup)(unsigned int irq);
- void (*shutdown)(unsigned int irq);
- void (*enable)(unsigned int irq);
- void (*disable)(unsigned int irq);
- void (*mask_and_ack)(unsigned int irq);
- int irq_offset;
-};
-
-struct irqdesc {
- struct irqaction *action;
- struct hw_interrupt_type *ctl;
-};
-#endif
-
struct int_control_struct
{
void (*int_cli)(void);
void (*int_sti)(void);
void (*int_restore_flags)(unsigned long);
void (*int_save_flags)(unsigned long *);
+ void (*int_set_lost)(unsigned long);
};
extern struct int_control_struct int_control;
extern unsigned long timer_interrupt_intercept;
@@ -40,12 +23,14 @@ extern void __no_use_sti(void);
extern void __no_use_cli(void);
extern void __no_use_restore_flags(unsigned long);
extern void __no_use_save_flags(unsigned long *);
+extern void __no_use_set_lost(unsigned long);
#define __cli() int_control.int_cli()
#define __sti() int_control.int_sti()
#define __save_flags(flags) int_control.int_save_flags(&flags)
#define __restore_flags(flags) int_control.int_restore_flags(flags)
#define __save_and_cli(flags) ({__save_flags(flags);__cli();})
+#define __set_lost(irq) ({ if ((ulong)int_control.int_set_lost) int_control.int_set_lost(irq); })
extern void do_lost_interrupts(unsigned long);
extern atomic_t ppc_n_lost_interrupts;
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 21e4930de..7bb3d901d 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -38,73 +38,73 @@ extern unsigned long pci_dram_offset;
#endif /* CONFIG_APUS */
#endif
-#define readb(addr) in_8((volatile unsigned char *)(addr))
-#define writeb(b,addr) out_8((volatile unsigned char *)(addr), (b))
+#define readb(addr) in_8((volatile u8 *)(addr))
+#define writeb(b,addr) out_8((volatile u8 *)(addr), (b))
#if defined(CONFIG_APUS)
-#define readw(addr) (*(volatile unsigned short *) (addr))
-#define readl(addr) (*(volatile unsigned int *) (addr))
-#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b))
-#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b))
+#define readw(addr) (*(volatile u16 *) (addr))
+#define readl(addr) (*(volatile u32 *) (addr))
+#define writew(b,addr) ((*(volatile u16 *) (addr)) = (b))
+#define writel(b,addr) ((*(volatile u32 *) (addr)) = (b))
#else
-#define readw(addr) in_le16((volatile unsigned short *)(addr))
-#define readl(addr) in_le32((volatile unsigned *)(addr))
-#define writew(b,addr) out_le16((volatile unsigned short *)(addr),(b))
-#define writel(b,addr) out_le32((volatile unsigned *)(addr),(b))
+#define readw(addr) in_le16((volatile u16 *)(addr))
+#define readl(addr) in_le32((volatile u32 *)(addr))
+#define writew(b,addr) out_le16((volatile u16 *)(addr),(b))
+#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
#endif
-#define insb(port, buf, ns) _insb((unsigned char *)((port)+_IO_BASE), (buf), (ns))
-#define outsb(port, buf, ns) _outsb((unsigned char *)((port)+_IO_BASE), (buf), (ns))
-#define insw(port, buf, ns) _insw((unsigned short *)((port)+_IO_BASE), (buf), (ns))
-#define outsw(port, buf, ns) _outsw((unsigned short *)((port)+_IO_BASE), (buf), (ns))
-#define insl(port, buf, nl) _insl((unsigned long *)((port)+_IO_BASE), (buf), (nl))
-#define outsl(port, buf, nl) _outsl((unsigned long *)((port)+_IO_BASE), (buf), (nl))
+#define insb(port, buf, ns) _insb((u8 *)((port)+_IO_BASE), (buf), (ns))
+#define outsb(port, buf, ns) _outsb((u8 *)((port)+_IO_BASE), (buf), (ns))
+#define insw(port, buf, ns) _insw((u16 *)((port)+_IO_BASE), (buf), (ns))
+#define outsw(port, buf, ns) _outsw((u16 *)((port)+_IO_BASE), (buf), (ns))
+#define insl(port, buf, nl) _insl((u32 *)((port)+_IO_BASE), (buf), (nl))
+#define outsl(port, buf, nl) _outsl((u32 *)((port)+_IO_BASE), (buf), (nl))
-#define inb(port) in_8((unsigned char *)((port)+_IO_BASE))
-#define outb(val, port) out_8((unsigned char *)((port)+_IO_BASE), (val))
+#define inb(port) in_8((u8 *)((port)+_IO_BASE))
+#define outb(val, port) out_8((u8 *)((port)+_IO_BASE), (val))
#if defined(CONFIG_APUS)
-#define inw(port) in_be16((unsigned short *)((port)+_IO_BASE))
-#define outw(val, port) out_be16((unsigned short *)((port)+_IO_BASE), (val))
-#define inl(port) in_be32((unsigned *)((port)+_IO_BASE))
-#define outl(val, port) out_be32((unsigned *)((port)+_IO_BASE), (val))
+#define inw(port) in_be16((u16 *)((port)+_IO_BASE))
+#define outw(val, port) out_be16((u16 *)((port)+_IO_BASE), (val))
+#define inl(port) in_be32((u32 *)((port)+_IO_BASE))
+#define outl(val, port) out_be32((u32 *)((port)+_IO_BASE), (val))
#else
-#define inw(port) in_le16((unsigned short *)((port)+_IO_BASE))
-#define outw(val, port) out_le16((unsigned short *)((port)+_IO_BASE), (val))
-#define inl(port) in_le32((unsigned *)((port)+_IO_BASE))
-#define outl(val, port) out_le32((unsigned *)((port)+_IO_BASE), (val))
+#define inw(port) in_le16((u16 *)((port)+_IO_BASE))
+#define outw(val, port) out_le16((u16 *)((port)+_IO_BASE), (val))
+#define inl(port) in_le32((u32 *)((port)+_IO_BASE))
+#define outl(val, port) out_le32((u32 *)((port)+_IO_BASE), (val))
#endif
-#define inb_p(port) in_8((unsigned char *)((port)+_IO_BASE))
-#define outb_p(val, port) out_8((unsigned char *)((port)+_IO_BASE), (val))
-#define inw_p(port) in_le16((unsigned short *)((port)+_IO_BASE))
-#define outw_p(val, port) out_le16((unsigned short *)((port)+_IO_BASE), (val))
-#define inl_p(port) in_le32((unsigned *)((port)+_IO_BASE))
-#define outl_p(val, port) out_le32((unsigned *)((port)+_IO_BASE), (val))
+#define inb_p(port) in_8((u8 *)((port)+_IO_BASE))
+#define outb_p(val, port) out_8((u8 *)((port)+_IO_BASE), (val))
+#define inw_p(port) in_le16((u16 *)((port)+_IO_BASE))
+#define outw_p(val, port) out_le16((u16 *)((port)+_IO_BASE), (val))
+#define inl_p(port) in_le32((u32 *)((port)+_IO_BASE))
+#define outl_p(val, port) out_le32((u32 *)((port)+_IO_BASE), (val))
-extern void _insb(volatile unsigned char *port, void *buf, int ns);
-extern void _outsb(volatile unsigned char *port, const void *buf, int ns);
-extern void _insw(volatile unsigned short *port, void *buf, int ns);
-extern void _outsw(volatile unsigned short *port, const void *buf, int ns);
-extern void _insl(volatile unsigned long *port, void *buf, int nl);
-extern void _outsl(volatile unsigned long *port, const void *buf, int nl);
+extern void _insb(volatile u8 *port, void *buf, int ns);
+extern void _outsb(volatile u8 *port, const void *buf, int ns);
+extern void _insw(volatile u16 *port, void *buf, int ns);
+extern void _outsw(volatile u16 *port, const void *buf, int ns);
+extern void _insl(volatile u32 *port, void *buf, int nl);
+extern void _outsl(volatile u32 *port, const void *buf, int nl);
/*
* The *_ns versions below don't do byte-swapping.
*/
-#define insw_ns(port, buf, ns) _insw_ns((unsigned short *)((port)+_IO_BASE), (buf), (ns))
-#define outsw_ns(port, buf, ns) _outsw_ns((unsigned short *)((port)+_IO_BASE), (buf), (ns))
-#define insl_ns(port, buf, nl) _insl_ns((unsigned long *)((port)+_IO_BASE), (buf), (nl))
-#define outsl_ns(port, buf, nl) _outsl_ns((unsigned long *)((port)+_IO_BASE), (buf), (nl))
+#define insw_ns(port, buf, ns) _insw_ns((u16 *)((port)+_IO_BASE), (buf), (ns))
+#define outsw_ns(port, buf, ns) _outsw_ns((u16 *)((port)+_IO_BASE), (buf), (ns))
+#define insl_ns(port, buf, nl) _insl_ns((u32 *)((port)+_IO_BASE), (buf), (nl))
+#define outsl_ns(port, buf, nl) _outsl_ns((u32 *)((port)+_IO_BASE), (buf), (nl))
-extern void _insw_ns(volatile unsigned short *port, void *buf, int ns);
-extern void _outsw_ns(volatile unsigned short *port, const void *buf, int ns);
-extern void _insl_ns(volatile unsigned long *port, void *buf, int nl);
-extern void _outsl_ns(volatile unsigned long *port, const void *buf, int nl);
+extern void _insw_ns(volatile u16 *port, void *buf, int ns);
+extern void _outsw_ns(volatile u16 *port, const void *buf, int ns);
+extern void _insl_ns(volatile u32 *port, void *buf, int nl);
+extern void _outsl_ns(volatile u32 *port, const void *buf, int nl);
#define IO_SPACE_LIMIT ~0
-#define memset_io(a,b,c) memset((a),(b),(c))
-#define memcpy_fromio(a,b,c) memcpy((a),(b),(c))
-#define memcpy_toio(a,b,c) memcpy((a),(b),(c))
+#define memset_io(a,b,c) memset((void *)(a),(b),(c))
+#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
+#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
#ifdef __KERNEL__
/*
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h
index 009229882..867dd0bab 100644
--- a/include/asm-ppc/irq.h
+++ b/include/asm-ppc/irq.h
@@ -117,15 +117,48 @@ static __inline__ int irq_cannonicalize(int irq)
return irq;
}
-#else
+#else /* CONFIG_4xx + CONFIG_8xx */
-#ifdef CONFIG_APUS
-#define enable_irq m68k_enable_irq
-#define disable_irq m68k_disable_irq
-#include <asm-m68k/irq.h>
-#undef enable_irq
-#undef disable_irq
-#else /* CONFIG_APUS */
+#if defined(CONFIG_APUS)
+/*
+ * This structure is used to chain together the ISRs for a particular
+ * interrupt source (if it supports chaining).
+ */
+typedef struct irq_node {
+ void (*handler)(int, void *, struct pt_regs *);
+ unsigned long flags;
+ void *dev_id;
+ const char *devname;
+ struct irq_node *next;
+} irq_node_t;
+
+/*
+ * This structure has only 4 elements for speed reasons
+ */
+typedef struct irq_handler {
+ void (*handler)(int, void *, struct pt_regs *);
+ unsigned long flags;
+ void *dev_id;
+ const char *devname;
+} irq_handler_t;
+
+/* count of spurious interrupts */
+extern volatile unsigned int num_spurious;
+
+extern int sys_request_irq(unsigned int,
+ void (*)(int, void *, struct pt_regs *),
+ unsigned long, const char *, void *);
+extern void sys_free_irq(unsigned int, void *);
+
+/*
+ * This function returns a new irq_node_t
+ */
+extern irq_node_t *new_irq_node(void);
+
+/* Number of m68k interrupts */
+#define SYS_IRQS 8
+
+#endif /* CONFIG_APUS */
/*
* this is the # irq's for all ppc arch's (pmac/chrp/prep)
@@ -133,14 +166,11 @@ static __inline__ int irq_cannonicalize(int irq)
*/
#define NR_IRQS 256
-#endif /* CONFIG_APUS */
-
#define NUM_8259_INTERRUPTS 16
#define IRQ_8259_CASCADE 16
#define openpic_to_irq(n) ((n)+NUM_8259_INTERRUPTS)
#define irq_to_openpic(n) ((n)-NUM_8259_INTERRUPTS)
-#ifndef CONFIG_APUS
/*
* This gets called from serial.c, which is now used on
* powermacs as well as prep/chrp boxes.
@@ -157,8 +187,10 @@ static __inline__ int irq_cannonicalize(int irq)
return irq;
}
}
-#endif /* !CONFIG_APUS */
#endif
+#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
+extern unsigned int ppc_lost_interrupts[NR_MASK_WORDS];
+
#endif /* _ASM_IRQ_H */
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
index 5d022e02c..d543c90cc 100644
--- a/include/asm-ppc/pci.h
+++ b/include/asm-ppc/pci.h
@@ -62,7 +62,8 @@ extern inline void pci_dma_sync_single(struct pci_dev *hwdev,
BUG();
/* nothing to do */
}
-extern inline void pci_dma_syng_sg(struct pci_dev *hwdev,
+
+extern inline void pci_dma_sync_sg(struct pci_dev *hwdev,
struct scatterlist *sg,
int nelems, int direction)
{
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index 704bd68ab..5212c5b71 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -692,16 +692,7 @@ void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
#endif /* ndef ASSEMBLY*/
#ifdef CONFIG_MACH_SPECIFIC
-#if defined(CONFIG_PREP)
-#define _machine _MACH_prep
-#define have_of 0
-#elif defined(CONFIG_CHRP)
-#define _machine _MACH_chrp
-#define have_of 1
-#elif defined(CONFIG_PMAC)
-#define _machine _MACH_Pmac
-#define have_of 1
-#elif defined(CONFIG_8xx)
+#if defined(CONFIG_8xx)
#define _machine _MACH_8xx
#define have_of 0
#elif defined(CONFIG_OAK)
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h
index d567a9975..cd4d055bb 100644
--- a/include/asm-ppc/system.h
+++ b/include/asm-ppc/system.h
@@ -66,6 +66,7 @@ extern void load_up_altivec(struct task_struct *);
extern void cvt_fd(float *from, double *to, unsigned long *fpscr);
extern void cvt_df(double *from, float *to, unsigned long *fpscr);
extern int call_rtas(const char *, int, int, unsigned long *, ...);
+extern int abs(int);
struct device_node;
extern void note_scsi_host(struct device_node *, void *);
diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h
index d39f91cf9..4cbcd7850 100644
--- a/include/asm-ppc/types.h
+++ b/include/asm-ppc/types.h
@@ -26,8 +26,6 @@ typedef unsigned long long __u64;
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
-#ifdef __KERNEL__
-
typedef signed char s8;
typedef unsigned char u8;
@@ -40,14 +38,15 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
-
typedef struct {
u32 u[4];
} __attribute((aligned(16))) vector128;
-/* DMA addresses are 32-bits wide */
+#ifdef __KERNEL__
+
+#define BITS_PER_LONG 32
+/* DMA addresses are 32-bits wide */
typedef u32 dma_addr_t;
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/vga.h b/include/asm-ppc/vga.h
index e6a7f9a53..d7ead205f 100644
--- a/include/asm-ppc/vga.h
+++ b/include/asm-ppc/vga.h
@@ -23,12 +23,12 @@
extern inline void scr_writew(u16 val, u16 *addr)
{
- writew(val, (unsigned long)addr);
+ st_le16(addr, val);
}
extern inline u16 scr_readw(const u16 *addr)
{
- return readw((unsigned long)addr);
+ return ld_le16(addr);
}
#define VT_BUF_HAVE_MEMCPYW
diff --git a/include/asm-sparc/termbits.h b/include/asm-sparc/termbits.h
index 2d07e4e1e..657829589 100644
--- a/include/asm-sparc/termbits.h
+++ b/include/asm-sparc/termbits.h
@@ -165,10 +165,13 @@ struct termios {
#define B1152000 0x0000100d
#define B1500000 0x0000100e
#define B2000000 0x0000100f
+/* These have totally bogus values and nobody uses them
+ so far. Later on we'd have to use say 0x10000x and
+ adjust CBAUD constant and drivers accordingly.
#define B2500000 0x00001010
#define B3000000 0x00001011
#define B3500000 0x00001012
-#define B4000000 0x00001013
+#define B4000000 0x00001013 */
#define CIBAUD 0x100f0000 /* input baud rate (not used) */
#define CMSPAR 0x40000000 /* mark or space (stick) parity */
#define CRTSCTS 0x80000000 /* flow control */
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h
index 0c137b72d..f8bdaa826 100644
--- a/include/asm-sparc64/io.h
+++ b/include/asm-sparc64/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.32 2000/02/15 10:04:54 jj Exp $ */
+/* $Id: io.h,v 1.33 2000/02/25 05:47:38 davem Exp $ */
#ifndef __SPARC64_IO_H
#define __SPARC64_IO_H
@@ -225,10 +225,8 @@ extern __inline__ void _sbus_writel(unsigned int l, unsigned long addr)
#define sbus_writew(__w, __addr) (_sbus_writew((__w), (unsigned long)(__addr)))
#define sbus_writel(__l, __addr) (_sbus_writel((__l), (unsigned long)(__addr)))
-static inline void *sbus_memset_io(void *__dst, int c, __kernel_size_t n)
+static inline void *_sbus_memset_io(unsigned long dst, int c, __kernel_size_t n)
{
- unsigned long dst = (unsigned long)__dst;
-
while(n--) {
sbus_writeb(c, dst);
dst++;
@@ -236,8 +234,11 @@ static inline void *sbus_memset_io(void *__dst, int c, __kernel_size_t n)
return (void *) dst;
}
+#define sbus_memset_io(d,c,sz) \
+ _sbus_memset_io((unsigned long)d,(int)c,(__kernel_size_t)sz)
+
static inline void *
-memset_io(void *dst, int c, __kernel_size_t n)
+_memset_io(void *dst, int c, __kernel_size_t n)
{
char *d = dst;
@@ -249,8 +250,11 @@ memset_io(void *dst, int c, __kernel_size_t n)
return dst;
}
+#define memset_io(d,c,sz) \
+ _memset_io((void *)d,(int)c,(__kernel_size_t)sz)
+
static inline void *
-memcpy_fromio(void *dst, unsigned long src, __kernel_size_t n)
+_memcpy_fromio(void *dst, unsigned long src, __kernel_size_t n)
{
char *d = dst;
@@ -263,8 +267,11 @@ memcpy_fromio(void *dst, unsigned long src, __kernel_size_t n)
return dst;
}
+#define memcpy_fromio(d,s,sz) \
+ _memcpy_fromio((void *)d,(unsigned long)s,(__kernel_size_t)sz)
+
static inline void *
-memcpy_toio(unsigned long dst, const void *src, __kernel_size_t n)
+_memcpy_toio(unsigned long dst, const void *src, __kernel_size_t n)
{
const char *s = src;
unsigned long d = dst;
@@ -277,6 +284,9 @@ memcpy_toio(unsigned long dst, const void *src, __kernel_size_t n)
return (void *)dst;
}
+#define memcpy_toio(d,s,sz) \
+ _memcpy_toio((unsigned long)d,(const void *)s,(__kernel_size_t)sz)
+
static inline int check_signature(unsigned long io_addr,
const unsigned char *signature,
int length)
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
index ee7d80809..1c2b889df 100644
--- a/include/asm-sparc64/siginfo.h
+++ b/include/asm-sparc64/siginfo.h
@@ -65,7 +65,7 @@ typedef struct siginfo {
/* SIGPOLL */
struct {
- int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
+ long _band; /* POLL_IN, POLL_OUT, POLL_MSG */
int _fd;
} _sigpoll;
} _sifields;
diff --git a/include/asm-sparc64/termbits.h b/include/asm-sparc64/termbits.h
index faa32e785..330c19d06 100644
--- a/include/asm-sparc64/termbits.h
+++ b/include/asm-sparc64/termbits.h
@@ -166,10 +166,13 @@ struct termios {
#define B1152000 0x0000100d
#define B1500000 0x0000100e
#define B2000000 0x0000100f
+/* These have totally bogus values and nobody uses them
+ so far. Later on we'd have to use say 0x10000x and
+ adjust CBAUD constant and drivers accordingly.
#define B2500000 0x00001010
#define B3000000 0x00001011
#define B3500000 0x00001012
-#define B4000000 0x00001013
+#define B4000000 0x00001013 */
#define CIBAUD 0x100f0000 /* input baud rate (not used) */
#define CMSPAR 0x40000000 /* mark or space (stick) parity */
#define CRTSCTS 0x80000000 /* flow control */
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h
new file mode 100644
index 000000000..68989d76d
--- /dev/null
+++ b/include/linux/ac97_codec.h
@@ -0,0 +1,159 @@
+#ifndef _AC97_CODEC_H_
+#define _AC97_CODEC_H_
+
+
+/* AC97 1.0 */
+#define AC97_RESET 0x0000 //
+#define AC97_MASTER_VOL_STEREO 0x0002 // Line Out
+#define AC97_HEADPHONE_VOL 0x0004 //
+#define AC97_MASTER_VOL_MONO 0x0006 // TAD Output
+#define AC97_MASTER_TONE 0x0008 //
+#define AC97_PCBEEP_VOL 0x000a // none
+#define AC97_PHONE_VOL 0x000c // TAD Input (mono)
+#define AC97_MIC_VOL 0x000e // MIC Input (mono)
+#define AC97_LINEIN_VOL 0x0010 // Line Input (stereo)
+#define AC97_CD_VOL 0x0012 // CD Input (stereo)
+#define AC97_VIDEO_VOL 0x0014 // none
+#define AC97_AUX_VOL 0x0016 // Aux Input (stereo)
+#define AC97_PCMOUT_VOL 0x0018 // Wave Output (stereo)
+#define AC97_RECORD_SELECT 0x001a //
+#define AC97_RECORD_GAIN 0x001c
+#define AC97_RECORD_GAIN_MIC 0x001e
+#define AC97_GENERAL_PURPOSE 0x0020
+#define AC97_3D_CONTROL 0x0022
+#define AC97_MODEM_RATE 0x0024
+#define AC97_POWER_CONTROL 0x0026
+
+/* AC'97 2.0 */
+#define AC97_EXTENDED_ID 0x0028 /* Extended Audio ID */
+#define AC97_EXTENDED_STATUS 0x002A /* Extended Audio Status */
+#define AC97_PCM_FRONT_DAC_RATE 0x002C /* PCM Front DAC Rate */
+#define AC97_PCM_SURR_DAC_RATE 0x002E /* PCM Surround DAC Rate */
+#define AC97_PCM_LFE_DAC_RATE 0x0030 /* PCM LFE DAC Rate */
+#define AC97_PCM_LR_DAC_RATE 0x0032 /* PCM LR DAC Rate */
+#define AC97_PCM_MIC_ADC_RATE 0x0034 /* PCM MIC ADC Rate */
+#define AC97_CENTER_LFE_MASTER 0x0036 /* Center + LFE Master Volume */
+#define AC97_SURROUND_MASTER 0x0038 /* Surround (Rear) Master Volume */
+#define AC97_RESERVED_3A 0x003A /* Reserved */
+
+/* range 0x3c-0x58 - MODEM */
+
+/* registers 0x005a - 0x007a are vendor reserved */
+
+#define AC97_VENDOR_ID1 0x007c
+#define AC97_VENDOR_ID2 0x007e
+
+/* volume control bit defines */
+#define AC97_MUTE 0x8000
+#define AC97_MICBOOST 0x0040
+#define AC97_LEFTVOL 0x3f00
+#define AC97_RIGHTVOL 0x003f
+
+/* record mux defines */
+#define AC97_RECMUX_MIC 0x0000
+#define AC97_RECMUX_CD 0x0101
+#define AC97_RECMUX_VIDEO 0x0202 /* not used */
+#define AC97_RECMUX_AUX 0x0303
+#define AC97_RECMUX_LINE 0x0404
+#define AC97_RECMUX_STEREO_MIX 0x0505
+#define AC97_RECMUX_MONO_MIX 0x0606
+#define AC97_RECMUX_PHONE 0x0707
+
+
+/* general purpose register bit defines */
+#define AC97_GP_LPBK 0x0080 /* Loopback mode */
+#define AC97_GP_MS 0x0100 /* Mic Select 0=Mic1, 1=Mic2 */
+#define AC97_GP_MIX 0x0200 /* Mono output select 0=Mix, 1=Mic */
+#define AC97_GP_RLBK 0x0400 /* Remote Loopback - Modem line codec */
+#define AC97_GP_LLBK 0x0800 /* Local Loopback - Modem Line codec */
+#define AC97_GP_LD 0x1000 /* Loudness 1=on */
+#define AC97_GP_3D 0x2000 /* 3D Enhancement 1=on */
+#define AC97_GP_ST 0x4000 /* Stereo Enhancement 1=on */
+#define AC97_GP_POP 0x8000 /* Pcm Out Path, 0=pre 3D, 1=post 3D */
+
+
+/* powerdown control and status bit defines */
+
+/* status */
+#define AC97_PWR_MDM 0x0010 /* Modem section ready */
+#define AC97_PWR_REF 0x0008 /* Vref nominal */
+#define AC97_PWR_ANL 0x0004 /* Analog section ready */
+#define AC97_PWR_DAC 0x0002 /* DAC section ready */
+#define AC97_PWR_ADC 0x0001 /* ADC section ready */
+
+/* control */
+#define AC97_PWR_PR0 0x0100 /* ADC and Mux powerdown */
+#define AC97_PWR_PR1 0x0200 /* DAC powerdown */
+#define AC97_PWR_PR2 0x0400 /* Output mixer powerdown (Vref on) */
+#define AC97_PWR_PR3 0x0800 /* Output mixer powerdown (Vref off) */
+#define AC97_PWR_PR4 0x1000 /* AC-link powerdown */
+#define AC97_PWR_PR5 0x2000 /* Internal Clk disable */
+#define AC97_PWR_PR6 0x4000 /* HP amp powerdown */
+#define AC97_PWR_PR7 0x8000 /* Modem off - if supported */
+
+/* useful power states */
+#define AC97_PWR_D0 0x0000 /* everything on */
+#define AC97_PWR_D1 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR4
+#define AC97_PWR_D2 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR2|AC97_PWR_PR3|AC97_PWR_PR4
+#define AC97_PWR_D3 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR2|AC97_PWR_PR3|AC97_PWR_PR4
+#define AC97_PWR_ANLOFF AC97_PWR_PR2|AC97_PWR_PR3 /* analog section off */
+
+/* Total number of defined registers. */
+#define AC97_REG_CNT 64
+
+
+/* OSS interface to the ac97s.. */
+#define AC97_STEREO_MASK (SOUND_MASK_VOLUME|SOUND_MASK_PCM|\
+ SOUND_MASK_LINE|SOUND_MASK_CD|\
+ SOUND_MASK_ALTPCM|SOUND_MASK_IGAIN|\
+ SOUND_MASK_LINE1|SOUND_MASK_VIDEO)
+
+#define AC97_SUPPORTED_MASK (AC97_STEREO_MASK | \
+ SOUND_MASK_BASS|SOUND_MASK_TREBLE|\
+ SOUND_MASK_SPEAKER|SOUND_MASK_MIC|\
+ SOUND_MASK_PHONEIN|SOUND_MASK_PHONEOUT)
+
+#define AC97_RECORD_MASK (SOUND_MASK_MIC|\
+ SOUND_MASK_CD|SOUND_MASK_VIDEO|\
+ SOUND_MASK_LINE1| SOUND_MASK_LINE|\
+ SOUND_MASK_PHONEIN)
+
+#define supported_mixer(CODEC,FOO) ( CODEC->supported_mixers & (1<<FOO) )
+
+struct ac97_codec {
+ /* AC97 controller connected with */
+ void *private_data;
+
+ char *name;
+ int id;
+ int dev_mixer;
+
+ /* codec specific init/reset routines, used mainly for 4 or 6 channel support */
+ int (*codec_init) (struct ac97_codec *codec);
+
+ /* controller specific lower leverl ac97 accessing routines */
+ u16 (*codec_read) (struct ac97_codec *codec, u8 reg);
+ void (*codec_write) (struct ac97_codec *codec, u8 reg, u16 val);
+
+ /* OSS mixer masks */
+ int modcnt;
+ int supported_mixers;
+ int stereo_mixers;
+ int record_sources;
+
+ /* OSS mixer interface */
+ int (*read_mixer) (struct ac97_codec *codec, int oss_channel);
+ void (*write_mixer)(struct ac97_codec *codec, int oss_channel,
+ unsigned int left, unsigned int right);
+ int (*recmask_io) (struct ac97_codec *codec, int rw, int mask);
+ int (*mixer_ioctl)(struct ac97_codec *codec, unsigned int cmd, unsigned long arg);
+
+ /* saved OSS mixer states */
+ unsigned int mixer_state[SOUND_MIXER_NRDEVICES];
+};
+
+extern int ac97_read_proc (char *page_out, char **start, off_t off,
+ int count, int *eof, void *data);
+extern int ac97_probe_codec(struct ac97_codec *);
+
+#endif /* _AC97_CODEC_H_ */
diff --git a/include/linux/affs_fs.h b/include/linux/affs_fs.h
index 90e5a3dd2..10cd77b8d 100644
--- a/include/linux/affs_fs.h
+++ b/include/linux/affs_fs.h
@@ -103,8 +103,10 @@ extern void affs_dir_truncate(struct inode *);
/* jump tables */
extern struct inode_operations affs_file_inode_operations;
-extern struct inode_operations affs_file_inode_operations_ofs;
extern struct inode_operations affs_dir_inode_operations;
+extern struct file_operations affs_file_operations;
+extern struct file_operations affs_file_operations_ofs;
+extern struct file_operations affs_dir_operations;
extern struct address_space_operations affs_symlink_aops;
extern struct address_space_operations affs_aops;
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h
index 7e7de106a..9525293cb 100644
--- a/include/linux/bfs_fs.h
+++ b/include/linux/bfs_fs.h
@@ -83,10 +83,12 @@ extern int init_bfs_fs(void);
/* file.c */
extern struct inode_operations bfs_file_inops;
+extern struct file_operations bfs_file_operations;
extern struct address_space_operations bfs_aops;
/* dir.c */
extern struct inode_operations bfs_dir_inops;
+extern struct file_operations bfs_dir_operations;
#endif /* __KERNEL__ */
#endif /* _LINUX_BFS_FS_H */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index c035f1327..166528473 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -53,7 +53,7 @@ typedef int (merge_requests_fn) (request_queue_t *q,
int);
typedef void (request_fn_proc) (request_queue_t *q);
typedef request_queue_t * (queue_proc) (kdev_t dev);
-typedef void (make_request_fn) (int rw, struct buffer_head *bh);
+typedef int (make_request_fn) (request_queue_t *q, int rw, struct buffer_head *bh);
typedef void (plug_device_fn) (request_queue_t *q, kdev_t device);
typedef void (unplug_device_fn) (void *q);
@@ -129,7 +129,8 @@ extern wait_queue_head_t wait_for_request;
extern void grok_partitions(struct gendisk *dev, int drive, unsigned minors, long size);
extern void register_disk(struct gendisk *dev, kdev_t first, unsigned minors, struct block_device_operations *ops, long size);
extern void generic_unplug_device(void * data);
-extern void generic_make_request(int rw, struct buffer_head * bh);
+extern int generic_make_request(request_queue_t *q, int rw,
+ struct buffer_head * bh);
extern request_queue_t * blk_get_queue(kdev_t dev);
/*
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 59cd5da3c..21f5bad13 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -39,6 +39,7 @@ int coda_open(struct inode *i, struct file *f);
int coda_release(struct inode *i, struct file *f);
int coda_permission(struct inode *inode, int mask);
int coda_revalidate_inode(struct dentry *);
+int coda_notify_change(struct dentry *, struct iattr *);
/* global variables */
extern int coda_debug;
diff --git a/include/linux/dlists.h b/include/linux/dlists.h
deleted file mode 100644
index f92485e40..000000000
--- a/include/linux/dlists.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef DLISTS_H
-#define DLISTS_H
-/*
- * include/linux/dlists.h - macros for double linked lists
- *
- * Copyright (C) 1997, Thomas Schoebel-Theuer,
- * <schoebel@informatik.uni-stuttgart.de>.
- */
-
-/* dlists are cyclic ringlists, so the last element cannot be tested
- * for NULL. Use the following construct for traversing cyclic lists:
- * ptr = anchor;
- * if(ptr) do {
- * ...
- * ptr = ptr->{something}_{next,prev};
- * } while(ptr != anchor);
- * The effort here is paid off with much simpler inserts/removes.
- * Examples for usage of these macros can be found in fs/ninode.c.
- * To access the last element in constant time, simply use
- * anchor->{something}_prev.
- */
-
-#define DEF_GENERIC_INSERT(CHANGE,PREFIX,NAME,TYPE,NEXT,PREV) \
-static inline void PREFIX##NAME(TYPE ** anchor, TYPE * elem)\
-{\
- TYPE * oldfirst = *anchor;\
- if(!oldfirst) {\
- elem->NEXT = elem->PREV = *anchor = elem;\
- } else {\
- elem->PREV = oldfirst->PREV;\
- elem->NEXT = oldfirst;\
- oldfirst->PREV->NEXT = elem;\
- oldfirst->PREV = elem;\
- if(CHANGE)\
- *anchor = elem;\
- }\
-}
-
-/* insert_* is always at the first position */
-#define DEF_INSERT(NAME,TYPE,NEXT,PREV) \
- DEF_GENERIC_INSERT(1,insert_,NAME,TYPE,NEXT,PREV)
-
-/* append_* is always at the tail */
-#define DEF_APPEND(NAME,TYPE,NEXT,PREV) \
- DEF_GENERIC_INSERT(0,append_,NAME,TYPE,NEXT,PREV)
-
-/* use this to insert _before_ oldelem somewhere in the middle of the list.
- * the list must not be empty, and oldelem must be already a member.*/
-#define DEF_INSERT_MIDDLE(NAME,TYPE) \
-static inline void insert_middle_##NAME(TYPE ** anchor, TYPE * oldelem, TYPE * elem)\
-{\
- int status = (oldelem == *anchor);\
- insert_##NAME(&oldelem, elem);\
- if(status)\
- *anchor = oldelem;\
-}
-
-/* remove can be done with any element in the list */
-#define DEF_REMOVE(NAME,TYPE,NEXT,PREV) \
-static inline void remove_##NAME(TYPE ** anchor, TYPE * elem)\
-{\
- TYPE * next = elem->NEXT;\
- if(next == elem) {\
- *anchor = NULL;\
- } else {\
- TYPE * prev = elem->PREV;\
- prev->NEXT = next;\
- next->PREV = prev;\
- elem->NEXT = elem->PREV = NULL;/*leave this during debugging*/\
- if(*anchor == elem)\
- *anchor = next;\
- }\
-}
-
-
-/* According to ideas from David S. Miller, here is a slightly
- * more efficient plug-in compatible version using non-cyclic lists,
- * but allowing neither backward traversals nor constant time access
- * to the last element.
- * Note that although the interface is the same, the PPREV pointer must be
- * declared doubly indirect and the test for end-of-list is different. */
-
-/* as above, this inserts always at the head */
-#define DEF_LIN_INSERT(NAME,TYPE,NEXT,PPREV) \
-static inline void insert_##NAME(TYPE ** anchor, TYPE * elem)\
-{\
- TYPE * first;\
- if((elem->NEXT = first = *anchor))\
- first->PPREV = &elem->NEXT;\
- *anchor = elem;\
- elem->PPREV = anchor;\
-}
-
-/* as above, this works with any list element */
-#define DEF_LIN_REMOVE(NAME,TYPE,NEXT,PPREV) \
-static inline void remove_##NAME(TYPE ** anchor, TYPE * elem)\
-{\
- TYPE * pprev;\
- if((pprev = elem->PPREV)) {\
- TYPE * next;\
- if((next = elem->NEXT))\
- next->PPREV = pprev;\
- *pprev = next;\
- elem->PPREV = elem->NEXT = NULL; /*leave this for debugging*/\
- }\
-}
-
-#endif
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h
index f422f4e51..2ba621bc2 100644
--- a/include/linux/efs_fs.h
+++ b/include/linux/efs_fs.h
@@ -46,7 +46,7 @@ static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@aes
#endif
extern struct inode_operations efs_dir_inode_operations;
-extern struct inode_operations efs_file_inode_operations;
+extern struct file_operations efs_dir_operations;
extern struct address_space_operations efs_symlink_aops;
extern int init_module(void);
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 5bb7d8154..67c6fac14 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -576,17 +576,7 @@ extern int ext2_ioctl (struct inode *, struct file *, unsigned int,
unsigned long);
/* namei.c */
-extern void ext2_release (struct inode *, struct file *);
-extern struct dentry *ext2_lookup (struct inode *, struct dentry *);
-extern int ext2_create (struct inode *,struct dentry *,int);
-extern int ext2_mkdir (struct inode *,struct dentry *,int);
-extern int ext2_rmdir (struct inode *,struct dentry *);
-extern int ext2_unlink (struct inode *,struct dentry *);
-extern int ext2_symlink (struct inode *,struct dentry *,const char *);
-extern int ext2_link (struct dentry *, struct inode *, struct dentry *);
-extern int ext2_mknod (struct inode *, struct dentry *, int, int);
-extern int ext2_rename (struct inode *, struct dentry *,
- struct inode *, struct dentry *);
+extern struct inode_operations ext2_dir_inode_operations;
/* super.c */
extern void ext2_error (struct super_block *, const char *, const char *, ...)
@@ -610,10 +600,11 @@ extern void ext2_truncate (struct inode *);
*/
/* dir.c */
-extern struct inode_operations ext2_dir_inode_operations;
+extern struct file_operations ext2_dir_operations;
/* file.c */
extern struct inode_operations ext2_file_inode_operations;
+extern struct file_operations ext2_file_operations;
/* symlink.c */
extern struct inode_operations ext2_fast_symlink_inode_operations;
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 2f8013318..0b55b363b 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -24,6 +24,7 @@
#define FBIOGET_CON2FBMAP 0x460F
#define FBIOPUT_CON2FBMAP 0x4610
#define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */
+#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank)
#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
#define FB_TYPE_PLANES 1 /* Non interleaved planes */
@@ -211,6 +212,24 @@ struct fb_monspecs {
unsigned dpms : 1; /* supports DPMS */
};
+#define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */
+#define FB_VBLANK_HBLANKING 0x002 /* currently in a horizontal blank */
+#define FB_VBLANK_HAVE_VBLANK 0x004 /* vertical blanks can be detected */
+#define FB_VBLANK_HAVE_HBLANK 0x008 /* horizontal blanks can be detected */
+#define FB_VBLANK_HAVE_COUNT 0x010 /* global retrace counter is available */
+#define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */
+#define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */
+#define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */
+#define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */
+
+struct fb_vblank {
+ __u32 flags; /* FB_VBLANK flags */
+ __u32 count; /* counter of retraces since boot */
+ __u32 vcount; /* current scanline position */
+ __u32 hcount; /* current scandot position */
+ __u32 reserved[4]; /* reserved for future compatibility */
+};
+
#ifdef __KERNEL__
#if 1 /* to go away in 2.4.0 */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index a64c6f9c7..e33bdfa72 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -385,6 +385,7 @@ struct inode {
unsigned long i_version;
struct semaphore i_sem;
struct inode_operations *i_op;
+ struct file_operations *i_fop; /* former ->i_op->default_file_ops */
struct super_block *i_sb;
wait_queue_head_t i_wait;
struct file_lock *i_flock;
@@ -668,7 +669,6 @@ struct file_operations {
};
struct inode_operations {
- struct file_operations * default_file_ops;
int (*create) (struct inode *,struct dentry *,int);
struct dentry * (*lookup) (struct inode *,struct dentry *);
int (*link) (struct dentry *,struct inode *,struct dentry *);
@@ -684,6 +684,8 @@ struct inode_operations {
void (*truncate) (struct inode *);
int (*permission) (struct inode *, int);
int (*revalidate) (struct dentry *);
+ int (*setattr) (struct dentry *, struct iattr *);
+ int (*getattr) (struct dentry *, struct iattr *);
};
/*
@@ -695,7 +697,6 @@ struct super_operations {
void (*write_inode) (struct inode *);
void (*put_inode) (struct inode *);
void (*delete_inode) (struct inode *);
- int (*notify_change) (struct dentry *, struct iattr *);
void (*put_super) (struct super_block *);
void (*write_super) (struct super_block *);
int (*statfs) (struct super_block *, struct statfs *, int);
@@ -796,6 +797,7 @@ extern struct block_device *bdget(dev_t);
extern void bdput(struct block_device *);
extern int blkdev_open(struct inode *, struct file *);
extern struct file_operations def_blk_fops;
+extern struct file_operations def_fifo_fops;
extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
extern int blkdev_get(struct block_device *, mode_t, unsigned, int);
extern int blkdev_put(struct block_device *, int);
@@ -811,9 +813,6 @@ extern const char * cdevname(kdev_t);
extern const char * kdevname(kdev_t);
extern void init_special_inode(struct inode *, umode_t, int);
-extern struct inode_operations fifo_inode_operations;
-extern struct inode_operations blkdev_inode_operations;
-
/* Invalid inode operations -- fs/bad_inode.c */
extern void make_bad_inode(struct inode *);
extern int is_bad_inode(struct inode *);
@@ -1019,11 +1018,15 @@ extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t);
+extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
+
+extern struct file_operations generic_ro_fops;
+
extern int vfs_readlink(struct dentry *, char *, int, const char *);
extern struct dentry *vfs_follow_link(struct dentry *, struct dentry *, unsigned, const char *);
extern int page_readlink(struct dentry *, char *, int);
extern struct dentry *page_follow_link(struct dentry *, struct dentry *, unsigned);
-struct inode_operations page_symlink_inode_operations;
+extern struct inode_operations page_symlink_inode_operations;
extern struct super_block *get_super(kdev_t);
struct super_block *get_empty_super(void);
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h
index fcac3cd06..3509c5cb9 100644
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -86,6 +86,7 @@
#define WIN_SRST 0x08 /* ATAPI soft reset command */
#define WIN_PACKETCMD 0xA0 /* Send a packet command. */
+#define DISABLE_SEAGATE 0xFB
#define EXABYTE_ENABLE_NEST 0xF0
/* WIN_SMART sub-commands */
@@ -104,6 +105,7 @@
#define SETFEATURES_EN_WCACHE 0x02 /* Enable write cache */
#define SETFEATURES_XFER 0x03 /* Set transfer mode */
+# define XFER_UDMA_7 0x47 /* 0100|0111 */
# define XFER_UDMA_6 0x46 /* 0100|0110 */
# define XFER_UDMA_5 0x45 /* 0100|0101 */
# define XFER_UDMA_4 0x44 /* 0100|0100 */
@@ -123,6 +125,7 @@
# define XFER_PIO_1 0x09 /* 0000|1001 */
# define XFER_PIO_0 0x08 /* 0000|1000 */
# define XFER_PIO_SLOW 0x00 /* 0000|0000 */
+#define SETFEATURES_DIS_DEFECT 0x04 /* Disable Defect Management */
#define SETFEATURES_EN_APM 0x05 /* Enable advanced power management */
#define SETFEATURES_DIS_MSN 0x31 /* Disable Media Status Notification */
#define SETFEATURES_DIS_RLA 0x55 /* Disable read look-ahead feature */
@@ -130,9 +133,11 @@
#define SETFEATURES_EN_SI 0x5E /* Enable SERVICE interrupt */
#define SETFEATURES_DIS_RPOD 0x66 /* Disable reverting to power on defaults */
#define SETFEATURES_DIS_WCACHE 0x82 /* Disable write cache */
+#define SETFEATURES_EN_DEFECT 0x84 /* Enable Defect Management */
#define SETFEATURES_DIS_APM 0x85 /* Disable advanced power management */
#define SETFEATURES_EN_MSN 0x95 /* Enable Media Status Notification */
#define SETFEATURES_EN_RLA 0xAA /* Enable read look-ahead feature */
+#define SETFEATURES_PREFETCH 0xAB /* Sets drive prefetch value */
#define SETFEATURES_EN_RPOD 0xCC /* Enable reverting to power on defaults */
#define SETFEATURES_DIS_RI 0xDD /* Disable release interrupt */
#define SETFEATURES_DIS_SI 0xDE /* Disable SERVICE interrupt */
@@ -232,26 +237,11 @@ struct hd_driveid {
unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */
unsigned short eide_pio; /* min cycle time (ns), no IORDY */
unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */
-#if 0
- unsigned short words69_74[6]; /* reserved words 69-74 */
-#else
- unsigned short word69; /* reserved (word 69) */
- unsigned short word70; /* reserved (word 70) */
+ unsigned short words69_70[2]; /* reserved words 69-70 */
/* HDIO_GET_IDENTITY currently returns only words 0 through 70 */
- unsigned short word71; /* reserved (word 71) */
- unsigned short word72; /* reserved (word 72) */
- unsigned short word73; /* reserved (word 73) */
- unsigned short word74; /* reserved (word 74) */
-#endif
+ unsigned short words71_74[4]; /* reserved words 71-74 */
unsigned short queue_depth; /* */
-#if 0
unsigned short words76_79[4]; /* reserved words 76-79 */
-#else
- unsigned short word76; /* reserved (word 76) */
- unsigned short word77; /* reserved (word 77) */
- unsigned short word78; /* reserved (word 78) */
- unsigned short word79; /* reserved (word 79) */
-#endif
unsigned short major_rev_num; /* */
unsigned short minor_rev_num; /* */
unsigned short command_set_1; /* bits 0:Smart 1:Security 2:Removable 3:PM */
@@ -266,43 +256,8 @@ struct hd_driveid {
unsigned short CurAPMvalues; /* current APM values */
unsigned short word92; /* reserved (word 92) */
unsigned short hw_config; /* hardware config */
-#if 0
- unsigned short words94_126[34];/* reserved words 94-126 */
-#else
- unsigned short word94; /* reserved (word 94) */
- unsigned short word95; /* reserved (word 95) */
- unsigned short word96; /* reserved (word 96) */
- unsigned short word97; /* reserved (word 97) */
- unsigned short word98; /* reserved (word 98) */
- unsigned short word99; /* reserved (word 99) */
- unsigned short word100; /* reserved (word 100) */
- unsigned short word101; /* reserved (word 101) */
- unsigned short word102; /* reserved (word 102) */
- unsigned short word103; /* reserved (word 103) */
- unsigned short word104; /* reserved (word 104) */
- unsigned short word105; /* reserved (word 105) */
- unsigned short word106; /* reserved (word 106) */
- unsigned short word107; /* reserved (word 107) */
- unsigned short word108; /* reserved (word 108) */
- unsigned short word109; /* reserved (word 109) */
- unsigned short word110; /* reserved (word 110) */
- unsigned short word111; /* reserved (word 111) */
- unsigned short word112; /* reserved (word 112) */
- unsigned short word113; /* reserved (word 113) */
- unsigned short word114; /* reserved (word 114) */
- unsigned short word115; /* reserved (word 115) */
- unsigned short word116; /* reserved (word 116) */
- unsigned short word117; /* reserved (word 117) */
- unsigned short word118; /* reserved (word 118) */
- unsigned short word119; /* reserved (word 119) */
- unsigned short word120; /* reserved (word 120) */
- unsigned short word121; /* reserved (word 121) */
- unsigned short word122; /* reserved (word 122) */
- unsigned short word123; /* reserved (word 123) */
- unsigned short word124; /* reserved (word 124) */
- unsigned short word125; /* reserved (word 125) */
- unsigned short word126; /* reserved (word 126) */
-#endif
+ unsigned short words94_125[33];/* reserved words 94-125 */
+ unsigned short last_lun; /* reserved (word 126) */
unsigned short word127; /* reserved (word 127) */
unsigned short dlf; /* device lock function
* 15:9 reserved
@@ -322,7 +277,8 @@ struct hd_driveid {
* 1 read-look-ahead
* 0 write cache
*/
- unsigned short reserved[126];
+ unsigned short words130_159[30];/* reserved vendor words 130-159 */
+ unsigned short words160_255[96];/* reserved words 160-255 */
};
/*
diff --git a/include/linux/hfs_fs.h b/include/linux/hfs_fs.h
index 4c9543a5d..3c3913943 100644
--- a/include/linux/hfs_fs.h
+++ b/include/linux/hfs_fs.h
@@ -234,8 +234,6 @@ extern struct hfs_cat_entry *hfs_cat_get(struct hfs_mdb *,
const struct hfs_cat_key *);
/* dir.c */
-extern hfs_rwret_t hfs_dir_read(struct file *, char *, hfs_rwarg_t,
- loff_t *);
extern int hfs_create(struct inode *, struct dentry *, int);
extern int hfs_mkdir(struct inode *, struct dentry *, int);
extern int hfs_unlink(struct inode *, struct dentry *);
@@ -249,12 +247,14 @@ extern const struct hfs_name hfs_cap_reserved2[];
extern struct inode_operations hfs_cap_ndir_inode_operations;
extern struct inode_operations hfs_cap_fdir_inode_operations;
extern struct inode_operations hfs_cap_rdir_inode_operations;
+extern struct file_operations hfs_cap_dir_operations;
extern void hfs_cap_drop_dentry(struct dentry *, const ino_t);
/* dir_dbl.c */
extern const struct hfs_name hfs_dbl_reserved1[];
extern const struct hfs_name hfs_dbl_reserved2[];
extern struct inode_operations hfs_dbl_dir_inode_operations;
+extern struct file_operations hfs_dbl_dir_operations;
extern void hfs_dbl_drop_dentry(struct dentry *, const ino_t);
/* dir_nat.c */
@@ -262,13 +262,9 @@ extern const struct hfs_name hfs_nat_reserved1[];
extern const struct hfs_name hfs_nat_reserved2[];
extern struct inode_operations hfs_nat_ndir_inode_operations;
extern struct inode_operations hfs_nat_hdir_inode_operations;
+extern struct file_operations hfs_nat_dir_operations;
extern void hfs_nat_drop_dentry(struct dentry *, const ino_t);
-/* dir_sngl.c */
-extern const struct hfs_name hfs_sngl_reserved1[];
-extern const struct hfs_name hfs_sngl_reserved2[];
-extern struct inode_operations hfs_sngl_dir_inode_operations;
-
/* file.c */
extern hfs_s32 hfs_do_read(struct inode *, struct hfs_fork *, hfs_u32,
char *, hfs_u32, int);
@@ -276,21 +272,27 @@ extern hfs_s32 hfs_do_write(struct inode *, struct hfs_fork *, hfs_u32,
const char *, hfs_u32);
extern void hfs_file_fix_mode(struct hfs_cat_entry *entry);
extern struct inode_operations hfs_file_inode_operations;
+extern struct file_operations hfs_file_operations;
/* file_cap.c */
extern struct inode_operations hfs_cap_info_inode_operations;
+extern struct file_operations hfs_cap_info_operations;
/* file_hdr.c */
extern struct inode_operations hfs_hdr_inode_operations;
+extern struct file_operations hfs_hdr_operations;
extern const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout;
extern const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout;
extern const struct hfs_hdr_layout hfs_nat_hdr_layout;
extern const struct hfs_hdr_layout hfs_nat2_hdr_layout;
extern const struct hfs_hdr_layout hfs_sngl_hdr_layout;
+extern void hdr_truncate(struct inode *,size_t);
/* inode.c */
extern void hfs_put_inode(struct inode *);
extern int hfs_notify_change(struct dentry *, struct iattr *);
+extern int hfs_notify_change_cap(struct dentry *, struct iattr *);
+extern int hfs_notify_change_hdr(struct dentry *, struct iattr *);
extern struct inode *hfs_iget(struct hfs_cat_entry *, ino_t, struct dentry *);
extern void hfs_cap_ifill(struct inode *, ino_t, const int);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 62325a43e..3672f2789 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -181,12 +181,17 @@ typedef unsigned char byte; /* used everywhere */
struct hwif_s;
typedef int (ide_ack_intr_t)(struct hwif_s *);
+#ifndef NO_DMA
+#define NO_DMA 255
+#endif
+
/*
* Structure to hold all information about the location of this port
*/
typedef struct hw_regs_s {
ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */
int irq; /* our irq number */
+ int dma; /* our dma entry */
ide_ack_intr_t *ack_intr; /* acknowledge interrupt */
void *priv; /* interface specific data */
} hw_regs_t;
@@ -356,6 +361,7 @@ typedef enum { ide_unknown, ide_generic, ide_pci,
ide_cmd646, ide_cy82c693, ide_4drives
} hwif_chipset_t;
+#ifdef CONFIG_BLK_DEV_IDEPCI
typedef struct ide_pci_devid_s {
unsigned short vid;
unsigned short did;
@@ -363,6 +369,7 @@ typedef struct ide_pci_devid_s {
#define IDE_PCI_DEVID_NULL ((ide_pci_devid_t){0,0})
#define IDE_PCI_DEVID_EQ(a,b) (a.vid == b.vid && a.did == b.did)
+#endif /* CONFIG_BLK_DEV_IDEPCI */
typedef struct hwif_s {
struct hwif_s *next; /* for linked-list in ide_hwgroup_t */
@@ -399,8 +406,10 @@ typedef struct hwif_s {
unsigned autodma : 1; /* automatically try to enable DMA at boot */
unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */
byte channel; /* for dual-port chips: 0=primary, 1=secondary */
+#ifdef CONFIG_BLK_DEV_IDEPCI
struct pci_dev *pci_dev; /* for pci chipsets */
ide_pci_devid_t pci_devid; /* for pci chipsets: {VID,DID} */
+#endif /* CONFIG_BLK_DEV_IDEPCI */
#if (DISK_RECOVERY_TIME > 0)
unsigned long last_time; /* time when previous rq was done */
#endif
@@ -579,7 +588,8 @@ typedef struct ide_module_s {
*/
#ifndef _IDE_C
extern ide_hwif_t ide_hwifs[]; /* master data repository */
-extern ide_module_t *ide_modules;
+extern ide_module_t *ide_modules;
+extern ide_module_t *ide_probe;
#endif
/*
@@ -851,4 +861,6 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dmabase, unsigned int num_po
unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif, int extra, const char *name) __init;
#endif
+void hwif_unregister (ide_hwif_t *hwif);
+
#endif /* _IDE_H */
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 150266ff8..4a6df60ae 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -12,6 +12,7 @@
#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */
#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
#define IRQ_LEVEL 64 /* IRQ level triggered */
+#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */
/*
* Interrupt controller descriptor. This is all we need
@@ -25,6 +26,7 @@ struct hw_interrupt_type {
void (*disable)(unsigned int irq);
void (*ack)(unsigned int irq);
void (*end)(unsigned int irq);
+ void (*set_affinity)(unsigned int irq, unsigned int mask);
};
typedef struct hw_interrupt_type hw_irq_controller;
@@ -37,17 +39,33 @@ typedef struct hw_interrupt_type hw_irq_controller;
* Pad this out to 32 bytes for cache and indexing reasons.
*/
typedef struct {
- unsigned int status; /* IRQ status
- - IRQ_INPROGRESS, IRQ_DISABLED */
- hw_irq_controller *handler; /* never derefed in arch
- independent code */
- struct irqaction *action; /* IRQ action list */
- unsigned int depth; /* Disable depth for nested irq disables */
+ unsigned int status; /* IRQ status */
+ hw_irq_controller *handler;
+ struct irqaction *action; /* IRQ action list */
+ unsigned int depth; /* nested irq disables */
+ spinlock_t lock;
+ unsigned int __pad[3];
} ____cacheline_aligned irq_desc_t;
-#include <asm/hw_irq.h> /* the arch dependent stuff */
+extern irq_desc_t irq_desc [NR_IRQS];
+
+typedef struct {
+ unsigned int __local_irq_count;
+ unsigned int __local_bh_count;
+ atomic_t __nmi_counter;
+ unsigned int __pad[5];
+} ____cacheline_aligned irq_cpustat_t;
+
+extern irq_cpustat_t irq_stat [NR_CPUS];
-extern irq_desc_t irq_desc[NR_IRQS];
+/*
+ * Simple wrappers reducing source bloat
+ */
+#define local_irq_count(cpu) (irq_stat[(cpu)].__local_irq_count)
+#define local_bh_count(cpu) (irq_stat[(cpu)].__local_bh_count)
+#define nmi_counter(cpu) (irq_stat[(cpu)].__nmi_counter)
+
+#include <asm/hw_irq.h> /* the arch dependent stuff */
extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
extern spinlock_t irq_controller_lock;
diff --git a/include/linux/isdn.h b/include/linux/isdn.h
index d7dc3b90f..f34122fc3 100644
--- a/include/linux/isdn.h
+++ b/include/linux/isdn.h
@@ -1,4 +1,4 @@
-/* $Id: isdn.h,v 1.90 2000/02/06 21:50:00 detabc Exp $
+/* $Id: isdn.h,v 1.94 2000/02/26 00:29:40 keil Exp $
*
* Main header for the Linux ISDN subsystem (linklevel).
*
@@ -21,6 +21,19 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn.h,v $
+ * Revision 1.94 2000/02/26 00:29:40 keil
+ * more softnet changes
+ *
+ * Revision 1.93 2000/02/25 11:29:17 paul
+ * changed chargetime to ulong from int (after about 20 days the "chargetime of
+ * ipppX is now 1234" message displays a negative number on alpha).
+ *
+ * Revision 1.92 2000/02/17 13:15:56 keil
+ * fix backward compatibility for 2.2
+ *
+ * Revision 1.91 2000/02/16 14:56:27 paul
+ * translated ISDN_MODEM_ANZREG to ISDN_MODEM_NUMREG for english speakers
+ *
* Revision 1.90 2000/02/06 21:50:00 detabc
* add rewriting of socket's and frame's saddr for udp-ipv4 dynip-connections.
* Include checksum-recompute of ip- and udp-header's.
@@ -444,7 +457,7 @@
#define ISDN_USAGE_EXCLUSIVE 64 /* This bit is set, if channel is exclusive */
#define ISDN_USAGE_OUTGOING 128 /* This bit is set, if channel is outgoing */
-#define ISDN_MODEM_ANZREG 24 /* Number of Modem-Registers */
+#define ISDN_MODEM_NUMREG 24 /* Number of Modem-Registers */
#define ISDN_LMSNLEN 255 /* Length of tty's Listen-MSN string */
#define ISDN_CMSGLEN 50 /* Length of CONNECT-Message to add for Modem */
@@ -672,7 +685,7 @@ typedef struct isdn_net_local_s {
/* 0 = Transparent */
int huptimer; /* Timeout-counter for auto-hangup */
int charge; /* Counter for charging units */
- int chargetime; /* Timer for Charging info */
+ ulong chargetime; /* Timer for Charging info */
int hupflags; /* Flags for charge-unit-hangup: */
/* bit0: chargeint is invalid */
/* bit1: Getting charge-interval */
@@ -777,8 +790,8 @@ typedef struct isdn_audio_skb {
/* Private data of AT-command-interpreter */
typedef struct atemu {
- u_char profile[ISDN_MODEM_ANZREG]; /* Modem-Regs. Profile 0 */
- u_char mdmreg[ISDN_MODEM_ANZREG]; /* Modem-Registers */
+ u_char profile[ISDN_MODEM_NUMREG]; /* Modem-Regs. Profile 0 */
+ u_char mdmreg[ISDN_MODEM_NUMREG]; /* Modem-Registers */
char pmsn[ISDN_MSNLEN]; /* EAZ/MSNs Profile 0 */
char msn[ISDN_MSNLEN]; /* EAZ/MSN */
char plmsn[ISDN_LMSNLEN]; /* Listening MSNs Profile 0 */
@@ -985,10 +998,10 @@ typedef struct isdn_devt {
devfs_handle_t devfs_handle_isdnctrl;
devfs_handle_t devfs_handle_isdnX[ISDN_MAX_CHANNELS];
devfs_handle_t devfs_handle_isdnctrlX[ISDN_MAX_CHANNELS];
-# ifdef CONFIG_ISDN_PPP
+#ifdef CONFIG_ISDN_PPP
devfs_handle_t devfs_handle_ipppX[ISDN_MAX_CHANNELS];
-# endif
#endif
+#endif /* CONFIG_DEVFS_FS */
} isdn_dev;
extern isdn_dev *dev;
diff --git a/include/linux/iso_fs.h b/include/linux/iso_fs.h
index 59da5b123..47fab8914 100644
--- a/include/linux/iso_fs.h
+++ b/include/linux/iso_fs.h
@@ -189,8 +189,8 @@ extern int isofs_bmap(struct inode *, int);
extern int init_iso9660_fs(void);
extern int isofs_lookup_grandparent(struct inode *, int);
-extern struct inode_operations isofs_file_inode_operations;
extern struct inode_operations isofs_dir_inode_operations;
+extern struct file_operations isofs_dir_operations;
extern struct address_space_operations isofs_symlink_aops;
/* The following macros are used to check for memory leaks. */
diff --git a/include/linux/list.h b/include/linux/list.h
index 656aacc2a..a3900e53c 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -104,6 +104,9 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
#define list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
+#define list_for_each(pos, head) \
+ for (pos = (head)->next; pos != (head); pos = pos->next)
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/linux/lists.h b/include/linux/lists.h
deleted file mode 100644
index e1163acde..000000000
--- a/include/linux/lists.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * lists.h: Simple list macros for Linux
- */
-
-#define DLNODE(ptype) \
- struct { \
- ptype * dl_prev; \
- ptype * dl_next; \
- }
-
-#define DNODE_SINGLE(node) {(node),(node)}
-#define DNODE_NULL {0,0}
-
-#define DLIST_INIT(listnam) \
- (listnam).dl_prev = &(listnam); \
- (listnam).dl_next = &(listnam);
-
-#define DLIST_NEXT(listnam) listnam.dl_next
-#define DLIST_PREV(listnam) listnam.dl_prev
-
-#define DLIST_INSERT_AFTER(node, new, listnam) do { \
- (new)->listnam.dl_prev = (node); \
- (new)->listnam.dl_next = (node)->listnam.dl_next; \
- (node)->listnam.dl_next->listnam.dl_prev = (new); \
- (node)->listnam.dl_next = (new); \
- } while (0)
-
-#define DLIST_INSERT_BEFORE(node, new, listnam) do { \
- (new)->listnam.dl_next = (node); \
- (new)->listnam.dl_prev = (node)->listnam.dl_prev; \
- (node)->listnam.dl_prev->listnam.dl_next = (new); \
- (node)->listnam.dl_prev = (new); \
- } while (0)
-
-#define DLIST_DELETE(node, listnam) do { \
- node->listnam.dl_prev->listnam.dl_next = \
- node->listnam.dl_next; \
- node->listnam.dl_next->listnam.dl_prev = \
- node->listnam.dl_prev; \
- } while (0)
-
-/*
- * queue-style operations, which have a head and tail
- */
-
-#define QUEUE_INIT(head, listnam, ptype) \
- (head)->listnam.dl_prev = (head)->listnam.dl_next = (ptype)(head);
-
-#define QUEUE_FIRST(head, listnam) (head)->DLIST_NEXT(listnam)
-#define QUEUE_LAST(head, listnam) (head)->DLIST_PREV(listnam)
-#define QUEUE_IS_EMPTY(head, listnam) \
- ((QUEUE_FIRST(head, listnam) == QUEUE_LAST(head, listnam)) && \
- ((u_long)QUEUE_FIRST(head, listnam) == (u_long)head))
-
-#define QUEUE_ENTER(head, new, listnam, ptype) do { \
- (new)->listnam.dl_prev = (ptype)(head); \
- (new)->listnam.dl_next = (head)->listnam.dl_next; \
- (head)->listnam.dl_next->listnam.dl_prev = (new); \
- (head)->listnam.dl_next = (new); \
- } while (0)
-
-#define QUEUE_REMOVE(head, node, listnam) DLIST_DELETE(node, listnam)
diff --git a/include/linux/matroxfb.h b/include/linux/matroxfb.h
new file mode 100644
index 000000000..182d76b25
--- /dev/null
+++ b/include/linux/matroxfb.h
@@ -0,0 +1,32 @@
+#ifndef __LINUX_MATROXFB_H__
+#define __LINUX_MATROXFB_H__
+
+#include <asm/ioctl.h>
+#include <asm/types.h>
+
+struct matroxioc_output_mode {
+ __u32 output; /* which output */
+#define MATROXFB_OUTPUT_PRIMARY 0x0000
+#define MATROXFB_OUTPUT_SECONDARY 0x0001
+ __u32 mode; /* which mode */
+#define MATROXFB_OUTPUT_MODE_PAL 0x0001
+#define MATROXFB_OUTPUT_MODE_NTSC 0x0002
+#define MATROXFB_OUTPUT_MODE_MONITOR 0x0080
+};
+#define MATROXFB_SET_OUTPUT_MODE _IOW('n',0xFA,sizeof(struct matroxioc_output_mode))
+#define MATROXFB_GET_OUTPUT_MODE _IOWR('n',0xFA,sizeof(struct matroxioc_output_mode))
+
+/* bitfield */
+#define MATROXFB_OUTPUT_CONN_PRIMARY (1 << MATROXFB_OUTPUT_PRIMARY)
+#define MATROXFB_OUTPUT_CONN_SECONDARY (1 << MATROXFB_OUTPUT_SECONDARY)
+/* connect these outputs to this framebuffer */
+#define MATROXFB_SET_OUTPUT_CONNECTION _IOW('n',0xF8,sizeof(__u32))
+/* which outputs are connected to this framebuffer */
+#define MATROXFB_GET_OUTPUT_CONNECTION _IOR('n',0xF8,sizeof(__u32))
+/* which outputs are available for this framebuffer */
+#define MATROXFB_GET_AVAILABLE_OUTPUTS _IOR('n',0xF9,sizeof(__u32))
+/* which outputs exist on this framebuffer */
+#define MATROXFB_GET_ALL_OUTPUTS _IOR('n',0xFB,sizeof(__u32))
+
+#endif
+
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h
index c1d661460..6f63a54c4 100644
--- a/include/linux/minix_fs.h
+++ b/include/linux/minix_fs.h
@@ -89,17 +89,6 @@ struct minix_dir_entry {
#ifdef __KERNEL__
-extern struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry);
-extern int minix_create(struct inode * dir, struct dentry *dentry, int mode);
-extern int minix_mkdir(struct inode * dir, struct dentry *dentry, int mode);
-extern int minix_rmdir(struct inode * dir, struct dentry *dentry);
-extern int minix_unlink(struct inode * dir, struct dentry *dentry);
-extern int minix_symlink(struct inode * inode, struct dentry *dentry,
- const char * symname);
-extern int minix_link(struct dentry * old_dentry, struct inode * dir, struct dentry *dentry);
-extern int minix_mknod(struct inode * dir, struct dentry *dentry, int mode, int rdev);
-extern int minix_rename(struct inode * old_dir, struct dentry *old_dentry,
- struct inode * new_dir, struct dentry *new_dentry);
extern struct inode * minix_new_inode(const struct inode * dir, int * error);
extern void minix_free_inode(struct inode * inode);
extern unsigned long minix_count_free_inodes(struct super_block *sb);
@@ -118,6 +107,8 @@ extern int minix_sync_file(struct file *, struct dentry *);
extern struct address_space_operations minix_aops;
extern struct inode_operations minix_file_inode_operations;
extern struct inode_operations minix_dir_inode_operations;
+extern struct file_operations minix_file_operations;
+extern struct file_operations minix_dir_operations;
extern struct dentry_operations minix_dentry_operations;
#endif /* __KERNEL__ */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f42f84857..a01877f10 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -378,6 +378,8 @@ extern void show_free_areas_node(int nid);
extern void clear_page_tables(struct mm_struct *, unsigned long, int);
+extern int map_zero_setup(struct vm_area_struct *);
+
extern void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size);
extern int copy_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *vma);
extern int remap_page_range(unsigned long from, unsigned long to, unsigned long size, pgprot_t prot);
@@ -393,7 +395,6 @@ extern int ptrace_writedata(struct task_struct *tsk, char * src, unsigned long d
extern int pgt_cache_water[2];
extern int check_pgt_cache(void);
-extern void paging_init(void);
extern void free_area_init(unsigned long * zones_size);
extern void free_area_init_node(int nid, pg_data_t *pgdat,
unsigned long * zones_size, unsigned long zone_start_paddr);
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 46e366aef..17a64200e 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -28,7 +28,8 @@ typedef struct zone_struct {
spinlock_t lock;
unsigned long offset;
unsigned long free_pages;
- int low_on_memory;
+ char low_on_memory;
+ char zone_wake_kswapd;
unsigned long pages_min, pages_low, pages_high;
/*
@@ -84,9 +85,11 @@ typedef struct pglist_data {
unsigned long node_start_mapnr;
unsigned long node_size;
int node_id;
+ struct pglist_data *node_next;
} pg_data_t;
extern int numnodes;
+extern pg_data_t *pgdat_list;
#define memclass(pgzone, tzone) (((pgzone)->zone_pgdat == (tzone)->zone_pgdat) \
&& (((pgzone) - (pgzone)->zone_pgdat->node_zones) <= \
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 54c1cbd55..de2ccffbd 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -267,6 +267,7 @@ int fat_new_dir(struct inode *inode, struct inode *parent, int is_vfat);
extern struct inode_operations fat_file_inode_operations;
extern struct inode_operations fat_file_inode_operations_1024;
extern struct inode_operations fat_file_inode_operations_readpage;
+extern struct file_operations fat_file_operations;
extern ssize_t fat_file_read(struct file *, char *, size_t, loff_t *);
extern ssize_t fat_file_write(struct file *, const char *, size_t, loff_t *);
extern void fat_truncate(struct inode *inode);
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index a9d46d35b..b028f984c 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -232,6 +232,7 @@ extern int init_ncp_fs(void);
/* linux/fs/ncpfs/dir.c */
extern struct inode_operations ncp_dir_inode_operations;
+extern struct file_operations ncp_dir_operations;
int ncp_conn_logged_in(struct super_block *);
int ncp_date_dos2unix(__u16 time, __u16 date);
void ncp_date_unix2dos(int unix_date, __u16 * time, __u16 * date);
@@ -252,6 +253,7 @@ void ncp_unlock_server(struct ncp_server *server);
/* linux/fs/ncpfs/file.c */
extern struct inode_operations ncp_file_inode_operations;
+extern struct file_operations ncp_file_operations;
int ncp_make_open(struct inode *, int);
/* linux/fs/ncpfs/mmap.c */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4c002a7cb..2c7103040 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -478,26 +478,6 @@ extern __inline__ int netif_running(struct net_device *dev)
return test_bit(__LINK_STATE_START, &dev->state);
}
-/* Hot-plugging. */
-extern __inline__ int netif_device_present(struct net_device *dev)
-{
- return test_bit(__LINK_STATE_PRESENT, &dev->state);
-}
-
-extern __inline__ void netif_device_detach(struct net_device *dev)
-{
- if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) &&
- netif_running(dev))
- netif_stop_queue(dev);
-}
-
-extern __inline__ void netif_device_attach(struct net_device *dev)
-{
- if (test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) &&
- netif_running(dev))
- netif_wake_queue(dev);
-}
-
/* Use this variant when it is known for sure that it
* is executing from interrupt context.
*/
@@ -553,6 +533,35 @@ extern __inline__ void dev_put(struct net_device *dev)
#define __dev_put(dev) atomic_dec(&(dev)->refcnt)
#define dev_hold(dev) atomic_inc(&(dev)->refcnt)
+/* Hot-plugging. */
+extern __inline__ int netif_device_present(struct net_device *dev)
+{
+ return test_bit(__LINK_STATE_PRESENT, &dev->state);
+}
+
+extern __inline__ void netif_device_detach(struct net_device *dev)
+{
+ if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) &&
+ netif_running(dev)) {
+ netif_stop_queue(dev);
+ if (dev->tx_timeout &&
+ del_timer(&dev->watchdog_timer))
+ __dev_put(dev);
+ }
+}
+
+extern __inline__ void netif_device_attach(struct net_device *dev)
+{
+ if (test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) &&
+ netif_running(dev)) {
+ netif_wake_queue(dev);
+ if (dev->tx_timeout) {
+ dev->watchdog_timer.expires = jiffies + dev->watchdog_timeo;
+ add_timer(&dev->watchdog_timer);
+ dev_hold(dev);
+ }
+ }
+}
/* These functions live elsewhere (drivers/net/net_init.c, but related) */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 26fb2de7f..3b1ae1764 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -185,17 +185,20 @@ extern int nfs_revalidate(struct dentry *);
extern int nfs_open(struct inode *, struct file *);
extern int nfs_release(struct inode *, struct file *);
extern int __nfs_revalidate_inode(struct nfs_server *, struct dentry *);
+extern int nfs_notify_change(struct dentry *, struct iattr *);
/*
* linux/fs/nfs/file.c
*/
extern struct inode_operations nfs_file_inode_operations;
+extern struct file_operations nfs_file_operations;
extern struct address_space_operations nfs_file_aops;
/*
* linux/fs/nfs/dir.c
*/
extern struct inode_operations nfs_dir_inode_operations;
+extern struct file_operations nfs_dir_operations;
extern struct dentry_operations nfs_dentry_operations;
extern void nfs_flush_dircache(struct inode *);
extern void nfs_free_dircache(struct inode *);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index eda945b6c..d32ff4828 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -285,6 +285,7 @@
#include <linux/config.h>
#include <linux/ioport.h>
#include <linux/list.h>
+#include <linux/errno.h>
/* This defines the direction arg to the DMA mapping routines. */
#define PCI_DMA_BIDIRECTIONAL 0
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 3927b11f9..b7911143f 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1022,6 +1022,9 @@
#define PCI_VENDOR_ID_NETGEAR 0x1385
#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a
+#define PCI_VENDOR_ID_3WARE 0x13C1
+#define PCI_DEVICE_ID_3WARE_1000 0x1000
+
#define PCI_VENDOR_ID_LAVA 0x1407
#define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */
#define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */
@@ -1095,8 +1098,8 @@
#define PCI_DEVICE_ID_S3_ViRGE_MXPMV 0x8c03
#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00
-#define PCI_VENDOR_ID_DCI 0x6666
-#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
+#define PCI_VENDOR_ID_DCI 0x6666
+#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
#define PCI_VENDOR_ID_GENROCO 0x5555
#define PCI_DEVICE_ID_GENROCO_HFP832 0x0003
@@ -1156,6 +1159,7 @@
#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190
#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191
#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192
+#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601
#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4
#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5
#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 3f73f489f..4d0a950a9 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -101,6 +101,7 @@ struct pm_dev
unsigned long flags;
int state;
+ int prev_state;
struct list_head entry;
};
@@ -129,9 +130,14 @@ void pm_unregister(struct pm_dev *dev);
void pm_unregister_all(pm_callback callback);
/*
+ * Send a request to a single device
+ */
+int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data);
+
+/*
* Send a request to all devices
*/
-int pm_send_request(pm_request_t rqst, void *data);
+int pm_send_all(pm_request_t rqst, void *data);
/*
* Find a device
@@ -156,7 +162,12 @@ extern inline void pm_unregister(struct pm_dev *dev) {}
extern inline void pm_unregister_all(pm_callback callback) {}
-extern inline int pm_send_request(pm_request_t rqst, void *data)
+extern inline int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data)
+{
+ return 0;
+}
+
+extern inline int pm_send_all(pm_request_t rqst, void *data)
{
return 0;
}
diff --git a/include/linux/prctl.h b/include/linux/prctl.h
index d8ae9689c..ca7a8cd8b 100644
--- a/include/linux/prctl.h
+++ b/include/linux/prctl.h
@@ -10,4 +10,10 @@
#define PR_GET_DUMPABLE 3
#define PR_SET_DUMPABLE 4
+/* Get/set unaligned access control bits (if meaningful) */
+#define PR_GET_UNALIGN 5
+#define PR_SET_UNALIGN 6
+# define PR_UNALIGN_NOPRINT 1 /* silently fix up unaligned user accesses */
+# define PR_UNALIGN_SIGBUS 2 /* generate SIGBUS on unaligned user access */
+
#endif /* _LINUX_PRCTL_H */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 21349eb40..f5927109a 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -59,7 +59,8 @@ struct proc_dir_entry {
uid_t uid;
gid_t gid;
unsigned long size;
- struct inode_operations * ops;
+ struct inode_operations * proc_iops;
+ struct file_operations * proc_fops;
get_info_t *get_info;
struct module *owner;
struct proc_dir_entry *next, *parent, *subdir;
@@ -80,7 +81,7 @@ extern struct proc_dir_entry *proc_root_fs;
extern struct proc_dir_entry *proc_net;
extern struct proc_dir_entry *proc_bus;
extern struct proc_dir_entry *proc_root_driver;
-extern struct proc_dir_entry proc_root_kcore;
+extern struct proc_dir_entry *proc_root_kcore;
extern void proc_root_init(void);
extern void proc_misc_init(void);
@@ -112,10 +113,9 @@ extern int proc_match(int, const char *,struct proc_dir_entry *);
extern int proc_readdir(struct file *, void *, filldir_t);
extern struct dentry *proc_lookup(struct inode *, struct dentry *);
-extern struct inode_operations proc_sys_inode_operations;
-extern struct inode_operations proc_kcore_inode_operations;
-extern struct inode_operations proc_kmsg_inode_operations;
-extern struct inode_operations proc_ppc_htab_inode_operations;
+extern struct file_operations proc_kcore_operations;
+extern struct file_operations proc_kmsg_operations;
+extern struct file_operations ppc_htab_operations;
/*
* proc_tty.c
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index d831875bb..4e68ee5a6 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -108,6 +108,8 @@ extern int init_qnx4_fs(void);
extern int qnx4_create(struct inode *dir, struct dentry *dentry, int mode);
extern struct inode_operations qnx4_file_inode_operations;
extern struct inode_operations qnx4_dir_inode_operations;
+extern struct file_operations qnx4_file_operations;
+extern struct file_operations qnx4_dir_operations;
extern int qnx4_is_free(struct super_block *sb, long block);
extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy);
extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode);
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 9e457818f..e0fdda3fa 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -75,6 +75,8 @@ extern dev_mapping_t mddev_map [MAX_MD_DEVS];
extern inline mddev_t * kdev_to_mddev (kdev_t dev)
{
+ if (MAJOR(dev) != MD_MAJOR)
+ BUG();
return mddev_map[MINOR(dev)].mddev;
}
@@ -213,7 +215,7 @@ struct mdk_personality_s
char *name;
int (*map)(mddev_t *mddev, kdev_t dev, kdev_t *rdev,
unsigned long *rsector, unsigned long size);
- int (*make_request)(mddev_t *mddev, int rw, struct buffer_head * bh);
+ int (*make_request)(request_queue_t *q, mddev_t *mddev, int rw, struct buffer_head * bh);
void (*end_request)(struct buffer_head * bh, int uptodate);
int (*run)(mddev_t *mddev);
int (*stop)(mddev_t *mddev);
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h
index 52c3d7f33..d11573ca5 100644
--- a/include/linux/smb_fs.h
+++ b/include/linux/smb_fs.h
@@ -101,10 +101,12 @@ int smb_mmap(struct file *, struct vm_area_struct *);
/* linux/fs/smbfs/file.c */
extern struct inode_operations smb_file_inode_operations;
+extern struct file_operations smb_file_operations;
extern struct address_space_operations smb_file_aops;
/* linux/fs/smbfs/dir.c */
extern struct inode_operations smb_dir_inode_operations;
+extern struct file_operations smb_dir_operations;
void smb_renew_times(struct dentry *);
/* linux/fs/smbfs/ioctl.c */
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index e7c710646..1d91cf216 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -21,11 +21,11 @@
****************************************************************
*/
-#include <linux/lists.h>
-
#ifndef _LINUX_SYSCTL_H
#define _LINUX_SYSCTL_H
+#include <linux/list.h>
+
#define CTL_MAXNAME 10
struct __sysctl_args {
@@ -664,7 +664,7 @@ struct ctl_table
struct ctl_table_header
{
ctl_table *ctl_table;
- DLNODE(struct ctl_table_header) ctl_entry;
+ struct list_head ctl_entry;
};
struct ctl_table_header * register_sysctl_table(ctl_table * table,
diff --git a/include/linux/sysv_fs.h b/include/linux/sysv_fs.h
index 4f65ba7dd..9e177c3d4 100644
--- a/include/linux/sysv_fs.h
+++ b/include/linux/sysv_fs.h
@@ -367,16 +367,6 @@ sv_bread (struct super_block *sb, kdev_t dev, unsigned int block)
* Function prototypes
*/
-extern struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry);
-extern int sysv_create(struct inode * dir, struct dentry * dentry, int mode);
-extern int sysv_mkdir(struct inode * dir, struct dentry * dentry, int mode);
-extern int sysv_rmdir(struct inode * dir, struct dentry * dentry);
-extern int sysv_unlink(struct inode * dir, struct dentry * dentry);
-extern int sysv_symlink(struct inode * inode, struct dentry * dentry, const char * symname);
-extern int sysv_link(struct dentry * old_dentry, struct inode * dir, struct dentry * dentry);
-extern int sysv_mknod(struct inode * dir, struct dentry * dentry, int mode, int rdev);
-extern int sysv_rename(struct inode * old_dir, struct dentry * old_dentry,
- struct inode * new_dir, struct dentry * new_dentry);
extern struct inode * sysv_new_inode(const struct inode * dir);
extern void sysv_free_inode(struct inode * inode);
extern unsigned long sysv_count_free_inodes(struct super_block *sb);
@@ -391,9 +381,13 @@ extern int init_sysv_fs(void);
extern void sysv_write_inode(struct inode *);
extern int sysv_sync_inode(struct inode *);
extern int sysv_sync_file(struct file *, struct dentry *);
+extern int sysv_notify_change(struct dentry *, struct iattr *);
extern struct inode_operations sysv_file_inode_operations;
+extern struct inode_operations sysv_symlink_inode_operations;
extern struct inode_operations sysv_dir_inode_operations;
+extern struct file_operations sysv_file_operations;
+extern struct file_operations sysv_dir_operations;
extern struct address_space_operations sysv_aops;
#endif /* __KERNEL__ */
diff --git a/include/linux/timer.h b/include/linux/timer.h
index d159222b7..f9e7efdaa 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -20,7 +20,6 @@
#define GSCD_TIMER 9 /* Goldstar CDROM */
#define COMTROL_TIMER 10 /* Comtrol serial */
#define DIGI_TIMER 11 /* Digi serial */
-#define GDTH_TIMER 12 /* Ugh - gdth scsi driver */
#define COPRO_TIMER 31 /* 387 timeout for buggy hardware (boot only) */
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 83a6a69e7..d7c14cd74 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -504,9 +504,6 @@ struct ufs_inode {
#ifdef __KERNEL__
-/* acl.c */
-extern int ufs_permission (struct inode *, int);
-
/* balloc.c */
extern void ufs_free_fragments (struct inode *, unsigned, unsigned);
extern void ufs_free_blocks (struct inode *, unsigned, unsigned);
@@ -518,7 +515,6 @@ extern void ufs_put_cylinder (struct super_block *, unsigned);
/* dir.c */
extern struct inode_operations ufs_dir_inode_operations;
-extern struct file_operations ufs_dir_operations;
extern int ufs_check_dir_entry (const char *, struct inode *, struct ufs_dir_entry *, struct buffer_head *, unsigned long);
/* file.c */
@@ -543,18 +539,9 @@ extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *);
extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *);
/* namei.c */
-extern struct dentry *ufs_lookup (struct inode *, struct dentry *);
-extern int ufs_mkdir(struct inode *, struct dentry *, int);
-extern int ufs_rmdir (struct inode *, struct dentry *);
-extern int ufs_unlink (struct inode *, struct dentry *);
-extern int ufs_create (struct inode *, struct dentry *, int);
-extern int ufs_rename (struct inode *, struct dentry *, struct inode *, struct dentry *);
-extern int ufs_mknod (struct inode *, struct dentry *, int, int);
-extern int ufs_symlink (struct inode *, struct dentry *, const char *);
-extern int ufs_link (struct dentry *, struct inode *, struct dentry *);
+extern struct file_operations ufs_dir_operations;
/* super.c */
-extern struct super_operations ufs_super_ops;
extern struct file_system_type ufs_fs_type;
extern void ufs_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
extern void ufs_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
diff --git a/include/linux/umsdos_fs.h b/include/linux/umsdos_fs.h
index 1e7a0bead..6f113d28c 100644
--- a/include/linux/umsdos_fs.h
+++ b/include/linux/umsdos_fs.h
@@ -174,6 +174,9 @@ struct umsdos_ioctl {
#endif
extern struct inode_operations umsdos_dir_inode_operations;
+extern struct inode_operations umsdos_rdir_inode_operations;
+extern struct file_operations umsdos_dir_operations;
+extern struct file_operations umsdos_rdir_operations;
extern int init_umsdos_fs (void);
#include <linux/umsdos_fs.p>
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 86bd08715..6d8f5dae6 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -4,6 +4,7 @@
#define WNOHANG 0x00000001
#define WUNTRACED 0x00000002
+#define __WALL 0x40000000
#define __WCLONE 0x80000000
#ifdef __KERNEL__
diff --git a/include/net/atmclip.h b/include/net/atmclip.h
index edcae7c37..a568dd753 100644
--- a/include/net/atmclip.h
+++ b/include/net/atmclip.h
@@ -1,6 +1,6 @@
/* net/atm/atmarp.h - RFC1577 ATM ARP */
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
+/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
#ifndef _ATMCLIP_H
@@ -11,6 +11,7 @@
#include <linux/atm.h>
#include <linux/atmdev.h>
#include <linux/atmarp.h>
+#include <linux/spinlock.h>
#include <net/neighbour.h>
@@ -22,6 +23,7 @@ struct clip_vcc {
struct atm_vcc *vcc; /* VCC descriptor */
struct atmarp_entry *entry; /* ATMARP table entry, NULL if IP addr.
isn't known yet */
+ int xoff; /* 1 if send buffer is full */
unsigned char encap; /* 0: NULL, 1: LLC/SNAP */
unsigned long last_use; /* last send or receive operation */
unsigned long idle_timeout; /* keep open idle for so many jiffies*/
@@ -48,8 +50,9 @@ struct atmarp_entry {
struct clip_priv {
char name[8]; /* interface name */
int number; /* for convenience ... */
+ spinlock_t xoff_lock; /* ensures that pop is atomic (SMP) */
struct net_device_stats stats;
- struct net_device *next; /* next CLIP interface */
+ struct net_device *next; /* next CLIP interface */
};