Re: [PATCH v2 01/24] x86/resctrl: Split struct rdt_resource

2021-04-08 Thread James Morse
Hi Reinette, On 07/04/2021 00:42, Reinette Chatre wrote: > On 4/6/2021 10:13 AM, James Morse wrote: >> On 31/03/2021 22:35, Reinette Chatre wrote: >>> On 3/12/2021 9:58 AM, James Morse wrote: >>>> resctrl is the defacto Linux ABI for SoC resource partitio

Re: [PATCH v2 02/24] x86/resctrl: Split struct rdt_domain

2021-04-08 Thread James Morse
Hi Reinette, On 31/03/2021 22:36, Reinette Chatre wrote: > On 3/12/2021 9:58 AM, James Morse wrote: >> resctrl is the defacto Linux ABI for SoC resource partitioning features. >> To support it on another architecture, it needs to be abstracted from >> the features provided

Re: [PATCH v2 00/24] x86/resctrl: Merge the CDP resources

2021-04-08 Thread James Morse
Hi Babu, On 06/04/2021 22:37, Babu Moger wrote: > On 4/6/21 12:19 PM, James Morse wrote: >> On 30/03/2021 21:36, Babu Moger wrote: >>> On 3/12/21 11:58 AM, James Morse wrote: >>>> This series re-folds the resctrl code so the CDP resources (L3CODE et al) &

Re: [PATCH v2 00/24] x86/resctrl: Merge the CDP resources

2021-04-06 Thread James Morse
Hi Babu, On 30/03/2021 21:36, Babu Moger wrote: > On 3/12/21 11:58 AM, James Morse wrote: >> This series re-folds the resctrl code so the CDP resources (L3CODE et al) >> behaviour is all contained in the filesystem parts, with a minimum amount >> of arch specific code. &g

Re: [PATCH v2 01/24] x86/resctrl: Split struct rdt_resource

2021-04-06 Thread James Morse
Hi Reinette, On 31/03/2021 22:35, Reinette Chatre wrote: > On 3/12/2021 9:58 AM, James Morse wrote: >> resctrl is the defacto Linux ABI for SoC resource partitioning features. >> To support it on another architecture, it needs to be abstracted from >> the features provided

[PATCH v2 24/24] x86/resctrl: Merge the CDP resources

2021-03-12 Thread James Morse
-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * rdt_get_cdp_config() is kept for its comment. --- arch/x86/kernel/cpu/resctrl/core.c | 174 ++--- arch/x86/kernel/cpu/resctrl/internal.h | 4 - arch/x86/kernel/cpu/resctrl/rdtgroup.c | 122

[PATCH v2 23/24] x86/resctrl: Remove rdt_cdp_peer_get()

2021-03-12 Thread James Morse
configuration type if cdp is enabled. Reviewed-by: Jamie Iles Signed-off-by: James Morse Changes since v1: * Expanded commit mesasge. --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 99 -- 1 file changed, 14 insertions(+), 85 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl

[PATCH v2 22/24] x86/resctrl: Merge the ctrl_val arrays

2021-03-12 Thread James Morse
allocating and freeing the ctrl_val arrays. Add a helper to allocate the ctrl_val array, that returns the value on the L2 or L3 resource if it already exists. This gets removed once the resources are merged, and there really is only one ctrl_val array. Reviewed-by: Jamie Iles Signed-off-by: James

[PATCH v2 21/24] x86/resctrl: Calculate the index from the configuration type

2021-03-12 Thread James Morse
on the staged configuration type. This makes the static mult and offset parameters redundant. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 12 arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 17 +++-- include/linux

[PATCH v2 20/24] x86/resctrl: Apply offset correction when config is staged

2021-03-12 Thread James Morse
on the changes it has made to the ctrl_val array as this allows the hardware to be updated once for a set of changes. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Removing the patch that moved the closid to the staged config means the min/max and return from

[PATCH v2 19/24] x86/resctrl: Make ctrlval arrays the same size

2021-03-12 Thread James Morse
of this is that the caches are reset twice, once for CODE once for DATA. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c | 10 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 9 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git

[PATCH v2 18/24] x86/resctrl: Pass configuration type to resctrl_arch_get_config()

2021-03-12 Thread James Morse
to the index in the configuration array. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 5 ++-- arch/x86/kernel/cpu/resctrl/monitor.c | 2 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 35 +++ include/linux/resctrl.h

[PATCH v2 16/24] x86/resctrl: Add a helper to read/set the CDP configuration

