From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] RealView: Add sparsemem support for the RealView PBX platform
Date: Mon, 19 Oct 2009 16:46:01 +0100 [thread overview]
Message-ID: <20091019154601.GG13614@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20091015122209.739.42849.stgit@pc1117.cambridge.arm.com>
On Thu, Oct 15, 2009 at 01:22:09PM +0100, Catalin Marinas wrote:
> +#ifdef CONFIG_ZONE_DMA
> +/*
> + * Adjust the zones if there are restrictions for DMA access.
> + */
> +void __init realview_adjust_zones(int node, unsigned long *size,
> + unsigned long *hole)
> +{
> + unsigned long dma_size = SZ_256M >> PAGE_SHIFT;
> +
> + if (!machine_is_realview_pbx() || node || (size[0] <= dma_size))
> + return;
> +
> + size[ZONE_NORMAL] = size[0] - dma_size;
> + size[ZONE_DMA] = dma_size;
> + hole[ZONE_NORMAL] = hole[0];
> + hole[ZONE_DMA] = 0;
> +}
You also need to set ISA_DMA_THRESHOLD and MAX_DMA_ADDRESS:
#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1)
#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M)
so that other bits of code know what to expect from a GFP_DMA-type
allocation.
next prev parent reply other threads:[~2009-10-19 15:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 12:21 [PATCH 0/4] RealView patches for 2.6.33 Catalin Marinas
2009-10-15 12:21 ` [PATCH 1/4] RealView: Add default memory configuration Catalin Marinas
2009-10-15 12:21 ` [PATCH 2/4] RealView: Remove duplicated #define REALVIEW_SYS_FLAGS* statements Catalin Marinas
2009-10-15 12:22 ` [PATCH 3/4] Revert 75f4aa1 (unconditionally define __virt_to_phys and __phys_to_virt) Catalin Marinas
2009-10-19 15:34 ` Russell King - ARM Linux
2009-10-19 15:46 ` Catalin Marinas
2009-10-19 15:54 ` Russell King - ARM Linux
2009-10-15 12:22 ` [PATCH 4/4] RealView: Add sparsemem support for the RealView PBX platform Catalin Marinas
2009-10-19 15:46 ` Russell King - ARM Linux [this message]
2009-10-19 16:03 ` Catalin Marinas
2009-11-08 17:45 ` Russell King - ARM Linux
2009-11-09 9:51 ` Catalin Marinas
2009-11-09 10:18 ` Russell King - ARM Linux
2009-11-09 10:34 ` Catalin Marinas
2009-11-09 10:39 ` Russell King - ARM Linux
2009-11-09 10:53 ` Catalin Marinas
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=20091019154601.GG13614@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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