aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-19 20:57:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-19 20:57:51 -0500
commit5be95b7e24bde4d93ff1bff5911b303043753168 (patch)
tree00ccba63052e5f9b5adbf13e48f3fdbcab77a48c /arch
parent971d9e07e18fa3684e7fbc932f01aa2a0682f232 (diff)
parent8914d7e857807e1e60975000cba3750c9b2643e8 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel
Pull arch/hexagon updates from Richard Kuo: "Build cleanup and a few misc fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel: Hexagon: fix signal delivery for debug traps Hexagon: set ARCH_DMA_MINALIGN Hexagon: fix alignment of init_task in RW_DATA_SECTION hexagon: Fix build failures in linux-next
Diffstat (limited to 'arch')
-rw-r--r--arch/hexagon/include/asm/cache.h4
-rw-r--r--arch/hexagon/include/asm/cacheflush.h36
-rw-r--r--arch/hexagon/include/asm/io.h5
-rw-r--r--arch/hexagon/kernel/setup.c1
-rw-r--r--arch/hexagon/kernel/traps.c4
-rw-r--r--arch/hexagon/kernel/vmlinux.lds.S4
-rw-r--r--arch/hexagon/mm/cache.c10
-rw-r--r--arch/hexagon/mm/ioremap.c1
8 files changed, 38 insertions, 27 deletions
diff --git a/arch/hexagon/include/asm/cache.h b/arch/hexagon/include/asm/cache.h
index 263511719a4a..69952c184207 100644
--- a/arch/hexagon/include/asm/cache.h
+++ b/arch/hexagon/include/asm/cache.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Cache definitions for the Hexagon architecture 2 * Cache definitions for the Hexagon architecture
3 * 3 *
4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2010-2011,2014 The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
@@ -25,6 +25,8 @@
25#define L1_CACHE_SHIFT (5) 25#define L1_CACHE_SHIFT (5)
26#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 26#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
27 27
28#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
29
28#define __cacheline_aligned __aligned(L1_CACHE_BYTES) 30#define __cacheline_aligned __aligned(L1_CACHE_BYTES)
29#define ____cacheline_aligned __aligned(L1_CACHE_BYTES) 31#define ____cacheline_aligned __aligned(L1_CACHE_BYTES)
30 32
diff --git a/arch/hexagon/include/asm/cacheflush.h b/arch/hexagon/include/asm/cacheflush.h
index 49e0896ec240..b86f9f300e94 100644
--- a/arch/hexagon/include/asm/cacheflush.h
+++ b/arch/hexagon/include/asm/cacheflush.h
@@ -21,10 +21,7 @@
21#ifndef _ASM_CACHEFLUSH_H 21#ifndef _ASM_CACHEFLUSH_H
22#define _ASM_CACHEFLUSH_H 22#define _ASM_CACHEFLUSH_H
23 23
24#include <linux/cache.h> 24#include <linux/mm_types.h>
25#include <linux/mm.h>
26#include <asm/string.h>
27#include <asm-generic/cacheflush.h>
28 25
29/* Cache flushing: 26/* Cache flushing:
30 * 27 *
@@ -41,6 +38,20 @@
41#define LINESIZE 32 38#define LINESIZE 32
42#define LINEBITS 5 39#define LINEBITS 5
43 40
41#define flush_cache_all() do { } while (0)
42#define flush_cache_mm(mm) do { } while (0)
43#define flush_cache_dup_mm(mm) do { } while (0)
44#define flush_cache_range(vma, start, end) do { } while (0)
45#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
46#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
47#define flush_dcache_page(page) do { } while (0)
48#define flush_dcache_mmap_lock(mapping) do { } while (0)
49#define flush_dcache_mmap_unlock(mapping) do { } while (0)
50#define flush_icache_page(vma, pg) do { } while (0)
51#define flush_icache_user_range(vma, pg, adr, len) do { } while (0)
52#define flush_cache_vmap(start, end) do { } while (0)
53#define flush_cache_vunmap(start, end) do { } while (0)
54
44/* 55/*
45 * Flush Dcache range through current map. 56 * Flush Dcache range through current map.
46 */ 57 */
@@ -49,7 +60,6 @@ extern void flush_dcache_range(unsigned long start, unsigned long end);
49/* 60/*
50 * Flush Icache range through current map. 61 * Flush Icache range through current map.
51 */ 62 */
52#undef flush_icache_range
53extern void flush_icache_range(unsigned long start, unsigned long end); 63extern void flush_icache_range(unsigned long start, unsigned long end);
54 64
55/* 65/*
@@ -79,19 +89,11 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
79 /* generic_ptrace_pokedata doesn't wind up here, does it? */ 89 /* generic_ptrace_pokedata doesn't wind up here, does it? */
80} 90}
81 91
82#undef copy_to_user_page 92void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
83static inline void copy_to_user_page(struct vm_area_struct *vma, 93 unsigned long vaddr, void *dst, void *src, int len);
84 struct page *page,
85 unsigned long vaddr,
86 void *dst, void *src, int len)
87{
88 memcpy(dst, src, len);
89 if (vma->vm_flags & VM_EXEC) {
90 flush_icache_range((unsigned long) dst,
91 (unsigned long) dst + len);
92 }
93}
94 94
95#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
96 memcpy(dst, src, len)
95 97
96extern void hexagon_inv_dcache_range(unsigned long start, unsigned long end); 98extern void hexagon_inv_dcache_range(unsigned long start, unsigned long end);
97extern void hexagon_clean_dcache_range(unsigned long start, unsigned long end); 99extern void hexagon_clean_dcache_range(unsigned long start, unsigned long end);
diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h
index 70298996e9b2..66f5e9a61efc 100644
--- a/arch/hexagon/include/asm/io.h
+++ b/arch/hexagon/include/asm/io.h
@@ -24,14 +24,9 @@
24#ifdef __KERNEL__ 24#ifdef __KERNEL__
25 25
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/delay.h>
28#include <linux/vmalloc.h>
29#include <asm/string.h>
30#include <asm/mem-layout.h>
31#include <asm/iomap.h> 27#include <asm/iomap.h>
32#include <asm/page.h> 28#include <asm/page.h>
33#include <asm/cacheflush.h> 29#include <asm/cacheflush.h>
34#include <asm/tlbflush.h>
35 30
36/* 31/*
37 * We don't have PCI yet. 32 * We don't have PCI yet.
diff --git a/arch/hexagon/kernel/setup.c b/arch/hexagon/kernel/setup.c
index 0e7c1dbb37b2..6981949f5df3 100644
--- a/arch/hexagon/kernel/setup.c
+++ b/arch/hexagon/kernel/setup.c
@@ -19,6 +19,7 @@
19 */ 19 */
20 20
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/delay.h>
22#include <linux/bootmem.h> 23#include <linux/bootmem.h>
23#include <linux/mmzone.h> 24#include <linux/mmzone.h>
24#include <linux/mm.h> 25#include <linux/mm.h>
diff --git a/arch/hexagon/kernel/traps.c b/arch/hexagon/kernel/traps.c
index 7858663352b9..110dab152f82 100644
--- a/arch/hexagon/kernel/traps.c
+++ b/arch/hexagon/kernel/traps.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Kernel traps/events for Hexagon processor 2 * Kernel traps/events for Hexagon processor
3 * 3 *
4 * Copyright (c) 2010-2013, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
@@ -423,7 +423,7 @@ void do_trap0(struct pt_regs *regs)
423 */ 423 */
424 info.si_code = TRAP_BRKPT; 424 info.si_code = TRAP_BRKPT;
425 info.si_addr = (void __user *) pt_elr(regs); 425 info.si_addr = (void __user *) pt_elr(regs);
426 send_sig_info(SIGTRAP, &info, current); 426 force_sig_info(SIGTRAP, &info, current);
427 } else { 427 } else {
428#ifdef CONFIG_KGDB 428#ifdef CONFIG_KGDB
429 kgdb_handle_exception(pt_cause(regs), SIGTRAP, 429 kgdb_handle_exception(pt_cause(regs), SIGTRAP,
diff --git a/arch/hexagon/kernel/vmlinux.lds.S b/arch/hexagon/kernel/vmlinux.lds.S
index 44d8c47bae2f..5f268c1071b3 100644
--- a/arch/hexagon/kernel/vmlinux.lds.S
+++ b/arch/hexagon/kernel/vmlinux.lds.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * Linker script for Hexagon kernel 2 * Linker script for Hexagon kernel
3 * 3 *
4 * Copyright (c) 2010-2013, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and 7 * it under the terms of the GNU General Public License version 2 and
@@ -59,7 +59,7 @@ SECTIONS
59 INIT_DATA_SECTION(PAGE_SIZE) 59 INIT_DATA_SECTION(PAGE_SIZE)
60 60
61 _sdata = .; 61 _sdata = .;
62 RW_DATA_SECTION(32,PAGE_SIZE,PAGE_SIZE) 62 RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
63 RO_DATA_SECTION(PAGE_SIZE) 63 RO_DATA_SECTION(PAGE_SIZE)
64 _edata = .; 64 _edata = .;
65 65
diff --git a/arch/hexagon/mm/cache.c b/arch/hexagon/mm/cache.c
index 0c76c802e31c..a7c6d827d8b6 100644
--- a/arch/hexagon/mm/cache.c
+++ b/arch/hexagon/mm/cache.c
@@ -127,3 +127,13 @@ void flush_cache_all_hexagon(void)
127 local_irq_restore(flags); 127 local_irq_restore(flags);
128 mb(); 128 mb();
129} 129}
130
131void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
132 unsigned long vaddr, void *dst, void *src, int len)
133{
134 memcpy(dst, src, len);
135 if (vma->vm_flags & VM_EXEC) {
136 flush_icache_range((unsigned long) dst,
137 (unsigned long) dst + len);
138 }
139}
diff --git a/arch/hexagon/mm/ioremap.c b/arch/hexagon/mm/ioremap.c
index 5905fd5f97f6..d27d67224046 100644
--- a/arch/hexagon/mm/ioremap.c
+++ b/arch/hexagon/mm/ioremap.c
@@ -20,6 +20,7 @@
20 20
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/vmalloc.h> 22#include <linux/vmalloc.h>
23#include <linux/mm.h>
23 24
24void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size) 25void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size)
25{ 26{