From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>,
Ingo Molnar <mingo@elte.hu>, Yinghai Lu <yinghai@kernel.org>,
x86team <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip] x86,apic: Use PAGE_SIZE instead of numbers
Date: Tue, 10 Nov 2009 00:15:36 +0000 (GMT) [thread overview]
Message-ID: <alpine.LFD.2.00.0911092326200.9725@eddie.linux-mips.org> (raw)
In-Reply-To: <4AF8A0A0.2080800@zytor.com>
On Mon, 9 Nov 2009, H. Peter Anvin wrote:
> In theory we could have more than one ioapic packed into a single page,
> and it is also entirely plausible we'll support other page sizes in x86
> at some point. However, it's probably easier to flag something as
> PAGE_SIZE and have to fix it up later than have magic constants, so I
> think it's probably the right thing to do.
Hmm, the MPS said in Chapter 3.6.5 "APIC Memory Mapping":
"Non-default APIC base addresses can be used if the MP configuration
table is provided. (Refer to Chapter 4.) However, the local APIC base
address must be aligned on a 4K boundary, and the I/O APIC base address
must be aligned on a 1K boundary."
This probably still stands; I suppose it would be safer to define
IOAPIC_SLOT_SIZE to 1024 and use it by default, expanding all reservations
as needed where less than PAGE_SIZE / IOAPIC_SLOT_SIZE I/O APICs would be
mapped in a page. This is relatively recent a piece of code -- how much
has it been tested?
Well, actually not much as a quick search has revealed this message:
http://marc.info/?l=linux-kernel&m=118114792006520
which shows page alignment of I/O APICs clearly does not stand, and
moreover there are two pairs of I/O APIC in the system reported which
share a page each. In this case the ranges requested do not make sense
and some resource insertions will silently fail. And also while page
aliases created in fixmaps here should not harm, they make me feel a
little bit chilly...
Overall this piece of code needs an overhaul, fixing resource allocation
and reusing fixmaps where possible.
Maciej
next prev parent reply other threads:[~2009-11-10 0:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-08 15:53 [PATCH -tip] x86,apic: Use PAGE_SIZE instead of numbers Cyrill Gorcunov
2009-11-08 16:09 ` [tip:x86/apic] x86, apic: " tip-bot for Cyrill Gorcunov
2009-11-08 17:28 ` [PATCH -tip] x86,apic: " Maciej W. Rozycki
2009-11-08 17:36 ` Cyrill Gorcunov
2009-11-08 18:03 ` Ingo Molnar
2009-11-09 23:07 ` H. Peter Anvin
2009-11-10 0:15 ` Maciej W. Rozycki [this message]
2009-11-10 4:40 ` Cyrill Gorcunov
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=alpine.LFD.2.00.0911092326200.9725@eddie.linux-mips.org \
--to=macro@linux-mips.org \
--cc=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox