Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* linux-next: build failure after merge of the hmm tree
@ 2019-09-02 10:50 Stephen Rothwell
  2019-09-02 10:51 ` Jason Gunthorpe
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-09-02 10:50 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Dan Williams,
	Christoph Hellwig

[-- Attachment #1: Type: text/plain, Size: 3851 bytes --]

Hi all,

After merging the hmm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

ERROR: "__nd_driver_register" [drivers/dax/pmem/dax_pmem_compat.ko] undefined!
ERROR: "nvdimm_namespace_common_probe" [drivers/dax/pmem/dax_pmem_core.ko] undefined!
ERROR: "devm_nsio_disable" [drivers/dax/pmem/dax_pmem_core.ko] undefined!
ERROR: "devm_nsio_enable" [drivers/dax/pmem/dax_pmem_core.ko] undefined!
ERROR: "nvdimm_setup_pfn" [drivers/dax/pmem/dax_pmem_core.ko] undefined!
ERROR: "to_nd_dax" [drivers/dax/pmem/dax_pmem_core.ko] undefined!
ERROR: "to_nd_region" [drivers/dax/pmem/dax_pmem_core.ko] undefined!
ERROR: "__nd_driver_register" [drivers/dax/pmem/dax_pmem.ko] undefined!
ERROR: "nvdimm_cmd_mask" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_blk_region_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_blk_region_to_dimm" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_bus_attribute_group" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_fletcher64" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_attribute_group" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_blk_region_set_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_kobj" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_pmem_region_create" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_cmd_in_size" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_region_dev" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_bus_register" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_to_bus" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_numa_attribute_group" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_in_overwrite" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_flush" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_region_acquire_lane" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_volatile_region_create" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "devm_nvdimm_memremap" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_region_attribute_group" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "to_nvdimm_bus_dev" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_name" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_blk_memremap_flags" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_bus_unregister" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_cmd_dimm_desc" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_mapping_attribute_group" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_cmd_out_size" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_region_release_lane" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_device_attribute_group" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "to_nd_desc" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_has_flush" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "to_nvdimm_bus" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_bus_check_dimm_count" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "to_nd_region" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "__nvdimm_create" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "to_nvdimm" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_cmd_bus_desc" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_bus_add_badrange" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nd_region_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "to_nd_blk_region" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_region_notify" [drivers/acpi/nfit/nfit.ko] undefined!
ERROR: "nvdimm_blk_region_create" [drivers/acpi/nfit/nfit.ko] undefined!

Caused by commit

  126470c8a58b ("libnvdimm: Enable unit test infrastructure compile checks")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-09-02 10:50 linux-next: build failure after merge of the hmm tree Stephen Rothwell
@ 2019-09-02 10:51 ` Jason Gunthorpe
  2019-09-02 23:45   ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Gunthorpe @ 2019-09-02 10:51 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Dan Williams,
	Christoph Hellwig

On Mon, Sep 02, 2019 at 08:50:17PM +1000, Stephen Rothwell wrote:
> Hi all,

> ERROR: "nd_region_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
> ERROR: "to_nd_blk_region" [drivers/acpi/nfit/nfit.ko] undefined!
> ERROR: "nvdimm_region_notify" [drivers/acpi/nfit/nfit.ko] undefined!
> ERROR: "nvdimm_blk_region_create" [drivers/acpi/nfit/nfit.ko] undefined!
> 
> Caused by commit
> 
>   126470c8a58b ("libnvdimm: Enable unit test infrastructure compile checks")
> 
> I have reverted that commit for today.
> 

Looks like more kconfig trouble, can you send Dan your kconfig? I'll
drop this patch again

Thanks,
Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-09-02 10:51 ` Jason Gunthorpe
@ 2019-09-02 23:45   ` Stephen Rothwell
  2019-09-03  5:31     ` Dan Williams
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-09-02 23:45 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Dan Williams,
	Christoph Hellwig

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

Hi Jason,

On Mon, 2 Sep 2019 10:51:41 +0000 Jason Gunthorpe <jgg@mellanox.com> wrote:
>
> On Mon, Sep 02, 2019 at 08:50:17PM +1000, Stephen Rothwell wrote:
> > Hi all,  
> 
> > ERROR: "nd_region_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
> > ERROR: "to_nd_blk_region" [drivers/acpi/nfit/nfit.ko] undefined!
> > ERROR: "nvdimm_region_notify" [drivers/acpi/nfit/nfit.ko] undefined!
> > ERROR: "nvdimm_blk_region_create" [drivers/acpi/nfit/nfit.ko] undefined!
> > 
> > Caused by commit
> > 
> >   126470c8a58b ("libnvdimm: Enable unit test infrastructure compile checks")
> > 
> > I have reverted that commit for today.
> 
> Looks like more kconfig trouble, can you send Dan your kconfig? I'll
> drop this patch again
>

Thanks.  It was just an x86_64 allmodconfig build.  I don't actually
have the .config file (it gets cleaned up, sorry).
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-09-02 23:45   ` Stephen Rothwell
@ 2019-09-03  5:31     ` Dan Williams
  2019-09-03  5:42       ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Williams @ 2019-09-03  5:31 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jason Gunthorpe, Linux Next Mailing List,
	Linux Kernel Mailing List, Christoph Hellwig, kbuild test robot

On Mon, Sep 2, 2019 at 4:45 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Jason,
>
> On Mon, 2 Sep 2019 10:51:41 +0000 Jason Gunthorpe <jgg@mellanox.com> wrote:
> >
> > On Mon, Sep 02, 2019 at 08:50:17PM +1000, Stephen Rothwell wrote:
> > > Hi all,
> >
> > > ERROR: "nd_region_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
> > > ERROR: "to_nd_blk_region" [drivers/acpi/nfit/nfit.ko] undefined!
> > > ERROR: "nvdimm_region_notify" [drivers/acpi/nfit/nfit.ko] undefined!
> > > ERROR: "nvdimm_blk_region_create" [drivers/acpi/nfit/nfit.ko] undefined!
> > >
> > > Caused by commit
> > >
> > >   126470c8a58b ("libnvdimm: Enable unit test infrastructure compile checks")
> > >
> > > I have reverted that commit for today.
> >
> > Looks like more kconfig trouble, can you send Dan your kconfig? I'll
> > drop this patch again
> >
>
> Thanks.  It was just an x86_64 allmodconfig build.  I don't actually
> have the .config file (it gets cleaned up, sorry).

Strange. x86_64 allmodconfig is certainly a 0day build target. Could
this be toolchain dependent?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-09-03  5:31     ` Dan Williams
@ 2019-09-03  5:42       ` Stephen Rothwell
  2019-09-03 23:11         ` Dan Williams
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-09-03  5:42 UTC (permalink / raw)
  To: Dan Williams
  Cc: Jason Gunthorpe, Linux Next Mailing List,
	Linux Kernel Mailing List, Christoph Hellwig, kbuild test robot

[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]

Hi Dan,

On Mon, 2 Sep 2019 22:31:00 -0700 Dan Williams <dan.j.williams@intel.com> wrote:
>
> On Mon, Sep 2, 2019 at 4:45 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi Jason,
> >
> > On Mon, 2 Sep 2019 10:51:41 +0000 Jason Gunthorpe <jgg@mellanox.com> wrote:  
> > >
> > > On Mon, Sep 02, 2019 at 08:50:17PM +1000, Stephen Rothwell wrote:  
> > >  
> > > > ERROR: "nd_region_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
> > > > ERROR: "to_nd_blk_region" [drivers/acpi/nfit/nfit.ko] undefined!
> > > > ERROR: "nvdimm_region_notify" [drivers/acpi/nfit/nfit.ko] undefined!
> > > > ERROR: "nvdimm_blk_region_create" [drivers/acpi/nfit/nfit.ko] undefined!
> > > >
> > > > Caused by commit
> > > >
> > > >   126470c8a58b ("libnvdimm: Enable unit test infrastructure compile checks")
> > > >
> > > > I have reverted that commit for today.  
> > >
> > > Looks like more kconfig trouble, can you send Dan your kconfig? I'll
> > > drop this patch again
> > >  
> >
> > Thanks.  It was just an x86_64 allmodconfig build.  I don't actually
> > have the .config file (it gets cleaned up, sorry).  
> 
> Strange. x86_64 allmodconfig is certainly a 0day build target. Could
> this be toolchain dependent?

Possible, I guess.  I am cross compiling on a PowerPC LE host

$ x86_64-linux-gnu-gcc --version
x86_64-linux-gnu-gcc (Debian 9.2.1-4) 9.2.1 20190821

$ x86_64-linux-gnu-ld --version
GNU ld (GNU Binutils for Debian) 2.32.51.20190821

It could also be an interaction with something else in linux-next.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-09-03  5:42       ` Stephen Rothwell
@ 2019-09-03 23:11         ` Dan Williams
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Williams @ 2019-09-03 23:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jason Gunthorpe, Linux Next Mailing List,
	Linux Kernel Mailing List, Christoph Hellwig, kbuild test robot

On Mon, Sep 2, 2019 at 10:42 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Dan,
>
> On Mon, 2 Sep 2019 22:31:00 -0700 Dan Williams <dan.j.williams@intel.com> wrote:
> >
> > On Mon, Sep 2, 2019 at 4:45 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > Hi Jason,
> > >
> > > On Mon, 2 Sep 2019 10:51:41 +0000 Jason Gunthorpe <jgg@mellanox.com> wrote:
> > > >
> > > > On Mon, Sep 02, 2019 at 08:50:17PM +1000, Stephen Rothwell wrote:
> > > >
> > > > > ERROR: "nd_region_provider_data" [drivers/acpi/nfit/nfit.ko] undefined!
> > > > > ERROR: "to_nd_blk_region" [drivers/acpi/nfit/nfit.ko] undefined!
> > > > > ERROR: "nvdimm_region_notify" [drivers/acpi/nfit/nfit.ko] undefined!
> > > > > ERROR: "nvdimm_blk_region_create" [drivers/acpi/nfit/nfit.ko] undefined!
> > > > >
> > > > > Caused by commit
> > > > >
> > > > >   126470c8a58b ("libnvdimm: Enable unit test infrastructure compile checks")
> > > > >
> > > > > I have reverted that commit for today.
> > > >
> > > > Looks like more kconfig trouble, can you send Dan your kconfig? I'll
> > > > drop this patch again
> > > >
> > >
> > > Thanks.  It was just an x86_64 allmodconfig build.  I don't actually
> > > have the .config file (it gets cleaned up, sorry).
> >
> > Strange. x86_64 allmodconfig is certainly a 0day build target. Could
> > this be toolchain dependent?
>
> Possible, I guess.  I am cross compiling on a PowerPC LE host
>
> $ x86_64-linux-gnu-gcc --version
> x86_64-linux-gnu-gcc (Debian 9.2.1-4) 9.2.1 20190821
>
> $ x86_64-linux-gnu-ld --version
> GNU ld (GNU Binutils for Debian) 2.32.51.20190821
>
> It could also be an interaction with something else in linux-next.

I was able to reproduce and it seems to be fixed with this change:

diff --git a/drivers/nvdimm/Makefile b/drivers/nvdimm/Makefile
index 6557e126892f..29203f3d3069 100644
--- a/drivers/nvdimm/Makefile
+++ b/drivers/nvdimm/Makefile
@@ -32,4 +32,4 @@ libnvdimm-$(CONFIG_NVDIMM_KEYS) += security.o

 TOOLS := ../../tools
 TEST_SRC := $(TOOLS)/testing/nvdimm/test
-obj-$(CONFIG_NVDIMM_TEST_BUILD) := $(TEST_SRC)/iomap.o
+obj-$(CONFIG_NVDIMM_TEST_BUILD) += $(TEST_SRC)/iomap.o

I'll send it through one more 0day run before asking Jason to try again.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-07-09  0:21 ` Stephen Rothwell
@ 2019-07-09 12:32   ` Jason Gunthorpe
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Gunthorpe @ 2019-07-09 12:32 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	Linux Next Mailing List, Linux Kernel Mailing List,
	Nikolay Borisov

On Tue, Jul 09, 2019 at 10:21:37AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> On Mon, 1 Jul 2019 21:08:53 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the hmm tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> > 
> > mm/hmm.c: In function 'hmm_get_or_create':
> > mm/hmm.c:50:2: error: implicit declaration of function 'lockdep_assert_held_exclusive'; did you mean 'lockdep_assert_held_once'? [-Werror=implicit-function-declaration]
> >   lockdep_assert_held_exclusive(&mm->mmap_sem);
> >   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >   lockdep_assert_held_once
> > 
> > Caused by commit
> > 
> >   8a9320b7ec5d ("mm/hmm: Simplify hmm_get_or_create and make it reliable")
> > 
> > interacting with commit
> > 
> >   9ffbe8ac05db ("locking/lockdep: Rename lockdep_assert_held_exclusive() -> lockdep_assert_held_write()")
> > 
> > from the tip tree.
> > 
> > I have added the following merge fix.
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 1 Jul 2019 21:05:59 +1000
> > Subject: [PATCH] mm/hmm: fixup for "locking/lockdep: Rename
> >  lockdep_assert_held_exclusive() -> lockdep_assert_held_write()"
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> >  mm/hmm.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/mm/hmm.c b/mm/hmm.c
> > index c1bdcef403ee..2ddbd589b207 100644
> > +++ b/mm/hmm.c
> > @@ -47,7 +47,7 @@ static struct hmm *hmm_get_or_create(struct mm_struct *mm)
> >  {
> >  	struct hmm *hmm;
> >  
> > -	lockdep_assert_held_exclusive(&mm->mmap_sem);
> > +	lockdep_assert_held_write(&mm->mmap_sem);
> >  
> >  	/* Abuse the page_table_lock to also protect mm->hmm. */
> >  	spin_lock(&mm->page_table_lock);
> > @@ -248,7 +248,7 @@ static const struct mmu_notifier_ops hmm_mmu_notifier_ops = {
> >   */
> >  int hmm_mirror_register(struct hmm_mirror *mirror, struct mm_struct *mm)
> >  {
> > -	lockdep_assert_held_exclusive(&mm->mmap_sem);
> > +	lockdep_assert_held_write(&mm->mmap_sem);
> >  
> >  	/* Sanity check */
> >  	if (!mm || !mirror || !mirror->ops)
> 
> I am still getting this conflict (the commit ids may have changed).
> Just a reminder in case you think Linus may need to know.

Ingo already sent the PR to Linus with the function rename, so I will
take care of it.

Thanks,
Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-07-01 11:08 Stephen Rothwell
@ 2019-07-09  0:21 ` Stephen Rothwell
  2019-07-09 12:32   ` Jason Gunthorpe
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-07-09  0:21 UTC (permalink / raw)
  To: Jason Gunthorpe, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Nikolay Borisov

[-- Attachment #1: Type: text/plain, Size: 2164 bytes --]

Hi all,

On Mon, 1 Jul 2019 21:08:53 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the hmm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> mm/hmm.c: In function 'hmm_get_or_create':
> mm/hmm.c:50:2: error: implicit declaration of function 'lockdep_assert_held_exclusive'; did you mean 'lockdep_assert_held_once'? [-Werror=implicit-function-declaration]
>   lockdep_assert_held_exclusive(&mm->mmap_sem);
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   lockdep_assert_held_once
> 
> Caused by commit
> 
>   8a9320b7ec5d ("mm/hmm: Simplify hmm_get_or_create and make it reliable")
> 
> interacting with commit
> 
>   9ffbe8ac05db ("locking/lockdep: Rename lockdep_assert_held_exclusive() -> lockdep_assert_held_write()")
> 
> from the tip tree.
> 
> I have added the following merge fix.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 1 Jul 2019 21:05:59 +1000
> Subject: [PATCH] mm/hmm: fixup for "locking/lockdep: Rename
>  lockdep_assert_held_exclusive() -> lockdep_assert_held_write()"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  mm/hmm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/hmm.c b/mm/hmm.c
> index c1bdcef403ee..2ddbd589b207 100644
> --- a/mm/hmm.c
> +++ b/mm/hmm.c
> @@ -47,7 +47,7 @@ static struct hmm *hmm_get_or_create(struct mm_struct *mm)
>  {
>  	struct hmm *hmm;
>  
> -	lockdep_assert_held_exclusive(&mm->mmap_sem);
> +	lockdep_assert_held_write(&mm->mmap_sem);
>  
>  	/* Abuse the page_table_lock to also protect mm->hmm. */
>  	spin_lock(&mm->page_table_lock);
> @@ -248,7 +248,7 @@ static const struct mmu_notifier_ops hmm_mmu_notifier_ops = {
>   */
>  int hmm_mirror_register(struct hmm_mirror *mirror, struct mm_struct *mm)
>  {
> -	lockdep_assert_held_exclusive(&mm->mmap_sem);
> +	lockdep_assert_held_write(&mm->mmap_sem);
>  
>  	/* Sanity check */
>  	if (!mm || !mirror || !mirror->ops)

I am still getting this conflict (the commit ids may have changed).
Just a reminder in case you think Linus may need to know.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-07-01 23:10 ` Jason Gunthorpe
@ 2019-07-03  1:28   ` Alex Deucher
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2019-07-03  1:28 UTC (permalink / raw)
  To: Jason Gunthorpe, Kuehling, Felix, Yang, Philip
  Cc: Stephen Rothwell, Dave Airlie, Linux Kernel Mailing List, DRI,
	Linux Next Mailing List, Alex Deucher

On Tue, Jul 2, 2019 at 3:24 AM Jason Gunthorpe <jgg@mellanox.com> wrote:
>
> On Mon, Jul 01, 2019 at 09:33:04PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the hmm tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> >
> > mm/hmm.c: In function 'hmm_get_or_create':
> > mm/hmm.c:50:2: error: implicit declaration of function 'lockdep_assert_held_exclusive'; did you mean 'lockdep_assert_held_once'? [-Werror=implicit-function-declaration]
> >   lockdep_assert_held_exclusive(&mm->mmap_sem);
> >   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >   lockdep_assert_held_once
> > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
> > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:778:28: error: passing argument 2 of 'hmm_range_register' from incompatible pointer type [-Werror=incompatible-pointer-types]
> >   hmm_range_register(range, mm, start,
> >                             ^~
> > In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:35:
> > include/linux/hmm.h:464:29: note: expected 'struct hmm_mirror *' but argument is of type 'struct mm_struct *'
> >           struct hmm_mirror *mirror,
> >           ~~~~~~~~~~~~~~~~~~~^~~~~~
> >
> > Caused by commit
> >
> >   e36acfe6c86d ("mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register")
> >
> > interacting with commit
> >
> >   66c45500bfdc ("drm/amdgpu: use new HMM APIs and helpers")
> >
> > from the drm tree.
> >
> > All I could do for now was to mark the AMDGPU driver broken.  Please
> > submit a merge for for me (and later Linus) to use.
>
> This is expected, the AMD guys have the resolution for this from when
> they tested hmm.git..
>
> I think we are going to have to merge hmm.git into the amdgpu tree and
> push the resolution forward, as it looks kind of complicated to shift
> onto Linus or DRM.
>
> Probably amdgpu needs to gain a few patches making the hmm_mirror
> visible to amdgpu_ttm.c and then the merge resolution will be simple?
>
> AMD/DRM we have a few days left to decide on how best to handle the
> conflict, thanks.

Philip and Felix have been working on a branch with hmm merged into
drm-next with all the conflicts fixes up.  I'll post it out tomorrow
once I get Felix's latest revisions.

Alex

>
> Regards,
> Jason
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: build failure after merge of the hmm tree
  2019-07-01 11:33 Stephen Rothwell
@ 2019-07-01 23:10 ` Jason Gunthorpe
  2019-07-03  1:28   ` Alex Deucher
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Gunthorpe @ 2019-07-01 23:10 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Airlie, DRI, Linux Next Mailing List,
	Linux Kernel Mailing List, Philip Yang, Alex Deucher

On Mon, Jul 01, 2019 at 09:33:04PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the hmm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> mm/hmm.c: In function 'hmm_get_or_create':
> mm/hmm.c:50:2: error: implicit declaration of function 'lockdep_assert_held_exclusive'; did you mean 'lockdep_assert_held_once'? [-Werror=implicit-function-declaration]
>   lockdep_assert_held_exclusive(&mm->mmap_sem);
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   lockdep_assert_held_once
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:778:28: error: passing argument 2 of 'hmm_range_register' from incompatible pointer type [-Werror=incompatible-pointer-types]
>   hmm_range_register(range, mm, start,
>                             ^~
> In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:35:
> include/linux/hmm.h:464:29: note: expected 'struct hmm_mirror *' but argument is of type 'struct mm_struct *'
>           struct hmm_mirror *mirror,
>           ~~~~~~~~~~~~~~~~~~~^~~~~~
> 
> Caused by commit
> 
>   e36acfe6c86d ("mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register")
> 
> interacting with commit
> 
>   66c45500bfdc ("drm/amdgpu: use new HMM APIs and helpers")
> 
> from the drm tree.
> 
> All I could do for now was to mark the AMDGPU driver broken.  Please
> submit a merge for for me (and later Linus) to use.

This is expected, the AMD guys have the resolution for this from when
they tested hmm.git..

I think we are going to have to merge hmm.git into the amdgpu tree and
push the resolution forward, as it looks kind of complicated to shift
onto Linus or DRM.

Probably amdgpu needs to gain a few patches making the hmm_mirror
visible to amdgpu_ttm.c and then the merge resolution will be simple?

AMD/DRM we have a few days left to decide on how best to handle the
conflict, thanks.

Regards,
Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: build failure after merge of the hmm tree
@ 2019-07-01 11:33 Stephen Rothwell
  2019-07-01 23:10 ` Jason Gunthorpe
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-07-01 11:33 UTC (permalink / raw)
  To: Jason Gunthorpe, Dave Airlie, DRI
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Philip Yang,
	Alex Deucher

