mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
arch/csky patches for 5.0-rc6
Here is some fixup patches for 5.0-rc6: Guo Ren (5): csky: Fixup _PAGE_GLOBAL bit for 610 tlb entry csky: Fixup wrong pt_regs size csky: coding convention: Use task_stack_page csky: Fixup io-range page attribute for mmap("/dev/mem") csky: Fixup dead loop in show_stack -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE2KAv+isbWR/viAKHAXH1GYaIxXsFAlxjeDASHHJlbl9ndW9A Yy1za3kuY29tAAoJEAFx9RmGiMV7SakP/1AODEXJQAbZBQ/oVmaBPQsySftFXAIm bI4QS4R0SUUk2MD8pyTssEJFTZmvvSrM1mO+FCmYfE3xkE84BRaMzg1nuz+/oa8j fwqrGw6NORl0aImsWA3Vg+HIQQkoGIMpeXaG0cJaqafm01aDHTEhuOztGDAGKQjd dryPLCoWTUYvofatyUTEb6cOz3IO3aXa5mWdPica5CLQrKr3Vuy189NNGprvRS3/ V3Zt7n0afmJ8Sjuc7BQXLVLvWu3MyPsCA5DCUqVl56/FSV6PTsL+mjrn8S0GJIAZ 1v29LnPf2GC62NbVsFikIztwEHFeOokc+vsSNw+bqg7ko0YzgislVIi3urWmk71q XGfV2g6CIWqq66SrWFjHl2bUSKEOnroEC4Xa53T6wFZwwCMB+iXsrfJAVcDiS/aH 9Xu41SsypiadwMX9DTBPdB+SV+cEI67eXPpYFzwuPVvhn3Hq9I3rR1P4pnZR7Cu8 J67y6/wgdrQtLmdNGN4bFAgq24wHn6xMs32UAKFSBxRFsuj7pzB8RjR8jYSet/ho acLejMqk3Y9h3T5uWpvDPOOhFJXksR7zEI3cSq8ByxIZXlrFgNMtkpImVBAYdC8Y 2Cl1j1pkUbyGx0XXzwmopsti0maSasAas9oAttP5VzBwaROSVAQMoWX46V24uzmF 0rXoFT5a48jC =h7TN -----END PGP SIGNATURE----- Merge tag 'csky-for-linus-5.0-rc6' of git://github.com/c-sky/csky-linux Pull arch/csky fixes from Guo Ren: "Here are some fixup patches for 5.0-rc6" * tag 'csky-for-linus-5.0-rc6' of git://github.com/c-sky/csky-linux: csky: Fixup dead loop in show_stack csky: Fixup io-range page attribute for mmap("/dev/mem") csky: coding convention: Use task_stack_page csky: Fixup wrong pt_regs size csky: Fixup _PAGE_GLOBAL bit for 610 tlb entry
This commit is contained in:
commit
0513ebc33e
6 changed files with 31 additions and 6 deletions
|
@ -45,8 +45,8 @@
|
|||
((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset_t(address))
|
||||
#define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT))
|
||||
#define pte_clear(mm, addr, ptep) set_pte((ptep), \
|
||||
(((unsigned int)addr&0x80000000)?__pte(1):__pte(0)))
|
||||
#define pte_none(pte) (!(pte_val(pte)&0xfffffffe))
|
||||
(((unsigned int) addr & PAGE_OFFSET) ? __pte(_PAGE_GLOBAL) : __pte(0)))
|
||||
#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL))
|
||||
#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte_low >> PAGE_SHIFT))
|
||||
#define pfn_pte(pfn, prot) __pte(((unsigned long long)(pfn) << PAGE_SHIFT) \
|
||||
|
@ -241,6 +241,11 @@ static inline pte_t pte_mkyoung(pte_t pte)
|
|||
|
||||
#define pgd_index(address) ((address) >> PGDIR_SHIFT)
|
||||
|
||||
#define __HAVE_PHYS_MEM_ACCESS_PROT
|
||||
struct file;
|
||||
extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
||||
unsigned long size, pgprot_t vma_prot);
|
||||
|
||||
/*
|
||||
* Macro to make mark a page protection value as "uncacheable". Note
|
||||
* that "protection" is really a misnomer here as the protection value
|
||||
|
|
|
@ -49,7 +49,7 @@ struct thread_struct {
|
|||
};
|
||||
|
||||
#define INIT_THREAD { \
|
||||
.ksp = (unsigned long) init_thread_union.stack + THREAD_SIZE, \
|
||||
.ksp = sizeof(init_stack) + (unsigned long) &init_stack, \
|
||||
.sr = DEFAULT_PSR_VALUE, \
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ unsigned long get_wchan(struct task_struct *p);
|
|||
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->usp)
|
||||
|
||||
#define task_pt_regs(p) \
|
||||
((struct pt_regs *)(THREAD_SIZE + p->stack) - 1)
|
||||
((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
|
||||
|
||||
#define cpu_relax() barrier()
|
||||
|
||||
|
|
|
@ -38,7 +38,11 @@ void show_stack(struct task_struct *task, unsigned long *stack)
|
|||
if (task)
|
||||
stack = (unsigned long *)thread_saved_fp(task);
|
||||
else
|
||||
#ifdef CONFIG_STACKTRACE
|
||||
asm volatile("mov %0, r8\n":"=r"(stack)::"memory");
|
||||
#else
|
||||
stack = (unsigned long *)&stack;
|
||||
#endif
|
||||
}
|
||||
|
||||
show_trace(stack);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <linux/ptrace.h>
|
||||
#include <linux/regset.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/task_stack.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
@ -159,7 +160,7 @@ static int fpr_set(struct task_struct *target,
|
|||
static const struct user_regset csky_regsets[] = {
|
||||
[REGSET_GPR] = {
|
||||
.core_note_type = NT_PRSTATUS,
|
||||
.n = ELF_NGREG,
|
||||
.n = sizeof(struct pt_regs) / sizeof(u32),
|
||||
.size = sizeof(u32),
|
||||
.align = sizeof(u32),
|
||||
.get = &gpr_get,
|
||||
|
|
|
@ -160,7 +160,8 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
|
|||
{
|
||||
unsigned long mask = 1 << cpu;
|
||||
|
||||
secondary_stack = (unsigned int)tidle->stack + THREAD_SIZE - 8;
|
||||
secondary_stack =
|
||||
(unsigned int) task_stack_page(tidle) + THREAD_SIZE - 8;
|
||||
secondary_hint = mfcr("cr31");
|
||||
secondary_ccr = mfcr("cr18");
|
||||
|
||||
|
|
|
@ -46,3 +46,17 @@ void iounmap(void __iomem *addr)
|
|||
vunmap((void *)((unsigned long)addr & PAGE_MASK));
|
||||
}
|
||||
EXPORT_SYMBOL(iounmap);
|
||||
|
||||
pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
||||
unsigned long size, pgprot_t vma_prot)
|
||||
{
|
||||
if (!pfn_valid(pfn)) {
|
||||
vma_prot.pgprot |= _PAGE_SO;
|
||||
return pgprot_noncached(vma_prot);
|
||||
} else if (file->f_flags & O_SYNC) {
|
||||
return pgprot_noncached(vma_prot);
|
||||
}
|
||||
|
||||
return vma_prot;
|
||||
}
|
||||
EXPORT_SYMBOL(phys_mem_access_prot);
|
||||
|
|
Loading…
Reference in a new issue