Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp326069imn; Wed, 3 Aug 2022 05:35:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR5vSMGo9FwcFnzKB3NEz2ZJ61Psvdy8ZMHyfPjX6UxV/V13G3RxS6qOp5SnQLfbFDW5FfxN X-Received: by 2002:a17:90a:1b8e:b0:1f3:7c7:9c3 with SMTP id w14-20020a17090a1b8e00b001f307c709c3mr4742309pjc.8.1659530128358; Wed, 03 Aug 2022 05:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659530128; cv=none; d=google.com; s=arc-20160816; b=vznBGh+TYM5mrHjbpatDupxC+n+KxDDqLpk9rhUmMUheEu5FNUsQ64Ay4daP1/1AIg 6wo023KeQ9jneCnAPt2as905RFcsw64uWlemH/ttO7nStBLBioYTsea1KzNvCsQ6+95P iilIYx3K0DD6V6n63xggwGKLFwzNmTjwhLYSQG9Xgkey7ht9UEjxnn4/mUbKPf0r+fMT XAUtVKLcvgpEOoHbKLzK7+REHhLBhv9Br2bsgg98/VTo21OxpvUNA21AknonbFTwuOYM MtVztZoX74FSyoOpr8/FSu0kjdd2ha8kxV7dCEMymubPzAwQ6o908X4FByfNvacTZWLb QyBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=UIMeLD+guCbulMrwDtMRI6wRNLV7wq4EP0LuNkB7xZI=; b=Qvpgn+e3ZYIC9NtYJoWWXM7sogJrwGkR72HBxdIqSNwoFpaJAEq6K++MIfWApIshpF ugEBkphFXWmknNaEml15Li0/SBsgvYY2H+Ko9GlQTIOX49Rinl0jr1DuLQ+D4jmgBgnf DgZHWVte/pUIHfjYLJX5oRsjOfpiIqfWMgm4mX32qLwzpTzcEpXyU2CSRW3pdGASQUO1 6iiuDgefaQx1flmBnzlctKKBKZV5pHeL9WKEFUJMRLFF7OExTmn7NFqFw0EFOOtkQYtM sihcwVBYpw+WxcqdUzu+04ndXI9Lde1AYsk1FY7WAR9/KqFWNVAMk6Nex6yuwr2Kg9eY hCGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn8-20020a17090b38c800b001f21fed39basi1976978pjb.119.2022.08.03.05.35.13; Wed, 03 Aug 2022 05:35:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237548AbiHCLsB (ORCPT + 99 others); Wed, 3 Aug 2022 07:48:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232187AbiHCLr6 (ORCPT ); Wed, 3 Aug 2022 07:47:58 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 195636350 for ; Wed, 3 Aug 2022 04:47:57 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4LyVV30c2yz9sjr; Wed, 3 Aug 2022 13:47:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id doBvf-znTPLH; Wed, 3 Aug 2022 13:47:55 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4LyVV23kJVz9sjJ; Wed, 3 Aug 2022 13:47:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6CB658B77E; Wed, 3 Aug 2022 13:47:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id ApcK4IofWmRZ; Wed, 3 Aug 2022 13:47:54 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 4AC5A8B76D; Wed, 3 Aug 2022 13:47:54 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 273BleqG2500049 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 3 Aug 2022 13:47:41 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 273Bld662500048; Wed, 3 Aug 2022 13:47:39 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "Naveen N . Rao" Subject: [PATCH] powerpc/ppc-opcode: Fix PPC_RAW_TW() Date: Wed, 3 Aug 2022 13:47:33 +0200 Message-Id: X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1659527252; l=1237; s=20211009; h=from:subject:message-id; bh=q4z8VGusFX6wV2lZ89BFKcrRPn8EYW1/BTdsXFIX+ic=; b=QrC0fGdSrkhzt9X+BoEVgsQuNiuVNKmdGGJ4AE7S5ZbvAtRttsUlWfm4elBxCgDK6qMZ1Uy2jDBW F54j4BQFA2ziw7cN6UoVf8HD/lmDAJ8b2ZkilTqvq04jqCR1I8DX X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PPC_RAW_TW() is erroneously defined with base code 0x7f000008 instead of 0x7c000008. That's invisible because its only user is PPC_RAW_TRAP() which is 0x7fe00008, but fix it anyway to avoid any risk of future bug. Reported-by: Naveen N. Rao Fixes: d00d762daf12 ("powerpc/ppc-opcode: Define and use PPC_RAW_TRAP() and PPC_RAW_TW()") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc-opcode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index d9703c5fd713..c6d724104ed1 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h @@ -571,7 +571,7 @@ #define PPC_RAW_BRANCH(offset) (0x48000000 | PPC_LI(offset)) #define PPC_RAW_BL(offset) (0x48000001 | PPC_LI(offset)) -#define PPC_RAW_TW(t0, a, b) (0x7f000008 | ___PPC_RS(t0) | ___PPC_RA(a) | ___PPC_RB(b)) +#define PPC_RAW_TW(t0, a, b) (0x7c000008 | ___PPC_RS(t0) | ___PPC_RA(a) | ___PPC_RB(b)) #define PPC_RAW_TRAP() PPC_RAW_TW(31, 0, 0) #define PPC_RAW_SETB(t, bfa) (0x7c000100 | ___PPC_RT(t) | ___PPC_RA((bfa) << 2)) -- 2.36.1