mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-21 04:51:09 +09:00
Merge branch 'fixes' into next
Merge our fixes branch from the 4.16 cycle. There were a number of important fixes merged, in particular some Power9 workarounds that we want in next for testing purposes. There's also been some conflicting changes in the CPU features code which are best merged and tested before going upstream.
This commit is contained in:
@@ -135,6 +135,16 @@ static int run_test(void *addr, unsigned long size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int syscall_available(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
errno = 0;
|
||||
rc = syscall(__NR_subpage_prot, 0, 0, 0);
|
||||
|
||||
return rc == 0 || (errno != ENOENT && errno != ENOSYS);
|
||||
}
|
||||
|
||||
int test_anon(void)
|
||||
{
|
||||
unsigned long align;
|
||||
@@ -145,6 +155,8 @@ int test_anon(void)
|
||||
void *mallocblock;
|
||||
unsigned long mallocsize;
|
||||
|
||||
SKIP_IF(!syscall_available());
|
||||
|
||||
if (getpagesize() != 0x10000) {
|
||||
fprintf(stderr, "Kernel page size must be 64K!\n");
|
||||
return 1;
|
||||
@@ -180,6 +192,8 @@ int test_file(void)
|
||||
off_t filesize;
|
||||
int fd;
|
||||
|
||||
SKIP_IF(!syscall_available());
|
||||
|
||||
fd = open(file_name, O_RDWR);
|
||||
if (fd == -1) {
|
||||
perror("failed to open file");
|
||||
|
||||
@@ -16,7 +16,7 @@ $(OUTPUT)/tm-syscall: tm-syscall-asm.S
|
||||
$(OUTPUT)/tm-syscall: CFLAGS += -I../../../../../usr/include
|
||||
$(OUTPUT)/tm-tmspr: CFLAGS += -pthread
|
||||
$(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
|
||||
$(OUTPUT)/tm-resched-dscr: ../pmu/lib.o
|
||||
$(OUTPUT)/tm-resched-dscr: ../pmu/lib.c
|
||||
$(OUTPUT)/tm-unavailable: CFLAGS += -O0 -pthread -m64 -Wno-error=uninitialized -mvsx
|
||||
$(OUTPUT)/tm-trap: CFLAGS += -O0 -pthread -m64
|
||||
|
||||
|
||||
@@ -255,6 +255,8 @@ int tm_trap_test(void)
|
||||
|
||||
struct sigaction trap_sa;
|
||||
|
||||
SKIP_IF(!have_htm());
|
||||
|
||||
trap_sa.sa_flags = SA_SIGINFO;
|
||||
trap_sa.sa_sigaction = trap_signal_handler;
|
||||
sigaction(SIGTRAP, &trap_sa, NULL);
|
||||
|
||||
Reference in New Issue
Block a user