Commit Graph

13 Commits

Author SHA1 Message Date
Jon Hunter
57b5bd5c1e cpuidle: Remove cpuidle-cg-disable-t264
Bug 4697511
Bug 5401876
Bug 5401884

Change-Id: I4bbdffb3565d191289148f0689f82e2aa0b74d2d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3411919
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Ishan Shah <ishah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:36 +00:00
Nathan Hartman
31594cb465 nvidia-oot: cpuidle: Support changes to residency
Add debugfs files for configuring a states residency. Assumes
all cores share the same cpuidle driver.

Change-Id: If23eeaa631c266646962648eba7851f1e5471ba0
Signed-off-by: Nathan Hartman <nhartman@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3331646
Reviewed-by: Ishan Shah <ishah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:20:35 +00:00
Manish Bhardwaj
57a65081dd nvidia-oot: cert & misra fixes in cpuidle-tegra-auto.c drv
using this patch fixing below cert & misra errors:-
- cert_arr30_c_violation: "__per_cpu_offset[cpu]" evaluates
  to an address that could be at negative offset of an array.

JIRA ESLC-8401

Change-Id: I99670f9823cda5abaa41368b80821a5727414017
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304761
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Ishan Shah
3969211745 nvidia-oot: cpuidle: Support coordinated wake
Adding debugfs support for the coordinated wake state.
This will allow for the end-user to select a number of destination CPUs,
and then force them into idle together. A chosen "src" cpu will then
trigger a simultaneous wake request on all of the cores to create the
worst-case idle-exit scenario.
We also have an alternate state to support only coordinated sleep.
This can be useful for cases where select cores coordinated together can
have deeper power modes available to them.

TPS-671

Change-Id: I901f86000d36a86f9549f713ba698b58896d55b7
Signed-off-by: Ishan Shah <ishah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242284
Reviewed-by: Nathan Hartman <nhartman@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sanjay Chandrashekara <sanjayc@nvidia.com>
2025-07-24 10:19:16 +00:00
Jon Hunter
c9d5d23a33 cpuidle: Fix build for Linux v6.13
Commit ef4c675dc296 ("genirq: Unexport nr_irqs") unexported 'nr_irqs' in
Linux v6.13 and this breaks the build for the cpuidle-debugfs driver.
For Linux v6.13 the number of IRQs can be queried by using the function
irq_get_nr_irqs() instead. Fix the build by using conftest to detect if
the function irq_get_nr_irqs() and use this function if it is present.

Bug 4991705

Change-Id: I98d477896fcf9e8d2e1afa21e2f7ba4d071ab442
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261690
Reviewed-by: Ishan Shah <ishah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Preetham Chandru R <pchandru@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Ishan Shah
ab3d2a477f nvidia-oot: cpuidle: Add module to disable cg
Adding a module that disables cg on t264 specifically. This is meant for
purely internal usage by the SSG and noise-characterization teams.
We are making use of some override signals that remain on a per-core
basis for this purpose.

Bug 4697511

Change-Id: I04093b97b10e1a87bfaa2615573b284a6f1ef4f3
Signed-off-by: Ishan Shah <ishah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237175
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Jon Hunter
f01227d4ea drivers: Drop inline from driver remove wrapper
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.

Bug 4749580

Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
951b2423a8 drivers: Fix platform_driver remove for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.

Bug 4749580

Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-11 17:20:34 -07:00
Preetham Chandru Ramchandra
4008be04b4 cpuidle: tegra: Explicitly call pm_system_wakeup
During SC7 resume sometime wakekey interrupt is not generated even
if wake key is pressed.
So explicitly call pm_system_wakeup() which causes the system
to resume from SC7.

Bug 4449600

Change-Id: I8582ef22fb456f7b26b13515bce5e4874191b713
Signed-off-by: Preetham Chandru Ramchandra <pchandru@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079822
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bhavesh Parekh <bparekh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-23 14:54:54 -08:00
Preetham Chandru Ramchandra
c2357c8af5 cpuidle: tegra: Fix sparse issue.
symbol 'tegra_auto_cpuidle_s2idle_exit' is not declared so made it
static.

Bug 3954363

Change-Id: I715a3c4c4553a533ed59c9b85f628ce1e9baa308
Signed-off-by: Preetham Chandru Ramchandra <pchandru@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2899670
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-08 05:34:09 -07:00
Ishan Shah
947f489dac nvidia-oot: cpuidle: Add idle debugfs nodes
Adding debugfs support to force cpus into idle states. Building as
module instead of driver. Generic to support any standard cpuidle
implementation.

Bug 3583597

Change-Id: I5dd9e8635b844f465bc4c9da7e1d45ee17dd669f
Signed-off-by: Ishan Shah <ishah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2814926
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-04 00:52:39 -08:00
Preetham Chandru Ramchandra
e4113a1995 cpuidle: tegra: cpuidle-tegra-auto compilation fix
Fix the error on compiling cpuidle-tegra-auto as OOT module.
Keeping the change in a separate patch for better tracking the
changes done.

Issues resolved are:
 ERROR: modpost: "s2idle_state"
 Fix: used a local variable s2idle_sc7_state to fix

 ERROR: modpost: "__boot_cpu_id"
 Fix: Used CPU number "0" always. It's a logical number and we
      don't have a dependency on the actual boot CPU.

 ERROR: modpost: "cpuidle_devices"
 Fix: Used a per cpu variable "tegra_auto_cpuidle_drivers" of type
      "struct cpuidle_driver *" to store and fetch the "*drv".

Bug 3583597

Change-Id: Idf1c4f4eecbdd638e31e0b76efa140a8f45616e9
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2843935
(cherry picked from commit a101f1bf1175f18744082f175f91a411903b9f45)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819960
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Preetham Chandru <pchandru@nvidia.com>
2023-01-20 09:18:50 -08:00
Preetham Chandru Ramchandra
287b23bf62 cpuidle: tegra: Build CPU_IDLE_TEGRA_AUTO as OOT
Build CONFIG_CPU_IDLE_TEGRA_AUTO as 'cpuidle-tegra-auto.ko' module.
It is direct copy of 'nvidia/drivers/cpuidle/cpuidle-tegra-auto.c'.

Bug 3583597

Change-Id: I78a41eaadaf5f95857829c4f2e961116e764c79e
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Preetham Chandru Ramchandra <pchandru@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2843934
(cherry picked from commit a29a4cbc2b5ea6180b4750057c8175a0076e5681)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819959
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-01-20 09:18:46 -08:00