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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 6C987C433B4 for ; Thu, 8 Apr 2021 07:27:23 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 EB5F761057 for ; Thu, 8 Apr 2021 07:27:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB5F761057 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KD//dIhe3AyldJiyq2w9zfxbYAeP5cuzuO9Xw7Jr8Y0=; b=q46ryKzVS1xKwRfP1mtAaOG/T /c8GFF2a7BQXrXvbIEDFE9E+b1v8dasydlmOpHN3Lh5eXH234RMtofZiKGEVS78yQbmbXLp6iKiOJ 7J1qqiE0gKlZQkP9vq0F1KJf6HsWtlrSWqxMPoY2hiXMplq5h8s4EV2oI09AHleeAW2eeip+Kp3V1 /BfduLGQ/dZs7XzKkpr7Ul7ddRC59pHKAz7+sZFtdkX183GZv7Xq+GEAngCLHbhpRYNr1jZMircWi IHxkw0ewjACWRP4wWnqtEyVj2FgSFKeNeSsN8+IXW/XK9Blcm9NyMOJOmA/cTSI3atCf99ZB2p5lv LBHyEBI+w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUP2p-007D7b-OX; Thu, 08 Apr 2021 07:25:39 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUP2j-007D6M-V2 for linux-arm-kernel@lists.infradead.org; Thu, 08 Apr 2021 07:25:36 +0000 Received: by mail-wr1-x42c.google.com with SMTP id u11so956723wrp.4 for ; Thu, 08 Apr 2021 00:25:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=g8SB9f99qTsjVyZVjwjq+rBAGVulVvgWOInNr6/c0mA=; b=rxtUic5qBfy9wkKb5QrOBAqENNflEKYnPlhApobx3kpABCUOCA9Za4lanXrSvc0xAK ZhTSYPMOupYMjqE9uapPjLYTfVkIOG5NxxOBbSk85ASUql5iTIIom9vi3D4crVyZQdu3 ekRRFFqxpjSlE+neHghVmtJcNr/yE/rKIcaemISH3vQPIOrhEqx430b5Z6v0KnTD/0Py yC5YpmxYXXPXNWy/LtzRTYU+MMl44fcKAUPHm6WBIVnWWiELpvJMtGdShEnKIkZxogN+ 9o8Joe1uYqWUIWId+S23vkyEvmKQDBGjaamaTOGLuya5zAyWzjL8NfFRO19dtP+rvEpl 8Z/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=g8SB9f99qTsjVyZVjwjq+rBAGVulVvgWOInNr6/c0mA=; b=Q9rQSPmOa8mF6UC/206qPgvEPmIgy8ZzrZ+Rzi2FV3b4dRi9wRvbBoDhZ5lZhkzKMx VtnRudtF9X28qJXzSi/lbHm1j6MBDrWPOpdmNOmP2A/asRD+on0imH4jc0i7b9b+ujQw 5Nki62WeBPDyQl3k6G5SJ4TWr5xb0VLbgBhDEZde+GQZn3tTW5d5tPq2PAV2PUrGhm6Q 8F2uieCTABntyM67kaZsBBa6/uPiX3mvEIkaea9r1dV6Ry8e+/Il6qzDP1vAHBsGhZ50 KsSABX38G7B/l+l5ZBOoBdHgHH38XYhkljKJ0iNPKmtNHObhhe6c1ymTnHhOBeBPq8zP pc3g== X-Gm-Message-State: AOAM533/r+76HyiWXhh8ki6zy5p9/GEsC/81GVjNshCqolJQNmmZeTcL EJGKtLStiJnOSpVviqRA+QX2ThXlGFigbw== X-Google-Smtp-Source: ABdhPJwidgmXWK+21Ln19VLpVQ9ho5Ut3sOiN6BccZ7cQWyBD5cv1T/knHuHQbRLxFLqIW3IjUvE6g== X-Received: by 2002:a5d:610f:: with SMTP id v15mr9384949wrt.236.1617866732363; Thu, 08 Apr 2021 00:25:32 -0700 (PDT) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id u12sm19976486wro.51.2021.04.08.00.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 00:25:31 -0700 (PDT) Date: Thu, 8 Apr 2021 09:25:14 +0200 From: Jean-Philippe Brucker To: richard clark Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org, mark.rutland@arm.com Subject: Re: Question: multiple SMMUv3 devices probe Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210408_082534_105128_E31075D6 X-CRM114-Status: GOOD ( 13.45 ) 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-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 Hi, On Wed, Apr 07, 2021 at 05:37:52PM +0800, richard clark wrote: > Hi guys, > There're 3 SMMUv3 devices in my arm64 box. I am confused by the below > probe process: > > arm_smmu_device_probe(...) --> arm_smmu_set_bus_ops(&arm_smmu_ops): > if (platform_bus_type.iommu_ops != ops) { > err = bus_set_iommu(&platform_bus_type, ops); > if (err) > } > > so for the 1st smmu device on the platform_bus, the > arm_smmu_device_probe(...) will set the platform_bus_type.iommu_bus = > arm_smmu_ops, so for the arm_smmu_device_probe(...) when probing the > 2nd smmu device, the bus_set_iommu() will have no chance be called > since the platform_bus_type.iommu_bus == arm_smmu_ops is true, my > question is how the followed bus_set_iommu(...) being called? arm_smmu_ops is the same for all SMMU devices, so bus_set_iommu() only needs to be called once. Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel