setup.h 1.6 KB

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