Skip to content
Snippets Groups Projects
Select Git revision
  • b444153fb5a647448c2080ad28656ad183cae4fc
  • 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

ulpevent.h

Blame
  • process.c 8.58 KiB
    /*
     * Copyright (C) 2015 Anton Ivanov (aivanov@{brocade.com,kot-begemot.co.uk})
     * Copyright (C) 2015 Thomas Meyer (thomas@m3y3r.de)
     * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
     * Copyright 2003 PathScale, Inc.
     * Licensed under the GPL
     */
    
    #include <linux/stddef.h>
    #include <linux/err.h>
    #include <linux/hardirq.h>
    #include <linux/mm.h>
    #include <linux/module.h>
    #include <linux/personality.h>
    #include <linux/proc_fs.h>
    #include <linux/ptrace.h>
    #include <linux/random.h>
    #include <linux/slab.h>
    #include <linux/sched.h>
    #include <linux/sched/debug.h>
    #include <linux/sched/task.h>
    #include <linux/sched/task_stack.h>
    #include <linux/seq_file.h>
    #include <linux/tick.h>
    #include <linux/threads.h>
    #include <linux/tracehook.h>
    #include <asm/current.h>
    #include <asm/pgtable.h>
    #include <asm/mmu_context.h>
    #include <linux/uaccess.h>
    #include <as-layout.h>
    #include <kern_util.h>
    #include <os.h>
    #include <skas.h>
    #include <timer-internal.h>
    
    /*
     * This is a per-cpu array.  A processor only modifies its entry and it only
     * cares about its entry, so it's OK if another processor is modifying its
     * entry.
     */
    struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } };
    
    static inline int external_pid(void)
    {
    	/* FIXME: Need to look up userspace_pid by cpu */
    	return userspace_pid[0];
    }
    
    int pid_to_processor_id(int pid)
    {
    	int i;
    
    	for (i = 0; i < ncpus; i++) {
    		if (cpu_tasks[i].pid == pid)
    			return i;
    	}
    	return -1;
    }
    
    void free_stack(unsigned long stack, int order)
    {
    	free_pages(stack, order);
    }
    
    unsigned long alloc_stack(int order, int atomic)
    {
    	unsigned long page;
    	gfp_t flags = GFP_KERNEL;