linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the akpm tree
@ 2020-05-25 12:17 Stephen Rothwell
  2020-05-25 18:18 ` John Hubbard
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-05-25 12:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, John Hubbard,
	Michel Lespinasse

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

Hi all,

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

In file included from include/linux/kernel.h:14,
                 from mm/gup.c:2:
mm/gup.c: In function 'internal_get_user_pages_fast':
mm/gup.c:2732:33: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
 2732 |   might_lock_read(&current->mm->mmap_sem);
      |                                 ^~~~~~~~

Caused by commit

  64fe66e8a95e ("mmap locking API: rename mmap_sem to mmap_lock")

fron the akpm tree interacting with commit

  b1fc8b5ddb4e ("mm/gup: might_lock_read(mmap_sem) in get_user_pages_fast()")

from the akpm-current tree.

I added the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 25 May 2020 22:11:51 +1000
Subject: [PATCH] mm/gup: update for mmap_sem rename

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

diff --git a/mm/gup.c b/mm/gup.c
index 8977e5fe9843..f4bca3de0b4b 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2729,7 +2729,7 @@ static int internal_get_user_pages_fast(unsigned long start, int nr_pages,
 		return -EINVAL;
 
 	if (!(gup_flags & FOLL_FAST_ONLY))
-		might_lock_read(&current->mm->mmap_sem);
+		might_lock_read(&current->mm->mmap_lock);
 
 	start = untagged_addr(start) & PAGE_MASK;
 	addr = start;
-- 
2.26.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-05-25 12:17 linux-next: build failure after merge of the akpm tree Stephen Rothwell
@ 2020-05-25 18:18 ` John Hubbard
  2020-05-25 22:17   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: John Hubbard @ 2020-05-25 18:18 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Michel Lespinasse

On 2020-05-25 05:17, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from include/linux/kernel.h:14,
>                   from mm/gup.c:2:
> mm/gup.c: In function 'internal_get_user_pages_fast':
> mm/gup.c:2732:33: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
>   2732 |   might_lock_read(&current->mm->mmap_sem);
>        |                                 ^~~~~~~~
> 
> Caused by commit
> 
>    64fe66e8a95e ("mmap locking API: rename mmap_sem to mmap_lock")
> 
> fron the akpm tree interacting with commit
> 
>    b1fc8b5ddb4e ("mm/gup: might_lock_read(mmap_sem) in get_user_pages_fast()")
> 
> from the akpm-current tree.
> 
> I added the following patch for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 25 May 2020 22:11:51 +1000
> Subject: [PATCH] mm/gup: update for mmap_sem rename
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>   mm/gup.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/gup.c b/mm/gup.c
> index 8977e5fe9843..f4bca3de0b4b 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -2729,7 +2729,7 @@ static int internal_get_user_pages_fast(unsigned long start, int nr_pages,
>   		return -EINVAL;
>   
>   	if (!(gup_flags & FOLL_FAST_ONLY))
> -		might_lock_read(&current->mm->mmap_sem);
> +		might_lock_read(&current->mm->mmap_lock);
>   
>   	start = untagged_addr(start) & PAGE_MASK;
>   	addr = start;
> 

Yes, looks good. And in fact, Andrew has the same fix-up in the mmotm branch of
linux-next.git, as

     commit a76c281a8ddd ("mmap-locking-api-rename-mmap_sem-to-mmap_lock-fix").


thanks,
-- 
John Hubbard
NVIDIA

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-05-25 18:18 ` John Hubbard
@ 2020-05-25 22:17   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-05-25 22:17 UTC (permalink / raw)
  To: John Hubbard
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Michel Lespinasse

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

Hi John,

On Mon, 25 May 2020 11:18:46 -0700 John Hubbard <jhubbard@nvidia.com> wrote:
>
> Yes, looks good. And in fact, Andrew has the same fix-up in the mmotm branch of
> linux-next.git, as
> 
>      commit a76c281a8ddd ("mmap-locking-api-rename-mmap_sem-to-mmap_lock-fix").

For some reason that was not included in the section that gets applied
to linux-next :-(

I have added it to the akpm tree today.
-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2021-06-16 13:07 Stephen Rothwell
@ 2021-06-18  8:24 ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2021-06-18  8:24 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Aneesh Kumar K.V, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

On Wed, 16 Jun 2021 23:07:44 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm tree, today's linux-next build (sparc defconfig)
> failed like this:
> 
> In file included from arch/sparc/include/asm/pgtable.h:7:0,
>                  from include/linux/pgtable.h:6,
>                  from include/linux/mm.h:33,
>                  from include/linux/ring_buffer.h:5,
>                  from include/linux/trace_events.h:6,
>                  from include/trace/syscall.h:7,
>                  from include/linux/syscalls.h:87,
>                  from fs/io_uring.c:45:
> arch/sparc/include/asm/pgtable_32.h: In function 'pud_pgtable':
> arch/sparc/include/asm/pgtable_32.h:157:10: warning: return makes pointer from integer without a cast [-Wint-conversion]
>    return ~0;
>           ^
> 
> and many, many more like this.
> 
> This is an error due to (part of) the tree being built with -Werror
> 
> Caused by commit
> 
>   8aef6710db27 ("mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t *")
> 
> I have applied the following hack fix for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 16 Jun 2021 22:51:50 +1000
> Subject: [PATCH] mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t * fix
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sparc/include/asm/pgtable_32.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
> index 1e6b55425f3d..ffccfe3b22ed 100644
> --- a/arch/sparc/include/asm/pgtable_32.h
> +++ b/arch/sparc/include/asm/pgtable_32.h
> @@ -154,7 +154,7 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
>  static inline pmd_t *pud_pgtable(pud_t pud)
>  {
>  	if (srmmu_device_memory(pud_val(pud))) {
> -		return ~0;
> +		return (pmd_t *)~0;
>  	} else {
>  		unsigned long v = pud_val(pud) & SRMMU_PTD_PMASK;
>  		return (pmd_t *)__nocache_va(v << 4);
> -- 
> 2.30.2

Did this get missed in the latest mmotm update?  I still have to apply it ...

-- 
Cheers,
Stephen Rothwell

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

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

* RE: linux-next: build failure after merge of the akpm tree
  2021-06-17  9:32 Stephen Rothwell
@ 2021-06-17 12:15 ` Muneendra Kumar M
  0 siblings, 0 replies; 253+ messages in thread
From: Muneendra Kumar M @ 2021-06-17 12:15 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton, Martin K. Petersen
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, tj

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

Hi Stephen,
A small query.
How do I look at the tree where the build is failing.

Regards,
Muneendra.



-----Original Message-----
From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
Sent: Thursday, June 17, 2021 3:02 PM
To: Andrew Morton <akpm@linux-foundation.org>; Martin K. Petersen
<martin.petersen@oracle.com>
Cc: Muneendra Kumar <muneendra.kumar@broadcom.com>; Linux Kernel Mailing
List <linux-kernel@vger.kernel.org>; Linux Next Mailing List
<linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the akpm tree

Hi all,

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

ERROR: modpost: "cgroup_get_e_css" [drivers/nvme/host/nvme-fc.ko]
undefined!
ERROR: modpost: "cgroup_get_e_css" [drivers/block/loop.ko] undefined!

Caused by patch

  kernel/cgroup/cgroup.c: don't export cgroup_get_e_css twice

I am not sure what happened here, but this patch interacts with commit

  6b658c4863c1 ("scsi: cgroup: Add cgroup_get_from_id()")

from the scsi-mkp tree which adds the EXPORT_SYMBOL_GPL().

I have reverted that akpm tree patch for today.

-- 
Cheers,
Stephen Rothwell

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4220 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2021-06-17  9:32 Stephen Rothwell
  2021-06-17 12:15 ` Muneendra Kumar M
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2021-06-17  9:32 UTC (permalink / raw)
  To: Andrew Morton, Martin K. Petersen
  Cc: Muneendra Kumar, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

ERROR: modpost: "cgroup_get_e_css" [drivers/nvme/host/nvme-fc.ko] undefined!
ERROR: modpost: "cgroup_get_e_css" [drivers/block/loop.ko] undefined!

Caused by patch

  kernel/cgroup/cgroup.c: don't export cgroup_get_e_css twice

I am not sure what happened here, but this patch interacts with commit

  6b658c4863c1 ("scsi: cgroup: Add cgroup_get_from_id()")

from the scsi-mkp tree which adds the EXPORT_SYMBOL_GPL().

I have reverted that akpm tree patch for today.

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2021-06-16 13:07 Stephen Rothwell
  2021-06-18  8:24 ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2021-06-16 13:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Aneesh Kumar K.V, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the akpm tree, today's linux-next build (sparc defconfig)
failed like this:

In file included from arch/sparc/include/asm/pgtable.h:7:0,
                 from include/linux/pgtable.h:6,
                 from include/linux/mm.h:33,
                 from include/linux/ring_buffer.h:5,
                 from include/linux/trace_events.h:6,
                 from include/trace/syscall.h:7,
                 from include/linux/syscalls.h:87,
                 from fs/io_uring.c:45:
arch/sparc/include/asm/pgtable_32.h: In function 'pud_pgtable':
arch/sparc/include/asm/pgtable_32.h:157:10: warning: return makes pointer from integer without a cast [-Wint-conversion]
   return ~0;
          ^

and many, many more like this.

This is an error due to (part of) the tree being built with -Werror

Caused by commit

  8aef6710db27 ("mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t *")

I have applied the following hack fix for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 16 Jun 2021 22:51:50 +1000
Subject: [PATCH] mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t * fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/include/asm/pgtable_32.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index 1e6b55425f3d..ffccfe3b22ed 100644
--- a/arch/sparc/include/asm/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -154,7 +154,7 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
 static inline pmd_t *pud_pgtable(pud_t pud)
 {
 	if (srmmu_device_memory(pud_val(pud))) {
-		return ~0;
+		return (pmd_t *)~0;
 	} else {
 		unsigned long v = pud_val(pud) & SRMMU_PTD_PMASK;
 		return (pmd_t *)__nocache_va(v << 4);
-- 
2.30.2

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2020-12-21  5:16 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-12-21  5:16 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mike Rapoport, Mike Rapoport, kernelci.org bot,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

./include/uapi/asm-generic/unistd.h:867:27: error: array index in initializer exceeds array bounds

Caused by commit

  390e5073c473 ("arch, mm: wire up memfd_secret system call where relevant")
  d098835811e0 ("arch-mm-wire-up-memfd_secret-system-call-were-relevant-fix")

Reported-by: kernelci.org bot <bot@kernelci.org>

I will apply the following patch tomorrow:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 21 Dec 2020 16:10:40 +1100
Subject: [PATCH]  arch-mm-wire-up-memfd_secret-system-call-were-relevant-fix-fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/uapi/asm-generic/unistd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 72b94deb8cf1..26125974a8a2 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -869,7 +869,7 @@ __SYSCALL(__NR_memfd_secret, sys_memfd_secret)
 #endif
 
 #undef __NR_syscalls
-#define __NR_syscalls 443
+#define __NR_syscalls 444
 
 /*
  * 32 bit systems traditionally used different
-- 
2.29.2

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2020-12-10  9:33 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-12-10  9:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Andrey Konovalov, Vincenzo Frascino, Kuan-Ying Lee,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

mm/kasan/quarantine.c: In function 'quarantine_put':
mm/kasan/quarantine.c:198:3: error: 'return' with no value, in function returning non-void [-Werror=return-type]
  198 |   return;
      |   ^~~~~~
mm/kasan/quarantine.c:171:6: note: declared here
  171 | bool quarantine_put(struct kmem_cache *cache, void *object)
      |      ^~~~~~~~~~~~~~
mm/kasan/quarantine.c:200:16: error: 'info' undeclared (first use in this function)
  200 |  qlist_put(q, &info->quarantine_link, cache->size);
      |                ^~~~
mm/kasan/quarantine.c:200:16: note: each undeclared identifier is reported only once for each function it appears in

Caused by commits

  d6e0eb793f88 ("kasan: rename get_alloc/free_info")
  453989cf05d6 ("kasan: sanitize objects when metadata doesn't fit")

interacting with commit

  2ac05f7fcf5b ("kasan: fix object remaining in offline per-cpu quarantine")

from the akmp-current tree.

This goes on and on :-(

I have applied the following patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 10 Dec 2020 20:24:01 +1100
Subject: [PATCH] fixup for "kasan: rename get_alloc/free_info"

and "kasan: sanitize objects when metadata doesn't fit"
and "kasan: fix object remaining in offline per-cpu quarantine"

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

diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
index c0331656f112..55783125a767 100644
--- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c
@@ -195,9 +195,9 @@ bool quarantine_put(struct kmem_cache *cache, void *object)
 	q = this_cpu_ptr(&cpu_quarantine);
 	if (q->offline) {
 		local_irq_restore(flags);
-		return;
+		return false;
 	}
-	qlist_put(q, &info->quarantine_link, cache->size);
+	qlist_put(q, &meta->quarantine_link, cache->size);
 	if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) {
 		qlist_move_all(q, &temp);
 
-- 
2.29.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-12-03  8:52 Stephen Rothwell
@ 2020-12-03 12:48 ` Andrey Konovalov
  0 siblings, 0 replies; 253+ messages in thread
From: Andrey Konovalov @ 2020-12-03 12:48 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Kernel Mailing List,
	Linux Next Mailing List, Vincenzo Frascino, Kuan-Ying Lee

On Thu, Dec 3, 2020 at 9:52 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> mm/kasan/quarantine.c: In function 'quarantine_put':
> mm/kasan/quarantine.c:197:15: error: 'info' undeclared (first use in this function)
>   197 |   qlink_free(&info->quarantine_link, cache);
>       |               ^~~~
> mm/kasan/quarantine.c:197:15: note: each undeclared identifier is reported only once for each function it appears in
> mm/kasan/quarantine.c:199:3: error: 'return' with no value, in function returning non-void [-Werror=return-type]
>   199 |   return;
>       |   ^~~~~~
> mm/kasan/quarantine.c:171:6: note: declared here
>   171 | bool quarantine_put(struct kmem_cache *cache, void *object)
>       |      ^~~~~~~~~~~~~~
>
> Caused by patches
>
>   "kasan: rename get_alloc/free_info"
>   "kasan: sanitize objects when metadata doesn't fit"

Yeah, this is conflict with the "kasan: fix object remain in offline
per-cpu quarantine" patch.

> I have applied the following fix patch:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 3 Dec 2020 19:41:49 +1100
> Subject: [PATCH] kasan-rename-get_alloc-free_info-fix
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  mm/kasan/quarantine.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
> index feae26ea5cbb..d98b516f372f 100644
> --- a/mm/kasan/quarantine.c
> +++ b/mm/kasan/quarantine.c
> @@ -194,9 +194,9 @@ bool quarantine_put(struct kmem_cache *cache, void *object)
>
>         q = this_cpu_ptr(&cpu_quarantine);
>         if (q->offline) {
> -               qlink_free(&info->quarantine_link, cache);
> +               qlink_free(&meta->quarantine_link, cache);
>                 local_irq_restore(flags);
> -               return;
> +               return false;
>         }
>         qlist_put(q, &meta->quarantine_link, cache->size);
>         if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) {
> --
> 2.29.2
>
> --
> Cheers,
> Stephen Rothwell

This fixup looks good to me. Thanks!

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

* linux-next: build failure after merge of the akpm tree
@ 2020-12-03  8:52 Stephen Rothwell
  2020-12-03 12:48 ` Andrey Konovalov
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-12-03  8:52 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Andrey Konovalov, Linux Kernel Mailing List,
	Linux Next Mailing List, Vincenzo Frascino

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

Hi all,

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

mm/kasan/quarantine.c: In function 'quarantine_put':
mm/kasan/quarantine.c:197:15: error: 'info' undeclared (first use in this function)
  197 |   qlink_free(&info->quarantine_link, cache);
      |               ^~~~
mm/kasan/quarantine.c:197:15: note: each undeclared identifier is reported only once for each function it appears in
mm/kasan/quarantine.c:199:3: error: 'return' with no value, in function returning non-void [-Werror=return-type]
  199 |   return;
      |   ^~~~~~
mm/kasan/quarantine.c:171:6: note: declared here
  171 | bool quarantine_put(struct kmem_cache *cache, void *object)
      |      ^~~~~~~~~~~~~~

Caused by patches

  "kasan: rename get_alloc/free_info"
  "kasan: sanitize objects when metadata doesn't fit"

I have applied the following fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 3 Dec 2020 19:41:49 +1100
Subject: [PATCH] kasan-rename-get_alloc-free_info-fix

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

diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
index feae26ea5cbb..d98b516f372f 100644
--- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c
@@ -194,9 +194,9 @@ bool quarantine_put(struct kmem_cache *cache, void *object)
 
 	q = this_cpu_ptr(&cpu_quarantine);
 	if (q->offline) {
-		qlink_free(&info->quarantine_link, cache);
+		qlink_free(&meta->quarantine_link, cache);
 		local_irq_restore(flags);
-		return;
+		return false;
 	}
 	qlist_put(q, &meta->quarantine_link, cache->size);
 	if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) {
-- 
2.29.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-11-15  9:01   ` Mike Rapoport
@ 2020-11-16  6:17     ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-11-16  6:17 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Andrew Morton, Mike Rapoport, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi Mike,

On Sun, 15 Nov 2020 11:01:05 +0200 Mike Rapoport <rppt@kernel.org> wrote:
>
> My preference would be to put the entire function body in '#ifdef
> CONFIG_MEMCG' here.

OK, so today I used this:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 16 Nov 2020 16:55:10 +1100
Subject: [PATCH] secretmem-add-memcg-accounting-fix2

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

diff --git a/mm/secretmem.c b/mm/secretmem.c
index 5ed6b2070136..c7a37b2d01ed 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -59,6 +59,7 @@ bool secretmem_active(void)
 
 static int secretmem_memcg_charge(struct page *page, gfp_t gfp, int order)
 {
+#ifdef CONFIG_MEMCG
 	unsigned long nr_pages = (1 << order);
 	int i, err;
 
@@ -72,11 +73,13 @@ static int secretmem_memcg_charge(struct page *page, gfp_t gfp, int order)
 		p->memcg_data = page->memcg_data;
 	}
 
+#endif
 	return 0;
 }
 
 static void secretmem_memcg_uncharge(struct page *page, int order)
 {
+#ifdef CONFIG_MEMCG
 	unsigned long nr_pages = (1 << order);
 	int i;
 
@@ -87,6 +90,7 @@ static void secretmem_memcg_uncharge(struct page *page, int order)
 	}
 
 	memcg_kmem_uncharge_page(page, PMD_PAGE_ORDER);
+#endif
 }
 
 static int secretmem_pool_increase(struct secretmem_ctx *ctx, gfp_t gfp)
-- 
2.29.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-11-14  1:14 ` Andrew Morton
@ 2020-11-15  9:01   ` Mike Rapoport
  2020-11-16  6:17     ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Mike Rapoport @ 2020-11-15  9:01 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, Mike Rapoport, Linux Kernel Mailing List,
	Linux Next Mailing List

On Fri, Nov 13, 2020 at 05:14:52PM -0800, Andrew Morton wrote:
> On Fri, 13 Nov 2020 18:02:39 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi all,
> > 
> > After merging the akpm tree, today's linux-next build (i386 defconfig)
> > failed like this:
> > 
> > mm/secretmem.c: In function 'secretmem_memcg_charge':
> > mm/secretmem.c:72:4: error: 'struct page' has no member named 'memcg_data'
> >    72 |   p->memcg_data = page->memcg_data;
> >       |    ^~
> > mm/secretmem.c:72:23: error: 'struct page' has no member named 'memcg_data'
> >    72 |   p->memcg_data = page->memcg_data;
> >       |                       ^~
> > mm/secretmem.c: In function 'secretmem_memcg_uncharge':
> > mm/secretmem.c:86:4: error: 'struct page' has no member named 'memcg_data'
> >    86 |   p->memcg_data = 0;
> >       |    ^~
> > 
> > ...
> >
> > --- a/mm/secretmem.c
> > +++ b/mm/secretmem.c
> > @@ -69,7 +69,9 @@ static int secretmem_memcg_charge(struct page *page, gfp_t gfp, int order)
> >  	for (i = 1; i < nr_pages; i++) {
> >  		struct page *p = page + i;
> >  
> > +#ifdef CONFIG_MEMCG
> >  		p->memcg_data = page->memcg_data;
> > +#endif
> >  	}
> >  
> >  	return 0;
> 
> Thanks, that'll work for now.
> 
> I guess we're looking at adding a set_page_memcg() (I'd prefer
> page_memcg_set()).
> 
> But probably these functions shouldn't be compiled at all if
> CONFIG_MEMCG=n.

My preference would be to put the entire function body in '#ifdef
CONFIG_MEMCG' here.

-- 
Sincerely yours,
Mike.

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-11-13  7:02 Stephen Rothwell
@ 2020-11-14  1:14 ` Andrew Morton
  2020-11-15  9:01   ` Mike Rapoport
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2020-11-14  1:14 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mike Rapoport, Mike Rapoport, Linux Kernel Mailing List,
	Linux Next Mailing List

On Fri, 13 Nov 2020 18:02:39 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the akpm tree, today's linux-next build (i386 defconfig)
> failed like this:
> 
> mm/secretmem.c: In function 'secretmem_memcg_charge':
> mm/secretmem.c:72:4: error: 'struct page' has no member named 'memcg_data'
>    72 |   p->memcg_data = page->memcg_data;
>       |    ^~
> mm/secretmem.c:72:23: error: 'struct page' has no member named 'memcg_data'
>    72 |   p->memcg_data = page->memcg_data;
>       |                       ^~
> mm/secretmem.c: In function 'secretmem_memcg_uncharge':
> mm/secretmem.c:86:4: error: 'struct page' has no member named 'memcg_data'
>    86 |   p->memcg_data = 0;
>       |    ^~
> 
> ...
>
> --- a/mm/secretmem.c
> +++ b/mm/secretmem.c
> @@ -69,7 +69,9 @@ static int secretmem_memcg_charge(struct page *page, gfp_t gfp, int order)
>  	for (i = 1; i < nr_pages; i++) {
>  		struct page *p = page + i;
>  
> +#ifdef CONFIG_MEMCG
>  		p->memcg_data = page->memcg_data;
> +#endif
>  	}
>  
>  	return 0;

Thanks, that'll work for now.

I guess we're looking at adding a set_page_memcg() (I'd prefer
page_memcg_set()).

But probably these functions shouldn't be compiled at all if
CONFIG_MEMCG=n.

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

* linux-next: build failure after merge of the akpm tree
@ 2020-11-13  7:02 Stephen Rothwell
  2020-11-14  1:14 ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-11-13  7:02 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mike Rapoport, Mike Rapoport, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

After merging the akpm tree, today's linux-next build (i386 defconfig)
failed like this:

mm/secretmem.c: In function 'secretmem_memcg_charge':
mm/secretmem.c:72:4: error: 'struct page' has no member named 'memcg_data'
   72 |   p->memcg_data = page->memcg_data;
      |    ^~
mm/secretmem.c:72:23: error: 'struct page' has no member named 'memcg_data'
   72 |   p->memcg_data = page->memcg_data;
      |                       ^~
mm/secretmem.c: In function 'secretmem_memcg_uncharge':
mm/secretmem.c:86:4: error: 'struct page' has no member named 'memcg_data'
   86 |   p->memcg_data = 0;
      |    ^~

Caused by commit

  5f964602825e ("secretmem: add memcg accounting")

memcg_data only exists when CONFIG_MEMCG is set.

I have applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 13 Nov 2020 17:50:30 +1100
Subject: [PATCH] secretmem-add-memcg-accounting-fix2

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

diff --git a/mm/secretmem.c b/mm/secretmem.c
index 5ed6b2070136..3dfdbd85ba00 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -69,7 +69,9 @@ static int secretmem_memcg_charge(struct page *page, gfp_t gfp, int order)
 	for (i = 1; i < nr_pages; i++) {
 		struct page *p = page + i;
 
+#ifdef CONFIG_MEMCG
 		p->memcg_data = page->memcg_data;
+#endif
 	}
 
 	return 0;
@@ -83,7 +85,9 @@ static void secretmem_memcg_uncharge(struct page *page, int order)
 	for (i = 1; i < nr_pages; i++) {
 		struct page *p = page + i;
 
+#ifdef CONFIG_MEMCG
 		p->memcg_data = 0;
+#endif
 	}
 
 	memcg_kmem_uncharge_page(page, PMD_PAGE_ORDER);
-- 
2.28.0

This unfortunately produced these warnings:

mm/secretmem.c: In function 'secretmem_memcg_charge':
mm/secretmem.c:70:16: warning: unused variable 'p' [-Wunused-variable]
   70 |   struct page *p = page + i;
      |                ^
mm/secretmem.c: In function 'secretmem_memcg_uncharge':
mm/secretmem.c:86:16: warning: unused variable 'p' [-Wunused-variable]
   86 |   struct page *p = page + i;
      |                ^

which I will fix up for the next linux-next release, if necessary.
-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2020-11-11  6:20 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-11-11  6:20 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

mm/kasan/shadow.c: In function 'kasan_poison_memory':
mm/kasan/shadow.c:88:6: error: implicit declaration of function 'is_kfence_address' [-Werror=implicit-function-declaration]
   88 |  if (is_kfence_address(address))
      |      ^~~~~~~~~~~~~~~~~

Caused by commit

  97f3d663343a ("kasan-split-out-shadowc-from-commonc-fix")

I have applied this fix patch for today:

From e96c5bb419a2042483dcc914750e4e903d73e70e Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 11 Nov 2020 17:16:35 +1100
Subject: [PATCH] kasan-split-out-shadowc-from-commonc-fix2

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/kasan/shadow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/kasan/shadow.c b/mm/kasan/shadow.c
index 1f8d713fa8a3..f45442ef42b1 100644
--- a/mm/kasan/shadow.c
+++ b/mm/kasan/shadow.c
@@ -14,6 +14,7 @@
 #include <linux/kasan.h>
 #include <linux/kernel.h>
 #include <linux/kmemleak.h>
+#include <linux/kfence.h>
 #include <linux/memory.h>
 #include <linux/mm.h>
 #include <linux/string.h>
-- 
2.28.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-09-28 11:25 Stephen Rothwell
@ 2020-09-28 11:29 ` Christoph Hellwig
  0 siblings, 0 replies; 253+ messages in thread
From: Christoph Hellwig @ 2020-09-28 11:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Al Viro, Minchan Kim, Christoph Hellwig,
	Linux Next Mailing List, Linux Kernel Mailing List

Thanks,

the fix looks correct.

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

* linux-next: build failure after merge of the akpm tree
@ 2020-09-28 11:25 Stephen Rothwell
  2020-09-28 11:29 ` Christoph Hellwig
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-09-28 11:25 UTC (permalink / raw)
  To: Andrew Morton, Al Viro
  Cc: Minchan Kim, Christoph Hellwig, Linux Next Mailing List,
	Linux Kernel Mailing List

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

Hi all,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

mm/madvise.c: In function '__do_sys_process_madvise':
mm/madvise.c:1194:9: error: implicit declaration of function 'compat_import_iovec'; did you mean 'import_iovec'? [-Werror=implicit-function-declaration]
 1194 |   ret = compat_import_iovec(READ,
      |         ^~~~~~~~~~~~~~~~~~~
      |         import_iovec

Caused by commits

  b50ef3fed31c ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API")
  84b51d510a77 ("mm: do not use helper functions for process_madvise")

interacting with commit

  e42ff3fae0a2 ("iov_iter: transparently handle compat iovecs in import_iovec")

from the vfs tree.

I have applied the folloing patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 28 Sep 2020 21:14:11 +1000
Subject: [PATCH] fix up for "iov_iter: transparently handle compat iovecs in
 import_iovec"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/madvise.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/mm/madvise.c b/mm/madvise.c
index 935dbc92e626..416a56b8e757 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -7,7 +7,6 @@
  */
 
 #include <linux/mman.h>
-#include <linux/compat.h>
 #include <linux/pagemap.h>
 #include <linux/syscalls.h>
 #include <linux/mempolicy.h>
@@ -1189,15 +1188,7 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
 		goto out;
 	}
 
-#ifdef CONFIG_COMPAT
-	if (in_compat_syscall())
-		ret = compat_import_iovec(READ,
-				(struct compat_iovec __user *)vec, vlen,
-				ARRAY_SIZE(iovstack), &iov, &iter);
-	else
-#endif
-		ret = import_iovec(READ, vec, vlen, ARRAY_SIZE(iovstack),
-				&iov, &iter);
+	ret = import_iovec(READ, vec, vlen, ARRAY_SIZE(iovstack), &iov, &iter);
 	if (ret < 0)
 		goto out;
 
-- 
2.28.0

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2020-09-08 10:45 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-09-08 10:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Minchan Kim, Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

mm/madvise.c: In function 'madv_import_iovec':
mm/madvise.c:1233:6: error: implicit declaration of function 'in_compat_syscall' [-Werror=implicit-function-declaration]
 1233 |  if (in_compat_syscall())
      |      ^~~~~~~~~~~~~~~~~

Caused by commit

  6d0ecd769ce2 ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API")

I added the following fix up patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 8 Sep 2020 20:40:44 +1000
Subject: [PATCH] fix for "mm/madvise: introduce process_madvise() syscall: an
 external memory hinting API"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/madvise.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/madvise.c b/mm/madvise.c
index 3c0d23872330..c5acc2b1b1d9 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -7,6 +7,7 @@
  */
 
 #include <linux/mman.h>
+#include <linux/compat.h>
 #include <linux/pagemap.h>
 #include <linux/syscalls.h>
 #include <linux/mempolicy.h>
-- 
2.28.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-06-04  6:44 Stephen Rothwell
@ 2020-06-04  8:24 ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-06-04  8:24 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Michael Ellerman

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

Hi all,

On Thu, 4 Jun 2020 16:44:42 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> arch/powerpc/mm/ptdump/ptdump.c: In function 'walk_pagetables':
> arch/powerpc/mm/ptdump/ptdump.c:337:25: error: implicit declaration of function 'pgd_is_leaf'; did you mean 'p4d_is_leaf'? [-Werror=implicit-function-declaration]
>   337 |   if (pgd_none(*pgd) || pgd_is_leaf(*pgd))
>       |                         ^~~~~~~~~~~
>       |                         p4d_is_leaf
> 
> Caused by commit
> 
>    "powerpc: add support for folded p4d page tables"
> 
> I applied the following fix up patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 4 Jun 2020 16:33:01 +1000
> Subject: [PATCH] fixup for powerpc ptdump.c
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/mm/ptdump/ptdump.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c
> index 9b1c89b05622..de6e05ef871c 100644
> --- a/arch/powerpc/mm/ptdump/ptdump.c
> +++ b/arch/powerpc/mm/ptdump/ptdump.c
> @@ -334,12 +334,12 @@ static void walk_pagetables(struct pg_state *st)
>  	for (i = pgd_index(addr); i < PTRS_PER_PGD; i++, pgd++, addr += PGDIR_SIZE) {
>  		p4d_t *p4d = p4d_offset(pgd, 0);
>  
> -		if (pgd_none(*pgd) || pgd_is_leaf(*pgd))
> +		if (p4d_none(*p4d) || p4d_is_leaf(*p4d))
>  			note_page(st, addr, 1, p4d_val(*p4d), PGDIR_SIZE);
>  		else if (is_hugepd(__hugepd(p4d_val(*p4d))))
> -			walk_hugepd(st, (hugepd_t *)pgd, addr, PGDIR_SHIFT, 1);
> +			walk_hugepd(st, (hugepd_t *)p4d, addr, PGDIR_SHIFT, 1);
>  		else
> -			/* pgd exists */
> +			/* p4d exists */
>  			walk_pud(st, p4d, addr);
>  	}
>  }
>

I have put that in linux-next (for tomorrow) as a fix up for
powerpc-add-support-for-folded-p4d-page-tables.

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2020-06-04  6:44 Stephen Rothwell
  2020-06-04  8:24 ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-06-04  6:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Michael Ellerman

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

Hi all,

After merging the akpm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

arch/powerpc/mm/ptdump/ptdump.c: In function 'walk_pagetables':
arch/powerpc/mm/ptdump/ptdump.c:337:25: error: implicit declaration of function 'pgd_is_leaf'; did you mean 'p4d_is_leaf'? [-Werror=implicit-function-declaration]
  337 |   if (pgd_none(*pgd) || pgd_is_leaf(*pgd))
      |                         ^~~~~~~~~~~
      |                         p4d_is_leaf

Caused by commit

   "powerpc: add support for folded p4d page tables"

I applied the following fix up patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 4 Jun 2020 16:33:01 +1000
Subject: [PATCH] fixup for powerpc ptdump.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/mm/ptdump/ptdump.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c
index 9b1c89b05622..de6e05ef871c 100644
--- a/arch/powerpc/mm/ptdump/ptdump.c
+++ b/arch/powerpc/mm/ptdump/ptdump.c
@@ -334,12 +334,12 @@ static void walk_pagetables(struct pg_state *st)
 	for (i = pgd_index(addr); i < PTRS_PER_PGD; i++, pgd++, addr += PGDIR_SIZE) {
 		p4d_t *p4d = p4d_offset(pgd, 0);
 
-		if (pgd_none(*pgd) || pgd_is_leaf(*pgd))
+		if (p4d_none(*p4d) || p4d_is_leaf(*p4d))
 			note_page(st, addr, 1, p4d_val(*p4d), PGDIR_SIZE);
 		else if (is_hugepd(__hugepd(p4d_val(*p4d))))
-			walk_hugepd(st, (hugepd_t *)pgd, addr, PGDIR_SHIFT, 1);
+			walk_hugepd(st, (hugepd_t *)p4d, addr, PGDIR_SHIFT, 1);
 		else
-			/* pgd exists */
+			/* p4d exists */
 			walk_pud(st, p4d, addr);
 	}
 }
-- 
2.26.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-06-02  9:57 Stephen Rothwell
@ 2020-06-02 19:12 ` Andrew Morton
  0 siblings, 0 replies; 253+ messages in thread
From: Andrew Morton @ 2020-06-02 19:12 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Christoph Hellwig

On Tue, 2 Jun 2020 19:57:41 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Subject: [PATCH] turns out that probe_user_write is used in modular code
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  mm/maccess.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/maccess.c b/mm/maccess.c
> index ddfda8e6f4a5..88845eda5047 100644
> --- a/mm/maccess.c
> +++ b/mm/maccess.c
> @@ -246,6 +246,7 @@ long probe_user_write(void __user *dst, const void *src, size_t size)
>  		return -EFAULT;
>  	return 0;
>  }
> +EXPORT_SYMBOL_GPL(probe_user_write);

Thanks, I shall squish that in and make the appropriate changelog update.

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

* linux-next: build failure after merge of the akpm tree
@ 2020-06-02  9:57 Stephen Rothwell
  2020-06-02 19:12 ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-06-02  9:57 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Christoph Hellwig

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

Hi all,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

ERROR: modpost: ".probe_user_write" [arch/powerpc/kvm/kvm-hv.ko] undefined!

Caused by patch

  "maccess: unexport probe_kernel_write and probe_user_write"

"These two functions are not used by any modular code." turns out to
not be true :-(

I have added this patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 2 Jun 2020 19:54:05 +1000
Subject: [PATCH] turns out that probe_user_write is used in modular code

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/maccess.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/maccess.c b/mm/maccess.c
index ddfda8e6f4a5..88845eda5047 100644
--- a/mm/maccess.c
+++ b/mm/maccess.c
@@ -246,6 +246,7 @@ long probe_user_write(void __user *dst, const void *src, size_t size)
 		return -EFAULT;
 	return 0;
 }
+EXPORT_SYMBOL_GPL(probe_user_write);
 
 /**
  * strncpy_from_user_nofault: - Copy a NUL terminated string from unsafe user
-- 
2.26.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-05-28 10:19 Stephen Rothwell
@ 2020-05-28 13:15 ` Christoph Hellwig
  0 siblings, 0 replies; 253+ messages in thread
From: Christoph Hellwig @ 2020-05-28 13:15 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Alex Deucher, Linux Next Mailing List,
	Linux Kernel Mailing List, Mukul Joshi, Christoph Hellwig

This looks correct, thanks.

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

* linux-next: build failure after merge of the akpm tree
@ 2020-05-28 10:19 Stephen Rothwell
  2020-05-28 13:15 ` Christoph Hellwig
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-05-28 10:19 UTC (permalink / raw)
  To: Andrew Morton, Alex Deucher
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Mukul Joshi,
	Christoph Hellwig

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

Hi all,

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

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c: In function 'kfd_sdma_activity_worker':
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:117:2: error: implicit declaration of function 'use_mm' [-Werror=implicit-function-declaration]
  117 |  use_mm(mm);
      |  ^~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:144:2: error: implicit declaration of function 'unuse_mm' [-Werror=implicit-function-declaration]
  144 |  unuse_mm(mm);
      |  ^~~~~~~~

Caused by commit

  d21760f76006 ("kernel: better document the use_mm/unuse_mm API contract")

interacting with commit

  522b89c63370 ("drm/amdkfd: Track SDMA utilization per process")

from the amdgpu tree.

I have added the following patch for today:

rom: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 28 May 2020 20:15:34 +1000
Subject: [PATCH] drm/amdkfd: fix up for {un}use_mm() rename

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index db010c5da144..25636789f3d3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -114,7 +114,7 @@ static void kfd_sdma_activity_worker(struct work_struct *work)
 		return;
 	}
 
-	use_mm(mm);
+	kthread_use_mm(mm);
 
 	dqm_lock(dqm);
 
@@ -141,7 +141,7 @@ static void kfd_sdma_activity_worker(struct work_struct *work)
 	}
 
 	dqm_unlock(dqm);
-	unuse_mm(mm);
+	kthread_unuse_mm(mm);
 	mmput(mm);
 }
 
-- 
2.26.2

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-04-22  6:39 Stephen Rothwell
@ 2020-04-22 18:33 ` Haren Myneni
  0 siblings, 0 replies; 253+ messages in thread
From: Haren Myneni @ 2020-04-22 18:33 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton, Michael Ellerman, PowerPC
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Christoph Hellwig


Thanks for fixing. Tested with this patch and 7fe021a3f1c9 ("kernel: better document the use_mm/unuse_mm API contract"). 

Acked-by: Haren Myneni <haren@linux.ibm.com>

On 4/21/20 11:39 PM, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> arch/powerpc/platforms/powernv/vas-fault.c: In function 'update_csb':
> arch/powerpc/platforms/powernv/vas-fault.c:130:2: error: implicit declaration of function 'use_mm' [-Werror=implicit-function-declaration]
>   130 |  use_mm(window->mm);
>       |  ^~~~~~
> arch/powerpc/platforms/powernv/vas-fault.c:142:2: error: implicit declaration of function 'unuse_mm' [-Werror=implicit-function-declaration]
>   142 |  unuse_mm(window->mm);
>       |  ^~~~~~~~
> 
> Caused by commit
> 
>   7fe021a3f1c9 ("kernel: better document the use_mm/unuse_mm API contract")
> 
> interacting with commit
> 
>   c96c4436aba4 ("powerpc/vas: Update CSB and notify process for fault CRBs")
> 
> from the powerpc tree.
> 
> I added the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 22 Apr 2020 16:35:23 +1000
> Subject: [PATCH] powerpc/vas: fix up for {un}use_mm() rename
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/platforms/powernv/vas-fault.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/vas-fault.c b/arch/powerpc/platforms/powernv/vas-fault.c
> index 25db70be4c9c..266a6ca5e15e 100644
> --- a/arch/powerpc/platforms/powernv/vas-fault.c
> +++ b/arch/powerpc/platforms/powernv/vas-fault.c
> @@ -127,7 +127,7 @@ static void update_csb(struct vas_window *window,
>  		return;
>  	}
>  
> -	use_mm(window->mm);
> +	kthread_use_mm(window->mm);
>  	rc = copy_to_user(csb_addr, &csb, sizeof(csb));
>  	/*
>  	 * User space polls on csb.flags (first byte). So add barrier
> @@ -139,7 +139,7 @@ static void update_csb(struct vas_window *window,
>  		smp_mb();
>  		rc = copy_to_user(csb_addr, &csb, sizeof(u8));
>  	}
> -	unuse_mm(window->mm);
> +	kthread_unuse_mm(window->mm);
>  	put_task_struct(tsk);
>  
>  	/* Success */
> 

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

* linux-next: build failure after merge of the akpm tree
@ 2020-04-22  6:39 Stephen Rothwell
  2020-04-22 18:33 ` Haren Myneni
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-04-22  6:39 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, PowerPC
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Christoph Hellwig, Haren Myneni

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

Hi all,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/platforms/powernv/vas-fault.c: In function 'update_csb':
arch/powerpc/platforms/powernv/vas-fault.c:130:2: error: implicit declaration of function 'use_mm' [-Werror=implicit-function-declaration]
  130 |  use_mm(window->mm);
      |  ^~~~~~
arch/powerpc/platforms/powernv/vas-fault.c:142:2: error: implicit declaration of function 'unuse_mm' [-Werror=implicit-function-declaration]
  142 |  unuse_mm(window->mm);
      |  ^~~~~~~~

Caused by commit

  7fe021a3f1c9 ("kernel: better document the use_mm/unuse_mm API contract")

interacting with commit

  c96c4436aba4 ("powerpc/vas: Update CSB and notify process for fault CRBs")

from the powerpc tree.

I added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 22 Apr 2020 16:35:23 +1000
Subject: [PATCH] powerpc/vas: fix up for {un}use_mm() rename

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/platforms/powernv/vas-fault.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/vas-fault.c b/arch/powerpc/platforms/powernv/vas-fault.c
index 25db70be4c9c..266a6ca5e15e 100644
--- a/arch/powerpc/platforms/powernv/vas-fault.c
+++ b/arch/powerpc/platforms/powernv/vas-fault.c
@@ -127,7 +127,7 @@ static void update_csb(struct vas_window *window,
 		return;
 	}
 
-	use_mm(window->mm);
+	kthread_use_mm(window->mm);
 	rc = copy_to_user(csb_addr, &csb, sizeof(csb));
 	/*
 	 * User space polls on csb.flags (first byte). So add barrier
@@ -139,7 +139,7 @@ static void update_csb(struct vas_window *window,
 		smp_mb();
 		rc = copy_to_user(csb_addr, &csb, sizeof(u8));
 	}
-	unuse_mm(window->mm);
+	kthread_unuse_mm(window->mm);
 	put_task_struct(tsk);
 
 	/* Success */
-- 
2.25.1

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2020-03-02  4:23 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-03-02  4:23 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Mike Rapoport, Paul Mackerras

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

Hi all,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/kvm/book3s_64_mmu_radix.c: In function 'debugfs_radix_read':
arch/powerpc/kvm/book3s_64_mmu_radix.c:1226:8: error: unused variable 'pgd' [-Werror=unused-variable]
 1226 |  pgd_t pgd, *pgdp;
      |        ^~~
cc1: all warnings being treated as errors

Caused by commit

  cad54c147231 ("powerpc: add support for folded p4d page tables")

I applied the following fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 2 Mar 2020 15:19:40 +1100
Subject: [PATCH] fix for "powerpc: add support for folded p4d page tables"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c
index beb694285100..3fb598659420 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_radix.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c
@@ -1223,7 +1223,7 @@ static ssize_t debugfs_radix_read(struct file *file, char __user *buf,
 	unsigned long gpa;
 	pgd_t *pgt;
 	struct kvm_nested_guest *nested;
-	pgd_t pgd, *pgdp;
+	pgd_t *pgdp;
 	p4d_t p4d, *p4dp;
 	pud_t pud, *pudp;
 	pmd_t pmd, *pmdp;
-- 
2.25.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-28  0:34             ` Arjun Roy
@ 2020-02-28  0:59               ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-28  0:59 UTC (permalink / raw)
  To: Arjun Roy
  Cc: Geert Uytterhoeven, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller, Soheil Hassas Yeganeh

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

Hi Arjun,

On Thu, 27 Feb 2020 16:34:48 -0800 Arjun Roy <arjunroy@google.com> wrote:
>
> Agreed on sparc64; I think the sparc32 patch ought to be reverted,
> though (since pte_index may be meaningless to it).

Agreed.

I will replace the sparc32 patch with your new ones in today's
linux-next.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27 21:28           ` Stephen Rothwell
@ 2020-02-28  0:34             ` Arjun Roy
  2020-02-28  0:59               ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Arjun Roy @ 2020-02-28  0:34 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Geert Uytterhoeven, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller, Soheil Hassas Yeganeh

On Thu, Feb 27, 2020 at 1:28 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Arjun,
>
> On Thu, 27 Feb 2020 10:50:51 -0800 Arjun Roy <arjunroy@google.com> wrote:
> >
> > On Thu, Feb 27, 2020 at 9:57 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >
> > Sounds good, thanks. I'll cook up a patch and send it along.
>
> You will need to keep the sparc64 patch to correct pte_index in this case.
>
Agreed on sparc64; I think the sparc32 patch ought to be reverted,
though (since pte_index may be meaningless to it).

Thanks,
-Arjun

> --
> Cheers,
> Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27 18:50         ` Arjun Roy
@ 2020-02-27 21:28           ` Stephen Rothwell
  2020-02-28  0:34             ` Arjun Roy
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-27 21:28 UTC (permalink / raw)
  To: Arjun Roy
  Cc: Geert Uytterhoeven, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller, Soheil Hassas Yeganeh

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

Hi Arjun,

On Thu, 27 Feb 2020 10:50:51 -0800 Arjun Roy <arjunroy@google.com> wrote:
>
> On Thu, Feb 27, 2020 at 9:57 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> Sounds good, thanks. I'll cook up a patch and send it along.

You will need to keep the sparc64 patch to correct pte_index in this case.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27 17:57       ` Geert Uytterhoeven
  2020-02-27 18:50         ` Arjun Roy
@ 2020-02-27 21:27         ` Stephen Rothwell
  1 sibling, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-27 21:27 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arjun Roy, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller, Soheil Hassas Yeganeh

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

Hi Geert,

On Thu, 27 Feb 2020 18:57:26 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> pte_index is already a #define on architectures where it exists, so
> you can just use that.

Except for x86 which has a static inline function and so will require
#define pte_index pte_index added in arch/x86/include/asm/pgtable.h.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27 17:57       ` Geert Uytterhoeven
@ 2020-02-27 18:50         ` Arjun Roy
  2020-02-27 21:28           ` Stephen Rothwell
  2020-02-27 21:27         ` Stephen Rothwell
  1 sibling, 1 reply; 253+ messages in thread
From: Arjun Roy @ 2020-02-27 18:50 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Stephen Rothwell, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller, Soheil Hassas Yeganeh

On Thu, Feb 27, 2020 at 9:57 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Arjun,
>
> On Thu, Feb 27, 2020 at 6:45 PM Arjun Roy <arjunroy@google.com> wrote:
> > On Thu, Feb 27, 2020 at 9:13 AM Arjun Roy <arjunroy@google.com> wrote:
> > > On Thu, Feb 27, 2020 at 1:03 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > On Thu, Feb 27, 2020 at 5:12 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > > After merging the akpm tree, today's linux-next build (sparc defconfig)
> > > > > failed like this:
> > > > >
> > > > > In file included from include/linux/list.h:9:0,
> > > > >                  from include/linux/smp.h:12,
> > > > >                  from include/linux/kernel_stat.h:5,
> > > > >                  from mm/memory.c:42:
> > > > > mm/memory.c: In function 'insert_pages':
> > > > > mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
> > > > >    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
> > > > >                                          ^
> > > > > include/linux/kernel.h:842:40: note: in definition of macro '__typecheck'
> > > > >    (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
> > > > >                                         ^
> > > > > include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
> > > > >   __builtin_choose_expr(__safe_cmp(x, y), \
> > > > >                         ^~~~~~~~~~
> > > > > include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp'
> > > > >  #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
> > > > >                            ^~~~~~~~~~~~~
> > > > > mm/memory.c:1522:26: note: in expansion of macro 'min_t'
> > > > >   pages_to_write_in_pmd = min_t(unsigned long,
> > > > >                           ^~~~~
> > > >
> > > > Same issue on m68k, as per a report from kisskb.
> > > >
> > > > > Caused by patch
> > > > >
> > > > >   "mm/memory.c: add vm_insert_pages()"
> > > > >
> > > > > sparc32 does not implement pte_index at all :-(
> > > >
> > > > Seems like about only half of the architectures do.
> > > >
> > >
> > > :/ I begin to suspect the only sane way to make this work is to have a
> > > per-arch header defined method, returning a bool saying whether
> > > pte_index() is meaningful or not on that arch, and early on in
> > > vm_insert_pages() if that bool returns true, to just call
> > > vm_insert_page() in a loop.
> > >
> >
> > So, here is what I propose: something like the following macro in a
> > per-arch header:
> >
> > #define PTE_INDEX_DEFINED 1 // or 0 if it is not
>
> pte_index is already a #define on architectures where it exists, so
> you can just use that.
>
> > In mm/memory.c, another macro:
> >
> > #ifndef PTE_INDEX_DEFINED
> > #define PTE_INDEX_DEFINED 0
> > #endifndef
>
> No need for the above...
>
> > And inside vm_insert_pages:
> >
> > int vm_insert_pages() {
> >
> > #if PTE_INDEX_DEFINED
>
> ... if you use "#ifdef" here.
>

Sounds good, thanks. I'll cook up a patch and send it along.

-Arjun

> >
> > // The existing method
> >
> > #else
> >
> > for (i=0; i<n; ++i)
> >         vm_insert_page(i)
> >
> > #endif
> > }
> >
> > That way:
> > 1. No playing whack-a-mole with different architectures
> > 2. Architecture that knows pte_index is meaningful works can define
> > this explicitly
> > 3. Can remove the sparc patches modifying pte_index that Stephen and I
> > contributed.
> >
> > If that sounds acceptable I can cook a patch.
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27 17:44     ` Arjun Roy
@ 2020-02-27 17:57       ` Geert Uytterhoeven
  2020-02-27 18:50         ` Arjun Roy
  2020-02-27 21:27         ` Stephen Rothwell
  0 siblings, 2 replies; 253+ messages in thread
From: Geert Uytterhoeven @ 2020-02-27 17:57 UTC (permalink / raw)
  To: Arjun Roy
  Cc: Stephen Rothwell, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller, Soheil Hassas Yeganeh

Hi Arjun,

On Thu, Feb 27, 2020 at 6:45 PM Arjun Roy <arjunroy@google.com> wrote:
> On Thu, Feb 27, 2020 at 9:13 AM Arjun Roy <arjunroy@google.com> wrote:
> > On Thu, Feb 27, 2020 at 1:03 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Thu, Feb 27, 2020 at 5:12 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > After merging the akpm tree, today's linux-next build (sparc defconfig)
> > > > failed like this:
> > > >
> > > > In file included from include/linux/list.h:9:0,
> > > >                  from include/linux/smp.h:12,
> > > >                  from include/linux/kernel_stat.h:5,
> > > >                  from mm/memory.c:42:
> > > > mm/memory.c: In function 'insert_pages':
> > > > mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
> > > >    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
> > > >                                          ^
> > > > include/linux/kernel.h:842:40: note: in definition of macro '__typecheck'
> > > >    (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
> > > >                                         ^
> > > > include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
> > > >   __builtin_choose_expr(__safe_cmp(x, y), \
> > > >                         ^~~~~~~~~~
> > > > include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp'
> > > >  #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
> > > >                            ^~~~~~~~~~~~~
> > > > mm/memory.c:1522:26: note: in expansion of macro 'min_t'
> > > >   pages_to_write_in_pmd = min_t(unsigned long,
> > > >                           ^~~~~
> > >
> > > Same issue on m68k, as per a report from kisskb.
> > >
> > > > Caused by patch
> > > >
> > > >   "mm/memory.c: add vm_insert_pages()"
> > > >
> > > > sparc32 does not implement pte_index at all :-(
> > >
> > > Seems like about only half of the architectures do.
> > >
> >
> > :/ I begin to suspect the only sane way to make this work is to have a
> > per-arch header defined method, returning a bool saying whether
> > pte_index() is meaningful or not on that arch, and early on in
> > vm_insert_pages() if that bool returns true, to just call
> > vm_insert_page() in a loop.
> >
>
> So, here is what I propose: something like the following macro in a
> per-arch header:
>
> #define PTE_INDEX_DEFINED 1 // or 0 if it is not

pte_index is already a #define on architectures where it exists, so
you can just use that.

> In mm/memory.c, another macro:
>
> #ifndef PTE_INDEX_DEFINED
> #define PTE_INDEX_DEFINED 0
> #endifndef

No need for the above...

> And inside vm_insert_pages:
>
> int vm_insert_pages() {
>
> #if PTE_INDEX_DEFINED

... if you use "#ifdef" here.

>
> // The existing method
>
> #else
>
> for (i=0; i<n; ++i)
>         vm_insert_page(i)
>
> #endif
> }
>
> That way:
> 1. No playing whack-a-mole with different architectures
> 2. Architecture that knows pte_index is meaningful works can define
> this explicitly
> 3. Can remove the sparc patches modifying pte_index that Stephen and I
> contributed.
>
> If that sounds acceptable I can cook a patch.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27 17:13   ` Arjun Roy
@ 2020-02-27 17:44     ` Arjun Roy
  2020-02-27 17:57       ` Geert Uytterhoeven
  0 siblings, 1 reply; 253+ messages in thread
From: Arjun Roy @ 2020-02-27 17:44 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Stephen Rothwell, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller, Soheil Hassas Yeganeh

On Thu, Feb 27, 2020 at 9:13 AM Arjun Roy <arjunroy@google.com> wrote:
>
> On Thu, Feb 27, 2020 at 1:03 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >
> > Hi Stephen et al,
> >
> > On Thu, Feb 27, 2020 at 5:12 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > After merging the akpm tree, today's linux-next build (sparc defconfig)
> > > failed like this:
> > >
> > > In file included from include/linux/list.h:9:0,
> > >                  from include/linux/smp.h:12,
> > >                  from include/linux/kernel_stat.h:5,
> > >                  from mm/memory.c:42:
> > > mm/memory.c: In function 'insert_pages':
> > > mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
> > >    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
> > >                                          ^
> > > include/linux/kernel.h:842:40: note: in definition of macro '__typecheck'
> > >    (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
> > >                                         ^
> > > include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
> > >   __builtin_choose_expr(__safe_cmp(x, y), \
> > >                         ^~~~~~~~~~
> > > include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp'
> > >  #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
> > >                            ^~~~~~~~~~~~~
> > > mm/memory.c:1522:26: note: in expansion of macro 'min_t'
> > >   pages_to_write_in_pmd = min_t(unsigned long,
> > >                           ^~~~~
> >
> > Same issue on m68k, as per a report from kisskb.
> >
> > > Caused by patch
> > >
> > >   "mm/memory.c: add vm_insert_pages()"
> > >
> > > sparc32 does not implement pte_index at all :-(
> >
> > Seems like about only half of the architectures do.
> >
>
> :/ I begin to suspect the only sane way to make this work is to have a
> per-arch header defined method, returning a bool saying whether
> pte_index() is meaningful or not on that arch, and early on in
> vm_insert_pages() if that bool returns true, to just call
> vm_insert_page() in a loop.
>

So, here is what I propose: something like the following macro in a
per-arch header:

#define PTE_INDEX_DEFINED 1 // or 0 if it is not

In mm/memory.c, another macro:

#ifndef PTE_INDEX_DEFINED
#define PTE_INDEX_DEFINED 0
#endifndef

And inside vm_insert_pages:

int vm_insert_pages() {

#if PTE_INDEX_DEFINED

// The existing method

#else

for (i=0; i<n; ++i)
        vm_insert_page(i)

#endif
}

That way:
1. No playing whack-a-mole with different architectures
2. Architecture that knows pte_index is meaningful works can define
this explicitly
3. Can remove the sparc patches modifying pte_index that Stephen and I
contributed.

If that sounds acceptable I can cook a patch.

Thanks,
-Arjun

> -Arjun
>
> > Gr{oetje,eeting}s,
> >
> >                         Geert
> >
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> >
> > In personal conversations with technical people, I call myself a hacker. But
> > when I'm talking to journalists I just say "programmer" or something like that.
> >                                 -- Linus Torvalds

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27  9:02 ` Geert Uytterhoeven
@ 2020-02-27 17:13   ` Arjun Roy
  2020-02-27 17:44     ` Arjun Roy
  0 siblings, 1 reply; 253+ messages in thread
From: Arjun Roy @ 2020-02-27 17:13 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Stephen Rothwell, Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

On Thu, Feb 27, 2020 at 1:03 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Stephen et al,
>
> On Thu, Feb 27, 2020 at 5:12 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > After merging the akpm tree, today's linux-next build (sparc defconfig)
> > failed like this:
> >
> > In file included from include/linux/list.h:9:0,
> >                  from include/linux/smp.h:12,
> >                  from include/linux/kernel_stat.h:5,
> >                  from mm/memory.c:42:
> > mm/memory.c: In function 'insert_pages':
> > mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
> >    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
> >                                          ^
> > include/linux/kernel.h:842:40: note: in definition of macro '__typecheck'
> >    (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
> >                                         ^
> > include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
> >   __builtin_choose_expr(__safe_cmp(x, y), \
> >                         ^~~~~~~~~~
> > include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp'
> >  #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
> >                            ^~~~~~~~~~~~~
> > mm/memory.c:1522:26: note: in expansion of macro 'min_t'
> >   pages_to_write_in_pmd = min_t(unsigned long,
> >                           ^~~~~
>
> Same issue on m68k, as per a report from kisskb.
>
> > Caused by patch
> >
> >   "mm/memory.c: add vm_insert_pages()"
> >
> > sparc32 does not implement pte_index at all :-(
>
> Seems like about only half of the architectures do.
>

:/ I begin to suspect the only sane way to make this work is to have a
per-arch header defined method, returning a bool saying whether
pte_index() is meaningful or not on that arch, and early on in
vm_insert_pages() if that bool returns true, to just call
vm_insert_page() in a loop.

-Arjun

> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27  4:11 Stephen Rothwell
  2020-02-27  5:20 ` Arjun Roy
@ 2020-02-27  9:02 ` Geert Uytterhoeven
  2020-02-27 17:13   ` Arjun Roy
  1 sibling, 1 reply; 253+ messages in thread
From: Geert Uytterhoeven @ 2020-02-27  9:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, Arjun Roy, David Miller

Hi Stephen et al,

On Thu, Feb 27, 2020 at 5:12 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> After merging the akpm tree, today's linux-next build (sparc defconfig)
> failed like this:
>
> In file included from include/linux/list.h:9:0,
>                  from include/linux/smp.h:12,
>                  from include/linux/kernel_stat.h:5,
>                  from mm/memory.c:42:
> mm/memory.c: In function 'insert_pages':
> mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
>    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
>                                          ^
> include/linux/kernel.h:842:40: note: in definition of macro '__typecheck'
>    (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
>                                         ^
> include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
>   __builtin_choose_expr(__safe_cmp(x, y), \
>                         ^~~~~~~~~~
> include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp'
>  #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
>                            ^~~~~~~~~~~~~
> mm/memory.c:1522:26: note: in expansion of macro 'min_t'
>   pages_to_write_in_pmd = min_t(unsigned long,
>                           ^~~~~

Same issue on m68k, as per a report from kisskb.

> Caused by patch
>
>   "mm/memory.c: add vm_insert_pages()"
>
> sparc32 does not implement pte_index at all :-(

Seems like about only half of the architectures do.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-27  4:11 Stephen Rothwell
@ 2020-02-27  5:20 ` Arjun Roy
  2020-02-27  9:02 ` Geert Uytterhoeven
  1 sibling, 0 replies; 253+ messages in thread
From: Arjun Roy @ 2020-02-27  5:20 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

On Wed, Feb 26, 2020 at 8:11 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the akpm tree, today's linux-next build (sparc defconfig)
> failed like this:
>
> In file included from include/linux/list.h:9:0,
>                  from include/linux/smp.h:12,
>                  from include/linux/kernel_stat.h:5,
>                  from mm/memory.c:42:
> mm/memory.c: In function 'insert_pages':
> mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
>    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
>                                          ^
> include/linux/kernel.h:842:40: note: in definition of macro '__typecheck'
>    (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
>                                         ^
> include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
>   __builtin_choose_expr(__safe_cmp(x, y), \
>                         ^~~~~~~~~~
> include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp'
>  #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
>                            ^~~~~~~~~~~~~
> mm/memory.c:1522:26: note: in expansion of macro 'min_t'
>   pages_to_write_in_pmd = min_t(unsigned long,
>                           ^~~~~
>
> Caused by patch
>
>   "mm/memory.c: add vm_insert_pages()"
>
> sparc32 does not implement pte_index at all :-(
>
> I have added the following patch for today.  This may not be correct
> or enough.
>

Thank you for the patch. I still do not have much/any knowledge about
sparc in Linux, so will have to defer to those who know more. :(

-Arjun

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 27 Feb 2020 14:57:49 +1100
> Subject: [PATCH] arch/sparc: add a definition of pte_index for the 32 bit kernel
>
> This is now needed for vm_insert_pages()
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sparc/include/asm/pgtable_32.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
> index 6d6f44c0cad9..dc7a4d69cb18 100644
> --- a/arch/sparc/include/asm/pgtable_32.h
> +++ b/arch/sparc/include/asm/pgtable_32.h
> @@ -326,6 +326,8 @@ static inline pmd_t *pmd_offset(pud_t * dir, unsigned long address)
>  }
>
>  /* Find an entry in the third-level page table.. */
> +#define pte_index(address)     \
> +        ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
>  pte_t *pte_offset_kernel(pmd_t * dir, unsigned long address);
>
>  /*
> --
> 2.25.0
>
> --
> Cheers,
> Stephen Rothwell

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

* linux-next: build failure after merge of the akpm tree
@ 2020-02-27  4:11 Stephen Rothwell
  2020-02-27  5:20 ` Arjun Roy
  2020-02-27  9:02 ` Geert Uytterhoeven
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-27  4:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Arjun Roy,
	David Miller

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

Hi all,

After merging the akpm tree, today's linux-next build (sparc defconfig)
failed like this:

In file included from include/linux/list.h:9:0,
                 from include/linux/smp.h:12,
                 from include/linux/kernel_stat.h:5,
                 from mm/memory.c:42:
mm/memory.c: In function 'insert_pages':
mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration]
   remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
                                         ^
include/linux/kernel.h:842:40: note: in definition of macro '__typecheck'
   (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                                        ^
include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp'
  __builtin_choose_expr(__safe_cmp(x, y), \
                        ^~~~~~~~~~
include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp'
 #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
                           ^~~~~~~~~~~~~
mm/memory.c:1522:26: note: in expansion of macro 'min_t'
  pages_to_write_in_pmd = min_t(unsigned long,
                          ^~~~~

Caused by patch

  "mm/memory.c: add vm_insert_pages()"

sparc32 does not implement pte_index at all :-(

I have added the following patch for today.  This may not be correct
or enough.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 27 Feb 2020 14:57:49 +1100
Subject: [PATCH] arch/sparc: add a definition of pte_index for the 32 bit kernel

This is now needed for vm_insert_pages()

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/include/asm/pgtable_32.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index 6d6f44c0cad9..dc7a4d69cb18 100644
--- a/arch/sparc/include/asm/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -326,6 +326,8 @@ static inline pmd_t *pmd_offset(pud_t * dir, unsigned long address)
 }
 
 /* Find an entry in the third-level page table.. */
+#define pte_index(address)	\
+	 ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 pte_t *pte_offset_kernel(pmd_t * dir, unsigned long address);
 
 /*
-- 
2.25.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-26  4:02 ` Stephen Rothwell
@ 2020-02-26  4:25   ` Arjun Roy
  0 siblings, 0 replies; 253+ messages in thread
From: Arjun Roy @ 2020-02-26  4:25 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

On Tue, Feb 25, 2020 at 8:02 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> On Mon, 17 Feb 2020 14:57:11 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> > failed like this:
> >
> > mm/memory.c: In function 'insert_pages':
> > mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given
> >    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
> >                                                         ^
> >
> > Caused by commit
> >
> >   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
> >
> > This is the first use of pte_index() outside arch specific code and the
> > sparc64 version of pte_index() nas an extra argument.
> >
> > I have reverted these commits for today:
> >
> >   219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")
> >   cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy")
> >   72c684430b94 ("add missing page_count() check to vm_insert_pages().")
> >   dbd9553775f3 ("mm-add-vm_insert_pages-fix")
> >   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
>
> This failure is now in the akpm tree (it was previously in the
> skpm-current tree) but I am still reverting the same patches (though
> they are now slightly different).
>

Ack, and they will continue to fail till my fixup patch for sparc64 is
merged (it's already out for review).

-Arjun

> --
> Cheers,
> Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-17  3:57 Stephen Rothwell
  2020-02-17  4:12 ` Arjun Roy
@ 2020-02-26  4:02 ` Stephen Rothwell
  2020-02-26  4:25   ` Arjun Roy
  1 sibling, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-26  4:02 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Arjun Roy,
	David Miller

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

Hi all,

On Mon, 17 Feb 2020 14:57:11 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> mm/memory.c: In function 'insert_pages':
> mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given
>    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
>                                                         ^
> 
> Caused by commit
> 
>   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
> 
> This is the first use of pte_index() outside arch specific code and the
> sparc64 version of pte_index() nas an extra argument.
> 
> I have reverted these commits for today:
> 
>   219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")
>   cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy")
>   72c684430b94 ("add missing page_count() check to vm_insert_pages().")
>   dbd9553775f3 ("mm-add-vm_insert_pages-fix")
>   366142f0b000 ("mm/memory.c: add vm_insert_pages()")

This failure is now in the akpm tree (it was previously in the
skpm-current tree) but I am still reverting the same patches (though
they are now slightly different).

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-20 23:59             ` Stephen Rothwell
@ 2020-02-21 21:29               ` Arjun Roy
  0 siblings, 0 replies; 253+ messages in thread
From: Arjun Roy @ 2020-02-21 21:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

On Thu, Feb 20, 2020 at 3:59 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Arjun,
>
> On Thu, 20 Feb 2020 15:44:28 -0800 Arjun Roy <arjunroy@google.com> wrote:
> >
> > On Thu, Feb 20, 2020 at 3:43 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Thu, 20 Feb 2020 15:22:04 -0800 Arjun Roy <arjunroy@google.com> wrote:
> > > >
> > > > I have a possible solution in mind, but it would involve a slight
> > > > change in the SPARC macro (to be more inline with the semantics of the
> > > > other platforms).
> > > > If you're open to such a change, I can send it out.
> > >
> > > Its not up to me :-)
> > >
> > > If it is not too much work, I would say, do the patch, test it as you
> > > can, then send it out cc'ing the Sparc maintainer (DaveM cc'd) and see
> > > what happens.
> >
> > Certainly, I will do so.
>
> Just one thing: its worth while making it clear to DaveM that you just
> want his Ack (rather than for him to take the patch into the Sparc
> tree) so that the patch can go into Andrew's tree along with the rest
> of the series.
>

For now since the earlier patches remain in the mm tree (as far as I
can tell here https://github.com/hnaz/linux-mm/tree/master) I have
just sent a fixup patch for the sparc compilation issue to mm-next. I
also indicated the ack request to DaveM.

Thanks,
-Arjun

> --
> Cheers,
> Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-20 23:44           ` Arjun Roy
@ 2020-02-20 23:59             ` Stephen Rothwell
  2020-02-21 21:29               ` Arjun Roy
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-20 23:59 UTC (permalink / raw)
  To: Arjun Roy
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

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

Hi Arjun,

On Thu, 20 Feb 2020 15:44:28 -0800 Arjun Roy <arjunroy@google.com> wrote:
>
> On Thu, Feb 20, 2020 at 3:43 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Thu, 20 Feb 2020 15:22:04 -0800 Arjun Roy <arjunroy@google.com> wrote:  
> > >
> > > I have a possible solution in mind, but it would involve a slight
> > > change in the SPARC macro (to be more inline with the semantics of the
> > > other platforms).
> > > If you're open to such a change, I can send it out.  
> >
> > Its not up to me :-)
> >
> > If it is not too much work, I would say, do the patch, test it as you
> > can, then send it out cc'ing the Sparc maintainer (DaveM cc'd) and see
> > what happens.
> 
> Certainly, I will do so.

Just one thing: its worth while making it clear to DaveM that you just
want his Ack (rather than for him to take the patch into the Sparc
tree) so that the patch can go into Andrew's tree along with the rest
of the series.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-20 23:43         ` Stephen Rothwell
@ 2020-02-20 23:44           ` Arjun Roy
  2020-02-20 23:59             ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Arjun Roy @ 2020-02-20 23:44 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

On Thu, Feb 20, 2020 at 3:43 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Arjun,
>
> On Thu, 20 Feb 2020 15:22:04 -0800 Arjun Roy <arjunroy@google.com> wrote:
> >
> > I have a possible solution in mind, but it would involve a slight
> > change in the SPARC macro (to be more inline with the semantics of the
> > other platforms).
> > If you're open to such a change, I can send it out.
>
> Its not up to me :-)
>
> If it is not too much work, I would say, do the patch, test it as you
> can, then send it out cc'ing the Sparc maintainer (DaveM cc'd) and see
> what happens.
>

Certainly, I will do so.

Thanks,
-Arjun

> --
> Cheers,
> Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-20 23:22       ` Arjun Roy
@ 2020-02-20 23:43         ` Stephen Rothwell
  2020-02-20 23:44           ` Arjun Roy
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-20 23:43 UTC (permalink / raw)
  To: Arjun Roy
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

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

Hi Arjun,

On Thu, 20 Feb 2020 15:22:04 -0800 Arjun Roy <arjunroy@google.com> wrote:
> 
> I have a possible solution in mind, but it would involve a slight
> change in the SPARC macro (to be more inline with the semantics of the
> other platforms).
> If you're open to such a change, I can send it out.

Its not up to me :-)

If it is not too much work, I would say, do the patch, test it as you
can, then send it out cc'ing the Sparc maintainer (DaveM cc'd) and see
what happens.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-20 23:18     ` Stephen Rothwell
@ 2020-02-20 23:22       ` Arjun Roy
  2020-02-20 23:43         ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Arjun Roy @ 2020-02-20 23:22 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

On Thu, Feb 20, 2020 at 3:18 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> On Sun, 16 Feb 2020 22:45:35 -0800 Arjun Roy <arjunroy@google.com> wrote:
> >
> > On Sun, Feb 16, 2020 at 8:12 PM Arjun Roy <arjunroy@google.com> wrote:
> > >
> > > On Sun, Feb 16, 2020 at 7:57 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> > > > failed like this:
> > > >
> > > > mm/memory.c: In function 'insert_pages':
> > > > mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given
> > > >    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
> > > >                                                         ^
> > > >
> > > > Caused by commit
> > > >
> > > >   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
> > > >
> > > > This is the first use of pte_index() outside arch specific code and the
> > > > sparc64 version of pte_index() nas an extra argument.
> > >
> > > Looks like this happens for sparc, and also metag. Other platforms
> > > just take the addr parameter based on a quick search.
> >
> > And actually I guess there's no metag anyways now.
> > Looking further, then, it looks like in every non-sparc pte_index() is
> > an actual numerical index, while on sparc it goes a step further to
> > yield a pte_t *.
> > As far as I can tell, the sparc incarnation of this is only used by
> > the pte_offset_(kernel/map) macros.
> >
> > So I think a possibly sane way to fix this would be:
> > 1. Define pte_index() to be a numerical index, like the other architectures,
> > 2. Define something like pte_entry() that uses pte_index(), and
> > 3. Have pte_offset_(kernel/map) be defined as pte_entry() instead.
> >
> > Then pte_index would be operating on just an address for all
> > platforms, and the reverted patchset would work without any changes.
> >
> > If this sounds acceptable, I can send a patch.
> >
> > > > I have reverted these commits for today:
> > > >
> > > >   219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")
> > > >   cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy")
> > > >   72c684430b94 ("add missing page_count() check to vm_insert_pages().")
> > > >   dbd9553775f3 ("mm-add-vm_insert_pages-fix")
> > > >   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
> > > >
> > >
> > > In terms of fixing this; passing in an appropriate dir parameter is
> > > not really a problem, but what is concerning that it seems messy to
> > > have a per-platform ifdef to pass it either two arguments or one in
> > > this case. But it seems like either that would be one way to fix it,
> > > or having some arch method across all arches that takes two arguments
> > > (and ignores one of them for most arches).
> > >
> > > Is there a general preference for the right way forward, in this case?
>
> Has there been any progress with this?  I am still reverting the above
> commits, so they are not getting any linux-next testing ...
>

I have a possible solution in mind, but it would involve a slight
change in the SPARC macro (to be more inline with the semantics of the
other platforms).
If you're open to such a change, I can send it out.

Thanks,
-Arjun

> --
> Cheers,
> Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-17  6:45   ` Arjun Roy
@ 2020-02-20 23:18     ` Stephen Rothwell
  2020-02-20 23:22       ` Arjun Roy
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-20 23:18 UTC (permalink / raw)
  To: Arjun Roy
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

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

Hi all,

On Sun, 16 Feb 2020 22:45:35 -0800 Arjun Roy <arjunroy@google.com> wrote:
>
> On Sun, Feb 16, 2020 at 8:12 PM Arjun Roy <arjunroy@google.com> wrote:
> >
> > On Sun, Feb 16, 2020 at 7:57 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:  
> > >
> > > After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> > > failed like this:
> > >
> > > mm/memory.c: In function 'insert_pages':
> > > mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given
> > >    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
> > >                                                         ^
> > >
> > > Caused by commit
> > >
> > >   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
> > >
> > > This is the first use of pte_index() outside arch specific code and the
> > > sparc64 version of pte_index() nas an extra argument.
> >
> > Looks like this happens for sparc, and also metag. Other platforms
> > just take the addr parameter based on a quick search.
> 
> And actually I guess there's no metag anyways now.
> Looking further, then, it looks like in every non-sparc pte_index() is
> an actual numerical index, while on sparc it goes a step further to
> yield a pte_t *.
> As far as I can tell, the sparc incarnation of this is only used by
> the pte_offset_(kernel/map) macros.
> 
> So I think a possibly sane way to fix this would be:
> 1. Define pte_index() to be a numerical index, like the other architectures,
> 2. Define something like pte_entry() that uses pte_index(), and
> 3. Have pte_offset_(kernel/map) be defined as pte_entry() instead.
> 
> Then pte_index would be operating on just an address for all
> platforms, and the reverted patchset would work without any changes.
> 
> If this sounds acceptable, I can send a patch.
> 
> > > I have reverted these commits for today:
> > >
> > >   219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")
> > >   cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy")
> > >   72c684430b94 ("add missing page_count() check to vm_insert_pages().")
> > >   dbd9553775f3 ("mm-add-vm_insert_pages-fix")
> > >   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
> > >  
> >
> > In terms of fixing this; passing in an appropriate dir parameter is
> > not really a problem, but what is concerning that it seems messy to
> > have a per-platform ifdef to pass it either two arguments or one in
> > this case. But it seems like either that would be one way to fix it,
> > or having some arch method across all arches that takes two arguments
> > (and ignores one of them for most arches).
> >
> > Is there a general preference for the right way forward, in this case?

Has there been any progress with this?  I am still reverting the above
commits, so they are not getting any linux-next testing ...

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-17  4:12 ` Arjun Roy
@ 2020-02-17  6:45   ` Arjun Roy
  2020-02-20 23:18     ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Arjun Roy @ 2020-02-17  6:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

On Sun, Feb 16, 2020 at 8:12 PM Arjun Roy <arjunroy@google.com> wrote:
>
> On Sun, Feb 16, 2020 at 7:57 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> > failed like this:
> >
> > mm/memory.c: In function 'insert_pages':
> > mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given
> >    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
> >                                                         ^
> >
> > Caused by commit
> >
> >   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
> >
> > This is the first use of pte_index() outside arch specific code and the
> > sparc64 version of pte_index() nas an extra argument.
> >
>
> Looks like this happens for sparc, and also metag. Other platforms
> just take the addr parameter based on a quick search.
>

And actually I guess there's no metag anyways now.
Looking further, then, it looks like in every non-sparc pte_index() is
an actual numerical index, while on sparc it goes a step further to
yield a pte_t *.
As far as I can tell, the sparc incarnation of this is only used by
the pte_offset_(kernel/map) macros.

So I think a possibly sane way to fix this would be:
1. Define pte_index() to be a numerical index, like the other architectures,
2. Define something like pte_entry() that uses pte_index(), and
3. Have pte_offset_(kernel/map) be defined as pte_entry() instead.

Then pte_index would be operating on just an address for all
platforms, and the reverted patchset would work without any changes.

If this sounds acceptable, I can send a patch.

Thanks!



> > I have reverted these commits for today:
> >
> >   219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")
> >   cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy")
> >   72c684430b94 ("add missing page_count() check to vm_insert_pages().")
> >   dbd9553775f3 ("mm-add-vm_insert_pages-fix")
> >   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
> >
>
> In terms of fixing this; passing in an appropriate dir parameter is
> not really a problem, but what is concerning that it seems messy to
> have a per-platform ifdef to pass it either two arguments or one in
> this case. But it seems like either that would be one way to fix it,
> or having some arch method across all arches that takes two arguments
> (and ignores one of them for most arches).
>
> Is there a general preference for the right way forward, in this case?
>
> Thanks,
> -Arjun
>
> > --
> > Cheers,
> > Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2020-02-17  3:57 Stephen Rothwell
@ 2020-02-17  4:12 ` Arjun Roy
  2020-02-17  6:45   ` Arjun Roy
  2020-02-26  4:02 ` Stephen Rothwell
  1 sibling, 1 reply; 253+ messages in thread
From: Arjun Roy @ 2020-02-17  4:12 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux Next Mailing List,
	Linux Kernel Mailing List, David Miller

On Sun, Feb 16, 2020 at 7:57 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> failed like this:
>
> mm/memory.c: In function 'insert_pages':
> mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given
>    remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
>                                                         ^
>
> Caused by commit
>
>   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
>
> This is the first use of pte_index() outside arch specific code and the
> sparc64 version of pte_index() nas an extra argument.
>

Looks like this happens for sparc, and also metag. Other platforms
just take the addr parameter based on a quick search.

> I have reverted these commits for today:
>
>   219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")
>   cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy")
>   72c684430b94 ("add missing page_count() check to vm_insert_pages().")
>   dbd9553775f3 ("mm-add-vm_insert_pages-fix")
>   366142f0b000 ("mm/memory.c: add vm_insert_pages()")
>

In terms of fixing this; passing in an appropriate dir parameter is
not really a problem, but what is concerning that it seems messy to
have a per-platform ifdef to pass it either two arguments or one in
this case. But it seems like either that would be one way to fix it,
or having some arch method across all arches that takes two arguments
(and ignores one of them for most arches).

Is there a general preference for the right way forward, in this case?

Thanks,
-Arjun

> --
> Cheers,
> Stephen Rothwell

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

* linux-next: build failure after merge of the akpm tree
@ 2020-02-17  3:57 Stephen Rothwell
  2020-02-17  4:12 ` Arjun Roy
  2020-02-26  4:02 ` Stephen Rothwell
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-02-17  3:57 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Arjun Roy,
	David Miller

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

Hi all,

After merging the akpm tree, today's linux-next build (sparc64 defconfig)
failed like this:

mm/memory.c: In function 'insert_pages':
mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given
   remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
                                                        ^

Caused by commit

  366142f0b000 ("mm/memory.c: add vm_insert_pages()")

This is the first use of pte_index() outside arch specific code and the
sparc64 version of pte_index() nas an extra argument.

I have reverted these commits for today:

  219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")
  cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy")
  72c684430b94 ("add missing page_count() check to vm_insert_pages().")
  dbd9553775f3 ("mm-add-vm_insert_pages-fix")
  366142f0b000 ("mm/memory.c: add vm_insert_pages()")

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2020-01-22  7:05 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2020-01-22  7:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Alexey Dobriyan, Randy Dunlap

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

Hi all,

[Also reported by Randy Dunlap]

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

kernel/sched/psi.c: In function 'psi_proc_init':
kernel/sched/psi.c:1286:37: error: 'NUL' undeclared (first use in this function); did you mean 'NULL'?
 1286 |   proc_create("pressure/memory", 0, NUL, &psi_memory_proc_ops);
      |                                     ^~~
      |                                     NULL
kernel/sched/psi.c:1286:37: note: each undeclared identifier is reported only once for each function it appears in
kernel/sched/psi.c:1287:39: error: invalid operands to binary & (have 'void *' and 'const struct proc_ops')
 1287 |   proc_create("pressure/cpu", 0, NULL &psi_cpu_proc_ops);
      |                                       ^
kernel/sched/psi.c:1287:3: error: too few arguments to function 'proc_create'
 1287 |   proc_create("pressure/cpu", 0, NULL &psi_cpu_proc_ops);
      |   ^~~~~~~~~~~
In file included from kernel/sched/psi.c:133:
include/linux/proc_fs.h:64:24: note: declared here
   64 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
      |                        ^~~~~~~~~~~

Caused by patch

  "proc: convert everything to "struct proc_ops""

I have applied the following fix patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 22 Jan 2020 17:59:00 +1100
Subject: [PATCH] proc-convert-everything-to-struct-proc_ops-fix-2

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

diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index 19967bceb64d..ac4bd0ca11cc 100644
--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -1283,8 +1283,8 @@ static int __init psi_proc_init(void)
 	if (psi_enable) {
 		proc_mkdir("pressure", NULL);
 		proc_create("pressure/io", 0, NULL, &psi_io_proc_ops);
-		proc_create("pressure/memory", 0, NUL, &psi_memory_proc_ops);
-		proc_create("pressure/cpu", 0, NULL &psi_cpu_proc_ops);
+		proc_create("pressure/memory", 0, NULL, &psi_memory_proc_ops);
+		proc_create("pressure/cpu", 0, NULL, &psi_cpu_proc_ops);
 	}
 	return 0;
 }
-- 
2.24.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2019-02-26  7:39 Stephen Rothwell
@ 2019-02-26  8:16 ` Mike Rapoport
  0 siblings, 0 replies; 253+ messages in thread
From: Mike Rapoport @ 2019-02-26  8:16 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Michael Ellerman, PowerPC,
	Linux Next Mailing List, Linux Kernel Mailing List,
	Christophe Leroy

On Tue, Feb 26, 2019 at 06:39:15PM +1100, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> allnoconfig) failed like this:
> 
> /home/sfr/next/next/arch/powerpc/kernel/setup_32.c:176:21: error: redefinition of 'alloc_stack'
>  static void *__init alloc_stack(void)
>                      ^~~~~~~~~~~
> /home/sfr/next/next/arch/powerpc/kernel/setup_32.c:165:21: note: previous definition of 'alloc_stack' was here
>  static void *__init alloc_stack(void)
>                      ^~~~~~~~~~~
> 
> Caused by patch
> 
>   "powerpc: use memblock functions returning virtual address"
> 
> from the akpm tree interacting with commit
> 
>   c8e409a33cf8 ("powerpc/irq: use memblock functions returning virtual address")
> 
> from the powerpc tree.
> 
> Both patches added the alloc_stack() function and git resolved it by
> adding both. :-(  I have added a patch to remove one of them.

Yeah, me too :)

https://lore.kernel.org/linux-mm/20190226064032.GA5873@rapoport-lnx/
 
Stephen, sorry, should have cc'ed you

> -- 
> Cheers,
> Stephen Rothwell

-- 
Sincerely yours,
Mike.

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

* linux-next: build failure after merge of the akpm tree
@ 2019-02-26  7:39 Stephen Rothwell
  2019-02-26  8:16 ` Mike Rapoport
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2019-02-26  7:39 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, PowerPC
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Christophe Leroy, Mike Rapoport

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
allnoconfig) failed like this:

/home/sfr/next/next/arch/powerpc/kernel/setup_32.c:176:21: error: redefinition of 'alloc_stack'
 static void *__init alloc_stack(void)
                     ^~~~~~~~~~~
/home/sfr/next/next/arch/powerpc/kernel/setup_32.c:165:21: note: previous definition of 'alloc_stack' was here
 static void *__init alloc_stack(void)
                     ^~~~~~~~~~~

Caused by patch

  "powerpc: use memblock functions returning virtual address"

from the akpm tree interacting with commit

  c8e409a33cf8 ("powerpc/irq: use memblock functions returning virtual address")

from the powerpc tree.

Both patches added the alloc_stack() function and git resolved it by
adding both. :-(  I have added a patch to remove one of them.



-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-12-12 17:05 ` Anshuman Khandual
@ 2018-12-12 20:44   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2018-12-12 20:44 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Andrew Morton, Linux Next Mailing List, Linux Kernel Mailing List

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

Hi Anshuman,

On Wed, 12 Dec 2018 22:35:38 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
>
> On 12/03/2018 12:30 PM, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (powerpc_le perf)
> > failed like this:
> > 
> > bench/numa.c:37:10: fatal error: linux/numa.h: No such file or directory
> >  #include <linux/numa.h>
> >           ^~~~~~~~~~~~~~
> > 
> > Caused by patches
> > 
> >   "mm: replace all open encodings for NUMA_NO_NODE"
> >   "mm-replace-all-open-encodings-for-numa_no_node-fix"
> > 
> > For linux/numa.h to be generally availble to the tools builds, it must
> > be copied into tools/include/linux ...
> > 
> > I have done that copy for today:
> > 
> > From 6dabc11d5513510d0ec0a6b0a4aa8b9051b71516 Mon Sep 17 00:00:00 2001
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 3 Dec 2018 17:57:27 +1100
> > Subject: [PATCH] linux/numa.h is now needed for the perf build
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>  
> 
> Hello Stephen,
> 
> I will respin the original patch (https://patchwork.kernel.org/patch/10698089/)
> once more to accommodate new feedbacks from Lubomir Rintel. This patch fixes the
> build problem related to tools/perf. As Lubomir suggested, it might be better to
> split the tools/perf changes ("tools: Replace open encodings for NUMA_NO_NODE")
> from the original patch and then fold this fix onto it with both signed-off-by.
> Does it sound good. Are you okay with it ?

Sounds fine to me.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-12-03  7:00 Stephen Rothwell
  2018-12-03 10:37 ` Anshuman Khandual
@ 2018-12-12 17:05 ` Anshuman Khandual
  2018-12-12 20:44   ` Stephen Rothwell
  1 sibling, 1 reply; 253+ messages in thread
From: Anshuman Khandual @ 2018-12-12 17:05 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List



On 12/03/2018 12:30 PM, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc_le perf)
> failed like this:
> 
> bench/numa.c:37:10: fatal error: linux/numa.h: No such file or directory
>  #include <linux/numa.h>
>           ^~~~~~~~~~~~~~
> 
> Caused by patches
> 
>   "mm: replace all open encodings for NUMA_NO_NODE"
>   "mm-replace-all-open-encodings-for-numa_no_node-fix"
> 
> For linux/numa.h to be generally availble to the tools builds, it must
> be copied into tools/include/linux ...
> 
> I have done that copy for today:
> 
> From 6dabc11d5513510d0ec0a6b0a4aa8b9051b71516 Mon Sep 17 00:00:00 2001
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 3 Dec 2018 17:57:27 +1100
> Subject: [PATCH] linux/numa.h is now needed for the perf build
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Hello Stephen,

I will respin the original patch (https://patchwork.kernel.org/patch/10698089/)
once more to accommodate new feedbacks from Lubomir Rintel. This patch fixes the
build problem related to tools/perf. As Lubomir suggested, it might be better to
split the tools/perf changes ("tools: Replace open encodings for NUMA_NO_NODE")
from the original patch and then fold this fix onto it with both signed-off-by.
Does it sound good. Are you okay with it ?

- Anshuman

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-12-03  7:00 Stephen Rothwell
@ 2018-12-03 10:37 ` Anshuman Khandual
  2018-12-12 17:05 ` Anshuman Khandual
  1 sibling, 0 replies; 253+ messages in thread
From: Anshuman Khandual @ 2018-12-03 10:37 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List



On 12/03/2018 12:30 PM, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc_le perf)
> failed like this:
> 
> bench/numa.c:37:10: fatal error: linux/numa.h: No such file or directory
>  #include <linux/numa.h>
>           ^~~~~~~~~~~~~~
> 
> Caused by patches
> 
>   "mm: replace all open encodings for NUMA_NO_NODE"
>   "mm-replace-all-open-encodings-for-numa_no_node-fix"
> 
> For linux/numa.h to be generally availble to the tools builds, it must
> be copied into tools/include/linux ...
> 
> I have done that copy for today:
> 
> From 6dabc11d5513510d0ec0a6b0a4aa8b9051b71516 Mon Sep 17 00:00:00 2001
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 3 Dec 2018 17:57:27 +1100
> Subject: [PATCH] linux/numa.h is now needed for the perf build
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Makes sense. Thanks Stephen for taking care of this build failure
more than once.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

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

* linux-next: build failure after merge of the akpm tree
@ 2018-12-03  7:00 Stephen Rothwell
  2018-12-03 10:37 ` Anshuman Khandual
  2018-12-12 17:05 ` Anshuman Khandual
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2018-12-03  7:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Anshuman Khandual

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc_le perf)
failed like this:

bench/numa.c:37:10: fatal error: linux/numa.h: No such file or directory
 #include <linux/numa.h>
          ^~~~~~~~~~~~~~

Caused by patches

  "mm: replace all open encodings for NUMA_NO_NODE"
  "mm-replace-all-open-encodings-for-numa_no_node-fix"

For linux/numa.h to be generally availble to the tools builds, it must
be copied into tools/include/linux ...

I have done that copy for today:

From 6dabc11d5513510d0ec0a6b0a4aa8b9051b71516 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 3 Dec 2018 17:57:27 +1100
Subject: [PATCH] linux/numa.h is now needed for the perf build

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 tools/include/linux/numa.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 tools/include/linux/numa.h

diff --git a/tools/include/linux/numa.h b/tools/include/linux/numa.h
new file mode 100644
index 000000000000..110b0e5d0fb0
--- /dev/null
+++ b/tools/include/linux/numa.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_NUMA_H
+#define _LINUX_NUMA_H
+
+
+#ifdef CONFIG_NODES_SHIFT
+#define NODES_SHIFT     CONFIG_NODES_SHIFT
+#else
+#define NODES_SHIFT     0
+#endif
+
+#define MAX_NUMNODES    (1 << NODES_SHIFT)
+
+#define	NUMA_NO_NODE	(-1)
+
+#endif /* _LINUX_NUMA_H */
-- 
2.19.1

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-11-30  5:30 Stephen Rothwell
@ 2018-11-30 10:27 ` Anshuman Khandual
  0 siblings, 0 replies; 253+ messages in thread
From: Anshuman Khandual @ 2018-11-30 10:27 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List



On 11/30/2018 11:00 AM, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc_le perf)
> failed like this:
> 
> bench/numa.c: In function 'bind_to_node':
> bench/numa.c:301:21: error: 'NUMA_NO_NODE' undeclared (first use in this function); did you mean 'NUMA_NUM_NODES'?
>   if (target_node == NUMA_NO_NODE) {
>                      ^~~~~~~~~~~~
>                      NUMA_NUM_NODES
> bench/numa.c:301:21: note: each undeclared identifier is reported only once for each function it appears in
> bench/numa.c: In function 'bind_to_memnode':
> bench/numa.c:342:14: error: 'NUMA_NO_NODE' undeclared (first use in this function); did you mean 'NUMA_NUM_NODES'?
>   if (node == NUMA_NO_NODE)
>               ^~~~~~~~~~~~
>               NUMA_NUM_NODES
> bench/numa.c: In function 'init_thread_data':
> bench/numa.c:1366:19: error: 'NUMA_NO_NODE' undeclared (first use in this function); did you mean 'NUMA_NUM_NODES'?
>    td->bind_node = NUMA_NO_NODE;
>                    ^~~~~~~~~~~~
>                    NUMA_NUM_NODES
> 
> Caused by patch
> 
>   "mm: replace all open encodings for NUMA_NO_NODE"
> 
> I applied the following partial revert for today:

I had skipped this particular file because it includes 'numa.h'. But that does not
seem to pull in <linux/numa.h> though. Could we please add <linux/numa.h> instead
of reverting the actual changes from the patch. I can send out another version of
the patch if required.

- Anshuman

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

* linux-next: build failure after merge of the akpm tree
@ 2018-11-30  5:30 Stephen Rothwell
  2018-11-30 10:27 ` Anshuman Khandual
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2018-11-30  5:30 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Anshuman Khandual

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc_le perf)
failed like this:

bench/numa.c: In function 'bind_to_node':
bench/numa.c:301:21: error: 'NUMA_NO_NODE' undeclared (first use in this function); did you mean 'NUMA_NUM_NODES'?
  if (target_node == NUMA_NO_NODE) {
                     ^~~~~~~~~~~~
                     NUMA_NUM_NODES
bench/numa.c:301:21: note: each undeclared identifier is reported only once for each function it appears in
bench/numa.c: In function 'bind_to_memnode':
bench/numa.c:342:14: error: 'NUMA_NO_NODE' undeclared (first use in this function); did you mean 'NUMA_NUM_NODES'?
  if (node == NUMA_NO_NODE)
              ^~~~~~~~~~~~
              NUMA_NUM_NODES
bench/numa.c: In function 'init_thread_data':
bench/numa.c:1366:19: error: 'NUMA_NO_NODE' undeclared (first use in this function); did you mean 'NUMA_NUM_NODES'?
   td->bind_node = NUMA_NO_NODE;
                   ^~~~~~~~~~~~
                   NUMA_NUM_NODES

Caused by patch

  "mm: replace all open encodings for NUMA_NO_NODE"

I applied the following partial revert for today:

From 765f2fd3d18ca1d4d0783b888d127af784929e3e Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 30 Nov 2018 16:26:32 +1100
Subject: [PATCH] partial revert (perf) of "mm: replace all open encodings for NUMA_NO_NODE"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 tools/perf/bench/numa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index e0ad5f1de226..44195514b19e 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -298,7 +298,7 @@ static cpu_set_t bind_to_node(int target_node)
 
 	CPU_ZERO(&mask);
 
-	if (target_node == NUMA_NO_NODE) {
+	if (target_node == -1) {
 		for (cpu = 0; cpu < g->p.nr_cpus; cpu++)
 			CPU_SET(cpu, &mask);
 	} else {
@@ -339,7 +339,7 @@ static void bind_to_memnode(int node)
 	unsigned long nodemask;
 	int ret;
 
-	if (node == NUMA_NO_NODE)
+	if (node == -1)
 		return;
 
 	BUG_ON(g->p.nr_nodes > (int)sizeof(nodemask)*8);
@@ -1363,7 +1363,7 @@ static void init_thread_data(void)
 		int cpu;
 
 		/* Allow all nodes by default: */
-		td->bind_node = NUMA_NO_NODE;
+		td->bind_node = -1;
 
 		/* Allow all CPUs by default: */
 		CPU_ZERO(&td->bind_cpumask);
-- 
2.19.1

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-10-15  7:14 ` Stephen Rothwell
@ 2018-10-16  7:46   ` Ingo Molnar
  0 siblings, 0 replies; 253+ messages in thread
From: Ingo Molnar @ 2018-10-16  7:46 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Linux-Next Mailing List,
	Linux Kernel Mailing List, Mike Rapoport, Borislav Petkov


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> On Mon, 8 Oct 2018 19:03:41 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the akpm tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > arch/x86/mm/kaslr.c:26:10: fatal error: linux/bootmem.h: No such file or directory
> >  #include <linux/bootmem.h>
> >           ^~~~~~~~~~~~~~~~~
> > 
> > Caused by patch
> > 
> >   "mm: remove include/linux/bootmem.h"
> > 
> > interacting with commit
> > 
> >   3a387c6d96e6 ("x86/kaslr, ACPI/NUMA: Fix KASLR build error")
> > 
> > from the tip tree.
> > 
> > I have added the following patch for today:
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 8 Oct 2018 18:57:00 +1100
> > Subject: [PATCH] x86/kaslr, ACPI/NUMA: fix for linux/bootmem.h removal
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  arch/x86/mm/kaslr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
> > index b3471388288d..ad80bdc690c1 100644
> > --- a/arch/x86/mm/kaslr.c
> > +++ b/arch/x86/mm/kaslr.c
> > @@ -23,7 +23,7 @@
> >  #include <linux/kernel.h>
> >  #include <linux/init.h>
> >  #include <linux/random.h>
> > -#include <linux/bootmem.h>
> > +#include <linux/memblock.h>
> >  
> >  #include <asm/pgalloc.h>
> >  #include <asm/pgtable.h>
> > -- 
> 
> So the above tip tree patch no longer exists, so this one is also no
> longer needed and I have removed it from the akpm tree today.

Yeah, we are reworking this series in WIP.x86/boot, it probably won't 
make v4.20 so I removed it from -next.

Thanks,

	Ingo

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-10-08  8:03 Stephen Rothwell
@ 2018-10-15  7:14 ` Stephen Rothwell
  2018-10-16  7:46   ` Ingo Molnar
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2018-10-15  7:14 UTC (permalink / raw)
  To: Andrew Morton, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Mike Rapoport, Borislav Petkov

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

Hi all,

On Mon, 8 Oct 2018 19:03:41 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> arch/x86/mm/kaslr.c:26:10: fatal error: linux/bootmem.h: No such file or directory
>  #include <linux/bootmem.h>
>           ^~~~~~~~~~~~~~~~~
> 
> Caused by patch
> 
>   "mm: remove include/linux/bootmem.h"
> 
> interacting with commit
> 
>   3a387c6d96e6 ("x86/kaslr, ACPI/NUMA: Fix KASLR build error")
> 
> from the tip tree.
> 
> I have added the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 8 Oct 2018 18:57:00 +1100
> Subject: [PATCH] x86/kaslr, ACPI/NUMA: fix for linux/bootmem.h removal
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/x86/mm/kaslr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
> index b3471388288d..ad80bdc690c1 100644
> --- a/arch/x86/mm/kaslr.c
> +++ b/arch/x86/mm/kaslr.c
> @@ -23,7 +23,7 @@
>  #include <linux/kernel.h>
>  #include <linux/init.h>
>  #include <linux/random.h>
> -#include <linux/bootmem.h>
> +#include <linux/memblock.h>
>  
>  #include <asm/pgalloc.h>
>  #include <asm/pgtable.h>
> -- 

So the above tip tree patch no longer exists, so this one is also no
longer needed and I have removed it from the akpm tree today.

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2018-10-08  8:03 Stephen Rothwell
  2018-10-15  7:14 ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2018-10-08  8:03 UTC (permalink / raw)
  To: Andrew Morton, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Mike Rapoport, Borislav Petkov

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

Hi all,

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

arch/x86/mm/kaslr.c:26:10: fatal error: linux/bootmem.h: No such file or directory
 #include <linux/bootmem.h>
          ^~~~~~~~~~~~~~~~~

Caused by patch

  "mm: remove include/linux/bootmem.h"

interacting with commit

  3a387c6d96e6 ("x86/kaslr, ACPI/NUMA: Fix KASLR build error")

from the tip tree.

I have added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 8 Oct 2018 18:57:00 +1100
Subject: [PATCH] x86/kaslr, ACPI/NUMA: fix for linux/bootmem.h removal

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/mm/kaslr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
index b3471388288d..ad80bdc690c1 100644
--- a/arch/x86/mm/kaslr.c
+++ b/arch/x86/mm/kaslr.c
@@ -23,7 +23,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/random.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
 
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
-- 
2.18.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-10-05 12:46   ` Stephen Rothwell
@ 2018-10-06 12:10     ` Michael Ellerman
  0 siblings, 0 replies; 253+ messages in thread
From: Michael Ellerman @ 2018-10-06 12:10 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Benjamin Herrenschmidt, PowerPC,
	Linux-Next Mailing List, Linux Kernel Mailing List,
	Christophe Leroy

Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi Michael,
>
> On Fri, 05 Oct 2018 22:02:45 +1000 Michael Ellerman <mpe@ellerman.id.au> wrote:
>>
>> Ah fudge, what are the chances we add a new include of bootmem.h just as
>> Mike's removing bootmem.
>
> In my experience, it was almost certain ... almost every API removal
> conflicts with new added uses.  :-)

I suppose. Though the last time we added a new include of bootmem.h was
2015, and that should have actually been memblock.h.

>> I could just apply that to my tree. memblock.h is where early_memtest() is
>> actually defined anyway.
>
> However min_low_pfn and max_low_pfn are defined in bootmem.h until
> after it is removed.

OK. I guess I'll leave it for Andrew to squash in to the series.

cheers

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-10-05 12:02 ` Michael Ellerman
@ 2018-10-05 12:46   ` Stephen Rothwell
  2018-10-06 12:10     ` Michael Ellerman
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2018-10-05 12:46 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Andrew Morton, Benjamin Herrenschmidt, PowerPC,
	Linux-Next Mailing List, Linux Kernel Mailing List,
	Christophe Leroy

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

Hi Michael,

On Fri, 05 Oct 2018 22:02:45 +1000 Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Ah fudge, what are the chances we add a new include of bootmem.h just as
> Mike's removing bootmem.

In my experience, it was almost certain ... almost every API removal
conflicts with new added uses.  :-)

> I could just apply that to my tree. memblock.h is where early_memtest() is
> actually defined anyway.

However min_low_pfn and max_low_pfn are defined in bootmem.h until
after it is removed.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-10-05  6:14 Stephen Rothwell
@ 2018-10-05 12:02 ` Michael Ellerman
  2018-10-05 12:46   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Michael Ellerman @ 2018-10-05 12:02 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton, Benjamin Herrenschmidt, PowerPC
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Christophe Leroy

Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> arch/powerpc/kernel/setup-common.c:36:10: fatal error: linux/bootmem.h: No such file or directory
>  #include <linux/bootmem.h>
>           ^~~~~~~~~~~~~~~~~
>
> Caused by commit
>
>   49353a51a758 ("mm: remove include/linux/bootmem.h")
>
> interacting with commit
>
>   d90fe2acd9b2 ("powerpc: Wire up memtest")
>
> from the powerpc tree.

Ah fudge, what are the chances we add a new include of bootmem.h just as
Mike's removing bootmem.

> I applied the following patch for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 5 Oct 2018 16:09:34 +1000
> Subject: [PATCH] powerpc: fix up for removal of linux/bootmem.h
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/kernel/setup-common.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 2b56d1f30387..93ee3703b42f 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -33,7 +33,6 @@
>  #include <linux/serial_8250.h>
>  #include <linux/percpu.h>
>  #include <linux/memblock.h>
> -#include <linux/bootmem.h>
>  #include <linux/of_platform.h>
>  #include <linux/hugetlb.h>
>  #include <asm/debugfs.h>

I could just apply that to my tree. memblock.h is where early_memtest() is
actually defined anyway.

cheers

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

* linux-next: build failure after merge of the akpm tree
@ 2018-10-05  6:14 Stephen Rothwell
  2018-10-05 12:02 ` Michael Ellerman
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2018-10-05  6:14 UTC (permalink / raw)
  To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, PowerPC
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Christophe Leroy

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/kernel/setup-common.c:36:10: fatal error: linux/bootmem.h: No such file or directory
 #include <linux/bootmem.h>
          ^~~~~~~~~~~~~~~~~

Caused by commit

  49353a51a758 ("mm: remove include/linux/bootmem.h")

interacting with commit

  d90fe2acd9b2 ("powerpc: Wire up memtest")

from the powerpc tree.

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 5 Oct 2018 16:09:34 +1000
Subject: [PATCH] powerpc: fix up for removal of linux/bootmem.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kernel/setup-common.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 2b56d1f30387..93ee3703b42f 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -33,7 +33,6 @@
 #include <linux/serial_8250.h>
 #include <linux/percpu.h>
 #include <linux/memblock.h>
-#include <linux/bootmem.h>
 #include <linux/of_platform.h>
 #include <linux/hugetlb.h>
 #include <asm/debugfs.h>
-- 
2.18.0

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2018-10-02  8:53 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2018-10-02  8:53 UTC (permalink / raw)
  To: Andrew Morton, Christoph Hellwig
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Mike Rapoport

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

Hi all,

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


Caused by commit

  a20bb0583751 ("dma-direct: add an explicit dma_direct_get_required_mask")

from the dma-mappgin tree conflicting with patch

  "mm: remove include/linux/bootmem.h"

I have applied the following merge fix patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 2 Oct 2018 18:49:02 +1000
Subject: [PATCH] dma-direct: fix up for the removal of linux/bootmem.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 kernel/dma/direct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index 170bd322a94a..5a0806b5351b 100644
--- a/kernel/dma/direct.c
+++ b/kernel/dma/direct.c
@@ -4,7 +4,7 @@
  *
  * DMA operations that map physical memory directly without using an IOMMU.
  */
-#include <linux/bootmem.h> /* for max_pfn */
+#include <linux/memblock.h> /* for max_pfn */
 #include <linux/export.h>
 #include <linux/mm.h>
 #include <linux/dma-direct.h>
-- 
2.18.0

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-03-21 10:02 ` Greg Kroah-Hartman
@ 2018-03-21 10:38   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2018-03-21 10:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List, Luis R. Rodriguez, Randy Dunlap

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

Hi Greg,

On Wed, 21 Mar 2018 11:02:08 +0100 Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>
> Patch is now queued up, thanks.

Excellent.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2018-03-21  8:17 Stephen Rothwell
@ 2018-03-21 10:02 ` Greg Kroah-Hartman
  2018-03-21 10:38   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Greg Kroah-Hartman @ 2018-03-21 10:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List, Luis R. Rodriguez, Randy Dunlap

On Wed, Mar 21, 2018 at 07:17:27PM +1100, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/base/firmware_loader/fallback.c: In function 'map_fw_priv_pages':
> drivers/base/firmware_loader/fallback.c:232:2: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration]
>   vunmap(fw_priv->data);
>   ^~~~~~
>   kunmap
> drivers/base/firmware_loader/fallback.c:233:18: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
>   fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages, 0,
>                   ^~~~
>                   kmap
> drivers/base/firmware_loader/fallback.c:233:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>   fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages, 0,
>                 ^
> drivers/base/firmware_loader/fallback.c: In function 'firmware_loading_store':
> drivers/base/firmware_loader/fallback.c:274:4: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
>     vfree(fw_priv->pages);
>     ^~~~~
>     kvfree
> drivers/base/firmware_loader/fallback.c: In function 'fw_realloc_pages':
> drivers/base/firmware_loader/fallback.c:405:15: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
>    new_pages = vmalloc(new_array_size * sizeof(void *));
>                ^~~~~~~
>                kvmalloc
> drivers/base/firmware_loader/fallback.c:405:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>    new_pages = vmalloc(new_array_size * sizeof(void *));
>              ^
> 
> Maybe caused by patch
> 
>   "headers: untangle kmemleak.h from mm.h"
> 
> Anyway this file should explicitly include linux/vmalloc.h since it uses
> stuff in there, so I have added the following patch for today (I think
> this could just be applied to the driver-core tree ...):

Patch is now queued up, thanks.

greg k-h

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

* linux-next: build failure after merge of the akpm tree
@ 2018-03-21  8:17 Stephen Rothwell
  2018-03-21 10:02 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2018-03-21  8:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Luis R. Rodriguez, Randy Dunlap

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/base/firmware_loader/fallback.c: In function 'map_fw_priv_pages':
drivers/base/firmware_loader/fallback.c:232:2: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration]
  vunmap(fw_priv->data);
  ^~~~~~
  kunmap
drivers/base/firmware_loader/fallback.c:233:18: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
  fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages, 0,
                  ^~~~
                  kmap
drivers/base/firmware_loader/fallback.c:233:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages, 0,
                ^
drivers/base/firmware_loader/fallback.c: In function 'firmware_loading_store':
drivers/base/firmware_loader/fallback.c:274:4: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
    vfree(fw_priv->pages);
    ^~~~~
    kvfree
drivers/base/firmware_loader/fallback.c: In function 'fw_realloc_pages':
drivers/base/firmware_loader/fallback.c:405:15: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
   new_pages = vmalloc(new_array_size * sizeof(void *));
               ^~~~~~~
               kvmalloc
drivers/base/firmware_loader/fallback.c:405:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   new_pages = vmalloc(new_array_size * sizeof(void *));
             ^

Maybe caused by patch

  "headers: untangle kmemleak.h from mm.h"

Anyway this file should explicitly include linux/vmalloc.h since it uses
stuff in there, so I have added the following patch for today (I think
this could just be applied to the driver-core tree ...):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 21 Mar 2018 19:06:35 +1100
Subject: [PATCH] firmware: explicitly include vmalloc.h

After some other include file changes, fixes:

drivers/base/firmware_loader/fallback.c: In function 'map_fw_priv_pages':
drivers/base/firmware_loader/fallback.c:232:2: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration]
  vunmap(fw_priv->data);
  ^~~~~~
  kunmap
drivers/base/firmware_loader/fallback.c:233:18: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
  fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages, 0,
                  ^~~~
                  kmap
drivers/base/firmware_loader/fallback.c:233:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages, 0,
                ^
drivers/base/firmware_loader/fallback.c: In function 'firmware_loading_store':
drivers/base/firmware_loader/fallback.c:274:4: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
    vfree(fw_priv->pages);
    ^~~~~
    kvfree
drivers/base/firmware_loader/fallback.c: In function 'fw_realloc_pages':
drivers/base/firmware_loader/fallback.c:405:15: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
   new_pages = vmalloc(new_array_size * sizeof(void *));
               ^~~~~~~
               kvmalloc
drivers/base/firmware_loader/fallback.c:405:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
   new_pages = vmalloc(new_array_size * sizeof(void *));
             ^

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/base/firmware_loader/fallback.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/base/firmware_loader/fallback.c b/drivers/base/firmware_loader/fallback.c
index 0a8ec7fec585..d231bbcb95d7 100644
--- a/drivers/base/firmware_loader/fallback.c
+++ b/drivers/base/firmware_loader/fallback.c
@@ -8,6 +8,7 @@
 #include <linux/highmem.h>
 #include <linux/umh.h>
 #include <linux/sysctl.h>
+#include <linux/vmalloc.h>
 
 #include "fallback.h"
 #include "firmware.h"
-- 
2.16.1

-- 
Cheers,
Stephen Rothwell

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

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

* linux-next: build failure after merge of the akpm tree
@ 2017-11-06  6:55 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-11-06  6:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Clement Courbet

Hi Andrew,

After merging the akpm tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

lib/cpumask.c: In function 'cpumask_next_and':
lib/cpumask.c:39:9: error: implicit declaration of function 'find_next_and_bit' [-Werror=implicit-function-declaration]
  return find_next_and_bit(cpumask_bits(src1p), cpumask_bits(src2p),
         ^
cc1: some warnings being treated as errors

Introduced by commit

  1eae9bb7e6f2 ("lib: optimize cpumask_next_and()")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-08-01 18:40 ` Kees Cook
@ 2017-08-01 20:44   ` Arnd Bergmann
  0 siblings, 0 replies; 253+ messages in thread
From: Arnd Bergmann @ 2017-08-01 20:44 UTC (permalink / raw)
  To: Kees Cook
  Cc: Stephen Rothwell, Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List

On Tue, Aug 1, 2017 at 8:40 PM, Kees Cook <keescook@chromium.org> wrote:
>>
>> I don't know why this has turned up now.  I have just left it broken
>> for now and would appreciate any fix.
>
> Thanks for the heads-up! I'm not sure why this suddenly appeared
> either, but Arnd has sent a patch for this now.

The main difference I see that can impact gcc's optimization steps is the
unreachable() that was there in BUG() but is absent in WARN().

It's possible that the compiler decided that the entire code path leading
up to the unreachable() couldn't happen, so it dropped the
__read_overflow2() call as well.

      Arnd

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-08-01  6:25 Stephen Rothwell
@ 2017-08-01 18:40 ` Kees Cook
  2017-08-01 20:44   ` Arnd Bergmann
  0 siblings, 1 reply; 253+ messages in thread
From: Kees Cook @ 2017-08-01 18:40 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linux-Next Mailing List,
	Linux Kernel Mailing List, Arnd Bergmann

On Mon, Jul 31, 2017 at 11:25 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> In file included from arch/powerpc/include/asm/paca.h:19:0,
>                  from arch/powerpc/include/asm/hw_irq.h:42,
>                  from arch/powerpc/include/asm/irqflags.h:11,
>                  from include/linux/irqflags.h:15,
>                  from include/linux/spinlock.h:53,
>                  from include/linux/wait.h:8,
>                  from include/linux/wait_bit.h:7,
>                  from include/linux/fs.h:5,
>                  from include/linux/buffer_head.h:11,
>                  from fs/adfs/dir_f.c:12:
> In function 'memcpy',
>     inlined from '__adfs_dir_put' at fs/adfs/dir_f.c:318:2,
>     inlined from 'adfs_f_update' at fs/adfs/dir_f.c:403:2:
> include/linux/string.h:305:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
>     __read_overflow2();
>     ^
>
> I don't know why this has turned up now.  I have just left it broken
> for now and would appreciate any fix.

Thanks for the heads-up! I'm not sure why this suddenly appeared
either, but Arnd has sent a patch for this now.

-Kees

-- 
Kees Cook
Pixel Security

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

* linux-next: build failure after merge of the akpm tree
@ 2017-08-01  6:25 Stephen Rothwell
  2017-08-01 18:40 ` Kees Cook
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2017-08-01  6:25 UTC (permalink / raw)
  To: Andrew Morton, Kees Cook
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

In file included from arch/powerpc/include/asm/paca.h:19:0,
                 from arch/powerpc/include/asm/hw_irq.h:42,
                 from arch/powerpc/include/asm/irqflags.h:11,
                 from include/linux/irqflags.h:15,
                 from include/linux/spinlock.h:53,
                 from include/linux/wait.h:8,
                 from include/linux/wait_bit.h:7,
                 from include/linux/fs.h:5,
                 from include/linux/buffer_head.h:11,
                 from fs/adfs/dir_f.c:12:
In function 'memcpy',
    inlined from '__adfs_dir_put' at fs/adfs/dir_f.c:318:2,
    inlined from 'adfs_f_update' at fs/adfs/dir_f.c:403:2:
include/linux/string.h:305:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
    __read_overflow2();
    ^

I don't know why this has turned up now.  I have just left it broken
for now and would appreciate any fix.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-06-30  6:32 Stephen Rothwell
  2017-07-03  8:14 ` Stephen Rothwell
@ 2017-07-03  8:57 ` David Miller
  1 sibling, 0 replies; 253+ messages in thread
From: David Miller @ 2017-07-03  8:57 UTC (permalink / raw)
  To: sfr; +Cc: akpm, netdev, linux-next, linux-kernel, danielmicay, ilant, saeedm

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 30 Jun 2017 16:32:41 +1000

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 30 Jun 2017 16:24:35 +1000
> Subject: [PATCH] net/mlx5: fix memcpy limit?
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied, thanks.

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-06-30  6:32 Stephen Rothwell
@ 2017-07-03  8:14 ` Stephen Rothwell
  2017-07-03  8:57 ` David Miller
  1 sibling, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-07-03  8:14 UTC (permalink / raw)
  To: Andrew Morton, David Miller, Networking
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Daniel Micay,
	Ilan Tayari, Saeed Mahameed

Hi all,

On Fri, 30 Jun 2017 16:32:41 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from include/linux/bitmap.h:8:0,
>                  from include/linux/cpumask.h:11,
>                  from include/linux/mm_types_task.h:13,
>                  from include/linux/mm_types.h:4,
>                  from include/linux/kmemcheck.h:4,
>                  from include/linux/skbuff.h:18,
>                  from include/linux/if_ether.h:23,
>                  from include/linux/etherdevice.h:25,
>                  from drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c:33:
> In function 'memcpy',
>     inlined from 'mlx5_fpga_query_qp' at drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c:194:2:
> include/linux/string.h:315:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
>     __read_overflow2();
>     ^
> 
> Caused by commit
> 
>   c151149cc4db ("include/linux/string.h: add the option of fortified string.h functions")
> 
> interacting with commit
> 
>   6062118d5cd2 ("net/mlx5: FPGA, Add FW commands for FPGA QPs")
> 
> from the net-next tree.
> 
> I took a guess and tried the following patch which seemed to work.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 30 Jun 2017 16:24:35 +1000
> Subject: [PATCH] net/mlx5: fix memcpy limit?
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
> index 5cb855fd618f..e37453d838db 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
> @@ -191,7 +191,7 @@ int mlx5_fpga_query_qp(struct mlx5_core_dev *dev,
>  	if (ret)
>  		return ret;
>  
> -	memcpy(fpga_qpc, MLX5_ADDR_OF(fpga_query_qp_out, in, fpga_qpc),
> +	memcpy(fpga_qpc, MLX5_ADDR_OF(fpga_query_qp_out, out, fpga_qpc),
>  	       MLX5_FLD_SZ_BYTES(fpga_query_qp_out, fpga_qpc));
>  	return ret;
>  }
> -- 
> 2.11.0

Again today ... so is the fix correct?  if so, Dave should apply it, if
not someone should supply a correct fix for Dave.

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build failure after merge of the akpm tree
@ 2017-06-30  6:32 Stephen Rothwell
  2017-07-03  8:14 ` Stephen Rothwell
  2017-07-03  8:57 ` David Miller
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-06-30  6:32 UTC (permalink / raw)
  To: Andrew Morton, David Miller, Networking
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Daniel Micay,
	Ilan Tayari, Saeed Mahameed

Hi all,

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

In file included from include/linux/bitmap.h:8:0,
                 from include/linux/cpumask.h:11,
                 from include/linux/mm_types_task.h:13,
                 from include/linux/mm_types.h:4,
                 from include/linux/kmemcheck.h:4,
                 from include/linux/skbuff.h:18,
                 from include/linux/if_ether.h:23,
                 from include/linux/etherdevice.h:25,
                 from drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c:33:
In function 'memcpy',
    inlined from 'mlx5_fpga_query_qp' at drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c:194:2:
include/linux/string.h:315:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
    __read_overflow2();
    ^

Caused by commit

  c151149cc4db ("include/linux/string.h: add the option of fortified string.h functions")

interacting with commit

  6062118d5cd2 ("net/mlx5: FPGA, Add FW commands for FPGA QPs")

from the net-next tree.

I took a guess and tried the following patch which seemed to work.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 30 Jun 2017 16:24:35 +1000
Subject: [PATCH] net/mlx5: fix memcpy limit?

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
index 5cb855fd618f..e37453d838db 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
@@ -191,7 +191,7 @@ int mlx5_fpga_query_qp(struct mlx5_core_dev *dev,
 	if (ret)
 		return ret;
 
-	memcpy(fpga_qpc, MLX5_ADDR_OF(fpga_query_qp_out, in, fpga_qpc),
+	memcpy(fpga_qpc, MLX5_ADDR_OF(fpga_query_qp_out, out, fpga_qpc),
 	       MLX5_FLD_SZ_BYTES(fpga_query_qp_out, fpga_qpc));
 	return ret;
 }
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-06-26  7:13 ` Michal Hocko
@ 2017-06-26 21:48   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-06-26 21:48 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Andrew Morton, David Miller, Linux-Next Mailing List,
	Linux Kernel Mailing List, Jag Raman

Hi Michal,

On Mon, 26 Jun 2017 09:13:46 +0200 Michal Hocko <mhocko@kernel.org> wrote:
>
> On Mon 26-06-17 16:53:43, Stephen Rothwell wrote:
> > 
> > After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> > failed like this:
> > 
> > arch/sparc/kernel/mdesc.c: In function 'mdesc_kmalloc':
> > arch/sparc/kernel/mdesc.c:208:48: error: '__GFP_REPEAT' undeclared (first use in this function)
> >   base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_REPEAT);
> >                                                 ^
> > 
> > Caused by commit
> > 
> >   726ad49b664b ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic")
> > 
> > interacting with commit
> > 
> >   0ab2fcd69dbf ("sparc64: mdesc: use __GFP_REPEAT action modifier for VM allocation")
> > 
> > from the sparc-next tree.
> > 
> > For now I have applied the following (I expect it to be replaced with
> > something better):  
> 
> You simply want s@__GFP_REPEAT@__GFP_RETRY_MAYFAIL@

OK, I have replaced the patch with this:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 26 Jun 2017 16:47:46 +1000
Subject: [PATCH] paper over the removal of __GFP_REPEAT for now

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/kernel/mdesc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index e4b4e790bf89..c9ecd5abf5bf 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -205,7 +205,7 @@ static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size)
 	handle_size = (sizeof(struct mdesc_handle) -
 		       sizeof(struct mdesc_hdr) +
 		       mdesc_size);
-	base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_REPEAT);
+	base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_RETRY_MAYFAIL);
 	if (!base)
 		return NULL;
 
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-06-26  6:53 Stephen Rothwell
@ 2017-06-26  7:13 ` Michal Hocko
  2017-06-26 21:48   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Michal Hocko @ 2017-06-26  7:13 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, David Miller, Linux-Next Mailing List,
	Linux Kernel Mailing List, Jag Raman

On Mon 26-06-17 16:53:43, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> arch/sparc/kernel/mdesc.c: In function 'mdesc_kmalloc':
> arch/sparc/kernel/mdesc.c:208:48: error: '__GFP_REPEAT' undeclared (first use in this function)
>   base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_REPEAT);
>                                                 ^
> 
> Caused by commit
> 
>   726ad49b664b ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic")
> 
> interacting with commit
> 
>   0ab2fcd69dbf ("sparc64: mdesc: use __GFP_REPEAT action modifier for VM allocation")
> 
> from the sparc-next tree.
> 
> For now I have applied the following (I expect it to be replaced with
> something better):

You simply want s@__GFP_REPEAT@__GFP_RETRY_MAYFAIL@

> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 26 Jun 2017 16:47:46 +1000
> Subject: [PATCH] paper over the removal of __GFP_REPEAT for now
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/sparc/kernel/mdesc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
> index e4b4e790bf89..c9ecd5abf5bf 100644
> --- a/arch/sparc/kernel/mdesc.c
> +++ b/arch/sparc/kernel/mdesc.c
> @@ -205,7 +205,7 @@ static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size)
>  	handle_size = (sizeof(struct mdesc_handle) -
>  		       sizeof(struct mdesc_hdr) +
>  		       mdesc_size);
> -	base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_REPEAT);
> +	base = kmalloc(handle_size + 15, GFP_KERNEL /* | __GFP_REPEAT */);
>  	if (!base)
>  		return NULL;
>  
> -- 
> 2.11.0
> 
> -- 
> Cheers,
> Stephen Rothwell

-- 
Michal Hocko
SUSE Labs

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

* linux-next: build failure after merge of the akpm tree
@ 2017-06-26  6:53 Stephen Rothwell
  2017-06-26  7:13 ` Michal Hocko
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2017-06-26  6:53 UTC (permalink / raw)
  To: Andrew Morton, David Miller
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Jag Raman,
	Michal Hocko

Hi Andrew,

After merging the akpm tree, today's linux-next build (sparc64 defconfig)
failed like this:

arch/sparc/kernel/mdesc.c: In function 'mdesc_kmalloc':
arch/sparc/kernel/mdesc.c:208:48: error: '__GFP_REPEAT' undeclared (first use in this function)
  base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_REPEAT);
                                                ^

Caused by commit

  726ad49b664b ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic")

interacting with commit

  0ab2fcd69dbf ("sparc64: mdesc: use __GFP_REPEAT action modifier for VM allocation")

from the sparc-next tree.

For now I have applied the following (I expect it to be replaced with
something better):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 26 Jun 2017 16:47:46 +1000
Subject: [PATCH] paper over the removal of __GFP_REPEAT for now

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/sparc/kernel/mdesc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index e4b4e790bf89..c9ecd5abf5bf 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -205,7 +205,7 @@ static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size)
 	handle_size = (sizeof(struct mdesc_handle) -
 		       sizeof(struct mdesc_hdr) +
 		       mdesc_size);
-	base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_REPEAT);
+	base = kmalloc(handle_size + 15, GFP_KERNEL /* | __GFP_REPEAT */);
 	if (!base)
 		return NULL;
 
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build failure after merge of the akpm tree
@ 2017-04-20  6:18 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-04-20  6:18 UTC (permalink / raw)
  To: Andrew Morton, Steven Whitehouse, Bob Peterson
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Deepa Dinamani

Hi all,

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

fs/gfs2/bmap.c: In function 'sweep_bh_for_rgrps':
fs/gfs2/bmap.c:1075:5: error: 'CURRENT_TIME' undeclared (first use in this function)
     CURRENT_TIME;
     ^
fs/gfs2/bmap.c:1075:5: note: each undeclared identifier is reported only once for each function it appears in
fs/gfs2/bmap.c: In function 'trunc_dealloc':
fs/gfs2/bmap.c:1296:47: error: 'CURRENT_TIME' undeclared (first use in this function)
   ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
                                               ^

Caused by patch

  "time: delete CURRENT_TIME_SEC and CURRENT_TIME"

interacting with commit

  d552a2b9b33e ("GFS2: Non-recursive delete")

from the gfs2 tree.

I have applied the following fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 20 Apr 2017 16:14:15 +1000
Subject: [PATCH] gfs2: replace CURRENT_TIME with current_time

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

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 3814a60e0aea..4d810be532dd 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -1072,7 +1072,7 @@ static int sweep_bh_for_rgrps(struct gfs2_inode *ip, struct gfs2_holder *rd_gh,
 			/* Every transaction boundary, we rewrite the dinode
 			   to keep its di_blocks current in case of failure. */
 			ip->i_inode.i_mtime = ip->i_inode.i_ctime =
-				CURRENT_TIME;
+				current_time(&ip->i_inode);
 			gfs2_trans_add_meta(ip->i_gl, dibh);
 			gfs2_dinode_out(ip, dibh->b_data);
 			up_write(&ip->i_rw_mutex);
@@ -1293,7 +1293,7 @@ static int trunc_dealloc(struct gfs2_inode *ip, u64 newsize)
 		gfs2_statfs_change(sdp, 0, +btotal, 0);
 		gfs2_quota_change(ip, -(s64)btotal, ip->i_inode.i_uid,
 				  ip->i_inode.i_gid);
-		ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
+		ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
 		gfs2_trans_add_meta(ip->i_gl, dibh);
 		gfs2_dinode_out(ip, dibh->b_data);
 		up_write(&ip->i_rw_mutex);
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build failure after merge of the akpm tree
@ 2017-04-18  8:09 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-04-18  8:09 UTC (permalink / raw)
  To: Andrew Morton, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Masami Hiramatsu, Laura Abbott

Hi all,

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

arch/x86/kernel/kprobes/opt.c: In function 'arch_prepare_optimized_kprobe':
arch/x86/kernel/kprobes/opt.c:357:2: error: implicit declaration of function 'set_memory_rw' [-Werror=implicit-function-declaration]
  set_memory_rw((unsigned long)buf & PAGE_MASK, 1);
  ^
arch/x86/kernel/kprobes/opt.c:380:2: error: implicit declaration of function 'set_memory_ro' [-Werror=implicit-function-declaration]
  set_memory_ro((unsigned long)buf & PAGE_MASK, 1);
  ^
arch/x86/kernel/kprobes/core.c: In function 'arch_copy_kprobe':
arch/x86/kernel/kprobes/core.c:424:2: error: implicit declaration of function 'set_memory_rw' [-Werror=implicit-function-declaration]
  set_memory_rw((unsigned long)p->ainsn.insn & PAGE_MASK, 1);
  ^
arch/x86/kernel/kprobes/core.c:437:2: error: implicit declaration of function 'set_memory_ro' [-Werror=implicit-function-declaration]
  set_memory_ro((unsigned long)p->ainsn.insn & PAGE_MASK, 1);
  ^

Probably caused by commit

  f276e80d1e7b ("treewide: decouple cacheflush.h and set_memory.h")

interacting with commit

  d0381c81c2f7 ("kprobes/x86: Set kprobes pages read-only")

from the tip tree.

I applied this merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 18 Apr 2017 17:59:09 +1000
Subject: [PATCH] kprobes/x86: merge fix for set_memory.h decoupling

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/kernel/kprobes/core.c | 1 +
 arch/x86/kernel/kprobes/opt.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 19e1f2a6d7b0..5b2bbfbb3712 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -61,6 +61,7 @@
 #include <asm/alternative.h>
 #include <asm/insn.h>
 #include <asm/debugreg.h>
+#include <asm/set_memory.h>
 
 #include "common.h"
 
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index 9aadff3d0902..901c640d152f 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -37,6 +37,7 @@
 #include <asm/alternative.h>
 #include <asm/insn.h>
 #include <asm/debugreg.h>
+#include <asm/set_memory.h>
 
 #include "common.h"
 
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build failure after merge of the akpm tree
@ 2017-04-10  7:51 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-04-10  7:51 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Jérôme Glisse, Kirill A. Shutemov

Hi Andrew,

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

mm/migrate.c: In function 'migrate_vma_insert_page':
mm/migrate.c:2491:23: error: passing argument 2 of 'pud_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types]
  pudp = pud_alloc(mm, pgdp, addr);
                       ^
In file included from include/linux/migrate.h:4:0,
                 from mm/migrate.c:15:
include/linux/mm.h:1677:22: note: expected 'p4d_t * {aka struct <anonymous> *}' but argument is of type 'pgd_t * {aka struct <anonymous> *}'
 static inline pud_t *pud_alloc(struct mm_struct *mm, p4d_t *p4d,
                      ^

Caused by patch

  "mm/migrate: allow migrate_vma() to alloc new page on empty entry"

interacting with commit

  c2febafc6773 ("mm: convert generic code to 5-level paging")

from Linus' tree (v4.11-rc2).

I applied the following fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 10 Apr 2017 17:09:15 +1000
Subject: [PATCH] mm/migrate: allow migrate_vma() to alloc new page on empty
 entry fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/migrate.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index e4b555f9a689..7958dfa01b16 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2478,6 +2478,7 @@ static void migrate_vma_insert_page(struct migrate_vma *migrate,
 	struct mem_cgroup *memcg;
 	spinlock_t *ptl;
 	pgd_t *pgdp;
+	p4d_t *p4dp;
 	pud_t *pudp;
 	pmd_t *pmdp;
 	pte_t *ptep;
@@ -2488,7 +2489,10 @@ static void migrate_vma_insert_page(struct migrate_vma *migrate,
 		goto abort;
 
 	pgdp = pgd_offset(mm, addr);
-	pudp = pud_alloc(mm, pgdp, addr);
+	p4dp = p4d_alloc(mm, pgdp, addr);
+	if (!p4dp)
+		goto abort;
+	pudp = pud_alloc(mm, p4dp, addr);
 	if (!pudp)
 		goto abort;
 	pmdp = pmd_alloc(mm, pudp, addr);
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-03-20 13:07 ` Michal Hocko
@ 2017-03-20 13:22   ` Jaegeuk Kim
  0 siblings, 0 replies; 253+ messages in thread
From: Jaegeuk Kim @ 2017-03-20 13:22 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Stephen Rothwell, Andrew Morton, linux-next, linux-kernel, Chao Yu

On 03/20, Michal Hocko wrote:
> On Mon 20-03-17 16:37:35, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > fs/f2fs/node.c: In function 'init_free_nid_cache':
> > fs/f2fs/node.c:2634:25: error: implicit declaration of function 'f2fs_kvzalloc' [-Werror=implicit-function-declaration]
> >   nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
> >                          ^
> > fs/f2fs/node.c:2634:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
> >   nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
> >                        ^
> > 
> > Caused by commit
> > 
> >   69e5e80117a3 ("mm: introduce kv[mz]alloc helpers")
> > 
> > interacting with commit
> > 
> >   c48b15867a2f ("f2fs: skip scanning free nid bitmap of full NAT blocks")
> > 
> > from the f2fs tree.
> > 
> > I applied the following fix patch:
> 
> yes this is correct. Thanks!

Thank you for checking this out.

Thanks,

> 
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 20 Mar 2017 16:28:21 +1100
> > Subject: [PATCH] mm: introduce kv[mz]alloc helpers - f2fs fix up
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  fs/f2fs/node.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> > index cdbb05745895..0ea1dca8a0e2 100644
> > --- a/fs/f2fs/node.c
> > +++ b/fs/f2fs/node.c
> > @@ -2631,7 +2631,7 @@ static int init_free_nid_cache(struct f2fs_sb_info *sbi)
> >  	if (!nm_i->nat_block_bitmap)
> >  		return -ENOMEM;
> >  
> > -	nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
> > +	nm_i->free_nid_count = kvzalloc(nm_i->nat_blocks *
> >  					sizeof(unsigned short), GFP_KERNEL);
> >  	if (!nm_i->free_nid_count)
> >  		return -ENOMEM;
> > -- 
> > 2.11.0
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell
> 
> -- 
> Michal Hocko
> SUSE Labs

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-03-20  5:37 Stephen Rothwell
@ 2017-03-20 13:07 ` Michal Hocko
  2017-03-20 13:22   ` Jaegeuk Kim
  0 siblings, 1 reply; 253+ messages in thread
From: Michal Hocko @ 2017-03-20 13:07 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Jaegeuk Kim, linux-next, linux-kernel, Chao Yu

On Mon 20-03-17 16:37:35, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> fs/f2fs/node.c: In function 'init_free_nid_cache':
> fs/f2fs/node.c:2634:25: error: implicit declaration of function 'f2fs_kvzalloc' [-Werror=implicit-function-declaration]
>   nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
>                          ^
> fs/f2fs/node.c:2634:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>   nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
>                        ^
> 
> Caused by commit
> 
>   69e5e80117a3 ("mm: introduce kv[mz]alloc helpers")
> 
> interacting with commit
> 
>   c48b15867a2f ("f2fs: skip scanning free nid bitmap of full NAT blocks")
> 
> from the f2fs tree.
> 
> I applied the following fix patch:

yes this is correct. Thanks!

> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 20 Mar 2017 16:28:21 +1100
> Subject: [PATCH] mm: introduce kv[mz]alloc helpers - f2fs fix up
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  fs/f2fs/node.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index cdbb05745895..0ea1dca8a0e2 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -2631,7 +2631,7 @@ static int init_free_nid_cache(struct f2fs_sb_info *sbi)
>  	if (!nm_i->nat_block_bitmap)
>  		return -ENOMEM;
>  
> -	nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
> +	nm_i->free_nid_count = kvzalloc(nm_i->nat_blocks *
>  					sizeof(unsigned short), GFP_KERNEL);
>  	if (!nm_i->free_nid_count)
>  		return -ENOMEM;
> -- 
> 2.11.0
> 
> -- 
> Cheers,
> Stephen Rothwell

-- 
Michal Hocko
SUSE Labs

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

* linux-next: build failure after merge of the akpm tree
@ 2017-03-20  5:37 Stephen Rothwell
  2017-03-20 13:07 ` Michal Hocko
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2017-03-20  5:37 UTC (permalink / raw)
  To: Andrew Morton, Jaegeuk Kim
  Cc: linux-next, linux-kernel, Michal Hocko, Chao Yu

Hi Andrew,

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

fs/f2fs/node.c: In function 'init_free_nid_cache':
fs/f2fs/node.c:2634:25: error: implicit declaration of function 'f2fs_kvzalloc' [-Werror=implicit-function-declaration]
  nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
                         ^
fs/f2fs/node.c:2634:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
                       ^

Caused by commit

  69e5e80117a3 ("mm: introduce kv[mz]alloc helpers")

interacting with commit

  c48b15867a2f ("f2fs: skip scanning free nid bitmap of full NAT blocks")

from the f2fs tree.

I applied the following fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 20 Mar 2017 16:28:21 +1100
Subject: [PATCH] mm: introduce kv[mz]alloc helpers - f2fs fix up

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/f2fs/node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index cdbb05745895..0ea1dca8a0e2 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2631,7 +2631,7 @@ static int init_free_nid_cache(struct f2fs_sb_info *sbi)
 	if (!nm_i->nat_block_bitmap)
 		return -ENOMEM;
 
-	nm_i->free_nid_count = f2fs_kvzalloc(nm_i->nat_blocks *
+	nm_i->free_nid_count = kvzalloc(nm_i->nat_blocks *
 					sizeof(unsigned short), GFP_KERNEL);
 	if (!nm_i->free_nid_count)
 		return -ENOMEM;
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2017-03-07  3:07 Stephen Rothwell
@ 2017-03-07  3:55 ` Laura Abbott
  0 siblings, 0 replies; 253+ messages in thread
From: Laura Abbott @ 2017-03-07  3:55 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton; +Cc: linux-next, linux-kernel

On 03/06/2017 07:07 PM, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/clnt.h:27,
>                  from include/linux/nfs_fs.h:30,
>                  from init/do_mounts.c:32:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from arch/powerpc/net/bpf_jit_comp64.c:17:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from ipc/mqueue.c:42:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> kernel/module.c:52:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/clnt.h:27,
>                  from include/linux/nfs_fs.h:30,
>                  from kernel/sysctl.c:54:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/extable.c:25:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from kernel/cgroup/cgroup.c:57:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/bpf/inode.c:22:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/kallsyms.c:26:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/events/core.c:46:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/bpf/core.c:24:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/bpf/hashtab.c:15:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/linux/bpf_verifier.h:11:0,
>                  from kernel/bpf/verifier.c:17:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/bpf/stackmap.c:9:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/seccomp.c:31:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/trace/events/bpf.h:7:0,
>                  from include/linux/bpf_trace.h:4,
>                  from kernel/bpf/syscall.c:13:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/net/inet_sock.h:27,
>                  from include/net/ip.h:30,
>                  from include/net/busy_poll.h:30,
>                  from fs/select.c:31:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/bpf/helpers.c:20:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from kernel/bpf/cgroup.c:17:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from kernel/bpf/lpm_trie.c:17:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/bpf/arraymap.c:16:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from kernel/trace/bpf_trace.c:13:0:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/if_pppox.h:46,
>                  from fs/compat_ioctl.c:38:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from fs/cifs/cifsfs.c:41:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/clnt.h:27,
>                  from include/linux/nfs_fs.h:30,
>                  from fs/lockd/clntlock.c:13:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/clnt.h:27,
>                  from include/linux/nfs_fs.h:30,
>                  from fs/lockd/clntproc.c:14:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from fs/cifs/cifspdu.h:25,
>                  from fs/cifs/cifssmb.c:39:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from fs/cifs/cifspdu.h:25,
>                  from fs/cifs/cifs_debug.c:28:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from fs/cifs/connect.c:43:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/addr.h:13,
>                  from fs/nfs/client.c:23:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/lockd/lockd.h:16,
>                  from fs/nfsd/nfsctl.c:12:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/if_inet6.h:19,
>                  from include/net/addrconf.h:51,
>                  from fs/nfsd/nfssvc.c:22:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/clnt.h:27,
>                  from include/linux/nfs_fs.h:30,
>                  from fs/nfs/file.c:25:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/clnt.h:27,
>                  from fs/nfs/dir.c:29:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> In file included from include/net/sock.h:64:0,
>                  from include/linux/tcp.h:23,
>                  from include/linux/ipv6.h:83,
>                  from include/net/ipv6.h:16,
>                  from include/linux/sunrpc/addr.h:13,
>                  from fs/nfsd/nfscache.c:13:
> include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
> 
> Caused by patches
> 
>   include/linux/filter.h: use set_memory.h header
>   module: use set_memory.h header
> 
> I think this series is not really ready yet :-(
> 
> I removed patches:
> 
> treewide-move-set_memory_-functions-away-from-cacheflushh.patch
> treewide-move-set_memory_-functions-away-from-cacheflushh-fix.patch
> arm-use-set_memoryh-header.patch
> arm64-use-set_memoryh-header.patch
> arm64-use-set_memoryh-header-fix.patch
> s390-use-set_memoryh-header.patch
> x86-use-set_memoryh-header.patch
> agp-use-set_memoryh-header.patch
> drm-use-set_memoryh-header.patch
> intel_th-use-set_memoryh-header.patch
> watchdog-hpwdt-use-set_memoryh-header.patch
> #bpf-use-set_memoryh-header.patch: robot error
> bpf-use-set_memoryh-header.patch
> module-use-set_memoryh-header.patch
> pm-hibernate-use-set_memoryh-header.patch
> alsa-hda-use-set_memoryh-header.patch
> #treewide-decouple-cacheflushh-and-set_memoryh.patch: robot errors
> treewide-decouple-cacheflushh-and-set_memoryh.patch
> treewide-decouple-cacheflushh-and-set_memoryh-fix.patch
> treewide-decouple-cacheflushh-and-set_memoryh-fix-fix.patch
> treewide-decouple-cacheflushh-and-set_memoryh-fix-fix-fix.patch
> treewide-decouple-cacheflushh-and-set_memoryh-fix-fix-fix-fix.patch
> treewide-decouple-cacheflushh-and-set_memoryh-fix-fix-fix-fix-fix.patch
> treewide-decouple-cacheflushh-and-set_memoryh-fix-fix-fix-fix-fix-fix.patch
> 
> from the akpm tree (as well as the other 2 fixes I posted) for today.
> 

Yes, please drop this for now. I'm still finding more places to fixup.

Thanks,
Laura

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

* linux-next: build failure after merge of the akpm tree
@ 2017-03-07  3:07 Stephen Rothwell
  2017-03-07  3:55 ` Laura Abbott
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2017-03-07  3:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Laura Abbott

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from init/do_mounts.c:32:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from arch/powerpc/net/bpf_jit_comp64.c:17:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from ipc/mqueue.c:42:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
kernel/module.c:52:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from kernel/sysctl.c:54:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/extable.c:25:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from kernel/cgroup/cgroup.c:57:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/bpf/inode.c:22:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/kallsyms.c:26:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/events/core.c:46:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/bpf/core.c:24:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/bpf/hashtab.c:15:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/linux/bpf_verifier.h:11:0,
                 from kernel/bpf/verifier.c:17:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/bpf/stackmap.c:9:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/seccomp.c:31:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/trace/events/bpf.h:7:0,
                 from include/linux/bpf_trace.h:4,
                 from kernel/bpf/syscall.c:13:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/net/inet_sock.h:27,
                 from include/net/ip.h:30,
                 from include/net/busy_poll.h:30,
                 from fs/select.c:31:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/bpf/helpers.c:20:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from kernel/bpf/cgroup.c:17:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from kernel/bpf/lpm_trie.c:17:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/bpf/arraymap.c:16:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from kernel/trace/bpf_trace.c:13:0:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/if_pppox.h:46,
                 from fs/compat_ioctl.c:38:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from fs/cifs/cifsfs.c:41:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from fs/lockd/clntlock.c:13:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from fs/lockd/clntproc.c:14:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from fs/cifs/cifspdu.h:25,
                 from fs/cifs/cifssmb.c:39:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from fs/cifs/cifspdu.h:25,
                 from fs/cifs/cifs_debug.c:28:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from fs/cifs/connect.c:43:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/addr.h:13,
                 from fs/nfs/client.c:23:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/lockd/lockd.h:16,
                 from fs/nfsd/nfsctl.c:12:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/if_inet6.h:19,
                 from include/net/addrconf.h:51,
                 from fs/nfsd/nfssvc.c:22:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from fs/nfs/file.c:25:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from fs/nfs/dir.c:29:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory
In file included from include/net/sock.h:64:0,
                 from include/linux/tcp.h:23,
                 from include/linux/ipv6.h:83,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/addr.h:13,
                 from fs/nfsd/nfscache.c:13:
include/linux/filter.h:21:28: fatal error: asm/set_memory.h: No such file or directory

Caused by patches

  include/linux/filter.h: use set_memory.h header
  module: use set_memory.h header

I think this series is not really ready yet :-(

I removed patches:

treewide-move-set_memory_-functions-away-from-cacheflushh.patch
treewide-move-set_memory_-functions-away-from-cacheflushh-fix.patch
arm-use-set_memoryh-header.patch
arm64-use-set_memoryh-header.patch
arm64-use-set_memoryh-header-fix.patch
s390-use-set_memoryh-header.patch
x86-use-set_memoryh-header.patch
agp-use-set_memoryh-header.patch
drm-use-set_memoryh-header.patch
intel_th-use-set_memoryh-header.patch
watchdog-hpwdt-use-set_memoryh-header.patch
#bpf-use-set_memoryh-header.patch: robot error
bpf-use-set_memoryh-header.patch
module-use-set_memoryh-header.patch
pm-hibernate-use-set_memoryh-header.patch
alsa-hda-use-set_memoryh-header.patch
#treewide-decouple-cacheflushh-and-set_memoryh.patch: robot errors
treewide-decouple-cacheflushh-and-set_memoryh.patch
treewide-decouple-cacheflushh-and-set_memoryh-fix.patch
treewide-decouple-cacheflushh-and-set_memoryh-fix-fix.patch
treewide-decouple-cacheflushh-and-set_memoryh-fix-fix-fix.patch
treewide-decouple-cacheflushh-and-set_memoryh-fix-fix-fix-fix.patch
treewide-decouple-cacheflushh-and-set_memoryh-fix-fix-fix-fix-fix.patch
treewide-decouple-cacheflushh-and-set_memoryh-fix-fix-fix-fix-fix-fix.patch

from the akpm tree (as well as the other 2 fixes I posted) for today.

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build failure after merge of the akpm tree
@ 2017-03-07  2:38 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-03-07  2:38 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Laura Abbott

Hi Andrew,

After merging the akpm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

arch/arm/kernel/machine_kexec.c: In function 'machine_kexec':
arch/arm/kernel/machine_kexec.c:163:2: error: implicit declaration of function 'set_kernel_text_rw' [-Werror=implicit-function-declaration]
  set_kernel_text_rw();
  ^

Caused by patches

  treewide: move set_memory_* functions away from cacheflush.h
  treewide: decouple cacheflush.h and set_memory.h

I have added this fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 7 Mar 2017 13:28:38 +1100
Subject: [PATCH] treewide-decouple-cacheflushh-and-set_memoryh-fix-7

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/arm/kernel/machine_kexec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
index b18c1ea56bed..80f48f522b0c 100644
--- a/arch/arm/kernel/machine_kexec.c
+++ b/arch/arm/kernel/machine_kexec.c
@@ -14,6 +14,7 @@
 #include <asm/pgalloc.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
+#include <asm/set_memory.h>
 #include <asm/fncpy.h>
 #include <asm/mach-types.h>
 #include <asm/smp_plat.h>
-- 
2.11.0

Which lead to (again in the arm multi_v7_defconfig build):

drivers/misc/sram-exec.c: In function 'sram_exec_copy':
drivers/misc/sram-exec.c:93:2: error: implicit declaration of function 'set_memory_nx' [-Werror=implicit-function-declaration]
  set_memory_nx((unsigned long)base, pages);
  ^
drivers/misc/sram-exec.c:94:2: error: implicit declaration of function 'set_memory_rw' [-Werror=implicit-function-declaration]
  set_memory_rw((unsigned long)base, pages);
  ^
drivers/misc/sram-exec.c:98:2: error: implicit declaration of function 'set_memory_ro' [-Werror=implicit-function-declaration]
  set_memory_ro((unsigned long)base, pages);
  ^
drivers/misc/sram-exec.c:99:2: error: implicit declaration of function 'set_memory_x' [-Werror=implicit-function-declaration]
  set_memory_x((unsigned long)base, pages);
  ^

For which I added:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 7 Mar 2017 13:34:58 +1100
Subject: [PATCH] treewide-decouple-cacheflushh-and-set_memoryh-fix-8

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/misc/sram-exec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/sram-exec.c b/drivers/misc/sram-exec.c
index ac522417c462..225300bb5510 100644
--- a/drivers/misc/sram-exec.c
+++ b/drivers/misc/sram-exec.c
@@ -19,6 +19,7 @@
 #include <linux/sram.h>
 
 #include <asm/cacheflush.h>
+#include <asm/set_memory.h>
 
 #include "sram.h"
 
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build failure after merge of the akpm tree
@ 2017-01-09  4:09 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2017-01-09  4:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Johannes Weiner, Matthew Wilcox

Hi Andrew,

After merging the akpm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

lib/radix-tree.c: In function 'radix_tree_iter_delete':
lib/radix-tree.c:1952:3: error: too few arguments to function '__radix_tree_delete_node'
   __radix_tree_delete_node(root, node);
   ^
lib/radix-tree.c:1936:6: note: declared here
 void __radix_tree_delete_node(struct radix_tree_root *root,
      ^

Caused by patch

  "Reimplement IDR and IDA using the radix tree"

interacting with commit

  ea07b862ac8e ("mm: workingset: fix use-after-free in shadow node shrinker")

from Linus' tree.

I applied the following fixup patch (which may not be entirely complete,
of course).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 9 Jan 2017 15:05:08 +1100
Subject: [PATCH] mm: merge fixup for "fix use-after-free in shadow node shrinker"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 lib/radix-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index e563b5f50ace..4a8d206d508a 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -1949,7 +1949,7 @@ void radix_tree_iter_delete(struct radix_tree_root *root,
 	if (node) {
 		node->slots[iter_offset(iter)] = NULL;
 		node->count--;
-		__radix_tree_delete_node(root, node);
+		__radix_tree_delete_node(root, node, NULL, NULL);
 	} else {
 		root->rnode = NULL;
 	}
-- 
2.10.2

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-26 20:51                           ` Stephen Rothwell
@ 2016-01-26 21:22                             ` Takashi Iwai
  0 siblings, 0 replies; 253+ messages in thread
From: Takashi Iwai @ 2016-01-26 21:22 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mark Brown, Sudip Mukherjee, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart, Michael Ellerman

On Tue, 26 Jan 2016 21:51:30 +0100,
Stephen Rothwell wrote:
> 
> Hi Takashi,
> 
> On Mon, 25 Jan 2016 14:45:55 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> >
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH v2] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some
> >  architectures
> > 
> > Some architectures like PowerPC can handle the maximum struct size in
> > an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
> > SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit.  This
> > problem was revealed recently by a powerpc change, as it's now treated
> > as a fatal build error.
> > 
> > This patch is a workaround for that: for architectures with less than
> > 14 bit ioctl struct size, get rid of the handling of the relevant
> > ioctl.  We should provide an alternative equivalent ioctl code later,
> > but for now just paper over it.  Luckily, the compress API hasn't been
> > used on such architectures, so the impact must be effectively zero.
> > 
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  sound/core/compress_offload.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> > index 18b8dc45bb8f..0609e618107a 100644
> > --- a/sound/core/compress_offload.c
> > +++ b/sound/core/compress_offload.c
> > @@ -46,6 +46,13 @@
> >  #include <sound/compress_offload.h>
> >  #include <sound/compress_driver.h>
> >  
> > +/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
> > + *        architectures, so we need to disable the relevant ioctls.
> > + */
> > +#if _IOC_SIZEBITS < 14
> > +#define COMPR_CODEC_CAPS_OVERFLOW
> > +#endif
> > +
> >  /* TODO:
> >   * - add substream support for multiple devices in case of
> >   *	SND_DYNAMIC_MINORS is not used
> > @@ -440,6 +447,7 @@ out:
> >  	return retval;
> >  }
> >  
> > +#ifndef COMPR_CODEC_CAPS_OVERFLOW
> >  static int
> >  snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
> >  {
> > @@ -463,6 +471,7 @@ out:
> >  	kfree(caps);
> >  	return retval;
> >  }
> > +#endif /* !COMPR_CODEC_CAPS_OVERFLOW */
> >  
> >  /* revisit this with snd_pcm_preallocate_xxx */
> >  static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
> > @@ -801,9 +810,11 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
> >  	case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
> >  		retval = snd_compr_get_caps(stream, arg);
> >  		break;
> > +#ifndef COMPR_CODEC_CAPS_OVERFLOW
> >  	case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
> >  		retval = snd_compr_get_codec_caps(stream, arg);
> >  		break;
> > +#endif
> >  	case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS):
> >  		retval = snd_compr_set_params(stream, arg);
> >  		break;
> > -- 
> > 2.7.0
> 
> I have replaced my other patch in my fixes tree until someone gets this
> patch to Linus.

I've merged this to for-linus branch, so it'll be included in the next
pull request.


thanks,

Takashi

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 13:45                         ` Takashi Iwai
                                             ` (2 preceding siblings ...)
  2016-01-26 12:26                           ` Vinod Koul
@ 2016-01-26 20:51                           ` Stephen Rothwell
  2016-01-26 21:22                             ` Takashi Iwai
  3 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2016-01-26 20:51 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mark Brown, Sudip Mukherjee, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart, Michael Ellerman

Hi Takashi,

On Mon, 25 Jan 2016 14:45:55 +0100 Takashi Iwai <tiwai@suse.de> wrote:
>
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH v2] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some
>  architectures
> 
> Some architectures like PowerPC can handle the maximum struct size in
> an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
> SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit.  This
> problem was revealed recently by a powerpc change, as it's now treated
> as a fatal build error.
> 
> This patch is a workaround for that: for architectures with less than
> 14 bit ioctl struct size, get rid of the handling of the relevant
> ioctl.  We should provide an alternative equivalent ioctl code later,
> but for now just paper over it.  Luckily, the compress API hasn't been
> used on such architectures, so the impact must be effectively zero.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  sound/core/compress_offload.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> index 18b8dc45bb8f..0609e618107a 100644
> --- a/sound/core/compress_offload.c
> +++ b/sound/core/compress_offload.c
> @@ -46,6 +46,13 @@
>  #include <sound/compress_offload.h>
>  #include <sound/compress_driver.h>
>  
> +/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
> + *        architectures, so we need to disable the relevant ioctls.
> + */
> +#if _IOC_SIZEBITS < 14
> +#define COMPR_CODEC_CAPS_OVERFLOW
> +#endif
> +
>  /* TODO:
>   * - add substream support for multiple devices in case of
>   *	SND_DYNAMIC_MINORS is not used
> @@ -440,6 +447,7 @@ out:
>  	return retval;
>  }
>  
> +#ifndef COMPR_CODEC_CAPS_OVERFLOW
>  static int
>  snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
>  {
> @@ -463,6 +471,7 @@ out:
>  	kfree(caps);
>  	return retval;
>  }
> +#endif /* !COMPR_CODEC_CAPS_OVERFLOW */
>  
>  /* revisit this with snd_pcm_preallocate_xxx */
>  static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
> @@ -801,9 +810,11 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
>  	case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
>  		retval = snd_compr_get_caps(stream, arg);
>  		break;
> +#ifndef COMPR_CODEC_CAPS_OVERFLOW
>  	case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
>  		retval = snd_compr_get_codec_caps(stream, arg);
>  		break;
> +#endif
>  	case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS):
>  		retval = snd_compr_set_params(stream, arg);
>  		break;
> -- 
> 2.7.0

I have replaced my other patch in my fixes tree until someone gets this
patch to Linus.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 13:55                           ` Mark Brown
@ 2016-01-26 12:47                             ` Vinod Koul
  0 siblings, 0 replies; 253+ messages in thread
From: Vinod Koul @ 2016-01-26 12:47 UTC (permalink / raw)
  To: Mark Brown
  Cc: Takashi Iwai, Stephen Rothwell, Sudip Mukherjee, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

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

On Mon, Jan 25, 2016 at 01:55:46PM +0000, Mark Brown wrote:
> 
> though we will need to come up with an alternative solution for the
> affected architectures if anyone ends up caring (MIPS or PowerPC might
> possibly).

Okay I did some rethink on this. So we should be able to make
MAX_NUM_CODEC_DESCRIPTORS to 16. But that will be ABI change :(

Also further down the road if people start hitting this limit add
additional ioctl to get more descriptors, but for Intel devices this is
okay, WM doesn't seem to implement this..

Thanks
-- 
~Vinod

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 13:45                         ` Takashi Iwai
  2016-01-25 13:55                           ` Mark Brown
  2016-01-25 14:02                           ` Sudip Mukherjee
@ 2016-01-26 12:26                           ` Vinod Koul
  2016-01-26 20:51                           ` Stephen Rothwell
  3 siblings, 0 replies; 253+ messages in thread
From: Vinod Koul @ 2016-01-26 12:26 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mark Brown, Stephen Rothwell, Sudip Mukherjee, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, Jan 25, 2016 at 02:45:55PM +0100, Takashi Iwai wrote:
> Below is the revised one.

Acked-by: Vinod Koul <vinod.koul@intel.com>

Thanks for fixing this up...

-- 
~Vinod

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 13:45                         ` Takashi Iwai
  2016-01-25 13:55                           ` Mark Brown
@ 2016-01-25 14:02                           ` Sudip Mukherjee
  2016-01-26 12:26                           ` Vinod Koul
  2016-01-26 20:51                           ` Stephen Rothwell
  3 siblings, 0 replies; 253+ messages in thread
From: Sudip Mukherjee @ 2016-01-25 14:02 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mark Brown, Stephen Rothwell, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, Jan 25, 2016 at 02:45:55PM +0100, Takashi Iwai wrote:
> On Mon, 25 Jan 2016 14:10:37 +0100,
> Takashi Iwai wrote:
> > 
> > On Mon, 25 Jan 2016 12:41:50 +0100,
> > Mark Brown wrote:
> > > 
> > 
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  sound/core/compress_offload.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> > index 18b8dc45bb8f..36b0083fd9f4 100644
> > --- a/sound/core/compress_offload.c
> > +++ b/sound/core/compress_offload.c
> > @@ -46,6 +46,13 @@
> >  #include <sound/compress_offload.h>
> >  #include <sound/compress_driver.h>
> >  
> > +/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
> > + *        architectures, so we need to disable the relevant ioctls.
> > + */
> > +#if _IOC_SIZEBITS < 13
> 
> Argh, a typo here.  I forgot to refresh the patch, sorry.
> 
> Below is the revised one.

powerpc allmodconfig builds properly now.

Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>

regards
sudip

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 13:45                         ` Takashi Iwai
@ 2016-01-25 13:55                           ` Mark Brown
  2016-01-26 12:47                             ` Vinod Koul
  2016-01-25 14:02                           ` Sudip Mukherjee
                                             ` (2 subsequent siblings)
  3 siblings, 1 reply; 253+ messages in thread
From: Mark Brown @ 2016-01-25 13:55 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Stephen Rothwell, Sudip Mukherjee, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

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

On Mon, Jan 25, 2016 at 02:45:55PM +0100, Takashi Iwai wrote:

> Argh, a typo here.  I forgot to refresh the patch, sorry.

> Below is the revised one.

This makes sense to me.

Reviwed-by: Mark Brown <broonie@kernel.org>

though we will need to come up with an alternative solution for the
affected architectures if anyone ends up caring (MIPS or PowerPC might
possibly).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 13:10                       ` Takashi Iwai
@ 2016-01-25 13:45                         ` Takashi Iwai
  2016-01-25 13:55                           ` Mark Brown
                                             ` (3 more replies)
  0 siblings, 4 replies; 253+ messages in thread
From: Takashi Iwai @ 2016-01-25 13:45 UTC (permalink / raw)
  To: Mark Brown
  Cc: Stephen Rothwell, Sudip Mukherjee, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, 25 Jan 2016 14:10:37 +0100,
Takashi Iwai wrote:
> 
> On Mon, 25 Jan 2016 12:41:50 +0100,
> Mark Brown wrote:
> > 
> > On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > > Stephen Rothwell wrote:
> > 
> > > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > > index 50693c867e71..ee5f36b9c787 100644
> > > > --- a/sound/soc/codecs/Kconfig
> > > > +++ b/sound/soc/codecs/Kconfig
> > > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > > >  config SND_SOC_ALL_CODECS
> > > >  	tristate "Build all ASoC CODEC drivers"
> > > >  	depends on COMPILE_TEST
> > > > +	depends on !PPC
> > > >  	select SND_SOC_88PM860X if MFD_88PM860X
> > > >  	select SND_SOC_L3
> > > >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
> > 
> > > Suppressing this whole is an overreaction, IMO.  It should suffice
> > > just to disable compile-testing Intel driver.
> > 
> > Please send patches and reports to maintainers :(  I agree that this is
> > an absurdly wide change.
> > 
> > > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> > > index 803f95e40679..d854cd66e090 100644
> > > --- a/sound/soc/intel/Kconfig
> > > +++ b/sound/soc/intel/Kconfig
> > > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
> > >  	tristate
> > >  	select SND_SOC_INTEL_SST_ACPI if ACPI
> > >  	depends on (X86 || COMPILE_TEST)
> > > +	# FIXME: a part of compress API is broken for PPC
> > > +	depends on !PPC
> > 
> > Why is an Intel CPU thing being enabled by SND_SOC_ALL_CODECS?  I'm also
> > unclear why this will help when we're selecting in the drivers so their
> > dependencies will be ignored.
> 
> Yeah, obviously papering over a wrong place.
> 
> In anyway, thinking of this workaround again, I don't think it being
> the best way.  The easier and safer workaround is to just avoid the
> corresponding ioctl being handled.  The untested patch is attached
> below.
> 
> 
> thanks,
> 
> Takashi
> 
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some
>  architectures
> 
> Some architectures like PowerPC can handle the maximum struct size in
> an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
> SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit.  This
> problem was revealed recently by a powerpc change, as it's now treated
> as a fatal build error.
> 
> This patch is a workaround for that: for architectures with less than
> 14 bit ioctl struct size, get rid of the handling of the relevant
> ioctl.  We should provide an alternative equivalent ioctl code later,
> but for now just paper over it.  Luckily, the compress API hasn't been
> used on such architectures, so the impact must be effectively zero.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  sound/core/compress_offload.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
> index 18b8dc45bb8f..36b0083fd9f4 100644
> --- a/sound/core/compress_offload.c
> +++ b/sound/core/compress_offload.c
> @@ -46,6 +46,13 @@
>  #include <sound/compress_offload.h>
>  #include <sound/compress_driver.h>
>  
> +/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
> + *        architectures, so we need to disable the relevant ioctls.
> + */
> +#if _IOC_SIZEBITS < 13

Argh, a typo here.  I forgot to refresh the patch, sorry.

Below is the revised one.


Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH v2] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some
 architectures

Some architectures like PowerPC can handle the maximum struct size in
an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit.  This
problem was revealed recently by a powerpc change, as it's now treated
as a fatal build error.

This patch is a workaround for that: for architectures with less than
14 bit ioctl struct size, get rid of the handling of the relevant
ioctl.  We should provide an alternative equivalent ioctl code later,
but for now just paper over it.  Luckily, the compress API hasn't been
used on such architectures, so the impact must be effectively zero.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/compress_offload.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 18b8dc45bb8f..0609e618107a 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -46,6 +46,13 @@
 #include <sound/compress_offload.h>
 #include <sound/compress_driver.h>
 
+/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
+ *        architectures, so we need to disable the relevant ioctls.
+ */
+#if _IOC_SIZEBITS < 14
+#define COMPR_CODEC_CAPS_OVERFLOW
+#endif
+
 /* TODO:
  * - add substream support for multiple devices in case of
  *	SND_DYNAMIC_MINORS is not used
@@ -440,6 +447,7 @@ out:
 	return retval;
 }
 
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
 static int
 snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
 {
@@ -463,6 +471,7 @@ out:
 	kfree(caps);
 	return retval;
 }
+#endif /* !COMPR_CODEC_CAPS_OVERFLOW */
 
 /* revisit this with snd_pcm_preallocate_xxx */
 static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
@@ -801,9 +810,11 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
 	case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
 		retval = snd_compr_get_caps(stream, arg);
 		break;
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
 	case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
 		retval = snd_compr_get_codec_caps(stream, arg);
 		break;
+#endif
 	case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS):
 		retval = snd_compr_set_params(stream, arg);
 		break;
-- 
2.7.0

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 11:41                     ` Mark Brown
@ 2016-01-25 13:10                       ` Takashi Iwai
  2016-01-25 13:45                         ` Takashi Iwai
  0 siblings, 1 reply; 253+ messages in thread
From: Takashi Iwai @ 2016-01-25 13:10 UTC (permalink / raw)
  To: Mark Brown
  Cc: Takashi Iwai, Stephen Rothwell, Sudip Mukherjee, Vinod Koul,
	Andrew Morton, linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, 25 Jan 2016 12:41:50 +0100,
Mark Brown wrote:
> 
> On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > Stephen Rothwell wrote:
> 
> > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > index 50693c867e71..ee5f36b9c787 100644
> > > --- a/sound/soc/codecs/Kconfig
> > > +++ b/sound/soc/codecs/Kconfig
> > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > >  config SND_SOC_ALL_CODECS
> > >  	tristate "Build all ASoC CODEC drivers"
> > >  	depends on COMPILE_TEST
> > > +	depends on !PPC
> > >  	select SND_SOC_88PM860X if MFD_88PM860X
> > >  	select SND_SOC_L3
> > >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
> 
> > Suppressing this whole is an overreaction, IMO.  It should suffice
> > just to disable compile-testing Intel driver.
> 
> Please send patches and reports to maintainers :(  I agree that this is
> an absurdly wide change.
> 
> > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> > index 803f95e40679..d854cd66e090 100644
> > --- a/sound/soc/intel/Kconfig
> > +++ b/sound/soc/intel/Kconfig
> > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
> >  	tristate
> >  	select SND_SOC_INTEL_SST_ACPI if ACPI
> >  	depends on (X86 || COMPILE_TEST)
> > +	# FIXME: a part of compress API is broken for PPC
> > +	depends on !PPC
> 
> Why is an Intel CPU thing being enabled by SND_SOC_ALL_CODECS?  I'm also
> unclear why this will help when we're selecting in the drivers so their
> dependencies will be ignored.

Yeah, obviously papering over a wrong place.

In anyway, thinking of this workaround again, I don't think it being
the best way.  The easier and safer workaround is to just avoid the
corresponding ioctl being handled.  The untested patch is attached
below.


thanks,

Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some
 architectures

Some architectures like PowerPC can handle the maximum struct size in
an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit.  This
problem was revealed recently by a powerpc change, as it's now treated
as a fatal build error.

This patch is a workaround for that: for architectures with less than
14 bit ioctl struct size, get rid of the handling of the relevant
ioctl.  We should provide an alternative equivalent ioctl code later,
but for now just paper over it.  Luckily, the compress API hasn't been
used on such architectures, so the impact must be effectively zero.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/compress_offload.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 18b8dc45bb8f..36b0083fd9f4 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -46,6 +46,13 @@
 #include <sound/compress_offload.h>
 #include <sound/compress_driver.h>
 
+/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some
+ *        architectures, so we need to disable the relevant ioctls.
+ */
+#if _IOC_SIZEBITS < 13
+#define COMPR_CODEC_CAPS_OVERFLOW
+#endif
+
 /* TODO:
  * - add substream support for multiple devices in case of
  *	SND_DYNAMIC_MINORS is not used
@@ -440,6 +447,7 @@ out:
 	return retval;
 }
 
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
 static int
 snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg)
 {
@@ -463,6 +471,7 @@ out:
 	kfree(caps);
 	return retval;
 }
+#endif /* !COMPR_CODEC_CAPS_OVERFLOW */
 
 /* revisit this with snd_pcm_preallocate_xxx */
 static int snd_compr_allocate_buffer(struct snd_compr_stream *stream,
@@ -801,9 +810,11 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
 	case _IOC_NR(SNDRV_COMPRESS_GET_CAPS):
 		retval = snd_compr_get_caps(stream, arg);
 		break;
+#ifndef COMPR_CODEC_CAPS_OVERFLOW
 	case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
 		retval = snd_compr_get_codec_caps(stream, arg);
 		break;
+#endif
 	case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS):
 		retval = snd_compr_set_params(stream, arg);
 		break;
-- 
2.7.0

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25  9:29                   ` Takashi Iwai
                                       ` (2 preceding siblings ...)
  2016-01-25 10:45                     ` Sudip Mukherjee
@ 2016-01-25 11:41                     ` Mark Brown
  2016-01-25 13:10                       ` Takashi Iwai
  3 siblings, 1 reply; 253+ messages in thread
From: Mark Brown @ 2016-01-25 11:41 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Stephen Rothwell, Sudip Mukherjee, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

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

On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> Stephen Rothwell wrote:

> > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > index 50693c867e71..ee5f36b9c787 100644
> > --- a/sound/soc/codecs/Kconfig
> > +++ b/sound/soc/codecs/Kconfig
> > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> >  config SND_SOC_ALL_CODECS
> >  	tristate "Build all ASoC CODEC drivers"
> >  	depends on COMPILE_TEST
> > +	depends on !PPC
> >  	select SND_SOC_88PM860X if MFD_88PM860X
> >  	select SND_SOC_L3
> >  	select SND_SOC_AB8500_CODEC if ABX500_CORE

> Suppressing this whole is an overreaction, IMO.  It should suffice
> just to disable compile-testing Intel driver.

Please send patches and reports to maintainers :(  I agree that this is
an absurdly wide change.

> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index 803f95e40679..d854cd66e090 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
>  	tristate
>  	select SND_SOC_INTEL_SST_ACPI if ACPI
>  	depends on (X86 || COMPILE_TEST)
> +	# FIXME: a part of compress API is broken for PPC
> +	depends on !PPC

Why is an Intel CPU thing being enabled by SND_SOC_ALL_CODECS?  I'm also
unclear why this will help when we're selecting in the drivers so their
dependencies will be ignored.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 11:03                       ` Takashi Iwai
@ 2016-01-25 11:18                         ` Sudip Mukherjee
  0 siblings, 0 replies; 253+ messages in thread
From: Sudip Mukherjee @ 2016-01-25 11:18 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Stephen Rothwell, Mark Brown, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, Jan 25, 2016 at 12:03:54PM +0100, Takashi Iwai wrote:
> On Mon, 25 Jan 2016 11:45:56 +0100,
> Sudip Mukherjee wrote:
> > 
> > On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > > On Fri, 22 Jan 2016 03:40:45 +0100,
> > > Stephen Rothwell wrote:
> > > > 
> > > > Hi all,
> > > > 
<snip>
> > > > 
> > > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > > > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> > > >  for now
> > > > 
> > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > ---
> > > >  sound/soc/codecs/Kconfig | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > > index 50693c867e71..ee5f36b9c787 100644
> > > > --- a/sound/soc/codecs/Kconfig
> > > > +++ b/sound/soc/codecs/Kconfig
> > > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > > >  config SND_SOC_ALL_CODECS
> > > >  	tristate "Build all ASoC CODEC drivers"
> > > >  	depends on COMPILE_TEST
> > > > +	depends on !PPC
> > > >  	select SND_SOC_88PM860X if MFD_88PM860X
> > > >  	select SND_SOC_L3
> > > >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
> > > 
> > > Suppressing this whole is an overreaction, IMO.  It should suffice
> > > just to disable compile-testing Intel driver.
> > > How about the patch below?
> > > 
> > > 
> > > thanks,
> > > 
> > > Takashi
> > > 
> > > -- 8< --
> > > From: Takashi Iwai <tiwai@suse.de>
> > > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
> > > 
> > > Since some ioctl in compress offload API is broken for PPC (the struct
> > > size overflows), now we get actually the build error.
> > > 
> > > Until we get the proper solution (e.g. alternative ioctl), let's
> > > disable the build of Intel ASoC driver that is the only driver who
> > > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> > > mainline tree.
> > 
> > Sorry, but this does not fix the build failure.
> > I can still see SND_COMPRESS_OFFLOAD=m in .config and the build fails.
> 
> Who sets this config?  SND_COMPRESS_OFFLOAD has no prompt, so this
> should be default off.

I think when we are doing allmodconfig SND_SOC_COMPRESS will be selected
which in turn will select SND_COMPRESS_OFFLOAD as SND_SOC_COMPRESS
depends only on SND_SOC.

And alpha is not affected. It builds fine.

regards
sudip

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 10:45                     ` Sudip Mukherjee
@ 2016-01-25 11:03                       ` Takashi Iwai
  2016-01-25 11:18                         ` Sudip Mukherjee
  0 siblings, 1 reply; 253+ messages in thread
From: Takashi Iwai @ 2016-01-25 11:03 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Stephen Rothwell, Mark Brown, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, 25 Jan 2016 11:45:56 +0100,
Sudip Mukherjee wrote:
> 
> On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > On Fri, 22 Jan 2016 03:40:45 +0100,
> > Stephen Rothwell wrote:
> > > 
> > > Hi all,
> > > 
> > > On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > >
> > > > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:  
> > > > > >
> > > > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > > > Takashi Iwai wrote:    
> > > > > > > 
> > > > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > > > 
> > > > > > > A. Disable compress API for powerpc.    
> > > > > 
> > > > > This also affects alpha, mips and (maybe) sparc.  
> > > > 
> > > > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > > > UBSAN support") which is in Linus' tree as of this morning.  The only
> > > > relevant change that made was in the compiler flags (I tested this by
> > > > building the file without that commit but with these new compiler flags:
> > > > 
> > > > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > > > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > > > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > > > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > > > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > > > 
> > > > The preprocessed file is the same in both cases, but with these flags
> > > > the compiler errors.
> > > 
> > > So for now I have suppressed the error using the following patch (which
> > > I will keep in my fixes tree until some other fix is applied):
> > > 
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> > >  for now
> > > 
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > >  sound/soc/codecs/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > index 50693c867e71..ee5f36b9c787 100644
> > > --- a/sound/soc/codecs/Kconfig
> > > +++ b/sound/soc/codecs/Kconfig
> > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > >  config SND_SOC_ALL_CODECS
> > >  	tristate "Build all ASoC CODEC drivers"
> > >  	depends on COMPILE_TEST
> > > +	depends on !PPC
> > >  	select SND_SOC_88PM860X if MFD_88PM860X
> > >  	select SND_SOC_L3
> > >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
> > 
> > Suppressing this whole is an overreaction, IMO.  It should suffice
> > just to disable compile-testing Intel driver.
> > How about the patch below?
> > 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > -- 8< --
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
> > 
> > Since some ioctl in compress offload API is broken for PPC (the struct
> > size overflows), now we get actually the build error.
> > 
> > Until we get the proper solution (e.g. alternative ioctl), let's
> > disable the build of Intel ASoC driver that is the only driver who
> > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> > mainline tree.
> 
> Sorry, but this does not fix the build failure.
> I can still see SND_COMPRESS_OFFLOAD=m in .config and the build fails.

Who sets this config?  SND_COMPRESS_OFFLOAD has no prompt, so this
should be default off.

> But the following does fix it for powerpc:
> 
> diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
> index 7ea66ee..b92d286 100644
> --- a/sound/soc/Kconfig
> +++ b/sound/soc/Kconfig
> @@ -31,6 +31,7 @@ config SND_SOC_GENERIC_DMAENGINE_PCM
>  
>  config SND_SOC_COMPRESS
>  	bool
> +	depends on !PPC
>  	select SND_COMPRESS_OFFLOAD
>  
>  config SND_SOC_TOPOLOGY

It has a reverse-selection, and the reverse-selection ignores Depends,
AFAIK.  If that long-standing problem were already fixed, it's
great...


Takashi

> 
> -- 
> 
> I will just check with alpha and see if that is also affected.
> 
> regards
> sudip
> 

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25  9:29                   ` Takashi Iwai
  2016-01-25  9:40                     ` Michael Ellerman
  2016-01-25 10:41                     ` Vinod Koul
@ 2016-01-25 10:45                     ` Sudip Mukherjee
  2016-01-25 11:03                       ` Takashi Iwai
  2016-01-25 11:41                     ` Mark Brown
  3 siblings, 1 reply; 253+ messages in thread
From: Sudip Mukherjee @ 2016-01-25 10:45 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Stephen Rothwell, Mark Brown, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> On Fri, 22 Jan 2016 03:40:45 +0100,
> Stephen Rothwell wrote:
> > 
> > Hi all,
> > 
> > On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:  
> > > > >
> > > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > > Takashi Iwai wrote:    
> > > > > > 
> > > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > > 
> > > > > > A. Disable compress API for powerpc.    
> > > > 
> > > > This also affects alpha, mips and (maybe) sparc.  
> > > 
> > > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > > UBSAN support") which is in Linus' tree as of this morning.  The only
> > > relevant change that made was in the compiler flags (I tested this by
> > > building the file without that commit but with these new compiler flags:
> > > 
> > > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > > 
> > > The preprocessed file is the same in both cases, but with these flags
> > > the compiler errors.
> > 
> > So for now I have suppressed the error using the following patch (which
> > I will keep in my fixes tree until some other fix is applied):
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> >  for now
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  sound/soc/codecs/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > index 50693c867e71..ee5f36b9c787 100644
> > --- a/sound/soc/codecs/Kconfig
> > +++ b/sound/soc/codecs/Kconfig
> > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> >  config SND_SOC_ALL_CODECS
> >  	tristate "Build all ASoC CODEC drivers"
> >  	depends on COMPILE_TEST
> > +	depends on !PPC
> >  	select SND_SOC_88PM860X if MFD_88PM860X
> >  	select SND_SOC_L3
> >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
> 
> Suppressing this whole is an overreaction, IMO.  It should suffice
> just to disable compile-testing Intel driver.
> How about the patch below?
> 
> 
> thanks,
> 
> Takashi
> 
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
> 
> Since some ioctl in compress offload API is broken for PPC (the struct
> size overflows), now we get actually the build error.
> 
> Until we get the proper solution (e.g. alternative ioctl), let's
> disable the build of Intel ASoC driver that is the only driver who
> enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> mainline tree.

Sorry, but this does not fix the build failure.
I can still see SND_COMPRESS_OFFLOAD=m in .config and the build fails.

But the following does fix it for powerpc:

diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
index 7ea66ee..b92d286 100644
--- a/sound/soc/Kconfig
+++ b/sound/soc/Kconfig
@@ -31,6 +31,7 @@ config SND_SOC_GENERIC_DMAENGINE_PCM
 
 config SND_SOC_COMPRESS
 	bool
+	depends on !PPC
 	select SND_COMPRESS_OFFLOAD
 
 config SND_SOC_TOPOLOGY

-- 

I will just check with alpha and see if that is also affected.

regards
sudip

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25 10:41                     ` Vinod Koul
@ 2016-01-25 10:42                       ` Takashi Iwai
  0 siblings, 0 replies; 253+ messages in thread
From: Takashi Iwai @ 2016-01-25 10:42 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Stephen Rothwell, Mark Brown, Sudip Mukherjee, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, 25 Jan 2016 11:41:12 +0100,
Vinod Koul wrote:
> 
> On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> > On Fri, 22 Jan 2016 03:40:45 +0100,
> > Stephen Rothwell wrote:
> > > 
> > > Hi all,
> > > 
> > > On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > >
> > > > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:  
> > > > > >
> > > > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > > > Takashi Iwai wrote:    
> > > > > > > 
> > > > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > > > 
> > > > > > > A. Disable compress API for powerpc.    
> > > > > 
> > > > > This also affects alpha, mips and (maybe) sparc.  
> > > > 
> > > > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > > > UBSAN support") which is in Linus' tree as of this morning.  The only
> > > > relevant change that made was in the compiler flags (I tested this by
> > > > building the file without that commit but with these new compiler flags:
> > > > 
> > > > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > > > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > > > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > > > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > > > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > > > 
> > > > The preprocessed file is the same in both cases, but with these flags
> > > > the compiler errors.
> > > 
> > > So for now I have suppressed the error using the following patch (which
> > > I will keep in my fixes tree until some other fix is applied):
> > > 
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> > >  for now
> > > 
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > >  sound/soc/codecs/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > index 50693c867e71..ee5f36b9c787 100644
> > > --- a/sound/soc/codecs/Kconfig
> > > +++ b/sound/soc/codecs/Kconfig
> > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > >  config SND_SOC_ALL_CODECS
> > >  	tristate "Build all ASoC CODEC drivers"
> > >  	depends on COMPILE_TEST
> > > +	depends on !PPC
> > >  	select SND_SOC_88PM860X if MFD_88PM860X
> > >  	select SND_SOC_L3
> > >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
> > 
> > Suppressing this whole is an overreaction, IMO.  It should suffice
> > just to disable compile-testing Intel driver.
> > How about the patch below?
> 
> Takashi,
> 
> This wont fix it as we have WM driver using this as well. SND_SOC_WM_ADSP
> uses SND_SOC_COMPRESS.

Yes, but SND_SOC_WM_ADSP isn't selected at all in the mainline, so
my patch should work actually alone.

> So the better fix would be to do so in either SND_SOC_COMPRESS or even
> better in SND_COMPRESS_OFFLOAD..

No, it won't work because it's reverse-selected.  You can't put
depends there.  It's a known limitation of the current Kconfig stuff.


Takashi

> I think this has been exposed by WM driver as Intel driver depends on X86 so
> compress core wouldn't be compiled as none of the drivers select this :)
> 
> -- 
> Thanks
> ~Vinod
> > 
> > 
> > thanks,
> > 
> > Takashi
> > 
> > -- 8< --
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
> > 
> > Since some ioctl in compress offload API is broken for PPC (the struct
> > size overflows), now we get actually the build error.
> > 
> > Until we get the proper solution (e.g. alternative ioctl), let's
> > disable the build of Intel ASoC driver that is the only driver who
> > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> > mainline tree.
> > 
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  sound/soc/intel/Kconfig | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> > index 803f95e40679..d854cd66e090 100644
> > --- a/sound/soc/intel/Kconfig
> > +++ b/sound/soc/intel/Kconfig
> > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
> >  	tristate
> >  	select SND_SOC_INTEL_SST_ACPI if ACPI
> >  	depends on (X86 || COMPILE_TEST)
> > +	# FIXME: a part of compress API is broken for PPC
> > +	depends on !PPC
> >  
> >  config SND_SOC_INTEL_SST_ACPI
> >  	tristate
> > -- 
> > 2.7.0
> > 
> 

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25  9:29                   ` Takashi Iwai
  2016-01-25  9:40                     ` Michael Ellerman
@ 2016-01-25 10:41                     ` Vinod Koul
  2016-01-25 10:42                       ` Takashi Iwai
  2016-01-25 10:45                     ` Sudip Mukherjee
  2016-01-25 11:41                     ` Mark Brown
  3 siblings, 1 reply; 253+ messages in thread
From: Vinod Koul @ 2016-01-25 10:41 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Stephen Rothwell, Mark Brown, Sudip Mukherjee, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, Jan 25, 2016 at 10:29:54AM +0100, Takashi Iwai wrote:
> On Fri, 22 Jan 2016 03:40:45 +0100,
> Stephen Rothwell wrote:
> > 
> > Hi all,
> > 
> > On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:  
> > > > >
> > > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > > Takashi Iwai wrote:    
> > > > > > 
> > > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > > 
> > > > > > A. Disable compress API for powerpc.    
> > > > 
> > > > This also affects alpha, mips and (maybe) sparc.  
> > > 
> > > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > > UBSAN support") which is in Linus' tree as of this morning.  The only
> > > relevant change that made was in the compiler flags (I tested this by
> > > building the file without that commit but with these new compiler flags:
> > > 
> > > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > > 
> > > The preprocessed file is the same in both cases, but with these flags
> > > the compiler errors.
> > 
> > So for now I have suppressed the error using the following patch (which
> > I will keep in my fixes tree until some other fix is applied):
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Fri, 22 Jan 2016 13:24:57 +1100
> > Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
> >  for now
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  sound/soc/codecs/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > index 50693c867e71..ee5f36b9c787 100644
> > --- a/sound/soc/codecs/Kconfig
> > +++ b/sound/soc/codecs/Kconfig
> > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> >  config SND_SOC_ALL_CODECS
> >  	tristate "Build all ASoC CODEC drivers"
> >  	depends on COMPILE_TEST
> > +	depends on !PPC
> >  	select SND_SOC_88PM860X if MFD_88PM860X
> >  	select SND_SOC_L3
> >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
> 
> Suppressing this whole is an overreaction, IMO.  It should suffice
> just to disable compile-testing Intel driver.
> How about the patch below?

Takashi,

This wont fix it as we have WM driver using this as well. SND_SOC_WM_ADSP
uses SND_SOC_COMPRESS.

So the better fix would be to do so in either SND_SOC_COMPRESS or even
better in SND_COMPRESS_OFFLOAD..

I think this has been exposed by WM driver as Intel driver depends on X86 so
compress core wouldn't be compiled as none of the drivers select this :)

-- 
Thanks
~Vinod
> 
> 
> thanks,
> 
> Takashi
> 
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
> 
> Since some ioctl in compress offload API is broken for PPC (the struct
> size overflows), now we get actually the build error.
> 
> Until we get the proper solution (e.g. alternative ioctl), let's
> disable the build of Intel ASoC driver that is the only driver who
> enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> mainline tree.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  sound/soc/intel/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index 803f95e40679..d854cd66e090 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
>  	tristate
>  	select SND_SOC_INTEL_SST_ACPI if ACPI
>  	depends on (X86 || COMPILE_TEST)
> +	# FIXME: a part of compress API is broken for PPC
> +	depends on !PPC
>  
>  config SND_SOC_INTEL_SST_ACPI
>  	tristate
> -- 
> 2.7.0
> 

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25  9:40                     ` Michael Ellerman
@ 2016-01-25 10:19                       ` Takashi Iwai
  0 siblings, 0 replies; 253+ messages in thread
From: Takashi Iwai @ 2016-01-25 10:19 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Stephen Rothwell, Mark Brown, Sudip Mukherjee, Vinod Koul,
	Andrew Morton, linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, 25 Jan 2016 10:40:14 +0100,
Michael Ellerman wrote:
> 
> On Mon, 2016-01-25 at 10:29 +0100, Takashi Iwai wrote:
> > On Fri, 22 Jan 2016 03:40:45 +0100, Stephen Rothwell wrote:
> > > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > > index 50693c867e71..ee5f36b9c787 100644
> > > --- a/sound/soc/codecs/Kconfig
> > > +++ b/sound/soc/codecs/Kconfig
> > > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> > >  config SND_SOC_ALL_CODECS
> > >  	tristate "Build all ASoC CODEC drivers"
> > >  	depends on COMPILE_TEST
> > > +	depends on !PPC
> > >  	select SND_SOC_88PM860X if MFD_88PM860X
> > >  	select SND_SOC_L3
> > >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
> >
> > Suppressing this whole is an overreaction, IMO.  It should suffice
> > just to disable compile-testing Intel driver.
> > How about the patch below?
> >
> >
> > thanks,
> >
> > Takashi
> >
> > -- 8< --
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
> >
> > Since some ioctl in compress offload API is broken for PPC (the struct
> > size overflows), now we get actually the build error.
> >
> > Until we get the proper solution (e.g. alternative ioctl), let's
> > disable the build of Intel ASoC driver that is the only driver who
> > enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> > mainline tree.
> >
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  sound/soc/intel/Kconfig | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> > index 803f95e40679..d854cd66e090 100644
> > --- a/sound/soc/intel/Kconfig
> > +++ b/sound/soc/intel/Kconfig
> > @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
> >  	tristate
> >  	select SND_SOC_INTEL_SST_ACPI if ACPI
> >  	depends on (X86 || COMPILE_TEST)
> > +	# FIXME: a part of compress API is broken for PPC
> > +	depends on !PPC
> >
> >  config SND_SOC_INTEL_SST_ACPI
> >  	tristate
> 
> 
> That's fine by me.
> 
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
> 
> 
> Though it looks like alpha and mips would also be broken, but perhaps they
> can't build that code for some other reason.
> 
>   arch/alpha/include/uapi/asm/ioctl.h:#define _IOC_SIZEBITS       13
>   arch/mips/include/uapi/asm/ioctl.h:#define _IOC_SIZEBITS        13

OK, I'll resubmit the patch including these other archs.


thanks,

Takashi

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-25  9:29                   ` Takashi Iwai
@ 2016-01-25  9:40                     ` Michael Ellerman
  2016-01-25 10:19                       ` Takashi Iwai
  2016-01-25 10:41                     ` Vinod Koul
                                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 253+ messages in thread
From: Michael Ellerman @ 2016-01-25  9:40 UTC (permalink / raw)
  To: Takashi Iwai, Stephen Rothwell
  Cc: Mark Brown, Sudip Mukherjee, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Mon, 2016-01-25 at 10:29 +0100, Takashi Iwai wrote:
> On Fri, 22 Jan 2016 03:40:45 +0100, Stephen Rothwell wrote:
> > diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> > index 50693c867e71..ee5f36b9c787 100644
> > --- a/sound/soc/codecs/Kconfig
> > +++ b/sound/soc/codecs/Kconfig
> > @@ -13,6 +13,7 @@ menu "CODEC drivers"
> >  config SND_SOC_ALL_CODECS
> >  	tristate "Build all ASoC CODEC drivers"
> >  	depends on COMPILE_TEST
> > +	depends on !PPC
> >  	select SND_SOC_88PM860X if MFD_88PM860X
> >  	select SND_SOC_L3
> >  	select SND_SOC_AB8500_CODEC if ABX500_CORE
>
> Suppressing this whole is an overreaction, IMO.  It should suffice
> just to disable compile-testing Intel driver.
> How about the patch below?
>
>
> thanks,
>
> Takashi
>
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC
>
> Since some ioctl in compress offload API is broken for PPC (the struct
> size overflows), now we get actually the build error.
>
> Until we get the proper solution (e.g. alternative ioctl), let's
> disable the build of Intel ASoC driver that is the only driver who
> enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
> mainline tree.
>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  sound/soc/intel/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index 803f95e40679..d854cd66e090 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
>  	tristate
>  	select SND_SOC_INTEL_SST_ACPI if ACPI
>  	depends on (X86 || COMPILE_TEST)
> +	# FIXME: a part of compress API is broken for PPC
> +	depends on !PPC
>
>  config SND_SOC_INTEL_SST_ACPI
>  	tristate


That's fine by me.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>


Though it looks like alpha and mips would also be broken, but perhaps they
can't build that code for some other reason.

  arch/alpha/include/uapi/asm/ioctl.h:#define _IOC_SIZEBITS       13
  arch/mips/include/uapi/asm/ioctl.h:#define _IOC_SIZEBITS        13

cheers

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-22  2:40                 ` Stephen Rothwell
@ 2016-01-25  9:29                   ` Takashi Iwai
  2016-01-25  9:40                     ` Michael Ellerman
                                       ` (3 more replies)
  0 siblings, 4 replies; 253+ messages in thread
From: Takashi Iwai @ 2016-01-25  9:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mark Brown, Sudip Mukherjee, Vinod Koul, Andrew Morton,
	linux-next, linux-kernel, Pierre-Louis Bossart

On Fri, 22 Jan 2016 03:40:45 +0100,
Stephen Rothwell wrote:
> 
> Hi all,
> 
> On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:  
> > > >
> > > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > > Takashi Iwai wrote:    
> > > > > 
> > > > > There are a few ways to fix this, but all are not comfortable.
> > > > > 
> > > > > A. Disable compress API for powerpc.    
> > > 
> > > This also affects alpha, mips and (maybe) sparc.  
> > 
> > This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> > UBSAN support") which is in Linus' tree as of this morning.  The only
> > relevant change that made was in the compiler flags (I tested this by
> > building the file without that commit but with these new compiler flags:
> > 
> > -fsanitize=shift -fsanitize=integer-divide-by-zero
> > -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> > -fsanitize=signed-integer-overflow -fsanitize=bounds
> > -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> > -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> > 
> > The preprocessed file is the same in both cases, but with these flags
> > the compiler errors.
> 
> So for now I have suppressed the error using the following patch (which
> I will keep in my fixes tree until some other fix is applied):
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 22 Jan 2016 13:24:57 +1100
> Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
>  for now
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  sound/soc/codecs/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 50693c867e71..ee5f36b9c787 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -13,6 +13,7 @@ menu "CODEC drivers"
>  config SND_SOC_ALL_CODECS
>  	tristate "Build all ASoC CODEC drivers"
>  	depends on COMPILE_TEST
> +	depends on !PPC
>  	select SND_SOC_88PM860X if MFD_88PM860X
>  	select SND_SOC_L3
>  	select SND_SOC_AB8500_CODEC if ABX500_CORE

Suppressing this whole is an overreaction, IMO.  It should suffice
just to disable compile-testing Intel driver.
How about the patch below?


thanks,

Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ASoC: intel: suppress compile-test with PowerPC

Since some ioctl in compress offload API is broken for PPC (the struct
size overflows), now we get actually the build error.

Until we get the proper solution (e.g. alternative ioctl), let's
disable the build of Intel ASoC driver that is the only driver who
enables SND_SOC_COMPRESS (and eventually SND_COMPRESS_OFFLOAD) in the
mainline tree.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/intel/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index 803f95e40679..d854cd66e090 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -31,6 +31,8 @@ config SND_SOC_INTEL_SST
 	tristate
 	select SND_SOC_INTEL_SST_ACPI if ACPI
 	depends on (X86 || COMPILE_TEST)
+	# FIXME: a part of compress API is broken for PPC
+	depends on !PPC
 
 config SND_SOC_INTEL_SST_ACPI
 	tristate
-- 
2.7.0

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-22  0:24               ` Stephen Rothwell
  2016-01-22  2:40                 ` Stephen Rothwell
@ 2016-01-22  3:03                 ` Stephen Rothwell
  1 sibling, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2016-01-22  3:03 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Vinod Koul, Andrew Morton, linux-next, linux-kernel,
	Pierre-Louis Bossart, Michael Ellerman

Hi all,

On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:  
> > >
> > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > Takashi Iwai wrote:    
> > > > 
> > > > There are a few ways to fix this, but all are not comfortable.
> > > > 
> > > > A. Disable compress API for powerpc.    
> > 
> > This also affects alpha, mips and (maybe) sparc.  
> 
> This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> UBSAN support") which is in Linus' tree as of this morning.  The only
> relevant change that made was in the compiler flags (I tested this by
> building the file without that commit but with these new compiler flags:
> 
> -fsanitize=shift -fsanitize=integer-divide-by-zero
> -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> -fsanitize=signed-integer-overflow -fsanitize=bounds
> -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> 
> The preprocessed file is the same in both cases, but with these flags
> the compiler errors.

I have discussed this with the PowerPC maintainer (Michael) and he
figured out why the compiler does not produce an error (normally).  It
is because this driver is using _IOC_NR(xxx) to match ioctls instead of
the full ioctl number.  Because of that, the compiler can figure out
that it does not care about the undefined reference to
__invalid_size_argument_for_IOC that the size check shouold generate
(since _IOC_NR shifts and masks it out).

So, the switch statement in snd_compr_ioctl() should be rewritten to
check against the full ioctl number (since currently it could
theoretically match any number of ioctls, not just the relevant ones).
And then something needs to be done about the very large structure
being passed.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-22  0:24               ` Stephen Rothwell
@ 2016-01-22  2:40                 ` Stephen Rothwell
  2016-01-25  9:29                   ` Takashi Iwai
  2016-01-22  3:03                 ` Stephen Rothwell
  1 sibling, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2016-01-22  2:40 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Vinod Koul, Andrew Morton, linux-next, linux-kernel,
	Pierre-Louis Bossart

Hi all,

On Fri, 22 Jan 2016 11:24:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:  
> > >
> > > On Sat, 16 Jan 2016 09:51:29 +0100,
> > > Takashi Iwai wrote:    
> > > > 
> > > > There are a few ways to fix this, but all are not comfortable.
> > > > 
> > > > A. Disable compress API for powerpc.    
> > 
> > This also affects alpha, mips and (maybe) sparc.  
> 
> This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
> UBSAN support") which is in Linus' tree as of this morning.  The only
> relevant change that made was in the compiler flags (I tested this by
> building the file without that commit but with these new compiler flags:
> 
> -fsanitize=shift -fsanitize=integer-divide-by-zero
> -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
> -fsanitize=signed-integer-overflow -fsanitize=bounds
> -fsanitize=object-size -fsanitize=returns-nonnull-attribute
> -fsanitize=bool -fsanitize=enum -fsanitize=alignment
> 
> The preprocessed file is the same in both cases, but with these flags
> the compiler errors.

So for now I have suppressed the error using the following patch (which
I will keep in my fixes tree until some other fix is applied):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 22 Jan 2016 13:24:57 +1100
Subject: [PATCH] next: suppress the building of all the sound codecs on PPC
 for now

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 sound/soc/codecs/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 50693c867e71..ee5f36b9c787 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -13,6 +13,7 @@ menu "CODEC drivers"
 config SND_SOC_ALL_CODECS
 	tristate "Build all ASoC CODEC drivers"
 	depends on COMPILE_TEST
+	depends on !PPC
 	select SND_SOC_88PM860X if MFD_88PM860X
 	select SND_SOC_L3
 	select SND_SOC_AB8500_CODEC if ABX500_CORE
-- 
2.6.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-20 20:38             ` Stephen Rothwell
@ 2016-01-22  0:24               ` Stephen Rothwell
  2016-01-22  2:40                 ` Stephen Rothwell
  2016-01-22  3:03                 ` Stephen Rothwell
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2016-01-22  0:24 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Vinod Koul, Andrew Morton, linux-next, linux-kernel,
	Pierre-Louis Bossart

Hi all,

On Thu, 21 Jan 2016 07:38:59 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
> >
> > On Sat, 16 Jan 2016 09:51:29 +0100,
> > Takashi Iwai wrote:  
> > > 
> > > There are a few ways to fix this, but all are not comfortable.
> > > 
> > > A. Disable compress API for powerpc.  
> 
> This also affects alpha, mips and (maybe) sparc.

This was exposed on PowerPC by commit bf76f73c5f65 ("powerpc: enable
UBSAN support") which is in Linus' tree as of this morning.  The only
relevant change that made was in the compiler flags (I tested this by
building the file without that commit but with these new compiler flags:

-fsanitize=shift -fsanitize=integer-divide-by-zero
-fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null
-fsanitize=signed-integer-overflow -fsanitize=bounds
-fsanitize=object-size -fsanitize=returns-nonnull-attribute
-fsanitize=bool -fsanitize=enum -fsanitize=alignment

The preprocessed file is the same in both cases, but with these flags
the compiler errors.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-20 14:09           ` Takashi Iwai
@ 2016-01-20 20:38             ` Stephen Rothwell
  2016-01-22  0:24               ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2016-01-20 20:38 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Vinod Koul, Andrew Morton, linux-next, linux-kernel,
	Pierre-Louis Bossart

Hi Takashi,

On Wed, 20 Jan 2016 15:09:47 +0100 Takashi Iwai <tiwai@suse.de> wrote:
>
> On Sat, 16 Jan 2016 09:51:29 +0100,
> Takashi Iwai wrote:
> > 
> > There are a few ways to fix this, but all are not comfortable.
> > 
> > A. Disable compress API for powerpc.

This also affects alpha, mips and (maybe) sparc.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-16  8:51         ` Takashi Iwai
@ 2016-01-20 14:09           ` Takashi Iwai
  2016-01-20 20:38             ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Takashi Iwai @ 2016-01-20 14:09 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andrew Morton, Stephen Rothwell, linux-next, linux-kernel,
	Pierre-Louis Bossart

On Sat, 16 Jan 2016 09:51:29 +0100,
Takashi Iwai wrote:
> 
> On Sat, 16 Jan 2016 00:14:01 +0100,
> Andrew Morton wrote:
> > 
> > On Sat, 16 Jan 2016 10:00:47 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > > Hi Andrew,
> > > > +#define SNDRV_COMPRESS_GET_CODEC_CAPS	_IOWR('C', 0x11, struct snd_compr_caps)
> > > >  #define SNDRV_COMPRESS_SET_PARAMS	_IOW('C', 0x12, struct snd_compr_params)
> > > >  #define SNDRV_COMPRESS_GET_PARAMS	_IOR('C', 0x13, struct snd_codec)
> > > >  #define SNDRV_COMPRESS_SET_METADATA	_IOW('C', 0x14,\
> > > > 
> > > > then it compiles OK.  So there's something special about `struct
> > > > snd_compr_codec_caps' which is confusing the compiler.
> > > 
> > > Its very big (hint, I think it is bigger than 1 << 13).
> > 
> > ah-hah.
> > 
> > sizeof(struct snd_compr_codec_caps) is 11144 on x86_64
> > allyesconfig, but x86_64 uses (1<<14), not (1<<13) - x86_64 has more
> > space in the ioctl payload.
> > 
> > 
> > So.  Sound guys: your struct snd_compr_codec_caps is too large for
> > powerpc ioctls.
> 
> Ouch, this was what I was concerned.  I thought we did calculate it at
> the time writing API, alas, we failed.  We need to do math drills
> again...
> 
> There are a few ways to fix this, but all are not comfortable.
> 
> A. Disable compress API for powerpc.
> 
> B. Disable this ioctl for powerpc and keep it for others while
>    providing yet a new ioctl for the similar functionality.
> 
>   B1. Pass the same struct via a pointer: this needs a special
>       compat_ioctl handling
>   B2. Reduce the size of struct snd_compr_codec_caps, e.g. set
>       MAX_NUM_CODEC_DESCRIPTORS to 16.
> 
> C. What else?

Vinod, what's your take?


Takashi

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-15 23:14       ` Andrew Morton
@ 2016-01-16  8:51         ` Takashi Iwai
  2016-01-20 14:09           ` Takashi Iwai
  0 siblings, 1 reply; 253+ messages in thread
From: Takashi Iwai @ 2016-01-16  8:51 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, linux-next, linux-kernel, Vinod Koul,
	Pierre-Louis Bossart

On Sat, 16 Jan 2016 00:14:01 +0100,
Andrew Morton wrote:
> 
> On Sat, 16 Jan 2016 10:00:47 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Andrew,
> > > +#define SNDRV_COMPRESS_GET_CODEC_CAPS	_IOWR('C', 0x11, struct snd_compr_caps)
> > >  #define SNDRV_COMPRESS_SET_PARAMS	_IOW('C', 0x12, struct snd_compr_params)
> > >  #define SNDRV_COMPRESS_GET_PARAMS	_IOR('C', 0x13, struct snd_codec)
> > >  #define SNDRV_COMPRESS_SET_METADATA	_IOW('C', 0x14,\
> > > 
> > > then it compiles OK.  So there's something special about `struct
> > > snd_compr_codec_caps' which is confusing the compiler.
> > 
> > Its very big (hint, I think it is bigger than 1 << 13).
> 
> ah-hah.
> 
> sizeof(struct snd_compr_codec_caps) is 11144 on x86_64
> allyesconfig, but x86_64 uses (1<<14), not (1<<13) - x86_64 has more
> space in the ioctl payload.
> 
> 
> So.  Sound guys: your struct snd_compr_codec_caps is too large for
> powerpc ioctls.

Ouch, this was what I was concerned.  I thought we did calculate it at
the time writing API, alas, we failed.  We need to do math drills
again...

There are a few ways to fix this, but all are not comfortable.

A. Disable compress API for powerpc.

B. Disable this ioctl for powerpc and keep it for others while
   providing yet a new ioctl for the similar functionality.

  B1. Pass the same struct via a pointer: this needs a special
      compat_ioctl handling
  B2. Reduce the size of struct snd_compr_codec_caps, e.g. set
      MAX_NUM_CODEC_DESCRIPTORS to 16.

C. What else?


Takashi

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-15 23:00     ` Stephen Rothwell
@ 2016-01-15 23:14       ` Andrew Morton
  2016-01-16  8:51         ` Takashi Iwai
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2016-01-15 23:14 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Vinod Koul, Takashi Iwai, Pierre-Louis Bossart

On Sat, 16 Jan 2016 10:00:47 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> > +#define SNDRV_COMPRESS_GET_CODEC_CAPS	_IOWR('C', 0x11, struct snd_compr_caps)
> >  #define SNDRV_COMPRESS_SET_PARAMS	_IOW('C', 0x12, struct snd_compr_params)
> >  #define SNDRV_COMPRESS_GET_PARAMS	_IOR('C', 0x13, struct snd_codec)
> >  #define SNDRV_COMPRESS_SET_METADATA	_IOW('C', 0x14,\
> > 
> > then it compiles OK.  So there's something special about `struct
> > snd_compr_codec_caps' which is confusing the compiler.
> 
> Its very big (hint, I think it is bigger than 1 << 13).

ah-hah.

sizeof(struct snd_compr_codec_caps) is 11144 on x86_64
allyesconfig, but x86_64 uses (1<<14), not (1<<13) - x86_64 has more
space in the ioctl payload.


So.  Sound guys: your struct snd_compr_codec_caps is too large for
powerpc ioctls.

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-15 21:05   ` Andrew Morton
@ 2016-01-15 23:00     ` Stephen Rothwell
  2016-01-15 23:14       ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2016-01-15 23:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Vinod Koul, Takashi Iwai, Pierre-Louis Bossart

Hi Andrew,

On Fri, 15 Jan 2016 13:05:27 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 14 Jan 2016 15:15:41 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > On Thu, 31 Dec 2015 23:22:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:  
> > >
> > > After merging the akpm tree, today's linux-next build (powerpc
> > > allyesconfig) failed like this:
> > > 
> > > sound/core/compress_offload.c: In function 'snd_compr_ioctl':
> > > /home/sfr/next/next/sound/core/compress_offload.c:804:2: error: case label does not reduce to an integer constant
> > >   case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
> > >   ^
> > > 
> > > I have no idea what caused that and have just left it broken for now.  
> > 
> > I am still getting this.  Something in mmotm is causing or exposing this.  
> 
> I'm getting this as well.  If I do
> 
> --- a/include/uapi/sound/compress_offload.h~a
> +++ a/include/uapi/sound/compress_offload.h
> @@ -163,8 +163,7 @@ struct snd_compr_metadata {
>   */
>  #define SNDRV_COMPRESS_IOCTL_VERSION	_IOR('C', 0x00, int)
>  #define SNDRV_COMPRESS_GET_CAPS		_IOWR('C', 0x10, struct snd_compr_caps)
> -#define SNDRV_COMPRESS_GET_CODEC_CAPS	_IOWR('C', 0x11,\
> -						struct snd_compr_codec_caps)
> +#define SNDRV_COMPRESS_GET_CODEC_CAPS	_IOWR('C', 0x11, struct snd_compr_caps)
>  #define SNDRV_COMPRESS_SET_PARAMS	_IOW('C', 0x12, struct snd_compr_params)
>  #define SNDRV_COMPRESS_GET_PARAMS	_IOR('C', 0x13, struct snd_codec)
>  #define SNDRV_COMPRESS_SET_METADATA	_IOW('C', 0x14,\
> 
> then it compiles OK.  So there's something special about `struct
> snd_compr_codec_caps' which is confusing the compiler.

Its very big (hint, I think it is bigger than 1 << 13).

> Looking at the cpp output:
> 
>  case ((((((2U|4U) << (((0 +8)+8)+13)) | ((('C')) << (0 +8)) | (((0x10)) << 0) | (((((sizeof(struct snd_compr_caps) == sizeof(struct snd_compr_caps[1]) && sizeof(struct snd_compr_caps) < (1 << 13)) ? sizeof(struct snd_compr_caps) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))) >> 0) & ((1 << 8)-1)):
>   retval = snd_compr_get_caps(stream, arg);
>   break;
> 
> ^^ this is SNDRV_COMPRESS_GET_CAPS and it works OK
> 
>  case ((((((2U|4U) << (((0 +8)+8)+13)) | ((('C')) << (0 +8)) | (((0x11)) << 0) | (((((sizeof(struct snd_compr_codec_caps) == sizeof(struct snd_compr_codec_caps[1]) && sizeof(struct snd_compr_codec_caps) < (1 << 13)) ? sizeof(struct snd_compr_codec_caps) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))) >> 0) & ((1 << 8)-1)):
>   retval = snd_compr_get_codec_caps(stream, arg);
> 
> ^^ this is SNDRV_COMPRESS_GET_CODEC_CAPS and it fails
> 
> And they are identical apart from 0x10 vs 0x11 and the struct name.
> 
> It happens in vanilla linux-next as well, without the -mm patch pile.

Interesting ... what config.  I get this in my powerpc allyesconfig
builds but only after I have added your patches.  So I guess maybe some
kconfig has changed due to your patches that enable this driver to
build.

> Confused.

Me as well :-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the akpm tree
  2016-01-14  4:15 ` Stephen Rothwell
@ 2016-01-15 21:05   ` Andrew Morton
  2016-01-15 23:00     ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2016-01-15 21:05 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Vinod Koul, Takashi Iwai, Pierre-Louis Bossart

On Thu, 14 Jan 2016 15:15:41 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> On Thu, 31 Dec 2015 23:22:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the akpm tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > sound/core/compress_offload.c: In function 'snd_compr_ioctl':
> > /home/sfr/next/next/sound/core/compress_offload.c:804:2: error: case label does not reduce to an integer constant
> >   case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
> >   ^
> > 
> > I have no idea what caused that and have just left it broken for now.
> 
> I am still getting this.  Something in mmotm is causing or exposing this.

I'm getting this as well.  If I do

--- a/include/uapi/sound/compress_offload.h~a
+++ a/include/uapi/sound/compress_offload.h
@@ -163,8 +163,7 @@ struct snd_compr_metadata {
  */
 #define SNDRV_COMPRESS_IOCTL_VERSION	_IOR('C', 0x00, int)
 #define SNDRV_COMPRESS_GET_CAPS		_IOWR('C', 0x10, struct snd_compr_caps)
-#define SNDRV_COMPRESS_GET_CODEC_CAPS	_IOWR('C', 0x11,\
-						struct snd_compr_codec_caps)
+#define SNDRV_COMPRESS_GET_CODEC_CAPS	_IOWR('C', 0x11, struct snd_compr_caps)
 #define SNDRV_COMPRESS_SET_PARAMS	_IOW('C', 0x12, struct snd_compr_params)
 #define SNDRV_COMPRESS_GET_PARAMS	_IOR('C', 0x13, struct snd_codec)
 #define SNDRV_COMPRESS_SET_METADATA	_IOW('C', 0x14,\

then it compiles OK.  So there's something special about `struct
snd_compr_codec_caps' which is confusing the compiler.

Looking at the cpp output:

 case ((((((2U|4U) << (((0 +8)+8)+13)) | ((('C')) << (0 +8)) | (((0x10)) << 0) | (((((sizeof(struct snd_compr_caps) == sizeof(struct snd_compr_caps[1]) && sizeof(struct snd_compr_caps) < (1 << 13)) ? sizeof(struct snd_compr_caps) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))) >> 0) & ((1 << 8)-1)):
  retval = snd_compr_get_caps(stream, arg);
  break;

^^ this is SNDRV_COMPRESS_GET_CAPS and it works OK

 case ((((((2U|4U) << (((0 +8)+8)+13)) | ((('C')) << (0 +8)) | (((0x11)) << 0) | (((((sizeof(struct snd_compr_codec_caps) == sizeof(struct snd_compr_codec_caps[1]) && sizeof(struct snd_compr_codec_caps) < (1 << 13)) ? sizeof(struct snd_compr_codec_caps) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))) >> 0) & ((1 << 8)-1)):
  retval = snd_compr_get_codec_caps(stream, arg);

^^ this is SNDRV_COMPRESS_GET_CODEC_CAPS and it fails

And they are identical apart from 0x10 vs 0x11 and the struct name.

It happens in vanilla linux-next as well, without the -mm patch pile.

Confused.

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

* Re: linux-next: build failure after merge of the akpm tree
  2015-12-31 12:22 Stephen Rothwell
@ 2016-01-14  4:15 ` Stephen Rothwell
  2016-01-15 21:05   ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2016-01-14  4:15 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel

Hi Andrew,

On Thu, 31 Dec 2015 23:22:10 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> sound/core/compress_offload.c: In function 'snd_compr_ioctl':
> /home/sfr/next/next/sound/core/compress_offload.c:804:2: error: case label does not reduce to an integer constant
>   case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
>   ^
> 
> I have no idea what caused that and have just left it broken for now.

I am still getting this.  Something in mmotm is causing or exposing this.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* linux-next: build failure after merge of the akpm tree
@ 2015-12-31 12:22 Stephen Rothwell
  2016-01-14  4:15 ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2015-12-31 12:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
allyesconfig) failed like this:

sound/core/compress_offload.c: In function 'snd_compr_ioctl':
/home/sfr/next/next/sound/core/compress_offload.c:804:2: error: case label does not reduce to an integer constant
  case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS):
  ^

I have no idea what caused that and have just left it broken for now.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* linux-next: build failure after merge of the akpm tree
@ 2015-11-01 16:29 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2015-11-01 16:29 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, John Stultz, Theodore Ts'o

Hi Andrew,

After merging the akpm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

fs/ext4/mballoc.c: In function 'ext4_mb_check_group_pa':
/home/sfr/next/next/fs/ext4/mballoc.c:3335:17: error: implicit declaration of function 'abs64' [-Werror=implicit-function-declaration]
  cur_distance = abs64(goal_block - cpa->pa_pstart);
                 ^

Caused by patch

  "Remove abs64()"

interacting with commit

  1a70ea8d47aa ("ext4: fix abs() usage in ext4_mb_check_group_pa")

from the ext4 tree.

I just reverted the ext4 tree commit as it is no longer needed:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 2 Nov 2015 03:26:31 +1100
Subject: [PATCH] Revert "ext4: fix abs() usage in ext4_mb_check_group_pa"

This reverts commit 1a70ea8d47aa484e03b2540f7523f429f5af2334.
---
 fs/ext4/mballoc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 1e97ac1dd4bb..b4da7f2a5db2 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3332,8 +3332,8 @@ ext4_mb_check_group_pa(ext4_fsblk_t goal_block,
 		atomic_inc(&pa->pa_count);
 		return pa;
 	}
-	cur_distance = abs64(goal_block - cpa->pa_pstart);
-	new_distance = abs64(goal_block - pa->pa_pstart);
+	cur_distance = abs(goal_block - cpa->pa_pstart);
+	new_distance = abs(goal_block - pa->pa_pstart);
 
 	if (cur_distance <= new_distance)
 		return cpa;
-- 
2.6.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* linux-next: build failure after merge of the akpm tree
@ 2015-10-06  7:03 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2015-10-06  7:03 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, John Stultz, Thomas Gleixner

Hi Andrew,

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

kernel/time/clocksource.c: In function 'clocksource_watchdog':
kernel/time/clocksource.c:220:3: error: implicit declaration of function 'abs64' [-Werror=implicit-function-declaration]
   if (abs64(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD) {
   ^

Caused by commit

  67dfae0cd72f ("clocksource: Fix abs() usage w/ 64bit values")

>From Linus' tree interacting with commit

  e75a4c084376 ("Remove abs64()")

from the akpm tree.

I have applied the following fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 6 Oct 2015 17:59:03 +1100
Subject: [PATCH] clocksource: Fix for "Remove abs64()"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 kernel/time/clocksource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index f2c9b06c8ab7..6b473e4b2dad 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -217,7 +217,7 @@ static void clocksource_watchdog(unsigned long data)
 			continue;
 
 		/* Check the deviation from the watchdog clocksource. */
-		if (abs64(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD) {
+		if (abs(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD) {
 			pr_warn("timekeeping watchdog: Marking clocksource '%s' as unstable because the skew is too large:\n",
 				cs->name);
 			pr_warn("                      '%s' wd_now: %llx wd_last: %llx mask: %llx\n",
-- 
2.5.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* linux-next: build failure after merge of the akpm tree
@ 2015-09-08  4:53 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2015-09-08  4:53 UTC (permalink / raw)
  To: Andrew Morton, Gustavo Padovan
  Cc: linux-next, linux-kernel, Alexander Aring, Marcel Holtmann, Joe Perches

Hi Andrew,

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

drivers/net/ieee802154/at86rf230.c: In function 'at86rf230_stats_show':
drivers/net/ieee802154/at86rf230.c:1650:6: error: void value not ignored as it ought to be
  ret = seq_printf(file, "SUCCESS:\t\t%8llu\n", lp->trac.success);
      ^
drivers/net/ieee802154/at86rf230.c:1654:6: error: void value not ignored as it ought to be
  ret = seq_printf(file, "SUCCESS_DATA_PENDING:\t%8llu\n",
      ^
drivers/net/ieee802154/at86rf230.c:1659:6: error: void value not ignored as it ought to be
  ret = seq_printf(file, "SUCCESS_WAIT_FOR_ACK:\t%8llu\n",
      ^
drivers/net/ieee802154/at86rf230.c:1664:6: error: void value not ignored as it ought to be
  ret = seq_printf(file, "CHANNEL_ACCESS_FAILURE:\t%8llu\n",
      ^
drivers/net/ieee802154/at86rf230.c:1669:6: error: void value not ignored as it ought to be
  ret = seq_printf(file, "NO_ACK:\t\t\t%8llu\n", lp->trac.no_ack);
      ^
drivers/net/ieee802154/at86rf230.c:1673:2: error: void value not ignored as it ought to be
  return seq_printf(file, "INVALID:\t\t%8llu\n", lp->trac.invalid);
  ^
drivers/net/ieee802154/at86rf230.c:1674:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

Caused by commit

  890acf8330ca ("at86rf230: add debugfs support")

from the bluetooth tree interacting with commit

  0287f0d7576f ("fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void")

from the akpm tree.

I have added the following fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 8 Sep 2015 14:48:11 +1000
Subject: [PATCH] fs-seq_file-convert-int-seq_vprint-seq_printf-etc-returns-to-void-fix-fix-fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ieee802154/at86rf230.c | 28 +++++++---------------------
 1 file changed, 7 insertions(+), 21 deletions(-)

diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index b8b0628dc2f3..a9f3af63e590 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1647,30 +1647,16 @@ static int at86rf230_stats_show(struct seq_file *file, void *offset)
 	struct at86rf230_local *lp = file->private;
 	int ret;
 
-	ret = seq_printf(file, "SUCCESS:\t\t%8llu\n", lp->trac.success);
-	if (ret < 0)
-		return ret;
-
-	ret = seq_printf(file, "SUCCESS_DATA_PENDING:\t%8llu\n",
+	seq_printf(file, "SUCCESS:\t\t%8llu\n", lp->trac.success);
+	seq_printf(file, "SUCCESS_DATA_PENDING:\t%8llu\n",
 			 lp->trac.success_data_pending);
-	if (ret < 0)
-		return ret;
-
-	ret = seq_printf(file, "SUCCESS_WAIT_FOR_ACK:\t%8llu\n",
+	seq_printf(file, "SUCCESS_WAIT_FOR_ACK:\t%8llu\n",
 			 lp->trac.success_wait_for_ack);
-	if (ret < 0)
-		return ret;
-
-	ret = seq_printf(file, "CHANNEL_ACCESS_FAILURE:\t%8llu\n",
+	seq_printf(file, "CHANNEL_ACCESS_FAILURE:\t%8llu\n",
 			 lp->trac.channel_access_failure);
-	if (ret < 0)
-		return ret;
-
-	ret = seq_printf(file, "NO_ACK:\t\t\t%8llu\n", lp->trac.no_ack);
-	if (ret < 0)
-		return ret;
-
-	return seq_printf(file, "INVALID:\t\t%8llu\n", lp->trac.invalid);
+	seq_printf(file, "NO_ACK:\t\t\t%8llu\n", lp->trac.no_ack);
+	seq_printf(file, "INVALID:\t\t%8llu\n", lp->trac.invalid);
+	return 0;
 }
 
 static int at86rf230_stats_open(struct inode *inode, struct file *file)
-- 
2.5.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* linux-next: build failure after merge of the akpm tree
@ 2015-07-14  5:19 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2015-07-14  5:19 UTC (permalink / raw)
  To: Andrew Morton, Eric W. Biederman
  Cc: linux-next, linux-kernel, Joe Perches, Al Viro, Steven Rostedt

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

fs/nsfs.c: In function 'nsfs_show_path':
fs/nsfs.c:145:2: error: void value not ignored as it ought to be
  return seq_printf(seq, "%s:[%lu]", ns_ops->name, inode->i_ino);
  ^
fs/nsfs.c:146:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

Caused by patch

  "fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void"

from the akpm tree interacting with commit

  75509fd88fbd ("nsfs: Add a show_path method to fix mountinfo")

from the userns tree (which has reappeared).

I have applied the same fix patch from last time:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Subject: nsfs: fix for seq_printf() API change
Date: Thu, 25 Jun 2015 17:41:14 +1000

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Joe Perches <joe@perches.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/nsfs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN fs/nsfs.c~fs-seq_file-convert-int-seq_vprint-seq_printf-etc-returns-to-void-fix fs/nsfs.c
--- a/fs/nsfs.c~fs-seq_file-convert-int-seq_vprint-seq_printf-etc-returns-to-void-fix
+++ a/fs/nsfs.c
@@ -142,7 +142,8 @@ static int nsfs_show_path(struct seq_fil
 	struct inode *inode = d_inode(dentry);
 	const struct proc_ns_operations *ns_ops = dentry->d_fsdata;
 
-	return seq_printf(seq, "%s:[%lu]", ns_ops->name, inode->i_ino);
+	seq_printf(seq, "%s:[%lu]", ns_ops->name, inode->i_ino);
+	return 0;
 }
 
 static const struct super_operations nsfs_ops = {

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

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

* linux-next: build failure after merge of the akpm tree
@ 2015-06-25  8:00 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2015-06-25  8:00 UTC (permalink / raw)
  To: Andrew Morton, Eric W. Biederman; +Cc: linux-next, linux-kernel, Joe Perches

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

fs/nsfs.c: In function 'nsfs_show_path':
fs/nsfs.c:145:2: error: void value not ignored as it ought to be
  return seq_printf(seq, "%s:[%lu]", ns_ops->name, inode->i_ino);
  ^
fs/nsfs.c:146:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

Caused by patch

  "fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void"

interacting with commit

  ed2ffc74eee8 ("nsfs: Add a show_path method to fix mountinfo")

from the userns tree.

I added this patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 25 Jun 2015 17:41:14 +1000
Subject: [PATCH] nsfs: fix for seq_printf() API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/nsfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nsfs.c b/fs/nsfs.c
index e4905fbf3396..8f20d6016e20 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -142,7 +142,8 @@ static int nsfs_show_path(struct seq_file *seq, struct dentry *dentry)
 	struct inode *inode = d_inode(dentry);
 	const struct proc_ns_operations *ns_ops = dentry->d_fsdata;
 
-	return seq_printf(seq, "%s:[%lu]", ns_ops->name, inode->i_ino);
+	seq_printf(seq, "%s:[%lu]", ns_ops->name, inode->i_ino);
+	return 0;
 }
 
 static const struct super_operations nsfs_ops = {
-- 
2.1.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

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

* linux-next: build failure after merge of the akpm tree
@ 2015-06-20 14:31 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2015-06-20 14:31 UTC (permalink / raw)
  To: Andrew Morton, Herbert Xu
  Cc: linux-next, linux-kernel, Vladimir Zapolskiy, Boris BREZILLON

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

Hi Andrew,

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

drivers/crypto/marvell/cesa.c: In function 'mv_cesa_get_sram':
drivers/crypto/marvell/cesa.c:324:2: error: implicit declaration of function 'of_get_named_gen_pool' [-Werror=implicit-function-declaration]
  engine->pool = of_get_named_gen_pool(cesa->dev->of_node,
  ^
drivers/crypto/marvell/cesa.c:324:15: warning: assignment makes pointer from integer without a cast
  engine->pool = of_get_named_gen_pool(cesa->dev->of_node,
               ^

Caused by commit:

  f63601fd616a ("crypto: marvell/cesa - add a new driver for Marvell's CESA")

from the crypto tree interacting with patch:

  "genalloc: rename of_get_named_gen_pool() to of_gen_pool_get()"

from the akpm tree.

I added this merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Sun, 21 Jun 2015 00:23:08 +1000
Subject: [PATCH] crypto: marvell/cesa - fix up for of_get_named_gen_pool()
 rename

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/crypto/marvell/cesa.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c
index a432633bced4..1c6f98dd88f4 100644
--- a/drivers/crypto/marvell/cesa.c
+++ b/drivers/crypto/marvell/cesa.c
@@ -321,9 +321,8 @@ static int mv_cesa_get_sram(struct platform_device *pdev, int idx)
 	const char *res_name = "sram";
 	struct resource *res;
 
-	engine->pool = of_get_named_gen_pool(cesa->dev->of_node,
-					     "marvell,crypto-srams",
-					     idx);
+	engine->pool = of_gen_pool_get(cesa->dev->of_node,
+				       "marvell,crypto-srams", idx);
 	if (engine->pool) {
 		engine->sram = gen_pool_dma_alloc(engine->pool,
 						  cesa->sram_size,

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-11-06 11:24 ` Thierry Reding
  2014-11-06 11:30   ` Thierry Reding
@ 2014-11-09 23:55   ` Stephen Rothwell
  1 sibling, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2014-11-09 23:55 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Andrew Morton, linux-next, linux-kernel, Vladimir Davydov

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

Hi Thierry,

On Thu, 6 Nov 2014 12:24:00 +0100 Thierry Reding <thierry.reding@gmail.com> wrote:
>
> I fixed this using the attached patch.

I will apply this to linux-next today (unless Andrew beats me to it).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-11-06 11:24 ` Thierry Reding
@ 2014-11-06 11:30   ` Thierry Reding
  2014-11-09 23:55   ` Stephen Rothwell
  1 sibling, 0 replies; 253+ messages in thread
From: Thierry Reding @ 2014-11-06 11:30 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Vladimir Davydov


[-- Attachment #1.1: Type: text/plain, Size: 3374 bytes --]

On Thu, Nov 06, 2014 at 12:24:00PM +0100, Thierry Reding wrote:
> On Thu, Nov 06, 2014 at 07:36:18PM +1100, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (sparc defconfig)
> > failed like this:
> > 
> > mm/slab.c: In function 'slab_alloc':
> > mm/slab.c:3260:4: error: implicit declaration of function 'slab_free' [-Werror=implicit-function-declaration]
> >     slab_free(cachep, objp);
> >     ^
> > mm/slab.c: At top level:
> > mm/slab.c:3534:29: warning: conflicting types for 'slab_free'
> >  static __always_inline void slab_free(struct kmem_cache *cachep, void *objp)
> >                              ^
> > mm/slab.c:3534:29: error: static declaration of 'slab_free' follows non-static declaration
> > mm/slab.c:3260:4: note: previous implicit declaration of 'slab_free' was here
> >     slab_free(cachep, objp);
> >     ^
> > 
> > I am not sure what caused this, but it is something in the akpm-current
> > or akpm trees (possibly interacting with something else).
> 
> I fixed this using the attached patch.
> 
> Thierry

> From a9ec6cfacb892e044a5f76dce3b7fc9a3337d01a Mon Sep 17 00:00:00 2001
> From: Thierry Reding <treding@nvidia.com>
> Date: Thu, 6 Nov 2014 11:59:23 +0100
> Subject: [PATCH] mm/slab: Always predeclare slab_free()
> 
> Commit 5da1c3c725ab ("slab: recharge slab pages to the allocating memory
> cgroup") added a predeclaration of the new slab_free() helper so that it
> can be used in slab_alloc_node() and slab_alloc(). However the prototype
> is added in an #ifdef CONFIG_NUMA protected section of code, which works
> fine for slab_alloc_node() but fails for slab_alloc().
> 
> Fixes the following build warnings and errors:
> 
> 	mm/slab.c: In function 'slab_alloc':
> 	mm/slab.c:3260:4: error: implicit declaration of function 'slab_free' [-Werror=implicit-function-declaration]
> 	    slab_free(cachep, objp);
> 	    ^
> 	mm/slab.c: At top level:
> 	mm/slab.c:3534:29: warning: conflicting types for 'slab_free'
> 	 static __always_inline void slab_free(struct kmem_cache *cachep, void *objp)
> 				     ^
> 	mm/slab.c:3534:29: error: static declaration of 'slab_free' follows non-static declaration
> 	mm/slab.c:3260:4: note: previous implicit declaration of 'slab_free' was here
> 	    slab_free(cachep, objp);
> 	    ^
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  mm/slab.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/slab.c b/mm/slab.c
> index 61b01c2ae1d9..00cd028404cb 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -2961,6 +2961,8 @@ out:
>  	return objp;
>  }
>  
> +static __always_inline void slab_free(struct kmem_cache *cachep, void *objp);
> +
>  #ifdef CONFIG_NUMA
>  /*
>   * Try allocating on another node if PFA_SPREAD_SLAB is a mempolicy is set.
> @@ -3133,8 +3135,6 @@ done:
>  	return obj;
>  }
>  
> -static __always_inline void slab_free(struct kmem_cache *cachep, void *objp);
> -
>  static __always_inline void *
>  slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
>  		   unsigned long caller)

Attached is a follow-up cleanup patch that avoids the need for a pre-
declaration. Feel free to ignore if you prefer the predeclaration.

Thierry

[-- Attachment #1.2: 0001-mm-slab-Shuffle-code-around-to-avoid-a-predeclaratio.patch --]
[-- Type: text/x-diff, Size: 6840 bytes --]

From 3ad8947fd8613d13f2b9dc1ccd370d0a9ffaeb7b Mon Sep 17 00:00:00 2001
From: Thierry Reding <treding@nvidia.com>
Date: Thu, 6 Nov 2014 12:25:03 +0100
Subject: [PATCH] mm/slab: Shuffle code around to avoid a predeclaration

Instead of providing a predeclaration for the slab_free() helper, move
the helper and its dependencies before any of their users.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 mm/slab.c | 200 +++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 99 insertions(+), 101 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 00cd028404cb..3c025f5934da 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2961,7 +2961,105 @@ out:
 	return objp;
 }
 
-static __always_inline void slab_free(struct kmem_cache *cachep, void *objp);
+static void cache_flusharray(struct kmem_cache *cachep, struct array_cache *ac)
+{
+	int batchcount;
+	struct kmem_cache_node *n;
+	int node = numa_mem_id();
+	LIST_HEAD(list);
+
+	batchcount = ac->batchcount;
+#if DEBUG
+	BUG_ON(!batchcount || batchcount > ac->avail);
+#endif
+	check_irq_off();
+	n = get_node(cachep, node);
+	spin_lock(&n->list_lock);
+	if (n->shared) {
+		struct array_cache *shared_array = n->shared;
+		int max = shared_array->limit - shared_array->avail;
+		if (max) {
+			if (batchcount > max)
+				batchcount = max;
+			memcpy(&(shared_array->entry[shared_array->avail]),
+			       ac->entry, sizeof(void *) * batchcount);
+			shared_array->avail += batchcount;
+			goto free_done;
+		}
+	}
+
+	free_block(cachep, ac->entry, batchcount, node, &list);
+free_done:
+#if STATS
+	{
+		int i = 0;
+		struct list_head *p;
+
+		p = n->slabs_free.next;
+		while (p != &(n->slabs_free)) {
+			struct page *page;
+
+			page = list_entry(p, struct page, lru);
+			BUG_ON(page->active);
+
+			i++;
+			p = p->next;
+		}
+		STATS_SET_FREEABLE(cachep, i);
+	}
+#endif
+	spin_unlock(&n->list_lock);
+	slabs_destroy(cachep, &list);
+	ac->avail -= batchcount;
+	memmove(ac->entry, &(ac->entry[batchcount]), sizeof(void *)*ac->avail);
+}
+
+/*
+ * Release an obj back to its cache. If the obj has a constructed state, it must
+ * be in this state _before_ it is released.  Called with disabled ints.
+ */
+static inline void __cache_free(struct kmem_cache *cachep, void *objp,
+				unsigned long caller)
+{
+	struct array_cache *ac = cpu_cache_get(cachep);
+
+	check_irq_off();
+	kmemleak_free_recursive(objp, cachep->flags);
+	objp = cache_free_debugcheck(cachep, objp, caller);
+
+	kmemcheck_slab_free(cachep, objp, cachep->object_size);
+
+	/*
+	 * Skip calling cache_free_alien() when the platform is not numa.
+	 * This will avoid cache misses that happen while accessing slabp (which
+	 * is per page memory  reference) to get nodeid. Instead use a global
+	 * variable to skip the call, which is mostly likely to be present in
+	 * the cache.
+	 */
+	if (nr_online_nodes > 1 && cache_free_alien(cachep, objp))
+		return;
+
+	if (ac->avail < ac->limit) {
+		STATS_INC_FREEHIT(cachep);
+	} else {
+		STATS_INC_FREEMISS(cachep);
+		cache_flusharray(cachep, ac);
+	}
+
+	ac_put_obj(cachep, ac, objp);
+}
+
+static __always_inline void slab_free(struct kmem_cache *cachep, void *objp)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	debug_check_no_locks_freed(objp, cachep->object_size);
+	if (!(cachep->flags & SLAB_DEBUG_OBJECTS))
+		debug_check_no_obj_freed(objp, cachep->object_size);
+	__cache_free(cachep, objp, _RET_IP_);
+	local_irq_restore(flags);
+}
 
 #ifdef CONFIG_NUMA
 /*
@@ -3307,94 +3405,6 @@ static void free_block(struct kmem_cache *cachep, void **objpp,
 	}
 }
 
-static void cache_flusharray(struct kmem_cache *cachep, struct array_cache *ac)
-{
-	int batchcount;
-	struct kmem_cache_node *n;
-	int node = numa_mem_id();
-	LIST_HEAD(list);
-
-	batchcount = ac->batchcount;
-#if DEBUG
-	BUG_ON(!batchcount || batchcount > ac->avail);
-#endif
-	check_irq_off();
-	n = get_node(cachep, node);
-	spin_lock(&n->list_lock);
-	if (n->shared) {
-		struct array_cache *shared_array = n->shared;
-		int max = shared_array->limit - shared_array->avail;
-		if (max) {
-			if (batchcount > max)
-				batchcount = max;
-			memcpy(&(shared_array->entry[shared_array->avail]),
-			       ac->entry, sizeof(void *) * batchcount);
-			shared_array->avail += batchcount;
-			goto free_done;
-		}
-	}
-
-	free_block(cachep, ac->entry, batchcount, node, &list);
-free_done:
-#if STATS
-	{
-		int i = 0;
-		struct list_head *p;
-
-		p = n->slabs_free.next;
-		while (p != &(n->slabs_free)) {
-			struct page *page;
-
-			page = list_entry(p, struct page, lru);
-			BUG_ON(page->active);
-
-			i++;
-			p = p->next;
-		}
-		STATS_SET_FREEABLE(cachep, i);
-	}
-#endif
-	spin_unlock(&n->list_lock);
-	slabs_destroy(cachep, &list);
-	ac->avail -= batchcount;
-	memmove(ac->entry, &(ac->entry[batchcount]), sizeof(void *)*ac->avail);
-}
-
-/*
- * Release an obj back to its cache. If the obj has a constructed state, it must
- * be in this state _before_ it is released.  Called with disabled ints.
- */
-static inline void __cache_free(struct kmem_cache *cachep, void *objp,
-				unsigned long caller)
-{
-	struct array_cache *ac = cpu_cache_get(cachep);
-
-	check_irq_off();
-	kmemleak_free_recursive(objp, cachep->flags);
-	objp = cache_free_debugcheck(cachep, objp, caller);
-
-	kmemcheck_slab_free(cachep, objp, cachep->object_size);
-
-	/*
-	 * Skip calling cache_free_alien() when the platform is not numa.
-	 * This will avoid cache misses that happen while accessing slabp (which
-	 * is per page memory  reference) to get nodeid. Instead use a global
-	 * variable to skip the call, which is mostly likely to be present in
-	 * the cache.
-	 */
-	if (nr_online_nodes > 1 && cache_free_alien(cachep, objp))
-		return;
-
-	if (ac->avail < ac->limit) {
-		STATS_INC_FREEHIT(cachep);
-	} else {
-		STATS_INC_FREEMISS(cachep);
-		cache_flusharray(cachep, ac);
-	}
-
-	ac_put_obj(cachep, ac, objp);
-}
-
 /**
  * kmem_cache_alloc - Allocate an object
  * @cachep: The cache to allocate from.
@@ -3531,18 +3541,6 @@ void *__kmalloc_track_caller(size_t size, gfp_t flags, unsigned long caller)
 }
 EXPORT_SYMBOL(__kmalloc_track_caller);
 
-static __always_inline void slab_free(struct kmem_cache *cachep, void *objp)
-{
-	unsigned long flags;
-
-	local_irq_save(flags);
-	debug_check_no_locks_freed(objp, cachep->object_size);
-	if (!(cachep->flags & SLAB_DEBUG_OBJECTS))
-		debug_check_no_obj_freed(objp, cachep->object_size);
-	__cache_free(cachep, objp, _RET_IP_);
-	local_irq_restore(flags);
-}
-
 /**
  * kmem_cache_free - Deallocate an object
  * @cachep: The cache the allocation was from.
-- 
2.1.3


[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-11-06  8:36 Stephen Rothwell
@ 2014-11-06 11:24 ` Thierry Reding
  2014-11-06 11:30   ` Thierry Reding
  2014-11-09 23:55   ` Stephen Rothwell
  0 siblings, 2 replies; 253+ messages in thread
From: Thierry Reding @ 2014-11-06 11:24 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Vladimir Davydov


[-- Attachment #1.1: Type: text/plain, Size: 996 bytes --]

On Thu, Nov 06, 2014 at 07:36:18PM +1100, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (sparc defconfig)
> failed like this:
> 
> mm/slab.c: In function 'slab_alloc':
> mm/slab.c:3260:4: error: implicit declaration of function 'slab_free' [-Werror=implicit-function-declaration]
>     slab_free(cachep, objp);
>     ^
> mm/slab.c: At top level:
> mm/slab.c:3534:29: warning: conflicting types for 'slab_free'
>  static __always_inline void slab_free(struct kmem_cache *cachep, void *objp)
>                              ^
> mm/slab.c:3534:29: error: static declaration of 'slab_free' follows non-static declaration
> mm/slab.c:3260:4: note: previous implicit declaration of 'slab_free' was here
>     slab_free(cachep, objp);
>     ^
> 
> I am not sure what caused this, but it is something in the akpm-current
> or akpm trees (possibly interacting with something else).

I fixed this using the attached patch.

Thierry

[-- Attachment #1.2: 0001-mm-slab-Always-predeclare-slab_free.patch --]
[-- Type: text/x-diff, Size: 2015 bytes --]

From a9ec6cfacb892e044a5f76dce3b7fc9a3337d01a Mon Sep 17 00:00:00 2001
From: Thierry Reding <treding@nvidia.com>
Date: Thu, 6 Nov 2014 11:59:23 +0100
Subject: [PATCH] mm/slab: Always predeclare slab_free()

Commit 5da1c3c725ab ("slab: recharge slab pages to the allocating memory
cgroup") added a predeclaration of the new slab_free() helper so that it
can be used in slab_alloc_node() and slab_alloc(). However the prototype
is added in an #ifdef CONFIG_NUMA protected section of code, which works
fine for slab_alloc_node() but fails for slab_alloc().

Fixes the following build warnings and errors:

	mm/slab.c: In function 'slab_alloc':
	mm/slab.c:3260:4: error: implicit declaration of function 'slab_free' [-Werror=implicit-function-declaration]
	    slab_free(cachep, objp);
	    ^
	mm/slab.c: At top level:
	mm/slab.c:3534:29: warning: conflicting types for 'slab_free'
	 static __always_inline void slab_free(struct kmem_cache *cachep, void *objp)
				     ^
	mm/slab.c:3534:29: error: static declaration of 'slab_free' follows non-static declaration
	mm/slab.c:3260:4: note: previous implicit declaration of 'slab_free' was here
	    slab_free(cachep, objp);
	    ^

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 mm/slab.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 61b01c2ae1d9..00cd028404cb 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2961,6 +2961,8 @@ out:
 	return objp;
 }
 
+static __always_inline void slab_free(struct kmem_cache *cachep, void *objp);
+
 #ifdef CONFIG_NUMA
 /*
  * Try allocating on another node if PFA_SPREAD_SLAB is a mempolicy is set.
@@ -3133,8 +3135,6 @@ done:
 	return obj;
 }
 
-static __always_inline void slab_free(struct kmem_cache *cachep, void *objp);
-
 static __always_inline void *
 slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
 		   unsigned long caller)
-- 
2.1.3


[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2014-11-06  8:36 Stephen Rothwell
  2014-11-06 11:24 ` Thierry Reding
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2014-11-06  8:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Vladimir Davydov

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (sparc defconfig)
failed like this:

mm/slab.c: In function 'slab_alloc':
mm/slab.c:3260:4: error: implicit declaration of function 'slab_free' [-Werror=implicit-function-declaration]
    slab_free(cachep, objp);
    ^
mm/slab.c: At top level:
mm/slab.c:3534:29: warning: conflicting types for 'slab_free'
 static __always_inline void slab_free(struct kmem_cache *cachep, void *objp)
                             ^
mm/slab.c:3534:29: error: static declaration of 'slab_free' follows non-static declaration
mm/slab.c:3260:4: note: previous implicit declaration of 'slab_free' was here
    slab_free(cachep, objp);
    ^

I am not sure what caused this, but it is something in the akpm-current
or akpm trees (possibly interacting with something else).

I have just left this for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-08-26 13:54 ` Don Zickus
@ 2014-08-26 21:37   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2014-08-26 21:37 UTC (permalink / raw)
  To: Don Zickus
  Cc: Andrew Morton, linux-next, linux-kernel, Ulrich Obergfell, Andrew Jones

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

Hi Don,

On Tue, 26 Aug 2014 09:54:17 -0400 Don Zickus <dzickus@redhat.com> wrote:
>
> On Tue, Aug 26, 2014 at 05:18:18PM +1000, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (sparc64
> > defconfig) failed like this:
> > 
> > kernel/built-in.o: In function `proc_dowatchdog':
> > (.text+0x6a620): undefined reference to `watchdog_hardlockup_detector_is_enabled'
> > kernel/built-in.o: In function `proc_dowatchdog':
> > (.text+0x6a6a8): undefined reference to `watchdog_enable_hardlockup_detector'
> > kernel/built-in.o: In function `proc_dowatchdog':
> > (.text+0x6a79c): undefined reference to `watchdog_enable_hardlockup_detector'
> > 
> > Caused by commit 72355eed4bd7 ("kernel/watchdog.c: control hard lockup
> > detection default").  This build has CONFIG_HAVE_NMI_WATCHDOG=y,
> > CONFIG_HARDLOCKUP_DETECTOR not set.
> 
> :-(  I was trying to figure out why touch_nmi_watchdog doesn't break the
> same way until I noticed sparc has its own personal implementation of this
> function (instead of using kernel/watchdog.c's version).
> 
> We are going to have to split the include/linux/nmi.h changes out into its
> own #ifdef area.  I am not sure my brain is quite ready to untangle the
> sparc implementation of the watchdog stuff and try to make it use the
> generic one yet.
> 
> This patch I believe fixes the compile problem for now.
> 
> Not sure the proper way to post this or who to send this too.

Send it to Andrew Morton (since he has the original patch) who is cc'd
anyway.  I will put this in linux-next today instead of reverting the
other patches if he doesn't get around to doing another mmotm before
then.

> From: Don Zickus <dzickus@redhat.com>
> Date: Tue, 26 Aug 2014 09:50:21 -0400
> Subject: [PATCH] watchdog, nmi: Fix compile issues on sparc
> 
> Sparc doesn't use HARDLOCKUP_DETECTOR the same way x86 does.  As a
> result break out the new functions
> 
> watchdog_hardlockup_detector_is_enabled
> watchdog_enable_hardlockup_detector
> 
> into their own #if defined area.  This resolves the compile issue
> where CONFIG_NMI_WATCHDOG=y and CONFIG_HARDLOCKUP_DETECTOR is not set
> on sparc.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>

> Signed-off-by: Don Zickus <dzickus@redhat.com>
> ---
>  include/linux/nmi.h |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/nmi.h b/include/linux/nmi.h
> index 72aacf4..f82a5bf 100644
> --- a/include/linux/nmi.h
> +++ b/include/linux/nmi.h
> @@ -17,14 +17,18 @@
>  #if defined(CONFIG_HAVE_NMI_WATCHDOG) ||
> defined(CONFIG_HARDLOCKUP_DETECTOR) #include <asm/nmi.h>
>  extern void touch_nmi_watchdog(void);
> -extern void watchdog_enable_hardlockup_detector(bool val);
> -extern bool watchdog_hardlockup_detector_is_enabled(void);
>  #else
>  static inline void touch_nmi_watchdog(void)
>  {
>  	touch_softlockup_watchdog();
>  }
> -static inline void watchdog_enable_hardlockup_detector(bool)
> +#endif
> +
> +#if defined(CONFIG_HARDLOCKUP_DETECTOR)
> +extern void watchdog_enable_hardlockup_detector(bool val);
> +extern bool watchdog_hardlockup_detector_is_enabled(void);
> +#else
> +static inline void watchdog_enable_hardlockup_detector(bool val)
>  {
>  }
>  static inline bool watchdog_hardlockup_detector_is_enabled(void)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-08-26  7:18 Stephen Rothwell
@ 2014-08-26 13:54 ` Don Zickus
  2014-08-26 21:37   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Don Zickus @ 2014-08-26 13:54 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Ulrich Obergfell, Andrew Jones

On Tue, Aug 26, 2014 at 05:18:18PM +1000, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (sparc64
> defconfig) failed like this:
> 
> kernel/built-in.o: In function `proc_dowatchdog':
> (.text+0x6a620): undefined reference to `watchdog_hardlockup_detector_is_enabled'
> kernel/built-in.o: In function `proc_dowatchdog':
> (.text+0x6a6a8): undefined reference to `watchdog_enable_hardlockup_detector'
> kernel/built-in.o: In function `proc_dowatchdog':
> (.text+0x6a79c): undefined reference to `watchdog_enable_hardlockup_detector'
> 
> Caused by commit 72355eed4bd7 ("kernel/watchdog.c: control hard lockup
> detection default").  This build has CONFIG_HAVE_NMI_WATCHDOG=y,
> CONFIG_HARDLOCKUP_DETECTOR not set.

:-(  I was trying to figure out why touch_nmi_watchdog doesn't break the
same way until I noticed sparc has its own personal implementation of this
function (instead of using kernel/watchdog.c's version).

We are going to have to split the include/linux/nmi.h changes out into its
own #ifdef area.  I am not sure my brain is quite ready to untangle the
sparc implementation of the watchdog stuff and try to make it use the
generic one yet.

This patch I believe fixes the compile problem for now.

Not sure the proper way to post this or who to send this too.

------8<------
From: Don Zickus <dzickus@redhat.com>
Date: Tue, 26 Aug 2014 09:50:21 -0400
Subject: [PATCH] watchdog, nmi: Fix compile issues on sparc

Sparc doesn't use HARDLOCKUP_DETECTOR the same way x86 does.  As a result break
out the new functions

watchdog_hardlockup_detector_is_enabled
watchdog_enable_hardlockup_detector

into their own #if defined area.  This resolves the compile issue where
CONFIG_NMI_WATCHDOG=y and CONFIG_HARDLOCKUP_DETECTOR is not set on sparc.

Signed-off-by: Don Zickus <dzickus@redhat.com>
---
 include/linux/nmi.h |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 72aacf4..f82a5bf 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -17,14 +17,18 @@
 #if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
 #include <asm/nmi.h>
 extern void touch_nmi_watchdog(void);
-extern void watchdog_enable_hardlockup_detector(bool val);
-extern bool watchdog_hardlockup_detector_is_enabled(void);
 #else
 static inline void touch_nmi_watchdog(void)
 {
 	touch_softlockup_watchdog();
 }
-static inline void watchdog_enable_hardlockup_detector(bool)
+#endif
+
+#if defined(CONFIG_HARDLOCKUP_DETECTOR)
+extern void watchdog_enable_hardlockup_detector(bool val);
+extern bool watchdog_hardlockup_detector_is_enabled(void);
+#else
+static inline void watchdog_enable_hardlockup_detector(bool val)
 {
 }
 static inline bool watchdog_hardlockup_detector_is_enabled(void)
-- 
1.7.1

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

* linux-next: build failure after merge of the akpm tree
@ 2014-08-26  7:18 Stephen Rothwell
  2014-08-26 13:54 ` Don Zickus
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2014-08-26  7:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Ulrich Obergfell, Andrew Jones, Don Zickus

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (sparc64
defconfig) failed like this:

kernel/built-in.o: In function `proc_dowatchdog':
(.text+0x6a620): undefined reference to `watchdog_hardlockup_detector_is_enabled'
kernel/built-in.o: In function `proc_dowatchdog':
(.text+0x6a6a8): undefined reference to `watchdog_enable_hardlockup_detector'
kernel/built-in.o: In function `proc_dowatchdog':
(.text+0x6a79c): undefined reference to `watchdog_enable_hardlockup_detector'

Caused by commit 72355eed4bd7 ("kernel/watchdog.c: control hard lockup
detection default").  This build has CONFIG_HAVE_NMI_WATCHDOG=y,
CONFIG_HARDLOCKUP_DETECTOR not set.

I have reverted that commit (and commits
"watchdog-control-hard-lockup-detection-default-fix" and "kvm: ensure
hard lockup detection is disabled by default" that follow it) for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-07-16  8:26 Stephen Rothwell
@ 2014-07-16  8:54 ` Michal Hocko
  0 siblings, 0 replies; 253+ messages in thread
From: Michal Hocko @ 2014-07-16  8:54 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, Tejun Heo, linux-next, linux-kernel

On Wed 16-07-14 18:26:41, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> mm/memcontrol.c:5269:12: error: 'CFTYPE_INSANE' undeclared here (not in a function)
>    .flags = CFTYPE_INSANE,
>             ^
> 
> Caused by commit 8fa6a8baeffc ("memcg: deprecate memory.force_empty
> knob") interacting with commits a8ddc8215e1a ("cgroup: distinguish the
> default and legacy hierarchies when handling cftypes") and 05ebb6e60f04
> ("cgroup: make CFTYPE_ONLY_ON_DFL and CFTYPE_NO_ internal to cgroup
> core") from the cgroup tree.
>
> I applied the following fix up patch:

This basically means dropping the page from Andrew's tree after the
above cgroups changes. I am sorry but I was really busy last few weeks
so I didn't follow cgroups changes closely. I will post a patch that
deals with the dfl hierarchy.

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 16 Jul 2014 18:20:59 +1000
> Subject: [PATCH] memcg-deprecate-memoryforce_empty-knob-fix2
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  mm/memcontrol.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 8fa6602a32cd..e1c9699b157b 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5266,7 +5266,6 @@ static struct cftype mem_cgroup_files[] = {
>  	},
>  	{
>  		.name = "force_empty",
> -		.flags = CFTYPE_INSANE,
>  		.write = mem_cgroup_force_empty_write,
>  	},
>  	{
> -- 
> 2.0.1
> 
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au



-- 
Michal Hocko
SUSE Labs

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

* linux-next: build failure after merge of the akpm tree
@ 2014-07-16  8:26 Stephen Rothwell
  2014-07-16  8:54 ` Michal Hocko
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2014-07-16  8:26 UTC (permalink / raw)
  To: Andrew Morton, Tejun Heo; +Cc: linux-next, linux-kernel, Michal Hocko

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

Hi Andrew,

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

mm/memcontrol.c:5269:12: error: 'CFTYPE_INSANE' undeclared here (not in a function)
   .flags = CFTYPE_INSANE,
            ^

Caused by commit 8fa6a8baeffc ("memcg: deprecate memory.force_empty
knob") interacting with commits a8ddc8215e1a ("cgroup: distinguish the
default and legacy hierarchies when handling cftypes") and 05ebb6e60f04
("cgroup: make CFTYPE_ONLY_ON_DFL and CFTYPE_NO_ internal to cgroup
core") from the cgroup tree.

I applied the following fix up patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 16 Jul 2014 18:20:59 +1000
Subject: [PATCH] memcg-deprecate-memoryforce_empty-knob-fix2

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/memcontrol.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 8fa6602a32cd..e1c9699b157b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5266,7 +5266,6 @@ static struct cftype mem_cgroup_files[] = {
 	},
 	{
 		.name = "force_empty",
-		.flags = CFTYPE_INSANE,
 		.write = mem_cgroup_force_empty_write,
 	},
 	{
-- 
2.0.1


-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-03-07 17:05       ` Christoph Lameter
@ 2014-03-07 21:08         ` Andrew Morton
  0 siblings, 0 replies; 253+ messages in thread
From: Andrew Morton @ 2014-03-07 21:08 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: Stephen Rothwell, linux-next, linux-kernel

On Fri, 7 Mar 2014 11:05:49 -0600 (CST) Christoph Lameter <cl@linux.com> wrote:

> On Thu, 6 Mar 2014, Andrew Morton wrote:
> 
> > > So, by "the whole series" do you mean just/all these:
> > >
> > > percpu-add-raw_cpu_ops.patch
> > > ...
> > > sh-replace-__get_cpu_var-uses.patch
> >
> > Yep.  Commented out in http://ozlabs.org/~akpm/mmots/series
> >
> > > If so, I will remove them from my tree today (if you don't get around to
> > > a new mmotm before then).
> >
> > Cool.
> 
> I need at least the initial 5 patches that establish the framework in
> -next and do the debugging in order to make further progress on this one.

I'll re-enable

percpu-add-raw_cpu_ops.patch
mm-use-raw_cpu-ops-for-determining-current-numa-node.patch
modules-use-raw_cpu_write-for-initialization-of-per-cpu-refcount.patch
net-replace-__this_cpu_inc-in-routec-with-raw_cpu_inc.patch
percpu-add-preemption-checks-to-__this_cpu-ops.patch

OK?

> The rest are bits and pieces that may require some detail work.

It looks like they will need quite a lot of work I'm afraid.  The
automated sweep wasn't very successful but it did demonstrate that
there are nasties and gremlins all over the place.

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-03-07  1:38     ` Andrew Morton
@ 2014-03-07 17:05       ` Christoph Lameter
  2014-03-07 21:08         ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Christoph Lameter @ 2014-03-07 17:05 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Stephen Rothwell, linux-next, linux-kernel

On Thu, 6 Mar 2014, Andrew Morton wrote:

> > So, by "the whole series" do you mean just/all these:
> >
> > percpu-add-raw_cpu_ops.patch
> > ...
> > sh-replace-__get_cpu_var-uses.patch
>
> Yep.  Commented out in http://ozlabs.org/~akpm/mmots/series
>
> > If so, I will remove them from my tree today (if you don't get around to
> > a new mmotm before then).
>
> Cool.

I need at least the initial 5 patches that establish the framework in
-next and do the debugging in order to make further progress on this one.

The rest are bits and pieces that may require some detail work.

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-03-06  8:22 Stephen Rothwell
  2014-03-06 21:48 ` Andrew Morton
@ 2014-03-07 17:02 ` Christoph Lameter
  1 sibling, 0 replies; 253+ messages in thread
From: Christoph Lameter @ 2014-03-07 17:02 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel

On Thu, 6 Mar 2014, Stephen Rothwell wrote:

>
> I have reverted that commit for today.
>
> I suspect that this whole series may need more review and work.

Toss the bits that do not build for now. These can then be handled in
individual patches since the overall framework is present.

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-03-07  0:57   ` Stephen Rothwell
@ 2014-03-07  1:38     ` Andrew Morton
  2014-03-07 17:05       ` Christoph Lameter
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2014-03-07  1:38 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Christoph Lameter

On Fri, 7 Mar 2014 11:57:44 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> On Thu, 6 Mar 2014 13:48:48 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > Yes, I've disabled the whole series for now.  Some of these errors
> > appear to be caused by compiler mishandling, so it's going to be
> > difficult :(
> 
> So, by "the whole series" do you mean just/all these:
> 
> percpu-add-raw_cpu_ops.patch
> ...
> sh-replace-__get_cpu_var-uses.patch

Yep.  Commented out in http://ozlabs.org/~akpm/mmots/series

> If so, I will remove them from my tree today (if you don't get around to
> a new mmotm before then).

Cool.

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-03-06 21:48 ` Andrew Morton
@ 2014-03-07  0:57   ` Stephen Rothwell
  2014-03-07  1:38     ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2014-03-07  0:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Christoph Lameter

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

Hi Andrew,

On Thu, 6 Mar 2014 13:48:48 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> Yes, I've disabled the whole series for now.  Some of these errors
> appear to be caused by compiler mishandling, so it's going to be
> difficult :(

So, by "the whole series" do you mean just/all these:

percpu-add-raw_cpu_ops.patch
mm-use-raw_cpu-ops-for-determining-current-numa-node.patch
modules-use-raw_cpu_write-for-initialization-of-per-cpu-refcount.patch
net-replace-__this_cpu_inc-in-routec-with-raw_cpu_inc.patch
percpu-add-preemption-checks-to-__this_cpu-ops.patch
mm-replace-__get_cpu_var-uses-with-this_cpu_ptr.patch
tracing-replace-__get_cpu_var-uses-with-this_cpu_ptr.patch
percpu-replace-__get_cpu_var-with-this_cpu_ptr.patch
kernel-misc-replace-__get_cpu_var-uses.patch
drivers-char-random-replace-__get_cpu_var-uses.patch
drivers-cpuidle-replace-__get_cpu_var-uses-for-address-calculation.patch
drivers-oprofile-replace-__get_cpu_var-uses-for-address-calculation.patch
drivers-leds-replace-__get_cpu_var-use-through-this_cpu_ptr.patch
drivers-clocksource-replace-__get_cpu_var-used-for-address-calculation.patch
parisc-replace-__get_cpu_var-uses-for-address-calculation.patch
metag-replace-__get_cpu_var-uses-for-address-calculation.patch
drivers-net-ethernet-tile-replace-__get_cpu_var-uses-for-address-calculation.patch
drivers-net-ethernet-tile-__get_cpu_var-call-introduced-in-314.patch
tilegx-another-case-of-get_cpu_var.patch
time-replace-__get_cpu_var-uses.patch
scheduler-replace-__get_cpu_var-with-this_cpu_ptr.patch
tick-sched-fix-two-new-uses-of-__get_cpu_ptr.patch
block-replace-__this_cpu_ptr-with-raw_cpu_ptr.patch
rcu-replace-__this_cpu_ptr-uses-with-raw_cpu_ptr.patch
watchdog-replace-__raw_get_cpu_var-uses.patch
net-replace-get_cpu_var-through-this_cpu_ptr.patch
md-replace-__this_cpu_ptr-with-raw_cpu_ptr.patch
irqchips-replace-__this_cpu_ptr-uses.patch
x86-replace-__get_cpu_var-uses.patch
x86-change-__get_cpu_var-calls-introduced-in-314.patch
arm-replace-__this_cpu_ptr-with-raw_cpu_ptr.patch
mips-replace-__get_cpu_var-uses-in-fpu-emulator.patch
mips-replace-__get_cpu_var-uses.patch
s390-rename-__this_cpu_ptr-to-raw_cpu_ptr.patch
s390-replace-__get_cpu_var-uses.patch
s390-handle-new-__get_cpu_var-calls-added-in-314.patch
ia64-replace-__get_cpu_var-uses.patch
powerpc-replace-__get_cpu_var-uses.patch
powerpc-handle-new-__get_cpu_var-calls-in-314.patch
sparc-replace-__get_cpu_var-uses.patch
tile-replace-__get_cpu_var-uses.patch
blackfin-replace-__get_cpu_var-uses.patch
avr32-replace-__get_cpu_var-with-__this_cpu_write.patch
alpha-replace-__get_cpu_var.patch
alpha-replace-__get_cpu_var-fix.patch
sh-replace-__get_cpu_var-uses.patch

If so, I will remove them from my tree today (if you don't get around to
a new mmotm before then).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2014-03-06  8:22 Stephen Rothwell
@ 2014-03-06 21:48 ` Andrew Morton
  2014-03-07  0:57   ` Stephen Rothwell
  2014-03-07 17:02 ` Christoph Lameter
  1 sibling, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2014-03-06 21:48 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Christoph Lameter

On Thu, 6 Mar 2014 19:22:34 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> arch/sparc/kernel/time_64.c: In function 'timer_interrupt':
> arch/sparc/kernel/time_64.c:735:28: error: lvalue required as increment operand
> arch/sparc/kernel/traps_64.c: In function '__cheetah_flush_icache':
> arch/sparc/kernel/traps_64.c:963:2: error: 'pscr_ret__.icache_size' is used uninitialized in this function [-Werror=uninitialized]
> arch/sparc/kernel/traps_64.c: In function 'cheetah_flush_dcache':
> arch/sparc/kernel/traps_64.c:1002:2: error: 'pscr_ret__.dcache_size' is used uninitialized in this function [-Werror=uninitialized]
> arch/sparc/kernel/traps_64.c: In function 'cheetah_plus_parity_error':
> arch/sparc/kernel/traps_64.c:1023:2: error: 'pscr_ret__.dcache_size' may be used uninitialized in this function [-Werror=uninitialized]
> arch/sparc/kernel/traps_64.c:1020:16: note: 'pscr_ret__.dcache_size' was declared here
> arch/sparc/kernel/traps_64.c:1033:33: error: 'pscr_ret__.dcache_line_size' may be used uninitialized in this function [-Werror=uninitialized]
> arch/sparc/kernel/traps_64.c:1021:21: note: 'pscr_ret__.dcache_line_size' was declared here
> cc1: all warnings being treated as errors
> kernel/softirq.c: In function '__do_softirq':
> kernel/softirq.c:252:1: error: lvalue required as left operand of assignment
> kernel/softirq.c: In function '__raise_softirq_irqoff':
> kernel/softirq.c:427:1: error: lvalue required as left operand of assignment
> arch/sparc/kernel/ptrace_64.c: In function 'flush_ptrace_access':
> arch/sparc/kernel/ptrace_64.c:91:20: error: 'pscr_ret__.dcache_line_size' may be used uninitialized in this function [-Werror=uninitialized]
> arch/sparc/kernel/ptrace_64.c:113:20: error: 'pscr_ret__.icache_line_size' may be used uninitialized in this function [-Werror=uninitialized]
> 
> Caused by commit 5aa661aa13d4 ("sparc: replace __get_cpu_var uses").
> 
> I have reverted that commit for today.
> 
> I suspect that this whole series may need more review and work.

Yes, I've disabled the whole series for now.  Some of these errors
appear to be caused by compiler mishandling, so it's going to be
difficult :(

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

* linux-next: build failure after merge of the akpm tree
@ 2014-03-06  8:22 Stephen Rothwell
  2014-03-06 21:48 ` Andrew Morton
  2014-03-07 17:02 ` Christoph Lameter
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2014-03-06  8:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Christoph Lameter

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (sparc64 defconfig)
failed like this:

arch/sparc/kernel/time_64.c: In function 'timer_interrupt':
arch/sparc/kernel/time_64.c:735:28: error: lvalue required as increment operand
arch/sparc/kernel/traps_64.c: In function '__cheetah_flush_icache':
arch/sparc/kernel/traps_64.c:963:2: error: 'pscr_ret__.icache_size' is used uninitialized in this function [-Werror=uninitialized]
arch/sparc/kernel/traps_64.c: In function 'cheetah_flush_dcache':
arch/sparc/kernel/traps_64.c:1002:2: error: 'pscr_ret__.dcache_size' is used uninitialized in this function [-Werror=uninitialized]
arch/sparc/kernel/traps_64.c: In function 'cheetah_plus_parity_error':
arch/sparc/kernel/traps_64.c:1023:2: error: 'pscr_ret__.dcache_size' may be used uninitialized in this function [-Werror=uninitialized]
arch/sparc/kernel/traps_64.c:1020:16: note: 'pscr_ret__.dcache_size' was declared here
arch/sparc/kernel/traps_64.c:1033:33: error: 'pscr_ret__.dcache_line_size' may be used uninitialized in this function [-Werror=uninitialized]
arch/sparc/kernel/traps_64.c:1021:21: note: 'pscr_ret__.dcache_line_size' was declared here
cc1: all warnings being treated as errors
kernel/softirq.c: In function '__do_softirq':
kernel/softirq.c:252:1: error: lvalue required as left operand of assignment
kernel/softirq.c: In function '__raise_softirq_irqoff':
kernel/softirq.c:427:1: error: lvalue required as left operand of assignment
arch/sparc/kernel/ptrace_64.c: In function 'flush_ptrace_access':
arch/sparc/kernel/ptrace_64.c:91:20: error: 'pscr_ret__.dcache_line_size' may be used uninitialized in this function [-Werror=uninitialized]
arch/sparc/kernel/ptrace_64.c:113:20: error: 'pscr_ret__.icache_line_size' may be used uninitialized in this function [-Werror=uninitialized]

Caused by commit 5aa661aa13d4 ("sparc: replace __get_cpu_var uses").

I have reverted that commit for today.

I suspect that this whole series may need more review and work.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2014-03-06  7:54 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2014-03-06  7:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Christoph Lameter

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/mm/stab.c: In function '__ste_allocate':
arch/powerpc/mm/stab.c:138:42: error: lvalue required as left operand of assignment
    __this_cpu_read(stab_cache[offset++]) = stab_entry;
                                          ^
In file included from include/linux/kernel_stat.h:8:0,
                 from kernel/softirq.c:14:
kernel/softirq.c: In function '__do_softirq':
include/linux/interrupt.h:328:57: error: lvalue required as left operand of assignment
 #define set_softirq_pending(x) (local_softirq_pending() = (x))
                                                         ^
kernel/softirq.c:252:2: note: in expansion of macro 'set_softirq_pending'
  set_softirq_pending(0);
  ^
kernel/softirq.c: In function '__raise_softirq_irqoff':
include/linux/interrupt.h:329:57: error: lvalue required as left operand of assignment
 #define or_softirq_pending(x)  (local_softirq_pending() |= (x))
                                                         ^
kernel/softirq.c:427:2: note: in expansion of macro 'or_softirq_pending'
  or_softirq_pending(1UL << nr);
  ^
In file included from arch/powerpc/include/asm/time.h:18:0,
                 from arch/powerpc/include/asm/cputime.h:29,
                 from include/linux/sched.h:33,
                 from include/linux/ptrace.h:5,
                 from arch/powerpc/kernel/mce.c:26:
arch/powerpc/kernel/mce.c: In function 'save_mce_event':
include/linux/percpu.h:737:2: error: incompatible types when initializing type 'struct machine_check_event *' using type 'struct machine_check_event'
  (__this_cpu_preempt_check("read"),__pcpu_size_call_return(raw_cpu_read_, (pcp)))
  ^
arch/powerpc/kernel/mce.c:77:36: note: in expansion of macro '__this_cpu_read'
  struct machine_check_event *mce = __this_cpu_read(mce_event[index]);
                                    ^
arch/powerpc/kernel/mce.c: In function 'get_mce_event':
arch/powerpc/kernel/mce.c:156:10: error: incompatible types when assigning to type 'struct machine_check_event *' from type 'struct machine_check_event'
   mc_evt = __this_cpu_read(mce_event[index]);
          ^

Caused by commits 1c55f79be84e ("powerpc: replace __get_cpu_var uses")
and 0884f89e7e08 ("powerpc: handle new __get_cpu_var calls in 3.14").
Someone should check the build results overnight ...
http://kisskb.ellerman.id.au/linux-next

I added the following patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 6 Mar 2014 18:36:39 +1100
Subject: [PATCH] powerpc: replace __get_cpu_var uses fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/hardirq.h | 4 ++++
 arch/powerpc/kernel/mce.c          | 4 ++--
 arch/powerpc/mm/stab.c             | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/include/asm/hardirq.h b/arch/powerpc/include/asm/hardirq.h
index 2e14594ccea4..f8c2a0e71f24 100644
--- a/arch/powerpc/include/asm/hardirq.h
+++ b/arch/powerpc/include/asm/hardirq.h
@@ -21,6 +21,10 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
 #define __ARCH_IRQ_STAT
 
 #define local_softirq_pending()	__this_cpu_read(irq_stat.__softirq_pending)
+#define set_softirq_pending(x) __this_cpu_write(irq_stat.__softirq_pending, (x))
+#define or_softirq_pending(x)  __this_cpu_or(irq_stat.__softirq_pending, (x))
+
+#define __ARCH_SET_SOFTIRQ_PENDING
 
 static inline void ack_bad_irq(unsigned int irq)
 {
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
index a9bf88affe79..46da0810a03b 100644
--- a/arch/powerpc/kernel/mce.c
+++ b/arch/powerpc/kernel/mce.c
@@ -74,7 +74,7 @@ void save_mce_event(struct pt_regs *regs, long handled,
 {
 	uint64_t srr1;
 	int index = __this_cpu_inc_return(mce_nest_count);
-	struct machine_check_event *mce = __this_cpu_read(mce_event[index]);
+	struct machine_check_event *mce = this_cpu_ptr(&mce_event[index]);
 
 	/*
 	 * Return if we don't have enough space to log mce event.
@@ -153,7 +153,7 @@ int get_mce_event(struct machine_check_event *mce, bool release)
 
 	/* Check if we have MCE info to process. */
 	if (index < MAX_MC_EVT) {
-		mc_evt = __this_cpu_read(mce_event[index]);
+		mc_evt = this_cpu_ptr(&mce_event[index]);
 		/* Copy the event structure and release the original */
 		if (mce)
 			*mce = *mc_evt;
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c
index ecbdc28554c6..db4483e95382 100644
--- a/arch/powerpc/mm/stab.c
+++ b/arch/powerpc/mm/stab.c
@@ -135,7 +135,7 @@ static int __ste_allocate(unsigned long ea, struct mm_struct *mm)
 	if (!is_kernel_addr(ea)) {
 		offset = __this_cpu_read(stab_cache_ptr);
 		if (offset < NR_STAB_CACHE_ENTRIES)
-			__this_cpu_read(stab_cache[offset++]) = stab_entry;
+			__this_cpu_write(stab_cache[offset++], stab_entry);
 		else
 			offset = NR_STAB_CACHE_ENTRIES+1;
 		__this_cpu_write(stab_cache_ptr, offset);
-- 
1.9.0

However, I then got these errors:

arch/powerpc/kernel/built-in.o: In function `.set_breakpoint':
(.text+0x84c4): undefined reference to `.__bad_size_call_parameter'
arch/powerpc/kernel/built-in.o: In function `.machine_check_queue_event':
(.text+0x19b60): undefined reference to `.__bad_size_call_parameter'

These are in arch/powerpc/kernel/process.c and
arch/powerpc/kernel/mce.c.  They are assigning structs.  This used to
work with __get_cpu_var(x) = y, but does not for __this_cpu_write(x, y)
if sizeof(x) > 8.

I have dropped my fix patch and reverted those two commits for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-09-25 21:43     ` Andrew Morton
@ 2013-10-02  8:53       ` Frederic Weisbecker
  0 siblings, 0 replies; 253+ messages in thread
From: Frederic Weisbecker @ 2013-10-02  8:53 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Hugh Dickins, Stephen Rothwell, linux-next, linux-kernel,
	Sergei Trofimovich, Timur Tabi, Greg KH, ppc-dev

On Wed, Sep 25, 2013 at 02:43:28PM -0700, Andrew Morton wrote:
> On Wed, 25 Sep 2013 14:32:14 -0700 (PDT) Hugh Dickins <hughd@google.com> wrote:
> 
> > On Wed, 25 Sep 2013, Andrew Morton wrote:
> > > On Wed, 25 Sep 2013 11:06:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > Hi Andrew,
> > > > 
> > > > After merging the akpm tree, linux-next builds (powerpc allmodconfig)
> > > > fail like this:
> > > 
> > > I can't get powerpc to build at all at present:
> > > 
> > >   CHK     include/config/kernel.release
> > >   CHK     include/generated/uapi/linux/version.h
> > >   CHK     include/generated/utsrelease.h
> > >   CC      arch/powerpc/kernel/asm-offsets.s
> > > In file included from include/linux/vtime.h:6,
> > >                  from include/linux/hardirq.h:7,
> > >                  from include/linux/memcontrol.h:24,
> > >                  from include/linux/swap.h:8,
> > >                  from include/linux/suspend.h:4,
> > >                  from arch/powerpc/kernel/asm-offsets.c:24:
> > > arch/powerpc/include/generated/asm/vtime.h:1:31: error: asm-generic/vtime.h: No such file or directory
> > 
> > That caught me too: include/asm-generic/vtime.h is a patch-unfriendly
> > 0-length file in the git tree;
> 
> hm, this?
> 
> 
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: include/asm-generic/vtime.h: avoid zero-length file
> 
> patch(1) can't handle zero-length files - it appears to simply not create
> the file, so my powerpc build fails.
> 
> Put something in here to make life easier.
> 
> Cc: Hugh Dickins <hughd@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  include/asm-generic/vtime.h |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff -puN /dev/null include/asm-generic/vtime.h
> --- /dev/null
> +++ a/include/asm-generic/vtime.h
> @@ -0,0 +1 @@
> +/* no content, but patch(1) dislikes empty files */
> _
> 
> 
> 
> > I wonder what use it's supposed to have.
> 
> Frederic, can you please confirm that include/asm-generic/vtime.h is
> supposed to be empty?

Yep. I use <asm/vtime.h> to let archs override some CPP symbols. And if they
don't override these, they simply return the generic vtime.h file that is empty
and as such doesn't override anything.

May be that's an ugly way to handle this kind of override scenario but I
couldn't find a better mechanism.

Actually, a Kconfig symbol would do the trick. It just seemed to me like
an overkill at that time. But it may be better.

Thanks.

> 
> > (And I'm not very keen on the growing trend for symlinks in the git tree.)
> 
> ooh, that explains why I lost my arch/microblaze/boot/dts/system.dts.

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-09-25 21:32   ` Hugh Dickins
@ 2013-09-25 21:43     ` Andrew Morton
  2013-10-02  8:53       ` Frederic Weisbecker
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2013-09-25 21:43 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: Stephen Rothwell, Frederic Weisbecker, linux-next, linux-kernel,
	Sergei Trofimovich, Timur Tabi, Greg KH, ppc-dev

On Wed, 25 Sep 2013 14:32:14 -0700 (PDT) Hugh Dickins <hughd@google.com> wrote:

> On Wed, 25 Sep 2013, Andrew Morton wrote:
> > On Wed, 25 Sep 2013 11:06:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > Hi Andrew,
> > > 
> > > After merging the akpm tree, linux-next builds (powerpc allmodconfig)
> > > fail like this:
> > 
> > I can't get powerpc to build at all at present:
> > 
> >   CHK     include/config/kernel.release
> >   CHK     include/generated/uapi/linux/version.h
> >   CHK     include/generated/utsrelease.h
> >   CC      arch/powerpc/kernel/asm-offsets.s
> > In file included from include/linux/vtime.h:6,
> >                  from include/linux/hardirq.h:7,
> >                  from include/linux/memcontrol.h:24,
> >                  from include/linux/swap.h:8,
> >                  from include/linux/suspend.h:4,
> >                  from arch/powerpc/kernel/asm-offsets.c:24:
> > arch/powerpc/include/generated/asm/vtime.h:1:31: error: asm-generic/vtime.h: No such file or directory
> 
> That caught me too: include/asm-generic/vtime.h is a patch-unfriendly
> 0-length file in the git tree;

hm, this?


From: Andrew Morton <akpm@linux-foundation.org>
Subject: include/asm-generic/vtime.h: avoid zero-length file

patch(1) can't handle zero-length files - it appears to simply not create
the file, so my powerpc build fails.

Put something in here to make life easier.

Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/asm-generic/vtime.h |    1 +
 1 file changed, 1 insertion(+)

diff -puN /dev/null include/asm-generic/vtime.h
--- /dev/null
+++ a/include/asm-generic/vtime.h
@@ -0,0 +1 @@
+/* no content, but patch(1) dislikes empty files */
_



> I wonder what use it's supposed to have.

Frederic, can you please confirm that include/asm-generic/vtime.h is
supposed to be empty?

> (And I'm not very keen on the growing trend for symlinks in the git tree.)

ooh, that explains why I lost my arch/microblaze/boot/dts/system.dts.

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-09-25 20:26 ` Andrew Morton
@ 2013-09-25 21:32   ` Hugh Dickins
  2013-09-25 21:43     ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Hugh Dickins @ 2013-09-25 21:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, Frederic Weisbecker, linux-next, linux-kernel,
	Sergei Trofimovich, Timur Tabi, Greg KH, ppc-dev

On Wed, 25 Sep 2013, Andrew Morton wrote:
> On Wed, 25 Sep 2013 11:06:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > Hi Andrew,
> > 
> > After merging the akpm tree, linux-next builds (powerpc allmodconfig)
> > fail like this:
> 
> I can't get powerpc to build at all at present:
> 
>   CHK     include/config/kernel.release
>   CHK     include/generated/uapi/linux/version.h
>   CHK     include/generated/utsrelease.h
>   CC      arch/powerpc/kernel/asm-offsets.s
> In file included from include/linux/vtime.h:6,
>                  from include/linux/hardirq.h:7,
>                  from include/linux/memcontrol.h:24,
>                  from include/linux/swap.h:8,
>                  from include/linux/suspend.h:4,
>                  from arch/powerpc/kernel/asm-offsets.c:24:
> arch/powerpc/include/generated/asm/vtime.h:1:31: error: asm-generic/vtime.h: No such file or directory

That caught me too: include/asm-generic/vtime.h is a patch-unfriendly
0-length file in the git tree; I wonder what use it's supposed to have.

(And I'm not very keen on the growing trend for symlinks in the git tree.)

Hugh

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-09-25  1:06 Stephen Rothwell
  2013-09-25  1:21 ` Timur Tabi
@ 2013-09-25 20:26 ` Andrew Morton
  2013-09-25 21:32   ` Hugh Dickins
  1 sibling, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2013-09-25 20:26 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Sergei Trofimovich, Timur Tabi,
	Greg KH, ppc-dev

On Wed, 25 Sep 2013 11:06:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, linux-next builds (powerpc allmodconfig)
> fail like this:

I can't get powerpc to build at all at present:

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      arch/powerpc/kernel/asm-offsets.s
In file included from include/linux/vtime.h:6,
                 from include/linux/hardirq.h:7,
                 from include/linux/memcontrol.h:24,
                 from include/linux/swap.h:8,
                 from include/linux/suspend.h:4,
                 from arch/powerpc/kernel/asm-offsets.c:24:
arch/powerpc/include/generated/asm/vtime.h:1:31: error: asm-generic/vtime.h: No such file or directory

> drivers/tty/ehv_bytechan.c:362:1: error: type defaults to 'int' in declaration of 'console_initcall' [-Werror=implicit-int]
> 
> Caused by commit 0f01cf96c2d4 ("./Makefile: enable -Werror=implicit-int
> and -Werror=strict-prototypes by default") which has bee in linux-next
> since Aug 16.  This commit exposed that fact that
> drivers/tty/ehv_bytechan.c can be built as a module, but has a
> console_initcall (which is not available to modules).  This was
> originally introduced in commit dcd83aaff1c8 ("tty/powerpc: introduce the
> ePAPR embedded hypervisor byte channel driver") in v3.2.
> 
> Anyone got a good solution?

console_initcall() is a macro defined in init.h.  But we forgot to
provide a version for #ifdef MODULE.

At include/linux/init.h line 284 we see:

/* Don't use these in loadable modules, but some people do... */
#define early_initcall(fn)		module_init(fn)
#define core_initcall(fn)		module_init(fn)
...

So we *could* add console_initcall() there.  But the problem is that it
won't work as desired - when the driver is loaded as a module,
ehv_bc_console_init() will be called at modprobe time, which is far far
later than console_initcall-time.

So the ehv_bytechan.c developers need to work out what they want to do
here.  Do we disallow building that driver as a module?  Or do we
permit that, and run ehv_bc_console_init() at modprobe time (needs
testing!).

If the latter then I'd be reluctant to add a modular version of
console_initcall() because the thing's very presence is misleading. 
otoh, drivers which use such a console_initcall() _might_ work, and
everyone tests their drivers both built-in and as modules, don't they? 
Don't they?

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-09-25  1:06 Stephen Rothwell
@ 2013-09-25  1:21 ` Timur Tabi
  2013-09-25 20:26 ` Andrew Morton
  1 sibling, 0 replies; 253+ messages in thread
From: Timur Tabi @ 2013-09-25  1:21 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Greg KH, lkml, Sergei Trofimovich, linux-next,
	ppc-dev, Timur Tabi

On Tue, Sep 24, 2013 at 8:06 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, linux-next builds (powerpc allmodconfig)
> fail like this:
>
> drivers/tty/ehv_bytechan.c:362:1: error: type defaults to 'int' in declaration of 'console_initcall' [-Werror=implicit-int]
>
> Caused by commit 0f01cf96c2d4 ("./Makefile: enable -Werror=implicit-int
> and -Werror=strict-prototypes by default") which has bee in linux-next
> since Aug 16.  This commit exposed that fact that
> drivers/tty/ehv_bytechan.c can be built as a module, but has a
> console_initcall (which is not available to modules).

Is this something new?  This code hasn't changed in over two years, so
I'm surprised it suddenly broke.

> This was
> originally introduced in commit dcd83aaff1c8 ("tty/powerpc: introduce the
> ePAPR embedded hypervisor byte channel driver") in v3.2.
>
> Anyone got a good solution?

How about:

#ifndef MODULE

static int __init ehv_bc_console_init(void)
{
    ...
}
console_initcall(ehv_bc_console_init);
#endif

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

* linux-next: build failure after merge of the akpm tree
@ 2013-09-25  1:06 Stephen Rothwell
  2013-09-25  1:21 ` Timur Tabi
  2013-09-25 20:26 ` Andrew Morton
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-09-25  1:06 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Sergei Trofimovich, Timur Tabi,
	Greg KH, ppc-dev

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

Hi Andrew,

After merging the akpm tree, linux-next builds (powerpc allmodconfig)
fail like this:

drivers/tty/ehv_bytechan.c:362:1: error: type defaults to 'int' in declaration of 'console_initcall' [-Werror=implicit-int]

Caused by commit 0f01cf96c2d4 ("./Makefile: enable -Werror=implicit-int
and -Werror=strict-prototypes by default") which has bee in linux-next
since Aug 16.  This commit exposed that fact that
drivers/tty/ehv_bytechan.c can be built as a module, but has a
console_initcall (which is not available to modules).  This was
originally introduced in commit dcd83aaff1c8 ("tty/powerpc: introduce the
ePAPR embedded hypervisor byte channel driver") in v3.2.

Anyone got a good solution?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-07-16  5:18 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-07-16  5:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Theodore Ts'o, Dave Chinner, Glauber Costa

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/ext4/extents_status.c: In function 'ext4_es_shrink':
fs/ext4/extents_status.c:990:50: error: 'ret' undeclared (first use in this function)
  trace_ext4_es_shrink_exit(sbi->s_sb, nr_shrunk, ret);
                                                  ^
fs/ext4/extents_status.c: In function 'ext4_es_register_shrinker':
fs/ext4/extents_status.c:999:36: error: 'ext4_es_scan' undeclared (first use in this function)
  sbi->s_es_shrinker.scan_objects = ext4_es_scan;
                                    ^

A product of my conflict resolutions :-(

I applied the following fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 16 Jul 2013 15:12:34 +1000
Subject: [PATCH] fixup for ext4 and shrinker changes

Signe-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/ext4/extents_status.c    |  6 +++---
 include/trace/events/ext4.h | 12 +++++-------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index db080c4..87fd719 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -977,8 +977,8 @@ static unsigned long __ext4_es_shrink(struct ext4_sb_info *sbi, int nr_to_scan,
 	return nr_shrunk;
 }
 
-static unsigned long ext4_es_shrink(struct shrinker *shrink,
-				    struct shrink_control *sc)
+static unsigned long ext4_es_scan(struct shrinker *shrink,
+				  struct shrink_control *sc)
 {
 	struct ext4_sb_info *sbi = container_of(shrink,
 					struct ext4_sb_info, s_es_shrinker);
@@ -987,7 +987,7 @@ static unsigned long ext4_es_shrink(struct shrinker *shrink,
 
 	nr_shrunk = __ext4_es_shrink(sbi, nr_to_scan, NULL);
 
-	trace_ext4_es_shrink_exit(sbi->s_sb, nr_shrunk, ret);
+	trace_ext4_es_shrink_exit(sbi->s_sb, nr_shrunk);
 	return nr_shrunk;
 }
 
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 2068db2..e62c0d3 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -2378,25 +2378,23 @@ TRACE_EVENT(ext4_es_shrink_enter,
 );
 
 TRACE_EVENT(ext4_es_shrink_exit,
-	TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt),
+	TP_PROTO(struct super_block *sb, unsigned long shrunk_nr),
 
-	TP_ARGS(sb, shrunk_nr, cache_cnt),
+	TP_ARGS(sb, shrunk_nr),
 
 	TP_STRUCT__entry(
 		__field(	dev_t,	dev			)
-		__field(	int,	shrunk_nr		)
-		__field(	int,	cache_cnt		)
+		__field(	unsigned long,	shrunk_nr	)
 	),
 
 	TP_fast_assign(
 		__entry->dev		= sb->s_dev;
 		__entry->shrunk_nr	= shrunk_nr;
-		__entry->cache_cnt	= cache_cnt;
 	),
 
-	TP_printk("dev %d,%d shrunk_nr %d cache_cnt %d",
+	TP_printk("dev %d,%d shrunk_nr %lu",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
-		  __entry->shrunk_nr, __entry->cache_cnt)
+		  __entry->shrunk_nr)
 );
 
 #endif /* _TRACE_EXT4_H */
-- 
1.8.3.2

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-06-07  7:52   ` Stephen Rothwell
@ 2013-06-07  8:11     ` Peng Tao
  0 siblings, 0 replies; 253+ messages in thread
From: Peng Tao @ 2013-06-07  8:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, Linux Kernel Mailing List,
	Dave Chinner, Glauber Costa, Greg KH, Dilger, Andreas

On Fri, Jun 7, 2013 at 3:52 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi,
>
> On Fri, 7 Jun 2013 15:26:56 +0800 Peng Tao <bergwolf@gmail.com> wrote:
>>
>> On Fri, Jun 7, 2013 at 2:28 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>> >
>> > After merging the akpm tree, today's linux-next build (x86_64
>> > allmodconfig) failed like this:
>> >
>> > In file included from drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h:49:0,
>> >                  from drivers/staging/lustre/include/linux/libcfs/libcfs.h:44,
>> >                  from drivers/staging/lustre/include/linux/lnet/linux/lib-lnet.h:45,
>> >                  from drivers/staging/lustre/include/linux/lnet/lib-lnet.h:44,
>> >                  from drivers/staging/lustre/lnet/lnet/api-ni.c:38:
>> > drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h: In function 'set_shrinker':
>> > drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h:102:3: error: 'struct shrinker' has no member named 'shrink'
>> >   s->shrink = func;
>> >    ^
>> >
>> > Caused by commit a37f14f05f2f ("shrinker: Kill old ->shrink API") from
>> > the akpm tree interacting with the new Lustre client code from the
>> > staging tree.
>> >
>> > I have just disabled the Lustre client code again (by reverting commit
>> > ee04fd11f11f ("Revert "Revert "staging/lustre: drop CONFIG_BROKEN
>> > dependency""")) and maybe someone can tell me what I need to do to fix
>> > this when I get back in a week.
>> I have a patchset to fix this but haven't yet sent out because it will
>> break build in Greg's staging tree. I can send it now but please tell
>> me to whom I should send the patches? Greg's tree doesn't contain
>> shrinker change, and mm- tree doesn't have Lustre code.
>
> The mm- tree now has the lustre code since it it based on most of
> linux-next, so send them to Andrew.
>
> It will then be up to Andrew and Greg to make sure that the staging tree
> is merged into Linus' tree before Andrew's patch bomb.
I see. Thanks. I will send them to Andrew then.

--
Thanks,
Tao

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-06-07  7:26 ` Peng Tao
@ 2013-06-07  7:52   ` Stephen Rothwell
  2013-06-07  8:11     ` Peng Tao
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2013-06-07  7:52 UTC (permalink / raw)
  To: Peng Tao
  Cc: Andrew Morton, linux-next, Linux Kernel Mailing List,
	Dave Chinner, Glauber Costa, Greg KH, Dilger, Andreas

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

Hi,

On Fri, 7 Jun 2013 15:26:56 +0800 Peng Tao <bergwolf@gmail.com> wrote:
>
> On Fri, Jun 7, 2013 at 2:28 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the akpm tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > In file included from drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h:49:0,
> >                  from drivers/staging/lustre/include/linux/libcfs/libcfs.h:44,
> >                  from drivers/staging/lustre/include/linux/lnet/linux/lib-lnet.h:45,
> >                  from drivers/staging/lustre/include/linux/lnet/lib-lnet.h:44,
> >                  from drivers/staging/lustre/lnet/lnet/api-ni.c:38:
> > drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h: In function 'set_shrinker':
> > drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h:102:3: error: 'struct shrinker' has no member named 'shrink'
> >   s->shrink = func;
> >    ^
> >
> > Caused by commit a37f14f05f2f ("shrinker: Kill old ->shrink API") from
> > the akpm tree interacting with the new Lustre client code from the
> > staging tree.
> >
> > I have just disabled the Lustre client code again (by reverting commit
> > ee04fd11f11f ("Revert "Revert "staging/lustre: drop CONFIG_BROKEN
> > dependency""")) and maybe someone can tell me what I need to do to fix
> > this when I get back in a week.
> I have a patchset to fix this but haven't yet sent out because it will
> break build in Greg's staging tree. I can send it now but please tell
> me to whom I should send the patches? Greg's tree doesn't contain
> shrinker change, and mm- tree doesn't have Lustre code.

The mm- tree now has the lustre code since it it based on most of
linux-next, so send them to Andrew.

It will then be up to Andrew and Greg to make sure that the staging tree
is merged into Linus' tree before Andrew's patch bomb.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-06-07  6:28 Stephen Rothwell
@ 2013-06-07  7:26 ` Peng Tao
  2013-06-07  7:52   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Peng Tao @ 2013-06-07  7:26 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, Linux Kernel Mailing List,
	Dave Chinner, Glauber Costa, Greg KH, Dilger, Andreas

On Fri, Jun 7, 2013 at 2:28 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> In file included from drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h:49:0,
>                  from drivers/staging/lustre/include/linux/libcfs/libcfs.h:44,
>                  from drivers/staging/lustre/include/linux/lnet/linux/lib-lnet.h:45,
>                  from drivers/staging/lustre/include/linux/lnet/lib-lnet.h:44,
>                  from drivers/staging/lustre/lnet/lnet/api-ni.c:38:
> drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h: In function 'set_shrinker':
> drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h:102:3: error: 'struct shrinker' has no member named 'shrink'
>   s->shrink = func;
>    ^
>
> Caused by commit a37f14f05f2f ("shrinker: Kill old ->shrink API") from
> the akpm tree interacting with the new Lustre client code from the
> staging tree.
>
> I have just disabled the Lustre client code again (by reverting commit
> ee04fd11f11f ("Revert "Revert "staging/lustre: drop CONFIG_BROKEN
> dependency""")) and maybe someone can tell me what I need to do to fix
> this when I get back in a week.
I have a patchset to fix this but haven't yet sent out because it will
break build in Greg's staging tree. I can send it now but please tell
me to whom I should send the patches? Greg's tree doesn't contain
shrinker change, and mm- tree doesn't have Lustre code.

--
Thanks,
Tao

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

* linux-next: build failure after merge of the akpm tree
@ 2013-06-07  6:28 Stephen Rothwell
  2013-06-07  7:26 ` Peng Tao
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2013-06-07  6:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Dave Chinner, Glauber Costa, Peng Tao, Greg KH

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

Hi Andrew,

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

In file included from drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h:49:0,
                 from drivers/staging/lustre/include/linux/libcfs/libcfs.h:44,
                 from drivers/staging/lustre/include/linux/lnet/linux/lib-lnet.h:45,
                 from drivers/staging/lustre/include/linux/lnet/lib-lnet.h:44,
                 from drivers/staging/lustre/lnet/lnet/api-ni.c:38:
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h: In function 'set_shrinker':
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h:102:3: error: 'struct shrinker' has no member named 'shrink'
  s->shrink = func;
   ^

Caused by commit a37f14f05f2f ("shrinker: Kill old ->shrink API") from
the akpm tree interacting with the new Lustre client code from the
staging tree.

I have just disabled the Lustre client code again (by reverting commit
ee04fd11f11f ("Revert "Revert "staging/lustre: drop CONFIG_BROKEN
dependency""")) and maybe someone can tell me what I need to do to fix
this when I get back in a week.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-06-04  6:55 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-06-04  6:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Kent Overstreet, Tejun Heo,
	Benjamin LaHaise, Octavian Purdila

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/aio.c: In function 'put_ioctx':
fs/aio.c:386:6: error: void value not ignored as it ought to be
  if (percpu_ref_put(&ctx->users))
      ^
fs/aio.c: In function 'ioctx_alloc':
fs/aio.c:427:2: error: too few arguments to function 'percpu_ref_init'
  percpu_ref_init(&ctx->users);
  ^
In file included from fs/aio.c:40:0:
include/linux/percpu-refcount.h:69:5: note: declared here
 int percpu_ref_init(struct percpu_ref *, percpu_ref_release *);
     ^
fs/aio.c: In function 'kill_ioctx':
fs/aio.c:510:6: error: void value not ignored as it ought to be
  if (percpu_ref_kill(&ctx->users)) {
      ^
fs/aio.c: In function 'exit_aio':
fs/aio.c:577:8: error: void value not ignored as it ought to be
    if (percpu_ref_kill(&ctx[i]->users)) {
        ^
fs/aio.c: In function 'aio_read_events':
fs/aio.c:978:2: error: implicit declaration of function 'percpu_ref_dead' [-Werror=implicit-function-declaration]
  if (unlikely(percpu_ref_dead(&ctx->users)))
  ^
cc1: some warnings being treated as errors

Caused by commit 215e262f2aeb ("percpu: implement generic percpu
refcounting") from the percpu tree interacting with commit 4a375d552122
("aio: percpu ioctx refcount") from the akpm tree.

I removed the following patches from the akpm tree:

aio: reqs_active -> reqs_available
aio: percpu reqs_available
aio: percpu ioctx refcount
aio: use xchg() instead of completion_lock
block: prep work for batch completion
block-prep-work-for-batch-completion-fix-2
block-prep-work-for-batch-completion-fix-3
block-prep-work-for-batch-completion-fix-3-fix
block-prep-work-for-batch-completion-fix-99
block-prep-work-for-batch-completion-fix-4
block-prep-work-for-batch-completion-fix-101
block, aio: batch completion for bios/kiocbs
aio: fix kioctx not being freed after cancellation at exit time
block-aio-batch-completion-for-bios-kiocbs-fix
virtio-blk: convert to batch completion
mtip32xx: convert to batch completion
aio: convert the ioctx list to radix tree

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-05-27  6:39 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-05-27  6:39 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Kent Overstreet, Gu Zheng, Dave Kleikamp

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/jfs/jfs_logmgr.c: In function 'lbmRead':
fs/jfs/jfs_logmgr.c:2015:3: error: too few arguments to function 'lbmIODone'
   lbmIODone(bio, 0);
   ^
fs/jfs/jfs_logmgr.c:194:21: note: declared here
 static bio_end_io_t lbmIODone;
                     ^

Caused by commit daf8a85f357a ("block: prep work for batch completion")
from the akpm tree interacting with commit 95bbb82f60c8 ("fs/jfs: Add
check if journaling to disk has been disabled in lbmRead()") from the jfs
tree.

I applied the following fix up patch and can carry it as necessary.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 27 May 2013 16:37:05 +1000
Subject: [PATCH] jfs: fix up for batch completion API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/jfs/jfs_logmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 0787ecc..4c3289c 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -2012,7 +2012,7 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp)
 	/*check if journaling to disk has been disabled*/
 	if (log->no_integrity) {
 		bio->bi_size = 0;
-		lbmIODone(bio, 0);
+		lbmIODone(bio, 0, NULL);
 	} else {
 		submit_bio(READ_SYNC, bio);
 	}
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-04-04  6:44 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-04-04  6:44 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Al Viro, Kent Overstreet

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/aio.c: In function 'aio_rw_vect_retry':
fs/aio.c:1106:6: error: 'opcode' undeclared (first use in this function)

Caused by commit 36bd5dc0c4e2 ("lift sb_start_write/sb_end_write out of
->aio_write()") from the vfs tree interacting with commit 61ead3d450a4
("aio: kill ki_retry") from the akpm tree.

I applied the following fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 4 Apr 2013 17:41:59 +1100
Subject: [PATCH] aio: kill ki_retry merge fix

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

diff --git a/fs/aio.c b/fs/aio.c
index 162b418..5b7ed78 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1103,7 +1103,7 @@ static ssize_t aio_rw_vect_retry(struct kiocb *iocb, int rw, aio_rw_op *rw_op)
 	if (iocb->ki_pos < 0)
 		return -EINVAL;
 
-	if (opcode == IOCB_CMD_PWRITEV)
+	if (rw == WRITE)
 		file_start_write(file);
 	do {
 		ret = rw_op(iocb, &iocb->ki_iovec[iocb->ki_cur_seg],
@@ -1117,7 +1117,7 @@ static ssize_t aio_rw_vect_retry(struct kiocb *iocb, int rw, aio_rw_op *rw_op)
 	} while (ret > 0 && iocb->ki_left > 0 &&
 		 (rw == WRITE ||
 		  (!S_ISFIFO(inode->i_mode) && !S_ISSOCK(inode->i_mode))));
-	if (opcode == IOCB_CMD_PWRITEV)
+	if (rw == WRITE)
 		file_end_write(file);
 
 	/* This means we must have transferred all that we could */
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-03-27  4:43 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-03-27  4:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Cody P Schafer

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/mm/numa.c: In function 'setup_node_to_cpumask_map':
arch/powerpc/mm/numa.c:72:2: error: expected ';' before 'for'
arch/powerpc/mm/numa.c:65:15: error: unused variable 'node' [-Werror=unused-variable]

Caused by commit de9a59a3ebd4 ("powerpc/mm/numa: use setup_nr_node_ids()
instead of opencoding").

I added this fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 27 Mar 2013 15:39:56 +1100
Subject: [PATCH] powerpc/mm/numa: use setup_nr_node_ids() fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/mm/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 7574ae3..b8020dc 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -66,7 +66,7 @@ static void __init setup_node_to_cpumask_map(void)
 
 	/* setup nr_node_ids if not done yet */
 	if (nr_node_ids == MAX_NUMNODES)
-		setup_nr_node_ids()
+		setup_nr_node_ids();
 
 	/* allocate the map */
 	for (node = 0; node < nr_node_ids; node++)
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-03-01  4:31 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-03-01  4:31 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/aio.c: In function 'exit_aio':
fs/aio.c:522:60: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
fs/aio.c:522:2: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
fs/aio.c:522:2: note: each undeclared identifier is reported only once for each function it appears in
fs/aio.c:522:62: error: expected ';' before '{' token

I added this fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 1 Mar 2013 15:30:24 +1100
Subject: [PATCH] aio: fixup for hlist_for_each_entry_safe API change

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

diff --git a/fs/aio.c b/fs/aio.c
index b36c2b6..2512232 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -517,9 +517,9 @@ EXPORT_SYMBOL(wait_on_sync_kiocb);
 void exit_aio(struct mm_struct *mm)
 {
 	struct kioctx *ctx;
-	struct hlist_node *p, *n;
+	struct hlist_node *n;
 
-	hlist_for_each_entry_safe(ctx, p, n, &mm->ioctx_list, list) {
+	hlist_for_each_entry_safe(ctx, n, &mm->ioctx_list, list) {
 		/*
 		 * We don't need to bother with munmap() here -
 		 * exit_mmap(mm) is coming and it'll unmap everything.
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-02-28  1:15 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-02-28  1:15 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Sasha Levin, Joe Thornber,
	Heinz Mauelshagen, Alasdair G Kergon

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

Hi Andrew,

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

drivers/md/dm-cache-policy-cleaner.c: In function 'lookup_cache_entry':
drivers/md/dm-cache-policy-cleaner.c:148:46: error: macro "hlist_for_each_entry" passed 4 arguments, but takes just 3
drivers/md/dm-cache-policy-cleaner.c:148:2: error: 'hlist_for_each_entry' undeclared (first use in this function)
drivers/md/dm-cache-policy-cleaner.c:148:2: note: each undeclared identifier is reported only once for each function it appears in
drivers/md/dm-cache-policy-cleaner.c:148:48: error: expected ';' before '{' token
drivers/md/dm-cache-policy-cleaner.c:146:21: warning: unused variable 'bucket' [-Wunused-variable]
drivers/md/dm-cache-policy-cleaner.c:145:21: warning: unused variable 'tmp' [-Wunused-variable]
drivers/md/dm-cache-policy-cleaner.c:144:25: warning: unused variable 'cur' [-Wunused-variable]
drivers/md/dm-cache-policy-cleaner.c:158:1: warning: no return statement in function returning non-void [-Wreturn-type]
drivers/md/dm-cache-policy-mq.c: In function 'hash_lookup':
drivers/md/dm-cache-policy-mq.c:375:44: error: macro "hlist_for_each_entry" passed 4 arguments, but takes just 3
drivers/md/dm-cache-policy-mq.c:375:2: error: 'hlist_for_each_entry' undeclared (first use in this function)
drivers/md/dm-cache-policy-mq.c:375:2: note: each undeclared identifier is reported only once for each function it appears in
drivers/md/dm-cache-policy-mq.c:376:3: error: expected ';' before 'if'
drivers/md/dm-cache-policy-mq.c:373:16: warning: unused variable 'e' [-Wunused-variable]
drivers/md/dm-cache-policy-mq.c:372:21: warning: unused variable 'tmp' [-Wunused-variable]
drivers/md/dm-cache-policy-mq.c:371:21: warning: unused variable 'bucket' [-Wunused-variable]
drivers/md/dm-cache-policy-mq.c:383:1: warning: no return statement in function returning non-void [-Wreturn-type]

Caused by commit "hlist: drop the node parameter from iterators" from the
akpm tree interacting with commits b5dc50616996 ("A cache policy that
uses a multiqueue ordered by recent hit") and 9c44464a0aed ("A simple
cache policy that writes back all data to the origin") from the
device-mapper tree.

I applied the following merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 28 Feb 2013 12:09:42 +1100
Subject: [PATCH] hlist-drop-the-node-parameter-from-iterators-dm-cache-policy-fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/md/dm-cache-policy-cleaner.c | 3 +--
 drivers/md/dm-cache-policy-mq.c      | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/md/dm-cache-policy-cleaner.c b/drivers/md/dm-cache-policy-cleaner.c
index 6b0fdb0..43c270a 100644
--- a/drivers/md/dm-cache-policy-cleaner.c
+++ b/drivers/md/dm-cache-policy-cleaner.c
@@ -142,10 +142,9 @@ static struct wb_cache_entry *lookup_cache_entry(struct policy *p, dm_oblock_t o
 	struct hash *hash = &p->chash;
 	unsigned h = hash_64(from_oblock(oblock), hash->hash_bits);
 	struct wb_cache_entry *cur;
-	struct hlist_node *tmp;
 	struct hlist_head *bucket = &hash->table[h];
 
-	hlist_for_each_entry(cur, tmp, bucket, hlist) {
+	hlist_for_each_entry(cur, bucket, hlist) {
 		if (cur->oblock == oblock) {
 			/* Move upfront bucket for faster access. */
 			hlist_del(&cur->hlist);
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
index cd4582d..63ec258 100644
--- a/drivers/md/dm-cache-policy-mq.c
+++ b/drivers/md/dm-cache-policy-mq.c
@@ -369,10 +369,9 @@ static struct entry *hash_lookup(struct mq_policy *mq, dm_oblock_t oblock)
 {
 	unsigned h = hash_64(from_oblock(oblock), mq->hash_bits);
 	struct hlist_head *bucket = mq->table + h;
-	struct hlist_node *tmp;
 	struct entry *e;
 
-	hlist_for_each_entry(e, tmp, bucket, hlist)
+	hlist_for_each_entry(e, bucket, hlist)
 		if (e->oblock == oblock) {
 			hlist_del(&e->hlist);
 			hlist_add_head(&e->hlist, bucket);
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-02-20  6:28 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-02-20  6:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Shahed Shaikh, David Miller, netdev,
	Rajesh Borundia, Jitendra Kalsaria

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

Hi Andrew,

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

drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c: In function 'qlcnic_prune_lb_filters':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c:607:63: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c:607:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c:608:3: error: expected ';' before '{' token

Caused by commit c4b75b428da3 ("hlist: drop the node parameter from
iterators") interacting with commit 53643a75b147 ("qlcnic: fix ping
resumption to a VM after a live migration") from the net-next tree.

I applied this merge fix:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 20 Feb 2013 17:17:54 +1100
Subject: [PATCH] hlist-drop-the-node-parameter-from-iterators-qlnic-fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index a5422cd..f89cc7a 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -604,7 +604,7 @@ void qlcnic_prune_lb_filters(struct qlcnic_adapter *adapter)
 	for (i = 0; i < adapter->rx_fhash.fbucket_size; i++) {
 		head = &(adapter->rx_fhash.fhead[i]);
 
-		hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode)
+		hlist_for_each_entry_safe(tmp_fil, n, head, fnode)
 		{
 			time = tmp_fil->ftime;
 			if (jiffies > (QLCNIC_FILTER_AGE * HZ + time)) {
-- 
1.8.1

which then lead to these erroes:

drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c: In function 'qlcnic_add_lb_filter':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:182:63: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:182:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:182:65: error: expected ';' before '{' token
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:208:63: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:208:65: error: expected ';' before '{' token

for which I applied this merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 20 Feb 2013 17:25:26 +1100
Subject: [PATCH] hlist-drop-the-node-parameter-from-iterators-qlnic-2-fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
index 27196ed..0e63006 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
@@ -162,7 +162,7 @@ void qlcnic_add_lb_filter(struct qlcnic_adapter *adapter, struct sk_buff *skb,
 {
 	struct ethhdr *phdr = (struct ethhdr *)(skb->data);
 	struct qlcnic_filter *fil, *tmp_fil;
-	struct hlist_node *tmp_hnode, *n;
+	struct hlist_node *n;
 	struct hlist_head *head;
 	unsigned long time;
 	u64 src_addr = 0;
@@ -179,7 +179,7 @@ void qlcnic_add_lb_filter(struct qlcnic_adapter *adapter, struct sk_buff *skb,
 			 (adapter->fhash.fbucket_size - 1);
 		head = &(adapter->rx_fhash.fhead[hindex]);
 
-		hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode) {
+		hlist_for_each_entry_safe(tmp_fil, n, head, fnode) {
 			if (!memcmp(tmp_fil->faddr, &src_addr, ETH_ALEN) &&
 			    tmp_fil->vlan_id == vlan_id) {
 				time = tmp_fil->ftime;
@@ -205,7 +205,7 @@ void qlcnic_add_lb_filter(struct qlcnic_adapter *adapter, struct sk_buff *skb,
 			 (adapter->fhash.fbucket_size - 1);
 		head = &(adapter->rx_fhash.fhead[hindex]);
 		spin_lock(&adapter->rx_mac_learn_lock);
-		hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode) {
+		hlist_for_each_entry_safe(tmp_fil, n, head, fnode) {
 			if (!memcmp(tmp_fil->faddr, &src_addr, ETH_ALEN) &&
 			    tmp_fil->vlan_id == vlan_id) {
 				found = 1;
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2013-02-11  7:13 Stephen Rothwell
@ 2013-02-11 12:04 ` Amir Vadai
  0 siblings, 0 replies; 253+ messages in thread
From: Amir Vadai @ 2013-02-11 12:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Yan Burman,
	David Miller, netdev, Sasha Levin

On 11/02/2013 09:13, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> drivers/net/ethernet/mellanox/mlx4/en_rx.c: In function 'mlx4_en_process_rx_cq':
> drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:53: error: macro "hlist_for_each_entry_rcu" passed 4 arguments, but takes just 3
> drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:5: error: 'hlist_for_each_entry_rcu' undeclared (first use in this function)
> drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:55: error: expected ';' before '{' token
> 
> Caused by commit c07cb4b0ab78 ("net/mlx4_en: Manage hash of MAC addresses
> per port") from the net-next tree interacting with commit "hlist: drop
> the node parameter from iterators" from the akpm tree.
> 
> I applied the following merge fix patch for today:
> 
> From 7a10f5e7e8d1232d618307d568ea9a78dc4680bb Mon Sep 17 00:00:00 2001
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 11 Feb 2013 18:01:23 +1100
> Subject: [PATCH] net/mlx4_en: fix up for hlist_for_each_entry_rcu API change
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> index ce38654..19a9c05 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> @@ -617,7 +617,6 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
>  
>  			if (is_multicast_ether_addr(ethh->h_dest)) {
>  				struct mlx4_mac_entry *entry;
> -				struct hlist_node *n;
>  				struct hlist_head *bucket;
>  				unsigned int mac_hash;
>  
> @@ -625,7 +624,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
>  				mac_hash = ethh->h_source[MLX4_EN_MAC_HASH_IDX];
>  				bucket = &priv->mac_hash[mac_hash];
>  				rcu_read_lock();
> -				hlist_for_each_entry_rcu(entry, n, bucket, hlist) {
> +				hlist_for_each_entry_rcu(entry, bucket, hlist) {
>  					if (ether_addr_equal_64bits(entry->mac,
>  								    ethh->h_source)) {
>  						rcu_read_unlock();
> 

Acked-By: Amir Vadai <amirv@mellanox.com>

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

* linux-next: build failure after merge of the akpm tree
@ 2013-02-11  7:13 Stephen Rothwell
  2013-02-11 12:04 ` Amir Vadai
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2013-02-11  7:13 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Yan Burman, Amir Vadai, David Miller,
	netdev, Sasha Levin

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/net/ethernet/mellanox/mlx4/en_rx.c: In function 'mlx4_en_process_rx_cq':
drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:53: error: macro "hlist_for_each_entry_rcu" passed 4 arguments, but takes just 3
drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:5: error: 'hlist_for_each_entry_rcu' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:55: error: expected ';' before '{' token

Caused by commit c07cb4b0ab78 ("net/mlx4_en: Manage hash of MAC addresses
per port") from the net-next tree interacting with commit "hlist: drop
the node parameter from iterators" from the akpm tree.

I applied the following merge fix patch for today:

From 7a10f5e7e8d1232d618307d568ea9a78dc4680bb Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 11 Feb 2013 18:01:23 +1100
Subject: [PATCH] net/mlx4_en: fix up for hlist_for_each_entry_rcu API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index ce38654..19a9c05 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -617,7 +617,6 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
 
 			if (is_multicast_ether_addr(ethh->h_dest)) {
 				struct mlx4_mac_entry *entry;
-				struct hlist_node *n;
 				struct hlist_head *bucket;
 				unsigned int mac_hash;
 
@@ -625,7 +624,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
 				mac_hash = ethh->h_source[MLX4_EN_MAC_HASH_IDX];
 				bucket = &priv->mac_hash[mac_hash];
 				rcu_read_lock();
-				hlist_for_each_entry_rcu(entry, n, bucket, hlist) {
+				hlist_for_each_entry_rcu(entry, bucket, hlist) {
 					if (ether_addr_equal_64bits(entry->mac,
 								    ethh->h_source)) {
 						rcu_read_unlock();
-- 
1.8.1

That then lead to these:

drivers/net/ethernet/mellanox/mlx4/en_netdev.c: In function 'mlx4_en_put_qp':
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:582:57: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:582:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:582:59: error: expected ';' before '{' token
drivers/net/ethernet/mellanox/mlx4/en_netdev.c: In function 'mlx4_en_replace_mac':
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:615:57: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:615:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:615:59: error: expected ';' before '{' token
drivers/net/ethernet/mellanox/mlx4/en_netdev.c: In function 'mlx4_en_do_uc_filter':
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1037:57: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1037:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1037:59: error: expected ';' before '{' token
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1080:47: error: macro "hlist_for_each_entry" passed 4 arguments, but takes just 3
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1080:3: error: 'hlist_for_each_entry' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1080:49: error: expected ';' before '{' token

For which I applied this:

From 8b8154323c7a63c29bb2d7613742ca2bb417efc3 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 11 Feb 2013 18:10:36 +1100
Subject: [PATCH] net/mlx4_en: second fix up for hlist_for_each_entry_rcu API
 change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 77c4f55..bb53a72 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -573,13 +573,13 @@ static void mlx4_en_put_qp(struct mlx4_en_priv *priv)
 
 	if (dev->caps.steering_mode != MLX4_STEERING_MODE_A0) {
 		struct mlx4_mac_entry *entry;
-		struct hlist_node *n, *tmp;
+		struct hlist_node *tmp;
 		struct hlist_head *bucket;
 		unsigned int mac_hash;
 
 		mac_hash = priv->dev->dev_addr[MLX4_EN_MAC_HASH_IDX];
 		bucket = &priv->mac_hash[mac_hash];
-		hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+		hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
 			if (ether_addr_equal_64bits(entry->mac,
 						    priv->dev->dev_addr)) {
 				en_dbg(DRV, priv, "Releasing qp: port %d, MAC %pM, qpn %d\n",
@@ -608,11 +608,11 @@ static int mlx4_en_replace_mac(struct mlx4_en_priv *priv, int qpn,
 		struct hlist_head *bucket;
 		unsigned int mac_hash;
 		struct mlx4_mac_entry *entry;
-		struct hlist_node *n, *tmp;
+		struct hlist_node *tmp;
 		u64 prev_mac_u64 = mlx4_en_mac_to_u64(prev_mac);
 
 		bucket = &priv->mac_hash[prev_mac[MLX4_EN_MAC_HASH_IDX]];
-		hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+		hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
 			if (ether_addr_equal_64bits(entry->mac, prev_mac)) {
 				mlx4_en_uc_steer_release(priv, entry->mac,
 							 qpn, entry->reg_id);
@@ -1018,7 +1018,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
 {
 	struct netdev_hw_addr *ha;
 	struct mlx4_mac_entry *entry;
-	struct hlist_node *n, *tmp;
+	struct hlist_node *tmp;
 	bool found;
 	u64 mac;
 	int err = 0;
@@ -1034,7 +1034,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
 	/* find what to remove */
 	for (i = 0; i < MLX4_EN_MAC_HASH_SIZE; ++i) {
 		bucket = &priv->mac_hash[i];
-		hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+		hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
 			found = false;
 			netdev_for_each_uc_addr(ha, dev) {
 				if (ether_addr_equal_64bits(entry->mac,
@@ -1077,7 +1077,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
 	netdev_for_each_uc_addr(ha, dev) {
 		found = false;
 		bucket = &priv->mac_hash[ha->addr[MLX4_EN_MAC_HASH_IDX]];
-		hlist_for_each_entry(entry, n, bucket, hlist) {
+		hlist_for_each_entry(entry, bucket, hlist) {
 			if (ether_addr_equal_64bits(entry->mac, ha->addr)) {
 				found = true;
 				break;
-- 
1.8.1

I will add these to the end of the akpm tree tomorrow.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-02-06  6:59 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-02-06  6:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, liguang

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/mm/mem.c: In function 'arch_add_memory':
arch/powerpc/mm/mem.c:134:2: error: implicit declaration of function '__add_pages' [-Werror=implicit-function-declaration]
arch/powerpc/mm/mem.c: In function 'arch_remove_memory':
arch/powerpc/mm/mem.c:145:2: error: implicit declaration of function '__remove_pages' [-Werror=implicit-function-declaration]
arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
arch/powerpc/platforms/pseries/hotplug-memory.c:104:3: error: implicit declaration of function '__remove_pages' [-Werror=implicit-function-declaration]
mm/bootmem.c: In function 'free_all_bootmem_node':
mm/bootmem.c:269:2: error: implicit declaration of function 'register_page_bootmem_info_node' [-Werror=implicit-function-declaration]

Presumably caused by commit "mm: break circular include from
linux/mmzone.h".  That is a very optimistic patch :-)

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2013-02-04  7:17 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2013-02-04  7:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Yinghai Lu, Wen Congyang,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra

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

Hi Andrew,

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

arch/x86/mm/init_64.c: In function 'remove_pmd_table':
arch/x86/mm/init_64.c:921:3: error: implicit declaration of function 'map_low_page' [-Werror=implicit-function-declaration]
arch/x86/mm/init_64.c:921:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
arch/x86/mm/init_64.c:924:3: error: implicit declaration of function 'unmap_low_page' [-Werror=implicit-function-declaration]
arch/x86/mm/init_64.c: In function 'remove_pud_table':
arch/x86/mm/init_64.c:978:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
arch/x86/mm/init_64.c: In function 'remove_pagetable':
arch/x86/mm/init_64.c:1004:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Caused by commit "memory-hotplug: common APIs to support page tables
hot-remove" from the akpm tree interacting with commit 973dc4f3fad5
("x86, mm: Remove early_memremap workaround for page table accessing on
64bit") from the tip tree.

I applied the following merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 4 Feb 2013 18:12:17 +1100
Subject: [PATCH] memory-hotplug: common APIs to support page tables hot-remove fix fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/mm/init_64.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 951cc1e..67bad4b 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -918,10 +918,9 @@ remove_pmd_table(pmd_t *pmd_start, unsigned long addr, unsigned long end,
 			continue;
 		}
 
-		pte_base = (pte_t *)map_low_page((pte_t *)pmd_page_vaddr(*pmd));
+		pte_base = (pte_t *)pmd_page_vaddr(*pmd);
 		remove_pte_table(pte_base, addr, next, direct);
 		free_pte_table(pte_base, pmd);
-		unmap_low_page(pte_base);
 	}
 
 	/* Call free_pmd_table() in remove_pud_table(). */
@@ -975,10 +974,9 @@ remove_pud_table(pud_t *pud_start, unsigned long addr, unsigned long end,
 			continue;
 		}
 
-		pmd_base = (pmd_t *)map_low_page((pmd_t *)pud_page_vaddr(*pud));
+		pmd_base = (pmd_t *)pud_page_vaddr(*pud);
 		remove_pmd_table(pmd_base, addr, next, direct);
 		free_pmd_table(pmd_base, pud);
-		unmap_low_page(pmd_base);
 	}
 
 	if (direct)
@@ -1001,11 +999,10 @@ remove_pagetable(unsigned long start, unsigned long end, bool direct)
 
 		next = pgd_addr_end(start, end);
 
-		pud = (pud_t *)map_low_page((pud_t *)pgd_page_vaddr(*pgd));
+		pud = (pud_t *)pgd_page_vaddr(*pgd);
 		remove_pud_table(pud, start, next, direct);
 		if (free_pud_table(pud, pgd))
 			pgd_changed = true;
-		unmap_low_page(pud);
 	}
 
 	if (pgd_changed)
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-12-18  2:29 Stephen Rothwell
@ 2012-12-18 10:10 ` Mel Gorman
  0 siblings, 0 replies; 253+ messages in thread
From: Mel Gorman @ 2012-12-18 10:10 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra, Kirill A. Shutemov,
	Linus

On Tue, Dec 18, 2012 at 01:29:07PM +1100, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> mm/migrate.c: In function 'migrate_misplaced_transhuge_page':
> mm/migrate.c:1738:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
> arch/x86/include/asm/pgtable.h:792:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'
> 
> Caused by commit b32967ff101a ("mm: numa: Add THP migration for the NUMA
> working set scanning fault case") from Linus' tree interacting with
> commit "x86: convert update_mmu_cache() and update_mmu_cache_pmd() to
> functions".
> 
> This was previously reported as against the tip tree, but the fix patch
> (which was applied to the tip tree) did not survive the rewrite that went
> into Linus' tree.  Just a little annoyed :-(
> 

Sorry about that Stephen, I should have caught the fix in the tip tree
and picked it up. Thanks for fixing it a second time.

-- 
Mel Gorman
SUSE Labs

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

* linux-next: build failure after merge of the akpm tree
@ 2012-12-18  2:29 Stephen Rothwell
  2012-12-18 10:10 ` Mel Gorman
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-12-18  2:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Mel Gorman, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra, Kirill A. Shutemov,
	Linus

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

Hi Andrew,

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

mm/migrate.c: In function 'migrate_misplaced_transhuge_page':
mm/migrate.c:1738:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
arch/x86/include/asm/pgtable.h:792:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'

Caused by commit b32967ff101a ("mm: numa: Add THP migration for the NUMA
working set scanning fault case") from Linus' tree interacting with
commit "x86: convert update_mmu_cache() and update_mmu_cache_pmd() to
functions".

This was previously reported as against the tip tree, but the fix patch
(which was applied to the tip tree) did not survive the rewrite that went
into Linus' tree.  Just a little annoyed :-(

I have applied this patch for today (Linus can you just apply this to
your tree, the patch in Andrew's tree just exposes this problem by
converting a macro into a static line function, but the argument in the
call added by Mel's patch is wrong anyway)

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 10 Dec 2012 19:50:57 +1100
Subject: [PATCH] mm,numa: fix update_mmu_cache_pmd call

Fixes this build error:

mm/migrate.c: In function 'migrate_misplaced_transhuge_page_put':
mm/migrate.c:1666:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
arch/x86/include/asm/pgtable.h:792:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'

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

diff --git a/mm/migrate.c b/mm/migrate.c
index 5be98e5..964a8c1 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1663,7 +1663,7 @@ int migrate_misplaced_transhuge_page_put(struct mm_struct *mm,
 	page_add_new_anon_rmap(new_page, vma, haddr);
 
 	set_pmd_at(mm, haddr, pmd, entry);
-	update_mmu_cache_pmd(vma, address, entry);
+	update_mmu_cache_pmd(vma, address, &entry);
 	page_remove_rmap(page);
 	/*
 	 * Finish the charge transaction under the page table lock to
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-12-10  8:54 Stephen Rothwell
@ 2012-12-10 10:43 ` Ingo Molnar
  0 siblings, 0 replies; 253+ messages in thread
From: Ingo Molnar @ 2012-12-10 10:43 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> mm/migrate.c: In function 'migrate_misplaced_transhuge_page_put':
> mm/migrate.c:1666:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
> arch/x86/include/asm/pgtable.h:792:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'
> 
> Caused by commit 7f7f03ce3820 ("mm, numa: Implement migrate-on-fault lazy
> NUMA strategy for regular and THP pages") from the tip tree and expose by
> commit "x86: convert update_mmu_cache() and update_mmu_cache_pmd() to
> functions" from the akpm tree.
> 
> I applied the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 10 Dec 2012 19:50:57 +1100
> Subject: [PATCH] mm,numa: fix update_mmu_cache_pmd call
> 
> Fixes this build error:
> 
> mm/migrate.c: In function 'migrate_misplaced_transhuge_page_put':
> mm/migrate.c:1666:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
> arch/x86/include/asm/pgtable.h:792:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  mm/migrate.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 5be98e5..964a8c1 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -1663,7 +1663,7 @@ int migrate_misplaced_transhuge_page_put(struct mm_struct *mm,
>  	page_add_new_anon_rmap(new_page, vma, haddr);
>  
>  	set_pmd_at(mm, haddr, pmd, entry);
> -	update_mmu_cache_pmd(vma, address, entry);
> +	update_mmu_cache_pmd(vma, address, &entry);
>  	page_remove_rmap(page);
>  	/*
>  	 * Finish the charge transaction under the page table lock to

I think the real bug is not in the akpm but in the -tip tree: we 
copy & pasted a pre-existing buggy upstream place that also 
called update_mmu_cache_pmd() with a pmd value, not by address. 
akpm's patch fixed the original buggy place, but not our copy of 
it.

Practically this does not truly matter at the moment as only 
Sparc64 appears to be a real user of that function, and Sparc64 
does not turn on the NUMA feature (yet) - but nevertheless the 
change in akpm's tree which introduces correct typing for this 
method exposed the latent bug.

I'll pick up your fix.

Thanks,

	Ingo

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

* linux-next: build failure after merge of the akpm tree
@ 2012-12-10  8:58 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-12-10  8:58 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Alan Cox

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

Hi Andrew,

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

ERROR: "do_take_over_console" [drivers/video/console/fbcon.ko] undefined!

Caused by commit "fb: rework locking to fix lock ordering on takeover".

I have reverted that commit (and the following fix patch) for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-12-10  8:54 Stephen Rothwell
  2012-12-10 10:43 ` Ingo Molnar
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-12-10  8:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra

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

Hi Andrew,

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

mm/migrate.c: In function 'migrate_misplaced_transhuge_page_put':
mm/migrate.c:1666:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
arch/x86/include/asm/pgtable.h:792:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'

Caused by commit 7f7f03ce3820 ("mm, numa: Implement migrate-on-fault lazy
NUMA strategy for regular and THP pages") from the tip tree and expose by
commit "x86: convert update_mmu_cache() and update_mmu_cache_pmd() to
functions" from the akpm tree.

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 10 Dec 2012 19:50:57 +1100
Subject: [PATCH] mm,numa: fix update_mmu_cache_pmd call

Fixes this build error:

mm/migrate.c: In function 'migrate_misplaced_transhuge_page_put':
mm/migrate.c:1666:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
arch/x86/include/asm/pgtable.h:792:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'

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

diff --git a/mm/migrate.c b/mm/migrate.c
index 5be98e5..964a8c1 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1663,7 +1663,7 @@ int migrate_misplaced_transhuge_page_put(struct mm_struct *mm,
 	page_add_new_anon_rmap(new_page, vma, haddr);
 
 	set_pmd_at(mm, haddr, pmd, entry);
-	update_mmu_cache_pmd(vma, address, entry);
+	update_mmu_cache_pmd(vma, address, &entry);
 	page_remove_rmap(page);
 	/*
 	 * Finish the charge transaction under the page table lock to
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-11-09  3:39 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-11-09  3:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Andi Kleen

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc_ppc64_defconfig)
failed like this:

mm/mmap.c: In function 'SYSC_mmap_pgoff':
mm/mmap.c:1271:15: error: 'MAP_HUGE_SHIFT' undeclared (first use in this function)
mm/mmap.c:1271:15: note: each undeclared identifier is reported only once for each function it appears in
mm/mmap.c:1271:33: error: 'MAP_HUGE_MASK' undeclared (first use in this function)

Caused by commit 160b36937ca2 ("mm: support more pagesizes for
MAP_HUGETLB/SHM_HUGETLB").

I have reverted that commit for today (along with the two fix patches).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-10-24 19:19       ` Joe Perches
@ 2012-10-24 19:38         ` Andrew Morton
  0 siblings, 0 replies; 253+ messages in thread
From: Andrew Morton @ 2012-10-24 19:38 UTC (permalink / raw)
  To: Joe Perches; +Cc: Stephen Rothwell, linux-next, linux-kernel, Kay Sievers

On Wed, 24 Oct 2012 12:19:39 -0700
Joe Perches <joe@perches.com> wrote:

> On Tue, 2012-10-23 at 13:02 -0700, Andrew Morton wrote:
> > On Tue, 23 Oct 2012 12:51:29 -0700
> > Joe Perches <joe@perches.com> wrote:
> > 
> > > > btw, what's up with printk_syslog.h?  It includes two header files which it
> > > > doesn't need but fails to include the two it *does* need: printk_log.h
> > > > and types.h.
> > > > 
> > > > 
> > > 
> > > printk_syslog.c includes kernel.h (it includes types.h)
> > > and printk_log.h.
> > > 
> > > I think printk_syslog.h doesn't need printk_log.h
> > 
> > A general rule is that the header file shouldn't know or care what else
> > it's includer has included.  Ideally it shouldn't know or care what
> > else its includees have included, either.
> > 
> > A fun test would be
> > 
> > for i in *.h
> > 	echo $i > foo.c
> > 	make foo.o
> > done
> 
> A whole lot of things in include/ fail this.

I bet.

> Do you really think that anything using u8/16/32/64
> should include types.h?

Well, yes.  If someone writes a C file which includes such a header as
fisst-included then OK, it will fail and they'll fix things up.  But
where the problems occur is when that file is *not* the first-included,
but they happened to get types.h via another Kconfig-dependent include.
Later, the build explodes for someone else.  The only reliable way of
avoiding this is for each file to include its dependencies.

I don't think it's worth going off and trying to "fix" all of this
though.  Such an exercise has its own risks and this problem just isn't
that big - it happens often enough, but it's very easy to fix.

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-10-23 20:02     ` Andrew Morton
@ 2012-10-24 19:19       ` Joe Perches
  2012-10-24 19:38         ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Joe Perches @ 2012-10-24 19:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Stephen Rothwell, linux-next, linux-kernel, Kay Sievers

On Tue, 2012-10-23 at 13:02 -0700, Andrew Morton wrote:
> On Tue, 23 Oct 2012 12:51:29 -0700
> Joe Perches <joe@perches.com> wrote:
> 
> > > btw, what's up with printk_syslog.h?  It includes two header files which it
> > > doesn't need but fails to include the two it *does* need: printk_log.h
> > > and types.h.
> > > 
> > > 
> > 
> > printk_syslog.c includes kernel.h (it includes types.h)
> > and printk_log.h.
> > 
> > I think printk_syslog.h doesn't need printk_log.h
> 
> A general rule is that the header file shouldn't know or care what else
> it's includer has included.  Ideally it shouldn't know or care what
> else its includees have included, either.
> 
> A fun test would be
> 
> for i in *.h
> 	echo $i > foo.c
> 	make foo.o
> done

A whole lot of things in include/ fail this.

Do you really think that anything using u8/16/32/64
should include types.h?

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-10-23 19:51   ` Joe Perches
@ 2012-10-23 20:02     ` Andrew Morton
  2012-10-24 19:19       ` Joe Perches
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2012-10-23 20:02 UTC (permalink / raw)
  To: Joe Perches; +Cc: Stephen Rothwell, linux-next, linux-kernel, Kay Sievers

On Tue, 23 Oct 2012 12:51:29 -0700
Joe Perches <joe@perches.com> wrote:

> > btw, what's up with printk_syslog.h?  It includes two header files which it
> > doesn't need but fails to include the two it *does* need: printk_log.h
> > and types.h.
> > 
> > 
> 
> printk_syslog.c includes kernel.h (it includes types.h)
> and printk_log.h.
> 
> I think printk_syslog.h doesn't need printk_log.h

A general rule is that the header file shouldn't know or care what else
it's includer has included.  Ideally it shouldn't know or care what
else its includees have included, either.

A fun test would be

for i in *.h
	echo $i > foo.c
	make foo.o
done

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-10-23 19:44 ` Andrew Morton
@ 2012-10-23 19:51   ` Joe Perches
  2012-10-23 20:02     ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Joe Perches @ 2012-10-23 19:51 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Stephen Rothwell, linux-next, linux-kernel, Kay Sievers

On Tue, 2012-10-23 at 12:44 -0700, Andrew Morton wrote:
> On Tue, 23 Oct 2012 14:42:21 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> > 
> > kernel/printk/printk_syslog.c: In function 'printk_syslog_print':
> > kernel/printk/printk_syslog.c:108:3: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
> > kernel/printk/printk_syslog.c: In function 'do_syslog':
> > kernel/printk/printk_syslog.c:245:3: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration]
> > kernel/printk/printk_syslog.c:245:18: error: 'VERIFY_WRITE' undeclared (first use in this function)
> > kernel/printk/printk_syslog.c:245:18: note: each undeclared identifier is reported only once for each function it appears in
> > 
> > Caused by commit 598815e5f25f ("printk: add printk_syslog.c and .h").
> > 
> > Presumably missing an (or some) include files - see Rule 1 in
> > Documentation/SubmitChecklist.
> > 
> > I have reverted that commit for today (and the following commit
> > 2cf91e0e4b9f ("printk: move kmsg_dump functions to separate file")).
> 
> I'll add the include.
> 
> btw, what's up with printk_syslog.h?  It includes two header files which it
> doesn't need but fails to include the two it *does* need: printk_log.h
> and types.h.
> 
> 

printk_syslog.c includes kernel.h (it includes types.h)
and printk_log.h.

I think printk_syslog.h doesn't need printk_log.h

I'd appreciate being cc'd.

There's also a needed fix for braille
and a duplicate #define.

I'll resubmit the whole series tomorrow.

cheers, Joe

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-10-23  3:42 Stephen Rothwell
  2012-10-23  4:21 ` Joe Perches
@ 2012-10-23 19:44 ` Andrew Morton
  2012-10-23 19:51   ` Joe Perches
  1 sibling, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2012-10-23 19:44 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Joe Perches, Kay Sievers

On Tue, 23 Oct 2012 14:42:21 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> kernel/printk/printk_syslog.c: In function 'printk_syslog_print':
> kernel/printk/printk_syslog.c:108:3: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
> kernel/printk/printk_syslog.c: In function 'do_syslog':
> kernel/printk/printk_syslog.c:245:3: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration]
> kernel/printk/printk_syslog.c:245:18: error: 'VERIFY_WRITE' undeclared (first use in this function)
> kernel/printk/printk_syslog.c:245:18: note: each undeclared identifier is reported only once for each function it appears in
> 
> Caused by commit 598815e5f25f ("printk: add printk_syslog.c and .h").
> 
> Presumably missing an (or some) include files - see Rule 1 in
> Documentation/SubmitChecklist.
> 
> I have reverted that commit for today (and the following commit
> 2cf91e0e4b9f ("printk: move kmsg_dump functions to separate file")).

I'll add the include.

btw, what's up with printk_syslog.h?  It includes two header files which it
doesn't need but fails to include the two it *does* need: printk_log.h
and types.h.

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-10-23  3:42 Stephen Rothwell
@ 2012-10-23  4:21 ` Joe Perches
  2012-10-23 19:44 ` Andrew Morton
  1 sibling, 0 replies; 253+ messages in thread
From: Joe Perches @ 2012-10-23  4:21 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel, Kay Sievers

On Tue, 2012-10-23 at 14:42 +1100, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> kernel/printk/printk_syslog.c: In function 'printk_syslog_print':
> kernel/printk/printk_syslog.c:108:3: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
> kernel/printk/printk_syslog.c: In function 'do_syslog':
> kernel/printk/printk_syslog.c:245:3: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration]
> kernel/printk/printk_syslog.c:245:18: error: 'VERIFY_WRITE' undeclared (first use in this function)
> kernel/printk/printk_syslog.c:245:18: note: each undeclared identifier is reported only once for each function it appears in
> 
> Caused by commit 598815e5f25f ("printk: add printk_syslog.c and .h").
> 
> Presumably missing an (or some) include files - see Rule 1 in
> Documentation/SubmitChecklist.

Yup, missing at least <linux/uaccess.h> which x86 gets
via an arch specific include.

I compiled it only x86.

I'll resubmit that one.

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

* linux-next: build failure after merge of the akpm tree
@ 2012-10-23  3:42 Stephen Rothwell
  2012-10-23  4:21 ` Joe Perches
  2012-10-23 19:44 ` Andrew Morton
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-10-23  3:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Joe Perches, Kay Sievers

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

kernel/printk/printk_syslog.c: In function 'printk_syslog_print':
kernel/printk/printk_syslog.c:108:3: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
kernel/printk/printk_syslog.c: In function 'do_syslog':
kernel/printk/printk_syslog.c:245:3: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration]
kernel/printk/printk_syslog.c:245:18: error: 'VERIFY_WRITE' undeclared (first use in this function)
kernel/printk/printk_syslog.c:245:18: note: each undeclared identifier is reported only once for each function it appears in

Caused by commit 598815e5f25f ("printk: add printk_syslog.c and .h").

Presumably missing an (or some) include files - see Rule 1 in
Documentation/SubmitChecklist.

I have reverted that commit for today (and the following commit
2cf91e0e4b9f ("printk: move kmsg_dump functions to separate file")).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-10-23  3:35 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-10-23  3:35 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Matthew Leach

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/platforms/pasemi/idle.c:88:1: error: macro "__define_initcall" passed 3 arguments, but takes just 2
arch/powerpc/platforms/pasemi/idle.c:88:1: error: data definition has no type or storage class [-Werror]
arch/powerpc/platforms/pasemi/idle.c:88:1: error: type defaults to 'int' in declaration of '__define_initcall' [-Werror=implicit-int]
arch/powerpc/platforms/pasemi/idle.c:88:1: error: '__machine_initcall_pasemi_pasemi_idle_init' defined but not used [-Werror=unused-function]

Caused by commit e509970f45d1 ("include/linux/init.h: use the stringify
operator for the __define_initcall macro").

Please use grep, it is your friend.

I have reverted that commit for today (and the following commit
("init-use-the-stringify-operator-for-the-__define_initcall-macro-checkpatch-fixes")
that depends on it.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-28 15:19 ` Mikulas Patocka
@ 2012-10-01 19:56   ` Andrew Morton
  0 siblings, 0 replies; 253+ messages in thread
From: Andrew Morton @ 2012-10-01 19:56 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Stephen Rothwell, linux-next, linux-kernel, Michel Lespinasse,
	Jens Axboe

On Fri, 28 Sep 2012 11:19:29 -0400 (EDT)
Mikulas Patocka <mpatocka@redhat.com> wrote:

> > -	if (!prio_tree_empty(&mapping->i_mmap) ||
> > +	if (!RB_EMPTY_ROOT(&mapping->i_mmap) ||
> >  	    !list_empty(&mapping->i_mmap_nonlinear)) {
> >  		mutex_unlock(&mapping->i_mmap_mutex);
> >  		percpu_up_write(&bdev->bd_block_size_semaphore);
> > -- 
> > 1.7.10.280.gaa39
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell                    sfr@canb.auug.org.au
> 
> ... or replace it with
> 
> if (mapping_mapped(&mapping)) { ...

yup..

From: Andrew Morton <akpm@linux-foundation.org>
Subject: fs/block_dev.c:set_blocksize(): use mapping_mapped()

... instead of open-coding it.

Suggested-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/block_dev.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff -puN fs/block_dev.c~fs-block_devc-set_blocksize-use-mapping_mapped fs/block_dev.c
--- a/fs/block_dev.c~fs-block_devc-set_blocksize-use-mapping_mapped
+++ a/fs/block_dev.c
@@ -27,7 +27,6 @@
 #include <linux/namei.h>
 #include <linux/log2.h>
 #include <linux/cleancache.h>
-#include <linux/rbtree.h>
 #include <asm/uaccess.h>
 #include "internal.h"
 
@@ -133,8 +132,7 @@ int set_blocksize(struct block_device *b
 	/* Check that the block device is not memory mapped */
 	mapping = bdev->bd_inode->i_mapping;
 	mutex_lock(&mapping->i_mmap_mutex);
-	if (!RB_EMPTY_ROOT(&mapping->i_mmap) ||
-	    !list_empty(&mapping->i_mmap_nonlinear)) {
+	if (mapping_mapped(mapping)) {
 		mutex_unlock(&mapping->i_mmap_mutex);
 		percpu_up_write(&bdev->bd_block_size_semaphore);
 		return -EBUSY;
_

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-28  6:30 Stephen Rothwell
@ 2012-09-28 15:19 ` Mikulas Patocka
  2012-10-01 19:56   ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Mikulas Patocka @ 2012-09-28 15:19 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Michel Lespinasse, Jens Axboe



On Fri, 28 Sep 2012, Stephen Rothwell wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> fs/block_dev.c: In function 'set_blocksize':
> fs/block_dev.c:135:2: error: implicit declaration of function 'prio_tree_empty' [-Werror=implicit-function-declaration]
> 
> Caused by commit b87570f5d349 ("Fix a crash when block device is read and
> block size is changed at the same time") from the block tree interacting
> with commit "prio_tree: remove" from the akpm tree.
> 
> I added the following merge fix patch for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 28 Sep 2012 16:21:10 +1000
> Subject: [PATCH] prio_tree: fix fs/block_dev.c for removal of prio_tree
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  fs/block_dev.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 246a81e..165b01f 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -27,6 +27,7 @@
>  #include <linux/namei.h>
>  #include <linux/log2.h>
>  #include <linux/cleancache.h>
> +#include <linux/rbtree.h>
>  #include <asm/uaccess.h>
>  #include "internal.h"
>  
> @@ -132,7 +133,7 @@ int set_blocksize(struct block_device *bdev, int size)
>  	/* Check that the block device is not memory mapped */
>  	mapping = bdev->bd_inode->i_mapping;
>  	mutex_lock(&mapping->i_mmap_mutex);
> -	if (!prio_tree_empty(&mapping->i_mmap) ||
> +	if (!RB_EMPTY_ROOT(&mapping->i_mmap) ||
>  	    !list_empty(&mapping->i_mmap_nonlinear)) {
>  		mutex_unlock(&mapping->i_mmap_mutex);
>  		percpu_up_write(&bdev->bd_block_size_semaphore);
> -- 
> 1.7.10.280.gaa39
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au

... or replace it with

if (mapping_mapped(&mapping)) { ...

Mikulas

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

* linux-next: build failure after merge of the akpm tree
@ 2012-09-28  6:30 Stephen Rothwell
  2012-09-28 15:19 ` Mikulas Patocka
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-28  6:30 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Michel Lespinasse, Mikulas Patocka, Jens Axboe

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/block_dev.c: In function 'set_blocksize':
fs/block_dev.c:135:2: error: implicit declaration of function 'prio_tree_empty' [-Werror=implicit-function-declaration]

Caused by commit b87570f5d349 ("Fix a crash when block device is read and
block size is changed at the same time") from the block tree interacting
with commit "prio_tree: remove" from the akpm tree.

I added the following merge fix patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 28 Sep 2012 16:21:10 +1000
Subject: [PATCH] prio_tree: fix fs/block_dev.c for removal of prio_tree

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/block_dev.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 246a81e..165b01f 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -27,6 +27,7 @@
 #include <linux/namei.h>
 #include <linux/log2.h>
 #include <linux/cleancache.h>
+#include <linux/rbtree.h>
 #include <asm/uaccess.h>
 #include "internal.h"
 
@@ -132,7 +133,7 @@ int set_blocksize(struct block_device *bdev, int size)
 	/* Check that the block device is not memory mapped */
 	mapping = bdev->bd_inode->i_mapping;
 	mutex_lock(&mapping->i_mmap_mutex);
-	if (!prio_tree_empty(&mapping->i_mmap) ||
+	if (!RB_EMPTY_ROOT(&mapping->i_mmap) ||
 	    !list_empty(&mapping->i_mmap_nonlinear)) {
 		mutex_unlock(&mapping->i_mmap_mutex);
 		percpu_up_write(&bdev->bd_block_size_semaphore);
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-09-27  7:43 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-27  7:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Kees Cook

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

Hi Andrew,

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

In file included from arch/x86/include/asm/syscall.h:16:0,
                 from arch/x86/kernel/signal.c:40:
include/linux/audit.h: In function 'audit_get_loginuid':
include/linux/audit.h:536:1: error: expected ';' before '}' token

Caused by commit 57fb5bbce51d ("audit.h: replace defines with C stubs").

I have added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 27 Sep 2012 17:35:06 +1000
Subject: [PATCH] audit.h: replace defines with C stubs fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/audit.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index f1cfe02..30e9bea 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -532,7 +532,7 @@ extern int audit_set_loginuid(kuid_t loginuid);
 
 static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
 {
-	return tsk->loginuid
+	return tsk->loginuid;
 }
 
 static inline int audit_get_sessionid(struct task_struct *tsk)
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-26 20:33   ` Andrew Morton
  2012-09-26 20:42     ` Kees Cook
@ 2012-09-27  7:26     ` Stephen Rothwell
  1 sibling, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-27  7:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kees Cook, linux-next, linux-kernel, Fengguang Wu

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

Hi Andrew,

On Wed, 26 Sep 2012 13:33:35 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 26 Sep 2012 13:15:58 -0700
> Kees Cook <keescook@chromium.org> wrote:
> 
> > This is weird -- my original patch doesn't touch audit_get_sessionid() at all:
> > http://git.kernel.org/?p=linux/kernel/git/kees/linux.git;a=commitdiff;h=7bbfec58ed33d5e74043530b87992f16da718ba2
> 
> That patch has been broken multiple times as things change under its
> feet.  I've just repaired my most recent attempt to repair it.
> 
> 
> From: Kees Cook <keescook@chromium.org>
> Subject: audit.h: replace defines with C stubs
> 
> Replace the #defines used when CONFIG_AUDIT or CONFIG_AUDIT_SYSCALLS are
> disabled so we get type checking during those builds.
> 
> Suggested-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

OK, so I replaced the old version of this patch in the akpm tree in
linux-next with this one (with the kuid_t patch mashed in).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-26 20:42     ` Kees Cook
@ 2012-09-26 20:47       ` Andrew Morton
  0 siblings, 0 replies; 253+ messages in thread
From: Andrew Morton @ 2012-09-26 20:47 UTC (permalink / raw)
  To: Kees Cook; +Cc: Stephen Rothwell, linux-next, linux-kernel, Fengguang Wu

On Wed, 26 Sep 2012 13:42:05 -0700
Kees Cook <keescook@chromium.org> wrote:

> > +static inline int audit_get_loginuid(struct task_struct *tsk)
> 
> Shouldn't this return kuid_t, due to "userns: Convert the audit
> loginuid  to be a kuid"?

yup, thanks.

--- a/include/linux/audit.h~audith-replace-defines-with-c-stubs-fix
+++ a/include/linux/audit.h
@@ -530,7 +530,7 @@ extern int auditsc_get_stamp(struct audi
 			      struct timespec *t, unsigned int *serial);
 extern int audit_set_loginuid(kuid_t loginuid);
 
-static inline int audit_get_loginuid(struct task_struct *tsk)
+static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
 {
 	return tsk->loginuid
 }
@@ -677,7 +677,7 @@ static inline int auditsc_get_stamp(stru
 {
 	return 0;
 }
-static inline int audit_get_loginuid(struct task_struct *tsk)
+static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
 {
 	return INVALID_UID;
 }
_

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-26 20:33   ` Andrew Morton
@ 2012-09-26 20:42     ` Kees Cook
  2012-09-26 20:47       ` Andrew Morton
  2012-09-27  7:26     ` Stephen Rothwell
  1 sibling, 1 reply; 253+ messages in thread
From: Kees Cook @ 2012-09-26 20:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Stephen Rothwell, linux-next, linux-kernel, Fengguang Wu

Hi,

Thanks! This almost matched what I was preparing. Notes below...

On Wed, Sep 26, 2012 at 1:33 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Wed, 26 Sep 2012 13:15:58 -0700
> Kees Cook <keescook@chromium.org> wrote:
>
>> This is weird -- my original patch doesn't touch audit_get_sessionid() at all:
>> http://git.kernel.org/?p=linux/kernel/git/kees/linux.git;a=commitdiff;h=7bbfec58ed33d5e74043530b87992f16da718ba2
>
> That patch has been broken multiple times as things change under its
> feet.  I've just repaired my most recent attempt to repair it.
>
>
> From: Kees Cook <keescook@chromium.org>
> Subject: audit.h: replace defines with C stubs
>
> Replace the #defines used when CONFIG_AUDIT or CONFIG_AUDIT_SYSCALLS are
> disabled so we get type checking during those builds.
>
> Suggested-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
>  include/linux/audit.h |  206 +++++++++++++++++++++++++++++-----------
>  1 file changed, 153 insertions(+), 53 deletions(-)
>
> diff -puN include/linux/audit.h~audith-replace-defines-with-c-stubs include/linux/audit.h
> --- a/include/linux/audit.h~audith-replace-defines-with-c-stubs
> +++ a/include/linux/audit.h
> @@ -528,9 +528,18 @@ static inline void audit_ptrace(struct t
>  extern unsigned int audit_serial(void);
>  extern int auditsc_get_stamp(struct audit_context *ctx,
>                               struct timespec *t, unsigned int *serial);
> -extern int  audit_set_loginuid(kuid_t loginuid);
> -#define audit_get_loginuid(t) ((t)->loginuid)
> -#define audit_get_sessionid(t) ((t)->sessionid)
> +extern int audit_set_loginuid(kuid_t loginuid);
> +
> +static inline int audit_get_loginuid(struct task_struct *tsk)

Shouldn't this return kuid_t, due to "userns: Convert the audit
loginuid  to be a kuid"?

> +{
> +       return tsk->loginuid
> +}
> +
> +static inline int audit_get_sessionid(struct task_struct *tsk)
> +{
> +       return tsk->sessionid;
> +}
> +
>  extern void audit_log_task_context(struct audit_buffer *ab);
>  extern void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk);
>  extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
> @@ -627,38 +636,101 @@ static inline void audit_mmap_fd(int fd,
>  extern int audit_n_rules;
>  extern int audit_signals;
>  #else /* CONFIG_AUDITSYSCALL */
> -#define audit_alloc(t) ({ 0; })
> -#define audit_free(t) do { ; } while (0)
> -#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
> -#define audit_syscall_exit(r) do { ; } while (0)
> -#define audit_dummy_context() 1
> -#define audit_getname(n) do { ; } while (0)
> -#define audit_putname(n) do { ; } while (0)
> -#define __audit_inode(n,d) do { ; } while (0)
> -#define __audit_inode_child(i,p) do { ; } while (0)
> -#define audit_inode(n,d) do { (void)(d); } while (0)
> -#define audit_inode_child(i,p) do { ; } while (0)
> -#define audit_core_dumps(i) do { ; } while (0)
> -#define audit_seccomp(i,s,c) do { ; } while (0)
> -#define auditsc_get_stamp(c,t,s) (0)
> -#define audit_get_loginuid(t) (INVALID_UID)
> -#define audit_get_sessionid(t) (-1)
> -#define audit_log_task_context(b) do { ; } while (0)
> -#define audit_log_task_info(b, t) do { ; } while (0)
> -#define audit_ipc_obj(i) ((void)0)
> -#define audit_ipc_set_perm(q,u,g,m) ((void)0)
> -#define audit_bprm(p) ({ 0; })
> -#define audit_socketcall(n,a) ((void)0)
> -#define audit_fd_pair(n,a) ((void)0)
> -#define audit_sockaddr(len, addr) ({ 0; })
> -#define audit_mq_open(o,m,a) ((void)0)
> -#define audit_mq_sendrecv(d,l,p,t) ((void)0)
> -#define audit_mq_notify(d,n) ((void)0)
> -#define audit_mq_getsetattr(d,s) ((void)0)
> -#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
> -#define audit_log_capset(pid, ncr, ocr) ((void)0)
> -#define audit_mmap_fd(fd, flags) ((void)0)
> -#define audit_ptrace(t) ((void)0)
> +static inline int audit_alloc(struct task_struct *task)
> +{
> +       return 0;
> +}
> +static inline void audit_free(struct task_struct *task)
> +{ }
> +static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
> +                                      unsigned long a1, unsigned long a2,
> +                                      unsigned long a3)
> +{ }
> +static inline void audit_syscall_exit(void *pt_regs)
> +{ }
> +static inline int audit_dummy_context(void)
> +{
> +       return 1;
> +}
> +static inline void audit_getname(const char *name)
> +{ }
> +static inline void audit_putname(const char *name)
> +{ }
> +static inline void __audit_inode(const char *name, const struct dentry *dentry)
> +{ }
> +static inline void __audit_inode_child(const struct dentry *dentry,
> +                                       const struct inode *parent)
> +{ }
> +static inline void audit_inode(const char *name, const struct dentry *dentry)
> +{ }
> +static inline void audit_inode_child(const struct dentry *dentry,
> +                                    const struct inode *parent)
> +{ }
> +static inline void audit_core_dumps(long signr)
> +{ }
> +static inline void __audit_seccomp(unsigned long syscall, long signr, int code)
> +{ }
> +static inline void audit_seccomp(unsigned long syscall, long signr, int code)
> +{ }
> +static inline int auditsc_get_stamp(struct audit_context *ctx,
> +                             struct timespec *t, unsigned int *serial)
> +{
> +       return 0;
> +}
> +static inline int audit_get_loginuid(struct task_struct *tsk)

Same here?

> +{
> +       return INVALID_UID;
> +}
> +static inline int audit_get_sessionid(struct task_struct *tsk)
> +{
> +       return -1;
> +}
> +static inline void audit_log_task_context(struct audit_buffer *ab)
> +{ }
> +static inline void audit_log_task_info(struct audit_buffer *ab,
> +                                      struct task_struct *tsk)
> +{ }
> +static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
> +{ }
> +static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
> +                                       gid_t gid, umode_t mode)
> +{ }
> +static inline int audit_bprm(struct linux_binprm *bprm)
> +{
> +       return 0;
> +}
> +static inline void audit_socketcall(int nargs, unsigned long *args)
> +{ }
> +static inline void audit_fd_pair(int fd1, int fd2)
> +{ }
> +static inline int audit_sockaddr(int len, void *addr)
> +{
> +       return 0;
> +}
> +static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
> +{ }
> +static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len,
> +                                    unsigned int msg_prio,
> +                                    const struct timespec *abs_timeout)
> +{ }
> +static inline void audit_mq_notify(mqd_t mqdes,
> +                                  const struct sigevent *notification)
> +{ }
> +static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
> +{ }
> +static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
> +                                      const struct cred *new,
> +                                      const struct cred *old)
> +{
> +       return 0;
> +}
> +static inline void audit_log_capset(pid_t pid, const struct cred *new,
> +                                  const struct cred *old)
> +{ }
> +static inline void audit_mmap_fd(int fd, int flags)
> +{ }
> +static inline void audit_ptrace(struct task_struct *t)
> +{ }
>  #define audit_n_rules 0
>  #define audit_signals 0
>  #endif /* CONFIG_AUDITSYSCALL */
> @@ -682,7 +754,6 @@ extern void             audit_log_n_hex(struct
>  extern void                audit_log_n_string(struct audit_buffer *ab,
>                                                const char *buf,
>                                                size_t n);
> -#define audit_log_string(a,b) audit_log_n_string(a, b, strlen(b));
>  extern void                audit_log_n_untrustedstring(struct audit_buffer *ab,
>                                                         const char *string,
>                                                         size_t n);
> @@ -699,7 +770,8 @@ extern void             audit_log_lost(const ch
>  #ifdef CONFIG_SECURITY
>  extern void                audit_log_secctx(struct audit_buffer *ab, u32 secid);
>  #else
> -#define audit_log_secctx(b,s) do { ; } while (0)
> +static inline void         audit_log_secctx(struct audit_buffer *ab, u32 secid)
> +{ }
>  #endif
>
>  extern int                 audit_update_lsm_rules(void);
> @@ -711,22 +783,50 @@ extern int  audit_receive_filter(int typ
>                                 void *data, size_t datasz, kuid_t loginuid,
>                                 u32 sessionid, u32 sid);
>  extern int audit_enabled;
> -#else
> -#define audit_log(c,g,t,f,...) do { ; } while (0)
> -#define audit_log_start(c,g,t) ({ NULL; })
> -#define audit_log_vformat(b,f,a) do { ; } while (0)
> -#define audit_log_format(b,f,...) do { ; } while (0)
> -#define audit_log_end(b) do { ; } while (0)
> -#define audit_log_n_hex(a,b,l) do { ; } while (0)
> -#define audit_log_n_string(a,c,l) do { ; } while (0)
> -#define audit_log_string(a,c) do { ; } while (0)
> -#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0)
> -#define audit_log_untrustedstring(a,s) do { ; } while (0)
> -#define audit_log_d_path(b, p, d) do { ; } while (0)
> -#define audit_log_key(b, k) do { ; } while (0)
> -#define audit_log_link_denied(o, l) do { ; } while (0)
> -#define audit_log_secctx(b,s) do { ; } while (0)
> +#else /* CONFIG_AUDIT */
> +static inline __printf(4, 5)
> +void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
> +              const char *fmt, ...)
> +{ }
> +static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
> +                                                  gfp_t gfp_mask, int type)
> +{
> +       return NULL;
> +}
> +static inline __printf(2, 3)
> +void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
> +{ }
> +static inline void audit_log_end(struct audit_buffer *ab)
> +{ }
> +static inline void audit_log_n_hex(struct audit_buffer *ab,
> +                                  const unsigned char *buf, size_t len)
> +{ }
> +static inline void audit_log_n_string(struct audit_buffer *ab,
> +                                     const char *buf, size_t n)
> +{ }
> +static inline void  audit_log_n_untrustedstring(struct audit_buffer *ab,
> +                                               const char *string, size_t n)
> +{ }
> +static inline void audit_log_untrustedstring(struct audit_buffer *ab,
> +                                            const char *string)
> +{ }
> +static inline void audit_log_d_path(struct audit_buffer *ab,
> +                                   const char *prefix,
> +                                   const struct path *path)
> +{ }
> +static inline void audit_log_key(struct audit_buffer *ab, char *key)
> +{ }
> +static inline void audit_log_link_denied(const char *string,
> +                                        const struct path *link)
> +{ }
> +static inline void audit_log_secctx(struct audit_buffer *ab, u32 secid)
> +{ }
>  #define audit_enabled 0
> -#endif
> +#endif /* CONFIG_AUDIT */
> +static inline void audit_log_string(struct audit_buffer *ab, const char *buf)
> +{
> +       audit_log_n_string(ab, buf, strlen(buf));
> +}
> +
>  #endif
>  #endif
> _
>

-Kees

-- 
Kees Cook
Chrome OS Security

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-26 20:15 ` Kees Cook
@ 2012-09-26 20:33   ` Andrew Morton
  2012-09-26 20:42     ` Kees Cook
  2012-09-27  7:26     ` Stephen Rothwell
  0 siblings, 2 replies; 253+ messages in thread
From: Andrew Morton @ 2012-09-26 20:33 UTC (permalink / raw)
  To: Kees Cook; +Cc: Stephen Rothwell, linux-next, linux-kernel, Fengguang Wu

On Wed, 26 Sep 2012 13:15:58 -0700
Kees Cook <keescook@chromium.org> wrote:

> This is weird -- my original patch doesn't touch audit_get_sessionid() at all:
> http://git.kernel.org/?p=linux/kernel/git/kees/linux.git;a=commitdiff;h=7bbfec58ed33d5e74043530b87992f16da718ba2

That patch has been broken multiple times as things change under its
feet.  I've just repaired my most recent attempt to repair it.


From: Kees Cook <keescook@chromium.org>
Subject: audit.h: replace defines with C stubs

Replace the #defines used when CONFIG_AUDIT or CONFIG_AUDIT_SYSCALLS are
disabled so we get type checking during those builds.

Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/audit.h |  206 +++++++++++++++++++++++++++++-----------
 1 file changed, 153 insertions(+), 53 deletions(-)

diff -puN include/linux/audit.h~audith-replace-defines-with-c-stubs include/linux/audit.h
--- a/include/linux/audit.h~audith-replace-defines-with-c-stubs
+++ a/include/linux/audit.h
@@ -528,9 +528,18 @@ static inline void audit_ptrace(struct t
 extern unsigned int audit_serial(void);
 extern int auditsc_get_stamp(struct audit_context *ctx,
 			      struct timespec *t, unsigned int *serial);
-extern int  audit_set_loginuid(kuid_t loginuid);
-#define audit_get_loginuid(t) ((t)->loginuid)
-#define audit_get_sessionid(t) ((t)->sessionid)
+extern int audit_set_loginuid(kuid_t loginuid);
+
+static inline int audit_get_loginuid(struct task_struct *tsk)
+{
+	return tsk->loginuid
+}
+
+static inline int audit_get_sessionid(struct task_struct *tsk)
+{
+	return tsk->sessionid;
+}
+
 extern void audit_log_task_context(struct audit_buffer *ab);
 extern void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk);
 extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
@@ -627,38 +636,101 @@ static inline void audit_mmap_fd(int fd,
 extern int audit_n_rules;
 extern int audit_signals;
 #else /* CONFIG_AUDITSYSCALL */
-#define audit_alloc(t) ({ 0; })
-#define audit_free(t) do { ; } while (0)
-#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
-#define audit_syscall_exit(r) do { ; } while (0)
-#define audit_dummy_context() 1
-#define audit_getname(n) do { ; } while (0)
-#define audit_putname(n) do { ; } while (0)
-#define __audit_inode(n,d) do { ; } while (0)
-#define __audit_inode_child(i,p) do { ; } while (0)
-#define audit_inode(n,d) do { (void)(d); } while (0)
-#define audit_inode_child(i,p) do { ; } while (0)
-#define audit_core_dumps(i) do { ; } while (0)
-#define audit_seccomp(i,s,c) do { ; } while (0)
-#define auditsc_get_stamp(c,t,s) (0)
-#define audit_get_loginuid(t) (INVALID_UID)
-#define audit_get_sessionid(t) (-1)
-#define audit_log_task_context(b) do { ; } while (0)
-#define audit_log_task_info(b, t) do { ; } while (0)
-#define audit_ipc_obj(i) ((void)0)
-#define audit_ipc_set_perm(q,u,g,m) ((void)0)
-#define audit_bprm(p) ({ 0; })
-#define audit_socketcall(n,a) ((void)0)
-#define audit_fd_pair(n,a) ((void)0)
-#define audit_sockaddr(len, addr) ({ 0; })
-#define audit_mq_open(o,m,a) ((void)0)
-#define audit_mq_sendrecv(d,l,p,t) ((void)0)
-#define audit_mq_notify(d,n) ((void)0)
-#define audit_mq_getsetattr(d,s) ((void)0)
-#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
-#define audit_log_capset(pid, ncr, ocr) ((void)0)
-#define audit_mmap_fd(fd, flags) ((void)0)
-#define audit_ptrace(t) ((void)0)
+static inline int audit_alloc(struct task_struct *task)
+{
+	return 0;
+}
+static inline void audit_free(struct task_struct *task)
+{ }
+static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
+				       unsigned long a1, unsigned long a2,
+				       unsigned long a3)
+{ }
+static inline void audit_syscall_exit(void *pt_regs)
+{ }
+static inline int audit_dummy_context(void)
+{
+	return 1;
+}
+static inline void audit_getname(const char *name)
+{ }
+static inline void audit_putname(const char *name)
+{ }
+static inline void __audit_inode(const char *name, const struct dentry *dentry)
+{ }
+static inline void __audit_inode_child(const struct dentry *dentry,
+					const struct inode *parent)
+{ }
+static inline void audit_inode(const char *name, const struct dentry *dentry)
+{ }
+static inline void audit_inode_child(const struct dentry *dentry,
+				     const struct inode *parent)
+{ }
+static inline void audit_core_dumps(long signr)
+{ }
+static inline void __audit_seccomp(unsigned long syscall, long signr, int code)
+{ }
+static inline void audit_seccomp(unsigned long syscall, long signr, int code)
+{ }
+static inline int auditsc_get_stamp(struct audit_context *ctx,
+			      struct timespec *t, unsigned int *serial)
+{
+	return 0;
+}
+static inline int audit_get_loginuid(struct task_struct *tsk)
+{
+	return INVALID_UID;
+}
+static inline int audit_get_sessionid(struct task_struct *tsk)
+{
+	return -1;
+}
+static inline void audit_log_task_context(struct audit_buffer *ab)
+{ }
+static inline void audit_log_task_info(struct audit_buffer *ab,
+				       struct task_struct *tsk)
+{ }
+static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
+{ }
+static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
+					gid_t gid, umode_t mode)
+{ }
+static inline int audit_bprm(struct linux_binprm *bprm)
+{
+	return 0;
+}
+static inline void audit_socketcall(int nargs, unsigned long *args)
+{ }
+static inline void audit_fd_pair(int fd1, int fd2)
+{ }
+static inline int audit_sockaddr(int len, void *addr)
+{
+	return 0;
+}
+static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
+{ }
+static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len,
+				     unsigned int msg_prio,
+				     const struct timespec *abs_timeout)
+{ }
+static inline void audit_mq_notify(mqd_t mqdes,
+				   const struct sigevent *notification)
+{ }
+static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
+{ }
+static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
+				       const struct cred *new,
+				       const struct cred *old)
+{
+	return 0;
+}
+static inline void audit_log_capset(pid_t pid, const struct cred *new,
+				   const struct cred *old)
+{ }
+static inline void audit_mmap_fd(int fd, int flags)
+{ }
+static inline void audit_ptrace(struct task_struct *t)
+{ }
 #define audit_n_rules 0
 #define audit_signals 0
 #endif /* CONFIG_AUDITSYSCALL */
@@ -682,7 +754,6 @@ extern void		    audit_log_n_hex(struct 
 extern void		    audit_log_n_string(struct audit_buffer *ab,
 					       const char *buf,
 					       size_t n);
-#define audit_log_string(a,b) audit_log_n_string(a, b, strlen(b));
 extern void		    audit_log_n_untrustedstring(struct audit_buffer *ab,
 							const char *string,
 							size_t n);
@@ -699,7 +770,8 @@ extern void		    audit_log_lost(const ch
 #ifdef CONFIG_SECURITY
 extern void 		    audit_log_secctx(struct audit_buffer *ab, u32 secid);
 #else
-#define audit_log_secctx(b,s) do { ; } while (0)
+static inline void	    audit_log_secctx(struct audit_buffer *ab, u32 secid)
+{ }
 #endif
 
 extern int		    audit_update_lsm_rules(void);
@@ -711,22 +783,50 @@ extern int  audit_receive_filter(int typ
 				void *data, size_t datasz, kuid_t loginuid,
 				u32 sessionid, u32 sid);
 extern int audit_enabled;
-#else
-#define audit_log(c,g,t,f,...) do { ; } while (0)
-#define audit_log_start(c,g,t) ({ NULL; })
-#define audit_log_vformat(b,f,a) do { ; } while (0)
-#define audit_log_format(b,f,...) do { ; } while (0)
-#define audit_log_end(b) do { ; } while (0)
-#define audit_log_n_hex(a,b,l) do { ; } while (0)
-#define audit_log_n_string(a,c,l) do { ; } while (0)
-#define audit_log_string(a,c) do { ; } while (0)
-#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0)
-#define audit_log_untrustedstring(a,s) do { ; } while (0)
-#define audit_log_d_path(b, p, d) do { ; } while (0)
-#define audit_log_key(b, k) do { ; } while (0)
-#define audit_log_link_denied(o, l) do { ; } while (0)
-#define audit_log_secctx(b,s) do { ; } while (0)
+#else /* CONFIG_AUDIT */
+static inline __printf(4, 5)
+void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
+	       const char *fmt, ...)
+{ }
+static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
+						   gfp_t gfp_mask, int type)
+{
+	return NULL;
+}
+static inline __printf(2, 3)
+void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
+{ }
+static inline void audit_log_end(struct audit_buffer *ab)
+{ }
+static inline void audit_log_n_hex(struct audit_buffer *ab,
+				   const unsigned char *buf, size_t len)
+{ }
+static inline void audit_log_n_string(struct audit_buffer *ab,
+				      const char *buf, size_t n)
+{ }
+static inline void  audit_log_n_untrustedstring(struct audit_buffer *ab,
+						const char *string, size_t n)
+{ }
+static inline void audit_log_untrustedstring(struct audit_buffer *ab,
+					     const char *string)
+{ }
+static inline void audit_log_d_path(struct audit_buffer *ab,
+				    const char *prefix,
+				    const struct path *path)
+{ }
+static inline void audit_log_key(struct audit_buffer *ab, char *key)
+{ }
+static inline void audit_log_link_denied(const char *string,
+					 const struct path *link)
+{ }
+static inline void audit_log_secctx(struct audit_buffer *ab, u32 secid)
+{ }
 #define audit_enabled 0
-#endif
+#endif /* CONFIG_AUDIT */
+static inline void audit_log_string(struct audit_buffer *ab, const char *buf)
+{
+	audit_log_n_string(ab, buf, strlen(buf));
+}
+
 #endif
 #endif
_

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-26  6:01 Stephen Rothwell
@ 2012-09-26 20:15 ` Kees Cook
  2012-09-26 20:33   ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Kees Cook @ 2012-09-26 20:15 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel, Fengguang Wu

Hi,

This is weird -- my original patch doesn't touch audit_get_sessionid() at all:
http://git.kernel.org/?p=linux/kernel/git/kees/linux.git;a=commitdiff;h=7bbfec58ed33d5e74043530b87992f16da718ba2

The patch in linux-next (currently
e269b4131288512ebfe2adfe69042983cb2e69e5) got mangled to include
removing it, possibly triggered by the audit_get_loginuid() changes
("userns: Convert the audit loginuid  to be a kuid"). These shouldn't
be removed:

#define audit_get_loginuid(t) (INVALID_UID)
#define audit_get_sessionid(t) (-1)

I'll send an updated patch that'll apply on top of what's in linux-next.

Thanks!

-Kees

On Tue, Sep 25, 2012 at 11:01 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> net/key/af_key.c: In function 'pfkey_add':
> net/key/af_key.c:1476:9: error: implicit declaration of function 'audit_get_sessionid' [-Werror=implicit-function-declaration]
> net/core/dev.c: In function '__dev_set_promiscuity':
> net/core/dev.c:4573:5: error: implicit declaration of function 'audit_get_sessionid' [-Werror=implicit-function-declaration]
>
> Caused by commit "audit.h: replace defines with C stubs".
>
> I have reverted that commit for today.
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au



-- 
Kees Cook
Chrome OS Security

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

* linux-next: build failure after merge of the akpm tree
@ 2012-09-26  6:01 Stephen Rothwell
  2012-09-26 20:15 ` Kees Cook
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-26  6:01 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Kees Cook

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

net/key/af_key.c: In function 'pfkey_add':
net/key/af_key.c:1476:9: error: implicit declaration of function 'audit_get_sessionid' [-Werror=implicit-function-declaration]
net/core/dev.c: In function '__dev_set_promiscuity':
net/core/dev.c:4573:5: error: implicit declaration of function 'audit_get_sessionid' [-Werror=implicit-function-declaration]

Caused by commit "audit.h: replace defines with C stubs".

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-24 19:36   ` Roland Dreier
  2012-09-24 19:46     ` Andrew Morton
@ 2012-09-25  8:27     ` Jack Morgenstein
  1 sibling, 0 replies; 253+ messages in thread
From: Jack Morgenstein @ 2012-09-25  8:27 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Stephen Rothwell, Andrew Morton, linux-next, linux-kernel,
	Fengguang Wu, Amir Vadai, linux-rdma

Hi Roland,
I am on vacation until next Tuesday -- I'll look at this then.

-Jack


On Monday 24 September 2012 21:36, Roland Dreier wrote:
> On Mon, Sep 24, 2012 at 7:02 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > drivers/infiniband/hw/mlx4/cm.c: In function 'id_map_alloc':
> > drivers/infiniband/hw/mlx4/cm.c:228:36: error: 'MAX_ID_MASK' undeclared (first use in this function)
> >
> > Caused by commit d7a4e9b679e9 ("IB/mlx4: Add CM paravirtualization") from
> > the infiniband tree interacting with commit "idr: rename MAX_LEVEL to
> > MAX_IDR_LEVEL" from the akpm tree.
> >
> > I have added the following merge fix patch for today:
> >
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 24 Sep 2012 23:57:53 +1000
> > Subject: [PATCH] IB/mlx4: fix for MAX_ID_MASK to MAX_IDR_MASK name change
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/infiniband/hw/mlx4/cm.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
> > index e25e4da..80079e5 100644
> > --- a/drivers/infiniband/hw/mlx4/cm.c
> > +++ b/drivers/infiniband/hw/mlx4/cm.c
> > @@ -225,7 +225,7 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
> >                 ret = idr_get_new_above(&sriov->pv_id_table, ent,
> >                                         next_id, &id);
> >                 if (!ret) {
> > -                       next_id = ((unsigned) id + 1) & MAX_ID_MASK;
> > +                       next_id = ((unsigned) id + 1) & MAX_IDR_MASK;
> >                         ent->pv_cm_id = (u32)id;
> >                         sl_id_map_add(ibdev, ent);
> >                 }
> 
> Andrew, any preference on how to handle this merge?
> 
> Jack/Amir, I wonder if there's some way we can avoid this code
> entirely?  Is an IDR the right structure to use here, or would we
> be better off with a radix tree maybe (where we can assign our
> own ID)?
> 
>  - R.
> 

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-24 19:36   ` Roland Dreier
@ 2012-09-24 19:46     ` Andrew Morton
  2012-09-25  8:27     ` Jack Morgenstein
  1 sibling, 0 replies; 253+ messages in thread
From: Andrew Morton @ 2012-09-24 19:46 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Stephen Rothwell, linux-next, linux-kernel, Fengguang Wu,
	Amir Vadai, Jack Morgenstein, linux-rdma

On Mon, 24 Sep 2012 12:36:43 -0700
Roland Dreier <roland@purestorage.com> wrote:

> On Mon, Sep 24, 2012 at 7:02 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > drivers/infiniband/hw/mlx4/cm.c: In function 'id_map_alloc':
> > drivers/infiniband/hw/mlx4/cm.c:228:36: error: 'MAX_ID_MASK' undeclared (first use in this function)
> >
> > Caused by commit d7a4e9b679e9 ("IB/mlx4: Add CM paravirtualization") from
> > the infiniband tree interacting with commit "idr: rename MAX_LEVEL to
> > MAX_IDR_LEVEL" from the akpm tree.
> >
> > I have added the following merge fix patch for today:
> >
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 24 Sep 2012 23:57:53 +1000
> > Subject: [PATCH] IB/mlx4: fix for MAX_ID_MASK to MAX_IDR_MASK name change
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/infiniband/hw/mlx4/cm.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
> > index e25e4da..80079e5 100644
> > --- a/drivers/infiniband/hw/mlx4/cm.c
> > +++ b/drivers/infiniband/hw/mlx4/cm.c
> > @@ -225,7 +225,7 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
> >                 ret = idr_get_new_above(&sriov->pv_id_table, ent,
> >                                         next_id, &id);
> >                 if (!ret) {
> > -                       next_id = ((unsigned) id + 1) & MAX_ID_MASK;
> > +                       next_id = ((unsigned) id + 1) & MAX_IDR_MASK;
> >                         ent->pv_cm_id = (u32)id;
> >                         sl_id_map_add(ibdev, ent);
> >                 }
> 
> Andrew, any preference on how to handle this merge?

I'm fixing up that patch as things change under its feet.  I usually
merge things like this late in the merge window after everything else
has landed, to cause minimum breakage/disruption.

If there was something in linux-next which didn't get into the merge
window (bad) then I cheerily break it and the tree maintainer fixes
things up.

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

* Re: linux-next: build failure after merge of the akpm tree
       [not found] ` <20120925000217.947b8cd8dca6979bfedee2ca-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
@ 2012-09-24 19:36   ` Roland Dreier
  2012-09-24 19:46     ` Andrew Morton
  2012-09-25  8:27     ` Jack Morgenstein
  0 siblings, 2 replies; 253+ messages in thread
From: Roland Dreier @ 2012-09-24 19:36 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Fengguang Wu, Amir Vadai,
	Jack Morgenstein, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Mon, Sep 24, 2012 at 7:02 AM, Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org> wrote:
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> drivers/infiniband/hw/mlx4/cm.c: In function 'id_map_alloc':
> drivers/infiniband/hw/mlx4/cm.c:228:36: error: 'MAX_ID_MASK' undeclared (first use in this function)
>
> Caused by commit d7a4e9b679e9 ("IB/mlx4: Add CM paravirtualization") from
> the infiniband tree interacting with commit "idr: rename MAX_LEVEL to
> MAX_IDR_LEVEL" from the akpm tree.
>
> I have added the following merge fix patch for today:
>
> From: Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
> Date: Mon, 24 Sep 2012 23:57:53 +1000
> Subject: [PATCH] IB/mlx4: fix for MAX_ID_MASK to MAX_IDR_MASK name change
>
> Signed-off-by: Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
> ---
>  drivers/infiniband/hw/mlx4/cm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
> index e25e4da..80079e5 100644
> --- a/drivers/infiniband/hw/mlx4/cm.c
> +++ b/drivers/infiniband/hw/mlx4/cm.c
> @@ -225,7 +225,7 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
>                 ret = idr_get_new_above(&sriov->pv_id_table, ent,
>                                         next_id, &id);
>                 if (!ret) {
> -                       next_id = ((unsigned) id + 1) & MAX_ID_MASK;
> +                       next_id = ((unsigned) id + 1) & MAX_IDR_MASK;
>                         ent->pv_cm_id = (u32)id;
>                         sl_id_map_add(ibdev, ent);
>                 }

Andrew, any preference on how to handle this merge?

Jack/Amir, I wonder if there's some way we can avoid this code
entirely?  Is an IDR the right structure to use here, or would we
be better off with a radix tree maybe (where we can assign our
own ID)?

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* linux-next: build failure after merge of the akpm tree
@ 2012-09-24 14:02 Stephen Rothwell
       [not found] ` <20120925000217.947b8cd8dca6979bfedee2ca-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-24 14:02 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Fengguang Wu, Amir Vadai,
	Jack Morgenstein, Roland Dreier, Roland Dreier, linux-rdma

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/infiniband/hw/mlx4/cm.c: In function 'id_map_alloc':
drivers/infiniband/hw/mlx4/cm.c:228:36: error: 'MAX_ID_MASK' undeclared (first use in this function)

Caused by commit d7a4e9b679e9 ("IB/mlx4: Add CM paravirtualization") from
the infiniband tree interacting with commit "idr: rename MAX_LEVEL to
MAX_IDR_LEVEL" from the akpm tree.

I have added the following merge fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 24 Sep 2012 23:57:53 +1000
Subject: [PATCH] IB/mlx4: fix for MAX_ID_MASK to MAX_IDR_MASK name change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/infiniband/hw/mlx4/cm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
index e25e4da..80079e5 100644
--- a/drivers/infiniband/hw/mlx4/cm.c
+++ b/drivers/infiniband/hw/mlx4/cm.c
@@ -225,7 +225,7 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
 		ret = idr_get_new_above(&sriov->pv_id_table, ent,
 					next_id, &id);
 		if (!ret) {
-			next_id = ((unsigned) id + 1) & MAX_ID_MASK;
+			next_id = ((unsigned) id + 1) & MAX_IDR_MASK;
 			ent->pv_cm_id = (u32)id;
 			sl_id_map_add(ibdev, ent);
 		}
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-21  6:26 Stephen Rothwell
@ 2012-09-21  9:02 ` Denys Vlasenko
  0 siblings, 0 replies; 253+ messages in thread
From: Denys Vlasenko @ 2012-09-21  9:02 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel

Hi Stephen,

On Fri, Sep 21, 2012 at 8:26 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> fs/compat_binfmt_elf.c:22:53: fatal error: asm/sigframe.h: No such file or directory
>
> Caused by commit "coredump: add a new elf note with siginfo of the
> signal".  That include file only exists on the x86 and tile architectures.
>
> I have reverted that commit (and "coredump: extend core dump note section
> to contain file names of mapped files" and
> "coredump-extend-core-dump-note-section-to-contain-file-names-of-mapped-files-checkpatch-fixes"
> that follow it) for today.

Sorry about this. I will take a look at it.

-- 
vda

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

* linux-next: build failure after merge of the akpm tree
@ 2012-09-21  6:26 Stephen Rothwell
  2012-09-21  9:02 ` Denys Vlasenko
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-21  6:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Denys Vlasenko

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/compat_binfmt_elf.c:22:53: fatal error: asm/sigframe.h: No such file or directory

Caused by commit "coredump: add a new elf note with siginfo of the
signal".  That include file only exists on the x86 and tile architectures.

I have reverted that commit (and "coredump: extend core dump note section
to contain file names of mapped files" and
"coredump-extend-core-dump-note-section-to-contain-file-names-of-mapped-files-checkpatch-fixes"
that follow it) for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-09-21  6:08 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-21  6:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Denys Vlasenko

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/binfmt_elf.c: In function 'fill_files_note':
fs/binfmt_elf.c:1419:2: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration]
fs/binfmt_elf.c:1419:7: warning: assignment makes pointer from integer without a cast [enabled by default]
fs/binfmt_elf.c:1437:5: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]

Caused by commit "coredump: extend core dump note section to contain file
names of mapped files".  Forgot to include vmalloc.h :-(

I added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 21 Sep 2012 16:06:18 +1000
Subject: [PATCH] coredump: using vmalloc requires the inclusion of vmalloc.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/binfmt_elf.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 0973943..5ac905f 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -32,6 +32,7 @@
 #include <linux/elf.h>
 #include <linux/utsname.h>
 #include <linux/coredump.h>
+#include <linux/vmalloc.h>
 #include <asm/uaccess.h>
 #include <asm/param.h>
 #include <asm/page.h>
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-13  8:31   ` Stephen Rothwell
@ 2012-09-13 23:07     ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-13 23:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Fengguang Wu, Amit Daniel Kachhap, Zhang Rui

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

Hi Andrew,

On Thu, 13 Sep 2012 18:31:06 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Here is the chunk of the series file I have:
> 
> idr-rename-max_level-to-max_idr_level.patch
> idr-rename-max_level-to-max_idr_level-fix.patch
> idr-rename-max_level-to-max_idr_level-fix-fix-2.patch
> #NEXT_PATCHES_END
> #
> linux-next.patch
> i-need-old-gcc.patch
> idr-rename-max_level-to-max_idr_level-fix-3.patch
> arch-alpha-kernel-systblss-remove-debug-check.patch
> #
> #NEXT_PATCHES_START linux-next-urgent
> 
> So idr-rename-max_level-to-max_idr_level-fix-3.patch is excluded form
> linux-next :-( I guess I need to just move that further down in the
> series file?  Though when you send the preceding three patches to Linus,
> that fix-3 patch will be needed when I merge the thermal tree.

I put idr-rename-max_level-to-max_idr_level-fix-3.patch into the akpm
tree in linux-next (just after the -fix-2 patch).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-13  8:46 ` Zhang Rui
@ 2012-09-13 12:30   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-13 12:30 UTC (permalink / raw)
  To: Zhang Rui
  Cc: Andrew Morton, linux-next, linux-kernel, Fengguang Wu,
	Amit Daniel Kachhap

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

Hi Zhang,

On Thu, 13 Sep 2012 16:46:27 +0800 Zhang Rui <rui.zhang@intel.com> wrote:
>
> I'm new as a git owner, so a stupid question here,
> in this case, who should keep this fix? Do I need to do something when
> sending pull request?

Andrew will take care of it.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-13  7:44 Stephen Rothwell
  2012-09-13  7:49 ` Sachin Kamat
  2012-09-13  7:56 ` Andrew Morton
@ 2012-09-13  8:46 ` Zhang Rui
  2012-09-13 12:30   ` Stephen Rothwell
  2 siblings, 1 reply; 253+ messages in thread
From: Zhang Rui @ 2012-09-13  8:46 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Fengguang Wu,
	Amit Daniel Kachhap

Hi, all,

On 四, 2012-09-13 at 17:44 +1000, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/thermal/cpu_cooling.c: In function 'get_idr':
> drivers/thermal/cpu_cooling.c:89:14: error: 'MAX_ID_MASK' undeclared (first use in this function)
> 
> Caused by commit "idr: rename MAX_LEVEL to MAX_IDR_LEVEL" from the akpm
> tree interacting with commit 78edc7cdcf5e ("thermal: add generic cpufreq
> cooling implementation") from the thermal tree.
> 
> I have applied the following merge fix patch and can carry it as
> necessary.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 13 Sep 2012 17:42:11 +1000
> Subject: [PATCH] thermal: fix up for MAX_ID_MASK rename
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

thanks for the fix.

I'm new as a git owner, so a stupid question here,
in this case, who should keep this fix? Do I need to do something when
sending pull request?

thanks,
rui
> ---
>  drivers/thermal/cpu_cooling.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index 99a5d75..f6ce617 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -9,7 +9,7 @@
>   *  it under the terms of the GNU General Public License as published by
>   *  the Free Software Foundation; version 2 of the License.
>   *
> - *  This program is distributed in the hope that it will be useful, but
> + *  This program is distributed in the hope that it will be useful, butX_ID_MASK
>   *  WITHOUT ANY WARRANTY; without even the implied warranty of
>   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>   *  General Public License for more details.
> @@ -86,7 +86,7 @@ again:
>  	else if (unlikely(err))
>  		return err;
>  
> -	*id = *id & MAX_ID_MASK;
> +	*id = *id & MAX_IDR_MASK;
>  	return 0;
>  }
>  
> -- 
> 1.7.10.280.gaa39
> 

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-13  7:49 ` Sachin Kamat
@ 2012-09-13  8:31   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-13  8:31 UTC (permalink / raw)
  To: Sachin Kamat
  Cc: Andrew Morton, linux-next, linux-kernel, Fengguang Wu,
	Amit Daniel Kachhap, Zhang Rui

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

Hi Sachin,

On Thu, 13 Sep 2012 13:19:48 +0530 Sachin Kamat <sachin.kamat@linaro.org> wrote:
>
> > - *  This program is distributed in the hope that it will be useful, but
> > + *  This program is distributed in the hope that it will be useful, butX_ID_MASK
> 
>                             ^^^^^^^^^^^^^
> Looks like a stray paste..

Yeah, thanks.  I will sort it out tomorrow.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-13  7:56 ` Andrew Morton
@ 2012-09-13  8:31   ` Stephen Rothwell
  2012-09-13 23:07     ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-13  8:31 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Fengguang Wu, Amit Daniel Kachhap, Zhang Rui

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

Hi Andrew,

On Thu, 13 Sep 2012 00:56:57 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Thu, 13 Sep 2012 17:44:41 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > After merging the akpm tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > drivers/thermal/cpu_cooling.c: In function 'get_idr':
> > drivers/thermal/cpu_cooling.c:89:14: error: 'MAX_ID_MASK' undeclared (first use in this function)
> > 
> > Caused by commit "idr: rename MAX_LEVEL to MAX_IDR_LEVEL" from the akpm
> > tree interacting with commit 78edc7cdcf5e ("thermal: add generic cpufreq
> > cooling implementation") from the thermal tree.
> > 
> > I have applied the following merge fix patch and can carry it as
> > necessary.
> > 
> > ...
> >
> > --- a/drivers/thermal/cpu_cooling.c
> > +++ b/drivers/thermal/cpu_cooling.c
> > @@ -9,7 +9,7 @@
> >   *  it under the terms of the GNU General Public License as published by
> >   *  the Free Software Foundation; version 2 of the License.
> >   *
> > - *  This program is distributed in the hope that it will be useful, but
> > + *  This program is distributed in the hope that it will be useful, butX_ID_MASK
> >   *  WITHOUT ANY WARRANTY; without even the implied warranty of
> >   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> >   *  General Public License for more details.
> > @@ -86,7 +86,7 @@ again:
> >  	else if (unlikely(err))
> >  		return err;
> >  
> > -	*id = *id & MAX_ID_MASK;
> > +	*id = *id & MAX_IDR_MASK;
> >  	return 0;
> >  }
> 
> Confused. 
> http://ozlabs.org/~akpm/mmotm/broken-out/idr-rename-max_level-to-max_idr_level-fix-3.patch
> already does this.  How did that change get into the wrong place?

So, ignore the first hunk above, that was my typo.  

Here is the chunk of the series file I have:

idr-rename-max_level-to-max_idr_level.patch
idr-rename-max_level-to-max_idr_level-fix.patch
idr-rename-max_level-to-max_idr_level-fix-fix-2.patch
#NEXT_PATCHES_END
#
linux-next.patch
i-need-old-gcc.patch
idr-rename-max_level-to-max_idr_level-fix-3.patch
arch-alpha-kernel-systblss-remove-debug-check.patch
#
#NEXT_PATCHES_START linux-next-urgent

So idr-rename-max_level-to-max_idr_level-fix-3.patch is excluded form
linux-next :-( I guess I need to just move that further down in the
series file?  Though when you send the preceding three patches to Linus,
that fix-3 patch will be needed when I merge the thermal tree.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-13  7:44 Stephen Rothwell
  2012-09-13  7:49 ` Sachin Kamat
@ 2012-09-13  7:56 ` Andrew Morton
  2012-09-13  8:31   ` Stephen Rothwell
  2012-09-13  8:46 ` Zhang Rui
  2 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2012-09-13  7:56 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Fengguang Wu, Amit Daniel Kachhap, Zhang Rui

On Thu, 13 Sep 2012 17:44:41 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/thermal/cpu_cooling.c: In function 'get_idr':
> drivers/thermal/cpu_cooling.c:89:14: error: 'MAX_ID_MASK' undeclared (first use in this function)
> 
> Caused by commit "idr: rename MAX_LEVEL to MAX_IDR_LEVEL" from the akpm
> tree interacting with commit 78edc7cdcf5e ("thermal: add generic cpufreq
> cooling implementation") from the thermal tree.
> 
> I have applied the following merge fix patch and can carry it as
> necessary.
> 
> ...
>
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -9,7 +9,7 @@
>   *  it under the terms of the GNU General Public License as published by
>   *  the Free Software Foundation; version 2 of the License.
>   *
> - *  This program is distributed in the hope that it will be useful, but
> + *  This program is distributed in the hope that it will be useful, butX_ID_MASK
>   *  WITHOUT ANY WARRANTY; without even the implied warranty of
>   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>   *  General Public License for more details.
> @@ -86,7 +86,7 @@ again:
>  	else if (unlikely(err))
>  		return err;
>  
> -	*id = *id & MAX_ID_MASK;
> +	*id = *id & MAX_IDR_MASK;
>  	return 0;
>  }

Confused. 
http://ozlabs.org/~akpm/mmotm/broken-out/idr-rename-max_level-to-max_idr_level-fix-3.patch
already does this.  How did that change get into the wrong place?

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-09-13  7:44 Stephen Rothwell
@ 2012-09-13  7:49 ` Sachin Kamat
  2012-09-13  8:31   ` Stephen Rothwell
  2012-09-13  7:56 ` Andrew Morton
  2012-09-13  8:46 ` Zhang Rui
  2 siblings, 1 reply; 253+ messages in thread
From: Sachin Kamat @ 2012-09-13  7:49 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Fengguang Wu,
	Amit Daniel Kachhap, Zhang Rui

On 13 September 2012 13:14, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/thermal/cpu_cooling.c: In function 'get_idr':
> drivers/thermal/cpu_cooling.c:89:14: error: 'MAX_ID_MASK' undeclared (first use in this function)
>
> Caused by commit "idr: rename MAX_LEVEL to MAX_IDR_LEVEL" from the akpm
> tree interacting with commit 78edc7cdcf5e ("thermal: add generic cpufreq
> cooling implementation") from the thermal tree.
>
> I have applied the following merge fix patch and can carry it as
> necessary.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 13 Sep 2012 17:42:11 +1000
> Subject: [PATCH] thermal: fix up for MAX_ID_MASK rename
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/thermal/cpu_cooling.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index 99a5d75..f6ce617 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -9,7 +9,7 @@
>   *  it under the terms of the GNU General Public License as published by
>   *  the Free Software Foundation; version 2 of the License.
>   *
> - *  This program is distributed in the hope that it will be useful, but
> + *  This program is distributed in the hope that it will be useful, butX_ID_MASK

                            ^^^^^^^^^^^^^
Looks like a stray paste..


>   *  WITHOUT ANY WARRANTY; without even the implied warranty of
>   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>   *  General Public License for more details.
> @@ -86,7 +86,7 @@ again:
>         else if (unlikely(err))
>                 return err;
>
> -       *id = *id & MAX_ID_MASK;
> +       *id = *id & MAX_IDR_MASK;
>         return 0;
>  }
>
> --
> 1.7.10.280.gaa39
>
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au



-- 
With warm regards,
Sachin

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

* linux-next: build failure after merge of the akpm tree
@ 2012-09-13  7:44 Stephen Rothwell
  2012-09-13  7:49 ` Sachin Kamat
                   ` (2 more replies)
  0 siblings, 3 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-09-13  7:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Fengguang Wu, Amit Daniel Kachhap, Zhang Rui

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

Hi Andrew,

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

drivers/thermal/cpu_cooling.c: In function 'get_idr':
drivers/thermal/cpu_cooling.c:89:14: error: 'MAX_ID_MASK' undeclared (first use in this function)

Caused by commit "idr: rename MAX_LEVEL to MAX_IDR_LEVEL" from the akpm
tree interacting with commit 78edc7cdcf5e ("thermal: add generic cpufreq
cooling implementation") from the thermal tree.

I have applied the following merge fix patch and can carry it as
necessary.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 13 Sep 2012 17:42:11 +1000
Subject: [PATCH] thermal: fix up for MAX_ID_MASK rename

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

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 99a5d75..f6ce617 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -9,7 +9,7 @@
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; version 2 of the License.
  *
- *  This program is distributed in the hope that it will be useful, but
+ *  This program is distributed in the hope that it will be useful, butX_ID_MASK
  *  WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  *  General Public License for more details.
@@ -86,7 +86,7 @@ again:
 	else if (unlikely(err))
 		return err;
 
-	*id = *id & MAX_ID_MASK;
+	*id = *id & MAX_IDR_MASK;
 	return 0;
 }
 
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-08-06  5:04   ` Michel Lespinasse
@ 2012-08-06  9:46     ` Steven Whitehouse
  0 siblings, 0 replies; 253+ messages in thread
From: Steven Whitehouse @ 2012-08-06  9:46 UTC (permalink / raw)
  To: Michel Lespinasse
  Cc: Stephen Rothwell, Andrew Morton, linux-next, linux-kernel

Hi,

Thanks for the patch - I'd not realised that I'd used the wrong function
there... it is fixed now in the GFS2 -nmw tree,

Steve.

On Sun, 2012-08-05 at 22:04 -0700, Michel Lespinasse wrote:
> gfs2 calls RB_EMPTY_NODE() to check if nodes are not on an rbtree.
> The corresponding initialization function is RB_CLEAR_NODE().
> rb_init_node() was never clearly defined and is going away.
> 
> Signed-off-by: Michel Lespinasse <walken@google.com>
> ---
>  fs/gfs2/rgrp.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index eaa4188..675e7cc 100644
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -487,7 +487,7 @@ int gfs2_rs_alloc(struct gfs2_inode *ip)
>  	if (!res)
>  		error = -ENOMEM;
>  
> -	rb_init_node(&res->rs_node);
> +	RB_CLEAR_NODE(&res->rs_node);
>  
>  	down_write(&ip->i_rw_mutex);
>  	if (ip->i_res)
> @@ -520,7 +520,7 @@ static void __rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs)
>  	rgd = rs->rs_rbm.rgd;
>  	trace_gfs2_rs(ip, rs, TRACE_RS_TREEDEL);
>  	rb_erase(&rs->rs_node, &rgd->rd_rstree);
> -	rb_init_node(&rs->rs_node);
> +	RB_CLEAR_NODE(&rs->rs_node);
>  	BUG_ON(!rgd->rd_rs_cnt);
>  	rgd->rd_rs_cnt--;
>  

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-08-06  5:01 ` Michel Lespinasse
@ 2012-08-06  5:04   ` Michel Lespinasse
  2012-08-06  9:46     ` Steven Whitehouse
  0 siblings, 1 reply; 253+ messages in thread
From: Michel Lespinasse @ 2012-08-06  5:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Steven Whitehouse

gfs2 calls RB_EMPTY_NODE() to check if nodes are not on an rbtree.
The corresponding initialization function is RB_CLEAR_NODE().
rb_init_node() was never clearly defined and is going away.

Signed-off-by: Michel Lespinasse <walken@google.com>
---
 fs/gfs2/rgrp.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index eaa4188..675e7cc 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -487,7 +487,7 @@ int gfs2_rs_alloc(struct gfs2_inode *ip)
 	if (!res)
 		error = -ENOMEM;
 
-	rb_init_node(&res->rs_node);
+	RB_CLEAR_NODE(&res->rs_node);
 
 	down_write(&ip->i_rw_mutex);
 	if (ip->i_res)
@@ -520,7 +520,7 @@ static void __rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs)
 	rgd = rs->rs_rbm.rgd;
 	trace_gfs2_rs(ip, rs, TRACE_RS_TREEDEL);
 	rb_erase(&rs->rs_node, &rgd->rd_rstree);
-	rb_init_node(&rs->rs_node);
+	RB_CLEAR_NODE(&rs->rs_node);
 	BUG_ON(!rgd->rd_rs_cnt);
 	rgd->rd_rs_cnt--;
 
-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-08-06  3:43 Stephen Rothwell
@ 2012-08-06  5:01 ` Michel Lespinasse
  2012-08-06  5:04   ` Michel Lespinasse
  0 siblings, 1 reply; 253+ messages in thread
From: Michel Lespinasse @ 2012-08-06  5:01 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Steven Whitehouse

On Sun, Aug 5, 2012 at 8:43 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Caused by commit 5599fe1ab023 ("rbtree: empty nodes have no color") from
> the akpm tree interacting with commit cde7c325077b ("GFS2: Add structure
> to contain rgrp, bitmap, offset tuple") from the gfs2 tree.
>
> I have applied the following merge fix patch (which is probably not
> sufficient).

You are right that this is insufficient - gfs2 is using
RB_EMPTY_NODE() to check for nodes not being inserted on any rbtree,
so it must use RB_CLEAR_NODE() for initialization.

Will attach a patch as a reply to this.

I am surprised how fast these rb_init_node() calls are spreading.
Should I send Linus a patch removing that function so he could include
it in v3.6 and avoid having to deal with all these new uses ?

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

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

* linux-next: build failure after merge of the akpm tree
@ 2012-08-06  3:43 Stephen Rothwell
  2012-08-06  5:01 ` Michel Lespinasse
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-08-06  3:43 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Michel Lespinasse, Steven Whitehouse

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

Hi Andrew,

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

fs/gfs2/rgrp.c: In function 'gfs2_rs_alloc':
fs/gfs2/rgrp.c:456:2: error: implicit declaration of function 'rb_init_node' [-Werror=implicit-function-declaration]

Caused by commit 5599fe1ab023 ("rbtree: empty nodes have no color") from
the akpm tree interacting with commit cde7c325077b ("GFS2: Add structure
to contain rgrp, bitmap, offset tuple") from the gfs2 tree.

I have applied the following merge fix patch (which is probably not
sufficient).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 6 Aug 2012 13:35:11 +1000
Subject: [PATCH] rbtree/gfs2: remove call to rb_init_node

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/gfs2/rgrp.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 06476b3..6fb3a57 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -453,8 +453,6 @@ int gfs2_rs_alloc(struct gfs2_inode *ip)
 	if (!res)
 		error = -ENOMEM;
 
-	rb_init_node(&res->rs_node);
-
 	down_write(&ip->i_rw_mutex);
 	if (ip->i_res)
 		kmem_cache_free(gfs2_rsrv_cachep, res);
@@ -486,7 +484,6 @@ static void __rs_deltree(struct gfs2_inode *ip, struct gfs2_blkreserv *rs)
 	rgd = rs->rs_rbm.rgd;
 	trace_gfs2_rs(ip, rs, TRACE_RS_TREEDEL);
 	rb_erase(&rs->rs_node, &rgd->rd_rstree);
-	rb_init_node(&rs->rs_node);
 	BUG_ON(!rgd->rd_rs_cnt);
 	rgd->rd_rs_cnt--;
 
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-07-31  4:40 Stephen Rothwell
  2012-07-31  5:45 ` Michel Lespinasse
@ 2012-07-31 10:34 ` Michel Lespinasse
  1 sibling, 0 replies; 253+ messages in thread
From: Michel Lespinasse @ 2012-07-31 10:34 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel, Sage Weil

On Mon, Jul 30, 2012 at 9:40 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> net/ceph/osd_client.c: In function 'ceph_osdc_alloc_request':
> net/ceph/osd_client.c:216:2: error: implicit declaration of function 'rb_init_node' [-Werror=implicit-function-declaration]
>
> Caused by commit 753b960e52b7 ("rbtree: empty nodes have no color") from
> the akpm tree interacting with commit cd43045c2de6 ("libceph: initialize
> rb, list nodes in ceph_osd_request") from the ceph tree.
>
> I added the following merge fix patch for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 31 Jul 2012 14:37:35 +1000
> Subject: [PATCH] libceph: remove rb_node initialisation
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Michel Lespinasse <walken@google.com>

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-07-31  5:45 ` Michel Lespinasse
@ 2012-07-31  6:31   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-07-31  6:31 UTC (permalink / raw)
  To: Michel Lespinasse; +Cc: Andrew Morton, linux-next, linux-kernel, Sage Weil

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

Hi Michel,

On Mon, 30 Jul 2012 22:45:46 -0700 Michel Lespinasse <walken@google.com> wrote:
>
> There is a good chance that this is the right fix, if ceph doesn't use
> the RB_CLEAR_NODE / RB_EMPTY_NODE macros or try to directly access the
> rb_node fields. I wanted to grab the ceph tree to make sure, however
> the first repo I found under that name did not have a commit
> cd43045c2de6; where would be the correct place for me to fetch that ?

These can always be found at
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=blob;f=Next/Trees
for the latest linux-next tree.  In this case it is
git://github.com/ceph/ceph-client.git#master .

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-07-31  4:40 Stephen Rothwell
@ 2012-07-31  5:45 ` Michel Lespinasse
  2012-07-31  6:31   ` Stephen Rothwell
  2012-07-31 10:34 ` Michel Lespinasse
  1 sibling, 1 reply; 253+ messages in thread
From: Michel Lespinasse @ 2012-07-31  5:45 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel, Sage Weil

On Mon, Jul 30, 2012 at 9:40 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> net/ceph/osd_client.c: In function 'ceph_osdc_alloc_request':
> net/ceph/osd_client.c:216:2: error: implicit declaration of function 'rb_init_node' [-Werror=implicit-function-declaration]
>
> Caused by commit 753b960e52b7 ("rbtree: empty nodes have no color") from
> the akpm tree interacting with commit cd43045c2de6 ("libceph: initialize
> rb, list nodes in ceph_osd_request") from the ceph tree.
>
> I added the following merge fix patch for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 31 Jul 2012 14:37:35 +1000
> Subject: [PATCH] libceph: remove rb_node initialisation
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  net/ceph/osd_client.c |    1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
> index ad427e6..06fb7a9 100644
> --- a/net/ceph/osd_client.c
> +++ b/net/ceph/osd_client.c
> @@ -213,7 +213,6 @@ struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
>         kref_init(&req->r_kref);
>         init_completion(&req->r_completion);
>         init_completion(&req->r_safe_completion);
> -       rb_init_node(&req->r_node);
>         INIT_LIST_HEAD(&req->r_unsafe_item);
>         INIT_LIST_HEAD(&req->r_linger_item);
>         INIT_LIST_HEAD(&req->r_linger_osd);
> --
> 1.7.10.280.gaa39

There is a good chance that this is the right fix, if ceph doesn't use
the RB_CLEAR_NODE / RB_EMPTY_NODE macros or try to directly access the
rb_node fields. I wanted to grab the ceph tree to make sure, however
the first repo I found under that name did not have a commit
cd43045c2de6; where would be the correct place for me to fetch that ?

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

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

* linux-next: build failure after merge of the akpm tree
@ 2012-07-31  4:40 Stephen Rothwell
  2012-07-31  5:45 ` Michel Lespinasse
  2012-07-31 10:34 ` Michel Lespinasse
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-07-31  4:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Sage Weil, Michel Lespinasse

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

Hi Andrew,

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

net/ceph/osd_client.c: In function 'ceph_osdc_alloc_request':
net/ceph/osd_client.c:216:2: error: implicit declaration of function 'rb_init_node' [-Werror=implicit-function-declaration]

Caused by commit 753b960e52b7 ("rbtree: empty nodes have no color") from
the akpm tree interacting with commit cd43045c2de6 ("libceph: initialize
rb, list nodes in ceph_osd_request") from the ceph tree.

I added the following merge fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 31 Jul 2012 14:37:35 +1000
Subject: [PATCH] libceph: remove rb_node initialisation

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/ceph/osd_client.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index ad427e6..06fb7a9 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -213,7 +213,6 @@ struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
 	kref_init(&req->r_kref);
 	init_completion(&req->r_completion);
 	init_completion(&req->r_safe_completion);
-	rb_init_node(&req->r_node);
 	INIT_LIST_HEAD(&req->r_unsafe_item);
 	INIT_LIST_HEAD(&req->r_linger_item);
 	INIT_LIST_HEAD(&req->r_linger_osd);
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-06-25 16:40 ` Kees Cook
@ 2012-06-25 22:59   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-06-25 22:59 UTC (permalink / raw)
  To: Kees Cook
  Cc: Andrew Morton, linux-next, linux-kernel, Al Viro, Miklos Szeredi

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

Hi Kees,

On Mon, 25 Jun 2012 09:40:49 -0700 Kees Cook <keescook@chromium.org> wrote:
>
> It looks like namei.c changed the logic of the lookup loop. This should
> fix it.

OK, I have folded that into the original patch.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-06-25  6:41 Stephen Rothwell
@ 2012-06-25 16:40 ` Kees Cook
  2012-06-25 22:59   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Kees Cook @ 2012-06-25 16:40 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Kees Cook, Al Viro,
	Miklos Szeredi

Hi Stephen,

On Mon, Jun 25, 2012 at 04:41:41PM +1000, Stephen Rothwell wrote:
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> fs/namei.c: In function 'path_openat':
> fs/namei.c:2874:4: error: 'filp' undeclared (first use in this function)
> 
> Caused by patch "fs: add link restrictions" from the akpm tree
> interacting with (at least) commit 4066cd545681 ("vfs: remove open
> intents from nameidata") from the vfs tree.
> 
> I don't know how to fix this, so I have reverted the akpm patch for today
> (in the hope that someone else will fix it).

It looks like namei.c changed the logic of the lookup loop. This should
fix it.

Signed-off-by: Kees Cook <keescook@chromium.org>

---

diff -uNrp a/fs/namei.c b/fs/namei.c
--- a/fs/namei.c	2012-06-25 09:30:28.125746562 -0700
+++ b/fs/namei.c	2012-06-25 09:31:29.456997558 -0700
@@ -2870,10 +2870,8 @@ static struct file *path_openat(int dfd,
 			break;
 		}
 		error = may_follow_link(&link);
-		if (unlikely(error)) {
-			filp = ERR_PTR(error);
+		if (unlikely(error))
 			break;
-		}
 		nd->flags |= LOOKUP_PARENT;
 		nd->flags &= ~(LOOKUP_OPEN|LOOKUP_CREATE|LOOKUP_EXCL);
 		error = follow_link(&link, nd, &cookie);


-- 
Kees Cook
Chrome OS Security

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

* linux-next: build failure after merge of the akpm tree
@ 2012-06-25  6:41 Stephen Rothwell
  2012-06-25 16:40 ` Kees Cook
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-06-25  6:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Kees Cook, Al Viro, Miklos Szeredi

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/namei.c: In function 'path_openat':
fs/namei.c:2874:4: error: 'filp' undeclared (first use in this function)

Caused by patch "fs: add link restrictions" from the akpm tree
interacting with (at least) commit 4066cd545681 ("vfs: remove open
intents from nameidata") from the vfs tree.

I don't know how to fix this, so I have reverted the akpm patch for today
(in the hope that someone else will fix it).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-04-27  5:38 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-04-27  5:38 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Doug Ledford, KOSAKI Motohiro

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

ipc/mqueue.c: In function 'mqueue_get_inode':
ipc/mqueue.c:155:4: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration]
ipc/mqueue.c:155:19: warning: assignment makes pointer from integer without a cast [enabled by default]
ipc/mqueue.c: In function 'mqueue_evict_inode':
ipc/mqueue.c:268:3: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]

Caused by commit 5d644d9d3d8f ("ipc/mqueue: update maximums for the
mqueue subsystem").  See Rule 1 from Documentation/SubmitChecklist.

I have added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 27 Apr 2012 15:35:14 +1000
Subject: [PATCH] ipc/mqueue: using vmalloc requires including vmalloc.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 ipc/mqueue.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 04cc77e..279051c 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -34,6 +34,7 @@
 #include <linux/ipc_namespace.h>
 #include <linux/user_namespace.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
 
 #include <net/sock.h>
 #include "util.h"
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-02-28 22:08   ` Andrew Morton
@ 2012-02-29 10:13     ` Mark Brown
  0 siblings, 0 replies; 253+ messages in thread
From: Mark Brown @ 2012-02-29 10:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Stephen Rothwell, linux-next, linux-kernel, Akinobu Mita

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

On Tue, Feb 28, 2012 at 02:08:10PM -0800, Andrew Morton wrote:
> Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:

> > > -	for_each_set_bit_cont(i, lzo_blocks[0]->sync_bmp,
> > > +	for_each_set_bit_from(i, lzo_blocks[0]->sync_bmp,

> > That looks about right, yes.  Not sure what the best way to handle this
> > is, perhaps maintain _cont() for a while?

> I don't think that will be needed - for_each_set_bit_cont() only had
> two callers, both in arch/x86/kernel/cpu/perf_event.c.

Well, by "a while" I mostly mean "until after the merge window when the
new API is available".

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-02-28 12:00 ` Mark Brown
@ 2012-02-28 22:08   ` Andrew Morton
  2012-02-29 10:13     ` Mark Brown
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2012-02-28 22:08 UTC (permalink / raw)
  To: Mark Brown; +Cc: Stephen Rothwell, linux-next, linux-kernel, Akinobu Mita

On Tue, 28 Feb 2012 12:00:37 +0000
Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:

> > -	for_each_set_bit_cont(i, lzo_blocks[0]->sync_bmp,
> > +	for_each_set_bit_from(i, lzo_blocks[0]->sync_bmp,
> 
> That looks about right, yes.  Not sure what the best way to handle this
> is, perhaps maintain _cont() for a while?

I don't think that will be needed - for_each_set_bit_cont() only had
two callers, both in arch/x86/kernel/cpu/perf_event.c.

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-02-28  5:58 Stephen Rothwell
@ 2012-02-28 12:00 ` Mark Brown
  2012-02-28 22:08   ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Mark Brown @ 2012-02-28 12:00 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel, Akinobu Mita

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

On Tue, Feb 28, 2012 at 04:58:57PM +1100, Stephen Rothwell wrote:

> Caused by commits ac8d91c80190 ("regmap: Supply ranges to the sync
> operations" and a0941e562e80 ("regmap: Fix x86_64 breakage") from the
> regmap tree interacting with commits "bitops: rename for_each_set_bit_cont()
> in favor of analogous list.h function" and "bitops: remove
> for_each_set_bit_cont()" from the akpm tree.

Oh, that explains what went wrong there!  I had thought that
for_each_set_bit_from() must be ARM-specific somehow when I saw your
report and didn't actually reexamime on ARM when fixing up as _cont was
in the header (admittedly I was in a rush doing the fixup).

> -	for_each_set_bit_cont(i, lzo_blocks[0]->sync_bmp,
> +	for_each_set_bit_from(i, lzo_blocks[0]->sync_bmp,

That looks about right, yes.  Not sure what the best way to handle this
is, perhaps maintain _cont() for a while?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-02-28  5:58 Stephen Rothwell
  2012-02-28 12:00 ` Mark Brown
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-02-28  5:58 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Mark Brown, Akinobu Mita

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

Hi Andrew,

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

drivers/base/regmap/regcache-lzo.c: In function 'regcache_lzo_sync':
drivers/base/regmap/regcache-lzo.c:344:2: error: implicit declaration of function 'for_each_set_bit_cont' [-Werror=implicit-function-declaration]
drivers/base/regmap/regcache-lzo.c:345:41: error: expected ';' before '{' token
drivers/base/regmap/regcache-lzo.c:340:6: warning: unused variable 'ret' [-Wunused-variable]
drivers/base/regmap/regcache-lzo.c:338:15: warning: unused variable 'val' [-Wunused-variable]
drivers/base/regmap/regcache-lzo.c:368:1: warning: no return statement in function returning non-void [-Wreturn-type]

Caused by commits ac8d91c80190 ("regmap: Supply ranges to the sync
operations" and a0941e562e80 ("regmap: Fix x86_64 breakage") from the
regmap tree interacting with commits "bitops: rename for_each_set_bit_cont()
in favor of analogous list.h function" and "bitops: remove
for_each_set_bit_cont()" from the akpm tree.

I have applied this fix up patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 28 Feb 2012 16:15:35 +1100
Subject: [PATCH] regmap: cope with bitops API change (for_each_set_bit_cont)

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/base/regmap/regcache-lzo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c
index 8d00615..77dc532 100644
--- a/drivers/base/regmap/regcache-lzo.c
+++ b/drivers/base/regmap/regcache-lzo.c
@@ -341,7 +341,7 @@ static int regcache_lzo_sync(struct regmap *map, unsigned int min,
 
 	lzo_blocks = map->cache;
 	i = min;
-	for_each_set_bit_cont(i, lzo_blocks[0]->sync_bmp,
+	for_each_set_bit_from(i, lzo_blocks[0]->sync_bmp,
 			      lzo_blocks[0]->sync_bmp_nbits) {
 		if (i > max)
 			continue;
-- 
1.7.9.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-02-27  6:21 Stephen Rothwell
@ 2012-02-27  6:31 ` H. Peter Anvin
  0 siblings, 0 replies; 253+ messages in thread
From: H. Peter Anvin @ 2012-02-27  6:31 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Alex Shi,
	Thomas Gleixner, Ingo Molnar, Peter Zijlstra

On 02/26/2012 10:21 PM, Stephen Rothwell wrote:
> 
> I applied the following fix up patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au> Date: Mon, 27 Feb
> 2012 17:12:00 +1100 Subject: [PATCH] percpu: fix for removal of
> percpu_xxx function
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> --- 
> arch/x86/include/asm/compat.h |    2 +- 1 files changed, 1
> insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/include/asm/compat.h
> b/arch/x86/include/asm/compat.h index e7f68b4..b6a2a1c 100644 ---
> a/arch/x86/include/asm/compat.h +++
> b/arch/x86/include/asm/compat.h @@ -229,7 +229,7 @@ static inline
> void __user *arch_compat_alloc_user_space(long len) sp =
> task_pt_regs(current)->sp; } else { /* -128 for the x32 ABI redzone
> */ -		sp = percpu_read(old_rsp) - 128; +		sp =
> __this_cpu_read(old_rsp) - 128; }
> 
> return (void __user *)round_down(sp - len, 16);

Acked-by: H. Peter Anvin <hpa@zytor.com>

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

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

* linux-next: build failure after merge of the akpm tree
@ 2012-02-27  6:21 Stephen Rothwell
  2012-02-27  6:31 ` H. Peter Anvin
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-02-27  6:21 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Alex Shi, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra

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

Hi Andrew,

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

In file included from include/linux/compat.h:18:0,
                 from arch/x86/include/asm/ia32.h:7,
                 from arch/x86/include/asm/sigframe.h:17,
                 from arch/x86/kernel/asm-offsets.c:16:
arch/x86/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/x86/include/asm/compat.h:232:3: error: implicit declaration of function 'percpu_read' [-Werror=implicit-function-declaration]

Caused by commit d1a797f388d6 ("x32: Handle process creation") from the
tip tree interacting with commit 30999a95d190 ("percpu: remove percpu_xxx()
functions") from the akpm tree.

I applied the following fix up patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 27 Feb 2012 17:12:00 +1100
Subject: [PATCH] percpu: fix for removal of percpu_xxx function

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/include/asm/compat.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h
index e7f68b4..b6a2a1c 100644
--- a/arch/x86/include/asm/compat.h
+++ b/arch/x86/include/asm/compat.h
@@ -229,7 +229,7 @@ static inline void __user *arch_compat_alloc_user_space(long len)
 		sp = task_pt_regs(current)->sp;
 	} else {
 		/* -128 for the x32 ABI redzone */
-		sp = percpu_read(old_rsp) - 128;
+		sp = __this_cpu_read(old_rsp) - 128;
 	}
 
 	return (void __user *)round_down(sp - len, 16);
-- 
1.7.9.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-02-22  5:08 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-02-22  5:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Alex Shi, Linus

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

Hi Andrew,

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

In file included from arch/x86/include/asm/suspend_64.h:10:0,
                 from arch/x86/include/asm/suspend.h:4,
                 from arch/x86/kernel/asm-offsets.c:18:
arch/x86/include/asm/i387.h: In function '__thread_clear_has_fpu':
arch/x86/include/asm/i387.h:300:2: error: implicit declaration of function 'percpu_write' [-Werror=implicit-function-declaration]
arch/x86/include/asm/i387.h: In function 'fpu_lazy_restore':
arch/x86/include/asm/i387.h:354:2: error: implicit declaration of function 'percpu_read_stable' [-Werror=implicit-function-declaration]
arch/x86/include/asm/i387.h:354:13: warning: comparison between pointer and integer [enabled by default]

Caused by commits "percpu: remove percpu_xxx() functions" and "x86:
change percpu_read_stable() to this_cpu_read_stable()" from the akpm tree
interacting with commit 7e16838d94b5 ("i387: support lazy restore of FPU
state") from Linus' tree.

I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 22 Feb 2012 16:00:44 +1100
Subject: [PATCH] percpu: fixup for added percpu_xxx calls in i387.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/include/asm/i387.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h
index 2479049..df1cadd 100644
--- a/arch/x86/include/asm/i387.h
+++ b/arch/x86/include/asm/i387.h
@@ -297,14 +297,14 @@ static inline int __thread_has_fpu(struct task_struct *tsk)
 static inline void __thread_clear_has_fpu(struct task_struct *tsk)
 {
 	tsk->thread.fpu.has_fpu = 0;
-	percpu_write(fpu_owner_task, NULL);
+	__this_cpu_write(fpu_owner_task, NULL);
 }
 
 /* Must be paired with a 'clts' before! */
 static inline void __thread_set_has_fpu(struct task_struct *tsk)
 {
 	tsk->thread.fpu.has_fpu = 1;
-	percpu_write(fpu_owner_task, tsk);
+	__this_cpu_write(fpu_owner_task, tsk);
 }
 
 /*
@@ -351,7 +351,7 @@ typedef struct { int preload; } fpu_switch_t;
  */
 static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu)
 {
-	return new == percpu_read_stable(fpu_owner_task) &&
+	return new == this_cpu_read_stable(fpu_owner_task) &&
 		cpu == new->thread.fpu.last_cpu;
 }
 
@@ -473,7 +473,7 @@ static inline void kernel_fpu_begin(void)
 		__thread_clear_has_fpu(me);
 		/* We do 'stts()' in kernel_fpu_end() */
 	} else {
-		percpu_write(fpu_owner_task, NULL);
+		__this_cpu_write(fpu_owner_task, NULL);
 		clts();
 	}
 }
-- 
1.7.9.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-02-17  5:21 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2012-02-17  5:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, H. Peter Anvin

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from /scratch/sfr/next/include/linux/stat.h:60:0,
                 from /scratch/sfr/next/include/linux/module.h:10,
                 from /scratch/sfr/next/init/do_mounts.c:1:
/scratch/sfr/next/include/linux/time.h: In function '__FD_ZERO':
/scratch/sfr/next/include/linux/time.h:279:2: error: implicit declaration of function 'memset' [-Werror=implicit-function-declaration]

... and many similar.

Caused by commit 5607ffd42bae ("posix_types: remove fd_set macros").

I have reverted that commit (and the following checkpatch fix commit) for
today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-01-05 23:52 ` Andrew Morton
  2012-01-06  5:05   ` Greg KH
@ 2012-01-06  7:22   ` Mike Galbraith
  1 sibling, 0 replies; 253+ messages in thread
From: Mike Galbraith @ 2012-01-06  7:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, linux-next, linux-kernel, Dimitri Sivanich,
	Kay Sievers, Greg KH

On Thu, 2012-01-05 at 15:52 -0800, Andrew Morton wrote:
> On Thu, 5 Jan 2012 18:29:49 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> > 
> > kernel/time/tick-sched.c:874:7: warning: 'struct sysdev_attribute' declared inside parameter list [enabled by default]
> >
> > ...
> >
> > Caused by commit 629d589817da ("tick-sched: add specific do_timer_cpu
> > value for nohz off mode") interacting with the removal of sysdevs in the
> > driver-core tree.  This patch will need reworking for that.
> > 
> > I have reverted that commit for today.
> 
> Bah.  I dropped it.

Hm.  I was looking at that patch, and wondering if it wouldn't be better
to twiddle cpusets to allow the user to tell the scheduler and friends
that certain CPUs are being used for HPC instead.  We do isolation there
now, letting the user nuke scheduler domains, so it looks like the right
spot to extend isolation.

I'm trying that out, because I found that the rt push/pull logic adds
useless overhead and jitter to isolated/pinned rt loads.  We can let
exclusive cpusets turn nohz on/off, and/or rt push/pull.. and a set
could be immunized from becoming jiffies maintainer, or any other
unsavory and not 100% required duty, with a per cpu flag read as well.

	-Mike

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-01-05 23:52 ` Andrew Morton
@ 2012-01-06  5:05   ` Greg KH
  2012-01-06  7:22   ` Mike Galbraith
  1 sibling, 0 replies; 253+ messages in thread
From: Greg KH @ 2012-01-06  5:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, linux-next, linux-kernel, Dimitri Sivanich,
	Kay Sievers

On Thu, Jan 05, 2012 at 03:52:33PM -0800, Andrew Morton wrote:
> On Thu, 5 Jan 2012 18:29:49 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> > 
> > kernel/time/tick-sched.c:874:7: warning: 'struct sysdev_attribute' declared inside parameter list [enabled by default]
> >
> > ...
> >
> > Caused by commit 629d589817da ("tick-sched: add specific do_timer_cpu
> > value for nohz off mode") interacting with the removal of sysdevs in the
> > driver-core tree.  This patch will need reworking for that.
> > 
> > I have reverted that commit for today.
> 
> Bah.  I dropped it.
> 
> I must say, this week was a maximally inappropriate time to merge all this
> sysdev stuff into linux-next.

It was merged the week before christmas, there was a fun vacation break
in there, and a "build warning turns to error" problem with the powerpc
tree that we missed which caused it to be dropped from linux-next for a
few days, which all combined to hit you now.

Sorry about that, a fallout of the time of the year.  It had been a
while since Kay and I had bothered a bunch of people, it was about time :)

greg k-h

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-01-05 23:45   ` Andrew Morton
@ 2012-01-06  5:04     ` Greg KH
  0 siblings, 0 replies; 253+ messages in thread
From: Greg KH @ 2012-01-06  5:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Stephen Rothwell, linux-next, linux-kernel, Kay Sievers, Michael Holzheu

On Thu, Jan 05, 2012 at 03:45:15PM -0800, Andrew Morton wrote:
> On Thu, 5 Jan 2012 15:19:58 -0800
> Greg KH <greg@kroah.com> wrote:
> 
> > On Thu, Jan 05, 2012 at 06:29:37PM +1100, Stephen Rothwell wrote:
> > > Hi Andrew,
> > > 
> > > After merging the akpm tree, today's linux-next build (powerpc
> > > ppc64_defconfig) failed like this:
> > > 
> > > drivers/base/memory.c: In function 'memory_block_change_state':
> > > drivers/base/memory.c:306:22: error: 'struct memory_block' has no member named 'sysdev'
> > > drivers/base/memory.c:309:22: error: 'struct memory_block' has no member named 'sysdev'
> > > 
> > > Caused by commit 2691cc121386 ("kdump: add udev events for memory
> > > online/offline") interacting with commit 10fbcf4c6cb1 ("convert 'memory'
> > > sysdev_class to a regular subsystem") from the driver-core tree.
> > 
> > I can't recall this kdump patch coming through before, have I seen it?
> 
> I carefully added you to the Nov 22 commit email cc list :(
> 
> > creating new uevents is not something to be done lightly, has this been
> > tested with the existing userspace tools to make sure it doesn't cause
> > problems?
> 
> Seems to be covered in the changelog:

Ah, thanks, sorry, I had forgotten about that one.  It looks good,
nevermind...

greg k-h

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-01-05  7:29 Stephen Rothwell
@ 2012-01-05 23:52 ` Andrew Morton
  2012-01-06  5:05   ` Greg KH
  2012-01-06  7:22   ` Mike Galbraith
  0 siblings, 2 replies; 253+ messages in thread
From: Andrew Morton @ 2012-01-05 23:52 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Dimitri Sivanich, Kay Sievers, Greg KH

On Thu, 5 Jan 2012 18:29:49 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> kernel/time/tick-sched.c:874:7: warning: 'struct sysdev_attribute' declared inside parameter list [enabled by default]
>
> ...
>
> Caused by commit 629d589817da ("tick-sched: add specific do_timer_cpu
> value for nohz off mode") interacting with the removal of sysdevs in the
> driver-core tree.  This patch will need reworking for that.
> 
> I have reverted that commit for today.

Bah.  I dropped it.

I must say, this week was a maximally inappropriate time to merge all this
sysdev stuff into linux-next.

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-01-05 23:19 ` Greg KH
@ 2012-01-05 23:45   ` Andrew Morton
  2012-01-06  5:04     ` Greg KH
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2012-01-05 23:45 UTC (permalink / raw)
  To: Greg KH
  Cc: Stephen Rothwell, linux-next, linux-kernel, Kay Sievers, Michael Holzheu

On Thu, 5 Jan 2012 15:19:58 -0800
Greg KH <greg@kroah.com> wrote:

> On Thu, Jan 05, 2012 at 06:29:37PM +1100, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> > 
> > drivers/base/memory.c: In function 'memory_block_change_state':
> > drivers/base/memory.c:306:22: error: 'struct memory_block' has no member named 'sysdev'
> > drivers/base/memory.c:309:22: error: 'struct memory_block' has no member named 'sysdev'
> > 
> > Caused by commit 2691cc121386 ("kdump: add udev events for memory
> > online/offline") interacting with commit 10fbcf4c6cb1 ("convert 'memory'
> > sysdev_class to a regular subsystem") from the driver-core tree.
> 
> I can't recall this kdump patch coming through before, have I seen it?

I carefully added you to the Nov 22 commit email cc list :(

> creating new uevents is not something to be done lightly, has this been
> tested with the existing userspace tools to make sure it doesn't cause
> problems?

Seems to be covered in the changelog:


From: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Subject: kdump: add udev events for memory online/offline

Currently no udev events for memory hotplug "online" and "offline" are
generated:

# udevadm monitor
# echo offline > /sys/devices/system/memory/memory4/state
==> No event

When kdump is loaded, kexec detects the current memory configuration and
stores it in the pre-allocated ELF core header.  Therefore, for kdump it
is necessary to reload the kdump kernel with kexec when the memory
configuration changes (e.g.  for online/offline hotplug memory).

In order to do this automatically, udev rules should be used.  This kernel
patch adds udev events for "online" and "offline".  Together with this
kernel patch, the following udev rules for online/offline have to be added
to "/etc/udev/rules.d/98-kexec.rules":

SUBSYSTEM=="memory", ACTION=="online", PROGRAM="/etc/init.d/kdump restart"
SUBSYSTEM=="memory", ACTION=="offline", PROGRAM="/etc/init.d/kdump restart"

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/base/memory.c |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff -puN drivers/base/memory.c~kdump-add-udev-events-for-memory-online-offline drivers/base/memory.c
--- a/drivers/base/memory.c~kdump-add-udev-events-for-memory-online-offline
+++ a/drivers/base/memory.c
@@ -313,11 +313,22 @@ static int memory_block_change_state(str
 
 	ret = memory_block_action(mem->start_section_nr, to_state);
 
-	if (ret)
+	if (ret) {
 		mem->state = from_state_req;
-	else
-		mem->state = to_state;
+		goto out;
+	}
 
+	mem->state = to_state;
+	switch (mem->state) {
+	case MEM_OFFLINE:
+		kobject_uevent(&mem->sysdev.kobj, KOBJ_OFFLINE);
+		break;
+	case MEM_ONLINE:
+		kobject_uevent(&mem->sysdev.kobj, KOBJ_ONLINE);
+		break;
+	default:
+		break;
+	}
 out:
 	mutex_unlock(&mem->state_mutex);
 	return ret;
_

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

* Re: linux-next: build failure after merge of the akpm tree
  2012-01-05  7:29 Stephen Rothwell
@ 2012-01-05 23:19 ` Greg KH
  2012-01-05 23:45   ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Greg KH @ 2012-01-05 23:19 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Kay Sievers, Michael Holzheu

On Thu, Jan 05, 2012 at 06:29:37PM +1100, Stephen Rothwell wrote:
> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> drivers/base/memory.c: In function 'memory_block_change_state':
> drivers/base/memory.c:306:22: error: 'struct memory_block' has no member named 'sysdev'
> drivers/base/memory.c:309:22: error: 'struct memory_block' has no member named 'sysdev'
> 
> Caused by commit 2691cc121386 ("kdump: add udev events for memory
> online/offline") interacting with commit 10fbcf4c6cb1 ("convert 'memory'
> sysdev_class to a regular subsystem") from the driver-core tree.

I can't recall this kdump patch coming through before, have I seen it?
creating new uevents is not something to be done lightly, has this been
tested with the existing userspace tools to make sure it doesn't cause
problems?

thanks,

greg k-h

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

* linux-next: build failure after merge of the akpm tree
@ 2012-01-05  7:29 Stephen Rothwell
  2012-01-05 23:52 ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-01-05  7:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Dimitri Sivanich, Kay Sievers, Greg KH

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

kernel/time/tick-sched.c:874:7: warning: 'struct sysdev_attribute' declared inside parameter list [enabled by default]
kernel/time/tick-sched.c:874:7: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
kernel/time/tick-sched.c:874:7: warning: 'struct sys_device' declared inside parameter list [enabled by default]
kernel/time/tick-sched.c: In function 'sysfs_store_do_timer_cpu':
kernel/time/tick-sched.c:876:9: error: implicit declaration of function 'SYSDEV_TO_EXT_ATTR' [-Werror=implicit-function-declaration]
kernel/time/tick-sched.c:876:36: warning: initialization makes pointer from integer without a cast [enabled by default]
kernel/time/tick-sched.c:898:22: error: dereferencing pointer to incomplete type
kernel/time/tick-sched.c: At top level:
kernel/time/tick-sched.c:905:15: error: variable 'attr_jiffies_cpu' has initializer but incomplete type
kernel/time/tick-sched.c:906:4: error: implicit declaration of function '_SYSDEV_ATTR' [-Werror=implicit-function-declaration]
kernel/time/tick-sched.c:906:17: error: 'jiffies_cpu' undeclared here (not in a function)
kernel/time/tick-sched.c:906:36: error: 'sysdev_show_int' undeclared here (not in a function)
kernel/time/tick-sched.c:907:6: warning: excess elements in struct initializer [enabled by default]
kernel/time/tick-sched.c:907:6: warning: (near initialization for 'attr_jiffies_cpu') [enabled by default]
kernel/time/tick-sched.c:908:4: warning: excess elements in struct initializer [enabled by default]
kernel/time/tick-sched.c:908:4: warning: (near initialization for 'attr_jiffies_cpu') [enabled by default]
kernel/time/tick-sched.c:910:15: error: variable 'timekeeping_sysclass' has initializer but incomplete type
kernel/time/tick-sched.c:911:2: error: unknown field 'name' specified in initializer
kernel/time/tick-sched.c:911:2: warning: excess elements in struct initializer [enabled by default]
kernel/time/tick-sched.c:911:2: warning: (near initialization for 'timekeeping_sysclass') [enabled by default]
kernel/time/tick-sched.c:914:15: error: variable 'device_timekeeping' has initializer but incomplete type
kernel/time/tick-sched.c:915:2: error: unknown field 'id' specified in initializer
kernel/time/tick-sched.c:915:2: warning: excess elements in struct initializer [enabled by default]
kernel/time/tick-sched.c:915:2: warning: (near initialization for 'device_timekeeping') [enabled by default]
kernel/time/tick-sched.c:916:2: error: unknown field 'cls' specified in initializer
kernel/time/tick-sched.c:916:2: warning: excess elements in struct initializer [enabled by default]
kernel/time/tick-sched.c:916:2: warning: (near initialization for 'device_timekeeping') [enabled by default]
kernel/time/tick-sched.c: In function 'init_timekeeping_sysfs':
kernel/time/tick-sched.c:921:2: error: implicit declaration of function 'sysdev_class_register' [-Werror=implicit-function-declaration]
kernel/time/tick-sched.c:924:3: error: implicit declaration of function 'sysdev_register' [-Werror=implicit-function-declaration]
kernel/time/tick-sched.c:926:3: error: implicit declaration of function 'sysdev_create_file' [-Werror=implicit-function-declaration]
kernel/time/tick-sched.c:928:5: error: invalid use of undefined type 'struct sysdev_ext_attribute'

Caused by commit 629d589817da ("tick-sched: add specific do_timer_cpu
value for nohz off mode") interacting with the removal of sysdevs in the
driver-core tree.  This patch will need reworking for that.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2012-01-05  7:29 Stephen Rothwell
  2012-01-05 23:19 ` Greg KH
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2012-01-05  7:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Kay Sievers, Greg KH, Michael Holzheu

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/base/memory.c: In function 'memory_block_change_state':
drivers/base/memory.c:306:22: error: 'struct memory_block' has no member named 'sysdev'
drivers/base/memory.c:309:22: error: 'struct memory_block' has no member named 'sysdev'

Caused by commit 2691cc121386 ("kdump: add udev events for memory
online/offline") interacting with commit 10fbcf4c6cb1 ("convert 'memory'
sysdev_class to a regular subsystem") from the driver-core tree.

I have added the following merge fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 5 Jan 2012 18:25:57 +1100
Subject: [PATCH] memory: fix ups for class to subsystem conversion

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

diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 3463e87..ed5de58 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -303,10 +303,10 @@ static int memory_block_change_state(struct memory_block *mem,
 	mem->state = to_state;
 	switch (mem->state) {
 	case MEM_OFFLINE:
-		kobject_uevent(&mem->sysdev.kobj, KOBJ_OFFLINE);
+		kobject_uevent(&mem->dev.kobj, KOBJ_OFFLINE);
 		break;
 	case MEM_ONLINE:
-		kobject_uevent(&mem->sysdev.kobj, KOBJ_ONLINE);
+		kobject_uevent(&mem->dev.kobj, KOBJ_ONLINE);
 		break;
 	default:
 		break;
-- 
1.7.8.197.g73c6b

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-12-16 22:00 ` Andrew Morton
  2011-12-17 17:49   ` Alexey Dobriyan
@ 2011-12-18 22:43   ` Stephen Rothwell
  1 sibling, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2011-12-18 22:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Alexey Dobriyan

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

Hi Andrew,

On Fri, 16 Dec 2011 14:00:39 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 16 Dec 2011 16:39:28 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> > 
> > arch/powerpc/kernel/rtas_flash.c: In function 'rtas_flash_release':
> > arch/powerpc/kernel/rtas_flash.c:218:16: error: 'struct proc_dir_entry' has no member named 'count'
> > arch/powerpc/kernel/rtas_flash.c: In function 'rtas_excl_open':
> > arch/powerpc/kernel/rtas_flash.c:343:21: error: 'struct proc_dir_entry' has no member named 'count'
> > arch/powerpc/kernel/rtas_flash.c:348:16: error: 'struct proc_dir_entry' has no member named 'count'
> > arch/powerpc/kernel/rtas_flash.c: In function 'rtas_excl_release':
> > arch/powerpc/kernel/rtas_flash.c:358:16: error: 'struct proc_dir_entry' has no member named 'count'
> > arch/powerpc/kernel/rtas_flash.c: In function 'validate_flash_release':
> > arch/powerpc/kernel/rtas_flash.c:541:16: error: 'struct proc_dir_entry' has no member named 'count'
> > 
> > Caused by commit aef714db6205 ("core kernel: add refcount type and
> > refcount misuse debugging").
> > 
> > This would also break in drivers/nubus/proc.c
> > 
> > I have reverted that commit for today.
> 
> Thanks.  The plan apepars to be to make `struct kref' usable in this
> situation so I'll drop these patches.

OK, I have dropped that patch from the akpm tree in linux-next.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-12-16 22:00 ` Andrew Morton
@ 2011-12-17 17:49   ` Alexey Dobriyan
  2011-12-18 22:43   ` Stephen Rothwell
  1 sibling, 0 replies; 253+ messages in thread
From: Alexey Dobriyan @ 2011-12-17 17:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Stephen Rothwell, linux-next, linux-kernel, benh

On Fri, Dec 16, 2011 at 02:00:39PM -0800, Andrew Morton wrote:
> On Fri, 16 Dec 2011 16:39:28 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> > 
> > arch/powerpc/kernel/rtas_flash.c: In function 'rtas_flash_release':
> > arch/powerpc/kernel/rtas_flash.c:218:16: error: 'struct proc_dir_entry' has no member named 'count'
> > arch/powerpc/kernel/rtas_flash.c: In function 'rtas_excl_open':
> > arch/powerpc/kernel/rtas_flash.c:343:21: error: 'struct proc_dir_entry' has no member named 'count'
> > arch/powerpc/kernel/rtas_flash.c:348:16: error: 'struct proc_dir_entry' has no member named 'count'
> > arch/powerpc/kernel/rtas_flash.c: In function 'rtas_excl_release':
> > arch/powerpc/kernel/rtas_flash.c:358:16: error: 'struct proc_dir_entry' has no member named 'count'
> > arch/powerpc/kernel/rtas_flash.c: In function 'validate_flash_release':
> > arch/powerpc/kernel/rtas_flash.c:541:16: error: 'struct proc_dir_entry' has no member named 'count'
> > 
> > Caused by commit aef714db6205 ("core kernel: add refcount type and
> > refcount misuse debugging").
> > 
> > This would also break in drivers/nubus/proc.c
> > 
> > I have reverted that commit for today.
> 
> Thanks.  The plan apepars to be to make `struct kref' usable in this
> situation so I'll drop these patches.

If krefs would lose barriers, we might as well remove struct kref altogether.
Besides questionable mandatory passing of destructor to every kref_put(),
it is syntax sugar.

Non-atomic _refcnt_t do not fit into krefs regardless.

Now, rtas_flash.c. What this code simply doesn't work:
->count can be temporarily increased by simply issuing readdir().

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-12-16  5:39 Stephen Rothwell
@ 2011-12-16 22:00 ` Andrew Morton
  2011-12-17 17:49   ` Alexey Dobriyan
  2011-12-18 22:43   ` Stephen Rothwell
  0 siblings, 2 replies; 253+ messages in thread
From: Andrew Morton @ 2011-12-16 22:00 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Alexey Dobriyan

On Fri, 16 Dec 2011 16:39:28 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> arch/powerpc/kernel/rtas_flash.c: In function 'rtas_flash_release':
> arch/powerpc/kernel/rtas_flash.c:218:16: error: 'struct proc_dir_entry' has no member named 'count'
> arch/powerpc/kernel/rtas_flash.c: In function 'rtas_excl_open':
> arch/powerpc/kernel/rtas_flash.c:343:21: error: 'struct proc_dir_entry' has no member named 'count'
> arch/powerpc/kernel/rtas_flash.c:348:16: error: 'struct proc_dir_entry' has no member named 'count'
> arch/powerpc/kernel/rtas_flash.c: In function 'rtas_excl_release':
> arch/powerpc/kernel/rtas_flash.c:358:16: error: 'struct proc_dir_entry' has no member named 'count'
> arch/powerpc/kernel/rtas_flash.c: In function 'validate_flash_release':
> arch/powerpc/kernel/rtas_flash.c:541:16: error: 'struct proc_dir_entry' has no member named 'count'
> 
> Caused by commit aef714db6205 ("core kernel: add refcount type and
> refcount misuse debugging").
> 
> This would also break in drivers/nubus/proc.c
> 
> I have reverted that commit for today.

Thanks.  The plan apepars to be to make `struct kref' usable in this
situation so I'll drop these patches.

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

* linux-next: build failure after merge of the akpm tree
@ 2011-12-16  5:39 Stephen Rothwell
  2011-12-16 22:00 ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2011-12-16  5:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Alexey Dobriyan

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/kernel/rtas_flash.c: In function 'rtas_flash_release':
arch/powerpc/kernel/rtas_flash.c:218:16: error: 'struct proc_dir_entry' has no member named 'count'
arch/powerpc/kernel/rtas_flash.c: In function 'rtas_excl_open':
arch/powerpc/kernel/rtas_flash.c:343:21: error: 'struct proc_dir_entry' has no member named 'count'
arch/powerpc/kernel/rtas_flash.c:348:16: error: 'struct proc_dir_entry' has no member named 'count'
arch/powerpc/kernel/rtas_flash.c: In function 'rtas_excl_release':
arch/powerpc/kernel/rtas_flash.c:358:16: error: 'struct proc_dir_entry' has no member named 'count'
arch/powerpc/kernel/rtas_flash.c: In function 'validate_flash_release':
arch/powerpc/kernel/rtas_flash.c:541:16: error: 'struct proc_dir_entry' has no member named 'count'

Caused by commit aef714db6205 ("core kernel: add refcount type and
refcount misuse debugging").

This would also break in drivers/nubus/proc.c

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-12-12  4:26   ` Stephen Rothwell
@ 2011-12-12  4:41     ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2011-12-12  4:41 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, David Rientjes

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

Hi Andrew,

On Mon, 12 Dec 2011 15:26:01 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 8 Dec 2011 21:47:44 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > I suppose this is a good enough fix for that:
> > 
> >  include/linux/mempolicy.h |   10 ----------
> >  mm/mempolicy.c            |   12 ++++++++++++
> >  2 files changed, 12 insertions(+), 10 deletions(-)
> 
> OK, I applied this to the akpm tree today.

Actually I applied this:  (put the inlines the the correct file):

 include/linux/mempolicy.h |   10 ----------
 kernel/cpuset.c           |   12 ++++++++++++
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index d2589e2..7978eec 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -253,11 +253,6 @@ static inline int vma_migratable(struct vm_area_struct *vma)
 	return 1;
 }
 
-static inline bool task_has_mempolicy(struct task_struct *task)
-{
-	return task->mempolicy;
-}
-
 #else
 
 struct mempolicy {};
@@ -384,11 +379,6 @@ static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol,
 	return 0;
 }
 
-static inline bool task_has_mempolicy(struct task_struct *task)
-{
-	return false;
-}
-
 #endif /* CONFIG_NUMA */
 #endif /* __KERNEL__ */
 
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index ba5dfe5..540ef69 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -938,6 +938,18 @@ static void cpuset_migrate_mm(struct mm_struct *mm, const nodemask_t *from,
 	guarantee_online_mems(task_cs(tsk),&tsk->mems_allowed);
 }
 
+#ifdef CONFIG_NUMA
+static inline bool task_has_mempolicy(struct task_struct *task)
+{
+	return task->mempolicy;
+}
+#else
+static inline bool task_has_mempolicy(struct task_struct *task)
+{
+	return false;
+}
+#endif
+
 /*
  * cpuset_change_task_nodemask - change task's mems_allowed and mempolicy
  * @tsk: the task to change
-- 
1.7.7.3


-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-12-09  5:47 ` Andrew Morton
@ 2011-12-12  4:26   ` Stephen Rothwell
  2011-12-12  4:41     ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2011-12-12  4:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, David Rientjes

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

Hi Andrew,

On Thu, 8 Dec 2011 21:47:44 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> I suppose this is a good enough fix for that:
> 
>  include/linux/mempolicy.h |   10 ----------
>  mm/mempolicy.c            |   12 ++++++++++++
>  2 files changed, 12 insertions(+), 10 deletions(-)

OK, I applied this to the akpm tree today.

> > I have reverted that patch for today (and the following trivial patch
> > "cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix").
> 
> And I'll drop that one now.

And dropped that one.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-12-09  5:08 Stephen Rothwell
@ 2011-12-09  5:47 ` Andrew Morton
  2011-12-12  4:26   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2011-12-09  5:47 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, David Rientjes

On Fri, 9 Dec 2011 16:08:56 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from kernel/fork.c:21:0:
> include/linux/mempolicy.h: In function 'task_has_mempolicy':
> include/linux/mempolicy.h:258:13: error: dereferencing pointer to incomplete type
> 
> And several more like that.
> 
> Caused by commit 9d15457f147d
> ("cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2").

I suppose this is a good enough fix for that:

 include/linux/mempolicy.h |   10 ----------
 mm/mempolicy.c            |   12 ++++++++++++
 2 files changed, 12 insertions(+), 10 deletions(-)

diff -puN include/linux/mempolicy.h~cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2 include/linux/mempolicy.h
--- a/include/linux/mempolicy.h~cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2
+++ a/include/linux/mempolicy.h
@@ -253,11 +253,6 @@ static inline int vma_migratable(struct 
 	return 1;
 }
 
-static inline bool task_has_mempolicy(struct task_struct *task)
-{
-	return task->mempolicy;
-}
-
 #else
 
 struct mempolicy {};
@@ -384,11 +379,6 @@ static inline int mpol_to_str(char *buff
 	return 0;
 }
 
-static inline bool task_has_mempolicy(struct task_struct *task)
-{
-	return false;
-}
-
 #endif /* CONFIG_NUMA */
 #endif /* __KERNEL__ */
 
diff -puN mm/mempolicy.c~cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2 mm/mempolicy.c
--- a/mm/mempolicy.c~cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2
+++ a/mm/mempolicy.c
@@ -137,6 +137,18 @@ static const struct mempolicy_operations
 			enum mpol_rebind_step step);
 } mpol_ops[MPOL_MAX];
 
+#ifdef CONFIG_NUMA
+static inline bool task_has_mempolicy(struct task_struct *task)
+{
+	return task->mempolicy;
+}
+#else
+static inline bool task_has_mempolicy(struct task_struct *task)
+{
+	return false;
+}
+#endif
+
 /* Check that the nodemask contains at least one populated zone */
 static int is_valid_nodemask(const nodemask_t *nodemask)
 {
_

> I have reverted that patch for today (and the following trivial patch
> "cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix").

And I'll drop that one now.

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

* linux-next: build failure after merge of the akpm tree
@ 2011-12-09  5:08 Stephen Rothwell
  2011-12-09  5:47 ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2011-12-09  5:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, David Rientjes

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

Hi Andrew,

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

In file included from kernel/fork.c:21:0:
include/linux/mempolicy.h: In function 'task_has_mempolicy':
include/linux/mempolicy.h:258:13: error: dereferencing pointer to incomplete type

And several more like that.

Caused by commit 9d15457f147d
("cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2").

I have reverted that patch for today (and the following trivial patch
"cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix").
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2011-11-01  8:57 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2011-11-01  8:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Jonathan Cameron, James Bottomley

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

next/drivers/scsi/sd.c: In function 'sd_probe':
next/drivers/scsi/sd.c:2583:43: error: 'SD_MAX_DISKS' undeclared (first use in this function)

Caused by commit ddabd33db5a2 ("drivers/scsi/sd.c: use ida_simple_get()
and ida_simple_remove() in place of boilerplate code") (which was fixed
up by me). I am not sure how to fix this properly (SD_MAX_DISKS was
removed by other commits), so I have just reverted that patch for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2011-10-05  8:07 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2011-10-05  8:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Doug Ledford

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

ipc/mqueue.c: In function 'mqueue_get_inode':
ipc/mqueue.c:154:4: error: implicit declaration of function 'vmalloc'
ipc/mqueue.c:154:19: warning: assignment makes pointer from integer without a cast
ipc/mqueue.c: In function 'mqueue_evict_inode':
ipc/mqueue.c:278:3: error: implicit declaration of function 'vfree'

Caused by commit 8a53f9442429 ("ipc/mqueue: update maximums for the
mqueue subsystem").  See Rule 1 in Documentation/SubmitChecklist.

I have added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 5 Oct 2011 19:05:10 +1100
Subject: [PATCH] ipc/mqueue: vlammoc requires vmalloc.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 ipc/mqueue.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 0474ddb..229a5fb 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -33,6 +33,7 @@
 #include <linux/pid.h>
 #include <linux/ipc_namespace.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
 
 #include <net/sock.h>
 #include "util.h"
-- 
1.7.6.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-09-30  6:02 ` Andrew Morton
@ 2011-10-04  7:44   ` Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2011-10-04  7:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Andrew Morton, linux-next, linux-kernel, Stephen Boyd,
	Ingo Molnar, H. Peter Anvin, David Miller, netdev

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

Hi Andrew,

On Thu, 29 Sep 2011 23:02:26 -0700 Andrew Morton <akpm00@gmail.com> wrote:
>
> > Caused by commit 15e19cbbbf2a ("x86: implement strict user copy checks
> > for x86_64") when built with gcc 4.6.0.  This does not fail when built
> > with 4.5.2.
> 
> That patch is a PITA.  I've been waiting for some saviour to come along
> and fix all the warnings it emits before proceeding with it.  As I am
> apparently saviourless I shall hide that patch from the mm->linux-next
> drop, so only I get to suffer its effects.

OK, I have dropped that commit from linux-next.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-09-30  5:32 Stephen Rothwell
@ 2011-09-30  6:02 ` Andrew Morton
  2011-10-04  7:44   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Andrew Morton @ 2011-09-30  6:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Stephen Boyd,
	Ingo Molnar, H. Peter Anvin, David Miller, netdev

On Fri, 30 Sep 2011 15:32:55 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
> 
> After merging the akpm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> In file included from arch/x86/include/asm/uaccess.h:575:0,
>                  from include/net/checksum.h:25,
>                  from include/linux/skbuff.h:28,
>                  from include/linux/icmpv6.h:82,
>                  from net/compat.c:19:
> In function 'copy_from_user',
>     inlined from 'compat_sys_socketcall' at net/compat.c:793:20:
> arch/x86/include/asm/uaccess_64.h:64:26: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct
> 
> Caused by commit 15e19cbbbf2a ("x86: implement strict user copy checks
> for x86_64") when built with gcc 4.6.0.  This does not fail when built
> with 4.5.2.

This:

extern void copy_from_user_overflow(void)
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
	__compiletime_error("copy_from_user() buffer size is not provably correct")
#else
	__compiletime_warning("copy_from_user() buffer size is not provably correct")
#endif

presumably CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y, so it's doing what
we asked it to do.

> The problem here is that the length parameter to copy_from_user() is
> obtained by indexing into an array of sizes.  Making the array const
> does not help (obviously, since the index is not known at compile time
> anyway).
> 
> Maybe I need a newer compiler.  For today I have gone back to my 4.5.2
> compiler.

That patch is a PITA.  I've been waiting for some saviour to come along
and fix all the warnings it emits before proceeding with it.  As I am
apparently saviourless I shall hide that patch from the mm->linux-next
drop, so only I get to suffer its effects.

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

* linux-next: build failure after merge of the akpm tree
@ 2011-09-30  5:32 Stephen Rothwell
  2011-09-30  6:02 ` Andrew Morton
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2011-09-30  5:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Stephen Boyd, Ingo Molnar,
	H. Peter Anvin, David Miller, netdev

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

Hi Andrew,

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

In file included from arch/x86/include/asm/uaccess.h:575:0,
                 from include/net/checksum.h:25,
                 from include/linux/skbuff.h:28,
                 from include/linux/icmpv6.h:82,
                 from net/compat.c:19:
In function 'copy_from_user',
    inlined from 'compat_sys_socketcall' at net/compat.c:793:20:
arch/x86/include/asm/uaccess_64.h:64:26: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

Caused by commit 15e19cbbbf2a ("x86: implement strict user copy checks
for x86_64") when built with gcc 4.6.0.  This does not fail when built
with 4.5.2.

The problem here is that the length parameter to copy_from_user() is
obtained by indexing into an array of sizes.  Making the array const
does not help (obviously, since the index is not known at compile time
anyway).

Maybe I need a newer compiler.  For today I have gone back to my 4.5.2
compiler.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-09-28  9:22 Stephen Rothwell
  2011-09-28 15:51 ` Joe Perches
@ 2011-09-28 22:03 ` Andrew Morton
  1 sibling, 0 replies; 253+ messages in thread
From: Andrew Morton @ 2011-09-28 22:03 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Joe Perches, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev, Andrew Morton

On Wed, 28 Sep 2011 19:22:20 +1000
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> In file included from arch/powerpc/boot/stdio.c:12:0:
> arch/powerpc/boot/stdio.h:10:17: error: expected declaration specifiers or '...' before numeric constant
> arch/powerpc/boot/stdio.h:10:20: error: expected declaration specifiers or '...' before numeric constant
> arch/powerpc/boot/stdio.h:10:8: warning: return type defaults to 'int'
> arch/powerpc/boot/stdio.h:10:8: warning: function declaration isn't a prototype
> arch/powerpc/boot/stdio.h: In function '__printf':
> arch/powerpc/boot/stdio.h:14:17: error: expected declaration specifiers or '...' before numeric constant
> arch/powerpc/boot/stdio.h:14:20: error: expected declaration specifiers or '...' before numeric constant
> arch/powerpc/boot/stdio.h:14:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> arch/powerpc/boot/stdio.h:16:12: error: storage class specified for parameter 'vsprintf'
> 
> And went down hill from there (it produced hundreds of errors).

I could only find two non-kernel files which were modified by that
patch so afaict we just need to revert those two bits.  I'll test the
below..



From: Andrew Morton <akpm@google.com>
Subject: treewide-use-__printf-not-__attribute__formatprintf-fix

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from arch/powerpc/boot/stdio.c:12:0:
arch/powerpc/boot/stdio.h:10:17: error: expected declaration specifiers or '...' before numeric constant
arch/powerpc/boot/stdio.h:10:20: error: expected declaration specifiers or '...' before numeric constant
arch/powerpc/boot/stdio.h:10:8: warning: return type defaults to 'int'
arch/powerpc/boot/stdio.h:10:8: warning: function declaration isn't a prototype
arch/powerpc/boot/stdio.h: In function '__printf':
arch/powerpc/boot/stdio.h:14:17: error: expected declaration specifiers or '...' before numeric constant
arch/powerpc/boot/stdio.h:14:20: error: expected declaration specifiers or '...' before numeric constant
arch/powerpc/boot/stdio.h:14:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
arch/powerpc/boot/stdio.h:16:12: error: storage class specified for parameter 'vsprintf'
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@google.com>
---

 arch/powerpc/boot/ps3.c   |    3 ++-
 arch/powerpc/boot/stdio.h |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff -puN arch/alpha/boot/misc.c~treewide-use-__printf-not-__attribute__formatprintf-fix arch/alpha/boot/misc.c
diff -puN arch/alpha/include/asm/console.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/alpha/include/asm/console.h
diff -puN arch/frv/include/asm/system.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/frv/include/asm/system.h
diff -puN arch/ia64/include/asm/mca.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/ia64/include/asm/mca.h
diff -puN arch/m68k/include/asm/natfeat.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/m68k/include/asm/natfeat.h
diff -puN arch/mn10300/include/asm/gdb-stub.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/mn10300/include/asm/gdb-stub.h
diff -puN arch/powerpc/boot/ps3.c~treewide-use-__printf-not-__attribute__formatprintf-fix arch/powerpc/boot/ps3.c
--- a/arch/powerpc/boot/ps3.c~treewide-use-__printf-not-__attribute__formatprintf-fix
+++ a/arch/powerpc/boot/ps3.c
@@ -36,7 +36,8 @@ extern int lv1_get_repository_node_value
 #ifdef DEBUG
 #define DBG(fmt...) printf(fmt)
 #else
-static inline __printf(1, 2) int DBG(const char *fmt, ...) {return 0;}
+static inline int __attribute__ ((format (printf, 1, 2))) DBG(
+	const char *fmt, ...) {return 0;}
 #endif
 
 BSS_STACK(4096);
diff -puN arch/powerpc/boot/stdio.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/powerpc/boot/stdio.h
--- a/arch/powerpc/boot/stdio.h~treewide-use-__printf-not-__attribute__formatprintf-fix
+++ a/arch/powerpc/boot/stdio.h
@@ -7,11 +7,12 @@
 #define	EINVAL		22	/* Invalid argument */
 #define ENOSPC		28	/* No space left on device */
 
-extern __printf(1, 2) int printf(const char *fmt, ...);
+extern int printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
 
 #define fprintf(fmt, args...)	printf(args)
 
-extern __printf(2, 3) int sprintf(char *buf, const char *fmt, ...);
+extern int sprintf(char *buf, const char *fmt, ...)
+	__attribute__((format(printf, 2, 3)));
 
 extern int vsprintf(char *buf, const char *fmt, va_list args);
 
diff -puN arch/powerpc/include/asm/udbg.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/powerpc/include/asm/udbg.h
diff -puN arch/s390/include/asm/debug.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/s390/include/asm/debug.h
diff -puN arch/um/include/shared/user.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/um/include/shared/user.h
diff -puN drivers/isdn/hisax/callc.c~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/isdn/hisax/callc.c
diff -puN drivers/isdn/hisax/hisax.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/isdn/hisax/hisax.h
diff -puN drivers/isdn/hisax/isdnl1.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/isdn/hisax/isdnl1.h
diff -puN drivers/isdn/hisax/isdnl3.c~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/isdn/hisax/isdnl3.c
diff -puN drivers/isdn/hisax/st5481_d.c~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/isdn/hisax/st5481_d.c
diff -puN drivers/net/ethernet/mellanox/mlx4/mlx4_en.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
diff -puN drivers/net/wireless/ath/ath.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/net/wireless/ath/ath.h
diff -puN drivers/net/wireless/ath/ath5k/debug.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/net/wireless/ath/ath5k/debug.h
diff -puN drivers/net/wireless/ath/ath6kl/debug.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/net/wireless/ath/ath6kl/debug.h
diff -puN drivers/net/wireless/b43/b43.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/net/wireless/b43/b43.h
diff -puN drivers/net/wireless/b43legacy/b43legacy.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/net/wireless/b43legacy/b43legacy.h
diff -puN drivers/staging/iio/trigger.h~treewide-use-__printf-not-__attribute__formatprintf-fix drivers/staging/iio/trigger.h
diff -puN fs/ecryptfs/ecryptfs_kernel.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/ecryptfs/ecryptfs_kernel.h
diff -puN fs/ext2/ext2.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/ext2/ext2.h
diff -puN fs/ext4/ext4.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/ext4/ext4.h
diff -puN fs/fat/fat.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/fat/fat.h
diff -puN fs/gfs2/glock.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/gfs2/glock.h
diff -puN fs/hpfs/hpfs_fn.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/hpfs/hpfs_fn.h
diff -puN fs/nilfs2/nilfs.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/nilfs2/nilfs.h
diff -puN fs/ntfs/debug.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/ntfs/debug.h
diff -puN fs/ocfs2/super.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/ocfs2/super.h
diff -puN fs/partitions/ldm.c~treewide-use-__printf-not-__attribute__formatprintf-fix fs/partitions/ldm.c
diff -puN fs/udf/udfdecl.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/udf/udfdecl.h
diff -puN fs/ufs/ufs.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/ufs/ufs.h
diff -puN fs/xfs/xfs_message.h~treewide-use-__printf-not-__attribute__formatprintf-fix fs/xfs/xfs_message.h
diff -puN include/asm-generic/bug.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/asm-generic/bug.h
diff -puN include/drm/drmP.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/drm/drmP.h
diff -puN include/linux/audit.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/audit.h
diff -puN include/linux/blktrace_api.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/blktrace_api.h
diff -puN include/linux/device.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/device.h
diff -puN include/linux/dynamic_debug.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/dynamic_debug.h
diff -puN include/linux/ext3_fs.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/ext3_fs.h
diff -puN include/linux/fs.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/fs.h
diff -puN include/linux/fscache-cache.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/fscache-cache.h
diff -puN include/linux/gameport.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/gameport.h
diff -puN include/linux/kallsyms.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/kallsyms.h
diff -puN include/linux/kdb.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/kdb.h
diff -puN include/linux/kernel.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/kernel.h
diff -puN include/linux/kexec.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/kexec.h
diff -puN include/linux/kmod.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/kmod.h
diff -puN include/linux/kobject.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/kobject.h
diff -puN include/linux/kthread.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/kthread.h
diff -puN include/linux/libata.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/libata.h
diff -puN include/linux/mmiotrace.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/mmiotrace.h
diff -puN include/linux/netdevice.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/netdevice.h
diff -puN include/linux/printk.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/printk.h
diff -puN include/linux/quotaops.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/quotaops.h
diff -puN include/linux/seq_file.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/seq_file.h
diff -puN include/linux/trace_seq.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/linux/trace_seq.h
diff -puN include/net/bluetooth/bluetooth.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/net/bluetooth/bluetooth.h
diff -puN include/net/netfilter/nf_log.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/net/netfilter/nf_log.h
diff -puN include/net/sock.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/net/sock.h
diff -puN include/sound/core.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/sound/core.h
diff -puN include/sound/info.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/sound/info.h
diff -puN include/sound/seq_kernel.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/sound/seq_kernel.h
diff -puN include/xen/hvc-console.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/xen/hvc-console.h
diff -puN include/xen/xenbus.h~treewide-use-__printf-not-__attribute__formatprintf-fix include/xen/xenbus.h
diff -puN net/nfc/nfc.h~treewide-use-__printf-not-__attribute__formatprintf-fix net/nfc/nfc.h
diff -puN net/rds/rds.h~treewide-use-__printf-not-__attribute__formatprintf-fix net/rds/rds.h
diff -puN net/sunrpc/svc.c~treewide-use-__printf-not-__attribute__formatprintf-fix net/sunrpc/svc.c
diff -puN sound/firewire/cmp.c~treewide-use-__printf-not-__attribute__formatprintf-fix sound/firewire/cmp.c
_

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-09-28  9:22 Stephen Rothwell
@ 2011-09-28 15:51 ` Joe Perches
  2011-09-28 22:03 ` Andrew Morton
  1 sibling, 0 replies; 253+ messages in thread
From: Joe Perches @ 2011-09-28 15:51 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

On Wed, 2011-09-28 at 19:22 +1000, Stephen Rothwell wrote:
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> In file included from arch/powerpc/boot/stdio.c:12:0:
> arch/powerpc/boot/stdio.h:10:17: error: expected declaration specifiers or '...' before numeric constant
[]
> And went down hill from there (it produced hundreds of errors).

Well, I did say it was completely untested...

> Caused by commit a52af697aaeb ("treewide: use __printf not __attribute__
> ((format(printf,...)))").  Maybe because some of these files are part of
> the boot wrappers and are built (effectively) independently of the kernel
> itself.  Notice that arch/powerpc/boot/stdio.h does not include any
> kernel headers ...

The conversion was too comprehensive.

Probably most of the arch/... changes should be removed.
The arch/frv and arch/s390 changes look safe as they
are after #includes of kernel.h.

 arch/alpha/boot/misc.c                       |    3 +-
 arch/alpha/include/asm/console.h             |    3 +-
 arch/frv/include/asm/system.h                |    2 +-
 arch/ia64/include/asm/mca.h                  |    3 +-
 arch/m68k/include/asm/natfeat.h              |    3 +-
 arch/mn10300/include/asm/gdb-stub.h          |    5 +-
 arch/powerpc/boot/ps3.c                      |    3 +-
 arch/powerpc/boot/stdio.h                    |    5 +-
 arch/powerpc/include/asm/udbg.h              |    3 +-
 arch/s390/include/asm/debug.h                |   11 +--
 arch/um/include/shared/user.h                |    8 +-

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

* linux-next: build failure after merge of the akpm tree
@ 2011-09-28  9:22 Stephen Rothwell
  2011-09-28 15:51 ` Joe Perches
  2011-09-28 22:03 ` Andrew Morton
  0 siblings, 2 replies; 253+ messages in thread
From: Stephen Rothwell @ 2011-09-28  9:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Joe Perches, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from arch/powerpc/boot/stdio.c:12:0:
arch/powerpc/boot/stdio.h:10:17: error: expected declaration specifiers or '...' before numeric constant
arch/powerpc/boot/stdio.h:10:20: error: expected declaration specifiers or '...' before numeric constant
arch/powerpc/boot/stdio.h:10:8: warning: return type defaults to 'int'
arch/powerpc/boot/stdio.h:10:8: warning: function declaration isn't a prototype
arch/powerpc/boot/stdio.h: In function '__printf':
arch/powerpc/boot/stdio.h:14:17: error: expected declaration specifiers or '...' before numeric constant
arch/powerpc/boot/stdio.h:14:20: error: expected declaration specifiers or '...' before numeric constant
arch/powerpc/boot/stdio.h:14:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
arch/powerpc/boot/stdio.h:16:12: error: storage class specified for parameter 'vsprintf'

And went down hill from there (it produced hundreds of errors).

Caused by commit a52af697aaeb ("treewide: use __printf not __attribute__
((format(printf,...)))").  Maybe because some of these files are part of
the boot wrappers and are built (effectively) independently of the kernel
itself.  Notice that arch/powerpc/boot/stdio.h does not include any
kernel headers ...

I have reverted that commit (and the follup ones b31d03e43e56
"treewide-use-__printf-not-__attribute__formatprintf-checkpatch-fixes"
and f43c361e2bd9 "kernel.h/checkpatch: mark strict_strto<foo> and
simple_strto<foo> as obsolete") for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* linux-next: build failure after merge of the akpm tree
@ 2011-09-16  6:21 Stephen Rothwell
  0 siblings, 0 replies; 253+ messages in thread
From: Stephen Rothwell @ 2011-09-16  6:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Andrew Morton

Hi Andrew,

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

mm/memcontrol.c: In function 'mem_cgroup_force_empty':
mm/memcontrol.c:3761:15: error: 'rec' undeclared (first use in this function)
mm/memcontrol.c:3761:15: note: each undeclared identifier is reported only once for each function it appears in
mm/memcontrol.c:3761:7: error: too many arguments to function 'try_to_free_mem_cgroup_pages'
include/linux/swap.h:254:22: note: declared here

Presumably caused by my bad merge fixup.  I applied the further fix below.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 16 Sep 2011 16:17:52 +1000
Subject: [PATCH] akpm: merge fix up fix for memcg

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

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a505fc9..1faea9b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3758,7 +3758,7 @@ try_to_free:
 			goto out;
 		}
 		progress = try_to_free_mem_cgroup_pages(memcg, GFP_KERNEL,
-						false, &rec);
+						false);
 		if (!progress) {
 			nr_retries--;
 			/* maybe some writeback is necessary */
-- 
1.7.5.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-07-01 10:37       ` Stephen Rothwell
@ 2011-07-04  1:30         ` Cong Wang
  0 siblings, 0 replies; 253+ messages in thread
From: Cong Wang @ 2011-07-04  1:30 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel

于 2011年07月01日 18:37, Stephen Rothwell 写道:
> Hi,
>
> On Fri, 01 Jul 2011 18:10:30 +0800 Cong Wang<amwang@redhat.com>  wrote:
>>
>> 于 2011年07月01日 15:08, Stephen Rothwell 写道:
>>>
>>> On Fri, 01 Jul 2011 13:32:04 +0800 Cong Wang<amwang@redhat.com>   wrote:
>>>>
>>>> 于 2011年07月01日 13:19, Stephen Rothwell 写道:
>>>>>
>>>>> After merging the akpm tree, today's linux-next build (powerpc
>>>>> ppc64_defconfig) failed like this:
>>>>>
>>>>> arch/powerpc/kernel/rtas.c: In function 'rtas_restart':
>>>>> arch/powerpc/kernel/rtas.c:655:24: error: 'SYS_RESTART' undeclared (first use in this function)
>>>>> arch/powerpc/kernel/rtas.c: In function 'rtas_power_off':
>>>>> arch/powerpc/kernel/rtas.c:664:24: error: 'SYS_POWER_OFF' undeclared (first use in this function)
>>>>> arch/powerpc/kernel/rtas.c: In function 'rtas_halt':
>>>>> arch/powerpc/kernel/rtas.c:674:24: error: 'SYS_HALT' undeclared (first use in this function)
>>>>>
>>>>> Caused by commit ac050ff2a176 ("It is not necessary to share the same
>>>>> notifier.h").
>>>>
>>>> I think the following patch will fix this.
>>>
>>> Please find all the other files that need that include as well (there is
>>> at least one more).
>>>
>>
>> Ok, I will do a cross-compilation.
>
> Well, really any file that references any of those defines should be
> including linux/reboot.h, now - whether a compilation gets errors or
> not.  A change in CONFIG options or different platforms/architectures can
> change what file get implictly included.
>
> See Rule 1 in Documentation/SubmitChecklist.

Yeah, I did allyesconfig test on x86. Fortunately there are few
files that needs to be fixed since they include reboot.h implicitly.

Thanks.

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-07-01 10:10     ` Cong Wang
@ 2011-07-01 10:37       ` Stephen Rothwell
  2011-07-04  1:30         ` Cong Wang
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2011-07-01 10:37 UTC (permalink / raw)
  To: Cong Wang; +Cc: Andrew Morton, linux-next, linux-kernel

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

Hi,

On Fri, 01 Jul 2011 18:10:30 +0800 Cong Wang <amwang@redhat.com> wrote:
>
> 于 2011年07月01日 15:08, Stephen Rothwell 写道:
> >
> > On Fri, 01 Jul 2011 13:32:04 +0800 Cong Wang<amwang@redhat.com>  wrote:
> >>
> >> 于 2011年07月01日 13:19, Stephen Rothwell 写道:
> >>>
> >>> After merging the akpm tree, today's linux-next build (powerpc
> >>> ppc64_defconfig) failed like this:
> >>>
> >>> arch/powerpc/kernel/rtas.c: In function 'rtas_restart':
> >>> arch/powerpc/kernel/rtas.c:655:24: error: 'SYS_RESTART' undeclared (first use in this function)
> >>> arch/powerpc/kernel/rtas.c: In function 'rtas_power_off':
> >>> arch/powerpc/kernel/rtas.c:664:24: error: 'SYS_POWER_OFF' undeclared (first use in this function)
> >>> arch/powerpc/kernel/rtas.c: In function 'rtas_halt':
> >>> arch/powerpc/kernel/rtas.c:674:24: error: 'SYS_HALT' undeclared (first use in this function)
> >>>
> >>> Caused by commit ac050ff2a176 ("It is not necessary to share the same
> >>> notifier.h").
> >>
> >> I think the following patch will fix this.
> >
> > Please find all the other files that need that include as well (there is
> > at least one more).
> >
> 
> Ok, I will do a cross-compilation.

Well, really any file that references any of those defines should be
including linux/reboot.h, now - whether a compilation gets errors or
not.  A change in CONFIG options or different platforms/architectures can
change what file get implictly included.

See Rule 1 in Documentation/SubmitChecklist.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-07-01  7:08   ` Stephen Rothwell
@ 2011-07-01 10:10     ` Cong Wang
  2011-07-01 10:37       ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Cong Wang @ 2011-07-01 10:10 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel

于 2011年07月01日 15:08, Stephen Rothwell 写道:
> Hi,
>
> On Fri, 01 Jul 2011 13:32:04 +0800 Cong Wang<amwang@redhat.com>  wrote:
>>
>> 于 2011年07月01日 13:19, Stephen Rothwell 写道:
>>>
>>> After merging the akpm tree, today's linux-next build (powerpc
>>> ppc64_defconfig) failed like this:
>>>
>>> arch/powerpc/kernel/rtas.c: In function 'rtas_restart':
>>> arch/powerpc/kernel/rtas.c:655:24: error: 'SYS_RESTART' undeclared (first use in this function)
>>> arch/powerpc/kernel/rtas.c: In function 'rtas_power_off':
>>> arch/powerpc/kernel/rtas.c:664:24: error: 'SYS_POWER_OFF' undeclared (first use in this function)
>>> arch/powerpc/kernel/rtas.c: In function 'rtas_halt':
>>> arch/powerpc/kernel/rtas.c:674:24: error: 'SYS_HALT' undeclared (first use in this function)
>>>
>>> Caused by commit ac050ff2a176 ("It is not necessary to share the same
>>> notifier.h").
>>
>> I think the following patch will fix this.
>
> Please find all the other files that need that include as well (there is
> at least one more).
>

Ok, I will do a cross-compilation.

Thanks.

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-07-01  5:32 ` Cong Wang
@ 2011-07-01  7:08   ` Stephen Rothwell
  2011-07-01 10:10     ` Cong Wang
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2011-07-01  7:08 UTC (permalink / raw)
  To: Cong Wang; +Cc: Andrew Morton, linux-next, linux-kernel

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

Hi,

On Fri, 01 Jul 2011 13:32:04 +0800 Cong Wang <amwang@redhat.com> wrote:
>
> 于 2011年07月01日 13:19, Stephen Rothwell 写道:
> >
> > After merging the akpm tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > arch/powerpc/kernel/rtas.c: In function 'rtas_restart':
> > arch/powerpc/kernel/rtas.c:655:24: error: 'SYS_RESTART' undeclared (first use in this function)
> > arch/powerpc/kernel/rtas.c: In function 'rtas_power_off':
> > arch/powerpc/kernel/rtas.c:664:24: error: 'SYS_POWER_OFF' undeclared (first use in this function)
> > arch/powerpc/kernel/rtas.c: In function 'rtas_halt':
> > arch/powerpc/kernel/rtas.c:674:24: error: 'SYS_HALT' undeclared (first use in this function)
> >
> > Caused by commit ac050ff2a176 ("It is not necessary to share the same
> > notifier.h").
> 
> I think the following patch will fix this.

Please find all the other files that need that include as well (there is
at least one more).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the akpm tree
  2011-07-01  5:19 Stephen Rothwell
@ 2011-07-01  5:32 ` Cong Wang
  2011-07-01  7:08   ` Stephen Rothwell
  0 siblings, 1 reply; 253+ messages in thread
From: Cong Wang @ 2011-07-01  5:32 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel

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

于 2011年07月01日 13:19, Stephen Rothwell 写道:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> arch/powerpc/kernel/rtas.c: In function 'rtas_restart':
> arch/powerpc/kernel/rtas.c:655:24: error: 'SYS_RESTART' undeclared (first use in this function)
> arch/powerpc/kernel/rtas.c: In function 'rtas_power_off':
> arch/powerpc/kernel/rtas.c:664:24: error: 'SYS_POWER_OFF' undeclared (first use in this function)
> arch/powerpc/kernel/rtas.c: In function 'rtas_halt':
> arch/powerpc/kernel/rtas.c:674:24: error: 'SYS_HALT' undeclared (first use in this function)
>
> Caused by commit ac050ff2a176 ("It is not necessary to share the same
> notifier.h").

I think the following patch will fix this.

Thanks.

---

Signed-off-by: WANG Cong <amwang@redhat.com>

[-- Attachment #2: patch.diff --]
[-- Type: text/plain, Size: 340 bytes --]

diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 271ff63..0e0ea94 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -24,6 +24,7 @@
 #include <linux/cpumask.h>
 #include <linux/memblock.h>
 #include <linux/slab.h>
+#include <linux/reboot.h>
 
 #include <asm/prom.h>
 #include <asm/rtas.h>

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

* linux-next: build failure after merge of the akpm tree
@ 2011-07-01  5:19 Stephen Rothwell
  2011-07-01  5:32 ` Cong Wang
  0 siblings, 1 reply; 253+ messages in thread
From: Stephen Rothwell @ 2011-07-01  5:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Amerigo Wang

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

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/kernel/rtas.c: In function 'rtas_restart':
arch/powerpc/kernel/rtas.c:655:24: error: 'SYS_RESTART' undeclared (first use in this function)
arch/powerpc/kernel/rtas.c: In function 'rtas_power_off':
arch/powerpc/kernel/rtas.c:664:24: error: 'SYS_POWER_OFF' undeclared (first use in this function)
arch/powerpc/kernel/rtas.c: In function 'rtas_halt':
arch/powerpc/kernel/rtas.c:674:24: error: 'SYS_HALT' undeclared (first use in this function)

Caused by commit ac050ff2a176 ("It is not necessary to share the same
notifier.h").

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

end of thread, other threads:[~2021-06-18  8:24 UTC | newest]

Thread overview: 253+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 12:17 linux-next: build failure after merge of the akpm tree Stephen Rothwell
2020-05-25 18:18 ` John Hubbard
2020-05-25 22:17   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2021-06-17  9:32 Stephen Rothwell
2021-06-17 12:15 ` Muneendra Kumar M
2021-06-16 13:07 Stephen Rothwell
2021-06-18  8:24 ` Stephen Rothwell
2020-12-21  5:16 Stephen Rothwell
2020-12-10  9:33 Stephen Rothwell
2020-12-03  8:52 Stephen Rothwell
2020-12-03 12:48 ` Andrey Konovalov
2020-11-13  7:02 Stephen Rothwell
2020-11-14  1:14 ` Andrew Morton
2020-11-15  9:01   ` Mike Rapoport
2020-11-16  6:17     ` Stephen Rothwell
2020-11-11  6:20 Stephen Rothwell
2020-09-28 11:25 Stephen Rothwell
2020-09-28 11:29 ` Christoph Hellwig
2020-09-08 10:45 Stephen Rothwell
2020-06-04  6:44 Stephen Rothwell
2020-06-04  8:24 ` Stephen Rothwell
2020-06-02  9:57 Stephen Rothwell
2020-06-02 19:12 ` Andrew Morton
2020-05-28 10:19 Stephen Rothwell
2020-05-28 13:15 ` Christoph Hellwig
2020-04-22  6:39 Stephen Rothwell
2020-04-22 18:33 ` Haren Myneni
2020-03-02  4:23 Stephen Rothwell
2020-02-27  4:11 Stephen Rothwell
2020-02-27  5:20 ` Arjun Roy
2020-02-27  9:02 ` Geert Uytterhoeven
2020-02-27 17:13   ` Arjun Roy
2020-02-27 17:44     ` Arjun Roy
2020-02-27 17:57       ` Geert Uytterhoeven
2020-02-27 18:50         ` Arjun Roy
2020-02-27 21:28           ` Stephen Rothwell
2020-02-28  0:34             ` Arjun Roy
2020-02-28  0:59               ` Stephen Rothwell
2020-02-27 21:27         ` Stephen Rothwell
2020-02-17  3:57 Stephen Rothwell
2020-02-17  4:12 ` Arjun Roy
2020-02-17  6:45   ` Arjun Roy
2020-02-20 23:18     ` Stephen Rothwell
2020-02-20 23:22       ` Arjun Roy
2020-02-20 23:43         ` Stephen Rothwell
2020-02-20 23:44           ` Arjun Roy
2020-02-20 23:59             ` Stephen Rothwell
2020-02-21 21:29               ` Arjun Roy
2020-02-26  4:02 ` Stephen Rothwell
2020-02-26  4:25   ` Arjun Roy
2020-01-22  7:05 Stephen Rothwell
2019-02-26  7:39 Stephen Rothwell
2019-02-26  8:16 ` Mike Rapoport
2018-12-03  7:00 Stephen Rothwell
2018-12-03 10:37 ` Anshuman Khandual
2018-12-12 17:05 ` Anshuman Khandual
2018-12-12 20:44   ` Stephen Rothwell
2018-11-30  5:30 Stephen Rothwell
2018-11-30 10:27 ` Anshuman Khandual
2018-10-08  8:03 Stephen Rothwell
2018-10-15  7:14 ` Stephen Rothwell
2018-10-16  7:46   ` Ingo Molnar
2018-10-05  6:14 Stephen Rothwell
2018-10-05 12:02 ` Michael Ellerman
2018-10-05 12:46   ` Stephen Rothwell
2018-10-06 12:10     ` Michael Ellerman
2018-10-02  8:53 Stephen Rothwell
2018-03-21  8:17 Stephen Rothwell
2018-03-21 10:02 ` Greg Kroah-Hartman
2018-03-21 10:38   ` Stephen Rothwell
2017-11-06  6:55 Stephen Rothwell
2017-08-01  6:25 Stephen Rothwell
2017-08-01 18:40 ` Kees Cook
2017-08-01 20:44   ` Arnd Bergmann
2017-06-30  6:32 Stephen Rothwell
2017-07-03  8:14 ` Stephen Rothwell
2017-07-03  8:57 ` David Miller
2017-06-26  6:53 Stephen Rothwell
2017-06-26  7:13 ` Michal Hocko
2017-06-26 21:48   ` Stephen Rothwell
2017-04-20  6:18 Stephen Rothwell
2017-04-18  8:09 Stephen Rothwell
2017-04-10  7:51 Stephen Rothwell
2017-03-20  5:37 Stephen Rothwell
2017-03-20 13:07 ` Michal Hocko
2017-03-20 13:22   ` Jaegeuk Kim
2017-03-07  3:07 Stephen Rothwell
2017-03-07  3:55 ` Laura Abbott
2017-03-07  2:38 Stephen Rothwell
2017-01-09  4:09 Stephen Rothwell
2015-12-31 12:22 Stephen Rothwell
2016-01-14  4:15 ` Stephen Rothwell
2016-01-15 21:05   ` Andrew Morton
2016-01-15 23:00     ` Stephen Rothwell
2016-01-15 23:14       ` Andrew Morton
2016-01-16  8:51         ` Takashi Iwai
2016-01-20 14:09           ` Takashi Iwai
2016-01-20 20:38             ` Stephen Rothwell
2016-01-22  0:24               ` Stephen Rothwell
2016-01-22  2:40                 ` Stephen Rothwell
2016-01-25  9:29                   ` Takashi Iwai
2016-01-25  9:40                     ` Michael Ellerman
2016-01-25 10:19                       ` Takashi Iwai
2016-01-25 10:41                     ` Vinod Koul
2016-01-25 10:42                       ` Takashi Iwai
2016-01-25 10:45                     ` Sudip Mukherjee
2016-01-25 11:03                       ` Takashi Iwai
2016-01-25 11:18                         ` Sudip Mukherjee
2016-01-25 11:41                     ` Mark Brown
2016-01-25 13:10                       ` Takashi Iwai
2016-01-25 13:45                         ` Takashi Iwai
2016-01-25 13:55                           ` Mark Brown
2016-01-26 12:47                             ` Vinod Koul
2016-01-25 14:02                           ` Sudip Mukherjee
2016-01-26 12:26                           ` Vinod Koul
2016-01-26 20:51                           ` Stephen Rothwell
2016-01-26 21:22                             ` Takashi Iwai
2016-01-22  3:03                 ` Stephen Rothwell
2015-11-01 16:29 Stephen Rothwell
2015-10-06  7:03 Stephen Rothwell
2015-09-08  4:53 Stephen Rothwell
2015-07-14  5:19 Stephen Rothwell
2015-06-25  8:00 Stephen Rothwell
2015-06-20 14:31 Stephen Rothwell
2014-11-06  8:36 Stephen Rothwell
2014-11-06 11:24 ` Thierry Reding
2014-11-06 11:30   ` Thierry Reding
2014-11-09 23:55   ` Stephen Rothwell
2014-08-26  7:18 Stephen Rothwell
2014-08-26 13:54 ` Don Zickus
2014-08-26 21:37   ` Stephen Rothwell
2014-07-16  8:26 Stephen Rothwell
2014-07-16  8:54 ` Michal Hocko
2014-03-06  8:22 Stephen Rothwell
2014-03-06 21:48 ` Andrew Morton
2014-03-07  0:57   ` Stephen Rothwell
2014-03-07  1:38     ` Andrew Morton
2014-03-07 17:05       ` Christoph Lameter
2014-03-07 21:08         ` Andrew Morton
2014-03-07 17:02 ` Christoph Lameter
2014-03-06  7:54 Stephen Rothwell
2013-09-25  1:06 Stephen Rothwell
2013-09-25  1:21 ` Timur Tabi
2013-09-25 20:26 ` Andrew Morton
2013-09-25 21:32   ` Hugh Dickins
2013-09-25 21:43     ` Andrew Morton
2013-10-02  8:53       ` Frederic Weisbecker
2013-07-16  5:18 Stephen Rothwell
2013-06-07  6:28 Stephen Rothwell
2013-06-07  7:26 ` Peng Tao
2013-06-07  7:52   ` Stephen Rothwell
2013-06-07  8:11     ` Peng Tao
2013-06-04  6:55 Stephen Rothwell
2013-05-27  6:39 Stephen Rothwell
2013-04-04  6:44 Stephen Rothwell
2013-03-27  4:43 Stephen Rothwell
2013-03-01  4:31 Stephen Rothwell
2013-02-28  1:15 Stephen Rothwell
2013-02-20  6:28 Stephen Rothwell
2013-02-11  7:13 Stephen Rothwell
2013-02-11 12:04 ` Amir Vadai
2013-02-06  6:59 Stephen Rothwell
2013-02-04  7:17 Stephen Rothwell
2012-12-18  2:29 Stephen Rothwell
2012-12-18 10:10 ` Mel Gorman
2012-12-10  8:58 Stephen Rothwell
2012-12-10  8:54 Stephen Rothwell
2012-12-10 10:43 ` Ingo Molnar
2012-11-09  3:39 Stephen Rothwell
2012-10-23  3:42 Stephen Rothwell
2012-10-23  4:21 ` Joe Perches
2012-10-23 19:44 ` Andrew Morton
2012-10-23 19:51   ` Joe Perches
2012-10-23 20:02     ` Andrew Morton
2012-10-24 19:19       ` Joe Perches
2012-10-24 19:38         ` Andrew Morton
2012-10-23  3:35 Stephen Rothwell
2012-09-28  6:30 Stephen Rothwell
2012-09-28 15:19 ` Mikulas Patocka
2012-10-01 19:56   ` Andrew Morton
2012-09-27  7:43 Stephen Rothwell
2012-09-26  6:01 Stephen Rothwell
2012-09-26 20:15 ` Kees Cook
2012-09-26 20:33   ` Andrew Morton
2012-09-26 20:42     ` Kees Cook
2012-09-26 20:47       ` Andrew Morton
2012-09-27  7:26     ` Stephen Rothwell
2012-09-24 14:02 Stephen Rothwell
     [not found] ` <20120925000217.947b8cd8dca6979bfedee2ca-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2012-09-24 19:36   ` Roland Dreier
2012-09-24 19:46     ` Andrew Morton
2012-09-25  8:27     ` Jack Morgenstein
2012-09-21  6:26 Stephen Rothwell
2012-09-21  9:02 ` Denys Vlasenko
2012-09-21  6:08 Stephen Rothwell
2012-09-13  7:44 Stephen Rothwell
2012-09-13  7:49 ` Sachin Kamat
2012-09-13  8:31   ` Stephen Rothwell
2012-09-13  7:56 ` Andrew Morton
2012-09-13  8:31   ` Stephen Rothwell
2012-09-13 23:07     ` Stephen Rothwell
2012-09-13  8:46 ` Zhang Rui
2012-09-13 12:30   ` Stephen Rothwell
2012-08-06  3:43 Stephen Rothwell
2012-08-06  5:01 ` Michel Lespinasse
2012-08-06  5:04   ` Michel Lespinasse
2012-08-06  9:46     ` Steven Whitehouse
2012-07-31  4:40 Stephen Rothwell
2012-07-31  5:45 ` Michel Lespinasse
2012-07-31  6:31   ` Stephen Rothwell
2012-07-31 10:34 ` Michel Lespinasse
2012-06-25  6:41 Stephen Rothwell
2012-06-25 16:40 ` Kees Cook
2012-06-25 22:59   ` Stephen Rothwell
2012-04-27  5:38 Stephen Rothwell
2012-02-28  5:58 Stephen Rothwell
2012-02-28 12:00 ` Mark Brown
2012-02-28 22:08   ` Andrew Morton
2012-02-29 10:13     ` Mark Brown
2012-02-27  6:21 Stephen Rothwell
2012-02-27  6:31 ` H. Peter Anvin
2012-02-22  5:08 Stephen Rothwell
2012-02-17  5:21 Stephen Rothwell
2012-01-05  7:29 Stephen Rothwell
2012-01-05 23:52 ` Andrew Morton
2012-01-06  5:05   ` Greg KH
2012-01-06  7:22   ` Mike Galbraith
2012-01-05  7:29 Stephen Rothwell
2012-01-05 23:19 ` Greg KH
2012-01-05 23:45   ` Andrew Morton
2012-01-06  5:04     ` Greg KH
2011-12-16  5:39 Stephen Rothwell
2011-12-16 22:00 ` Andrew Morton
2011-12-17 17:49   ` Alexey Dobriyan
2011-12-18 22:43   ` Stephen Rothwell
2011-12-09  5:08 Stephen Rothwell
2011-12-09  5:47 ` Andrew Morton
2011-12-12  4:26   ` Stephen Rothwell
2011-12-12  4:41     ` Stephen Rothwell
2011-11-01  8:57 Stephen Rothwell
2011-10-05  8:07 Stephen Rothwell
2011-09-30  5:32 Stephen Rothwell
2011-09-30  6:02 ` Andrew Morton
2011-10-04  7:44   ` Stephen Rothwell
2011-09-28  9:22 Stephen Rothwell
2011-09-28 15:51 ` Joe Perches
2011-09-28 22:03 ` Andrew Morton
2011-09-16  6:21 Stephen Rothwell
2011-07-01  5:19 Stephen Rothwell
2011-07-01  5:32 ` Cong Wang
2011-07-01  7:08   ` Stephen Rothwell
2011-07-01 10:10     ` Cong Wang
2011-07-01 10:37       ` Stephen Rothwell
2011-07-04  1:30         ` Cong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).