Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/linux-milkymist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e7f8b2eb45d1
Choose a base ref
...
head repository: m-labs/linux-milkymist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4b7205897744
Choose a head ref
  • 18 commits
  • 38 files changed
  • 2 contributors

Commits on Mar 3, 2013

  1. lm32: signal: Use restore_altstack()

    do_sigaltstack() will be gone in the next upstream release, restore_altstack()
    is it's replacement.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    1a70d26 View commit details
  2. lm32: signal: Use flush_icache_range() instead of open-coding it.

    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    75f7d00 View commit details
  3. lm32: signal: Reset restart_block.fn in rt_sigreturn

    This is required for proper operation.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    ac2205b View commit details
  4. lm32: signals: Add proper __user annotation for setup_sigcontext()

    The sigcontext struct we are working with here is on the userspace stack.
    
    Fixes the following sparse warnings:
    	arch/lm32/kernel/signal.c:114:31: warning: incorrect type in argument 1 (different address spaces)
    	arch/lm32/kernel/signal.c:114:31:    expected void [noderef] <asn:1>*to
    	arch/lm32/kernel/signal.c:114:31:    got struct pt_regs *<noident>
    	arch/lm32/kernel/signal.c:115:16: warning: incorrect type in initializer (different address spaces)
    	arch/lm32/kernel/signal.c:115:16:    expected unsigned long [noderef] <asn:1>*__pu_addr
    	arch/lm32/kernel/signal.c:115:16:    got unsigned long *<noident>
    	arch/lm32/kernel/signal.c:148:34: warning: incorrect type in argument 1 (different address spaces)
    	arch/lm32/kernel/signal.c:148:34:    expected struct sigcontext *sc
    	arch/lm32/kernel/signal.c:148:34:    got struct sigcontext [noderef] <asn:1>*<noident>
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    41b08fb View commit details
  5. consolidate declarations of k_sigaction

    Only alpha and sparc are unusual - they have ka_restorer in it.
    And nobody needs that exposed to userland.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Al Viro authored and larsclausen committed Mar 3, 2013
    Copy the full SHA
    b687889 View commit details
  6. consolidate kernel-side struct sigaction declarations

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Al Viro authored and larsclausen committed Mar 3, 2013
    Copy the full SHA
    ca15062 View commit details
  7. new helper: get_signal()

    On success get_signal_to_deliver() fills k_sigaction and siginfo.
    _All_ users pass it addresses of the local variables sitting in
    the same function.  Then they proceed to pass those addresses
    pretty much in tandem to a bunch of helper functions; again, all
    callers of those helpers are passing them such a pair, and one that
    had been through get_signal_to_deliver() at that.
    
    The obvious cleanup: introduce a new type that would contain a
    <k_sigaction,siginfo> pair (struct ksignal) and begin switching to
    using it.  Turns out that it's convenient to store the signal number
    in the same object.
    
    New helper, taking that sucker is a wrapper for get_signal_to_deliver();
    takes struct ksignal * and returns bool.  On success fills ksignal
    with the information for signal handler to be invoked.
    
    For now it's a macro (to avoid header ordering headache), but eventually
    it'll be a function in kernel/signal.c, with get_signal_to_deliver()
    folded into it.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Al Viro authored and larsclausen committed Mar 3, 2013
    Copy the full SHA
    9894936 View commit details
  8. new helper: signal_setup_done()

    usual "call force_sigsegv or signal_delivered" logics.  Takes
    ksignal instead of separate siginfo/k_sigaction.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Al Viro authored and larsclausen committed Mar 3, 2013
    Copy the full SHA
    b6df4b0 View commit details
  9. new helper: sigsp()

    Normal logics for altstack handling in sigframe allocation
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Al Viro authored and larsclausen committed Mar 3, 2013
    Copy the full SHA
    7a5070b View commit details
  10. lm32: signal: switch to ksignal

    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    17412b4 View commit details
  11. lm32: Rework signal handling

    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    11b6d4c View commit details
  12. lm32: entry.S: Use PT_Rxx instead of magic numbers

    Use the PT_Rxx defines instead of magic number for accessing the pt_regs fields.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    9df0d4b View commit details
  13. lm32: processor.h: More cleanups

    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    abac1ab View commit details
  14. lm32: Remove gpio.h

    It is unused these days. There is a generic implementation of it now.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    7b96718 View commit details
  15. lm32: timex.h: Remove CLOCK_TICK_RATE

    It's unused.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    0bfdb9b View commit details
  16. lm32: prom.h: Remove #ifdef CONFIG_OF

    CONFIG_OF is always defined for lm32.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    ec06e14 View commit details
  17. lm32: Remove r0 from pt_regs

    We never use it.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    a24553b View commit details
  18. lm32: process.c: Include linux/pm.h

    Fixes the following sparse warning:
    	arch/lm32/kernel/process.c:53:6: warning: symbol 'pm_power_off' was not declared. Should it be static?
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    larsclausen committed Mar 3, 2013
    Copy the full SHA
    4b72058 View commit details
