mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump: df_elf: move function documentation to function declarations
It's more common to have the function documentation next to the function declarations. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Acked-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
e24d8c936c
commit
8d7e8a87b5
@@ -9,9 +9,6 @@
|
|||||||
|
|
||||||
#include "df_elf.h"
|
#include "df_elf.h"
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize ELF header
|
|
||||||
*/
|
|
||||||
void *ehdr_init(Elf64_Ehdr *ehdr, Elf64_Half phnum)
|
void *ehdr_init(Elf64_Ehdr *ehdr, Elf64_Half phnum)
|
||||||
{
|
{
|
||||||
memcpy(ehdr->e_ident, ELFMAG, SELFMAG);
|
memcpy(ehdr->e_ident, ELFMAG, SELFMAG);
|
||||||
@@ -37,9 +34,6 @@ void *ehdr_init(Elf64_Ehdr *ehdr, Elf64_Half phnum)
|
|||||||
return ehdr + 1;
|
return ehdr + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize ELF note
|
|
||||||
*/
|
|
||||||
void *nt_init(void *buf, Elf64_Word type, const void *desc, int d_len,
|
void *nt_init(void *buf, Elf64_Word type, const void *desc, int d_len,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
@@ -61,9 +55,6 @@ void *nt_init(void *buf, Elf64_Word type, const void *desc, int d_len,
|
|||||||
return PTR_ADD(buf, len);
|
return PTR_ADD(buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize prstatus note
|
|
||||||
*/
|
|
||||||
void *nt_prstatus(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_prstatus(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
struct nt_prstatus_64 nt_prstatus;
|
struct nt_prstatus_64 nt_prstatus;
|
||||||
@@ -80,9 +71,6 @@ void *nt_prstatus(void *ptr, const struct dfi_cpu *cpu)
|
|||||||
NOTE_NAME_CORE);
|
NOTE_NAME_CORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize fpregset (floating point) note
|
|
||||||
*/
|
|
||||||
void *nt_fpregset(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_fpregset(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
struct nt_fpregset_64 nt_fpregset;
|
struct nt_fpregset_64 nt_fpregset;
|
||||||
@@ -95,72 +83,48 @@ void *nt_fpregset(void *ptr, const struct dfi_cpu *cpu)
|
|||||||
NOTE_NAME_CORE);
|
NOTE_NAME_CORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize timer note
|
|
||||||
*/
|
|
||||||
void *nt_s390_timer(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_s390_timer(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
return nt_init(ptr, NT_S390_TIMER, &cpu->timer, sizeof(cpu->timer),
|
return nt_init(ptr, NT_S390_TIMER, &cpu->timer, sizeof(cpu->timer),
|
||||||
NOTE_NAME_LINUX);
|
NOTE_NAME_LINUX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize TOD clock comparator note
|
|
||||||
*/
|
|
||||||
void *nt_s390_tod_cmp(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_s390_tod_cmp(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
return nt_init(ptr, NT_S390_TODCMP, &cpu->todcmp,
|
return nt_init(ptr, NT_S390_TODCMP, &cpu->todcmp,
|
||||||
sizeof(cpu->todcmp), NOTE_NAME_LINUX);
|
sizeof(cpu->todcmp), NOTE_NAME_LINUX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize TOD programmable register note
|
|
||||||
*/
|
|
||||||
void *nt_s390_tod_preg(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_s390_tod_preg(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
return nt_init(ptr, NT_S390_TODPREG, &cpu->todpreg,
|
return nt_init(ptr, NT_S390_TODPREG, &cpu->todpreg,
|
||||||
sizeof(cpu->todpreg), NOTE_NAME_LINUX);
|
sizeof(cpu->todpreg), NOTE_NAME_LINUX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize control register note
|
|
||||||
*/
|
|
||||||
void *nt_s390_ctrs(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_s390_ctrs(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
return nt_init(ptr, NT_S390_CTRS, &cpu->ctrs, sizeof(cpu->ctrs),
|
return nt_init(ptr, NT_S390_CTRS, &cpu->ctrs, sizeof(cpu->ctrs),
|
||||||
NOTE_NAME_LINUX);
|
NOTE_NAME_LINUX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize prefix register note
|
|
||||||
*/
|
|
||||||
void *nt_s390_prefix(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_s390_prefix(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
return nt_init(ptr, NT_S390_PREFIX, &cpu->prefix,
|
return nt_init(ptr, NT_S390_PREFIX, &cpu->prefix,
|
||||||
sizeof(cpu->prefix), NOTE_NAME_LINUX);
|
sizeof(cpu->prefix), NOTE_NAME_LINUX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize vxrs_low register note
|
|
||||||
*/
|
|
||||||
void *nt_s390_vxrs_low(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_s390_vxrs_low(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
return nt_init(ptr, NT_S390_VXRS_LOW, &cpu->vxrs_low,
|
return nt_init(ptr, NT_S390_VXRS_LOW, &cpu->vxrs_low,
|
||||||
sizeof(cpu->vxrs_low), NOTE_NAME_LINUX);
|
sizeof(cpu->vxrs_low), NOTE_NAME_LINUX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize vxrs_high register note
|
|
||||||
*/
|
|
||||||
void *nt_s390_vxrs_high(void *ptr, const struct dfi_cpu *cpu)
|
void *nt_s390_vxrs_high(void *ptr, const struct dfi_cpu *cpu)
|
||||||
{
|
{
|
||||||
return nt_init(ptr, NT_S390_VXRS_HIGH, &cpu->vxrs_high,
|
return nt_init(ptr, NT_S390_VXRS_HIGH, &cpu->vxrs_high,
|
||||||
sizeof(cpu->vxrs_high), NOTE_NAME_LINUX);
|
sizeof(cpu->vxrs_high), NOTE_NAME_LINUX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize prpsinfo note
|
|
||||||
*/
|
|
||||||
void *nt_prpsinfo(void *ptr)
|
void *nt_prpsinfo(void *ptr)
|
||||||
{
|
{
|
||||||
struct nt_prpsinfo_64 prpsinfo;
|
struct nt_prpsinfo_64 prpsinfo;
|
||||||
@@ -175,9 +139,6 @@ void *nt_prpsinfo(void *ptr)
|
|||||||
NOTE_NAME_CORE);
|
NOTE_NAME_CORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize vmcoreinfo note
|
|
||||||
*/
|
|
||||||
void *nt_vmcoreinfo(void *ptr, const char *vmcoreinfo)
|
void *nt_vmcoreinfo(void *ptr, const char *vmcoreinfo)
|
||||||
{
|
{
|
||||||
if (!vmcoreinfo)
|
if (!vmcoreinfo)
|
||||||
|
|||||||
@@ -122,20 +122,70 @@ static inline void df_elf_ensure_s390x(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize ELF header
|
||||||
|
*/
|
||||||
void *ehdr_init(Elf64_Ehdr *ehdr, Elf64_Half phnum);
|
void *ehdr_init(Elf64_Ehdr *ehdr, Elf64_Half phnum);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize ELF note
|
||||||
|
*/
|
||||||
void *nt_init(void *buf, Elf64_Word type, const void *desc, int d_len,
|
void *nt_init(void *buf, Elf64_Word type, const void *desc, int d_len,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize prstatus note
|
||||||
|
*/
|
||||||
void *nt_prstatus(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_prstatus(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize fpregset (floating point) note
|
||||||
|
*/
|
||||||
void *nt_fpregset(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_fpregset(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize timer note
|
||||||
|
*/
|
||||||
void *nt_s390_timer(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_s390_timer(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize TOD clock comparator note
|
||||||
|
*/
|
||||||
void *nt_s390_tod_cmp(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_s390_tod_cmp(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize TOD programmable register note
|
||||||
|
*/
|
||||||
void *nt_s390_tod_preg(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_s390_tod_preg(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize control register note
|
||||||
|
*/
|
||||||
void *nt_s390_ctrs(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_s390_ctrs(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize prefix register note
|
||||||
|
*/
|
||||||
void *nt_s390_prefix(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_s390_prefix(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize vxrs_low register note
|
||||||
|
*/
|
||||||
void *nt_s390_vxrs_low(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_s390_vxrs_low(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize vxrs_high register note
|
||||||
|
*/
|
||||||
void *nt_s390_vxrs_high(void *ptr, const struct dfi_cpu *cpu);
|
void *nt_s390_vxrs_high(void *ptr, const struct dfi_cpu *cpu);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize prpsinfo note
|
||||||
|
*/
|
||||||
void *nt_prpsinfo(void *ptr);
|
void *nt_prpsinfo(void *ptr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize vmcoreinfo note
|
||||||
|
*/
|
||||||
void *nt_vmcoreinfo(void *ptr, const char *vmcoreinfo);
|
void *nt_vmcoreinfo(void *ptr, const char *vmcoreinfo);
|
||||||
|
|
||||||
#endif /* DF_ELF_H */
|
#endif /* DF_ELF_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user