From patchwork Tue Feb 24 08:33:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 442854 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FD3814016B for ; Tue, 24 Feb 2015 19:35:29 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 34B291A1454 for ; Tue, 24 Feb 2015 19:35:29 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id D98001A1081 for ; Tue, 24 Feb 2015 19:33:12 +1100 (AEDT) Received: by padet14 with SMTP id et14so34314183pad.11 for ; Tue, 24 Feb 2015 00:33:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=pvRFErHdD0BFV0AE01bBjV0W3WUf27l4A9MrfmFiLjY=; b=i74t2HHkt4mIGbq5xuYEXllNkjPbSOlv9TPLIXAUD7/0dYYC8utA7DcVVBJ0rIUfC8 R/fM6ww0eD6ispsphCjU+emqSBI5EMa99LkJHVhAX6xIt4Zv9oo21xco3+G0lF7YSCQf 91SUiJ4uJvqY/sGIBSTO1B5U5fzKBbhmSUjfLuiPOvcAVXemzMPLITpBSSOyDk6LE5ip qG/bUV9hbwj9x1ILlsEEEso4noVuuyDmMtKLD1vZWJfGvAb9rUuSAy/zt+i9aaq0V17j Rzh31Jbt66LpE1fsX3e2QvQuWqlSnrFLhqKIc7asOJ+2292hsegMFs2Y8NMp8WqTThPJ Bwlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=pvRFErHdD0BFV0AE01bBjV0W3WUf27l4A9MrfmFiLjY=; b=fFl9KefbQOasXWb7oHzHyopP9w62aVkTxwkgDSHmV8qEl/L+rpYZO3lXajFB30NidC oYX6wGEHL18DvCEN6FccyW60zZQWrNIOxaiYtp+YGHLUuXrfs6n9o2fgu/3zK8EDkIOC hdwSJKH+y9vQThNm1vZrx7s7MZt/vLhrEr0fgCOYUciMK4BhQKlNCXFEKPgRpvCqfISh KkU/MqtAJkIXozrF3OoquT1vfbmUnfUMAa2qjxrz5seXcVHqZhlsqpBsFvyYDCBOO+V3 Ma5Rh4JllJUhwjfe/7i7O+ZiFyKqXohV2LQhoZyb+Z4btQpJ9UtCG9hL5urTQlShOx/A AatQ== X-Gm-Message-State: ALoCoQmcn//muVtPIvooCRX7/vEm5SRJMup6P9Sa5D5bVukJ0QyXyyxHRCP3NCvx8IJBWe1eWUOf X-Received: by 10.70.23.5 with SMTP id i5mr26625464pdf.119.1424766791159; Tue, 24 Feb 2015 00:33:11 -0800 (PST) Received: from localhost ([12.23.74.29]) by mx.google.com with ESMTPSA id ny1sm37297775pbb.77.2015.02.24.00.33.09 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 24 Feb 2015 00:33:10 -0800 (PST) Subject: [PATCH v12 02/21] PCI: Print PF SR-IOV resource that contains all VF(n) BAR space To: Wei Yang , benh@au1.ibm.com, gwshan@linux.vnet.ibm.com From: Bjorn Helgaas Date: Tue, 24 Feb 2015 02:33:09 -0600 Message-ID: <20150224083309.32124.29690.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20150224082939.32124.45744.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20150224082939.32124.45744.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Wei Yang When we size VF BAR0, VF BAR1, etc., from the SR-IOV Capability of a PF, we learn the alignment requirement and amount of space consumed by a single VF. But when VFs are enabled, *each* of the NumVFs consumes that amount of space, so the total size of the PF resource is "VF BAR size * NumVFs". Add a printk of the total space consumed by the VFs corresponding to what we already do for normal non-IOV BARs. No functional change; new message only. [bhelgaas: split out into its own patch] Signed-off-by: Wei Yang Signed-off-by: Bjorn Helgaas --- drivers/pci/iov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index c4c33ead03bc..05f9d97e4175 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -372,6 +372,8 @@ found: goto failed; } res->end = res->start + resource_size(res) * total - 1; + dev_info(&dev->dev, "VF(n) BAR%d space: %pR (contains BAR%d for %d VFs)\n", + i, res, i, total); nres++; }