[PATCH v3 12/21] powerpc/mm: Convert early cpu/mmu feature check to use the new helpers

Michael Ellerman mpe at ellerman.id.au
Thu Jul 28 23:04:45 AEST 2016


Nicholas Piggin <npiggin at gmail.com> writes:

> On Thu, 28 Jul 2016 00:18:08 +1000
> Michael Ellerman <mpe at ellerman.id.au> wrote:
>
>> From: "Aneesh Kumar K.V" <aneesh.kumar at linux.vnet.ibm.com>
>> 
>> This switches early feature checks to use the non static key variant
>> of the function. In later patches we will be switching
>> cpu_has_feature() and mmu_has_feature() to use static keys and we can
>> use them only after static key/jump label is initialized. Any check
>> for feature before jump label init should be done using this new
>> helper.
>
> Can't convince you to call it *_has_feature_early()?

Hmmm, I'll go with early_cpu_has_feature().

Otherwise it reads "does the CPU have feature 'early'".

> Any point to a WARN_ON_ONCE() in these guys that trips if they are
> used after the jump labels are set up?

See patch 20. Though we can't use WARN() as it may be too early in boot
to WARN(), so it just prints() and dumps stack.

cheers


More information about the Linuxppc-dev mailing list