From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Huang Ying <ying.huang@intel.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
Tony Luck <tony.luck@intel.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Thomas Renninger <trenn@suse.de>, Len Brown <lenb@kernel.org>,
"Moore, Robert" <robert.moore@intel.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"bondd@us.ibm.com" <bondd@us.ibm.com>,
Myron Stowe <myron.stowe@redhat.com>
Subject: Re: [PATCH 2/2] ACPICA: support Generic Address Structure bit_offset in acpi_read/write
Date: Mon, 21 Nov 2011 10:08:24 +0000 [thread overview]
Message-ID: <20111121100824.GP9581@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1321861880.13860.128.camel@yhuang-dev>
On Mon, Nov 21, 2011 at 03:51:20PM +0800, Huang Ying wrote:
> On Fri, 2011-11-18 at 17:25 +0800, Rafael J. Wysocki wrote:
> > On Friday, November 18, 2011, Huang Ying wrote:
> > > Take a look at ARM ioremap implementation. It appears that RAM can be
> > > ioremaped on ARM. But this changes should be harmless for ARM too.
> > > Because ioremap implementation is different between different
> > > architecture, maybe we should use #ifdef CONFIG_X86, #endif to enclose
> > > the code?
I think you're wrong there.
void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
unsigned long offset, size_t size, unsigned int mtype, void *caller)
{
...
/*
* Don't allow RAM to be mapped - this causes problems with ARMv6+
*/
if (WARN_ON(pfn_valid(pfn)))
return NULL;
While we don't exhaustively check, this catches most offenders trying to
use ioremap() on system RAM.
> > Well, that would be a bit hackish, wouldn't it?
> >
> > If the code is going to work on all architectures that _may_ use it in the
> > future (x86, ARM, ia64 so far), there's no reason to change it. My question
> > was whether or not you double checked that.
>
> Take a look at the page_is_ram() implementation and ioremap()
> implementation for ARM and ia64. It appears that the patch should work
> on these architecture. Add Tony and Russell to loop to confirm it.
Even though I've not heard of anyone wanting to use ACPI on ARM, I'm not
worried at all about this. However, it does look harmless for ARM even
if someone wanted to use ACPI (and in any case kmapping RAM is much better
than ioremapping it.)
next prev parent reply other threads:[~2011-11-21 10:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 23:05 [PATCH 0/2] acpi_read() bit_offset support Bjorn Helgaas
2011-11-11 23:05 ` [PATCH 1/2] ACPICA: acpi_read: update return value atomically Bjorn Helgaas
2011-11-11 23:05 ` [PATCH 2/2] ACPICA: support Generic Address Structure bit_offset in acpi_read/write Bjorn Helgaas
2011-11-15 15:13 ` Bjorn Helgaas
2011-11-15 16:49 ` Thomas Renninger
2011-11-16 15:45 ` Bjorn Helgaas
2011-11-16 19:58 ` Thomas Renninger
2011-11-17 0:15 ` Bjorn Helgaas
2011-12-12 15:39 ` Thomas Renninger
2011-11-16 23:27 ` Rafael J. Wysocki
2011-11-16 23:59 ` Bjorn Helgaas
2011-11-17 23:10 ` Rafael J. Wysocki
2011-11-17 0:51 ` Huang Ying
2011-11-17 20:27 ` Rafael J. Wysocki
2011-11-17 23:38 ` Thomas Renninger
2011-11-18 9:27 ` Rafael J. Wysocki
2011-11-18 1:04 ` Huang Ying
2011-11-18 9:25 ` Rafael J. Wysocki
2011-11-21 7:51 ` Huang Ying
2011-11-21 10:08 ` Russell King - ARM Linux [this message]
2011-11-28 23:03 ` Luck, Tony
2011-11-29 2:15 ` Huang Ying
2011-11-30 21:54 ` Luck, Tony
2011-12-01 0:49 ` Huang Ying
2011-12-01 0:53 ` Luck, Tony
2011-12-01 0:57 ` Huang Ying
2011-12-01 1:03 ` Luck, Tony
2011-12-01 1:11 ` Huang Ying
2011-12-01 17:35 ` Luck, Tony
2011-12-02 1:48 ` Huang Ying
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=20111121100824.GP9581@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=bhelgaas@google.com \
--cc=bondd@us.ibm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=myron.stowe@redhat.com \
--cc=rjw@sisk.pl \
--cc=robert.moore@intel.com \
--cc=tony.luck@intel.com \
--cc=trenn@suse.de \
--cc=ying.huang@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;
as well as URLs for NNTP newsgroup(s).