History log of /linux-master/arch/hexagon/kernel/time.c
Revision Date Author Comments
# d068b123 30-Nov-2023 Nathan Chancellor <nathan@kernel.org>

hexagon: time: include asm/delay.h for prototypes

Clang warns about missing prototypes that are declared in this header:

arch/hexagon/kernel/time.c:209:6: warning: no previous prototype for function '__delay' [-Wmissing-prototypes]
209 | void __delay(unsigned long cycles)
| ^
arch/hexagon/kernel/time.c:209:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
209 | void __delay(unsigned long cycles)
| ^
| static
arch/hexagon/kernel/time.c:224:6: warning: no previous prototype for function '__udelay' [-Wmissing-prototypes]
224 | void __udelay(unsigned long usecs)
| ^
arch/hexagon/kernel/time.c:224:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
224 | void __udelay(unsigned long usecs)
| ^
| static

Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-10-5c34714afe9e@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Brian Cain <bcain@quicinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>


# 1f443cae 30-Nov-2023 Nathan Chancellor <nathan@kernel.org>

hexagon: time: mark time_init_deferred() as static

Clang warns:

arch/hexagon/kernel/time.c:163:13: warning: no previous prototype for function 'time_init_deferred' [-Wmissing-prototypes]
163 | void __init time_init_deferred(void)
| ^
arch/hexagon/kernel/time.c:163:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
163 | void __init time_init_deferred(void)
| ^
| static

This function is not used outside of this translation unit so mark it as
static to resolve the warning.

Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-9-5c34714afe9e@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Brian Cain <bcain@quicinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>


# 32793330 30-Nov-2023 Nathan Chancellor <nathan@kernel.org>

hexagon: time: include asm/time.h for prototypes

Clang warns about missing prototypes that are declared in this header:

arch/hexagon/kernel/time.c:118:6: warning: no previous prototype for function 'setup_percpu_clockdev' [-Wmissing-prototypes]
118 | void setup_percpu_clockdev(void)
| ^
arch/hexagon/kernel/time.c:118:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
118 | void setup_percpu_clockdev(void)
| ^
| static
arch/hexagon/kernel/time.c:135:6: warning: no previous prototype for function 'ipi_timer' [-Wmissing-prototypes]
135 | void ipi_timer(void)
| ^
arch/hexagon/kernel/time.c:135:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
135 | void ipi_timer(void)
| ^
| static

Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-8-5c34714afe9e@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Brian Cain <bcain@quicinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>


# 51f2ec59 19-Nov-2021 Nathan Chancellor <nathan@kernel.org>

hexagon: clean up timer-regs.h

When building allmodconfig, there is a warning about TIMER_ENABLE being
redefined:

drivers/clocksource/timer-oxnas-rps.c:39:9: error: 'TIMER_ENABLE' macro redefined [-Werror,-Wmacro-redefined]
#define TIMER_ENABLE BIT(7)
^
arch/hexagon/include/asm/timer-regs.h:13:9: note: previous definition is here
#define TIMER_ENABLE 0
^
1 error generated.

The values in this header are only used in one file each, if they are
used at all. Remove the header and sink all of the constants into their
respective files.

TCX0_CLK_RATE is only used in arch/hexagon/include/asm/timex.h

TIMER_ENABLE, RTOS_TIMER_INT, RTOS_TIMER_REGS_ADDR are only used in
arch/hexagon/kernel/time.c.

SLEEP_CLK_RATE and TIMER_CLR_ON_MATCH have both been unused since the
file's introduction in commit 71e4a47f32f4 ("Hexagon: Add time and timer
functions").

TIMER_ENABLE is redefined as BIT(0) so the shift is moved into the
definition, rather than its use.

Link: https://lkml.kernel.org/r/20211115174250.1994179-3-nathan@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Brian Cain <bcain@codeaurora.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 45b26dde 27-Mar-2020 afzal mohammed <afzal.mohd.ma@gmail.com>

hexagon: Replace setup_irq() by request_irq()

request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.

setup_irq() was required in older kernels as the memory allocator was not
available during early boot.

Hence replace setup_irq() by request_irq().

Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/e84ac60de8f747d49ce082659e51595f708c29d4.1585320721.git.afzal.mohd.ma@gmail.com


# 08dbd0f8 29-May-2019 Thomas Gleixner <tglx@linutronix.de>

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

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 version 2 and
only version 2 as published by the free software foundation 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 51 franklin street
fifth floor boston ma 02110 1301 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

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

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


# a60a9fb8 30-Mar-2017 Nicolai Stange <nicstange@gmail.com>

hexagon/time: Set ->min_delta_ticks and ->max_delta_ticks

In preparation for making the clockevents core NTP correction aware,
all clockevent device drivers must set ->min_delta_ticks and
->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a
clockevent device's rate is going to change dynamically and thus, the
ratio of ns to ticks ceases to stay invariant.

Make the hexagon arch's clockevent driver initialize these fields
properly.

This patch alone doesn't introduce any change in functionality as the
clockevents core still looks exclusively at the (untouched) ->min_delta_ns
and ->max_delta_ns. As soon as this has changed, a followup patch will
purge the initialization of ->min_delta_ns and ->max_delta_ns from this
driver.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: linux-hexagon@vger.kernel.org
Acked-by: Richard Kuo <rkuo@codeaurora.org>
Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>


# a5a1d1c2 21-Dec-2016 Thomas Gleixner <tglx@linutronix.de>

clocksource: Use a plain u64 instead of cycle_t

There is no point in having an extra type for extra confusion. u64 is
unambiguous.

Conversion was done with the following coccinelle script:

@rem@
@@
-typedef u64 cycle_t;

@fix@
typedef cycle_t;
@@
-cycle_t
+u64

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>


# d70e22d5 16-Jul-2015 Viresh Kumar <viresh.kumar@linaro.org>

hexagon/time: Migrate to new 'set-state' interface

Migrate hexagon driver to the new 'set-state' interface provided by
clockevents core, the earlier 'set-mode' interface is marked obsolete
now.

This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.

We weren't doing anything in the ->set_mode() callback. So, this patch
doesn't provide any set-state callbacks.

Cc: linux-hexagon@vger.kernel.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>


# 196b933d 18-Nov-2013 Chen Gang <gang.chen.5i5j@gmail.com>

arch: hexagon: kernel: add export symbol function __delay()

Need add __delay() implementation, or can not pass allmodconfig in
next-20131118 tree.

The related error:

CC kernel/locking/spinlock_debug.o
kernel/locking/spinlock_debug.c: In function '__spin_lock_debug':
kernel/locking/spinlock_debug.c:114:3: error: implicit declaration of function '__delay' [-Werror=implicit-function-declaration]

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>


# 6f8ae9bc 01-Nov-2013 Chen Gang <gang.chen@asianux.com>

hexagon: kernel: remove useless variables 'dn', 'r' and 'err' in time_init_deferred() in "time.c"

Remove them, since they are useless. The related warnings (with
allmodconfig for v4):

CC arch/hexagon/kernel/time.o
arch/hexagon/kernel/time.c: In function 'time_init_deferred':
arch/hexagon/kernel/time.c:196: warning: unused variable 'err'
arch/hexagon/kernel/time.c:195: warning: unused variable 'r'
arch/hexagon/kernel/time.c:194: warning: unused variable 'dn'

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>


# e1858b2a 19-Sep-2012 Richard Kuo <rkuo@codeaurora.org>

Hexagon: Copyright marking changes

Code Aurora Forum (CAF) is becoming a part of Linux Foundation Labs.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>


# 3c0f13bc 08-Nov-2011 Thomas Meyer <thomas@m3y3r.de>

Hexagon: Use resource_size function

Use resource_size function on resource object
instead of explicit computation.

The semantic patch that makes this change is available
in scripts/coccinelle/api/resource_size.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>


# 6bbbc30c 15-Nov-2011 Richard Kuo <rkuo@codeaurora.org>

Hexagon: misc compile warning/error cleanup due to missing headers

Fixed warnings/errors for EXPORT_SYMBOL, linux_binprm, elf related
defines

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>


# 71e4a47f 31-Oct-2011 Richard Kuo <rkuo@codeaurora.org>

Hexagon: Add time and timer functions

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>