Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp916475pxp; Wed, 16 Mar 2022 21:12:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEt2xLxvmIhfiZCdBGXLByCHhe9qz4v0jRzacCVXD4x/iJsCMdLRaQahGD7pWcx43xq2VH X-Received: by 2002:a05:6a00:2296:b0:4f7:9e15:57e0 with SMTP id f22-20020a056a00229600b004f79e1557e0mr3119720pfe.17.1647490350850; Wed, 16 Mar 2022 21:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647490350; cv=none; d=google.com; s=arc-20160816; b=lETt9rNtiLIXbaLVVy83H1KynGh6Ni8/gDHnMpmVmSQFFnQPH+/u0ANRmebSs3S+mf tvmK1c6keB9eGznDpBZvZZOIcKk5VxzD7FW1sBpaXpdU70mKZm9sfHY++LTE3QDTP0td 8rnd9Z552uWb8tB5Kyd5FNR7gsT984l4e3oSntChJQuA30NpIRz+S1sNnAtl2WEMP4a7 9aO38jkhAlgvJNpFcv9BozrUd8WTBDoDEHxfatC/Bd2Fzir8NY3eD6UlR1lv024g+Uhg ZhLCrCjI+VAfDXhY3+Vfshmmd7iUoLMoCEODkTWc5UMpCyAnWeOZizxU7iF8VnU6uFl7 LyNQ== 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=9YqUb6EkoE47lz1fFg2iC4xCBZkBID1oDN6LQgAf/3U=; b=NQcf7YzZyKLDfxAaoWzdserNO32mvV8liQccXg87oL9KEuikH9Ub8zgjzZPPYZmJ+y kIxL4NISnzTJiumLEYQQ29vRM90rAZ1zqsz4wf9uOfdoSEpW12c51DOCKMRjJTq63p0A O9fCqIIU7oSHyFOBAuJOlKvpbDQbRBo1qckswItP9RxhHysY5jF+y4jXAgZX10XGNhnH Xr5sKxHve2nE7m+lD+AQdnzg55XJOeY/Goh07Zu/S4nFs7Z4KB0WzcYXKbiCTfLR4XE8 TSEkG8n2ykUDsNXux45N1/uS/zkOa8awYuCmukkkWeDNYS4Vpz0zN8Ks/bXMuA+UUmsI xqEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kWOQRb69; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s79-20020a632c52000000b003816043ee57si985394pgs.76.2022.03.16.21.12.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:12:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kWOQRb69; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D6ADFB1A9B; Wed, 16 Mar 2022 20:51:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350586AbiCORcD (ORCPT + 99 others); Tue, 15 Mar 2022 13:32:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349106AbiCORcC (ORCPT ); Tue, 15 Mar 2022 13:32:02 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3106956774; Tue, 15 Mar 2022 10:30:49 -0700 (PDT) Received: from zn.tnic (p5de8e440.dip0.t-ipconnect.de [93.232.228.64]) (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 D198F1EC0501; Tue, 15 Mar 2022 18:30:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1647365443; 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=9YqUb6EkoE47lz1fFg2iC4xCBZkBID1oDN6LQgAf/3U=; b=kWOQRb69xh3Fj1RO8HggjEHuHTUYXIGG6yK6k7mUfVYswNX06JkAhEOZDyMfqh4aLibpzJ VHJOKfcKxzYI4TAHOAb0qq7nu4c2j5RkxvhnHCYcSz5Ff6fhSI1LWst9f/FBu9PclFSJlK o5/p6a/efP6sAmdBDhKUk83fv5HyqEw= Date: Tue, 15 Mar 2022 18:28:29 +0100 From: Borislav Petkov To: Naveen Krishna Chatradhi Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, mingo@redhat.com, mchehab@kernel.org, airlied@linux.ie, Muralidhara M K Subject: Re: [PATCH 1/1] x86/amd_nb: unexport amd_cache_northbridges() Message-ID: References: <20220228161154.54539-1-nchatrad@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220228161154.54539-1-nchatrad@amd.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, Feb 28, 2022 at 09:41:54PM +0530, Naveen Krishna Chatradhi wrote: > From: Muralidhara M K > > amd_cache_northbridges() is called from init_amd_nbs(), during > fs_initcall() and need not be called explicitly. Kernel components > can directly call amd_nb_num() to get the initialized number of > north bridges. > > unexport amd_cache_northbridges(), update dependent modules to > call amd_nb_num() instead. While at it, simplify the while checks > in amd_cache_northbridges(). What I am missing in this commit message is why is it ok to do that? AFAIR, previously, amd_cache_northbridges() wasn't an initcall so the module or builtin - which came first - was forcing the NB caching through the explicit call to amd_cache_northbridges(). fs_inicall() does that now unconditionally so the question is, why can the module init functions assume that the northbridges have been cached already and can simply get the NB number? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette:wq