ACPI/PRM: Deal with table not present or no module found
PATCH 1/1 ACPI/PRM: Deal with table not present or no module found
On the system PRMT table is not present, dmesg output:
$ dmesg | grep PRM [ 1.532237] ACPI: PRMT not present [ 1.532237] PRM: found 4294967277 modules
The result of acpi_table_parse_entries need to be checked and return immediately if PRMT table is not present or no PRM module found.
--- drivers/acpi/prmt.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/acpi/prmt.c +6 -0
@@ -292,6 +292,12 @@ void __init init_prmt(void)int mc =acpi_table_parse_entries (ACPI_SIG_PRMT ,sizeof (struct acpi_table_prmt ) +sizeof (struct acpi_table_prmt_header ),0 , acpi_parse_prmt,0 ); +/* +* Return immediately if PRMT table is not present or no PRM module found. +*/ +if (mc <=0 ) +return ; +pr_info ("PRM: found %u modules\n" , mc); status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,
Signature · 1 line
2.7.4
Quoted 23 lines · Aubrey Li
On the system PRMT table is not present, dmesg output:
$ dmesg | grep PRM [ 1.532237] ACPI: PRMT not present [ 1.532237] PRM: found 4294967277 modulesThe result of
acpi_table_parse_entriesneed to be checked and return immediately if PRMT table is not present or no PRM module found.Signed-off-by Aubrey Li <[email protected]>--- drivers/acpi/prmt.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/acpi/prmt.c +0
-0@@ -292,6 +292,12 @@ void __init init_prmt(void)int mc =acpi_table_parse_entries (ACPI_SIG_PRMT ,sizeof (struct acpi_table_prmt ) +sizeof (struct acpi_table_prmt_header ),0 , acpi_parse_prmt,0 );
drivers/acpi/prmt.c void __init init_prmt(void)
Quoted 10 lines
drivers/acpi/prmt.c +6
-1+/* +* Return immediately if PRMT table is not present or no PRM module found. +*/ +if (mc <=0 ) +return ; +pr_info ("PRM: found %u modules\n" , mc); status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT, --
Applied as 5.14-rc material, thanks!
However, since I'm on vacation next week, it will get into linux-next after -rc6.
Quoted 32 lines · Rafael J. Wysocki
Quoted 31 lines · Aubrey Li
On the system PRMT table is not present, dmesg output:
$ dmesg | grep PRM [ 1.532237] ACPI: PRMT not present [ 1.532237] PRM: found 4294967277 modulesThe result of
acpi_table_parse_entriesneed to be checked and return immediately if PRMT table is not present or no PRM module found.Signed-off-by Aubrey Li <[email protected]>--- drivers/acpi/prmt.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/acpi/prmt.c +6
-0@@ -292,6 +292,12 @@ void __init init_prmt(void)int mc =acpi_table_parse_entries (ACPI_SIG_PRMT ,sizeof (struct acpi_table_prmt ) +sizeof (struct acpi_table_prmt_header ),0 , acpi_parse_prmt,0 ); +/* +* Return immediately if PRMT table is not present or no PRM module found. +*/ +if (mc <=0 ) +return ; +pr_info ("PRM: found %u modules\n" , mc);
Quoted 8 lines
drivers/acpi/prmt.c void __init init_prmt(void)
Quoted 2 lines
drivers/acpi/prmt.c +0
-1status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT, --Applied as 5.14-rc material, thanks!
However, since I'm on vacation next week, it will get into linux-next after -rc6.
Thanks Rafael!