Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3453273imu; Fri, 30 Nov 2018 00:04:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/V2xkB1P/PfJtmWgFcdNREri8bFI06DGfuwQ8wqGfOuUIX/1UD/ZieiKnFGbDraYqXandxW X-Received: by 2002:a62:5a83:: with SMTP id o125-v6mr4817185pfb.40.1543565066832; Fri, 30 Nov 2018 00:04:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543565066; cv=none; d=google.com; s=arc-20160816; b=ShVaUzWZY+gmSQIXuMTq9XNM6HbMXQ6JbnXCwcC8dL3KVNw3muvrKuOl3VlLZ3uEuc PglYzLQ43hawdfzeLKj23DkHLwOyAm2OjSFJ9TxLIo1bJzMTQOrHSFhsxDtcv8llhhsE RV04hBKns7XVjOEtSMoqhN574FssDS9zgKlQTq2FKBVE45bXWO6qXAQMR7RhyD1EadV6 +sC6ZPldDOiTPQRJ2WTTNG6+lGE8WAI779lz3XnwIpU2Am7vK+7h9Q+uRCeISmoqMBlt 1G+n0hyY5sm6hrt306Y0qo6KdfBozMw9worTIFDSAI7uPW4JDsyRIyWA6m/7Pvx9O2pd ZDXg== 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=INN3jsKRLwg8ZxL20lAb8hU6CDa49MS7o8/TtSx8NEw=; b=Mhngug0AOWJa7fIO+gNpeY0LUkTVP9U/TqAvjs7zaXO+9NDqmaYuBntoMwzPzHtlpV lxA2FNv/wbXUPJ7JOek98hzC7Mw+Bm/H9IAfWcu54OsnUb3zJvd8j9Wpog0PJterbyP/ WKkSzCP11R57VEyGiwxZUxot0zJxZUGVeFQF+kG0nYuMDgn12r38zgEH7NFgDOyuHG1t F/0nyukp9l5TWpMKrD5YmpS13rR4KyOIBLRRUA/ywaJpyaF+O9PkQ/gsRRvy5g/g5ChC 8CKiutok+i4ztKXk2K1hM+iBs4CvH5jD3YG3IROFD1W57+d9UmArPz55A0p8lcBv3VD5 WB9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=lFKCRrZU; 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 o6si4742464plh.23.2018.11.30.00.04.12; Fri, 30 Nov 2018 00:04:26 -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=lFKCRrZU; 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 S1726887AbeK3TKl (ORCPT + 99 others); Fri, 30 Nov 2018 14:10:41 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:35247 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726589AbeK3TKl (ORCPT ); Fri, 30 Nov 2018 14:10:41 -0500 Received: by mail-pl1-f195.google.com with SMTP id p8so2425317plo.2 for ; Fri, 30 Nov 2018 00:02:14 -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=INN3jsKRLwg8ZxL20lAb8hU6CDa49MS7o8/TtSx8NEw=; b=lFKCRrZU0ml5pSywxt3O2/vbWpbCYCSLT2N2K4GZCteoayWLUYR4miV6gs2jSF138F wtEB3MCh8iWfllnURakdBMmdjRoQ3vuoKs4dGA6bUWLYV77NTe937eUf2VeZ0yHXk6Ta Q0qE5Bxd7+1XrHj6wC5lA/Hzg2NCj3OJsn7wBY4uoThcjHvt90wPpgUIRLYkaJXJlRKF pWmx5Nd48xiNR1J1BFn/k2HAcY2JXRxBET1vsEpliLGMq+fSV9InOmRz7CLEDLil4/Wj ioWz1bjW6aWaQ1oEJrpTzVj+dLS84yPwuYAfqdzG25cHoPpWxkHgtpjHkpksO4RTWANG uqrA== 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=INN3jsKRLwg8ZxL20lAb8hU6CDa49MS7o8/TtSx8NEw=; b=ARcbYyDp2YuuwpORTIEXVcXUbKgE03z4/aXHiKPtQm02i+EDn7vLypJn/oxvjlaRbF vnFCYCNHltVyhjRTkbXffmBSboz29CPjv+Qo/QyrRLtZv/ct5GJqAO59Yan6bAh9viri 1K9Nj9wX2M26ZyHZwxDzyi0f+NgViUSZmSaxIxaC2phqjN70i6+LAOEmNRO7CU8UvALj uBUj6M/jL1g/E3MQExZzwydx92bdtKw5Yse8R5GTXQ/f3TXM2FMxd6jk5iqpfEkcmt2i XRjj594e9MTUVVfvYgNvTCxv8VfaXd3caKSWUu5ftnQZSeIiH4wClgUDm5BnvrxmZ6FP eKzw== X-Gm-Message-State: AA+aEWY/YMF6MnMz2w6ym6iltWHGPBYH1PHrCvCGBelNdiFi+zzi/sp0 g3Pi9HmOpE5uCuwBWUYqCWHIBQ== X-Received: by 2002:a17:902:a710:: with SMTP id w16mr4598243plq.95.1543564934242; Fri, 30 Nov 2018 00:02:14 -0800 (PST) Received: from anup-ubuntu64.qualcomm.com ([49.207.52.208]) by smtp.googlemail.com with ESMTPSA id q187sm19218333pfq.128.2018.11.30.00.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 00:02:13 -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 v3 0/6] IRQ affinity support in PLIC driver Date: Fri, 30 Nov 2018 13:32:01 +0530 Message-Id: <20181130080207.20505-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_v3 branch of: https://github.com/avpatel/linux.git Changes since v2: - Fixed incorrect address of enable registers using sizeof(u32) in PATCH1 - Retained comment about need for locking in PATCH1 - Split PATCH2 into two patches - Split PATCH3 into two patches - Minor fix in commit description of PATCH4 Changes since v1: - Removed few whitspace changes from PATCH1 - Keep use of DEFINE_PER_CPU() as it is Anup Patel (6): irqchip: sifive-plic: Pre-compute context hart base and enable base irqchip: sifive-plic: Add struct plic_hw for global PLIC HW details irqchip: sifive-plic: More flexible plic_irq_toggle() irqchip: sifive-plic: Add warning in plic_init() if handler already present 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 | 143 +++++++++++++++++++----------- 1 file changed, 90 insertions(+), 53 deletions(-) -- 2.17.1