Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 14 | |
| 15 | #ifndef _ASM_TILE_SETUP_H |
| 16 | #define _ASM_TILE_SETUP_H |
| 17 | |
Chris Metcalf | 3b3c1b9 | 2010-08-15 12:14:41 -0400 | [diff] [blame] | 18 | #define COMMAND_LINE_SIZE 2048 |
| 19 | |
| 20 | #ifdef __KERNEL__ |
| 21 | |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 22 | #include <linux/pfn.h> |
| 23 | #include <linux/init.h> |
| 24 | |
| 25 | /* |
| 26 | * Reserved space for vmalloc and iomap - defined in asm/page.h |
| 27 | */ |
| 28 | #define MAXMEM_PFN PFN_DOWN(MAXMEM) |
| 29 | |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 30 | void early_panic(const char *fmt, ...); |
| 31 | void warn_early_printk(void); |
| 32 | void __init disable_early_printk(void); |
| 33 | |
David Howells | bd119c6 | 2012-03-28 18:30:03 +0100 | [diff] [blame] | 34 | /* Init-time routine to do tile-specific per-cpu setup. */ |
| 35 | void setup_cpu(int boot); |
| 36 | |
| 37 | /* User-level DMA management functions */ |
| 38 | void grant_dma_mpls(void); |
| 39 | void restrict_dma_mpls(void); |
| 40 | |
| 41 | #ifdef CONFIG_HARDWALL |
| 42 | /* User-level network management functions */ |
| 43 | void reset_network_state(void); |
David Howells | bd119c6 | 2012-03-28 18:30:03 +0100 | [diff] [blame] | 44 | struct task_struct; |
Chris Metcalf | b8ace08 | 2012-03-30 16:01:48 -0400 | [diff] [blame] | 45 | void hardwall_switch_tasks(struct task_struct *prev, struct task_struct *next); |
| 46 | void hardwall_deactivate_all(struct task_struct *task); |
| 47 | int hardwall_ipi_valid(int cpu); |
David Howells | bd119c6 | 2012-03-28 18:30:03 +0100 | [diff] [blame] | 48 | |
| 49 | /* Hook hardwall code into changes in affinity. */ |
| 50 | #define arch_set_cpus_allowed(p, new_mask) do { \ |
Chris Metcalf | b8ace08 | 2012-03-30 16:01:48 -0400 | [diff] [blame] | 51 | if (!cpumask_equal(&p->cpus_allowed, new_mask)) \ |
| 52 | hardwall_deactivate_all(p); \ |
David Howells | bd119c6 | 2012-03-28 18:30:03 +0100 | [diff] [blame] | 53 | } while (0) |
| 54 | #endif |
| 55 | |
Chris Metcalf | 3b3c1b9 | 2010-08-15 12:14:41 -0400 | [diff] [blame] | 56 | #endif /* __KERNEL__ */ |
| 57 | |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 58 | #endif /* _ASM_TILE_SETUP_H */ |