All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
	hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86_64: Add memcpy32_toio to write to PCI MMIO
Date: Tue, 16 Sep 2014 20:59:03 +0530	[thread overview]
Message-ID: <20140916152903.GR3131@intel.com> (raw)
In-Reply-To: <540EB3CE.6010700@ladisch.de>

On Tue, Sep 09, 2014 at 10:01:18AM +0200, Clemens Ladisch wrote:
> Subhransu S. Prusty wrote:
> > This is needed because the hardware
> 
> Which hardware?  Every x86-64 CPU ever built by AMD, Intel, and VIA?
Baytrail and few other SoCs
> 
> > does not support 64-bit moveq insructions while writing to PCI MMIO.
> 
> > +#ifndef CONFIG_X86_64
> > +#define MEMCPY_TOIO memcpy_toio
> > +#else
> > +#define MEMCPY_TOIO memcpy32_toio
> > +#endif
> 
> This does not change any code that uses memcpy_toio().
So the devices cant do 64bit memcpy_toio so we are forced to use 32bit
copies only. This given us such an option
> 
> > +	for (i = 0; i < count/sizeof(u32); i++)
> > +		writel(*src_32++, dst_32++);
> 
> This breaks when count is not a multiple of four.
Ah yes, we can fix that

-- 
~Vinod


      reply	other threads:[~2014-09-16 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08  8:14 [PATCH] x86_64: Add memcpy32_toio to write to PCI MMIO Subhransu S. Prusty
2014-09-09  8:01 ` Clemens Ladisch
2014-09-16 15:29   ` Vinod Koul [this message]

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=20140916152903.GR3131@intel.com \
    --to=vinod.koul@intel.com \
    --cc=clemens@ladisch.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=subhransu.s.prusty@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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.