2021-03-12 Thread James Morse
resource means it is enable for all resources, as all resources would need to configure both interpretations of the closid value. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Added prototype for resctrl_arch_set_cdp_enabled() * s/Currently/Previously

[PATCH v2 12/24] x86/resctrl: Group staged configuration into a separate struct

2021-03-12 Thread James Morse
truct need to be specified per type configuration, and there can be one configuration of each type staged. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Expanded commit message * Removed explicit clearing of have_new_ctrl, * Moved ARRAY_SIZE() trickery to a later patch

[PATCH v2 17/24] x86/resctrl: Use cdp_enabled in rdt_domain_reconfigure_cdp()

2021-03-12 Thread James Morse
rdt_domain_reconfigure_cdp() infers whether CDP is enabled by checking the alloc_capable and alloc_enabled flags of the data resources. Now that we have an explicit cdp_enabled, use that. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 8

[PATCH v2 13/24] x86/resctrl: Allow different CODE/DATA configurations to be staged

2021-03-12 Thread James Morse
in the staged_configuration array must be used for each schema. Use the conf_type enum directly as an index. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Renamed max enum value CDP_NUM_TYPES * Whitespace and parenthesis * Missing word in the commit message --- arch/x86

[PATCH v2 14/24] x86/resctrl: Rename update_domains() resctrl_arch_update_domains()

2021-03-12 Thread James Morse
update_domains() merges the staged configuration changes into the arch codes configuration array. Rename to make it clear its part of the arch code interface to resctrl. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * The closid is no longer staged as from resctrl

[PATCH v2 15/24] x86/resctrl: Add a helper to read a closid's configuration

2021-03-12 Thread James Morse
format at all. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 16 ++--- arch/x86/kernel/cpu/resctrl/monitor.c | 6 +++- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 43 ++- include/linux/resctrl.h | 2

[PATCH v2 10/24] x86/resctrl: Swizzle rdt_resource and resctrl_schema in pseudo_lock_region

2021-03-12 Thread James Morse
-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ++-- arch/x86/kernel/cpu/resctrl/internal.h| 6 +++--- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 8 arch/x86/kernel/cpu/resctrl/rdtgroup.c| 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff

[PATCH v2 09/24] x86/resctrl: Pass the schema to resctrl filesystem functions

2021-03-12 Thread James Morse
-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * split from a larger patch --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 23 +-- arch/x86/kernel/cpu/resctrl/internal.h| 6 +++--- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 19

[PATCH v2 11/24] x86/resctrl: Move the schemata names into struct resctrl_schema

2021-03-12 Thread James Morse
will generate two names for one resource. The filesystem code should calculate max_name_width for padding the schemata file, move this to live with the code that will generate the names. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1; * Don't hardcode max_name_width

[PATCH v2 08/24] x86/resctrl: Add resctrl_arch_get_num_closid()

2021-03-12 Thread James Morse
off-by: James Morse --- Changes since v1: * Rewrote commit message * Whitespace fixes * num_closid becomes u32 in all occurences to reduce surprises --- arch/x86/kernel/cpu/resctrl/core.c | 5 + arch/x86/kernel/cpu/resctrl/internal.h | 2 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 ++-- incl

[PATCH v2 06/24] x86/resctrl: Walk the resctrl schema list instead of an arch list

2021-03-12 Thread James Morse
' helper. After the filesystem code is moved, rdtgroup_pseudo_locked_in_hierarchy() remains part of the x86 specific hooks to support psuedo lock. This code walks each domain, and still does this after the separate resources are merged. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes

[PATCH v2 03/24] x86/resctrl: Add a separate schema list for resctrl

2021-03-12 Thread James Morse
and type of configuration values for resctrl. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Renamed resctrl_all_schema list * Used schemata_list as a prefix to make these easier to search for * Added kerneldoc string * Removed 'pending configuration' reference

[PATCH v2 07/24] x86/resctrl: Store the effective num_closid in the schema

2021-03-12 Thread James Morse
() These are changed to use the schema value instead. schemata_list_create() sets this value, and reaches into the architecture specific structure to get the value. This will eventually be replaced with a helper. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Added missing

[PATCH v2 05/24] x86/resctrl: Label the resources with their configuration type

2021-03-12 Thread James Morse
resctrl_schema. Copying the value ensures there is no mismatch, but allows the filesystem parts of resctrl to be modified to use the schema. Once the resources are merged, the filesystem code can assign this value based on the schema being created. Reviewed-by: Jamie Iles Signed-off-by: James Morse

