public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: alcooperx@gmail.com (Al Cooper)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: Make sure memory starting at physical address 0 is reserved.
Date: Thu, 3 Jul 2014 13:40:05 -0400	[thread overview]
Message-ID: <1404409205-7368-1-git-send-email-alcooperx@gmail.com> (raw)

Some older hardware, like USB OHCI, cannot DMA to physical address
zero. This change makes sure that the first PAGESIZE block of memory
starting at zero is reserved so it can't end up in any free
memory pool.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
 arch/arm/mm/init.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 659c75d..17aaa4d 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -324,6 +324,15 @@ void __init arm_memblock_init(const struct machine_desc *mdesc)
 	 */
 	dma_contiguous_reserve(min(arm_dma_limit, arm_lowmem_limit));
 
+	/*
+	 * Some older hardware, like USB OHCI, cannot DMA
+	 * to physical address zero. This makes sure that the
+	 * first PAGESIZE block of memory starting at zero is
+	 * reserved so it can't end up in any free memory pool.
+	 */
+	if (memblock_is_region_memory(0, PAGE_SIZE))
+		memblock_reserve(0, PAGE_SIZE);
+
 	arm_memblock_steal_permitted = false;
 	memblock_dump_all();
 }
-- 
1.9.0.138.g2de3478

             reply	other threads:[~2014-07-03 17:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 17:40 Al Cooper [this message]
2014-07-03 17:52 ` [PATCH] arm: Make sure memory starting at physical address 0 is reserved Russell King - ARM Linux

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=1404409205-7368-1-git-send-email-alcooperx@gmail.com \
    --to=alcooperx@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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