Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp107862rwb; Sun, 25 Sep 2022 16:28:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IwB9CRY2jAReQ7+MsdCeCN4K9JNTUdBwQA9w3WyRgigUjC3uaoRQ1DYt5BGRhRV7lm+Qu X-Received: by 2002:a05:6a00:1ca7:b0:53f:cbbd:e4dd with SMTP id y39-20020a056a001ca700b0053fcbbde4ddmr21416395pfw.62.1664148532940; Sun, 25 Sep 2022 16:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664148532; cv=none; d=google.com; s=arc-20160816; b=rIUnj2ZDwDSdFUrTsOiyAQEP/c1Hff3UHqeG4xsfcvmxU1bdZKnelpeg4heDF884Ix WiF+sAJwjlp+fgLeA0z3P4BLQnDoBXl8bPse5U7ZOvRBTvMs64N1sudhD4gGB3B4JnHm ukuFLE+dp5WNNFsubVnZfVrJhqXzyfUUo/QglmHRG55c7cYORzqtwg9y1mSA3UcWgGW+ MKsm4ivqMRJ3E78e9GeKIzcGxMUpPi+GxMNnyHVJR2JRJqh1SCobu6Azr80hmSagZqgN sB5BjCksQ4FU0SrPu1sC3QJZUXODfzakxRMdXJgULDHb3c2Y+mRqrsBPc/oepzs9IM5l Bv6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=amhDF/IXrI2FFkX4R2A2f3+niG7mAGD3FRRlDX+vKOk=; b=pZbHYYy/prI4lS9LKB6Tqouk2Jg9AlZ6yMplW5PQa7ZXYK7Brhowhe56ld4Ah8QloG ZmTVR727mA2amNqtnobSUZAMnJoTSymkhCx5oOvSJXTSh7qK1ddqMVZLsehajZ6ZZ0OZ gSmDPEumhBt9LTsIrIoGG0BP4lkd5Eiwi0LFeJsUJlQzoylyBHSq4l2LrzeGXJIdiad5 kKwuoqunL9eKjSK4Sqxpcr1ZQgYZs6PaJRucel5clEsNxP8uY3eWRGDRSEt1HJPttb86 nqlmRHVQVsm2Bv3CrKg5BvV27O2kaanPLgtcxeF1xsCfyn1Og7kwHFpMC1E5KpL8JqH4 TOkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C6XHzStZ; 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 p19-20020a056a000b5300b00537413cec92si19814164pfo.215.2022.09.25.16.28.41; Sun, 25 Sep 2022 16:28:52 -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=C6XHzStZ; 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 S230379AbiIYXSr (ORCPT + 99 others); Sun, 25 Sep 2022 19:18:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231472AbiIYXSo (ORCPT ); Sun, 25 Sep 2022 19:18:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABF3629824 for ; Sun, 25 Sep 2022 16:18:42 -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 55214B8128D for ; Sun, 25 Sep 2022 23:18:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13B9DC433D6 for ; Sun, 25 Sep 2022 23:18:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664147920; bh=ir9kdaG2LaaAh6q3B/+kD0K7jgZwdQEk7RxO73YXov8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=C6XHzStZMc34QAD1pUX5CZOj2iU/Xp8QgMlsGJ+JZJuiRN0ByXBaONRvBlamch0Ma tjA9bWK08q4nCunFBLTtCLYi9vxzDS+mA3bLG0gaVmJwXh/ukCZRq6C+H92QOBExgQ oKW5kSd9uZhha8Xy9WB9rmXoDSHbDM5MX0kGJ3RM9f3rP8ndFTqNkzMsbE6eNd4Eqy Rr8/NHSryP9ma+eeCjy+/wqgXi2TfdZZMmNtuXf8cj0m7QIk5wXUlajLGngXmiY77S CGnwFYJwj+HKgvxYgre5zBh5EEsreoXheuPiGAGmSEOxITXc1sGkzHgXkOL+LdAWk5 eGAuEFfbyxM5w== Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-1278a61bd57so7219694fac.7 for ; Sun, 25 Sep 2022 16:18:40 -0700 (PDT) X-Gm-Message-State: ACrzQf15ZU9JYevgqGt21dquGlyE6SUMW3c/xNw9XzYVv5dzgvHmaI4I F6IcODZf4UZBhWaUaERi/E5+pb6AS77c/B8XMSE= X-Received: by 2002:a05:6870:a78e:b0:12b:542b:e5b2 with SMTP id x14-20020a056870a78e00b0012b542be5b2mr17385757oao.112.1664147919201; Sun, 25 Sep 2022 16:18:39 -0700 (PDT) MIME-Version: 1.0 References: <20220925175356.681-1-jszhang@kernel.org> <20220925175356.681-2-jszhang@kernel.org> In-Reply-To: <20220925175356.681-2-jszhang@kernel.org> From: Guo Ren Date: Mon, 26 Sep 2022 07:18:26 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] riscv: remove extra level wrappers of trace_hardirqs_{on,off} To: Jisheng Zhang Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Nathan Chancellor , Nick Desaulniers , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" 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 Reviewed-by: Guo Ren I would involve the patch in the generic entry series, okay? On Mon, Sep 26, 2022 at 2:03 AM Jisheng Zhang wrote: > > 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 > --- > 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 > -- Best Regards Guo Ren