Showing with 317 additions and 447 deletions.
  1. +1 −10 arch/alpha/include/asm/signal.h
  2. +1 −10 arch/arm/include/asm/signal.h
  3. +1 −10 arch/avr32/include/asm/signal.h
  4. +1 −9 arch/cris/include/asm/signal.h
  5. +1 −10 arch/h8300/include/asm/signal.h
  6. +0 −10 arch/ia64/include/asm/signal.h
  7. +0 −1 arch/ia64/include/asm/unistd.h
  8. +0 −16 arch/lm32/include/asm/gpio.h
  9. +6 −7 arch/lm32/include/asm/processor.h
  10. +0 −2 arch/lm32/include/asm/prom.h
  11. +1 −1 arch/lm32/include/asm/ptrace.h
  12. +2 −6 arch/lm32/include/asm/thread_info.h
  13. +0 −8 arch/lm32/include/asm/timex.h
  14. +34 −32 arch/lm32/kernel/asm-offsets.c
  15. +110 −87 arch/lm32/kernel/entry.S
  16. +1 −0 arch/lm32/kernel/process.c
  17. +67 −138 arch/lm32/kernel/signal.c
  18. +1 −10 arch/m32r/include/asm/signal.h
  19. +1 −9 arch/m68k/include/asm/signal.h
  20. +2 −0 arch/mips/include/asm/signal.h
  21. +2 −4 arch/mips/include/uapi/asm/signal.h
  22. +1 −9 arch/mn10300/include/asm/signal.h
  23. +2 −4 arch/parisc/include/asm/signal.h
  24. +1 −0 arch/powerpc/include/asm/signal.h
  25. +0 −1 arch/powerpc/include/asm/syscalls.h
  26. +2 −4 arch/powerpc/include/uapi/asm/signal.h
  27. +1 −11 arch/s390/include/asm/signal.h
  28. +2 −4 arch/sparc/include/asm/signal.h
  29. +2 −0 arch/sparc/include/uapi/asm/signal.h
  30. +1 −1 arch/sparc/kernel/systbls.h
  31. +3 −12 arch/x86/include/asm/signal.h
  32. +2 −6 arch/x86/include/uapi/asm/signal.h
  33. +1 −10 arch/xtensa/include/asm/signal.h
  34. +11 −0 include/linux/sched.h
  35. +40 −0 include/linux/signal.h
  36. +1 −1 include/linux/syscalls.h
  37. +6 −4 include/uapi/asm-generic/signal.h
  38. +9 −0 kernel/signal.c
11 changes: 1 addition & 10 deletions arch/alpha/include/asm/signal.h
Original file line number Diff line number Diff line change
@@ -22,15 +22,6 @@ struct osf_sigaction {
int sa_flags;
};

struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
sigset_t sa_mask; /* mask last for extensibility */
};

