* [PATCH] arc: rename arc_timer's TIMER_CTRL_IE to avoid redefinition
@ 2021-07-18 20:36 Randy Dunlap
2021-07-18 23:03 ` Vineet Gupta
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2021-07-18 20:36 UTC (permalink / raw)
To: linux-kernel; +Cc: Randy Dunlap, Vineet Gupta, linux-snps-arc
There are 2 other clocksource drivers that use the symbol
(macro/define) TIMER_CTRL_IE (in 3 files). Change the ARC timer
symbol "TIMER_CTRL_IE" to "TIMER_CTRL_IEN" to resolve the symbol
collision (redefinition).
In file included from ../drivers/clocksource/timer-integrator-ap.c:17:
../drivers/clocksource/timer-sp.h:25: warning: "TIMER_CTRL_IE" redefined
25 | #define TIMER_CTRL_IE (1 << 5) /* VR */
../include/soc/arc/timers.h:20: note: this is the location of the previous definition
20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */
../drivers/clocksource/mps2-timer.c:25: warning: "TIMER_CTRL_IE" redefined
25 | #define TIMER_CTRL_IE BIT(3)
../include/soc/arc/timers.h:20: note: this is the location of the previous definition
20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */
In file included from ../drivers/clocksource/timer-sp804.c:24:
../drivers/clocksource/timer-sp.h:25: warning: "TIMER_CTRL_IE" redefined
25 | #define TIMER_CTRL_IE (1 << 5) /* VR */
../include/soc/arc/timers.h:20: note: this is the location of the previous definition
20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */
Fixes: b26c2e3823ba ("ARC: breakout timer include code into separate header")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org
---
drivers/clocksource/arc_timer.c | 2 +-
include/soc/arc/timers.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- linux-next-20210716.orig/drivers/clocksource/arc_timer.c
+++ linux-next-20210716/drivers/clocksource/arc_timer.c
@@ -245,7 +245,7 @@ static void arc_timer_event_setup(unsign
write_aux_reg(ARC_REG_TIMER0_LIMIT, cycles);
write_aux_reg(ARC_REG_TIMER0_CNT, 0); /* start from 0 */
- write_aux_reg(ARC_REG_TIMER0_CTRL, TIMER_CTRL_IE | TIMER_CTRL_NH);
+ write_aux_reg(ARC_REG_TIMER0_CTRL, TIMER_CTRL_IEN | TIMER_CTRL_NH);
}
--- linux-next-20210716.orig/include/soc/arc/timers.h
+++ linux-next-20210716/include/soc/arc/timers.h
@@ -17,7 +17,7 @@
#define ARC_REG_TIMER1_CNT 0x100 /* timer 1 count */
/* CTRL reg bits */
-#define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */
+#define TIMER_CTRL_IEN (1 << 0) /* Interrupt when Count reaches limit */
#define TIMER_CTRL_NH (1 << 1) /* Count only when CPU NOT halted */
#define ARC_TIMERN_MAX 0xFFFFFFFF
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] arc: rename arc_timer's TIMER_CTRL_IE to avoid redefinition
2021-07-18 20:36 [PATCH] arc: rename arc_timer's TIMER_CTRL_IE to avoid redefinition Randy Dunlap
@ 2021-07-18 23:03 ` Vineet Gupta
0 siblings, 0 replies; 2+ messages in thread
From: Vineet Gupta @ 2021-07-18 23:03 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel; +Cc: linux-snps-arc
On 7/18/21 1:36 PM, Randy Dunlap wrote:
> There are 2 other clocksource drivers that use the symbol
> (macro/define) TIMER_CTRL_IE (in 3 files). Change the ARC timer
> symbol "TIMER_CTRL_IE" to "TIMER_CTRL_IEN" to resolve the symbol
> collision (redefinition).
>
> In file included from ../drivers/clocksource/timer-integrator-ap.c:17:
> ../drivers/clocksource/timer-sp.h:25: warning: "TIMER_CTRL_IE" redefined
> 25 | #define TIMER_CTRL_IE (1 << 5) /* VR */
> ../include/soc/arc/timers.h:20: note: this is the location of the previous definition
> 20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */
>
> ../drivers/clocksource/mps2-timer.c:25: warning: "TIMER_CTRL_IE" redefined
> 25 | #define TIMER_CTRL_IE BIT(3)
> ../include/soc/arc/timers.h:20: note: this is the location of the previous definition
> 20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */
>
> In file included from ../drivers/clocksource/timer-sp804.c:24:
> ../drivers/clocksource/timer-sp.h:25: warning: "TIMER_CTRL_IE" redefined
> 25 | #define TIMER_CTRL_IE (1 << 5) /* VR */
> ../include/soc/arc/timers.h:20: note: this is the location of the previous definition
> 20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */
>
> Fixes: b26c2e3823ba ("ARC: breakout timer include code into separate header")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: linux-snps-arc@lists.infradead.org
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Thx,
-Vineet
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-18 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-18 20:36 [PATCH] arc: rename arc_timer's TIMER_CTRL_IE to avoid redefinition Randy Dunlap
2021-07-18 23:03 ` Vineet Gupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).