From patchwork Sat Sep 28 08:22:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 278721 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 55A7E2C0337 for ; Sat, 28 Sep 2013 18:23:27 +1000 (EST) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 203F02C0246 for ; Sat, 28 Sep 2013 18:22:59 +1000 (EST) Received: by mail-lb0-f180.google.com with SMTP id q8so2973937lbi.39 for ; Sat, 28 Sep 2013 01:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=bpJMWXjCVo97mX0DUbWVqSO40V675IUXngsfNzyHos0=; b=gA5mP6Yft72jCKb6R3sMdt87EbYUo1EP4DtIewswbbeGfNj2tY7e5ExE4pUAmXovY9 bp5g+KbBAU34QsmyBlF2x0XPcWN8tl1482sIdKIen7K3aePNlL+BVYazHKxnsgaP+mpa 1vPnQWbdmIWsoA6YxzyPp6ICMMqrOQhmMk72uZztbfQPg+cfdn0ZHZTk6soHrvOXaJzt bB09lSO3awWSmNb3WOqBw6eOTYLIiMKs2Cq++Oke9qXvD52h6+ChqA3AoXlvyiuT/LBs K5xJMi2UWGtSBHu71iu9jhME7EwQnqEwrBBv8onvlvhVDBY8SSEUAVyIjiE9XT8jDguq F/FQ== X-Received: by 10.112.149.197 with SMTP id uc5mr12069994lbb.19.1380356574838; Sat, 28 Sep 2013 01:22:54 -0700 (PDT) Received: from localhost ([83.220.239.121]) by mx.google.com with ESMTPSA id vs11sm9560827lac.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Sep 2013 01:22:54 -0700 (PDT) From: Vladimir Murzin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 1/2] powerpc: net: filter: fix DIVWU instruction opcode Date: Sat, 28 Sep 2013 10:22:00 +0200 Message-Id: <1380356521-3432-1-git-send-email-murzin.v@gmail.com> X-Mailer: git-send-email 1.8.1.5 Cc: matt@ozlabs.org, netdev@vger.kernel.org, Vladimir Murzin , dborkman@redhat.com, edumazet@google.com, paulus@samba.org, davem@davemloft.net X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Currently DIVWU stands for *signed* divw opcode: 7d 2a 4b 96 divwu r9,r10,r9 7d 2a 4b d6 divw r9,r10,r9 Use the *unsigned* divw opcode for DIVWU. Suggested-by: Vassili Karpov Reviewed-by: Vassili Karpov Signed-off-by: Vladimir Murzin Acked-by: Matt Evans --- Changelog v1->v2 Added credit to Vassili Karpov (malc) who kindly reviewed generated assembly [1] and highlighted usage of signed division. Note: temporary, for technical reason, he's not able to receive email. [1]http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg71635.html arch/powerpc/include/asm/ppc-opcode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index eccfc16..0a4a683 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h @@ -171,7 +171,7 @@ #define PPC_INST_MULLW 0x7c0001d6 #define PPC_INST_MULHWU 0x7c000016 #define PPC_INST_MULLI 0x1c000000 -#define PPC_INST_DIVWU 0x7c0003d6 +#define PPC_INST_DIVWU 0x7c000396 #define PPC_INST_RLWINM 0x54000000 #define PPC_INST_RLDICR 0x78000004 #define PPC_INST_SLW 0x7c000030