mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
sh: Cleanup and document register bank usage.
Initial register bank cleanup. Make SR.RB configurable, and add some preliminary documentation on register bank usage within the kernel. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
5283ecb5cc
commit
f151749440
3 changed files with 64 additions and 3 deletions
|
@ -136,7 +136,8 @@ extern void __xchg_called_with_bad_pointer(void);
|
|||
#define set_mb(var, value) do { xchg(&var, value); } while (0)
|
||||
|
||||
/* Interrupt Control */
|
||||
static __inline__ void local_irq_enable(void)
|
||||
#ifdef CONFIG_CPU_HAS_SR_RB
|
||||
static inline void local_irq_enable(void)
|
||||
{
|
||||
unsigned long __dummy0, __dummy1;
|
||||
|
||||
|
@ -149,6 +150,20 @@ static __inline__ void local_irq_enable(void)
|
|||
: "1" (~0x000000f0)
|
||||
: "memory");
|
||||
}
|
||||
#else
|
||||
static inline void local_irq_enable(void)
|
||||
{
|
||||
unsigned long __dummy0, __dummy1;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"stc sr, %0\n\t"
|
||||
"and %1, %0\n\t"
|
||||
"ldc %0, sr\n\t"
|
||||
: "=&r" (__dummy0), "=r" (__dummy1)
|
||||
: "1" (~0x000000f0)
|
||||
: "memory");
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline__ void local_irq_disable(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue