summaryrefslogtreecommitdiff
path: root/recipes/kexecboot/linux-kexecboot-2.6.29/dss2/0031-DSS2-do-bootmem-reserve-for-exclusive-access.patch
blob: 684857c15fc06a2a0af464c3285d4154f784f6e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 30c40f5e6b1794430f678bf23d3319354321cab7 Mon Sep 17 00:00:00 2001
From: Imre Deak <imre.deak@nokia.com>
Date: Tue, 14 Apr 2009 14:50:11 +0200
Subject: [PATCH 31/69] DSS2: do bootmem reserve for exclusive access

BOOTMEM_DEFAULT would allow multiple reservations for the same location,
we need to reserve the region for our exclusive use. Also check if the
reserve succeeded.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
---
 arch/arm/plat-omap/vram.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
index f24a110..520f260 100644
--- a/arch/arm/plat-omap/vram.c
+++ b/arch/arm/plat-omap/vram.c
@@ -524,7 +524,10 @@ void __init omapfb_reserve_sdram(void)
 			return;
 		}
 
-		reserve_bootmem(paddr, size, BOOTMEM_DEFAULT);
+		if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE) < 0) {
+			pr_err("FB: failed to reserve VRAM\n");
+			return;
+		}
 	} else {
 		if (size > sdram_size) {
 			printk(KERN_ERR "Illegal SDRAM size for VRAM\n");
-- 
1.6.2.4