From 7b98ac24ef7df87010000aa4b15a640c15a9eca5 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 17 Jan 2008 01:18:43 -0800 Subject: [SPARC]: Remove of_platform_device_create There are no callers of this on the Sparc platforms. Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller --- arch/sparc/kernel/of_device.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'arch/sparc') diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 3ea000d15e3a..cc4c235c4f59 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c @@ -584,30 +584,3 @@ static int __init of_debug(char *str) } __setup("of_debug=", of_debug); - -struct of_device* of_platform_device_create(struct device_node *np, - const char *bus_id, - struct device *parent, - struct bus_type *bus) -{ - struct of_device *dev; - - dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) - return NULL; - - dev->dev.parent = parent; - dev->dev.bus = bus; - dev->dev.release = of_release_dev; - - strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); - - if (of_device_register(dev) != 0) { - kfree(dev); - return NULL; - } - - return dev; -} - -EXPORT_SYMBOL(of_platform_device_create); -- cgit v1.2.3 From c79ca3f841aeb31aeadd6348f132780b6f658c22 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 16 Nov 2007 02:49:00 -0800 Subject: [SPARC]: Kill BSD errno translation table and header files. Completely unused. Signed-off-by: David S. Miller --- arch/sparc/kernel/errtbls.c | 144 ++--------------------------------------- include/asm-sparc/bsderrno.h | 94 --------------------------- include/asm-sparc64/bsderrno.h | 94 --------------------------- 3 files changed, 6 insertions(+), 326 deletions(-) delete mode 100644 include/asm-sparc/bsderrno.h delete mode 100644 include/asm-sparc64/bsderrno.h (limited to 'arch/sparc') diff --git a/arch/sparc/kernel/errtbls.c b/arch/sparc/kernel/errtbls.c index bb36f6eadfee..ed14df7116e9 100644 --- a/arch/sparc/kernel/errtbls.c +++ b/arch/sparc/kernel/errtbls.c @@ -1,21 +1,18 @@ -/* $Id: errtbls.c,v 1.2 1995/11/25 00:57:55 davem Exp $ - * errtbls.c: Error number conversion tables between various syscall - * OS semantics. +/* errtbls.c: Error number conversion tables. * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) * * Based upon preliminary work which is: * * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) */ -#include /* NetBSD (bsd4.4) errnos */ #include /* Solaris errnos */ -/* Here are tables which convert between Linux/SunOS error number - * values to the equivalent in other OSs. Note that since the Linux - * ones have been set up to match exactly those of SunOS, no - * translation table is needed for that OS. +/* Here is the table which converts between Linux error number values + * to the equivalent under Solaris. Note that since the Linux ones + * have been set up to match exactly those of SunOS, no translation + * table is needed for that OS. */ int solaris_errno[] = { @@ -145,132 +142,3 @@ int solaris_errno[] = { SOL_ELIBMAX, SOL_ELIBSCN, }; - -int netbsd_errno[] = { - 0, - BSD_EPERM, - BSD_ENOENT, - BSD_ESRCH, - BSD_EINTR, - BSD_EIO, - BSD_ENXIO, - BSD_E2BIG, - BSD_ENOEXEC, - BSD_EBADF, - BSD_ECHILD, - BSD_EAGAIN, - BSD_ENOMEM, - BSD_EACCES, - BSD_EFAULT, - BSD_NOTBLK, - BSD_EBUSY, - BSD_EEXIST, - BSD_EXDEV, - BSD_ENODEV, - BSD_ENOTDIR, - BSD_EISDIR, - BSD_EINVAL, - BSD_ENFILE, - BSD_EMFILE, - BSD_ENOTTY, - BSD_ETXTBSY, - BSD_EFBIG, - BSD_ENOSPC, - BSD_ESPIPE, - BSD_EROFS, - BSD_EMLINK, - BSD_EPIPE, - BSD_EDOM, - BSD_ERANGE, - BSD_EWOULDBLOCK, - BSD_EINPROGRESS, - BSD_EALREADY, - BSD_ENOTSOCK, - BSD_EDESTADDRREQ, - BSD_EMSGSIZE, - BSD_EPROTOTYPE, - BSD_ENOPROTOOPT, - BSD_EPROTONOSUPPORT, - BSD_ESOCKTNOSUPPORT, - BSD_EOPNOTSUPP, - BSD_EPFNOSUPPORT, - BSD_EAFNOSUPPORT, - BSD_EADDRINUSE, - BSD_EADDRNOTAVAIL, - BSD_ENETDOWN, - BSD_ENETUNREACH, - BSD_ENETRESET, - BSD_ECONNABORTED, - BSD_ECONNRESET, - BSD_ENOBUFS, - BSD_EISCONN, - BSD_ENOTONN, - BSD_ESHUTDOWN, - BSD_ETOOMANYREFS, - BSD_ETIMEDOUT, - BSD_ECONNREFUSED, - BSD_ELOOP, - BSD_ENAMETOOLONG, - BSD_EHOSTDOWN, - BSD_EHOSTUNREACH, - BSD_ENOTEMPTY, - BSD_EPROCLIM, - BSD_EUSERS, - BSD_EDQUOT, - BSD_ESTALE, - BSD_EREMOTE, - BSD_ENOSTR, - BSD_ETIME, - BSD_ENOSR, - BSD_ENOMSG, - BSD_EBADMSG, - BSD_IDRM, - BSD_EDEADLK, - BSD_ENOLCK, - BSD_ENONET, - BSD_ERREMOTE, - BSD_ENOLINK, - BSD_EADV, - BSD_ESRMNT, - BSD_ECOMM, - BSD_EPROTO, - BSD_EMULTIHOP, - BSD_EINVAL, /* EDOTDOT XXX??? */ - BSD_REMCHG, - BSD_NOSYS, - BSD_STRPIPE, - BSD_EOVERFLOW, - BSD_EBADFD, - BSD_ECHRNG, - BSD_EL2NSYNC, - BSD_EL3HLT, - BSD_EL3RST, - BSD_NRNG, - BSD_EUNATCH, - BSD_ENOCSI, - BSD_EL2HLT, - BSD_EBADE, - BSD_EBADR, - BSD_EXFULL, - BSD_ENOANO, - BSD_EBADRQC, - BSD_EBADSLT, - BSD_EDEADLOCK, - BSD_EBFONT, - BSD_ELIBEXEC, - BSD_ENODATA, - BSD_ELIBBAD, - BSD_ENOPKG, - BSD_ELIBACC, - BSD_ENOTUNIQ, - BSD_ERESTART, - BSD_EUCLEAN, - BSD_ENOTNAM, - BSD_ENAVAIL, - BSD_EISNAM, - BSD_EREMOTEIO, - BSD_EILSEQ, - BSD_ELIBMAX, - BSD_ELIBSCN, -}; - 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 @@ -/* $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-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 @@ -/* $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 */ -#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 /* !(_SPARC64_BSDERRNO_H) */ -- cgit v1.2.3 From d113fcd9cf807045e38998a60b4f4577c927c300 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 16 Nov 2007 03:06:07 -0800 Subject: [SPARC]: Merge asm-sparc{,64}/cache.h Signed-off-by: David S. Miller --- arch/sparc/kernel/vmlinux.lds.S | 4 ++++ include/asm-sparc/cache.h | 21 +++++++++++++++------ include/asm-sparc64/cache.h | 19 +------------------ 3 files changed, 20 insertions(+), 24 deletions(-) (limited to 'arch/sparc') diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index 216147d6e61f..b1002c607196 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S @@ -89,6 +89,10 @@ SECTIONS .data.cacheline_aligned : { *(.data.cacheline_aligned) } + . = ALIGN(32); + .data.read_mostly : { + *(.data.read_mostly) + } __bss_start = .; .sbss : { 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 @@ -/* $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 - #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 /* 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-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 @@ -/* - * include/asm-sparc64/cache.h - */ -#ifndef __ARCH_SPARC64_CACHE_H -#define __ARCH_SPARC64_CACHE_H - -/* bytes per L1 cache line */ -#define L1_CACHE_SHIFT 5 -#define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */ - -#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) - -#define SMP_CACHE_BYTES_SHIFT 6 -#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */ - -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) - -#endif +#include -- cgit v1.2.3