From patchwork Thu Aug 29 11:02:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 13783025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C159C8303F for ; Thu, 29 Aug 2024 11:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=gsCX4I75Bt35ZXKA3R7bksaicVq4gEOUFqU0ER8sKQo=; b=QJhlEAm4w/iw89POWfHTSa/foz kKiJOWbRP2fsEJrRn3EUYLupURo6ngOd7ZvgNoVcOq2FB6XvBWhD7B6RmbKKDCSmwpaETrp0MUAUG cTzoED/zwA7gqxqcCPZU49Mzs3V8Kwag/Pa8EMZZBYXO8ka+QCv7LNJ4o1lnKP2ie2klkqGvKdH1T Ab2aQ716lsB/2AJa+xAI8Hf0+6fpKzTXr6H4tSq92ZBLLixpp6nHWBw0Gjt+M32bdeR2P9FKrNWxH fwiuhiu8uZhk+UXCjzmLlGYQauSvyc9RFc/3nkjRpYh4oVvDltr39W13PLjtRHmJ0rR6TasWta/SO wZrMGWIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjcym-00000001gq1-29tS; Thu, 29 Aug 2024 11:06:16 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjcxu-00000001gcN-36Km for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 11:05:24 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-71431524f33so419885b3a.1 for ; Thu, 29 Aug 2024 04:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724929521; x=1725534321; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gsCX4I75Bt35ZXKA3R7bksaicVq4gEOUFqU0ER8sKQo=; b=WJeCDbqnfKtM2ry2ccSiyAcQFg92UXc6u6oO7hw1pf/FNIL6INXn/t35cps8XoxW+Y DfgGhNCus9zqZY5aYMi7FZZQWoipc7qhLewtssqjxx3QMxrSh0TEx8bKu/NTJo0ihKkA 9wgbX5ouFGc28ZZD9lcklnKH/5WykAmQ+KlCp2d4orDn1sj0kfLr3CBggl2yT7euF98R UzZHyqGcfWK2UJ10xZV8jK+txN4y/2OKppeoseZFGXA+O9FS5IzbXQ0iVcyZ7A7taQIx vTz4Cd4uXG8MtAuGrA4Q4AyBVN8M9LLYaDtK9MWWF6dr+N2i5v4gs3EK7uk5c2AI4UlX H9+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724929521; x=1725534321; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gsCX4I75Bt35ZXKA3R7bksaicVq4gEOUFqU0ER8sKQo=; b=XdUeNtffT/g3lOXkGdfVGHscHPaMwZzT9RubzKeKm92z5sOu0ciVN/RhblPn8hv/Os BlUPtRuFvnyAiV36xVHLbqYGWETZQS+2coqpjzUY0cqH8RRU50PIGH+n/KBxnr2sf+qj dWcvsFVZaDuscHpBNXj78RGtn0khJwPLVHUMKf/d4AM1RCipHNLDU8ofq0BmZztBw5cP /bV7zf4NWllQAZ5s0om1tk7IYBlZ0IBKYnzk8hY10Zb/P2ST4Dwh9gOQkLhCo8zEUi2k dTyuWt56gfi0m+gCP53bx83e7WRtpwRIZXGvHfAaNks9Ug5bPeHzaaJ8Pb0jKqjJBDkg BYYQ== X-Forwarded-Encrypted: i=1; AJvYcCXkl+iEVA5w/l3SVsDU/OCDsL9bVLm89Ukm8E055RiZRXaZatKi3gbPNYBSx1JmyrSmMoPd6eFy3L3497QHF5Ow@lists.infradead.org X-Gm-Message-State: AOJu0YyAHfkjEOt5bhR8Ozl2JLhkh1rRD5R0Ttlw4nzqULwQZ7uarGp1 yinzdvcufn+PCzEnECM+DVk60cpIl3SKwP0n1ShE+oFoCwTpcfXA X-Google-Smtp-Source: AGHT+IG5uHzBuuTpBUgVsDRXpGnCV/Y6SAkTlghqjk76zLB5VEdpH82AMuT/Q0uG81tPW1Uzq1lrfA== X-Received: by 2002:a05:6a00:1806:b0:714:2069:d90e with SMTP id d2e1a72fcca58-715dfc7a4fbmr3076028b3a.26.1724929521137; Thu, 29 Aug 2024 04:05:21 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-715e5576cc7sm906671b3a.32.2024.08.29.04.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 04:05:20 -0700 (PDT) From: Nick Chan To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, Nick Chan Subject: [PATCH RESEND 0/3] Add AIC support for A7-A11 SoCs Date: Thu, 29 Aug 2024 19:02:14 +0800 Message-ID: <20240829110436.46052-1-towinchenmi@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240829_040522_801700_BB963AC7 X-CRM114-Status: GOOD ( 16.89 ) 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 Resend to correct dt-bindings issues pointed out by Rob. Hi, This series is a second attempt at adding support for A7-A11 SoCs to Linux, it is based on a previous attempt, which you can find at [1]. However, there have been quite a bit of changes. First, the boot process has changed, now, the boot process includes a "1337" version of checkra1n [2], a custom PongoOS binary [3], and a modified version of m1n1 [4]. The kernel is appended to m1n1 and loaded by it. This attempt also supports SMP, which has uncovered some differences in the A7-A11 AIC. Namely, although A11 supported fast IPI, it only supported "global" fast IPIs via SYS_IMP_APL_IPI_RR_GLOBAL_EL1, and SYS_IMP_APL_IPI_RR_LOCAL_EL1 does not exist on A11. As a result, there are now three feature levels: A7 - A10: No fast IPI A11: "Global" fast IPI M1: Global and Local fast IPI Each feature level is strictly an extension of the previous, for example, M1 will also work with the A7-A10 compatible. As a result, the modifications only includes if'ing out of features, in order to make the existing driver work on older SoCs. The A10(X) contains P-core and E-core pairs where only one core in each pair may be active at one time, controlled by CPU frequency. A RFC patch will be posted to disable 32-bit executable support on A10(X), as it only supported 16KB page size anyways. However, such a patch is not required to run AArch64 Linux on A10. At worst, any attempt to run 32-bit executables will result in the process crashing. Initial device trees will be posted in a later patch series, likely when the AIC modifications are accepted. Asahi Linux downstream kernel note: These patches will not work with the Asahi Linux downstream kernel, as these earlier SoCs do not support state retention across deep WFI, which results in the CPUs going back to RVBAR on cpuidle. [1]: https://lore.kernel.org/asahi/20221007200022.22844-1-konrad.dybcio@somainline.org/ [2]: https://checkra.in/1337 [3]: https://github.com/asdfugil/pongoOS/tree/mini [4]: https://github.com/asdfugil/m1n1-idevice Nick Chan (3): dt-bindings: apple,aic: Document A7-A11 compatibles irqchip/apple-aic: Only access IPI sysregs when use_fast_ipi is true irqchip/apple-aic: Add a new "Global fast IPIs only" feature level .../interrupt-controller/apple,aic.yaml | 8 ++- drivers/irqchip/irq-apple-aic.c | 49 ++++++++++++++----- 2 files changed, 43 insertions(+), 14 deletions(-)