Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp987826iob; Fri, 13 May 2022 18:43:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJTVLg5BKbuRtiLie/hU/HHdGLBOdCeXzTLq+8PjTet4Td2ScZQi2qA+BHAnkciyinrnhL X-Received: by 2002:a05:6000:186f:b0:20c:5f3d:44a4 with SMTP id d15-20020a056000186f00b0020c5f3d44a4mr5966423wri.152.1652492585674; Fri, 13 May 2022 18:43:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652492585; cv=none; d=google.com; s=arc-20160816; b=T2Al3yDFJeB0bw8qWzgrpRNxRE0RZUNkLGBdrCKBxe6mMYi9MxmTEZCR+W+/hTLLgP 4RYSxgdBqVN3jzZV9q9NVAA0MKRJjofSoKmj9mVUghMgOAII9RrpuoGNqRaYOtUh4Ywp KaOj3V7O49oeqIjWdz4UvAGcbbFXagnIAShOJi8z4jE0OvbOvY0wz/zi8NY6fP/IjCaS wVajQjo8b5R+zYw5+NAjQ0a2ZxuP/J2K8muUAEohO9x42wwbDC3Slpyud+URlm1cZKqw LclyezYoHlb519fCRVoVYuvTQtFO0q4R+T6lYUrcXldpr6T/foNNixAbFDb2g57XfJCI halw== 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=57yrkf2Wx97u010Gsq5SOKg6z3QHXYIFsK4X1Q1PjQE=; b=ELMGMX36TF4WYnR1hIZ2fwcz+jRVHGOVZ/rgm4BGqoiMdFhxVHGdR67mn5N1fnfsSy SNEELzaoiW0ooLabnBfzjzXicyRSekUMQJ3G4g5F6zDckWIWddenXGiCk/GJSA4YscI1 ZhhSHVyNTzF/P/Zmp8jxCPdb7SB++Se9w6l5+vrSorlJoENGRhk0zErUCaJUMaJPL9Ce HiTMFNqtroImMaLXh59TwWzjTtJVIbUHN9OI8ygUjROzbF69tF0q1eWi+uUodb869Aya 28Fxml6kMf6XFV+p6p5kxmL+mFloBRequ1d2eniY55Z4gCaGFCzQhTaPhrOyZSc12Jz/ pyTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=A6xL30SZ; 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 j32-20020a05600c1c2000b00393fbaea5dfsi4406844wms.187.2022.05.13.18.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:43:05 -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=A6xL30SZ; 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 3684E42DC09; Fri, 13 May 2022 17:08:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381118AbiEMPVu (ORCPT + 99 others); Fri, 13 May 2022 11:21:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381937AbiEMPVn (ORCPT ); Fri, 13 May 2022 11:21:43 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC204674C7; Fri, 13 May 2022 08:21:38 -0700 (PDT) Received: from zn.tnic (p5de8eeb4.dip0.t-ipconnect.de [93.232.238.180]) (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 670591EC0722; Fri, 13 May 2022 17:21:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1652455292; 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=57yrkf2Wx97u010Gsq5SOKg6z3QHXYIFsK4X1Q1PjQE=; b=A6xL30SZ1SBHRBSM6v3TAZKLJu0DcSj0KVt/bjqsGWd9dgVPI6TVoQu2O+YeY+vtqmjm2/ uqwtbcZ0ledhD7U8S8xGaz4behhU4+7eodX9upN+fujBveEO0qKCYZ+VGthewwkPG4f7hU oUvUanUyXYcYD2/DYpbeKNFKJ0Fr51g= Date: Fri, 13 May 2022 17:21:31 +0200 From: Borislav Petkov To: Yazen Ghannam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Smita.KoralahalliChannabasappa@amd.com, muralidhara.mk@amd.com, naveenkrishna.chatradhi@amd.com Subject: Re: [PATCH 05/18] EDAC/amd64: Merge struct amd64_family_type into struct amd64_pvt Message-ID: References: <20220509145534.44912-1-yazen.ghannam@amd.com> <20220509145534.44912-6-yazen.ghannam@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220509145534.44912-6-yazen.ghannam@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, May 09, 2022 at 02:55:21PM +0000, Yazen Ghannam wrote: > From: Muralidhara M K > > Future AMD systems will support heterogeneous "AMD Node" types, e.g. > CPU+GPU. Therefore, a global "family type" shared across all "AMD Nodes" > is no longer appropriate. > > Move struct low_ops routines and members of struct amd64_family_type > to struct amd64_pvt. > > Currently, there are many code branches that split between "modern" and > "legacy" systems. Another code branch will be needed in order to cover > "GPU" cases. However, rather than introduce another branching case in > multiple functions, the current branching code should be switched to a > set of function pointers. This change makes the code more readable and > simplifies adding support for new families/models. > > In order to reuse code, define two sets of function pointers. Use one > for modern systems (Family 17h and later). This will not change between > current CPU families. Use another set of function pointers for legacy > systems (before Family 17h). Use the Family 16h versions as default > for the legacy ops since these are the latest, and adjust the function > pointers as needed for older families. > > Rename the Family 17h functions to use a "umc" prefix. This is to > indicate that the functions apply to all modern CPU familes (17h, 18h, Unknown word [familes] in commit message. Suggestions: ['families', > and 19h) which all have Unified Memory Controllers (UMCs). > > Signed-off-by: Muralidhara M K > Signed-off-by: Naveen Krishna Chatradhi > [Rebased/reworked patch and reworded commit message] > Signed-off-by: Yazen Ghannam > --- > drivers/edac/amd64_edac.c | 353 +++++++++++++------------------------- > drivers/edac/amd64_edac.h | 66 +++---- > 2 files changed, 140 insertions(+), 279 deletions(-) That diffstat looks good. And it simplifies and streamlines the code real nicely. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette