Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/783387/?format=api
{ "id": 783387, "url": "http://patchwork.ozlabs.org/api/patches/783387/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1499074728-30680-3-git-send-email-anju@linux.vnet.ibm.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<1499074728-30680-3-git-send-email-anju@linux.vnet.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1499074728-30680-3-git-send-email-anju@linux.vnet.ibm.com/", "date": "2017-07-03T09:38:48", "name": "[v12,10/10] powerpc/perf: Thread IMC PMU functions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0a77ad23457bd929fb1a2c590702b0f246560853", "submitter": { "id": 67491, "url": "http://patchwork.ozlabs.org/api/people/67491/?format=api", "name": "Anju T Sudhakar", "email": "anju@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1499074728-30680-3-git-send-email-anju@linux.vnet.ibm.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/783387/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/783387/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3x1MpH0d04z9rxl\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 3 Jul 2017 19:51:03 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3x1MpG6XLFzDrRd\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 3 Jul 2017 19:51:02 +1000 (AEST)", "from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3x1MYc5dqWzDr4D\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tMon, 3 Jul 2017 19:40:04 +1000 (AEST)", "from pps.filterd (m0098419.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id\n\tv639dQ5N002495\n\tfor <linuxppc-dev@lists.ozlabs.org>; Mon, 3 Jul 2017 05:40:01 -0400", "from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2bfk9vrdq7-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Mon, 03 Jul 2017 05:40:01 -0400", "from localhost\n\tby e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <anju@linux.vnet.ibm.com>;\n\tMon, 3 Jul 2017 19:39:58 +1000", "from d23relay06.au.ibm.com (202.81.31.225)\n\tby e23smtp06.au.ibm.com (202.81.31.212) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tMon, 3 Jul 2017 19:39:56 +1000", "from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119])\n\tby d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tv639dlYb9502968\n\tfor <linuxppc-dev@lists.ozlabs.org>; Mon, 3 Jul 2017 19:39:55 +1000", "from d23av05.au.ibm.com (localhost [127.0.0.1])\n\tby d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tv639dMK5025405\n\tfor <linuxppc-dev@lists.ozlabs.org>; Mon, 3 Jul 2017 19:39:22 +1000", "from xenial-xerus.in.ibm.com (xenial-xerus.in.ibm.com [9.124.35.20]\n\t(may be forged))\n\tby d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tv639dCsw024325; Mon, 3 Jul 2017 19:39:19 +1000" ], "From": "Anju T Sudhakar <anju@linux.vnet.ibm.com>", "To": "mpe@ellerman.id.au", "Subject": "[PATCH v12 10/10] powerpc/perf: Thread IMC PMU functions", "Date": "Mon, 3 Jul 2017 15:08:48 +0530", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1499074728-30680-1-git-send-email-anju@linux.vnet.ibm.com>", "References": "<1499074728-30680-1-git-send-email-anju@linux.vnet.ibm.com>", "X-TM-AS-MML": "disable", "x-cbid": "17070309-0040-0000-0000-0000033B6E2E", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17070309-0041-0000-0000-00000CB6911A", "Message-Id": "<1499074728-30680-3-git-send-email-anju@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-07-03_06:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=3\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000\n\tdefinitions=main-1707030161", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "stewart@linux.vnet.ibm.com, ego@linux.vnet.ibm.com, mikey@neuling.org,\n\tmaddy@linux.vnet.ibm.com, hemant@linux.vnet.ibm.com,\n\tlinux-kernel@vger.kernel.org, eranian@google.com,\n\tanju@linux.vnet.ibm.com, \n\tanton@samba.org, tglx@linutronix.de, sukadev@linux.vnet.ibm.com,\n\tlinuxppc-dev@lists.ozlabs.org, dja@axtens.net", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "Code to add support for thread IMC on cpuhotplug.\nWhen a cpu goes offline, the LDBAR for that cpu is disabled, and when it comes\nback online the previous ldbar value is written back to the LDBAR for that cpu.\n\nTo register the hotplug functions for thread_imc, a new state\nCPUHP_AP_PERF_POWERPC_THREAD_IMC_ONLINE is added to the list of existing\nstates.\n\nSigned-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>\nSigned-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>\n---\n arch/powerpc/perf/imc-pmu.c | 38 +++++++++++++++++++++++++++++++++++++-\n include/linux/cpuhotplug.h | 1 +\n 2 files changed, 38 insertions(+), 1 deletion(-)", "diff": "diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c\nindex bea4dafc2aad..700e3cb0c89f 100644\n--- a/arch/powerpc/perf/imc-pmu.c\n+++ b/arch/powerpc/perf/imc-pmu.c\n@@ -931,6 +931,37 @@ static int thread_imc_mem_alloc(int cpu_id, int size)\n \treturn 0;\n }\n \n+static int ppc_thread_imc_cpu_online(unsigned int cpu)\n+{\n+\tint rc = 0;\n+\tu64 ldbar_value;\n+\n+\tif (per_cpu(thread_imc_mem, cpu) == NULL)\n+\t\trc = thread_imc_mem_alloc(cpu, thread_imc_mem_size);\n+\n+\tif (rc)\n+\t\tmtspr(SPRN_LDBAR, 0);\n+\n+\tldbar_value = ((u64)per_cpu(thread_imc_mem, cpu) & (u64)THREAD_IMC_LDBAR_MASK) |\n+\t\t\t\t\t\t\t(u64)THREAD_IMC_ENABLE;\n+\tmtspr(SPRN_LDBAR, ldbar_value);\n+\treturn 0;\n+}\n+\n+static int ppc_thread_imc_cpu_offline(unsigned int cpu)\n+{\n+\tmtspr(SPRN_LDBAR, 0);\n+\treturn 0;\n+}\n+\n+void thread_imc_cpu_init(void)\n+{\n+\tcpuhp_setup_state(CPUHP_AP_PERF_POWERPC_THREAD_IMC_ONLINE,\n+\t\t\t \"perf/powerpc/imc_thread:online\",\n+\t\t\t ppc_thread_imc_cpu_online,\n+\t\t\t ppc_thread_imc_cpu_offline);\n+}\n+\n /*\n * imc_mem_init : Function to support memory allocation for core imc.\n */\n@@ -1044,6 +1075,9 @@ int init_imc_pmu(struct imc_events *events, int idx,\n \t\t\treturn ret;\n \t\t}\n \t\tbreak;\n+\tcase IMC_DOMAIN_THREAD:\n+\t\tthread_imc_cpu_init();\n+\t\tbreak;\n \tdefault:\n \t\treturn -1;\t/* Unknown domain */\n \t}\n@@ -1095,7 +1129,9 @@ int init_imc_pmu(struct imc_events *events, int idx,\n \t\tcleanup_all_core_imc_memory(pmu_ptr);\n \t}\n \t/* For thread_imc, we have allocated memory, we need to free it */\n-\tif (pmu_ptr->domain == IMC_DOMAIN_THREAD)\n+\tif (pmu_ptr->domain == IMC_DOMAIN_THREAD) {\n+\t\tcpuhp_remove_state(CPUHP_AP_PERF_POWERPC_THREAD_IMC_ONLINE);\n \t\tcleanup_all_thread_imc_memory();\n+\t}\n \treturn ret;\n }\ndiff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h\nindex e145fffec093..937d1ec8c3e9 100644\n--- a/include/linux/cpuhotplug.h\n+++ b/include/linux/cpuhotplug.h\n@@ -141,6 +141,7 @@ enum cpuhp_state {\n \tCPUHP_AP_PERF_ARM_QCOM_L3_ONLINE,\n \tCPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE,\n \tCPUHP_AP_PERF_POWERPC_CORE_IMC_ONLINE,\n+\tCPUHP_AP_PERF_POWERPC_THREAD_IMC_ONLINE,\n \tCPUHP_AP_WORKQUEUE_ONLINE,\n \tCPUHP_AP_RCUTREE_ONLINE,\n \tCPUHP_AP_ONLINE_DYN,\n", "prefixes": [ "v12", "10/10" ] }