Author: mmel Date: Mon Dec 14 11:09:07 2020 New Revision: 368631 URL: https://svnweb.freebsd.org/changeset/base/368631
Log: MFC r368161: Store MPIDR register in pcpu. Modified: stable/12/sys/arm/arm/machdep.c stable/12/sys/arm/arm/mp_machdep.c stable/12/sys/arm/include/pcpu.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/arm/machdep.c ============================================================================== --- stable/12/sys/arm/arm/machdep.c Mon Dec 14 10:16:59 2020 (r368630) +++ stable/12/sys/arm/arm/machdep.c Mon Dec 14 11:09:07 2020 (r368631) @@ -377,6 +377,8 @@ DELAY(int usec) void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) { + + pcpu->pc_mpidr = 0xffffffff; } void @@ -761,6 +763,7 @@ pcpu0_init(void) set_curthread(&thread0); #endif pcpu_init(pcpup, 0, sizeof(struct pcpu)); + pcpup->pc_mpidr = cp15_mpidr_get() & 0xFFFFFF; PCPU_SET(curthread, &thread0); } Modified: stable/12/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/12/sys/arm/arm/mp_machdep.c Mon Dec 14 10:16:59 2020 (r368630) +++ stable/12/sys/arm/arm/mp_machdep.c Mon Dec 14 11:09:07 2020 (r368631) @@ -162,6 +162,7 @@ init_secondary(int cpu) ; pcpu_init(pc, cpu, sizeof(struct pcpu)); + pc->pc_mpidr = cp15_mpidr_get() & 0xFFFFFF; dpcpu_init(dpcpu[cpu - 1], cpu); #if __ARM_ARCH >= 6 && defined(DDB) dbg_monitor_init_secondary(); Modified: stable/12/sys/arm/include/pcpu.h ============================================================================== --- stable/12/sys/arm/include/pcpu.h Mon Dec 14 10:16:59 2020 (r368630) +++ stable/12/sys/arm/include/pcpu.h Mon Dec 14 11:09:07 2020 (r368631) @@ -66,7 +66,8 @@ struct vmspace; int pc_bp_harden_kind; \ uint32_t pc_original_actlr; \ uint64_t pc_clock; \ - char __pad[139] + uint32_t pc_mpidr; \ + char __pad[135] #else #define PCPU_MD_FIELDS \ char __pad[93] _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"