From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754721Ab2HAH4T (ORCPT ); Wed, 1 Aug 2012 03:56:19 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:64797 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753654Ab2HAH4S (ORCPT ); Wed, 1 Aug 2012 03:56:18 -0400 Message-ID: <5018E11E.7080907@linaro.org> Date: Wed, 01 Aug 2012 08:56:14 +0100 From: Lee Jones User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Russell King - ARM Linux CC: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, linus.walleij@stericsson.com, broonie@opensource.wolfsonmicro.com, olalilja@yahoo.se, STEricsson_nomadik_linux@list.st.com, lrg@ti.com Subject: Re: [PATCH 5/6] ARM: ux500: Enable HIGHMEM on all mop500 platforms References: <1343741493-17671-1-git-send-email-lee.jones@linaro.org> <5017EBDC.6010005@linaro.org> <20120731143732.GS6802@n2100.arm.linux.org.uk> <201207312050.03113.arnd@arndb.de> <20120731220145.GD10335@n2100.arm.linux.org.uk> In-Reply-To: <20120731220145.GD10335@n2100.arm.linux.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/07/12 23:01, Russell King - ARM Linux wrote: > On Tue, Jul 31, 2012 at 08:50:02PM +0000, Arnd Bergmann wrote: >> On Tuesday 31 July 2012, Russell King - ARM Linux wrote: >>> I still fail to see how not having highmem enabled would ever cause memory >>> corruption errors (unless something dealing with memory in a very very >>> wrong way - iow, not using one of the reservation or memory allocation >>> methods provided by the kernel.) >> >> The problem is that all users of ux500 systems pass a command line like >> >> vmalloc=256M mem=128M@0 mali.mali_mem=32M@128M hwmem=168M@160M mem=48M@328M mem_issw=1M@383M mem=640M@384M >> >> This is of course totally bogus and should not be done. If I understand >> Lee correctly, one of the issues resulting from passing a command >> line like this without enabling highmem is memory corruption. > > But the question is _why_ does that corruption happen. > > From the above, we will end up with the kernel getting: > > 0x00000000 - 0x07ffffff (128M @ 0) > 0x14800000 - 0x177fffff (48M @ 328M) > 0x18000000 - 0x3fffffff (640M @ 384M) > > with: > > 0x08000000 - 0x081fffff used for mali > 0x0a000000 - 0x147fffff used for hwmem > 0x17f00000 - 0x17ffffff used for mem_issw > > Now, with highmem disabled, the kernel should still map exactly the > regions: 0x00000000 - 0x07ffffff, 0x14800000 - 0x177fffff, into the > direct mapped region, and truncate the 0x18000000 - 0x3fffffff > region appropriately, reducing the amount of memory available such > that it won't overlap the vmalloc area (which you've specified to be > a minimum of 256M.) > > This should _NOT_ cause any memory corruption. > > So, come on guys. Debugging is *mandatory* for this kind of problem. > Papering over it is obscene. Actually I didn't go any further with it, as I changed to another identical piece of hardware and couldn't reproduce the issue. FYI, here's the boot log from the broken board: http://paste.ubuntu.com/1102017/ -- Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 5/6] ARM: ux500: Enable HIGHMEM on all mop500 platforms Date: Wed, 01 Aug 2012 08:56:14 +0100 Message-ID: <5018E11E.7080907@linaro.org> References: <1343741493-17671-1-git-send-email-lee.jones@linaro.org> <5017EBDC.6010005@linaro.org> <20120731143732.GS6802@n2100.arm.linux.org.uk> <201207312050.03113.arnd@arndb.de> <20120731220145.GD10335@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; Format="flowed" Content-Transfer-Encoding: base64 Return-path: Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by alsa0.perex.cz (Postfix) with ESMTP id D5E30265B83 for ; Wed, 1 Aug 2012 09:56:14 +0200 (CEST) Received: by eeke50 with SMTP id e50so1521617eek.38 for ; Wed, 01 Aug 2012 00:56:17 -0700 (PDT) In-Reply-To: <20120731220145.GD10335@n2100.arm.linux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Russell King - ARM Linux Cc: ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, linus.walleij@stericsson.com, Arnd Bergmann , broonie@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, olalilja@yahoo.se, STEricsson_nomadik_linux@list.st.com, lrg@ti.com, linux-arm-kernel@lists.infradead.org List-Id: alsa-devel@alsa-project.org T24gMzEvMDcvMTIgMjM6MDEsIFJ1c3NlbGwgS2luZyAtIEFSTSBMaW51eCB3cm90ZToKPiBPbiBU dWUsIEp1bCAzMSwgMjAxMiBhdCAwODo1MDowMlBNICswMDAwLCBBcm5kIEJlcmdtYW5uIHdyb3Rl Ogo+PiBPbiBUdWVzZGF5IDMxIEp1bHkgMjAxMiwgUnVzc2VsbCBLaW5nIC0gQVJNIExpbnV4IHdy b3RlOgo+Pj4gSSBzdGlsbCBmYWlsIHRvIHNlZSBob3cgbm90IGhhdmluZyBoaWdobWVtIGVuYWJs ZWQgd291bGQgZXZlciBjYXVzZSBtZW1vcnkKPj4+IGNvcnJ1cHRpb24gZXJyb3JzICh1bmxlc3Mg c29tZXRoaW5nIGRlYWxpbmcgd2l0aCBtZW1vcnkgaW4gYSB2ZXJ5IHZlcnkKPj4+IHdyb25nIHdh eSAtIGlvdywgbm90IHVzaW5nIG9uZSBvZiB0aGUgcmVzZXJ2YXRpb24gb3IgbWVtb3J5IGFsbG9j YXRpb24KPj4+IG1ldGhvZHMgcHJvdmlkZWQgYnkgdGhlIGtlcm5lbC4pCj4+Cj4+IFRoZSBwcm9i bG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IHNvZnR3YXJlIGZvciBB Uk0gU29DcwpGb2xsb3cgTGluYXJvOiBGYWNlYm9vayB8IFR3aXR0ZXIgfCBCbG9nCl9fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCkFsc2EtZGV2ZWwgbWFpbGlu ZyBsaXN0CkFsc2EtZGV2ZWxAYWxzYS1wcm9qZWN0Lm9yZwpodHRwOi8vbWFpbG1hbi5hbHNhLXBy b2plY3Qub3JnL21haWxtYW4vbGlzdGluZm8vYWxzYS1kZXZlbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Wed, 01 Aug 2012 08:56:14 +0100 Subject: [PATCH 5/6] ARM: ux500: Enable HIGHMEM on all mop500 platforms In-Reply-To: <20120731220145.GD10335@n2100.arm.linux.org.uk> References: <1343741493-17671-1-git-send-email-lee.jones@linaro.org> <5017EBDC.6010005@linaro.org> <20120731143732.GS6802@n2100.arm.linux.org.uk> <201207312050.03113.arnd@arndb.de> <20120731220145.GD10335@n2100.arm.linux.org.uk> Message-ID: <5018E11E.7080907@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 31/07/12 23:01, Russell King - ARM Linux wrote: > On Tue, Jul 31, 2012 at 08:50:02PM +0000, Arnd Bergmann wrote: >> On Tuesday 31 July 2012, Russell King - ARM Linux wrote: >>> I still fail to see how not having highmem enabled would ever cause memory >>> corruption errors (unless something dealing with memory in a very very >>> wrong way - iow, not using one of the reservation or memory allocation >>> methods provided by the kernel.) >> >> The problem is that all users of ux500 systems pass a command line like >> >> vmalloc=256M mem=128M at 0 mali.mali_mem=32M at 128M hwmem=168M at 160M mem=48M at 328M mem_issw=1M at 383M mem=640M at 384M >> >> This is of course totally bogus and should not be done. If I understand >> Lee correctly, one of the issues resulting from passing a command >> line like this without enabling highmem is memory corruption. > > But the question is _why_ does that corruption happen. > > From the above, we will end up with the kernel getting: > > 0x00000000 - 0x07ffffff (128M @ 0) > 0x14800000 - 0x177fffff (48M @ 328M) > 0x18000000 - 0x3fffffff (640M @ 384M) > > with: > > 0x08000000 - 0x081fffff used for mali > 0x0a000000 - 0x147fffff used for hwmem > 0x17f00000 - 0x17ffffff used for mem_issw > > Now, with highmem disabled, the kernel should still map exactly the > regions: 0x00000000 - 0x07ffffff, 0x14800000 - 0x177fffff, into the > direct mapped region, and truncate the 0x18000000 - 0x3fffffff > region appropriately, reducing the amount of memory available such > that it won't overlap the vmalloc area (which you've specified to be > a minimum of 256M.) > > This should _NOT_ cause any memory corruption. > > So, come on guys. Debugging is *mandatory* for this kind of problem. > Papering over it is obscene. Actually I didn't go any further with it, as I changed to another identical piece of hardware and couldn't reproduce the issue. FYI, here's the boot log from the broken board: http://paste.ubuntu.com/1102017/ -- Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog