[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b3999eec-e370-4c85-80b9-759f25ed98bf@gmail.com>
Date: Thu, 2 May 2024 22:27:31 +0300
From: Sergey Ryazanov <ryazanov.s.a@...il.com>
To: Jeff Johnson <quic_jjohnson@...cinc.com>,
Ziyang Huang <hzyitc@...look.com>, kvalo@...nel.org
Cc: jjohnson@...nel.org, linux-wireless@...r.kernel.org,
ath11k@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: ath11k: fix remapped ce accessing issue on 64bit OS
Hi Jeff,
On 01.05.2024 19:56, Jeff Johnson wrote:
> On 5/1/2024 9:14 AM, Ziyang Huang wrote:
>> On 64bit OS, when ab->mem_ce is lower than or 4G far away from ab->mem,
>> u32 is not enough to store the offsets, which makes ath11k_ahb_read32()
>> and ath11k_ahb_write32() access incorrect address and causes Data Abort
>> Exception.
>
> Are you actually observing this issue?
> Or is this a hypothetical situation?
Yep. This is the real issue. I faced it on IPQ5018 with 64bits kernel.
>> Let's use the high bits of offsets to decide where to access, which is
>> similar as ath11k_pci_get_window_start() done. In the future, we can merge
>> these functions for unified regs accessing.
>
> Performing unnecessary tests and masking for every ioread/write operation will
> potentially impact performance.
>
> What other fixes were considered (i.e. did you consider making all the
> register addresses u64?)
Probably, making argument u64 could also be too much. I/O address space
of this chip fits 4GB so u32 should be enough. I have a bit different
fix for this bug. It introduces an indirect call for the CE registers
access and a dedicated set of accessing functions for chips that has the
CE region outside the main I/O area. I am going to publish it in a
couple of weeks, when I will come from a trip. The patch still needs
some polishing.
--
Sergey
Powered by blists - more mailing lists