Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1020550rdb; Mon, 19 Feb 2024 01:17:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVVPVHAIjzBuZEov8rXY5Yir8z9pg+kbVP8NUWcgCoTD+wbbCkHTFaXipWVdUKeoMLdCYZgdRsx3womr2ONXDFwLHetFqfa5PfW6K1ZvA== X-Google-Smtp-Source: AGHT+IHGX5/+bKHqYyaIExMzuSCdRSxwa1a4wRVxsLpy9uU+kcQ0deCjJj6NlYiR9HUNDgb9or2l X-Received: by 2002:a05:622a:1791:b0:42b:ff8d:3719 with SMTP id s17-20020a05622a179100b0042bff8d3719mr17302531qtk.67.1708334254826; Mon, 19 Feb 2024 01:17:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708334254; cv=pass; d=google.com; s=arc-20160816; b=ysCnL+kJeq8AVe2m+1S1IdOpPBFfwaAPeHCJX5FRupoHCLSDB8BvzzDo5zma+QndK1 Gg0FSvnPU6fN5koSQ0/HK5Cg1ZqjG9oeM/6/ahsI1ymxyx/EFCCwJVdqFV8RYci3HVPI GzPdqtZIR5HOmn7o/wdJLbGzjZi2ibgNmEzb7cdHnwsfeF329EnGXLg2MUWHup3d5vMH J6Ff190L1XYWHvLblYEU//uYV28lT9iRRUV0zbmcdl+KmudNKrOe7gvcxkxw41pkJFwi 1RjogQGml9ecKFGUhzjnEeknray/ezGpbWMU8xyhPMB5O08wXulnhqI4y8XPWRWe2Mk1 p+7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date :dkim-signature; bh=UM3jY8oCq+zo0PkcNaVJ61DhBEwwZ/qyP9IGwoHs6no=; fh=2A0P8GJOOTSWgKePEkuU4tBQjmStyKXIM96IPoxROMg=; b=DNBLe45c71aV7vfkHANrNxw5Kwhu03TVnqxQNUpM1985ds1zZvEBtTCRHvZTp2aat3 HT2UO8xcZCaaFRKg/6Hddr+1MhdQhN7uOznBj2CJi2tbLTIkzJxAXlQEJ8C7UliGGMRJ IrhHDpBZx9c86hsKphjyTV8wjEkDXhAZHOtahrCfzP7s7ZOPxAJidBlRFasPVnyNP3yB vfOF7NPBrMR8HgfKqCuqUcWxEuF6HLLCkaTTnL45nWlwZLQFatl7B/TT9o/vC59+Ln+W Ee2rRXiI7Vysk8Vz7xemvcM+wVg8H39BoTVXy/His2RDM2weO7Gw6elKvjkt0mWkIW79 bOVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jVjvwDb0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71016-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v18-20020ac85792000000b0042c37acc033si3397778qta.378.2024.02.19.01.17.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 01:17:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jVjvwDb0; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71016-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71016-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9314E1C211A7 for ; Mon, 19 Feb 2024 09:17:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5979F225D6; Mon, 19 Feb 2024 09:17:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jVjvwDb0" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FC792375A; Mon, 19 Feb 2024 09:17:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708334235; cv=none; b=fszfeA6UoJfy46luy2cwbnAjwyvDL0zNal4PboYmyGwai1GOU9VB7kDPArdwJrlBmP4YO6PeeepEqC/7XcSiKKAhcsQHIIRfZcctmWNR7hfrtToHjqzmUOhdmfA5FFD8bf5S61dTRaS0q9zqcr+Pzm+UdqVA1vxK3tg7L1SIEjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708334235; c=relaxed/simple; bh=dD3INK0771hk25i6LkvIjVMoJ3kpzAlg/X0uVYDQORA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rSZdPs5UhEPujx5v6+7QMrZJ9RBAK99WxAERP09/MOoxjCNpvqYDki1DUMKytjYbu2heUerXoYmBB8FBuc0recOHw2bA408x4r4Wuo/xjS/0zf+UirP/GlikCPH7DBitU1TzhxQvjIEzUa2ij6cBG4cuL4DTXgHQcOw970ExqX0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jVjvwDb0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A44FC43394; Mon, 19 Feb 2024 09:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708334235; bh=dD3INK0771hk25i6LkvIjVMoJ3kpzAlg/X0uVYDQORA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jVjvwDb0GFMfrllhHFnP7TNXuxovgdiUO9KzIIfjPZViwPxRUphxP/Tz5jMlHPwXx a4ZIaldT0DZmjTGzrf8sUTUhIUIGP+r4NxMG8rw+MGxmDkZq3hfd1VW6jTYzbQwmCi LrJsiMKtM5poAcFs4EJHaysoM0VGw2Pm/CrKdDKgZxoRxdfQuizaGGUT+UX0D5JgRl 72chEzlbuC4mlBn+7+m6VTtWKXaDtqx7AxGsMsk6f1Z4DKOS3ycY+L9IXJvyAb7pBj YczfjptHCQJUP/91NvD3KwaQ++eMFMXk1seJgCOH4HIB4K7gh+dVenm8APoQGS9IV5 XTVluns0kF44w== Date: Mon, 19 Feb 2024 09:17:09 +0000 From: Will Deacon To: Daniel Mentz Cc: "ni.liqiang" , Robin Murphy , Joerg Roedel , "jin . qi" , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/iommu: Ensure that the queue base address is successfully written during SMMU initialization. Message-ID: <20240219091709.GA4105@willie-the-truck> References: <20240218050224.33426-1-niliqiang.io@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) On Sun, Feb 18, 2024 at 09:44:47PM -0800, Daniel Mentz wrote: > On Sat, Feb 17, 2024 at 9:02 PM ni.liqiang wrote: > > If there are no memory barriers, how can we ensure this order? > > The SMMU registers are accessed using Device-nGnRE attributes. It is > my understanding that, for Device-nGnRE, the Arm architecture requires > that writes to the same peripheral arrive at the endpoint in program > order. Yup, that's correct. The "nR" part means "non-Reordering", so something else is going on here. Will