[v4a,03/38] clocksource/drivers/arm_arch_timer: Do not use timer namespace for timer_shutdown() function
Message ID | 20221105060155.409832154@goodmis.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp829222wru; Fri, 4 Nov 2022 23:03:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72eAe2OuIK9u4CE3U8uKae4nLJcOxE8B4RsZExvN21DbI4/jjm8TSjQbQRd/uGB4X1zixZ X-Received: by 2002:a17:903:2343:b0:188:5f62:8e15 with SMTP id c3-20020a170903234300b001885f628e15mr8830813plh.5.1667628192914; Fri, 04 Nov 2022 23:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667628192; cv=none; d=google.com; s=arc-20160816; b=fHU3T01tjNYZykKzAiNoIcu1xTzYQKQPzoVfrlwZBLPQPl0vcr5TX7j1WtbcYOMTOI Vlh1IqU9FXTBr3AAsA1pxhj5ylY4jJikYFfvZjra1Lat/qkD66v5PvFryKug96aeRMAa +dI26YcqRyptFKyrxyyZ4SDR6joWDC4zWW72ZXBPA0WuJWekc6sd8I5yY4MbkADrKNaV ojs/zIVTTFQJVQOY6qwu3OJP12tyiXBU++8r76Hg+bYADM+kQAj7Nt2xW2OMWASLhBQM zh1+w9zu+qpWEPC/+5pTNT0/2ezbbopBHMfS4vke2gBGc/Tq5nBC+N58h3GdogdZBwAa mKeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=Qlw9xC2rS1sqjX/RhIwtZmOVoSy0Fo5N1QjRkn7Ke2s=; b=fdS60XzX8XT0mbhU2pJBEkwXOHmaePAgvi+/p8oF2zFGjAelVNF3YZFMjFj9NX9iFi 4XWbG6pPRR+ZcHSQm9ID3bnbaHq7Jq07AlP/BjeOZCQttV++8pmQ9jKbnXF5mtUeoE/G qrUNS2rgwuOrZznruFwLTZkR6rC6g8SyhJdTA7iGpq+BZwxJJbmgdZ+bl/fsRxzN2P4e XVNLby3eKxZ/BXtHqFm+42z2+CFoVPislG3f6HXknud/tU+Qof40KoW0VNG0hiPPeC7l YBMaaciM28shx8lDiF53zbcE5IkGRkkJTs5WS+kNkNA/WVyA/Ip02Z8JtcdLPCMknGOt X4vw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob6-20020a17090b390600b00213997a5fe6si2234750pjb.113.2022.11.04.23.03.00; Fri, 04 Nov 2022 23:03:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229477AbiKEGBh (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Sat, 5 Nov 2022 02:01:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiKEGBa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 5 Nov 2022 02:01:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B39772D764 for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 23:01:28 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 42FA8609D0 for <linux-kernel@vger.kernel.org>; Sat, 5 Nov 2022 06:01:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84B9FC43147; Sat, 5 Nov 2022 06:01:27 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from <rostedt@goodmis.org>) id 1orCFf-007OgY-1q; Sat, 05 Nov 2022 02:01:55 -0400 Message-ID: <20221105060155.409832154@goodmis.org> User-Agent: quilt/0.66 Date: Sat, 05 Nov 2022 02:00:27 -0400 From: Steven Rostedt <rostedt@goodmis.org> To: linux-kernel@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Stephen Boyd <sboyd@kernel.org>, Guenter Roeck <linux@roeck-us.net>, Anna-Maria Gleixner <anna-maria@linutronix.de>, Andrew Morton <akpm@linux-foundation.org>, Mark Rutland <mark.rutland@arm.com>, Marc Zyngier <maz@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4a 03/38] clocksource/drivers/arm_arch_timer: Do not use timer namespace for timer_shutdown() function References: <20221105060024.598488967@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748634900240336571?= X-GMAIL-MSGID: =?utf-8?q?1748634900240336571?= |
Series |
timers: Use timer_shutdown*() before freeing timers
|
|
Commit Message
Steven Rostedt
Nov. 5, 2022, 6 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org> A new "shutdown" timer state is being added to the generic timer code. One of the functions to change the timer into the state is called "timer_shutdown()". This means that there can not be other functions called "timer_shutdown()" as the timer code owns the "timer_*" name space. Rename timer_shutdown() to clk_timer_shutdown() to avoid this conflict. Cc: Mark Rutland <mark.rutland@arm.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> --- drivers/clocksource/arm_arch_timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Comments
On 2022-11-05 06:00, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > A new "shutdown" timer state is being added to the generic timer code. > One > of the functions to change the timer into the state is called > "timer_shutdown()". This means that there can not be other functions > called "timer_shutdown()" as the timer code owns the "timer_*" name > space. > > Rename timer_shutdown() to clk_timer_shutdown() to avoid this conflict. > bikeshed: s/clk_timer/arch_timer/ would make the naming consistent with the rest of the code. Thanks, M. > Cc: Mark Rutland <mark.rutland@arm.com> > Cc: Marc Zyngier <maz@kernel.org> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> > --- > drivers/clocksource/arm_arch_timer.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/clocksource/arm_arch_timer.c > b/drivers/clocksource/arm_arch_timer.c > index a7ff77550e17..c36042d6a2f8 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -687,8 +687,8 @@ static irqreturn_t arch_timer_handler_virt_mem(int > irq, void *dev_id) > return timer_handler(ARCH_TIMER_MEM_VIRT_ACCESS, evt); > } > > -static __always_inline int timer_shutdown(const int access, > - struct clock_event_device *clk) > +static __always_inline int clk_timer_shutdown(const int access, > + struct clock_event_device *clk) > { > unsigned long ctrl; > > @@ -701,22 +701,22 @@ static __always_inline int timer_shutdown(const > int access, > > static int arch_timer_shutdown_virt(struct clock_event_device *clk) > { > - return timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); > + return clk_timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); > } > > static int arch_timer_shutdown_phys(struct clock_event_device *clk) > { > - return timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); > + return clk_timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); > } > > static int arch_timer_shutdown_virt_mem(struct clock_event_device > *clk) > { > - return timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); > + return clk_timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); > } > > static int arch_timer_shutdown_phys_mem(struct clock_event_device > *clk) > { > - return timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); > + return clk_timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); > } > > static __always_inline void set_next_event(const int access, unsigned > long evt,
On Sat, Nov 05, 2022 at 02:00:27AM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > A new "shutdown" timer state is being added to the generic timer code. One > of the functions to change the timer into the state is called > "timer_shutdown()". This means that there can not be other functions > called "timer_shutdown()" as the timer code owns the "timer_*" name space. > > Rename timer_shutdown() to clk_timer_shutdown() to avoid this conflict. > > Cc: Mark Rutland <mark.rutland@arm.com> > Cc: Marc Zyngier <maz@kernel.org> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Same nitpick as Marc (arch_timer_shutdown), but this is POV, so Reviewed-by: Guenter Roeck <linux@roeck-us.net> > --- > drivers/clocksource/arm_arch_timer.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c > index a7ff77550e17..c36042d6a2f8 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -687,8 +687,8 @@ static irqreturn_t arch_timer_handler_virt_mem(int irq, void *dev_id) > return timer_handler(ARCH_TIMER_MEM_VIRT_ACCESS, evt); > } > > -static __always_inline int timer_shutdown(const int access, > - struct clock_event_device *clk) > +static __always_inline int clk_timer_shutdown(const int access, > + struct clock_event_device *clk) > { > unsigned long ctrl; > > @@ -701,22 +701,22 @@ static __always_inline int timer_shutdown(const int access, > > static int arch_timer_shutdown_virt(struct clock_event_device *clk) > { > - return timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); > + return clk_timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); > } > > static int arch_timer_shutdown_phys(struct clock_event_device *clk) > { > - return timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); > + return clk_timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); > } > > static int arch_timer_shutdown_virt_mem(struct clock_event_device *clk) > { > - return timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); > + return clk_timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); > } > > static int arch_timer_shutdown_phys_mem(struct clock_event_device *clk) > { > - return timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); > + return clk_timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); > } > > static __always_inline void set_next_event(const int access, unsigned long evt, > -- > 2.35.1
On Sat, 5 Nov 2022 07:07:13 -0700 Guenter Roeck <linux@roeck-us.net> wrote: > Same nitpick as Marc (arch_timer_shutdown), but this is POV, so > > Reviewed-by: Guenter Roeck <linux@roeck-us.net> Yeah, makes sense. I can update this patch. -- Steve
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index a7ff77550e17..c36042d6a2f8 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -687,8 +687,8 @@ static irqreturn_t arch_timer_handler_virt_mem(int irq, void *dev_id) return timer_handler(ARCH_TIMER_MEM_VIRT_ACCESS, evt); } -static __always_inline int timer_shutdown(const int access, - struct clock_event_device *clk) +static __always_inline int clk_timer_shutdown(const int access, + struct clock_event_device *clk) { unsigned long ctrl; @@ -701,22 +701,22 @@ static __always_inline int timer_shutdown(const int access, static int arch_timer_shutdown_virt(struct clock_event_device *clk) { - return timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); + return clk_timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); } static int arch_timer_shutdown_phys(struct clock_event_device *clk) { - return timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); + return clk_timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); } static int arch_timer_shutdown_virt_mem(struct clock_event_device *clk) { - return timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); + return clk_timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); } static int arch_timer_shutdown_phys_mem(struct clock_event_device *clk) { - return timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); + return clk_timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); } static __always_inline void set_next_event(const int access, unsigned long evt,