summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 18:24:48 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 18:24:48 -0800
commitc9df1e203d7efe8c93d3cdc04093f44f040f8e83 (patch)
tree9bc86b9aeee5576677e5c8415ef5b757201dc2bc /include
parent560e89962e32171585dd95af9ac9911ebc0e02ce (diff)
v2.4.4.5 -> v2.4.4.6
- Johannes Erdfelt: OHCI hash-chain corruption fix, USB updates - Richard Henderson, Ivan Kokshaysky: alpha PCI iommu fixes - Tim Waugh: parport changelogs and printk levels - Andrew Morton: vmalloc off-by-one (overly sensitive) test - Al Viro: VFS layer cleanups - Cort Dougan: PPC updates (big bootloader re-org) - Alan Cox: more merges, remove phillips camera conversion code - Andrea Arkangeli: alpha fixups - OGAWA Hirofumi: big-sector support with FAT - Neil Brown: more md fixes
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/bitops.h27
-rw-r--r--include/asm-alpha/core_tsunami.h3
-rw-r--r--include/asm-alpha/mmzone.h127
-rw-r--r--include/asm-alpha/page.h13
-rw-r--r--include/asm-alpha/pgalloc.h9
-rw-r--r--include/asm-alpha/pgtable.h39
-rw-r--r--include/asm-alpha/smp.h1
-rw-r--r--include/asm-alpha/spinlock.h2
-rw-r--r--include/asm-alpha/system.h12
-rw-r--r--include/asm-i386/bitops.h29
-rw-r--r--include/asm-ppc/bootinfo.h26
-rw-r--r--include/asm-ppc/processor.h27
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/mmzone.h21
-rw-r--r--include/linux/mount.h4
-rw-r--r--include/linux/msdos_fs.h12
-rw-r--r--include/linux/msdos_fs_sb.h6
-rw-r--r--include/linux/swap.h6
-rw-r--r--include/net/syncppp.h2
20 files changed, 321 insertions, 48 deletions
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h
index 78e0f58c39b2..11935eaddac2 100644
--- a/include/asm-alpha/bitops.h
+++ b/include/asm-alpha/bitops.h
@@ -46,7 +46,7 @@ __set_bit(unsigned long nr, volatile void * addr)
{
int *m = ((int *) addr) + (nr >> 5);
- *m |= 1UL << (nr & 31);
+ *m |= 1 << (nr & 31);
}
#define smp_mb__before_clear_bit() smp_mb()
@@ -70,6 +70,17 @@ clear_bit(unsigned long nr, volatile void * addr)
:"Ir" (~(1UL << (nr & 31))), "m" (*m));
}
+/*
+ * WARNING: non atomic version.
+ */
+static __inline__ void
+__change_bit(unsigned long nr, volatile void * addr)
+{
+ int *m = ((int *) addr) + (nr >> 5);
+
+ *m ^= 1 << (nr & 31);
+}
+
extern __inline__ void
change_bit(unsigned long nr, volatile void * addr)
{
@@ -170,6 +181,20 @@ __test_and_clear_bit(unsigned long nr, volatile void * addr)
return (old & mask) != 0;
}
+/*
+ * WARNING: non atomic version.
+ */
+static __inline__ int
+__test_and_change_bit(unsigned long nr, volatile void * addr)
+{
+ unsigned long mask = 1 << (nr & 0x1f);
+ int *m = ((int *) addr) + (nr >> 5);
+ int old = *m;
+
+ *m = old ^ mask;
+ return (old & mask) != 0;
+}
+
extern __inline__ int
test_and_change_bit(unsigned long nr, volatile void * addr)
{
diff --git a/include/asm-alpha/core_tsunami.h b/include/asm-alpha/core_tsunami.h
index 00d20922b46d..691d164b2b6d 100644
--- a/include/asm-alpha/core_tsunami.h
+++ b/include/asm-alpha/core_tsunami.h
@@ -275,6 +275,9 @@ union TPchipPERRMASK {
/* The IO address space is larger than 0xffff */
#define TSUNAMI_IO_SPACE (TSUNAMI_CONF(0) - TSUNAMI_IO(0))
+/* Offset between ram physical addresses and pci64 DAC bus addresses */
+#define TSUNAMI_DAC_OFFSET (1UL << 40)
+
/*
* Data structure for handling TSUNAMI machine checks:
*/
diff --git a/include/asm-alpha/mmzone.h b/include/asm-alpha/mmzone.h
new file mode 100644
index 000000000000..8abf68ea7080
--- /dev/null
+++ b/include/asm-alpha/mmzone.h
@@ -0,0 +1,127 @@
+/*
+ * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
+ * Adapted for the alpha wildfire architecture Jan 2001.
+ */
+#ifndef _ASM_MMZONE_H_
+#define _ASM_MMZONE_H_
+
+#include <linux/config.h>
+#ifdef CONFIG_NUMA_SCHED
+#include <linux/numa_sched.h>
+#endif
+#ifdef NOTYET
+#include <asm/sn/types.h>
+#include <asm/sn/addrs.h>
+#include <asm/sn/arch.h>
+#include <asm/sn/klkernvars.h>
+#endif /* NOTYET */
+
+typedef struct plat_pglist_data {
+ pg_data_t gendata;
+#ifdef NOTYET
+ kern_vars_t kern_vars;
+#endif
+#if defined(CONFIG_NUMA) && defined(CONFIG_NUMA_SCHED)
+ struct numa_schedule_data schedule_data;
+#endif
+} plat_pg_data_t;
+
+struct bootmem_data_t; /* stupid forward decl. */
+
+/*
+ * Following are macros that are specific to this numa platform.
+ */
+
+extern plat_pg_data_t *plat_node_data[];
+
+#ifdef CONFIG_ALPHA_WILDFIRE
+# define ALPHA_PA_TO_NID(pa) ((pa) >> 36) /* 16 nodes max due 43bit kseg */
+#define NODE_MAX_MEM_SIZE (64L * 1024L * 1024L * 1024L) /* 64 GB */
+#define MAX_NUMNODES WILDFIRE_MAX_QBB
+#else
+# define ALPHA_PA_TO_NID(pa) (0)
+#define NODE_MAX_MEM_SIZE (~0UL)
+#define MAX_NUMNODES 1
+#endif
+
+#define PHYSADDR_TO_NID(pa) ALPHA_PA_TO_NID(pa)
+#define PLAT_NODE_DATA(n) (plat_node_data[(n)])
+#define PLAT_NODE_DATA_STARTNR(n) \
+ (PLAT_NODE_DATA(n)->gendata.node_start_mapnr)
+#define PLAT_NODE_DATA_SIZE(n) (PLAT_NODE_DATA(n)->gendata.node_size)
+
+#if 1
+#define PLAT_NODE_DATA_LOCALNR(p, n) \
+ (((p) - PLAT_NODE_DATA(n)->gendata.node_start_paddr) >> PAGE_SHIFT)
+#else
+static inline unsigned long
+PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
+{
+ unsigned long temp;
+ temp = p - PLAT_NODE_DATA(n)->gendata.node_start_paddr;
+ return (temp >> PAGE_SHIFT);
+}
+#endif
+
+#ifdef CONFIG_DISCONTIGMEM
+
+/*
+ * Following are macros that each numa implmentation must define.
+ */
+
+/*
+ * Given a kernel address, find the home node of the underlying memory.
+ */
+#define KVADDR_TO_NID(kaddr) PHYSADDR_TO_NID(__pa(kaddr))
+
+/*
+ * Return a pointer to the node data for node n.
+ */
+#define NODE_DATA(n) (&((PLAT_NODE_DATA(n))->gendata))
+
+/*
+ * NODE_MEM_MAP gives the kaddr for the mem_map of the node.
+ */
+#define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map)
+
+/*
+ * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory
+ * and returns the the mem_map of that node.
+ */
+#define ADDR_TO_MAPBASE(kaddr) \
+ NODE_MEM_MAP(KVADDR_TO_NID((unsigned long)(kaddr)))
+
+/*
+ * Given a kaddr, LOCAL_BASE_ADDR finds the owning node of the memory
+ * and returns the kaddr corresponding to first physical page in the
+ * node's mem_map.
+ */
+#define LOCAL_BASE_ADDR(kaddr) ((unsigned long)__va(NODE_DATA(KVADDR_TO_NID(kaddr))->node_start_paddr))
+
+#define LOCAL_MAP_NR(kvaddr) \
+ (((unsigned long)(kvaddr)-LOCAL_BASE_ADDR(kvaddr)) >> PAGE_SHIFT)
+
+#define kern_addr_valid(kaddr) test_bit(LOCAL_MAP_NR(kaddr), \
+ NODE_DATA(KVADDR_TO_NID(kaddr))->valid_addr_bitmap)
+
+#define virt_to_page(kaddr) (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr))
+#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
+
+#ifdef CONFIG_NUMA
+#ifdef CONFIG_NUMA_SCHED
+#define NODE_SCHEDULE_DATA(nid) (&((PLAT_NODE_DATA(nid))->schedule_data))
+#endif
+
+#ifdef CONFIG_ALPHA_WILDFIRE
+/* With wildfire assume 4 CPUs per node */
+#define cputonode(cpu) ((cpu) >> 2)
+#else
+#define cputonode(cpu) 0
+#endif /* CONFIG_ALPHA_WILDFIRE */
+
+#define numa_node_id() cputonode(smp_processor_id())
+#endif /* CONFIG_NUMA */
+
+#endif /* CONFIG_DISCONTIGMEM */
+
+#endif /* _ASM_MMZONE_H_ */
diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h
index fbae9324fd6d..f403fa813f3f 100644
--- a/include/asm-alpha/page.h
+++ b/include/asm-alpha/page.h
@@ -1,6 +1,8 @@
#ifndef _ALPHA_PAGE_H
#define _ALPHA_PAGE_H
+#include <asm/pal.h>
+
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 13
#define PAGE_SIZE (1UL << PAGE_SHIFT)
@@ -33,6 +35,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define pgprot_val(x) ((x).pgprot)
#define __pte(x) ((pte_t) { (x) } )
+#define __pmd(x) ((pmd_t) { (x) } )
#define __pgd(x) ((pgd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
@@ -56,7 +59,11 @@ typedef unsigned long pgprot_t;
#endif /* STRICT_MM_TYPECHECKS */
-#define BUG() __asm__ __volatile__("call_pal 129 # bugchk")
+#define BUG() \
+do { \
+ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
+ __asm__ __volatile__("call_pal %0 # bugchk" : : "i" (PAL_bugchk)); \
+} while (0)
#define PAGE_BUG(page) BUG()
/* Pure 2^n version of get_order */
@@ -86,8 +93,10 @@ extern __inline__ int get_order(unsigned long size)
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
+#ifndef CONFIG_DISCONTIGMEM
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
-#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)
+#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
+#endif /* CONFIG_DISCONTIGMEM */
#endif /* __KERNEL__ */
diff --git a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h
index 5b26f301643e..af01b68cd4a3 100644
--- a/include/asm-alpha/pgalloc.h
+++ b/include/asm-alpha/pgalloc.h
@@ -229,6 +229,7 @@ extern void flush_tlb_range(struct mm_struct *, unsigned long, unsigned long);
#ifndef CONFIG_SMP
extern struct pgtable_cache_struct {
unsigned long *pgd_cache;
+ unsigned long *pmd_cache;
unsigned long *pte_cache;
unsigned long pgtable_cache_sz;
} quicklists;
@@ -237,7 +238,7 @@ extern struct pgtable_cache_struct {
#define quicklists cpu_data[smp_processor_id()]
#endif
#define pgd_quicklist (quicklists.pgd_cache)
-#define pmd_quicklist ((unsigned long *)0)
+#define pmd_quicklist (quicklists.pmd_cache)
#define pte_quicklist (quicklists.pte_cache)
#define pgtable_cache_size (quicklists.pgtable_cache_sz)
@@ -252,7 +253,7 @@ static inline pgd_t *get_pgd_fast(void)
if ((ret = pgd_quicklist) != NULL) {
pgd_quicklist = (unsigned long *)(*ret);
- ret[0] = ret[1];
+ ret[0] = 0;
pgtable_cache_size--;
} else
ret = (unsigned long *)get_pgd_slow();
@@ -285,7 +286,7 @@ static inline pmd_t *pmd_alloc_one_fast(struct mm_struct *mm, unsigned long addr
if ((ret = (unsigned long *)pte_quicklist) != NULL) {
pte_quicklist = (unsigned long *)(*ret);
- ret[0] = ret[1];
+ ret[0] = 0;
pgtable_cache_size--;
}
return (pmd_t *)ret;
@@ -317,7 +318,7 @@ static inline pte_t *pte_alloc_one_fast(struct mm_struct *mm, unsigned long addr
if ((ret = (unsigned long *)pte_quicklist) != NULL) {
pte_quicklist = (unsigned long *)(*ret);
- ret[0] = ret[1];
+ ret[0] = 0;
pgtable_cache_size--;
}
return (pte_t *)ret;
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
index 54341fff11e9..259eaa77b0a9 100644
--- a/include/asm-alpha/pgtable.h
+++ b/include/asm-alpha/pgtable.h
@@ -9,6 +9,7 @@
* in <asm/page.h> (currently 8192).
*/
#include <linux/config.h>
+#include <linux/mmzone.h>
#include <asm/page.h>
#include <asm/processor.h> /* For TASK_SIZE */
@@ -189,6 +190,15 @@ extern unsigned long __zero_page(void);
* Conversion functions: convert a page and protection to a page entry,
* and a page entry and page directory to the page they refer to.
*/
+#ifndef CONFIG_DISCONTIGMEM
+#define PAGE_TO_PA(page) ((page - mem_map) << PAGE_SHIFT)
+#else
+#define PAGE_TO_PA(page) \
+ ((((page)-(page)->zone->zone_mem_map) << PAGE_SHIFT) \
+ + (page)->zone->zone_start_paddr)
+#endif
+
+#ifndef CONFIG_DISCONTIGMEM
#define mk_pte(page, pgprot) \
({ \
pte_t pte; \
@@ -197,6 +207,19 @@ extern unsigned long __zero_page(void);
pgprot_val(pgprot); \
pte; \
})
+#else
+#define mk_pte(page, pgprot) \
+({ \
+ pte_t pte; \
+ unsigned long pfn; \
+ \
+ pfn = ((unsigned long)((page)-(page)->zone->zone_mem_map)) << 32; \
+ pfn += (page)->zone->zone_start_paddr << (32-PAGE_SHIFT); \
+ pte_val(pte) = pfn | pgprot_val(pgprot); \
+ \
+ pte; \
+})
+#endif
extern inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpage) << (32-PAGE_SHIFT)) | pgprot_val(pgprot); return pte; }
@@ -210,7 +233,20 @@ extern inline void pmd_set(pmd_t * pmdp, pte_t * ptep)
extern inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp)
{ pgd_val(*pgdp) = _PAGE_TABLE | ((((unsigned long) pmdp) - PAGE_OFFSET) << (32-PAGE_SHIFT)); }
+#ifndef CONFIG_DISCONTIGMEM
#define pte_page(x) (mem_map+(unsigned long)((pte_val(x) >> 32)))
+#else
+#define pte_page(x) \
+({ \
+ unsigned long kvirt; \
+ struct page * __xx; \
+ \
+ kvirt = (unsigned long)__va(pte_val(x) >> (32-PAGE_SHIFT)); \
+ __xx = virt_to_page(kvirt); \
+ \
+ __xx; \
+})
+#endif
extern inline unsigned long pmd_page(pmd_t pmd)
{ return PAGE_OFFSET + ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)); }
@@ -303,7 +339,10 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
#define PageSkip(page) (0)
+
+#ifndef CONFIG_DISCONTIGMEM
#define kern_addr_valid(addr) (1)
+#endif
#define io_remap_page_range(start, busaddr, size, prot) \
remap_page_range(start, virt_to_phys(__ioremap(busaddr)), size, prot)
diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h
index 2cc52a7e0578..6c9edc2f61f3 100644
--- a/include/asm-alpha/smp.h
+++ b/include/asm-alpha/smp.h
@@ -29,6 +29,7 @@ struct cpuinfo_alpha {
int need_new_asn;
int asn_lock;
unsigned long *pgd_cache;
+ unsigned long *pmd_cache;
unsigned long *pte_cache;
unsigned long pgtable_cache_sz;
unsigned long ipi_count;
diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h
index e1d809880901..bf560fde0a35 100644
--- a/include/asm-alpha/spinlock.h
+++ b/include/asm-alpha/spinlock.h
@@ -96,6 +96,8 @@ typedef struct {
#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
+#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
+
#if DEBUG_RWLOCK
extern void write_lock(rwlock_t * lock);
extern void read_lock(rwlock_t * lock);
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index 3a8c9385dd49..6de660cabfe1 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -35,6 +35,18 @@
#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000)
+/*
+ * This is setup by the secondary bootstrap loader. Because
+ * the zero page is zeroed out as soon as the vm system is
+ * initialized, we need to copy things out into a more permanent
+ * place.
+ */
+#define PARAM ZERO_PGE
+#define COMMAND_LINE ((char*)(PARAM + 0x0000))
+#define COMMAND_LINE_SIZE 256
+#define INITRD_START (*(unsigned long *) (PARAM+0x100))
+#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))
+
#ifndef __ASSEMBLY__
#include <linux/kernel.h>
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
index 00716e836964..a3063cacc919 100644
--- a/include/asm-i386/bitops.h
+++ b/include/asm-i386/bitops.h
@@ -79,6 +79,23 @@ static __inline__ void clear_bit(int nr, volatile void * addr)
#define smp_mb__after_clear_bit() barrier()
/**
+ * __change_bit - Toggle a bit in memory
+ * @nr: the bit to set
+ * @addr: the address to start counting from
+ *
+ * Unlike change_bit(), this function is non-atomic and may be reordered.
+ * If it's called on the same region of memory simultaneously, the effect
+ * may be that only one operation succeeds.
+ */
+static __inline__ void __change_bit(int nr, volatile void * addr)
+{
+ __asm__ __volatile__(
+ "btcl %1,%0"
+ :"=m" (ADDR)
+ :"Ir" (nr));
+}
+
+/**
* change_bit - Toggle a bit in memory
* @nr: Bit to clear
* @addr: Address to start counting from
@@ -173,6 +190,18 @@ static __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
return oldbit;
}
+/* WARNING: non atomic and it can be reordered! */
+static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
+{
+ int oldbit;
+
+ __asm__ __volatile__(
+ "btcl %2,%1\n\tsbbl %0,%0"
+ :"=r" (oldbit),"=m" (ADDR)
+ :"Ir" (nr) : "memory");
+ return oldbit;
+}
+
/**
* test_and_change_bit - Change a bit and return its new value
* @nr: Bit to set
diff --git a/include/asm-ppc/bootinfo.h b/include/asm-ppc/bootinfo.h
index 2ce574d0b228..ce7650611398 100644
--- a/include/asm-ppc/bootinfo.h
+++ b/include/asm-ppc/bootinfo.h
@@ -1,5 +1,5 @@
/*
- * BK Id: SCCS/s.bootinfo.h 1.5 05/17/01 18:14:24 cort
+ * BK Id: SCCS/s.bootinfo.h 1.7 05/23/01 00:38:42 cort
*/
/*
* Non-machine dependent bootinfo structure. Basic idea
@@ -8,7 +8,6 @@
* Copyright (C) 1999 Cort Dougan <cort@ppc.kernel.org>
*/
-
#ifdef __KERNEL__
#ifndef _PPC_BOOTINFO_H
#define _PPC_BOOTINFO_H
@@ -35,6 +34,27 @@ struct bi_record {
#endif /* CONFIG_APUS */
-#endif /* _PPC_BOOTINFO_H */
+/*
+ * prom_init() is called very early on, before the kernel text
+ * and data have been mapped to KERNELBASE. At this point the code
+ * is running at whatever address it has been loaded at, so
+ * references to extern and static variables must be relocated
+ * explicitly. The procedure reloc_offset() returns the address
+ * we're currently running at minus the address we were linked at.
+ * (Note that strings count as static variables.)
+ *
+ * Because OF may have mapped I/O devices into the area starting at
+ * KERNELBASE, particularly on CHRP machines, we can't safely call
+ * OF once the kernel has been mapped to KERNELBASE. Therefore all
+ * OF calls should be done within prom_init(), and prom_init()
+ * and all routines called within it must be careful to relocate
+ * references as necessary.
+ */
+#define PTRRELOC(x) ((typeof(x))((unsigned long)(x) + offset))
+#define PTRUNRELOC(x) ((typeof(x))((unsigned long)(x) - offset))
+#define RELOC(x) (*PTRRELOC(&(x)))
+#endif /* _PPC_BOOTINFO_H */
#endif /* __KERNEL__ */
+
+
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index fdc154d70687..3bd0b2a7e345 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -554,10 +554,10 @@ n:
#define SR15 15
#ifndef __ASSEMBLY__
-#ifndef CONFIG_MACH_SPECIFIC
+#if defined(CONFIG_ALL_PPC)
extern int _machine;
extern int have_of;
-#endif /* CONFIG_MACH_SPECIFIC */
+#endif /* CONFIG_ALL_PPC */
/* what kind of prep workstation we are */
extern int _prep_type;
@@ -681,29 +681,24 @@ void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
#endif /* ndef ASSEMBLY*/
-#ifdef CONFIG_MACH_SPECIFIC
-#if defined(CONFIG_8xx)
-#define _machine _MACH_8xx
-#define have_of 0
+#ifndef CONFIG_ALL_PPC
+#if defined(CONFIG_APUS)
+#define _machine _MACH_apus
+#elif defined(CONFIG_GEMINI)
+#define _machine _MACH_gemini
#elif defined(CONFIG_OAK)
#define _machine _MACH_oak
-#define have_of 0
#elif defined(CONFIG_WALNUT)
#define _machine _MACH_walnut
-#define have_of 0
-#elif defined(CONFIG_APUS)
-#define _machine _MACH_apus
-#define have_of 0
-#elif defined(CONFIG_GEMINI)
-#define _machine _MACH_gemini
-#define have_of 0
+#elif defined(CONFIG_8xx)
+#define _machine _MACH_8xx
#elif defined(CONFIG_8260)
#define _machine _MACH_8260
-#define have_of 0
#else
#error "Machine not defined correctly"
#endif
-#endif /* CONFIG_MACH_SPECIFIC */
+#define have_of 0
+#endif /* !CONFIG_ALL_PPC */
#endif /* __ASM_PPC_PROCESSOR_H */
#endif /* __KERNEL__ */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e2ce4ab43241..8db1b9fd31d8 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -908,10 +908,10 @@ do { \
extern int register_filesystem(struct file_system_type *);
extern int unregister_filesystem(struct file_system_type *);
extern struct vfsmount *kern_mount(struct file_system_type *);
-extern void kern_umount(struct vfsmount *);
extern int may_umount(struct vfsmount *);
extern long do_mount(char *, char *, char *, unsigned long, void *);
+#define kern_umount mntput
extern int vfs_statfs(struct super_block *, struct statfs *);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 26c72c982809..12edcb46cc8f 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -480,7 +480,6 @@ extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int);
#else
#define __GFP_HIGHMEM 0x0 /* noop */
#endif
-#define __GFP_VM 0x20
#define GFP_BUFFER (__GFP_HIGH | __GFP_WAIT)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 7e4e9f98e85f..0f65115f4500 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -16,7 +16,7 @@
typedef struct free_area_struct {
struct list_head free_list;
- unsigned int *map;
+ unsigned long *map;
} free_area_t;
struct pglist_data;
@@ -34,7 +34,6 @@ typedef struct zone_struct {
* Commonly accessed fields:
*/
spinlock_t lock;
- unsigned long offset;
unsigned long free_pages;
unsigned long inactive_clean_pages;
unsigned long inactive_dirty_pages;
@@ -47,17 +46,18 @@ typedef struct zone_struct {
free_area_t free_area[MAX_ORDER];
/*
- * rarely used fields:
- */
- char *name;
- unsigned long size;
- /*
* Discontig memory support fields.
*/
struct pglist_data *zone_pgdat;
+ struct page *zone_mem_map;
unsigned long zone_start_paddr;
unsigned long zone_start_mapnr;
- struct page *zone_mem_map;
+
+ /*
+ * rarely used fields:
+ */
+ char *name;
+ unsigned long size;
} zone_t;
#define ZONE_DMA 0
@@ -81,7 +81,7 @@ typedef struct zonelist_struct {
int gfp_mask;
} zonelist_t;
-#define NR_GFPINDEX 0x100
+#define NR_GFPINDEX 0x20
/*
* The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
@@ -112,8 +112,7 @@ 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) <= \
- ((tzone) - (pgzone)->zone_pgdat->node_zones)))
+ && ((pgzone) <= (tzone)))
/*
* The following two are not meant for general usage. They are here as
diff --git a/include/linux/mount.h b/include/linux/mount.h
index a4fc9a05c484..3b41b99cf1aa 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -39,11 +39,13 @@ static inline struct vfsmount *mntget(struct vfsmount *mnt)
return mnt;
}
+extern void __mntput(struct vfsmount *mnt);
+
static inline void mntput(struct vfsmount *mnt)
{
if (mnt) {
if (atomic_dec_and_test(&mnt->mnt_count))
- BUG();
+ __mntput(mnt);
}
}
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 855c4d20c12a..e93201f56b10 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -76,6 +76,11 @@
#define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? EOF_FAT32 : \
MSDOS_SB(s)->fat_bits == 16 ? EOF_FAT16 : EOF_FAT12)
+#define FAT_FSINFO_SIG1 0x41615252
+#define FAT_FSINFO_SIG2 0x61417272
+#define IS_FSINFO(x) (CF_LE_L((x)->signature1) == FAT_FSINFO_SIG1 \
+ && CF_LE_L((x)->signature2) == FAT_FSINFO_SIG2)
+
/*
* Inode flags
*/
@@ -127,8 +132,9 @@ struct fat_boot_sector {
};
struct fat_boot_fsinfo {
- __u32 reserved1; /* Nothing as far as I can tell */
- __u32 signature; /* 0x61417272L */
+ __u32 signature1; /* 0x61417272L */
+ __u32 reserved1[120]; /* Nothing as far as I can tell */
+ __u32 signature2; /* 0x61417272L */
__u32 free_clusters; /* Free cluster count. -1 if unknown */
__u32 next_cluster; /* Most recently allocated cluster.
* Unused under Linux. */
@@ -208,7 +214,7 @@ static __inline__ int fat_get_entry(struct inode *dir,loff_t *pos,
{
/* Fast stuff first */
if (*bh && *de &&
- (*de - (struct msdos_dir_entry *)(*bh)->b_data) < MSDOS_DPB-1) {
+ (*de - (struct msdos_dir_entry *)(*bh)->b_data) < MSDOS_SB(dir->i_sb)->dir_per_block - 1) {
*pos += sizeof(struct msdos_dir_entry);
(*de)++;
(*ino)++;
diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h
index 6c86a6a2e204..0421836a2059 100644
--- a/include/linux/msdos_fs_sb.h
+++ b/include/linux/msdos_fs_sb.h
@@ -44,7 +44,7 @@ struct msdos_sb_info {
unsigned long data_start; /* first data sector */
unsigned long clusters; /* number of clusters */
unsigned long root_cluster; /* first cluster of the root directory */
- unsigned long fsinfo_offset; /* FAT32 fsinfo offset from start of disk */
+ unsigned long fsinfo_sector; /* FAT32 fsinfo offset from start of disk */
wait_queue_head_t fat_wait;
struct semaphore fat_lock;
int prev_free; /* previously returned free cluster number */
@@ -54,7 +54,9 @@ struct msdos_sb_info {
struct nls_table *nls_io; /* Charset used for input and display */
struct cvf_format* cvf_format;
void *dir_ops; /* Opaque; default directory operations */
- void *private_data;
+ void *private_data;
+ int dir_per_block; /* dir entries per block */
+ int dir_per_block_bits; /* log2(dir_per_block) */
};
#endif
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 1ad8d5a72794..912586ea18dc 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -64,9 +64,9 @@ struct swap_info_struct {
};
extern int nr_swap_pages;
-FASTCALL(unsigned int nr_free_pages(void));
-FASTCALL(unsigned int nr_inactive_clean_pages(void));
-FASTCALL(unsigned int nr_free_buffer_pages(void));
+extern unsigned int nr_free_pages(void);
+extern unsigned int nr_inactive_clean_pages(void);
+extern unsigned int nr_free_buffer_pages(void);
extern int nr_active_pages;
extern int nr_inactive_dirty_pages;
extern atomic_t nr_async_pages;
diff --git a/include/net/syncppp.h b/include/net/syncppp.h
index 350597961d5f..df5b0aa30010 100644
--- a/include/net/syncppp.h
+++ b/include/net/syncppp.h
@@ -94,5 +94,7 @@ int sppp_close (struct net_device *dev);
#define SPPPIOCCISCO (SIOCDEVPRIVATE)
#define SPPPIOCPPP (SIOCDEVPRIVATE+1)
#define SPPPIOCDEBUG (SIOCDEVPRIVATE+2)
+#define SPPPIOCSFLAGS (SIOCDEVPRIVATE+3)
+#define SPPPIOCGFLAGS (SIOCDEVPRIVATE+4)
#endif /* _SYNCPPP_H_ */