From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 DB0DA1B3925 for ; Tue, 12 May 2026 04:23:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778559830; cv=none; b=GzPP4jGlFyBsjEZCFF87wcb/BpvyiwdUp9K18mGyUJzduNgaZ2jTS5nGRhJmofLRq8yjJ5GQa3zJZXhTYyjTIu4fm9HoMV9OxEvEoeHDUcOPF1blHrXBtKuUoMpexOe6wUFfbiIiVi0EBYOPMHXo0ifWfRrBRafL9PxFYepnKsA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778559830; c=relaxed/simple; bh=G7ncsH/WY7d03+/5ipUlNNGfStAI/zSQoQNHBS29pO0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Wz07hIpzvDJMSxuGaQBWWWsdrK+413IApIdVFgVaRUaoEg8oQRQJ5HyBmjJjnMs0qm17HtH/mmKR/JQ1a8ALC7N2dM6oUOuGrQCgbPpw4Stgtk6falmdHquLAKmBZZJBuwJiwpb59a3gBsFX8wyA/PWaI6czOeFcl6pR/6Gn5ps= 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=UyP86qG1; arc=none smtp.client-ip=209.85.222.175 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="UyP86qG1" Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-8d560ede296so558173685a.0 for ; Mon, 11 May 2026 21:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778559828; x=1779164628; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zP/+2G+KQKp0jcs9Wp+FgRomWiwgmnqO7eeiRjAeLco=; b=UyP86qG1wwl9YJuljB9bV2gp7a5ARfgFNwu6o0y5fhSQIJPBxrrlpWjYIv+2EK6ReN BQuKQXB2IdqpNr/btAl3NX8QD6Bw9ep96sFFmfXEDCJ2XXAJtC4PiKeCw0kwXyC5LznU QMXKQ2lqh8k8DPQfQh1RZ9lZOnDF8IWQbm6HT2g/9recdTs4+BoEyrR14zKQjPqtAioo Yi3L1BTMedb1NX2ksp3JkeqOTnVphmppR+xSi+06ytPZGXVJot64DbjNrtEqevNtwaxx U/1UmaFfqKS6a1D7hxAyVPbVzol3JihahiQGWHrpX26ubl8WYwciJTxTXIJAuoyDjcTi oueA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778559828; x=1779164628; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zP/+2G+KQKp0jcs9Wp+FgRomWiwgmnqO7eeiRjAeLco=; b=geIRCUkfhJf8KhqLxuBQwfsW5OtXr6nsJRpS0LPMjMYfZbzcFl2dw5/LZxaKREJN6o pnbwthmrWFwhEDo6GsOnXwt9ut5h1+kW1S3CucN3yKftono4MSNd7BLOrh53+P+wAEvb vp2cSi1HRxqFMD+JIzPY0Hd2uLIfPgF8x5tGJKzT4Bq4puFEgDE1Gvc07pGD7xun0Dkd bLlNVXemTyLrtev/asua+4rm6xaov0Jl+BxHhdAq3yIKBLJPUBV+VFGMjPWAtWNDj45s NmDYcwH7Ns0Xl1A7y20barWbSe+2YJzee7JJiwaDLsTKAv0nyeqXQAM6N7cU2EmYkDRW wYCg== X-Forwarded-Encrypted: i=1; AFNElJ/BhklaCk2H5WuKExD1hL7Aj6o8OMX2KfLPG11NqCBMNStMQow6Iw93aAWvmMPJYrxrdYG+Q9rOSYN3wPI=@vger.kernel.org X-Gm-Message-State: AOJu0YwBgqBQMZQSnLFICOPEc8xDOEOXJLo/qs+II+WxHcYlMQHkDoAR uADMdLwn/HUcpY4ssu+ccbLU23cSaaOx3zdib2H+CpZS1gA5I9ttc23x X-Gm-Gg: Acq92OH+gQ32AyNfdWJVjIh6nNXRhEY/mzvKXfkXQAxCR6DI8LoFUQvDEEV/0FuMAIt vEleaC2HHfC0AfuxXU1lDzlK47RakMBzDdiKTD5R9LWKhVvt+OqWAPq8/UhGZeNE3w/xuYpfCA4 nAoQvi9VLaEgUqm/FTbs1yuVj+sTBCi96UhmQuDzDxw16naAYHMXgAvGgVL7whPr1OmI3MdM0AS XK+eLiJfynscY8got6Q/t5ExVHC5cLaehTGmd6iF1UFIfXNe03bhuqW1e0346d9/Fk6Iy8b/7Zb PQlxbKOqapDGkHbYfJr3VQXk0GbQb5M8wT/N11zzeGucWM+zpfQzwNRAQ9UbZxhAgt4s1RaT84v CKZxqB5eICF4BVWF5f9eIVFkWVkDxY+UzhUEXoD35/fGUGb+MHYG6PGp8desKK+uuJX7V4MhP/c a+pLYOGcD0xo+n3Ksv20dEETsF/oMe+8X0V/FOdCzK0WdOeZVSbudu7kOrrx8IzU/lCC2xnjZdJ 2eMlkBkNCMr/Et3FGVe70qv6D7hfCnEfk8nGMWpJuz5S9U= X-Received: by 2002:a05:620a:4888:b0:8cf:d717:c22e with SMTP id af79cd13be357-907badfbfebmr2504182785a.28.1778559827743; Mon, 11 May 2026 21:23:47 -0700 (PDT) Received: from mighty.tail79ce1c.ts.net (nat-130-245-192-1.resnet.stonybrook.edu. [130.245.192.1]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8b53c7accddsm330162176d6.36.2026.05.11.21.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 21:23:47 -0700 (PDT) From: Mithil Bavishi To: Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , Russell King Cc: Sami Tolvanen , Kees Cook , Nathan Chancellor , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Mithil Bavishi Subject: [PATCH] ARM: OMAP2+: Make OMAP4 finish_suspend callback CFI-safe Date: Tue, 12 May 2026 00:23:41 -0400 Message-ID: <20260512042341.1452-1-bavishimithil@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit With CONFIG_CFI enabled, OMAP4 can trap in omap4_enter_lowpower() because omap_pm_ops.finish_suspend points directly to the assembly routine omap4_finish_suspend, which lacks the expected KCFI type metadata. Add a small C wrapper with the exact callback prototype and use it for finish_suspend. Signed-off-by: Mithil Bavishi --- arch/arm/mach-omap2/omap-mpuss-lowpower.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index f18ef45e2..1c51b2f97 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c @@ -111,6 +111,11 @@ static struct cpu_pm_ops omap_pm_ops = { .hotplug_restart = dummy_cpu_resume, }; +static int omap4_finish_suspend_wrapper(unsigned long cpu_state) +{ + return omap4_finish_suspend(cpu_state); +} + /* * Program the wakeup routine address for the CPU0 and CPU1 * used for OFF or DORMANT wakeup. @@ -437,7 +442,7 @@ int __init omap4_mpuss_init(void) } if (cpu_is_omap44xx()) { - omap_pm_ops.finish_suspend = omap4_finish_suspend; + omap_pm_ops.finish_suspend = omap4_finish_suspend_wrapper; omap_pm_ops.resume = omap4_cpu_resume; omap_pm_ops.scu_prepare = scu_pwrst_prepare; omap_pm_ops.hotplug_restart = omap4_secondary_startup; -- 2.43.0