From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (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 3E15E3FDBF6 for ; Fri, 15 May 2026 18:06:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778868401; cv=none; b=me3bBlW/QWaaG7SvSvHpOkjw7u6V8MhRK8L/mSdssVc6XNjVNmTxBZhVmcLjntOoVafiVah1Czp9vBZN2pBJdyZaOMRlYKlGw4RNChDRVOUqix2TxFyZpYsodPvyzuP/i/SfBY/mQSKCOvLxk5dGHLTE+trvjSy91sz3xHF6OR8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778868401; c=relaxed/simple; bh=AXezpO4nEn/GLJQ6Sx9eEO7b4j2SxRLhdWMBUWakUTE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uRUUj5v46s0E+f7gLlyJ9nLjA5QTkUKT7E+nwhdggkhexlNx237kxQisVf+NzP9iTNupAc0yUH+aZgwj2+lvbZtjgl9nXncj7HOCGzvrmPvWK/TtU0lpnjgKcIL2tps+Hi+YgsnS7JA6ZICOHZBD8gEWotomMBfcgMcZyGEMscE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=CZDlWgXL; arc=none smtp.client-ip=209.85.222.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="CZDlWgXL" Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-90b2fcf90a0so5663385a.1 for ; Fri, 15 May 2026 11:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1778868399; x=1779473199; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rcOSrIvcAcDO9WkkqWoNEexjLGDP5koDwQkJhDioOAo=; b=CZDlWgXL8SglPS3XV1i62d6mdrorGbhVhs/tOz3OSqkDB9wu/KsWKyHCnaamre9S4v gdB1QZJ/LB8xRvZRZwhKldnI9qzxgqp97c58LSpyPNyqk9AXq8eXFUbU+8HiilTEwv01 SE31+B2eBx8AUAJ7ePK0MB0nKlN0q+IeIqwBLZMr1O5SkbVDnDd6b6XAnO/bxQLDIJ5K wyperO/xrj3E4HM670zlDPgIWHv8UGPXBs6QjUhjK4hFewDELnNOo/QxO3/ErBuZ0n1x qTqFLncpBMLCtpddzDCKN7m4K/Db31a/U64XObeZ2FM+BX0eceZ1DdEDApHFvP49iP7u 1edg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778868399; x=1779473199; h=in-reply-to:content-disposition: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; bh=rcOSrIvcAcDO9WkkqWoNEexjLGDP5koDwQkJhDioOAo=; b=CGfwyObeWXh63sJHV61oKC6BGwizUVFpWdWY/ulw81G8BTAyMnkQjvoGs1/mIRjP7H D7K6So+VMA/mY+WVZZMZe0c3j60yODK37/eSc23P5RR9LHT/46oZSdpUrEdX9/NAkiKh xGYAQ/ZdExzutyZVd/v0i0lEbVOoDo5VC/EnPmnlJWj/nKqjpUKR6BlT8ijbo67VTmc0 8MXGHhhgFPsTgJzgG4nJP2/GcGsdjzLpqVwPg11hnr2l86fH61ZDlW5wiBiLeL13vi9D xC4fU74cfJGiWnodQuMr6g6plX2PQOKQ3P7IFwz+Yvx/ka+gA/SwLA7rVieb+ScMG7RS petQ== X-Forwarded-Encrypted: i=1; AFNElJ8qk/MgHpQXZrOQeJ4D31Uo+W0/nXyK5ehwN+FcMqwKFwWow2OtvwUx7/lHodJxTWyG9e1WTVnpmUbnr+s=@vger.kernel.org X-Gm-Message-State: AOJu0YycrfS0j6V7bj/evzpkvVSwb6/u658tWonAWla6aqU97OwhbaAU q5WcSw507NM4dv3bqzusQ2Db2It0XR6Xfoy8qz9NKeV/IVkYCHeuvkJ8Ru85FB3z590= X-Gm-Gg: Acq92OHoWfvjCOyO3d3ztQT3x1w/R09Jnq1q76kBoK77wNLoKKviSL7jBJQcJT4avpA 8WkdeP6qBP/tQV38q/0bqTtfS70e2WjTSYFOukUeiM3nW65GpkKwRkGY8eBuj4TnEQsN9LLM0hL Wcu9KCH8OzNgmQx96qvuKGMvkQqfRER+y4pJewNA9jxaqUyx45HDqAFKE6BpqILXjy9jvN+uPGs WqKllxCaPnxEBFqWEFP8YAHm4L42bFMr/VpfKHw0Yyf/50iQHqylEFLAHYuB4iXypjkj6bSAf6+ KYg7M8hVJDY2JcjfkzpujY8U1GsOjxQe+/Up3RG/f4xrcdvdB8cUchwDTwTBmU5A9zzuvr0Udm4 GWksBexMciahhdBxjlmSm9ZYo8Lk/Y799XHf/afvVSuTpchkEIT+Xg0zKZxUjm5XR/zawXPg0aE y/RgNC28rC3m8dGlr+WsS8KKfP2MtavM/G1aujhFPpKq1WIWqdsysciSX2hPF9Q7PWcOzBWDQmp W+yEA== X-Received: by 2002:a05:620a:a092:b0:8ef:6b87:5c52 with SMTP id af79cd13be357-910b14f8cb0mr1004416585a.38.1778868399150; Fri, 15 May 2026 11:06:39 -0700 (PDT) Received: from ziepe.ca (crbknf0213w-47-54-130-67.pppoe-dynamic.high-speed.nl.bellaliant.net. [47.54.130.67]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90c35cdb1sm58747396d6.46.2026.05.15.11.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 11:06:38 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wNwvm-00000007s92-0MaY; Fri, 15 May 2026 15:06:38 -0300 Date: Fri, 15 May 2026 15:06:38 -0300 From: Jason Gunthorpe To: Arnd Bergmann Cc: Will Deacon , Joerg Roedel , Miguel Ojeda , Andrew Morton , Thomas Gleixner , Nathan Chancellor , Arnd Bergmann , linux-kbuild@vger.kernel.org, stable@vger.kernel.org, Robin Murphy , Kees Cook , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] iommu, debugobjects: avoid gcc-16.1 section mismatch warnings Message-ID: <20260515180638.GH7702@ziepe.ca> References: <20260513145425.1579430-1-arnd@kernel.org> 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: <20260513145425.1579430-1-arnd@kernel.org> On Wed, May 13, 2026 at 04:53:54PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc-16 has gained some more advanced inter-procedual optimization > techniques that enable it to inline the dummy_tlb_add_page() and > dummy_tlb_flush() function pointers into a specialized version of > __arm_v7s_unmap: > > WARNING: modpost: vmlinux: section mismatch in reference: __arm_v7s_unmap+0x2cc (section: .text) -> dummy_tlb_add_page (section: .init.text) > ERROR: modpost: Section mismatches detected. > > From what I can tell, the transformation is correct, as this is only > called when __arm_v7s_unmap() is called from arm_v7s_do_selftests(), > which is also __init. Since __arm_v7s_unmap() however is not __init, > gcc cannot inline the inner function calls directly. The selftests should be moved into a kunit like was done for pgtable-arm: commit 699b059962add22b2a324645b6ae2a607fc1a93e Author: Mostafa Saleh Date: Mon Nov 3 12:33:50 2025 +0000 iommu/io-pgtable-arm: Move selftests to a separate file Clean up the io-pgtable-arm library by moving the selftests out. Next the tests will be registered with kunit. Then you won't have these section problems because the code will be in another module :) Jason