
v3: Introduce a little helper function as suggested by Stefan. gcc generates the same code before and after that refactoring - in particular, the code is still the same as before these patches when the config option is left at its default.
Include Stefan's Reviewed-bys.
v2 cover letter:
Back in June, I sent a patch [1] to reduce the number of WATCHDOG_RESET calls in flush_cache() to one per 64K. Wolfgang rejected that, saying that the threshold should be configurable.
So here's a new version which introduces a config knob. When left at its default, the generated code is binary identical to what one gets before these patches.
I stumbled on the CONFIG_5xx and thought I ought to make the config knob depend on !CONFIG_5xx, but it turns out it's better to just remove that piece of legacy, hence the first janitorial patch.
[1] https://lists.denx.de/pipermail/u-boot/2020-June/414852.html
Rasmus Villemoes (2): powerpc: lib: remove leftover CONFIG_5xx powerpc: introduce CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD
arch/powerpc/Kconfig | 1 + arch/powerpc/lib/Kconfig | 9 +++++++++ arch/powerpc/lib/cache.c | 17 +++++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 arch/powerpc/lib/Kconfig