Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2435463ybh; Fri, 24 Jul 2020 12:45:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyoaGqL7Gyp52KZojZbvdMe4ToaEcVVZb0cPG/VH3HILwNVrH7YIPitS8xPJVag2jv4Rs/ X-Received: by 2002:a05:6402:b57:: with SMTP id bx23mr10022749edb.304.1595619939731; Fri, 24 Jul 2020 12:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595619939; cv=none; d=google.com; s=arc-20160816; b=kRglXS0DTYAOZ4LDMa3kE03lILzDl9MAbc9hRO2qnwlAIYVVwi5ILfKGN1MVtlUdr6 WW28iNitvBtfwheewz7d2ydSC4YuRgUMIGikv1fVZA0awBjfLF1+L0KZiebJLAvRhM9u dF5/qNXds5ZzM2jkNPLCy1CXNLqBOFZjgqFB3XntYOqKTuM6vU/BuoGw/mFFHyvcjgIH P95KGYUHr90c2EOlc7Fu2/Ru709fWC2UlmEhz6cVwyD7DY/fiIouSChCFvuheGOBx396 5FXhXo2EUUTwzEMdu11wYnvl7pcjrhveBiWyYvPpwuTNATMS3nJcSbg0HOiFFj3a5Ns8 wDHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2FNwiDB4Is7qrulzlgYJFnTrlf8Gx1VzWv+ptDESIw0=; b=oFofxwD0fTil46gQCii4vSPL1G0uD+KkQPntFQSXa4ldQMlrzqUhIPQ/fjnsm8VYyo 6POuuUi87yDwjjpcJs7w/e2xb4bHGgUgbPCkVuqvoaBQFMWZqa3MV1oQf27Lf7TQfsUx EhZmMKeU34grK2/Mn2y+BTFV29FBb1/AphaZ65+hWNARvoveYN69yem5G6btuRRvGxv7 zc5cKdMmjOL0Gru9Dn1CeqCrFRw+tEiVZM3ZuL7AAsURTneHLcEtVcAQe1oXt1SEi9B0 Y5c/q0xaFuQxvkR5/N8z5tctVeYkHriAdctegfz+t2S/eKiEOKa9usopQfXt6IjKfyMn wGGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si1150870edr.390.2020.07.24.12.45.16; Fri, 24 Jul 2020 12:45:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbgGXToZ (ORCPT + 99 others); Fri, 24 Jul 2020 15:44:25 -0400 Received: from brightrain.aerifal.cx ([216.12.86.13]:35644 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgGXToZ (ORCPT ); Fri, 24 Jul 2020 15:44:25 -0400 Date: Fri, 24 Jul 2020 15:44:23 -0400 From: Rich Felker To: Guenter Roeck Cc: Kuninori Morimoto , Yoshinori Sato , Andrew Morton , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sh: add missing EXPORT_SYMBOL() for __delay Message-ID: <20200724194423.GJ6949@brightrain.aerifal.cx> References: <87wob2clos.wl-kuninori.morimoto.gx@renesas.com> <20200722023840.GA55317@roeck-us.net> <20200722225239.GX14669@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 22, 2020 at 04:52:56PM -0700, Guenter Roeck wrote: > Rich, > > On 7/22/20 3:52 PM, Rich Felker wrote: > > On Tue, Jul 21, 2020 at 07:38:40PM -0700, Guenter Roeck wrote: > >> On Thu, Dec 12, 2019 at 11:38:43AM +0900, Kuninori Morimoto wrote: > >>> From: Kuninori Morimoto > >>> > >>> __delay() is used from kernel module. > >>> We need EXPORT_SYMBOL(), otherwise we will get compile error. > >>> > >>> ERROR: "__delay" [drivers/net/phy/mdio-cavium.ko] undefined! > >>> > >>> Signed-off-by: Kuninori Morimoto > >> > >> I must admit that this patch completely baffles me. __delay was > >> already exported, only elsewhere in the file. With this patch > >> in place, it is exported twice, and all sh builds in -next fail > >> with > >> > >> In file included from include/linux/linkage.h:7, > >> from arch/sh/include/asm/bug.h:5, > >> from include/linux/bug.h:5, > >> from include/linux/thread_info.h:12, > >> from include/asm-generic/current.h:5, > >> from ./arch/sh/include/generated/asm/current.h:1, > >> from include/linux/sched.h:12, > >> from arch/sh/lib/delay.c:8: > >> include/linux/export.h:67:36: error: redefinition of '__ksymtab___delay' > >> > >> Guenter > >> > >>> --- > >>> arch/sh/lib/delay.c | 1 + > >>> 1 file changed, 1 insertion(+) > >>> > >>> diff --git a/arch/sh/lib/delay.c b/arch/sh/lib/delay.c > >>> index dad8e6a..540e670 100644 > >>> --- a/arch/sh/lib/delay.c > >>> +++ b/arch/sh/lib/delay.c > >>> @@ -29,6 +29,7 @@ void __delay(unsigned long loops) > >>> : "0" (loops) > >>> : "t"); > >>> } > >>> +EXPORT_SYMBOL(__delay); > >>> > >>> inline void __const_udelay(unsigned long xloops) > >>> { > > > > I presently have a revert of this commit in queue for next. If it's > > sufficiently breaking (and especially if there are other regressions > > that need to be fixed, see the pmd_free thing) I could try to get it > > in for 5.8 still but that's getting a bit late. > > > > The patch in mainline is ok. It appears that it has been applied > again in -next. > > "git log --oneline v5.7.. arch/sh/lib/delay.c" on top of next-20200721 > reports: > > ee0e4f15dfd4 (origin/akpm) sh: add missing EXPORT_SYMBOL() for __delay > d1f56f318d23 sh: add missing EXPORT_SYMBOL() for __delay > > Maybe it just needs to be dropped from the akpm tree in -next ? Could it be a bad merge or patch applied twice or something? I don't see how the symbol is being exported twice. The argument to revert the patch still seems correct. Looking at current linux-next, ba722ca780 from akpm is re-adding the patch after it gets reverted. Andrew, could you drop your copy of this patch? It's already upstream as of 5.8-rc1 and now just needs to be reverted upstream. Rich