aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-21 22:45:50 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-21 22:45:50 -0400
commit8559840c4ca3f2fff73a882803bc8916078fac1f (patch)
treee41f722a478d2e9f199398d4a766b004fd451ebc /arch
parent7e2f037b9226452de60a74e94e5c42d3e54c8637 (diff)
parent58a69c367c02a165004a5ce5dd55ce03b59ba43d (diff)
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
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/crash.c2
-rw-r--r--arch/ia64/kernel/setup.c22
-rw-r--r--arch/ia64/mm/contig.c30
-rw-r--r--arch/ia64/mm/discontig.c4
-rw-r--r--arch/ia64/mm/init.c16
-rw-r--r--arch/ia64/sn/kernel/setup.c6
6 files changed, 42 insertions, 38 deletions
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index 7d1bbb4403ba..80a94e707827 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -164,7 +164,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
164 164
165 nd = (struct ia64_mca_notify_die *)args->err; 165 nd = (struct ia64_mca_notify_die *)args->err;
166 /* Reason code 1 means machine check rendezous*/ 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 nd->sos->rv_rc == 1) 168 nd->sos->rv_rc == 1)
169 return NOTIFY_DONE; 169 return NOTIFY_DONE;
170 170
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 339e8a54c2f1..69b9bb3fd7c5 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -692,12 +692,15 @@ struct seq_operations cpuinfo_op = {
692 .show = show_cpuinfo 692 .show = show_cpuinfo
693}; 693};
694 694
695static char brandname[128]; 695#define MAX_BRANDS 8
696static char brandname[MAX_BRANDS][128];
696 697
697static char * __cpuinit 698static char * __cpuinit
698get_model_name(__u8 family, __u8 model) 699get_model_name(__u8 family, __u8 model)
699{ 700{
701 static int overflow;
700 char brand[128]; 702 char brand[128];
703 int i;
701 704
702 memcpy(brand, "Unknown", 8); 705 memcpy(brand, "Unknown", 8);
703 if (ia64_pal_get_brand_info(brand)) { 706 if (ia64_pal_get_brand_info(brand)) {
@@ -709,12 +712,17 @@ get_model_name(__u8 family, __u8 model)
709 case 2: memcpy(brand, "Madison up to 9M cache", 23); break; 712 case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
710 } 713 }
711 } 714 }
712 if (brandname[0] == '\0') 715 for (i = 0; i < MAX_BRANDS; i++)
713 return strcpy(brandname, brand); 716 if (strcmp(brandname[i], brand) == 0)
714 else if (strcmp(brandname, brand) == 0) 717 return brandname[i];
715 return brandname; 718 for (i = 0; i < MAX_BRANDS; i++)
716 else 719 if (brandname[i][0] == '\0')
717 return kstrdup(brand, GFP_KERNEL); 720 return strcpy(brandname[i], brand);
721 if (overflow++ == 0)
722 printk(KERN_ERR
723 "%s: Table overflow. Some processor model information will be missing\n",
724 __FUNCTION__);
725 return "Unknown";
718} 726}
719 727
720static void __cpuinit 728static void __cpuinit
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index fb0f4698f5d0..44ce5ed9444c 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -97,26 +97,6 @@ void show_mem(void)
97unsigned long bootmap_start; 97unsigned 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 */
108int
109find_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 * find_bootmap_location - callback to find a memory area for the bootmap 100 * find_bootmap_location - callback to find a memory area for the bootmap
121 * @start: start of region 101 * @start: start of region
122 * @end: end of region 102 * @end: end of region
@@ -177,9 +157,10 @@ find_memory (void)
177 reserve_memory(); 157 reserve_memory();
178 158
179 /* first find highest page frame number */ 159 /* first find highest page frame number */
180 max_pfn = 0; 160 min_low_pfn = ~0UL;
181 efi_memmap_walk(find_max_pfn, &max_pfn); 161 max_low_pfn = 0;
182 162 efi_memmap_walk(find_max_min_low_pfn, NULL);
163 max_pfn = max_low_pfn;
183 /* how many bytes to cover all the pages */ 164 /* how many bytes to cover all the pages */
184 bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT; 165 bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT;
185 166
@@ -189,7 +170,8 @@ find_memory (void)
189 if (bootmap_start == ~0UL) 170 if (bootmap_start == ~0UL)
190 panic("Cannot find %ld bytes for bootmap\n", bootmap_size); 171 panic("Cannot find %ld bytes for bootmap\n", bootmap_size);
191 172
192 bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn); 173 bootmap_size = init_bootmem_node(NODE_DATA(0),
174 (bootmap_start >> PAGE_SHIFT), 0, max_pfn);
193 175
194 /* Free all available memory, then mark bootmem-map as being in use. */ 176 /* Free all available memory, then mark bootmem-map as being in use. */
195 efi_memmap_walk(filter_rsvd_memory, free_bootmem); 177 efi_memmap_walk(filter_rsvd_memory, free_bootmem);
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 11a2d8825d89..872da7a2accd 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -88,9 +88,6 @@ static int __init build_node_maps(unsigned long start, unsigned long len,
88 bdp->node_low_pfn = max(epfn, bdp->node_low_pfn); 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 return 0; 91 return 0;
95} 92}
96 93
@@ -438,6 +435,7 @@ void __init find_memory(void)
438 /* These actually end up getting called by call_pernode_memory() */ 435 /* These actually end up getting called by call_pernode_memory() */
439 efi_memmap_walk(filter_rsvd_memory, build_node_maps); 436 efi_memmap_walk(filter_rsvd_memory, build_node_maps);
440 efi_memmap_walk(filter_rsvd_memory, find_pernode_space); 437 efi_memmap_walk(filter_rsvd_memory, find_pernode_space);
438 efi_memmap_walk(find_max_min_low_pfn, NULL);
441 439
442 for_each_online_node(node) 440 for_each_online_node(node)
443 if (mem_data[node].bootmem_data.node_low_pfn) { 441 if (mem_data[node].bootmem_data.node_low_pfn) {
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index f225dd72968b..c8da621aab17 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -648,6 +648,22 @@ count_reserved_pages (u64 start, u64 end, void *arg)
648 return 0; 648 return 0;
649} 649}
650 650
651int
652find_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 * Boot command-line option "nolwsys" can be used to disable the use of any light-weight 668 * Boot command-line option "nolwsys" can be used to disable the use of any light-weight
653 * system call handler. When this option is in effect, all fsyscalls will end up bubbling 669 * system call handler. When this option is in effect, all fsyscalls will end up bubbling
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index bd5373d593e1..a9bed5ca2ed8 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -348,8 +348,7 @@ sn_scan_pcdp(void)
348 continue; /* not PCI interconnect */ 348 continue; /* not PCI interconnect */
349 349
350 if (if_pci.translation & PCDP_PCI_TRANS_IOPORT) 350 if (if_pci.translation & PCDP_PCI_TRANS_IOPORT)
351 vga_console_iobase = 351 vga_console_iobase = if_pci.ioport_tra;
352 if_pci.ioport_tra | __IA64_UNCACHED_OFFSET;
353 352
354 if (if_pci.translation & PCDP_PCI_TRANS_MMIO) 353 if (if_pci.translation & PCDP_PCI_TRANS_MMIO)
355 vga_console_membase = 354 vga_console_membase =
@@ -429,7 +428,8 @@ void __init sn_setup(char **cmdline_p)
429 * bus containing the VGA console. 428 * bus containing the VGA console.
430 */ 429 */
431 if (vga_console_iobase) { 430 if (vga_console_iobase) {
432 io_space[0].mmio_base = vga_console_iobase; 431 io_space[0].mmio_base =
432 (unsigned long) ioremap(vga_console_iobase, 0);
433 io_space[0].sparse = 0; 433 io_space[0].sparse = 0;
434 } 434 }
435 435