Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756899AbcKVVFV (ORCPT ); Tue, 22 Nov 2016 16:05:21 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:65021 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755963AbcKVVFT (ORCPT ); Tue, 22 Nov 2016 16:05:19 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Gregory CLEMENT , "David S. Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Thomas Petazzoni , Andrew Lunn , Jason Cooper , Marcin Wojtas , Sebastian Hesselbarth Subject: Re: [PATCH net-next 1/4] net: mvneta: Convert to be 64 bits compatible Date: Tue, 22 Nov 2016 22:04:12 +0100 Message-ID: <2948812.F3se4ieqO6@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161122164844.19566-2-gregory.clement@free-electrons.com> References: <20161122164844.19566-1-gregory.clement@free-electrons.com> <20161122164844.19566-2-gregory.clement@free-electrons.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:9jNpSC8Kh/y5hjecTxkP5DtfiggWNXA4vkyeHuXZ/ZiQzmd/inO johRFnzLcfpI5az/6neOelH1Q1Djjc+IbWn8YQo1FmKuNWjxhLZ1BnL6x/JSypLOzkxyD1n uJmRX7f0qiZaizgb5+Qz5EySJFMMJlIr72RB+YRFZ7IhnKjOMW3Ih2UD+EwfwcFToo8yN9l QUZzA2UhudWNGlbnNTMrA== X-UI-Out-Filterresults: notjunk:1;V01:K0:jhYGlVj4Vxw=:DB4Q1mXwMXXGW8hgyHtGnd iNaoGfkHzGp32mrucLPbfo8rMj38wVAx1IbJ8ql6Y8JToPqL2xrdExfqw+h9Wd1LffokOoyej xD15E9HRyEcoFfMdeQl2rG33ocPb3pAqJMpDycyZyMYdaPDL5tRiOpdB7rn5Kn0nflJORxqf4 xXyQwlk3JwMWDKo+7MSOtKl0aOLyi3JQUSpfyT4gLGzLDXkpeRG4L85QZcu8wYrwQK6gX8fta OtPkez3kGHG8swfw2UGQu2mopAXEFi0z7JUBVbvNrxfhoZ5gkqVj0lpLdtmzzNDjrPfXBXW/7 fXZ7d9YzcdxArIc510XO0Ag9EvRjnPtcazajSpOOy5rQF7CNNmcUJqE6yBQaHfBqNxkDm3LOM qsdOK9+rI+MkXfX/Pz5pkroFl5kJVDSQBFptbGlz7EGsvt8zxoLC4T82pa8NvjZ4JevZj/65K 0jQWP/w4GYTtaTr/vzrK0xQhOPkHBlMW1n04xVL+mcD/Pm2YtJH17+IDrqSLTpkUgAIUjLThJ GAWhayuc7DPU6Q/CRT/yIL2c/lwBgeIRFnWa2ISL0Mwr7085/bEjFg3C9aXTxMmTtGcpf+DhH 2en2cLYlzz53tVGFEEYvvapYXNv4BiKglQ2/4/q8QZqLGngcx5aOUXz55CdwKLsMG3sAkcJKQ 6cBTodW59bcAKu+pWrL6sec+stBSrrVTBwCHYct9OzyIJBr050PTPUXPRr7snAFYRHIBqBRyz VOABwP3gOS32TSyP Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 860 Lines: 21 On Tuesday, November 22, 2016 5:48:41 PM CET Gregory CLEMENT wrote: > +#ifdef CONFIG_64BIT > + void *data_tmp; > + > + /* In Neta HW only 32 bits data is supported, so in order to > + * obtain whole 64 bits address from RX descriptor, we store > + * the upper 32 bits when allocating buffer, and put it back > + * when using buffer cookie for accessing packet in memory. > + * Frags should be allocated from single 'memory' region, > + * hence common upper address half should be sufficient. > + */ > + data_tmp = mvneta_frag_alloc(pp->frag_size); > + if (data_tmp) { > + pp->data_high = (u64)upper_32_bits((u64)data_tmp) << 32; > + mvneta_frag_free(pp->frag_size, data_tmp); > + } > How does this work when the region spans a n*4GB address boundary? Arnd