* [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files
@ 2020-12-09 20:46 Randy Dunlap
2020-12-10 1:55 ` Tan, Ley Foon
2020-12-10 6:07 ` Christoph Hellwig
0 siblings, 2 replies; 6+ messages in thread
From: Randy Dunlap @ 2020-12-09 20:46 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Tejun Heo, Jens Axboe, linux-block, Ley Foon Tan,
Mark Salter, Aurelien Jacquiot, linux-c6x-dev
When building block/blk-iocost.c on arch/x6x/ or arch/nios2/, the
build fails due to missing the <asm/local64.h> file.
Fix this by adding local64.h as a "generic-y" file in their respective
Kbuild files, so that they will use a copy of <asm-generic/local64.h>
instead (copied to arch/*/include/generated/local64.h by the
build system).
c6x or nios2 build error:
../block/blk-iocost.c:183:10: fatal error: asm/local64.h: No such file or directory
183 | #include <asm/local64.h>
Fixes: 5e124f74325d ("blk-iocost: use local[64]_t for percpu stat")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com>
Cc: linux-c6x-dev@linux-c6x.org
---
arch/c6x/include/asm/Kbuild | 1 +
arch/nios2/include/asm/Kbuild | 1 +
2 files changed, 2 insertions(+)
--- linux-next-20201208.orig/arch/c6x/include/asm/Kbuild
+++ linux-next-20201208/arch/c6x/include/asm/Kbuild
@@ -1,5 +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 += user.h
--- linux-next-20201208.orig/arch/nios2/include/asm/Kbuild
+++ linux-next-20201208/arch/nios2/include/asm/Kbuild
@@ -2,6 +2,7 @@
generic-y += cmpxchg.h
generic-y += extable.h
generic-y += kvm_para.h
+generic-y += local64.h
generic-y += mcs_spinlock.h
generic-y += spinlock.h
generic-y += user.h
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files
2020-12-09 20:46 [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files Randy Dunlap
@ 2020-12-10 1:55 ` Tan, Ley Foon
2020-12-10 6:07 ` Christoph Hellwig
1 sibling, 0 replies; 6+ messages in thread
From: Tan, Ley Foon @ 2020-12-10 1:55 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Tejun Heo, Jens Axboe, linux-block, Mark Salter,
Aurelien Jacquiot, linux-c6x-dev
> -----Original Message-----
> From: Randy Dunlap <rdunlap@infradead.org>
> Sent: Thursday, December 10, 2020 4:47 AM
> To: linux-kernel@vger.kernel.org
> Cc: Randy Dunlap <rdunlap@infradead.org>; Tejun Heo <tj@kernel.org>;
> Jens Axboe <axboe@kernel.dk>; linux-block@vger.kernel.org; Tan, Ley Foon
> <ley.foon.tan@intel.com>; Mark Salter <msalter@redhat.com>; Aurelien
> Jacquiot <jacquiot.aurelien@gmail.com>; linux-c6x-dev@linux-c6x.org
> Subject: [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h
> files
>
> When building block/blk-iocost.c on arch/x6x/ or arch/nios2/, the build fails
> due to missing the <asm/local64.h> file.
>
> Fix this by adding local64.h as a "generic-y" file in their respective Kbuild files,
> so that they will use a copy of <asm-generic/local64.h> instead (copied to
> arch/*/include/generated/local64.h by the build system).
>
> c6x or nios2 build error:
> ../block/blk-iocost.c:183:10: fatal error: asm/local64.h: No such file or
> directory
> 183 | #include <asm/local64.h>
>
> Fixes: 5e124f74325d ("blk-iocost: use local[64]_t for percpu stat")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: linux-block@vger.kernel.org
> Cc: Ley Foon Tan <ley.foon.tan@intel.com>
> Cc: Mark Salter <msalter@redhat.com>
> Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com>
> Cc: linux-c6x-dev@linux-c6x.org
> ---
> arch/c6x/include/asm/Kbuild | 1 +
> arch/nios2/include/asm/Kbuild | 1 +
> 2 files changed, 2 insertions(+)
>
> --- linux-next-20201208.orig/arch/c6x/include/asm/Kbuild
> +++ linux-next-20201208/arch/c6x/include/asm/Kbuild
> @@ -1,5 +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 += user.h
> --- linux-next-20201208.orig/arch/nios2/include/asm/Kbuild
> +++ linux-next-20201208/arch/nios2/include/asm/Kbuild
> @@ -2,6 +2,7 @@
> generic-y += cmpxchg.h
> generic-y += extable.h
> generic-y += kvm_para.h
> +generic-y += local64.h
> generic-y += mcs_spinlock.h
> generic-y += spinlock.h
> generic-y += user.h
For nios2:
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
Regards
Ley Foon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files
2020-12-09 20:46 [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files Randy Dunlap
2020-12-10 1:55 ` Tan, Ley Foon
@ 2020-12-10 6:07 ` Christoph Hellwig
2020-12-10 6:16 ` Randy Dunlap
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2020-12-10 6:07 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Tejun Heo, Jens Axboe, linux-block, Ley Foon Tan,
Mark Salter, Aurelien Jacquiot, linux-c6x-dev
On Wed, Dec 09, 2020 at 12:46:57PM -0800, Randy Dunlap wrote:
> When building block/blk-iocost.c on arch/x6x/ or arch/nios2/, the
> build fails due to missing the <asm/local64.h> file.
Please mark it mandatory-y if the asm-generic version is suitable
for everyone and random pieces of kernel code are supposed to include
it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files
2020-12-10 6:07 ` Christoph Hellwig
@ 2020-12-10 6:16 ` Randy Dunlap
2020-12-10 6:18 ` Christoph Hellwig
2020-12-10 8:18 ` Peter Zijlstra
0 siblings, 2 replies; 6+ messages in thread
From: Randy Dunlap @ 2020-12-10 6:16 UTC (permalink / raw)
To: Christoph Hellwig
Cc: linux-kernel, Tejun Heo, Jens Axboe, linux-block, Ley Foon Tan,
Mark Salter, Aurelien Jacquiot, linux-c6x-dev, Peter Zijlstra
On 12/9/20 10:07 PM, Christoph Hellwig wrote:
> On Wed, Dec 09, 2020 at 12:46:57PM -0800, Randy Dunlap wrote:
>> When building block/blk-iocost.c on arch/x6x/ or arch/nios2/, the
>> build fails due to missing the <asm/local64.h> file.
>
> Please mark it mandatory-y if the asm-generic version is suitable
> for everyone and random pieces of kernel code are supposed to include
> it.
include/asm-generic/local64.h has comments about some $arch could do
its things better/faster instead of using asm-generic, but no $arch has
done that since 2010 when it was added.
Is that conclusive?
If it is, why even use mandatory-y?
Why not just change all occurrences of <asm/local64.h>
to <asm-generic/local64.h> ?
thanks.
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files
2020-12-10 6:16 ` Randy Dunlap
@ 2020-12-10 6:18 ` Christoph Hellwig
2020-12-10 8:18 ` Peter Zijlstra
1 sibling, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2020-12-10 6:18 UTC (permalink / raw)
To: Randy Dunlap
Cc: Christoph Hellwig, linux-kernel, Tejun Heo, Jens Axboe,
linux-block, Ley Foon Tan, Mark Salter, Aurelien Jacquiot,
linux-c6x-dev, Peter Zijlstra
On Wed, Dec 09, 2020 at 10:16:20PM -0800, Randy Dunlap wrote:
> include/asm-generic/local64.h has comments about some $arch could do
> its things better/faster instead of using asm-generic, but no $arch has
> done that since 2010 when it was added.
>
> Is that conclusive?
> If it is, why even use mandatory-y?
> Why not just change all occurrences of <asm/local64.h>
> to <asm-generic/local64.h> ?
asm-generic must not be included by non-arch code directly. So the
sensible options are either:
a) mark it as mandatory-y in include/asm-generic/Kbuild
b) rename it to linux/local64.h and fixup all references
a) seems much less invasive, but b) might be the better option long
term.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files
2020-12-10 6:16 ` Randy Dunlap
2020-12-10 6:18 ` Christoph Hellwig
@ 2020-12-10 8:18 ` Peter Zijlstra
1 sibling, 0 replies; 6+ messages in thread
From: Peter Zijlstra @ 2020-12-10 8:18 UTC (permalink / raw)
To: Randy Dunlap
Cc: Christoph Hellwig, linux-kernel, Tejun Heo, Jens Axboe,
linux-block, Ley Foon Tan, Mark Salter, Aurelien Jacquiot,
linux-c6x-dev
On Wed, Dec 09, 2020 at 10:16:20PM -0800, Randy Dunlap wrote:
> On 12/9/20 10:07 PM, Christoph Hellwig wrote:
> > On Wed, Dec 09, 2020 at 12:46:57PM -0800, Randy Dunlap wrote:
> >> When building block/blk-iocost.c on arch/x6x/ or arch/nios2/, the
> >> build fails due to missing the <asm/local64.h> file.
> >
> > Please mark it mandatory-y if the asm-generic version is suitable
> > for everyone and random pieces of kernel code are supposed to include
> > it.
>
> include/asm-generic/local64.h has comments about some $arch could do
> its things better/faster instead of using asm-generic, but no $arch has
> done that since 2010 when it was added.
Yeah, it's only 32bit archs, and of those I'm only sure i386 could do it
better, very maybe arm-v7. But nobody cares enough to make it happen.
All the 64bit archs are already good, because local_t is long and
local64_t defaults to local_t.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-12-10 8:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 20:46 [PATCH] block: blk-iocost: fix build for ARCH with missing local64.h files Randy Dunlap
2020-12-10 1:55 ` Tan, Ley Foon
2020-12-10 6:07 ` Christoph Hellwig
2020-12-10 6:16 ` Randy Dunlap
2020-12-10 6:18 ` Christoph Hellwig
2020-12-10 8:18 ` Peter Zijlstra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.