From patchwork Mon Sep 14 16:59:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 53598 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 7D2C422B17 for ; Mon, 14 Sep 2015 17:01:41 +0000 (UTC) Received: by lbbmp1 with SMTP id mp1sf47928343lbb.2 for ; Mon, 14 Sep 2015 10:01:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:cc:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=N0znaltfEQELD6VerODPl1jrq6lJ27gOwZhFxPfiFgk=; b=VpvYc2gTu3wrXPF7ByQtX47e4gFA/tjS6Gy5Sghpjm8zhhlORl3qNrusqdit8A+/PD H2ZWD36hpNQKehUXARprM3ibyGOvvfMfIi7VYl1U0UhdKNCBdVPM2UyfwLE3JZhBFkSM Y3hhH6t96haKQAj4okH48w6HfCidWdyje5zCo6NaD9U2vvnJYk1oLrw+zwLlDOpdrXCJ gzcPnejkDGkp1MyBFnhzsfMljtQmFR8sL3rkbQDBQ9fyyot+CfiybzfSij3bSybc36x8 66OGNBFYP0SgCSkmWmVqZeZ/CMThmE75y/TMZ0BIJtZdIT1YVe7SlznGpstYl+DlXStC k7dg== X-Gm-Message-State: ALoCoQlAmv//6EaQFD/S6ArpeYwmjPNeDc7abjBklGy34UkXzCdQ3AxEfFpBSZ+VoCzVai73JlBV X-Received: by 10.112.140.195 with SMTP id ri3mr3345821lbb.22.1442250100396; Mon, 14 Sep 2015 10:01:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.108 with SMTP id kx12ls125455lac.72.gmail; Mon, 14 Sep 2015 10:01:40 -0700 (PDT) X-Received: by 10.152.28.167 with SMTP id c7mr15604278lah.17.1442250100210; Mon, 14 Sep 2015 10:01:40 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id n10si10380177laf.168.2015.09.14.10.01.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 10:01:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lamp12 with SMTP id p12so89968822lam.0 for ; Mon, 14 Sep 2015 10:01:40 -0700 (PDT) X-Received: by 10.112.199.70 with SMTP id ji6mr15600286lbc.73.1442250100050; Mon, 14 Sep 2015 10:01:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1307673lbq; Mon, 14 Sep 2015 10:01:39 -0700 (PDT) X-Received: by 10.50.83.73 with SMTP id o9mr4179827igy.40.1442250098941; Mon, 14 Sep 2015 10:01:38 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 85si10027806iot.140.2015.09.14.10.01.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 10:01:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZbX6y-0002ds-UP; Mon, 14 Sep 2015 17:00:12 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZbX6v-0001NR-IT for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2015 17:00:10 +0000 Received: from edgewater-inn.cambridge.arm.com (edgewater-inn.cambridge.arm.com [10.1.203.139]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id t8EGxlwo020661; Mon, 14 Sep 2015 17:59:47 +0100 (BST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id BFE901AE331C; Mon, 14 Sep 2015 17:59:52 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: cpu hotplug: ensure we mask out CPU_TASKS_FROZEN in notifiers Date: Mon, 14 Sep 2015 17:59:51 +0100 Message-Id: <1442249991-13345-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150914_100009_951042_69332389 X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.96.50 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: lorenzo.pieralisi@arm.com, Will Deacon MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.deacon@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 We have a couple of CPU hotplug notifiers for resetting the CPU debug state to a sane value when a CPU comes online. This patch ensures that we mask out CPU_TASKS_FROZEN so that we don't miss any online events occuring due to suspend/resume. Signed-off-by: Will Deacon Acked-by: Lorenzo Pieralisi --- arch/arm64/kernel/debug-monitors.c | 2 +- arch/arm64/kernel/hw_breakpoint.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 9b3b62ac9c24..cebf78661a55 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c @@ -134,7 +134,7 @@ static int os_lock_notify(struct notifier_block *self, unsigned long action, void *data) { int cpu = (unsigned long)data; - if (action == CPU_ONLINE) + if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE) smp_call_function_single(cpu, clear_os_lock, NULL, 1); return NOTIFY_OK; } diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index 565244fd57ff..2926c3dd6479 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c @@ -878,7 +878,7 @@ static int hw_breakpoint_reset_notify(struct notifier_block *self, void *hcpu) { int cpu = (long)hcpu; - if (action == CPU_ONLINE) + if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE) smp_call_function_single(cpu, hw_breakpoint_reset, NULL, 1); return NOTIFY_OK; }