blob: d048888c5d9aa8427fdee84ba324c7f662c7b6e9 [file] [log] [blame]
Chris Metcalf867e3592010-05-28 23:09:12 -04001/*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
Chris Metcalf867e3592010-05-28 23:09:12 -040014#ifndef _ASM_TILE_SETUP_H
15#define _ASM_TILE_SETUP_H
16
Chris Metcalf3b3c1b92010-08-15 12:14:41 -040017
Chris Metcalf867e3592010-05-28 23:09:12 -040018#include <linux/pfn.h>
19#include <linux/init.h>
David Howellsdf842f72012-10-09 09:47:47 +010020#include <uapi/asm/setup.h>
Chris Metcalf867e3592010-05-28 23:09:12 -040021
22/*
23 * Reserved space for vmalloc and iomap - defined in asm/page.h
24 */
25#define MAXMEM_PFN PFN_DOWN(MAXMEM)
26
Chris Metcalf867e3592010-05-28 23:09:12 -040027void early_panic(const char *fmt, ...);
28void warn_early_printk(void);
29void __init disable_early_printk(void);
30
David Howellsbd119c62012-03-28 18:30:03 +010031/* Init-time routine to do tile-specific per-cpu setup. */
32void setup_cpu(int boot);
33
34/* User-level DMA management functions */
35void grant_dma_mpls(void);
36void restrict_dma_mpls(void);
37
38#ifdef CONFIG_HARDWALL
39/* User-level network management functions */
40void reset_network_state(void);
David Howellsbd119c62012-03-28 18:30:03 +010041struct task_struct;
Chris Metcalfb8ace082012-03-30 16:01:48 -040042void hardwall_switch_tasks(struct task_struct *prev, struct task_struct *next);
43void hardwall_deactivate_all(struct task_struct *task);
44int hardwall_ipi_valid(int cpu);
David Howellsbd119c62012-03-28 18:30:03 +010045
46/* Hook hardwall code into changes in affinity. */
47#define arch_set_cpus_allowed(p, new_mask) do { \
Chris Metcalfb8ace082012-03-30 16:01:48 -040048 if (!cpumask_equal(&p->cpus_allowed, new_mask)) \
49 hardwall_deactivate_all(p); \
David Howellsbd119c62012-03-28 18:30:03 +010050} while (0)
51#endif
52
Chris Metcalf867e3592010-05-28 23:09:12 -040053#endif /* _ASM_TILE_SETUP_H */