OSDN Git Service

Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping
[uclinux-h8/linux.git] / drivers / edac / skx_edac.c
index fae0951..dd209e0 100644 (file)
@@ -364,7 +364,7 @@ static int get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm,
        size = ((1ull << (rows + cols + ranks)) * banks) >> (20 - 3);
        npages = MiB_TO_PAGES(size);
 
-       edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
+       edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld MiB (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
                 imc->mc, chan, dimmno, size, npages,
                 banks, 1 << ranks, rows, cols);
 
@@ -424,7 +424,7 @@ unknown_size:
        dimm->mtype = MEM_NVDIMM;
        dimm->edac_mode = EDAC_SECDED; /* likely better than this */
 
-       edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu Mb (%u pages)\n",
+       edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu MiB (%u pages)\n",
                 imc->mc, chan, dimmno, size >> 20, dimm->nr_pages);
 
        snprintf(dimm->label, sizeof(dimm->label), "CPU_SrcID#%u_MC#%u_Chan#%u_DIMM#%u",
@@ -668,7 +668,7 @@ sad_found:
                        break;
                case 2:
                        lchan = (addr >> shift) % 2;
-                       lchan = (lchan << 1) | ~lchan;
+                       lchan = (lchan << 1) | !lchan;
                        break;
                case 3:
                        lchan = ((addr >> shift) % 2) << 1;
@@ -959,6 +959,7 @@ static void skx_mce_output_error(struct mem_ctl_info *mci,
        recoverable = GET_BITFIELD(m->status, 56, 56);
 
        if (uncorrected_error) {
+               core_err_cnt = 1;
                if (ripv) {
                        type = "FATAL";
                        tp_event = HW_EVENT_ERR_FATAL;