Skip to content

Commit f7f4dc1

Browse files
committed
UAPI: (Scripted) Disintegrate arch/m32r/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 f7f4dc1

38 files changed

+668
-615
lines changed

arch/m32r/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/m32r/include/asm/ptrace.h

Lines changed: 3 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#ifndef _ASM_M32R_PTRACE_H
2-
#define _ASM_M32R_PTRACE_H
3-
41
/*
52
* linux/include/asm-m32r/ptrace.h
63
*
@@ -11,111 +8,12 @@
118
* M32R version:
129
* Copyright (C) 2001-2002, 2004 Hirokazu Takata <takata at linux-m32r.org>
1310
*/
11+
#ifndef _ASM_M32R_PTRACE_H
12+
#define _ASM_M32R_PTRACE_H
1413

15-
/* 0 - 13 are integer registers (general purpose registers). */
16-
#define PT_R4 0
17-
#define PT_R5 1
18-
#define PT_R6 2
19-
#define PT_REGS 3
20-
#define PT_R0 4
21-
#define PT_R1 5
22-
#define PT_R2 6
23-
#define PT_R3 7
24-
#define PT_R7 8
25-
#define PT_R8 9
26-
#define PT_R9 10
27-
#define PT_R10 11
28-
#define PT_R11 12
29-
#define PT_R12 13
30-
#define PT_SYSCNR 14
31-
#define PT_R13 PT_FP
32-
#define PT_R14 PT_LR
33-
#define PT_R15 PT_SP
34-
35-
/* processor status and miscellaneous context registers. */
36-
#define PT_ACC0H 15
37-
#define PT_ACC0L 16
38-
#define PT_ACC1H 17 /* ISA_DSP_LEVEL2 only */
39-
#define PT_ACC1L 18 /* ISA_DSP_LEVEL2 only */
40-
#define PT_PSW 19
41-
#define PT_BPC 20
42-
#define PT_BBPSW 21
43-
#define PT_BBPC 22
44-
#define PT_SPU 23
45-
#define PT_FP 24
46-
#define PT_LR 25
47-
#define PT_SPI 26
48-
#define PT_ORIGR0 27
49-
50-
/* virtual pt_reg entry for gdb */
51-
#define PT_PC 30
52-
#define PT_CBR 31
53-
#define PT_EVB 32
54-
55-
56-
/* Control registers. */
57-
#define SPR_CR0 PT_PSW
58-
#define SPR_CR1 PT_CBR /* read only */
59-
#define SPR_CR2 PT_SPI
60-
#define SPR_CR3 PT_SPU
61-
#define SPR_CR4
62-
#define SPR_CR5 PT_EVB /* part of M32R/E, M32R/I core only */
63-
#define SPR_CR6 PT_BPC
64-
#define SPR_CR7
65-
#define SPR_CR8 PT_BBPSW
66-
#define SPR_CR9
67-
#define SPR_CR10
68-
#define SPR_CR11
69-
#define SPR_CR12
70-
#define SPR_CR13 PT_WR
71-
#define SPR_CR14 PT_BBPC
72-
#define SPR_CR15
73-
74-
/* this struct defines the way the registers are stored on the
75-
stack during a system call. */
76-
struct pt_regs {
77-
/* Saved main processor registers. */
78-
unsigned long r4;
79-
unsigned long r5;
80-
unsigned long r6;
81-
struct pt_regs *pt_regs;
82-
unsigned long r0;
83-
unsigned long r1;
84-
unsigned long r2;
85-
unsigned long r3;
86-
unsigned long r7;
87-
unsigned long r8;
88-
unsigned long r9;
89-
unsigned long r10;
90-
unsigned long r11;
91-
unsigned long r12;
92-
long syscall_nr;
93-
94-
/* Saved main processor status and miscellaneous context registers. */
95-
unsigned long acc0h;
96-
unsigned long acc0l;
97-
unsigned long acc1h; /* ISA_DSP_LEVEL2 only */
98-
unsigned long acc1l; /* ISA_DSP_LEVEL2 only */
99-
unsigned long psw;
100-
unsigned long bpc; /* saved PC for TRAP syscalls */
101-
unsigned long bbpsw;
102-
unsigned long bbpc;
103-
unsigned long spu; /* saved user stack */
104-
unsigned long fp;
105-
unsigned long lr; /* saved PC for JL syscalls */
106-
unsigned long spi; /* saved kernel stack */
107-
unsigned long orig_r0;
108-
};
109-
110-
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
111-
#define PTRACE_GETREGS 12
112-
#define PTRACE_SETREGS 13
113-
114-
#define PTRACE_OLDSETOPTIONS 21
115-
116-
#ifdef __KERNEL__
11714

11815
#include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */
16+
#include <uapi/asm/ptrace.h>
11917

12018
#define arch_has_single_step() (1)
12119

@@ -142,6 +40,4 @@ extern void withdraw_debug_trap(struct pt_regs *regs);
14240
#define current_pt_regs() ((struct pt_regs *) \
14341
((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
14442

145-
#endif /* __KERNEL */
146-
14743
#endif /* _ASM_M32R_PTRACE_H */

arch/m32r/include/asm/setup.h

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

4-
/*
5-
* This is set up by the setup-routine at boot-time
6-
*/
4+
#include <uapi/asm/setup.h>
75

8-
#define COMMAND_LINE_SIZE 512
9-
10-
#ifdef __KERNEL__
116

127
#define PARAM ((unsigned char *)empty_zero_page)
138

@@ -33,6 +28,4 @@
3328
extern unsigned long memory_start;
3429
extern unsigned long memory_end;
3530

36-
#endif /* __KERNEL__ */
37-
3831
#endif /* _ASM_M32R_SETUP_H */

arch/m32r/include/asm/signal.h

Lines changed: 1 addition & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
#ifndef _ASM_M32R_SIGNAL_H
22
#define _ASM_M32R_SIGNAL_H
33

4-
#include <linux/types.h>
5-
#include <linux/time.h>
6-
#include <linux/compiler.h>
4+
#include <uapi/asm/signal.h>
75

8-
/* Avoid too many header ordering problems. */
9-
struct siginfo;
10-
11-
#ifdef __KERNEL__
126
/* Most things should be clean enough to redefine this at will, if care
137
is taken to make libc match. */
148

@@ -22,94 +16,6 @@ typedef struct {
2216
unsigned long sig[_NSIG_WORDS];
2317
} sigset_t;
2418

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

15031
#undef __HAVE_ARCH_SIG_BITOPS
15132

152-
#endif /* __KERNEL__ */
153-
15433
#endif /* _ASM_M32R_SIGNAL_H */

arch/m32r/include/asm/termios.h

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,8 @@
11
#ifndef _M32R_TERMIOS_H
22
#define _M32R_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-
};
13-
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-
/* modem lines */
25-
#define TIOCM_LE 0x001
26-
#define TIOCM_DTR 0x002
27-
#define TIOCM_RTS 0x004
28-
#define TIOCM_ST 0x008
29-
#define TIOCM_SR 0x010
30-
#define TIOCM_CTS 0x020
31-
#define TIOCM_CAR 0x040
32-
#define TIOCM_RNG 0x080
33-
#define TIOCM_DSR 0x100
34-
#define TIOCM_CD TIOCM_CAR
35-
#define TIOCM_RI TIOCM_RNG
36-
#define TIOCM_OUT1 0x2000
37-
#define TIOCM_OUT2 0x4000
38-
#define TIOCM_LOOP 0x8000
39-
40-
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41-
42-
#ifdef __KERNEL__
434
#include <linux/module.h>
5+
#include <uapi/asm/termios.h>
446

457
/* intr=^C quit=^\ erase=del kill=^U
468
eof=^D vtime=\0 vmin=\1 sxtc=\0
@@ -86,6 +48,4 @@ struct termio {
8648
#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
8749
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
8850

89-
#endif /* __KERNEL__ */
90-
9151
#endif /* _M32R_TERMIOS_H */

arch/m32r/include/asm/types.h

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

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

66
/*
77
* These aren't exported outside the kernel to avoid name space clashes
88
*/
9-
#ifdef __KERNEL__
109

1110
#define BITS_PER_LONG 32
1211

13-
#endif /* __KERNEL__ */
14-
1512
#endif /* _ASM_M32R_TYPES_H */

0 commit comments

Comments
 (0)