static const struct pid_entry adi_dir_stuff[] = {
REG("tags", S_IRUSR | S_IWUSR, proc_tag_operations),
+ REG("maps", S_IRUGO, proc_adi_maps_operations),
};
static int proc_adi_readdir(struct file *file, struct dir_context *ctx)
extern const struct file_operations proc_tid_smaps_operations;
extern const struct file_operations proc_clear_refs_operations;
extern const struct file_operations proc_pagemap_operations;
+extern const struct file_operations proc_adi_maps_operations;
extern unsigned long task_vsize(struct mm_struct *);
extern unsigned long task_statm(struct mm_struct *,
.llseek = seq_lseek,
.release = proc_map_release,
};
+
+#ifdef CONFIG_SPARC64
+static int show_adi_map(struct seq_file *m, struct vm_area_struct *vma)
+{
+ if (vma->vm_flags & VM_SPARC_ADI)
+ return show_map(m, vma, 1);
+
+ return 0;
+}
+
+static int show_pid_adi_map(struct seq_file *m, void *v)
+{
+ return show_adi_map(m, v);
+}
+
+static const struct seq_operations proc_pid_adi_maps_op = {
+ .start = m_start,
+ .next = m_next,
+ .stop = m_stop,
+ .show = show_pid_adi_map,
+};
+
+static int pid_adi_maps_open(struct inode *inode, struct file *file)
+{
+ return do_maps_open(inode, file, &proc_pid_adi_maps_op);
+}
+
+const struct file_operations proc_adi_maps_operations = {
+ .open = pid_adi_maps_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = proc_map_release,
+};
+
+#endif
#endif /* CONFIG_NUMA */