public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp@list.ru>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "Linux kernel" <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	"Gregory Clément" <gregory.clement@free-electrons.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Russell King - ARM Linux" <linux@arm.linux.org.uk>
Subject: Re: [PATCH] n_tty: use kmalloc() instead of vmalloc() to avoid crash on armada-xp
Date: Wed, 11 Mar 2015 20:26:53 +0300	[thread overview]
Message-ID: <55007ADD.6080505@list.ru> (raw)
In-Reply-To: <20150311175227.499612af@free-electrons.com>

11.03.2015 19:52, Thomas Petazzoni пишет:
> Dear Stas Sergeev,
> No, this is not the right fix. The right fix is to upgrade your
> bootloader to a non-buggy one.
>
> Basically, the problem is that the memory information passed by the
> bootloader to the kernel is not consistent with the MBus base address
> which is the limit between RAM (below the MBus base address) and I/O
> registers (above the MBus base address).
>
> The bootloader tells the kernel that the RAM up to 0xf0000000 is
> usable, but sets the MBus base address to 0xe0000000. So whenever the
> kernel accesses 0xe0000000 -> 0xf0000000, it crashes, because you're
> not hitting RAM but MBus windows (and there are most likely no MBus
> window mapped in this space).
>
> Since kmalloc() relies on the identity mapping, it happens to mainly
> use pages at the beginning of the physical memory, which are OK. But
> vmalloc() happens to start using pages at the end of the physical
> memory (which are not part of the identity mapping), so that's why
> you're seeing this on the first access to a vmalloc()ed area.
>
> This problem has already been reported to Marvell and they have fixed
> it in their U-Boot. Please upgrade your bootloader, since there is not
> much the kernel can do about this: the bootloader is simply lying to
> the kernel about the amount of memory that is accessible.
Hello Thomas, thanks for that info!

Is there a quick way to test that?
I used memmap=0x20000000$0xe0000000 but nothing changed...

  reply	other threads:[~2015-03-11 17:27 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 16:54 [PATCH] n_tty: use kmalloc() instead of vmalloc() to avoid crash on armada-xp Stas Sergeev
2015-03-10 17:17 ` Catalin Marinas
2015-03-10 17:27   ` Stas Sergeev
2015-03-10 17:38     ` Russell King - ARM Linux
2015-03-10 18:31       ` Stas Sergeev
2015-03-10 18:54         ` Russell King - ARM Linux
2015-03-11 12:30       ` Stas Sergeev
2015-03-11 12:47         ` Russell King - ARM Linux
2015-03-11 14:24           ` Stas Sergeev
2015-03-11 16:30             ` Peter Hurley
2015-03-11 16:39               ` Stas Sergeev
2015-03-12 12:33             ` Peter Hurley
2015-03-12 12:47               ` Stas Sergeev
2015-03-12 13:04                 ` Russell King - ARM Linux
2015-03-12 13:11                   ` Stas Sergeev
2015-03-12 15:34                     ` Vladimir Murzin
2015-03-12 12:59               ` Russell King - ARM Linux
2015-03-10 17:29 ` Russell King - ARM Linux
2015-03-10 17:35 ` Peter Hurley
2015-03-10 17:51   ` Stas Sergeev
2015-03-10 18:45     ` Peter Hurley
2015-03-11 12:44 ` Gregory CLEMENT
2015-03-11 12:57   ` Stas Sergeev
2015-03-11 13:14   ` Russell King - ARM Linux
2015-03-11 14:33     ` Stas Sergeev
2015-03-11 15:01     ` Stas Sergeev
2015-03-11 15:13       ` Gregory CLEMENT
2015-03-11 15:22         ` Stas Sergeev
2015-03-12 13:06           ` Russell King - ARM Linux
2015-03-11 16:52 ` Thomas Petazzoni
2015-03-11 17:26   ` Stas Sergeev [this message]
2015-03-11 17:46     ` Russell King - ARM Linux
2015-03-11 17:56       ` Stas Sergeev
2015-03-11 18:11         ` Thomas Petazzoni
2015-03-11 18:38           ` Stas Sergeev
2015-03-11 18:41             ` Russell King - ARM Linux
2015-03-11 18:08       ` Stas Sergeev
2015-03-11 18:33         ` Thomas Petazzoni
2015-03-12 12:44           ` Stas Sergeev
2015-03-12 12:47             ` Thomas Petazzoni
2015-03-12 13:03               ` Stas Sergeev
2015-03-12 13:12                 ` Russell King - ARM Linux
2015-03-12 13:16                   ` Stas Sergeev
2015-03-12 13:55                 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55007ADD.6080505@list.ru \
    --to=stsp@list.ru \
    --cc=catalin.marinas@arm.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox