[POWERPC] 4xx: Add bootwrapper for AMCC Yosemite board
[pandora-kernel.git] / kernel / cpuset.c
index 67b2bfe..a1b61f4 100644 (file)
@@ -322,8 +322,8 @@ static void guarantee_online_mems(const struct cpuset *cs, nodemask_t *pmask)
  * Call without callback_mutex or task_lock() held.  May be
  * called with or without cgroup_mutex held.  Thanks in part to
  * 'the_top_cpuset_hack', the task's cpuset pointer will never
- * be NULL.  This routine also might acquire callback_mutex and
- * current->mm->mmap_sem during call.
+ * be NULL.  This routine also might acquire callback_mutex during
+ * call.
  *
  * Reading current->cpuset->mems_generation doesn't need task_lock
  * to guard the current->cpuset derefence, because it is guarded
@@ -2255,13 +2255,14 @@ const struct file_operations proc_cpuset_operations = {
 #endif /* CONFIG_PROC_PID_CPUSET */
 
 /* Display task cpus_allowed, mems_allowed in /proc/<pid>/status file. */
-char *cpuset_task_status_allowed(struct task_struct *task, char *buffer)
-{
-       buffer += sprintf(buffer, "Cpus_allowed:\t");
-       buffer += cpumask_scnprintf(buffer, PAGE_SIZE, task->cpus_allowed);
-       buffer += sprintf(buffer, "\n");
-       buffer += sprintf(buffer, "Mems_allowed:\t");
-       buffer += nodemask_scnprintf(buffer, PAGE_SIZE, task->mems_allowed);
-       buffer += sprintf(buffer, "\n");
-       return buffer;
+void cpuset_task_status_allowed(struct seq_file *m, struct task_struct *task)
+{
+       seq_printf(m, "Cpus_allowed:\t");
+       m->count += cpumask_scnprintf(m->buf + m->count, m->size - m->count,
+                                       task->cpus_allowed);
+       seq_printf(m, "\n");
+       seq_printf(m, "Mems_allowed:\t");
+       m->count += nodemask_scnprintf(m->buf + m->count, m->size - m->count,
+                                       task->mems_allowed);
+       seq_printf(m, "\n");
 }