Commit 0ce054f2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski

ice: Fix a 32bit bug

BIT() is unsigned long but ->pu.flg_msk and ->pu.flg_val are u64 type.
On 32 bit systems, unsigned long is a u32 and the mismatch between u32
and u64 will break things for the high 32 bits.

Fixes: 9a4c07aa ("ice: add parser execution main loop")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
Link: https://patch.msgid.link/ddc231a8-89c1-4ff4-8704-9198bcb41f8d@stanley.mountainSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d35a3a8f
...@@ -377,11 +377,11 @@ static void ice_pg_exe(struct ice_parser_rt *rt) ...@@ -377,11 +377,11 @@ static void ice_pg_exe(struct ice_parser_rt *rt)
static void ice_flg_add(struct ice_parser_rt *rt, int idx, bool val) static void ice_flg_add(struct ice_parser_rt *rt, int idx, bool val)
{ {
rt->pu.flg_msk |= BIT(idx); rt->pu.flg_msk |= BIT_ULL(idx);
if (val) if (val)
rt->pu.flg_val |= BIT(idx); rt->pu.flg_val |= BIT_ULL(idx);
else else
rt->pu.flg_val &= ~BIT(idx); rt->pu.flg_val &= ~BIT_ULL(idx);
ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Pending update for flag %d value %d\n", ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Pending update for flag %d value %d\n",
idx, val); idx, val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment