Re: [PATCH net-next 4/6] net: ipa: add support to code for IPA v4.5

From: Alex Elder
Date: Tue Dec 01 2020 - 13:37:25 EST


On 12/1/20 12:11 PM, Jon Hunter wrote:

On 25/11/2020 20:45, Alex Elder wrote:
Update the IPA code to make use of the updated IPA v4.5 register
definitions. Generally what this patch does is, if IPA v4.5
hardware is in use:
- Ensure new registers or fields in IPA v4.5 are updated where
required
- Ensure registers or fields not supported in IPA v4.5 are not
examined when read, or are set to 0 when written
It does this while preserving the existing functionality for IPA
versions lower than v4.5.

The values to program for QSB_MAX_READS and QSB_MAX_WRITES and the
source and destination resource counts are updated to be correct for
all versions through v4.5 as well.

Note that IPA_RESOURCE_GROUP_SRC_MAX and IPA_RESOURCE_GROUP_DST_MAX
already reflect that 5 is an acceptable number of resources (which
IPA v4.5 implements).

Signed-off-by: Alex Elder <elder@xxxxxxxxxx>


This change is generating the following build error on ARM64 ...

Sorry about that. Thank you for reporting this, I will investigate.

-Alex

In file included from drivers/net/ipa/ipa_main.c:9:0:
In function ‘u32_encode_bits’,
inlined from ‘ipa_hardware_config_qsb.isra.7’ at drivers/net/ipa/ipa_main.c:286:6,
inlined from ‘ipa_hardware_config’ at drivers/net/ipa/ipa_main.c:363:2,
inlined from ‘ipa_config.isra.12’ at drivers/net/ipa/ipa_main.c:555:2,
inlined from ‘ipa_probe’ at drivers/net/ipa/ipa_main.c:835:6:
./include/linux/bitfield.h:131:3: error: call to ‘__field_overflow’ declared with attribute error: value doesn't fit into mask
__field_overflow(); \
^~~~~~~~~~~~~~~~~~
./include/linux/bitfield.h:151:2: note: in expansion of macro ‘____MAKE_OP’
____MAKE_OP(u##size,u##size,,)
^~~~~~~~~~~
./include/linux/bitfield.h:154:1: note: in expansion of macro ‘__MAKE_OP’
__MAKE_OP(32)
^~~~~~~~~

Cheers
Jon