* Re: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
@ 2002-12-17 20:13 ` Alex Williamson
2002-12-17 21:57 ` Peter Chubb
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Alex Williamson @ 2002-12-17 20:13 UTC (permalink / raw)
To: linux-ia64
Joel,
Does this provide more functionality than the EFI RTC?
Concerns I have w/ it on ia64 is that the rtc driver assumes
you have a legacy rtc at the legacy irq and port address.
This won't work on HP zx1 boxes, the legacy hardware doesn't
exist. In the future, there's a possibility that the port
address could be allocated to non-legacy purposes. Maybe
ACPI could tell you if you have a legacy RTC, it could at
least tell you if you support PC/AT compatible interrupts.
Thanks,
Alex
Joel GUILLET wrote:
>
> Hi,
>
> Here is a patch to use the Real Time Clock (RTC) on ia64.
> It works on a tiger. It doesn't on early lion machines. (Why ?)
> I don't know about others ia64 machines. Please report me - if you test
> it.
> To see if it works, please check the /var/log/messages. The driver reports
> sometimes that "rtc losts some interrupts..." It usually means that the
> rtc doesn't work, and the interruptions that arrived were coming from a
> software-timer (see the driver code).
>
> This patch is very simple.
> I changed the irq affected for the rtc as it is an "ex-i386" interruption.
> (an Ox20 offset)
> And copied some files from the asm-i386 to asm-ia64...
> The duplication of these files is a waste of disk space, but it's coherent
> with the way it has been made on i386.
>
> You may want to try this patch and test it.
> There is a program test included in the Documentation/rtc.txt of the
> kernel tree.
>
> The actual priority of the interruption is low but perhaps it might be
> changed (Do anyone know how to make it ?) for some usages.
>
> For the kernel releases after 2.5.45, I've seen that the Kconfig will be
> modified so that the option will not be available (unless you activate it
> manually).
>
> This can be used for example to run scheduler latencies tests (a way of
> using amlat) - I've got some more stuff for this, please mail me.
>
> Here is the patch :
>
> ********************************************
> diff -urN linux-2.5.45/arch/ia64/kernel/ia64_ksyms.c linux-2.5.45-clean/arch/ia64/kernel/ia64_ksyms.c
> --- linux-2.5.45/arch/ia64/kernel/ia64_ksyms.c Thu Oct 31 01:42:54 2002
> +++ linux-2.5.45-clean/arch/ia64/kernel/ia64_ksyms.c Tue Dec 17 15:08:19 2002
> @@ -143,3 +143,5 @@
> #endif
> EXPORT_SYMBOL(machvec_noop);
>
> +extern spinlock_t rtc_lock;
> +EXPORT_SYMBOL(rtc_lock);
> diff -urN linux-2.5.45/arch/ia64/kernel/time.c linux-2.5.45-clean/arch/ia64/kernel/time.c
> --- linux-2.5.45/arch/ia64/kernel/time.c Thu Oct 31 01:42:20 2002
> +++ linux-2.5.45-clean/arch/ia64/kernel/time.c Tue Dec 17 15:08:19 2002
> @@ -27,6 +27,7 @@
> extern rwlock_t xtime_lock;
> extern unsigned long wall_jiffies;
> extern unsigned long last_time_offset;
> +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
>
> u64 jiffies_64;
>
> diff -urN linux-2.5.45/include/asm-ia64/mc146818rtc.h linux-2.5.45-clean/include/asm-ia64/mc146818rtc.h
> --- linux-2.5.45/include/asm-ia64/mc146818rtc.h Thu Oct 31 01:43:38 2002
> +++ linux-2.5.45-clean/include/asm-ia64/mc146818rtc.h Tue Dec 17 15:10:12 2002
> @@ -1,10 +1,29 @@
> +/*
> + * Machine dependent access functions for RTC registers.
> + */
> #ifndef _ASM_IA64_MC146818RTC_H
> #define _ASM_IA64_MC146818RTC_H
>
> +#include <asm/io.h>
> +
> +#ifndef RTC_PORT
> +#define RTC_PORT(x) (0x70 + (x))
> +#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
> +#endif
> +
> /*
> - * Machine dependent access functions for RTC registers.
> + * The yet supported machines all access the RTC index register via
> + * an ISA port access but the way to access the date register differs ...
> */
> +#define CMOS_READ(addr) ({ \
> +outb_p((addr),RTC_PORT(0)); \
> +inb_p(RTC_PORT(1)); \
> +})
> +#define CMOS_WRITE(val, addr) ({ \
> +outb_p((addr),RTC_PORT(0)); \
> +outb_p((val),RTC_PORT(1)); \
> +})
>
> -/* empty include file to satisfy the include in genrtc.c */
> +#define RTC_IRQ 40 /* irq on a i386 + Ox20 */
>
> #endif /* _ASM_IA64_MC146818RTC_H */
> diff -urN linux-2.5.45/include/asm-ia64/rtc.h linux-2.5.45-clean/include/asm-ia64/rtc.h
> --- linux-2.5.45/include/asm-ia64/rtc.h Thu Jan 1 01:00:00 1970
> +++ linux-2.5.45-clean/include/asm-ia64/rtc.h Tue Dec 17 15:09:03 2002
> @@ -0,0 +1,10 @@
> +#ifndef _IA64_RTC_H
> +#define _IA64_RTC_H
> +
> +/*
> + * ia64 uses the default access methods for the RTC.
> + */
> +
> +#include <asm-generic/rtc.h>
> +
> +#endif
> **************************************************************
>
> --------------
> ** Joel
>
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64
--
Alex Williamson Linux Development Lab
alex_williamson@hp.com Hewlett Packard
970-898-9173 Fort Collins, CO
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
2002-12-17 20:13 ` Alex Williamson
@ 2002-12-17 21:57 ` Peter Chubb
2002-12-17 23:57 ` David Mosberger
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Peter Chubb @ 2002-12-17 21:57 UTC (permalink / raw)
To: linux-ia64
>>>>> "Alex" = Alex Williamson <alex_williamson@hp.com> writes:
Alex> Joel, Does this provide more functionality than the EFI RTC?
Alex> Concerns I have w/ it on ia64 is that the rtc driver assumes you
Alex> have a legacy rtc at the legacy irq and port address. This
Alex> won't work on HP zx1 boxes, the legacy hardware doesn't exist.
Alex> In the future, there's a possibility that the port address could
Alex> be allocated to non-legacy purposes. Maybe ACPI could tell you
Alex> if you have a legacy RTC, it could at least tell you if you
Alex> support PC/AT compatible interrupts. Thanks,
Yes it does. There's no way to get a regular interrupt into user
space from the EFI RTC.
I've been using the PMU to generate regular interrupts, and have a
locally-modified amlat benchmark that does that.
--
Dr Peter Chubb peterc@gelato.unsw.edu.au
You are lost in a maze of BitKeeper repositories, all almost the same.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
2002-12-17 20:13 ` Alex Williamson
2002-12-17 21:57 ` Peter Chubb
@ 2002-12-17 23:57 ` David Mosberger
2002-12-18 15:01 ` Joel GUILLET
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: David Mosberger @ 2002-12-17 23:57 UTC (permalink / raw)
To: linux-ia64
>>>>> On Tue, 17 Dec 2002 17:26:10 +0100 (NFT), Joel GUILLET <Joel.Guillet@bull.net> said:
Joel> This can be used for example to run scheduler latencies tests
Joel> (a way of using amlat) - I've got some more stuff for this,
Joel> please mail me.
What's wrong with using the PMU for this? That's something that works
on all ia64 platforms and doesn't depend on legacy hardware.
--david
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
` (2 preceding siblings ...)
2002-12-17 23:57 ` David Mosberger
@ 2002-12-18 15:01 ` Joel GUILLET
2002-12-18 18:18 ` Stephane Eranian
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Joel GUILLET @ 2002-12-18 15:01 UTC (permalink / raw)
To: linux-ia64
On Wed, 18 Dec 2002, Peter Chubb wrote:
> >>>>> "Alex" = Alex Williamson <alex_williamson@hp.com> writes:
>
> Alex> Joel, Does this provide more functionality than the EFI RTC?
> Alex> Concerns I have w/ it on ia64 is that the rtc driver assumes you
> Alex> have a legacy rtc at the legacy irq and port address. This
> Alex> won't work on HP zx1 boxes, the legacy hardware doesn't exist.
> Alex> In the future, there's a possibility that the port address could
> Alex> be allocated to non-legacy purposes. Maybe ACPI could tell you
> Alex> if you have a legacy RTC, it could at least tell you if you
> Alex> support PC/AT compatible interrupts. Thanks,
>
Peter> Yes it does. There's no way to get a regular interrupt into user
Peter> space from the EFI RTC.
The RTC legacy hardware seems to be on the i870 chipset. And if you don't
have this one, you may not be able to use it.
Peter> I've been using the PMU to generate regular interrupts, and have a
Peter> locally-modified amlat benchmark that does that.
Did you modify anything inside the kernel to make use of this timer ?
With PMU, you mean "Performance Monitoring Unit" or "Power Management
Utility" ? -- this question may look strange but with the acutal high
resolution timer his ACPI PowerManagement timer, I've finally got some
doubts.
I had a looked at the PMU code but I couldn't find anything about the way
of using this timer ? Is it built-in somewhere ?
Do I need to implement some code in the kernel to use it ? I've
been trying to find some docs in the Web for quite a long time ... but
without any results ! Does an user interface already exist ?
Thanks for your help.
Regards,
-------------
** Joel
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
` (3 preceding siblings ...)
2002-12-18 15:01 ` Joel GUILLET
@ 2002-12-18 18:18 ` Stephane Eranian
2002-12-18 19:26 ` Alex Williamson
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Stephane Eranian @ 2002-12-18 18:18 UTC (permalink / raw)
To: linux-ia64
Joel,
On Wed, Dec 18, 2002 at 04:01:56PM +0100, Joel GUILLET wrote:
>
> On Wed, 18 Dec 2002, Peter Chubb wrote:
>
> > >>>>> "Alex" = Alex Williamson <alex_williamson@hp.com> writes:
> >
> > Alex> Joel, Does this provide more functionality than the EFI RTC?
> > Alex> Concerns I have w/ it on ia64 is that the rtc driver assumes you
> > Alex> have a legacy rtc at the legacy irq and port address. This
> > Alex> won't work on HP zx1 boxes, the legacy hardware doesn't exist.
> > Alex> In the future, there's a possibility that the port address could
> > Alex> be allocated to non-legacy purposes. Maybe ACPI could tell you
> > Alex> if you have a legacy RTC, it could at least tell you if you
> > Alex> support PC/AT compatible interrupts. Thanks,
> >
> Peter> Yes it does. There's no way to get a regular interrupt into user
> Peter> space from the EFI RTC.
>
> The RTC legacy hardware seems to be on the i870 chipset. And if you don't
> have this one, you may not be able to use it.
>
> Peter> I've been using the PMU to generate regular interrupts, and have a
> Peter> locally-modified amlat benchmark that does that.
>
> Did you modify anything inside the kernel to make use of this timer ?
> With PMU, you mean "Performance Monitoring Unit" or "Power Management
> Utility" ? -- this question may look strange but with the acutal high
> resolution timer his ACPI PowerManagement timer, I've finally got some
> doubts.
>
> I had a looked at the PMU code but I couldn't find anything about the way
> of using this timer ? Is it built-in somewhere ?
> Do I need to implement some code in the kernel to use it ? I've
> been trying to find some docs in the Web for quite a long time ... but
> without any results ! Does an user interface already exist ?
>
PMU means Performance Monitoring Unit. What David meant is that you can get
fine grain timer with the PMU by using the CPU_CYCLES event. You can program a
PMU counter to overflow after a certain number of cycles have elapsed. It is
very fine grain because you get down to the cycle. If you setup the counter to
2^64-n, then it will overflow after n cycles. Setting this up is relatively
easy. I encourage you to download the libpfm library. It contains examples
on how to setup counters and get overflow notifications. You can get
the library and also the pfmon monitoring tool from:
ftp://ftp.hpl.hp.com/pub/linux-ia64/libpfm-2.0.tar.gz
ftp://ftp.hpl.hp.com/pub/linux-ia64/pfmon-2.0.tar.gz
These two package are beta versions of the upcoming 2.0 release.
--
-Stephane
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
` (4 preceding siblings ...)
2002-12-18 18:18 ` Stephane Eranian
@ 2002-12-18 19:26 ` Alex Williamson
2003-07-01 6:11 ` Zhu, Yi
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Alex Williamson @ 2002-12-18 19:26 UTC (permalink / raw)
To: linux-ia64
Joel GUILLET wrote:
>
> The RTC legacy hardware seems to be on the i870 chipset. And if you don't
> have this one, you may not be able to use it.
Obviously, but that wasn't really my point. What I'm really
after is that on ia64 you really shouldn't be assuming legacy
hardware is present and blindly poking port space and setting up
irqs based on that assumption. Not only might it not work on
a legacy free box, it might break other things. I think you
really need to make some attempt to determine if the hardware is
out there, and I don't see one in the rtc_init path.
Alex
--
Alex Williamson Linux Development Lab
alex_williamson@hp.com Hewlett Packard
970-898-9173 Fort Collins, CO
^ permalink raw reply [flat|nested] 12+ messages in thread* RE: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
` (5 preceding siblings ...)
2002-12-18 19:26 ` Alex Williamson
@ 2003-07-01 6:11 ` Zhu, Yi
2003-07-01 6:11 ` Zhu, Yi
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Zhu, Yi @ 2003-07-01 6:11 UTC (permalink / raw)
To: linux-ia64
Hi Joel,
Do you have the ia64 rtc patch for 2.4 kernel? I need the rtc
driver to test the latency with realfeel.
Thanks,
-yi
> -----Original Message-----
> From: Joel GUILLET [mailto:Joel.Guillet@bull.net]
> Sent: Wednesday, December 18, 2002 12:26 AM
> To: linux-ia64@linuxia64.org
> Subject: [Linux-ia64] RTC support on ia64
>
>
>
> Hi,
>
> Here is a patch to use the Real Time Clock (RTC) on ia64.
> It works on a tiger. It doesn't on early lion machines. (Why ?)
> I don't know about others ia64 machines. Please report me -
> if you test
> it.
> To see if it works, please check the /var/log/messages. The
> driver reports
> sometimes that "rtc losts some interrupts..." It usually
> means that the
> rtc doesn't work, and the interruptions that arrived were
> coming from a
> software-timer (see the driver code).
>
>
> This patch is very simple.
> I changed the irq affected for the rtc as it is an "ex-i386"
> interruption.
> (an Ox20 offset)
> And copied some files from the asm-i386 to asm-ia64...
> The duplication of these files is a waste of disk space, but
> it's coherent
> with the way it has been made on i386.
>
> You may want to try this patch and test it.
> There is a program test included in the Documentation/rtc.txt of the
> kernel tree.
>
> The actual priority of the interruption is low but perhaps it might be
> changed (Do anyone know how to make it ?) for some usages.
>
> For the kernel releases after 2.5.45, I've seen that the
> Kconfig will be
> modified so that the option will not be available (unless you
> activate it
> manually).
>
> This can be used for example to run scheduler latencies tests
> (a way of
> using amlat) - I've got some more stuff for this, please mail me.
>
> Here is the patch :
>
>
> ********************************************
> diff -urN linux-2.5.45/arch/ia64/kernel/ia64_ksyms.c
> linux-2.5.45-clean/arch/ia64/kernel/ia64_ksyms.c
> --- linux-2.5.45/arch/ia64/kernel/ia64_ksyms.c Thu Oct
> 31 01:42:54 2002
> +++ linux-2.5.45-clean/arch/ia64/kernel/ia64_ksyms.c Tue Dec
> 17 15:08:19 2002
> @@ -143,3 +143,5 @@
> #endif
> EXPORT_SYMBOL(machvec_noop);
>
> +extern spinlock_t rtc_lock;
> +EXPORT_SYMBOL(rtc_lock);
> diff -urN linux-2.5.45/arch/ia64/kernel/time.c
> linux-2.5.45-clean/arch/ia64/kernel/time.c
> --- linux-2.5.45/arch/ia64/kernel/time.c Thu Oct 31 01:42:20 2002
> +++ linux-2.5.45-clean/arch/ia64/kernel/time.c Tue Dec
> 17 15:08:19 2002
> @@ -27,6 +27,7 @@
> extern rwlock_t xtime_lock;
> extern unsigned long wall_jiffies;
> extern unsigned long last_time_offset;
> +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
>
> u64 jiffies_64;
>
> diff -urN linux-2.5.45/include/asm-ia64/mc146818rtc.h
> linux-2.5.45-clean/include/asm-ia64/mc146818rtc.h
> --- linux-2.5.45/include/asm-ia64/mc146818rtc.h Thu Oct
> 31 01:43:38 2002
> +++ linux-2.5.45-clean/include/asm-ia64/mc146818rtc.h Tue Dec
> 17 15:10:12 2002
> @@ -1,10 +1,29 @@
> +/*
> + * Machine dependent access functions for RTC registers.
> + */
> #ifndef _ASM_IA64_MC146818RTC_H
> #define _ASM_IA64_MC146818RTC_H
>
> +#include <asm/io.h>
> +
> +#ifndef RTC_PORT
> +#define RTC_PORT(x) (0x70 + (x))
> +#define RTC_ALWAYS_BCD 1 /* RTC operates in
> binary mode */
> +#endif
> +
> /*
> - * Machine dependent access functions for RTC registers.
> + * The yet supported machines all access the RTC index register via
> + * an ISA port access but the way to access the date
> register differs ...
> */
> +#define CMOS_READ(addr) ({ \
> +outb_p((addr),RTC_PORT(0)); \
> +inb_p(RTC_PORT(1)); \
> +})
> +#define CMOS_WRITE(val, addr) ({ \
> +outb_p((addr),RTC_PORT(0)); \
> +outb_p((val),RTC_PORT(1)); \
> +})
>
> -/* empty include file to satisfy the include in genrtc.c */
> +#define RTC_IRQ 40 /* irq on a i386 + Ox20 */
>
> #endif /* _ASM_IA64_MC146818RTC_H */
> diff -urN linux-2.5.45/include/asm-ia64/rtc.h
> linux-2.5.45-clean/include/asm-ia64/rtc.h
> --- linux-2.5.45/include/asm-ia64/rtc.h Thu Jan 1 01:00:00 1970
> +++ linux-2.5.45-clean/include/asm-ia64/rtc.h Tue Dec 17 15:09:03 2002
> @@ -0,0 +1,10 @@
> +#ifndef _IA64_RTC_H
> +#define _IA64_RTC_H
> +
> +/*
> + * ia64 uses the default access methods for the RTC.
> + */
> +
> +#include <asm-generic/rtc.h>
> +
> +#endif
> **************************************************************
>
>
> --------------
> ** Joel
>
>
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64
>
^ permalink raw reply [flat|nested] 12+ messages in thread* RE: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
` (6 preceding siblings ...)
2003-07-01 6:11 ` Zhu, Yi
@ 2003-07-01 6:11 ` Zhu, Yi
2003-07-01 12:15 ` Eric Piel
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Zhu, Yi @ 2003-07-01 6:11 UTC (permalink / raw)
To: linux-ia64
Hi Joel,
Do you have the ia64 rtc patch for 2.4 kernel? I need the rtc
driver to test the latency with realfeel.
Thanks,
-yi
> -----Original Message-----
> From: Joel GUILLET [mailto:Joel.Guillet@bull.net]
> Sent: Wednesday, December 18, 2002 12:26 AM
> To: linux-ia64@linuxia64.org
> Subject: [Linux-ia64] RTC support on ia64
>
>
>
> Hi,
>
> Here is a patch to use the Real Time Clock (RTC) on ia64.
> It works on a tiger. It doesn't on early lion machines. (Why ?)
> I don't know about others ia64 machines. Please report me -
> if you test
> it.
> To see if it works, please check the /var/log/messages. The
> driver reports
> sometimes that "rtc losts some interrupts..." It usually
> means that the
> rtc doesn't work, and the interruptions that arrived were
> coming from a
> software-timer (see the driver code).
>
>
> This patch is very simple.
> I changed the irq affected for the rtc as it is an "ex-i386"
> interruption.
> (an Ox20 offset)
> And copied some files from the asm-i386 to asm-ia64...
> The duplication of these files is a waste of disk space, but
> it's coherent
> with the way it has been made on i386.
>
> You may want to try this patch and test it.
> There is a program test included in the Documentation/rtc.txt of the
> kernel tree.
>
> The actual priority of the interruption is low but perhaps it might be
> changed (Do anyone know how to make it ?) for some usages.
>
> For the kernel releases after 2.5.45, I've seen that the
> Kconfig will be
> modified so that the option will not be available (unless you
> activate it
> manually).
>
> This can be used for example to run scheduler latencies tests
> (a way of
> using amlat) - I've got some more stuff for this, please mail me.
>
> Here is the patch :
>
>
> ********************************************
> diff -urN linux-2.5.45/arch/ia64/kernel/ia64_ksyms.c
> linux-2.5.45-clean/arch/ia64/kernel/ia64_ksyms.c
> --- linux-2.5.45/arch/ia64/kernel/ia64_ksyms.c Thu Oct
> 31 01:42:54 2002
> +++ linux-2.5.45-clean/arch/ia64/kernel/ia64_ksyms.c Tue Dec
> 17 15:08:19 2002
> @@ -143,3 +143,5 @@
> #endif
> EXPORT_SYMBOL(machvec_noop);
>
> +extern spinlock_t rtc_lock;
> +EXPORT_SYMBOL(rtc_lock);
> diff -urN linux-2.5.45/arch/ia64/kernel/time.c
> linux-2.5.45-clean/arch/ia64/kernel/time.c
> --- linux-2.5.45/arch/ia64/kernel/time.c Thu Oct 31 01:42:20 2002
> +++ linux-2.5.45-clean/arch/ia64/kernel/time.c Tue Dec
> 17 15:08:19 2002
> @@ -27,6 +27,7 @@
> extern rwlock_t xtime_lock;
> extern unsigned long wall_jiffies;
> extern unsigned long last_time_offset;
> +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
>
> u64 jiffies_64;
>
> diff -urN linux-2.5.45/include/asm-ia64/mc146818rtc.h
> linux-2.5.45-clean/include/asm-ia64/mc146818rtc.h
> --- linux-2.5.45/include/asm-ia64/mc146818rtc.h Thu Oct
> 31 01:43:38 2002
> +++ linux-2.5.45-clean/include/asm-ia64/mc146818rtc.h Tue Dec
> 17 15:10:12 2002
> @@ -1,10 +1,29 @@
> +/*
> + * Machine dependent access functions for RTC registers.
> + */
> #ifndef _ASM_IA64_MC146818RTC_H
> #define _ASM_IA64_MC146818RTC_H
>
> +#include <asm/io.h>
> +
> +#ifndef RTC_PORT
> +#define RTC_PORT(x) (0x70 + (x))
> +#define RTC_ALWAYS_BCD 1 /* RTC operates in
> binary mode */
> +#endif
> +
> /*
> - * Machine dependent access functions for RTC registers.
> + * The yet supported machines all access the RTC index register via
> + * an ISA port access but the way to access the date
> register differs ...
> */
> +#define CMOS_READ(addr) ({ \
> +outb_p((addr),RTC_PORT(0)); \
> +inb_p(RTC_PORT(1)); \
> +})
> +#define CMOS_WRITE(val, addr) ({ \
> +outb_p((addr),RTC_PORT(0)); \
> +outb_p((val),RTC_PORT(1)); \
> +})
>
> -/* empty include file to satisfy the include in genrtc.c */
> +#define RTC_IRQ 40 /* irq on a i386 + Ox20 */
>
> #endif /* _ASM_IA64_MC146818RTC_H */
> diff -urN linux-2.5.45/include/asm-ia64/rtc.h
> linux-2.5.45-clean/include/asm-ia64/rtc.h
> --- linux-2.5.45/include/asm-ia64/rtc.h Thu Jan 1 01:00:00 1970
> +++ linux-2.5.45-clean/include/asm-ia64/rtc.h Tue Dec 17 15:09:03 2002
> @@ -0,0 +1,10 @@
> +#ifndef _IA64_RTC_H
> +#define _IA64_RTC_H
> +
> +/*
> + * ia64 uses the default access methods for the RTC.
> + */
> +
> +#include <asm-generic/rtc.h>
> +
> +#endif
> **************************************************************
>
>
> --------------
> ** Joel
>
>
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64
>
_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
` (7 preceding siblings ...)
2003-07-01 6:11 ` Zhu, Yi
@ 2003-07-01 12:15 ` Eric Piel
2003-07-01 22:53 ` Peter Chubb
2003-07-02 0:45 ` Zhu, Yi
10 siblings, 0 replies; 12+ messages in thread
From: Eric Piel @ 2003-07-01 12:15 UTC (permalink / raw)
To: linux-ia64
"Zhu, Yi" wrote:
>
> Hi Joel,
>
> Do you have the ia64 rtc patch for 2.4 kernel? I need the rtc
> driver to test the latency with realfeel.
Hello Yi,
Joel was a trainee, so he's not here anymore and I'm the new one.
We do not have any 2.4 version but the backport shouldn't be hard. When
Joel did this patch it was also in order to get realfeel working.
The point is that it seems on ia64 measuring latencies using the perfmon
capabilities of the processor is a much better idea.
Peter Chubb even developed a small realfeel equivalent that does exactly
that! It should work both on 2.4 and 2.5 kernels. You can find it on the
perfmon homepage and at this address:
http://www.gelato.unsw.edu.au/patches/realfeel4.c
Cheers
Eric
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
` (8 preceding siblings ...)
2003-07-01 12:15 ` Eric Piel
@ 2003-07-01 22:53 ` Peter Chubb
2003-07-02 0:45 ` Zhu, Yi
10 siblings, 0 replies; 12+ messages in thread
From: Peter Chubb @ 2003-07-01 22:53 UTC (permalink / raw)
To: linux-ia64
>>>>> "Eric" = Eric Piel <Eric.Piel@Bull.Net> writes:
Eric> Peter Chubb even developed a small realfeel equivalent that does
Eric> exactly that! It should work both on 2.4 and 2.5 kernels. You
Eric> can find it on the perfmon homepage and at this address:
Eric> http://www.gelato.unsw.edu.au/patches/realfeel4.c
I've also developed a microstate accounting patch that allows you to
measure the times in the interrupt handler and on the ACTIVE and
EXPIRED queues directly (and hence gives a direct measurement of
latency). The patch was posted to LKML; and there'll be a copy on the
gelato web page ( http://www.gelato.unsw.edu.au/patches ) later today.
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
You are lost in a maze of BitKeeper repositories, all slightly different.
^ permalink raw reply [flat|nested] 12+ messages in thread* RE: [Linux-ia64] RTC support on ia64
2002-12-17 16:26 [Linux-ia64] RTC support on ia64 Joel GUILLET
` (9 preceding siblings ...)
2003-07-01 22:53 ` Peter Chubb
@ 2003-07-02 0:45 ` Zhu, Yi
10 siblings, 0 replies; 12+ messages in thread
From: Zhu, Yi @ 2003-07-02 0:45 UTC (permalink / raw)
To: linux-ia64
Thanks both! I got realfeel4 work!
-yi
> -----Original Message-----
> From: Eric Piel [mailto:Eric.Piel@Bull.Net]
> Sent: Tuesday, July 01, 2003 8:15 PM
> To: Zhu, Yi
> Cc: Joel GUILLET; linux-ia64@vger.kernel.org
> Subject: Re: [Linux-ia64] RTC support on ia64
>
>
> "Zhu, Yi" wrote:
> >
> > Hi Joel,
> >
> > Do you have the ia64 rtc patch for 2.4 kernel? I need the rtc
> > driver to test the latency with realfeel.
>
> Hello Yi,
> Joel was a trainee, so he's not here anymore and I'm the new one.
>
> We do not have any 2.4 version but the backport shouldn't be
> hard. When
> Joel did this patch it was also in order to get realfeel working.
> The point is that it seems on ia64 measuring latencies using
> the perfmon
> capabilities of the processor is a much better idea.
>
> Peter Chubb even developed a small realfeel equivalent that
> does exactly
> that! It should work both on 2.4 and 2.5 kernels. You can
> find it on the
> perfmon homepage and at this address:
> http://www.gelato.unsw.edu.au/patches/realfeel4.c
>
> Cheers
> Eric
>
^ permalink raw reply [flat|nested] 12+ messages in thread