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]
Date:	Mon, 22 Sep 2014 17:29:48 +0200
From:	Robert Richter <rric@...nel.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>,
	Liviu Dudau <Liviu.Dudau@....com>,
	Rob Herring <robh+dt@...nel.org>,
	Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <Will.Deacon@....com>,
	Russell King <linux@....linux.org.uk>,
	linux-pci <linux-pci@...r.kernel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Tanmay Inamdar <tinamdar@....com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Sinan Kaya <okaya@...eaurora.org>,
	Jingoo Han <jg1.han@...sung.com>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Suravee Suthikulanit <suravee.suthikulpanit@....com>,
	linux-arch <linux-arch@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Device Tree ML <devicetree@...r.kernel.org>,
	LAKML <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v11 10/10] PCI: Introduce pci_remap_iospace() for
 remapping PCI I/O bus resources into CPU space

On 20.09.14 04:20:31, Arnd Bergmann wrote:
> On Friday 19 September 2014, Bjorn Helgaas wrote:
> > On Thu, Sep 18, 2014 at 02:30:25AM +0100, Liviu Dudau wrote:
> 
> > PCI_IOBASE is a virtual address.  So PCI_IOBASE + res->start is also a
> > virtual address (only for IORESOURCE_IO).
> > 
> > Since res->start is normally a *physical* address, I think it would be less
> > confusing to do something like this:
> > 
> >     vaddr = PCI_IOBASE + res->start;
> >     ioremap_page_range(vaddr, vaddr + resource_size(res), ...);
> > 
> > so we have a hint that the first two ioremap_page_range() parameters are
> > virtual addresses.  It's also confusing that it uses "unsigned long" for
> > the virtual addresses, when we usually use "void *".  But that's out of
> > scope for this patch.
> 
> Good idea. I think it will have to be (unsigned long)PCI_IOBASE above then,
> since ioremap_page_range takes a 'unsigned long' virtual address and PCI_IOBASE
> should really remain an __iomem pointer.

Right, I see this warning here:

drivers/pci/pci.c: In function ‘pci_remap_iospace’:
drivers/pci/pci.c:2728:8: warning: assignment makes integer from pointer without a cast [enabled by default]

-Robert
--
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