X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fixp4xx%2Fpatches-2.6.35%2F603-arm-kluin-array-indexing.patch;fp=target%2Flinux%2Fixp4xx%2Fpatches-2.6.35%2F603-arm-kluin-array-indexing.patch;h=3a8c80d742c8a12ddb2577c4f9b9c4ad04f76cfe;hb=7381af220753659c993078058c0dc2fbe7751832;hp=0000000000000000000000000000000000000000;hpb=7cf04396c56e6e8272eb7e1a22b7b71549989fed;p=openwrt%2Fstaging%2Fdedeckeh.git diff --git a/target/linux/ixp4xx/patches-2.6.35/603-arm-kluin-array-indexing.patch b/target/linux/ixp4xx/patches-2.6.35/603-arm-kluin-array-indexing.patch new file mode 100644 index 0000000000..3a8c80d742 --- /dev/null +++ b/target/linux/ixp4xx/patches-2.6.35/603-arm-kluin-array-indexing.patch @@ -0,0 +1,33 @@ +--- a/arch/arm/kernel/setup.c ++++ b/arch/arm/kernel/setup.c +@@ -323,12 +323,13 @@ static void __init setup_processor(void) + void cpu_init(void) + { + unsigned int cpu = smp_processor_id(); +- struct stack *stk = &stacks[cpu]; ++ struct stack *stk; + + if (cpu >= NR_CPUS) { + printk(KERN_CRIT "CPU%u: bad primary CPU number\n", cpu); + BUG(); + } ++ stk = &stacks[cpu]; + + /* + * Define the placement constraint for the inline asm directive below. +@@ -387,13 +388,14 @@ static struct machine_desc * __init setu + + static int __init arm_add_memory(unsigned long start, unsigned long size) + { +- struct membank *bank = &meminfo.bank[meminfo.nr_banks]; ++ struct membank *bank; + + if (meminfo.nr_banks >= NR_BANKS) { + printk(KERN_CRIT "NR_BANKS too low, " + "ignoring memory at %#lx\n", start); + return -EINVAL; + } ++ bank = &meminfo.bank[meminfo.nr_banks]; + + /* + * Ensure that start/size are aligned to a page boundary.