[Galaxy 3 Android Development] Dharam_Maniar:
Difference in arch folder:

diff -crB Linux/arch G3/arch > arch.patch

diff -crB Linux/arch/arm/boot/compressed/head.S G3/arch/arm/boot/compressed/head.S
*** Linux/arch/arm/boot/compressed/head.S	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/boot/compressed/head.S	2011-02-26 04:41:29.000000000 -0800
***************
*** 21,27 ****

#if defined(CONFIG_DEBUG_ICEDCC)

! #ifdef CONFIG_CPU_V6
.macro	loadsp, rb
.endm
.macro	writeb, ch, rb
--- 21,27 ----

#if defined(CONFIG_DEBUG_ICEDCC)

! #ifdef defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V7)
.macro	loadsp, rb
.endm
.macro	writeb, ch, rb
***************
*** 620,625 ****
--- 620,627 ----
@	b	__arm6_mmu_cache_off
@	b	__armv3_mmu_cache_flush

+ #if !defined(CONFIG_CPU_V7)
+	/* This collides with some V7 IDs, preventing correct detection */
.word	0x00000000	@ old ARM ID
.word	0x0000f000
mov	pc, lr
***************
*** 628,633 ****
--- 630,636 ----
THUMB(	nop	)
mov	pc, lr
THUMB(	nop	)
+ #endif

.word	0x41007000	@ ARM7/710
.word	0xfff8fe00
diff -crB Linux/arch/arm/boot/compressed/misc.c G3/arch/arm/boot/compressed/misc.c
*** Linux/arch/arm/boot/compressed/misc.c	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/boot/compressed/misc.c	2011-02-26 04:41:29.000000000 -0800
***************
*** 33,39 ****

#ifdef CONFIG_DEBUG_ICEDCC

! #ifdef CONFIG_CPU_V6

static void icedcc_putc(int ch)
{
--- 33,39 ----

#ifdef CONFIG_DEBUG_ICEDCC

! #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V7)

static void icedcc_putc(int ch)
{
Only in G3/arch/arm/configs: apollo_rev_02_android_defconfig
diff -crB Linux/arch/arm/configs/msm_defconfig G3/arch/arm/configs/msm_defconfig
*** Linux/arch/arm/configs/msm_defconfig	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/configs/msm_defconfig	2011-02-26 04:41:29.000000000 -0800
***************
*** 69,74 ****
--- 69,75 ----
CONFIG_SIGNALFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
+ CONFIG_ASHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
***************
*** 256,261 ****
--- 257,263 ----
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
+ CONFIG_ANDROID_PARANOID_NETWORK=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
diff -crB Linux/arch/arm/include/asm/cacheflush.h G3/arch/arm/include/asm/cacheflush.h
*** Linux/arch/arm/include/asm/cacheflush.h	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/include/asm/cacheflush.h	2011-02-26 04:41:29.000000000 -0800
***************
*** 381,387 ****
* Harvard caches are synchronised for the user space address range.
* This is used for the ARM private sys_cacheflush system call.
*/
! #define flush_cache_user_range(vma,start,end) \
__cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end))

/*
--- 381,387 ----
* Harvard caches are synchronised for the user space address range.
* This is used for the ARM private sys_cacheflush system call.
*/
! #define flush_cache_user_range(start,end) \
__cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end))

/*
diff -crB Linux/arch/arm/Kconfig G3/arch/arm/Kconfig
*** Linux/arch/arm/Kconfig	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/Kconfig	2011-02-26 04:41:29.000000000 -0800
***************
*** 627,632 ****
--- 627,640 ----
help
Samsung S5PC1XX series based systems

+ config ARCH_S5P64XX
+	bool "Samsung S5P64XX"
+	select GENERIC_GPIO
+ select ARCH_HAS_CPUFREQ
+	select HAVE_CLK
+	help
+	Samsung S5P64XX series based systems
+
config ARCH_SHARK
bool "Shark"
select CPU_SA110
***************
*** 751,756 ****
--- 759,766 ----
source "arch/arm/plat-s3c64xx/Kconfig"
source "arch/arm/plat-s3c/Kconfig"
source "arch/arm/plat-s5pc1xx/Kconfig"
+ source "arch/arm/plat-s5p64xx/Kconfig"
+ source "arch/arm/plat-s5p/Kconfig"

if ARCH_S3C2410
source "arch/arm/mach-s3c2400/Kconfig"
***************
*** 772,777 ****
--- 782,791 ----
source "arch/arm/mach-s5pc100/Kconfig"
endif

+ if ARCH_S5P64XX
+ source "arch/arm/mach-s5p6442/Kconfig"
+ endif
+
source "arch/arm/mach-lh7a40x/Kconfig"

source "arch/arm/mach-h720x/Kconfig"
***************
*** 948,953 ****
--- 962,981 ----

endmenu

+ menu "Samsung Kernel Debug Features"
+
+ choice
+ prompt "Enable Samsung Kernel Debug Features"
+ default KERNEL_DEBUG_SEC
+
+ config KERNEL_DEBUG_SEC
+ bool "KERNEL_DEBUG_SEC"
+
+ endchoice
+
+ endmenu
+
+
menu "Kernel Features"

source "kernel/time/Kconfig"
***************
*** 1041,1047 ****
config HZ
int
default 128 if ARCH_L7200
!	default 200 if ARCH_EBSA110 || ARCH_S3C2410
default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
default AT91_TIMER_HZ if ARCH_AT91
default 100
--- 1069,1076 ----
config HZ
int
default 128 if ARCH_L7200
!	default 200 if ARCH_EBSA110 || ARCH_S3C2410 || (ARCH_S5P64XX && !HRT_RTC)
!	default 256 if ARCH_S5P64XX && HRT_RTC
default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
default AT91_TIMER_HZ if ARCH_AT91
default 100
***************
*** 1137,1142 ****
--- 1166,1178 ----
depends on HIGHMEM
depends on !OUTER_CACHE

+ config VMALLOC_RESERVE
+ hex "Reserved vmalloc space"
+	default 0x08000000
+	depends on MMU
+	help
+	Reserved vmalloc space if not specified on the kernel commandline.
+
source "mm/Kconfig"

config LEDS
***************
*** 1508,1513 ****
--- 1544,1551 ----

source "drivers/Kconfig"

+ source "drivers/sensor/Kconfig"
+
source "fs/Kconfig"

source "arch/arm/Kconfig.debug"
diff -crB Linux/arch/arm/kernel/debug.S G3/arch/arm/kernel/debug.S
*** Linux/arch/arm/kernel/debug.S	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/kernel/debug.S	2011-02-26 04:41:29.000000000 -0800
***************
*** 22,28 ****
#if defined(CONFIG_DEBUG_ICEDCC)
@@ debug using ARM EmbeddedICE DCC channel

! #if defined(CONFIG_CPU_V6)

.macro	addruart, rx
.endm
--- 22,28 ----
#if defined(CONFIG_DEBUG_ICEDCC)
@@ debug using ARM EmbeddedICE DCC channel

! #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V7)

.macro	addruart, rx
.endm
diff -crB Linux/arch/arm/kernel/entry-armv.S G3/arch/arm/kernel/entry-armv.S
*** Linux/arch/arm/kernel/entry-armv.S	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/kernel/entry-armv.S	2011-02-26 04:41:29.000000000 -0800
***************
*** 741,750 ****
#endif
#if defined(CONFIG_HAS_TLS_REG)
mcr	p15, 0, r3, c13, c0, 3	@ set TLS register
! #elif !defined(CONFIG_TLS_REG_EMUL)
mov	r4, #0xffff0fff
str	r3, [r4, #-15]	@ TLS val at 0xffff0ff0
! #endif
#ifdef CONFIG_MMU
mcr	p15, 0, r6, c3, c0, 0	@ Set domain register
#endif
--- 741,751 ----
#endif
#if defined(CONFIG_HAS_TLS_REG)
mcr	p15, 0, r3, c13, c0, 3	@ set TLS register
! //#elif !defined(CONFIG_TLS_REG_EMUL)
! #endif
mov	r4, #0xffff0fff
str	r3, [r4, #-15]	@ TLS val at 0xffff0ff0
! //#endif
#ifdef CONFIG_MMU
mcr	p15, 0, r6, c3, c0, 0	@ Set domain register
#endif
diff -crB Linux/arch/arm/kernel/process.c G3/arch/arm/kernel/process.c
*** Linux/arch/arm/kernel/process.c	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/kernel/process.c	2011-02-26 04:41:29.000000000 -0800
***************
*** 206,211 ****
--- 206,282 ----
arm_pm_restart(reboot_mode, cmd);
}

+ /*
+ * dump a block of kernel memory from around the given address
+ */
+ static void show_data(unsigned long addr, int nbytes, const char *name)
+ {
+	int	i, j;
+	int	nlines;
+	u32	*p;
+
+	/*
+	* don't attempt to dump non-kernel addresses or
+	* values that are probably just small negative numbers
+	*/
+	if (addr < PAGE_OFFSET || addr > -256UL)
+	return;
+
+	printk("\n%s: %#lx:\n", name, addr);
+
+	/*
+	* round address down to a 32 bit boundary
+	* and always dump a multiple of 32 bytes
+	*/
+	p = (u32 *)(addr & ~(sizeof(u32) - 1));
+	nbytes += (addr & (sizeof(u32) - 1));
+	nlines = (nbytes + 31) / 32;
+
+
+	for (i = 0; i < nlines; i++) {
+	/*
+	* just display low 16 bits of address to keep
+	* each line of the dump < 80 characters
+	*/
+	printk("%04lx ", (unsigned long)p & 0xffff);
+	for (j = 0; j < 8; j++) {
+	u32	data;
+	if (probe_kernel_address(p, data)) {
+	printk(" ********");
+	} else {
+	printk(" %08x", data);
+	}
+	++p;
+	}
+	printk("\n");
+	}
+ }
+
+ static void show_extra_register_data(struct pt_regs *regs, int nbytes)
+ {
+	mm_segment_t fs;
+
+	fs = get_fs();
+	set_fs(KERNEL_DS);
+	show_data(regs->ARM_pc - nbytes, nbytes * 2, "PC");
+	show_data(regs->ARM_lr - nbytes, nbytes * 2, "LR");
+	show_data(regs->ARM_sp - nbytes, nbytes * 2, "SP");
+	show_data(regs->ARM_ip - nbytes, nbytes * 2, "IP");
+	show_data(regs->ARM_fp - nbytes, nbytes * 2, "FP");
+	show_data(regs->ARM_r0 - nbytes, nbytes * 2, "R0");
+	show_data(regs->ARM_r1 - nbytes, nbytes * 2, "R1");
+	show_data(regs->ARM_r2 - nbytes, nbytes * 2, "R2");
+	show_data(regs->ARM_r3 - nbytes, nbytes * 2, "R3");
+	show_data(regs->ARM_r4 - nbytes, nbytes * 2, "R4");
+	show_data(regs->ARM_r5 - nbytes, nbytes * 2, "R5");
+	show_data(regs->ARM_r6 - nbytes, nbytes * 2, "R6");
+	show_data(regs->ARM_r7 - nbytes, nbytes * 2, "R7");
+	show_data(regs->ARM_r8 - nbytes, nbytes * 2, "R8");
+	show_data(regs->ARM_r9 - nbytes, nbytes * 2, "R9");
+	show_data(regs->ARM_r10 - nbytes, nbytes * 2, "R10");
+	set_fs(fs);
+ }
+
void __show_regs(struct pt_regs *regs)
{
unsigned long flags;
***************
*** 264,269 ****
--- 335,342 ----
printk("Control: %08x%s\n", ctrl, buf);
}
#endif
+
+	show_extra_register_data(regs, 128);
}

