Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1280488lqm; Thu, 2 May 2024 09:54:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW5wg2edQPedSd8mP//6mn/Bymu6kV0W96zPQT/oxQMTdPpC1mZtWU7+9HIvSxyq1lHIoa7LO4W3X6HjTYGsrCSQ4gNp5hU9IMYlpWuug== X-Google-Smtp-Source: AGHT+IEJaJYPC5LqZdTQePKspuwNVsncrR7sa95XM6n/JNgAqUVfEZOK87FFlcb0wG5p0Hc9ASlf X-Received: by 2002:a17:902:7c8b:b0:1ec:4adc:4153 with SMTP id y11-20020a1709027c8b00b001ec4adc4153mr217615pll.24.1714668885157; Thu, 02 May 2024 09:54:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714668885; cv=pass; d=google.com; s=arc-20160816; b=OK1/DwxAGVqlz4L+yPvNLn7rgnZO5ivc6e78fJTqve8ZS9NPhOSWdltW90Wcf53oPN OdVl9lyhxoi3LtWZOUZCKZoGIJ3aXflvUK2lEw18UIsedoleNVBYt510+zv8HV04bn+e h2R3JjNloFiBfiopeUXF8YVMzG74xys7Jz+b1AhzmgTIWsGMmKoE7cYF2SY+B/St/VI/ 1sc9fg4LfV7hAcFQPGOlZaj0jqbKvbaAhQPXBR7kLnlod+uJGbjuxAtAtfBij/ipbfFJ /STaWiTRJT4Dcj+4N4fwOY4qJvz1GmwoKAH4grQvvQgfn/kQzwo3HDd3yrV/BbJ5KOg7 VAOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=CZYoxgZLVAloWDeCyUjGC6yJMKUMbey6pj/ECbbpcl0=; fh=VkvK1lXtaN48swIRzhFVgMPNO0PbCE9Ktoi2wzZtxWk=; b=Z1chGtPmtiHQtq2p0GCXZigZEvJTN2wqCZV+vmnL7zBE04VEUYOwfLfx/aoZLlgknF 3PbwDu3McpGGI7mqYJRIbGkWSXGBzJuEqmkNfUVEtCqZGg/N529dDEdK+55YUfiFn3oP Ci4LBdGLzo+rwh35aGJ2n0uJjBQ2czXQyn0pbf2RigIQW2wNDydjJB6huXnEFzlHOKFx qP7SOhDHOKef+g4VK3cc/gZw1WmmQInplBu5ROcwaWLflquSg3lOByqZhl8kLMPP6SKq gy/IGF0CGAlQSQnwciZ9R+CwA4HW9t82944EoteYyBFDYMHIdE2wApI5enSdQHnZY1eo ht4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GzRLyXgc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166751-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166751-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. [139.178.88.99]) by mx.google.com with ESMTPS id n8-20020a170902f60800b001e236d13214si546405plg.175.2024.05.02.09.54.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 09:54:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166751-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GzRLyXgc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166751-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166751-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 A09842877FE for ; Thu, 2 May 2024 16:54:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00F4316F909; Thu, 2 May 2024 16:54:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GzRLyXgc" 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 1430D15E80E; Thu, 2 May 2024 16:54:04 +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=1714668845; cv=none; b=lG83rJzkONZQz0/Mpykkzr2xwwaiKbsToShcHRddP1EWB1/rYPrUY8HdA9984ZNqWRIjnxexaWqkXOYCWtORBoq4i19vhPKdOvgi+9E16eyDQiKVXoRaXNPFe4kJ1XSA1bfz6wt7i8hI1bPkKqfb4PJoRwzhJl+tjWhnMEjSVew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714668845; c=relaxed/simple; bh=OLGfIPy7WzXr5vPGBKNPCXFEJl7Vq520a+RMhrYvuO8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OZFPUYsJpQIJoipIXUDHXxxjw5F8O3NmKcaBUeHk2jqP66MWQvdVOmSGYOPFloCC7Us8VAN36IbtzysfsV23HkIoM5se8RQ53EEeTLzY5FWGeOjoq0OU5gYDBuEaiwLfksCckIZHmsZQydBtgU8PMlB9Ttyfxlmx0PkdUxJAqT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GzRLyXgc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA938C116B1; Thu, 2 May 2024 16:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714668844; bh=OLGfIPy7WzXr5vPGBKNPCXFEJl7Vq520a+RMhrYvuO8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=GzRLyXgcaxa8KUf1gzDxi1g9pS3L7O2CBA0GR0/B02Xd/v5fw0790sP7bma6wJej7 srExDQkAByoIChhIH4GJM29CDBpoERkPNfBz4UaE8Bo+9pbgmwKb/X3vj69wHw2cAe DofeWNyOWo+u8mRHAGY9wzt9PszhIlXK0wG/vkbLqBUxzezNSiyvKckHFDyyZtVIYP lTtmLwCzvcvRLvIHj0XiCmrmi34F6kMD86sJrz4n3UYH2jvnl89TyVLylxxSdnChB+ O5awecR8RqlykXDWZH7WbfxedHmfhR7hAuY65qTnMrd8ZLppBvixHWmZmU9FI7jS1/ QXOJwitZWsq3w== Message-ID: <963a1006-a68f-448d-807f-40c9e85e1c2a@kernel.org> Date: Thu, 2 May 2024 19:53:57 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 2/7] iommu/arm-smmu-qcom-debug: Add support for TBUs Content-Language: en-US To: Will Deacon , Georgi Djakov Cc: robin.murphy@arm.com, joro@8bytes.org, iommu@lists.linux.dev, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robdclark@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, quic_cgoldswo@quicinc.com, quic_sukadev@quicinc.com, quic_pdaly@quicinc.com, quic_sudaraja@quicinc.com References: <20240417133731.2055383-1-quic_c_gdjako@quicinc.com> <20240417133731.2055383-3-quic_c_gdjako@quicinc.com> <20240501143400.GA15503@willie-the-truck> From: Georgi Djakov In-Reply-To: <20240501143400.GA15503@willie-the-truck> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Will, On 1.05.24 17:34, Will Deacon wrote: > Hi Georgi, > > On Wed, Apr 17, 2024 at 06:37:26AM -0700, Georgi Djakov wrote: >> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c >> index bb89d49adf8d..eff7ca94ec8d 100644 >> --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c >> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c > > ... > >> +static const struct of_device_id qcom_tbu_of_match[] = { >> + { .compatible = "qcom,sc7280-tbu" }, >> + { .compatible = "qcom,sdm845-tbu" }, >> + { } >> +}; >> + >> +static struct platform_driver qcom_tbu_driver = { >> + .driver = { >> + .name = "qcom_tbu", >> + .of_match_table = qcom_tbu_of_match, >> + }, >> + .probe = qcom_tbu_probe, >> +}; >> +builtin_platform_driver(qcom_tbu_driver); > > I just noticed that this breaks a modular build of the arm-smmu driver > because we now have two init functions for the module: > > ld.lld: error: duplicate symbol: init_module > >>> defined at arm-smmu.c > >>> drivers/iommu/arm/arm-smmu/arm-smmu.o:(init_module) > >>> defined at arm-smmu-qcom-debug.c > >>> drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.o:(.init.text+0x4) > > I think you should initialise the TBU debug feature by calling into it > manually from qcom_smmu_impl_init(). > > Please can you send a patch to fix that? For now, I'll bodge it so that > the qcom debug stuff doesn't build as a module (see below). Š¢hanks for sorting that out and apologies for missing it. We are at rc6 now and i am afraid that i won't be able to validate my patch until next week (Easter holidays here). I'll definitely send the rework when I get back. BR, Georgi > > Cheers, > > Will > > --->8 > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > index 032bfd681307..66325210c8c9 100644 > --- a/drivers/iommu/Kconfig > +++ b/drivers/iommu/Kconfig > @@ -376,7 +376,7 @@ config ARM_SMMU_QCOM > > config ARM_SMMU_QCOM_DEBUG > bool "ARM SMMU QCOM implementation defined debug support" > - depends on ARM_SMMU_QCOM > + depends on ARM_SMMU_QCOM=y > help > Support for implementation specific debug features in ARM SMMU > hardware found in QTI platforms. This include support for >