From patchwork Tue May 18 09:17:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12264337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A819C433B4 for ; Tue, 18 May 2021 09:35:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC5EE61073 for ; Tue, 18 May 2021 09:35:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC5EE61073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Subject:Cc:To:From:Date:Message-Id: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=0zlLJQj7BJ1sPPzRvOqwDC3wcFceJDdGQU1LS7y9jDI=; b=l/QKg5ZqktZ8lIEyA1GkoiHBw5 qRbpR8wVt90j85PnWc1jtn+DqfhjS1LXEfAsxgcedgVR3qPlh0neRwVueJLNyNoND207KMiqJH2gW /9sz82Y6kqCDng8rZlq75n/yAINUo+3tlipQoFlm4rDvMZ3gx7UTIxQPNeuDOj6czIg56JwUOisJI AH2JspIYmDapX+6L/Z7QDWNRpVHhhBwfMhR+VDblQdo5OPzQXC0iGE1YAdHP4fo1owZt7atCT2ym9 K8VuJuzYvdTMvHPLJ+xxDilVyfDaX7lBZjKZFiDZ8ZEQcVav3j2ZX03ePbf+4jK9xI7U7Rqe4WyLA Kxe4PWyQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liw6d-0009FY-La; Tue, 18 May 2021 09:33:40 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liw6G-0009Az-Qo for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 09:33:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Cc:To:From:Date:Message-Id:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=F013rQx8kVLjRBvwLGIM4eJIUfTukYcnmJFI+pPxhiU=; b=hibHvnQQR0nW73jo9DTcfIT+J+ EB56JiUpJcC4zTiD0rfzCAy9Qlrj3QY2r7UQGc/wvjoNjhCmud8TvoHFWCu12ufkNW6N/9lGLQQuP dM/ybjfFbZFu7afMLK/gyZDjk3VZjVs/7hce3a6Lle9gaN89M6IWVjeNyA1jf3+EZTm2KLJdFuBEw 7wHtPfjjq49AUUILT12OjneJHB6K8hO4sUCYFY4Io7fYj1Uw/Qr3LbJV/PPr2CYrrWk02sd6HycJc 0CmgCh+7t+2+IdaAlX5g7t66+hwAMcycqfKLF4lkiGV1X3UoDol0antBEkcKNOrwA1nXPIoSsBMfx TiSo/0jg==; Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liw6C-00EVjl-UI for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 09:33:15 +0000 Message-Id: <20210518091725.046774792@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1621330390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F013rQx8kVLjRBvwLGIM4eJIUfTukYcnmJFI+pPxhiU=; b=KKS33fP51PiCM0ZWRaBthTlweJYoNIK74Ag8UBpwnasKoXcxPdjBcc3icHdx9n6KVuedcT Cwf14Jz2/pg7LrnEj52fCw7IaDzh0D6o5koDHSCevZ2gp6+yA48t0+SVHlZim97mezoePm gATXhu7dUYr+ZHJPmPjm7w1cwVSrUr2qZ5Ru7TmLtV0gL7NgITcltiQQDdqMwY4YpcOLBM Du4CFb59I8GLOulRAWLmb2ZL1IHBmnc3cbEVsMcQY5I2808dRL6E0/GGELZ/VlMj7uOfJi 1N+m8259GSVS+JNs3ZfDi65poz8cdsdVPBcv7p1SrOJjU7/xPnwVH2yl3Qtbqw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1621330390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F013rQx8kVLjRBvwLGIM4eJIUfTukYcnmJFI+pPxhiU=; b=h3XWcxkcbxu9AOw2VMn4X0OLpSWaX3z1eSGqXmLdGFNiO0wmMabVeT7m18LMT3TyoNMv+s XiZvhg863JY/oLCg== Date: Tue, 18 May 2021 11:17:25 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Robin Murphy , Nitesh Lal , Jesse Brandeburg , Marc Zyngier , Will Deacon , Mark Rutland , linux-arm-kernel@lists.infradead.org, Frank Li , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Shaokun Zhang Subject: [patch 0/8] genirq, perf: Cleanup the abuse of irq_set_affinity_hint() MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_023313_219361_390530EA X-CRM114-Status: GOOD ( 13.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The modular PMU drivers use irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Sigh, if people would at least talk if something is missing... Clean up the mess by exposing irq_set_affinity() and converting the drivers over to that. Thanks, tglx Acked-by: Mark Rutland --- drivers/perf/arm-ccn.c | 6 +--- drivers/perf/arm-cmn.c | 9 +----- drivers/perf/arm_dmc620_pmu.c | 5 +-- drivers/perf/arm_dsu_pmu.c | 8 +---- drivers/perf/arm_smmuv3_pmu.c | 10 ++----- drivers/perf/fsl_imx8_ddr_perf.c | 5 +-- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 3 -- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 3 -- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 3 -- drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 3 -- drivers/perf/hisilicon/hisi_uncore_pmu.c | 4 +- drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 3 -- include/linux/interrupt.h | 35 +------------------------- kernel/irq/manage.c | 33 +++++++++++++++++++++++- 14 files changed, 49 insertions(+), 81 deletions(-)