void show_regs(struct pt_regs * regs)
diff -crB Linux/arch/arm/kernel/setup.c G3/arch/arm/kernel/setup.c
*** Linux/arch/arm/kernel/setup.c	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/kernel/setup.c	2011-02-26 04:41:29.000000000 -0800
***************
*** 211,216 ****
--- 211,223 ----
if (cpu_arch)
cpu_arch += CPU_ARCH_ARMv3;
} else if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {
+ #ifdef CONFIG_CPU_V6
+	/* This patch is to detect CPU arch for ARM1176JZF-S.
+	* The ARM1176JZF-S has VMSAv7 memory model(same as cortex)
+	* but it is not the ARMv7 architecture.
+	*/
+	return CPU_ARCH_ARMv6;
+ #else
unsigned int mmfr0;

/* Revised CPUID format. Read the Memory Model Feature
***************
*** 225,230 ****
--- 232,238 ----
cpu_arch = CPU_ARCH_ARMv6;
else
cpu_arch = CPU_ARCH_UNKNOWN;
+ #endif
} else
cpu_arch = CPU_ARCH_UNKNOWN;

diff -crB Linux/arch/arm/kernel/signal.c G3/arch/arm/kernel/signal.c
*** Linux/arch/arm/kernel/signal.c	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/kernel/signal.c	2011-02-26 04:41:29.000000000 -0800
***************
*** 517,522 ****
--- 517,530 ----

static inline void setup_syscall_restart(struct pt_regs *regs)
{
+	if (regs->ARM_ORIG_r0 == -ERESTARTNOHAND ||
+	regs->ARM_ORIG_r0 == -ERESTARTSYS ||
+	regs->ARM_ORIG_r0 == -ERESTARTNOINTR ||
+	regs->ARM_ORIG_r0 == -ERESTART_RESTARTBLOCK) {
+	/* the syscall cannot be safely restarted, return -EINTR instead */
+	regs->ARM_r0 = -EINTR;
+	return;
+	}
regs->ARM_r0 = regs->ARM_ORIG_r0;
regs->ARM_pc -= thumb_mode(regs) ? 2 : 4;
}
***************
*** 649,654 ****
--- 657,663 ----
*/
if (syscall) {
if (regs->ARM_r0 == -ERESTART_RESTARTBLOCK) {
+	regs->ARM_r0 = -EAGAIN; /* prevent multiple restarts */
if (thumb_mode(regs)) {
regs->ARM_r7 = __NR_restart_syscall - __NR_SYSCALL_BASE;
regs->ARM_pc -= 2;
diff -crB Linux/arch/arm/kernel/traps.c G3/arch/arm/kernel/traps.c
*** Linux/arch/arm/kernel/traps.c	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/kernel/traps.c	2011-02-26 04:41:29.000000000 -0800
***************
*** 438,444 ****
if (end > vma->vm_end)
end = vma->vm_end;

!	flush_cache_user_range(vma, start, end);
}
up_read(&mm->mmap_sem);
}
--- 438,446 ----
if (end > vma->vm_end)
end = vma->vm_end;

!	up_read(&mm->mmap_sem);
!	flush_cache_user_range(start, end);
!	return;
}
up_read(&mm->mmap_sem);
}
***************
*** 505,511 ****
thread->tp_value = regs->ARM_r0;
#if defined(CONFIG_HAS_TLS_REG)
asm ("mcr p15, 0, %0, c13, c0, 3" : : "r" (regs->ARM_r0) );
! #elif !defined(CONFIG_TLS_REG_EMUL)
/*
* User space must never try to access this directly.
* Expect your app to break eventually if you do so.
--- 507,514 ----
thread->tp_value = regs->ARM_r0;
#if defined(CONFIG_HAS_TLS_REG)
asm ("mcr p15, 0, %0, c13, c0, 3" : : "r" (regs->ARM_r0) );
! //#elif !defined(CONFIG_TLS_REG_EMUL)
! #endif
/*
* User space must never try to access this directly.
* Expect your app to break eventually if you do so.
***************
*** 513,519 ****
* (see entry-armv.S for details)
*/
*((unsigned int *)0xffff0ff0) = regs->ARM_r0;
! #endif
return 0;

#ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG
--- 516,522 ----
* (see entry-armv.S for details)
*/
*((unsigned int *)0xffff0ff0) = regs->ARM_r0;
! //#endif
return 0;

#ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG
Only in G3/arch/arm: mach-s5p6442
diff -crB Linux/arch/arm/Makefile G3/arch/arm/Makefile
*** Linux/arch/arm/Makefile	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/Makefile	2011-02-26 04:41:29.000000000 -0800
***************
*** 161,166 ****
--- 161,167 ----
machine-$(CONFIG_ARCH_S3C24A0)	:= s3c24a0
machine-$(CONFIG_ARCH_S3C64XX)	:= s3c6400 s3c6410
machine-$(CONFIG_ARCH_S5PC1XX)	:= s5pc100
+ machine-$(CONFIG_ARCH_S5P64XX)	:= s5p6442
machine-$(CONFIG_ARCH_SA1100)	:= sa1100
machine-$(CONFIG_ARCH_SHARK)	:= shark
machine-$(CONFIG_ARCH_STMP378X)	:= stmp378x
***************
*** 181,186 ****
--- 182,188 ----
plat-$(CONFIG_PLAT_S3C24XX)	:= s3c24xx s3c
plat-$(CONFIG_PLAT_S3C64XX)	:= s3c64xx s3c
plat-$(CONFIG_PLAT_S5PC1XX)	:= s5pc1xx s3c
+ plat-$(CONFIG_PLAT_S5P64XX)	:= s5p64xx s5p
plat-$(CONFIG_ARCH_STMP3XXX)	:= stmp3xxx