[PATCH v2 04/24] x86/resctrl: Pass the schema in info dir's private pointer

2021-03-12 Thread James Morse
means the type of the private pointers varies between control and monitor info dirs. If the flags are RF_MON_INFO, its a struct rdt_resource. If the flags are RF_CTRL_INFO, its a struct resctrl_schema. Nothing in res_common_files[] has both flags. Reviewed-by: Jamie Iles Signed-off-by: James Morse

[PATCH v2 02/24] x86/resctrl: Split struct rdt_domain

2021-03-12 Thread James Morse
into a new header file. resctrl code paths touching a 'hw' struct indicates where an abstraction is needed. Splitting this structure only moves types around, and should not lead to any change in behaviour. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Tabs space

[PATCH v2 01/24] x86/resctrl: Split struct rdt_resource

2021-03-12 Thread James Morse
moves types around, and should not lead to any change in behaviour. Splitting rdt_domain up in a similar way happens in the next patch. Reviewed-by: Jamie Iles Signed-off-by: James Morse --- Changes since v1: * Tabs space and other whitespace * Restored for_each_rdt_resource() calls in arch code

[PATCH v2 00/24] x86/resctrl: Merge the CDP resources

2021-03-12 Thread James Morse
Thanks, James Morse (24): x86/resctrl: Split struct rdt_resource x86/resctrl: Split struct rdt_domain x86/resctrl: Add a separate schema list for resctrl x86/resctrl: Pass the schema in info dir's private pointer x86/resctrl: Label the resources with their configuration type x86/resctrl

Re: [PATCH 12/24] x86/resctrl: Add closid to the staged config

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 23:46, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Once the L2/L2CODE/L2DATA resources are merged, there may be two >> configurations staged for one resource when CDP is enabled. The >> closid should always be

Re: [PATCH 11/24] x86/resctrl: Group staged configuration into a separate struct

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 23:28, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Arm's MPAM may have surprisingly large bitmaps for its cache >> portions as the architecture allows up to 4K portions. The size >> exposed via resctrl may not be the s

Re: [PATCH 10/24] x86/resctrl: Move the schema names into struct resctrl_schema

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 23:11, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Move the names used for the schemata file out of the resource and >> into struct resctrl_schema. This allows one resource to have two >> different names, based on the ot

Re: [PATCH 08/24] x86/resctrl: Walk the resctrl schema list instead of an arch list

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 22:52, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Now that resctrl has its own list of resources it is using, walk that >> list instead of the architectures list. This means resctrl has somewhere >> to keep schema propert

Re: [PATCH 07/24] x86/resctrl: Label the resources with their configuration type

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 22:30, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Before the name for the schema can be generated, the type of the >> configuration being applied to the resource needs to be known. Label >> all the entries in rdt_reso

Re: [PATCH 06/24] x86/resctrl: Store the effective num_closid in the schema

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 22:04, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> resctrl_schema holds properties that vary with the style of configuration >> that resctrl applies to a resource. >> >> Once the arch code has a single resource per c

Re: [PATCH 05/24] x86/resctrl: Pass the schema in resdir's private pointer

2021-03-12 Thread James Morse
changed to "info dir"? Sure, > On 10/30/2020 9:11 AM, James Morse wrote: >> Moving properties that resctrl exposes to user-space into the core >> 'fs' code, (e.g. the name of the schema), means some of the functions >> that back the filesystem need the schema str

Re: [PATCH 04/24] x86/resctrl: Add a separate schema list for resctrl

2021-03-12 Thread James Morse
Hi Reinette On 17/11/2020 21:29, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> To support multiple architectures, the resctrl code needs to be split >> into a 'fs' specific part in core code, and an arch-specific backend. >> >> It should be diff

Re: [PATCH 01/24] x86/resctrl: Split struct rdt_resource

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 19:20, Reinette Chatre wrote: > On 10/30/2020 9:10 AM, James Morse wrote: >> Splitting rdt_domain up in a similar way happens in the next patch. >> No change in behaviour, this patch just moves types around. > > Please remove the "this p

Re: [PATCH 03/24] x86/resctrl: Add resctrl_arch_get_num_closid()

2021-03-12 Thread James Morse
Hi Reinette, On 17/11/2020 19:57, Reinette Chatre wrote: > On 10/30/2020 9:10 AM, James Morse wrote: >> resctrl chooses whether to enable CDP, once it does, half the number >> of closid are available. MPAM doesn't behave like this, an in-kernel user >> of MPAM could be 'usi

Re: How can a userspace program tell if the system supports the ACPI S4 state (Suspend-to-Disk)?

2021-02-09 Thread James Morse
Hi Dexuan, On 05/02/2021 19:36, Dexuan Cui wrote: >> From: Rafael J. Wysocki >> Sent: Friday, February 5, 2021 5:06 AM >> To: Dexuan Cui >> Cc: linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org; >> linux-hyp...@vger.kernel.org; Michael Kelley >> Subject: Re: How can a userspace program

Re: [PATCH v11 0/6] arm64: MMU enabled kexec relocation

2021-02-01 Thread James Morse
Hi Pavel, On 27/01/2021 17:27, Pavel Tatashin wrote: > Enable MMU during kexec relocation in order to improve reboot performance. > > If kexec functionality is used for a fast system update, with a minimal > downtime, the relocation of kernel + initramfs takes a significant portion > of reboot.

Re: [PATCH 2/3] x86/resctrl: Update PQR_ASSOC MSR synchronously when moving task to resource group

2020-12-09 Thread James Morse
e same way used to update the register when tasks are moved as > part of resource group removal. (as t->on_cpu is already used...) Reviewed-by: James Morse > diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c > b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > index 68db7d

Re: [PATCH 1/3] x86/resctrl: Move setting task's active CPU in a mask into helpers

2020-12-09 Thread James Morse
Hi Reinette, Fenghua, On 03/12/2020 23:25, Reinette Chatre wrote: > From: Fenghua Yu > > The code of setting the CPU on which a task is running in a CPU mask is > moved into a couple of helpers. The new helper task_on_cpu() will be > reused shortly. > diff --git

Re: [PATCH v4 2/2] arm64: kvm: Introduce MTE VCPU feature

2020-11-25 Thread James Morse
Hi Steven, Catalin, On 18/11/2020 16:01, Steven Price wrote: > On 17/11/2020 16:07, Catalin Marinas wrote: >> On Mon, Oct 26, 2020 at 03:57:27PM +, Steven Price wrote: >>> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c >>> index 19aacc7d64de..38fe25310ca1 100644 >>> ---

Re: [PATCH 1/2] x86/intel_rdt: Check monitor group vs control group membership earlier

2020-11-20 Thread James Morse
's needed to do the kfree()) > Check the validity of the move before getting anywhere near task_work > callbacks. This saves the kzalloc()/task_work_add() if it wasn't going to be necessary. Reviewed-by: James Morse Thanks, James

Re: [PATCH 2/2] x86/intel_rdt: Plug task_work vs task_struct {rmid,closid} update race

2020-11-20 Thread James Morse
ther CPU. It might get torn values, or multiple-reads get different values. The READ_ONCE/WRITE_ONCEry would have been easier to read as a separate patch as you touch all sites, and move/change some of them. Regardless: Reviewed-by: James Morse I don't 'get' memory-ordering, so one curiosity belo

Re: [PATCH] arm64: kexec: Use smp_send_stop in machine_shutdown

2020-11-19 Thread James Morse
Hi Henry, On 16/11/2020 21:11, Henry Willard wrote: > On 11/11/20 10:11 AM, James Morse wrote: >> On 06/11/2020 23:25, Henry Willard wrote: >>> machine_shutdown() is called by kernel_kexec() to shutdown >>> the non-boot CPUs prior to starting the new ker

Re: [PATCH v6 1/7] arm64: mm: Move reserve_crashkernel() into mem_init()

2020-11-19 Thread James Morse
Hi, (sorry for the late response) On 06/11/2020 18:46, Nicolas Saenz Julienne wrote: > On Thu, 2020-11-05 at 16:11 +0000, James Morse wrote:>> We also depend on > this when skipping the checksum code in purgatory, which can be >> exceedingly slow. > > This one I don't f

Re: [PATCH 00/24] x86/resctrl: Merge the CDP resources

2020-11-17 Thread James Morse
Hi Reinette, On 16/11/2020 17:54, Reinette Chatre wrote: > On 10/30/2020 9:10 AM, James Morse wrote: >> MPAM has an equivalent feature to CDP, but its a property of the CPU, >> not the cache. Resctrl needs to have x86's odd/even behaviour, as that >> its the ABI, but th

Re: [PATCH] arm64: kexec: Use smp_send_stop in machine_shutdown

2020-11-11 Thread James Morse
Hi Henry, On 06/11/2020 23:25, Henry Willard wrote: > machine_shutdown() is called by kernel_kexec() to shutdown > the non-boot CPUs prior to starting the new kernel. The > implementation of machine_shutdown() varies by architecture. > Many make an interprocessor call, such as smp_send_stop(), >

Re: [PATCH 10/24] x86/resctrl: Move the schema names into struct resctrl_schema

2020-11-11 Thread James Morse
Hi Jamie, Thanks for taking a look, On 10/11/2020 11:39, Jamie Iles wrote: > On Fri, Oct 30, 2020 at 04:11:06PM +0000, James Morse wrote: >> Move the names used for the schemata file out of the resource and >> into struct resctrl_schema. This allows one resource to have two >

Re: [RFC PATCH 1/4] ACPI: PPTT: Fix for a high level cache node detected in the low level

2020-11-06 Thread James Morse
Hi Shiju, Jonathan, On 05/11/2020 17:42, Shiju Jose wrote: > From: Jonathan Cameron > > According to the following sections of the PPTT definition in the > ACPI specification(V6.3), a high level cache node( For example L2 cache) > could be represented simultaneously both in the private resource

Re: [RFC PATCH 0/4] EDAC/ghes: Add EDAC device for recording the CPU error count

2020-11-06 Thread James Morse
Hi Shiju, On 05/11/2020 17:42, Shiju Jose wrote: > For the firmware-first error handling on ARM64 hardware platforms, > CPU cache corrected error count is not recorded. > Create an CPU EDAC device and device blocks for the CPU caches > for this purpose. The EDAC device blocks are created based

Re: [PATCH v6 1/7] arm64: mm: Move reserve_crashkernel() into mem_init()

2020-11-05 Thread James Morse
Hi! On 03/11/2020 17:31, Nicolas Saenz Julienne wrote: > crashkernel might reserve memory located in ZONE_DMA. We plan to delay > ZONE_DMA's initialization after unflattening the devicetree and ACPI's > boot table initialization, so move it later in the boot process. > Specifically into

[PATCH 23/24] x86/resctrl: Remove rdt_cdp_peer_get()

2020-10-30 Thread James Morse
. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 99 -- 1 file changed, 14 insertions(+), 85 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index 162e415d5d09..0d561679f7e8 100644 --- a/arch

[PATCH 16/24] x86/resctrl: Add a helper to read/set the CDP configuration

2020-10-30 Thread James Morse
configuration. Enabling CDP for one resource means all resources see the different closid values. Signed-off-by: James Morse --- It may be possible for MPAM to apply the same 'L3' configuration to the two closid that are in use, giving the illusion that CDP is enabled for some resources, but disabled

[PATCH 18/24] x86/resctrl: Pass configuration type to resctrl_arch_get_config()

2020-10-30 Thread James Morse
to the index in the configuration array. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 5 ++-- arch/x86/kernel/cpu/resctrl/monitor.c | 2 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 35 +++ include/linux/resctrl.h | 3 +- 4 files

[PATCH 13/24] x86/resctrl: Allow different CODE/DATA configurations to be staged

2020-10-30 Thread James Morse
for each schema. Use the conf_type enum directly as an index. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 16 ++-- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 5 +++-- include/linux/resctrl.h | 4 +++- 3 files changed, 16 insertions

[PATCH 15/24] x86/resctrl: Add a helper to read a closid's configuration

2020-10-30 Thread James Morse
at all. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 16 ++--- arch/x86/kernel/cpu/resctrl/monitor.c | 6 +++- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 43 ++- include/linux/resctrl.h | 2 ++ 4 files changed, 37

[PATCH 09/24] x86/resctrl: Change rdt_resource to resctrl_schema in pseudo_lock_region

2020-10-30 Thread James Morse
struct pseudo_lock_region points to the rdt_resource. Once the resources are merged, this won't be unique. The resource name is moving into the schema, so that eventually resctrl can generate it. Change pseudo_lock_region's rdt_resource pointer for a schema pointer. Signed-off-by: James Morse

[PATCH 21/24] x86/resctrl: Calculate the index from the configuration type

2020-10-30 Thread James Morse
configuration type. This makes the static mult and offset parameters set by the arch code redundant. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 12 arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 17 +++-- include/linux/resctrl.h

[PATCH 20/24] x86/resctrl: Apply offset correction when config is staged

2020-10-30 Thread James Morse
into apply_config() so that odd/even slots in the ctrlval array are used. This makes it possible to merge the resources. In future, the arithmetic will be based on the style of the configuration, not the resource. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 15

[PATCH 10/24] x86/resctrl: Move the schema names into struct resctrl_schema

2020-10-30 Thread James Morse
, this is now resctrl's problem. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 9 ++--- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 10 +++--- arch/x86/kernel/cpu/resctrl/internal.h| 2 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 17

[PATCH 14/24] x86/resctrl: Make update_domains() learn the affected closids

2020-10-30 Thread James Morse
array, and updates the hardware, make it part of the arch code interface. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 40 +-- arch/x86/kernel/cpu/resctrl/internal.h| 6 ++-- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 2 +- include/linux

[PATCH 12/24] x86/resctrl: Add closid to the staged config

2020-10-30 Thread James Morse
the closid from the same place, so they pair up. Move the closid to be a staged parameter. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 10 ++ arch/x86/kernel/cpu/resctrl/rdtgroup.c| 6 -- include/linux/resctrl.h | 2 ++ 3 files

[PATCH 17/24] x86/resctrl: Use cdp_enabled in rdt_domain_reconfigure_cdp()

2020-10-30 Thread James Morse
rdt_domain_reconfigure_cdp() infers whether CDP is enabled by checking the alloc_capable and alloc_enabled flags of the data resources. Now that there is an explicit cdp_enabled, use that. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 8 +--- 1 file changed, 5

[PATCH 11/24] x86/resctrl: Group staged configuration into a separate struct

2020-10-30 Thread James Morse
element in the array, but eventually resctrl will use the array slots for CODE/DATA/BOTH to detect a duplicate schema being written. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 49 --- arch/x86/kernel/cpu/resctrl/rdtgroup.c| 22

[PATCH 22/24] x86/resctrl: Merge the ctrlval arrays

2020-10-30 Thread James Morse
on the L2 or L3 resource if it already exists. This gets removed once the resources are merged, and there really is only one ctrlval array. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c | 79 +++--- 1 file changed, 72 insertions(+), 7 deletions(-) diff

[PATCH 24/24] x86/resctrl: Merge the CDP resources

2020-10-30 Thread James Morse
, which will then create the separate CODE/DATA schema for its ABI. Add a helper to add schema with a the CDP suffix if CDP is enabled. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c | 193 ++--- arch/x86/kernel/cpu/resctrl/internal.h | 4 - arch/x86/kernel

[PATCH 19/24] x86/resctrl: Make ctrlval arrays the same size

2020-10-30 Thread James Morse
of this is that the caches are reset twice, once for CODE once for DATA. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c | 10 +- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 10 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu

[PATCH 07/24] x86/resctrl: Label the resources with their configuration type

2020-10-30 Thread James Morse
the fs code. Eventually the fs code will generate pairs of CODE/DATA if the platform supports CDP for this resource. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c | 7 +++ arch/x86/kernel/cpu/resctrl/internal.h | 1 + arch/x86/kernel/cpu/resctrl/rdtgroup.c | 1 + include

[PATCH 03/24] x86/resctrl: Add resctrl_arch_get_num_closid()

2020-10-30 Thread James Morse
ady adjusted for CDP. Once the CODE/DATA/BOTH resources are merged, resctrl can make the adjustment when copying the value to the schema's num_closid. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 5 + arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 9 +++-- arch/

[PATCH 06/24] x86/resctrl: Store the effective num_closid in the schema

2020-10-30 Thread James Morse
rdtgroup_schemata_show() to walk the schema instead. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 13 - arch/x86/kernel/cpu/resctrl/rdtgroup.c| 11 +-- include/linux/resctrl.h | 2 ++ 3 files changed, 15 insertions(+), 11

[PATCH 02/24] x86/resctrl: Split struct rdt_domain

2020-10-30 Thread James Morse
paths touching a 'hw' struct indicates where an abstraction is needed. No change in behaviour, this patch just moves types around. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 32 +++--- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 10 -- arch/x86

[PATCH 08/24] x86/resctrl: Walk the resctrl schema list instead of an arch list

2020-10-30 Thread James Morse
property, like the conf_type. Switch these to walk the schema list. Schema were only created for alloc_enabled resources so these two lists are currently equivalent. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 38 ++- arch/x86/kernel/cpu/resctrl

[PATCH 05/24] x86/resctrl: Pass the schema in resdir's private pointer

2020-10-30 Thread James Morse
varies between control and monitor info dirs. If the flags are RF_MON_INFO, its a struct rdt_resource. If the flags are RF_CTRL_INFO, its a struct resctrl_schema. Nothing in res_common_files[] has both flags. Signed-off-by: James Morse --- Fake schema for monitors may simplify this if anyone

