aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-08-29 00:08:11 -0400
committerPaul Mackerras <paulus@samba.org>2005-08-29 23:32:06 -0400
commit6f9aa727433fe7647869c9b64ce2f7b5feac0052 (patch)
tree4c2986147fc3373f4ec6a097147f65611ca5f565 /include/asm-ppc
parent88999ceb55bf959e63df0c911915166b005977fc (diff)
[PATCH] Move all the very similar files to asm-powerpc
They differed in either simple comments or in the protecting ifdefs. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-ppc')
-rw-r--r--include/asm-ppc/errno.h11
-rw-r--r--include/asm-ppc/ioctl.h69
-rw-r--r--include/asm-ppc/ioctls.h107
-rw-r--r--include/asm-ppc/local.h6
-rw-r--r--include/asm-ppc/namei.h20
-rw-r--r--include/asm-ppc/percpu.h6
-rw-r--r--include/asm-ppc/poll.h23
-rw-r--r--include/asm-ppc/resource.h6
-rw-r--r--include/asm-ppc/shmparam.h6
-rw-r--r--include/asm-ppc/string.h32
-rw-r--r--include/asm-ppc/unaligned.h18
11 files changed, 0 insertions, 304 deletions
diff --git a/include/asm-ppc/errno.h b/include/asm-ppc/errno.h
deleted file mode 100644
index 19f20bd41ae6..000000000000
--- a/include/asm-ppc/errno.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef _PPC_ERRNO_H
2#define _PPC_ERRNO_H
3
4#include <asm-generic/errno.h>
5
6#undef EDEADLOCK
7#define EDEADLOCK 58 /* File locking deadlock error */
8
9#define _LAST_ERRNO 516
10
11#endif
diff --git a/include/asm-ppc/ioctl.h b/include/asm-ppc/ioctl.h
deleted file mode 100644
index 93c6acfdd0fd..000000000000
--- a/include/asm-ppc/ioctl.h
+++ /dev/null
@@ -1,69 +0,0 @@
1#ifndef _PPC_IOCTL_H
2#define _PPC_IOCTL_H
3
4
5/*
6 * this was copied from the alpha as it's a bit cleaner there.
7 * -- Cort
8 */
9
10#define _IOC_NRBITS 8
11#define _IOC_TYPEBITS 8
12#define _IOC_SIZEBITS 13
13#define _IOC_DIRBITS 3
14
15#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
16#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
17#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
18#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
19
20#define _IOC_NRSHIFT 0
21#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
22#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
23#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
24
25/*
26 * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit.
27 * And this turns out useful to catch old ioctl numbers in header
28 * files for us.
29 */
30#define _IOC_NONE 1U
31#define _IOC_READ 2U
32#define _IOC_WRITE 4U
33
34#define _IOC(dir,type,nr,size) \
35 (((dir) << _IOC_DIRSHIFT) | \
36 ((type) << _IOC_TYPESHIFT) | \
37 ((nr) << _IOC_NRSHIFT) | \
38 ((size) << _IOC_SIZESHIFT))
39
40/* provoke compile error for invalid uses of size argument */
41extern unsigned int __invalid_size_argument_for_IOC;
42#define _IOC_TYPECHECK(t) \
43 ((sizeof(t) == sizeof(t[1]) && \
44 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
45 sizeof(t) : __invalid_size_argument_for_IOC)
46
47/* used to create numbers */
48#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
49#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
50#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
51#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
52#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
53#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
54#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
55
56/* used to decode them.. */
57#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
58#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
59#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
60#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
61
62/* various drivers, such as the pcmcia stuff, need these... */
63#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
64#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
65#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
66#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
67#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
68
69#endif
diff --git a/include/asm-ppc/ioctls.h b/include/asm-ppc/ioctls.h
deleted file mode 100644
index f5b7f2b055e7..000000000000
--- a/include/asm-ppc/ioctls.h
+++ /dev/null
@@ -1,107 +0,0 @@
1#ifndef _ASM_PPC_IOCTLS_H
2#define _ASM_PPC_IOCTLS_H
3
4#include <asm/ioctl.h>
5
6#define FIOCLEX _IO('f', 1)
7#define FIONCLEX _IO('f', 2)
8#define FIOASYNC _IOW('f', 125, int)
9#define FIONBIO _IOW('f', 126, int)
10#define FIONREAD _IOR('f', 127, int)
11#define TIOCINQ FIONREAD
12#define FIOQSIZE _IOR('f', 128, loff_t)
13
14#define TIOCGETP _IOR('t', 8, struct sgttyb)
15#define TIOCSETP _IOW('t', 9, struct sgttyb)
16#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */
17
18#define TIOCSETC _IOW('t', 17, struct tchars)
19#define TIOCGETC _IOR('t', 18, struct tchars)
20#define TCGETS _IOR('t', 19, struct termios)
21#define TCSETS _IOW('t', 20, struct termios)
22#define TCSETSW _IOW('t', 21, struct termios)
23#define TCSETSF _IOW('t', 22, struct termios)
24
25#define TCGETA _IOR('t', 23, struct termio)
26#define TCSETA _IOW('t', 24, struct termio)
27#define TCSETAW _IOW('t', 25, struct termio)
28#define TCSETAF _IOW('t', 28, struct termio)
29
30#define TCSBRK _IO('t', 29)
31#define TCXONC _IO('t', 30)
32#define TCFLSH _IO('t', 31)
33
34#define TIOCSWINSZ _IOW('t', 103, struct winsize)
35#define TIOCGWINSZ _IOR('t', 104, struct winsize)
36#define TIOCSTART _IO('t', 110) /* start output, like ^Q */
37#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
38#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
39
40#define TIOCGLTC _IOR('t', 116, struct ltchars)
41#define TIOCSLTC _IOW('t', 117, struct ltchars)
42#define TIOCSPGRP _IOW('t', 118, int)
43#define TIOCGPGRP _IOR('t', 119, int)
44
45#define TIOCEXCL 0x540C
46#define TIOCNXCL 0x540D
47#define TIOCSCTTY 0x540E
48
49#define TIOCSTI 0x5412
50#define TIOCMGET 0x5415
51#define TIOCMBIS 0x5416
52#define TIOCMBIC 0x5417
53#define TIOCMSET 0x5418
54# define TIOCM_LE 0x001
55# define TIOCM_DTR 0x002
56# define TIOCM_RTS 0x004
57# define TIOCM_ST 0x008
58# define TIOCM_SR 0x010
59# define TIOCM_CTS 0x020
60# define TIOCM_CAR 0x040
61# define TIOCM_RNG 0x080
62# define TIOCM_DSR 0x100
63# define TIOCM_CD TIOCM_CAR
64# define TIOCM_RI TIOCM_RNG
65
66#define TIOCGSOFTCAR 0x5419
67#define TIOCSSOFTCAR 0x541A
68#define TIOCLINUX 0x541C
69#define TIOCCONS 0x541D
70#define TIOCGSERIAL 0x541E
71#define TIOCSSERIAL 0x541F
72#define TIOCPKT 0x5420
73# define TIOCPKT_DATA 0
74# define TIOCPKT_FLUSHREAD 1
75# define TIOCPKT_FLUSHWRITE 2
76# define TIOCPKT_STOP 4
77# define TIOCPKT_START 8
78# define TIOCPKT_NOSTOP 16
79# define TIOCPKT_DOSTOP 32
80
81
82#define TIOCNOTTY 0x5422
83#define TIOCSETD 0x5423
84#define TIOCGETD 0x5424
85#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
86#define TIOCSBRK 0x5427 /* BSD compatibility */
87#define TIOCCBRK 0x5428 /* BSD compatibility */
88#define TIOCGSID 0x5429 /* Return the session ID of FD */
89#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
90#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
91
92#define TIOCSERCONFIG 0x5453
93#define TIOCSERGWILD 0x5454
94#define TIOCSERSWILD 0x5455
95#define TIOCGLCKTRMIOS 0x5456
96#define TIOCSLCKTRMIOS 0x5457
97#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
98#define TIOCSERGETLSR 0x5459 /* Get line status register */
99 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
100# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
101#define TIOCSERGETMULTI 0x545A /* Get multiport config */
102#define TIOCSERSETMULTI 0x545B /* Set multiport config */
103
104#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
105#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
106
107#endif /* _ASM_PPC_IOCTLS_H */
diff --git a/include/asm-ppc/local.h b/include/asm-ppc/local.h
deleted file mode 100644
index b08e3eced10e..000000000000
--- a/include/asm-ppc/local.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __PPC_LOCAL_H
2#define __PPC_LOCAL_H
3
4#include <asm-generic/local.h>
5
6#endif /* __PPC_LOCAL_H */
diff --git a/include/asm-ppc/namei.h b/include/asm-ppc/namei.h
deleted file mode 100644
index 29c9ec832133..000000000000
--- a/include/asm-ppc/namei.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-ppc/namei.h
3 * Adapted from include/asm-alpha/namei.h
4 *
5 * Included from fs/namei.c
6 */
7
8#ifdef __KERNEL__
9#ifndef __PPC_NAMEI_H
10#define __PPC_NAMEI_H
11
12/* This dummy routine maybe changed to something useful
13 * for /usr/gnemul/ emulation stuff.
14 * Look at asm-sparc/namei.h for details.
15 */
16
17#define __emul_prefix() NULL
18
19#endif /* __PPC_NAMEI_H */
20#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/percpu.h b/include/asm-ppc/percpu.h
deleted file mode 100644
index d66667cd5878..000000000000
--- a/include/asm-ppc/percpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ARCH_PPC_PERCPU__
2#define __ARCH_PPC_PERCPU__
3
4#include <asm-generic/percpu.h>
5
6#endif /* __ARCH_PPC_PERCPU__ */
diff --git a/include/asm-ppc/poll.h b/include/asm-ppc/poll.h
deleted file mode 100644
index be5024913c62..000000000000
--- a/include/asm-ppc/poll.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#ifndef __PPC_POLL_H
2#define __PPC_POLL_H
3
4#define POLLIN 0x0001
5#define POLLPRI 0x0002
6#define POLLOUT 0x0004
7#define POLLERR 0x0008
8#define POLLHUP 0x0010
9#define POLLNVAL 0x0020
10#define POLLRDNORM 0x0040
11#define POLLRDBAND 0x0080
12#define POLLWRNORM 0x0100
13#define POLLWRBAND 0x0200
14#define POLLMSG 0x0400
15#define POLLREMOVE 0x1000
16
17struct pollfd {
18 int fd;
19 short events;
20 short revents;
21};
22
23#endif
diff --git a/include/asm-ppc/resource.h b/include/asm-ppc/resource.h
deleted file mode 100644
index 86a1ea23a6ed..000000000000
--- a/include/asm-ppc/resource.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _PPC_RESOURCE_H
2#define _PPC_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif
diff --git a/include/asm-ppc/shmparam.h b/include/asm-ppc/shmparam.h
deleted file mode 100644
index d6250602ae64..000000000000
--- a/include/asm-ppc/shmparam.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _PPC_SHMPARAM_H
2#define _PPC_SHMPARAM_H
3
4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
5
6#endif /* _PPC_SHMPARAM_H */
diff --git a/include/asm-ppc/string.h b/include/asm-ppc/string.h
deleted file mode 100644
index 225575997392..000000000000
--- a/include/asm-ppc/string.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef _PPC_STRING_H_
2#define _PPC_STRING_H_
3
4#ifdef __KERNEL__
5
6#define __HAVE_ARCH_STRCPY
7#define __HAVE_ARCH_STRNCPY
8#define __HAVE_ARCH_STRLEN
9#define __HAVE_ARCH_STRCMP
10#define __HAVE_ARCH_STRCAT
11#define __HAVE_ARCH_MEMSET
12#define __HAVE_ARCH_MEMCPY
13#define __HAVE_ARCH_MEMMOVE
14#define __HAVE_ARCH_MEMCMP
15#define __HAVE_ARCH_MEMCHR
16
17extern int strcasecmp(const char *, const char *);
18extern int strncasecmp(const char *, const char *, int);
19extern char * strcpy(char *,const char *);
20extern char * strncpy(char *,const char *, __kernel_size_t);
21extern __kernel_size_t strlen(const char *);
22extern int strcmp(const char *,const char *);
23extern char * strcat(char *, const char *);
24extern void * memset(void *,int,__kernel_size_t);
25extern void * memcpy(void *,const void *,__kernel_size_t);
26extern void * memmove(void *,const void *,__kernel_size_t);
27extern int memcmp(const void *,const void *,__kernel_size_t);
28extern void * memchr(const void *,int,__kernel_size_t);
29
30#endif /* __KERNEL__ */
31
32#endif
diff --git a/include/asm-ppc/unaligned.h b/include/asm-ppc/unaligned.h
deleted file mode 100644
index 45520d9b85d1..000000000000
--- a/include/asm-ppc/unaligned.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifdef __KERNEL__
2#ifndef __PPC_UNALIGNED_H
3#define __PPC_UNALIGNED_H
4
5/*
6 * The PowerPC can do unaligned accesses itself in big endian mode.
7 *
8 * The strange macros are there to make sure these can't
9 * be misused in a way that makes them not work on other
10 * architectures where unaligned accesses aren't as simple.
11 */
12
13#define get_unaligned(ptr) (*(ptr))
14
15#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
16
17#endif
18#endif /* __KERNEL__ */