Skip to content

Commit

Permalink
Merge tag 'disintegrate-misc-arches-20121010' of git://git.infradead.…
Browse files Browse the repository at this point in the history
…org/users/dhowells/linux-headers

Pull UAPI disintegration for misc arches from David Howells:
 "UAPI disintegration for MN10300, FRV and AVR32 arches"

* tag 'disintegrate-misc-arches-20121010' of git://git.infradead.org/users/dhowells/linux-headers:
  UAPI: (Scripted) Disintegrate arch/mn10300/include/asm
  UAPI: (Scripted) Disintegrate arch/frv/include/asm
  UAPI: (Scripted) Disintegrate arch/avr32/include/asm
  • Loading branch information
torvalds committed Oct 13, 2012
2 parents b689713 7190632 commit 02a650e
Show file tree
Hide file tree
Showing 120 changed files with 1,950 additions and 1,702 deletions.
3 changes: 0 additions & 3 deletions arch/avr32/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,6 1,3 @@
include include/asm-generic/Kbuild.asm

generic-y = clkdev.h
generic-y = exec.h

header-y = cachectl.h
18 changes: 2 additions & 16 deletions arch/avr32/include/asm/param.h
Original file line number Diff line number Diff line change
@@ -1,23 1,9 @@
#ifndef __ASM_AVR32_PARAM_H
#define __ASM_AVR32_PARAM_H

#ifdef __KERNEL__
#include <uapi/asm/param.h>

# define HZ CONFIG_HZ
# define USER_HZ 100 /* User interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
#endif

#ifndef HZ
# define HZ 100
#endif

/* TODO: Should be configurable */
#define EXEC_PAGESIZE 4096

#ifndef NOGROUP
# define NOGROUP (-1)
#endif

#define MAXHOSTNAMELEN 64

#endif /* __ASM_AVR32_PARAM_H */
115 changes: 1 addition & 114 deletions arch/avr32/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,119 8,9 @@
#ifndef __ASM_AVR32_PTRACE_H
#define __ASM_AVR32_PTRACE_H

#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13

/*
* Status Register bits
*/
#define SR_H 0x20000000
#define SR_J 0x10000000
#define SR_DM 0x08000000
#define SR_D 0x04000000
#define MODE_NMI 0x01c00000
#define MODE_EXCEPTION 0x01800000
#define MODE_INT3 0x01400000
#define MODE_INT2 0x01000000
#define MODE_INT1 0x00c00000
#define MODE_INT0 0x00800000
#define MODE_SUPERVISOR 0x00400000
#define MODE_USER 0x00000000
#define MODE_MASK 0x01c00000
#define SR_EM 0x00200000
#define SR_I3M 0x00100000
#define SR_I2M 0x00080000
#define SR_I1M 0x00040000
#define SR_I0M 0x00020000
#define SR_GM 0x00010000

#define SR_H_BIT 29
#define SR_J_BIT 28
#define SR_DM_BIT 27
#define SR_D_BIT 26
#define MODE_SHIFT 22
#define SR_EM_BIT 21
#define SR_I3M_BIT 20
#define SR_I2M_BIT 19
#define SR_I1M_BIT 18
#define SR_I0M_BIT 17
#define SR_GM_BIT 16

/* The user-visible part */
#define SR_L 0x00000020
#define SR_Q 0x00000010
#define SR_V 0x00000008
#define SR_N 0x00000004
#define SR_Z 0x00000002
#define SR_C 0x00000001

#define SR_L_BIT 5
#define SR_Q_BIT 4
#define SR_V_BIT 3
#define SR_N_BIT 2
#define SR_Z_BIT 1
#define SR_C_BIT 0

