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:	Sat, 30 May 2015 18:58:12 -0600
From:	Toshi Kani <toshi.kani@...com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Arnd Bergmann <arnd@...db.de>, Linux MM <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	the arch/x86 maintainers <x86@...nel.org>,
	linux-nvdimm@...ts.01.org, jgross@...e.com,
	stefan.bader@...onical.com, Andy Lutomirski <luto@...capital.net>,
	Henrique de Moraes Holschuh <hmh@....eng.br>,
	yigal@...xistor.com,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Elliott@...com, "Luis R. Rodriguez" <mcgrof@...e.com>,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v11 6/12] x86, mm, asm-gen: Add ioremap_wt() for WT

On Sat, 2015-05-30 at 11:18 +0200, Geert Uytterhoeven wrote:
> On Sat, May 30, 2015 at 12:59 AM, Toshi Kani <toshi.kani@...com> wrote:
> > --- a/include/asm-generic/io.h
> > +++ b/include/asm-generic/io.h
> > @@ -785,8 +785,17 @@ static inline void __iomem *ioremap_wc(phys_addr_t offset, size_t size)
> >  }
> >  #endif
> >
> > +#ifndef ioremap_wt
> > +#define ioremap_wt ioremap_wt
> > +static inline void __iomem *ioremap_wt(phys_addr_t offset, size_t size)
> > +{
> > +       return ioremap_nocache(offset, size);
> > +}
> > +#endif
> > +
> >  #ifndef iounmap
> >  #define iounmap iounmap
> > +
> >  static inline void iounmap(void __iomem *addr)
> >  {
> >  }
> > diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h
> > index 1b41011..d8f8622 100644
> > --- a/include/asm-generic/iomap.h
> > +++ b/include/asm-generic/iomap.h
> > @@ -66,6 +66,10 @@ extern void ioport_unmap(void __iomem *);
> >  #define ioremap_wc ioremap_nocache
> >  #endif
> >
> > +#ifndef ARCH_HAS_IOREMAP_WT
> > +#define ioremap_wt ioremap_nocache
> > +#endif
> 
> Defining ioremap_wt in two different places in asm-generic looks fishy to me.
> 
> If <asm/io.h> already provides it (either through asm-generic/io.h or
> arch/<arch>/include/asm/io.h), why does asm-generic/iomap.h need to define
> its own version?
> 
> I see this pattern already exists for ioremap_wc...

Yes, this patchset follows the model of ioremap_wc.  This duplication
was introduced by 9216efafc52 "asm-generic/io.h: Reconcile I/O accessor
overrides", while the original ioremap_wc support changed
asm-generic/iomap.h (1526a756fba).  As described in patch 07, some
architectures define ioremap_xxx() locally as well.

It is too risky to do everything in one short.  I will look into the
duplication issue as a separate item after this patchset is settled.

Thanks,
-Toshi

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