mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 05:50:52 +07:00
x86: use explicit copy in vdso_gettimeofday()
Jeremy's gcc 3.4 seems to be unable to inline a 8 byte memcpy. But the vdso doesn't support external references. Copy the structure members of struct timezone explicitely instead. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
2ddfd20e7c
commit
a1289643ad
@ -106,9 +106,9 @@ int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
do_realtime((struct timespec *)tv);
|
||||
tv->tv_usec /= 1000;
|
||||
if (unlikely(tz != NULL)) {
|
||||
/* This relies on gcc inlining the memcpy. We'll notice
|
||||
if it ever fails to do so. */
|
||||
memcpy(tz, >od->sys_tz, sizeof(struct timezone));
|
||||
/* Avoid memcpy. Some old compilers fail to inline it */
|
||||
tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest;
|
||||
tz->tz_dsttime = gtod->sys_tz.tz_dsttime;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user