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

Re: [Xen-devel] [PATCH RFC 09/23] lz4: add support for OSes that don't have asm/unaligned.h



On 17/04/14 19:00, Ian Jackson wrote:
> Roger Pau Monne writes ("[PATCH RFC 09/23] lz4: add support for OSes that 
> don't have asm/unaligned.h"):
>> Add a configure check for asm/unaligned.h presence, and if it's not
>> available open-code the necessary functions for lz4.
> 
> Where did this code come from ?

This came from the Linux kernel, see:

http://lxr.free-electrons.com/source/include/asm-generic/unaligned.h?v=2.6.25#L80

> 
> Is there nothing in the FreeBSD environment that we could reuse ?

I think there's nothing in FreeBSD that we could use to replace this
functions.

> 
>> +struct __una_u32 { uint32_t x __attribute__((packed)); };
>> +struct __una_u16 { uint16_t x __attribute__((packed)); };
> 
> Are you sure this actually works ?  I can't see anything in the GCC
> 4.4 docs which requires the compiler to generate special code to
> access such a variable.

Anyway, I think this patch and the preceding one are plain wrong, what
we should do is completely remove the bogus dependence on
asm/unaligned.h, which is a Linux specific header file, and open-code
what we need.

I'm CCing the people that added the LZ4 support to Xen, let's see if
they can shed some light on this.

Roger.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.