Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1233633

Re: [PATCH net-next v3] net: Fix Hisilicon Network Subsystem Support Compilation

Path csiph.com!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod
From huangdaode <huangdaode@hisilicon.com>
Newsgroups linux.kernel
Subject Re: [PATCH net-next v3] net: Fix Hisilicon Network Subsystem Support Compilation
Date Sun, 27 Sep 2015 09:30:01 +0200
Message-ID <qdezf-kr-5@gated-at.bofh.it> (permalink)
References <qcwye-4jx-7@gated-at.bofh.it> <qcPAS-6kN-1@gated-at.bofh.it>
X-Original-To David Miller <davem@davemloft.net>
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding 7bit
X-Originating-IP [10.61.13.165]
X-Cfilter-Loop Reflected
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 38
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Sun, 27 Sep 2015 15:19:09 +0800
X-Original-Message-ID <5607986D.7050700@hisilicon.com>
X-Original-References <1443169790-54861-1-git-send-email-huangdaode@hisilicon.com> <20150925.214256.1901015223799070196.davem@davemloft.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1233633

Show key headers only | View raw


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.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH net-next v3] net: Fix Hisilicon Network Subsystem Support Compilation huangdaode <huangdaode@hisilicon.com> - 2015-09-25 10:30 +0200
  Re: [PATCH net-next v3] net: Fix Hisilicon Network Subsystem  Support Compilation David Miller <davem@davemloft.net> - 2015-09-26 06:50 +0200
    Re: [PATCH net-next v3] net: Fix Hisilicon Network Subsystem Support  Compilation huangdaode <huangdaode@hisilicon.com> - 2015-09-27 09:30 +0200

csiph-web