- 06 9月, 2022 40 次提交
-
-
由 Hang Xiaoqian 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- There is no need to use per cpu loops_per_jiffy, so we remove loops_per_jiffy from struct cpuinfo_sw64. Signed-off-by: NHang Xiaoqian <hangxiaoqian@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Chuyue 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I56X48 -------------------------------- The past implementation of perf_get_regs_user could not get regs by default, but it was actually available via task_pt_regs. Fix it now. Signed-off-by: NHe Chuyue <hechuyue@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Min Fanlei 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I56WV8 -------------------------------- Due to the registration of guest IO address, there is wrong pr_info of "KVM MEMHOTPLUG support" when booting the guest, so we fix it. Signed-off-by: NMin Fanlei <minfanlei@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNF1 -------------------------------- For secondary CPU, it has to do ($sp - THREAD_SIZE) to find current thread_info. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNEN -------------------------------- This is because of commit f98db601 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler") in which switch_mm_irqs_off() is called by the scheduler, vs switch_mm() which is used by use_mm(). This patch mirrors the x86 code, ie. it disables interrupt in switch_mm(), and optimises the scheduler case by defining switch_mm_irqs_off(). After that, the asn_lock and need_new_asn in cpu_data are no longer needed. This patch also moves __load_new_mm_context() into flush_tlb_current() and make sure IRQs are off over it. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNDF -------------------------------- Use 'call' instead of 'jmp' in ret_from_fork(), so the 'ret' in schedule_tail() won't mess up branch prediction. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Yang Qiang 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Since GRUB has fixed the member's physical address of EFI memory descriptor, there is no need to add stale stuff here. Signed-off-by: NYang Qiang <yangqiang@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- At present, glibc dumps `trap_a*` when a segmentation fault is caught, but no user knows what they mean. That is, nobody care about them, so remove them to reduce overhead of SAVE_COMMON_REGS. Besides, `hae` is legacy code which should be deprecated too. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNCX -------------------------------- Single step is supported by GDB on sw64, and those unused code can be removed. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNCX -------------------------------- An issue says that when parent traces a child, child does not terminate after signal SIGILL is delivered. This is because BPT/GENTRAP/OPDEC make regs->pc = exc_pc + 4 in hmcode. It used to send SIGILL to child with incorrect regs->pc. As a result, after PTRACE_CONT request is made on child, it will skip the exception instruction and go on. This patch makes `regs->pc = exc_pc` for SIGILL to fix this issue, then restructures code to make it clear. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- These hmcalls can be removed since nobody invoke them. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Tang Jinyang 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNC3 -------------------------------- Dynamic frequency scaling cannot change the current cpu frequency when userspace policy is used, and cpuinfo_cur_freq always displays the default value. This patch fixes it. Signed-off-by: NTang Jinyang <tangjinyang@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Wang Yuanheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNB8 -------------------------------- It supports host mode only. Qemu reports "unsupported IPU addr" when it runs a guest os or emulator system. Signed-off-by: NWang Yuanheng <wangyuanheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PN9S -------------------------------- Cache fetch instructions are removed. These instructions will cause more cache misses and negatively impact performance. Some unnecessary code alignment are removed to reduce code size. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PN9S -------------------------------- Switch to inline version of _copy_{to,from}_user() to improve performance. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PN9S -------------------------------- If exception happened inside simd part causing the function to exit, pop stack to make sure everything works correctly. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PN9S -------------------------------- Adjust order of instructions in deep-copy_template.S to make sure $18 always has bytes left to copy. This makes sure the return value of copy_{to,from}_user() is correct. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PN9S -------------------------------- Fix conditional branch of head loop in deep-copy_template.S, so it will go to simd loop properly when dst is 32 bytes aligned. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I56XYC -------------------------------- __ARCH_HAS_SA_RESTORER was defined to fix compile error in the past. However, this changed the offset of sa_mask in struct sigaction and made sys_rt_sigaction unable to get sa_mask passed from user. To fix this problem, the old sigaction and the related structs are added back, macro define __ARCH_HAS_SA_RESTORER is removed. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Since we have removed hmcall swpctx invocations, some members of struct pcb_struct become useless. This patch removes them to reduce the struct size. As a result, struct processor_state is simplified too. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- It used to switch context in hmcall swpctx, which is not flexible enough. We try to make it happen in kernel without hmcall swpctx. To achieve this end, not only fpu state but also usp and tls pointer have to be saved and restored. For process creation and hibernation, the current tls pointer has to be read from CSR:TID as it may be out- of-sync with the saved value. For suspend, it's better to be saved and restored because there is no guarantee that WAKEUP interrupt will be used. To do this, we add hmcall fixup to access CSR:TID and obtain backward compatibility for user. Besides, the old `unique` is too obscure to be understood. To make it clear, we rename it to `tp` which is short for tls pointer, and then retain HMC_rdunique/wrunique as alias of HMC_rdtp/wrtp. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- The hmcall swpctx is a bit heavyweight for context reload, and we have provided some other hmcalls to do this: - wrfen: enable fpu. - wrptbr: update CSR:PTBR only. - load_mm: force update CSR:PTBR and CSR:UPN to switch mm. For smp setup, hmcall swpctx is also heavy because boot CPU only has to prepare stack pointer for secondary CPUs. So we remove the tidle_pcb[], and take tidle_ksp[] to hold target idle task's ksp. Each secondary CPU loads its ksp and update CSR:PTBR at boot time. With this patch, most hmcall swpctx invocations are removed. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Zhou Xuemei 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- IO virtual address assignment in unmanaged domain is completely handed over to the device owner, so there is no need to set the IOVA baseline. Signed-off-by: NZhou Xuemei <zhouxuemei@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- SW64 architecture manuals say that icache of C3A/C3B is VIVT with ICtag which is mapped to physical memory. That means icache doesn't need to be flushed when instruction pages change. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Rename these helpers and their usages according to SW64 architecture manuals. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Wu Liliu 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Since die_if_kernel() has been removed, the prefix `dik_` is not appropriate. Remove this prefix and simplify the implementation if there is no one to forward the exception to. Signed-off-by: NWu Liliu <wuliliu@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNSZ -------------------------------- This reverts commit ce645515. In previous patch, we fixed deep-copy_user(). It's now safe to use it in any context, so no need to check. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PNSZ -------------------------------- Some fp registers are clobbered in deep-copy_user() because this function was assumed to be used only in normal task context and to be safe to clobber caller-save fp registers. However, these assumptions have been proven wrong. Since deep-copy_user() is basically a deep-memcpy() with exception handling, a deep-copy_template() is now used to implement these two functions. Different macro defines and entry/exit code are used by deep-copy_user() and deep-memcpy(). Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Du Yilong 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PN9S -------------------------------- As more devices are hot-plugged in a guest os, it will fail to respond interrupts because of insufficient interrupt resource and appear to be stuck. To fix this issue, expand the maximum number of irq supported to 256. Signed-off-by: NDu Yilong <duyilong@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Wang Yuanheng 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Export symbol for bind_vcpu_enabled to fix compile errors when CONFIG_KVM=m. Signed-off-by: NWang Yuanheng <wangyuanheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Chuyue 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- It has already disabled interrupt in hmcode and it's unnecessary to disable again in do_entInt(). This way, do_entInt() is a wrapper of handle_chip_irq(), so simplify it. Signed-off-by: NHe Chuyue <hechuyue@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 He Sheng 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Make use of cpu_data no matter SMP is yes or no, and remove unused fields from it. After that, some function calls can be simplified. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Zhou Xuemei 提交于
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5GDKC -------------------------------- This commit complements commit afe00ca0 ("sw64: gpu: correct low-level mmio memset/memcpy direct calls"). Signed-off-by: NZhou Xuemei <zhouxuemei@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Zhou Xuemei 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- According to commit eb01d42a ("PCI: consolidate PCI config entry in drivers/pci"), use PCI config entry in drivers/pci instead of arch/sw64. Signed-off-by: NZhou Xuemei <zhouxuemei@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Gu Zitao 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Since using i8042 drivers on sw64 would cause kernel crash, we add MIGHT_HAVE_PC_SERIO option to control selection of i8042. Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Gu Zitao 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Lu Feifei 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Signed-off-by: NLu Feifei <lufeifei@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Mao Minkai 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- Fix compile errors when CONFIG_NUMA or CONFIG_SPARSEMEM is not set. Some make rules are changed to avoid potential compile errors. Signed-off-by: NMao Minkai <maominkai@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-
由 Wu Liliu 提交于
Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG -------------------------------- In the original implementation, incorrent printing may occur when multiple processes die at the same time. To fix this, we use lock. Signed-off-by: NWu Liliu <wuliliu@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
-