Steven Rostedt
2022-Nov-04 19:42 UTC
[Bridge] [RFC][PATCH v3 00/33] timers: Use timer_shutdown*() before freeing timers
On Fri, 4 Nov 2022 12:22:32 -0700 Guenter Roeck <linux at roeck-us.net> wrote:> Unfortunately the renaming caused some symbol conflicts. > > Global definition: timer_shutdown > > File Line > 0 time.c 93 static inline void timer_shutdown(struct clock_event_device *evt) > 1 arm_arch_timer.c 690 static __always_inline int timer_shutdown(const int access, > 2 timer-fttmr010.c 105 int (*timer_shutdown)(struct clock_event_device *evt); > 3 timer-sp804.c 158 static inline void timer_shutdown(struct clock_event_device *evt) > 4 timer.h 239 static inline int timer_shutdown(struct timer_list *timer)$ git grep '\btimer_shutdown' arch/arm/mach-spear/time.c:static inline void timer_shutdown(struct clock_event_device *evt) arch/arm/mach-spear/time.c: timer_shutdown(evt); arch/arm/mach-spear/time.c: timer_shutdown(evt); arch/arm/mach-spear/time.c: timer_shutdown(evt); drivers/clocksource/arm_arch_timer.c:static __always_inline int timer_shutdown(const int access, drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); drivers/clocksource/timer-fttmr010.c: int (*timer_shutdown)(struct clock_event_device *evt); drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown = ast2600_timer_shutdown; drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown = fttmr010_timer_shutdown; drivers/clocksource/timer-fttmr010.c: fttmr010->clkevt.set_state_shutdown = fttmr010->timer_shutdown; drivers/clocksource/timer-fttmr010.c: fttmr010->clkevt.tick_resume = fttmr010->timer_shutdown; drivers/clocksource/timer-sp804.c:static inline void timer_shutdown(struct clock_event_device *evt) drivers/clocksource/timer-sp804.c: timer_shutdown(evt); drivers/clocksource/timer-sp804.c: timer_shutdown(evt); Honestly, I think these need to be renamed, as "timer_shutdown()" should be specific to the timer code, and not individual timers. I'll start making a patch set that starts by renaming these timers, then adds the timer_shutdown() API, and finished with the trivial updates, and that will be a real "PATCH" (non RFC). Linus, should I also add any patches that has already been acked by the respective maintainer? -- Steve
Linus Torvalds
2022-Nov-04 19:50 UTC
[Bridge] [RFC][PATCH v3 00/33] timers: Use timer_shutdown*() before freeing timers
On Fri, Nov 4, 2022 at 12:42 PM Steven Rostedt <rostedt at goodmis.org> wrote:> > Linus, should I also add any patches that has already been acked by the > respective maintainer?No, I'd prefer to keep only the ones that are 100% unambiguously not changing any semantics. Linus
Steven Rostedt
2022-Nov-04 20:38 UTC
[Bridge] [RFC][PATCH v3 00/33] timers: Use timer_shutdown*() before freeing timers
On Fri, 4 Nov 2022 15:42:09 -0400 Steven Rostedt <rostedt at goodmis.org> wrote:> $ git grep '\btimer_shutdown' > arch/arm/mach-spear/time.c:static inline void timer_shutdown(struct clock_event_device *evt) > arch/arm/mach-spear/time.c: timer_shutdown(evt); > arch/arm/mach-spear/time.c: timer_shutdown(evt); > arch/arm/mach-spear/time.c: timer_shutdown(evt); > drivers/clocksource/arm_arch_timer.c:static __always_inline int timer_shutdown(const int access, > drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); > drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); > drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); > drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); > drivers/clocksource/timer-fttmr010.c: int (*timer_shutdown)(struct clock_event_device *evt);> drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown = ast2600_timer_shutdown; > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown = fttmr010_timer_shutdown; > drivers/clocksource/timer-fttmr010.c: fttmr010->clkevt.set_state_shutdown = fttmr010->timer_shutdown; > drivers/clocksource/timer-fttmr010.c: fttmr010->clkevt.tick_resume = fttmr010->timer_shutdown;I won't touch structure fields though. -- Steve> drivers/clocksource/timer-sp804.c:static inline void timer_shutdown(struct clock_event_device *evt) > drivers/clocksource/timer-sp804.c: timer_shutdown(evt); > drivers/clocksource/timer-sp804.c: timer_shutdown(evt);
Guenter Roeck
2022-Nov-04 20:41 UTC
[Bridge] [RFC][PATCH v3 00/33] timers: Use timer_shutdown*() before freeing timers
On Fri, Nov 04, 2022 at 03:42:09PM -0400, Steven Rostedt wrote:> On Fri, 4 Nov 2022 12:22:32 -0700 > Guenter Roeck <linux at roeck-us.net> wrote: > > > Unfortunately the renaming caused some symbol conflicts. > > > > Global definition: timer_shutdown > > > > File Line > > 0 time.c 93 static inline void timer_shutdown(struct clock_event_device *evt) > > 1 arm_arch_timer.c 690 static __always_inline int timer_shutdown(const int access, > > 2 timer-fttmr010.c 105 int (*timer_shutdown)(struct clock_event_device *evt); > > 3 timer-sp804.c 158 static inline void timer_shutdown(struct clock_event_device *evt) > > 4 timer.h 239 static inline int timer_shutdown(struct timer_list *timer) > > $ git grep '\btimer_shutdown' > arch/arm/mach-spear/time.c:static inline void timer_shutdown(struct clock_event_device *evt) > arch/arm/mach-spear/time.c: timer_shutdown(evt); > arch/arm/mach-spear/time.c: timer_shutdown(evt); > arch/arm/mach-spear/time.c: timer_shutdown(evt); > drivers/clocksource/arm_arch_timer.c:static __always_inline int timer_shutdown(const int access, > drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_VIRT_ACCESS, clk); > drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_PHYS_ACCESS, clk); > drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_MEM_VIRT_ACCESS, clk); > drivers/clocksource/arm_arch_timer.c: return timer_shutdown(ARCH_TIMER_MEM_PHYS_ACCESS, clk); > drivers/clocksource/timer-fttmr010.c: int (*timer_shutdown)(struct clock_event_device *evt); > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown(evt); > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown = ast2600_timer_shutdown; > drivers/clocksource/timer-fttmr010.c: fttmr010->timer_shutdown = fttmr010_timer_shutdown; > drivers/clocksource/timer-fttmr010.c: fttmr010->clkevt.set_state_shutdown = fttmr010->timer_shutdown; > drivers/clocksource/timer-fttmr010.c: fttmr010->clkevt.tick_resume = fttmr010->timer_shutdown; > drivers/clocksource/timer-sp804.c:static inline void timer_shutdown(struct clock_event_device *evt) > drivers/clocksource/timer-sp804.c: timer_shutdown(evt); > drivers/clocksource/timer-sp804.c: timer_shutdown(evt); > > Honestly, I think these need to be renamed, as "timer_shutdown()" > should be specific to the timer code, and not individual timers.Yes, that is what I did locally. I am repeating my test now with that change made. Guenter