diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-10 02:28:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-10 02:28:26 -0500 |
commit | bfc1de0c40a26c6daa46c297e28138aecb4c5664 (patch) | |
tree | 5ac390e4c790076fda0644dd8b583ca819051905 /include | |
parent | 1712a699ab32d4952fe6b0f97af91b8230bece98 (diff) | |
parent | e88bb41595ad67a8e7d5dd8c7bbeea2e66cc0cac (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (24 commits)
[SPARC]: Add solaris/sunos binary support to feature removal schedule.
[SPARC]: Merge asm-sparc{,64}/a.out.h
[SPARC]: Merge asm-sparc{,64}/fb.h
[SPARC]: Merge asm-sparc{,64}/errno.h
[SPARC]: Merge asm-sparc{,64}/emergency-restart.h
[SPARC]: Merge asm-sparc{,64}/div64.h
[SPARC]: Merge asm-sparc{,64}/device.h
[SPARC]: Merge asm-sparc{,64}/current.h
[SPARC]: Merge asm-sparc{,64}/cputime.h
[SPARC]: Merge asm-sparc{,64}/cache.h
[SPARC]: Merge asm-sparc{,64}/byteorder.h
[SPARC]: Merge asm-sparc{,64}/bugs.h
[SPARC]: Merge asm-sparc{,64}/bug.h
[SPARC]: Kill BSD errno translation table and header files.
[SPARC]: Merge asm-sparc{,64}/bpp.h
[SPARC]: Merge include/asm-sparc{,64}/auxvec.h
[SPARC]: Merge include/asm-sparc{,64}/of_device.h
[SPARC]: Merge include/asm-sparc{,64}/prom.h
[SPARC]: Remove of_platform_device_create
[SPARC64]: Add kretprobe support.
...
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 744cfe6c0de8..2f1c3748a068 100644 --- a/include/asm-sparc/a.out.h +++ b/include/asm-sparc/a.out.h | |||
@@ -1,24 +1,27 @@ | |||
1 | /* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton Exp $ */ | ||
2 | #ifndef __SPARC_A_OUT_H__ | 1 | #ifndef __SPARC_A_OUT_H__ |
3 | #define __SPARC_A_OUT_H__ | 2 | #define __SPARC_A_OUT_H__ |
4 | 3 | ||
5 | #define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ | 4 | #define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ |
6 | #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ | 5 | #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ |
7 | 6 | ||
7 | #ifndef __ASSEMBLY__ | ||
8 | |||
8 | struct exec { | 9 | struct exec { |
9 | unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ | 10 | unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ |
10 | unsigned char a_toolversion:7; | 11 | unsigned char a_toolversion:7; |
11 | unsigned char a_machtype; | 12 | unsigned char a_machtype; |
12 | unsigned short a_info; | 13 | unsigned short a_info; |
13 | unsigned long a_text; /* length of text, in bytes */ | 14 | unsigned int a_text; /* length of text, in bytes */ |
14 | unsigned long a_data; /* length of data, in bytes */ | 15 | unsigned int a_data; /* length of data, in bytes */ |
15 | unsigned long a_bss; /* length of bss, in bytes */ | 16 | unsigned int a_bss; /* length of bss, in bytes */ |
16 | unsigned long a_syms; /* length of symbol table, in bytes */ | 17 | unsigned int a_syms; /* length of symbol table, in bytes */ |
17 | unsigned long a_entry; /* where program begins */ | 18 | unsigned int a_entry; /* where program begins */ |
18 | unsigned long a_trsize; | 19 | unsigned int a_trsize; |
19 | unsigned long a_drsize; | 20 | unsigned int a_drsize; |
20 | }; | 21 | }; |
21 | 22 | ||
23 | #endif /* !__ASSEMBLY__ */ | ||
24 | |||
22 | /* Where in the file does the text information begin? */ | 25 | /* Where in the file does the text information begin? */ |
23 | #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) | 26 | #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) |
24 | 27 | ||
@@ -28,19 +31,21 @@ struct exec { | |||
28 | (x).a_drsize) | 31 | (x).a_drsize) |
29 | 32 | ||
30 | /* Where does text segment go in memory after being loaded? */ | 33 | /* Where does text segment go in memory after being loaded? */ |
31 | #define N_TXTADDR(x) (((N_MAGIC(x) == ZMAGIC) && \ | 34 | #define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \ |
32 | ((x).a_entry < SPARC_PGSIZE)) ? \ | 35 | ((x).a_entry < SPARC_PGSIZE)) ? \ |
33 | 0 : SPARC_PGSIZE) | 36 | 0 : SPARC_PGSIZE) |
34 | 37 | ||
35 | /* And same for the data segment.. */ | 38 | /* And same for the data segment.. */ |
36 | #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ | 39 | #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ |
37 | (N_TXTADDR(x) + (x).a_text) \ | 40 | (N_TXTADDR(x) + (x).a_text) \ |
38 | : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) | 41 | : (unsigned long) (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) |
39 | 42 | ||
40 | #define N_TRSIZE(a) ((a).a_trsize) | 43 | #define N_TRSIZE(a) ((a).a_trsize) |
41 | #define N_DRSIZE(a) ((a).a_drsize) | 44 | #define N_DRSIZE(a) ((a).a_drsize) |
42 | #define N_SYMSIZE(a) ((a).a_syms) | 45 | #define N_SYMSIZE(a) ((a).a_syms) |
43 | 46 | ||
47 | #ifndef __ASSEMBLY__ | ||
48 | |||
44 | /* | 49 | /* |
45 | * Sparc relocation types | 50 | * Sparc relocation types |
46 | */ | 51 | */ |
@@ -77,14 +82,16 @@ enum reloc_type | |||
77 | */ | 82 | */ |
78 | struct relocation_info /* used when header.a_machtype == M_SPARC */ | 83 | struct relocation_info /* used when header.a_machtype == M_SPARC */ |
79 | { | 84 | { |
80 | unsigned long r_address; /* relocation addr */ | 85 | unsigned int r_address; /* relocation addr */ |
81 | unsigned int r_index:24; /* segment index or symbol index */ | 86 | unsigned int r_index:24; /* segment index or symbol index */ |
82 | unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ | 87 | unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ |
83 | unsigned int r_pad:2; /* <unused> */ | 88 | unsigned int r_pad:2; /* <unused> */ |
84 | enum reloc_type r_type:5; /* type of relocation to perform */ | 89 | enum reloc_type r_type:5; /* type of relocation to perform */ |
85 | long r_addend; /* addend for relocation value */ | 90 | int r_addend; /* addend for relocation value */ |
86 | }; | 91 | }; |
87 | 92 | ||
88 | #define N_RELOCATION_INFO_DECLARED 1 | 93 | #define N_RELOCATION_INFO_DECLARED 1 |
89 | 94 | ||
95 | #endif /* !(__ASSEMBLY__) */ | ||
96 | |||
90 | #endif /* __SPARC_A_OUT_H__ */ | 97 | #endif /* __SPARC_A_OUT_H__ */ |
diff --git a/include/asm-sparc/bpp.h b/include/asm-sparc/bpp.h index 3578ac113cf0..31f515e499a7 100644 --- a/include/asm-sparc/bpp.h +++ b/include/asm-sparc/bpp.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * with compliant or compatible devices. It will use whatever features | 17 | * with compliant or compatible devices. It will use whatever features |
18 | * the device supports, prefering those that are typically faster. | 18 | * the device supports, prefering those that are typically faster. |
19 | * | 19 | * |
20 | * When the device is opened, it is left in COMPATABILITY mode, and | 20 | * When the device is opened, it is left in COMPATIBILITY mode, and |
21 | * writes work like any printer device. The driver only attempt to | 21 | * writes work like any printer device. The driver only attempt to |
22 | * negotiate 1284 modes when needed so that plugs can be pulled, | 22 | * negotiate 1284 modes when needed so that plugs can be pulled, |
23 | * switch boxes switched, etc., without disrupting things. It will | 23 | * 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 54a75be43abb..000000000000 --- a/include/asm-sparc/bsderrno.h +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* $Id: bsderrno.h,v 1.3 1996/04/25 06:12:47 davem Exp $ | ||
2 | * bsderrno.h: Error numbers for NetBSD binary compatibility | ||
3 | * | ||
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | ||
5 | */ | ||
6 | |||
7 | #ifndef _SPARC_BSDERRNO_H | ||
8 | #define _SPARC_BSDERRNO_H | ||
9 | |||
10 | #define BSD_EPERM 1 /* Operation not permitted */ | ||
11 | #define BSD_ENOENT 2 /* No such file or directory */ | ||
12 | #define BSD_ESRCH 3 /* No such process */ | ||
13 | #define BSD_EINTR 4 /* Interrupted system call */ | ||
14 | #define BSD_EIO 5 /* Input/output error */ | ||
15 | #define BSD_ENXIO 6 /* Device not configured */ | ||
16 | #define BSD_E2BIG 7 /* Argument list too long */ | ||
17 | #define BSD_ENOEXEC 8 /* Exec format error */ | ||
18 | #define BSD_EBADF 9 /* Bad file descriptor */ | ||
19 | #define BSD_ECHILD 10 /* No child processes */ | ||
20 | #define BSD_EDEADLK 11 /* Resource deadlock avoided */ | ||
21 | #define BSD_ENOMEM 12 /* Cannot allocate memory */ | ||
22 | #define BSD_EACCES 13 /* Permission denied */ | ||
23 | #define BSD_EFAULT 14 /* Bad address */ | ||
24 | #define BSD_ENOTBLK 15 /* Block device required */ | ||
25 | #define BSD_EBUSY 16 /* Device busy */ | ||
26 | #define BSD_EEXIST 17 /* File exists */ | ||
27 | #define BSD_EXDEV 18 /* Cross-device link */ | ||
28 | #define BSD_ENODEV 19 /* Operation not supported by device */ | ||
29 | #define BSD_ENOTDIR 20 /* Not a directory */ | ||
30 | #define BSD_EISDIR 21 /* Is a directory */ | ||
31 | #define BSD_EINVAL 22 /* Invalid argument */ | ||
32 | #define BSD_ENFILE 23 /* Too many open files in system */ | ||
33 | #define BSD_EMFILE 24 /* Too many open files */ | ||
34 | #define BSD_ENOTTY 25 /* Inappropriate ioctl for device */ | ||
35 | #define BSD_ETXTBSY 26 /* Text file busy */ | ||
36 | #define BSD_EFBIG 27 /* File too large */ | ||
37 | #define BSD_ENOSPC 28 /* No space left on device */ | ||
38 | #define BSD_ESPIPE 29 /* Illegal seek */ | ||
39 | #define BSD_EROFS 30 /* Read-only file system */ | ||
40 | #define BSD_EMLINK 31 /* Too many links */ | ||
41 | #define BSD_EPIPE 32 /* Broken pipe */ | ||
42 | #define BSD_EDOM 33 /* Numerical argument out of domain */ | ||
43 | #define BSD_ERANGE 34 /* Result too large */ | ||
44 | #define BSD_EAGAIN 35 /* Resource temporarily unavailable */ | ||
45 | #define BSD_EWOULDBLOCK EAGAIN /* Operation would block */ | ||
46 | #define BSD_EINPROGRESS 36 /* Operation now in progress */ | ||
47 | #define BSD_EALREADY 37 /* Operation already in progress */ | ||
48 | #define BSD_ENOTSOCK 38 /* Socket operation on non-socket */ | ||
49 | #define BSD_EDESTADDRREQ 39 /* Destination address required */ | ||
50 | #define BSD_EMSGSIZE 40 /* Message too long */ | ||
51 | #define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */ | ||
52 | #define BSD_ENOPROTOOPT 42 /* Protocol not available */ | ||
53 | #define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */ | ||
54 | #define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */ | ||
55 | #define BSD_EOPNOTSUPP 45 /* Operation not supported */ | ||
56 | #define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */ | ||
57 | #define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ | ||
58 | #define BSD_EADDRINUSE 48 /* Address already in use */ | ||
59 | #define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */ | ||
60 | #define BSD_ENETDOWN 50 /* Network is down */ | ||
61 | #define BSD_ENETUNREACH 51 /* Network is unreachable */ | ||
62 | #define BSD_ENETRESET 52 /* Network dropped connection on reset */ | ||
63 | #define BSD_ECONNABORTED 53 /* Software caused connection abort */ | ||
64 | #define BSD_ECONNRESET 54 /* Connection reset by peer */ | ||
65 | #define BSD_ENOBUFS 55 /* No buffer space available */ | ||
66 | #define BSD_EISCONN 56 /* Socket is already connected */ | ||
67 | #define BSD_ENOTCONN 57 /* Socket is not connected */ | ||
68 | #define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */ | ||
69 | #define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */ | ||
70 | #define BSD_ETIMEDOUT 60 /* Operation timed out */ | ||
71 | #define BSD_ECONNREFUSED 61 /* Connection refused */ | ||
72 | #define BSD_ELOOP 62 /* Too many levels of symbolic links */ | ||
73 | #define BSD_ENAMETOOLONG 63 /* File name too long */ | ||
74 | #define BSD_EHOSTDOWN 64 /* Host is down */ | ||
75 | #define BSD_EHOSTUNREACH 65 /* No route to host */ | ||
76 | #define BSD_ENOTEMPTY 66 /* Directory not empty */ | ||
77 | #define BSD_EPROCLIM 67 /* Too many processes */ | ||
78 | #define BSD_EUSERS 68 /* Too many users */ | ||
79 | #define BSD_EDQUOT 69 /* Disc quota exceeded */ | ||
80 | #define BSD_ESTALE 70 /* Stale NFS file handle */ | ||
81 | #define BSD_EREMOTE 71 /* Too many levels of remote in path */ | ||
82 | #define BSD_EBADRPC 72 /* RPC struct is bad */ | ||
83 | #define BSD_ERPCMISMATCH 73 /* RPC version wrong */ | ||
84 | #define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */ | ||
85 | #define BSD_EPROGMISMATCH 75 /* Program version wrong */ | ||
86 | #define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */ | ||
87 | #define BSD_ENOLCK 77 /* No locks available */ | ||
88 | #define BSD_ENOSYS 78 /* Function not implemented */ | ||
89 | #define BSD_EFTYPE 79 /* Inappropriate file type or format */ | ||
90 | #define BSD_EAUTH 80 /* Authentication error */ | ||
91 | #define BSD_ENEEDAUTH 81 /* Need authenticator */ | ||
92 | #define BSD_ELAST 81 /* Must be equal largest errno */ | ||
93 | |||
94 | #endif /* !(_SPARC_BSDERRNO_H) */ | ||
diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h index 04151208189f..8a59e5a8c217 100644 --- a/include/asm-sparc/bug.h +++ b/include/asm-sparc/bug.h | |||
@@ -2,28 +2,16 @@ | |||
2 | #define _SPARC_BUG_H | 2 | #define _SPARC_BUG_H |
3 | 3 | ||
4 | #ifdef CONFIG_BUG | 4 | #ifdef CONFIG_BUG |
5 | /* Only use the inline asm until a gcc release that can handle __builtin_trap | 5 | #include <linux/compiler.h> |
6 | * -rob 2003-06-25 | ||
7 | * | ||
8 | * gcc-3.3.1 and later will be OK -DaveM | ||
9 | */ | ||
10 | #if (__GNUC__ > 3) || \ | ||
11 | (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \ | ||
12 | (__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 4) | ||
13 | #define __bug_trap() __builtin_trap() | ||
14 | #else | ||
15 | #define __bug_trap() \ | ||
16 | __asm__ __volatile__ ("t 0x5\n\t" : : ) | ||
17 | #endif | ||
18 | 6 | ||
19 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
20 | extern void do_BUG(const char *file, int line); | 8 | extern void do_BUG(const char *file, int line); |
21 | #define BUG() do { \ | 9 | #define BUG() do { \ |
22 | do_BUG(__FILE__, __LINE__); \ | 10 | do_BUG(__FILE__, __LINE__); \ |
23 | __bug_trap(); \ | 11 | __builtin_trap(); \ |
24 | } while (0) | 12 | } while (0) |
25 | #else | 13 | #else |
26 | #define BUG() __bug_trap() | 14 | #define BUG() __builtin_trap() |
27 | #endif | 15 | #endif |
28 | 16 | ||
29 | #define HAVE_ARCH_BUG | 17 | #define HAVE_ARCH_BUG |
diff --git a/include/asm-sparc/bugs.h b/include/asm-sparc/bugs.h index a0f939beeea1..2dfc07bc8e54 100644 --- a/include/asm-sparc/bugs.h +++ b/include/asm-sparc/bugs.h | |||
@@ -1,16 +1,24 @@ | |||
1 | /* $Id: bugs.h,v 1.1 1996/12/26 13:25:20 davem Exp $ | 1 | /* include/asm-sparc/bugs.h: Sparc probes for various bugs. |
2 | * include/asm-sparc/bugs.h: Sparc probes for various bugs. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
6 | #ifdef CONFIG_SPARC32 | ||
7 | #include <asm/cpudata.h> | 7 | #include <asm/cpudata.h> |
8 | #endif | ||
9 | |||
10 | #ifdef CONFIG_SPARC64 | ||
11 | #include <asm/sstate.h> | ||
12 | #endif | ||
8 | 13 | ||
9 | extern unsigned long loops_per_jiffy; | 14 | extern unsigned long loops_per_jiffy; |
10 | 15 | ||
11 | static void check_bugs(void) | 16 | static void __init check_bugs(void) |
12 | { | 17 | { |
13 | #ifndef CONFIG_SMP | 18 | #if defined(CONFIG_SPARC32) && !defined(CONFIG_SMP) |
14 | cpu_data(0).udelay_val = loops_per_jiffy; | 19 | cpu_data(0).udelay_val = loops_per_jiffy; |
15 | #endif | 20 | #endif |
21 | #ifdef CONFIG_SPARC64 | ||
22 | sstate_running(); | ||
23 | #endif | ||
16 | } | 24 | } |
diff --git a/include/asm-sparc/byteorder.h b/include/asm-sparc/byteorder.h index a2949aea48ef..bcd83aa351c5 100644 --- a/include/asm-sparc/byteorder.h +++ b/include/asm-sparc/byteorder.h | |||
@@ -1,12 +1,55 @@ | |||
1 | /* $Id: byteorder.h,v 1.15 1997/12/16 19:20:44 davem Exp $ */ | ||
2 | #ifndef _SPARC_BYTEORDER_H | 1 | #ifndef _SPARC_BYTEORDER_H |
3 | #define _SPARC_BYTEORDER_H | 2 | #define _SPARC_BYTEORDER_H |
4 | 3 | ||
5 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/asi.h> | ||
6 | |||
7 | #ifdef __GNUC__ | ||
8 | |||
9 | #ifdef CONFIG_SPARC32 | ||
10 | #define __SWAB_64_THRU_32__ | ||
11 | #endif | ||
12 | |||
13 | #ifdef CONFIG_SPARC64 | ||
14 | |||
15 | static inline __u16 ___arch__swab16p(const __u16 *addr) | ||
16 | { | ||
17 | __u16 ret; | ||
18 | |||
19 | __asm__ __volatile__ ("lduha [%1] %2, %0" | ||
20 | : "=r" (ret) | ||
21 | : "r" (addr), "i" (ASI_PL)); | ||
22 | return ret; | ||
23 | } | ||
24 | |||
25 | static inline __u32 ___arch__swab32p(const __u32 *addr) | ||
26 | { | ||
27 | __u32 ret; | ||
28 | |||
29 | __asm__ __volatile__ ("lduwa [%1] %2, %0" | ||
30 | : "=r" (ret) | ||
31 | : "r" (addr), "i" (ASI_PL)); | ||
32 | return ret; | ||
33 | } | ||
34 | |||
35 | static inline __u64 ___arch__swab64p(const __u64 *addr) | ||
36 | { | ||
37 | __u64 ret; | ||
38 | |||
39 | __asm__ __volatile__ ("ldxa [%1] %2, %0" | ||
40 | : "=r" (ret) | ||
41 | : "r" (addr), "i" (ASI_PL)); | ||
42 | return ret; | ||
43 | } | ||
44 | |||
45 | #define __arch__swab16p(x) ___arch__swab16p(x) | ||
46 | #define __arch__swab32p(x) ___arch__swab32p(x) | ||
47 | #define __arch__swab64p(x) ___arch__swab64p(x) | ||
48 | |||
49 | #endif /* CONFIG_SPARC64 */ | ||
50 | |||
51 | #define __BYTEORDER_HAS_U64__ | ||
6 | 52 | ||
7 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
8 | # define __BYTEORDER_HAS_U64__ | ||
9 | # define __SWAB_64_THRU_32__ | ||
10 | #endif | 53 | #endif |
11 | 54 | ||
12 | #include <linux/byteorder/big_endian.h> | 55 | #include <linux/byteorder/big_endian.h> |
diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h index cb971e88aea4..41f85ae4bd4a 100644 --- a/include/asm-sparc/cache.h +++ b/include/asm-sparc/cache.h | |||
@@ -1,20 +1,28 @@ | |||
1 | /* $Id: cache.h,v 1.9 1999/08/14 03:51:58 anton Exp $ | 1 | /* cache.h: Cache specific code for the Sparc. These include flushing |
2 | * cache.h: Cache specific code for the Sparc. These include flushing | ||
3 | * and direct tag/data line access. | 2 | * and direct tag/data line access. |
4 | * | 3 | * |
5 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) |
6 | */ | 5 | */ |
7 | 6 | ||
8 | #ifndef _SPARC_CACHE_H | 7 | #ifndef _SPARC_CACHE_H |
9 | #define _SPARC_CACHE_H | 8 | #define _SPARC_CACHE_H |
10 | 9 | ||
11 | #include <asm/asi.h> | ||
12 | |||
13 | #define L1_CACHE_SHIFT 5 | 10 | #define L1_CACHE_SHIFT 5 |
14 | #define L1_CACHE_BYTES 32 | 11 | #define L1_CACHE_BYTES 32 |
15 | #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) | 12 | #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) |
16 | 13 | ||
17 | #define SMP_CACHE_BYTES 32 | 14 | #ifdef CONFIG_SPARC32 |
15 | #define SMP_CACHE_BYTES_SHIFT 5 | ||
16 | #else | ||
17 | #define SMP_CACHE_BYTES_SHIFT 6 | ||
18 | #endif | ||
19 | |||
20 | #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) | ||
21 | |||
22 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | ||
23 | |||
24 | #ifdef CONFIG_SPARC32 | ||
25 | #include <asm/asi.h> | ||
18 | 26 | ||
19 | /* Direct access to the instruction cache is provided through and | 27 | /* Direct access to the instruction cache is provided through and |
20 | * alternate address space. The IDC bit must be off in the ICCR on | 28 | * 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) | |||
125 | "r" (addr), "i" (ASI_M_FLUSH_USER) : | 133 | "r" (addr), "i" (ASI_M_FLUSH_USER) : |
126 | "memory"); | 134 | "memory"); |
127 | } | 135 | } |
136 | #endif /* CONFIG_SPARC32 */ | ||
128 | 137 | ||
129 | #endif /* !(_SPARC_CACHE_H) */ | 138 | #endif /* !(_SPARC_CACHE_H) */ |
diff --git a/include/asm-sparc/current.h b/include/asm-sparc/current.h index 8fe7c82a5e21..8a1d9d6643b0 100644 --- a/include/asm-sparc/current.h +++ b/include/asm-sparc/current.h | |||
@@ -1,31 +1,34 @@ | |||
1 | /* | 1 | /* include/asm-sparc/current.h |
2 | * include/asm-sparc/current.h | ||
3 | * | 2 | * |
4 | * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation | 3 | * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation |
5 | * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com) | 4 | * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com) |
5 | * Copyright (C) 2007 David S. Miller (davem@davemloft.net) | ||
6 | * | 6 | * |
7 | * Derived from "include/asm-s390/current.h" by | 7 | * Derived from "include/asm-s390/current.h" by |
8 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 8 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
9 | * Derived from "include/asm-i386/current.h" | 9 | * Derived from "include/asm-i386/current.h" |
10 | */ | 10 | */ |
11 | #ifndef _ASM_CURRENT_H | 11 | #ifndef _SPARC_CURRENT_H |
12 | #define _ASM_CURRENT_H | 12 | #define _SPARC_CURRENT_H |
13 | |||
14 | /* | ||
15 | * At the sparc64 DaveM keeps current_thread_info in %g4. | ||
16 | * We might want to consider doing the same to shave a few cycles. | ||
17 | */ | ||
18 | 13 | ||
19 | #include <linux/thread_info.h> | 14 | #include <linux/thread_info.h> |
20 | 15 | ||
21 | struct task_struct; | 16 | #ifdef CONFIG_SPARC64 |
17 | register struct task_struct *current asm("g4"); | ||
18 | #endif | ||
22 | 19 | ||
23 | /* Two stage process (inline + #define) for type-checking. */ | 20 | #ifdef CONFIG_SPARC32 |
24 | /* We also obfuscate get_current() to check if anyone used that by mistake. */ | 21 | /* We might want to consider using %g4 like sparc64 to shave a few cycles. |
22 | * | ||
23 | * Two stage process (inline + #define) for type-checking. | ||
24 | * We also obfuscate get_current() to check if anyone used that by mistake. | ||
25 | */ | ||
26 | struct task_struct; | ||
25 | static inline struct task_struct *__get_current(void) | 27 | static inline struct task_struct *__get_current(void) |
26 | { | 28 | { |
27 | return current_thread_info()->task; | 29 | return current_thread_info()->task; |
28 | } | 30 | } |
29 | #define current __get_current() | 31 | #define current __get_current() |
32 | #endif | ||
30 | 33 | ||
31 | #endif /* !(_ASM_CURRENT_H) */ | 34 | #endif /* !(_SPARC_CURRENT_H) */ |
diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h index c0a7786d65f7..680e51d87374 100644 --- a/include/asm-sparc/device.h +++ b/include/asm-sparc/device.h | |||
@@ -19,5 +19,3 @@ struct dev_archdata { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | #endif /* _ASM_SPARC_DEVICE_H */ | 21 | #endif /* _ASM_SPARC_DEVICE_H */ |
22 | |||
23 | |||
diff --git a/include/asm-sparc/errno.h b/include/asm-sparc/errno.h index ed41c8bac1fa..a9ef172977de 100644 --- a/include/asm-sparc/errno.h +++ b/include/asm-sparc/errno.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: errno.h,v 1.6 1997/04/15 09:03:38 davem Exp $ */ | ||
2 | #ifndef _SPARC_ERRNO_H | 1 | #ifndef _SPARC_ERRNO_H |
3 | #define _SPARC_ERRNO_H | 2 | #define _SPARC_ERRNO_H |
4 | 3 | ||
diff --git a/include/asm-sparc/fb.h b/include/asm-sparc/fb.h index c73ca081e1f5..b83e44729655 100644 --- a/include/asm-sparc/fb.h +++ b/include/asm-sparc/fb.h | |||
@@ -1,9 +1,17 @@ | |||
1 | #ifndef _ASM_FB_H_ | 1 | #ifndef _SPARC_FB_H_ |
2 | #define _ASM_FB_H_ | 2 | #define _SPARC_FB_H_ |
3 | #include <linux/fb.h> | 3 | #include <linux/fb.h> |
4 | #include <linux/fs.h> | ||
5 | #include <asm/page.h> | ||
4 | #include <asm/prom.h> | 6 | #include <asm/prom.h> |
5 | 7 | ||
6 | #define fb_pgprotect(...) do {} while (0) | 8 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
9 | unsigned long off) | ||
10 | { | ||
11 | #ifdef CONFIG_SPARC64 | ||
12 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
13 | #endif | ||
14 | } | ||
7 | 15 | ||
8 | static inline int fb_is_primary_device(struct fb_info *info) | 16 | static inline int fb_is_primary_device(struct fb_info *info) |
9 | { | 17 | { |
@@ -18,4 +26,4 @@ static inline int fb_is_primary_device(struct fb_info *info) | |||
18 | return 0; | 26 | return 0; |
19 | } | 27 | } |
20 | 28 | ||
21 | #endif /* _ASM_FB_H_ */ | 29 | #endif /* _SPARC_FB_H_ */ |
diff --git a/include/asm-sparc/of_platform.h b/include/asm-sparc/of_platform.h index d638737ff13c..38334351c36b 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; | |||
21 | 21 | ||
22 | #define of_bus_type of_platform_bus_type /* for compatibility */ | 22 | #define of_bus_type of_platform_bus_type /* for compatibility */ |
23 | 23 | ||
24 | extern struct of_device *of_platform_device_create(struct device_node *np, | ||
25 | const char *bus_id, | ||
26 | struct device *parent, | ||
27 | struct bus_type *bus); | ||
28 | |||
29 | #endif /* _ASM_SPARC_OF_PLATFORM_H */ | 24 | #endif /* _ASM_SPARC_OF_PLATFORM_H */ |
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index 71f2a1998324..df5dc4422483 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * Copyright (C) 1996-2005 Paul Mackerras. | 9 | * Copyright (C) 1996-2005 Paul Mackerras. |
10 | * | 10 | * |
11 | * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. | 11 | * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. |
12 | * Updates for SPARC32 by David S. Miller | 12 | * Updates for SPARC by David S. Miller |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
15 | * modify it under the terms of the GNU General Public License | 15 | * modify it under the terms of the GNU General Public License |
@@ -39,6 +39,7 @@ struct property { | |||
39 | unsigned int unique_id; | 39 | unsigned int unique_id; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct of_irq_controller; | ||
42 | struct device_node { | 43 | struct device_node { |
43 | const char *name; | 44 | const char *name; |
44 | const char *type; | 45 | const char *type; |
@@ -58,11 +59,19 @@ struct device_node { | |||
58 | unsigned long _flags; | 59 | unsigned long _flags; |
59 | void *data; | 60 | void *data; |
60 | unsigned int unique_id; | 61 | unsigned int unique_id; |
62 | |||
63 | struct of_irq_controller *irq_trans; | ||
64 | }; | ||
65 | |||
66 | struct of_irq_controller { | ||
67 | unsigned int (*irq_build)(struct device_node *, unsigned int, void *); | ||
68 | void *data; | ||
61 | }; | 69 | }; |
62 | 70 | ||
63 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | 71 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) |
64 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | 72 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) |
65 | 73 | ||
74 | extern struct device_node *of_find_node_by_cpuid(int cpuid); | ||
66 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 75 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
67 | extern int of_getintprop_default(struct device_node *np, | 76 | extern int of_getintprop_default(struct device_node *np, |
68 | const char *name, | 77 | const char *name, |
diff --git a/include/asm-sparc64/a.out.h b/include/asm-sparc64/a.out.h index 53c95bdfc66e..44208c2a188e 100644 --- a/include/asm-sparc64/a.out.h +++ b/include/asm-sparc64/a.out.h | |||
@@ -1,98 +1 @@ | |||
1 | /* $Id: a.out.h,v 1.8 2002/02/09 19:49:31 davem Exp $ */ | #include <asm-sparc/a.out.h> | |
2 | #ifndef __SPARC64_A_OUT_H__ | ||
3 | #define __SPARC64_A_OUT_H__ | ||
4 | |||
5 | #define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ | ||
6 | #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ | ||
7 | |||
8 | #ifndef __ASSEMBLY__ | ||
9 | |||
10 | struct exec { | ||
11 | unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ | ||
12 | unsigned char a_toolversion:7; | ||
13 | unsigned char a_machtype; | ||
14 | unsigned short a_info; | ||
15 | unsigned int a_text; /* length of text, in bytes */ | ||
16 | unsigned int a_data; /* length of data, in bytes */ | ||
17 | unsigned int a_bss; /* length of bss, in bytes */ | ||
18 | unsigned int a_syms; /* length of symbol table, in bytes */ | ||
19 | unsigned int a_entry; /* where program begins */ | ||
20 | unsigned int a_trsize; | ||
21 | unsigned int a_drsize; | ||
22 | }; | ||
23 | |||
24 | #endif /* !__ASSEMBLY__ */ | ||
25 | |||
26 | /* Where in the file does the text information begin? */ | ||
27 | #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) | ||
28 | |||
29 | /* Where do the Symbols start? */ | ||
30 | #define N_SYMOFF(x) (N_TXTOFF(x) + (x).a_text + \ | ||
31 | (x).a_data + (x).a_trsize + \ | ||
32 | (x).a_drsize) | ||
33 | |||
34 | /* Where does text segment go in memory after being loaded? */ | ||
35 | #define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \ | ||
36 | ((x).a_entry < SPARC_PGSIZE)) ? \ | ||
37 | 0 : SPARC_PGSIZE) | ||
38 | |||
39 | /* And same for the data segment.. */ | ||
40 | #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ | ||
41 | (N_TXTADDR(x) + (x).a_text) \ | ||
42 | : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) | ||
43 | |||
44 | #define N_TRSIZE(a) ((a).a_trsize) | ||
45 | #define N_DRSIZE(a) ((a).a_drsize) | ||
46 | #define N_SYMSIZE(a) ((a).a_syms) | ||
47 | |||
48 | #ifndef __ASSEMBLY__ | ||
49 | |||
50 | /* | ||
51 | * Sparc relocation types | ||
52 | */ | ||
53 | enum reloc_type | ||
54 | { | ||
55 | RELOC_8, | ||
56 | RELOC_16, | ||
57 | RELOC_32, /* simplest relocs */ | ||
58 | RELOC_DISP8, | ||
59 | RELOC_DISP16, | ||
60 | RELOC_DISP32, /* Disp's (pc-rel) */ | ||
61 | RELOC_WDISP30, | ||
62 | RELOC_WDISP22, /* SR word disp's */ | ||
63 | RELOC_HI22, | ||
64 | RELOC_22, /* SR 22-bit relocs */ | ||
65 | RELOC_13, | ||
66 | RELOC_LO10, /* SR 13&10-bit relocs */ | ||
67 | RELOC_SFA_BASE, | ||
68 | RELOC_SFA_OFF13, /* SR S.F.A. relocs */ | ||
69 | RELOC_BASE10, | ||
70 | RELOC_BASE13, | ||
71 | RELOC_BASE22, /* base_relative pic */ | ||
72 | RELOC_PC10, | ||
73 | RELOC_PC22, /* special pc-rel pic */ | ||
74 | RELOC_JMP_TBL, /* jmp_tbl_rel in pic */ | ||
75 | RELOC_SEGOFF16, /* ShLib offset-in-seg */ | ||
76 | RELOC_GLOB_DAT, | ||
77 | RELOC_JMP_SLOT, | ||
78 | RELOC_RELATIVE /* rtld relocs */ | ||
79 | }; | ||
80 | |||
81 | /* | ||
82 | * Format of a relocation datum. | ||
83 | */ | ||
84 | struct relocation_info /* used when header.a_machtype == M_SPARC */ | ||
85 | { | ||
86 | unsigned int r_address; /* relocation addr */ | ||
87 | unsigned int r_index:24; /* segment index or symbol index */ | ||
88 | unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ | ||
89 | unsigned int r_pad:2; /* <unused> */ | ||
90 | enum reloc_type r_type:5; /* type of relocation to perform */ | ||
91 | int r_addend; /* addend for relocation value */ | ||
92 | }; | ||
93 | |||
94 | #define N_RELOCATION_INFO_DECLARED 1 | ||
95 | |||
96 | #endif /* !(__ASSEMBLY__) */ | ||
97 | |||
98 | #endif /* !(__SPARC64_A_OUT_H__) */ | ||
diff --git a/include/asm-sparc64/auxvec.h b/include/asm-sparc64/auxvec.h index 436a29129828..1f45c67d7316 100644 --- a/include/asm-sparc64/auxvec.h +++ b/include/asm-sparc64/auxvec.h | |||
@@ -1,4 +1 @@ | |||
1 | #ifndef __ASM_SPARC64_AUXVEC_H | #include <asm-sparc/auxvec.h> | |
2 | #define __ASM_SPARC64_AUXVEC_H | ||
3 | |||
4 | #endif /* !(__ASM_SPARC64_AUXVEC_H) */ | ||
diff --git a/include/asm-sparc64/bpp.h b/include/asm-sparc64/bpp.h index abe163a50382..514eee20272e 100644 --- a/include/asm-sparc64/bpp.h +++ b/include/asm-sparc64/bpp.h | |||
@@ -1,73 +1 @@ | |||
1 | #ifndef _SPARC64_BPP_H | #include <asm-sparc/bpp.h> | |
2 | #define _SPARC64_BPP_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (c) 1995 Picture Elements | ||
6 | * Stephen Williams | ||
7 | * Gus Baldauf | ||
8 | * | ||
9 | * Linux/SPARC port by Peter Zaitcev. | ||
10 | * Integration into SPARC tree by Tom Dyas. | ||
11 | */ | ||
12 | |||
13 | #include <linux/ioctl.h> | ||
14 | |||
15 | /* | ||
16 | * This is a driver that supports IEEE Std 1284-1994 communications | ||
17 | * with compliant or compatible devices. It will use whatever features | ||
18 | * the device supports, prefering those that are typically faster. | ||
19 | * | ||
20 | * When the device is opened, it is left in COMPATIBILITY mode, and | ||
21 | * writes work like any printer device. The driver only attempt to | ||
22 | * negotiate 1284 modes when needed so that plugs can be pulled, | ||
23 | * switch boxes switched, etc., without disrupting things. It will | ||
24 | * also leave the device in compatibility mode when closed. | ||
25 | */ | ||
26 | |||
27 | |||
28 | |||
29 | /* | ||
30 | * This driver also supplies ioctls to manually manipulate the | ||
31 | * pins. This is great for testing devices, or writing code to deal | ||
32 | * with bizzarro-mode of the ACME Special TurboThingy Plus. | ||
33 | * | ||
34 | * NOTE: These ioctl currently do not interact well with | ||
35 | * read/write. Caveat emptor. | ||
36 | * | ||
37 | * PUT_PINS allows us to assign the sense of all the pins, including | ||
38 | * the data pins if being driven by the host. The GET_PINS returns the | ||
39 | * pins that the peripheral drives, including data if appropriate. | ||
40 | */ | ||
41 | |||
42 | # define BPP_PUT_PINS _IOW('B', 1, int) | ||
43 | # define BPP_GET_PINS _IOR('B', 2, char) /* that's bogus - should've been _IO */ | ||
44 | # define BPP_PUT_DATA _IOW('B', 3, int) | ||
45 | # define BPP_GET_DATA _IOR('B', 4, char) /* ditto */ | ||
46 | |||
47 | /* | ||
48 | * Set the data bus to input mode. Disengage the data bin driver and | ||
49 | * be prepared to read values from the peripheral. If the arg is 0, | ||
50 | * then revert the bus to output mode. | ||
51 | */ | ||
52 | # define BPP_SET_INPUT _IOW('B', 5, int) | ||
53 | |||
54 | /* | ||
55 | * These bits apply to the PUT operation... | ||
56 | */ | ||
57 | # define BPP_PP_nStrobe 0x0001 | ||
58 | # define BPP_PP_nAutoFd 0x0002 | ||
59 | # define BPP_PP_nInit 0x0004 | ||
60 | # define BPP_PP_nSelectIn 0x0008 | ||
61 | |||
62 | /* | ||
63 | * These apply to the GET operation, which also reads the current value | ||
64 | * of the previously put values. A bit mask of these will be returned | ||
65 | * as a bit mask in the return code of the ioctl(). | ||
66 | */ | ||
67 | # define BPP_GP_nAck 0x0100 | ||
68 | # define BPP_GP_Busy 0x0200 | ||
69 | # define BPP_GP_PError 0x0400 | ||
70 | # define BPP_GP_Select 0x0800 | ||
71 | # define BPP_GP_nFault 0x1000 | ||
72 | |||
73 | #endif | ||
diff --git a/include/asm-sparc64/bsderrno.h b/include/asm-sparc64/bsderrno.h deleted file mode 100644 index 52fe880d2af8..000000000000 --- a/include/asm-sparc64/bsderrno.h +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* $Id: bsderrno.h,v 1.1 1996/12/26 13:25:21 davem Exp $ | ||
2 | * bsderrno.h: Error numbers for NetBSD binary compatibility | ||
3 | * | ||
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | ||
5 | */ | ||
6 | |||
7 | #ifndef _SPARC64_BSDERRNO_H | ||
8 | #define _SPARC64_BSDERRNO_H | ||
9 | |||
10 | #define BSD_EPERM 1 /* Operation not permitted */ | ||
11 | #define BSD_ENOENT 2 /* No such file or directory */ | ||
12 | #define BSD_ESRCH 3 /* No such process */ | ||
13 | #define BSD_EINTR 4 /* Interrupted system call */ | ||
14 | #define BSD_EIO 5 /* Input/output error */ | ||
15 | #define BSD_ENXIO 6 /* Device not configured */ | ||
16 | #define BSD_E2BIG 7 /* Argument list too long */ | ||
17 | #define BSD_ENOEXEC 8 /* Exec format error */ | ||
18 | #define BSD_EBADF 9 /* Bad file descriptor */ | ||
19 | #define BSD_ECHILD 10 /* No child processes */ | ||
20 | #define BSD_EDEADLK 11 /* Resource deadlock avoided */ | ||
21 | #define BSD_ENOMEM 12 /* Cannot allocate memory */ | ||
22 | #define BSD_EACCES 13 /* Permission denied */ | ||
23 | #define BSD_EFAULT 14 /* Bad address */ | ||
24 | #define BSD_ENOTBLK 15 /* Block device required */ | ||
25 | #define BSD_EBUSY 16 /* Device busy */ | ||
26 | #define BSD_EEXIST 17 /* File exists */ | ||
27 | #define BSD_EXDEV 18 /* Cross-device link */ | ||
28 | #define BSD_ENODEV 19 /* Operation not supported by device */ | ||
29 | #define BSD_ENOTDIR 20 /* Not a directory */ | ||
30 | #define BSD_EISDIR 21 /* Is a directory */ | ||
31 | #define BSD_EINVAL 22 /* Invalid argument */ | ||
32 | #define BSD_ENFILE 23 /* Too many open files in system */ | ||
33 | #define BSD_EMFILE 24 /* Too many open files */ | ||
34 | #define BSD_ENOTTY 25 /* Inappropriate ioctl for device */ | ||
35 | #define BSD_ETXTBSY 26 /* Text file busy */ | ||
36 | #define BSD_EFBIG 27 /* File too large */ | ||
37 | #define BSD_ENOSPC 28 /* No space left on device */ | ||
38 | #define BSD_ESPIPE 29 /* Illegal seek */ | ||
39 | #define BSD_EROFS 30 /* Read-only file system */ | ||
40 | #define BSD_EMLINK 31 /* Too many links */ | ||
41 | #define BSD_EPIPE 32 /* Broken pipe */ | ||
42 | #define BSD_EDOM 33 /* Numerical argument out of domain */ | ||
43 | #define BSD_ERANGE 34 /* Result too large */ | ||
44 | #define BSD_EAGAIN 35 /* Resource temporarily unavailable */ | ||
45 | #define BSD_EWOULDBLOCK EAGAIN /* Operation would block */ | ||
46 | #define BSD_EINPROGRESS 36 /* Operation now in progress */ | ||
47 | #define BSD_EALREADY 37 /* Operation already in progress */ | ||
48 | #define BSD_ENOTSOCK 38 /* Socket operation on non-socket */ | ||
49 | #define BSD_EDESTADDRREQ 39 /* Destination address required */ | ||
50 | #define BSD_EMSGSIZE 40 /* Message too long */ | ||
51 | #define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */ | ||
52 | #define BSD_ENOPROTOOPT 42 /* Protocol not available */ | ||
53 | #define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */ | ||
54 | #define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */ | ||
55 | #define BSD_EOPNOTSUPP 45 /* Operation not supported */ | ||
56 | #define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */ | ||
57 | #define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ | ||
58 | #define BSD_EADDRINUSE 48 /* Address already in use */ | ||
59 | #define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */ | ||
60 | #define BSD_ENETDOWN 50 /* Network is down */ | ||
61 | #define BSD_ENETUNREACH 51 /* Network is unreachable */ | ||
62 | #define BSD_ENETRESET 52 /* Network dropped connection on reset */ | ||
63 | #define BSD_ECONNABORTED 53 /* Software caused connection abort */ | ||
64 | #define BSD_ECONNRESET 54 /* Connection reset by peer */ | ||
65 | #define BSD_ENOBUFS 55 /* No buffer space available */ | ||
66 | #define BSD_EISCONN 56 /* Socket is already connected */ | ||
67 | #define BSD_ENOTCONN 57 /* Socket is not connected */ | ||
68 | #define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */ | ||
69 | #define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */ | ||
70 | #define BSD_ETIMEDOUT 60 /* Operation timed out */ | ||
71 | #define BSD_ECONNREFUSED 61 /* Connection refused */ | ||
72 | #define BSD_ELOOP 62 /* Too many levels of symbolic links */ | ||
73 | #define BSD_ENAMETOOLONG 63 /* File name too long */ | ||
74 | #define BSD_EHOSTDOWN 64 /* Host is down */ | ||
75 | #define BSD_EHOSTUNREACH 65 /* No route to host */ | ||
76 | #define BSD_ENOTEMPTY 66 /* Directory not empty */ | ||
77 | #define BSD_EPROCLIM 67 /* Too many processes */ | ||
78 | #define BSD_EUSERS 68 /* Too many users */ | ||
79 | #define BSD_EDQUOT 69 /* Disc quota exceeded */ | ||
80 | #define BSD_ESTALE 70 /* Stale NFS file handle */ | ||
81 | #define BSD_EREMOTE 71 /* Too many levels of remote in path */ | ||
82 | #define BSD_EBADRPC 72 /* RPC struct is bad */ | ||
83 | #define BSD_ERPCMISMATCH 73 /* RPC version wrong */ | ||
84 | #define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */ | ||
85 | #define BSD_EPROGMISMATCH 75 /* Program version wrong */ | ||
86 | #define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */ | ||
87 | #define BSD_ENOLCK 77 /* No locks available */ | ||
88 | #define BSD_ENOSYS 78 /* Function not implemented */ | ||
89 | #define BSD_EFTYPE 79 /* Inappropriate file type or format */ | ||
90 | #define BSD_EAUTH 80 /* Authentication error */ | ||
91 | #define BSD_ENEEDAUTH 81 /* Need authenticator */ | ||
92 | #define BSD_ELAST 81 /* Must be equal largest errno */ | ||
93 | |||
94 | #endif /* !(_SPARC64_BSDERRNO_H) */ | ||
diff --git a/include/asm-sparc64/bug.h b/include/asm-sparc64/bug.h index 516bb27f3fc4..3433737c7a67 100644 --- a/include/asm-sparc64/bug.h +++ b/include/asm-sparc64/bug.h | |||
@@ -1,22 +1 @@ | |||
1 | #ifndef _SPARC64_BUG_H | #include <asm-sparc/bug.h> | |
2 | #define _SPARC64_BUG_H | ||
3 | |||
4 | #ifdef CONFIG_BUG | ||
5 | #include <linux/compiler.h> | ||
6 | |||
7 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
8 | extern void do_BUG(const char *file, int line); | ||
9 | #define BUG() do { \ | ||
10 | do_BUG(__FILE__, __LINE__); \ | ||
11 | __builtin_trap(); \ | ||
12 | } while (0) | ||
13 | #else | ||
14 | #define BUG() __builtin_trap() | ||
15 | #endif | ||
16 | |||
17 | #define HAVE_ARCH_BUG | ||
18 | #endif | ||
19 | |||
20 | #include <asm-generic/bug.h> | ||
21 | |||
22 | #endif | ||
diff --git a/include/asm-sparc64/bugs.h b/include/asm-sparc64/bugs.h index 11ade6841971..04ae9e2818cf 100644 --- a/include/asm-sparc64/bugs.h +++ b/include/asm-sparc64/bugs.h | |||
@@ -1,10 +1 @@ | |||
1 | /* bugs.h: Sparc64 probes for various bugs. | #include <asm-sparc/bugs.h> | |
2 | * | ||
3 | * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) | ||
4 | */ | ||
5 | #include <asm/sstate.h> | ||
6 | |||
7 | static void __init check_bugs(void) | ||
8 | { | ||
9 | sstate_running(); | ||
10 | } | ||
diff --git a/include/asm-sparc64/byteorder.h b/include/asm-sparc64/byteorder.h index 3943022906fd..f672855bee17 100644 --- a/include/asm-sparc64/byteorder.h +++ b/include/asm-sparc64/byteorder.h | |||
@@ -1,49 +1 @@ | |||
1 | #ifndef _SPARC64_BYTEORDER_H | #include <asm-sparc/byteorder.h> | |
2 | #define _SPARC64_BYTEORDER_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | #include <asm/asi.h> | ||
6 | |||
7 | #ifdef __GNUC__ | ||
8 | |||
9 | static inline __u16 ___arch__swab16p(const __u16 *addr) | ||
10 | { | ||
11 | __u16 ret; | ||
12 | |||
13 | __asm__ __volatile__ ("lduha [%1] %2, %0" | ||
14 | : "=r" (ret) | ||
15 | : "r" (addr), "i" (ASI_PL)); | ||
16 | return ret; | ||
17 | } | ||
18 | |||
19 | static inline __u32 ___arch__swab32p(const __u32 *addr) | ||
20 | { | ||
21 | __u32 ret; | ||
22 | |||
23 | __asm__ __volatile__ ("lduwa [%1] %2, %0" | ||
24 | : "=r" (ret) | ||
25 | : "r" (addr), "i" (ASI_PL)); | ||
26 | return ret; | ||
27 | } | ||
28 | |||
29 | static inline __u64 ___arch__swab64p(const __u64 *addr) | ||
30 | { | ||
31 | __u64 ret; | ||
32 | |||
33 | __asm__ __volatile__ ("ldxa [%1] %2, %0" | ||
34 | : "=r" (ret) | ||
35 | : "r" (addr), "i" (ASI_PL)); | ||
36 | return ret; | ||
37 | } | ||
38 | |||
39 | #define __arch__swab16p(x) ___arch__swab16p(x) | ||
40 | #define __arch__swab32p(x) ___arch__swab32p(x) | ||
41 | #define __arch__swab64p(x) ___arch__swab64p(x) | ||
42 | |||
43 | #define __BYTEORDER_HAS_U64__ | ||
44 | |||
45 | #endif /* __GNUC__ */ | ||
46 | |||
47 | #include <linux/byteorder/big_endian.h> | ||
48 | |||
49 | #endif /* _SPARC64_BYTEORDER_H */ | ||
diff --git a/include/asm-sparc64/cache.h b/include/asm-sparc64/cache.h index e9df17acedde..fa9de5cadbf1 100644 --- a/include/asm-sparc64/cache.h +++ b/include/asm-sparc64/cache.h | |||
@@ -1,18 +1 @@ | |||
1 | /* | #include <asm-sparc/cache.h> | |
2 | * include/asm-sparc64/cache.h | ||
3 | */ | ||
4 | #ifndef __ARCH_SPARC64_CACHE_H | ||
5 | #define __ARCH_SPARC64_CACHE_H | ||
6 | |||
7 | /* bytes per L1 cache line */ | ||
8 | #define L1_CACHE_SHIFT 5 | ||
9 | #define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */ | ||
10 | |||
11 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | ||
12 | |||
13 | #define SMP_CACHE_BYTES_SHIFT 6 | ||
14 | #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */ | ||
15 | |||
16 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | ||
17 | |||
18 | #endif | ||
diff --git a/include/asm-sparc64/cputime.h b/include/asm-sparc64/cputime.h index dec2fc7a36f8..435f37a92f7c 100644 --- a/include/asm-sparc64/cputime.h +++ b/include/asm-sparc64/cputime.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef __SPARC64_CPUTIME_H | #include <asm-sparc/cputime.h> | |
2 | #define __SPARC64_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __SPARC64_CPUTIME_H */ | ||
diff --git a/include/asm-sparc64/current.h b/include/asm-sparc64/current.h index 6c21e4ee2475..a7904a7f53a8 100644 --- a/include/asm-sparc64/current.h +++ b/include/asm-sparc64/current.h | |||
@@ -1,8 +1 @@ | |||
1 | #ifndef _SPARC64_CURRENT_H | #include <asm-sparc/current.h> | |
2 | #define _SPARC64_CURRENT_H | ||
3 | |||
4 | #include <linux/thread_info.h> | ||
5 | |||
6 | register struct task_struct *current asm("g4"); | ||
7 | |||
8 | #endif /* !(_SPARC64_CURRENT_H) */ | ||
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h index 5111e8717be3..4145c47097e2 100644 --- a/include/asm-sparc64/device.h +++ b/include/asm-sparc64/device.h | |||
@@ -1,21 +1 @@ | |||
1 | /* | #include <asm-sparc/device.h> | |
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #ifndef _ASM_SPARC64_DEVICE_H | ||
7 | #define _ASM_SPARC64_DEVICE_H | ||
8 | |||
9 | struct device_node; | ||
10 | struct of_device; | ||
11 | |||
12 | struct dev_archdata { | ||
13 | void *iommu; | ||
14 | void *stc; | ||
15 | void *host_controller; | ||
16 | |||
17 | struct device_node *prom_node; | ||
18 | struct of_device *op; | ||
19 | }; | ||
20 | |||
21 | #endif /* _ASM_SPARC64_DEVICE_H */ | ||
diff --git a/include/asm-sparc64/div64.h b/include/asm-sparc64/div64.h index 6cd978cefb28..928c94f99ecf 100644 --- a/include/asm-sparc64/div64.h +++ b/include/asm-sparc64/div64.h | |||
@@ -1 +1 @@ | |||
#include <asm-generic/div64.h> | #include <asm-sparc/div64.h> | ||
diff --git a/include/asm-sparc64/emergency-restart.h b/include/asm-sparc64/emergency-restart.h index 108d8c48e42e..2cac7b644da8 100644 --- a/include/asm-sparc64/emergency-restart.h +++ b/include/asm-sparc64/emergency-restart.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | #include <asm-sparc/emergency-restart.h> | |
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/include/asm-sparc64/errno.h b/include/asm-sparc64/errno.h index ea3509ee1b0b..9701fe01cc53 100644 --- a/include/asm-sparc64/errno.h +++ b/include/asm-sparc64/errno.h | |||
@@ -1,114 +1 @@ | |||
1 | /* $Id: errno.h,v 1.2 1997/04/15 12:46:11 jj Exp $ */ | #include <asm-sparc/errno.h> | |
2 | #ifndef _SPARC64_ERRNO_H | ||
3 | #define _SPARC64_ERRNO_H | ||
4 | |||
5 | /* These match the SunOS error numbering scheme. */ | ||
6 | |||
7 | #include <asm-generic/errno-base.h> | ||
8 | |||
9 | #define EWOULDBLOCK EAGAIN /* Operation would block */ | ||
10 | #define EINPROGRESS 36 /* Operation now in progress */ | ||
11 | #define EALREADY 37 /* Operation already in progress */ | ||
12 | #define ENOTSOCK 38 /* Socket operation on non-socket */ | ||
13 | #define EDESTADDRREQ 39 /* Destination address required */ | ||
14 | #define EMSGSIZE 40 /* Message too long */ | ||
15 | #define EPROTOTYPE 41 /* Protocol wrong type for socket */ | ||
16 | #define ENOPROTOOPT 42 /* Protocol not available */ | ||
17 | #define EPROTONOSUPPORT 43 /* Protocol not supported */ | ||
18 | #define ESOCKTNOSUPPORT 44 /* Socket type not supported */ | ||
19 | #define EOPNOTSUPP 45 /* Op not supported on transport endpoint */ | ||
20 | #define EPFNOSUPPORT 46 /* Protocol family not supported */ | ||
21 | #define EAFNOSUPPORT 47 /* Address family not supported by protocol */ | ||
22 | #define EADDRINUSE 48 /* Address already in use */ | ||
23 | #define EADDRNOTAVAIL 49 /* Cannot assign requested address */ | ||
24 | #define ENETDOWN 50 /* Network is down */ | ||
25 | #define ENETUNREACH 51 /* Network is unreachable */ | ||
26 | #define ENETRESET 52 /* Net dropped connection because of reset */ | ||
27 | #define ECONNABORTED 53 /* Software caused connection abort */ | ||
28 | #define ECONNRESET 54 /* Connection reset by peer */ | ||
29 | #define ENOBUFS 55 /* No buffer space available */ | ||
30 | #define EISCONN 56 /* Transport endpoint is already connected */ | ||
31 | #define ENOTCONN 57 /* Transport endpoint is not connected */ | ||
32 | #define ESHUTDOWN 58 /* No send after transport endpoint shutdown */ | ||
33 | #define ETOOMANYREFS 59 /* Too many references: cannot splice */ | ||
34 | #define ETIMEDOUT 60 /* Connection timed out */ | ||
35 | #define ECONNREFUSED 61 /* Connection refused */ | ||
36 | #define ELOOP 62 /* Too many symbolic links encountered */ | ||
37 | #define ENAMETOOLONG 63 /* File name too long */ | ||
38 | #define EHOSTDOWN 64 /* Host is down */ | ||
39 | #define EHOSTUNREACH 65 /* No route to host */ | ||
40 | #define ENOTEMPTY 66 /* Directory not empty */ | ||
41 | #define EPROCLIM 67 /* SUNOS: Too many processes */ | ||
42 | #define EUSERS 68 /* Too many users */ | ||
43 | #define EDQUOT 69 /* Quota exceeded */ | ||
44 | #define ESTALE 70 /* Stale NFS file handle */ | ||
45 | #define EREMOTE 71 /* Object is remote */ | ||
46 | #define ENOSTR 72 /* Device not a stream */ | ||
47 | #define ETIME 73 /* Timer expired */ | ||
48 | #define ENOSR 74 /* Out of streams resources */ | ||
49 | #define ENOMSG 75 /* No message of desired type */ | ||
50 | #define EBADMSG 76 /* Not a data message */ | ||
51 | #define EIDRM 77 /* Identifier removed */ | ||
52 | #define EDEADLK 78 /* Resource deadlock would occur */ | ||
53 | #define ENOLCK 79 /* No record locks available */ | ||
54 | #define ENONET 80 /* Machine is not on the network */ | ||
55 | #define ERREMOTE 81 /* SunOS: Too many lvls of remote in path */ | ||
56 | #define ENOLINK 82 /* Link has been severed */ | ||
57 | #define EADV 83 /* Advertise error */ | ||
58 | #define ESRMNT 84 /* Srmount error */ | ||
59 | #define ECOMM 85 /* Communication error on send */ | ||
60 | #define EPROTO 86 /* Protocol error */ | ||
61 | #define EMULTIHOP 87 /* Multihop attempted */ | ||
62 | #define EDOTDOT 88 /* RFS specific error */ | ||
63 | #define EREMCHG 89 /* Remote address changed */ | ||
64 | #define ENOSYS 90 /* Function not implemented */ | ||
65 | |||
66 | /* The rest have no SunOS equivalent. */ | ||
67 | #define ESTRPIPE 91 /* Streams pipe error */ | ||
68 | #define EOVERFLOW 92 /* Value too large for defined data type */ | ||
69 | #define EBADFD 93 /* File descriptor in bad state */ | ||
70 | #define ECHRNG 94 /* Channel number out of range */ | ||
71 | #define EL2NSYNC 95 /* Level 2 not synchronized */ | ||
72 | #define EL3HLT 96 /* Level 3 halted */ | ||
73 | #define EL3RST 97 /* Level 3 reset */ | ||
74 | #define ELNRNG 98 /* Link number out of range */ | ||
75 | #define EUNATCH 99 /* Protocol driver not attached */ | ||
76 | #define ENOCSI 100 /* No CSI structure available */ | ||
77 | #define EL2HLT 101 /* Level 2 halted */ | ||
78 | #define EBADE 102 /* Invalid exchange */ | ||
79 | #define EBADR 103 /* Invalid request descriptor */ | ||
80 | #define EXFULL 104 /* Exchange full */ | ||
81 | #define ENOANO 105 /* No anode */ | ||
82 | #define EBADRQC 106 /* Invalid request code */ | ||
83 | #define EBADSLT 107 /* Invalid slot */ | ||
84 | #define EDEADLOCK 108 /* File locking deadlock error */ | ||
85 | #define EBFONT 109 /* Bad font file format */ | ||
86 | #define ELIBEXEC 110 /* Cannot exec a shared library directly */ | ||
87 | #define ENODATA 111 /* No data available */ | ||
88 | #define ELIBBAD 112 /* Accessing a corrupted shared library */ | ||
89 | #define ENOPKG 113 /* Package not installed */ | ||
90 | #define ELIBACC 114 /* Can not access a needed shared library */ | ||
91 | #define ENOTUNIQ 115 /* Name not unique on network */ | ||
92 | #define ERESTART 116 /* Interrupted syscall should be restarted */ | ||
93 | #define EUCLEAN 117 /* Structure needs cleaning */ | ||
94 | #define ENOTNAM 118 /* Not a XENIX named type file */ | ||
95 | #define ENAVAIL 119 /* No XENIX semaphores available */ | ||
96 | #define EISNAM 120 /* Is a named type file */ | ||
97 | #define EREMOTEIO 121 /* Remote I/O error */ | ||
98 | #define EILSEQ 122 /* Illegal byte sequence */ | ||
99 | #define ELIBMAX 123 /* Atmpt to link in too many shared libs */ | ||
100 | #define ELIBSCN 124 /* .lib section in a.out corrupted */ | ||
101 | |||
102 | #define ENOMEDIUM 125 /* No medium found */ | ||
103 | #define EMEDIUMTYPE 126 /* Wrong medium type */ | ||
104 | #define ECANCELED 127 /* Operation Cancelled */ | ||
105 | #define ENOKEY 128 /* Required key not available */ | ||
106 | #define EKEYEXPIRED 129 /* Key has expired */ | ||
107 | #define EKEYREVOKED 130 /* Key has been revoked */ | ||
108 | #define EKEYREJECTED 131 /* Key was rejected by service */ | ||
109 | |||
110 | /* for robust mutexes */ | ||
111 | #define EOWNERDEAD 132 /* Owner died */ | ||
112 | #define ENOTRECOVERABLE 133 /* State not recoverable */ | ||
113 | |||
114 | #endif /* !(_SPARC64_ERRNO_H) */ | ||
diff --git a/include/asm-sparc64/fb.h b/include/asm-sparc64/fb.h index 389012e5fbad..1c2ac5832f39 100644 --- a/include/asm-sparc64/fb.h +++ b/include/asm-sparc64/fb.h | |||
@@ -1,27 +1 @@ | |||
1 | #ifndef _ASM_FB_H_ | #include <asm-sparc/fb.h> | |
2 | #define _ASM_FB_H_ | ||
3 | #include <linux/fb.h> | ||
4 | #include <linux/fs.h> | ||
5 | #include <asm/page.h> | ||
6 | #include <asm/prom.h> | ||
7 | |||
8 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | ||
9 | unsigned long off) | ||
10 | { | ||
11 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
12 | } | ||
13 | |||
14 | static inline int fb_is_primary_device(struct fb_info *info) | ||
15 | { | ||
16 | struct device *dev = info->device; | ||
17 | struct device_node *node; | ||
18 | |||
19 | node = dev->archdata.prom_node; | ||
20 | if (node && | ||
21 | node == of_console_device) | ||
22 | return 1; | ||
23 | |||
24 | return 0; | ||
25 | } | ||
26 | |||
27 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index b6ece223562d..c299b853b5ba 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -16,7 +16,7 @@ | |||
16 | /* BIO layer definitions. */ | 16 | /* BIO layer definitions. */ |
17 | extern unsigned long kern_base, kern_size; | 17 | extern unsigned long kern_base, kern_size; |
18 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 18 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
19 | #define BIO_VMERGE_BOUNDARY 0 | 19 | #define BIO_VMERGE_BOUNDARY 8192 |
20 | 20 | ||
21 | static inline u8 _inb(unsigned long addr) | 21 | static inline u8 _inb(unsigned long addr) |
22 | { | 22 | { |
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h index 9eac6676caf1..46325ddee23b 100644 --- a/include/asm-sparc64/iommu.h +++ b/include/asm-sparc64/iommu.h | |||
@@ -26,6 +26,7 @@ struct iommu_arena { | |||
26 | struct iommu { | 26 | struct iommu { |
27 | spinlock_t lock; | 27 | spinlock_t lock; |
28 | struct iommu_arena arena; | 28 | struct iommu_arena arena; |
29 | void (*flush_all)(struct iommu *); | ||
29 | iopte_t *page_table; | 30 | iopte_t *page_table; |
30 | u32 page_table_map_base; | 31 | u32 page_table_map_base; |
31 | unsigned long iommu_control; | 32 | unsigned long iommu_control; |
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index 5020eaf67c29..7237dd87663e 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h | |||
@@ -14,11 +14,15 @@ typedef u32 kprobe_opcode_t; | |||
14 | 14 | ||
15 | #define arch_remove_kprobe(p) do {} while (0) | 15 | #define arch_remove_kprobe(p) do {} while (0) |
16 | 16 | ||
17 | #define ARCH_SUPPORTS_KRETPROBES | ||
18 | |||
17 | #define flush_insn_slot(p) \ | 19 | #define flush_insn_slot(p) \ |
18 | do { flushi(&(p)->ainsn.insn[0]); \ | 20 | do { flushi(&(p)->ainsn.insn[0]); \ |
19 | flushi(&(p)->ainsn.insn[1]); \ | 21 | flushi(&(p)->ainsn.insn[1]); \ |
20 | } while (0) | 22 | } while (0) |
21 | 23 | ||
24 | void kretprobe_trampoline(void); | ||
25 | |||
22 | /* Architecture specific copy of original instruction*/ | 26 | /* Architecture specific copy of original instruction*/ |
23 | struct arch_specific_insn { | 27 | struct arch_specific_insn { |
24 | /* copy of the original instruction */ | 28 | /* copy of the original instruction */ |
diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h index 46d69b3223c5..a769fdbe164a 100644 --- a/include/asm-sparc64/of_device.h +++ b/include/asm-sparc64/of_device.h | |||
@@ -1,38 +1 @@ | |||
1 | #ifndef _ASM_SPARC64_OF_DEVICE_H | #include <asm-sparc/of_device.h> | |
2 | #define _ASM_SPARC64_OF_DEVICE_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #include <linux/device.h> | ||
6 | #include <linux/of.h> | ||
7 | #include <linux/mod_devicetable.h> | ||
8 | #include <asm/openprom.h> | ||
9 | |||
10 | /* | ||
11 | * The of_device is a kind of "base class" that is a superset of | ||
12 | * struct device for use by devices attached to an OF node and | ||
13 | * probed using OF properties. | ||
14 | */ | ||
15 | struct of_device | ||
16 | { | ||
17 | struct device_node *node; | ||
18 | struct device dev; | ||
19 | struct resource resource[PROMREG_MAX]; | ||
20 | unsigned int irqs[PROMINTR_MAX]; | ||
21 | int num_irqs; | ||
22 | |||
23 | void *sysdata; | ||
24 | |||
25 | int slot; | ||
26 | int portid; | ||
27 | int clock_freq; | ||
28 | }; | ||
29 | |||
30 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); | ||
31 | extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); | ||
32 | |||
33 | /* These are just here during the transition */ | ||
34 | #include <linux/of_device.h> | ||
35 | #include <linux/of_platform.h> | ||
36 | |||
37 | #endif /* __KERNEL__ */ | ||
38 | #endif /* _ASM_SPARC64_OF_DEVICE_H */ | ||
diff --git a/include/asm-sparc64/of_platform.h b/include/asm-sparc64/of_platform.h index f15cfa723916..78aa032b674c 100644 --- a/include/asm-sparc64/of_platform.h +++ b/include/asm-sparc64/of_platform.h | |||
@@ -22,9 +22,4 @@ extern struct bus_type sbus_bus_type; | |||
22 | 22 | ||
23 | #define of_bus_type of_platform_bus_type /* for compatibility */ | 23 | #define of_bus_type of_platform_bus_type /* for compatibility */ |
24 | 24 | ||
25 | extern struct of_device *of_platform_device_create(struct device_node *np, | ||
26 | const char *bus_id, | ||
27 | struct device *parent, | ||
28 | struct bus_type *bus); | ||
29 | |||
30 | #endif /* _ASM_SPARC64_OF_PLATFORM_H */ | 25 | #endif /* _ASM_SPARC64_OF_PLATFORM_H */ |
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h index 07843f9f05df..5fa166ee3ffa 100644 --- a/include/asm-sparc64/prom.h +++ b/include/asm-sparc64/prom.h | |||
@@ -1,103 +1 @@ | |||
1 | #ifndef _SPARC64_PROM_H | #include <asm-sparc/prom.h> | |
2 | #define _SPARC64_PROM_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | /* | ||
6 | * Definitions for talking to the Open Firmware PROM on | ||
7 | * Power Macintosh computers. | ||
8 | * | ||
9 | * Copyright (C) 1996-2005 Paul Mackerras. | ||
10 | * | ||
11 | * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. | ||
12 | * Updates for SPARC64 by David S. Miller | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or | ||
15 | * modify it under the terms of the GNU General Public License | ||
16 | * as published by the Free Software Foundation; either version | ||
17 | * 2 of the License, or (at your option) any later version. | ||
18 | */ | ||
19 | #include <linux/types.h> | ||
20 | #include <linux/proc_fs.h> | ||
21 | #include <asm/atomic.h> | ||
22 | |||
23 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2 | ||
24 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 | ||
25 | |||
26 | #define of_compat_cmp(s1, s2, l) strncmp((s1), (s2), (l)) | ||
27 | #define of_prop_cmp(s1, s2) strcasecmp((s1), (s2)) | ||
28 | #define of_node_cmp(s1, s2) strcmp((s1), (s2)) | ||
29 | |||
30 | typedef u32 phandle; | ||
31 | typedef u32 ihandle; | ||
32 | |||
33 | struct property { | ||
34 | char *name; | ||
35 | int length; | ||
36 | void *value; | ||
37 | struct property *next; | ||
38 | unsigned long _flags; | ||
39 | unsigned int unique_id; | ||
40 | }; | ||
41 | |||
42 | struct of_irq_controller; | ||
43 | struct device_node { | ||
44 | const char *name; | ||
45 | const char *type; | ||
46 | phandle node; | ||
47 | char *path_component_name; | ||
48 | char *full_name; | ||
49 | |||
50 | struct property *properties; | ||
51 | struct property *deadprops; /* removed properties */ | ||
52 | struct device_node *parent; | ||
53 | struct device_node *child; | ||
54 | struct device_node *sibling; | ||
55 | struct device_node *next; /* next device of same type */ | ||
56 | struct device_node *allnext; /* next in list of all nodes */ | ||
57 | struct proc_dir_entry *pde; /* this node's proc directory */ | ||
58 | struct kref kref; | ||
59 | unsigned long _flags; | ||
60 | void *data; | ||
61 | unsigned int unique_id; | ||
62 | |||
63 | struct of_irq_controller *irq_trans; | ||
64 | }; | ||
65 | |||
66 | struct of_irq_controller { | ||
67 | unsigned int (*irq_build)(struct device_node *, unsigned int, void *); | ||
68 | void *data; | ||
69 | }; | ||
70 | |||
71 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | ||
72 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | ||
73 | |||
74 | extern struct device_node *of_find_node_by_cpuid(int cpuid); | ||
75 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | ||
76 | extern int of_getintprop_default(struct device_node *np, | ||
77 | const char *name, | ||
78 | int def); | ||
79 | extern int of_find_in_proplist(const char *list, const char *match, int len); | ||
80 | |||
81 | extern void prom_build_devicetree(void); | ||
82 | |||
83 | /* Dummy ref counting routines - to be implemented later */ | ||
84 | static inline struct device_node *of_node_get(struct device_node *node) | ||
85 | { | ||
86 | return node; | ||
87 | } | ||
88 | static inline void of_node_put(struct device_node *node) | ||
89 | { | ||
90 | } | ||
91 | |||
92 | /* | ||
93 | * NB: This is here while we transition from using asm/prom.h | ||
94 | * to linux/of.h | ||
95 | */ | ||
96 | #include <linux/of.h> | ||
97 | |||
98 | extern struct device_node *of_console_device; | ||
99 | extern char *of_console_path; | ||
100 | extern char *of_console_options; | ||
101 | |||
102 | #endif /* __KERNEL__ */ | ||
103 | #endif /* _SPARC64_PROM_H */ | ||