r4264 - in dists/trunk/linux-2.6/debian: . patches-debian patches-debian/series

Sven Luther luther at costa.debian.org
Fri Sep 23 19:12:01 UTC 2005


Author: luther
Date: 2005-09-23 19:12:00 +0000 (Fri, 23 Sep 2005)
New Revision: 4264

Added:
   dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus-todo.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus.patch
   dists/trunk/linux-2.6/debian/patches-debian/series/2.6.13-1
Log:
Updated apus patches. Now separated them between the ones which are safe to
apply (and which i included in the series) and the others which needs checking.
I would appreciate if someone (Christoph ?) could give me a hand with those,
they are only 5 files left asnd around 180 lines, so it should not be too
troublesome.


Modified: dists/trunk/linux-2.6/debian/changelog
===================================================================
--- dists/trunk/linux-2.6/debian/changelog	2005-09-23 13:32:45 UTC (rev 4263)
+++ dists/trunk/linux-2.6/debian/changelog	2005-09-23 19:12:00 UTC (rev 4264)
@@ -80,8 +80,11 @@
     flavour, fixes and enhances Apple G5 support (Closes: #323724, #328324)
   * [powerpc] Added powerpc-miboot flavour to use exclusively with oldworld
     powermac miboot floppies for debian-installer.
+  * [powerpc] Checked upgraded version of the apus patches, separated them in
+    a part which is safe to apply, and one which needs checking, and is thus
+    not applied yet.
 
- -- Sven Luther <luther at debian.org>  Wed, 21 Sep 2005 13:35:21 +0200
+ -- Sven Luther <luther at debian.org>  Fri, 23 Sep 2005 21:05:59 +0200
 
 linux-2.6 (2.6.12-6) unstable; urgency=high
 

Added: dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus-todo.patch
===================================================================
--- dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus-todo.patch	2005-09-23 13:32:45 UTC (rev 4263)
+++ dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus-todo.patch	2005-09-23 19:12:00 UTC (rev 4264)
@@ -0,0 +1,186 @@
+# 
+# PowerPC/Apus support patch
+# Needed support for Amiga PowerUP boards.
+# Author: mostly Roman Zippel <zippel at linux-m68k.org>
+# Upstream status: got synced with 2.6.12 recently, so in better status than
+# previous apus patches. Only 81k left.
+# This is the part which needs checking and which is not yet applied, added for
+# completeness though
+#
+
+diff -Nur -x CVS linux-2.6.13/drivers/block/amiflop.c linux-2.6.13-apus/drivers/block/amiflop.c
+--- linux-2.6.13/drivers/block/amiflop.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/drivers/block/amiflop.c	2005-07-31 01:06:43.000000000 +0200
+@@ -59,6 +59,7 @@
+ #include <linux/hdreg.h>
+ #include <linux/delay.h>
+ #include <linux/init.h>
++#include <linux/interrupt.h>
+ #include <linux/amifdreg.h>
+ #include <linux/amifd.h>
+ #include <linux/buffer_head.h>
+diff -Nur -x CVS linux-2.6.13/include/asm-ppc/io.h linux-2.6.13-apus/include/asm-ppc/io.h
+--- linux-2.6.13/include/asm-ppc/io.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/asm-ppc/io.h	2005-07-31 03:18:36.000000000 +0200
+@@ -1,6 +1,6 @@
+-#ifdef __KERNEL__
+ #ifndef _PPC_IO_H
+ #define _PPC_IO_H
++#ifdef __KERNEL__
+ 
+ #include <linux/config.h>
+ #include <linux/string.h>
+@@ -294,10 +294,10 @@
+ __do_out_asm(outb, "stbx")
+ #ifdef CONFIG_APUS
+ __do_in_asm(inb, "lbzx")
+-__do_in_asm(inw, "lhz%U1%X1")
+-__do_in_asm(inl, "lwz%U1%X1")
+-__do_out_asm(outl,"stw%U0%X0")
+-__do_out_asm(outw, "sth%U0%X0")
++__do_in_asm(inw, "lhzx")
++__do_in_asm(inl, "lwzx")
++__do_out_asm(outl,"stwx")
++__do_out_asm(outw, "sthx")
+ #elif defined (CONFIG_8260_PCI9)
+ /* in asm cannot be defined if PCI9 workaround is used */
+ #define inb(port)		in_8((port)+___IO_BASE)
+@@ -377,12 +377,19 @@
+ extern void __iomem *ioremap64(unsigned long long address, unsigned long size);
+ #endif
+ #define ioremap_nocache(addr, size)	ioremap((addr), (size))
++#define ioremap_writethrough(addr, size) __ioremap((addr), (size), _PAGE_WRITETHRU)
+ extern void iounmap(volatile void __iomem *addr);
+ extern unsigned long iopa(unsigned long addr);
+ extern unsigned long mm_ptov(unsigned long addr) __attribute_const__;
+ extern void io_block_mapping(unsigned long virt, phys_addr_t phys,
+ 			     unsigned int size, int flags);
+ 
++/* Values for nocacheflag and cmode */
++#define IOMAP_FULL_CACHING		0
++#define IOMAP_NOCACHE_SER		1
++#define IOMAP_NOCACHE_NONSER		2
++#define IOMAP_WRITETHROUGH		3
++
+ /*
+  * The PCI bus is inherently Little-Endian.  The PowerPC is being
+  * run Big-Endian.  Thus all values which cross the [PCI] barrier
+@@ -392,24 +399,16 @@
+  */
+ extern inline unsigned long virt_to_bus(volatile void * address)
+ {
+-#ifndef CONFIG_APUS
+         if (address == (void *)0)
+ 		return 0;
+-        return (unsigned long)address - KERNELBASE + PCI_DRAM_OFFSET;
+-#else
+-	return iopa ((unsigned long) address);
+-#endif
++	return __pa(address) + PCI_DRAM_OFFSET;
+ }
+ 
+ extern inline void * bus_to_virt(unsigned long address)
+ {
+-#ifndef CONFIG_APUS
+         if (address == 0)
+ 		return NULL;
+-        return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE);
+-#else
+-	return (void*) mm_ptov (address);
+-#endif
++	return __va(address) - PCI_DRAM_OFFSET;
+ }
+ 
+ /*
+@@ -418,20 +417,12 @@
+  */
+ extern inline unsigned long virt_to_phys(volatile void * address)
+ {
+-#ifndef CONFIG_APUS
+-	return (unsigned long) address - KERNELBASE;
+-#else
+-	return iopa ((unsigned long) address);
+-#endif
++	return __pa(address);
+ }
+ 
+ extern inline void * phys_to_virt(unsigned long address)
+ {
+-#ifndef CONFIG_APUS
+-	return (void *) (address + KERNELBASE);
+-#else
+-	return (void*) mm_ptov (address);
+-#endif
++	return __va(address);
+ }
+ 
+ /*
+@@ -546,8 +537,6 @@
+ extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
+ extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
+ 
+-#endif /* _PPC_IO_H */
+-
+ #ifdef CONFIG_8260_PCI9
+ #include <asm/mpc8260_pci9.h>
+ #endif
+@@ -564,3 +553,4 @@
+ #define xlate_dev_kmem_ptr(p)	p
+ 
+ #endif /* __KERNEL__ */
++#endif /* _PPC_IO_H */
+diff -Nur -x CVS linux-2.6.13/include/asm-ppc/pgtable.h linux-2.6.13-apus/include/asm-ppc/pgtable.h
+--- linux-2.6.13/include/asm-ppc/pgtable.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/asm-ppc/pgtable.h	2005-09-18 15:03:36.000000000 +0200
+@@ -723,7 +723,7 @@
+ #define pmd_page_kernel(pmd)	\
+ 	((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
+ #define pmd_page(pmd)		\
+-	(mem_map + (pmd_val(pmd) >> PAGE_SHIFT))
++	pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
+ #else
+ #define pmd_page_kernel(pmd)	\
+ 	((unsigned long) (pmd_val(pmd) & PAGE_MASK))
+diff -Nur -x CVS linux-2.6.13/include/video/vga.h linux-2.6.13-apus/include/video/vga.h
+--- linux-2.6.13/include/video/vga.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/video/vga.h	2005-07-30 20:52:54.000000000 +0200
+@@ -28,6 +28,7 @@
+  * Ugh, we don't have PCI space, so map readb() and friends to use Zorro space
+  * for MMIO accesses. This should make cirrusfb work again on Amiga
+  */
++#include <asm/zorro.h>
+ #undef inb_p
+ #undef inw_p
+ #undef outb_p
+@@ -36,11 +37,17 @@
+ #undef writeb
+ #undef writew
+ #define inb_p(port)	0
++#undef inw_p
+ #define inw_p(port)	0
++#undef outb_p
+ #define outb_p(port, val)	do { } while (0)
++#undef outw
+ #define outw(port, val)		do { } while (0)
++#undef readb
+ #define readb		z_readb
++#undef writeb
+ #define writeb		z_writeb
++#undef writew
+ #define writew		z_writew
+ #endif
+ #include <asm/byteorder.h>
+diff -Nur -x CVS linux-2.6.13/arch/ppc/mm/pgtable.c linux-2.6.13-apus/arch/ppc/mm/pgtable.c
+--- linux-2.6.13/arch/ppc/mm/pgtable.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/mm/pgtable.c	2005-09-18 15:03:35.000000000 +0200
+@@ -190,8 +190,8 @@
+ 	 * Don't allow anybody to remap normal RAM that we're using.
+ 	 * mem_init() sets high_memory so only do the check after that.
+ 	 */
+-	if ( mem_init_done && (p < virt_to_phys(high_memory)) )
+-	{
++	if (mem_init_done && (p + size >= virt_to_phys(KERNELBASE)) &&
++	    (p < virt_to_phys(high_memory))) {
+ 		printk("__ioremap(): phys addr "PHYS_FMT" is RAM lr %p\n", p,
+ 		       __builtin_return_address(0));
+ 		return NULL;

Modified: dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus.patch
===================================================================
--- dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus.patch	2005-09-23 13:32:45 UTC (rev 4263)
+++ dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus.patch	2005-09-23 19:12:00 UTC (rev 4264)
@@ -4,11 +4,15 @@
 # Author: mostly Roman Zippel <zippel at linux-m68k.org>
 # Upstream status: got synced with 2.6.12 recently, so in better status than
 # previous apus patches. Only 81k left.
+# This is the part which do not interact with non-apus powerpc subarche, either
+# in amiga subdirectories, #ifdefed CONFIG_APUS or mostly a no-op in the absence 
+# of CONFIG_APUS. Another patch is left which is of more dubious quality, and which
+# i will not apply by default.
 #
 
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/amiints.c 2.6/arch/ppc/amiga/amiints.c
---- linux-2.6.12/arch/ppc/amiga/amiints.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/amiints.c	2004-02-04 22:21:34.000000000 +0100
+diff -Nur -x CVS linux-2.6.13/arch/ppc/amiga/amiints.c linux-2.6.13-apus/arch/ppc/amiga/amiints.c
+--- linux-2.6.13/arch/ppc/amiga/amiints.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/amiga/amiints.c	2004-02-04 22:21:34.000000000 +0100
 @@ -67,9 +67,10 @@
  
  static short ami_ablecount[AMI_IRQS];
@@ -82,9 +86,9 @@
  }
  
  #ifdef CONFIG_APUS
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/cia.c 2.6/arch/ppc/amiga/cia.c
---- linux-2.6.12/arch/ppc/amiga/cia.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/cia.c	2004-02-04 22:21:34.000000000 +0100
+diff -Nur -x CVS linux-2.6.13/arch/ppc/amiga/cia.c linux-2.6.13-apus/arch/ppc/amiga/cia.c
+--- linux-2.6.13/arch/ppc/amiga/cia.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/amiga/cia.c	2004-02-04 22:21:34.000000000 +0100
 @@ -134,7 +134,7 @@
  	return cia_able_irq_private(base, mask);
  }
@@ -102,9 +106,9 @@
  }
  
  void __init cia_init_IRQ(struct ciabase *base)
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/config.c 2.6/arch/ppc/amiga/config.c
---- linux-2.6.12/arch/ppc/amiga/config.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/config.c	2005-07-30 20:52:47.000000000 +0200
+diff -Nur -x CVS linux-2.6.13/arch/ppc/amiga/config.c linux-2.6.13-apus/arch/ppc/amiga/config.c
+--- linux-2.6.13/arch/ppc/amiga/config.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/amiga/config.c	2005-07-30 20:52:47.000000000 +0200
 @@ -20,11 +20,12 @@
  #include <linux/mm.h>
  #include <linux/kd.h>
@@ -592,9 +596,9 @@
  
  	return(len);
  }
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/Makefile 2.6/arch/ppc/amiga/Makefile
---- linux-2.6.12/arch/ppc/amiga/Makefile	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/Makefile	2004-07-03 19:53:51.000000000 +0200
+diff -Nur -x CVS linux-2.6.13/arch/ppc/amiga/Makefile linux-2.6.13-apus/arch/ppc/amiga/Makefile
+--- linux-2.6.13/arch/ppc/amiga/Makefile	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/amiga/Makefile	2004-07-03 19:53:51.000000000 +0200
 @@ -1,8 +1,8 @@
  #
 -# Makefile for Linux arch/m68k/amiga source directory
@@ -607,9 +611,9 @@
 +	   amisound.o chipram.o amiga_ksyms.o
  
  obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o
-diff -Nur -x CVS linux-2.6.12/arch/ppc/amiga/time.c 2.6/arch/ppc/amiga/time.c
---- linux-2.6.12/arch/ppc/amiga/time.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/amiga/time.c	1970-01-01 01:00:00.000000000 +0100
+diff -Nur -x CVS linux-2.6.13/arch/ppc/amiga/time.c linux-2.6.13-apus/arch/ppc/amiga/time.c
+--- linux-2.6.13/arch/ppc/amiga/time.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/amiga/time.c	1970-01-01 01:00:00.000000000 +0100
 @@ -1,58 +0,0 @@
 -#include <linux/config.h> /* CONFIG_HEARTBEAT */
 -#include <linux/errno.h>
@@ -669,9 +673,9 @@
 -	/* should be made smarter */
 -	ppc_md.heartbeat_count = 1;
 -}
-diff -Nur -x CVS linux-2.6.12/arch/ppc/configs/apus_defconfig 2.6/arch/ppc/configs/apus_defconfig
---- linux-2.6.12/arch/ppc/configs/apus_defconfig	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/configs/apus_defconfig	2005-08-04 20:04:09.000000000 +0200
+diff -Nur -x CVS linux-2.6.13/arch/ppc/configs/apus_defconfig linux-2.6.13-apus/arch/ppc/configs/apus_defconfig
+--- linux-2.6.13/arch/ppc/configs/apus_defconfig	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/configs/apus_defconfig	2005-08-04 20:04:09.000000000 +0200
 @@ -1,61 +1,99 @@
  #
  # Automatically generated make config: don't edit
@@ -1932,338 +1936,9 @@
 +#
 +# Hardware crypto devices
 +#
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/entry.S 2.6/arch/ppc/kernel/entry.S
---- linux-2.6.12/arch/ppc/kernel/entry.S	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/entry.S	2005-07-31 03:18:11.000000000 +0200
-@@ -1026,3 +1026,6 @@
- 	/* XXX load up BATs and panic */
- 
- #endif /* CONFIG_PPC_OF */
-+
-+	.global	__head_end
-+__head_end:
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/head.S 2.6/arch/ppc/kernel/head.S
---- linux-2.6.12/arch/ppc/kernel/head.S	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/head.S	2005-08-04 01:40:55.000000000 +0200
-@@ -353,6 +353,28 @@
- #if defined(CONFIG_GEMINI) && defined(CONFIG_SMP)
- 	. = 0x100
- 	b	__secondary_start_gemini
-+#elif defined(CONFIG_APUS)
-+	. = 0x100
-+	mfspr	r4,SPRN_HID0
-+	li	r3,0
-+	ori	r3,r3,0xc000
-+	andc	r4,r4,r3
-+	mtspr	SPRN_HID0,r4
-+	isync
-+	sync
-+	lis	r8,0x6170
-+	ori	r8,r8,0x7573
-+	lis	r9,0xfff0
-+	lwz	r9,0x1f8(r9)
-+	lis	r1,init_thread_union at ha
-+	addi	r1,r1,init_thread_union at l
-+	addi	r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
-+	subis	r1,r1,KERNELBASE at h
-+	add	r1,r1,r9
-+	mr	r3,r8
-+	mr	r4,r9
-+	mtlr	r4
-+	blrl
- #else
- 	EXCEPTION(0x100, Reset, UnknownException, EXC_XFER_STD)
- #endif
-@@ -408,7 +430,15 @@
- 	bne	1f			/* if not, try to put a PTE */
- 	mfspr	r4,SPRN_DAR		/* into the hash table */
- 	rlwinm	r3,r10,32-15,21,21	/* DSISR_STORE -> _PAGE_RW */
-+#ifndef CONFIG_APUS
- 	bl	hash_page
-+#else
-+	lis     r5,hash_page at h
-+	ori	r5,r5,hash_page at l
-+	tophys(r5,r5)
-+	mtlr	r5
-+	blrl
-+#endif
- 1:	stw	r10,_DSISR(r11)
- 	mr	r5,r10
- 	mfspr	r4,SPRN_DAR
-@@ -433,7 +463,15 @@
- 	beq	1f			/* if so, try to put a PTE */
- 	li	r3,0			/* into the hash table */
- 	mr	r4,r12			/* SRR0 is fault address */
-+#ifndef CONFIG_APUS
- 	bl	hash_page
-+#else
-+	lis     r5,hash_page at h
-+	ori	r5,r5,hash_page at l
-+	tophys(r5,r5)
-+	mtlr	r5
-+	blrl
-+#endif
- 1:	mr	r4,r12
- 	mr	r5,r9
- 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
-@@ -1201,19 +1239,6 @@
- 	bl	machine_init
- 	bl	MMU_init
- 
--#ifdef CONFIG_APUS
--	/* Copy exception code to exception vector base on APUS. */
--	lis	r4,KERNELBASE at h
--#ifdef CONFIG_APUS_FAST_EXCEPT
--	lis	r3,0xfff0		/* Copy to 0xfff00000 */
--#else
--	lis	r3,0			/* Copy to 0x00000000 */
--#endif
--	li	r5,0x4000		/* # bytes of memory to copy */
--	li	r6,0
--	bl	copy_and_flush		/* copy the first 0x4000 bytes */
--#endif  /* CONFIG_APUS */
--
- /*
-  * Go back to running unmapped so we can load up new values
-  * for SDR1 (hash table pointer) and the segment registers
-@@ -1231,6 +1256,22 @@
- /* Load up the kernel context */
- 2:	bl	load_up_mmu
- 
-+#ifdef CONFIG_APUS
-+	/* Copy exception code to exception vector base on APUS. */
-+	lis	r4,KERNELBASE at h
-+	tophys(r4,r4)
-+#ifdef CONFIG_APUS_FAST_EXCEPT
-+	lis	r3,0xfff0		/* Copy to 0xfff00000 */
-+#else
-+	lis	r3,0			/* Copy to 0x00000000 */
-+#endif
-+	lis	r5,__head_end at h		/* # bytes of memory to copy */
-+	ori	r5,r5,__head_end at l
-+	subis	r5,r5,KERNELBASE at h
-+	li	r6,0
-+	bl	copy_and_flush		/* copy the first 0x4000 bytes */
-+#endif  /* CONFIG_APUS */
-+
- #ifdef CONFIG_BDI_SWITCH
- 	/* Add helper information for the Abatron bdiGDB debugger.
- 	 * We do this here because we know the mmu is disabled, and
-@@ -1411,6 +1452,17 @@
- 	mtspr	SPRN_DBAT0U,r11		/* bit in upper BAT register */
- 	mtspr	SPRN_IBAT0L,r8
- 	mtspr	SPRN_IBAT0U,r11
-+#ifdef CONFIG_APUS
-+	/* map ZII space for early debug prints */
-+	lis	r8,0x8000
-+	ori	r8,r8,0x01ff
-+	mtspr	SPRN_DBAT2U,r8
-+	mtspr	SPRN_IBAT2U,r8
-+	lis	r8,0x0000
-+	ori	r8,r8,0x002a
-+	mtspr	SPRN_DBAT2L,r8
-+	mtspr	SPRN_IBAT2L,r8
-+#endif
- 	isync
- 	blr
- 
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/Makefile 2.6/arch/ppc/kernel/Makefile
---- linux-2.6.12/arch/ppc/kernel/Makefile	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/Makefile	2005-07-31 03:18:11.000000000 +0200
-@@ -9,10 +9,11 @@
- extra-$(CONFIG_8xx)		:= head_8xx.o
- extra-$(CONFIG_6xx)		+= idle_6xx.o
- extra-$(CONFIG_POWER4)		+= idle_power4.o
-+extra-y				+= entry.o
- extra-$(CONFIG_PPC_FPU)		+= fpu.o
- extra-y				+= vmlinux.lds
- 
--obj-y				:= entry.o traps.o irq.o idle.o time.o misc.o \
-+obj-y				:= traps.o irq.o idle.o time.o misc.o \
- 					process.o signal.o ptrace.o align.o \
- 					semaphore.o syscalls.o setup.o \
- 					cputable.o ppc_htab.o perfmon.o
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/misc.S 2.6/arch/ppc/kernel/misc.S
---- linux-2.6.12/arch/ppc/kernel/misc.S	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/misc.S	2005-07-31 03:18:12.000000000 +0200
-@@ -1368,7 +1368,11 @@
- 	.long sys_fstat64
- 	.long sys_pciconfig_read
- 	.long sys_pciconfig_write
-+#ifdef CONFIG_PCI
- 	.long sys_pciconfig_iobase 	/* 200 */
-+#else
-+	.long sys_ni_syscall
-+#endif
- 	.long sys_ni_syscall		/* 201 - reserved - MacOnLinux - new */
- 	.long sys_getdents64
- 	.long sys_pivot_root
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/ppc_ksyms.c 2.6/arch/ppc/kernel/ppc_ksyms.c
---- linux-2.6.12/arch/ppc/kernel/ppc_ksyms.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/ppc_ksyms.c	2005-07-31 03:18:12.000000000 +0200
-@@ -69,8 +69,6 @@
- long long __ashldi3(long long, int);
- long long __lshrdi3(long long, int);
- 
--extern unsigned long mm_ptov (unsigned long paddr);
--
- EXPORT_SYMBOL(clear_pages);
- EXPORT_SYMBOL(clear_user_page);
- EXPORT_SYMBOL(do_signal);
-@@ -147,7 +145,6 @@
- EXPORT_SYMBOL(_insl_ns);
- EXPORT_SYMBOL(_outsl_ns);
- EXPORT_SYMBOL(iopa);
--EXPORT_SYMBOL(mm_ptov);
- EXPORT_SYMBOL(ioremap);
- #ifdef CONFIG_44x
- EXPORT_SYMBOL(ioremap64);
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/setup.c 2.6/arch/ppc/kernel/setup.c
---- linux-2.6.12/arch/ppc/kernel/setup.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/setup.c	2005-08-04 01:42:52.000000000 +0200
-@@ -550,6 +550,7 @@
- #endif /* CONFIG_SERIAL_CORE_CONSOLE */
- #endif /* CONFIG_PPC_MULTIPLATFORM */
- 
-+#ifndef CONFIG_APUS
- struct bi_record *find_bootinfo(void)
- {
- 	struct bi_record *rec;
-@@ -601,6 +602,7 @@
- 		rec = (struct bi_record *)((ulong)rec + rec->size);
- 	}
- }
-+#endif
- 
- /*
-  * Find out what kind of machine we're on and save any data we need
-diff -Nur -x CVS linux-2.6.12/arch/ppc/kernel/time.c 2.6/arch/ppc/kernel/time.c
---- linux-2.6.12/arch/ppc/kernel/time.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/kernel/time.c	2005-07-31 03:18:12.000000000 +0200
-@@ -150,6 +150,7 @@
- 		tb_last_stamp = jiffy_stamp;
- 		do_timer(regs);
- 
-+#ifndef CONFIG_APUS
- 		/*
- 		 * update the rtc when needed, this should be performed on the
- 		 * right fraction of a second. Half or full second ?
-@@ -176,6 +177,7 @@
- 				/* Try again one minute later */
- 				last_rtc_update += 60;
- 		}
-+#endif
- 		write_sequnlock(&xtime_lock);
- 	}
- 	if ( !disarm_decr[smp_processor_id()] )
-diff -Nur -x CVS linux-2.6.12/arch/ppc/Makefile 2.6/arch/ppc/Makefile
---- linux-2.6.12/arch/ppc/Makefile	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/Makefile	2005-07-31 03:18:11.000000000 +0200
-@@ -51,6 +51,8 @@
- head-$(CONFIG_44x)		:= arch/ppc/kernel/head_44x.o
- head-$(CONFIG_FSL_BOOKE)	:= arch/ppc/kernel/head_fsl_booke.o
- 
-+head-y				+= arch/ppc/mm/hashtable.o
-+head-y				+= arch/ppc/kernel/entry.o
- head-$(CONFIG_6xx)		+= arch/ppc/kernel/idle_6xx.o
- head-$(CONFIG_POWER4)		+= arch/ppc/kernel/idle_power4.o
- head-$(CONFIG_PPC_FPU)		+= arch/ppc/kernel/fpu.o
-@@ -73,7 +75,9 @@
- 
- .PHONY: $(BOOT_TARGETS)
- 
-+ifndef CONFIG_APUS
- all: uImage zImage
-+endif
- 
- CPPFLAGS_vmlinux.lds	:= -Upowerpc
- 
-diff -Nur -x CVS linux-2.6.12/arch/ppc/mm/init.c 2.6/arch/ppc/mm/init.c
---- linux-2.6.12/arch/ppc/mm/init.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/mm/init.c	2005-07-31 03:18:12.000000000 +0200
-@@ -61,9 +61,6 @@
- unsigned long total_memory;
- unsigned long total_lowmem;
- 
--unsigned long ppc_memstart;
--unsigned long ppc_memoffset = PAGE_OFFSET;
--
- int mem_init_done;
- int init_bootmem_done;
- int boot_mapsize;
-diff -Nur -x CVS linux-2.6.12/arch/ppc/mm/Makefile 2.6/arch/ppc/mm/Makefile
---- linux-2.6.12/arch/ppc/mm/Makefile	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/mm/Makefile	2004-09-25 23:09:43.000000000 +0200
-@@ -5,7 +5,8 @@
- obj-y				:= fault.o init.o mem_pieces.o \
- 					mmu_context.o pgtable.o
- 
--obj-$(CONFIG_PPC_STD_MMU)	+= hashtable.o ppc_mmu.o tlb.o
-+extra-$(CONFIG_PPC_STD_MMU)	:= hashtable.o
-+obj-$(CONFIG_PPC_STD_MMU)	+= ppc_mmu.o tlb.o
- obj-$(CONFIG_40x)		+= 4xx_mmu.o
- obj-$(CONFIG_44x)		+= 44x_mmu.o
- obj-$(CONFIG_FSL_BOOKE)		+= fsl_booke_mmu.o
-diff -Nur -x CVS linux-2.6.12/arch/ppc/mm/pgtable.c 2.6/arch/ppc/mm/pgtable.c
---- linux-2.6.12/arch/ppc/mm/pgtable.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/mm/pgtable.c	2005-07-31 03:18:12.000000000 +0200
-@@ -191,8 +191,8 @@
- 	 * Don't allow anybody to remap normal RAM that we're using.
- 	 * mem_init() sets high_memory so only do the check after that.
- 	 */
--	if ( mem_init_done && (p < virt_to_phys(high_memory)) )
--	{
-+	if (mem_init_done && (p + size >= virt_to_phys(KERNELBASE)) &&
-+	    (p < virt_to_phys(high_memory))) {
- 		printk("__ioremap(): phys addr "PHYS_FMT" is RAM lr %p\n", p,
- 		       __builtin_return_address(0));
- 		return NULL;
-@@ -430,42 +430,3 @@
- 
- 	return(pa);
- }
--
--/* This is will find the virtual address for a physical one....
-- * Swiped from APUS, could be dangerous :-).
-- * This is only a placeholder until I really find a way to make this
-- * work.  -- Dan
-- */
--unsigned long
--mm_ptov (unsigned long paddr)
--{
--	unsigned long ret;
--#if 0
--	if (paddr < 16*1024*1024)
--		ret = ZTWO_VADDR(paddr);
--	else {
--		int i;
--
--		for (i = 0; i < kmap_chunk_count;){
--			unsigned long phys = kmap_chunks[i++];
--			unsigned long size = kmap_chunks[i++];
--			unsigned long virt = kmap_chunks[i++];
--			if (paddr >= phys
--			    && paddr < (phys + size)){
--				ret = virt + paddr - phys;
--				goto exit;
--			}
--		}
--	
--		ret = (unsigned long) __va(paddr);
--	}
--exit:
--#ifdef DEBUGPV
--	printk ("PTOV(%lx)=%lx\n", paddr, ret);
--#endif
--#else
--	ret = (unsigned long)paddr + KERNELBASE;
--#endif
--	return ret;
--}
--
-diff -Nur -x CVS linux-2.6.12/arch/ppc/platforms/apus_setup.c 2.6/arch/ppc/platforms/apus_setup.c
---- linux-2.6.12/arch/ppc/platforms/apus_setup.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/platforms/apus_setup.c	2005-08-04 01:43:41.000000000 +0200
+diff -Nur -x CVS linux-2.6.13/arch/ppc/platforms/apus_setup.c linux-2.6.13-apus/arch/ppc/platforms/apus_setup.c
+--- linux-2.6.13/arch/ppc/platforms/apus_setup.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/platforms/apus_setup.c	2005-08-04 01:43:41.000000000 +0200
 @@ -17,11 +17,14 @@
  #include <linux/kernel.h>
  #include <linux/sched.h>
@@ -2712,33 +2387,255 @@
  	ppc_memoffset = PAGE_OFFSET - PPC_MEMSTART;
  	total = memory[0].size;
  
-diff -Nur -x CVS linux-2.6.12/arch/ppc/platforms/ivms8.h 2.6/arch/ppc/platforms/ivms8.h
---- linux-2.6.12/arch/ppc/platforms/ivms8.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/arch/ppc/platforms/ivms8.h	2004-02-01 00:24:09.000000000 +0100
-@@ -40,8 +40,7 @@
- #define IDE0_BASE_OFFSET		0x0000	/* Offset in PCMCIA memory */
- #define IDE0_DATA_REG_OFFSET		0x0000
- #define IDE0_ERROR_REG_OFFSET		0x0081
--#define IDE0_NSECTOR_REG_OFFSET		0x0082
--#define IDE0_SECTOR_REG_OFFSET		0x0083
-+#define IDE0_NSECTOR_REG_OFFine ID0_SEC#define IDE0_SECTOR_REG_OFFSET		0x0083
- #define IDE0_LCYL_REG_OFFSET		0x0084
- #define IDE0_HCYL_REG_OFFSET		0x0085
- #define IDE0_SELECT_REG_OFFSET		0x0086
-diff -Nur -x CVS linux-2.6.12/drivers/block/amiflop.c 2.6/drivers/block/amiflop.c
---- linux-2.6.12/drivers/block/amiflop.c	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/drivers/block/amiflop.c	2005-07-31 01:06:43.000000000 +0200
-@@ -59,6 +59,7 @@
- #include <linux/hdreg.h>
- #include <linux/delay.h>
- #include <linux/init.h>
-+#include <linux/interrupt.h>
- #include <linux/amifdreg.h>
- #include <linux/amifd.h>
- #include <linux/buffer_head.h>
-diff -Nur -x CVS linux-2.6.12/include/asm-m68k/bootinfo.h 2.6/include/asm-m68k/bootinfo.h
---- linux-2.6.12/include/asm-m68k/bootinfo.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-m68k/bootinfo.h	2005-07-30 22:49:24.000000000 +0200
+diff -Nur -x CVS linux-2.6.13/include/asm-ppc/zorro.h linux-2.6.13-apus/include/asm-ppc/zorro.h
+--- linux-2.6.13/include/asm-ppc/zorro.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/asm-ppc/zorro.h	2005-08-04 01:48:26.000000000 +0200
+@@ -3,13 +3,50 @@
+ 
+ #include <asm/io.h>
+ 
+-#define z_readb in_8
+-#define z_readw in_be16
+-#define z_readl in_be32
+-
+-#define z_writeb(val, port) out_8((port), (val))
+-#define z_writew(val, port) out_be16((port), (val))
+-#define z_writel(val, port) out_be32((port), (val))
++static inline unsigned int z_readb(unsigned long addr)
++{
++	unsigned int ret;
++
++	ret = *(volatile u8 *)addr;
++	eieio();
++	return ret;
++}
++
++static inline unsigned int z_readw(unsigned long addr)
++{
++	unsigned int ret;
++
++	ret = *(volatile u16 *)addr;
++	eieio();
++	return ret;
++}
++
++static inline unsigned int z_readl(unsigned long addr)
++{
++	unsigned int ret;
++
++	ret = *(volatile u32 *)addr;
++	eieio();
++	return ret;
++}
++
++static inline void z_writeb(unsigned int val, unsigned long addr)
++{
++	*(volatile u8 *)addr = val;
++	eieio();
++}
++
++static inline void z_writew(unsigned int val, unsigned long addr)
++{
++	*(volatile u16 *)addr = val;
++	eieio();
++}
++
++static inline void z_writel(unsigned int val,unsigned long addr)
++{
++	*(volatile u32 *)addr = val;
++	eieio();
++}
+ 
+ #define z_memset_io(a,b,c)	memset((void *)(a),(b),(c))
+ #define z_memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))
+@@ -19,7 +56,6 @@
+ 		       unsigned long flags);
+ 
+ extern void *ioremap(unsigned long address, unsigned long size);
+-extern void iounmap(void *addr);
+ 
+ extern void *__ioremap(unsigned long address, unsigned long size,
+                        unsigned long flags);
+diff -Nur -x CVS linux-2.6.13/arch/ppc/kernel/head.S linux-2.6.13-apus/arch/ppc/kernel/head.S
+--- linux-2.6.13/arch/ppc/kernel/head.S	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/kernel/head.S	2005-08-04 01:40:55.000000000 +0200
+@@ -353,6 +353,28 @@
+ #if defined(CONFIG_GEMINI) && defined(CONFIG_SMP)
+ 	. = 0x100
+ 	b	__secondary_start_gemini
++#elif defined(CONFIG_APUS)
++	. = 0x100
++	mfspr	r4,SPRN_HID0
++	li	r3,0
++	ori	r3,r3,0xc000
++	andc	r4,r4,r3
++	mtspr	SPRN_HID0,r4
++	isync
++	sync
++	lis	r8,0x6170
++	ori	r8,r8,0x7573
++	lis	r9,0xfff0
++	lwz	r9,0x1f8(r9)
++	lis	r1,init_thread_union at ha
++	addi	r1,r1,init_thread_union at l
++	addi	r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
++	subis	r1,r1,KERNELBASE at h
++	add	r1,r1,r9
++	mr	r3,r8
++	mr	r4,r9
++	mtlr	r4
++	blrl
+ #else
+ 	EXCEPTION(0x100, Reset, UnknownException, EXC_XFER_STD)
+ #endif
+@@ -408,7 +430,15 @@
+ 	bne	1f			/* if not, try to put a PTE */
+ 	mfspr	r4,SPRN_DAR		/* into the hash table */
+ 	rlwinm	r3,r10,32-15,21,21	/* DSISR_STORE -> _PAGE_RW */
++#ifndef CONFIG_APUS
+ 	bl	hash_page
++#else
++	lis     r5,hash_page at h
++	ori	r5,r5,hash_page at l
++	tophys(r5,r5)
++	mtlr	r5
++	blrl
++#endif
+ 1:	stw	r10,_DSISR(r11)
+ 	mr	r5,r10
+ 	mfspr	r4,SPRN_DAR
+@@ -433,7 +463,15 @@
+ 	beq	1f			/* if so, try to put a PTE */
+ 	li	r3,0			/* into the hash table */
+ 	mr	r4,r12			/* SRR0 is fault address */
++#ifndef CONFIG_APUS
+ 	bl	hash_page
++#else
++	lis     r5,hash_page at h
++	ori	r5,r5,hash_page at l
++	tophys(r5,r5)
++	mtlr	r5
++	blrl
++#endif
+ 1:	mr	r4,r12
+ 	mr	r5,r9
+ 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
+@@ -1201,19 +1239,6 @@
+ 	bl	machine_init
+ 	bl	MMU_init
+ 
+-#ifdef CONFIG_APUS
+-	/* Copy exception code to exception vector base on APUS. */
+-	lis	r4,KERNELBASE at h
+-#ifdef CONFIG_APUS_FAST_EXCEPT
+-	lis	r3,0xfff0		/* Copy to 0xfff00000 */
+-#else
+-	lis	r3,0			/* Copy to 0x00000000 */
+-#endif
+-	li	r5,0x4000		/* # bytes of memory to copy */
+-	li	r6,0
+-	bl	copy_and_flush		/* copy the first 0x4000 bytes */
+-#endif  /* CONFIG_APUS */
+-
+ /*
+  * Go back to running unmapped so we can load up new values
+  * for SDR1 (hash table pointer) and the segment registers
+@@ -1231,6 +1256,22 @@
+ /* Load up the kernel context */
+ 2:	bl	load_up_mmu
+ 
++#ifdef CONFIG_APUS
++	/* Copy exception code to exception vector base on APUS. */
++	lis	r4,KERNELBASE at h
++	tophys(r4,r4)
++#ifdef CONFIG_APUS_FAST_EXCEPT
++	lis	r3,0xfff0		/* Copy to 0xfff00000 */
++#else
++	lis	r3,0			/* Copy to 0x00000000 */
++#endif
++	lis	r5,__head_end at h		/* # bytes of memory to copy */
++	ori	r5,r5,__head_end at l
++	subis	r5,r5,KERNELBASE at h
++	li	r6,0
++	bl	copy_and_flush		/* copy the first 0x4000 bytes */
++#endif  /* CONFIG_APUS */
++
+ #ifdef CONFIG_BDI_SWITCH
+ 	/* Add helper information for the Abatron bdiGDB debugger.
+ 	 * We do this here because we know the mmu is disabled, and
+@@ -1411,6 +1452,17 @@
+ 	mtspr	SPRN_DBAT0U,r11		/* bit in upper BAT register */
+ 	mtspr	SPRN_IBAT0L,r8
+ 	mtspr	SPRN_IBAT0U,r11
++#ifdef CONFIG_APUS
++	/* map ZII space for early debug prints */
++	lis	r8,0x8000
++	ori	r8,r8,0x01ff
++	mtspr	SPRN_DBAT2U,r8
++	mtspr	SPRN_IBAT2U,r8
++	lis	r8,0x0000
++	ori	r8,r8,0x002a
++	mtspr	SPRN_DBAT2L,r8
++	mtspr	SPRN_IBAT2L,r8
++#endif
+ 	isync
+ 	blr
+ 
+diff -Nur -x CVS linux-2.6.13/arch/ppc/kernel/setup.c linux-2.6.13-apus/arch/ppc/kernel/setup.c
+--- linux-2.6.13/arch/ppc/kernel/setup.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/kernel/setup.c	2005-09-18 15:03:35.000000000 +0200
+@@ -542,6 +542,7 @@
+ #endif /* CONFIG_SERIAL_CORE_CONSOLE */
+ #endif /* CONFIG_PPC_MULTIPLATFORM */
+ 
++#ifndef CONFIG_APUS
+ struct bi_record *find_bootinfo(void)
+ {
+ 	struct bi_record *rec;
+@@ -588,6 +589,7 @@
+ 		rec = (struct bi_record *)((ulong)rec + rec->size);
+ 	}
+ }
++#endif
+ 
+ /*
+  * Find out what kind of machine we're on and save any data we need
+diff -Nur -x CVS linux-2.6.13/arch/ppc/kernel/time.c linux-2.6.13-apus/arch/ppc/kernel/time.c
+--- linux-2.6.13/arch/ppc/kernel/time.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/kernel/time.c	2005-09-18 15:03:35.000000000 +0200
+@@ -153,6 +153,7 @@
+ 		tb_last_stamp = jiffy_stamp;
+ 		do_timer(regs);
+ 
++#ifndef CONFIG_APUS
+ 		/*
+ 		 * update the rtc when needed, this should be performed on the
+ 		 * right fraction of a second. Half or full second ?
+@@ -179,6 +180,7 @@
+ 				/* Try again one minute later */
+ 				last_rtc_update += 60;
+ 		}
++#endif
+ 		write_sequnlock(&xtime_lock);
+ 	}
+ 	if ( !disarm_decr[smp_processor_id()] )
+diff -Nur -x CVS linux-2.6.13/include/asm-ppc/machdep.h linux-2.6.13-apus/include/asm-ppc/machdep.h
+--- linux-2.6.13/include/asm-ppc/machdep.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/asm-ppc/machdep.h	2005-09-18 15:03:36.000000000 +0200
+@@ -9,10 +9,6 @@
+ #include <asm/setup.h>
+ #include <asm/page.h>
+ 
+-#ifdef CONFIG_APUS
+-#include <asm-m68k/machdep.h>
+-#endif
+-
+ struct pt_regs;
+ struct pci_bus;	
+ struct pci_dev;
+diff -Nur -x CVS linux-2.6.13/include/asm-m68k/bootinfo.h linux-2.6.13-apus/include/asm-m68k/bootinfo.h
+--- linux-2.6.13/include/asm-m68k/bootinfo.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/asm-m68k/bootinfo.h	2005-07-30 22:49:24.000000000 +0200
 @@ -81,6 +81,8 @@
  #define BI_AMIGA_ECLOCK		0x8005	/* EClock frequency (u_long) */
  #define BI_AMIGA_CHIPSET	0x8006	/* native chipset present (u_long) */
