Re: [PATCH] Automatic kernel version module dependencies..
- From: John Baldwin <jhb@xxxxxxxxxxx>
- Date: Mon, 11 Feb 2008 14:31:00 -0500
On Sunday 10 February 2008 06:24:37 am Dag-Erling Smørgrav wrote:
"M. Warner Losh" <imp@xxxxxxxxxx> writes:
Dag-Erling_Smørgrav <des@xxxxxx> writes:
...provided they were built from the same config... I thinkThese are usually well documented. But I can't find any in the
MUTEX_PROFILING has been fixed, but there may still be cases where
the ABI changes dependening on kernel options.
current doc set. Maybe you could point me at options that do this so
we can document them (and maybe add a #warning when compiling with
them)?
Here's one I found: DEBUG_LOCKS changes the size of struct lock, which
changes the size and layout of struct vnode.
Yes, DEBUG_LOCKS, MUTEX_PROFILING (O.B.E), and PAE are the ones I know of. We
could employ a similar strategy for these btw. For example, you could do
this for PAE:
sys/i386/i386/pmap.c:
#ifdef PAE
MODULE_VERSION(pae, 1);
#else
MODULE_VERSION(pae, 0);
#endif
sys/module.h:
#if defined(__i386__)
#ifdef PAE
#define PAE_DEPEND(name) MODULE_DEPEND(name, pae, 1, 1, 1)
#else
#define PAE_DEPEND(name) MODULE_DEPEND(name, pae, 0, 0, 0)
#endif
#else
#define PAE_DEPEND(name) struct __hack
#endif
#define DECLARE_MODULE(name, ...) \
...
PAE_DEPEND(name); \
...
It sucks to have the MD-ness there. Could perhaps have an MI macro like this:
sys/module.h:
#include <machine/module.h>
#ifndef MACHINE_MODULE_DEPEND
#define MACHINE_MODULE_DEPEND struct __hack
#endif
sys/i386/include/module.h:
PAE bits from above but s/PAE_DEPEND/MACHINE_MODULE_DEPEND/. In general we
try to keep the number of such ABI-breaking options to a very bare minimum,
so perhaps one-off hacks in sys/module.h rather than abstracting it is
sufficient.
--
John Baldwin
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: [PATCH] Automatic kernel version module dependencies..
- From: Attilio Rao
- Re: [PATCH] Automatic kernel version module dependencies..
- References:
- [PATCH] Automatic kernel version module dependencies..
- From: John Baldwin
- Re: [PATCH] Automatic kernel version module dependencies..
- From: M. Warner Losh
- Re: [PATCH] Automatic kernel version module dependencies..
- From: Dag-Erling Smørgrav
- [PATCH] Automatic kernel version module dependencies..
- Prev by Date: Re: Fifolog - a circular file for embedded systems
- Next by Date: Re: [PATCH] Automatic kernel version module dependencies..
- Previous by thread: Re: [PATCH] Automatic kernel version module dependencies..
- Next by thread: Re: [PATCH] Automatic kernel version module dependencies..
- Index(es):
Relevant Pages
|
|