Skip to content

Commit

Permalink
Merge tag 'disintegrate-m68k-20121009' of git://git.infradead.org/use…
Browse files Browse the repository at this point in the history
…rs/dhowells/linux-headers into for-linus
  • Loading branch information
geertu committed Oct 15, 2012
2 parents ddffeb8 + 10b3a97 commit 8fccc5f
Show file tree
Hide file tree
Showing 30 changed files with 728 additions and 667 deletions.
2 changes: 0 additions & 2 deletions arch/m68k/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include include/asm-generic/Kbuild.asm
header-y += cachectl.h

generic-y += bitsperlong.h
generic-y += clkdev.h
Expand Down
72 changes: 1 addition & 71 deletions arch/m68k/include/asm/ptrace.h
Original file line number Diff line number Diff line change
@@ -1,81 +1,12 @@
#ifndef _M68K_PTRACE_H
#define _M68K_PTRACE_H

#define PT_D1 0
#define PT_D2 1
#define PT_D3 2
#define PT_D4 3
#define PT_D5 4
#define PT_D6 5
#define PT_D7 6
#define PT_A0 7
#define PT_A1 8
#define PT_A2 9
#define PT_A3 10
#define PT_A4 11
#define PT_A5 12
#define PT_A6 13
#define PT_D0 14
#define PT_USP 15
#define PT_ORIG_D0 16
#define PT_SR 17
#define PT_PC 18
#include <uapi/asm/ptrace.h>

#ifndef __ASSEMBLY__

/* this struct defines the way the registers are stored on the
stack during a system call. */

struct pt_regs {
long d1;
long d2;
long d3;
long d4;
long d5;
long a0;
long a1;
long a2;
long d0;
long orig_d0;
long stkadj;
#ifdef CONFIG_COLDFIRE
unsigned format : 4; /* frame format specifier */
unsigned vector : 12; /* vector offset */
unsigned short sr;
unsigned long pc;
#else
unsigned short sr;
unsigned long pc;
unsigned format : 4; /* frame format specifier */
unsigned vector : 12; /* vector offset */
#endif
};

/*
* This is the extended stack used by signal handlers and the context
* switcher: it's pushed after the normal "struct pt_regs".
*/
struct switch_stack {
unsigned long d6;
unsigned long d7;
unsigned long a3;
unsigned long a4;
unsigned long a5;
unsigned long a6;
unsigned long retpc;
};

/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13
#define PTRACE_GETFPREGS 14
#define PTRACE_SETFPREGS 15

#define PTRACE_GET_THREAD_AREA 25

#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */

#ifdef __KERNEL__

#ifndef PS_S
#define PS_S (0x2000)
Expand All @@ -94,6 +25,5 @@ struct switch_stack {
#define arch_has_block_step() (1)
#endif

#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* _M68K_PTRACE_H */
82 changes: 1 addition & 81 deletions arch/m68k/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,12 @@
** Redesign of the boot information structure; moved boot information
** structure to bootinfo.h
*/

#ifndef _M68K_SETUP_H
#define _M68K_SETUP_H

#include <uapi/asm/setup.h>


/*
* Linux/m68k Architectures
*/

#define MACH_AMIGA 1
#define MACH_ATARI 2
#define MACH_MAC 3
#define MACH_APOLLO 4
#define MACH_SUN3 5
#define MACH_MVME147 6
#define MACH_MVME16x 7
#define MACH_BVME6000 8
#define MACH_HP300 9
#define MACH_Q40 10
#define MACH_SUN3X 11
#define MACH_M54XX 12

#define COMMAND_LINE_SIZE 256

#ifdef __KERNEL__

#define CL_SIZE COMMAND_LINE_SIZE

#ifndef __ASSEMBLY__
Expand Down Expand Up @@ -194,63 +173,6 @@ extern unsigned long m68k_machtype;
# define MACH_TYPE (m68k_machtype)
#endif

#endif /* __KERNEL__ */


/*
* CPU, FPU and MMU types
*
* Note: we may rely on the following equalities:
*
* CPU_68020 == MMU_68851
* CPU_68030 == MMU_68030
* CPU_68040 == FPU_68040 == MMU_68040
* CPU_68060 == FPU_68060 == MMU_68060
*/

#define CPUB_68020 0
#define CPUB_68030 1
#define CPUB_68040 2
#define CPUB_68060 3
#define CPUB_COLDFIRE 4

#define CPU_68020 (1<<CPUB_68020)
#define CPU_68030 (1<<CPUB_68030)
#define CPU_68040 (1<<CPUB_68040)
#define CPU_68060 (1<<CPUB_68060)
#define CPU_COLDFIRE (1<<CPUB_COLDFIRE)

#define FPUB_68881 0
#define FPUB_68882 1
#define FPUB_68040 2 /* Internal FPU */
#define FPUB_68060 3 /* Internal FPU */
#define FPUB_SUNFPA 4 /* Sun-3 FPA */
#define FPUB_COLDFIRE 5 /* ColdFire FPU */

#define FPU_68881 (1<<FPUB_68881)
#define FPU_68882 (1<<FPUB_68882)
#define FPU_68040 (1<<FPUB_68040)
#define FPU_68060 (1<<FPUB_68060)
#define FPU_SUNFPA (1<<FPUB_SUNFPA)
#define FPU_COLDFIRE (1<<FPUB_COLDFIRE)

#define MMUB_68851 0
#define MMUB_68030 1 /* Internal MMU */
#define MMUB_68040 2 /* Internal MMU */
#define MMUB_68060 3 /* Internal MMU */
#define MMUB_APOLLO 4 /* Custom Apollo */
#define MMUB_SUN3 5 /* Custom Sun-3 */
#define MMUB_COLDFIRE 6 /* Internal MMU */

#define MMU_68851 (1<<MMUB_68851)
#define MMU_68030 (1<<MMUB_68030)
#define MMU_68040 (1<<MMUB_68040)
#define MMU_68060 (1<<MMUB_68060)
#define MMU_SUN3 (1<<MMUB_SUN3)
#define MMU_APOLLO (1<<MMUB_APOLLO)
#define MMU_COLDFIRE (1<<MMUB_COLDFIRE)

#ifdef __KERNEL__

#ifndef __ASSEMBLY__
extern unsigned long m68k_cputype;
Expand Down Expand Up @@ -385,6 +307,4 @@ extern int m68k_realnum_memory; /* real # of memory blocks found */
extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
#endif

#endif /* __KERNEL__ */

#endif /* _M68K_SETUP_H */
118 changes: 1 addition & 117 deletions arch/m68k/include/asm/signal.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#ifndef _M68K_SIGNAL_H
#define _M68K_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 @@ -20,92 +16,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

/*
* SA_FLAGS values:
*
* 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_NOCLDSTOP flag to turn off SIGCHLD when children stop.
* SA_RESETHAND clears the handler when the signal is delivered.
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
* SA_NODEFER prevents the current signal from being masked in the handler.
*
* 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_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 old_sigaction {
__sighandler_t sa_handler;
old_sigset_t sa_mask;
Expand All @@ -123,31 +33,6 @@ 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>

#ifndef CONFIG_CPU_HAS_NO_BITFIELDS
Expand Down Expand Up @@ -208,5 +93,4 @@ struct pt_regs;
extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie);
#endif /* __uClinux__ */

#endif /* __KERNEL__ */
#endif /* _M68K_SIGNAL_H */
Loading

0 comments on commit 8fccc5f

Please sign in to comment.