Skip to contentSkip to conversation

: serial: Make uart_port's ioport "unsigned long".

PATCH In review David Miller 1 participant 1 message Sep 13, 2008 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 : serial: Make uart_port's ioport "unsigned long".

serial: Make uart_port's ioport "unsigned long".

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.

---
 include/linux/serial_core.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/serial_core.h +1 -1
index 3b2f6c0..e27f216 100644
@@ -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 */
Signature · 1 line
1.5.6.5.GIT