All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Yinghai Lu" <yhlu.kernel@gmail.com>
Cc: "Andi Kleen" <ak@suse.de>, "Russell King" <rmk@arm.linux.org.uk>,
	"Bjorn Helgaas" <bjorn.helgaas@hp.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/5] serial: convert early_uart to earlycon for 8250
Date: Wed, 30 May 2007 21:48:59 -0700	[thread overview]
Message-ID: <20070530214859.ec026ac8.akpm@linux-foundation.org> (raw)
In-Reply-To: <86802c440705302136h1f2da2d8j881e062dfa6b7d7a@mail.gmail.com>

On Wed, 30 May 2007 21:36:41 -0700 "Yinghai Lu" <yhlu.kernel@gmail.com> wrote:

> On 5/30/07, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> > On 5/30/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> > > On Tue, 29 May 2007 18:43:59 -0700 Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
> > >
> > > > [PATCH 4/5] serial: convert early_uart to earlycon for 8250
> > >
> > > drivers/serial/8250_early.c: In function 'parse_options':
> > > drivers/serial/8250_early.c:143: error: 'FIX_EARLYCON_MEM_BASE' undeclared (first use in this function)
> > > drivers/serial/8250_early.c:143: error: (Each undeclared identifier is reported only once
> > >
> > > That was with http://userweb.kernel.org/~akpm/config-sony.txt, but this is
> > > going to break a whole pile of architectures (alpha, powerpc, others).
> >
> > alpha, powerpc, others may need sth like ia64, if they do not support fixmap.
> >
> >
> 
> or create dummy fixmap.h that doesn't support fixmap.
> 

You could require that the architecture implement some specific function
for mapping the early-uart.  Say,

void __iomem *map_early_uart(unsigned long phys_addr, unsigned long len);
void unmap_early_uart(void * __iomem *addr);

then, in drivers/serial/8250_early.c, do


void __iomem * __attribute__((weak))
map_early_uart(unsigned long phys_addr, unsigned long len)
{
	return ioremap(phys_addr, len);
}

void __attribute__((weak)) unmap_early_uart(void * __iomem *addr)
{
	iounmap(addr);
}

and in arch/i386/mm/ioremap.c



#ifdef CONFIG_something

void __iomem *map_early_uart(unsigned long phys_addr, unsigned long len)
{
	void __iomem * vaddr;
	set_fixmap_nocache(idx, phys & PAGE_MASK);
	vaddr = (void __iomem *)__fix_to_virt(idx);
	vaddr += phys & ~PAGE_MASK;

	return vaddr;
}

void unmap_early_uart(void * __iomem *addr)
{
	/* nothing to do */
}

#endif

or such.


  reply	other threads:[~2007-05-31  4:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-30  1:43 [PATCH 4/5] serial: convert early_uart to earlycon for 8250 Yinghai Lu
2007-05-30 18:57 ` Andrew Morton
2007-05-30 19:58   ` Yinghai Lu
2007-05-30 20:18     ` Andrew Morton
2007-05-30 20:58       ` Yinghai Lu
2007-05-30 21:48         ` Andrew Morton
2007-05-31  3:13 ` Andrew Morton
2007-05-31  4:34   ` Yinghai Lu
2007-05-31  4:36     ` Yinghai Lu
2007-05-31  4:48       ` Andrew Morton [this message]
2007-05-31 15:17         ` Bjorn Helgaas
2007-05-31 16:32           ` Yinghai Lu
2007-05-31 16:45             ` Bjorn Helgaas
2007-05-31 18:49               ` Yinghai Lu
2007-05-31  4:39     ` Andrew Morton
2007-05-31  4:42       ` Yinghai Lu
2007-05-31  4:51         ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2007-05-31 21:01 Yinghai Lu
2007-05-31 23:54 ` Andrew Morton
2007-06-01  0:11   ` Yinghai Lu

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=20070530214859.ec026ac8.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ak@suse.de \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=yhlu.kernel@gmail.com \
    /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.