Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7949420pxb; Fri, 19 Feb 2021 03:41:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMXsAJ1CwNAKekGtz5+IAVcKlxe6w5JRNYfjETaDkh2XInEf4G+LcfuoeZ9FQdUiz2ebZc X-Received: by 2002:a17:906:d8c2:: with SMTP id re2mr8542952ejb.146.1613734909757; Fri, 19 Feb 2021 03:41:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613734909; cv=none; d=google.com; s=arc-20160816; b=uDr2JsPMNG5LkIEa37FuM40fNwKgotmaeDchNVFBtTk1n2kUhgtMjefLfqWItyDFC8 mLOoC9/m+1YZRp1OiFUmiyhhmNLs8fB2s3qPfmyX+3HGbHLYCZihPxOe7IwyEt3AHthM ubC2BeltdDAmvAYBjxYNy+HOaqE8rF4vWfbtSkthjCxVJDOUwUS5pROVeURavTqFu1I9 1rcrkpqhZ7iDYP6NRP06kDemccsj281Mi+gBWpl49Z30S/yDMhlbWdc/ckWMXlIkKakl XDC3ru1YYuNk4tUfA28VeLgvVO4cF2ne501zKVkFp7WloDI07JLSefuAPgUzEPWbeaFa oj3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=hPUwA+mA3SBWGmDW4R9LZoTxLocu+i920bQdulAg0cI=; b=LRddAdMxh1sGfV41GxU6AT4Ic28liUj8g7FyevyYrrmJ7j3cPMrSOSB9cESHl9lXky Q9Ugo6k+MBUwYPQg/XGQxTBOEpemuNQ5T6Msn53n3PpzXxWd41Fx8JkeDW5w6QCnXo5S 8idLs9dgKvEHFWMxZNhwQ6eY0XgH7IvlCBrnB6c1HSKh1DI10RY0QJhj8p382NfwZKwT YhAQWc19TDyA7o5FizVcr2fDCzWbIUolt6MFlVK9XjxqegZP8/u21AmsWjiM3WbE97Sa 5t1gx+Z6d0GKnsQaEY/sfziNjSIioA9LSbaw+j+V0ixu/BFpq8c2U5pv1YhrnlQJpawm PiJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id um17si6133609ejb.230.2021.02.19.03.41.25; Fri, 19 Feb 2021 03:41:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229804AbhBSLj6 (ORCPT + 99 others); Fri, 19 Feb 2021 06:39:58 -0500 Received: from foss.arm.com ([217.140.110.172]:34158 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhBSLj5 (ORCPT ); Fri, 19 Feb 2021 06:39:57 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BBBDA106F; Fri, 19 Feb 2021 03:39:10 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 852903F694; Fri, 19 Feb 2021 03:39:09 -0800 (PST) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: catalin.marinas@arm.com, james.morse@arm.com, marcan@marcan.st, mark.rutland@arm.com, maz@kernel.org, tglx@linutronix.de, will@kernel.org Subject: [PATCH 0/8] arm64: Support FIQ controller registration Date: Fri, 19 Feb 2021 11:38:56 +0000 Message-Id: <20210219113904.41736-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hector's M1 support series [1] shows that some platforms have critical interrupts wired to FIQ, and to support these platforms we need to support handling FIQ exceptions. Other contemporary platforms don't use FIQ (since e.g. this is usually routed to EL3), and as we never expect to take an FIQ, we have the FIQ vector cause a panic. Since the use of FIQ is a platform integration detail (which can differ across bare-metal and virtualized environments), we need be able to explicitly opt-in to handling FIQs while retaining the existing behaviour otherwise. This series adds a new set_handle_fiq() hook so that the FIQ controller can do so, and where no controller is registered the default handler will panic(). For consistency the set_handle_irq() code is made to do the same. The first couple of patches are from Marc's irq/drop-generic_irq_multi_handler branch [2] on kernel.org, and clean up CONFIG_GENERIC_IRQ_MULTI_HANDLER usage. The next four patches move arm64 over to a local set_handle_irq() implementation, which is written to share code with a set_handle_fiq() function in the last two patches. The only functional difference here is that if an IRQ is somehow taken prior to set_handle_irq() the default handler will directly panic() rather than the vector branching to NULL. The penultimate patch is cherry-picked from the v2 M1 series, and as per discussion there [3] will need a few additional fixups. I've included it for now as the DAIF.IF alignment is necessary for the FIQ exception handling added in the final patch. The final patch adds the low-level FIQ exception handling and registration mechanism atop the prior rework. I'm hoping that we can somehow queue the first 6 patches of this series as a base for the M1 support. With that we can either cherry-pick a later version of the DAIF.IF patch here, or the M1 support series can take the FIQ handling patch. I've pushed the series out to my arm64/fiq branch [4] on kernel.org, atop v5.11. Thanks, Mark. [1] https://http://lore.kernel.org/r/20210215121713.57687-1-marcan@marcan.st [2] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=irq/drop-generic_irq_multi_handler [3] https://lore.kernelo.org/r/20210215121713.57687-9-marcan@marcan.st [4] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/fiq Hector Martin (1): arm64: Always keep DAIF.[IF] in sync Marc Zyngier (5): ARM: ep93xx: Select GENERIC_IRQ_MULTI_HANDLER directly irqchip: Do not blindly select CONFIG_GENERIC_IRQ_MULTI_HANDLER genirq: Allow architectures to override set_handle_irq() fallback arm64: don't use GENERIC_IRQ_MULTI_HANDLER arm64: entry: factor irq triage logic into macros Mark Rutland (2): arm64: irq: add a default handle_irq panic function arm64: irq: allow FIQs to be handled arch/arm/Kconfig | 1 + arch/arm64/Kconfig | 1 - arch/arm64/include/asm/assembler.h | 6 +-- arch/arm64/include/asm/daifflags.h | 4 +- arch/arm64/include/asm/irq.h | 4 ++ arch/arm64/include/asm/irqflags.h | 19 ++++--- arch/arm64/kernel/entry.S | 108 ++++++++++++++++++++++--------------- arch/arm64/kernel/irq.c | 33 +++++++++++- drivers/irqchip/Kconfig | 9 ---- include/linux/irq.h | 2 + 10 files changed, 121 insertions(+), 66 deletions(-) -- 2.11.0