aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-01 13:14:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-01 13:14:46 -0500
commitd03ab7ff335b7fbf48d0fd28ead5d7957798510b (patch)
tree5a1080b6f51a51fd515a61c518d46f7f2676c139 /arch/ia64/kernel
parent8098a7ef8946169cf8ffeb6f4d8130fc3651192e (diff)
parent4d86e1b18d6de8446aa424b615b34e436d42c241 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] wrong attribute of HUB chip written in uv_setup() [IA64] remove trailing space in messages [IA64] use asm-generic/scatterlist.h [IA64] build arch/ia64/kernel/acpi-ext.o when CONFIG_ACPI [IA64] Only build arch/ia64/kernel/acpi.o when CONFIG_ACPI [IA64] Remove COMPAT_IA32 support
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/Makefile6
-rw-r--r--arch/ia64/kernel/acpi.c33
-rw-r--r--arch/ia64/kernel/audit.c21
-rw-r--r--arch/ia64/kernel/entry.S39
-rw-r--r--arch/ia64/kernel/ivt.S114
-rw-r--r--arch/ia64/kernel/perfmon.c4
-rw-r--r--arch/ia64/kernel/process.c59
-rw-r--r--arch/ia64/kernel/ptrace.c14
-rw-r--r--arch/ia64/kernel/setup.c5
-rw-r--r--arch/ia64/kernel/signal.c54
-rw-r--r--arch/ia64/kernel/smpboot.c5
-rw-r--r--arch/ia64/kernel/traps.c9
12 files changed, 28 insertions, 335 deletions
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index e1236349c99f..4138282aefa8 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -8,15 +8,13 @@ endif
8 8
9extra-y := head.o init_task.o vmlinux.lds 9extra-y := head.o init_task.o vmlinux.lds
10 10
11obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \ 11obj-y := entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \
12 irq_lsapic.o ivt.o machvec.o pal.o paravirt_patchlist.o patch.o process.o perfmon.o ptrace.o sal.o \ 12 irq_lsapic.o ivt.o machvec.o pal.o paravirt_patchlist.o patch.o process.o perfmon.o ptrace.o sal.o \
13 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \ 13 salinfo.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
14 unwind.o mca.o mca_asm.o topology.o dma-mapping.o 14 unwind.o mca.o mca_asm.o topology.o dma-mapping.o
15 15
16obj-$(CONFIG_ACPI) += acpi.o acpi-ext.o
16obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o 17obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o
17obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o
18obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o
19obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o
20 18
21obj-$(CONFIG_IA64_PALINFO) += palinfo.o 19obj-$(CONFIG_IA64_PALINFO) += palinfo.o
22obj-$(CONFIG_IOSAPIC) += iosapic.o 20obj-$(CONFIG_IOSAPIC) += iosapic.o
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 40574ae11401..c16fb03037d4 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -60,11 +60,6 @@
60 60
61#define PREFIX "ACPI: " 61#define PREFIX "ACPI: "
62 62
63void (*pm_idle) (void);
64EXPORT_SYMBOL(pm_idle);
65void (*pm_power_off) (void);
66EXPORT_SYMBOL(pm_power_off);
67
68u32 acpi_rsdt_forced; 63u32 acpi_rsdt_forced;
69unsigned int acpi_cpei_override; 64unsigned int acpi_cpei_override;
70unsigned int acpi_cpei_phys_cpuid; 65unsigned int acpi_cpei_phys_cpuid;
@@ -83,12 +78,10 @@ static unsigned long __init acpi_find_rsdp(void)
83 "v1.0/r0.71 tables no longer supported\n"); 78 "v1.0/r0.71 tables no longer supported\n");
84 return rsdp_phys; 79 return rsdp_phys;
85} 80}
86#endif
87 81
88const char __init * 82const char __init *
89acpi_get_sysname(void) 83acpi_get_sysname(void)
90{ 84{
91#ifdef CONFIG_IA64_GENERIC
92 unsigned long rsdp_phys; 85 unsigned long rsdp_phys;
93 struct acpi_table_rsdp *rsdp; 86 struct acpi_table_rsdp *rsdp;
94 struct acpi_table_xsdt *xsdt; 87 struct acpi_table_xsdt *xsdt;
@@ -143,30 +136,8 @@ acpi_get_sysname(void)
143#endif 136#endif
144 137
145 return "dig"; 138 return "dig";
146#else
147# if defined (CONFIG_IA64_HP_SIM)
148 return "hpsim";
149# elif defined (CONFIG_IA64_HP_ZX1)
150 return "hpzx1";
151# elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)
152 return "hpzx1_swiotlb";
153# elif defined (CONFIG_IA64_SGI_SN2)
154 return "sn2";
155# elif defined (CONFIG_IA64_SGI_UV)
156 return "uv";
157# elif defined (CONFIG_IA64_DIG)
158 return "dig";
159# elif defined (CONFIG_IA64_XEN_GUEST)
160 return "xen";
161# elif defined(CONFIG_IA64_DIG_VTD)
162 return "dig_vtd";
163# else
164# error Unknown platform. Fix acpi.c.
165# endif
166#endif
167} 139}
168 140#endif /* CONFIG_IA64_GENERIC */
169#ifdef CONFIG_ACPI
170 141
171#define ACPI_MAX_PLATFORM_INTERRUPTS 256 142#define ACPI_MAX_PLATFORM_INTERRUPTS 256
172 143
@@ -1060,5 +1031,3 @@ void acpi_restore_state_mem(void) {}
1060 * do_suspend_lowlevel() 1031 * do_suspend_lowlevel()
1061 */ 1032 */
1062void do_suspend_lowlevel(void) {} 1033void do_suspend_lowlevel(void) {}
1063
1064#endif /* CONFIG_ACPI */
diff --git a/arch/ia64/kernel/audit.c b/arch/ia64/kernel/audit.c
index f3802ae89b10..96a9d18ff4c4 100644
--- a/arch/ia64/kernel/audit.c
+++ b/arch/ia64/kernel/audit.c
@@ -30,20 +30,11 @@ static unsigned signal_class[] = {
30 30
31int audit_classify_arch(int arch) 31int audit_classify_arch(int arch)
32{ 32{
33#ifdef CONFIG_IA32_SUPPORT
34 if (arch == AUDIT_ARCH_I386)
35 return 1;
36#endif
37 return 0; 33 return 0;
38} 34}
39 35
40int audit_classify_syscall(int abi, unsigned syscall) 36int audit_classify_syscall(int abi, unsigned syscall)
41{ 37{
42#ifdef CONFIG_IA32_SUPPORT
43 extern int ia32_classify_syscall(unsigned);
44 if (abi == AUDIT_ARCH_I386)
45 return ia32_classify_syscall(syscall);
46#endif
47 switch(syscall) { 38 switch(syscall) {
48 case __NR_open: 39 case __NR_open:
49 return 2; 40 return 2;
@@ -58,18 +49,6 @@ int audit_classify_syscall(int abi, unsigned syscall)
58 49
59static int __init audit_classes_init(void) 50static int __init audit_classes_init(void)
60{ 51{
61#ifdef CONFIG_IA32_SUPPORT
62 extern __u32 ia32_dir_class[];
63 extern __u32 ia32_write_class[];
64 extern __u32 ia32_read_class[];
65 extern __u32 ia32_chattr_class[];
66 extern __u32 ia32_signal_class[];
67 audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class);
68 audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class);
69 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class);
70 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class);
71 audit_register_class(AUDIT_CLASS_SIGNAL_32, ia32_signal_class);
72#endif
73 audit_register_class(AUDIT_CLASS_WRITE, write_class); 52 audit_register_class(AUDIT_CLASS_WRITE, write_class);
74 audit_register_class(AUDIT_CLASS_READ, read_class); 53 audit_register_class(AUDIT_CLASS_READ, read_class);
75 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); 54 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index d75b872ca4dc..9a260b317d8d 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -71,15 +71,6 @@ ENTRY(ia64_execve)
71 add out3=16,sp // regs 71 add out3=16,sp // regs
72 br.call.sptk.many rp=sys_execve 72 br.call.sptk.many rp=sys_execve
73.ret0: 73.ret0:
74#ifdef CONFIG_IA32_SUPPORT
75 /*
76 * Check if we're returning to ia32 mode. If so, we need to restore ia32 registers
77 * from pt_regs.
78 */
79 adds r16=PT(CR_IPSR)+16,sp
80 ;;
81 ld8 r16=[r16]
82#endif
83 cmp4.ge p6,p7=r8,r0 74 cmp4.ge p6,p7=r8,r0
84 mov ar.pfs=loc1 // restore ar.pfs 75 mov ar.pfs=loc1 // restore ar.pfs
85 sxt4 r8=r8 // return 64-bit result 76 sxt4 r8=r8 // return 64-bit result
@@ -108,12 +99,6 @@ ENTRY(ia64_execve)
108 ldf.fill f23=[sp]; ldf.fill f24=[sp]; mov f25=f0 99 ldf.fill f23=[sp]; ldf.fill f24=[sp]; mov f25=f0
109 ldf.fill f26=[sp]; ldf.fill f27=[sp]; mov f28=f0 100 ldf.fill f26=[sp]; ldf.fill f27=[sp]; mov f28=f0
110 ldf.fill f29=[sp]; ldf.fill f30=[sp]; mov f31=f0 101 ldf.fill f29=[sp]; ldf.fill f30=[sp]; mov f31=f0
111#ifdef CONFIG_IA32_SUPPORT
112 tbit.nz p6,p0=r16, IA64_PSR_IS_BIT
113 movl loc0=ia64_ret_from_ia32_execve
114 ;;
115(p6) mov rp=loc0
116#endif
117 br.ret.sptk.many rp 102 br.ret.sptk.many rp
118END(ia64_execve) 103END(ia64_execve)
119 104
@@ -848,30 +833,6 @@ __paravirt_work_processed_syscall:
848 br.cond.sptk.many rbs_switch // B 833 br.cond.sptk.many rbs_switch // B
849END(__paravirt_leave_syscall) 834END(__paravirt_leave_syscall)
850 835
851#ifdef __IA64_ASM_PARAVIRTUALIZED_NATIVE
852#ifdef CONFIG_IA32_SUPPORT
853GLOBAL_ENTRY(ia64_ret_from_ia32_execve)
854 PT_REGS_UNWIND_INFO(0)
855 adds r2=PT(R8)+16,sp // r2 = &pt_regs.r8
856 adds r3=PT(R10)+16,sp // r3 = &pt_regs.r10
857 ;;
858 .mem.offset 0,0
859 st8.spill [r2]=r8 // store return value in slot for r8 and set unat bit
860 .mem.offset 8,0
861 st8.spill [r3]=r0 // clear error indication in slot for r10 and set unat bit
862#ifdef CONFIG_PARAVIRT
863 ;;
864 // don't fall through, ia64_leave_kernel may be #define'd
865 br.cond.sptk.few ia64_leave_kernel
866 ;;
867#endif /* CONFIG_PARAVIRT */
868END(ia64_ret_from_ia32_execve)
869#ifndef CONFIG_PARAVIRT
870 // fall through
871#endif
872#endif /* CONFIG_IA32_SUPPORT */
873#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
874
875GLOBAL_ENTRY(__paravirt_leave_kernel) 836GLOBAL_ENTRY(__paravirt_leave_kernel)
876 PT_REGS_UNWIND_INFO(0) 837 PT_REGS_UNWIND_INFO(0)
877 /* 838 /*
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index ec9a5fdfa1b9..179fd122e837 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -49,7 +49,6 @@
49 49
50#include <asm/asmmacro.h> 50#include <asm/asmmacro.h>
51#include <asm/break.h> 51#include <asm/break.h>
52#include <asm/ia32.h>
53#include <asm/kregs.h> 52#include <asm/kregs.h>
54#include <asm/asm-offsets.h> 53#include <asm/asm-offsets.h>
55#include <asm/pgtable.h> 54#include <asm/pgtable.h>
@@ -1386,28 +1385,6 @@ END(ia32_exception)
1386// 0x6a00 Entry 46 (size 16 bundles) IA-32 Intercept (30,31,59,70,71) 1385// 0x6a00 Entry 46 (size 16 bundles) IA-32 Intercept (30,31,59,70,71)
1387ENTRY(ia32_intercept) 1386ENTRY(ia32_intercept)
1388 DBG_FAULT(46) 1387 DBG_FAULT(46)
1389#ifdef CONFIG_IA32_SUPPORT
1390 mov r31=pr
1391 MOV_FROM_ISR(r16)
1392 ;;
1393 extr.u r17=r16,16,8 // get ISR.code
1394 mov r18=ar.eflag
1395 MOV_FROM_IIM(r19) // old eflag value
1396 ;;
1397 cmp.ne p6,p0=2,r17
1398(p6) br.cond.spnt 1f // not a system flag fault
1399 xor r16=r18,r19
1400 ;;
1401 extr.u r17=r16,18,1 // get the eflags.ac bit
1402 ;;
1403 cmp.eq p6,p0=0,r17
1404(p6) br.cond.spnt 1f // eflags.ac bit didn't change
1405 ;;
1406 mov pr=r31,-1 // restore predicate registers
1407 RFI
1408
14091:
1410#endif // CONFIG_IA32_SUPPORT
1411 FAULT(46) 1388 FAULT(46)
1412END(ia32_intercept) 1389END(ia32_intercept)
1413 1390
@@ -1416,12 +1393,7 @@ END(ia32_intercept)
1416// 0x6b00 Entry 47 (size 16 bundles) IA-32 Interrupt (74) 1393// 0x6b00 Entry 47 (size 16 bundles) IA-32 Interrupt (74)
1417ENTRY(ia32_interrupt) 1394ENTRY(ia32_interrupt)
1418 DBG_FAULT(47) 1395 DBG_FAULT(47)
1419#ifdef CONFIG_IA32_SUPPORT
1420 mov r31=pr
1421 br.sptk.many dispatch_to_ia32_handler
1422#else
1423 FAULT(47) 1396 FAULT(47)
1424#endif
1425END(ia32_interrupt) 1397END(ia32_interrupt)
1426 1398
1427 .org ia64_ivt+0x6c00 1399 .org ia64_ivt+0x6c00
@@ -1715,89 +1687,3 @@ ENTRY(dispatch_illegal_op_fault)
1715(p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel 1687(p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel
1716 br.sptk.many ia64_leave_kernel 1688 br.sptk.many ia64_leave_kernel
1717END(dispatch_illegal_op_fault) 1689END(dispatch_illegal_op_fault)
1718
1719#ifdef CONFIG_IA32_SUPPORT
1720
1721 /*
1722 * There is no particular reason for this code to be here, other than that
1723 * there happens to be space here that would go unused otherwise. If this
1724 * fault ever gets "unreserved", simply moved the following code to a more
1725 * suitable spot...
1726 */
1727
1728 // IA32 interrupt entry point
1729
1730ENTRY(dispatch_to_ia32_handler)
1731 SAVE_MIN
1732 ;;
1733 MOV_FROM_ISR(r14)
1734 SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r24)
1735 // guarantee that interruption collection is on
1736 ;;
1737 SSM_PSR_I(p15, p15, r3)
1738 adds r3=8,r2 // Base pointer for SAVE_REST
1739 ;;
1740 SAVE_REST
1741 ;;
1742 mov r15=0x80
1743 shr r14=r14,16 // Get interrupt number
1744 ;;
1745 cmp.ne p6,p0=r14,r15
1746(p6) br.call.dpnt.many b6=non_ia32_syscall
1747
1748 adds r14=IA64_PT_REGS_R8_OFFSET + 16,sp // 16 byte hole per SW conventions
1749 adds r15=IA64_PT_REGS_R1_OFFSET + 16,sp
1750 ;;
1751 cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0
1752 ld8 r8=[r14] // get r8
1753 ;;
1754 st8 [r15]=r8 // save original EAX in r1 (IA32 procs don't use the GP)
1755 ;;
1756 alloc r15=ar.pfs,0,0,6,0 // must first in an insn group
1757 ;;
1758 ld4 r8=[r14],8 // r8 == eax (syscall number)
1759 mov r15=IA32_NR_syscalls
1760 ;;
1761 cmp.ltu.unc p6,p7=r8,r15
1762 ld4 out1=[r14],8 // r9 == ecx
1763 ;;
1764 ld4 out2=[r14],8 // r10 == edx
1765 ;;
1766 ld4 out0=[r14] // r11 == ebx
1767 adds r14=(IA64_PT_REGS_R13_OFFSET) + 16,sp
1768 ;;
1769 ld4 out5=[r14],PT(R14)-PT(R13) // r13 == ebp
1770 ;;
1771 ld4 out3=[r14],PT(R15)-PT(R14) // r14 == esi
1772 adds r2=TI_FLAGS+IA64_TASK_SIZE,r13
1773 ;;
1774 ld4 out4=[r14] // r15 == edi
1775 movl r16=ia32_syscall_table
1776 ;;
1777(p6) shladd r16=r8,3,r16 // force ni_syscall if not valid syscall number
1778 ld4 r2=[r2] // r2 = current_thread_info()->flags
1779 ;;
1780 ld8 r16=[r16]
1781 and r2=_TIF_SYSCALL_TRACEAUDIT,r2 // mask trace or audit
1782 ;;
1783 mov b6=r16
1784 movl r15=ia32_ret_from_syscall
1785 cmp.eq p8,p0=r2,r0
1786 ;;
1787 mov rp=r15
1788(p8) br.call.sptk.many b6=b6
1789 br.cond.sptk ia32_trace_syscall
1790
1791non_ia32_syscall:
1792 alloc r15=ar.pfs,0,0,2,0
1793 mov out0=r14 // interrupt #
1794 add out1=16,sp // pointer to pt_regs
1795 ;; // avoid WAW on CFM
1796 br.call.sptk.many rp=ia32_bad_interrupt
1797.ret1: movl r15=ia64_leave_kernel
1798 ;;
1799 mov rp=r15
1800 br.ret.sptk.many rp
1801END(dispatch_to_ia32_handler)
1802
1803#endif /* CONFIG_IA32_SUPPORT */
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 6bcbe215b9a4..b81e46b1629b 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2713,7 +2713,7 @@ pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg
2713 goto buffer_error; 2713 goto buffer_error;
2714 } 2714 }
2715 2715
2716 DPRINT(("ctx=%p flags=0x%x system=%d notify_block=%d excl_idle=%d no_msg=%d ctx_fd=%d \n", 2716 DPRINT(("ctx=%p flags=0x%x system=%d notify_block=%d excl_idle=%d no_msg=%d ctx_fd=%d\n",
2717 ctx, 2717 ctx,
2718 ctx_flags, 2718 ctx_flags,
2719 ctx->ctx_fl_system, 2719 ctx->ctx_fl_system,
@@ -3677,7 +3677,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
3677 * "self-monitoring". 3677 * "self-monitoring".
3678 */ 3678 */
3679 if (CTX_OVFL_NOBLOCK(ctx) == 0 && state == PFM_CTX_MASKED) { 3679 if (CTX_OVFL_NOBLOCK(ctx) == 0 && state == PFM_CTX_MASKED) {
3680 DPRINT(("unblocking [%d] \n", task_pid_nr(task))); 3680 DPRINT(("unblocking [%d]\n", task_pid_nr(task)));
3681 complete(&ctx->ctx_restart_done); 3681 complete(&ctx->ctx_restart_done);
3682 } else { 3682 } else {
3683 DPRINT(("[%d] armed exit trap\n", task_pid_nr(task))); 3683 DPRINT(("[%d] armed exit trap\n", task_pid_nr(task)));
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 9bcec9945c12..d92765cae10a 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -33,7 +33,6 @@
33#include <asm/cpu.h> 33#include <asm/cpu.h>
34#include <asm/delay.h> 34#include <asm/delay.h>
35#include <asm/elf.h> 35#include <asm/elf.h>
36#include <asm/ia32.h>
37#include <asm/irq.h> 36#include <asm/irq.h>
38#include <asm/kexec.h> 37#include <asm/kexec.h>
39#include <asm/pgalloc.h> 38#include <asm/pgalloc.h>
@@ -60,6 +59,10 @@ unsigned long idle_halt;
60EXPORT_SYMBOL(idle_halt); 59EXPORT_SYMBOL(idle_halt);
61unsigned long idle_nomwait; 60unsigned long idle_nomwait;
62EXPORT_SYMBOL(idle_nomwait); 61EXPORT_SYMBOL(idle_nomwait);
62void (*pm_idle) (void);
63EXPORT_SYMBOL(pm_idle);
64void (*pm_power_off) (void);
65EXPORT_SYMBOL(pm_power_off);
63 66
64void 67void
65ia64_do_show_stack (struct unw_frame_info *info, void *arg) 68ia64_do_show_stack (struct unw_frame_info *info, void *arg)
@@ -358,11 +361,6 @@ ia64_save_extra (struct task_struct *task)
358 if (info & PFM_CPUINFO_SYST_WIDE) 361 if (info & PFM_CPUINFO_SYST_WIDE)
359 pfm_syst_wide_update_task(task, info, 0); 362 pfm_syst_wide_update_task(task, info, 0);
360#endif 363#endif
361
362#ifdef CONFIG_IA32_SUPPORT
363 if (IS_IA32_PROCESS(task_pt_regs(task)))
364 ia32_save_state(task);
365#endif
366} 364}
367 365
368void 366void
@@ -383,11 +381,6 @@ ia64_load_extra (struct task_struct *task)
383 if (info & PFM_CPUINFO_SYST_WIDE) 381 if (info & PFM_CPUINFO_SYST_WIDE)
384 pfm_syst_wide_update_task(task, info, 1); 382 pfm_syst_wide_update_task(task, info, 1);
385#endif 383#endif
386
387#ifdef CONFIG_IA32_SUPPORT
388 if (IS_IA32_PROCESS(task_pt_regs(task)))
389 ia32_load_state(task);
390#endif
391} 384}
392 385
393/* 386/*
@@ -426,7 +419,7 @@ copy_thread(unsigned long clone_flags,
426 unsigned long user_stack_base, unsigned long user_stack_size, 419 unsigned long user_stack_base, unsigned long user_stack_size,
427 struct task_struct *p, struct pt_regs *regs) 420 struct task_struct *p, struct pt_regs *regs)
428{ 421{
429 extern char ia64_ret_from_clone, ia32_ret_from_clone; 422 extern char ia64_ret_from_clone;
430 struct switch_stack *child_stack, *stack; 423 struct switch_stack *child_stack, *stack;
431 unsigned long rbs, child_rbs, rbs_size; 424 unsigned long rbs, child_rbs, rbs_size;
432 struct pt_regs *child_ptregs; 425 struct pt_regs *child_ptregs;
@@ -457,7 +450,7 @@ copy_thread(unsigned long clone_flags,
457 memcpy((void *) child_rbs, (void *) rbs, rbs_size); 450 memcpy((void *) child_rbs, (void *) rbs, rbs_size);
458 451
459 if (likely(user_mode(child_ptregs))) { 452 if (likely(user_mode(child_ptregs))) {
460 if ((clone_flags & CLONE_SETTLS) && !IS_IA32_PROCESS(regs)) 453 if (clone_flags & CLONE_SETTLS)
461 child_ptregs->r13 = regs->r16; /* see sys_clone2() in entry.S */ 454 child_ptregs->r13 = regs->r16; /* see sys_clone2() in entry.S */
462 if (user_stack_base) { 455 if (user_stack_base) {
463 child_ptregs->r12 = user_stack_base + user_stack_size - 16; 456 child_ptregs->r12 = user_stack_base + user_stack_size - 16;
@@ -477,10 +470,7 @@ copy_thread(unsigned long clone_flags,
477 child_ptregs->r13 = (unsigned long) p; /* set `current' pointer */ 470 child_ptregs->r13 = (unsigned long) p; /* set `current' pointer */
478 } 471 }
479 child_stack->ar_bspstore = child_rbs + rbs_size; 472 child_stack->ar_bspstore = child_rbs + rbs_size;
480 if (IS_IA32_PROCESS(regs)) 473 child_stack->b0 = (unsigned long) &ia64_ret_from_clone;
481 child_stack->b0 = (unsigned long) &ia32_ret_from_clone;
482 else
483 child_stack->b0 = (unsigned long) &ia64_ret_from_clone;
484 474
485 /* copy parts of thread_struct: */ 475 /* copy parts of thread_struct: */
486 p->thread.ksp = (unsigned long) child_stack - 16; 476 p->thread.ksp = (unsigned long) child_stack - 16;
@@ -515,22 +505,6 @@ copy_thread(unsigned long clone_flags,
515 p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR) 505 p->thread.flags = ((current->thread.flags & ~THREAD_FLAGS_TO_CLEAR)
516 | THREAD_FLAGS_TO_SET); 506 | THREAD_FLAGS_TO_SET);
517 ia64_drop_fpu(p); /* don't pick up stale state from a CPU's fph */ 507 ia64_drop_fpu(p); /* don't pick up stale state from a CPU's fph */
518#ifdef CONFIG_IA32_SUPPORT
519 /*
520 * If we're cloning an IA32 task then save the IA32 extra
521 * state from the current task to the new task
522 */
523 if (IS_IA32_PROCESS(task_pt_regs(current))) {
524 ia32_save_state(p);
525 if (clone_flags & CLONE_SETTLS)
526 retval = ia32_clone_tls(p, child_ptregs);
527
528 /* Copy partially mapped page list */
529 if (!retval)
530 retval = ia32_copy_ia64_partial_page_list(p,
531 clone_flags);
532 }
533#endif
534 508
535#ifdef CONFIG_PERFMON 509#ifdef CONFIG_PERFMON
536 if (current->thread.pfm_context) 510 if (current->thread.pfm_context)
@@ -704,15 +678,6 @@ EXPORT_SYMBOL(kernel_thread);
704int 678int
705kernel_thread_helper (int (*fn)(void *), void *arg) 679kernel_thread_helper (int (*fn)(void *), void *arg)
706{ 680{
707#ifdef CONFIG_IA32_SUPPORT
708 if (IS_IA32_PROCESS(task_pt_regs(current))) {
709 /* A kernel thread is always a 64-bit process. */
710 current->thread.map_base = DEFAULT_MAP_BASE;
711 current->thread.task_size = DEFAULT_TASK_SIZE;
712 ia64_set_kr(IA64_KR_IO_BASE, current->thread.old_iob);
713 ia64_set_kr(IA64_KR_TSSD, current->thread.old_k1);
714 }
715#endif
716 return (*fn)(arg); 681 return (*fn)(arg);
717} 682}
718 683
@@ -725,14 +690,6 @@ flush_thread (void)
725 /* drop floating-point and debug-register state if it exists: */ 690 /* drop floating-point and debug-register state if it exists: */
726 current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); 691 current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
727 ia64_drop_fpu(current); 692 ia64_drop_fpu(current);
728#ifdef CONFIG_IA32_SUPPORT
729 if (IS_IA32_PROCESS(task_pt_regs(current))) {
730 ia32_drop_ia64_partial_page_list(current);
731 current->thread.task_size = IA32_PAGE_OFFSET;
732 set_fs(USER_DS);
733 memset(current->thread.tls_array, 0, sizeof(current->thread.tls_array));
734 }
735#endif
736} 693}
737 694
738/* 695/*
@@ -753,8 +710,6 @@ exit_thread (void)
753 if (current->thread.flags & IA64_THREAD_DBG_VALID) 710 if (current->thread.flags & IA64_THREAD_DBG_VALID)
754 pfm_release_debug_registers(current); 711 pfm_release_debug_registers(current);
755#endif 712#endif
756 if (IS_IA32_PROCESS(task_pt_regs(current)))
757 ia32_drop_ia64_partial_page_list(current);
758} 713}
759 714
760unsigned long 715unsigned long
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 9daa87fdb018..b61afbbe076f 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -1250,13 +1250,8 @@ syscall_trace_enter (long arg0, long arg1, long arg2, long arg3,
1250 long syscall; 1250 long syscall;
1251 int arch; 1251 int arch;
1252 1252
1253 if (IS_IA32_PROCESS(&regs)) { 1253 syscall = regs.r15;
1254 syscall = regs.r1; 1254 arch = AUDIT_ARCH_IA64;
1255 arch = AUDIT_ARCH_I386;
1256 } else {
1257 syscall = regs.r15;
1258 arch = AUDIT_ARCH_IA64;
1259 }
1260 1255
1261 audit_syscall_entry(arch, syscall, arg0, arg1, arg2, arg3); 1256 audit_syscall_entry(arch, syscall, arg0, arg1, arg2, arg3);
1262 } 1257 }
@@ -2172,11 +2167,6 @@ static const struct user_regset_view user_ia64_view = {
2172 2167
2173const struct user_regset_view *task_user_regset_view(struct task_struct *tsk) 2168const struct user_regset_view *task_user_regset_view(struct task_struct *tsk)
2174{ 2169{
2175#ifdef CONFIG_IA32_SUPPORT
2176 extern const struct user_regset_view user_ia32_view;
2177 if (IS_IA32_PROCESS(task_pt_regs(tsk)))
2178 return &user_ia32_view;
2179#endif
2180 return &user_ia64_view; 2170 return &user_ia64_view;
2181} 2171}
2182 2172
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index a1ea87919777..41ae6a596b50 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -46,7 +46,6 @@
46#include <linux/kexec.h> 46#include <linux/kexec.h>
47#include <linux/crash_dump.h> 47#include <linux/crash_dump.h>
48 48
49#include <asm/ia32.h>
50#include <asm/machvec.h> 49#include <asm/machvec.h>
51#include <asm/mca.h> 50#include <asm/mca.h>
52#include <asm/meminit.h> 51#include <asm/meminit.h>
@@ -1016,10 +1015,6 @@ cpu_init (void)
1016 ia64_mmu_init(ia64_imva(cpu_data)); 1015 ia64_mmu_init(ia64_imva(cpu_data));
1017 ia64_mca_cpu_init(ia64_imva(cpu_data)); 1016 ia64_mca_cpu_init(ia64_imva(cpu_data));
1018 1017
1019#ifdef CONFIG_IA32_SUPPORT
1020 ia32_cpu_init();
1021#endif
1022
1023 /* Clear ITC to eliminate sched_clock() overflows in human time. */ 1018 /* Clear ITC to eliminate sched_clock() overflows in human time. */
1024 ia64_set_itc(0); 1019 ia64_set_itc(0);
1025 1020
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index e1821ca4c7df..7bdafc8788bd 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -21,7 +21,6 @@
21#include <linux/unistd.h> 21#include <linux/unistd.h>
22#include <linux/wait.h> 22#include <linux/wait.h>
23 23
24#include <asm/ia32.h>
25#include <asm/intrinsics.h> 24#include <asm/intrinsics.h>
26#include <asm/uaccess.h> 25#include <asm/uaccess.h>
27#include <asm/rse.h> 26#include <asm/rse.h>
@@ -425,14 +424,8 @@ static long
425handle_signal (unsigned long sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *oldset, 424handle_signal (unsigned long sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *oldset,
426 struct sigscratch *scr) 425 struct sigscratch *scr)
427{ 426{
428 if (IS_IA32_PROCESS(&scr->pt)) { 427 if (!setup_frame(sig, ka, info, oldset, scr))
429 /* send signal to IA-32 process */ 428 return 0;
430 if (!ia32_setup_frame1(sig, ka, info, oldset, &scr->pt))
431 return 0;
432 } else
433 /* send signal to IA-64 process */
434 if (!setup_frame(sig, ka, info, oldset, scr))
435 return 0;
436 429
437 spin_lock_irq(&current->sighand->siglock); 430 spin_lock_irq(&current->sighand->siglock);
438 sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask); 431 sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
@@ -462,7 +455,6 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
462 siginfo_t info; 455 siginfo_t info;
463 long restart = in_syscall; 456 long restart = in_syscall;
464 long errno = scr->pt.r8; 457 long errno = scr->pt.r8;
465# define ERR_CODE(c) (IS_IA32_PROCESS(&scr->pt) ? -(c) : (c))
466 458
467 /* 459 /*
468 * In the ia64_leave_kernel code path, we want the common case to go fast, which 460 * In the ia64_leave_kernel code path, we want the common case to go fast, which
@@ -490,14 +482,7 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
490 * inferior call), thus it's important to check for restarting _after_ 482 * inferior call), thus it's important to check for restarting _after_
491 * get_signal_to_deliver(). 483 * get_signal_to_deliver().
492 */ 484 */
493 if (IS_IA32_PROCESS(&scr->pt)) { 485 if ((long) scr->pt.r10 != -1)
494 if (in_syscall) {
495 if (errno >= 0)
496 restart = 0;
497 else
498 errno = -errno;
499 }
500 } else if ((long) scr->pt.r10 != -1)
501 /* 486 /*
502 * A system calls has to be restarted only if one of the error codes 487 * A system calls has to be restarted only if one of the error codes
503 * ERESTARTNOHAND, ERESTARTSYS, or ERESTARTNOINTR is returned. If r10 488 * ERESTARTNOHAND, ERESTARTSYS, or ERESTARTNOINTR is returned. If r10
@@ -513,22 +498,18 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
513 switch (errno) { 498 switch (errno) {
514 case ERESTART_RESTARTBLOCK: 499 case ERESTART_RESTARTBLOCK:
515 case ERESTARTNOHAND: 500 case ERESTARTNOHAND:
516 scr->pt.r8 = ERR_CODE(EINTR); 501 scr->pt.r8 = EINTR;
517 /* note: scr->pt.r10 is already -1 */ 502 /* note: scr->pt.r10 is already -1 */
518 break; 503 break;
519 504
520 case ERESTARTSYS: 505 case ERESTARTSYS:
521 if ((ka.sa.sa_flags & SA_RESTART) == 0) { 506 if ((ka.sa.sa_flags & SA_RESTART) == 0) {
522 scr->pt.r8 = ERR_CODE(EINTR); 507 scr->pt.r8 = EINTR;
523 /* note: scr->pt.r10 is already -1 */ 508 /* note: scr->pt.r10 is already -1 */
524 break; 509 break;
525 } 510 }
526 case ERESTARTNOINTR: 511 case ERESTARTNOINTR:
527 if (IS_IA32_PROCESS(&scr->pt)) { 512 ia64_decrement_ip(&scr->pt);
528 scr->pt.r8 = scr->pt.r1;
529 scr->pt.cr_iip -= 2;
530 } else
531 ia64_decrement_ip(&scr->pt);
532 restart = 0; /* don't restart twice if handle_signal() fails... */ 513 restart = 0; /* don't restart twice if handle_signal() fails... */
533 } 514 }
534 } 515 }
@@ -555,21 +536,14 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)
555 if (errno == ERESTARTNOHAND || errno == ERESTARTSYS || errno == ERESTARTNOINTR 536 if (errno == ERESTARTNOHAND || errno == ERESTARTSYS || errno == ERESTARTNOINTR
556 || errno == ERESTART_RESTARTBLOCK) 537 || errno == ERESTART_RESTARTBLOCK)
557 { 538 {
558 if (IS_IA32_PROCESS(&scr->pt)) { 539 /*
559 scr->pt.r8 = scr->pt.r1; 540 * Note: the syscall number is in r15 which is saved in
560 scr->pt.cr_iip -= 2; 541 * pt_regs so all we need to do here is adjust ip so that
561 if (errno == ERESTART_RESTARTBLOCK) 542 * the "break" instruction gets re-executed.
562 scr->pt.r8 = 0; /* x86 version of __NR_restart_syscall */ 543 */
563 } else { 544 ia64_decrement_ip(&scr->pt);
564 /* 545 if (errno == ERESTART_RESTARTBLOCK)
565 * Note: the syscall number is in r15 which is saved in 546 scr->pt.r15 = __NR_restart_syscall;
566 * pt_regs so all we need to do here is adjust ip so that
567 * the "break" instruction gets re-executed.
568 */
569 ia64_decrement_ip(&scr->pt);
570 if (errno == ERESTART_RESTARTBLOCK)
571 scr->pt.r15 = __NR_restart_syscall;
572 }
573 } 547 }
574 } 548 }
575 549
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index de100aa7ff03..e5230b2ff2c5 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -44,7 +44,6 @@
44#include <asm/cache.h> 44#include <asm/cache.h>
45#include <asm/current.h> 45#include <asm/current.h>
46#include <asm/delay.h> 46#include <asm/delay.h>
47#include <asm/ia32.h>
48#include <asm/io.h> 47#include <asm/io.h>
49#include <asm/irq.h> 48#include <asm/irq.h>
50#include <asm/machvec.h> 49#include <asm/machvec.h>
@@ -443,10 +442,6 @@ smp_callin (void)
443 calibrate_delay(); 442 calibrate_delay();
444 local_cpu_data->loops_per_jiffy = loops_per_jiffy; 443 local_cpu_data->loops_per_jiffy = loops_per_jiffy;
445 444
446#ifdef CONFIG_IA32_SUPPORT
447 ia32_gdt_init();
448#endif
449
450 /* 445 /*
451 * Allow the master to continue. 446 * Allow the master to continue.
452 */ 447 */
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index f0cda765e681..fd80e70018a9 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -19,7 +19,6 @@
19#include <linux/kdebug.h> 19#include <linux/kdebug.h>
20 20
21#include <asm/fpswa.h> 21#include <asm/fpswa.h>
22#include <asm/ia32.h>
23#include <asm/intrinsics.h> 22#include <asm/intrinsics.h>
24#include <asm/processor.h> 23#include <asm/processor.h>
25#include <asm/uaccess.h> 24#include <asm/uaccess.h>
@@ -626,10 +625,6 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,
626 break; 625 break;
627 626
628 case 45: 627 case 45:
629#ifdef CONFIG_IA32_SUPPORT
630 if (ia32_exception(&regs, isr) == 0)
631 return;
632#endif
633 printk(KERN_ERR "Unexpected IA-32 exception (Trap 45)\n"); 628 printk(KERN_ERR "Unexpected IA-32 exception (Trap 45)\n");
634 printk(KERN_ERR " iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx\n", 629 printk(KERN_ERR " iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx\n",
635 iip, ifa, isr); 630 iip, ifa, isr);
@@ -637,10 +632,6 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,
637 break; 632 break;
638 633
639 case 46: 634 case 46:
640#ifdef CONFIG_IA32_SUPPORT
641 if (ia32_intercept(&regs, isr) == 0)
642 return;
643#endif
644 printk(KERN_ERR "Unexpected IA-32 intercept trap (Trap 46)\n"); 635 printk(KERN_ERR "Unexpected IA-32 intercept trap (Trap 46)\n");
645 printk(KERN_ERR " iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx, iim - 0x%lx\n", 636 printk(KERN_ERR " iip - 0x%lx, ifa - 0x%lx, isr - 0x%lx, iim - 0x%lx\n",
646 iip, ifa, isr, iim); 637 iip, ifa, isr, iim);