From patchwork Thu Jul 26 10:15:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 10545521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B51214E2 for ; Thu, 26 Jul 2018 10:16:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 059D32ADE9 for ; Thu, 26 Jul 2018 10:16:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDB742AFEC; Thu, 26 Jul 2018 10:16:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F1102ADE9 for ; Thu, 26 Jul 2018 10:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=etuQ4fn2WeoftjthFS2azo0esXm0LjbZGZMf/rm8ZnI=; b=bGCn2aD8qdpyH5+0gt/wTl1jT5 UN8Nc24IR7k2gOOk+EXUMRlvVRtR2CXWvlMp65MDgDOic2gEcRNcTuTIWNv8jucXNZQhfQZx6xYR1 m+seclyPeg2Hqgk3ZH1ds5Er2MNICPMFXbI70WR2ybc0SCIBTx7ni2n6ots0T4WtxCt/c8g586+pU vpfgsZukgMtwBvi0NMTRKG5QHhdz0z/GF+JprcdC3r6dS3QedeOCuGql9bFEU/pIxR3W0LcZC76ZR uVgGvIBU9/tP2lvliEyWV9/lLoZQ+vbkCw3L42dE/ToRVn7voJnd3Ro/84Xowe2YZwPJOrp/lmqel kQOLwBBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fidJu-0005Ms-QL; Thu, 26 Jul 2018 10:16:30 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fidJq-00055f-V6 for linux-arm-kernel@lists.infradead.org; Thu, 26 Jul 2018 10:16:29 +0000 Received: by mail-wm0-x243.google.com with SMTP id s14-v6so1443405wmc.1 for ; Thu, 26 Jul 2018 03:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s9ggIHlFjOX1GmAyyDslj8PkwmNwq5DhXl20UHGcAF8=; b=kiu38j8ghlbuHgRXPBTkxa0q3f3oYEDFjIYba/QumdUgE60hlluZOpleJg1gKDi2QM Jaq8+tO/aejAEuSpfb9bEFlW2zj1O+CcOxMhY5+PElt65EBOrYpsNMjJivnXLQnAIUwi lw7/R8KsyXpO1GY/EWKg2MBAeGpm7BVmZzIx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s9ggIHlFjOX1GmAyyDslj8PkwmNwq5DhXl20UHGcAF8=; b=rb9K45EAGqNEABaBkBmL7et9uaRbSLDTp0DlGw1oC/jDCilSEQxo2J0TztiTAoUzp+ ex8KyiBPOST1pz5ylMRBFLw7cNNEJucve/UhDkbHRKC6cIW2/nCDYBrE31Al0IBxR2cU dM/JueXOiNXM/yXxXgbJbYdYSfmT4ue/vqlGUt//SZVJWISI13weHzr6HWia0VjXcW63 HZTLmH5/Qt5yz8ZZPny3qPptRhCks++hYvsSX2wHL8Ev5yQLYFmCV9eT7C9mbu9vX5aB n3RCvE0hswe9vYCyJ5nLO+CnUTu4prWIhT3XIyHUKAAZpGqJUpzMBerZ71p3HEWaA8n/ /RtA== X-Gm-Message-State: AOUpUlGgXukHiVt3cOop7lvDC2Yp0uPgdyQZT9gK6I85HKdD7Hyoo3uO +tA7Hd5MLIBAL+SfNy3uDe/9cw== X-Google-Smtp-Source: AAOMgpdVyDT8+lW+GPheJToa29JriWOfM0MW27zRd9E9IqCpauZakaOIer1enTsP3dgNvnXB28TkrQ== X-Received: by 2002:a1c:1943:: with SMTP id 64-v6mr1098030wmz.89.1532600173921; Thu, 26 Jul 2018 03:16:13 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:35bd:fbdf:74b5:3f51]) by smtp.gmail.com with ESMTPSA id f6-v6sm957303wrp.30.2018.07.26.03.16.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Jul 2018 03:16:13 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Subject: [PATCH 1/7] clocksource/drivers: Set clockevent device cpumask to cpu_possible_mask Date: Thu, 26 Jul 2018 12:15:24 +0200 Message-Id: <1532600131-28168-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <014f94f9-54d4-1ee0-aa89-67ca5d221989@free.fr> References: <014f94f9-54d4-1ee0-aa89-67ca5d221989@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180726_031627_023987_2152CEB4 X-CRM114-Status: GOOD ( 14.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: baolin.wang@linaro.org, Santosh Shilimkar , linux-kernel@vger.kernel.org, Jonathan Hunter , Thierry Reding , Sudeep Holla , "open list:TEGRA ARCHITECTURE SUPPORT" , stanley.chu@mediatek.com, "moderated list:ARM/TEXAS INSTRUMENT KEYSTONE ClOCKSOURCE" MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sudeep Holla Currently, quite a few clockevent devices have cpumask set to cpu_all_mask which should be fine. However, cpu_possible_mask is more accurate and if there are any other clockevent devices in the system which have cpumask set to cpu_possible_mask, then having cpu_all_mask may result in issues (mostly boot hang with forever loops in clockevents_notify_released). So, lets replace all the clockevent device cpu_all_mask to cpu_possible_mask in order to prevent above mentioned possible issue. Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Thierry Reding Cc: Jonathan Hunter Cc: Santosh Shilimkar Signed-off-by: Sudeep Holla Signed-off-by: Daniel Lezcano --- drivers/clocksource/tegra20_timer.c | 2 +- drivers/clocksource/timer-atcpit100.c | 2 +- drivers/clocksource/timer-keystone.c | 2 +- drivers/clocksource/zevio-timer.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c index c337a81..dabf0a1 100644 --- a/drivers/clocksource/tegra20_timer.c +++ b/drivers/clocksource/tegra20_timer.c @@ -230,7 +230,7 @@ static int __init tegra20_init_timer(struct device_node *np) return ret; } - tegra_clockevent.cpumask = cpu_all_mask; + tegra_clockevent.cpumask = cpu_possible_mask; tegra_clockevent.irq = tegra_timer_irq.irq; clockevents_config_and_register(&tegra_clockevent, 1000000, 0x1, 0x1fffffff); diff --git a/drivers/clocksource/timer-atcpit100.c b/drivers/clocksource/timer-atcpit100.c index 5e23d7b..b4bd2f5 100644 --- a/drivers/clocksource/timer-atcpit100.c +++ b/drivers/clocksource/timer-atcpit100.c @@ -185,7 +185,7 @@ static struct timer_of to = { .set_state_oneshot = atcpit100_clkevt_set_oneshot, .tick_resume = atcpit100_clkevt_shutdown, .set_next_event = atcpit100_clkevt_next_event, - .cpumask = cpu_all_mask, + .cpumask = cpu_possible_mask, }, .of_irq = { diff --git a/drivers/clocksource/timer-keystone.c b/drivers/clocksource/timer-keystone.c index 0eee032..f5b2eda 100644 --- a/drivers/clocksource/timer-keystone.c +++ b/drivers/clocksource/timer-keystone.c @@ -211,7 +211,7 @@ static int __init keystone_timer_init(struct device_node *np) event_dev->set_state_shutdown = keystone_shutdown; event_dev->set_state_periodic = keystone_set_periodic; event_dev->set_state_oneshot = keystone_shutdown; - event_dev->cpumask = cpu_all_mask; + event_dev->cpumask = cpu_possible_mask; event_dev->owner = THIS_MODULE; event_dev->name = TIMER_NAME; event_dev->irq = irq; diff --git a/drivers/clocksource/zevio-timer.c b/drivers/clocksource/zevio-timer.c index a6a0338..f746893 100644 --- a/drivers/clocksource/zevio-timer.c +++ b/drivers/clocksource/zevio-timer.c @@ -162,7 +162,7 @@ static int __init zevio_timer_add(struct device_node *node) timer->clkevt.set_state_oneshot = zevio_timer_set_oneshot; timer->clkevt.tick_resume = zevio_timer_set_oneshot; timer->clkevt.rating = 200; - timer->clkevt.cpumask = cpu_all_mask; + timer->clkevt.cpumask = cpu_possible_mask; timer->clkevt.features = CLOCK_EVT_FEAT_ONESHOT; timer->clkevt.irq = irqnr;