@@ -2748,9 +2645,9 @@
  
      /*
       *  Atari-specific tags
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/amigahw.h 2.6/include/asm-ppc/amigahw.h
---- linux-2.6.12/include/asm-ppc/amigahw.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/amigahw.h	2004-07-03 19:59:46.000000000 +0200
+diff -Nur -x CVS linux-2.6.13/include/asm-ppc/amigahw.h linux-2.6.13-apus/include/asm-ppc/amigahw.h
+--- linux-2.6.13/include/asm-ppc/amigahw.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/asm-ppc/amigahw.h	2004-07-03 19:59:46.000000000 +0200
 @@ -1,6 +1,6 @@
 -#ifdef __KERNEL__
  #ifndef __ASMPPC_AMIGAHW_H
@@ -2774,9 +2671,19 @@
 -#endif /* __ASMPPC_AMIGAHW_H */
  #endif /* __KERNEL__ */
 +#endif /* __ASMPPC_AMIGAHW_H */
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/bootinfo.h 2.6/include/asm-ppc/bootinfo.h
---- linux-2.6.12/include/asm-ppc/bootinfo.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/bootinfo.h	2004-02-21 22:42:00.000000000 +0100
+diff -Nur -x CVS linux-2.6.13/arch/ppc/kernel/entry.S linux-2.6.13-apus/arch/ppc/kernel/entry.S
+--- linux-2.6.13/arch/ppc/kernel/entry.S	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/kernel/entry.S	2005-09-18 15:03:35.000000000 +0200
+@@ -1000,3 +1000,6 @@
+ 	/* XXX load up BATs and panic */
+ 
+ #endif /* CONFIG_PPC_OF */
++
++	.global	__head_end
++__head_end:
+diff -Nur -x CVS linux-2.6.13/include/asm-ppc/bootinfo.h linux-2.6.13-apus/include/asm-ppc/bootinfo.h
+--- linux-2.6.13/include/asm-ppc/bootinfo.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/asm-ppc/bootinfo.h	2004-02-21 22:42:00.000000000 +0100
 @@ -36,7 +36,6 @@
  extern void bootinfo_init(struct bi_record *rec);
  extern void bootinfo_append(unsigned long tag, unsigned long size, void * data);
