aboutsummaryrefslogtreecommitdiff
path: root/sys/arm
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2022-08-25 08:28:28 +0000
committerAndrew Turner <andrew@FreeBSD.org>2022-08-31 10:48:31 +0000
commit544f047f894046a68c373f55ddd072e91bcfbf38 (patch)
treee57c8e4c10b3fd50082d2a69909e6df6c2bfe97d /sys/arm
parent998b0a4ad84252180ab7b06b281f923ce1d0747b (diff)
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/arm/pmu_acpi.c2
-rw-r--r--sys/arm/arm/pmu_fdt.c2
-rw-r--r--sys/arm/include/pcpu.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/sys/arm/arm/pmu_acpi.c b/sys/arm/arm/pmu_acpi.c
index 2e031338f144..8812ac7b3af4 100644
--- a/sys/arm/arm/pmu_acpi.c
+++ b/sys/arm/arm/pmu_acpi.c
@@ -72,7 +72,7 @@ madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg)
for (i = 0; i < MAXCPU; i++) {
pcpu = pcpu_find(i);
- if (pcpu != NULL && pcpu->pc_mpidr == intr->ArmMpidr) {
+ if (pcpu != NULL && PCPU_GET_MPIDR(pcpu) == intr->ArmMpidr) {
cpuid = i;
break;
}
diff --git a/sys/arm/arm/pmu_fdt.c b/sys/arm/arm/pmu_fdt.c
index 0b435375aa22..fef15e106a33 100644
--- a/sys/arm/arm/pmu_fdt.c
+++ b/sys/arm/arm/pmu_fdt.c
@@ -105,7 +105,7 @@ pmu_parse_affinity(device_t dev, struct pmu_softc *sc, struct pmu_intr *irq,
for (i = 0; i < MAXCPU; i++) {
pcpu = pcpu_find(i);
- if (pcpu != NULL && pcpu->pc_mpidr == mpidr) {
+ if (pcpu != NULL && PCPU_GET_MPIDR(pcpu) == mpidr) {
irq->cpuid = i;
return (0);
}
diff --git a/sys/arm/include/pcpu.h b/sys/arm/include/pcpu.h
index 2353b1d06b17..ced701516c70 100644
--- a/sys/arm/include/pcpu.h
+++ b/sys/arm/include/pcpu.h
@@ -139,6 +139,8 @@ set_tls(void *tls)
#define PCPU_PTR(member) (&get_pcpu()->pc_ ## member)
#define PCPU_SET(member,value) (get_pcpu()->pc_ ## member = (value))
+#define PCPU_GET_MPIDR(pc) ((pc)->pc_mpidr)
+
void pcpu0_init(void);
#endif /* _KERNEL */