[PATCH v7 4/5] firmware: arm_ffa: Setup in-kernel users of FFA partitions

Jens Wiklander jens.wiklander at linaro.org
Mon May 24 23:29:42 PDT 2021


On Fri, May 21, 2021 at 5:10 PM Sudeep Holla <sudeep.holla at arm.com> wrote:
>
> Parse the FFA nodes from the device-tree and register all the partitions
> whose services will be used in the kernel.
>
> In order to also enable in-kernel users of FFA interface, let us add
> simple set of operations for such devices.
>
> The in-kernel users are registered without the character device interface.
>
> Reviewed-by: Jens Wiklander <jens.wiklander at linaro.org>
> Tested-by: Jens Wiklander <jens.wiklander at linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla at arm.com>
> ---
>  drivers/firmware/arm_ffa/bus.c    |   9 ++
>  drivers/firmware/arm_ffa/common.h |   3 +
>  drivers/firmware/arm_ffa/driver.c | 220 ++++++++++++++++++++++++++++++
>  include/linux/arm_ffa.h           |  38 +++++-
>  4 files changed, 269 insertions(+), 1 deletion(-)
>
[snip]
> --- a/include/linux/arm_ffa.h
> +++ b/include/linux/arm_ffa.h
> @@ -6,7 +6,6 @@
>  #ifndef _LINUX_ARM_FFA_H
>  #define _LINUX_ARM_FFA_H
>
> -#include <linux/cdev.h>
>  #include <linux/device.h>
>  #include <linux/module.h>
>  #include <linux/types.h>
> @@ -15,6 +14,7 @@
>  /* FFA Bus/Device/Driver related */
>  struct ffa_device {
>         int vm_id;
> +       bool mode_32bit;
>         uuid_t uuid;
>         struct device dev;
>  };
> @@ -48,6 +48,7 @@ int ffa_driver_register(struct ffa_driver *driver, struct module *owner,
>                         const char *mod_name);
>  void ffa_driver_unregister(struct ffa_driver *driver);
>  bool ffa_device_is_valid(struct ffa_device *ffa_dev);
> +const struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev);
>
>  #else
>  static inline
> @@ -70,6 +71,10 @@ static inline void ffa_driver_unregister(struct ffa_driver *driver) {}
>  static inline
>  bool ffa_device_is_valid(struct ffa_device *ffa_dev) { return false; }
>
> +const struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev)

I believe this should be static inline.

Cheers,
Jens



More information about the linux-arm-kernel mailing list