{"id":810860,"url":"http://patchwork.ozlabs.org/api/patches/810860/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1504766140.12628.14.camel@kernel.crashing.org/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","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":"<1504766140.12628.14.camel@kernel.crashing.org>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/1504766140.12628.14.camel@kernel.crashing.org/","date":"2017-09-07T06:35:40","name":"[1/2] powerpc/eeh: Create PHB PEs after EEH is initialized","commit_ref":"3e77adeea3c5393c9b624832f65441e92867f618","pull_url":null,"state":"accepted","archived":false,"hash":"909d91b32e1db99ff2e166e5afc396b113ae9764","submitter":{"id":38,"url":"http://patchwork.ozlabs.org/api/people/38/?format=json","name":"Benjamin Herrenschmidt","email":"benh@kernel.crashing.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1504766140.12628.14.camel@kernel.crashing.org/mbox/","series":[{"id":1915,"url":"http://patchwork.ozlabs.org/api/series/1915/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=1915","date":"2017-09-07T06:35:40","name":"[1/2] powerpc/eeh: Create PHB PEs after EEH is initialized","version":1,"mbox":"http://patchwork.ozlabs.org/series/1915/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/810860/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/810860/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","linuxppc-dev@ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\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 3xnrN132NDz9s82\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  7 Sep 2017 16:37:05 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xnrN11lj9zDrWN\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  7 Sep 2017 16:37:05 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xnrLh310BzDrVy\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu,  7 Sep 2017 16:35:56 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\tby bilbo.ozlabs.org (Postfix) with ESMTP id 3xnrLh2JBXz8sfq\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu,  7 Sep 2017 16:35:56 +1000 (AEST)","by ozlabs.org (Postfix)\n\tid 3xnrLh26jHz9s8J; Thu,  7 Sep 2017 16:35:56 +1000 (AEST)","from gate.crashing.org (gate.crashing.org [63.228.1.57])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xnrLf6y4dz9s82\n\tfor <linuxppc-dev@ozlabs.org>; Thu,  7 Sep 2017 16:35:54 +1000 (AEST)","from localhost (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id v876ZeSL004844;\n\tThu, 7 Sep 2017 01:35:42 -0500"],"Authentication-Results":"ozlabs.org; spf=permerror (mailfrom)\n\tsmtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57;\n\thelo=gate.crashing.org; envelope-from=benh@kernel.crashing.org;\n\treceiver=<UNKNOWN>)","Message-ID":"<1504766140.12628.14.camel@kernel.crashing.org>","Subject":"[PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized","From":"Benjamin Herrenschmidt <benh@kernel.crashing.org>","To":"linuxppc-dev@ozlabs.org","Date":"Thu, 07 Sep 2017 16:35:40 +1000","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.24.5 (3.24.5-1.fc26) ","Mime-Version":"1.0","Content-Transfer-Encoding":"7bit","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":"Russell Currey <ruscur@au1.ibm.com>","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":"Otherwise we end up not yet having computed the right\ndiag data size on powernv where EEH initialization\nis delayed, thus causing memory corruption later on\nwhen calling OPAL.\n\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\n---\n arch/powerpc/kernel/eeh.c     |  4 ++++\n arch/powerpc/kernel/eeh_dev.c | 18 ------------------\n 2 files changed, 4 insertions(+), 18 deletions(-)","diff":"diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c\nindex 63992b2d8e15..f27eecd5ec7f 100644\n--- a/arch/powerpc/kernel/eeh.c\n+++ b/arch/powerpc/kernel/eeh.c\n@@ -1018,6 +1018,10 @@ int eeh_init(void)\n \t} else if ((ret = eeh_ops->init()))\n \t\treturn ret;\n \n+\t/* Initialize PHB PEs */\n+\tlist_for_each_entry_safe(hose, tmp, &hose_list, list_node)\n+\t\teeh_dev_phb_init_dynamic(hose);\n+\n \t/* Initialize EEH event */\n \tret = eeh_event_init();\n \tif (ret)\ndiff --git a/arch/powerpc/kernel/eeh_dev.c b/arch/powerpc/kernel/eeh_dev.c\nindex d6b2ca70d14d..0820b73288c0 100644\n--- a/arch/powerpc/kernel/eeh_dev.c\n+++ b/arch/powerpc/kernel/eeh_dev.c\n@@ -83,21 +83,3 @@ void eeh_dev_phb_init_dynamic(struct pci_controller *phb)\n \t/* EEH PE for PHB */\n \teeh_phb_pe_create(phb);\n }\n-\n-/**\n- * eeh_dev_phb_init - Create EEH devices for devices included in existing PHBs\n- *\n- * Scan all the existing PHBs and create EEH devices for their OF\n- * nodes and their children OF nodes\n- */\n-static int __init eeh_dev_phb_init(void)\n-{\n-\tstruct pci_controller *phb, *tmp;\n-\n-\tlist_for_each_entry_safe(phb, tmp, &hose_list, list_node)\n-\t\teeh_dev_phb_init_dynamic(phb);\n-\n-\treturn 0;\n-}\n-\n-core_initcall(eeh_dev_phb_init);\n","prefixes":["1/2"]}