All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: mingo@redhat.com, mjg@redhat.com, linux-kernel@vger.kernel.org,
	keithp@keithp.com, rui.zhang@intel.com,
	huang.ying.caritas@gmail.com, stable@vger.kernel.org,
	matt.fleming@intel.com, tglx@linutronix.de,
	linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/urgent] x86, efi: Delete efi_ioremap() and fix CONFIG_X86_32 oops
Date: Wed, 22 Feb 2012 19:32:45 -0800	[thread overview]
Message-ID: <4F45B35D.1010702@zytor.com> (raw)
In-Reply-To: <CAE9FiQWFpsZotawqPD4738jTayB=KOGo0W9+AT2go3GYk1v_sQ@mail.gmail.com>

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.  In 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.

Therefore, I don't see why on Earth we have
kernel_physical_mapping_init() create mappings for areas which are not
RAM.  It has access to the memory map at this point, so there is no
reason for it.  Unfortunately I think we still have a bunch of code
which implicitly assumes the old "PC" model with separate contiguous
memory ranges starting at 0, 1 MiB, and 4 GiB, however, there are more
and more systems where that just doesn't match reality.


	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  reply	other threads:[~2012-02-23  3:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 13:30 [PATCH] x86, efi: Delete efi_ioremap() and fix CONFIG_X86_32 oops Matt Fleming
2012-02-23  1:16 ` [tip:x86/urgent] " tip-bot for Matt Fleming
2012-02-23  2:20   ` Yinghai Lu
2012-02-23  2:20     ` Yinghai Lu
2012-02-23  3:32     ` H. Peter Anvin [this message]
2012-02-23 10:36       ` Yinghai Lu
2012-02-24  4:47         ` H. Peter Anvin
2012-02-28  2:27           ` H. Peter Anvin
2012-03-07 10:30             ` Matt Fleming
2012-03-07 18:05               ` Yinghai Lu
2012-03-07 18:05                 ` Yinghai Lu
2012-03-08 11:28                 ` Matt Fleming
2012-03-08 18:59                   ` Yinghai Lu
2012-03-08 18:59                     ` Yinghai Lu
2012-03-12 12:38                     ` Matt Fleming
2012-03-13  5:39                       ` Yinghai Lu
2012-03-15 12:40                         ` Matt Fleming
2012-03-15 17:54                           ` Yinghai Lu
2012-03-15 17:54                             ` Yinghai Lu
2012-03-16 18:36                             ` Matt Fleming
2012-03-16 19:01                               ` Yinghai Lu
2012-03-16 19:01                                 ` Yinghai Lu
2012-03-07 18:14               ` Yinghai Lu
2012-03-07 18:14                 ` Yinghai Lu
2012-03-07 18:18                 ` Matthew Garrett
2012-03-08 12:09                 ` Matt Fleming
2012-03-04  0:12   ` Keith Packard
2012-03-04  0:27     ` H. Peter Anvin
2012-03-04  1:33       ` Keith Packard
2012-03-05 10:45         ` Ingo Molnar
2012-03-07 18:31           ` Yinghai Lu
2012-03-07 18:31             ` Yinghai Lu
2012-03-05 11:48         ` Matt Fleming
2012-02-28  2:33 ` [PATCH] " H. Peter Anvin
2012-02-28 17:35   ` Matt Fleming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F45B35D.1010702@zytor.com \
    --to=hpa@zytor.com \
    --cc=huang.ying.caritas@gmail.com \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@redhat.com \
    --cc=mjg@redhat.com \
    --cc=rui.zhang@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.