firmware: xilinx: Use hash-table for api feature check
authorAmit Sunil Dhamne <amit.sunil.dhamne@xilinx.com>
Tue, 24 Nov 2020 05:52:41 +0000 (21:52 -0800)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 24 Nov 2020 14:13:54 +0000 (15:13 +0100)
commitacfdd18591eaac25446e976a0c0d190f8b3dbfb1
treedd3ee92815329015132c280e6c802237c3266570
parentf4426311f927b01776edf8a45f6fad90feae4e72
firmware: xilinx: Use hash-table for api feature check

Currently array of fix length PM_API_MAX is used to cache
the pm_api version (valid or invalid). However ATF based
PM APIs values are much higher then PM_API_MAX.
So to include ATF based PM APIs also, use hash-table to
store the pm_api version status.

Signed-off-by: Amit Sunil Dhamne <amit.sunil.dhamne@xilinx.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ravi Patel <ravi.patel@xilinx.com>
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Fixes: f3217d6f2f7a ("firmware: xilinx: fix out-of-bounds access")
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1606197161-25976-1-git-send-email-rajan.vaja@xilinx.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/firmware/xilinx/zynqmp.c
include/linux/firmware/xlnx-zynqmp.h