time: posix-stubs: provide compat itimer supoprt for alpha

Message ID 20191207191043.656328-1-arnd@arndb.de
State Accepted
Commit f35deaff1b8eadb9897e4fb8b3edc7717f4ec6fa
Headers show
Series
  • time: posix-stubs: provide compat itimer supoprt for alpha
Related show

Commit Message

Arnd Bergmann Dec. 7, 2019, 7:10 p.m.
Using compat_sys_getitimer and compat_sys_setitimer on alpha
causes a link failure in the Alpha tinyconfig and other configurations
that turn off CONFIG_POSIX_TIMERS.

Use the same #ifdef check for the stub version as well.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 4c22ea2b9120 ("y2038: use compat_{get,set}_itimer on alpha")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 kernel/time/posix-stubs.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.20.0

Comments

Guenter Roeck Dec. 7, 2019, 10:54 p.m. | #1
On Sat, Dec 07, 2019 at 08:10:26PM +0100, Arnd Bergmann wrote:
> Using compat_sys_getitimer and compat_sys_setitimer on alpha

> causes a link failure in the Alpha tinyconfig and other configurations

> that turn off CONFIG_POSIX_TIMERS.

> 

> Use the same #ifdef check for the stub version as well.

> 

> Reported-by: Guenter Roeck <linux@roeck-us.net>

> Reported-by: kbuild test robot <lkp@intel.com>

> Fixes: 4c22ea2b9120 ("y2038: use compat_{get,set}_itimer on alpha")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Tested-by: Guenter Roeck <linux@roeck-us.net>


> ---

>  kernel/time/posix-stubs.c | 3 +++

>  1 file changed, 3 insertions(+)

> 

> diff --git a/kernel/time/posix-stubs.c b/kernel/time/posix-stubs.c

> index 67df65f887ac..20c65a7d4e3a 100644

> --- a/kernel/time/posix-stubs.c

> +++ b/kernel/time/posix-stubs.c

> @@ -151,6 +151,9 @@ SYSCALL_DEFINE4(clock_nanosleep, const clockid_t, which_clock, int, flags,

>  

>  #ifdef CONFIG_COMPAT

>  COMPAT_SYS_NI(timer_create);

> +#endif

> +

> +#if defined(CONFIG_COMPAT) || defined(CONFIG_ALPHA)

>  COMPAT_SYS_NI(getitimer);

>  COMPAT_SYS_NI(setitimer);

>  #endif

> -- 

> 2.20.0

>

Patch

diff --git a/kernel/time/posix-stubs.c b/kernel/time/posix-stubs.c
index 67df65f887ac..20c65a7d4e3a 100644
--- a/kernel/time/posix-stubs.c
+++ b/kernel/time/posix-stubs.c
@@ -151,6 +151,9 @@  SYSCALL_DEFINE4(clock_nanosleep, const clockid_t, which_clock, int, flags,
 
 #ifdef CONFIG_COMPAT
 COMPAT_SYS_NI(timer_create);
+#endif
+
+#if defined(CONFIG_COMPAT) || defined(CONFIG_ALPHA)
 COMPAT_SYS_NI(getitimer);
 COMPAT_SYS_NI(setitimer);
 #endif