struct k_sigaction {
struct sigaction sa;
__sigrestore_t ka_restorer;
};
#define __ARCH_HAS_KA_RESTORER
#include <asm/sigcontext.h>
#endif
11 changes: 1 addition & 10 deletions arch/arm/include/asm/signal.h
Original file line number Diff line number Diff line change
@@ -23,16 +23,7 @@ struct old_sigaction {
__sigrestore_t sa_restorer;
};

struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
__sigrestore_t sa_restorer;
sigset_t sa_mask; /* mask last for extensibility */
};

struct k_sigaction {
struct sigaction sa;
};
#define __ARCH_HAS_SA_RESTORER

#include <asm/sigcontext.h>
#endif
11 changes: 1 addition & 10 deletions arch/avr32/include/asm/signal.h
Original file line number Diff line number Diff line change
@@ -23,16 +23,7 @@ typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;

struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
__sigrestore_t sa_restorer;
sigset_t sa_mask; /* mask last for extensibility */
};

struct k_sigaction {
struct sigaction sa;
};
#define __ARCH_HAS_SA_RESTORER

#include <asm/sigcontext.h>
#undef __HAVE_ARCH_SIG_BITOPS
10 changes: 1 addition & 9 deletions arch/cris/include/asm/signal.h
Original file line number Diff line number Diff line change
@@ -23,16 +23,8 @@ struct old_sigaction {
void (*sa_restorer)(void);
};

struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
void (*sa_restorer)(void);
sigset_t sa_mask; /* mask last for extensibility */
};
#define __ARCH_HAS_SA_RESTORER

struct k_sigaction {
struct sigaction sa;
};
#include <asm/sigcontext.h>

#endif
11 changes: 1 addition & 10 deletions arch/h8300/include/asm/signal.h
Original file line number Diff line number Diff line change
@@ -23,16 +23,7 @@ struct old_sigaction {
void (*sa_restorer)(void);
};

struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
void (*sa_restorer)(void);
sigset_t sa_mask; /* mask last for extensibility */
};

struct k_sigaction {
struct sigaction sa;
};
#define __ARCH_HAS_SA_RESTORER

#include <asm/sigcontext.h>
#undef __HAVE_ARCH_SIG_BITOPS
10 changes: 0 additions & 10 deletions arch/ia64/include/asm/signal.h
Original file line number Diff line number Diff line change
@@ -26,16 +26,6 @@ typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;

struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
sigset_t sa_mask; /* mask last for extensibility */
};

struct k_sigaction {
struct sigaction sa;
};

# include <asm/sigcontext.h>

# endif /* !__ASSEMBLY__ */
1 change: 0 additions & 1 deletion arch/ia64/include/asm/unistd.h
Original file line number Diff line number Diff line change
@@ -47,7 +47,6 @@ asmlinkage unsigned long sys_mmap2(
int prot, int flags,
int fd, long pgoff);
struct pt_regs;
struct sigaction;
asmlinkage long sys_ia64_pipe(void);
asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
16 changes: 0 additions & 16 deletions arch/lm32/include/asm/gpio.h

This file was deleted.

13 changes: 6 additions & 7 deletions arch/lm32/include/asm/processor.h
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@
#include <asm/ptrace.h>
#include <asm/current.h>

struct task_struct;

/*
* User space process size: 3.75GB. This is hardcoded into a few places,
* so don't change it unless you know what you are doing.
@@ -57,20 +59,17 @@
struct thread_struct {};
#define INIT_THREAD {}

#define KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32)
#define task_pt_regs(tsk) ((struct pt_regs *)KSTK_TOS(tsk) - 1)
#define KSTK_EIP(tsk) 0
#define KSTK_ESP(tsk) 0
#define task_pt_regs(tsk) \
((struct pt_regs *)(task_stack_page(tsk) + THREAD_SIZE) - 1)

#define KSTK_EIP(tsk) (task_pt_regs(tsk)->ea)
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->sp)

/*
* Do necessary setup to start up a newly executed thread.
*/
extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp);

