Merge tag 'arm64-mmiowb' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull mmiowb removal from Will Deacon: "Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) Remove mmiowb() from the kernel memory barrier API and instead, for architectures that need it, hide the barrier inside spin_unlock() when MMIO has been performed inside the critical section. The only relatively recent changes have been addressing review comments on the documentation, which is in a much better shape thanks to the efforts of Ben and Ingo. I was initially planning to split this into two pull requests so that you could run the coccinelle script yourself, however it's been plain sailing in linux-next so I've just included the whole lot here to keep things simple" * tag 'arm64-mmiowb' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (23 commits) docs/memory-barriers.txt: Update I/O section to be clearer about CPU vs thread docs/memory-barriers.txt: Fix style, spacing and grammar in I/O section arch: Remove dummy mmiowb() definitions from arch code net/ethernet/silan/sc92031: Remove stale comment about mmiowb() i40iw: Redefine i40iw_mmiowb() to do nothing scsi/qla1280: Remove stale comment about mmiowb() drivers: Remove explicit invocations of mmiowb() drivers: Remove useless trailing comments from mmiowb() invocations Documentation: Kill all references to mmiowb() riscv/mmiowb: Hook up mmwiob() implementation to asm-generic code powerpc/mmiowb: Hook up mmwiob() implementation to asm-generic code ia64/mmiowb: Add unconditional mmiowb() to arch_spin_unlock() mips/mmiowb: Add unconditional mmiowb() to arch_spin_unlock() sh/mmiowb: Add unconditional mmiowb() to arch_spin_unlock() m68k/io: Remove useless definition of mmiowb() nds32/io: Remove useless definition of mmiowb() x86/io: Remove useless definition of mmiowb() arm64/io: Remove useless definition of mmiowb() ARM/io: Remove useless definition of mmiowb() mmiowb: Hook up mmiowb helpers to spinlocks and generic I/O accessors ...
This commit is contained in:
@@ -129,10 +129,6 @@ static int mlx4_reset_slave(struct mlx4_dev *dev)
|
||||
comm_flags = rst_req << COM_CHAN_RST_REQ_OFFSET;
|
||||
__raw_writel((__force u32)cpu_to_be32(comm_flags),
|
||||
(__iomem char *)priv->mfunc.comm + MLX4_COMM_CHAN_FLAGS);
|
||||
/* Make sure that our comm channel write doesn't
|
||||
* get mixed in with writes from another CPU.
|
||||
*/
|
||||
mmiowb();
|
||||
|
||||
end = msecs_to_jiffies(MLX4_COMM_TIME) + jiffies;
|
||||
while (time_before(jiffies, end)) {
|
||||
|
@@ -281,7 +281,6 @@ static int mlx4_comm_cmd_post(struct mlx4_dev *dev, u8 cmd, u16 param)
|
||||
val = param | (cmd << 16) | (priv->cmd.comm_toggle << 31);
|
||||
__raw_writel((__force u32) cpu_to_be32(val),
|
||||
&priv->mfunc.comm->slave_write);
|
||||
mmiowb();
|
||||
mutex_unlock(&dev->persist->device_state_mutex);
|
||||
return 0;
|
||||
}
|
||||
@@ -496,12 +495,6 @@ static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param,
|
||||
(op_modifier << HCR_OPMOD_SHIFT) |
|
||||
op), hcr + 6);
|
||||
|
||||
/*
|
||||
* Make sure that our HCR writes don't get mixed in with
|
||||
* writes from another CPU starting a FW command.
|
||||
*/
|
||||
mmiowb();
|
||||
|
||||
cmd->toggle = cmd->toggle ^ 1;
|
||||
|
||||
ret = 0;
|
||||
@@ -2206,7 +2199,6 @@ static void mlx4_master_do_cmd(struct mlx4_dev *dev, int slave, u8 cmd,
|
||||
}
|
||||
__raw_writel((__force u32) cpu_to_be32(reply),
|
||||
&priv->mfunc.comm[slave].slave_read);
|
||||
mmiowb();
|
||||
|
||||
return;
|
||||
|
||||
@@ -2410,7 +2402,6 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
|
||||
&priv->mfunc.comm[i].slave_write);
|
||||
__raw_writel((__force u32) 0,
|
||||
&priv->mfunc.comm[i].slave_read);
|
||||
mmiowb();
|
||||
for (port = 1; port <= MLX4_MAX_PORTS; port++) {
|
||||
struct mlx4_vport_state *admin_vport;
|
||||
struct mlx4_vport_state *oper_vport;
|
||||
@@ -2576,10 +2567,6 @@ void mlx4_report_internal_err_comm_event(struct mlx4_dev *dev)
|
||||
slave_read |= (u32)COMM_CHAN_EVENT_INTERNAL_ERR;
|
||||
__raw_writel((__force u32)cpu_to_be32(slave_read),
|
||||
&priv->mfunc.comm[slave].slave_read);
|
||||
/* Make sure that our comm channel write doesn't
|
||||
* get mixed in with writes from another CPU.
|
||||
*/
|
||||
mmiowb();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -917,7 +917,6 @@ static void cmd_work_handler(struct work_struct *work)
|
||||
mlx5_core_dbg(dev, "writing 0x%x to command doorbell\n", 1 << ent->idx);
|
||||
wmb();
|
||||
iowrite32be(1 << ent->idx, &dev->iseg->cmd_dbell);
|
||||
mmiowb();
|
||||
/* if not in polling don't use ent after this point */
|
||||
if (cmd_mode == CMD_MODE_POLLING || poll_cmd) {
|
||||
poll_timeout(ent);
|
||||
|
Reference in New Issue
Block a user