* [PATCH] SUNRPC: Add missing asm/cacheflush.h
@ 2020-06-14 17:07 Christophe Leroy
2020-06-14 18:57 ` Chuck Lever
0 siblings, 1 reply; 3+ messages in thread
From: Christophe Leroy @ 2020-06-14 17:07 UTC (permalink / raw)
To: Chuck Lever, J. Bruce Fields, Trond Myklebust, Anna Schumaker,
David S. Miller, Jakub Kicinski
Cc: linux-kernel, linuxppc-dev, linux-nfs, netdev
Even if that's only a warning, not including asm/cacheflush.h
leads to svc_flush_bvec() being empty allthough powerpc defines
ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE.
CC net/sunrpc/svcsock.o
net/sunrpc/svcsock.c:227:5: warning: "ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE" is not defined [-Wundef]
#if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
^
Fixes: ca07eda33e01 ("SUNRPC: Refactor svc_recvfrom()")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
I detected this on linux-next on June 4th and warned Chuck. Seems like it went into mainline anyway.
net/sunrpc/svcsock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 5c4ec9386f81..d9e99cb09aab 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -45,6 +45,7 @@
#include <net/tcp_states.h>
#include <linux/uaccess.h>
#include <asm/ioctls.h>
+#include <asm/cacheflush.h>
#include <linux/sunrpc/types.h>
#include <linux/sunrpc/clnt.h>
--
2.25.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] SUNRPC: Add missing asm/cacheflush.h
2020-06-14 17:07 [PATCH] SUNRPC: Add missing asm/cacheflush.h Christophe Leroy
@ 2020-06-14 18:57 ` Chuck Lever
2020-06-15 6:16 ` Christophe Leroy
0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2020-06-14 18:57 UTC (permalink / raw)
To: Christophe Leroy
Cc: Bruce Fields, Trond Myklebust, Anna Schumaker, David S. Miller,
Jakub Kicinski, Linux Kernel Mailing List, linuxppc-dev,
Linux NFS Mailing List, netdev
Hi Christophe -
> On Jun 14, 2020, at 1:07 PM, Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>
> Even if that's only a warning, not including asm/cacheflush.h
> leads to svc_flush_bvec() being empty allthough powerpc defines
> ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE.
>
> CC net/sunrpc/svcsock.o
> net/sunrpc/svcsock.c:227:5: warning: "ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE" is not defined [-Wundef]
> #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
> ^
>
> Fixes: ca07eda33e01 ("SUNRPC: Refactor svc_recvfrom()")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> I detected this on linux-next on June 4th and warned Chuck. Seems like it went into mainline anyway.
Thanks for your patch. I've searched my mailbox. It appears I never
received your June 4th e-mail.
Does your patch also address:
https://marc.info/?l=linux-kernel&m=159194369128024&w=2 ?
If so, then
Reported-by: kernel test robot <lkp@intel.com>
should be added to the patch description.
Ideally, compilation on x86_64 should have thrown the same warning,
but it didn't. Why would the x86_64 build behave differently than
ppc64 or i386?
> net/sunrpc/svcsock.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
> index 5c4ec9386f81..d9e99cb09aab 100644
> --- a/net/sunrpc/svcsock.c
> +++ b/net/sunrpc/svcsock.c
> @@ -45,6 +45,7 @@
> #include <net/tcp_states.h>
> #include <linux/uaccess.h>
> #include <asm/ioctls.h>
> +#include <asm/cacheflush.h>
Nit: Let's include <linux/highmem.h> in net/sunrpc/svcsock.h instead
of <asm/cacheflush.h> directly.
> #include <linux/sunrpc/types.h>
> #include <linux/sunrpc/clnt.h>
> --
> 2.25.0
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SUNRPC: Add missing asm/cacheflush.h
2020-06-14 18:57 ` Chuck Lever
@ 2020-06-15 6:16 ` Christophe Leroy
0 siblings, 0 replies; 3+ messages in thread
From: Christophe Leroy @ 2020-06-15 6:16 UTC (permalink / raw)
To: Chuck Lever
Cc: Bruce Fields, Trond Myklebust, Anna Schumaker, David S. Miller,
Jakub Kicinski, Linux Kernel Mailing List, linuxppc-dev,
Linux NFS Mailing List, netdev
Le 14/06/2020 à 20:57, Chuck Lever a écrit :
> Hi Christophe -
>
>> On Jun 14, 2020, at 1:07 PM, Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>>
>> Even if that's only a warning, not including asm/cacheflush.h
>> leads to svc_flush_bvec() being empty allthough powerpc defines
>> ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE.
>>
>> CC net/sunrpc/svcsock.o
>> net/sunrpc/svcsock.c:227:5: warning: "ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE" is not defined [-Wundef]
>> #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
>> ^
>>
>> Fixes: ca07eda33e01 ("SUNRPC: Refactor svc_recvfrom()")
>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>> ---
>> I detected this on linux-next on June 4th and warned Chuck. Seems like it went into mainline anyway.
>
> Thanks for your patch. I've searched my mailbox. It appears I never
> received your June 4th e-mail.
It is there:
https://lore.kernel.org/linuxppc-dev/868915eb-8fed-0600-ea5d-31ae874457b1@csgroup.eu/
>
> Does your patch also address:
>
> https://marc.info/?l=linux-kernel&m=159194369128024&w=2 ?
I guess it does, yes.
>
> If so, then
>
> Reported-by: kernel test robot <lkp@intel.com>
>
> should be added to the patch description.
>
> Ideally, compilation on x86_64 should have thrown the same warning,
> but it didn't. Why would the x86_64 build behave differently than
> ppc64 or i386?
I think it depends whether you have selected CONFIG_BLOCK or not.
In my embedded config, CONFIG_BLOCK isn't selected.
When CONFIG_BLOCK is selected, there is the following inclusion chain:
CC net/sunrpc/svcsock.o
In file included from ./include/linux/highmem.h:12:0,
from ./include/linux/pagemap.h:11,
from ./include/linux/blkdev.h:16,
from ./include/linux/blk-cgroup.h:23,
from ./include/linux/writeback.h:14,
from ./include/linux/memcontrol.h:22,
from ./include/net/sock.h:53,
from ./include/net/inet_sock.h:22,
from ./include/linux/udp.h:16,
from net/sunrpc/svcsock.c:31:
./arch/powerpc/include/asm/cacheflush.h:26:2: warning: #warning Coucous
[-Wcpp]
#warning test
But linux/blkdev.h includes linux/pagemap.h only when CONFIG_BLOCK is
defined.
>
>
>> net/sunrpc/svcsock.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
>> index 5c4ec9386f81..d9e99cb09aab 100644
>> --- a/net/sunrpc/svcsock.c
>> +++ b/net/sunrpc/svcsock.c
>> @@ -45,6 +45,7 @@
>> #include <net/tcp_states.h>
>> #include <linux/uaccess.h>
>> #include <asm/ioctls.h>
>> +#include <asm/cacheflush.h>
>
> Nit: Let's include <linux/highmem.h> in net/sunrpc/svcsock.h instead
> of <asm/cacheflush.h> directly.
Ok, I'll post v2.
>
>
>> #include <linux/sunrpc/types.h>
>> #include <linux/sunrpc/clnt.h>
>> --
>> 2.25.0
>>
>
> --
> Chuck Lever
>
>
>
Christophe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-15 6:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 17:07 [PATCH] SUNRPC: Add missing asm/cacheflush.h Christophe Leroy
2020-06-14 18:57 ` Chuck Lever
2020-06-15 6:16 ` Christophe Leroy
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).