Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2878735ioo; Tue, 24 May 2022 07:58:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk2wzdETrsZSY/apkU/+hwNovGbdCnetNd+om+b3yVGgmqL+lTgUu1YQdGD13OIu2yYmlA X-Received: by 2002:aa7:8094:0:b0:505:b544:d1ca with SMTP id v20-20020aa78094000000b00505b544d1camr28936256pff.26.1653404304649; Tue, 24 May 2022 07:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653404304; cv=none; d=google.com; s=arc-20160816; b=dL/MvctDcHNK3DeXTDEact3kramVn4TfKnPg9YKwuiflSu2jWKoxKipEi3vtZpmcv0 OxDFJVZNVghhpZh1OfPDdgv93mfW9hriXRNh6HRmbfr2GHdZIoWF/7O00L8jMJNmovwU EZyjdoFsLvIjWjRosrtcdzmPiqoaJI8ps5QfIJ8ywJiT0rwRafIigrc4faVU/AIkDNDb VcBGSxIssFM1aZuzr8Ic8J/YcpVPWkF0HNwjz4mkRffOAcP20u4XlpL//hQXwOvIv1p+ /9G1Dzd7H6h97kKOuUj+SbJpwU/FKXmZnb8VNU/XcoHQk+lKjzv0c6mazSF1ouzSZPpH mHLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=eFuesu4eXOzVy5OiyTe49D1dgIorHEfZWrHJUHl/IrQ=; b=TwiE1ha+W0SuhmqvceCbrV/c4Zo+pJB+dWxpsaWZ6OpxxlbUDeQynXEzAAwo53A6on y6kKtKFDbkM0MbkwttQD5ffMq6qTfqq5CNq0K6RjKVyyXKPy4ms4AhnxIfx6E2v9Rcvs rj3g6Kuhab3yDT3PJM6gBcAROwFfTsQ3aJciPeuWRjwxJ2fsch3LvJqhDQo90/4knZBo qBkOvxk+kpk2MBaw+GQ3VyoI5rfK2b39Qw3R+s6wgr9gMnYVTNHyAVLt9+fMfseGF5W1 CWTyPUAszHvGqXIgJLmzVPk0beMQcuOwSDbwYqGcgszmXzoIx/EXx3T3iBmliowVe6Vd MmEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l184-20020a6388c1000000b003f9f59ea58csi11831171pgd.771.2022.05.24.07.58.12; Tue, 24 May 2022 07:58:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235372AbiEXHtn (ORCPT + 99 others); Tue, 24 May 2022 03:49:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbiEXHtm (ORCPT ); Tue, 24 May 2022 03:49:42 -0400 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F797994CF; Tue, 24 May 2022 00:49:41 -0700 (PDT) Received: by mail-qt1-f175.google.com with SMTP id g3so14203828qtb.7; Tue, 24 May 2022 00:49:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eFuesu4eXOzVy5OiyTe49D1dgIorHEfZWrHJUHl/IrQ=; b=5moe+8LIVlj0hQKkYp8fdAtqM2S3lgWdW/pw7q2djMV1xtEUqwInMtxpjWG0EaGgZK 87P3d7ixl3cAwB8kyXd7xOI1wKVsmdvCrgeV6s+HxRl+m5C76zJbTtB3hRmfUIIW+l8g BygAzeEtubjjBIAebV0Rw0oHyUghXlYiXYHGMT3vYDGhLNgEidK7q7k52xnKDgFg2Bxx 0dlvD3u4SBqqmZgpOXnFk7kC3y5K+KIqCi/bt9ZoDowQ4/cty5+k1UUg3sfg1qvT2Jgl +zx6qDRIPNNlXxDaXyAxxGCJX7YKOcEr7Fg3H+lniAqmiw8s1/iUbVlhGRU3u/ajIzJh NDkQ== X-Gm-Message-State: AOAM533f0gy/FHs7Sws2drAoSV2uTcMOoeP/oDmUhtfrE2/CHbQMjD5Q /AvcJs7CYnrMgrEKpYV26Y4IhFkaOoCLkP7o X-Received: by 2002:a05:622a:1389:b0:2f9:46b4:2990 with SMTP id o9-20020a05622a138900b002f946b42990mr217397qtk.237.1653378580567; Tue, 24 May 2022 00:49:40 -0700 (PDT) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id g1-20020a379d01000000b0069fc13ce1fesm5623169qke.47.2022.05.24.00.49.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 May 2022 00:49:40 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id z7so8208377ybf.7; Tue, 24 May 2022 00:49:40 -0700 (PDT) X-Received: by 2002:a05:6902:120e:b0:634:6f29:6b84 with SMTP id s14-20020a056902120e00b006346f296b84mr25491340ybu.604.1653378579929; Tue, 24 May 2022 00:49:39 -0700 (PDT) MIME-Version: 1.0 References: <20220518065639.2432213-1-gerg@linux-m68k.org> <20220518065639.2432213-2-gerg@linux-m68k.org> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 24 May 2022 09:49:28 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] m68knommu: fix undefined reference to `mach_get_rtc_pll' To: Greg Ungerer Cc: "Linux/m68k" , Linux Kernel Mailing List , Arnd Bergmann , kernel test robot Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On Tue, May 24, 2022 at 9:46 AM Geert Uytterhoeven wrote: > On Wed, May 18, 2022 at 8:56 AM Greg Ungerer wrote: > > Configuring for a nommu classic m68k target and enabling the generic rtc > > driver (CONFIG_RTC_DRV_GENERIC) will result in the following compile > > error: > > > > m68k-linux-ld: arch/m68k/kernel/time.o: in function `rtc_ioctl': > > time.c:(.text+0x82): undefined reference to `mach_get_rtc_pll' > > m68k-linux-ld: time.c:(.text+0xbc): undefined reference to `mach_set_rtc_pll' > > m68k-linux-ld: time.c:(.text+0xf4): undefined reference to `mach_set_rtc_pll' > > > > There is no definitions of "mach_set_rtc_pll" and "mach_get_rtc_pll" in the > > nommu code paths. Move these definitions and the associated "mach_hwclk", > > so that they are around their use case in time.c. This means they will > > always be defined on the builds that require them, and not on those that > > cannot use them - such as ColdFire (both with and without MMU enabled). > > > > Reported-by: kernel test robot > > Signed-off-by: Greg Ungerer > > > --- a/arch/m68k/kernel/time.c > > +++ b/arch/m68k/kernel/time.c > > @@ -82,6 +86,11 @@ void read_persistent_clock64(struct timespec64 *ts) > > #endif > > > > #if IS_ENABLED(CONFIG_RTC_DRV_GENERIC) > > +int (*mach_get_rtc_pll)(struct rtc_pll_info *); > > +int (*mach_set_rtc_pll)(struct rtc_pll_info *); > > +EXPORT_SYMBOL(mach_get_rtc_pll); > > +EXPORT_SYMBOL(mach_set_rtc_pll); > > Oops, this causes build failures for Q40 with CONFIG_RTC_DRV_GENERIC=n, > as arch/m68k/q40/config.c uses mach_]gs]et_rtc_pll() unconditionally. I think the simplest solution is to move these up, next to mach_hwclk. > > > + > > static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm) > > { > > mach_hwclk(0, tm); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds