diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
commit | e758936e02700ff88a0b08b722a3847b95283ef2 (patch) | |
tree | 50c919bef1b459a778b85159d5929de95b6c4a01 /arch/powerpc/platforms | |
parent | 239cfbde1f5843c4a24199f117d5f67f637d72d5 (diff) | |
parent | 4480f15b3306f43bbb0310d461142b4e897ca45b (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/asm-x86/statfs.h
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/82xx/ep8248e.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 29 | ||||
-rw-r--r-- | arch/powerpc/platforms/fsl_uli1575.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/gpio_mdio.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/Makefile | 2 |
5 files changed, 39 insertions, 12 deletions
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index d5770fdf7f09..0eb6d7f62241 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
@@ -137,7 +137,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev, | |||
137 | bus->irq[i] = -1; | 137 | bus->irq[i] = -1; |
138 | 138 | ||
139 | bus->name = "ep8248e-mdio-bitbang"; | 139 | bus->name = "ep8248e-mdio-bitbang"; |
140 | bus->dev = &ofdev->dev; | 140 | bus->parent = &ofdev->dev; |
141 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); | 141 | snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); |
142 | 142 | ||
143 | return mdiobus_register(bus); | 143 | return mdiobus_register(bus); |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 1c1b627ee843..67595bc380dc 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -643,9 +643,10 @@ static struct spu *find_victim(struct spu_context *ctx) | |||
643 | !(tmp->flags & SPU_CREATE_NOSCHED) && | 643 | !(tmp->flags & SPU_CREATE_NOSCHED) && |
644 | (!victim || tmp->prio > victim->prio)) { | 644 | (!victim || tmp->prio > victim->prio)) { |
645 | victim = spu->ctx; | 645 | victim = spu->ctx; |
646 | get_spu_context(victim); | ||
647 | } | 646 | } |
648 | } | 647 | } |
648 | if (victim) | ||
649 | get_spu_context(victim); | ||
649 | mutex_unlock(&cbe_spu_info[node].list_mutex); | 650 | mutex_unlock(&cbe_spu_info[node].list_mutex); |
650 | 651 | ||
651 | if (victim) { | 652 | if (victim) { |
@@ -727,17 +728,33 @@ static void spu_schedule(struct spu *spu, struct spu_context *ctx) | |||
727 | /* not a candidate for interruptible because it's called either | 728 | /* not a candidate for interruptible because it's called either |
728 | from the scheduler thread or from spu_deactivate */ | 729 | from the scheduler thread or from spu_deactivate */ |
729 | mutex_lock(&ctx->state_mutex); | 730 | mutex_lock(&ctx->state_mutex); |
730 | __spu_schedule(spu, ctx); | 731 | if (ctx->state == SPU_STATE_SAVED) |
732 | __spu_schedule(spu, ctx); | ||
731 | spu_release(ctx); | 733 | spu_release(ctx); |
732 | } | 734 | } |
733 | 735 | ||
734 | static void spu_unschedule(struct spu *spu, struct spu_context *ctx) | 736 | /** |
737 | * spu_unschedule - remove a context from a spu, and possibly release it. | ||
738 | * @spu: The SPU to unschedule from | ||
739 | * @ctx: The context currently scheduled on the SPU | ||
740 | * @free_spu Whether to free the SPU for other contexts | ||
741 | * | ||
742 | * Unbinds the context @ctx from the SPU @spu. If @free_spu is non-zero, the | ||
743 | * SPU is made available for other contexts (ie, may be returned by | ||
744 | * spu_get_idle). If this is zero, the caller is expected to schedule another | ||
745 | * context to this spu. | ||
746 | * | ||
747 | * Should be called with ctx->state_mutex held. | ||
748 | */ | ||
749 | static void spu_unschedule(struct spu *spu, struct spu_context *ctx, | ||
750 | int free_spu) | ||
735 | { | 751 | { |
736 | int node = spu->node; | 752 | int node = spu->node; |
737 | 753 | ||
738 | mutex_lock(&cbe_spu_info[node].list_mutex); | 754 | mutex_lock(&cbe_spu_info[node].list_mutex); |
739 | cbe_spu_info[node].nr_active--; | 755 | cbe_spu_info[node].nr_active--; |
740 | spu->alloc_state = SPU_FREE; | 756 | if (free_spu) |
757 | spu->alloc_state = SPU_FREE; | ||
741 | spu_unbind_context(spu, ctx); | 758 | spu_unbind_context(spu, ctx); |
742 | ctx->stats.invol_ctx_switch++; | 759 | ctx->stats.invol_ctx_switch++; |
743 | spu->stats.invol_ctx_switch++; | 760 | spu->stats.invol_ctx_switch++; |
@@ -837,7 +854,7 @@ static int __spu_deactivate(struct spu_context *ctx, int force, int max_prio) | |||
837 | if (spu) { | 854 | if (spu) { |
838 | new = grab_runnable_context(max_prio, spu->node); | 855 | new = grab_runnable_context(max_prio, spu->node); |
839 | if (new || force) { | 856 | if (new || force) { |
840 | spu_unschedule(spu, ctx); | 857 | spu_unschedule(spu, ctx, new == NULL); |
841 | if (new) { | 858 | if (new) { |
842 | if (new->flags & SPU_CREATE_NOSCHED) | 859 | if (new->flags & SPU_CREATE_NOSCHED) |
843 | wake_up(&new->stop_wq); | 860 | wake_up(&new->stop_wq); |
@@ -910,7 +927,7 @@ static noinline void spusched_tick(struct spu_context *ctx) | |||
910 | 927 | ||
911 | new = grab_runnable_context(ctx->prio + 1, spu->node); | 928 | new = grab_runnable_context(ctx->prio + 1, spu->node); |
912 | if (new) { | 929 | if (new) { |
913 | spu_unschedule(spu, ctx); | 930 | spu_unschedule(spu, ctx, 0); |
914 | if (test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags)) | 931 | if (test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags)) |
915 | spu_add_to_rq(ctx); | 932 | spu_add_to_rq(ctx); |
916 | } else { | 933 | } else { |
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index ef74a0763ec1..8c619963becc 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c | |||
@@ -219,11 +219,21 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev) | |||
219 | int i; | 219 | int i; |
220 | u8 *dummy; | 220 | u8 *dummy; |
221 | struct pci_bus *bus = dev->bus; | 221 | struct pci_bus *bus = dev->bus; |
222 | resource_size_t end = 0; | ||
223 | |||
224 | for (i = PCI_BRIDGE_RESOURCES; i < PCI_BRIDGE_RESOURCES+3; i++) { | ||
225 | unsigned long flags = pci_resource_flags(dev, i); | ||
226 | if ((flags & (IORESOURCE_MEM|IORESOURCE_PREFETCH)) == IORESOURCE_MEM) | ||
227 | end = pci_resource_end(dev, i); | ||
228 | } | ||
222 | 229 | ||
223 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | 230 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { |
224 | if ((bus->resource[i]) && | 231 | if ((bus->resource[i]) && |
225 | (bus->resource[i]->flags & IORESOURCE_MEM)) { | 232 | (bus->resource[i]->flags & IORESOURCE_MEM)) { |
226 | dummy = ioremap(bus->resource[i]->end - 3, 0x4); | 233 | if (bus->resource[i]->end == end) |
234 | dummy = ioremap(bus->resource[i]->start, 0x4); | ||
235 | else | ||
236 | dummy = ioremap(bus->resource[i]->end - 3, 0x4); | ||
227 | if (dummy) { | 237 | if (dummy) { |
228 | in_8(dummy); | 238 | in_8(dummy); |
229 | iounmap(dummy); | 239 | iounmap(dummy); |
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c index ab6955412ba4..75cc165d5bee 100644 --- a/arch/powerpc/platforms/pasemi/gpio_mdio.c +++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c | |||
@@ -230,7 +230,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev, | |||
230 | if (!priv) | 230 | if (!priv) |
231 | goto out; | 231 | goto out; |
232 | 232 | ||
233 | new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL); | 233 | new_bus = mdiobus_alloc(); |
234 | 234 | ||
235 | if (!new_bus) | 235 | if (!new_bus) |
236 | goto out_free_priv; | 236 | goto out_free_priv; |
@@ -272,7 +272,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev, | |||
272 | prop = of_get_property(np, "mdio-pin", NULL); | 272 | prop = of_get_property(np, "mdio-pin", NULL); |
273 | priv->mdio_pin = *prop; | 273 | priv->mdio_pin = *prop; |
274 | 274 | ||
275 | new_bus->dev = dev; | 275 | new_bus->parent = dev; |
276 | dev_set_drvdata(dev, new_bus); | 276 | dev_set_drvdata(dev, new_bus); |
277 | 277 | ||
278 | err = mdiobus_register(new_bus); | 278 | err = mdiobus_register(new_bus); |
@@ -306,7 +306,7 @@ static int gpio_mdio_remove(struct of_device *dev) | |||
306 | 306 | ||
307 | kfree(bus->priv); | 307 | kfree(bus->priv); |
308 | bus->priv = NULL; | 308 | bus->priv = NULL; |
309 | kfree(bus); | 309 | mdiobus_free(bus); |
310 | 310 | ||
311 | return 0; | 311 | return 0; |
312 | } | 312 | } |
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index 58ecdd72630f..be60d64be7ad 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile | |||
@@ -2,7 +2,7 @@ CFLAGS_bootx_init.o += -fPIC | |||
2 | 2 | ||
3 | ifdef CONFIG_FTRACE | 3 | ifdef CONFIG_FTRACE |
4 | # Do not trace early boot code | 4 | # Do not trace early boot code |
5 | CFLAGS_REMOVE_bootx_init.o = -pg | 5 | CFLAGS_REMOVE_bootx_init.o = -pg -mno-sched-epilog |
6 | endif | 6 | endif |
7 | 7 | ||
8 | obj-y += pic.o setup.o time.o feature.o pci.o \ | 8 | obj-y += pic.o setup.o time.o feature.o pci.o \ |