arm/fdt/cpu_fdt.c: Use `cpu' iattr to attach cpufreq.

Now that cpu has an explicit interface attribute, cpufeaturebus,
_all_ children of cpu must use an explicit interface attribute to
disambiguate.  For children that weren't previously attached using an
explicit interface attribute, the name of the parent, `cpu', serves
as the iattr.

XXX I think we should either
(a) not use cpufreqbus, since in the aarch64 case it doesn't seem to
    be passing any information through attach args, or
(b) create another iattr like cpufdtbus for use by cpufreq_dt.c,
    which does rely on attach args, if it has to attach differently
    from the rest of fdtbus.
But for now this should get aarch64 on fdt booting again.
This commit is contained in:
riastradh 2024-05-10 14:42:21 +00:00
parent 716bb5516e
commit 7b4ce397cd
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu_fdt.c,v 1.43 2024/05/09 12:41:08 pho Exp $ */ /* $NetBSD: cpu_fdt.c,v 1.44 2024/05/10 14:42:21 riastradh Exp $ */
/*- /*-
* Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca> * Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca>
@ -30,7 +30,7 @@
#include "psci_fdt.h" #include "psci_fdt.h"
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.43 2024/05/09 12:41:08 pho Exp $"); __KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.44 2024/05/10 14:42:21 riastradh Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/atomic.h> #include <sys/atomic.h>
@ -98,7 +98,7 @@ cpu_fdt_attach(device_t parent, device_t self, void *aux)
cpu_attach(self, cpuid); cpu_attach(self, cpuid);
/* Attach CPU frequency scaling provider */ /* Attach CPU frequency scaling provider */
config_found(self, faa, NULL, CFARGS_NONE); config_found(self, faa, NULL, CFARGS(.iattr = "cpu"));
} }
#if defined(MULTIPROCESSOR) && (NPSCI_FDT > 0 || defined(__aarch64__)) #if defined(MULTIPROCESSOR) && (NPSCI_FDT > 0 || defined(__aarch64__))