From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752977AbbCKR1J (ORCPT ); Wed, 11 Mar 2015 13:27:09 -0400 Received: from smtp48.i.mail.ru ([94.100.177.108]:52068 "EHLO smtp48.i.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbbCKR1F (ORCPT ); Wed, 11 Mar 2015 13:27:05 -0400 Message-ID: <55007ADD.6080505@list.ru> Date: Wed, 11 Mar 2015 20:26:53 +0300 From: Stas Sergeev User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Thomas Petazzoni CC: Linux kernel , linux-arm-kernel@lists.infradead.org, =?UTF-8?B?R3JlZ29yeSBDbMOpbWVudA==?= , Catalin Marinas , Russell King - ARM Linux Subject: Re: [PATCH] n_tty: use kmalloc() instead of vmalloc() to avoid crash on armada-xp References: <54FF21BE.2040506@list.ru> <20150311175227.499612af@free-electrons.com> In-Reply-To: <20150311175227.499612af@free-electrons.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam: Not detected X-Mras: Ok Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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...