linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] ACPI / tables: Add IORT to injectable table list
@ 2018-02-02 10:25 Yang Shunyong
  2018-02-02 11:54 ` Hanjun Guo
  0 siblings, 1 reply; 5+ messages in thread
From: Yang Shunyong @ 2018-02-02 10:25 UTC (permalink / raw)
  To: rjw
  Cc: lenb, linux-acpi, linux-kernel, Yang Shunyong, Joey Zheng,
	Wang Dongsheng, Jiang Yutang, Hanjun Guo

Loading IORT table from initrd is used to fix firmware IORT defects.
Moreover, it is very useful to debug SMMU node/device probe, MSI
allocation, stream id translation and IORT table from firmware. It
is also very useful to enable SMMU and devices behind SMMU before
firmware is ready.

This patch adds ACPI_SIG_IORT to the table, which enables IORT
from initrd to override which from firmware.

Signed-off-by: Yang Shunyong <shunyong.yang@hxt-semitech.com>
Cc: Joey Zheng <yu.zheng@hxt-semitech.com>
Cc: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
Cc: Jiang Yutang <yutang2.jiang@hxt-semitech.com>
Cc: Hanjun Guo <guohanjun@huawei.com>
---

v3:
Add more detailed commit message according to Hanjun's suggestion.

v2:
Change typo ACPI_SIG_PPTT to ACPI_SIG_IORT in commit message.

---
 drivers/acpi/tables.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 80ce2a7d224b..7bcb66ccccf3 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -456,7 +456,8 @@ static u8 __init acpi_table_checksum(u8 *buffer, u32 length)
 	ACPI_SIG_SLIC, ACPI_SIG_SPCR, ACPI_SIG_SPMI, ACPI_SIG_TCPA,
 	ACPI_SIG_UEFI, ACPI_SIG_WAET, ACPI_SIG_WDAT, ACPI_SIG_WDDT,
 	ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT, ACPI_SIG_PSDT,
-	ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT, NULL };
+	ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT, ACPI_SIG_IORT,
+	NULL };
 
 #define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] ACPI / tables: Add IORT to injectable table list
  2018-02-02 10:25 [PATCH v3] ACPI / tables: Add IORT to injectable table list Yang Shunyong
@ 2018-02-02 11:54 ` Hanjun Guo
  2018-02-02 12:12   ` Wang, Dongsheng
  0 siblings, 1 reply; 5+ messages in thread
From: Hanjun Guo @ 2018-02-02 11:54 UTC (permalink / raw)
  To: Yang Shunyong, rjw
  Cc: lenb, linux-acpi, linux-kernel, Joey Zheng, Wang Dongsheng, Jiang Yutang

On 2018/2/2 18:25, Yang Shunyong wrote:
> Loading IORT table from initrd is used to fix firmware IORT defects.

I don't think this fix "firmware defects", it just for debug purpose,
we will not use that for production purpose, right? I think above line
can be removed.

> Moreover, it is very useful to debug SMMU node/device probe, MSI
> allocation, stream id translation and IORT table from firmware. It
> is also very useful to enable SMMU and devices behind SMMU before
> firmware is ready.
> 
> This patch adds ACPI_SIG_IORT to the table, which enables IORT
> from initrd to override which from firmware.
> 
> Signed-off-by: Yang Shunyong <shunyong.yang@hxt-semitech.com>
> Cc: Joey Zheng <yu.zheng@hxt-semitech.com>
> Cc: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
> Cc: Jiang Yutang <yutang2.jiang@hxt-semitech.com>
> Cc: Hanjun Guo <guohanjun@huawei.com>

With that updated,

Acked-by: Hanjun Guo <hanjun.guo@linaro.org>

Thanks
Hanjun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: [PATCH v3] ACPI / tables: Add IORT to injectable table list
  2018-02-02 11:54 ` Hanjun Guo
@ 2018-02-02 12:12   ` Wang, Dongsheng
  2018-02-19 19:13     ` Jon Masters
  0 siblings, 1 reply; 5+ messages in thread
From: Wang, Dongsheng @ 2018-02-02 12:12 UTC (permalink / raw)
  To: Hanjun Guo, Yang, Shunyong, rjw
  Cc: lenb, linux-acpi, linux-kernel, Zheng, Joey, Jiang, Yutang2

Hey, Hanjun,

On 2018/2/2 19:54:24, "Hanjun Guo" <guohanjun@huawei.com> wrote:

>On 2018/2/2 18:25, Yang Shunyong wrote:
>>Loading IORT table from initrd is used to fix firmware IORT defects.
>
>I don't think this fix "firmware defects", it just for debug purpose,
>we will not use that for production purpose, right? I think above line
>can be removed.
>
I thinks the upgrade feature not only for debug. Here's an important
way to fix bugs that come from the firmware.

Documentation/acpi/initrd_table_override.txt


Cheers,
-Dongsheng

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] ACPI / tables: Add IORT to injectable table list
  2018-02-02 12:12   ` Wang, Dongsheng
@ 2018-02-19 19:13     ` Jon Masters
  2018-02-20  2:52       ` Yang, Shunyong
  0 siblings, 1 reply; 5+ messages in thread
From: Jon Masters @ 2018-02-19 19:13 UTC (permalink / raw)
  To: Wang, Dongsheng, Hanjun Guo, Yang, Shunyong, rjw
  Cc: lenb, linux-acpi, linux-kernel, Zheng, Joey, Jiang, Yutang2

On 02/02/2018 07:12 AM, Wang, Dongsheng wrote:
> Hey, Hanjun,
> 
> On 2018/2/2 19:54:24, "Hanjun Guo" <guohanjun@huawei.com> wrote:
> 
>> On 2018/2/2 18:25, Yang Shunyong wrote:
>>> Loading IORT table from initrd is used to fix firmware IORT defects.
>>
>> I don't think this fix "firmware defects", it just for debug purpose,
>> we will not use that for production purpose, right? I think above line
>> can be removed.
>>
> I thinks the upgrade feature not only for debug. Here's an important
> way to fix bugs that come from the firmware.
> 
> Documentation/acpi/initrd_table_override.txt

I think we should message that this is for debug/development use.
Ultimately, it's not the way to address firmware problems. Firmware
needs to address that by shipping the correct(ed) tables :)

-- 
Computer Architect

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] ACPI / tables: Add IORT to injectable table list
  2018-02-19 19:13     ` Jon Masters
@ 2018-02-20  2:52       ` Yang, Shunyong
  0 siblings, 0 replies; 5+ messages in thread
From: Yang, Shunyong @ 2018-02-20  2:52 UTC (permalink / raw)
  To: jcm, rjw, Wang, Dongsheng, guohanjun
  Cc: lenb, linux-kernel, Zheng, Joey, linux-acpi, Jiang, Yutang2

Hi, Jon,

On Mon, 2018-02-19 at 14:13 -0500, Jon Masters wrote:
> On 02/02/2018 07:12 AM, Wang, Dongsheng wrote:
> > 
> > Hey, Hanjun,
> > 
> > On 2018/2/2 19:54:24, "Hanjun Guo" <guohanjun@huawei.com> wrote:
> > 
> > > 
> > > On 2018/2/2 18:25, Yang Shunyong wrote:
> > > > 
> > > > Loading IORT table from initrd is used to fix firmware IORT
> > > > defects.
> > > I don't think this fix "firmware defects", it just for debug
> > > purpose,
> > > we will not use that for production purpose, right? I think above
> > > line
> > > can be removed.
> > > 
> > I thinks the upgrade feature not only for debug. Here's an
> > important
> > way to fix bugs that come from the firmware.
> > 
> > Documentation/acpi/initrd_table_override.txt
> I think we should message that this is for debug/development use.
> Ultimately, it's not the way to address firmware problems. Firmware
> needs to address that by shipping the correct(ed) tables :)

Thanks for your feedback.
According to following description in
Documentation/acpi/initrd_table_override.txt
"Complain to your platform/BIOS vendor if you find a bug which is so
severe that a workaround is not accepted in the Linux kernel. And this
facility allows you to upgrade the buggy tables before your
platform/BIOS vendor releases an upgraded BIOS binary."

I have changed the commit message to "Loading IORT table from initrd
can be used to fix severe firmware
IORT defects temporarily before platform/BIOS vendor releases an
upgraded BIOS binary..." in v4.

Detail Link is here,
https://patchwork.kernel.org/patch/10202391/

Thanks.
Shunyong.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-20  2:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02 10:25 [PATCH v3] ACPI / tables: Add IORT to injectable table list Yang Shunyong
2018-02-02 11:54 ` Hanjun Guo
2018-02-02 12:12   ` Wang, Dongsheng
2018-02-19 19:13     ` Jon Masters
2018-02-20  2:52       ` Yang, Shunyong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).