Based on 1 normalized pattern(s):
the code contained herein is licensed under the gnu general public
license you may obtain a copy of the gnu general public license
version 2 or later at the following locations http www opensource
org licenses gpl license html http www gnu org copyleft gpl html
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 161 file(s).
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Richard Fontana <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Reviewed-by: Kate Stewart <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Guided by grsecurity's analogous __read_only markings in arch/arm,
this applies several uses of __ro_after_init to structures that are
only updated during __init.
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Russell King <[email protected]>
Currently, we check cpuidle_ops.suspend every time when entering a
low-power idle state. But this check could be avoided in this hot path
by moving it into arm_cpuidle_read_ops() to reduce arm_cpuidle_suspend
overhead a bit.
Signed-off-by: Jisheng Zhang <[email protected]>
Acked-by: Daniel Lezcano <[email protected]>
Signed-off-by: Russell King <[email protected]>
Let's assume cpuidle_ops exists but it doesn't implement the according
init callback, current arm_cpuidle_init() will return success to its
caller, but in fact it should return -EOPNOTSUPP.
Signed-off-by: Jisheng Zhang <[email protected]>
Acked-by: Daniel Lezcano <[email protected]>
Signed-off-by: Russell King <[email protected]>
arm_cpuidle_read_ops() just copies '*ops' to cpuidle_ops[cpu], so the
structure '*ops' is not modified at all.
The comment is also updated accordingly.
Signed-off-by: Jisheng Zhang <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
The suspend() hook in the cpuidle_ops struct is always called on
the cpu entering idle, which means that the cpu parameter passed
to the suspend hook always corresponds to the local cpu, making
it somewhat redundant.
This patch removes the logical cpu parameter from the ARM
cpuidle_ops.suspend hook and updates all the existing kernel
implementations to reflect this change.
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Acked-by: Daniel Lezcano <[email protected]>
Reviewed-by: Lina Iyer <[email protected]>
Tested-by: Lina Iyer <[email protected]>
Tested-by: Jisheng Zhang <[email protected]> [psci]
Cc: Lina Iyer <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Signed-off-by: Russell King <[email protected]>
The current state of the different cpuidle drivers is the different PM
operations are passed via the platform_data using the platform driver
paradigm.
This approach allowed to split the low level PM code from the arch specific
and the generic cpuidle code.
Unfortunately there are complaints about this approach as, in the context of the
single kernel image, we have multiple drivers loaded in memory for nothing and
the platform driver is not adequate for cpuidle.
This patch provides a common interface via cpuidle ops for all new cpuidle
driver and a definition for the device tree.
It will allow with the next patches to a have a common definition with ARM64
and share the same cpuidle driver.
The code is optimized to use the __init section intensively in order to reduce
the memory footprint after the driver is initialized and unify the function
names with ARM64.
Signed-off-by: Daniel Lezcano <[email protected]>
Acked-by: Kevin Hilman <[email protected]>
Acked-by: Rob Herring <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Tested-by: Lorenzo Pieralisi <[email protected]>
The cpu_do_idle() function is always used by the cpuidle drivers.
That led to have each driver including cpuidle.h and proc-fns.h, they are
always paired. That makes a lot of duplicate headers inclusion. Instead of
including both in each .c file, move the proc-fns.h header inclusion in the
cpuidle.h header file directly, so we can save some line of code.
Signed-off-by: Daniel Lezcano <[email protected]>
Acked-by: Kevin Hilman <[email protected]>
Acked-by: Lorenzo Pieralisi <[email protected]>
Tested-by: Lorenzo Pieralisi <[email protected]>
Make necessary changes to implement time keeping and irq enabling
in the core cpuidle code. This will allow the removal of these
functionalities from various platform cpuidle implementations whose
timekeeping and irq enabling follows the form in this common code.
Signed-off-by: Robert Lee <[email protected]>
Tested-by: Jean Pihet <[email protected]>
Tested-by: Amit Daniel <[email protected]>
Tested-by: Robert Lee <[email protected]>
Reviewed-by: Kevin Hilman <[email protected]>
Reviewed-by: Daniel Lezcano <[email protected]>
Reviewed-by: Deepthi Dharwar <[email protected]>
Acked-by: Jean Pihet <[email protected]>
Signed-off-by: Len Brown <[email protected]>