[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190821021741.GB32710@infradead.org>
Date: Tue, 20 Aug 2019 19:17:41 -0700
From: Christoph Hellwig <hch@...radead.org>
To: guoren@...nel.org
Cc: arnd@...db.de, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-csky@...r.kernel.org,
douzhk@...ionalchip.com, Guo Ren <ren_guo@...ky.com>
Subject: Re: [PATCH 3/3] csky: Support kernel non-aligned access
On Tue, Aug 20, 2019 at 08:34:29PM +0800, guoren@...nel.org wrote:
> From: Guo Ren <ren_guo@...ky.com>
>
> We prohibit non-aligned access in kernel mode, but some special NIC
> driver needs to support kernel-state unaligned access. For example,
> when the bus does not support unaligned access, IP header parsing
> will cause non-aligned access and driver does not recopy the skb
> buffer to dma for performance reasons.
>
> Added kernel_enable & user_enable to control unaligned access and
> added kernel_count & user_count for statistical unaligned access.
If the NIC drivers requires this it is buggy. Kernel code must
use the get_unaligned* / put_unaligned* helpers for that.
Powered by blists - more mailing lists