Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298847
b: refs/heads/master
c: bfffe79
h: refs/heads/master
i:
  298845: b2aea41
  298843: 58cd313
  298839: c684daa
  298831: 7c3654b
  298815: 37f2907
v: v3
  • Loading branch information
Chris Metcalf committed Apr 2, 2012
1 parent bba58bc commit f615e23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 719ea79e330c5e1a17fb7e4cf352a81e4c84cff5
refs/heads/master: bfffe79bc29a9c4c817d5f51590961220e26db1a
17 changes: 8 additions & 9 deletions trunk/arch/tile/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
Expand Down

0 comments on commit f615e23

Please sign in to comment.