LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap
@ 2008-01-15  5:45 Huang, Ying
  2008-01-15  8:44 ` Ingo Molnar
  0 siblings, 1 reply; 8+ messages in thread
From: Huang, Ying @ 2008-01-15  5:45 UTC (permalink / raw)
  To: akpm, H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Andi Kleen
  Cc: linux-kernel

This patchset replaces boot_ioremap with a enhanced version of
bt_ioremap and renames the bt_ioremap to early_ioremap. This reduces
12k from .init.data segment and increases the size of memory that can
be re-mapped before paging_init to 64k.

This patchset is based on linux-2.6.24-rc5-mm1 +
efi-split-efi-tables-parsing-code-from-efi-runtime-service-support-code.patch.
It has been tested on i386 with PAE on/off.

Best Regards,
Huang Ying


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

* Re: [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap
  2008-01-15  5:45 [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap Huang, Ying
@ 2008-01-15  8:44 ` Ingo Molnar
  2008-01-15  9:48   ` Huang, Ying
  0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2008-01-15  8:44 UTC (permalink / raw)
  To: Huang, Ying
  Cc: akpm, H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Andi Kleen,
	linux-kernel


* Huang, Ying <ying.huang@intel.com> wrote:

> This patchset replaces boot_ioremap with a enhanced version of 
> bt_ioremap and renames the bt_ioremap to early_ioremap. This reduces 
> 12k from .init.data segment and increases the size of memory that can 
> be re-mapped before paging_init to 64k.

in latest x86.git#mm there's an early_ioremap() introduced as part of 
the PAT series - available on both 32-bit and 64-bit. Could you take a 
look at it and use that if it's OK for your purposes?

	Ingo

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

* Re: [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap
  2008-01-15  8:44 ` Ingo Molnar
@ 2008-01-15  9:48   ` Huang, Ying
  2008-01-15 12:52     ` H. Peter Anvin
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Huang, Ying @ 2008-01-15  9:48 UTC (permalink / raw)
  To: Ingo Molnar, venkatesh.pallipadi
  Cc: akpm, H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Andi Kleen,
	linux-kernel

On Tue, 2008-01-15 at 09:44 +0100, Ingo Molnar wrote:
> * Huang, Ying <ying.huang@intel.com> wrote:
> 
> > This patchset replaces boot_ioremap with a enhanced version of 
> > bt_ioremap and renames the bt_ioremap to early_ioremap. This reduces 
> > 12k from .init.data segment and increases the size of memory that can 
> > be re-mapped before paging_init to 64k.
> 
> in latest x86.git#mm there's an early_ioremap() introduced as part of 
> the PAT series - available on both 32-bit and 64-bit. Could you take a 
> look at it and use that if it's OK for your purposes?

After checking the early_ioremap() implementation in
arch/x86/kernel/setup_32.c, I found that it is a duplication of
bt_ioremap() implementation in arch/x86/mm/ioremap_32.c. Both
implementations use set_fixmap(), so they can be used only after
paging_init().

The early_ioremap implementation provided in this patchset works as
follow:

- Enhances bt_ioremap, make it usable before paging_init() via a
dedicated PTE page.
- Rename bt_ioremap to early_ioremap

So I think maybe we should replace the early_ioremap() implementation in
PAT series with that of this series.

Best Regards,
Huang Ying


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

* Re: [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap
  2008-01-15  9:48   ` Huang, Ying
@ 2008-01-15 12:52     ` H. Peter Anvin
  2008-01-15 13:39       ` Ingo Molnar
  2008-01-15 13:36     ` Ingo Molnar
  2008-01-16  2:51     ` [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhancedbt_ioremap Pallipadi, Venkatesh
  2 siblings, 1 reply; 8+ messages in thread
From: H. Peter Anvin @ 2008-01-15 12:52 UTC (permalink / raw)
  To: Huang, Ying
  Cc: Ingo Molnar, venkatesh.pallipadi, akpm, Thomas Gleixner,
	Ingo Molnar, Andi Kleen, linux-kernel

Huang, Ying wrote:
> 
> After checking the early_ioremap() implementation in
> arch/x86/kernel/setup_32.c, I found that it is a duplication of
> bt_ioremap() implementation in arch/x86/mm/ioremap_32.c. Both
> implementations use set_fixmap(), so they can be used only after
> paging_init().
> 
> The early_ioremap implementation provided in this patchset works as
> follow:
> 
> - Enhances bt_ioremap, make it usable before paging_init() via a
> dedicated PTE page.
> - Rename bt_ioremap to early_ioremap
> 
> So I think maybe we should replace the early_ioremap() implementation in
> PAT series with that of this series.
> 

I did a quick scan over the patchset (not quite awake yet, so I may very 
well have missed something), but it looks like EFI (again!) is the only 
user of ioremapping before paging_init().  This makes me wonder if that 
code can't be restructured so that isn't necessary.

	-hpa


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

* Re: [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap
  2008-01-15  9:48   ` Huang, Ying
  2008-01-15 12:52     ` H. Peter Anvin
@ 2008-01-15 13:36     ` Ingo Molnar
  2008-01-16  2:51     ` [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhancedbt_ioremap Pallipadi, Venkatesh
  2 siblings, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2008-01-15 13:36 UTC (permalink / raw)
  To: Huang, Ying
  Cc: venkatesh.pallipadi, akpm, H. Peter Anvin, Thomas Gleixner,
	Ingo Molnar, Andi Kleen, linux-kernel


* Huang, Ying <ying.huang@intel.com> wrote:

> > in latest x86.git#mm there's an early_ioremap() introduced as part 
> > of the PAT series - available on both 32-bit and 64-bit. Could you 
> > take a look at it and use that if it's OK for your purposes?
> 
> After checking the early_ioremap() implementation in 
> arch/x86/kernel/setup_32.c, I found that it is a duplication of 
> bt_ioremap() implementation in arch/x86/mm/ioremap_32.c. Both 
> implementations use set_fixmap(), so they can be used only after 
> paging_init().
> 
> The early_ioremap implementation provided in this patchset works as 
> follow:
> 
> - Enhances bt_ioremap, make it usable before paging_init() via a
> dedicated PTE page.
> - Rename bt_ioremap to early_ioremap
>
> So I think maybe we should replace the early_ioremap() implementation 
> in PAT series with that of this series.

yep, agreed, that would be nice.

	Ingo

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

* Re: [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap
  2008-01-15 13:39       ` Ingo Molnar
@ 2008-01-15 13:38         ` H. Peter Anvin
  0 siblings, 0 replies; 8+ messages in thread
From: H. Peter Anvin @ 2008-01-15 13:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Huang, Ying, venkatesh.pallipadi, akpm, Thomas Gleixner,
	Ingo Molnar, Andi Kleen, linux-kernel

Ingo Molnar wrote:
> * H. Peter Anvin <hpa@zytor.com> wrote:
> 
>> I did a quick scan over the patchset (not quite awake yet, so I may 
>> very well have missed something), but it looks like EFI (again!) is 
>> the only user of ioremapping before paging_init().  This makes me 
>> wonder if that code can't be restructured so that isn't necessary.
> 
> i think that in general making access to unmapped memory a bit easier is 
> generally a good robustness idea as ACPI could be impacted by it as 
> well.
> 
> Fundamentally, paging_init() has obvious dependency on "figuring out the 
> memory setup" of the box, and "figuring out the memory setup" means 
> interpreting various data structures passed in by the BIOS - some of 
> which might be in not yet mapped areas or iommu areas (if we have to do 
> some early quirk). So having a robust implementation of ioremap_early() 
> sounds like a definitive plus.
> 

Fair enough.  If it's generally useful, I certainly have no objections.

	-hpa

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

* Re: [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap
  2008-01-15 12:52     ` H. Peter Anvin
@ 2008-01-15 13:39       ` Ingo Molnar
  2008-01-15 13:38         ` H. Peter Anvin
  0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2008-01-15 13:39 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Huang, Ying, venkatesh.pallipadi, akpm, Thomas Gleixner,
	Ingo Molnar, Andi Kleen, linux-kernel


* H. Peter Anvin <hpa@zytor.com> wrote:

> I did a quick scan over the patchset (not quite awake yet, so I may 
> very well have missed something), but it looks like EFI (again!) is 
> the only user of ioremapping before paging_init().  This makes me 
> wonder if that code can't be restructured so that isn't necessary.

i think that in general making access to unmapped memory a bit easier is 
generally a good robustness idea as ACPI could be impacted by it as 
well.

Fundamentally, paging_init() has obvious dependency on "figuring out the 
memory setup" of the box, and "figuring out the memory setup" means 
interpreting various data structures passed in by the BIOS - some of 
which might be in not yet mapped areas or iommu areas (if we have to do 
some early quirk). So having a robust implementation of ioremap_early() 
sounds like a definitive plus.

	Ingo

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

* RE: [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhancedbt_ioremap
  2008-01-15  9:48   ` Huang, Ying
  2008-01-15 12:52     ` H. Peter Anvin
  2008-01-15 13:36     ` Ingo Molnar
@ 2008-01-16  2:51     ` Pallipadi, Venkatesh
  2 siblings, 0 replies; 8+ messages in thread
From: Pallipadi, Venkatesh @ 2008-01-16  2:51 UTC (permalink / raw)
  To: Huang, Ying, Ingo Molnar
  Cc: akpm, H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Andi Kleen,
	linux-kernel

 

>-----Original Message-----
>From: Huang, Ying 
>Sent: Tuesday, January 15, 2008 1:49 AM
>To: Ingo Molnar; Pallipadi, Venkatesh
>Cc: akpm@linux-foundation.org; H. Peter Anvin; Thomas 
>Gleixner; Ingo Molnar; Andi Kleen; linux-kernel@vger.kernel.org
>Subject: Re: [PATCH -mm 0/3] i386 boot: replace boot_ioremap 
>with enhancedbt_ioremap
>
>On Tue, 2008-01-15 at 09:44 +0100, Ingo Molnar wrote:
>> * Huang, Ying <ying.huang@intel.com> wrote:
>> 
>> > This patchset replaces boot_ioremap with a enhanced version of 
>> > bt_ioremap and renames the bt_ioremap to early_ioremap. 
>This reduces 
>> > 12k from .init.data segment and increases the size of 
>memory that can 
>> > be re-mapped before paging_init to 64k.
>> 
>> in latest x86.git#mm there's an early_ioremap() introduced 
>as part of 
>> the PAT series - available on both 32-bit and 64-bit. Could 
>you take a 
>> look at it and use that if it's OK for your purposes?
>
>After checking the early_ioremap() implementation in
>arch/x86/kernel/setup_32.c, I found that it is a duplication of
>bt_ioremap() implementation in arch/x86/mm/ioremap_32.c. Both
>implementations use set_fixmap(), so they can be used only after
>paging_init().
>
>The early_ioremap implementation provided in this patchset works as
>follow:
>
>- Enhances bt_ioremap, make it usable before paging_init() via a
>dedicated PTE page.
>- Rename bt_ioremap to early_ioremap
>
>So I think maybe we should replace the early_ioremap() 
>implementation in
>PAT series with that of this series.
>

Agreed. PAT can use this for early mappings. Thanks for the patches :)

-Venki

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

end of thread, other threads:[~2008-01-16  2:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-15  5:45 [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhanced bt_ioremap Huang, Ying
2008-01-15  8:44 ` Ingo Molnar
2008-01-15  9:48   ` Huang, Ying
2008-01-15 12:52     ` H. Peter Anvin
2008-01-15 13:39       ` Ingo Molnar
2008-01-15 13:38         ` H. Peter Anvin
2008-01-15 13:36     ` Ingo Molnar
2008-01-16  2:51     ` [PATCH -mm 0/3] i386 boot: replace boot_ioremap with enhancedbt_ioremap Pallipadi, Venkatesh

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).