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]
- To: Arnd Bergmann <arnd@xxxxxxxxxx>, Sergei Trofimovich <slyfox@xxxxxxxxxx>
- Subject: RE: [PATCH v2 3/3] hpsa: add an assert to prevent from __packed reintroduction
- From: "Elliott, Robert (Servers)" <elliott@xxxxxxx>
- Date: Fri, 2 Apr 2021 14:40:39 +0000
- Accept-language: en-US
- Cc: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, "John Paul Adrian Glaubitz" <glaubitz@xxxxxxxxxxxxxxxxxxx>, Don Brace - C33706 <don.brace@xxxxxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "storagedev@xxxxxxxxxxxxx" <storagedev@xxxxxxxxxxxxx>, linux-scsi <linux-scsi@xxxxxxxxxxxxxxx>, "jszczype@xxxxxxxxxx" <jszczype@xxxxxxxxxx>, Scott Benesh <scott.benesh@xxxxxxxxxxxxx>, Scott Teel <scott.teel@xxxxxxxxxxxxx>, "thenzl@xxxxxxxxxx" <thenzl@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
- In-reply-to: <CAK8P3a2CmQpKynwGbtdWH+1L4=SkX2y4XKggT=8DrnsjxU4hSw@mail.gmail.com>
- References: <yq1wntpgxxr.fsf@ca-mkp.ca.oracle.com> <20210330071958.3788214-1-slyfox@gentoo.org> <20210330071958.3788214-3-slyfox@gentoo.org> <CAK8P3a2CmQpKynwGbtdWH+1L4=SkX2y4XKggT=8DrnsjxU4hSw@mail.gmail.com>
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?
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]