1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

Ports: Format patches without numbering, commit hash or version number

This commit is contained in:
Tim Schumacher 2022-06-05 03:05:04 +02:00 committed by Linus Groh
parent d69a79b03b
commit d426c5a4b2
371 changed files with 806 additions and 1884 deletions

View file

@ -0,0 +1,27 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Tue, 21 Dec 2021 23:48:46 -0800
Subject: [PATCH] Disable rdtsc support for serenity
This patch disables the function which uses `rdtsc` to get the current
clock time, as that instruction isn't allowed to be called from user
space by serenity.
If you did attempt to call it you would trip a segfault.
---
arch/arch-x86.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arch-x86.h b/arch/arch-x86.h
index c6bcb54..c1005b1 100644
--- a/arch/arch-x86.h
+++ b/arch/arch-x86.h
@@ -35,6 +35,7 @@ static inline unsigned long long get_cpu_clock(void)
}
#define ARCH_HAVE_FFZ
-#define ARCH_HAVE_CPU_CLOCK
+// Serenity OS doesn't allow you to read rdtsc.
+// #define ARCH_HAVE_CPU_CLOCK
#endif