* [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization
@ 2019-01-25 7:57 Masahiro Yamada
2019-01-25 7:57 ` [PATCH 1/3] KVM: arm/arm64: fix TRACE_INCLUDE_PATH Masahiro Yamada
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-01-25 7:57 UTC (permalink / raw)
To: Marc Zyngier, Christoffer Dall
Cc: Catalin Marinas, Will Deacon, linux-kernel, Russell King,
Masahiro Yamada, kvmarm, linux-arm-kernel
My main motivation is to get rid of crappy header search path manipulation
from Kbuild core.
Before that, I want to finish as many cleanup works as possible.
If you are interested in the big picture of this work,
the full patch set is available at:
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test
Masahiro Yamada (3):
KVM: arm/arm64: fix TRACE_INCLUDE_PATH
KVM: arm/arm64: remove -I. header search paths
KVM: arm/arm64: prefix header search paths with $(srctree)/
arch/arm/kvm/Makefile | 5 ++---
arch/arm64/kvm/Makefile | 4 +---
virt/kvm/arm/trace.h | 2 +-
3 files changed, 4 insertions(+), 7 deletions(-)
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] KVM: arm/arm64: fix TRACE_INCLUDE_PATH
2019-01-25 7:57 [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Masahiro Yamada
@ 2019-01-25 7:57 ` Masahiro Yamada
2019-01-25 7:57 ` [PATCH 2/3] KVM: arm/arm64: remove -I. header search paths Masahiro Yamada
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-01-25 7:57 UTC (permalink / raw)
To: Marc Zyngier, Christoffer Dall
Cc: Masahiro Yamada, kvmarm, linux-arm-kernel, linux-kernel
As the comment block in include/trace/define_trace.h says,
TRACE_INCLUDE_PATH should be a relative path to the define_trace.h
../../virt/kvm/arm is the correct relative path.
../../../virt/kvm/arm is working by coincidence because the top
Makefile adds -I$(srctree)/arch/$(SRCARCH)/include as a header
search path, but we should not rely on it.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
virt/kvm/arm/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt/kvm/arm/trace.h b/virt/kvm/arm/trace.h
index 3828bea..853f3b1 100644
--- a/virt/kvm/arm/trace.h
+++ b/virt/kvm/arm/trace.h
@@ -265,7 +265,7 @@ TRACE_EVENT(kvm_timer_update_irq,
#endif /* _TRACE_KVM_H */
#undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH ../../../virt/kvm/arm
+#define TRACE_INCLUDE_PATH ../../virt/kvm/arm
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE trace
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] KVM: arm/arm64: remove -I. header search paths
2019-01-25 7:57 [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Masahiro Yamada
2019-01-25 7:57 ` [PATCH 1/3] KVM: arm/arm64: fix TRACE_INCLUDE_PATH Masahiro Yamada
@ 2019-01-25 7:57 ` Masahiro Yamada
2019-01-25 7:57 ` [PATCH 3/3] KVM: arm/arm64: prefix header search paths with $(srctree)/ Masahiro Yamada
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-01-25 7:57 UTC (permalink / raw)
To: Marc Zyngier, Christoffer Dall
Cc: Catalin Marinas, Will Deacon, Russell King, linux-kernel,
Masahiro Yamada, kvmarm, linux-arm-kernel
The header search path -I. in kernel Makefiles is very suspicious;
it allows the compiler to search for headers in the top of $(srctree),
where obviously no header file exists.
I was able to build without these extra header search paths.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/kvm/Makefile | 3 +--
arch/arm64/kvm/Makefile | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/arm/kvm/Makefile b/arch/arm/kvm/Makefile
index 48de846..bca775e 100644
--- a/arch/arm/kvm/Makefile
+++ b/arch/arm/kvm/Makefile
@@ -9,8 +9,7 @@ ifeq ($(plus_virt),+virt)
endif
ccflags-y += -Iarch/arm/kvm -Ivirt/kvm/arm/vgic
-CFLAGS_arm.o := -I. $(plus_virt_def)
-CFLAGS_mmu.o := -I.
+CFLAGS_arm.o := $(plus_virt_def)
AFLAGS_init.o := -Wa,-march=armv7-a$(plus_virt)
AFLAGS_interrupts.o := -Wa,-march=armv7-a$(plus_virt)
diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile
index 0f2a135..3089b31 100644
--- a/arch/arm64/kvm/Makefile
+++ b/arch/arm64/kvm/Makefile
@@ -4,8 +4,6 @@
#
ccflags-y += -Iarch/arm64/kvm -Ivirt/kvm/arm/vgic
-CFLAGS_arm.o := -I.
-CFLAGS_mmu.o := -I.
KVM=../../../virt/kvm
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] KVM: arm/arm64: prefix header search paths with $(srctree)/
2019-01-25 7:57 [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Masahiro Yamada
2019-01-25 7:57 ` [PATCH 1/3] KVM: arm/arm64: fix TRACE_INCLUDE_PATH Masahiro Yamada
2019-01-25 7:57 ` [PATCH 2/3] KVM: arm/arm64: remove -I. header search paths Masahiro Yamada
@ 2019-01-25 7:57 ` Masahiro Yamada
2019-01-25 12:06 ` [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Christoffer Dall
2019-02-08 15:42 ` Marc Zyngier
4 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2019-01-25 7:57 UTC (permalink / raw)
To: Marc Zyngier, Christoffer Dall
Cc: Catalin Marinas, Will Deacon, Russell King, linux-kernel,
Masahiro Yamada, kvmarm, linux-arm-kernel
Currently, the Kbuild core manipulates header search paths in a crazy
way [1].
To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
the search paths in the srctree. Some Makefiles are already written in
that way, but not all. The goal of this work is to make the notation
consistent, and finally get rid of the gross hacks.
Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
("kbuild: do not drop -I without parameter").
[1]: https://patchwork.kernel.org/patch/9632347/
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/kvm/Makefile | 2 +-
arch/arm64/kvm/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kvm/Makefile b/arch/arm/kvm/Makefile
index bca775e..531e59f 100644
--- a/arch/arm/kvm/Makefile
+++ b/arch/arm/kvm/Makefile
@@ -8,7 +8,7 @@ ifeq ($(plus_virt),+virt)
plus_virt_def := -DREQUIRES_VIRT=1
endif
-ccflags-y += -Iarch/arm/kvm -Ivirt/kvm/arm/vgic
+ccflags-y += -I $(srctree)/$(src) -I $(srctree)/virt/kvm/arm/vgic
CFLAGS_arm.o := $(plus_virt_def)
AFLAGS_init.o := -Wa,-march=armv7-a$(plus_virt)
diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile
index 3089b31..690e033 100644
--- a/arch/arm64/kvm/Makefile
+++ b/arch/arm64/kvm/Makefile
@@ -3,7 +3,7 @@
# Makefile for Kernel-based Virtual Machine module
#
-ccflags-y += -Iarch/arm64/kvm -Ivirt/kvm/arm/vgic
+ccflags-y += -I $(srctree)/$(src) -I $(srctree)/virt/kvm/arm/vgic
KVM=../../../virt/kvm
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization
2019-01-25 7:57 [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Masahiro Yamada
` (2 preceding siblings ...)
2019-01-25 7:57 ` [PATCH 3/3] KVM: arm/arm64: prefix header search paths with $(srctree)/ Masahiro Yamada
@ 2019-01-25 12:06 ` Christoffer Dall
2019-02-08 15:42 ` Marc Zyngier
4 siblings, 0 replies; 6+ messages in thread
From: Christoffer Dall @ 2019-01-25 12:06 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Marc Zyngier, Catalin Marinas, Will Deacon, linux-kernel,
Russell King, kvmarm, linux-arm-kernel
On Fri, Jan 25, 2019 at 04:57:27PM +0900, Masahiro Yamada wrote:
> My main motivation is to get rid of crappy header search path manipulation
> from Kbuild core.
>
> Before that, I want to finish as many cleanup works as possible.
>
> If you are interested in the big picture of this work,
> the full patch set is available at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test
Changes appear fine to me:
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization
2019-01-25 7:57 [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Masahiro Yamada
` (3 preceding siblings ...)
2019-01-25 12:06 ` [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Christoffer Dall
@ 2019-02-08 15:42 ` Marc Zyngier
4 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2019-02-08 15:42 UTC (permalink / raw)
To: Masahiro Yamada, Christoffer Dall
Cc: Catalin Marinas, Will Deacon, Russell King, linux-kernel, kvmarm,
linux-arm-kernel
On 25/01/2019 07:57, Masahiro Yamada wrote:
> My main motivation is to get rid of crappy header search path manipulation
> from Kbuild core.
>
> Before that, I want to finish as many cleanup works as possible.
>
> If you are interested in the big picture of this work,
> the full patch set is available at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test
>
>
>
> Masahiro Yamada (3):
> KVM: arm/arm64: fix TRACE_INCLUDE_PATH
> KVM: arm/arm64: remove -I. header search paths
> KVM: arm/arm64: prefix header search paths with $(srctree)/
>
> arch/arm/kvm/Makefile | 5 ++---
> arch/arm64/kvm/Makefile | 4 +---
> virt/kvm/arm/trace.h | 2 +-
> 3 files changed, 4 insertions(+), 7 deletions(-)
>
I've applied these 3 patches to kvmarm/queue.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-02-08 15:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 7:57 [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Masahiro Yamada
2019-01-25 7:57 ` [PATCH 1/3] KVM: arm/arm64: fix TRACE_INCLUDE_PATH Masahiro Yamada
2019-01-25 7:57 ` [PATCH 2/3] KVM: arm/arm64: remove -I. header search paths Masahiro Yamada
2019-01-25 7:57 ` [PATCH 3/3] KVM: arm/arm64: prefix header search paths with $(srctree)/ Masahiro Yamada
2019-01-25 12:06 ` [PATCH 0/3] KVM: arm/arm64: trivial header path sanitization Christoffer Dall
2019-02-08 15:42 ` Marc Zyngier
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).