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

Commit fcd46713 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge branch 'depends/rmk/smp' into tmp

parents bda24879 5a567d78
Loading
Loading
Loading
Loading
+25 −0
Original line number Original line Diff line number Diff line
@@ -1407,6 +1407,31 @@ config SMP_ON_UP


	  If you don't know what to do here, say Y.
	  If you don't know what to do here, say Y.


config ARM_CPU_TOPOLOGY
	bool "Support cpu topology definition"
	depends on SMP && CPU_V7
	default y
	help
	  Support ARM cpu topology definition. The MPIDR register defines
	  affinity between processors which is then used to describe the cpu
	  topology of an ARM System.

config SCHED_MC
	bool "Multi-core scheduler support"
	depends on ARM_CPU_TOPOLOGY
	help
	  Multi-core scheduler support improves the CPU scheduler's decision
	  making when dealing with multi-core CPU chips at a cost of slightly
	  increased overhead in some places. If unsure say N here.

config SCHED_SMT
	bool "SMT scheduler support"
	depends on ARM_CPU_TOPOLOGY
	help
	  Improves the CPU scheduler's decision making when dealing with
	  MultiThreading at a cost of slightly increased overhead in some
	  places. If unsure say N here.

config HAVE_ARM_SCU
config HAVE_ARM_SCU
	bool
	bool
	help
	help
+14 −3
Original line number Original line Diff line number Diff line
@@ -180,7 +180,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
		return -EINVAL;
		return -EINVAL;


	mask = 0xff << shift;
	mask = 0xff << shift;
	bit = 1 << (cpu + shift);
	bit = 1 << (cpu_logical_map(cpu) + shift);


	spin_lock(&irq_controller_lock);
	spin_lock(&irq_controller_lock);
	val = readl_relaxed(reg) & ~mask;
	val = readl_relaxed(reg) & ~mask;
@@ -259,9 +259,15 @@ static void __init gic_dist_init(struct gic_chip_data *gic,
	unsigned int irq_start)
	unsigned int irq_start)
{
{
	unsigned int gic_irqs, irq_limit, i;
	unsigned int gic_irqs, irq_limit, i;
	u32 cpumask;
	void __iomem *base = gic->dist_base;
	void __iomem *base = gic->dist_base;
	u32 cpumask = 1 << smp_processor_id();
	u32 cpu = 0;


#ifdef CONFIG_SMP
	cpu = cpu_logical_map(smp_processor_id());
#endif

	cpumask = 1 << cpu;
	cpumask |= cpumask << 8;
	cpumask |= cpumask << 8;
	cpumask |= cpumask << 16;
	cpumask |= cpumask << 16;


@@ -382,7 +388,12 @@ void __cpuinit gic_enable_ppi(unsigned int irq)
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
{
{
	unsigned long map = *cpus_addr(*mask);
	int cpu;
	unsigned long map = 0;

	/* Convert our logical CPU mask into a physical one. */
	for_each_cpu(cpu, mask)
		map |= 1 << cpu_logical_map(cpu);


	/*
	/*
	 * Ensure that stores to Normal memory are visible to the
	 * Ensure that stores to Normal memory are visible to the
+6 −0
Original line number Original line Diff line number Diff line
@@ -8,6 +8,7 @@
#define CPUID_CACHETYPE	1
#define CPUID_CACHETYPE	1
#define CPUID_TCM	2
#define CPUID_TCM	2
#define CPUID_TLBTYPE	3
#define CPUID_TLBTYPE	3
#define CPUID_MPIDR	5


#define CPUID_EXT_PFR0	"c1, 0"
#define CPUID_EXT_PFR0	"c1, 0"
#define CPUID_EXT_PFR1	"c1, 1"
#define CPUID_EXT_PFR1	"c1, 1"
@@ -70,6 +71,11 @@ static inline unsigned int __attribute_const__ read_cpuid_tcmstatus(void)
	return read_cpuid(CPUID_TCM);
	return read_cpuid(CPUID_TCM);
}
}


static inline unsigned int __attribute_const__ read_cpuid_mpidr(void)
{
	return read_cpuid(CPUID_MPIDR);
}

/*
/*
 * Intel's XScale3 core supports some v6 features (supersections, L2)
 * Intel's XScale3 core supports some v6 features (supersections, L2)
 * but advertises itself as v5 as it does not support the v6 ISA.  For
 * but advertises itself as v5 as it does not support the v6 ISA.  For
+19 −0
Original line number Original line Diff line number Diff line
/*
 * Annotations for marking C functions as exception handlers.
 *
 * These should only be used for C functions that are called from the low
 * level exception entry code and not any intervening C code.
 */
#ifndef __ASM_ARM_EXCEPTION_H
#define __ASM_ARM_EXCEPTION_H

#include <linux/ftrace.h>

#define __exception	__attribute__((section(".exception.text")))
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
#define __exception_irq_entry	__irq_entry
#else
#define __exception_irq_entry	__exception
#endif

#endif /* __ASM_ARM_EXCEPTION_H */
+4 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,10 @@ void percpu_timer_setup(void);
 */
 */
asmlinkage void do_local_timer(struct pt_regs *);
asmlinkage void do_local_timer(struct pt_regs *);


/*
 * Called from C code
 */
void handle_local_timer(struct pt_regs *);


#ifdef CONFIG_LOCAL_TIMERS
#ifdef CONFIG_LOCAL_TIMERS


Loading