From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757738AbcATEmc (ORCPT ); Tue, 19 Jan 2016 23:42:32 -0500 Received: from terminus.zytor.com ([198.137.202.10]:56254 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754082AbcATEmZ (ORCPT ); Tue, 19 Jan 2016 23:42:25 -0500 Subject: Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init To: Brian Gerst References: <1452972124-7380-1-git-send-email-brgerst@gmail.com> <20160116193658.GC32085@pd.tnic> <20160117103337.GC8549@pd.tnic> <20160118181457.GG12651@pd.tnic> <20160118185107.GI12651@pd.tnic> <20160119011026.GA12911@pd.tnic> <20160119092213.GA15071@pd.tnic> <569F06B9.4060903@zytor.com> Cc: Borislav Petkov , the arch/x86 maintainers , Linux Kernel Mailing List , Ingo Molnar , Denys Vlasenko , Andy Lutomirski , Linus Torvalds From: "H. Peter Anvin" Message-ID: <569F1022.6040709@zytor.com> Date: Tue, 19 Jan 2016 20:42:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/19/16 20:39, Brian Gerst wrote: > > Can't put it in .init.text or else you get: > WARNING: arch/x86/kernel/built-in.o(.text+0x4b9): Section mismatch in > reference from the function __switch_to() to the (unknown reference) > .init.text:(unknown) > The function __switch_to() references > the (unknown reference) __init (unknown). > This is often because __switch_to lacks a __init > annotation or the annotation of (unknown) is wrong. > > We want to override that because we know that the reference will be > removed after alternatives run. That's why I created a new section. > Right. I wish we could tag reference call sites as clean, not sources or targets. Sigh. However, that's not too much of an issue. -hpa