diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-11-28 03:58:46 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-11-28 03:58:46 +0000 |
commit | b63ad0882a16a5d28003e57f2b0b81dee3fb322b (patch) | |
tree | 0a343ce219e2b8b38a5d702d66032c57b83d9720 /include/asm-sparc64 | |
parent | a9d7bff9a84dba79609a0002e5321b74c4d64c64 (diff) |
Merge with 2.4.0-test11.
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/bpp.h | 9 | ||||
-rw-r--r-- | include/asm-sparc64/envctrl.h | 4 | ||||
-rw-r--r-- | include/asm-sparc64/ethtool.h | 79 | ||||
-rw-r--r-- | include/asm-sparc64/module.h | 11 | ||||
-rw-r--r-- | include/asm-sparc64/openpromio.h | 6 | ||||
-rw-r--r-- | include/asm-sparc64/pgalloc.h | 13 | ||||
-rw-r--r-- | include/asm-sparc64/pgtable.h | 8 | ||||
-rw-r--r-- | include/asm-sparc64/xor.h | 396 |
8 files changed, 424 insertions, 102 deletions
diff --git a/include/asm-sparc64/bpp.h b/include/asm-sparc64/bpp.h index 4b36c9209..eb86015ee 100644 --- a/include/asm-sparc64/bpp.h +++ b/include/asm-sparc64/bpp.h @@ -70,13 +70,4 @@ # define BPP_GP_Select 0x0800 # define BPP_GP_nFault 0x1000 - -/* - * Prototype for the initialization routine. - */ - -#ifdef __KERNEL__ -extern int bpp_init(void); -#endif - #endif diff --git a/include/asm-sparc64/envctrl.h b/include/asm-sparc64/envctrl.h index e16de8fb2..53a665381 100644 --- a/include/asm-sparc64/envctrl.h +++ b/include/asm-sparc64/envctrl.h @@ -1,4 +1,4 @@ -/* $Id: envctrl.h,v 1.2 2000/10/17 16:20:36 davem Exp $ +/* $Id: envctrl.h,v 1.3 2000/11/03 00:37:40 davem Exp $ * * envctrl.h: Definitions for access to the i2c environment * monitoring on Ultrasparc systems. @@ -54,6 +54,8 @@ #define ENVCTRL_RD_ETHERNET_TEMPERATURE _IOR('p', 0x47, int) #define ENVCTRL_RD_MTHRBD_TEMPERATURE _IOR('p', 0x48, int) +#define ENVCTRL_RD_GLOBALADDRESS _IOR('p', 0x49, int) + /* Read return values for a voltage status request. */ #define ENVCTRL_VOLTAGE_POWERSUPPLY_GOOD 0x01 #define ENVCTRL_VOLTAGE_BAD 0x02 diff --git a/include/asm-sparc64/ethtool.h b/include/asm-sparc64/ethtool.h deleted file mode 100644 index 18d86c3de..000000000 --- a/include/asm-sparc64/ethtool.h +++ /dev/null @@ -1,79 +0,0 @@ -/* $Id: ethtool.h,v 1.2 2000/01/31 04:59:19 davem Exp $ - * ethtool.h: Defines for SparcLinux ethtool. - * - * Copyright (C) 1998 David S. Miller (davem@redhat.com) - */ - -#ifndef _SPARC64_ETHTOOL_H -#define _SPARC64_ETHTOOL_H - -/* We do things like this so it does not matter what kernel - * headers you have on your system etc. - */ -#undef SIOCETHTOOL -#define SIOCETHTOOL (SIOCDEVPRIVATE + 0x0f) - -/* This should work for both 32 and 64 bit userland. */ -struct ethtool_cmd { - u32 cmd; - u32 supported; - u16 speed; - u8 duplex; - u8 port; - u8 phy_address; - u8 transceiver; - u8 autoneg; -}; - -/* CMDs currently supported */ -#define SPARC_ETH_GSET 0x00000001 /* Get settings, non-privileged. */ -#define SPARC_ETH_SSET 0x00000002 /* Set settings, privileged. */ - -/* Indicates what features are supported by the interface. */ -#define SUPPORTED_10baseT_Half 0x00000001 -#define SUPPORTED_10baseT_Full 0x00000002 -#define SUPPORTED_100baseT_Half 0x00000004 -#define SUPPORTED_100baseT_Full 0x00000008 -#define SUPPORTED_1000baseT_Half 0x00000010 -#define SUPPORTED_1000baseT_Full 0x00000020 -#define SUPPORTED_Autoneg 0x00000040 -#define SUPPORTED_TP 0x00000080 -#define SUPPORTED_AUI 0x00000100 -#define SUPPORTED_MII 0x00000200 -#define SUPPORTED_FIBRE 0x00000400 - -/* The following are all involved in forcing a particular link - * mode for the device for setting things. When getting the - * devices settings, these indicate the current mode and whether - * it was foced up into this mode or autonegotiated. - */ - -/* The forced speec, 10Mb, 100Mb, gigabit. */ -#define SPEED_10 10 -#define SPEED_100 100 -#define SPEED_1000 1000 - -/* Duplex, half or full. */ -#define DUPLEX_HALF 0x00 -#define DUPLEX_FULL 0x01 - -/* Which connector port. */ -#define PORT_TP 0x00 -#define PORT_AUI 0x01 -#define PORT_MII 0x02 -#define PORT_FIBRE 0x03 - -/* Which tranceiver to use. */ -#define XCVR_INTERNAL 0x00 -#define XCVR_EXTERNAL 0x01 -#define XCVR_DUMMY1 0x02 -#define XCVR_DUMMY2 0x03 -#define XCVR_DUMMY3 0x04 - -/* Enable or disable autonegotiation. If this is set to enable, - * the forced link modes above are completely ignored. - */ -#define AUTONEG_DISABLE 0x00 -#define AUTONEG_ENABLE 0x01 - -#endif /* _SPARC64_ETHTOOL_H */ diff --git a/include/asm-sparc64/module.h b/include/asm-sparc64/module.h new file mode 100644 index 000000000..f44977ec8 --- /dev/null +++ b/include/asm-sparc64/module.h @@ -0,0 +1,11 @@ +#ifndef _ASM_SPARC64_MODULE_H +#define _ASM_SPARC64_MODULE_H +/* + * This file contains the sparc64 architecture specific module code. + */ + +extern void * module_map (unsigned long size); +extern void module_unmap (void *addr); +#define module_arch_init(x) (0) + +#endif /* _ASM_SPARC64_MODULE_H */ diff --git a/include/asm-sparc64/openpromio.h b/include/asm-sparc64/openpromio.h index 37420b761..555b3b5b1 100644 --- a/include/asm-sparc64/openpromio.h +++ b/include/asm-sparc64/openpromio.h @@ -64,11 +64,5 @@ struct opiocdesc #define OPIOCGETNEXT _IOWR('O', 5, int) #define OPIOCGETCHILD _IOWR('O', 6, int) - -#ifdef __KERNEL__ -int openprom_init(void); -#endif - - #endif /* _SPARC64_OPENPROMIO_H */ diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index be3dde29c..23603f287 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h @@ -1,4 +1,4 @@ -/* $Id */ +/* $Id: pgalloc.h,v 1.13 2000/11/06 06:59:04 davem Exp $ */ #ifndef _SPARC64_PGALLOC_H #define _SPARC64_PGALLOC_H @@ -21,8 +21,15 @@ /* These operations are unnecessary on the SpitFire since D-CACHE is write-through. */ #define flush_icache_range(start, end) do { } while (0) #define flush_page_to_ram(page) do { } while (0) -extern void __flush_dcache_page(void *addr); -#define flush_dcache_page(page) __flush_dcache_page((page)->virtual) + +extern void __flush_dcache_page(void *addr, int flush_icache); +#define flush_dcache_page(page) \ +do { if ((page)->mapping && !(page)->mapping->i_mmap && !(page)->mapping->i_mmap_shared) \ + set_bit(PG_dcache_dirty, &(page)->flags); \ + else \ + __flush_dcache_page((page)->virtual, \ + (page)->mapping != NULL); \ +} while(0) extern void __flush_dcache_range(unsigned long start, unsigned long end); diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 62c4c4ef4..a01042346 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h @@ -1,4 +1,4 @@ -/* $Id: pgtable.h,v 1.132 2000/10/19 00:50:16 davem Exp $ +/* $Id: pgtable.h,v 1.135 2000/11/08 04:49:24 davem Exp $ * pgtable.h: SpitFire page table operations. * * Copyright 1996,1997 David S. Miller (davem@caip.rutgers.edu) @@ -19,6 +19,8 @@ #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. @@ -233,7 +235,7 @@ extern pgd_t swapper_pg_dir[1]; #define mmu_lockarea(vaddr, len) (vaddr) #define mmu_unlockarea(vaddr, len) do { } while(0) -extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte); +extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); #define flush_icache_page(vma, pg) do { } while(0) @@ -284,8 +286,6 @@ __get_iospace (unsigned long addr) return ((sun4u_get_pte (addr) & 0xf0000000) >> 28); } -extern void * module_map (unsigned long size); -extern void module_unmap (void *addr); extern unsigned long *sparc64_valid_addr_bitmap; /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ diff --git a/include/asm-sparc64/xor.h b/include/asm-sparc64/xor.h new file mode 100644 index 000000000..0a3e1e876 --- /dev/null +++ b/include/asm-sparc64/xor.h @@ -0,0 +1,396 @@ +/* + * include/asm-sparc64/xor.h + * + * High speed xor_block operation for RAID4/5 utilizing the + * UltraSparc Visual Instruction Set. + * + * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * You should have received a copy of the GNU General Public License + * (for example /usr/src/linux/COPYING); if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * Requirements: + * !(((long)dest | (long)sourceN) & (64 - 1)) && + * !(len & 127) && len >= 256 + * + * It is done in pure assembly, as otherwise gcc makes it a non-leaf + * function, which is not what we want. + */ + +#include <asm/pstate.h> +#include <asm/asi.h> + +extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *); +extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *, + unsigned long *); +extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *, + unsigned long *, unsigned long *); +extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *, + unsigned long *, unsigned long *, unsigned long *); + +#define _S(x) __S(x) +#define __S(x) #x +#define DEF(x) __asm__(#x " = " _S(x)) + +DEF(FPRS_FEF); +DEF(FPRS_DU); +DEF(ASI_BLK_P); + +/* ??? We set and use %asi instead of using ASI_BLK_P directly because gas + currently does not accept symbolic constants for the ASI specifier. */ + +__asm__ (" + .text + .globl xor_vis_2 + .type xor_vis_2,@function +xor_vis_2: + rd %fprs, %g1 + andcc %g1, FPRS_FEF|FPRS_DU, %g0 + be,pt %icc, 0f + sethi %hi(VISenter), %g1 + jmpl %g1 + %lo(VISenter), %g7 + add %g7, 8, %g7 +0: wr %g0, FPRS_FEF, %fprs + rd %asi, %g1 + wr %g0, ASI_BLK_P, %asi + membar #LoadStore|#StoreLoad|#StoreStore + sub %o0, 128, %o0 + ldda [%o1] %asi, %f0 + ldda [%o2] %asi, %f16 + +2: ldda [%o1 + 64] %asi, %f32 + fxor %f0, %f16, %f16 + fxor %f2, %f18, %f18 + fxor %f4, %f20, %f20 + fxor %f6, %f22, %f22 + fxor %f8, %f24, %f24 + fxor %f10, %f26, %f26 + fxor %f12, %f28, %f28 + fxor %f14, %f30, %f30 + stda %f16, [%o1] %asi + ldda [%o2 + 64] %asi, %f48 + ldda [%o1 + 128] %asi, %f0 + fxor %f32, %f48, %f48 + fxor %f34, %f50, %f50 + add %o1, 128, %o1 + fxor %f36, %f52, %f52 + add %o2, 128, %o2 + fxor %f38, %f54, %f54 + subcc %o0, 128, %o0 + fxor %f40, %f56, %f56 + fxor %f42, %f58, %f58 + fxor %f44, %f60, %f60 + fxor %f46, %f62, %f62 + stda %f48, [%o1 - 64] %asi + bne,pt %xcc, 2b + ldda [%o2] %asi, %f16 + + ldda [%o1 + 64] %asi, %f32 + fxor %f0, %f16, %f16 + fxor %f2, %f18, %f18 + fxor %f4, %f20, %f20 + fxor %f6, %f22, %f22 + fxor %f8, %f24, %f24 + fxor %f10, %f26, %f26 + fxor %f12, %f28, %f28 + fxor %f14, %f30, %f30 + stda %f16, [%o1] %asi + ldda [%o2 + 64] %asi, %f48 + membar #Sync + fxor %f32, %f48, %f48 + fxor %f34, %f50, %f50 + fxor %f36, %f52, %f52 + fxor %f38, %f54, %f54 + fxor %f40, %f56, %f56 + fxor %f42, %f58, %f58 + fxor %f44, %f60, %f60 + fxor %f46, %f62, %f62 + stda %f48, [%o1 + 64] %asi + membar #Sync|#StoreStore|#StoreLoad + wr %g1, %g0, %asi + retl + wr %g0, 0, %fprs + .size xor_vis_2, .-xor_vis_2 + + + .globl xor_vis_3 + .type xor_vis_3,@function +xor_vis_3: + rd %fprs, %g1 + andcc %g1, FPRS_FEF|FPRS_DU, %g0 + be,pt %icc, 0f + sethi %hi(VISenter), %g1 + jmpl %g1 + %lo(VISenter), %g7 + add %g7, 8, %g7 +0: wr %g0, FPRS_FEF, %fprs + rd %asi, %g1 + wr %g0, ASI_BLK_P, %asi + membar #LoadStore|#StoreLoad|#StoreStore + sub %o0, 64, %o0 + ldda [%o1] %asi, %f0 + ldda [%o2] %asi, %f16 + +3: ldda [%o3] %asi, %f32 + fxor %f0, %f16, %f48 + fxor %f2, %f18, %f50 + add %o1, 64, %o1 + fxor %f4, %f20, %f52 + fxor %f6, %f22, %f54 + add %o2, 64, %o2 + fxor %f8, %f24, %f56 + fxor %f10, %f26, %f58 + fxor %f12, %f28, %f60 + fxor %f14, %f30, %f62 + ldda [%o1] %asi, %f0 + fxor %f48, %f32, %f48 + fxor %f50, %f34, %f50 + fxor %f52, %f36, %f52 + fxor %f54, %f38, %f54 + add %o3, 64, %o3 + fxor %f56, %f40, %f56 + fxor %f58, %f42, %f58 + subcc %o0, 64, %o0 + fxor %f60, %f44, %f60 + fxor %f62, %f46, %f62 + stda %f48, [%o1 - 64] %asi + bne,pt %xcc, 3b + ldda [%o2] %asi, %f16 + + ldda [%o3] %asi, %f32 + fxor %f0, %f16, %f48 + fxor %f2, %f18, %f50 + fxor %f4, %f20, %f52 + fxor %f6, %f22, %f54 + fxor %f8, %f24, %f56 + fxor %f10, %f26, %f58 + fxor %f12, %f28, %f60 + fxor %f14, %f30, %f62 + membar #Sync + fxor %f48, %f32, %f48 + fxor %f50, %f34, %f50 + fxor %f52, %f36, %f52 + fxor %f54, %f38, %f54 + fxor %f56, %f40, %f56 + fxor %f58, %f42, %f58 + fxor %f60, %f44, %f60 + fxor %f62, %f46, %f62 + stda %f48, [%o1] %asi + membar #Sync|#StoreStore|#StoreLoad + wr %g1, %g0, %asi + retl + wr %g0, 0, %fprs + .size xor_vis_3, .-xor_vis_3 + + + .globl xor_vis_4 + .type xor_vis_4,@function +xor_vis_4: + rd %fprs, %g1 + andcc %g1, FPRS_FEF|FPRS_DU, %g0 + be,pt %icc, 0f + sethi %hi(VISenter), %g1 + jmpl %g1 + %lo(VISenter), %g7 + add %g7, 8, %g7 +0: wr %g0, FPRS_FEF, %fprs + rd %asi, %g1 + wr %g0, ASI_BLK_P, %asi + membar #LoadStore|#StoreLoad|#StoreStore + sub %o0, 64, %o0 + ldda [%o1] %asi, %f0 + ldda [%o2] %asi, %f16 + +4: ldda [%o3] %asi, %f32 + fxor %f0, %f16, %f16 + fxor %f2, %f18, %f18 + add %o1, 64, %o1 + fxor %f4, %f20, %f20 + fxor %f6, %f22, %f22 + add %o2, 64, %o2 + fxor %f8, %f24, %f24 + fxor %f10, %f26, %f26 + fxor %f12, %f28, %f28 + fxor %f14, %f30, %f30 + ldda [%o4] %asi, %f48 + fxor %f16, %f32, %f32 + fxor %f18, %f34, %f34 + fxor %f20, %f36, %f36 + fxor %f22, %f38, %f38 + add %o3, 64, %o3 + fxor %f24, %f40, %f40 + fxor %f26, %f42, %f42 + fxor %f28, %f44, %f44 + fxor %f30, %f46, %f46 + ldda [%o1] %asi, %f0 + fxor %f32, %f48, %f48 + fxor %f34, %f50, %f50 + fxor %f36, %f52, %f52 + add %o4, 64, %o4 + fxor %f38, %f54, %f54 + fxor %f40, %f56, %f56 + fxor %f42, %f58, %f58 + subcc %o0, 64, %o0 + fxor %f44, %f60, %f60 + fxor %f46, %f62, %f62 + stda %f48, [%o1 - 64] %asi + bne,pt %xcc, 4b + ldda [%o2] %asi, %f16 + + ldda [%o3] %asi, %f32 + fxor %f0, %f16, %f16 + fxor %f2, %f18, %f18 + fxor %f4, %f20, %f20 + fxor %f6, %f22, %f22 + fxor %f8, %f24, %f24 + fxor %f10, %f26, %f26 + fxor %f12, %f28, %f28 + fxor %f14, %f30, %f30 + ldda [%o4] %asi, %f48 + fxor %f16, %f32, %f32 + fxor %f18, %f34, %f34 + fxor %f20, %f36, %f36 + fxor %f22, %f38, %f38 + fxor %f24, %f40, %f40 + fxor %f26, %f42, %f42 + fxor %f28, %f44, %f44 + fxor %f30, %f46, %f46 + membar #Sync + fxor %f32, %f48, %f48 + fxor %f34, %f50, %f50 + fxor %f36, %f52, %f52 + fxor %f38, %f54, %f54 + fxor %f40, %f56, %f56 + fxor %f42, %f58, %f58 + fxor %f44, %f60, %f60 + fxor %f46, %f62, %f62 + stda %f48, [%o1] %asi + membar #Sync|#StoreStore|#StoreLoad + wr %g1, %g0, %asi + retl + wr %g0, 0, %fprs + .size xor_vis_4, .-xor_vis_4 + + + .globl xor_vis_5 + .type xor_vis_5,@function +xor_vis_5: + rd %fprs, %g1 + andcc %g1, FPRS_FEF|FPRS_DU, %g0 + be,pt %icc, 0f + sethi %hi(VISenter), %g1 + jmpl %g1 + %lo(VISenter), %g7 + add %g7, 8, %g7 +0: wr %g0, FPRS_FEF, %fprs + rd %asi, %g1 + wr %g0, ASI_BLK_P, %asi + membar #LoadStore|#StoreLoad|#StoreStore + sub %o0, 64, %o0 + ldda [%o1] %asi, %f0 + ldda [%o2] %asi, %f16 + +5: ldda [%o3] %asi, %f32 + fxor %f0, %f16, %f48 + fxor %f2, %f18, %f50 + add %o1, 64, %o1 + fxor %f4, %f20, %f52 + fxor %f6, %f22, %f54 + add %o2, 64, %o2 + fxor %f8, %f24, %f56 + fxor %f10, %f26, %f58 + fxor %f12, %f28, %f60 + fxor %f14, %f30, %f62 + ldda [%o4] %asi, %f16 + fxor %f48, %f32, %f48 + fxor %f50, %f34, %f50 + fxor %f52, %f36, %f52 + fxor %f54, %f38, %f54 + add %o3, 64, %o3 + fxor %f56, %f40, %f56 + fxor %f58, %f42, %f58 + fxor %f60, %f44, %f60 + fxor %f62, %f46, %f62 + ldda [%o5] %asi, %f32 + fxor %f48, %f16, %f48 + fxor %f50, %f18, %f50 + add %o4, 64, %o4 + fxor %f52, %f20, %f52 + fxor %f54, %f22, %f54 + add %o5, 64, %o5 + fxor %f56, %f24, %f56 + fxor %f58, %f26, %f58 + fxor %f60, %f28, %f60 + fxor %f62, %f30, %f62 + ldda [%o1] %asi, %f0 + fxor %f48, %f32, %f48 + fxor %f50, %f34, %f50 + fxor %f52, %f36, %f52 + fxor %f54, %f38, %f54 + fxor %f56, %f40, %f56 + fxor %f58, %f42, %f58 + subcc %o0, 64, %o0 + fxor %f60, %f44, %f60 + fxor %f62, %f46, %f62 + stda %f48, [%o1 - 64] %asi + bne,pt %xcc, 5b + ldda [%o2] %asi, %f16 + + ldda [%o3] %asi, %f32 + fxor %f0, %f16, %f48 + fxor %f2, %f18, %f50 + fxor %f4, %f20, %f52 + fxor %f6, %f22, %f54 + fxor %f8, %f24, %f56 + fxor %f10, %f26, %f58 + fxor %f12, %f28, %f60 + fxor %f14, %f30, %f62 + ldda [%o4] %asi, %f16 + fxor %f48, %f32, %f48 + fxor %f50, %f34, %f50 + fxor %f52, %f36, %f52 + fxor %f54, %f38, %f54 + fxor %f56, %f40, %f56 + fxor %f58, %f42, %f58 + fxor %f60, %f44, %f60 + fxor %f62, %f46, %f62 + ldda [%o5] %asi, %f32 + fxor %f48, %f16, %f48 + fxor %f50, %f18, %f50 + fxor %f52, %f20, %f52 + fxor %f54, %f22, %f54 + fxor %f56, %f24, %f56 + fxor %f58, %f26, %f58 + fxor %f60, %f28, %f60 + fxor %f62, %f30, %f62 + membar #Sync + fxor %f48, %f32, %f48 + fxor %f50, %f34, %f50 + fxor %f52, %f36, %f52 + fxor %f54, %f38, %f54 + fxor %f56, %f40, %f56 + fxor %f58, %f42, %f58 + fxor %f60, %f44, %f60 + fxor %f62, %f46, %f62 + stda %f48, [%o1] %asi + membar #Sync|#StoreStore|#StoreLoad + wr %g1, %g0, %asi + retl + wr %g0, 0, %fprs + .size xor_vis_5, .-xor_vis_5 +"); + +static struct xor_block_template xor_block_VIS = { + name: "VIS", + do_2: xor_vis_2, + do_3: xor_vis_3, + do_4: xor_vis_4, + do_5: xor_vis_5, +}; + +#define XOR_TRY_TEMPLATES xor_speed(&xor_block_VIS) |