summaryrefslogtreecommitdiff
path: root/arch/mn10300/kernel/time.c
AgeCommit message (Collapse)Author
2011-03-18MN10300: Use clockevents_calc_mult_shift()Thomas Gleixner
Use clockevents_calc_mult_shift() instead of the homebrewn function in mn10300/kernel/time.c. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
2011-03-18MN10300: Use clocksource_register_hz()Thomas Gleixner
clocksource_register_hz() calculates the shift/mult pair for the clocksource. Remove the mn10300 duplicate implementation. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
2011-03-18MN10300: Remove stale codeThomas Gleixner
mn10300 implements clocksource and clockevents and selects them unconditionally in Kconfig. Remove the stale code which seems to be a leftover of the conversion. Cleanup the configuration switches as well. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
2011-02-09mn10300: Switch do_timer() to xtimer_update()Torben Hohn
Only one CPU gets the timer interrupt so mn10300_last_tsc does not need to be protected by xtime lock. Remove xtime lovking and use xtime_update() which does the locking itself. Signed-off-by: Torben Hohn <torbenh@gmx.de> Cc: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> LKML-Reference: <20110127150011.23248.62040.stgit@localhost> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2010-12-20clarify a usage constraint for cnt32_to_63()Nicolas Pitre
The cnt32_to_63 algorithm relies on proper counter data evaluation ordering to work properly. This was missing from the provided documentation. Let's augment the documentation with the missing usage constraint and fix the only instance that got it wrong. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27MN10300: Generic time supportMark Salter
Implement generic time support for MN10300. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
2010-10-27MN10300: And Panasonic AM34 subarch and implement SMPAkira Takeuchi
Implement the Panasonic MN10300 AM34 CPU subarch and implement SMP support for MN10300. Also implement support for the MN2WS0060 processor and the ASB2364 evaluation board which are AM34 based. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com>
2010-10-27MN10300: Prevent cnt32_to_63() from being preempted in sched_clock()David Howells
Prevent cnt32_to_63() from being preempted in sched_clock() because it may read its internal counter, get preempted, get delayed for more than the half period of the 'TSC' and then write the internal counter, thus corrupting it. Whilst some callers of sched_clock() have interrupts disabled or hold spinlocks, not all do, and so preemption must be held here. Note that sched_clock() is called from lockdep, but that shouldn't be a problem because although preempt_disable() calls into lockdep, lockdep has a recursion counter to deal with this. Signed-off-by: David Howells <dhowells@redhat.com>
2010-03-13mn10300: Convert mn10300 to use read/update_persistent_clockJohn Stultz
This patch converts the mn10300 architecture to use the generic read_persistent_clock and update_persistent_clock interfaces, reducing the amount of arch specific code we have to maintain, and allowing for further cleanups in the future. I have not built or tested this patch, so help from arch maintainers would be appreciated. Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Andrew Morton <akpm@linux-foundation.org> LKML-Reference: <1267675049-12337-3-git-send-email-johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-03-30cpumask: remove references to struct irqaction's mask field.Rusty Russell
Impact: cleanup It's unused, since about 1995. So remove all initialization of it in preparation for actually removing the field. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2008-09-24MN10300: Make sched_clock() report time since bootDavid Howells
Make sched_clock() report time since boot rather than time since last timer interrupt. Make sched_clock() expand and scale the 32-bit TSC value running at IOCLK speed (~33MHz) to a 64-bit nanosecond counter, using cnt32_to_63() acquired from the ARM arch and without using slow DIVU instructions every call. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-19MN10300: Call update_process_times() outside of the xtime_lockDavid Howells
Call update_process_times() outside of the xtime_lock. Somewhere somewhere inside one of the functions called by that, xtime_lock is readlocked, which ends up in a deadlock situation. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08mn10300: add the MN10300/AM33 architecture to the kernelDavid Howells
Add architecture support for the MN10300/AM33 CPUs produced by MEI to the kernel. This patch also adds board support for the ASB2303 with the ASB2308 daughter board, and the ASB2305. The only processor supported is the MN103E010, which is an AM33v2 core plus on-chip devices. [akpm@linux-foundation.org: nuke cvs control strings] Signed-off-by: Masakazu Urade <urade.masakazu@jp.panasonic.com> Signed-off-by: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>