Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp430106lqg; Thu, 11 Apr 2024 07:17:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXl9AsInlCmHY1/i5EE/h/jG3JQlwQDAtdzeqguJ1CeOySU6L1+KwGNnOr9AgPYc/wo307vbW0WLocIkY0Ttx/m/Nw+/NkSzMEf8qQEow== X-Google-Smtp-Source: AGHT+IHEa2Ori5Zt+zCSkrxqEz0EVNdQ6AGvg1RHiAFlOZNjcL4Wv+JXJ9MAiqb28N//8csUpZ/F X-Received: by 2002:a50:a69a:0:b0:56e:3072:3cb4 with SMTP id e26-20020a50a69a000000b0056e30723cb4mr4125403edc.22.1712845076981; Thu, 11 Apr 2024 07:17:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712845076; cv=pass; d=google.com; s=arc-20160816; b=1Edvbuw43y4nqmkwh9KkZvfWWlYWJYOzxdL/uH2HZc7Vp1ersox1TwcOQ6fFCni2b0 VNSGLuraWqwr4RPZj/Z+IdLhjR1FxukZ67yUajwlpOp6cAGooZFpT/Cq3Ji23ajGAgdh rkGf+RpkzXvCNVvCOqaBZUrExcBdOp+KJ+Iw5L/SEYEIzgBYvja1UelIevxK9j3ByCKH l9l+5+xt9MJ1X3zNiw0QZM20/8OLjd5pKA9pdzBKL303GAKyPEY28p7KcLLsniJgIuTI SXecz6K1HcV/2IivITXKKqhGGTZ24uHOVMNkQeDtW8LCSbulGgYBnUYkkjq1Y26bbuGo zwtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=W1D/MEfUhSEa3XTHqFvBgWQajeIbOAyb9UpTSoQiQqw=; fh=QpfXcl1MWRNwK/PrSFDaf8vyLNOqSjtq+qtJ/l97qlo=; b=s688JgJe0Y+KUxT/N7zd9Ow5cuaJJniNDXBt23PFsUeYIniGq5XSi3TDfRi9Px8j/F L5NaiH4i2v8LH2KN9pNUnrBQzG2gQPq1LDbDGuPvX8Y6noBXTLCKy8L6IlSWe47Wwb66 AhqTuyZfGiGXuuSInJQSZ70/xVBBvAFRgQL+bexUToJEdhRqx/V9eaxqd5LQaXTZ2YaR VcipBoWu8kVz83p3E1ZmTYHMZol4gAG0kFkyloMUtUlWGRYxAiJ9rneAPxP/tJtlCj9d C3qugb78ZsMWI8jucsZPzu6HGrHoA4+SRzlCdrGRmWLOJCrkkTulJu1goQSCA2IyAkDJ klig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-140623-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e11-20020a056402190b00b0056e2e8a7b1bsi832957edz.599.2024.04.11.07.17.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 07:17:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140623-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-140623-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140623-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DC4A61F22D37 for ; Thu, 11 Apr 2024 14:17:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C6D814F10D; Thu, 11 Apr 2024 14:16:40 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 968B714D43D for ; Thu, 11 Apr 2024 14:16:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712844999; cv=none; b=OHZ0r8UStsc/cfU83YKwYUCeFcFZMeJeXv5AdCtlLIpU2SeCHYR+/9NPCv/lrf1BS2mUSA9MuJYMxlEcg9yyFaHBvPUOg5aSX2UiLyiZPwNRUK6OkNjyYf1/LfIbYokqeMkukW+AmH6QL6sfx8a+9W4XzTMkNU8dch9QxFYrh5A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712844999; c=relaxed/simple; bh=zSAbjkFKCDta7vFkL6hXmhKpRKDYpI1+zNkB0vTle5U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jiEgxy5OAExyMFi/fYQTz1ECw9vV6z41SLVt8419eGZD7hQxSvOYnhh5UOYqm9oF0FPKrbce30bGXNDIhCyurdhqOfVbJCNk+eGOi8c1YkLDDQycSwJyotN938L66Q1IWQbjYDT5ZUsDO6vZdOgzrkXCSpFFPUecwURR6sdmva8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 98367339; Thu, 11 Apr 2024 07:17:07 -0700 (PDT) Received: from e133380.arm.com (e133380.arm.com [10.1.197.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 47C193F64C; Thu, 11 Apr 2024 07:16:35 -0700 (PDT) Date: Thu, 11 Apr 2024 15:16:32 +0100 From: Dave Martin To: Reinette Chatre Cc: James Morse , x86@kernel.org, linux-kernel@vger.kernel.org, Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie Subject: Re: [PATCH v1 16/31] x86/resctrl: Change mon_event_config_{read,write}() to be arch helpers Message-ID: References: <20240321165106.31602-1-james.morse@arm.com> <20240321165106.31602-17-james.morse@arm.com> <8bc4cc50-ca1d-404b-9cb2-db31c89fbb13@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8bc4cc50-ca1d-404b-9cb2-db31c89fbb13@intel.com> On Mon, Apr 08, 2024 at 08:20:41PM -0700, Reinette Chatre wrote: > Hi James, > > On 3/21/2024 9:50 AM, James Morse wrote: > > mon_event_config_{read,write}() are called via IPI and access model > > specific registers to do their work. > > > > To support another architecture, this needs abstracting. > > > > Rename mon_event_config_{read,write}() to have a resctrl_arch_ prefix, > > and move their struct mon_config_info parameter into the restrl_types > > Looks like this change is actually moving the struct into include/linux/resctrl.h, > not resctrl_types.h. Noted. > > > header. This allows another architecture to supply an implementation > > of these. > > > > As struct mon_config_info is now exposed globally, give it a 'resctrl_' > > prefix. MPAM systems need access to the domain to do this work, add > > the resource and domain to struct resctrl_mon_config_info. > > > > Signed-off-by: James Morse > > .. > > > diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h > > index bfc63e8219e5..975b80102fbe 100644 > > --- a/include/linux/resctrl.h > > +++ b/include/linux/resctrl.h > > @@ -192,6 +192,13 @@ struct resctrl_cpu_sync { > > u32 rmid; > > }; > > > > +struct resctrl_mon_config_info { > > + struct rdt_resource *r; > > + struct rdt_domain *d; > > + u32 evtid; > > + u32 mon_config; > > +}; > > + > > Please use tabs consistently in this file. > > Reinette > Noted; I have presumed that you mean tabs-only indentation before the member declarator, and to line up the declarators (including the *), e.g.: struct resctrl_mon_config_info { struct rdt_resource *r; struct rdt_domain *d; u32 evtid; u32 mon_config; }; (But if that's not what you meant, please shout!) Cheers ---Dave