From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0CBBC433E0 for ; Wed, 10 Feb 2021 00:04:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1988D64E40 for ; Wed, 10 Feb 2021 00:04:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234828AbhBJAEa (ORCPT ); Tue, 9 Feb 2021 19:04:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233730AbhBIUhA (ORCPT ); Tue, 9 Feb 2021 15:37:00 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C1D5C0698CB for ; Tue, 9 Feb 2021 12:26:43 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id b3so23642680wrj.5 for ; Tue, 09 Feb 2021 12:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oTD7IFCF48qtHTJsY6kfEhXXsGhoaPhe67DMMK3vyls=; b=GuZHVNfyPKDcJvFWmPCNGhi6aJ9BHNQ0tQbhdcW2yDnmIOwBmNyOVrpfmDi4xdGeL9 xZWd98EojMGEnEpxrgMjoEMmHzOYt7JsMHPjmaGQ/L2yLDi1g3o2/HtLMaZu81fJTlyc Xx9gzXXTIE3nsSNY5ilht/xxXiuU3O9V70oVD8qqN5UeZYsAOznfLSQ//luKrMnh23Si AdfKf1s/eTnqGtpe230BkOT0e7YsmXnPxoZK7nf0oKX4hLLRprej09+InJhuys4Hbsle oCjOsjm/n3k9ti7zkXJR/NTAWgUoGSBUOdcdzNLkQEC0RXnlno+hvnTovpTSG9PCsCSQ OnKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oTD7IFCF48qtHTJsY6kfEhXXsGhoaPhe67DMMK3vyls=; b=sqJQfpOVGB5k3hMAtVktXkADERuOBxcseX8hIhB2Yb7B1QiCp173V3gnsO5t5+r1+K f/wzI421hNnqsbMTN3F7D+ThYnTc6FZyn5Vza5a4JivNOlIe5lseBC3qW/Dn19hJGowi O6H1msTnjE8I1FY0U09lSHCMi1uWX24azctscEzZFHNuNIrI26QwwciSecG6oGjriAWk +ZnOwhlNVdcDkQJuWwCSGh11IX0g1k8hXDjj4jIdPt6RaV6QsxbB/BeVjFG6zkrB7tht QV3mcL+w/5aBNYdCdIBM8RQkXwT/nbADwFv1QFbFb9gM/y2ExmoWkBQbvLUz+rA9H9py pBzQ== X-Gm-Message-State: AOAM532z7FqTqZlOG9z5xZLnKGkaj4R7wax8/7h9osmtWt0iTE7alPkq dejfr6BQdCVrMvkYp0iEtuZisQ== X-Google-Smtp-Source: ABdhPJyBG7M88wR9vLHlTuEvxIPwXyFP/WaFjIzf3BFzPGrZolU5OZou5/NrzNBfq1q4F5wz1JTwyw== X-Received: by 2002:adf:dd83:: with SMTP id x3mr27161973wrl.421.1612902402205; Tue, 09 Feb 2021 12:26:42 -0800 (PST) Received: from ?IPv6:2a01:e34:ed2f:f020:4cbf:512d:a355:e705? ([2a01:e34:ed2f:f020:4cbf:512d:a355:e705]) by smtp.googlemail.com with ESMTPSA id k6sm40978153wro.27.2021.02.09.12.26.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Feb 2021 12:26:41 -0800 (PST) Subject: Re: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610 To: Guo Ren Cc: Linux Kernel Mailing List , linux-csky@vger.kernel.org, Guo Ren , Thomas Gleixner , Marc Zyngier References: <20210204074609.3553018-1-guoren@kernel.org> <20210204074609.3553018-2-guoren@kernel.org> <973602b9-83d1-8e22-60bf-cd77d606a126@linaro.org> From: Daniel Lezcano Message-ID: Date: Tue, 9 Feb 2021 21:26:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/2021 17:02, Guo Ren wrote: > Hi Daniel, > > On Sun, Feb 7, 2021 at 5:29 PM Daniel Lezcano wrote: >> >> On 07/02/2021 04:31, Guo Ren wrote: >>> Hi Daniel, >>> >>> On Thu, Feb 4, 2021 at 4:48 PM Daniel Lezcano wrote: >>>> >>>> On 04/02/2021 08:46, guoren@kernel.org wrote: >>>>> From: Guo Ren >>>>> >>>>> The timer-mp-csky.c only could support CPU_CK860 and it will >>>>> compile error with CPU_CK610. >>>>> >>>>> It has been selected in arch/csky/Kconfig. >>>> >>>> It would be better if you fix the root cause of the compilation error. >>> The timer-mp-csky.c has used specific instructions which only >>> supported by CK860 and timer-mp-csky.c is only design for CK860. >> >> I guess you are referring to mfcr() ? >> >>> In arch/csky/Konfig we only select it with CK860. >>> select CSKY_MPINTC if CPU_CK860 >>> select CSKY_MP_TIMER if CPU_CK860 >>> >>> So here let's select timer-mp-csky.c in arch/csky/Kconfig, not in >>> drivers/clocksource/Kconfig. >> >> The COMPILE_TEST option is there to let other architecture to compile >> drivers and increase the compilation test coverage. >> >> The proposed change just removes the driver from this coverage. > When we compile the csky arch with C860, it will be selected. > >> >> Ideally, it would be better to keep it with the COMPILE_TEST option, so >> changes impacting all the drivers can be caught before submitting the >> patches. >> >> By just adding >> >> #ifndef mfcr >> #define mfcr(a) 0 >> #endif > > 610 couldn't support CSKY_MP_TIMER and it's only for 860. So it's not > a coding skill issue. I think there is a misunderstanding. When I want to compile on x64 all the timer drivers, I do enable COMPILE_TEST, then the strings appear and the drivers can be selected. If the COMPILE_TEST is not enabled, the string does not appear, it is not possible to enable/disable it and the platform must enable it from the aforementioned arch/csky/Konfig. Actually, the timer drivers policy is : drivers can not be enabled from the drivers/clocksource/Kconfig, it is up to the platform Kconfig to select them. The exception is when the COMPILE_TEST option is set for testing purpose. The timer must compile on any other archs and the stubs for the platform specific calls must be provided. Did I miss something with your changes ? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog