All of lore.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 16:15:08 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0809031602270.3515@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1220482853.3254.47.camel@localhost.localdomain>



On Wed, 3 Sep 2008, James Bottomley wrote:
> 
> You want me to pull the elf header files into lib/vsprintf.c and have
> something like

No.

I want you to stop polluting <linux/module.h> with total and utter crap.

Please tell my WHY the hell you have

	diff --git a/include/linux/module.h b/include/linux/module.h
	index 68e0955..a549f89 100644
	--- a/include/linux/module.h
	+++ b/include/linux/module.h
	@@ -76,6 +76,11 @@ void sort_extable(struct exception_table_entry *start,
	                  struct exception_table_entry *finish);
	 void sort_main_extable(void);
	 
	+/* function descriptor handling (if any) */
	+#ifndef dereference_function_descriptor
	+#define dereference_function_descriptor(p) (p)
	+#endif
	+
	 #ifdef MODULE
	 #define MODULE_GENERIC_TABLE(gtype,name)                       \
	 extern const struct gtype##_id __mod_##gtype##_table           \

in your patch? What the _hell_ does that have to do with "module.h"?

Why the heck don't you just have that in the ONLY place that cares, namely 
lib/vfprintf.c?

In other words, WHY did you do something as stupid and totally 
unexplainable as

	diff --git a/lib/vsprintf.c b/lib/vsprintf.c
	index d8d1d11..0c47629 100644
	--- a/lib/vsprintf.c
	+++ b/lib/vsprintf.c
	@@ -513,16 +513,6 @@ static char *string(char *buf, char *end, char *s, int field_width, int precisio
	        return buf;
	 }
	 
	-static inline void *dereference_function_descriptor(void *ptr)
	-{
	-#if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
	-       void *p;
	-       if (!probe_kernel_address(ptr, p))
	-               ptr = p;
	-#endif
	-       return ptr;
	-}
	-

when that thing _used_ to be in a place where it made sense? Why didn't 
you just change that already existing code to use a #ifdef instead?

Why do you move that to <linux/module.h>? It makes no sense.

And why do you put the arch-specific defines in <asm/module.h>? That makes 
no sense either. WHY?

As far as I can tell, the _only_ reason you happened to pick 
<linux/module.h> was literally that it is the first of our header files 
that lib/vsprintf.c includes. And quite frankly, that makes no sense. 

That's about as sensible as putting it into <linux/string.h>. 

Put those things in some _sane_ place. That means:

 - default non-implementation in lib/vsprintf.c, since there is no point 
   in putting it anywhere else, when it's not used anywhere else.

 - arch-specific implementations can go into some more sensible asm header 
   file that is more relevant. Maybe <asm/processor.h>?

IOW, I'm complaining about your totally senseless and apparently random 
choice of location.

			Linus

WARNING: multiple messages have this Message-ID (diff)
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, 03 Sep 2008 23:15:08 +0000	[thread overview]
Message-ID: <alpine.LFD.1.10.0809031602270.3515@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1220482853.3254.47.camel@localhost.localdomain>



On Wed, 3 Sep 2008, James Bottomley wrote:
> 
> You want me to pull the elf header files into lib/vsprintf.c and have
> something like

No.

I want you to stop polluting <linux/module.h> with total and utter crap.

Please tell my WHY the hell you have

	diff --git a/include/linux/module.h b/include/linux/module.h
	index 68e0955..a549f89 100644
	--- a/include/linux/module.h
	+++ b/include/linux/module.h
	@@ -76,6 +76,11 @@ void sort_extable(struct exception_table_entry *start,
	                  struct exception_table_entry *finish);
	 void sort_main_extable(void);
	 
	+/* function descriptor handling (if any) */
	+#ifndef dereference_function_descriptor
	+#define dereference_function_descriptor(p) (p)
	+#endif
	+
	 #ifdef MODULE
	 #define MODULE_GENERIC_TABLE(gtype,name)                       \
	 extern const struct gtype##_id __mod_##gtype##_table           \

in your patch? What the _hell_ does that have to do with "module.h"?

Why the heck don't you just have that in the ONLY place that cares, namely 
lib/vfprintf.c?

In other words, WHY did you do something as stupid and totally 
unexplainable as

	diff --git a/lib/vsprintf.c b/lib/vsprintf.c
	index d8d1d11..0c47629 100644
	--- a/lib/vsprintf.c
	+++ b/lib/vsprintf.c
	@@ -513,16 +513,6 @@ static char *string(char *buf, char *end, char *s, int field_width, int precisio
	        return buf;
	 }
	 
	-static inline void *dereference_function_descriptor(void *ptr)
	-{
	-#if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
	-       void *p;
	-       if (!probe_kernel_address(ptr, p))
	-               ptr = p;
	-#endif
	-       return ptr;
	-}
	-

when that thing _used_ to be in a place where it made sense? Why didn't 
you just change that already existing code to use a #ifdef instead?

Why do you move that to <linux/module.h>? It makes no sense.

And why do you put the arch-specific defines in <asm/module.h>? That makes 
no sense either. WHY?

As far as I can tell, the _only_ reason you happened to pick 
<linux/module.h> was literally that it is the first of our header files 
that lib/vsprintf.c includes. And quite frankly, that makes no sense. 

