Skip to content

Commit 1ec94e7

Browse files
committed
UAPI: (Scripted) Disintegrate arch/h8300/include/asm
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
1 parent 752451f commit 1ec94e7

39 files changed

+595
-546
lines changed

arch/h8300/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include include/asm-generic/Kbuild.asm
21

32
generic-y += clkdev.h
43
generic-y += exec.h

arch/h8300/include/asm/param.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
#ifndef _H8300_PARAM_H
22
#define _H8300_PARAM_H
33

4-
#ifdef __KERNEL__
4+
#include <uapi/asm/param.h>
5+
56
#define HZ CONFIG_HZ
67
#define USER_HZ HZ
78
#define CLOCKS_PER_SEC (USER_HZ)
8-
#else
9-
#define HZ 100
10-
#endif
11-
12-
#define EXEC_PAGESIZE 4096
13-
14-
#ifndef NOGROUP
15-
#define NOGROUP (-1)
16-
#endif
17-
18-
#define MAXHOSTNAMELEN 64 /* max length of hostname */
19-
209
#endif /* _H8300_PARAM_H */

arch/h8300/include/asm/ptrace.h

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,11 @@
11
#ifndef _H8300_PTRACE_H
22
#define _H8300_PTRACE_H
33

4-
#ifndef __ASSEMBLY__
5-
6-
#define PT_ER1 0
7-
#define PT_ER2 1
8-
#define PT_ER3 2
9-
#define PT_ER4 3
10-
#define PT_ER5 4
11-
#define PT_ER6 5
12-
#define PT_ER0 6
13-
#define PT_ORIG_ER0 7
14-
#define PT_CCR 8
15-
#define PT_PC 9
16-
#define PT_USP 10
17-
#define PT_EXR 12
18-
19-
/* this struct defines the way the registers are stored on the
20-
stack during a system call. */
4+
#include <uapi/asm/ptrace.h>
215

22-
struct pt_regs {
23-
long retpc;
24-
long er4;
25-
long er5;
26-
long er6;
27-
long er3;
28-
long er2;
29-
long er1;
30-
long orig_er0;
31-
unsigned short ccr;
32-
long er0;
33-
long vector;
6+
#ifndef __ASSEMBLY__
347
#if defined(CONFIG_CPU_H8S)
35-
unsigned short exr;
368
#endif
37-
unsigned long pc;
38-
} __attribute__((aligned(2),packed));
39-
40-
#define PTRACE_GETREGS 12
41-
#define PTRACE_SETREGS 13
42-
43-
#ifdef __KERNEL__
449
#ifndef PS_S
4510
#define PS_S (0x10)
4611
#endif
@@ -63,6 +28,5 @@ struct pt_regs {
6328
#define current_pt_regs() ((struct pt_regs *) \
6429
(THREAD_SIZE + (unsigned long)current_thread_info()) - 1)
6530
#define signal_pt_regs() ((struct pt_regs *)current->thread.esp0)
66-
#endif /* __KERNEL__ */
6731
#endif /* __ASSEMBLY__ */
6832
#endif /* _H8300_PTRACE_H */

arch/h8300/include/asm/signal.h

Lines changed: 1 addition & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
#ifndef _H8300_SIGNAL_H
22
#define _H8300_SIGNAL_H
33

4-
#include <linux/types.h>
4+
#include <uapi/asm/signal.h>
55

6-
/* Avoid too many header ordering problems. */
7-
struct siginfo;
8-
9-
#ifdef __KERNEL__
106
/* Most things should be clean enough to redefine this at will, if care
117
is taken to make libc match. */
128

@@ -20,94 +16,6 @@ typedef struct {
2016
unsigned long sig[_NSIG_WORDS];
2117
} sigset_t;
2218

