diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 20:12:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 20:12:03 -0500 |
commit | 1197ab2942f920f261952de0c392ac749a35796b (patch) | |
tree | 4922ccc8a6061e5ece6ac7420001f3bf4524ea92 /drivers/edac | |
parent | ec773e99ab4abce07b1ae23117179c2861831964 (diff) | |
parent | 96cc017c5b7ec095ef047d3c1952b6b6bbf98943 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (106 commits)
powerpc/p3060qds: Add support for P3060QDS board
powerpc/83xx: Add shutdown request support to MCU handling on MPC8349 MITX
powerpc/85xx: Make kexec to interate over online cpus
powerpc/fsl_booke: Fix comment in head_fsl_booke.S
powerpc/85xx: issue 15 EOI after core reset for FSL CoreNet devices
powerpc/8xxx: Fix interrupt handling in MPC8xxx GPIO driver
powerpc/85xx: Add 'fsl,pq3-gpio' compatiable for GPIO driver
powerpc/86xx: Correct Gianfar support for GE boards
powerpc/cpm: Clear muram before it is in use.
drivers/virt: add ioctl for 32-bit compat on 64-bit to fsl-hv-manager
powerpc/fsl_msi: add support for "msi-address-64" property
powerpc/85xx: Setup secondary cores PIR with hard SMP id
powerpc/fsl-booke: Fix settlbcam for 64-bit
powerpc/85xx: Adding DCSR node to dtsi device trees
powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
powerpc/85xx: fix PHYS_64BIT selection for P1022DS
powerpc/fsl-booke: Fix setup_initial_memory_limit to not blindly map
powerpc: respect mem= setting for early memory limit setup
powerpc: Update corenet64_smp_defconfig
powerpc: Update mpc85xx/corenet 32-bit defconfigs
...
Fix up trivial conflicts in:
- arch/powerpc/configs/40x/hcu4_defconfig
removed stale file, edited elsewhere
- arch/powerpc/include/asm/udbg.h, arch/powerpc/kernel/udbg.c:
added opal and gelic drivers vs added ePAPR driver
- drivers/tty/serial/8250.c
moved UPIO_TSI to powerpc vs removed UPIO_DWAPB support
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/cpc925_edac.c | 67 | ||||
-rw-r--r-- | drivers/edac/ppc4xx_edac.c | 2 |
2 files changed, 65 insertions, 4 deletions
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c index a687a0d16962..a774c0ddaf5b 100644 --- a/drivers/edac/cpc925_edac.c +++ b/drivers/edac/cpc925_edac.c | |||
@@ -90,6 +90,7 @@ enum apimask_bits { | |||
90 | ECC_MASK_ENABLE = (APIMASK_ECC_UE_H | APIMASK_ECC_CE_H | | 90 | ECC_MASK_ENABLE = (APIMASK_ECC_UE_H | APIMASK_ECC_CE_H | |
91 | APIMASK_ECC_UE_L | APIMASK_ECC_CE_L), | 91 | APIMASK_ECC_UE_L | APIMASK_ECC_CE_L), |
92 | }; | 92 | }; |
93 | #define APIMASK_ADI(n) CPC925_BIT(((n)+1)) | ||
93 | 94 | ||
94 | /************************************************************ | 95 | /************************************************************ |
95 | * Processor Interface Exception Register (APIEXCP) | 96 | * Processor Interface Exception Register (APIEXCP) |
@@ -581,16 +582,73 @@ static void cpc925_mc_check(struct mem_ctl_info *mci) | |||
581 | } | 582 | } |
582 | 583 | ||
583 | /******************** CPU err device********************************/ | 584 | /******************** CPU err device********************************/ |
585 | static u32 cpc925_cpu_mask_disabled(void) | ||
586 | { | ||
587 | struct device_node *cpus; | ||
588 | struct device_node *cpunode = NULL; | ||
589 | static u32 mask = 0; | ||
590 | |||
591 | /* use cached value if available */ | ||
592 | if (mask != 0) | ||
593 | return mask; | ||
594 | |||
595 | mask = APIMASK_ADI0 | APIMASK_ADI1; | ||
596 | |||
597 | cpus = of_find_node_by_path("/cpus"); | ||
598 | if (cpus == NULL) { | ||
599 | cpc925_printk(KERN_DEBUG, "No /cpus node !\n"); | ||
600 | return 0; | ||
601 | } | ||
602 | |||
603 | while ((cpunode = of_get_next_child(cpus, cpunode)) != NULL) { | ||
604 | const u32 *reg = of_get_property(cpunode, "reg", NULL); | ||
605 | |||
606 | if (strcmp(cpunode->type, "cpu")) { | ||
607 | cpc925_printk(KERN_ERR, "Not a cpu node in /cpus: %s\n", cpunode->name); | ||
608 | continue; | ||
609 | } | ||
610 | |||
611 | if (reg == NULL || *reg > 2) { | ||
612 | cpc925_printk(KERN_ERR, "Bad reg value at %s\n", cpunode->full_name); | ||
613 | continue; | ||
614 | } | ||
615 | |||
616 | mask &= ~APIMASK_ADI(*reg); | ||
617 | } | ||
618 | |||
619 | if (mask != (APIMASK_ADI0 | APIMASK_ADI1)) { | ||
620 | /* We assume that each CPU sits on it's own PI and that | ||
621 | * for present CPUs the reg property equals to the PI | ||
622 | * interface id */ | ||
623 | cpc925_printk(KERN_WARNING, | ||
624 | "Assuming PI id is equal to CPU MPIC id!\n"); | ||
625 | } | ||
626 | |||
627 | of_node_put(cpunode); | ||
628 | of_node_put(cpus); | ||
629 | |||
630 | return mask; | ||
631 | } | ||
632 | |||
584 | /* Enable CPU Errors detection */ | 633 | /* Enable CPU Errors detection */ |
585 | static void cpc925_cpu_init(struct cpc925_dev_info *dev_info) | 634 | static void cpc925_cpu_init(struct cpc925_dev_info *dev_info) |
586 | { | 635 | { |
587 | u32 apimask; | 636 | u32 apimask; |
637 | u32 cpumask; | ||
588 | 638 | ||
589 | apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET); | 639 | apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET); |
590 | if ((apimask & CPU_MASK_ENABLE) == 0) { | 640 | |
591 | apimask |= CPU_MASK_ENABLE; | 641 | cpumask = cpc925_cpu_mask_disabled(); |
592 | __raw_writel(apimask, dev_info->vbase + REG_APIMASK_OFFSET); | 642 | if (apimask & cpumask) { |
643 | cpc925_printk(KERN_WARNING, "CPU(s) not present, " | ||
644 | "but enabled in APIMASK, disabling\n"); | ||
645 | apimask &= ~cpumask; | ||
593 | } | 646 | } |
647 | |||
648 | if ((apimask & CPU_MASK_ENABLE) == 0) | ||
649 | apimask |= CPU_MASK_ENABLE; | ||
650 | |||
651 | __raw_writel(apimask, dev_info->vbase + REG_APIMASK_OFFSET); | ||
594 | } | 652 | } |
595 | 653 | ||
596 | /* Disable CPU Errors detection */ | 654 | /* Disable CPU Errors detection */ |
@@ -622,6 +680,9 @@ static void cpc925_cpu_check(struct edac_device_ctl_info *edac_dev) | |||
622 | if ((apiexcp & CPU_EXCP_DETECTED) == 0) | 680 | if ((apiexcp & CPU_EXCP_DETECTED) == 0) |
623 | return; | 681 | return; |
624 | 682 | ||
683 | if ((apiexcp & ~cpc925_cpu_mask_disabled()) == 0) | ||
684 | return; | ||
685 | |||
625 | apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET); | 686 | apimask = __raw_readl(dev_info->vbase + REG_APIMASK_OFFSET); |
626 | cpc925_printk(KERN_INFO, "Processor Interface Fault\n" | 687 | cpc925_printk(KERN_INFO, "Processor Interface Fault\n" |
627 | "Processor Interface register dump:\n"); | 688 | "Processor Interface register dump:\n"); |
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c index 0de7d8770891..38400963e245 100644 --- a/drivers/edac/ppc4xx_edac.c +++ b/drivers/edac/ppc4xx_edac.c | |||
@@ -205,7 +205,7 @@ static struct platform_driver ppc4xx_edac_driver = { | |||
205 | .remove = ppc4xx_edac_remove, | 205 | .remove = ppc4xx_edac_remove, |
206 | .driver = { | 206 | .driver = { |
207 | .owner = THIS_MODULE, | 207 | .owner = THIS_MODULE, |
208 | .name = PPC4XX_EDAC_MODULE_NAME | 208 | .name = PPC4XX_EDAC_MODULE_NAME, |
209 | .of_match_table = ppc4xx_edac_match, | 209 | .of_match_table = ppc4xx_edac_match, |
210 | }, | 210 | }, |
211 | }; | 211 | }; |