Patchwork [1/3] powerpc/pci: Default to dma_direct_ops for pci dma_ops

login
register
mail settings
Submitter Kumar Gala
Date Feb. 19, 2009, 8:49 p.m.
Message ID <1235076557-24464-1-git-send-email-galak@kernel.crashing.org>
Download mbox | patch
Permalink /patch/23449/
State Accepted, archived
Commit 32ac57668dccf6c4ad5522b61a86fe211886c180
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Kumar Gala - Feb. 19, 2009, 8:49 p.m.
This will allow us to remove the ppc32 specific checks in get_dma_ops()
that defaults to dma_direct_ops if the archdata is NULL.  We really
should always have archdata set to something going forward.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/kernel/pci-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Kumar Gala - Feb. 19, 2009, 8:58 p.m.
On Feb 19, 2009, at 2:49 PM, Kumar Gala wrote:

> This will allow us to remove the ppc32 specific checks in  
> get_dma_ops()
> that defaults to dma_direct_ops if the archdata is NULL.  We really
> should always have archdata set to something going forward.
>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/kernel/pci-common.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

Ben,

If you can look at putting these in testing that would be great.

I'd like to see of Josh can get some 4xx/44x runs to see if we break  
anything there.  I don't expect it but good to see.

- k
Benjamin Krill - Feb. 19, 2009, 10:08 p.m.
* Kumar Gala | 2009-02-19 14:49:15 [-0600]:

>This will allow us to remove the ppc32 specific checks in get_dma_ops()
>that defaults to dma_direct_ops if the archdata is NULL.  We really
>should always have archdata set to something going forward.
>
>Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

Acked-by: Benjamin Krill <ben@codiert.org>
Becky Bruce - Feb. 20, 2009, 8:44 p.m.
On Feb 19, 2009, at 4:08 PM, Benjamin Krill wrote:

> * Kumar Gala | 2009-02-19 14:49:15 [-0600]:
>
>> This will allow us to remove the ppc32 specific checks in  
>> get_dma_ops()
>> that defaults to dma_direct_ops if the archdata is NULL.  We really
>> should always have archdata set to something going forward.
>>
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>
> Acked-by: Benjamin Krill <ben@codiert.org>

Tested on ppc 86xx, looks good.

Acked-by: Becky Bruce <beckyb@kernel.crashing.org>

-B

Patch

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 2ad1731..633e871 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -50,7 +50,7 @@  resource_size_t isa_mem_base;
 unsigned int ppc_pci_flags = 0;
 
 
-static struct dma_mapping_ops *pci_dma_ops;
+static struct dma_mapping_ops *pci_dma_ops = &dma_direct_ops;
 
 void set_pci_dma_ops(struct dma_mapping_ops *dma_ops)
 {