lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gUf3Vh=baW7PgPMnFcgV6CjMc2kNayhzP-MC=UvQogKA@mail.gmail.com>
Date:   Wed, 24 May 2023 17:11:07 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Cristian Marussi <cristian.marussi@....com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-pm@...r.kernel.org, sudeep.holla@....com,
        james.quinlan@...adcom.com, Jonathan.Cameron@...wei.com,
        f.fainelli@...il.com, vincent.guittot@...aro.org,
        tarek.el-sherbiny@....com, nicola.mazzucato@....com,
        souvik.chakravarty@....com, wleavitt@...vell.com,
        wbartczak@...vell.com, "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v2 3/3] powercap: arm_scmi: Add support for disabling
 powercaps on a zone

On Thu, Mar 9, 2023 at 3:07 PM Cristian Marussi
<cristian.marussi@....com> wrote:
>
> Add support to disable/enable powercapping on a zone.
>
> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> Signed-off-by: Cristian Marussi <cristian.marussi@....com>

Acked-by: Rafael J. Wysocki <rafael@...nel.org>

> ---
>  drivers/powercap/arm_scmi_powercap.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/drivers/powercap/arm_scmi_powercap.c b/drivers/powercap/arm_scmi_powercap.c
> index 05d0e516176a..5231f6d52ae3 100644
> --- a/drivers/powercap/arm_scmi_powercap.c
> +++ b/drivers/powercap/arm_scmi_powercap.c
> @@ -70,10 +70,26 @@ static int scmi_powercap_get_power_uw(struct powercap_zone *pz,
>         return 0;
>  }
>
> +static int scmi_powercap_zone_enable_set(struct powercap_zone *pz, bool mode)
> +{
> +       struct scmi_powercap_zone *spz = to_scmi_powercap_zone(pz);
> +
> +       return powercap_ops->cap_enable_set(spz->ph, spz->info->id, mode);
> +}
> +
> +static int scmi_powercap_zone_enable_get(struct powercap_zone *pz, bool *mode)
> +{
> +       struct scmi_powercap_zone *spz = to_scmi_powercap_zone(pz);
> +
> +       return powercap_ops->cap_enable_get(spz->ph, spz->info->id, mode);
> +}
> +
>  static const struct powercap_zone_ops zone_ops = {
>         .get_max_power_range_uw = scmi_powercap_get_max_power_range_uw,
>         .get_power_uw = scmi_powercap_get_power_uw,
>         .release = scmi_powercap_zone_release,
> +       .set_enable = scmi_powercap_zone_enable_set,
> +       .get_enable = scmi_powercap_zone_enable_get,
>  };
>
>  static void scmi_powercap_normalize_cap(const struct scmi_powercap_zone *spz,
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