Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kernel build failure for evbppc due to uvm_physseg.c
Kernel build fails for evbppc/RB800:
% cd sys/arch/evbppc/compile/RB800 && nbmake-evbppc depend && nbmake-evbppc
...
../../../../uvm/uvm_physseg.c:1009:1: error: no previous prototype for 'uvm_physseg_set_avail_start' [-Werror=missing-prototypes]
uvm_physseg_set_avail_start(uvm_physseg_t upm, paddr_t avail_start)
^
../../../../uvm/uvm_physseg.c:1022:6: error: no previous prototype for 'uvm_physseg_set_avail_end' [-Werror=missing-prototypes]
void uvm_physseg_set_avail_end(uvm_physseg_t upm, paddr_t avail_end)
uvm_physseg_set_avail_{start,end} are declared by uvm/uvm_physseg.h only
when PMAP_STEAL_MEMORY is defined. For evbppc/RB800, PMAP_STEAL_MEMORY
is defined by uvm/pmap/pmap.h via powerpc/booke/pmap.h. However,
powerpc/booke/pmap.h includes uvm/uvm_physseg.h before uvm/pmap/pmap.h.
As a result, declarations for uvm_physseg_set_avail_{start,end} are lost.
At the moment, uvm_physseg_set_avail_start is used only by
acorn26/acorn26/pmap.c (and no one uses uvm_physseg_set_avail_end).
Why don't we declare them only when some special macro other than
PMAP_STEAL_MEMORY is defined, like below?
Thanks,
Rin
====
--- src/sys/uvm/uvm_physseg.c.orig 2016-12-27 00:10:24.575021092 +0900
+++ src/sys/uvm/uvm_physseg.c 2016-12-27 00:11:54.134699238 +0900
@@ -1004,7 +1004,7 @@
return HANDLE_TO_PHYSSEG_NODE(upm)->avail_start;
}
-#if defined(PMAP_STEAL_MEMORY)
+#if defined(UVM_PHYSSEG_LEGACY)
void
uvm_physseg_set_avail_start(uvm_physseg_t upm, paddr_t avail_start)
{
@@ -1033,7 +1033,7 @@
ps->avail_end = avail_end;
}
-#endif /* PMAP_STEAL_MEMORY */
+#endif /* UVM_PHYSSEG_LEGACY */
paddr_t
uvm_physseg_get_avail_end(uvm_physseg_t upm)
--- src/sys/uvm/uvm_physseg.h.orig 2016-12-27 00:10:21.257745088 +0900
+++ src/sys/uvm/uvm_physseg.h 2016-12-27 00:11:27.583156131 +0900
@@ -106,14 +106,14 @@
bool uvm_physseg_plug(paddr_t, size_t, uvm_physseg_t *);
bool uvm_physseg_unplug(paddr_t, size_t);
-#if defined(PMAP_STEAL_MEMORY)
+#if defined(UVM_PHYSSEG_LEGACY)
/*
* XXX: Legacy: This needs to be upgraded to a full pa management
* layer.
*/
void uvm_physseg_set_avail_start(uvm_physseg_t, paddr_t);
void uvm_physseg_set_avail_end(uvm_physseg_t, paddr_t);
-#endif /* PMAP_STEAL_MEMORY */
+#endif /* UVM_PHYSSEG_LEGACY */
#endif /* _KERNEL */
--- src/sys/arch/acorn26/include/pmap.h.orig 2016-12-27 00:12:36.537060156 +0900
+++ src/sys/arch/acorn26/include/pmap.h 2016-12-27 00:46:14.184365817 +0900
@@ -57,6 +57,8 @@
#define PMAP_UNMAP_POOLPAGE(va) ((va) - (vaddr_t)MEMC_PHYS_BASE)
#define PMAP_STEAL_MEMORY
+#define UVM_PHYSSEG_LEGACY
+
#endif /* _KERNEL */
#endif
Home |
Main Index |
Thread Index |
Old Index