public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org
Subject: [PATCH] [ppc64] Set SMT thread priority to medium for all exceptions
Date: Thu, 5 Aug 2004 09:34:06 +1000	[thread overview]
Message-ID: <20040804233406.GC30253@krispykreme> (raw)


We need to set the thread priority to medium when entering all exceptions.
We may have been executing in low priority (eg the idle loop), but
definitely do not want to remain in that priority for the duration of
the exception (eg a device interrupt).

Signed-off-by: Anton Blanchard <anton@samba.org>

diff -puN arch/ppc64/kernel/head.S~add_r2_to_exceptions arch/ppc64/kernel/head.S
--- linux-2.6.8-rc2-mm2/arch/ppc64/kernel/head.S~add_r2_to_exceptions	2004-08-04 17:46:43.497877597 -0500
+++ linux-2.6.8-rc2-mm2-anton/arch/ppc64/kernel/head.S	2004-08-04 18:22:57.642084383 -0500
@@ -303,12 +303,14 @@ exception_marker:
 	. = n;						\
 	.globl label##_Pseries;				\
 label##_Pseries:					\
+	HMT_MEDIUM;					\
 	mtspr	SPRG1,r13;		/* save r13 */	\
 	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common)
 
 #define STD_EXCEPTION_ISERIES(n, label, area)		\
 	.globl label##_Iseries;				\
 label##_Iseries:					\
+	HMT_MEDIUM;					\
 	mtspr	SPRG1,r13;		/* save r13 */	\
 	EXCEPTION_PROLOG_ISERIES_1(area);		\
 	EXCEPTION_PROLOG_ISERIES_2;			\
@@ -317,6 +319,7 @@ label##_Iseries:					\
 #define MASKABLE_EXCEPTION_ISERIES(n, label)				\
 	.globl label##_Iseries;						\
 label##_Iseries:							\
+	HMT_MEDIUM;							\
 	mtspr	SPRG1,r13;		/* save r13 */			\
 	EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN);				\
 	lbz	r10,PACAPROFENABLED(r13);				\
@@ -410,12 +413,14 @@ __start_interrupts:
 
 	. = 0x200
 _MachineCheckPseries:
+	HMT_MEDIUM
 	mtspr	SPRG1,r13		/* save r13 */
 	EXCEPTION_PROLOG_PSERIES(PACA_EXMC, MachineCheck_common)
 
 	. = 0x300
 	.globl DataAccess_Pseries
 DataAccess_Pseries:
+	HMT_MEDIUM
 	mtspr	SPRG1,r13
 BEGIN_FTR_SECTION
 	mtspr	SPRG2,r12
@@ -434,6 +439,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
 	. = 0x380
 	.globl DataAccessSLB_Pseries
 DataAccessSLB_Pseries:
+	HMT_MEDIUM
 	mtspr	SPRG1,r13
 	mfspr	r13,SPRG3		/* get paca address into r13 */
 	std	r9,PACA_EXSLB+EX_R9(r13)	/* save r9 - r12 */
@@ -461,6 +467,7 @@ DataAccessSLB_Pseries:
 	. = 0x480
 	.globl InstructionAccessSLB_Pseries
 InstructionAccessSLB_Pseries:
+	HMT_MEDIUM
 	mtspr	SPRG1,r13
 	mfspr	r13,SPRG3		/* get paca address into r13 */
 	std	r9,PACA_EXSLB+EX_R9(r13)	/* save r9 - r12 */
@@ -494,6 +501,7 @@ InstructionAccessSLB_Pseries:
 	. = 0xc00
 	.globl	SystemCall_Pseries
 SystemCall_Pseries:
+	HMT_MEDIUM
 	mr	r9,r13
 	mfmsr	r10
 	mfspr	r13,SPRG3
@@ -747,10 +755,12 @@ fwnmi_data_area:
 	. = 0x8000
 	.globl SystemReset_FWNMI
 SystemReset_FWNMI:
+	HMT_MEDIUM
 	mtspr	SPRG1,r13		/* save r13 */
 	EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, SystemReset_common)
 	.globl MachineCheck_FWNMI
 MachineCheck_FWNMI:
+	HMT_MEDIUM
 	mtspr	SPRG1,r13		/* save r13 */
 	EXCEPTION_PROLOG_PSERIES(PACA_EXMC, MachineCheck_common)
 

_

                 reply	other threads:[~2004-08-04 23:37 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=20040804233406.GC30253@krispykreme \
    --to=anton@samba.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.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