Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1223364
| From | christophe leroy <christophe.leroy@c-s.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled |
| Date | 2015-09-12 12:00 +0200 |
| Message-ID | <q7PLc-5mb-13@gated-at.bofh.it> (permalink) |
| References | <q73Qe-2gG-9@gated-at.bofh.it> <q7icx-6iX-1@gated-at.bofh.it> <q7lk5-2Q0-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Le 11/09/2015 03:24, Michael Ellerman a écrit :
> On Thu, 2015-09-10 at 17:05 -0500, Scott Wood wrote:
>>
>> I don't think this duplication is what Michael meant by "the normal cpu
>> feature sections". What else is going to use this very specific
>> infrastructure?
> Yeah, sorry, I was hoping you could do it with the existing cpu feature
> mechanism.
>
> It looks like the timing doesn't work, ie. you need to patch this stuff in
> machine_init(), which is later than the regular patching which gets done in
> early_init().
>
> This is one of the festering differences we have between the 32 and 64-bit
> initialisation code, ie. on 64-bit we do the patching much later.
>
>
I've just thought about maybe another alternative.
Is there any issue with calling do_feature_fixups() twice for the same
features ?
If not, we could define a MMU_CACHE_NOW_ON dummy MMU feature, then
call again do_feature_fixups() in machine_init() to patch memcpy/memset
stuff, something like:
In arch/powerpc/include/asm/mmu.h:
+#define MMU_CACHE_NOW_ON ASM_CONST(0x00008000)
In arch/powerpc/kernel/setup_32.c: @machine_init()
udbg_early_init();
+ spec = identify_cpu(0, mfspr(SPRN_PVR));
+ do_feature_fixups(spec->mmu_features | MMU_CACHE_NOW_ON,
+ &__start___mmu_ftr_fixup,
+ &__stop___mmu_ftr_fixup);
/* Do some early initialization based on the flat device tree */
early_init_devtree(__va(dt_ptr));
Christophe
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled Christophe Leroy <christophe.leroy@c-s.fr> - 2015-09-10 08:50 +0200
Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled Scott Wood <scottwood@freescale.com> - 2015-09-11 00:10 +0200
Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled Michael Ellerman <mpe@ellerman.id.au> - 2015-09-11 03:30 +0200
Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled christophe leroy <christophe.leroy@c-s.fr> - 2015-09-12 12:00 +0200
Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled Michael Ellerman <mpe@ellerman.id.au> - 2015-09-14 12:00 +0200
Re: [PATCH v2] powerpc32: memcpy/memset: only use dcbz once cache is enabled Scott Wood <scottwood@freescale.com> - 2015-09-14 18:40 +0200
csiph-web