@@ -2793,9 +2700,9 @@
  
  #endif /* _PPC_BOOTINFO_H */
  #endif /* __KERNEL__ */
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/current.h 2.6/include/asm-ppc/current.h
---- linux-2.6.12/include/asm-ppc/current.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/current.h	2004-02-04 22:21:36.000000000 +0100
+diff -Nur -x CVS linux-2.6.13/include/asm-ppc/current.h linux-2.6.13-apus/include/asm-ppc/current.h
+--- linux-2.6.13/include/asm-ppc/current.h	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/include/asm-ppc/current.h	2004-02-04 22:21:36.000000000 +0100
 @@ -1,11 +1,11 @@
 -#ifdef __KERNEL__
  #ifndef _PPC_CURRENT_H
@@ -2810,237 +2717,148 @@
 -#endif /* !(_PPC_CURRENT_H) */
  #endif /* __KERNEL__ */
 +#endif /* !(_PPC_CURRENT_H) */
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/io.h 2.6/include/asm-ppc/io.h
---- linux-2.6.12/include/asm-ppc/io.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/io.h	2005-07-31 03:18:36.000000000 +0200
-@@ -1,6 +1,6 @@
--#ifdef __KERNEL__
- #ifndef _PPC_IO_H
- #define _PPC_IO_H
-+#ifdef __KERNEL__
+diff -Nur -x CVS linux-2.6.13/arch/ppc/mm/init.c linux-2.6.13-apus/arch/ppc/mm/init.c
+--- linux-2.6.13/arch/ppc/mm/init.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/mm/init.c	2005-09-18 15:03:35.000000000 +0200
+@@ -61,9 +61,6 @@
+ unsigned long total_memory;
+ unsigned long total_lowmem;
  
- #include <linux/config.h>
- #include <linux/string.h>
-@@ -294,10 +294,10 @@
- __do_out_asm(outb, "stbx")
- #ifdef CONFIG_APUS
- __do_in_asm(inb, "lbzx")
--__do_in_asm(inw, "lhz%U1%X1")
--__do_in_asm(inl, "lwz%U1%X1")
--__do_out_asm(outl,"stw%U0%X0")
--__do_out_asm(outw, "sth%U0%X0")
-+__do_in_asm(inw, "lhzx")
-+__do_in_asm(inl, "lwzx")
-+__do_out_asm(outl,"stwx")
-+__do_out_asm(outw, "sthx")
- #elif defined (CONFIG_8260_PCI9)
- /* in asm cannot be defined if PCI9 workaround is used */
- #define inb(port)		in_8((port)+___IO_BASE)
-@@ -377,12 +377,19 @@
- extern void __iomem *ioremap64(unsigned long long address, unsigned long size);
- #endif
- #define ioremap_nocache(addr, size)	ioremap((addr), (size))
-+#define ioremap_writethrough(addr, size) __ioremap((addr), (size), _PAGE_WRITETHRU)
- extern void iounmap(volatile void __iomem *addr);
- extern unsigned long iopa(unsigned long addr);
- extern unsigned long mm_ptov(unsigned long addr) __attribute_const__;
- extern void io_block_mapping(unsigned long virt, phys_addr_t phys,
- 			     unsigned int size, int flags);
+-unsigned long ppc_memstart;
+-unsigned long ppc_memoffset = PAGE_OFFSET;
+-
+ int mem_init_done;
+ int init_bootmem_done;
+ int boot_mapsize;
+diff -Nur -x CVS linux-2.6.13/arch/ppc/mm/Makefile linux-2.6.13-apus/arch/ppc/mm/Makefile
+--- linux-2.6.13/arch/ppc/mm/Makefile	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/mm/Makefile	2004-09-25 23:09:43.000000000 +0200
+@@ -5,7 +5,8 @@
+ obj-y				:= fault.o init.o mem_pieces.o \
+ 					mmu_context.o pgtable.o
  
