Commit 5be95b7e24bde4d93ff1bff5911b303043753168

Authored by Linus Torvalds

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

Showing 8 changed files Side-by-side Diff

arch/hexagon/include/asm/cache.h
1 1 /*
2 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 6 * This program is free software; you can redistribute it and/or modify
7 7 * it under the terms of the GNU General Public License version 2 and
... ... @@ -24,6 +24,8 @@
24 24 /* Bytes per L1 cache line */
25 25 #define L1_CACHE_SHIFT (5)
26 26 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
  27 +
  28 +#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
27 29  
28 30 #define __cacheline_aligned __aligned(L1_CACHE_BYTES)
29 31 #define ____cacheline_aligned __aligned(L1_CACHE_BYTES)
arch/hexagon/include/asm/cacheflush.h
... ... @@ -21,10 +21,7 @@
21 21 #ifndef _ASM_CACHEFLUSH_H
22 22 #define _ASM_CACHEFLUSH_H
23 23  
24   -#include <linux/cache.h>
25   -#include <linux/mm.h>
26   -#include <asm/string.h>
27   -#include <asm-generic/cacheflush.h>
  24 +#include <linux/mm_types.h>
28 25  
29 26 /* Cache flushing:
30 27 *
... ... @@ -41,6 +38,20 @@
41 38 #define LINESIZE 32
42 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 56 * Flush Dcache range through current map.
46 57 */
... ... @@ -49,7 +60,6 @@
49 60 /*
50 61 * Flush Icache range through current map.
51 62 */
52   -#undef flush_icache_range
53 63 extern void flush_icache_range(unsigned long start, unsigned long end);
54 64  
55 65 /*
56 66  
... ... @@ -79,19 +89,11 @@
79 89 /* generic_ptrace_pokedata doesn't wind up here, does it? */
80 90 }
81 91  
82   -#undef copy_to_user_page
83   -static inline void copy_to_user_page(struct vm_area_struct *vma,
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   -}
  92 +void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
  93 + unsigned long vaddr, void *dst, void *src, int len);
94 94  
  95 +#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
  96 + memcpy(dst, src, len)
95 97  
96 98 extern void hexagon_inv_dcache_range(unsigned long start, unsigned long end);
97 99 extern void hexagon_clean_dcache_range(unsigned long start, unsigned long end);
arch/hexagon/include/asm/io.h
... ... @@ -24,14 +24,9 @@
24 24 #ifdef __KERNEL__
25 25  
26 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 27 #include <asm/iomap.h>
32 28 #include <asm/page.h>
33 29 #include <asm/cacheflush.h>
34   -#include <asm/tlbflush.h>
35 30  
36 31 /*
37 32 * We don't have PCI yet.
arch/hexagon/kernel/setup.c
... ... @@ -19,6 +19,7 @@
19 19 */
20 20  
21 21 #include <linux/init.h>
  22 +#include <linux/delay.h>
22 23 #include <linux/bootmem.h>
23 24 #include <linux/mmzone.h>
24 25 #include <linux/mm.h>
arch/hexagon/kernel/traps.c
1 1 /*
2 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 6 * This program is free software; you can redistribute it and/or modify
7 7 * it under the terms of the GNU General Public License version 2 and
... ... @@ -423,7 +423,7 @@
423 423 */
424 424 info.si_code = TRAP_BRKPT;
425 425 info.si_addr = (void __user *) pt_elr(regs);
426   - send_sig_info(SIGTRAP, &info, current);
  426 + force_sig_info(SIGTRAP, &info, current);
427 427 } else {
428 428 #ifdef CONFIG_KGDB
429 429 kgdb_handle_exception(pt_cause(regs), SIGTRAP,
arch/hexagon/kernel/vmlinux.lds.S
1 1 /*
2 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 6 * This program is free software; you can redistribute it and/or modify
7 7 * it under the terms of the GNU General Public License version 2 and
... ... @@ -59,7 +59,7 @@
59 59 INIT_DATA_SECTION(PAGE_SIZE)
60 60  
61 61 _sdata = .;
62   - RW_DATA_SECTION(32,PAGE_SIZE,PAGE_SIZE)
  62 + RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
63 63 RO_DATA_SECTION(PAGE_SIZE)
64 64 _edata = .;
65 65  
arch/hexagon/mm/cache.c
... ... @@ -127,4 +127,14 @@
127 127 local_irq_restore(flags);
128 128 mb();
129 129 }
  130 +
  131 +void 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 +}
arch/hexagon/mm/ioremap.c
... ... @@ -20,6 +20,7 @@
20 20  
21 21 #include <linux/io.h>
22 22 #include <linux/vmalloc.h>
  23 +#include <linux/mm.h>
23 24  
24 25 void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size)
25 26 {