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: <CAL_JsqKy3ZFpS_vXGv+wxX60c3=heURamH+gN=zLW9oR2VOkBg@mail.gmail.com>
Date:	Wed, 26 Feb 2014 09:56:24 -0600
From:	Rob Herring <robherring2@...il.com>
To:	Mark Salter <msalter@...hat.com>
Cc:	Russell King <linux@....linux.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Arnd Bergmann <arnd@...db.de>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Leif Lindholm <leif.lindholm@...aro.org>,
	Linaro Patches <patches@...aro.org>
Subject: Re: [PATCH v4 4/6] arm: add early_ioremap support

On Wed, Feb 26, 2014 at 8:59 AM, Mark Salter <msalter@...hat.com> wrote:
> On Tue, 2014-02-25 at 23:48 -0600, Rob Herring wrote:
>> > +#define NR_FIX_BTMAPS          32
>> > +#define FIX_BTMAPS_SLOTS       7
>> > +#define TOTAL_FIX_BTMAPS       (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS)
>> > +#define FIX_BTMAP_END          FIX_KMAP_BEGIN
>> > +#define FIX_BTMAP_BEGIN                (FIX_BTMAP_END +
>> TOTAL_FIX_BTMAPS - 1)
>>
>> Why the different logic from arm64? Specifically, it doesn't make
>> adding a permanent mapping simple.
>
> I looked at adding support for permanent mappings but it was going to
> take more time than I had. Also on ARM, we have to deal with kmap's
> needs as well. Working that out was going to take more time than I
> had. I think getting the patch in now to support early_ioremap is
> the way to go. Adding support for permanent mappings can be done
> later with the early console support for which it is needed.

I'm not saying that you should add permanent mappings, but just align
the definitions across arches more. So make arm look something like
this:

enum fixed_addresses {
       __end_of_permanent_fixed_addresses,

       /*
        * Temporary boot-time mappings, used by early_ioremap(),
        * before ioremap() is functional.
        */
#define NR_FIX_BTMAPS          32
#define FIX_BTMAPS_SLOTS       7
#define TOTAL_FIX_BTMAPS       (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS)

      FIX_BTMAP_END = __end_of_permanent_fixed_addresses,
       FIX_BTMAP_BEGIN = FIX_BTMAP_END + TOTAL_FIX_BTMAPS - 1,
       __end_of_fixed_addresses
       FIX_KMAP_BEGIN = FIX_BTMAP_END,
       FIX_KMAP_END = FIX_BTMAP_BEGIN,
};

These could then go into the generic header:

#define FIXADDR_SIZE   (__end_of_permanent_fixed_addresses << PAGE_SHIFT)
#define FIXADDR_START  (FIXADDR_TOP - FIXADDR_SIZE)

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