Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1441546lqj; Tue, 4 Jun 2024 01:19:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXsyDU0WdPEgTZbTURzEzpgmJNWlLfLtsXaxcol6D/BbRIKNs77oeW8Eq0MbfXNCWBxCPbz85alS5S3jX/W+yiQaLt49stlAeSj58NLRw== X-Google-Smtp-Source: AGHT+IFrqfLhxCHaiNJYD5OVsHFPLFDH7EoVYw5vXYAcKEO5V4JgPPA5F8CP7/Y5Wyuzu2R22Rqj X-Received: by 2002:a05:6a21:7888:b0:1af:a37e:367e with SMTP id adf61e73a8af0-1b26f139070mr12198089637.15.1717489184186; Tue, 04 Jun 2024 01:19:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717489184; cv=pass; d=google.com; s=arc-20160816; b=GoPEMYULlpyO3HbRboCm5mSCY4ywzYA49PbXal2+h2hkcCTf04kApxh8l/Hml2sKSh F2k639Wugf+l9czMMYmgczZBtdeErhp//XYyuBL3iIHK9QZbCj7YsM0XWCWAb9r4Nwvv Fj3XQwcgHapmDkB1pYXXdrr3t3ce1QtP6wWCMt2Gbwung55uQ/paVlznNMKOYwOZe+Kt Nrk8O7o47aThmz+mwlRT5XJ0yY6YtQlYTqHQg+hxmqE7y27r8hrwtkSRZo1yDh6xsEFZ eWuTAM5jqf8bwygryRdAIfEDr4K7vYg45WOm0snGfZqbX1UXJqSEnxM2qi5hLvOKtMsf H0BA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=jIxrG2rJLNev+S2sFVjSEfocW+02vTLboo8kBEkNTa8=; fh=aT+0axCWocx3oKI0tqLZJ1LbrJ/31R9jB2TFdGbB5is=; b=HVWb64xM59U4h9pPYz2oVqMUOGLMjIHHRrCZYARPuyFmPvXp7qTiUcQC0c9J9C2n61 XVtRnzRtm+oH3nf9BBR6sOhQv0yea3BmbG6IYobG0yplgHMrcUdG2My0Ffc/1noC0jPO Uk+fmn6urreMSafOy1iiQZGnCpM0+pfqdyhBnO6N1pTGZfZL76eJtHfd+QXxi6aL4DGk niDI4WM+KU5W0TsjTy+ll4y6BRiozkauXIPyprAFvZUBJLqjV7NP/03vDPG2lwKcN1EF 0XJ8WTdZ5oPz0b3ZqkT/YJ/2mMCz0upIiRUv4af+tB907BQ9RBo2yV6wc2GV+A/8ctsM AUfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gwSFn6Te; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f632366226si12878305ad.169.2024.06.04.01.19.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 01:19:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gwSFn6Te; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200239-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CA5F62847D2 for ; Tue, 4 Jun 2024 08:19:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 949DA1422CC; Tue, 4 Jun 2024 08:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gwSFn6Te" 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 BB552139CFF; Tue, 4 Jun 2024 08:19:37 +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=1717489177; cv=none; b=UuCF/vrNs9DQ6CIwJOmIG44L5+r+jf9zycv7ESeAFGEkq3EClFpHmalSMio2A8tiT9i/8M1leFC5enzvDgUvb5X50MGP73qWhJxROzmC+lwuGfOC4zRt4CCvhWbFsop/9bRKomA/M4lOXMM8tYFAukE+n3rY3yZjUwJRsY3sFbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717489177; c=relaxed/simple; bh=Cl26qCxo2UX/Hr4fxo+oX7S1ymUZ9Z3ZTZcmorokdoI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=UQ/0DafuqNn+xjglayDjsI0KVb00h1q1gj1n+UYut2h3TM+uEVy22uewy1w3g1I1fsG0praQ2C3tWQBgp0LvOAxirrWeZYilz/no2TuIsYEKXVUbsMnqYB42ypcmZxZrwXFRQ/e5h1zjqGqoTE5E2Oedf/OASrLHbotMlLf7Vec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gwSFn6Te; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 922FFC4AF0A; Tue, 4 Jun 2024 08:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717489177; bh=Cl26qCxo2UX/Hr4fxo+oX7S1ymUZ9Z3ZTZcmorokdoI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=gwSFn6Tebpx2FbyOPMGfXWm/Mu5F0chYv9oPxGYovid46Ggp4OhKt4lT+8wmWVGwZ bcSDSm3H+mOWpVCDwB+geWnkEcpvwZ12PaV9T7Kd/iceMQtXOQC+U1G1jzlBFszzgZ G2/yEUs619rFYWz0RU3p3kwmh7rmFm9UBxZ1RMfR9To7jTcp4dW4iaK77fhWhPwGBu Uh8ckP5yo3H6bMK8EXyKN6QsSAfNDn7Ue5UJkeH2pNe5M3VpFHRlt08g6N6AgIjupy A14Ws1BJ3YArVaqOrjOCwf85nHtxgxueN1dRTSS8LOwU/h2kSBXuI60MLEwcV2eW2Y K+lqvi8NWzRIg== From: Kalle Valo To: Lu Baolu Cc: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian , Yi Liu , David Airlie , Daniel Vetter , Bjorn Andersson , Mathieu Poirier , Alex Williamson , mst@redhat.com, Jason Wang , Thierry Reding , Jonathan Hunter , Mikko Perttunen , iommu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jeff Johnson , ath11k@lists.infradead.org Subject: Re: [PATCH v2 12/22] wifi: ath11k: Use iommu_paging_domain_alloc() References: <20240604015134.164206-1-baolu.lu@linux.intel.com> <20240604015134.164206-13-baolu.lu@linux.intel.com> Date: Tue, 04 Jun 2024 11:19:30 +0300 In-Reply-To: <20240604015134.164206-13-baolu.lu@linux.intel.com> (Lu Baolu's message of "Tue, 4 Jun 2024 09:51:24 +0800") Message-ID: <874ja9t90t.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Lu Baolu writes: > An iommu domain is allocated in ath11k_ahb_fw_resources_init() and is > attached to ab_ahb->fw.dev in the same function. > > Use iommu_paging_domain_alloc() to make it explicit. > > Signed-off-by: Lu Baolu > --- > drivers/net/wireless/ath/ath11k/ahb.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c > index ca0f17ddebba..a469647719f9 100644 > --- a/drivers/net/wireless/ath/ath11k/ahb.c > +++ b/drivers/net/wireless/ath/ath11k/ahb.c > @@ -1001,10 +1001,10 @@ static int ath11k_ahb_fw_resources_init(struct ath11k_base *ab) > > ab_ahb->fw.dev = &pdev->dev; > > - iommu_dom = iommu_domain_alloc(&platform_bus_type); > - if (!iommu_dom) { > + iommu_dom = iommu_paging_domain_alloc(ab_ahb->fw.dev); > + if (IS_ERR(iommu_dom)) { > ath11k_err(ab, "failed to allocate iommu domain\n"); > - ret = -ENOMEM; > + ret = PTR_ERR(iommu_dom); > goto err_unregister; > } Adding Jeff and ath11k list so that they can review this as well. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches