Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265242AbTIDRWY (ORCPT ); Thu, 4 Sep 2003 13:22:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265323AbTIDRWX (ORCPT ); Thu, 4 Sep 2003 13:22:23 -0400 Received: from fmr09.intel.com ([192.52.57.35]:41439 "EHLO hermes.hd.intel.com") by vger.kernel.org with ESMTP id S265242AbTIDRWA (ORCPT ); Thu, 4 Sep 2003 13:22:00 -0400 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C37309.09E5C7AD" X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Subject: RE: [PATCH] linux-2.6.0-test4_cyclone-hpet-fix_A0 Date: Thu, 4 Sep 2003 10:21:55 -0700 Message-ID: X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: [PATCH] linux-2.6.0-test4_cyclone-hpet-fix_A0 Thread-Index: AcNysU+9cIBZfloOSDa7htyVnTnmfAAU3Axw From: "Pallipadi, Venkatesh" To: "Andrew Morton" , "john stultz" Cc: X-OriginalArrivalTime: 04 Sep 2003 17:21:55.0944 (UTC) FILETIME=[0A31C680:01C37309] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 19681 Lines: 302 This is a multi-part message in MIME format. ------_=_NextPart_001_01C37309.09E5C7AD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Andrew Morton [mailto:akpm@osdl.org]=20 >=20 > john stultz wrote: > > > > Anyway, the HPET changes made calibrate_tsc() static, which=20 > it probably > > should be, but it broke the timer_cyclone code. This patch=20 > fixes it back > > up by re-implementing calibrate_tsc() locally as it was done in > > timer_hpet.c=20 >=20 > > Of course if some bozo had stuck this: >=20 > extern unsigned long calibrate_tsc(void); >=20 > in a header file rather than in a .c file (timer_cyclone.c),=20 > this problem > would not have occurred. Nevereverever put extern=20 > declarations in .c files! > My fault. I should have atleast test compiled cyclone timer code. > Can we not we avoid the cut-n-paste coding? >=20 > There is also timer_tsc.c:calibrate_tsc_hpet() which is=20 > almost the same as > timer_hpet.c:calibrate_tsc(). Seem to me that we could tweak > calibrate_tsc_hpet() a bit, unstaticalise=20 > timer_tsc.c:calibrate_tsc() and > have two functions rather than four? >=20 How about the attached patch (against mm4), that moves all=20 calibrate tsc functions into a common file, avoiding the duplication.=20 This time I could successfully compile cyclone timer too :). However, I had to do an unrelated one line change in fixmap (last chunk in=20 the patch) to compile for summit. Thanks, -Venkatesh ------_=_NextPart_001_01C37309.09E5C7AD Content-Type: application/octet-stream; name="mm4-hpet-fix.patch" Content-Transfer-Encoding: base64 Content-Description: mm4-hpet-fix.patch Content-Disposition: attachment; filename="mm4-hpet-fix.patch" ZGlmZiAtcHVyTiBsaW51eC0yLjYuMC10ZXN0NC1tbTQvYXJjaC9pMzg2L2tlcm5lbC90aW1lcnMv Y29tbW9uLmMgbGludXgtMi42LjAtdGVzdDQtbW00LWZpeC9hcmNoL2kzODYva2VybmVsL3RpbWVy cy9jb21tb24uYwotLS0gbGludXgtMi42LjAtdGVzdDQtbW00L2FyY2gvaTM4Ni9rZXJuZWwvdGlt ZXJzL2NvbW1vbi5jCTE5NjktMTItMzEgMTY6MDA6MDAuMDAwMDAwMDAwIC0wODAwCisrKyBsaW51 eC0yLjYuMC10ZXN0NC1tbTQtZml4L2FyY2gvaTM4Ni9rZXJuZWwvdGltZXJzL2NvbW1vbi5jCTIw MDMtMDktMDQgMTE6NTc6NDcuMDAwMDAwMDAwIC0wNzAwCkBAIC0wLDAgKzEsMTM4IEBACisvKgkK KyAqCUNvbW1vbiBmdW5jdGlvbnMgdXNlZCBhY3Jvc3MgdGhlIHRpbWVycyBnbyBoZXJlCisgKi8K KworI2luY2x1ZGUgPGxpbnV4L2luaXQuaD4KKyNpbmNsdWRlIDxsaW51eC90aW1leC5oPgorI2lu Y2x1ZGUgPGxpbnV4L2Vycm5vL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peC9pbmNsdWRlL2FzbS1pMzg2L2ZpeG1hcC5oCi0tLSBsaW51eC0yLjYu MC10ZXN0NC1tbTQvaW5jbHVkZS9hc20taTM4Ni9maXhtYXAuaAkyMDAzLTA5LTAyIDE3OjU2OjQ4 LjAwMDAwMDAwMCAtMDcwMAorKysgbGludXgtMi42LjAtdGVzdDQtbW00LWZpeC9pbmNsdWRlL2Fz bS1pMzg2L2ZpeG1hcC5oCTIwMDMtMDktMDQgMTE6NDI6MTMuMDAwMDAwMDAwIC0wNzAwCkBAIC03 Myw3ICs3Myw3IEBAIGVudW0gZml4ZWRfYWRkcmVzc2VzIHsKIAlGSVhfVFNTXzAsCiAJRklYX0VO VFJZX1RSQU1QT0xJTkVfMSwKIAlGSVhfRU5UUllfVFJBTVBPTElORV8wLAotI2lmZGVmIENPTkZJ R19YODZfQ1lDTE9ORQorI2lmZGVmIENPTkZJR19YODZfQ1lDTE9ORV9USU1FUgogCUZJWF9DWUNM T05FX1RJTUVSLCAvKmN5Y2xvbmUgdGltZXIgcmVnaXN0ZXIqLwogCUZJWF9WU1RBQ0tfSE9MRV8y LAogI2VuZGlmIAo= ------_=_NextPart_001_01C37309.09E5C7AD-- - 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/