diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
commit | 27cfca1ec98e91261b1a5355d10a8996464b63af (patch) | |
tree | 8e895a53e372fa682b4c0a585b9377d67ed70d0e /include/asm-sparc64 | |
parent | 6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff) |
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too
o Upgrade to 2.1.89.
Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'include/asm-sparc64')
37 files changed, 1098 insertions, 365 deletions
diff --git a/include/asm-sparc64/asm_offsets.h b/include/asm-sparc64/asm_offsets.h index 18cf7c541..5dac70418 100644 --- a/include/asm-sparc64/asm_offsets.h +++ b/include/asm-sparc64/asm_offsets.h @@ -8,32 +8,32 @@ #define ASIZ_task_counter 0x00000008 #define AOFF_task_priority 0x00000010 #define ASIZ_task_priority 0x00000008 -#define AOFF_task_signal 0x00000018 -#define ASIZ_task_signal 0x00000008 -#define AOFF_task_blocked 0x00000020 -#define ASIZ_task_blocked 0x00000008 -#define AOFF_task_flags 0x00000028 +#define AOFF_task_flags 0x00000018 #define ASIZ_task_flags 0x00000008 -#define AOFF_task_errno 0x00000030 -#define ASIZ_task_errno 0x00000004 -#define AOFF_task_debugreg 0x00000038 +#define AOFF_task_addr_limit 0x00000020 +#define ASIZ_task_addr_limit 0x00000008 +#define AOFF_task_sigpending 0x00000028 +#define ASIZ_task_sigpending 0x00000004 +#define AOFF_task_debugreg 0x00000030 #define ASIZ_task_debugreg 0x00000040 -#define AOFF_task_exec_domain 0x00000078 +#define AOFF_task_exec_domain 0x00000070 #define ASIZ_task_exec_domain 0x00000008 -#define AOFF_task_binfmt 0x00000080 +#define AOFF_task_binfmt 0x00000078 #define ASIZ_task_binfmt 0x00000008 -#define AOFF_task_next_task 0x00000088 +#define AOFF_task_next_task 0x00000080 #define ASIZ_task_next_task 0x00000008 -#define AOFF_task_prev_task 0x00000090 +#define AOFF_task_prev_task 0x00000088 #define ASIZ_task_prev_task 0x00000008 -#define AOFF_task_next_run 0x00000098 +#define AOFF_task_next_run 0x00000090 #define ASIZ_task_next_run 0x00000008 -#define AOFF_task_prev_run 0x000000a0 +#define AOFF_task_prev_run 0x00000098 #define ASIZ_task_prev_run 0x00000008 -#define AOFF_task_exit_code 0x000000a8 +#define AOFF_task_exit_code 0x000000a0 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x000000ac +#define AOFF_task_exit_signal 0x000000a4 #define ASIZ_task_exit_signal 0x00000004 +#define AOFF_task_pdeath_signal 0x000000a8 +#define ASIZ_task_pdeath_signal 0x00000004 #define AOFF_task_personality 0x000000b0 #define ASIZ_task_personality 0x00000008 #define AOFF_task_pid 0x000000bc @@ -69,100 +69,110 @@ #define AOFF_task_wait_chldexit 0x00000198 #define ASIZ_task_wait_chldexit 0x00000008 #define AOFF_task_uid 0x000001a0 -#define ASIZ_task_uid 0x00000002 -#define AOFF_task_euid 0x000001a2 -#define ASIZ_task_euid 0x00000002 -#define AOFF_task_suid 0x000001a4 -#define ASIZ_task_suid 0x00000002 -#define AOFF_task_fsuid 0x000001a6 -#define ASIZ_task_fsuid 0x00000002 -#define AOFF_task_gid 0x000001a8 -#define ASIZ_task_gid 0x00000002 -#define AOFF_task_egid 0x000001aa -#define ASIZ_task_egid 0x00000002 -#define AOFF_task_sgid 0x000001ac -#define ASIZ_task_sgid 0x00000002 -#define AOFF_task_fsgid 0x000001ae -#define ASIZ_task_fsgid 0x00000002 -#define AOFF_task_timeout 0x000001b0 +#define ASIZ_task_uid 0x00000004 +#define AOFF_task_euid 0x000001a4 +#define ASIZ_task_euid 0x00000004 +#define AOFF_task_suid 0x000001a8 +#define ASIZ_task_suid 0x00000004 +#define AOFF_task_fsuid 0x000001ac +#define ASIZ_task_fsuid 0x00000004 +#define AOFF_task_gid 0x000001b0 +#define ASIZ_task_gid 0x00000004 +#define AOFF_task_egid 0x000001b4 +#define ASIZ_task_egid 0x00000004 +#define AOFF_task_sgid 0x000001b8 +#define ASIZ_task_sgid 0x00000004 +#define AOFF_task_fsgid 0x000001bc +#define ASIZ_task_fsgid 0x00000004 +#define AOFF_task_timeout 0x000001c0 #define ASIZ_task_timeout 0x00000008 -#define AOFF_task_policy 0x000001b8 +#define AOFF_task_policy 0x000001c8 #define ASIZ_task_policy 0x00000008 -#define AOFF_task_rt_priority 0x000001c0 +#define AOFF_task_rt_priority 0x000001d0 #define ASIZ_task_rt_priority 0x00000008 -#define AOFF_task_it_real_value 0x000001c8 +#define AOFF_task_it_real_value 0x000001d8 #define ASIZ_task_it_real_value 0x00000008 -#define AOFF_task_it_prof_value 0x000001d0 +#define AOFF_task_it_prof_value 0x000001e0 #define ASIZ_task_it_prof_value 0x00000008 -#define AOFF_task_it_virt_value 0x000001d8 +#define AOFF_task_it_virt_value 0x000001e8 #define ASIZ_task_it_virt_value 0x00000008 -#define AOFF_task_it_real_incr 0x000001e0 +#define AOFF_task_it_real_incr 0x000001f0 #define ASIZ_task_it_real_incr 0x00000008 -#define AOFF_task_it_prof_incr 0x000001e8 +#define AOFF_task_it_prof_incr 0x000001f8 #define ASIZ_task_it_prof_incr 0x00000008 -#define AOFF_task_it_virt_incr 0x000001f0 +#define AOFF_task_it_virt_incr 0x00000200 #define ASIZ_task_it_virt_incr 0x00000008 -#define AOFF_task_real_timer 0x000001f8 +#define AOFF_task_real_timer 0x00000208 #define ASIZ_task_real_timer 0x00000028 -#define AOFF_task_times 0x00000220 +#define AOFF_task_times 0x00000230 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x00000240 +#define AOFF_task_start_time 0x00000250 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_min_flt 0x00000248 +#define AOFF_task_min_flt 0x00000258 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x00000250 +#define AOFF_task_maj_flt 0x00000260 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x00000258 +#define AOFF_task_nswap 0x00000268 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x00000260 +#define AOFF_task_cmin_flt 0x00000270 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x00000268 +#define AOFF_task_cmaj_flt 0x00000278 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x00000270 +#define AOFF_task_cnswap 0x00000280 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_swap_address 0x00000280 +#define AOFF_task_swap_address 0x00000290 #define ASIZ_task_swap_address 0x00000008 -#define AOFF_task_old_maj_flt 0x00000288 +#define AOFF_task_old_maj_flt 0x00000298 #define ASIZ_task_old_maj_flt 0x00000008 -#define AOFF_task_dec_flt 0x00000290 +#define AOFF_task_dec_flt 0x000002a0 #define ASIZ_task_dec_flt 0x00000008 -#define AOFF_task_swap_cnt 0x00000298 +#define AOFF_task_swap_cnt 0x000002a8 #define ASIZ_task_swap_cnt 0x00000008 -#define AOFF_task_rlim 0x000002a0 +#define AOFF_task_rlim 0x000002b0 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000340 +#define AOFF_task_used_math 0x00000350 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x00000342 +#define AOFF_task_io_usage 0x00000358 +#define ASIZ_task_io_usage 0x00000008 +#define AOFF_task_comm 0x00000360 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x00000354 +#define AOFF_task_link_count 0x00000370 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000358 +#define AOFF_task_tty 0x00000378 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000360 +#define AOFF_task_semundo 0x00000380 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000368 +#define AOFF_task_semsleeping 0x00000388 #define ASIZ_task_semsleeping 0x00000008 -#define AOFF_task_ldt 0x00000370 +#define AOFF_task_ldt 0x00000390 #define ASIZ_task_ldt 0x00000008 -#define AOFF_task_tss 0x00000380 -#define ASIZ_task_tss 0x000004c0 -#define AOFF_task_fs 0x00000840 +#define AOFF_task_tss 0x000003a0 +#define ASIZ_task_tss 0x00000490 +#define AOFF_task_fs 0x00000830 #define ASIZ_task_fs 0x00000008 -#define AOFF_task_files 0x00000848 +#define AOFF_task_files 0x00000838 #define ASIZ_task_files 0x00000008 -#define AOFF_task_mm 0x00000850 +#define AOFF_task_mm 0x00000840 #define ASIZ_task_mm 0x00000008 -#define AOFF_task_sig 0x00000858 +#define AOFF_task_sig 0x00000848 #define ASIZ_task_sig 0x00000008 -#define AOFF_task_has_cpu 0x00000860 +#define AOFF_task_signal 0x00000850 +#define ASIZ_task_signal 0x00000008 +#define AOFF_task_blocked 0x00000858 +#define ASIZ_task_blocked 0x00000008 +#define AOFF_task_sigqueue 0x00000860 +#define ASIZ_task_sigqueue 0x00000008 +#define AOFF_task_sigqueue_tail 0x00000868 +#define ASIZ_task_sigqueue_tail 0x00000008 +#define AOFF_task_has_cpu 0x00000870 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x00000864 +#define AOFF_task_processor 0x00000874 #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x00000868 +#define AOFF_task_last_processor 0x00000878 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x0000086c +#define AOFF_task_lock_depth 0x0000087c #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_sigmask_lock 0x00000870 +#define AOFF_task_sigmask_lock 0x00000880 #define ASIZ_task_sigmask_lock 0x00000000 #define AOFF_mm_mmap 0x00000000 #define ASIZ_mm_mmap 0x00000008 @@ -213,34 +223,34 @@ #define AOFF_thread_ksp 0x00000000 #define ASIZ_thread_ksp 0x00000008 #define AOFF_thread_kpc 0x00000008 -#define ASIZ_thread_kpc 0x00000008 -#define AOFF_thread_wstate 0x00000010 -#define ASIZ_thread_wstate 0x00000008 -#define AOFF_thread_cwp 0x00000018 -#define ASIZ_thread_cwp 0x00000004 -#define AOFF_thread_ctx 0x0000001c -#define ASIZ_thread_ctx 0x00000004 -#define AOFF_thread_flags 0x00000020 -#define ASIZ_thread_flags 0x00000004 -#define AOFF_thread_new_signal 0x00000024 -#define ASIZ_thread_new_signal 0x00000004 -#define AOFF_thread_current_ds 0x00000028 +#define ASIZ_thread_kpc 0x00000004 +#define AOFF_thread_wstate 0x0000000c +#define ASIZ_thread_wstate 0x00000002 +#define AOFF_thread_cwp 0x0000000e +#define ASIZ_thread_cwp 0x00000002 +#define AOFF_thread_flags 0x00000010 +#define ASIZ_thread_flags 0x00000002 +#define AOFF_thread_ctx 0x00000012 +#define ASIZ_thread_ctx 0x00000002 +#define AOFF_thread_w_saved 0x00000014 +#define ASIZ_thread_w_saved 0x00000002 +#define AOFF_thread_new_signal 0x00000016 +#define ASIZ_thread_new_signal 0x00000002 +#define AOFF_thread_current_ds 0x00000018 #define ASIZ_thread_current_ds 0x00000008 -#define AOFF_thread_w_saved 0x00000030 -#define ASIZ_thread_w_saved 0x00000008 -#define AOFF_thread_kregs 0x00000038 +#define AOFF_thread_kregs 0x00000020 #define ASIZ_thread_kregs 0x00000008 -#define AOFF_thread_reg_window 0x00000040 +#define AOFF_thread_utraps 0x00000028 +#define ASIZ_thread_utraps 0x00000008 +#define AOFF_thread_reg_window 0x00000030 #define ASIZ_thread_reg_window 0x00000400 -#define AOFF_thread_rwbuf_stkptrs 0x00000440 +#define AOFF_thread_rwbuf_stkptrs 0x00000430 #define ASIZ_thread_rwbuf_stkptrs 0x00000040 -#define AOFF_thread_sig_address 0x00000480 +#define AOFF_thread_sig_address 0x00000470 #define ASIZ_thread_sig_address 0x00000008 -#define AOFF_thread_sig_desc 0x00000488 +#define AOFF_thread_sig_desc 0x00000478 #define ASIZ_thread_sig_desc 0x00000008 -#define AOFF_thread_sstk_info 0x00000490 +#define AOFF_thread_sstk_info 0x00000480 #define ASIZ_thread_sstk_info 0x00000010 -#define AOFF_thread_core_exec 0x000004a0 -#define ASIZ_thread_core_exec 0x00000020 #endif /* __ASM_OFFSETS_H__ */ diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h index ab4523e9d..e8b600eb0 100644 --- a/include/asm-sparc64/bitops.h +++ b/include/asm-sparc64/bitops.h @@ -1,4 +1,4 @@ -/* $Id: bitops.h,v 1.22 1997/08/07 02:54:04 davem Exp $ +/* $Id: bitops.h,v 1.23 1997/12/18 02:44:12 ecd Exp $ * bitops.h: Bit string operations on the V9. * * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu) @@ -7,6 +7,7 @@ #ifndef _SPARC64_BITOPS_H #define _SPARC64_BITOPS_H +#include <asm/byteorder.h> #include <asm/asi.h> /* For the little endian spaces. */ /* These can all be exported to userland, because the atomic @@ -287,15 +288,6 @@ extern __inline__ int test_le_bit(int nr, __const__ void * addr) #define find_first_zero_le_bit(addr, size) \ find_next_zero_le_bit((addr), (size), 0) -extern __inline__ unsigned long __swab64p(unsigned long *addr) -{ - unsigned long ret; - __asm__ __volatile__ ("ldxa [%1] %2, %0" - : "=r" (ret) - : "r" (addr), "i" (ASI_PL)); - return ret; -} - extern __inline__ unsigned long find_next_zero_le_bit(void *addr, unsigned long size, unsigned long offset) { unsigned long *p = ((unsigned long *) addr) + (offset >> 6); diff --git a/include/asm-sparc64/byteorder.h b/include/asm-sparc64/byteorder.h index 43964767b..f8c370d26 100644 --- a/include/asm-sparc64/byteorder.h +++ b/include/asm-sparc64/byteorder.h @@ -1,3 +1,4 @@ +/* $Id: byteorder.h,v 1.8 1997/12/18 02:44:14 ecd Exp $ */ #ifndef _SPARC64_BYTEORDER_H #define _SPARC64_BYTEORDER_H @@ -26,7 +27,8 @@ static __inline__ __u32 ___arch__swab32p(__u32 *addr) return ret; } -static __inline__ __u64 ___arch__swab64p(__u64 *addr) { +static __inline__ __u64 ___arch__swab64p(__u64 *addr) +{ __u64 ret; __asm__ __volatile__ ("ldxa [%1] %2, %0" @@ -41,6 +43,8 @@ static __inline__ __u64 ___arch__swab64p(__u64 *addr) { #define __BYTEORDER_HAS_U64__ +#endif /* __GNUC__ */ + #include <linux/byteorder/big_endian.h> #endif /* _SPARC64_BYTEORDER_H */ diff --git a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h index eac45ef9a..1df90bce6 100644 --- a/include/asm-sparc64/delay.h +++ b/include/asm-sparc64/delay.h @@ -1,4 +1,4 @@ -/* $Id: delay.h,v 1.6 1997/07/29 21:11:22 davem Exp $ +/* $Id: delay.h,v 1.7 1997/11/07 18:24:31 mj Exp $ * delay.h: Linux delay routines on the V9. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu). @@ -46,10 +46,4 @@ extern __inline__ void __udelay(unsigned long usecs, unsigned long lps) #define udelay(usecs) __udelay((usecs),__udelay_val) -extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) -{ - return (a*b)/c; -} - #endif /* defined(__SPARC64_DELAY_H) */ - diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index 0fe16f474..4337c0193 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h @@ -1,4 +1,4 @@ -/* $Id: ebus.h,v 1.3 1997/09/05 23:00:14 ecd Exp $ +/* $Id: ebus.h,v 1.4 1998/01/10 18:26:08 ecd Exp $ * ebus.h: PCI to Ebus pseudo driver software state. * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -12,6 +12,7 @@ struct linux_ebus_child { struct linux_ebus_child *next; struct linux_ebus_device *parent; + struct linux_ebus *bus; int prom_node; char prom_name[64]; unsigned long base_address[PROMREG_MAX]; @@ -23,7 +24,7 @@ struct linux_ebus_child { struct linux_ebus_device { struct linux_ebus_device *next; struct linux_ebus_child *children; - struct linux_ebus *parent; + struct linux_ebus *bus; int prom_node; char prom_name[64]; unsigned long base_address[PROMREG_MAX]; diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h index caf1c9434..a6891d681 100644 --- a/include/asm-sparc64/elf.h +++ b/include/asm-sparc64/elf.h @@ -1,4 +1,4 @@ -/* $Id: elf.h,v 1.8 1997/08/21 18:09:07 richard Exp $ */ +/* $Id: elf.h,v 1.13 1997/10/03 18:44:14 davem Exp $ */ #ifndef __ASM_SPARC64_ELF_H #define __ASM_SPARC64_ELF_H @@ -25,10 +25,6 @@ typedef unsigned long elf_fpregset_t; #define ELF_DATA ELFDATA2MSB #endif -#ifndef ELF_FLAGS_INIT -#define ELF_FLAGS_INIT current->tss.flags &= ~SPARC_FLAG_32BIT -#endif - /* * This is used to ensure we don't load something for the wrong architecture. */ @@ -45,7 +41,36 @@ typedef unsigned long elf_fpregset_t; that it will "exec", and that there is sufficient room for the brk. */ #ifndef ELF_ET_DYN_BASE -#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) +#define ELF_ET_DYN_BASE 0x50000000000 +#endif + + +/* This yields a mask that user programs can use to figure out what + instruction set this cpu supports. */ + +/* On Ultra, we support all of the v8 capabilities. */ +#define ELF_HWCAP (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | \ + HWCAP_SPARC_SWAP | HWCAP_SPARC_MULDIV) + +/* This yields a string that ld.so will use to load implementation + specific libraries for optimization. This is more specific in + intent than poking at uname or /proc/cpuinfo. */ + +#define ELF_PLATFORM (NULL) + +#ifdef __KERNEL__ +#define SET_PERSONALITY(ex, ibcs2) \ +do { \ + if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ + current->tss.flags |= SPARC_FLAG_32BIT; \ + else \ + current->tss.flags &= ~SPARC_FLAG_32BIT; \ + \ + if (ibcs2) \ + current->personality = PER_SVR4; \ + else if (current->personality != PER_LINUX32) \ + current->personality = PER_LINUX; \ +} while (0) #endif #endif /* !(__ASM_SPARC64_ELF_H) */ diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index 48d46a9f6..4ae034a33 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h @@ -1,4 +1,4 @@ -/* $Id: floppy.h,v 1.4 1997/09/05 23:00:15 ecd Exp $ +/* $Id: floppy.h,v 1.7 1997/09/07 03:34:08 davem Exp $ * asm-sparc64/floppy.h: Sparc specific parts of the Floppy driver. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -42,6 +42,7 @@ struct sun_flpy_controller { /* You'll only ever find one controller on a SparcStation anyways. */ static struct sun_flpy_controller *sun_fdc = NULL; volatile unsigned char *fdc_status; +static struct linux_sbus_device *floppy_sdev = NULL; struct sun_floppy_ops { unsigned char (*fd_inb) (unsigned long port); @@ -229,10 +230,25 @@ static int sun_fd_request_irq(void) int error; if(!once) { + struct devid_cookie dcookie; + once = 1; - error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, SA_INTERRUPT, "floppy"); + + dcookie.real_dev_id = NULL; + dcookie.imap = dcookie.iclr = 0; + dcookie.pil = -1; + dcookie.bus_cookie = floppy_sdev->my_bus; + + error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, + (SA_INTERRUPT | SA_SBUS | SA_DCOOKIE), + "floppy", &dcookie); + + if(error == 0) + FLOPPY_IRQ = dcookie.ret_ino; + return ((error == 0) ? 0 : -1); - } else return 0; + } + return 0; } static void sun_fd_enable_irq(void) @@ -378,14 +394,16 @@ static unsigned long sun_floppy_init(void) char state[128]; int fd_node, num_regs; struct linux_sbus *bus; - struct linux_sbus_device *sdev; + struct linux_sbus_device *sdev = NULL; - FLOPPY_IRQ = 11; for_all_sbusdev (sdev, bus) { if (!strcmp(sdev->prom_name, "SUNW,fdtwo")) break; } - if (!bus) { + if(sdev) { + floppy_sdev = sdev; + FLOPPY_IRQ = sdev->irqs[0].pri; + } else { #ifdef CONFIG_PCI struct linux_ebus *ebus; struct linux_ebus_device *edev; @@ -438,7 +456,8 @@ static unsigned long sun_floppy_init(void) } fd_node = sdev->prom_node; prom_getproperty(fd_node, "status", state, sizeof(state)); - if(!strcmp(state, "disabled")) return -1; + if(!strncmp(state, "disabled", 8)) + return -1; num_regs = prom_getproperty(fd_node, "reg", (char *) fd_regs, sizeof(fd_regs)); num_regs = (num_regs / sizeof(fd_regs[0])); prom_apply_sbus_ranges(sdev->my_bus, fd_regs, num_regs, sdev); diff --git a/include/asm-sparc64/fpumacro.h b/include/asm-sparc64/fpumacro.h index dab134472..91b9b81f8 100644 --- a/include/asm-sparc64/fpumacro.h +++ b/include/asm-sparc64/fpumacro.h @@ -7,6 +7,16 @@ #ifndef _SPARC64_FPUMACRO_H #define _SPARC64_FPUMACRO_H +#include <asm/asi.h> + +struct fpustate { + u32 regs[64]; + u64 fsr; + u64 gsr; +}; + +#define FPUSTATE (struct fpustate *)(((unsigned long)current) + (((PAGE_SIZE<<1)-((64*4)+(2*8))) & ~(64 - 1))) + extern __inline__ unsigned long fprs_read(void) { unsigned long retval; diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index e6d13f2de..3316c0c1d 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h @@ -1,4 +1,4 @@ -/* $Id: io.h,v 1.12 1997/08/19 03:11:52 davem Exp $ */ +/* $Id: io.h,v 1.14 1997/11/01 10:23:58 ecd Exp $ */ #ifndef __SPARC64_IO_H #define __SPARC64_IO_H @@ -91,21 +91,56 @@ extern void insw(unsigned long addr, void *dst, unsigned long count); extern void insl(unsigned long addr, void *dst, unsigned long count); /* Memory functions, same as I/O accesses on Ultra. */ -#define readb(addr) inb(addr) -#define readw(addr) inw(addr) -#define readl(addr) inl(addr) -#define writeb(b, addr) outb((b), (addr)) -#define writew(w, addr) outw((w), (addr)) -#define writel(l, addr) outl((l), (addr)) +#define readb(addr) inb((unsigned long)addr) +#define readw(addr) inw((unsigned long)addr) +#define readl(addr) inl((unsigned long)addr) +#define writeb(b, addr) outb((b), (unsigned long)(addr)) +#define writew(w, addr) outw((w), (unsigned long)(addr)) +#define writel(l, addr) outl((l), (unsigned long)(addr)) /* Memcpy to/from I/O space is just a regular memory operation on Ultra as well. */ +/* + * FIXME: Write faster routines using ASL_*L for this. + */ +static inline void * +memset_io(void *dst, int c, __kernel_size_t n) +{ + char *d = dst; + + while (n--) + *d++ = c; + + return dst; +} + +static inline void * +memcpy_fromio(void *dst, const void *src, __kernel_size_t n) +{ + const char *s = src; + char *d = dst; + + while (n--) + *d++ = *s++; + + return dst; +} + +static inline void * +memcpy_toio(void *dst, const void *src, __kernel_size_t n) +{ + const char *s = src; + char *d = dst; + + while (n--) + *d++ = *s++; + + return dst; +} + #if 0 /* XXX Not exactly, we need to use ASI_*L from/to the I/O end, * XXX so these are disabled until we code that stuff. */ -#define memset_io(a,b,c) memset(((char *)(a)),(b),(c)) -#define memcpy_fromio(a,b,c) memcpy((a),((char *)(b)),(c)) -#define memcpy_toio(a,b,c) memcpy(((char *)(a)),(b),(c)) #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),((char *)(b)),(c),(d)) #endif diff --git a/include/asm-sparc64/ioctls.h b/include/asm-sparc64/ioctls.h index 56d74c356..c06f75ad0 100644 --- a/include/asm-sparc64/ioctls.h +++ b/include/asm-sparc64/ioctls.h @@ -1,4 +1,4 @@ -/* $Id: ioctls.h,v 1.5 1997/08/12 04:13:13 ecd Exp $ */ +/* $Id: ioctls.h,v 1.6 1997/12/16 19:20:58 davem Exp $ */ #ifndef _ASM_SPARC64_IOCTLS_H #define _ASM_SPARC64_IOCTLS_H @@ -76,6 +76,9 @@ #define TIOCGPGRP _IOR('t', 131, int) #define TIOCSCTTY _IO('t', 132) #define TIOCGSID _IOR('t', 133, int) +/* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ +#define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ +#define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ /* Little f */ #define FIOCLEX _IO('f', 1) diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 2f946fbab..1b36e2323 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h @@ -1,4 +1,4 @@ -/* $Id: irq.h,v 1.6 1997/08/07 08:06:40 davem Exp $ +/* $Id: irq.h,v 1.7 1997/09/07 02:56:44 davem Exp $ * irq.h: IRQ registers on the 64-bit Sparc. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -49,7 +49,8 @@ extern void set_irq_udt(int); extern int request_fast_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), - unsigned long flags, __const__ char *devname); + unsigned long flags, __const__ char *devname, + void *dev_id); extern __inline__ void set_softint(unsigned long bits) { diff --git a/include/asm-sparc64/kdebug.h b/include/asm-sparc64/kdebug.h index fe3055836..4b61cc432 100644 --- a/include/asm-sparc64/kdebug.h +++ b/include/asm-sparc64/kdebug.h @@ -1,4 +1,4 @@ -/* $Id: kdebug.h,v 1.2 1997/04/04 00:50:21 davem Exp $ +/* $Id: kdebug.h,v 1.3 1997/12/14 23:24:47 ecd Exp $ * kdebug.h: Defines and definitions for debugging the Linux kernel * under various kernel debuggers. * @@ -74,8 +74,4 @@ extern __inline__ void sp_enter_debugger(void) #define KDEBUG_DUNNO2_OFF 0x8 #define KDEBUG_TEACH_OFF 0xc -/* ugh... */ -#define TRAP_TRACE(reg1, reg2) \ - - #endif /* !(_SPARC64_KDEBUG_H) */ diff --git a/include/asm-sparc64/keyboard.h b/include/asm-sparc64/keyboard.h index dba75e0de..1bc97d597 100644 --- a/include/asm-sparc64/keyboard.h +++ b/include/asm-sparc64/keyboard.h @@ -1,4 +1,4 @@ -/* $Id: keyboard.h,v 1.1 1997/09/04 05:50:39 ecd Exp $ +/* $Id: keyboard.h,v 1.2 1997/09/07 15:40:49 ecd Exp $ * linux/include/asm-sparc64/keyboard.h * * Created Aug 29 1997 by Eddie C. Dost (ecd@skynet.be) @@ -26,15 +26,23 @@ extern void pcikbd_leds(unsigned char leds); extern void pcikbd_init_hw(void); extern unsigned char pcikbd_sysrq_xlate[128]; -#define kbd_setkeycode pcikbd_setkeycode -#define kbd_getkeycode pcikbd_getkeycode -#define kbd_pretranslate pcikbd_pretranslate -#define kbd_translate pcikbd_translate -#define kbd_unexpected_up pcikbd_unexpected_up -#define kbd_leds pcikbd_leds -#define kbd_init_hw pcikbd_init_hw -#define kbd_sysrq_xlate pcikbd_sysrq_xlate -#define kbd_init pcikbd_init +#define kbd_setkeycode pcikbd_setkeycode +#define kbd_getkeycode pcikbd_getkeycode +#define kbd_pretranslate pcikbd_pretranslate +#define kbd_translate pcikbd_translate +#define kbd_unexpected_up pcikbd_unexpected_up +#define kbd_leds pcikbd_leds +#define kbd_init_hw pcikbd_init_hw +#define kbd_sysrq_xlate pcikbd_sysrq_xlate +#define kbd_init pcikbd_init + +#define compute_shiftstate pci_compute_shiftstate +#define keyboard_wait_for_keypress pci_wait_for_keypress +#define getkeycode pci_getkeycode +#define setkeycode pci_setkeycode +#define getledstate pci_getledstate +#define setledstate pci_setledstate +#define register_leds pci_register_leds #define SYSRQ_KEY 0x54 diff --git a/include/asm-sparc64/md.h b/include/asm-sparc64/md.h new file mode 100644 index 000000000..03879934e --- /dev/null +++ b/include/asm-sparc64/md.h @@ -0,0 +1,91 @@ +/* $Id: md.h,v 1.2 1997/12/27 16:28:38 jj Exp $ + * md.h: High speed xor_block operation for RAID4/5 + * utilizing the UltraSparc Visual Instruction Set. + * + * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) + */ + +#ifndef __ASM_MD_H +#define __ASM_MD_H + +#include <asm/head.h> +#include <asm/asi.h> + +#define HAVE_ARCH_XORBLOCK + +#define MD_XORBLOCK_ALIGNMENT 64 + +/* void __xor_block (char *dest, char *src, long len) + * { + * while (len--) *dest++ ^= *src++; + * } + * + * Requirements: + * !(((long)dest | (long)src) & (MD_XORBLOCK_ALIGNMENT - 1)) && + * !(len & 127) && len >= 256 + */ + +static inline void __xor_block (char *dest, char *src, long len) +{ + __asm__ __volatile__ (" + wr %%g0, %3, %%fprs + wr %%g0, %4, %%asi + membar #LoadStore|#StoreLoad|#StoreStore + sub %2, 128, %2 + ldda [%0] %4, %%f0 + ldda [%1] %4, %%f16 +1: ldda [%0 + 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, [%0] %4 + ldda [%1 + 64] %%asi, %%f48 + ldda [%0 + 128] %%asi, %%f0 + fxor %%f32, %%f48, %%f48 + fxor %%f34, %%f50, %%f50 + add %0, 128, %0 + fxor %%f36, %%f52, %%f52 + add %1, 128, %1 + fxor %%f38, %%f54, %%f54 + subcc %2, 128, %2 + fxor %%f40, %%f56, %%f56 + fxor %%f42, %%f58, %%f58 + fxor %%f44, %%f60, %%f60 + fxor %%f46, %%f62, %%f62 + stda %%f48, [%0 - 64] %%asi + bne,pt %%xcc, 1b + ldda [%1] %4, %%f16 + ldda [%0 + 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, [%0] %4 + ldda [%1 + 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, [%0 + 64] %%asi + membar #Sync|#StoreStore|#StoreLoad + wr %%g0, 0, %%fprs + " : : + "r" (dest), "r" (src), "r" (len), "i" (FPRS_FEF), "i" (ASI_BLK_P) : + "cc", "memory"); +} + +#endif /* __ASM_MD_H */ diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 53745626e..b92481dd5 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h @@ -1,4 +1,4 @@ -/* $Id: mmu_context.h,v 1.19 1997/08/07 02:54:08 davem Exp $ */ +/* $Id: mmu_context.h,v 1.20 1997/09/18 10:42:08 rth Exp $ */ #ifndef __SPARC64_MMU_CONTEXT_H #define __SPARC64_MMU_CONTEXT_H @@ -54,7 +54,8 @@ extern __inline__ void get_mmu_context(struct task_struct *tsk) get_new_mmu_context(mm, &tlb_context_cache); /* Don't worry, set_fs() will restore it... */ - tsk->tss.ctx = (tsk->tss.current_ds ? + /* Sigh, damned include loops... just poke seg directly. */ + tsk->tss.ctx = (tsk->tss.current_ds.seg ? (mm->context & 0x1fff) : 0); } else tsk->tss.ctx = 0; diff --git a/include/asm-sparc64/namei.h b/include/asm-sparc64/namei.h index 70d0f337f..453f73217 100644 --- a/include/asm-sparc64/namei.h +++ b/include/asm-sparc64/namei.h @@ -1,4 +1,4 @@ -/* $Id: namei.h,v 1.8 1997/09/06 02:25:27 davem Exp $ +/* $Id: namei.h,v 1.10 1997/09/24 16:20:41 jj Exp $ * linux/include/asm-sparc64/namei.h * * Routines to handle famous /usr/gnemul/s*. @@ -10,40 +10,55 @@ #define SPARC_BSD_EMUL "usr/gnemul/sunos/" #define SPARC_SOL_EMUL "usr/gnemul/solaris/" +#define SPARC_LIN_EMUL "usr/gnemul/linux32/" static inline struct dentry * __sparc64_lookup_dentry(const char *name, int follow_link) { struct dentry *base; + char *emul; switch (current->personality) { case PER_BSD: + emul = SPARC_BSD_EMUL; break; case PER_SVR4: - break; + emul = SPARC_SOL_EMUL; break; + case PER_LINUX32: + emul = SPARC_LIN_EMUL; break; default: - return ERR_PTR(-ENOENT); + return NULL; } - base = lookup_dentry ((current->personality == PER_BSD) ? - SPARC_BSD_EMUL : SPARC_SOL_EMUL, - dget (current->fs->root), 1); + base = lookup_dentry (emul, dget (current->fs->root), 1); - if (IS_ERR (base)) return base; + if (IS_ERR (base)) return NULL; base = lookup_dentry (name, base, follow_link); - if (IS_ERR (base)) return base; + if (IS_ERR (base)) return NULL; if (!base->d_inode) { - dput(base); - return ERR_PTR(-ENOENT); + struct dentry *fromroot; + + fromroot = lookup_dentry (name, dget (current->fs->root), follow_link); + + if (IS_ERR (fromroot)) return base; + + if (fromroot->d_inode) { + dput(base); + return fromroot; + } + + dput(fromroot); } return base; } #define __prefix_lookup_dentry(name, follow_link) \ - dentry = __sparc64_lookup_dentry (name, follow_link); \ - if (!IS_ERR (dentry)) return dentry; + if (current->personality) { \ + dentry = __sparc64_lookup_dentry (name, follow_link); \ + if (dentry) return dentry; \ + } #endif /* __SPARC64_NAMEI_H */ diff --git a/include/asm-sparc64/ns87303.h b/include/asm-sparc64/ns87303.h new file mode 100644 index 000000000..92b3d689c --- /dev/null +++ b/include/asm-sparc64/ns87303.h @@ -0,0 +1,84 @@ +/* $Id: ns87303.h,v 1.1 1997/10/14 13:30:37 ecd Exp $ + * ns87303.h: Configuration Register Description for the + * National Semiconductor PC87303 (SuperIO). + * + * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) + */ + +#ifndef _SPARC_NS87303_H +#define _SPARC_NS87303_H 1 + +/* + * Controll Register Index Values + */ +#define FER 0x00 +#define FAR 0x01 +#define PTR 0x02 +#define FCR 0x03 +#define PCR 0x04 +#define KRR 0x05 +#define PMC 0x06 +#define TUP 0x07 +#define SID 0x08 +#define ASC 0x09 +#define CS0CF0 0x0a +#define CS0CF1 0x0b +#define CS1CF0 0x0c +#define CS1CF1 0x0d + +/* Function Address Register (FAR) bits */ +#define FAR_LPT_MASK 0x03 +#define FAR_LPTB 0x00 +#define FAR_LPTA 0x01 +#define FAR_LPTC 0x02 + +/* Power and Test Register (PTR) bits */ +#define PTR_LPTB_IRQ7 0x08 +#define PTR_LEVEL_IRQ 0x80 /* When not ECP/EPP: Use level IRQ */ +#define PTR_LPT_REG_DIR 0x80 /* When ECP/EPP: LPT CTR controlls direction */ + /* of the parallel port */ + +/* Function Control Register (FCR) bits */ +#define FCR_ZWS_ENA 0x20 /* Enable short host read/write in ECP/EPP */ + +/* Printer Controll Register (PCR) bits */ +#define PCR_EPP_ENABLE 0x01 +#define PCR_EPP_IEEE 0x02 /* Enable EPP Version 1.9 (IEEE 1284) */ +#define PCR_ECP_ENABLE 0x04 +#define PCR_ECP_CLK_ENA 0x08 /* If 0 ECP Clock is stopped on Power down */ +#define PCR_IRQ_POLAR 0x20 /* If 0 IRQ is level high or negative pulse, */ + /* if 1 polarity is inverted */ +#define PCR_IRQ_ODRAIN 0x40 /* If 1, IRQ is open drain */ + +/* Tape UARTs and Parallel Port Config Register (TUP) bits */ +#define TUP_EPP_TIMO 0x02 /* Enable EPP timeout IRQ */ + +/* Advanced SuperIO Config Register (ASC) bits */ +#define ASC_LPT_IRQ7 0x01 /* Allways use IRQ7 for LPT */ + +#ifdef __KERNEL__ + +#include <asm/system.h> +#include <asm/io.h> + +static __inline__ void ns87303_writeb(unsigned long port, int index, + unsigned char value) +{ + unsigned long flags; + + save_flags(flags); cli(); + outb(index, port); + outb(value, port + 1); + outb(value, port + 1); + restore_flags(flags); +} + +static __inline__ unsigned char ns87303_readb(unsigned long port, int index) +{ + outb(index, port); + return inb(port + 1); +} + +#endif /* __KERNEL__ */ + +#endif /* !(_SPARC_NS87303_H) */ diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index a4e8e5a8f..70b787ced 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h @@ -1,12 +1,9 @@ -/* $Id: page.h,v 1.15 1997/08/09 04:56:54 davem Exp $ */ +/* $Id: page.h,v 1.16 1997/11/28 15:59:34 jj Exp $ */ #ifndef _SPARC64_PAGE_H #define _SPARC64_PAGE_H #define PAGE_SHIFT 13 - -#ifdef __KERNEL__ - #ifndef __ASSEMBLY__ /* I have my suspicions... -DaveM */ #define PAGE_SIZE (1UL << PAGE_SHIFT) @@ -16,6 +13,8 @@ #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifdef __KERNEL__ + #ifndef __ASSEMBLY__ #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index fec37e16e..0c09bd338 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h @@ -1,4 +1,4 @@ -/* $Id: pbm.h,v 1.7 1997/08/25 06:01:14 davem Exp $ +/* $Id: pbm.h,v 1.8 1998/01/10 18:26:10 ecd Exp $ * pbm.h: U2P PCI bus module pseudo driver software state. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) @@ -53,6 +53,7 @@ struct linux_psycho { unsigned long *pci_IO_space; unsigned long *pci_mem_space; u32 upa_portid; + int index; struct linux_pbm_info pbm_A; struct linux_pbm_info pbm_B; }; @@ -67,6 +68,16 @@ struct pcidev_cookie { }; extern struct linux_psycho *psycho_root; +extern struct linux_psycho **psycho_index_map; +extern int linux_num_psycho; + +static __inline__ struct linux_psycho * +psycho_by_index(int index) +{ + if (index >= linux_num_psycho) + return NULL; + return psycho_index_map[index]; +} /* Special PCI IRQ encoding, this just makes life easier for the generic * irq registry layer, there is already enough crap in there due to sbus, @@ -75,8 +86,8 @@ extern struct linux_psycho *psycho_root; #define PCI_IRQ_IDENT 0x80000000 /* This tells irq.c what we are */ #define PCI_IRQ_IMAP_OFF 0x7ff00000 /* Offset from first PSYCHO imap */ #define PCI_IRQ_IMAP_OFF_SHFT 20 -#define PCI_IRQ_BUSNO 0x000f8000 /* PSYCHO instance, currently unused */ -#define PCI_IRQ_BUSNO_SHFT 15 +#define PCI_IRQ_BUSNO 0x000fc000 /* PSYCHO instance, currently unused */ +#define PCI_IRQ_BUSNO_SHFT 14 #define PCI_IRQ_IGN 0x000007c0 /* PSYCHO "Int Group Number" */ #define PCI_IRQ_INO 0x0000003f /* PSYCHO INO */ diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index d58977981..c84571752 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h @@ -1,4 +1,4 @@ -/* $Id: pgtable.h,v 1.57 1997/08/13 04:44:20 paulus Exp $ +/* $Id: pgtable.h,v 1.59 1997/10/12 06:20:43 davem Exp $ * pgtable.h: SpitFire page table operations. * * Copyright 1996,1997 David S. Miller (davem@caip.rutgers.edu) @@ -198,7 +198,7 @@ extern __inline__ void flush_tlb_page(struct vm_area_struct *vma, unsigned long struct mm_struct *mm = vma->vm_mm; if(mm->context != NO_CONTEXT) - __flush_tlb_page(mm->context & 0x1fff, page & PAGE_MASK); + __flush_tlb_page(mm->context & 0x1fff, page); } #else /* __SMP__ */ @@ -231,7 +231,7 @@ extern __inline__ void flush_tlb_page(struct vm_area_struct *vma, unsigned long struct mm_struct *mm = vma->vm_mm; if(mm->context != NO_CONTEXT) - smp_flush_tlb_page(mm, page & PAGE_MASK); + smp_flush_tlb_page(mm, page); } #endif @@ -499,7 +499,36 @@ extern void mmu_release_scsi_sgl(struct mmu_sglist *sg, int sz, struct linux_sbu /* These do nothing with the way I have things setup. */ #define mmu_lockarea(vaddr, len) (vaddr) #define mmu_unlockarea(vaddr, len) do { } while(0) -#define update_mmu_cache(vma, address, pte) do { } while(0) + +extern __inline__ void update_mmu_cache(struct vm_area_struct *vma, + unsigned long address, pte_t pte) +{ + struct mm_struct *mm = vma->vm_mm; + unsigned long ctx = mm->context & 0x1fff; + unsigned long tag_access; + + tag_access = address | ctx; + + __asm__ __volatile__(" + rdpr %%pstate, %%g1 + wrpr %%g1, %0, %%pstate + brz,pt %1, 1f + mov %2, %%g2 + stxa %3, [%%g2] %5 + b,pt %%xcc, 2f + stxa %4, [%%g0] %6 +1: + stxa %3, [%%g2] %7 + stxa %4, [%%g0] %8 +2: + wrpr %%g1, 0x0, %%pstate +" : /* no outputs */ + : "i" (PSTATE_IE), "r" (vma->vm_flags & VM_EXEC), + "i" (TLB_TAG_ACCESS), "r" (tag_access), "r" (pte_val(pte)), + "i" (ASI_IMMU), "i" (ASI_ITLB_DATA_IN), + "i" (ASI_DMMU), "i" (ASI_DTLB_DATA_IN) + : "g1", "g2"); +} /* Make a non-present pseudo-TTE. */ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) diff --git a/include/asm-sparc64/posix_types.h b/include/asm-sparc64/posix_types.h index 0c0e25a77..dd09cb516 100644 --- a/include/asm-sparc64/posix_types.h +++ b/include/asm-sparc64/posix_types.h @@ -18,7 +18,7 @@ typedef int __kernel_ipc_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef unsigned int __kernel_dev_t; -typedef unsigned int __kernel_ino_t; +typedef unsigned long __kernel_ino_t; typedef unsigned int __kernel_mode_t; typedef unsigned short __kernel_umode_t; typedef unsigned int __kernel_nlink_t; diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h index b47f75b7f..ba2ab11b0 100644 --- a/include/asm-sparc64/processor.h +++ b/include/asm-sparc64/processor.h @@ -1,4 +1,4 @@ -/* $Id: processor.h,v 1.33 1997/08/19 14:18:36 jj Exp $ +/* $Id: processor.h,v 1.40 1997/10/24 11:57:59 jj Exp $ * include/asm-sparc64/processor.h * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -7,6 +7,7 @@ #ifndef __ASM_SPARC64_PROCESSOR_H #define __ASM_SPARC64_PROCESSOR_H +#include <asm/asi.h> #include <asm/a.out.h> #include <asm/pstate.h> #include <asm/ptrace.h> @@ -26,23 +27,42 @@ /* User lives in his very own context, and cannot reference us. */ #define TASK_SIZE ((1UL << (PAGE_SHIFT - 3)) * PGDIR_SIZE) +#define COPY_TASK_STRUCT(dst, src) \ +do { \ + if (src->tss.w_saved) \ + *dst = *src; \ + else { \ + memcpy (dst, src, ((const unsigned long)(&((struct task_struct *)0)->tss.reg_window))); \ + memcpy ((char *)dst + ((const unsigned long)(&((struct task_struct *)0)->tss.sig_address)), \ + (char *)src + ((const unsigned long)(&((struct task_struct *)0)->tss.sig_address)), \ + sizeof(struct task_struct) - \ + ((const unsigned long)(&((struct task_struct *)0)->tss.sig_address))); \ + } \ +} while (0) + #ifndef __ASSEMBLY__ #define NSWINS 8 +typedef struct { + unsigned long seg; +} mm_segment_t; + /* The Sparc processor specific thread struct. */ struct thread_struct { /*DC1*/ unsigned long ksp __attribute__ ((aligned(16))); - unsigned long kpc; -/*DC2*/ unsigned long wstate; - unsigned int cwp; - unsigned int ctx; + unsigned int kpc; + unsigned short wstate; + unsigned short cwp; -/*DC3*/ unsigned int flags; - unsigned int new_signal; - unsigned long current_ds; -/*DC4*/ unsigned long w_saved; - struct pt_regs *kregs; +/*DC2*/ unsigned short flags; + unsigned short ctx; + unsigned short w_saved; + unsigned short new_signal; + mm_segment_t current_ds; + +/*DC3*/ struct pt_regs *kregs; + unsigned long *utraps; struct reg_window reg_window[NSWINS] __attribute__ ((aligned (16))); unsigned long rwbuf_stkptrs[NSWINS] __attribute__ ((aligned (8))); @@ -50,7 +70,6 @@ struct thread_struct { unsigned long sig_address __attribute__ ((aligned (8))); unsigned long sig_desc; struct sigstack sstk_info; - struct exec core_exec; /* just what it says. */ }; #endif /* !(__ASSEMBLY__) */ @@ -66,19 +85,19 @@ struct thread_struct { #define INIT_MMAP { &init_mm, 0xfffff80000000000, 0xfffff80001000000, \ PAGE_SHARED , VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } -#define INIT_TSS { \ -/* ksp, kpc, wstate, cwp, secctx */ \ - 0, 0, 0, 0, 0, \ -/* flags, new_signal, current_ds, */ \ - SPARC_FLAG_KTHREAD, 0, USER_DS, \ -/* w_saved, kregs, */ \ - 0, 0, \ -/* reg_window */ \ - { { { 0, }, { 0, } }, }, \ -/* rwbuf_stkptrs */ \ - { 0, 0, 0, 0, 0, 0, 0, 0, }, \ -/* sig_address, sig_desc, sstk_info, core_exec */ \ - 0, 0, { 0, 0, }, { 0, }, \ +#define INIT_TSS { \ +/* ksp, kpc, wstate, cwp */ \ + 0, 0, 0, 0, \ +/* flags, ctx, w_saved, new_signal, current_ds, */ \ + SPARC_FLAG_KTHREAD, 0, 0, 0, KERNEL_DS, \ +/* kregs, utraps, */ \ + 0, 0, \ +/* reg_window */ \ + { { { 0, }, { 0, } }, }, \ +/* rwbuf_stkptrs */ \ + { 0, 0, 0, 0, 0, 0, 0, 0, }, \ +/* sig_address, sig_desc, sstk_info */ \ + 0, 0, { 0, 0, }, \ } #ifndef __ASSEMBLY__ @@ -89,15 +108,29 @@ extern __inline__ unsigned long thread_saved_pc(struct thread_struct *t) return t->kpc; } +/* On Uniprocessor, even in RMO processes see TSO semantics */ +#ifdef __SMP__ +#define TSTATE_INITIAL_MM TSTATE_TSO +#else +#define TSTATE_INITIAL_MM TSTATE_RMO +#endif + /* Do necessary setup to start up a newly executed thread. */ #define start_thread(regs, pc, sp) \ do { \ - regs->tstate = (regs->tstate & (TSTATE_CWP)) | (TSTATE_IE); \ + regs->tstate = (regs->tstate & (TSTATE_CWP)) | (TSTATE_INITIAL_MM|TSTATE_IE) | (ASI_PNF << 24); \ regs->tpc = ((pc & (~3)) - 4); \ regs->tnpc = regs->tpc + 4; \ regs->y = 0; \ current->tss.flags &= ~SPARC_FLAG_32BIT; \ current->tss.wstate = (1 << 3); \ + if (current->tss.utraps) { \ + if (*(current->tss.utraps) < 2) \ + kfree (current->tss.utraps); \ + else \ + (*(current->tss.utraps))--; \ + current->tss.utraps = NULL; \ + } \ __asm__ __volatile__( \ "stx %%g0, [%0 + %2 + 0x00]\n\t" \ "stx %%g0, [%0 + %2 + 0x08]\n\t" \ @@ -128,12 +161,19 @@ do { \ pc &= 0x00000000ffffffffUL; \ sp &= 0x00000000ffffffffUL; \ \ - regs->tstate = (regs->tstate & (TSTATE_CWP))|(TSTATE_IE|TSTATE_AM); \ + regs->tstate = (regs->tstate & (TSTATE_CWP))|(TSTATE_INITIAL_MM|TSTATE_IE|TSTATE_AM); \ regs->tpc = ((pc & (~3)) - 4); \ regs->tnpc = regs->tpc + 4; \ regs->y = 0; \ current->tss.flags |= SPARC_FLAG_32BIT; \ current->tss.wstate = (2 << 3); \ + if (current->tss.utraps) { \ + if (*(current->tss.utraps) < 2) \ + kfree (current->tss.utraps); \ + else \ + (*(current->tss.utraps))--; \ + current->tss.utraps = NULL; \ + } \ zero = 0; \ __asm__ __volatile__( \ "stx %%g0, [%0 + %2 + 0x00]\n\t" \ @@ -164,7 +204,7 @@ do { \ #ifdef __KERNEL__ /* Allocation and freeing of task_struct and kernel stack. */ -#define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL, 1, 0)) +#define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL, 1)) #define free_task_struct(tsk) free_pages((unsigned long)(tsk),1) #define init_task (init_task_union.task) diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index a4784d41e..39bb8203a 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h @@ -1,4 +1,4 @@ -/* $Id: ptrace.h,v 1.12 1997/06/24 16:30:35 davem Exp $ */ +/* $Id: ptrace.h,v 1.13 1997/09/17 17:27:51 davem Exp $ */ #ifndef _SPARC64_PTRACE_H #define _SPARC64_PTRACE_H @@ -114,7 +114,9 @@ extern void show_regs(struct pt_regs *); #include <asm/asm_offsets.h> #endif +#ifdef __KERNEL__ #define STACK_BIAS 2047 +#endif /* These are for pt_regs. */ #define PT_V9_G0 0x00 diff --git a/include/asm-sparc64/reg.h b/include/asm-sparc64/reg.h index ea3fc6e9c..2aabb1f42 100644 --- a/include/asm-sparc64/reg.h +++ b/include/asm-sparc64/reg.h @@ -1,4 +1,4 @@ -/* $Id: reg.h,v 1.2 1997/06/24 23:19:55 davem Exp $ +/* $Id: reg.h,v 1.4 1997/09/14 08:40:29 davem Exp $ * linux/asm-sparc64/reg.h * Layout of the registers as expected by gdb on the Sparc * we should replace the user.h definitions with those in @@ -15,69 +15,7 @@ #define __SPARC64_REG_H struct regs { - int r_psr; -#define r_ps r_psr - int r_pc; - int r_npc; - int r_y; - int r_g1; - int r_g2; - int r_g3; - int r_g4; - int r_g5; - int r_g6; - int r_g7; - int r_o0; - int r_o1; - int r_o2; - int r_o3; - int r_o4; - int r_o5; - int r_o6; - int r_o7; -}; - -struct fpq { - unsigned int *addr; - unsigned ing instr; -}; - -struct fq { - union { - double whole; - struct fpq fpq; - } FQu; -}; - -#define FPU_REGS_TYPE unsigned int -#define FPU_FSR_TYPE unsigned - -struct fp_status { - union { - FPU_REGS_TYPE Fpu_regs[32]; - double Fpu_dregs[16]; - } fpu_fr; - FPU_FSR_TYPE Fpu_fsr; - unsigned Fpu_flags; - unsigned Fpu_extra; - unsigned Fpu_qcnt; - struct fq Fpu_q[16]; -}; - -#define fpu_regs f_fpstatus.fpu_fr.Fpu_regs -#define fpu_dregs f_fpstatus.fpu_fr.Fpu_dregs -#define fpu_fsr f_fpstatus.Fpu_fsr -#define fpu_flags f_fpstatus.Fpu_flags -#define fpu_extra f_fpstatus.Fpu_extra -#define fpu_q f_fpstatus.Fpu_q -#define fpu_qcnt f_fpstatus.Fpu_qcnt - -struct fpu { - struct fp_status f_fpstatus; -}; - -struct regs64 { - unsigned long r_g1; + unsigned long r_g1; unsigned long r_g2; unsigned long r_g3; unsigned long r_g4; @@ -92,17 +30,23 @@ struct regs64 { unsigned long r_o5; unsigned long r_o6; unsigned long r_o7; - unsigned long tstate; - unsigned long tpc; - unsigned long tnpc; - unsigned int y; - unsigned int fprs; + unsigned long __pad; + unsigned long r_tstate; + unsigned long r_tpc; + unsigned long r_tnpc; + unsigned int r_y; + unsigned int r_fprs; }; -struct fp_status64 { - unsigned long regs[32]; - unsigned long fsr; +struct fp_status { + unsigned long fpu_fr[32]; + unsigned long Fpu_fsr; +}; + +struct fpu { + struct fp_status f_fpstatus; }; +#define fpu_regs f_fpstatus.fpu_fr #endif /* __SPARC64_REG_H */ diff --git a/include/asm-sparc64/sigcontext.h b/include/asm-sparc64/sigcontext.h index 8934cd9b1..102e73385 100644 --- a/include/asm-sparc64/sigcontext.h +++ b/include/asm-sparc64/sigcontext.h @@ -1,4 +1,4 @@ -/* $Id: sigcontext.h,v 1.9 1997/08/19 14:18:38 jj Exp $ */ +/* $Id: sigcontext.h,v 1.10 1997/12/11 15:16:11 jj Exp $ */ #ifndef __SPARC64_SIGCONTEXT_H #define __SPARC64_SIGCONTEXT_H @@ -67,7 +67,7 @@ typedef struct { typedef struct { struct pt_regs si_regs; - int si_mask; + long si_mask; } __siginfo_t; typedef struct { diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h new file mode 100644 index 000000000..cd0611f89 --- /dev/null +++ b/include/asm-sparc64/siginfo.h @@ -0,0 +1,277 @@ +#ifndef _SPARC64_SIGINFO_H +#define _SPARC64_SIGINFO_H + +#include <linux/types.h> + +typedef union sigval { + int sival_int; + void *sival_ptr; +} sigval_t; + +#ifdef __KERNEL__ + +typedef union sigval32 { + int sival_int; + u32 sival_ptr; +} sigval_t32; + +#endif /* __KERNEL__ */ + +#define SI_MAX_SIZE 128 +#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 4) +#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) + +typedef struct siginfo { + int si_signo; + int si_errno; + int si_code; + + union { + int _pad[SI_PAD_SIZE]; + + /* kill() */ + struct { + pid_t _pid; /* sender's pid */ + uid_t _uid; /* sender's uid */ + } _kill; + + /* POSIX.1b timers */ + struct { + unsigned int _timer1; + unsigned int _timer2; + } _timer; + + /* POSIX.1b signals */ + struct { + pid_t _pid; /* sender's pid */ + uid_t _uid; /* sender's uid */ + sigval_t _sigval; + } _rt; + + /* SIGCHLD */ + struct { + pid_t _pid; /* which child */ + int _status; /* exit code */ + clock_t _utime; + clock_t _stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ + struct { + void *_addr; /* faulting insn/memory ref. */ + int _trapno; /* TRAP # which caused the signal */ + } _sigfault; + + /* SIGPOLL */ + struct { + int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + int _fd; + } _sigpoll; + } _sifields; +} siginfo_t; + +#ifdef __KERNEL__ + +typedef struct siginfo32 { + int si_signo; + int si_errno; + int si_code; + + union { + int _pad[SI_PAD_SIZE32]; + + /* kill() */ + struct { + __kernel_pid_t32 _pid; /* sender's pid */ + __kernel_uid_t32 _uid; /* sender's uid */ + } _kill; + + /* POSIX.1b timers */ + struct { + unsigned int _timer1; + unsigned int _timer2; + } _timer; + + /* POSIX.1b signals */ + struct { + __kernel_pid_t32 _pid; /* sender's pid */ + __kernel_uid_t32 _uid; /* sender's uid */ + sigval_t32 _sigval; + } _rt; + + /* SIGCHLD */ + struct { + __kernel_pid_t32 _pid; /* which child */ + int _status; /* exit code */ + __kernel_clock_t32 _utime; + __kernel_clock_t32 _stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ + struct { + u32 _addr; /* faulting insn/memory ref. */ + int _trapno; + } _sigfault; + + /* SIGPOLL */ + struct { + int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + int _fd; + } _sigpoll; + } _sifields; +} siginfo_t32; + +#endif /* __KERNEL__ */ + +/* + * How these fields are to be accessed. + */ +#define si_pid _sifields._kill._pid +#define si_uid _sifields._kill._uid +#define si_status _sifields._sigchld._status +#define si_utime _sifields._sigchld._utime +#define si_stime _sifields._sigchld._stime +#define si_value _sifields._rt._sigval +#define si_int _sifields._rt._sigval.sival_int +#define si_ptr _sifields._rt._sigval.sival_ptr +#define si_addr _sifields._sigfault._addr +#define si_trapno _sifields._sigfault._trapno +#define si_band _sifields._sigpoll._band +#define si_fd _sifields._sigpoll._fd + +/* + * si_code values + * Digital reserves positive values for kernel-generated signals. + */ +#define SI_USER 0 /* sent by kill, sigsend, raise */ +#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ +#define SI_QUEUE -1 /* sent by sigqueue */ +#define SI_TIMER -2 /* sent by timer expiration */ +#define SI_MESGQ -3 /* sent by real time mesq state change */ +#define SI_ASYNCIO -4 /* sent by AIO completion */ + +#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) +#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) + +/* + * SIGILL si_codes + */ +#define ILL_ILLOPC 1 /* illegal opcode */ +#define ILL_ILLOPN 2 /* illegal operand */ +#define ILL_ILLADR 3 /* illegal addressing mode */ +#define ILL_ILLTRP 4 /* illegal trap */ +#define ILL_PRVOPC 5 /* privileged opcode */ +#define ILL_PRVREG 6 /* privileged register */ +#define ILL_COPROC 7 /* coprocessor error */ +#define ILL_BADSTK 8 /* internal stack error */ +#define NSIGILL 8 + +/* + * SIGFPE si_codes + */ +#define FPE_INTDIV 1 /* integer divide by zero */ +#define FPE_INTOVF 2 /* integer overflow */ +#define FPE_FLTDIV 3 /* floating point divide by zero */ +#define FPE_FLTOVF 4 /* floating point overflow */ +#define FPE_FLTUND 5 /* floating point underflow */ +#define FPE_FLTRES 6 /* floating point inexact result */ +#define FPE_FLTINV 7 /* floating point invalid operation */ +#define FPE_FLTSUB 8 /* subscript out of range */ +#define NSIGFPE 8 + +/* + * SIGSEGV si_codes + */ +#define SEGV_MAPERR 1 /* address not mapped to object */ +#define SRGV_ACCERR 2 /* invalid permissions for mapped object */ +#define NSIGSEGV 2 + +/* + * SIGBUS si_codes + */ +#define BUS_ADRALN 1 /* invalid address alignment */ +#define BUS_ADRERR 2 /* non-existant physical address */ +#define BUS_OBJERR 3 /* object specific hardware error */ +#define NSIGBUS 3 + +/* + * SIGTRAP si_codes + */ +#define TRAP_BRKPT 1 /* process breakpoint */ +#define TRAP_TRACE 2 /* process trace trap */ +#define NSIGTRAP + +/* + * SIGCHLD si_codes + */ +#define CLD_EXITED 1 /* child has exited */ +#define CLD_KILLED 2 /* child was killed */ +#define CLD_DUMPED 3 /* child terminated abnormally */ +#define CLD_TRAPPED 4 /* traced child has trapped */ +#define CLD_STOPPED 5 /* child has stopped */ +#define CLD_CONTINUED 6 /* stopped child has continued */ +#define NSIGCHLD + +/* + * SIGPOLL si_codes + */ +#define POLL_IN 1 /* data input available */ +#define POLL_OUT 2 /* output buffers available */ +#define POLL_MSG 3 /* input message available */ +#define POLL_ERR 4 /* i/o error */ +#define POLL_PRI 5 /* high priority input available */ +#define POLL_HUP 6 /* device disconnected */ +#define NSIGPOLL 6 + +/* + * sigevent definitions + * + * It seems likely that SIGEV_THREAD will have to be handled from + * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the + * thread manager then catches and does the appropriate nonsense. + * However, everything is written out here so as to not get lost. + */ +#define SIGEV_SIGNAL 0 /* notify via signal */ +#define SIGEV_NONE 1 /* other notification: meaningless */ +#define SIGEV_THREAD 2 /* deliver via thread creation */ + +#define SIGEV_MAX_SIZE 64 +#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4) +#define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3) + +typedef struct sigevent { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + union { + int _pad[SIGEV_PAD_SIZE]; + + struct { + void (*_function)(sigval_t); + void *_attribute; /* really pthread_attr_t */ + } _sigev_thread; + } _sigev_un; +} sigevent_t; + +#ifdef __KERNEL__ + +typedef struct sigevent32 { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + union { + int _pad[SIGEV_PAD_SIZE32]; + + struct { + u32 _function; + u32 _attribute; /* really pthread_attr_t */ + } _sigev_thread; + } _sigev_un; +} sigevent_t32; + +#endif /* __KERNEL__ */ + +#define sigev_notify_function _sigev_un._sigev_thread._function +#define sigev_notify_attributes _sigev_un._sigev_thread._attribute + +#endif diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index cd4503cc6..42382c42c 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h @@ -1,4 +1,4 @@ -/* $Id: signal.h,v 1.3 1997/04/18 14:34:47 jj Exp $ */ +/* $Id: signal.h,v 1.4 1997/12/11 15:16:06 jj Exp $ */ #ifndef _ASMSPARC64_SIGNAL_H #define _ASMSPARC64_SIGNAL_H @@ -7,15 +7,13 @@ #ifdef __KERNEL__ #ifndef __ASSEMBLY__ #include <linux/personality.h> +#include <linux/types.h> #endif #endif /* On the Sparc the signal handlers get passed a 'sub-signal' code * for certain signal types, which we document here. */ -#define _NSIG 32 -#define NSIG _NSIG - #define SIGHUP 1 #define SIGINT 2 #define SIGQUIT 3 @@ -80,14 +78,51 @@ #define SIGUSR1 30 #define SIGUSR2 31 +/* Most things should be clean enough to redefine this at will, if care + is taken to make libc match. */ + +#define __OLD_NSIG 32 +#define __NEW_NSIG 64 +#define _NSIG_BPW 64 +#define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW) + +#define _NSIG_BPW32 32 +#define _NSIG_WORDS32 (__NEW_NSIG / _NSIG_BPW32) + +#define SIGRTMIN 32 +#define SIGRTMAX (__NEW_NSIG - 1) + +#if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__) +#define _NSIG __NEW_NSIG +#define __new_sigset_t sigset_t +#define __new_sigset_t32 sigset_t32 +#define __new_sigaction sigaction +#define __new_sigaction32 sigaction32 +#define __old_sigset_t old_sigset_t +#define __old_sigset_t32 old_sigset_t32 +#define __old_sigaction old_sigaction +#define __old_sigaction32 old_sigaction32 +#else +#define _NSIG __OLD_NSIG +#define NSIG _NSIG +#define __old_sigset_t sigset_t +#define __old_sigset_t32 sigset_t32 +#define __old_sigaction sigaction +#define __old_sigaction32 sigaction32 +#endif + #ifndef __ASSEMBLY__ -typedef unsigned long sigset_t; -typedef unsigned int sigset_t32; +typedef unsigned long __old_sigset_t; /* at least 32 bits */ +typedef unsigned int __old_sigset_t32; -#ifdef __KERNEL__ -#include <asm/sigcontext.h> -#endif +typedef struct { + unsigned long sig[_NSIG_WORDS]; +} __new_sigset_t; + +typedef struct { + unsigned int sig[_NSIG_WORDS32]; +} __new_sigset_t32; /* A SunOS sigstack */ struct sigstack { @@ -118,6 +153,9 @@ struct sigstack { #define SA_INTERRUPT 0x10 #define SA_NOMASK 0x20 #define SA_SHIRQ 0x40 +#define SA_NOCLDWAIT 0x100 /* not supported yet */ +#define SA_SIGINFO 0x200 + #define SIG_BLOCK 0x01 /* for blocking signals */ #define SIG_UNBLOCK 0x02 /* for unblocking signals */ @@ -156,20 +194,45 @@ typedef void (*__sighandler_t)(int); #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ -struct sigaction { - __sighandler_t sa_handler; - sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer) (void); /* not used by Linux/SPARC yet */ +struct __new_sigaction { + __sighandler_t sa_handler; + unsigned long sa_flags; + void (*sa_restorer)(void); /* not used by Linux/SPARC yet */ + __new_sigset_t sa_mask; +}; + +struct __new_sigaction32 { + unsigned sa_handler; + unsigned int sa_flags; + unsigned sa_restorer; /* not used by Linux/SPARC yet */ + __new_sigset_t32 sa_mask; +}; + +struct k_sigaction { + struct __new_sigaction sa; + void *ka_restorer; +}; + +struct __old_sigaction { + __sighandler_t sa_handler; + __old_sigset_t sa_mask; + unsigned long sa_flags; + void (*sa_restorer)(void); /* not used by Linux/SPARC yet */ }; -struct sigaction32 { - unsigned sa_handler; - sigset_t32 sa_mask; - unsigned int sa_flags; - unsigned sa_restorer; /* not used by Linux/SPARC yet */ +struct __old_sigaction32 { + unsigned sa_handler; + __old_sigset_t32 sa_mask; + unsigned int sa_flags; + unsigned sa_restorer; /* not used by Linux/SPARC yet */ }; +typedef struct sigaltstack { + void *ss_sp; + int ss_flags; + __kernel_size_t ss_size; +} stack_t; + #endif /* !(__ASSEMBLY__) */ #endif /* !(_ASMSPARC64_SIGNAL_H) */ diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h index c216fe6a7..3c110baeb 100644 --- a/include/asm-sparc64/socket.h +++ b/include/asm-sparc64/socket.h @@ -1,4 +1,4 @@ -/* $Id: socket.h,v 1.2 1997/03/17 04:50:55 davem Exp $ */ +/* $Id: socket.h,v 1.4 1997/10/19 00:19:23 davem Exp $ */ #ifndef _ASM_SOCKET_H #define _ASM_SOCKET_H @@ -35,9 +35,11 @@ #define SO_NO_CHECK 0x000b #define SO_PRIORITY 0x000c +#define SO_BINDTODEVICE 0x000d + /* Security levels - as per NRL IPv6 - don't actually do anything */ -#define SO_SECURITY_AUTHENTICATION 0x000d -#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x000e -#define SO_SECURITY_ENCRYPTION_NETWORK 0x000f +#define SO_SECURITY_AUTHENTICATION 0x5001 +#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 +#define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-sparc64/string.h b/include/asm-sparc64/string.h index 45b166c91..545e1285d 100644 --- a/include/asm-sparc64/string.h +++ b/include/asm-sparc64/string.h @@ -1,4 +1,4 @@ -/* $Id: string.h,v 1.7 1997/07/13 18:23:44 davem Exp $ +/* $Id: string.h,v 1.8 1997/11/19 07:57:50 jj Exp $ * string.h: External definitions for optimized assembly string * routines for the Linux Kernel. * @@ -23,7 +23,7 @@ extern __kernel_size_t __memcpy_16plus(void *,const void *,__kernel_size_t,long, extern __kernel_size_t __memcpy_384plus(void *,const void *,__kernel_size_t,long,long); extern __kernel_size_t __memset(void *,int,__kernel_size_t); -#ifndef EXPORT_SYMTAB +#ifndef EXPORT_SYMTAB_STROPS /* First the mem*() things. */ #define __HAVE_ARCH_BCOPY @@ -192,7 +192,7 @@ extern inline int __constant_strncmp(const char *src, const char *dest, __kernel __constant_strncmp(__arg0, __arg1, __arg2) : \ __strncmp(__arg0, __arg1, __arg2)) -#endif /* !EXPORT_SYMTAB */ +#endif /* !EXPORT_SYMTAB_STROPS */ #endif /* __KERNEL__ */ diff --git a/include/asm-sparc64/svr4.h b/include/asm-sparc64/svr4.h index 5dcee9d3f..2e624a94b 100644 --- a/include/asm-sparc64/svr4.h +++ b/include/asm-sparc64/svr4.h @@ -70,7 +70,7 @@ typedef struct { u32 ptr; } svr4_xrs_t; -/* Machine dependant context */ +/* Machine dependent context */ typedef struct { svr4_gregset_t greg; /* registers 0..19 (see top) */ u32 gwin; /* may point to register windows */ diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index 9f29c06e6..a1dd29513 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h @@ -1,4 +1,4 @@ -/* $Id: system.h,v 1.36 1997/08/19 14:18:33 jj Exp $ */ +/* $Id: system.h,v 1.37 1997/10/20 00:14:22 davem Exp $ */ #ifndef __SPARC64_SYSTEM_H #define __SPARC64_SYSTEM_H @@ -154,17 +154,17 @@ do { __label__ switch_continue; \ "stx %%i7, [%%sp + 2047 + 0x78]\n\t" \ "rdpr %%wstate, %%o5\n\t" \ "stx %%o6, [%%g6 + %3]\n\t" \ - "stx %%o5, [%%g6 + %2]\n\t" \ + "stw %%o7, [%%g6 + %4]\n\t" \ + "sth %%o5, [%%g6 + %2]\n\t" \ "rdpr %%cwp, %%o5\n\t" \ - "stx %%o7, [%%g6 + %4]\n\t" \ - "st %%o5, [%%g6 + %5]\n\t" \ + "sth %%o5, [%%g6 + %5]\n\t" \ "membar #Sync\n\t" \ "mov %0, %%g6\n\t" \ - "ld [%0 + %5], %%g1\n\t" \ + "lduh [%0 + %5], %%g1\n\t" \ "wrpr %%g1, %%cwp\n\t" \ - "ldx [%%g6 + %2], %%o5\n\t" \ "ldx [%%g6 + %3], %%o6\n\t" \ - "ldx [%%g6 + %4], %%o7\n\t" \ + "lduw [%%g6 + %4], %%o7\n\t" \ + "lduh [%%g6 + %2], %%o5\n\t" \ "mov %%g6, %0\n\t" \ "wrpr %%o5, 0x0, %%wstate\n\t" \ "ldx [%%sp + 2047 + 0x70], %%i6\n\t" \ diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index bb0a56efd..10840dc57 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h @@ -1,8 +1,10 @@ -/* $Id: ttable.h,v 1.3 1997/08/29 15:52:35 jj Exp $ */ +/* $Id: ttable.h,v 1.5 1997/10/14 16:21:34 jj Exp $ */ #ifndef _SPARC64_TTABLE_H #define _SPARC64_TTABLE_H #include <linux/config.h> +#include <asm/asm_offsets.h> +#include <asm/utrap.h> #define BOOT_KERNEL b sparc64_boot; nop; nop; nop; nop; nop; nop; nop; @@ -97,9 +99,19 @@ ba,pt %xcc, tl0_solaris + 0xc; \ mov num, %g1; \ nop;nop;nop; + +#define TRAP_UTRAP(handler,lvl) \ + ldx [%g6 + AOFF_task_tss + AOFF_thread_utraps], %g1; \ + sethi %hi(109f), %g7; \ + brz,pn %g1, utrap; \ + or %g7, %lo(109f), %g7; \ + ba,pt %xcc, utrap; \ +109: ldx [%g1 + handler*8], %g1; \ + ba,pt %xcc, utrap_ill; \ + mov lvl, %o1; -#define SUNOS_SYSCALL_TRAP SYSCALL_TRAP(linux_sparc_syscall, sunos_sys_table) -#define LINUX_32BIT_SYSCALL_TRAP SYSCALL_TRAP(linux_sparc_syscall, sys_call_table32) +#define SUNOS_SYSCALL_TRAP SYSCALL_TRAP(linux_sparc_syscall32, sunos_sys_table) +#define LINUX_32BIT_SYSCALL_TRAP SYSCALL_TRAP(linux_sparc_syscall32, sys_call_table32) #define LINUX_64BIT_SYSCALL_TRAP SYSCALL_TRAP(linux_sparc_syscall, sys_call_table64) #define GETCC_TRAP TRAP(getcc) #define SETCC_TRAP TRAP(setcc) diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h index cff47e3d0..e96909af4 100644 --- a/include/asm-sparc64/types.h +++ b/include/asm-sparc64/types.h @@ -1,4 +1,4 @@ -/* $Id: types.h,v 1.1 1996/11/20 12:03:51 davem Exp $ */ +/* $Id: types.h,v 1.2 1997/12/22 13:28:33 mj Exp $ */ #ifndef _SPARC64_TYPES_H #define _SPARC64_TYPES_H @@ -43,6 +43,8 @@ typedef unsigned int u32; typedef __signed__ long s64; typedef unsigned long u64; +#define BITS_PER_LONG 64 + #endif /* __KERNEL__ */ #endif /* defined(_SPARC64_TYPES_H) */ diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index 1d06cce7d..e2d59cf23 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h @@ -1,4 +1,4 @@ -/* $Id: uaccess.h,v 1.22 1997/08/19 15:25:35 jj Exp $ */ +/* $Id: uaccess.h,v 1.24 1997/12/15 15:05:14 jj Exp $ */ #ifndef _ASM_UACCESS_H #define _ASM_UACCESS_H @@ -17,13 +17,21 @@ #ifndef __ASSEMBLY__ -/* Sparc is not segmented, however we need to be able to fool verify_area() - * when doing system calls from kernel mode legitimately. +/* + * Sparc64 is segmented, though more like the M68K than the I386. + * We use the secondary ASI to address user memory, which references a + * completely different VM map, thus there is zero chance of the user + * doing something queer and tricking us into poking kernel memory. + * + * What is left here is basically what is needed for the other parts of + * the kernel that expect to be able to manipulate, erum, "segments". + * Or perhaps more properly, permissions. * * "For historical reasons, these macros are grossly misnamed." -Linus */ -#define KERNEL_DS 0x00 -#define USER_DS 0x2B /* har har har */ + +#define KERNEL_DS ((mm_segment_t) { 0x00 }) +#define USER_DS ((mm_segment_t) { 0x2B }) /* har har har */ #define VERIFY_READ 0 #define VERIFY_WRITE 1 @@ -31,24 +39,29 @@ #define get_fs() (current->tss.current_ds) #define get_ds() (KERNEL_DS) +#define segment_eq(a,b) ((a).seg == (b).seg) + extern spinlock_t scheduler_lock; -#define set_fs(val) \ -do { spin_lock(&scheduler_lock); \ - current->tss.current_ds = (val); \ - if ((val) == KERNEL_DS) { \ - flushw_user (); \ - current->tss.ctx = 0; \ - } else { \ - current->tss.ctx = (current->mm->context & 0x1fff); \ - } \ - spitfire_set_secondary_context(current->tss.ctx); \ - __asm__ __volatile__("flush %g6"); \ - spin_unlock(&scheduler_lock); \ +#define set_fs(val) \ +do { \ + if (current->tss.current_ds.seg != val.seg) { \ + spin_lock(&scheduler_lock); \ + current->tss.current_ds = (val); \ + if (segment_eq((val), KERNEL_DS)) { \ + flushw_user (); \ + current->tss.ctx = 0; \ + } else { \ + current->tss.ctx = (current->mm->context & 0x1fff); \ + } \ + spitfire_set_secondary_context(current->tss.ctx); \ + __asm__ __volatile__("flush %g6"); \ + spin_unlock(&scheduler_lock); \ + } \ } while(0) #define __user_ok(addr,size) 1 -#define __kernel_ok (get_fs() == KERNEL_DS) +#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) #define __access_ok(addr,size) 1 #define access_ok(type,addr,size) 1 diff --git a/include/asm-sparc64/unaligned.h b/include/asm-sparc64/unaligned.h index 4f1adb8c1..9418756d5 100644 --- a/include/asm-sparc64/unaligned.h +++ b/include/asm-sparc64/unaligned.h @@ -3,7 +3,7 @@ /* Sparc can't handle unaligned accesses. */ -#include <asm/string.h> +#include <linux/string.h> /* Use memmove here, so gcc does not insert a __builtin_memcpy. */ diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index f8b34f6a5..1983c79d9 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h @@ -1,4 +1,4 @@ -/* $Id: unistd.h,v 1.7 1997/06/16 05:37:44 davem Exp $ */ +/* $Id: unistd.h,v 1.14 1997/12/11 15:16:08 jj Exp $ */ #ifndef _SPARC64_UNISTD_H #define _SPARC64_UNISTD_H @@ -68,7 +68,7 @@ #define __NR_geteuid 49 /* SunOS calls getuid() */ #define __NR_getegid 50 /* SunOS calls getgid() */ #define __NR_acct 51 /* Common */ -/* #define __NR_ni_syscall 52 ENOSYS under SunOS */ +#define __NR_memory_ordering 52 /* Linux Specific */ #define __NR_mctl 53 /* SunOS specific */ #define __NR_ioctl 54 /* Common */ #define __NR_reboot 55 /* Common */ @@ -83,8 +83,8 @@ #define __NR_getpagesize 64 /* Common */ #define __NR_msync 65 /* Common in newer 1.3.x revs... */ /* #define __NR_ni_syscall 66 ENOSYS under SunOS */ -/* #define __NR_ni_syscall 67 ENOSYS under SunOS */ -/* #define __NR_ni_syscall 68 ENOSYS under SunOS */ +#define __NR_pread 67 /* Linux Specific */ +#define __NR_pwrite 68 /* Linux Specific */ #define __NR_sbrk 69 /* SunOS Specific */ #define __NR_sstk 70 /* SunOS Specific */ #define __NR_mmap 71 /* Common */ @@ -117,13 +117,13 @@ #define __NR_connect 98 /* Common */ #define __NR_accept 99 /* Common */ #define __NR_getpriority 100 /* Common */ -#define __NR_send 101 /* Common */ -#define __NR_recv 102 /* Common */ -/* #define __NR_ni_syscall 103 ENOSYS under SunOS */ -#define __NR_bind 104 /* Common */ -#define __NR_setsockopt 105 /* Common */ -#define __NR_listen 106 /* Common */ -/* #define __NR_ni_syscall 107 ENOSYS under SunOS */ +#define __NR_rt_sigreturn 101 /* Linux Specific */ +#define __NR_rt_sigaction 102 /* Linux Specific */ +#define __NR_rt_sigprocmask 103 /* Linux Specific */ +#define __NR_rt_sigpending 104 /* Linux Specific */ +#define __NR_rt_sigtimedwait 105 /* Linux Specific */ +#define __NR_rt_sigqueueinfo 106 /* Linux Specific */ +#define __NR_rt_sigsuspend 107 /* Linux Specific */ #define __NR_sigvec 108 /* SunOS Specific */ #define __NR_sigblock 109 /* SunOS Specific */ #define __NR_sigsetmask 110 /* SunOS Specific */ @@ -163,9 +163,9 @@ #define __NR_getrlimit 144 /* Common */ #define __NR_setrlimit 145 /* Common */ #define __NR_killpg 146 /* SunOS Specific */ -/* #define __NR_ni_syscall 147 ENOSYS under SunOS */ -/* #define __NR_ni_syscall 148 ENOSYS under SunOS */ -/* #define __NR_ni_syscall 149 ENOSYS under SunOS */ +#define __NR_prctl 147 /* ENOSYS under SunOS */ +#define __NR_pciconfig_read 148 /* ENOSYS under SunOS */ +#define __NR_pciconfig_write 149 /* ENOSYS under SunOS */ #define __NR_getsockname 150 /* Common */ #define __NR_getmsg 151 /* SunOS Specific */ #define __NR_putmsg 152 /* SunOS Specific */ @@ -180,7 +180,7 @@ #define __NR_getfh 161 /* SunOS Specific */ #define __NR_getdomainname 162 /* SunOS Specific */ #define __NR_setdomainname 163 /* Common */ -/* #define __NR_ni_syscall 164 ENOSYS under SunOS */ +#define __NR_utrap_install 164 /* SYSV ABI/v9 required */ #define __NR_quotactl 165 /* Common */ #define __NR_exportfs 166 /* SunOS Specific */ #define __NR_mount 167 /* Common */ @@ -200,7 +200,7 @@ #define __NR_aiowait 181 /* SunOS Specific */ #define __NR_aiocancel 182 /* SunOS Specific */ #define __NR_sigpending 183 /* Common */ -/* #define __NR_ni_syscall 184 ENOSYS under SunOS */ +#define __NR_query_module 184 /* Linux Specific */ #define __NR_setpgid 185 /* Common */ #define __NR_pathconf 186 /* SunOS Specific */ #define __NR_fpathconf 187 /* SunOS Specific */ @@ -272,14 +272,13 @@ #define __NR_fdatasync 253 #define __NR_nfsservctl 254 #define __NR_aplib 255 -#define __NR_prctl 256 #define _syscall0(type,name) \ type name(void) \ { \ long __res; \ __asm__ __volatile__ ("mov %0, %%g1\n\t" \ - "t 0x11\n\t" \ + "t 0x6d\n\t" \ "sub %%g0, %%o0, %0\n\t" \ "movcc %%xcc, %%o0, %0\n\t" \ : "=r" (__res)\ @@ -297,7 +296,7 @@ type name(type1 arg1) \ long __res; \ __asm__ __volatile__ ("mov %0, %%g1\n\t" \ "mov %1, %%o0\n\t" \ - "t 0x11\n\t" \ + "t 0x6d\n\t" \ "sub %%g0, %%o0, %0\n\t" \ "movcc %%xcc, %%o0, %0\n\t" \ : "=r" (__res), "=r" ((long)(arg1)) \ @@ -316,7 +315,7 @@ long __res; \ __asm__ __volatile__ ("mov %0, %%g1\n\t" \ "mov %1, %%o0\n\t" \ "mov %2, %%o1\n\t" \ - "t 0x11\n\t" \ + "t 0x6d\n\t" \ "sub %%g0, %%o0, %0\n\t" \ "movcc %%xcc, %%o0, %0\n\t" \ : "=r" (__res), "=r" ((long)(arg1)), "=r" ((long)(arg2)) \ @@ -336,7 +335,7 @@ __asm__ __volatile__ ("mov %0, %%g1\n\t" \ "mov %1, %%o0\n\t" \ "mov %2, %%o1\n\t" \ "mov %3, %%o2\n\t" \ - "t 0x11\n\t" \ + "t 0x6d\n\t" \ "sub %%g0, %%o0, %0\n\t" \ "movcc %%xcc, %%o0, %0\n\t" \ : "=r" (__res), "=r" ((long)(arg1)), "=r" ((long)(arg2)), \ @@ -359,7 +358,7 @@ __asm__ __volatile__ ("mov %0, %%g1\n\t" \ "mov %2, %%o1\n\t" \ "mov %3, %%o2\n\t" \ "mov %4, %%o3\n\t" \ - "t 0x11\n\t" \ + "t 0x6d\n\t" \ "sub %%g0,%%o0, %0\n\t" \ "movcc %%xcc, %%o0, %0\n\t" \ : "=r" (__res), "=r" ((long)(arg1)), "=r" ((long)(arg2)), \ @@ -385,7 +384,7 @@ __asm__ __volatile__ ("mov %1, %%o0\n\t" \ "mov %4, %%o3\n\t" \ "mov %5, %%o4\n\t" \ "mov %6, %%g1\n\t" \ - "t 0x11\n\t" \ + "t 0x6d\n\t" \ "sub %%g0, %%o0, %0\n\t" \ "movcc %%xcc, %%o0, %0\n\t" \ : "=r" (__res) \ @@ -450,13 +449,13 @@ static __inline__ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned lo "mov %1, %%g1\n\t" "mov %2, %%o0\n\t" /* Clone flags. */ "mov 0, %%o1\n\t" /* usp arg == 0 */ - "t 0x11\n\t" /* Linux/Sparc clone(). */ + "t 0x6d\n\t" /* Linux/Sparc clone(). */ "brz,a,pn %%o1, 1f\n\t" /* The parent, just return. */ " mov %%o0, %0\n\t" "jmpl %%g2, %%o7\n\t" /* Call the function. */ " mov %%g3, %%o0\n\t" /* Get back the arg in delay. */ "mov %3, %%g1\n\t" - "t 0x11\n\t" /* Linux/Sparc exit(). */ + "t 0x6d\n\t" /* Linux/Sparc exit(). */ /* Notreached by child. */ "1:" : "=r" (retval) : diff --git a/include/asm-sparc64/utrap.h b/include/asm-sparc64/utrap.h new file mode 100644 index 000000000..81b0ebf37 --- /dev/null +++ b/include/asm-sparc64/utrap.h @@ -0,0 +1,51 @@ +/* $Id: utrap.h,v 1.1 1997/10/14 16:21:31 jj Exp $ + * include/asm-sparc64/utrap.h + * + * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) + */ + +#ifndef __ASM_SPARC64_UTRAP_H +#define __ASM_SPARC64_UTRAP_H + +#define UT_INSTRUCTION_EXCEPTION 1 +#define UT_INSTRUCTION_ERROR 2 +#define UT_INSTRUCTION_PROTECTION 3 +#define UT_ILLTRAP_INSTRUCTION 4 +#define UT_ILLEGAL_INSTRUCTION 5 +#define UT_PRIVILEGED_OPCODE 6 +#define UT_FP_DISABLED 7 +#define UT_FP_EXCEPTION_IEEE_754 8 +#define UT_FP_EXCEPTION_OTHER 9 +#define UT_TAG_OVERVIEW 10 +#define UT_DIVISION_BY_ZERO 11 +#define UT_DATA_EXCEPTION 12 +#define UT_DATA_ERROR 13 +#define UT_DATA_PROTECTION 14 +#define UT_MEM_ADDRESS_NOT_ALIGNED 15 +#define UT_PRIVILEGED_ACTION 16 +#define UT_ASYNC_DATA_ERROR 17 +#define UT_TRAP_INSTRUCTION_16 18 +#define UT_TRAP_INSTRUCTION_17 19 +#define UT_TRAP_INSTRUCTION_18 20 +#define UT_TRAP_INSTRUCTION_19 21 +#define UT_TRAP_INSTRUCTION_20 22 +#define UT_TRAP_INSTRUCTION_21 23 +#define UT_TRAP_INSTRUCTION_22 24 +#define UT_TRAP_INSTRUCTION_23 25 +#define UT_TRAP_INSTRUCTION_24 26 +#define UT_TRAP_INSTRUCTION_25 27 +#define UT_TRAP_INSTRUCTION_26 28 +#define UT_TRAP_INSTRUCTION_27 29 +#define UT_TRAP_INSTRUCTION_28 30 +#define UT_TRAP_INSTRUCTION_29 31 +#define UT_TRAP_INSTRUCTION_30 32 +#define UT_TRAP_INSTRUCTION_31 33 + +#define UTH_NOCHANGE (-1) + +#ifndef __ASSEMBLY__ +typedef int utrap_entry_t; +typedef void *utrap_handler_t; +#endif /* __ASSEMBLY__ */ + +#endif /* !(__ASM_SPARC64_PROCESSOR_H) */ |