linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: Wrong looking statement in cpm_common.c
Date: Tue, 26 May 2009 12:56:13 -0500	[thread overview]
Message-ID: <20090526175613.GB9464@loki.buserror.net> (raw)
In-Reply-To: <1243224033.24376.18.camel@pasglop>

On Mon, May 25, 2009 at 02:00:33PM +1000, Benjamin Herrenschmidt wrote:
> Hi Scott !
> 
> There's this pearl in cpm_common.c :
> 
> void __init udbg_init_cpm(void)
> {
> 	if (cpm_udbg_txdesc) {
> #ifdef CONFIG_CPM2
> 		setbat(1, 0xf0000000, 0xf0000000, 1024*1024, PAGE_KERNEL_NCG);
> #endif
> 		udbg_putc = udbg_putc_cpm;
> 	}
> }
> 
> Now, last I looked, 0xf0000000 (virtual) lands about right in the middle
> of the vmalloc space... so unless there's code somewhere that I missed
> that reserves that region of virtual space for use by that crap above,
> I think somebody is in trouble :-)

:-(

> Additionally, that's the last user of setbat that I can find outside
> of the linear mapping setup proper, so scott, once you've fixed that
> I'll happily make setbat static once for all. We -can- still provide
> a facility for using BATs for early ioremap's but that should be done
> properly, not by whacking setbat with random hard wired virtual
> addresses.

Any suggestions for how to do it properly?

-Scott

  reply	other threads:[~2009-05-26 17:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25  4:00 Wrong looking statement in cpm_common.c Benjamin Herrenschmidt
2009-05-26 17:56 ` Scott Wood [this message]
2009-05-26 22:07   ` Benjamin Herrenschmidt
2009-05-26 22:15     ` Scott Wood
2009-05-26 22:22       ` Benjamin Herrenschmidt
2009-05-26 22:38         ` Scott Wood

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=20090526175613.GB9464@loki.buserror.net \
    --to=scottwood@freescale.com \
    --cc=benh@kernel.crashing.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;
as well as URLs for NNTP newsgroup(s).