From patchwork Tue Jul 21 00:15:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 497954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id AA484140DCE for ; Tue, 21 Jul 2015 10:15:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=REUfRqcX; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757393AbbGUAPI (ORCPT ); Mon, 20 Jul 2015 20:15:08 -0400 Received: from mail-ig0-f178.google.com ([209.85.213.178]:37910 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757286AbbGUAPH (ORCPT ); Mon, 20 Jul 2015 20:15:07 -0400 Received: by iggf3 with SMTP id f3so94280548igg.1 for ; Mon, 20 Jul 2015 17:15:06 -0700 (PDT) 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=i4T4ZcYhhCpqzgYZZkvU0suwCW4QL9QDg3s1m0KkPG8=; b=REUfRqcXepkZSYLjwxt0ONvhPiwcSJxOKBwyLwddFaakeDP+7Rf+qOXRY69mxPrjIA OhBVAcSw2OMCMMhpQxJPXq41WpBYlX3Fs+ZULW5oqmmLNa6OXU0GT2LJLbYdbwhxdYDn LzvAWyextcvgeOERU+fEFmqGXAqI8u61oRESO5UbtWTUTMGJJbR126r43QgzXOv2Ho+H cx8yi3h/7YMqzt9pV7oWvKXbLTvbK6T2DFVCcKVT3GBlNwZRfXLPpdKpczkB7QwC8+nR Z5CyEAW5wFgAAV9PR9xYGa4/SNw9UWFIO+3taCUrWDo5jdeu5fX3Md4VsNx2EinEz31X 9syQ== 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=i4T4ZcYhhCpqzgYZZkvU0suwCW4QL9QDg3s1m0KkPG8=; b=dmPPkTjYdxnOoK3kRGU6d1nLjka485MkqsfvMwJYHmNC1TbQVSqz+Yrw+iSZoV3NMf S3izuYhJiPpgiaI69LI93rjE9fByRDEvk1Hfsg7AL91eaiZxatxwhmOa1I/r1Hf8QR5G nQxxMQUp0y2WqJISv/2vz+oGR42CVBbK8Ib620uBjNvfWCl2fJfQqirBZNgeuRFnwV1z MvFmDX8FWLaKSqjvXNFrq7P5b8kg6zh/WUlhXpq1JPcBagVLKcWEd7SDNKjEppkNHsQK Dm8CmT5r0k2X08L+i1RMrF8nOz7ldYza7htk+iiQilW21m54B+LLwoQ3KgasWLnlFtg3 m7LQ== X-Gm-Message-State: ALoCoQkhZ2nJYa2oSsvQ9+2tDI0UfVRfLo4Tz2PWo8Lf856QEIvW8Tt1xvXlILfsu7G76YkUK52Q X-Received: by 10.107.160.196 with SMTP id j187mr37021252ioe.80.1437437706425; Mon, 20 Jul 2015 17:15:06 -0700 (PDT) Received: from localhost ([69.71.1.1]) by smtp.gmail.com with ESMTPSA id j73sm14740173ioi.44.2015.07.20.17.15.04 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 20 Jul 2015 17:15:05 -0700 (PDT) Subject: [PATCH v2 09/11] PCI: Move ATS declarations to linux/pci.h so they're all together To: linux-pci@vger.kernel.org, Joerg Roedel , David Woodhouse From: Bjorn Helgaas Cc: iommu@lists.linux-foundation.org, Gregor Dick Date: Mon, 20 Jul 2015 19:15:03 -0500 Message-ID: <20150721001503.28145.54521.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20150721001243.28145.81610.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20150721001243.28145.81610.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Move ATS declarations to linux/pci.h so they're all in one place. Signed-off-by: Bjorn Helgaas Reviewed-by: Joerg Roedel --- include/linux/pci-ats.h | 41 ----------------------------------------- include/linux/pci.h | 10 +++++++++- 2 files changed, 9 insertions(+), 42 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/include/linux/pci-ats.h b/include/linux/pci-ats.h index 5d81d47..57e0b82 100644 --- a/include/linux/pci-ats.h +++ b/include/linux/pci-ats.h @@ -3,47 +3,6 @@ #include -/* Address Translation Service */ -#ifdef CONFIG_PCI_ATS - -int pci_enable_ats(struct pci_dev *dev, int ps); -void pci_disable_ats(struct pci_dev *dev); -int pci_ats_queue_depth(struct pci_dev *dev); - -/** - * pci_ats_enabled - query the ATS status - * @dev: the PCI device - * - * Returns 1 if ATS capability is enabled, or 0 if not. - */ -static inline int pci_ats_enabled(struct pci_dev *dev) -{ - return dev->ats_cap && dev->ats_enabled; -} - -#else /* CONFIG_PCI_ATS */ - -static inline int pci_enable_ats(struct pci_dev *dev, int ps) -{ - return -ENODEV; -} - -static inline void pci_disable_ats(struct pci_dev *dev) -{ -} - -static inline int pci_ats_queue_depth(struct pci_dev *dev) -{ - return -ENODEV; -} - -static inline int pci_ats_enabled(struct pci_dev *dev) -{ - return 0; -} - -#endif /* CONFIG_PCI_ATS */ - #ifdef CONFIG_PCI_PRI int pci_enable_pri(struct pci_dev *pdev, u32 reqs); diff --git a/include/linux/pci.h b/include/linux/pci.h index 238b77e..307f96a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1301,8 +1301,16 @@ void ht_destroy_irq(unsigned int irq); #ifdef CONFIG_PCI_ATS /* Address Translation Service */ void pci_ats_init(struct pci_dev *dev); +int pci_enable_ats(struct pci_dev *dev, int ps); +void pci_disable_ats(struct pci_dev *dev); +int pci_ats_queue_depth(struct pci_dev *dev); +static inline int pci_ats_enabled(struct pci_dev *dev) { return dev->ats_cap && dev->ats_enabled; } #else -static inline void pci_ats_init(struct pci_dev *dev) { } +static inline void pci_ats_init(struct pci_dev *d) { } +static inline int pci_enable_ats(struct pci_dev *d, int ps) { return -ENODEV; } +static inline void pci_disable_ats(struct pci_dev *d) { } +static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } +static inline int pci_ats_enabled(struct pci_dev *d) { return 0; } #endif void pci_cfg_access_lock(struct pci_dev *dev);