csky changes for v5.12-rc1
Subsystems (5)
[email protected]
maintainerHi Linus,
The following changes since commit 7c53f6b671f4aba70ff15e1b05148b10d58c2837:
Linux 5.11-rc3 (2021-01-10 14:34:50 -0800)
are available in the Git repository at:
https://github.com/c-sky/csky-linux.git tags/csky-for-linus-5.12-rc1
for you to fetch changes up to 6607aa6f6b68fc9b5955755f1b1be125cf2a9d03:
csky: Fixup compile error (2021-02-27 22:04:14 +0800)
----------------------------------------------------------------arch/csky patches for 5.12-rc1
Features:
- Add new memory layout 2.5G(user):1.5G(kernel)
- Add kmemleak support
- Reconstruct VDSO framework
Add VDSO with GENERIC_GETTIMEOFDAY, GENERIC_TIME_VSYSCALL, HAVE_GENERIC_VDSO
- Add faulthandler_disabled() check
- Support(Fixup) swapon
- Add(Fixup) _PAGE_ACCESSED for default pgprot
- abort uaccess retries upon fatal signal (From arm)
Fixup & Optimization:
- Fixup perf probe failed
- Fixup show_regs doesn't contain regs->usp
- Remove custom asm/atomic.h implementation
- Fixup barrier design
- Fixup futex SMP implementation
- Fixup asm/cmpxchg.h with correct ordering barrier
- Cleanup asm/spinlock.h
- Fixup PTE global for 2.5:1.5 virtual memory
- Remove prologue of page fault handler in entry.S
- Fix TLB maintenance synchronization problem
- Add show_tlb for CPU_CK860 debug
- Fixup FAULT_FLAG_XXX param for handle_mm_fault
- Fixup update_mmu_cache called with user io mapping
- Fixup do_page_fault parent irq status
- Fix a size determination in gpr_get()
- pgtable.h: Coding convention
- kprobe: Fixup code in simulate without 'long'
- Fixup pfn_valid error with wrong max_mapnr
- use free_initmem_default() in free_initmem()
- Fixup compile error
----------------------------------------------------------------
David Hildenbrand (1):
csky: use free_initmem_default() in free_initmem()
Guo Ren (27):
csky: Add memory layout 2.5G(user):1.5G(kernel)
csky: Fixup perf probe failed
csky: Fixup show_regs doesn't contain regs->usp
csky: Remove custom asm/atomic.h implementation
csky: Fixup barrier design
csky: Fixup futex SMP implementation
csky: Fixup asm/cmpxchg.h with correct ordering barrier
csky: Cleanup asm/spinlock.h
csky: Fixup PTE global for 2.5:1.5 virtual memory
csky: Remove prologue of page fault handler in entry.S
csky: Add kmemleak support
csky: Fix TLB maintenance synchronization problem
csky: Add show_tlb for CPU_CK860 debug
csky: Fixup FAULT_FLAG_XXX param for handle_mm_fault
csky: Fixup update_mmu_cache called with user io mapping
csky: Add faulthandler_disabled() check
csky: Fixup do_page_fault parent irq status
csky: Sync riscv mm/fault.c for easy maintenance
csky: mm: abort uaccess retries upon fatal signal
csky: Reconstruct VDSO framework
csky: Fixup _PAGE_ACCESSED for default pgprot
csky: pgtable.h: Coding convention
csky: Fixup swapon
csky: kprobe: Fixup code in simulate without 'long'
csky: Add VDSO with GENERIC_GETTIMEOFDAY, GENERIC_TIME_VSYSCALL, HAVE_GENERIC_VDSO
csky: Fixup pfn_valid error with wrong max_mapnr
csky: Fixup compile error
Tian Tao (1):
csky: remove unused including <linux/version.h>
Zhenzhong Duan (1):
csky: Fix a size determination in gpr_get()
arch/csky/Kconfig | 24 +- arch/csky/abiv1/inc/abi/cacheflush.h | 1 - arch/csky/abiv1/inc/abi/ckmmu.h | 10 +- arch/csky/abiv1/inc/abi/entry.h | 1 - arch/csky/abiv1/inc/abi/page.h | 1 - arch/csky/abiv1/inc/abi/pgtable-bits.h | 40 +-- arch/csky/abiv1/inc/abi/reg_ops.h | 1 - arch/csky/abiv1/inc/abi/regdef.h | 6 +- arch/csky/abiv1/inc/abi/string.h | 1 - arch/csky/abiv1/inc/abi/switch_context.h | 1 - arch/csky/abiv1/inc/abi/vdso.h | 18 +- arch/csky/abiv2/cacheflush.c | 3 + arch/csky/abiv2/inc/abi/ckmmu.h | 44 +++- arch/csky/abiv2/inc/abi/entry.h | 20 +- arch/csky/abiv2/inc/abi/fpu.h | 1 - arch/csky/abiv2/inc/abi/page.h | 1 - arch/csky/abiv2/inc/abi/pgtable-bits.h | 37 ++- arch/csky/abiv2/inc/abi/reg_ops.h | 1 - arch/csky/abiv2/inc/abi/regdef.h | 6 +- arch/csky/abiv2/inc/abi/switch_context.h | 1 - arch/csky/abiv2/inc/abi/vdso.h | 20 +- arch/csky/abiv2/sysdep.h | 1 - arch/csky/include/asm/addrspace.h | 1 - arch/csky/include/asm/atomic.h | 212 ---------------- arch/csky/include/asm/barrier.h | 83 +++++-- arch/csky/include/asm/bitops.h | 1 - arch/csky/include/asm/bug.h | 3 +- arch/csky/include/asm/cacheflush.h | 1 - arch/csky/include/asm/checksum.h | 1 - arch/csky/include/asm/clocksource.h | 8 + arch/csky/include/asm/cmpxchg.h | 27 ++- arch/csky/include/asm/elf.h | 1 - arch/csky/include/asm/fixmap.h | 1 - arch/csky/include/asm/ftrace.h | 1 - arch/csky/include/asm/futex.h | 121 ++++++++++ arch/csky/include/asm/highmem.h | 1 - arch/csky/include/asm/io.h | 1 - arch/csky/include/asm/memory.h | 2 +- arch/csky/include/asm/mmu.h | 1 - arch/csky/include/asm/mmu_context.h | 10 +- arch/csky/include/asm/page.h | 2 +- arch/csky/include/asm/perf_event.h | 1 - arch/csky/include/asm/pgalloc.h | 3 +- arch/csky/include/asm/pgtable.h | 80 +++--- arch/csky/include/asm/processor.h | 3 +- arch/csky/include/asm/ptrace.h | 1 - arch/csky/include/asm/segment.h | 3 +- arch/csky/include/asm/shmparam.h | 1 - arch/csky/include/asm/spinlock.h | 167 ------------- arch/csky/include/asm/spinlock_types.h | 10 - arch/csky/include/asm/string.h | 1 - arch/csky/include/asm/switch_to.h | 1 - arch/csky/include/asm/syscalls.h | 1 - arch/csky/include/asm/thread_info.h | 2 - arch/csky/include/asm/tlb.h | 1 - arch/csky/include/asm/tlbflush.h | 1 - arch/csky/include/asm/traps.h | 1 - arch/csky/include/asm/uaccess.h | 1 - arch/csky/include/asm/unistd.h | 1 - arch/csky/include/asm/vdso.h | 21 +- arch/csky/include/asm/vdso/clocksource.h | 9 + arch/csky/include/asm/vdso/gettimeofday.h | 114 +++++++++ arch/csky/include/asm/vdso/processor.h | 12 + arch/csky/include/asm/vdso/vsyscall.h | 22 ++ arch/csky/include/uapi/asm/byteorder.h | 1 - arch/csky/include/uapi/asm/perf_regs.h | 1 - arch/csky/include/uapi/asm/ptrace.h | 1 - arch/csky/include/uapi/asm/sigcontext.h | 1 - arch/csky/include/uapi/asm/unistd.h | 1 - arch/csky/kernel/Makefile | 2 +- arch/csky/kernel/atomic.S | 24 +- arch/csky/kernel/entry.S | 106 +------- arch/csky/kernel/head.S | 10 +- arch/csky/kernel/perf_event.c | 4 +- arch/csky/kernel/probes/simulate-insn.c | 22 +- arch/csky/kernel/ptrace.c | 128 +++++++++- arch/csky/kernel/setup.c | 18 +- arch/csky/kernel/signal.c | 4 +- arch/csky/kernel/smp.c | 7 +- arch/csky/kernel/traps.c | 10 +- arch/csky/kernel/vdso.c | 127 ++++++---- arch/csky/kernel/vdso/.gitignore | 4 + arch/csky/kernel/vdso/Makefile | 72 ++++++ arch/csky/kernel/vdso/note.S | 12 + arch/csky/kernel/vdso/rt_sigreturn.S | 14 ++ arch/csky/kernel/vdso/so2s.sh | 5 + arch/csky/kernel/vdso/vdso.S | 16 ++ arch/csky/kernel/vdso/vdso.lds.S | 58 +++++ arch/csky/kernel/vdso/vgettimeofday.c | 28 +++ arch/csky/kernel/vmlinux.lds.S | 2 +- arch/csky/mm/fault.c | 388 ++++++++++++++++++------------ arch/csky/mm/init.c | 56 +++-- arch/csky/mm/tlb.c | 42 +++- include/linux/cpuhotplug.h | 1 + 94 files changed, 1347 insertions(+), 992 deletions(-) delete mode 100644 arch/csky/include/asm/atomic.h create mode 100644 arch/csky/include/asm/clocksource.h create mode 100644 arch/csky/include/asm/futex.h create mode 100644 arch/csky/include/asm/vdso/clocksource.h create mode 100644 arch/csky/include/asm/vdso/gettimeofday.h create mode 100644 arch/csky/include/asm/vdso/processor.h create mode 100644 arch/csky/include/asm/vdso/vsyscall.h create mode 100644 arch/csky/kernel/vdso/.gitignore create mode 100644 arch/csky/kernel/vdso/Makefile create mode 100644 arch/csky/kernel/vdso/note.S create mode 100644 arch/csky/kernel/vdso/rt_sigreturn.S create mode 100755 arch/csky/kernel/vdso/so2s.sh create mode 100644 arch/csky/kernel/vdso/vdso.S create mode 100644 arch/csky/kernel/vdso/vdso.lds.S create mode 100644 arch/csky/kernel/vdso/vgettimeofday.c
The pull request you sent on Sun, 28 Feb 2021 11:43:00 +0800:
The pull request you sent on Sun, 28 Feb 2021 11:43:00 +0800:
Quoted 1 line
https://github.com/c-sky/csky-linux.git tags/csky-for-linus-5.12-rc1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/cd278456d4ca0e6b3d5e10ace4566524baa144eb
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
So this is entirely unrelated to the csky pull request, and is more of a generic "the perf CPU hotplug thing seems a complete mess".
The csky thing is just the latest - of many - that have been bitten by the mess, and the one that added yet another hotplug state, and finally made me go "Let's at least talk about this"
For csky, the problem is this:
Quoted 4 lines · On Sat, Feb 27, 2021 at 7:43 PM <[email protected]> wrote:
arch/cskypatches for 5.12-rc1- Fixup perf probe failed
and in this case it is 398cb92495cc ("csky: Fixup perf probe failed") in my current -git tree.
But it's also
cf6acb8bdb1d ("s390/cpumf: Add support for complete counter set extraction") dcb5cdf60a1f ("powerpc/perf/hv-gpci: Add cpu hotplug support") 1a8f0886a600 ("powerpc/perf/hv-24x7: Add cpu hotplug support") 6b7ce8927b5a ("irqchip: RISC-V per-HART local interrupt controller driver") e9b880581d55 ("coresight: cti: Add CPU Hotplug handling to CTI driver") e0685fa228fd ("arm64: Retrieve stolen time as paravirtualized guest") 6282edb72bed ("clocksource/drivers/exynos_mct: Increase priority
over ARM arch timer")
78f4e932f776 ("x86/microcode, cpuhotplug: Add a microcode loader
CPU hotplug callback")
72c69dcddce1 ("powerpc/perf: Trace imc events detection and cpuhotplug") 5861381d4866 ("PM / arch: x86: Rework theMSR_IA32_ENERGY_PERF_BIAS handling")
69c32972d593 ("drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver")
...
and that's not even the complete list.
Does it really make sense to have this kind of silly enumeration of many (MANY!) different arch CPU hotplug state indexes, where most of them are relevant only to that particular architecture..
No, I don't think this is a _problem_, but it's kind of ugly, wouldn't you agree?
Wouldn't it be better to just reserve N different states for the architecture hotplug state, and then let each architecture decide how they want to order them?
Or better yet, make at least some of them architecture-neutral. Because now there are drivers that clearly are very tied to one architecture - or SoCs (look at various timer things) - do they really want or need their own architecture- or SoC-specific hotplug state? IOW, do we really need all of these:
CPUHP_AP_ARM_ARCH_TIMER_STARTING,
CPUHP_AP_ARM_GLOBAL_TIMER_STARTING,
CPUHP_AP_JCORE_TIMER_STARTING,
CPUHP_AP_QCOM_TIMER_STARTING,
CPUHP_AP_TEGRA_TIMER_STARTING,
CPUHP_AP_ARMADA_TIMER_STARTING,
CPUHP_AP_MARCO_TIMER_STARTING,
CPUHP_AP_MIPS_GIC_TIMER_STARTING,
CPUHP_AP_ARC_TIMER_STARTING,
CPUHP_AP_RISCV_TIMER_STARTING,
CPUHP_AP_CLINT_TIMER_STARTING,
CPUHP_AP_CSKY_TIMER_STARTING,
CPUHP_AP_HYPERV_TIMER_STARTING,
CPUHP_AP_KVM_ARM_TIMER_STARTING,
CPUHP_AP_DUMMY_TIMER_STARTING,
as separate hotplug events?
Whatever. I don't really care deeply, but this just smells a bit to me.
Comments?
Linus
Guo Ren
maintainerHi all,
Quoted 72 lines · Linus Torvalds
So this is entirely unrelated to the csky pull request, and is more of a generic "the perf CPU hotplug thing seems a complete mess".
The csky thing is just the latest - of many - that have been bitten by the mess, and the one that added yet another hotplug state, and finally made me go "Let's at least talk about this"
For csky, the problem is this:
Quoted 4 lines · On Sat, Feb 27, 2021 at 7:43 PM <[email protected]> wrote:
arch/cskypatches for 5.12-rc1- Fixup perf probe failed
and in this case it is
398cb92495cc("csky: Fixup perf probe failed") in my current -git tree.But it's also
cf6acb8bdb1d("s390/cpumf: Add support for complete counter set extraction")dcb5cdf60a1f("powerpc/perf/hv-gpci: Add cpu hotplug support")1a8f0886a600("powerpc/perf/hv-24x7: Add cpu hotplug support")6b7ce8927b5a("irqchip: RISC-V per-HART local interrupt controller driver")e9b880581d55("coresight: cti: Add CPU Hotplug handling to CTI driver")e0685fa228fd("arm64: Retrieve stolen time as paravirtualized guest")6282edb72bed("clocksource/drivers/exynos_mct: Increase priority
over ARM arch timer")
78f4e932f776("x86/microcode, cpuhotplug: Add a microcode loader
CPU hotplug callback")
72c69dcddce1("powerpc/perf: Trace imc events detection and cpuhotplug")5861381d4866("PM / arch: x86: Rework theMSR_IA32_ENERGY_PERF_BIAShandling")
69c32972d593("drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver")
...and that's not even the complete list.
Does it really make sense to have this kind of silly enumeration of many (MANY!) different arch CPU hotplug state indexes, where most of them are relevant only to that particular architecture..
No, I don't think this is a _problem_, but it's kind of ugly, wouldn't you agree?
Wouldn't it be better to just reserve N different states for the architecture hotplug state, and then let each architecture decide how they want to order them?
Or better yet, make at least some of them architecture-neutral. Because now there are drivers that clearly are very tied to one architecture - or SoCs (look at various timer things) - do they really want or need their own architecture- or SoC-specific hotplug state? IOW, do we really need all of these:
CPUHP_AP_ARM_ARCH_TIMER_STARTING,
CPUHP_AP_ARM_GLOBAL_TIMER_STARTING,
CPUHP_AP_JCORE_TIMER_STARTING,
CPUHP_AP_QCOM_TIMER_STARTING,
CPUHP_AP_TEGRA_TIMER_STARTING,
CPUHP_AP_ARMADA_TIMER_STARTING,
CPUHP_AP_MARCO_TIMER_STARTING,
CPUHP_AP_MIPS_GIC_TIMER_STARTING,
CPUHP_AP_ARC_TIMER_STARTING,
CPUHP_AP_RISCV_TIMER_STARTING,
CPUHP_AP_CLINT_TIMER_STARTING,
CPUHP_AP_CSKY_TIMER_STARTING,
CPUHP_AP_HYPERV_TIMER_STARTING,
CPUHP_AP_KVM_ARM_TIMER_STARTING,
CPUHP_AP_DUMMY_TIMER_STARTING,
Quoted 5 lines
as separate hotplug events?
Whatever. I don't really care deeply, but this just smells a bit to me.
Comments?
We could use CPUHP_AP_ONLINE_DYN to reduce most of the above.
Here is the example of csky:
arch/csky/kernel/perf_event.c +1 -1
@@ -1319,10 +1319,10 @@ int csky_pmu_device_probe(struct platform_device *pdev,pr_notice ("[perf] PMU request irq fail!\n" ); } - ret = cpuhp_setup_state(CPUHP_AP_PERF_CSKY_ONLINE, "AP_PERF_ONLINE", + ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
"arch/csky/perf_event:starting",
csky_pmu_starting_cpu,
csky_pmu_dying_cpu);
- if (ret) {
+ if (ret < 0) {
csky_pmu_free_irq();
free_percpu(csky_pmu.hw_events);
return ret;(quoted diff) +0 -0
b/drivers/clocksource/timer-mp-csky.c
index 183a995..fc17d77 100644
drivers/clocksource/timer-mp-csky.c +0 -0
@@ -151,11 +151,11 @@ static int __init csky_mptimer_init(struct
device_node *np)
clocksource_register_hz(&csky_clocksource, timer_of_rate(to));
sched_clock_register(sched_clock_read, 32, timer_of_rate(to));- ret = cpuhp_setup_state(CPUHP_AP_CSKY_TIMER_STARTING,
+ ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
"clockevents/csky/timer:starting",
csky_mptimer_starting_cpu,
csky_mptimer_dying_cpu);
- if (ret)
+ if (ret < 0)
return -EINVAL;
return 0;include/linux/cpuhotplug.h +0 -2
@@ -134,7 +134,6 @@ enum cpuhp_state {CPUHP_AP_ARC_TIMER_STARTING ,CPUHP_AP_RISCV_TIMER_STARTING ,CPUHP_AP_CLINT_TIMER_STARTING , -CPUHP_AP_CSKY_TIMER_STARTING ,CPUHP_AP_HYPERV_TIMER_STARTING ,CPUHP_AP_KVM_STARTING , CPUHP_AP_KVM_ARM_VGIC_INIT_STARTING,
@@ -186,7 +185,6 @@ enum cpuhp_state {CPUHP_AP_PERF_POWERPC_TRACE_IMC_ONLINE , CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE,CPUHP_AP_PERF_POWERPC_HV_GPCI_ONLINE , -CPUHP_AP_PERF_CSKY_ONLINE ,CPUHP_AP_WATCHDOG_ONLINE ,CPUHP_AP_WORKQUEUE_ONLINE , CPUHP_AP_RCUTREE_ONLINE,
--
Best Regards
Guo Ren
Peter Zijlstra
maintainerQuoted 2 lines · Linus Torvalds
So this is entirely unrelated to the csky pull request, and is more of a generic "the perf CPU hotplug thing seems a complete mess".
Yes, I've noticed that a few times but it never seemed to have made it to the top of the todo list :/ Let me see what I can do about that.