Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Fix wrong /proc/iomem on SGI Altix
[IA64] Altix: ioremap vga_console_iobase
[IA64] Fix typo/thinko in crash.c
[IA64] Fix get_model_name() for mixed cpu type systems
[IA64] min_low_pfn and max_low_pfn calculation fix

+43 -38
+1 -1
arch/ia64/kernel/crash.c
··· 164 164 165 165 nd = (struct ia64_mca_notify_die *)args->err; 166 166 /* Reason code 1 means machine check rendezous*/ 167 - if ((val == DIE_INIT_MONARCH_ENTER || DIE_INIT_SLAVE_ENTER) && 167 + if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) && 168 168 nd->sos->rv_rc == 1) 169 169 return NOTIFY_DONE; 170 170
+15 -7
arch/ia64/kernel/setup.c
··· 692 692 .show = show_cpuinfo 693 693 }; 694 694 695 - static char brandname[128]; 695 + #define MAX_BRANDS 8 696 + static char brandname[MAX_BRANDS][128]; 696 697 697 698 static char * __cpuinit 698 699 get_model_name(__u8 family, __u8 model) 699 700 { 701 + static int overflow; 700 702 char brand[128]; 703 + int i; 701 704 702 705 memcpy(brand, "Unknown", 8); 703 706 if (ia64_pal_get_brand_info(brand)) { ··· 712 709 case 2: memcpy(brand, "Madison up to 9M cache", 23); break; 713 710 } 714 711 } 715 - if (brandname[0] == '\0') 716 - return strcpy(brandname, brand); 717 - else if (strcmp(brandname, brand) == 0) 718 - return brandname; 719 - else 720 - return kstrdup(brand, GFP_KERNEL); 712 + for (i = 0; i < MAX_BRANDS; i++) 713 + if (strcmp(brandname[i], brand) == 0) 714 + return brandname[i]; 715 + for (i = 0; i < MAX_BRANDS; i++) 716 + if (brandname[i][0] == '\0') 717 + return strcpy(brandname[i], brand); 718 + if (overflow++ == 0) 719 + printk(KERN_ERR 720 + "%s: Table overflow. Some processor model information will be missing\n", 721 + __FUNCTION__); 722 + return "Unknown"; 721 723 } 722 724 723 725 static void __cpuinit
+6 -24
arch/ia64/mm/contig.c
··· 97 97 unsigned long bootmap_start; 98 98 99 99 /** 100 - * find_max_pfn - adjust the maximum page number callback 101 - * @start: start of range 102 - * @end: end of range 103 - * @arg: address of pointer to global max_pfn variable 104 - * 105 - * Passed as a callback function to efi_memmap_walk() to determine the highest 106 - * available page frame number in the system. 107 - */ 108 - int 109 - find_max_pfn (unsigned long start, unsigned long end, void *arg) 110 - { 111 - unsigned long *max_pfnp = arg, pfn; 112 - 113 - pfn = (PAGE_ALIGN(end - 1) - PAGE_OFFSET) >> PAGE_SHIFT; 114 - if (pfn > *max_pfnp) 115 - *max_pfnp = pfn; 116 - return 0; 117 - } 118 - 119 - /** 120 100 * find_bootmap_location - callback to find a memory area for the bootmap 121 101 * @start: start of region 122 102 * @end: end of region ··· 157 177 reserve_memory(); 158 178 159 179 /* first find highest page frame number */ 160 - max_pfn = 0; 161 - efi_memmap_walk(find_max_pfn, &max_pfn); 162 - 180 + min_low_pfn = ~0UL; 181 + max_low_pfn = 0; 182 + efi_memmap_walk(find_max_min_low_pfn, NULL); 183 + max_pfn = max_low_pfn; 163 184 /* how many bytes to cover all the pages */ 164 185 bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT; 165 186 ··· 170 189 if (bootmap_start == ~0UL) 171 190 panic("Cannot find %ld bytes for bootmap\n", bootmap_size); 172 191 173 - bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn); 192 + bootmap_size = init_bootmem_node(NODE_DATA(0), 193 + (bootmap_start >> PAGE_SHIFT), 0, max_pfn); 174 194 175 195 /* Free all available memory, then mark bootmem-map as being in use. */ 176 196 efi_memmap_walk(filter_rsvd_memory, free_bootmem);
+1 -3
arch/ia64/mm/discontig.c
··· 88 88 bdp->node_low_pfn = max(epfn, bdp->node_low_pfn); 89 89 } 90 90 91 - min_low_pfn = min(min_low_pfn, bdp->node_boot_start>>PAGE_SHIFT); 92 - max_low_pfn = max(max_low_pfn, bdp->node_low_pfn); 93 - 94 91 return 0; 95 92 } 96 93 ··· 435 438 /* These actually end up getting called by call_pernode_memory() */ 436 439 efi_memmap_walk(filter_rsvd_memory, build_node_maps); 437 440 efi_memmap_walk(filter_rsvd_memory, find_pernode_space); 441 + efi_memmap_walk(find_max_min_low_pfn, NULL); 438 442 439 443 for_each_online_node(node) 440 444 if (mem_data[node].bootmem_data.node_low_pfn) {
+16
arch/ia64/mm/init.c
··· 648 648 return 0; 649 649 } 650 650 651 + int 652 + find_max_min_low_pfn (unsigned long start, unsigned long end, void *arg) 653 + { 654 + unsigned long pfn_start, pfn_end; 655 + #ifdef CONFIG_FLATMEM 656 + pfn_start = (PAGE_ALIGN(__pa(start))) >> PAGE_SHIFT; 657 + pfn_end = (PAGE_ALIGN(__pa(end - 1))) >> PAGE_SHIFT; 658 + #else 659 + pfn_start = GRANULEROUNDDOWN(__pa(start)) >> PAGE_SHIFT; 660 + pfn_end = GRANULEROUNDUP(__pa(end - 1)) >> PAGE_SHIFT; 661 + #endif 662 + min_low_pfn = min(min_low_pfn, pfn_start); 663 + max_low_pfn = max(max_low_pfn, pfn_end); 664 + return 0; 665 + } 666 + 651 667 /* 652 668 * Boot command-line option "nolwsys" can be used to disable the use of any light-weight 653 669 * system call handler. When this option is in effect, all fsyscalls will end up bubbling
+3 -3
arch/ia64/sn/kernel/setup.c
··· 348 348 continue; /* not PCI interconnect */ 349 349 350 350 if (if_pci.translation & PCDP_PCI_TRANS_IOPORT) 351 - vga_console_iobase = 352 - if_pci.ioport_tra | __IA64_UNCACHED_OFFSET; 351 + vga_console_iobase = if_pci.ioport_tra; 353 352 354 353 if (if_pci.translation & PCDP_PCI_TRANS_MMIO) 355 354 vga_console_membase = ··· 428 429 * bus containing the VGA console. 429 430 */ 430 431 if (vga_console_iobase) { 431 - io_space[0].mmio_base = vga_console_iobase; 432 + io_space[0].mmio_base = 433 + (unsigned long) ioremap(vga_console_iobase, 0); 432 434 io_space[0].sparse = 0; 433 435 } 434 436
+1
include/asm-ia64/meminit.h
··· 36 36 extern void find_initrd (void); 37 37 extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); 38 38 extern void efi_memmap_init(unsigned long *, unsigned long *); 39 + extern int find_max_min_low_pfn (unsigned long , unsigned long, void *); 39 40 40 41 extern unsigned long vmcore_find_descriptor_size(unsigned long address); 41 42 extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end);