]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ia64: disable in-kernel ia32 emulation post Madison
authorArun Sharma <arun.sharma@intel.com>
Thu, 3 Jun 2004 10:41:08 +0000 (03:41 -0700)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Thu, 3 Jun 2004 10:41:08 +0000 (03:41 -0700)
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 <arun.sharma@intel.com>
Signed-off-by: David Mosberger <davidm@hpl.hp.com>
arch/ia64/ia32/binfmt_elf32.c

index 3e035e974f6c088d6038e665bebc2a9323318fc0..babf3d1fcf401e3913ef7d9eb6b189974b747319 100644 (file)
@@ -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)