Commit ea5a9eff authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Misc fixes: a core dumping crash fix, a guess-unwinder regression fix,
  plus three build warning fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/unwind: Fix guess-unwinder regression
  x86/build: Annotate die() with noreturn to fix build warning on clang
  x86/platform/olpc: Fix resume handler build warning
  x86/apic/uv: Silence a shift wrapping warning
  x86/coredump: Always use user_regs_struct for compat_elf_gregset_t
parents 68f5503b 55f856e6
...@@ -272,7 +272,6 @@ struct compat_shmid64_ds { ...@@ -272,7 +272,6 @@ struct compat_shmid64_ds {
/* /*
* The type of struct elf_prstatus.pr_reg in compatible core dumps. * The type of struct elf_prstatus.pr_reg in compatible core dumps.
*/ */
#ifdef CONFIG_X86_X32_ABI
typedef struct user_regs_struct compat_elf_gregset_t; typedef struct user_regs_struct compat_elf_gregset_t;
/* Full regset -- prstatus on x32, otherwise on ia32 */ /* Full regset -- prstatus on x32, otherwise on ia32 */
...@@ -281,10 +280,9 @@ typedef struct user_regs_struct compat_elf_gregset_t; ...@@ -281,10 +280,9 @@ typedef struct user_regs_struct compat_elf_gregset_t;
do { *(int *) (((void *) &((S)->pr_reg)) + R) = (V); } \ do { *(int *) (((void *) &((S)->pr_reg)) + R) = (V); } \
while (0) while (0)
#ifdef CONFIG_X86_X32_ABI
#define COMPAT_USE_64BIT_TIME \ #define COMPAT_USE_64BIT_TIME \
(!!(task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT)) (!!(task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT))
#else
typedef struct user_regs_struct32 compat_elf_gregset_t;
#endif #endif
/* /*
......
...@@ -815,9 +815,9 @@ static __init void map_mmioh_high_uv3(int index, int min_pnode, int max_pnode) ...@@ -815,9 +815,9 @@ static __init void map_mmioh_high_uv3(int index, int min_pnode, int max_pnode)
l = li; l = li;
} }
addr1 = (base << shift) + addr1 = (base << shift) +
f * (unsigned long)(1 << m_io); f * (1ULL << m_io);
addr2 = (base << shift) + addr2 = (base << shift) +
(l + 1) * (unsigned long)(1 << m_io); (l + 1) * (1ULL << m_io);
pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n", pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n",
id, fi, li, lnasid, addr1, addr2); id, fi, li, lnasid, addr1, addr2);
if (max_io < l) if (max_io < l)
......
...@@ -7,11 +7,13 @@ ...@@ -7,11 +7,13 @@
unsigned long unwind_get_return_address(struct unwind_state *state) unsigned long unwind_get_return_address(struct unwind_state *state)
{ {
unsigned long addr = READ_ONCE_NOCHECK(*state->sp); unsigned long addr;
if (unwind_done(state)) if (unwind_done(state))
return 0; return 0;
addr = READ_ONCE_NOCHECK(*state->sp);
return ftrace_graph_ret_addr(state->task, &state->graph_idx, return ftrace_graph_ret_addr(state->task, &state->graph_idx,
addr, state->sp); addr, state->sp);
} }
...@@ -25,11 +27,12 @@ bool unwind_next_frame(struct unwind_state *state) ...@@ -25,11 +27,12 @@ bool unwind_next_frame(struct unwind_state *state)
return false; return false;
do { do {
for (state->sp++; state->sp < info->end; state->sp++) {
unsigned long addr = READ_ONCE_NOCHECK(*state->sp); unsigned long addr = READ_ONCE_NOCHECK(*state->sp);
for (state->sp++; state->sp < info->end; state->sp++)
if (__kernel_text_address(addr)) if (__kernel_text_address(addr))
return true; return true;
}
state->sp = info->next_sp; state->sp = info->next_sp;
......
...@@ -196,6 +196,7 @@ static int xo15_sci_remove(struct acpi_device *device) ...@@ -196,6 +196,7 @@ static int xo15_sci_remove(struct acpi_device *device)
return 0; return 0;
} }
#ifdef CONFIG_PM_SLEEP
static int xo15_sci_resume(struct device *dev) static int xo15_sci_resume(struct device *dev)
{ {
/* Enable all EC events */ /* Enable all EC events */
...@@ -207,6 +208,7 @@ static int xo15_sci_resume(struct device *dev) ...@@ -207,6 +208,7 @@ static int xo15_sci_resume(struct device *dev)
return 0; return 0;
} }
#endif
static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume); static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume);
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <regex.h> #include <regex.h>
#include <tools/le_byteshift.h> #include <tools/le_byteshift.h>
void die(char *fmt, ...); void die(char *fmt, ...) __attribute__((noreturn));
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
......
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