Under linux we open block devices with O_DIRECT which means we must
provide aligned memory buffers. This patch adds the needed umem
interfaces or in the case of caches simply honors alignment provided
at cache creation time.
While the generic atomic implementation is not used by default
for x86_64 or x86 builds, we still need to always build it with
-fPIC if we ever want to use it on these platforms.
Futher testing on my powerpc system revealed that the powerpc
specific atomic implemetation was flawed. Rather than spending
a lot of time correctly reimplementing it in assembly I have
reworked it in to a 100% generic version. The generic version
will not perform well but it does provide correct sematics. It
will be used only when there is no architecture specific version
available. These changes do not impact x86_64 and x86 which have
have correct native implementations.
too confusing. The two consumers of this (ztest.c and taskq.c) have
been updated to use the Solaris kernel space kthread_t API which is
provided by zfs_context.h.
- Add 64-bit user space atomic support obtained from an old version
of OpenSolaris which supported ppc. They are not all 100% fully
implemented by they are a good first step.
- Add powerpc ISA type.
- Strip out unused ISA defines to prevent any confusion.
Depending on your x86 architecture $target_cpu can evaluate to
any of the following (i386|i486|i586|i686). Since our local asm
uses only i386 instructions sed is used to map all of these to
i386 and sets $target_arch. Other arch's are not impacted.
Moved xdr_control() function from static inline in xdr.h in to a
new xdr.c file which was added to the libspl build. Additionally,
I have removed the 'xdr_bytesrec' typedef which shares the same
name as the struct. This is what Solaris does, but it's just asking
for trouble. It has been replaced with an 'xdr_bytesrec_t' typedef.