diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2011-01-04 01:41:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-04 11:16:36 -0800 |
commit | e2305e37d4c82ef55be54e9edc8a7e2250739b4f (patch) | |
tree | e3db48384802210c241ea3450841a78b82620afd /arch/sparc/include/asm/leon.h | |
parent | 53aea7caf2e27108912b9b9dbc5bfe18dbbaec9d (diff) | |
download | blackbird-op-linux-e2305e37d4c82ef55be54e9edc8a7e2250739b4f.tar.gz blackbird-op-linux-e2305e37d4c82ef55be54e9edc8a7e2250739b4f.zip |
SPARC/LEON: added support for IRQAMP IRQ Controller
Needed for LEON AMP systems where different CPUs are routed to
different IRQ controllers. This patch selects the IRQ Controller
which has been routed to the boot CPU, it is up to the boot loader
to configure the IRQ controller.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/leon.h')
-rw-r--r-- | arch/sparc/include/asm/leon.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h index 3ea5964c43b4..8580d1764f90 100644 --- a/arch/sparc/include/asm/leon.h +++ b/arch/sparc/include/asm/leon.h @@ -224,6 +224,18 @@ static inline void sparc_leon3_disable_cache(void) "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); }; +static inline unsigned long sparc_leon3_asr17(void) +{ + u32 asr17; + __asm__ __volatile__ ("rd %%asr17, %0\n\t" : "=r"(asr17)); + return asr17; +}; + +static inline int sparc_leon3_cpuid(void) +{ + return sparc_leon3_asr17() >> 28; +} + #endif /*!__ASSEMBLY__*/ #ifdef CONFIG_SMP |