Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp620862imu; Tue, 27 Nov 2018 03:59:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/WwQm38HCnmr62GWYGxs3IwAzGrwymUNW6AWxpKnIylTwQfuxXtsuQDAALVoQP8i8iYZzvP X-Received: by 2002:a17:902:8687:: with SMTP id g7mr5690131plo.96.1543319945090; Tue, 27 Nov 2018 03:59:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543319945; cv=none; d=google.com; s=arc-20160816; b=p/E8RWHKfGp0Y+84LwGoCekQcxDdo7NK1yTBYpr3M6roOxGmQxaFTCo2maHHaheAgz +O2ze0dfxoziMPI4mcQR35VTCXlu4nfnBaUkSSFiysdSTtXP17DDr+IGx01KVRpIeVwq Cz5mh0ctQw5KSBbAO+jnOQCfrtkEGxQxx3/MWJC/8+Huwi5hCHGtHS8+V9WDXVanpnj1 7FpDXYih8+MgiMwipQKAL9fZDcvFa/MdKKwh6htK9EtP4koLPoVs/mUAH1oZLfy68WO7 ck8EQE2HzE/ROHVgzWrxRPK2wZkLR3MXea3AWPZ1INY/lfc+xGFARrotRg3q+/CkgU52 MyHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=zQclvUuAWO43QDDHbS+I1HAFxUvaKASGir9+ioQf6KA=; b=gc7wnhsPudrby+WKRoIdXkhgxhKEM6D2ZOUM5G0kvZS5khPuqzIA4a2jgk8HbahoKf yLbPIKomjPbBDv+NnZsan69Bx7icmBs3QsoSQ9zjGBI/SLZqdnIP/agrQqBZhviRyxFG J4xz49UaM4KVgsyMI4aFT/SlHjZ92DdUFnHgWzCbQ7IlfIuGJl1+7TT75QkIQTBl4BGr 5J7swNrNLK3Qjjtd5bX2kxg7/WZCcbFq2DugwMacszfQLiW8dFmbWv5bN7iq+BrqVooW VBvSeub297asC3GuHjmKxCaoGXLFtRGc9emT635nxL5vrnrjveprRUjGtEj0RJnahhHU QROQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=Mi2u6F64; 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 j7si4039099plb.91.2018.11.27.03.58.49; Tue, 27 Nov 2018 03:59:05 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=Mi2u6F64; 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 S1730508AbeK0VAx (ORCPT + 99 others); Tue, 27 Nov 2018 16:00:53 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44305 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730438AbeK0VAw (ORCPT ); Tue, 27 Nov 2018 16:00:52 -0500 Received: by mail-pg1-f194.google.com with SMTP id t13so7620853pgr.11 for ; Tue, 27 Nov 2018 02:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=zQclvUuAWO43QDDHbS+I1HAFxUvaKASGir9+ioQf6KA=; b=Mi2u6F646NSMHZe4zbEJMAL46YhGacWYD+Vmg9zVt8AzLl/c/UvEXpYR94FzTGURIy NgtYyzXIi/oW77XavD2uVdBHd7y4IIyM8ak4/O1hFwuWDm9KXgwqMyrzZiY1pyoIhst3 zjC2oxM8rrvhSURijGROXYT09YXqx1LWqCiMp85bAcr2dLV5XTZDMCI5b3YNf4uCXlrH 48mDmYuRpCmMafK/ezRG8zt8xjjLwEVKQMLhJqO39ypJzjTVpjOe1cxGkFy76LFOMps7 fp+Sw44j/89CW0g7xeWqAUFMQd2N4+kaRFz5B+hfvP+JD8YMKQJzXb9R29oV9/3krRiN /rwg== 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; bh=zQclvUuAWO43QDDHbS+I1HAFxUvaKASGir9+ioQf6KA=; b=a/LrUvitlk3APi5vMWb6DL4QAYcP2JZUQswv3AUkwY8Xo83b23e+PbbnglrHNPkF7A LqxgNV+EZpOOKpDBRHmWcYaVcnvc/Uvdc/SFZRN8eqc2yCfJa4glI67RpfPBanWVyEAc 1b/bhuQMGPozKlm/qcUvdVJ72Hb+Va90Ram3X17jBCsODrMmKb4VG7X6WeDONc5YZFl+ 4LW6/+9H30ZM75FaI8Rl27ObV3FCjBSBZaymc71KapvQw9F57ll/JVZsFKMsy8whcwT+ CNVH7ryBFsaV4f57Ei9tcKf/ocAriq3iWqnXx3m9FuJ9RrMS/KbLRPwRITgIxQKHYTDO CNfw== X-Gm-Message-State: AA+aEWbltK1FJMMlfVDhRtBUFLDLwMtC+MiboBklmvgrvcnNnKiZxdoi OJ83klP86TBWa27pUzy4Z353ag== X-Received: by 2002:a63:e19:: with SMTP id d25mr28523025pgl.272.1543313009752; Tue, 27 Nov 2018 02:03:29 -0800 (PST) Received: from anup-ubuntu64.qualcomm.com ([49.207.48.241]) by smtp.googlemail.com with ESMTPSA id t87sm9519590pfk.122.2018.11.27.02.03.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 02:03:29 -0800 (PST) From: Anup Patel To: Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Atish Patra , Christoph Hellwig , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH v2 0/4] IRQ affinity support in PLIC driver Date: Tue, 27 Nov 2018 15:33:13 +0530 Message-Id: <20181127100317.12809-1-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset primarily adds IRQ affinity support in PLIC driver and other improvements. The patchset gives mechanism for explicitly routing external interrupts to particular CPUs using smp_affinity attribute of each Linux IRQs. Also, we can now use IRQ balancer from kernel-space or user-space. The patchset is tested on QEMU virt machine. It is based on Linux-4.20-rc4 and can be found at riscv_plic_irq_affinity_v2 branch of: https://github.com/avpatel/linux.git Changes since v1: - Removed few whitspace changes from PATCH1 - Keep use of DEFINE_PER_CPU() as it is Anup Patel (4): irqchip: sifive-plic: Pre-compute context hart base and enable base irqchip: sifive-plic: More flexible plic_irq_toggle() irqchip: sifive-plic: Differentiate between PLIC handler and context irqchip: sifive-plic: Implement irq_set_affinity() for SMP host drivers/irqchip/irq-sifive-plic.c | 144 ++++++++++++++++++------------ 1 file changed, 86 insertions(+), 58 deletions(-) -- 2.17.1