diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2016-12-19 17:16:45 +0000 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-02-08 17:09:56 +0000 |
commit | 34d677a90f0682a26327dbefc0db1cf81647e7bc (patch) | |
tree | c2443a9419efb341cb10860feb3a5722e7daf8cb /drivers/irqchip | |
parent | 5bc13c2cbeec776a2b724cb51bf11fbc30c23318 (diff) |
irqchip/gic-v3-its: Zero command on allocation
When reusing commands from the ring buffer, it would be better
to zero them out, even if the ITS should ignore the unused
fields.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-gic-v3-its.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index ee928de49737..4a895c6d6805 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -411,6 +411,12 @@ static struct its_cmd_block *its_allocate_entry(struct its_node *its) if (its->cmd_write == (its->cmd_base + ITS_CMD_QUEUE_NR_ENTRIES)) its->cmd_write = its->cmd_base; + /* Clear command */ + cmd->raw_cmd[0] = 0; + cmd->raw_cmd[1] = 0; + cmd->raw_cmd[2] = 0; + cmd->raw_cmd[3] = 0; + return cmd; } |