From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC,PATCH 2/2] arm: use addruart macro to establish debug mappings
Date: Mon, 12 Jul 2010 14:52:59 +0100 [thread overview]
Message-ID: <20100712135259.GC6577@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1278903792.388155.428219242752.2.gpush@pororo>
On Mon, Jul 12, 2010 at 11:03:12AM +0800, Jeremy Kerr wrote:
> - ldr r3, [r8, #MACHINFO_PGOFFIO]
> + mov r3, #1
> + addruart r3, r0
> + lsr r3, r3, #20
> + lsl r3, r3, #2
> +
> add r0, r4, r3
> rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long)
> cmp r3, #0x0800 @ limit to 512MB
> movhi r3, #0x0800
> add r6, r0, r3
> - ldr r3, [r8, #MACHINFO_PHYSIO]
> + mov r3, #0
> + addruart r3, r7
This is insufficient. We are setting up section mappings here, which
must have both the physical and virtual addresses aligned to a megabyte
boundary. You're aligning the virtual address but doing nothing with
the physical one.
I also agree with Nicolas - if we're going to do this, we want addruart
to return the virtual and physical addresses in two separate registers,
and then have the debug code select the appropriate one itself. That
will simply this code.
So I suggest:
Patch #1 - re-jig addruart to return both virtual and physical addresses.
Patch #2 - implement setup of debug mapping using addruart.
Patch #3 - remove phys_io and pgoffio from machine_desc.
I'd also suggest that the patches are against a recent kernel, esp.
patch #3 as there's been some changes recently in some of the
initializers.
next prev parent reply other threads:[~2010-07-12 13:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-12 3:03 [RFC,PATCH 0/2] Allow late mdesc detection Jeremy Kerr
2010-07-12 3:03 ` [RFC,PATCH 2/2] arm: use addruart macro to establish debug mappings Jeremy Kerr
2010-07-12 13:42 ` [RFC, PATCH " Nicolas Pitre
2010-07-12 13:52 ` Russell King - ARM Linux [this message]
2010-07-13 1:42 ` [RFC,PATCH " Jeremy Kerr
2010-07-12 3:03 ` [RFC,PATCH 1/2] arm: don't check MMU status in every addruart macro Jeremy Kerr
2010-07-12 13:32 ` [RFC, PATCH " Nicolas Pitre
2010-07-13 1:39 ` Jeremy Kerr
2010-07-12 3:39 ` [RFC,PATCH 0/2] Allow late mdesc detection Nicolas Pitre
2010-07-12 8:05 ` Jeremy Kerr
2010-07-12 8:39 ` Eric Miao
2010-07-12 13:11 ` Nicolas Pitre
2010-07-13 5:44 ` Eric Miao
2010-07-13 7:28 ` Russell King - ARM Linux
2010-07-13 9:02 ` Jeremy Kerr
2010-07-13 9:33 ` Russell King - ARM Linux
2010-07-14 3:25 ` Nicolas Pitre
2010-07-14 4:11 ` Jeremy Kerr
2010-07-14 15:36 ` Bryan Huntsman
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=20100712135259.GC6577@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).