arch/mips: Fix the SW0 priority set by commit eb1adca
It must be strictly greater than IPL to get serviced.
This commit is contained in:
parent
7516f76422
commit
ac4049682f
@ -218,7 +218,7 @@
|
|||||||
# define CP0_STATUS_IPL_SHIFT (10) /* Bits 10-16+18: Interrupt Mask */
|
# define CP0_STATUS_IPL_SHIFT (10) /* Bits 10-16+18: Interrupt Mask */
|
||||||
# define CP0_STATUS_IPL_MASK (0x17f << CP0_STATUS_IPL_SHIFT)
|
# define CP0_STATUS_IPL_MASK (0x17f << CP0_STATUS_IPL_SHIFT)
|
||||||
# define CP0_STATUS_IPL_ENALL (0x00 << CP0_STATUS_IPL_SHIFT)
|
# define CP0_STATUS_IPL_ENALL (0x00 << CP0_STATUS_IPL_SHIFT)
|
||||||
# define CP0_STATUS_IPL_SW0 ((CHIP_MAX_PRIORITY - 1) << CP0_STATUS_IPL_SHIFT)
|
# define CP0_STATUS_IPL_SW0 ((CHIP_SW0_PRIORITY - 1) << CP0_STATUS_IPL_SHIFT)
|
||||||
# define CP0_STATUS_IPL_DISALL (CHIP_MAX_PRIORITY << CP0_STATUS_IPL_SHIFT)
|
# define CP0_STATUS_IPL_DISALL (CHIP_MAX_PRIORITY << CP0_STATUS_IPL_SHIFT)
|
||||||
# define CP0_STATUS_INT_ENALL CP0_STATUS_IPL_ENALL
|
# define CP0_STATUS_INT_ENALL CP0_STATUS_IPL_ENALL
|
||||||
# define CP0_STATUS_INT_SW0 CP0_STATUS_IPL_SW0
|
# define CP0_STATUS_INT_SW0 CP0_STATUS_IPL_SW0
|
||||||
|
@ -2405,8 +2405,9 @@
|
|||||||
* interrupts.
|
* interrupts.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CHIP_MIN_PRIORITY 1 /* Minimum priority. */
|
#define CHIP_MIN_PRIORITY 1 /* Minimum priority. */
|
||||||
#define CHIP_MAX_PRIORITY 7 /* Maximum priority. */
|
#define CHIP_MAX_PRIORITY 7 /* Maximum priority. */
|
||||||
|
#define CHIP_SW0_PRIORITY (CHIP_MAX_PRIORITY - 1) /* SW0 priority. */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
|
@ -203,8 +203,9 @@
|
|||||||
* interrupts.
|
* interrupts.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CHIP_MIN_PRIORITY 1 /* Minimum priority. */
|
#define CHIP_MIN_PRIORITY 1 /* Minimum priority. */
|
||||||
#define CHIP_MAX_PRIORITY 7 /* Maximum priority. */
|
#define CHIP_MAX_PRIORITY 7 /* Maximum priority. */
|
||||||
|
#define CHIP_SW0_PRIORITY (CHIP_MAX_PRIORITY - 1) /* SW0 priority. */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
|
@ -113,7 +113,7 @@ void up_irqinitialize(void)
|
|||||||
|
|
||||||
/* Set the Software Interrupt0 to a special priority */
|
/* Set the Software Interrupt0 to a special priority */
|
||||||
|
|
||||||
up_prioritize_irq(PIC32MX_IRQSRC_CS0, (CHIP_MAX_PRIORITY - 1) << 2);
|
up_prioritize_irq(PIC32MX_IRQSRC_CS0, (CHIP_SW0_PRIORITY << 2));
|
||||||
|
|
||||||
/* Set the BEV bit in the STATUS register */
|
/* Set the BEV bit in the STATUS register */
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ void up_irqinitialize(void)
|
|||||||
|
|
||||||
/* Set the Software Interrupt0 to a special priority */
|
/* Set the Software Interrupt0 to a special priority */
|
||||||
|
|
||||||
pic32mz_prioritize_irq(PIC32MZ_IRQ_CS0, (CHIP_MAX_PRIORITY - 1) << 2);
|
pic32mz_prioritize_irq(PIC32MZ_IRQ_CS0, (CHIP_SW0_PRIORITY << 2));
|
||||||
|
|
||||||
/* Set the BEV bit in the STATUS register */
|
/* Set the BEV bit in the STATUS register */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user