ifeq ($(CONFIG_ARCH_EBSA110),y)
diff -crB Linux/arch/arm/mm/cache-v6.S G3/arch/arm/mm/cache-v6.S
*** Linux/arch/arm/mm/cache-v6.S	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/mm/cache-v6.S	2011-02-26 04:41:30.000000000 -0800
***************
*** 248,253 ****
--- 248,258 ----
*	- end - virtual end address of region
*/
ENTRY(v6_dma_flush_range)
+ #ifdef CONFIG_CACHE_FLUSH_RANGE_LIMIT
+	sub	r2, r1, r0
+	cmp	r2, #CONFIG_CACHE_FLUSH_RANGE_LIMIT
+	bhi	v6_dma_flush_dcache_all
+ #endif
bic	r0, r0, #D_CACHE_LINE_SIZE - 1
1:
#ifdef HARVARD_CACHE
***************
*** 262,267 ****
--- 267,284 ----
mcr	p15, 0, r0, c7, c10, 4	@ drain write buffer
mov	pc, lr

+ #ifdef CONFIG_CACHE_FLUSH_RANGE_LIMIT
+ v6_dma_flush_dcache_all:
+	mov	r0, #0
+ #ifdef HARVARD_CACHE
+	mcr	p15, 0, r0, c7, c14, 0	@ D cache clean+invalidate
+ #else
+	mcr	p15, 0, r0, c7, c15, 0	@ Cache clean+invalidate
+ #endif
+	mcr	p15, 0, r0, c7, c10, 4	@ drain write buffer
+	mov	pc, lr
+ #endif
+
__INITDATA

.type	v6_cache_fns, #object
diff -crB Linux/arch/arm/mm/Kconfig G3/arch/arm/mm/Kconfig
*** Linux/arch/arm/mm/Kconfig	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/mm/Kconfig	2011-02-26 04:41:30.000000000 -0800
***************
*** 388,394 ****

# ARMv6
config CPU_V6
!	bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX
select CPU_32v6
select CPU_ABRT_EV6
select CPU_PABRT_V6
--- 388,394 ----

# ARMv6
config CPU_V6
!	bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || ARCH_S5P64XX
select CPU_32v6
select CPU_ABRT_EV6
select CPU_PABRT_V6
Only in G3/arch/arm: plat-s5p
Only in G3/arch/arm: plat-s5p64xx
diff -crB Linux/arch/arm/tools/mach-types G3/arch/arm/tools/mach-types
*** Linux/arch/arm/tools/mach-types	2010-02-23 07:38:51.000000000 -0800
--- G3/arch/arm/tools/mach-types	2011-02-26 04:41:31.000000000 -0800
***************
*** 2128,2134 ****
dm355_leopard	MACH_DM355_LEOPARD	DM355_LEOPARD	2138
ts219	MACH_TS219	TS219	2139
tny_a9263	MACH_TNY_A9263	TNY_A9263	2140
- apollo	MACH_APOLLO	APOLLO	2141
at91cap9stk	MACH_AT91CAP9STK	AT91CAP9STK	2142
spc300	MACH_SPC300	SPC300	2143
eko	MACH_EKO	EKO	2144
--- 2128,2133 ----
***************
*** 2309,2314 ****
--- 2308,2314 ----
sbox9263	MACH_SBOX9263	SBOX9263	2322
oreo	MACH_OREO	OREO	2323
smdk6442	MACH_SMDK6442	SMDK6442	2324
+ apollo	MACH_APOLLO	APOLLO	2324
openrd_base	MACH_OPENRD_BASE	OPENRD_BASE	2325
incredible	MACH_INCREDIBLE	INCREDIBLE	2326
incrediblec	MACH_INCREDIBLEC	INCREDIBLEC	2327