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-next>] [day] [month] [year] [list]
Message-Id: <150329481531.31395.6238405988822544474.sendpatchset@little-apple>
Date:   Mon, 21 Aug 2017 14:53:35 +0900
From:   Magnus Damm <magnus.damm@...il.com>
To:     joro@...tes.org
Cc:     laurent.pinchart+renesas@...asonboard.com, geert+renesas@...der.be,
        sricharan@...eaurora.org, will.deacon@....com,
        linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        iommu@...ts.linux-foundation.org, horms+renesas@...ge.net.au,
        Magnus Damm <magnus.damm@...il.com>, robin.murphy@....com,
        m.szyprowski@...sung.com
Subject: [PATCH] iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()

From: Magnus Damm <damm+renesas@...nsource.se>

Extend the driver to make use of iommu_device_sysfs_add()/remove()
functions to hook up initial sysfs support.

Suggested-by: Joerg Roedel <jroedel@...e.de>
Signed-off-by: Magnus Damm <damm+renesas@...nsource.se>
---

 Applies on top of next-20170817

 drivers/iommu/ipmmu-vmsa.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- 0001/drivers/iommu/ipmmu-vmsa.c
+++ work/drivers/iommu/ipmmu-vmsa.c	2017-08-21 14:40:13.940607110 +0900
@@ -953,6 +953,11 @@ static int ipmmu_probe(struct platform_d
 
 	ipmmu_device_reset(mmu);
 
+	ret = iommu_device_sysfs_add(&mmu->iommu, &pdev->dev, NULL,
+				     dev_name(&pdev->dev));
+	if (ret)
+		return ret;
+
 	iommu_device_set_ops(&mmu->iommu, &ipmmu_ops);
 	iommu_device_set_fwnode(&mmu->iommu, &pdev->dev.of_node->fwnode);
 
@@ -975,6 +980,7 @@ static int ipmmu_remove(struct platform_
 {
 	struct ipmmu_vmsa_device *mmu = platform_get_drvdata(pdev);
 
+	iommu_device_sysfs_remove(&mmu->iommu);
 	iommu_device_unregister(&mmu->iommu);
 
 #if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