From: Catalin BOIE <util@deuroconsult.ro>
To: Jamie Lokier <jamie@shareable.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: idt change in a running kernel? what locking?
Date: Fri, 3 Oct 2003 09:52:58 +0300 (EEST) [thread overview]
Message-ID: <Pine.LNX.4.58.0310030945050.10930@hosting.rdsbv.ro> (raw)
In-Reply-To: <20031003063411.GF15691@mail.shareable.org>
On Fri, 3 Oct 2003, Jamie Lokier wrote:
> Catalin BOIE wrote:
> > What may happen if I modify idt on a running kernel?
> > It's lock_kernel enough?
>
> lock_kernel won't help at all. It doesn't disable interrupts.
>
> It's more likely, you want to use get_cpu()/put_cpu() to prevent the
> current kernel thread from being pre-empted to a different CPU.
get_cpu locks the thread on a CPU until put_cpu?
> > Of course that the new location contain a valid idt table.
>
> If the new table has the same entries as the old one for all
> interrupts which are enabled it should be fine. "lidt" is an atomic
> operation with respect to interrupts.
Great.
> If you are intending to change idt on all CPUs, you'll need something
> more complicated.
Hm. I realized that on a SMP it's a little hard to do it.
How can I change that on all cpus?
There is something to use that i can force my code to run on a specific
cpu?
>
> -- Jamie
Thank you very much, Jamie!
---
Catalin(ux) BOIE
catab@deuroconsult.ro
next prev parent reply other threads:[~2003-10-03 6:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-03 5:52 Catalin BOIE
2003-10-03 6:34 ` Jamie Lokier
2003-10-03 6:52 ` Catalin BOIE [this message]
2003-10-03 17:02 ` Jamie Lokier
2003-10-06 5:12 ` Catalin BOIE
2003-10-06 17:07 ` Jamie Lokier
2003-10-07 4:35 ` Catalin BOIE
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=Pine.LNX.4.58.0310030945050.10930@hosting.rdsbv.ro \
--to=util@deuroconsult.ro \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®