setup.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #ifndef _ASM_TILE_SETUP_H
  15. #define _ASM_TILE_SETUP_H
  16. #include <linux/pfn.h>
  17. #include <linux/init.h>
  18. #include <uapi/asm/setup.h>
  19. /*
  20. * Reserved space for vmalloc and iomap - defined in asm/page.h
  21. */
  22. #define MAXMEM_PFN PFN_DOWN(MAXMEM)
  23. int tile_console_write(const char *buf, int count);
  24. void early_panic(const char *fmt, ...);
  25. /* Init-time routine to do tile-specific per-cpu setup. */
  26. void setup_cpu(int boot);
  27. /* User-level DMA management functions */
  28. void grant_dma_mpls(void);
  29. void restrict_dma_mpls(void);
  30. #ifdef CONFIG_HARDWALL
  31. /* User-level network management functions */
  32. void reset_network_state(void);
  33. struct task_struct;
  34. void hardwall_switch_tasks(struct task_struct *prev, struct task_struct *next);
  35. void hardwall_deactivate_all(struct task_struct *task);
  36. int hardwall_ipi_valid(int cpu);
  37. /* Hook hardwall code into changes in affinity. */
  38. #define arch_set_cpus_allowed(p, new_mask) do { \
  39. if (!cpumask_equal(&p->cpus_allowed, new_mask)) \
  40. hardwall_deactivate_all(p); \
  41. } while (0)
  42. #endif
  43. #endif /* _ASM_TILE_SETUP_H */