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>] [day] [month] [year] [list]
Message-ID: <46fe9000-8136-224e-de53-4ac9d53199d4@xilinx.com>
Date:   Wed, 30 Jun 2021 13:56:56 +0200
From:   Michal Simek <michal.simek@...inx.com>
To:     Abhyuday Godhasara <abhyuday.godhasara@...inx.com>,
        <michal.simek@...inx.com>
CC:     <rajan.vaja@...inx.com>, <manish.narani@...inx.com>,
        <zou_wei@...wei.com>, <amit.sunil.dhamne@...inx.com>,
        <lakshmi.sai.krishna.potthuri@...inx.com>,
        <wendy.liang@...inx.com>, <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <jliang@...inx.com>,
        Tejas Patel <tejas.patel@...inx.com>
Subject: Re: [PATCH v2 1/6] firmware: xilinx: add register notifier in zynqmp
 firmware



On 6/25/21 3:49 PM, Abhyuday Godhasara wrote:
> In zynqmp-firmware, register notifier is not supported, add support of
> register notifier in zynqmp-firmware.
> 
> Signed-off-by: Tejas Patel <tejas.patel@...inx.com>
> Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@...inx.com>
> ---
> Changes in v2:
> - Removed updated copyright year from unchanged files.
> ---
>  drivers/firmware/xilinx/zynqmp.c     | 23 +++++++++++++++++++++++
>  include/linux/firmware/xlnx-zynqmp.h | 11 ++++++++++-
>  2 files changed, 33 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index 15b138326ecc..33f190e257b1 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -1036,6 +1036,29 @@ int zynqmp_pm_aes_engine(const u64 address, u32 *out)
>  }
>  EXPORT_SYMBOL_GPL(zynqmp_pm_aes_engine);
>  
> +/**
> + * zynqmp_pm_register_notifier() - PM API for register a subsystem
> + *                                to be notified about specific
> + *                                event/error.
> + * @node:	Node ID to which the event is related.
> + * @event:	Event Mask of Error events for which wants to get notified.
> + * @wake:	Wake subsystem upon capturing the event if value 1
> + * @enable:	Enable the registration for value 1, disable for value 0
> + *
> + * This function is used to register/un-register for particular node-event
> + * combination in firmware.
> + *
> + * Return: Returns status, either success or error+reason
> + */
> +
> +int zynqmp_pm_register_notifier(const u32 node, const u32 event,
> +				const u32 wake, const u32 enable)
> +{
> +	return zynqmp_pm_invoke_fn(PM_REGISTER_NOTIFIER, node, event,
> +				   wake, enable, NULL);
> +}
> +EXPORT_SYMBOL_GPL(zynqmp_pm_register_notifier);
> +
>  /**
>   * zynqmp_pm_system_shutdown - PM call to request a system shutdown or restart
>   * @type:	Shutdown or restart? 0 for shutdown, 1 for restart
> diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> index 9d1a5c175065..655783259415 100644
> --- a/include/linux/firmware/xlnx-zynqmp.h
> +++ b/include/linux/firmware/xlnx-zynqmp.h
> @@ -2,7 +2,7 @@
>  /*
>   * Xilinx Zynq MPSoC Firmware layer
>   *
> - *  Copyright (C) 2014-2019 Xilinx
> + *  Copyright (C) 2014-2021 Xilinx
>   *
>   *  Michal Simek <michal.simek@...inx.com>
>   *  Davorin Mista <davorin.mista@...ios.com>
> @@ -62,6 +62,7 @@
>  
>  enum pm_api_id {
>  	PM_GET_API_VERSION = 1,
> +	PM_REGISTER_NOTIFIER = 5,
>  	PM_SYSTEM_SHUTDOWN = 12,
>  	PM_REQUEST_NODE = 13,
>  	PM_RELEASE_NODE = 14,
> @@ -411,6 +412,8 @@ int zynqmp_pm_pinctrl_get_config(const u32 pin, const u32 param,
>  				 u32 *value);
>  int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
>  				 u32 value);
> +int zynqmp_pm_register_notifier(const u32 node, const u32 event,
> +				const u32 wake, const u32 enable);
>  #else
>  static inline int zynqmp_pm_get_api_version(u32 *version)
>  {
> @@ -622,6 +625,12 @@ static inline int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
>  {
>  	return -ENODEV;
>  }
> +
> +static inline int zynqmp_pm_register_notifier(const u32 node, const u32 event,
> +					      const u32 wake, const u32 enable)
> +{
> +	return -ENODEV;
> +}
>  #endif
>  
>  #endif /* __FIRMWARE_ZYNQMP_H__ */
> 

Acked-by: Michal Simek <michal.simek@...inx.com>

M

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