Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347417
b: refs/heads/master
c: f7f4dc1
h: refs/heads/master
i:
  347415: 4794a94
v: v3
  • Loading branch information
David Howells committed Dec 19, 2012
1 parent 1ff2450 commit 9a6bb2c
Show file tree
Hide file tree
Showing 74 changed files with 806 additions and 802 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ec94e75def550548725a0bd77312ed6c266687a
refs/heads/master: f7f4dc10e1eb04eb8426a192a314b64444a333f4
1 change: 1 addition & 0 deletions trunk/arch/h8300/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include include/asm-generic/Kbuild.asm

generic-y += clkdev.h
generic-y += exec.h
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 13 additions & 2 deletions trunk/arch/h8300/include/asm/param.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#ifndef _H8300_PARAM_H
#define _H8300_PARAM_H

#include <uapi/asm/param.h>

#ifdef __KERNEL__
#define HZ CONFIG_HZ
#define USER_HZ HZ
#define CLOCKS_PER_SEC (USER_HZ)
#else
#define HZ 100
#endif

#define EXEC_PAGESIZE 4096

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

#define MAXHOSTNAMELEN 64 /* max length of hostname */

#endif /* _H8300_PARAM_H */
File renamed without changes.
File renamed without changes.
40 changes: 38 additions & 2 deletions trunk/arch/h8300/include/asm/ptrace.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
#ifndef _H8300_PTRACE_H
#define _H8300_PTRACE_H

#include <uapi/asm/ptrace.h>

#ifndef __ASSEMBLY__

#define PT_ER1 0
#define PT_ER2 1
#define PT_ER3 2
#define PT_ER4 3
#define PT_ER5 4
#define PT_ER6 5
#define PT_ER0 6
#define PT_ORIG_ER0 7
#define PT_CCR 8
#define PT_PC 9
#define PT_USP 10
#define PT_EXR 12

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

struct pt_regs {
long retpc;
long er4;
long er5;
long er6;
long er3;
long er2;
long er1;
long orig_er0;
unsigned short ccr;
long er0;
long vector;
#if defined(CONFIG_CPU_H8S)
unsigned short exr;
#endif
unsigned long pc;
} __attribute__((aligned(2),packed));

#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13

#ifdef __KERNEL__
#ifndef PS_S
#define PS_S (0x10)
#endif
Expand All @@ -28,5 +63,6 @@
#define current_pt_regs() ((struct pt_regs *) \
(THREAD_SIZE + (unsigned long)current_thread_info()) - 1)
#define signal_pt_regs() ((struct pt_regs *)current->thread.esp0)
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
#endif /* _H8300_PTRACE_H */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
121 changes: 120 additions & 1 deletion trunk/arch/h8300/include/asm/signal.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#ifndef _H8300_SIGNAL_H
#define _H8300_SIGNAL_H

#include <uapi/asm/signal.h>
#include <linux/types.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 @@ -16,6 +20,94 @@ 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 /* not supported yet */
#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

#define SA_RESTORER 0x04000000

/*
* 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 @@ -33,8 +125,35 @@ 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 *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;

#ifdef __KERNEL__

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

#endif /* __KERNEL__ */

#endif /* _H8300_SIGNAL_H */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
44 changes: 43 additions & 1 deletion trunk/arch/h8300/include/asm/termios.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,55 @@
#ifndef _H8300_TERMIOS_H
#define _H8300_TERMIOS_H

#include <uapi/asm/termios.h>
#include <asm/termbits.h>
#include <asm/ioctls.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 */
};

#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
reprint=^R discard=^U werase=^W lnext=^V
eol2=\0
*/
#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
#endif

/* 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__

/*
* Translate a "termio" structure into a "termios". Ugh.
Expand Down Expand Up @@ -47,4 +87,6 @@
#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))

#endif /* __KERNEL__ */

#endif /* _H8300_TERMIOS_H */
5 changes: 4 additions & 1 deletion trunk/arch/h8300/include/asm/types.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#ifndef _H8300_TYPES_H
#define _H8300_TYPES_H

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

#ifdef __KERNEL__

#define BITS_PER_LONG 32

#endif /* __KERNEL__ */

#endif /* _H8300_TYPES_H */
Loading

0 comments on commit 9a6bb2c

Please sign in to comment.