sh: Conditionalize gUSA support.

This conditionalizes gUSA support. gUSA is not supported on
SMP configurations, and it's not necessary there anyways due
to having other atomicity options (ie, movli.l/movco.l).

Anything implementing the LL/SC semantics (all SH-4A CPUs)
can switch to userspace atomicity implementations without
requiring gUSA. This is left default-enabled on all UP so
that glibc doesn't break.

Those that know what they are doing can disable this explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Šī revīzija ir iekļauta:
Paul Mundt
2007-09-28 16:04:49 +09:00
vecāks 995bb781d4
revīzija 836624619b
4 mainīti faili ar 18 papildinājumiem un 2 dzēšanām

Parādīt failu

@@ -176,7 +176,7 @@ work_notifysig:
jmp @r1
lds r0, pr
work_resched:
#ifndef CONFIG_PREEMPT
#if defined(CONFIG_GUSA) && !defined(CONFIG_PREEMPT)
! gUSA handling
mov.l @(OFF_SP,r15), r0 ! get user space stack pointer
mov r0, r1

Parādīt failu

@@ -350,7 +350,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
unlazy_fpu(prev, task_pt_regs(prev));
#endif
#ifdef CONFIG_PREEMPT
#if defined(CONFIG_GUSA) && defined(CONFIG_PREEMPT)
{
struct pt_regs *regs;

Parādīt failu

@@ -507,6 +507,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
ctrl_inw(regs->pc - 4));
break;
}
#ifdef CONFIG_GUSA
} else {
/* gUSA handling */
preempt_disable();
@@ -523,6 +524,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
}
preempt_enable_no_resched();
#endif
}
/* Set up the stack frame */