Re: next/master bisection: baseline.login on jetson-tk1

2020-05-14 Thread Joerg Roedel
On Wed, May 13, 2020 at 11:16:14PM +0100, Guillaume Tucker wrote:
> which this time gave me:
> 
> <4>[2.540558] PC is at iommu_probe_device+0x1c/0x15c
> <4>[2.545606] LR is at of_iommu_configure+0x15c/0x1c4
> <4>[2.550736] pc : []lr : []psr: a013
> 
> which in turn brings us to:
> 
> (gdb) l *0xc092e0e4
> 0xc092e0e4 is in iommu_probe_device (drivers/iommu/iommu.c:232).
> 227   int ret;
> 228   
> 229   if (!dev_iommu_get(dev))
> 230   return -ENOMEM;
> 231   
> 232   if (!try_module_get(ops->owner)) {
> 233   ret = -EINVAL;
> 234   goto err_out;
> 235   }
> 236

Okay, so ops is NULL. I queued a fix for that in the iommu-tree. If you
test the latest master branch the problem should be gone.

Thanks for the report,


   Joerg


Re: next/master bisection: baseline.login on jetson-tk1

2020-05-13 Thread Guillaume Tucker
On 12/05/2020 16:16, Joerg Roedel wrote:
> Hi Guillaume,
> 
> thanks for the report!
> 
> On Tue, May 12, 2020 at 07:05:13AM +0100, Guillaume Tucker wrote:
>>> Summary:
>>>   Start:  4b20e7462caa6 Add linux-next specific files for 20200511
>>>   Plain log:  
>>> https://storage.kernelci.org/next/master/next-20200511/arm/tegra_defconfig/gcc-8/lab-collabora/baseline-tegra124-jetson-tk1.txt
>>>   HTML log:   
>>> https://storage.kernelci.org/next/master/next-20200511/arm/tegra_defconfig/gcc-8/lab-collabora/baseline-tegra124-jetson-tk1.html
>>>   Result: 3eeeb45c6d044 iommu: Remove add_device()/remove_device() 
>>> code-paths
> 
> Okay, so it faults at
> 
>   PC is at __iommu_probe_device+0x20/0x1b8
> 
> Can you translate that for me into a code-line, please? That would help
> finding the issue.

Sure, sorry for the delay.  I've built my own image as vmlinux is
not stored by kernelci and reproduced the problem:

  https://lava.collabora.co.uk/scheduler/job/2403076#L544

which this time gave me:

<4>[2.540558] PC is at iommu_probe_device+0x1c/0x15c
<4>[2.545606] LR is at of_iommu_configure+0x15c/0x1c4
<4>[2.550736] pc : []lr : []psr: a013

which in turn brings us to:

(gdb) l *0xc092e0e4
0xc092e0e4 is in iommu_probe_device (drivers/iommu/iommu.c:232).
227 int ret;
228 
229 if (!dev_iommu_get(dev))
230 return -ENOMEM;
231 
232 if (!try_module_get(ops->owner)) {
233 ret = -EINVAL;
234 goto err_out;
235 }
236 


Hope this helps.

Guillaume


Re: next/master bisection: baseline.login on jetson-tk1

2020-05-12 Thread Joerg Roedel
Hi Guillaume,

thanks for the report!

On Tue, May 12, 2020 at 07:05:13AM +0100, Guillaume Tucker wrote:
> > Summary:
> >   Start:  4b20e7462caa6 Add linux-next specific files for 20200511
> >   Plain log:  
> > https://storage.kernelci.org/next/master/next-20200511/arm/tegra_defconfig/gcc-8/lab-collabora/baseline-tegra124-jetson-tk1.txt
> >   HTML log:   
> > https://storage.kernelci.org/next/master/next-20200511/arm/tegra_defconfig/gcc-8/lab-collabora/baseline-tegra124-jetson-tk1.html
> >   Result: 3eeeb45c6d044 iommu: Remove add_device()/remove_device() 
> > code-paths

Okay, so it faults at

PC is at __iommu_probe_device+0x20/0x1b8

Can you translate that for me into a code-line, please? That would help
finding the issue.


Thanks,

Joerg



Re: next/master bisection: baseline.login on jetson-tk1

2020-05-12 Thread Guillaume Tucker
Please see the bisection report below about a kernel panic.

Reports aren't automatically sent to the public while we're
trialing new bisection features on kernelci.org but this one
looks valid.

See the kernel Oops due to a NULL pointer followed by a panic:


