Page MenuHomeFreeBSD

Fix registration of MPIC driver
ClosedPublic

Authored by mw_semihalf.com on May 14 2017, 12:52 AM.
Tags
Referenced Files
Unknown Object (File)
Feb 22 2024, 4:17 PM
Unknown Object (File)
Jan 26 2024, 1:26 PM
Unknown Object (File)
Jan 3 2024, 2:20 AM
Unknown Object (File)
Jan 2 2024, 10:38 AM
Unknown Object (File)
Dec 20 2023, 6:26 AM
Unknown Object (File)
Dec 5 2023, 11:13 AM
Unknown Object (File)
Nov 26 2023, 10:46 PM
Unknown Object (File)
Nov 22 2023, 1:50 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I think you can simplify this fix if you move the OF_device_register_xref() to happen before the if(). This way the if() don't need to be changed:

Index: arm/mv/mpic.c
===================================================================
--- arm/mv/mpic.c       (revision 318000)
+++ arm/mv/mpic.c       (working copy)
@@ -273,6 +273,7 @@
                bus_release_resources(dev, mv_mpic_spec, sc->mpic_res);
                return (ENXIO);
        }
+       OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev);
        if (intr_pic_register(dev, OF_xref_from_device(dev)) == NULL) {
                device_printf(dev, "could not register PIC\n");
                bus_release_resources(dev, mv_mpic_spec, sc->mpic_res);

Thanks for the suggestion. It works, so I'll the patch in a moment.

This revision is now accepted and ready to land.May 17 2017, 3:29 AM
This revision was automatically updated to reflect the committed changes.