Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoongArch: Revert "irqchip/loongson-eiointc: fix gsi register error" #338

Merged
merged 6 commits into from
Jul 25, 2024

Conversation

sterling-teng
Copy link
Contributor

No description provided.

Yanteng Si added 6 commits July 25, 2024 16:29
…ode()

Multi-bridge machines required that all eiointc controllers in the system
are initialized, otherwise the system does not boot.

The initialization happens on the boot CPU during early boot and relies on
cpu_to_node() for identifying the individual nodes.

That works when the number of possible CPUs is large enough, but with a
command line limit, e.g. "nr_cpus=$N" for kdump, but fails when the CPUs
of the secondary nodes are not covered.

During early ACPI enumeration all CPU to node mappings are recorded up to
CONFIG_NR_CPUS. These are accessible via early_cpu_to_node() even in the
case that "nr_cpus=N" truncates the number of possible CPUs and only
provides the possible CPUs via cpu_to_node() translation.

Change the node lookup in the driver to use early_cpu_to_node() so that
even with a limitation on the number of possible CPUs all eointc instances
are initialized.

This can't obviously cure the case where CONFIG_NR_CPUS is too small.

[ tglx: Massaged changelog ]

Fixes: 64cc451 ("irqchip/loongson-eiointc: Fix incorrect use of acpi_get_vec_parent")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240623034113.1808727-1-chenhuacai@loongson.cn
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Some drivers want to use cpu_logical_map(), early_cpu_to_node() and some
other CPU mapping APIs, even if we use "nr_cpus=1" to hard limit the CPU
number. This is strongly required for the multi-bridges machines.

Currently, we stop parsing the MADT if the nr_cpus limit is reached, but
to achieve the above goal we should always enumerate the MADT table and
setup logical-physical CPU mapping whether there is a nr_cpus limit.

Rework the MADT enumeration:

1. Define a flag "cpu_enumerated" to distinguish the first enumeration
   (cpu_enumerated=0) and the physical hotplug case (cpu_enumerated=1)
   for set_processor_mask().

2. If cpu_enumerated=0, stop parsing only when NR_CPUS limit is reached,
   so we can setup logical-physical CPU mapping; if cpu_enumerated=1,
   stop parsing when nr_cpu_ids limit is reached, so we can avoid some
   runtime bugs. Once logical-physical CPU mapping is setup, we will let
   cpu_enumerated=1.

3. Use find_first_zero_bit() instead of cpumask_next_zero() to find the
   next zero bit (free logical CPU id) in the cpu_present_mask, because
   cpumask_next_zero() will stop at nr_cpu_ids.

4. Only touch cpu_possible_mask if cpu_enumerated=0, this is in order to
   avoid some potential crashes, because cpu_possible_mask is marked as
   __ro_after_init.

5. In prefill_possible_map(), clear cpu_present_mask bits greater than
   nr_cpu_ids, in order to avoid a CPU be "present" but not "possible".

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Hibernation assumes the memory layout after resume be the same as that
before sleep, so it expects the kernel is loaded at the same position.
To achieve this goal we automatically disable KASLR if user explicitly
requests hibernation via the "resume=" command line. Since "nohibernate"
and "noresume" have higher priorities than "resume=", we only disable
KASLR if there is no "nohibernate" and "noresume".

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Configure degbuginfo so that crash can be resolved

Signed-off-by: duanchenghao <duanchenghao@kylinos.cn>
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
When we boot Loongson-TC542F0 3C5000 4-Node dual bridge machine, boot
failed with no root partition found. The reason is HT RX INT TRANS
register not initialized, So we initialize it.

Fixes: db5bb24abc8d ("LoongArch: Old BPI compatibility")
Reported-by: Qianwen Li <liqianwen@loongson.cn>
Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
@deepin-ci-robot
Copy link

Hi @sterling-teng. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@deepin-ci-robot deepin-ci-robot requested a review from BLumia July 25, 2024 13:48
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tsic404 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@opsiff
Copy link
Member

opsiff commented Jul 25, 2024

/lgtm

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • loongarch/configs/loongson3_defconfig文件中,将CONFIG_DEBUG_INFO_DWARF4更改为CONFIG_DEBUG_INFO_DWARF4可能会影响调试信息格式,需要确认是否有特定原因需要这样做。
  • loongarch/include/asm/numa.h文件中,移除了NODES_PER_FLATMODE_NODE宏定义,需要验证这一改动是否不会影响其他相关的代码部分。
  • loongarch/kernel/acpi.c文件中,修改了set_processor_mask函数以处理更少的CPU核心,这可能会影响系统管理器和启动脚本的行为,需要验证这一改动是否符合预期。
  • loongarch/kernel/irq.c文件中,添加了新的Hibernation条件判断,需要验证这些更改是否正确处理了 resume 和 hibernate 命令。
  • loongarch/kernel/relocate.c文件中,修改了KASLR的配置,需要验证这一改动是否不会影响系统的其他部分。
  • loongarch/kernel/smp.c文件中,修改了CPU核心的初始化逻辑,需要验证这一改动是否正确处理了CPU核心的枚举和初始化。
  • drivers/irqchip/irq-loongson-eiointc.c文件中,修改了early_cpu_to_node函数的调用方式,需要验证这一改动是否正确处理了节点映射。

是否建议立即修改:

这些更改涉及到系统配置、编译选项、内核逻辑和驱动程序,需要仔细验证每个更改是否符合预期行为,并确保不会引入新的错误或兼容性问题。特别是loongarch/configs/loongson3_defconfigloongarch/include/asm/numa.h的更改可能会影响系统稳定性,需要特别注意。

@opsiff opsiff merged commit 910b256 into deepin-community:linux-6.6.y Jul 25, 2024
4 of 5 checks passed
opsiff pushed a commit to opsiff/UOS-kernel that referenced this pull request Jul 29, 2024
[ Upstream commit 5f1d18de79180deac2822c93e431bbe547f7d3ce ]

Add a test case which replaces an active ingress qdisc while keeping the
miniq in-tact during the transition period to the new clsact qdisc.

  # ./vmtest.sh -- ./test_progs -t tc_link
  [...]
  ./test_progs -t tc_link
  [    3.412871] bpf_testmod: loading out-of-tree module taints kernel.
  [    3.413343] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  deepin-community#332     tc_links_after:OK
  deepin-community#333     tc_links_append:OK
  deepin-community#334     tc_links_basic:OK
  deepin-community#335     tc_links_before:OK
  deepin-community#336     tc_links_chain_classic:OK
  deepin-community#337     tc_links_chain_mixed:OK
  deepin-community#338     tc_links_dev_chain0:OK
  deepin-community#339     tc_links_dev_cleanup:OK
  deepin-community#340     tc_links_dev_mixed:OK
  deepin-community#341     tc_links_ingress:OK
  deepin-community#342     tc_links_invalid:OK
  deepin-community#343     tc_links_prepend:OK
  deepin-community#344     tc_links_replace:OK
  deepin-community#345     tc_links_revision:OK
  Summary: 14/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20240708133130.11609-2-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit e41db26543ef24b6906a832f73119cfadcd99f35)
Avenger-285714 pushed a commit that referenced this pull request Aug 12, 2024
[ Upstream commit 5f1d18de79180deac2822c93e431bbe547f7d3ce ]

Add a test case which replaces an active ingress qdisc while keeping the
miniq in-tact during the transition period to the new clsact qdisc.

  # ./vmtest.sh -- ./test_progs -t tc_link
  [...]
  ./test_progs -t tc_link
  [    3.412871] bpf_testmod: loading out-of-tree module taints kernel.
  [    3.413343] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  #332     tc_links_after:OK
  #333     tc_links_append:OK
  #334     tc_links_basic:OK
  #335     tc_links_before:OK
  #336     tc_links_chain_classic:OK
  #337     tc_links_chain_mixed:OK
  #338     tc_links_dev_chain0:OK
  #339     tc_links_dev_cleanup:OK
  #340     tc_links_dev_mixed:OK
  #341     tc_links_ingress:OK
  #342     tc_links_invalid:OK
  #343     tc_links_prepend:OK
  #344     tc_links_replace:OK
  #345     tc_links_revision:OK
  Summary: 14/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20240708133130.11609-2-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit e41db26543ef24b6906a832f73119cfadcd99f35)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants