Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/broadcom ci_core_id isn't setup early enough af...



details:   https://anonhg.NetBSD.org/src/rev/d84bd7bbe779
branches:  trunk
changeset: 467291:d84bd7bbe779
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Jan 19 16:53:20 2020 +0000

description:
ci_core_id isn't setup early enough after recent arm_cpu_topology
changes, so use ci_mpidr as a stop gap fix for cpuid

diffstat:

 sys/arch/arm/broadcom/bcm2835_intr.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r b3ce2afc673c -r d84bd7bbe779 sys/arch/arm/broadcom/bcm2835_intr.c
--- a/sys/arch/arm/broadcom/bcm2835_intr.c      Sun Jan 19 16:12:56 2020 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_intr.c      Sun Jan 19 16:53:20 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_intr.c,v 1.29 2019/12/26 11:09:11 skrll Exp $  */
+/*     $NetBSD: bcm2835_intr.c,v 1.30 2020/01/19 16:53:20 skrll Exp $  */
 
 /*-
  * Copyright (c) 2012, 2015, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.29 2019/12/26 11:09:11 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.30 2020/01/19 16:53:20 skrll Exp $");
 
 #define _INTR_PRIVATE
 
@@ -337,7 +337,7 @@
 {
        struct cpu_info * const ci = curcpu();
        const int oldipl = ci->ci_cpl;
-       const cpuid_t cpuid = ci->ci_core_id;
+       const cpuid_t cpuid = __SHIFTOUT(ci->ci_mpidr, MPIDR_AFF0);
        const uint32_t oldipl_mask = __BIT(oldipl);
        int ipl_mask = 0;
 
@@ -700,7 +700,7 @@
 bcm2836mp_pic_find_pending_irqs(struct pic_softc *pic)
 {
        struct cpu_info * const ci = curcpu();
-       const cpuid_t cpuid = ci->ci_core_id;
+       const cpuid_t cpuid = __SHIFTOUT(ci->ci_mpidr, MPIDR_AFF0);
        uint32_t lpending;
        int ipl = 0;
 
@@ -741,7 +741,7 @@
 #if defined(MULTIPROCESSOR)
 static void bcm2836mp_cpu_init(struct pic_softc *pic, struct cpu_info *ci)
 {
-       const cpuid_t cpuid = ci->ci_core_id;
+       const cpuid_t cpuid = __SHIFTOUT(ci->ci_mpidr, MPIDR_AFF0);
 
        KASSERT(cpuid < BCM2836_NCPUS);
 
@@ -768,7 +768,7 @@
 bcm2836mp_ipi_handler(void *priv)
 {
        const struct cpu_info *ci = curcpu();
-       const cpuid_t cpuid = ci->ci_core_id;
+       const cpuid_t cpuid = __SHIFTOUT(ci->ci_mpidr, MPIDR_AFF0);
        uint32_t ipimask, bit;
 
        KASSERT(cpuid < BCM2836_NCPUS);
@@ -817,7 +817,7 @@
 static void
 bcm2836mp_intr_init(void *priv, struct cpu_info *ci)
 {
-       const cpuid_t cpuid = ci->ci_core_id;
+       const cpuid_t cpuid = __SHIFTOUT(ci->ci_mpidr, MPIDR_AFF0);
        struct pic_softc * const pic = &bcm2836mp_pic[cpuid];
 
        KASSERT(cpuid < BCM2836_NCPUS);



Home | Main Index | Thread Index | Old Index