Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1512364rwl; Wed, 12 Apr 2023 14:12:46 -0700 (PDT) X-Google-Smtp-Source: AKy350bOJNIOKeh4VRASjBExwYAvbIlS5ZdDVSqrWTFOny7vUdx+qGtY9DRNASYVuupHOVujWRFt X-Received: by 2002:a17:906:f117:b0:947:40e6:fde4 with SMTP id gv23-20020a170906f11700b0094740e6fde4mr261010ejb.2.1681333966296; Wed, 12 Apr 2023 14:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681333966; cv=none; d=google.com; s=arc-20160816; b=yqFhHyBxFBgFBafblmqs5t1KyBMO1CeYNp2gt8FX/n3/8gEmq0IMMkLCp0SLZ1A7wi 2mxzm6ihisfzvOVrfOn8LEd6cg8uV3YGREZDDkpVqNmI00P+HTe/lF9Hr0G4gyYqQgCH V560L/EmgecoA2ziEpI6BqnlsQTQJeA+au+wjcsILYfm/sP+XcnZAEvK/3NBzi9RutLE JWtXxU/De/Ry7c8MH46ZtpY1TP9CQ/85nvO8M+6PSqBBP/0IRKnoCAVGyr7d18nNWv6Z /XeIUPUfwkEG54EJnRs12blmvEoB+GWxSzNDlsLH6FKEcaOKevGXktSsZmOAfQsXUXNd nIRA== 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=HJYqs9cEBfoLiSUzgjpNDSfIiv1vg3rOU/H/BIhOsmQ=; b=NPVA0QLRa+GbuAAvG4JCUt+H1Sp96JwM77inSWd8EfLjwqx9M8GMegLMtPqTkYvioA AFBivn3uSlihEDsS2jhRqpcu73f6caTQtezaqlD5Y4FUHm2lkkn31C2KDikz6fgeKRoQ FYIcvGFpAxWNHlF5ArHQPxZP9SmtWPqx6u/yQvXSGNDtJrE7rd51XaS6703m3tErWcLi +FJmkD9v/gZI7xjyg4nubqU510QyABRmE0/IV6A9hMpQQaA1RTFCR4APxWWLpiihweWk ypHE0fn3naJaVHnvX9vBmVUfJv3I/fBJ8wgW/MId0C+XNOgX6AgwPd06T3L2PyGN77F0 hfzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="R8zEr/Oa"; 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 u9-20020a056402064900b0050270e743d4si3049746edx.590.2023.04.12.14.12.22; Wed, 12 Apr 2023 14:12:46 -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="R8zEr/Oa"; 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 S229963AbjDLVML (ORCPT + 99 others); Wed, 12 Apr 2023 17:12:11 -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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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 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