linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sposelenov@emcraft.com (Sergei Poselenov)
To: linux-arm-kernel@lists.infradead.org
Subject: insmod problem on ARM with more than 16MB of RAM?
Date: Thu, 22 Dec 2011 20:35:31 +0400	[thread overview]
Message-ID: <20111222203531.0c4f80f1@emcraft.com> (raw)

Hi all,

I'm working with an ARM Cortex-M3 port of Linux 2.6.33. Everything is
fine except the target board has 32MB memory and this breaks the
loadable modules support:
...
~ # insmod sample.ko 
sample: relocation out of range, section 2 reloc 0 sym 'printk'
insmod: can't insert 'sample.ko': invalid module format
~ # 
..

The reason for this error is that the module_alloc() for non-MMU
ARM target is just kmalloc(size), which obviously returns the memory
area too far for allowed range of the thumb2 branch instructions.

Currently, I worked around this by restricting kernel memory usage with
"mem=16M".

Is anybody solved this problem in 2.6 no-MMU ARM kernels?

In the lists I only found this thread
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-January/037837.html
, but it discussed different problem.

I looked at the recent 3.x kernels and didn't see support for loadable
modules at all for the non-mmu ARM. Any plans to add it there?

Merry Christmas!

Regards,
Sergei

             reply	other threads:[~2011-12-22 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 16:35 Sergei Poselenov [this message]
2011-12-22 16:49 ` insmod problem on ARM with more than 16MB of RAM? Catalin Marinas
2011-12-22 20:45   ` Russell King - ARM Linux
2012-02-03 16:12     ` Vladimir K

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=20111222203531.0c4f80f1@emcraft.com \
    --to=sposelenov@emcraft.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).