Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cbb8fc07974073543fdc61da23713ab49ddd3ced
Commit:     cbb8fc07974073543fdc61da23713ab49ddd3ced
Parent:     b228f4c54df37b53c6f364aa7f3efa4280bcc4f0
Author:     Franck Bui-Huu <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 6 16:48:28 2006 +0100
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Dec 12 01:46:24 2006 +0000

    [MIPS] paging_init(): use highend_pfn/highstart_pfn
    
    This patch makes paging_init() use highend_pfn/highstart_pfn globals.
    
    It removes the need of 'high' local which was needed only by HIGHMEM config.
    
    More important perhaps, it fixes a bug when HIGHMEM is set but there's
    actually no physical highmem (highend_pfn = 0)
    
    Signed-off-by: Franck Bui-Huu <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/mm/init.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 9e29ba9..ea2d153 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -316,7 +316,7 @@ static int __init page_is_ram(unsigned long pagenr)
 void __init paging_init(void)
 {
        unsigned long zones_size[MAX_NR_ZONES] = { 0, };
-       unsigned long max_dma, high, low;
+       unsigned long max_dma, low;
 #ifndef CONFIG_FLATMEM
        unsigned long zholes_size[MAX_NR_ZONES] = { 0, };
        unsigned long i, j, pfn;
@@ -331,7 +331,6 @@ void __init paging_init(void)
 
        max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
        low = max_low_pfn;
-       high = highend_pfn;
 
 #ifdef CONFIG_ISA
        if (low < max_dma)
@@ -344,13 +343,13 @@ void __init paging_init(void)
        zones_size[ZONE_DMA] = low;
 #endif
 #ifdef CONFIG_HIGHMEM
-       if (cpu_has_dc_aliases) {
-               printk(KERN_WARNING "This processor doesn't support highmem.");
-               if (high - low)
-                       printk(" %ldk highmem ignored", high - low);
-               printk("\n");
-       } else
-               zones_size[ZONE_HIGHMEM] = high - low;
+       zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn;
+
+       if (cpu_has_dc_aliases && zones_size[ZONE_HIGHMEM]) {
+               printk(KERN_WARNING "This processor doesn't support highmem."
+                      " %ldk highmem ignored\n", zones_size[ZONE_HIGHMEM]);
+               zones_size[ZONE_HIGHMEM] = 0;
+       }
 #endif
 
 #ifdef CONFIG_FLATMEM
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to