devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: huangdaode <huangdaode@hisilicon.com>
To: David Miller <davem@davemloft.net>
Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	catalin.marinas@arm.com, will.deacon@arm.com,
	liguozhu@hisilicon.com, Yisen.Zhuang@huawei.com,
	paul.gortmaker@windriver.com, dingtianhong@huawei.com,
	zhangfei.gao@linaro.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	linuxarm@huawei.com, salil.mehta@huawei.com,
	kenneth-lee-2012@foxmail.com, xuwei5@hisilicon.com,
	lisheng011@huawei.com
Subject: Re: [PATCH net-next v3] net: Fix Hisilicon Network Subsystem Support Compilation
Date: Sun, 27 Sep 2015 15:19:09 +0800	[thread overview]
Message-ID: <5607986D.7050700@hisilicon.com> (raw)
In-Reply-To: <20150925.214256.1901015223799070196.davem@davemloft.net>

On 2015/9/26 12:42, David Miller wrote:
> From: huangdaode <huangdaode@hisilicon.com>
> Date: Fri, 25 Sep 2015 16:29:50 +0800
>
>> @@ -191,9 +191,12 @@ static void hns_rcb_ring_init(struct ring_pair_cb *ring_pair, int ring_type)
>>   	if (ring_type == RX_RING) {
>>   		dsaf_write_dev(q, RCB_RING_RX_RING_BASEADDR_L_REG,
>>   			       (u32)dma);
>> +#ifdef CONFIG_64BIT
>>   		dsaf_write_dev(q, RCB_RING_RX_RING_BASEADDR_H_REG,
>>   			       (u32)(dma >> 32));
>> -
>> +#else
>> +		dsaf_write_dev(q, RCB_RING_RX_RING_BASEADDR_H_REG, 0);
>> +#endif
>>   		dsaf_write_dev(q, RCB_RING_RX_RING_BD_LEN_REG,
>>   			       bd_size_type);
>>   		dsaf_write_dev(q, RCB_RING_RX_RING_BD_NUM_REG,
> CONFIG_64BIT doesn't tell you if _DMA_ addresses are 64-bit or not.
>
> Furthermore there is a portable way to shift a 32-bit value down
> 32-bits whilst avoiding warnings.
>
> 	(x >> 31) >> 1
>
> So you should definitely use that instead of the CONFIG_64BIT test.
>
> .

agreed.

      reply	other threads:[~2015-09-27  7:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25  8:29 [PATCH net-next v3] net: Fix Hisilicon Network Subsystem Support Compilation huangdaode
     [not found] ` <1443169790-54861-1-git-send-email-huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2015-09-26  4:42   ` David Miller
2015-09-27  7:19     ` huangdaode [this message]

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=5607986D.7050700@hisilicon.com \
    --to=huangdaode@hisilicon.com \
    --cc=Yisen.Zhuang@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dingtianhong@huawei.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kenneth-lee-2012@foxmail.com \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lisheng011@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=will.deacon@arm.com \
    --cc=xuwei5@hisilicon.com \
    --cc=zhangfei.gao@linaro.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;
as well as URLs for NNTP newsgroup(s).