https://storage.kernelci.org/next/master/next-20200511/arm/tegra_defconfig/gcc-8/lab-collabora/baseline-tegra124-jetson-tk1.html#L573

Stack trace:

<0>[2.953683] [] (__iommu_probe_device) from [] 
(iommu_probe_device+0x18/0x124)
<0>[2.962810] [] (iommu_probe_device) from [] 
(of_iommu_configure+0x154/0x1b8)
<0>[2.971853] [] (of_iommu_configure) from [] 
(of_dma_configure+0x144/0x2c8)
<0>[2.980722] [] (of_dma_configure) from [] 
(host1x_attach_driver+0x148/0x2c4)
<0>[2.989763] [] (host1x_attach_driver) from [] 
(host1x_driver_register_full+0x70/0xcc)
<0>[2.999585] [] (host1x_driver_register_full) from [] 
(host1x_drm_init+0x14/0x50)
<0>[3.008973] [] (host1x_drm_init) from [] 
(do_one_initcall+0x50/0x2b0)
<0>[3.017405] [] (do_one_initcall) from [] 
(kernel_init_freeable+0x188/0x200)
<0>[3.026361] [] (kernel_init_freeable) from [] 
(kernel_init+0x8/0x114)
<0>[3.034794] [] (kernel_init) from [] 
(ret_from_fork+0x14/0x2c)

Guillaume


On 12/05/2020 02:24, kernelci.org bot wrote:
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This automated bisection report was sent to you on the basis  *
> * that you may be involved with the breaking commit it has  *
> * found.  No manual investigation has been done to verify it,   *
> * and the root cause of the problem may be somewhere else.  *
> *   *
> * If you do send a fix, please include this trailer:*
> *   Reported-by: "kernelci.org bot"   *
> *   *
> * Hope this helps!          *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> next/master bisection: baseline.login on jetson-tk1
> 
> Summary:
>   Start:  4b20e7462caa6 Add linux-next specific files for 20200511
>   Plain log:  
> https://storage.kernelci.org/next/master/next-20200511/arm/tegra_defconfig/gcc-8/lab-collabora/baseline-tegra124-jetson-tk1.txt
>   HTML log:   
> https://storage.kernelci.org/next/master/next-20200511/arm/tegra_defconfig/gcc-8/lab-collabora/baseline-tegra124-jetson-tk1.html
>   Result: 3eeeb45c6d044 iommu: Remove add_device()/remove_device() 
> code-paths
> 
> Checks:
>   revert: PASS
>   verify: PASS
> 
> Parameters:
>   Tree:   next
>   URL:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>   Branch: master
>   Target: jetson-tk1
>   CPU arch:   arm
>   Lab:lab-collabora
>   Compiler:   gcc-8
>   Config: tegra_defconfig
>   Test case:  baseline.login
> 
> Breaking commit found:
> 
> ---
> commit 3eeeb45c6d0444b368cdeba9bdafa8bbcf5370d1
> Author: Joerg Roedel 
> Date:   Wed Apr 29 15:37:10 2020 +0200
> 
> iommu: Remove add_device()/remove_device() code-paths
> 
> All drivers are converted to use the probe/release_device()
> call-backs, so the add_device/remove_device() pointers are unused and
> the code using them can be removed.
> 
> Signed-off-by: Joerg Roedel 
> Tested-by: Marek Szyprowski 
> Acked-by: Marek Szyprowski 
> Link: https://lore.kernel.org/r/20200429133712.31431-33-j...@8bytes.org
> Signed-off-by: Joerg Roedel 
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 397fd4fd0c320..7f99e5ae432c6 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -220,12 +220,20 @@ static int __iommu_probe_device(struct device *dev, 
> struct list_head *group_list
>   return ret;
>  }
>  
> -static int __iommu_probe_device_helper(struct device *dev)
> +int iommu_probe_device(struct device *dev)
>  {
>   const struct iommu_ops *ops = dev->bus->iommu_ops;
>   struct iommu_group *group;
>   int ret;
>  
> + if (!dev_iommu_get(dev))
> + return -ENOMEM;
> +
> + if (!try_module_get(ops->owner)) {
> + ret = -EINVAL;
> + goto err_out;
> + }
> +
>   ret = __iommu_probe_device(dev, NULL);
>   if (ret)
>   goto err_out;
> @@ -259,75 +267,23 @@ static int __iommu_probe_device_helper(struct device 
> *dev)
>  
>  err_release:
>   iommu_release_device(dev);
> +
>  err_out:
>   return ret;
>  
>  }
>  
>