Re: [PATCH] hpsa: fix boot on ia64 (atomic_t alignment)

From: Martin K. Petersen
Date: Tue Mar 16 2021 - 22:27:36 EST



Arnd,

> Actually that still feels wrong: the annotation of the struct is to
> pack every member, which causes the access to be done in byte units on
> architectures that do not have hardware unaligned load/store
> instructions, at least for things like atomic_read() that does not go
> through a cmpxchg() or ll/sc cycle.

> This change may fix itanium, but it's still not correct. Other
> architectures would have already been broken before the recent change,
> but that's not a reason against fixing them now.

I agree. I understand why there are restrictions on fields consumed by
the hardware. But for fields internal to the driver the packing doesn't
make sense to me.

--
Martin K. Petersen Oracle Linux Engineering