Skip to contentSkip to conversation

KVM: arm64: vgic: Replace kernel.h with the necessary inclusions

PATCH Superseded Andy Shevchenko 2 participants 6 messages Dec 22, 2021 – Jan 4, 2022 KVM arm64

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: arm64: vgic: Replace kernel.h with the necessary inclusions

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

---
 include/kvm/arm_vgic.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/kvm/arm_vgic.h +3 -1
index e602d848fc1a..bb30a6803d9f 100644
@@ -5,9 +5,11 @@
 #ifndef __KVM_ARM_VGIC_H
 #define __KVM_ARM_VGIC_H
 
-#include <linux/kernel.h>
+#include <linux/bits.h>
 #include <linux/kvm.h>
 #include <linux/irqreturn.h>
+#include <linux/kref.h>
+#include <linux/mutex.h>
 #include <linux/spinlock.h>
 #include <linux/static_key.h>
 #include <linux/types.h>
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 3 lines · Andy Shevchenko

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Which circular dependencies? What problem are you solving?

	M.
Signature · 5 lines
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
#2 lore raw
Quoted 7 lines · Marc Zyngier
Quoted 3 lines · Andy Shevchenko

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Which circular dependencies? What problem are you solving?

In particular moving bitmap_*alloc() APIs to the headers.

But this may be a side effect of what I realized during the attempts of solving that issue. In any case there is no need to take entire mess of kernel.h in another header.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 7 lines · Andy Shevchenko
Quoted 6 lines · Marc Zyngier
Quoted 3 lines · Andy Shevchenko

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Quoted 7 lines
Quoted 1 line

Which circular dependencies? What problem are you solving?

In particular moving bitmap_*alloc() APIs to the headers.

But this may be a side effect of what I realized during the attempts of solving that issue. In any case there is no need to take entire mess of kernel.h in another header.

For the record make headerdep doesn't make any difference with or without this patch. But I consider it's better not to use kernel.h in the headers due to a full mess behind it.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#4 lore raw
Quoted 13 lines · Andy Shevchenko
Quoted 11 lines · Andy Shevchenko
Quoted 7 lines · Marc Zyngier
Quoted 3 lines · Andy Shevchenko

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Which circular dependencies? What problem are you solving?

In particular moving bitmap_*alloc() APIs to the headers.

Quoted 7 lines
Quoted 3 lines

But this may be a side effect of what I realized during the attempts of solving that issue. In any case there is no need to take entire mess of kernel.h in another header.

For the record make headerdep doesn't make any difference with or without this patch. But I consider it's better not to use kernel.h in the headers due to a full mess behind it.

Can you then please write a commit message that matches what this is actually doing instead of mentioning a problem that doesn't seem to exist?

Thanks,

	M.
Signature · 5 lines
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
#5 lore raw
Quoted 18 lines · Marc Zyngier
Quoted 16 lines · Andy Shevchenko
Quoted 14 lines · Andy Shevchenko
Quoted 7 lines · Marc Zyngier
Quoted 3 lines · Andy Shevchenko

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Which circular dependencies? What problem are you solving?

In particular moving bitmap_*alloc() APIs to the headers.

But this may be a side effect of what I realized during the attempts of solving that issue. In any case there is no need to take entire mess of kernel.h in another header.

Quoted 7 lines
Quoted 3 lines

For the record make headerdep doesn't make any difference with or without this patch. But I consider it's better not to use kernel.h in the headers due to a full mess behind it.

Can you then please write a commit message that matches what this is actually doing instead of mentioning a problem that doesn't seem to exist?

Sure, thanks for review!

Signature · 2 lines
With Best Regards,
Andy Shevchenko