RE: [PATCH v2 3/3] hpsa: add an assert to prevent from __packed reintroduction

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

 



It looks like ia64 implements atomic_t as a 64-bit value and expects atomic_t
to be 64-bit aligned, but does nothing to ensure that.

For x86, atomic_t is a 32-bit value and atomic64_t is a 64-bit value, and
the definition of atomic64_t is overridden in a way that ensures
64-bit (8 byte) alignment:

Generic definitions are in include/linux/types.h:
    typedef struct {
            int counter;
    } atomic_t;

    #define ATOMIC_INIT(i) { (i) }

    #ifdef CONFIG_64BIT
    typedef struct {
            s64 counter;
    } atomic64_t;
    #endif

Override in arch/x86/include/asm/atomic64_32.h:
    typedef struct {
            s64 __aligned(8) counter;
    } atomic64_t;

Perhaps ia64 needs to take over the definition of both atomic_t and atomic64_t
and do the same?





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux