[e500] enabling hardware data cache coherency in Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

[e500] enabling hardware data cache coherency in Linux

1,320 次查看
aleksander
Contributor I

Hello!

I am trying to enable hardware enforced coherency in P2020 in order to speed up communication between core and eTSEC.

Unfortunately, I cannot find, how to set/clear proper bits in MAS2 register, using standard linux kernel API. Is there any way to do this clean way, or should I just hack my way out?

The only proof that Linux might set those bits is in [2], function, but that doesn't lead me to any generic kernel api function.

[1] http://www.freescale.com/files/32bit/doc/app_note/AN3544.pdf

[2] Linux/arch/powerpc/mm/fsl_booke_mmu.c - Linux Cross Reference - Free Electrons

regards

Aleksander

标签 (1)
标记 (3)
0 项奖励
回复
3 回复数

1,183 次查看
scottwood
NXP Employee
NXP Employee

Linux already uses coherent DMA on e500-family chips.

0 项奖励
回复

1,183 次查看
aleksander
Contributor I

Can you show how it's done? I suppose, using functions from  <linux/dma-mapping.h> you somehow assures, you set proper MAS2 bits, but I'd like to know where it is done.

thanks

Aleksander

0 项奖励
回复

1,183 次查看
scottwood
NXP Employee
NXP Employee

MAS2[M] is relevant for SMP (and will be set on SMP kernels), not for DMA coherence on e500v2 (e500mc is another matter).  As long the device is generating snoops (e.g. TDSEN/TBDSEN/RDSEN/RBDSEN are set), the DMA will be coherent.

0 项奖励
回复