[PATCH] 2.6.9-rc1 Ia64 build broken due to HPET

From: Darren Williams <dsw_at_gelato.unsw.edu.au>
Date: 2004-09-10 14:12:00
The ia64 build broke overnight due to this patch
http://marc.theaimsgroup.com/?l=linux-ia64&m=109211170801213&w=2
any ia64 arch that includes CONFIG_HPET will fail
on the build, this effect generic_defconfig also.


  CC      drivers/char/hpet.o
drivers/char/hpet.c:669: error: `MC' undeclared here (not in a function)
drivers/char/hpet.c:669: error: initializer element is not constant
drivers/char/hpet.c:669: error: (near initialization for `hpet_interpolator.addr')
drivers/char/hpet.c: In function `hpet_init':
drivers/char/hpet.c:956: error: `hpet_cycles_per_sec' undeclared (first use in this function)
drivers/char/hpet.c:956: error: (Each undeclared identifier is reported only once
drivers/char/hpet.c:956: error: for each function it appears in.)
drivers/char/hpet.c:960: error: `hpet_nsecs_per_cycle' undeclared (first use in this function)
make[2]: *** [drivers/char/hpet.o] Error 1

The included patch will need to be scrutinised due
to the fact I had no idea what to assign to:
hpet_interpolator.addr
signed-off-by Darren Williams <dswATgelato.unsw.edu.au>

# ChangeSet
#   2004/09/10 13:11:25+10:00 dsw@vanilla.gelato 
#   Define hpet_cycles_per_sec for hpet clock calculation and assign
#   nsec_per_cyc directly to hpet_interpolator.nsec_per_cyc
#   
#   The assignment of .addr = hpet_control is more than likely bogus
#   time_interpolator.addr requires an address of a counter or function
# 
# drivers/char/hpet.c
#   2004/09/10 13:11:18+10:00 dsw@vanilla.gelato +4 -3
#   Define hpet_cycles_per_sec for hpet clock calculation and assign
#   nsec_per_cyc directly to hpet_interpolator.nsec_per_cyc
#   
#   The assignment of .addr = hpet_control is more than likely bogus
#   time_interpolator.addr requires an address of a counter or function
#   
diff -Nru a/drivers/char/hpet.c b/drivers/char/hpet.c
--- a/drivers/char/hpet.c	2004-09-10 13:36:48 +10:00
+++ b/drivers/char/hpet.c	2004-09-10 13:36:48 +10:00
@@ -665,7 +665,7 @@
 static struct time_interpolator hpet_interpolator = {
 	.source = TIME_SOURCE_MMIO64,
 	.shift = 10,
-	.addr = MC
+	.addr = hpet_control
 };
 
 #endif
@@ -951,13 +951,14 @@
 #ifdef	CONFIG_TIME_INTERPOLATION
 		{
 			struct hpet *hpet;
-
+			long hpet_cycles_per_sec;
+
 			hpet = hpets->hp_hpet;
 			hpet_cycles_per_sec = hpet_time_div(hpets->hp_period);
 			hpet_interpolator.frequency = hpet_cycles_per_sec;
 			hpet_interpolator.drift = hpet_cycles_per_sec *
 			    HPET_DRIFT / 1000000;
-			hpet_nsecs_per_cycle = 1000000000 / hpet_cycles_per_sec;
+			hpet_interpolator.nsec_per_cyc = 1000000000 / hpet_cycles_per_sec;
 			register_time_interpolator(&hpet_interpolator);
 		}
 #endif


--------------------------------------------------
Darren Williams <dsw AT gelato.unsw.edu.au>
Gelato@UNSW <www.gelato.unsw.edu.au>
--------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Sep 10 00:12:20 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:30 EST