Skip to content

Commit 1dd950f

Browse files
committed
Merge tag 'parisc-for-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc architecture fixes from Helge Deller: - fix unaligned memory accesses when calling BPF functions - adjust memory size constants to fix possible DMA corruptions * tag 'parisc-for-6.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: fix a possible DMA corruption parisc: fix unaligned accesses in BPF
2 parents b6547e5 + 7ae04ba commit 1dd950f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

arch/parisc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ config PARISC
2020
select ARCH_SUPPORTS_HUGETLBFS if PA20
2121
select ARCH_SUPPORTS_MEMORY_FAILURE
2222
select ARCH_STACKWALK
23+
select ARCH_HAS_CACHE_LINE_SIZE
2324
select ARCH_HAS_DEBUG_VM_PGTABLE
2425
select HAVE_RELIABLE_STACKTRACE
2526
select DMA_OPS

arch/parisc/include/asm/cache.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@
2020

2121
#define SMP_CACHE_BYTES L1_CACHE_BYTES
2222

23-
#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
23+
#ifdef CONFIG_PA20
24+
#define ARCH_DMA_MINALIGN 128
25+
#else
26+
#define ARCH_DMA_MINALIGN 32
27+
#endif
28+
#define ARCH_KMALLOC_MINALIGN 16 /* ldcw requires 16-byte alignment */
29+
30+
#define arch_slab_minalign() ((unsigned)dcache_stride)
31+
#define cache_line_size() dcache_stride
32+
#define dma_get_cache_alignment cache_line_size
2433

2534
#define __read_mostly __section(".data..read_mostly")
2635

arch/parisc/net/bpf_jit_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
114114
jit_data->header =
115115
bpf_jit_binary_alloc(prog_size + extable_size,
116116
&jit_data->image,
117-
sizeof(u32),
117+
sizeof(long),
118118
bpf_fill_ill_insns);
119119
if (!jit_data->header) {
120120
prog = orig_prog;

0 commit comments

Comments
 (0)