Title: [7433] trunk/arch/blackfin/kernel/process.c: Bug[#4090]
Revision
7433
Author
bernds
Date
2009-09-23 12:47:16 -0400 (Wed, 23 Sep 2009)

Log Message

Bug[#4090]
Copy some code from bfin_mem_access_type to _access_ok, so that we can
access XIP filesystems in flash.

However, this code will fail if a filesystem crosses an async bank boundary.
I don't know whether we support that or not.

Modified Paths

Diff

Modified: trunk/arch/blackfin/kernel/process.c (7432 => 7433)


--- trunk/arch/blackfin/kernel/process.c	2009-09-23 15:49:48 UTC (rev 7432)
+++ trunk/arch/blackfin/kernel/process.c	2009-09-23 16:47:16 UTC (rev 7433)
@@ -475,6 +475,19 @@
 	if (in_mem_const(addr, size, COREB_L1_DATA_B_START, COREB_L1_DATA_B_LENGTH))
 		return 1;
 #endif
+
+	/* We can't read EBIU banks that aren't enabled or we end up hanging
+	 * on the access to the async space.
+	 */
+	if (in_mem_const(addr, size, ASYNC_BANK0_BASE, ASYNC_BANK0_SIZE))
+		return IN_ASYNC(0, 0) != -EFAULT;
+	if (in_mem_const(addr, size, ASYNC_BANK1_BASE, ASYNC_BANK1_SIZE))
+		return IN_ASYNC(1, 0) != -EFAULT;
+	if (in_mem_const(addr, size, ASYNC_BANK2_BASE, ASYNC_BANK2_SIZE))
+		return IN_ASYNC(2, 1) != -EFAULT;
+	if (in_mem_const(addr, size, ASYNC_BANK3_BASE, ASYNC_BANK3_SIZE))
+		return IN_ASYNC(3, 1) != -EFAULT;
+
 	if (in_mem_const_off(addr, size, _ebss_l2 - _stext_l2, L2_START, L2_LENGTH))
 		return 1;
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to