From nobody Mon Apr 24 11:34:10 2023 X-Original-To: dev-commits-src-all@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 4Q4jhM6k5dz46jJb; Mon, 24 Apr 2023 11:34:11 +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 4Q4jhM4zb7z4TVx; Mon, 24 Apr 2023 11:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682336051; 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=y36jIBJtFjd2UIU9QbN7XnxKVfj7jQTnKSj26YuNJXM=; b=IKyMlPtcaY2f8IIZWlcwFivUrMbCJjnDJXEQW7A0hYo5dul6EmQPyGJLXw4dW4ekp93jXL wD8oTaZd440MJjjVzkmeISeu6VqfyxWy77Z+l/ENsnYfzW1Ny8K+wnTNLa2VKPddL4B5bh 7va9xm0qDufOm8ooExcdaX87XQD4QX3w1veSe30qGb83fKvWhaftrGhxWOc13XbZEYKvDq yLek1RaRG3jTgUABr16Ziq9Yq+1XB0m57BiAgmQbob6GvcsBMrmDxWRaQOMEAZxnj3/1JJ eICsnaC0MEmsLibzqknfPyy9V4SqiEOzula/oErM6IYern+G9KUuWlR1LdcrCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682336051; 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=y36jIBJtFjd2UIU9QbN7XnxKVfj7jQTnKSj26YuNJXM=; b=JeCHdNPrI38Y0E3k3/fYmrulO+h2BDsBZ/kEigvAtM1cTxbOTmjm0auN+dO8hWmx6pdfFq VbPI4YfvCmPRAVdKlx9oyB66HlUHcVPuLwf5Z8rLY+wLIVCeh3aJWGsKEETmOzsc7gQbvj B4EZHd+yROx15fxQcjKQXECpnaYDbDeFf3QlfF4CA+htHVfDI0xf5cspcAzcI9y7MAQrJw 1wPIzUSeQihbTErGZZxbeeCW7AKykHSMdk9XQJXmf/imQLdUE4kpNypFgZ4nQxNy3ZqRvC OcMnBMfI70LVzwIV1zo1p+hDjk4sYycpm3D45UebYhlpl4mpVG4OZrTRdMFjWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682336051; a=rsa-sha256; cv=none; b=xVkEsD/KjSdu8zhg1JR6GJRBJcYaRpmnqxfzTuKaRvcIw3xMVzlWN7hGP5yvZfs703fwSY f9IW1t2JdtdRC4+jo8an7oXCiiyXzfQAjpPyQlkzf7Q+4nGqnf9Jb5gIKn+T1STzq8IYsG YgEPlSCSWly/b4NXlu2sAtLGmnN6qJRpPtI3Y2BdHXaHKHKPP6DbOIseWZteSeOWYba49J kjHa+jjz3wxXc4x3wq5oevKKGi3XDAbN3oosXI0pnv7NQ132Cje9pd9ViOkgL2UG0lrqaL u/HdhzUI26IcqxtNgud4QzoapB2jUMTY8W4hD+RiggVS9so1f4e61JqFB6CpGg== 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 4Q4jhM0FmpzP2D; Mon, 24 Apr 2023 11:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33OBYAdP071105; Mon, 24 Apr 2023 11:34:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33OBYA8S071104; Mon, 24 Apr 2023 11:34:10 GMT (envelope-from git) Date: Mon, 24 Apr 2023 11:34:10 GMT Message-Id: <202304241134.33OBYA8S071104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: fb421e96c030 - main - Make arm64 pcb padding explicit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb421e96c03087ef9e02e64232763906b6da88ae Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=fb421e96c03087ef9e02e64232763906b6da88ae commit fb421e96c03087ef9e02e64232763906b6da88ae Author: Andrew Turner AuthorDate: 2023-04-24 09:57:06 +0000 Commit: Andrew Turner CommitDate: 2023-04-24 11:33:50 +0000 Make arm64 pcb padding explicit There is padding between some fields. Mark those I have found so they can be reused later if needed. Sponsored by: Arm Ltd --- sys/arm64/arm64/machdep.c | 6 ++++++ sys/arm64/include/pcb.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index d9ea06952c54..4aac339b1a1b 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -104,6 +104,12 @@ __FBSDID("$FreeBSD$"); #include +_Static_assert(sizeof(struct pcb) == 1216, "struct pcb is incorrect size"); +_Static_assert(offsetof(struct pcb, pcb_fpusaved) == 136, + "pcb_fpusaved changed offset"); +_Static_assert(offsetof(struct pcb, pcb_fpustate) == 160, + "pcb_fpustate changed offset"); + enum arm64_bus arm64_bus_method = ARM64_BUS_NONE; /* diff --git a/sys/arm64/include/pcb.h b/sys/arm64/include/pcb.h index 8ffe6f2d483e..35f04787c781 100644 --- a/sys/arm64/include/pcb.h +++ b/sys/arm64/include/pcb.h @@ -57,6 +57,7 @@ struct pcb { u_int pcb_flags; #define PCB_SINGLE_STEP_SHIFT 0 #define PCB_SINGLE_STEP (1 << PCB_SINGLE_STEP_SHIFT) + uint32_t pcb_pad1; struct vfpstate *pcb_fpusaved; int pcb_fpflags; @@ -66,6 +67,7 @@ struct pcb { /* The bits passed to userspace in get_fpcontext */ #define PCB_FP_USERMASK (PCB_FP_STARTED) u_int pcb_vfpcpu; /* Last cpu this thread ran VFP code */ + uint64_t pcb_pad2; /* * The userspace VFP state. The pcb_fpusaved pointer will point to