From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01C4DC282C4 for ; Wed, 13 Feb 2019 02:51:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF7D321934 for ; Wed, 13 Feb 2019 02:51:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389677AbfBMCvr (ORCPT ); Tue, 12 Feb 2019 21:51:47 -0500 Received: from mga14.intel.com ([192.55.52.115]:11923 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732981AbfBMCiq (ORCPT ); Tue, 12 Feb 2019 21:38:46 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2019 18:38:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,364,1544515200"; d="scan'208";a="138153554" Received: from aubrey-skl.sh.intel.com ([10.239.53.19]) by orsmga001.jf.intel.com with ESMTP; 12 Feb 2019 18:38:42 -0800 From: Aubrey Li To: tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org, hpa@zytor.com Cc: ak@linux.intel.com, tim.c.chen@linux.intel.com, dave.hansen@intel.com, arjan@linux.intel.com, aubrey.li@intel.com, linux-kernel@vger.kernel.org, Aubrey Li Subject: [PATCH v11 1/3] /proc/pid/status: Add support for architecture specific output Date: Wed, 13 Feb 2019 10:37:46 +0800 Message-Id: <20190213023748.6614-1-aubrey.li@linux.intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The architecture specific information of the running processes could be useful to the userland. Add support to examine process architecture specific information externally. Signed-off-by: Aubrey Li Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven --- fs/proc/array.c | 5 +++++ include/linux/proc_fs.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/fs/proc/array.c b/fs/proc/array.c index 9d428d5a0ac8..ea7a981f289c 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -401,6 +401,10 @@ static inline void task_thp_status(struct seq_file *m, struct mm_struct *mm) seq_printf(m, "THP_enabled:\t%d\n", thp_enabled); } +void __weak arch_proc_pid_status(struct seq_file *m, struct task_struct *task) +{ +} + int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { @@ -424,6 +428,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, task_cpus_allowed(m, task); cpuset_task_status_allowed(m, task); task_context_switch_counts(m, task); + arch_proc_pid_status(m, task); return 0; } diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index d0e1f1522a78..1de9ba1b064f 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -73,6 +73,8 @@ struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mo int (*show)(struct seq_file *, void *), proc_write_t write, void *data); +/* Add support for architecture specific output in /proc/pid/status */ +extern void arch_proc_pid_status(struct seq_file *m, struct task_struct *task); #else /* CONFIG_PROC_FS */ -- 2.17.1