Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp231842iog; Fri, 17 Jun 2022 02:32:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tJpZ4Agsi047toTIe3AHBjQEDjQkL3bbBhS1cbOnz+Bgt8ESHmSzqfB55bevT4NPdDaZYJ X-Received: by 2002:a63:28b:0:b0:401:b84d:780f with SMTP id 133-20020a63028b000000b00401b84d780fmr8371792pgc.187.1655458324686; Fri, 17 Jun 2022 02:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655458324; cv=none; d=google.com; s=arc-20160816; b=Z1Enru/UElvpGYhu1RTaXTBCZxvEzJhrGNhuegBYcaxI3f79RtBHJIWHVAepXy87br MRmkcqn6VW6WK+BNAGkawL6zVZZ+00fdGd0vIOcUow7D5MA4peIiJ8eJG8pxyqRN+Uf8 wX8coXkhird1mg+3KKcfYM8JxZylEopPyFmHZyn+MnCf8ahMhb0Pj2xq7yqTx/F+lOZt 2Eh7mMeXBDCcCS7PcFevtuVJMbm58IHacqAThzXB+xgZ9i3J15N5VTEpoAA3PXJ1vqs2 cBgLu2HnJZDiFtWRBtXWCgwSrYjQMRo1D+DSZnsozoVs6J8wJeYk2p6f6dX1LxHIqKYF 2E+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=spgNiatCqKNS31wz717H6CQiKXLP8XN+UHlomKyi/vM=; b=sJ4REPGlkM3bc/j+qMYxC2S1ebpm2cPJV1aPYMQpuPHQvKD6uAKFMHuHi+umdUuzG3 kPPEqFvkqvmM4BhVu4EbcwVjvuF0xPxyTJKHNi+5WXVT0Q6auFIAJT7DoJne2eclFLIy nYASmqVxAVv8OJqhtZYYwgfjEBNA+SxeDbm3P+3w9R9wT58ogmfJywL0wdMqrzXWufIF ibKq11IeRUb7hTiAvXvEq6Mj4g1e0nYhu0HvOP89ApGTOek04Oh55txHt5Dy8+NwPUyf nsDOkSoGcYSPkR7X3Rxk0vqoyGqfcNvVfxsZJPo/EFcNqIZVQx0e44NL50ISzwVwdaBL 4X2g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bi12-20020a170902bf0c00b00163655bed22si1177313plb.501.2022.06.17.02.31.47; Fri, 17 Jun 2022 02:32:04 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381139AbiFQIn7 (ORCPT + 99 others); Fri, 17 Jun 2022 04:43:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381080AbiFQInw (ORCPT ); Fri, 17 Jun 2022 04:43:52 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8DCAC69483 for ; Fri, 17 Jun 2022 01:43:51 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220528065056.1034168-5-tongtiangen@huawei.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 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 >