Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932381Ab2JVXfX (ORCPT ); Mon, 22 Oct 2012 19:35:23 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:51113 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932219Ab2JVXfW (ORCPT ); Mon, 22 Oct 2012 19:35:22 -0400 MIME-Version: 1.0 In-Reply-To: <5085BA4A.30800@zytor.com> References: <903a3ead-98b5-4afa-88a4-3dc723895e82@blur> <50833F30.4020802@ti.com> <20121021041858.GA14809@jshin-Toonie> <50843627.4020103@ti.com> <20121021210633.GA14311@jshin-Toonie> <508467EE.4040807@ti.com> <20121022144020.GA14425@jshin-Toonie> <20121022183858.GA31185@jshin-Toonie> <5085ABEF.3060502@linux.intel.com> <5085B207.5010907@linux.intel.com> <5085BA4A.30800@zytor.com> Date: Mon, 22 Oct 2012 16:35:18 -0700 X-Google-Sender-Auth: zVa5_5A2ov5FrJ1QO4lPy8TgLBE Message-ID: Subject: Re: BUG: 1bbbbe7 (x86: Exclude E820_RESERVED regions...) PANIC on boot From: Yinghai Lu To: "H. Peter Anvin" Cc: "H. Peter Anvin" , Jacob Shin , Tom Rini , "linux-kernel@vger.kernel.org" Content-Type: multipart/mixed; boundary=0015175d04428367b204ccae4ed6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6471 Lines: 111 --0015175d04428367b204ccae4ed6 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Oct 22, 2012 at 2:27 PM, H. Peter Anvin wrote: >> >> We never know that bios guys will not let bios produce crazy e820 map. >> > > Yeah, well, that just *will* happen... that's a given. > > We can trim those ranges, though. Who cares if we lose some RAM. > please check attached two patches that handle partial pages for 3.7. and you still need patch in https://lkml.org/lkml/2012/8/24/469 to address early page table size calculation problem for Tom Rini Thanks Yinghai --0015175d04428367b204ccae4ed6 Content-Type: application/octet-stream; name="memblock_trim_memory.patch" Content-Disposition: attachment; filename="memblock_trim_memory.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h8m80qlj0 U3ViamVjdDogW1BBVENIXSB4ODYsIG1tOiBUcmltIG1lbW9yeSBpbiBtZW1ibG9jayB0byBiZSBw YWdlIGFsaWduZWQKCldlIHdpbGwgbm90IG1hcCBwYXJ0aWFsIHBhZ2VzLCBzbyBuZWVkIHRvIG1h a2Ugc3VyZSBtZW1ibG9jawphbGxvY2F0aW9uIHdpbGwgbm90IGFsbG9jYXRlIHRob3NlIGJ5dGVz IG91dC4KCkFsc28gd2Ugd2lsbCB1c2UgZm9yX2VhY2hfbWVtX3Bmbl9yYW5nZSgpIHRvIGxvb3Ag dG8gbWFwIG1lbW9yeQpyYW5nZSB0byBrZWVwIHRoZW0gY29uc2lzdGVudC4KClNpZ25lZC1vZmYt Ynk6IFlpbmdoYWkgTHUgPHlpbmdoYWlAa2VybmVsLm9yZz4KCi0tLQogYXJjaC94ODYva2VybmVs L2U4MjAuYyAgIHwgICAgMyArKysKIGluY2x1ZGUvbGludXgvbWVtYmxvY2suaCB8ICAgIDEgKwog bW0vbWVtYmxvY2suYyAgICAgICAgICAgIHwgICAyNCArKysrKysrKysrKysrKysrKysrKysrKysK IDMgZmlsZXMgY2hhbmdlZCwgMjggaW5zZXJ0aW9ucygrKQoKSW5kZXg6IGxpbnV4LTIuNi9hcmNo L3g4Ni9rZXJuZWwvZTgyMC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGxpbnV4LTIuNi5vcmlnL2FyY2gveDg2 L2tlcm5lbC9lODIwLmMKKysrIGxpbnV4LTIuNi9hcmNoL3g4Ni9rZXJuZWwvZTgyMC5jCkBAIC0x MDc3LDYgKzEwNzcsOSBAQCB2b2lkIF9faW5pdCBtZW1ibG9ja194ODZfZmlsbCh2b2lkKQogCQlt ZW1ibG9ja19hZGQoZWktPmFkZHIsIGVpLT5zaXplKTsKIAl9CiAKKwkvKiB0aHJvdyBhd2F5IHBh cnRpYWwgcGFnZXMgKi8KKwltZW1ibG9ja190cmltX21lbW9yeShQQUdFX1NJWkUpOworCiAJbWVt YmxvY2tfZHVtcF9hbGwoKTsKIH0KIApJbmRleDogbGludXgtMi42L2luY2x1ZGUvbGludXgvbWVt YmxvY2suaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09Ci0tLSBsaW51eC0yLjYub3JpZy9pbmNsdWRlL2xpbnV4L21lbWJs b2NrLmgKKysrIGxpbnV4LTIuNi9pbmNsdWRlL2xpbnV4L21lbWJsb2NrLmgKQEAgLTU3LDYgKzU3 LDcgQEAgaW50IG1lbWJsb2NrX2FkZChwaHlzX2FkZHJfdCBiYXNlLCBwaHlzXwogaW50IG1lbWJs b2NrX3JlbW92ZShwaHlzX2FkZHJfdCBiYXNlLCBwaHlzX2FkZHJfdCBzaXplKTsKIGludCBtZW1i bG9ja19mcmVlKHBoeXNfYWRkcl90IGJhc2UsIHBoeXNfYWRkcl90IHNpemUpOwogaW50IG1lbWJs b2NrX3Jlc2VydmUocGh5c19hZGRyX3QgYmFzZSwgcGh5c19hZGRyX3Qgc2l6ZSk7Cit2b2lkIG1l bWJsb2NrX3RyaW1fbWVtb3J5KHBoeXNfYWRkcl90IGFsaWduKTsKIAogI2lmZGVmIENPTkZJR19I QVZFX01FTUJMT0NLX05PREVfTUFQCiB2b2lkIF9fbmV4dF9tZW1fcGZuX3JhbmdlKGludCAqaWR4 LCBpbnQgbmlkLCB1bnNpZ25lZCBsb25nICpvdXRfc3RhcnRfcGZuLApJbmRleDogbGludXgtMi42 L21tL21lbWJsb2NrLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbGludXgtMi42Lm9yaWcvbW0vbWVtYmxvY2su YworKysgb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W50X2xpbWl0KHBoeXNfYWRkcl90IGxpbWl0KQogewo= --0015175d04428367b204ccae4ed6 Content-Type: application/octet-stream; name="use_for_each_mem_pfn_range_setup.patch" Content-Disposition: attachment; filename="use_for_each_mem_pfn_range_setup.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h8m810ig1 U3ViamVjdDogW1BBVENIXSB4ODYsIG1tOiB1c2UgbWVtYmxvY2sgbWVtb3J5IGxvb3AgaW5zdGVh ZCBvZiBlODIwX1JBTQoKV2UgbmVlZCB0byBoYW5kbGUgRTgyMF9SQU0gYW5kIEU4MjBfUkVTRVJW RURfS0VSTkVMIGF0IHRoZSBzYW1lIHRpbWUuCgpBbHNvIG1lbWJsb2NrIGhhcyBwYWdlIGFsaWdu ZWQgcmFuZ2UgZm9yIHJhbSwgc28gd2UgY291bGQgYXZvaWQgbWFwcGluZwpwYXJ0aWFsIHBhZ2Vz LgoKU2lnbmVkLW9mZi1ieTogWWluZ2hhaSBMdSA8eWluZ2hhaUBrZXJuZWwub3JnPgoKLS0tCiBh cmNoL3g4Ni9rZXJuZWwvc2V0dXAuYyB8ICAgMTUgKysrKysrKystLS0tLS0tCiAxIGZpbGUgY2hh bmdlZCwgOCBpbnNlcnRpb25zKCspLCA3IGRlbGV0aW9ucygtKQoKSW5kZXg6IGxpbnV4LTIuNi9h cmNoL3g4Ni9rZXJuZWwvc2V0dXAuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBsaW51eC0yLjYub3JpZy9hcmNo L3g4Ni9rZXJuZWwvc2V0dXAuYworKysgbGludXgtMi42L2FyY2gveDg2L2tlcm5lbC9zZXR1cC5j CkBAIC05MjEsMTggKzkyMSwxOSBAQCB2b2lkIF9faW5pdCBzZXR1cF9hcmNoKGNoYXIgKipjbWRs aW5lX3ApCiAjaWZkZWYgQ09ORklHX1g4Nl82NAogCWlmIChtYXhfcGZuID4gbWF4X2xvd19wZm4p IHsKIAkJaW50IGk7Ci0JCWZvciAoaSA9IDA7IGkgPCBlODIwLm5yX21hcDsgaSsrKSB7Ci0JCQlz dHJ1Y3QgZTgyMGVudHJ5ICplaSA9ICZlODIwLm1hcFtpXTsKKwkJdW5zaWduZWQgbG9uZyBzdGFy dCwgZW5kOworCQl1bnNpZ25lZCBsb25nIHN0YXJ0X3BmbiwgZW5kX3BmbjsKIAotCQkJaWYgKGVp LT5hZGRyICsgZWktPnNpemUgPD0gMVVMIDw8IDMyKQotCQkJCWNvbnRpbnVlOworCQlmb3JfZWFj aF9tZW1fcGZuX3JhbmdlKGksIE1BWF9OVU1OT0RFUywgJnN0YXJ0X3BmbiwgJmVuZF9wZm4sCisJ CQkJCQkJIE5VTEwpIHsKIAotCQkJaWYgKGVpLT50eXBlID09IEU4MjBfUkVTRVJWRUQpCisJCQll bmQgPSBQRk5fUEhZUyhlbmRfcGZuKTsKKwkJCWlmIChlbmQgPD0gKDFVTDw8MzIpKQogCQkJCWNv bnRpbnVlOwogCisJCQlzdGFydCA9IFBGTl9QSFlTKHN0YXJ0X3Bmbik7CiAJCQltYXhfcGZuX21h cHBlZCA9IGluaXRfbWVtb3J5X21hcHBpbmcoCi0JCQkJZWktPmFkZHIgPCAxVUwgPDwgMzIgPyAx VUwgPDwgMzIgOiBlaS0+YWRkciwKLQkJCQllaS0+YWRkciArIGVpLT5zaXplKTsKKwkJCQkJCW1h eCgoMVVMPDwzMiksIHN0YXJ0KSwgZW5kKTsKIAkJfQogCiAJCS8qIGNhbiB3ZSBwcmVzZXZlIG1h eF9sb3dfcGZuID8qLwo= --0015175d04428367b204ccae4ed6-- -- 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/