linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building
@ 2005-11-08 22:36 Tom Rini
  2005-11-08 22:39 ` Matt Mackall
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tom Rini @ 2005-11-08 22:36 UTC (permalink / raw)
  To: Andrew Morton, Paul Mackerras, Kumar Gala; +Cc: linuxppc-dev, Matt Mackall

The following patch is needed to allow PRINTK=n to work on ppc32.

Direct calls to printk from asm files can't be magically removed so we
have to do it manually.

Signed-off-by: Tom Rini <trini@kernel.crashing.org>

Index: linux-2.6.14/arch/ppc/kernel/fpu.S
===================================================================
--- linux-2.6.14.orig/arch/ppc/kernel/fpu.S
+++ linux-2.6.14/arch/ppc/kernel/fpu.S
@@ -91,7 +91,9 @@ KernelFP:
 	ori	r3,r3,86f@l
 	mr	r4,r2			/* current */
 	lwz	r5,_NIP(r1)
+#ifdef CONFIG_PRINTK
 	bl	printk
+#endif
 	b	ret_from_except
 86:	.string	"floating point used in kernel (task=%p, pc=%x)\n"
 	.align	4,0
Index: linux-2.6.14/arch/ppc/kernel/head.S
===================================================================
--- linux-2.6.14.orig/arch/ppc/kernel/head.S
+++ linux-2.6.14/arch/ppc/kernel/head.S
@@ -846,7 +846,9 @@ KernelAltiVec:
 	ori	r3,r3,87f@l
 	mr	r4,r2		/* current */
 	lwz	r5,_NIP(r1)
+#ifdef CONFIG_PRINTK
 	bl	printk
+#endif
 	b	ret_from_except
 87:	.string	"AltiVec used in kernel  (task=%p, pc=%x)  \n"
 	.align	4,0
Index: linux-2.6.14/arch/ppc/kernel/head_fsl_booke.S
===================================================================
--- linux-2.6.14.orig/arch/ppc/kernel/head_fsl_booke.S
+++ linux-2.6.14/arch/ppc/kernel/head_fsl_booke.S
@@ -906,7 +906,9 @@ KernelSPE:
 	ori	r3,r3,87f@l
 	mr	r4,r2		/* current */
 	lwz	r5,_NIP(r1)
+#ifdef CONFIG_PRINTK
 	bl	printk
+#endif
 	b	ret_from_except
 87:	.string	"SPE used in kernel  (task=%p, pc=%x)  \n"
 	.align	4,0

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building
  2005-11-08 22:36 [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building Tom Rini
@ 2005-11-08 22:39 ` Matt Mackall
  2005-11-08 22:48 ` Matt Porter
  2005-11-09  0:56 ` Paul Mackerras
  2 siblings, 0 replies; 4+ messages in thread
From: Matt Mackall @ 2005-11-08 22:39 UTC (permalink / raw)
  To: Tom Rini; +Cc: Andrew Morton, Kumar Gala, linuxppc-dev

On Tue, Nov 08, 2005 at 03:36:31PM -0700, Tom Rini wrote:
> The following patch is needed to allow PRINTK=n to work on ppc32.
> 
> Direct calls to printk from asm files can't be magically removed so we
> have to do it manually.
> 
> Signed-off-by: Tom Rini <trini@kernel.crashing.org>

Looks good. 

Acked-by: Matt Mackall <mpm@selenic.com>

-- 
Mathematics is the supreme nostalgia of our time.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building
  2005-11-08 22:36 [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building Tom Rini
  2005-11-08 22:39 ` Matt Mackall
@ 2005-11-08 22:48 ` Matt Porter
  2005-11-09  0:56 ` Paul Mackerras
  2 siblings, 0 replies; 4+ messages in thread
From: Matt Porter @ 2005-11-08 22:48 UTC (permalink / raw)
  To: Tom Rini; +Cc: Andrew Morton, Kumar Gala, Matt Mackall, linuxppc-dev

On Tue, Nov 08, 2005 at 03:36:31PM -0700, Tom Rini wrote:
> The following patch is needed to allow PRINTK=n to work on ppc32.
> 
> Direct calls to printk from asm files can't be magically removed so we
> have to do it manually.
> 
> Signed-off-by: Tom Rini <trini@kernel.crashing.org>
> 
> Index: linux-2.6.14/arch/ppc/kernel/fpu.S
> ===================================================================
> --- linux-2.6.14.orig/arch/ppc/kernel/fpu.S

This file doesn't exist in mainline. 2.6.14 is too old as a reference
for ppc patches due to the arch/powerpc/ merge.

-Matt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building
  2005-11-08 22:36 [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building Tom Rini
  2005-11-08 22:39 ` Matt Mackall
  2005-11-08 22:48 ` Matt Porter
@ 2005-11-09  0:56 ` Paul Mackerras
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2005-11-09  0:56 UTC (permalink / raw)
  To: Tom Rini; +Cc: Andrew Morton, Kumar Gala, Matt Mackall, linuxppc-dev

Tom Rini writes:

> The following patch is needed to allow PRINTK=n to work on ppc32.
> 
> Direct calls to printk from asm files can't be magically removed so we
> have to do it manually.

Nak.  We are using arch/powerpc/kernel/fpu.S now (even for ARCH=ppc)
and it doesn't do the printk in assembler.

In general I'd prefer to move the printk calls to C code rather than
adding these ifdefs.

Paul.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-09  0:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-08 22:36 [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building Tom Rini
2005-11-08 22:39 ` Matt Mackall
2005-11-08 22:48 ` Matt Porter
2005-11-09  0:56 ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).