From: Wu Zhangjin <wuzhangjin@xxxxxxxxx> Signed-off-by: Wu Zhangjin <wuzhangjin@xxxxxxxxx> --- arch/mips/loongson/common/mem.c | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c index 45991af..312c765 100644 --- a/arch/mips/loongson/common/mem.c +++ b/arch/mips/loongson/common/mem.c @@ -16,10 +16,11 @@ void __init prom_init_memory(void) { - add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM); + add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM); - add_memory_region(memsize << 20, LOONGSON_PCI_MEM_START - (memsize << - 20), BOOT_MEM_RESERVED); + add_memory_region(memsize << 20, + LOONGSON_PCI_MEM_START - (memsize << 20), + BOOT_MEM_RESERVED); #ifdef CONFIG_64BIT #ifdef CONFIG_CPU_LOONGSON2F { @@ -36,16 +37,16 @@ void __init prom_init_memory(void) 0x80000000ul, (1 << bit)); mmiowb(); } -#endif /* CONFIG_CPU_LOONGSON2F */ +#endif /* CONFIG_CPU_LOONGSON2F */ - if (highmemsize > 0) - add_memory_region(LOONGSON_HIGHMEM_START, - highmemsize << 20, BOOT_MEM_RAM); + if (highmemsize > 0) + add_memory_region(LOONGSON_HIGHMEM_START, + highmemsize << 20, BOOT_MEM_RAM); - add_memory_region(LOONGSON_PCI_MEM_END + 1, LOONGSON_HIGHMEM_START - - LOONGSON_PCI_MEM_END - 1, BOOT_MEM_RESERVED); + add_memory_region(LOONGSON_PCI_MEM_END + 1, LOONGSON_HIGHMEM_START - + LOONGSON_PCI_MEM_END - 1, BOOT_MEM_RESERVED); -#endif /* CONFIG_64BIT */ +#endif /* CONFIG_64BIT */ } /* override of arch/mips/mm/cache.c: __uncached_access */ @@ -55,6 +56,6 @@ int __uncached_access(struct file *file, unsigned long addr) return 1; return addr >= __pa(high_memory) || - ((addr >= LOONGSON_MMIO_MEM_START) && - (addr < LOONGSON_MMIO_MEM_END)); + ((addr >= LOONGSON_MMIO_MEM_START) && + (addr < LOONGSON_MMIO_MEM_END)); } -- 1.6.2.1