linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: jwboyer@linux.vnet.ibm.com
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH 2/2] [PPC] Add strncmp to arch/ppc
Date: Sun, 27 Apr 2008 14:23:46 -0600	[thread overview]
Message-ID: <fa686aa40804271323l634674b2y2bb54d9c3d35100c@mail.gmail.com> (raw)
In-Reply-To: <1208825427.6654.46.camel@vader.jdub.homelinux.org>

On Mon, Apr 21, 2008 at 6:50 PM, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> Commit 0119536cd314ef95553604208c25bc35581f7f0a added an assembly version
>  of strncmp to PowerPC.  However, it changed a common header file between
>  arch/ppc and arch/powerpc without adding strncmp to arch/ppc.  This fixes
>  that omission so that arch/ppc links again.
>
>  Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

>
>  ---
>   arch/ppc/kernel/ppc_ksyms.c |    1 +
>   arch/ppc/lib/string.S       |   14 ++++++++++++++
>   2 files changed, 15 insertions(+)
>
>  --- linux-2.6.orig/arch/ppc/kernel/ppc_ksyms.c
>  +++ linux-2.6/arch/ppc/kernel/ppc_ksyms.c
>  @@ -89,6 +89,7 @@ EXPORT_SYMBOL(strncpy);
>   EXPORT_SYMBOL(strcat);
>   EXPORT_SYMBOL(strlen);
>   EXPORT_SYMBOL(strcmp);
>  +EXPORT_SYMBOL(strncmp);
>
>   EXPORT_SYMBOL(csum_partial);
>   EXPORT_SYMBOL(csum_partial_copy_generic);
>  --- linux-2.6.orig/arch/ppc/lib/string.S
>  +++ linux-2.6/arch/ppc/lib/string.S
>  @@ -121,6 +121,20 @@ _GLOBAL(strcmp)
>         beq     1b
>         blr
>
>  +_GLOBAL(strncmp)
>  +       PPC_LCMPI r5,0
>  +       beqlr
>  +       mtctr   r5
>  +       addi    r5,r3,-1
>  +       addi    r4,r4,-1
>  +1:     lbzu    r3,1(r5)
>  +       cmpwi   1,r3,0
>  +       lbzu    r0,1(r4)
>  +       subf.   r3,r0,r3
>  +       beqlr   1
>  +       bdnzt   eq,1b
>  +       blr
>  +
>   _GLOBAL(strlen)
>         addi    r4,r3,-1
>   1:     lbzu    r0,1(r4)
>
>  _______________________________________________
>  Linuxppc-dev mailing list
>  Linuxppc-dev@ozlabs.org
>  https://ozlabs.org/mailman/listinfo/linuxppc-dev
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

      reply	other threads:[~2008-04-27 20:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22  0:47 [PATCH 0/2] Fix 440 arch/ppc builds Josh Boyer
2008-04-22  0:49 ` [PATCH 1/2] [PPC] 4xx: Fix duplicate phys_addr_t definition Josh Boyer
2008-04-22  0:50 ` [PATCH 2/2] [PPC] Add strncmp to arch/ppc Josh Boyer
2008-04-27 20:23   ` Grant Likely [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=fa686aa40804271323l634674b2y2bb54d9c3d35100c@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).