File: git-intr

package info (click to toggle)
gnumach 2%3A1.8%2Bgit20221224-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,216 kB
  • sloc: ansic: 292,146; sh: 4,704; asm: 4,573; makefile: 401; awk: 45
file content (118 lines) | stat: -rw-r--r-- 3,531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
commit bdd790bd8397c4b4dd67fe353378e607ec9ae620
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Dec 24 20:08:53 2022 +0100

    intr: Drop irq parameter
    
    This is not actually used.

diff --git a/i386/i386/hardclock.c b/i386/i386/hardclock.c
index 57259ff3..9b9df5a9 100644
--- a/i386/i386/hardclock.c
+++ b/i386/i386/hardclock.c
@@ -48,7 +48,6 @@ extern char	return_to_iret[];
 void
 hardclock(int iunit, /* 'unit' number */
           int old_ipl, /* old interrupt level */
-          int irq,  /* irq number */
           const char *ret_addr, /* return address in interrupt handler */
           struct i386_interrupt_state *regs /* saved registers */
           )
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index 922e3d87..f50aca5d 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -795,9 +795,8 @@ ast_from_interrupt:
  * #ifndef MACH_XEN
  *		1st parameter iunit
  *		2nd parameter saved SPL
- *		3rd parameter irq
- *		4th parameter return address
- *		5th parameter registers
+ *		3th parameter return address
+ *		4th parameter registers
  *		saved SPL
  *		saved IRQ
  * #endif
@@ -838,7 +837,7 @@ ast_from_interrupt:
 #ifdef	MACH_XEN
 #define	RET_OFFSET	8
 #else	/* MACH_XEN */
-#define	RET_OFFSET	36
+#define	RET_OFFSET	32
 #endif	/* MACH_XEN */
 
 ENTRY(kdb_kintr)
diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S
index 167e02c8..16e0df10 100644
--- a/i386/i386at/interrupt.S
+++ b/i386/i386at/interrupt.S
@@ -33,17 +33,17 @@
  * Note: kdb_kintr needs to know our stack usage
  */
 
-#define S_REGS 32(%esp)
-#define S_RET 28(%esp)
-#define S_IRQ 24(%esp)
-#define S_IPL 20(%esp)
+#define S_REGS 28(%esp)
+#define S_RET 24(%esp)
+#define S_IRQ 20(%esp)
+#define S_IPL 16(%esp)
 
 ENTRY(interrupt)
 #ifdef APIC
 	cmpl	$255,%eax		/* was this a spurious intr? */
 	je	_no_eoi			/* if so, just return */
 #endif
-	subl	$28,%esp		/* Two local variables + 5 parameters */
+	subl	$24,%esp		/* Two local variables + 4 parameters */
 	movl	%eax,S_IRQ		/* save irq number */
 	call	spl7			/* set ipl */
 	movl	%eax,S_IPL		/* save previous ipl */
@@ -51,14 +51,11 @@ ENTRY(interrupt)
 	movl	S_IPL,%eax
 	movl	%eax,4(%esp)		/* previous ipl as 2nd arg */
 
-	movl	S_IRQ,%eax
-	movl	%eax,8(%esp)		/* irq number as 3rd arg */
-
 	movl	S_RET,%eax
-	movl	%eax,12(%esp)		/* return address as 4th arg */
+	movl	%eax,8(%esp)		/* return address as 3rd arg */
 
 	movl	S_REGS,%eax
-	movl	%eax,16(%esp)		/* address of interrupted registers as 5th arg */
+	movl	%eax,12(%esp)		/* address of interrupted registers as 4th arg */
 
 	movl	S_IRQ,%eax		/* copy irq number */
 	shll	$2,%eax			/* irq * 4 */
@@ -117,7 +114,7 @@ _isa_eoi:
 	movl	%ecx,(%esp)		/* load irq number as 1st arg */
 	call	EXT(ioapic_irq_eoi)	/* ioapic irq specific EOI */
 #endif
-	addl	$28,%esp		/* pop local variables */
+	addl	$24,%esp		/* pop local variables */
 _no_eoi:
 	ret
 END(interrupt)
diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index 110a429c..fe2b3858 100644
--- a/x86_64/interrupt.S
+++ b/x86_64/interrupt.S
@@ -52,13 +52,10 @@ ENTRY(interrupt)
 	movq	S_IPL,S_ARG1		/* previous ipl as 2nd arg */
 
 	;
-	movq	S_IRQ,S_ARG2		/* irq number as 3rd arg */
+	movq	S_RET,S_ARG2		/* return address as 3th arg */
 
 	;
-	movq	S_RET,S_ARG3		/* return address as 4th arg */
-
-	;
-	movq	S_REGS,S_ARG4		/* address of interrupted registers as 5th arg */
+	movq	S_REGS,S_ARG3		/* address of interrupted registers as 4th arg */
 
 	movl	S_IRQ,%eax		/* copy irq number */
 	shll	$2,%eax			/* irq * 4 */