History log of /linux-master/arch/mips/sibyte/bcm1480/time.c
Revision Date Author Comments
# 1a59d1b8 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 217dd11e 31-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Sibyte: Split and move clock code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# f3f9ad0e 31-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Sibyte: Fixes for oneshot timer mode.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 2e5dcd2b 30-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Sibyte: Fix names of the clockevent devices.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 1238d5d8 29-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] time: Fix cut'n'paste bug in Sibyte clockevent driver.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 11ca25aa 28-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Sibyte: Delete {sb1250,bcm1480}_steal_irq().

They break the timer interrupt initialization and only seem to be a kludge
for initialization happening in the wrong order. Further testing done by
Thiemo confirms the suspicion that the other invocations also seem to have
useless.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# d0453365 22-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] time: SMP-proofing of Sibyte clockevent/clocksource code.

The BCM148 has 4 cores but there are also just 4 generic timers available
so use the ZBbus cycle counter instead of it. In addition the ZBbus
counter also offers a much higher resolution and 64-bit counting so I'm
considering a later complete conversion to it once I figure out if all
members of the Sibyte SOC family support it - the docs seem to agree but
the headers files seem to disagree ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# d527eef5 19-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Sibyte: Finish conversion to modern time APIs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 9ee5389c 17-Oct-2007 Atsushi Nemoto <anemo@mba.ocn.ne.jp>

[MIPS] Sibyte: Fix typos in sibyte clockevent drivers

Fix some typo introduced on clockevent conversion.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# e9f874b6 11-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Clockevent driver for BCM1480

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 91a2fcc8 11-Oct-2007 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Consolidate all variants of MIPS cp0 timer interrupt handlers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 00598560 11-Nov-2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp>

[MIPS] mips HPT cleanup: make clocksource_mips public

Make clocksource_mips public and get rid of mips_hpt_read,
mips_hpt_mask.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# dd6bfd62 07-Nov-2006 Nicolas Kaiser <nikai@nikai.net>

[MIPS] Fix double inclusions

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 16b7b2ac 23-Oct-2006 Atsushi Nemoto <anemo@mba.ocn.ne.jp>

[MIPS] Fixup migration to GENERIC_TIME

Since we already moved to GENERIC_TIME, we should implement alternatives
of old do_gettimeoffset routines to get sub-jiffies resolution from
gettimeofday(). This patch includes:

* MIPS clocksource support (based on works by Manish Lachwani).
* remove unused gettimeoffset routines and related codes.
* remove unised 64bit do_div64_32().
* simplify mips_hpt_init. (no argument needed, __init tag)
* simplify c0_hpt_timer_init. (no need to write to c0_count)
* remove some hpt_init routines.
* mips_hpt_mask variable to specify bitmask of hpt value.
* convert jmr3927_do_gettimeoffset to jmr3927_hpt_read.
* convert ip27_do_gettimeoffset to ip27_hpt_read.
* convert bcm1480_do_gettimeoffset to bcm1480_hpt_read.
* simplify sb1250 hpt functions. (no need to subtract and shift)

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 27f768192 08-Oct-2006 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Cleanup unnecessary <asm/ptrace.h> inclusions.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 937a8015 07-Oct-2006 Ralf Baechle <ralf@linux-mips.org>

[MIPS] Complete fixes after removal of pt_regs argument to int handlers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 6ab3d562 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de>

Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>


# e1701fb2 27-Feb-2006 James E Wilson <wilson@specifix.com>

[PATCH] Fix BCM1480 doubled process accounting times.

Running a UP kernel on a bcm1480 board, I get nonsensical timing
results, like this:
release@unknown:~/tmp$ time ./a.out
real 0m22.906s
user 0m45.792s
sys 0m0.010s
According to my watch, this program took 23 seconds to run, so the real
time clock is OK. It is process accounting that is broken.

I tracked this down to a problem with the function
bcm1480_timer_interrupt in the file sibyte/bcm1480/time.c. This
function calls ll_timer_interrupt for cpu0, and ll_local_timer_interrupt
for all cpus. However, both of these functions do process accounting.
Thus processes running on cpu0 end up with doubled times. This is very
obvious in a UP kernel where all processes run on cpu0.

The correct way to do this is to only call ll_local_timer interrupt if
this is not cpu0. This can be seen in the mips-board/generic/time.c
file, and also in the sibyte/sb1250/time.c file, both of which handle
this correctly. I fixed the bcm1480/time.c file by copying over the
correct code from the sb1250/time.c file.

With this fix, I now get sensible results.
release@unknown:~/tmp$ time ./a.out
real 0m22.903s
user 0m22.894s
sys 0m0.006s

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# f137e463 20-Oct-2005 Andrew Isaacson <adi@broadcom.com>

Add support for BCM1480 family of chips.

- Kconfig and Makefile changes
- arch/mips/sibyte/bcm1480/
- changes to sibyte common code to support 1480

Signed-Off-By: Andy Isaacson <adi@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>