public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Toshi Kani <toshi.kani@hp.com>
To: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: lenb@kernel.org, rjw@rjwysocki.net, linux-acpi@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sysfs, acpi, tables: Set file size for each ACPI table
Date: Wed, 20 Nov 2013 15:38:55 -0700	[thread overview]
Message-ID: <1384987135.1791.153.camel@misato.fc.hp.com> (raw)
In-Reply-To: <528B2757.6010406@jp.fujitsu.com>

On Tue, 2013-11-19 at 17:54 +0900, HATAYAMA Daisuke wrote:
> Currently, each of the ACPI tables exported from
> /sys/firmware/acpi/tables is of zero size:
> 
> $ LANG=C ls -ld /sys/firmware/acpi/tables/*
> -r-------- 1 root root 0 Nov 19 09:48 /sys/firmware/acpi/tables/APIC
> -r-------- 1 root root 0 Nov 19 09:48 /sys/firmware/acpi/tables/BOOT
> -r-------- 1 root root 0 Nov 19 14:25 /sys/firmware/acpi/tables/DSDT
> -r-------- 1 root root 0 Nov 19 14:25 /sys/firmware/acpi/tables/FACP
> -r-------- 1 root root 0 Nov 19 14:25 /sys/firmware/acpi/tables/FACS
> -r-------- 1 root root 0 Nov 19 14:25 /sys/firmware/acpi/tables/MCFG
> -r-------- 1 root root 0 Nov 19 14:25 /sys/firmware/acpi/tables/SRAT
> drwxr-xr-x 2 root root 0 Nov 19 09:48 /sys/firmware/acpi/tables/dynamic/
> 
> due to which, user-land tools fail reading each table. For example:
> 
> $ acpidump -f /sys/firmware/acpi/tables/SRAT
> Could not get input file size: /sys/firmware/acpi/tables/SRAT
> 
> To deal with the issue, this patch assigns size of each ACPI table to
> the corresponding sysfs file.
> 
> $ LANG=C ls -hld /sys/firmware/acpi/tables/*
> -r-------- 1 root root  94 Nov 19 16:45 /sys/firmware/acpi/tables/APIC
> -r-------- 1 root root  40 Nov 19 16:45 /sys/firmware/acpi/tables/BOOT
> -r-------- 1 root root 58K Nov 19 16:55 /sys/firmware/acpi/tables/DSDT
> -r-------- 1 root root 244 Nov 19 16:55 /sys/firmware/acpi/tables/FACP
> -r-------- 1 root root  64 Nov 19 16:55 /sys/firmware/acpi/tables/FACS
> -r-------- 1 root root  60 Nov 19 16:55 /sys/firmware/acpi/tables/MCFG
> -r-------- 1 root root 168 Nov 19 16:45 /sys/firmware/acpi/tables/SRAT
> drwxr-xr-x 2 root root   0 Nov 19 16:55 /sys/firmware/acpi/tables/dynamic/
> 
> Then, user-land tools work well like:
> 
> $ acpidump -f /sys/firmware/acpi/tables/SRAT
> SRAT @ 0x0000000000000000
>   0000: 53 52 41 54 A8 00 00 00 02 65 56 4D 57 41 52 45  SRAT.....eVMWARE
>   0010: 4D 45 4D 50 4C 55 47 20 00 00 04 06 56 4D 57 20  MEMPLUG ....VMW
>   0020: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
>   0030: 01 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00  .(..............
>   0040: 00 00 0A 00 00 00 00 00 00 00 00 00 01 00 00 00  ................
>   0050: 00 00 00 00 00 00 00 00 01 28 00 00 00 00 00 00  .........(......
>   0060: 00 00 10 00 00 00 00 00 00 00 F0 BF 00 00 00 00  ................
>   0070: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
>   0080: 01 28 00 00 00 00 00 00 00 00 00 00 01 00 00 00  .(..............
>   0090: 00 00 00 40 00 00 00 00 00 00 00 00 01 00 00 00  ...@............
>   00A0: 00 00 00 00 00 00 00 00                          ........
> 
> Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>

Acked-by: Toshi Kani <toshi.kani@hp.com>

Thanks,
-Toshi



  reply	other threads:[~2013-11-20 22:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  8:54 [PATCH] sysfs, acpi, tables: Set file size for each ACPI table HATAYAMA Daisuke
2013-11-20 22:38 ` Toshi Kani [this message]
2013-11-21  0:32   ` Rafael J. Wysocki
2013-11-21  3:48 ` Zhang Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384987135.1791.153.camel@misato.fc.hp.com \
    --to=toshi.kani@hp.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox