Skip to content

Commit 41f2a93

Browse files
committed
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "A set of ARM fixes: - fix an off-by-one error in the iommu DMA ops, which caused errors with a 4GiB size. - remove comments mentioning the non-existent CONFIG_CPU_ARM1020_CPU_IDLE macro. - remove useless CONFIG_CPU_ICACHE_STREAMING_DISABLE blocks, where this symbol never appeared in any Kconfig. - fix Feroceon code to cope with a previous change correctly (it incorrectly left an additional word in an assembly structure definition) - avoid a misleading IRQ affinity warning in the ARM PMU code for IRQs which are already affine to their CPUs. - fix the node name printed in the IRQ affinity warning" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8352/1: perf: Fix the pmu node name in warning message ARM: 8351/1: perf: don't warn about missing interrupt-affinity property for PPIs ARM: 8350/1: proc-feroceon: Fix feroceon_proc_info macro ARM: 8349/1: arch/arm/mm/proc-arm925.S: remove dead #ifdef block ARM: 8348/1: remove comments on CPU_ARM1020_CPU_IDLE ARM: 8347/1: dma-mapping: fix off-by-one check in arm_setup_iommu_dma_ops
2 parents 8425ac7 + 3b8786f commit 41f2a93

File tree

7 files changed

+13
-19
lines changed

7 files changed

+13
-19
lines changed

arch/arm/include/asm/dma-iommu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct dma_iommu_mapping {
2525
};
2626

2727
struct dma_iommu_mapping *
28-
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size);
28+
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size);
2929

3030
void arm_iommu_release_mapping(struct dma_iommu_mapping *mapping);
3131

arch/arm/kernel/perf_event_cpu.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,17 @@ static int probe_current_pmu(struct arm_pmu *pmu)
303303

304304
static int of_pmu_irq_cfg(struct platform_device *pdev)
305305
{
306-
int i;
306+
int i, irq;
307307
int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
308308

309309
if (!irqs)
310310
return -ENOMEM;
311311

312+
/* Don't bother with PPIs; they're already affine */
313+
irq = platform_get_irq(pdev, 0);
314+
if (irq >= 0 && irq_is_percpu(irq))
315+
return 0;
316+
312317
for (i = 0; i < pdev->num_resources; ++i) {
313318
struct device_node *dn;
314319
int cpu;
@@ -317,7 +322,7 @@ static int of_pmu_irq_cfg(struct platform_device *pdev)
317322
i);
318323
if (!dn) {
319324
pr_warn("Failed to parse %s/interrupt-affinity[%d]\n",
320-
of_node_full_name(dn), i);
325+
of_node_full_name(pdev->dev.of_node), i);
321326
break;
322327
}
323328

arch/arm/mm/dma-mapping.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,14 +1878,18 @@ struct dma_map_ops iommu_coherent_ops = {
18781878
* arm_iommu_attach_device function.
18791879
*/
18801880
struct dma_iommu_mapping *
1881-
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, size_t size)
1881+
arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size)
18821882
{
18831883
unsigned int bits = size >> PAGE_SHIFT;
18841884
unsigned int bitmap_size = BITS_TO_LONGS(bits) * sizeof(long);
18851885
struct dma_iommu_mapping *mapping;
18861886
int extensions = 1;
18871887
int err = -ENOMEM;
18881888

1889+
/* currently only 32-bit DMA address space is supported */
1890+
if (size > DMA_BIT_MASK(32) + 1)
1891+
return ERR_PTR(-ERANGE);
1892+
18891893
if (!bitmap_size)
18901894
return ERR_PTR(-EINVAL);
18911895

@@ -2057,13 +2061,6 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size,
20572061
if (!iommu)
20582062
return false;
20592063

2060-
/*
2061-
* currently arm_iommu_create_mapping() takes a max of size_t
2062-
* for size param. So check this limit for now.
2063-
*/
2064-
if (size > SIZE_MAX)
2065-
return false;
2066-
20672064
mapping = arm_iommu_create_mapping(dev->bus, dma_base, size);
20682065
if (IS_ERR(mapping)) {
20692066
pr_warn("Failed to create %llu-byte IOMMU mapping for device %s\n",

arch/arm/mm/proc-arm1020.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
*
2323
* These are the low level assembler for performing cache and TLB
2424
* functions on the arm1020.
25-
*
26-
* CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt
2725
*/
2826
#include <linux/linkage.h>
2927
#include <linux/init.h>

arch/arm/mm/proc-arm1020e.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
*
2323
* These are the low level assembler for performing cache and TLB
2424
* functions on the arm1020e.
25-
*
26-
* CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt
2725
*/
2826
#include <linux/linkage.h>
2927
#include <linux/init.h>

arch/arm/mm/proc-arm925.S

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,6 @@ ENTRY(cpu_arm925_set_pte_ext)
441441
.type __arm925_setup, #function
442442
__arm925_setup:
443443
mov r0, #0
444-
#if defined(CONFIG_CPU_ICACHE_STREAMING_DISABLE)
445-
orr r0,r0,#1 << 7
446-
#endif
447444

448445
/* Transparent on, D-cache clean & flush mode. See NOTE2 above */
449446
orr r0,r0,#1 << 1 @ transparent mode on

arch/arm/mm/proc-feroceon.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,6 @@ __\name\()_proc_info:
602602
PMD_SECT_AP_WRITE | \
603603
PMD_SECT_AP_READ
604604
initfn __feroceon_setup, __\name\()_proc_info
605-
.long __feroceon_setup
606605
.long cpu_arch_name
607606
.long cpu_elf_name
608607
.long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP

0 commit comments

Comments
 (0)