Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp732937imm; Thu, 13 Sep 2018 07:00:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZzjdstjYFmT9W3UOXxPjY3vyAVrc4JXJczk2kkM+sOX57xp3xz8EchHAfqmyElmkgOeF8z X-Received: by 2002:a62:f208:: with SMTP id m8-v6mr7614103pfh.222.1536847220275; Thu, 13 Sep 2018 07:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847220; cv=none; d=google.com; s=arc-20160816; b=FTD11UP36aVu5IHhSGqTYrGf05FLBEQ/v76yOtshvV1SJFM2g0/Bq2N6u6C9WB7JL3 iDvWW1/5KyJCm8C80nm5WD8m4WgPTOhkUxMD4RSxbguvaWcktmWfPm0pc7uERwkpjONV kfd9aN1LjusdQWIMxG0h0tguXzpa1Cx0Z9dPeH6og99aqlKuSugi4r+LnZfq20anvYEa WWAc3OTAQVkg/3q/WNZf0/PiGl3RGf/qjh0e1wKgZJAYUBuPoPgojbh3pzGIFlygDwEU OMnNUZBF3K7iUjABt5xwxfZ6GqePSkrXzBl2d+ZEQ4X0GkHiitIhob/c7jRvEPlglI5y EeRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=NBaj7bTS5A3dVl7L6kdaZxf/nhlRrorhMUkKQHxSV5A=; b=IOqmV09UVI0kY5GLGrIfehZlAOlhTSfQEDQhw4PLbA4AiMyxk2Jk9jdRQqvZVHPlN4 qurkhhNgtxS7Gg/e+9VkTmWXh8e8rEFwDUqHJCV6v7E0iqo1Z/c+wyB0nW4ZVHq0UkJ+ JijHGxq/UUhDNObt/jh6d2+eO8EVNAStiyCVl8qATFg2fzbUcaGd6zVq0YtchFoIBLfu qeaawv0P773ytuntqLZ4N5keP7Nof/BkpK2IQ8m+QIw5qA+fqrd5XSCCTT4RFjoPlKZG Y+ndSkvuzBRqPvvzXAA68nvZU6DbUtTXdxuJeljR72Gubx7I8totKjcaaUL2mpvko2A/ XFoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si3969913pld.429.2018.09.13.07.00.04; Thu, 13 Sep 2018 07:00:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731759AbeIMTJd (ORCPT + 99 others); Thu, 13 Sep 2018 15:09:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34894 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730617AbeIMTJd (ORCPT ); Thu, 13 Sep 2018 15:09:33 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 910B2D15; Thu, 13 Sep 2018 13:59:55 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Petazzoni , Lorenzo Pieralisi , Sasha Levin Subject: [PATCH 4.18 111/197] PCI: mvebu: Fix I/O space end address calculation Date: Thu, 13 Sep 2018 15:31:00 +0200 Message-Id: <20180913131845.988565117@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Petazzoni [ Upstream commit dfd0309fd7b30a5baffaf47b2fccb88b46d64d69 ] pcie->realio.end should be the address of last byte of the area, therefore using resource_size() of another resource is not correct, we must substract 1 to get the address of the last byte. Fixes: 11be65472a427 ("PCI: mvebu: Adapt to the new device tree layout") Signed-off-by: Thomas Petazzoni Signed-off-by: Lorenzo Pieralisi Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/pci/controller/pci-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -1219,7 +1219,7 @@ static int mvebu_pcie_probe(struct platf pcie->realio.start = PCIBIOS_MIN_IO; pcie->realio.end = min_t(resource_size_t, IO_SPACE_LIMIT, - resource_size(&pcie->io)); + resource_size(&pcie->io) - 1); } else pcie->realio = pcie->io;