| // SPDX-License-Identifier: GPL-2.0 |
| * Common Primitives for DAMON Modules |
| * Author: SeongJae Park <sjpark@amazon.de> |
| #include "modules-common.h" |
| * Allocate, set, and return a DAMON context for the physical address space. |
| * @ctxp: Pointer to save the point to the newly created context |
| * @targetp: Pointer to save the point to the newly created target |
| int damon_modules_new_paddr_ctx_target(struct damon_ctx **ctxp, |
| struct damon_target **targetp) |
| struct damon_target *target; |
| if (damon_select_ops(ctx, DAMON_OPS_PADDR)) { |
| target = damon_new_target(); |
| damon_add_target(ctx, target); |