From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8BFBCC43334 for ; Fri, 17 Jun 2022 08:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f9ZChvrZkJ0IKJf8RBZJO79pT2mlLeenVmoXhML1fnU=; b=sKgphEsVo+9zyP HKgCsdDt4XsVD19jt4mEgVBpdFC6O2nCgx0iL0U5+X0UbhljGsOpaW5CrRUJfLLmHD/VnOBVj6ucQ E1pTYrjYBRCVG8YSbuBB1slNrGXjWocVUsjFxU/n2fqviiccQHK9SzwJXJs+Tv9CoWjYf5B+UtgAG FtZRArfHqN0Om7W2jyOGMHHklC/nvRqWezxceUm/xJ+oboDV4mtw+m2qBSj/k8qhTV6W7Y/deKg43 WZF6qo7CjU6s26w+OKLrzlZVMmXUimPfJ58uj0RX/J7CE9pmBFV7Ev7A6QgRy8T2VFHDS+sDcghJg bfHHmMu3Aa2kWDki+lIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o27ij-006UMc-Bt; Fri, 17 Jun 2022 08:52:49 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o27a4-006Q16-In for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2022 08:43:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5C51E12FC; Fri, 17 Jun 2022 01:43:51 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.39.168]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DFAF43F792; Fri, 17 Jun 2022 01:43:47 -0700 (PDT) Date: Fri, 17 Jun 2022 09:43:44 +0100 From: Mark Rutland To: Tong Tiangen Cc: James Morse , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Robin Murphy , Dave Hansen , Catalin Marinas , Will Deacon , Alexander Viro , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , x86@kernel.org, "H . Peter Anvin" , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Kefeng Wang , Xie XiuQi , Guohanjun Subject: Re: [PATCH -next v5 4/8] arm64: extable: cleanup redundant extable type EX_TYPE_FIXUP Message-ID: References: <20220528065056.1034168-1-tongtiangen@huawei.com> <20220528065056.1034168-5-tongtiangen@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220528065056.1034168-5-tongtiangen@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220617_014352_803223_29C838F0 X-CRM114-Status: GOOD ( 17.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, May 28, 2022 at 06:50:52AM +0000, Tong Tiangen wrote: > Currently, extable type EX_TYPE_FIXUP is no place to use, We can safely > remove it. > > Suggested-by: Mark Rutland > Signed-off-by: Tong Tiangen Acked-by: Mark Rutland Mark. > --- > arch/arm64/include/asm/asm-extable.h | 20 ++++---------------- > arch/arm64/mm/extable.c | 9 --------- > 2 files changed, 4 insertions(+), 25 deletions(-) > > diff --git a/arch/arm64/include/asm/asm-extable.h b/arch/arm64/include/asm/asm-extable.h > index d01bd94cc4c2..1f2974467273 100644 > --- a/arch/arm64/include/asm/asm-extable.h > +++ b/arch/arm64/include/asm/asm-extable.h > @@ -3,11 +3,10 @@ > #define __ASM_ASM_EXTABLE_H > > #define EX_TYPE_NONE 0 > -#define EX_TYPE_FIXUP 1 > -#define EX_TYPE_BPF 2 > -#define EX_TYPE_UACCESS_ERR_ZERO 3 > -#define EX_TYPE_LOAD_UNALIGNED_ZEROPAD 4 > -#define EX_TYPE_KACCESS_ERR_ZERO 5 > +#define EX_TYPE_BPF 1 > +#define EX_TYPE_UACCESS_ERR_ZERO 2 > +#define EX_TYPE_LOAD_UNALIGNED_ZEROPAD 3 > +#define EX_TYPE_KACCESS_ERR_ZERO 4 > > #ifdef __ASSEMBLY__ > > @@ -20,14 +19,6 @@ > .short (data); \ > .popsection; > > -/* > - * Create an exception table entry for `insn`, which will branch to `fixup` > - * when an unhandled fault is taken. > - */ > - .macro _asm_extable, insn, fixup > - __ASM_EXTABLE_RAW(\insn, \fixup, EX_TYPE_FIXUP, 0) > - .endm > - > /* > * Create an exception table entry for uaccess `insn`, which will branch to `fixup` > * when an unhandled fault is taken. > @@ -62,9 +53,6 @@ > ".short (" data ")\n" \ > ".popsection\n" > > -#define _ASM_EXTABLE(insn, fixup) \ > - __ASM_EXTABLE_RAW(#insn, #fixup, __stringify(EX_TYPE_FIXUP), "0") > - > #define EX_DATA_REG_ERR_SHIFT 0 > #define EX_DATA_REG_ERR GENMASK(4, 0) > #define EX_DATA_REG_ZERO_SHIFT 5 > diff --git a/arch/arm64/mm/extable.c b/arch/arm64/mm/extable.c > index 056591e5ca80..228d681a8715 100644 > --- a/arch/arm64/mm/extable.c > +++ b/arch/arm64/mm/extable.c > @@ -16,13 +16,6 @@ get_ex_fixup(const struct exception_table_entry *ex) > return ((unsigned long)&ex->fixup + ex->fixup); > } > > -static bool ex_handler_fixup(const struct exception_table_entry *ex, > - struct pt_regs *regs) > -{ > - regs->pc = get_ex_fixup(ex); > - return true; > -} > - > static bool ex_handler_uaccess_err_zero(const struct exception_table_entry *ex, > struct pt_regs *regs) > { > @@ -72,8 +65,6 @@ bool fixup_exception(struct pt_regs *regs) > return false; > > switch (ex->type) { > - case EX_TYPE_FIXUP: > - return ex_handler_fixup(ex, regs); > case EX_TYPE_BPF: > return ex_handler_bpf(ex, regs); > case EX_TYPE_UACCESS_ERR_ZERO: > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel