public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: paul.gortmaker@windriver.com (Paul Gortmaker)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: fix build failure in code for mach-bcmring/dma.c
Date: Sun, 22 Jan 2012 16:09:39 -0500	[thread overview]
Message-ID: <1327266579-21951-1-git-send-email-paul.gortmaker@windriver.com> (raw)

Upstream commit 99d1717dd7fecf2b10195b0d864323b952b4eba0

       "ARM: Add init_consistent_dma_size()"

essentially did this:

-#define CONSISTENT_BASE                (CONSISTENT_END - CONSISTENT_DMA_SIZE)
+unsigned long consistent_base = CONSISTENT_END - DEFAULT_CONSISTENT_DMA_SIZE;

but the bcmring code was still using the old CONSISTENT_BASE
macro.  Update it to now use the dynamic variable that reflects
the ability to resize early at boot.  To do so involves putting
the variable alongside of init_consistent_dma_size in dma-mapping.h

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Jon Medhurst <tixy@yxit.co.uk>
CC: Nicolas Pitre <nicolas.pitre@linaro.org>

diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index cb3b7c9..b495f95 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -212,6 +212,7 @@ int dma_mmap_writecombine(struct device *, struct vm_area_struct *,
  */
 extern void __init init_consistent_dma_size(unsigned long size);
 
+extern unsigned long consistent_base;
 
 #ifdef CONFIG_DMABOUNCE
 /*
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c
index 1a1a27d..4e47e20 100644
--- a/arch/arm/mach-bcmring/dma.c
+++ b/arch/arm/mach-bcmring/dma.c
@@ -1615,7 +1615,7 @@ DMA_MemType_t dma_mem_type(void *addr)
 {
 	unsigned long addrVal = (unsigned long)addr;
 
-	if (addrVal >= CONSISTENT_BASE) {
+	if (addrVal >= consistent_base) {
 		/* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */
 
 		/* dma_alloc_xxx pages are physically and virtually contiguous */
-- 
1.7.7.2

             reply	other threads:[~2012-01-22 21:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-22 21:09 Paul Gortmaker [this message]
2012-01-22 21:17 ` [PATCH] arm: fix build failure in code for mach-bcmring/dma.c Russell King - ARM Linux
2012-01-22 23:32   ` Paul Gortmaker
2012-01-23 18:53   ` Jiandong Zheng
2012-01-23 20:18     ` Russell King - ARM Linux
2012-01-23 20:37       ` Jiandong Zheng

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=1327266579-21951-1-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.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