diff options
Diffstat (limited to 'include')
34 files changed, 159 insertions, 862 deletions
diff --git a/include/asm-sparc/a.out.h b/include/asm-sparc/a.out.h index 744cfe6c0de..2f1c3748a06 100644 --- a/include/asm-sparc/a.out.h +++ b/include/asm-sparc/a.out.h @@ -1,24 +1,27 @@ -/* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton Exp $ */ #ifndef __SPARC_A_OUT_H__ #define __SPARC_A_OUT_H__ #define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ +#ifndef __ASSEMBLY__ + struct exec { unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ unsigned char a_toolversion:7; unsigned char a_machtype; unsigned short a_info; - unsigned long a_text; /* length of text, in bytes */ - unsigned long a_data; /* length of data, in bytes */ - unsigned long a_bss; /* length of bss, in bytes */ - unsigned long a_syms; /* length of symbol table, in bytes */ - unsigned long a_entry; /* where program begins */ - unsigned long a_trsize; - unsigned long a_drsize; + unsigned int a_text; /* length of text, in bytes */ + unsigned int a_data; /* length of data, in bytes */ + unsigned int a_bss; /* length of bss, in bytes */ + unsigned int a_syms; /* length of symbol table, in bytes */ + unsigned int a_entry; /* where program begins */ + unsigned int a_trsize; + unsigned int a_drsize; }; +#endif /* !__ASSEMBLY__ */ + /* Where in the file does the text information begin? */ #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) @@ -28,19 +31,21 @@ struct exec { (x).a_drsize) /* Where does text segment go in memory after being loaded? */ -#define N_TXTADDR(x) (((N_MAGIC(x) == ZMAGIC) && \ +#define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \ ((x).a_entry < SPARC_PGSIZE)) ? \ 0 : SPARC_PGSIZE) /* And same for the data segment.. */ #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ (N_TXTADDR(x) + (x).a_text) \ - : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) + : (unsigned long) (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) #define N_TRSIZE(a) ((a).a_trsize) #define N_DRSIZE(a) ((a).a_drsize) #define N_SYMSIZE(a) ((a).a_syms) +#ifndef __ASSEMBLY__ + /* * Sparc relocation types */ @@ -77,14 +82,16 @@ enum reloc_type */ struct relocation_info /* used when header.a_machtype == M_SPARC */ { - unsigned long r_address; /* relocation addr */ + unsigned int r_address; /* relocation addr */ unsigned int r_index:24; /* segment index or symbol index */ unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ unsigned int r_pad:2; /* <unused> */ enum reloc_type r_type:5; /* type of relocation to perform */ - long r_addend; /* addend for relocation value */ + int r_addend; /* addend for relocation value */ }; #define N_RELOCATION_INFO_DECLARED 1 +#endif /* !(__ASSEMBLY__) */ + #endif /* __SPARC_A_OUT_H__ */ diff --git a/include/asm-sparc/bpp.h b/include/asm-sparc/bpp.h index 3578ac113cf..31f515e499a 100644 --- a/include/asm-sparc/bpp.h +++ b/include/asm-sparc/bpp.h @@ -17,7 +17,7 @@ * with compliant or compatible devices. It will use whatever features * the device supports, prefering those that are typically faster. * - * When the device is opened, it is left in COMPATABILITY mode, and + * When the device is opened, it is left in COMPATIBILITY mode, and * writes work like any printer device. The driver only attempt to * negotiate 1284 modes when needed so that plugs can be pulled, * switch boxes switched, etc., without disrupting things. It will diff --git a/include/asm-sparc/bsderrno.h b/include/asm-sparc/bsderrno.h deleted file mode 100644 index 54a75be43ab..00000000000 --- a/include/asm-sparc/bsderrno.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id: bsderrno.h,v 1.3 1996/04/25 06:12:47 davem Exp $ - * bsderrno.h: Error numbers for NetBSD binary compatibility - * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) - */ - -#ifndef _SPARC_BSDERRNO_H -#define _SPARC_BSDERRNO_H - -#define BSD_EPERM 1 /* Operation not permitted */ -#define BSD_ENOENT 2 /* No such file or directory */ -#define BSD_ESRCH 3 /* No such process */ -#define BSD_EINTR 4 /* Interrupted system call */ -#define BSD_EIO 5 /* Input/output error */ -#define BSD_ENXIO 6 /* Device not configured */ -#define BSD_E2BIG 7 /* Argument list too long */ -#define BSD_ENOEXEC 8 /* Exec format error */ -#define BSD_EBADF 9 /* Bad file descriptor */ -#define BSD_ECHILD 10 /* No child processes */ -#define BSD_EDEADLK 11 /* Resource deadlock avoided */ -#define BSD_ENOMEM 12 /* Cannot allocate memory */ -#define BSD_EACCES 13 /* Permission denied */ -#define BSD_EFAULT 14 /* Bad address */ -#define BSD_ENOTBLK 15 /* Block device required */ -#define BSD_EBUSY 16 /* Device busy */ -#define BSD_EEXIST 17 /* File exists */ -#define BSD_EXDEV 18 /* Cross-device link */ -#define BSD_ENODEV 19 /* Operation not supported by device */ -#define BSD_ENOTDIR 20 /* Not a directory */ -#define BSD_EISDIR 21 /* Is a directory */ -#define BSD_EINVAL 22 /* Invalid argument */ -#define BSD_ENFILE 23 /* Too many open files in system */ -#define BSD_EMFILE 24 /* Too many open files */ -#define BSD_ENOTTY 25 /* Inappropriate ioctl for device */ -#define BSD_ETXTBSY 26 /* Text file busy */ -#define BSD_EFBIG 27 /* File too large */ -#define BSD_ENOSPC 28 /* No space left on device */ -#define BSD_ESPIPE 29 /* Illegal seek */ -#define BSD_EROFS 30 /* Read-only file system */ -#define BSD_EMLINK 31 /* Too many links */ -#define BSD_EPIPE 32 /* Broken pipe */ -#define BSD_EDOM 33 /* Numerical argument out of domain */ -#define BSD_ERANGE 34 /* Result too large */ -#define BSD_EAGAIN 35 /* Resource temporarily unavailable */ -#define BSD_EWOULDBLOCK EAGAIN /* Operation would block */ -#define BSD_EINPROGRESS 36 /* Operation now in progress */ -#define BSD_EALREADY 37 /* Operation already in progress */ -#define BSD_ENOTSOCK 38 /* Socket operation on non-socket */ -#define BSD_EDESTADDRREQ 39 /* Destination address required */ -#define BSD_EMSGSIZE 40 /* Message too long */ -#define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define BSD_ENOPROTOOPT 42 /* Protocol not available */ -#define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */ -#define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define BSD_EOPNOTSUPP 45 /* Operation not supported */ -#define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */ -#define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define BSD_EADDRINUSE 48 /* Address already in use */ -#define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */ -#define BSD_ENETDOWN 50 /* Network is down */ -#define BSD_ENETUNREACH 51 /* Network is unreachable */ -#define BSD_ENETRESET 52 /* Network dropped connection on reset */ -#define BSD_ECONNABORTED 53 /* Software caused connection abort */ -#define BSD_ECONNRESET 54 /* Connection reset by peer */ -#define BSD_ENOBUFS 55 /* No buffer space available */ -#define BSD_EISCONN 56 /* Socket is already connected */ -#define BSD_ENOTCONN 57 /* Socket is not connected */ -#define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */ -#define BSD_ETIMEDOUT 60 /* Operation timed out */ -#define BSD_ECONNREFUSED 61 /* Connection refused */ -#define BSD_ELOOP 62 /* Too many levels of symbolic links */ -#define BSD_ENAMETOOLONG 63 /* File name too long */ -#define BSD_EHOSTDOWN 64 /* Host is down */ -#define BSD_EHOSTUNREACH 65 /* No route to host */ -#define BSD_ENOTEMPTY 66 /* Directory not empty */ -#define BSD_EPROCLIM 67 /* Too many processes */ -#define BSD_EUSERS 68 /* Too many users */ -#define BSD_EDQUOT 69 /* Disc quota exceeded */ -#define BSD_ESTALE 70 /* Stale NFS file handle */ -#define BSD_EREMOTE 71 /* Too many levels of remote in path */ -#define BSD_EBADRPC 72 /* RPC struct is bad */ -#define BSD_ERPCMISMATCH 73 /* RPC version wrong */ -#define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define BSD_EPROGMISMATCH 75 /* Program version wrong */ -#define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */ -#define BSD_ENOLCK 77 /* No locks available */ -#define BSD_ENOSYS 78 /* Function not implemented */ -#define BSD_EFTYPE 79 /* Inappropriate file type or format */ -#define BSD_EAUTH 80 /* Authentication error */ -#define BSD_ENEEDAUTH 81 /* Need authenticator */ -#define BSD_ELAST 81 /* Must be equal largest errno */ - -#endif /* !(_SPARC_BSDERRNO_H) */ diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h index 04151208189..8a59e5a8c21 100644 --- a/include/asm-sparc/bug.h +++ b/include/asm-sparc/bug.h @@ -2,28 +2,16 @@ #define _SPARC_BUG_H #ifdef CONFIG_BUG -/* Only use the inline asm until a gcc release that can handle __builtin_trap - * -rob 2003-06-25 - * - * gcc-3.3.1 and later will be OK -DaveM - */ -#if (__GNUC__ > 3) || \ - (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \ - (__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 4) -#define __bug_trap() __builtin_trap() -#else -#define __bug_trap() \ - __asm__ __volatile__ ("t 0x5\n\t" : : ) -#endif +#include <linux/compiler.h> #ifdef CONFIG_DEBUG_BUGVERBOSE extern void do_BUG(const char *file, int line); #define BUG() do { \ do_BUG(__FILE__, __LINE__); \ - __bug_trap(); \ + __builtin_trap(); \ } while (0) #else -#define BUG() __bug_trap() +#define BUG() __builtin_trap() #endif #define HAVE_ARCH_BUG diff --git a/include/asm-sparc/bugs.h b/include/asm-sparc/bugs.h index a0f939beeea..2dfc07bc8e5 100644 --- a/include/asm-sparc/bugs.h +++ b/include/asm-sparc/bugs.h @@ -1,16 +1,24 @@ -/* $Id: bugs.h,v 1.1 1996/12/26 13:25:20 davem Exp $ - * include/asm-sparc/bugs.h: Sparc probes for various bugs. +/* include/asm-sparc/bugs.h: Sparc probes for various bugs. * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) */ +#ifdef CONFIG_SPARC32 #include <asm/cpudata.h> +#endif + +#ifdef CONFIG_SPARC64 +#include <asm/sstate.h> +#endif extern unsigned long loops_per_jiffy; -static void check_bugs(void) +static void __init check_bugs(void) { -#ifndef CONFIG_SMP +#if defined(CONFIG_SPARC32) && !defined(CONFIG_SMP) cpu_data(0).udelay_val = loops_per_jiffy; #endif +#ifdef CONFIG_SPARC64 + sstate_running(); +#endif } diff --git a/include/asm-sparc/byteorder.h b/include/asm-sparc/byteorder.h index a2949aea48e..bcd83aa351c 100644 --- a/include/asm-sparc/byteorder.h +++ b/include/asm-sparc/byteorder.h @@ -1,12 +1,55 @@ -/* $Id: byteorder.h,v 1.15 1997/12/16 19:20:44 davem Exp $ */ #ifndef _SPARC_BYTEORDER_H #define _SPARC_BYTEORDER_H #include <asm/types.h> +#include <asm/asi.h> + +#ifdef __GNUC__ + +#ifdef CONFIG_SPARC32 +#define __SWAB_64_THRU_32__ +#endif + +#ifdef CONFIG_SPARC64 + +static inline __u16 ___arch__swab16p(const __u16 *addr) +{ + __u16 ret; + + __asm__ __volatile__ ("lduha [%1] %2, %0" + : "=r" (ret) + : "r" (addr), "i" (ASI_PL)); + return ret; +} + +static inline __u32 ___arch__swab32p(const __u32 *addr) +{ + __u32 ret; + + __asm__ __volatile__ ("lduwa [%1] %2, %0" + : "=r" (ret) + : "r" (addr), "i" (ASI_PL)); + return ret; +} + +static inline __u64 ___arch__swab64p(const __u64 *addr) +{ + __u64 ret; + + __asm__ __volatile__ ("ldxa [%1] %2, %0" + : "=r" (ret) + : "r" (addr), "i" (ASI_PL)); + return ret; +} + +#define __arch__swab16p(x) ___arch__swab16p(x) +#define __arch__swab32p(x) ___arch__swab32p(x) +#define __arch__swab64p(x) ___arch__swab64p(x) + +#endif /* CONFIG_SPARC64 */ + +#define __BYTEORDER_HAS_U64__ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) -# define __BYTEORDER_HAS_U64__ -# define __SWAB_64_THRU_32__ #endif #include <linux/byteorder/big_endian.h> diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h index cb971e88aea..41f85ae4bd4 100644 --- a/include/asm-sparc/cache.h +++ b/include/asm-sparc/cache.h @@ -1,20 +1,28 @@ -/* $Id: cache.h,v 1.9 1999/08/14 03:51:58 anton Exp $ - * cache.h: Cache specific code for the Sparc. These include flushing +/* cache.h: Cache specific code for the Sparc. These include flushing * and direct tag/data line access. * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) */ #ifndef _SPARC_CACHE_H #define _SPARC_CACHE_H -#include <asm/asi.h> - #define L1_CACHE_SHIFT 5 #define L1_CACHE_BYTES 32 #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) -#define SMP_CACHE_BYTES 32 +#ifdef CONFIG_SPARC32 +#define SMP_CACHE_BYTES_SHIFT 5 +#else +#define SMP_CACHE_BYTES_SHIFT 6 +#endif + +#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) + +#define __read_mostly __attribute__((__section__(".data.read_mostly"))) + +#ifdef CONFIG_SPARC32 +#include <asm/asi.h> /* Direct access to the instruction cache is provided through and * alternate address space. The IDC bit must be off in the ICCR on @@ -125,5 +133,6 @@ static inline void flush_ei_user(unsigned int addr) "r" (addr), "i" (ASI_M_FLUSH_USER) : "memory"); } +#endif /* CONFIG_SPARC32 */ #endif /* !(_SPARC_CACHE_H) */ diff --git a/include/asm-sparc/current.h b/include/asm-sparc/current.h index 8fe7c82a5e2..8a1d9d6643b 100644 --- a/include/asm-sparc/current.h +++ b/include/asm-sparc/current.h @@ -1,31 +1,34 @@ -/* - * include/asm-sparc/current.h +/* include/asm-sparc/current.h * * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com) + * Copyright (C) 2007 David S. Miller (davem@davemloft.net) * * Derived from "include/asm-s390/current.h" by * Martin Schwidefsky (schwidefsky@de.ibm.com) * Derived from "include/asm-i386/current.h" - */ -#ifndef _ASM_CURRENT_H -#define _ASM_CURRENT_H - -/* - * At the sparc64 DaveM keeps current_thread_info in %g4. - * We might want to consider doing the same to shave a few cycles. - */ +*/ +#ifndef _SPARC_CURRENT_H +#define _SPARC_CURRENT_H #include <linux/thread_info.h> -struct task_struct; +#ifdef CONFIG_SPARC64 +register struct task_struct *current asm("g4"); +#endif -/* Two stage process (inline + #define) for type-checking. */ -/* We also obfuscate get_current() to check if anyone used that by mistake. */ +#ifdef CONFIG_SPARC32 +/* We might want to consider using %g4 like sparc64 to shave a few cycles. + * + * Two stage process (inline + #define) for type-checking. + * We also obfuscate get_current() to check if anyone used that by mistake. + */ +struct task_struct; static inline struct task_struct *__get_current(void) { return current_thread_info()->task; } #define current __get_current() +#endif -#endif /* !(_ASM_CURRENT_H) */ +#endif /* !(_SPARC_CURRENT_H) */ diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h index c0a7786d65f..680e51d8737 100644 --- a/include/asm-sparc/device.h +++ b/include/asm-sparc/device.h @@ -19,5 +19,3 @@ struct dev_archdata { }; #endif /* _ASM_SPARC_DEVICE_H */ - - diff --git a/include/asm-sparc/errno.h b/include/asm-sparc/errno.h index ed41c8bac1f..a9ef172977d 100644 --- a/include/asm-sparc/errno.h +++ b/include/asm-sparc/errno.h @@ -1,4 +1,3 @@ -/* $Id: errno.h,v 1.6 1997/04/15 09:03:38 davem Exp $ */ #ifndef _SPARC_ERRNO_H #define _SPARC_ERRNO_H diff --git a/include/asm-sparc/fb.h b/include/asm-sparc/fb.h index c73ca081e1f..b83e4472965 100644 --- a/include/asm-sparc/fb.h +++ b/include/asm-sparc/fb.h @@ -1,9 +1,17 @@ -#ifndef _ASM_FB_H_ -#define _ASM_FB_H_ +#ifndef _SPARC_FB_H_ +#define _SPARC_FB_H_ #include <linux/fb.h> +#include <linux/fs.h> +#include <asm/page.h> #include <asm/prom.h> -#define fb_pgprotect(...) do {} while (0) +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ +#ifdef CONFIG_SPARC64 + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); +#endif +} static inline int fb_is_primary_device(struct fb_info *info) { @@ -18,4 +26,4 @@ static inline int fb_is_primary_device(struct fb_info *info) return 0; } -#endif /* _ASM_FB_H_ */ +#endif /* _SPARC_FB_H_ */ diff --git a/include/asm-sparc/of_platform.h b/include/asm-sparc/of_platform.h index d638737ff13..38334351c36 100644 --- a/include/asm-sparc/of_platform.h +++ b/include/asm-sparc/of_platform.h @@ -21,9 +21,4 @@ extern struct bus_type sbus_bus_type; #define of_bus_type of_platform_bus_type /* for compatibility */ -extern struct of_device *of_platform_device_create(struct device_node *np, - const char *bus_id, - struct device *parent, - struct bus_type *bus); - #endif /* _ASM_SPARC_OF_PLATFORM_H */ diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index 71f2a199832..df5dc442248 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h @@ -9,7 +9,7 @@ * Copyright (C) 1996-2005 Paul Mackerras. * * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. - * Updates for SPARC32 by David S. Miller + * Updates for SPARC by David S. Miller * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -39,6 +39,7 @@ struct property { unsigned int unique_id; }; +struct of_irq_controller; struct device_node { const char *name; const char *type; @@ -58,11 +59,19 @@ struct device_node { unsigned long _flags; void *data; unsigned int unique_id; + + struct of_irq_controller *irq_trans; +}; + +struct of_irq_controller { + unsigned int (*irq_build)(struct device_node *, unsigned int, void *); + void *data; }; #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) +extern struct device_node *of_find_node_by_cpuid(int cpuid); extern int of_set_property(struct device_node *node, const char *name, void *val, int len); extern int of_getintprop_default(struct device_node *np, const char *name, diff --git a/include/asm-sparc64/a.out.h b/include/asm-sparc64/a.out.h index 53c95bdfc66..44208c2a188 100644 --- a/include/asm-sparc64/a.out.h +++ b/include/asm-sparc64/a.out.h @@ -1,98 +1 @@ -/* $Id: a.out.h,v 1.8 2002/02/09 19:49:31 davem Exp $ */ -#ifndef __SPARC64_A_OUT_H__ -#define __SPARC64_A_OUT_H__ - -#define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ -#define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ - -#ifndef __ASSEMBLY__ - -struct exec { - unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ - unsigned char a_toolversion:7; - unsigned char a_machtype; - unsigned short a_info; - unsigned int a_text; /* length of text, in bytes */ - unsigned int a_data; /* length of data, in bytes */ - unsigned int a_bss; /* length of bss, in bytes */ - unsigned int a_syms; /* length of symbol table, in bytes */ - unsigned int a_entry; /* where program begins */ - unsigned int a_trsize; - unsigned int a_drsize; -}; - -#endif /* !__ASSEMBLY__ */ - -/* Where in the file does the text information begin? */ -#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) - -/* Where do the Symbols start? */ -#define N_SYMOFF(x) (N_TXTOFF(x) + (x).a_text + \ - (x).a_data + (x).a_trsize + \ - (x).a_drsize) - -/* Where does text segment go in memory after being loaded? */ -#define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \ - ((x).a_entry < SPARC_PGSIZE)) ? \ - 0 : SPARC_PGSIZE) - -/* And same for the data segment.. */ -#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ - (N_TXTADDR(x) + (x).a_text) \ - : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) - -#define N_TRSIZE(a) ((a).a_trsize) -#define N_DRSIZE(a) ((a).a_drsize) -#define N_SYMSIZE(a) ((a).a_syms) - -#ifndef __ASSEMBLY__ - -/* - * Sparc relocation types - */ -enum reloc_type -{ - RELOC_8, - RELOC_16, - RELOC_32, /* simplest relocs */ - RELOC_DISP8, - RELOC_DISP16, - RELOC_DISP32, /* Disp's (pc-rel) */ - RELOC_WDISP30, - RELOC_WDISP22, /* SR word disp's */ - RELOC_HI22, - RELOC_22, /* SR 22-bit relocs */ - RELOC_13, - RELOC_LO10, /* SR 13&10-bit relocs */ - RELOC_SFA_BASE, - RELOC_SFA_OFF13, /* SR S.F.A. relocs */ - RELOC_BASE10, - RELOC_BASE13, - RELOC_BASE22, /* base_relative pic */ - RELOC_PC10, - RELOC_PC22, /* special pc-rel pic */ - RELOC_JMP_TBL, /* jmp_tbl_rel in pic */ - RELOC_SEGOFF16, /* ShLib offset-in-seg */ - RELOC_GLOB_DAT, - RELOC_JMP_SLOT, - RELOC_RELATIVE /* rtld relocs */ -}; - -/* - * Format of a relocation datum. - */ -struct relocation_info /* used when header.a_machtype == M_SPARC */ -{ - unsigned int r_address; /* relocation addr */ - unsigned int r_index:24; /* segment index or symbol index */ - unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ - unsigned int r_pad:2; /* <unused> */ - enum reloc_type r_type:5; /* type of relocation to perform */ - int r_addend; /* addend for relocation value */ -}; - -#define N_RELOCATION_INFO_DECLARED 1 - -#endif /* !(__ASSEMBLY__) */ - -#endif /* !(__SPARC64_A_OUT_H__) */ +#include <asm-sparc/a.out.h> diff --git a/include/asm-sparc64/auxvec.h b/include/asm-sparc64/auxvec.h index 436a2912982..1f45c67d731 100644 --- a/include/asm-sparc64/auxvec.h +++ b/include/asm-sparc64/auxvec.h @@ -1,4 +1 @@ -#ifndef __ASM_SPARC64_AUXVEC_H -#define __ASM_SPARC64_AUXVEC_H - -#endif /* !(__ASM_SPARC64_AUXVEC_H) */ +#include <asm-sparc/auxvec.h> diff --git a/include/asm-sparc64/bpp.h b/include/asm-sparc64/bpp.h index abe163a5038..514eee20272 100644 --- a/include/asm-sparc64/bpp.h +++ b/include/asm-sparc64/bpp.h @@ -1,73 +1 @@ -#ifndef _SPARC64_BPP_H -#define _SPARC64_BPP_H - -/* - * Copyright (c) 1995 Picture Elements - * Stephen Williams - * Gus Baldauf - * - * Linux/SPARC port by Peter Zaitcev. - * Integration into SPARC tree by Tom Dyas. - */ - -#include <linux/ioctl.h> - -/* - * This is a driver that supports IEEE Std 1284-1994 communications - * with compliant or compatible devices. It will use whatever features - * the device supports, prefering those that are typically faster. - * - * When the device is opened, it is left in COMPATIBILITY mode, and - * writes work like any printer device. The driver only attempt to - * negotiate 1284 modes when needed so that plugs can be pulled, - * switch boxes switched, etc., without disrupting things. It will - * also leave the device in compatibility mode when closed. - */ - - - -/* - * This driver also supplies ioctls to manually manipulate the - * pins. This is great for testing devices, or writing code to deal - * with bizzarro-mode of the ACME Special TurboThingy Plus. - * - * NOTE: These ioctl currently do not interact well with - * read/write. Caveat emptor. - * - * PUT_PINS allows us to assign the sense of all the pins, including - * the data pins if being driven by the host. The GET_PINS returns the - * pins that the peripheral drives, including data if appropriate. - */ - -# define BPP_PUT_PINS _IOW('B', 1, int) -# define BPP_GET_PINS _IOR('B', 2, char) /* that's bogus - should've been _IO */ -# define BPP_PUT_DATA _IOW('B', 3, int) -# define BPP_GET_DATA _IOR('B', 4, char) /* ditto */ - -/* - * Set the data bus to input mode. Disengage the data bin driver and - * be prepared to read values from the peripheral. If the arg is 0, - * then revert the bus to output mode. - */ -# define BPP_SET_INPUT _IOW('B', 5, int) - -/* - * These bits apply to the PUT operation... - */ -# define BPP_PP_nStrobe 0x0001 -# define BPP_PP_nAutoFd 0x0002 -# define BPP_PP_nInit 0x0004 -# define BPP_PP_nSelectIn 0x0008 - -/* - * These apply to the GET operation, which also reads the current value - * of the previously put values. A bit mask of these will be returned - * as a bit mask in the return code of the ioctl(). - */ -# define BPP_GP_nAck 0x0100 -# define BPP_GP_Busy 0x0200 -# define BPP_GP_PError 0x0400 -# define BPP_GP_Select 0x0800 -# define BPP_GP_nFault 0x1000 - -#endif +#include <asm-sparc/bpp.h> diff --git a/include/asm-sparc64/bsderrno.h b/include/asm-sparc64/bsderrno.h deleted file mode 100644 index 52fe880d2af..00000000000 --- a/include/asm-sparc64/bsderrno.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id: bsderrno.h,v 1.1 1996/12/26 13:25:21 davem Exp $ - * bsderrno.h: Error numbers for NetBSD binary compatibility - * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) - */ - -#ifndef _SPARC64_BSDERRNO_H -#define _SPARC64_BSDERRNO_H - -#define BSD_EPERM 1 /* Operation not permitted */ -#define BSD_ENOENT 2 /* No such file or directory */ -#define BSD_ESRCH 3 /* No such process */ -#define BSD_EINTR 4 /* Interrupted system call */ -#define BSD_EIO 5 /* Input/output error */ -#define BSD_ENXIO 6 /* Device not configured */ -#define BSD_E2BIG 7 /* Argument list too long */ -#define BSD_ENOEXEC 8 /* Exec format error */ -#define BSD_EBADF 9 /* Bad file descriptor */ -#define BSD_ECHILD 10 /* No child processes */ -#define BSD_EDEADLK 11 /* Resource deadlock avoided */ -#define BSD_ENOMEM 12 /* Cannot allocate memory */ -#define BSD_EACCES 13 /* Permission denied */ -#define BSD_EFAULT 14 /* Bad address */ -#define BSD_ENOTBLK 15 /* Block device required */ -#define BSD_EBUSY 16 /* Device busy */ -#define BSD_EEXIST 17 /* File exists */ -#define BSD_EXDEV 18 /* Cross-device link */ -#define BSD_ENODEV 19 /* Operation not supported by device */ -#define BSD_ENOTDIR 20 /* Not a directory */ -#define BSD_EISDIR 21 /* Is a directory */ -#define BSD_EINVAL 22 /* Invalid argument */ |