* [PATCH] serial: Make uart_port's ioport "resource_size_t"
@ 2008-10-14 16:26 Josh Boyer
2008-10-16 21:46 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Josh Boyer @ 2008-10-14 16:26 UTC (permalink / raw)
To: davem, alan; +Cc: linux-kernel
Recently uart_port's iobase was changed to be an 'unsigned
long' to avoid chopping off the upper 32-bits of the
address on 64-bit CPUs. However, there are CPUs that are
32-bit but have a 64-bit address space. This changes
iobase to be 'resource_size_t' to accommodate those types
of systems. This also matches what is done for the mapbase
member of uart_port.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index e27f216..cb0185b 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -241,7 +241,7 @@ typedef unsigned int __bitwise__ upf_t;
struct uart_port {
spinlock_t lock; /* port lock */
- unsigned long iobase; /* in/out[bwl] */
+ resource_size_t iobase; /* in/out[bwl] */
unsigned char __iomem *membase; /* read/write[bwl] */
unsigned int irq; /* irq number */
unsigned int uartclk; /* base uart clock */
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: Make uart_port's ioport "resource_size_t"
2008-10-14 16:26 [PATCH] serial: Make uart_port's ioport "resource_size_t" Josh Boyer
@ 2008-10-16 21:46 ` Andrew Morton
2008-10-16 23:44 ` Josh Boyer
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2008-10-16 21:46 UTC (permalink / raw)
To: Josh Boyer; +Cc: davem, alan, linux-kernel
On Tue, 14 Oct 2008 12:26:21 -0400
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> Recently uart_port's iobase was changed to be an 'unsigned
> long' to avoid chopping off the upper 32-bits of the
> address on 64-bit CPUs. However, there are CPUs that are
> 32-bit but have a 64-bit address space. This changes
> iobase to be 'resource_size_t' to accommodate those types
> of systems. This also matches what is done for the mapbase
> member of uart_port.
>
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
>
> ---
>
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index e27f216..cb0185b 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -241,7 +241,7 @@ typedef unsigned int __bitwise__ upf_t;
>
> struct uart_port {
> spinlock_t lock; /* port lock */
> - unsigned long iobase; /* in/out[bwl] */
> + resource_size_t iobase; /* in/out[bwl] */
> unsigned char __iomem *membase; /* read/write[bwl] */
> unsigned int irq; /* irq number */
> unsigned int uartclk; /* base uart clock */
This will of course require that all now-broken printk()s be unbroken.
I spot two in serial_core.c alone.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: Make uart_port's ioport "resource_size_t"
2008-10-16 21:46 ` Andrew Morton
@ 2008-10-16 23:44 ` Josh Boyer
2008-10-17 0:38 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Josh Boyer @ 2008-10-16 23:44 UTC (permalink / raw)
To: Andrew Morton; +Cc: davem, alan, linux-kernel
On Thu, 16 Oct 2008 14:46:45 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Tue, 14 Oct 2008 12:26:21 -0400
> Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
>
> > Recently uart_port's iobase was changed to be an 'unsigned
> > long' to avoid chopping off the upper 32-bits of the
> > address on 64-bit CPUs. However, there are CPUs that are
> > 32-bit but have a 64-bit address space. This changes
> > iobase to be 'resource_size_t' to accommodate those types
> > of systems. This also matches what is done for the mapbase
> > member of uart_port.
> >
> > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> >
> > ---
> >
> > diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> > index e27f216..cb0185b 100644
> > --- a/include/linux/serial_core.h
> > +++ b/include/linux/serial_core.h
> > @@ -241,7 +241,7 @@ typedef unsigned int __bitwise__ upf_t;
> >
> > struct uart_port {
> > spinlock_t lock; /* port lock */
> > - unsigned long iobase; /* in/out[bwl] */
> > + resource_size_t iobase; /* in/out[bwl] */
> > unsigned char __iomem *membase; /* read/write[bwl] */
> > unsigned int irq; /* irq number */
> > unsigned int uartclk; /* base uart clock */
>
> This will of course require that all now-broken printk()s be unbroken.
> I spot two in serial_core.c alone.
Yes, I know that. There's a patch, or at least a discussion, floating
around on how to fix this with a %pX thing right? We can delay this
until that comes to fruition if you'd like.
josh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: Make uart_port's ioport "resource_size_t"
2008-10-16 23:44 ` Josh Boyer
@ 2008-10-17 0:38 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2008-10-17 0:38 UTC (permalink / raw)
To: Josh Boyer; +Cc: davem, alan, linux-kernel
On Thu, 16 Oct 2008 19:44:37 -0400 Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> On Thu, 16 Oct 2008 14:46:45 -0700
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > On Tue, 14 Oct 2008 12:26:21 -0400
> > Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> >
> > > Recently uart_port's iobase was changed to be an 'unsigned
> > > long' to avoid chopping off the upper 32-bits of the
> > > address on 64-bit CPUs. However, there are CPUs that are
> > > 32-bit but have a 64-bit address space. This changes
> > > iobase to be 'resource_size_t' to accommodate those types
> > > of systems. This also matches what is done for the mapbase
> > > member of uart_port.
> > >
> > > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> > >
> > > ---
> > >
> > > diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> > > index e27f216..cb0185b 100644
> > > --- a/include/linux/serial_core.h
> > > +++ b/include/linux/serial_core.h
> > > @@ -241,7 +241,7 @@ typedef unsigned int __bitwise__ upf_t;
> > >
> > > struct uart_port {
> > > spinlock_t lock; /* port lock */
> > > - unsigned long iobase; /* in/out[bwl] */
> > > + resource_size_t iobase; /* in/out[bwl] */
> > > unsigned char __iomem *membase; /* read/write[bwl] */
> > > unsigned int irq; /* irq number */
> > > unsigned int uartclk; /* base uart clock */
> >
> > This will of course require that all now-broken printk()s be unbroken.
> > I spot two in serial_core.c alone.
>
> Yes, I know that. There's a patch, or at least a discussion, floating
> around on how to fix this with a %pX thing right? We can delay this
> until that comes to fruition if you'd like.
>
Well. It just got converted from uint to ulong and we're still fixing
the bugs which that introduced.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-17 0:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14 16:26 [PATCH] serial: Make uart_port's ioport "resource_size_t" Josh Boyer
2008-10-16 21:46 ` Andrew Morton
2008-10-16 23:44 ` Josh Boyer
2008-10-17 0:38 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox