Re: [PATCH 06/16] nfp: add nsp symbol resolution command
From: Ferruh Yigit <hidden>
Date: 2017-08-28 16:42:53
On 8/24/2017 5:20 PM, Alejandro Lucero wrote:
Firmware has symbols helping to configure things like number of PF ports, vNIC BARs addresses inside NFP memories, or ethernet link state. Different firmware apps have different things to map and likely different internal NFP addresses to use. Host drivers can use the NSPU interface for getting symbol data regarding different hardware configurations. Once the driver has the information about a specific object, a mapping is required configuring an NFP expansion bar creating a device PCI bar window. Signed-off-by: Alejandro Lucero <redacted>
<...>
+
+ /* Adjusting address based on symbol location */
+ if (domain >= 24 && domain << 28 && target == 7) {
gcc is giving following compiler warning [1]. Most probably intention is
the compare, but it is not clear, can you please check?
[1]
.../drivers/net/nfp/nfp_nspu.c: In function ‘nfp_nspu_set_bar_from_symbl’:
.../drivers/net/nfp/nfp_nspu.c:446:29: error: ‘<<’ in boolean context,
did you mean ‘<’ ? [-Werror=int-in-bool-context]
if (domain >= 24 && domain << 28 && target == 7) {
~~~~~~~^~~~~
+ addr = 1ULL << 37 | addr | ((uint64_t)domain & 0x3) << 35;
+ } else {
+ addr = 1ULL << 39 | addr | ((uint64_t)domain & 0x3f) << 32;
+ if (target == -7)
+ target = 7;
+ }