/*
* The order is defined by the stmts instruction. r0 is stored first,
* so it gets the highest address.
*
* Registers 0-12 are general-purpose registers (r12 is normally used for
* the function return value).
* Register 13 is the stack pointer
* Register 14 is the link register
* Register 15 is the program counter (retrieved from the RAR sysreg)
*/
#define FRAME_SIZE_FULL 72
#define REG_R12_ORIG 68
#define REG_R0 64
#define REG_R1 60
#define REG_R2 56
#define REG_R3 52
#define REG_R4 48
#define REG_R5 44
#define REG_R6 40
#define REG_R7 36
#define REG_R8 32
#define REG_R9 28
#define REG_R10 24
#define REG_R11 20
#define REG_R12 16
#define REG_SP 12
#define REG_LR 8

#define FRAME_SIZE_MIN 8
#define REG_PC 4
#define REG_SR 0
#include <uapi/asm/ptrace.h>

#ifndef __ASSEMBLY__
struct pt_regs {
/* These are always saved */
unsigned long sr;
unsigned long pc;

/* These are sometimes saved */
unsigned long lr;
unsigned long sp;
unsigned long r12;
unsigned long r11;
unsigned long r10;
unsigned long r9;
unsigned long r8;
unsigned long r7;
unsigned long r6;
unsigned long r5;
unsigned long r4;
unsigned long r3;
unsigned long r2;
unsigned long r1;
unsigned long r0;

/* Only saved on system call */
unsigned long r12_orig;
};

#ifdef __KERNEL__

#include <asm/ocd.h>

Expand Down Expand Up @@ -150,8 40,5 @@ static __inline__ int valid_user_regs(struct pt_regs *regs)
}


#endif /* __KERNEL__ */

#endif /* ! __ASSEMBLY__ */

#endif /* __ASM_AVR32_PTRACE_H */
5 changes: 1 addition & 4 deletions arch/avr32/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 11,8 @@
#ifndef __ASM_AVR32_SETUP_H__
#define __ASM_AVR32_SETUP_H__

#define COMMAND_LINE_SIZE 256
#include <uapi/asm/setup.h>

#ifdef __KERNEL__

/* Magic number indicating that a tag table is present */
#define ATAG_MAGIC 0xa2a25441
Expand Down Expand Up @@ -142,6 141,4 @@ void setup_processor(void);

#endif /* !__ASSEMBLY__ */

#endif /* __KERNEL__ */

#endif /* __ASM_AVR32_SETUP_H__ */
121 changes: 1 addition & 120 deletions arch/avr32/include/asm/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 8,8 @@
#ifndef __ASM_AVR32_SIGNAL_H
#define __ASM_AVR32_SIGNAL_H

#include <linux/types.h>
#include <uapi/asm/signal.h>

/* Avoid too many header ordering problems. */
struct siginfo;

#ifdef __KERNEL__
/* Most things should be clean enough to redefine this at will, if care
is taken to make libc match. */

Expand All @@ -27,94 23,6 @@ typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;

#else
/* Here we must cater to libcs that poke about in kernel headers. */

#define NSIG 32
typedef unsigned long sigset_t;

#endif /* __KERNEL__ */

#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
#define SIGABRT 6
#define SIGIOT 6
#define SIGBUS 7
#define SIGFPE 8
#define SIGKILL 9
#define SIGUSR1 10
#define SIGSEGV 11
#define SIGUSR2 12
#define SIGPIPE 13
#define SIGALRM 14
#define SIGTERM 15
#define SIGSTKFLT 16
#define SIGCHLD 17
#define SIGCONT 18
#define SIGSTOP 19
#define SIGTSTP 20
#define SIGTTIN 21
#define SIGTTOU 22
#define SIGURG 23
#define SIGXCPU 24
#define SIGXFSZ 25
#define SIGVTALRM 26
#define SIGPROF 27
#define SIGWINCH 28
#define SIGIO 29
#define SIGPOLL SIGIO
/*
#define SIGLOST 29
*/
#define SIGPWR 30
#define SIGSYS 31
#define SIGUNUSED 31

/* These should not be considered constants from userland. */
#define SIGRTMIN 32
#define SIGRTMAX (_NSIG-1)

