]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
amd64_edac: Fix interleaving check
authorBorislav Petkov <borislav.petkov@amd.com>
Mon, 6 Dec 2010 15:20:25 +0000 (16:20 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:44:23 +0000 (12:44 -0700)
commit e726f3c368e7c1919a7166ec09c5705759f1a69d upstream.

When matching error address to the range contained by one memory node,
we're in valid range when node interleaving

1. is disabled, or
2. enabled and when the address bits we interleave on match the
interleave selector on this node (see the "Node Interleaving" section in
the BKDG for an enlightening example).

Thus, when we early-exit, we need to reverse the compound logic
statement properly.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/edac/amd64_edac.c

index 72904c8736cdf92bd90221809fe7665b72fb0f48..43f96fcfcfdd798a374380d57be348e5195b8c90 100644 (file)
@@ -1567,7 +1567,7 @@ static int f10_match_to_this_node(struct amd64_pvt *pvt, int dram_range,
        debugf1("   HoleOffset=0x%x  HoleValid=0x%x IntlvSel=0x%x\n",
                        hole_off, hole_valid, intlv_sel);
 
-       if (intlv_en ||
+       if (intlv_en &&
            (intlv_sel != ((sys_addr >> 12) & intlv_en)))
                return -EINVAL;