OSDN Git Service

soc: qcom: smem: verify both host ids in partition header
authorAlex Elder <elder@linaro.org>
Tue, 26 Jun 2018 00:58:49 +0000 (19:58 -0500)
committerAndy Gross <andy.gross@linaro.org>
Thu, 13 Sep 2018 21:56:58 +0000 (16:56 -0500)
commit06ada44a807fc5c1745d2001faba3e0b4e2e060a
treed4c2a988390f97c7663b281bb85641496e2440b1
parenteb68cf09092233716b31fad42cf2a4dad3959e3c
soc: qcom: smem: verify both host ids in partition header

The global partition is indicated by having both host values in its
table of contents entry equal SMEM_GLOBAL_HOST=0xfffe.

In qcom_smem_set_global_partition(), we check whether the header
structure at the beginning of the partition contains that host
value, but the check only verifies *one* of them.  Change the check
so the partition header must have SMEM_GLOBAL_HOST for *both* its
host fields.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/smem.c