Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp12441879imu; Wed, 2 Jan 2019 00:05:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN69TbQraRWLdaEMQQaoU+JIZzCiMWFeycJPNlsHO1ed8Ed+uFQV+HgUp5Vnw3VtamrTMsM9 X-Received: by 2002:a63:ae01:: with SMTP id q1mr12528000pgf.402.1546416327644; Wed, 02 Jan 2019 00:05:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546416327; cv=none; d=google.com; s=arc-20160816; b=lQbmaPTad5V58B7N8kCR883QkD0dw8j1Yu1VfMNKMUhmmMXm9V9yWENB0akr75Yssm HjhueX2UQCgpJM9Zu864ZBarYgts2F9w6iUtQVSYnOaht768PwCfxrX8DL8T/5uDjGKc oeiZW6nrnWZqci8pwE5k6ws6+X+xYtoDNw1uVFI68UkZJfgAkrztMJ+2/ZjTTURdd9Rs eAMGwpxe5bVoKGHY/S3Qgztwoy2uWtIuaw+gXQtRXkpLC6zKKXL23vM2N3LfFpFW5ww3 ac6BVBEA624XQf01Em2GUHe68ftOmQk2tWjiGsIwy2wahow22BaUpc6/Lg2Apuqrnb/Y 4tVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=vxfSQo6BnYIleuP3+79+fSCAaVWWxSgSS3kx/GziqAM=; b=PrafpBrh76ttx2cQqsuJ5dmuE6MEV3LvqP+By5S/zTlTtCuRJLjpRVVWgIqN18wbzO 0arQ+nT6yHV9cuUjuo+i+fzMBygy8JBEaAtSsKoVU7XEL7pCP1WTqqETvijSie5xKhmy YR53+kJFT7sBZ3RBvoxY4DYvrybHy3+PtH5rLLlMuf6rdOv1vNr7OreMlsXIBXiIuhyG FzYZcyKDHUoRom5NtwMrfGn20reXOOoN8Yn5GSMgBB9kWvlMkqWBgfAfVUEkUBK5ArB1 7JXSS0OJGlX/NDCVxH4WkW6pPq6dhIRmtcVqAq7GxaW8ZKjeBI1LWx5f8aURirUPBCKJ 0G0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="nENtUXR/"; dkim=pass header.i=@codeaurora.org header.s=default header.b=o53PFq3i; 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 d189si5386521pgc.393.2019.01.02.00.05.12; Wed, 02 Jan 2019 00:05:27 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b="nENtUXR/"; dkim=pass header.i=@codeaurora.org header.s=default header.b=o53PFq3i; 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 S1728842AbfABG7p (ORCPT + 99 others); Wed, 2 Jan 2019 01:59:45 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:57546 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728570AbfABG7p (ORCPT ); Wed, 2 Jan 2019 01:59:45 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 047DE60722; Wed, 2 Jan 2019 06:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1546412385; bh=rRtnfLLwyfFD1tOYGp/KrrvjdmpDS/5yJounfvxv4Iw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=nENtUXR/HeBB/O7D0G38KAYfb1o7tClzeGafjtm3bMV6Pb9PZ55ss+q2ZI2iMhjXe yMecpGkJZc2DxLuw3Q2xQYZxOKDujV56aG4BwVG7Kjz3m+Ub3LMqea5MK+P97WlcYa CSNbeOG3DFdvlzoloClaMigh8UCPPGrtXQoDcGt4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.128] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sramana@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9C8E760722; Wed, 2 Jan 2019 06:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1546412376; bh=rRtnfLLwyfFD1tOYGp/KrrvjdmpDS/5yJounfvxv4Iw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=o53PFq3iz/rrw/JOdWsg3bCoNjpEs2hoLU/ORjiygijtdT+X4QyNfnyAuCcTCMzQb kzS9cfT/W68oCP+nPI/BM967Km7py2X3zFDwgDaLrhsDPq6tPmrjMdH1gAZOywVmGs eakybRsC6VNS+uL3DxXdPeZUpr0frR84Hi22bxK0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9C8E760722 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sramana@codeaurora.org Subject: Re: [PATCH] genirq: Make sure the affinity to be set is not empty To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <1545312957-8504-1-git-send-email-sramana@codeaurora.org> From: Srinivas Ramana Message-ID: <45756028-c96f-e3b5-389d-d8f022c59c5d@codeaurora.org> Date: Wed, 2 Jan 2019 12:29:33 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <1545312957-8504-1-git-send-email-sramana@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/20/2018 7:05 PM, Srinivas Ramana wrote: > If the default_affinity is managed/initialized by a system and > all the cpus present in irq_default_affinity are hotplugged out > we may end up passing a cpumask of 0 to irq_do_set_affinity(). > > Fix this by falling back to cpu_online_mask in case the > calculated affinity becomes zero. > > Signed-off-by: Srinivas Ramana > --- > kernel/irq/manage.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c > index 9dbdccab3b6a..5c0ba5ca5930 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); > > Hi, Can you provide your feedback on this? Thanks, -- Srinivas R -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project