01 Mar, 2019

1 commit


28 Feb, 2019

1 commit

  • Commit 5ad7346b4ae2 ("cpufreq: kryo: Add module remove and exit") made
    it possible to build the kryo cpufreq driver as a module, but it failed
    to release all the resources, i.e. OPP tables, when the module is
    unloaded.

    This patch fixes it by releasing the OPP tables, by calling
    dev_pm_opp_put_supported_hw() for them, from the
    qcom_cpufreq_kryo_remove() routine. The array of pointers to the OPP
    tables is also allocated dynamically now in qcom_cpufreq_kryo_probe(),
    as the pointers will be required while releasing the resources.

    Compile tested only.

    Cc: 4.18+ # v4.18+
    Fixes: 5ad7346b4ae2 ("cpufreq: kryo: Add module remove and exit")
    Reviewed-by: Georgi Djakov
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     

07 Feb, 2019

1 commit


29 Sep, 2018

1 commit

  • There is currently a warning when building the Kryo cpufreq driver into
    the kernel image:

    WARNING: vmlinux.o(.text+0x8aa424): Section mismatch in reference from
    the function qcom_cpufreq_kryo_probe() to the function
    .init.text:qcom_cpufreq_kryo_get_msm_id()
    The function qcom_cpufreq_kryo_probe() references
    the function __init qcom_cpufreq_kryo_get_msm_id().
    This is often because qcom_cpufreq_kryo_probe lacks a __init
    annotation or the annotation of qcom_cpufreq_kryo_get_msm_id is wrong.

    Remove the '__init' annotation from qcom_cpufreq_kryo_get_msm_id
    so that there is no more mismatch warning.

    Additionally, Nick noticed that the remove function was marked as
    '__init' when it should really be marked as '__exit'.

    Fixes: 46e2856b8e18 (cpufreq: Add Kryo CPU scaling driver)
    Fixes: 5ad7346b4ae2 (cpufreq: kryo: Add module remove and exit)
    Reported-by: Nick Desaulniers
    Signed-off-by: Nathan Chancellor
    Acked-by: Viresh Kumar
    Cc: 4.18+ # 4.18+
    Signed-off-by: Rafael J. Wysocki

    Nathan Chancellor
     

30 Jul, 2018

1 commit


24 Jul, 2018

1 commit


18 Jul, 2018

1 commit


25 Jun, 2018

1 commit

  • We should return if get_cpu_device() fails or it leads to a NULL
    dereference. Also dev_pm_opp_of_get_opp_desc_node() returns NULL on
    error, it never returns error pointers.

    Fixes: 46e2856b8e18 (cpufreq: Add Kryo CPU scaling driver)
    Signed-off-by: Dan Carpenter
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Dan Carpenter
     

19 Jun, 2018

2 commits

  • Add device remove and module exit code to make the driver
    functioning as a loadable module.

    Fixes: ac28927659be (cpufreq: kryo: allow building as a loadable module)
    Signed-off-by: Ilia Lin
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Ilia Lin
     
  • In event of error returned by the nvmem_cell_read() non-pointer value
    may be dereferenced. Fix this with error handling.
    Additionally free the allocated speedbin buffer, as per the API.

    Fixes: 9ce36edd1a52 (cpufreq: Add Kryo CPU scaling driver)
    Signed-off-by: Ilia Lin
    Acked-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Ilia Lin
     

30 May, 2018

1 commit

  • In Certain QCOM SoCs like apq8096 and msm8996 that have KRYO processors,
    the CPU frequency subset and voltage value of each OPP varies
    based on the silicon variant in use. Qualcomm Process Voltage Scaling Tables
    defines the voltage and frequency value based on the msm-id in SMEM
    and speedbin blown in the efuse combination.
    The qcom-cpufreq-kryo driver reads the msm-id and efuse value from the SoC
    to provide the OPP framework with required information.
    This is used to determine the voltage and frequency value for each OPP of
    operating-points-v2 table when it is parsed by the OPP framework.

    Signed-off-by: Ilia Lin
    Acked-by: Viresh Kumar
    Reviewed-by: Amit Kucheria
    Tested-by: Amit Kucheria
    Signed-off-by: Rafael J. Wysocki

    Ilia Lin