* [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
@ 2022-04-05 14:35 ` Robin Murphy
0 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2022-04-05 14:35 UTC (permalink / raw)
To: benve, neescoba, jgg; +Cc: linux-rdma, iommu, linux-kernel
Rather than hard-coding pci_bus_type, pass the PF device through to
usnic_uiom_alloc_pd() and retrieve its bus there. This prepares for
iommu_domain_alloc() changing to take a device rather than a bus_type.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 3 +--
drivers/infiniband/hw/usnic/usnic_uiom.c | 5 ++---
drivers/infiniband/hw/usnic/usnic_uiom.h | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index d3a9670bf971..06aae6a79c3d 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -442,7 +442,7 @@ int usnic_ib_alloc_pd(struct ib_pd *ibpd, struct ib_udata *udata)
{
struct usnic_ib_pd *pd = to_upd(ibpd);
- pd->umem_pd = usnic_uiom_alloc_pd();
+ pd->umem_pd = usnic_uiom_alloc_pd(ibpd->device->dev.parent);
if (IS_ERR(pd->umem_pd))
return PTR_ERR(pd->umem_pd);
@@ -706,4 +706,3 @@ int usnic_ib_mmap(struct ib_ucontext *context,
usnic_err("No VF %u found\n", vfid);
return -EINVAL;
}
-
diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c
index 8c48027614a1..e212929369df 100644
--- a/drivers/infiniband/hw/usnic/usnic_uiom.c
+++ b/drivers/infiniband/hw/usnic/usnic_uiom.c
@@ -40,7 +40,6 @@
#include <linux/iommu.h>
#include <linux/workqueue.h>
#include <linux/list.h>
-#include <linux/pci.h>
#include <rdma/ib_verbs.h>
#include "usnic_log.h"
@@ -439,7 +438,7 @@ void usnic_uiom_reg_release(struct usnic_uiom_reg *uiomr)
__usnic_uiom_release_tail(uiomr);
}
-struct usnic_uiom_pd *usnic_uiom_alloc_pd(void)
+struct usnic_uiom_pd *usnic_uiom_alloc_pd(struct device *dev)
{
struct usnic_uiom_pd *pd;
void *domain;
@@ -448,7 +447,7 @@ struct usnic_uiom_pd *usnic_uiom_alloc_pd(void)
if (!pd)
return ERR_PTR(-ENOMEM);
- pd->domain = domain = iommu_domain_alloc(&pci_bus_type);
+ pd->domain = domain = iommu_domain_alloc(dev->bus);
if (!domain) {
usnic_err("Failed to allocate IOMMU domain");
kfree(pd);
diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.h b/drivers/infiniband/hw/usnic/usnic_uiom.h
index 9407522179e9..5a9acf941510 100644
--- a/drivers/infiniband/hw/usnic/usnic_uiom.h
+++ b/drivers/infiniband/hw/usnic/usnic_uiom.h
@@ -80,7 +80,7 @@ struct usnic_uiom_chunk {
struct scatterlist page_list[];
};
-struct usnic_uiom_pd *usnic_uiom_alloc_pd(void);
+struct usnic_uiom_pd *usnic_uiom_alloc_pd(struct device *dev);
void usnic_uiom_dealloc_pd(struct usnic_uiom_pd *pd);
int usnic_uiom_attach_dev_to_pd(struct usnic_uiom_pd *pd, struct device *dev);
void usnic_uiom_detach_dev_from_pd(struct usnic_uiom_pd *pd,
--
2.28.0.dirty
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
@ 2022-04-05 14:35 ` Robin Murphy
0 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2022-04-05 14:35 UTC (permalink / raw)
To: benve, neescoba, jgg; +Cc: linux-rdma, iommu, linux-kernel
Rather than hard-coding pci_bus_type, pass the PF device through to
usnic_uiom_alloc_pd() and retrieve its bus there. This prepares for
iommu_domain_alloc() changing to take a device rather than a bus_type.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 3 +--
drivers/infiniband/hw/usnic/usnic_uiom.c | 5 ++---
drivers/infiniband/hw/usnic/usnic_uiom.h | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index d3a9670bf971..06aae6a79c3d 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -442,7 +442,7 @@ int usnic_ib_alloc_pd(struct ib_pd *ibpd, struct ib_udata *udata)
{
struct usnic_ib_pd *pd = to_upd(ibpd);
- pd->umem_pd = usnic_uiom_alloc_pd();
+ pd->umem_pd = usnic_uiom_alloc_pd(ibpd->device->dev.parent);
if (IS_ERR(pd->umem_pd))
return PTR_ERR(pd->umem_pd);
@@ -706,4 +706,3 @@ int usnic_ib_mmap(struct ib_ucontext *context,
usnic_err("No VF %u found\n", vfid);
return -EINVAL;
}
-
diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c
index 8c48027614a1..e212929369df 100644
--- a/drivers/infiniband/hw/usnic/usnic_uiom.c
+++ b/drivers/infiniband/hw/usnic/usnic_uiom.c
@@ -40,7 +40,6 @@
#include <linux/iommu.h>
#include <linux/workqueue.h>
#include <linux/list.h>
-#include <linux/pci.h>
#include <rdma/ib_verbs.h>
#include "usnic_log.h"
@@ -439,7 +438,7 @@ void usnic_uiom_reg_release(struct usnic_uiom_reg *uiomr)
__usnic_uiom_release_tail(uiomr);
}
-struct usnic_uiom_pd *usnic_uiom_alloc_pd(void)
+struct usnic_uiom_pd *usnic_uiom_alloc_pd(struct device *dev)
{
struct usnic_uiom_pd *pd;
void *domain;
@@ -448,7 +447,7 @@ struct usnic_uiom_pd *usnic_uiom_alloc_pd(void)
if (!pd)
return ERR_PTR(-ENOMEM);
- pd->domain = domain = iommu_domain_alloc(&pci_bus_type);
+ pd->domain = domain = iommu_domain_alloc(dev->bus);
if (!domain) {
usnic_err("Failed to allocate IOMMU domain");
kfree(pd);
diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.h b/drivers/infiniband/hw/usnic/usnic_uiom.h
index 9407522179e9..5a9acf941510 100644
--- a/drivers/infiniband/hw/usnic/usnic_uiom.h
+++ b/drivers/infiniband/hw/usnic/usnic_uiom.h
@@ -80,7 +80,7 @@ struct usnic_uiom_chunk {
struct scatterlist page_list[];
};
-struct usnic_uiom_pd *usnic_uiom_alloc_pd(void);
+struct usnic_uiom_pd *usnic_uiom_alloc_pd(struct device *dev);
void usnic_uiom_dealloc_pd(struct usnic_uiom_pd *pd);
int usnic_uiom_attach_dev_to_pd(struct usnic_uiom_pd *pd, struct device *dev);
void usnic_uiom_detach_dev_from_pd(struct usnic_uiom_pd *pd,
--
2.28.0.dirty
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
2022-04-05 14:35 ` Robin Murphy
@ 2022-04-06 19:54 ` kernel test robot
-1 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-04-06 19:54 UTC (permalink / raw)
To: Robin Murphy, benve, neescoba, jgg
Cc: linux-rdma, iommu, kbuild-all, linux-kernel
Hi Robin,
I love your patch! Yet something to improve:
[auto build test ERROR on rdma/for-next]
[also build test ERROR on v5.18-rc1 next-20220406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220407/202204070316.vOzwORw5-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/0aa6215010a083081b26ccb23d0aa2b4089bbbfd
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
git checkout 0aa6215010a083081b26ccb23d0aa2b4089bbbfd
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/infiniband/hw/usnic/usnic_uiom.c: In function 'usnic_uiom_init':
>> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: error: 'pci_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
561 | if (!iommu_present(&pci_bus_type)) {
| ^~~~~~~~~~~~
| bus_type
drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: note: each undeclared identifier is reported only once for each function it appears in
vim +561 drivers/infiniband/hw/usnic/usnic_uiom.c
e3cf00d0a87f02 Upinder Malhi 2013-09-10 558
e3cf00d0a87f02 Upinder Malhi 2013-09-10 559 int usnic_uiom_init(char *drv_name)
e3cf00d0a87f02 Upinder Malhi 2013-09-10 560 {
e3cf00d0a87f02 Upinder Malhi 2013-09-10 @561 if (!iommu_present(&pci_bus_type)) {
--
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
@ 2022-04-06 19:54 ` kernel test robot
0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-04-06 19:54 UTC (permalink / raw)
To: Robin Murphy, benve, neescoba, jgg
Cc: kbuild-all, linux-rdma, iommu, linux-kernel
Hi Robin,
I love your patch! Yet something to improve:
[auto build test ERROR on rdma/for-next]
[also build test ERROR on v5.18-rc1 next-20220406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220407/202204070316.vOzwORw5-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/0aa6215010a083081b26ccb23d0aa2b4089bbbfd
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
git checkout 0aa6215010a083081b26ccb23d0aa2b4089bbbfd
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/infiniband/hw/usnic/usnic_uiom.c: In function 'usnic_uiom_init':
>> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: error: 'pci_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
561 | if (!iommu_present(&pci_bus_type)) {
| ^~~~~~~~~~~~
| bus_type
drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: note: each undeclared identifier is reported only once for each function it appears in
vim +561 drivers/infiniband/hw/usnic/usnic_uiom.c
e3cf00d0a87f02 Upinder Malhi 2013-09-10 558
e3cf00d0a87f02 Upinder Malhi 2013-09-10 559 int usnic_uiom_init(char *drv_name)
e3cf00d0a87f02 Upinder Malhi 2013-09-10 560 {
e3cf00d0a87f02 Upinder Malhi 2013-09-10 @561 if (!iommu_present(&pci_bus_type)) {
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
2022-04-06 19:54 ` kernel test robot
(?)
@ 2022-04-06 21:39 ` Robin Murphy
-1 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2022-04-06 21:39 UTC (permalink / raw)
To: kernel test robot, benve, neescoba, jgg
Cc: linux-rdma, iommu, kbuild-all, linux-kernel
On 2022-04-06 20:54, kernel test robot wrote:
> Hi Robin,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on rdma/for-next]
> [also build test ERROR on v5.18-rc1 next-20220406]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
Oops, I failed to notice that this does actually depend on the other
patch I sent cleaning up iommu_present()[1] - I should have sent them
together as a series, sorry about that.
Thanks,
Robin.
[1]
https://lore.kernel.org/linux-iommu/f707b4248e1d33b6d2c7f1d7c94febb802cf9890.1649161199.git.robin.murphy@arm.com/
>
> url: https://github.com/intel-lab-lkp/linux/commits/Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
> config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220407/202204070316.vOzwORw5-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
> reproduce (this is a W=1 build):
> # https://github.com/intel-lab-lkp/linux/commit/0aa6215010a083081b26ccb23d0aa2b4089bbbfd
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
> git checkout 0aa6215010a083081b26ccb23d0aa2b4089bbbfd
> # save the config file to linux build tree
> mkdir build_dir
> make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> drivers/infiniband/hw/usnic/usnic_uiom.c: In function 'usnic_uiom_init':
>>> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: error: 'pci_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
> 561 | if (!iommu_present(&pci_bus_type)) {
> | ^~~~~~~~~~~~
> | bus_type
> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: note: each undeclared identifier is reported only once for each function it appears in
>
>
> vim +561 drivers/infiniband/hw/usnic/usnic_uiom.c
>
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 558
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 559 int usnic_uiom_init(char *drv_name)
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 560 {
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 @561 if (!iommu_present(&pci_bus_type)) {
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
@ 2022-04-06 21:39 ` Robin Murphy
0 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2022-04-06 21:39 UTC (permalink / raw)
To: kernel test robot, benve, neescoba, jgg
Cc: kbuild-all, linux-rdma, iommu, linux-kernel
On 2022-04-06 20:54, kernel test robot wrote:
> Hi Robin,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on rdma/for-next]
> [also build test ERROR on v5.18-rc1 next-20220406]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
Oops, I failed to notice that this does actually depend on the other
patch I sent cleaning up iommu_present()[1] - I should have sent them
together as a series, sorry about that.
Thanks,
Robin.
[1]
https://lore.kernel.org/linux-iommu/f707b4248e1d33b6d2c7f1d7c94febb802cf9890.1649161199.git.robin.murphy@arm.com/
>
> url: https://github.com/intel-lab-lkp/linux/commits/Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
> config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220407/202204070316.vOzwORw5-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
> reproduce (this is a W=1 build):
> # https://github.com/intel-lab-lkp/linux/commit/0aa6215010a083081b26ccb23d0aa2b4089bbbfd
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
> git checkout 0aa6215010a083081b26ccb23d0aa2b4089bbbfd
> # save the config file to linux build tree
> mkdir build_dir
> make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> drivers/infiniband/hw/usnic/usnic_uiom.c: In function 'usnic_uiom_init':
>>> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: error: 'pci_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
> 561 | if (!iommu_present(&pci_bus_type)) {
> | ^~~~~~~~~~~~
> | bus_type
> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: note: each undeclared identifier is reported only once for each function it appears in
>
>
> vim +561 drivers/infiniband/hw/usnic/usnic_uiom.c
>
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 558
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 559 int usnic_uiom_init(char *drv_name)
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 560 {
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 @561 if (!iommu_present(&pci_bus_type)) {
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
@ 2022-04-06 21:39 ` Robin Murphy
0 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2022-04-06 21:39 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2700 bytes --]
On 2022-04-06 20:54, kernel test robot wrote:
> Hi Robin,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on rdma/for-next]
> [also build test ERROR on v5.18-rc1 next-20220406]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
Oops, I failed to notice that this does actually depend on the other
patch I sent cleaning up iommu_present()[1] - I should have sent them
together as a series, sorry about that.
Thanks,
Robin.
[1]
https://lore.kernel.org/linux-iommu/f707b4248e1d33b6d2c7f1d7c94febb802cf9890.1649161199.git.robin.murphy(a)arm.com/
>
> url: https://github.com/intel-lab-lkp/linux/commits/Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
> config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220407/202204070316.vOzwORw5-lkp(a)intel.com/config)
> compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
> reproduce (this is a W=1 build):
> # https://github.com/intel-lab-lkp/linux/commit/0aa6215010a083081b26ccb23d0aa2b4089bbbfd
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Robin-Murphy/RDMA-usnic-Refactor-usnic_uiom_alloc_pd/20220406-133657
> git checkout 0aa6215010a083081b26ccb23d0aa2b4089bbbfd
> # save the config file to linux build tree
> mkdir build_dir
> make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> drivers/infiniband/hw/usnic/usnic_uiom.c: In function 'usnic_uiom_init':
>>> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: error: 'pci_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
> 561 | if (!iommu_present(&pci_bus_type)) {
> | ^~~~~~~~~~~~
> | bus_type
> drivers/infiniband/hw/usnic/usnic_uiom.c:561:29: note: each undeclared identifier is reported only once for each function it appears in
>
>
> vim +561 drivers/infiniband/hw/usnic/usnic_uiom.c
>
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 558
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 559 int usnic_uiom_init(char *drv_name)
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 560 {
> e3cf00d0a87f02 Upinder Malhi 2013-09-10 @561 if (!iommu_present(&pci_bus_type)) {
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
2022-04-06 21:39 ` Robin Murphy
(?)
@ 2022-04-06 21:53 ` Jason Gunthorpe
-1 siblings, 0 replies; 12+ messages in thread
From: Jason Gunthorpe @ 2022-04-06 21:53 UTC (permalink / raw)
To: Robin Murphy
Cc: neescoba, kbuild-all, kernel test robot, linux-rdma,
linux-kernel, iommu, benve
On Wed, Apr 06, 2022 at 10:39:47PM +0100, Robin Murphy wrote:
> On 2022-04-06 20:54, kernel test robot wrote:
> > Hi Robin,
> >
> > I love your patch! Yet something to improve:
> >
> > [auto build test ERROR on rdma/for-next]
> > [also build test ERROR on v5.18-rc1 next-20220406]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use '--base' as documented in
> > https://git-scm.com/docs/git-format-patch]
>
> Oops, I failed to notice that this does actually depend on the other patch I
> sent cleaning up iommu_present()[1] - I should have sent them together as a
> series, sorry about that.
No worries, I'll take care to order it right
Jason
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
@ 2022-04-06 21:53 ` Jason Gunthorpe
0 siblings, 0 replies; 12+ messages in thread
From: Jason Gunthorpe @ 2022-04-06 21:53 UTC (permalink / raw)
To: Robin Murphy
Cc: kernel test robot, benve, neescoba, kbuild-all, linux-rdma,
iommu, linux-kernel
On Wed, Apr 06, 2022 at 10:39:47PM +0100, Robin Murphy wrote:
> On 2022-04-06 20:54, kernel test robot wrote:
> > Hi Robin,
> >
> > I love your patch! Yet something to improve:
> >
> > [auto build test ERROR on rdma/for-next]
> > [also build test ERROR on v5.18-rc1 next-20220406]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use '--base' as documented in
> > https://git-scm.com/docs/git-format-patch]
>
> Oops, I failed to notice that this does actually depend on the other patch I
> sent cleaning up iommu_present()[1] - I should have sent them together as a
> series, sorry about that.
No worries, I'll take care to order it right
Jason
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
@ 2022-04-06 21:53 ` Jason Gunthorpe
0 siblings, 0 replies; 12+ messages in thread
From: Jason Gunthorpe @ 2022-04-06 21:53 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
On Wed, Apr 06, 2022 at 10:39:47PM +0100, Robin Murphy wrote:
> On 2022-04-06 20:54, kernel test robot wrote:
> > Hi Robin,
> >
> > I love your patch! Yet something to improve:
> >
> > [auto build test ERROR on rdma/for-next]
> > [also build test ERROR on v5.18-rc1 next-20220406]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use '--base' as documented in
> > https://git-scm.com/docs/git-format-patch]
>
> Oops, I failed to notice that this does actually depend on the other patch I
> sent cleaning up iommu_present()[1] - I should have sent them together as a
> series, sorry about that.
No worries, I'll take care to order it right
Jason
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
2022-04-05 14:35 ` Robin Murphy
@ 2022-04-08 17:23 ` Jason Gunthorpe via iommu
-1 siblings, 0 replies; 12+ messages in thread
From: Jason Gunthorpe @ 2022-04-08 17:23 UTC (permalink / raw)
To: Robin Murphy; +Cc: benve, neescoba, linux-rdma, iommu, linux-kernel
On Tue, Apr 05, 2022 at 03:35:59PM +0100, Robin Murphy wrote:
> Rather than hard-coding pci_bus_type, pass the PF device through to
> usnic_uiom_alloc_pd() and retrieve its bus there. This prepares for
> iommu_domain_alloc() changing to take a device rather than a bus_type.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> Reported-by: kernel test robot <lkp@intel.com>
> ---
> drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 3 +--
> drivers/infiniband/hw/usnic/usnic_uiom.c | 5 ++---
> drivers/infiniband/hw/usnic/usnic_uiom.h | 2 +-
> 3 files changed, 4 insertions(+), 6 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd()
@ 2022-04-08 17:23 ` Jason Gunthorpe via iommu
0 siblings, 0 replies; 12+ messages in thread
From: Jason Gunthorpe via iommu @ 2022-04-08 17:23 UTC (permalink / raw)
To: Robin Murphy; +Cc: neescoba, linux-rdma, iommu, linux-kernel, benve
On Tue, Apr 05, 2022 at 03:35:59PM +0100, Robin Murphy wrote:
> Rather than hard-coding pci_bus_type, pass the PF device through to
> usnic_uiom_alloc_pd() and retrieve its bus there. This prepares for
> iommu_domain_alloc() changing to take a device rather than a bus_type.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> Reported-by: kernel test robot <lkp@intel.com>
> ---
> drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 3 +--
> drivers/infiniband/hw/usnic/usnic_uiom.c | 5 ++---
> drivers/infiniband/hw/usnic/usnic_uiom.h | 2 +-
> 3 files changed, 4 insertions(+), 6 deletions(-)
Applied to for-next, thanks
Jason
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-04-08 17:23 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 14:35 [PATCH] RDMA/usnic: Refactor usnic_uiom_alloc_pd() Robin Murphy
2022-04-05 14:35 ` Robin Murphy
2022-04-06 19:54 ` kernel test robot
2022-04-06 19:54 ` kernel test robot
2022-04-06 21:39 ` Robin Murphy
2022-04-06 21:39 ` Robin Murphy
2022-04-06 21:39 ` Robin Murphy
2022-04-06 21:53 ` Jason Gunthorpe
2022-04-06 21:53 ` Jason Gunthorpe
2022-04-06 21:53 ` Jason Gunthorpe
2022-04-08 17:23 ` Jason Gunthorpe
2022-04-08 17:23 ` Jason Gunthorpe via iommu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.