Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp717051imm; Thu, 13 Sep 2018 06:45:38 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdaa1JIPYiK1tD5DXbQkEQvQmznl3TR54gJ0EPgioPdzdyYmyxzQ1fB+2Q04ALEG67gPUiea X-Received: by 2002:a17:902:8a90:: with SMTP id p16-v6mr7544049plo.106.1536846338666; Thu, 13 Sep 2018 06:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536846338; cv=none; d=google.com; s=arc-20160816; b=lqjV/TvXD20U9V6NejeM5NG0rHZ9VHIU3m8Gce5PByGCd7o0cg2lPqMu/pIV0xgKnk erPFSn4/W1ZjmGsP8B3VKi7DAH9kgBJHhbOT5n31SN+SqHKpmxtngjk7eIPEesaLAboM f/KsJAwiLZyOmVtm3/ejarzDkhfTK4rTNg2Hc8ZLVcd7IFHjaUg41hZ1XbB8Ne8M3zhs 5ptpXm7u+Z3ZimvEcxBeWI6zWPuEulJkN/uRoYOyA7dcXOhM57OD3XChfYzEE+xVk+9Z 6dcxoILJcHAiLQEfggyX0bwuBeicSaKhPv0XAItUT+tn43OS4dvGe+cfdPRbjoWvlhGC 65EQ== 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=GUNYLZdklU/opoJl5pTiunQvZPW+9L0YXvtfF4swBmM=; b=utNmxv+BEZEeJbQoRorfz2sAVRQU95Ahlcb/v+UmawtUEaiOQQ2oH9O+mU+S4MqBxc E44VSgjZrnQl/qbLcRAzliChRQeB5HGgeDcGGOauXSGcsdpJ8liVwpl/iGIKgbJwEAaf K0YXML/pui50XAmX2YQ7CpJkAI8PE87k2GIwcmOYwzYRrkfVWsGXJMUK56e9wwwVGrRp U3ChknlHTgXYlOHR+Bksei0AW4fVtkD29oxoLrXehLhh2jAAiOCdKTwhlSvPb7fKPbey 57+wGzIe1Cuyxqkd+TcGqUxy5kQsqCMkuRfdz6NwQuEJRMnQvLeKOSn2qjPUtdUf6301 ROZQ== 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 g2-v6si4207514plq.242.2018.09.13.06.45.23; Thu, 13 Sep 2018 06:45:38 -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 S1730138AbeIMSyt (ORCPT + 99 others); Thu, 13 Sep 2018 14:54:49 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60686 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728549AbeIMSyt (ORCPT ); Thu, 13 Sep 2018 14:54:49 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8EE80D10; Thu, 13 Sep 2018 13:45:16 +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.14 064/115] PCI: mvebu: Fix I/O space end address calculation Date: Thu, 13 Sep 2018 15:31:24 +0200 Message-Id: <20180913131827.637537775@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131823.327472833@linuxfoundation.org> References: <20180913131823.327472833@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.14-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/host/pci-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -1220,7 +1220,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;