smaps: add clear_refs file to clear reference
[powerpc.git] / include / linux / proc_fs.h
index 17e7578..f4f7a63 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/slab.h>
 #include <linux/fs.h>
 #include <linux/spinlock.h>
+#include <linux/magic.h>
 #include <asm/atomic.h>
 
 /*
@@ -24,8 +25,6 @@ enum {
        PROC_ROOT_INO = 1,
 };
 
-#define PROC_SUPER_MAGIC 0x9fa0
-
 /*
  * This is not completely implemented yet. The idea is to
  * create an in-memory tree (like the actual /proc filesystem
@@ -56,8 +55,8 @@ struct proc_dir_entry {
        uid_t uid;
        gid_t gid;
        loff_t size;
-       struct inode_operations * proc_iops;
-       const struct file_operations * proc_fops;
+       const struct inode_operations *proc_iops;
+       const struct file_operations *proc_fops;
        get_info_t *get_info;
        struct module *owner;
        struct proc_dir_entry *next, *parent, *subdir;
@@ -105,6 +104,7 @@ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
 unsigned long task_vsize(struct mm_struct *);
 int task_statm(struct mm_struct *, int *, int *, int *, int *);
 char *task_mem(struct mm_struct *, char *);
+void clear_refs_smap(struct mm_struct *mm);
 
 extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
                                                struct proc_dir_entry *parent);
@@ -114,8 +114,6 @@ extern struct vfsmount *proc_mnt;
 extern int proc_fill_super(struct super_block *,void *,int);
 extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *);
 
-extern int proc_match(int, const char *,struct proc_dir_entry *);
-
 /*
  * These are generic /proc routines that use the internal
  * "struct proc_dir_entry" tree to traverse the filesystem.
@@ -245,13 +243,15 @@ static inline void kclist_add(struct kcore_list *new, void *addr, size_t size)
 extern void kclist_add(struct kcore_list *, void *, size_t);
 #endif
 
+union proc_op {
+       int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
+       int (*proc_read)(struct task_struct *task, char *page);
+};
+
 struct proc_inode {
        struct pid *pid;
        int fd;
-       union {
-               int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
-               int (*proc_read)(struct task_struct *task, char *page);
-       } op;
+       union proc_op op;
        struct proc_dir_entry *pde;
        struct inode vfs_inode;
 };
@@ -269,7 +269,9 @@ static inline struct proc_dir_entry *PDE(const struct inode *inode)
 struct proc_maps_private {
        struct pid *pid;
        struct task_struct *task;
+#ifdef CONFIG_MMU
        struct vm_area_struct *tail_vma;
+#endif
 };
 
 #endif /* _LINUX_PROC_FS_H */