15 Sep, 2011
1 commit
-
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited.Signed-off-by: Christian Dietrich
Signed-off-by: Jiri Kosina
06 Aug, 2010
1 commit
-
of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and update comment blocks.This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.@@
@@
-struct of_device
+struct platform_deviceSigned-off-by: Grant Likely
Reviewed-by: David S. Miller
19 Nov, 2009
1 commit
-
For consistency drop & in front of every proc_handler. Explicity
taking the address is unnecessary and it prevents optimizations
like stubbing the proc_handlers to NULL.Cc: Alexey Dobriyan
Cc: Ingo Molnar
Cc: Joe Perches
Signed-off-by: Eric W. Biederman
12 Nov, 2009
1 commit
-
Now that sys_sysctl is a wrapper around /proc/sys all of
the binary sysctl support elsewhere in the tree is
dead code.Cc: Jens Axboe
Cc: Corey Minyard
Cc: Greg Kroah-Hartman
Cc: Matt Mackall
Cc: Herbert Xu
Cc: Neil Brown
Cc: "James E.J. Bottomley"
Acked-by: Clemens Ladisch for drivers/char/hpet.c
Signed-off-by: Eric W. Biederman
14 Oct, 2009
1 commit
-
Commit d43c36dc6b357fa1806800f18aa30123c747a6d1 ("headers: remove
sched.h from interrupt.h") left some build errors in some configurations
due to drivers having depended on getting header files "accidentally".Signed-off-by: Ingo Molnar
[ Combined several one-liners from Ingo into one single patch - Linus ]
Signed-off-by: Linus Torvalds
09 Jan, 2009
1 commit
-
Remove calls to the BKL since concurrent access is protected
by the spin lock rtc_lock.Signed-off-by: David John
Cc: Ingo Molnar
Signed-off-by: Jonathan Corbet
02 Nov, 2008
1 commit
-
As it is, all instances of ->release() for files that have ->fasync()
need to remember to evict file from fasync lists; forgetting that
creates a hole and we actually have a bunch that *does* forget.So let's keep our lives simple - let __fput() check FASYNC in
file->f_flags and call ->fasync() there if it's been set. And lose that
crap in ->release() instances - leaving it there is still valid, but we
don't have to bother anymore.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
20 Oct, 2008
1 commit
-
Change various rtc related code to use the new bcd2bin/bin2bcd functions
instead of the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.Signed-off-by: Adrian Bunk
Acked-by: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Oct, 2008
1 commit
-
HPET_RTC_IRQ is no longer needed; HPET_EMULATE_RTC suffices and is more
correct. (http://bugzilla.kernel.org/show_bug.cgi?id=11111)Note that when using the legacy RTC driver, platforms don't really do a
dynamic switch between HPET and non-HPET modes based on whether HPET
hardware actually exists ... only rtc-cmos (using the new RTC framework)
currently switches that way.So this reflects bitrot in that legacy code, for x86/ia64: kernels with
HPET support configured (e.g. for a clocksource) can't get IRQs from the
legacy RTC driver unless they really have HPET hardware. (The obvious
workaround is to not use the legacy RTC driver on those platforms when you
configure HPET ... unless you know the target really has a HPET.)Signed-off-by: David Brownell
Cc: Alessandro Zummo
Cc: Ingo Molnar
Cc: Thomas Gleixner
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Aug, 2008
1 commit
-
Signed-off-by: David S. Miller
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