Kernel: Change data in /proc/interrupts to be more richer

Also, during interrupt handlers' enumeration, we call all interrupts
handlers that are not UnhandledInterruptHandler.
This commit is contained in:
Liav A 2020-03-05 19:15:38 +02:00 committed by Andreas Kling
parent 773afefe7c
commit 7ef5d222f1
Notes: sideshowbarker 2024-07-19 08:52:25 +09:00
2 changed files with 3 additions and 2 deletions

View file

@ -363,8 +363,9 @@ Optional<KBuffer> procfs$interrupts(InodeIdentifier)
JsonArraySerializer array { builder };
InterruptManagement::the().enumerate_interrupt_handlers([&array](GenericInterruptHandler& handler) {
auto obj = array.add_object();
obj.add("purpose", "Interrupt Handler"); // FIXME: Determine the right description for each interrupt handler.
obj.add("purpose", handler.purpose());
obj.add("interrupt_line", handler.interrupt_number());
obj.add("controller", handler.controller());
obj.add("cpu_handler", 0); // FIXME: Determine the responsible CPU for each interrupt handler.
obj.add("device_sharing", (unsigned)handler.sharing_devices_count());
obj.add("call_count", (unsigned)handler.get_invoking_count());

View file

@ -63,7 +63,7 @@ void InterruptManagement::enumerate_interrupt_handlers(Function<void(GenericInte
{
for (int i = 0; i < GENERIC_INTERRUPT_HANDLERS_COUNT; i++) {
auto& handler = get_interrupt_handler(i);
if (handler.get_invoking_count() > 0)
if (handler.type() != HandlerType::UnhandledInterruptHandler)
callback(handler);
}
}