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 C111EC38A2D for ; Wed, 26 Oct 2022 10:38:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232844AbiJZKiC (ORCPT ); Wed, 26 Oct 2022 06:38:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231877AbiJZKiA (ORCPT ); Wed, 26 Oct 2022 06:38:00 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89CC736DD7 for ; Wed, 26 Oct 2022 03:37:59 -0700 (PDT) Received: from zn.tnic (p200300ea9733e7b8329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7b8: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 225111EC032C; Wed, 26 Oct 2022 12:37:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1666780678; 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=ZX9dpgsglCG9/xfyhtzG1Jg1smDACPCZdOVzq6ZSD7A=; b=UVRzJi407zgiEMvg1MFExN6jybGK2KCFer+1pIO0GpYRp00V9RjhDuS/yGK9dcymEvQdd7 YAyadENKE6MHNcoNmVpCHwx9OVNxmK/J52kuoqo1Gv53YCzql2FzxDfP0RyR+1iYmhk7Cj VTMNcQsLD1ltMHUsD9Kw5LRxgsjx60M= Date: Wed, 26 Oct 2022 12:37: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" Subject: Re: [PATCH v4 07/16] x86/mtrr: split generic_set_all() Message-ID: References: <20221004081023.32402-1-jgross@suse.com> <20221004081023.32402-8-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221004081023.32402-8-jgross@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 04, 2022 at 10:10:14AM +0200, Juergen Gross wrote: > Split generic_set_all() into multiple parts, while moving the main > function body into cacheinfo.c. > > Prepare the support of PAT without needing MTRR support by > moving the main function body of generic_set_all() into cacheinfo.c > while renaming it to cache_cpu_init(). The MTRR specific parts are > moved into a dedicated small function called by cache_cpu_init() in > order to make cache_cpu_init() as MTRR agnostic as possible. > > The setting of smp_changes_mask is merged into the (new) function > mtrr_generic_set_state() used to call set_mtrr_state(). It was > probably split in ancient times, as atomic operations while running > uncached might be quite expensive, but OTOH only systems with a > broken BIOS should ever require to set any bit in smp_changes_mask, > so just hurting those devices with a penalty of a few microseconds > during boot shouldn't be a real issue. This still needs addressing "So the commit message should not say what you're doing - that should be visible from the diff itself. It should talk more about the *why* you're doing it." -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette