You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
arch: Mass conversion of smp_mb__*()
Mostly scripted conversion of the smp_mb__* barriers. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Link: http://lkml.kernel.org/n/tip-55dhyhocezdw1dg7u19hmh1u@git.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-arch@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
committed by
Ingo Molnar
parent
1b15611e1c
commit
4e857c58ef
+2
-2
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(blk_iopoll_sched);
|
|||||||
void __blk_iopoll_complete(struct blk_iopoll *iop)
|
void __blk_iopoll_complete(struct blk_iopoll *iop)
|
||||||
{
|
{
|
||||||
list_del(&iop->list);
|
list_del(&iop->list);
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit_unlock(IOPOLL_F_SCHED, &iop->state);
|
clear_bit_unlock(IOPOLL_F_SCHED, &iop->state);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__blk_iopoll_complete);
|
EXPORT_SYMBOL(__blk_iopoll_complete);
|
||||||
@@ -161,7 +161,7 @@ EXPORT_SYMBOL(blk_iopoll_disable);
|
|||||||
void blk_iopoll_enable(struct blk_iopoll *iop)
|
void blk_iopoll_enable(struct blk_iopoll *iop)
|
||||||
{
|
{
|
||||||
BUG_ON(!test_bit(IOPOLL_F_SCHED, &iop->state));
|
BUG_ON(!test_bit(IOPOLL_F_SCHED, &iop->state));
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit_unlock(IOPOLL_F_SCHED, &iop->state);
|
clear_bit_unlock(IOPOLL_F_SCHED, &iop->state);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(blk_iopoll_enable);
|
EXPORT_SYMBOL(blk_iopoll_enable);
|
||||||
|
|||||||
+1
-1
@@ -126,7 +126,7 @@ static int async_chainiv_schedule_work(struct async_chainiv_ctx *ctx)
|
|||||||
int err = ctx->err;
|
int err = ctx->err;
|
||||||
|
|
||||||
if (!ctx->queue.qlen) {
|
if (!ctx->queue.qlen) {
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(CHAINIV_STATE_INUSE, &ctx->state);
|
clear_bit(CHAINIV_STATE_INUSE, &ctx->state);
|
||||||
|
|
||||||
if (!ctx->queue.qlen ||
|
if (!ctx->queue.qlen ||
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ static bool genpd_sd_counter_dec(struct generic_pm_domain *genpd)
|
|||||||
static void genpd_sd_counter_inc(struct generic_pm_domain *genpd)
|
static void genpd_sd_counter_inc(struct generic_pm_domain *genpd)
|
||||||
{
|
{
|
||||||
atomic_inc(&genpd->sd_count);
|
atomic_inc(&genpd->sd_count);
|
||||||
smp_mb__after_atomic_inc();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void genpd_acquire_lock(struct generic_pm_domain *genpd)
|
static void genpd_acquire_lock(struct generic_pm_domain *genpd)
|
||||||
|
|||||||
@@ -224,9 +224,9 @@ static int get_slot(struct mtip_port *port)
|
|||||||
*/
|
*/
|
||||||
static inline void release_slot(struct mtip_port *port, int tag)
|
static inline void release_slot(struct mtip_port *port, int tag)
|
||||||
{
|
{
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(tag, port->allocated);
|
clear_bit(tag, port->allocated);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a)
|
|||||||
{
|
{
|
||||||
int n = dev->coupled->online_count;
|
int n = dev->coupled->online_count;
|
||||||
|
|
||||||
smp_mb__before_atomic_inc();
|
smp_mb__before_atomic();
|
||||||
atomic_inc(a);
|
atomic_inc(a);
|
||||||
|
|
||||||
while (atomic_read(a) < n)
|
while (atomic_read(a) < n)
|
||||||
|
|||||||
@@ -3498,7 +3498,7 @@ static int ohci_flush_iso_completions(struct fw_iso_context *base)
|
|||||||
}
|
}
|
||||||
|
|
||||||
clear_bit_unlock(0, &ctx->flushing_completions);
|
clear_bit_unlock(0, &ctx->flushing_completions);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
tasklet_enable(&ctx->context.tasklet);
|
tasklet_enable(&ctx->context.tasklet);
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc)
|
|||||||
*/
|
*/
|
||||||
if ((vblrc > 0) && (abs64(diff_ns) > 1000000)) {
|
if ((vblrc > 0) && (abs64(diff_ns) > 1000000)) {
|
||||||
atomic_inc(&dev->vblank[crtc].count);
|
atomic_inc(&dev->vblank[crtc].count);
|
||||||
smp_mb__after_atomic_inc();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Invalidate all timestamps while vblank irq's are off. */
|
/* Invalidate all timestamps while vblank irq's are off. */
|
||||||
@@ -864,9 +864,9 @@ static void drm_update_vblank_count(struct drm_device *dev, int crtc)
|
|||||||
vblanktimestamp(dev, crtc, tslot) = t_vblank;
|
vblanktimestamp(dev, crtc, tslot) = t_vblank;
|
||||||
}
|
}
|
||||||
|
|
||||||
smp_mb__before_atomic_inc();
|
smp_mb__before_atomic();
|
||||||
atomic_add(diff, &dev->vblank[crtc].count);
|
atomic_add(diff, &dev->vblank[crtc].count);
|
||||||
smp_mb__after_atomic_inc();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1330,9 +1330,9 @@ bool drm_handle_vblank(struct drm_device *dev, int crtc)
|
|||||||
/* Increment cooked vblank count. This also atomically commits
|
/* Increment cooked vblank count. This also atomically commits
|
||||||
* the timestamp computed above.
|
* the timestamp computed above.
|
||||||
*/
|
*/
|
||||||
smp_mb__before_atomic_inc();
|
smp_mb__before_atomic();
|
||||||
atomic_inc(&dev->vblank[crtc].count);
|
atomic_inc(&dev->vblank[crtc].count);
|
||||||
smp_mb__after_atomic_inc();
|
smp_mb__after_atomic();
|
||||||
} else {
|
} else {
|
||||||
DRM_DEBUG("crtc %d: Redundant vblirq ignored. diff_ns = %d\n",
|
DRM_DEBUG("crtc %d: Redundant vblirq ignored. diff_ns = %d\n",
|
||||||
crtc, (int) diff_ns);
|
crtc, (int) diff_ns);
|
||||||
|
|||||||
@@ -2147,7 +2147,7 @@ static void i915_error_work_func(struct work_struct *work)
|
|||||||
* updates before
|
* updates before
|
||||||
* the counter increment.
|
* the counter increment.
|
||||||
*/
|
*/
|
||||||
smp_mb__before_atomic_inc();
|
smp_mb__before_atomic();
|
||||||
atomic_inc(&dev_priv->gpu_error.reset_counter);
|
atomic_inc(&dev_priv->gpu_error.reset_counter);
|
||||||
|
|
||||||
kobject_uevent_env(&dev->primary->kdev->kobj,
|
kobject_uevent_env(&dev->primary->kdev->kobj,
|
||||||
|
|||||||
@@ -828,7 +828,7 @@ static inline bool cached_dev_get(struct cached_dev *dc)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Paired with the mb in cached_dev_attach */
|
/* Paired with the mb in cached_dev_attach */
|
||||||
smp_mb__after_atomic_inc();
|
smp_mb__after_atomic();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ static inline void set_closure_fn(struct closure *cl, closure_fn *fn,
|
|||||||
cl->fn = fn;
|
cl->fn = fn;
|
||||||
cl->wq = wq;
|
cl->wq = wq;
|
||||||
/* between atomic_dec() in closure_put() */
|
/* between atomic_dec() in closure_put() */
|
||||||
smp_mb__before_atomic_dec();
|
smp_mb__before_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void closure_queue(struct closure *cl)
|
static inline void closure_queue(struct closure *cl)
|
||||||
|
|||||||
@@ -607,9 +607,9 @@ static void write_endio(struct bio *bio, int error)
|
|||||||
|
|
||||||
BUG_ON(!test_bit(B_WRITING, &b->state));
|
BUG_ON(!test_bit(B_WRITING, &b->state));
|
||||||
|
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(B_WRITING, &b->state);
|
clear_bit(B_WRITING, &b->state);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
wake_up_bit(&b->state, B_WRITING);
|
wake_up_bit(&b->state, B_WRITING);
|
||||||
}
|
}
|
||||||
@@ -997,9 +997,9 @@ static void read_endio(struct bio *bio, int error)
|
|||||||
|
|
||||||
BUG_ON(!test_bit(B_READING, &b->state));
|
BUG_ON(!test_bit(B_READING, &b->state));
|
||||||
|
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(B_READING, &b->state);
|
clear_bit(B_READING, &b->state);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
wake_up_bit(&b->state, B_READING);
|
wake_up_bit(&b->state, B_READING);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -642,7 +642,7 @@ static void free_pending_exception(struct dm_snap_pending_exception *pe)
|
|||||||
struct dm_snapshot *s = pe->snap;
|
struct dm_snapshot *s = pe->snap;
|
||||||
|
|
||||||
mempool_free(pe, s->pending_pool);
|
mempool_free(pe, s->pending_pool);
|
||||||
smp_mb__before_atomic_dec();
|
smp_mb__before_atomic();
|
||||||
atomic_dec(&s->pending_exceptions_count);
|
atomic_dec(&s->pending_exceptions_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -783,7 +783,7 @@ static int init_hash_tables(struct dm_snapshot *s)
|
|||||||
static void merge_shutdown(struct dm_snapshot *s)
|
static void merge_shutdown(struct dm_snapshot *s)
|
||||||
{
|
{
|
||||||
clear_bit_unlock(RUNNING_MERGE, &s->state_bits);
|
clear_bit_unlock(RUNNING_MERGE, &s->state_bits);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
wake_up_bit(&s->state_bits, RUNNING_MERGE);
|
wake_up_bit(&s->state_bits, RUNNING_MERGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2447,7 +2447,7 @@ static void dm_wq_work(struct work_struct *work)
|
|||||||
static void dm_queue_flush(struct mapped_device *md)
|
static void dm_queue_flush(struct mapped_device *md)
|
||||||
{
|
{
|
||||||
clear_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags);
|
clear_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
queue_work(md->wq, &md->work);
|
queue_work(md->wq, &md->work);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4400,7 +4400,7 @@ static void raid5_unplug(struct blk_plug_cb *blk_cb, bool from_schedule)
|
|||||||
* STRIPE_ON_UNPLUG_LIST clear but the stripe
|
* STRIPE_ON_UNPLUG_LIST clear but the stripe
|
||||||
* is still in our list
|
* is still in our list
|
||||||
*/
|
*/
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(STRIPE_ON_UNPLUG_LIST, &sh->state);
|
clear_bit(STRIPE_ON_UNPLUG_LIST, &sh->state);
|
||||||
/*
|
/*
|
||||||
* STRIPE_ON_RELEASE_LIST could be set here. In that
|
* STRIPE_ON_RELEASE_LIST could be set here. In that
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ static int dvb_usb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
|
|||||||
|
|
||||||
/* clear 'streaming' status bit */
|
/* clear 'streaming' status bit */
|
||||||
clear_bit(ADAP_STREAMING, &adap->state_bits);
|
clear_bit(ADAP_STREAMING, &adap->state_bits);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
wake_up_bit(&adap->state_bits, ADAP_STREAMING);
|
wake_up_bit(&adap->state_bits, ADAP_STREAMING);
|
||||||
skip_feed_stop:
|
skip_feed_stop:
|
||||||
|
|
||||||
@@ -550,7 +550,7 @@ static int dvb_usb_fe_init(struct dvb_frontend *fe)
|
|||||||
err:
|
err:
|
||||||
if (!adap->suspend_resume_active) {
|
if (!adap->suspend_resume_active) {
|
||||||
clear_bit(ADAP_INIT, &adap->state_bits);
|
clear_bit(ADAP_INIT, &adap->state_bits);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
wake_up_bit(&adap->state_bits, ADAP_INIT);
|
wake_up_bit(&adap->state_bits, ADAP_INIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -591,7 +591,7 @@ err:
|
|||||||
if (!adap->suspend_resume_active) {
|
if (!adap->suspend_resume_active) {
|
||||||
adap->active_fe = -1;
|
adap->active_fe = -1;
|
||||||
clear_bit(ADAP_SLEEP, &adap->state_bits);
|
clear_bit(ADAP_SLEEP, &adap->state_bits);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
wake_up_bit(&adap->state_bits, ADAP_SLEEP);
|
wake_up_bit(&adap->state_bits, ADAP_SLEEP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2781,7 +2781,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
|
|||||||
|
|
||||||
case LOAD_OPEN:
|
case LOAD_OPEN:
|
||||||
netif_tx_start_all_queues(bp->dev);
|
netif_tx_start_all_queues(bp->dev);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LOAD_DIAG:
|
case LOAD_DIAG:
|
||||||
@@ -4939,9 +4939,9 @@ void bnx2x_update_coalesce_sb_index(struct bnx2x *bp, u8 fw_sb_id,
|
|||||||
void bnx2x_schedule_sp_rtnl(struct bnx2x *bp, enum sp_rtnl_flag flag,
|
void bnx2x_schedule_sp_rtnl(struct bnx2x *bp, enum sp_rtnl_flag flag,
|
||||||
u32 verbose)
|
u32 verbose)
|
||||||
{
|
{
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
set_bit(flag, &bp->sp_rtnl_state);
|
set_bit(flag, &bp->sp_rtnl_state);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
DP((BNX2X_MSG_SP | verbose), "Scheduling sp_rtnl task [Flag: %d]\n",
|
DP((BNX2X_MSG_SP | verbose), "Scheduling sp_rtnl task [Flag: %d]\n",
|
||||||
flag);
|
flag);
|
||||||
schedule_delayed_work(&bp->sp_rtnl_task, 0);
|
schedule_delayed_work(&bp->sp_rtnl_task, 0);
|
||||||
|
|||||||
@@ -1858,10 +1858,10 @@ void bnx2x_sp_event(struct bnx2x_fastpath *fp, union eth_rx_cqe *rr_cqe)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
smp_mb__before_atomic_inc();
|
smp_mb__before_atomic();
|
||||||
atomic_inc(&bp->cq_spq_left);
|
atomic_inc(&bp->cq_spq_left);
|
||||||
/* push the change in bp->spq_left and towards the memory */
|
/* push the change in bp->spq_left and towards the memory */
|
||||||
smp_mb__after_atomic_inc();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
DP(BNX2X_MSG_SP, "bp->cq_spq_left %x\n", atomic_read(&bp->cq_spq_left));
|
DP(BNX2X_MSG_SP, "bp->cq_spq_left %x\n", atomic_read(&bp->cq_spq_left));
|
||||||
|
|
||||||
@@ -1876,11 +1876,11 @@ void bnx2x_sp_event(struct bnx2x_fastpath *fp, union eth_rx_cqe *rr_cqe)
|
|||||||
* sp_state is cleared, and this order prevents
|
* sp_state is cleared, and this order prevents
|
||||||
* races
|
* races
|
||||||
*/
|
*/
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
set_bit(BNX2X_AFEX_PENDING_VIFSET_MCP_ACK, &bp->sp_state);
|
set_bit(BNX2X_AFEX_PENDING_VIFSET_MCP_ACK, &bp->sp_state);
|
||||||
wmb();
|
wmb();
|
||||||
clear_bit(BNX2X_AFEX_FCOE_Q_UPDATE_PENDING, &bp->sp_state);
|
clear_bit(BNX2X_AFEX_FCOE_Q_UPDATE_PENDING, &bp->sp_state);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
/* schedule the sp task as mcp ack is required */
|
/* schedule the sp task as mcp ack is required */
|
||||||
bnx2x_schedule_sp_task(bp);
|
bnx2x_schedule_sp_task(bp);
|
||||||
@@ -5272,9 +5272,9 @@ static void bnx2x_after_function_update(struct bnx2x *bp)
|
|||||||
__clear_bit(RAMROD_COMP_WAIT, &queue_params.ramrod_flags);
|
__clear_bit(RAMROD_COMP_WAIT, &queue_params.ramrod_flags);
|
||||||
|
|
||||||
/* mark latest Q bit */
|
/* mark latest Q bit */
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
set_bit(BNX2X_AFEX_FCOE_Q_UPDATE_PENDING, &bp->sp_state);
|
set_bit(BNX2X_AFEX_FCOE_Q_UPDATE_PENDING, &bp->sp_state);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
/* send Q update ramrod for FCoE Q */
|
/* send Q update ramrod for FCoE Q */
|
||||||
rc = bnx2x_queue_state_change(bp, &queue_params);
|
rc = bnx2x_queue_state_change(bp, &queue_params);
|
||||||
@@ -5500,7 +5500,7 @@ next_spqe:
|
|||||||
spqe_cnt++;
|
spqe_cnt++;
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
smp_mb__before_atomic_inc();
|
smp_mb__before_atomic();
|
||||||
atomic_add(spqe_cnt, &bp->eq_spq_left);
|
atomic_add(spqe_cnt, &bp->eq_spq_left);
|
||||||
|
|
||||||
bp->eq_cons = sw_cons;
|
bp->eq_cons = sw_cons;
|
||||||
@@ -13869,9 +13869,9 @@ static int bnx2x_drv_ctl(struct net_device *dev, struct drv_ctl_info *ctl)
|
|||||||
case DRV_CTL_RET_L2_SPQ_CREDIT_CMD: {
|
case DRV_CTL_RET_L2_SPQ_CREDIT_CMD: {
|
||||||
int count = ctl->data.credit.credit_count;
|
int count = ctl->data.credit.credit_count;
|
||||||
|
|
||||||
smp_mb__before_atomic_inc();
|
smp_mb__before_atomic();
|
||||||
atomic_add(count, &bp->cq_spq_left);
|
atomic_add(count, &bp->cq_spq_left);
|
||||||
smp_mb__after_atomic_inc();
|
smp_mb__after_atomic();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DRV_CTL_ULP_REGISTER_CMD: {
|
case DRV_CTL_ULP_REGISTER_CMD: {
|
||||||
|
|||||||
@@ -258,16 +258,16 @@ static bool bnx2x_raw_check_pending(struct bnx2x_raw_obj *o)
|
|||||||
|
|
||||||
static void bnx2x_raw_clear_pending(struct bnx2x_raw_obj *o)
|
static void bnx2x_raw_clear_pending(struct bnx2x_raw_obj *o)
|
||||||
{
|
{
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(o->state, o->pstate);
|
clear_bit(o->state, o->pstate);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bnx2x_raw_set_pending(struct bnx2x_raw_obj *o)
|
static void bnx2x_raw_set_pending(struct bnx2x_raw_obj *o)
|
||||||
{
|
{
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
set_bit(o->state, o->pstate);
|
set_bit(o->state, o->pstate);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2131,7 +2131,7 @@ static int bnx2x_set_rx_mode_e1x(struct bnx2x *bp,
|
|||||||
|
|
||||||
/* The operation is completed */
|
/* The operation is completed */
|
||||||
clear_bit(p->state, p->pstate);
|
clear_bit(p->state, p->pstate);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -3576,16 +3576,16 @@ error_exit1:
|
|||||||
|
|
||||||
static void bnx2x_mcast_clear_sched(struct bnx2x_mcast_obj *o)
|
static void bnx2x_mcast_clear_sched(struct bnx2x_mcast_obj *o)
|
||||||
{
|
{
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(o->sched_state, o->raw.pstate);
|
clear_bit(o->sched_state, o->raw.pstate);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bnx2x_mcast_set_sched(struct bnx2x_mcast_obj *o)
|
static void bnx2x_mcast_set_sched(struct bnx2x_mcast_obj *o)
|
||||||
{
|
{
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
set_bit(o->sched_state, o->raw.pstate);
|
set_bit(o->sched_state, o->raw.pstate);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool bnx2x_mcast_check_sched(struct bnx2x_mcast_obj *o)
|
static bool bnx2x_mcast_check_sched(struct bnx2x_mcast_obj *o)
|
||||||
@@ -4200,7 +4200,7 @@ int bnx2x_queue_state_change(struct bnx2x *bp,
|
|||||||
if (rc) {
|
if (rc) {
|
||||||
o->next_state = BNX2X_Q_STATE_MAX;
|
o->next_state = BNX2X_Q_STATE_MAX;
|
||||||
clear_bit(pending_bit, pending);
|
clear_bit(pending_bit, pending);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4288,7 +4288,7 @@ static int bnx2x_queue_comp_cmd(struct bnx2x *bp,
|
|||||||
wmb();
|
wmb();
|
||||||
|
|
||||||
clear_bit(cmd, &o->pending);
|
clear_bit(cmd, &o->pending);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -5279,7 +5279,7 @@ static inline int bnx2x_func_state_change_comp(struct bnx2x *bp,
|
|||||||
wmb();
|
wmb();
|
||||||
|
|
||||||
clear_bit(cmd, &o->pending);
|
clear_bit(cmd, &o->pending);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -5926,7 +5926,7 @@ int bnx2x_func_state_change(struct bnx2x *bp,
|
|||||||
if (rc) {
|
if (rc) {
|
||||||
o->next_state = BNX2X_F_STATE_MAX;
|
o->next_state = BNX2X_F_STATE_MAX;
|
||||||
clear_bit(cmd, pending);
|
clear_bit(cmd, pending);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1626,9 +1626,9 @@ static
|
|||||||
void bnx2x_vf_handle_filters_eqe(struct bnx2x *bp,
|
void bnx2x_vf_handle_filters_eqe(struct bnx2x *bp,
|
||||||
struct bnx2x_virtf *vf)
|
struct bnx2x_virtf *vf)
|
||||||
{
|
{
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(BNX2X_FILTER_RX_MODE_PENDING, &vf->filter_state);
|
clear_bit(BNX2X_FILTER_RX_MODE_PENDING, &vf->filter_state);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bnx2x_vf_handle_rss_update_eqe(struct bnx2x *bp,
|
static void bnx2x_vf_handle_rss_update_eqe(struct bnx2x *bp,
|
||||||
@@ -2960,9 +2960,9 @@ void bnx2x_iov_task(struct work_struct *work)
|
|||||||
|
|
||||||
void bnx2x_schedule_iov_task(struct bnx2x *bp, enum bnx2x_iov_flag flag)
|
void bnx2x_schedule_iov_task(struct bnx2x *bp, enum bnx2x_iov_flag flag)
|
||||||
{
|
{
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
set_bit(flag, &bp->iov_task_state);
|
set_bit(flag, &bp->iov_task_state);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
DP(BNX2X_MSG_IOV, "Scheduling iov task [Flag: %d]\n", flag);
|
DP(BNX2X_MSG_IOV, "Scheduling iov task [Flag: %d]\n", flag);
|
||||||
queue_delayed_work(bnx2x_iov_wq, &bp->iov_task, 0);
|
queue_delayed_work(bnx2x_iov_wq, &bp->iov_task, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ static int cnic_offld_prep(struct cnic_sock *csk)
|
|||||||
static int cnic_close_prep(struct cnic_sock *csk)
|
static int cnic_close_prep(struct cnic_sock *csk)
|
||||||
{
|
{
|
||||||
clear_bit(SK_F_CONNECT_START, &csk->flags);
|
clear_bit(SK_F_CONNECT_START, &csk->flags);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
if (test_and_clear_bit(SK_F_OFFLD_COMPLETE, &csk->flags)) {
|
if (test_and_clear_bit(SK_F_OFFLD_COMPLETE, &csk->flags)) {
|
||||||
while (test_and_set_bit(SK_F_OFFLD_SCHED, &csk->flags))
|
while (test_and_set_bit(SK_F_OFFLD_SCHED, &csk->flags))
|
||||||
@@ -450,7 +450,7 @@ static int cnic_close_prep(struct cnic_sock *csk)
|
|||||||
static int cnic_abort_prep(struct cnic_sock *csk)
|
static int cnic_abort_prep(struct cnic_sock *csk)
|
||||||
{
|
{
|
||||||
clear_bit(SK_F_CONNECT_START, &csk->flags);
|
clear_bit(SK_F_CONNECT_START, &csk->flags);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
|
|
||||||
while (test_and_set_bit(SK_F_OFFLD_SCHED, &csk->flags))
|
while (test_and_set_bit(SK_F_OFFLD_SCHED, &csk->flags))
|
||||||
msleep(1);
|
msleep(1);
|
||||||
@@ -3646,7 +3646,7 @@ static int cnic_cm_destroy(struct cnic_sock *csk)
|
|||||||
|
|
||||||
csk_hold(csk);
|
csk_hold(csk);
|
||||||
clear_bit(SK_F_INUSE, &csk->flags);
|
clear_bit(SK_F_INUSE, &csk->flags);
|
||||||
smp_mb__after_clear_bit();
|
smp_mb__after_atomic();
|
||||||
while (atomic_read(&csk->ref_count) != 1)
|
while (atomic_read(&csk->ref_count) != 1)
|
||||||
msleep(1);
|
msleep(1);
|
||||||
cnic_cm_cleanup(csk);
|
cnic_cm_cleanup(csk);
|
||||||
@@ -4026,7 +4026,7 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
|
|||||||
L4_KCQE_COMPLETION_STATUS_PARITY_ERROR)
|
L4_KCQE_COMPLETION_STATUS_PARITY_ERROR)
|
||||||
set_bit(SK_F_HW_ERR, &csk->flags);
|
set_bit(SK_F_HW_ERR, &csk->flags);
|
||||||
|
|
||||||
smp_mb__before_clear_bit();
|
smp_mb__before_atomic();
|
||||||
clear_bit(SK_F_OFFLD_SCHED, &csk->flags);
|
clear_bit(SK_F_OFFLD_SCHED, &csk->flags);
|
||||||
cnic_cm_upcall(cp, csk, opcode);
|
cnic_cm_upcall(cp, csk, opcode);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user