Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932147Ab2BWKgM (ORCPT ); Thu, 23 Feb 2012 05:36:12 -0500 Received: from mail-yw0-f46.google.com ([209.85.213.46]:63068 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753601Ab2BWKgL (ORCPT ); Thu, 23 Feb 2012 05:36:11 -0500 MIME-Version: 1.0 In-Reply-To: <4F45B35D.1010702@zytor.com> References: <1329744626-5036-1-git-send-email-matt@console-pimps.org> <4F45B35D.1010702@zytor.com> Date: Thu, 23 Feb 2012 02:36:10 -0800 X-Google-Sender-Auth: Tr0R2Y4sN0BYTGrX_emivvncHXM Message-ID: Subject: Re: [tip:x86/urgent] x86, efi: Delete efi_ioremap() and fix CONFIG_X86_32 oops From: Yinghai Lu To: "H. Peter Anvin" , matt.fleming@intel.com, mingo@redhat.com Cc: mjg@redhat.com, linux-kernel@vger.kernel.org, keithp@keithp.com, rui.zhang@intel.com, huang.ying.caritas@gmail.com, stable@vger.kernel.org, tglx@linutronix.de, linux-tip-commits@vger.kernel.org Content-Type: multipart/mixed; boundary=20cf303ea5f862560404b99f36d9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4520 Lines: 81 --20cf303ea5f862560404b99f36d9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Feb 22, 2012 at 7:32 PM, H. Peter Anvin wrote: > On 02/22/2012 06:20 PM, Yinghai Lu wrote: >> >> Why is MAXMEM used here? >> >> EFI reserved area could be above 4G? >> >> if that is the case, you will map all mmio hole below 4g. >> > > OK, dropping this patch for now, at least from -urgent. > > We really need to restrict the memory types we map, at least without > ioremap() called on them. =A0In theory, on x86-64, we could have a > dedicated "1:1" address for each physical address, but there is no good > reason we should ever map memory types other than RAM, ACPI and EFI by > default -- with the possible exception of the low 1 MiB legacy area. please check attach patch for tip/efi branch. Thanks Yinghai --20cf303ea5f862560404b99f36d9 Content-Type: text/x-patch; charset=US-ASCII; name="fix_efi_map_end.patch" Content-Disposition: attachment; filename="fix_efi_map_end.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gyznl0bj0 U3ViamVjdDogW1BBVENIXSB4ODYsIGVmaTogdXNlIGU4MjBfZW5kX3Bmbl9lZmkgd2l0aCBsb3df cGZuIGFuZCBtYXhfcGZuCkZyb206IFlpbmdoYWkgTHUgPHlpbmdoYWlAa2VybmVsLm9yZz4KClNv IGF2b2lkIHRvIG1hcCBtbWlvIGJlbG93IDRnLCBpZiBzeXN0ZW0gaGF2ZSBFRkkgcmFuZ2UgYWJv dmUgNGcuCgpTaWduZWQtb2ZmLWJ5OiBZaW5naGFpIEx1IDx5aW5naGFpQGtlcm5lbC5vcmc+Cgot LS0KIGFyY2gveDg2L2tlcm5lbC9zZXR1cC5jIHwgICA0MiArKysrKysrKysrKysrKysrKysrKysr KystLS0tLS0tLS0tLS0tLS0tLS0KIDEgZmlsZSBjaGFuZ2VkLCAyNCBpbnNlcnRpb25zKCspLCAx OCBkZWxldGlvbnMoLSkKCkluZGV4OiBsaW51eC0yLjYvYXJjaC94ODYva2VybmVsL3NldHVwLmMK PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PQotLS0gbGludXgtMi42Lm9yaWcvYXJjaC94ODYva2VybmVsL3NldHVwLmMKKysr IGxpbnV4LTIuNi9hcmNoL3g4Ni9rZXJuZWwvc2V0dXAuYwpAQCAtNjgxLDYgKzY4MSwyNyBAQCBz dGF0aWMgaW50IF9faW5pdCBwYXJzZV9yZXNlcnZlbG93KGNoYXIKIAogZWFybHlfcGFyYW0oInJl c2VydmVsb3ciLCBwYXJzZV9yZXNlcnZlbG93KTsKIAorc3RhdGljIHVuc2lnbmVkIGxvbmcgX19p bml0IGU4MjBfZW5kX3Bmbl9lZmkodW5zaWduZWQgbG9uZyBlbmRf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ea5f862560404b99f36d9-- -- 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/