login
Login
/
Register
Search
Header Space
Forums
News
Jobs
Blogs
Features
Man Pages
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
April
»
27
Re: [PATCH 1/3] ia64: convert to use clocksource code
view
thread
Score:
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Peter Keilty <peter.keilty@...>
To: Chris Wright <chrisw@...>
Cc: <linux-ia64@...>, John Stultz <johnstul@...>, Eric Whitney <eric.whitney@...>, <linux-kernel@...>
Subject:
Re: [PATCH 1/3] ia64: convert to use clocksource code
Date: Friday, April 27, 2007 - 9:35 am
Chris Wright wrote:
quoted text
>* Peter Keilty (
peter.keilty@hp.com
) wrote: > > >>diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c >>index 6077300..35ad71f 100644 >>--- a/drivers/acpi/processor_idle.c >>+++ b/drivers/acpi/processor_idle.c >>@@ -480,10 +480,12 @@ #endif >> /* Get end time (ticks) */ >> t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); >> >>+#ifndef CONFIG_IA64 >> #ifdef CONFIG_GENERIC_TIME >> /* TSC halts in C2, so notify users */ >> mark_tsc_unstable(); >> #endif >>+#endif >> >> > >Is this a better description of the dependency? > > #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86_TSC) > >
yes, ok.
quoted text
> > >> /* Re-enable interrupts */ >> local_irq_enable(); >> current_thread_info()->status |= TS_POLLING; >>@@ -522,10 +524,12 @@ #endif >> acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); >> } >> >>+#ifndef CONFIG_IA64 >> #ifdef CONFIG_GENERIC_TIME >> /* TSC halts in C3, so notify users */ >> mark_tsc_unstable(); >> #endif >>+#endif >> >> > >ditto > > > >> /* Re-enable interrupts */ >> local_irq_enable(); >> current_thread_info()->status |= TS_POLLING; >>diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c >>index 0be700f..5ea7d3e 100644 >>--- a/drivers/char/hpet.c >>+++ b/drivers/char/hpet.c >>@@ -29,6 +29,7 @@ #include <linux/wait.h> >> #include <linux/bcd.h> >> #include <linux/seq_file.h> >> #include <linux/bitops.h> >>+#include <linux/clocksource.h> >> >> #include <asm/current.h> >> #include <asm/uaccess.h> >>@@ -51,8 +52,34 @@ #define HPET_DRIFT (500) >> >> #define HPET_RANGE_SIZE 1024 /* from HPET spec */ >> >>+#if BITS_PER_LONG == 64 >>+#define write_counter(V, MC) writeq(V, MC) >>+#define read_counter(MC) readq(MC) >>+#else >>+#define write_counter(V, MC) writel(V, MC) >>+#define read_counter(MC) readl(MC) >>+#endif >>+ >> static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ; >> >>+static void __iomem *hpet_mc_ptr; >> >> > >CodingStyle nit: we don't need all this _ptr... > > > >>+static cycle_t read_hpet(void) >>+{ >>+ return (cycle_t)read_counter((void __iomem *)hpet_mc_ptr); >>+} >>+ >>+static struct clocksource clocksource_hpet = { >>+ .name = "hpet", >>+ .rating = 300, >>+ .read = read_hpet, >>+ .mask = 0xffffffffffffffffLL, >>+ .mult = 0, /*to be caluclated*/ >>+ .shift = 10, >>+ .is_continuous = 1, >>+}; >>+static struct clocksource *hpet_clocksource_p; >> >> > >and _p naming. > > > >>+ >> /* A lock for concurrent access by app and isr hpet activity. */ >> static DEFINE_SPINLOCK(hpet_lock); >> /* A lock for concurrent intermodule access to hpet and isr hpet activity. */ >>@@ -79,7 +106,7 @@ struct hpets { >> struct hpets *hp_next; >> struct hpet __iomem *hp_hpet; >> unsigned long hp_hpet_phys; >>- struct time_interpolator *hp_interpolator; >>+ struct clocksource *hp_clocksource; >> unsigned long long hp_tick_freq; >> unsigned long hp_delta; >> unsigned int hp_ntimer; >>@@ -94,13 +121,6 @@ #define HPET_IE 0x0002 /* interrupt en >> #define HPET_PERIODIC 0x0004 >> #define HPET_SHARED_IRQ 0x0008 >> >>-#if BITS_PER_LONG == 64 >>-#define write_counter(V, MC) writeq(V, MC) >>-#define read_counter(MC) readq(MC) >>-#else >>-#define write_counter(V, MC) writel(V, MC) >>-#define read_counter(MC) readl(MC) >>-#endif >> >> #ifndef readq >> static inline unsigned long long readq(void __iomem *addr) >>@@ -737,27 +757,6 @@ static ctl_table dev_root[] = { >> >> static struct ctl_table_header *sysctl_header; >> >>-static void hpet_register_interpolator(struct hpets *hpetp) >>-{ >>-#ifdef CONFIG_TIME_INTERPOLATION >>- struct time_interpolator *ti; >>- >>- ti = kzalloc(sizeof(*ti), GFP_KERNEL); >>- if (!ti) >>- return; >>- >>- ti->source = TIME_SOURCE_MMIO64; >>- ti->shift = 10; >>- ti->addr = &hpetp->hp_hpet->hpet_mc; >>- ti->frequency = hpetp->hp_tick_freq; >>- ti->drift = HPET_DRIFT; >>- ti->mask = -1; >>- >>- hpetp->hp_interpolator = ti; >>- register_time_interpolator(ti); >>-#endif >>-} >>- >> /* >> * Adjustment for when arming the timer with >> * initial conditions. That is, main counter >>@@ -909,7 +908,14 @@ int hpet_alloc(struct hpet_data *hdp) >> } >> >> hpetp->hp_delta = hpet_calibrate(hpetp); >>- hpet_register_interpolator(hpetp); >>+ >>+ if (!hpet_clocksource_p) { >>+ clocksource_hpet.fsys_mmio_ptr = hpet_mc_ptr = &hpetp->hp_hpet->hpet_mc; >>+ clocksource_hpet.mult = clocksource_hz2mult(hpetp->hp_tick_freq, >>+ clocksource_hpet.shift); >>+ clocksource_register(&clocksource_hpet); >>+ hpet_clocksource_p = hpetp->hp_clocksource = &clocksource_hpet; >>+ } >> >> > >This looks like a change in behaviour for non-ia64. Now i386 and x86_64 >will get this clocksource twice (and this one has a higher rating). >Doesn't look like this will even compile since fsys_mmio_ptr (more > >
Yes need to change setting for fsys_mmio just for ia64. I will check the load multiple clocksources, before it was limited.
quoted text
>extraneous _ptr suffix) is ia64 only? And sparc64 is left out in >the cold. > > > >> return 0; >> } >>@@ -995,7 +1001,7 @@ static int hpet_acpi_add(struct acpi_dev >> >> static int hpet_acpi_remove(struct acpi_device *device, int type) >> { >>- /* XXX need to unregister interpolator, dealloc mem, etc */ >>+ /* XXX need to unregister clocksource, dealloc mem, etc */ >> return -EINVAL; >> } >> >>diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h >>index daa4940..a20b4d6 100644 >>--- a/include/linux/clocksource.h >>+++ b/include/linux/clocksource.h >>@@ -61,6 +61,9 @@ struct clocksource { >> u32 shift; >> unsigned long flags; >> cycle_t (*vread)(void); >>+#ifdef CONFIG_IA64 >>+ void *fsys_mmio_ptr; /* used by fsyscall asm code */ >>+#endif >> >> /* timekeeping specific data, ignore */ >> cycle_t cycle_last, cycle_interval; >> >>
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 1/3] ia64: convert to use clocksource code
, Peter Keilty
, (Thu Apr 26, 4:26 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Chris Wright
, (Thu Apr 26, 9:02 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Peter Keilty
, (Fri Apr 27, 9:35 am)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, john stultz
, (Thu Apr 26, 5:18 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Peter Keilty
, (Fri Apr 27, 8:54 am)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, john stultz
, (Wed May 2, 1:50 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Daniel Walker
, (Thu Apr 26, 5:07 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Peter Keilty
, (Fri Apr 27, 10:38 am)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Daniel Walker
, (Fri Apr 27, 11:35 am)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Peter Keilty
, (Fri Apr 27, 11:42 am)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Daniel Walker
, (Fri Apr 27, 11:48 am)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Peter Keilty
, (Fri Apr 27, 12:11 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, john stultz
, (Wed May 2, 1:58 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Daniel Walker
, (Wed May 2, 3:08 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Daniel Walker
, (Fri Apr 27, 12:32 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, Sam Ravnborg
, (Thu Apr 26, 4:41 pm)
Re: [PATCH 1/3] ia64: convert to use clocksource code
, john stultz
, (Thu Apr 26, 4:48 pm)
[PATCH 3/3] ia64: update fsyscall for performance, enable bu...
, Peter Keilty
, (Thu Apr 26, 4:27 pm)
[PATCH 2/3] ia64: remove interpolater code
, Peter Keilty
, (Thu Apr 26, 4:27 pm)
Re: [PATCH 2/3] ia64: remove interpolater code
, john stultz
, (Thu Apr 26, 4:52 pm)
Re: [PATCH 2/3] ia64: remove interpolater code
, David Miller
, (Thu Apr 26, 5:47 pm)
Navigation
Create content
Mailing list archives
Recent posts
Mail archive search
Enter your search terms.
all mailing lists
alsa-devel
dragonflybsd-bugs
dragonflybsd-commit
dragonflybsd-docs
dragonflybsd-kernel
dragonflybsd-submit
dragonflybsd-user
freebsd-announce
freebsd-bugs
freebsd-chat
freebsd-cluster
freebsd-current
freebsd-drivers
freebsd-embeded
freebsd-fs
freebsd-hackers
freebsd-hardware
freebsd-mobile
freebsd-net
freebsd-performance
freebsd-pf
freebsd-security
freebsd-security-notifications
freebsd-threads
git
git-commits-head
linux-activists
linux-arm
linux-ath5k-devel
linux-btrfs
linux-c-programming
linux-driver-devel
linux-ext4
linux-fsdevel
linux-ia64
linux-input
linux-kernel
linux-kernel-janitors
linux-kernel-mentors
linux-kernel-newbies
linux-kvm
linux-net
linux-netdev
linux-newbie
linux-nfs
linux-raid
linux-scsi
linux-security-module
linux-sparse
linux-usb
linux-usb-devel
madwifi-devel
netbsd-announce
netbsd-tech-kern
open-graphics
open-graphics-announce-kt
openbsd-announce
openbsd-bugs
openbsd-ipv6
openbsd-misc
openbsd-security-announce
openbsd-smp
openbsd-source-changes
openbsd-tech
openfabrics-general
openmoko-community
openmoko-devel
openmoko-kernel
reiserfs-devel
tux3
ucarp
Optionally limit your search to a specific mailing list.
advanced
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Linus Torvalds
Re: O_DIRECT question
Bryan Woods
Stardom SATA HSM violation
Dave Airlie
Re: [2.6.25-rc6] possible regression: X server dying
git
:
Petr Baudis
repo.or.cz wishes?
Linus Torvalds
Re: empty directories
Wink Saville
Resolving conflicts
Jon Smirl
! [rejected] master -> master (non-fast forward)
openbsd-misc
:
Richard Stallman
Real men don't attack straw men
Christophe Rioux
OpenBSD as host for VMWare Server
Stefan Beke
mail dovecot: pipe() failed: Too many open files
Jason Dixon
Re: OBSD on MacBook
linux-netdev
:
Auke Kok
[PATCH] e1000e: test MSI interrupts
Andrew Morton
drivers/net/r6040.c warnings on x86_64
Wei Yongjun
[PATCH] xfrm: Fix kernel panic when flush and dump SPD entries
Леонид Юрьев
[r8169] patch for RTL8102 (5 new MAC/PHY)
Latest forum posts
Serial Driver Implementation Help
2 hours ago
Linux kernel
aacraid bad
3 hours ago
Linux general
Does ICH8 support AHCI?
12 hours ago
Linux kernel
Tools: GCC 3.4.6, Final GCC 3 Release
23 hours ago
Applications and Utilities
GNU/Hurd is so awful
2 days ago
GNU/Hurd
read /dev/mem not working in 2.6
3 days ago
Linux general
Issues with NETLINK sockets
4 days ago
Linux kernel
Anyone experiancing compiling issues with 2.6.26.6 patching with rt patch 2.6.26.6-rt11?
4 days ago
Linux kernel
Change network interface from eth0 to ppp0
5 days ago
Linux general
kernel module to intercept socket creation
5 days ago
Linux kernel
Show all forums...
Recent Tags
more tags
Colocation donated by:
Who's online
There are currently
2 users
and
1265 guests
online.
Online users
zeekec
puntmuts
Syndicate
speck-geostationary