Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1339847

Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings

From Ard Biesheuvel <ard.biesheuvel@linaro.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings
Date 2016-02-22 20:20 +0100
Message-ID <r54bv-23H-1@gated-at.bofh.it> (permalink)
References <r4Zlw-6Vd-3@gated-at.bofh.it> <r4Zlx-6Vd-27@gated-at.bofh.it> <r541P-1YW-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 22 February 2016 at 20:05, Dan Williams <dan.j.williams@intel.com> wrote:
> On Mon, Feb 22, 2016 at 6:02 AM, Ard Biesheuvel
> <ard.biesheuvel@linaro.org> wrote:
>> Currently, the memremap code serves MEMREMAP_WB mappings directly from
>> the kernel direct mapping, unless the region is in high memory, in which
>> case it falls back to using ioremap_cache(). However, the semantics of
>> ioremap_cache() are not unambiguously defined, and on ARM, it will
>> actually result in a mapping type that differs from the attributes used
>> for the linear mapping, and for this reason, the ioremap_cache() call
>> fails if the region is part of the memory managed by the kernel.
>>
>> So instead, implement an optional hook 'arch_memremap_wb' whose default
>> implementation calls ioremap_cache() as before, but which can be
>> overridden by the architecture to do what is appropriate for it.
>>
>
> Acked-by: Dan Williams <dan.j.williams@intel.com>
>
> I still have patches pending to delete ioremap_cache() from ARM and
> require memremap() to be used for cacheable mappings.  Do you see any
> use for ioremap_cache() on ARM after this change?

I am not exactly sure why ioremap_cache() does not use MT_MEMORY_RW
attributes, but the ARM architecture simply does not allow mismatched
attributes, so we cannot simply replace each instance of
ioremap_cache() with memremap()

Perhaps Russell can explain?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 0/2] fix memremap on ARM Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-22 15:10 +0100
  [RFC PATCH 2/2] ARM: memremap: implement arch_memremap_wb() Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-22 15:10 +0100
  [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-22 15:10 +0100
    Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Dan Williams <dan.j.williams@intel.com> - 2016-02-22 20:10 +0100
      Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-22 20:20 +0100
        Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Dan Williams <dan.j.williams@intel.com> - 2016-02-22 21:00 +0100
        Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB  mappings Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-22 21:10 +0100
          Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-22 21:40 +0100
            Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB  mappings Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-23 13:00 +0100
              Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-23 13:10 +0100
                Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-23 13:30 +0100
                Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Dan Williams <dan.j.williams@intel.com> - 2016-02-23 18:30 +0100
                Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Robert Jarzmik <robert.jarzmik@free.fr> - 2016-02-23 23:30 +0100
                Re: [RFC PATCH 1/2] memremap: add arch specific hook for MEMREMAP_WB mappings Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-25 08:50 +0100

csiph-web