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)
Thu, Nov 20, 9:13 PM
Unknown Object (File)
Thu, Nov 20, 9:12 PM
Unknown Object (File)
Thu, Nov 20, 9:09 PM
Unknown Object (File)
Thu, Nov 20, 9:01 PM
Unknown Object (File)
Sun, Nov 16, 4:57 PM
Unknown Object (File)
Sat, Nov 1, 5:32 AM
Unknown Object (File)
Wed, Oct 29, 12:38 PM
Unknown Object (File)
Wed, Oct 29, 6:36 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.