From 2d69d940108de78651b6aa1ff95ed85fce6e0e2f Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Thu, 3 Jun 2004 03:41:08 -0700 Subject: [PATCH] [PATCH] ia64: disable in-kernel ia32 emulation post Madison For IPF processors beyond Madison, this patches changes the kernel to allow IA-32 application execution exclusively using IA-32EL. Signed-off-by: Arun Sharma Signed-off-by: David Mosberger --- arch/ia64/ia32/binfmt_elf32.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index 3e035e974f6c0..babf3d1fcf401 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c @@ -218,3 +218,16 @@ elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int p return ia32_do_mmap(filep, (addr & IA32_PAGE_MASK), eppnt->p_filesz + pgoff, prot, type, eppnt->p_offset - pgoff); } + +#define cpu_uses_ia32el() (local_cpu_data->family > 0x1f) + +static int __init check_elf32_binfmt(void) +{ + if (cpu_uses_ia32el()) { + printk("Please use IA-32 EL for executing IA-32 binaries\n"); + return unregister_binfmt(&elf_format); + } + return 0; +} + +module_init(check_elf32_binfmt) -- 2.53.0