Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp837661rwb; Wed, 28 Sep 2022 09:40:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5dhP2VYOhrnRTV9pSZOOkwd0Xz28BDDi3qeM5wEeiaezUPpbPl7lPUlwq0ou7YuK1dmdi5 X-Received: by 2002:a17:902:da81:b0:178:2663:dc8d with SMTP id j1-20020a170902da8100b001782663dc8dmr673313plx.49.1664383246957; Wed, 28 Sep 2022 09:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664383246; cv=none; d=google.com; s=arc-20160816; b=veWdU4dB4R4JvN5XmgjEAex3JpjQ9K7fgNa+crs9uDiA2ywzxcQive3+y4rgzrpRnO m5mxu23nmYFjbsAIV1WquRp/yMg7vDionl/zo1vSafdlVjjmJyCuF1RhEbXhfOX0IuO4 ukmg17YjXnjtrB9OASawNCYJwjWysoOnksarfZgSv0nA2EKnoPY2DjVCNenvgrnrVixv 2W4K6n8++mBiR0zlVkRTdi6DKxULb2aZWZnGSGjwi8dVzwRKNpe0ZctT6Vej8s0sOy+Y g5Eufhg37FffZlBB6jwOwWjv6yOAQMIvCkoAsECvzn3ABYFVh/PXiyofQcI9ecWwwWmM wpaw== 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 :dkim-signature; bh=2+AfTUgUOI0SRx2NR3AAob9mosLotvtt0gXkNhzgVLw=; b=JhVsIrlcUWIr1ZSTYAF/C5AoiHgo/L9dZ22wOV5lSPr/yNAgswZm+H6x5LpXNTsLPH qECbRI6rA77mgY46S9KdUCBdqvf8/SfUaLZl2Q7lfRVk9i6qOYg5wGLqR/WoNpsoJFBA 5BS7WPKjVHA3LMgYUgGJ2aMcunxyH7NLWR0acV1icbFfLXWTO+SqpQOsXv095MQ10AXk AUbmNbAW9eFy1OGrBK2oEi6jA4XgmK8CyuPq0crsVv6ujtgJLqiYNYW++/1hkqphT1XD UmeqEFphaGk3fEknMdVIZvph0ysCHjfVrCzL3frhaNPgW1l10Ji0R/RjiCY+wAeyTeJ2 zb3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z+QYcj0J; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds1-20020a056a004ac100b0052c78eecaffsi3297093pfb.174.2022.09.28.09.40.34; Wed, 28 Sep 2022 09:40:46 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z+QYcj0J; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229486AbiI1QaE (ORCPT + 99 others); Wed, 28 Sep 2022 12:30:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234457AbiI1Q3m (ORCPT ); Wed, 28 Sep 2022 12:29:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 329DF14021 for ; Wed, 28 Sep 2022 09:29:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A48A0B82172 for ; Wed, 28 Sep 2022 16:29:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E07EC43470; Wed, 28 Sep 2022 16:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664382578; bh=cai7j8Pf1IAppJ9ZFKXlpopQ5BzZ2xkkOLfulz7eTCA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z+QYcj0JVaUslzqtIXSBly7zV7u25zx2cZizBOkxuSv0JQSuV2YFg4CV8Yak82ObF PCYCX6ous4kGpxgDxD8CjfAgwGK//pgxpIJHwooHlq639aOwFib8lTd27gHxCViyfU YRRWpA1MNVKVtabKQ1h+NyBFAIzk1GboYOVStJqZFUK873kkALD85OFJaU94honi55 vz/ubHNay/fOVE7BDCqBp6Hn9tONvtnSqaAlhWFcixG/59Yh5U+OfVdUS0KXdltgwt fryhwMYKmmT9es0CajION4wYr3j0CbUSg1vm/jygKjl3OHprBWQhkD2w+inBXdQGVi bn1GKg/CQ8z+A== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Nathan Chancellor , Nick Desaulniers , Guo Ren Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v2 1/4] riscv: remove extra level wrappers of trace_hardirqs_{on,off} Date: Thu, 29 Sep 2022 00:20:04 +0800 Message-Id: <20220928162007.3791-2-jszhang@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220928162007.3791-1-jszhang@kernel.org> References: <20220928162007.3791-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Since riscv is converted to generic entry, there's no need for the extra wrappers of trace_hardirqs_{on,off}. Tested with llvm + irqsoff. Signed-off-by: Jisheng Zhang Reviewed-by: Guo Ren --- arch/riscv/kernel/Makefile | 2 -- arch/riscv/kernel/trace_irq.c | 27 --------------------------- arch/riscv/kernel/trace_irq.h | 11 ----------- 3 files changed, 40 deletions(-) delete mode 100644 arch/riscv/kernel/trace_irq.c delete mode 100644 arch/riscv/kernel/trace_irq.h diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile index 01da14e21019..11ee206cc235 100644 --- a/arch/riscv/kernel/Makefile +++ b/arch/riscv/kernel/Makefile @@ -69,8 +69,6 @@ obj-$(CONFIG_CPU_PM) += suspend_entry.o suspend.o obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o -obj-$(CONFIG_TRACE_IRQFLAGS) += trace_irq.o - obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o obj-$(CONFIG_RISCV_SBI) += sbi.o diff --git a/arch/riscv/kernel/trace_irq.c b/arch/riscv/kernel/trace_irq.c deleted file mode 100644 index 095ac976d7da..000000000000 --- a/arch/riscv/kernel/trace_irq.c +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (C) 2022 Changbin Du - */ - -#include -#include -#include "trace_irq.h" - -/* - * trace_hardirqs_on/off require the caller to setup frame pointer properly. - * Otherwise, CALLER_ADDR1 might trigger an pagging exception in kernel. - * Here we add one extra level so they can be safely called by low - * level entry code which $fp is used for other purpose. - */ - -void __trace_hardirqs_on(void) -{ - trace_hardirqs_on(); -} -NOKPROBE_SYMBOL(__trace_hardirqs_on); - -void __trace_hardirqs_off(void) -{ - trace_hardirqs_off(); -} -NOKPROBE_SYMBOL(__trace_hardirqs_off); diff --git a/arch/riscv/kernel/trace_irq.h b/arch/riscv/kernel/trace_irq.h deleted file mode 100644 index 99fe67377e5e..000000000000 --- a/arch/riscv/kernel/trace_irq.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (C) 2022 Changbin Du - */ -#ifndef __TRACE_IRQ_H -#define __TRACE_IRQ_H - -void __trace_hardirqs_on(void); -void __trace_hardirqs_off(void); - -#endif /* __TRACE_IRQ_H */ -- 2.34.1