Commit e0092cc0 authored by Brian Gerst's avatar Brian Gerst Committed by Jaroslav Kysela

[PATCH] Removing SYMBOL_NAME part 1

The SYMBOL_NAME macro (and variations) have been obsolete since 2.1.0,
when the option to compile the kernel in a.out format was removed.  This
patch starts the process of removing these macros, starting with x86.
parent c2ffec65
...@@ -37,7 +37,7 @@ startup_32: ...@@ -37,7 +37,7 @@ startup_32:
movl %eax,%fs movl %eax,%fs
movl %eax,%gs movl %eax,%gs
lss SYMBOL_NAME(stack_start),%esp lss stack_start,%esp
xorl %eax,%eax xorl %eax,%eax
1: incl %eax # check that A20 really IS enabled 1: incl %eax # check that A20 really IS enabled
movl %eax,0x000000 # loop forever if it isn't movl %eax,0x000000 # loop forever if it isn't
...@@ -55,8 +55,8 @@ startup_32: ...@@ -55,8 +55,8 @@ startup_32:
* Clear BSS * Clear BSS
*/ */
xorl %eax,%eax xorl %eax,%eax
movl $ SYMBOL_NAME(_edata),%edi movl $_edata,%edi
movl $ SYMBOL_NAME(_end),%ecx movl $_end,%ecx
subl %edi,%ecx subl %edi,%ecx
cld cld
rep rep
...@@ -68,7 +68,7 @@ startup_32: ...@@ -68,7 +68,7 @@ startup_32:
movl %esp,%eax movl %esp,%eax
pushl %esi # real mode pointer as second arg pushl %esi # real mode pointer as second arg
pushl %eax # address of structure as first arg pushl %eax # address of structure as first arg
call SYMBOL_NAME(decompress_kernel) call decompress_kernel
orl %eax,%eax orl %eax,%eax
jnz 3f jnz 3f
popl %esi # discard address popl %esi # discard address
......
...@@ -36,7 +36,7 @@ wakeup_code: ...@@ -36,7 +36,7 @@ wakeup_code:
orl $0x80000001, %eax orl $0x80000001, %eax
movl %eax, %cr0 movl %eax, %cr0
ljmpl $__KERNEL_CS,$SYMBOL_NAME(wakeup_pmode_return) ljmpl $__KERNEL_CS,$wakeup_pmode_return
.code32 .code32
ALIGN ALIGN
......
...@@ -578,7 +578,7 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in, ...@@ -578,7 +578,7 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in,
__asm__ __volatile__(APM_DO_ZERO_SEGS __asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t" "pushl %%edi\n\t"
"pushl %%ebp\n\t" "pushl %%ebp\n\t"
"lcall *%%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t" "lcall *%%cs:apm_bios_entry\n\t"
"setc %%al\n\t" "setc %%al\n\t"
"popl %%ebp\n\t" "popl %%ebp\n\t"
"popl %%edi\n\t" "popl %%edi\n\t"
...@@ -625,7 +625,7 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax) ...@@ -625,7 +625,7 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax)
__asm__ __volatile__(APM_DO_ZERO_SEGS __asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t" "pushl %%edi\n\t"
"pushl %%ebp\n\t" "pushl %%ebp\n\t"
"lcall *%%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t" "lcall *%%cs:apm_bios_entry\n\t"
"setc %%bl\n\t" "setc %%bl\n\t"
"popl %%ebp\n\t" "popl %%ebp\n\t"
"popl %%edi\n\t" "popl %%edi\n\t"
......
This diff is collapsed.
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* References to members of the boot_cpu_data structure. * References to members of the boot_cpu_data structure.
*/ */
#define CPU_PARAMS SYMBOL_NAME(boot_cpu_data) #define CPU_PARAMS boot_cpu_data
#define X86 CPU_PARAMS+0 #define X86 CPU_PARAMS+0
#define X86_VENDOR CPU_PARAMS+1 #define X86_VENDOR CPU_PARAMS+1
#define X86_MODEL CPU_PARAMS+2 #define X86_MODEL CPU_PARAMS+2
...@@ -120,8 +120,8 @@ startup_32: ...@@ -120,8 +120,8 @@ startup_32:
* No need to cld as DF is already clear from cld above... * No need to cld as DF is already clear from cld above...
*/ */
xorl %eax,%eax xorl %eax,%eax
movl $ SYMBOL_NAME(__bss_start),%edi movl $__bss_start,%edi
movl $ SYMBOL_NAME(_end),%ecx movl $_end,%ecx
subl %edi,%ecx subl %edi,%ecx
rep rep
stosb stosb
...@@ -145,7 +145,7 @@ startup_32: ...@@ -145,7 +145,7 @@ startup_32:
* *
* Note: %esi still has the pointer to the real-mode data. * Note: %esi still has the pointer to the real-mode data.
*/ */
movl $ SYMBOL_NAME(empty_zero_page),%edi movl $empty_zero_page,%edi
movl $512,%ecx movl $512,%ecx
cld cld
rep rep
...@@ -154,7 +154,7 @@ startup_32: ...@@ -154,7 +154,7 @@ startup_32:
movl $512,%ecx movl $512,%ecx
rep rep
stosl stosl
movl SYMBOL_NAME(empty_zero_page)+NEW_CL_POINTER,%esi movl empty_zero_page+NEW_CL_POINTER,%esi
andl %esi,%esi andl %esi,%esi
jnz 2f # New command line protocol jnz 2f # New command line protocol
cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR
...@@ -162,7 +162,7 @@ startup_32: ...@@ -162,7 +162,7 @@ startup_32:
movzwl OLD_CL_OFFSET,%esi movzwl OLD_CL_OFFSET,%esi
addl $(OLD_CL_BASE_ADDR),%esi addl $(OLD_CL_BASE_ADDR),%esi
2: 2:
movl $ SYMBOL_NAME(empty_zero_page)+2048,%edi movl $empty_zero_page+2048,%edi
movl $512,%ecx movl $512,%ecx
rep rep
movsl movsl
...@@ -263,11 +263,11 @@ is386: pushl %ecx # restore original EFLAGS ...@@ -263,11 +263,11 @@ is386: pushl %ecx # restore original EFLAGS
cmpb $1,%cl cmpb $1,%cl
je 1f # the first CPU calls start_kernel je 1f # the first CPU calls start_kernel
# all other CPUs call initialize_secondary # all other CPUs call initialize_secondary
call SYMBOL_NAME(initialize_secondary) call initialize_secondary
jmp L6 jmp L6
1: 1:
#endif #endif
call SYMBOL_NAME(start_kernel) call start_kernel
L6: L6:
jmp L6 # main should never return here, but jmp L6 # main should never return here, but
# just in case, we know what happens. # just in case, we know what happens.
...@@ -309,7 +309,7 @@ setup_idt: ...@@ -309,7 +309,7 @@ setup_idt:
movw %dx,%ax /* selector = 0x0010 = cs */ movw %dx,%ax /* selector = 0x0010 = cs */
movw $0x8E00,%dx /* interrupt gate - dpl=0, present */ movw $0x8E00,%dx /* interrupt gate - dpl=0, present */
lea SYMBOL_NAME(idt_table),%edi lea idt_table,%edi
mov $256,%ecx mov $256,%ecx
rp_sidt: rp_sidt:
movl %eax,(%edi) movl %eax,(%edi)
...@@ -320,7 +320,7 @@ rp_sidt: ...@@ -320,7 +320,7 @@ rp_sidt:
ret ret
ENTRY(stack_start) ENTRY(stack_start)
.long SYMBOL_NAME(init_thread_union)+8192 .long init_thread_union+8192
.long __KERNEL_DS .long __KERNEL_DS
/* This is the default interrupt "handler" :-) */ /* This is the default interrupt "handler" :-) */
...@@ -338,7 +338,7 @@ ignore_int: ...@@ -338,7 +338,7 @@ ignore_int:
movl %eax,%ds movl %eax,%ds
movl %eax,%es movl %eax,%es
pushl $int_msg pushl $int_msg
call SYMBOL_NAME(printk) call printk
popl %eax popl %eax
popl %ds popl %ds
popl %es popl %es
...@@ -356,21 +356,21 @@ ignore_int: ...@@ -356,21 +356,21 @@ ignore_int:
#define GDT_ENTRIES (__TSS(NR_CPUS)) #define GDT_ENTRIES (__TSS(NR_CPUS))
.globl SYMBOL_NAME(idt) .globl idt
.globl SYMBOL_NAME(gdt) .globl gdt
ALIGN ALIGN
.word 0 .word 0
idt_descr: idt_descr:
.word IDT_ENTRIES*8-1 # idt contains 256 entries .word IDT_ENTRIES*8-1 # idt contains 256 entries
SYMBOL_NAME(idt): idt:
.long SYMBOL_NAME(idt_table) .long idt_table
.word 0 .word 0
gdt_descr: gdt_descr:
.word GDT_ENTRIES*8-1 .word GDT_ENTRIES*8-1
SYMBOL_NAME(gdt): gdt:
.long SYMBOL_NAME(gdt_table) .long gdt_table
/* /*
* This is initialized to create an identity-mapping at 0-8M (for bootup * This is initialized to create an identity-mapping at 0-8M (for bootup
......
...@@ -67,5 +67,5 @@ gdt_48: ...@@ -67,5 +67,5 @@ gdt_48:
.word 0x0800 # gdt limit = 2048, 256 GDT entries .word 0x0800 # gdt limit = 2048, 256 GDT entries
.long gdt_table-__PAGE_OFFSET # gdt base = gdt (first SMP CPU) .long gdt_table-__PAGE_OFFSET # gdt base = gdt (first SMP CPU)
.globl SYMBOL_NAME(trampoline_end) .globl trampoline_end
SYMBOL_NAME_LABEL(trampoline_end) trampoline_end:
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#define EXCEPTION SYMBOL_NAME(FPU_exception) #define EXCEPTION FPU_exception
#define PARAM1 8(%ebp) #define PARAM1 8(%ebp)
......
...@@ -83,7 +83,7 @@ L_underflow: ...@@ -83,7 +83,7 @@ L_underflow:
/* Convert the exponent to 80x87 form. */ /* Convert the exponent to 80x87 form. */
addw EXTENDED_Ebias,EXP(%ebx) addw EXTENDED_Ebias,EXP(%ebx)
push %ebx push %ebx
call SYMBOL_NAME(arith_underflow) call arith_underflow
pop %ebx pop %ebx
jmp L_exit jmp L_exit
...@@ -91,7 +91,7 @@ L_overflow: ...@@ -91,7 +91,7 @@ L_overflow:
/* Convert the exponent to 80x87 form. */ /* Convert the exponent to 80x87 form. */
addw EXTENDED_Ebias,EXP(%ebx) addw EXTENDED_Ebias,EXP(%ebx)
push %ebx push %ebx
call SYMBOL_NAME(arith_overflow) call arith_overflow
pop %ebx pop %ebx
jmp L_exit jmp L_exit
......
...@@ -447,7 +447,7 @@ fpu_Arith_exit: ...@@ -447,7 +447,7 @@ fpu_Arith_exit:
L_precision_lost_up: L_precision_lost_up:
push %edx push %edx
push %eax push %eax
call SYMBOL_NAME(set_precision_flag_up) call set_precision_flag_up
popl %eax popl %eax
popl %edx popl %edx
jmp L_no_precision_loss jmp L_no_precision_loss
...@@ -459,7 +459,7 @@ L_precision_lost_up: ...@@ -459,7 +459,7 @@ L_precision_lost_up:
L_precision_lost_down: L_precision_lost_down:
push %edx push %edx
push %eax push %eax
call SYMBOL_NAME(set_precision_flag_down) call set_precision_flag_down
popl %eax popl %eax
popl %edx popl %edx
jmp L_no_precision_loss jmp L_no_precision_loss
...@@ -617,7 +617,7 @@ LPseudoDenormal: ...@@ -617,7 +617,7 @@ LPseudoDenormal:
*/ */
L_underflow_to_zero: L_underflow_to_zero:
push %eax push %eax
call SYMBOL_NAME(set_precision_flag_down) call set_precision_flag_down
popl %eax popl %eax
push %eax push %eax
...@@ -636,7 +636,7 @@ L_underflow_to_zero: ...@@ -636,7 +636,7 @@ L_underflow_to_zero:
L_overflow: L_overflow:
addw EXTENDED_Ebias,EXP(%edi) /* Set for unmasked response. */ addw EXTENDED_Ebias,EXP(%edi) /* Set for unmasked response. */
push %edi push %edi
call SYMBOL_NAME(arith_overflow) call arith_overflow
pop %edi pop %edi
jmp fpu_reg_round_signed_special_exit jmp fpu_reg_round_signed_special_exit
......
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