mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
Add APIs to setup HugeTLB mappings for USDPAA
This commit is contained in:
parent
dc640f653a
commit
b558f49bc0
|
@ -89,6 +89,12 @@ void print_system_hash_info(void);
|
|||
|
||||
#endif /* CONFIG_PPC_MMU_NOHASH */
|
||||
|
||||
void settlbcam(int index, unsigned long virt, phys_addr_t phys,
|
||||
unsigned long size, unsigned long flags, unsigned int pid);
|
||||
|
||||
void cleartlbcam(unsigned long virt, unsigned int pid);
|
||||
|
||||
|
||||
#ifdef CONFIG_PPC32
|
||||
|
||||
void hash_preload(struct mm_struct *mm, unsigned long ea);
|
||||
|
|
|
@ -102,7 +102,7 @@ unsigned long p_block_mapped(phys_addr_t pa)
|
|||
* an unsigned long (for example, 32-bit implementations cannot support a 4GB
|
||||
* size).
|
||||
*/
|
||||
static void settlbcam(int index, unsigned long virt, phys_addr_t phys,
|
||||
void settlbcam(int index, unsigned long virt, phys_addr_t phys,
|
||||
unsigned long size, unsigned long flags, unsigned int pid)
|
||||
{
|
||||
unsigned int tsize;
|
||||
|
@ -140,6 +140,18 @@ static void settlbcam(int index, unsigned long virt, phys_addr_t phys,
|
|||
tlbcam_addrs[index].phys = phys;
|
||||
}
|
||||
|
||||
void cleartlbcam(unsigned long virt, unsigned int pid)
|
||||
{
|
||||
int i = 0;
|
||||
for (i = 0; i < NUM_TLBCAMS; i++) {
|
||||
if (tlbcam_addrs[i].start == virt) {
|
||||
TLBCAM[i].MAS1 = 0;
|
||||
loadcam_entry(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long calc_cam_sz(unsigned long ram, unsigned long virt,
|
||||
phys_addr_t phys)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user