public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: "Bryan O'Sullivan" <bos@pathscale.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, hch@infradead.org,
	ak@suse.de
Subject: Re: [PATCH 2 of 3] memcpy32 for x86_64
Date: Wed, 11 Jan 2006 15:45:31 -0800	[thread overview]
Message-ID: <adamzi2ib1g.fsf@cisco.com> (raw)
In-Reply-To: <1052904816d73f208585.1137019196@eng-12.pathscale.com> (Bryan O'Sullivan's message of "Wed, 11 Jan 2006 14:39:56 -0800")

 > +/**
 > + * memcpy32 - copy data, in units of 32 bits at a time
 > + * @dst: destination (must be 32-bit aligned)
 > + * @src: source (must be 32-bit aligned)
 > + * @count: number of 32-bit quantities to copy
 > + */
 > + 	.globl memcpy32
 > +memcpy32:
 > +	movl %edx,%ecx
 > +	shrl $1,%ecx
 > +	andl $1,%edx
 > +	rep movsq
 > +	movl %edx,%ecx
 > +	rep movsd
 > +	ret

Sorry to keep this going still further, but I'm still confused.  Why
can't this assembly just define __raw_memcpy_toio32() directly?  In
other words, Why do we need to introduce the indirection of having a
stub in C that calls the memcpy32 assembly routine?  Is there some
reason having to do with linker magic and weak symbols?  Could it be
solved by using gcc inline assembly rather than putting the assembly
in a .S file?

Also why does memcpy32() need to be exported?  There are no users
other than the x86_64 version of __raw_memcpy_toio32(), and memcpy32()
doesn't seem like an API we want to add to every arch anyway.

 - R.

  reply	other threads:[~2006-01-11 23:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11 22:39 [PATCH 0 of 3] MMIO 32-bit copy routine, the final frontier Bryan O'Sullivan
2006-01-11 22:39 ` [PATCH 1 of 3] Introduce __raw_memcpy_toio32 Bryan O'Sullivan
2006-01-11 23:43   ` Andrew Morton
2006-01-11 22:39 ` [PATCH 2 of 3] memcpy32 for x86_64 Bryan O'Sullivan
2006-01-11 23:45   ` Roland Dreier [this message]
2006-01-12  0:03     ` Bryan O'Sullivan
2006-01-11 22:39 ` [PATCH 3 of 3] Add __raw_memcpy_toio32 to each arch Bryan O'Sullivan
2006-01-11 23:46   ` Andrew Morton
2006-01-12  0:05     ` Bryan O'Sullivan
2006-01-12  0:13       ` Andrew Morton
2006-01-12  0:21         ` Bryan O'Sullivan
  -- strict thread matches above, loose matches on Subject: below --
2006-01-10 19:53 [PATCH 0 of 3] 32-bit MMIO copy routines, reworked Bryan O'Sullivan
2006-01-10 19:53 ` [PATCH 2 of 3] memcpy32 for x86_64 Bryan O'Sullivan
2006-01-12  8:38   ` Denis Vlasenko
2006-01-12 16:04     ` Bryan O'Sullivan
2006-01-13  9:56       ` Chris Wedgwood
2006-01-13 10:24         ` Denis Vlasenko
2006-01-13 16:21           ` Bryan O'Sullivan
2006-01-06 20:26 [PATCH 0 of 3] 32-bit MMIO copy routine Bryan O'Sullivan
2006-01-06 20:26 ` [PATCH 2 of 3] memcpy32 for x86_64 Bryan O'Sullivan
2005-12-27 23:41 [PATCH 0 of 3] Add memcpy_toio32, a 32-bit MMIO copy routine Bryan O'Sullivan
2005-12-27 23:41 ` [PATCH 2 of 3] memcpy32 for x86_64 Bryan O'Sullivan
2005-12-28  4:22   ` Matt Mackall
2005-12-28  7:54     ` Denis Vlasenko
2005-12-28 14:52     ` Bryan O'Sullivan
2006-01-06  9:12   ` Pavel Machek
2006-01-06 16:02     ` Bryan O'Sullivan

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=adamzi2ib1g.fsf@cisco.com \
    --to=rdreier@cisco.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=bos@pathscale.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox