All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] If you feel bored, test these 2.5 changes...
Date: Thu, 7 Nov 2002 00:42:04 -0500	[thread overview]
Message-ID: <20021107054204.GA4465@systemhalted> (raw)

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]


pa's,

If you feel good and bored, or willing to test something,
the following cvs diff needs atleast a round of tests in 
2.5 before I commit. Right now I'm *uber* busy with glibc,
and tausq hid my kernel tree ;)

- Added the last enumerations to the cpu list.
	= These are probably incorrect.

- Forward port of trap handler changes.
	= Virtually identical to 2.4 code which 
	= has been running for almost 5 months without
	= problems.

- Added a code comment about non-returning functions.
	= Purely cosmetic...

Apply, test and get back to the list? :)

c.


[-- Attachment #2: traps-fault-2.5.changes --]
[-- Type: text/plain, Size: 4457 bytes --]

Index: arch/parisc/kernel/setup.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/setup.c,v
retrieving revision 1.9
diff -u -p -r1.9 setup.c
--- arch/parisc/kernel/setup.c	5 Nov 2002 22:16:49 -0000	1.9
+++ arch/parisc/kernel/setup.c	7 Nov 2002 05:31:26 -0000
@@ -212,6 +212,11 @@ static void parisc_proc_mkdir(void)
                         proc_runway_root = proc_mkdir("bus/runway", 0);
                 }
                 break;
+	case pcx:
+	case pcxs:
+	case pcxt:
+		/* Are not assured to have any of the above busses */
+		break;
 	}
 }
 
Index: arch/parisc/kernel/traps.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/traps.c,v
retrieving revision 1.16
diff -u -p -r1.16 traps.c
--- arch/parisc/kernel/traps.c	2 Nov 2002 03:00:29 -0000	1.16
+++ arch/parisc/kernel/traps.c	7 Nov 2002 05:31:26 -0000
@@ -434,9 +434,17 @@ void parisc_terminate(char *msg, struct 
 	if (!console_drivers)
 		pdc_console_restart();
 
-	if (code == 1)
-	    transfer_pim_to_trap_frame(regs);
+        /* Not all switch paths will gutter the processor... */
+        switch(code){
+
+        case 1:
+                transfer_pim_to_trap_frame(regs);
+                break;
 
+	default:
+		/* Fall through */
+	}
+		
 	show_stack((unsigned long *)regs->gr[30]);
 
 	printk("\n");
@@ -451,6 +459,7 @@ void parisc_terminate(char *msg, struct 
 	 * system will shut down immediately right here. */
 	pdc_soft_power_button(0);
 	
+	/* Gutter the processor */
 	for(;;)
 	    ;
 }
@@ -547,6 +556,7 @@ void handle_interruption(int code, struc
 
 		die_if_kernel("Privileged register usage", regs, code);
 		si.si_code = ILL_PRVREG;
+		/* Fall Through */		
 	give_sigill:
 		si.si_signo = SIGILL;
 		si.si_errno = 0;
@@ -561,21 +571,42 @@ void handle_interruption(int code, struc
 		si.si_addr = (void *) regs->iaoq[0];
 		force_sig_info(SIGFPE, &si, current);
 		return;
-
+		
+        case 13:
+		/* Conditional Trap:
+		   Thee condition succees in an instruction which traps on condition  */
+		si.si_signo = SIGFPE;
+		/* Set to zero, and let the userspace app figure it out from
+		   the insn pointed to by si_addr */
+		si.si_code = 0;
+		si.si_addr = (void *) regs->iaoq[0];
+		force_sig_info(SIGFPE, &si, current);
+		return;
+												
 	case 14:
 		/* Assist Exception Trap, i.e. floating point exception. */
 		die_if_kernel("Floating point exception", regs, 0); /* quiet */
 		handle_fpe(regs);
 		return;
 
-	case 17:
+	case 15:
+		/* Data TLB miss fault/Data page fault */
+		/* Fall thru */
+	case 16:
+		/* Non-access instruction TLB miss fault */
+		/* The instruction TLB entry needed for the target address of the FIC
+		   is absent, and hardware can't find it, so we get to cleanup */
+		/* Fall thru */			
+        case 17:
 		/* Non-access data TLB miss fault/Non-access data page fault */
 		/* TODO: Still need to add slow path emulation code here */
-		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
+		/* TODO: Understand what is meant by the TODO listed
+		   above this one. (Carlos) */
 		
 		fault_address = regs->ior;
-		parisc_terminate("Non access data tlb fault!",regs,code,fault_address);
-
+		fault_space = regs->isr;
+		break;
+								
 	case 18:
 		/* PCXS only -- later cpu's split this into types 26,27 & 28 */
 		/* Check for unaligned access */
@@ -585,7 +616,6 @@ void handle_interruption(int code, struc
 		}
 		/* Fall Through */
 
-	case 15: /* Data TLB miss fault/Data page fault */
 	case 26: /* PCXL: Data memory access rights trap */
 		fault_address = regs->ior;
 		fault_space   = regs->isr;
@@ -710,7 +740,7 @@ void handle_interruption(int code, struc
 	    {
 		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
 		parisc_terminate("Kernel Fault", regs, code, fault_address);
-	
+		/* NOT REACHED */	
 	    }
 	}
 
Index: arch/parisc/mm/fault.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/mm/fault.c,v
retrieving revision 1.3
diff -u -p -r1.3 fault.c
--- arch/parisc/mm/fault.c	20 Jul 2002 16:27:06 -0000	1.3
+++ arch/parisc/mm/fault.c	7 Nov 2002 05:31:26 -0000
@@ -257,7 +257,8 @@ no_context:
 	}
 
 	parisc_terminate("Bad Address (null pointer deref?)", regs, code, address);
-
+	/* NOT REACHED */
+	
   out_of_memory:
 	up_read(&mm->mmap_sem);
 	printk(KERN_CRIT "VM: killing process %s\n", current->comm);

             reply	other threads:[~2002-11-07  5:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-07  5:42 Carlos O'Donell [this message]
2002-11-07 13:37 ` [parisc-linux] If you feel bored, test these 2.5 changes jsoe0708
2002-11-07 13:52   ` [parisc-linux] [Trap 26 -> EXT3?][If you feel bored, test these 2.5 changes...] Carlos O'Donell
2002-11-07 15:39     ` jsoe0708
2002-11-08 12:12       ` Andrew Shugg
2002-11-08 15:57         ` jsoe0708

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=20021107054204.GA4465@systemhalted \
    --to=carlos@baldric.uwo.ca \
    --cc=parisc-linux@lists.parisc-linux.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 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.