Commit fc396d72 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] i2o iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8fe11cd8
......@@ -35,7 +35,7 @@ extern struct bus_type i2o_bus_type;
static inline int i2o_device_issue_claim(struct i2o_device *dev, u32 cmd,
u32 type)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET);
......@@ -446,7 +446,7 @@ static struct class_interface i2o_device_class_interface = {
int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist,
int oplen, void *reslist, int reslen)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
u32 *res32 = (u32 *) reslist;
u32 *restmp = (u32 *) reslist;
......
......@@ -175,7 +175,7 @@ void i2o_driver_unregister(struct i2o_driver *drv)
* negative error code on failure (the message will be flushed too).
*/
int i2o_driver_dispatch(struct i2o_controller *c, u32 m,
struct i2o_message *msg)
struct i2o_message __iomem *msg)
{
struct i2o_driver *drv;
u32 context = readl(&msg->u.s.icntxt);
......
......@@ -48,7 +48,7 @@ struct i2o_exec_wait {
u32 tcntxt; /* transaction context from reply */
int complete; /* 1 if reply received otherwise 0 */
u32 m; /* message id */
struct i2o_message *msg; /* pointer to the reply message */
struct i2o_message __iomem *msg; /* pointer to the reply message */
struct list_head list; /* node in global wait list */
};
......@@ -114,7 +114,7 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, u32 m, unsigned long
DECLARE_WAIT_QUEUE_HEAD(wq);
struct i2o_exec_wait *wait;
static u32 tcntxt = 0x80000000;
struct i2o_message *msg = c->in_queue.virt + m;
struct i2o_message __iomem *msg = c->in_queue.virt + m;
int rc = 0;
wait = i2o_exec_wait_alloc();
......@@ -199,7 +199,7 @@ int i2o_msg_post_wait_mem(struct i2o_controller *c, u32 m, unsigned long
* message must also be given back to the controller.
*/
static int i2o_msg_post_wait_complete(struct i2o_controller *c, u32 m,
struct i2o_message *msg)
struct i2o_message __iomem *msg)
{
struct i2o_exec_wait *wait, *tmp;
static spinlock_t lock;
......@@ -323,7 +323,7 @@ static int i2o_exec_reply(struct i2o_controller *c, u32 m,
struct i2o_message *msg)
{
if (le32_to_cpu(msg->u.head[0]) & MSG_FAIL) { // Fail bit is set
struct i2o_message *pmsg; /* preserved message */
struct i2o_message __iomem *pmsg; /* preserved message */
u32 pm;
pm = le32_to_cpu(msg->body[3]);
......@@ -395,7 +395,7 @@ static void i2o_exec_event(struct i2o_event *evt)
*/
int i2o_exec_lct_get(struct i2o_controller *c)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
int i = 0;
int rc = -EAGAIN;
......@@ -439,7 +439,7 @@ static int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind)
{
i2o_status_block *sb = c->status_block.virt;
struct device *dev;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
dev = &c->pdev->dev;
......
......@@ -126,7 +126,7 @@ static int i2o_block_remove(struct device *dev)
*/
static int i2o_block_device_flush(struct i2o_device *dev)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET);
......@@ -154,7 +154,7 @@ static int i2o_block_device_flush(struct i2o_device *dev)
*/
static int i2o_block_device_mount(struct i2o_device *dev, u32 media_id)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET);
......@@ -183,7 +183,7 @@ static int i2o_block_device_mount(struct i2o_device *dev, u32 media_id)
*/
static int i2o_block_device_lock(struct i2o_device *dev, u32 media_id)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET);
......@@ -211,7 +211,7 @@ static int i2o_block_device_lock(struct i2o_device *dev, u32 media_id)
*/
static int i2o_block_device_unlock(struct i2o_device *dev, u32 media_id)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET);
......@@ -240,7 +240,7 @@ static int i2o_block_device_power(struct i2o_block_device *dev, u8 op)
{
struct i2o_device *i2o_dev = dev->i2o_dev;
struct i2o_controller *c = i2o_dev->iop;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
int rc;
......@@ -777,8 +777,8 @@ static int i2o_block_transfer(struct request *req)
struct i2o_block_device *dev = req->rq_disk->private_data;
struct i2o_controller *c = dev->i2o_dev->iop;
int tid = dev->i2o_dev->lct_data.tid;
struct i2o_message *msg;
void *mptr;
struct i2o_message __iomem *msg;
void __iomem *mptr;
struct i2o_block_request *ireq = req->special;
struct scatterlist *sg;
int sgnum;
......
......@@ -246,7 +246,7 @@ static int i2o_cfg_swdl(unsigned long arg)
struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg;
unsigned char maxfrag = 0, curfrag = 1;
struct i2o_dma buffer;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
unsigned int status = 0, swlen = 0, fragsize = 8192;
struct i2o_controller *c;
......@@ -320,7 +320,7 @@ static int i2o_cfg_swul(unsigned long arg)
struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg;
unsigned char maxfrag = 0, curfrag = 1;
struct i2o_dma buffer;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
unsigned int status = 0, swlen = 0, fragsize = 8192;
struct i2o_controller *c;
......@@ -400,7 +400,7 @@ static int i2o_cfg_swdel(unsigned long arg)
struct i2o_controller *c;
struct i2o_sw_xfer kxfer;
struct i2o_sw_xfer __user *pxfer = (struct i2o_sw_xfer __user *)arg;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
unsigned int swlen;
int token;
......@@ -445,7 +445,7 @@ static int i2o_cfg_validate(unsigned long arg)
{
int token;
int iop = (int)arg;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
struct i2o_controller *c;
......@@ -476,7 +476,7 @@ static int i2o_cfg_validate(unsigned long arg)
static int i2o_cfg_evt_reg(unsigned long arg, struct file *fp)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
struct i2o_evt_id __user *pdesc = (struct i2o_evt_id __user *)arg;
struct i2o_evt_id kdesc;
......@@ -777,7 +777,7 @@ static int i2o_cfg_passthru(unsigned long arg)
u32 i = 0;
void *p = NULL;
i2o_status_block *sb;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
unsigned int iop;
......
......@@ -299,7 +299,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
cmd = i2o_cntxt_list_get(c, le32_to_cpu(msg->u.s.tcntxt));
if (msg->u.head[0] & (1 << 13)) {
struct i2o_message *pmsg; /* preserved message */
struct i2o_message __iomem *pmsg; /* preserved message */
u32 pm;
int err = DID_ERROR;
......@@ -541,10 +541,11 @@ static int i2o_scsi_queuecommand(struct scsi_cmnd *SCpnt,
struct i2o_device *i2o_dev;
struct device *dev;
int tid;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
u32 scsi_flags, sg_flags;
u32 *mptr, *lenptr;
u32 __iomem *mptr;
u32 __iomem *lenptr;
u32 len, reqlen;
int i;
......@@ -721,7 +722,7 @@ static int i2o_scsi_abort(struct scsi_cmnd *SCpnt)
{
struct i2o_device *i2o_dev;
struct i2o_controller *c;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
int tid;
int status = FAILED;
......
......@@ -65,7 +65,7 @@ extern void i2o_device_exit(void);
*/
void i2o_msg_nop(struct i2o_controller *c, u32 m)
{
struct i2o_message *msg = c->in_queue.virt + m;
struct i2o_message __iomem *msg = c->in_queue.virt + m;
writel(THREE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]);
writel(I2O_CMD_UTIL_NOP << 24 | HOST_TID << 12 | ADAPTER_TID,
......@@ -89,7 +89,7 @@ void i2o_msg_nop(struct i2o_controller *c, u32 m)
* address from the read port (see the i2o spec). If no message is
* available returns I2O_QUEUE_EMPTY and msg is leaved untouched.
*/
u32 i2o_msg_get_wait(struct i2o_controller *c, struct i2o_message **msg,
u32 i2o_msg_get_wait(struct i2o_controller *c, struct i2o_message __iomem **msg,
int wait)
{
unsigned long timeout = jiffies + wait * HZ;
......@@ -306,7 +306,7 @@ struct i2o_device *i2o_iop_find_device(struct i2o_controller *c, u16 tid)
*/
static int i2o_iop_quiesce(struct i2o_controller *c)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
i2o_status_block *sb = c->status_block.virt;
int rc;
......@@ -348,7 +348,7 @@ static int i2o_iop_quiesce(struct i2o_controller *c)
*/
static int i2o_iop_enable(struct i2o_controller *c)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
i2o_status_block *sb = c->status_block.virt;
int rc;
......@@ -420,7 +420,7 @@ static inline void i2o_iop_enable_all(void)
*/
static int i2o_iop_clear(struct i2o_controller *c)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
int rc;
......@@ -461,7 +461,7 @@ static int i2o_iop_clear(struct i2o_controller *c)
static int i2o_iop_reset(struct i2o_controller *c)
{
u8 *status = c->status.virt;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
unsigned long timeout;
i2o_status_block *sb = c->status_block.virt;
......@@ -570,7 +570,7 @@ static int i2o_iop_init_outbound_queue(struct i2o_controller *c)
{
u8 *status = c->status.virt;
u32 m;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
ulong timeout;
int i;
......@@ -631,7 +631,7 @@ static int i2o_iop_init_outbound_queue(struct i2o_controller *c)
*/
static int i2o_iop_send_nop(struct i2o_controller *c)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m = i2o_msg_get_wait(c, &msg, HZ);
if (m == I2O_QUEUE_EMPTY)
return -ETIMEDOUT;
......@@ -734,7 +734,7 @@ static int i2o_iop_activate(struct i2o_controller *c)
*/
static int i2o_iop_systab_set(struct i2o_controller *c)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
i2o_status_block *sb = c->status_block.virt;
struct device *dev = &c->pdev->dev;
......@@ -997,7 +997,7 @@ static int i2o_parse_hrt(struct i2o_controller *c)
*/
int i2o_status_get(struct i2o_controller *c)
{
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
u8 *status_block;
unsigned long timeout;
......@@ -1061,7 +1061,7 @@ static int i2o_hrt_get(struct i2o_controller *c)
struct device *dev = &c->pdev->dev;
for (i = 0; i < I2O_HRT_GET_TRIES; i++) {
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET);
......@@ -1216,7 +1216,7 @@ int i2o_event_register(struct i2o_device *dev, struct i2o_driver *drv,
int tcntxt, u32 evt_mask)
{
struct i2o_controller *c = dev->iop;
struct i2o_message *msg;
struct i2o_message __iomem *msg;
u32 m;
m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET);
......
......@@ -162,9 +162,9 @@ struct i2o_controller {
struct notifier_block *event_notifer; /* Events */
atomic_t users;
struct list_head list; /* Controller list */
void *post_port; /* Inbout port address */
void *reply_port; /* Outbound port address */
void *irq_mask; /* Interrupt register address */
void __iomem *post_port; /* Inbout port address */
void __iomem *reply_port; /* Outbound port address */
void __iomem *irq_mask; /* Interrupt register address */
/* Dynamic LCT related data */
......@@ -241,8 +241,8 @@ struct i2o_sys_tbl {
extern struct list_head i2o_controllers;
/* Message functions */
static inline u32 i2o_msg_get(struct i2o_controller *, struct i2o_message **);
extern u32 i2o_msg_get_wait(struct i2o_controller *, struct i2o_message **,
static inline u32 i2o_msg_get(struct i2o_controller *, struct i2o_message __iomem **);
extern u32 i2o_msg_get_wait(struct i2o_controller *, struct i2o_message __iomem **,
int);
static inline void i2o_msg_post(struct i2o_controller *, u32);
static inline int i2o_msg_post_wait(struct i2o_controller *, u32,
......@@ -443,7 +443,7 @@ static inline void I2O_IRQ_WRITE32(struct i2o_controller *c, u32 val)
* available returns I2O_QUEUE_EMPTY and msg is leaved untouched.
*/
static inline u32 i2o_msg_get(struct i2o_controller *c,
struct i2o_message **msg)
struct i2o_message __iomem **msg)
{
u32 m;
......@@ -530,7 +530,7 @@ static inline struct i2o_message *i2o_msg_out_to_virt(struct i2o_controller *c,
* work for receive side messages as they are kmalloc objects
* in a different pool.
*/
static inline struct i2o_message *i2o_msg_in_to_virt(struct i2o_controller *c,
static inline struct i2o_message __iomem *i2o_msg_in_to_virt(struct i2o_controller *c,
u32 m)
{
return c->in_queue.virt + m;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment