From mboxrd@z Thu Jan 1 00:00:00 1970 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 8A8A7446AC; Mon, 1 Apr 2024 16:13:26 +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=1711988006; cv=none; b=QjWPpYETUhWLdnGDxeuyaGunwQRE+F8JfxzOZUnRrgWn+5EY3HFRF6Z3ccmDlTDUDvudGrrIwAqiyAsW6zKxMkgzhsucfOsvfVvsXb7iWGdFUd9sTDDrQG/DuhS6pSAkpzwQFOnRapv5phalwTo8vGIt9whhoFtwYu6KXW2zGtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711988006; c=relaxed/simple; bh=7++MzRxrJGs2+78qnhxkFYer9qihx7dwaKMeNzAiCxg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bevd7GgjYcwqyfNLsT2dmtpK0OwO/KZlfYHv/FP7jz5Kl51s3qu/6MlOc269/dM1u4d6JzGD1fyU4gyXMwpFqncABICPHXJNV85Dl7tDCX3JUddc1+9dqvDlplGxwDT9oyXGyE1mK6SCVnNmV5FsVZSWGnAW4Hr/geB+uT7cKEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=t66oG1uM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="t66oG1uM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC92DC433F1; Mon, 1 Apr 2024 16:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711988006; bh=7++MzRxrJGs2+78qnhxkFYer9qihx7dwaKMeNzAiCxg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t66oG1uMI5F4sfhu1T1FQ2XBpaD5WAvErT62pKz8ZjVRF9T+rCftZ+5fCDCn1+gjS GWVqfcxESJ49qWKkMuY0WwyK7koYvSpfgmWqDEVYBwru+Ncv3iK4IQMsO/drA3HQNn cPRqNssPFnHSTaQXu8P0KuZ50VaClnA1+jEyfb34= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, John David Anglin , Helge Deller , Sasha Levin Subject: [PATCH 6.7 057/432] parisc: Avoid clobbering the C/B bits in the PSW with tophys and tovirt macros Date: Mon, 1 Apr 2024 17:40:44 +0200 Message-ID: <20240401152554.827470189@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240401152553.125349965@linuxfoundation.org> References: <20240401152553.125349965@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.7-stable review patch. If anyone has any objections, please let me know. ------------------ From: John David Anglin [ Upstream commit 4603fbaa76b5e703b38ac8cc718102834eb6e330 ] Use add,l to avoid clobbering the C/B bits in the PSW. Signed-off-by: John David Anglin Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Sasha Levin --- arch/parisc/include/asm/assembly.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/parisc/include/asm/assembly.h b/arch/parisc/include/asm/assembly.h index 5937d5edaba1e..000a28e1c5e8d 100644 --- a/arch/parisc/include/asm/assembly.h +++ b/arch/parisc/include/asm/assembly.h @@ -97,26 +97,28 @@ * version takes two arguments: a src and destination register. * However, the source and destination registers can not be * the same register. + * + * We use add,l to avoid clobbering the C/B bits in the PSW. */ .macro tophys grvirt, grphys - ldil L%(__PAGE_OFFSET), \grphys - sub \grvirt, \grphys, \grphys + ldil L%(-__PAGE_OFFSET), \grphys + addl \grvirt, \grphys, \grphys .endm - + .macro tovirt grphys, grvirt ldil L%(__PAGE_OFFSET), \grvirt - add \grphys, \grvirt, \grvirt + addl \grphys, \grvirt, \grvirt .endm .macro tophys_r1 gr - ldil L%(__PAGE_OFFSET), %r1 - sub \gr, %r1, \gr + ldil L%(-__PAGE_OFFSET), %r1 + addl \gr, %r1, \gr .endm - + .macro tovirt_r1 gr ldil L%(__PAGE_OFFSET), %r1 - add \gr, %r1, \gr + addl \gr, %r1, \gr .endm .macro delay value -- 2.43.0