[{"id":1758656,"web_url":"http://patchwork.ozlabs.org/comment/1758656/","msgid":"<20170828155135.GF10418@lunn.ch>","list_archive_url":null,"date":"2017-08-28T15:51:35","subject":"Re: [RFC] ARM: Orion: Check DRAM window size","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"On Mon, Aug 28, 2017 at 05:30:39PM +0200, Jan Luebbe wrote:\n> This is a corresponding change as \"PCI: mvebu: Check DRAM window size\" applied\n> to the Orion PCIe driver. I don't have the relevant hardware myself, but the\n> patch may still be useful for someone who has. This is completely untested.\n\nHi Jan\n\nI've never seen one of these boards have more than 512M bytes of RAM.\nSo it is probably a non-issue.\n\n   Andrew","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=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=\"CHQpQNAw\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"3aSTCwHv\"; dkim-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 3xgx966jzxz9sNn\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 01:52:10 +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 1dmMKd-00016C-AL; Mon, 28 Aug 2017 15:52:07 +0000","from merlin.infradead.org ([2001:8b0:10b:1231::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dmMKa-00015u-KQ for linux-arm-kernel@bombadil.infradead.org;\n\tMon, 28 Aug 2017 15:52:04 +0000","from vps0.lunn.ch ([178.209.37.122])\n\tby merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dmMKX-0006vU-TC for linux-arm-kernel@lists.infradead.org;\n\tMon, 28 Aug 2017 15:52:02 +0000","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1dmMK7-0001II-7U; Mon, 28 Aug 2017 17:51:35 +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:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=38rNgtlC21KMqxJZDQFNOP7SVPjjhH9qPxuXZpSemLg=;\n\tb=CHQpQNAwlY5RJJ\n\tx6zHOy+xV1iHx2vit4pavN2fFRbd2Py0y9e7BI6Zqir++ByfWnSqE0KHuvheuw2K0RNUYyIEUFjAi\n\tErgurRn7TjOMxdtZf5VpSD5Wekj1mFEkT4OvqA084KLFFqfWm5GzyfboPuLWpWDoZUOxYrU+MoDzT\n\tWATVXSaYtpZN5FKWzj7jKo21wlbYM1KH45AQMeVD8QDiRm5Qi3H+f03u7uU7QPj0j10XZlZKT9u13\n\t7WVHMzKN+lO201ReL0tzuKCpdoB/3rmQknf6a6m1J+MJsuPWAWWddml372/bJ77RCja7ifTSqf3Ab\n\tik/xkJCeGoNDQQ5JFjoA==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=merlin.20170209;\n\th=In-Reply-To:Content-Type:MIME-Version:\n\tReferences:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=3JQym+J7Je9sEy8soraGxc7djh62Zhiwy5lONOGzjs4=;\n\tb=3aSTCwHvAMHP5y3pfcWNdcvM5\n\ty7upWsFxHXDiqxzgVaG5Ugyo/XFc+c1pqFaJzA5/+Sp84P9FXuqZ73TlKqotyBD9D6Qm4OU16dlx7\n\tXblSrw6WF+EWEDiYoarUfdcOeVCLYkG00y2tNB3CNt/krxE276d3I00TIbPCVACagnKmhRZ5i5Rd2\n\tXckG9ZlxQHwwwthKHynJwZb+37NXD9mXpx+U1qFJswmBD8EBHIOVcRZx/Zb9GU3VlclX19jemPm+U\n\trgegEi1YwBNO+eaCem9TdBe7h1S5pEF3Y+WT5NuyO4BdzvOW3A40JQwQq+hAsUGEXBTYE5WzF1Q2c\n\teo2HKn5iw==;"],"Date":"Mon, 28 Aug 2017 17:51:35 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Jan Luebbe <jlu@pengutronix.de>","Subject":"Re: [RFC] ARM: Orion: Check DRAM window size","Message-ID":"<20170828155135.GF10418@lunn.ch>","References":"<20170828152517.24506-1-jlu@pengutronix.de>\n\t<20170828153039.27088-1-jlu@pengutronix.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170828153039.27088-1-jlu@pengutronix.de>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-Spam-Note":"CRM114 invocation failed","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on merlin.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tJason Cooper <jason@lakedaemon.net>, linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, kernel@pengutronix.de,\n\tGregory Clement <gregory.clement@free-electrons.com>,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1760447,"web_url":"http://patchwork.ozlabs.org/comment/1760447/","msgid":"<20170830200700.GX8154@bhelgaas-glaptop.roam.corp.google.com>","list_archive_url":null,"date":"2017-08-30T20:07:00","subject":"Re: [PATCH 0/2] fix 4GB DRAM window support on mvebu","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Mon, Aug 28, 2017 at 05:25:15PM +0200, Jan Luebbe wrote:\n> The current MBUS DRAM window calculation fails for 4GB windows because it\n> overflows. This is fixed in the first patch by using u64 instead of u32 to\n> store the size. The second excplicitly checks that we don't try to configure a\n> too large memory window in the pci driver.\n> \n> As they don't depend on each other, they could also go in separatly.\n> \n> Jan Luebbe (2):\n>   bus: mbus: fix window size calculation for 4GB windows\n>   PCI: mvebu: Check DRAM window size\n> \n>  drivers/bus/mvebu-mbus.c     |  2 +-\n>  drivers/pci/host/pci-mvebu.c | 27 ++++++++++++++++++++++-----\n>  include/linux/mbus.h         |  4 ++--\n>  3 files changed, 25 insertions(+), 8 deletions(-)\n\nSince these can be applied separately, I'll let somebody else take care of\nthe drivers/bus/mvebu-mbus.c part.\n\nI'll look for an ack from Thomas or Jason before applying the second patch,\nwhich touches drivers/pci/host/pci-mvebu.c.","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=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\n\theader.b=\"CDrPBGqM\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=helgaas@kernel.org"],"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 3xjGkn2mKrz9rxm\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 06:07:29 +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 1dn9Gn-0001JS-Gb; Wed, 30 Aug 2017 20:07:25 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dn9Gk-0001Hf-E5 for linux-arm-kernel@lists.infradead.org;\n\tWed, 30 Aug 2017 20:07:23 +0000","from localhost (unknown [69.55.156.165])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 8394D2199E;\n\tWed, 30 Aug 2017 20:07:01 +0000 (UTC)"],"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:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=cjOpKWkiIZ+XLieSjn+raXukbPwY9fGgNtg3Y/7mj7g=;\n\tb=CDrPBGqM7tYIkP\n\tQFX9Ge7v4ydpC1Wn3lb4tCP9+cj0eexfOi2aKzDyZmhmB+h7grs2Izm5xqiJXgh7eqPk+jNELWPfn\n\tRSs62rKm6lRyluj4sky9BXX/JAOHp9z0370L+K26WMXTPlHVFc+Y5fOBiaVcB3U6GLhjXn0JmMs1/\n\tXbDgGdAHSuoaX6ITDipxPK2m29nf4gCyp8mEbVXjVsuZXe8yRjc1i22jefK2BiCuWihBXIVsd4nEX\n\tXrYk8H8Y4KPrFujSwCS4jhGjaLAtflVWZK+no1XlJ2mQcGbTxc7Uu7O41DnZM51x2yntu6+yfQ1t4\n\tIvriksOL2VGeFS5efOSQ==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org 8394D2199E","Date":"Wed, 30 Aug 2017 15:07:00 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Jan Luebbe <jlu@pengutronix.de>","Subject":"Re: [PATCH 0/2] fix 4GB DRAM window support on mvebu","Message-ID":"<20170830200700.GX8154@bhelgaas-glaptop.roam.corp.google.com>","References":"<20170828152517.24506-1-jlu@pengutronix.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170828152517.24506-1-jlu@pengutronix.de>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170830_130722_506807_34BAE823 ","X-CRM114-Status":"GOOD (  12.73  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 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-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tAndrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tkernel@pengutronix.de, \n\tGregory Clement <gregory.clement@free-electrons.com>,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1760730,"web_url":"http://patchwork.ozlabs.org/comment/1760730/","msgid":"<87y3q017ih.fsf@free-electrons.com>","list_archive_url":null,"date":"2017-08-31T08:11:34","subject":"Re: [PATCH 0/2] fix 4GB DRAM window support on mvebu","submitter":{"id":15771,"url":"http://patchwork.ozlabs.org/api/people/15771/","name":"Gregory CLEMENT","email":"gregory.clement@free-electrons.com"},"content":"Hi Bjorn and Jan,\n \n On mer., août 30 2017, Bjorn Helgaas <helgaas@kernel.org> wrote:\n\n> On Mon, Aug 28, 2017 at 05:25:15PM +0200, Jan Luebbe wrote:\n>> The current MBUS DRAM window calculation fails for 4GB windows because it\n>> overflows. This is fixed in the first patch by using u64 instead of u32 to\n>> store the size. The second excplicitly checks that we don't try to configure a\n>> too large memory window in the pci driver.\n>> \n>> As they don't depend on each other, they could also go in separatly.\n>> \n>> Jan Luebbe (2):\n>>   bus: mbus: fix window size calculation for 4GB windows\n>>   PCI: mvebu: Check DRAM window size\n>> \n>>  drivers/bus/mvebu-mbus.c     |  2 +-\n>>  drivers/pci/host/pci-mvebu.c | 27 ++++++++++++++++++++++-----\n>>  include/linux/mbus.h         |  4 ++--\n>>  3 files changed, 25 insertions(+), 8 deletions(-)\n>\n> Since these can be applied separately, I'll let somebody else take care of\n> the drivers/bus/mvebu-mbus.c part.\n\nI think I am the one who should take it. I will apply it when v4.14-rc1\nwill be released as it is too late for me for 4.14 now.\n\nHowever I am not against the fact that it is applied through an other\ntree because we don't touch this file for the next release so there is\nno risk for a conflict, I can give my Acked-by if needed.\n\nThanks,\n\nGregory\n\n>\n> I'll look for an ack from Thomas or Jason before applying the second patch,\n> which touches drivers/pci/host/pci-mvebu.c.","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=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\n\theader.b=\"ScqO2/BN\"; dkim-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 3xjZqC0k65z9sRW\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 18:12:23 +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 1dnKaA-0002c5-L6; Thu, 31 Aug 2017 08:12:10 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dnKa7-0002Zz-6T for linux-arm-kernel@lists.infradead.org;\n\tThu, 31 Aug 2017 08:12:09 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 2255D209BF; Thu, 31 Aug 2017 10:11:44 +0200 (CEST)","from localhost (unknown [93.29.146.83])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id E6FAA209B2;\n\tThu, 31 Aug 2017 10:11:33 +0200 (CEST)"],"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:Message-ID:In-Reply-To:\n\tDate:References:Subject:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=C0qsZbMoWhOLKiU3czwZt61938Qxgzje+GtsRlfOQz4=;\n\tb=ScqO2/BN1FsJCm\n\t65NOxI5uHxxntNeuVytkFsyCWHwfnMNSb8K4CiHCS3wpiVewWZE7A5FcChlUJSLW+eELmm1dMpfOv\n\tVoGfeb8cQPUAEjuij5oI3srchQTOlZlaMhJ/rrnv3gzOywz0aCySvlnsqbkkW4IXRl7P7/tIOv1oS\n\tX60AwEfZqf13pNf93tIy4Z9KNYFAU6UUk6bOy7dVYXYcE3kZH3IKy7fLX4WKNBFfylZDX5PlID/Lm\n\t0iftJMlNnAEq+V4DNqQKsea+lt9P+7OrQ392Bu92bJQx1XW6lRyQ3F2zrbSQK19BW+IteAEKhpMB7\n\t8EIs31QkwwzjhQMwwi+Q==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","From":"Gregory CLEMENT <gregory.clement@free-electrons.com>","To":"Jan Luebbe <jlu@pengutronix.de>, Bjorn Helgaas <helgaas@kernel.org>","Subject":"Re: [PATCH 0/2] fix 4GB DRAM window support on mvebu","References":"<20170828152517.24506-1-jlu@pengutronix.de>\n\t<20170830200700.GX8154@bhelgaas-glaptop.roam.corp.google.com>","Date":"Thu, 31 Aug 2017 10:11:34 +0200","In-Reply-To":"<20170830200700.GX8154@bhelgaas-glaptop.roam.corp.google.com>\n\t(Bjorn Helgaas's message of \"Wed, 30 Aug 2017 15:07:00 -0500\")","Message-ID":"<87y3q017ih.fsf@free-electrons.com>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170831_011207_387103_93E3A625 ","X-CRM114-Status":"GOOD (  15.85  )","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 SPF_PASS               SPF: sender matches SPF record\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-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tAndrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tkernel@pengutronix.de, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1771098,"web_url":"http://patchwork.ozlabs.org/comment/1771098/","msgid":"<87wp4urbp5.fsf@free-electrons.com>","list_archive_url":null,"date":"2017-09-19T14:43:18","subject":"Re: [PATCH 1/2] bus: mbus: fix window size calculation for 4GB\n\twindows","submitter":{"id":15771,"url":"http://patchwork.ozlabs.org/api/people/15771/","name":"Gregory CLEMENT","email":"gregory.clement@free-electrons.com"},"content":"Hi Jan,\n \n On lun., août 28 2017, Jan Luebbe <jlu@pengutronix.de> wrote:\n\n> At least the Armada XP SoC supports 4GB on a single DRAM window. Because\n> the size register values contain the actual size - 1, the MSB is set in\n> that case. For example, the SDRAM window's control register's value is\n> 0xffffffe1 for 4GB (bits 31 to 24 contain the size).\n>\n> The MBUS driver reads back each window's size from registers and\n> calculates the actual size as (control_reg | ~DDR_SIZE_MASK) + 1, which\n> overflows for 32 bit values, resulting in other miscalculations further\n> on (a bad RAM window for the CESA crypto engine calculated by\n> mvebu_mbus_setup_cpu_target_nooverlap() in my case).\n>\n> This patch changes the type in 'struct mbus_dram_window' from u32 to\n> u64, which allows us to keep using the same register calculation code in\n> most MBUS-using drivers (which calculate ->size - 1 again).\n>\n\nYour patch looks good, but as it is a fix we should also apply it on\nstable, could you provide the commit to fix?\n\nThanks,\n\nGregory\n\n> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>\n> ---\n>  drivers/bus/mvebu-mbus.c | 2 +-\n>  include/linux/mbus.h     | 4 ++--\n>  2 files changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c\n> index c7f396903184..70db4d5638a6 100644\n> --- a/drivers/bus/mvebu-mbus.c\n> +++ b/drivers/bus/mvebu-mbus.c\n> @@ -720,7 +720,7 @@ mvebu_mbus_default_setup_cpu_target(struct mvebu_mbus_state *mbus)\n>  \t\t\tif (mbus->hw_io_coherency)\n>  \t\t\t\tw->mbus_attr |= ATTR_HW_COHERENCY;\n>  \t\t\tw->base = base & DDR_BASE_CS_LOW_MASK;\n> -\t\t\tw->size = (size | ~DDR_SIZE_MASK) + 1;\n> +\t\t\tw->size = (u64)(size | ~DDR_SIZE_MASK) + 1;\n>  \t\t}\n>  \t}\n>  \tmvebu_mbus_dram_info.num_cs = cs;\n> diff --git a/include/linux/mbus.h b/include/linux/mbus.h\n> index 0d3f14fd2621..4773145246ed 100644\n> --- a/include/linux/mbus.h\n> +++ b/include/linux/mbus.h\n> @@ -31,8 +31,8 @@ struct mbus_dram_target_info\n>  \tstruct mbus_dram_window {\n>  \t\tu8\tcs_index;\n>  \t\tu8\tmbus_attr;\n> -\t\tu32\tbase;\n> -\t\tu32\tsize;\n> +\t\tu64\tbase;\n> +\t\tu64\tsize;\n>  \t} cs[4];\n>  };\n>  \n> -- \n> 2.11.0\n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=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\n\theader.b=\"azZfQ/4G\"; dkim-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 3xxQc51NyTz9s7m\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 00:43:49 +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 1duJkX-0000wc-2z; Tue, 19 Sep 2017 14:43:45 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1duJkQ-0000rW-Ts for linux-arm-kernel@lists.infradead.org;\n\tTue, 19 Sep 2017 14:43:41 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid D10D420987; Tue, 19 Sep 2017 16:43:17 +0200 (CEST)","from localhost (242.171.71.37.rev.sfr.net [37.71.171.242])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id A7088208C1;\n\tTue, 19 Sep 2017 16:43:17 +0200 (CEST)"],"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:Message-ID:In-Reply-To:\n\tDate:References:Subject:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=QUlcoMzluHKjdU13DRcJ+aofujeb3pUDwQJaCrNjSBY=;\n\tb=azZfQ/4GSf3SFA\n\tzL4r42KmWtacVsL2Nxc/Fq3brR4+b3RHFW0KOthsrjex5XWZGCVAhoOBgob0RNFM8YvZTNAbdLy1D\n\tFNnjBeaJhv9qk2VdUZEo2LJIoaICLDBI0+dJe8A8w8boku1LQShdr1Focsmpns2gC3qmjGCQ17ny4\n\trTrIO4OoyZf0wyXhd/jYLifKVqqs15FJg1lSt0Drz5XQ/0pLtpijXhoeKs1AJFs4saGpQ99mKVQzv\n\t598Vqfukn5LLgI4V5sAKcxHx6viUx1aWxhanlRpNjFItPODfL603imqZgYpNXnCkIBEQG2PUlaiP9\n\tRSQhlxJBPE+IxPKWaeWQ==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","From":"Gregory CLEMENT <gregory.clement@free-electrons.com>","To":"Jan Luebbe <jlu@pengutronix.de>","Subject":"Re: [PATCH 1/2] bus: mbus: fix window size calculation for 4GB\n\twindows","References":"<20170828152517.24506-1-jlu@pengutronix.de>\n\t<20170828152517.24506-2-jlu@pengutronix.de>","Date":"Tue, 19 Sep 2017 16:43:18 +0200","In-Reply-To":"<20170828152517.24506-2-jlu@pengutronix.de> (Jan Luebbe's\n\tmessage of \"Mon, 28 Aug 2017 17:25:16 +0200\")","Message-ID":"<87wp4urbp5.fsf@free-electrons.com>","User-Agent":"Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170919_074339_247496_7D899232 ","X-CRM114-Status":"GOOD (  18.92  )","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 SPF_PASS               SPF: sender matches SPF record\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-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tAndrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tkernel@pengutronix.de, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1772053,"web_url":"http://patchwork.ozlabs.org/comment/1772053/","msgid":"<20170920163716.l6kpf56ig5gfqzbi@pengutronix.de>","list_archive_url":null,"date":"2017-09-20T16:37:16","subject":"Re: [PATCH 1/2] bus: mbus: fix window size calculation for 4GB\n\twindows","submitter":{"id":1476,"url":"http://patchwork.ozlabs.org/api/people/1476/","name":"Uwe Kleine-König","email":"u.kleine-koenig@pengutronix.de"},"content":"On Tue, Sep 19, 2017 at 04:43:18PM +0200, Gregory CLEMENT wrote:\n> Hi Jan,\n>  \n>  On lun., août 28 2017, Jan Luebbe <jlu@pengutronix.de> wrote:\n> \n> > At least the Armada XP SoC supports 4GB on a single DRAM window. Because\n> > the size register values contain the actual size - 1, the MSB is set in\n> > that case. For example, the SDRAM window's control register's value is\n> > 0xffffffe1 for 4GB (bits 31 to 24 contain the size).\n> >\n> > The MBUS driver reads back each window's size from registers and\n> > calculates the actual size as (control_reg | ~DDR_SIZE_MASK) + 1, which\n> > overflows for 32 bit values, resulting in other miscalculations further\n> > on (a bad RAM window for the CESA crypto engine calculated by\n> > mvebu_mbus_setup_cpu_target_nooverlap() in my case).\n> >\n> > This patch changes the type in 'struct mbus_dram_window' from u32 to\n> > u64, which allows us to keep using the same register calculation code in\n> > most MBUS-using drivers (which calculate ->size - 1 again).\n> >\n> \n> Your patch looks good, but as it is a fix we should also apply it on\n> stable, could you provide the commit to fix?\n\nIt was there just from the start: the .c file was introduced in\nv3.10-rc1~64^2~1^2~8^2~2 and already did that 32 bit calculus.\n\nBest regards\nUwe","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=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\n\theader.b=\"k5N5vuyU\"; dkim-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 3xy55C5bWXz9t2Q\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 02:37:51 +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 1dui0S-0006tE-1j; Wed, 20 Sep 2017 16:37:48 +0000","from metis.ext.pengutronix.de\n\t([2001:67c:670:201:290:27ff:fe1d:cc33])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dui0M-0006pD-V1 for linux-arm-kernel@lists.infradead.org;\n\tWed, 20 Sep 2017 16:37:45 +0000","from [2001:67c:670:100:5054:ff:fe2a:3aa]\n\t(helo=pty.hi.pengutronix.de)\n\tby metis.ext.pengutronix.de with esmtps\n\t(TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2)\n\t(envelope-from <ukl@pengutronix.de>)\n\tid 1duhzw-00010x-NU; Wed, 20 Sep 2017 18:37:16 +0200","from ukl by pty.hi.pengutronix.de with local (Exim 4.89)\n\t(envelope-from <ukl@pengutronix.de>)\n\tid 1duhzw-00042x-8K; Wed, 20 Sep 2017 18:37:16 +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:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=SXm2nPB76eI8wS3BwIQ5C5ezxhYr/2O5yoUM8n67q6c=;\n\tb=k5N5vuyU+93Nr5\n\tvT6mXs2PQDWD86HBvUfSWogCS4sHm7Nedwu43AYQWyJMdbLycMMo5k9CGVNpfKslaOjAD9i0PvgQY\n\tHVKz8sy23bmgDjEIihj1lpVLioYn3U6KFVHdYg2u2O6/fKwb4fx5xISSnbkUGnHWzVYroJ+GvfhUb\n\tfTzDMG+KrhO0ewSY8o8vS6iUBAZtWXSQelPHSYtiJBu8K5ZsKdbk6deZ0SllRcpHAbQUhN0ON/Cbd\n\tozGeLjnnqhkyhV7Xtus3mT644PQo+Qu+M8xeodcQEPQWF7VRC9p8CPYgYzb51VOENvqtOB6u2efp1\n\tZ0mn23X8lxefJIfVCCZw==;","Date":"Wed, 20 Sep 2017 18:37:16 +0200","From":"Uwe =?iso-8859-1?q?Kleine-K=F6nig?= <u.kleine-koenig@pengutronix.de>","To":"Gregory CLEMENT <gregory.clement@free-electrons.com>","Subject":"Re: [PATCH 1/2] bus: mbus: fix window size calculation for 4GB\n\twindows","Message-ID":"<20170920163716.l6kpf56ig5gfqzbi@pengutronix.de>","References":"<20170828152517.24506-1-jlu@pengutronix.de>\n\t<20170828152517.24506-2-jlu@pengutronix.de>\n\t<87wp4urbp5.fsf@free-electrons.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<87wp4urbp5.fsf@free-electrons.com>","User-Agent":"NeoMutt/20170113 (1.7.2)","X-SA-Exim-Connect-IP":"2001:67c:670:100:5054:ff:fe2a:3aa","X-SA-Exim-Mail-From":"ukl@pengutronix.de","X-SA-Exim-Scanned":"No (on metis.ext.pengutronix.de);\n\tSAEximRunCond expanded to false","X-PTX-Original-Recipient":"linux-arm-kernel@lists.infradead.org","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170920_093743_193825_06C78838 ","X-CRM114-Status":"GOOD (  16.75  )","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 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-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tAndrew Lunn <andrew@lunn.ch>, Jan Luebbe <jlu@pengutronix.de>,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tkernel@pengutronix.de, linux-arm-kernel@lists.infradead.org,\n\tJason Cooper <jason@lakedaemon.net>","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1775056,"web_url":"http://patchwork.ozlabs.org/comment/1775056/","msgid":"<20170925235658.GK15970@bhelgaas-glaptop.roam.corp.google.com>","list_archive_url":null,"date":"2017-09-25T23:56:58","subject":"Re: [PATCH 2/2] PCI: mvebu: Check DRAM window size","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Mon, Aug 28, 2017 at 05:25:17PM +0200, Jan Luebbe wrote:\n> The sum of the DRAM windows may exceed 4GB (at least on Armada XP).\n> Return an error in that case.\n> \n> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>\n\nLooking for an ack from Thomas or Jason before applying this...\n\n> ---\n>  drivers/pci/host/pci-mvebu.c | 27 ++++++++++++++++++++++-----\n>  1 file changed, 22 insertions(+), 5 deletions(-)\n> \n> diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c\n> index f353a6eb2f01..5d74af81d104 100644\n> --- a/drivers/pci/host/pci-mvebu.c\n> +++ b/drivers/pci/host/pci-mvebu.c\n> @@ -206,10 +206,10 @@ static void mvebu_pcie_set_local_dev_nr(struct mvebu_pcie_port *port, int nr)\n>   * BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks\n>   * WIN[0-3] -> DRAM bank[0-3]\n>   */\n> -static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n> +static int mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n>  {\n>  \tconst struct mbus_dram_target_info *dram;\n> -\tu32 size;\n> +\tu64 size;\n>  \tint i;\n>  \n>  \tdram = mv_mbus_dram_info();\n> @@ -252,19 +252,32 @@ static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n>  \tif ((size & (size - 1)) != 0)\n>  \t\tsize = 1 << fls(size);\n>  \n> +\tif (size > 0x100000000) {\n> +\t\tdev_err(&port->pcie->pdev->dev,\n> +\t\t\t\"Could not configure DRAM window (too large): 0x%llx\\n\",\n> +\t\t\tsize);\n> +\n> +\t\treturn -EINVAL;\n> +\t}\n> +\n>  \t/* Setup BAR[1] to all DRAM banks. */\n>  \tmvebu_writel(port, dram->cs[0].base, PCIE_BAR_LO_OFF(1));\n>  \tmvebu_writel(port, 0, PCIE_BAR_HI_OFF(1));\n>  \tmvebu_writel(port, ((size - 1) & 0xffff0000) | 1,\n>  \t\t     PCIE_BAR_CTRL_OFF(1));\n> +\n> +\treturn 0;\n>  }\n>  \n> -static void mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n> +static int mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n>  {\n>  \tu32 cmd, mask;\n> +\tint ret;\n>  \n>  \t/* Point PCIe unit MBUS decode windows to DRAM space. */\n> -\tmvebu_pcie_setup_wins(port);\n> +\tret = mvebu_pcie_setup_wins(port);\n> +\tif (ret)\n> +\t\treturn ret;\n>  \n>  \t/* Master + slave enable. */\n>  \tcmd = mvebu_readl(port, PCIE_CMD_OFF);\n> @@ -277,6 +290,8 @@ static void mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n>  \tmask = mvebu_readl(port, PCIE_MASK_OFF);\n>  \tmask |= PCIE_MASK_ENABLE_INTS;\n>  \tmvebu_writel(port, mask, PCIE_MASK_OFF);\n> +\n> +\treturn 0;\n>  }\n>  \n>  static int mvebu_pcie_hw_rd_conf(struct mvebu_pcie_port *port,\n> @@ -882,7 +897,9 @@ static int mvebu_pcie_setup(int nr, struct pci_sys_data *sys)\n>  \n>  \t\tif (!port->base)\n>  \t\t\tcontinue;\n> -\t\tmvebu_pcie_setup_hw(port);\n> +\t\terr = mvebu_pcie_setup_hw(port);\n> +\t\tif (err)\n> +\t\t\treturn 0;\n>  \t}\n>  \n>  \treturn 1;\n> -- \n> 2.11.0\n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=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\n\theader.b=\"hodXfL79\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=helgaas@kernel.org"],"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 3y1LcB15qnz9sRV\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 09:57:30 +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 1dwdFc-0001Tj-UD; Mon, 25 Sep 2017 23:57:24 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dwdFY-0001AR-Lw for linux-arm-kernel@lists.infradead.org;\n\tMon, 25 Sep 2017 23:57:23 +0000","from localhost (unknown [69.71.4.159])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id F351C21894;\n\tMon, 25 Sep 2017 23:56:59 +0000 (UTC)"],"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:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=hjza8yIXtYjY8ASTlypN6pYMAOiql4GPfkrQ1Dehix4=;\n\tb=hodXfL79icn6hx\n\tDTeCej6yXRQFn+8g/xwbvK8bYLyH+a3cl6cKG1jHnayAwA0lNP/DOVx5jtOOW2vAKoQWftbhYEz0S\n\tAK7fLK1QI8hIBKvO85Tz29703/ZyMSOIQKWJO3oBLTrTjDSuWnDkwIg5+wTGt5tKKCwGvWN5Qb3qS\n\tujav0lMm7+EgvJt8bSfbaUEuvyNmmeONoYkrx8cJoMBxOQqgvGDlILSwTHBLSKVONRlz2HC0fTPpX\n\tJ5YVa0UCV6fIX/xXoc09aGVhKX2TtM4snF6LDNjzknANTgOBc8P1CIAYMSivmbRva8CRInvspAiTx\n\tUmiKos1HpYdO2N46YnVw==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org F351C21894","Date":"Mon, 25 Sep 2017 18:56:58 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Jan Luebbe <jlu@pengutronix.de>","Subject":"Re: [PATCH 2/2] PCI: mvebu: Check DRAM window size","Message-ID":"<20170925235658.GK15970@bhelgaas-glaptop.roam.corp.google.com>","References":"<20170828152517.24506-1-jlu@pengutronix.de>\n\t<20170828152517.24506-3-jlu@pengutronix.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170828152517.24506-3-jlu@pengutronix.de>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170925_165720_854372_6CC9E47D ","X-CRM114-Status":"GOOD (  17.29  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 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-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tAndrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tkernel@pengutronix.de, \n\tGregory Clement <gregory.clement@free-electrons.com>,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1781030,"web_url":"http://patchwork.ozlabs.org/comment/1781030/","msgid":"<20171005211650.GZ25517@bhelgaas-glaptop.roam.corp.google.com>","list_archive_url":null,"date":"2017-10-05T21:16:50","subject":"Re: [PATCH 2/2] PCI: mvebu: Check DRAM window size","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Mon, Sep 25, 2017 at 06:56:58PM -0500, Bjorn Helgaas wrote:\n> On Mon, Aug 28, 2017 at 05:25:17PM +0200, Jan Luebbe wrote:\n> > The sum of the DRAM windows may exceed 4GB (at least on Armada XP).\n> > Return an error in that case.\n> > \n> > Signed-off-by: Jan Luebbe <jlu@pengutronix.de>\n> \n> Looking for an ack from Thomas or Jason before applying this...\n\nPing, I think I'm stil waiting for an ack for this.  Or did I miss it?\n\n> > ---\n> >  drivers/pci/host/pci-mvebu.c | 27 ++++++++++++++++++++++-----\n> >  1 file changed, 22 insertions(+), 5 deletions(-)\n> > \n> > diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c\n> > index f353a6eb2f01..5d74af81d104 100644\n> > --- a/drivers/pci/host/pci-mvebu.c\n> > +++ b/drivers/pci/host/pci-mvebu.c\n> > @@ -206,10 +206,10 @@ static void mvebu_pcie_set_local_dev_nr(struct mvebu_pcie_port *port, int nr)\n> >   * BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks\n> >   * WIN[0-3] -> DRAM bank[0-3]\n> >   */\n> > -static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n> > +static int mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n> >  {\n> >  \tconst struct mbus_dram_target_info *dram;\n> > -\tu32 size;\n> > +\tu64 size;\n> >  \tint i;\n> >  \n> >  \tdram = mv_mbus_dram_info();\n> > @@ -252,19 +252,32 @@ static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n> >  \tif ((size & (size - 1)) != 0)\n> >  \t\tsize = 1 << fls(size);\n> >  \n> > +\tif (size > 0x100000000) {\n> > +\t\tdev_err(&port->pcie->pdev->dev,\n> > +\t\t\t\"Could not configure DRAM window (too large): 0x%llx\\n\",\n> > +\t\t\tsize);\n> > +\n> > +\t\treturn -EINVAL;\n> > +\t}\n> > +\n> >  \t/* Setup BAR[1] to all DRAM banks. */\n> >  \tmvebu_writel(port, dram->cs[0].base, PCIE_BAR_LO_OFF(1));\n> >  \tmvebu_writel(port, 0, PCIE_BAR_HI_OFF(1));\n> >  \tmvebu_writel(port, ((size - 1) & 0xffff0000) | 1,\n> >  \t\t     PCIE_BAR_CTRL_OFF(1));\n> > +\n> > +\treturn 0;\n> >  }\n> >  \n> > -static void mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n> > +static int mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n> >  {\n> >  \tu32 cmd, mask;\n> > +\tint ret;\n> >  \n> >  \t/* Point PCIe unit MBUS decode windows to DRAM space. */\n> > -\tmvebu_pcie_setup_wins(port);\n> > +\tret = mvebu_pcie_setup_wins(port);\n> > +\tif (ret)\n> > +\t\treturn ret;\n> >  \n> >  \t/* Master + slave enable. */\n> >  \tcmd = mvebu_readl(port, PCIE_CMD_OFF);\n> > @@ -277,6 +290,8 @@ static void mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n> >  \tmask = mvebu_readl(port, PCIE_MASK_OFF);\n> >  \tmask |= PCIE_MASK_ENABLE_INTS;\n> >  \tmvebu_writel(port, mask, PCIE_MASK_OFF);\n> > +\n> > +\treturn 0;\n> >  }\n> >  \n> >  static int mvebu_pcie_hw_rd_conf(struct mvebu_pcie_port *port,\n> > @@ -882,7 +897,9 @@ static int mvebu_pcie_setup(int nr, struct pci_sys_data *sys)\n> >  \n> >  \t\tif (!port->base)\n> >  \t\t\tcontinue;\n> > -\t\tmvebu_pcie_setup_hw(port);\n> > +\t\terr = mvebu_pcie_setup_hw(port);\n> > +\t\tif (err)\n> > +\t\t\treturn 0;\n> >  \t}\n> >  \n> >  \treturn 1;\n> > -- \n> > 2.11.0\n> > \n> \n> _______________________________________________\n> linux-arm-kernel mailing list\n> linux-arm-kernel@lists.infradead.org\n> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=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=\"pR82xhv2\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"Sd/WFr//\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=helgaas@kernel.org"],"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 3y7QrJ1XX3z9t2f\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri,  6 Oct 2017 08:29:04 +1100 (AEDT)","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 1e0DhQ-00032r-Tp; Thu, 05 Oct 2017 21:28:56 +0000","from casper.infradead.org ([2001:8b0:10b:1236::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e0DhO-0002zk-3C for linux-arm-kernel@bombadil.infradead.org;\n\tThu, 05 Oct 2017 21:28:54 +0000","from mail.kernel.org ([198.145.29.99])\n\tby casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e0DW7-0005L7-1D for linux-arm-kernel@lists.infradead.org;\n\tThu, 05 Oct 2017 21:17:17 +0000","from localhost (unknown [64.22.228.164])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 7DE9821909;\n\tThu,  5 Oct 2017 21:16:52 +0000 (UTC)"],"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:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=nes8KfVGuidJepgYg7ZX9810gh8u5EDbupxsO+hP0lY=;\n\tb=pR82xhv2s91Lwi\n\tQGFHwU0NsASU6dNG4lR9X0gvbq7Zz7FzXMM2T8ZJHLZ+blUPVYHAgkqRgOZ1vD0qh7wCII5nAfnBk\n\tQ9uqNgvxbU9w+csBbwltGw5+n31M8ck4TDZ7uFn+YPdcX15L1GeUC5gif07G/uTZwzs4xdqElRorL\n\tQqvW9rKeySqxRXhhUQPrpbxE1z+T59UuO+JzfKYDsLBLLGX5ZfCJF4B1dUOVCmhTvrxGtdyVpUfW/\n\twOMyTKd2qSLpyvRPrNJReAGs/vAZrTqAVHMJdxffZN1Fal/DZ/IQJb9p7hfMavF/bZABdj+LMuy6Q\n\tsOICvlpDZ3VYntRsb1Lg==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=casper.20170209;\n\th=In-Reply-To:Content-Type:MIME-Version:\n\tReferences:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=FJBGu4t6gHNx0z9iYd08kCDDFOxGeUUL+GnGOjUNVho=;\n\tb=Sd/WFr//GF8WMMTaFgnbuAaAP\n\taOEy3LtPjpIFQj81Tj94cDqtjyoAM9yl/KYgY3H/przVHVfzW77DO4RDexAqTF0UTeyCoYOLzEg5I\n\tJcEOkWTH2hToUhmLQZMsVSFVA8/4TW9BcaD1FbUCzwNQ3uO6+VQRPWtU2DQ4HbEq8JOSDvc3yBs0A\n\tryo3Whclcd74mGZYV9CoLJiRgheI+8WLHHK8lBDpRlZwszkxn5J1PSk3lLuvMiGQwEJkp4GbifMhD\n\tePkOIYvh/N5cXWPsciEWTwS3YJO9BMGqMO7Bdohq/phM2w5rEOvJHaDZBoBD9Kg3EpznhWPqOuWSq\n\tE5KOilEyw==;"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org 7DE9821909","Date":"Thu, 5 Oct 2017 16:16:50 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Jan Luebbe <jlu@pengutronix.de>","Subject":"Re: [PATCH 2/2] PCI: mvebu: Check DRAM window size","Message-ID":"<20171005211650.GZ25517@bhelgaas-glaptop.roam.corp.google.com>","References":"<20170828152517.24506-1-jlu@pengutronix.de>\n\t<20170828152517.24506-3-jlu@pengutronix.de>\n\t<20170925235658.GK15970@bhelgaas-glaptop.roam.corp.google.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170925235658.GK15970@bhelgaas-glaptop.roam.corp.google.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171005_221715_387649_7AF3BDB0 ","X-CRM114-Status":"GOOD (  25.00  )","X-Spam-Score":"-5.4 (-----)","X-Spam-Report":"SpamAssassin version 3.4.1 on casper.infradead.org summary:\n\tContent analysis details:   (-5.4 points, 5.0 required)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server\n\t[64.22.228.164 listed in dnsbl.sorbs.net]\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 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-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tAndrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tkernel@pengutronix.de, \n\tGregory Clement <gregory.clement@free-electrons.com>,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1799931,"web_url":"http://patchwork.ozlabs.org/comment/1799931/","msgid":"<20171106191749.GC31930@bhelgaas-glaptop.roam.corp.google.com>","list_archive_url":null,"date":"2017-11-06T19:17:49","subject":"Re: [PATCH 2/2] PCI: mvebu: Check DRAM window size","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Thu, Oct 05, 2017 at 04:16:50PM -0500, Bjorn Helgaas wrote:\n> On Mon, Sep 25, 2017 at 06:56:58PM -0500, Bjorn Helgaas wrote:\n> > On Mon, Aug 28, 2017 at 05:25:17PM +0200, Jan Luebbe wrote:\n> > > The sum of the DRAM windows may exceed 4GB (at least on Armada XP).\n> > > Return an error in that case.\n> > > \n> > > Signed-off-by: Jan Luebbe <jlu@pengutronix.de>\n> > \n> > Looking for an ack from Thomas or Jason before applying this...\n> \n> Ping, I think I'm stil waiting for an ack for this.  Or did I miss it?\n\nI'm dropping this.  Please repost it with the appropriate acks if it's\nstill needed.\n\n> > > ---\n> > >  drivers/pci/host/pci-mvebu.c | 27 ++++++++++++++++++++++-----\n> > >  1 file changed, 22 insertions(+), 5 deletions(-)\n> > > \n> > > diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c\n> > > index f353a6eb2f01..5d74af81d104 100644\n> > > --- a/drivers/pci/host/pci-mvebu.c\n> > > +++ b/drivers/pci/host/pci-mvebu.c\n> > > @@ -206,10 +206,10 @@ static void mvebu_pcie_set_local_dev_nr(struct mvebu_pcie_port *port, int nr)\n> > >   * BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks\n> > >   * WIN[0-3] -> DRAM bank[0-3]\n> > >   */\n> > > -static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n> > > +static int mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n> > >  {\n> > >  \tconst struct mbus_dram_target_info *dram;\n> > > -\tu32 size;\n> > > +\tu64 size;\n> > >  \tint i;\n> > >  \n> > >  \tdram = mv_mbus_dram_info();\n> > > @@ -252,19 +252,32 @@ static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)\n> > >  \tif ((size & (size - 1)) != 0)\n> > >  \t\tsize = 1 << fls(size);\n> > >  \n> > > +\tif (size > 0x100000000) {\n> > > +\t\tdev_err(&port->pcie->pdev->dev,\n> > > +\t\t\t\"Could not configure DRAM window (too large): 0x%llx\\n\",\n> > > +\t\t\tsize);\n> > > +\n> > > +\t\treturn -EINVAL;\n> > > +\t}\n> > > +\n> > >  \t/* Setup BAR[1] to all DRAM banks. */\n> > >  \tmvebu_writel(port, dram->cs[0].base, PCIE_BAR_LO_OFF(1));\n> > >  \tmvebu_writel(port, 0, PCIE_BAR_HI_OFF(1));\n> > >  \tmvebu_writel(port, ((size - 1) & 0xffff0000) | 1,\n> > >  \t\t     PCIE_BAR_CTRL_OFF(1));\n> > > +\n> > > +\treturn 0;\n> > >  }\n> > >  \n> > > -static void mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n> > > +static int mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n> > >  {\n> > >  \tu32 cmd, mask;\n> > > +\tint ret;\n> > >  \n> > >  \t/* Point PCIe unit MBUS decode windows to DRAM space. */\n> > > -\tmvebu_pcie_setup_wins(port);\n> > > +\tret = mvebu_pcie_setup_wins(port);\n> > > +\tif (ret)\n> > > +\t\treturn ret;\n> > >  \n> > >  \t/* Master + slave enable. */\n> > >  \tcmd = mvebu_readl(port, PCIE_CMD_OFF);\n> > > @@ -277,6 +290,8 @@ static void mvebu_pcie_setup_hw(struct mvebu_pcie_port *port)\n> > >  \tmask = mvebu_readl(port, PCIE_MASK_OFF);\n> > >  \tmask |= PCIE_MASK_ENABLE_INTS;\n> > >  \tmvebu_writel(port, mask, PCIE_MASK_OFF);\n> > > +\n> > > +\treturn 0;\n> > >  }\n> > >  \n> > >  static int mvebu_pcie_hw_rd_conf(struct mvebu_pcie_port *port,\n> > > @@ -882,7 +897,9 @@ static int mvebu_pcie_setup(int nr, struct pci_sys_data *sys)\n> > >  \n> > >  \t\tif (!port->base)\n> > >  \t\t\tcontinue;\n> > > -\t\tmvebu_pcie_setup_hw(port);\n> > > +\t\terr = mvebu_pcie_setup_hw(port);\n> > > +\t\tif (err)\n> > > +\t\t\treturn 0;\n> > >  \t}\n> > >  \n> > >  \treturn 1;\n> > > -- \n> > > 2.11.0\n> > > \n> > \n> > _______________________________________________\n> > linux-arm-kernel mailing list\n> > linux-arm-kernel@lists.infradead.org\n> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=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\n\theader.b=\"MeW/Tcd+\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=helgaas@kernel.org"],"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 3yW2Tq3Ytcz9s7g\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  7 Nov 2017 06:21:03 +1100 (AEDT)","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 1eBmx7-00034x-UE; Mon, 06 Nov 2017 19:20:57 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1eBmuS-0001UD-Gr for linux-arm-kernel@lists.infradead.org;\n\tMon, 06 Nov 2017 19:18:14 +0000","from localhost (unknown [69.55.156.246])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 21F41218B4;\n\tMon,  6 Nov 2017 19:17:51 +0000 (UTC)"],"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:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=wJdv6APG6LaRZb8GsH7UE6WrrtUapm8rmPxP9Y5tRYQ=;\n\tb=MeW/Tcd+ge9mfy\n\tXLdlAHLD6njqntXjJJoMUL33OlvoV/h4PYRWwyuWU29fQCrIz+td8drsOqngcWawCVxjQRYNwTIxB\n\t8uokDGDLw2WHZ9qyPaLczgX2XkGZb9GV0E6kfX7BYDUDaT1xQXyE3pPp0gYwPPVFjJ6r3+3NuPwe/\n\tQntmlG1MevdohA1PsNeIbdweSSeH3aEwN2oV/HkXlIq38EbxO8kUqi1VUKLTJTzkpBjxj9z/Fk+GH\n\trb693vh9nlc6XoxGMrBnTwYEL7PL9ej6qh56eoTfu5QP6hJIaPee0PX/xmFwr3kLg9XgQwr8Cy2zN\n\tGeyLBh5BReV64JzYegKQ==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org 21F41218B4","Date":"Mon, 6 Nov 2017 13:17:49 -0600","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Jan Luebbe <jlu@pengutronix.de>","Subject":"Re: [PATCH 2/2] PCI: mvebu: Check DRAM window size","Message-ID":"<20171106191749.GC31930@bhelgaas-glaptop.roam.corp.google.com>","References":"<20170828152517.24506-1-jlu@pengutronix.de>\n\t<20170828152517.24506-3-jlu@pengutronix.de>\n\t<20170925235658.GK15970@bhelgaas-glaptop.roam.corp.google.com>\n\t<20171005211650.GZ25517@bhelgaas-glaptop.roam.corp.google.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20171005211650.GZ25517@bhelgaas-glaptop.roam.corp.google.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171106_111812_613697_AA15BE5E ","X-CRM114-Status":"GOOD (  20.56  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 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-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tAndrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tkernel@pengutronix.de, \n\tGregory Clement <gregory.clement@free-electrons.com>,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}}]