[PATCH] PPC/PPC64: Abstract cpu_feature checks.

Arnd Bergmann arnd at arndb.de
Sun Feb 6 22:57:34 EST 2005


On Sünndag 06 Februar 2005 04:26, Olof Johansson wrote:
> 
> Abstract most manual mask checks of cpu_features with cpu_has_feature()
>  
Just to get back to the point of consistant naming: In case we do the
other proposed changes as well, is everyone happy with the following
function names?

cpu_has_feature(CPU_FTR_X)	cur_cpu_spec->cpu_features & CPU_FTR_X
cpu_feature_possible(CPU_FTR_X)	CPU_FTR_POSSIBLE_MASK & CPU_FTR_X

fw_has_feature(FW_FEATURE_X)	cur_cpu_spec->fw_features & FW_FTR_X

platform_is(PLATFORM_X)		systemcfg->platform == PLATFORM_X
platform_possible(PLATFORM_X)	PLATFORM_POSSIBLE_MASK & PLATFORM_X
platform_compatible(PLATFORM_X)	systemcfg->platform & PLATFORM_X


It's not as consistant as I'd like it to be, but it's the best I could
come up with.

	Arnd <><
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20050206/4abc4242/attachment.pgp>


More information about the Linuxppc-dev mailing list