Skip to content

Commit

Permalink
sparc32: move probe_memory() to srmmu.c
Browse files Browse the repository at this point in the history
Only one user so move it to the file using it.
It had nothing to do in fault_32.

Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
sravnborg authored and davem330 committed Jul 26, 2012
1 parent 2acdf2c commit d8a1b2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
12 changes: 0 additions & 12 deletions arch/sparc/mm/fault_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@

int show_unhandled_signals = 1;

/* Return how much physical memory we have. */
unsigned long probe_memory(void)
{
unsigned long total = 0;
int i;

for (i = 0; sp_banks[i].num_bytes; i++)
total += sp_banks[i].num_bytes;

return total;
}

static void unhandled_fault(unsigned long, struct task_struct *,
struct pt_regs *) __attribute__ ((noreturn));

Expand Down
12 changes: 11 additions & 1 deletion arch/sparc/mm/srmmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,17 @@ void srmmu_free_nocache(void *addr, int size)
static void srmmu_early_allocate_ptable_skeleton(unsigned long start,
unsigned long end);

extern unsigned long probe_memory(void); /* in fault.c */
/* Return how much physical memory we have. */
static unsigned long __init probe_memory(void)
{
unsigned long total = 0;
int i;

for (i = 0; sp_banks[i].num_bytes; i++)
total += sp_banks[i].num_bytes;

return total;
}

/*
* Reserve nocache dynamically proportionally to the amount of
Expand Down

0 comments on commit d8a1b2b

Please sign in to comment.