1
0
Fork 0

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
wifi-calibration
Linus Torvalds 2010-06-03 15:46:37 -07:00
commit 39059cceed
18 changed files with 67 additions and 53 deletions

View File

@ -3503,9 +3503,8 @@ F: arch/powerpc/platforms/83xx/
LINUX FOR POWERPC PA SEMI PWRFICIENT LINUX FOR POWERPC PA SEMI PWRFICIENT
M: Olof Johansson <olof@lixom.net> M: Olof Johansson <olof@lixom.net>
W: http://www.pasemi.com/
L: linuxppc-dev@ozlabs.org L: linuxppc-dev@ozlabs.org
S: Supported S: Maintained
F: arch/powerpc/platforms/pasemi/ F: arch/powerpc/platforms/pasemi/
F: drivers/*/*pasemi* F: drivers/*/*pasemi*
F: drivers/*/*/*pasemi* F: drivers/*/*/*pasemi*

View File

@ -123,10 +123,6 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev)
*/ */
struct macio_driver struct macio_driver
{ {
char *name;
struct of_device_id *match_table;
struct module *owner;
int (*probe)(struct macio_dev* dev, const struct of_device_id *match); int (*probe)(struct macio_dev* dev, const struct of_device_id *match);
int (*remove)(struct macio_dev* dev); int (*remove)(struct macio_dev* dev);

View File

@ -378,17 +378,6 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
* single-stepped a copy of the instruction. The address of this * single-stepped a copy of the instruction. The address of this
* copy is p->ainsn.insn. * copy is p->ainsn.insn.
*/ */
static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs)
{
int ret;
unsigned int insn = *p->ainsn.insn;
regs->nip = (unsigned long)p->addr;
ret = emulate_step(regs, insn);
if (ret == 0)
regs->nip = (unsigned long)p->addr + 4;
}
static int __kprobes post_kprobe_handler(struct pt_regs *regs) static int __kprobes post_kprobe_handler(struct pt_regs *regs)
{ {
struct kprobe *cur = kprobe_running(); struct kprobe *cur = kprobe_running();
@ -406,7 +395,8 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs)
cur->post_handler(cur, regs, 0); cur->post_handler(cur, regs, 0);
} }
resume_execution(cur, regs); /* Adjust nip to after the single-stepped instruction */
regs->nip = (unsigned long)cur->addr + 4;
regs->msr |= kcb->kprobe_saved_msr; regs->msr |= kcb->kprobe_saved_msr;
/*Restore back the original saved kprobes variables and continue. */ /*Restore back the original saved kprobes variables and continue. */

View File

@ -1066,7 +1066,7 @@ static int __init cell_iommu_fixed_mapping_init(void)
fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT); fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT);
fsize = lmb_phys_mem_size(); fsize = lmb_phys_mem_size();
if ((fbase + fsize) <= 0x800000000) if ((fbase + fsize) <= 0x800000000ul)
hbase = 0; /* use the device tree window */ hbase = 0; /* use the device tree window */
else { else {
/* If we're over 32 GB we need to cheat. We can't map all of /* If we're over 32 GB we need to cheat. We can't map all of

View File

@ -1355,8 +1355,11 @@ static struct of_device_id pata_macio_match[] =
static struct macio_driver pata_macio_driver = static struct macio_driver pata_macio_driver =
{ {
.name = "pata-macio", .driver = {
.match_table = pata_macio_match, .name = "pata-macio",
.owner = THIS_MODULE,
.of_match_table = pata_macio_match,
},
.probe = pata_macio_attach, .probe = pata_macio_attach,
.remove = pata_macio_detach, .remove = pata_macio_detach,
#ifdef CONFIG_PM #ifdef CONFIG_PM
@ -1366,9 +1369,6 @@ static struct macio_driver pata_macio_driver =
#ifdef CONFIG_PMAC_MEDIABAY #ifdef CONFIG_PMAC_MEDIABAY
.mediabay_event = pata_macio_mb_event, .mediabay_event = pata_macio_mb_event,
#endif #endif
.driver = {
.owner = THIS_MODULE,
},
}; };
static const struct pci_device_id pata_macio_pci_match[] = { static const struct pci_device_id pata_macio_pci_match[] = {

View File

@ -1159,8 +1159,10 @@ static struct of_device_id swim3_match[] =
static struct macio_driver swim3_driver = static struct macio_driver swim3_driver =
{ {
.name = "swim3", .driver = {
.match_table = swim3_match, .name = "swim3",
.of_match_table = swim3_match,
},
.probe = swim3_attach, .probe = swim3_attach,
#if 0 #if 0
.suspend = swim3_suspend, .suspend = swim3_suspend,

View File

@ -415,7 +415,7 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
bridge->gatt_table_real = (u32 *) table; bridge->gatt_table_real = (u32 *) table;
/* Need to clear out any dirty data still sitting in caches */ /* Need to clear out any dirty data still sitting in caches */
flush_dcache_range((unsigned long)table, flush_dcache_range((unsigned long)table,
(unsigned long)(table_end + PAGE_SIZE)); (unsigned long)table_end + 1);
bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG); bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG);
if (bridge->gatt_table == NULL) if (bridge->gatt_table == NULL)

View File

@ -1400,8 +1400,11 @@ static struct of_device_id pmac_ide_macio_match[] =
static struct macio_driver pmac_ide_macio_driver = static struct macio_driver pmac_ide_macio_driver =
{ {
.name = "ide-pmac", .driver = {
.match_table = pmac_ide_macio_match, .name = "ide-pmac",
.owner = THIS_MODULE,
.of_match_table = pmac_ide_macio_match,
},
.probe = pmac_ide_macio_attach, .probe = pmac_ide_macio_attach,
.suspend = pmac_ide_macio_suspend, .suspend = pmac_ide_macio_suspend,
.resume = pmac_ide_macio_resume, .resume = pmac_ide_macio_resume,

View File

@ -492,8 +492,8 @@ static void macio_pci_add_devices(struct macio_chip *chip)
} }
/* Add media bay devices if any */ /* Add media bay devices if any */
pnode = mbdev->ofdev.dev.of_node; if (mbdev) {
if (mbdev) pnode = mbdev->ofdev.dev.of_node;
for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
if (macio_skip_device(np)) if (macio_skip_device(np))
continue; continue;
@ -502,10 +502,11 @@ static void macio_pci_add_devices(struct macio_chip *chip)
mbdev, root_res) == NULL) mbdev, root_res) == NULL)
of_node_put(np); of_node_put(np);
} }
}
/* Add serial ports if any */ /* Add serial ports if any */
pnode = sdev->ofdev.dev.of_node;
if (sdev) { if (sdev) {
pnode = sdev->ofdev.dev.of_node;
for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
if (macio_skip_device(np)) if (macio_skip_device(np))
continue; continue;
@ -525,7 +526,6 @@ static void macio_pci_add_devices(struct macio_chip *chip)
int macio_register_driver(struct macio_driver *drv) int macio_register_driver(struct macio_driver *drv)
{ {
/* initialize common driver fields */ /* initialize common driver fields */
drv->driver.name = drv->name;
drv->driver.bus = &macio_bus_type; drv->driver.bus = &macio_bus_type;
/* register with core */ /* register with core */

View File

@ -728,8 +728,10 @@ static struct of_device_id media_bay_match[] =
static struct macio_driver media_bay_driver = static struct macio_driver media_bay_driver =
{ {
.name = "media-bay", .driver = {
.match_table = media_bay_match, .name = "media-bay",
.of_match_table = media_bay_match,
},
.probe = media_bay_attach, .probe = media_bay_attach,
.suspend = media_bay_suspend, .suspend = media_bay_suspend,
.resume = media_bay_resume .resume = media_bay_resume

View File

@ -584,9 +584,11 @@ static struct of_device_id rackmeter_match[] = {
}; };
static struct macio_driver rackmeter_driver = { static struct macio_driver rackmeter_driver = {
.name = "rackmeter", .driver = {
.owner = THIS_MODULE, .name = "rackmeter",
.match_table = rackmeter_match, .owner = THIS_MODULE,
.of_match_table = rackmeter_match,
},
.probe = rackmeter_probe, .probe = rackmeter_probe,
.remove = __devexit_p(rackmeter_remove), .remove = __devexit_p(rackmeter_remove),
.shutdown = rackmeter_shutdown, .shutdown = rackmeter_shutdown,

View File

@ -1654,8 +1654,11 @@ MODULE_DEVICE_TABLE (of, bmac_match);
static struct macio_driver bmac_driver = static struct macio_driver bmac_driver =
{ {
.name = "bmac", .driver = {
.match_table = bmac_match, .name = "bmac",
.owner = THIS_MODULE,
.of_match_table = bmac_match,
},
.probe = bmac_probe, .probe = bmac_probe,
.remove = bmac_remove, .remove = bmac_remove,
#ifdef CONFIG_PM #ifdef CONFIG_PM

View File

@ -997,8 +997,11 @@ MODULE_DEVICE_TABLE (of, mace_match);
static struct macio_driver mace_driver = static struct macio_driver mace_driver =
{ {
.name = "mace", .driver = {
.match_table = mace_match, .name = "mace",
.owner = THIS_MODULE,
.of_match_table = mace_match,
},
.probe = mace_probe, .probe = mace_probe,
.remove = mace_remove, .remove = mace_remove,
}; };

View File

@ -239,8 +239,11 @@ static struct of_device_id airport_match[] =
MODULE_DEVICE_TABLE(of, airport_match); MODULE_DEVICE_TABLE(of, airport_match);
static struct macio_driver airport_driver = { static struct macio_driver airport_driver = {
.name = DRIVER_NAME, .driver = {
.match_table = airport_match, .name = DRIVER_NAME,
.owner = THIS_MODULE,
.of_match_table = airport_match,
},
.probe = airport_attach, .probe = airport_attach,
.remove = airport_detach, .remove = airport_detach,
.suspend = airport_suspend, .suspend = airport_suspend,

View File

@ -542,8 +542,11 @@ MODULE_DEVICE_TABLE (of, mac53c94_match);
static struct macio_driver mac53c94_driver = static struct macio_driver mac53c94_driver =
{ {
.name = "mac53c94", .driver = {
.match_table = mac53c94_match, .name = "mac53c94",
.owner = THIS_MODULE,
.of_match_table = mac53c94_match,
},
.probe = mac53c94_probe, .probe = mac53c94_probe,
.remove = mac53c94_remove, .remove = mac53c94_remove,
}; };

View File

@ -2036,8 +2036,11 @@ MODULE_DEVICE_TABLE (of, mesh_match);
static struct macio_driver mesh_driver = static struct macio_driver mesh_driver =
{ {
.name = "mesh", .driver = {
.match_table = mesh_match, .name = "mesh",
.owner = THIS_MODULE,
.of_match_table = mesh_match,
},
.probe = mesh_probe, .probe = mesh_probe,
.remove = mesh_remove, .remove = mesh_remove,
.shutdown = mesh_shutdown, .shutdown = mesh_shutdown,

View File

@ -2005,8 +2005,11 @@ static struct of_device_id pmz_match[] =
MODULE_DEVICE_TABLE (of, pmz_match); MODULE_DEVICE_TABLE (of, pmz_match);
static struct macio_driver pmz_driver = { static struct macio_driver pmz_driver = {
.name = "pmac_zilog", .driver = {
.match_table = pmz_match, .name = "pmac_zilog",
.owner = THIS_MODULE,
.of_match_table = pmz_match,
},
.probe = pmz_attach, .probe = pmz_attach,
.remove = pmz_detach, .remove = pmz_detach,
.suspend = pmz_suspend, .suspend = pmz_suspend,

View File

@ -437,9 +437,11 @@ static int i2sbus_shutdown(struct macio_dev* dev)
} }
static struct macio_driver i2sbus_drv = { static struct macio_driver i2sbus_drv = {
.name = "soundbus-i2s", .driver = {
.owner = THIS_MODULE, .name = "soundbus-i2s",
.match_table = i2sbus_match, .owner = THIS_MODULE,
.of_match_table = i2sbus_match,
},
.probe = i2sbus_probe, .probe = i2sbus_probe,
.remove = i2sbus_remove, .remove = i2sbus_remove,
#ifdef CONFIG_PM #ifdef CONFIG_PM