2008-06-10 09:06:54 How to disable cache in Kernel
Appalayagari Sreedhar (INDIA)
Message: 56927
Hi,
I want to disable cache in kernel and also to disable the interrupts.
I need to disable the intetrupts, is there any functions which directly call IMASK register?.
Can anyone tell me how to do these operations in kernel. are there any apis to do these functionalities.
it will be helpful to me where these kind of apis are available in the kernel.
Thanks and Best Regards,
Sreedhar.
QuoteReplyEditDelete
2008-06-10 09:56:26 Re: How to disable cache in Kernel
Robin Getz (UNITED STATES)
Message: 56928
Appalaygari:
First question from me is "Why"?
To turn off cache, you can do this in the menuconfig -> blackfin specific options -> Cache Support
As for interrupts, do you want to control a specific interrupt? or all? You may want to look at:
https://docs.blackfin.uclinux.org/doku.php?id=auto_generated_kernel_docs:kernel-locking
-Robin
QuoteReplyEditDelete
2008-06-10 11:07:00 Re: How to disable cache in Kernel
Appalayagari Sreedhar (INDIA)
Message: 56934
Hi Robin,
Thankyou very much.
I need to disable the cache at run time, so i have asked.
By doing the changes in menuconfig i can do the same at compile time only, can you suggest me how i can do in uClinux, or i should program the cache control registers my own, which i we normally do in VDSP.
By the way, I am newbie to uClinux and linux.
Can you please suggest a good book for learning linux.
Thanks and Regards.Sreedhar.
QuoteReplyEditDelete
2008-06-10 11:14:49 Re: How to disable cache in Kernel
Mike Frysinger (UNITED STATES)
Message: 56935
you cannot disable cache at runtime
QuoteReplyEditDelete
2008-06-10 11:35:23 Re: How to disable cache in Kernel
Robin Getz (UNITED STATES)
Message: 56936
Sreedhar:
Mike is correct - you can not turn cache on off at run time. Don't try. You have non-cache DMA coherant memory, and cached memory. You control in your driver which memory is used.
As for books, we keep a list at:
https://docs.blackfin.uclinux.org/doku.php?id=references_and_pointers#good_books
QuoteReplyEditDelete
2008-06-10 11:46:06 Re: How to disable cache in Kernel
Appalayagari Sreedhar (INDIA)
Message: 56937
Hi,
Thanks Robin and Mike!!
I understood from you that cache can not be turn off and on at run time. Thanks once again.
One of my application requires such behaviour,
I need to make use of internal memory as much as possible.
So is there any way to make cache turn off and on?. dont mistake me for asking the same question.
Thanks and Regards,Sreedhar.
QuoteReplyEditDelete
2008-06-10 12:03:32 Re: How to disable cache in Kernel
Robin Getz (UNITED STATES)
Message: 56940
Sreedhar:
Asked and answered. There is no way.
Maybe Linux is not your best choice for your application.