[Linux-Xtensa] Re: Audio Driver - applied your git patch, I'm looking into buildingyourconfig on an LX200...

Piet Delaney pdelaney at tensilica.com
Tue Sep 28 00:09:10 PDT 2010


benn.huang wrote:
> Hi Piet:
>  
> I'm going to  remove DMA zone from memory node. I found out your this 
> email that has the code snippet shrinking the DMA zone.
> I am wondering whether this modification is enough? And does it have 
> some other side effect?

Hi Benn:

It works for me, however I suspect that eventually we may want
to have part of the memory in the DMA zone and the rest in the NORMAL
zone. This patch just puts it back to putting a memory in the DMA zone.

There has been some work with Xtensa-linux with DMA but I  haven't had
to fix anything related to it. I've worked with DMA for i386
and Itanium linux a bit. I think Prasanna may have some experience
with DMA.

I'd suggest just using the kernel as it's checked in and allocating
all of your memory to the DMA zone for now.

I check it in to just your 2.6.29-smp kernel with Turby's audio driver:

		git+ssh://git.linux-xtensa.org/git/kernel/xtensa-2.6.29-smp-chipsbank.git

The commit was:
-----------------------------------------------------------------------------------------------------------
Author: Pete Delaney <piet at tensilica.com>  2010-09-15 23:05:16
Committer: Pete Delaney <piet at tensilica.com>  2010-09-15 23:05:16
Parent: 1d4582b0ec6c530df4e460096124a8fd8eb4b703 ([XTENSA] Truby's audio_ver0_03_2010_09_03 patch)
Child:  7730367be398eaf9071d04ad99d3538be6ecd742 ([XTENSA HACK] Just make's it so we can do some tesing of CPENABLE)
Branches: Piets_Hack_of_Turbys_Audio_Interface_to_do_something_on_DC233, Trubys_audio_ver0_03_2010_09_03_patch, remotes/origin/Piets_Hack_of_Turbys_Audio_Interface_to_do_something_on_DC233
Follows:
Precedes:

    [XTENSA] Looks like using DMA is needed for dma_alloc_coherent().

    Signed-off-by: Pete Delaney <piet at tensilica.com>

---------------------------- arch/xtensa/mm/init.c ----------------------------
index c48ec9c..47a167b 100644
@@ -175,7 +175,7 @@ void __init zones_init(void)
 	for (i = 0; i < MAX_NR_ZONES; i++)
 		zones_size[i] = 0;

-#if 0
+#if 1
 	/* All pages are DMA-able, so we put them all in the DMA zone. */
 	zones_size[ZONE_DMA] = max_low_pfn - ARCH_PFN_OFFSET;
 #else
-----------------------------------------------------------------------------------------------------------------------

I'd like to stay with somewhat normal sleeping/working hours this week.
Does adding a branch to the HiFi-2 BuildRoot Snapshot(s)  git repo work
for you guys? Maybe you could try a test branch before I leave just to make
sure the access rights are set up ok.

Anything else to go over before I head home for the evening?

-piet

>  
> For chipsbank's configuration and implementation, 570 shares a physical 
> memory region(0x00001000~0x00801000) with 330. I think
> this would cause confict. What do you think? 
>  
> --------------------------------------------------------------------------------------------------------------------------------------------------------------
> I didcussed this change with Christian but never had an opportunity to try it with DMA devices:
> ................................................................................................
> arch/xtensa/mm/init.c
> ................................................................................................
> 170 void __init zones_init(void)
> 171 {
> 172         unsigned long zones_size[MAX_NR_ZONES];
> 173         int i;
> 174
> 175         for (i = 0; i  < MAX_NR_ZONES; i++)
> 176                 zones_size[i] = 0;
> 177
> 178 #if 0
> 179         /* All pages are DMA-able, so we put them all in the DMA zone. */
> 180         zones_size[ZONE_DMA] = max_low_pfn - ARCH_PFN_OFFSET;
> 181 #else
> 182         /*
> 183          * Xtensa doesn't need a ZONE_DMA. I386 needs it because
> 184          * ISA cards can only access the lower 16MB of memory.
> 185          *
> 186          * REMIND:
> 187          *    ARM enables CONFIG_ZONE_DMA in all of their default configs.
> 188          *    Why?
> 189          */
> 190         zones_size[ZONE_NORMAL] = max_low_pfn - ARCH_PFN_OFFSET;
> 191 #endif
> 192
> 193 #ifdef CONFIG_HIGHMEM
> 194         zones_size[ZONE_HIGHMEM] = max_pfn - max_low_pfn;
> 195 #endif
> 196
> 197         free_area_init_node(0, zones_size, ARCH_PFN_OFFSET, NULL);
> 198 }
> ................................................................................................
>  
> I'm going to try backing it out and see if it fixes this problem.
>  
> -piet
>  



More information about the linux-xtensa mailing list