Skip to content
Snippets Groups Projects
Select Git revision
  • 1f90a05d9ff907c70456e7c9d7058372679a88c6
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

smc_ib.c

Blame
  • smp.c 8.82 KiB
    /*
     * Xen SMP support
     *
     * This file implements the Xen versions of smp_ops.  SMP under Xen is
     * very straightforward.  Bringing a CPU up is simply a matter of
     * loading its initial context and setting it running.
     *
     * IPIs are handled through the Xen event mechanism.
     *
     * Because virtual CPUs can be scheduled onto any real CPU, there's no
     * useful topology information for the kernel to make use of.  As a
     * result, all CPUs are treated as if they're single-core and
     * single-threaded.
     *
     * This does not handle HOTPLUG_CPU yet.
     */
    #include <linux/sched.h>
    #include <linux/err.h>
    #include <linux/smp.h>
    
    #include <asm/paravirt.h>
    #include <asm/desc.h>
    #include <asm/pgtable.h>
    #include <asm/cpu.h>
    
    #include <xen/interface/xen.h>
    #include <xen/interface/vcpu.h>
    
    #include <asm/xen/interface.h>
    #include <asm/xen/hypercall.h>
    
    #include <xen/page.h>
    #include <xen/events.h>
    
    #include "xen-ops.h"
    #include "mmu.h"
    
    static cpumask_t cpu_initialized_map;
    static DEFINE_PER_CPU(int, resched_irq);
    static DEFINE_PER_CPU(int, callfunc_irq);
    
    /*
     * Structure and data for smp_call_function(). This is designed to minimise
     * static memory requirements. It also looks cleaner.
     */
    static DEFINE_SPINLOCK(call_lock);
    
    struct call_data_struct {
    	void (*func) (void *info);
    	void *info;
    	atomic_t started;
    	atomic_t finished;
    	int wait;
    };
    
    static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id);
    
    static struct call_data_struct *call_data;
    
    /*
     * Reschedule call back. Nothing to do,
     * all the work is done automatically when
     * we return from the interrupt.
     */
    static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id)
    {
    	return IRQ_HANDLED;
    }
    
    static __cpuinit void cpu_bringup_and_idle(void)