mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
Kernel: Ensure that we don't use a hard-disabled IRQController
This commit is contained in:
parent
893d4a41c2
commit
c2c0e9fb04
Notes:
sideshowbarker
2024-07-19 08:09:32 +09:00
Author: https://github.com/supercomputer7
Commit: c2c0e9fb04
Pull-request: https://github.com/SerenityOS/serenity/pull/1361
Reviewed-by: https://github.com/awesomekling
2 changed files with 6 additions and 6 deletions
|
@ -61,8 +61,7 @@ bool inline static is_all_masked(u8 reg)
|
|||
void PIC::disable(u8 irq)
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
if (is_hard_disabled())
|
||||
return;
|
||||
ASSERT(!is_hard_disabled());
|
||||
u8 imr;
|
||||
if (irq >= 8) {
|
||||
imr = IO::in8(PIC1_CMD);
|
||||
|
@ -99,8 +98,7 @@ bool PIC::is_vector_enabled(u8 irq) const
|
|||
void PIC::enable(u8 irq)
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
if (is_hard_disabled())
|
||||
return;
|
||||
ASSERT(!is_hard_disabled());
|
||||
u8 imr;
|
||||
if (irq >= 8) {
|
||||
imr = IO::in8(PIC1_CMD);
|
||||
|
@ -117,8 +115,7 @@ void PIC::enable(u8 irq)
|
|||
void PIC::eoi(u8 irq) const
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
if (is_hard_disabled())
|
||||
return;
|
||||
ASSERT(!is_hard_disabled());
|
||||
if (irq >= 8)
|
||||
IO::out8(PIC1_CTL, 0x20);
|
||||
IO::out8(PIC0_CTL, 0x20);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue