From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm64: Fix overlapping VA allocations
Date: Wed, 14 Jan 2015 10:53:22 +0000 [thread overview]
Message-ID: <20150114105322.GE4050@arm.com> (raw)
In-Reply-To: <20150114104256.GA12069@leverpostej>
On Wed, Jan 14, 2015 at 10:42:56AM +0000, Mark Rutland wrote:
> On Tue, Jan 13, 2015 at 03:34:49PM +0000, Catalin Marinas wrote:
> > On Mon, Jan 12, 2015 at 07:36:47PM +0000, Mark Rutland wrote:
> > > --- a/arch/arm64/include/asm/io.h
> > > +++ b/arch/arm64/include/asm/io.h
> > > @@ -26,6 +26,7 @@
> > >
> > > #include <asm/byteorder.h>
> > > #include <asm/barrier.h>
> > > +#include <asm/memory.h>
> > > #include <asm/pgtable.h>
> > > #include <asm/early_ioremap.h>
> > > #include <asm/alternative.h>
> > > @@ -145,8 +146,8 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)
> > > * I/O port access primitives.
> > > */
> > > #define arch_has_dev_port() (1)
> > > -#define IO_SPACE_LIMIT (SZ_32M - 1)
> > > -#define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_32M))
> > > +#define IO_SPACE_LIMIT (PCI_IO_END - PCI_IO_START - 1)
> > > +#define PCI_IOBASE ((void __iomem *)PCI_IO_START)
> >
> > I've seen at least couple of places where IO_SPACE_LIMIT is used as a
> > mark. So I would prefer it to be something like (power-of-two - 1)
> > rather than some random (size - 1).
>
> I couldn't spot instances in core code (maybe I missed them), just
> arch/arm and arch/hexagon:
drivers/pci/probe.c: mask64 = PCI_BASE_ADDRESS_IO_MASK & (u32)IO_SPACE_LIMIT;
include/asm-generic/io.h: return PCI_IOBASE + (port & IO_SPACE_LIMIT);
Will
next prev parent reply other threads:[~2015-01-14 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 19:36 [PATCH 0/2] arm64: PCI_IOBASE fixes Mark Rutland
2015-01-12 19:36 ` [PATCH 1/2] arm64: Fix overlapping VA allocations Mark Rutland
2015-01-13 15:34 ` Catalin Marinas
2015-01-14 10:42 ` Mark Rutland
2015-01-14 10:53 ` Will Deacon [this message]
2015-01-12 19:36 ` [PATCH 2/2] arm64: mm: dump: add missing includes Mark Rutland
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=20150114105322.GE4050@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.