git: e4a38f5407d1 - main - powerpc pseries xics: Use devclass_find to lookup xicp devclass.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Apr 2022 22:09:02 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e4a38f5407d14972b5de750ef067165d6975b4f4 commit e4a38f5407d14972b5de750ef067165d6975b4f4 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-27 22:08:47 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-27 22:08:47 +0000 powerpc pseries xics: Use devclass_find to lookup xicp devclass. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D35083 --- sys/powerpc/pseries/xics.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/pseries/xics.c b/sys/powerpc/pseries/xics.c index 393b88976554..b3ddf3f0bf15 100644 --- a/sys/powerpc/pseries/xics.c +++ b/sys/powerpc/pseries/xics.c @@ -167,11 +167,13 @@ EARLY_DRIVER_MODULE(xics, ofwbus, xics_driver, xics_devclass, 0, 0, static struct resource * xicp_mem_for_cpu(int cpu) { + devclass_t dc; device_t dev; struct xicp_softc *sc; int i; - for (i = 0; (dev = devclass_get_device(xicp_devclass, i)) != NULL; i++){ + dc = devclass_find(xicp_driver.name); + for (i = 0; (dev = devclass_get_device(dc, i)) != NULL; i++){ sc = device_get_softc(dev); if (cpu >= sc->cpu_range[0] && cpu < sc->cpu_range[1]) return (sc->mem[cpu - sc->cpu_range[0]]);