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 E41BCC77B6C for ; Wed, 12 Apr 2023 21:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229965AbjDLVMM (ORCPT ); Wed, 12 Apr 2023 17:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbjDLVMJ (ORCPT ); Wed, 12 Apr 2023 17:12:09 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82A116E96 for ; Wed, 12 Apr 2023 14:11:59 -0700 (PDT) Received: from zn.tnic (p5de8e687.dip0.t-ipconnect.de [93.232.230.135]) (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 121FB1EC051E; Wed, 12 Apr 2023 23:11:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1681333918; 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=HJYqs9cEBfoLiSUzgjpNDSfIiv1vg3rOU/H/BIhOsmQ=; b=R8zEr/Oa4KDmK/pQH5CGUi9KpIb8XCoBhE2wYNF2Uo/R4gvbvTtcQ6FvEbvUPlK1s2G6jj xCbUE2Xb08d++c+Jzhqv9vBK3/pJzPddoBwLx95hfZO3e+fV1NKruUCHKmVve4uodLNanR MOvtbYC6+jkvo7S2BIbhERNudPxvecU= Date: Wed, 12 Apr 2023 23:11:53 +0200 From: Borislav Petkov To: Juergen Gross Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Michael Kelley Subject: Re: [PATCH v5 09/15] x86/mtrr: allocate mtrr_value array dynamically Message-ID: <20230412211153.GKZDcemdxs2mhhwuiF@fat_crate.local> References: <20230401063652.23522-1-jgross@suse.com> <20230401063652.23522-10-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230401063652.23522-10-jgross@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 01, 2023 at 08:36:46AM +0200, Juergen Gross wrote: > +#ifdef CONFIG_X86_32 TBH, I'm not really crazy about adding more ifdeffery. Wondering if adding a 32-bit only build object: obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o legacy.o to arch/x86/kernel/cpu/mtrr/Makefile and moving all that gunk over there, out of the way, would be even cleaner... > + mtrr_value = kcalloc(num_var_ranges, sizeof(*mtrr_value), GFP_KERNEL); > + > /* > * The CPU has no MTRR and seems to not support SMP. They have > * specific drivers, we use a tricky method to support > - * suspend/resume for them. > + * suspend/resume for them. In case above allocation failed we can't > + * support suspend/resume (handled in mtrr_save()). Oh well. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette