From patchwork Mon Apr 22 23:11:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2474901 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D1049DF23A for ; Mon, 22 Apr 2013 23:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752423Ab3DVXLu (ORCPT ); Mon, 22 Apr 2013 19:11:50 -0400 Received: from mail-ia0-f175.google.com ([209.85.210.175]:47599 "EHLO mail-ia0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474Ab3DVXLt (ORCPT ); Mon, 22 Apr 2013 19:11:49 -0400 Received: by mail-ia0-f175.google.com with SMTP id i38so9047iae.34 for ; Mon, 22 Apr 2013 16:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=KW92ycpaPvnslFk0ZAv10oLGbfFeCjr8UB0RRHpAqdM=; b=W0cCpxJBdoxUxrv91u6xCZ/rLkhrrj+PxnZictP4NDMUXiRL1CGgqB9CUvDp7j+Z+Y o4Cs/TeU7+P5r3O7IV1rJt+/8Ej9um6plLGRKII5ERG9EJDPF5JypQdKbU73ucplTa3e zvqn20Cfe3Xw/E46jbT9jSgPrChNi9TzReXbJwOn42gTnQPAhakE6OuVugRPYfAkTKgT kSh+eI1HyriqsXv4WBuuaoN4Znx81Vh1C0M/YZLCt5kbuResYWzdFSUhmTwoU2pQwz2S GbeduDshDbL1YMQ2I1hHYTJr4BQrl87M2XPsfrSS9VjQtaixKGQ6mIHH6kEW/hXfCdKz KMeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=KW92ycpaPvnslFk0ZAv10oLGbfFeCjr8UB0RRHpAqdM=; b=iQnhnEwMjcii7PKLEUzj/+igdHuNJ/fZ+Zskjwyd2oR5I5jNW89rL4m+/KPUZIr9gP UJw5rOdRkK6PiNVggd3qyRNyTmIhba9ThtMQGYoVMHk3RVDxxtgin+hJqwuwcAdtwTRu 99Qam79aEVX/E/7ctvRujcPYUMgEko660A8586qjAGMXWYxDehl7wFg0oCJwOholdf0b iVLv1lompEUKDsRyr5tszn45npCGhMJTy0UoF0SztQnh3jIDxlS8Bna7ydQ+IttSf7jL dXMRwb67FlCIlUn9rt///HPX7iEeUmDkU5kaWl3VXJpFQ2PW8DBXbv6pmD64cWi8hEAi /ouw== X-Received: by 10.42.133.74 with SMTP id g10mr14100873ict.32.1366672309496; Mon, 22 Apr 2013 16:11:49 -0700 (PDT) Received: from localhost ([172.29.120.215]) by mx.google.com with ESMTPS id hi4sm19687521igc.6.2013.04.22.16.11.48 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 16:11:48 -0700 (PDT) Subject: [PATCH v4 14/22] PCI: Use msix_table_size() directly, drop multi_msix_capable() To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Gavin Shan Date: Mon, 22 Apr 2013 17:11:47 -0600 Message-ID: <20130422231147.32621.26551.stgit@bhelgaas-glaptop> In-Reply-To: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> References: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlYzZTpP5r12PWS+ay0eSx+iCohXxQPqQlTrmmpHie/1g5hWRjvEJlOEsz8Mc9Y1pHW6tnA/nxBix/4krgRkyoTlqVvxbJueadYLIRE32v/ybEXyED4ih57ZoVmRiU5z+rqs7QZfvdNs4H82dBWWQrkVUXaZ++Ckw7aWStBToKz4XaU7uGF0KEdqgVnQTATDHfv/mYDO2NZqHjekgNCft0cDZswxYrxzPJClKlR3l78QGuKEeA= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The users of multi_msix_capable() are really interested in the table size, so just say what we mean. Signed-off-by: Bjorn Helgaas --- drivers/pci/msi.c | 7 +++++-- drivers/pci/msi.h | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index fb07e05..06c5f6e 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -26,6 +26,9 @@ static int pci_msi_enable = 1; +#define msix_table_size(flags) ((flags & PCI_MSIX_FLAGS_QSIZE) + 1) + + /* Arch hooks */ #ifndef arch_msi_check_device @@ -681,7 +684,7 @@ static int msix_capability_init(struct pci_dev *dev, pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, control); /* Request & Map MSI-X table region */ - base = msix_map_region(dev, multi_msix_capable(control)); + base = msix_map_region(dev, msix_table_size(control)); if (!base) return -ENOMEM; @@ -904,7 +907,7 @@ int pci_msix_table_size(struct pci_dev *dev) return 0; pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &control); - return multi_msix_capable(control); + return msix_table_size(control); } /** diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h index d76c7b2..df12830 100644 --- a/drivers/pci/msi.h +++ b/drivers/pci/msi.h @@ -9,7 +9,4 @@ #define msi_mask_reg(base, is64bit) \ (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32)) -#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1) -#define multi_msix_capable(control) msix_table_size((control)) - #endif /* MSI_H */