Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed May 18, 2017
2 parents 5396a01 + 48078d2 commit a58a260
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
6 changes: 4 additions & 2 deletions arch/sparc/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,
static inline int prepare_hugepage_range(struct file *file,
unsigned long addr, unsigned long len)
{
if (len & ~HPAGE_MASK)
struct hstate *h = hstate_file(file);

if (len & ~huge_page_mask(h))
return -EINVAL;
if (addr & ~HPAGE_MASK)
if (addr & ~huge_page_mask(h))
return -EINVAL;
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc/include/asm/pgtable_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ extern unsigned long pfn_base;
* ZERO_PAGE is a global shared page that is always zero: used
* 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
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extern char reboot_command[];
*/
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;
static inline int con_is_present(void)
Expand Down
13 changes: 6 additions & 7 deletions arch/sparc/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,16 @@ unsigned long prepare_ftrace_return(unsigned long parent,
if (unlikely(atomic_read(&current->tracing_graph_pause)))
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.depth = current->curr_ret_stack + 1;

/* Only trace if the calling function expects to */
if (!ftrace_graph_entry(&trace)) {
current->curr_ret_stack--;
if (!ftrace_graph_entry(&trace))
return parent + 8UL;

if (ftrace_push_return_trace(parent, self_addr, &trace.depth,
frame_pointer, NULL) == -EBUSY)
return parent + 8UL;
}

return return_hooker;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void __init mem_init(void)


/* 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 += 1;
Expand Down

0 comments on commit a58a260

Please sign in to comment.