summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock-cmos.c
diff options
context:
space:
mode:
authorJWP2015-01-08 05:13:21 +0100
committerKarel Zak2015-01-09 10:44:00 +0100
commitcfb8ed1910677bd096dee8404a9e03d5e59ef357 (patch)
tree8f41fbd4e4fb755bae219e56f46a19bd9c0b4358 /sys-utils/hwclock-cmos.c
parentnsenter: add --preserve-credentials and cleanup setgroups() usage (diff)
downloadkernel-qcow2-util-linux-cfb8ed1910677bd096dee8404a9e03d5e59ef357.tar.gz
kernel-qcow2-util-linux-cfb8ed1910677bd096dee8404a9e03d5e59ef357.tar.xz
kernel-qcow2-util-linux-cfb8ed1910677bd096dee8404a9e03d5e59ef357.zip
hwclock: enable --directisa for x86_64
Currently only x86 and Alpha can use --directisa. This patch allows x86_64 machines to use it as well. Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock-cmos.c')
-rw-r--r--sys-utils/hwclock-cmos.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys-utils/hwclock-cmos.c b/sys-utils/hwclock-cmos.c
index ca6ab1c5c..8d688083b 100644
--- a/sys-utils/hwclock-cmos.c
+++ b/sys-utils/hwclock-cmos.c
@@ -55,7 +55,7 @@
#include "c.h"
#include "nls.h"
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
# ifdef HAVE_SYS_IO_H
# include <sys/io.h>
# elif defined(HAVE_ASM_IO_H)
@@ -66,6 +66,7 @@
* not export that header.
*/
#undef __i386__
+#undef __x86_64__
void outb(int a __attribute__ ((__unused__)),
int b __attribute__ ((__unused__)))
{
@@ -75,7 +76,7 @@ int inb(int c __attribute__ ((__unused__)))
{
return 0;
}
-#endif /* __i386__ */
+#endif /* __i386__ __x86_64__ */
#elif defined(__alpha__)
/* <asm/io.h> fails to compile, probably because of u8 etc */
@@ -603,7 +604,7 @@ static int set_hardware_clock_cmos(const struct tm *new_broken_time)
return 0;
}
-#if defined(__i386__) || defined(__alpha__)
+#if defined(__i386__) || defined(__alpha__) || defined(__x86_64__)
# if defined(HAVE_IOPL)
static int i386_iopl(const int level)
{
@@ -663,7 +664,7 @@ static struct clock_ops cmos = {
struct clock_ops *probe_for_cmos_clock(void)
{
int have_cmos =
-#if defined(__i386__) || defined(__alpha__)
+#if defined(__i386__) || defined(__alpha__) || defined(__x86_64__)
TRUE;
#else
FALSE;