All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] stubdom: fix x86_64 irq stack size
Date: Tue, 25 Mar 2008 17:06:41 +0000	[thread overview]
Message-ID: <20080325170641.GA6845@implementation.uk.xensource.com> (raw)

stubdom: fix x86_64 irq stack size
by making it use STACK_SIZE like other places.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

diff -r be3025f6af2e extras/mini-os/events.c
--- a/extras/mini-os/events.c	Mon Mar 24 18:24:03 2008 +0000
+++ b/extras/mini-os/events.c	Tue Mar 25 17:05:53 2008 +0000
@@ -118,9 +118,7 @@ evtchn_port_t bind_virq(uint32_t virq, e
 }
 
 #if defined(__x86_64__)
-/* Allocate 4 pages for the irqstack */
-#define STACK_PAGES 4
-char irqstack[1024 * 4 * STACK_PAGES];
+char irqstack[2 * STACK_SIZE];
 
 static struct pda
 {
@@ -139,9 +137,9 @@ void init_events(void)
     asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0));
     wrmsrl(0xc0000101, &cpu0_pda); /* 0xc0000101 is MSR_GS_BASE */
     cpu0_pda.irqcount = -1;
-    cpu0_pda.irqstackptr = irqstack + 1024 * 4 * STACK_PAGES;
+    cpu0_pda.irqstackptr = (void*) (((unsigned long)irqstack + 2 * STACK_SIZE) & ~(STACK_SIZE - 1));
 #endif
-    /* inintialise event handler */
+    /* initialize event handler */
     for ( i = 0; i < NR_EVS; i++ )
 	{
         ev_actions[i].handler = default_handler;

                 reply	other threads:[~2008-03-25 17:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080325170641.GA6845@implementation.uk.xensource.com \
    --to=samuel.thibault@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.