7c3576d261
Currently x86 (similar to x84-64) has a special per-cpu structure called "i386_pda" which can be easily and efficiently referenced via the %fs register. An ELF section is more flexible than a structure, allowing any piece of code to use this area. Indeed, such a section already exists: the per-cpu area. So this patch: (1) Removes the PDA and uses per-cpu variables for each current member. (2) Replaces the __KERNEL_PDA segment with __KERNEL_PERCPU. (3) Creates a per-cpu mirror of __per_cpu_offset called this_cpu_off, which can be used to calculate addresses for this CPU's variables. (4) Simplifies startup, because %fs doesn't need to be loaded with a special segment at early boot; it can be deferred until the first percpu area is allocated (or never for UP). The result is less code and one less x86-specific concept. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de>
31 lines
762 B
C
31 lines
762 B
C
#include <linux/module.h>
|
|
#include <asm/checksum.h>
|
|
#include <asm/desc.h>
|
|
|
|
EXPORT_SYMBOL(__down_failed);
|
|
EXPORT_SYMBOL(__down_failed_interruptible);
|
|
EXPORT_SYMBOL(__down_failed_trylock);
|
|
EXPORT_SYMBOL(__up_wakeup);
|
|
/* Networking helper routines. */
|
|
EXPORT_SYMBOL(csum_partial_copy_generic);
|
|
|
|
EXPORT_SYMBOL(__get_user_1);
|
|
EXPORT_SYMBOL(__get_user_2);
|
|
EXPORT_SYMBOL(__get_user_4);
|
|
|
|
EXPORT_SYMBOL(__put_user_1);
|
|
EXPORT_SYMBOL(__put_user_2);
|
|
EXPORT_SYMBOL(__put_user_4);
|
|
EXPORT_SYMBOL(__put_user_8);
|
|
|
|
EXPORT_SYMBOL(strstr);
|
|
|
|
#ifdef CONFIG_SMP
|
|
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(__read_lock_failed);
|
|
#endif
|
|
|
|
EXPORT_SYMBOL(csum_partial);
|