diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-05 18:20:17 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-05 18:20:17 -0500 |
commit | 742eaa6a6e356a16788ce6530271de89bc4f8fb5 (patch) | |
tree | 12fc040daab06ac796c61c1d92bfad9bb054d1c1 /arch/arm/common | |
parent | ba8bb18a03f8c7508565c385576a5431a4ad804a (diff) | |
parent | ae72fd588a2b302222769b44775912b83f0785eb (diff) |
Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable
Conflicts:
arch/arm/common/gic.c
arch/arm/plat-omap/include/plat/common.h
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/gic.c | 15 | ||||
-rw-r--r-- | arch/arm/common/pl330.c | 12 |
2 files changed, 18 insertions, 9 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index a1feb6b4f9f5..b2dc2dd7f1df 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -612,7 +612,8 @@ static void __init gic_pm_init(struct gic_chip_data *gic) | |||
612 | sizeof(u32)); | 612 | sizeof(u32)); |
613 | BUG_ON(!gic->saved_ppi_conf); | 613 | BUG_ON(!gic->saved_ppi_conf); |
614 | 614 | ||
615 | cpu_pm_register_notifier(&gic_notifier_block); | 615 | if (gic == &gic_data[0]) |
616 | cpu_pm_register_notifier(&gic_notifier_block); | ||
616 | } | 617 | } |
617 | #else | 618 | #else |
618 | static void __init gic_pm_init(struct gic_chip_data *gic) | 619 | static void __init gic_pm_init(struct gic_chip_data *gic) |
@@ -696,12 +697,14 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, | |||
696 | * For primary GICs, skip over SGIs. | 697 | * For primary GICs, skip over SGIs. |
697 | * For secondary GICs, skip over PPIs, too. | 698 | * For secondary GICs, skip over PPIs, too. |
698 | */ | 699 | */ |
700 | domain->hwirq_base = 32; | ||
699 | if (gic_nr == 0) { | 701 | if (gic_nr == 0) { |
700 | domain->hwirq_base = 16; | 702 | if ((irq_start & 31) > 0) { |
701 | if (irq_start > 0) | 703 | domain->hwirq_base = 16; |
702 | irq_start = (irq_start & ~31) + 16; | 704 | if (irq_start != -1) |
703 | } else | 705 | irq_start = (irq_start & ~31) + 16; |
704 | domain->hwirq_base = 32; | 706 | } |
707 | } | ||
705 | 708 | ||
706 | /* | 709 | /* |
707 | * Find out how many interrupts are supported. | 710 | * Find out how many interrupts are supported. |
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 7129cfbdacd6..f407a6b35d3d 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c | |||
@@ -1211,8 +1211,8 @@ static inline u32 _prepare_ccr(const struct pl330_reqcfg *rqc) | |||
1211 | ccr |= (rqc->brst_size << CC_SRCBRSTSIZE_SHFT); | 1211 | ccr |= (rqc->brst_size << CC_SRCBRSTSIZE_SHFT); |
1212 | ccr |= (rqc->brst_size << CC_DSTBRSTSIZE_SHFT); | 1212 | ccr |= (rqc->brst_size << CC_DSTBRSTSIZE_SHFT); |
1213 | 1213 | ||
1214 | ccr |= (rqc->dcctl << CC_SRCCCTRL_SHFT); | 1214 | ccr |= (rqc->scctl << CC_SRCCCTRL_SHFT); |
1215 | ccr |= (rqc->scctl << CC_DSTCCTRL_SHFT); | 1215 | ccr |= (rqc->dcctl << CC_DSTCCTRL_SHFT); |
1216 | 1216 | ||
1217 | ccr |= (rqc->swap << CC_SWAP_SHFT); | 1217 | ccr |= (rqc->swap << CC_SWAP_SHFT); |
1218 | 1218 | ||
@@ -1623,6 +1623,11 @@ static inline int _alloc_event(struct pl330_thread *thrd) | |||
1623 | return -1; | 1623 | return -1; |
1624 | } | 1624 | } |
1625 | 1625 | ||
1626 | static bool _chan_ns(const struct pl330_info *pi, int i) | ||
1627 | { | ||
1628 | return pi->pcfg.irq_ns & (1 << i); | ||
1629 | } | ||
1630 | |||
1626 | /* Upon success, returns IdentityToken for the | 1631 | /* Upon success, returns IdentityToken for the |
1627 | * allocated channel, NULL otherwise. | 1632 | * allocated channel, NULL otherwise. |
1628 | */ | 1633 | */ |
@@ -1647,7 +1652,8 @@ void *pl330_request_channel(const struct pl330_info *pi) | |||
1647 | 1652 | ||
1648 | for (i = 0; i < chans; i++) { | 1653 | for (i = 0; i < chans; i++) { |
1649 | thrd = &pl330->channels[i]; | 1654 | thrd = &pl330->channels[i]; |
1650 | if (thrd->free) { | 1655 | if ((thrd->free) && (!_manager_ns(thrd) || |
1656 | _chan_ns(pi, i))) { | ||
1651 | thrd->ev = _alloc_event(thrd); | 1657 | thrd->ev = _alloc_event(thrd); |
1652 | if (thrd->ev >= 0) { | 1658 | if (thrd->ev >= 0) { |
1653 | thrd->free = false; | 1659 | thrd->free = false; |