mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: <hpa@kernel.org>, <tglx@linutronix.de>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i386: additional fix for making ioremap() accept64-bit addresses
Date: Fri, 04 Apr 2008 16:34:09 +0100	[thread overview]
Message-ID: <47F66691.76E4.0078.0@novell.com> (raw)
In-Reply-To: <20080404125543.GA29423@elte.hu>

>>> Ingo Molnar <mingo@elte.hu> 04.04.08 14:55 >>>
>
>* Jan Beulich <jbeulich@novell.com> wrote:
>
>> The recent change to __ioremap()'s first parameter's type didn't yield 
>> the intended effect as the first conditional inside the function would 
>> still have filtered out any addresses with bits [63:32] set. Correct 
>> last_addr's type and at once also add a check that the address range 
>> doesn't extend into space hardware cannot support even theoretically.
>
>i fixed this in x86.git more than a week ago, see:
>
>|  Subject: x86: ioremap of 64-bit resource on 32-bit kernel fix
>|  From: Ingo Molnar <mingo@elte.hu>
>|  Date: Tue, 25 Mar 2008 08:31:17 +0100
>
>but since 64-bit resources never worked on 32-bit and the initiator 
>regression causing this discussion turned out to be something else, i 
>delayed this fix as .26 material.
>
>the PHYSICAL_MASK fix looks good as an additional check - could you 
>please resend it against x86.git/latest which has my fix already?

No need to do this afaics: you've already got the better

	if (!phys_addr_valid(phys_addr)) {
		printk(KERN_WARNING "ioremap: invalid physical address %llx\n",
		       phys_addr);
		WARN_ON_ONCE(1);
		return NULL;
	}

in there. What needs fixing is that this returns 1 on 32-bits
unconditionally, whereas the x86-64 definition should also be used for
PAE (and the parameter type should also be resource_size_t).

Jan


      reply	other threads:[~2008-04-04 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 12:19 [PATCH] i386: additional fix for making ioremap() accept 64-bit addresses Jan Beulich
2008-04-04 12:55 ` Ingo Molnar
2008-04-04 15:34   ` Jan Beulich [this message]

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=47F66691.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=hpa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome