All of lore.kernel.org
 help / color / mirror / Atom feed
From: JWP <elseifthen@gmx.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: [PATCH 1/4] hwclock: enable --directisa for x86_64
Date: Wed, 07 Jan 2015 23:13:21 -0500	[thread overview]
Message-ID: <54AE03E1.7020103@gmx.com> (raw)
In-Reply-To: <54AE031C.30907@gmx.com>

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>
---
 sys-utils/hwclock-cmos.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys-utils/hwclock-cmos.c b/sys-utils/hwclock-cmos.c
index ca6ab1c..8d68808 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;


  reply	other threads:[~2015-01-08  4:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  4:10 [PATCH 0/4] hwclock: x86_64 -- UTC Defaults -- v2.26 man updates JWP
2015-01-08  4:13 ` JWP [this message]
2015-01-09  9:51   ` [PATCH 1/4] hwclock: enable --directisa for x86_64 Karel Zak
2015-01-08  4:15 ` [PATCH 2/4] hwclock: Incorrect UTC defaults JWP
2015-01-08  4:18 ` [PATCH 3/4] hwclock: update man page for v2.26 rc JWP
2015-01-10 12:44   ` Benno Schulenberg
2015-01-10 18:08     ` JWP
2015-01-11 11:44       ` Benno Schulenberg
2015-01-11 18:59         ` JWP
2015-01-12  9:37         ` Karel Zak
2015-01-08  4:22 ` [PATCH 4/4] hwclock: man page 'Since v2.26' notes JWP

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54AE03E1.7020103@gmx.com \
    --to=elseifthen@gmx.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.