Commit 6f9aa727433fe7647869c9b64ce2f7b5feac0052

Authored by Stephen Rothwell
Committed by Paul Mackerras
1 parent 88999ceb55

[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>

Showing 33 changed files with 289 additions and 647 deletions Side-by-side Diff

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