aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8xxx/law.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/cpu/mpc8xxx/law.c')
-rw-r--r--arch/powerpc/cpu/mpc8xxx/law.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index f16bc199663..f3a9749625c 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -130,7 +130,7 @@ int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
return idx;
}
-struct law_entry find_law(phys_addr_t addr)
+struct law_entry find_law_by_addr_id(phys_addr_t addr, enum law_trgt_if id)
{
struct law_entry entry;
int i;
@@ -146,6 +146,9 @@ struct law_entry find_law(phys_addr_t addr)
if (!get_law_entry(i, &entry))
continue;
+ if (id != -1 && id != entry.trgt_id)
+ continue;
+
upper = entry.addr + (2ull << entry.size);
if ((addr >= entry.addr) && (addr < upper)) {
entry.index = i;