Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2361530ioo; Sat, 28 May 2022 11:16:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfgyjDGGDGAQLlV8JH9z5wsKFUCgvb7ZX/DTky9Cq/c+HRO3q0BIQ//V/JNDcE4/yBMnAp X-Received: by 2002:a63:184d:0:b0:3fb:74ce:effa with SMTP id 13-20020a63184d000000b003fb74ceeffamr9984825pgy.621.1653761765024; Sat, 28 May 2022 11:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653761765; cv=none; d=google.com; s=arc-20160816; b=AkimNJSg2pBNEkTeO8A9j4aV3MnBsW8aqinUA8iwxP5WebSocvBC3XINZ+ghEnSLbL GewWXYt//2CEcKSG82XGx/EdEK5Aw0dvdB8NKXJ/WlHBHUlVZ/c1t+mXsD/FQZI3RZ2E PMiVgB4gD82nG/FMGb/vPLovcMJoVmR0WiZjSe6e25vCe3vim16vIdQQbCRMISLtw1bd GMGRrLPC3Qzbtu+pTLummm3w+CCtETpLhqbTd1wiOJN1DhljgZhS2HBQ9DJBEA8eH0dN PxSXXHj/hwq8QyvVZt9lIbz/qACAKhglI1n7lZOYv2pwrXJkWnnBM+RI02BB5I03mJMR nLtQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qSOGkTK4v1IyPbFSguJx1Jzmh3ag7smxb2CJKGy0Omw=; b=mBFvgeNahPBjX7PbZ5YzLy8/TVgwZmXdXOafLMFoUZzc2MUxdAZrgS2GMfCO6unm2t mPDnttX+EwMPgZz2W9DwyEHgsaJ89KWUNpNc67wHMt6Y7uUwEtSaSf7BvcAT9vlEEBfP X/s76Q3otKCYIwEfFwj9Kqp+WdxuIAGcdMU0QqFYvG9XcIYydpAEvtwXURj5rWgW9aKL dTgrRWssR6Eqd/ePGTo+i0WLUCw0ZKPZFkSQ9a82l93jF7ZhFpndtaq6nW/t9ugPv26j VEPYw9VMduYuaJa7OsZAYHK/t5VW4Fmj/5r5dXdqKXgaiSK954+p73acm3Lt6urlGczV oShA== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id jj13-20020a170903048d00b001569eedd2dasi8217973plb.408.2022.05.28.11.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 11:16:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9695C13F8C; Sat, 28 May 2022 11:16:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355642AbiE1GaR (ORCPT + 99 others); Sat, 28 May 2022 02:30:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355831AbiE1G3u (ORCPT ); Sat, 28 May 2022 02:29:50 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDE66377D3 for ; Fri, 27 May 2022 23:29:38 -0700 (PDT) Received: from kwepemi500006.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4L9BZj5tX3zjX8d; Sat, 28 May 2022 14:28:45 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by kwepemi500006.china.huawei.com (7.221.188.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 28 May 2022 14:29:31 +0800 Received: from localhost.localdomain (10.175.112.125) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 28 May 2022 14:29:30 +0800 From: Tong Tiangen To: Mark Rutland , 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 , , "H . Peter Anvin" CC: , , , , Kefeng Wang , Xie XiuQi , Guohanjun , Tong Tiangen Subject: [PATCH -next v5 4/8] arm64: extable: cleanup redundant extable type EX_TYPE_FIXUP Date: Sat, 28 May 2022 06:50:52 +0000 Message-ID: <20220528065056.1034168-5-tongtiangen@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220528065056.1034168-1-tongtiangen@huawei.com> References: <20220528065056.1034168-1-tongtiangen@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600017.china.huawei.com (7.193.23.234) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 --- 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