Re: [PATCH v4 02/39] dm vdo: add the MurmurHash3 fast hashing algorithm

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

 



On Thu, Oct 26, 2023 at 05:40:59PM -0400, Matthew Sakai wrote:
> MurmurHash3 is a fast, non-cryptographic, 128-bit hash. It was originally
> written by Austin Appleby and placed in the public domain. This version has
> been modified to produce the same result on both big endian and little
> endian processors, making it suitable for use in portable persistent data.
> 
> Co-developed-by: J. corwin Coburn <corwin@xxxxxxxxxxxxxx>
> Signed-off-by: J. corwin Coburn <corwin@xxxxxxxxxxxxxx>
> Co-developed-by: Ken Raeburn <raeburn@xxxxxxxxxx>
> Signed-off-by: Ken Raeburn <raeburn@xxxxxxxxxx>
> Co-developed-by: John Wiele <jwiele@xxxxxxxxxx>
> Signed-off-by: John Wiele <jwiele@xxxxxxxxxx>
> Signed-off-by: Matthew Sakai <msakai@xxxxxxxxxx>
> ---
[ ... ]
> +
> +#define ROTL64(x, y) rotl64(x, y)
> +static __always_inline u64 getblock64(const u64 *p, int i)
> +{
> +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
> +	return p[i];
> +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
> +	return __builtin_bswap64(p[i]);
> +#else
> +#error "can't figure out byte order"
> +#endif
> +}
> +
> +static __always_inline void putblock64(u64 *p, int i, u64 value)
> +{
> +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
> +	p[i] = value;
> +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
> +	p[i] = __builtin_bswap64(value);
> +#else
> +#error "can't figure out byte order"
> +#endif
> +}

On sparc64, with gcc 11.4, the above code results in:

ERROR: modpost: "__bswapdi2" [drivers/md/dm-vdo/dm-vdo.ko] undefined!

Guenter




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux