@@ -243,7 +243,7 @@ static void add_bus_freq_to_ram_area(struct dt_node *ram_node, u32 chip_id)
return;
}
- for_each_pcia(pcia) {
+ for_each_pcia(spiras, pcia) {
const struct sppcia_core_unique *id;
id = HDIF_get_idata(pcia, SPPCIA_IDATA_CORE_UNIQUE, &size);
@@ -190,7 +190,7 @@ bool pcia_parse(void)
dt_add_property_cells(cpus, "#address-cells", 1);
dt_add_property_cells(cpus, "#size-cells", 0);
- for_each_pcia(pcia) {
+ for_each_pcia(spiras, pcia) {
const struct sppcia_core_unique *id;
u32 size, ve_flags;
bool okay;
@@ -529,7 +529,7 @@ static void add_xscom_add_pcia_assoc(struct dt_node *np, uint32_t pcid)
if (!hdr)
return;
- for_each_pcia(hdr) {
+ for_each_pcia(spiras, hdr) {
const struct sppcia_core_unique *id;
id = HDIF_get_idata(hdr, SPPCIA_IDATA_CORE_UNIQUE, &size);
@@ -123,7 +123,7 @@ extern struct HDIF_common_hdr *__get_hdif(struct spira_ntuple *n,
be32_to_cpu((_ntuples)->alloc_len)); \
_p = (void *)_p + be32_to_cpu((_ntuples)->alloc_len))
-#define for_each_pcia(p) for_each_ntuple(&spiras->ntuples.pcia, p, SPPCIA_HDIF_SIG)
+#define for_each_pcia(s, p) for_each_ntuple(&(s)->ntuples.pcia, p, SPPCIA_HDIF_SIG)
/* We override these for testing. */
#ifndef ntuple_addr
Have for_each_pcia take spiras as an argument rather than use the global variable. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- hdata/memory.c | 2 +- hdata/pcia.c | 2 +- hdata/spira.c | 2 +- hdata/spira.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)