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]
Date:   Sun, 08 Jul 2018 22:31:33 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Jolly Shah <jolly.shah@...inx.com>, ard.biesheuvel@...aro.org,
        dmitry.torokhov@...il.com, gregkh@...uxfoundation.org,
        hkallweit1@...il.com, keescook@...omium.org,
        linux-clk@...r.kernel.org, mark.rutland@....com,
        matt@...eblueprint.co.uk, michal.simek@...inx.com,
        mingo@...nel.org, mturquette@...libre.com, robh+dt@...nel.org,
        sboyd@...eaurora.org, sudeep.holla@....com
Cc:     rajanv@...inx.com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        Jolly Shah <jollys@...inx.com>
Subject: Re: [PATCH v9 05/10] firmware: xilinx: Add clock APIs

Quoting Jolly Shah (2018-06-20 10:40:30)
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index 86d9bb8..c764d6e 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -269,14 +269,196 @@ static int zynqmp_pm_ioctl(u32 node_id, u32 ioctl_id, u32 arg1, u32 arg2,
>   */
>  static int zynqmp_pm_query_data(struct zynqmp_pm_query_data qdata, u32 *out)
>  {
> -       return zynqmp_pm_invoke_fn(PM_QUERY_DATA, qdata.qid, qdata.arg1,
> -                                  qdata.arg2, qdata.arg3, out);
> +       int ret;
> +
> +       ret = zynqmp_pm_invoke_fn(PM_QUERY_DATA, qdata.qid, qdata.arg1,
> +                                 qdata.arg2, qdata.arg3, out);
> +
> +       /*
> +        * For clock name query, all bytes in SMC response are clock name
> +        * characters and return code is always success. For invalid clocks,
> +        * clock name bytes would be 0s.

write the word 'zeroes' or 'zeros' please.

> +        */
> +       return qdata.qid == PM_QID_CLOCK_GET_NAME ? 0 : ret;
> +}
> +
[...]
> +
> +/**
> + * zynqmp_pm_clock_setrate() - Set the clock rate for given id
> + * @clock_id:  ID of the clock
> + * @rate:      rate value in hz
> + *
> + * This function is used by master to set rate for any clock.
> + *
> + * Return: Returns status, either success or error+reason
> + */
> +static int zynqmp_pm_clock_setrate(u32 clock_id, u64 rate)
> +{
> +       return zynqmp_pm_invoke_fn(PM_CLOCK_SETRATE, clock_id,
> +                                  rate & 0xFFFFFFFF,
> +                                  (rate >> 32) & 0xFFFFFFFF,

Use upper_32_bits() and lower_32_bits().

> +                                  0, NULL);
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