Skip to content

Commit 717bafb

Browse files
committed
standalone_systests: guard hsv39.h definitions on v81+ toolchain
The Hexagon toolchain's tlb.h provides TLBEntry64, HSV39_PageSize, hsv39_make_tlb_entry(), and hsv39_write_tlb_entry() when __HEXAGON_ARCH__ is greater than 80. Building hsv39_tlb with -mv81 therefore collides with the local fallback definitions in hsv39.h. Guard the local definitions with #if __HEXAGON_ARCH__ <= 80 so older builds keep using the fallback while v81 and later use the toolchain versions. Signed-off-by: Marco Liebel <marco.liebel@oss.qualcomm.com>
1 parent 15a2e56 commit 717bafb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

standalone_systests/include/hsv39.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ static inline uint64_t pow4(uint64_t n)
1919
return 1ull << (n * 2);
2020
}
2121

22+
/* The toolchain's tlb.h provides these definitions for v81 and later. */
23+
#if __HEXAGON_ARCH__ <= 80
24+
2225
/* HSV39 page size enumeration - powers of 4 encoding */
2326
typedef enum {
2427
HSV39_PAGE_1M = 0x01,
@@ -77,6 +80,8 @@ static inline void hsv39_write_tlb_entry(uint64_t entry_raw, int index)
7780
tlbw(entry_raw, index);
7881
}
7982

83+
#endif /* __HEXAGON_ARCH__ <= 80 */
84+
8085
static inline void remove_hsv39_trans(int index)
8186
{
8287
TLBEntry64 entry;

0 commit comments

Comments
 (0)