aboutsummaryrefslogtreecommitdiffstats
path: root/mips
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2017-04-25 15:39:18 +0100
committerWill Deacon <will.deacon@arm.com>2017-06-09 11:16:47 +0100
commitcd9a8066c90f32f0888d32a6e7f80f55ae4cde5f (patch)
tree9e438d194f305d56e86024918ad93c8de3b641c3 /mips
parentfc189e9c6833c64d6a29e9196c689f41fca3b241 (diff)
downloadkvmtool-cd9a8066c90f32f0888d32a6e7f80f55ae4cde5f.tar.gz
FDT: use static phandles
The current implementation of fdt__alloc_phandle() suffers from being implemented in a static inline function situated in a header file. This will only create expected results within a single compilation unit. It seems a bit over the top to use a function to allocate phandles, when at the end of the day a phandle is just a unique identifier. To simplify things - especially with upcoming patches - we just introduce an enum per architecture to hold all possible phandle sources and use that instead of the dynamic allocation. Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'mips')
-rw-r--r--mips/include/kvm/fdt-arch.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/mips/include/kvm/fdt-arch.h b/mips/include/kvm/fdt-arch.h
new file mode 100644
index 00000000..b0302457
--- /dev/null
+++ b/mips/include/kvm/fdt-arch.h
@@ -0,0 +1,6 @@
+#ifndef KVM__KVM_FDT_H
+#define KVM__KVM_FDT_H
+
+enum phandles {PHANDLE_RESERVED = 0, PHANDLES_MAX};
+
+#endif /* KVM__KVM_FDT_H */