aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/include/asm/oplib_32.h10
-rw-r--r--arch/sparc/prom/Makefile1
-rw-r--r--arch/sparc/prom/palloc.c43
3 files changed, 0 insertions, 54 deletions
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h
index 31d2249d326b..91411bc2d4c0 100644
--- a/arch/sparc/include/asm/oplib_32.h
+++ b/arch/sparc/include/asm/oplib_32.h
@@ -114,16 +114,6 @@ extern int prom_idlecpu(int cpunode);
114/* Re-Start the CPU with the passed device tree node. */ 114/* Re-Start the CPU with the passed device tree node. */
115extern int prom_restartcpu(int cpunode); 115extern int prom_restartcpu(int cpunode);
116 116
117/* PROM memory allocation facilities... */
118
119/* Allocated at possibly the given virtual address a chunk of the
120 * indicated size.
121 */
122extern char *prom_alloc(char *virt_hint, unsigned int size);
123
124/* Free a previously allocated chunk. */
125extern void prom_free(char *virt_addr, unsigned int size);
126
127/* Sun4/sun4c specific memory-management startup hook. */ 117/* Sun4/sun4c specific memory-management startup hook. */
128 118
129/* Map the passed segment in the given context at the passed 119/* Map the passed segment in the given context at the passed
diff --git a/arch/sparc/prom/Makefile b/arch/sparc/prom/Makefile
index 113e6302a6ec..8287bbe88768 100644
--- a/arch/sparc/prom/Makefile
+++ b/arch/sparc/prom/Makefile
@@ -9,7 +9,6 @@ lib-y += init_$(BITS).o
9lib-$(CONFIG_SPARC32) += memory.o 9lib-$(CONFIG_SPARC32) += memory.o
10lib-y += misc_$(BITS).o 10lib-y += misc_$(BITS).o
11lib-$(CONFIG_SPARC32) += mp.o 11lib-$(CONFIG_SPARC32) += mp.o
12lib-$(CONFIG_SPARC32) += palloc.o
13lib-$(CONFIG_SPARC32) += ranges.o 12lib-$(CONFIG_SPARC32) += ranges.o
14lib-$(CONFIG_SPARC32) += segment.o 13lib-$(CONFIG_SPARC32) += segment.o
15lib-y += console_$(BITS).o 14lib-y += console_$(BITS).o
diff --git a/arch/sparc/prom/palloc.c b/arch/sparc/prom/palloc.c
deleted file mode 100644
index 2e2a88b211fb..000000000000
--- a/arch/sparc/prom/palloc.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * palloc.c: Memory allocation from the Sun PROM.
3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
5 */
6
7#include <asm/openprom.h>
8#include <asm/oplib.h>
9
10/* You should not call these routines after memory management
11 * has been initialized in the kernel, if fact you should not
12 * use these if at all possible in the kernel. They are mainly
13 * to be used for a bootloader for temporary allocations which
14 * it will free before jumping into the kernel it has loaded.
15 *
16 * Also, these routines don't work on V0 proms, only V2 and later.
17 */
18
19/* Allocate a chunk of memory of size 'num_bytes' giving a suggestion
20 * of virtual_hint as the preferred virtual base address of this chunk.
21 * There are no guarantees that you will get the allocation, or that
22 * the prom will abide by your "hint". So check your return value.
23 */
24char *
25prom_alloc(char *virtual_hint, unsigned int num_bytes)
26{
27 if(prom_vers == PROM_V0) return (char *) 0x0;
28 if(num_bytes == 0x0) return (char *) 0x0;
29 return (*(romvec->pv_v2devops.v2_dumb_mem_alloc))(virtual_hint, num_bytes);
30}
31
32/* Free a previously allocated chunk back to the prom at virtual address
33 * 'vaddr' of size 'num_bytes'. NOTE: This vaddr is not the hint you
34 * used for the allocation, but the virtual address the prom actually
35 * returned to you. They may be have been the same, they may have not,
36 * doesn't matter.
37 */
38void
39prom_free(char *vaddr, unsigned int num_bytes)
40{
41 if((prom_vers == PROM_V0) || (num_bytes == 0x0)) return;
42 (*(romvec->pv_v2devops.v2_dumb_mem_free))(vaddr, num_bytes);
43}