From 97752b2cbdddb6573fced674969aa5fd8692c4ce Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Mon, 16 Aug 2004 18:54:23 +0000 Subject: [PATCH] Catch up with the drive-by renaming of IA32 to COMPAT_IA32. It must have been rush hour... While here, move COMPAT_IA32 from opt_global.h to opt_compat.h like on amd64. Consequently, it's unsafe to use the option in pcb.h. We now unconditionally have the ia32 specific registers in the PCB. This commit is untested. --- sys/conf/files.ia64 | 14 +++++++------- sys/conf/options.ia64 | 4 ++-- sys/ia64/ia64/machdep.c | 6 +++--- sys/ia64/include/pcb.h | 4 +--- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sys/conf/files.ia64 b/sys/conf/files.ia64 index 8d1ccabed646..413791a3789d 100644 --- a/sys/conf/files.ia64 +++ b/sys/conf/files.ia64 @@ -28,10 +28,10 @@ ukbdmap.h optional ukbd_dflt_keymap \ no-obj no-implicit-rule before-depend \ clean "ukbdmap.h" # -compat/freebsd32/freebsd32_misc.c optional ia32 -compat/freebsd32/freebsd32_syscalls.c optional ia32 -compat/freebsd32/freebsd32_sysent.c optional ia32 -compat/ia32/ia32_sysvec.c optional ia32 +compat/freebsd32/freebsd32_misc.c optional compat_ia32 +compat/freebsd32/freebsd32_syscalls.c optional compat_ia32 +compat/freebsd32/freebsd32_sysent.c optional compat_ia32 +compat/ia32/ia32_sysvec.c optional compat_ia32 contrib/ia64/libuwx/src/uwx_bstream.c standard contrib/ia64/libuwx/src/uwx_context.c standard contrib/ia64/libuwx/src/uwx_env.c standard @@ -83,8 +83,8 @@ ia64/acpica/madt.c optional acpi ia64/disasm/disasm_decode.c standard ia64/disasm/disasm_extract.c standard ia64/disasm/disasm_format.c standard -ia64/ia32/ia32_signal.c optional ia32 -ia64/ia32/ia32_sigtramp.c optional ia32 +ia64/ia32/ia32_signal.c optional compat_ia32 +ia64/ia32/ia32_sigtramp.c optional compat_ia32 ia64/ia64/autoconf.c standard ia64/ia64/busdma_machdep.c standard ia64/ia64/clock.c standard @@ -132,7 +132,7 @@ isa/atkbdc_isa.c optional atkbdc isa/psm.c optional psm isa/syscons_isa.c optional sc isa/vga_isa.c optional vga -kern/imgact_elf32.c optional ia32 +kern/imgact_elf32.c optional compat_ia32 libkern/bcmp.c standard libkern/ffsl.c standard libkern/fls.c standard diff --git a/sys/conf/options.ia64 b/sys/conf/options.ia64 index a753b0c4567b..8f4b2ac0432a 100644 --- a/sys/conf/options.ia64 +++ b/sys/conf/options.ia64 @@ -4,13 +4,13 @@ ITANIUM opt_global.h ITANIUM2 opt_global.h -IA32 opt_global.h - LOG2_ID_PAGE_SIZE opt_global.h LOG2_PAGE_SIZE opt_global.h UWX_TRACE_ENABLE opt_global.h +COMPAT_IA32 opt_compat.h + PPC_PROBE_CHIPSET opt_ppc.h PPC_DEBUG opt_ppc.h diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 2925385373a9..497bd91ed92d 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -322,7 +322,7 @@ cpu_switch(struct thread *old, struct thread *new) struct pcb *oldpcb, *newpcb; oldpcb = old->td_pcb; -#if IA32 +#if COMPAT_IA32 ia32_savectx(oldpcb); #endif if (PCPU_GET(fpcurthread) == old) @@ -332,7 +332,7 @@ cpu_switch(struct thread *old, struct thread *new) oldpcb->pcb_current_pmap = pmap_switch(newpcb->pcb_current_pmap); PCPU_SET(curthread, new); -#if IA32 +#if COMPAT_IA32 ia32_restorectx(newpcb); #endif if (PCPU_GET(fpcurthread) == new) @@ -352,7 +352,7 @@ cpu_throw(struct thread *old __unused, struct thread *new) newpcb = new->td_pcb; (void)pmap_switch(newpcb->pcb_current_pmap); PCPU_SET(curthread, new); -#if IA32 +#if COMPAT_IA32 ia32_restorectx(newpcb); #endif restorectx(newpcb); diff --git a/sys/ia64/include/pcb.h b/sys/ia64/include/pcb.h index d018127561b7..6afe5e67632f 100644 --- a/sys/ia64/include/pcb.h +++ b/sys/ia64/include/pcb.h @@ -46,7 +46,7 @@ struct pcb { uint64_t pcb_onfault; /* for copy faults */ -#if IA32 + /* IA32 specific registers. */ uint64_t pcb_ia32_cflg; uint64_t pcb_ia32_eflag; uint64_t pcb_ia32_fcr; @@ -66,10 +66,8 @@ void makectx(struct trapframe *, struct pcb *); void restorectx(struct pcb *) __dead2; int swapctx(struct pcb *old, struct pcb *new); -#if IA32 void ia32_restorectx(struct pcb *); void ia32_savectx(struct pcb *); -#endif #endif