Commit 2ee60e17 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Move export symbols to their C functions

Only exports for assembler files are left in x8664_ksyms.c

Originally inspired by a patch from Al Viro
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 45486f81
...@@ -620,6 +620,7 @@ void __init parse_memmapopt(char *p, char **from) ...@@ -620,6 +620,7 @@ void __init parse_memmapopt(char *p, char **from)
} }
unsigned long pci_mem_start = 0xaeedbabe; unsigned long pci_mem_start = 0xaeedbabe;
EXPORT_SYMBOL(pci_mem_start);
/* /*
* Search for the biggest gap in the low 32 bits of the e820 * Search for the biggest gap in the low 32 bits of the e820
......
...@@ -63,6 +63,7 @@ EXPORT_SYMBOL(boot_option_idle_override); ...@@ -63,6 +63,7 @@ EXPORT_SYMBOL(boot_option_idle_override);
* Powermanagement idle function, if any.. * Powermanagement idle function, if any..
*/ */
void (*pm_idle)(void); void (*pm_idle)(void);
EXPORT_SYMBOL(pm_idle);
static DEFINE_PER_CPU(unsigned int, cpu_idle_state); static DEFINE_PER_CPU(unsigned int, cpu_idle_state);
static ATOMIC_NOTIFIER_HEAD(idle_notifier); static ATOMIC_NOTIFIER_HEAD(idle_notifier);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* Power off function, if any * Power off function, if any
*/ */
void (*pm_power_off)(void); void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
static long no_idt[3]; static long no_idt[3];
static enum { static enum {
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
*/ */
struct cpuinfo_x86 boot_cpu_data __read_mostly; struct cpuinfo_x86 boot_cpu_data __read_mostly;
EXPORT_SYMBOL(boot_cpu_data);
unsigned long mmu_cr4_features; unsigned long mmu_cr4_features;
...@@ -99,6 +100,7 @@ char dmi_alloc_data[DMI_MAX_DATA]; ...@@ -99,6 +100,7 @@ char dmi_alloc_data[DMI_MAX_DATA];
* Setup options * Setup options
*/ */
struct screen_info screen_info; struct screen_info screen_info;
EXPORT_SYMBOL(screen_info);
struct sys_desc_table_struct { struct sys_desc_table_struct {
unsigned short length; unsigned short length;
unsigned char table[0]; unsigned char table[0];
......
...@@ -30,6 +30,7 @@ char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,}; ...@@ -30,6 +30,7 @@ char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly; struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly;
EXPORT_SYMBOL(_cpu_pda);
struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned; struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned;
struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table }; struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
...@@ -37,6 +38,7 @@ struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table }; ...@@ -37,6 +38,7 @@ struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned"))); char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
unsigned long __supported_pte_mask __read_mostly = ~0UL; unsigned long __supported_pte_mask __read_mostly = ~0UL;
EXPORT_SYMBOL(__supported_pte_mask);
static int do_not_nx __cpuinitdata = 0; static int do_not_nx __cpuinitdata = 0;
/* noexec=on|off /* noexec=on|off
......
...@@ -224,6 +224,7 @@ void flush_tlb_current_task(void) ...@@ -224,6 +224,7 @@ void flush_tlb_current_task(void)
flush_tlb_others(cpu_mask, mm, FLUSH_ALL); flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
preempt_enable(); preempt_enable();
} }
EXPORT_SYMBOL(flush_tlb_current_task);
void flush_tlb_mm (struct mm_struct * mm) void flush_tlb_mm (struct mm_struct * mm)
{ {
...@@ -244,6 +245,7 @@ void flush_tlb_mm (struct mm_struct * mm) ...@@ -244,6 +245,7 @@ void flush_tlb_mm (struct mm_struct * mm)
preempt_enable(); preempt_enable();
} }
EXPORT_SYMBOL(flush_tlb_mm);
void flush_tlb_page(struct vm_area_struct * vma, unsigned long va) void flush_tlb_page(struct vm_area_struct * vma, unsigned long va)
{ {
...@@ -266,6 +268,7 @@ void flush_tlb_page(struct vm_area_struct * vma, unsigned long va) ...@@ -266,6 +268,7 @@ void flush_tlb_page(struct vm_area_struct * vma, unsigned long va)
preempt_enable(); preempt_enable();
} }
EXPORT_SYMBOL(flush_tlb_page);
static void do_flush_tlb_all(void* info) static void do_flush_tlb_all(void* info)
{ {
...@@ -443,6 +446,7 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic, ...@@ -443,6 +446,7 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
spin_unlock(&call_lock); spin_unlock(&call_lock);
return 0; return 0;
} }
EXPORT_SYMBOL(smp_call_function);
void smp_stop_cpu(void) void smp_stop_cpu(void)
{ {
......
...@@ -63,9 +63,11 @@ ...@@ -63,9 +63,11 @@
/* Number of siblings per CPU package */ /* Number of siblings per CPU package */
int smp_num_siblings = 1; int smp_num_siblings = 1;
EXPORT_SYMBOL(smp_num_siblings);
/* Last level cache ID of each logical CPU */ /* Last level cache ID of each logical CPU */
u8 cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; u8 cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID};
EXPORT_SYMBOL(cpu_llc_id);
/* Bitmask of currently online CPUs */ /* Bitmask of currently online CPUs */
cpumask_t cpu_online_map __read_mostly; cpumask_t cpu_online_map __read_mostly;
...@@ -78,18 +80,21 @@ EXPORT_SYMBOL(cpu_online_map); ...@@ -78,18 +80,21 @@ EXPORT_SYMBOL(cpu_online_map);
*/ */
cpumask_t cpu_callin_map; cpumask_t cpu_callin_map;
cpumask_t cpu_callout_map; cpumask_t cpu_callout_map;
EXPORT_SYMBOL(cpu_callout_map);
cpumask_t cpu_possible_map; cpumask_t cpu_possible_map;
EXPORT_SYMBOL(cpu_possible_map); EXPORT_SYMBOL(cpu_possible_map);
/* Per CPU bogomips and other parameters */ /* Per CPU bogomips and other parameters */
struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
EXPORT_SYMBOL(cpu_data);
/* Set when the idlers are all forked */ /* Set when the idlers are all forked */
int smp_threads_ready; int smp_threads_ready;
/* representing HT siblings of each logical CPU */ /* representing HT siblings of each logical CPU */
cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly; cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly;
EXPORT_SYMBOL(cpu_sibling_map);
/* representing HT and core siblings of each logical CPU */ /* representing HT and core siblings of each logical CPU */
cpumask_t cpu_core_map[NR_CPUS] __read_mostly; cpumask_t cpu_core_map[NR_CPUS] __read_mostly;
......
...@@ -51,6 +51,7 @@ extern int using_apic_timer; ...@@ -51,6 +51,7 @@ extern int using_apic_timer;
static char *time_init_gtod(void); static char *time_init_gtod(void);
DEFINE_SPINLOCK(rtc_lock); DEFINE_SPINLOCK(rtc_lock);
EXPORT_SYMBOL(rtc_lock);
DEFINE_SPINLOCK(i8253_lock); DEFINE_SPINLOCK(i8253_lock);
int nohpet __initdata = 0; int nohpet __initdata = 0;
...@@ -64,6 +65,7 @@ static int notsc __initdata = 0; ...@@ -64,6 +65,7 @@ static int notsc __initdata = 0;
#define US_SCALE 32 /* 2^32, arbitralrily chosen */ #define US_SCALE 32 /* 2^32, arbitralrily chosen */
unsigned int cpu_khz; /* TSC clocks / usec, not used here */ unsigned int cpu_khz; /* TSC clocks / usec, not used here */
EXPORT_SYMBOL(cpu_khz);
static unsigned long hpet_period; /* fsecs / HPET clock */ static unsigned long hpet_period; /* fsecs / HPET clock */
unsigned long hpet_tick; /* HPET clocks / interrupt */ unsigned long hpet_tick; /* HPET clocks / interrupt */
int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */ int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */
......
...@@ -70,6 +70,7 @@ asmlinkage void machine_check(void); ...@@ -70,6 +70,7 @@ asmlinkage void machine_check(void);
asmlinkage void spurious_interrupt_bug(void); asmlinkage void spurious_interrupt_bug(void);
ATOMIC_NOTIFIER_HEAD(die_chain); ATOMIC_NOTIFIER_HEAD(die_chain);
EXPORT_SYMBOL(die_chain);
int register_die_notifier(struct notifier_block *nb) int register_die_notifier(struct notifier_block *nb)
{ {
...@@ -431,6 +432,7 @@ void out_of_line_bug(void) ...@@ -431,6 +432,7 @@ void out_of_line_bug(void)
{ {
BUG(); BUG();
} }
EXPORT_SYMBOL(out_of_line_bug);
#endif #endif
static DEFINE_SPINLOCK(die_lock); static DEFINE_SPINLOCK(die_lock);
......
/* Exports for assembly files.
All C exports should go in the respective C files. */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/user.h>
#include <linux/sched.h>
#include <linux/in6.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <linux/pm.h>
#include <linux/pci.h>
#include <linux/apm_bios.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/syscalls.h>
#include <linux/tty.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/i387.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/checksum.h>
#include <asm/io.h>
#include <asm/delay.h>
#include <asm/irq.h>
#include <asm/mmx.h>
#include <asm/desc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/pgalloc.h>
#include <asm/nmi.h>
#include <asm/kdebug.h>
#include <asm/unistd.h>
#include <asm/tlbflush.h>
#include <asm/kdebug.h>
extern spinlock_t rtc_lock;
#ifdef CONFIG_SMP
extern void __write_lock_failed(rwlock_t *rw);
extern void __read_lock_failed(rwlock_t *rw);
#endif
/* platform dependent support */
EXPORT_SYMBOL(boot_cpu_data);
//EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(ioremap_nocache);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(__down_failed); EXPORT_SYMBOL(__down_failed);
EXPORT_SYMBOL(__down_failed_interruptible); EXPORT_SYMBOL(__down_failed_interruptible);
EXPORT_SYMBOL(__down_failed_trylock); EXPORT_SYMBOL(__down_failed_trylock);
EXPORT_SYMBOL(__up_wakeup); EXPORT_SYMBOL(__up_wakeup);
/* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy_nocheck);
EXPORT_SYMBOL(ip_compute_csum);
/* Delay loops */
EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(__ndelay);
EXPORT_SYMBOL(__delay);
EXPORT_SYMBOL(__const_udelay);
EXPORT_SYMBOL(__get_user_1); EXPORT_SYMBOL(__get_user_1);
EXPORT_SYMBOL(__get_user_2); EXPORT_SYMBOL(__get_user_2);
...@@ -71,42 +26,20 @@ EXPORT_SYMBOL(__put_user_2); ...@@ -71,42 +26,20 @@ EXPORT_SYMBOL(__put_user_2);
EXPORT_SYMBOL(__put_user_4); EXPORT_SYMBOL(__put_user_4);
EXPORT_SYMBOL(__put_user_8); EXPORT_SYMBOL(__put_user_8);
EXPORT_SYMBOL(strncpy_from_user);
EXPORT_SYMBOL(__strncpy_from_user);
EXPORT_SYMBOL(clear_user);
EXPORT_SYMBOL(__clear_user);
EXPORT_SYMBOL(copy_user_generic); EXPORT_SYMBOL(copy_user_generic);
EXPORT_SYMBOL(copy_from_user); EXPORT_SYMBOL(copy_from_user);
EXPORT_SYMBOL(copy_to_user); EXPORT_SYMBOL(copy_to_user);
EXPORT_SYMBOL(copy_in_user);
EXPORT_SYMBOL(strnlen_user);
#ifdef CONFIG_PCI
EXPORT_SYMBOL(pci_mem_start);
#endif
EXPORT_SYMBOL(copy_page); EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(clear_page); EXPORT_SYMBOL(clear_page);
EXPORT_SYMBOL(_cpu_pda);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
EXPORT_SYMBOL(cpu_data); extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
EXPORT_SYMBOL(__write_lock_failed); EXPORT_SYMBOL(__write_lock_failed);
EXPORT_SYMBOL(__read_lock_failed); EXPORT_SYMBOL(__read_lock_failed);
EXPORT_SYMBOL(smp_call_function);
EXPORT_SYMBOL(cpu_callout_map);
#endif
#ifdef CONFIG_VT
EXPORT_SYMBOL(screen_info);
#endif #endif
EXPORT_SYMBOL(rtc_lock);
EXPORT_SYMBOL_GPL(set_nmi_callback);
EXPORT_SYMBOL_GPL(unset_nmi_callback);
/* Export string functions. We normally rely on gcc builtin for most of these, /* Export string functions. We normally rely on gcc builtin for most of these,
but gcc sometimes decides not to inline them. */ but gcc sometimes decides not to inline them. */
#undef memcpy #undef memcpy
...@@ -114,51 +47,14 @@ EXPORT_SYMBOL_GPL(unset_nmi_callback); ...@@ -114,51 +47,14 @@ EXPORT_SYMBOL_GPL(unset_nmi_callback);
#undef memmove #undef memmove
extern void * memset(void *,int,__kernel_size_t); extern void * memset(void *,int,__kernel_size_t);
extern size_t strlen(const char *);
extern void * memmove(void * dest,const void *src,size_t count);
extern void * memcpy(void *,const void *,__kernel_size_t); extern void * memcpy(void *,const void *,__kernel_size_t);
extern void * __memcpy(void *,const void *,__kernel_size_t); extern void * __memcpy(void *,const void *,__kernel_size_t);
EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(__memcpy); EXPORT_SYMBOL(__memcpy);
#ifdef CONFIG_RWSEM_XCHGADD_ALGORITHM
/* prototypes are wrong, these are assembly with custom calling functions */
extern void rwsem_down_read_failed_thunk(void);
extern void rwsem_wake_thunk(void);
extern void rwsem_downgrade_thunk(void);
extern void rwsem_down_write_failed_thunk(void);
EXPORT_SYMBOL(rwsem_down_read_failed_thunk);
EXPORT_SYMBOL(rwsem_wake_thunk);
EXPORT_SYMBOL(rwsem_downgrade_thunk);
EXPORT_SYMBOL(rwsem_down_write_failed_thunk);
#endif
EXPORT_SYMBOL(empty_zero_page); EXPORT_SYMBOL(empty_zero_page);
EXPORT_SYMBOL(die_chain);
#ifdef CONFIG_SMP
EXPORT_SYMBOL(cpu_sibling_map);
EXPORT_SYMBOL(smp_num_siblings);
#endif
#ifdef CONFIG_BUG
EXPORT_SYMBOL(out_of_line_bug);
#endif
EXPORT_SYMBOL(init_level4_pgt); EXPORT_SYMBOL(init_level4_pgt);
extern unsigned long __supported_pte_mask;
EXPORT_SYMBOL(__supported_pte_mask);
#ifdef CONFIG_SMP
EXPORT_SYMBOL(flush_tlb_page);
#endif
EXPORT_SYMBOL(cpu_khz);
EXPORT_SYMBOL(load_gs_index); EXPORT_SYMBOL(load_gs_index);
...@@ -147,4 +147,5 @@ unsigned short ip_compute_csum(unsigned char * buff, int len) ...@@ -147,4 +147,5 @@ unsigned short ip_compute_csum(unsigned char * buff, int len)
{ {
return csum_fold(csum_partial(buff,len,0)); return csum_fold(csum_partial(buff,len,0));
} }
EXPORT_SYMBOL(ip_compute_csum);
...@@ -109,6 +109,7 @@ csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int len, ...@@ -109,6 +109,7 @@ csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int len,
{ {
return csum_partial_copy_generic(src,dst,len,sum,NULL,NULL); return csum_partial_copy_generic(src,dst,len,sum,NULL,NULL);
} }
EXPORT_SYMBOL(csum_partial_copy_nocheck);
unsigned short csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr, unsigned short csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,
__u32 len, unsigned short proto, unsigned int sum) __u32 len, unsigned short proto, unsigned int sum)
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/delay.h> #include <asm/delay.h>
...@@ -36,18 +37,22 @@ void __delay(unsigned long loops) ...@@ -36,18 +37,22 @@ void __delay(unsigned long loops)
} }
while((now-bclock) < loops); while((now-bclock) < loops);
} }
EXPORT_SYMBOL(__delay);
inline void __const_udelay(unsigned long xloops) inline void __const_udelay(unsigned long xloops)
{ {
__delay((xloops * HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32); __delay((xloops * HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32);
} }
EXPORT_SYMBOL(__const_udelay);
void __udelay(unsigned long usecs) void __udelay(unsigned long usecs)
{ {
__const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */
} }
EXPORT_SYMBOL(__udelay);
void __ndelay(unsigned long nsecs) void __ndelay(unsigned long nsecs)
{ {
__const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */
} }
EXPORT_SYMBOL(__ndelay);
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*/ */
#define _STRING_C #define _STRING_C
#include <linux/string.h> #include <linux/string.h>
#include <linux/module.h>
#undef memmove #undef memmove
void *memmove(void * dest,const void *src,size_t count) void *memmove(void * dest,const void *src,size_t count)
...@@ -17,3 +18,4 @@ void *memmove(void * dest,const void *src,size_t count) ...@@ -17,3 +18,4 @@ void *memmove(void * dest,const void *src,size_t count)
} }
return dest; return dest;
} }
EXPORT_SYMBOL(memmove);
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* Copyright 1997 Linus Torvalds * Copyright 1997 Linus Torvalds
* Copyright 2002 Andi Kleen <ak@suse.de> * Copyright 2002 Andi Kleen <ak@suse.de>
*/ */
#include <linux/module.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
/* /*
...@@ -47,6 +48,7 @@ __strncpy_from_user(char *dst, const char __user *src, long count) ...@@ -47,6 +48,7 @@ __strncpy_from_user(char *dst, const char __user *src, long count)
__do_strncpy_from_user(dst, src, count, res); __do_strncpy_from_user(dst, src, count, res);
return res; return res;
} }
EXPORT_SYMBOL(__strncpy_from_user);
long long
strncpy_from_user(char *dst, const char __user *src, long count) strncpy_from_user(char *dst, const char __user *src, long count)
...@@ -56,6 +58,7 @@ strncpy_from_user(char *dst, const char __user *src, long count) ...@@ -56,6 +58,7 @@ strncpy_from_user(char *dst, const char __user *src, long count)
__do_strncpy_from_user(dst, src, count, res); __do_strncpy_from_user(dst, src, count, res);
return res; return res;
} }
EXPORT_SYMBOL(strncpy_from_user);
/* /*
* Zero Userspace * Zero Userspace
...@@ -94,7 +97,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size) ...@@ -94,7 +97,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size)
[zero] "r" (0UL), [eight] "r" (8UL)); [zero] "r" (0UL), [eight] "r" (8UL));
return size; return size;
} }
EXPORT_SYMBOL(__clear_user);
unsigned long clear_user(void __user *to, unsigned long n) unsigned long clear_user(void __user *to, unsigned long n)
{ {
...@@ -102,6 +105,7 @@ unsigned long clear_user(void __user *to, unsigned long n) ...@@ -102,6 +105,7 @@ unsigned long clear_user(void __user *to, unsigned long n)
return __clear_user(to, n); return __clear_user(to, n);
return n; return n;
} }
EXPORT_SYMBOL(clear_user);
/* /*
* Return the size of a string (including the ending 0) * Return the size of a string (including the ending 0)
...@@ -125,6 +129,7 @@ long __strnlen_user(const char __user *s, long n) ...@@ -125,6 +129,7 @@ long __strnlen_user(const char __user *s, long n)
s++; s++;
} }
} }
EXPORT_SYMBOL(__strnlen_user);
long strnlen_user(const char __user *s, long n) long strnlen_user(const char __user *s, long n)
{ {
...@@ -132,6 +137,7 @@ long strnlen_user(const char __user *s, long n) ...@@ -132,6 +137,7 @@ long strnlen_user(const char __user *s, long n)
return 0; return 0;
return __strnlen_user(s, n); return __strnlen_user(s, n);
} }
EXPORT_SYMBOL(strnlen_user);
long strlen_user(const char __user *s) long strlen_user(const char __user *s)
{ {
...@@ -147,6 +153,7 @@ long strlen_user(const char __user *s) ...@@ -147,6 +153,7 @@ long strlen_user(const char __user *s)
s++; s++;
} }
} }
EXPORT_SYMBOL(strlen_user);
unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len) unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len)
{ {
...@@ -155,3 +162,5 @@ unsigned long copy_in_user(void __user *to, const void __user *from, unsigned le ...@@ -155,3 +162,5 @@ unsigned long copy_in_user(void __user *to, const void __user *from, unsigned le
} }
return len; return len;
} }
EXPORT_SYMBOL(copy_in_user);
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/fixmap.h> #include <asm/fixmap.h>
...@@ -219,6 +220,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l ...@@ -219,6 +220,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
} }
return (__force void __iomem *) (offset + (char *)addr); return (__force void __iomem *) (offset + (char *)addr);
} }
EXPORT_SYMBOL(__ioremap);
/** /**
* ioremap_nocache - map bus memory into CPU space * ioremap_nocache - map bus memory into CPU space
...@@ -246,6 +248,7 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size) ...@@ -246,6 +248,7 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
{ {
return __ioremap(phys_addr, size, _PAGE_PCD); return __ioremap(phys_addr, size, _PAGE_PCD);
} }
EXPORT_SYMBOL(ioremap_nocache);
/** /**
* iounmap - Free a IO remapping * iounmap - Free a IO remapping
...@@ -291,3 +294,5 @@ void iounmap(volatile void __iomem *addr) ...@@ -291,3 +294,5 @@ void iounmap(volatile void __iomem *addr)
BUG_ON(p != o || o == NULL); BUG_ON(p != o || o == NULL);
kfree(p); kfree(p);
} }
EXPORT_SYMBOL(iounmap);
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