From nobody Wed Feb 28 14:10:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGV00gmvz5BfMn; Wed, 28 Feb 2024 14:10:48 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlGTz5Xx7z4fw5; Wed, 28 Feb 2024 14:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m18J/xqAAf7887yVqTbtIpkbUvpZdwDKei3mELx6iig=; b=aD/HnLcpPgss31j6fmx/zsvnfRdXtVO1H1Dt8SwyJq8K+WDeZqutervol3EFM+qwrsQQQF g0TDMJBK9Uk6cuyb5wNloLl/Yx+7yJ2voRIzJTS0wIlRGJiSKNyK1E3GDsQmcdnzHG1Mo0 877TxGBJFbuI4sgHonC/EA3k6YRB38KyOvpC185a0U4oC/4F/QAEk0B9v9Gs8srGmiWL/o cZoQmzLF/cdYOkgCtTvTKWGX58gCyBNxLchm0+04lDxyUcIUlJp3vsU/xZAZbS6jUPKrVE pfzzopT0tGEmdEHEeweBJb7abDWYyatNMX5BoM6zERGQK5rpEBWHToByGzkljA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129447; a=rsa-sha256; cv=none; b=vJMS97NG84cTTG9wttHtO5nHAxyksnqbsqRzqFI3bZr3IQmHJDJh5h/uKu6DljAvAF4kHP W0rTMd+klhbHbvP8XSdCvY7SBbG0GekcsizTLNKu5IeElIZ9rTxLolOr5nnXsdqdM7dOHA vuS4b9ZwyUNOn987nWohR5k/bpLc5t2jqH7f03NrHkxrAvXQ9EVhYwDgn+m5k14K2ARVZY WzXtSHe9PBM/ECFjEuOBmc7grFwW6jPN2CJjel8G1WaisvSz4btWv2MdRg9BQa9mAKr5Xx 7ykk8YwsAvddzA2KmZC6ikp3XIbmyZ5G8cdeKA2M8usP1vK28lz3nlVVCY3OKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m18J/xqAAf7887yVqTbtIpkbUvpZdwDKei3mELx6iig=; b=jg1uK0sFzFR5Yzu0VR/K84CZzoRXAv5+OcVBcQMEaagwmKK9WkZwk8ImDEf+VW1DAltRrh AgnM3RVQSGRgNjSY5VjgyUDLZynYz47nTH9Uu9Dzg1210lAz4+zY9mdEKDVBd73XBc1kkS jHcyF2a1huJRa0CRZuhuhCcqu4Z3+9R3mmBYxbnIPGC9xMvbaGMg31DdUyK/mZarCQPHOY ICzybK1pA2gR93IPDs9G5QlPJD4xyBab9lBFukH8CC6a9vS9rUrCPxsu8XU7Ckuna+x/5z +xBjp3Cm1i02c8BVx5SPLI5jhQQ/kki4lVDyHVX+Q0WlerMJyHhlNaSTIlAF/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTz4124zyrw; Wed, 28 Feb 2024 14:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41SEAl5W058378; Wed, 28 Feb 2024 14:10:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SEAlkE058375; Wed, 28 Feb 2024 14:10:47 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:47 GMT Message-Id: <202402281410.41SEAlkE058375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1d13cc200820 - main - gicv3: In its_init_cpu_lpi record each cpu's PENDBASER List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d13cc200820a020d7875563b036b5f43800ef38 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d13cc200820a020d7875563b036b5f43800ef38 commit 1d13cc200820a020d7875563b036b5f43800ef38 Author: Warner Losh AuthorDate: 2024-02-28 14:09:10 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:42 +0000 gicv3: In its_init_cpu_lpi record each cpu's PENDBASER When we're using the preallocated memory for gicv3, record each cpu's PENDBASER where we'd normally allocate memory for it. Make sure that memory is in the excluded list and map the PA to VA and store that, to mimic what we do with the allocation case. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44037 --- sys/arm64/arm64/gicv3_its.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index fa172c871150..71620eec8fce 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -827,8 +828,18 @@ its_init_cpu_lpi(device_t dev, struct gicv3_its_softc *sc) /* Make sure the GIC has seen everything */ dsb(sy); + } else { + KASSERT(sc->sc_pend_base[cpuid] == 0, + ("PREALLOC too soon cpuid %d", cpuid)); + tmp = gic_r_read_8(gicv3, GICR_PENDBASER); + tmp &= GICR_PENDBASER_PA_MASK; + if (!physmem_excluded(tmp, LPI_PENDTAB_SIZE)) + panic("gicv3 PENDBASER on cpu %d needs to reuse 0x%#lx, but not reserved\n", + cpuid, tmp); + sc->sc_pend_base[cpuid] = PHYS_TO_DMAP(tmp); } + if (bootverbose) device_printf(gicv3, "using %sPENDBASE of %#lx on cpu %d\n", (sc->sc_its_flags & ITS_FLAGS_LPI_PREALLOC) ? "pre-existing " : "",