23-
#else
24-
/* Here we must cater to libcs that poke about in kernel headers. */
25-
26-
#define NSIG 32
27-
typedef unsigned long sigset_t;
28-
29-
#endif /* __KERNEL__ */
30-
31-
#define SIGHUP 1
32-
#define SIGINT 2
33-
#define SIGQUIT 3
34-
#define SIGILL 4
35-
#define SIGTRAP 5
36-
#define SIGABRT 6
37-
#define SIGIOT 6
38-
#define SIGBUS 7
39-
#define SIGFPE 8
40-
#define SIGKILL 9
41-
#define SIGUSR1 10
42-
#define SIGSEGV 11
43-
#define SIGUSR2 12
44-
#define SIGPIPE 13
45-
#define SIGALRM 14
46-
#define SIGTERM 15
47-
#define SIGSTKFLT 16
48-
#define SIGCHLD 17
49-
#define SIGCONT 18
50-
#define SIGSTOP 19
51-
#define SIGTSTP 20
52-
#define SIGTTIN 21
53-
#define SIGTTOU 22
54-
#define SIGURG 23
55-
#define SIGXCPU 24
56-
#define SIGXFSZ 25
57-
#define SIGVTALRM 26
58-
#define SIGPROF 27
59-
#define SIGWINCH 28
60-
#define SIGIO 29
61-
#define SIGPOLL SIGIO
62-
/*
63-
#define SIGLOST 29
64-
*/
65-
#define SIGPWR 30
66-
#define SIGSYS 31
67-
#define SIGUNUSED 31
68-
69-
/* These should not be considered constants from userland. */
70-
#define SIGRTMIN 32
71-
#define SIGRTMAX _NSIG
72-
73-
/*
74-
* SA_FLAGS values:
75-
*
76-
* SA_ONSTACK indicates that a registered stack_t will be used.
77-
* SA_RESTART flag to get restarting signals (which were the default long ago)
78-
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
79-
* SA_RESETHAND clears the handler when the signal is delivered.
80-
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
81-
* SA_NODEFER prevents the current signal from being masked in the handler.
82-
*
83-
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
84-
* Unix names RESETHAND and NODEFER respectively.
85-
*/
86-
#define SA_NOCLDSTOP 0x00000001
87-
#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
88-
#define SA_SIGINFO 0x00000004
89-
#define SA_ONSTACK 0x08000000
90-
#define SA_RESTART 0x10000000
91-
#define SA_NODEFER 0x40000000
92-
#define SA_RESETHAND 0x80000000
93-
94-
#define SA_NOMASK SA_NODEFER
95-
#define SA_ONESHOT SA_RESETHAND
96-
97-
#define SA_RESTORER 0x04000000
98-
99-
/*
100-
* sigaltstack controls
101-
*/
102-
#define SS_ONSTACK 1
103-
#define SS_DISABLE 2
104-
105-
#define MINSIGSTKSZ 2048
106-
#define SIGSTKSZ 8192
107-
108-
#include <asm-generic/signal-defs.h>
109-
110-
#ifdef __KERNEL__
11119
struct old_sigaction {
11220
__sighandler_t sa_handler;
11321
old_sigset_t sa_mask;
@@ -125,35 +33,8 @@ struct sigaction {
12533
struct k_sigaction {
12634
struct sigaction sa;
12735
};
128-
#else
129-
/* Here we must cater to libcs that poke about in kernel headers. */
130-
131-
struct sigaction {
132-
union {
133-
__sighandler_t _sa_handler;
134-
void (*_sa_sigaction)(int, struct siginfo *, void *);
135-
} _u;
136-
sigset_t sa_mask;
137-
unsigned long sa_flags;
138-
void (*sa_restorer)(void);
139-
};
140-
141-
#define sa_handler _u._sa_handler
142-
#define sa_sigaction _u._sa_sigaction
143-
144-
#endif /* __KERNEL__ */
145-
146-
typedef struct sigaltstack {
147-
void *ss_sp;
148-
int ss_flags;
149-
size_t ss_size;
150-
} stack_t;
151-
152-
#ifdef __KERNEL__
15336

15437
#include <asm/sigcontext.h>
15538
#undef __HAVE_ARCH_SIG_BITOPS
15639

157-
#endif /* __KERNEL__ */
158-
15940
#endif /* _H8300_SIGNAL_H */

arch/h8300/include/asm/termios.h

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,15 @@
11
#ifndef _H8300_TERMIOS_H
22
#define _H8300_TERMIOS_H
33

4-
#include <asm/termbits.h>
5-
#include <asm/ioctls.h>
6-
7-
struct winsize {
8-
unsigned short ws_row;
9-
unsigned short ws_col;
10-
unsigned short ws_xpixel;
11-
unsigned short ws_ypixel;
12-
};
4+
#include <uapi/asm/termios.h>
135

14-
#define NCC 8
15-
struct termio {
16-
unsigned short c_iflag; /* input mode flags */
17-
unsigned short c_oflag; /* output mode flags */
18-
unsigned short c_cflag; /* control mode flags */
19-
unsigned short c_lflag; /* local mode flags */
20-
unsigned char c_line; /* line discipline */
21-
unsigned char c_cc[NCC]; /* control characters */
22-
};
23-
24-
#ifdef __KERNEL__
256
/* intr=^C quit=^| erase=del kill=^U
267
eof=^D vtime=\0 vmin=\1 sxtc=\0
278
start=^Q stop=^S susp=^Z eol=\0
289
reprint=^R discard=^U werase=^W lnext=^V
2910
eol2=\0
3011
*/
3112
#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
32-
#endif
33-
34-
/* modem lines */
35-
#define TIOCM_LE 0x001
36-
#define TIOCM_DTR 0x002
37-
#define TIOCM_RTS 0x004
38-
#define TIOCM_ST 0x008
39-
#define TIOCM_SR 0x010
40-
#define TIOCM_CTS 0x020
41-
#define TIOCM_CAR 0x040
42-
#define TIOCM_RNG 0x080
43-
#define TIOCM_DSR 0x100
44-
#define TIOCM_CD TIOCM_CAR
45-
#define TIOCM_RI TIOCM_RNG
46-
#define TIOCM_OUT1 0x2000
47-
#define TIOCM_OUT2 0x4000
48-
#define TIOCM_LOOP 0x8000
49-
50-
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
51-
52-
#ifdef __KERNEL__
5313

5414
/*
5515
* Translate a "termio" structure into a "termios". Ugh.
@@ -87,6 +47,4 @@ struct termio {
8747
#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
8848
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
8949

90-
#endif /* __KERNEL__ */
91-
9250
#endif /* _H8300_TERMIOS_H */

arch/h8300/include/asm/types.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
#ifndef _H8300_TYPES_H
22
#define _H8300_TYPES_H
33

4-
#include <asm-generic/int-ll64.h>
4+
#include <uapi/asm/types.h>
55

6-
#ifdef __KERNEL__
76

87
#define BITS_PER_LONG 32
98

10-
#endif /* __KERNEL__ */
11-
129
#endif /* _H8300_TYPES_H */

0 commit comments

Comments
 (0)