From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Date: Tue, 19 Apr 2022 12:32:25 +0200 Subject: [PATCH v7 2/8] x86/crash: Introduce new options to support cpu and memory hotplug In-Reply-To: References: <20220413164237.20845-1-eric.devolder@oracle.com> <20220413164237.20845-3-eric.devolder@oracle.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kexec@lists.infradead.org On Mon, Apr 18, 2022 at 05:03:39PM -0500, Eric DeVolder wrote: > I've examined the code with this thought in mind, and I'm not exactly sure how > this code should be restructured for !HOTPLUG stubs. I'd very much appreciate > an example in order to facilitate accommodating the request! For example, see init_intel_microcode() in arch/x86/include/asm/microcode.h: #ifdef CONFIG_MICROCODE_INTEL extern struct microcode_ops * __init init_intel_microcode(void); #else static inline struct microcode_ops * __init init_intel_microcode(void) { return NULL; } #endif /* CONFIG_MICROCODE_INTEL */ The actual definition then is in: arch/x86/kernel/cpu/microcode/intel.c: struct microcode_ops * __init init_intel_microcode(void) and it gets enabled when CONFIG_MICROCODE_INTEL is enabled in the .config. When CONFIG_MICROCODE_INTEL=n, the static inline stub gets used and optimized away by the compiler. HTH. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A525EC433EF for ; Tue, 19 Apr 2022 10:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239070AbiDSKfT (ORCPT ); Tue, 19 Apr 2022 06:35:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232153AbiDSKfP (ORCPT ); Tue, 19 Apr 2022 06:35:15 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA0829CB2 for ; Tue, 19 Apr 2022 03:32:33 -0700 (PDT) Received: from zn.tnic (p200300ea971b58fe329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:58fe:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 416CF1EC0426; Tue, 19 Apr 2022 12:32:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1650364348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=+C400UB/aegXad3nw2fevgP3gS1wreNSifnBkwtUuq0=; b=EFN+/+9+gvjDdebSzdoqGtAviwSkUfNJzNwajmoxtrtEgL4NFpMQD6YrUOLSddjwlkc4IJ 8s2t2L0nNRL3MUpAKg9MFV34t/m3MOzP0PMgrp9B9rDyk+BfDLnTSZl/7AjWGiGKHjdHFX Lcyh7drFh17eb/VAF5IdJepW98t6UZk= Date: Tue, 19 Apr 2022 12:32:25 +0200 From: Borislav Petkov To: Eric DeVolder Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, bhe@redhat.com, vgoyal@redhat.com, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, david@redhat.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com Subject: Re: [PATCH v7 2/8] x86/crash: Introduce new options to support cpu and memory hotplug Message-ID: References: <20220413164237.20845-1-eric.devolder@oracle.com> <20220413164237.20845-3-eric.devolder@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 18, 2022 at 05:03:39PM -0500, Eric DeVolder wrote: > I've examined the code with this thought in mind, and I'm not exactly sure how > this code should be restructured for !HOTPLUG stubs. I'd very much appreciate > an example in order to facilitate accommodating the request! For example, see init_intel_microcode() in arch/x86/include/asm/microcode.h: #ifdef CONFIG_MICROCODE_INTEL extern struct microcode_ops * __init init_intel_microcode(void); #else static inline struct microcode_ops * __init init_intel_microcode(void) { return NULL; } #endif /* CONFIG_MICROCODE_INTEL */ The actual definition then is in: arch/x86/kernel/cpu/microcode/intel.c: struct microcode_ops * __init init_intel_microcode(void) and it gets enabled when CONFIG_MICROCODE_INTEL is enabled in the .config. When CONFIG_MICROCODE_INTEL=n, the static inline stub gets used and optimized away by the compiler. HTH. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette