RE: [PATCH v18 05/19] ACPI:RAS2: Add ACPI RAS2 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>-----Original Message-----
>From: Daniel Ferguson <danielf@xxxxxxxxxxxxxxxxxxxxxx>
>Sent: 21 January 2025 23:01
>To: Shiju Jose <shiju.jose@xxxxxxxxxx>; linux-edac@xxxxxxxxxxxxxxx; linux-
>cxl@xxxxxxxxxxxxxxx; linux-acpi@xxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx; linux-
>kernel@xxxxxxxxxxxxxxx
>Cc: bp@xxxxxxxxx; tony.luck@xxxxxxxxx; rafael@xxxxxxxxxx; lenb@xxxxxxxxxx;
>mchehab@xxxxxxxxxx; dan.j.williams@xxxxxxxxx; dave@xxxxxxxxxxxx; Jonathan
>Cameron <jonathan.cameron@xxxxxxxxxx>; dave.jiang@xxxxxxxxx;
>alison.schofield@xxxxxxxxx; vishal.l.verma@xxxxxxxxx; ira.weiny@xxxxxxxxx;
>david@xxxxxxxxxx; Vilas.Sridharan@xxxxxxx; leo.duran@xxxxxxx;
>Yazen.Ghannam@xxxxxxx; rientjes@xxxxxxxxxx; jiaqiyan@xxxxxxxxxx;
>Jon.Grimm@xxxxxxx; dave.hansen@xxxxxxxxxxxxxxx;
>naoya.horiguchi@xxxxxxx; james.morse@xxxxxxx; jthoughton@xxxxxxxxxx;
>somasundaram.a@xxxxxxx; erdemaktas@xxxxxxxxxx; pgonda@xxxxxxxxxx;
>duenwen@xxxxxxxxxx; gthelen@xxxxxxxxxx;
>wschwartz@xxxxxxxxxxxxxxxxxxx; dferguson@xxxxxxxxxxxxxxxxxxx;
>wbs@xxxxxxxxxxxxxxxxxxxxxx; nifan.cxl@xxxxxxxxx; tanxiaofei
><tanxiaofei@xxxxxxxxxx>; Zengtao (B) <prime.zeng@xxxxxxxxxxxxx>; Roberto
>Sassu <roberto.sassu@xxxxxxxxxx>; kangkang.shen@xxxxxxxxxxxxx;
>wanghuiqiang <wanghuiqiang@xxxxxxxxxx>; Linuxarm
><linuxarm@xxxxxxxxxx>
>Subject: Re: [PATCH v18 05/19] ACPI:RAS2: Add ACPI RAS2 driver
>
>
>
>On 1/6/2025 4:10 AM, shiju.jose@xxxxxxxxxx wrote:
>> +static int ras2_report_cap_error(u32 cap_status) {
>> +	switch (cap_status) {
>> +	case ACPI_RAS2_NOT_VALID:
>> +	case ACPI_RAS2_NOT_SUPPORTED:
>> +		return -EPERM;
>> +	case ACPI_RAS2_BUSY:
>> +		return -EBUSY;
>> +	case ACPI_RAS2_FAILED:
>> +	case ACPI_RAS2_ABORTED:
>> +	case ACPI_RAS2_INVALID_DATA:
>> +		return -EINVAL;
>> +	default: /* 0 or other, Success */
>> +		return 0;
>> +	}
>> +}
>> +
>> +static int ras2_check_pcc_chan(struct ras2_pcc_subspace
>> +*pcc_subspace) {
>> +	struct acpi_ras2_shared_memory __iomem *generic_comm_base =
>pcc_subspace->pcc_comm_addr;
>> +	ktime_t next_deadline = ktime_add(ktime_get(), pcc_subspace-
>>deadline);
>> +	u32 cap_status;
>> +	u16 status;
>> +	u32 ret;
>> +
>> +	while (!ktime_after(ktime_get(), next_deadline)) {
>> +		/*
>> +		 * As per ACPI spec, the PCC space will be initialized by
>> +		 * platform and should have set the command completion bit
>when
>> +		 * PCC can be used by OSPM
>> +		 */
>> +		status = readw_relaxed(&generic_comm_base->status);
>> +		if (status & RAS2_PCC_CMD_ERROR) {
>> +			cap_status = readw_relaxed(&generic_comm_base-
>>set_capabilities_status);
>> +			ret = ras2_report_cap_error(cap_status);
>
>There is some new information:
>
>The Scrub parameter block intends to get its own Status field, and the
>set_capabilities_status field is being deprecated. This also causes a revision
>bump in the spec.
>
>See [1]
>
>Assuming this change is ratified (not guaranteed, still pending):
>This change implies that we cannot centrally decode errors, as is done here and
>now. Instead error decoding must be done after some feature-specific routine
>calls ras2_send_pcc_cmd. It should be the case that each new feature, moving
>forward, will likely have their own status.
>
>Please see my follow up comment on [PATCH v18 06/19]
>
>---
>[1] https://github.com/tianocore/edk2/issues/10540

Hi Daniel,

Thanks for the information and suggested modifications.

We will track the change and assuming it lands as an ECN
will try to add support in backwards compatible fashion.

>---
>
>> +
[...]
>
Thanks,
Shiju




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux