aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-06-03 18:46:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-06-03 18:46:37 -0400
commit39059cceeda478cd040d521b9541d1113035c908 (patch)
tree56adf04d6766a4346160aacd709468e5b2f1b879
parentb01b7dc2832a1a286ae84ffa3e940ce9f8e352c2 (diff)
parentc2cdf6aba0dfcfb54be646ab630c1bccd180e890 (diff)
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
-rw-r--r--MAINTAINERS3
-rw-r--r--arch/powerpc/include/asm/macio.h4
-rw-r--r--arch/powerpc/kernel/kprobes.c14
-rw-r--r--arch/powerpc/platforms/cell/iommu.c2
-rw-r--r--drivers/ata/pata_macio.c10
-rw-r--r--drivers/block/swim3.c6
-rw-r--r--drivers/char/agp/uninorth-agp.c2
-rw-r--r--drivers/ide/pmac.c7
-rw-r--r--drivers/macintosh/macio_asic.c8
-rw-r--r--drivers/macintosh/mediabay.c6
-rw-r--r--drivers/macintosh/rack-meter.c8
-rw-r--r--drivers/net/bmac.c7
-rw-r--r--drivers/net/mace.c7
-rw-r--r--drivers/net/wireless/orinoco/airport.c7
-rw-r--r--drivers/scsi/mac53c94.c7
-rw-r--r--drivers/scsi/mesh.c7
-rw-r--r--drivers/serial/pmac_zilog.c7
-rw-r--r--sound/aoa/soundbus/i2sbus/core.c8
18 files changed, 67 insertions, 53 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 2652ebc5ab40..a73dd8030afa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3503,9 +3503,8 @@ F: arch/powerpc/platforms/83xx/
3503 3503
3504LINUX FOR POWERPC PA SEMI PWRFICIENT 3504LINUX FOR POWERPC PA SEMI PWRFICIENT
3505M: Olof Johansson <olof@lixom.net> 3505M: Olof Johansson <olof@lixom.net>
3506W: http://www.pasemi.com/
3507L: linuxppc-dev@ozlabs.org 3506L: linuxppc-dev@ozlabs.org
3508S: Supported 3507S: Maintained
3509F: arch/powerpc/platforms/pasemi/ 3508F: arch/powerpc/platforms/pasemi/
3510F: drivers/*/*pasemi* 3509F: drivers/*/*pasemi*
3511F: drivers/*/*/*pasemi* 3510F: drivers/*/*/*pasemi*
diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h
index 19a661b4cb98..675e159b5ef4 100644
--- a/arch/powerpc/include/asm/macio.h
+++ b/arch/powerpc/include/asm/macio.h
@@ -123,10 +123,6 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev)
123 */ 123 */
124struct macio_driver 124struct macio_driver
125{ 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); 126 int (*probe)(struct macio_dev* dev, const struct of_device_id *match);
131 int (*remove)(struct macio_dev* dev); 127 int (*remove)(struct macio_dev* dev);
132 128
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index c533525ca56a..bc47352deb1f 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -378,17 +378,6 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
378 * single-stepped a copy of the instruction. The address of this 378 * single-stepped a copy of the instruction. The address of this
379 * copy is p->ainsn.insn. 379 * copy is p->ainsn.insn.
380 */ 380 */
381static 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
392static int __kprobes post_kprobe_handler(struct pt_regs *regs) 381static int __kprobes post_kprobe_handler(struct pt_regs *regs)
393{ 382{
394 struct kprobe *cur = kprobe_running(); 383 struct kprobe *cur = kprobe_running();
@@ -406,7 +395,8 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
406 cur->post_handler(cur, regs, 0); 395 cur->post_handler(cur, regs, 0);
407 } 396 }
408 397
409 resume_execution(cur, regs); 398 /* Adjust nip to after the single-stepped instruction */
399 regs->nip = (unsigned long)cur->addr + 4;
410 regs->msr |= kcb->kprobe_saved_msr; 400 regs->msr |= kcb->kprobe_saved_msr;
411 401
412 /*Restore back the original saved kprobes variables and continue. */ 402 /*Restore back the original saved kprobes variables and continue. */
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 22667a09d40e..4326b737d913 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -1066,7 +1066,7 @@ static int __init cell_iommu_fixed_mapping_init(void)
1066 fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT); 1066 fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT);
1067 fsize = lmb_phys_mem_size(); 1067 fsize = lmb_phys_mem_size();
1068 1068
1069 if ((fbase + fsize) <= 0x800000000) 1069 if ((fbase + fsize) <= 0x800000000ul)
1070 hbase = 0; /* use the device tree window */ 1070 hbase = 0; /* use the device tree window */
1071 else { 1071 else {
1072 /* If we're over 32 GB we need to cheat. We can't map all of 1072 /* If we're over 32 GB we need to cheat. We can't map all of
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index 76640ac76888..75b49d01780b 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -1355,8 +1355,11 @@ static struct of_device_id pata_macio_match[] =
1355 1355
1356static struct macio_driver pata_macio_driver = 1356static struct macio_driver pata_macio_driver =
1357{ 1357{
1358 .name = "pata-macio", 1358 .driver = {
1359 .match_table = pata_macio_match, 1359 .name = "pata-macio",
1360 .owner = THIS_MODULE,
1361 .of_match_table = pata_macio_match,
1362 },
1360 .probe = pata_macio_attach, 1363 .probe = pata_macio_attach,
1361 .remove = pata_macio_detach, 1364 .remove = pata_macio_detach,
1362#ifdef CONFIG_PM 1365#ifdef CONFIG_PM
@@ -1366,9 +1369,6 @@ static struct macio_driver pata_macio_driver =
1366#ifdef CONFIG_PMAC_MEDIABAY 1369#ifdef CONFIG_PMAC_MEDIABAY
1367 .mediabay_event = pata_macio_mb_event, 1370 .mediabay_event = pata_macio_mb_event,
1368#endif 1371#endif
1369 .driver = {
1370 .owner = THIS_MODULE,
1371 },
1372}; 1372};
1373 1373
1374static const struct pci_device_id pata_macio_pci_match[] = { 1374static const struct pci_device_id pata_macio_pci_match[] = {
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 52f2d11bc7b9..ed6fb91123ab 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -1159,8 +1159,10 @@ static struct of_device_id swim3_match[] =
1159 1159
1160static struct macio_driver swim3_driver = 1160static struct macio_driver swim3_driver =
1161{ 1161{
1162 .name = "swim3", 1162 .driver = {
1163 .match_table = swim3_match, 1163 .name = "swim3",
1164 .of_match_table = swim3_match,
1165 },
1164 .probe = swim3_attach, 1166 .probe = swim3_attach,
1165#if 0 1167#if 0
1166 .suspend = swim3_suspend, 1168 .suspend = swim3_suspend,
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index 95db71360d24..f845a8f718b3 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -415,7 +415,7 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
415 bridge->gatt_table_real = (u32 *) table; 415 bridge->gatt_table_real = (u32 *) table;
416 /* Need to clear out any dirty data still sitting in caches */ 416 /* Need to clear out any dirty data still sitting in caches */
417 flush_dcache_range((unsigned long)table, 417 flush_dcache_range((unsigned long)table,
418 (unsigned long)(table_end + PAGE_SIZE)); 418 (unsigned long)table_end + 1);
419 bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG); 419 bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG);
420 420
421 if (bridge->gatt_table == NULL) 421 if (bridge->gatt_table == NULL)
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index 183fa38760d8..ebcf8e470a97 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1400,8 +1400,11 @@ static struct of_device_id pmac_ide_macio_match[] =
1400 1400
1401static struct macio_driver pmac_ide_macio_driver = 1401static struct macio_driver pmac_ide_macio_driver =
1402{ 1402{
1403 .name = "ide-pmac", 1403 .driver = {
1404 .match_table = pmac_ide_macio_match, 1404 .name = "ide-pmac",
1405 .owner = THIS_MODULE,
1406 .of_match_table = pmac_ide_macio_match,
1407 },
1405 .probe = pmac_ide_macio_attach, 1408 .probe = pmac_ide_macio_attach,
1406 .suspend = pmac_ide_macio_suspend, 1409 .suspend = pmac_ide_macio_suspend,
1407 .resume = pmac_ide_macio_resume, 1410 .resume = pmac_ide_macio_resume,
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 97147804a49c..b6e7ddc09d76 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -492,8 +492,8 @@ static void macio_pci_add_devices(struct macio_chip *chip)
492 } 492 }
493 493
494 /* Add media bay devices if any */ 494 /* Add media bay devices if any */
495 pnode = mbdev->ofdev.dev.of_node; 495 if (mbdev) {
496 if (mbdev) 496 pnode = mbdev->ofdev.dev.of_node;
497 for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { 497 for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
498 if (macio_skip_device(np)) 498 if (macio_skip_device(np))
499 continue; 499 continue;
@@ -502,10 +502,11 @@ static void macio_pci_add_devices(struct macio_chip *chip)
502 mbdev, root_res) == NULL) 502 mbdev, root_res) == NULL)
503 of_node_put(np); 503 of_node_put(np);
504 } 504 }
505 }
505 506
506 /* Add serial ports if any */ 507 /* Add serial ports if any */
507 pnode = sdev->ofdev.dev.of_node;
508 if (sdev) { 508 if (sdev) {
509 pnode = sdev->ofdev.dev.of_node;
509 for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { 510 for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
510 if (macio_skip_device(np)) 511 if (macio_skip_device(np))
511 continue; 512 continue;
@@ -525,7 +526,6 @@ static void macio_pci_add_devices(struct macio_chip *chip)
525int macio_register_driver(struct macio_driver *drv) 526int macio_register_driver(struct macio_driver *drv)
526{ 527{
527 /* initialize common driver fields */ 528 /* initialize common driver fields */
528 drv->driver.name = drv->name;
529 drv->driver.bus = &macio_bus_type; 529 drv->driver.bus = &macio_bus_type;
530 530
531 /* register with core */ 531 /* register with core */
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 288acce76b74..2fd435bc542e 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -728,8 +728,10 @@ static struct of_device_id media_bay_match[] =
728 728
729static struct macio_driver media_bay_driver = 729static struct macio_driver media_bay_driver =
730{ 730{
731 .name = "media-bay", 731 .driver = {
732 .match_table = media_bay_match, 732 .name = "media-bay",
733 .of_match_table = media_bay_match,
734 },
733 .probe = media_bay_attach, 735 .probe = media_bay_attach,
734 .suspend = media_bay_suspend, 736 .suspend = media_bay_suspend,
735 .resume = media_bay_resume 737 .resume = media_bay_resume
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
index 12946c5f583f..53cce3a5da23 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -584,9 +584,11 @@ static struct of_device_id rackmeter_match[] = {
584}; 584};
585 585
586static struct macio_driver rackmeter_driver = { 586static struct macio_driver rackmeter_driver = {
587 .name = "rackmeter", 587 .driver = {
588 .owner = THIS_MODULE, 588 .name = "rackmeter",
589 .match_table = rackmeter_match, 589 .owner = THIS_MODULE,
590 .of_match_table = rackmeter_match,
591 },
590 .probe = rackmeter_probe, 592 .probe = rackmeter_probe,
591 .remove = __devexit_p(rackmeter_remove), 593 .remove = __devexit_p(rackmeter_remove),
592 .shutdown = rackmeter_shutdown, 594 .shutdown = rackmeter_shutdown,
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index 39250b2ca886..959add2410bf 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -1654,8 +1654,11 @@ MODULE_DEVICE_TABLE (of, bmac_match);
1654 1654
1655static struct macio_driver bmac_driver = 1655static struct macio_driver bmac_driver =
1656{ 1656{
1657 .name = "bmac", 1657 .driver = {
1658 .match_table = bmac_match, 1658 .name = "bmac",
1659 .owner = THIS_MODULE,
1660 .of_match_table = bmac_match,
1661 },
1659 .probe = bmac_probe, 1662 .probe = bmac_probe,
1660 .remove = bmac_remove, 1663 .remove = bmac_remove,
1661#ifdef CONFIG_PM 1664#ifdef CONFIG_PM
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index b6855a6476f8..1c5221f79d6f 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -997,8 +997,11 @@ MODULE_DEVICE_TABLE (of, mace_match);
997 997
998static struct macio_driver mace_driver = 998static struct macio_driver mace_driver =
999{ 999{
1000 .name = "mace", 1000 .driver = {
1001 .match_table = mace_match, 1001 .name = "mace",
1002 .owner = THIS_MODULE,
1003 .of_match_table = mace_match,
1004 },
1002 .probe = mace_probe, 1005 .probe = mace_probe,
1003 .remove = mace_remove, 1006 .remove = mace_remove,
1004}; 1007};
diff --git a/drivers/net/wireless/orinoco/airport.c b/drivers/net/wireless/orinoco/airport.c
index 9bcee10c9308..4a0a0e5265c9 100644
--- a/drivers/net/wireless/orinoco/airport.c
+++ b/drivers/net/wireless/orinoco/airport.c
@@ -239,8 +239,11 @@ static struct of_device_id airport_match[] =
239MODULE_DEVICE_TABLE(of, airport_match); 239MODULE_DEVICE_TABLE(of, airport_match);
240 240
241static struct macio_driver airport_driver = { 241static struct macio_driver airport_driver = {
242 .name = DRIVER_NAME, 242 .driver = {
243 .match_table = airport_match, 243 .name = DRIVER_NAME,
244 .owner = THIS_MODULE,
245 .of_match_table = airport_match,
246 },
244 .probe = airport_attach, 247 .probe = airport_attach,
245 .remove = airport_detach, 248 .remove = airport_detach,
246 .suspend = airport_suspend, 249 .suspend = airport_suspend,
diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c
index 18735b39b3d3..3ddb4dc62d5d 100644
--- a/drivers/scsi/mac53c94.c
+++ b/drivers/scsi/mac53c94.c
@@ -542,8 +542,11 @@ MODULE_DEVICE_TABLE (of, mac53c94_match);
542 542
543static struct macio_driver mac53c94_driver = 543static struct macio_driver mac53c94_driver =
544{ 544{
545 .name = "mac53c94", 545 .driver = {
546 .match_table = mac53c94_match, 546 .name = "mac53c94",
547 .owner = THIS_MODULE,
548 .of_match_table = mac53c94_match,
549 },
547 .probe = mac53c94_probe, 550 .probe = mac53c94_probe,
548 .remove = mac53c94_remove, 551 .remove = mac53c94_remove,
549}; 552};
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c
index a1c97e88068a..1f784fde2510 100644
--- a/drivers/scsi/mesh.c
+++ b/drivers/scsi/mesh.c
@@ -2036,8 +2036,11 @@ MODULE_DEVICE_TABLE (of, mesh_match);
2036 2036
2037static struct macio_driver mesh_driver = 2037static struct macio_driver mesh_driver =
2038{ 2038{
2039 .name = "mesh", 2039 .driver = {
2040 .match_table = mesh_match, 2040 .name = "mesh",
2041 .owner = THIS_MODULE,
2042 .of_match_table = mesh_match,
2043 },
2041 .probe = mesh_probe, 2044 .probe = mesh_probe,
2042 .remove = mesh_remove, 2045 .remove = mesh_remove,
2043 .shutdown = mesh_shutdown, 2046 .shutdown = mesh_shutdown,
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index cabbdc7ba583..5b9cde79e4ea 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -2005,8 +2005,11 @@ static struct of_device_id pmz_match[] =
2005MODULE_DEVICE_TABLE (of, pmz_match); 2005MODULE_DEVICE_TABLE (of, pmz_match);
2006 2006
2007static struct macio_driver pmz_driver = { 2007static struct macio_driver pmz_driver = {
2008 .name = "pmac_zilog", 2008 .driver = {
2009 .match_table = pmz_match, 2009 .name = "pmac_zilog",
2010 .owner = THIS_MODULE,
2011 .of_match_table = pmz_match,
2012 },
2010 .probe = pmz_attach, 2013 .probe = pmz_attach,
2011 .remove = pmz_detach, 2014 .remove = pmz_detach,
2012 .suspend = pmz_suspend, 2015 .suspend = pmz_suspend,
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index 678933721735..3ff8cc5f487a 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -437,9 +437,11 @@ static int i2sbus_shutdown(struct macio_dev* dev)
437} 437}
438 438
439static struct macio_driver i2sbus_drv = { 439static struct macio_driver i2sbus_drv = {
440 .name = "soundbus-i2s", 440 .driver = {
441 .owner = THIS_MODULE, 441 .name = "soundbus-i2s",
442 .match_table = i2sbus_match, 442 .owner = THIS_MODULE,
443 .of_match_table = i2sbus_match,
444 },
443 .probe = i2sbus_probe, 445 .probe = i2sbus_probe,
444 .remove = i2sbus_remove, 446 .remove = i2sbus_remove,
445#ifdef CONFIG_PM 447#ifdef CONFIG_PM