From: Ryan Bradetich <rbradetich@uswest.net>
To: parisc-linux@parisc-linux.org
Subject: [parisc-linux] Patch for PA 2.0, 32-bit kernels on systems with > 2GB RAM
Date: 27 Mar 2002 17:39:28 -0700 [thread overview]
Message-ID: <1017275968.24441.54.camel@beavis> (raw)
[-- Attachment #1: Type: text/plain, Size: 693 bytes --]
Hello parisc-linux hackers,
The 2.4.18-pa6 patch broke 32-bit kernel on PA 2.0 systems if the system
has > 2GB RAM. This patch fixes the problem for my C200+ with > 2GB
RAM, and continues to boots with < 2GB RAM.
The basic problem was that the kernel was performing simple sign
extension instead of F-Extension.
I plan on committing this patch into CVS in a couple of days unless it
causes problems on someones configuration. Please test and let me
know if you encounter problems.
Thanks,
- Ryan
P.S. Thanks to Thomas Bogendoerfer for helping to identify the cause,
and to LaMont Jones for providing the assembly instructions to fix the
problem without using a branch instruction :)
[-- Attachment #2: entry.S.diff --]
[-- Type: text/x-patch, Size: 2553 bytes --]
Index: arch/parisc/kernel/entry.S
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/entry.S,v
retrieving revision 1.91
diff -u -p -r1.91 entry.S
--- arch/parisc/kernel/entry.S 2002/03/20 05:08:58 1.91
+++ arch/parisc/kernel/entry.S 2002/03/27 04:28:11
@@ -1352,12 +1352,10 @@ dtlb_miss_20:
/* Get rid of prot bits and convert to page addr for idtlbt */
- /* FIXME - sign extension of 0xf0... range is incorrect!
- ** extrd,s below needs to "f-extend" to "0xf0f0f0...".
- ** 4 instances of this to fix.
- */
-
+ extrd,s pte,35,4,t0
depdi 0,63,12,pte /* clear lower 12 bits */
+ addi,= 1,t0,0
+ extrd,u,*tr pte,56,25,pte
extrd,s pte,56,25,pte /* bit 31:8 >> 8 */
idtlbt pte,prot
@@ -1424,9 +1422,12 @@ nadtlb_miss_20:
/* Get rid of prot bits and convert to page addr for idtlbt */
- depdi 0,63,12,pte /* clear lower 12 bits */
- extrd,s pte,56,25,pte /* bit 31:8 >> 8 */
- idtlbt pte,prot
+ extrd,s pte,35,4,t0
+ depdi 0,63,12,pte /* clear lower 12 bits */
+ addi,= 1,t0,0
+ extrd,u,*tr pte,56,25,pte
+ extrd,s pte,56,25,pte /* bit 31:8 >> 8 */
+ idtlbt pte,prot
rfir
nop
@@ -1674,8 +1675,11 @@ itlb_miss_common_20:
/* Get rid of prot bits and convert to page addr for iitlbt */
- depdi 0,63,12,pte /* clear lower 12 bits */
- extrd,s pte,56,25,pte /* bit 31:8 >> 8 */
+ extrd,s pte,35,4,t0
+ depdi 0,63,12,pte /* clear lower 12 bits */
+ addi,= 1,t0,0
+ extrd,u,*tr pte,56,25,pte
+ extrd,s pte,56,25,pte /* bit 31:8 >> 8 */
iitlbt pte,prot
rfir
@@ -1889,11 +1893,13 @@ dbit_nolock_20:
extrd,u,*= pte,_PAGE_GATEWAY_BIT+32,1,r0
depdi 0,11,2,prot /* If Gateway, Set PL2 to 0 */
- /* Get rid of prot bits and convert to page addr for idtlbt */
+ extrd,s pte,35,4,t0
+ depdi 0,63,12,pte /* clear lower 12 bits */
+ addi,= 1,t0,0
+ extrd,u,*tr pte,56,25,pte
+ extrd,s pte,56,25,pte /* bit 31:8 >> 8 */
+ idtlbt pte,prot
- depdi 0,63,12,pte /* clear lower 12 bits */
- extrd,s pte,56,25,pte /* bit 31:8 >> 8 */
- idtlbt pte,prot
#ifdef CONFIG_SMP
CMPIB=,n 0,spc,dbit_nounlock_20
ldi 1,t1
reply other threads:[~2002-03-28 0:39 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=1017275968.24441.54.camel@beavis \
--to=rbradetich@uswest.net \
--cc=parisc-linux@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox