Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8559840c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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
parents 7e2f037b 58a69c36
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -164,7 +164,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)


	nd = (struct ia64_mca_notify_die *)args->err;
	nd = (struct ia64_mca_notify_die *)args->err;
	/* Reason code 1 means machine check rendezous*/
	/* 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)
		 nd->sos->rv_rc == 1)
		return NOTIFY_DONE;
		return NOTIFY_DONE;


+15 −7
Original line number Original line Diff line number Diff line
@@ -692,12 +692,15 @@ struct seq_operations cpuinfo_op = {
	.show =		show_cpuinfo
	.show =		show_cpuinfo
};
};


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


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


	memcpy(brand, "Unknown", 8);
	memcpy(brand, "Unknown", 8);
	if (ia64_pal_get_brand_info(brand)) {
	if (ia64_pal_get_brand_info(brand)) {
@@ -709,12 +712,17 @@ get_model_name(__u8 family, __u8 model)
			case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
			case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
		}
		}
	}
	}
	if (brandname[0] == '\0')
	for (i = 0; i < MAX_BRANDS; i++)
		return strcpy(brandname, brand);
		if (strcmp(brandname[i], brand) == 0)
	else if (strcmp(brandname, brand) == 0)
			return brandname[i];
		return brandname;
	for (i = 0; i < MAX_BRANDS; i++)
	else
		if (brandname[i][0] == '\0')
		return kstrdup(brand, GFP_KERNEL);
			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
static void __cpuinit
+6 −24
Original line number Original line Diff line number Diff line
@@ -96,26 +96,6 @@ void show_mem(void)
/* physical address where the bootmem map is located */
/* physical address where the bootmem map is located */
unsigned long bootmap_start;
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
 * find_bootmap_location - callback to find a memory area for the bootmap
 * @start: start of region
 * @start: start of region
@@ -177,9 +157,10 @@ find_memory (void)
	reserve_memory();
	reserve_memory();


	/* first find highest page frame number */
	/* first find highest page frame number */
	max_pfn = 0;
	min_low_pfn = ~0UL;
	efi_memmap_walk(find_max_pfn, &max_pfn);
	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 */
	/* how many bytes to cover all the pages */
	bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT;
	bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT;


@@ -189,7 +170,8 @@ find_memory (void)
	if (bootmap_start == ~0UL)
	if (bootmap_start == ~0UL)
		panic("Cannot find %ld bytes for bootmap\n", bootmap_size);
		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. */
	/* Free all available memory, then mark bootmem-map as being in use. */
	efi_memmap_walk(filter_rsvd_memory, free_bootmem);
	efi_memmap_walk(filter_rsvd_memory, free_bootmem);
+1 −3
Original line number Original line Diff line number Diff line
@@ -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);
		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;
	return 0;
}
}


@@ -438,6 +435,7 @@ void __init find_memory(void)
	/* These actually end up getting called by call_pernode_memory() */
	/* 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, build_node_maps);
	efi_memmap_walk(filter_rsvd_memory, find_pernode_space);
	efi_memmap_walk(filter_rsvd_memory, find_pernode_space);
	efi_memmap_walk(find_max_min_low_pfn, NULL);


	for_each_online_node(node)
	for_each_online_node(node)
		if (mem_data[node].bootmem_data.node_low_pfn) {
		if (mem_data[node].bootmem_data.node_low_pfn) {
+16 −0
Original line number Original line Diff line number Diff line
@@ -648,6 +648,22 @@ count_reserved_pages (u64 start, u64 end, void *arg)
	return 0;
	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
 * 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
 * system call handler.  When this option is in effect, all fsyscalls will end up bubbling
Loading