Make the meaning of the 'mask' argument to 'set_intr_mask(mask)' consistent
with the meaning of IM bits in the status register. Reviewed by: jmallett, jchandra
This commit is contained in:
parent
d11087789e
commit
885b75a559
@ -96,7 +96,7 @@ platform_init_ap(int cpuid)
|
|||||||
*/
|
*/
|
||||||
clock_int_mask = hard_int_mask(5);
|
clock_int_mask = hard_int_mask(5);
|
||||||
ipi_int_mask = hard_int_mask(platform_ipi_intrnum());
|
ipi_int_mask = hard_int_mask(platform_ipi_intrnum());
|
||||||
set_intr_mask(MIPS_SR_INT_MASK & ~(ipi_int_mask | clock_int_mask));
|
set_intr_mask(ipi_int_mask | clock_int_mask);
|
||||||
|
|
||||||
mips_wbflush();
|
mips_wbflush();
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,7 @@ set_intr_mask(uint32_t mask)
|
|||||||
uint32_t ostatus;
|
uint32_t ostatus;
|
||||||
|
|
||||||
ostatus = mips_rd_status();
|
ostatus = mips_rd_status();
|
||||||
mask = (ostatus & ~MIPS_SR_INT_MASK) | (~mask & MIPS_SR_INT_MASK);
|
mask = (ostatus & ~MIPS_SR_INT_MASK) | (mask & MIPS_SR_INT_MASK);
|
||||||
mips_wr_status(mask);
|
mips_wr_status(mask);
|
||||||
return (ostatus);
|
return (ostatus);
|
||||||
}
|
}
|
||||||
|
@ -356,7 +356,7 @@ mips_vector_init(void)
|
|||||||
* Mask all interrupts. Each interrupt will be enabled
|
* Mask all interrupts. Each interrupt will be enabled
|
||||||
* when handler is installed for it
|
* when handler is installed for it
|
||||||
*/
|
*/
|
||||||
set_intr_mask(MIPS_SR_INT_MASK);
|
set_intr_mask(0);
|
||||||
|
|
||||||
/* Clear BEV in SR so we start handling our own exceptions */
|
/* Clear BEV in SR so we start handling our own exceptions */
|
||||||
mips_wr_status(mips_rd_status() & ~MIPS_SR_BEV);
|
mips_wr_status(mips_rd_status() & ~MIPS_SR_BEV);
|
||||||
|
@ -304,7 +304,7 @@ trap(struct trapframe *trapframe)
|
|||||||
* return to userland.
|
* return to userland.
|
||||||
*/
|
*/
|
||||||
if (trapframe->sr & MIPS_SR_INT_IE) {
|
if (trapframe->sr & MIPS_SR_INT_IE) {
|
||||||
set_intr_mask(~(trapframe->sr & MIPS_SR_INT_MASK));
|
set_intr_mask(trapframe->sr & MIPS_SR_INT_MASK);
|
||||||
intr_enable();
|
intr_enable();
|
||||||
} else {
|
} else {
|
||||||
intr_disable();
|
intr_disable();
|
||||||
|
@ -370,7 +370,7 @@ platform_init_ap(int cpuid)
|
|||||||
*/
|
*/
|
||||||
clock_int_mask = hard_int_mask(5);
|
clock_int_mask = hard_int_mask(5);
|
||||||
ipi_int_mask = hard_int_mask(platform_ipi_intrnum());
|
ipi_int_mask = hard_int_mask(platform_ipi_intrnum());
|
||||||
set_intr_mask(MIPS_SR_INT_MASK & ~(ipi_int_mask | clock_int_mask));
|
set_intr_mask(ipi_int_mask | clock_int_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user