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


Groups > linux.kernel > #1258973

Re: [GIT PULL] memremap fix for 4.3

From Dan Williams <dan.j.williams@intel.com>
Newsgroups linux.kernel
Subject Re: [GIT PULL] memremap fix for 4.3
Date 2015-10-29 21:10 +0100
Message-ID <qp1Gi-4Oq-7@gated-at.bofh.it> (permalink)
References <qoQrv-66j-3@gated-at.bofh.it> <qoZ1M-34X-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Oct 29, 2015 at 10:09 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Thu, Oct 29, 2015 at 08:00:13AM +0000, Williams, Dan J wrote:
>> Hi Linus, please pull from:
>>
>>   git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes
>>
>> ...to receive a small fixlet for 4.3.
>>
>> The new memremap() api introduced in the 4.3 cycle to unify/replace
>> ioremap_cache() and ioremap_wt() is mishandling the highmem case.  This
>> patch has received a build success notification from a 0day-kbuild-robot
>> run and has been out for a review for a day.  Russell has not had a
>> chance to weigh in on it yet.
>
> Oh, was this merged for 4.3-rc1?  I haven't noticed any problems if it
> has.
>
>> I do not think the usage of kmap is strictly necessary as we should be
>> able to fall back to ioremap_cache(), but I include it for two reasons:
>>
>> 1/ ARM ioremap() will WARN if passed a pfn_valid() address.
>
> We don't support ioremap() on system RAM on ARM, period.  That's because
> ioremap() sets up page tables with incompatible attributes compared to
> those which are/will be setup by the lowmem/kmap* mappings, which leads
> to "unpredictable" behaviour.
>
> The only time RAM is mappable with ioremap() is if it's stolen from the
> kernel at boot time, which prevents the kernel from managing it and
> setting up memory-like mappings.
>

Ok, I read that as: "if someone calls memremap() on a 'System RAM'
address on ARM and we can't find the kernel linear address then just
pass it through to arch level remap code where it should rightly
WARN."  I'll reflow the patch with that change.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[GIT PULL] memremap fix for 4.3 "Williams, Dan J" <dan.j.williams@intel.com> - 2015-10-29 09:10 +0100
  Re: [GIT PULL] memremap fix for 4.3 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-10-29 14:00 +0100
  Re: [GIT PULL] memremap fix for 4.3 Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-29 18:20 +0100
    Re: [GIT PULL] memremap fix for 4.3 Dan Williams <dan.j.williams@intel.com> - 2015-10-29 21:10 +0100

csiph-web