From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C88771537A0 for ; Fri, 2 Aug 2024 17:22:34 +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=1722619357; cv=none; b=LNwagjfIKOv5heSCOz4dqTqBbwj1Zy/xd8MDrwYA7GSXDEUUEsh8G0lz8/dA3GTTtnK32b4pSWwf4eZ5TPB08ztgZBxp5aADnxTm3yiwczApZotvh1zJ2Wnk1tH/LzpvTqMzAJ8JjvaumvksLkz/iJJT9d6F8BUF/CDttBwoHyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722619357; c=relaxed/simple; bh=taiWfWuuFYQpiIfZvOQkFnmOLnlL4KSF7mBsvJ7oTJc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UpE2Mx6XIUqwEeo+cG3xxQdjI28CtzTZf4TYpTD0yOzn3Q2BNgn3RGupw0NrNwGDGxlx+pOT2A7j5k8YE7mhvTfJLhCY0KZv+RdHevygUqmdCgqxO0YeS5MLZVCh6JHu+sQHoKq4c58IpXcQFi8o75urFFH3WhMGkmaQUWTozUA= 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 C3CD31007; Fri, 2 Aug 2024 10:22:59 -0700 (PDT) Received: from [10.1.196.28] (eglon.cambridge.arm.com [10.1.196.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B25A3F64C; Fri, 2 Aug 2024 10:22:30 -0700 (PDT) Message-ID: Date: Fri, 2 Aug 2024 18:22:30 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 23/38] x86/resctrl: Allow an architecture to disable pseudo lock Content-Language: en-GB To: Carl Worth , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , 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 , Dave Martin , Shaopeng Tan References: <20240614150033.10454-1-james.morse@arm.com> <20240614150033.10454-24-james.morse@arm.com> <87frsfd362.fsf@rasp.cworth.amperemail.amperecomputing.com> From: James Morse In-Reply-To: <87frsfd362.fsf@rasp.cworth.amperemail.amperecomputing.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Carl, On 11/07/2024 22:33, Carl Worth wrote: > James Morse writes: >> diff --git a/arch/x86/kernel/cpu/resctrl/Makefile b/arch/x86/kernel/cpu/resctrl/Makefile >> index 4a06c37b9cf1..0c13b0befd8a 100644 >> --- a/arch/x86/kernel/cpu/resctrl/Makefile >> +++ b/arch/x86/kernel/cpu/resctrl/Makefile >> @@ -1,4 +1,5 @@ >> # SPDX-License-Identifier: GPL-2.0 >> -obj-$(CONFIG_X86_CPU_RESCTRL) += core.o rdtgroup.o monitor.o >> -obj-$(CONFIG_X86_CPU_RESCTRL) += ctrlmondata.o pseudo_lock.o >> +obj-$(CONFIG_X86_CPU_RESCTRL) += core.o rdtgroup.o monitor.o >> +obj-$(CONFIG_X86_CPU_RESCTRL) += ctrlmondata.o >> +obj-$(CONFIG_RESCTRL_FS_PSEUDO_LOCK) += pseudo_lock.o >> CFLAGS_pseudo_lock.o = -I$(src) > > Now that pseudo_lock.c is only conditionally compiled, the work it's > doing to define tracepoints, (that is, #define CREATE_TRACE_POINTS), > should be moved to monitor.c which is unconditionally compiled. > > And then, the CFLAGS line above should be adjusted to apply to > the compilation of monitor.c, that is: > > CFLAGS_monitor.o = -I$(src) > Without these changes, compiling without CONFIG_RESCTRL_FS_PSEUDO_LOCK > will fail due to undefined tracepoint functions. Thanks for catching this - I bashed my head against it for a while. I've split trace.h in two: monitor_trace.h and pseudo_lock_trace.h. When the code gets moved to /fs/ only one of those files moves. Thanks, James