On Wed, 2008-09-03 at 15:54 -0700, Linus Torvalds wrote:
> > Anyway, it's easy to do (if a slightly larger diff) ... I have to move
> > the prototype from include/kernel.h to include/module.h because I need
> > an assured asm/xxx include before it to get the override.
> 
> I don't really see what this has to do with module.h, though.
> 
> Why do this in <linux/module.h>?  Why not just do it in lib/vsptintf.c 
> which is the only place that cares? None of this needs to pollute the 
> generic header files that simply don't care.

You want me to pull the elf header files into lib/vsprintf.c and have
something like

static inline void *dereference_function_descritpor(void *ptr)
{
#if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
        void *p;
        if (!probe_kernel_address(ptr, p))
                ptr = p;
#elif defined(CONFIG_PARISC) && defined(CONFIG_64BITS)
        Elf64_Fptr *desc = ptr;
        void *p;
        if (!probe_kernel_address(&desc->addr, p))
                ptr = p;
#endif
        ...

?

Because it just looks rather tacky ...

James


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to