linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Albert Herranz <albert_herranz@yahoo.es>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH v3 2/3] powerpc: udbg: add fixmap entry for early debug
Date: Tue, 01 Dec 2009 21:51:44 +1100	[thread overview]
Message-ID: <1259664704.2076.351.camel@pasglop> (raw)
In-Reply-To: <0a6994b5a257def375c8114b132d044a7f416d11.1259609263.git.albert_herranz@yahoo.es>

On Tue, 2009-12-01 at 00:09 +0100, Albert Herranz wrote:
> Add a new entry to the fixmap table to allow low level early udbg drivers
> to safely reserve virtual address space and create their I/O mappings.
> 
> Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
> ---
>  arch/powerpc/include/asm/fixmap.h |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/fixmap.h b/arch/powerpc/include/asm/fixmap.h
> index f1f4e23..424e5a6 100644
> --- a/arch/powerpc/include/asm/fixmap.h
> +++ b/arch/powerpc/include/asm/fixmap.h
> @@ -48,6 +48,9 @@ enum fixed_addresses {
>  	FIX_KMAP_BEGIN,	/* reserved pte's for temporary kernel mappings */
>  	FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
>  #endif
> +#ifdef CONFIG_PPC_EARLY_DEBUG
> +	FIX_EARLY_DEBUG_BASE,
> +#endif
>  	/* FIX_PCIE_MCFG, */
>  	__end_of_fixed_addresses
>  };

Rather than a hook to hop between the BAT and the later single page
mapping, I would have just used the fixmap as a way to reserve virtual
space for the BAT and keep it around.

However, that does mean having more than one entry in the fixmap, in
fact, enough to cope with the BAT min size +/- alignment. Maybe to avoid
the alignment problem, an option would be to always use the top of the
fixmap for the "debug area" and make it always something nice and fat to
fit a BAT, like 128K or whatever is the min size. No need for CONFIG_*
there even, I won't cry for 128K of virtual space reserved there instead
of just one page currently. And we could have good use of it for other
early debug stuff even.

Cheers,
Ben.

  reply	other threads:[~2009-12-01 10:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 23:09 [RFC PATCH v3 0/3] rework of usbgecko-based early debug Albert Herranz
2009-11-30 23:09 ` [RFC PATCH v3 1/3] powerpc: udbg: add early remap hook Albert Herranz
2009-11-30 23:09 ` [RFC PATCH v3 2/3] powerpc: udbg: add fixmap entry for early debug Albert Herranz
2009-12-01 10:51   ` Benjamin Herrenschmidt [this message]
2009-11-30 23:09 ` [RFC PATCH v3 3/3] powerpc: gamecube/wii: early debugging using usbgecko Albert Herranz
2009-12-01  1:25   ` Richard Holden
2009-12-01  5:23     ` Albert Herranz
2009-12-01  5:40       ` Michael Ellerman
2009-12-01  5:45         ` Albert Herranz
2009-12-01  7:43       ` Richard Holden
2009-12-03  4:06         ` Segher Boessenkool

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=1259664704.2076.351.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=albert_herranz@yahoo.es \
    --cc=linuxppc-dev@lists.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).