[Top] [All Lists]

Re: Réf. : does the linux kernel use k0, k1 regs?

To: Florian DELIZY <>
Subject: Re: Réf. : does the linux kernel use k0, k1 regs?
From: zhuzhenhua <>
Date: Mon, 16 Jan 2006 20:01:49 +0800
Cc: linux-mips <>
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta;; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=n6MjQek7XczpBZ47AxDHBbcftZ7cfba97ejI4Q+JRXnl/TeC1eesE0V6dTlK8bMdMKSL8SCRXUdHuKUBI3H5mVIbBaozfEA0UK0tDPfwu7bcZB7kBJdirFY8/lFflO30Wa8CTYjwcfO5KLav5ACdgLz0Kvhw47pn1FLmPw7Ldi8=
In-reply-to: <>
Original-recipient: rfc822;
References: <>
thanks for all
now in my NMI interrupt, i first move k0 value to Desave, then use k0 to handle, and then eret.
it can work.

On 1/16/06, Florian DELIZY <> wrote:

k0, k1 registers are used in SAVE_ALL and RESTORE_ALL macros mainly, to save all registers on the kernel stack,
once all registered are properly saved, you can use them, and restore them after, that's why kernel interrupt code does not
uise k0,k1, and let them for critical interruption code (save/restore context)

Have a look in include/asm-mips/stackframe.h (grep is your friend)

-- Florian Delizy

zhuzhenhua <>

Envoyé par :

13/01/2006 03:39
Remis le : 15/01/2006 19:29

        Pour :        linux-mips <>
        cc :        (ccc : Florian DELIZY/EXT/SAGEM)
        Objet :        does the linux kernel use k0, k1 regs?

i have to handle a NMI interrupt in bootloader(0xBFC00000),
and i want to return to linux after the NMI interrupt,  i think other
regs maybe be useing by linux-kernel, i think the NMI handle only can
use K0, K1.

and i do not find the use of K0, K1 in linux-kernel interrupt or
exception handle
so i think if the NMI interrupt a linux interrupt handle, there is
still no conflict.

i am not sure my thinking is right, anyone can give some hints?

Best regards


<Prev in Thread] Current Thread [Next in Thread>