public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: Glauber Costa <gcosta@redhat.com>
Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	avi@qumranet.com, akpm@linux-foundation.org
Subject: Re: [PATCH 15/20] x86: move dma_supported and dma_set_mask to	pci-dma_32.c
Date: Thu, 27 Mar 2008 11:03:15 +0000	[thread overview]
Message-ID: <1206615795.31683.8.camel@muff> (raw)
In-Reply-To: <1206480999-21767-16-git-send-email-gcosta@redhat.com>

On Tue, 2008-03-25 at 18:36 -0300, Glauber Costa wrote:
> This is the way x86_64 does, so this make them equal. They have
> to be extern now in the header, and the extern definition is moved to
> the common dma-mapping.h header
> 
> Signed-off-by: Glauber Costa <gcosta@redhat.com>
...
> diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c
> index 5133032..453b4bd 100644
> --- a/arch/x86/kernel/pci-dma_32.c
> +++ b/arch/x86/kernel/pci-dma_32.c
> @@ -156,6 +156,39 @@ EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
>  int forbid_dac;
>  EXPORT_SYMBOL(forbid_dac);
>  
> +int
> +dma_supported(struct device *dev, u64 mask)
> +{
...
> +}
> +
> +int
> +dma_set_mask(struct device *dev, u64 mask)
> +{
...
> +}
...
> diff --git a/include/asm-x86/dma-mapping_32.h b/include/asm-x86/dma-mapping_32.h
> index e60c30a..fd7246d 100644
> --- a/include/asm-x86/dma-mapping_32.h
> +++ b/include/asm-x86/dma-mapping_32.h
> @@ -17,35 +17,6 @@ dma_mapping_error(dma_addr_t dma_addr)
>  extern int forbid_dac;
>  
>  static inline int
> -dma_supported(struct device *dev, u64 mask)
> -{
...
> -}
> -
> -static inline int
> -dma_set_mask(struct device *dev, u64 mask)
> -{
...
> -}

This breaks for me with:

ERROR: "dma_supported" [drivers/ssb/ssb.ko] undefined!
ERROR: "dma_set_mask" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined!
ERROR: "dma_set_mask" [drivers/scsi/aic7xxx/aic7xxx.ko] undefined!
ERROR: "dma_set_mask" [drivers/scsi/aic7xxx/aic79xx.ko] undefined!
ERROR: "dma_supported" [drivers/net/pcnet32.ko] undefined!
ERROR: "dma_supported" [drivers/media/video/saa7134/saa7134.ko] undefined!
ERROR: "dma_set_mask" [drivers/media/video/meye.ko] undefined!
ERROR: "dma_supported" [drivers/media/video/cx88/cx8802.ko] undefined!
ERROR: "dma_supported" [drivers/media/video/cx88/cx8800.ko] undefined!
ERROR: "dma_supported" [drivers/media/video/cx88/cx88-alsa.ko] undefined!
ERROR: "dma_supported" [drivers/media/video/cx23885/cx23885.ko] undefined!

They just need to be exported like on x86_64.

Cheers,
Mark.

Subject: [PATCH] x86: export dma_supported() and dma_set_mask() on i386

dma_supported() and dma_set_mask() were previously inlined,
but are now moved to pci-dma_32.c.

Since they're used by various drivers, they need to be
exported.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 arch/x86/kernel/pci-dma_32.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c
index 55ab3c8..be6b1f6 100644
--- a/arch/x86/kernel/pci-dma_32.c
+++ b/arch/x86/kernel/pci-dma_32.c
@@ -180,6 +180,7 @@ dma_supported(struct device *dev, u64 mask)
 
 	return 1;
 }
+EXPORT_SYMBOL(dma_supported);
 
 int
 dma_set_mask(struct device *dev, u64 mask)
@@ -191,6 +192,7 @@ dma_set_mask(struct device *dev, u64 mask)
 
 	return 0;
 }
+EXPORT_SYMBOL(dma_set_mask);
 
 
 static __devinit void via_no_dac(struct pci_dev *dev)


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

  parent reply	other threads:[~2008-03-27 11:03 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 21:36 [PATCH 0/20] dma_ops for i386 Glauber Costa
2008-03-25 21:36 ` [PATCH 01/20] x86: move dma_ops struct definition to dma-mapping.h Glauber Costa
2008-03-25 21:36   ` [PATCH 02/20] x86: implement dma_map_single through dma_ops Glauber Costa
2008-03-25 21:36     ` [PATCH 03/20] x86: move dma_unmap_single to common header Glauber Costa
2008-03-25 21:36       ` [PATCH 04/20] x86: move dma_map_sg " Glauber Costa
2008-03-25 21:36         ` [PATCH 05/20] x86: move dma_unmap_sg " Glauber Costa
2008-03-25 21:36           ` [PATCH 06/20] x86: move dma_sync_single_for_cpu " Glauber Costa
2008-03-25 21:36             ` [PATCH 07/20] x86: move dma_sync_single_for_device " Glauber Costa
2008-03-25 21:36               ` [PATCH 08/20] x86: move dma_sync_single_range_for_cpu " Glauber Costa
2008-03-25 21:36                 ` [PATCH 09/20] x86: move dma_sync_single_range_for_device " Glauber Costa
2008-03-25 21:36                   ` [PATCH 10/20] x86: move dma_sync_sg_for_cpu " Glauber Costa
2008-03-25 21:36                     ` [PATCH 11/20] x86: move dma_sync_sg_for_device " Glauber Costa
2008-03-25 21:36                       ` [PATCH 12/20] x86: move alloc and free coherent " Glauber Costa
2008-03-25 21:36                         ` [PATCH 13/20] x86: move dma_map_page and dma_unmap_page " Glauber Costa
2008-03-25 21:36                           ` [PATCH 14/20] x86: move dma_cache_sync " Glauber Costa
2008-03-25 21:36                             ` [PATCH 15/20] x86: move dma_supported and dma_set_mask to pci-dma_32.c Glauber Costa
2008-03-25 21:36                               ` [PATCH 16/20] x86: align to clflush size Glauber Costa
2008-03-25 21:36                                 ` [PATCH 17/20] x86: provide a bad_dma_address symbol for i386 Glauber Costa
2008-03-25 21:36                                   ` [PATCH 18/20] x86: unify dma_mapping_error Glauber Costa
2008-03-25 21:36                                     ` [PATCH 19/20] x86: move ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY to dma-mapping.h Glauber Costa
2008-03-25 21:36                                       ` [PATCH 20/20] x86: delete the arch-specific dma-mapping headers Glauber Costa
2008-03-26  7:09                                 ` [PATCH 16/20] x86: align to clflush size Ingo Molnar
2008-03-27 11:03                               ` Mark McLoughlin [this message]
2008-03-27 11:54                                 ` [PATCH 15/20] x86: move dma_supported and dma_set_mask to pci-dma_32.c Ingo Molnar
2008-03-26  7:06 ` [PATCH 0/20] dma_ops for i386 Ingo Molnar
2008-03-26 12:49   ` Ingo Molnar
2008-03-26 13:04     ` Ingo Molnar
2008-03-26 13:16       ` Glauber Costa
2008-03-26 10:01 ` Avi Kivity
2008-03-26 12:03   ` Glauber Costa
2008-03-27  9:49 ` Amit Shah

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=1206615795.31683.8.camel@muff \
    --to=markmc@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=avi@qumranet.com \
    --cc=gcosta@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox