Attention is currently required from: Benjamin Doron, David Milosevic, Julius Werner.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79106?usp=email )
Change subject: arch/arm64: Extend cache helper functions ......................................................................
Patch Set 4:
(3 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/79106/comment/4da22524_f6025448 : PS4, Line 12: Furthermore, static functions were grouped and moved to the top and : non-static functions to the bottom, in order to provide a better : structure to the file. Please don't. Besides making reviews more difficult, there's nothing in the coding style guidelines justifying such style changes. In fact, such style changes are frowned upon: imagine the chaos that would ensue if every contributor changed the style of files to their personal preference...
Coding style: https://doc.coreboot.org/contributing/coding_style.html
File src/arch/arm64/armv8/cache.c:
https://review.coreboot.org/c/coreboot/+/79106/comment/f1dce87c_e537a46c : PS4, Line 14: enum dcache_op { : OP_DCCSW, : OP_DCCISW, : OP_DCISW, : OP_DCCIVAC, : OP_DCCVAC, : OP_DCIVAC, : }; What benefit does moving this enum away from the `dcache_op_va()` function provide?
https://review.coreboot.org/c/coreboot/+/79106/comment/21385259_46ce2562 : PS4, Line 113: enum cache_type cpu_get_cache_type(enum cache_level level) : { : uint32_t ctype_bitshift = (level - 1) * 3; : : if (level < CACHE_L1 || level > CACHE_L7) : return NO_CACHE; : : /* 3-bits per cache-level */ : return (raw_read_clidr_el1() >> ctype_bitshift) & 0x7; : } Unless you have to, please avoid moving functions around. It's very hard for me to notice if you've changed anything in this function or not: it has been moved to a different place in the file, so the diff is useless.