From 7cddc397027ddf80b2d916f6e8fb15a21e9791c5 Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Mon, 3 Jul 2006 12:26:02 +0100 Subject: [PATCH 1/8] [ARM] 3708/2: fix SMP build after section ioremap changes Patch from Lennert Buytenhek Commit ff0daca525dde796382b9ccd563f169df2571211 broke the SMP build, this patch fixes it up again. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King --- arch/arm/mm/ioremap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 7eac87f05180..3e86fe7c333d 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -369,6 +369,7 @@ void __iounmap(void __iomem *addr) addr = (void __iomem *)(PAGE_MASK & (unsigned long)addr); +#ifndef CONFIG_SMP /* * If this is a section based mapping we need to handle it * specially as the VM subysystem does not know how to handle @@ -390,6 +391,7 @@ void __iounmap(void __iomem *addr) } } write_unlock(&vmlist_lock); +#endif if (!section_mapping) vunmap(addr); From 00eb0f6b6595107dd8be80d1af2220cedb71130d Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Jul 2006 12:36:07 +0100 Subject: [PATCH 2/8] [ARM] More missing proc-macros.S includes Signed-off-by: Russell King --- arch/arm/mm/proc-arm1020.S | 2 ++ arch/arm/mm/proc-arm1020e.S | 2 ++ arch/arm/mm/proc-arm1022.S | 2 ++ arch/arm/mm/proc-arm1026.S | 2 ++ 4 files changed, 8 insertions(+) diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 700297ae4a55..1d8316f3cecf 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S @@ -34,6 +34,8 @@ #include #include +#include "proc-macros.S" + /* * This is the maximum size of an area which will be invalidated * using the single invalidate entry instructions. Anything larger diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 0c33a5ed5a61..89b1d6d3d7c0 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S @@ -34,6 +34,8 @@ #include #include +#include "proc-macros.S" + /* * This is the maximum size of an area which will be invalidated * using the single invalidate entry instructions. Anything larger diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 566a55653072..a089528e6bce 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S @@ -23,6 +23,8 @@ #include #include +#include "proc-macros.S" + /* * This is the maximum size of an area which will be invalidated * using the single invalidate entry instructions. Anything larger diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 6ea76321d0df..d6d84d92c7c7 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S @@ -23,6 +23,8 @@ #include #include +#include "proc-macros.S" + /* * This is the maximum size of an area which will be invalidated * using the single invalidate entry instructions. Anything larger From 906243d07b8bfebeaa05b5aeaa0e5ab2d4034954 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Jul 2006 12:44:30 +0100 Subject: [PATCH 3/8] [ARM] Fix bad asm instruction in proc-arm925.S Signed-off-by: Russell King --- arch/arm/mm/proc-arm925.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index ad15f8503d51..8d9a9f93b011 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S @@ -454,7 +454,8 @@ __arm925_setup: mcr p15, 7, r0, c15, c0, 0 #endif - adr r5, {r5, r6} + adr r5, arm925_crval + ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 bic r0, r0, r5 orr r0, r0, r6 From 020732ad9add86b71e9d90d5fa7687d51f58ef49 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Jul 2006 13:18:04 +0100 Subject: [PATCH 4/8] [ARM] Fix ISA IRQ resources The ISA IRQ code was not using named initialisers, so merging the 64-bit resource code (which re-ordered the struct members) broke this. Fix it up to use named initialisers. Signed-off-by: Russell King --- arch/arm/mach-footbridge/isa-irq.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c index e1c43b331d64..87448c2d6baa 100644 --- a/arch/arm/mach-footbridge/isa-irq.c +++ b/arch/arm/mach-footbridge/isa-irq.c @@ -98,9 +98,22 @@ isa_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) desc_handle_irq(isa_irq, desc, regs); } -static struct irqaction irq_cascade = { .handler = no_action, .name = "cascade", }; -static struct resource pic1_resource = { "pic1", 0x20, 0x3f }; -static struct resource pic2_resource = { "pic2", 0xa0, 0xbf }; +static struct irqaction irq_cascade = { + .handler = no_action, + .name = "cascade", +}; + +static struct resource pic1_resource = { + .name = "pic1", + .start = 0x20, + .end = 0x3f, +}; + +static struct resource pic2_resource = { + .name = "pic2", + .start = 0xa0, + .end = 0xbf, +}; void __init isa_init_irq(unsigned int host_irq) { From c9e4143c4df08f7b54ba2099480266a6a1303f17 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Jul 2006 13:29:03 +0100 Subject: [PATCH 5/8] [ARM] Fix ecard.c resource warnings. Platforms which use ecard.c always have 32-bit resources, so might as well lose the "long" format strings. Signed-off-by: Russell King --- arch/arm/kernel/ecard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index ab4ad9562eee..b9a74a741d00 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c @@ -883,7 +883,7 @@ static ssize_t ecard_show_resources(struct device *dev, struct device_attribute int i; for (i = 0; i < ECARD_NUM_RESOURCES; i++) - str += sprintf(str, "%08lx %08lx %08lx\n", + str += sprintf(str, "%08x %08x %08lx\n", ec->resource[i].start, ec->resource[i].end, ec->resource[i].flags); From 4e19025bc7be18e4d1dc8d1fde06c2d23927eb4d Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Jul 2006 13:29:38 +0100 Subject: [PATCH 6/8] [ARM] Fix warnings in arch/arm/kernel/setup.c cr_alignment is unsigned long, so should be the format string. Signed-off-by: Russell King --- arch/arm/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 7d6a516c0b9f..ed1c4d62d999 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -344,7 +344,7 @@ static void __init setup_processor(void) cpu_cache = *list->cache; #endif - printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08x\n", + printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n", cpu_name, processor_id, (int)processor_id & 15, proc_arch[cpu_architecture()], cr_alignment); From 67f3a58856b6a41a46e9256a79a8ca3809f47cc6 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Jul 2006 13:30:52 +0100 Subject: [PATCH 7/8] [ARM] Fix warning in consistent.c No need for 'cr' to be a local variable, which is unused in the SMP case, and only used once in the UP case. Just call get_cr() directly. Signed-off-by: Russell King --- arch/arm/mm/ioremap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 3e86fe7c333d..dba7dddfe57d 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -303,7 +303,6 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, int err; unsigned long addr; struct vm_struct * area; - unsigned int cr = get_cr(); /* * High mappings must be supersection aligned @@ -317,7 +316,7 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, addr = (unsigned long)area->addr; #ifndef CONFIG_SMP - if ((((cpu_architecture() >= CPU_ARCH_ARMv6) && (cr & CR_XP)) || + if ((((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) || cpu_is_xsc3()) && !((__pfn_to_phys(pfn) | size | addr) & ~SUPERSECTION_MASK)) { area->flags |= VM_ARM_SECTION_MAPPING; From 0f1482fdd7e5efc473335b92f350027b8f1519fb Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Jul 2006 15:32:47 +0100 Subject: [PATCH 8/8] [ARM] Fix lh7a40x_udc.c In 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24, I broke this driver by missing a comma. Replace the missing comma. Signed-off-by: Russell King --- drivers/usb/gadget/lh7a40x_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index bb22b7e82877..36db72579377 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c @@ -2143,7 +2143,7 @@ static int lh7a40x_udc_remove(struct platform_device *pdev) static struct platform_driver udc_driver = { .probe = lh7a40x_udc_probe, - .remove = lh7a40x_udc_remove + .remove = lh7a40x_udc_remove, /* FIXME power management support */ /* .suspend = ... disable UDC */ /* .resume = ... re-enable UDC */