From patchwork Tue Jun 6 19:10:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 9769903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9029A60353 for ; Tue, 6 Jun 2017 19:39:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FECF27C05 for ; Tue, 6 Jun 2017 19:39:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73BA527F8F; Tue, 6 Jun 2017 19:39:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F11B028358 for ; Tue, 6 Jun 2017 19:39:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445AbdFFTji (ORCPT ); Tue, 6 Jun 2017 15:39:38 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34056 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751512AbdFFTKg (ORCPT ); Tue, 6 Jun 2017 15:10:36 -0400 Received: by mail-pf0-f195.google.com with SMTP id u1so297599pfg.1 for ; Tue, 06 Jun 2017 12:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=from:to:to:to:to:to:to:to:to:to:to:to:to:to:cc:subject:date :message-id:in-reply-to:references; bh=EalZlzEWIRkzFIBivEHQX54fg2fNljIQYyxlVMe0+mw=; b=rB7eSxATzWb4Nj4R2Sia+wYS9F77K15HY0z23bmTF9YwpxFQhNeDN+9zd8rjsRBh7F XPDR2SFqluTODfgvM5Tijtz5RtCjET+ZjZCBe1cW0iLibP5BG1MFMPVsEpd6Jvj4wEkr 0N4JB/NvfHQ2qORLYbyAiAyGrNbcLSVlnBX6hQzE/UQjL72rHPtNexn8LoxOFmDzD0A2 36oGp/wBlDJGmxcVtG5Yb7PSlXtykEGaA8VPZoREVLPsopmxg/GzoJSlxF6WN7s9dFT/ NuBp5etDD35jSoQkCdB8UPoJYvYf6JivnrX++fisa4tXLDQFSjNOhb943mWklTSpz4aN eFFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:to:to:to:to:to:to:to:to:to:to:to:to:cc :subject:date:message-id:in-reply-to:references; bh=EalZlzEWIRkzFIBivEHQX54fg2fNljIQYyxlVMe0+mw=; b=OA2ikYLsZeizgq0xpPj5wQGWikWNHUmsguiVuGcQhlMlmdmekqLNv2oEITgzVSbVCq WPBCeDFs2HLUwwGhJEBjU+hykjbo00QvdINAwBkKFm5rjYhq0bZ4xZYvHPZy9tOweo2t imTnvhXcitHzAdJr64MQKBPd23kMexJQZWWwfrv2kpxwn4EH/g6VOpt8KKaPTlr29oUp JjeG2UdhlDJdufltQUquJ48jIpFQ2Zi5ADmNaiI/wFUmuu9rhPocGzjrOLVFG4AhrVkq 862WGG1BH3EwlizQemEKfxAxLkj4oUbJDK1k020zMUXGZ228OLP3Nbn6HqWtjWBUwLZ9 1v9A== X-Gm-Message-State: AODbwcAE5PhisRxLoZiWUJkTBEF20/fOuF5WOjCSOkCFwBzeJ4yjOm/D VOZY/AbVThuzX1mp X-Received: by 10.98.72.129 with SMTP id q1mr27178545pfi.161.1496776230980; Tue, 06 Jun 2017 12:10:30 -0700 (PDT) Received: from localhost ([216.38.154.21]) by smtp.gmail.com with ESMTPSA id x6sm62566120pfk.22.2017.06.06.12.10.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 12:10:30 -0700 (PDT) From: Palmer Dabbelt To: monstr@monstr.eu To: ralf@linux-mips.org To: liqin.linux@gmail.com To: lennox.wu@gmail.com To: ysato@users.sourceforge.jp To: dalias@libc.org To: davem@davemloft.net To: linux-mips@linux-mips.org To: linux-sh@vger.kernel.org To: sparclinux@vger.kernel.org To: geert@linux-m68k.org To: linux-kernel@vger.kernel.org To: linux-arch@vger.kernel.org Cc: Palmer Dabbelt Subject: [PATCH 2/7] m32r: Use lib/ucmpdi2.c Date: Tue, 6 Jun 2017 12:10:18 -0700 Message-Id: <20170606191023.24581-3-palmer@dabbelt.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170606191023.24581-1-palmer@dabbelt.com> References: <20170523220546.16758-1-palmer@dabbelt.com> <20170606191023.24581-1-palmer@dabbelt.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These files are functionally identical to the shared copies that I recently added. Signed-off-by: Palmer Dabbelt Reviewed-by: Geert Uytterhoeven --- arch/m32r/Kconfig | 1 + arch/m32r/lib/Makefile | 3 +-- arch/m32r/lib/libgcc.h | 23 ----------------------- arch/m32r/lib/ucmpdi2.c | 17 ----------------- 4 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 arch/m32r/lib/libgcc.h delete mode 100644 arch/m32r/lib/ucmpdi2.c diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 95474460b367..756d68d4f4e1 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -19,6 +19,7 @@ config M32R select HAVE_DEBUG_STACKOVERFLOW select CPU_NO_EFFICIENT_FFS select DMA_NOOP_OPS + select GENERIC_UCMPDI3 config SBUS bool diff --git a/arch/m32r/lib/Makefile b/arch/m32r/lib/Makefile index 5889eb9610b5..0a753a833bbf 100644 --- a/arch/m32r/lib/Makefile +++ b/arch/m32r/lib/Makefile @@ -3,5 +3,4 @@ # lib-y := checksum.o ashxdi3.o memset.o memcpy.o \ - delay.o strlen.o usercopy.o csum_partial_copy.o \ - ucmpdi2.o + delay.o strlen.o usercopy.o csum_partial_copy.o diff --git a/arch/m32r/lib/libgcc.h b/arch/m32r/lib/libgcc.h deleted file mode 100644 index 267aa435bc35..000000000000 --- a/arch/m32r/lib/libgcc.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __ASM_LIBGCC_H -#define __ASM_LIBGCC_H - -#include - -#ifdef __BIG_ENDIAN -struct DWstruct { - int high, low; -}; -#elif defined(__LITTLE_ENDIAN) -struct DWstruct { - int low, high; -}; -#else -#error I feel sick. -#endif - -typedef union { - struct DWstruct s; - long long ll; -} DWunion; - -#endif /* __ASM_LIBGCC_H */ diff --git a/arch/m32r/lib/ucmpdi2.c b/arch/m32r/lib/ucmpdi2.c deleted file mode 100644 index 9d3c682c89b5..000000000000 --- a/arch/m32r/lib/ucmpdi2.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "libgcc.h" - -int __ucmpdi2(unsigned long long a, unsigned long long b) -{ - const DWunion au = {.ll = a}; - const DWunion bu = {.ll = b}; - - if ((unsigned int)au.s.high < (unsigned int)bu.s.high) - return 0; - else if ((unsigned int)au.s.high > (unsigned int)bu.s.high) - return 2; - if ((unsigned int)au.s.low < (unsigned int)bu.s.low) - return 0; - else if ((unsigned int)au.s.low > (unsigned int)bu.s.low) - return 2; - return 1; -}