/* Forward declaration, a strange C thing */
struct task_struct;

static inline void release_thread(struct task_struct *dead_task) { }
static inline void exit_thread(void) { }

2 changes: 0 additions & 2 deletions arch/lm32/include/asm/prom.h
Original file line number Diff line number Diff line change
@@ -9,9 +9,7 @@
#ifndef __ASM_LM32_PROM_H
#define __ASM_LM32_PROM_H

#ifdef CONFIG_OF
void device_tree_init(void);
#endif /* CONFIG_OF */

#endif /* __ASM_LM32_PROM_H */

2 changes: 1 addition & 1 deletion arch/lm32/include/asm/ptrace.h
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@
typedef unsigned long lm32_reg_t;

struct pt_regs {
lm32_reg_t r0;
lm32_reg_t r1;
lm32_reg_t r2;
lm32_reg_t r3;
@@ -65,6 +64,7 @@ struct pt_regs {
lm32_reg_t ea;
lm32_reg_t ba;
unsigned int pt_mode;
lm32_reg_t orig_r1;
};

#ifdef __KERNEL__
8 changes: 2 additions & 6 deletions arch/lm32/include/asm/thread_info.h
Original file line number Diff line number Diff line change
@@ -109,23 +109,19 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
#define TIF_SIGPENDING 1 /* signal pending */
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
TIF_NEED_RESCHED */
#define TIF_MEMDIE 4
#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
#define TIF_NOTIFY_RESUME 6 /* callback before returning to user */
#define TIF_FREEZE 16 /* is freezing for suspend */

/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
#define _TIF_FREEZE (1<<TIF_FREEZE)

#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
#define _TIF_WORK_MASK \
(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NEED_RESCHED)

#endif /* __KERNEL__ */

8 changes: 0 additions & 8 deletions arch/lm32/include/asm/timex.h
Original file line number Diff line number Diff line change
@@ -24,14 +24,6 @@
#ifndef _ASM_TIMEX_H
#define _ASM_TIMEX_H

#ifdef __KERNEL__

/* cannot use value supplied by bootloader because this value is used in an #if */
/* 100 MHz works as default value, even for 75 MHz bitstreams */
#define CLOCK_TICK_RATE (100*1000*1000)

#endif /* __KERNEL__ */

typedef unsigned long cycles_t;
cycles_t get_cycles(void);

66 changes: 34 additions & 32 deletions arch/lm32/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
@@ -27,39 +27,41 @@ int main(void)
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));

DEFINE(PT_R0, offsetof(struct pt_regs, r0));
DEFINE(PT_R1, offsetof(struct pt_regs, r1));
DEFINE(PT_R2, offsetof(struct pt_regs, r2));
DEFINE(PT_R3, offsetof(struct pt_regs, r3));
DEFINE(PT_R4, offsetof(struct pt_regs, r4));
DEFINE(PT_R5, offsetof(struct pt_regs, r5));
DEFINE(PT_R6, offsetof(struct pt_regs, r6));
DEFINE(PT_R7, offsetof(struct pt_regs, r7));
DEFINE(PT_R8, offsetof(struct pt_regs, r8));
DEFINE(PT_R9, offsetof(struct pt_regs, r9));
DEFINE(PT_R10, offsetof(struct pt_regs, r10));
DEFINE(PT_R11, offsetof(struct pt_regs, r11));
DEFINE(PT_R12, offsetof(struct pt_regs, r12));
DEFINE(PT_R13, offsetof(struct pt_regs, r13));
DEFINE(PT_R14, offsetof(struct pt_regs, r14));
DEFINE(PT_R15, offsetof(struct pt_regs, r15));
DEFINE(PT_R16, offsetof(struct pt_regs, r16));
DEFINE(PT_R17, offsetof(struct pt_regs, r17));
DEFINE(PT_R18, offsetof(struct pt_regs, r18));
DEFINE(PT_R19, offsetof(struct pt_regs, r19));
DEFINE(PT_R20, offsetof(struct pt_regs, r20));
DEFINE(PT_R21, offsetof(struct pt_regs, r21));
DEFINE(PT_R22, offsetof(struct pt_regs, r22));
DEFINE(PT_R23, offsetof(struct pt_regs, r23));
DEFINE(PT_R24, offsetof(struct pt_regs, r24));
DEFINE(PT_R25, offsetof(struct pt_regs, r25));
DEFINE(PT_GP, offsetof(struct pt_regs, gp));
DEFINE(PT_FP, offsetof(struct pt_regs, fp));
DEFINE(PT_SP, offsetof(struct pt_regs, sp));
DEFINE(PT_RA, offsetof(struct pt_regs, ra));
DEFINE(PT_EA, offsetof(struct pt_regs, ea));
DEFINE(PT_BA, offsetof(struct pt_regs, ba));
/* These are used with sp as the base address, hence the 4 byte offset */
DEFINE(PT_R1, offsetof(struct pt_regs, r1) + 4);
DEFINE(PT_R2, offsetof(struct pt_regs, r2) + 4);
DEFINE(PT_R3, offsetof(struct pt_regs, r3) + 4);
DEFINE(PT_R4, offsetof(struct pt_regs, r4) + 4);
DEFINE(PT_R5, offsetof(struct pt_regs, r5) + 4);
DEFINE(PT_R6, offsetof(struct pt_regs, r6) + 4);
DEFINE(PT_R7, offsetof(struct pt_regs, r7) + 4);
DEFINE(PT_R8, offsetof(struct pt_regs, r8) + 4);
DEFINE(PT_R9, offsetof(struct pt_regs, r9) + 4);
DEFINE(PT_R10, offsetof(struct pt_regs, r10) + 4);
DEFINE(PT_R11, offsetof(struct pt_regs, r11) + 4);
DEFINE(PT_R12, offsetof(struct pt_regs, r12) + 4);
DEFINE(PT_R13, offsetof(struct pt_regs, r13) + 4);
DEFINE(PT_R14, offsetof(struct pt_regs, r14) + 4);
DEFINE(PT_R15, offsetof(struct pt_regs, r15) + 4);
DEFINE(PT_R16, offsetof(struct pt_regs, r16) + 4);
DEFINE(PT_R17, offsetof(struct pt_regs, r17) + 4);
DEFINE(PT_R18, offsetof(struct pt_regs, r18) + 4);
DEFINE(PT_R19, offsetof(struct pt_regs, r19) + 4);
DEFINE(PT_R20, offsetof(struct pt_regs, r20) + 4);
DEFINE(PT_R21, offsetof(struct pt_regs, r21) + 4);
DEFINE(PT_R22, offsetof(struct pt_regs, r22) + 4);
DEFINE(PT_R23, offsetof(struct pt_regs, r23) + 4);
DEFINE(PT_R24, offsetof(struct pt_regs, r24) + 4);
DEFINE(PT_R25, offsetof(struct pt_regs, r25) + 4);
DEFINE(PT_GP, offsetof(struct pt_regs, gp) + 4);
DEFINE(PT_FP, offsetof(struct pt_regs, fp) + 4);
DEFINE(PT_SP, offsetof(struct pt_regs, sp) + 4);
DEFINE(PT_RA, offsetof(struct pt_regs, ra) + 4);
DEFINE(PT_EA, offsetof(struct pt_regs, ea) + 4);
DEFINE(PT_BA, offsetof(struct pt_regs, ba) + 4);
DEFINE(PT_MODE, offsetof(struct pt_regs, pt_mode));
DEFINE(PT_ORIG_R1, offsetof(struct pt_regs, orig_r1));
DEFINE(PT_SIZE, sizeof(struct pt_regs));

DEFINE(TI_TASK, offsetof(struct thread_info, task));
DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
Loading