AnsweredAssumed Answered

Not able to understand this kernel function and android kernel command line

Question asked by mrigendra chaubey on Jul 8, 2018
Latest reply on Jul 17, 2018 by jimmychan

I want to understand what happens in these two functions in linux kernel 4.9.17


void flush_tlb_kernel_range(unsigned long start, unsigned long end)
if (tlb_ops_need_broadcast()) {
struct tlb_args ta;
ta.ta_start = start;
ta.ta_end = end;
on_each_cpu(ipi_flush_tlb_kernel_range, &ta, 1);
} else
local_flush_tlb_kernel_range(start, end);//becomes v7wbi_flush_kern_tlb_range(start, end);



* v7wbi_flush_kern_tlb_range(start,end)
* Invalidate a range of kernel TLB entries
* - start - start address (may not be aligned)
* - end - end address (exclusive, may not be aligned)
dsb ish
mov r0, r0, lsr #PAGE_SHIFT @ align address
mov r1, r1, lsr #PAGE_SHIFT
mov r0, r0, lsl #PAGE_SHIFT
mov r1, r1, lsl #PAGE_SHIFT
#ifdef CONFIG_ARM_ERRATA_720789
ALT_SMP(mcr p15, 0, r0, c8, c3, 3) @ TLB invalidate U MVA all ASID (shareable)
ALT_SMP(mcr p15, 0, r0, c8, c3, 1) @ TLB invalidate U MVA (shareable)
ALT_UP(mcr p15, 0, r0, c8, c7, 1) @ TLB invalidate U MVA
add r0, r0, #PAGE_SZ
cmp r0, r1
blo 1b
dsb ish
ret lr


Because I do not have a debugger and my kernel stops after calling local_flush_tlb_kernel_range(start, end); and I do not know how to debug inside this assembly file.


Also I just copied this from sabresd kernel command line for android


Kernel command line: console=ttymxc0,115200 init=/init earlyprintk video=mxcfb0:dev=ldb,fbpix=RGB32,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=128M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=448M galcore.contiguousSize=33554432 buildvariant=userdebug androidboot.serialno=110f91d4ea9ac958 androidboot.soc_type=imx6qp androidboot.storage_type=sd gpt


Can anyone tell what these variables means to kernel




How should I change these, on what basis? How can I cross check that these are correct command line options i want?


Here in the command line it wants 448MiB of contiguous area, for vmalloc 128M. But isn't it the vmalloc area itself needs to be contiguous, then why two seperate variables?


Any help or direction will be very helpful.