-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paul Mundt
committed
Oct 17, 2009
1 parent
5366228
commit 7c0529f
Showing
9 changed files
with
169 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: cae19b5902d52ff059f5df98ea993a00e5686af1 | ||
refs/heads/master: 03fdb708926d5df2d9b9e62222c1666e20caa9e3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,9 @@ | ||
#ifndef __ASM_SH_IRQFLAGS_H | ||
#define __ASM_SH_IRQFLAGS_H | ||
|
||
#ifdef CONFIG_SUPERH32 | ||
#include "irqflags_32.h" | ||
#else | ||
#include "irqflags_64.h" | ||
#endif | ||
#define RAW_IRQ_DISABLED 0xf0 | ||
#define RAW_IRQ_ENABLED 0x00 | ||
|
||
#define raw_local_save_flags(flags) \ | ||
do { (flags) = __raw_local_save_flags(); } while (0) | ||
|
||
static inline int raw_irqs_disabled_flags(unsigned long flags) | ||
{ | ||
return (flags != 0); | ||
} | ||
|
||
static inline int raw_irqs_disabled(void) | ||
{ | ||
unsigned long flags = __raw_local_save_flags(); | ||
|
||
return raw_irqs_disabled_flags(flags); | ||
} | ||
|
||
#define raw_local_irq_save(flags) \ | ||
do { (flags) = __raw_local_irq_save(); } while (0) | ||
|
||
static inline void raw_local_irq_restore(unsigned long flags) | ||
{ | ||
if ((flags & 0xf0) != 0xf0) | ||
raw_local_irq_enable(); | ||
} | ||
#include <asm-generic/irqflags.h> | ||
|
||
#endif /* __ASM_SH_IRQFLAGS_H */ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* SHcompact irqflags support | ||
* | ||
* Copyright (C) 2006 - 2009 Paul Mundt | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
*/ | ||
#include <linux/irqflags.h> | ||
#include <linux/module.h> | ||
|
||
void raw_local_irq_restore(unsigned long flags) | ||
{ | ||
unsigned long __dummy0, __dummy1; | ||
|
||
if (flags == RAW_IRQ_DISABLED) { | ||
__asm__ __volatile__ ( | ||
"stc sr, %0\n\t" | ||
"or #0xf0, %0\n\t" | ||
"ldc %0, sr\n\t" | ||
: "=&z" (__dummy0) | ||
: /* no inputs */ | ||
: "memory" | ||
); | ||
} else { | ||
__asm__ __volatile__ ( | ||
"stc sr, %0\n\t" | ||
"and %1, %0\n\t" | ||
#ifdef CONFIG_CPU_HAS_SR_RB | ||
"stc r6_bank, %1\n\t" | ||
"or %1, %0\n\t" | ||
#endif | ||
"ldc %0, sr\n\t" | ||
: "=&r" (__dummy0), "=r" (__dummy1) | ||
: "1" (~RAW_IRQ_DISABLED) | ||
: "memory" | ||
); | ||
} | ||
} | ||
EXPORT_SYMBOL(raw_local_irq_restore); | ||
|
||
unsigned long __raw_local_save_flags(void) | ||
{ | ||
unsigned long flags; | ||
|
||
__asm__ __volatile__ ( | ||
"stc sr, %0\n\t" | ||
"and #0xf0, %0\n\t" | ||
: "=&z" (flags) | ||
: /* no inputs */ | ||
: "memory" | ||
); | ||
|
||
return flags; | ||
} | ||
EXPORT_SYMBOL(__raw_local_save_flags); |
Oops, something went wrong.