From: Jeremy Fitzhardinge <jeremy@goop.org>
To: lkml@MoreThan.org
Cc: Andi Kleen <andi@firstfloor.org>, linux-kernel@vger.kernel.org
Subject: Re: [Bug Fix]: Do 32-bit table calculations in pre-processor
Date: Fri, 03 Jul 2009 12:30:46 -0700 [thread overview]
Message-ID: <4A4E5C66.1090206@goop.org> (raw)
In-Reply-To: <200907031413.17556.lkml@morethan.org>
On 07/03/09 12:13, Michael S. Zick wrote:
> On Fri July 3 2009, Jeremy Fitzhardinge wrote:
>
>> On 07/03/09 11:38, Michael S. Zick wrote:
>>
>>> I make no claims for it at the moment - too early in the test process.
>>> Just the general observation that it takes 0.5M to describe 0.5G of ram.
>>>
>>>
>> Only if you're using 4k pages. With large pages, 1 pte can map 2M, so
>> 256 entries can map 512M, so you only need 1/2 a page of pagetable
>> (assuming PAE; if not a single entry can map 4M).
>>
>>
>
> Ah, but you can't assume that - look at your VIA-C7M tech sheet - NO PAE.
>
According to
http://www.via.com.tw/en/products/processors/c7-m/secure_by_design.jsp,
it supports NX, which means it must support PAE.
But even without PAE, it can still support PSE (large pages).
> Try ending the filename in ".S" and passing it to gcc,
> like the build system does.
>
It doesn't make any difference. After going through cpp the expression is:
# 62 "/home/jeremy/git/linux/arch/x86/kernel/head_32.S"
MAPPING_BEYOND_END = (((((1<<32) - 0xC0000000) >> 12) / 512) + 4) << 12
which will be evaluated by the assembler. The C preprocessor doesn't
evaluate expressions in the source; it only ever does substitutions and
leaves the results for the compiler/assembler to evaluate. (It evals
expressions on cpp # lines, of course, but that's not relevant here.)
J
next prev parent reply other threads:[~2009-07-03 19:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 18:14 [Bug Fix]: Do 32-bit table calculations in pre-processor Michael S. Zick
2009-07-03 18:27 ` Andi Kleen
2009-07-03 18:38 ` Michael S. Zick
2009-07-03 19:08 ` Jeremy Fitzhardinge
2009-07-03 19:13 ` Michael S. Zick
2009-07-03 19:30 ` Jeremy Fitzhardinge [this message]
2009-07-03 20:03 ` Michael S. Zick
2009-07-03 18:56 ` Jeremy Fitzhardinge
2009-07-03 18:57 ` Jeremy Fitzhardinge
2009-07-03 19:03 ` Michael S. Zick
2009-07-03 19:11 ` Jeremy Fitzhardinge
2009-07-03 19:18 ` H. Peter Anvin
2009-07-03 19:46 ` Michael S. Zick
2009-07-03 20:00 ` H. Peter Anvin
2009-07-03 19:14 ` H. Peter Anvin
2009-07-03 19:41 ` Michael S. Zick
2009-07-03 19:48 ` H. Peter Anvin
2009-07-03 20:38 ` Michael S. Zick
2009-07-03 20:40 ` H. Peter Anvin
2009-07-03 21:02 ` Michael S. Zick
2009-07-03 22:33 ` H. Peter Anvin
2009-07-04 0:05 ` Michael S. Zick
2009-07-04 0:11 ` H. Peter Anvin
2009-07-03 22:01 ` Michael S. Zick
2009-07-04 13:23 ` Michael S. Zick
2009-07-03 19:33 ` Jeremy Fitzhardinge
2009-07-03 20:07 ` Yinghai Lu
2009-07-03 20:08 ` Yinghai Lu
2009-07-03 20:48 ` Michael S. Zick
2009-07-03 20:45 ` Michael S. Zick
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=4A4E5C66.1090206@goop.org \
--to=jeremy@goop.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@MoreThan.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.