That's about as sensible as putting it into <linux/string.h>. 

Put those things in some _sane_ place. That means:

 - default non-implementation in lib/vsprintf.c, since there is no point 
   in putting it anywhere else, when it's not used anywhere else.

 - arch-specific implementations can go into some more sensible asm header 
   file that is more relevant. Maybe <asm/processor.h>?

IOW, I'm complaining about your totally senseless and apparently random 
choice of location.

			Linus

WARNING: multiple messages have this Message-ID (diff)
From: Linus Torvalds <torvalds@linux-foundation.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-arch@vger.kernel.org, linuxppc-dev@ozlabs.org,
	linux-ia64@vger.kernel.org,
	Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH] Correct printk %pF to work on all architectures
Date: Wed, 3 Sep 2008 16:15:08 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0809031602270.3515@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1220482853.3254.47.camel@localhost.localdomain>



On Wed, 3 Sep 2008, James Bottomley wrote:
> 
> You want me to pull the elf header files into lib/vsprintf.c and have
> something like

No.

I want you to stop polluting <linux/module.h> with total and utter crap.

Please tell my WHY the hell you have

	diff --git a/include/linux/module.h b/include/linux/module.h
	index 68e0955..a549f89 100644
	--- a/include/linux/module.h
	+++ b/include/linux/module.h
	@@ -76,6 +76,11 @@ void sort_extable(struct exception_table_entry *start,
	                  struct exception_table_entry *finish);
	 void sort_main_extable(void);
	 
	+/* function descriptor handling (if any) */
	+#ifndef dereference_function_descriptor
	+#define dereference_function_descriptor(p) (p)
	+#endif
	+
	 #ifdef MODULE
	 #define MODULE_GENERIC_TABLE(gtype,name)                       \
	 extern const struct gtype##_id __mod_##gtype##_table           \

in your patch? What the _hell_ does that have to do with "module.h"?

Why the heck don't you just have that in the ONLY place that cares, namely 
lib/vfprintf.c?

In other words, WHY did you do something as stupid and totally 
unexplainable as

	diff --git a/lib/vsprintf.c b/lib/vsprintf.c
	index d8d1d11..0c47629 100644
	--- a/lib/vsprintf.c
	+++ b/lib/vsprintf.c
	@@ -513,16 +513,6 @@ static char *string(char *buf, char *end, char *s, int field_width, int precisio
	        return buf;
	 }
	 
	-static inline void *dereference_function_descriptor(void *ptr)
	-{
	-#if defined(CONFIG_IA64) || defined(CONFIG_PPC64)
	-       void *p;
	-       if (!probe_kernel_address(ptr, p))
	-               ptr = p;
	-#endif
	-       return ptr;
	-}
	-

when that thing _used_ to be in a place where it made sense? Why didn't 
you just change that already existing code to use a #ifdef instead?

Why do you move that to <linux/module.h>? It makes no sense.

And why do you put the arch-specific defines in <asm/module.h>? That makes 
no sense either. WHY?

As far as I can tell, the _only_ reason you happened to pick 
<linux/module.h> was literally that it is the first of our header files 
that lib/vsprintf.c includes. And quite frankly, that makes no sense. 

That's about as sensible as putting it into <linux/string.h>. 

Put those things in some _sane_ place. That means:

 - default non-implementation in lib/vsprintf.c, since there is no point 
   in putting it anywhere else, when it's not used anywhere else.

 - arch-specific implementations can go into some more sensible asm header 
   file that is more relevant. Maybe <asm/processor.h>?

IOW, I'm complaining about your totally senseless and apparently random 
choice of location.

			Linus

  reply	other threads:[~2008-09-03 23:15 UTC|newest]

Thread overview: 43+ 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 20:18 ` James Bottomley
2008-09-03 21:22 ` Linus Torvalds
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:42     ` James Bottomley
2008-09-03 22:42     ` James Bottomley
2008-09-03 22:54     ` Linus Torvalds
2008-09-03 22:54       ` Linus Torvalds
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:00         ` James Bottomley
2008-09-03 23:15         ` Linus Torvalds [this message]
2008-09-03 23:15           ` Linus Torvalds
2008-09-03 23:15           ` Linus Torvalds
2008-09-03 23:33           ` James Bottomley
2008-09-03 23:33             ` James Bottomley
2008-09-03 23:33             ` James Bottomley
2008-09-04  0:01             ` Linus Torvalds
2008-09-04  0:01               ` Linus Torvalds
2008-09-04  0:01               ` Linus Torvalds
2008-09-04  1:43               ` James Bottomley
2008-09-04  1:43                 ` James Bottomley
2008-09-04  1:43                 ` James Bottomley
2008-09-04 22:36                 ` Benjamin Herrenschmidt
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-04 23:07                     ` Luck, Tony
2008-09-09 14:12                     ` James Bottomley
2008-09-09 14:12                       ` James Bottomley
2008-09-09 14:12                       ` James Bottomley
2008-09-09 18:08                       ` Kyle McMartin
2008-09-09 18:08                         ` Kyle McMartin
2008-09-09 18:08                         ` Kyle McMartin
2008-09-09 22:05                         ` Benjamin Herrenschmidt
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.0809031602270.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.