mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-09-10 19:11:43 +01:00
lib: sbi: Rename map_range/unmap_range functions
*_map_range and *_unmap_range functions are required in M-Mode to get the temporary access to S-Mode and U-Mode regions. Thse functions only operate using the TYPE_MEMORY memory protection mechanisms. Rename them to reflect the actual usage of these functions and let generic map/unmap_range names to implement generic functions Signed-off-by: Rahul Pathak <rahul.pathak@oss.qualcomm.com> Reviewed-by: Anup Patel <anup@brainfault.org> Reviewed-by: Pawandeep Oza <pawandeep.oza@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260820121309.2551296-2-rahul.pathak@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -196,22 +196,22 @@ int sbi_hart_protection_reconfigure(struct sbi_scratch *scratch,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sbi_hart_protection_map_range(unsigned long base, unsigned long size)
|
||||
int sbi_hart_protection_temp_map_range(unsigned long base, unsigned long size)
|
||||
{
|
||||
struct sbi_hart_protection *hprot = __hart_memory_protection_best();
|
||||
|
||||
if (!hprot || !hprot->map_range)
|
||||
if (!hprot || !hprot->temp_map_range)
|
||||
return 0;
|
||||
|
||||
return hprot->map_range(sbi_scratch_thishart_ptr(), base, size);
|
||||
return hprot->temp_map_range(sbi_scratch_thishart_ptr(), base, size);
|
||||
}
|
||||
|
||||
int sbi_hart_protection_unmap_range(unsigned long base, unsigned long size)
|
||||
int sbi_hart_protection_temp_unmap_range(unsigned long base, unsigned long size)
|
||||
{
|
||||
struct sbi_hart_protection *hprot = __hart_memory_protection_best();
|
||||
|
||||
if (!hprot || !hprot->unmap_range)
|
||||
if (!hprot || !hprot->temp_unmap_range)
|
||||
return 0;
|
||||
|
||||
return hprot->unmap_range(sbi_scratch_thishart_ptr(), base, size);
|
||||
return hprot->temp_unmap_range(sbi_scratch_thishart_ptr(), base, size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user