public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.5-rc2 lots of warnings for dma_error
@ 2004-03-22  3:04 Keith Owens
  2004-03-22  9:36 ` Andrew Morton
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Keith Owens @ 2004-03-22  3:04 UTC (permalink / raw)
  To: linux-ia64

2.6.5-rc2 generic build, lots of warnings for dma_error.  Latest patch from
http://www.kernel.org/pub/linux/kernel/ports/ia64/v2.6/testing/cset/cset-1.1661.1.156-to-1.1668.txt.gz
makes no difference.

In file included from include/asm/pci.h:58,
                 from include/linux/pci.h:720,
                 from fs/compat_ioctl.c:58,
                 from arch/ia64/ia32/ia32_ioctl.c:15:
include/asm-generic/pci-dma-compat.h: In function `pci_dma_error':
include/asm-generic/pci-dma-compat.h:104: warning: implicit declaration of function `dma_error'

# grep DMA /build/kaos/2.6.5-rc2-kdb-v4.3-ia64/.config
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_ADMA=y
CONFIG_HPT34X_AUTODMA=y
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_DMA_NONPCI is not set


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
@ 2004-03-22  9:36 ` Andrew Morton
  2004-03-22 18:30 ` Bjorn Helgaas
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2004-03-22  9:36 UTC (permalink / raw)
  To: linux-ia64

Keith Owens <kaos@sgi.com> wrote:
>
> 2.6.5-rc2 generic build, lots of warnings for dma_error.  Latest patch from
> http://www.kernel.org/pub/linux/kernel/ports/ia64/v2.6/testing/cset/cset-1.1661.1.156-to-1.1668.txt.gz
> makes no difference.
> 
> In file included from include/asm/pci.h:58,
>                  from include/linux/pci.h:720,
>                  from fs/compat_ioctl.c:58,
>                  from arch/ia64/ia32/ia32_ioctl.c:15:
> include/asm-generic/pci-dma-compat.h: In function `pci_dma_error':
> include/asm-generic/pci-dma-compat.h:104: warning: implicit declaration of function `dma_error'
> 

Yes, sorry, that patch was, umm, a little less complete than I had believed.

This adds the necessary stubs for ia64 and builds OK with my config, but it
needs a double-check.

---

 25-akpm/arch/ia64/lib/swiotlb.c           |    7 +++++++
 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c |   13 +++++++++++++
 25-akpm/include/asm-ia64/dma-mapping.h    |    1 +
 25-akpm/include/asm-ia64/machvec.h        |    8 ++++++++
 25-akpm/include/asm-ia64/machvec_sn2.h    |    2 ++
 include/asm-ia64/machvec_hpzx1.h          |    0 
 6 files changed, 31 insertions(+)

diff -puN include/asm-ia64/dma-mapping.h~ia64-dma_error-fix include/asm-ia64/dma-mapping.h
--- 25/include/asm-ia64/dma-mapping.h~ia64-dma_error-fix	Mon Mar 22 03:49:29 2004
+++ 25-akpm/include/asm-ia64/dma-mapping.h	Mon Mar 22 03:50:06 2004
@@ -18,6 +18,7 @@
 #define dma_sync_sg_for_cpu	platform_dma_sync_sg_for_cpu
 #define dma_sync_single_for_device platform_dma_sync_single_for_device
 #define dma_sync_sg_for_device	platform_dma_sync_sg_for_device
+#define dma_error		platform_dma_error
 
 #define dma_map_page(dev, pg, off, size, dir)				\
 	dma_map_single(dev, page_address(pg) + (off), (size), (dir))
diff -puN include/asm-ia64/machvec.h~ia64-dma_error-fix include/asm-ia64/machvec.h
--- 25/include/asm-ia64/machvec.h~ia64-dma_error-fix	Mon Mar 22 03:50:26 2004
+++ 25-akpm/include/asm-ia64/machvec.h	Mon Mar 22 03:59:29 2004
@@ -46,6 +46,7 @@ typedef void ia64_mv_dma_sync_single_for
 typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
 typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
 typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
+typedef int ia64_mv_dma_error (dma_addr_t dma_addr);
 typedef int ia64_mv_dma_supported (struct device *, u64);
 
 /*
@@ -110,6 +111,7 @@ extern void machvec_memory_fence (void);
 #  define platform_dma_sync_sg_for_cpu	ia64_mv.dma_sync_sg_for_cpu
 #  define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device
 #  define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device
+#  define platform_dma_error		ia64_mv.dma_error
 #  define platform_dma_supported	ia64_mv.dma_supported
 #  define platform_irq_desc		ia64_mv.irq_desc
 #  define platform_irq_to_vector	ia64_mv.irq_to_vector
@@ -158,6 +160,7 @@ struct ia64_machine_vector {
 	ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
 	ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
 	ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
+	ia64_mv_dma_error *dma_error
 	ia64_mv_dma_supported *dma_supported;
 	ia64_mv_irq_desc *irq_desc;
 	ia64_mv_irq_to_vector *irq_to_vector;
@@ -202,6 +205,7 @@ struct ia64_machine_vector {
 	platform_dma_sync_sg_for_cpu,		\
 	platform_dma_sync_single_for_device,	\
 	platform_dma_sync_sg_for_device,	\
+	platform_dma_error,			\
 	platform_dma_supported,			\
 	platform_irq_desc,			\
 	platform_irq_to_vector,			\
@@ -243,6 +247,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	swiotlb_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device swiotlb_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	swiotlb_sync_sg_for_device;
+extern ia64_mv_dma_error		swiotlb_dma_error;
 extern ia64_mv_dma_supported		swiotlb_dma_supported;
 
 /*
@@ -312,6 +317,9 @@ extern ia64_mv_dma_supported		swiotlb_dm
 #ifndef platform_dma_sync_sg_for_device
 # define platform_dma_sync_sg_for_device	swiotlb_sync_sg_for_device
 #endif
+#ifndef platform_dma_error
+# define platform_dma_error		swiotlb_dma_error
+#endif
 #ifndef platform_dma_supported
 # define  platform_dma_supported	swiotlb_dma_supported
 #endif
diff -puN include/asm-ia64/machvec_hpzx1.h~ia64-dma_error-fix include/asm-ia64/machvec_hpzx1.h
diff -puN include/asm-ia64/machvec_sn2.h~ia64-dma_error-fix include/asm-ia64/machvec_sn2.h
--- 25/include/asm-ia64/machvec_sn2.h~ia64-dma_error-fix	Mon Mar 22 03:50:39 2004
+++ 25-akpm/include/asm-ia64/machvec_sn2.h	Mon Mar 22 03:55:46 2004
@@ -66,6 +66,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	sn_dma_sync_sg_for_device;
+extern ia64_mv_dma_error	sn_dma_error;
 extern ia64_mv_dma_supported		sn_dma_supported;
 
 /*
@@ -111,6 +112,7 @@ extern ia64_mv_dma_supported		sn_dma_sup
 #define platform_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu
 #define platform_dma_sync_single_for_device sn_dma_sync_single_for_device
 #define platform_dma_sync_sg_for_device	sn_dma_sync_sg_for_device
+#define platform_dma_error		sn_dma_error
 #define platform_dma_supported		sn_dma_supported
 
 #include <asm/sn/sn2/io.h>
diff -puN arch/ia64/lib/swiotlb.c~ia64-dma_error-fix arch/ia64/lib/swiotlb.c
--- 25/arch/ia64/lib/swiotlb.c~ia64-dma_error-fix	Mon Mar 22 03:56:01 2004
+++ 25-akpm/arch/ia64/lib/swiotlb.c	Mon Mar 22 04:05:44 2004
@@ -498,6 +498,12 @@ swiotlb_sync_sg_for_device (struct devic
 			sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir);
 }
 
+int
+swiotlb_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 /*
  * Return whether the given PCI device DMA address mask can be supported properly.  For
  * example, if your device can only drive the low 24-bits during PCI bus mastering, then
@@ -518,6 +524,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_cp
 EXPORT_SYMBOL(swiotlb_sync_single_for_device);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
+EXPORT_SYMBOL(swiotlb_dma_error);
 EXPORT_SYMBOL(swiotlb_alloc_coherent);
 EXPORT_SYMBOL(swiotlb_free_coherent);
 EXPORT_SYMBOL(swiotlb_dma_supported);
diff -puN arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_error-fix arch/ia64/sn/io/machvec/pci_dma.c
--- 25/arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_error-fix	Mon Mar 22 03:56:05 2004
+++ 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c	Mon Mar 22 03:57:44 2004
@@ -483,6 +483,12 @@ sn_pci_dma_sync_sg_for_device(struct pci
 	return;
 }
 
+int
+sn_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 /**
  * sn_dma_supported - test a DMA mask
  * @hwdev: device to test
@@ -652,6 +658,13 @@ sn_dma_sync_sg_for_device(struct device 
 }
 EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
 
+void
+sn_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
+EXPORT_SYMBOL(sn_dma_error);
 EXPORT_SYMBOL(sn_pci_unmap_single);
 EXPORT_SYMBOL(sn_pci_map_single);
 EXPORT_SYMBOL(sn_pci_dma_sync_single_for_cpu);

_


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
  2004-03-22  9:36 ` Andrew Morton
@ 2004-03-22 18:30 ` Bjorn Helgaas
  2004-03-22 18:32 ` Bjorn Helgaas
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Bjorn Helgaas @ 2004-03-22 18:30 UTC (permalink / raw)
  To: linux-ia64

On Monday 22 March 2004 2:36 am, Andrew Morton wrote:
> This adds the necessary stubs for ia64 and builds OK with my config, but it
> needs a double-check.

I needed the following additional patch to build the generic kernel:

diff -u -ur 2.6-mm/arch/ia64/sn/io/machvec/pci_dma.c 2.6/arch/ia64/sn/io/machvec/pci_dma.c
--- 2.6-mm/arch/ia64/sn/io/machvec/pci_dma.c	2004-03-22 11:26:22.000000000 -0700
+++ 2.6/arch/ia64/sn/io/machvec/pci_dma.c	2004-03-22 10:18:07.000000000 -0700
@@ -483,12 +483,6 @@
 	return;
 }
 
-int
-sn_dma_error(dma_addr_t dma_addr)
-{
-	return 0;
-}
-
 /**
  * sn_dma_supported - test a DMA mask
  * @hwdev: device to test
@@ -658,7 +652,7 @@
 }
 EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
 
-void
+int
 sn_dma_error(dma_addr_t dma_addr)
 {
 	return 0;
diff -u -ur 2.6-mm/include/asm-ia64/machvec.h 2.6/include/asm-ia64/machvec.h
--- 2.6-mm/include/asm-ia64/machvec.h	2004-03-22 11:26:21.000000000 -0700
+++ 2.6/include/asm-ia64/machvec.h	2004-03-22 10:05:33.000000000 -0700
@@ -160,7 +160,7 @@
 	ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
 	ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
 	ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
-	ia64_mv_dma_error *dma_error
+	ia64_mv_dma_error *dma_error;
 	ia64_mv_dma_supported *dma_supported;
 	ia64_mv_irq_desc *irq_desc;
 	ia64_mv_irq_to_vector *irq_to_vector;

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
  2004-03-22  9:36 ` Andrew Morton
  2004-03-22 18:30 ` Bjorn Helgaas
@ 2004-03-22 18:32 ` Bjorn Helgaas
  2004-03-22 18:40 ` Alex Williamson
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Bjorn Helgaas @ 2004-03-22 18:32 UTC (permalink / raw)
  To: linux-ia64

On Monday 22 March 2004 2:36 am, Andrew Morton wrote:
> This adds the necessary stubs for ia64 and builds OK with my config, but it
> needs a double-check.

In addition, I needed the following patch to build the ide-cd driver
because the ia64 generic target makes "dma_error" a #define.

diff -u -ur 2.6-mm/drivers/ide/ide-cd.c 2.6/drivers/ide/ide-cd.c
--- 2.6-mm/drivers/ide/ide-cd.c	2004-03-22 11:26:42.000000000 -0700
+++ 2.6/drivers/ide/ide-cd.c	2004-03-22 10:17:00.000000000 -0700
@@ -1044,7 +1044,7 @@
 	int ireason, len, sectors_to_transfer, nskip;
 	struct cdrom_info *info = drive->driver_data;
 	u8 lowcyl = 0, highcyl = 0;
-	int dma = info->dma, dma_error = 0;
+	int dma = info->dma, dma_err = 0;
 
 	struct request *rq = HWGROUP(drive)->rq;
 
@@ -1053,7 +1053,7 @@
 	 */
 	if (dma) {
 		info->dma = 0;
-		if ((dma_error = HWIF(drive)->ide_dma_end(drive)))
+		if ((dma_err = HWIF(drive)->ide_dma_end(drive)))
 			__ide_dma_off(drive);
 	}
 