[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]

Hi all,

After merging the hmm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

mm/hmm.c: In function 'hmm_get_or_create':
mm/hmm.c:50:2: error: implicit declaration of function 'lockdep_assert_held_exclusive'; did you mean 'lockdep_assert_held_once'? [-Werror=implicit-function-declaration]
  lockdep_assert_held_exclusive(&mm->mmap_sem);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lockdep_assert_held_once
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function 'amdgpu_ttm_tt_get_user_pages':
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:778:28: error: passing argument 2 of 'hmm_range_register' from incompatible pointer type [-Werror=incompatible-pointer-types]
  hmm_range_register(range, mm, start,
                            ^~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:35:
include/linux/hmm.h:464:29: note: expected 'struct hmm_mirror *' but argument is of type 'struct mm_struct *'
          struct hmm_mirror *mirror,
          ~~~~~~~~~~~~~~~~~~~^~~~~~

Caused by commit

  e36acfe6c86d ("mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register")

interacting with commit

  66c45500bfdc ("drm/amdgpu: use new HMM APIs and helpers")

from the drm tree.

All I could do for now was to mark the AMDGPU driver broken.  Please
submit a merge for for me (and later Linus) to use.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: build failure after merge of the hmm tree
@ 2019-07-01 11:08 Stephen Rothwell
  2019-07-09  0:21 ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-07-01 11:08 UTC (permalink / raw)
  To: Jason Gunthorpe, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Nikolay Borisov

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

Hi all,

After merging the hmm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

mm/hmm.c: In function 'hmm_get_or_create':
mm/hmm.c:50:2: error: implicit declaration of function 'lockdep_assert_held_exclusive'; did you mean 'lockdep_assert_held_once'? [-Werror=implicit-function-declaration]
  lockdep_assert_held_exclusive(&mm->mmap_sem);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lockdep_assert_held_once

Caused by commit

  8a9320b7ec5d ("mm/hmm: Simplify hmm_get_or_create and make it reliable")

interacting with commit

  9ffbe8ac05db ("locking/lockdep: Rename lockdep_assert_held_exclusive() -> lockdep_assert_held_write()")

from the tip tree.

I have added the following merge fix.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 1 Jul 2019 21:05:59 +1000
Subject: [PATCH] mm/hmm: fixup for "locking/lockdep: Rename
 lockdep_assert_held_exclusive() -> lockdep_assert_held_write()"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/hmm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/hmm.c b/mm/hmm.c
index c1bdcef403ee..2ddbd589b207 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -47,7 +47,7 @@ static struct hmm *hmm_get_or_create(struct mm_struct *mm)
 {
 	struct hmm *hmm;
 
-	lockdep_assert_held_exclusive(&mm->mmap_sem);
+	lockdep_assert_held_write(&mm->mmap_sem);
 
 	/* Abuse the page_table_lock to also protect mm->hmm. */
 	spin_lock(&mm->page_table_lock);
@@ -248,7 +248,7 @@ static const struct mmu_notifier_ops hmm_mmu_notifier_ops = {
  */
 int hmm_mirror_register(struct hmm_mirror *mirror, struct mm_struct *mm)
 {
-	lockdep_assert_held_exclusive(&mm->mmap_sem);
+	lockdep_assert_held_write(&mm->mmap_sem);
 
 	/* Sanity check */
 	if (!mm || !mirror || !mirror->ops)
-- 
2.20.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 10:50 linux-next: build failure after merge of the hmm tree Stephen Rothwell
2019-09-02 10:51 ` Jason Gunthorpe
2019-09-02 23:45   ` Stephen Rothwell
2019-09-03  5:31     ` Dan Williams
2019-09-03  5:42       ` Stephen Rothwell
2019-09-03 23:11         ` Dan Williams
  -- strict thread matches above, loose matches on Subject: below --
2019-07-01 11:33 Stephen Rothwell
2019-07-01 23:10 ` Jason Gunthorpe
2019-07-03  1:28   ` Alex Deucher
2019-07-01 11:08 Stephen Rothwell
2019-07-09  0:21 ` Stephen Rothwell
2019-07-09 12:32   ` Jason Gunthorpe

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org linux-next@archiver.kernel.org
	public-inbox-index linux-next


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/ public-inbox