From patchwork Sat Aug 12 00:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 1820474 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=CeQf56Qm; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=Q/wb954X; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RN2GD33GSz1yf2 for ; Sat, 12 Aug 2023 10:53:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From: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=dIhY6oR0zBGq7cbtc7x6oiUImH5D4fMJcU6q4fogYmo=; b=CeQf56QmLK7hK/ DD6vnTLVU1e6FBpSNUtNj6bWuwoeaNLth5DuV/1INe41Z/+8vsAEnuXXj1zOecGK567Q6Rdak0BI2 RmTI0BaW5u5/EPl/1k1i/dAkKwyx3kjksoz1Eaqo7Xfiml8g/nk7ER7k42dZdeaj/5olTOOhXR+Ta pE3tl8+9BxKKxgntRAoK11hiLvnC1fs4/quYfYEuiOmn1hYCVpTOrnPrATjLUr9F/YcjtHPP18dai OcRRP92ISMTZtHgX+QkMUm3q2mpK608ukEOXgv+hHkIIlvoKVERXV5/BEarJmc2UsS9P9B+LolvXZ ODS/N9BIhjvCP+JH5z5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qUcpa-00CBwE-1d; Sat, 12 Aug 2023 00:50:14 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qUcpU-00CBuh-1Q for openwrt-devel@lists.openwrt.org; Sat, 12 Aug 2023 00:50:09 +0000 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-686efa1804eso1874289b3a.3 for ; Fri, 11 Aug 2023 17:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691801406; x=1692406206; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KTzaDbyX5Skg5SwlkdqTSOYCMWCladWd5Sr7c+y9OZA=; b=Q/wb954XXOc+Ke6+HkTz0GYTk+8v5ENld1VQaCNJJ6/Wq4aH1vnlw6Runlz96gVGRm Yz+b52FF1CwmY5FLo6STaKkzUXRXVgtervvEXjKmHF/m5CBGOldh/YBjlqfuolS411dk ZfK0wowAnae5Nkemdl2mOKCuL3j8YvwvcguYI1e0YxKl/+qimTqs+nrVbSlevynCKlsJ LkgKKnYM/gW9b+tlKInMe3MNESi07Xo6nifZSGMzRp4c+7qcgccbX+/zoZCG55DbR/2O Hw/b0y5bYBrQtQYfkx52mgXZaG3nhDI7AAdnMeZw4gKdYSDpesZEnNy0R1UI6OQbjIi2 jPiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691801406; x=1692406206; 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=KTzaDbyX5Skg5SwlkdqTSOYCMWCladWd5Sr7c+y9OZA=; b=Xz+Sh/lSgmtMpR3CUUsOfrz69OzqQIavgQdHrQKQW9CsmwPpDhGVR7DDlCwQTitlOp 15WEJgLgv+jMthRLuADAZuH7LvkSnvt5/pBVGy+7UkG7CvLCeDypPgO0nGW4YP4crhVC gKuK2W9bd7DTnlDwVxzmCid0BLcyhgxN9efNxFlQ1uz0hdPwZYe7XgXwoOKUI4s182Er HZnCu/ISsO8+TScMYvnpFjSI2EgmmCFAhezjLl9ONT2Wmedh+k3eHR4qGPJA1f7I5sjv yexc2oRcDV0EspqKWOOqBh2WUdUfHedUwc0JG6uPckXv0cf9o9KXM104IJfJZOiFX0JS o1OQ== X-Gm-Message-State: AOJu0Yww048VNTzw0+jkvQ4XHYnZSSrba8/NigszMQ3Z7QWMBYNHIv1l ig5sTG3eAEj4loaPY0jfuZHM9hJ4dtY= X-Google-Smtp-Source: AGHT+IHZ42JftD/lYgrg6IQJOQCEEaX24RrUIhkvtgSPJWQ5fowGvUVSxTeAccUi8Q0Sz8MKzfNWIQ== X-Received: by 2002:a05:6a00:10cd:b0:64d:5b4b:8429 with SMTP id d13-20020a056a0010cd00b0064d5b4b8429mr3117159pfu.18.1691801406143; Fri, 11 Aug 2023 17:50:06 -0700 (PDT) Received: from localhost ([2600:1700:38c1:1d7f:f66d:4ff:fe3c:3ceb]) by smtp.gmail.com with ESMTPSA id s19-20020aa78293000000b00686940bfb77sm3877546pfm.71.2023.08.11.17.50.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Aug 2023 17:50:05 -0700 (PDT) From: Brian Norris To: openwrt-devel@lists.openwrt.org Cc: Brian Norris Subject: [PATCH 1/2] ipq806x: chromium: Disable kernel's CONFIG_QCOM_SPM Date: Fri, 11 Aug 2023 17:49:58 -0700 Message-Id: <20230812004959.2416307-1-computersforpeace@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_175008_499173_89915822 X-CRM114-Status: GOOD ( 16.72 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The qcom spm driver is currently broken for IPQ8064 OnHub devices on kernel 6.1, such that it hangs the system when booting, much to the consternation of users. This is especially bad as these devices [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:432 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [computersforpeace[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The qcom spm driver is currently broken for IPQ8064 OnHub devices on kernel 6.1, such that it hangs the system when booting, much to the consternation of users. This is especially bad as these devices don't yet have a fully-supported release branch, and are still sometimes landing on snapshot builds. OnHub devices have their own kernel config, so it's not that wide of an impact to disable this. I haven't fully gotten to the bottom of this, but: (a) The vendor kernel didn't have any SPM driver at all, and didn't utilize cpuidle. (b) The device tree has never included any (non-disabled) cpuidle states, so even when this driver was present on 5.15 (last known-working kernel), it didn't actually do anything -- it bailed early, before ever doing any SPM initialization. (c) Refactoring in Linux 5.16 [1] caused the SPM driver to be activated unconditionally, including setting us into standby mode (PM_SLEEP_MODE_STBY) by default. Removing the one PM_SLEEP_MODE_STBY line from drivers/soc/qcom/spm.c seems to fix the problem, but that isn't much different than simply disabling the driver, so I go with that for now. I also disable CONFIG_ARM_QCOM_SPM_CPUIDLE, becuase it 'select's QCOM_SPM. NB: it's possible there's some other deeper root cause involved in here. For one, I notice that CPU hotplug (e.g., echo 0 > /sys/devices/system/cpu/cpu1/online, echo 1 > ...) doesn't work right either. Perhaps there's some mismatch on upstream Linux qcom-scm behavior and the old boot firmware used for these systems? It wouldn't be the first time, as we've had some similar incompatibilities on the next generation of these devices, Google WiFi [2]. [1] Commit 60f3692b5f0b ("cpuidle: qcom_spm: Detach state machine from main SPM handling") [2] [RFC] qcom_scm: IPQ4019 firmware does not support atomic API? https://lore.kernel.org/linux-arm-kernel/20200913201608.GA3162100@bDebian/ Signed-off-by: Brian Norris --- target/linux/ipq806x/chromium/config-default | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ipq806x/chromium/config-default b/target/linux/ipq806x/chromium/config-default index d7db9f7db35a..927aba360f4a 100644 --- a/target/linux/ipq806x/chromium/config-default +++ b/target/linux/ipq806x/chromium/config-default @@ -1,7 +1,9 @@ +# CONFIG_ARM_QCOM_SPM_CPUIDLE is not set CONFIG_BLK_DEV_SD=y CONFIG_LEDS_LP5523=y CONFIG_LEDS_LP55XX_COMMON=y CONFIG_PHY_QCOM_IPQ806X_USB=y +# CONFIG_QCOM_SPM is not set CONFIG_SCSI=y CONFIG_SCSI_COMMON=y CONFIG_SG_POOL=y