/*
* SA_FLAGS values:
*
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
* SA_SIGINFO deliver the signal with SIGINFO structs
* SA_ONSTACK indicates that a registered stack_t will be used.
* SA_RESTART flag to get restarting signals (which were the default long ago)
* SA_NODEFER prevents the current signal from being masked in the handler.
* SA_RESETHAND clears the handler when the signal is delivered.
*
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
* Unix names RESETHAND and NODEFER respectively.
*/
#define SA_NOCLDSTOP 0x00000001
#define SA_NOCLDWAIT 0x00000002
#define SA_SIGINFO 0x00000004
#define SA_RESTORER 0x04000000
#define SA_ONSTACK 0x08000000
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
#define SA_RESETHAND 0x80000000

#define SA_NOMASK SA_NODEFER
#define SA_ONESHOT SA_RESETHAND

/*
* sigaltstack controls
*/
#define SS_ONSTACK 1
#define SS_DISABLE 2

#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192

#include <asm-generic/signal-defs.h>

#ifdef __KERNEL__
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
Expand All @@ -125,37 33,10 @@ struct sigaction {
struct k_sigaction {
struct sigaction sa;
};
#else
/* Here we must cater to libcs that poke about in kernel headers. */

struct sigaction {
union {
__sighandler_t _sa_handler;
void (*_sa_sigaction)(int, struct siginfo *, void *);
} _u;
sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
};

#define sa_handler _u._sa_handler
#define sa_sigaction _u._sa_sigaction

#endif /* __KERNEL__ */

typedef struct sigaltstack {
void __user *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;

#ifdef __KERNEL__

#include <asm/sigcontext.h>
#undef __HAVE_ARCH_SIG_BITOPS

#define ptrace_signal_deliver(regs, cookie) do { } while (0)

#endif /* __KERNEL__ */

#endif
41 changes: 1 addition & 40 deletions arch/avr32/include/asm/termios.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 8,8 @@
#ifndef __ASM_AVR32_TERMIOS_H
#define __ASM_AVR32_TERMIOS_H

#include <asm/termbits.h>
#include <asm/ioctls.h>
#include <uapi/asm/termios.h>

struct winsize {
unsigned short ws_row;
unsigned short ws_col;
unsigned short ws_xpixel;
unsigned short ws_ypixel;
};

#define NCC 8
struct termio {
unsigned short c_iflag; /* input mode flags */
unsigned short c_oflag; /* output mode flags */
unsigned short c_cflag; /* control mode flags */
unsigned short c_lflag; /* local mode flags */
unsigned char c_line; /* line discipline */
unsigned char c_cc[NCC]; /* control characters */
};

/* modem lines */
#define TIOCM_LE 0x001
#define TIOCM_DTR 0x002
#define TIOCM_RTS 0x004
#define TIOCM_ST 0x008
#define TIOCM_SR 0x010
#define TIOCM_CTS 0x020
#define TIOCM_CAR 0x040
#define TIOCM_RNG 0x080
#define TIOCM_DSR 0x100
#define TIOCM_CD TIOCM_CAR
#define TIOCM_RI TIOCM_RNG
#define TIOCM_OUT1 0x2000
#define TIOCM_OUT2 0x4000
#define TIOCM_LOOP 0x8000

/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */

#ifdef __KERNEL__
/* intr=^C quit=^\ erase=del kill=^U
eof=^D vtime=\0 vmin=\1 sxtc=\0
start=^Q stop=^S susp=^Z eol=\0
Expand All @@ -57,6 20,4 @@ struct termio {

#include <asm-generic/termios-base.h>

#endif /* __KERNEL__ */

#endif /* __ASM_AVR32_TERMIOS_H */
6 changes: 1 addition & 5 deletions arch/avr32/include/asm/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 8,12 @@
#ifndef __ASM_AVR32_TYPES_H
#define __ASM_AVR32_TYPES_H

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

/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__

#define BITS_PER_LONG 32

#endif /* __KERNEL__ */


#endif /* __ASM_AVR32_TYPES_H */
Loading

0 comments on commit 02a650e

Please sign in to comment.