Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422839AbWJPTHK (ORCPT ); Mon, 16 Oct 2006 15:07:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422835AbWJPTHJ (ORCPT ); Mon, 16 Oct 2006 15:07:09 -0400 Received: from outbound-cpk.frontbridge.com ([207.46.163.16]:12017 "EHLO outbound1-cpk-R.bigfish.com") by vger.kernel.org with ESMTP id S1422818AbWJPTHH (ORCPT ); Mon, 16 Oct 2006 15:07:07 -0400 X-BigFish: VP X-Server-Uuid: 519AC16A-9632-469E-B354-112C592D09E8 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: [PATCH] x86_64: store Socket ID in phys_proc_id Date: Mon, 16 Oct 2006 11:52:39 -0700 Message-ID: <5986589C150B2F49A46483AC44C7BCA412D6E3@ssvlexmb2.amd.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] x86_64: store Socket ID in phys_proc_id Thread-Index: AcbxUiBVxuYFuta9TTyuk6EUKOOcrgAAURyQ From: "Lu, Yinghai" To: "Andi Kleen" cc: "linux kernel mailing list" , yhlu.kernel@gmail.com X-OriginalArrivalTime: 16 Oct 2006 18:52:41.0127 (UTC) FILETIME=[41DE4370:01C6F154] X-WSS-ID: 692D0A570C44651557-05-01 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C6F154.41269D3B" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4039 Lines: 78 This is a multi-part message in MIME format. ------_=_NextPart_001_01C6F154.41269D3B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Current code store phys_proc_id with init APIC ID, and later will change to apicid>>bits. So for the apic id lifted system, for example BSP with apicid 0x10, the phys_proc_id will be 8. This patch use initial APIC ID to get Socket ID. It also removed ht_nodeid calculating, because We already have correct socket id for sure. Signed-off-by: Yinghai Lu ------_=_NextPart_001_01C6F154.41269D3B Content-Type: application/octet-stream; name=setup_c.diff Content-Transfer-Encoding: base64 Content-Description: setup_c.diff Content-Disposition: attachment; filename=setup_c.diff ZGlmZiAtLWdpdCBhL2FyY2gveDg2XzY0L2tlcm5lbC9zZXR1cC5jIGIvYXJjaC94ODZfNjQva2Vy bmVsL3NldHVwLmMKaW5kZXggZmM5NDRiNS4uZDMwZjc4YSAxMDA2NDQKLS0tIGEvYXJjaC94ODZf NjQva2VybmVsL3NldHVwLmMKKysrIGIvYXJjaC94ODZfNjQva2VybmVsL3NldHVwLmMKQEAgLTY0 MywzNCArNjQzLDIwIEBAICNlbmRpZgogCiAJLyogTG93IG9yZGVyIGJpdHMgZGVmaW5lIHRoZSBj b3JlIGlkIChpbmRleCBvZiBjb3JlIGluIHNvY2tldCkgKi8KIAljLT5jcHVfY29yZV9pZCA9IGMt PnBoeXNfcHJvY19pZCAmICgoMSA8PCBiaXRzKS0xKTsKLQkvKiBDb252ZXJ0IHRoZSBBUElDIElE IGludG8gdGhlIHNvY2tldCBJRCAqLwotCWMtPnBoeXNfcHJvY19pZCA9IHBoeXNfcGtnX2lkKGJp dHMpOworCS8qIENvbnZlcnQgdGhlIGluaXRpYWwgQVBJQyBJRCBpbnRvIHRoZSBzb2NrZXQgSUQg Ki8KKwljLT5waHlzX3Byb2NfaWQgPj49IGJpdHM7IAogCiAjaWZkZWYgQ09ORklHX05VTUEKICAg CW5vZGUgPSBjLT5waHlzX3Byb2NfaWQ7CiAgCWlmIChhcGljaWRfdG9fbm9kZVthcGljaWRdICE9 IE5VTUFfTk9fTk9ERSkKICAJCW5vZGUgPSBhcGljaWRfdG9fbm9kZVthcGljaWRdOwogIAlpZiAo IW5vZGVfb25saW5lKG5vZGUpKSB7Ci0gCQkvKiBUd28gcG9zc2liaWxpdGllcyBoZXJlOgotIAkJ ICAgLSBUaGUgQ1BVIGlzIG1pc3NpbmcgbWVtb3J5IGFuZCBubyBub2RlIHdhcyBjcmVhdGVkLgot IA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JWQvMHglMDJ4IC0+IE5vZGUgJWRcbiIsIGNwdSwgYXBpY2lkLCBub2RlKTsKICNlbmRpZgog I2VuZGlmCiB9CkBAIC05MjgsNyArOTE0LDcgQEAgdm9pZCBfX2NwdWluaXQgZWFybHlfaWRlbnRp ZnlfY3B1KHN0cnVjdAogCX0KIAogI2lmZGVmIENPTkZJR19TTVAKLQljLT5waHlzX3Byb2NfaWQg PSAoY3B1aWRfZWJ4KDEpID4+IDI0KSAmIDB4ZmY7CisJYy0+cGh5c19wcm9jX2lkID0gKGNwdWlk X2VieCgxKSA+PiAyNCkgJiAweGZmOyAvKiBpbml0aWFsIEFQSUMgSUQgKi8KICNlbmRpZgogfQog CkBAIC0xMTM2LDYgKzExMjIsNyBAQCAjZW5kaWYKICNpZmRlZiBDT05GSUdfU01QCiAJaWYgKHNt cF9udW1fc2libGluZ3MgKiBjLT54ODZfbWF4X2NvcmVzID4gMSkgewogCQlpbnQgY3B1ID0gYyAt IGNwdV9kYXRhOworCQlzZXFfcHJpbnRmKG0sICJhcGljIGlkXHRcdDogMHglMDJ4XG4iLCB4ODZf Y3B1X3RvX2FwaWNpZFtjcHVdKTsKIAkJc2VxX3ByaW50ZihtLCAicGh5c2ljYWwgaWRcdDogJWRc biIsIGMtPnBoeXNfcHJvY19pZCk7CiAJCXNlcV9wcmludGYobSwgInNpYmxpbmdzXHQ6ICVkXG4i LCBjcHVzX3dlaWdodChjcHVfY29yZV9tYXBbY3B1XSkpOwogCQlzZXFfcHJpbnRmKG0sICJjb3Jl IGlkXHRcdDogJWRcbiIsIGMtPmNwdV9jb3JlX2lkKTsK ------_=_NextPart_001_01C6F154.41269D3B-- - 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/