-+/* Values for nocacheflag and cmode */
-+#define IOMAP_FULL_CACHING		0
-+#define IOMAP_NOCACHE_SER		1
-+#define IOMAP_NOCACHE_NONSER		2
-+#define IOMAP_WRITETHROUGH		3
-+
- /*
-  * The PCI bus is inherently Little-Endian.  The PowerPC is being
-  * run Big-Endian.  Thus all values which cross the [PCI] barrier
-@@ -392,24 +399,16 @@
-  */
- extern inline unsigned long virt_to_bus(volatile void * address)
- {
--#ifndef CONFIG_APUS
-         if (address == (void *)0)
- 		return 0;
--        return (unsigned long)address - KERNELBASE + PCI_DRAM_OFFSET;
--#else
--	return iopa ((unsigned long) address);
--#endif
-+	return __pa(address) + PCI_DRAM_OFFSET;
- }
+-obj-$(CONFIG_PPC_STD_MMU)	+= hashtable.o ppc_mmu.o tlb.o
++extra-$(CONFIG_PPC_STD_MMU)	:= hashtable.o
++obj-$(CONFIG_PPC_STD_MMU)	+= ppc_mmu.o tlb.o
+ obj-$(CONFIG_40x)		+= 4xx_mmu.o
+ obj-$(CONFIG_44x)		+= 44x_mmu.o
+ obj-$(CONFIG_FSL_BOOKE)		+= fsl_booke_mmu.o
+diff -Nur -x CVS linux-2.6.13/arch/ppc/mm/pgtable.c linux-2.6.13-apus/arch/ppc/mm/pgtable.c
+--- linux-2.6.13/arch/ppc/mm/pgtable.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/mm/pgtable.c	2005-09-18 15:03:35.000000000 +0200
+@@ -429,42 +429,3 @@
  
- extern inline void * bus_to_virt(unsigned long address)
- {
--#ifndef CONFIG_APUS
-         if (address == 0)
- 		return NULL;
--        return (void *)(address - PCI_DRAM_OFFSET + KERNELBASE);
--#else
--	return (void*) mm_ptov (address);
--#endif
-+	return __va(address) - PCI_DRAM_OFFSET;
+ 	return(pa);
  }
- 
- /*
-@@ -418,20 +417,12 @@
-  */
- extern inline unsigned long virt_to_phys(volatile void * address)
- {
--#ifndef CONFIG_APUS
--	return (unsigned long) address - KERNELBASE;
--#else
--	return iopa ((unsigned long) address);
+-
+-/* This is will find the virtual address for a physical one....
+- * Swiped from APUS, could be dangerous :-).
+- * This is only a placeholder until I really find a way to make this
+- * work.  -- Dan
+- */
+-unsigned long
+-mm_ptov (unsigned long paddr)
+-{
+-	unsigned long ret;
+-#if 0
+-	if (paddr < 16*1024*1024)
+-		ret = ZTWO_VADDR(paddr);
+-	else {
+-		int i;
+-
+-		for (i = 0; i < kmap_chunk_count;){
+-			unsigned long phys = kmap_chunks[i++];
+-			unsigned long size = kmap_chunks[i++];
+-			unsigned long virt = kmap_chunks[i++];
+-			if (paddr >= phys
+-			    && paddr < (phys + size)){
+-				ret = virt + paddr - phys;
+-				goto exit;
+-			}
+-		}
+-	
+-		ret = (unsigned long) __va(paddr);
+-	}
+-exit:
+-#ifdef DEBUGPV
+-	printk ("PTOV(%lx)=%lx\n", paddr, ret);
 -#endif
-+	return __pa(address);
- }
- 
- extern inline void * phys_to_virt(unsigned long address)
- {
--#ifndef CONFIG_APUS
--	return (void *) (address + KERNELBASE);
 -#else
--	return (void*) mm_ptov (address);
+-	ret = (unsigned long)paddr + KERNELBASE;
 -#endif
-+	return __va(address);
- }
- 
- /*
-@@ -546,8 +537,6 @@
- extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max);
- extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
- 
--#endif /* _PPC_IO_H */
+-	return ret;
+-}
 -
- #ifdef CONFIG_8260_PCI9
- #include <asm/mpc8260_pci9.h>
- #endif
-@@ -564,3 +553,4 @@
- #define xlate_dev_kmem_ptr(p)	p
+diff -Nur -x CVS linux-2.6.13/arch/ppc/kernel/ppc_ksyms.c linux-2.6.13-apus/arch/ppc/kernel/ppc_ksyms.c
+--- linux-2.6.13/arch/ppc/kernel/ppc_ksyms.c	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/kernel/ppc_ksyms.c	2005-09-18 15:03:35.000000000 +0200
+@@ -68,8 +68,6 @@
+ long long __ashldi3(long long, int);
+ long long __lshrdi3(long long, int);
  
- #endif /* __KERNEL__ */
-+#endif /* _PPC_IO_H */
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/machdep.h 2.6/include/asm-ppc/machdep.h
---- linux-2.6.12/include/asm-ppc/machdep.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/machdep.h	2005-07-31 03:18:37.000000000 +0200
-@@ -8,10 +8,6 @@
- #include <asm/setup.h>
- #include <asm/page.h>
- 
--#ifdef CONFIG_APUS
--#include <asm-m68k/machdep.h>
--#endif
+-extern unsigned long mm_ptov (unsigned long paddr);
 -
