Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751896AbdFFTKs (ORCPT ); Tue, 6 Jun 2017 15:10:48 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35354 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751445AbdFFTKl (ORCPT ); Tue, 6 Jun 2017 15:10:41 -0400 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2327 Lines: 91 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; -} -- 2.13.0