Page MenuHomeFreeBSD

lapic: skip setting intrcnt if lapic is not present
ClosedPublic

Authored by royger on Sep 4 2018, 3:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 2 2024, 1:50 PM
Unknown Object (File)
Sep 27 2024, 12:54 AM
Unknown Object (File)
Sep 22 2024, 3:05 PM
Unknown Object (File)
Sep 20 2024, 5:30 PM
Unknown Object (File)
Sep 20 2024, 10:46 AM
Unknown Object (File)
Sep 19 2024, 10:59 PM
Unknown Object (File)
Sep 19 2024, 10:30 AM
Unknown Object (File)
Sep 9 2024, 3:39 AM
Subscribers

Details

Summary

Instead of panicking. Legacy PVH mode doesn't provide a lapic, and
since native_lapic_intrcnt is called unconditionally this would cause
the assert to trigger. Change the assert into a continue in order to
take into account the possibility of systems without a lapic.

Sponsored by: Citrix Systems R&D

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19383
Build 18983: arc lint + arc unit

Event Timeline

sys/x86/x86/local_apic.c
852

Is there a single check we can do here to skip the entire loop? Alternatively, would it be cleaner perhaps to add a new apic_ops hook?

sys/x86/x86/local_apic.c
852

I cannot see an easy check. lapics is allocated in apic_setup_local as long as there's a valid enumerator. I think this would be better part of the struct pic somehow rather than apic_ops?

jhb added inline comments.
sys/x86/x86/local_apic.c
852

I don't think a pic method would help (and if so I could probably just reuse the existing "register_sources" hook) as the lapic PIC is added in apic_setup_local as well. I guess your existing patch is the best approach for now.

This revision is now accepted and ready to land.Sep 6 2018, 5:52 PM
This revision was automatically updated to reflect the committed changes.