From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0528FC433E6 for ; Sat, 29 Aug 2020 17:09:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D983420757 for ; Sat, 29 Aug 2020 17:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728479AbgH2RJo (ORCPT ); Sat, 29 Aug 2020 13:09:44 -0400 Received: from foss.arm.com ([217.140.110.172]:45064 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728471AbgH2RJn (ORCPT ); Sat, 29 Aug 2020 13:09:43 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D8D78113E; Sat, 29 Aug 2020 10:09:42 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D67EC3F71F; Sat, 29 Aug 2020 10:09:41 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Cc: Sudeep Holla , kernel-team@android.com, Will Deacon , tsoni@quicinc.com, pratikp@quicinc.com Subject: [PATCH 9/9] firmware: arm_ffa: Setup in-kernel users of FFA partitions Date: Sat, 29 Aug 2020 18:09:23 +0100 Message-Id: <20200829170923.29949-10-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200829170923.29949-1-sudeep.holla@arm.com> References: <20200829170923.29949-1-sudeep.holla@arm.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In order to also enable in-kernel users of FFA interface along with the access to user-space applications, let us add simple set of operations for such devices. The in-kernel users are registered without the character device interface. Signed-off-by: Sudeep Holla --- drivers/firmware/arm_ffa/driver.c | 119 ++++++++++++++++++++++++++---- include/linux/arm_ffa.h | 12 +++ 2 files changed, 117 insertions(+), 14 deletions(-) diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c index 96113e594db6..811558ef2a1d 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -372,6 +372,97 @@ static void ffa_device_put(struct ffa_device *ffa_dev) mutex_unlock(&ffa_dev->mutex); } +static int ffa_dev_open(struct ffa_device *ffa_dev) +{ + ffa_device_get(ffa_dev); + + return 0; +} + +static int ffa_dev_close(struct ffa_device *ffa_dev) +{ + ffa_device_put(ffa_dev); + + return 0; +} + +static long +ffa_dev_ioctl(struct ffa_device *ffa_dev, unsigned int ioctl, void *arg) +{ + long r = -EINVAL; + + switch (ioctl) { + case FFA_GET_API_VERSION: + r = drv_info->version; + break; + case FFA_GET_PARTITION_ID: + r = ffa_dev->vm_id; + break; + case FFA_GET_PARTITION_INFO: { + struct ffa_part_info *pinfo = arg; + + if (ffa_partition_probe(pinfo->uuid_str, &pinfo->info) != 1) + r = -E2BIG; + break; + } + case FFA_SEND_RECEIVE_SYNC: { + struct ffa_send_recv_sync *kdata = arg; + + r = ffa_msg_send_direct_req(ffa_dev->vm_id, kdata->endpoint_id, + &kdata->data); + break; + } + case FFA_SEND_RECEIVE_ASYNC: { + struct ffa_send_recv_async *kdata = arg; + + if (kdata->length < 0 || kdata->length > RXTX_BUFFER_SIZE) { + r = -EINVAL; + break; + } + + r = ffa_msg_send(ffa_dev->vm_id, kdata->endpoint_id, + kdata->buffer, kdata->length); + break; + } + default: + r = -EINVAL; + } + + return r; +} + +struct ffa_dev_ops ffa_ops = { + .open = ffa_dev_open, + .close = ffa_dev_close, + .ioctl = ffa_dev_ioctl, +}; + +struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev) +{ + struct list_head *p; + struct ffa_dev_ops *ops = NULL; + + if (uuid_is_null(&dev->uuid)) + return NULL; + + mutex_lock(&ffa_devs_list_mutex); + + list_for_each(p, &ffa_devs_list) { + struct ffa_device *tmp_dev; + + tmp_dev = list_to_ffa_dev(p); + + if (uuid_equal(&tmp_dev->uuid, &dev->uuid)) { + ops = &ffa_ops; + break; + } + } + + mutex_unlock(&ffa_devs_list_mutex); + + return ops; +} + static int ffa_open(struct inode *inode, struct file *filp) { struct ffa_device *ffa_dev; @@ -380,7 +471,7 @@ static int ffa_open(struct inode *inode, struct file *filp) if (!ffa_dev) return -EINVAL; - ffa_device_get(ffa_dev); + ffa_dev_open(ffa_dev); filp->private_data = ffa_dev; @@ -391,7 +482,7 @@ static int ffa_release(struct inode *inode, struct file *filp) { struct ffa_device *ffa_dev = filp->private_data; - ffa_device_put(ffa_dev); + ffa_dev_close(ffa_dev); filp->private_data = NULL; @@ -406,14 +497,10 @@ static long ffa_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) switch (ioctl) { case FFA_GET_API_VERSION: - if (arg) - goto out; - r = drv_info->version; - break; case FFA_GET_PARTITION_ID: if (arg) goto out; - r = ffa_dev->vm_id; + r = ffa_dev_ioctl(ffa_dev, FFA_GET_PARTITION_ID, NULL); break; case FFA_GET_PARTITION_INFO: { struct ffa_partition_info pbuf; @@ -499,7 +586,8 @@ static const struct file_operations ffa_fops = { .llseek = noop_llseek, }; -static int ffa_device_alloc_register(const char *name, u16 vm_id, uuid_t *uuid) +static int ffa_device_alloc_register(const char *name, u16 vm_id, + uuid_t *uuid, bool cdev_if) { int ret; struct ffa_device *ffa_dev; @@ -514,7 +602,7 @@ static int ffa_device_alloc_register(const char *name, u16 vm_id, uuid_t *uuid) dev_set_name(&ffa_dev->dev, name); dev_set_drvdata(&ffa_dev->dev, drv_info); - cdev_init(&ffa_dev->cdev, &ffa_fops); + cdev_init(&ffa_dev->cdev, cdev_if ? &ffa_fops : NULL); ret = ffa_device_register(ffa_dev); if (ret) @@ -527,13 +615,13 @@ static int ffa_device_alloc_register(const char *name, u16 vm_id, uuid_t *uuid) return 0; } -static int ffa_setup_partitions(void) +static int ffa_setup_partitions(bool hyp) { int ret; struct ffa_partition_info pbuf; struct device_node *child, *parent; const char *p_uuid, *pfx = "Ignoring FFA partition"; - const char *compatible = "arm,ffa-1.0-hypervisor"; + const char *compatible = hyp ? "arm,ffa-1.0-hypervisor" : "arm,ffa-1.0"; uuid_t uuid = UUID_INIT(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); parent = of_find_compatible_node(NULL, NULL, compatible); @@ -567,7 +655,7 @@ static int ffa_setup_partitions(void) return -EINVAL; } - ret = ffa_device_alloc_register(p_uuid, pbuf.id, &uuid); + ret = ffa_device_alloc_register(p_uuid, pbuf.id, &uuid, hyp); if (ret) { pr_err("%s: failed to register %s\n", pfx, p_uuid); continue; @@ -624,12 +712,15 @@ static int __init ffa_init(void) mutex_init(&drv_info->tx_lock); /* This will be default device both in theguests and host */ - ret = ffa_device_alloc_register("self", drv_info->vm_id, NULL); + ret = ffa_device_alloc_register("self", drv_info->vm_id, NULL, true); if (ret) return ret; /* Set up all the partitions that KVM hypervisor maintains */ - ffa_setup_partitions(); + ffa_setup_partitions(true); + + /* Set up all the partitions which have in-kernel drivers */ + ffa_setup_partitions(false); return 0; free_pages: diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h index 6824e0633c77..1df7399d207d 100644 --- a/include/linux/arm_ffa.h +++ b/include/linux/arm_ffa.h @@ -11,6 +11,7 @@ #include #include #include +#include struct ffa_device { u32 vm_id; @@ -39,12 +40,19 @@ struct ffa_driver { #define to_ffa_driver(d) container_of(d, struct ffa_driver, driver) +struct ffa_dev_ops { + int (*open)(struct ffa_device *dev); + int (*close)(struct ffa_device *dev); + long (*ioctl)(struct ffa_device *dev, unsigned int ioctl, void *arg); +}; + #if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT) int ffa_device_register(struct ffa_device *ffa_dev); void ffa_device_unregister(struct ffa_device *ffa_dev); int ffa_driver_register(struct ffa_driver *driver, struct module *owner, const char *mod_name); void ffa_driver_unregister(struct ffa_driver *driver); +struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev); #else static inline int ffa_device_register(struct ffa_device *ffa_dev) @@ -63,6 +71,10 @@ ffa_driver_register(struct ffa_driver *driver, struct module *owner, static inline void ffa_driver_unregister(struct ffa_driver *driver) {} +struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev) +{ + return NULL; +} #endif /* CONFIG_ARM_FFA_TRANSPORT */ #define ffa_register(driver) \ -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29FABC433E2 for ; Sat, 29 Aug 2020 17:11:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E555020757 for ; Sat, 29 Aug 2020 17:11:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YHlxv+xm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E555020757 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eY6Ox1DkmE972aQlqEOnR9sRSm1Il+AKBes/hNBf5kQ=; b=YHlxv+xm+81nAxcQd7mYRxTMaS zVrxxQLC3nZAludrzcCjNBYHdX0kTrtuszrnnBu6dnlmqhVOEvBSgGZD5PYvY5KqEJZ/HbLYR5PDu NOVniIJInoVM7Djx8i/Bw8hlvxLhX/KjVdxaX6TOIF9/v7BFGb82TyYomLtTzIlFIenBAxoIl5oio nN9xEmYAKqLLu6Ng01Kv1GZU0ye17zlJcOXwIC7pQ1eAOjDxvGhfNtVgysPsXnkQdPCz7pVvD/nqt BXfrZ56PNRNtgJNfX/jTDl7rwwomCKYZla0uVkh2AhBWPyGrZdKcOjkICi3l/pK6finNeYqC4pm4v kgBaX52Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kC4Md-0000Zr-7j; Sat, 29 Aug 2020 17:10:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kC4MJ-0000Vu-H4 for linux-arm-kernel@lists.infradead.org; Sat, 29 Aug 2020 17:09:46 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D8D78113E; Sat, 29 Aug 2020 10:09:42 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D67EC3F71F; Sat, 29 Aug 2020 10:09:41 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 9/9] firmware: arm_ffa: Setup in-kernel users of FFA partitions Date: Sat, 29 Aug 2020 18:09:23 +0100 Message-Id: <20200829170923.29949-10-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200829170923.29949-1-sudeep.holla@arm.com> References: <20200829170923.29949-1-sudeep.holla@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200829_130943_744163_EE36BE8D X-CRM114-Status: GOOD ( 21.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Will Deacon , pratikp@quicinc.com, tsoni@quicinc.com, kernel-team@android.com, Sudeep Holla MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In order to also enable in-kernel users of FFA interface along with the access to user-space applications, let us add simple set of operations for such devices. The in-kernel users are registered without the character device interface. Signed-off-by: Sudeep Holla --- drivers/firmware/arm_ffa/driver.c | 119 ++++++++++++++++++++++++++---- include/linux/arm_ffa.h | 12 +++ 2 files changed, 117 insertions(+), 14 deletions(-) diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c index 96113e594db6..811558ef2a1d 100644 --- a/drivers/firmware/arm_ffa/driver.c +++ b/drivers/firmware/arm_ffa/driver.c @@ -372,6 +372,97 @@ static void ffa_device_put(struct ffa_device *ffa_dev) mutex_unlock(&ffa_dev->mutex); } +static int ffa_dev_open(struct ffa_device *ffa_dev) +{ + ffa_device_get(ffa_dev); + + return 0; +} + +static int ffa_dev_close(struct ffa_device *ffa_dev) +{ + ffa_device_put(ffa_dev); + + return 0; +} + +static long +ffa_dev_ioctl(struct ffa_device *ffa_dev, unsigned int ioctl, void *arg) +{ + long r = -EINVAL; + + switch (ioctl) { + case FFA_GET_API_VERSION: + r = drv_info->version; + break; + case FFA_GET_PARTITION_ID: + r = ffa_dev->vm_id; + break; + case FFA_GET_PARTITION_INFO: { + struct ffa_part_info *pinfo = arg; + + if (ffa_partition_probe(pinfo->uuid_str, &pinfo->info) != 1) + r = -E2BIG; + break; + } + case FFA_SEND_RECEIVE_SYNC: { + struct ffa_send_recv_sync *kdata = arg; + + r = ffa_msg_send_direct_req(ffa_dev->vm_id, kdata->endpoint_id, + &kdata->data); + break; + } + case FFA_SEND_RECEIVE_ASYNC: { + struct ffa_send_recv_async *kdata = arg; + + if (kdata->length < 0 || kdata->length > RXTX_BUFFER_SIZE) { + r = -EINVAL; + break; + } + + r = ffa_msg_send(ffa_dev->vm_id, kdata->endpoint_id, + kdata->buffer, kdata->length); + break; + } + default: + r = -EINVAL; + } + + return r; +} + +struct ffa_dev_ops ffa_ops = { + .open = ffa_dev_open, + .close = ffa_dev_close, + .ioctl = ffa_dev_ioctl, +}; + +struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev) +{ + struct list_head *p; + struct ffa_dev_ops *ops = NULL; + + if (uuid_is_null(&dev->uuid)) + return NULL; + + mutex_lock(&ffa_devs_list_mutex); + + list_for_each(p, &ffa_devs_list) { + struct ffa_device *tmp_dev; + + tmp_dev = list_to_ffa_dev(p); + + if (uuid_equal(&tmp_dev->uuid, &dev->uuid)) { + ops = &ffa_ops; + break; + } + } + + mutex_unlock(&ffa_devs_list_mutex); + + return ops; +} + static int ffa_open(struct inode *inode, struct file *filp) { struct ffa_device *ffa_dev; @@ -380,7 +471,7 @@ static int ffa_open(struct inode *inode, struct file *filp) if (!ffa_dev) return -EINVAL; - ffa_device_get(ffa_dev); + ffa_dev_open(ffa_dev); filp->private_data = ffa_dev; @@ -391,7 +482,7 @@ static int ffa_release(struct inode *inode, struct file *filp) { struct ffa_device *ffa_dev = filp->private_data; - ffa_device_put(ffa_dev); + ffa_dev_close(ffa_dev); filp->private_data = NULL; @@ -406,14 +497,10 @@ static long ffa_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) switch (ioctl) { case FFA_GET_API_VERSION: - if (arg) - goto out; - r = drv_info->version; - break; case FFA_GET_PARTITION_ID: if (arg) goto out; - r = ffa_dev->vm_id; + r = ffa_dev_ioctl(ffa_dev, FFA_GET_PARTITION_ID, NULL); break; case FFA_GET_PARTITION_INFO: { struct ffa_partition_info pbuf; @@ -499,7 +586,8 @@ static const struct file_operations ffa_fops = { .llseek = noop_llseek, }; -static int ffa_device_alloc_register(const char *name, u16 vm_id, uuid_t *uuid) +static int ffa_device_alloc_register(const char *name, u16 vm_id, + uuid_t *uuid, bool cdev_if) { int ret; struct ffa_device *ffa_dev; @@ -514,7 +602,7 @@ static int ffa_device_alloc_register(const char *name, u16 vm_id, uuid_t *uuid) dev_set_name(&ffa_dev->dev, name); dev_set_drvdata(&ffa_dev->dev, drv_info); - cdev_init(&ffa_dev->cdev, &ffa_fops); + cdev_init(&ffa_dev->cdev, cdev_if ? &ffa_fops : NULL); ret = ffa_device_register(ffa_dev); if (ret) @@ -527,13 +615,13 @@ static int ffa_device_alloc_register(const char *name, u16 vm_id, uuid_t *uuid) return 0; } -static int ffa_setup_partitions(void) +static int ffa_setup_partitions(bool hyp) { int ret; struct ffa_partition_info pbuf; struct device_node *child, *parent; const char *p_uuid, *pfx = "Ignoring FFA partition"; - const char *compatible = "arm,ffa-1.0-hypervisor"; + const char *compatible = hyp ? "arm,ffa-1.0-hypervisor" : "arm,ffa-1.0"; uuid_t uuid = UUID_INIT(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); parent = of_find_compatible_node(NULL, NULL, compatible); @@ -567,7 +655,7 @@ static int ffa_setup_partitions(void) return -EINVAL; } - ret = ffa_device_alloc_register(p_uuid, pbuf.id, &uuid); + ret = ffa_device_alloc_register(p_uuid, pbuf.id, &uuid, hyp); if (ret) { pr_err("%s: failed to register %s\n", pfx, p_uuid); continue; @@ -624,12 +712,15 @@ static int __init ffa_init(void) mutex_init(&drv_info->tx_lock); /* This will be default device both in theguests and host */ - ret = ffa_device_alloc_register("self", drv_info->vm_id, NULL); + ret = ffa_device_alloc_register("self", drv_info->vm_id, NULL, true); if (ret) return ret; /* Set up all the partitions that KVM hypervisor maintains */ - ffa_setup_partitions(); + ffa_setup_partitions(true); + + /* Set up all the partitions which have in-kernel drivers */ + ffa_setup_partitions(false); return 0; free_pages: diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h index 6824e0633c77..1df7399d207d 100644 --- a/include/linux/arm_ffa.h +++ b/include/linux/arm_ffa.h @@ -11,6 +11,7 @@ #include #include #include +#include struct ffa_device { u32 vm_id; @@ -39,12 +40,19 @@ struct ffa_driver { #define to_ffa_driver(d) container_of(d, struct ffa_driver, driver) +struct ffa_dev_ops { + int (*open)(struct ffa_device *dev); + int (*close)(struct ffa_device *dev); + long (*ioctl)(struct ffa_device *dev, unsigned int ioctl, void *arg); +}; + #if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT) int ffa_device_register(struct ffa_device *ffa_dev); void ffa_device_unregister(struct ffa_device *ffa_dev); int ffa_driver_register(struct ffa_driver *driver, struct module *owner, const char *mod_name); void ffa_driver_unregister(struct ffa_driver *driver); +struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev); #else static inline int ffa_device_register(struct ffa_device *ffa_dev) @@ -63,6 +71,10 @@ ffa_driver_register(struct ffa_driver *driver, struct module *owner, static inline void ffa_driver_unregister(struct ffa_driver *driver) {} +struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev) +{ + return NULL; +} #endif /* CONFIG_ARM_FFA_TRANSPORT */ #define ffa_register(driver) \ -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel