From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (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 221F12931CD for ; Sun, 26 Jul 2026 06:09:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785046144; cv=none; b=W1ity8YV6bajXzUxcDfwU5RD4uAn5k16UOrf+NgSY8fzs/H4CQ1Cr2uCXMPHbOd74Bk7BTMVcLL0YcY8UCxDEafPVxdWAwXc2jzPoGosuyH+Hoifrm0dQfXTzL3AzWbl5roTRLbU1gG6qO6bimRToibzIX0sSlJm9ffkvb3x+Mw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785046144; c=relaxed/simple; bh=Z7TFJuHVHJKvY8/Mc6ddE/wit6HJie13aC7mOZ54YNU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZltCVuEtBXVrkFTaYS3yMjr3XkTMmPztNXM3dwUtoA4h8m62B/QHXyYFsr8AxMGJ8bCpOJ3kmPD3KRHKuMGtoXpah4yrYLsw8FKXiXSBrZGcIdwoY3J8sINhKxA80QO7DLI4RZkDsmgxcXCJ7u/aW1n21drAhnk65KC+nCox05k= 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=jz+g9aj6; arc=none smtp.client-ip=209.85.210.172 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="jz+g9aj6" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-848593533cbso1132060b3a.3 for ; Sat, 25 Jul 2026 23:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785046142; x=1785650942; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=7UFhWQOa/vwyik9QrUHaltpmfCg9gV5b8FYD7Vbdi7U=; b=jz+g9aj6e5FFzOfbp/mpUry7APQ9iM8WH7a9JDUIi/YkYOCootVmeDydu5GrwSEdor 8wgw3CAB/aENcUq9ivmkcIBWgwvYoVlKXSMeuzOZd7pfndyi/TsmylME6ts7oOAuUzhX GbPvHqV4KS0WtBQsHNQaOWKxa7sVfSXgOKVEPVQk/utltGACl9xHs+OxfnKSygaxItep DFSKpSDb5OPjhB2FnDraueFjnCk16zhqxnNSQC0CSJuWcFVImOMiQ9NKp2ZRhBtuRlH/ B0hlNc6qxoP8djKwyP5Wsa69/W221inGfE9I07t/kMn3B57iBShaX/MpYc85/jWcT1hJ w6Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785046142; x=1785650942; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=7UFhWQOa/vwyik9QrUHaltpmfCg9gV5b8FYD7Vbdi7U=; b=TuLkNFN+BaNZE7zC3IRAEELNHYr5ew6rphzEFiqpQoS2t+hCqAIwVmS6dsBZKzoqGD J4FreatEQkTWxpC5JEnzMFIX06RDOfYWX/QIZI5TU/biAXmXxT4Iy1+0cTTpYyhp6jg4 uJVjgVFpTfUYD6t+TIckWLdzOfZAyz8Y+RHhupwPLjYl4st1yf+2gNxfELKBRA2rmZoN Fu+Hq+aFdygleX5zEbtjZ9d7jM/j1N75vBQXlGe+r6T7QPTkJAbykfUfI7griHf+axEz L3SAfXnvshkAVxSoGN9+3fevYizvKP0vxuJlIpxnOCQHCqf/k10mcPFVkxSZeE1fs/y6 xMgQ== X-Forwarded-Encrypted: i=1; AHgh+Rr09JY/EQaoSs06Iin2yo8VhCxXZ4vOi+q5ueyJqTVEWT3LyksRhiOgCdjB74YUUKdyZhVT2ZjLwmMoByw=@vger.kernel.org X-Gm-Message-State: AOJu0YxU1PLktU6qfI5v2W5WDQk2B0FBcbMqc4ak/ztMm0k15rbBq1n2 K32zBQj+bNa8aeGzV0lz09J8wQld2xn3W5V3z56+u/+tZE5pG8ZJyjy/ X-Gm-Gg: AR+sD116zs6bM+T2DCa7Ka0VZmtWNDuZIYkGqtEAe51WGghIxhXxedTFQ6gHrE9lken r1UUA5q9gk12duxcQWNns9JGV0LQIdXCSucuYuuwQSFwewunoK3JhgqMPKmLB5VxGTfOSALz5I+ BlgBNP0Ixw3xkGxNvT/B8F7q0lXnawc/yBvftGb0ZDvlFFvZBGy4GZE0FbbtFKjceyHwhvZ0I9V G1zk8kFnqzgfXZgue+ioqElszK4J8u1IK+akOR7mebhjxLi4V3O8wyiwvjOc5xE5TY2QkgoYtiG 92dhBNWHQ+d1CM5WZxPxxPthi84wLtxfCNHHinzJ35lzlZPCm9kURysGDjCQOHESN2CrV9SayBR Cg2AzKHhH4eKFTHuGkVh2GKl2jFKo2GZrHPJ+Zuy+RV52eEdi66v3g5ESlgcLHA1eyOHzXuENqz W1f1Pp6Sh/Ibei44NnQ0Dg1jmR+wcG+t94Gg== X-Received: by 2002:a05:6a00:390f:b0:847:8d54:f4f9 with SMTP id d2e1a72fcca58-84e595810c1mr3014064b3a.51.1785046142393; Sat, 25 Jul 2026 23:09:02 -0700 (PDT) Received: from buffalo-ssd (M014013071096.v4.enabler.ne.jp. [14.13.71.96]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84e533d1644sm1609938b3a.37.2026.07.25.23.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2026 23:09:01 -0700 (PDT) Date: Sun, 26 Jul 2026 15:08:57 +0900 From: Akari Tsuyukusa To: Arnd Bergmann Cc: Nick Desaulniers , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , Nathan Chancellor , Bill Wendling , Justin Stitt , Yingjoe Chen , "moderated list:ARM SUB-ARCHITECTURES" , "open list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , "open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b" , stable@vger.kernel.org, Ard Biesheuvel Subject: Re: [PATCH] arm: mediatek: fix secondary CPU boot on Thumb-2 kernels with Clang Message-ID: References: <20260722172443.534251-1-akkun11.open@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=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jul 23, 2026 at 11:53:14AM +0200, Arnd Bergmann wrote: > On Thu, Jul 23, 2026, at 11:15, Akari Tsuyukusa wrote: > > Can you send your fix as PATCH? > > I think your approach is better than mine. > > I think we should wait for the llvm issue to be resolved first, to > document whether this is considered a bug in the kernel or the > assembler, and to see if any other kernel code may be affected > by the same thing. > > Looking around other .S files, I see the same > pattern in stext(), cpu_resume_arm(), mcpm_entry_point(), > all of which start in arm mode but end in thumb. It's a LLVM bug. The LLVM assembler source code explicitly mentions this limitation: /// /// FIXME: there is a corner case where the state is changed in between the /// label definition and the .type directive. This is not expected to occur /// in practice, and handling it would require the backend to track IsThumb /// for every label. /// https://github.com/llvm/llvm-project/pull/211641/changes However, it will take some time for an LLVM release with this fix to become available. Since LLVM (>=15.0.0) is an officially supported toolchain, leaving the kernel with bug(s?) on supported LLVM versions isn't ideal. I think we should apply a workaround in the kernel for now. Best Regards, Akari