aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-02-12 18:08:21 -0500
committerOlof Johansson <olof@lixom.net>2013-02-12 18:08:21 -0500
commit2cb6a0708e6680f0b8e6f3ab6b0a46d1c19d8b39 (patch)
treeb81bc4cc720e6a86498de1edc675e24845e611e0 /arch/arm
parent78d9b8055b9aaf53ced11fc15728df31610a21e9 (diff)
parent836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff)
Merge tag 'v3.8-rc7' into next/boards
Linux 3.8-rc7
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/common/gic.c25
-rw-r--r--arch/arm/include/asm/memory.h2
-rw-r--r--arch/arm/mach-exynos/Kconfig2
-rw-r--r--arch/arm/mach-realview/include/mach/irqs-eb.h2
-rw-r--r--arch/arm/mm/dma-mapping.c2
5 files changed, 27 insertions, 6 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index 36ae03a3f5d1..87dfa9026c5b 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -351,6 +351,25 @@ void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq)
351 irq_set_chained_handler(irq, gic_handle_cascade_irq); 351 irq_set_chained_handler(irq, gic_handle_cascade_irq);
352} 352}
353 353
354static u8 gic_get_cpumask(struct gic_chip_data *gic)
355{
356 void __iomem *base = gic_data_dist_base(gic);
357 u32 mask, i;
358
359 for (i = mask = 0; i < 32; i += 4) {
360 mask = readl_relaxed(base + GIC_DIST_TARGET + i);
361 mask |= mask >> 16;
362 mask |= mask >> 8;
363 if (mask)
364 break;
365 }
366
367 if (!mask)
368 pr_crit("GIC CPU mask not found - kernel will fail to boot.\n");
369
370 return mask;
371}
372
354static void __init gic_dist_init(struct gic_chip_data *gic) 373static void __init gic_dist_init(struct gic_chip_data *gic)
355{ 374{
356 unsigned int i; 375 unsigned int i;
@@ -369,7 +388,9 @@ static void __init gic_dist_init(struct gic_chip_data *gic)
369 /* 388 /*
370 * Set all global interrupts to this CPU only. 389 * Set all global interrupts to this CPU only.
371 */ 390 */
372 cpumask = readl_relaxed(base + GIC_DIST_TARGET + 0); 391 cpumask = gic_get_cpumask(gic);
392 cpumask |= cpumask << 8;
393 cpumask |= cpumask << 16;
373 for (i = 32; i < gic_irqs; i += 4) 394 for (i = 32; i < gic_irqs; i += 4)
374 writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4); 395 writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4);
375 396
@@ -400,7 +421,7 @@ static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
400 * Get what the GIC says our CPU mask is. 421 * Get what the GIC says our CPU mask is.
401 */ 422 */
402 BUG_ON(cpu >= NR_GIC_CPU_IF); 423 BUG_ON(cpu >= NR_GIC_CPU_IF);
403 cpu_mask = readl_relaxed(dist_base + GIC_DIST_TARGET + 0); 424 cpu_mask = gic_get_cpumask(gic);
404 gic_cpu_map[cpu] = cpu_mask; 425 gic_cpu_map[cpu] = cpu_mask;
405 426
406 /* 427 /*
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 73cf03aa981e..1c4df27f9332 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -37,7 +37,7 @@
37 */ 37 */
38#define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET) 38#define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET)
39#define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(0x01000000)) 39#define TASK_SIZE (UL(CONFIG_PAGE_OFFSET) - UL(0x01000000))
40#define TASK_UNMAPPED_BASE (UL(CONFIG_PAGE_OFFSET) / 3) 40#define TASK_UNMAPPED_BASE ALIGN(TASK_SIZE / 3, SZ_16M)
41 41
42/* 42/*
43 * The maximum size of a 26-bit user space task. 43 * The maximum size of a 26-bit user space task.
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index e103c290bc9e..85afb031b676 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -414,7 +414,7 @@ config MACH_EXYNOS4_DT
414 select CPU_EXYNOS4210 414 select CPU_EXYNOS4210
415 select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD 415 select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD
416 select PINCTRL 416 select PINCTRL
417 select PINCTRL_EXYNOS4 417 select PINCTRL_EXYNOS
418 select USE_OF 418 select USE_OF
419 help 419 help
420 Machine support for Samsung Exynos4 machine with device tree enabled. 420 Machine support for Samsung Exynos4 machine with device tree enabled.
diff --git a/arch/arm/mach-realview/include/mach/irqs-eb.h b/arch/arm/mach-realview/include/mach/irqs-eb.h
index d6b5073692d2..44754230fdcc 100644
--- a/arch/arm/mach-realview/include/mach/irqs-eb.h
+++ b/arch/arm/mach-realview/include/mach/irqs-eb.h
@@ -115,7 +115,7 @@
115/* 115/*
116 * Only define NR_IRQS if less than NR_IRQS_EB 116 * Only define NR_IRQS if less than NR_IRQS_EB
117 */ 117 */
118#define NR_IRQS_EB (IRQ_EB_GIC_START + 96) 118#define NR_IRQS_EB (IRQ_EB_GIC_START + 128)
119 119
120#if defined(CONFIG_MACH_REALVIEW_EB) \ 120#if defined(CONFIG_MACH_REALVIEW_EB) \
121 && (!defined(NR_IRQS) || (NR_IRQS < NR_IRQS_EB)) 121 && (!defined(NR_IRQS) || (NR_IRQS < NR_IRQS_EB))
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 076c26d43864..dda3904dc64c 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -640,7 +640,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
640 640
641 if (is_coherent || nommu()) 641 if (is_coherent || nommu())
642 addr = __alloc_simple_buffer(dev, size, gfp, &page); 642 addr = __alloc_simple_buffer(dev, size, gfp, &page);
643 else if (gfp & GFP_ATOMIC) 643 else if (!(gfp & __GFP_WAIT))
644 addr = __alloc_from_pool(size, &page); 644 addr = __alloc_from_pool(size, &page);
645 else if (!IS_ENABLED(CONFIG_CMA)) 645 else if (!IS_ENABLED(CONFIG_CMA))
646 addr = __alloc_remap_buffer(dev, size, gfp, prot, &page, caller); 646 addr = __alloc_remap_buffer(dev, size, gfp, prot, &page, caller);