Skip to contentSkip to conversation

kdb: use task_cpu() instead of task_thread_info()->cpu

PATCH New [email protected] 1 participant 1 message Jul 28, 2016 KGDB / KDB /debug_core

lore
Share & tools
lore
#0 lore raw

PATCH 77/101 kdb: use task_cpu() instead of task_thread_info()->cpu

From: Andy Lutomirski <[email protected]>
Subject: kdb: use task_cpu() instead of task_thread_info()->cpu

We'll need this cleanup to make the cpu field in thread_info be optional.

---

 include/linux/kdb.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/kdb.h renamed from include/linux/kdb.h~kdb-use-task_cpu-instead-of-task_thread_info-cpu +1 -1
diff -puN include/linux/kdb.h~kdb-use-task_cpu-instead-of-task_thread_info-cpu include/linux/kdb.h
@@ -177,7 +177,7 @@ extern int kdb_get_kbd_char(void);
 static inline
 int kdb_process_cpu(const struct task_struct *p)
 {
-	unsigned int cpu = task_thread_info(p)->cpu;
+	unsigned int cpu = task_cpu(p);
 	if (cpu > num_possible_cpus())
 		cpu = 0;
 	return cpu;

_