Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3124827ioo; Tue, 24 May 2022 13:46:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypQLNhpOMjFRc7NBJHHIe+1jEgrgr7HP2nyYjoY9rn/sJgwiskMlQ4GBJIk5iMkV50WoJE X-Received: by 2002:a17:907:97d5:b0:6fe:af07:65a with SMTP id js21-20020a17090797d500b006feaf07065amr19302188ejc.20.1653425209493; Tue, 24 May 2022 13:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653425209; cv=none; d=google.com; s=arc-20160816; b=XHvQJ4RsZMYeN8txa1mtDc4+tb6n0lQpGcDwPFvwW8/MpoZJgeGFpzBR8hqbBGUJmB DB4AYmUuooz57/VfLas3g0fouRKIq5TX0S7oixkNPmBRXpIckAdY3G+xoUvbbCA8yVQv v1uPJWG6yJpnOD1rza94a3+/1PtWbysOVZGAoYtD0JA7ex2zelR8unQ//lgx66tyEnJC XbQiCrvt1QvxwNgyZWrGJ8lw7AQNz4Qmr0tJBLUGXNInnsttWlYkYFiFK1G8lpv3a3xc DbB2TZxd9lL9U6RboKxxvXfSIfVXVDptHM1c1RieufuxGVqArQYoPwBG13x9y01Sd4E/ PA1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=FgIhinTtWQhfc/oPTQyrbxO1LiJD6EqPg+R0ECH5K/g=; b=mL4xOtxe3pffIwr2lgk0zOzjwUomJ/xR8PI4SNM63BYiJaSZH9IvtsM12UEJbDA64n 0sRyl9wtpHKNMX77W0RkW/AIwX6LND8p9TdFdMZH/iNOa1FL536YIhn0uYOQZnRw+rVd 2WoxveXHWJH5kP3cNDHjjAyekVfcS5dK5cee5quuodIBtubQMrerzPIY7fsn61bguDoM 6RnqoRStwTXJtUwmGGsfA0IaUGalL+cy2A4u51/dyfx7xUb29hSJ29/IgIH3JjAW7s4x 9uzIh5l8uQHdZbYGRnXrmxJD2urwb1JbrDDNUFj0aNoT1Qagif3YHbAH0jwl1Uv/iYKZ igDg== 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 d23-20020aa7c1d7000000b00425f61df8cfsi17819603edp.251.2022.05.24.13.46.22; Tue, 24 May 2022 13:46:49 -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 S238062AbiEXOCM (ORCPT + 99 others); Tue, 24 May 2022 10:02:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231281AbiEXOCH (ORCPT ); Tue, 24 May 2022 10:02:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 718503FBCA; Tue, 24 May 2022 07:02:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1877AB818C4; Tue, 24 May 2022 14:02:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0B8CC385AA; Tue, 24 May 2022 14:02:02 +0000 (UTC) Message-ID: <3206237b-4ee2-8707-6de9-87cfb226c87f@linux-m68k.org> Date: Wed, 25 May 2022 00:01:59 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 1/3] m68knommu: fix undefined reference to `mach_get_rtc_pll' Content-Language: en-US To: Geert Uytterhoeven Cc: Linux/m68k , Linux Kernel Mailing List , Arnd Bergmann , kernel test robot References: <20220518065639.2432213-1-gerg@linux-m68k.org> <20220518065639.2432213-2-gerg@linux-m68k.org> From: Greg Ungerer In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Geert, On 24/5/22 17:49, Geert Uytterhoeven wrote: > 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. Yes, that looks to be the easiest solution. New patch coming up. Regards Greg >>> + >>> 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