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)
Thu, Nov 21, 3:47 PM
Unknown Object (File)
Thu, Nov 21, 1:10 AM
Unknown Object (File)
Fri, Nov 15, 4:29 PM
Unknown Object (File)
Wed, Nov 13, 12:04 AM
Unknown Object (File)
Thu, Oct 31, 8:24 PM
Unknown Object (File)
Wed, Oct 30, 7:52 AM
Unknown Object (File)
Oct 29 2024, 6:52 AM
Unknown Object (File)
Oct 24 2024, 12:39 PM
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.