All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Ben Dooks <ben@trinity.fluff.org>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	simon@mungewell.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, OliverNeukumoliver@neukum.org
Subject: Re: [PATCH] input: Add Nintendo extension controller driver
Date: Mon, 16 May 2011 15:43:53 -0700	[thread overview]
Message-ID: <20110516224353.GA19481@core.coreip.homeip.net> (raw)
In-Reply-To: <20110516215110.GE16731@trinity.fluff.org>

On Mon, May 16, 2011 at 10:51:10PM +0100, Ben Dooks wrote:
> On Mon, May 16, 2011 at 03:46:08PM -0600, Grant Likely wrote:
> > +
> > +	/*
> > +	 * DMA buffer, with padding to give it its own cache line so that
> > +	 * the DMA streaming works on non-coherent architectures.
> > +	 * Question: Is this the proper pattern, and is this really necessary?
> > +	 */
> > +	uint8_t pad1[L1_CACHE_BYTES];
> > +	uint8_t buf[6];
> > +	uint8_t pad2[L1_CACHE_BYTES];
> > +};
> 
> I think there's an attribute to do this, starting with an __ defined
> in the kernel.
> 

Yes, it is called "____cacheline_aligned".

-- 
Dmitry

  reply	other threads:[~2011-05-16 22:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 21:46 [PATCH] input: Add Nintendo extension controller driver Grant Likely
2011-05-16 21:51 ` Ben Dooks
2011-05-16 22:43   ` Dmitry Torokhov [this message]
2011-05-16 23:04     ` Grant Likely
2011-05-16 23:04       ` Grant Likely
2011-05-16 21:56 ` Grant Likely
2011-05-16 21:56   ` Grant Likely
2011-05-23 20:50 ` Peter Korsgaard
2011-05-27  8:01   ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2011-05-27  8:14 Grant Likely
2011-08-01 16:04 ` Grant Likely
2011-08-01 16:04   ` Grant Likely
2011-08-01 16:38   ` Dmitry Torokhov
2011-08-01 16:44     ` Grant Likely

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=20110516224353.GA19481@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=OliverNeukumoliver@neukum.org \
    --cc=ben@trinity.fluff.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon@mungewell.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.