Thread (14 messages) 14 messages, 5 authors, 2008-09-09

Re: [PATCH] Correct printk %pF to work on all architectures

From: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: 2008-09-03 23:00:55
Also in: linux-arch

On Wed, 2008-09-03 at 15:54 -0700, Linus Torvalds wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help