From: David Vrabel <david.vrabel@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"Tim (Xen.org)" <tim@xen.org>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH v3 5/8] xen/arm: preserve DTB mappings
Date: Tue, 8 Jan 2013 19:04:57 +0000 [thread overview]
Message-ID: <50EC6DD9.5060703@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1301081737190.4981@kaball.uk.xensource.com>
On 08/01/13 18:33, Stefano Stabellini wrote:
> On Wed, 19 Dec 2012, Ian Campbell wrote:
>>> @@ -295,12 +296,23 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
>>> write_pte(xen_second + second_linear_offset(XEN_VIRT_START), pte);
>>> /* TLBFLUSH and ISB would be needed here, but wait until we set WXN */
>>>
>>> + /* preserve the DTB mapping a little while longer */
>>
>> Not so much "preserve" as "put back" after this function clobbered it.
>>
>> I'm not convinced by this effectively open coding of a "stack" of
>> mappings in the BOOT_MISC_VIRT_START slot. IMHO this slot should only be
>> used for ephemeral mappings within individual functions or over short
>> spans of code -- otherwise there is plenty of potential for clashes
>> which lead to hard to decipher bugs.
>>
>> Can we not map the boot fdt as and when we need it instead of trying to
>> preserve a mapping?
>
> I don't like this idea because it means that the device initialization
> functions in start_xen that are called after setup_pagetables and before
> setup_mm, like gic_init, suddenly become position dependent: they cannot
> be moved after setup_mm.
The mapping of the DTB into BOOT_MISC_VIRT_START was only for use by
device_tree_early_init(). Everything else should be using the final
mapping setup in setup_mm().
I think this means setup_mm() needs to immediately after
setup_pagestables() and before gic_init(), pl011_init() etc.
David
next prev parent reply other threads:[~2013-01-08 19:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 18:45 [PATCH v3 0/8] xen: ARM HDLCD video driver Stefano Stabellini
2012-12-18 18:46 ` [PATCH v3 1/8] xen/arm: introduce early_ioremap Stefano Stabellini
2012-12-19 11:52 ` Ian Campbell
2013-01-08 19:02 ` Stefano Stabellini
2012-12-18 18:46 ` [PATCH v3 2/8] xen: infrastructure to have cross-platform video drivers Stefano Stabellini
2012-12-18 18:46 ` [PATCH v3 3/8] xen: introduce a generic framebuffer driver Stefano Stabellini
2012-12-19 8:08 ` Jan Beulich
2012-12-19 8:13 ` Jan Beulich
2012-12-18 18:46 ` [PATCH v3 4/8] xen/vesa: use the new fb_* functions Stefano Stabellini
2012-12-19 12:29 ` Ian Campbell
2012-12-18 18:46 ` [PATCH v3 5/8] xen/arm: preserve DTB mappings Stefano Stabellini
2012-12-19 12:36 ` Ian Campbell
2013-01-08 18:33 ` Stefano Stabellini
2013-01-08 19:04 ` David Vrabel [this message]
2013-01-08 19:32 ` Stefano Stabellini
2012-12-18 18:46 ` [PATCH v3 6/8] xen/device_tree: introduce find_compatible_node Stefano Stabellini
2012-12-19 14:06 ` Ian Campbell
2012-12-18 18:46 ` [PATCH v3 7/8] xen/arm: introduce vexpress_syscfg Stefano Stabellini
2012-12-19 12:47 ` Ian Campbell
2013-01-08 17:16 ` Stefano Stabellini
2012-12-18 18:46 ` [PATCH v3 8/8] xen/arm: introduce a driver for the ARM HDLCD controller Stefano Stabellini
2012-12-19 12:58 ` Ian Campbell
2013-01-08 13:51 ` Stefano Stabellini
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=50EC6DD9.5060703@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.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;
as well as URLs for NNTP newsgroup(s).