mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
Move KHO to kernel/liveupdate/ in preparation of placing all Live Update core kernel related files to the same place. [pasha.tatashin@soleen.com: disable the menu when DEFERRED_STRUCT_PAGE_INIT] Link: https://lkml.kernel.org/r/CA+CK2bAvh9Oa2SLfsbJ8zztpEjrgr_hr-uGgF1coy8yoibT39A@mail.gmail.com Link: https://lkml.kernel.org/r/20251101142325.1326536-8-pasha.tatashin@soleen.com Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Cc: Alexander Graf <graf@amazon.com> Cc: Changyuan Lyu <changyuanl@google.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Miguel Ojeda <ojeda@kernel.org> Cc: Pratyush Yadav <pratyush@kernel.org> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Simon Horman <horms@kernel.org> Cc: Tejun Heo <tj@kernel.org> Cc: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
26 lines
622 B
C
26 lines
622 B
C
// 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;
|
|
}
|