From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dennis Chen Subject: Re: [RFC PATCH v3 00/13] ACPI IORT ARM SMMU v3 support Date: Mon, 25 Jul 2016 13:53:32 +0800 Message-ID: <20160725055330.GA21004@arm.com> References: <1469013815-24380-1-git-send-email-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1469013815-24380-1-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Lorenzo Pieralisi Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Marc Zyngier , "Rafael J. Wysocki" , Will Deacon , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sinan Kaya , linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Hanjun Guo , Tomasz Nowicki , nd-5wv7dgnIgG8@public.gmane.org, Jon Masters List-Id: linux-acpi@vger.kernel.org Hi On Wed, Jul 20, 2016 at 12:23:22PM +0100, Lorenzo Pieralisi wrote: > This RFC patch series is v3 of a previous posting: > > https://lkml.org/lkml/2016/6/7/523 > > v2 -> v3 > - Rebased on top of dependencies series [1][2][3](v4.7-rc3) > - Added back reliance on ACPI early probing infrastructure > - Patch[1-3] merged through other dependent series > - Added back IOMMU fwnode generalization > - Move SMMU v3 static functions configuration to IORT code > - Implemented generic IOMMU fwspec API > - Added code to implement fwnode platform device look-up > > v1 -> v2: > - Rebased on top of dependencies series [1][2][3](v4.7-rc1) > - Removed IOMMU fwnode generalization > - Implemented ARM SMMU v3 ACPI probing instead of ARM SMMU v2 > owing to patch series dependencies [1] > - Moved platform device creation logic to IORT code to > generalize its usage for ARM SMMU v1-v2-v3 components > - Removed reliance on ACPI early device probing > - Created IORT specific iommu_xlate() translation hook leaving > OF code unchanged according to v1 reviews > > The ACPI IORT table provides information that allows instantiating > ARM SMMU devices and carrying out id mappings between components on > ARM based systems (devices, IOMMUs, interrupt controllers). > > http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remapping_Table.pdf > > Building on basic IORT support, available through [2]: > > this patchset enables ARM SMMU v3 support on ACPI systems. > > Most of the code is aimed at building the required generic ACPI > infrastructure to create and enable IOMMU components and to bring > the IOMMU infrastructure for ACPI on par with DT, which is going to > make future ARM SMMU components easier to integrate. > > PATCH (1) adds a FWNODE_IOMMU type to the struct fwnode_handle type. > It is required to attach a fwnode identifier to platform > devices allocated/detected through IORT tables entries; > IOMMU devices have to have an identifier to look them up > eg IOMMU core layer carrying out id translation. This can be > done through a fwnode_handle (ie IOMMU platform devices created > out of IORT tables are not ACPI devices hence they can't be > allocated as such, otherwise they would have a fwnode_handle of > type FWNODE_ACPI). This patch requires discussion and it is key > to the RFC. > > PATCH (2) makes use of the ACPI early probing API to add a linker script > section for probing devices via IORT ACPI kernel code. > > PATCH (3) provides IORT support for registering IOMMU IORT node through > their fwnode handle. > > PATCH (4) implements core code fwnode based platform devices look-up. > > PATCH (5) extends iommu_fwspec so that it can be used on ACPI based > system by creating a generic IOMMU fwspec kernel layer. > > PATCH (6) implements the of_dma_configure() API in ACPI world - > acpi_dma_configure() - and patches PCI and ACPI core code to > start making use of it. > > PATCH (7) provides an IORT function to detect existence of specific type > of IORT components. > > PATCH (8) creates the kernel infrastructure required to create ARM SMMU > platform devices for IORT nodes. > > PATCH (9) refactors the ARM SMMU v3 driver so that the init functions are > split in a way that groups together code that probes through DT > and code that carries out HW registers FW agnostic probing, in > preparation for adding the ACPI probing path. > > PATCH (10) rework ARM SMMU v3 platform driver registration to make it work > on ACPI systems. > > PATCH (11) Building on patch (8), it adds ARM SMMU v3 IORT IOMMU > operations to create and probe ARM SMMU v3 components. > > PATCH (12) Extend the IORT iort_node_map_rid() to work on a type mask > instead of a single type so that the translation API can > be used on a range of components. > > PATCH (13) provides IORT infrastructure to carry out IOMMU configuration > for devices and hook it up to the previously introduced ACPI > DMA configure API. > > This patchset is built on top and depends on these three patch series: > > [1] R.Murphy "Generic DT bindings for PCI and ARM SMMU v3" v4 > https://marc.info/?l=devicetree&m=146739193215518&w=2 > > [2] T.Nowicki "Introduce ACPI world to ITS irqchip" v7 > https://marc.info/?l=linux-arm-kernel&m=146642080022289&w=2 > > [3] T.Nowicki "Support for ARM64 ACPI based PCI host controller" v8 > http://marc.info/?l=linux-acpi&m=146462129816292&w=2 > > and is provided for early review/testing purposes here: > > git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git acpi/iort-smmu-v3i > I thought I can got all the 13 patches applied with the above git tree, but I can't find any ACPI related stuff after I cloned the git repos to my local machine, am I missing something here? Thanks, Dennis > > Tested on FVP models for ARM SMMU v3 probing path. > > Lorenzo Pieralisi (13): > drivers: iommu: add FWNODE_IOMMU fwnode type > drivers: acpi: iort: introduce linker section for IORT entries probing > drivers: acpi: iort: add support for IOMMU fwnode registration > drivers: platform: add fwnode base platform devices retrieval > drivers: iommu: make iommu_fwspec OF agnostic > drivers: acpi: implement acpi_dma_configure > drivers: acpi: iort: add node match function > drivers: acpi: iort: add support for ARM SMMU platform devices > creation > drivers: iommu: arm-smmu-v3: split probe functions into DT/generic > portions > drivers: iommu: arm-smmu-v3: enable ACPI driver initialization > drivers: iommu: arm-smmu-v3: add IORT platform device creation > drivers: acpi: iort: replace rid map type with type mask > drivers: acpi: iort: introduce iort_iommu_configure > > drivers/acpi/glue.c | 4 +- > drivers/acpi/iort.c | 360 +++++++++++++++++++++++++++++++++++++- > drivers/acpi/scan.c | 29 +++ > drivers/base/platform.c | 23 +++ > drivers/iommu/Kconfig | 4 + > drivers/iommu/Makefile | 1 + > drivers/iommu/arm-smmu-v3.c | 147 ++++++++++++++-- > drivers/iommu/iommu-fwspec.c | 114 ++++++++++++ > drivers/iommu/of_iommu.c | 52 ------ > drivers/pci/probe.c | 3 +- > include/acpi/acpi_bus.h | 2 + > include/asm-generic/vmlinux.lds.h | 1 + > include/linux/acpi.h | 5 + > include/linux/fwnode.h | 1 + > include/linux/iommu-fwspec.h | 60 +++++++ > include/linux/iommu.h | 25 +++ > include/linux/iort.h | 19 ++ > include/linux/of_iommu.h | 24 +-- > include/linux/platform_device.h | 3 + > 19 files changed, 782 insertions(+), 95 deletions(-) > create mode 100644 drivers/iommu/iommu-fwspec.c > create mode 100644 include/linux/iommu-fwspec.h > > -- > 2.6.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751700AbcGYFyM (ORCPT ); Mon, 25 Jul 2016 01:54:12 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:26388 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbcGYFyB convert rfc822-to-8bit (ORCPT ); Mon, 25 Jul 2016 01:54:01 -0400 Date: Mon, 25 Jul 2016 13:53:32 +0800 From: Dennis Chen To: Lorenzo Pieralisi CC: , Will Deacon , Marc Zyngier , Robin Murphy , Joerg Roedel , "Rafael J. Wysocki" , Tomasz Nowicki , Hanjun Guo , "Jon Masters" , Sinan Kaya , , , , , Subject: Re: [RFC PATCH v3 00/13] ACPI IORT ARM SMMU v3 support Message-ID: <20160725055330.GA21004@arm.com> References: <1469013815-24380-1-git-send-email-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 In-Reply-To: <1469013815-24380-1-git-send-email-lorenzo.pieralisi@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140;IPV:CAL;SCL:-1;CTRY:GB;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(209900001)(24454002)(199003)(189002)(5003600100003)(7696003)(246002)(356003)(4001350100001)(110136002)(36756003)(189998001)(26826002)(47776003)(2950100001)(97756001)(33656002)(106466001)(92566002)(7846002)(15395725005)(5890100001)(86362001)(15975445007)(87936001)(76176999)(54356999)(50986999)(46406003)(8676002)(77096005)(50466002)(83506001)(19580395003)(11100500001)(19580405001)(2906002)(4326007)(8936002)(6806005)(104016004)(586003)(1076002)(31430400001)(305945005)(23726003)(18370500001)(217873001)(6606295002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0801MB1520;H:nebula.arm.com;FPR:;SPF:Pass;PTR:fw-tnat.cambridge.arm.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DB3FFO11FD016;1:278Pc544j5C/Dj8ysrV7uglCLaJxSkDvOG3BH1ERRP9d1Ten0muqmR/bKK9CTF4l8RCOhX9aaNkWPZEOgyVavTrNhcs5AwbP6kO/g49ZllpfNJF8nXPqmHomtOACiz7654RwSSlRyOfhVILdEv9slJ4PnMdPEE98B7fRkeHo3UrGXfWEnDOCq6MWCUlH1WqdsI0Zv4HexiKyOnSUQ0qmSrd7Az/1YVWXGtjWsO5FrXA8bMidrobEZWGio/3qFXvNuoNspCarTRIm+dMThx9C98XIOYlR8+CSebopqQk5j+cukuX3Px+jAmSNv3DzRrZmimzOxNXUCi524Db+OhdQXgCq8myjxPWyhPWdgU1t+jLRPACKYG6Zb7cvFXamAm4jiEsr/mEuj83klRZbKJI+OHV2hUzCoN9pOJwVAGgFN8uZC8n2rugT6IRPDkJDufF3FhqNo3LZCcN4dNz+WeNhTUqoZlifTJRe3kvvD5smxhGjVe3j+27JFW253EJYZTyJoTZxomltKgBVCj9zzvoiP8alCgSnJ6a4YryBCAXhqdsdtkSk3WHCQ/NA3h+0/rea1jx9Ve6U4T46bnXp6/ahHSxhT/AWKNgqsnq1W/IGhI4= X-MS-Office365-Filtering-Correlation-Id: 3c171d88-b85f-4b66-4d15-08d3b4500f91 X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1520;2:1lcZRIerWfpgulGr1I4Xa8F9blMXYiQvdOQ62MbT8e4MwiCVkSyh0wqVPexORErOsx3phJ2oL33XQsVNV9FCcK2g+KygND9KiauzgXG8Bqwjt7MPI+v/0MHy1Fh9v9Uht7A82htMrPkYQAj0Yf4Asldz+IdjXHu7U0rkL5PT+yx289srKCXh+jmj82QUszqo;3:heeKufdV2eUeOU9oLjuRYCsUf5w1m7ljmbvwvkvYhc1rcUhXw90V7PkbFZac9tMmpOR2dz/ZZnru8L+mZOFEBJa799cQeQvrkOriAM1Zaa+QkkI8d4o88BgbbGymLlEMuYY8aArnfNe0vmVF36UlPPWpVcknCQ2wbHZhV69lg3+z3tMVYEfNjyhRu35DdxETR/4ipCUeqh+z/cy/ODgY26R8p4MN+dPl0JsQOtLiYWtxY8uGJxQpnR4s5PUM6i63jOIFH2oZ+rakmyH52Usd8A==;25:dTameNu6jp6YefmYC+k2CFdhLyNMKHuAuRNUKeObXaCK95Reg/nmw27uriK25oMhUSlEH5u7GZxH4ogCkJf6oLOl17PTSdNvuYJZm2nt2GajypbS5DOyPlq5PpTfQwLGcRJaOM+qDK6YUxSzsvkl2qr1F3L5tNNQ7epxExcXV+zx/sH+0zuNJEug9PMzUbNpEX9nBhCPX0WC9S2wMLtKza3mIZJmyAshuNPO4qSq4txa2RN6YHsiP+U0AzEatsEfpLXctVitSvajsePuBseC7fc4ZeDCwcRErEvOjQQqAEOXNegDP7eMFTW/Dhog6H7G3H4bzd11i6LTrcdvXCLtG69SFLrIBGtLJngoK717MsbtXBuIrYgCEDw8kJFxBU2e4Fx8v7SabQI7p5Uo9n1VdhQJLb73gmljDY6ZXbxgXH4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:VI1PR0801MB1520; X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1520;31:10QIYXELQwXt9cW/5hhZBxjTpG/F8dnL9oon0GCjMhkb4JwPxBa03sXt/2NTB7OaYcPu5VPDNvqS31PavDZXJKZfiiJfnqFBrcM6USIyBsTlHY7THsIpeKQ4LRkTNcEuC8aXL8QpP+cozD8BAmXk/U/U4vcnvH9vz+zqu1QsQgSaStwO2mrIexXnGAHw19AUamFt87nivc7iZ1lLawk/7g==;20:JvR9it4liZGkKnBObJeoA18Ew48oTmwth39eUOxoM41Xu9sWAM0APskcsj3Na8uwkUpr90jQzBrK9uWczm4Ox8Tx4xt/uo5tZC1gVRV3OO9D7dq8oq2H6ilRhe4NKf0WCuxNvVR5SEEnqrIbaSjteMBraD0pEdtjvp1Bx4I3NpSi3Z5BAtIQkwUHRkbvuaxEE+F4fJLCBNbAR6/hzLERIP92Fp1DpVurKZhaCdtOYSq/eie0Z8WAYUBC5CvC5DGW NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(9452136761055)(788757137089)(84791874153150); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(13024025)(8121501046)(13020025)(13023025)(13013025)(3002001)(10201501046)(6055026);SRVR:VI1PR0801MB1520;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0801MB1520; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1520;4:DJAaWauWFZXI0DDoQe7tE8bhGL4RFiFUOSa2Gav0P7oDlj76d1jMNP7WiPtxO/y0dL3CgficU/ttkZxwpmF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0h/JwI8xPh1FDjGRB5ad7IZwRJFphspfYD?= =?us-ascii?Q?dWeEsmrwmOacmcxHJgMTjPNQuGv8KXOj9nJL2B3TftqDw?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1520;6:KwsdS35pJfkh68D2Xsx7OL3p5PxI8IgNQLTEBaP2Gktg4OgXgySJA8bZNr/saQtlrHwhrjux4TeS+IHIm449Wt2x1pNO8rSschw8flTN6ZhB+Qung5x2Ud6S7+5aHh13EMAKF/3o4amF5i9DWyHi5He/F7KzMKicwH2YUhINP3O/38yc7cNtktjPC07a8OICitCXyKHMksW3koAb+Q7Xc0uQoDfCcuVzp76IM5SPezgU+lJZ8QmiLwDkuqz6sSXOBX+JCzO8M0j/gPpRENAHbI+9vNRTvUzEaEQt8om+A6RyHrXkcj0ubzvHiLy+N03FWy0JproIccTq+fVm1wupiQ==;5:JWLkk2xc0XvLhMDJWe2OFbU1O4lV3AYgsI+d8jm3/HGcOdHL69I6iKwIi7asArB7kWp3wTQnqwnHBGOvDzNb5Qx3yrs6HCUvwCGsF8sbIHmENagYGUT8FT9u5m01gYK4vsW5a2PmNbopdu/TvURm0A==;24:RgCpLKseQsgGCa+Ql5yPflPYN47Xhr8wfSjKWerhOpVRjEAuU46SzVCMM93rqPV8lATAN+z7hDEzqadxmUAliNpbUTEfjefbSoBJEPjboPk=;7:B9Hv2GDxpn0gOSofEvpNC6E1f+iNbV/BR6qT7hbrBOZYywkReXhOU7tzRGaG7hBQaS+bf2tLI+tl+TyCeu3MtW+p3GAXsKAfEN9EF0RJJH/gV+15qtYHLl3KApydyvXEmPOfgQS1on8sMDznr21cHMhs8GfSRJStlUDP2eztTtL3Fq/ptZ4ke7DpsIWE0/tFJ7VUpeKmwSFE1d80Qi0GX/xpxGatkV2OJrkxSPrIssIq0x7U3qWw9qD2/uLRhx+P SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR0801MB1520;20:ZRcySCf0lWR43FoVd3fK8sh0/v2AxXEFGECazkAeCJs+h1UYnOr+JGbpJtviYUY9rWDLD0e9lnXG60AIYCW5i46azC4ySbAUMivR5WEcxH9w8sQfTbe7dkZTbM7YHMmV0gd2b0a4DaVQl1r+AHr5Dw42SPYBg5liDj3XFWgAwIs= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2016 05:53:53.8439 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[217.140.96.140];Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1520 X-MC-Unique: 1Lh4CqXrML2ikCpnHMCLJA-1 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On Wed, Jul 20, 2016 at 12:23:22PM +0100, Lorenzo Pieralisi wrote: > This RFC patch series is v3 of a previous posting: > > https://lkml.org/lkml/2016/6/7/523 > > v2 -> v3 > - Rebased on top of dependencies series [1][2][3](v4.7-rc3) > - Added back reliance on ACPI early probing infrastructure > - Patch[1-3] merged through other dependent series > - Added back IOMMU fwnode generalization > - Move SMMU v3 static functions configuration to IORT code > - Implemented generic IOMMU fwspec API > - Added code to implement fwnode platform device look-up > > v1 -> v2: > - Rebased on top of dependencies series [1][2][3](v4.7-rc1) > - Removed IOMMU fwnode generalization > - Implemented ARM SMMU v3 ACPI probing instead of ARM SMMU v2 > owing to patch series dependencies [1] > - Moved platform device creation logic to IORT code to > generalize its usage for ARM SMMU v1-v2-v3 components > - Removed reliance on ACPI early device probing > - Created IORT specific iommu_xlate() translation hook leaving > OF code unchanged according to v1 reviews > > The ACPI IORT table provides information that allows instantiating > ARM SMMU devices and carrying out id mappings between components on > ARM based systems (devices, IOMMUs, interrupt controllers). > > http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remapping_Table.pdf > > Building on basic IORT support, available through [2]: > > this patchset enables ARM SMMU v3 support on ACPI systems. > > Most of the code is aimed at building the required generic ACPI > infrastructure to create and enable IOMMU components and to bring > the IOMMU infrastructure for ACPI on par with DT, which is going to > make future ARM SMMU components easier to integrate. > > PATCH (1) adds a FWNODE_IOMMU type to the struct fwnode_handle type. > It is required to attach a fwnode identifier to platform > devices allocated/detected through IORT tables entries; > IOMMU devices have to have an identifier to look them up > eg IOMMU core layer carrying out id translation. This can be > done through a fwnode_handle (ie IOMMU platform devices created > out of IORT tables are not ACPI devices hence they can't be > allocated as such, otherwise they would have a fwnode_handle of > type FWNODE_ACPI). This patch requires discussion and it is key > to the RFC. > > PATCH (2) makes use of the ACPI early probing API to add a linker script > section for probing devices via IORT ACPI kernel code. > > PATCH (3) provides IORT support for registering IOMMU IORT node through > their fwnode handle. > > PATCH (4) implements core code fwnode based platform devices look-up. > > PATCH (5) extends iommu_fwspec so that it can be used on ACPI based > system by creating a generic IOMMU fwspec kernel layer. > > PATCH (6) implements the of_dma_configure() API in ACPI world - > acpi_dma_configure() - and patches PCI and ACPI core code to > start making use of it. > > PATCH (7) provides an IORT function to detect existence of specific type > of IORT components. > > PATCH (8) creates the kernel infrastructure required to create ARM SMMU > platform devices for IORT nodes. > > PATCH (9) refactors the ARM SMMU v3 driver so that the init functions are > split in a way that groups together code that probes through DT > and code that carries out HW registers FW agnostic probing, in > preparation for adding the ACPI probing path. > > PATCH (10) rework ARM SMMU v3 platform driver registration to make it work > on ACPI systems. > > PATCH (11) Building on patch (8), it adds ARM SMMU v3 IORT IOMMU > operations to create and probe ARM SMMU v3 components. > > PATCH (12) Extend the IORT iort_node_map_rid() to work on a type mask > instead of a single type so that the translation API can > be used on a range of components. > > PATCH (13) provides IORT infrastructure to carry out IOMMU configuration > for devices and hook it up to the previously introduced ACPI > DMA configure API. > > This patchset is built on top and depends on these three patch series: > > [1] R.Murphy "Generic DT bindings for PCI and ARM SMMU v3" v4 > https://marc.info/?l=devicetree&m=146739193215518&w=2 > > [2] T.Nowicki "Introduce ACPI world to ITS irqchip" v7 > https://marc.info/?l=linux-arm-kernel&m=146642080022289&w=2 > > [3] T.Nowicki "Support for ARM64 ACPI based PCI host controller" v8 > http://marc.info/?l=linux-acpi&m=146462129816292&w=2 > > and is provided for early review/testing purposes here: > > git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git acpi/iort-smmu-v3i > I thought I can got all the 13 patches applied with the above git tree, but I can't find any ACPI related stuff after I cloned the git repos to my local machine, am I missing something here? Thanks, Dennis > > Tested on FVP models for ARM SMMU v3 probing path. > > Lorenzo Pieralisi (13): > drivers: iommu: add FWNODE_IOMMU fwnode type > drivers: acpi: iort: introduce linker section for IORT entries probing > drivers: acpi: iort: add support for IOMMU fwnode registration > drivers: platform: add fwnode base platform devices retrieval > drivers: iommu: make iommu_fwspec OF agnostic > drivers: acpi: implement acpi_dma_configure > drivers: acpi: iort: add node match function > drivers: acpi: iort: add support for ARM SMMU platform devices > creation > drivers: iommu: arm-smmu-v3: split probe functions into DT/generic > portions > drivers: iommu: arm-smmu-v3: enable ACPI driver initialization > drivers: iommu: arm-smmu-v3: add IORT platform device creation > drivers: acpi: iort: replace rid map type with type mask > drivers: acpi: iort: introduce iort_iommu_configure > > drivers/acpi/glue.c | 4 +- > drivers/acpi/iort.c | 360 +++++++++++++++++++++++++++++++++++++- > drivers/acpi/scan.c | 29 +++ > drivers/base/platform.c | 23 +++ > drivers/iommu/Kconfig | 4 + > drivers/iommu/Makefile | 1 + > drivers/iommu/arm-smmu-v3.c | 147 ++++++++++++++-- > drivers/iommu/iommu-fwspec.c | 114 ++++++++++++ > drivers/iommu/of_iommu.c | 52 ------ > drivers/pci/probe.c | 3 +- > include/acpi/acpi_bus.h | 2 + > include/asm-generic/vmlinux.lds.h | 1 + > include/linux/acpi.h | 5 + > include/linux/fwnode.h | 1 + > include/linux/iommu-fwspec.h | 60 +++++++ > include/linux/iommu.h | 25 +++ > include/linux/iort.h | 19 ++ > include/linux/of_iommu.h | 24 +-- > include/linux/platform_device.h | 3 + > 19 files changed, 782 insertions(+), 95 deletions(-) > create mode 100644 drivers/iommu/iommu-fwspec.c > create mode 100644 include/linux/iommu-fwspec.h > > -- > 2.6.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > From mboxrd@z Thu Jan 1 00:00:00 1970 From: dennis.chen@arm.com (Dennis Chen) Date: Mon, 25 Jul 2016 13:53:32 +0800 Subject: [RFC PATCH v3 00/13] ACPI IORT ARM SMMU v3 support In-Reply-To: <1469013815-24380-1-git-send-email-lorenzo.pieralisi@arm.com> References: <1469013815-24380-1-git-send-email-lorenzo.pieralisi@arm.com> Message-ID: <20160725055330.GA21004@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi On Wed, Jul 20, 2016 at 12:23:22PM +0100, Lorenzo Pieralisi wrote: > This RFC patch series is v3 of a previous posting: > > https://lkml.org/lkml/2016/6/7/523 > > v2 -> v3 > - Rebased on top of dependencies series [1][2][3](v4.7-rc3) > - Added back reliance on ACPI early probing infrastructure > - Patch[1-3] merged through other dependent series > - Added back IOMMU fwnode generalization > - Move SMMU v3 static functions configuration to IORT code > - Implemented generic IOMMU fwspec API > - Added code to implement fwnode platform device look-up > > v1 -> v2: > - Rebased on top of dependencies series [1][2][3](v4.7-rc1) > - Removed IOMMU fwnode generalization > - Implemented ARM SMMU v3 ACPI probing instead of ARM SMMU v2 > owing to patch series dependencies [1] > - Moved platform device creation logic to IORT code to > generalize its usage for ARM SMMU v1-v2-v3 components > - Removed reliance on ACPI early device probing > - Created IORT specific iommu_xlate() translation hook leaving > OF code unchanged according to v1 reviews > > The ACPI IORT table provides information that allows instantiating > ARM SMMU devices and carrying out id mappings between components on > ARM based systems (devices, IOMMUs, interrupt controllers). > > http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remapping_Table.pdf > > Building on basic IORT support, available through [2]: > > this patchset enables ARM SMMU v3 support on ACPI systems. > > Most of the code is aimed at building the required generic ACPI > infrastructure to create and enable IOMMU components and to bring > the IOMMU infrastructure for ACPI on par with DT, which is going to > make future ARM SMMU components easier to integrate. > > PATCH (1) adds a FWNODE_IOMMU type to the struct fwnode_handle type. > It is required to attach a fwnode identifier to platform > devices allocated/detected through IORT tables entries; > IOMMU devices have to have an identifier to look them up > eg IOMMU core layer carrying out id translation. This can be > done through a fwnode_handle (ie IOMMU platform devices created > out of IORT tables are not ACPI devices hence they can't be > allocated as such, otherwise they would have a fwnode_handle of > type FWNODE_ACPI). This patch requires discussion and it is key > to the RFC. > > PATCH (2) makes use of the ACPI early probing API to add a linker script > section for probing devices via IORT ACPI kernel code. > > PATCH (3) provides IORT support for registering IOMMU IORT node through > their fwnode handle. > > PATCH (4) implements core code fwnode based platform devices look-up. > > PATCH (5) extends iommu_fwspec so that it can be used on ACPI based > system by creating a generic IOMMU fwspec kernel layer. > > PATCH (6) implements the of_dma_configure() API in ACPI world - > acpi_dma_configure() - and patches PCI and ACPI core code to > start making use of it. > > PATCH (7) provides an IORT function to detect existence of specific type > of IORT components. > > PATCH (8) creates the kernel infrastructure required to create ARM SMMU > platform devices for IORT nodes. > > PATCH (9) refactors the ARM SMMU v3 driver so that the init functions are > split in a way that groups together code that probes through DT > and code that carries out HW registers FW agnostic probing, in > preparation for adding the ACPI probing path. > > PATCH (10) rework ARM SMMU v3 platform driver registration to make it work > on ACPI systems. > > PATCH (11) Building on patch (8), it adds ARM SMMU v3 IORT IOMMU > operations to create and probe ARM SMMU v3 components. > > PATCH (12) Extend the IORT iort_node_map_rid() to work on a type mask > instead of a single type so that the translation API can > be used on a range of components. > > PATCH (13) provides IORT infrastructure to carry out IOMMU configuration > for devices and hook it up to the previously introduced ACPI > DMA configure API. > > This patchset is built on top and depends on these three patch series: > > [1] R.Murphy "Generic DT bindings for PCI and ARM SMMU v3" v4 > https://marc.info/?l=devicetree&m=146739193215518&w=2 > > [2] T.Nowicki "Introduce ACPI world to ITS irqchip" v7 > https://marc.info/?l=linux-arm-kernel&m=146642080022289&w=2 > > [3] T.Nowicki "Support for ARM64 ACPI based PCI host controller" v8 > http://marc.info/?l=linux-acpi&m=146462129816292&w=2 > > and is provided for early review/testing purposes here: > > git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git acpi/iort-smmu-v3i > I thought I can got all the 13 patches applied with the above git tree, but I can't find any ACPI related stuff after I cloned the git repos to my local machine, am I missing something here? Thanks, Dennis > > Tested on FVP models for ARM SMMU v3 probing path. > > Lorenzo Pieralisi (13): > drivers: iommu: add FWNODE_IOMMU fwnode type > drivers: acpi: iort: introduce linker section for IORT entries probing > drivers: acpi: iort: add support for IOMMU fwnode registration > drivers: platform: add fwnode base platform devices retrieval > drivers: iommu: make iommu_fwspec OF agnostic > drivers: acpi: implement acpi_dma_configure > drivers: acpi: iort: add node match function > drivers: acpi: iort: add support for ARM SMMU platform devices > creation > drivers: iommu: arm-smmu-v3: split probe functions into DT/generic > portions > drivers: iommu: arm-smmu-v3: enable ACPI driver initialization > drivers: iommu: arm-smmu-v3: add IORT platform device creation > drivers: acpi: iort: replace rid map type with type mask > drivers: acpi: iort: introduce iort_iommu_configure > > drivers/acpi/glue.c | 4 +- > drivers/acpi/iort.c | 360 +++++++++++++++++++++++++++++++++++++- > drivers/acpi/scan.c | 29 +++ > drivers/base/platform.c | 23 +++ > drivers/iommu/Kconfig | 4 + > drivers/iommu/Makefile | 1 + > drivers/iommu/arm-smmu-v3.c | 147 ++++++++++++++-- > drivers/iommu/iommu-fwspec.c | 114 ++++++++++++ > drivers/iommu/of_iommu.c | 52 ------ > drivers/pci/probe.c | 3 +- > include/acpi/acpi_bus.h | 2 + > include/asm-generic/vmlinux.lds.h | 1 + > include/linux/acpi.h | 5 + > include/linux/fwnode.h | 1 + > include/linux/iommu-fwspec.h | 60 +++++++ > include/linux/iommu.h | 25 +++ > include/linux/iort.h | 19 ++ > include/linux/of_iommu.h | 24 +-- > include/linux/platform_device.h | 3 + > 19 files changed, 782 insertions(+), 95 deletions(-) > create mode 100644 drivers/iommu/iommu-fwspec.c > create mode 100644 include/linux/iommu-fwspec.h > > -- > 2.6.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >