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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C7CBC43334 for ; Thu, 7 Jul 2022 16:42:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236428AbiGGQme (ORCPT ); Thu, 7 Jul 2022 12:42:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236419AbiGGQm3 (ORCPT ); Thu, 7 Jul 2022 12:42:29 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 280F045071; Thu, 7 Jul 2022 09:42:28 -0700 (PDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 267GWUmv004637; Thu, 7 Jul 2022 16:42:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=Xk0Ulwvvq8GOQ3Gdznv7ZbQQqPA9BsTnl+u0djv5+WY=; b=WXjWazxmCh082jtizJP82NgGusU2imyaafycjZieTGXplEBQZT2BA/d7B7SWj/f/fmv5 RiOrn/KJi2JqWUqpPwZxUiOTqXu9UriPaAi3tH90D2sDveSEajQgpWeQTvyBBs+wbRHA rnKUUNdrRWe+Yo/Pq3MKamAV/rRfi6kgbobpo088lsB+1ZTKXoqKVn9ojzCyhMMY7AIf 02F/hSfrgPlTGoAfLmuJaXHXAiiJOJjUBYdMDgEmp0i56JDrI53Nvh5kHtgJf6hFjyK8 dcJZnSu/SJ0BfNHp9ix7VbuB/q1JYgyaE93jtOrh8SogREPOqJ56LHzJmqrTx+kbS1r7 lQ== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3h633kr9rr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Jul 2022 16:42:15 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 267GZb4h004482; Thu, 7 Jul 2022 16:42:14 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma04wdc.us.ibm.com with ESMTP id 3h4ud54kvq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Jul 2022 16:42:14 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 267GgDbq20513104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Jul 2022 16:42:13 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8A16A28059; Thu, 7 Jul 2022 16:42:13 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 46F1C28058; Thu, 7 Jul 2022 16:42:10 +0000 (GMT) Received: from [9.211.36.1] (unknown [9.211.36.1]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 7 Jul 2022 16:42:10 +0000 (GMT) Message-ID: Date: Thu, 7 Jul 2022 12:42:08 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 15/15] iommu: Clean up bus_set_iommu() Content-Language: en-US To: Robin Murphy , joro@8bytes.org Cc: will@kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, baolu.lu@linux.intel.com, suravee.suthikulpanit@amd.com, vasant.hegde@amd.com, gerald.schaefer@linux.ibm.com, schnelle@linux.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org References: <4c25e3ad-0eb6-5c41-48b2-7c10e745bd5d@linux.ibm.com> <8ad2fec1-8a51-dc35-39bb-a05a0d837ad9@arm.com> From: Matthew Rosato In-Reply-To: <8ad2fec1-8a51-dc35-39bb-a05a0d837ad9@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: M10LNYkyvjyNMLXh8WJpMZPKRUlJN2vr X-Proofpoint-ORIG-GUID: M10LNYkyvjyNMLXh8WJpMZPKRUlJN2vr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-07_13,2022-06-28_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 spamscore=0 impostorscore=0 priorityscore=1501 adultscore=0 suspectscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207070066 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/7/22 10:58 AM, Robin Murphy wrote: > On 2022-07-07 13:54, Matthew Rosato wrote: >> On 7/7/22 8:49 AM, Matthew Rosato wrote: >>> On 7/5/22 1:08 PM, Robin Murphy wrote: >>>> Clean up the remaining trivial bus_set_iommu() callsites along >>>> with the implementation. Now drivers only have to know and care >>>> about iommu_device instances, phew! >>>> >>>> Signed-off-by: Robin Murphy >>>> --- >>>> >>>> v3: Also catch Intel's cheeky open-coded assignment >>>> >>> >>> ... >>> >>>> diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c >>>> index c898bcbbce11..dd957145fb81 100644 >>>> --- a/drivers/iommu/s390-iommu.c >>>> +++ b/drivers/iommu/s390-iommu.c >>>> @@ -385,9 +385,3 @@ static const struct iommu_ops s390_iommu_ops = { >>>>           .free        = s390_domain_free, >>>>       } >>>>   }; >>>> - >>>> -static int __init s390_iommu_init(void) >>>> -{ >>>> -    return bus_set_iommu(&pci_bus_type, &s390_iommu_ops); >>>> -} >>>> -subsys_initcall(s390_iommu_init); >>> >>> Previously s390_iommu_ops was only being set for pci_bus_type, but >>> with this series it will now also be set for platform_bus_type. > > Ah, indeed I hadn't got as far as fully appreciating that to_zpci_dev() > isn't robust enough on its own. Thanks for the patch, I've pulled it in > and will include it in v4. Do I take it that all else works OK with this > fixed? > Yes, with that patch included this looks OK so for s390 you can also take a Tested-by: Matthew Rosato 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8289CC43334 for ; Thu, 7 Jul 2022 16:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lXECYXvdjte4AvHk5wiTLd0TLjKbBmU8oZ/8ZGM+/vQ=; b=DQVGi900dEa+Yz UVVqaLTcdB89FRDiql2AQrM8cakxKnZVfriO+qzRz5mzIv1um+M5EuZcCj0YthYNAq9BKViWsRJtT Pt31a1UU3RzlOo7KiTAVLPa1JT7rkFUxHAdATlf+R2a8BNm0m8sVktslYNsz9vH0cLZX3zRYK9aAJ coSaDaVsKex0nIzUMSeiCRhcCnoXnrhhJpH+50O9mkJJ5Jq5BQMLnoVTClHhnOM5e0IiJ1EzQNShB cHCo/YhkayiUaN7Iuz9fdCf3w2gyj1Q/qFa1Fmft66c3KI4SaEOD6gLM0WniRDynvgTMttJYkLyu4 FMEqQAoe/3hFyrWISXbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9UaC-00H2iS-MG; Thu, 07 Jul 2022 16:42:29 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9Ua8-00H2hL-Ft for linux-arm-kernel@lists.infradead.org; Thu, 07 Jul 2022 16:42:25 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 267GWUmv004637; Thu, 7 Jul 2022 16:42:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=Xk0Ulwvvq8GOQ3Gdznv7ZbQQqPA9BsTnl+u0djv5+WY=; b=WXjWazxmCh082jtizJP82NgGusU2imyaafycjZieTGXplEBQZT2BA/d7B7SWj/f/fmv5 RiOrn/KJi2JqWUqpPwZxUiOTqXu9UriPaAi3tH90D2sDveSEajQgpWeQTvyBBs+wbRHA rnKUUNdrRWe+Yo/Pq3MKamAV/rRfi6kgbobpo088lsB+1ZTKXoqKVn9ojzCyhMMY7AIf 02F/hSfrgPlTGoAfLmuJaXHXAiiJOJjUBYdMDgEmp0i56JDrI53Nvh5kHtgJf6hFjyK8 dcJZnSu/SJ0BfNHp9ix7VbuB/q1JYgyaE93jtOrh8SogREPOqJ56LHzJmqrTx+kbS1r7 lQ== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3h633kr9rr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Jul 2022 16:42:15 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 267GZb4h004482; Thu, 7 Jul 2022 16:42:14 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma04wdc.us.ibm.com with ESMTP id 3h4ud54kvq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Jul 2022 16:42:14 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 267GgDbq20513104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Jul 2022 16:42:13 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8A16A28059; Thu, 7 Jul 2022 16:42:13 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 46F1C28058; Thu, 7 Jul 2022 16:42:10 +0000 (GMT) Received: from [9.211.36.1] (unknown [9.211.36.1]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 7 Jul 2022 16:42:10 +0000 (GMT) Message-ID: Date: Thu, 7 Jul 2022 12:42:08 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 15/15] iommu: Clean up bus_set_iommu() Content-Language: en-US To: Robin Murphy , joro@8bytes.org Cc: will@kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, baolu.lu@linux.intel.com, suravee.suthikulpanit@amd.com, vasant.hegde@amd.com, gerald.schaefer@linux.ibm.com, schnelle@linux.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org References: <4c25e3ad-0eb6-5c41-48b2-7c10e745bd5d@linux.ibm.com> <8ad2fec1-8a51-dc35-39bb-a05a0d837ad9@arm.com> From: Matthew Rosato In-Reply-To: <8ad2fec1-8a51-dc35-39bb-a05a0d837ad9@arm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: M10LNYkyvjyNMLXh8WJpMZPKRUlJN2vr X-Proofpoint-ORIG-GUID: M10LNYkyvjyNMLXh8WJpMZPKRUlJN2vr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-07_13,2022-06-28_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 spamscore=0 impostorscore=0 priorityscore=1501 adultscore=0 suspectscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207070066 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220707_094224_799762_810D6570 X-CRM114-Status: GOOD ( 19.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gNy83LzIyIDEwOjU4IEFNLCBSb2JpbiBNdXJwaHkgd3JvdGU6Cj4gT24gMjAyMi0wNy0wNyAx Mzo1NCwgTWF0dGhldyBSb3NhdG8gd3JvdGU6Cj4+IE9uIDcvNy8yMiA4OjQ5IEFNLCBNYXR0aGV3 IFJvc2F0byB3cm90ZToKPj4+IE9uIDcvNS8yMiAxOjA4IFBNLCBSb2JpbiBNdXJwaHkgd3JvdGU6 Cj4+Pj4gQ2xlYW4gdXAgdGhlIHJlbWFpbmluZyB0cml2aWFsIGJ1c19zZXRfaW9tbXUoKSBjYWxs c2l0ZXMgYWxvbmcKPj4+PiB3aXRoIHRoZSBpbXBsZW1lbnRhdGlvbi4gTm93IGRyaXZlcnMgb25s eSBoYXZlIHRvIGtub3cgYW5kIGNhcmUKPj4+PiBhYm91dCBpb21tdV9kZXZpY2UgaW5zdGFuY2Vz LCBwaGV3IQo+Pj4+Cj4+Pj4gU2lnbmVkLW9mZi1ieTogUm9iaW4gTXVycGh5IDxyb2Jpbi5tdXJw aHlAYXJtLmNvbT4KPj4+PiAtLS0KPj4+Pgo+Pj4+IHYzOiBBbHNvIGNhdGNoIEludGVsJ3MgY2hl ZWt5IG9wZW4tY29kZWQgYXNzaWdubWVudAo+Pj4+Cj4+Pgo+Pj4gLi4uCj4+Pgo+Pj4+IGRpZmYg LS1naXQgYS9kcml2ZXJzL2lvbW11L3MzOTAtaW9tbXUuYyBiL2RyaXZlcnMvaW9tbXUvczM5MC1p b21tdS5jCj4+Pj4gaW5kZXggYzg5OGJjYmJjZTExLi5kZDk1NzE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