diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
commit | 6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch) | |
tree | 0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /include/asm-sparc | |
parent | ecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff) |
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine
status unknown.
Diffstat (limited to 'include/asm-sparc')
-rw-r--r-- | include/asm-sparc/head.h | 4 | ||||
-rw-r--r-- | include/asm-sparc/ide.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/kdebug.h | 10 | ||||
-rw-r--r-- | include/asm-sparc/mc146818rtc.h | 27 | ||||
-rw-r--r-- | include/asm-sparc/openprom.h | 7 | ||||
-rw-r--r-- | include/asm-sparc/page.h | 10 | ||||
-rw-r--r-- | include/asm-sparc/pgalloc.h | 18 | ||||
-rw-r--r-- | include/asm-sparc/pgtable.h | 10 | ||||
-rw-r--r-- | include/asm-sparc/pgtsrmmu.h | 5 | ||||
-rw-r--r-- | include/asm-sparc/pgtsun4.h | 9 | ||||
-rw-r--r-- | include/asm-sparc/pgtsun4c.h | 9 | ||||
-rw-r--r-- | include/asm-sparc/siginfo.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/socket.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/vaddrs.h | 63 |
14 files changed, 74 insertions, 104 deletions
diff --git a/include/asm-sparc/head.h b/include/asm-sparc/head.h index b0f06a0bc..f781635d6 100644 --- a/include/asm-sparc/head.h +++ b/include/asm-sparc/head.h @@ -1,4 +1,4 @@ -/* $Id: head.h,v 1.38 1999/12/01 23:52:04 davem Exp $ */ +/* $Id: head.h,v 1.39 2000/05/26 22:18:45 ecd Exp $ */ #ifndef __SPARC_HEAD_H #define __SPARC_HEAD_H @@ -95,7 +95,7 @@ /* The Get PSR software trap for userland. */ #define GETPSR_TRAP \ - mov %psr, %o0; jmpl %l2, %g0; rett %l2 + 4; nop; + mov %psr, %i0; jmp %l2; rett %l2 + 4; nop; /* This is for hard interrupts from level 1-14, 15 is non-maskable (nmi) and * gets handled with another macro. diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h index aa0bcbfdb..d4254fa1e 100644 --- a/include/asm-sparc/ide.h +++ b/include/asm-sparc/ide.h @@ -1,4 +1,4 @@ -/* $Id: ide.h,v 1.5 2000/05/22 07:29:43 davem Exp $ +/* $Id: ide.h,v 1.6 2000/05/27 00:49:37 davem Exp $ * ide.h: SPARC PCI specific IDE glue. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) diff --git a/include/asm-sparc/kdebug.h b/include/asm-sparc/kdebug.h index 8a0fdfd51..3ea491663 100644 --- a/include/asm-sparc/kdebug.h +++ b/include/asm-sparc/kdebug.h @@ -1,4 +1,4 @@ -/* $Id: kdebug.h,v 1.10 1997/12/14 23:24:40 ecd Exp $ +/* $Id: kdebug.h,v 1.11 2000/06/04 06:23:53 anton Exp $ * kdebug.h: Defines and definitions for debugging the Linux kernel * under various kernel debuggers. * @@ -8,13 +8,7 @@ #define _SPARC_KDEBUG_H #include <asm/openprom.h> - -/* The debugger lives in 1MB of virtual address space right underneath - * the boot prom. - */ - -#define DEBUG_FIRSTVADDR 0xffc00000 -#define DEBUG_LASTVADDR LINUX_OPPROM_BEGVM +#include <asm/vaddrs.h> /* Breakpoints are enter through trap table entry 126. So in sparc assembly * if you want to drop into the debugger you do: diff --git a/include/asm-sparc/mc146818rtc.h b/include/asm-sparc/mc146818rtc.h new file mode 100644 index 000000000..9431df163 --- /dev/null +++ b/include/asm-sparc/mc146818rtc.h @@ -0,0 +1,27 @@ +/* + * Machine dependent access functions for RTC registers. + */ +#ifndef __ASM_SPARC_MC146818RTC_H +#define __ASM_SPARC_MC146818RTC_H + +#include <asm/io.h> + +#ifndef RTC_PORT +#define RTC_PORT(x) (0x70 + (x)) +#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ +#endif + +/* + * The yet supported machines all access the RTC index register via + * an ISA port access but the way to access the date register differs ... + */ +#define CMOS_READ(addr) ({ \ +outb_p((addr),RTC_PORT(0)); \ +inb_p(RTC_PORT(1)); \ +}) +#define CMOS_WRITE(val, addr) ({ \ +outb_p((addr),RTC_PORT(0)); \ +outb_p((val),RTC_PORT(1)); \ +}) + +#endif /* __ASM_SPARC_MC146818RTC_H */ diff --git a/include/asm-sparc/openprom.h b/include/asm-sparc/openprom.h index c88dc02a1..12929a20f 100644 --- a/include/asm-sparc/openprom.h +++ b/include/asm-sparc/openprom.h @@ -1,4 +1,4 @@ -/* $Id: openprom.h,v 1.23 1998/09/21 05:07:26 jj Exp $ */ +/* $Id: openprom.h,v 1.24 2000/06/04 06:23:53 anton Exp $ */ #ifndef __SPARC_OPENPROM_H #define __SPARC_OPENPROM_H @@ -8,10 +8,9 @@ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ +#include <asm/vaddrs.h> + /* Empirical constants... */ -#define KADB_DEBUGGER_BEGVM 0xffc00000 /* Where kern debugger is in virt-mem */ -#define LINUX_OPPROM_BEGVM 0xffd00000 -#define LINUX_OPPROM_ENDVM 0xfff00000 #define LINUX_OPPROM_MAGIC 0x10010407 #ifndef __ASSEMBLY__ diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index 379c8cc97..c727c06d8 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h @@ -1,4 +1,4 @@ -/* $Id: page.h,v 1.52 2000/03/28 06:07:25 anton Exp $ +/* $Id: page.h,v 1.53 2000/06/04 08:36:33 anton Exp $ * page.h: Various defines and such for MMU operations on the Sparc for * the Linux kernel. * @@ -32,7 +32,13 @@ #ifndef __ASSEMBLY__ -#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) +/* + * XXX I am hitting compiler bugs with __builtin_trap. This has + * hit me before and rusty was blaming his netfilter bugs on + * this so lets disable it. - Anton + */ +#if 0 +/* #if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) */ /* We need the mb()'s so we don't trigger a compiler bug - Anton */ #define BUG() do { \ mb(); \ diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h index c0850c9a9..71a03dc02 100644 --- a/include/asm-sparc/pgalloc.h +++ b/include/asm-sparc/pgalloc.h @@ -1,4 +1,4 @@ -/* $Id: pgalloc.h,v 1.4 2000/05/09 17:40:15 davem Exp $ */ +/* $Id: pgalloc.h,v 1.5 2000/06/04 06:23:53 anton Exp $ */ #ifndef _SPARC_PGALLOC_H #define _SPARC_PGALLOC_H @@ -103,23 +103,7 @@ extern struct pgtable_cache_struct { #define pgtable_cache_size (pgt_quicklists.pgtable_cache_sz) #define pgd_cache_size (pgt_quicklists.pgd_cache_sz) -BTFIXUPDEF_CALL(pte_t *, get_pte_fast, void) -BTFIXUPDEF_CALL(pgd_t *, get_pgd_fast, void) -BTFIXUPDEF_CALL(void, free_pte_slow, pte_t *) -BTFIXUPDEF_CALL(void, free_pgd_slow, pgd_t *) BTFIXUPDEF_CALL(int, do_check_pgt_cache, int, int) - -#define get_pte_fast() BTFIXUP_CALL(get_pte_fast)() -extern __inline__ pmd_t *get_pmd_fast(void) -{ - return (pmd_t *)0; -} -#define get_pgd_fast() BTFIXUP_CALL(get_pgd_fast)() -#define free_pte_slow(pte) BTFIXUP_CALL(free_pte_slow)(pte) -extern __inline__ void free_pmd_slow(pmd_t *pmd) -{ -} -#define free_pgd_slow(pgd) BTFIXUP_CALL(free_pgd_slow)(pgd) #define do_check_pgt_cache(low,high) BTFIXUP_CALL(do_check_pgt_cache)(low,high) /* diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 04b34e5e9..a4a1ef3ce 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h @@ -1,4 +1,4 @@ -/* $Id: pgtable.h,v 1.94 2000/03/28 06:07:25 anton Exp $ */ +/* $Id: pgtable.h,v 1.96 2000/06/05 06:08:46 anton Exp $ */ #ifndef _SPARC_PGTABLE_H #define _SPARC_PGTABLE_H @@ -52,19 +52,14 @@ BTFIXUPDEF_CALL(void, mmu_release_scsi_sgl, struct scatterlist *, int, struct s /* * mmu_map/unmap are provided by iommu/iounit; Invalid to call on IIep. - * mmu_flush/inval belong to CPU. Valid on IIep. */ BTFIXUPDEF_CALL(void, mmu_map_dma_area, unsigned long va, __u32 addr, int len) BTFIXUPDEF_CALL(unsigned long /*phys*/, mmu_translate_dvma, unsigned long busa) BTFIXUPDEF_CALL(void, mmu_unmap_dma_area, unsigned long busa, int len) -BTFIXUPDEF_CALL(void, mmu_inval_dma_area, unsigned long virt, int len) -BTFIXUPDEF_CALL(void, mmu_flush_dma_area, unsigned long virt, int len) #define mmu_map_dma_area(va, ba,len) BTFIXUP_CALL(mmu_map_dma_area)(va,ba,len) #define mmu_unmap_dma_area(ba,len) BTFIXUP_CALL(mmu_unmap_dma_area)(ba,len) #define mmu_translate_dvma(ba) BTFIXUP_CALL(mmu_translate_dvma)(ba) -#define mmu_inval_dma_area(va,len) BTFIXUP_CALL(mmu_inval_dma_area)(va,len) -#define mmu_flush_dma_area(va,len) BTFIXUP_CALL(mmu_flush_dma_area)(va,len) BTFIXUPDEF_SIMM13(pmd_shift) BTFIXUPDEF_SETHI(pmd_size) @@ -92,9 +87,6 @@ BTFIXUPDEF_SIMM13(ptrs_per_pgd) BTFIXUPDEF_SIMM13(user_ptrs_per_pgd) #define VMALLOC_VMADDR(x) ((unsigned long)(x)) -/* This is the same accross all platforms */ -#define VMALLOC_START (0xfe300000) -#define VMALLOC_END ~0x0UL #if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) #define pte_ERROR(e) __builtin_trap() diff --git a/include/asm-sparc/pgtsrmmu.h b/include/asm-sparc/pgtsrmmu.h index fc569dcaf..d8f68c3fb 100644 --- a/include/asm-sparc/pgtsrmmu.h +++ b/include/asm-sparc/pgtsrmmu.h @@ -1,4 +1,4 @@ -/* $Id: pgtsrmmu.h,v 1.29 1998/07/26 03:05:42 davem Exp $ +/* $Id: pgtsrmmu.h,v 1.30 2000/06/05 06:08:46 anton Exp $ * pgtsrmmu.h: SRMMU page table defines and code. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -29,9 +29,6 @@ #define SRMMU_PMD_TABLE_SIZE 0x100 /* 64 entries, 4 bytes a piece */ #define SRMMU_PGD_TABLE_SIZE 0x400 /* 256 entries, 4 bytes a piece */ -#define SRMMU_VMALLOC_START (0xfe300000) -#define SRMMU_VMALLOC_END ~0x0UL - /* Definition of the values in the ET field of PTD's and PTE's */ #define SRMMU_ET_MASK 0x3 #define SRMMU_ET_INVALID 0x0 diff --git a/include/asm-sparc/pgtsun4.h b/include/asm-sparc/pgtsun4.h index d9d8afaa2..1c6efda33 100644 --- a/include/asm-sparc/pgtsun4.h +++ b/include/asm-sparc/pgtsun4.h @@ -1,4 +1,4 @@ -/* $Id: pgtsun4.h,v 1.4 1998/07/26 03:05:42 davem Exp $ +/* $Id: pgtsun4.h,v 1.5 2000/06/05 06:08:46 anton Exp $ * pgtsun4.h: Sun4 specific pgtable.h defines and code. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -43,13 +43,6 @@ #define SUN4C_PTRS_PER_PMD 1 #define SUN4C_PTRS_PER_PGD 1024 -/* On the sun4 the physical ram limit is 128MB. We set up our I/O - * translations at KERNBASE + 128MB for 1MB, then we begin the VMALLOC - * area, makes sense. This works out to the value below. - */ -#define SUN4C_VMALLOC_START (0xfe300000) -#define SUN4C_VMALLOC_END ~0x0UL - /* * Sparc SUN4C pte fields. */ diff --git a/include/asm-sparc/pgtsun4c.h b/include/asm-sparc/pgtsun4c.h index 197f4afca..0cc124655 100644 --- a/include/asm-sparc/pgtsun4c.h +++ b/include/asm-sparc/pgtsun4c.h @@ -1,4 +1,4 @@ -/* $Id: pgtsun4c.h,v 1.36 1998/07/26 03:05:44 davem Exp $ +/* $Id: pgtsun4c.h,v 1.37 2000/06/05 06:08:46 anton Exp $ * pgtsun4c.h: Sun4c specific pgtable.h defines and code. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -42,13 +42,6 @@ #define SUN4C_PTRS_PER_PMD 1 #define SUN4C_PTRS_PER_PGD 1024 -/* On the sun4c the physical ram limit is 128MB. We set up our I/O - * translations at KERNBASE + 128MB for 1MB, then we begin the VMALLOC - * area, makes sense. This works out to the value below. - */ -#define SUN4C_VMALLOC_START (0xfe300000) -#define SUN4C_VMALLOC_END ~0x0UL - /* * Sparc SUN4C pte fields. */ diff --git a/include/asm-sparc/siginfo.h b/include/asm-sparc/siginfo.h index d8d3a4c27..61e4ef22f 100644 --- a/include/asm-sparc/siginfo.h +++ b/include/asm-sparc/siginfo.h @@ -1,4 +1,4 @@ -/* $Id: siginfo.h,v 1.7 2000/01/29 07:41:51 davem Exp $ +/* $Id: siginfo.h,v 1.8 2000/05/27 00:49:37 davem Exp $ * siginfo.c: */ diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h index ab723d99c..cbcebff57 100644 --- a/include/asm-sparc/socket.h +++ b/include/asm-sparc/socket.h @@ -1,4 +1,4 @@ -/* $Id: socket.h,v 1.13 2000/02/27 19:47:43 davem Exp $ */ +/* $Id: socket.h,v 1.14 2000/06/09 07:35:28 davem Exp $ */ #ifndef _ASM_SOCKET_H #define _ASM_SOCKET_H diff --git a/include/asm-sparc/vaddrs.h b/include/asm-sparc/vaddrs.h index 1c76a9b9d..5cbec8210 100644 --- a/include/asm-sparc/vaddrs.h +++ b/include/asm-sparc/vaddrs.h @@ -1,38 +1,27 @@ -/* $Id: vaddrs.h,v 1.23 2000/03/12 04:10:46 davem Exp $ */ +/* $Id: vaddrs.h,v 1.25 2000/06/05 06:08:46 anton Exp $ */ #ifndef _SPARC_VADDRS_H #define _SPARC_VADDRS_H #include <asm/head.h> -/* asm-sparc/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. +/* + * asm-sparc/vaddrs.h: Here we define the virtual addresses at + * which important things will be mapped. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com) */ -/* I can see only one reason why we should have statically defined - * mappings for devices and is the speedup improvements of not loading - * a pointer and then the value in the assembly code - */ -#define IOBASE_VADDR 0xfe000000 /* Base for mapping pages */ -#define IOBASE_LEN 0x00300000 /* Length of the IO area */ -#define IOBASE_END 0xfe300000 -#define DVMA_VADDR 0xfff00000 /* Base area of the DVMA on suns */ -#define DVMA_LEN 0x000c0000 /* Size of the DVMA address space */ -#define DVMA_END 0xfffc0000 +#define SUN4M_IOBASE_VADDR 0xfd000000 /* Base for mapping pages */ +#define IOBASE_VADDR 0xfe000000 +#define IOBASE_END 0xfe300000 -/* IOMMU Mapping area, must be on a 16MB boundary! Note this - * doesn't count the DVMA areas, the prom lives between the - * iommu mapping area (for scsi transfer buffers) and the - * dvma upper range (for lance packet ring buffers). - */ -#define IOMMU_VADDR 0xff000000 -#define IOMMU_LEN 0x00c00000 -#define IOMMU_END 0xffc00000 /* KADB debugger vm starts here */ +#define VMALLOC_START 0xfe300000 +/* XXX Alter this when I get around to fixing sun4c - Anton */ +#define VMALLOC_END 0xffc00000 -/* On the sun4/4c we don't need an IOMMU area, but we need a place +/* + * On the sun4/4c we need a place * to reliably map locked down kernel data. This includes the * task_struct and kernel stack pages of each process plus the * scsi buffers during dvma IO transfers, also the floppy buffers @@ -44,22 +33,18 @@ * careful if you change NR_TASKS or else there won't be enough * room for it all. */ -#define SUN4C_LOCK_VADDR 0xff000000 -#define SUN4C_LOCK_LEN 0x00c00000 -#define SUN4C_LOCK_END 0xffc00000 +#define SUN4C_LOCK_VADDR 0xff000000 +#define SUN4C_LOCK_END 0xffc00000 -/* On sun4m machines we need per-cpu virtual areas */ -#define PERCPU_VADDR 0xffc00000 /* Base for per-cpu virtual mappings */ -#define PERCPU_ENTSIZE 0x00100000 -#define PERCPU_LEN ((PERCPU_ENTSIZE*SUN4M_NCPUS)) +#define KADB_DEBUGGER_BEGVM 0xffc00000 /* Where kern debugger is in virt-mem */ +#define KADB_DEBUGGER_ENDVM 0xffd00000 +#define DEBUG_FIRSTVADDR KADB_DEBUGGER_BEGVM +#define DEBUG_LASTVADDR KADB_DEBUGGER_ENDVM -/* per-cpu offsets */ -#define PERCPU_TBR_OFFSET 0x00000 /* %tbr, mainly used for identification. */ -#define PERCPU_KSTACK_OFFSET 0x01000 /* Beginning of kernel stack for this cpu */ -#define PERCPU_MBOX_OFFSET 0x03000 /* Prom SMP Mailbox */ -#define PERCPU_CPUID_OFFSET 0x04000 /* Per-cpu ID number. */ -#define PERCPU_ISALIVE_OFFSET 0x04004 /* Has CPU been initted yet? */ -#define PERCPU_ISIDLING_OFFSET 0x04008 /* Is CPU in idle loop spinning? */ +#define LINUX_OPPROM_BEGVM 0xffd00000 +#define LINUX_OPPROM_ENDVM 0xfff00000 -#endif /* !(_SPARC_VADDRS_H) */ +#define DVMA_VADDR 0xfff00000 /* Base area of the DVMA on suns */ +#define DVMA_END 0xfffc0000 +#endif /* !(_SPARC_VADDRS_H) */ |