mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 08:13:56 -04:00
reg_in_range_table is a useful function that is used in multiple places, and will be needed for WA_BB implementation later. Let's move this function and i915_range struct to its own file, as we are trying to move away from i915_utils files. v2: move functions to their own file v3: use correct naming convention Suggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com> Link: https://lore.kernel.org/r/20251009215210.41000-1-matthew.s.atwood@intel.com Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
19 lines
331 B
C
19 lines
331 B
C
// SPDX-License-Identifier: MIT
|
|
/*
|
|
* Copyright © 2025 Intel Corporation
|
|
*/
|
|
|
|
#include "i915_mmio_range.h"
|
|
|
|
bool i915_mmio_range_table_contains(u32 addr, const struct i915_mmio_range *table)
|
|
{
|
|
while (table->start || table->end) {
|
|
if (addr >= table->start && addr <= table->end)
|
|
return true;
|
|
|
|
table++;
|
|
}
|
|
|
|
return false;
|
|
}
|