Rename irqsave() and irqrestore() to up_irq_save() and up_irq_restore()
This commit is contained in:
parent
2cd8d279d2
commit
83bc1c97c3
@ -719,7 +719,7 @@ config ARCH_INT_DISABLEALL
|
|||||||
back into the game" via a PendSV interrupt).
|
back into the game" via a PendSV interrupt).
|
||||||
|
|
||||||
In the normal course of things, interrupts must occasionally be
|
In the normal course of things, interrupts must occasionally be
|
||||||
disabled using the irqsave() inline function to prevent contention
|
disabled using the up_irq_save() inline function to prevent contention
|
||||||
in use of resources that may be shared between interrupt level and
|
in use of resources that may be shared between interrupt level and
|
||||||
non-interrupt level logic. Now the question arises, if
|
non-interrupt level logic. Now the question arises, if
|
||||||
ARCH_HIPRI_INTERRUPT, do we disable all interrupts (except SVCall),
|
ARCH_HIPRI_INTERRUPT, do we disable all interrupts (except SVCall),
|
||||||
|
@ -107,10 +107,17 @@ include/irq.h
|
|||||||
- struct xcptcontext. This structures represents the saved context
|
- struct xcptcontext. This structures represents the saved context
|
||||||
of a thread.
|
of a thread.
|
||||||
|
|
||||||
- irqstate_t irqsave(void) -- Used to disable all interrupts.
|
- irqstate_t up_irq_save(void) -- Used to disable all interrupts.
|
||||||
|
|
||||||
- void irqrestore(irqstate_t flags) -- Used to restore interrupt
|
- void upirq_restore(irqstate_t flags) -- Used to restore interrupt
|
||||||
enables to the same state as before irqsave was called.
|
enables to the same state as before up_irq_save was called.
|
||||||
|
|
||||||
|
NOTE: These interfaces are not available to application code but can
|
||||||
|
only be used withint the operating system code. And, in general,
|
||||||
|
these functions should *never* be called directly, not unless you
|
||||||
|
know absolutely well what you are doing. Rather you shoudl typically
|
||||||
|
use the wrapper functions enter_critical_section() and leave_critical_section()
|
||||||
|
as prototyped in include/nuttx/irq.h.
|
||||||
|
|
||||||
This file must also define NR_IRQS, the total number of IRQs supported
|
This file must also define NR_IRQS, the total number of IRQs supported
|
||||||
by the board.
|
by the board.
|
||||||
|
@ -175,9 +175,18 @@ struct xcptcontext
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/* Save the current interrupt enable state & disable IRQs */
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
/* Save the current interrupt enable state & disable IRQs. */
|
||||||
|
|
||||||
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
unsigned int temp;
|
unsigned int temp;
|
||||||
@ -194,7 +203,7 @@ static inline irqstate_t irqsave(void)
|
|||||||
|
|
||||||
/* Restore saved IRQ & FIQ state */
|
/* Restore saved IRQ & FIQ state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
|
@ -213,6 +213,15 @@ struct xcptcontext
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Get/set the PRIMASK register */
|
/* Get/set the PRIMASK register */
|
||||||
|
|
||||||
static inline uint8_t getprimask(void) inline_function;
|
static inline uint8_t getprimask(void) inline_function;
|
||||||
@ -250,8 +259,8 @@ static inline void irqdisable(void)
|
|||||||
|
|
||||||
/* Save the current primask state & disable IRQs */
|
/* Save the current primask state & disable IRQs */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void) inline_function;
|
static inline irqstate_t up_irq_save(void) inline_function;
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
unsigned short primask;
|
unsigned short primask;
|
||||||
|
|
||||||
@ -280,8 +289,8 @@ static inline void irqenable(void)
|
|||||||
|
|
||||||
/* Restore saved primask state */
|
/* Restore saved primask state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags) inline_function;
|
static inline void up_irq_restore(irqstate_t flags) inline_function;
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
/* If bit 0 of the primask is 0, then we need to restore
|
/* If bit 0 of the primask is 0, then we need to restore
|
||||||
* interrupts.
|
* interrupts.
|
||||||
|
@ -312,6 +312,15 @@ struct xcptcontext
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Return the current IRQ state */
|
/* Return the current IRQ state */
|
||||||
|
|
||||||
static inline irqstate_t irqstate(void)
|
static inline irqstate_t irqstate(void)
|
||||||
@ -331,7 +340,7 @@ static inline irqstate_t irqstate(void)
|
|||||||
|
|
||||||
/* Disable IRQs and return the previous IRQ state */
|
/* Disable IRQs and return the previous IRQ state */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
unsigned int cpsr;
|
unsigned int cpsr;
|
||||||
|
|
||||||
@ -373,7 +382,7 @@ static inline irqstate_t irqenable(void)
|
|||||||
|
|
||||||
/* Restore saved IRQ & FIQ state */
|
/* Restore saved IRQ & FIQ state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
|
@ -176,6 +176,15 @@ struct xcptcontext
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Get/set the PRIMASK register */
|
/* Get/set the PRIMASK register */
|
||||||
|
|
||||||
static inline uint8_t getprimask(void) inline_function;
|
static inline uint8_t getprimask(void) inline_function;
|
||||||
@ -249,8 +258,8 @@ static inline void irqdisable(void)
|
|||||||
|
|
||||||
/* Save the current primask state & disable IRQs */
|
/* Save the current primask state & disable IRQs */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void) inline_function;
|
static inline irqstate_t up_irq_save(void) inline_function;
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
||||||
|
|
||||||
@ -289,8 +298,8 @@ static inline void irqenable(void)
|
|||||||
|
|
||||||
/* Restore saved primask state */
|
/* Restore saved primask state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags) inline_function;
|
static inline void up_irq_restore(irqstate_t flags) inline_function;
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
||||||
setbasepri((uint32_t)flags);
|
setbasepri((uint32_t)flags);
|
||||||
|
@ -312,6 +312,15 @@ struct xcptcontext
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Return the current IRQ state */
|
/* Return the current IRQ state */
|
||||||
|
|
||||||
static inline irqstate_t irqstate(void)
|
static inline irqstate_t irqstate(void)
|
||||||
@ -331,7 +340,7 @@ static inline irqstate_t irqstate(void)
|
|||||||
|
|
||||||
/* Disable IRQs and return the previous IRQ state */
|
/* Disable IRQs and return the previous IRQ state */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
unsigned int cpsr;
|
unsigned int cpsr;
|
||||||
|
|
||||||
@ -373,7 +382,7 @@ static inline irqstate_t irqenable(void)
|
|||||||
|
|
||||||
/* Restore saved IRQ & FIQ state */
|
/* Restore saved IRQ & FIQ state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include <arch/chip/irq.h>
|
#include <arch/chip/irq.h>
|
||||||
|
|
||||||
/* Include ARM architecture-specific IRQ definitions (including register
|
/* Include ARM architecture-specific IRQ definitions (including register
|
||||||
* save structure and irqsave()/irqrestore() macros)
|
* save structure and up_irq_save()/up_irq_restore() functions)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_CORTEXA5) || defined(CONFIG_ARCH_CORTEXA8)
|
#if defined(CONFIG_ARCH_CORTEXA5) || defined(CONFIG_ARCH_CORTEXA8)
|
||||||
|
@ -1021,7 +1021,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -389,7 +389,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -678,7 +678,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -901,7 +901,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -413,7 +413,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -2372,7 +2372,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -164,7 +164,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -343,7 +343,7 @@
|
|||||||
* into the game" via a PendSV interrupt).
|
* into the game" via a PendSV interrupt).
|
||||||
*
|
*
|
||||||
* In the normal course of things, interrupts must occasionally be disabled
|
* In the normal course of things, interrupts must occasionally be disabled
|
||||||
* using the irqsave() inline function to prevent contention in use of
|
* using the up_irq_save() inline function to prevent contention in use of
|
||||||
* resources that may be shared between interrupt level and non-interrupt
|
* resources that may be shared between interrupt level and non-interrupt
|
||||||
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
* level logic. Now the question arises, if CONFIG_ARCH_HIPRI_INTERRUPT,
|
||||||
* do we disable all interrupts (except SVCall), or do we only disable the
|
* do we disable all interrupts (except SVCall), or do we only disable the
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/include/types.h
|
* arch/arm/include/types.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -83,7 +83,7 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef signed int _intptr_t;
|
typedef signed int _intptr_t;
|
||||||
typedef unsigned int _uintptr_t;
|
typedef unsigned int _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by irqsave(). For
|
/* This is the size of the interrupt state save returned by up_irq_save(). For
|
||||||
* ARM, a 32 register value is returned, for the thumb2, Cortex-M3, the 16-bit
|
* ARM, a 32 register value is returned, for the thumb2, Cortex-M3, the 16-bit
|
||||||
* primask register value is returned,
|
* primask register value is returned,
|
||||||
*/
|
*/
|
||||||
|
@ -312,7 +312,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || this_task()->pid == 0)
|
if (current_regs || this_task()->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -115,7 +115,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state */
|
/* Then restore the task interrupt state */
|
||||||
|
|
||||||
irqrestore(regs[REG_CPSR]);
|
up_irq_restore(regs[REG_CPSR]);
|
||||||
|
|
||||||
/* Deliver the signals */
|
/* Deliver the signals */
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
@ -367,7 +367,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || this_task()->pid == 0)
|
if (current_regs || this_task()->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -148,7 +148,7 @@ int up_hardfault(int irq, FAR void *context)
|
|||||||
current_regs[REG_XPSR], current_regs[REG_PRIMASK]);
|
current_regs[REG_XPSR], current_regs[REG_PRIMASK]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
lldbg("PANIC!!! Hard fault\n");
|
lldbg("PANIC!!! Hard fault\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return OK; /* Won't get here */
|
return OK; /* Won't get here */
|
||||||
|
@ -124,7 +124,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state */
|
/* Then restore the task interrupt state */
|
||||||
|
|
||||||
irqrestore((uint8_t)regs[REG_PRIMASK]);
|
up_irq_restore((uint8_t)regs[REG_PRIMASK]);
|
||||||
|
|
||||||
/* Deliver the signal */
|
/* Deliver the signal */
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of
|
||||||
|
@ -363,7 +363,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || this_task()->pid == 0)
|
if (current_regs || this_task()->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -103,7 +103,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state */
|
/* Then restore the task interrupt state */
|
||||||
|
|
||||||
irqrestore(regs[REG_CPSR]);
|
up_irq_restore(regs[REG_CPSR]);
|
||||||
|
|
||||||
/* Deliver the signals */
|
/* Deliver the signals */
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
@ -376,7 +376,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || (this_task())->pid == 0)
|
if (current_regs || (this_task())->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -178,7 +178,7 @@ int up_hardfault(int irq, FAR void *context)
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
lldbg("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
|
lldbg("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return OK;
|
return OK;
|
||||||
|
@ -91,7 +91,7 @@ int up_memfault(int irq, FAR void *context)
|
|||||||
{
|
{
|
||||||
/* Dump some memory management fault info */
|
/* Dump some memory management fault info */
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
lldbg("PANIC!!! Memory Management Fault:\n");
|
lldbg("PANIC!!! Memory Management Fault:\n");
|
||||||
mfdbg(" IRQ: %d context: %p\n", irq, regs);
|
mfdbg(" IRQ: %d context: %p\n", irq, regs);
|
||||||
lldbg(" CFAULTS: %08x MMFAR: %08x\n",
|
lldbg(" CFAULTS: %08x MMFAR: %08x\n",
|
||||||
|
@ -124,9 +124,9 @@ void up_sigdeliver(void)
|
|||||||
/* Then restore the task interrupt state */
|
/* Then restore the task interrupt state */
|
||||||
|
|
||||||
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
||||||
irqrestore((uint8_t)regs[REG_BASEPRI]);
|
up_irq_restore((uint8_t)regs[REG_BASEPRI]);
|
||||||
#else
|
#else
|
||||||
irqrestore((uint16_t)regs[REG_PRIMASK]);
|
up_irq_restore((uint16_t)regs[REG_PRIMASK]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Deliver the signal */
|
/* Deliver the signal */
|
||||||
@ -139,7 +139,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of
|
||||||
|
@ -363,7 +363,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || (this_task())->pid == 0)
|
if (current_regs || (this_task())->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -103,7 +103,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state */
|
/* Then restore the task interrupt state */
|
||||||
|
|
||||||
irqrestore(regs[REG_CPSR]);
|
up_irq_restore(regs[REG_CPSR]);
|
||||||
|
|
||||||
/* Deliver the signals */
|
/* Deliver the signals */
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
@ -179,7 +179,7 @@ void up_irqinitialize(void)
|
|||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ void up_irqinitialize(void)
|
|||||||
/* Enable interrupts globally to the ARM core */
|
/* Enable interrupts globally to the ARM core */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ void _exit(int status)
|
|||||||
* task is started.
|
* task is started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
|
|
||||||
slldbg("TCB=%p exiting\n", this_task());
|
slldbg("TCB=%p exiting\n", this_task());
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ void up_irqinitialize(void)
|
|||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ static void efm32_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int efm32_nmi(int irq, FAR void *context)
|
static int efm32_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -173,7 +173,7 @@ static int efm32_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int efm32_busfault(int irq, FAR void *context)
|
static int efm32_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -181,7 +181,7 @@ static int efm32_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int efm32_usagefault(int irq, FAR void *context)
|
static int efm32_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -189,7 +189,7 @@ static int efm32_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int efm32_pendsv(int irq, FAR void *context)
|
static int efm32_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -197,7 +197,7 @@ static int efm32_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int efm32_dbgmonitor(int irq, FAR void *context)
|
static int efm32_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -205,7 +205,7 @@ static int efm32_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int efm32_reserved(int irq, FAR void *context)
|
static int efm32_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -100,7 +100,7 @@ void up_irqinitialize(void)
|
|||||||
|
|
||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts */
|
||||||
|
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ static void kinetis_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int kinetis_nmi(int irq, FAR void *context)
|
static int kinetis_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -177,7 +177,7 @@ static int kinetis_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int kinetis_busfault(int irq, FAR void *context)
|
static int kinetis_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault recived\n");
|
dbg("PANIC!!! Bus fault recived\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -185,7 +185,7 @@ static int kinetis_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int kinetis_usagefault(int irq, FAR void *context)
|
static int kinetis_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received\n");
|
dbg("PANIC!!! Usage fault received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -193,7 +193,7 @@ static int kinetis_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int kinetis_pendsv(int irq, FAR void *context)
|
static int kinetis_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -201,7 +201,7 @@ static int kinetis_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int kinetis_dbgmonitor(int irq, FAR void *context)
|
static int kinetis_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -209,7 +209,7 @@ static int kinetis_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int kinetis_reserved(int irq, FAR void *context)
|
static int kinetis_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -134,7 +134,7 @@ static void kl_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int kl_nmi(int irq, FAR void *context)
|
static int kl_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -142,7 +142,7 @@ static int kl_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int kl_pendsv(int irq, FAR void *context)
|
static int kl_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -150,7 +150,7 @@ static int kl_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int kl_reserved(int irq, FAR void *context)
|
static int kl_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -130,7 +130,7 @@ static void lpc11_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int lpc11_nmi(int irq, FAR void *context)
|
static int lpc11_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -138,7 +138,7 @@ static int lpc11_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc11_pendsv(int irq, FAR void *context)
|
static int lpc11_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -146,7 +146,7 @@ static int lpc11_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc11_reserved(int irq, FAR void *context)
|
static int lpc11_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -147,7 +147,7 @@ static void lpc17_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int lpc17_nmi(int irq, FAR void *context)
|
static int lpc17_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -155,7 +155,7 @@ static int lpc17_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc17_busfault(int irq, FAR void *context)
|
static int lpc17_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault recived\n");
|
dbg("PANIC!!! Bus fault recived\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -163,7 +163,7 @@ static int lpc17_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc17_usagefault(int irq, FAR void *context)
|
static int lpc17_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received\n");
|
dbg("PANIC!!! Usage fault received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -171,7 +171,7 @@ static int lpc17_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc17_pendsv(int irq, FAR void *context)
|
static int lpc17_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -179,7 +179,7 @@ static int lpc17_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc17_dbgmonitor(int irq, FAR void *context)
|
static int lpc17_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -187,7 +187,7 @@ static int lpc17_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc17_reserved(int irq, FAR void *context)
|
static int lpc17_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -111,7 +111,7 @@ void up_irqinitialize(void)
|
|||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ void up_irqinitialize(void)
|
|||||||
/* Enable global ARM interrupts */
|
/* Enable global ARM interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ void up_irqinitialize(void)
|
|||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ static void lpc43_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int lpc43_nmi(int irq, FAR void *context)
|
static int lpc43_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -164,7 +164,7 @@ static int lpc43_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc43_busfault(int irq, FAR void *context)
|
static int lpc43_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault recived\n");
|
dbg("PANIC!!! Bus fault recived\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -172,7 +172,7 @@ static int lpc43_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc43_usagefault(int irq, FAR void *context)
|
static int lpc43_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received\n");
|
dbg("PANIC!!! Usage fault received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -180,7 +180,7 @@ static int lpc43_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc43_pendsv(int irq, FAR void *context)
|
static int lpc43_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -188,7 +188,7 @@ static int lpc43_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc43_dbgmonitor(int irq, FAR void *context)
|
static int lpc43_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -196,7 +196,7 @@ static int lpc43_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int lpc43_reserved(int irq, FAR void *context)
|
static int lpc43_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -150,7 +150,7 @@ void up_irqinitialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ static void nuc_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int nuc_nmi(int irq, FAR void *context)
|
static int nuc_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -142,7 +142,7 @@ static int nuc_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int nuc_pendsv(int irq, FAR void *context)
|
static int nuc_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -150,7 +150,7 @@ static int nuc_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int nuc_reserved(int irq, FAR void *context)
|
static int nuc_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -172,7 +172,7 @@ static void sam_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int sam_nmi(int irq, FAR void *context)
|
static int sam_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -180,7 +180,7 @@ static int sam_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_busfault(int irq, FAR void *context)
|
static int sam_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -188,7 +188,7 @@ static int sam_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_usagefault(int irq, FAR void *context)
|
static int sam_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -196,7 +196,7 @@ static int sam_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_pendsv(int irq, FAR void *context)
|
static int sam_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -204,7 +204,7 @@ static int sam_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_dbgmonitor(int irq, FAR void *context)
|
static int sam_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -212,7 +212,7 @@ static int sam_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_reserved(int irq, FAR void *context)
|
static int sam_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -90,7 +90,7 @@ volatile uint32_t *current_regs;
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int sam_nmi(int irq, FAR void *context)
|
static int sam_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -98,7 +98,7 @@ static int sam_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_pendsv(int irq, FAR void *context)
|
static int sam_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -106,7 +106,7 @@ static int sam_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_reserved(int irq, FAR void *context)
|
static int sam_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -172,7 +172,7 @@ static void sam_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int sam_nmi(int irq, FAR void *context)
|
static int sam_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -180,7 +180,7 @@ static int sam_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_busfault(int irq, FAR void *context)
|
static int sam_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -188,7 +188,7 @@ static int sam_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_usagefault(int irq, FAR void *context)
|
static int sam_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -196,7 +196,7 @@ static int sam_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_pendsv(int irq, FAR void *context)
|
static int sam_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -204,7 +204,7 @@ static int sam_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_dbgmonitor(int irq, FAR void *context)
|
static int sam_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -212,7 +212,7 @@ static int sam_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int sam_reserved(int irq, FAR void *context)
|
static int sam_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -153,7 +153,7 @@ static void stm32_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int stm32_nmi(int irq, FAR void *context)
|
static int stm32_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -161,7 +161,7 @@ static int stm32_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_busfault(int irq, FAR void *context)
|
static int stm32_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -169,7 +169,7 @@ static int stm32_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_usagefault(int irq, FAR void *context)
|
static int stm32_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -177,7 +177,7 @@ static int stm32_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_pendsv(int irq, FAR void *context)
|
static int stm32_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -185,7 +185,7 @@ static int stm32_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_dbgmonitor(int irq, FAR void *context)
|
static int stm32_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -193,7 +193,7 @@ static int stm32_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_reserved(int irq, FAR void *context)
|
static int stm32_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -184,7 +184,7 @@ static void stm32_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int stm32_nmi(int irq, FAR void *context)
|
static int stm32_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -192,7 +192,7 @@ static int stm32_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_busfault(int irq, FAR void *context)
|
static int stm32_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -200,7 +200,7 @@ static int stm32_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_usagefault(int irq, FAR void *context)
|
static int stm32_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -208,7 +208,7 @@ static int stm32_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_pendsv(int irq, FAR void *context)
|
static int stm32_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -216,7 +216,7 @@ static int stm32_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_dbgmonitor(int irq, FAR void *context)
|
static int stm32_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -224,7 +224,7 @@ static int stm32_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int stm32_reserved(int irq, FAR void *context)
|
static int stm32_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -98,7 +98,7 @@ void up_irqinitialize(void)
|
|||||||
/* Enable global ARM interrupts */
|
/* Enable global ARM interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(SVC_MODE | PSR_F_BIT);
|
up_irq_restore(SVC_MODE | PSR_F_BIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ static void tiva_dumpnvic(const char *msg, int irq)
|
|||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int tiva_nmi(int irq, FAR void *context)
|
static int tiva_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -204,7 +204,7 @@ static int tiva_nmi(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int tiva_busfault(int irq, FAR void *context)
|
static int tiva_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Bus fault recived\n");
|
dbg("PANIC!!! Bus fault recived\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -212,7 +212,7 @@ static int tiva_busfault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int tiva_usagefault(int irq, FAR void *context)
|
static int tiva_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Usage fault received\n");
|
dbg("PANIC!!! Usage fault received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -220,7 +220,7 @@ static int tiva_usagefault(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int tiva_pendsv(int irq, FAR void *context)
|
static int tiva_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -228,7 +228,7 @@ static int tiva_pendsv(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int tiva_dbgmonitor(int irq, FAR void *context)
|
static int tiva_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Debug Monitor received\n");
|
dbg("PANIC!!! Debug Monitor received\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -236,7 +236,7 @@ static int tiva_dbgmonitor(int irq, FAR void *context)
|
|||||||
|
|
||||||
static int tiva_reserved(int irq, FAR void *context)
|
static int tiva_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -135,6 +135,15 @@ struct xcptcontext
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Read/write the SREG */
|
/* Read/write the SREG */
|
||||||
|
|
||||||
static inline irqstate_t getsreg(void)
|
static inline irqstate_t getsreg(void)
|
||||||
@ -163,7 +172,7 @@ static inline void irqdisable()
|
|||||||
|
|
||||||
/* Save the current interrupt enable state & disable all interrupts */
|
/* Save the current interrupt enable state & disable all interrupts */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
irqstate_t sreg;
|
irqstate_t sreg;
|
||||||
asm volatile
|
asm volatile
|
||||||
@ -177,7 +186,7 @@ static inline irqstate_t irqsave(void)
|
|||||||
|
|
||||||
/* Restore saved interrupt state */
|
/* Restore saved interrupt state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
asm volatile ("out __SREG__, %0" : : "r" (flags) : );
|
asm volatile ("out __SREG__, %0" : : "r" (flags) : );
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ typedef unsigned int _uintptr_t;
|
|||||||
typedef signed long _int_farptr_t;
|
typedef signed long _int_farptr_t;
|
||||||
typedef unsigned long _uint_farptr_t;
|
typedef unsigned long _uint_farptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by irqsave(). */
|
/* This is the size of the interrupt state save returned by up_irq_save(). */
|
||||||
|
|
||||||
typedef unsigned char irqstate_t;
|
typedef unsigned char irqstate_t;
|
||||||
|
|
||||||
|
@ -132,6 +132,15 @@ struct xcptcontext
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Read the AVR32 status register */
|
/* Read the AVR32 status register */
|
||||||
|
|
||||||
static inline uint32_t avr32_sr(void)
|
static inline uint32_t avr32_sr(void)
|
||||||
@ -160,7 +169,7 @@ static inline uint32_t avr32_evba(void)
|
|||||||
|
|
||||||
/* Save the current interrupt enable state & disable all interrupts */
|
/* Save the current interrupt enable state & disable all interrupts */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
irqstate_t sr = (irqstate_t)avr32_sr();
|
irqstate_t sr = (irqstate_t)avr32_sr();
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
@ -175,7 +184,7 @@ static inline irqstate_t irqsave(void)
|
|||||||
|
|
||||||
/* Restore saved interrupt state */
|
/* Restore saved interrupt state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
if ((flags & AVR32_SR_GM_MASK) == 0)
|
if ((flags & AVR32_SR_GM_MASK) == 0)
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,7 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef signed int _intptr_t;
|
typedef signed int _intptr_t;
|
||||||
typedef unsigned int _uintptr_t;
|
typedef unsigned int _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by irqsave(). */
|
/* This is the size of the interrupt state save returned by up_irq_save(). */
|
||||||
|
|
||||||
typedef unsigned int irqstate_t;
|
typedef unsigned int irqstate_t;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include <arch/chip/irq.h>
|
#include <arch/chip/irq.h>
|
||||||
|
|
||||||
/* Include AVR architecture-specific IRQ definitions (including register
|
/* Include AVR architecture-specific IRQ definitions (including register
|
||||||
* save structure and irqsave()/irqrestore() macros
|
* save structure and up_irq_save()/up_irq_restore() functions).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_FAMILY_AVR32
|
#ifdef CONFIG_ARCH_FAMILY_AVR32
|
||||||
|
@ -176,7 +176,7 @@ static int up_getgrp(unsigned int irq)
|
|||||||
|
|
||||||
static int avr32_xcptn(int irq, FAR void *context)
|
static int avr32_xcptn(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
lldbg("PANIC!!! Exception IRQ: %d\n", irq);
|
lldbg("PANIC!!! Exception IRQ: %d\n", irq);
|
||||||
PANIC();
|
PANIC();
|
||||||
return 0;
|
return 0;
|
||||||
@ -240,7 +240,7 @@ void up_irqinitialize(void)
|
|||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(0);
|
up_irq_restore(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +85,6 @@ void up_irqinitialize(void)
|
|||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(getsreg() | (1 << SREG_I));
|
up_irq_restore(getsreg() | (1 << SREG_I));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state */
|
/* Then restore the task interrupt state */
|
||||||
|
|
||||||
irqrestore(regs[REG_SREG]);
|
up_irq_restore(regs[REG_SREG]);
|
||||||
|
|
||||||
/* Deliver the signals */
|
/* Deliver the signals */
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. This is an
|
/* Then restore the correct state for this thread of execution. This is an
|
||||||
|
@ -106,7 +106,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state */
|
/* Then restore the task interrupt state */
|
||||||
|
|
||||||
irqrestore(regs[REG_SR]);
|
up_irq_restore(regs[REG_SR]);
|
||||||
|
|
||||||
/* Deliver the signals */
|
/* Deliver the signals */
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. This is an
|
/* Then restore the correct state for this thread of execution. This is an
|
||||||
|
@ -107,7 +107,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || this_task()->pid == 0)
|
if (current_regs || this_task()->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -136,7 +136,7 @@ void _exit(int status)
|
|||||||
* task is started.
|
* task is started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
|
|
||||||
slldbg("TCB=%p exiting\n", this_task());
|
slldbg("TCB=%p exiting\n", this_task());
|
||||||
|
|
||||||
|
@ -67,16 +67,25 @@ struct xcptcontext
|
|||||||
* Inline functions
|
* Inline functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Save the current interrupt enable state & disable IRQs */
|
/* Save the current interrupt enable state & disable IRQs */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
/* To be provided */
|
/* To be provided */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restore saved IRQ & FIQ state */
|
/* Restore saved IRQ & FIQ state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
/* To be provided */
|
/* To be provided */
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef signed short _intptr_t;
|
typedef signed short _intptr_t;
|
||||||
typedef unsigned short _uintptr_t;
|
typedef unsigned short _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by irqsave()*/
|
/* This is the size of the interrupt state save returned by up_irq_save()*/
|
||||||
|
|
||||||
typedef unsigned int irqstate_t;
|
typedef unsigned int irqstate_t;
|
||||||
|
|
||||||
|
@ -178,6 +178,15 @@ struct xcptcontext
|
|||||||
* Inline functions
|
* Inline functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Enable/Disable interrupts */
|
/* Enable/Disable interrupts */
|
||||||
|
|
||||||
#define ienable() __asm("cli");
|
#define ienable() __asm("cli");
|
||||||
@ -207,14 +216,14 @@ static inline irqstate_t up_getccr(void)
|
|||||||
(
|
(
|
||||||
"\ttpa\n"
|
"\ttpa\n"
|
||||||
"\tstaa %0\n"
|
"\tstaa %0\n"
|
||||||
: "=m"(ccr) :
|
: "=m"(ccr) :
|
||||||
);
|
);
|
||||||
return ccr;
|
return ccr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the current interrupt enable state & disable IRQs */
|
/* Save the current interrupt enable state & disable IRQs */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
irqstate_t ccr;
|
irqstate_t ccr;
|
||||||
__asm__
|
__asm__
|
||||||
@ -222,14 +231,14 @@ static inline irqstate_t irqsave(void)
|
|||||||
"\ttpa\n"
|
"\ttpa\n"
|
||||||
"\tstaa %0\n"
|
"\tstaa %0\n"
|
||||||
"\torcc #0x50\n"
|
"\torcc #0x50\n"
|
||||||
: "=m"(ccr) :
|
: "=m"(ccr) :
|
||||||
);
|
);
|
||||||
return ccr;
|
return ccr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restore saved interrupt state */
|
/* Restore saved interrupt state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
/* Should interrupts be enabled? */
|
/* Should interrupts be enabled? */
|
||||||
|
|
||||||
@ -244,7 +253,7 @@ static inline void irqrestore(irqstate_t flags)
|
|||||||
/* System call */
|
/* System call */
|
||||||
|
|
||||||
static inline void system_call3(unsigned int nbr, uintptr_t parm1,
|
static inline void system_call3(unsigned int nbr, uintptr_t parm1,
|
||||||
uintptr_t parm2, uintptr_t parm3)
|
uintptr_t parm2, uintptr_t parm3)
|
||||||
{
|
{
|
||||||
/* To be provided */
|
/* To be provided */
|
||||||
/* __asm("swi") */
|
/* __asm("swi") */
|
||||||
|
@ -91,7 +91,7 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef signed short _intptr_t;
|
typedef signed short _intptr_t;
|
||||||
typedef unsigned short _uintptr_t;
|
typedef unsigned short _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by irqsave()*/
|
/* This is the size of the interrupt state save returned by up_irq_save()*/
|
||||||
|
|
||||||
typedef unsigned char irqstate_t;
|
typedef unsigned char irqstate_t;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include <arch/chip/irq.h>
|
#include <arch/chip/irq.h>
|
||||||
|
|
||||||
/* Include architecture-specific IRQ definitions (including register
|
/* Include architecture-specific IRQ definitions (including register
|
||||||
* save structure and irqsave()/irqrestore() macros
|
* save structure and up_irq_save()/up_irq_restore() macros
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_HC12)
|
#if defined(CONFIG_ARCH_HC12)
|
||||||
|
@ -144,7 +144,7 @@ void _exit(int status)
|
|||||||
* task is started.
|
* task is started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
|
|
||||||
slldbg("TCB=%p exiting\n", this_task());
|
slldbg("TCB=%p exiting\n", this_task());
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || (this_task())->pid == 0)
|
if (current_regs || (this_task())->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -82,6 +82,6 @@ void up_irqinitialize(void)
|
|||||||
/* And finally, enable interrupts */
|
/* And finally, enable interrupts */
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
irqrestore(0);
|
up_irq_restore(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include <arch/chip/irq.h>
|
#include <arch/chip/irq.h>
|
||||||
|
|
||||||
/* Include AVR architecture-specific IRQ definitions (including register
|
/* Include AVR architecture-specific IRQ definitions (including register
|
||||||
* save structure and irqsave()/irqrestore() macros
|
* save structure and up_irq_save()/up_irq_restore() macros
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_MIPS32
|
#ifdef CONFIG_ARCH_MIPS32
|
||||||
|
@ -513,11 +513,17 @@ extern "C"
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: irqsave
|
* Name: up_irq_save
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Save the current interrupt state and disable interrupts.
|
* Save the current interrupt state and disable interrupts.
|
||||||
*
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() is probably
|
||||||
|
* what you really want.
|
||||||
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
@ -526,14 +532,20 @@ extern "C"
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
irqstate_t irqsave(void);
|
irqstate_t up_irq_save(void);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: irqrestore
|
* Name: up_irq_restore
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Restore the previous interrupt state (i.e., the one previously returned
|
* Restore the previous interrupt state (i.e., the one previously returned
|
||||||
* by irqsave())
|
* by up_irq_save())
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, leave_critical_section() is probably
|
||||||
|
* what you really want.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* state - The interrupt state to be restored.
|
* state - The interrupt state to be restored.
|
||||||
@ -543,7 +555,7 @@ irqstate_t irqsave(void);
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void irqrestore(irqstate_t irqtate);
|
void up_irq_restore(irqstate_t irqtate);
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -81,7 +81,7 @@ typedef unsigned long long _uint64_t;
|
|||||||
typedef signed int _intptr_t;
|
typedef signed int _intptr_t;
|
||||||
typedef unsigned int _uintptr_t;
|
typedef unsigned int _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by irqsave(). */
|
/* This is the size of the interrupt state save returned by up_irq_save(). */
|
||||||
|
|
||||||
typedef unsigned int irqstate_t;
|
typedef unsigned int irqstate_t;
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ void _exit(int status)
|
|||||||
* task is started.
|
* task is started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
|
|
||||||
slldbg("TCB=%p exiting\n", this_task());
|
slldbg("TCB=%p exiting\n", this_task());
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || this_task()->pid == 0)
|
if (current_regs || this_task()->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: irqsave
|
* Name: up_irq_save
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Save the current interrupt state and disable interrupts.
|
* Save the current interrupt state and disable interrupts.
|
||||||
@ -61,7 +61,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
irqstate_t irqsave(void)
|
irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
register irqstate_t status;
|
register irqstate_t status;
|
||||||
register irqstate_t ret;
|
register irqstate_t ret;
|
||||||
@ -75,11 +75,11 @@ irqstate_t irqsave(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: irqrestore
|
* Name: up_irq_restore
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Restore the previous interrutp state (i.e., the one previously returned
|
* Restore the previous interrutp state (i.e., the one previously returned
|
||||||
* by irqsave())
|
* by up_irq_save())
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* state - The interrupt state to be restored.
|
* state - The interrupt state to be restored.
|
||||||
@ -89,7 +89,7 @@ irqstate_t irqsave(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void irqrestore(irqstate_t irqstate)
|
void up_irq_restore(irqstate_t irqstate)
|
||||||
{
|
{
|
||||||
register irqstate_t status;
|
register irqstate_t status;
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state */
|
/* Then restore the task interrupt state */
|
||||||
|
|
||||||
irqrestore((irqstate_t)regs[REG_STATUS]);
|
up_irq_restore((irqstate_t)regs[REG_STATUS]);
|
||||||
|
|
||||||
/* Deliver the signals */
|
/* Deliver the signals */
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
svdbg("Resuming EPC: %08x STATUS: %08x\n", regs[REG_EPC], regs[REG_STATUS]);
|
svdbg("Resuming EPC: %08x STATUS: %08x\n", regs[REG_EPC], regs[REG_STATUS]);
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of
|
||||||
|
@ -172,11 +172,11 @@ void up_irqinitialize(void)
|
|||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
/* Then enable all interrupt levels */
|
/* Then enable all interrupt levels */
|
||||||
|
|
||||||
irqrestore(CP0_STATUS_IM_ALL);
|
up_irq_restore(CP0_STATUS_IM_ALL);
|
||||||
#else
|
#else
|
||||||
/* Enable only software interrupts */
|
/* Enable only software interrupts */
|
||||||
|
|
||||||
irqrestore(CP0_STATUS_IM_SWINTS);
|
up_irq_restore(CP0_STATUS_IM_SWINTS);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,11 +253,11 @@ void up_irqinitialize(void)
|
|||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
/* Then enable all interrupt levels */
|
/* Then enable all interrupt levels */
|
||||||
|
|
||||||
irqrestore(CP0_STATUS_IM_ALL);
|
up_irq_restore(CP0_STATUS_IM_ALL);
|
||||||
#else
|
#else
|
||||||
/* Enable only software interrupts */
|
/* Enable only software interrupts */
|
||||||
|
|
||||||
irqrestore(CP0_STATUS_IM_SWINTS);
|
up_irq_restore(CP0_STATUS_IM_SWINTS);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,12 +49,15 @@
|
|||||||
#include <rgmp/trap.h>
|
#include <rgmp/trap.h>
|
||||||
#include <rgmp/arch/arch.h>
|
#include <rgmp/arch/arch.h>
|
||||||
|
|
||||||
struct xcptcontext {
|
struct xcptcontext
|
||||||
struct rgmp_context ctx;
|
{
|
||||||
// for signal using
|
struct rgmp_context ctx;
|
||||||
unsigned int save_eip;
|
|
||||||
unsigned int save_eflags;
|
/* For signal using */
|
||||||
void *sigdeliver;
|
|
||||||
|
unsigned int save_eip;
|
||||||
|
unsigned int save_eflags;
|
||||||
|
void *sigdeliver;
|
||||||
};
|
};
|
||||||
|
|
||||||
void push_xcptcontext(struct xcptcontext *xcp);
|
void push_xcptcontext(struct xcptcontext *xcp);
|
||||||
@ -62,16 +65,25 @@ void pop_xcptcontext(struct xcptcontext *xcp);
|
|||||||
|
|
||||||
extern int nest_irq;
|
extern int nest_irq;
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !__ASSEMBLY__ */
|
#endif /* !__ASSEMBLY__ */
|
||||||
|
@ -82,7 +82,7 @@ typedef unsigned int _intptr_t;
|
|||||||
typedef unsigned int _uintptr_t;
|
typedef unsigned int _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by
|
/* This is the size of the interrupt state save returned by
|
||||||
* irqsave()
|
* up_irq_save()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef unsigned int irqstate_t;
|
typedef unsigned int irqstate_t;
|
||||||
|
@ -280,9 +280,18 @@ extern "C"
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Save the current interrupt enable state & disable IRQs */
|
/* Save the current interrupt enable state & disable IRQs */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
@ -297,7 +306,7 @@ static inline irqstate_t irqsave(void)
|
|||||||
|
|
||||||
/* Restore saved IRQ & FIQ state */
|
/* Restore saved IRQ & FIQ state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
|
@ -84,7 +84,7 @@ typedef signed int _intptr_t;
|
|||||||
typedef unsigned int _uintptr_t;
|
typedef unsigned int _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by
|
/* This is the size of the interrupt state save returned by
|
||||||
* irqsave()
|
* up_irq_save()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef _uint16_t irqstate_t;
|
typedef _uint16_t irqstate_t;
|
||||||
|
@ -516,7 +516,7 @@ static inline void __setsr(irqstate_t sr)
|
|||||||
|
|
||||||
/* Return the current interrupt enable state & disable IRQs */
|
/* Return the current interrupt enable state & disable IRQs */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
irqstate_t flags = __getsr();
|
irqstate_t flags = __getsr();
|
||||||
__setsr(flags | 0x000000f0);
|
__setsr(flags | 0x000000f0);
|
||||||
@ -540,7 +540,7 @@ static inline void irqenable(void)
|
|||||||
|
|
||||||
/* Restore saved IRQ state */
|
/* Restore saved IRQ state */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
if ((flags & 0x000000f0) != 0x000000f0)
|
if ((flags & 0x000000f0) != 0x000000f0)
|
||||||
{
|
{
|
||||||
|
@ -82,7 +82,7 @@ typedef signed int _intptr_t;
|
|||||||
typedef unsigned int _uintptr_t;
|
typedef unsigned int _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by
|
/* This is the size of the interrupt state save returned by
|
||||||
* irqsave()
|
* up_irq_save()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef unsigned long irqstate_t;
|
typedef unsigned long irqstate_t;
|
||||||
|
@ -95,7 +95,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || this_task()->pid == 0)
|
if (current_regs || this_task()->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
@ -145,7 +145,7 @@ void _exit(int status)
|
|||||||
* task is started.
|
* task is started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
|
|
||||||
slldbg("TCB=%p exiting\n", this_task());
|
slldbg("TCB=%p exiting\n", this_task());
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ void up_irqinitialize(void)
|
|||||||
*
|
*
|
||||||
* This function implements disabling of the device specified by 'irq'
|
* This function implements disabling of the device specified by 'irq'
|
||||||
* at the interrupt controller level if supported by the architecture
|
* at the interrupt controller level if supported by the architecture
|
||||||
* (irqsave() supports the global level, the device level is hardware
|
* (up_irq_save() supports the global level, the device level is hardware
|
||||||
* specific).
|
* specific).
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -98,7 +98,7 @@ void up_disable_irq(int irq)
|
|||||||
* Description:
|
* Description:
|
||||||
* This function implements enabling of the device specified by 'irq'
|
* This function implements enabling of the device specified by 'irq'
|
||||||
* at the interrupt controller level if supported by the architecture
|
* at the interrupt controller level if supported by the architecture
|
||||||
* (irqsave() supports the global level, the device level is hardware
|
* (up_irq_save() supports the global level, the device level is hardware
|
||||||
* specific).
|
* specific).
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -117,7 +117,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state. */
|
/* Then restore the task interrupt state. */
|
||||||
|
|
||||||
irqrestore(rtcb->xcp.saved_flg);
|
up_irq_restore(rtcb->xcp.saved_flg);
|
||||||
|
|
||||||
/* Deliver the signals */
|
/* Deliver the signals */
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of
|
/* Then restore the correct state for this thread of
|
||||||
|
@ -116,7 +116,7 @@ void up_sigdeliver(void)
|
|||||||
|
|
||||||
/* Then restore the task interrupt state. */
|
/* Then restore the task interrupt state. */
|
||||||
|
|
||||||
irqrestore(regs[REG_SR] & 0x000000f0);
|
up_irq_restore(regs[REG_SR] & 0x000000f0);
|
||||||
|
|
||||||
/* Deliver the signals */
|
/* Deliver the signals */
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ void up_sigdeliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sdbg("Resuming\n");
|
sdbg("Resuming\n");
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
rtcb->pterrno = saved_errno;
|
rtcb->pterrno = saved_errno;
|
||||||
|
|
||||||
/* Then restore the correct state for this thread of execution. */
|
/* Then restore the correct state for this thread of execution. */
|
||||||
|
@ -91,12 +91,22 @@ struct xcptcontext
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
static inline irqstate_t irqsave(void)
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -90,7 +90,7 @@ typedef unsigned int _uintptr_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by
|
/* This is the size of the interrupt state save returned by
|
||||||
* irqsave()
|
* up_irq_save()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef unsigned int irqstate_t;
|
typedef unsigned int irqstate_t;
|
||||||
|
@ -193,6 +193,15 @@ struct xcptcontext
|
|||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
|
/* Name: up_irq_save, up_irq_restore, and friends.
|
||||||
|
*
|
||||||
|
* NOTE: This function should never be called from application code and,
|
||||||
|
* as a general rule unless you really know what you are doing, this
|
||||||
|
* function should not be called directly from operation system code either:
|
||||||
|
* Typically, the wrapper functions, enter_critical_section() and
|
||||||
|
* leave_critical section(), are probably what you really want.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Get the current FLAGS register contents */
|
/* Get the current FLAGS register contents */
|
||||||
|
|
||||||
static inline irqstate_t irqflags()
|
static inline irqstate_t irqflags()
|
||||||
@ -239,7 +248,7 @@ static inline void irqenable(void)
|
|||||||
|
|
||||||
/* Disable interrupts, but return previous interrupt state */
|
/* Disable interrupts, but return previous interrupt state */
|
||||||
|
|
||||||
static inline irqstate_t irqsave(void)
|
static inline irqstate_t up_irq_save(void)
|
||||||
{
|
{
|
||||||
irqstate_t flags = irqflags();
|
irqstate_t flags = irqflags();
|
||||||
irqdisable();
|
irqdisable();
|
||||||
@ -248,7 +257,7 @@ static inline irqstate_t irqsave(void)
|
|||||||
|
|
||||||
/* Conditionally disable interrupts */
|
/* Conditionally disable interrupts */
|
||||||
|
|
||||||
static inline void irqrestore(irqstate_t flags)
|
static inline void up_irq_restore(irqstate_t flags)
|
||||||
{
|
{
|
||||||
if (irqenabled(flags))
|
if (irqenabled(flags))
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,7 @@ typedef signed int _intptr_t;
|
|||||||
typedef unsigned int _uintptr_t;
|
typedef unsigned int _uintptr_t;
|
||||||
|
|
||||||
/* This is the size of the interrupt state save returned by
|
/* This is the size of the interrupt state save returned by
|
||||||
* irqsave()
|
* up_irq_save()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef unsigned int irqstate_t;
|
typedef unsigned int irqstate_t;
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include <arch/chip/irq.h>
|
#include <arch/chip/irq.h>
|
||||||
|
|
||||||
/* Include architecture-specific IRQ definitions (including register save
|
/* Include architecture-specific IRQ definitions (including register save
|
||||||
* structure and irqsave()/irqrestore() macros).
|
* structure and up_irq_save()/up_irq_restore() macros).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_I486
|
#ifdef CONFIG_ARCH_I486
|
||||||
|
@ -253,7 +253,7 @@ static void _up_assert(int errorcode)
|
|||||||
|
|
||||||
if (current_regs || (this_task())->pid == 0)
|
if (current_regs || (this_task())->pid == 0)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)up_irq_save();
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user