oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, kernel test robot <lkp@intel.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	zhuyinbo <zhuyinbo@loongson.cn>
Cc: oe-kbuild-all@lists.linux.dev, Jianmin Lv <lvjianmin@loongson.cn>,
	Liu Peibao <liupeibao@loongson.cn>,
	wanghongliang@loongson.cn, loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH v13 2/2] clk: clk-loongson2: add clock controller driver support
Date: Tue, 14 Mar 2023 07:49:40 +0100	[thread overview]
Message-ID: <6ff60914-0c39-9916-2e3a-a906b4cdef0d@kernel.org> (raw)
In-Reply-To: <61eee19400e9a45ce9543bfd92a27eaa.sboyd@kernel.org>

On 13/03/2023 19:20, Stephen Boyd wrote:
>>>> The CONFIG_64BIT not enabled in your config file, I will add a depend on 
>>>> "CONFIG_64BIT" in my clock driver to fix this compile error.
>>>
>>> Do you need to use readq() here? Can you read two 32-bit registers with
>>> readl() and put them together for a 64-bit number?
>>
>> If the platform supports 64-bit reads and these are actually one
>> register, then readq makes sense - code is more readable, smaller, more
>> efficient.
>>
> 
> Please read the section in Documentation/driver-api/device-io.rst about
> hi_lo_readq() and <linux/io-64-nonatomic-lo-hi.h>. We shouldn't need to
> restrict the driver to CONFIG_64BIT. Instead, include one of these
> header files to get the IO access primitives.

These primitives are for 32bit access. Quoting: "on 32-bit
architectures". What's the point of them if the code *will never* run on
32-bit? It will be a fake choice of linux/io-64-nonatomic-lo-hi.h or
linux/io-64-nonatomic-hi-lo.h misleading users to think this was tested
on 32-bit.

Best regards,
Krzysztof


  parent reply	other threads:[~2023-03-14  6:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230307115022.12846-2-zhuyinbo@loongson.cn>
2023-03-08 12:16 ` [PATCH v13 2/2] clk: clk-loongson2: add clock controller driver support kernel test robot
2023-03-09  2:58   ` zhuyinbo
2023-03-09  3:18     ` zhuyinbo
2023-03-09  6:09       ` Krzysztof Kozlowski
2023-03-09  6:27         ` zhuyinbo
2023-03-09  6:37           ` Krzysztof Kozlowski
2023-03-09  6:09     ` Krzysztof Kozlowski
2023-03-09 23:47     ` Stephen Boyd
2023-03-10  8:42       ` Krzysztof Kozlowski
2023-03-13 18:20         ` Stephen Boyd
2023-03-14  1:07           ` zhuyinbo
2023-03-14  6:49           ` Krzysztof Kozlowski [this message]
2023-03-15  0:26             ` Stephen Boyd

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=6ff60914-0c39-9916-2e3a-a906b4cdef0d@kernel.org \
    --to=krzk@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liupeibao@loongson.cn \
    --cc=lkp@intel.com \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=lvjianmin@loongson.cn \
    --cc=mturquette@baylibre.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=wanghongliang@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /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;
as well as URLs for NNTP newsgroup(s).