Skip to content

Commit

Permalink
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Nov 5, 2009
2 parents 2c75910 + 38634e6 commit 1bbc9a6
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 6 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ config ARCH_SPARSEMEM_DEFAULT
config ARCH_POPULATES_NODE_MAP
def_bool y

config SYS_SUPPORTS_HUGETLBFS
def_bool y
depends on PPC_BOOK3S_64

source "mm/Kconfig"

config ARCH_MEMORY_PROBE
Expand Down
15 changes: 14 additions & 1 deletion arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ int update_persistent_clock(struct timespec now)
return ppc_md.set_rtc_time(&tm);
}

void read_persistent_clock(struct timespec *ts)
static void __read_persistent_clock(struct timespec *ts)
{
struct rtc_time tm;
static int first = 1;
Expand All @@ -800,10 +800,23 @@ void read_persistent_clock(struct timespec *ts)
return;
}
ppc_md.get_rtc_time(&tm);

ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
}

void read_persistent_clock(struct timespec *ts)
{
__read_persistent_clock(ts);

/* Sanitize it in case real time clock is set below EPOCH */
if (ts->tv_sec < 0) {
ts->tv_sec = 0;
ts->tv_nsec = 0;
}

}

/* clocksource code */
static cycle_t rtc_read(struct clocksource *cs)
{
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/kvm/timing.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ static inline void kvmppc_set_exit_type(struct kvm_vcpu *vcpu, int type) {}
static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type)
{
/* type has to be known at build time for optimization */

/* The BUILD_BUG_ON below breaks in funny ways, commented out
* for now ... -BenH
BUILD_BUG_ON(__builtin_constant_p(type));
*/
switch (type) {
case EXT_INTR_EXITS:
vcpu->stat.ext_intr_exits++;
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/mm/mmu_context_nohash.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
* also clear mm->cpu_vm_mask bits when processes are migrated
*/

#define DEBUG_MAP_CONSISTENCY
#define DEBUG_CLAMP_LAST_CONTEXT 31
//#define DEBUG_MAP_CONSISTENCY
//#define DEBUG_CLAMP_LAST_CONTEXT 31
//#define DEBUG_HARDER

/* We don't use DEBUG because it tends to be compiled in always nowadays
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/platforms/pseries/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,6 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
/* Read config space back so we can restore after reset */
read_msi_msg(virq, &msg);
entry->msg = msg;

unmask_msi_irq(virq);
}

return 0;
Expand Down
9 changes: 9 additions & 0 deletions arch/powerpc/platforms/pseries/xics.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/radix-tree.h>
#include <linux/cpu.h>
#include <linux/msi.h>
#include <linux/of.h>

#include <asm/firmware.h>
Expand Down Expand Up @@ -219,6 +220,14 @@ static void xics_unmask_irq(unsigned int virq)

static unsigned int xics_startup(unsigned int virq)
{
/*
* The generic MSI code returns with the interrupt disabled on the
* card, using the MSI mask bits. Firmware doesn't appear to unmask
* at that level, so we do it here by hand.
*/
if (irq_to_desc(virq)->msi_desc)
unmask_msi_irq(virq);

/* unmask it */
xics_unmask_irq(virq);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ config TMPFS_POSIX_ACL

config HUGETLBFS
bool "HugeTLB file system support"
depends on X86 || IA64 || PPC_BOOK3S_64 || SPARC64 || (S390 && 64BIT) || \
depends on X86 || IA64 || SPARC64 || (S390 && 64BIT) || \
SYS_SUPPORTS_HUGETLBFS || BROKEN
help
hugetlbfs is a filesystem backing for HugeTLB pages, based on
Expand Down

0 comments on commit 1bbc9a6

Please sign in to comment.