Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1133332pxb; Wed, 10 Feb 2021 00:26:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyC2bhMEW7AIoR1Lr5i/wxzAxSo0jg5RnGyCtLKHg51PZu+NLyYDaBBMw0DmuSPHmaDsZjN X-Received: by 2002:a17:906:a20e:: with SMTP id r14mr1843084ejy.404.1612945583352; Wed, 10 Feb 2021 00:26:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612945583; cv=none; d=google.com; s=arc-20160816; b=H31k4OaqZ0e43Qp4JyyUkzGmdQnv2qYLycTRYqL1gIROUM81Of/J1++jab2iqrr5Hd LUVb20HFIayhlvi4Letqt1clXS+HJaAl3jE8fup6EtBdUfQcarXp+3RIPg+WCYQJbPDo Aj9E1csHF9/4TZZvz+Ja6ny9ddwoeObP/A252MWVvIQpiRbDfnTNgTRWo7U35ru28Boj nee9fv0esUUfy+mnt7+HLZM76KuwMVIRMfM95RW9bCxTqg0P9hNXrghi5RsJm6hN6YC2 /216zJgxIwffoNweMbKG0/dJeD+xS3BA3KaJy3+yGY+Q1IpGplNNeotyExfVqtWHydib K01g== 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:dkim-signature; bh=nDW3wTYSHkD67iY6oFJHtYwn72qpurmLWvNJpp9Pn1A=; b=REjgGlMHwKLjs/vlNLmeN+duetpjlX9JThu+ijgYXVnmP6rXRbwsoWpq1lG6Z0qINt xvHORIGlfyZwGiM9gZ2abyp2hs640IANRvQjBPRMSmZH1uab0QyARITQjN+QchrlvHvX Haq4KnTouCjaW4wlbpyQIxtzXl+VhIcMlIT+pW0jfVgZF6XECPYg4pUlR/ZF7DLIKOtJ L9AghUywWEMRfeMaIHctBTb/ZP151qQzXPc7yEg+GOBHdaWHTagckgCxRVW7ZKlnNqhm dyN/tHnjtAzg7VrsuSljDgno2FWJO8CHPXOKUhFyqOHttfBTDcF/mCdNL5v+1QIWDZy1 Smww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h0cDfyjg; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi22si888969ejb.299.2021.02.10.00.25.59; Wed, 10 Feb 2021 00:26:23 -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=@kernel.org header.s=k20201202 header.b=h0cDfyjg; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233664AbhBJDFQ (ORCPT + 99 others); Tue, 9 Feb 2021 22:05:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:42268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233561AbhBJDE6 (ORCPT ); Tue, 9 Feb 2021 22:04:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4CA3E64E4E; Wed, 10 Feb 2021 03:03:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612926235; bh=B9W2ijWUGdA9x4gTDEc2lDSped2NoF8LVJewm3gkuw8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=h0cDfyjgMlWyrUEfWBIbxOpTvLfTFGSCBnJ9VTUCfwHzUNcJDYjNM20rgVv2wnpsh /wPCZ5RHFwgUHS8vmCS9FNbbj7BTMXH4nVj2cRKNhmS3VaYdWNFTAdZQTictbXE2+0 P5Pk9df3jA9osE1P7GQe6C4SAmYUQxiOlMrCp9SX+clMrZmG9wpnigVd0Xw+kpah+d ROvh+rNuFcjSQXdFAwBl7wyBveTAkW2PwUHiVEK/e7o+oODE2hA5t/RMjD/2VoSwVM gxU5HCLBRdw4fZwM7ZYZBAYLok0NtZFHg7UmlmdYJ4az3uYBHXqtnydyQcofrvSzto xvl84uT0lQZ/w== Received: by mail-lf1-f45.google.com with SMTP id u25so709015lfc.2; Tue, 09 Feb 2021 19:03:55 -0800 (PST) X-Gm-Message-State: AOAM530nZe5F4+WSVTlghkp/hfHEbaObFYDQzb3PVhYLmEb/ERstbhkL UeJzcipox5QDBaHqvQLibBDkENX+ZF8n5T3nix0= X-Received: by 2002:a19:f00a:: with SMTP id p10mr551180lfc.355.1612926233485; Tue, 09 Feb 2021 19:03:53 -0800 (PST) MIME-Version: 1.0 References: <20210204074609.3553018-1-guoren@kernel.org> <20210204074609.3553018-2-guoren@kernel.org> <973602b9-83d1-8e22-60bf-cd77d606a126@linaro.org> In-Reply-To: From: Guo Ren Date: Wed, 10 Feb 2021 11:03:42 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] drivers/clocksource: Fixup csky,mptimer compile error with CPU_CK610 To: Daniel Lezcano Cc: Linux Kernel Mailing List , linux-csky@vger.kernel.org, Guo Ren , Thomas Gleixner , Marc Zyngier Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, On Wed, Feb 10, 2021 at 4:26 AM Daniel Lezcano wrote: > > 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 ? I think our biggest difference is: - You think that CSKY_MPTIMER should not be related to the architecture, but can be compiled with any architecture. - But I think CSKY_MPTIMER only could to be compiled with CSKY C860. But from the perspective of easy maintenance, I agree with your suggestion. I will adopt in next patch: > >> #ifndef mfcr > >> #define mfcr(a) 0 > >> #endif Thx -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/