···4848 unsigned char Ivec; /* POLLED or ivec number */4949 unsigned char Mode; /* Control stuff */5050 unsigned char Slot; /* Slot */5151- caddr_t Caddr; /* KV address of DPRAM */5252- struct DpRam *CardP; /* KV address of DPRAM, with overlay */5151+ void __iomem *Caddr; /* KV address of DPRAM */5252+ struct DpRam __iomem *CardP; /* KV address of DPRAM, with overlay */5353 unsigned long PaddrP; /* Phys. address of DPRAM */5454 char Name[MAX_NAME_LEN]; /* The name of the host */5555 unsigned int UniqueNum; /* host unique number */···5757 unsigned int WorkToBeDone; /* set to true each interrupt */5858 unsigned int InIntr; /* Being serviced? */5959 unsigned int IntSrvDone; /* host's interrupt has been serviced */6060- void (*Copy) (void *, void *, int); /* copy func */6060+ void (*Copy) (void *, void __iomem *, int); /* copy func */6161 struct timer_list timer;6262 /*6363 ** I M P O R T A N T !···83838484 struct Top Topology[LINKS_PER_UNIT]; /* one per link */8585 struct Map Mapping[MAX_RUP]; /* Mappings for host */8686- struct PHB *PhbP; /* Pointer to the PHB array */8787- unsigned short *PhbNumP; /* Ptr to Number of PHB's */8888- struct LPB *LinkStrP; /* Link Structure Array */8989- struct RUP *RupP; /* Sixteen real rups here */9090- struct PARM_MAP *ParmMapP; /* points to the parmmap */8686+ struct PHB __iomem *PhbP; /* Pointer to the PHB array */8787+ unsigned short __iomem *PhbNumP; /* Ptr to Number of PHB's */8888+ struct LPB __iomem *LinkStrP; /* Link Structure Array */8989+ struct RUP __iomem *RupP; /* Sixteen real rups here */9090+ struct PARM_MAP __iomem *ParmMapP; /* points to the parmmap */9191 unsigned int ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */9292 unsigned int NumExtraBooted; /* how many of the above */9393 /*
+8-8
drivers/char/rio/port.h
···4040 struct gs_port gs;4141 int PortNum; /* RIO port no., 0-511 */4242 struct Host *HostP;4343- caddr_t Caddr;4343+ void __iomem *Caddr;4444 unsigned short HostPort; /* Port number on host card */4545 unsigned char RupNum; /* Number of RUP for port */4646 unsigned char ID2; /* Second ID of RTA for port */···9292#define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */939394949595- struct PHB *PhbP; /* pointer to PHB for port */9696- u16 *TxAdd; /* Add packets here */9797- u16 *TxStart; /* Start of add array */9898- u16 *TxEnd; /* End of add array */9999- u16 *RxRemove; /* Remove packets here */100100- u16 *RxStart; /* Start of remove array */101101- u16 *RxEnd; /* End of remove array */9595+ struct PHB __iomem *PhbP; /* pointer to PHB for port */9696+ u16 __iomem *TxAdd; /* Add packets here */9797+ u16 __iomem *TxStart; /* Start of add array */9898+ u16 __iomem *TxEnd; /* End of add array */9999+ u16 __iomem *RxRemove; /* Remove packets here */100100+ u16 __iomem *RxStart; /* Start of remove array */101101+ u16 __iomem *RxEnd; /* End of remove array */102102 unsigned int RtaUniqueNum; /* Unique number of RTA */103103 unsigned short PortState; /* status of port */104104 unsigned short ModemState; /* status of modem lines */
+2-2
drivers/char/rio/rio.h
···129129** RIO_OBJ takes hostp->Caddr and a UNIX pointer to an object and130130** returns the offset into the DP RAM area.131131*/132132-#define RIO_PTR(C,O) (((unsigned char *)(C))+(0xFFFF&(O)))133133-#define RIO_OFF(C,O) ((long)(O)-(long)(C))132132+#define RIO_PTR(C,O) (((unsigned char __iomem *)(C))+(0xFFFF&(O)))133133+#define RIO_OFF(C,O) ((unsigned char __iomem *)(O)-(unsigned char __iomem *)(C))134134135135/*136136** How to convert from various different device number formats:
+15-14
drivers/char/rio/rio_linux.c
···333333 return !RIO_FAIL;334334}335335336336-void rio_copy_to_card(void *to, void *from, int len)336336+void rio_copy_to_card(void __iomem *to, void *from, int len)337337{338338 rio_memcpy_toio(NULL, to, from, len);339339}···573573 func_enter();574574575575 /* The "dev" argument isn't used. */576576- rc = riocontrol(p, 0, cmd, (void *) arg, capable(CAP_SYS_ADMIN));576576+ rc = riocontrol(p, 0, cmd, arg, capable(CAP_SYS_ADMIN));577577578578 func_exit();579579 return rc;···583583584584static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg)585585{586586+ void __user *argp = (void __user *)arg;586587 int rc;587588 struct Port *PortP;588589 int ival;···595594 rc = 0;596595 switch (cmd) {597596 case TIOCSSOFTCAR:598598- if ((rc = get_user(ival, (unsigned int *) arg)) == 0) {597597+ if ((rc = get_user(ival, (unsigned __user *) argp)) == 0) {599598 tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (ival ? CLOCAL : 0);600599 }601600 break;602601 case TIOCGSERIAL:603602 rc = -EFAULT;604604- if (access_ok(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct)))605605- rc = gs_getserial(&PortP->gs, (struct serial_struct *) arg);603603+ if (access_ok(VERIFY_WRITE, argp, sizeof(struct serial_struct)))604604+ rc = gs_getserial(&PortP->gs, argp);606605 break;607606 case TCSBRK:608607 if (PortP->State & RIO_DELETED) {···632631 break;633632 case TIOCSSERIAL:634633 rc = -EFAULT;635635- if (access_ok(VERIFY_READ, (void *) arg, sizeof(struct serial_struct)))636636- rc = gs_setserial(&PortP->gs, (struct serial_struct *) arg);634634+ if (access_ok(VERIFY_READ, argp, sizeof(struct serial_struct)))635635+ rc = gs_setserial(&PortP->gs, argp);637636 break;638637 default:639638 rc = -ENOIOCTLCMD;···920919static void fix_rio_pci(struct pci_dev *pdev)921920{922921 unsigned long hwbase;923923- unsigned char *rebase;922922+ unsigned char __iomem *rebase;924923 unsigned int t;925924926925#define CNTRL_REG_OFFSET 0x50···1000999 if (((1 << hp->Ivec) & rio_irqmask) == 0)10011000 hp->Ivec = 0;10021001 hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);10031003- hp->CardP = (struct DpRam *) hp->Caddr;10021002+ hp->CardP = (struct DpRam __iomem *) hp->Caddr;10041003 hp->Type = RIO_PCI;10051004 hp->Copy = rio_copy_to_card;10061005 hp->Mode = RIO_PCI_BOOT_FROM_RAM;···10221021 p->RIONumHosts++;10231022 found++;10241023 } else {10251025- iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr));10241024+ iounmap(p->RIOHosts[p->RIONumHosts].Caddr);10261025 }10271026 }10281027···10481047 hp->Ivec = 0;10491048 hp->Ivec |= 0x8000; /* Mark as non-sharable */10501049 hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);10511051- hp->CardP = (struct DpRam *) hp->Caddr;10501050+ hp->CardP = (struct DpRam __iomem *) hp->Caddr;10521051 hp->Type = RIO_PCI;10531052 hp->Copy = rio_copy_to_card;10541053 hp->Mode = RIO_PCI_BOOT_FROM_RAM;···10711070 p->RIONumHosts++;10721071 found++;10731072 } else {10741074- iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr));10731073+ iounmap(p->RIOHosts[p->RIONumHosts].Caddr);10751074 }10761075#else10771076 printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n");···10861085 /* There was something about the IRQs of these cards. 'Forget what.--REW */10871086 hp->Ivec = 0;10881087 hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);10891089- hp->CardP = (struct DpRam *) hp->Caddr;10881088+ hp->CardP = (struct DpRam __iomem *) hp->Caddr;10901089 hp->Type = RIO_AT;10911090 hp->Copy = rio_copy_to_card; /* AT card PCI???? - PVDL10921091 * -- YES! this is now a normal copy. Only the···11121111 }1113111211141113 if (!okboard)11151115- iounmap((char *) (hp->Caddr));11141114+ iounmap(hp->Caddr);11161115 }11171116 }11181117
···576576*/577577int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, int len, int arg)578578{579579- struct PKT *PacketP;579579+ struct PKT __iomem *PacketP;580580 int retries = 20; /* at 10 per second -> 2 seconds */581581 unsigned long flags;582582
+1-1
drivers/char/rio/unixrup.h
···4444struct UnixRup {4545 struct CmdBlk *CmdsWaitingP; /* Commands waiting to be done */4646 struct CmdBlk *CmdPendingP; /* The command currently being sent */4747- struct RUP *RupP; /* the Rup to send it to */4747+ struct RUP __iomem *RupP; /* the Rup to send it to */4848 unsigned int Id; /* Id number */4949 unsigned int BaseSysPort; /* SysPort of first tty on this RTA */5050 unsigned int ModTypes; /* Modules on this RTA */