diff options
Diffstat (limited to 'arch/h8300/kernel')
| -rw-r--r-- | arch/h8300/kernel/setup.c | 23 | ||||
| -rw-r--r-- | arch/h8300/kernel/signal.c | 32 | ||||
| -rw-r--r-- | arch/h8300/kernel/time.c | 1 | 
3 files changed, 18 insertions, 38 deletions
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c index 68d651081bd..d0b1607f271 100644 --- a/arch/h8300/kernel/setup.c +++ b/arch/h8300/kernel/setup.c @@ -35,6 +35,7 @@  #include <asm/setup.h>  #include <asm/irq.h>  #include <asm/pgtable.h> +#include <asm/sections.h>  #if defined(__H8300H__)  #define CPU "H8/300H" @@ -54,7 +55,6 @@ unsigned long memory_end;  char __initdata command_line[COMMAND_LINE_SIZE]; -extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;  extern int _ramstart, _ramend;  extern char _target_name[];  extern void h8300_gpio_init(void); @@ -119,9 +119,9 @@ void __init setup_arch(char **cmdline_p)  	    memory_end = CONFIG_BLKDEV_RESERVE_ADDRESS;   #endif -	init_mm.start_code = (unsigned long) &_stext; -	init_mm.end_code = (unsigned long) &_etext; -	init_mm.end_data = (unsigned long) &_edata; +	init_mm.start_code = (unsigned long) _stext; +	init_mm.end_code = (unsigned long) _etext; +	init_mm.end_data = (unsigned long) _edata;  	init_mm.brk = (unsigned long) 0;   #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) && defined(CONFIG_GDB_MAGICPRINT) @@ -134,15 +134,12 @@ void __init setup_arch(char **cmdline_p)  	printk(KERN_INFO "H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n");  #ifdef DEBUG -	printk(KERN_DEBUG "KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x " -		"BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext, -		(int) &_sdata, (int) &_edata, -		(int) &_sbss, (int) &_ebss); -	printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x " -		"STACK=0x%06x-0x%06x\n", -	       (int) &_ebss, (int) memory_start, -		(int) memory_start, (int) memory_end, -		(int) memory_end, (int) &_ramend); +	printk(KERN_DEBUG "KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p " +		"BSS=0x%p-0x%p\n", _stext, _etext, _sdata, _edata, __bss_start, +		__bss_stop); +	printk(KERN_DEBUG "KERNEL -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx " +		"STACK=0x%06lx-0x%p\n", __bss_stop, memory_start, memory_start, +		memory_end, memory_end, &_ramend);  #endif  #ifdef CONFIG_DEFAULT_CMDLINE diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index d4b0555d290..5adaadaf921 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c @@ -47,8 +47,6 @@  #include <asm/traps.h>  #include <asm/ucontext.h> -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) -  /*   * Atomically swap in the new signal mask, and wait for a signal.   */ @@ -186,7 +184,6 @@ asmlinkage int do_sigreturn(unsigned long __unused,...)  			      sizeof(frame->extramask))))  		goto badframe; -	sigdelsetmask(&set, ~_BLOCKABLE);  	set_current_blocked(&set);  	if (restore_sigcontext(regs, &frame->sc, &er0)) @@ -211,7 +208,6 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused,...)  	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))  		goto badframe; -	sigdelsetmask(&set, ~_BLOCKABLE);  	set_current_blocked(&set);  	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &er0)) @@ -412,8 +408,9 @@ give_sigsegv:   */  static void  handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, -	      sigset_t *oldset,	struct pt_regs * regs) +	      struct pt_regs * regs)  { +	sigset_t *oldset = sigmask_to_save();  	int ret;  	/* are we from a system call? */  	if (regs->orig_er0 >= 0) { @@ -441,10 +438,8 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,  	else  		ret = setup_frame(sig, ka, oldset, regs); -	if (!ret) { -		block_sigmask(ka, sig); -		clear_thread_flag(TIF_RESTORE_SIGMASK); -	} +	if (!ret) +		signal_delivered(sig, info, ka, regs, 0);  }  /* @@ -452,12 +447,11 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,   * want to handle. Thus you cannot kill init even with a SIGKILL even by   * mistake.   */ -statis void do_signal(struct pt_regs *regs) +static void do_signal(struct pt_regs *regs)  {  	siginfo_t info;  	int signr;  	struct k_sigaction ka; -	sigset_t *oldset;  	/*  	 * We want the common case to go fast, which @@ -468,23 +462,14 @@ statis void do_signal(struct pt_regs *regs)  	if ((regs->ccr & 0x10))  		return; -	if (try_to_freeze()) -		goto no_signal; -  	current->thread.esp0 = (unsigned long) regs; -	if (test_thread_flag(TIF_RESTORE_SIGMASK)) -		oldset = ¤t->saved_sigmask; -	else -		oldset = ¤t->blocked; -  	signr = get_signal_to_deliver(&info, &ka, regs, NULL);  	if (signr > 0) {  		/* Whee!  Actually deliver the signal.  */ -		handle_signal(signr, &info, &ka, oldset, regs); +		handle_signal(signr, &info, &ka, regs);  		return;  	} - no_signal:  	/* Did we come from a system call? */  	if (regs->orig_er0 >= 0) {  		/* Restart the system call - no handlers present */ @@ -501,8 +486,7 @@ statis void do_signal(struct pt_regs *regs)  	}  	/* If there's no signal to deliver, we just restore the saved mask.  */ -	if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK)) -		set_current_blocked(¤t->saved_sigmask); +	restore_saved_sigmask();  }  asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags) @@ -513,7 +497,5 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags)  	if (thread_info_flags & _TIF_NOTIFY_RESUME) {  		clear_thread_flag(TIF_NOTIFY_RESUME);  		tracehook_notify_resume(regs); -		if (current->replacement_session_keyring) -			key_replace_session_keyring();  	}  } diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 32263a138aa..e0f74191d55 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c @@ -27,6 +27,7 @@  #include <linux/profile.h>  #include <asm/io.h> +#include <asm/irq_regs.h>  #include <asm/timer.h>  #define	TICK_SIZE (tick_nsec / 1000)  |