Re: [PATCH v2] fs/dax: include to fix build error on ARC
On Thu, Dec 31, 2020 at 08:29:14PM -0800, Randy Dunlap wrote: > fs/dax.c uses copy_user_page() but ARC does not provide that interface, > resulting in a build error. > > Provide copy_user_page() in (beside copy_page()) and > add to fs/dax.c to fix the build error. > > ../fs/dax.c: In function 'copy_cow_page_dax': > ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; > did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration] > > Fixes: cccbce671582 ("filesystem-dax: convert to dax_direct_access()") > Reported-by: kernel test robot > Signed-off-by: Randy Dunlap Looks reasonable Reviewed-by: Ira Weiny > Cc: Vineet Gupta > Cc: linux-snps-arc@lists.infradead.org > Cc: Dan Williams > Acked-by: Vineet Gupta > Cc: Andrew Morton > Cc: Matthew Wilcox > Cc: Jan Kara > Cc: linux-fsde...@vger.kernel.org > Cc: linux-nvd...@lists.01.org > --- > v2: rebase, add more Cc: > > arch/arc/include/asm/page.h |1 + > fs/dax.c|1 + > 2 files changed, 2 insertions(+) > > --- lnx-511-rc1.orig/fs/dax.c > +++ lnx-511-rc1/fs/dax.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #include > > #define CREATE_TRACE_POINTS > --- lnx-511-rc1.orig/arch/arc/include/asm/page.h > +++ lnx-511-rc1/arch/arc/include/asm/page.h > @@ -10,6 +10,7 @@ > #ifndef __ASSEMBLY__ > > #define clear_page(paddr)memset((paddr), 0, PAGE_SIZE) > +#define copy_user_page(to, from, vaddr, pg) copy_page(to, from) > #define copy_page(to, from) memcpy((to), (from), PAGE_SIZE) > > struct vm_area_struct; > ___ > Linux-nvdimm mailing list -- linux-nvd...@lists.01.org > To unsubscribe send an email to linux-nvdimm-le...@lists.01.org ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v2] fs/dax: include to fix build error on ARC
On Thu, Dec 31, 2020 at 8:29 PM Randy Dunlap wrote: > > fs/dax.c uses copy_user_page() but ARC does not provide that interface, > resulting in a build error. > > Provide copy_user_page() in (beside copy_page()) and > add to fs/dax.c to fix the build error. > > ../fs/dax.c: In function 'copy_cow_page_dax': > ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; > did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration] > > Fixes: cccbce671582 ("filesystem-dax: convert to dax_direct_access()") > Reported-by: kernel test robot > Signed-off-by: Randy Dunlap > Cc: Vineet Gupta > Cc: linux-snps-arc@lists.infradead.org > Cc: Dan Williams > Acked-by: Vineet Gupta > Cc: Andrew Morton > Cc: Matthew Wilcox > Cc: Jan Kara > Cc: linux-fsde...@vger.kernel.org > Cc: linux-nvd...@lists.01.org > --- > v2: rebase, add more Cc: > > arch/arc/include/asm/page.h |1 + > fs/dax.c|1 + > 2 files changed, 2 insertions(+) > > --- lnx-511-rc1.orig/fs/dax.c > +++ lnx-511-rc1/fs/dax.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include I would expect this to come from one of the linux/ includes like linux/mm.h. asm/ headers are implementation linux/ headers are api. Once you drop that then the subject of this patch can just be "arc: add a copy_user_page() implementation", and handled by the arc maintainer (or I can take it with Vineet's ack). > #include Yes, this one should have a linux/ api header to front it, but that's a cleanup for another day. > > #define CREATE_TRACE_POINTS > --- lnx-511-rc1.orig/arch/arc/include/asm/page.h > +++ lnx-511-rc1/arch/arc/include/asm/page.h > @@ -10,6 +10,7 @@ > #ifndef __ASSEMBLY__ > > #define clear_page(paddr) memset((paddr), 0, PAGE_SIZE) > +#define copy_user_page(to, from, vaddr, pg)copy_page(to, from) > #define copy_page(to, from)memcpy((to), (from), PAGE_SIZE) > > struct vm_area_struct; ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v2] fs/dax: include to fix build error on ARC
On Mon, Jan 04, 2021 at 12:13:02PM -0800, Dan Williams wrote: > On Thu, Dec 31, 2020 at 8:29 PM Randy Dunlap wrote: > > +++ lnx-511-rc1/fs/dax.c > > @@ -25,6 +25,7 @@ > > #include > > #include > > #include > > +#include > > I would expect this to come from one of the linux/ includes like > linux/mm.h. asm/ headers are implementation linux/ headers are api. It does indeed come from linux/mm.h already. And a number of other random places, including linux/serial.h. Our headers are a mess, but they shouldn't be made worse by adding _this_ include. So I second Dan's objection here. > Once you drop that then the subject of this patch can just be "arc: > add a copy_user_page() implementation", and handled by the arc > maintainer (or I can take it with Vineet's ack). > > > #include > > Yes, this one should have a linux/ api header to front it, but that's > a cleanup for another day. Definitely more involved. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH AUTOSEL 5.10 13/17] local64.h: make mandatory
From: Randy Dunlap [ Upstream commit 87dbc209ea04645fd2351981f09eff5d23f8e2e9 ] Make mandatory in include/asm-generic/Kbuild and remove all arch/*/include/asm/local64.h arch-specific files since they only #include . This fixes build errors on arch/c6x/ and arch/nios2/ for block/blk-iocost.c. Build-tested on 21 of 25 arch-es. (tools problems on the others) Yes, we could even rename to and change all #includes to use instead. Link: https://lkml.kernel.org/r/20201227024446.17018-1-rdun...@infradead.org Signed-off-by: Randy Dunlap Suggested-by: Christoph Hellwig Reviewed-by: Masahiro Yamada Cc: Jens Axboe Cc: Ley Foon Tan Cc: Mark Salter Cc: Aurelien Jacquiot Cc: Peter Zijlstra Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- arch/alpha/include/asm/local64.h | 1 - arch/arc/include/asm/Kbuild| 1 - arch/arm/include/asm/Kbuild| 1 - arch/arm64/include/asm/Kbuild | 1 - arch/csky/include/asm/Kbuild | 1 - arch/h8300/include/asm/Kbuild | 1 - arch/hexagon/include/asm/Kbuild| 1 - arch/ia64/include/asm/local64.h| 1 - arch/m68k/include/asm/Kbuild | 1 - arch/microblaze/include/asm/Kbuild | 1 - arch/mips/include/asm/Kbuild | 1 - arch/nds32/include/asm/Kbuild | 1 - arch/parisc/include/asm/Kbuild | 1 - arch/powerpc/include/asm/Kbuild| 1 - arch/riscv/include/asm/Kbuild | 1 - arch/s390/include/asm/Kbuild | 1 - arch/sh/include/asm/Kbuild | 1 - arch/sparc/include/asm/Kbuild | 1 - arch/x86/include/asm/local64.h | 1 - arch/xtensa/include/asm/Kbuild | 1 - include/asm-generic/Kbuild | 1 + 21 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 arch/alpha/include/asm/local64.h delete mode 100644 arch/ia64/include/asm/local64.h delete mode 100644 arch/x86/include/asm/local64.h diff --git a/arch/alpha/include/asm/local64.h b/arch/alpha/include/asm/local64.h deleted file mode 100644 index 36c93b5cc239b..0 --- a/arch/alpha/include/asm/local64.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/arc/include/asm/Kbuild b/arch/arc/include/asm/Kbuild index 81f4edec0c2a9..3c1afa524b9c2 100644 --- a/arch/arc/include/asm/Kbuild +++ b/arch/arc/include/asm/Kbuild @@ -1,7 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 generic-y += extable.h generic-y += kvm_para.h -generic-y += local64.h generic-y += mcs_spinlock.h generic-y += parport.h generic-y += user.h diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 383635b68763c..f1398b9267c08 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild @@ -2,7 +2,6 @@ generic-y += early_ioremap.h generic-y += extable.h generic-y += flat.h -generic-y += local64.h generic-y += parport.h generic-y += seccomp.h diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index ff9cbb6312128..07ac208edc894 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild @@ -1,6 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 generic-y += early_ioremap.h -generic-y += local64.h generic-y += mcs_spinlock.h generic-y += qrwlock.h generic-y += qspinlock.h diff --git a/arch/csky/include/asm/Kbuild b/arch/csky/include/asm/Kbuild index 64876e59e2ef9..2a5a4d94fafad 100644 --- a/arch/csky/include/asm/Kbuild +++ b/arch/csky/include/asm/Kbuild @@ -2,7 +2,6 @@ generic-y += asm-offsets.h generic-y += gpio.h generic-y += kvm_para.h -generic-y += local64.h generic-y += qrwlock.h generic-y += seccomp.h generic-y += user.h diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index ddf04f32b5467..60ee7f0d60a8f 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild @@ -2,7 +2,6 @@ generic-y += asm-offsets.h generic-y += extable.h generic-y += kvm_para.h -generic-y += local64.h generic-y += mcs_spinlock.h generic-y += parport.h generic-y += spinlock.h diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 373964bb177e4..3ece3c93fe086 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild @@ -2,5 +2,4 @@ generic-y += extable.h generic-y += iomap.h generic-y += kvm_para.h -generic-y += local64.h generic-y += mcs_spinlock.h diff --git a/arch/ia64/include/asm/local64.h b/arch/ia64/include/asm/local64.h deleted file mode 100644 index 36c93b5cc239b..0 --- a/arch/ia64/include/asm/local64.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 1bff55aa2d54e..0dbf9c5c6faeb 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -2,6 +2,5 @@ generated-y += syscall_table.h generic-y += extable.h generic-y += kvm_para.h -generic-y += local64.h generic-y += mcs_spinlock.h generic-y += spinlock.h diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index 63bce836b9f10..29b
Re: [PATCH v2] fs/dax: include to fix build error on ARC
On 1/4/21 12:13 PM, Dan Williams wrote: > On Thu, Dec 31, 2020 at 8:29 PM Randy Dunlap wrote: >> >> fs/dax.c uses copy_user_page() but ARC does not provide that interface, >> resulting in a build error. >> >> Provide copy_user_page() in (beside copy_page()) and >> add to fs/dax.c to fix the build error. >> >> ../fs/dax.c: In function 'copy_cow_page_dax': >> ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; >> did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration] >> >> Fixes: cccbce671582 ("filesystem-dax: convert to dax_direct_access()") >> Reported-by: kernel test robot >> Signed-off-by: Randy Dunlap >> Cc: Vineet Gupta >> Cc: linux-snps-arc@lists.infradead.org >> Cc: Dan Williams >> Acked-by: Vineet Gupta >> Cc: Andrew Morton >> Cc: Matthew Wilcox >> Cc: Jan Kara >> Cc: linux-fsde...@vger.kernel.org >> Cc: linux-nvd...@lists.01.org >> --- >> v2: rebase, add more Cc: >> >> arch/arc/include/asm/page.h |1 + >> fs/dax.c|1 + >> 2 files changed, 2 insertions(+) >> >> --- lnx-511-rc1.orig/fs/dax.c >> +++ lnx-511-rc1/fs/dax.c >> @@ -25,6 +25,7 @@ >> #include >> #include >> #include >> +#include > > I would expect this to come from one of the linux/ includes like > linux/mm.h. asm/ headers are implementation linux/ headers are api. > > Once you drop that then the subject of this patch can just be "arc: > add a copy_user_page() implementation", and handled by the arc > maintainer (or I can take it with Vineet's ack). Got it. Thanks. Vineet is copied. I expect that he will take the v3 patch. >> #include > > Yes, this one should have a linux/ api header to front it, but that's > a cleanup for another day. That line is only part of the contextual diff in this patch. I guess you are just commenting in general, along with your earlier paragraph. >> >> #define CREATE_TRACE_POINTS >> --- lnx-511-rc1.orig/arch/arc/include/asm/page.h >> +++ lnx-511-rc1/arch/arc/include/asm/page.h >> @@ -10,6 +10,7 @@ >> #ifndef __ASSEMBLY__ >> >> #define clear_page(paddr) memset((paddr), 0, PAGE_SIZE) >> +#define copy_user_page(to, from, vaddr, pg)copy_page(to, from) >> #define copy_page(to, from)memcpy((to), (from), PAGE_SIZE) >> >> struct vm_area_struct; -- ~Randy ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH v3] arch/arc: add copy_user_page() to to fix build error on ARC
fs/dax.c uses copy_user_page() but ARC does not provide that interface, resulting in a build error. Provide copy_user_page() in . ../fs/dax.c: In function 'copy_cow_page_dax': ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration] Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Cc: Dan Williams #Acked-by: Vineet Gupta # v1 Cc: Andrew Morton Cc: Matthew Wilcox Cc: Jan Kara Cc: linux-fsde...@vger.kernel.org Cc: linux-nvd...@lists.01.org #Reviewed-by: Ira Weiny # v2 --- v2: rebase, add more Cc: v3: add copy_user_page() to arch/arc/include/asm/page.h arch/arc/include/asm/page.h |1 + --- lnx-511-rc1.orig/arch/arc/include/asm/page.h +++ lnx-511-rc1/arch/arc/include/asm/page.h @@ -10,6 +10,7 @@ #ifndef __ASSEMBLY__ #define clear_page(paddr) memset((paddr), 0, PAGE_SIZE) +#define copy_user_page(to, from, vaddr, pg)copy_page(to, from) #define copy_page(to, from)memcpy((to), (from), PAGE_SIZE) struct vm_area_struct; ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v2] fs/dax: include to fix build error on ARC
On Mon, Jan 4, 2021 at 7:47 PM Randy Dunlap wrote: > > On 1/4/21 12:13 PM, Dan Williams wrote: > > On Thu, Dec 31, 2020 at 8:29 PM Randy Dunlap wrote: > >> > >> fs/dax.c uses copy_user_page() but ARC does not provide that interface, > >> resulting in a build error. > >> > >> Provide copy_user_page() in (beside copy_page()) and > >> add to fs/dax.c to fix the build error. > >> > >> ../fs/dax.c: In function 'copy_cow_page_dax': > >> ../fs/dax.c:702:2: error: implicit declaration of function > >> 'copy_user_page'; did you mean 'copy_to_user_page'? > >> [-Werror=implicit-function-declaration] > >> > >> Fixes: cccbce671582 ("filesystem-dax: convert to dax_direct_access()") > >> Reported-by: kernel test robot > >> Signed-off-by: Randy Dunlap > >> Cc: Vineet Gupta > >> Cc: linux-snps-arc@lists.infradead.org > >> Cc: Dan Williams > >> Acked-by: Vineet Gupta > >> Cc: Andrew Morton > >> Cc: Matthew Wilcox > >> Cc: Jan Kara > >> Cc: linux-fsde...@vger.kernel.org > >> Cc: linux-nvd...@lists.01.org > >> --- > >> v2: rebase, add more Cc: > >> > >> arch/arc/include/asm/page.h |1 + > >> fs/dax.c|1 + > >> 2 files changed, 2 insertions(+) > >> > >> --- lnx-511-rc1.orig/fs/dax.c > >> +++ lnx-511-rc1/fs/dax.c > >> @@ -25,6 +25,7 @@ > >> #include > >> #include > >> #include > >> +#include > > > > I would expect this to come from one of the linux/ includes like > > linux/mm.h. asm/ headers are implementation linux/ headers are api. > > > > Once you drop that then the subject of this patch can just be "arc: > > add a copy_user_page() implementation", and handled by the arc > > maintainer (or I can take it with Vineet's ack). > > Got it. Thanks. > Vineet is copied. I expect that he will take the v3 patch. > > >> #include > > > > Yes, this one should have a linux/ api header to front it, but that's > > a cleanup for another day. > > That line is only part of the contextual diff in this patch. > I guess you are just commenting in general, along with your earlier > paragraph. Yes, I was prefetching a "...hey, but, there's an asm/ include right below this one?" ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v2] fs/dax: include to fix build error on ARC
On Thu, Dec 31, 2020 at 08:29:14PM -0800, Randy Dunlap wrote: > fs/dax.c uses copy_user_page() but ARC does not provide that interface, > resulting in a build error. > > Provide copy_user_page() in (beside copy_page()) and > add to fs/dax.c to fix the build error. > > ../fs/dax.c: In function 'copy_cow_page_dax': > ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; > did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration] Could somebody explain what the force-cast is doing in there? I mean, the call is copy_user_page(vto, (void __force *)kaddr, vaddr, to); kaddr is a local variable there, declared as void *; AFAICS, that had been pure cargo-cult since commit 7a9eb20666317794d0279843fbd091af93907780 Author: Dan Williams Date: Fri Jun 3 18:06:47 2016 -0700 pmem: kill __pmem address space I mean, it's been more than 4 years, time to bury that body... ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[GIT PULL] ARC updates for 5.11-rc3
Hi Linus, Happy New Year. Sorry for the delayed merge window material - holidays got in the way. Things are quieter on upstreaming front as we are mostly focusing on ARCv3/ARC64 port. Please pull. Thx, -Vineet ---> The following changes since commit b65054597872ce3aefbc6a666385eabdf9e288da: Linux 5.10-rc6 (2020-11-29 15:50:50 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git/ tags/arc-5.11-rc3 for you to fetch changes up to 3a71e423133a4b1166ffafcb4a7cfa87ddecb910: ARC: build: use $(READELF) instead of hard-coded readelf (2020-12-01 17:24:05 -0800) ARC updates for 5.11-rc3 - build system updates from Masahiro Yamada Masahiro Yamada (6): ARC: build: remove non-existing bootpImage from KBUILD_IMAGE ARC: build: add uImage.lzma to the top-level target ARC: build: add boot_targets to PHONY ARC: build: move symlink creation to arch/arc/Makefile to avoid race ARC: build: remove unneeded extra-y ARC: build: use $(READELF) instead of hard-coded readelf arch/arc/Makefile | 20 +--- arch/arc/boot/Makefile | 18 -- 2 files changed, 17 insertions(+), 21 deletions(-) ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v3] arch/arc: add copy_user_page() to to fix build error on ARC
On 1/4/21 7:44 PM, Randy Dunlap wrote: > fs/dax.c uses copy_user_page() but ARC does not provide that interface, > resulting in a build error. > > Provide copy_user_page() in . > > ../fs/dax.c: In function 'copy_cow_page_dax': > ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; > did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration] > > Reported-by: kernel test robot > Signed-off-by: Randy Dunlap > Cc: Vineet Gupta > Cc: linux-snps-arc@lists.infradead.org > Cc: Dan Williams > #Acked-by: Vineet Gupta # v1 > Cc: Andrew Morton > Cc: Matthew Wilcox > Cc: Jan Kara > Cc: linux-fsde...@vger.kernel.org > Cc: linux-nvd...@lists.01.org > #Reviewed-by: Ira Weiny # v2 Added to arc #for-curr. Thx, -Vineet > --- > v2: rebase, add more Cc: > v3: add copy_user_page() to arch/arc/include/asm/page.h > > arch/arc/include/asm/page.h |1 + > > --- lnx-511-rc1.orig/arch/arc/include/asm/page.h > +++ lnx-511-rc1/arch/arc/include/asm/page.h > @@ -10,6 +10,7 @@ > #ifndef __ASSEMBLY__ > > #define clear_page(paddr) memset((paddr), 0, PAGE_SIZE) > +#define copy_user_page(to, from, vaddr, pg) copy_page(to, from) > #define copy_page(to, from) memcpy((to), (from), PAGE_SIZE) > > struct vm_area_struct; > ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc