From patchwork Thu Aug 29 09:03:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 13782901 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 05034C83013 for ; Thu, 29 Aug 2024 09:39:53 +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=Dvjn3LozyX7PzUcM0O+kSIxcuZqvkXVUv2cAp4pQJyY=; b=0UXtX+qT0uBCsydoAttZs1qez+ Gue+XkXyrkqVCn1yjCG0HFPFtURY9b0HUgXIGZZSJpz498Tm96zcv6li0yxC3sdgYrnS7Tz8arnLy scpWEhZE2TMyim69VOwg5cM4SmYmh9btiXw5HDUoxbknCBC/vhzfd+IpsjXUR1afEO1aftnqY1Oge fSCSUdtWzbYsSVGAnp7xsartVFcLRvIu2vWjF4e9iSei3pOfU3BbvfrmnDIONcNrQ1AsCaMsboQym JWXenRxxRulQGyEXIP6NH7TS3wHw9mBOjQB9incjAc0fvNmak3/1qq++3yLCM+sN7We7M0Yd7iWWv YP8IBarw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjbcW-00000001Oi5-0abh; Thu, 29 Aug 2024 09:39:12 +0000 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjbQu-00000001Lz4-1rCD for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2024 09:27:14 +0000 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7cd8d2731d1so264265a12.3 for ; Thu, 29 Aug 2024 02:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724923631; x=1725528431; 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=Dvjn3LozyX7PzUcM0O+kSIxcuZqvkXVUv2cAp4pQJyY=; b=ZDBthU/X+3hoJaKVymazY2hl43wq5IxOfy40TyUPnr+Gmvw3JnNAvZO1B+t3W1Y5dn BOn+qPFzHikwkh6LB2U3r14/sspc92DGI+MLJLnU9gZPQQui7JSTNz7V9l3YELRQSHdD AW4qJudkUcFXILGK6A5RZRqHPDPtGNmrkbDBmI5tyvz0SWBBz3WLgyNVHQPpz2USlALX v4BkQ9QwF7q4aIub1Vnt5VdtJo40tlN5TyEcb7af7hbyxaCi01A+zUOSiAnEqexJ0yR1 mWqT7oPkUSupII9xQcQPLzi5EqQd4kXoGzPn8TyoMMO6bfCQQY+mtgLYqxNt6SnMA9F6 yv1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724923631; x=1725528431; 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=Dvjn3LozyX7PzUcM0O+kSIxcuZqvkXVUv2cAp4pQJyY=; b=hMYa6+NurPtNao2rSpZlbnR3Kkc2MtyeDu8p3nzCjB3NfGI+aUAw9zJZEwuTW2M3dh H6JuAHl3jdHO4K6ICrRM/r65iEdH+xY115Vph1uFm+TUTIFSQLit9+EzlOgM9AwILrdD jLf0rvvjmdgXriQkQ+7v25JcOaoUiRjiaRZzr/x1qjpo/HYThZMTUf5QSYypr7sFeLPS wu52XXaUEY7clBa1UR31PLqpptjwWeheBX1p2uHQ8hljEAbxxVgU0ceYcW1mNAypDYgi 6HsWZHkd2yVkJn/3+LrfGQEhm0ItbPBODZqfs6O5yyu0YXievTv0ySTCG3XzEWDb4AV4 DO4w== X-Forwarded-Encrypted: i=1; AJvYcCX8ZU2Ym8026fxudT2IbKUGH+LtiN7cMLH9MYyjCc+y+3jDl7UVa+E0gtihA3NfP6O4fpjQYrLKdOyoNkrLyxXU@lists.infradead.org X-Gm-Message-State: AOJu0Yx/vCYMSJAjTg/nnSUsIQJXWD95q/oWzhQXaTzoNBm8sQfh08Sy 8pB3MsclvkDbvunfvFyFWlwI0f7sQFHU+Gg6pqFcoEYGUnweCBUs X-Google-Smtp-Source: AGHT+IHH9msDkUh4C+HrO5ERn2jIh+PFRRJ3FprkC7wSKj6bergnvBcBclkRVm7iRpcIrBtCX3ESng== X-Received: by 2002:a05:6a20:c78e:b0:1c0:e49a:6900 with SMTP id adf61e73a8af0-1cce0fea52bmr2077586637.7.1724923630574; Thu, 29 Aug 2024 02:27:10 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-20515552b6dsm7469245ad.249.2024.08.29.02.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 02:27:10 -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 0/3] Add AIC support for A7-A11 SoCs Date: Thu, 29 Aug 2024 17:03:10 +0800 Message-ID: <20240829092610.89731-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_022712_502126_A892FBE6 X-CRM114-Status: GOOD ( 16.45 ) 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 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 | 15 ++++-- drivers/irqchip/irq-apple-aic.c | 49 ++++++++++++++----- 2 files changed, 48 insertions(+), 16 deletions(-)