From 18a1f5a9f9970bf6ea23139a9f9118e6b2d0d262 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 1 Nov 2002 21:55:52 +0000 Subject: 2002-11-01 Joel Sherrill * cpu.c: Currently only the mpc8260 BSP supports interrupt nesting. NOTE: These needs to be generalized as the patch is applied to other BSPs. --- .../lib/libbsp/powerpc/support/new_exception_processing/ChangeLog | 6 ++++++ c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c | 8 ++++++++ c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog | 6 ++++++ c/src/lib/libcpu/powerpc/new-exceptions/cpu.c | 8 ++++++++ 4 files changed, 28 insertions(+) diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/ChangeLog b/c/src/lib/libbsp/powerpc/support/new_exception_processing/ChangeLog index 3cd28ea5af..fedc3b9b4a 100644 --- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/ChangeLog +++ b/c/src/lib/libbsp/powerpc/support/new_exception_processing/ChangeLog @@ -1,3 +1,9 @@ +2002-11-01 Joel Sherrill + + * cpu.c: Currently only the mpc8260 BSP supports interrupt nesting. + NOTE: These needs to be generalized as the patch is applied to other + BSPs. + 2002-10-21 Ralf Corsepius * .cvsignore: Reformat. diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c index 01c5a31e37..32589213ae 100644 --- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c +++ b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c @@ -130,11 +130,19 @@ void _CPU_Install_interrupt_stack( void ) boolean _ISR_Is_in_progress( void ) { + /* + * Until the patch on PR288 is in all new exception BSPs, this is + * the safest thing to do. + */ +#ifdef mpc8260 + return (_ISR_Nest_level != 0); +#else register unsigned int isr_nesting_level; /* * Move from special purpose register 0 (mfspr SPRG0, r3) */ asm volatile ("mfspr %0, 272" : "=r" (isr_nesting_level)); return isr_nesting_level; +#endif } diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog b/c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog index 3cd28ea5af..fedc3b9b4a 100644 --- a/c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog +++ b/c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog @@ -1,3 +1,9 @@ +2002-11-01 Joel Sherrill + + * cpu.c: Currently only the mpc8260 BSP supports interrupt nesting. + NOTE: These needs to be generalized as the patch is applied to other + BSPs. + 2002-10-21 Ralf Corsepius * .cvsignore: Reformat. diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c b/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c index 01c5a31e37..32589213ae 100644 --- a/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c +++ b/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c @@ -130,11 +130,19 @@ void _CPU_Install_interrupt_stack( void ) boolean _ISR_Is_in_progress( void ) { + /* + * Until the patch on PR288 is in all new exception BSPs, this is + * the safest thing to do. + */ +#ifdef mpc8260 + return (_ISR_Nest_level != 0); +#else register unsigned int isr_nesting_level; /* * Move from special purpose register 0 (mfspr SPRG0, r3) */ asm volatile ("mfspr %0, 272" : "=r" (isr_nesting_level)); return isr_nesting_level; +#endif } -- cgit v1.2.3