LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nicolas Pitre <nicolas.pitre@linaro.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Russell King <linux@arm.linux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	devicetree-discuss@lists.ozlabs.org,
	lkml <linux-kernel@vger.kernel.org>,
	Lennert Buytenhek <buytenh@wantstofly.org>,
	Olof Johansson <olof@lixom.net>,
	john.linn@xilinx.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 4/6] arm/dt: probe for platforms via the device tree
Date: Mon, 31 Jan 2011 17:27:20 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1101311709280.8580@xanadu.home> (raw)
In-Reply-To: <20110131210410.15105.63595.stgit@localhost6.localdomain6>

On Mon, 31 Jan 2011, Grant Likely wrote:

> If a dtb is passed to the kernel then the kernel needs to iterate
> through compiled-in mdescs looking for one that matches and move the
> dtb data to a safe location before it gets accidentally overwritten by
> the kernel.
> 
> This patch creates a new function, setup_machine_fdt() which is
> analogous to the setup_machine_atags() created in the previous patch.
> It does all the early setup needed to use a device tree machine
> description.  It also creates arm_unflatten_device_tree() which copies
> the dtb into an allocated buffer and unflattens it into the live-tree
> representation.
> 
> v2: Changed to save the dtb by copying into an allocated buffer.
>     - Since the dtb will very likely be passed in the first 16k of ram
>       where the interrupt vectors live, memblock_reserve() is
>       insufficient to protect the dtb data.

This is wrong.  The vector page can be allocated anywhere.  It is 
currently allocated with memblock_alloc(), so if you memblock_reserve() 
the dtb soon enough then it should be safe and the vector page or 
whatever will be allocated somewhere else.

What was the actual problem?


Nicolas

  reply	other threads:[~2011-01-31 22:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 21:03 [PATCH v2 0/6] Basic ARM device support Grant Likely
2011-01-31 21:03 ` [PATCH v2 1/6] arm/dt: Make __vet_atags also accept a dtb image Grant Likely
2011-01-31 21:04 ` [PATCH v2 2/6] arm/dt: Allow CONFIG_OF on ARM Grant Likely
2011-01-31 21:04 ` [PATCH v2 3/6] arm/dt: consolidate atags setup into setup_machine_atags Grant Likely
2011-01-31 21:04 ` [PATCH v2 4/6] arm/dt: probe for platforms via the device tree Grant Likely
2011-01-31 22:27   ` Nicolas Pitre [this message]
2011-01-31 23:03     ` Grant Likely
2011-01-31 21:04 ` [PATCH v2 5/6] arm/dt: Basic versatile devicetree support Grant Likely
2011-01-31 21:04 ` [PATCH v2 6/6] arm/dt: Basic tegra " Grant Likely

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.1101311709280.8580@xanadu.home \
    --to=nicolas.pitre@linaro.org \
    --cc=buytenh@wantstofly.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=john.linn@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --subject='Re: [PATCH v2 4/6] arm/dt: probe for platforms via the device tree' \
    /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

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).