Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/macio: Fix probing of macio devices by using the right of match table
agp/uninorth: Fix oops caused by flushing too much
powerpc/pasemi: Update MAINTAINERS file
powerpc/cell: Fix integer constant warning
powerpc/kprobes: Remove resume_execution() in kprobes
powerpc/macio: Don't dereference pointer before null check

+67 -53
+1 -2
MAINTAINERS
··· 3503 3504 LINUX FOR POWERPC PA SEMI PWRFICIENT 3505 M: Olof Johansson <olof@lixom.net> 3506 - W: http://www.pasemi.com/ 3507 L: linuxppc-dev@ozlabs.org 3508 - S: Supported 3509 F: arch/powerpc/platforms/pasemi/ 3510 F: drivers/*/*pasemi* 3511 F: drivers/*/*/*pasemi*
··· 3503 3504 LINUX FOR POWERPC PA SEMI PWRFICIENT 3505 M: Olof Johansson <olof@lixom.net> 3506 L: linuxppc-dev@ozlabs.org 3507 + S: Maintained 3508 F: arch/powerpc/platforms/pasemi/ 3509 F: drivers/*/*pasemi* 3510 F: drivers/*/*/*pasemi*
-4
arch/powerpc/include/asm/macio.h
··· 123 */ 124 struct macio_driver 125 { 126 - char *name; 127 - struct of_device_id *match_table; 128 - struct module *owner; 129 - 130 int (*probe)(struct macio_dev* dev, const struct of_device_id *match); 131 int (*remove)(struct macio_dev* dev); 132
··· 123 */ 124 struct macio_driver 125 { 126 int (*probe)(struct macio_dev* dev, const struct of_device_id *match); 127 int (*remove)(struct macio_dev* dev); 128
+2 -12
arch/powerpc/kernel/kprobes.c
··· 378 * single-stepped a copy of the instruction. The address of this 379 * copy is p->ainsn.insn. 380 */ 381 - static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs) 382 - { 383 - int ret; 384 - unsigned int insn = *p->ainsn.insn; 385 - 386 - regs->nip = (unsigned long)p->addr; 387 - ret = emulate_step(regs, insn); 388 - if (ret == 0) 389 - regs->nip = (unsigned long)p->addr + 4; 390 - } 391 - 392 static int __kprobes post_kprobe_handler(struct pt_regs *regs) 393 { 394 struct kprobe *cur = kprobe_running(); ··· 395 cur->post_handler(cur, regs, 0); 396 } 397 398 - resume_execution(cur, regs); 399 regs->msr |= kcb->kprobe_saved_msr; 400 401 /*Restore back the original saved kprobes variables and continue. */
··· 378 * single-stepped a copy of the instruction. The address of this 379 * copy is p->ainsn.insn. 380 */ 381 static int __kprobes post_kprobe_handler(struct pt_regs *regs) 382 { 383 struct kprobe *cur = kprobe_running(); ··· 406 cur->post_handler(cur, regs, 0); 407 } 408 409 + /* Adjust nip to after the single-stepped instruction */ 410 + regs->nip = (unsigned long)cur->addr + 4; 411 regs->msr |= kcb->kprobe_saved_msr; 412 413 /*Restore back the original saved kprobes variables and continue. */
+1 -1
arch/powerpc/platforms/cell/iommu.c
··· 1066 fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT); 1067 fsize = lmb_phys_mem_size(); 1068 1069 - if ((fbase + fsize) <= 0x800000000) 1070 hbase = 0; /* use the device tree window */ 1071 else { 1072 /* If we're over 32 GB we need to cheat. We can't map all of
··· 1066 fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT); 1067 fsize = lmb_phys_mem_size(); 1068 1069 + if ((fbase + fsize) <= 0x800000000ul) 1070 hbase = 0; /* use the device tree window */ 1071 else { 1072 /* If we're over 32 GB we need to cheat. We can't map all of
+5 -5
drivers/ata/pata_macio.c
··· 1355 1356 static struct macio_driver pata_macio_driver = 1357 { 1358 - .name = "pata-macio", 1359 - .match_table = pata_macio_match, 1360 .probe = pata_macio_attach, 1361 .remove = pata_macio_detach, 1362 #ifdef CONFIG_PM ··· 1369 #ifdef CONFIG_PMAC_MEDIABAY 1370 .mediabay_event = pata_macio_mb_event, 1371 #endif 1372 - .driver = { 1373 - .owner = THIS_MODULE, 1374 - }, 1375 }; 1376 1377 static const struct pci_device_id pata_macio_pci_match[] = {
··· 1355 1356 static struct macio_driver pata_macio_driver = 1357 { 1358 + .driver = { 1359 + .name = "pata-macio", 1360 + .owner = THIS_MODULE, 1361 + .of_match_table = pata_macio_match, 1362 + }, 1363 .probe = pata_macio_attach, 1364 .remove = pata_macio_detach, 1365 #ifdef CONFIG_PM ··· 1366 #ifdef CONFIG_PMAC_MEDIABAY 1367 .mediabay_event = pata_macio_mb_event, 1368 #endif 1369 }; 1370 1371 static const struct pci_device_id pata_macio_pci_match[] = {
+4 -2
drivers/block/swim3.c
··· 1159 1160 static struct macio_driver swim3_driver = 1161 { 1162 - .name = "swim3", 1163 - .match_table = swim3_match, 1164 .probe = swim3_attach, 1165 #if 0 1166 .suspend = swim3_suspend,
··· 1159 1160 static struct macio_driver swim3_driver = 1161 { 1162 + .driver = { 1163 + .name = "swim3", 1164 + .of_match_table = swim3_match, 1165 + }, 1166 .probe = swim3_attach, 1167 #if 0 1168 .suspend = swim3_suspend,
+1 -1
drivers/char/agp/uninorth-agp.c
··· 415 bridge->gatt_table_real = (u32 *) table; 416 /* Need to clear out any dirty data still sitting in caches */ 417 flush_dcache_range((unsigned long)table, 418 - (unsigned long)(table_end + PAGE_SIZE)); 419 bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG); 420 421 if (bridge->gatt_table == NULL)
··· 415 bridge->gatt_table_real = (u32 *) table; 416 /* Need to clear out any dirty data still sitting in caches */ 417 flush_dcache_range((unsigned long)table, 418 + (unsigned long)table_end + 1); 419 bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG); 420 421 if (bridge->gatt_table == NULL)
+5 -2
drivers/ide/pmac.c
··· 1400 1401 static struct macio_driver pmac_ide_macio_driver = 1402 { 1403 - .name = "ide-pmac", 1404 - .match_table = pmac_ide_macio_match, 1405 .probe = pmac_ide_macio_attach, 1406 .suspend = pmac_ide_macio_suspend, 1407 .resume = pmac_ide_macio_resume,
··· 1400 1401 static struct macio_driver pmac_ide_macio_driver = 1402 { 1403 + .driver = { 1404 + .name = "ide-pmac", 1405 + .owner = THIS_MODULE, 1406 + .of_match_table = pmac_ide_macio_match, 1407 + }, 1408 .probe = pmac_ide_macio_attach, 1409 .suspend = pmac_ide_macio_suspend, 1410 .resume = pmac_ide_macio_resume,
+4 -4
drivers/macintosh/macio_asic.c
··· 492 } 493 494 /* Add media bay devices if any */ 495 - pnode = mbdev->ofdev.dev.of_node; 496 - if (mbdev) 497 for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { 498 if (macio_skip_device(np)) 499 continue; ··· 502 mbdev, root_res) == NULL) 503 of_node_put(np); 504 } 505 506 /* Add serial ports if any */ 507 - pnode = sdev->ofdev.dev.of_node; 508 if (sdev) { 509 for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { 510 if (macio_skip_device(np)) 511 continue; ··· 526 int macio_register_driver(struct macio_driver *drv) 527 { 528 /* initialize common driver fields */ 529 - drv->driver.name = drv->name; 530 drv->driver.bus = &macio_bus_type; 531 532 /* register with core */
··· 492 } 493 494 /* Add media bay devices if any */ 495 + if (mbdev) { 496 + pnode = mbdev->ofdev.dev.of_node; 497 for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { 498 if (macio_skip_device(np)) 499 continue; ··· 502 mbdev, root_res) == NULL) 503 of_node_put(np); 504 } 505 + } 506 507 /* Add serial ports if any */ 508 if (sdev) { 509 + pnode = sdev->ofdev.dev.of_node; 510 for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { 511 if (macio_skip_device(np)) 512 continue; ··· 525 int macio_register_driver(struct macio_driver *drv) 526 { 527 /* initialize common driver fields */ 528 drv->driver.bus = &macio_bus_type; 529 530 /* register with core */
+4 -2
drivers/macintosh/mediabay.c
··· 728 729 static struct macio_driver media_bay_driver = 730 { 731 - .name = "media-bay", 732 - .match_table = media_bay_match, 733 .probe = media_bay_attach, 734 .suspend = media_bay_suspend, 735 .resume = media_bay_resume
··· 728 729 static struct macio_driver media_bay_driver = 730 { 731 + .driver = { 732 + .name = "media-bay", 733 + .of_match_table = media_bay_match, 734 + }, 735 .probe = media_bay_attach, 736 .suspend = media_bay_suspend, 737 .resume = media_bay_resume
+5 -3
drivers/macintosh/rack-meter.c
··· 584 }; 585 586 static struct macio_driver rackmeter_driver = { 587 - .name = "rackmeter", 588 - .owner = THIS_MODULE, 589 - .match_table = rackmeter_match, 590 .probe = rackmeter_probe, 591 .remove = __devexit_p(rackmeter_remove), 592 .shutdown = rackmeter_shutdown,
··· 584 }; 585 586 static struct macio_driver rackmeter_driver = { 587 + .driver = { 588 + .name = "rackmeter", 589 + .owner = THIS_MODULE, 590 + .of_match_table = rackmeter_match, 591 + }, 592 .probe = rackmeter_probe, 593 .remove = __devexit_p(rackmeter_remove), 594 .shutdown = rackmeter_shutdown,
+5 -2
drivers/net/bmac.c
··· 1654 1655 static struct macio_driver bmac_driver = 1656 { 1657 - .name = "bmac", 1658 - .match_table = bmac_match, 1659 .probe = bmac_probe, 1660 .remove = bmac_remove, 1661 #ifdef CONFIG_PM
··· 1654 1655 static struct macio_driver bmac_driver = 1656 { 1657 + .driver = { 1658 + .name = "bmac", 1659 + .owner = THIS_MODULE, 1660 + .of_match_table = bmac_match, 1661 + }, 1662 .probe = bmac_probe, 1663 .remove = bmac_remove, 1664 #ifdef CONFIG_PM
+5 -2
drivers/net/mace.c
··· 997 998 static struct macio_driver mace_driver = 999 { 1000 - .name = "mace", 1001 - .match_table = mace_match, 1002 .probe = mace_probe, 1003 .remove = mace_remove, 1004 };
··· 997 998 static struct macio_driver mace_driver = 999 { 1000 + .driver = { 1001 + .name = "mace", 1002 + .owner = THIS_MODULE, 1003 + .of_match_table = mace_match, 1004 + }, 1005 .probe = mace_probe, 1006 .remove = mace_remove, 1007 };
+5 -2
drivers/net/wireless/orinoco/airport.c
··· 239 MODULE_DEVICE_TABLE(of, airport_match); 240 241 static struct macio_driver airport_driver = { 242 - .name = DRIVER_NAME, 243 - .match_table = airport_match, 244 .probe = airport_attach, 245 .remove = airport_detach, 246 .suspend = airport_suspend,
··· 239 MODULE_DEVICE_TABLE(of, airport_match); 240 241 static struct macio_driver airport_driver = { 242 + .driver = { 243 + .name = DRIVER_NAME, 244 + .owner = THIS_MODULE, 245 + .of_match_table = airport_match, 246 + }, 247 .probe = airport_attach, 248 .remove = airport_detach, 249 .suspend = airport_suspend,
+5 -2
drivers/scsi/mac53c94.c
··· 542 543 static struct macio_driver mac53c94_driver = 544 { 545 - .name = "mac53c94", 546 - .match_table = mac53c94_match, 547 .probe = mac53c94_probe, 548 .remove = mac53c94_remove, 549 };
··· 542 543 static struct macio_driver mac53c94_driver = 544 { 545 + .driver = { 546 + .name = "mac53c94", 547 + .owner = THIS_MODULE, 548 + .of_match_table = mac53c94_match, 549 + }, 550 .probe = mac53c94_probe, 551 .remove = mac53c94_remove, 552 };
+5 -2
drivers/scsi/mesh.c
··· 2036 2037 static struct macio_driver mesh_driver = 2038 { 2039 - .name = "mesh", 2040 - .match_table = mesh_match, 2041 .probe = mesh_probe, 2042 .remove = mesh_remove, 2043 .shutdown = mesh_shutdown,
··· 2036 2037 static struct macio_driver mesh_driver = 2038 { 2039 + .driver = { 2040 + .name = "mesh", 2041 + .owner = THIS_MODULE, 2042 + .of_match_table = mesh_match, 2043 + }, 2044 .probe = mesh_probe, 2045 .remove = mesh_remove, 2046 .shutdown = mesh_shutdown,
+5 -2
drivers/serial/pmac_zilog.c
··· 2005 MODULE_DEVICE_TABLE (of, pmz_match); 2006 2007 static struct macio_driver pmz_driver = { 2008 - .name = "pmac_zilog", 2009 - .match_table = pmz_match, 2010 .probe = pmz_attach, 2011 .remove = pmz_detach, 2012 .suspend = pmz_suspend,
··· 2005 MODULE_DEVICE_TABLE (of, pmz_match); 2006 2007 static struct macio_driver pmz_driver = { 2008 + .driver = { 2009 + .name = "pmac_zilog", 2010 + .owner = THIS_MODULE, 2011 + .of_match_table = pmz_match, 2012 + }, 2013 .probe = pmz_attach, 2014 .remove = pmz_detach, 2015 .suspend = pmz_suspend,
+5 -3
sound/aoa/soundbus/i2sbus/core.c
··· 437 } 438 439 static struct macio_driver i2sbus_drv = { 440 - .name = "soundbus-i2s", 441 - .owner = THIS_MODULE, 442 - .match_table = i2sbus_match, 443 .probe = i2sbus_probe, 444 .remove = i2sbus_remove, 445 #ifdef CONFIG_PM
··· 437 } 438 439 static struct macio_driver i2sbus_drv = { 440 + .driver = { 441 + .name = "soundbus-i2s", 442 + .owner = THIS_MODULE, 443 + .of_match_table = i2sbus_match, 444 + }, 445 .probe = i2sbus_probe, 446 .remove = i2sbus_remove, 447 #ifdef CONFIG_PM