[PATCH 01/24] x86/resctrl: Split struct rdt_resource

2020-10-30 Thread James Morse
patch. No change in behaviour, this patch just moves types around. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/core.c| 258 -- arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 14 +- arch/x86/kernel/cpu/resctrl/internal.h| 138 +++- arch/x86

[PATCH 04/24] x86/resctrl: Add a separate schema list for resctrl

2020-10-30 Thread James Morse
and pending configuration values for resctrl. Signed-off-by: James Morse --- arch/x86/kernel/cpu/resctrl/internal.h | 1 + arch/x86/kernel/cpu/resctrl/rdtgroup.c | 43 +- include/linux/resctrl.h| 9 ++ 3 files changed, 52 insertions(+), 1 deletion

[PATCH 00/24] x86/resctrl: Merge the CDP resources

2020-10-30 Thread James Morse
Thanks, James Morse (24): x86/resctrl: Split struct rdt_resource x86/resctrl: Split struct rdt_domain x86/resctrl: Add resctrl_arch_get_num_closid() x86/resctrl: Add a separate schema list for resctrl x86/resctrl: Pass the schema in resdir's private pointer x86/resctrl: Store the eff

Re: Queries on ARM SDEI Linux kernel code

2020-10-30 Thread James Morse
Hi Neeraj, On 21/10/2020 18:31, Neeraj Upadhyay wrote: > On 10/16/2020 9:57 PM, James Morse wrote: >> On 15/10/2020 07:07, Neeraj Upadhyay wrote: >>> 1. Looks like interrupt bind interface (SDEI_1_0_FN_SDEI_INTERRUPT_BIND) is >>> not available >>> for

Re: Queries on ARM SDEI Linux kernel code

2020-10-16 Thread James Morse
Hi Neeraj, On 15/10/2020 07:07, Neeraj Upadhyay wrote: > 1. Looks like interrupt bind interface (SDEI_1_0_FN_SDEI_INTERRUPT_BIND) is > not available > for clients to use; can you please share information on > why it is not provided? There is no compelling use-case for it, and its very complex

Re: [RFC PATCH 0/7] RAS/CEC: Extend CEC for errors count check on short time period

2020-10-07 Thread James Morse
Hi Shiju, On 06/10/2020 17:13, Shiju Jose wrote: [...] > Please find following pseudo code we added for the kernel side to make sure > we correctly understand your suggestions. > > 1. Create edac device and edac device sysfs entries for the online CPU caches. > /drivers/edac/edac_device.c >

Re: [PATCH 2/2] arm64: Add support for SMCCC TRNG firmware interface

2020-10-07 Thread James Morse
Hi Andre, On 06/10/2020 21:18, Andre Przywara wrote: > The ARM architected TRNG firmware interface, described in ARM spec > DEN0098[1], defines an ARM SMCCC based interface to a true random number > generator, provided by firmware. > This can be discovered via the SMCCC >=v1.1 interface, and

Re: [RFC PATCH 0/7] RAS/CEC: Extend CEC for errors count check on short time period

2020-10-02 Thread James Morse
rmal looks like? I can't see how a reasonable prediction can be made from just one machine's behaviour since boot. These are corrected errors, nothing has gone wrong. >> Open question from James with my reply to it: >> >> On Thu, Oct 01, 2020 at 06:16:03PM +0100, James Morse wr

Re: [PATCH 1/1] RAS: Add CPU Correctable Error Collector to isolate an erroneous CPU core

2020-10-01 Thread James Morse
Hi guys, On 17/09/2020 09:40, Borislav Petkov wrote: > On Thu, Sep 10, 2020 at 03:29:56PM +, Shiju Jose wrote: > You can't know what exactly you wanna do if you don't have a use case > you're trying to address. > >> According to the ARM Processor CPER definition the error types >> reported

Re: [PATCH v3] ACPI / APEI: do memory failure on the physical address reported by ARM processor error section

2020-10-01 Thread James Morse
Hi Tanxiaofei, (sorry for the late reply) On 28/09/2020 03:02, Xiaofei Tan wrote: > After the commit 8fcc4ae6faf8 ("arm64: acpi: Make apei_claim_sea() > synchronise with APEI's irq work") applied, do_sea() return directly > for user-mode if apei_claim_sea() handled any error record. Therefore, >

Re: [PATCH v3 08/16] irqchip/gic: Configure SGIs as standard interrupts

