~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/edac/mpc85xx_edac.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
        return IRQ_HANDLED;
201
201
}
202
202
 
203
 
static int __devinit mpc85xx_pci_err_probe(struct platform_device *op,
204
 
                                           const struct of_device_id *match)
 
203
static int __devinit mpc85xx_pci_err_probe(struct platform_device *op)
205
204
{
206
205
        struct edac_pci_ctl_info *pci;
207
206
        struct mpc85xx_pci_pdata *pdata;
338
337
};
339
338
MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match);
340
339
 
341
 
static struct of_platform_driver mpc85xx_pci_err_driver = {
 
340
static struct platform_driver mpc85xx_pci_err_driver = {
342
341
        .probe = mpc85xx_pci_err_probe,
343
342
        .remove = __devexit_p(mpc85xx_pci_err_remove),
344
343
        .driver = {
503
502
        return IRQ_HANDLED;
504
503
}
505
504
 
506
 
static int __devinit mpc85xx_l2_err_probe(struct platform_device *op,
507
 
                                          const struct of_device_id *match)
 
505
static int __devinit mpc85xx_l2_err_probe(struct platform_device *op)
508
506
{
509
507
        struct edac_device_ctl_info *edac_dev;
510
508
        struct mpc85xx_l2_pdata *pdata;
656
654
};
657
655
MODULE_DEVICE_TABLE(of, mpc85xx_l2_err_of_match);
658
656
 
659
 
static struct of_platform_driver mpc85xx_l2_err_driver = {
 
657
static struct platform_driver mpc85xx_l2_err_driver = {
660
658
        .probe = mpc85xx_l2_err_probe,
661
659
        .remove = mpc85xx_l2_err_remove,
662
660
        .driver = {
956
954
        }
957
955
}
958
956
 
959
 
static int __devinit mpc85xx_mc_err_probe(struct platform_device *op,
960
 
                                          const struct of_device_id *match)
 
957
static int __devinit mpc85xx_mc_err_probe(struct platform_device *op)
961
958
{
962
959
        struct mem_ctl_info *mci;
963
960
        struct mpc85xx_mc_pdata *pdata;
1136
1133
};
1137
1134
MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match);
1138
1135
 
1139
 
static struct of_platform_driver mpc85xx_mc_err_driver = {
 
1136
static struct platform_driver mpc85xx_mc_err_driver = {
1140
1137
        .probe = mpc85xx_mc_err_probe,
1141
1138
        .remove = mpc85xx_mc_err_remove,
1142
1139
        .driver = {
1150
1147
static void __init mpc85xx_mc_clear_rfxe(void *data)
1151
1148
{
1152
1149
        orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1);
1153
 
        mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~0x20000));
 
1150
        mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~HID1_RFXE));
1154
1151
}
1155
1152
#endif
1156
1153
 
1157
1154
static int __init mpc85xx_mc_init(void)
1158
1155
{
1159
1156
        int res = 0;
 
1157
        u32 pvr = 0;
1160
1158
 
1161
1159
        printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, "
1162
1160
               "(C) 2006 Montavista Software\n");
1171
1169
                break;
1172
1170
        }
1173
1171
 
1174
 
        res = of_register_platform_driver(&mpc85xx_mc_err_driver);
 
1172
        res = platform_driver_register(&mpc85xx_mc_err_driver);
1175
1173
        if (res)
1176
1174
                printk(KERN_WARNING EDAC_MOD_STR "MC fails to register\n");
1177
1175
 
1178
 
        res = of_register_platform_driver(&mpc85xx_l2_err_driver);
 
1176
        res = platform_driver_register(&mpc85xx_l2_err_driver);
1179
1177
        if (res)
1180
1178
                printk(KERN_WARNING EDAC_MOD_STR "L2 fails to register\n");
1181
1179
 
1182
1180
#ifdef CONFIG_PCI
1183
 
        res = of_register_platform_driver(&mpc85xx_pci_err_driver);
 
1181
        res = platform_driver_register(&mpc85xx_pci_err_driver);
1184
1182
        if (res)
1185
1183
                printk(KERN_WARNING EDAC_MOD_STR "PCI fails to register\n");
1186
1184
#endif
1187
1185
 
1188
1186
#ifdef CONFIG_FSL_SOC_BOOKE
1189
 
        /*
1190
 
         * need to clear HID1[RFXE] to disable machine check int
1191
 
         * so we can catch it
1192
 
         */
1193
 
        if (edac_op_state == EDAC_OPSTATE_INT)
1194
 
                on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0);
 
1187
        pvr = mfspr(SPRN_PVR);
 
1188
 
 
1189
        if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
 
1190
            (PVR_VER(pvr) == PVR_VER_E500V2)) {
 
1191
                /*
 
1192
                 * need to clear HID1[RFXE] to disable machine check int
 
1193
                 * so we can catch it
 
1194
                 */
 
1195
                if (edac_op_state == EDAC_OPSTATE_INT)
 
1196
                        on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0);
 
1197
        }
1195
1198
#endif
1196
1199
 
1197
1200
        return 0;
1209
1212
static void __exit mpc85xx_mc_exit(void)
1210
1213
{
1211
1214
#ifdef CONFIG_FSL_SOC_BOOKE
1212
 
        on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
 
1215
        u32 pvr = mfspr(SPRN_PVR);
 
1216
 
 
1217
        if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
 
1218
            (PVR_VER(pvr) == PVR_VER_E500V2)) {
 
1219
                on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
 
1220
        }
1213
1221
#endif
1214
1222
#ifdef CONFIG_PCI
1215
 
        of_unregister_platform_driver(&mpc85xx_pci_err_driver);
 
1223
        platform_driver_unregister(&mpc85xx_pci_err_driver);
1216
1224
#endif
1217
 
        of_unregister_platform_driver(&mpc85xx_l2_err_driver);
1218
 
        of_unregister_platform_driver(&mpc85xx_mc_err_driver);
 
1225
        platform_driver_unregister(&mpc85xx_l2_err_driver);
 
1226
        platform_driver_unregister(&mpc85xx_mc_err_driver);
1219
1227
}
1220
1228
 
1221
1229
module_exit(mpc85xx_mc_exit);