From patchwork Wed Aug 20 16:59:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 35706 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E97C42055D for ; Wed, 20 Aug 2014 17:06:40 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id y10sf61392600pdj.0 for ; Wed, 20 Aug 2014 10:06:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=NNsrbmiM/TgTveat+qbKHuImBfE1AqKE7oedL6cyiTQ=; b=YqG+ky0e0PdlGEZd1Q6H4dkRbhi3iSYWLMB8+wIwMShWS0dzFFT+CXfjH4fMSe2TuQ EKu6RMJBio83R9CZJiliPzaRTRqK6H8zKwO3s9QSlrT8WjZvmo3YumFBjH6+2flizsPq mUuxCQzIDwrleaJzUGKlUyw7Brzm7EAKWVggg+WkqoeCe/yCuzvLAsAgMIAPqv1FOZxt fo+W5wshCPzqZN8pQ7E3/z7q36U/eJwcBILHtsyCPn4f47IaCC9PIo7mPs2dErTCss7M +h1Hrwiilj/xrXbycnsG2AZxxViHmVjKx4xBm7YuEJVkybdP1Inl1xAj/8Uwy7TwFUOW 76UQ== X-Gm-Message-State: ALoCoQkKLPaH3ktFfRTs0EnE7tc1DSLjDZmBx+cwAFSBOxYUI6o0ibbPVUa3p6aaVofU4hevfsrI X-Received: by 10.70.37.41 with SMTP id v9mr7551642pdj.0.1408554020971; Wed, 20 Aug 2014 10:00:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.176 with SMTP id l45ls412224qgd.81.gmail; Wed, 20 Aug 2014 10:00:20 -0700 (PDT) X-Received: by 10.53.0.164 with SMTP id az4mr6657771vdd.52.1408554020817; Wed, 20 Aug 2014 10:00:20 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id h13si11038228vdj.81.2014.08.20.10.00.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Aug 2014 10:00:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id lf12so9363293vcb.40 for ; Wed, 20 Aug 2014 10:00:20 -0700 (PDT) X-Received: by 10.220.81.132 with SMTP id x4mr9470668vck.0.1408554020638; Wed, 20 Aug 2014 10:00:20 -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.221.45.67 with SMTP id uj3csp68844vcb; Wed, 20 Aug 2014 10:00:20 -0700 (PDT) X-Received: by 10.67.5.1 with SMTP id ci1mr20296085pad.141.1408554019623; Wed, 20 Aug 2014 10:00:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ra8si32537714pbb.56.2014.08.20.10.00.11 for ; Wed, 20 Aug 2014 10:00:12 -0700 (PDT) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752276AbaHTRAK (ORCPT + 15 others); Wed, 20 Aug 2014 13:00:10 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:64889 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751625AbaHTRAJ (ORCPT ); Wed, 20 Aug 2014 13:00:09 -0400 Received: by mail-pd0-f180.google.com with SMTP id v10so12210122pde.11 for ; Wed, 20 Aug 2014 10:00:05 -0700 (PDT) X-Received: by 10.66.100.170 with SMTP id ez10mr53395791pab.12.1408554003877; Wed, 20 Aug 2014 10:00:03 -0700 (PDT) Received: from localhost.localdomain (proxy6-global253.qualcomm.com. [199.106.103.253]) by mx.google.com with ESMTPSA id mz8sm34838221pdb.62.2014.08.20.10.00.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Aug 2014 10:00:03 -0700 (PDT) From: Lina Iyer To: khilman@linaro.org, tglx@linutronix.de, linux-pm@vger.kernel.org, daniel.lezcano@linaro.org, ulf.hansson@linaro.org Cc: Praveen Chidambaram , Lina Iyer Subject: [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug Date: Wed, 20 Aug 2014 10:59:47 -0600 Message-Id: <1408553988-63924-1-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lina.iyer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Praveen Chidambaram Hotplug causes IRQs affine to a core that is being taken down to migrate to an online core. This is done by directly calling the irq_set_affinity associated with the irq_chip structure. Instead using the irq_set_affinity_locked() api lets the notifications bubble through. Signed-off-by: Praveen Chidambaram Signed-off-by: Lina Iyer --- arch/arm/kernel/irq.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 2c42576..8835ef2 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -157,7 +157,6 @@ static bool migrate_one_irq(struct irq_desc *desc) { struct irq_data *d = irq_desc_get_irq_data(desc); const struct cpumask *affinity = d->affinity; - struct irq_chip *c; bool ret = false; /* @@ -167,17 +166,12 @@ static bool migrate_one_irq(struct irq_desc *desc) if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity)) return false; - if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) { - affinity = cpu_online_mask; + if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) ret = true; - } - - c = irq_data_get_irq_chip(d); - if (!c->irq_set_affinity) - pr_debug("IRQ%u: unable to set affinity\n", d->irq); - else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret) - cpumask_copy(d->affinity, affinity); + affinity = cpu_online_mask; + ret = (irq_set_affinity_locked(d, affinity, true) == IRQ_SET_MASK_OK) + && ret; return ret; }