From: andreas.fenkart@streamunlimited.com (Andreas Fenkart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] Made VMALLOC_END of type unsigned long.
Date: Thu, 1 Oct 2009 12:47:15 +0200 [thread overview]
Message-ID: <20091001104715.GA25067@CCCP> (raw)
In-Reply-To: <20090619094640.GD22234@n2100.arm.linux.org.uk>
On Fri, Jun 19, 2009 at 10:46:40AM +0100, Russell King - ARM Linux wrote:
> On Tue, Jun 16, 2009 at 02:38:07PM +0200, Andreas Fenkart wrote:
> > This makes VMALLOC_END consistent with VMALLOC_START
> > diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h
> > index 2479785..81c4269 100644
> > --- a/arch/arm/mach-davinci/include/mach/io.h
> > +++ b/arch/arm/mach-davinci/include/mach/io.h
> > @@ -18,7 +18,7 @@
> > * I/O mapping
> > * ----------------------------------------------------------------------------
> > */
> > -#define IO_PHYS 0x01c00000
> > +#define IO_PHYS 0x01c00000UL
>
> Why is this change required?
Davinci defines VMALLOC_END this way:
#define VMALLOC_END (IO_VIRT - (2<<20))
The simple solution would be to prefix the VMALLOC_END with UL,
the alternative to make IO_VIRT unsinged long.
IO_VIRT and recurses are defined in mach/hardware.h
#define IO_PHYS 0x01c00000UL
#define IO_OFFSET 0xfd000000 /* Virtual IO = 0xfec00000 */
#define IO_SIZE 0x00400000
#define IO_VIRT (IO_PHYS + IO_OFFSET)
Changing IO_VIRT to unsigned long should be fine. Virtual
addresses are mostly unsigned long,@least VMALLOC_START,
PAGE_OFFSET are. See below for complete list of IO_VIRT usage.
IO_PHYS should not be changed though, since it is assigned to
unsigned int fields.
So I changed the patch, and made only IO_VIRT unsigned long:
#define IO_PHYS 0x01c00000
#define IO_OFFSET 0xfd000000 /* Virtual IO = 0xfec00000 */
#define IO_SIZE 0x00400000
-#define IO_VIRT (IO_PHYS + IO_OFFSET)
+#define IO_VIRT UL(IO_PHYS + IO_OFFSET)
Andreas
----
IO_VIRT:
-assigned to struct map_desc / unsigned long virtual;
-used as return value in void __iomem *davinci_ioremap function;
-used in define DA8XX_CP_INTC_VIRT, which recursively is used as:
--assigned to struct map_desc / unsigned long virtual;
--assigned to struct davinci_soc_info / void __iomem *intc_base;
-used in define of VMALLOC_END
IO_PHYS:
-assigned to struct machine_desc / unsigned int phys_io;
-assigned to struct machine_desc / unsigned int io_pg_offst;
-shifted and assigned to struct map_desc / unsigned long pfn;
-used defines for UART base address, which are:
--via plat_serial8250_port / resource_size_t mapbase
---assigned to type phys_addr_t
-used defines for TIMER base address, which recursively are:
--assigned to struct davinci_timer_instance / void __iomem *base;
-used defines for WDOG base address, which are:
--via struct resource / resource_size_t start
---assigned to type phys_addr_t
next parent reply other threads:[~2009-10-01 10:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1245155890204-git-send-email-andreas.fenkart@streamunlimited.com>
[not found] ` <20090619094640.GD22234@n2100.arm.linux.org.uk>
2009-10-01 10:47 ` Andreas Fenkart [this message]
2009-10-01 13:03 ` [PATCH 1/4] Made VMALLOC_END of type unsigned long Russell King - ARM Linux
2009-10-01 18:32 ` Uwe Kleine-König
2009-10-01 18:39 ` Russell King - ARM Linux
[not found] <20090810213905.GA4046@n2100.arm.linux.org.uk>
2009-10-01 10:48 ` Andreas Fenkart
2009-10-01 13:05 ` Russell King - ARM Linux
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=20091001104715.GA25067@CCCP \
--to=andreas.fenkart@streamunlimited.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.