Loading include/linux/coresight.h +20 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,26 @@ static inline struct coresight_platform_data *of_get_coresight_platform_data( struct device *dev, struct device_node *node) { return NULL; } #endif #ifdef CONFIG_PID_NS static inline unsigned long coresight_vpid_to_pid(unsigned long vpid) { struct task_struct *task = NULL; unsigned long pid = 0; rcu_read_lock(); task = find_task_by_vpid(vpid); if (task) pid = task_pid_nr(task); rcu_read_unlock(); return pid; } #else static inline unsigned long coresight_vpid_to_pid(unsigned long vpid) { return vpid; } #endif #endif #endif Loading
include/linux/coresight.h +20 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,26 @@ static inline struct coresight_platform_data *of_get_coresight_platform_data( struct device *dev, struct device_node *node) { return NULL; } #endif #ifdef CONFIG_PID_NS static inline unsigned long coresight_vpid_to_pid(unsigned long vpid) { struct task_struct *task = NULL; unsigned long pid = 0; rcu_read_lock(); task = find_task_by_vpid(vpid); if (task) pid = task_pid_nr(task); rcu_read_unlock(); return pid; } #else static inline unsigned long coresight_vpid_to_pid(unsigned long vpid) { return vpid; } #endif #endif #endif