The parameter owner of function sbi_scratch_alloc_offset() is never used.
The scratch memory is small. We should not use it for debug information in
future. Hence eliminate the parameter.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
* @return zero on failure and non-zero (>= SBI_SCRATCH_EXTRA_SPACE_OFFSET)
* on success
*/
-unsigned long sbi_scratch_alloc_offset(unsigned long size, const char *owner);
+unsigned long sbi_scratch_alloc_offset(unsigned long size);
/** Free-up extra space in sbi_scratch */
void sbi_scratch_free_offset(unsigned long offset);
sbi_hart_expected_trap = &__sbi_expected_trap_hext;
hart_features_offset = sbi_scratch_alloc_offset(
- sizeof(struct hart_features),
- "HART_FEATURES");
+ sizeof(struct hart_features));
if (!hart_features_offset)
return SBI_ENOMEM;
}
struct sbi_hsm_data *hdata;
if (cold_boot) {
- hart_data_offset = sbi_scratch_alloc_offset(sizeof(*hdata),
- "HART_DATA");
+ hart_data_offset = sbi_scratch_alloc_offset(sizeof(*hdata));
if (!hart_data_offset)
return SBI_ENOMEM;
if (rc)
sbi_hart_hang();
- init_count_offset = sbi_scratch_alloc_offset(__SIZEOF_POINTER__,
- "INIT_COUNT");
+ init_count_offset = sbi_scratch_alloc_offset(__SIZEOF_POINTER__);
if (!init_count_offset)
sbi_hart_hang();
struct sbi_ipi_data *ipi_data;
if (cold_boot) {
- ipi_data_off = sbi_scratch_alloc_offset(sizeof(*ipi_data),
- "IPI_DATA");
+ ipi_data_off = sbi_scratch_alloc_offset(sizeof(*ipi_data));
if (!ipi_data_off)
return SBI_ENOMEM;
ret = sbi_ipi_event_create(&ipi_smode_ops);
return 0;
}
-unsigned long sbi_scratch_alloc_offset(unsigned long size, const char *owner)
+unsigned long sbi_scratch_alloc_offset(unsigned long size)
{
u32 i;
void *ptr;
const struct sbi_platform *plat = sbi_platform_ptr(scratch);
if (cold_boot) {
- time_delta_off = sbi_scratch_alloc_offset(sizeof(*time_delta),
- "TIME_DELTA");
+ time_delta_off = sbi_scratch_alloc_offset(sizeof(*time_delta));
if (!time_delta_off)
return SBI_ENOMEM;
const struct sbi_platform *plat = sbi_platform_ptr(scratch);
if (cold_boot) {
- tlb_sync_off = sbi_scratch_alloc_offset(sizeof(*tlb_sync),
- "IPI_TLB_SYNC");
+ tlb_sync_off = sbi_scratch_alloc_offset(sizeof(*tlb_sync));
if (!tlb_sync_off)
return SBI_ENOMEM;
- tlb_fifo_off = sbi_scratch_alloc_offset(sizeof(*tlb_q),
- "IPI_TLB_FIFO");
+ tlb_fifo_off = sbi_scratch_alloc_offset(sizeof(*tlb_q));
if (!tlb_fifo_off) {
sbi_scratch_free_offset(tlb_sync_off);
return SBI_ENOMEM;
}
tlb_fifo_mem_off = sbi_scratch_alloc_offset(
- SBI_TLB_FIFO_NUM_ENTRIES * SBI_TLB_INFO_SIZE,
- "IPI_TLB_FIFO_MEM");
+ SBI_TLB_FIFO_NUM_ENTRIES * SBI_TLB_INFO_SIZE);
if (!tlb_fifo_mem_off) {
sbi_scratch_free_offset(tlb_fifo_off);
sbi_scratch_free_offset(tlb_sync_off);