All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Remis Lima Baima <remis.developer@googlemail.com>
Subject: [PATCH 08/15] asm-generic: make pci.h usable directly
Date: Wed, 13 May 2009 22:56:31 +0000	[thread overview]
Message-ID: <1242255398-23779-9-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1242255398-23779-1-git-send-email-arnd@arndb.de>

Some generic code is using the horribly misnamed PCI_DMA_BUS_IS_PHYS
from asm/pci.h. This makes sure that an architecture without PCI
support does not have to define this itself but can rely on the
asm-generic version.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
 arch/frv/include/asm/pci.h  |   13 +++----------
 arch/m32r/include/asm/pci.h |    2 --
 include/asm-generic/pci.h   |    8 ++++++++
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/arch/frv/include/asm/pci.h b/arch/frv/include/asm/pci.h
index 585d9b4..3ce227b 100644
--- a/arch/frv/include/asm/pci.h
+++ b/arch/frv/include/asm/pci.h
@@ -10,8 +10,8 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#ifndef ASM_PCI_H
-#define	ASM_PCI_H
+#ifndef _ASM_FRV_PCI_H
+#define _ASM_FRV_PCI_H
 
 #include <linux/mm.h>
 #include <asm/scatterlist.h>
@@ -43,12 +43,6 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
 /* Return the index of the PCI controller for device PDEV. */
 #define pci_controller_num(PDEV)	(0)
 
-/* The PCI address space does equal the physical memory
- * address space.  The networking and block device layers use
- * this boolean for bounce buffer decisions.
- */
-#define PCI_DMA_BUS_IS_PHYS	(1)
-
 /* pci_unmap_{page,single} is a nop so... */
 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
 #define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
@@ -114,5 +108,4 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
 				    sg_dma_address(&sg[i])+sg_dma_len(&sg[i]));
 }
 
-
-#endif
+#endif /* _ASM_FRV_PCI_H */
diff --git a/arch/m32r/include/asm/pci.h b/arch/m32r/include/asm/pci.h
index fe785d1..07d3834 100644
--- a/arch/m32r/include/asm/pci.h
+++ b/arch/m32r/include/asm/pci.h
@@ -3,6 +3,4 @@
 
 #include <asm-generic/pci.h>
 
-#define PCI_DMA_BUS_IS_PHYS	(1)
-
 #endif /* _ASM_M32R_PCI_H */
diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h
index c36a77d..515c6e2 100644
--- a/include/asm-generic/pci.h
+++ b/include/asm-generic/pci.h
@@ -52,4 +52,12 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 }
 #endif /* HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ */
 
+/*
+ * By default, assume that no iommu is in use and that the PCI
+ * space is mapped to address physical 0.
+ */
+#ifndef PCI_DMA_BUS_IS_PHYS
+#define PCI_DMA_BUS_IS_PHYS	(1)
 #endif
+
+#endif /* _ASM_GENERIC_PCI_H */
-- 
1.6.0.4

  parent reply	other threads:[~2009-05-13 22:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-13 22:56 [PATCH 00/16] asm-generic headers, v4 Arnd Bergmann
2009-05-13 22:56 ` [PATCH 01/15] asm-generic: rename termios.h, signal.h and mman.h Arnd Bergmann
2009-05-14  5:11   ` Stephen Rothwell
2009-05-14  6:16     ` Sam Ravnborg
2009-05-14  6:43       ` Stephen Rothwell
2009-05-13 22:56 ` [PATCH 02/15] asm-generic: introduce asm/bitsperlong.h Arnd Bergmann
2009-05-13 22:56 ` [PATCH 03/15] asm-generic: add generic sysv ipc headers Arnd Bergmann
2009-05-13 22:56 ` [PATCH 04/15] asm-generic: add generic ABI headers Arnd Bergmann
2009-05-13 22:56 ` [PATCH 05/15] asm-generic: add a generic unistd.h Arnd Bergmann
2009-05-13 22:56 ` [PATCH 06/15] asm-generic: rename atomic.h to atomic-long.h Arnd Bergmann
2009-05-13 22:56 ` [PATCH 07/15] asm-generic: rename page.h and uaccess.h Arnd Bergmann
2009-05-13 22:56 ` Arnd Bergmann [this message]
2009-05-13 22:56 ` [PATCH 09/15] asm-generic: make bitops.h usable Arnd Bergmann
2009-05-13 22:56 ` [PATCH 10/15] asm-generic: add generic versions of common headers Arnd Bergmann
2009-05-13 22:56 ` [PATCH 11/15] asm-generic: add legacy I/O header files Arnd Bergmann
2009-05-13 22:56 ` [PATCH 12/15] asm-generic: add generic atomic.h and io.h Arnd Bergmann
2009-05-13 22:56 ` [PATCH 13/15] asm-generic: add generic NOMMU versions of some headers Arnd Bergmann
2009-05-13 22:56 ` [PATCH 14/15] asm-generic: add a generic uaccess.h Arnd Bergmann
2009-05-13 22:56 ` [PATCH 15/15] add generic lib/checksum.c Arnd Bergmann
2009-05-14  6:45 ` [PATCH 00/16] asm-generic headers, v4 Stephen Rothwell
2009-05-14  7:28   ` Arnd Bergmann
2009-05-14  7:48     ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1242255398-23779-9-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=remis.developer@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.