linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: notasas@gmail.com (Grazvydas Ignotas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/14] omap: Map only available sram memory
Date: Fri, 1 Oct 2010 23:15:44 +0300	[thread overview]
Message-ID: <AANLkTi=PM1x7zXbSMRxBHVZ5Z2+4iwebvbiGizca_rC8@mail.gmail.com> (raw)
In-Reply-To: <1284716878-27667-3-git-send-email-santosh.shilimkar@ti.com>

On Fri, Sep 17, 2010 at 12:47 PM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> Currently we map 1 MB section while setting up SRAM on OMAPs.
> The actual physcal OCM RAM available on OMAP SOCs is in order
> of KBs. This patch maps only available sram and removes some
> non necessary cpu_is_xxx checks.
>
> On the newer ARMs with speculation, this is dangerous and can
> result in untraceable aborts.
>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

This hangs OMAP3 pandora:

[    0.000000] Linux version
2.6.36-rc6-next-20101001-00002-ge76bb53-dirty (notaz at pixelinis) (gcc
version 4.3.3 (Sourcery G++ Lite 2009q1-20
[    0.000000] CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=10c53c7f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing
instruction cache
[    0.000000] Machine: Pandora Handheld Console
[    0.000000] Ignoring unrecognised tag 0x54410008
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Reserving 6422528 bytes SDRAM for VRAM
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] OMAP3430/3530 ES2.1 (l2cache iva sgx neon isp )
[    0.000000] SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
(stuck here)

reverting this fixes the problem.

> ---
> ?arch/arm/plat-omap/sram.c | ? 25 +++++--------------------
> ?1 files changed, 5 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
> index 226b2e8..10b3b4c 100644
> --- a/arch/arm/plat-omap/sram.c
> +++ b/arch/arm/plat-omap/sram.c
> @@ -220,20 +220,7 @@ void __init omap_map_sram(void)
> ? ? ? ?if (omap_sram_size == 0)
> ? ? ? ? ? ? ? ?return;
>
> - ? ? ? if (cpu_is_omap24xx()) {
> - ? ? ? ? ? ? ? omap_sram_io_desc[0].virtual = OMAP2_SRAM_VA;
> -
> - ? ? ? ? ? ? ? base = OMAP2_SRAM_PA;
> - ? ? ? ? ? ? ? base = ROUND_DOWN(base, PAGE_SIZE);
> - ? ? ? ? ? ? ? omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
> - ? ? ? }
> -
> ? ? ? ?if (cpu_is_omap34xx()) {
> - ? ? ? ? ? ? ? omap_sram_io_desc[0].virtual = OMAP3_SRAM_VA;
> - ? ? ? ? ? ? ? base = OMAP3_SRAM_PA;
> - ? ? ? ? ? ? ? base = ROUND_DOWN(base, PAGE_SIZE);
> - ? ? ? ? ? ? ? omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
> -
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * SRAM must be marked as non-cached on OMAP3 since the
> ? ? ? ? ? ? ? ? * CORE DPLL M2 divider change code (in SRAM) runs with the
> @@ -244,13 +231,11 @@ void __init omap_map_sram(void)
> ? ? ? ? ? ? ? ?omap_sram_io_desc[0].type = MT_MEMORY_NONCACHED;
> ? ? ? ?}
>
> - ? ? ? if (cpu_is_omap44xx()) {
> - ? ? ? ? ? ? ? omap_sram_io_desc[0].virtual = OMAP4_SRAM_VA;
> - ? ? ? ? ? ? ? base = OMAP4_SRAM_PA;
> - ? ? ? ? ? ? ? base = ROUND_DOWN(base, PAGE_SIZE);
> - ? ? ? ? ? ? ? omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
> - ? ? ? }
> - ? ? ? omap_sram_io_desc[0].length = 1024 * 1024; ? ? ?/* Use section desc */
> + ? ? ? omap_sram_io_desc[0].virtual = omap_sram_base;
> + ? ? ? base = omap_sram_start;
> + ? ? ? base = ROUND_DOWN(base, PAGE_SIZE);
> + ? ? ? omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
> + ? ? ? omap_sram_io_desc[0].length = ROUND_DOWN(omap_sram_size, PAGE_SIZE);
> ? ? ? ?iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc));
>
> ? ? ? ?printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n",
> --
> 1.6.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>

  parent reply	other threads:[~2010-10-01 20:15 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-17  9:47 [PATCH 00/14] omap sram, omap4 control module and es2.0 support Santosh Shilimkar
2010-09-17  9:47 ` [PATCH 01/14] ARM: mmu: Setup MT_MEMORY and MT_MEMORY_NONCACHED L1 entries Santosh Shilimkar
2010-09-17  9:47   ` [PATCH 02/14] omap: Map only available sram memory Santosh Shilimkar
2010-09-17  9:47     ` [PATCH 03/14] davinci: map sram using MT_MEMORY_NONCACHED instead of MT_DEVICE Santosh Shilimkar
2010-09-17  9:47       ` [PATCH 04/14] omap4: control: Add ctrl_pad_base to omap_globals Santosh Shilimkar
2010-09-17  9:47         ` [PATCH 05/14] omap4: control: Add accessor api's for pad control module Santosh Shilimkar
2010-09-17  9:47           ` [PATCH 06/14] omap4: control: Add the register definition headers Santosh Shilimkar
2010-09-17  9:47             ` [PATCH 07/14] omap4: control: Fix the control module register accesses Santosh Shilimkar
2010-09-17  9:47               ` [PATCH 08/14] omap: sram: fix is_sram_locked check Santosh Shilimkar
2010-09-17  9:47                 ` [PATCH 09/14] omap4: sram: Fix start address Santosh Shilimkar
2010-09-17  9:47                   ` [PATCH 10/14] omap4: Update id.c and cpu.h for es2.0 Santosh Shilimkar
2010-09-17  9:47                     ` [PATCH 11/14] omap4: Fix silicon version detection for early samples Santosh Shilimkar
2010-09-17  9:47                       ` [PATCH 12/14] omap4: l2x0: Fix init parameter for es2.0 Santosh Shilimkar
2010-09-17  9:47                         ` [PATCH 13/14] omap4: Panda: Add DEBUG_LL support Santosh Shilimkar
2010-09-17  9:47                           ` [PATCH 14/14] omap4: Fix bootup crash observed with higher CPU clocks Santosh Shilimkar
2010-09-17 10:14                             ` Menon, Nishanth
2010-09-17 10:16                               ` Shilimkar, Santosh
2010-09-17 10:27                                 ` Menon, Nishanth
2010-09-17 10:30                                   ` Shilimkar, Santosh
2010-09-17 10:41                                     ` Felipe Balbi
2010-09-17 11:17                                       ` Shilimkar, Santosh
2010-09-17 11:19                                         ` Felipe Balbi
2010-09-17 11:24                                           ` Shilimkar, Santosh
2010-09-17 10:37                               ` Felipe Balbi
2010-09-17 10:18                       ` [PATCH 11/14] omap4: Fix silicon version detection for early samples Menon, Nishanth
2010-09-17 10:23                         ` Shilimkar, Santosh
2010-09-17 10:17           ` [PATCH 05/14] omap4: control: Add accessor api's for pad control module Menon, Nishanth
2010-09-17 10:16       ` [PATCH 03/14] davinci: map sram using MT_MEMORY_NONCACHED instead of MT_DEVICE Russell King - ARM Linux
2010-09-17 10:18         ` Shilimkar, Santosh
2010-09-17 10:15     ` [PATCH 02/14] omap: Map only available sram memory Russell King - ARM Linux
2010-09-17 11:11       ` Shilimkar, Santosh
2010-10-01 20:15     ` Grazvydas Ignotas [this message]
2010-10-01 22:53       ` Tony Lindgren
2010-10-02  7:49         ` Shilimkar, Santosh
2010-10-04  9:03           ` Grazvydas Ignotas
2010-10-04  9:38             ` Shilimkar, Santosh
2010-10-04 13:24               ` Shilimkar, Santosh
2010-10-04 23:44                 ` Grazvydas Ignotas
2010-10-05  0:34                   ` Tony Lindgren
2010-10-05  0:36                     ` Tony Lindgren
2010-10-05  5:15                   ` Shilimkar, Santosh
2010-09-17 16:41   ` [PATCH 01/14] ARM: mmu: Setup MT_MEMORY and MT_MEMORY_NONCACHED L1 entries Tony Lindgren
2010-09-29 14:51   ` Catalin Marinas
2010-09-29 15:01     ` Shilimkar, Santosh
2010-09-29 15:02     ` Russell King - ARM Linux
2010-09-17 15:06 ` [PATCH 00/14] omap sram, omap4 control module and es2.0 support Bryan Wu
2010-09-17 15:10   ` Shilimkar, Santosh
2010-09-17 17:50 ` Paul Walmsley
2010-09-18  7:32   ` Shilimkar, Santosh
2010-09-24  1:13     ` Tony Lindgren
2010-09-24  4:51       ` Shilimkar, Santosh
2010-09-24  6:42       ` Shilimkar, Santosh

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='AANLkTi=PM1x7zXbSMRxBHVZ5Z2+4iwebvbiGizca_rC8@mail.gmail.com' \
    --to=notasas@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).