13 Aug, 2008
1 commit
-
Signed-off-by: Huang Weiyi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Jul, 2008
1 commit
-
The following functions can now become static:
- rtc_interrupt()
- rtc_get_rtc_time()Signed-off-by: Adrian Bunk
Acked-by: Bernhard Walle
Acked-by: Paul Gortmaker
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jul, 2008
2 commits
-
When CONFIG_HPET_EMULATE_RTC is defined the external declaration of
hpet_rtc_interrupt is redundant due to the inclusion of hpet.h.When !CONFIG_HPET_EMULATE_RTC we make it clear that hpet_rtc_interrupt is
not used by defining it to return zero.Signed-off-by: Carlos R. Mafra
Cc: Ingo Molnar
Cc: Thomas Gleixner
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
For now just wrap the main logic, but this driver is a prime candidate for
someone wanting to eliminate the lock entirely[lizf@cn.fujitsu.com: fix build failure]
Signed-off-by: Alan Cox
Signed-off-by: Li Zefan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Jul, 2008
1 commit
11 Jul, 2008
1 commit
-
The IRQ rate reported back by the RTC is incorrect when HPET is enabled.
Newer hardware that has HPET to emulate the legacy RTC device gets this value
wrong since after it sets the rate, it returns before setting the variable
used to report the IRQ rate back to users of the device -- so the set rate and
the reported rate get out of sync.Signed-off-by: Paul Gortmaker
Cc: Ingo Molnar
Cc: David Brownell
Cc: Thomas Gleixner
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Jul, 2008
1 commit
-
Signed-off-by: Arnd Bergmann
29 Apr, 2008
1 commit
-
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
be setup before gluing PDE to main tree.Signed-off-by: Denis V. Lunev
Acked-by: Greg Kroah-Hartman
Cc: Alexey Dobriyan
Cc: "Eric W. Biederman"
Acked-by: Dmitry Torokhov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Apr, 2008
1 commit
-
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@ change_compare_np @
expression E;
@@(
- jiffies = E
+ time_after_eq(jiffies,E)
|
- jiffies < E
+ time_before(jiffies,E)
|
- jiffies > E
+ time_after(jiffies,E)
)@ include depends on change_compare_np @
@@#include
@ no_include depends on !include && change_compare_np @
@@#include
+ #include
//Signed-off-by: Julia Lawall
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Mar, 2008
1 commit
-
Fix hpet_(un)register_irq_handler() for when CONFIG_HPET_EMULATE_RTC=n. They
are provided macros that substitute value 0, but if they are called as
functions and the return value isn't checked, the following warnings appear:drivers/char/rtc.c: In function `rtc_init':
drivers/char/rtc.c:1063: warning: statement with no effect
drivers/char/rtc.c: In function `rtc_exit':
drivers/char/rtc.c:1157: warning: statement with no effectSigned-off-by: David Howells
Signed-off-by: Linus Torvalds
30 Jan, 2008
2 commits
-
the previous patch in the old RTC driver. It also removes the direct
rtc_interrupt() call from arch/x86/kernel/hpetc.c so that there's finally no
(code) dependency to CONFIG_RTC in arch/x86/kernel/hpet.c.Because of this, it's possible to compile the drivers/char/rtc.ko driver as
module and still use the HPET emulation functionality. This is also expressed
in Kconfig.Signed-off-by: Bernhard Walle
Cc: Alessandro Zummo
Cc: David Brownell
Cc: Andi Kleen
Cc: john stultz
Cc: Robert Picco
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner -
tons of style cleanup in drivers/char/rtc.c - no code changed:
text data bss dec hex filename
6400 384 32 6816 1aa0 rtc.o.before
6400 384 32 6816 1aa0 rtc.o.aftersince we seem to have a number of open breakages in this code we might
as well start with making the code more readable and maintainable.Signed-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner
15 Nov, 2007
2 commits
-
Firmware like PNPBIOS or ACPI can report the address space consumed by the
RTC. The actual space consumed may be less than the size (RTC_IO_EXTENT)
assumed by the RTC driver.The PNP core doesn't request resources yet, but I'd like to make it do so.
If/when it does, the RTC_IO_EXTENT request may fail, which prevents the RTC
driver from loading.Since we only use the RTC index and data registers at RTC_PORT(0) and
RTC_PORT(1), we can fall back to requesting just enough space for those.If the PNP core requests resources, this results in typical I/O port usage
like this:0070-0073 : 00:06
Cc: Alessandro Zummo
Cc: David Brownell
Cc: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The misc_register() error path always released an I/O port region,
even if the region was memory-mapped (only mips uses memory-mapped RTC,
as far as I can see).Signed-off-by: Bjorn Helgaas
Cc: Alessandro Zummo
Cc: David Brownell
Acked-by: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Jul, 2007
1 commit
-
When making changes to x86_64 timers, I noticed that touching hpet.h triggered
an unreasonably large rebuild. Untangling it from timex.h quiets the extra
rebuild quite a bit.Cc: john stultz
Signed-off-by: Chris Wright
Signed-off-by: Thomas Gleixner
Signed-off-by: Ingo Molnar
Signed-off-by: Andi Kleen
Signed-off-by: Linus Torvalds
21 Jul, 2007
1 commit
-
The existing sparc64 mini_rtc driver can handle CMOS based
rtcs trivially with just a few lines of code and the simplifies
things tremendously.Tested on SB1500.
Signed-off-by: David S. Miller
17 Jul, 2007
1 commit
-
We gets lots of these when the kernel is running on a hypervisor. Zach says
"a guest kernel trying to get high frequency RTC will also be inaccurate, and
inevitably will have unhidable interrupt lateness."Signed-off-by: Ben Collins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 May, 2007
1 commit
-
use __set_current_state(TASK_*) instead of current->state = TASK_*,
Signed-off-by: Milind Arun Choudhary
Cc: Jiri Slaby
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Feb, 2007
2 commits
-
The semantic effect of insert_at_head is that it would allow new registered
sysctl entries to override existing sysctl entries of the same name. Which is
pain for caching and the proc interface never implemented.I have done an audit and discovered that none of the current users of
register_sysctl care as (excpet for directories) they do not register
duplicate sysctl entries.So this patch simply removes the support for overriding existing entries in
the sys_sysctl interface since no one uses it or cares and it makes future
enhancments harder.Signed-off-by: Eric W. Biederman
Acked-by: Ralf Baechle
Acked-by: Martin Schwidefsky
Cc: Russell King
Cc: David Howells
Cc: "Luck, Tony"
Cc: Ralf Baechle
Cc: Paul Mackerras
Cc: Martin Schwidefsky
Cc: Andi Kleen
Cc: Jens Axboe
Cc: Corey Minyard
Cc: Neil Brown
Cc: "John W. Linville"
Cc: James Bottomley
Cc: Jan Kara
Cc: Trond Myklebust
Cc: Mark Fasheh
Cc: David Chinner
Cc: "David S. Miller"
Cc: Patrick McHardy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The real time clock driver was using the binary number reserved for cdroms in
the sysctl binary number interface, which is a no-no. So since the sysctl
binary interface is wrong remove it.Signed-off-by: Eric W. Biederman
Cc: Alessandro Zummo
Acked-by: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Feb, 2007
1 commit
-
- Use timer macros to set function and data members and to modify
expiration time.
- Use DEFINE_TIMER for global timers and do not init them at run-time in
these cases.
- del_timer_sync is common in most cases -- we want to wait for timer
function if it's still running.Signed-off-by: Jiri Slaby
Cc: Dave Airlie
Cc: David Woodhouse
Cc: Dominik Brodowski
Cc: Alessandro Zummo
Cc: Paul Fulghum
Cc: Kylene Jo Hall
Cc: Wim Van Sebroeck
Acked-by: Dmitry Torokhov (Input bits)
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Dec, 2006
1 commit
-
drivers/char/rtc.c:116: warning: 'hpet_rtc_interrupt' defined but not used
Cc: Jan Beulich
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Dec, 2006
2 commits
-
- conditionalizes procfs code upon CONFIG_PROC_FS (to reduce code size when
that option is not enabled)- make initialization no longer fail when the procfs entry can't be
allocated (namely would initialization always have failed when
CONFIG_PROC_FS was not set)- move the formerly file-scope static variable rtc_int_handler_ptr into
the only function using it, and makes it automatic.Signed-off-by: Jan Beulich
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Ensure RTC driver doesn't use its timer when it doesn't get to set it up
(as it cannot currently prevent other of its functions to be called from
outside when not built as a module - probably this should also be
addressed).Signed-off-by: Jan Beulich
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Oct, 2006
1 commit
05 Oct, 2006
1 commit
-
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.Signed-Off-By: David Howells
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
30 Sep, 2006
1 commit
-
Signed-off-by: Steven Rostedt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Sep, 2006
1 commit
-
BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
[] show_trace_log_lvl+0x58/0x171
[] show_trace+0xd/0x10
[] dump_stack+0x19/0x1b
[] trace_hardirqs_on+0xa2/0x11e
[] _spin_unlock_irq+0x22/0x26
[] rtc_get_rtc_time+0x32/0x176
[] hpet_rtc_interrupt+0x92/0x14d
[] handle_IRQ_event+0x20/0x4d
[] __do_IRQ+0x94/0xef
[] do_IRQ+0x9e/0xbd
[] common_interrupt+0x25/0x2c
DWARF2 unwinder stuck at common_interrupt+0x25/0x2cSigned-off-by: Peter Zijlstra
Acked-by: Ingo Molnar
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Jul, 2006
1 commit
-
Joseph Fannin reported that hpet_rtc_interrupt() enables hardirqs
in irq context:[ 25.628000] [] trace_hardirqs_on+0xce/0x200
[ 25.628000] [] _spin_unlock_irq+0x31/0x70
[ 25.628000] [] rtc_get_rtc_time+0x44/0x1a0
[ 25.628000] [] hpet_rtc_interrupt+0x21b/0x280
[ 25.628000] [] handle_IRQ_event+0x31/0x70
[ 25.628000] [] handle_edge_irq+0xe7/0x210
[ 25.628000] [] do_IRQ+0x92/0x120
[ 25.628000] [] common_interrupt+0x25/0x2cthe call of rtc_get_rtc_time() is highly suspect. At a minimum we
need the patch below to save/restore hardirq state.Signed-off-by: Ingo Molnar
Cc: Joseph Fannin
Cc: John Stultz
Cc: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jul, 2006
1 commit
-
Handle memory-mapped chips properly, needed for example on DECstations.
This support was in Linux 2.4 but for some reason got lost in 2.6. This
patch is taken directly from the linux-mips repository.[akpm@osdl.org: cleanup]
Signed-off-by: Maciej W. Rozycki
Signed-off-by: Martin Michlmayr
Cc: Paul Gortmaker
Cc: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Jul, 2006
1 commit
-
Mark the static struct file_operations in drivers/char as const. Making
them const prevents accidental bugs, and moves them to the .rodata section
so that they no longer do any false sharing; in addition with the proper
debug option they are then protected against corruption..[akpm@osdl.org: build fix]
Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Jul, 2006
1 commit
-
Signed-off-by: Thomas Gleixner
Cc: Ingo Molnar
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
24 Jun, 2006
1 commit
-
Signed-off-by: David S. Miller
20 Jun, 2006
1 commit
-
This ugly hack was long overdue to die.
It was a way to print out Sparc interrupts in a more freindly format,
since IRQ numbers were arbitrary opaque 32-bit integers which vectored
into PIL levels. These 32-bit integers were not necessarily in the
0-->NR_IRQS range, but the PILs they vectored to were.The idea now is that we will increase NR_IRQS a little bit and use a
virtualreal IRQ number mapping scheme similar to PowerPC.That makes this IRQ printing hack irrelevant, and furthermore only a
handful of drivers actually used __irq_itoa() making it even less
useful.Signed-off-by: David S. Miller
12 Jan, 2006
1 commit
-
Someone wanted access to this usually unused (and unused by Linux) value
for the day of week. Existing kernels have the field in the struct but
return 0 always. This updates the kernel to fill in the field. The usual
case of 'not set' conveniently is 0.Signed-off-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Nov, 2005
1 commit
-
rtc_control() may be called in the interrupt context in ALSA rtc-timer
driver. The patch fixes the wrong irq enable in rtc.c, and also fixes
the possible race of bit flags.Signed-off-by: Takashi Iwai
06 Sep, 2005
1 commit
-
Based upon a report from Jason Wever.
Signed-off-by: David S. Miller
05 Aug, 2005
1 commit
-
Since the beginning of July my Opteron box was randomly crashing and
being rebooted by hardware watchdog. Today it finally did it in front
of me, and this patch will hopefully fix it.The problem is that at the end of June (the 28th, to be exact: commit
47f176fdaf8924bc83fddcf9658f2fd3ef60d573, "[PATCH] Using msleep()
instead of HZ") rtc_get_rtc_time was converted to use msleep() instead
of busy waiting. But rtc_get_rtc_time is used by hpet_rtc_interrupt,
and scheduling is not allowed during interrupt. So I'm reverting this
part of original change, replacing msleep() back with busy loop.The original code was busy waiting for up to 20ms, but on my hardware in
the worst case update-in-progress bit was asserted for at most 363
passes through loop (on 2GHz dual Opteron), much less than even one
jiffie, not even talking about 20ms. So I changed code to just wait
only as long as necessary. Otherwise when RTC was set to generate
8192Hz timer, it stopped doing anything for 20ms (160 pulses were
skipped!) from time to time, and this is rather suboptimal as far as I
can tell.Signed-off-by: Petr Vandrovec
Signed-off-by: Linus Torvalds
29 Jun, 2005
1 commit
-
Use msleep() in a few places.
Signed-off-by: Luca Falavigna
Acked-by: Ingo Molnar
Acked-by: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds