lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140711121923.GE11473@arm.com>
Date:	Fri, 11 Jul 2014 13:19:23 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Thierry Reding <thierry.reding@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Will Deacon <Will.Deacon@....com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] arm64: Use include/asm-generic/io.h

On Thu, Jul 10, 2014 at 02:14:16PM +0100, Arnd Bergmann wrote:
> On Thursday 10 July 2014, Catalin Marinas wrote:
> > > @@ -235,8 +155,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
> > >  #define ioremap_wc(addr, size)               __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
> > >  #define iounmap                              __iounmap
> > >  
> > > -#define ARCH_HAS_IOREMAP_WC
> > > -#include <asm-generic/iomap.h>
> > > +#include <asm-generic/io.h>
> > 
> > We don't currently have PCIe support in mainline for arm64 but what I
> > had in mind with the generic iomap is that functions like ioread32_rep
> > first check whether the address is an IO address or a memory one and
> > calls the insl or mmio_insl accordingly. With your generic
> > implementation, this check disappears.
> > 
> > The question is whether this functionality would still be needed.
> 
> I think it's much better not to have that check on architectures that have a memory
> mapped I/O space like arm64. The main advantage is that ioread32() is just a trivial
> alias for readl(). The only reason for needing generic_iomap is architectures that
> do something very different for I/O ports.

ioread32() is indeed an alias for readl on arm64 but if the address it
gets as argument looks like an I/O port, it adds PCI_IOBASE (via the inl
macro). This would no longer happen with Thierry's patches.

So I guess that for this patch to work, we also need ioport_map() to
return an address from the PCI_IOBASE range. Should we merge this now as
well:

http://linux-arm.org/git?p=linux-ld.git;a=commitdiff;h=3423064d8e42a38164a8436bcdf7434cf9cd2192

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