Skip to content

Commit

Permalink
y2038: remove struct definition redirects
Browse files Browse the repository at this point in the history
We now use 64-bit time_t on all architectures, so the __kernel_timex,
__kernel_timeval and __kernel_timespec redirects can be removed
after having served their purpose.

This makes it all much less confusing, as the __kernel_* types
now always refer to the same layout based on 64-bit time_t across
all 32-bit and 64-bit architectures.

Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
arndb committed Feb 6, 2019
1 parent 00bf25d commit c70a772
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 21 deletions.
8 changes: 0 additions & 8 deletions include/linux/time64.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
typedef __s64 time64_t;
typedef __u64 timeu64_t;

/* CONFIG_64BIT_TIME enables new 64 bit time_t syscalls in the compat path
* and 32-bit emulation.
*/
#ifndef CONFIG_64BIT_TIME
#define __kernel_timespec timespec
#define __kernel_itimerspec itimerspec
#endif

#include <uapi/linux/time.h>

struct timespec64 {
Expand Down
7 changes: 0 additions & 7 deletions include/linux/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@
#ifndef _LINUX_TIMEX_H
#define _LINUX_TIMEX_H

/* CONFIG_64BIT_TIME enables new 64 bit time_t syscalls in the compat path
* and 32-bit emulation.
*/
#ifndef CONFIG_64BIT_TIME
#define __kernel_timex timex
#endif

#include <uapi/linux/timex.h>

#define ADJ_ADJTIME 0x8000 /* switch between adjtime/adjtimex modes */
Expand Down
4 changes: 0 additions & 4 deletions include/uapi/linux/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,15 @@ struct itimerval {
struct timeval it_value; /* current value */
};

#ifndef __kernel_timespec
struct __kernel_timespec {
__kernel_time64_t tv_sec; /* seconds */
long long tv_nsec; /* nanoseconds */
};
#endif

#ifndef __kernel_itimerspec
struct __kernel_itimerspec {
struct __kernel_timespec it_interval; /* timer period */
struct __kernel_timespec it_value; /* timer expiration */
};
#endif

/*
* legacy timeval structure, only embedded in structures that
Expand Down
2 changes: 0 additions & 2 deletions include/uapi/linux/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ struct __kernel_timex_timeval {
long long tv_usec;
};

#ifndef __kernel_timex
struct __kernel_timex {
unsigned int modes; /* mode selector */
int :32; /* pad */
Expand Down Expand Up @@ -131,7 +130,6 @@ struct __kernel_timex {
int :32; int :32; int :32; int :32;
int :32; int :32; int :32;
};
#endif

/*
* Mode codes (timex.mode)
Expand Down

0 comments on commit c70a772

Please sign in to comment.