Bug 21142 - ACPI dynamic tables are not shown correctly in sysfs
ACPI dynamic tables are not shown correctly in sysfs
Status: CLOSED CODE_FIX
Product: ACPI
Classification: Unclassified
Component: Config-Tables
All Linux
: P1 normal
Assigned To: Zhang Rui
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-26 01:59 UTC by Zhang Rui
Modified: 2010-11-03 02:26 UTC (History)
4 users (show)

See Also:
Kernel Version:
Tree: Mainline
Regression: Yes


Attachments
patch: install table handler before any dynamic tables are loaded (1.38 KB, patch)
2010-10-26 02:01 UTC, Zhang Rui
Details | Diff
patch against 2.6.35 (1.70 KB, patch)
2010-11-01 01:14 UTC, Zhang Rui
Details | Diff

Description Zhang Rui 2010-10-26 01:59:22 UTC
ACPI dynamic tables are not shown in /sys/firmware/acpi/tables/dynamic, but in /sys/firmware/acpi/tables/ instead.
This is introduced by commit:

78f1699659963fff97975df44db6d5dbe7218e55
Author: Alex Chiang <achiang@hp.com>
Date:   Sun Dec 20 12:19:09 2009 -0700
    ACPI: processor: call _PDC early

because dynamic SSDT tables may be loaded in _PDC,
before installing the ACPI table handler.

we should invoke acpi_sysfs_init() before acpi_early_processor_set_pdc(),
so that the table handler is installed before any dynamic tables loaded.
Comment 1 Zhang Rui 2010-10-26 02:01:20 UTC
Created attachment 35062 [details]
patch: install table handler before any dynamic tables are loaded
Comment 2 Zhang Rui 2010-10-26 02:03:17 UTC
bug was found in bug #19762.
Comment 3 Florian Mickler 2010-10-31 19:23:11 UTC
merged in what will be 2.6.37-rc1, 
> commit b1d248d96c71665c79befb81207f38f894c7c082
> Author: Zhang Rui <rui.zhang@intel.com>
> Date:   Tue Oct 26 10:06:54 2010 +0800
> 
>     ACPI: install ACPI table handler before any dynamic tables being loaded

Does this need to go to stable?
Comment 4 Zhang Rui 2010-11-01 00:27:25 UTC
Yes, it does.
But as this changes the ACPI initialization code, and we have not got a tested-by from Dennis, IMO, we'd better put it in -rc kernel for a while before sending it to stable kernel.
Comment 5 Zhang Rui 2010-11-01 01:14:48 UTC
Created attachment 35662 [details]
patch against 2.6.35

Dennis, will you please try this patch instead?
it's made based on 2.6.35.
Comment 6 Dennis Jansen 2010-11-02 21:27:46 UTC
looks better I guess:

$ ll /sys/firmware/acpi/tables/
-r-------- 1 root root 0 2010-11-02 22:26 APIC
-r-------- 1 root root 0 2010-11-02 22:26 DSDT
drwxr-xr-x 2 root root 0 2010-11-02 22:26 dynamic/
-r-------- 1 root root 0 2010-11-02 22:26 FACP
-r-------- 1 root root 0 2010-11-02 22:26 FACS
-r-------- 1 root root 0 2010-11-02 22:26 GSCI
-r-------- 1 root root 0 2010-11-02 22:26 HPET
-r-------- 1 root root 0 2010-11-02 22:26 MCFG
-r-------- 1 root root 0 2010-11-02 22:26 OEMB
-r-------- 1 root root 0 2010-11-02 22:26 SLIC
-r-------- 1 root root 0 2010-11-02 22:26 SSDT

$ ll /sys/firmware/acpi/tables/dynamic
-r-------- 1 root root 0 2010-11-02 22:26 SSDT2
-r-------- 1 root root 0 2010-11-02 22:26 SSDT3
-r-------- 1 root root 0 2010-11-02 22:26 SSDT4
-r-------- 1 root root 0 2010-11-02 22:26 SSDT5

let me know if you like any other tests.
Comment 7 Zhang Rui 2010-11-03 02:26:18 UTC
patch in comment #1 shipped in 2.6.37-rc1.
commit b1d248d96c71665c79befb81207f38f894c7c082

Note You need to log in before you can comment on or make changes to this bug.