Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp901479pxb; Tue, 9 Feb 2021 16:06:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8lhvhAt8JJ3tUEyLLCJn/wLVVv6HcxjX90J0AyfBwXruUPetslZmpTUBYbiCxEuFmiM5+ X-Received: by 2002:aa7:cd8d:: with SMTP id x13mr669499edv.286.1612915566627; Tue, 09 Feb 2021 16:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612915566; cv=none; d=google.com; s=arc-20160816; b=Sw03OJESW4LfedTBxpRbZOt7jVaDOk871caY0yRz74EwYiN9aMjf37Dvx9lQndscHQ haKp7IHNRKB7C0TlwzyY9m75wAua8pKezz57XdLkZNOT1gPiNgOas0DCXunITIx1MVl3 s60APsxdf9XF9n9NgCwd+YWFvletWq/DOCX47r/oqf6BFQ09lVmfh9g1zaPrNGNwkexR jnGIGld7v0SVFW4B1UtVdYt/5C6UtKwZmBkgM1+UwfvCRk72ooi+upwaP8zYq19OYvHX dkSOFe/llh1hIputb7eJ6NaaVQgpnj5KYBovcHBCE8htGQAx36/cBwiT9xw+UJpOP6xS Yy9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=oTD7IFCF48qtHTJsY6kfEhXXsGhoaPhe67DMMK3vyls=; b=XoIHoZRMzIzYSYecVU19pNSo3O9U6SC/sm6v496KBUtIO5pOZubXytSBIp5Q8p2Ql/ 2vVcT+ysN7pi3J3eDK1/pRDa8I4T/dx1Rabg9GWkd8Q2jo/l6tbYarwAWNlzbmWS1Mlh zzigNx2AFePlWSD7Rt3O0KpchXzFbFkdmU0ezht/BASMGQXbAIkCcnJW8BedU3LU6G+X n3dfpgNWQRYslj59n2SHqHRm941zSBQ5WQdYORn5j3ajzdA0gBu7U7uTb8fyRHWHk0sC rXKfc6FgaXBeO1MG+8CZzV9ZBp0AVzS/K3s2EQc51PO4Gs2eRe50z4H6+V00jjvaNImF U6RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GuZHVNfy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t18si84141ejc.249.2021.02.09.16.05.42; Tue, 09 Feb 2021 16:06:06 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=GuZHVNfy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234790AbhBJADx (ORCPT + 99 others); Tue, 9 Feb 2021 19:03:53 -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-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