Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754615AbdLTJQb (ORCPT ); Wed, 20 Dec 2017 04:16:31 -0500 Received: from mail-by2nam03on0048.outbound.protection.outlook.com ([104.47.42.48]:11008 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751801AbdLTJQ2 (ORCPT ); Wed, 20 Dec 2017 04:16:28 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ganapatrao.Kulkarni@cavium.com; From: Ganapatrao Kulkarni To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: marc.zyngier@arm.com, tglx@linutronix.de, jason@lakedaemon.net, catalin.marinas@arm.com, will.deacon@arm.com, jnair@caviumnetworks.com, Robert.Richter@cavium.com, Jan.Glauber@cavium.com, gklkml16@gmail.com Subject: [PATCH] irqchip/gic-v3-its: Flush GICR caching for a cross node collection move of an irq Date: Wed, 20 Dec 2017 14:45:44 +0530 Message-Id: <20171220091544.4467-1-ganapatrao.kulkarni@cavium.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR0101CA0024.INDPRD01.PROD.OUTLOOK.COM (10.174.151.34) To CY1PR07MB2571.namprd07.prod.outlook.com (10.167.16.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f03e13bf-fad7-4735-7b19-08d5478a587a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060);SRVR:CY1PR07MB2571; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2571;3:I8PYHOIvWRnxTVQcHPHRVP0HhtviLOVHlYMij3PvS1XtmTQDW0m+LjY3bLwktWHW71WaFt2vF+DAmdkiCQTxupm7ffOS9vRfEMNXkRrRQbGCSQu6EWB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K4r2O6fbsEKHMwfROeT1u+6MxBx3FGh86KlAXFrSBBp2VpV11EgVs3EEiKXM9GKzWnS4W0ACie210C1Cc8s6MZ3a9nt5m5VRg7ybc2Bn4g3J3/qQfzKp4RXQ5Bok4RplyoNsHHQKSVRVd8M/ddUWDoKCSr9EHjwLMLmGOPD4v2QJDVLXVHmyeNxx6p5SWJ5jctMH1qIprgCaL2EY9Hhpxw7fr1zAe8L52V1PE15/qvLjm7tM+;4:fCslpOjH+WnhmUNRCOQIXMd7d6ry5nDv7qqCDbOBLM8PT9M3cszRzDT9n2zfju0biPAe1seMN+mi8iahsxQzGsLjsGldv8JYWmPEha3tu/GCaAlLTXFJugRQN64XU8cDx/zSU9dArKwsQdcmV2HDrsJpMamyqWjzWoYhiqqg2STu3UcTy+7b1AF+rmWNPnqes9e9WGWB8GvdqdXUe16AIG0SyB0lU/9aN3W+FlAg5LXTGD6OHv5Ro22URmQPOsQknTuJW7r9YyGcvAz3yPqWmw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231023)(10201501046)(6041268)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:CY1PR07MB2571;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CY1PR07MB2571; X-Forefront-PRVS: 0527DFA348 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(39380400002)(376002)(346002)(39860400002)(366004)(189003)(199004)(81156014)(53936002)(305945005)(478600001)(1076002)(6506007)(7736002)(16586007)(8676002)(72206003)(230783001)(6666003)(6116002)(316002)(66066001)(68736007)(97736004)(3846002)(5660300001)(81166006)(7696005)(106356001)(36756003)(48376002)(50466002)(105586002)(16526018)(6512007)(86362001)(59450400001)(50226002)(52116002)(386003)(2906002)(5009440100003)(8936002)(25786009)(6486002)(51416003)(4326008)(39060400002)(47776003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2571;H:mypc.cavium.com.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2571;23:8dj+tVOr5Q6W2dp9tq8msAtoTvzdh5uwNmDSKFDhJ?= =?us-ascii?Q?z/qd1JlT1LnN6mXT7h+NoncESu6jJ7RrtnVFg5eNZtkudU9J2FbkY4NduH5I?= =?us-ascii?Q?8/A4NYAewIPP5owJxXkfsLGwHGnv1UEhdf4C5sTH4jutMNHvYEwnGNSlNpFw?= =?us-ascii?Q?nma435Ib0oLSwzvBS4A9hs5Rv4YUgtfHjli0VcjX0MD08ZYgVoDxBP7ch5uT?= =?us-ascii?Q?0NgA5HsfdN/cSqgq6Drd8N7MwZhFlas3Pq60ka8YHAqC0X5eagIP+SXbN+Rm?= =?us-ascii?Q?+nTQNSpX/QQgm+zEiyiPs0nXcoD15v1ihgDR5iVMk40M9qbmOOtPjteRoPH8?= =?us-ascii?Q?QQhMPD9IyTNDMwJfaSpsyKqnP+mOprZ0VD4ZPefvUBDx0yUi3w5k0B1haAF/?= =?us-ascii?Q?2P93QBb8mQWMl5mcnbf7BDzv70uPnEmECHpf4unYAJciRTaqYSbWGPsZKCMG?= =?us-ascii?Q?VOUszNRp2FIGAui+gTY6KShpfRxqb0fSefSJRVhleOHyulq2DwxWauXJ6Nw2?= =?us-ascii?Q?z6m3NTNlZARtSplMS4oDoKshC7NZvPygYT2AjNdKHixtyJ8Xq3Wl38jVgo+/?= =?us-ascii?Q?CErWH+vEkMfPoNj3+4Jtmu7E7iXHIw1YXrSqxgfUxQZWXeInn5W6+fKdtag2?= =?us-ascii?Q?pgQOAfSaWMoYqF1tKRKZ2MJSw5YRdoFxNAhvA6bR5k28O8vZa8HnCnTmplgA?= =?us-ascii?Q?CiFdUNT10gtQ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8D0QLoLoNLKLjKbNcnGe4yPznJrv+IU3QLgxro7zso+SdBDwjL7wNpVJoERKUQPO4=;24:V1BV4Ltx2Oa/7nmYFGpi8PKsybuR4qI6HOiLko0Mi0FgovigMNC7AAtwWGGwHTzW3smn+I45z+l3lApWByIVT+jwk/97+3jnIXyC3yNXy1M=;7:b3sk6iyISdYUicaxMvtUFeSbDqUvLKRB4Hc5GDwxbpROiOm9AW2bbLtAvM5B7SxyoiuJRwqSqO9qBQwufPfbJ2fztySdLVtoyotcmi5FPZP5t8rPmKqYH2SPNZf0QPdBW43jeOuf07KPfkWcy4XFhnXl9ynkQns0VzzFIqm51Oytd48hgx3choGUvLzWM5Z5Jo34QT1YuYYUk/aq9IVPJFleASC2ChiJ44APYo+vcpm4rzC8LfaKfH5jBo0eCgky SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2017 09:16:22.0305 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f03e13bf-fad7-4735-7b19-08d5478a587a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2571 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1235 Lines: 30 When an interrupt is moved, it is possible that an implementation that supports caching might still have cached data for a previous (no longer valid) mapping of the interrupt. In particular, in a distributed GIC implementation like multi-socket SoC platfroms. Hence it is necessary to flush cached entries after cross node collection migration. Signed-off-by: Ganapatrao Kulkarni --- drivers/irqchip/irq-gic-v3-its.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 4039e64..ea849a1 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1119,6 +1119,12 @@ static int its_set_affinity(struct irq_data *d, const struct cpumask *mask_val, if (cpu != its_dev->event_map.col_map[id]) { target_col = &its_dev->its->collections[cpu]; its_send_movi(its_dev, target_col, id); + /* Issue INV for cross node collection move on + * multi socket systems. + */ + if (cpu_to_node(cpu) != + cpu_to_node(its_dev->event_map.col_map[id])) + its_send_inv(its_dev, id); its_dev->event_map.col_map[id] = cpu; irq_data_update_effective_affinity(d, cpumask_of(cpu)); } -- 2.9.4