Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4243768rwo; Tue, 25 Jul 2023 03:05:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHo5uWFV39sZfegA6q0BgwGtrVkbjbTSxJoiO8sferzMG6Db2ALXKcYGyqVdC21JmH6J982 X-Received: by 2002:a17:906:142:b0:99b:4378:a5aa with SMTP id 2-20020a170906014200b0099b4378a5aamr13110783ejh.49.1690279545745; Tue, 25 Jul 2023 03:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690279545; cv=none; d=google.com; s=arc-20160816; b=QsGk8TSCOTaS34ZcOmRwW9fXh7BPbg5L4VgAP2P/VBL++CFckSynmR0IRpVHyDIabP 3NZbpbrpEgJoA8cHvOOp9+YHhJDT+bKtFQX70/BCgAXzpUZ8yOJObSUVEvENRyEcct/U 1c4XCxNcNrGROTADhJV/vltpa7mDL1P08RH+qM5KAvjuaH8sh9Bn2XCub/bzpZDwd+gb cELLsqs7JT1SuPIvASN/gizFJP5JlqVRHTX/ddGk4z8Ap+7keDCMiXV/forsoVLLR0Nl XTbW8/WrCzSXRrB9kMCC31BAewd7QmsifPOsMzXF3S+BcCBlyrrhn6S17kWQZcmVMGmk 6Xsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kRCYMYHCn+/rcymTFozYB+zVeZAOhN1wAF3axD4N0ec=; fh=yFVscOOhBZRB+yFbtWPwLFFV9wigHjZbt4tse/RBpJY=; b=wvrII3QPoW71O0C+zKz9S2SiNiaTvt5Vxx7vrT5MHsWa+aJH73JsmlKQ5u0hUmUv2t ADIwExUlhYxYRd8my/lV4gH4EXmOqKp7RxhOHLr5ST8DlbllD4sH0ez7XiX6zE5U8R86 KyW2vJyvBrOpvwpXwJgEn8Qd1/DlrqHtYp2yhUv9P7khEYLVF0xQOc92Sup/+1KVY5y/ ycJVnWheERIYnlqAhbUxWBCm7IXLEY1T12ZUi+pvlXbUbeGh0tR5HTKYvzLv5uiv73OF YFYbX6aNhAs3Fwhdkz+PQCD6KurkwdwzUtG6u9oLgRZgKsLXM53lX/Ifh6eSQcizLdQH 8vbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=DTodZjQ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a170906408c00b0097d787c4afesi7955352ejj.398.2023.07.25.03.05.21; Tue, 25 Jul 2023 03:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=DTodZjQ0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231234AbjGYJVB (ORCPT + 99 others); Tue, 25 Jul 2023 05:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232823AbjGYJUo (ORCPT ); Tue, 25 Jul 2023 05:20:44 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9ADE1FE2 for ; Tue, 25 Jul 2023 02:20:10 -0700 (PDT) Received: from nazgul.tnic (unknown [193.118.249.27]) (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 0F28C1EC09F1; Tue, 25 Jul 2023 11:20:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1690276809; 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=kRCYMYHCn+/rcymTFozYB+zVeZAOhN1wAF3axD4N0ec=; b=DTodZjQ0CEbZdlzJDqE30r/GYILSTB5cDRhLPtuKVmHLfF5pER7en+iOkQNm2FPC5CaC5n cix35f4hAikD/sohTa3yhlT6lRzepKwG3p0wi9LAm8Eiy1bIYpvDsYMiDA6JQXk62SKrHL JZXwHS8ymhlyP1l/e1gAKEq39tJGLMU= Date: Tue, 25 Jul 2023 11:20:46 +0200 From: Borislav Petkov To: Arnd Bergmann Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, Arnd Bergmann , "H. Peter Anvin" , Kees Cook , Kim Phillips , Alexey Kardashevskiy , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: Fix amd_check_microcode() declaration Message-ID: <20230725092046.GAZL+T7ln/TKBOuihi@fat_crate.local> References: <20230725082638.956675-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230725082638.956675-1-arnd@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 25, 2023 at 10:26:13AM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The newly added amd_check_microcode() function has two conflicting definitions > if CONFIG_CPU_SUP_AMD is enabled and CONFIG_MICROCODE_AMD is disabled. Since > the header with the stub definition is not included in cpu/amd.c, this only > causes a -Wmissing-prototype warning with W=1 Can we please promote -Wmissing-prototype to default or is it too noisy yet? > diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h > index 9675c621c1ca4..6a860d40b0411 100644 > --- a/arch/x86/include/asm/microcode_amd.h > +++ b/arch/x86/include/asm/microcode_amd.h > @@ -48,13 +48,18 @@ extern void __init load_ucode_amd_bsp(unsigned int family); > extern void load_ucode_amd_ap(unsigned int family); > extern int __init save_microcode_in_initrd_amd(unsigned int family); > void reload_ucode_amd(unsigned int cpu); > -extern void amd_check_microcode(void); > #else > static inline void __init load_ucode_amd_bsp(unsigned int family) {} > static inline void load_ucode_amd_ap(unsigned int family) {} > static inline int __init > save_microcode_in_initrd_amd(unsigned int family) { return -EINVAL; } > static inline void reload_ucode_amd(unsigned int cpu) {} > +#endif > + > +#ifdef CONFIG_CPU_SUP_AMD > +extern void amd_check_microcode(void); > +#else > static inline void amd_check_microcode(void) {} > #endif > + > #endif /* _ASM_X86_MICROCODE_AMD_H */ Considering how cpu/amd.c provides the function implementation, that header gunk should not be in microcode_amd.h but in ...asm/processor.h, I'd say. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette