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

Piet Delaney pdelaney at tensilica.com
Fri Sep 17 01:53:28 PDT 2010


benn.huang wrote:
> Hi Piet:
> 
> I've seen you last 3 commits to the repo. Very thanks for you help :D.

I'm surprised we didn't notice the backtrace problem and that
Prasanna didn't notice the dma problem.

> We will now test it on our FPGA broad.

What kind are you using. Maybe we could get one
and try being more in sync with what your doing
so it's easier to help out.



> 
>>   82     len = sizeof(mailPacketT) + dataSize;
>>   83 #if 0
>>   84     pkt = (mailPacketT *)kmalloc(len, GFP_KERNEL);
>>   85 #else
>>   86     pkt = (mailPacketT *)kmalloc(len,
>> GFP_ATOMIC);              /* piet */ 87 #endif
> 
> This will temporary use this fix.
> 
>> -------------------------------------------------------------------------------
>>
>> Looks like I fixed the bug in pci-dma.c; I just commited it and the
>> fix for backtraces to work correctly. We'll cherry pick these back to
>> the open version soon.
>>
>> Here the pci-dma.c fix I just pushed.
>> ------------------------
>> /*
>> + * vaddr is an address within the uncacched memory address range.
>> + * It was returned above by dma_alloc_coherent().
>> + */
>>   void dma_free_coherent(struct device *hwdev, size_t size,
>>   			 void *vaddr, dma_addr_t dma_handle)
>>   {
>> -	long
>> addr=(long)vaddr+XCHAL_KSEG_CACHED_VADDR-XCHAL_KSEG_BYPASS_VADDR;
>> +	unsigned long v_addr = (long) vaddr;
>> +	unsigned long seg_offset = v_addr - XCHAL_KSEG_BYPASS_VADDR;
>> +	unsigned long addr = XCHAL_KSEG_CACHED_VADDR + seg_offset;
>>
>> -	if (addr < 0 || addr >= XCHAL_KSEG_SIZE)
>> +	if (seg_offset < 0 || seg_offset >= XCHAL_KSEG_SIZE)
>>   		BUG();
>>
>>   	free_pages(addr, get_order(size));
>> --------------------------------------------------------------------------------------
>>
>> I'll push the two GFP_ATOMIC changes shortly, want to see if there
>> are any more.
>>
> Does need any update to dma_alloc_coherent together?

Other than being just a little bit to tight it seems fine to me.

When we start using more memory with the V3 MMU we
likely will be adjusting this a bit. I've got some
memory to add the the LX200 to try using half a gig.
Just have to try it out and adjust the code. Christian
Zankel is also working on updating the current V2 MMU
to accommodate more memory.

-piet


> 
> 
> 



More information about the linux-xtensa mailing list