提交 0b38c4eb 编写于 作者: J John Ogness 提交者: Chris Ball

mmc: remove redundant irq disabling

There is no need to disable irq's when using the sg_copy_*_buffer()
functions because those functions do that already. There are also
no races for the mm_queue struct here that would require the irq's
to be disabled before calling sg_copy_*_buffer().
Signed-off-by: NJohn Ogness <john.ogness@linutronix.de>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 41e2a489
...@@ -343,18 +343,14 @@ unsigned int mmc_queue_map_sg(struct mmc_queue *mq) ...@@ -343,18 +343,14 @@ unsigned int mmc_queue_map_sg(struct mmc_queue *mq)
*/ */
void mmc_queue_bounce_pre(struct mmc_queue *mq) void mmc_queue_bounce_pre(struct mmc_queue *mq)
{ {
unsigned long flags;
if (!mq->bounce_buf) if (!mq->bounce_buf)
return; return;
if (rq_data_dir(mq->req) != WRITE) if (rq_data_dir(mq->req) != WRITE)
return; return;
local_irq_save(flags);
sg_copy_to_buffer(mq->bounce_sg, mq->bounce_sg_len, sg_copy_to_buffer(mq->bounce_sg, mq->bounce_sg_len,
mq->bounce_buf, mq->sg[0].length); mq->bounce_buf, mq->sg[0].length);
local_irq_restore(flags);
} }
/* /*
...@@ -363,17 +359,13 @@ void mmc_queue_bounce_pre(struct mmc_queue *mq) ...@@ -363,17 +359,13 @@ void mmc_queue_bounce_pre(struct mmc_queue *mq)
*/ */
void mmc_queue_bounce_post(struct mmc_queue *mq) void mmc_queue_bounce_post(struct mmc_queue *mq)
{ {
unsigned long flags;
if (!mq->bounce_buf) if (!mq->bounce_buf)
return; return;
if (rq_data_dir(mq->req) != READ) if (rq_data_dir(mq->req) != READ)
return; return;
local_irq_save(flags);
sg_copy_from_buffer(mq->bounce_sg, mq->bounce_sg_len, sg_copy_from_buffer(mq->bounce_sg, mq->bounce_sg_len,
mq->bounce_buf, mq->sg[0].length); mq->bounce_buf, mq->sg[0].length);
local_irq_restore(flags);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册