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

Commit be835674 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/perf_event: Fix oops due to perf_event_do_pending call
  powerpc/swiotlb: Fix off by one in determining boundary of which ops to use
parents 5ec390e0 131c6c9e
Loading
Loading
Loading
Loading
+0 −38
Original line number Diff line number Diff line
@@ -130,43 +130,5 @@ static inline int irqs_disabled_flags(unsigned long flags)
 */
struct irq_chip;

#ifdef CONFIG_PERF_EVENTS

#ifdef CONFIG_PPC64
static inline unsigned long test_perf_event_pending(void)
{
	unsigned long x;

	asm volatile("lbz %0,%1(13)"
		: "=r" (x)
		: "i" (offsetof(struct paca_struct, perf_event_pending)));
	return x;
}

static inline void set_perf_event_pending(void)
{
	asm volatile("stb %0,%1(13)" : :
		"r" (1),
		"i" (offsetof(struct paca_struct, perf_event_pending)));
}

static inline void clear_perf_event_pending(void)
{
	asm volatile("stb %0,%1(13)" : :
		"r" (0),
		"i" (offsetof(struct paca_struct, perf_event_pending)));
}
#endif /* CONFIG_PPC64 */

#else  /* CONFIG_PERF_EVENTS */

static inline unsigned long test_perf_event_pending(void)
{
	return 0;
}

static inline void clear_perf_event_pending(void) {}
#endif /* CONFIG_PERF_EVENTS */

#endif	/* __KERNEL__ */
#endif	/* _ASM_POWERPC_HW_IRQ_H */
+0 −1
Original line number Diff line number Diff line
@@ -133,7 +133,6 @@ int main(void)
	DEFINE(PACAKMSR, offsetof(struct paca_struct, kernel_msr));
	DEFINE(PACASOFTIRQEN, offsetof(struct paca_struct, soft_enabled));
	DEFINE(PACAHARDIRQEN, offsetof(struct paca_struct, hard_enabled));
	DEFINE(PACAPERFPEND, offsetof(struct paca_struct, perf_event_pending));
	DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id));
#ifdef CONFIG_PPC_MM_SLICES
	DEFINE(PACALOWSLICESPSIZE, offsetof(struct paca_struct,
+3 −2
Original line number Diff line number Diff line
/*
 * Contains routines needed to support swiotlb for ppc.
 *
 * Copyright (C) 2009 Becky Bruce, Freescale Semiconductor
 * Copyright (C) 2009-2010 Freescale Semiconductor, Inc.
 * Author: Becky Bruce
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
@@ -70,7 +71,7 @@ static int ppc_swiotlb_bus_notify(struct notifier_block *nb,
	sd->max_direct_dma_addr = 0;

	/* May need to bounce if the device can't address all of DRAM */
	if (dma_get_mask(dev) < lmb_end_of_DRAM())
	if ((dma_get_mask(dev) + 1) < lmb_end_of_DRAM())
		set_dma_ops(dev, &swiotlb_dma_ops);

	return NOTIFY_DONE;
+0 −9
Original line number Diff line number Diff line
@@ -556,15 +556,6 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
2:
	TRACE_AND_RESTORE_IRQ(r5);

#ifdef CONFIG_PERF_EVENTS
	/* check paca->perf_event_pending if we're enabling ints */
	lbz	r3,PACAPERFPEND(r13)
	and.	r3,r3,r5
	beq	27f
	bl	.perf_event_do_pending
27:
#endif /* CONFIG_PERF_EVENTS */

	/* extract EE bit and use it to restore paca->hard_enabled */
	ld	r3,_MSR(r1)
	rldicl	r4,r3,49,63		/* r0 = (r3 >> 15) & 1 */
+0 −6
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@
#include <linux/bootmem.h>
#include <linux/pci.h>
#include <linux/debugfs.h>
#include <linux/perf_event.h>

#include <asm/uaccess.h>
#include <asm/system.h>
@@ -145,11 +144,6 @@ notrace void raw_local_irq_restore(unsigned long en)
	}
#endif /* CONFIG_PPC_STD_MMU_64 */

	if (test_perf_event_pending()) {
		clear_perf_event_pending();
		perf_event_do_pending();
	}

	/*
	 * if (get_paca()->hard_enabled) return;
	 * But again we need to take care that gcc gets hard_enabled directly
Loading