Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4581373imu; Tue, 15 Jan 2019 02:29:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN4uuPxqYbgH8/k5yqfcQmqAGPmlKvRdXQ/VUy+OBmtpQq9EcvLlLJT7kgVKo4RZ3cQ5YbmG X-Received: by 2002:a17:902:9a81:: with SMTP id w1mr3244028plp.19.1547548170567; Tue, 15 Jan 2019 02:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547548170; cv=none; d=google.com; s=arc-20160816; b=lvzFd+2iDv/o3/IwWo7PRPq6V4xwX26fT23IHWuf8uGJIrNiKrsOLYDBNM0yqFFxxA etpsdY3GK9raNGa1hFuk2lBTGGz+WutMA2dUzgu2h+XavXgQb9bL6T25tCXBQ+sk41xV aKKIFu2yLaCCwTmd0uTrseHbM5S0SGpjhe5/7OdTEfWL5BV14qUeybeDefa9yFqShwpz dnzJd6Z9176LCPR3PrSatr19pbhEr6gPogrosL8YIE5rrq4gCxEjpjne6NxFEESCm9iF hGneU3UZgRdwwDxula2ls1oHUMM/tMAYg0x2GWGgTcjDd2FwY9fkXlhTS4uxMeZ9W3zP i+2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=+3JGdBip400YFLxwtidQZTVu23y6UxsrYPhOMiCQx3Y=; b=gtr3K6+NGSsbmHwXh3u+d58//v+jaEmGiq1IEACjdISCtlEfypA5SMjO9oKHEEH8nf bz2p8ovjvNisfAcZhm703Oj5K8QvXPEXYZYg0qyCcUXDZDTQRjnWwcnKDiV2KUmoiMz1 dt43tBic2kcjgtgyBt0x+lUgez0VSGTcU4zl8PuXdfFsvLKhAQvZpOl1QvpYBsVpIwL3 nqceEdKEoQfRxg90+pH3vzEx4Dd7F5NFbVMSxCS5Kjt7YlJV+tHi4vFXEHEZPsBpwGPl vkb08vouHWf9lvIM4PUd9rdNxdQ2QluCCvhDRhn0N6yxStsYQafUM28PyBCxPiHJhl7o 67mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11si2875763pgo.474.2019.01.15.02.29.15; Tue, 15 Jan 2019 02:29:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728694AbfAOK2A (ORCPT + 99 others); Tue, 15 Jan 2019 05:28:00 -0500 Received: from terminus.zytor.com ([198.137.202.136]:54159 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727935AbfAOK2A (ORCPT ); Tue, 15 Jan 2019 05:28:00 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x0FARtpi2475616 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 15 Jan 2019 02:27:55 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x0FARtLC2475613; Tue, 15 Jan 2019 02:27:55 -0800 Date: Tue, 15 Jan 2019 02:27:55 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Srinivas Ramana Message-ID: Cc: mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, sramana@codeaurora.org Reply-To: sramana@codeaurora.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <1545312957-8504-1-git-send-email-sramana@codeaurora.org> References: <1545312957-8504-1-git-send-email-sramana@codeaurora.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/urgent] genirq: Make sure the initial affinity is not empty Git-Commit-ID: bddda606ec76550dd63592e32a6e87e7d32583f7 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: bddda606ec76550dd63592e32a6e87e7d32583f7 Gitweb: https://git.kernel.org/tip/bddda606ec76550dd63592e32a6e87e7d32583f7 Author: Srinivas Ramana AuthorDate: Thu, 20 Dec 2018 19:05:57 +0530 Committer: Thomas Gleixner CommitDate: Tue, 15 Jan 2019 11:23:27 +0100 genirq: Make sure the initial affinity is not empty If all CPUs in the irq_default_affinity mask are offline when an interrupt is initialized then irq_setup_affinity() can set an empty affinity mask for a newly allocated interrupt. Fix this by falling back to cpu_online_mask in case the resulting affinity mask is zero. Signed-off-by: Srinivas Ramana Signed-off-by: Thomas Gleixner Cc: linux-arm-msm@vger.kernel.org Link: https://lkml.kernel.org/r/1545312957-8504-1-git-send-email-sramana@codeaurora.org --- kernel/irq/manage.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index a4888ce4667a..84b54a17b95d 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -393,6 +393,9 @@ int irq_setup_affinity(struct irq_desc *desc) } cpumask_and(&mask, cpu_online_mask, set); + if (cpumask_empty(&mask)) + cpumask_copy(&mask, cpu_online_mask); + if (node != NUMA_NO_NODE) { const struct cpumask *nodemask = cpumask_of_node(node);