Module Name: src
Committed By: knakahara
Date: Thu Sep 8 06:57:44 UTC 2022
Modified Files:
src/sys/arch/i386/i386: lock_stubs.S spl.S
Log Message:
Fix PR port-i386/57000 (boot failure on qemu).
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/i386/i386/lock_stubs.S
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/i386/i386/spl.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/i386/lock_stubs.S
diff -u src/sys/arch/i386/i386/lock_stubs.S:1.37 src/sys/arch/i386/i386/lock_stubs.S:1.38
--- src/sys/arch/i386/i386/lock_stubs.S:1.37 Wed Sep 7 00:40:18 2022
+++ src/sys/arch/i386/i386/lock_stubs.S Thu Sep 8 06:57:44 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: lock_stubs.S,v 1.37 2022/09/07 00:40:18 knakahara Exp $ */
+/* $NetBSD: lock_stubs.S,v 1.38 2022/09/08 06:57:44 knakahara Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: lock_stubs.S,v 1.37 2022/09/07 00:40:18 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lock_stubs.S,v 1.38 2022/09/08 06:57:44 knakahara Exp $");
#include "opt_lockdebug.h"
@@ -255,10 +255,10 @@ END(mutex_spin_enter)
#ifndef XENPV
/*
- * Release a spin mutex and post a store fence. Must occupy 96 bytes.
+ * Release a spin mutex and post a store fence. Must occupy 128 bytes.
*/
ENTRY(mutex_spin_exit)
- HOTPATCH(HP_NAME_MUTEX_EXIT, 96)
+ HOTPATCH(HP_NAME_MUTEX_EXIT, 128)
movl 4(%esp), %edx
movl CPUVAR(MTX_OLDSPL), %ecx
incl CPUVAR(MTX_COUNT)
@@ -284,7 +284,7 @@ STRONG_ALIAS(mutex_spin_exit, i686_mutex
/*
* Patch for i686 CPUs where cli/sti is prohibitively expensive.
- * Must be the same size as mutex_spin_exit(), that is, 96 bytes.
+ * Must be the same size as mutex_spin_exit(), that is, 128 bytes.
*/
ENTRY(i686_mutex_spin_exit)
mov 4(%esp),%edx
Index: src/sys/arch/i386/i386/spl.S
diff -u src/sys/arch/i386/i386/spl.S:1.56 src/sys/arch/i386/i386/spl.S:1.57
--- src/sys/arch/i386/i386/spl.S:1.56 Wed Sep 7 00:40:18 2022
+++ src/sys/arch/i386/i386/spl.S Thu Sep 8 06:57:44 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: spl.S,v 1.56 2022/09/07 00:40:18 knakahara Exp $ */
+/* $NetBSD: spl.S,v 1.57 2022/09/08 06:57:44 knakahara Exp $ */
/*
* Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.56 2022/09/07 00:40:18 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spl.S,v 1.57 2022/09/08 06:57:44 knakahara Exp $");
#include "opt_ddb.h"
#include "opt_spldebug.h"
@@ -72,11 +72,11 @@ END(splraise)
* void spllower(int s);
*
* spllower() for i486 and Pentium. Must be the same size as cx8_spllower(),
- * that is, 64 bytes. This must use pushf/cli/popf as it is used early in boot
+ * that is, 96 bytes. This must use pushf/cli/popf as it is used early in boot
* where interrupts are disabled via eflags/IE.
*/
ENTRY(spllower)
- HOTPATCH(HP_NAME_SPLLOWER, 64)
+ HOTPATCH(HP_NAME_SPLLOWER, 96)
#ifdef SPLDEBUG
movl 4(%esp),%ecx
pushl %ebp
@@ -115,7 +115,7 @@ STRONG_ALIAS(spllower, cx8_spllower)
*
* spllower() optimized for Pentium Pro and later, which have long pipelines
* that will be stalled by pushf/cli/popf. Must be the same size as
- * spllower(), ie 64 bytes. Does not need to restore eflags/IE as is patched
+ * spllower(), ie 96 bytes. Does not need to restore eflags/IE as is patched
* in once autoconf is underway.
*
* For cmpxchg8b, edx/ecx are the high words and eax/ebx the low.