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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 F0A2EC5CFEB for ; Mon, 9 Jul 2018 22:09:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A546A208DB for ; Mon, 9 Jul 2018 22:09:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A546A208DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932850AbeGIWJP (ORCPT ); Mon, 9 Jul 2018 18:09:15 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34497 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751218AbeGIWJO (ORCPT ); Mon, 9 Jul 2018 18:09:14 -0400 Received: from p4fea482e.dip0.t-ipconnect.de ([79.234.72.46] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fceLI-0003AS-85; Tue, 10 Jul 2018 00:09:12 +0200 Date: Tue, 10 Jul 2018 00:09:11 +0200 (CEST) From: Thomas Gleixner To: Sudeep Holla cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marc Zyngier , Kevin Hilman , Martin Blumenstingl , Mark Rutland Subject: Re: [PATCH 2/2] clocksource: arm_arch_timer: set arch_mem_timer cpumask to cpu_possible_mask In-Reply-To: <1531151136-18297-2-git-send-email-sudeep.holla@arm.com> Message-ID: References: <1531151136-18297-1-git-send-email-sudeep.holla@arm.com> <1531151136-18297-2-git-send-email-sudeep.holla@arm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Jul 2018, Sudeep Holla wrote: > Currently, arch_mem_timer cpumask is set to cpu_all_mask which should be > fine. However, cpu_possible_mask is more accurate and if there are other > clockevent source in the system which are set to cpu_possible_mask, then > having cpu_all_mask may result in issue. > > E.g. on a platform with arm,sp804 timer with rating 300 and > cpu_possible_mask and this arch_mem_timer timer with rating 400 and > cpu_all_mask, tick_check_preferred may choose both preferred as the > cpumasks are not equal though they must be. > > This issue was root caused incorrectly initially and a fix was merged as > commit 1332a9055801 ("tick: Prefer a lower rating device only if it's CPU > local device"). To avoid that in the future we really should fix the decision logic to mask out the non possible CPUs from the supplied masks. Thanks, tgkx