Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebf4bcbd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Quoth BenH:
 "Here are a few powerpc fixes for 3.3, all pretty trivial.  I also
  added the patch to define GET_IP/SET_IP so we can use some more
  asm-generic goodness."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/pseries/eeh: Fix crash when error happens during device probe
  powerpc/pseries: Fix partition migration hang in stop_topology_update
  powerpc/powernv: Disable interrupts while taking phb->lock
  powerpc: Fix WARN_ON in decrementer_check_overflow
  powerpc/wsp: Fix IRQ affinity setting
  powerpc: Implement GET_IP/SET_IP
  powerpc/wsp: Permanently enable PCI class code workaround
parents 8b36ac50 778a785f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -142,6 +142,11 @@ static inline const char *eeh_pci_name(struct pci_dev *pdev)
	return pdev ? pci_name(pdev) : "<null>";
} 

static inline const char *eeh_driver_name(struct pci_dev *pdev)
{
	return (pdev && pdev->driver) ? pdev->driver->name : "<null>";
}

#endif /* CONFIG_EEH */

#else /* CONFIG_PCI */
+12 −8
Original line number Diff line number Diff line
@@ -83,8 +83,18 @@ struct pt_regs {

#ifndef __ASSEMBLY__

#define instruction_pointer(regs) ((regs)->nip)
#define user_stack_pointer(regs) ((regs)->gpr[1])
#define GET_IP(regs)		((regs)->nip)
#define GET_USP(regs)		((regs)->gpr[1])
#define GET_FP(regs)		(0)
#define SET_FP(regs, val)

#ifdef CONFIG_SMP
extern unsigned long profile_pc(struct pt_regs *regs);
#define profile_pc profile_pc
#endif

#include <asm-generic/ptrace.h>

#define kernel_stack_pointer(regs) ((regs)->gpr[1])
static inline int is_syscall_success(struct pt_regs *regs)
{
@@ -99,12 +109,6 @@ static inline long regs_return_value(struct pt_regs *regs)
		return -regs->gpr[3];
}

#ifdef CONFIG_SMP
extern unsigned long profile_pc(struct pt_regs *regs);
#else
#define profile_pc(regs) instruction_pointer(regs)
#endif

#ifdef __powerpc64__
#define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1)
#else
+5 −1
Original line number Diff line number Diff line
@@ -118,10 +118,14 @@ static inline notrace void set_soft_enabled(unsigned long enable)
static inline notrace void decrementer_check_overflow(void)
{
	u64 now = get_tb_or_rtc();
	u64 *next_tb = &__get_cpu_var(decrementers_next_tb);
	u64 *next_tb;

	preempt_disable();
	next_tb = &__get_cpu_var(decrementers_next_tb);

	if (now >= *next_tb)
		set_dec(1);
	preempt_enable();
}

notrace void arch_local_irq_restore(unsigned long en)
+3 −2
Original line number Diff line number Diff line
@@ -716,7 +716,6 @@ static int __rtas_suspend_last_cpu(struct rtas_suspend_me_data *data, int wake_w
	int cpu;

	slb_set_size(SLB_MIN_SIZE);
	stop_topology_update();
	printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", smp_processor_id());

	while (rc == H_MULTI_THREADS_ACTIVE && !atomic_read(&data->done) &&
@@ -732,7 +731,6 @@ static int __rtas_suspend_last_cpu(struct rtas_suspend_me_data *data, int wake_w
		rc = atomic_read(&data->error);

	atomic_set(&data->error, rc);
	start_topology_update();
	pSeries_coalesce_init();

	if (wake_when_done) {
@@ -846,6 +844,7 @@ int rtas_ibm_suspend_me(struct rtas_args *args)
	atomic_set(&data.error, 0);
	data.token = rtas_token("ibm,suspend-me");
	data.complete = &done;
	stop_topology_update();

	/* Call function on all CPUs.  One of us will make the
	 * rtas call
@@ -858,6 +857,8 @@ int rtas_ibm_suspend_me(struct rtas_args *args)
	if (atomic_read(&data.error) != 0)
		printk(KERN_ERR "Error doing global join\n");

	start_topology_update();

	return atomic_read(&data.error);
}
#else /* CONFIG_PPC_PSERIES */
+14 −8
Original line number Diff line number Diff line
@@ -52,32 +52,38 @@ static int pnv_msi_check_device(struct pci_dev* pdev, int nvec, int type)

static unsigned int pnv_get_one_msi(struct pnv_phb *phb)
{
	unsigned int id;
	unsigned long flags;
	unsigned int id, rc;

	spin_lock_irqsave(&phb->lock, flags);

	spin_lock(&phb->lock);
	id = find_next_zero_bit(phb->msi_map, phb->msi_count, phb->msi_next);
	if (id >= phb->msi_count && phb->msi_next)
		id = find_next_zero_bit(phb->msi_map, phb->msi_count, 0);
	if (id >= phb->msi_count) {
		spin_unlock(&phb->lock);
		return 0;
		rc = 0;
		goto out;
	}
	__set_bit(id, phb->msi_map);
	spin_unlock(&phb->lock);
	return id + phb->msi_base;
	rc = id + phb->msi_base;
out:
	spin_unlock_irqrestore(&phb->lock, flags);
	return rc;
}

static void pnv_put_msi(struct pnv_phb *phb, unsigned int hwirq)
{
	unsigned long flags;
	unsigned int id;

	if (WARN_ON(hwirq < phb->msi_base ||
		    hwirq >= (phb->msi_base + phb->msi_count)))
		return;
	id = hwirq - phb->msi_base;
	spin_lock(&phb->lock);

	spin_lock_irqsave(&phb->lock, flags);
	__clear_bit(id, phb->msi_map);
	spin_unlock(&phb->lock);
	spin_unlock_irqrestore(&phb->lock, flags);
}

static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
Loading