Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp22967imm; Tue, 3 Jul 2018 13:08:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfujxQN9WyFI1p2lCLMCfF6zc9GcJekE7iPVuKvlzCvk76aUo9iNWIikXRvV2NLWMNKZjtT X-Received: by 2002:a63:f18:: with SMTP id e24-v6mr10451504pgl.320.1530648508783; Tue, 03 Jul 2018 13:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530648508; cv=none; d=google.com; s=arc-20160816; b=Y148KRuhpJLffVFtmcf/zrEg5ubUSV+7Rj0rhRUsspfhNiW4s7aSqS/qZdvG4ycIyx fw7mu/y7HCqU5gcGcDf6uH9/Cqd6zgOngceWsM9IOUQd2qDgIpBZVZ4CKCnuM1iW9ZZs yO+Cg+r3rbOxtIp1o3T+kFUtkX7G653/ehWhjsDmIACMRBVr7+bGC826W1Dof1SuZk23 93nwyEf3opDPTj9ggafYEqs0uJ4/q1MmF1HKffaux3YEjgsifHVMF6Jt6dbZtuuOvtcp FtF8/qJ3UOA8Q00PuhXkJOu88vKwtHI9KKrQkROCtg4JdwTpxjR+S0QHJ/RDr8383YLp duKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=xr+2qGqYxeGmPM10hhroGKobS/ccdJCJg/CUzWlPBpw=; b=sseShzaMCFY5tXbIYAASnR2q6xGC94/A2BlVOyyzQ7PeoBvUXdAQdYQvgrwCVIunIh 8jd8yWaIvELYGvSgNW4WbT2qLFD3gofLp7pEpcY4kLZ3LO2W5TTQT5bSZffNHMBqcUCA L89axSKoAzL3y3M4cgnHVQXonyPJjIJvFEp6yzocL6clC6BGk8t4QyGbDEFBoDmvon9A dLE2qqensRv1JdYUZ/v9zyk8r5qrC/mUfH3PS5yd6hQxaIxbMC0rREykC6RSaXqEhnzf O82F2mv1TRPjCAHqdBBNqcDY58PIX5yPQxMq0dK/x97bqtoblSOKfu1LEbdQ7EuVEXMt BJHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=RjeP91SM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si1798061ple.308.2018.07.03.13.08.14; Tue, 03 Jul 2018 13:08:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=RjeP91SM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752775AbeGCUGe (ORCPT + 99 others); Tue, 3 Jul 2018 16:06:34 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:33907 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753185AbeGCUFA (ORCPT ); Tue, 3 Jul 2018 16:05:00 -0400 Received: by mail-lf0-f66.google.com with SMTP id n96-v6so2580947lfi.1; Tue, 03 Jul 2018 13:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xr+2qGqYxeGmPM10hhroGKobS/ccdJCJg/CUzWlPBpw=; b=RjeP91SMwXYdjjQydW6j8bbLKbPtIiV78eQLEqu72QDuR15Kf2hp7lhOpMt8q/ZWyP JCWpFBx2mI3KaFmbNHKVFlJTMbboOGxUr4ObE+oO4Ez91t4aFRkZXzlAtBtDLrubb6UF Wf7OBv0laL7WKqCjfyK/xXw92mDzo3hEk6uVTG6ysPVN9AsAx71M+6Pg7VuipyXpj8oH Q32xqCYzZDbnzdMZv3kiRk9faWvJRM1qHVlvs6pDPvDP4gz9Tixzuj7cxpIHm0AbmBeo oRrfxB7NutmdU+LfVnLtTT2wGfgliacOw2jijnoBV2pTcwAmjPWhACb+c5VAvwg1ISKy mzfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=xr+2qGqYxeGmPM10hhroGKobS/ccdJCJg/CUzWlPBpw=; b=iH1iR6Wmas0/Bh0pvbsGtYW6BwcKglN31nwxiF04h11fF3nTBX/a4mYNyY3AJ60kS4 vlT2B2c6QwGUZzw/9Ue0TCiw0fXNF/PKzkVwiLfTYK1MDFV8gK+z23uXQQD9MFQBM8cb qchHARonLcPlLhIVtUR+V/ddltqxP1Vf00CGVq4lrcwStJkKKoNd8hy5bEaiELu/qfuJ uHE8SXWxGxR9TACD+68ImxM7VmULMj2wwVhQthme6qJyHy9uk5f5LD0u5BpWpi8mJT7p RpubaB5iFkvcVbmSsQQ7A5L2SSSz9t7zVkX12qYnpq/K3DZdjkpcDztwBkC3GVfTKvxT SCWA== X-Gm-Message-State: APt69E2IYDCU2FmQhZoR+SpvTBp0kWpl6TNnlLlqJHkJa9L4wbfGi7aY rjqM16XyYSSAQrdAEUp1ICwNNON3vs1tZsUGyAU= X-Received: by 2002:a19:9710:: with SMTP id z16-v6mr21669879lfd.17.1530648298643; Tue, 03 Jul 2018 13:04:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:41c1:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 13:04:57 -0700 (PDT) In-Reply-To: <7a1490b307d8e62cebe80ebc03fea6bad8b0f227.1530465326.git.ren_guo@c-sky.com> References: <7a1490b307d8e62cebe80ebc03fea6bad8b0f227.1530465326.git.ren_guo@c-sky.com> From: Arnd Bergmann Date: Tue, 3 Jul 2018 22:04:57 +0200 X-Google-Sender-Auth: OSqotaHHgy46wrTyW5vTBxKQG3E Message-ID: Subject: Re: [PATCH V2 13/19] csky: Library functions To: Guo Ren Cc: linux-arch , Linux Kernel Mailing List , Thomas Gleixner , Daniel Lezcano , Jason Cooper , c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, thomas.petazzoni@bootlin.com, wbx@uclibc-ng.org, Greentime Hu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 1, 2018 at 7:30 PM, Guo Ren wrote: > > diff --git a/arch/csky/kernel/cskyksyms.c b/arch/csky/kernel/cskyksyms.c > new file mode 100644 > index 0000000..3f13594 > --- /dev/null > +++ b/arch/csky/kernel/cskyksyms.c > @@ -0,0 +1,31 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. > +#include > +#include > +#include > + > +/* > + * Defined in libgcc > + * > + * See arch/csky/Makefile: > + * -print-libgcc-file-name > + */ > +extern void __ashldi3 (void); > +extern void __ashrdi3 (void); > +extern void __lshrdi3 (void); > +extern void __muldi3 (void); > +extern void __ucmpdi2 (void); > +EXPORT_SYMBOL(__ashldi3); > +EXPORT_SYMBOL(__ashrdi3); > +EXPORT_SYMBOL(__lshrdi3); > +EXPORT_SYMBOL(__muldi3); > +EXPORT_SYMBOL(__ucmpdi2); It's better to avoid relying on libgcc here. Please use the CONFIG_GENERIC_LIB_ASHLDI3/ASHRDI3/LSHRDI3/etc helpers that we already have in the kernel. Arnd