From: Tasmiya Nalatwad <tasmiya@linux.vnet.ibm.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
baolu.lu@linux.intel.com, jsnitsel@redhat.com, jroedel@suse.de,
mpe@ellerman.id.au, npiggin@gmail.com,
christophe.leroy@csgroup.eu, gregkh@linuxfoundation.org,
gbatra@linux.vnet.ibm.com, ruscur@russell.cc,
linuxppc-dev@lists.ozlabs.org, abdhalee@linux.vnet.ibm.com,
mputtash@linux.vnet.com, sachinp@linux.vnet.com
Subject: Re: [Bisected] [commit 2ad56efa80dba89162106c06ebc00b611325e584] [linux-next] WARNING while booting to kernel 6.6.0-rc3-next-20230929
Date: Wed, 4 Oct 2023 19:41:28 +0530 [thread overview]
Message-ID: <b15b5058-b45e-0ad7-788d-9fe3e1d90440@linux.vnet.ibm.com> (raw)
In-Reply-To: <20231004113818.GD682044@nvidia.com>
Thanks Jason. Yes the suggested changes works and Warnings are not seen.
On 10/4/23 17:08, Jason Gunthorpe wrote:
> On Wed, Oct 04, 2023 at 04:37:10PM +0530, Tasmiya Nalatwad wrote:
>> Greetings,
>>
>> [linux-next] [6.6.0-rc3-next-20230929] [git bisect ->
>> 2ad56efa80dba89162106c06ebc00b611325e584]WARNING: CPU: 0 PID: 8 at
>> arch/powerpc/kernel/[1]iommu.c:407 __iommu_free+0x1e4/0x1f0
>> gitbisect is pointing to the below commit
>> commit 2ad56efa80dba89162106c06ebc00b611325e584
>> powerpc/iommu: Setup a default domain and remove set_platform_dma_ops
> I assume this means there are still sequencing problems with power at
> boot time. eg we turned on the dma ops in the wrong order or something
> like that
>
> As far as I can see the only difference here is that we do the
> operation to claim dma ops during the iommu drive probe. We can avoid that.
>
> Does this work for you?
>
> diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
> index d6ad3fde85a212..115b9031badac7 100644
> --- a/arch/powerpc/kernel/iommu.c
> +++ b/arch/powerpc/kernel/iommu.c
> @@ -1280,13 +1280,19 @@ struct iommu_table_group_ops spapr_tce_table_group_ops = {
> /*
> * A simple iommu_ops to allow less cruft in generic VFIO code.
> */
> -static int spapr_tce_platform_iommu_attach_dev(struct iommu_domain *dom,
> - struct device *dev)
> +static int
> +spapr_tce_platform_iommu_attach_dev(struct iommu_domain *platform_domain,
> + struct device *dev)
> {
> + struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
> struct iommu_group *grp = iommu_group_get(dev);
> struct iommu_table_group *table_group;
> int ret = -EINVAL;
>
> + /* At first attach the ownership is already set */
> + if (!domain)
> + return 0;
> +
> if (!grp)
> return -ENODEV;
>
>
--
Regards,
Tasmiya Nalatwad
IBM Linux Technology Center
prev parent reply other threads:[~2023-10-04 14:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <d06cee81-c47f-9d62-dfc6-4c77b60058db@linux.vnet.ibm.com>
2023-10-04 11:38 ` Jason Gunthorpe
2023-10-04 14:11 ` Tasmiya Nalatwad [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b15b5058-b45e-0ad7-788d-9fe3e1d90440@linux.vnet.ibm.com \
--to=tasmiya@linux.vnet.ibm.com \
--cc=abdhalee@linux.vnet.ibm.com \
--cc=baolu.lu@linux.intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=gbatra@linux.vnet.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@nvidia.com \
--cc=jroedel@suse.de \
--cc=jsnitsel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=mputtash@linux.vnet.com \
--cc=npiggin@gmail.com \
--cc=ruscur@russell.cc \
--cc=sachinp@linux.vnet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®