All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vdso: Fix clocksource.h macro detection
@ 2020-03-23 13:39 Vincenzo Frascino
  2020-03-23 19:54 ` [tip: timers/core] " tip-bot2 for Vincenzo Frascino
  0 siblings, 1 reply; 2+ messages in thread
From: Vincenzo Frascino @ 2020-03-23 13:39 UTC (permalink / raw)
  To: linux-arch, linux-kernel, clang-built-linux
  Cc: Vincenzo Frascino, Thomas Gleixner, Andy Lutomirski

CONFIG_GENERIC_GETTIMEOFDAY is a sufficient condition to verify if an
architecture implements or not asm/vdso/clocksource.h. The current
implementation wrongly assumes that the same is true for the config
option CONFIG_ARCH_CLOCKSOURCE_DATA.
This results in a series of building errors on ia64/sparc/sparc64 like
the one below:

In file included from ./include/linux/clocksource.h:31,
                 from ./include/linux/clockchips.h:14,
                 from ./include/linux/tick.h:8,
                 from fs/proc/stat.c:15:
./include/vdso/clocksource.h:9:10: fatal error: asm/vdso/clocksource.h:
No such file or directory
    9 | #include <asm/vdso/clocksource.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~

Fix the issue removing the unneeded config condition.

Fixes: 14ee2ac618e4 ("linux/clocksource.h: Extract common header for vDSO")
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
Rebased on tip/master

 include/vdso/clocksource.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/vdso/clocksource.h b/include/vdso/clocksource.h
index ab58330e4e5d..c682e7c60273 100644
--- a/include/vdso/clocksource.h
+++ b/include/vdso/clocksource.h
@@ -4,10 +4,9 @@
 
 #include <vdso/limits.h>
 
-#if defined(CONFIG_ARCH_CLOCKSOURCE_DATA) || \
-	defined(CONFIG_GENERIC_GETTIMEOFDAY)
+#ifdef CONFIG_GENERIC_GETTIMEOFDAY
 #include <asm/vdso/clocksource.h>
-#endif /* CONFIG_ARCH_CLOCKSOURCE_DATA || CONFIG_GENERIC_GETTIMEOFDAY */
+#endif /* CONFIG_GENERIC_GETTIMEOFDAY */
 
 enum vdso_clock_mode {
 	VDSO_CLOCKMODE_NONE,
-- 
2.25.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip: timers/core] vdso: Fix clocksource.h macro detection
  2020-03-23 13:39 [PATCH] vdso: Fix clocksource.h macro detection Vincenzo Frascino
@ 2020-03-23 19:54 ` tip-bot2 for Vincenzo Frascino
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Vincenzo Frascino @ 2020-03-23 19:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Thomas Gleixner, Vincenzo Frascino, Borislav Petkov, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     ca214e2c1793058e3a1387f9e343cc5b1731db15
Gitweb:        https://git.kernel.org/tip/ca214e2c1793058e3a1387f9e343cc5b1731db15
Author:        Vincenzo Frascino <vincenzo.frascino@arm.com>
AuthorDate:    Mon, 23 Mar 2020 13:39:20 
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Mon, 23 Mar 2020 18:51:08 +01:00

vdso: Fix clocksource.h macro detection

CONFIG_GENERIC_GETTIMEOFDAY is a sufficient condition to verify if an
architecture implements asm/vdso/clocksource.h or not. The current
implementation wrongly assumes that the same is true for the config
option CONFIG_ARCH_CLOCKSOURCE_DATA.

This results in a series of build errors on ia64/sparc/sparc64 like this:

  In file included from ./include/linux/clocksource.h:31,
                   from ./include/linux/clockchips.h:14,
                   from ./include/linux/tick.h:8,
                   from fs/proc/stat.c:15:
  ./include/vdso/clocksource.h:9:10: fatal error: asm/vdso/clocksource.h:
  No such file or directory
      9 | #include <asm/vdso/clocksource.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~

Fix the issue removing the unneeded config condition.

Fixes: 14ee2ac618e4 ("linux/clocksource.h: Extract common header for vDSO")
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200323133920.46546-1-vincenzo.frascino@arm.com
---
 include/vdso/clocksource.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/vdso/clocksource.h b/include/vdso/clocksource.h
index ab58330..c682e7c 100644
--- a/include/vdso/clocksource.h
+++ b/include/vdso/clocksource.h
@@ -4,10 +4,9 @@
 
 #include <vdso/limits.h>
 
-#if defined(CONFIG_ARCH_CLOCKSOURCE_DATA) || \
-	defined(CONFIG_GENERIC_GETTIMEOFDAY)
+#ifdef CONFIG_GENERIC_GETTIMEOFDAY
 #include <asm/vdso/clocksource.h>
-#endif /* CONFIG_ARCH_CLOCKSOURCE_DATA || CONFIG_GENERIC_GETTIMEOFDAY */
+#endif /* CONFIG_GENERIC_GETTIMEOFDAY */
 
 enum vdso_clock_mode {
 	VDSO_CLOCKMODE_NONE,

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-23 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 13:39 [PATCH] vdso: Fix clocksource.h macro detection Vincenzo Frascino
2020-03-23 19:54 ` [tip: timers/core] " tip-bot2 for Vincenzo Frascino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.