]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge tag 'edac_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Oct 2018 13:40:00 +0000 (06:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Oct 2018 13:40:00 +0000 (06:40 -0700)
Pull EDAC updates from Borislav Petkov:
 "The EDAC tree was busier than usual this cycle as the shortlog below
  shows.

  Also, this pull request is carrying an ACPI DSM driver which is used
  to ask the platform to supply the DIMM location of a reported hardware
  error and thus simplify all the EDAC logic when trying to map the
  error address to the respective DIMM.

  Core EDAC updates:

   - amd64_edac: AMD family 0x17, models 0x10-0x2f support (Michael Jin)
     Hygon Dhyana support (Pu Wen)

   - sb_edac: New maintainer + fixes (Tony Luck) Error reporting
     improvements and fixes (Qiuxu Zhuo)

   - ghes_edac: SMBIOS handle type 17 for DIMM locating and per-DIMM
     error accounting (Fan Wu)

   - altera_edac: Stratix10 support and refactoring (Thor Thayer)

  Out of tree addition:

   - acpi_adxl: Address Translation interface using an ACPI DSM (Tony
     Luck)

   - the usual amount of other misc fixes and cleanups all over"

* tag 'edac_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (22 commits)
  ACPI/ADXL: Add address translation interface using an ACPI DSM
  EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr()
  EDAC, skx_edac: Fix logical channel intermediate decoding
  EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting
  EDAC, altera: Work around int-to-pointer-cast warnings
  EDAC, amd64: Add Hygon Dhyana support
  EDAC: Raise the maximum number of memory controllers
  arm64: dts: stratix10: Add peripheral EDAC nodes
  EDAC, altera: Add Stratix10 peripheral support
  EDAC, altera: Merge Stratix10 into the Arria10 SDRAM probe routine
  arm64: dts: stratix10: Add SDRAM node
  EDAC, altera: Combine Stratix10 and Arria10 probe functions
  arm64: dts: stratix10: Additions to EDAC System Manager
  EDAC, i7core: Remove set but not used variable pvt
  EDAC, ghes: Use CPER module handles to locate DIMMs
  EDAC: Correct DIMM capacity unit symbol
  EDAC, sb_edac: Fix signedness bugs in *_get_ha() functions
  EDAC, sb_edac: Fix reporting for patrol scrubber errors
  EDAC, sb_edac: Return early on ADDRV bit and address type test
  MAINTAINERS: Update maintainer for drivers/edac/sb_edac.c
  ...

1  2 
MAINTAINERS
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
drivers/acpi/Kconfig
drivers/edac/altera_edac.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index ab7c5a937ab00b19c6557b063d7c3c106e4a05cb,4324a00f3c27621d487cb36f9c2bb83a671ca79f..c89d82aa277601d67ae673097eae2c9a8d6f997a
@@@ -593,185 -521,12 +521,13 @@@ static const struct regmap_config s10_s
        .reg_bits = 32,
        .reg_stride = 4,
        .val_bits = 32,
-       .max_register = 0xffffffff,
-       .writeable_reg = s10_sdram_writeable_reg,
-       .readable_reg = s10_sdram_readable_reg,
-       .volatile_reg = s10_sdram_volatile_reg,
+       .max_register = 0xffd12228,
        .reg_read = s10_protected_reg_read,
        .reg_write = s10_protected_reg_write,
 -      .use_single_rw = true,
 +      .use_single_read = true,
 +      .use_single_write = true,
  };
  
- static int altr_s10_sdram_probe(struct platform_device *pdev)
- {
-       const struct of_device_id *id;
-       struct edac_mc_layer layers[2];
-       struct mem_ctl_info *mci;
-       struct altr_sdram_mc_data *drvdata;
-       const struct altr_sdram_prv_data *priv;
-       struct regmap *regmap;
-       struct dimm_info *dimm;
-       u32 read_reg;
-       int irq, ret = 0;
-       unsigned long mem_size;
-       id = of_match_device(altr_sdram_ctrl_of_match, &pdev->dev);
-       if (!id)
-               return -ENODEV;
-       /* Grab specific offsets and masks for Stratix10 */
-       priv = of_match_node(altr_sdram_ctrl_of_match,
-                            pdev->dev.of_node)->data;
-       regmap = devm_regmap_init(&pdev->dev, NULL, (void *)priv,
-                                 &s10_sdram_regmap_cfg);
-       if (IS_ERR(regmap))
-               return PTR_ERR(regmap);
-       /* Validate the SDRAM controller has ECC enabled */
-       if (regmap_read(regmap, priv->ecc_ctrl_offset, &read_reg) ||
-           ((read_reg & priv->ecc_ctl_en_mask) != priv->ecc_ctl_en_mask)) {
-               edac_printk(KERN_ERR, EDAC_MC,
-                           "No ECC/ECC disabled [0x%08X]\n", read_reg);
-               return -ENODEV;
-       }
-       /* Grab memory size from device tree. */
-       mem_size = get_total_mem();
-       if (!mem_size) {
-               edac_printk(KERN_ERR, EDAC_MC, "Unable to calculate memory size\n");
-               return -ENODEV;
-       }
-       /* Ensure the SDRAM Interrupt is disabled */
-       if (regmap_update_bits(regmap, priv->ecc_irq_en_offset,
-                              priv->ecc_irq_en_mask, 0)) {
-               edac_printk(KERN_ERR, EDAC_MC,
-                           "Error disabling SDRAM ECC IRQ\n");
-               return -ENODEV;
-       }
-       /* Toggle to clear the SDRAM Error count */
-       if (regmap_update_bits(regmap, priv->ecc_cnt_rst_offset,
-                              priv->ecc_cnt_rst_mask,
-                              priv->ecc_cnt_rst_mask)) {
-               edac_printk(KERN_ERR, EDAC_MC,
-                           "Error clearing SDRAM ECC count\n");
-               return -ENODEV;
-       }
-       if (regmap_update_bits(regmap, priv->ecc_cnt_rst_offset,
-                              priv->ecc_cnt_rst_mask, 0)) {
-               edac_printk(KERN_ERR, EDAC_MC,
-                           "Error clearing SDRAM ECC count\n");
-               return -ENODEV;
-       }
-       irq = platform_get_irq(pdev, 0);
-       if (irq < 0) {
-               edac_printk(KERN_ERR, EDAC_MC,
-                           "No irq %d in DT\n", irq);
-               return -ENODEV;
-       }
-       layers[0].type = EDAC_MC_LAYER_CHIP_SELECT;
-       layers[0].size = 1;
-       layers[0].is_virt_csrow = true;
-       layers[1].type = EDAC_MC_LAYER_CHANNEL;
-       layers[1].size = 1;
-       layers[1].is_virt_csrow = false;
-       mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers,
-                           sizeof(struct altr_sdram_mc_data));
-       if (!mci)
-               return -ENOMEM;
-       mci->pdev = &pdev->dev;
-       drvdata = mci->pvt_info;
-       drvdata->mc_vbase = regmap;
-       drvdata->data = priv;
-       platform_set_drvdata(pdev, mci);
-       if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) {
-               edac_printk(KERN_ERR, EDAC_MC,
-                           "Unable to get managed device resource\n");
-               ret = -ENOMEM;
-               goto free;
-       }
-       mci->mtype_cap = MEM_FLAG_DDR3;
-       mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
-       mci->edac_cap = EDAC_FLAG_SECDED;
-       mci->mod_name = EDAC_MOD_STR;
-       mci->ctl_name = dev_name(&pdev->dev);
-       mci->scrub_mode = SCRUB_SW_SRC;
-       mci->dev_name = dev_name(&pdev->dev);
-       dimm = *mci->dimms;
-       dimm->nr_pages = ((mem_size - 1) >> PAGE_SHIFT) + 1;
-       dimm->grain = 8;
-       dimm->dtype = DEV_X8;
-       dimm->mtype = MEM_DDR3;
-       dimm->edac_mode = EDAC_SECDED;
-       ret = edac_mc_add_mc(mci);
-       if (ret < 0)
-               goto err;
-       ret = devm_request_irq(&pdev->dev, irq, altr_sdram_mc_err_handler,
-                              IRQF_SHARED, dev_name(&pdev->dev), mci);
-       if (ret < 0) {
-               edac_mc_printk(mci, KERN_ERR,
-                              "Unable to request irq %d\n", irq);
-               ret = -ENODEV;
-               goto err2;
-       }
-       if (regmap_write(regmap, S10_SYSMGR_ECC_INTMASK_CLR_OFST,
-                        S10_DDR0_IRQ_MASK)) {
-               edac_printk(KERN_ERR, EDAC_MC,
-                           "Error clearing SDRAM ECC count\n");
-               ret = -ENODEV;
-               goto err2;
-       }
-       if (regmap_update_bits(drvdata->mc_vbase, priv->ecc_irq_en_offset,
-                              priv->ecc_irq_en_mask, priv->ecc_irq_en_mask)) {
-               edac_mc_printk(mci, KERN_ERR,
-                              "Error enabling SDRAM ECC IRQ\n");
-               ret = -ENODEV;
-               goto err2;
-       }
-       altr_sdr_mc_create_debugfs_nodes(mci);
-       devres_close_group(&pdev->dev, NULL);
-       return 0;
- err2:
-       edac_mc_del_mc(&pdev->dev);
- err:
-       devres_release_group(&pdev->dev, NULL);
- free:
-       edac_mc_free(mci);
-       edac_printk(KERN_ERR, EDAC_MC,
-                   "EDAC Probe Failed; Error %d\n", ret);
-       return ret;
- }
- static int altr_s10_sdram_remove(struct platform_device *pdev)
- {
-       struct mem_ctl_info *mci = platform_get_drvdata(pdev);
-       edac_mc_del_mc(&pdev->dev);
-       edac_mc_free(mci);
-       platform_set_drvdata(pdev, NULL);
-       return 0;
- }
  /************** </Stratix10 EDAC Memory Controller Functions> ***********/
  
  /*