diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-05 16:22:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-05 16:22:49 -0500 |
commit | 1bbc9a66d0194449f32c2aa18be40db5744dbd85 (patch) | |
tree | 05c2efbd2cc8058ca1318fea2875880150b69d54 /arch | |
parent | 2c75910f1aa042be1dd769378d2611bf551721ac (diff) | |
parent | 38634e6769920929385f1ffc8820dc3e893cc630 (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/kvm: Remove problematic BUILD_BUG_ON statement
powerpc/pci: Fix regression in powerpc MSI-X
powerpc: Avoid giving out RTC dates below EPOCH
powerpc/mm: Remove debug context clamping from nohash code
powerpc: Cleanup Kconfig selection of hugetlbfs support
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/Kconfig | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 15 | ||||
-rw-r--r-- | arch/powerpc/kvm/timing.h | 4 | ||||
-rw-r--r-- | arch/powerpc/mm/mmu_context_nohash.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/msi.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 9 |
6 files changed, 33 insertions, 5 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 10a0a5488a44..2ba14e77296c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -414,6 +414,10 @@ config ARCH_SPARSEMEM_DEFAULT | |||
414 | config ARCH_POPULATES_NODE_MAP | 414 | config ARCH_POPULATES_NODE_MAP |
415 | def_bool y | 415 | def_bool y |
416 | 416 | ||
417 | config SYS_SUPPORTS_HUGETLBFS | ||
418 | def_bool y | ||
419 | depends on PPC_BOOK3S_64 | ||
420 | |||
417 | source "mm/Kconfig" | 421 | source "mm/Kconfig" |
418 | 422 | ||
419 | config ARCH_MEMORY_PROBE | 423 | config ARCH_MEMORY_PROBE |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 92dc844299b6..a136a11c490d 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -777,7 +777,7 @@ int update_persistent_clock(struct timespec now) | |||
777 | return ppc_md.set_rtc_time(&tm); | 777 | return ppc_md.set_rtc_time(&tm); |
778 | } | 778 | } |
779 | 779 | ||
780 | void read_persistent_clock(struct timespec *ts) | 780 | static void __read_persistent_clock(struct timespec *ts) |
781 | { | 781 | { |
782 | struct rtc_time tm; | 782 | struct rtc_time tm; |
783 | static int first = 1; | 783 | static int first = 1; |
@@ -800,10 +800,23 @@ void read_persistent_clock(struct timespec *ts) | |||
800 | return; | 800 | return; |
801 | } | 801 | } |
802 | ppc_md.get_rtc_time(&tm); | 802 | ppc_md.get_rtc_time(&tm); |
803 | |||
803 | ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, | 804 | ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, |
804 | tm.tm_hour, tm.tm_min, tm.tm_sec); | 805 | tm.tm_hour, tm.tm_min, tm.tm_sec); |
805 | } | 806 | } |
806 | 807 | ||
808 | void read_persistent_clock(struct timespec *ts) | ||
809 | { | ||
810 | __read_persistent_clock(ts); | ||
811 | |||
812 | /* Sanitize it in case real time clock is set below EPOCH */ | ||
813 | if (ts->tv_sec < 0) { | ||
814 | ts->tv_sec = 0; | ||
815 | ts->tv_nsec = 0; | ||
816 | } | ||
817 | |||
818 | } | ||
819 | |||
807 | /* clocksource code */ | 820 | /* clocksource code */ |
808 | static cycle_t rtc_read(struct clocksource *cs) | 821 | static cycle_t rtc_read(struct clocksource *cs) |
809 | { | 822 | { |
diff --git a/arch/powerpc/kvm/timing.h b/arch/powerpc/kvm/timing.h index bb13b1f3cd5a..806ef67868bd 100644 --- a/arch/powerpc/kvm/timing.h +++ b/arch/powerpc/kvm/timing.h | |||
@@ -48,7 +48,11 @@ static inline void kvmppc_set_exit_type(struct kvm_vcpu *vcpu, int type) {} | |||
48 | static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type) | 48 | static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type) |
49 | { | 49 | { |
50 | /* type has to be known at build time for optimization */ | 50 | /* type has to be known at build time for optimization */ |
51 | |||
52 | /* The BUILD_BUG_ON below breaks in funny ways, commented out | ||
53 | * for now ... -BenH | ||
51 | BUILD_BUG_ON(__builtin_constant_p(type)); | 54 | BUILD_BUG_ON(__builtin_constant_p(type)); |
55 | */ | ||
52 | switch (type) { | 56 | switch (type) { |
53 | case EXT_INTR_EXITS: | 57 | case EXT_INTR_EXITS: |
54 | vcpu->stat.ext_intr_exits++; | 58 | vcpu->stat.ext_intr_exits++; |
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index c2f93dc470e6..be4f34c30a0b 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c | |||
@@ -25,8 +25,8 @@ | |||
25 | * also clear mm->cpu_vm_mask bits when processes are migrated | 25 | * also clear mm->cpu_vm_mask bits when processes are migrated |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define DEBUG_MAP_CONSISTENCY | 28 | //#define DEBUG_MAP_CONSISTENCY |
29 | #define DEBUG_CLAMP_LAST_CONTEXT 31 | 29 | //#define DEBUG_CLAMP_LAST_CONTEXT 31 |
30 | //#define DEBUG_HARDER | 30 | //#define DEBUG_HARDER |
31 | 31 | ||
32 | /* We don't use DEBUG because it tends to be compiled in always nowadays | 32 | /* We don't use DEBUG because it tends to be compiled in always nowadays |
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index bf2e1ac41308..1164c3430f2c 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c | |||
@@ -432,8 +432,6 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | |||
432 | /* Read config space back so we can restore after reset */ | 432 | /* Read config space back so we can restore after reset */ |
433 | read_msi_msg(virq, &msg); | 433 | read_msi_msg(virq, &msg); |
434 | entry->msg = msg; | 434 | entry->msg = msg; |
435 | |||
436 | unmask_msi_irq(virq); | ||
437 | } | 435 | } |
438 | 436 | ||
439 | return 0; | 437 | return 0; |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 419f8a637ffe..b9bf0eedccf2 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/radix-tree.h> | 19 | #include <linux/radix-tree.h> |
20 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
21 | #include <linux/msi.h> | ||
21 | #include <linux/of.h> | 22 | #include <linux/of.h> |
22 | 23 | ||
23 | #include <asm/firmware.h> | 24 | #include <asm/firmware.h> |
@@ -219,6 +220,14 @@ static void xics_unmask_irq(unsigned int virq) | |||
219 | 220 | ||
220 | static unsigned int xics_startup(unsigned int virq) | 221 | static unsigned int xics_startup(unsigned int virq) |
221 | { | 222 | { |
223 | /* | ||
224 | * The generic MSI code returns with the interrupt disabled on the | ||
225 | * card, using the MSI mask bits. Firmware doesn't appear to unmask | ||
226 | * at that level, so we do it here by hand. | ||
227 | */ | ||
228 | if (irq_to_desc(virq)->msi_desc) | ||
229 | unmask_msi_irq(virq); | ||
230 | |||
222 | /* unmask it */ | 231 | /* unmask it */ |
223 | xics_unmask_irq(virq); | 232 | xics_unmask_irq(virq); |
224 | return 0; | 233 | return 0; |