sclp.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * include/asm-s390/sclp.h
  3. *
  4. * Copyright IBM Corp. 2007
  5. * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
  6. */
  7. #ifndef _ASM_S390_SCLP_H
  8. #define _ASM_S390_SCLP_H
  9. #include <linux/types.h>
  10. #include <asm/chpid.h>
  11. #define SCLP_CHP_INFO_MASK_SIZE 32
  12. struct sclp_chp_info {
  13. u8 recognized[SCLP_CHP_INFO_MASK_SIZE];
  14. u8 standby[SCLP_CHP_INFO_MASK_SIZE];
  15. u8 configured[SCLP_CHP_INFO_MASK_SIZE];
  16. };
  17. #define LOADPARM_LEN 8
  18. struct sclp_ipl_info {
  19. int is_valid;
  20. int has_dump;
  21. char loadparm[LOADPARM_LEN];
  22. };
  23. struct sclp_cpu_entry {
  24. u8 address;
  25. u8 reserved0[13];
  26. u8 type;
  27. u8 reserved1;
  28. } __attribute__((packed));
  29. struct sclp_cpu_info {
  30. unsigned int configured;
  31. unsigned int standby;
  32. unsigned int combined;
  33. int has_cpu_type;
  34. struct sclp_cpu_entry cpu[255];
  35. };
  36. int sclp_get_cpu_info(struct sclp_cpu_info *info);
  37. int sclp_cpu_configure(u8 cpu);
  38. int sclp_cpu_deconfigure(u8 cpu);
  39. void sclp_facilities_detect(void);
  40. unsigned long long sclp_get_rnmax(void);
  41. unsigned long long sclp_get_rzm(void);
  42. int sclp_sdias_blk_count(void);
  43. int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
  44. int sclp_chp_configure(struct chp_id chpid);
  45. int sclp_chp_deconfigure(struct chp_id chpid);
  46. int sclp_chp_read_info(struct sclp_chp_info *info);
  47. void sclp_get_ipl_info(struct sclp_ipl_info *info);
  48. #endif /* _ASM_S390_SCLP_H */