public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-arch@vger.kernel.org,
	Parisc List <linux-parisc@vger.kernel.org>,
	linux-ia64@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Correct printk %pF to work on all architectures
Date: Wed, 3 Sep 2008 17:01:52 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0809031636320.3515@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1220484812.3254.59.camel@localhost.localdomain>



On Wed, 3 Sep 2008, James Bottomley wrote:
> 
> Oh ... because Arjan has a patch to export
> dereference_function_descriptor.  I suppose I could make him do the
> heavy lifting, but it seemed sensible to make it easy for him (and me)
> by putting it in a header.
> 
> http://marc.info/?l=linux-kernel&m=121976793429869

Ahh.

NOW it all starts to make sense.

Or perhaps not sense, but I at least understand why people want to move it 
around. The kernel.h location kind of goes together with that 
core_kernel_text() thing, although it seems to be more of a "random 
collection of routines" thing than anything else (but hey, that's the very 
definition of "kernel.h" for you).

The module.h location still seems to be more of a "oh, both 
kernel/extable.c and lib/vsprintf.c already included <linux/module.h>" and 
it's a bit sad, since it really has nothing at all to do with modules.

Grr. It does seem like we don't have any kind of "abi" header file. 
<linux/kernel.h> and <asm/processor.h> has various random things.

So yea, there doesn't seem to be any _obvious_ place that makes sense.

		Linus

Not-very-strong-opinion: How about <asm/sections.h>? That does seem to be 
where we already hide things like "in_kernel_text()" at least on powerpc. 
In fact, since we already always have a generic version, the patch would 
actually be something like

 - in <asm-generic/sections.h>, just do

	#define dereference_function_descriptor(p) (p)

 - in architectures that want to override it

	#undef dereference_function_descriptor

   followed by 

	static inline void *dereference_function_descriptor(..) ..
	or
	#define dereference_function_descriptor my_fn_dereference

   since they all include the generic one as a base

Hmm? I do admit that "<asm/sections.h>" doesn't really strike me as a very 
natural name for this, but kernel/extable.c does already include it for 
other reasons, and it's at least no worse than module.h.

  parent reply	other threads:[~2008-09-04  0:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03 20:18 [PATCH] Correct printk %pF to work on all architectures James Bottomley
2008-09-03 20:18 ` James Bottomley
2008-09-03 21:22 ` Linus Torvalds
2008-09-03 21:22   ` Linus Torvalds
2008-09-03 22:42   ` James Bottomley
2008-09-03 22:42     ` James Bottomley
2008-09-03 22:54     ` Linus Torvalds
2008-09-03 23:00       ` James Bottomley
2008-09-03 23:00         ` James Bottomley
2008-09-03 23:15         ` Linus Torvalds
2008-09-03 23:33           ` James Bottomley
2008-09-03 23:33             ` James Bottomley
2008-09-04  0:01             ` Linus Torvalds [this message]
2008-09-04  0:01               ` Linus Torvalds
2008-09-04  1:43               ` James Bottomley
2008-09-04 22:36                 ` Benjamin Herrenschmidt
2008-09-04 22:36                   ` Benjamin Herrenschmidt
2008-09-04 23:07                   ` Luck, Tony
2008-09-04 23:07                     ` Luck, Tony
2008-09-09 14:12                     ` James Bottomley
2008-09-09 14:12                       ` James Bottomley
2008-09-09 18:08                       ` Kyle McMartin
2008-09-09 22:05                         ` Benjamin Herrenschmidt
2008-09-09 22:05                           ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.10.0809031636320.3515@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox