Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Linux Kernel Patch v2.4, patch-2.4.10 (185/197)

0 views
Skip to first unread message

Thomas Kobienia

unread,
Sep 24, 2001, 8:00:48 PM9/24/01
to
Archive-name: v2.4/patch-2.4.10/part185

#!/bin/sh -x
# this is part 185 of a 197 - part archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.4.10 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 185; then
echo "Please unpack part $Scheck next!"
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.4.10'
else
echo 'x - continuing with patch-2.4.10'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.4.10' &&
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/floppy.h linux/include/asm-sparc64/floppy.h
--- v2.4.9/linux/include/asm-sparc64/floppy.h Wed May 16 10:31:27 2001
+++ linux/include/asm-sparc64/floppy.h Tue Aug 28 07:09:44 2001
@@ -1,4 +1,4 @@
-/* $Id: floppy.h,v 1.30 2001/05/11 07:05:38 davem Exp $
+/* $Id: floppy.h,v 1.31 2001/08/22 17:46:31 davem Exp $
X * asm-sparc64/floppy.h: Sparc specific parts of the Floppy driver.
X *
X * Copyright (C) 1996 David S. Miller (da...@caip.rutgers.edu)
@@ -268,8 +268,15 @@
X static struct linux_ebus_dma *sun_pci_fd_ebus_dma;
X static struct pci_dev *sun_pci_ebus_dev;
X static int sun_pci_broken_drive = -1;
-static unsigned int sun_pci_dma_addr = -1U;
-static int sun_pci_dma_len, sun_pci_dma_direction;
+
+struct sun_pci_dma_op {
+ unsigned int addr;
+ int len;
+ int direction;
+ char *buf;
+};
+static struct sun_pci_dma_op sun_pci_dma_current = { -1U, 0, 0, NULL};
+static struct sun_pci_dma_op sun_pci_dma_pending = { -1U, 0, 0, NULL};
X
X extern void floppy_interrupt(int irq, void *dev_id, struct pt_regs *regs);
X
@@ -339,6 +346,29 @@
X {
X unsigned int dcsr;
X
+ if((NULL == sun_pci_dma_pending.buf) ||
+ (0 == sun_pci_dma_pending.len) ||
+ (0 == sun_pci_dma_pending.direction)) {
+ goto enable; /* TODO: BUG() */
+ }
+
+ sun_pci_dma_current.buf = sun_pci_dma_pending.buf;
+ sun_pci_dma_current.len = sun_pci_dma_pending.len;
+ sun_pci_dma_current.direction = sun_pci_dma_pending.direction;
+
+ sun_pci_dma_pending.buf = NULL;
+ sun_pci_dma_pending.len = 0;
+ sun_pci_dma_pending.direction = 0;
+ sun_pci_dma_pending.addr = -1U;
+
+ sun_pci_dma_current.addr =
+ pci_map_single( sun_pci_ebus_dev,
+ sun_pci_dma_current.buf,
+ sun_pci_dma_current.len,
+ sun_pci_dma_current.direction);
+ writel(sun_pci_dma_current.addr, &sun_pci_fd_ebus_dma->dacr);
+
+enable:
X dcsr = readl(&sun_pci_fd_ebus_dma->dcsr);
X dcsr |= EBUS_DCSR_EN_DMA;
X writel(dcsr, &sun_pci_fd_ebus_dma->dcsr);
@@ -362,12 +392,12 @@
X writel(dcsr, &sun_pci_fd_ebus_dma->dcsr);
X }
X }
- if (sun_pci_dma_addr != -1U)
+ if (sun_pci_dma_current.addr != -1U)
X pci_unmap_single(sun_pci_ebus_dev,
- sun_pci_dma_addr,
- sun_pci_dma_len,
- sun_pci_dma_direction);
- sun_pci_dma_addr = -1U;
+ sun_pci_dma_current.addr,
+ sun_pci_dma_current.len,
+ sun_pci_dma_current.direction);
+ sun_pci_dma_current.addr = -1U;
X }
X
X static void sun_pci_fd_set_dma_mode(int mode)
@@ -387,29 +417,23 @@
X */
X if (mode == DMA_MODE_WRITE) {
X dcsr &= ~(EBUS_DCSR_WRITE);
- sun_pci_dma_direction = PCI_DMA_TODEVICE;
+ sun_pci_dma_pending.direction = PCI_DMA_TODEVICE;
X } else {
X dcsr |= EBUS_DCSR_WRITE;
- sun_pci_dma_direction = PCI_DMA_FROMDEVICE;
+ sun_pci_dma_pending.direction = PCI_DMA_FROMDEVICE;
X }
X writel(dcsr, &sun_pci_fd_ebus_dma->dcsr);
X }
X
X static void sun_pci_fd_set_dma_count(int length)
X {
- sun_pci_dma_len = length;
+ sun_pci_dma_pending.len = length;
X writel(length, &sun_pci_fd_ebus_dma->dbcr);
X }
X
X static void sun_pci_fd_set_dma_addr(char *buffer)
X {
- unsigned int addr;
-
- addr = sun_pci_dma_addr = pci_map_single(sun_pci_ebus_dev,
- buffer,
- sun_pci_dma_len,
- sun_pci_dma_direction);
- writel(addr, &sun_pci_fd_ebus_dma->dacr);
+ sun_pci_dma_pending.buf = buffer;
X }
X
X static unsigned int sun_pci_get_dma_residue(void)
@@ -719,7 +743,7 @@
X sun_fdops.fd_inb = sun_pci_fd_inb;
X sun_fdops.fd_outb = sun_pci_fd_outb;
X
- use_virtual_dma = 0;
+ can_use_virtual_dma = use_virtual_dma = 0;
X sun_fdops.fd_enable_dma = sun_pci_fd_enable_dma;
X sun_fdops.fd_disable_dma = sun_pci_fd_disable_dma;
X sun_fdops.fd_set_dma_mode = sun_pci_fd_set_dma_mode;
@@ -796,9 +820,9 @@
X ns87303_modify(config, ASC, ASC_DRV2_SEL, 0);
X ns87303_modify(config, FCR, 0, FCR_LDE);
X
- cfg = sun_floppy_types[0];
+ config = sun_floppy_types[0];
X sun_floppy_types[0] = sun_floppy_types[1];
- sun_floppy_types[1] = cfg;
+ sun_floppy_types[1] = config;
X
X if (sun_pci_broken_drive != -1) {
X sun_pci_broken_drive = 1 - sun_pci_broken_drive;
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/keyboard.h linux/include/asm-sparc64/keyboard.h
--- v2.4.9/linux/include/asm-sparc64/keyboard.h Mon Aug 27 12:41:48 2001
+++ linux/include/asm-sparc64/keyboard.h Tue Aug 28 07:09:44 2001
@@ -1,4 +1,4 @@
-/* $Id: keyboard.h,v 1.4 2001/08/13 14:40:07 davem Exp $
+/* $Id: keyboard.h,v 1.5 2001/08/18 09:40:46 davem Exp $
X * linux/include/asm-sparc64/keyboard.h
X *
X * Created Aug 29 1997 by Eddie C. Dost (e...@skynet.be)
@@ -25,7 +25,6 @@
X char raw_mode);
X extern char pcikbd_unexpected_up(unsigned char keycode);
X extern void pcikbd_leds(unsigned char leds);
-extern int pcikbd_rate(struct kbd_repeat *rep);
X extern void pcikbd_init_hw(void);
X extern unsigned char pcikbd_sysrq_xlate[128];
X
@@ -34,7 +33,6 @@
X #define kbd_translate pcikbd_translate
X #define kbd_unexpected_up pcikbd_unexpected_up
X #define kbd_leds pcikbd_leds
-#define kbd_rate pcikbd_rate
X #define kbd_init_hw pcikbd_init_hw
X #define kbd_sysrq_xlate pcikbd_sysrq_xlate
X #define kbd_init pcikbd_init
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/mmu_context.h linux/include/asm-sparc64/mmu_context.h
--- v2.4.9/linux/include/asm-sparc64/mmu_context.h Mon Aug 27 12:41:48 2001
+++ linux/include/asm-sparc64/mmu_context.h Tue Aug 28 07:09:44 2001
@@ -1,24 +1,11 @@
-/* $Id: mmu_context.h,v 1.50 2001/08/13 20:24:34 kanoj Exp $ */
+/* $Id: mmu_context.h,v 1.51 2001/08/17 04:55:09 kanoj Exp $ */
X #ifndef __SPARC64_MMU_CONTEXT_H
X #define __SPARC64_MMU_CONTEXT_H
X
X /* Derived heavily from Linus's Alpha/AXP ASN code... */
X
-#ifndef __ASSEMBLY__
-
-#include <linux/spinlock.h>
-#include <asm/system.h>
-#include <asm/spitfire.h>
X #include <asm/page.h>
X
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
-{
-}
-
-extern spinlock_t ctx_alloc_lock;
-extern unsigned long tlb_context_cache;
-extern unsigned long mmu_context_bmap[];
-
X /*
X * For the 8k pagesize kernel, use only 10 hw context bits to optimize some shifts in
X * the fast tlbmiss handlers, instead of all 13 bits (specifically for vpte offset
@@ -28,9 +15,25 @@
X */
X #if PAGE_SHIFT == 13
X #define CTX_VERSION_SHIFT 10
+#define TAG_CONTEXT_BITS 0x3ff
X #else
X #define CTX_VERSION_SHIFT 12
+#define TAG_CONTEXT_BITS 0xfff
X #endif
+
+#ifndef __ASSEMBLY__
+
+#include <linux/spinlock.h>
+#include <asm/system.h>
+#include <asm/spitfire.h>
+
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+{
+}
+
+extern spinlock_t ctx_alloc_lock;
+extern unsigned long tlb_context_cache;
+extern unsigned long mmu_context_bmap[];
X
X #define CTX_VERSION_MASK ((~0UL) << CTX_VERSION_SHIFT)
X #define CTX_FIRST_VERSION ((1UL << CTX_VERSION_SHIFT) + 1UL)
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/module.h linux/include/asm-sparc64/module.h
--- v2.4.9/linux/include/asm-sparc64/module.h Thu Nov 9 15:57:41 2000
+++ linux/include/asm-sparc64/module.h Thu Sep 13 16:33:03 2001
@@ -7,5 +7,6 @@
X extern void * module_map (unsigned long size);
X extern void module_unmap (void *addr);
X #define module_arch_init(x) (0)
+#define arch_init_modules(x) do { } while (0)
X
X #endif /* _ASM_SPARC64_MODULE_H */
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/pgalloc.h linux/include/asm-sparc64/pgalloc.h
--- v2.4.9/linux/include/asm-sparc64/pgalloc.h Thu Apr 26 22:17:26 2001
+++ linux/include/asm-sparc64/pgalloc.h Tue Aug 28 07:09:44 2001
@@ -1,4 +1,4 @@
-/* $Id: pgalloc.h,v 1.20 2001/04/26 02:36:36 davem Exp $ */
+/* $Id: pgalloc.h,v 1.21 2001/08/22 22:16:56 kanoj Exp $ */
X #ifndef _SPARC64_PGALLOC_H
X #define _SPARC64_PGALLOC_H
X
@@ -64,7 +64,7 @@
X #define flush_tlb_range(__mm, start, end) \
X do { if(CTX_VALID((__mm)->context)) { \
X unsigned long __start = (start)&PAGE_MASK; \
- unsigned long __end = (end)&PAGE_MASK; \
+ unsigned long __end = PAGE_ALIGN(end); \
X __flush_tlb_range(CTX_HWBITS((__mm)->context), __start, \
X SECONDARY_CONTEXT, __end, PAGE_SIZE, \
X (__end - __start)); \
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/pgtable.h linux/include/asm-sparc64/pgtable.h
--- v2.4.9/linux/include/asm-sparc64/pgtable.h Mon Aug 27 12:41:48 2001
+++ linux/include/asm-sparc64/pgtable.h Thu Sep 20 14:11:58 2001
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.141 2001/08/13 20:24:34 kanoj Exp $
+/* $Id: pgtable.h,v 1.146 2001/09/11 02:20:23 kanoj Exp $
X * pgtable.h: SpitFire page table operations.
X *
X * Copyright 1996,1997 David S. Miller (da...@caip.rutgers.edu)
@@ -17,16 +17,7 @@
X #include <asm/mmu_context.h>
X #include <asm/system.h>
X #include <asm/page.h>
-
-#ifndef __ASSEMBLY__
-
-#define PG_dcache_dirty PG_arch_1
-
-/* Certain architectures need to do special things when pte's
- * within a page table are directly modified. Thus, the following
- * hook is made available.
- */
-#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
+#include <asm/processor.h>
X
X /* XXX All of this needs to be rethought so we can take advantage
X * XXX cheetah's full 64-bit virtual address space, ie. no more hole
@@ -42,8 +33,6 @@
X * long). Finally, the higher few bits determine pgde#.
X */
X
-#define VA_BITS 44
-
X /* PMD_SHIFT determines the size of the area a second-level page table can map */
X #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3))
X #define PMD_SIZE (1UL << PMD_SHIFT)
@@ -55,6 +44,16 @@
X #define PGDIR_SIZE (1UL << PGDIR_SHIFT)
X #define PGDIR_MASK (~(PGDIR_SIZE-1))
X
+#ifndef __ASSEMBLY__
+
+#define PG_dcache_dirty PG_arch_1
+
+/* Certain architectures need to do special things when pte's
+ * within a page table are directly modified. Thus, the following
+ * hook is made available.
+ */
+#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval))
+
X /* Entries per page directory level. */
X #define PTRS_PER_PTE (1UL << (PAGE_SHIFT-3))
X
@@ -65,17 +64,21 @@
X #define PTRS_PER_PMD ((const int)((current->thread.flags & SPARC_FLAG_32BIT) ? \
X (1UL << (32 - (PAGE_SHIFT-3) - PAGE_SHIFT)) : (REAL_PTRS_PER_PMD)))
X
-/* We cannot use the top 16G because VPTE table lives there. */
-#define PTRS_PER_PGD ((1UL << (VA_BITS - PAGE_SHIFT - (PAGE_SHIFT-3) - PMD_BITS))-1)
+/*
+ * We cannot use the top address range because VPTE table lives there. This
+ * formula finds the total legal virtual space in the processor, subtracts the
+ * vpte size, then aligns it to the number of bytes mapped by one pgde, and
+ * thus calculates the number of pgdes needed.
+ */
+#define PTRS_PER_PGD (((1UL << VA_BITS) - VPTE_SIZE + (1UL << (PAGE_SHIFT + \
+ (PAGE_SHIFT-3) + PMD_BITS)) - 1) / (1UL << (PAGE_SHIFT + \
+ (PAGE_SHIFT-3) + PMD_BITS)))
X
X /* Kernel has a separate 44bit address space. */
X #define USER_PTRS_PER_PGD ((const int)((current->thread.flags & SPARC_FLAG_32BIT) ? \
X (1) : (PTRS_PER_PGD)))
X #define FIRST_USER_PGD_NR 0
X
-#define PTE_TABLE_SIZE 0x2000 /* 1024 entries 8 bytes each */
-#define PMD_TABLE_SIZE 0x2000 /* 2048 entries 4 bytes each */
-
X /* NOTE: TLB miss handlers depend heavily upon where this is. */
X #define VMALLOC_START 0x0000000140000000UL
X #define VMALLOC_VMADDR(x) ((unsigned long)(x))
@@ -115,6 +118,18 @@
X #define _PAGE_WRITE 0x0000000000000100 /* Writable SW Bit */
X #define _PAGE_PRESENT 0x0000000000000080 /* Present Page (ie. not swapped out) */
X
+#if PAGE_SHIFT == 13
+#define _PAGE_SZBITS _PAGE_SZ8K
+#elif PAGE_SHIFT == 16
+#define _PAGE_SZBITS _PAGE_SZ64K
+#elif PAGE_SHIFT == 19
+#define _PAGE_SZBITS _PAGE_SZ512K
+#elif PAGE_SHIFT == 22
+#define _PAGE_SZBITS _PAGE_SZ4M
+#else
+#error Wrong PAGE_SHIFT specified
+#endif
+
X #define _PAGE_CACHE (_PAGE_CP | _PAGE_CV)
X
X #define __DIRTY_BITS (_PAGE_MODIFIED | _PAGE_WRITE | _PAGE_W)
@@ -140,7 +155,7 @@
X
X #define _PFN_MASK _PAGE_PADDR
X
-#define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_MODIFIED | _PAGE_ACCESSED | _PAGE_PRESENT)
+#define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_MODIFIED | _PAGE_ACCESSED | _PAGE_PRESENT | _PAGE_SZBITS)
X
X #define pg_iobits (_PAGE_VALID | _PAGE_PRESENT | __DIRTY_BITS | __ACCESS_BITS | _PAGE_E)
X
@@ -164,21 +179,18 @@
X
X #ifndef __ASSEMBLY__
X
-extern pte_t __bad_page(void);
-
-#define BAD_PAGE __bad_page()
-
X extern unsigned long phys_base;
X
-#define ZERO_PAGE(vaddr) (mem_map)
+extern struct page *mem_map_zero;
+#define ZERO_PAGE(vaddr) (mem_map_zero)
X
X /* Warning: These take pointers to page structs now... */
X #define mk_pte(page, pgprot) \
- __pte((((page - mem_map) << PAGE_SHIFT)+phys_base) | pgprot_val(pgprot))
+ __pte((((page - mem_map) << PAGE_SHIFT)+phys_base) | pgprot_val(pgprot) | _PAGE_SZBITS)
X #define page_pte_prot(page, prot) mk_pte(page, prot)
X #define page_pte(page) page_pte_prot(page, __pgprot(0))
X
-#define mk_pte_phys(physpage, pgprot) (__pte((physpage) | pgprot_val(pgprot)))
+#define mk_pte_phys(physpage, pgprot) (__pte((physpage) | pgprot_val(pgprot) | _PAGE_SZBITS))
X
X extern inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot)
X {
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/processor.h linux/include/asm-sparc64/processor.h
--- v2.4.9/linux/include/asm-sparc64/processor.h Thu Apr 12 12:10:25 2001
+++ linux/include/asm-sparc64/processor.h Thu Sep 20 14:11:58 2001
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.70 2001/03/27 02:36:38 davem Exp $
+/* $Id: processor.h,v 1.75 2001/09/20 00:35:34 davem Exp $
X * include/asm-sparc64/processor.h
X *
X * Copyright (C) 1996 David S. Miller (da...@caip.rutgers.edu)
@@ -20,6 +20,7 @@
X #include <asm/ptrace.h>
X #include <asm/signal.h>
X #include <asm/segment.h>
+#include <asm/page.h>
X
X /* Bus types */
X #define EISA_bus 0
@@ -31,12 +32,14 @@
X #define wp_works_ok 1
X #define wp_works_ok__is_a_macro /* for versions in ksyms.c */
X
-/* User lives in his very own context, and cannot reference us. */
-#ifndef __ASSEMBLY__
-#define TASK_SIZE ((unsigned long)-PGDIR_SIZE)
-#else
-#define TASK_SIZE 0xfffffffc00000000
-#endif
+/*
+ * User lives in his very own context, and cannot reference us. Note
+ * that TASK_SIZE is a misnomer, it really gives maximum user virtual
+ * address that the kernel will allocate out.
+ */
+#define VA_BITS 44
+#define VPTE_SIZE (1UL << (VA_BITS - PAGE_SHIFT + 3))
+#define TASK_SIZE ((unsigned long)-VPTE_SIZE)
X
X #ifndef __ASSEMBLY__
X
@@ -85,9 +88,6 @@
X #define FAULT_CODE_ITLB 0x04 /* Miss happened in I-TLB */
X #define FAULT_CODE_WINFIXUP 0x08 /* Miss happened during spill/fill */
X
-#define INIT_MMAP { &init_mm, 0xfffff80000000000, 0xfffff80001000000, \
- NULL, PAGE_SHARED , VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
-
X #define INIT_THREAD { \
X /* ksp, wstate, cwp, flags, current_ds, */ \
X 0, 0, 0, 0, KERNEL_DS, \
@@ -105,6 +105,16 @@
X 0, 0, 0, 0, 0, \
X }
X
+#ifdef __KERNEL__
+#if PAGE_SHIFT == 13
+#define THREAD_SIZE (2*PAGE_SIZE)
+#define THREAD_SHIFT (PAGE_SHIFT + 1)
+#else /* PAGE_SHIFT == 13 */
+#define THREAD_SIZE PAGE_SIZE
+#define THREAD_SHIFT PAGE_SHIFT
+#endif /* PAGE_SHIFT == 13 */
+#endif /* __KERNEL__ */
+
X #ifndef __ASSEMBLY__
X
X /* Return saved PC of a blocked thread. */
@@ -235,7 +245,7 @@
X do { \
X /* Bogus frame pointer? */ \
X if (fp < (task_base + sizeof(struct task_struct)) || \
- fp >= (task_base + (2 * PAGE_SIZE))) \
+ fp >= (task_base + THREAD_SIZE)) \
X break; \
X rw = (struct reg_window *) fp; \
X pc = rw->ins[7]; \
@@ -253,10 +263,14 @@
X #define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP])
X
X #ifdef __KERNEL__
-#define THREAD_SIZE (2*PAGE_SIZE)
X /* Allocation and freeing of task_struct and kernel stack. */
+#if PAGE_SHIFT == 13
X #define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL, 1))
X #define free_task_struct(tsk) free_pages((unsigned long)(tsk),1)
+#else /* PAGE_SHIFT == 13 */
+#define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL, 0))
+#define free_task_struct(tsk) free_pages((unsigned long)(tsk),0)
+#endif /* PAGE_SHIFT == 13 */
X #define get_task_struct(tsk) atomic_inc(&virt_to_page(tsk)->count)
X
X #define init_task (init_task_union.task)
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/softirq.h linux/include/asm-sparc64/softirq.h
--- v2.4.9/linux/include/asm-sparc64/softirq.h Wed Jul 25 17:10:25 2001
+++ linux/include/asm-sparc64/softirq.h Sat Sep 8 12:02:32 2001
@@ -20,13 +20,6 @@
X } \
X } while (0)
X
-#define __do_cpu_raise_softirq(cpu, nr) (softirq_pending(cpu) |= (1<<nr))
-#define __cpu_raise_softirq(cpu,nr) \
-do { unsigned long flags; \
- local_irq_save(flags); \
- __do_cpu_raise_softirq(cpu, nr); \
- local_irq_restore(flags); \
-} while (0)
X #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
X
X #endif /* !(__SPARC64_SOFTIRQ_H) */
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/system.h linux/include/asm-sparc64/system.h
--- v2.4.9/linux/include/asm-sparc64/system.h Thu Apr 26 22:17:26 2001
+++ linux/include/asm-sparc64/system.h Fri Sep 7 11:01:20 2001
@@ -1,4 +1,4 @@
-/* $Id: system.h,v 1.63 2001/04/24 01:09:12 davem Exp $ */
+/* $Id: system.h,v 1.64 2001/08/30 03:22:00 kanoj Exp $ */
X #ifndef __SPARC64_SYSTEM_H
X #define __SPARC64_SYSTEM_H
X
@@ -29,8 +29,6 @@
X #define ARCH_SUN4C_SUN4 0
X #define ARCH_SUN4 0
X
-extern unsigned long empty_bad_page;
-extern unsigned long empty_zero_page;
X #endif
X
X #define setipl(__new_ipl) \
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/timex.h linux/include/asm-sparc64/timex.h
--- v2.4.9/linux/include/asm-sparc64/timex.h Wed Mar 10 16:53:38 1999
+++ linux/include/asm-sparc64/timex.h Thu Sep 20 14:11:58 2001
@@ -14,7 +14,6 @@
X
X /* Getting on the cycle counter on sparc64. */
X typedef unsigned long cycles_t;
-extern cycles_t cacheflush_time;
X #define get_cycles() \
X ({ cycles_t ret; \
X __asm__("rd %%tick, %0" : "=r" (ret)); \
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/tlb.h linux/include/asm-sparc64/tlb.h
--- v2.4.9/linux/include/asm-sparc64/tlb.h Wed Dec 31 16:00:00 1969
+++ linux/include/asm-sparc64/tlb.h Fri Sep 14 08:41:04 2001
@@ -0,0 +1 @@
+#include <asm-generic/tlb.h>
diff -u --recursive --new-file v2.4.9/linux/include/asm-sparc64/vaddrs.h linux/include/asm-sparc64/vaddrs.h
--- v2.4.9/linux/include/asm-sparc64/vaddrs.h Tue Aug 4 16:03:35 1998
+++ linux/include/asm-sparc64/vaddrs.h Wed Dec 31 16:00:00 1969
@@ -1,22 +0,0 @@
-/* $Id: vaddrs.h,v 1.10 1998/05/14 13:36:01 jj Exp $ */
-#ifndef _SPARC64_VADDRS_H
-#define _SPARC64_VADDRS_H
-
-/* asm-sparc64/vaddrs.h: Here will be define the virtual addresses at
- * which important I/O addresses will be mapped.
- * For instance the timer register virtual address
- * is defined here.
- *
- * Copyright (C) 1995,1998 David S. Miller (da...@caip.rutgers.edu)
- */
-
-/* Everything here must be in the first kernel PGD. */
-#define DVMA_VADDR 0x0000000100000000ULL /* Base area of the DVMA on suns */
-#define DVMA_LEN 0x0000000040000000ULL /* Size of the DVMA address space */
-#define DVMA_END 0x0000000140000000ULL
-#define MODULES_VADDR 0x0000000001000000ULL /* Where to map modules */
-#define MODULES_LEN 0x000000007f000000ULL
-#define MODULES_END 0x0000000080000000ULL
-
-#endif /* !(_SPARC_VADDRS_H) */
-
diff -u --recursive --new-file v2.4.9/linux/include/linux/ac97_codec.h linux/include/linux/ac97_codec.h
--- v2.4.9/linux/include/linux/ac97_codec.h Mon Aug 27 12:41:48 2001
+++ linux/include/linux/ac97_codec.h Sun Sep 23 10:33:46 2001
@@ -32,11 +32,14 @@
X #define AC97_PCM_FRONT_DAC_RATE 0x002C /* PCM Front DAC Rate */
X #define AC97_PCM_SURR_DAC_RATE 0x002E /* PCM Surround DAC Rate */
X #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_LR_ADC_RATE 0x0032 /* PCM LR DAC Rate */
X #define AC97_PCM_MIC_ADC_RATE 0x0034 /* PCM MIC ADC Rate */
X #define AC97_CENTER_LFE_MASTER 0x0036 /* Center + LFE Master Volume */
X #define AC97_SURROUND_MASTER 0x0038 /* Surround (Rear) Master Volume */
-#define AC97_RESERVED_3A 0x003A /* Reserved */
+#define AC97_RESERVED_3A 0x003A /* Reserved in AC '97 < 2.2 */
+
+/* AC'97 2.2 */
+#define AC97_SPDIF_CONTROL 0x003A /* S/PDIF Control */
X
X /* range 0x3c-0x58 - MODEM */
X #define AC97_EXTENDED_MODEM_ID 0x003C
@@ -87,6 +90,40 @@
X #define AC97_GP_ST 0x4000 /* Stereo Enhancement 1=on */
X #define AC97_GP_POP 0x8000 /* Pcm Out Path, 0=pre 3D, 1=post 3D */
X
+/* extended audio status and control bit defines */
+#define AC97_EA_VRA 0x0001 /* Variable bit rate enable bit */
+#define AC97_EA_DRA 0x0002 /* Double-rate audio enable bit */
+#define AC97_EA_SPDIF 0x0004 /* S/PDIF Enable bit */
+#define AC97_EA_VRM 0x0008 /* Variable bit rate for MIC enable bit */
+#define AC97_EA_CDAC 0x0040 /* PCM Center DAC is ready (Read only) */
+#define AC97_EA_SDAC 0x0040 /* PCM Surround DACs are ready (Read only) */
+#define AC97_EA_LDAC 0x0080 /* PCM LFE DAC is ready (Read only) */
+#define AC97_EA_MDAC 0x0100 /* MIC ADC is ready (Read only) */
+#define AC97_EA_SPCV 0x0400 /* S/PDIF configuration valid (Read only) */
+#define AC97_EA_PRI 0x0800 /* Turns the PCM Center DAC off */
+#define AC97_EA_PRJ 0x1000 /* Turns the PCM Surround DACs off */
+#define AC97_EA_PRK 0x2000 /* Turns the PCM LFE DAC off */
+#define AC97_EA_PRL 0x4000 /* Turns the MIC ADC off */
+#define AC97_EA_SLOT_MASK 0xffcf /* Mask for slot assignment bits */
+#define AC97_EA_SPSA_3_4 0x0000 /* Slot assigned to 3 & 4 */
+#define AC97_EA_SPSA_7_8 0x0010 /* Slot assigned to 7 & 8 */
+#define AC97_EA_SPSA_6_9 0x0020 /* Slot assigned to 6 & 9 */
+#define AC97_EA_SPSA_10_11 0x0030 /* Slot assigned to 10 & 11 */
+
+/* S/PDIF control bit defines */
+#define AC97_SC_PRO 0x0001 /* Professional status */
+#define AC97_SC_NAUDIO 0x0002 /* Non audio stream */
+#define AC97_SC_COPY 0x0004 /* Copyright status */
+#define AC97_SC_PRE 0x0008 /* Preemphasis status */
+#define AC97_SC_CC_MASK 0x07f0 /* Category Code mask */
+#define AC97_SC_L 0x0800 /* Generation Level status */
+#define AC97_SC_SPSR_MASK 0xcfff /* S/PDIF Sample Rate bits */
+#define AC97_SC_SPSR_44K 0x0000 /* Use 44.1kHz Sample rate */
+#define AC97_SC_SPSR_48K 0x2000 /* Use 48kHz Sample rate */
+#define AC97_SC_SPSR_32K 0x3000 /* Use 32kHz Sample rate */
+#define AC97_SC_DRS 0x4000 /* Double Rate S/PDIF */
+#define AC97_SC_V 0x8000 /* Validity status */
+
X /* powerdown control and status bit defines */
X
X /* status */
@@ -200,5 +237,8 @@
X extern int ac97_read_proc (char *page_out, char **start, off_t off,
X int count, int *eof, void *data);
X extern int ac97_probe_codec(struct ac97_codec *);
+extern unsigned int ac97_set_adc_rate(struct ac97_codec *codec, unsigned int rate);
+extern unsigned int ac97_set_dac_rate(struct ac97_codec *codec, unsigned int rate);
+
X
X #endif /* _AC97_CODEC_H_ */
diff -u --recursive --new-file v2.4.9/linux/include/linux/acpi.h linux/include/linux/acpi.h
--- v2.4.9/linux/include/linux/acpi.h Tue Jul 3 17:08:21 2001
+++ linux/include/linux/acpi.h Sun Sep 23 09:42:32 2001
@@ -28,20 +28,24 @@
X #include <linux/wait.h>
X #endif /* __KERNEL__ */
X
-typedef int acpi_sstate_t;
-
X /*
X * Device states
X */
-enum
-{
+typedef enum {
X ACPI_D0, /* fully-on */
X ACPI_D1, /* partial-on */
X ACPI_D2, /* partial-on */
X ACPI_D3, /* fully-off */
-};
+} acpi_dstate_t;
X
-typedef int acpi_dstate_t;
+typedef enum {
+ ACPI_S0, /* working state */
+ ACPI_S1, /* power-on suspend */
+ ACPI_S2, /* suspend to ram, with devices */
+ ACPI_S3, /* suspend to ram */
+ ACPI_S4, /* suspend to disk */
+ ACPI_S5, /* soft-off */
+} acpi_sstate_t;
X
X /* RSDP location */
X #define ACPI_BIOS_ROM_BASE (0x0e0000)
@@ -159,5 +163,18 @@
X };
X
X #define ACPI_SLP_TYP_DISABLED (~0UL)
+
+#ifdef __KERNEL__
+
+/* routines for saving/restoring kernel state */
+FASTCALL(extern unsigned long acpi_save_state_mem(unsigned long return_point));
+FASTCALL(extern int acpi_save_state_disk(unsigned long return_point));
+extern void acpi_restore_state(void);
+
+extern unsigned long acpi_wakeup_address;
+
+#endif /* __KERNEL__ */
+
+int acpi_init(void);
X
X #endif /* _LINUX_ACPI_H */
diff -u --recursive --new-file v2.4.9/linux/include/linux/agp_backend.h linux/include/linux/agp_backend.h
--- v2.4.9/linux/include/linux/agp_backend.h Tue Jul 3 17:08:21 2001
+++ linux/include/linux/agp_backend.h Sun Sep 23 09:52:38 2001
@@ -58,6 +58,8 @@
X SIS_GENERIC,
X AMD_GENERIC,
X AMD_IRONGATE,
+ AMD_761,
+ AMD_762,
X ALI_M1541,
X ALI_M1621,
X ALI_M1631,
@@ -85,6 +87,8 @@
X size_t aper_size;
X int max_memory; /* In pages */
X int current_memory;
+ int cant_use_aperture;
+ unsigned long page_mask;
X } agp_kern_info;
X
X /*
diff -u --recursive --new-file v2.4.9/linux/include/linux/amigaffs.h linux/include/linux/amigaffs.h
--- v2.4.9/linux/include/linux/amigaffs.h Wed Jul 25 17:10:26 2001
+++ linux/include/linux/amigaffs.h Tue Sep 11 08:20:30 2001
@@ -121,13 +121,6 @@
X up(&AFFS_INODE->i_ext_lock);
X }
X
-
-#define MIN(a, b) ({ \
- typeof(a) _a = (a); \
- typeof(b) _b = (b); \
- _a < _b ? _a : _b; \
-})
-
X #ifdef __LITTLE_ENDIAN
X #define BO_EXBITS 0x18UL
X #elif defined(__BIG_ENDIAN)
diff -u --recursive --new-file v2.4.9/linux/include/linux/blkdev.h linux/include/linux/blkdev.h
--- v2.4.9/linux/include/linux/blkdev.h Sun Aug 12 13:28:01 2001
+++ linux/include/linux/blkdev.h Sun Sep 23 10:32:57 2001
@@ -149,8 +149,7 @@
X extern void grok_partitions(struct gendisk *dev, int drive, unsigned minors, long size);
X extern void register_disk(struct gendisk *dev, kdev_t first, unsigned minors, struct block_device_operations *ops, long size);
X extern void generic_make_request(int rw, struct buffer_head * bh);
-extern request_queue_t *blk_get_queue(kdev_t dev);
-extern inline request_queue_t *__blk_get_queue(kdev_t dev);
+extern inline request_queue_t *blk_get_queue(kdev_t dev);
X extern void blkdev_release_request(struct request *);
X
X /*
@@ -203,5 +202,16 @@
X
X #define blk_finished_io(nsects) do { } while (0)
X #define blk_started_io(nsects) do { } while (0)
+
+static inline int buffered_blk_size(kdev_t dev)
+{
+ int ret = INT_MAX;
+ int major = MAJOR(dev);
+
+ if (blk_size[major])
+ ret = blk_size[major][MINOR(dev)] + ((BUFFERED_BLOCKSIZE-1) >> BLOCK_SIZE_BITS);
+
+ return ret;
+}
X
X #endif
diff -u --recursive --new-file v2.4.9/linux/include/linux/brlock.h linux/include/linux/brlock.h
--- v2.4.9/linux/include/linux/brlock.h Tue Aug 7 12:48:42 2001
+++ linux/include/linux/brlock.h Sun Sep 23 10:31:05 2001
@@ -45,7 +45,7 @@
X #include <linux/cache.h>
X #include <linux/spinlock.h>
X
-#if defined(__i386__) || defined(__ia64__)
+#if defined(__i386__) || defined(__ia64__) || defined(__x86_64__)
X #define __BRLOCK_USE_ATOMICS
X #else
X #undef __BRLOCK_USE_ATOMICS
diff -u --recursive --new-file v2.4.9/linux/include/linux/cache.h linux/include/linux/cache.h
--- v2.4.9/linux/include/linux/cache.h Tue Aug 7 12:48:42 2001
+++ linux/include/linux/cache.h Sun Sep 23 10:31:01 2001
@@ -1,6 +1,7 @@
X #ifndef __LINUX_CACHE_H
X #define __LINUX_CACHE_H
X
+#include <linux/config.h>
X #include <asm/cache.h>
X
X #ifndef L1_CACHE_ALIGN
@@ -13,6 +14,14 @@
X
X #ifndef ____cacheline_aligned
X #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
+#endif
+
+#ifndef ____cacheline_aligned_in_smp
+#ifdef CONFIG_SMP
+#define ____cacheline_aligned_in_smp ____cacheline_aligned
+#else
+#define ____cacheline_aligned_in_smp
+#endif /* CONFIG_SMP */
X #endif
X
X #ifndef __cacheline_aligned
diff -u --recursive --new-file v2.4.9/linux/include/linux/compiler.h linux/include/linux/compiler.h
--- v2.4.9/linux/include/linux/compiler.h Wed Dec 31 16:00:00 1969
+++ linux/include/linux/compiler.h Tue Sep 18 14:12:45 2001
@@ -0,0 +1,16 @@
+#ifndef __LINUX_COMPILER_H
+#define __LINUX_COMPILER_H
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
+ a mechanism by which the user can annotate likely branch directions and
+ expect the blocks to be reordered appropriately. Define __builtin_expect
+ to nothing for earlier compilers. */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#define likely(x) __builtin_expect((x),1)
+#define unlikely(x) __builtin_expect((x),0)
+
+#endif /* __LINUX_COMPILER_H */
diff -u --recursive --new-file v2.4.9/linux/include/linux/console.h linux/include/linux/console.h
--- v2.4.9/linux/include/linux/console.h Tue Aug 7 12:48:43 2001
+++ linux/include/linux/console.h Sun Sep 23 10:31:02 2001
@@ -91,8 +91,6 @@
X #define CON_CONSDEV (2) /* Last on the command line */
X #define CON_ENABLED (4)
X
-extern spinlock_t console_lock;
-
X struct console
X {
X char name[8];
@@ -111,6 +109,9 @@
X extern void register_console(struct console *);
X extern int unregister_console(struct console *);
X extern struct console *console_drivers;
+extern void acquire_console_sem(void);
+extern void release_console_sem(void);
+extern void console_conditional_schedule(void);
X
X /* VESA Blanking Levels */
X #define VESA_NO_BLANKING 0
diff -u --recursive --new-file v2.4.9/linux/include/linux/devfs_fs.h linux/include/linux/devfs_fs.h
--- v2.4.9/linux/include/linux/devfs_fs.h Wed Feb 16 15:42:06 2000
+++ linux/include/linux/devfs_fs.h Fri Sep 21 10:55:23 2001
@@ -20,6 +20,7 @@
X #define DEVFSD_NOTIFY_LOOKUP 4
X #define DEVFSD_NOTIFY_CHANGE 5
X #define DEVFSD_NOTIFY_CREATE 6
+#define DEVFSD_NOTIFY_DELETE 7
X
X #define DEVFS_PATHLEN 1024 /* Never change this otherwise the
X binary interface will change */
diff -u --recursive --new-file v2.4.9/linux/include/linux/devfs_fs_kernel.h linux/include/linux/devfs_fs_kernel.h
--- v2.4.9/linux/include/linux/devfs_fs_kernel.h Tue Aug 7 12:50:15 2001
+++ linux/include/linux/devfs_fs_kernel.h Sun Sep 23 10:32:28 2001
@@ -30,17 +30,15 @@
X is closed, ownership reverts back to
X <<uid>> and <<gid>> and the protection
X is set to read-write for all */
-#define DEVFS_FL_SHOW_UNREG 0x002 /* Show unregistered entries in
- directory listings */
-#define DEVFS_FL_HIDE 0x004 /* Do not show entry in directory list */
-#define DEVFS_FL_AUTO_DEVNUM 0x008 /* Automatically generate device number
+#define DEVFS_FL_HIDE 0x002 /* Do not show entry in directory list */
+#define DEVFS_FL_AUTO_DEVNUM 0x004 /* Automatically generate device number
X */
-#define DEVFS_FL_AOPEN_NOTIFY 0x010 /* Asynchronously notify devfsd on open
+#define DEVFS_FL_AOPEN_NOTIFY 0x008 /* Asynchronously notify devfsd on open
X */
-#define DEVFS_FL_REMOVABLE 0x020 /* This is a removable media device */
-#define DEVFS_FL_WAIT 0x040 /* Wait for devfsd to finish */
-#define DEVFS_FL_NO_PERSISTENCE 0x080 /* Forget changes after unregister */
-#define DEVFS_FL_CURRENT_OWNER 0x100 /* Set initial ownership to current */
+#define DEVFS_FL_REMOVABLE 0x010 /* This is a removable media device */
+#define DEVFS_FL_WAIT 0x020 /* Wait for devfsd to finish */
+#define DEVFS_FL_NO_PERSISTENCE 0x040 /* Forget changes after unregister */
+#define DEVFS_FL_CURRENT_OWNER 0x080 /* Set initial ownership to current */
X #define DEVFS_FL_DEFAULT DEVFS_FL_NONE
X
X
diff -u --recursive --new-file v2.4.9/linux/include/linux/dp83840.h linux/include/linux/dp83840.h
--- v2.4.9/linux/include/linux/dp83840.h Wed Dec 31 16:00:00 1969
+++ linux/include/linux/dp83840.h Thu Sep 13 16:15:56 2001
@@ -0,0 +1,41 @@
+/*
+ * linux/dp83840.h: definitions for DP83840 MII-compatible transceivers
+ *
+ * Copyright (C) 1996, 1999 David S. Miller (da...@redhat.com)
+ */
+#ifndef __LINUX_DP83840_H
+#define __LINUX_DP83840_H
+
+#include <linux/mii.h>
+
+/*
+ * Data sheets and programming docs for the DP83840 are available at
+ * from http://www.national.com/
+ *
+ * The DP83840 is capable of both 10 and 100Mbps ethernet, in both
+ * half and full duplex mode. It also supports auto negotiation.
+ *
+ * But.... THIS THING IS A PAIN IN THE ASS TO PROGRAM!
+ * Debugging eeprom burnt code is more fun than programming this chip!
+ */
+
+/* First, the MII register numbers (actually DP83840 register numbers). */
+#define MII_CSCONFIG 0x17 /* CS configuration */
+
+/* The Carrier Sense config register. */
+#define CSCONFIG_RESV1 0x0001 /* Unused... */
+#define CSCONFIG_LED4 0x0002 /* Pin for full-dplx LED4 */
+#define CSCONFIG_LED1 0x0004 /* Pin for conn-status LED1 */
+#define CSCONFIG_RESV2 0x0008 /* Unused... */
+#define CSCONFIG_TCVDISAB 0x0010 /* Turns off the transceiver */
+#define CSCONFIG_DFBYPASS 0x0020 /* Bypass disconnect function */
+#define CSCONFIG_GLFORCE 0x0040 /* Good link force for 100mbps */
+#define CSCONFIG_CLKTRISTATE 0x0080 /* Tristate 25m clock */
+#define CSCONFIG_RESV3 0x0700 /* Unused... */
+#define CSCONFIG_ENCODE 0x0800 /* 1=MLT-3, 0=binary */
+#define CSCONFIG_RENABLE 0x1000 /* Repeater mode enable */
+#define CSCONFIG_TCDISABLE 0x2000 /* Disable timeout counter */
+#define CSCONFIG_RESV4 0x4000 /* Unused... */
+#define CSCONFIG_NDISABLE 0x8000 /* Disable NRZI */
+
+#endif /* __LINUX_DP83840_H */
diff -u --recursive --new-file v2.4.9/linux/include/linux/eeprom.h linux/include/linux/eeprom.h
--- v2.4.9/linux/include/linux/eeprom.h Wed Dec 31 16:00:00 1969
+++ linux/include/linux/eeprom.h Thu Sep 20 14:20:14 2001
@@ -0,0 +1,136 @@
+/* credit winbond-840.c
+ */
+#include <asm/io.h>
+struct eeprom_ops {
+ void (*set_cs)(void *ee);
+ void (*clear_cs)(void *ee);
+};
+
+#define EEPOL_EEDI 0x01
+#define EEPOL_EEDO 0x02
+#define EEPOL_EECLK 0x04
+#define EEPOL_EESEL 0x08
+
+struct eeprom {
+ void *dev;
+ struct eeprom_ops *ops;
+
+ long addr;
+
+ unsigned ee_addr_bits;
+
+ unsigned eesel;
+ unsigned eeclk;
+ unsigned eedo;
+ unsigned eedi;
+ unsigned polarity;
+ unsigned ee_state;
+
+ spinlock_t *lock;
+ u32 *cache;
+};
+
+
+u8 eeprom_readb(struct eeprom *ee, unsigned address);
+void eeprom_read(struct eeprom *ee, unsigned address, u8 *bytes,
+ unsigned count);
+void eeprom_writeb(struct eeprom *ee, unsigned address, u8 data);
+void eeprom_write(struct eeprom *ee, unsigned address, u8 *bytes,
+ unsigned count);
+
+/* The EEPROM commands include the alway-set leading bit. */
+enum EEPROM_Cmds {
+ EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6),
+};
+
+void setup_ee_mem_bitbanger(struct eeprom *ee, long memaddr, int eesel_bit, int eeclk_bit, int eedo_bit, int eedi_bit, unsigned polarity)
+{
+ ee->addr = memaddr;
+ ee->eesel = 1 << eesel_bit;
+ ee->eeclk = 1 << eeclk_bit;
+ ee->eedo = 1 << eedo_bit;
+ ee->eedi = 1 << eedi_bit;
+
+ ee->polarity = polarity;
+
+ *ee->cache = readl(ee->addr);
+}
+
+/* foo. put this in a .c file */
+static inline void eeprom_update(struct eeprom *ee, u32 mask, int pol)
+{
+ long flags;
+ u32 data;
+
+ spin_lock_irqsave(ee->lock, flags);
+ data = *ee->cache;
+
+ data &= ~mask;
+ if (pol)
+ data |= mask;
+
+ *ee->cache = data;
+//printk("update: %08x\n", data);
+ writel(data, ee->addr);
+ spin_unlock_irqrestore(ee->lock, flags);
+}
+
+void eeprom_clk_lo(struct eeprom *ee)
+{
+ int pol = !!(ee->polarity & EEPOL_EECLK);
+
+ eeprom_update(ee, ee->eeclk, pol);
+ udelay(2);
+}
+
+void eeprom_clk_hi(struct eeprom *ee)
+{
+ int pol = !!(ee->polarity & EEPOL_EECLK);
+
+ eeprom_update(ee, ee->eeclk, !pol);
+ udelay(2);
+}
+
+void eeprom_send_addr(struct eeprom *ee, unsigned address)
+{
+ int pol = !!(ee->polarity & EEPOL_EEDI);
+ unsigned i;
+ address |= 6 << 6;
+
+ /* Shift the read command bits out. */
+ for (i=0; i<11; i++) {
+ eeprom_update(ee, ee->eedi, ((address >> 10) & 1) ^ pol);
+ address <<= 1;
+ eeprom_clk_hi(ee);
+ eeprom_clk_lo(ee);
+ }
+ eeprom_update(ee, ee->eedi, pol);
+}
+
+u16 eeprom_readw(struct eeprom *ee, unsigned address)
+{
+ unsigned i;
+ u16 res = 0;
+
+ eeprom_clk_lo(ee);
+ eeprom_update(ee, ee->eesel, 1 ^ !!(ee->polarity & EEPOL_EESEL));
+ eeprom_send_addr(ee, address);
+
+ for (i=0; i<16; i++) {
+ u32 data;
+ eeprom_clk_hi(ee);
+ res <<= 1;
+ data = readl(ee->addr);
+//printk("eeprom_readw: %08x\n", data);
+ res |= !!(data & ee->eedo) ^ !!(ee->polarity & EEPOL_EEDO);
+ eeprom_clk_lo(ee);
+ }
+ eeprom_update(ee, ee->eesel, 0 ^ !!(ee->polarity & EEPOL_EESEL));
+
+ return res;
+}
+
+
+void eeprom_writeb(struct eeprom *ee, unsigned address, u8 data)
+{
+}
diff -u --recursive --new-file v2.4.9/linux/include/linux/elf.h linux/include/linux/elf.h
--- v2.4.9/linux/include/linux/elf.h Tue Aug 7 12:51:51 2001
+++ linux/include/linux/elf.h Sun Sep 23 10:33:41 2001
@@ -16,8 +16,10 @@
X typedef __u16 Elf64_Half;
X typedef __s16 Elf64_SHalf;
X typedef __u64 Elf64_Off;
-typedef __s64 Elf64_Sword;
-typedef __u64 Elf64_Word;
+typedef __s32 Elf64_Sword;
+typedef __u32 Elf64_Word;
+typedef __u64 Elf64_Xword;
+typedef __s64 Elf64_Sxword;
X
X /* These constants are for the segment types stored in the image headers */
X #define PT_NULL 0
@@ -65,6 +67,7 @@
X #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
X
X #define EM_PPC 20 /* PowerPC */
+#define EM_PPC64 21 /* PowerPC64 */
X
X #define EM_SH 42 /* SuperH */
X
@@ -180,10 +183,10 @@
X } Elf32_Dyn;
X
X typedef struct {
- Elf64_Word d_tag; /* entry tag value */
+ Elf64_Sxword d_tag; /* entry tag value */
X union {
- Elf64_Word d_val;
- Elf64_Word d_ptr;
+ Elf64_Xword d_val;
+ Elf64_Addr d_ptr;
X } d_un;
X } Elf64_Dyn;
X
@@ -229,7 +232,7 @@
X #define R_MIPS_GOT_PAGE 20
X #define R_MIPS_GOT_OFST 21
X /*
- * The following two relocation types are specified in the the MIPS ABI
+ * The following two relocation types are specified in the MIPS ABI
X * conformance guide version 1.2 but not yet in the psABI.
X */
X #define R_MIPS_GOTHI16 22
@@ -241,7 +244,7 @@
X #define R_MIPS_HIGHER 28
X #define R_MIPS_HIGHEST 29
X /*
- * The following two relocation types are specified in the the MIPS ABI
+ * The following two relocation types are specified in the MIPS ABI
X * conformance guide version 1.2 but not yet in the psABI.
X */
X #define R_MIPS_CALLHI16 30
@@ -374,7 +377,7 @@
X
X typedef struct elf64_rel {
X Elf64_Addr r_offset; /* Location at which to apply the action */
- Elf64_Word r_info; /* index and type of relocation */
+ Elf64_Xword r_info; /* index and type of relocation */
X } Elf64_Rel;
X
X typedef struct elf32_rela{
@@ -385,8 +388,8 @@
X
X typedef struct elf64_rela {
X Elf64_Addr r_offset; /* Location at which to apply the action */
- Elf64_Word r_info; /* index and type of relocation */
- Elf64_Word r_addend; /* Constant addend used to compute value */
+ Elf64_Xword r_info; /* index and type of relocation */
+ Elf64_Sxword r_addend; /* Constant addend used to compute value */
X } Elf64_Rela;
X
X typedef struct elf32_sym{
@@ -399,12 +402,12 @@
X } Elf32_Sym;
X
X typedef struct elf64_sym {
- Elf32_Word st_name; /* Symbol name, index in string tbl (yes, Elf32) */
+ Elf64_Word st_name; /* Symbol name, index in string tbl */
X unsigned char st_info; /* Type and binding attributes */
X unsigned char st_other; /* No defined meaning, 0 */
X Elf64_Half st_shndx; /* Associated section index */
X Elf64_Addr st_value; /* Value of the symbol */
- Elf64_Word st_size; /* Associated symbol size */
+ Elf64_Xword st_size; /* Associated symbol size */
X } Elf64_Sym;
X
X
@@ -429,19 +432,19 @@
X
X typedef struct elf64_hdr {
X unsigned char e_ident[16]; /* ELF "magic number" */
- Elf64_SHalf e_type;
+ Elf64_Half e_type;
X Elf64_Half e_machine;
- __s32 e_version;
+ Elf64_Word e_version;
X Elf64_Addr e_entry; /* Entry point virtual address */
X Elf64_Off e_phoff; /* Program header table file offset */
X Elf64_Off e_shoff; /* Section header table file offset */
- __s32 e_flags;
- Elf64_SHalf e_ehsize;
- Elf64_SHalf e_phentsize;
- Elf64_SHalf e_phnum;
- Elf64_SHalf e_shentsize;
- Elf64_SHalf e_shnum;
- Elf64_SHalf e_shstrndx;
+ Elf64_Word e_flags;
+ Elf64_Half e_ehsize;
+ Elf64_Half e_phentsize;
+ Elf64_Half e_phnum;
+ Elf64_Half e_shentsize;
+ Elf64_Half e_shnum;
+ Elf64_Half e_shstrndx;
X } Elf64_Ehdr;
X
X /* These constants define the permissions on sections in the program
@@ -462,14 +465,14 @@
X } Elf32_Phdr;
X
X typedef struct elf64_phdr {
- __s32 p_type;
- __s32 p_flags;
+ Elf64_Word p_type;
+ Elf64_Word p_flags;
X Elf64_Off p_offset; /* Segment file offset */
X Elf64_Addr p_vaddr; /* Segment virtual address */
X Elf64_Addr p_paddr; /* Segment physical address */
- Elf64_Word p_filesz; /* Segment size in file */
- Elf64_Word p_memsz; /* Segment size in memory */
- Elf64_Word p_align; /* Segment alignment, file & memory */
+ Elf64_Xword p_filesz; /* Segment size in file */
+ Elf64_Xword p_memsz; /* Segment size in memory */
+ Elf64_Xword p_align; /* Segment alignment, file & memory */
X } Elf64_Phdr;
X
X /* sh_type */
@@ -526,16 +529,16 @@
X } Elf32_Shdr;
X
X typedef struct elf64_shdr {
- Elf32_Word sh_name; /* Section name, index in string tbl (yes Elf32) */
- Elf32_Word sh_type; /* Type of section (yes Elf32) */
- Elf64_Word sh_flags; /* Miscellaneous section attributes */
+ Elf64_Word sh_name; /* Section name, index in string tbl */
+ Elf64_Word sh_type; /* Type of section */
+ Elf64_Xword sh_flags; /* Miscellaneous section attributes */
X Elf64_Addr sh_addr; /* Section virtual addr at execution */
X Elf64_Off sh_offset; /* Section file offset */
- Elf64_Word sh_size; /* Size of section in bytes */
- Elf32_Word sh_link; /* Index of another section (yes Elf32) */
- Elf32_Word sh_info; /* Additional section information (yes Elf32) */
- Elf64_Word sh_addralign; /* Section alignment */
- Elf64_Word sh_entsize; /* Entry size if section holds table */
+ Elf64_Xword sh_size; /* Size of section in bytes */
+ Elf64_Word sh_link; /* Index of another section */
+ Elf64_Word sh_info; /* Additional section information */
+ Elf64_Xword sh_addralign; /* Section alignment */
+ Elf64_Xword sh_entsize; /* Entry size if section holds table */
X } Elf64_Shdr;
X
X #define EI_MAG0 0 /* e_ident[] indexes */
@@ -582,15 +585,10 @@
X } Elf32_Nhdr;
X
X /* Note header in a PT_NOTE section */
-/*
- * For now we use the 32 bit version of the structure until we figure
- * out whether we need anything better. Note - on the Alpha, "unsigned int"
- * is only 32 bits.
- */
X typedef struct elf64_note {
- Elf32_Word n_namesz; /* Name size */
- Elf32_Word n_descsz; /* Content size */
- Elf32_Word n_type; /* Content type */
+ Elf64_Word n_namesz; /* Name size */
+ Elf64_Word n_descsz; /* Content size */
+ Elf64_Word n_type; /* Content type */
X } Elf64_Nhdr;
X
X #if ELF_CLASS == ELFCLASS32
diff -u --recursive --new-file v2.4.9/linux/include/linux/ext2_fs_i.h linux/include/linux/ext2_fs_i.h
--- v2.4.9/linux/include/linux/ext2_fs_i.h Wed Jul 25 17:10:26 2001
+++ linux/include/linux/ext2_fs_i.h Mon Sep 17 13:16:30 2001
@@ -34,6 +34,7 @@
X __u32 i_next_alloc_goal;
X __u32 i_prealloc_block;
X __u32 i_prealloc_count;
+ __u32 i_dir_start_lookup;
X int i_new_inode:1; /* Is a freshly allocated inode */
X };
X
diff -u --recursive --new-file v2.4.9/linux/include/linux/fcntl.h linux/include/linux/fcntl.h
--- v2.4.9/linux/include/linux/fcntl.h Fri Sep 22 14:21:22 2000
+++ linux/include/linux/fcntl.h Sun Sep 23 09:48:01 2001
@@ -23,4 +23,28 @@
X #define DN_ATTRIB 0x00000020 /* File changed attibutes */
X #define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
X
+#ifdef __KERNEL__
+
+#if BITS_PER_LONG == 32
+#define IS_GETLK32(cmd) ((cmd) == F_GETLK)
+#define IS_SETLK32(cmd) ((cmd) == F_SETLK)
+#define IS_SETLKW32(cmd) ((cmd) == F_SETLKW)
+#define IS_GETLK64(cmd) ((cmd) == F_GETLK64)
+#define IS_SETLK64(cmd) ((cmd) == F_SETLK64)
+#define IS_SETLKW64(cmd) ((cmd) == F_SETLKW64)
+#else
+#define IS_GETLK32(cmd) (0)
+#define IS_SETLK32(cmd) (0)
+#define IS_SETLKW32(cmd) (0)
+#define IS_GETLK64(cmd) ((cmd) == F_GETLK)
+#define IS_SETLK64(cmd) ((cmd) == F_SETLK)
+#define IS_SETLKW64(cmd) ((cmd) == F_SETLKW)
+#endif /* BITS_PER_LONG == 32 */
+
+#define IS_GETLK(cmd) (IS_GETLK32(cmd) || IS_GETLK64(cmd))
+#define IS_SETLK(cmd) (IS_SETLK32(cmd) || IS_SETLK64(cmd))
+#define IS_SETLKW(cmd) (IS_SETLKW32(cmd) || IS_SETLKW64(cmd))
+
+#endif /* __KERNEL__ */
+
X #endif
diff -u --recursive --new-file v2.4.9/linux/include/linux/fs.h linux/include/linux/fs.h
--- v2.4.9/linux/include/linux/fs.h Mon Aug 27 12:41:48 2001
+++ linux/include/linux/fs.h Sun Sep 23 10:31:02 2001
@@ -46,6 +46,10 @@
X #define BLOCK_SIZE_BITS 10
X #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
X
+/* buffer header fixed size for the blkdev I/O through pagecache */
+#define BUFFERED_BLOCKSIZE_BITS 10
+#define BUFFERED_BLOCKSIZE (1 << BUFFERED_BLOCKSIZE_BITS)
+
X /* And dynamically-tunable limits and defaults: */
X struct files_stat_struct {
X int nr_files; /* read only */
@@ -89,12 +93,7 @@
X #define FS_NO_PRELIM 4 /* prevent preloading of dentries, even if
X * FS_NO_DCACHE is not set.
X */
-#define FS_SINGLE 8 /*
- * Filesystem that can have only one superblock;
- * kernel-wide vfsmnt is placed in ->kern_mnt by
- * kern_mount() which must be called _after_
- * register_filesystem().
- */
+#define FS_SINGLE 8 /* Filesystem that can have only one superblock */
X #define FS_NOMOUNT 16 /* Never mount from userland */
X #define FS_LITTER 32 /* Keeps the tree in dcache */
X #define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon
@@ -113,12 +112,13 @@
X #define MS_NOATIME 1024 /* Do not update access times. */
X #define MS_NODIRATIME 2048 /* Do not update directory access times */
X #define MS_BIND 4096
+#define MS_NOUSER (1<<31)
X
X /*
- * Flags that can be altered by MS_REMOUNT
+ * Superblock flags that can be altered by MS_REMOUNT
X */
-#define MS_RMT_MASK (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|\
- MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOATIME|MS_NODIRATIME)
+#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOATIME|\
+ MS_NODIRATIME)
X
X /*
X * Old magic mount flag and mask
@@ -134,6 +134,7 @@
X #define S_APPEND 8 /* Append-only file */
X #define S_IMMUTABLE 16 /* Immutable file */
X #define S_DEAD 32 /* removed, but still open directory */
+#define S_NOQUOTA 64 /* Inode is not counted to quota */
X
X /*
X * Note that nosuid etc flags are inode-specific: setting some file-system
@@ -151,13 +152,11 @@
X #define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg))
X
X #define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY)
-#define IS_NOSUID(inode) __IS_FLG(inode, MS_NOSUID)
-#define IS_NODEV(inode) __IS_FLG(inode, MS_NODEV)
-#define IS_NOEXEC(inode) __IS_FLG(inode, MS_NOEXEC)
X #define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || ((inode)->i_flags & S_SYNC))
X #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
X
X #define IS_QUOTAINIT(inode) ((inode)->i_flags & S_QUOTA)
+#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
X #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
X #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE)
X #define IS_NOATIME(inode) (__IS_FLG(inode, MS_NOATIME) || ((inode)->i_flags & S_NOATIME))
@@ -171,7 +170,7 @@
X #define BLKROSET _IO(0x12,93) /* set device read-only (0 = read-write) */
X #define BLKROGET _IO(0x12,94) /* get read-only status (0 = read_write) */
X #define BLKRRPART _IO(0x12,95) /* re-read partition table */
-#define BLKGETSIZE _IO(0x12,96) /* return device size */
+#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */
X #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
X #define BLKRASET _IO(0x12,98) /* Set read ahead for block device */
X #define BLKRAGET _IO(0x12,99) /* get current read ahead setting */
@@ -187,7 +186,10 @@
X /* This was here just to show that the number is taken -
X probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */
X #endif
-
+/* A jump here: 108-111 have been used for various private purposes. */
+#define BLKBSZGET _IOR(0x12,112,sizeof(int))
+#define BLKBSZSET _IOW(0x12,113,sizeof(int))
+#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in bytes (u64 *arg) */
X
X #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
X #define FIBMAP _IO(0x00,1) /* bmap access */
@@ -213,7 +215,8 @@
X BH_Req, /* 0 if the buffer has been invalidated */
X BH_Mapped, /* 1 if the buffer has a disk mapping */
X BH_New, /* 1 if the buffer is new and not yet written out */
- BH_Protected, /* 1 if the buffer is protected */
+ BH_Async, /* 1 if the buffer is under end_buffer_io_async I/O */
+ BH_Wait_IO, /* 1 if we should throttle on this buffer */
X
X BH_PrivateStart,/* not a state bit, but the first bit available
X * for private allocation by other entities
@@ -273,7 +276,7 @@
X #define buffer_req(bh) __buffer_state(bh,Req)
X #define buffer_mapped(bh) __buffer_state(bh,Mapped)
X #define buffer_new(bh) __buffer_state(bh,New)
-#define buffer_protected(bh) __buffer_state(bh,Protected)
+#define buffer_async(bh) __buffer_state(bh,Async)
X
X #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK)
X
@@ -308,6 +311,8 @@
X #include <linux/ncp_fs_i.h>
X #include <linux/proc_fs_i.h>
X #include <linux/usbdev_fs_i.h>
+#include <linux/jffs2_fs_i.h>
+#include <linux/cramfs_fs_sb.h>
X
X /*
X * Attribute flags. These should be or-ed together to figure out what
@@ -366,6 +371,7 @@
X */
X struct page;
X struct address_space;
+struct kiobuf;
X
X struct address_space_operations {
X int (*writepage)(struct page *);
@@ -375,6 +381,8 @@
X int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
X /* Unfortunately this kludge is needed for FIBMAP. Don't use it */
X int (*bmap)(struct address_space *, long);
+#define KERNEL_HAS_O_DIRECT /* this is for modules out of the kernel */
+ int (*direct_IO)(int, struct inode *, struct kiobuf *, unsigned long, int);
X };
X
X struct address_space {
@@ -401,11 +409,12 @@
X struct block_device {
X struct list_head bd_hash;
X atomic_t bd_count;
-/* struct address_space bd_data; */
+ struct inode * bd_inode;
X dev_t bd_dev; /* not a kdev_t - it's a search key */
- atomic_t bd_openers;
+ int bd_openers;
X const struct block_device_operations *bd_op;
X struct semaphore bd_sem; /* open/close mutex */
+ struct list_head bd_inodes;
X };
X
X struct inode {
@@ -414,6 +423,7 @@
X struct list_head i_dentry;
X
X struct list_head i_dirty_buffers;
+ struct list_head i_dirty_data_buffers;
X
X unsigned long i_ino;
X atomic_t i_count;
@@ -438,9 +448,10 @@
X wait_queue_head_t i_wait;
X struct file_lock *i_flock;
X struct address_space *i_mapping;
- struct address_space i_data;
+ struct address_space i_data;
X struct dquot *i_dquot[MAXQUOTAS];
X /* These three should probably be a union */
+ struct list_head i_devices;
X struct pipe_inode_info *i_pipe;
X struct block_device *i_bdev;
X struct char_device *i_cdev;
@@ -483,6 +494,7 @@
X struct proc_inode_info proc_i;
X struct socket socket_i;
X struct usbdev_inode_info usbdev_i;
+ struct jffs2_inode_info jffs2_i;
X void *generic_ip;
X } u;
X };
@@ -511,6 +523,10 @@
X
X /* needed for tty driver, and maybe others */
X void *private_data;
+
+ /* preallocated helper kiobuf to speedup O_DIRECT */
+ struct kiobuf *f_iobuf;
+ long f_iobuf_lock;
X };
X extern spinlock_t files_lock;
X #define file_list_lock() spin_lock(&files_lock);
@@ -660,11 +676,13 @@
X #include <linux/ncp_fs_sb.h>
X #include <linux/usbdev_fs_sb.h>
X #include <linux/cramfs_fs_sb.h>
+#include <linux/jffs2_fs_sb.h>
X
X extern struct list_head super_blocks;
X extern spinlock_t sb_lock;
X
X #define sb_entry(list) list_entry((list), struct super_block, s_list)
+#define S_BIAS (1<<30)
X struct super_block {
X struct list_head s_list; /* Keep this first */
X kdev_t s_dev;
@@ -688,6 +706,7 @@
X struct list_head s_files;
X
X struct block_device *s_bdev;
+ struct list_head s_instances;
X struct quota_mount_options s_dquot; /* Diskquota specific options */
X
X union {
@@ -713,6 +732,7 @@
X struct udf_sb_info udf_sb;
X struct ncp_sb_info ncpfs_sb;
X struct usbdev_sb_info usbdevfs_sb;
+ struct jffs2_sb_info jffs2_sb;
X struct cramfs_sb_info cramfs_sb;
X void *generic_sbp;
X } u;
@@ -913,8 +933,8 @@
X int fs_flags;
X struct super_block *(*read_super) (struct super_block *, void *, int);
X struct module *owner;
- struct vfsmount *kern_mnt; /* For kernel mount, if it's FS_SINGLE fs */
X struct file_system_type * next;
+ struct list_head fs_supers;
X };
X
X #define DECLARE_FSTYPE(var,type,read,flags) \
@@ -1026,11 +1046,15 @@
X extern int register_blkdev(unsigned int, const char *, struct block_device_operations *);
X extern int unregister_blkdev(unsigned int, const char *);
X extern struct block_device *bdget(dev_t);
+extern int bd_acquire(struct inode *inode);
+extern void bd_forget(struct inode *inode);
X extern void bdput(struct block_device *);
X extern struct char_device *cdget(dev_t);
X extern void cdput(struct char_device *);
X extern int blkdev_open(struct inode *, struct file *);
+extern int blkdev_close(struct inode *, struct file *);
X extern struct file_operations def_blk_fops;
+extern struct address_space_operations def_blk_aops;
X extern struct file_operations def_fifo_fops;
X extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
X extern int blkdev_get(struct block_device *, mode_t, unsigned, int);
@@ -1069,8 +1093,7 @@
X #define BUF_CLEAN 0
X #define BUF_LOCKED 1 /* Buffers scheduled for write */
X #define BUF_DIRTY 2 /* Dirty buffers, not yet scheduled for write */
-#define BUF_PROTECTED 3 /* Ramdisk persistent storage */
-#define NR_LIST 4
+#define NR_LIST 3
X
X static inline void get_bh(struct buffer_head * bh)
X {
@@ -1107,24 +1130,21 @@
X __mark_buffer_clean(bh);
X }
X
-#define atomic_set_buffer_protected(bh) test_and_set_bit(BH_Protected, &(bh)->b_state)
-
-static inline void __mark_buffer_protected(struct buffer_head *bh)
-{
- refile_buffer(bh);
-}
-
-static inline void mark_buffer_protected(struct buffer_head * bh)
-{
- if (!atomic_set_buffer_protected(bh))
- __mark_buffer_protected(bh);
-}
-
+extern void FASTCALL(__mark_dirty(struct buffer_head *bh));
X extern void FASTCALL(__mark_buffer_dirty(struct buffer_head *bh));
X extern void FASTCALL(mark_buffer_dirty(struct buffer_head *bh));
+extern void FASTCALL(buffer_insert_inode_data_queue(struct buffer_head *, struct inode *));
X
X #define atomic_set_buffer_dirty(bh) test_and_set_bit(BH_Dirty, &(bh)->b_state)
X
+static inline void mark_buffer_async(struct buffer_head * bh, int on)
+{
+ if (on)
+ set_bit(BH_Async, &bh->b_state);
+ else
+ clear_bit(BH_Async, &bh->b_state);
+}
+
X /*
X * If an error happens during the make_request, this function
X * has to be recalled. It marks the buffer as clean and not
@@ -1147,25 +1167,34 @@
X buffer_insert_inode_queue(bh, inode);
X }
X
-extern void balance_dirty(kdev_t);
+extern void balance_dirty(void);
X extern int check_disk_change(kdev_t);
X extern int invalidate_inodes(struct super_block *);
X extern int invalidate_device(kdev_t, int);
X extern void invalidate_inode_pages(struct inode *);
+extern void invalidate_inode_pages2(struct address_space *);
X extern void invalidate_inode_buffers(struct inode *);
-#define invalidate_buffers(dev) __invalidate_buffers((dev), 0)
-#define destroy_buffers(dev) __invalidate_buffers((dev), 1)
-extern void __invalidate_buffers(kdev_t dev, int);
+#define invalidate_buffers(dev) __invalidate_buffers((dev), 0, 0)
+#define destroy_buffers(dev) __invalidate_buffers((dev), 1, 0)
+#define update_buffers(dev) \
+do { \
+ __invalidate_buffers((dev), 0, 1); \
+ __invalidate_buffers((dev), 0, 2); \
+} while (0)
+extern void __invalidate_buffers(kdev_t dev, int, int);
X extern void sync_inodes(kdev_t);
X extern void sync_unlocked_inodes(void);
X extern void write_inode_now(struct inode *, int);
+extern int sync_buffers(kdev_t, int);
X extern void sync_dev(kdev_t);
X extern int fsync_dev(kdev_t);
X extern int fsync_super(struct super_block *);
X extern int fsync_no_super(kdev_t);
X extern void sync_inodes_sb(struct super_block *);
-extern int fsync_inode_buffers(struct inode *);
X extern int osync_inode_buffers(struct inode *);
+extern int osync_inode_data_buffers(struct inode *);
+extern int fsync_inode_buffers(struct inode *);
+extern int fsync_inode_data_buffers(struct inode *);
X extern int inode_has_buffers(struct inode *);
X extern void filemap_fdatasync(struct address_space *);
X extern void filemap_fdatawait(struct address_space *);
@@ -1298,7 +1327,6 @@
X extern void remove_inode_hash(struct inode *);
X extern struct file * get_empty_filp(void);
SHAR_EOF
true || echo 'restore of patch-2.4.10 failed'
fi
echo 'End of part 185'
echo 'File patch-2.4.10 is continued in part 186'
echo "186" > _shar_seq_.tmp
exit 0

0 new messages