Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4063877pxb; Tue, 2 Nov 2021 03:31:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVQn3MgdVzQRmWYMDuxm3DX4dCLRJucv0IkItU2Ba31YK/UHl/0ilrYGuad/hJEkKcfry8 X-Received: by 2002:a05:6402:17c6:: with SMTP id s6mr34050745edy.11.1635849069089; Tue, 02 Nov 2021 03:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635849069; cv=none; d=google.com; s=arc-20160816; b=f8g2yimmhAt5XER41ruU9Y/YaKaJCsze5dPE01YDqOVG0wRtvH+mWK0ufLJSJcaNYZ bQQr0Ehsu1ukuLFFcuiTPsaZwBB4RGCEC5P6rstZfu6CAcobiZQQSEjOrc7bp76oaOPt il8Smeo8ow+Kq0MuLpT75XJW2KK0JnNfSTwv2XPRUb6vASp/zjMk8ybj+8YtGNwfMZIi v3hDlGaG13scZVlz0IzCNBrVL1/kGzEiRGNu5gfb28b5jipSL8Np5A7tVtmD1Fw3XyH/ IAVC/g4iUNIJe/Xr4k37l6AKfzXKBT2Ix1JudWExfqmnh5AO9+a8Hvn8OOuii1wFEo0y 9AAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=H1PqlZbESLlRMnatOMQjKTOy2seQ1c+wrZFDnxSwWfg=; b=Ple+VfaMO6LTFt8e1fsy4YwXl8w4UqvlKWwJiVenqUe7ygnGI/eGAK7sCEP55YdjTY 51+z82MyBwO8hEwt/f144Ct3TyaRufVluOnsZ0MRc1gijUGhEtUNX/M4XFhnHnRiHAuN ieNp5LNWKUg2q6x4E3LbkIEl89U7viAnNnR0LNYdPLJHGkz0q6dLMKuOXjwLpNqCj7m6 DRB5jR6vhhPX4mKfd1LmhPV9uKjs8/XUirAcH1DltfK+mKrYFoHB0CrJgNXWYab89sum rPpigvwz095oulvXNC5GYOt/H5PNbljSCkn4mtxyMKYMIwNTAo4aDiUvUck2tmYwlJNh rUrw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si9734095edd.182.2021.11.02.03.30.41; Tue, 02 Nov 2021 03:31:09 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230519AbhKBKbA (ORCPT + 99 others); Tue, 2 Nov 2021 06:31:00 -0400 Received: from foss.arm.com ([217.140.110.172]:60492 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbhKBKa7 (ORCPT ); Tue, 2 Nov 2021 06:30:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 29F341FB; Tue, 2 Nov 2021 03:28:25 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.75.232]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A206B3F719; Tue, 2 Nov 2021 03:28:22 -0700 (PDT) Date: Tue, 2 Nov 2021 10:28:10 +0000 From: Mark Rutland To: Youngmin Nam Cc: krzysztof.kozlowski@canonical.com, will@kernel.org, daniel.lezcano@linaro.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, pullip.cho@samsung.com, hoony.yu@samsung.com, hajun.sung@samsung.com, myung-su.cha@samsung.com, kgene@kernel.org Subject: Re: [PATCH v2 1/2] clocksource/drivers/exynos_mct_v2: introduce Exynos MCT version 2 driver for next Exynos SoC Message-ID: <20211102102802.GA16545@C02TD0UTHF1T.local> References: <20211102001122.27516-1-youngmin.nam@samsung.com> <20211102001122.27516-2-youngmin.nam@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211102001122.27516-2-youngmin.nam@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 02, 2021 at 09:11:21AM +0900, Youngmin Nam wrote: > Exynos MCT version 2 is composed of 1 FRC and 12 comparators. > There are no global timer and local timer anymore. > The 1 of 64bit FRC serves as "up-counter"(not "comparators"). > The 12 comaprators(not "counter") can be used as per-cpu event timer > so that it can support upto 12 cores. > And a RTC source can be used as backup clock source. [...] > +static int exynos_mct_starting_cpu(unsigned int cpu) > +{ > + struct mct_clock_event_device *mevt = per_cpu_ptr(&percpu_mct_tick, cpu); > + struct clock_event_device *evt = &mevt->evt; > + > + snprintf(mevt->name, sizeof(mevt->name), "mct_comp%d", cpu); > + > + evt->name = mevt->name; > + evt->cpumask = cpumask_of(cpu); > + evt->set_next_event = exynos_comp_set_next_event; > + evt->set_state_periodic = mct_set_state_periodic; > + evt->set_state_shutdown = mct_set_state_shutdown; > + evt->set_state_oneshot = mct_set_state_shutdown; > + evt->set_state_oneshot_stopped = mct_set_state_shutdown; > + evt->tick_resume = mct_set_state_shutdown; > + evt->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; > + evt->rating = 500; /* use value higher than ARM arch timer */ Previously Will asked you to try CLOCK_EVT_FEAT_PERCPU here, and to set the C3STOP flag on the arch timer via the DT when necessary, rather than trying to override the arch timer like this: https://lore.kernel.org/r/20211027073458.GA22231@willie-the-truck There are a bunch of things that depend on the architected timer working as a clocksource (e.g. vdso, kvm), and it *should* work as a lock clockevent_device if configured correctly, and it's much more consistent with *everyone else* to use the arhcitected timer by default. Please try as Will suggested above, so that this works from day one. Thanks, Mark.