From owner-p4-projects@FreeBSD.ORG Mon Apr 7 20:21:51 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 79DA737B404; Mon, 7 Apr 2003 20:21:50 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19BFC37B401 for ; Mon, 7 Apr 2003 20:21:50 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C14F43FCB for ; Mon, 7 Apr 2003 20:21:49 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h383Ln0U073900 for ; Mon, 7 Apr 2003 20:21:49 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h383Lnep073897 for perforce@freebsd.org; Mon, 7 Apr 2003 20:21:49 -0700 (PDT) Date: Mon, 7 Apr 2003 20:21:49 -0700 (PDT) Message-Id: <200304080321.h383Lnep073897@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 28481 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2003 03:21:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=28481 Change 28481 by peter@peter_daintree on 2003/04/07 20:21:17 Ugh. Now it gets ugly. Anyway, this has a better chance of not blowing up. Do not mess with %fs because we use the MSR version. Affected files ... .. //depot/projects/hammer/sys/x86_64/isa/icu_vector.s#6 edit .. //depot/projects/hammer/sys/x86_64/x86_64/exception.s#14 edit Differences ... ==== //depot/projects/hammer/sys/x86_64/isa/icu_vector.s#6 (text+ko) ==== @@ -49,15 +49,14 @@ mov %ax,%ds ; \ mov %ax,%es ; \ #XXX mov $KPSEL,%ax ; \ - mov %ax,%fs ; \ +#XXX mov %ax,%fs ; \ FAKE_MCOUNT((12+ACTUALLY_PUSHED)*4(%rsp)) ; \ call critical_enter ; \ movq PCPU(CURTHREAD),%rbx ; \ incl TD_INTR_NESTING_LEVEL(%rbx) ; \ - pushq intr_unit + (irq_num) * 4 ; \ + movq intr_unit + (irq_num) * 4, %rdi ; \ call *intr_handler + (irq_num) * 4 ; /* do the work ASAP */ \ enable_icus ; /* (re)enable ASAP (helps edge trigger?) */ \ - addq $8,%rsp ; \ incl cnt+V_INTR ; /* book-keeping can wait */ \ movq intr_countp + (irq_num) * 4,%rax ; \ incq (%rax) ; \ @@ -104,7 +103,7 @@ mov %ax,%ds ; \ mov %ax,%es ; \ #XXX mov $KPSEL,%ax ; \ - mov %ax,%fs ; \ +#XXX mov %ax,%fs ; \ maybe_extra_ipending ; \ movb imen + IRQ_BYTE(irq_num),%al ; \ orb $IRQ_BIT(irq_num),%al ; \ @@ -114,9 +113,8 @@ movq PCPU(CURTHREAD),%rbx ; \ incl TD_INTR_NESTING_LEVEL(%ebx) ; \ FAKE_MCOUNT(13*4(%rsp)) ; /* XXX late to avoid double count */ \ - pushq $irq_num; /* pass the IRQ */ \ + movq $irq_num, %rdi; /* pass the IRQ */ \ call sched_ithd ; \ - addq $8, %rsp ; /* discard the parameter */ \ decl TD_INTR_NESTING_LEVEL(%rbx) ; \ MEXITCOUNT ; \ /* We could usually avoid the following jmp by inlining some of */ \ ==== //depot/projects/hammer/sys/x86_64/x86_64/exception.s#14 (text+ko) ==== @@ -267,9 +267,8 @@ testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax) je doreti_exit sti - pushq %rsp /* pass a pointer to the trapframe */ + movq %rsp, %rdi /* pass a pointer to the trapframe */ call ast - addq $8,%rsp jmp doreti_ast /* @@ -284,7 +283,8 @@ .globl doreti_popl_fs doreti_popl_fs: - popq %fs +# popq %fs + addq $8, %rsp .globl doreti_popl_es doreti_popl_es: popq %es