Re: [Crypto] 2.6.29-rc4-git4 build failure crypto/async_tx/async_xor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Feb 2009, Sachin P. Sant wrote:
> On a powerpc box 2.6.29-rc4-git4 randconfig build fails with :
> 
>  CC [M]  crypto/async_tx/async_xor.o
> crypto/async_tx/async_xor.c: In function async_xor_init:
> crypto/async_tx/async_xor.c:313: error: size of array type name is negative
> make[2]: *** [crypto/async_tx/async_xor.o] Error 1
> make[1]: *** [crypto/async_tx] Error 2
> make: *** [crypto] Error 2

| static int __init async_xor_init(void)
| {
| 	#ifdef CONFIG_DMA_ENGINE
| 	/* To conserve stack space the input src_list (array of page pointers)
| 	 * is reused to hold the array of dma addresses passed to the driver.
| 	 * This conversion is only possible when dma_addr_t is less than the
| 	 * the size of a pointer.  HIGHMEM64G is known to violate this
| 	 * assumption.
| 	 */
| 	BUILD_BUG_ON(sizeof(dma_addr_t) > sizeof(struct page *));
| 	#endif
| 
| 	return 0;
| }

Of course. This will fail on any 32-bit platform with a physical address space
larger than 32-bit (PPC44x, several MIPSes, ...).

The offending commit is:

commit 0036731c88fdb5bf4f04a796a30b5e445fc57f54
Author: Dan Williams <dan.j.williams@xxxxxxxxx>
Date:   Sat Feb 2 19:49:57 2008 -0700

    async_tx: kill tx_set_src and tx_set_dest methods
    
    The tx_set_src and tx_set_dest methods were originally implemented to allow
    an array of addresses to be passed down from async_xor to the dmaengine
    driver while minimizing stack overhead.  Removing these methods allows
    drivers to have all transaction parameters available at 'prep' time, saves
    two function pointers in struct dma_async_tx_descriptor, and reduces the
    number of indirect branches..
    
    A consequence of moving this data to the 'prep' routine is that
    multi-source routines like async_xor need temporary storage to convert an
    array of linear addresses into an array of dma addresses.  In order to keep
    the same stack footprint of the previous implementation the input array is
    reused as storage for the dma addresses.  This requires that
    sizeof(dma_addr_t) be less than or equal to sizeof(void *).  As a
    consequence CONFIG_DMADEVICES now depends on !CONFIG_HIGHMEM64G.  It also
    requires that drivers be able to make descriptor resources available when
    the 'prep' routine is polled.
    
    Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
    Acked-by: Shannon Nelson <shannon.nelson@xxxxxxxxx>

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@xxxxxxxxxxx
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux