From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>, John Garry <john.garry@huawei.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
Olof Johansson <olof@lixom.net>, SoC Team <soc@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Vinod Koul <vkoul@kernel.org>, Jonathan Marek <jonathan@marek.ca>
Subject: Re: [PATCH 0/2] arm64 defconfig: Get faddr2line working
Date: Thu, 28 Jul 2022 09:53:32 +0100 [thread overview]
Message-ID: <4d010f40-6c4c-32c7-2772-1bbfa02c03b7@linaro.org> (raw)
In-Reply-To: <CAK8P3a0w+_MLOjJAKMENe6MYvBcXWXSir47Hz34WbtdEeAmaBw@mail.gmail.com>
On 28/07/2022 09:23, Arnd Bergmann wrote:
> On Thu, Jul 28, 2022 at 10:06 AM John Garry <john.garry@huawei.com> wrote:
>>
>> trim list
>
> Adding a few other people for slimbus.
>
>> On 25/07/2022 13:51, Arnd Bergmann wrote:
>>>>> CONFIG_SLIMBUS=m
>>>> Config 5bd773242f75 added a kconfig "imply" on config SLIMBUS from
>>>> config SOUNDWIRE_QCOM, and this happens to mean that we don't explicitly
>>>> require config SLIMBUS enabled in the defconfig.
>>> That 'imply' looks like it was added to solve a problem using the old 'imply'
>>> semantics that are not what this keyword does today. I suspect it's still
>>> broken when CONFIG=SOUNDWIRE_QCOM=y and CONFIG_SLIBMUS=m,
>>> and the correct fix is to use a dependency like
>>>
>>> depends on SLIMBUS || !SLIMBUS
>>>
>>> so the defconfig symbol should stay.
>>>
>>
>> JFYI, building for CONFIG_SOUNDWIRE_QCOM=y and CONFIG_SLIBMUS=m is ok.
>> The driver has a runtime check for CONFIG_SLIMBUS in qcom_swrm_probe().
>>
>> That implementation seems consistent with guidance in
>> kconfig-language.rst - so do you think that there is still a problem?
>
> I see Vinod added the IS_REACHABLE() check, which makes it build, but
> I think both the 'imply' and the IS_REACHABLE() are mistakes here, as they
> are almost everywhere else.
>
> From what I understand, the driver can actually use two different
> back-ends, with slimbus being one of them. In the configuration
> with CONFIG_SOUNDWIRE_QCOM=y and CONFIG_SLIBMUS=m,
w.r.t Qualcomm SoundWire Controller.
There are two types of integrations at IP level.
1> SoundWire Controller is part of Codec which is connected over
SlimBus. ex: SoCs SDM845 and older ones
All the read writes have to go via SlimBus physical layer.
2> SoundWire Controller is part of Codec which is MMIO,ex: SM8250 and
newer SoCs. No SlimBus dependency.
As we are using a common driver for this, we wanted to check if the
parent was a slimbus or not, to be able to select correct read/write
interfaces.
rethinking about this approach, It should be doable to also derive this
information from compatible strings, Soundwire controller versions 1.3.0
and below are always of type 1 and the newer ones are type 2.
So this could get rid of IS_REACHABLE check along with references to
slimbus_bus from driver.
expressing the SlimBus dependency for type 1 should be either captured
using imply SLIMBUS or depends in Kconfig.
> I think you can end up with a slimbus device being detected at
> runtime, which gets passed to the built-in qcom driver, but that driver
> then misdetects the bus because it is not linked against the
> slimbus module. It then uses the incorrect code path, causing
> unintended behavior.
>
> The 'depends on SLIMBUS || !SLIMBUS' dependency would completely
> avoid this issue and make the driver work correctly in each configuration.
>
> Arnd
Thanks,
Srini
next prev parent reply other threads:[~2022-07-28 8:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-24 16:43 John Garry
2022-07-24 16:43 ` [PATCH 1/2] arm64: defconfig: Sync with savedefconfig John Garry
2022-07-24 16:43 ` [PATCH 2/2] arm64: defconfig: Enable DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT John Garry
2022-07-24 20:35 ` [PATCH 0/2] arm64 defconfig: Get faddr2line working Arnd Bergmann
2022-07-25 6:50 ` John Garry
2022-07-25 7:08 ` Arnd Bergmann
2022-07-25 11:57 ` John Garry
2022-07-25 12:51 ` Arnd Bergmann
2022-07-25 14:03 ` John Garry
2022-07-25 14:22 ` Arnd Bergmann
2022-07-25 17:39 ` John Garry
2022-07-28 8:06 ` John Garry
2022-07-28 8:23 ` Arnd Bergmann
2022-07-28 8:53 ` Srinivas Kandagatla [this message]
2022-07-28 9:09 ` Arnd Bergmann
2022-07-28 11:57 ` Jonathan Marek
2022-07-28 12:03 ` Arnd Bergmann
2022-08-04 10:35 ` soundwire qcom slimbus dependency (was Re: [PATCH 0/2] arm64 defconfig: Get faddr2line working) John Garry
2022-08-09 8:28 ` John Garry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d010f40-6c4c-32c7-2772-1bbfa02c03b7@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=arnd@arndb.de \
--cc=john.garry@huawei.com \
--cc=jonathan@marek.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
--cc=soc@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®