From nobody Sun Feb 8 01:34:28 2026 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFED61FF61E for ; Mon, 10 Nov 2025 21:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762809860; cv=none; b=cwiaXBN3UYEHT5fQulN7ySd7zuZ+D/AtRmJ9MaEBzYj+8ND3Hemjkzi/dB5TFy3ewk3bfFnBfqomZK/QdRf8JeOznwvPK7J4rsDdSA2m5sX3IAHWC7hBJz9LTbQWWRt7qPtSpIgLqc25oqjTjkyJUA8RZ/dwEs/j0XeIWJF7T38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762809860; c=relaxed/simple; bh=vkvNjPVybqGFg3v5E14aYKJtRBrpQakMnNvHoaFRIzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GPcvrG3g01Q500JpNrIPUxWv5csCn5g5lFGLFpk8/LHdjYXiYXMg24WnfMTVE4J0dcxV+PSEYCjhcdilsGi6skpmh5ifz3zxWCOzMcfQxHlbhvoTGKl82A7dlUK0x5gcs/abPE8j+OmSObKnXdfr7+NxbkLwVjXdYc+/GEE0qrk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Je/uGsMX; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Je/uGsMX" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7b0c3451272so4266028b3a.0 for ; Mon, 10 Nov 2025 13:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762809858; x=1763414658; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jUVNERqw16/pQTgRG4/ce0IUftN0SrBAkIDEVmIs5X4=; b=Je/uGsMXM1Out4uEs8TfJvPktfToQx1pukrcIGjIdwu3SJHRVLmfwqe1vZaYC4WwQe Co4mkiYU7bgZHOHr9Jv8G2kGvZ3PPrEmCoFKGoVmqJ7Cw/fVbbzP9XAQ1i5ro5rinUuj OALY4wgz2t8XzYskvaraAV00bf4VMErSD6e/uhuDRBqxDeUuBVkuQZ+2mLviFeBa+4mk rlxJ4t8IMroDNlQ0pFGUZfVNNcCkloYrmTbjQRo/dYPNwAQWDeC6oUxi4uAVY24I3Ah3 nURNzJ7tz0dYu7vPgKE4ZPzQUblJEuvwxap8EdLjlF1KjIl8MJ5TgpkWwtR/nx4qk74o ID5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762809858; x=1763414658; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jUVNERqw16/pQTgRG4/ce0IUftN0SrBAkIDEVmIs5X4=; b=GWBADggtehUq4sz4xnwmGJBlGE+0DgOQ2s6Y0hq2S9GuwE8hLqYYlQklehJSutr7Dn w36ih4vMGLrLUDMdF/0RrAts2yvya6HMFNd23iTJK1zoHKelYpGV4TWpIsYRy29oR2JD ij3bBtP6Xx1W7a8mEEss7AMo2eOriq2nL/btZhBG63eJ7oGMtjj/vokwj5s7/5itkhKy oq913u+Tuc3Kq9lrVCK4akn8fl7fMvVA+FNXXqQiwCWnFR6CMtjKVfTPXV65/5AWQnM9 2nfqOUrUvvuI/V2aeB2R0r28pN8oxi7gPvicAyfNFvioa21Hr9FO22ProDrn2rA/Eyw0 V+Ww== X-Gm-Message-State: AOJu0YwusHTYdf+Z9N7upnqQcjFWK3r0eHXaS2YUKG62ooggQKVQWgGR bxi1jj6+rqxh5EGeLB5Ps0kL4vLa86mRMRu1gr8LrwOhrGI/NewSIQPIARrX+g== X-Gm-Gg: ASbGnctHBSIKAIKEfxKJWvfI33s4RFxDu1sQfDRIdlsGp0cZNXQhYHcDlTPGNZCFLQq +bru0hRNJ62MO+fFOC1FIoRo1CxqRUdyEdEKPE0LKi/QLcVVzJaCtf/YdGqtZmIXaR4UYvmJAJw CMl5uAmnWqbijwYu9seRsbbb3aTXiM/FgDjPwcKnRpSCCWJw0txx+MLXcrcQcO9voEGtEGIU40V syX+Gv6sRF5VdQzGF1Df+SRLzBoAidYGj1aA3k3puxoHyAKbiipyQeT0BtFeZs2e6nIcVUxDl1s Age1LGuLPBKjC8ot3lAAR8bpA81Nk2pYw270PblZFOtvCnn1tnqrHo0kNVAFIWO3hg/P6qttQa1 xykJj+RlE22U1Kf6QbGWHbVdJHsxljU9MD1fX94WhfXmh/Bk= X-Google-Smtp-Source: AGHT+IEBwSFpEJ5PiWdhZ1vt/3Zo+QC/f+pxn04UBsFp1nmTAGnq5M61eCG5lQtXT6gN+tSJT3aKPA== X-Received: by 2002:a05:6a21:50a:b0:342:a261:e2bc with SMTP id adf61e73a8af0-353a0f9d59amr13281347637.10.1762809857834; Mon, 10 Nov 2025 13:24:17 -0800 (PST) Received: from ryzen ([2601:644:8000:8e26::ea0]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ba902c9d0d4sm13174657a12.36.2025.11.10.13.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Nov 2025 13:24:17 -0800 (PST) From: Rosen Penev To: linux-kernel@vger.kernel.org Cc: Dinh Nguyen Subject: [PATCH 1/2] firmware: stratix10-rsu: fix 32-bit compilation Date: Mon, 10 Nov 2025 13:23:59 -0800 Message-ID: <20251110212400.282952-2-rosenp@gmail.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251110212400.282952-1-rosenp@gmail.com> References: <20251110212400.282952-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The code uses long which is changes depending on CONFIG settings. However, these longs should really be 64-bit. Fixes at least the following errors: drivers/firmware/stratix10-rsu.c: In function =E2=80=98rsu_get_spt_callback= =E2=80=99: drivers/firmware/stratix10-rsu.c:285:28: error: left shift count >=3D width of type [-Werror=3Dshift-count-overflow] 285 | priv->spt0_address <<=3D 32; | ^~~ drivers/firmware/stratix10-rsu.c:289:28: error: left shift count >=3D width of type [-Werror=3Dshift-count-overflow] 289 | priv->spt1_address <<=3D 32; | ^~~ In file included from : drivers/firmware/stratix10-rsu.c: In function =E2=80=98rsu_status_callback= =E2=80=99: ././include/linux/compiler_types.h:597:45: error: call to =E2=80=98__compiletime_assert_377=E2=80=99 declared with attribute error: F= IELD_GET: type of reg too small for mask 597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ ././include/linux/compiler_types.h:578:25: note: in definition of macro =E2=80=98__compiletime_assert=E2=80=99 578 | prefix ## suffix(); \ | ^~~~~~ ././include/linux/compiler_types.h:597:9: note: in expansion of macro =E2=80=98_compiletime_assert=E2=80=99 597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:39:37: note: in expansion of macro =E2=80=98compiletime_assert=E2=80=99 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ ./include/linux/bitfield.h:72:17: note: in expansion of macro =E2=80=98BUIL= D_BUG_ON_MSG=E2=80=99 72 | BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) > \ | ^~~~~~~~~~~~~~~~ ./include/linux/bitfield.h:155:17: note: in expansion of macro =E2=80=98__BF_FIELD_CHECK=E2=80=99 155 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ | ^~~~~~~~~~~~~~~~ drivers/firmware/stratix10-rsu.c:122:40: note: in expansion of macro =E2=80= =98FIELD_GET=E2=80=99 122 | priv->status.version =3D FIELD_GET(RSU_VERSION_MASK, | ^~~~~~~~~ Signed-off-by: Rosen Penev --- drivers/firmware/stratix10-rsu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-= rsu.c index 1ea39a0a76c7..2b8ad04679f7 100644 --- a/drivers/firmware/stratix10-rsu.c +++ b/drivers/firmware/stratix10-rsu.c @@ -97,8 +97,8 @@ struct stratix10_rsu_priv { unsigned int retry_counter; unsigned int max_retry; =20 - unsigned long spt0_address; - unsigned long spt1_address; + u64 spt0_address; + u64 spt1_address; =20 unsigned int *get_spt_response_buf; }; @@ -120,14 +120,14 @@ static void rsu_status_callback(struct stratix10_svc_= client *client, =20 if (data->status =3D=3D BIT(SVC_STATUS_OK)) { priv->status.version =3D FIELD_GET(RSU_VERSION_MASK, - res->a2); + (u64) res->a2); priv->status.state =3D FIELD_GET(RSU_STATE_MASK, res->a2); priv->status.fail_image =3D res->a1; priv->status.current_image =3D res->a0; priv->status.error_location =3D FIELD_GET(RSU_ERROR_LOCATION_MASK, res->a3); priv->status.error_details =3D - FIELD_GET(RSU_ERROR_DETAIL_MASK, res->a3); + FIELD_GET(RSU_ERROR_DETAIL_MASK, (u64) res->a3); } else { dev_err(client->dev, "COMMAND_RSU_STATUS returned 0x%lX\n", res->a0); @@ -632,7 +632,7 @@ static ssize_t spt0_address_show(struct device *dev, if (priv->spt0_address =3D=3D INVALID_SPT_ADDRESS) return -EIO; =20 - return scnprintf(buf, PAGE_SIZE, "0x%08lx\n", priv->spt0_address); + return scnprintf(buf, PAGE_SIZE, "0x%08llx\n", priv->spt0_address); } =20 static ssize_t spt1_address_show(struct device *dev, @@ -646,7 +646,7 @@ static ssize_t spt1_address_show(struct device *dev, if (priv->spt1_address =3D=3D INVALID_SPT_ADDRESS) return -EIO; =20 - return scnprintf(buf, PAGE_SIZE, "0x%08lx\n", priv->spt1_address); + return scnprintf(buf, PAGE_SIZE, "0x%08llx\n", priv->spt1_address); } =20 static DEVICE_ATTR_RO(current_image); --=20 2.51.2 From nobody Sun Feb 8 01:34:28 2026 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B66C92FB619 for ; Mon, 10 Nov 2025 21:24:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762809861; cv=none; b=T+T49r7d5VytRDuGL9+2puMNat6yE+58TeHyWCnCsiac+zf2syZypD7zS4RZHW3IpyVF2pczqyhRrAeyFwVzPJyipmdSyzq61gKpMbeCxC/RbS3V8toKSWuH9hkwZEbwwoTpkAXHTqDcvq923hdwQS0dyOsMRlo5OFHOHC120rM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762809861; c=relaxed/simple; bh=AXwOsvNHcrg3b/xIFEO3iB4vuSkeRwuajiro4QVim/o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FwqZoiG7jqlCPObivgUHHOVxW/rMMmmoh2CQ/3G7QQTElYPSDGODRx+uRoLeyCSBdsYWk9F3LAsOe/+X0HTjF5VkjbatrzqZpVw33DnFzX1usAqEQR9TlmciGY7OnoeHCijY2rWXeAg1+wVI7MuhFiDeagYS2ZAjoq3phft6r8U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Fw0+zobw; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fw0+zobw" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-7aab061e7cbso4179482b3a.1 for ; Mon, 10 Nov 2025 13:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762809859; x=1763414659; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6KXMP3YTBEJQDC8qyumy/gdnz8eZPTRPmd2cRgftQJM=; b=Fw0+zobwo9VJ97T7ZOOX1ykBe2WN2o/xHy+siMrSuiL28GxPyNTNECdctLIfyHGQuw u00IrSBL/TgifvSQ7C0paowtXYghBxGKgD7j2UmX3QQTiGdmbWF/t5GL/Mw0a7p4UorY RFKWFEFDFuhirV3HUkRyxeKv2/Ki3pr+jx4MNAwo/tZ6++kYb3S/BHRWLt4y5GXhiYv5 6tm3FGsIVpwRkf4iMNgB8gRDiBc/BkGisT+lMRYLZbX3s+LFDStK7+9om746u5gM40Tj GDt3tJ+DJYOVSSHwuIQ665J0SmzBu7LVk7Bexh2+X/xLkRdb9/ehgFlFfCOhwGK2EL/M Maiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762809859; x=1763414659; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6KXMP3YTBEJQDC8qyumy/gdnz8eZPTRPmd2cRgftQJM=; b=Whqzd0ReT7SgIMaxioGMTU9RRRg3MeMO+T18bTmMcmrMvF2sGaIqD1Ja2OmV+muDOs ICkW4fvvaERj2fjROdBDkN/Nnyx2I+PiDrf/XZoVnDt3VS2gG8XleH+Bz+Xg5CrA7Frs 3e6GtVHKaH5wUxOSfhKts6Teymgw3fFcaBUYFZV8yrFEChGsL9Q7Ulowfmvxim/TX8/n DhCyjUWtCgfQN+BMsXgJAuuejGD9YPtS85CPGaVkNNSv78a2TPc+Z8E4c96IrPvQ3Xq+ KmczrMKmojnhVoa5PLdpc7RW/kaBtd1H4evmWN+x8Z/qRn9/eRW+rx4dPZftyJLcY2Qw bYow== X-Gm-Message-State: AOJu0Yyq8x1SY4AO4q8Q9CWfQSLR2bFRf+DPt03in8FImXJmfDee3NBV sgJ9dKHgyL62REJWO3zyDi4yi0hu8mNfiglVpkd5hpxQzOHkNLb8EQhYG9UCbg== X-Gm-Gg: ASbGncvrAQ0H/RWrvybeiQjOQ3PlHdxSDnkT3SsuhX/eP7GMKG8LN0aXq7hxIQxHbYs x+Oxz8NLfgkbioBq+NDWDKouhQw54SrzhwoVjzYzKSXbwX7qeMdDJUot8jzcCZ4AeufXTxLgyky kJyRptmldsj4Hw0Me1ux7Tc4ae32pJUtskjBq3JjCcONPlSIoTZDbx3QxOKbOLXAwKo7Ba+QY// Pdjj3CZND4O9+3jBpE8r7jowWpM/r0Ysh73UifS+ke5ZHiZwagCtwAgdZyT9PU49zhlJtb/pl/m 85BwP2zXnZDD4HZarLGePnnNqqy91l+fMMb36KKJGQRfHEoxhQucfqz0tSifvLFjZXOCq9nS6iC RDt2ueNj3p/D20uPpBaMRznUXOPjJoVWscT80iZvwksuLebw7s70rdcUC1w== X-Google-Smtp-Source: AGHT+IEHPLSt+JgUdkt6OWsQf4d5bNQ8F8YavX/A1nvjIHSLvmymZwhbfZMlvkfGvG0razr+l2O8sg== X-Received: by 2002:a05:6a21:32a0:b0:33e:eb7a:446b with SMTP id adf61e73a8af0-353a4496e78mr13436084637.58.1762809858819; Mon, 10 Nov 2025 13:24:18 -0800 (PST) Received: from ryzen ([2601:644:8000:8e26::ea0]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ba902c9d0d4sm13174657a12.36.2025.11.10.13.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Nov 2025 13:24:18 -0800 (PST) From: Rosen Penev To: linux-kernel@vger.kernel.org Cc: Dinh Nguyen Subject: [PATCH 2/2] firmware: stratix10-rsu: add COMPILE_TEST support Date: Mon, 10 Nov 2025 13:24:00 -0800 Message-ID: <20251110212400.282952-3-rosenp@gmail.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251110212400.282952-1-rosenp@gmail.com> References: <20251110212400.282952-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Helps the buildbots catch potential issues. Remove ARM64 dependency. ARM32 can build this now. Remove HAVE_ARM_SMCCC. On at least x86, it seems to not be needed. Signed-off-by: Rosen Penev --- drivers/firmware/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index bbd2155d8483..bbe478cfba6b 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -141,7 +141,7 @@ config FW_CFG_SYSFS_CMDLINE =20 config INTEL_STRATIX10_SERVICE tristate "Intel Stratix10 Service Layer" - depends on ARCH_INTEL_SOCFPGA && ARM64 && HAVE_ARM_SMCCC + depends on ARCH_INTEL_SOCFPGA || COMPILE_TEST default n help Intel Stratix10 service layer runs at privileged exception level, --=20 2.51.2