From: Hanjun Guo <hanjun.guo@linaro.org>
To: "Moore, Robert" <robert.moore@intel.com>
Cc: "'Rafael J. Wysocki'" <rjw@sisk.pl>,
'Len Brown' <lenb@kernel.org>,
"Box, David E" <david.e.box@intel.com>,
"Zheng, Lv" <lv.zheng@intel.com>,
"'linux-acpi@vger.kernel.org'" <linux-acpi@vger.kernel.org>,
"'patches@linaro.org'" <patches@linaro.org>,
"'linaro-kernel@lists.linaro.org'"
<linaro-kernel@lists.linaro.org>,
"'linaro-acpi@lists.linaro.org'" <linaro-acpi@lists.linaro.org>
Subject: Re: [PATCH] ACPICA / hwreg: Use acpi_gbl_reduced_hardware to prevent accessing PM registers
Date: Mon, 16 Sep 2013 10:40:17 +0800 [thread overview]
Message-ID: <52366F91.30204@linaro.org> (raw)
In-Reply-To: <94F2FBAB4432B54E8AACC7DFDE6C92E36FEEC15B@ORSMSX103.amr.corp.intel.com>
On 2013-9-14 4:16, Moore, Robert wrote:
>
>
>> -----Original Message-----
>> From: Moore, Robert
>> Sent: Friday, September 13, 2013 6:08 AM
>> To: Hanjun Guo; Rafael J. Wysocki; Len Brown
>> Cc: Zheng, Lv; linux-acpi@vger.kernel.org; patches@linaro.org; linaro-
>> kernel@lists.linaro.org; linaro-acpi@lists.linaro.org
>> Subject: RE: [PATCH] ACPICA / hwreg: Use acpi_gbl_reduced_hardware to
>> prevent accessing PM registers
>>
>> NOT_IMPLEMENTED refers to the software only; therefore AE_SUPPORT should
>> be returned.
>>
>> Otherwise, seems like this may be a good idea.
>
>
> On the other hand, could one not argue that the host OS should darn well know that
> it is executing on a hardware-reduced platform and not call these functions in the
> first place?
Well, there is a macro ACPI_REDUCED_HARDWARE and used to switch off the
compiling of these functions on hardware-reduced platform, if
ACPI_REDUCED_HARDWARE is TRUE, those functions will never be called.
But is that reasonable? When somebody want to use the ACPI code on
hardware-reduced platform, they should introduce a patch just like:
- #define ACPI_REDUCED_HARDWARE FALSE
+ #define ACPI_REDUCED_HARDWARE TRUE
in include/acpi/acconfig.h
and this patch does not exist in upstream, and it will never be accepted by
upstream too, it is weird. so we should proposal another way.
I thought about introducing a kernel config such as CONFIG_ACPI_REDUCED_HARDWARE
to enable ACPI_REDUCED_HARDWARE, but it is just the same as a macro, and I drop
it.
So, this is a problem should be solved for hardware-reduced platform, use falg
acpi_gbl_reduced_hardware seems a good solution.
Thanks
Hanjun
>
> Bob
next prev parent reply other threads:[~2013-09-16 2:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 10:05 [PATCH] ACPICA / hwreg: Use acpi_gbl_reduced_hardware to prevent accessing PM registers Hanjun Guo
2013-09-13 13:07 ` Moore, Robert
2013-09-13 20:16 ` Moore, Robert
2013-09-16 2:40 ` Hanjun Guo [this message]
2013-09-16 17:26 ` Moore, Robert
2013-09-18 9:28 ` Hanjun Guo
2013-09-24 0:09 ` Zheng, Lv
2013-09-18 9:31 ` Hanjun Guo
2013-09-18 15:09 ` Moore, Robert
2013-09-19 2:37 ` Moore, Robert
2013-09-19 3:52 ` Duran, Leo
2013-09-19 4:42 ` Moore, Robert
2013-09-22 3:26 ` Hanjun Guo
2013-09-24 0:20 ` Zheng, Lv
2013-09-22 2:50 ` Hanjun Guo
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=52366F91.30204@linaro.org \
--to=hanjun.guo@linaro.org \
--cc=david.e.box@intel.com \
--cc=lenb@kernel.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=patches@linaro.org \
--cc=rjw@sisk.pl \
--cc=robert.moore@intel.com \
/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