Daniel Axtens <dja@xxxxxxxxxx> writes: > The core nuts and bolts of the crc32c vpmsum algorithm will > also work for a number of other CRC algorithms with different > polynomials. Factor out the function into a new asm file. > > To handle multiple users of the function, a user simply > provides constants, defines the name of their CRC function, > and then #includes the core algorithm file. > > Cc: Anton Blanchard <anton@xxxxxxxxx> > Signed-off-by: Daniel Axtens <dja@xxxxxxxxxx> > > -- > > It's possible at this point to argue that the address > of the constant tables should be passed in to the function, > rather than doing this somewhat unconventional #include. > > However, we're about to add further #ifdef's back into the core > that will be provided by the encapsulaing code, and which couldn't > be done as a variable without performance loss. > --- > arch/powerpc/crypto/crc32-vpmsum_core.S | 726 ++++++++++++++++++++++++++++++++ > arch/powerpc/crypto/crc32c-vpmsum_asm.S | 714 +------------------------------ > 2 files changed, 729 insertions(+), 711 deletions(-) > create mode 100644 arch/powerpc/crypto/crc32-vpmsum_core.S So although this sits in arch/powerpc, it's heavy on the crypto which is not my area of expertise (to say the least!), so I think it should probably go via Herbert and the crypto tree? cheers