- struct pt_regs;
- struct pci_bus;	
- struct pci_dev;
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/pgtable.h 2.6/include/asm-ppc/pgtable.h
---- linux-2.6.12/include/asm-ppc/pgtable.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/pgtable.h	2005-07-31 03:18:37.000000000 +0200
-@@ -679,7 +679,7 @@
- #define pmd_page_kernel(pmd)	\
- 	((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
- #define pmd_page(pmd)		\
--	(mem_map + (pmd_val(pmd) >> PAGE_SHIFT))
-+	pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
- #else
- #define pmd_page_kernel(pmd)	\
- 	((unsigned long) (pmd_val(pmd) & PAGE_MASK))
-diff -Nur -x CVS linux-2.6.12/include/asm-ppc/zorro.h 2.6/include/asm-ppc/zorro.h
---- linux-2.6.12/include/asm-ppc/zorro.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/asm-ppc/zorro.h	2005-08-04 01:48:26.000000000 +0200
-@@ -3,13 +3,50 @@
+ EXPORT_SYMBOL(clear_pages);
+ EXPORT_SYMBOL(clear_user_page);
+ EXPORT_SYMBOL(do_signal);
+@@ -145,7 +143,6 @@
+ EXPORT_SYMBOL(_insl_ns);
+ EXPORT_SYMBOL(_outsl_ns);
+ EXPORT_SYMBOL(iopa);
+-EXPORT_SYMBOL(mm_ptov);
+ EXPORT_SYMBOL(ioremap);
+ #ifdef CONFIG_44x
+ EXPORT_SYMBOL(ioremap64);
+diff -Nur -x CVS linux-2.6.13/arch/ppc/kernel/Makefile linux-2.6.13-apus/arch/ppc/kernel/Makefile
+--- linux-2.6.13/arch/ppc/kernel/Makefile	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/kernel/Makefile	2005-09-18 15:03:35.000000000 +0200
+@@ -9,10 +9,11 @@
+ extra-$(CONFIG_8xx)		:= head_8xx.o
+ extra-$(CONFIG_6xx)		+= idle_6xx.o
+ extra-$(CONFIG_POWER4)		+= idle_power4.o
++extra-y				+= entry.o
+ extra-$(CONFIG_PPC_FPU)		+= fpu.o
+ extra-y				+= vmlinux.lds
  
- #include <asm/io.h>
+-obj-y				:= entry.o traps.o irq.o idle.o time.o misc.o \
++obj-y				:= traps.o irq.o idle.o time.o misc.o \
+ 					process.o signal.o ptrace.o align.o \
+ 					semaphore.o syscalls.o setup.o \
+ 					cputable.o ppc_htab.o perfmon.o
+diff -Nur -x CVS linux-2.6.13/arch/ppc/Makefile linux-2.6.13-apus/arch/ppc/Makefile
+--- linux-2.6.13/arch/ppc/Makefile	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/Makefile	2005-09-18 15:03:35.000000000 +0200
+@@ -52,6 +52,8 @@
+ head-$(CONFIG_44x)		:= arch/ppc/kernel/head_44x.o
+ head-$(CONFIG_FSL_BOOKE)	:= arch/ppc/kernel/head_fsl_booke.o
  
--#define z_readb in_8
--#define z_readw in_be16
--#define z_readl in_be32
--
--#define z_writeb(val, port) out_8((port), (val))
--#define z_writew(val, port) out_be16((port), (val))
--#define z_writel(val, port) out_be32((port), (val))
-+static inline unsigned int z_readb(unsigned long addr)
-+{
-+	unsigned int ret;
-+
-+	ret = *(volatile u8 *)addr;
-+	eieio();
-+	return ret;
-+}
-+
-+static inline unsigned int z_readw(unsigned long addr)
-+{
-+	unsigned int ret;
-+
-+	ret = *(volatile u16 *)addr;
-+	eieio();
-+	return ret;
-+}
-+
-+static inline unsigned int z_readl(unsigned long addr)
-+{
-+	unsigned int ret;
-+
-+	ret = *(volatile u32 *)addr;
-+	eieio();
-+	return ret;
-+}
-+
-+static inline void z_writeb(unsigned int val, unsigned long addr)
-+{
-+	*(volatile u8 *)addr = val;
-+	eieio();
-+}
-+
-+static inline void z_writew(unsigned int val, unsigned long addr)
-+{
-+	*(volatile u16 *)addr = val;
-+	eieio();
-+}
-+
-+static inline void z_writel(unsigned int val,unsigned long addr)
-+{
-+	*(volatile u32 *)addr = val;
-+	eieio();
-+}
++head-y				+= arch/ppc/mm/hashtable.o
++head-y				+= arch/ppc/kernel/entry.o
+ head-$(CONFIG_6xx)		+= arch/ppc/kernel/idle_6xx.o
+ head-$(CONFIG_POWER4)		+= arch/ppc/kernel/idle_power4.o
+ head-$(CONFIG_PPC_FPU)		+= arch/ppc/kernel/fpu.o
+@@ -74,7 +76,9 @@
  
- #define z_memset_io(a,b,c)	memset((void *)(a),(b),(c))
- #define z_memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))
-@@ -19,7 +56,6 @@
- 		       unsigned long flags);
+ .PHONY: $(BOOT_TARGETS)
  
- extern void *ioremap(unsigned long address, unsigned long size);
--extern void iounmap(void *addr);
++ifndef CONFIG_APUS
+ all: uImage zImage
++endif
  
- extern void *__ioremap(unsigned long address, unsigned long size,
-                        unsigned long flags);
-diff -Nur -x CVS linux-2.6.12/include/video/vga.h 2.6/include/video/vga.h
---- linux-2.6.12/include/video/vga.h	2005-06-17 21:48:29.000000000 +0200
-+++ 2.6/include/video/vga.h	2005-07-30 20:52:54.000000000 +0200
-@@ -28,6 +28,7 @@
-  * Ugh, we don't have PCI space, so map readb() and friends to use Zorro space
-  * for MMIO accesses. This should make cirrusfb work again on Amiga
-  */
-+#include <asm/zorro.h>
- #undef inb_p
- #undef inw_p
- #undef outb_p
-@@ -36,11 +37,17 @@
- #undef writeb
- #undef writew
- #define inb_p(port)	0
-+#undef inw_p
- #define inw_p(port)	0
-+#undef outb_p
- #define outb_p(port, val)	do { } while (0)
-+#undef outw
- #define outw(port, val)		do { } while (0)
-+#undef readb
- #define readb		z_readb
-+#undef writeb
- #define writeb		z_writeb
-+#undef writew
- #define writew		z_writew
- #endif
- #include <asm/byteorder.h>
+ CPPFLAGS_vmlinux.lds	:= -Upowerpc
+ 
+diff -Nur -x CVS linux-2.6.13/arch/ppc/kernel/misc.S linux-2.6.13-apus/arch/ppc/kernel/misc.S
+--- linux-2.6.13/arch/ppc/kernel/misc.S	2005-08-29 01:41:01.000000000 +0200
++++ linux-2.6.13-apus/arch/ppc/kernel/misc.S	2005-09-18 15:03:35.000000000 +0200
+@@ -1377,7 +1377,11 @@
+ 	.long sys_fstat64
+ 	.long sys_pciconfig_read
+ 	.long sys_pciconfig_write
++#ifdef CONFIG_PCI
+ 	.long sys_pciconfig_iobase 	/* 200 */
++#else
++	.long sys_ni_syscall
++#endif
+ 	.long sys_ni_syscall		/* 201 - reserved - MacOnLinux - new */
+ 	.long sys_getdents64
+ 	.long sys_pivot_root

Modified: dists/trunk/linux-2.6/debian/patches-debian/series/2.6.13-1
===================================================================
--- dists/trunk/linux-2.6/debian/patches-debian/series/2.6.13-1	2005-09-23 13:32:45 UTC (rev 4263)
+++ dists/trunk/linux-2.6/debian/patches-debian/series/2.6.13-1	2005-09-23 19:12:00 UTC (rev 4264)
@@ -23,3 +23,5 @@
 + powerpc-mv643xx-hotplug-support.patch
 + patch-2.6.13.2
 + amd64-tlb-flush-sigsegv-fix.patch
++ powerpc-apus.patch
+




More information about the Kernel-svn-changes mailing list