From: Sam Ravnborg <sam@ravnborg.org>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
xen-devel <xen-devel@lists.xensource.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
x86@kernel.org
Subject: Re: [bisected] Re: [PATCH 05 of 12] xen: add p2m mfn_list_list
Date: Wed, 28 May 2008 16:10:12 +0200 [thread overview]
Message-ID: <20080528141012.GA4669@uranus.ravnborg.org> (raw)
In-Reply-To: <483D65E6.3020604@goop.org>
On Wed, May 28, 2008 at 03:02:14PM +0100, Jeremy Fitzhardinge wrote:
>
> The use of __section(.data.page_aligned) (or worse
> __attribute__((section(".data.page_aligned"))) is fairly verbose and
> brittle. I've got a (totally untested) proposed patch below, to
> introduce __page_aligned_data|bss which sets the section and the
> alignment. This will work, but it requires that all page-aligned
> variables also have an alignment associated with them, so that mis-sized
> ones don't push the others around.
>
> There aren't very many users of .data|bss.page_aligned, so it should be
> easy enough to fix them all up.
>
> A link-time warning would be good too, of course.
I cooked up this:
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index ce5ed08..963b2ae 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -40,6 +40,7 @@ SECTIONS
.text : AT(ADDR(.text) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE); /* not really needed, already page aligned */
*(.text.page_aligned)
+ end_text_page_aligned = .;
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
@@ -49,6 +50,9 @@ SECTIONS
_etext = .; /* End of text section */
} :text = 0x9090
+ ASSERT((end_text_page_aligned == ALIGN((end_text_page_aligned), PAGE_SIZE)),
+ "Text in .text.page_aligned are not modulo PAGE_SIZE")
+
. = ALIGN(16); /* Exception table */
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
__start___ex_table = .;
@@ -89,6 +93,8 @@ SECTIONS
*(.data.page_aligned)
*(.data.idt)
}
+ ASSERT((. == ALIGN(PAGE_SIZE)),
+ "Data in .data.page_aligned are not modulo PAGE_SIZE")
. = ALIGN(32);
.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
But we should try to do it so all archs can benefit.
And it failed in the second ASSERT - I dunno why.
Soccer duties - so I have to run.
Sam
next prev parent reply other threads:[~2008-05-28 14:09 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 13:41 [PATCH 00 of 12] xen: add save/restore/migrate for Xen domains Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 01 of 12] xen: make phys_to_machine structure dynamic Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 02 of 12] xen: add configurable max domain size Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 03 of 12] xen: efficiently support a holey p2m table Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 04 of 12] xen: make dummy_shared_info non-static Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 05 of 12] xen: add p2m mfn_list_list Jeremy Fitzhardinge
2008-05-28 12:28 ` [bisected] " Ingo Molnar
2008-05-28 14:02 ` Jeremy Fitzhardinge
2008-05-28 14:10 ` Sam Ravnborg [this message]
2008-06-02 10:10 ` Ingo Molnar
2008-06-02 13:12 ` Jeremy Fitzhardinge
2008-05-30 7:40 ` Gerd Hoffmann
2008-05-30 8:04 ` Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 06 of 12] xen: add rebind_evtchn_irq Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 07 of 12] xen: fix unbind_from_irq() Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 08 of 12] xen-console: add save/restore Jeremy Fitzhardinge
2008-06-02 11:17 ` Ingo Molnar
2008-06-02 11:18 ` Ingo Molnar
2008-06-02 11:50 ` Jeremy Fitzhardinge
2008-06-02 12:13 ` [Xen-devel] " Markus Armbruster
2008-05-23 13:41 ` [PATCH 09 of 12] xenbus: rebind irq on restore Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 10 of 12] xen: implement save/restore Jeremy Fitzhardinge
2008-05-29 7:31 ` Ingo Molnar
2008-05-29 8:00 ` Jeremy Fitzhardinge
2008-05-29 8:02 ` [PATCH] xen: fix compilation when CONFIG_PM_SLEEP is disabled Jeremy Fitzhardinge
2008-05-30 0:24 ` Randy Dunlap
2008-06-02 10:13 ` Ingo Molnar
2008-06-02 9:21 ` [Xen-devel] [PATCH 10 of 12] xen: implement save/restore Isaku Yamahata
2008-06-02 10:03 ` Jeremy Fitzhardinge
2008-06-02 10:47 ` Isaku Yamahata
2008-06-02 10:52 ` Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 11 of 12] xen: maintain clock offset over save/restore Jeremy Fitzhardinge
2008-05-23 13:41 ` [PATCH 12 of 12] hrtimer: remove warning in hres_timers_resume Jeremy Fitzhardinge
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=20080528141012.GA4669@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xensource.com \
/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