Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233481
b: refs/heads/master
c: 71efb06
h: refs/heads/master
i:
  233479: 0c6122b
v: v3
  • Loading branch information
Will Deacon authored and Russell King committed Feb 19, 2011
1 parent b0778c9 commit 82dc622
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 885028e4ba4caf49d565c96481e1a05220ecb517
refs/heads/master: 71efb063f4a145ae420be054f5a91dcf7c19b375
22 changes: 14 additions & 8 deletions trunk/arch/arm/kernel/pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,28 +97,34 @@ set_irq_affinity(int irq,
irq, cpu);
return err;
#else
return 0;
return -EINVAL;
#endif
}

static int
init_cpu_pmu(void)
{
int i, err = 0;
int i, irqs, err = 0;
struct platform_device *pdev = pmu_devices[ARM_PMU_DEVICE_CPU];

if (!pdev) {
err = -ENODEV;
goto out;
}
if (!pdev)
return -ENODEV;

irqs = pdev->num_resources;

/*
* If we have a single PMU interrupt that we can't shift, assume that
* we're running on a uniprocessor machine and continue.
*/
if (irqs == 1 && !irq_can_set_affinity(platform_get_irq(pdev, 0)))
return 0;

for (i = 0; i < pdev->num_resources; ++i) {
for (i = 0; i < irqs; ++i) {
err = set_irq_affinity(platform_get_irq(pdev, i), i);
if (err)
break;
}

out:
return err;
}

Expand Down

0 comments on commit 82dc622

Please sign in to comment.