mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-06 18:15:11 +07:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: [PARISC] unwinder improvements [PARISC] Fix unwinder on 64-bit kernels [PARISC] Handle wrapping in expand_upwards() [PARISC] stop lcd driver from stripping initial whitespace
This commit is contained in:
commit
9738cbe321
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <asm/assembly.h>
|
#include <asm/assembly.h>
|
||||||
|
#include <asm/asm-offsets.h>
|
||||||
|
#include <asm/ptrace.h>
|
||||||
|
|
||||||
#include <asm/unwind.h>
|
#include <asm/unwind.h>
|
||||||
|
|
||||||
@ -26,6 +28,8 @@
|
|||||||
#define dbg(x...)
|
#define dbg(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define KERNEL_START (KERNEL_BINARY_TEXT_START - 0x1000)
|
||||||
|
|
||||||
extern struct unwind_table_entry __start___unwind[];
|
extern struct unwind_table_entry __start___unwind[];
|
||||||
extern struct unwind_table_entry __stop___unwind[];
|
extern struct unwind_table_entry __stop___unwind[];
|
||||||
|
|
||||||
@ -197,6 +201,29 @@ static int unwind_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_64BIT
|
||||||
|
#define get_func_addr(fptr) fptr[2]
|
||||||
|
#else
|
||||||
|
#define get_func_addr(fptr) fptr[0]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static int unwind_special(struct unwind_frame_info *info, unsigned long pc, int frame_size)
|
||||||
|
{
|
||||||
|
void handle_interruption(int, struct pt_regs *);
|
||||||
|
static unsigned long *hi = (unsigned long)&handle_interruption;
|
||||||
|
|
||||||
|
if (pc == get_func_addr(hi)) {
|
||||||
|
struct pt_regs *regs = (struct pt_regs *)(info->sp - frame_size - PT_SZ_ALGN);
|
||||||
|
dbg("Unwinding through handle_interruption()\n");
|
||||||
|
info->prev_sp = regs->gr[30];
|
||||||
|
info->prev_ip = regs->iaoq[0];
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void unwind_frame_regs(struct unwind_frame_info *info)
|
static void unwind_frame_regs(struct unwind_frame_info *info)
|
||||||
{
|
{
|
||||||
const struct unwind_table_entry *e;
|
const struct unwind_table_entry *e;
|
||||||
@ -310,6 +337,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!unwind_special(info, e->region_start, frame_size)) {
|
||||||
info->prev_sp = info->sp - frame_size;
|
info->prev_sp = info->sp - frame_size;
|
||||||
if (e->Millicode)
|
if (e->Millicode)
|
||||||
info->rp = info->r31;
|
info->rp = info->r31;
|
||||||
@ -317,6 +345,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
|
|||||||
info->rp = *(unsigned long *)(info->prev_sp - rpoffset);
|
info->rp = *(unsigned long *)(info->prev_sp - rpoffset);
|
||||||
info->prev_ip = info->rp;
|
info->prev_ip = info->rp;
|
||||||
info->rp = 0;
|
info->rp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
dbg("analyzing func @ %lx, setting prev_sp=%lx "
|
dbg("analyzing func @ %lx, setting prev_sp=%lx "
|
||||||
"prev_ip=%lx npc=%lx\n", info->ip, info->prev_sp,
|
"prev_ip=%lx npc=%lx\n", info->ip, info->prev_sp,
|
||||||
|
@ -195,12 +195,6 @@ static int led_proc_write(struct file *file, const char *buf,
|
|||||||
|
|
||||||
cur = lbuf;
|
cur = lbuf;
|
||||||
|
|
||||||
/* skip initial spaces */
|
|
||||||
while (*cur && isspace(*cur))
|
|
||||||
{
|
|
||||||
cur++;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ((long)data)
|
switch ((long)data)
|
||||||
{
|
{
|
||||||
case LED_NOLCD:
|
case LED_NOLCD:
|
||||||
|
@ -188,7 +188,6 @@ static inline void set_eiem(unsigned long val)
|
|||||||
# define __lock_aligned __attribute__((__section__(".data.lock_aligned")))
|
# define __lock_aligned __attribute__((__section__(".data.lock_aligned")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KERNEL_START (0x10100000 - 0x1000)
|
|
||||||
#define arch_align_stack(x) (x)
|
#define arch_align_stack(x) (x)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1536,9 +1536,14 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
|
|||||||
* vma->vm_start/vm_end cannot change under us because the caller
|
* vma->vm_start/vm_end cannot change under us because the caller
|
||||||
* is required to hold the mmap_sem in read mode. We need the
|
* is required to hold the mmap_sem in read mode. We need the
|
||||||
* anon_vma lock to serialize against concurrent expand_stacks.
|
* anon_vma lock to serialize against concurrent expand_stacks.
|
||||||
|
* Also guard against wrapping around to address 0.
|
||||||
*/
|
*/
|
||||||
address += 4 + PAGE_SIZE - 1;
|
if (address < PAGE_ALIGN(address+4))
|
||||||
address &= PAGE_MASK;
|
address = PAGE_ALIGN(address+4);
|
||||||
|
else {
|
||||||
|
anon_vma_unlock(vma);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
error = 0;
|
error = 0;
|
||||||
|
|
||||||
/* Somebody else might have raced and expanded it already */
|
/* Somebody else might have raced and expanded it already */
|
||||||
|
Loading…
Reference in New Issue
Block a user