Commit 20f3a7cb authored by Hirokazu Takata's avatar Hirokazu Takata Committed by Linus Torvalds

[PATCH] m32r: architecture upgrade on 20040928

Miscellaneous upgrade for recent m32r kernel changes.

	* arch/m32r/kernel/entry.S:
	Add system calls; taken from asm-i386/unistd.h.
	- [PATCH][2/6] perfctr-2.7.3 for 2.6.7-rc1-mm1: i386  (05/31/2004)
	- [PATCH] Make key management use syscalls not prctls (09/06/2004)

	* arch/m32r/kernel/io_m32102.c: Remove.
	This file is no longer used. Please remove this file.

	* arch/m32r/kernel/irq.c: 
	- Fix the unnecessary entropy call in the irq handler.

	* arch/m32r/kernel/signal.c:
	- Merge common signal handling fault handling in generic code;
	  use force_sigsegv() instead of force_sig().

	* arch/m32r/kernel/smp.c:
	- Just add brackets.

	* include/asm-m32r/hardirq.h:
	- factor out common <asm/hardirq.h> code
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent af87f3ea
...@@ -992,6 +992,16 @@ ENTRY(sys_call_table) ...@@ -992,6 +992,16 @@ ENTRY(sys_call_table)
.long sys_mq_notify .long sys_mq_notify
.long sys_mq_getsetattr .long sys_mq_getsetattr
.long sys_ni_syscall /* reserved for kexec */ .long sys_ni_syscall /* reserved for kexec */
.long sys_waitid
.long sys_perfctr_info
.long sys_vperfctr_open
.long sys_vperfctr_control
.long sys_vperfctr_unlink
.long sys_vperfctr_iresume
.long sys_vperfctr_read /* 290 */
.long sys_add_key
.long sys_request_key
.long sys_keyctl
syscall_table_size=(.-sys_call_table) syscall_table_size=(.-sys_call_table)
...@@ -187,15 +187,17 @@ int handle_IRQ_event(unsigned int irq, ...@@ -187,15 +187,17 @@ int handle_IRQ_event(unsigned int irq,
struct pt_regs *regs, struct irqaction *action) struct pt_regs *regs, struct irqaction *action)
{ {
int status = 1; /* Force the "do bottom halves" bit */ int status = 1; /* Force the "do bottom halves" bit */
int retval = 0; int ret, retval = 0;
if (!(action->flags & SA_INTERRUPT)) if (!(action->flags & SA_INTERRUPT))
local_irq_enable(); local_irq_enable();
do { do {
ret = action->handler(irq, action->dev_id, regs);
if (ret == IRQ_HANDLED)
status |= action->flags; status |= action->flags;
retval |= action->handler(irq, action->dev_id, regs);
action = action->next; action = action->next;
retval |= ret;
} while (action); } while (action);
if (status & SA_SAMPLE_RANDOM) if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq); add_interrupt_randomness(irq);
......
...@@ -404,9 +404,7 @@ static void setup_frame(int sig, struct k_sigaction *ka, ...@@ -404,9 +404,7 @@ static void setup_frame(int sig, struct k_sigaction *ka,
return; return;
give_sigsegv: give_sigsegv:
if (sig == SIGSEGV) force_sigsegv(sig, current);
ka->sa.sa_handler = SIG_DFL;
force_sig(SIGSEGV, current);
} }
static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
...@@ -482,9 +480,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -482,9 +480,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
return; return;
give_sigsegv: give_sigsegv:
if (sig == SIGSEGV) force_sigsegv(sig, current);
ka->sa.sa_handler = SIG_DFL;
force_sig(SIGSEGV, current);
} }
/* /*
...@@ -528,9 +524,6 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -528,9 +524,6 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
else else
setup_frame(sig, ka, oldset, regs); setup_frame(sig, ka, oldset, regs);
if (ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NODEFER)) { if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(&current->sighand->siglock); spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
......
...@@ -441,9 +441,10 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, ...@@ -441,9 +441,10 @@ static void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
*/ */
send_IPI_mask(cpumask, INVALIDATE_TLB_IPI, 0); send_IPI_mask(cpumask, INVALIDATE_TLB_IPI, 0);
while (!cpus_empty(flush_cpumask)) while (!cpus_empty(flush_cpumask)) {
/* nothing. lockup detection does not belong here */ /* nothing. lockup detection does not belong here */
mb(); mb();
}
flush_mm = NULL; flush_mm = NULL;
flush_vma = NULL; flush_vma = NULL;
......
...@@ -30,7 +30,12 @@ typedef struct { ...@@ -30,7 +30,12 @@ typedef struct {
#define PREEMPT_BITS 8 #define PREEMPT_BITS 8
#define SOFTIRQ_BITS 8 #define SOFTIRQ_BITS 8
#if NR_IRQS > 256
#define HARDIRQ_BITS 9
#else
#define HARDIRQ_BITS 8 #define HARDIRQ_BITS 8
#endif
#define PREEMPT_SHIFT 0 #define PREEMPT_SHIFT 0
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
...@@ -45,29 +50,10 @@ typedef struct { ...@@ -45,29 +50,10 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#define nmi_enter() (irq_enter()) #define nmi_enter() (irq_enter())
#define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET) #define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -76,10 +62,4 @@ do { \ ...@@ -76,10 +62,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment