Bug 9354

Summary: ACPI Error attaching device data
Product: ACPI Reporter: robert (robert)
Component: ACPICA-CoreAssignee: Lin Ming (ming.m.lin)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, rufus-azrael, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24-rc2 Subsystem:
Regression: --- Bisected commit-id:
Attachments: acpidump
dmesg log for x86
lspci -vvxxx for x86_64
Debug patch
dmesg
patch mentioned in comment #4
dmesg

Description robert 2007-11-11 18:02:45 UTC
Most recent kernel where this bug did not occur: N/A

Distribution: 
- Red Hat Enterprise Linux 5
  2.6.18-53.el5
- Mainline
  2.6.24-rc2

Hardware Environment:

HP ProLiant ML115 G1 Servers.
BIOS http://h18023.www1.hp.com/support/files/server/us/locate/1145_6371.html

Problem Description:

ACPI: EC: Look up EC in DSDT
ACPI: Interpreter enabled
ACPI: (supports S0 S5)
ACPI: Using IOAPIC for interrupt routing
Error attaching device data                 <----   here!
Error attaching device data
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Transparent bridge - 0000:00:06.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.BR10._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.BR11._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.BR12._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.BR15._PRT]
 
#ls /proc/acpi/processor/
P001  P002

# cat /proc/acpi/processor/P001/info
processor id:            0
acpi id:                 1
bus mastering control:   no
power management:        no
throttling control:      no
limit interface:         no

# cat /proc/acpi/processor/P002/info
processor id:            1
acpi id:                 2
bus mastering control:   no
power management:        no
throttling control:      no
limit interface:         no

Steps to reproduce:

Install kernels and then check output of dmesg after boot the machine.
Comment 1 robert 2007-11-11 18:04:34 UTC
already mentioned on http://www.mail-archive.com/linux-acpi@vger.kernel.org/msg05865.html
Comment 2 robert 2007-11-11 18:06:11 UTC
Created attachment 13500 [details]
acpidump
Comment 3 robert 2007-11-11 18:14:42 UTC
Part of AML for the NG machine. Seems like Alias description is reason....

DefinitionBlock ("NG/DSDT.aml", "DSDT", 1, "HP    ", "ML115 G1", 0x00000100)
{
     :
    Scope (_PR)
    {
        Processor (P001, 0x01, 0x00002010, 0x06) {}
        Processor (P002, 0x02, 0x00000000, 0x00) {}
        Alias (P001, CPU1)
        Alias (P002, CPU2)
    }
    :
}
Comment 4 Robert Moore 2007-11-14 15:17:13 UTC
This may be fixed in ACPICA 20071019:

Fixed a problem with the Alias operator when the target of the alias is a named ASL operator that opens a new scope -- Scope, Device, PowerResource, Processor, and ThermalZone. In these cases, any children of the original operator could not be accessed via the alias, potentially causing unexpected AE_NOT_FOUND exceptions. (BZ 9067)
Comment 5 robert 2007-11-14 22:21:28 UTC
Thank you. 

I am not familier with ASL. Excuse me, how to check whether the ACPICA 20071019 is ok or not on the above kernels?

Regards
Comment 6 ykzhao 2007-11-16 00:22:24 UTC
Will you please attach the following info?
a. dmesg
b. lspci -vvxxx
Thanks.
Comment 7 robert 2007-11-16 00:43:57 UTC
Created attachment 13576 [details]
dmesg log for x86
Comment 8 robert 2007-11-16 00:51:46 UTC
Created attachment 13577 [details]
lspci -vvxxx for x86_64

The machine is used for other project now.
I only have the output of lspci -vvxxx is for x86_64 on kernel-2.6.18-8
If it has problem for analysis, please let me know. 
I will try to send x86 one.

Thank you for help.
Comment 9 Zhang Rui 2008-03-24 00:17:47 UTC
Ming and Bob,
what's the status of this bug?
Is the fix already included in the recent ACPICA release?
Comment 10 Zhang Rui 2008-03-24 19:50:22 UTC
Created attachment 15421 [details]
Debug patch

Please apply this debug patch and attach the FULL dmesg output after boot. :)
Comment 11 Len Brown 2008-03-25 19:08:18 UTC
we need to get the fix from ACPICA 20071019 and attach a linux version here.
Comment 12 BedOS_Gui 2008-04-13 03:43:20 UTC
Created attachment 15740 [details]
dmesg

after kernel-2.6.25-rc9 vanilla patched with the proposed patch
Comment 13 Zhang Rui 2008-04-13 18:33:45 UTC
"ACPI Error attaching device data" should always be shown if Alias device exists in the ACPI namespace.

Linux OS builds a device node for every ACPI device and trys to attach this data to the device node in ACPI namespace.
For Linux, alias devices are two devices while they share the same ACPI namespace node, attaching two device data to the same device handle causes the acpi_attach_device returns AE_ALREADY_EXISTS.

Ming, do we have a fix for this?
Comment 14 Zhang Rui 2008-04-13 20:40:11 UTC
Hmm, they don't share the some namespace node, the two nodes share the same attached object. And acpi_attach_data will attach the data to the attached object, which is the same for these two Linux devices.
Comment 15 Zhang Rui 2008-04-13 20:45:27 UTC
Working with Ming, and we found that in Linux (ACPICA20070126), the type of Alias device CPU1 is "processor", thus Linux will add a duplicate processor device.
But when using later ACPICA release, the type of CPU1 is "Alias", in this case, Linux should not add a device node for CPU1.
So I think this bug should be fixed in the recent Linux ACPICA update.
Ming will check if the patch is already in the patch set Len sent on 4/12/2008.
Comment 16 Lin Ming 2008-04-13 21:42:54 UTC
Created attachment 15744 [details]
patch mentioned in comment #4

Please give it a try
Comment 17 BedOS_Gui 2008-04-14 09:42:50 UTC
Created attachment 15750 [details]
dmesg

The patch works fine for me, each data is attached to a node.
Comment 18 Zhang Rui 2008-04-14 20:50:30 UTC
As the patch is already in Len's tree, I think we can mark this bug as RESOLVED. 
Comment 19 Len Brown 2008-06-13 21:36:16 UTC
shipped in 2.6.26-rc1 - closed.

commit 53cf174409a24e8388e1d554d27436275fc81fe7
Author: Bob Moore <robert.moore@intel.com>
Date:   Thu Apr 10 19:06:39 2008 +0400

    ACPICA: Fix for Alias operator to see target child objects