From patchwork Tue Sep 10 16:59:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 13798959 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E25B19755E for ; Tue, 10 Sep 2024 17:00:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725987616; cv=none; b=rwkvSJW1vUUbf+YAYA2X5+OG3DPvvf56zbdkB22IPqTuRtPxX+PgEQbSbJfXEEOqpsHtwllu8y97TuA0BeE3CigJErnO3239giGG2KFtZVolDQdeYCHoJL41r0o/cUjDxe8e4WBK4eAQ1YxpmbFLohtEhMUzquk60L7RzgTGMSU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725987616; c=relaxed/simple; bh=7b7bv6otQMSGDnfa1leF3MWP5+bW5QGJzYA8i/0fdws=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=eX3mYaXNeT8lzhRnkMm+OqPyj2JiDxzVYIGhFqy45uSLBO4u4xK+uub96dokBnwU1caT2hCGv9YoD81MDCji/3njp25CGz+LD7HpD1nQ8ExB6S8YthIxoNa66VvUEOHh/o9zkk0RxBD0qLAd71ljsAwHQAxz1N8TIOB+VCz4D9E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Vdo2Udve; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Vdo2Udve" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40268C4CEC3 for ; Tue, 10 Sep 2024 17:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725987615; bh=7b7bv6otQMSGDnfa1leF3MWP5+bW5QGJzYA8i/0fdws=; h=From:To:Subject:Date:From; b=Vdo2Udver+5FHbbaL1xbiSIGHy+qtq4nVDHeJelA1j5so3XZGBgmfd0zWd4A285v6 oZzkS7h7mIqElN02hId9y194Y3iqG+LDAX2M1EVd56/6MR/W/Ixutyq/nTUJ61rpaW 2X6bPdZUAUzw06ZX/FN1QDuzfFNwXWyAjRJvkhAtddEZBiWLAIbVOfIk7SQTqz4JlK 9Q4A+92/pOMu3LFDTjYxkD3Q3ZyBIrvc+VFADJUH1y3KWPRVPGap+IWr05sFUqjODC Gg9gP+M3BNCdquXoIwKhJtIU9ogIxpT5snAES78KUE5U4TvoqkYTyRVaU+cIDrjM2g Bwn9FkdglvGcg== From: deller@kernel.org To: linux-parisc@vger.kernel.org Subject: [PATCH 1/2] parisc: Fix itlb miss handler for 64-bit programs Date: Tue, 10 Sep 2024 18:59:59 +0200 Message-ID: <20240910170000.63672-1-deller@kernel.org> X-Mailer: git-send-email 2.46.0 Precedence: bulk X-Mailing-List: linux-parisc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Helge Deller For an itlb miss when executing code above 4 Gb on ILP64 adjust the iasq/iaoq in the same way isr/ior was adjusted. This fixes signal delivery for the 64-bit static test program from http://ftp.parisc-linux.org/src/64bit.tar.gz. Note that signals are handled by the signal trampoline code in the 64-bit VDSO which is mapped into high userspace memory region above 4GB for 64-bit processes. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v6.0+ --- arch/parisc/kernel/entry.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index ab23e61a6f01..838c27f93302 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -1051,8 +1051,7 @@ ENTRY_CFI(intr_save) /* for os_hpmc */ STREG %r16, PT_ISR(%r29) STREG %r17, PT_IOR(%r29) -#if 0 && defined(CONFIG_64BIT) - /* Revisit when we have 64-bit code above 4Gb */ +#if defined(CONFIG_64BIT) b,n intr_save2 skip_save_ior: @@ -1061,7 +1060,7 @@ skip_save_ior: * above. */ extrd,u,* %r8,PSW_W_BIT,1,%r1 - cmpib,COND(=),n 1,%r1,intr_save2 + cmpib,COND(=),n 0,%r1,intr_save2 LDREG PT_IASQ0(%r29), %r16 LDREG PT_IAOQ0(%r29), %r17 /* adjust iasq/iaoq */ From patchwork Tue Sep 10 17:00:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 13798960 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E0DC538A for ; Tue, 10 Sep 2024 17:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725987620; cv=none; b=fnbcfGDYBZFv+R05pUnRQPx9I665K9fizuCg4vJES2Hb0ABphQ//o+kTh7dS/qRrzB7sHp/MljFx3coHz/fgaZYcBjtE99rXLkYZzYVjaheO2vVLQqw69g55gPYk/Uri9eZ5egwsvmMZhD5ctBRH50ovQ7aHiGcihJrOzMRfhH4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725987620; c=relaxed/simple; bh=VPTNiB9XOrXv1LVXMD1tsMo243hkvnb5+aCZ8WDPt7E=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hrzReyXG8k/lBlBvmzYZvcfU6ga4Sqc69s7DauhG29rIlnLr4LGWxM9vR40o6TWhvsasPkzoDKuCMhLNJUAne8mbXwm+g0Mr3Jpb+UdDD507LdrY0ouARotBHG0ngxM7TGGddPP1amGn40BBJ0CqsoR1Iey4wGX2BTlOUMYJyy0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d4AerRYC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d4AerRYC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B1BAC4CEC3 for ; Tue, 10 Sep 2024 17:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725987619; bh=VPTNiB9XOrXv1LVXMD1tsMo243hkvnb5+aCZ8WDPt7E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=d4AerRYCnRG/nPkvVzvl0KsfHqlLoEyOmwkHC/ygMzMenICgudQLGvpO961gvsBqK qJ7we5ltdi5pHyDzhq3wdykey95wEUttN4TO8rnsOodbxc1j2rBzp+E1XI/y1ipz7V UGX/Nx7E0C7oJwGQX9R2iWy8vLg/k4rEOeQdZ/57yR3bz5iTA5D6n0x7C1zSh39pVF ay1TVag6iL4vJImUCuo7y4x+k9okW6ylWrFXYQ5UFnL49FPHH2M5a3PGuYq/rvGs2Y 1Ys0t8f5t7oAzCiOM7wyBLXdxRGV4qXd6Cjb6BnqyscRjgzzDL9tZSdP4Fg+r6w00j YCN9e841w1P9Q== From: deller@kernel.org To: linux-parisc@vger.kernel.org Subject: [PATCH 2/2] parisc: Use PRIV_USER instead of hardcoded value Date: Tue, 10 Sep 2024 19:00:00 +0200 Message-ID: <20240910170000.63672-2-deller@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240910170000.63672-1-deller@kernel.org> References: <20240910170000.63672-1-deller@kernel.org> Precedence: bulk X-Mailing-List: linux-parisc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Helge Deller Signed-off-by: Helge Deller --- arch/parisc/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 1107ca819ac8..294b0e026c9a 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -504,7 +504,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs) if (((unsigned long)regs->iaoq[0] & 3) && ((unsigned long)regs->iasq[0] != (unsigned long)regs->sr[7])) { /* Kill the user process later */ - regs->iaoq[0] = 0 | 3; + regs->iaoq[0] = 0 | PRIV_USER; regs->iaoq[1] = regs->iaoq[0] + 4; regs->iasq[0] = regs->iasq[1] = regs->sr[7]; regs->gr[0] &= ~PSW_B;