trivial: fix typos and copy/paste fragments

Signed-off-by: Axel Heider <axelheider@gmx.de>
This commit is contained in:
Axel Heider
2021-11-26 11:50:03 +01:00
committed by Gerwin Klein
parent 9eca49f9d5
commit fcbb15ce3f
4 changed files with 12 additions and 12 deletions

View File

@@ -364,7 +364,7 @@ config_option(
config_choice( config_choice(
KernelBenchmarks KernelBenchmarks
KERNEL_BENCHMARK KERNEL_BENCHMARK
"Enable benchamrks including logging and tracing info. \ "Enable benchmarks including logging and tracing info. \
Setting this value > 1 enables a 1MB log buffer and functions for extracting data from it \ Setting this value > 1 enables a 1MB log buffer and functions for extracting data from it \
at user level. NOTE this is only tested on the sabre and will not work on platforms with < 512mb memory. \ at user level. NOTE this is only tested on the sabre and will not work on platforms with < 512mb memory. \
This is not fully implemented for x86. \ This is not fully implemented for x86. \
@@ -386,7 +386,7 @@ else()
config_set(KernelEnableBenchmarks ENABLE_BENCHMARKS OFF) config_set(KernelEnableBenchmarks ENABLE_BENCHMARKS OFF)
endif() endif()
# Reflect the existance of kernel Log buffer # Reflect the existence of kernel Log buffer
if(KernelBenchmarksTrackKernelEntries OR KernelBenchmarksTracepoints) if(KernelBenchmarksTrackKernelEntries OR KernelBenchmarksTracepoints)
config_set(KernelLogBuffer KERNEL_LOG_BUFFER ON) config_set(KernelLogBuffer KERNEL_LOG_BUFFER ON)
else() else()

View File

@@ -95,7 +95,7 @@ static inline uint64_t riscv_read_cycle(void)
"rdcycleh %2\n" "rdcycleh %2\n"
: "=r"(nH1), "=r"(nL), "=r"(nH2)); : "=r"(nH1), "=r"(nL), "=r"(nH2));
if (nH1 != nH2) { if (nH1 != nH2) {
/* Ensure that the time is correct if there is a rollover in the /* Ensure that the cycles are correct if there is a rollover in the
* high bits between reading the low and high bits. */ * high bits between reading the low and high bits. */
asm volatile( asm volatile(
"rdcycle %0\n" "rdcycle %0\n"

View File

@@ -13,11 +13,11 @@
#ifdef __ASSEMBLER__ #ifdef __ASSEMBLER__
/* Provide a helper macro to define integer constants that are not of the /* Provide a helper macro to define integer constants that are not of the
* default type 'ìnt', but 'unsigned long'. When such constants are shared * default type 'ìnt', but 'unsigned long [long]'. When such constants are
* between assembly and C code, some assemblers will fail because don't support * shared between assembly and C code, some assemblers will fail because they
* C-style integer suffixes like 'ul'. Using a macro works around this, as the * don't support C-style integer suffixes like 'ul'. Using a macro works around
* suffix is only applies when the C compiler is used and dropped when the * this, as the suffix is only applied when the C compiler is used and dropped
* assembler runs. * when the assembler runs.
*/ */
#define UL_CONST(x) x #define UL_CONST(x) x
#define ULL_CONST(x) x #define ULL_CONST(x) x
@@ -45,9 +45,9 @@
#define MIN(a,b) (((a)<(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b))
/* Time constants are define to use the 'unsigned long long'. Rationale is, that /* Time constants are defined to use the 'unsigned long long'. Rationale is,
* the C rules define the calculation result is determined by largest type * that the C rules define the calculation result is determined by largest type
* involved. Enforcing the larges possible type C provides avoids pitfalls with * involved. Enforcing the largest possible type C provides avoids pitfalls with
* 32-bit overflows when values are getting quite large. Keep in mind that even * 32-bit overflows when values are getting quite large. Keep in mind that even
* 2^32 milli-seconds roll over within 50 days, which is an uptime that embedded * 2^32 milli-seconds roll over within 50 days, which is an uptime that embedded
* systems will reach easily and it resembles not even two months in a calendar * systems will reach easily and it resembles not even two months in a calendar

View File

@@ -820,7 +820,7 @@ BOOT_CODE bool_t init_freemem(word_t n_available, const p_region_t *available,
/* skip the entire region - it's empty now after trimming */ /* skip the entire region - it's empty now after trimming */
a++; a++;
} else if (reserved[r].end <= avail_reg[a].start) { } else if (reserved[r].end <= avail_reg[a].start) {
/* the reserved region is below the available region - skip it*/ /* the reserved region is below the available region - skip it */
reserve_region(pptr_to_paddr_reg(reserved[r])); reserve_region(pptr_to_paddr_reg(reserved[r]));
r++; r++;
} else if (reserved[r].start >= avail_reg[a].end) { } else if (reserved[r].start >= avail_reg[a].end) {