[{"id":1761615,"web_url":"http://patchwork.ozlabs.org/comment/1761615/","msgid":"<1504266488.15144.3.camel@synopsys.com>","list_archive_url":null,"date":"2017-09-01T11:48:09","subject":"Re: [PATCH] arc: Re-enable MMU upon die()","submitter":{"id":23881,"url":"http://patchwork.ozlabs.org/api/people/23881/","name":"Alexey Brodkin","email":"Alexey.Brodkin@synopsys.com"},"content":"Hi Jose,\n\nOn Fri, 2017-09-01 at 12:39 +0100, Jose Abreu wrote:\n> I recently came upon a scenario where I would get a double fault\n> after a machine check error. It turns out that for Ksymbol lookup\n> to work with modules we need to have MMU enabled because module\n> address is mapped in the cached space.\n> \n> This patch re-enables the MMU before start printing the stacktrace\n> making stacktracing of modules work upon a fatal exception.\n\nI'm wondering how do we end up with MMU disabled?\nFrom ARC700 databook I cannot find any condition on which MMU could be\nsilently disabled by hardware and IIRC there's no code in Linux kernel\nthat disables MMU.\n\n-Alexey","headers":{"Return-Path":"<linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"V7vJZok/\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkHZm6Qtyz9s4s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 21:49:04 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnkRb-0004Pr-IR; Fri, 01 Sep 2017 11:49:03 +0000","from smtprelay4.synopsys.com ([198.182.47.9]\n\thelo=smtprelay.synopsys.com)\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnkRY-0004NF-I2 for linux-snps-arc@lists.infradead.org;\n\tFri, 01 Sep 2017 11:49:02 +0000","from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66])\n\tby smtprelay.synopsys.com (Postfix) with ESMTP id 4700424E15BB\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 04:48:40 -0700 (PDT)","from mailhost.synopsys.com (localhost [127.0.0.1])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id 365B715F\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 04:48:40 -0700 (PDT)","from us01wehtc1.internal.synopsys.com\n\t(us01wehtc1.internal.synopsys.com [10.12.239.235])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id 2C01915E\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 04:48:40 -0700 (PDT)","from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by\n\tus01wehtc1.internal.synopsys.com (10.12.239.231) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Fri, 1 Sep 2017 04:48:12 -0700","from DE02WEMBXB.internal.synopsys.com ([fe80::95ce:118a:8321:a099])\n\tby DE02WEHTCA.internal.synopsys.com ([::1]) with mapi id\n\t14.03.0266.001; Fri, 1 Sep 2017 13:48:09 +0200"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To:\n\tReferences:Message-ID:Date:Subject:To:From:Reply-To:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=l0q3w7Z51gOll7bdCS3PbP+uDs1fojDC8SAWKvXr/5k=;\n\tb=V7vJZok/Ym/ao/\n\tlbJ4f0f8P7FUSgD+X1KjFPW3iUjaDOKP+ssPAeTLND7OiW/1lenWWYpAet5f03cvUE1aQUuTxI9MC\n\ttPcxFHITrIXfa5p0YyvUxsM2kQymKKRJSGtbI/BFFHTtpxDqAeip0whxrK/GH6b6nqy02unxoaGem\n\tZl61wyGIxtYpvJ/hwgS3N/gsGChfOaENEbo7O1O3WDBLJx4efkjBv5ieeyuiONEV5wZs/ES9H39YE\n\twKmnVQCR+x9S4uYCANk7BCy1bkQN7gezHzuXoD8o3OF3ZPDVJ2kfl+aTlkRRcbCPcSIWvAD/5GOsZ\n\tIE/VNvkSwtE0BVqB2EFw==;","From":"Alexey Brodkin <Alexey.Brodkin@synopsys.com>","To":"Jose Abreu <Jose.Abreu@synopsys.com>","Subject":"Re: [PATCH] arc: Re-enable MMU upon die()","Thread-Topic":"[PATCH] arc: Re-enable MMU upon die()","Thread-Index":"AQHTIxcRECN10CdYjEedSkx+GXol1KKfyKYA","Date":"Fri, 1 Sep 2017 11:48:09 +0000","Message-ID":"<1504266488.15144.3.camel@synopsys.com>","References":"<d2b588da61b35312a3126b605685f22bc30fc3ae.1504265945.git.joabreu@synopsys.com>","In-Reply-To":"<d2b588da61b35312a3126b605685f22bc30fc3ae.1504265945.git.joabreu@synopsys.com>","Accept-Language":"en-US, ru-RU","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-originating-ip":"[10.121.8.86]","Content-ID":"<FC3BE4DF6CA0BF44A350DF50103433DD@internal.synopsys.com>","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170901_044900_675152_EA29CEC1 ","X-CRM114-Status":"UNSURE (   8.00  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [198.182.47.9 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-snps-arc@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux on Synopsys ARC Processors\n\t<linux-snps-arc.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-snps-arc/>","List-Post":"<mailto:linux-snps-arc@lists.infradead.org>","List-Help":"<mailto:linux-snps-arc-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe>","Cc":"Vineet Gupta <Vineet.Gupta1@synopsys.com>,\n\t\"linux-snps-arc@lists.infradead.org\" <linux-snps-arc@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-snps-arc\" <linux-snps-arc-bounces@lists.infradead.org>","Errors-To":"linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}},{"id":1761650,"web_url":"http://patchwork.ozlabs.org/comment/1761650/","msgid":"<c6f2e929-d431-8fc3-3940-7e2aba4d00cf@synopsys.com>","list_archive_url":null,"date":"2017-09-01T12:33:42","subject":"Re: [PATCH] arc: Re-enable MMU upon die()","submitter":{"id":68387,"url":"http://patchwork.ozlabs.org/api/people/68387/","name":"Jose Abreu","email":"Jose.Abreu@synopsys.com"},"content":"Hi Alexey,\n\nOn 01-09-2017 12:48, Alexey Brodkin wrote:\n> Hi Jose,\n>\n> On Fri, 2017-09-01 at 12:39 +0100, Jose Abreu wrote:\n>> I recently came upon a scenario where I would get a double fault\n>> after a machine check error. It turns out that for Ksymbol lookup\n>> to work with modules we need to have MMU enabled because module\n>> address is mapped in the cached space.\n>>\n>> This patch re-enables the MMU before start printing the stacktrace\n>> making stacktracing of modules work upon a fatal exception.\n> I'm wondering how do we end up with MMU disabled?\n> From ARC700 databook I cannot find any condition on which MMU could be\n> silently disabled by hardware and IIRC there's no code in Linux kernel\n> that disables MMU.\n\nAccording to ARC 700 databook a machine check exception causes\nGlobal TLB enable to be cleared. (See ARC 700 databook, page 687).\n\nBest regards,\nJose Miguel Abreu\n\n>\n> -Alexey","headers":{"Return-Path":"<linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"NXG4aXu6\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkJZs0hGpz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 22:34:13 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnl9H-00088t-OG; Fri, 01 Sep 2017 12:34:11 +0000","from smtprelay2.synopsys.com ([198.182.60.111]\n\thelo=smtprelay.synopsys.com)\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnl9F-00086N-5I for linux-snps-arc@lists.infradead.org;\n\tFri, 01 Sep 2017 12:34:10 +0000","from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239])\n\tby smtprelay.synopsys.com (Postfix) with ESMTP id 305C710C1424\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 05:33:48 -0700 (PDT)","from mailhost.synopsys.com (localhost [127.0.0.1])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id 1C308CCF\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 05:33:48 -0700 (PDT)","from us01wehtc1.internal.synopsys.com\n\t(us01wehtc1-vip.internal.synopsys.com [10.12.239.236])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id 0FD90CCB\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 05:33:48 -0700 (PDT)","from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by\n\tus01wehtc1.internal.synopsys.com (10.12.239.235) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Fri, 1 Sep 2017 05:33:47 -0700","from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by\n\tDE02WEHTCA.internal.synopsys.com (10.225.19.92) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Fri, 1 Sep 2017 14:33:45 +0200","from [10.0.2.15] (10.107.19.75) by DE02WEHTCB.internal.synopsys.com\n\t(10.225.19.80) with Microsoft SMTP Server (TLS) id 14.3.266.1;\n\tFri, 1 Sep 2017 14:33:45 +0200"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:\n\tMessage-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description\n\t:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=Dy/LNY2tQVRnZ5wZrltQMhybor5TApcDQ/InigmLfjI=;\n\tb=NXG4aXu6YERO/U\n\tEFJaT8Pd/rJvjEcTQfvRajI5Bi4TuxYa8+6XQh+QNZkx8zHt71v8tB52ynr2Pjm00PwViCLY47tTk\n\t6ePyIf9oVittHVcMw2SPtDPFH+WXq4F0nDCx3AJoW9LMraqsP/GSvj8WBfgJeyJDilBoGbG+zIqwv\n\tBjlcu2odpOFYqYMs+HBw8wAot/aD9ME5fk9432eHkh5kNgt6V7f3P9k7HfBJjA852I0idWukjd9Id\n\tKYjEK5UxqvRVmuJDK2kVraiY0sv8W4kcmtQZPptSgCNuYH/VYikd1SWCK8/+nNZ9sqLu9TMQtJGQX\n\tkP80lJ6HfxpxRi2JL8IQ==;","Subject":"Re: [PATCH] arc: Re-enable MMU upon die()","To":"Alexey Brodkin <Alexey.Brodkin@synopsys.com>","References":"<d2b588da61b35312a3126b605685f22bc30fc3ae.1504265945.git.joabreu@synopsys.com>\n\t<1504266488.15144.3.camel@synopsys.com>","From":"Jose Abreu <Jose.Abreu@synopsys.com>","Message-ID":"<c6f2e929-d431-8fc3-3940-7e2aba4d00cf@synopsys.com>","Date":"Fri, 1 Sep 2017 13:33:42 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.4.0","MIME-Version":"1.0","In-Reply-To":"<1504266488.15144.3.camel@synopsys.com>","X-Originating-IP":"[10.107.19.75]","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170901_053409_226187_B993F5EA ","X-CRM114-Status":"UNSURE (   9.91  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [198.182.60.111 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-snps-arc@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux on Synopsys ARC Processors\n\t<linux-snps-arc.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-snps-arc/>","List-Post":"<mailto:linux-snps-arc@lists.infradead.org>","List-Help":"<mailto:linux-snps-arc-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe>","Cc":"Vineet Gupta <Vineet.Gupta1@synopsys.com>,\n\t\"linux-snps-arc@lists.infradead.org\" <linux-snps-arc@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-snps-arc\" <linux-snps-arc-bounces@lists.infradead.org>","Errors-To":"linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}},{"id":1761652,"web_url":"http://patchwork.ozlabs.org/comment/1761652/","msgid":"<1504269727.15144.6.camel@synopsys.com>","list_archive_url":null,"date":"2017-09-01T12:42:08","subject":"Re: [PATCH] arc: Re-enable MMU upon die()","submitter":{"id":23881,"url":"http://patchwork.ozlabs.org/api/people/23881/","name":"Alexey Brodkin","email":"Alexey.Brodkin@synopsys.com"},"content":"Hi Jose,\n\nOn Fri, 2017-09-01 at 13:33 +0100, Jose Abreu wrote:\n> Hi Alexey,\n> \n> On 01-09-2017 12:48, Alexey Brodkin wrote:\n> > \n> > Hi Jose,\n> > \n> > On Fri, 2017-09-01 at 12:39 +0100, Jose Abreu wrote:\n> > > \n> > > I recently came upon a scenario where I would get a double fault\n> > > after a machine check error. It turns out that for Ksymbol lookup\n> > > to work with modules we need to have MMU enabled because module\n> > > address is mapped in the cached space.\n> > > \n> > > This patch re-enables the MMU before start printing the stacktrace\n> > > making stacktracing of modules work upon a fatal exception.\n> > I'm wondering how do we end up with MMU disabled?\n> > From ARC700 databook I cannot find any condition on which MMU could be\n> > silently disabled by hardware and IIRC there's no code in Linux kernel\n> > that disables MMU.\n> \n> According to ARC 700 databook a machine check exception causes\n> Global TLB enable to be cleared. (See ARC 700 databook, page 687).\n\nThanks for pointing to that.\nI didn't expect to see that note far below \"Global TLB enable\" bit description.\n\nSo then your change makes perfect sense.\n\nReviwed-by: Alexey Brodkin <abrodkin@synopsys.com>","headers":{"Return-Path":"<linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"eybnqLFK\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkJmY1RkLz9t1t\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 22:42:37 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnlHP-0003eJ-Lk; Fri, 01 Sep 2017 12:42:35 +0000","from smtprelay.synopsys.com ([198.182.60.111])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnlHM-0003bQ-Gs for linux-snps-arc@lists.infradead.org;\n\tFri, 01 Sep 2017 12:42:33 +0000","from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238])\n\tby smtprelay.synopsys.com (Postfix) with ESMTP id 6612810C09E4\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 05:42:11 -0700 (PDT)","from mailhost.synopsys.com (localhost [127.0.0.1])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id 4FC96F81\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 05:42:11 -0700 (PDT)","from US01WEHTC2.internal.synopsys.com\n\t(us01wehtc2-vip.internal.synopsys.com [10.12.239.238])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id 3B427F7A\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 05:42:11 -0700 (PDT)","from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by\n\tUS01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Fri, 1 Sep 2017 05:42:11 -0700","from DE02WEMBXB.internal.synopsys.com ([fe80::95ce:118a:8321:a099])\n\tby DE02WEHTCA.internal.synopsys.com ([::1]) with mapi id\n\t14.03.0266.001; Fri, 1 Sep 2017 14:42:08 +0200"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To:\n\tReferences:Message-ID:Date:Subject:To:From:Reply-To:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=fzBXE1+hMi9aTVfyxDSWHG/qf/SMyNElB3zE7AjcDEw=;\n\tb=eybnqLFKf5ivc8\n\tiWKtt0c8qX9u/ZtwW1MIVuMhBuqL+Muvh3AxJ1JQhVDrXnYNnmbxrC5b4oS225D7P014qKyFo/t6s\n\t3L0eveu80GEkdZ13mrXDL6ovmSj0QbBVvtutjTLkqs+A3SMM9v5QOOBtMin+PsvxsipB2hO1FNnOn\n\tIXruZHJL7LZc7aZ8Gs7W9ibRNVZQZVeI9vSDNFiSxIPYbxHnArGhnWts4Sq3k/Q/AkGNLa21DCghl\n\tODIWVxFRGqNjAwk1pEyqf+K6BnyRL6guaoL1XRkMD46Q2lXWEzCrAKEW6lm/klngKGks9QcXesSOF\n\tAcXtaLJ6Er3L5iOGrExg==;","From":"Alexey Brodkin <Alexey.Brodkin@synopsys.com>","To":"Jose Abreu <Jose.Abreu@synopsys.com>","Subject":"Re: [PATCH] arc: Re-enable MMU upon die()","Thread-Topic":"[PATCH] arc: Re-enable MMU upon die()","Thread-Index":"AQHTIxcRECN10CdYjEedSkx+GXol1KKfyKYAgAAMuwCAAAJagA==","Date":"Fri, 1 Sep 2017 12:42:08 +0000","Message-ID":"<1504269727.15144.6.camel@synopsys.com>","References":"<d2b588da61b35312a3126b605685f22bc30fc3ae.1504265945.git.joabreu@synopsys.com>\n\t<1504266488.15144.3.camel@synopsys.com>\n\t<c6f2e929-d431-8fc3-3940-7e2aba4d00cf@synopsys.com>","In-Reply-To":"<c6f2e929-d431-8fc3-3940-7e2aba4d00cf@synopsys.com>","Accept-Language":"en-US, ru-RU","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-originating-ip":"[10.121.8.86]","Content-ID":"<D98F74A69C5C7E49AAC1A7F06A8693D6@internal.synopsys.com>","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170901_054232_572015_A6571646 ","X-CRM114-Status":"GOOD (  12.78  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [198.182.60.111 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-snps-arc@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux on Synopsys ARC Processors\n\t<linux-snps-arc.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-snps-arc/>","List-Post":"<mailto:linux-snps-arc@lists.infradead.org>","List-Help":"<mailto:linux-snps-arc-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe>","Cc":"Vineet Gupta <Vineet.Gupta1@synopsys.com>,\n\t\"linux-snps-arc@lists.infradead.org\" <linux-snps-arc@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-snps-arc\" <linux-snps-arc-bounces@lists.infradead.org>","Errors-To":"linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}},{"id":1761763,"web_url":"http://patchwork.ozlabs.org/comment/1761763/","msgid":"<07f75829-c972-0c67-7b08-b4cb5723d2c6@synopsys.com>","list_archive_url":null,"date":"2017-09-01T15:30:12","subject":"Re: [PATCH] arc: Re-enable MMU upon die()","submitter":{"id":26707,"url":"http://patchwork.ozlabs.org/api/people/26707/","name":"Vineet Gupta","email":"Vineet.Gupta1@synopsys.com"},"content":"On 09/01/2017 04:40 AM, Jose Abreu wrote:\n> I recently came upon a scenario where I would get a double fault\n> after a machine check error. It turns out that for Ksymbol lookup\n> to work with modules we need to have MMU enabled because module\n> address is mapped in the cached space.\n>\n> This patch re-enables the MMU before start printing the stacktrace\n> making stacktracing of modules work upon a fatal exception.\n>\n> Signed-off-by: Jose Abreu <joabreu@synopsys.com>\n> Cc: Vineet Gupta <vgupta@synopsys.com>\n> Cc: Alexey Brodkin <abrodkin@synopsys.com>\n> ---\n>   arch/arc/kernel/traps.c | 5 +++++\n>   1 file changed, 5 insertions(+)\n>\n> diff --git a/arch/arc/kernel/traps.c b/arch/arc/kernel/traps.c\n> index ff83e78..9533e06 100644\n> --- a/arch/arc/kernel/traps.c\n> +++ b/arch/arc/kernel/traps.c\n> @@ -19,6 +19,8 @@\n>   #include <linux/ptrace.h>\n>   #include <linux/kprobes.h>\n>   #include <linux/kgdb.h>\n> +#include <asm/arcregs.h>\n> +#include <asm/mmu.h>\n>   #include <asm/setup.h>\n>   #include <asm/unaligned.h>\n>   #include <asm/kprobes.h>\n> @@ -30,6 +32,9 @@ void __init trap_init(void)\n>   \n>   void die(const char *str, struct pt_regs *regs, unsigned long address)\n>   {\n> +\t/* MMU must be enabled for Ksymbol lookup in modules */\n> +\twrite_aux_reg(ARC_REG_PID, MMU_ENABLE | read_aux_reg(ARC_REG_PID));\n\ndie() is a *generic* API and can even be called from other places not necessarily \ncoming from machine check.\nThe problem with mmu disabling is specific to machine check for dup TLB exception \nand needs to be fixed there not in common code.\n\n-Vineet","headers":{"Return-Path":"<linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"U+972lB5\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkNVj5b0Fz9t1t\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 01:30:53 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnnuG-0008Hr-F9; Fri, 01 Sep 2017 15:30:52 +0000","from smtprelay2.synopsys.com ([198.182.60.111]\n\thelo=smtprelay.synopsys.com)\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnnuE-00086k-7Y for linux-snps-arc@lists.infradead.org;\n\tFri, 01 Sep 2017 15:30:51 +0000","from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239])\n\tby smtprelay.synopsys.com (Postfix) with ESMTP id F059110C0067\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 08:30:27 -0700 (PDT)","from mailhost.synopsys.com (localhost [127.0.0.1])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id DB3CBEE2\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 08:30:27 -0700 (PDT)","from US01WEHTC3.internal.synopsys.com\n\t(us01wehtc3.internal.synopsys.com [10.15.84.232])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id CD48DEDC\n\tfor <linux-snps-arc@lists.infradead.org>;\n\tFri,  1 Sep 2017 08:30:27 -0700 (PDT)","from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by\n\tUS01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Fri, 1 Sep 2017 08:30:23 -0700","from IN01WEHTCA.internal.synopsys.com (10.144.199.104) by\n\tIN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Fri, 1 Sep 2017 21:00:21 +0530","from [10.12.196.101] (10.12.196.101) by\n\tIN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Fri, 1 Sep 2017 21:00:20 +0530"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:\n\tReferences:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=I3D7PrSj68x+VYIO5LKWoMbSDd+n/FqDn1yhzTg7vOI=;\n\tb=U+972lB5kdKrAIjLr00jqD8WK\n\t+MRxPZs1yacez9Fxc2XrFXbvd4rafCNHz+Z2TONbTtDXgkKsLjCOlv3PhV9hX6VJteDFlD3wYN2c+\n\tnEGND2qo+5QwOECro4ysZCwCZgYarzfMnvLHb1pP3hfeYW0VuL6MrttiJ7Xw4Q1yokpiNDmQ/FlYP\n\tl6+UawAuExcOeZmiBIezKD1veDaLxMIcqVPEsgSz2VjNGZ18P7trLjvngMmY9xaowj1XXN3spwiTe\n\t1T1tNgvqfktNSOjyvY2FF1Z6iQMTfjOMXVIye41HjfGl9CUrgXl9HkqQKftx9bxpswiFYNY/0Vjk7\n\t46zK2umeA==;","Subject":"Re: [PATCH] arc: Re-enable MMU upon die()","To":"Jose Abreu <Jose.Abreu@synopsys.com>,\n\t\"linux-snps-arc@lists.infradead.org\" <linux-snps-arc@lists.infradead.org>","References":"<d2b588da61b35312a3126b605685f22bc30fc3ae.1504265945.git.joabreu@synopsys.com>","From":"Vineet Gupta <Vineet.Gupta1@synopsys.com>","Message-ID":"<07f75829-c972-0c67-7b08-b4cb5723d2c6@synopsys.com>","Date":"Fri, 1 Sep 2017 08:30:12 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<d2b588da61b35312a3126b605685f22bc30fc3ae.1504265945.git.joabreu@synopsys.com>","Content-Language":"en-US","X-Originating-IP":"[10.12.196.101]","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170901_083050_288351_591A4E12 ","X-CRM114-Status":"GOOD (  11.34  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [198.182.60.111 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-snps-arc@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux on Synopsys ARC Processors\n\t<linux-snps-arc.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-snps-arc/>","List-Post":"<mailto:linux-snps-arc@lists.infradead.org>","List-Help":"<mailto:linux-snps-arc-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe>","Cc":"Alexey Brodkin <Alexey.Brodkin@synopsys.com>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"\"linux-snps-arc\" <linux-snps-arc-bounces@lists.infradead.org>","Errors-To":"linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}}]