From owner-svn-src-stable-12@freebsd.org Mon Dec 14 11:09:08 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 870904B6567; Mon, 14 Dec 2020 11:09:08 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cvdtr3Nt4z4kRm; Mon, 14 Dec 2020 11:09:08 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62EF020D05; Mon, 14 Dec 2020 11:09:08 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BEB98Fv035780; Mon, 14 Dec 2020 11:09:08 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEB97qF035777; Mon, 14 Dec 2020 11:09:07 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202012141109.0BEB97qF035777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 14 Dec 2020 11:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368631 - in stable/12/sys/arm: arm include X-SVN-Group: stable-12 X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: in stable/12/sys/arm: arm include X-SVN-Commit-Revision: 368631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2020 11:09:08 -0000 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]