From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <jbeulich@novell.com>
Cc: Ingo Molnar <mingo@elte.hu>,
tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: Re: [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v3)
Date: Thu, 18 Sep 2008 11:00:33 -0700 [thread overview]
Message-ID: <48D29741.4070404@goop.org> (raw)
In-Reply-To: <48D25E87.76E4.0078.0@novell.com>
Jan Beulich wrote:
>>>> Ingo Molnar <mingo@elte.hu> 18.09.08 13:20 >>>
>>>>
>> * Ingo Molnar <mingo@elte.hu> wrote:
>>
>>
>>> * Jan Beulich <jbeulich@novell.com> wrote:
>>>
>>>
>>>> I'm really sorry for that, yet another merge oversight (not caught
>>>> because only re-tested on x86-64). Here's a better one.
>>>>
>>> ah, i see, the delta below. Nasty.
>>>
>> the attached config fails in a similar way.
>>
>
> Hmm, yes, other than in .27, -tip derives resource_size_t from phys_addr_t,
> regardless of CONFIG_RESOURCES_64BIT (and the config you provided
> is a non-PAE one). I have to question that change, which I'm sure is
> responsible for this failure. If there's a good reason for this, then
> phys_addr_valid() should use phys_addr_t as its parameter type (and
> so should ioremap() & Co), and the pre-processor conditional should
> then change to depend on CONFIG_PHYS_ADDR_T_64BIT. Since ioremap()
> would need to change first, I'd have to withdraw the patch until that
> gets sorted out.
I take it we're talking about this chunk:
-static inline int phys_addr_valid(unsigned long addr)
+static inline int phys_addr_valid(resource_size_t addr)
{
- return addr < (1UL << boot_cpu_data.x86_phys_bits);
+#ifdef CONFIG_RESOURCES_64BIT
+ return !(addr >> boot_cpu_data.x86_phys_bits);
+#else
+ return 1;
+#endif
Is x86_phys_bits defined to be the actual number of address lines poking
out of the CPU package, or the number of address bits we can
meaningfully put into a pte?
I would say the simplest thing to do here is be explicit:
if (sizeof(addr) == sizeof(u64))
return !(addr >> boot_cpu_data.x86_phys_bits);
else
return 1;
That's not ideal, but I guess its good enough. I assume x86_phys_bits
can never be less than 32?
J
next prev parent reply other threads:[~2008-09-18 18:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-18 7:13 [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v3) Jan Beulich
2008-09-18 7:18 ` Ingo Molnar
2008-09-18 9:10 ` Ingo Molnar
2008-09-18 9:31 ` Jan Beulich
2008-09-18 9:57 ` Ingo Molnar
2008-09-18 11:20 ` Ingo Molnar
2008-09-18 11:58 ` Jan Beulich
2008-09-18 12:29 ` Ingo Molnar
2008-09-18 18:00 ` Jeremy Fitzhardinge [this message]
2008-09-18 18:12 ` H. Peter Anvin
2008-09-19 8:32 ` Jan Beulich
2008-09-19 21:46 ` Jeremy Fitzhardinge
2008-09-19 23:32 ` H. Peter Anvin
2008-09-18 15:25 ` H. Peter Anvin
2008-09-18 15:52 ` Jan Beulich
2008-09-18 17:25 ` H. Peter Anvin
2008-09-18 7:52 ` Yinghai Lu
-- strict thread matches above, loose matches on Subject: below --
2008-09-05 12:07 [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v2) Jan Beulich
2008-09-05 15:00 ` Ingo Molnar
2008-09-08 10:50 ` Jan Beulich
2008-09-08 13:40 ` Ingo Molnar
2008-09-08 18:54 ` Ingo Molnar
2008-09-09 7:43 ` [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v3) Jan Beulich
2008-09-09 7:47 ` Ingo Molnar
2008-09-09 7:58 ` Ingo Molnar
2008-09-09 8:15 ` Jan Beulich
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=48D29741.4070404@goop.org \
--to=jeremy@goop.org \
--cc=hpa@zytor.com \
--cc=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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.