Re: [PATCH 1/1] GCD: add binary GCD algorithm

From: Peter Zijlstra
Date: Fri Aug 15 2014 - 17:32:48 EST


On Fri, Aug 15, 2014 at 04:16:01PM -0400, George Spelvin wrote:
> What I'd like is a better way to automatically configure "divide is
> slow" from an architecture.

So the usual thing and have arch/*/Kconfig select the fancy one if it
doesn't have a hardware divide instruction.

For instance:

arch/arm/Kconfig:

config ARM
...
select GCD_FANCY_ALGO if CPU_v6

Attachment: pgpcrtxnNj0mT.pgp
Description: PGP signature