Skip to content

Commit

Permalink
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/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
  • Loading branch information
Linus Torvalds committed Mar 22, 2007
2 parents 7e2f037 + 58a69c3 commit 8559840
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 38 deletions.
2 changes: 1 addition & 1 deletion arch/ia64/kernel/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)

nd = (struct ia64_mca_notify_die *)args->err;
/* Reason code 1 means machine check rendezous*/
if ((val == DIE_INIT_MONARCH_ENTER || DIE_INIT_SLAVE_ENTER) &&
if ((val == DIE_INIT_MONARCH_ENTER || val == DIE_INIT_SLAVE_ENTER) &&
nd->sos->rv_rc == 1)
return NOTIFY_DONE;

Expand Down
22 changes: 15 additions & 7 deletions arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,12 +692,15 @@ struct seq_operations cpuinfo_op = {
.show = show_cpuinfo
};

static char brandname[128];
#define MAX_BRANDS 8
static char brandname[MAX_BRANDS][128];

static char * __cpuinit
get_model_name(__u8 family, __u8 model)
{
static int overflow;
char brand[128];
int i;

memcpy(brand, "Unknown", 8);
if (ia64_pal_get_brand_info(brand)) {
Expand All @@ -709,12 +712,17 @@ get_model_name(__u8 family, __u8 model)
case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
}
}
if (brandname[0] == '\0')
return strcpy(brandname, brand);
else if (strcmp(brandname, brand) == 0)
return brandname;
else
return kstrdup(brand, GFP_KERNEL);
for (i = 0; i < MAX_BRANDS; i++)
if (strcmp(brandname[i], brand) == 0)
return brandname[i];
for (i = 0; i < MAX_BRANDS; i++)
if (brandname[i][0] == '\0')
return strcpy(brandname[i], brand);
if (overflow++ == 0)
printk(KERN_ERR
"%s: Table overflow. Some processor model information will be missing\n",
__FUNCTION__);
return "Unknown";
}

static void __cpuinit
Expand Down
30 changes: 6 additions & 24 deletions arch/ia64/mm/contig.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,26 +96,6 @@ void show_mem(void)
/* physical address where the bootmem map is located */
unsigned long bootmap_start;

/**
* find_max_pfn - adjust the maximum page number callback
* @start: start of range
* @end: end of range
* @arg: address of pointer to global max_pfn variable
*
* Passed as a callback function to efi_memmap_walk() to determine the highest
* available page frame number in the system.
*/
int
find_max_pfn (unsigned long start, unsigned long end, void *arg)
{
unsigned long *max_pfnp = arg, pfn;

pfn = (PAGE_ALIGN(end - 1) - PAGE_OFFSET) >> PAGE_SHIFT;
if (pfn > *max_pfnp)
*max_pfnp = pfn;
return 0;
}

/**
* find_bootmap_location - callback to find a memory area for the bootmap
* @start: start of region
Expand Down Expand Up @@ -177,9 +157,10 @@ find_memory (void)
reserve_memory();

/* first find highest page frame number */
max_pfn = 0;
efi_memmap_walk(find_max_pfn, &max_pfn);

min_low_pfn = ~0UL;
max_low_pfn = 0;
efi_memmap_walk(find_max_min_low_pfn, NULL);
max_pfn = max_low_pfn;
/* how many bytes to cover all the pages */
bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT;

Expand All @@ -189,7 +170,8 @@ find_memory (void)
if (bootmap_start == ~0UL)
panic("Cannot find %ld bytes for bootmap\n", bootmap_size);

bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn);
bootmap_size = init_bootmem_node(NODE_DATA(0),
(bootmap_start >> PAGE_SHIFT), 0, max_pfn);

/* Free all available memory, then mark bootmem-map as being in use. */
efi_memmap_walk(filter_rsvd_memory, free_bootmem);
Expand Down
4 changes: 1 addition & 3 deletions arch/ia64/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ static int __init build_node_maps(unsigned long start, unsigned long len,
bdp->node_low_pfn = max(epfn, bdp->node_low_pfn);
}

min_low_pfn = min(min_low_pfn, bdp->node_boot_start>>PAGE_SHIFT);
max_low_pfn = max(max_low_pfn, bdp->node_low_pfn);

return 0;
}

Expand Down Expand Up @@ -438,6 +435,7 @@ void __init find_memory(void)
/* These actually end up getting called by call_pernode_memory() */
efi_memmap_walk(filter_rsvd_memory, build_node_maps);
efi_memmap_walk(filter_rsvd_memory, find_pernode_space);
efi_memmap_walk(find_max_min_low_pfn, NULL);

for_each_online_node(node)
if (mem_data[node].bootmem_data.node_low_pfn) {
Expand Down
16 changes: 16 additions & 0 deletions arch/ia64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,22 @@ count_reserved_pages (u64 start, u64 end, void *arg)
return 0;
}

int
find_max_min_low_pfn (unsigned long start, unsigned long end, void *arg)
{
unsigned long pfn_start, pfn_end;
#ifdef CONFIG_FLATMEM
pfn_start = (PAGE_ALIGN(__pa(start))) >> PAGE_SHIFT;
pfn_end = (PAGE_ALIGN(__pa(end - 1))) >> PAGE_SHIFT;
#else
pfn_start = GRANULEROUNDDOWN(__pa(start)) >> PAGE_SHIFT;
pfn_end = GRANULEROUNDUP(__pa(end - 1)) >> PAGE_SHIFT;
#endif
min_low_pfn = min(min_low_pfn, pfn_start);
max_low_pfn = max(max_low_pfn, pfn_end);
return 0;
}

/*
* Boot command-line option "nolwsys" can be used to disable the use of any light-weight
* system call handler. When this option is in effect, all fsyscalls will end up bubbling
Expand Down
6 changes: 3 additions & 3 deletions arch/ia64/sn/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ sn_scan_pcdp(void)
continue; /* not PCI interconnect */

if (if_pci.translation & PCDP_PCI_TRANS_IOPORT)
vga_console_iobase =
if_pci.ioport_tra | __IA64_UNCACHED_OFFSET;
vga_console_iobase = if_pci.ioport_tra;

if (if_pci.translation & PCDP_PCI_TRANS_MMIO)
vga_console_membase =
Expand Down Expand Up @@ -429,7 +428,8 @@ void __init sn_setup(char **cmdline_p)
* bus containing the VGA console.
*/
if (vga_console_iobase) {
io_space[0].mmio_base = vga_console_iobase;
io_space[0].mmio_base =
(unsigned long) ioremap(vga_console_iobase, 0);
io_space[0].sparse = 0;
}

Expand Down
1 change: 1 addition & 0 deletions include/asm-ia64/meminit.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ extern void reserve_memory (void);
extern void find_initrd (void);
extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg);
extern void efi_memmap_init(unsigned long *, unsigned long *);
extern int find_max_min_low_pfn (unsigned long , unsigned long, void *);

extern unsigned long vmcore_find_descriptor_size(unsigned long address);
extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end);
Expand Down

0 comments on commit 8559840

Please sign in to comment.