Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp185510pxv; Wed, 14 Jul 2021 01:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFdaGDC+J3wnrBDvV/9AkuzIpjjSdSyarIBgfJzySVk7ogFAsYJyi3LfTDid4AE0BOv/xr X-Received: by 2002:a92:c56d:: with SMTP id b13mr5789740ilj.169.1626250966880; Wed, 14 Jul 2021 01:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626250966; cv=none; d=google.com; s=arc-20160816; b=EvHiVM5w38vN/1k/QuZghHBteBjhf/7oKPnf9bqVR89YrIE9dwZm3XSnRbcHHRe2nT 2atjm3oH1xBa21SRu91js4XJpGXjmxhgRK/BEwtgDCQXsjNb/HlHBYv+sm5eh9bdSWGh cV2Nu7Rzysx25jQ3F1i43mE/uzSOBgmoTcmkfiWef2FgovZZDiDJaYcWfNnTbZSi7SMg qWlbrgicUvuiAb7ncLH12hBN393AT6xN2ZtsBKq5RRwPONyiE3iJDvI54FlyrVA7NfTC h6YZeXq22bJl5a+ZX/OCGGu5M4+Cd0KgbUaJ0CP5BtmMKJnMG3NddYfkumCbokOikv+J /rMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F8Io+rg1Po7RKIeX6xd4nWzyFfLG9bRShMsVJw7hf0Q=; b=wxVqv2pgWjnnXUetE0R7eiTXeslQ7v+vdiNyNdB4CuN88VbvKHV/3xIFZIytmmTfwH v+ixOGbfbx5PVzGvQk+EdAn3RgGOW3yWZnpywzwtuJ5BM9xPKKCNDyS0+YitB+kLk3wM GF7+dMrp1rLY+B1B1xNwFOOfUlHxWSJkZB2IrqYoR6bT9CxXNLHwcmObud5Es8TC5Fsp jjehqingHc+SBdKGUv5x1/4w4rit/D9U6+GUrAJKMfJPm2WvkW8dDnttTXoXX/6aJ63M nNcV357OipAijLMHSYGghe4aAqRSTMQr7TdOujZn1vjZAd42SDIskt2rjDpibg7l2ry/ Utvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BqDNNSk7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si1612087ils.150.2021.07.14.01.22.33; Wed, 14 Jul 2021 01:22:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BqDNNSk7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238404AbhGNIXf (ORCPT + 99 others); Wed, 14 Jul 2021 04:23:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbhGNIXf (ORCPT ); Wed, 14 Jul 2021 04:23:35 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9D2AC06175F for ; Wed, 14 Jul 2021 01:20:42 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id qb4so1942109ejc.11 for ; Wed, 14 Jul 2021 01:20:42 -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=F8Io+rg1Po7RKIeX6xd4nWzyFfLG9bRShMsVJw7hf0Q=; b=BqDNNSk7ZSAQK4poF+WsKbLWA5YzfU2H6DRP7g8AhtSDx5oKXqIwkX0gVqTCYATcr6 KdZNQhf6s/NGfcPR7o2nXA1mgBXVkIW0M/UZ3+t8xQbVX48lyvKTcbI5hpf3lcsDlluq ws/Jpup4YIz+yoWrpKldXbBmt9Su6Kr7udKSTTIXkAVmGiqUXOxIKBMuExp8lx/W+Dma Zmc60wFDKsTgka2ASyEWGzS2eqPr6GKDIYk5gBnrU3AGYkFP/JXIz/A83L1wX+N/Ty1e QESK19pnJYhm5QTym0rIpglmWTStHqJFnCF0KheLKuNv1HUlqrZZlyxwYvjuO9TBlI26 a5jQ== 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=F8Io+rg1Po7RKIeX6xd4nWzyFfLG9bRShMsVJw7hf0Q=; b=f6qdYvGO0Y4LB7udnMFduwVT2LY0WbjggxrPgwoKM51ZIWjcKvI4ehhJGS1UCXeIHS atbuTBEm5n31ndQTF5mwVMAE1erTQT633R76vhffSIdqtwTwbVfpZy473hf20baESkJw L3FCQzMzST74KHuUkyhYUDJwD31Fcz5UyqNGFk4EJ+ieiE9dQVI2X7ibj884/6jfHx5t DyTlWFTtx0KcfUHzoymEaZLII7zzSOIfKglD9nqp1BgPUxMIEG5IM0ekjLak0T7ENKsx w8eQMuz+Q639lKCJlDaiAHt3DV58ZNSf6zB1o/TgdiX3Y+1QEWHHSWD+2D5jZtwFUGwa MDFA== X-Gm-Message-State: AOAM531eeD3B13BCDIcqzs+Xm5spIkrcRG9N68XkQeTcDZk4x50RcLkc EAEzko9KGaVqgYKuenizXvw3ag== X-Received: by 2002:a17:906:24c3:: with SMTP id f3mr11047240ejb.145.1626250841411; Wed, 14 Jul 2021 01:20:41 -0700 (PDT) Received: from myrica (adsl-84-226-111-173.adslplus.ch. [84.226.111.173]) by smtp.gmail.com with ESMTPSA id s5sm602820edi.93.2021.07.14.01.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 01:20:40 -0700 (PDT) Date: Wed, 14 Jul 2021 10:20:21 +0200 From: Jean-Philippe Brucker To: Arnd Bergmann Cc: Rob Herring , Viresh Kumar , Jason Wang , "Michael S. Tsirkin" , Vincent Guittot , Bill Mills , Alex =?utf-8?Q?Benn=C3=A9e?= , "Enrico Weigelt, metux IT consult" , Jie Deng , DTML , "linux-kernel@vger.kernel.org" , "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" Subject: Re: [PATCH 1/5] dt-bindings: virtio: mmio: Add support for device subnode Message-ID: References: <20210713151917.zouwfckidnjxvohn@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 13, 2021 at 10:34:03PM +0200, Arnd Bergmann wrote: > > > Is it going to be a problem if two devices in kernel use the same > > > of_node ? > > > > There shouldn't be. We have nodes be multiple providers (e.g clocks > > and resets) already. > > I think this would be a little different, but it can still work. There is in > fact already some precedent of doing this, with Jean-Philippe's virtio-iommu > binding, which is documented in both > > Documentation/devicetree/bindings/virtio/iommu.txt > Documentation/devicetree/bindings/virtio/mmio.txt > > Unfortunately, those are still slightly different from where I think we should > be going here, but it's probably close enough to fit into the general > system. > > What we have with virtio-iommu is two special hacks: > - on virtio-mmio, a node with 'compatible="virtio,mmio"' may optionally > have an '#iommu-cells=<1>', in which case we assume it's an iommu. > - for virtio-pci, the node has the standard PCI 'reg' property but a special > 'compatible="virtio,pci-iommu"' property that I think is different from any > other PCI node. Yes in retrospect I don't think the compatible property on the PCI endpoint node is necessary nor useful, we could deprecate it. The OS gets the IOMMU topology information early from 'iommus', 'iommu-map' and '#iommu-cells' properties, which is the only reason we need this PCI endpoint explicitly described in DT. The rest is discovered while probing just like virtio-mmio. Thanks, Jean