tech-kern archive

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

Re: Unaligned access in kernel on ARMv6+ (Re: CVS commit: src/sys/dev/usb)



On 1/6/2019 5:50 PM, Jason Thorpe wrote:
On Jan 6, 2019, at 1:46 PM, matthew green <mrg%eterna.com.au@localhost> wrote:

... how do we convey the structure alignment needed for
softc, or do we fix it by moving it into its own separate
aligned allocation?
The latter, I think.

I agree.  When a driver has a strict alignment requirement, it's up to the driver to implement that alignment.  The driver can't know for sure that malloc() is going to return memory with any specific alignment considerations, so the driver has to enure the alignment on their own.

Patrick Klos



Home | Main Index | Thread Index | Old Index