Commit 31aa2bf6 authored by Russell King's avatar Russell King

[ARM] Move a bunch of symbol exports from armksyms.c

This moves a bunch of EXPORT_SYMBOL() statements from armksyms.c
into the file which defines the function/variable such that the
exports are localised.

This also means we can get rid of the ugly __xxx_to_xxx__is_a_macro
in include/asm-arm/arch-*/memory.h
parent 054852c4
......@@ -7,41 +7,16 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/user.h>
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/in6.h>
#include <linux/interrupt.h>
#include <linux/pm.h>
#include <linux/tty.h>
#include <linux/vt_kern.h>
#include <linux/smp_lock.h>
#include <linux/syscalls.h>
#include <asm/byteorder.h>
#include <asm/elf.h>
#include <asm/checksum.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/proc-fns.h>
#include <asm/processor.h>
#include <asm/semaphore.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/checksum.h>
#include <asm/mach-types.h>
extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(struct pt_regs *, struct user_fp_struct *);
extern void inswb(unsigned int port, void *to, int len);
extern void outswb(unsigned int port, const void *to, int len);
extern void __bad_xchg(volatile void *ptr, int size);
/*
* libgcc functions - functions that are used internally by the
......@@ -61,12 +36,9 @@ extern void __udivmoddi4(void);
extern void __udivsi3(void);
extern void __umodsi3(void);
extern void __do_div64(void);
extern void abort(void);
extern void ret_from_exception(void);
extern void fpundefinstr(void);
extern void fp_enter(void);
extern void fp_init(union fp_state *);
/*
* This has a special calling convention; it doesn't
......@@ -88,32 +60,7 @@ EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig);
EXPORT_SYMBOL_NOVERS(__backtrace);
/* platform dependent support */
EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(udelay);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(__iounmap);
EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(system_rev);
EXPORT_SYMBOL(system_serial_low);
EXPORT_SYMBOL(system_serial_high);
#ifdef CONFIG_DEBUG_BUGVERBOSE
EXPORT_SYMBOL(__bug);
#endif
EXPORT_SYMBOL(__bad_xchg);
EXPORT_SYMBOL(__readwrite_bug);
EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(probe_irq_mask);
EXPORT_SYMBOL(set_irq_type);
EXPORT_SYMBOL(enable_irq_wake);
EXPORT_SYMBOL(disable_irq_wake);
EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(fp_init);
/* processor dependencies */
EXPORT_SYMBOL(__machine_arch_type);
/* networking */
EXPORT_SYMBOL(csum_partial);
......@@ -138,20 +85,6 @@ EXPORT_SYMBOL_NOVERS(__raw_writesw);
#endif
#ifndef __raw_writesl
EXPORT_SYMBOL_NOVERS(__raw_writesl);
#endif
/* address translation */
#ifndef __virt_to_phys__is_a_macro
EXPORT_SYMBOL(__virt_to_phys);
#endif
#ifndef __phys_to_virt__is_a_macro
EXPORT_SYMBOL(__phys_to_virt);
#endif
#ifndef __virt_to_bus__is_a_macro
EXPORT_SYMBOL(__virt_to_bus);
#endif
#ifndef __bus_to_virt__is_a_macro
EXPORT_SYMBOL(__bus_to_virt);
#endif
/* string / mem functions */
......@@ -227,10 +160,6 @@ EXPORT_SYMBOL(_find_first_zero_bit_be);
EXPORT_SYMBOL(_find_next_zero_bit_be);
#endif
/* elf */
EXPORT_SYMBOL(elf_platform);
EXPORT_SYMBOL(elf_hwcap);
/* syscalls */
EXPORT_SYMBOL(sys_write);
EXPORT_SYMBOL(sys_read);
......@@ -238,11 +167,3 @@ EXPORT_SYMBOL(sys_lseek);
EXPORT_SYMBOL(sys_open);
EXPORT_SYMBOL(sys_exit);
EXPORT_SYMBOL(sys_wait4);
/* semaphores */
EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_interruptible_failed);
EXPORT_SYMBOL_NOVERS(__down_trylock_failed);
EXPORT_SYMBOL_NOVERS(__up_wakeup);
EXPORT_SYMBOL(get_wchan);
......@@ -103,6 +103,7 @@ void disable_irq(unsigned int irq)
list_del_init(&desc->pend);
spin_unlock_irqrestore(&irq_controller_lock, flags);
}
EXPORT_SYMBOL(disable_irq);
/**
* enable_irq - enable interrupt handling on an irq
......@@ -142,6 +143,7 @@ void enable_irq(unsigned int irq)
}
spin_unlock_irqrestore(&irq_controller_lock, flags);
}
EXPORT_SYMBOL(enable_irq);
/*
* Enable wake on selected irq
......@@ -156,6 +158,7 @@ void enable_irq_wake(unsigned int irq)
desc->chip->wake(irq, 1);
spin_unlock_irqrestore(&irq_controller_lock, flags);
}
EXPORT_SYMBOL(enable_irq_wake);
void disable_irq_wake(unsigned int irq)
{
......@@ -167,6 +170,7 @@ void disable_irq_wake(unsigned int irq)
desc->chip->wake(irq, 0);
spin_unlock_irqrestore(&irq_controller_lock, flags);
}
EXPORT_SYMBOL(disable_irq_wake);
int show_interrupts(struct seq_file *p, void *v)
{
......@@ -541,6 +545,7 @@ int set_irq_type(unsigned int irq, unsigned int type)
return ret;
}
EXPORT_SYMBOL(set_irq_type);
void set_irq_flags(unsigned int irq, unsigned int iflags)
{
......@@ -798,6 +803,7 @@ unsigned int probe_irq_mask(unsigned long irqs)
return mask;
}
EXPORT_SYMBOL(probe_irq_mask);
/*
* Possible return values:
......
......@@ -73,7 +73,10 @@ __setup("hlt", hlt_setup);
* The following aren't currently used.
*/
void (*pm_idle)(void);
EXPORT_SYMBOL(pm_idle);
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
/*
* This is our default idle handler. We need to disable
......@@ -301,6 +304,7 @@ static void default_fp_init(union fp_state *fp)
}
void (*fp_init)(union fp_state *) = default_fp_init;
EXPORT_SYMBOL(fp_init);
void flush_thread(void)
{
......@@ -350,6 +354,7 @@ int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
return used_math != 0;
}
EXPORT_SYMBOL(dump_fpu);
/*
* fill in the user structure for a core dump..
......@@ -378,6 +383,7 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
dump->regs = *regs;
dump->u_fpvalid = dump_fpu (regs, &dump->u_fp);
}
EXPORT_SYMBOL(dump_thread);
/*
* Shuffle the argument into the correct register before calling the
......@@ -385,13 +391,15 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
* the thread function, and r3 points to the exit function.
*/
extern void kernel_thread_helper(void);
asm( ".align\n"
asm( ".section .text\n"
" .align\n"
" .type kernel_thread_helper, #function\n"
"kernel_thread_helper:\n"
" mov r0, r1\n"
" mov lr, r3\n"
" mov pc, r2\n"
" .size kernel_thread_helper, . - kernel_thread_helper");
" .size kernel_thread_helper, . - kernel_thread_helper\n"
" .previous");
/*
* Create a kernel thread.
......@@ -410,6 +418,7 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
}
EXPORT_SYMBOL(kernel_thread);
unsigned long get_wchan(struct task_struct *p)
{
......@@ -431,3 +440,4 @@ unsigned long get_wchan(struct task_struct *p)
} while (count ++ < 16);
return 0;
}
EXPORT_SYMBOL(get_wchan);
......@@ -11,6 +11,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/init.h>
......@@ -213,3 +214,7 @@ __up_wakeup: \n\
ldmfd sp!, {r0 - r3, pc} \n\
");
EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_interruptible_failed);
EXPORT_SYMBOL_NOVERS(__down_trylock_failed);
EXPORT_SYMBOL_NOVERS(__up_wakeup);
......@@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/ioport.h>
......@@ -61,10 +62,20 @@ extern int _stext, _text, _etext, _edata, _end;
unsigned int processor_id;
unsigned int __machine_arch_type;
EXPORT_SYMBOL(__machine_arch_type);
unsigned int system_rev;
EXPORT_SYMBOL(system_rev);
unsigned int system_serial_low;
EXPORT_SYMBOL(system_serial_low);
unsigned int system_serial_high;
EXPORT_SYMBOL(system_serial_high);
unsigned int elf_hwcap;
EXPORT_SYMBOL(elf_hwcap);
#ifdef MULTI_CPU
struct processor processor;
......@@ -80,7 +91,10 @@ struct cpu_cache_fns cpu_cache;
#endif
unsigned char aux_device_present;
char elf_platform[ELF_PLATFORM_SIZE];
EXPORT_SYMBOL(elf_platform);
char saved_command_line[COMMAND_LINE_SIZE];
unsigned long phys_initrd_start __initdata = 0;
unsigned long phys_initrd_size __initdata = 0;
......
......@@ -495,6 +495,7 @@ void __bad_xchg(volatile void *ptr, int size)
__builtin_return_address(0), ptr, size);
BUG();
}
EXPORT_SYMBOL(__bad_xchg);
/*
* A data abort trap was taken, but we did not handle the instruction.
......@@ -532,12 +533,14 @@ volatile void __bug(const char *file, int line, void *data)
printk("\n");
*(int *)0 = 0;
}
EXPORT_SYMBOL(__bug);
void __readwrite_bug(const char *fn)
{
printk("%s called, but not implemented", fn);
BUG();
}
EXPORT_SYMBOL(__readwrite_bug);
void __pte_error(const char *file, int line, unsigned long val)
{
......@@ -559,6 +562,7 @@ asmlinkage void __div0(void)
printk("Division by zero in kernel.\n");
dump_stack();
}
EXPORT_SYMBOL_NOVERS(__div0);
void abort(void)
{
......@@ -567,6 +571,7 @@ void abort(void)
/* if that doesn't kill us, halt */
panic("Oops failed to kill thread");
}
EXPORT_SYMBOL(abort);
void __init trap_init(void)
{
......
......@@ -87,6 +87,7 @@ unsigned long __virt_to_bus(unsigned long res)
return (res - PAGE_OFFSET) + (*CSR_PCISDRAMBASE & 0xfffffff0);
}
EXPORT_SYMBOL(__virt_to_bus);
unsigned long __bus_to_virt(unsigned long res)
{
......@@ -97,5 +98,6 @@ unsigned long __bus_to_virt(unsigned long res)
return res;
}
EXPORT_SYMBOL(__bus_to_virt);
#endif
......@@ -162,8 +162,10 @@ __ioremap(unsigned long phys_addr, size_t size, unsigned long flags,
}
return (void *) (offset + (char *)addr);
}
EXPORT_SYMBOL(__ioremap);
void __iounmap(void *addr)
{
vfree((void *) (PAGE_MASK & (unsigned long) addr));
}
EXPORT_SYMBOL(__iounmap);
......@@ -33,8 +33,6 @@
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
......@@ -47,8 +45,6 @@
*
* These are dummies for now.
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
......
......@@ -32,18 +32,14 @@
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x10000000UL)
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/*
* These are exactly the same on the RiscPC as the
* physical memory view.
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
......@@ -43,9 +43,7 @@
/*
* On integrator, the dram is contiguous
*/
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/*
......@@ -58,23 +56,17 @@
#if defined(CONFIG_ARCH_CDB89712)
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) (x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x)
#elif defined (CONFIG_ARCH_AUTCPU12)
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) (x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x)
#else
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
#endif
......
......@@ -34,18 +34,14 @@
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x00000000UL)
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
/*
* We keep this 1:1 so that we don't interfere
* with the PCMCIA memory regions
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) (x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x)
#endif
......@@ -34,9 +34,7 @@ extern unsigned long __bus_to_virt(unsigned long);
#elif defined(CONFIG_FOOTBRIDGE_HOST)
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) ((x) - 0xe0000000)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) ((x) + 0xe0000000)
#else
......@@ -75,9 +73,7 @@ extern unsigned long __bus_to_virt(unsigned long);
/*
* The DRAM is always contiguous.
*/
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET)
#endif
......@@ -41,9 +41,7 @@
/*
* On epxa10, the dram is contiguous
*/
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
/*
......@@ -53,9 +51,7 @@
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) (x - PAGE_OFFSET + /*SDRAM_BASE*/0)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x - /*SDRAM_BASE*/0 + PAGE_OFFSET)
#endif
......@@ -41,9 +41,7 @@
/*
* On integrator, the dram is contiguous
*/
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
#define BUS_OFFSET (0x80000000UL)
......@@ -55,9 +53,7 @@
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) (x - PAGE_OFFSET + BUS_OFFSET)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x - BUS_OFFSET + PAGE_OFFSET)
#endif
......@@ -34,8 +34,6 @@
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
......@@ -46,9 +44,6 @@
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#ifdef CONFIG_ARCH_IOP310
#define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP310_SIATVR)) | ((*IOP310_SIABAR) & 0xfffffff0))
......
......@@ -27,8 +27,6 @@
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
......@@ -41,8 +39,6 @@
*
* These are dummies for now.
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
......
......@@ -37,14 +37,10 @@
/*
* The DRAM is contiguous.
*/
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
......@@ -39,8 +39,6 @@
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
......@@ -51,8 +49,6 @@
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
......
......@@ -32,15 +32,11 @@
*/
#define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET - PHYS_OFFSET)
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
/*
* On the PCI bus the DRAM appears at address 0xe0000000
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) ((unsigned long)(x) - PAGE_OFFSET + BUS_OFFSET)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) ((unsigned long)(x) + PAGE_OFFSET - BUS_OFFSET)
#endif
......@@ -59,9 +59,7 @@
/*
* The DRAM is contiguous.
*/
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/*
......@@ -69,8 +67,6 @@
* NOTE: Physical address must be converted to Local Bus address
* on OMAP-1510 only
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
/*
* Bus address is physical address, except for OMAP-1510 Local Bus.
......
......@@ -38,8 +38,6 @@
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
......@@ -50,8 +48,6 @@
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
......
......@@ -36,18 +36,14 @@
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x10000000UL)
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/*
* These are exactly the same on the RiscPC as the
* physical memory view.
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
......@@ -43,9 +43,7 @@
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x30000000UL)
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/*
......@@ -53,9 +51,7 @@
* physical memory view.
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
......@@ -36,8 +36,6 @@
* same. The NUMA code is handling the large holes that might exist between
* all memory banks.
*/
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(x) (x)
#define __phys_to_virt(x) (x)
......@@ -50,8 +48,6 @@
*
* On the SA1100, bus addresses are equivalent to physical addresses.
*/
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
......
......@@ -28,14 +28,10 @@
#define PAGE_OFFSET (0xC0000000UL)
#define PHYS_OFFSET (0x08000000UL)
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
#define __virt_to_phys(vpage) (vpage - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) (ppage - PHYS_OFFSET + PAGE_OFFSET)
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
......@@ -30,15 +30,11 @@
*/
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
/*
* Bus view is the same as physical view
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
......@@ -41,9 +41,7 @@
/*
* On Versatile PB, the dram is contiguous
*/
#define __virt_to_phys__is_a_macro
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
/*
......@@ -53,9 +51,7 @@
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment