diff options
author | Carsten Otte <cotte@de.ibm.com> | 2005-06-24 01:05:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:06:41 -0400 |
commit | ceffc078528befc008c6f2c2c4decda79eabd534 (patch) | |
tree | a289e10162bdef0c0d9f6533f1a647b0fe1ed7a9 /include | |
parent | 420edbcc09008342c7b2665453f6b370739aadb0 (diff) |
[PATCH] xip: fs/mm: execute in place
- generic_file* file operations do no longer have a xip/non-xip split
- filemap_xip.c implements a new set of fops that require get_xip_page
aop to work proper. all new fops are exported GPL-only (don't like to
see whatever code use those except GPL modules)
- __xip_unmap now uses page_check_address, which is no longer static
in rmap.c, and defined in linux/rmap.h
- mm/filemap.h is now much more clean, plainly having just Linus'
inline funcs moved here from filemap.c
- fix includes in filemap_xip to make it build cleanly on i386
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 18 | ||||
-rw-r--r-- | include/linux/rmap.h | 6 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 929bf8d20c87..79c0fafc0211 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -330,6 +330,8 @@ struct address_space_operations { | |||
330 | int (*releasepage) (struct page *, int); | 330 | int (*releasepage) (struct page *, int); |
331 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 331 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
332 | loff_t offset, unsigned long nr_segs); | 332 | loff_t offset, unsigned long nr_segs); |
333 | struct page* (*get_xip_page)(struct address_space *, sector_t, | ||
334 | int); | ||
333 | }; | 335 | }; |
334 | 336 | ||
335 | struct backing_dev_info; | 337 | struct backing_dev_info; |
@@ -1497,6 +1499,22 @@ extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); | |||
1497 | extern int generic_file_open(struct inode * inode, struct file * filp); | 1499 | extern int generic_file_open(struct inode * inode, struct file * filp); |
1498 | extern int nonseekable_open(struct inode * inode, struct file * filp); | 1500 | extern int nonseekable_open(struct inode * inode, struct file * filp); |
1499 | 1501 | ||
1502 | #ifdef CONFIG_FS_XIP | ||
1503 | extern ssize_t xip_file_aio_read(struct kiocb *iocb, char __user *buf, | ||
1504 | size_t count, loff_t pos); | ||
1505 | extern ssize_t xip_file_readv(struct file *filp, const struct iovec *iov, | ||
1506 | unsigned long nr_segs, loff_t *ppos); | ||
1507 | extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos, | ||
1508 | size_t count, read_actor_t actor, | ||
1509 | void *target); | ||
1510 | extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); | ||
1511 | extern ssize_t xip_file_aio_write(struct kiocb *iocb, const char __user *buf, | ||
1512 | size_t count, loff_t pos); | ||
1513 | extern ssize_t xip_file_writev(struct file *file, const struct iovec *iov, | ||
1514 | unsigned long nr_segs, loff_t *ppos); | ||
1515 | extern int xip_truncate_page(struct address_space *mapping, loff_t from); | ||
1516 | #endif | ||
1517 | |||
1500 | static inline void do_generic_file_read(struct file * filp, loff_t *ppos, | 1518 | static inline void do_generic_file_read(struct file * filp, loff_t *ppos, |
1501 | read_descriptor_t * desc, | 1519 | read_descriptor_t * desc, |
1502 | read_actor_t actor) | 1520 | read_actor_t actor) |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 11b484e37ac9..e80fb7ee6efd 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -93,6 +93,12 @@ int page_referenced(struct page *, int is_locked, int ignore_token); | |||
93 | int try_to_unmap(struct page *); | 93 | int try_to_unmap(struct page *); |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * Called from mm/filemap_xip.c to unmap empty zero page | ||
97 | */ | ||
98 | pte_t *page_check_address(struct page *, struct mm_struct *, unsigned long); | ||
99 | |||
100 | |||
101 | /* | ||
96 | * Used by swapoff to help locate where page is expected in vma. | 102 | * Used by swapoff to help locate where page is expected in vma. |
97 | */ | 103 | */ |
98 | unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); | 104 | unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); |