Skip to contentSkip to conversation

fix TLB handling for 8xx on linuxppc-2.5

PATCH Pantelis Antoniou 1 participant 1 message Jun 1, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 9 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:

Perusing the headers I came across a comment that said swap is broken on 8xx. For some reason I need to fix it. Where can I go about looking?

If a 2.4 kernel is good enough:

:)

Thanks

Quoted 27 lines

Index: include/asm-ppc/pgtable.h
===================================================================
RCS file: /cvsroot/linuxppc_2_4_devel/include/asm-ppc/pgtable.h,v retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7

asm-ppc/pgtable.h +5 -5
@@ -686,11 +686,11 @@
 * must not include the _PAGE_PRESENT bit, or the _PAGE_HASHPTE bit
 * (if used).  -- paulus
 */
-#define SWP_TYPE(entry)			((entry).val & 0x3f)
-#define SWP_OFFSET(entry)		((entry).val >> 6)
-#define SWP_ENTRY(type, offset)		((swp_entry_t) { (type) | ((offset) << 6) })
-#define pte_to_swp_entry(pte)		((swp_entry_t) { pte_val(pte) >> 2 })
-#define swp_entry_to_pte(x)		((pte_t) { (x).val << 2 })
+#define SWP_TYPE(entry)			(((entry).val >> 1) & 0x3f)
+#define SWP_OFFSET(entry)		((entry).val >> 8)
+#define SWP_ENTRY(type, offset)		((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+#define pte_to_swp_entry(pte)		((swp_entry_t) { pte_val(pte) & ~0x81 })
+#define swp_entry_to_pte(x)		((pte_t) { (x).val })
 
 /* CONFIG_APUS */
 /* For virtual address to physical address conversion */
Quoted 5 lines

Best regards,

Wolfgang Denk

Regards

Pantelis

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/