Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263870AbTIIBFH (ORCPT ); Mon, 8 Sep 2003 21:05:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263868AbTIIBFH (ORCPT ); Mon, 8 Sep 2003 21:05:07 -0400 Received: from hermes.py.intel.com ([146.152.216.3]:29419 "EHLO hermes.py.intel.com") by vger.kernel.org with ESMTP id S263870AbTIIBEp (ORCPT ); Mon, 8 Sep 2003 21:04:45 -0400 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C3766E.588EA4C4" X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Subject: [Patch] asm workarounds in generic header files Date: Mon, 8 Sep 2003 18:04:40 -0700 Message-ID: X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: [Patch] asm workarounds in generic header files Thread-Index: AcN2blh6yIzeFTtzTdqmKY7NfoqQgQ== From: "Siddha, Suresh B" To: "Andrew Morton" , "Linus Torvalds" , Cc: "Nakajima, Jun" , "Mallick, Asit K" X-OriginalArrivalTime: 09 Sep 2003 01:04:40.0725 (UTC) FILETIME=[58F22450:01C3766E] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4456 Lines: 104 This is a multi-part message in MIME format. ------_=_NextPart_001_01C3766E.588EA4C4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Intel ecc compiler doesn't support inline assembly.=20 Attached patch is required to enable linux kernel build with Intel ecc = compiler. Please apply. thanks, suresh diff -Nru linux/include/linux/compiler.h = linux-2.5/include/linux/compiler.h --- linux/include/linux/compiler.h Mon Sep 8 11:51:00 2003 +++ linux-2.5/include/linux/compiler.h Mon Sep 8 13:22:13 2003 @@ -74,10 +74,26 @@ #define __attribute_pure__ /* unimplemented */ #endif =20 +#if defined(__INTEL_COMPILER) && defined(__ECC) +/* Optimization barrier */ +#include +#define barrier() __memory_barrier() + +#define RELOC_HIDE(ptr, off) \ + ({ unsigned long __ptr; \ + __ptr =3D (unsigned long) (ptr); \ + (typeof(ptr)) (__ptr + (off)); }) +#else +/* Optimization barrier */ +/* The "volatile" is due to gcc bugs */ +#define barrier() asm volatile ("":::"memory") + /* This macro obfuscates arithmetic on a variable address so that gcc shouldn't recognize the original var, and make assumptions about it = */ #define RELOC_HIDE(ptr, off) \ ({ unsigned long __ptr; \ __asm__ ("" : "=3Dg"(__ptr) : "0"(ptr)); \ (typeof(ptr)) (__ptr + (off)); }) +#endif + #endif /* __LINUX_COMPILER_H */ diff -Nru linux/include/linux/kernel.h linux-2.5/include/linux/kernel.h --- linux/include/linux/kernel.h Mon Sep 8 11:51:01 2003 +++ linux-2.5/include/linux/kernel.h Mon Sep 8 12:06:14 2003 @@ -15,10 +15,6 @@ #include #include =20 -/* Optimization barrier */ -/* The "volatile" is due to gcc bugs */ -#define barrier() __asm__ __volatile__("": : :"memory") - #define INT_MAX ((int)(~0U>>1)) #define INT_MIN (-INT_MAX - 1) #define UINT_MAX (~0U) ------_=_NextPart_001_01C3766E.588EA4C4 Content-Type: application/octet-stream; name="asm.patch" Content-Transfer-Encoding: base64 Content-Description: asm.patch Content-Disposition: attachment; filename="asm.patch" ZGlmZiAtTnJ1IGxpbnV4L2luY2x1ZGUvbGludXgvY29tcGlsZXIuaCBsaW51eC0yLjUvaW5jbHVk ZS9saW51eC9jb21waWxlci5oCi0tLSBsaW51eC9pbmNsdWRlL2xpbnV4L2NvbXBpbGVyLmgJTW9u IFNlcCAgOCAxMTo1MTowMCAyMDAzCisrKyBsaW51eC0yLjUvaW5jbHVkZS9saW51eC9jb21waWxl ci5oCU1vbiBTZXAgIDggMTM6MjI6MTMgMjAwMwpAQCAtNzQsMTAgKzc0LDI2IEBACiAjZGVmaW5l IF9fYXR0cmlidXRlX3B1cmVfXwkvKiB1bmltcGxlbWVudGVkICovCiAjZW5kaWYKIAorI2lmIGRl ZmluZWQoX19JTlRFTF9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IGxpbnV4L2luY2x1ZGUvbGludXgv a2VybmVsLmgJTW9uIFNlcCAgOCAxMTo1MTowMSAyMDAzCisrKyBsaW51eC0yLjUvaW5jbHVkZS9s aW51eC9rZXJuZWwuaAlNb24gU2VwICA4IDEyOjA2OjE0IDIwMDMKQEAgLTE1LDEwICsxNSw2IEBA CiAjaW5jbHVkZSA8YXNtL2J5dGVvcmRlci5oPgogI2luY2x1ZGUgPGFzbS9idWcuaD4KIAotLyog T3B0aW1pemF0aW9uIGJhcnJpZXIgKi8KLS8qIFRoZSAidm9sYXRpbGUiIGlzIGR1ZSB0byBnY2Mg YnVncyAqLwotI2RlZmluZSBiYXJyaWVyKCkgX19hc21fXyBfX3ZvbGF0aWxlX18oIiI6IDogOiJt ZW1vcnkiKQotCiAjZGVmaW5lIElOVF9NQVgJCSgoaW50KSh+MFU+PjEpKQogI2RlZmluZSBJTlRf TUlOCQkoLUlOVF9NQVggLSAxKQogI2RlZmluZSBVSU5UX01BWAkofjBVKQo= ------_=_NextPart_001_01C3766E.588EA4C4-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/