lkml.org 
[lkml]   [2010]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + x86-fix-handling-of-the-reservetop-boot-option.patch added to -mm tree
On 04/07/2010 06:53 PM, Liang Li wrote:
> Does this similar modification like this is more preferred?
>
> diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
> index a1dcfa3..30a3e97 100644
> --- a/arch/x86/include/asm/io.h
> +++ b/arch/x86/include/asm/io.h
> @@ -347,6 +347,7 @@ extern void __iomem *early_ioremap(resource_size_t phys_addr,
> extern void __iomem *early_memremap(resource_size_t phys_addr,
> unsigned long size);
> extern void early_iounmap(void __iomem *addr, unsigned long size);
> +extern void fixup_early_ioremap(void);
>
> #define IO_SPACE_LIMIT 0xffff
>
> diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
> index ea82ef0..fe06296 100644
> --- a/arch/x86/mm/ioremap.c
> +++ b/arch/x86/mm/ioremap.c
> @@ -448,6 +448,23 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx)
> static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata;
> static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata;
>
> +void __init fixup_early_ioremap(void)
> +{
> + int i;
> + for (i = 0; i < FIX_BTMAPS_SLOTS; i++) {
> + if (prev_map[i])
> + break;
> + }
> +
> + if (i == FIX_BTMAPS_SLOTS)
<
> + WARN_ON(1);
BUG_ON()
> +
> + for (i = 0; i < FIX_BTMAPS_SLOTS; i++)
> + slot_virt[i] = __fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS * i);
> +
need to clear the old PMD, and set new PMD.

so you can clear old PMD and call early_ioremap_init() in fixup_early_ioremap()


Thanks

Yinghai


\
 
 \ /
  Last update: 2010-04-08 06:37    [W:0.064 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site