linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>, Paul Mackerras <paulus@samba.org>,
	Kumar Gala <galak@gate.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Matt Mackall <mpm@selenic.com>
Subject: [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building
Date: Tue, 8 Nov 2005 15:36:31 -0700	[thread overview]
Message-ID: <20051108223631.GR3839@smtp.west.cox.net> (raw)

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/

             reply	other threads:[~2005-11-08 22:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 22:36 Tom Rini [this message]
2005-11-08 22:39 ` [PATCH 2.6.14] ppc32: Fix CONFIG_PRINTK=n building Matt Mackall
2005-11-08 22:48 ` Matt Porter
2005-11-09  0:56 ` Paul Mackerras

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=20051108223631.GR3839@smtp.west.cox.net \
    --to=trini@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=galak@gate.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpm@selenic.com \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).