Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
29 lines
590 B
C
29 lines
590 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <stdio.h>
|
|
#include "api/fs/fs.h"
|
|
#include "util/group.h"
|
|
|
|
/*
|
|
* Check whether we can use a group for top down.
|
|
* Without a group may get bad results due to multiplexing.
|
|
*/
|
|
bool arch_topdown_check_group(bool *warn)
|
|
{
|
|
int n;
|
|
|
|
if (sysctl__read_int("kernel/nmi_watchdog", &n) < 0)
|
|
return false;
|
|
if (n > 0) {
|
|
*warn = true;
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
void arch_topdown_group_warn(void)
|
|
{
|
|
fprintf(stderr,
|
|
"nmi_watchdog enabled with topdown. May give wrong results.\n"
|
|
"Disable with echo 0 > /proc/sys/kernel/nmi_watchdog\n");
|
|
}
|