Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Arnd Bergmann
On Wednesday 24 October 2012, Gregory CLEMENT wrote: > > No, I was thinking of making the underlying functions globally visible > > and have extern declarations in a header file so you can access them > > directly. > > > > Generally speaking, when you run into a problem with common code, your > >

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Thomas Petazzoni
Dear Gregory CLEMENT, On Wed, 24 Oct 2012 16:39:13 +0200, Gregory CLEMENT wrote: > > As others said, the prefix is wrong. Since the file is named coherency, > > maybe just "coherency_" as the prefix? Not sure, though. Shouldn't the > > file be named coherency-armada-370-xp.c, as we have done for

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 02:27 PM, Thomas Petazzoni wrote: [...] I will fixed the spelling and complete the comments as suggested [...] >> +struct dma_map_ops armada_xp_dma_ops; > > static OK > >> +static inline void armada_xp_sync_io_barrier(void) >> +{ >> +writel(0x1, coherency_cpu_base +

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 02:24 PM, Arnd Bergmann wrote: > On Wednesday 24 October 2012, Gregory CLEMENT wrote: >> On 10/24/2012 01:48 PM, Gregory CLEMENT wrote: >>> On 10/24/2012 01:36 PM, Arnd Bergmann wrote: I think it would be cleaner to statically define the operations in a constant

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Thomas Petazzoni
Hello, On Wed, 24 Oct 2012 10:04:01 +0200, Gregory CLEMENT wrote: > Armada 370 and XP come with an unit called coherency fabric. This unit > allows to use the Armada XP as a nearly coherent architecture. The the Armada 370/XP > coherency mechanism uses snoop filters to ensure the coherency

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Arnd Bergmann
On Wednesday 24 October 2012, Gregory CLEMENT wrote: > On 10/24/2012 01:48 PM, Gregory CLEMENT wrote: > > On 10/24/2012 01:36 PM, Arnd Bergmann wrote: > >> > >> I think it would be cleaner to statically define the operations in a > >> constant > >> structure and point directly to the functions

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 01:48 PM, Gregory CLEMENT wrote: > On 10/24/2012 01:36 PM, Arnd Bergmann wrote: >> On Wednesday 24 October 2012, Gregory CLEMENT wrote: >>> +void __init armada_370_xp_coherency_iocache_init(void) >>> +{ >>> + /* When the coherency fabric is available, the Armada XP and >>> +

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 10:25 AM, Andrew Lunn wrote: > On Wed, Oct 24, 2012 at 10:04:01AM +0200, Gregory CLEMENT wrote: >> Armada 370 and XP come with an unit called coherency fabric. This unit >> allows to use the Armada XP as a nearly coherent architecture. The >> coherency mechanism uses snoop filters to

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 01:36 PM, Arnd Bergmann wrote: > On Wednesday 24 October 2012, Gregory CLEMENT wrote: >> +void __init armada_370_xp_coherency_iocache_init(void) >> +{ >> + /* When the coherency fabric is available, the Armada XP and >> +* Aramada 370 are close to a coherent

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Arnd Bergmann
On Wednesday 24 October 2012, Gregory CLEMENT wrote: > +void __init armada_370_xp_coherency_iocache_init(void) > +{ > + /* When the coherency fabric is available, the Armada XP and > +* Aramada 370 are close to a coherent architecture, so we based > +* our dma ops on the

RE: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Yehuda Yitschak
tian Hesselbarth; linux-kernel@vger.kernel.org > Subject: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support > > Armada 370 and XP come with an unit called coherency fabric. This unit > allows to use the Armada XP as a nearly coherent architecture. The > coherency mechanism uses

[PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
Armada 370 and XP come with an unit called coherency fabric. This unit allows to use the Armada XP as a nearly coherent architecture. The coherency mechanism uses snoop filters to ensure the coherency between caches, DRAM and devices. This mechanism needs a synchronization barrier which guarantees

[PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
Armada 370 and XP come with an unit called coherency fabric. This unit allows to use the Armada XP as a nearly coherent architecture. The coherency mechanism uses snoop filters to ensure the coherency between caches, DRAM and devices. This mechanism needs a synchronization barrier which guarantees

RE: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Yehuda Yitschak
@vger.kernel.org Subject: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support Armada 370 and XP come with an unit called coherency fabric. This unit allows to use the Armada XP as a nearly coherent architecture. The coherency mechanism uses snoop filters to ensure the coherency between caches, DRAM

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Arnd Bergmann
On Wednesday 24 October 2012, Gregory CLEMENT wrote: +void __init armada_370_xp_coherency_iocache_init(void) +{ + /* When the coherency fabric is available, the Armada XP and +* Aramada 370 are close to a coherent architecture, so we based +* our dma ops on the coherent

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 01:36 PM, Arnd Bergmann wrote: On Wednesday 24 October 2012, Gregory CLEMENT wrote: +void __init armada_370_xp_coherency_iocache_init(void) +{ + /* When the coherency fabric is available, the Armada XP and +* Aramada 370 are close to a coherent architecture, so we

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 10:25 AM, Andrew Lunn wrote: On Wed, Oct 24, 2012 at 10:04:01AM +0200, Gregory CLEMENT wrote: Armada 370 and XP come with an unit called coherency fabric. This unit allows to use the Armada XP as a nearly coherent architecture. The coherency mechanism uses snoop filters to ensure

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 01:48 PM, Gregory CLEMENT wrote: On 10/24/2012 01:36 PM, Arnd Bergmann wrote: On Wednesday 24 October 2012, Gregory CLEMENT wrote: +void __init armada_370_xp_coherency_iocache_init(void) +{ + /* When the coherency fabric is available, the Armada XP and +* Aramada

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Arnd Bergmann
On Wednesday 24 October 2012, Gregory CLEMENT wrote: On 10/24/2012 01:48 PM, Gregory CLEMENT wrote: On 10/24/2012 01:36 PM, Arnd Bergmann wrote: I think it would be cleaner to statically define the operations in a constant structure and point directly to the functions you need. If

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Thomas Petazzoni
Hello, On Wed, 24 Oct 2012 10:04:01 +0200, Gregory CLEMENT wrote: Armada 370 and XP come with an unit called coherency fabric. This unit allows to use the Armada XP as a nearly coherent architecture. The the Armada 370/XP coherency mechanism uses snoop filters to ensure the coherency between

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 02:24 PM, Arnd Bergmann wrote: On Wednesday 24 October 2012, Gregory CLEMENT wrote: On 10/24/2012 01:48 PM, Gregory CLEMENT wrote: On 10/24/2012 01:36 PM, Arnd Bergmann wrote: I think it would be cleaner to statically define the operations in a constant structure and point

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Gregory CLEMENT
On 10/24/2012 02:27 PM, Thomas Petazzoni wrote: [...] I will fixed the spelling and complete the comments as suggested [...] +struct dma_map_ops armada_xp_dma_ops; static OK +static inline void armada_xp_sync_io_barrier(void) +{ +writel(0x1, coherency_cpu_base +

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Thomas Petazzoni
Dear Gregory CLEMENT, On Wed, 24 Oct 2012 16:39:13 +0200, Gregory CLEMENT wrote: As others said, the prefix is wrong. Since the file is named coherency, maybe just coherency_ as the prefix? Not sure, though. Shouldn't the file be named coherency-armada-370-xp.c, as we have done for the irq

Re: [PATCH 2/2] arm: mvebu: Add hardware I/O Coherency support

2012-10-24 Thread Arnd Bergmann
On Wednesday 24 October 2012, Gregory CLEMENT wrote: No, I was thinking of making the underlying functions globally visible and have extern declarations in a header file so you can access them directly. Generally speaking, when you run into a problem with common code, your first