Commit a58a260f authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:
 "Three sparc bug fixes"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc/ftrace: Fix ftrace graph time measurement
  sparc: Fix -Wstringop-overflow warning
  sparc64: Fix mapping of 64k pages with MAP_FIXED
parents 5396a018 48078d2d
...@@ -24,9 +24,11 @@ static inline int is_hugepage_only_range(struct mm_struct *mm, ...@@ -24,9 +24,11 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
static inline int prepare_hugepage_range(struct file *file, static inline int prepare_hugepage_range(struct file *file,
unsigned long addr, unsigned long len) unsigned long addr, unsigned long len)
{ {
if (len & ~HPAGE_MASK) struct hstate *h = hstate_file(file);
if (len & ~huge_page_mask(h))
return -EINVAL; return -EINVAL;
if (addr & ~HPAGE_MASK) if (addr & ~huge_page_mask(h))
return -EINVAL; return -EINVAL;
return 0; return 0;
} }
......
...@@ -91,9 +91,9 @@ extern unsigned long pfn_base; ...@@ -91,9 +91,9 @@ extern unsigned long pfn_base;
* ZERO_PAGE is a global shared page that is always zero: used * ZERO_PAGE is a global shared page that is always zero: used
* for zero-mapped memory areas etc.. * for zero-mapped memory areas etc..
*/ */
extern unsigned long empty_zero_page; extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
#define ZERO_PAGE(vaddr) (virt_to_page(&empty_zero_page)) #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
/* /*
* In general all page table modifications should use the V8 atomic * In general all page table modifications should use the V8 atomic
......
...@@ -16,7 +16,7 @@ extern char reboot_command[]; ...@@ -16,7 +16,7 @@ extern char reboot_command[];
*/ */
extern unsigned char boot_cpu_id; extern unsigned char boot_cpu_id;
extern unsigned long empty_zero_page; extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
extern int serial_console; extern int serial_console;
static inline int con_is_present(void) static inline int con_is_present(void)
......
...@@ -130,17 +130,16 @@ unsigned long prepare_ftrace_return(unsigned long parent, ...@@ -130,17 +130,16 @@ unsigned long prepare_ftrace_return(unsigned long parent,
if (unlikely(atomic_read(&current->tracing_graph_pause))) if (unlikely(atomic_read(&current->tracing_graph_pause)))
return parent + 8UL; return parent + 8UL;
if (ftrace_push_return_trace(parent, self_addr, &trace.depth,
frame_pointer, NULL) == -EBUSY)
return parent + 8UL;
trace.func = self_addr; trace.func = self_addr;
trace.depth = current->curr_ret_stack + 1;
/* Only trace if the calling function expects to */ /* Only trace if the calling function expects to */
if (!ftrace_graph_entry(&trace)) { if (!ftrace_graph_entry(&trace))
current->curr_ret_stack--; return parent + 8UL;
if (ftrace_push_return_trace(parent, self_addr, &trace.depth,
frame_pointer, NULL) == -EBUSY)
return parent + 8UL; return parent + 8UL;
}
return return_hooker; return return_hooker;
} }
......
...@@ -290,7 +290,7 @@ void __init mem_init(void) ...@@ -290,7 +290,7 @@ void __init mem_init(void)
/* Saves us work later. */ /* Saves us work later. */
memset((void *)&empty_zero_page, 0, PAGE_SIZE); memset((void *)empty_zero_page, 0, PAGE_SIZE);
i = last_valid_pfn >> ((20 - PAGE_SHIFT) + 5); i = last_valid_pfn >> ((20 - PAGE_SHIFT) + 5);
i += 1; i += 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment