We applied an older version of this patch to 2.6.21 kernel (2007 distro)

http://mailman.uclinux.org/pipermail/uclinux-dev/2007-February/042088.html

Steve found out that an additional patch is needed to make userland XIP
work. See the attachement. 

So userland XIP on 2.6 is finally a reality! :) Thanks to David and all others
who replied.

Cheers.

Jun

On Wed, Sep 24, 2008 at 07:29:29PM +0100, David Howells wrote:
> From: Bernd Schmidt <[EMAIL PROTECTED]>
> 
> Fix a bad dependency in the Blackfin code on a RomFS config symbol that 
> doesn't
> exist upstream.
> 
> Signed-off-by: Bernd Schmidt <[EMAIL PROTECTED]>
> Signed-off-by: David Howells <[EMAIL PROTECTED]>
> Tested-by: Bernd Schmidt <[EMAIL PROTECTED]>
> ---
> 
>  arch/blackfin/kernel/process.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> 
> diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
> index 77800dd..44ee204 100644
> --- a/arch/blackfin/kernel/process.c
> +++ b/arch/blackfin/kernel/process.c
> @@ -325,7 +325,7 @@ int _access_ok(unsigned long addr, unsigned long size)
>       if (addr >= memory_mtd_end && (addr + size) <= physical_mem_end)
>               return 1;
>  
> -#ifdef CONFIG_ROMFS_MTD_FS
> +#ifdef CONFIG_ROMFS_ON_MTD
>       /* For XIP, allow user space to use pointers within the ROMFS.  */
>       if (addr >= memory_mtd_start && (addr + size) <= memory_mtd_end)
>               return 1;
diff -Nuar -X /local/lsteve/dontdiff linux-2.6.x.davidh/drivers/mtd/mtdchar.c 
linux-2.6.x/drivers/mtd/mtdchar.c
--- linux-2.6.x.davidh/drivers/mtd/mtdchar.c    2008-09-25 17:32:29.000000000 
-0700
+++ linux-2.6.x/drivers/mtd/mtdchar.c   2008-09-24 19:51:44.000000000 -0700
@@ -10,6 +10,7 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
diff -Nuar -X /local/lsteve/dontdiff linux-2.6.x.davidh/mm/nommu.c 
linux-2.6.x/mm/nommu.c
--- linux-2.6.x.davidh/mm/nommu.c       2008-09-25 17:31:48.000000000 -0700
+++ linux-2.6.x/mm/nommu.c      2008-09-25 17:39:02.000000000 -0700
@@ -673,7 +673,7 @@
                 * romfs/cramfs */
                if (flags & MAP_SHARED)
                        vm_flags |= VM_MAYSHARE | VM_SHARED;
-               else if ((((vm_flags & capabilities) ^ vm_flags) & 
BDI_CAP_VMFLAGS) == 0)
+               else if (((vm_flags & (VM_MAYREAD | VM_MAYEXEC)) & 
~(capabilities & BDI_CAP_VMFLAGS)) == 0)
                        vm_flags |= VM_MAYSHARE;
        }
 
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to