Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linux-user/elfload: Expose get_elf_hwcap() on s390x
It is required for implementing /proc/cpuinfo emulation.

Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230605113950.1169228-3-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
iii-i authored and huth committed Jun 5, 2023
1 parent 71b11cb commit e1b819c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion linux-user/elfload.c
Expand Up @@ -1583,7 +1583,7 @@ static inline void init_thread(struct target_pt_regs *regs,
#define GET_FEATURE(_feat, _hwcap) \
do { if (s390_has_feat(_feat)) { hwcap |= _hwcap; } } while (0)

static uint32_t get_elf_hwcap(void)
uint32_t get_elf_hwcap(void)
{
/*
* Let's assume we always have esan3 and zarch.
Expand Down
4 changes: 4 additions & 0 deletions linux-user/loader.h
Expand Up @@ -56,4 +56,8 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,

extern unsigned long guest_stack_size;

#ifdef TARGET_S390X
uint32_t get_elf_hwcap(void);
#endif

#endif /* LINUX_USER_LOADER_H */

0 comments on commit e1b819c

Please sign in to comment.