diff options
Diffstat (limited to 'arch/tile/kernel/setup.c')
| -rw-r--r-- | arch/tile/kernel/setup.c | 36 | 
1 files changed, 21 insertions, 15 deletions
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c index 5f85d8b34db..bff23f47611 100644 --- a/arch/tile/kernel/setup.c +++ b/arch/tile/kernel/setup.c @@ -103,13 +103,11 @@ unsigned long __initdata pci_reserve_end_pfn = -1U;  static int __init setup_maxmem(char *str)  { -	long maxmem_mb; -	if (str == NULL || strict_strtol(str, 0, &maxmem_mb) != 0 || -	    maxmem_mb == 0) +	unsigned long long maxmem; +	if (str == NULL || (maxmem = memparse(str, NULL)) == 0)  		return -EINVAL; -	maxmem_pfn = (maxmem_mb >> (HPAGE_SHIFT - 20)) << -		(HPAGE_SHIFT - PAGE_SHIFT); +	maxmem_pfn = (maxmem >> HPAGE_SHIFT) << (HPAGE_SHIFT - PAGE_SHIFT);  	pr_info("Forcing RAM used to no more than %dMB\n",  	       maxmem_pfn >> (20 - PAGE_SHIFT));  	return 0; @@ -119,14 +117,15 @@ early_param("maxmem", setup_maxmem);  static int __init setup_maxnodemem(char *str)  {  	char *endp; -	long maxnodemem_mb, node; +	unsigned long long maxnodemem; +	long node;  	node = str ? simple_strtoul(str, &endp, 0) : INT_MAX; -	if (node >= MAX_NUMNODES || *endp != ':' || -	    strict_strtol(endp+1, 0, &maxnodemem_mb) != 0) +	if (node >= MAX_NUMNODES || *endp != ':')  		return -EINVAL; -	maxnodemem_pfn[node] = (maxnodemem_mb >> (HPAGE_SHIFT - 20)) << +	maxnodemem = memparse(endp+1, NULL); +	maxnodemem_pfn[node] = (maxnodemem >> HPAGE_SHIFT) <<  		(HPAGE_SHIFT - PAGE_SHIFT);  	pr_info("Forcing RAM used on node %ld to no more than %dMB\n",  	       node, maxnodemem_pfn[node] >> (20 - PAGE_SHIFT)); @@ -913,6 +912,13 @@ void __cpuinit setup_cpu(int boot)  #ifdef CONFIG_BLK_DEV_INITRD +/* + * Note that the kernel can potentially support other compression + * techniques than gz, though we don't do so by default.  If we ever + * decide to do so we can either look for other filename extensions, + * or just allow a file with this name to be compressed with an + * arbitrary compressor (somewhat counterintuitively). + */  static int __initdata set_initramfs_file;  static char __initdata initramfs_file[128] = "initramfs.cpio.gz"; @@ -928,9 +934,9 @@ static int __init setup_initramfs_file(char *str)  early_param("initramfs_file", setup_initramfs_file);  /* - * We look for an additional "initramfs.cpio.gz" file in the hvfs. + * We look for an "initramfs.cpio.gz" file in the hvfs.   * If there is one, we allocate some memory for it and it will be - * unpacked to the initramfs after any built-in initramfs_data. + * unpacked to the initramfs.   */  static void __init load_hv_initrd(void)  { @@ -1100,7 +1106,7 @@ EXPORT_SYMBOL(hash_for_home_map);  /*   * cpu_cacheable_map lists all the cpus whose caches the hypervisor can - * flush on our behalf.  It is set to cpu_possible_map OR'ed with + * flush on our behalf.  It is set to cpu_possible_mask OR'ed with   * hash_for_home_map, and it is what should be passed to   * hv_flush_remote() to flush all caches.  Note that if there are   * dedicated hypervisor driver tiles that have authorized use of their @@ -1186,7 +1192,7 @@ static void __init setup_cpu_maps(void)  			      sizeof(cpu_lotar_map));  	if (rc < 0) {  		pr_err("warning: no HV_INQ_TILES_LOTAR; using AVAIL\n"); -		cpu_lotar_map = cpu_possible_map; +		cpu_lotar_map = *cpu_possible_mask;  	}  #if CHIP_HAS_CBOX_HOME_MAP() @@ -1196,9 +1202,9 @@ static void __init setup_cpu_maps(void)  			      sizeof(hash_for_home_map));  	if (rc < 0)  		early_panic("hv_inquire_tiles(HFH_CACHE) failed: rc %d\n", rc); -	cpumask_or(&cpu_cacheable_map, &cpu_possible_map, &hash_for_home_map); +	cpumask_or(&cpu_cacheable_map, cpu_possible_mask, &hash_for_home_map);  #else -	cpu_cacheable_map = cpu_possible_map; +	cpu_cacheable_map = *cpu_possible_mask;  #endif  }  |