@@ -1061,7 +1061,7 @@
 		return ide_stopped;
 
 	if (dma) {
-		if (!dma_error) {
+		if (!dma_err) {
 			ide_end_request(drive, 1, rq->nr_sectors);
 			return ide_stopped;
 		} else
@@ -1645,17 +1645,17 @@
 {
 	struct cdrom_info *info = drive->driver_data;
 	struct request *rq = HWGROUP(drive)->rq;
-	int dma_error, dma, stat, ireason, len, thislen;
+	int dma_err, dma, stat, ireason, len, thislen;
 	u8 lowcyl, highcyl;
 	xfer_func_t *xferfunc;
 	unsigned long flags;
 
 	/* Check for errors. */
-	dma_error = 0;
+	dma_err = 0;
 	dma = info->dma;
 	if (dma) {
 		info->dma = 0;
-		dma_error = HWIF(drive)->ide_dma_end(drive);
+		dma_err = HWIF(drive)->ide_dma_end(drive);
 	}
 
 	if (cdrom_decode_status(drive, 0, &stat)) {
@@ -1671,7 +1671,7 @@
 	 * using dma, transfer is complete now
 	 */
 	if (dma) {
-		if (dma_error) {
+		if (dma_err) {
 			printk("ide-cd: dma error\n");
 			__ide_dma_off(drive);
 			return DRIVER(drive)->error(drive, "dma error", stat);
@@ -1790,7 +1790,7 @@
 {
 	int stat, ireason, len, sectors_to_transfer, uptodate;
 	struct cdrom_info *info = drive->driver_data;
-	int dma_error = 0, dma = info->dma;
+	int dma_err = 0, dma = info->dma;
 	u8 lowcyl = 0, highcyl = 0;
 
 	struct request *rq = HWGROUP(drive)->rq;
@@ -1798,7 +1798,7 @@
 	/* Check for errors. */
 	if (dma) {
 		info->dma = 0;
-		if ((dma_error = HWIF(drive)->ide_dma_end(drive))) {
+		if ((dma_err = HWIF(drive)->ide_dma_end(drive))) {
 			printk("ide-cd: write dma error\n");
 			__ide_dma_off(drive);
 		}
@@ -1811,7 +1811,7 @@
 	 * using dma, transfer is complete now
 	 */
 	if (dma) {
-		if (dma_error)
+		if (dma_err)
 			return DRIVER(drive)->error(drive, "dma error", stat);
 
 		ide_end_request(drive, 1, rq->nr_sectors);

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (2 preceding siblings ...)
  2004-03-22 18:32 ` Bjorn Helgaas
@ 2004-03-22 18:40 ` Alex Williamson
  2004-03-22 18:56 ` Jens Axboe
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Alex Williamson @ 2004-03-22 18:40 UTC (permalink / raw)
  To: linux-ia64

On Mon, 2004-03-22 at 11:30, Bjorn Helgaas wrote:
> On Monday 22 March 2004 2:36 am, Andrew Morton wrote:
> > This adds the necessary stubs for ia64 and builds OK with my config, but it
> > needs a double-check.
> 
> I needed the following additional patch to build the generic kernel:

And we probably want sba_iommu to have it's own dma_error routine:

--- 1.39/arch/ia64/hp/common/sba_iommu.c	Mon Mar 15 07:51:33 2004
+++ edited/arch/ia64/hp/common/sba_iommu.c	Mon Mar 22 10:52:38 2004
@@ -1979,6 +1980,12 @@
 	return ((mask & 0xFFFFFFFFUL) = 0xFFFFFFFFUL);
 }
 
+int
+sba_dma_error (dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 __setup("nosbagart", nosbagart);
 
 static int __init
@@ -2004,6 +2011,7 @@
 
 __setup("sbapagesize=",sba_page_override);
 
+EXPORT_SYMBOL(sba_dma_error);
 EXPORT_SYMBOL(sba_map_single);
 EXPORT_SYMBOL(sba_unmap_single);
 EXPORT_SYMBOL(sba_map_sg);
--- 1.8/include/asm-ia64/machvec_hpzx1.h	Sat Mar 13 23:54:58 2004
+++ edited/include/asm-ia64/machvec_hpzx1.h	Mon Mar 22 10:53:21 2004
@@ -9,6 +9,7 @@
 extern ia64_mv_dma_map_sg		sba_map_sg;
 extern ia64_mv_dma_unmap_sg		sba_unmap_sg;
 extern ia64_mv_dma_supported		sba_dma_supported;
+extern ia64_mv_dma_error		sba_dma_error;
 
 /*
  * This stuff has dual use!
@@ -31,5 +32,6 @@
 #define platform_dma_sync_single_for_device ((ia64_mv_dma_sync_single_for_device *) machvec_memory_fence)
 #define platform_dma_sync_sg_for_device	((ia64_mv_dma_sync_sg_for_device *) machvec_memory_fence)
 #define platform_dma_supported		sba_dma_supported
+#define platform_dma_error		sba_dma_error
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (3 preceding siblings ...)
  2004-03-22 18:40 ` Alex Williamson
@ 2004-03-22 18:56 ` Jens Axboe
  2004-03-22 19:02 ` Bjorn Helgaas
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Jens Axboe @ 2004-03-22 18:56 UTC (permalink / raw)
  To: linux-ia64

On Mon, Mar 22 2004, Bjorn Helgaas wrote:
> On Monday 22 March 2004 2:36 am, Andrew Morton wrote:
> > This adds the necessary stubs for ia64 and builds OK with my config, but it
> > needs a double-check.
> 
> In addition, I needed the following patch to build the ide-cd driver
> because the ia64 generic target makes "dma_error" a #define.
> 
> diff -u -ur 2.6-mm/drivers/ide/ide-cd.c 2.6/drivers/ide/ide-cd.c
> --- 2.6-mm/drivers/ide/ide-cd.c	2004-03-22 11:26:42.000000000 -0700
> +++ 2.6/drivers/ide/ide-cd.c	2004-03-22 10:17:00.000000000 -0700
> @@ -1044,7 +1044,7 @@
>  	int ireason, len, sectors_to_transfer, nskip;
>  	struct cdrom_info *info = drive->driver_data;
>  	u8 lowcyl = 0, highcyl = 0;
> -	int dma = info->dma, dma_error = 0;
> +	int dma = info->dma, dma_err = 0;

This is really silly imho, make ia64 generic target cut down on it's
name space polution instead then.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (4 preceding siblings ...)
  2004-03-22 18:56 ` Jens Axboe
@ 2004-03-22 19:02 ` Bjorn Helgaas
  2004-03-22 20:21 ` Andrew Morton
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Bjorn Helgaas @ 2004-03-22 19:02 UTC (permalink / raw)
  To: linux-ia64

On Monday 22 March 2004 11:56 am, Jens Axboe wrote:
> > -     int dma = info->dma, dma_error = 0;
> > +     int dma = info->dma, dma_err = 0;
> 
> This is really silly imho, make ia64 generic target cut down on it's
> name space polution instead then.

Yeah, that's fair enough, but I'm not ready to sign up for that.
Maybe someone else more expert than I in the machvecs will.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (5 preceding siblings ...)
  2004-03-22 19:02 ` Bjorn Helgaas
@ 2004-03-22 20:21 ` Andrew Morton
  2004-03-22 21:37 ` Bjorn Helgaas
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2004-03-22 20:21 UTC (permalink / raw)
  To: linux-ia64

Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>
> On Monday 22 March 2004 2:36 am, Andrew Morton wrote:
>  > This adds the necessary stubs for ia64 and builds OK with my config, but it
>  > needs a double-check.
> 
>  In addition, I needed the following patch to build the ide-cd driver
>  because the ia64 generic target makes "dma_error" a #define.

gack, what a fiasco.

Here's a new patch which includes everyone's 2000 millicents' worth:


 25-akpm/arch/ia64/hp/common/sba_iommu.c   |    7 +++++++
 25-akpm/arch/ia64/lib/swiotlb.c           |    7 +++++++
 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c |    7 +++++++
 25-akpm/drivers/ide/ide-cd.c              |   20 ++++++++++----------
 25-akpm/include/asm-ia64/dma-mapping.h    |    1 +
 25-akpm/include/asm-ia64/machvec.h        |    8 ++++++++
 25-akpm/include/asm-ia64/machvec_hpzx1.h  |    2 ++
 25-akpm/include/asm-ia64/machvec_sn2.h    |    2 ++
 8 files changed, 44 insertions(+), 10 deletions(-)

diff -puN include/asm-ia64/dma-mapping.h~ia64-dma_error-fix include/asm-ia64/dma-mapping.h
--- 25/include/asm-ia64/dma-mapping.h~ia64-dma_error-fix	2004-03-22 11:49:14.764057264 -0800
+++ 25-akpm/include/asm-ia64/dma-mapping.h	2004-03-22 11:49:14.776055440 -0800
@@ -18,6 +18,7 @@
 #define dma_sync_sg_for_cpu	platform_dma_sync_sg_for_cpu
 #define dma_sync_single_for_device platform_dma_sync_single_for_device
 #define dma_sync_sg_for_device	platform_dma_sync_sg_for_device
+#define dma_error		platform_dma_error
 
 #define dma_map_page(dev, pg, off, size, dir)				\
 	dma_map_single(dev, page_address(pg) + (off), (size), (dir))
diff -puN include/asm-ia64/machvec.h~ia64-dma_error-fix include/asm-ia64/machvec.h
--- 25/include/asm-ia64/machvec.h~ia64-dma_error-fix	2004-03-22 11:49:14.766056960 -0800
+++ 25-akpm/include/asm-ia64/machvec.h	2004-03-22 12:18:29.637275984 -0800
@@ -46,6 +46,7 @@ typedef void ia64_mv_dma_sync_single_for
 typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
 typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
 typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
+typedef int ia64_mv_dma_error (dma_addr_t dma_addr);
 typedef int ia64_mv_dma_supported (struct device *, u64);
 
 /*
@@ -110,6 +111,7 @@ extern void machvec_memory_fence (void);
 #  define platform_dma_sync_sg_for_cpu	ia64_mv.dma_sync_sg_for_cpu
 #  define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device
 #  define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device
+#  define platform_dma_error		ia64_mv.dma_error
 #  define platform_dma_supported	ia64_mv.dma_supported
 #  define platform_irq_desc		ia64_mv.irq_desc
 #  define platform_irq_to_vector	ia64_mv.irq_to_vector
@@ -158,6 +160,7 @@ struct ia64_machine_vector {
 	ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
 	ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
 	ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
+	ia64_mv_dma_error *dma_error;
 	ia64_mv_dma_supported *dma_supported;
 	ia64_mv_irq_desc *irq_desc;
 	ia64_mv_irq_to_vector *irq_to_vector;
@@ -202,6 +205,7 @@ struct ia64_machine_vector {
 	platform_dma_sync_sg_for_cpu,		\
 	platform_dma_sync_single_for_device,	\
 	platform_dma_sync_sg_for_device,	\
+	platform_dma_error,			\
 	platform_dma_supported,			\
 	platform_irq_desc,			\
 	platform_irq_to_vector,			\
@@ -243,6 +247,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	swiotlb_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device swiotlb_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	swiotlb_sync_sg_for_device;
+extern ia64_mv_dma_error		swiotlb_dma_error;
 extern ia64_mv_dma_supported		swiotlb_dma_supported;
 
 /*
@@ -312,6 +317,9 @@ extern ia64_mv_dma_supported		swiotlb_dm
 #ifndef platform_dma_sync_sg_for_device
 # define platform_dma_sync_sg_for_device	swiotlb_sync_sg_for_device
 #endif
+#ifndef platform_dma_error
+# define platform_dma_error		swiotlb_dma_error
+#endif
 #ifndef platform_dma_supported
 # define  platform_dma_supported	swiotlb_dma_supported
 #endif
diff -puN include/asm-ia64/machvec_hpzx1.h~ia64-dma_error-fix include/asm-ia64/machvec_hpzx1.h
--- 25/include/asm-ia64/machvec_hpzx1.h~ia64-dma_error-fix	2004-03-22 11:49:14.771056200 -0800
+++ 25-akpm/include/asm-ia64/machvec_hpzx1.h	2004-03-22 12:18:53.961578128 -0800
@@ -9,6 +9,7 @@ extern ia64_mv_dma_unmap_single		sba_unm
 extern ia64_mv_dma_map_sg		sba_map_sg;
 extern ia64_mv_dma_unmap_sg		sba_unmap_sg;
 extern ia64_mv_dma_supported		sba_dma_supported;
+extern ia64_mv_dma_error		sba_dma_error;
 
 /*
  * This stuff has dual use!
@@ -31,5 +32,6 @@ extern ia64_mv_dma_supported		sba_dma_su
 #define platform_dma_sync_single_for_device ((ia64_mv_dma_sync_single_for_device *) machvec_memory_fence)
 #define platform_dma_sync_sg_for_device	((ia64_mv_dma_sync_sg_for_device *) machvec_memory_fence)
 #define platform_dma_supported		sba_dma_supported
+#define platform_dma_error		sba_dma_error
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
diff -puN include/asm-ia64/machvec_sn2.h~ia64-dma_error-fix include/asm-ia64/machvec_sn2.h
--- 25/include/asm-ia64/machvec_sn2.h~ia64-dma_error-fix	2004-03-22 11:49:14.772056048 -0800
+++ 25-akpm/include/asm-ia64/machvec_sn2.h	2004-03-22 11:49:14.778055136 -0800
@@ -66,6 +66,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	sn_dma_sync_sg_for_device;
+extern ia64_mv_dma_error	sn_dma_error;
 extern ia64_mv_dma_supported		sn_dma_supported;
 
 /*
@@ -111,6 +112,7 @@ extern ia64_mv_dma_supported		sn_dma_sup
 #define platform_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu
 #define platform_dma_sync_single_for_device sn_dma_sync_single_for_device
 #define platform_dma_sync_sg_for_device	sn_dma_sync_sg_for_device
+#define platform_dma_error		sn_dma_error
 #define platform_dma_supported		sn_dma_supported
 
 #include <asm/sn/sn2/io.h>
diff -puN arch/ia64/lib/swiotlb.c~ia64-dma_error-fix arch/ia64/lib/swiotlb.c
--- 25/arch/ia64/lib/swiotlb.c~ia64-dma_error-fix	2004-03-22 11:49:14.773055896 -0800
+++ 25-akpm/arch/ia64/lib/swiotlb.c	2004-03-22 11:49:14.778055136 -0800
@@ -498,6 +498,12 @@ swiotlb_sync_sg_for_device (struct devic
 			sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir);
 }
 
+int
+swiotlb_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 /*
  * Return whether the given PCI device DMA address mask can be supported properly.  For
  * example, if your device can only drive the low 24-bits during PCI bus mastering, then
@@ -518,6 +524,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_cp
 EXPORT_SYMBOL(swiotlb_sync_single_for_device);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
+EXPORT_SYMBOL(swiotlb_dma_error);
 EXPORT_SYMBOL(swiotlb_alloc_coherent);
 EXPORT_SYMBOL(swiotlb_free_coherent);
 EXPORT_SYMBOL(swiotlb_dma_supported);
diff -puN arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_error-fix arch/ia64/sn/io/machvec/pci_dma.c
--- 25/arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_error-fix	2004-03-22 11:49:14.775055592 -0800
+++ 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c	2004-03-22 12:18:29.637275984 -0800
@@ -652,6 +652,13 @@ sn_dma_sync_sg_for_device(struct device 
 }
 EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
 
+int
+sn_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
+EXPORT_SYMBOL(sn_dma_error);
 EXPORT_SYMBOL(sn_pci_unmap_single);
 EXPORT_SYMBOL(sn_pci_map_single);
 EXPORT_SYMBOL(sn_pci_dma_sync_single_for_cpu);
diff -puN arch/ia64/hp/common/sba_iommu.c~ia64-dma_error-fix arch/ia64/hp/common/sba_iommu.c
--- 25/arch/ia64/hp/common/sba_iommu.c~ia64-dma_error-fix	2004-03-22 12:18:53.934582232 -0800
+++ 25-akpm/arch/ia64/hp/common/sba_iommu.c	2004-03-22 12:18:53.960578280 -0800
@@ -1979,6 +1979,12 @@ sba_dma_supported (struct device *dev, u
 	return ((mask & 0xFFFFFFFFUL) = 0xFFFFFFFFUL);
 }
 
+int
+sba_dma_error (dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 __setup("nosbagart", nosbagart);
 
 static int __init
@@ -2004,6 +2010,7 @@ sba_page_override(char *str)
 
 __setup("sbapagesize=",sba_page_override);
 
+EXPORT_SYMBOL(sba_dma_error);
 EXPORT_SYMBOL(sba_map_single);
 EXPORT_SYMBOL(sba_unmap_single);
 EXPORT_SYMBOL(sba_map_sg);
diff -puN drivers/ide/ide-cd.c~ia64-dma_error-fix drivers/ide/ide-cd.c
--- 25/drivers/ide/ide-cd.c~ia64-dma_error-fix	2004-03-22 12:19:33.862512264 -0800
+++ 25-akpm/drivers/ide/ide-cd.c	2004-03-22 12:19:33.867511504 -0800
@@ -1044,7 +1044,7 @@ static ide_startstop_t cdrom_read_intr (
 	int ireason, len, sectors_to_transfer, nskip;
 	struct cdrom_info *info = drive->driver_data;
 	u8 lowcyl = 0, highcyl = 0;
-	int dma = info->dma, dma_error = 0;
+	int dma = info->dma, dma_err = 0;
 
 	struct request *rq = HWGROUP(drive)->rq;
 
@@ -1053,7 +1053,7 @@ static ide_startstop_t cdrom_read_intr (
 	 */
 	if (dma) {
 		info->dma = 0;
-		if ((dma_error = HWIF(drive)->ide_dma_end(drive)))
+		if ((dma_err = HWIF(drive)->ide_dma_end(drive)))
 			__ide_dma_off(drive);
 	}
 
@@ -1061,7 +1061,7 @@ static ide_startstop_t cdrom_read_intr (
 		return ide_stopped;
 
 	if (dma) {
-		if (!dma_error) {
+		if (!dma_err) {
 			ide_end_request(drive, 1, rq->nr_sectors);
 			return ide_stopped;
 		} else
@@ -1645,17 +1645,17 @@ static ide_startstop_t cdrom_newpc_intr(
 {
 	struct cdrom_info *info = drive->driver_data;
 	struct request *rq = HWGROUP(drive)->rq;
-	int dma_error, dma, stat, ireason, len, thislen;
+	int dma_err, dma, stat, ireason, len, thislen;
 	u8 lowcyl, highcyl;
 	xfer_func_t *xferfunc;
 	unsigned long flags;
 
 	/* Check for errors. */
-	dma_error = 0;
+	dma_err = 0;
 	dma = info->dma;
 	if (dma) {
 		info->dma = 0;
-		dma_error = HWIF(drive)->ide_dma_end(drive);
+		dma_err = HWIF(drive)->ide_dma_end(drive);
 	}
 
 	if (cdrom_decode_status(drive, 0, &stat)) {
@@ -1671,7 +1671,7 @@ static ide_startstop_t cdrom_newpc_intr(
 	 * using dma, transfer is complete now
 	 */
 	if (dma) {
-		if (dma_error) {
+		if (dma_err) {
 			printk("ide-cd: dma error\n");
 			__ide_dma_off(drive);
 			return DRIVER(drive)->error(drive, "dma error", stat);
@@ -1790,7 +1790,7 @@ static ide_startstop_t cdrom_write_intr(
 {
 	int stat, ireason, len, sectors_to_transfer, uptodate;
 	struct cdrom_info *info = drive->driver_data;
-	int dma_error = 0, dma = info->dma;
+	int dma_err = 0, dma = info->dma;
 	u8 lowcyl = 0, highcyl = 0;
 
 	struct request *rq = HWGROUP(drive)->rq;
@@ -1798,7 +1798,7 @@ static ide_startstop_t cdrom_write_intr(
 	/* Check for errors. */
 	if (dma) {
 		info->dma = 0;
-		if ((dma_error = HWIF(drive)->ide_dma_end(drive))) {
+		if ((dma_err = HWIF(drive)->ide_dma_end(drive))) {
 			printk("ide-cd: write dma error\n");
 			__ide_dma_off(drive);
 		}
@@ -1811,7 +1811,7 @@ static ide_startstop_t cdrom_write_intr(
 	 * using dma, transfer is complete now
 	 */
 	if (dma) {
-		if (dma_error)
+		if (dma_err)
 			return DRIVER(drive)->error(drive, "dma error", stat);
 
 		ide_end_request(drive, 1, rq->nr_sectors);

_


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (6 preceding siblings ...)
  2004-03-22 20:21 ` Andrew Morton
@ 2004-03-22 21:37 ` Bjorn Helgaas
  2004-03-22 21:58 ` Andrew Morton
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Bjorn Helgaas @ 2004-03-22 21:37 UTC (permalink / raw)
  To: linux-ia64

On Monday 22 March 2004 1:21 pm, Andrew Morton wrote:
> gack, what a fiasco.
> 
> Here's a new patch which includes everyone's 2000 millicents' worth:

Not to prolong the agony, but using the following asm-ia64/dma-mapping.h
patch fixes the namespace pollution problem, obviating the need for the
ide-cd.c patch:

=== include/asm-ia64/dma-mapping.h 1.3 vs edited ==--- 1.3/include/asm-ia64/dma-mapping.h	Sat Mar 13 23:54:58 2004
+++ edited/include/asm-ia64/dma-mapping.h	Mon Mar 22 14:29:43 2004
@@ -19,6 +19,12 @@
 #define dma_sync_single_for_device platform_dma_sync_single_for_device
 #define dma_sync_sg_for_device	platform_dma_sync_sg_for_device
 
+/* inline function to avoid namespace pollution */
+static inline int dma_error (dma_addr_t dma_addr)
+{
+	return platform_dma_error(dma_addr);
+}
+
 #define dma_map_page(dev, pg, off, size, dir)				\
 	dma_map_single(dev, page_address(pg) + (off), (size), (dir))
 #define dma_unmap_page(dev, dma_addr, size, dir)			\

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (7 preceding siblings ...)
  2004-03-22 21:37 ` Bjorn Helgaas
@ 2004-03-22 21:58 ` Andrew Morton
  2004-03-22 22:23 ` Bjorn Helgaas
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2004-03-22 21:58 UTC (permalink / raw)
  To: linux-ia64

Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>
> On Monday 22 March 2004 1:21 pm, Andrew Morton wrote:
> > gack, what a fiasco.
> > 
> > Here's a new patch which includes everyone's 2000 millicents' worth:
> 
> Not to prolong the agony, but using the following asm-ia64/dma-mapping.h
> patch fixes the namespace pollution problem, obviating the need for the
> ide-cd.c patch:

OK, updated rollup:


 25-akpm/arch/ia64/hp/common/sba_iommu.c   |    7 +++++++
 25-akpm/arch/ia64/lib/swiotlb.c           |    7 +++++++
 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c |    7 +++++++
 25-akpm/include/asm-ia64/dma-mapping.h    |    7 +++++++
 25-akpm/include/asm-ia64/machvec.h        |    8 ++++++++
 25-akpm/include/asm-ia64/machvec_hpzx1.h  |    2 ++
 25-akpm/include/asm-ia64/machvec_sn2.h    |    2 ++
 7 files changed, 40 insertions(+)

diff -puN arch/ia64/hp/common/sba_iommu.c~ia64-dma_error-fix arch/ia64/hp/common/sba_iommu.c
--- 25/arch/ia64/hp/common/sba_iommu.c~ia64-dma_error-fix	Mon Mar 22 13:57:05 2004
+++ 25-akpm/arch/ia64/hp/common/sba_iommu.c	Mon Mar 22 13:57:05 2004
@@ -1979,6 +1979,12 @@ sba_dma_supported (struct device *dev, u
 	return ((mask & 0xFFFFFFFFUL) = 0xFFFFFFFFUL);
 }
 
+int
+sba_dma_error (dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 __setup("nosbagart", nosbagart);
 
 static int __init
@@ -2004,6 +2010,7 @@ sba_page_override(char *str)
 
 __setup("sbapagesize=",sba_page_override);
 
+EXPORT_SYMBOL(sba_dma_error);
 EXPORT_SYMBOL(sba_map_single);
 EXPORT_SYMBOL(sba_unmap_single);
 EXPORT_SYMBOL(sba_map_sg);
diff -puN arch/ia64/lib/swiotlb.c~ia64-dma_error-fix arch/ia64/lib/swiotlb.c
--- 25/arch/ia64/lib/swiotlb.c~ia64-dma_error-fix	Mon Mar 22 13:57:05 2004
+++ 25-akpm/arch/ia64/lib/swiotlb.c	Mon Mar 22 13:57:05 2004
@@ -498,6 +498,12 @@ swiotlb_sync_sg_for_device (struct devic
 			sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir);
 }
 
+int
+swiotlb_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 /*
  * Return whether the given PCI device DMA address mask can be supported properly.  For
  * example, if your device can only drive the low 24-bits during PCI bus mastering, then
@@ -518,6 +524,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_cp
 EXPORT_SYMBOL(swiotlb_sync_single_for_device);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
+EXPORT_SYMBOL(swiotlb_dma_error);
 EXPORT_SYMBOL(swiotlb_alloc_coherent);
 EXPORT_SYMBOL(swiotlb_free_coherent);
 EXPORT_SYMBOL(swiotlb_dma_supported);
diff -puN arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_error-fix arch/ia64/sn/io/machvec/pci_dma.c
--- 25/arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_error-fix	Mon Mar 22 13:57:05 2004
+++ 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c	Mon Mar 22 13:57:05 2004
@@ -652,6 +652,13 @@ sn_dma_sync_sg_for_device(struct device 
 }
 EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
 
+int
+sn_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
+EXPORT_SYMBOL(sn_dma_error);
 EXPORT_SYMBOL(sn_pci_unmap_single);
 EXPORT_SYMBOL(sn_pci_map_single);
 EXPORT_SYMBOL(sn_pci_dma_sync_single_for_cpu);
diff -puN include/asm-ia64/dma-mapping.h~ia64-dma_error-fix include/asm-ia64/dma-mapping.h
--- 25/include/asm-ia64/dma-mapping.h~ia64-dma_error-fix	Mon Mar 22 13:57:05 2004
+++ 25-akpm/include/asm-ia64/dma-mapping.h	Mon Mar 22 13:57:15 2004
@@ -18,6 +18,13 @@
 #define dma_sync_sg_for_cpu	platform_dma_sync_sg_for_cpu
 #define dma_sync_single_for_device platform_dma_sync_single_for_device
 #define dma_sync_sg_for_device	platform_dma_sync_sg_for_device
+#define dma_error		platform_dma_error
+
+/* inline function to avoid namespace pollution */
+static inline int dma_error (dma_addr_t dma_addr)
+{
+	return platform_dma_error(dma_addr);
+}
 
 #define dma_map_page(dev, pg, off, size, dir)				\
 	dma_map_single(dev, page_address(pg) + (off), (size), (dir))
diff -puN include/asm-ia64/machvec.h~ia64-dma_error-fix include/asm-ia64/machvec.h
--- 25/include/asm-ia64/machvec.h~ia64-dma_error-fix	Mon Mar 22 13:57:05 2004
+++ 25-akpm/include/asm-ia64/machvec.h	Mon Mar 22 13:57:05 2004
@@ -46,6 +46,7 @@ typedef void ia64_mv_dma_sync_single_for
 typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
 typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
 typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
+typedef int ia64_mv_dma_error (dma_addr_t dma_addr);
 typedef int ia64_mv_dma_supported (struct device *, u64);
 
 /*
@@ -110,6 +111,7 @@ extern void machvec_memory_fence (void);
 #  define platform_dma_sync_sg_for_cpu	ia64_mv.dma_sync_sg_for_cpu
 #  define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device
 #  define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device
+#  define platform_dma_error		ia64_mv.dma_error
 #  define platform_dma_supported	ia64_mv.dma_supported
 #  define platform_irq_desc		ia64_mv.irq_desc
 #  define platform_irq_to_vector	ia64_mv.irq_to_vector
@@ -158,6 +160,7 @@ struct ia64_machine_vector {
 	ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
 	ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
 	ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
+	ia64_mv_dma_error *dma_error;
 	ia64_mv_dma_supported *dma_supported;
 	ia64_mv_irq_desc *irq_desc;
 	ia64_mv_irq_to_vector *irq_to_vector;
@@ -202,6 +205,7 @@ struct ia64_machine_vector {
 	platform_dma_sync_sg_for_cpu,		\
 	platform_dma_sync_single_for_device,	\
 	platform_dma_sync_sg_for_device,	\
+	platform_dma_error,			\
 	platform_dma_supported,			\
 	platform_irq_desc,			\
 	platform_irq_to_vector,			\
@@ -243,6 +247,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	swiotlb_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device swiotlb_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	swiotlb_sync_sg_for_device;
+extern ia64_mv_dma_error		swiotlb_dma_error;
 extern ia64_mv_dma_supported		swiotlb_dma_supported;
 
 /*
@@ -312,6 +317,9 @@ extern ia64_mv_dma_supported		swiotlb_dm
 #ifndef platform_dma_sync_sg_for_device
 # define platform_dma_sync_sg_for_device	swiotlb_sync_sg_for_device
 #endif
+#ifndef platform_dma_error
+# define platform_dma_error		swiotlb_dma_error
+#endif
 #ifndef platform_dma_supported
 # define  platform_dma_supported	swiotlb_dma_supported
 #endif
diff -puN include/asm-ia64/machvec_hpzx1.h~ia64-dma_error-fix include/asm-ia64/machvec_hpzx1.h
--- 25/include/asm-ia64/machvec_hpzx1.h~ia64-dma_error-fix	Mon Mar 22 13:57:05 2004
+++ 25-akpm/include/asm-ia64/machvec_hpzx1.h	Mon Mar 22 13:57:05 2004
@@ -9,6 +9,7 @@ extern ia64_mv_dma_unmap_single		sba_unm
 extern ia64_mv_dma_map_sg		sba_map_sg;
 extern ia64_mv_dma_unmap_sg		sba_unmap_sg;
 extern ia64_mv_dma_supported		sba_dma_supported;
+extern ia64_mv_dma_error		sba_dma_error;
 
 /*
  * This stuff has dual use!
@@ -31,5 +32,6 @@ extern ia64_mv_dma_supported		sba_dma_su
 #define platform_dma_sync_single_for_device ((ia64_mv_dma_sync_single_for_device *) machvec_memory_fence)
 #define platform_dma_sync_sg_for_device	((ia64_mv_dma_sync_sg_for_device *) machvec_memory_fence)
 #define platform_dma_supported		sba_dma_supported
+#define platform_dma_error		sba_dma_error
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
diff -puN include/asm-ia64/machvec_sn2.h~ia64-dma_error-fix include/asm-ia64/machvec_sn2.h
--- 25/include/asm-ia64/machvec_sn2.h~ia64-dma_error-fix	Mon Mar 22 13:57:05 2004
+++ 25-akpm/include/asm-ia64/machvec_sn2.h	Mon Mar 22 13:57:05 2004
@@ -66,6 +66,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	sn_dma_sync_sg_for_device;
+extern ia64_mv_dma_error	sn_dma_error;
 extern ia64_mv_dma_supported		sn_dma_supported;
 
 /*
@@ -111,6 +112,7 @@ extern ia64_mv_dma_supported		sn_dma_sup
 #define platform_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu
 #define platform_dma_sync_single_for_device sn_dma_sync_single_for_device
 #define platform_dma_sync_sg_for_device	sn_dma_sync_sg_for_device
+#define platform_dma_error		sn_dma_error
 #define platform_dma_supported		sn_dma_supported
 
 #include <asm/sn/sn2/io.h>

_


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (8 preceding siblings ...)
  2004-03-22 21:58 ` Andrew Morton
@ 2004-03-22 22:23 ` Bjorn Helgaas
  2004-03-22 22:35 ` Andrew Morton
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Bjorn Helgaas @ 2004-03-22 22:23 UTC (permalink / raw)
  To: linux-ia64

On Monday 22 March 2004 2:58 pm, Andrew Morton wrote:
> > Not to prolong the agony, but using the following asm-ia64/dma-mapping.h
> > patch fixes the namespace pollution problem, obviating the need for the
> > ide-cd.c patch:
> 
> OK, updated rollup:

Oops, I meant for my dma-mapping.h patch to be *instead of*
yours.  It's definitely a Monday :-)

OK, 2.5 + your updated rollup + the patch below builds
and boots for me (generic_defconfig):

=== include/asm-ia64/dma-mapping.h 1.4 vs edited ==--- 1.4/include/asm-ia64/dma-mapping.h	Mon Mar 22 15:09:49 2004
+++ edited/include/asm-ia64/dma-mapping.h	Mon Mar 22 15:12:26 2004
@@ -18,7 +18,6 @@
 #define dma_sync_sg_for_cpu	platform_dma_sync_sg_for_cpu
 #define dma_sync_single_for_device platform_dma_sync_single_for_device
 #define dma_sync_sg_for_device	platform_dma_sync_sg_for_device
-#define dma_error		platform_dma_error
 
 /* inline function to avoid namespace pollution */
 static inline int dma_error (dma_addr_t dma_addr)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (9 preceding siblings ...)
  2004-03-22 22:23 ` Bjorn Helgaas
@ 2004-03-22 22:35 ` Andrew Morton
  2004-03-22 22:55 ` Bjorn Helgaas
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2004-03-22 22:35 UTC (permalink / raw)
  To: linux-ia64

Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>
> n Monday 22 March 2004 2:58 pm, Andrew Morton wrote:
> > > Not to prolong the agony, but using the following asm-ia64/dma-mapping.h
> > > patch fixes the namespace pollution problem, obviating the need for the
> > > ide-cd.c patch:
> > 
> > OK, updated rollup:
> 
> Oops, I meant for my dma-mapping.h patch to be *instead of*
> yours.  It's definitely a Monday :-)
> 
> OK, 2.5 + your updated rollup + the patch below builds
> and boots for me (generic_defconfig):

OK.  Latest version:


 25-akpm/arch/ia64/hp/common/sba_iommu.c   |    7 +++++++
 25-akpm/arch/ia64/lib/swiotlb.c           |    7 +++++++
 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c |    7 +++++++
 25-akpm/include/asm-ia64/dma-mapping.h    |    6 ++++++
 25-akpm/include/asm-ia64/machvec.h        |    8 ++++++++
 25-akpm/include/asm-ia64/machvec_hpzx1.h  |    2 ++
 25-akpm/include/asm-ia64/machvec_sn2.h    |    2 ++
 7 files changed, 39 insertions(+)

diff -puN arch/ia64/hp/common/sba_iommu.c~ia64-dma_error-fix arch/ia64/hp/common/sba_iommu.c
--- 25/arch/ia64/hp/common/sba_iommu.c~ia64-dma_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/arch/ia64/hp/common/sba_iommu.c	Mon Mar 22 14:34:46 2004
@@ -1979,6 +1979,12 @@ sba_dma_supported (struct device *dev, u
 	return ((mask & 0xFFFFFFFFUL) = 0xFFFFFFFFUL);
 }
 
+int
+sba_dma_error (dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 __setup("nosbagart", nosbagart);
 
 static int __init
@@ -2004,6 +2010,7 @@ sba_page_override(char *str)
 
 __setup("sbapagesize=",sba_page_override);
 
+EXPORT_SYMBOL(sba_dma_error);
 EXPORT_SYMBOL(sba_map_single);
 EXPORT_SYMBOL(sba_unmap_single);
 EXPORT_SYMBOL(sba_map_sg);
diff -puN arch/ia64/lib/swiotlb.c~ia64-dma_error-fix arch/ia64/lib/swiotlb.c
--- 25/arch/ia64/lib/swiotlb.c~ia64-dma_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/arch/ia64/lib/swiotlb.c	Mon Mar 22 14:34:46 2004
@@ -498,6 +498,12 @@ swiotlb_sync_sg_for_device (struct devic
 			sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir);
 }
 
+int
+swiotlb_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 /*
  * Return whether the given PCI device DMA address mask can be supported properly.  For
  * example, if your device can only drive the low 24-bits during PCI bus mastering, then
@@ -518,6 +524,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_cp
 EXPORT_SYMBOL(swiotlb_sync_single_for_device);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
+EXPORT_SYMBOL(swiotlb_dma_error);
 EXPORT_SYMBOL(swiotlb_alloc_coherent);
 EXPORT_SYMBOL(swiotlb_free_coherent);
 EXPORT_SYMBOL(swiotlb_dma_supported);
diff -puN arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_error-fix arch/ia64/sn/io/machvec/pci_dma.c
--- 25/arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c	Mon Mar 22 14:34:46 2004
@@ -652,6 +652,13 @@ sn_dma_sync_sg_for_device(struct device 
 }
 EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
 
+int
+sn_dma_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
+EXPORT_SYMBOL(sn_dma_error);
 EXPORT_SYMBOL(sn_pci_unmap_single);
 EXPORT_SYMBOL(sn_pci_map_single);
 EXPORT_SYMBOL(sn_pci_dma_sync_single_for_cpu);
diff -puN include/asm-ia64/dma-mapping.h~ia64-dma_error-fix include/asm-ia64/dma-mapping.h
--- 25/include/asm-ia64/dma-mapping.h~ia64-dma_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/include/asm-ia64/dma-mapping.h	Mon Mar 22 14:35:03 2004
@@ -19,6 +19,12 @@
 #define dma_sync_single_for_device platform_dma_sync_single_for_device
 #define dma_sync_sg_for_device	platform_dma_sync_sg_for_device
 
+/* inline function to avoid namespace pollution */
+static inline int dma_error (dma_addr_t dma_addr)
+{
+	return platform_dma_error(dma_addr);
+}
+
 #define dma_map_page(dev, pg, off, size, dir)				\
 	dma_map_single(dev, page_address(pg) + (off), (size), (dir))
 #define dma_unmap_page(dev, dma_addr, size, dir)			\
diff -puN include/asm-ia64/machvec.h~ia64-dma_error-fix include/asm-ia64/machvec.h
--- 25/include/asm-ia64/machvec.h~ia64-dma_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/include/asm-ia64/machvec.h	Mon Mar 22 14:34:46 2004
@@ -46,6 +46,7 @@ typedef void ia64_mv_dma_sync_single_for
 typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
 typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
 typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
+typedef int ia64_mv_dma_error (dma_addr_t dma_addr);
 typedef int ia64_mv_dma_supported (struct device *, u64);
 
 /*
@@ -110,6 +111,7 @@ extern void machvec_memory_fence (void);
 #  define platform_dma_sync_sg_for_cpu	ia64_mv.dma_sync_sg_for_cpu
 #  define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device
 #  define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device
+#  define platform_dma_error		ia64_mv.dma_error
 #  define platform_dma_supported	ia64_mv.dma_supported
 #  define platform_irq_desc		ia64_mv.irq_desc
 #  define platform_irq_to_vector	ia64_mv.irq_to_vector
@@ -158,6 +160,7 @@ struct ia64_machine_vector {
 	ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
 	ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
 	ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
+	ia64_mv_dma_error *dma_error;
 	ia64_mv_dma_supported *dma_supported;
 	ia64_mv_irq_desc *irq_desc;
 	ia64_mv_irq_to_vector *irq_to_vector;
@@ -202,6 +205,7 @@ struct ia64_machine_vector {
 	platform_dma_sync_sg_for_cpu,		\
 	platform_dma_sync_single_for_device,	\
 	platform_dma_sync_sg_for_device,	\
+	platform_dma_error,			\
 	platform_dma_supported,			\
 	platform_irq_desc,			\
 	platform_irq_to_vector,			\
@@ -243,6 +247,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	swiotlb_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device swiotlb_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	swiotlb_sync_sg_for_device;
+extern ia64_mv_dma_error		swiotlb_dma_error;
 extern ia64_mv_dma_supported		swiotlb_dma_supported;
 
 /*
@@ -312,6 +317,9 @@ extern ia64_mv_dma_supported		swiotlb_dm
 #ifndef platform_dma_sync_sg_for_device
 # define platform_dma_sync_sg_for_device	swiotlb_sync_sg_for_device
 #endif
+#ifndef platform_dma_error
+# define platform_dma_error		swiotlb_dma_error
+#endif
 #ifndef platform_dma_supported
 # define  platform_dma_supported	swiotlb_dma_supported
 #endif
diff -puN include/asm-ia64/machvec_hpzx1.h~ia64-dma_error-fix include/asm-ia64/machvec_hpzx1.h
--- 25/include/asm-ia64/machvec_hpzx1.h~ia64-dma_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/include/asm-ia64/machvec_hpzx1.h	Mon Mar 22 14:34:46 2004
@@ -9,6 +9,7 @@ extern ia64_mv_dma_unmap_single		sba_unm
 extern ia64_mv_dma_map_sg		sba_map_sg;
 extern ia64_mv_dma_unmap_sg		sba_unmap_sg;
 extern ia64_mv_dma_supported		sba_dma_supported;
+extern ia64_mv_dma_error		sba_dma_error;
 
 /*
  * This stuff has dual use!
@@ -31,5 +32,6 @@ extern ia64_mv_dma_supported		sba_dma_su
 #define platform_dma_sync_single_for_device ((ia64_mv_dma_sync_single_for_device *) machvec_memory_fence)
 #define platform_dma_sync_sg_for_device	((ia64_mv_dma_sync_sg_for_device *) machvec_memory_fence)
 #define platform_dma_supported		sba_dma_supported
+#define platform_dma_error		sba_dma_error
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
diff -puN include/asm-ia64/machvec_sn2.h~ia64-dma_error-fix include/asm-ia64/machvec_sn2.h
--- 25/include/asm-ia64/machvec_sn2.h~ia64-dma_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/include/asm-ia64/machvec_sn2.h	Mon Mar 22 14:34:46 2004
@@ -66,6 +66,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	sn_dma_sync_sg_for_device;
+extern ia64_mv_dma_error	sn_dma_error;
 extern ia64_mv_dma_supported		sn_dma_supported;
 
 /*
@@ -111,6 +112,7 @@ extern ia64_mv_dma_supported		sn_dma_sup
 #define platform_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu
 #define platform_dma_sync_single_for_device sn_dma_sync_single_for_device
 #define platform_dma_sync_sg_for_device	sn_dma_sync_sg_for_device
+#define platform_dma_error		sn_dma_error
 #define platform_dma_supported		sn_dma_supported
 
 #include <asm/sn/sn2/io.h>

_


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (10 preceding siblings ...)
  2004-03-22 22:35 ` Andrew Morton
@ 2004-03-22 22:55 ` Bjorn Helgaas
  2004-03-23  7:04 ` Jens Axboe
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Bjorn Helgaas @ 2004-03-22 22:55 UTC (permalink / raw)
  To: linux-ia64

On Monday 22 March 2004 3:35 pm, Andrew Morton wrote:
> > OK, 2.5 + your updated rollup + the patch below builds
> > and boots for me (generic_defconfig):
> 
> OK.  Latest version:

I built and booted this (generic_defconfig) with no problems.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (11 preceding siblings ...)
  2004-03-22 22:55 ` Bjorn Helgaas
@ 2004-03-23  7:04 ` Jens Axboe
  2004-03-23 18:00 ` David Mosberger
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Jens Axboe @ 2004-03-23  7:04 UTC (permalink / raw)
  To: linux-ia64

On Mon, Mar 22 2004, Bjorn Helgaas wrote:
> On Monday 22 March 2004 1:21 pm, Andrew Morton wrote:
> > gack, what a fiasco.
> > 
> > Here's a new patch which includes everyone's 2000 millicents' worth:
> 
> Not to prolong the agony, but using the following asm-ia64/dma-mapping.h
> patch fixes the namespace pollution problem, obviating the need for the
> ide-cd.c patch:
> 
> === include/asm-ia64/dma-mapping.h 1.3 vs edited ==> --- 1.3/include/asm-ia64/dma-mapping.h	Sat Mar 13 23:54:58 2004
> +++ edited/include/asm-ia64/dma-mapping.h	Mon Mar 22 14:29:43 2004
> @@ -19,6 +19,12 @@
>  #define dma_sync_single_for_device platform_dma_sync_single_for_device
>  #define dma_sync_sg_for_device	platform_dma_sync_sg_for_device
>  
> +/* inline function to avoid namespace pollution */
> +static inline int dma_error (dma_addr_t dma_addr)
> +{
> +	return platform_dma_error(dma_addr);
> +}
> +

Yeah, apparently it's kernel wide damage already, super.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (12 preceding siblings ...)
  2004-03-23  7:04 ` Jens Axboe
@ 2004-03-23 18:00 ` David Mosberger
  2004-03-23 18:08 ` Andrew Morton
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: David Mosberger @ 2004-03-23 18:00 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Mon, 22 Mar 2004 14:37:58 -0700, Bjorn Helgaas <bjorn.helgaas@hp.com> said:

  Bjorn> On Monday 22 March 2004 1:21 pm, Andrew Morton wrote:
  >> gack, what a fiasco.

  >> Here's a new patch which includes everyone's 2000 millicents'
  >> worth:

  Bjorn> Not to prolong the agony, but using the following
  Bjorn> asm-ia64/dma-mapping.h patch fixes the namespace pollution
  Bjorn> problem, obviating the need for the ide-cd.c patch:

But let's put the blame where it belongs: the name space was
"polluted" by introducing dma_error().  It certainly must be
legal to implement basic APIs using macros.

	--david

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (13 preceding siblings ...)
  2004-03-23 18:00 ` David Mosberger
@ 2004-03-23 18:08 ` Andrew Morton
  2004-03-23 18:16 ` Andrew Morton
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2004-03-23 18:08 UTC (permalink / raw)
  To: linux-ia64

David Mosberger <davidm@napali.hpl.hp.com> wrote:
>
> >>>>> On Mon, 22 Mar 2004 14:37:58 -0700, Bjorn Helgaas <bjorn.helgaas@hp.com> said:
> 
>   Bjorn> On Monday 22 March 2004 1:21 pm, Andrew Morton wrote:
>   >> gack, what a fiasco.
> 
>   >> Here's a new patch which includes everyone's 2000 millicents'
>   >> worth:
> 
>   Bjorn> Not to prolong the agony, but using the following
>   Bjorn> asm-ia64/dma-mapping.h patch fixes the namespace pollution
>   Bjorn> problem, obviating the need for the ide-cd.c patch:
> 
> But let's put the blame where it belongs: the name space was
> "polluted" by introducing dma_error().  It certainly must be
> legal to implement basic APIs using macros.

yes, perhaps it's not too late to change it.  Anton, what will this break?

---

 25-akpm/Documentation/DMA-API.txt            |    6 +++---
 25-akpm/Documentation/DMA-mapping.txt        |    4 ++--
 25-akpm/include/asm-generic/dma-mapping.h    |    4 ++--
 25-akpm/include/asm-generic/pci-dma-compat.h |    4 ++--
 25-akpm/include/asm-i386/dma-mapping.h       |    2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff -puN Documentation/DMA-API.txt~rename-dma_error Documentation/DMA-API.txt
--- 25/Documentation/DMA-API.txt~rename-dma_error	2004-03-23 10:07:25.799844696 -0800
+++ 25-akpm/Documentation/DMA-API.txt	2004-03-23 10:08:05.309838264 -0800
@@ -279,14 +279,14 @@ recommended that you never use these unl
 cache width is.
 
 int
-dma_error(dma_addr_t dma_addr)
+dma_mapping_error(dma_addr_t dma_addr)
 
 int
-pci_dma_error(dma_addr_t dma_addr)
+pci_dma_mapping_error(dma_addr_t dma_addr)
 
 In some circumstances dma_map_single and dma_map_page will fail to create
 a mapping. A driver can check for these errors by testing the returned
-dma address with dma_error(). A non zero return value means the mapping
+dma address with dma_mapping_error(). A non zero return value means the mapping
 could not be created and the driver should take appropriate action (eg
 reduce current DMA mapping usage or delay and try again later).
 
diff -puN Documentation/DMA-mapping.txt~rename-dma_error Documentation/DMA-mapping.txt
--- 25/Documentation/DMA-mapping.txt~rename-dma_error	2004-03-23 10:07:25.816842112 -0800
+++ 25-akpm/Documentation/DMA-mapping.txt	2004-03-23 10:08:09.533196216 -0800
@@ -850,12 +850,12 @@ failure can be determined by:
 - checking if pci_alloc_consistent returns NULL or pci_map_sg returns 0
 
 - checking the returned dma_addr_t of pci_map_single and pci_map_page
-  by using pci_dma_error():
+  by using pci_dma_mapping_error():
 
 	dma_addr_t dma_handle;
 
 	dma_handle = pci_map_single(dev, addr, size, direction);
-	if (pci_dma_error(dma_handle)) {
+	if (pci_dma_mapping_error(dma_handle)) {
 		/*
 		 * reduce current DMA mapping usage,
 		 * delay and try again later or
diff -puN include/asm-generic/dma-mapping.h~rename-dma_error include/asm-generic/dma-mapping.h
--- 25/include/asm-generic/dma-mapping.h~rename-dma_error	2004-03-23 10:07:25.845837704 -0800
+++ 25-akpm/include/asm-generic/dma-mapping.h	2004-03-23 10:08:13.036663608 -0800
@@ -141,9 +141,9 @@ dma_sync_sg_for_device(struct device *de
 }
 
 static inline int
-dma_error(dma_addr_t dma_addr)
+dma_mapping_error(dma_addr_t dma_addr)
 {
-	return pci_dma_error(dma_addr);
+	return pci_dma_mapping_error(dma_addr);
 }
 
 /* Now for the API extensions over the pci_ one */
diff -puN include/asm-generic/pci-dma-compat.h~rename-dma_error include/asm-generic/pci-dma-compat.h
--- 25/include/asm-generic/pci-dma-compat.h~rename-dma_error	2004-03-23 10:07:25.861835272 -0800
+++ 25-akpm/include/asm-generic/pci-dma-compat.h	2004-03-23 10:08:16.571126288 -0800
@@ -99,9 +99,9 @@ pci_dma_sync_sg_for_device(struct pci_de
 }
 
 static inline int
-pci_dma_error(dma_addr_t dma_addr)
+pci_dma_mapping_error(dma_addr_t dma_addr)
 {
-	return dma_error(dma_addr);
+	return dma_mapping_error(dma_addr);
 }
 
 #endif
diff -puN include/asm-i386/dma-mapping.h~rename-dma_error include/asm-i386/dma-mapping.h
--- 25/include/asm-i386/dma-mapping.h~rename-dma_error	2004-03-23 10:07:25.878832688 -0800
+++ 25-akpm/include/asm-i386/dma-mapping.h	2004-03-23 10:08:21.434386960 -0800
@@ -111,7 +111,7 @@ dma_sync_sg_for_device(struct device *de
 }
 
 static inline int
-dma_error(dma_addr_t dma_addr)
+dma_mapping_error(dma_addr_t dma_addr)
 {
 	return 0;
 }

_


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (14 preceding siblings ...)
  2004-03-23 18:08 ` Andrew Morton
@ 2004-03-23 18:16 ` Andrew Morton
  2004-03-23 18:17 ` Andrew Morton
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2004-03-23 18:16 UTC (permalink / raw)
  To: linux-ia64

Andrew Morton <akpm@osdl.org> wrote:
>
> > But let's put the blame where it belongs: the name space was
>  > "polluted" by introducing dma_error().  It certainly must be
>  > legal to implement basic APIs using macros.
> 
>  yes, perhaps it's not too late to change it.  Anton, what will this break?

Here's a completer patch.  I'll submit this I think.



We're getting namespace collisions from the new dma_error().  Rename it to
dma_mapping_error().


---

 25-akpm/Documentation/DMA-API.txt            |    6 +++---
 25-akpm/Documentation/DMA-mapping.txt        |    4 ++--
 25-akpm/include/asm-generic/dma-mapping.h    |    4 ++--
 25-akpm/include/asm-generic/pci-dma-compat.h |    4 ++--
 25-akpm/include/asm-i386/dma-mapping.h       |    2 +-
 25-akpm/include/asm-ppc64/pci.h              |    2 +-
 25-akpm/include/asm-sparc64/pci.h            |    2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

diff -puN Documentation/DMA-API.txt~rename-dma_error Documentation/DMA-API.txt
--- 25/Documentation/DMA-API.txt~rename-dma_error	2004-03-23 10:12:37.798413704 -0800
+++ 25-akpm/Documentation/DMA-API.txt	2004-03-23 10:12:37.808412184 -0800
@@ -279,14 +279,14 @@ recommended that you never use these unl
 cache width is.
 
 int
-dma_error(dma_addr_t dma_addr)
+dma_mapping_error(dma_addr_t dma_addr)
 
 int
-pci_dma_error(dma_addr_t dma_addr)
+pci_dma_mapping_error(dma_addr_t dma_addr)
 
 In some circumstances dma_map_single and dma_map_page will fail to create
 a mapping. A driver can check for these errors by testing the returned
-dma address with dma_error(). A non zero return value means the mapping
+dma address with dma_mapping_error(). A non zero return value means the mapping
 could not be created and the driver should take appropriate action (eg
 reduce current DMA mapping usage or delay and try again later).
 
diff -puN Documentation/DMA-mapping.txt~rename-dma_error Documentation/DMA-mapping.txt
--- 25/Documentation/DMA-mapping.txt~rename-dma_error	2004-03-23 10:12:37.799413552 -0800
+++ 25-akpm/Documentation/DMA-mapping.txt	2004-03-23 10:12:37.808412184 -0800
@@ -850,12 +850,12 @@ failure can be determined by:
 - checking if pci_alloc_consistent returns NULL or pci_map_sg returns 0
 
 - checking the returned dma_addr_t of pci_map_single and pci_map_page
-  by using pci_dma_error():
+  by using pci_dma_mapping_error():
 
 	dma_addr_t dma_handle;
 
 	dma_handle = pci_map_single(dev, addr, size, direction);
-	if (pci_dma_error(dma_handle)) {
+	if (pci_dma_mapping_error(dma_handle)) {
 		/*
 		 * reduce current DMA mapping usage,
 		 * delay and try again later or
diff -puN include/asm-generic/dma-mapping.h~rename-dma_error include/asm-generic/dma-mapping.h
--- 25/include/asm-generic/dma-mapping.h~rename-dma_error	2004-03-23 10:12:37.801413248 -0800
+++ 25-akpm/include/asm-generic/dma-mapping.h	2004-03-23 10:12:37.809412032 -0800
@@ -141,9 +141,9 @@ dma_sync_sg_for_device(struct device *de
 }
 
 static inline int
-dma_error(dma_addr_t dma_addr)
+dma_mapping_error(dma_addr_t dma_addr)
 {
-	return pci_dma_error(dma_addr);
+	return pci_dma_mapping_error(dma_addr);
 }
 
 /* Now for the API extensions over the pci_ one */
diff -puN include/asm-generic/pci-dma-compat.h~rename-dma_error include/asm-generic/pci-dma-compat.h
--- 25/include/asm-generic/pci-dma-compat.h~rename-dma_error	2004-03-23 10:12:37.803412944 -0800
+++ 25-akpm/include/asm-generic/pci-dma-compat.h	2004-03-23 10:12:37.809412032 -0800
@@ -99,9 +99,9 @@ pci_dma_sync_sg_for_device(struct pci_de
 }
 
 static inline int
-pci_dma_error(dma_addr_t dma_addr)
+pci_dma_mapping_error(dma_addr_t dma_addr)
 {
-	return dma_error(dma_addr);
+	return dma_mapping_error(dma_addr);
 }
 
 #endif
diff -puN include/asm-i386/dma-mapping.h~rename-dma_error include/asm-i386/dma-mapping.h
--- 25/include/asm-i386/dma-mapping.h~rename-dma_error	2004-03-23 10:12:37.804412792 -0800
+++ 25-akpm/include/asm-i386/dma-mapping.h	2004-03-23 10:12:37.810411880 -0800
@@ -111,7 +111,7 @@ dma_sync_sg_for_device(struct device *de
 }
 
 static inline int
-dma_error(dma_addr_t dma_addr)
+dma_mapping_error(dma_addr_t dma_addr)
 {
 	return 0;
 }
diff -puN include/asm-ppc64/pci.h~rename-dma_error include/asm-ppc64/pci.h
--- 25/include/asm-ppc64/pci.h~rename-dma_error	2004-03-23 10:12:37.806412488 -0800
+++ 25-akpm/include/asm-ppc64/pci.h	2004-03-23 10:12:37.810411880 -0800
@@ -170,7 +170,7 @@ static inline int pci_dac_dma_supported(
 }
 
 #define PCI_DMA_ERROR_CODE      (~(dma_addr_t)0x0)
-static inline int pci_dma_error(dma_addr_t dma_addr)
+static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
 {
 	return (dma_addr = PCI_DMA_ERROR_CODE);
 }
diff -puN include/asm-sparc64/pci.h~rename-dma_error include/asm-sparc64/pci.h
--- 25/include/asm-sparc64/pci.h~rename-dma_error	2004-03-23 10:15:28.991388416 -0800
+++ 25-akpm/include/asm-sparc64/pci.h	2004-03-23 10:15:42.161386272 -0800
@@ -215,7 +215,7 @@ pci_dac_dma_sync_single_for_device(struc
 
 #define PCI_DMA_ERROR_CODE	(~(dma_addr_t)0x0)
 
-static inline int pci_dma_error(dma_addr_t dma_addr)
+static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
 {
 	return (dma_addr = PCI_DMA_ERROR_CODE);
 }

_


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (15 preceding siblings ...)
  2004-03-23 18:16 ` Andrew Morton
@ 2004-03-23 18:17 ` Andrew Morton
  2004-03-24  1:49 ` Anton Blanchard
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2004-03-23 18:17 UTC (permalink / raw)
  To: linux-ia64

Andrew Morton <akpm@osdl.org> wrote:
>
> Andrew Morton <akpm@osdl.org> wrote:
>  >
>  > > But let's put the blame where it belongs: the name space was
>  >  > "polluted" by introducing dma_error().  It certainly must be
>  >  > legal to implement basic APIs using macros.
>  > 
>  >  yes, perhaps it's not too late to change it.  Anton, what will this break?
> 
>  Here's a completer patch.  I'll submit this I think.
> 
> 
> 
>  We're getting namespace collisions from the new dma_error().  Rename it to
>  dma_mapping_error().
> 

Updated ia64 patch:


 25-akpm/arch/ia64/hp/common/sba_iommu.c   |    7 +++++++
 25-akpm/arch/ia64/lib/swiotlb.c           |    7 +++++++
 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c |    7 +++++++
 25-akpm/include/asm-ia64/dma-mapping.h    |    6 ++++++
 25-akpm/include/asm-ia64/machvec.h        |    8 ++++++++
 25-akpm/include/asm-ia64/machvec_hpzx1.h  |    2 ++
 25-akpm/include/asm-ia64/machvec_sn2.h    |    2 ++
 7 files changed, 39 insertions(+)

diff -puN arch/ia64/hp/common/sba_iommu.c~ia64-dma_mapping_error-fix arch/ia64/hp/common/sba_iommu.c
--- 25/arch/ia64/hp/common/sba_iommu.c~ia64-dma_mapping_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/arch/ia64/hp/common/sba_iommu.c	Mon Mar 22 14:34:46 2004
@@ -1979,6 +1979,12 @@ sba_dma_supported (struct device *dev, u
 	return ((mask & 0xFFFFFFFFUL) = 0xFFFFFFFFUL);
 }
 
+int
+sba_dma_mapping_error (dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 __setup("nosbagart", nosbagart);
 
 static int __init
@@ -2004,6 +2010,7 @@ sba_page_override(char *str)
 
 __setup("sbapagesize=",sba_page_override);
 
+EXPORT_SYMBOL(sba_dma_mapping_error);
 EXPORT_SYMBOL(sba_map_single);
 EXPORT_SYMBOL(sba_unmap_single);
 EXPORT_SYMBOL(sba_map_sg);
diff -puN arch/ia64/lib/swiotlb.c~ia64-dma_mapping_error-fix arch/ia64/lib/swiotlb.c
--- 25/arch/ia64/lib/swiotlb.c~ia64-dma_mapping_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/arch/ia64/lib/swiotlb.c	Mon Mar 22 14:34:46 2004
@@ -498,6 +498,12 @@ swiotlb_sync_sg_for_device (struct devic
 			sync_single(hwdev, (void *) sg->dma_address, sg->dma_length, dir);
 }
 
+int
+swiotlb_dma_mapping_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
 /*
  * Return whether the given PCI device DMA address mask can be supported properly.  For
  * example, if your device can only drive the low 24-bits during PCI bus mastering, then
@@ -518,6 +524,7 @@ EXPORT_SYMBOL(swiotlb_sync_single_for_cp
 EXPORT_SYMBOL(swiotlb_sync_single_for_device);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
 EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
+EXPORT_SYMBOL(swiotlb_dma_mapping_error);
 EXPORT_SYMBOL(swiotlb_alloc_coherent);
 EXPORT_SYMBOL(swiotlb_free_coherent);
 EXPORT_SYMBOL(swiotlb_dma_supported);
diff -puN arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_mapping_error-fix arch/ia64/sn/io/machvec/pci_dma.c
--- 25/arch/ia64/sn/io/machvec/pci_dma.c~ia64-dma_mapping_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/arch/ia64/sn/io/machvec/pci_dma.c	Mon Mar 22 14:34:46 2004
@@ -652,6 +652,13 @@ sn_dma_sync_sg_for_device(struct device 
 }
 EXPORT_SYMBOL(sn_dma_sync_sg_for_device);
 
+int
+sn_dma_mapping_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
+EXPORT_SYMBOL(sn_dma_mapping_error);
 EXPORT_SYMBOL(sn_pci_unmap_single);
 EXPORT_SYMBOL(sn_pci_map_single);
 EXPORT_SYMBOL(sn_pci_dma_sync_single_for_cpu);
diff -puN include/asm-ia64/dma-mapping.h~ia64-dma_mapping_error-fix include/asm-ia64/dma-mapping.h
--- 25/include/asm-ia64/dma-mapping.h~ia64-dma_mapping_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/include/asm-ia64/dma-mapping.h	Mon Mar 22 14:35:03 2004
@@ -19,6 +19,12 @@
 #define dma_sync_single_for_device platform_dma_sync_single_for_device
 #define dma_sync_sg_for_device	platform_dma_sync_sg_for_device
 
+/* inline function to avoid namespace pollution */
+static inline int dma_mapping_error (dma_addr_t dma_addr)
+{
+	return platform_dma_mapping_error(dma_addr);
+}
+
 #define dma_map_page(dev, pg, off, size, dir)				\
 	dma_map_single(dev, page_address(pg) + (off), (size), (dir))
 #define dma_unmap_page(dev, dma_addr, size, dir)			\
diff -puN include/asm-ia64/machvec.h~ia64-dma_mapping_error-fix include/asm-ia64/machvec.h
--- 25/include/asm-ia64/machvec.h~ia64-dma_mapping_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/include/asm-ia64/machvec.h	Mon Mar 22 14:34:46 2004
@@ -46,6 +46,7 @@ typedef void ia64_mv_dma_sync_single_for
 typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);
 typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);
 typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);
+typedef int ia64_mv_dma_mapping_error (dma_addr_t dma_addr);
 typedef int ia64_mv_dma_supported (struct device *, u64);
 
 /*
@@ -110,6 +111,7 @@ extern void machvec_memory_fence (void);
 #  define platform_dma_sync_sg_for_cpu	ia64_mv.dma_sync_sg_for_cpu
 #  define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device
 #  define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device
+#  define platform_dma_mapping_error		ia64_mv.dma_mapping_error
 #  define platform_dma_supported	ia64_mv.dma_supported
 #  define platform_irq_desc		ia64_mv.irq_desc
 #  define platform_irq_to_vector	ia64_mv.irq_to_vector
@@ -158,6 +160,7 @@ struct ia64_machine_vector {
 	ia64_mv_dma_sync_sg_for_cpu *dma_sync_sg_for_cpu;
 	ia64_mv_dma_sync_single_for_device *dma_sync_single_for_device;
 	ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device;
+	ia64_mv_dma_mapping_error *dma_mapping_error;
 	ia64_mv_dma_supported *dma_supported;
 	ia64_mv_irq_desc *irq_desc;
 	ia64_mv_irq_to_vector *irq_to_vector;
@@ -202,6 +205,7 @@ struct ia64_machine_vector {
 	platform_dma_sync_sg_for_cpu,		\
 	platform_dma_sync_single_for_device,	\
 	platform_dma_sync_sg_for_device,	\
+	platform_dma_mapping_error,			\
 	platform_dma_supported,			\
 	platform_irq_desc,			\
 	platform_irq_to_vector,			\
@@ -243,6 +247,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	swiotlb_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device swiotlb_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	swiotlb_sync_sg_for_device;
+extern ia64_mv_dma_mapping_error		swiotlb_dma_mapping_error;
 extern ia64_mv_dma_supported		swiotlb_dma_supported;
 
 /*
@@ -312,6 +317,9 @@ extern ia64_mv_dma_supported		swiotlb_dm
 #ifndef platform_dma_sync_sg_for_device
 # define platform_dma_sync_sg_for_device	swiotlb_sync_sg_for_device
 #endif
+#ifndef platform_dma_mapping_error
+# define platform_dma_mapping_error		swiotlb_dma_mapping_error
+#endif
 #ifndef platform_dma_supported
 # define  platform_dma_supported	swiotlb_dma_supported
 #endif
diff -puN include/asm-ia64/machvec_hpzx1.h~ia64-dma_mapping_error-fix include/asm-ia64/machvec_hpzx1.h
--- 25/include/asm-ia64/machvec_hpzx1.h~ia64-dma_mapping_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/include/asm-ia64/machvec_hpzx1.h	Mon Mar 22 14:34:46 2004
@@ -9,6 +9,7 @@ extern ia64_mv_dma_unmap_single		sba_unm
 extern ia64_mv_dma_map_sg		sba_map_sg;
 extern ia64_mv_dma_unmap_sg		sba_unmap_sg;
 extern ia64_mv_dma_supported		sba_dma_supported;
+extern ia64_mv_dma_mapping_error		sba_dma_mapping_error;
 
 /*
  * This stuff has dual use!
@@ -31,5 +32,6 @@ extern ia64_mv_dma_supported		sba_dma_su
 #define platform_dma_sync_single_for_device ((ia64_mv_dma_sync_single_for_device *) machvec_memory_fence)
 #define platform_dma_sync_sg_for_device	((ia64_mv_dma_sync_sg_for_device *) machvec_memory_fence)
 #define platform_dma_supported		sba_dma_supported
+#define platform_dma_mapping_error		sba_dma_mapping_error
 
 #endif /* _ASM_IA64_MACHVEC_HPZX1_h */
diff -puN include/asm-ia64/machvec_sn2.h~ia64-dma_mapping_error-fix include/asm-ia64/machvec_sn2.h
--- 25/include/asm-ia64/machvec_sn2.h~ia64-dma_mapping_error-fix	Mon Mar 22 14:34:46 2004
+++ 25-akpm/include/asm-ia64/machvec_sn2.h	Mon Mar 22 14:34:46 2004
@@ -66,6 +66,7 @@ extern ia64_mv_dma_sync_single_for_cpu	s
 extern ia64_mv_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu;
 extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device;
 extern ia64_mv_dma_sync_sg_for_device	sn_dma_sync_sg_for_device;
+extern ia64_mv_dma_mapping_error	sn_dma_mapping_error;
 extern ia64_mv_dma_supported		sn_dma_supported;
 
 /*
@@ -111,6 +112,7 @@ extern ia64_mv_dma_supported		sn_dma_sup
 #define platform_dma_sync_sg_for_cpu	sn_dma_sync_sg_for_cpu
 #define platform_dma_sync_single_for_device sn_dma_sync_single_for_device
 #define platform_dma_sync_sg_for_device	sn_dma_sync_sg_for_device
+#define platform_dma_mapping_error		sn_dma_mapping_error
 #define platform_dma_supported		sn_dma_supported
 
 #include <asm/sn/sn2/io.h>

_


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (16 preceding siblings ...)
  2004-03-23 18:17 ` Andrew Morton
@ 2004-03-24  1:49 ` Anton Blanchard
  2004-03-24 18:29 ` Bjorn Helgaas
  2004-03-24 18:38 ` David Mosberger
  19 siblings, 0 replies; 21+ messages in thread
From: Anton Blanchard @ 2004-03-24  1:49 UTC (permalink / raw)
  To: linux-ia64

 
> yes, perhaps it's not too late to change it.  Anton, what will this break?

pci_dma_error came from x86-64, and dma_error was the natural
counterpart. Due to the conflicts in ide-cd.c I guess we should change
it.

Anton

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (17 preceding siblings ...)
  2004-03-24  1:49 ` Anton Blanchard
@ 2004-03-24 18:29 ` Bjorn Helgaas
  2004-03-24 18:38 ` David Mosberger
  19 siblings, 0 replies; 21+ messages in thread
From: Bjorn Helgaas @ 2004-03-24 18:29 UTC (permalink / raw)
  To: linux-ia64

On Tuesday 23 March 2004 11:17 am, Andrew Morton wrote:
> >  We're getting namespace collisions from the new dma_error().  Rename it to
> >  dma_mapping_error().
> 
> Updated ia64 patch:

I verified that current linux-2.5 BK + this patch builds and boots OK
(generic_defconfig), FWIW.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: 2.6.5-rc2 lots of warnings for dma_error
  2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
                   ` (18 preceding siblings ...)
  2004-03-24 18:29 ` Bjorn Helgaas
@ 2004-03-24 18:38 ` David Mosberger
  19 siblings, 0 replies; 21+ messages in thread
From: David Mosberger @ 2004-03-24 18:38 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Wed, 24 Mar 2004 11:29:23 -0700, Bjorn Helgaas <bjorn.helgaas@hp.com> said:

  Bjorn> On Tuesday 23 March 2004 11:17 am, Andrew Morton wrote:
  >> >  We're getting namespace collisions from the new dma_error().  Rename it to
  >> >  dma_mapping_error().

  >> Updated ia64 patch:

  Bjorn> I verified that current linux-2.5 BK + this patch builds and boots OK
  Bjorn> (generic_defconfig), FWIW.

I already checked in a slightly modified version of Andrew's patch into
to to-linus-2.5 repo.  The modification was to avoid the needless
inline-function in the machvec_hpzx1.h.

	--david

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2004-03-24 18:38 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-22  3:04 2.6.5-rc2 lots of warnings for dma_error Keith Owens
2004-03-22  9:36 ` Andrew Morton
2004-03-22 18:30 ` Bjorn Helgaas
2004-03-22 18:32 ` Bjorn Helgaas
2004-03-22 18:40 ` Alex Williamson
2004-03-22 18:56 ` Jens Axboe
2004-03-22 19:02 ` Bjorn Helgaas
2004-03-22 20:21 ` Andrew Morton
2004-03-22 21:37 ` Bjorn Helgaas
2004-03-22 21:58 ` Andrew Morton
2004-03-22 22:23 ` Bjorn Helgaas
2004-03-22 22:35 ` Andrew Morton
2004-03-22 22:55 ` Bjorn Helgaas
2004-03-23  7:04 ` Jens Axboe
2004-03-23 18:00 ` David Mosberger
2004-03-23 18:08 ` Andrew Morton
2004-03-23 18:16 ` Andrew Morton
2004-03-23 18:17 ` Andrew Morton
2004-03-24  1:49 ` Anton Blanchard
2004-03-24 18:29 ` Bjorn Helgaas
2004-03-24 18:38 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox