diff options
| author | Jiri Kosina <jkosina@suse.com> | 2025-12-02 14:52:36 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-12-02 14:52:36 +0100 |
| commit | 1a2f09ae11b4657d49df6fa86744795f99c2ee27 (patch) | |
| tree | cb178345ab4408702ec6de5fe9910924bfae96d7 /kernel/kexec_handover_debug.c | |
| parent | 59c752c59f12cfb56bbc0b213a4d24407959688a (diff) | |
| parent | 3b86c87f8dcbb8ba3b00d7adf7ccfff086f0f23e (diff) | |
Merge branch 'for-6.19/hid-bpf' into for-linus
- Bring in a couple more BPF drivers for various devices (Benjamin Tissoires)
Diffstat (limited to 'kernel/kexec_handover_debug.c')
| -rw-r--r-- | kernel/kexec_handover_debug.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/kernel/kexec_handover_debug.c b/kernel/kexec_handover_debug.c new file mode 100644 index 000000000000..6efb696f5426 --- /dev/null +++ b/kernel/kexec_handover_debug.c @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * kexec_handover_debug.c - kexec handover optional debug functionality + * Copyright (C) 2025 Google LLC, Pasha Tatashin <pasha.tatashin@soleen.com> + */ + +#define pr_fmt(fmt) "KHO: " fmt + +#include "kexec_handover_internal.h" + +bool kho_scratch_overlap(phys_addr_t phys, size_t size) +{ + phys_addr_t scratch_start, scratch_end; + unsigned int i; + + for (i = 0; i < kho_scratch_cnt; i++) { + scratch_start = kho_scratch[i].addr; + scratch_end = kho_scratch[i].addr + kho_scratch[i].size; + + if (phys < scratch_end && (phys + size) > scratch_start) + return true; + } + + return false; +} |
