Date: Sat, 3 Mar 2018 13:20:44 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330337 - head/sys/arm64/arm64 Message-ID: <201803031320.w23DKiSG011442@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sat Mar 3 13:20:44 2018 New Revision: 330337 URL: https://svnweb.freebsd.org/changeset/base/330337 Log: Move setting the IRQ base and length into the common GICv3 ITS attach function. This is common across both ACPI and FDT. Sponsored by: ABT Systems Ltd Sponsored by: Cavium (Hardware) Modified: head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Sat Mar 3 13:19:08 2018 (r330336) +++ head/sys/arm64/arm64/gicv3_its.c Sat Mar 3 13:20:44 2018 (r330337) @@ -694,6 +694,10 @@ gicv3_its_attach(device_t dev) sc = device_get_softc(dev); + sc->sc_irq_length = gicv3_get_nirqs(dev); + sc->sc_irq_base = GIC_FIRST_LPI; + sc->sc_irq_base += device_get_unit(dev) * sc->sc_irq_length; + rid = 0; sc->sc_its_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -1666,11 +1670,6 @@ gicv3_its_fdt_attach(device_t dev) int err; sc = device_get_softc(dev); - - sc->sc_irq_length = gicv3_get_nirqs(dev); - sc->sc_irq_base = GIC_FIRST_LPI; - sc->sc_irq_base += device_get_unit(dev) * sc->sc_irq_length; - err = gicv3_its_attach(dev); if (err != 0) return (err); @@ -1730,11 +1729,10 @@ gicv3_its_acpi_attach(device_t dev) struct gicv3_its_softc *sc; int err; + sc = device_get_softc(dev); err = gicv3_its_attach(dev); if (err != 0) return (err); - - sc = device_get_softc(dev); sc->sc_pic = intr_pic_register(dev, 1); intr_pic_add_handler(device_get_parent(dev), sc->sc_pic,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803031320.w23DKiSG011442>