platform: Add an platform ops to return platform specific tlb flush limit
authorAtish Patra <atish.patra@wdc.com>
Tue, 4 Feb 2020 23:09:14 +0000 (15:09 -0800)
committerAnup Patel <anup@brainfault.org>
Wed, 5 Feb 2020 05:07:11 +0000 (10:37 +0530)
commitd79173b4b7519b537cf64c984d27daa26aad23c0
tree089a36255303e4a6254a61c8fc9cf3812549e2fa
parentac1c229b6124baf66b76982b2c82e4ca7ce9e2d5
platform: Add an platform ops to return platform specific tlb flush limit

If a platform requires to perform a tlb full flush, they should set
the tlb_range_flush_limit value to zero. However, corresponding platform
API ignore the value and continue to return the default value.

Add a platform ops to retrieve platform specific tlb range flush limit.
The platform variable becomes redundant in presence of the platform ops.
Take this opportunity to remove the variable as well.

The default is still set to smallest page size in RISC-V (4KB), as there
is no way to figure out a best value for all platforms. Individual platform
should set it to the optimal value for their platform.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
include/sbi/sbi_platform.h
platform/template/platform.c