From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753541AbbCJR2U (ORCPT ); Tue, 10 Mar 2015 13:28:20 -0400 Received: from fallback7.mail.ru ([94.100.181.128]:56385 "EHLO fallback7.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753061AbbCJR2J (ORCPT ); Tue, 10 Mar 2015 13:28:09 -0400 Message-ID: <54FF2986.6020503@list.ru> Date: Tue, 10 Mar 2015 20:27:34 +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: Catalin Marinas CC: Andrew Morton , Linux kernel , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] n_tty: use kmalloc() instead of vmalloc() to avoid crash on armada-xp References: <54FF21BE.2040506@list.ru> <20150310171751.GD13687@e104818-lin.cambridge.arm.com> In-Reply-To: <20150310171751.GD13687@e104818-lin.cambridge.arm.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 10.03.2015 20:17, Catalin Marinas пишет: > On Tue, Mar 10, 2015 at 07:54:22PM +0300, Stas Sergeev wrote: >> Hello, the patch below is needed for a successful boot on armada-xp. >> >> -=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=- >> This fixes the following crash at boot: >> >> Unhandled fault: external abort on non-linefetch (0x808) at 0xf00ca018 >> Internal error: : 808 [#1] SMP ARM > I think you have some other problems. Likely, but IMHO the patch is still fine, there should be kmalloc() anyway. I'd like to find the roots of the problem, but I think the patch can be applied regardless. > That's an external abort, which > means that the original vmalloc'ed memory was not mapping RAM but some > empty physical address space. > > That's unless strex hits device memory and not having an exclusive > monitor causes such external abort. But vmalloc() memory is Normal > Cacheable. Some pointer could go wrong and it hits ioremap'ed memory > which is in the same range as vmalloc'ed memory. But strex is preceded by ldrex, which succeeds. I am not arm guru at all, but if we hit empty space or ioremap memory, shouldn't the ldrex also abort? It doesn't. Any hints how can I make a better diagnostic? Please also find the same crash here: http://lists.linaro.org/pipermail/kernel-build-reports/2014-June/003872.html --- Console logs for failures ========================= arm-mvebu_v7_defconfig+CONFIG_CPU_BIG_ENDIAN=y ---------------------------------------------- armada-xp-openblocks-ax3-4: FAIL: last 40 lines of boot log: ------------------------------------------------------------ 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 55048012 02109471 [] (_set_bit) from [] (n_tty_set_termios+0x234/0x348) [] (n_tty_set_termios) from [] (n_tty_open+0xec/0x114) ---