* [PATCH 01/10] AXFS: exporting xip_file_fault() for use with AXFS
@ 2008-08-21 5:44 Jared Hulbert
2008-08-21 7:25 ` Paulius Zaleckas
2008-08-21 7:42 ` Carsten Otte
0 siblings, 2 replies; 4+ messages in thread
From: Jared Hulbert @ 2008-08-21 5:44 UTC (permalink / raw)
To: Linux-kernel, linux-embedded, linux-mtd, Jörn Engel,
tim.bird, cotte
We'll need this for AXFS. The equivalent function in filemap.c is exported.
Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
---
include/linux/mm.h | 4 ++++
mm/filemap_xip.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 72a15dc..2be5c22 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -161,6 +161,10 @@ struct vm_fault {
*/
};
+#ifdef CONFIG_FS_XIP
+extern int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
+#endif
+
/*
* These are the virtual MM functions - opening of an area, closing and
* unmapping it (needed to keep files on disk up-to-date etc), pointer
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
index 380ab40..ab2f174 100644
--- a/mm/filemap_xip.c
+++ b/mm/filemap_xip.c
@@ -206,7 +206,7 @@ __xip_unmap (struct address_space * mapping,
*
* This function is derived from filemap_fault, but used for execute in place
*/
-static int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
struct file *file = vma->vm_file;
struct address_space *mapping = file->f_mapping;
@@ -262,6 +262,7 @@ found:
return 0;
}
}
+EXPORT_SYMBOL_GPL(xip_file_fault);
static struct vm_operations_struct xip_file_vm_ops = {
.fault = xip_file_fault,
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 01/10] AXFS: exporting xip_file_fault() for use with AXFS
2008-08-21 5:44 [PATCH 01/10] AXFS: exporting xip_file_fault() for use with AXFS Jared Hulbert
@ 2008-08-21 7:25 ` Paulius Zaleckas
2008-08-21 7:32 ` Paulius Zaleckas
2008-08-21 7:42 ` Carsten Otte
1 sibling, 1 reply; 4+ messages in thread
From: Paulius Zaleckas @ 2008-08-21 7:25 UTC (permalink / raw)
To: jaredeh; +Cc: Jörn Engel, linux-mtd, Linux-kernel, linux-embedded,
tim.bird
Jared Hulbert wrote:
> We'll need this for AXFS. The equivalent function in filemap.c is exported.
>
> Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
> ---
> include/linux/mm.h | 4 ++++
> mm/filemap_xip.c | 3 ++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 72a15dc..2be5c22 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -161,6 +161,10 @@ struct vm_fault {
> */
> };
>
> +#ifdef CONFIG_FS_XIP
> +extern int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
> +#endif
> +
No need for #ifdef here as this function is compiled and exported in .c
regardless of CONFIG_FS_XIP
> /*
> * These are the virtual MM functions - opening of an area, closing and
> * unmapping it (needed to keep files on disk up-to-date etc), pointer
> diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
> index 380ab40..ab2f174 100644
> --- a/mm/filemap_xip.c
> +++ b/mm/filemap_xip.c
> @@ -206,7 +206,7 @@ __xip_unmap (struct address_space * mapping,
> *
> * This function is derived from filemap_fault, but used for execute in place
> */
> -static int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
> +int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
> {
> struct file *file = vma->vm_file;
> struct address_space *mapping = file->f_mapping;
> @@ -262,6 +262,7 @@ found:
> return 0;
> }
> }
> +EXPORT_SYMBOL_GPL(xip_file_fault);
>
> static struct vm_operations_struct xip_file_vm_ops = {
> .fault = xip_file_fault,
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 01/10] AXFS: exporting xip_file_fault() for use with AXFS
2008-08-21 7:25 ` Paulius Zaleckas
@ 2008-08-21 7:32 ` Paulius Zaleckas
0 siblings, 0 replies; 4+ messages in thread
From: Paulius Zaleckas @ 2008-08-21 7:32 UTC (permalink / raw)
Cc: jaredeh, Jörn Engel, linux-mtd, Linux-kernel, linux-embedded,
tim.bird
Paulius Zaleckas wrote:
> Jared Hulbert wrote:
>> We'll need this for AXFS. The equivalent function in filemap.c is exported.
>>
>> Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
>> ---
>> include/linux/mm.h | 4 ++++
>> mm/filemap_xip.c | 3 ++-
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index 72a15dc..2be5c22 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -161,6 +161,10 @@ struct vm_fault {
>> */
>> };
>>
>> +#ifdef CONFIG_FS_XIP
>> +extern int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
>> +#endif
>> +
>
> No need for #ifdef here as this function is compiled and exported in .c
> regardless of CONFIG_FS_XIP
Sorry I am wrong... Have to get more sleep :)
>> /*
>> * These are the virtual MM functions - opening of an area, closing and
>> * unmapping it (needed to keep files on disk up-to-date etc), pointer
>> diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
>> index 380ab40..ab2f174 100644
>> --- a/mm/filemap_xip.c
>> +++ b/mm/filemap_xip.c
>> @@ -206,7 +206,7 @@ __xip_unmap (struct address_space * mapping,
>> *
>> * This function is derived from filemap_fault, but used for execute in place
>> */
>> -static int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
>> +int xip_file_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
>> {
>> struct file *file = vma->vm_file;
>> struct address_space *mapping = file->f_mapping;
>> @@ -262,6 +262,7 @@ found:
>> return 0;
>> }
>> }
>> +EXPORT_SYMBOL_GPL(xip_file_fault);
>>
>> static struct vm_operations_struct xip_file_vm_ops = {
>> .fault = xip_file_fault,
>>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 01/10] AXFS: exporting xip_file_fault() for use with AXFS
2008-08-21 5:44 [PATCH 01/10] AXFS: exporting xip_file_fault() for use with AXFS Jared Hulbert
2008-08-21 7:25 ` Paulius Zaleckas
@ 2008-08-21 7:42 ` Carsten Otte
1 sibling, 0 replies; 4+ messages in thread
From: Carsten Otte @ 2008-08-21 7:42 UTC (permalink / raw)
To: jaredeh
Cc: Linux-kernel, linux-embedded, linux-mtd, Jörn Engel,
tim.bird, nickpiggin
Jared Hulbert wrote:
> We'll need this for AXFS. The equivalent function in filemap.c is exported.
>
> Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
> ---
> include/linux/mm.h | 4 ++++
> mm/filemap_xip.c | 3 ++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
Acked-by: Carsten Otte <cotte@de.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-21 7:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21 5:44 [PATCH 01/10] AXFS: exporting xip_file_fault() for use with AXFS Jared Hulbert
2008-08-21 7:25 ` Paulius Zaleckas
2008-08-21 7:32 ` Paulius Zaleckas
2008-08-21 7:42 ` Carsten Otte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).