From: Sudeep Holla Date: Mon, 11 Nov 2019 16:25:22 +0000 (+0000) Subject: firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT X-Git-Tag: v5.4.15~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b8b5f9a7b3b6295325e0252c31c4947f8ed5b5c;p=platform%2Fkernel%2Flinux-rpi.git firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT [ Upstream commit 7bd39bc6bfdf96f5df0f92199bbc1a3ee2f2adb8 ] The logic to ring the scmi performance fastchannel ignores the value read from the doorbell register in case of !CONFIG_64BIT. This bug also shows up as warning with '-Wunused-but-set-variable' gcc flag: drivers/firmware/arm_scmi/perf.c: In function scmi_perf_fc_ring_db: drivers/firmware/arm_scmi/perf.c:323:7: warning: variable val set but not used [-Wunused-but-set-variable] Fix the same by aligning the logic with CONFIG_64BIT as used in the macro SCMI_PERF_FC_RING_DB(). Fixes: 823839571d76 ("firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol") Reported-by: Hulk Robot Reported-by: Zheng Yongjun Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin --- diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 4a8012e..601af4e 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -323,7 +323,7 @@ static void scmi_perf_fc_ring_db(struct scmi_fc_db_info *db) if (db->mask) val = ioread64_hi_lo(db->addr) & db->mask; - iowrite64_hi_lo(db->set, db->addr); + iowrite64_hi_lo(db->set | val, db->addr); } #endif }