aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-15 14:11:45 -0400
committerSage Weil <sage@inktank.com>2013-08-15 14:11:45 -0400
commitee3e542fec6e69bc9fb668698889a37d93950ddf (patch)
treee74ee766a4764769ef1d3d45d266b4dea64101d3 /arch/mn10300
parentfe2a801b50c0bb8039d627e5ae1fec249d10ff39 (diff)
parentf1d6e17f540af37bb1891480143669ba7636c4cf (diff)
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'arch/mn10300')
-rw-r--r--arch/mn10300/Kconfig1
-rw-r--r--arch/mn10300/Kconfig.debug4
-rw-r--r--arch/mn10300/include/asm/pgtable.h3
-rw-r--r--arch/mn10300/include/asm/uaccess.h4
-rw-r--r--arch/mn10300/include/uapi/asm/socket.h2
-rw-r--r--arch/mn10300/mm/fault.c7
-rw-r--r--arch/mn10300/mm/init.c33
-rw-r--r--arch/mn10300/unit-asb2305/pci-asb2305.c2
8 files changed, 16 insertions, 40 deletions
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index 428da175d073..70e4f663ebd2 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -13,6 +13,7 @@ config MN10300
13 select MODULES_USE_ELF_RELA 13 select MODULES_USE_ELF_RELA
14 select OLD_SIGSUSPEND3 14 select OLD_SIGSUSPEND3
15 select OLD_SIGACTION 15 select OLD_SIGACTION
16 select HAVE_DEBUG_STACKOVERFLOW
16 17
17config AM33_2 18config AM33_2
18 def_bool n 19 def_bool n
diff --git a/arch/mn10300/Kconfig.debug b/arch/mn10300/Kconfig.debug
index bdbfd444a9ff..94efb3ed223f 100644
--- a/arch/mn10300/Kconfig.debug
+++ b/arch/mn10300/Kconfig.debug
@@ -2,10 +2,6 @@ menu "Kernel hacking"
2 2
3source "lib/Kconfig.debug" 3source "lib/Kconfig.debug"
4 4
5config DEBUG_STACKOVERFLOW
6 bool "Check for stack overflows"
7 depends on DEBUG_KERNEL
8
9config DEBUG_DECOMPRESS_KERNEL 5config DEBUG_DECOMPRESS_KERNEL
10 bool "Using serial port during decompressing kernel" 6 bool "Using serial port during decompressing kernel"
11 depends on DEBUG_KERNEL 7 depends on DEBUG_KERNEL
diff --git a/arch/mn10300/include/asm/pgtable.h b/arch/mn10300/include/asm/pgtable.h
index a1e894b5f65b..2ddaa67e7983 100644
--- a/arch/mn10300/include/asm/pgtable.h
+++ b/arch/mn10300/include/asm/pgtable.h
@@ -486,9 +486,6 @@ extern void update_mmu_cache(struct vm_area_struct *vma,
486 486
487#define kern_addr_valid(addr) (1) 487#define kern_addr_valid(addr) (1)
488 488
489#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
490 remap_pfn_range((vma), (vaddr), (pfn), (size), (prot))
491
492#define MK_IOSPACE_PFN(space, pfn) (pfn) 489#define MK_IOSPACE_PFN(space, pfn) (pfn)
493#define GET_IOSPACE(pfn) 0 490#define GET_IOSPACE(pfn) 0
494#define GET_PFN(pfn) (pfn) 491#define GET_PFN(pfn) (pfn)
diff --git a/arch/mn10300/include/asm/uaccess.h b/arch/mn10300/include/asm/uaccess.h
index d7966e0f7698..537278746a15 100644
--- a/arch/mn10300/include/asm/uaccess.h
+++ b/arch/mn10300/include/asm/uaccess.h
@@ -471,13 +471,13 @@ extern unsigned long __generic_copy_from_user(void *, const void __user *,
471 471
472#define __copy_to_user(to, from, n) \ 472#define __copy_to_user(to, from, n) \
473({ \ 473({ \
474 might_sleep(); \ 474 might_fault(); \
475 __copy_to_user_inatomic((to), (from), (n)); \ 475 __copy_to_user_inatomic((to), (from), (n)); \
476}) 476})
477 477
478#define __copy_from_user(to, from, n) \ 478#define __copy_from_user(to, from, n) \
479({ \ 479({ \
480 might_sleep(); \ 480 might_fault(); \
481 __copy_from_user_inatomic((to), (from), (n)); \ 481 __copy_from_user_inatomic((to), (from), (n)); \
482}) 482})
483 483
diff --git a/arch/mn10300/include/uapi/asm/socket.h b/arch/mn10300/include/uapi/asm/socket.h
index b4ce844c9391..e2a2b203eb00 100644
--- a/arch/mn10300/include/uapi/asm/socket.h
+++ b/arch/mn10300/include/uapi/asm/socket.h
@@ -74,4 +74,6 @@
74 74
75#define SO_SELECT_ERR_QUEUE 45 75#define SO_SELECT_ERR_QUEUE 45
76 76
77#define SO_BUSY_POLL 46
78
77#endif /* _ASM_SOCKET_H */ 79#endif /* _ASM_SOCKET_H */
diff --git a/arch/mn10300/mm/fault.c b/arch/mn10300/mm/fault.c
index d48a84fd7fae..8a2e6ded9a44 100644
--- a/arch/mn10300/mm/fault.c
+++ b/arch/mn10300/mm/fault.c
@@ -345,9 +345,10 @@ no_context:
345 */ 345 */
346out_of_memory: 346out_of_memory:
347 up_read(&mm->mmap_sem); 347 up_read(&mm->mmap_sem);
348 printk(KERN_ALERT "VM: killing process %s\n", tsk->comm); 348 if ((fault_code & MMUFCR_xFC_ACCESS) == MMUFCR_xFC_ACCESS_USR) {
349 if ((fault_code & MMUFCR_xFC_ACCESS) == MMUFCR_xFC_ACCESS_USR) 349 pagefault_out_of_memory();
350 do_exit(SIGKILL); 350 return;
351 }
351 goto no_context; 352 goto no_context;
352 353
353do_sigbus: 354do_sigbus:
diff --git a/arch/mn10300/mm/init.c b/arch/mn10300/mm/init.c
index 5a8ace63a6b4..97a1ec0beeec 100644
--- a/arch/mn10300/mm/init.c
+++ b/arch/mn10300/mm/init.c
@@ -99,43 +99,21 @@ void __init paging_init(void)
99 */ 99 */
100void __init mem_init(void) 100void __init mem_init(void)
101{ 101{
102 int codesize, reservedpages, datasize, initsize;
103 int tmp;
104
105 BUG_ON(!mem_map); 102 BUG_ON(!mem_map);
106 103
107#define START_PFN (contig_page_data.bdata->node_min_pfn) 104#define START_PFN (contig_page_data.bdata->node_min_pfn)
108#define MAX_LOW_PFN (contig_page_data.bdata->node_low_pfn) 105#define MAX_LOW_PFN (contig_page_data.bdata->node_low_pfn)
109 106
110 max_mapnr = num_physpages = MAX_LOW_PFN - START_PFN; 107 max_mapnr = MAX_LOW_PFN - START_PFN;
111 high_memory = (void *) __va(MAX_LOW_PFN * PAGE_SIZE); 108 high_memory = (void *) __va(MAX_LOW_PFN * PAGE_SIZE);
112 109
113 /* clear the zero-page */ 110 /* clear the zero-page */
114 memset(empty_zero_page, 0, PAGE_SIZE); 111 memset(empty_zero_page, 0, PAGE_SIZE);
115 112
116 /* this will put all low memory onto the freelists */ 113 /* this will put all low memory onto the freelists */
117 totalram_pages += free_all_bootmem(); 114 free_all_bootmem();
118 115
119 reservedpages = 0; 116 mem_init_print_info(NULL);
120 for (tmp = 0; tmp < num_physpages; tmp++)
121 if (PageReserved(&mem_map[tmp]))
122 reservedpages++;
123
124 codesize = (unsigned long) &_etext - (unsigned long) &_stext;
125 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
126 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
127
128 printk(KERN_INFO
129 "Memory: %luk/%luk available"
130 " (%dk kernel code, %dk reserved, %dk data, %dk init,"
131 " %ldk highmem)\n",
132 nr_free_pages() << (PAGE_SHIFT - 10),
133 max_mapnr << (PAGE_SHIFT - 10),
134 codesize >> 10,
135 reservedpages << (PAGE_SHIFT - 10),
136 datasize >> 10,
137 initsize >> 10,
138 totalhigh_pages << (PAGE_SHIFT - 10));
139} 117}
140 118
141/* 119/*
@@ -152,6 +130,7 @@ void free_initmem(void)
152#ifdef CONFIG_BLK_DEV_INITRD 130#ifdef CONFIG_BLK_DEV_INITRD
153void free_initrd_mem(unsigned long start, unsigned long end) 131void free_initrd_mem(unsigned long start, unsigned long end)
154{ 132{
155 free_reserved_area(start, end, POISON_FREE_INITMEM, "initrd"); 133 free_reserved_area((void *)start, (void *)end, POISON_FREE_INITMEM,
134 "initrd");
156} 135}
157#endif 136#endif
diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.c b/arch/mn10300/unit-asb2305/pci-asb2305.c
index c4e2e79281e8..febb9cd83177 100644
--- a/arch/mn10300/unit-asb2305/pci-asb2305.c
+++ b/arch/mn10300/unit-asb2305/pci-asb2305.c
@@ -221,7 +221,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
221 /* Leave vm_pgoff as-is, the PCI space address is the physical 221 /* Leave vm_pgoff as-is, the PCI space address is the physical
222 * address on this platform. 222 * address on this platform.
223 */ 223 */
224 vma->vm_flags |= VM_LOCKED | VM_IO; 224 vma->vm_flags |= VM_LOCKED;
225 225
226 prot = pgprot_val(vma->vm_page_prot); 226 prot = pgprot_val(vma->vm_page_prot);
227 prot &= ~_PAGE_CACHE; 227 prot &= ~_PAGE_CACHE;