Skip to content

Commit

Permalink
serial: Make uart_port's ioport "unsigned long".
Browse files Browse the repository at this point in the history
Otherwise the top 32-bits of the resource value get chopped
off on 64-bit systems, and the resulting I/O accesses go to
random places.

Thanks to testing and debugging by Josip Rodin, which helped
track this down.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Miller authored and Linus Torvalds committed Oct 13, 2008
1 parent 7459b6f commit 0c8946d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/serial_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ typedef unsigned int __bitwise__ upf_t;

struct uart_port {
spinlock_t lock; /* port lock */
unsigned int iobase; /* in/out[bwl] */
unsigned long iobase; /* in/out[bwl] */
unsigned char __iomem *membase; /* read/write[bwl] */
unsigned int irq; /* irq number */
unsigned int uartclk; /* base uart clock */
Expand Down

0 comments on commit 0c8946d

Please sign in to comment.