linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: guoren@kernel.org
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, linux-csky@vger.kernel.org,
	douzhk@nationalchip.com, Guo Ren <ren_guo@c-sky.com>
Subject: Re: [PATCH 3/3] csky: Support kernel non-aligned access
Date: Tue, 20 Aug 2019 19:17:41 -0700	[thread overview]
Message-ID: <20190821021741.GB32710@infradead.org> (raw)
In-Reply-To: <1566304469-5601-3-git-send-email-guoren@kernel.org>

On Tue, Aug 20, 2019 at 08:34:29PM +0800, guoren@kernel.org wrote:
> From: Guo Ren <ren_guo@c-sky.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.

  reply	other threads:[~2019-08-21  2:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 12:34 [PATCH 1/3] csky: Fixup arch_get_unmapped_area() implementation guoren
2019-08-20 12:34 ` [PATCH 2/3] csky: Fixup defer cache flush for 610 guoren
2019-08-20 12:34 ` [PATCH 3/3] csky: Support kernel non-aligned access guoren
2019-08-21  2:17   ` Christoph Hellwig [this message]
2019-08-21  3:43     ` Guo Ren
2019-08-21  2:16 ` [PATCH 1/3] csky: Fixup arch_get_unmapped_area() implementation Christoph Hellwig
2019-08-21  3:44   ` Guo Ren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190821021741.GB32710@infradead.org \
    --to=hch@infradead.org \
    --cc=arnd@arndb.de \
    --cc=douzhk@nationalchip.com \
    --cc=guoren@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ren_guo@c-sky.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).