summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2009-11-25 23:05:11 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2009-11-25 23:05:11 +1100
commitcc187de51404cb76e1ed6dfb030b95ba3f6eac67 (patch)
tree042e9d823de4eb4cbcc23fcf5a2b379129cd8616
parentde206f60c9d6456d3ffc72bd38da97ccbb043d50 (diff)
Revert "Merge branch 'for-linus' into for-next to receive per_cpu_ptr_to_phys()."
This reverts commit 25b1a9ccfdd0e3dc306a1e3a354ba5480c4b0dd9, reversing changes made to 809fff2143c523cb313ba320ab6aaa3ac2e9e958.
-rw-r--r--drivers/base/cpu.c2
-rw-r--r--include/linux/percpu.h1
-rw-r--r--mm/percpu.c21
3 files changed, 1 insertions, 23 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 69ee5b7517ec..e62a4ccea54d 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -97,7 +97,7 @@ static ssize_t show_crash_notes(struct sys_device *dev, struct sysdev_attribute
* boot up and this data does not change there after. Hence this
* operation should be safe. No locking required.
*/
- addr = per_cpu_ptr_to_phys(per_cpu_ptr(crash_notes, cpunum));
+ addr = __pa(per_cpu_ptr(crash_notes, cpunum));
rc = sprintf(buf, "%Lx\n", addr);
return rc;
}
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 4196cecbcdf4..42878f0cd0e2 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -137,7 +137,6 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size,
extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align);
extern void __percpu *__alloc_percpu(size_t size, size_t align);
extern void free_percpu(void __percpu *__pdata);
-extern phys_addr_t per_cpu_ptr_to_phys(void *addr);
#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
extern void __init setup_per_cpu_areas(void);
diff --git a/mm/percpu.c b/mm/percpu.c
index 3c4c68cb60b9..d3cfa0a67f0f 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1300,27 +1300,6 @@ void free_percpu(void *ptr)
}
EXPORT_SYMBOL_GPL(free_percpu);
-/**
- * per_cpu_ptr_to_phys - convert translated percpu address to physical address
- * @addr: the address to be converted to physical address
- *
- * Given @addr which is dereferenceable address obtained via one of
- * percpu access macros, this function translates it into its physical
- * address. The caller is responsible for ensuring @addr stays valid
- * until this function finishes.
- *
- * RETURNS:
- * The physical address for @addr.
- */
-phys_addr_t per_cpu_ptr_to_phys(void *addr)
-{
- if ((unsigned long)addr < VMALLOC_START ||
- (unsigned long)addr >= VMALLOC_END)
- return __pa(addr);
- else
- return page_to_phys(vmalloc_to_page(addr));
-}
-
static inline size_t pcpu_calc_fc_sizes(size_t static_size,
size_t reserved_size,
ssize_t *dyn_sizep)