2020-09-18 Thread James Morse
Hi Marc, (CC: +Jon) On 01/09/2020 15:43, Marc Zyngier wrote: > Change the way we deal with GIC SGIs by turning them into proper > IRQs, and calling into the arch code to register the interrupt range > instead of a callback. Your comment "This only works because we don't nest SGIs..." on this

Re: [PATCH] arm64: traps: clean up arm64_ras_serror_get_severity()

2020-08-25 Thread James Morse
Hi Zhang, On 12/08/2020 12:09, Liguang Zhang wrote: > Function arm64_is_fatal_ras_serror() is always called after > arm64_is_ras_serror(), so we should remove some needless > arm64_is_ras_serror() call in function arm64_ras_serror_get_severity(). > diff --git a/arch/arm64/include/asm/traps.h

Re: [EXT] Re: [PATCH] edac: nxp: Add L1 and L2 error detection for A53 and A72 cores

2020-08-25 Thread James Morse
Hi Alison, On 25/08/2020 03:31, Alison Wang wrote: >> On 09/07/2020 09:22, Alison Wang wrote: >>> Add error detection for A53 and A72 cores. Hardware error injection is >>> supported on A53. Software error injection is supported on both. >> > >> >> As we can't safely write to these registers

Re: [PATCH] edac: nxp: Add L1 and L2 error detection for A53 and A72 cores

2020-08-21 Thread James Morse
Hi Alison, On 09/07/2020 09:22, Alison Wang wrote: > Add error detection for A53 and A72 cores. Hardware error injection is > supported on A53. Software error injection is supported on both. > For hardware error injection on A53 to work, proper access to > L2ACTLR_EL1, CPUACTLR_EL1 needs to be

[tip: x86/cache] x86/resctrl: Merge AMD/Intel parse_bw() calls

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: 5df3ca9334d5603e4afbb95953d0affb37dcf86b Gitweb: https://git.kernel.org/tip/5df3ca9334d5603e4afbb95953d0affb37dcf86b Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:27 Committer

[tip: x86/cache] cacheinfo: Move resctrl's get_cache_id() to the cacheinfo header file

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: 709c4362725abb5fa1e36fd94893a9b0d049df82 Gitweb: https://git.kernel.org/tip/709c4362725abb5fa1e36fd94893a9b0d049df82 Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:29 Committer

[tip: x86/cache] x86/resctrl: Remove struct rdt_membw::max_delay

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: e89f85b9171665c917dca59920884f3d4fe0b1ef Gitweb: https://git.kernel.org/tip/e89f85b9171665c917dca59920884f3d4fe0b1ef Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:21 Committer

[tip: x86/cache] x86/resctrl: Use is_closid_match() in more places

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: e6b2fac36fcc0b73cbef063d700a9841850e37a0 Gitweb: https://git.kernel.org/tip/e6b2fac36fcc0b73cbef063d700a9841850e37a0 Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:25 Committer

[tip: x86/cache] x86/resctrl: Remove unused struct mbm_state::chunks_bw

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: abe8f12b44250d02937665033a8b750c1bfeb26e Gitweb: https://git.kernel.org/tip/abe8f12b44250d02937665033a8b750c1bfeb26e Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:20 Committer

[tip: x86/cache] x86/resctrl: Fix stale comment

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: ae0fbedd2a18cd82a2c0c5605a0a60865bc54576 Gitweb: https://git.kernel.org/tip/ae0fbedd2a18cd82a2c0c5605a0a60865bc54576 Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:22 Committer

[tip: x86/cache] x86/resctrl: Use container_of() in delayed_work handlers

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: f995801ba3a0660cb352c8beb794379c82781ca3 Gitweb: https://git.kernel.org/tip/f995801ba3a0660cb352c8beb794379c82781ca3 Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:23 Committer

[tip: x86/cache] x86/resctrl: Include pid.h

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: a21a4391f20c0ab45db452e22bc3e8afe8b36e46 Gitweb: https://git.kernel.org/tip/a21a4391f20c0ab45db452e22bc3e8afe8b36e46 Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:24 Committer

[tip: x86/cache] x86/resctrl: Add struct rdt_membw::arch_needs_linear to explain AMD/Intel MBA difference

2020-08-19 Thread tip-bot2 for James Morse
The following commit has been merged into the x86/cache branch of tip: Commit-ID: 41215b7947f1b1b86fd77a7bebd2320599aea7bd Gitweb: https://git.kernel.org/tip/41215b7947f1b1b86fd77a7bebd2320599aea7bd Author:James Morse AuthorDate:Wed, 08 Jul 2020 16:39:26 Committer

  1   2   3   4   5   6   7   8   9   10   >