Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752761AbdGEHQO (ORCPT ); Wed, 5 Jul 2017 03:16:14 -0400 Received: from mail-by2nam03on0084.outbound.protection.outlook.com ([104.47.42.84]:3440 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750868AbdGEHQJ (ORCPT ); Wed, 5 Jul 2017 03:16:09 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Zhiqiang Hou To: , , , , , , , , , , CC: Hou Zhiqiang Subject: [PATCHv4 9/9] irqchip/ls-scfg-msi: add MSI affinity support Date: Wed, 5 Jul 2017 14:59:03 +0800 Message-ID: <1499237943-24203-9-git-send-email-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1499237943-24203-1-git-send-email-Zhiqiang.Hou@nxp.com> References: <1499237943-24203-1-git-send-email-Zhiqiang.Hou@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131437125610798775;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39840400002)(39410400002)(39860400002)(39400400002)(39380400002)(39850400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(356003)(8936002)(104016004)(7416002)(76176999)(85426001)(50226002)(305945005)(86362001)(48376002)(50466002)(72206003)(5660300001)(498600001)(8676002)(2906002)(81166006)(77096006)(6636002)(36756003)(106466001)(50986999)(2950100002)(6666003)(230783001)(105606002)(47776003)(4326008)(5003940100001)(2201001)(53936002)(189998001)(38730400002)(8656002)(626005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1PR0301MB0596;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1BFFO11OLC001;1:R5algsTAu8yAk8FU7I9IErygbC08JjOOiVnPoJdr?= =?us-ascii?Q?j0gHlj/VNiZBZPQw27cF0Pro+lubB0SX9SS6J211MbhjYjtOW2BDbcaiUBMO?= =?us-ascii?Q?2h2RLB1Mmr6ybRWouvat4i+5362+qDCaftiVeo7TBykZ9P9G7hp5qFC/zc5t?= =?us-ascii?Q?HI0IJnIgJ8QE42/gmQR7U2+2BvWNhVPrqYomUPOMuglVKk8A1CH29CqG4tuX?= =?us-ascii?Q?4l1q7nq+jghJFYgz1q1XRK/2zruQnxuzCTvCSna/l0tKgLf7IG9/CKq1PV3a?= =?us-ascii?Q?InqnulRlOQ370D3xDC/bsqIeA6tW5HooKg0ZUESjtcxc01pDThF5MhBQxS3g?= =?us-ascii?Q?FbRT+U4W8DOJ2mqtttScGuZPZy59Hi3JggW7TJelgf1N5IFTua/ujwkjBAsE?= =?us-ascii?Q?1KN8Cmcmok7NbPSJFyCf7sl+XoqyW0nKqnk/AtH4U6DII4MCxFpNw50hchd1?= =?us-ascii?Q?fCq01sVL/eev3c7LUujsfMvXChHVPq47vGwDKSPCBbNfP2O0E1IdQqxAP3RL?= =?us-ascii?Q?lNxM6wYB2+55O4kIoE/NfXmfuk4MX1tzu+Yo/mJXVcKMTgML6o3BRNsyriWU?= =?us-ascii?Q?Gb3QEvz+AXi9QFlGcvd9PNcG2FFh7m2UwOp9t2x7iey6JK83n61Agiqt4PqO?= =?us-ascii?Q?t0xeLajGFVWQREoquM1ViSMVBk8x8i862yXh0Hg1JfiFBLfc0FL+pXc/5XUP?= =?us-ascii?Q?1CfyNYj0+M5jgmdAbz5+6ZqYAddPIXOJi9cHaDWJXTTMfo1Phhexj1Rynt+J?= =?us-ascii?Q?cmc/QOsE6cE6qnbairg7Tfnku03XQeWHf1dk3/waLFsvReE8DY1O5Y55sx/A?= =?us-ascii?Q?RKM3cFzV2TZ+jnS4Y8omsnzbedXBk4PxjnS8xKcplAJXxloPI+AE8JYjjwyD?= =?us-ascii?Q?VGjIBTGccPYbupxHMsqRe6rzN7cMq7z3ka2AqDXt7ooPS7GdUqHwlPh0wf7L?= =?us-ascii?Q?64zoOTcC5XwfTYF52QnXVZPLZaKG/9FV6IIeF2UzuLpqcYEua8WRq0ioHtzK?= =?us-ascii?Q?Ak1Uz8sbXxLTKqUaE55bULqrrfiKJl64iEJxD353lh9ExXizLPZJEy+Vu9az?= =?us-ascii?Q?7yZ6uN0=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d08c2c2a-709a-4e51-73df-08d4c375b0b8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN1PR0301MB0596; X-Microsoft-Exchange-Diagnostics: 1;BN1PR0301MB0596;3:ehKOmRbpBTlL01XkAuz8BFw93sUkPLgyXgjxKO/es2rMOTxLB+Fvg+0aEGWrewaPLqI92iRO6M2RW1x9hKuadcCLFuXpVpAQwdgxpuFtSBik2OduV0HFgH8tmlDrq3s3bDb6XXnhS+1Vy076TOQRKSkMAa/ws+rETogqeS9NF1NvV6sxYdn8sKi9EUSVTl59X9WgmoHdIkuLxS9kydwSMP4ISoHldLE+3iknYFgAd5eksOhdK1eU2GPRez2Ghrz68i5FoNhnW8UoSsdMl8ESc+IobrJ6/Ixpnza/u2wGG5Vph9LjUZmV+tfSQfSn+Z8dxCTzgVE8rU/BZlYCXJSor2QhhkMN4bcwnyKDNL/Ti27j0xMVOiOa/82mUv6jabcbwd47m+jhNLwVJLOeNyeooteofU0VmI6LvLt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WtucZi5e510HPC0AD9ePlrOZl0dAPzRYYh1/5W05FHyE0POuX7G8BCXjzmaLgGm8wGXcWN1+gAC1qQDK4G4zOeQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(185117386973197)(167848164394848); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(2017060910033)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123565025)(20161123561025)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123559100)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN1PR0301MB0596;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN1PR0301MB0596; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1PR0301MB0596;4:WcUVu+mysN5yFOeOFccNQKR9jTIk2wt3WxJ9VfyH?= =?us-ascii?Q?qG/EWwgQeQ+NVBV39GNo8uY74VZKgnwhSTH3+Mhq1lagWzeKJg6QiJ5BYXkO?= =?us-ascii?Q?o2nphNQjBI3I+zS6LxHEl+HA+fjk3oV3SUHO4CI4QZThNmxtRlaDyy2fdfp7?= =?us-ascii?Q?bu/Pj62e9PcJU4HJMz6qfo1pnC6WzlVrCY5o845n1bEwd0+ORTgEsEiwr4kY?= =?us-ascii?Q?8n8JlvW2m2/Cwrg5UDu3IjpW8+sXrJDH1Suem3xmxylmqAaeKQ+ZmQra2N1O?= =?us-ascii?Q?7ONaZ1VXgcp38rd4zLHdHphJJ8M7gyjqy4OXq8Zzwjxpe6IDnurWzo5GiAtq?= =?us-ascii?Q?nkwaC7iw7BJaN58meIdRFb26eo37SO48yxP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q?hF3ChTU5ynA5b1pzcAhCWFGbeDEkPTTcqXiUvtIogT09E2c6IG3+ORGwxJj8?= =?us-ascii?Q?5V+CqbdEo/edvmE4rVVBFV9bKkSfdCzg3OPMIR+c1rdWzw8L0f7DugP0pUhA?= =?us-ascii?Q?JlLLJTXywdCDdEDmeDM7fIwN6C79Ly4denCeX3P48+zGA0m4?= X-Forefront-PRVS: 0359162B6D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1PR0301MB0596;23:np4XFizr7cVYrZLLzKgHZYoBt0c4uD+NQuAA/0J?= =?us-ascii?Q?eQVaNu49Df2K1fooiUDJ4IhU3ryVmHD4REBUu2LiOtnCtoBGk+34PqMDt6nh?= =?us-ascii?Q?D92xeiDYYP5CT7/VS8VZrUYTfXPi2TxZfeTD91HGDtTwSsU7nrxZggS9MDoy?= =?us-ascii?Q?iqGpsAbvje6aWhAHkMsdi4neh/jXJq5I9W3IsDWpsOju4UhGsxPKJIrL7rbY?= =?us-ascii?Q?lSB/miOt+BY774+AJSxlLLC1ihE7rJECOM9CJkWWhMybO4Jml3dWy5qBpriM?= =?us-ascii?Q?e3zkRTwJBpb0m7AeQzJO540fWYDyuXNXWgfcBHEnLjjYLfIMP+30viDiFjt0?= =?us-ascii?Q?gEt6lqfO0oQI21rr4uZrSc45Mdjuab1dPuSYTmK32HWmH4wOBSbnMMh5mJ52?= =?us-ascii?Q?LMFujApiB9ZiEfAEIcAW9s5Y8mI+deb+qlZgls4UaHYSEpBlTE2s5zVlLAaR?= =?us-ascii?Q?yGkcwsB675fkfrllv2lxDlKgH9ggcZ4uErjbmGr+DsADLr2DFxdCrTjuVwi/?= =?us-ascii?Q?zHaOqydoA0XSXWfSV27Q8ao6IX3xfycqtinvhz6Xi48X2YX2jQxOL4vWvaVz?= =?us-ascii?Q?YUhpAwQdh7ODzy297D6C+OP4kKlSyKBXkVsrXIbwKF0x/JD2NnUByLjW2KuX?= =?us-ascii?Q?1bakmel0XdUe7KikuRXbqXOO+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dze8fmiX6TBVOfJ5n0VvEM7Jpagr+vAsS4e5RNZ3c1cQ0DHFpODDqvxxrDqP6FNFHptYDaDsiOkY1AhBwIYfA4pt+ICCbcEKxYwhFKZeCdajqMzJ8kAWoFDvA3WUf/yockpMTvZemX3OobSAXyIlM5sGxvqlRPNqfFEmO+G2sZJ00qjnkwgnVUqIDeTRsjQMugHajKC034qt4T2IcNEu6ytUdjcc7+a9S5OMOlE94TqdRydGc1le4QAfONVoo98+vDD8mMwy/7inTuzMhyN2G12XxEM+1S7hnTpUDE2gxecZMpJPYuGhswVz0i6EzQDfli78ymz2/m21d65zEfolQRjKHoRE9q4t2nYiJQS4tTa2gJ6ZJ5JZwpzZaFAije2JaomrQk+vwe8yOHxWolAbdkMvTeAFeoW4g= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2017 07:16:00.7210 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0596 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5094 Lines: 160 From: Minghuan Lian For LS1046a and LS1043a v1.1, the MSI controller has 4 MSIRs and 4 GIC SPI interrupts which can be associated with different Core. So we can support affinity to improve the performance. The MSI message data is a byte for Layerscape MSI. 7 6 5 4 3 2 1 0 | - | IBS | SRS | SRS bit0-1 is to select a MSIR which is associated with a CPU. IBS bit2-6 of ls1046, bit2-4 of ls1043a v1.1 is to select bit of the MSIR. With affinity, only bits of MSIR0(srs=0 cpu0) are available. All other bits of the MSIR1-3(cpu1-3) are reserved. The MSI hwirq always equals bit index of the MSIR0. When changing affinity, MSI message data will be appended corresponding SRS then MSI will be moved to the corresponding core. But in affinity mode, there is only 8 MSI interrupts for a controller of LS1043a v1.1. It cannot meet the requirement of the some PCIe devices such as 4 ports Ethernet card. In contrast, without affinity, all MSIRs can be used for core 0, the MSI interrupts can up to 32. So the parameter is added to control affinity mode. "lsmsi=no-affinity" will disable affinity and increase MSI interrupt number. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang --- v4: - None v3-v2: - 1. update the description - 2. remove unnecessary msir_index checking v2-v1: - None drivers/irqchip/irq-ls-scfg-msi.c | 68 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c index 8d57a59..119f4ef 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -40,6 +40,7 @@ struct ls_scfg_msir { unsigned int gic_irq; unsigned int bit_start; unsigned int bit_end; + unsigned int srs; /* Shared interrupt register select */ void __iomem *reg; }; @@ -70,6 +71,19 @@ static struct msi_domain_info ls_scfg_msi_domain_info = { .chip = &ls_scfg_msi_irq_chip, }; +static int msi_affinity_flag = 1; + +static int __init early_parse_ls_scfg_msi(char *p) +{ + if (p && strncmp(p, "no-affinity", 11) == 0) + msi_affinity_flag = 0; + else + msi_affinity_flag = 1; + + return 0; +} +early_param("lsmsi", early_parse_ls_scfg_msi); + static void ls_scfg_msi_compose_msg(struct irq_data *data, struct msi_msg *msg) { struct ls_scfg_msi *msi_data = irq_data_get_irq_chip_data(data); @@ -77,12 +91,36 @@ static void ls_scfg_msi_compose_msg(struct irq_data *data, struct msi_msg *msg) msg->address_hi = upper_32_bits(msi_data->msiir_addr); msg->address_lo = lower_32_bits(msi_data->msiir_addr); msg->data = data->hwirq; + + if (msi_affinity_flag) + msg->data |= cpumask_first(data->common->affinity); } static int ls_scfg_msi_set_affinity(struct irq_data *irq_data, const struct cpumask *mask, bool force) { - return -EINVAL; + struct ls_scfg_msi *msi_data = irq_data_get_irq_chip_data(irq_data); + u32 cpu; + + if (!msi_affinity_flag) + return -EINVAL; + + if (!force) + cpu = cpumask_any_and(mask, cpu_online_mask); + else + cpu = cpumask_first(mask); + + if (cpu >= msi_data->msir_num) + return -EINVAL; + + if (msi_data->msir[cpu].gic_irq <= 0) { + pr_warn("cannot bind the irq to cpu%d\n", cpu); + return -EINVAL; + } + + cpumask_copy(irq_data->common->affinity, mask); + + return IRQ_SET_MASK_OK; } static struct irq_chip ls_scfg_msi_parent_chip = { @@ -158,7 +196,7 @@ static void ls_scfg_msi_irq_handler(struct irq_desc *desc) for_each_set_bit_from(pos, &val, size) { hwirq = ((msir->bit_end - pos) << msi_data->cfg->ibs_shift) | - msir->index; + msir->srs; virq = irq_find_mapping(msi_data->parent, hwirq); if (virq) generic_handle_irq(virq); @@ -221,10 +259,19 @@ static int ls_scfg_msi_setup_hwirq(struct ls_scfg_msi *msi_data, int index) ls_scfg_msi_irq_handler, msir); + if (msi_affinity_flag) { + /* Associate MSIR interrupt to the cpu */ + irq_set_affinity(msir->gic_irq, get_cpu_mask(index)); + msir->srs = 0; /* This value is determined by the CPU */ + } else + msir->srs = index; + /* Release the hwirqs corresponding to this MSIR */ - for (i = 0; i < msi_data->cfg->msir_irqs; i++) { - hwirq = i << msi_data->cfg->ibs_shift | msir->index; - bitmap_clear(msi_data->used, hwirq, 1); + if (!msi_affinity_flag || msir->index == 0) { + for (i = 0; i < msi_data->cfg->msir_irqs; i++) { + hwirq = i << msi_data->cfg->ibs_shift | msir->index; + bitmap_clear(msi_data->used, hwirq, 1); + } } return 0; @@ -320,6 +367,17 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) bitmap_set(msi_data->used, 0, msi_data->irqs_num); msi_data->msir_num = of_irq_count(pdev->dev.of_node); + + if (msi_affinity_flag) { + u32 cpu_num; + + cpu_num = num_possible_cpus(); + if (msi_data->msir_num >= cpu_num) + msi_data->msir_num = cpu_num; + else + msi_affinity_flag = 0; + } + msi_data->msir = devm_kcalloc(&pdev->dev, msi_data->msir_num, sizeof(*msi_data->msir), GFP_KERNEL); -- 2.1.0.27.g96db324