- 09 7月, 2022 1 次提交
-
-
由 William Zhang 提交于
Remove CONFIG_ARCH_BCM_63XX and add BCMBCA sub platform configs. Signed-off-by: NWilliam Zhang <william.zhang@broadcom.com> Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
-
- 14 6月, 2022 1 次提交
-
-
由 Peter Robinson 提交于
BCM2711, the SoC used on the Raspberry Pi 4 has a different 3D render GPU IP than its predecessors. Enable it it on multi v7 and bcm2835 configs. Signed-off-by: NNicolas Saenz Julienne <nsaenzjulienne@suse.de> Signed-off-by: NPeter Robinson <pbrobinson@gmail.com> Reviewed-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NJavier Martinez Canillas <javierm@redhat.com> Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
-
- 04 6月, 2022 3 次提交
-
-
由 Helge Deller 提交于
Implement fb_is_primary_device() function, so that fbcon detects if this framebuffer belongs to the default graphics card which was used to start the system. Signed-off-by: NHelge Deller <deller@gmx.de> Cc: stable@vger.kernel.org # v5.10+
-
由 Arnd Bergmann 提交于
With all the header files out of the way, and the clock driver converted to the common framework, nothing stops us from building OMAP together with the other platforms. As usual, the decompressor support is a victim here, and is only available when CONFIG_DEBUG_LL is configured for the particular board. Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-
由 Janusz Krzysztofik 提交于
OMAP1 still uses its own implementation of standard clock API defined in include/linux/clk.h. Internals of that implementation are not visible outside OMAP1 directory. As a consequence, device drivers are not able to register clocks potentially provided by peripheral devices. Drop OMAP1 implementation of the clock API and enable common clock framework. Modify the remaining low level code to be compatible with clock provider API and register the clocks with CCF. Move initialisation of clocks to omap1_timer_init() to avoid memory allocation issues at early setup phase from where omap1_init_early() is called. Register the clocks after initialization of clock I/O registers, local clock pointers used by OMAP1 clock ops, and local .rate fields of clocks with no local implementation of .recalc ops, so CCF structures are populated with correct data during clock registration. Instead of enabling some of the registered clocks, flag them for CCF as critical. Introduce .is_enabled op using code that verifies hardware status of clock enablement, split out from implementation of .disable_unused op, so the latter is actually called by CCF for not requested but hardware enabled clocks. Add .round_rate ops where missing so .set_rate ops are called by CCF as expected. Since CCF allows parallel execution of .enable/.disable and .set_rate ops, protect registers shared among those groups of ops from concurrent access with spinlocks. Drop local debugfs support in favor of that provided by CCF. v2: flag tc2_ck as CLK_IS_CRITICAL (Aaro) v3: rebase on top of soc/omap1-multiplatform-5.18, - drop no longer needed includes from arch/arm/mach-omap1/io.c Signed-off-by: NJanusz Krzysztofik <jmkrzyszt@gmail.com> Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-
- 03 6月, 2022 32 次提交
-
-
由 Yury Norov 提交于
kvm_hv_flush_tlb() applies bitmap API to a u64 variable valid_bank_mask. Since valid_bank_mask has a fixed size, we can use hweight64() and avoid excessive bloating. CC: Borislav Petkov <bp@alien8.de> CC: Dave Hansen <dave.hansen@linux.intel.com> CC: H. Peter Anvin <hpa@zytor.com> CC: Ingo Molnar <mingo@redhat.com> CC: Jim Mattson <jmattson@google.com> CC: Joerg Roedel <joro@8bytes.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Sean Christopherson <seanjc@google.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Vitaly Kuznetsov <vkuznets@redhat.com> CC: Wanpeng Li <wanpengli@tencent.com> CC: kvm@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: x86@kernel.org Acked-by: NVitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: NYury Norov <yury.norov@gmail.com>
-
由 Yury Norov 提交于
In kvm_hv_flush_tlb(), valid_bank_mask is declared as unsigned long, but is used as u64, which is wrong for i386, and has been spotted by LKP after applying "KVM: x86: hyper-v: replace bitmap_weight() with hweight64()" https://lore.kernel.org/lkml/20220510154750.212913-12-yury.norov@gmail.com/ But it's wrong even without that patch because now bitmap_weight() dereferences a word after valid_bank_mask on i386. >> include/asm-generic/bitops/const_hweight.h:21:76: warning: right shift count >= width of type +[-Wshift-count-overflow] 21 | #define __const_hweight64(w) (__const_hweight32(w) + __const_hweight32((w) >> 32)) | ^~ include/asm-generic/bitops/const_hweight.h:10:16: note: in definition of macro '__const_hweight8' 10 | ((!!((w) & (1ULL << 0))) + \ | ^ include/asm-generic/bitops/const_hweight.h:20:31: note: in expansion of macro '__const_hweight16' 20 | #define __const_hweight32(w) (__const_hweight16(w) + __const_hweight16((w) >> 16)) | ^~~~~~~~~~~~~~~~~ include/asm-generic/bitops/const_hweight.h:21:54: note: in expansion of macro '__const_hweight32' 21 | #define __const_hweight64(w) (__const_hweight32(w) + __const_hweight32((w) >> 32)) | ^~~~~~~~~~~~~~~~~ include/asm-generic/bitops/const_hweight.h:29:49: note: in expansion of macro '__const_hweight64' 29 | #define hweight64(w) (__builtin_constant_p(w) ? __const_hweight64(w) : __arch_hweight64(w)) | ^~~~~~~~~~~~~~~~~ arch/x86/kvm/hyperv.c:1983:36: note: in expansion of macro 'hweight64' 1983 | if (hc->var_cnt != hweight64(valid_bank_mask)) | ^~~~~~~~~ CC: Borislav Petkov <bp@alien8.de> CC: Dave Hansen <dave.hansen@linux.intel.com> CC: H. Peter Anvin <hpa@zytor.com> CC: Ingo Molnar <mingo@redhat.com> CC: Jim Mattson <jmattson@google.com> CC: Joerg Roedel <joro@8bytes.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Sean Christopherson <seanjc@google.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Vitaly Kuznetsov <vkuznets@redhat.com> CC: Wanpeng Li <wanpengli@tencent.com> CC: kvm@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: x86@kernel.org Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: NYury Norov <yury.norov@gmail.com> Message-Id: <20220519171504.1238724-1-yury.norov@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Yury Norov 提交于
remove_siblinginfo() initialises variable 'last', but never uses it. Drop unneeded code. CC: Ingo Molnar <mingo@kernel.org> CC: Peter Zijlstra <peterz@infradead.org> CC: Valentin Schneider <vschneid@redhat.com> CC: linux-ia64@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: NYury Norov <yury.norov@gmail.com> Acked-by: NAndrew Morton <akpm@linux-foundation.org>
-
由 Yury Norov 提交于
Copying bitmaps from/to 64-bit arrays with bitmap_copy is not safe on 32-bit BE machines. Use designated functions instead. CC: Alexander Gordeev <agordeev@linux.ibm.com> CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com> CC: Christian Borntraeger <borntraeger@linux.ibm.com> CC: Claudio Imbrenda <imbrenda@linux.ibm.com> CC: David Hildenbrand <david@redhat.com> CC: Heiko Carstens <hca@linux.ibm.com> CC: Janosch Frank <frankja@linux.ibm.com> CC: Rasmus Villemoes <linux@rasmusvillemoes.dk> CC: Sven Schnelle <svens@linux.ibm.com> CC: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: NYury Norov <yury.norov@gmail.com> Reviewed-by: NDavid Hildenbrand <david@redhat.com>
-
由 Yury Norov 提交于
mm code calls nodes_weight() to check if any bit of a given nodemask is set. We can do it more efficiently with nodes_empty() because nodes_empty() stops traversing the nodemask as soon as it finds first set bit, while nodes_weight() counts all bits unconditionally. Signed-off-by: NYury Norov <yury.norov@gmail.com>
-
由 Yury Norov 提交于
In some cases, arch/x86 code calls cpumask_weight() to check if any bit of a given cpumask is set. We can do it more efficiently with cpumask_empty() because cpumask_empty() stops traversing the cpumask as soon as it finds first set bit, while cpumask_weight() counts all bits unconditionally. Signed-off-by: NYury Norov <yury.norov@gmail.com> Reviewed-by: NSteve Wahl <steve.wahl@hpe.com>
-
由 Yury Norov 提交于
setup_arch() calls cpumask_weight() to check if any bit of a given cpumask is set. We can do it more efficiently with cpumask_empty() because cpumask_empty() stops traversing the cpumask as soon as it finds first set bit, while cpumask_weight() counts all bits unconditionally. Signed-off-by: NYury Norov <yury.norov@gmail.com>
-
由 Yury Norov 提交于
common_shutdown_1() calls cpumask_weight() to check if any bit of a given cpumask is set. We can do it more efficiently with cpumask_empty() because cpumask_empty() stops traversing the cpumask as soon as it finds first set bit, while cpumask_weight() counts all bits unconditionally. Signed-off-by: NYury Norov <yury.norov@gmail.com>
-
由 Yury Norov 提交于
bitmap_empty() is better than bitmap_weight() because it may return earlier, and improves on readability. CC: Albert Ou <aou@eecs.berkeley.edu> CC: Anup Patel <anup@brainfault.org> CC: Atish Patra <atishp@atishpatra.org> CC: Jisheng Zhang <jszhang@kernel.org> CC: Palmer Dabbelt <palmer@dabbelt.com> CC: Paul Walmsley <paul.walmsley@sifive.com> CC: Tsukasa OI <research_trasio@irq.a4lg.com> CC: linux-riscv@lists.infradead.org CC: linux-kernel@vger.kernel.org Signed-off-by: NYury Norov <yury.norov@gmail.com> Reviewed-by: NAnup Patel <anup@brainfault.org>
-
由 Huacai Chen 提交于
Add a default config file for LoongArch-based Loongson-3 platform. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add Non-Uniform Memory Access (NUMA) support for LoongArch. LoongArch has 48-bit physical address, but the HyperTransport I/O bus only support 40-bit address, so we need a custom phys_to_dma() and dma_to_phys() to extract the 4-bit node id (bit 44~47) from Loongson-3's 48-bit physical address space and embed it into 40-bit. In the 40-bit dma address, node id offset can be read from the LS7A_DMA_CFG register. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
LoongArch-based procesors have 4, 8 or 16 cores per package. This patch adds multi-processor (SMP) support for LoongArch. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add VDSO and VSYSCALL support (sigreturn, gettimeofday and its friends) for LoongArch. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add some library functions for LoongArch, including: delay, memset, memcpy, memmove, copy_user, strncpy_user, strnlen_user and tlb dump functions. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add some misc common routines for LoongArch, including: asm-offsets routines, futex functions, i/o memory access functions, frame-buffer functions, procfs information display, etc. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add ELF-related definition and module relocation code for basic LoongArch support. Cc: Jessica Yu <jeyu@kernel.org> Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NLuis Chamberlain <mcgrof@kernel.org> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add ucontext/sigcontext definition and signal handling support for LoongArch. Cc: Eric Biederman <ebiederm@xmission.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add system call support and related uaccess.h for LoongArch. Q: Why keep _ARCH_WANT_SYS_CLONE definition while there is clone3: A: The latest glibc release has some basic support for clone3 but it is not complete. E.g., pthread_create() and spawni() have converted to use clone3 but fork() will still use clone. Moreover, some seccomp related applications can still not work perfectly with clone3. E.g., Chromium sandbox cannot work at all and there is no solution for it, which is more terrible than the fork() story [1]. [1] https://chromium-review.googlesource.com/c/chromium/src/+/2936184Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add memory management support for LoongArch, including: cache and tlb management, page fault handling and ioremap/mmap support. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add process management support for LoongArch, including: thread info definition, context switch and process tracing. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add the exception and interrupt handling machanism for basic LoongArch support. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add basic boot, setup and reset routines for LoongArch. Now, LoongArch machines use UEFI-based firmware. The firmware passes configuration information to the kernel via ACPI and DMI/SMBIOS. Currently an existing interface between the kernel and the bootloader is implemented. Kernel gets 2 values from the bootloader, passed in registers a0 and a1; a0 is an "EFI boot flag" distinguishing UEFI and non-UEFI firmware, while a1 is a pointer to an FDT with systable, memmap, cmdline and initrd information. The standard UEFI boot protocol (EFISTUB) will be added later. Cc: linux-efi@vger.kernel.org Cc: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Co-developed-by: NYun Liu <liuyun@loongson.cn> Signed-off-by: NYun Liu <liuyun@loongson.cn> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add some other common headers for basic LoongArch support. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add common headers (atomic, bitops, barrier and locking) for basic LoongArch support. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add common headers (CPU definition and address space layout) for basic LoongArch support. Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Huacai Chen 提交于
Add Kbuild, Makefile, Kconfig and link script for LoongArch build infrastructure. Reviewed-by: NGuo Ren <guoren@kernel.org> Reviewed-by: NWANG Xuerui <git@xen0n.name> Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
-
由 Mikulas Patocka 提交于
With the kernel 5.18, the system will hang on boot if it is compiled with CONFIG_SCHED_MC. The last printed message is "Brought up 1 node, 1 CPU". The crash happens in sd_init tl->mask (which is cpu_coregroup_mask) returns an empty mask. This happens because cpu_topology[0].core_sibling is empty. Consequently, sd_span is set to an empty mask sd_id = cpumask_first(sd_span) sets sd_id == NR_CPUS (because the mask is empty) sd->shared = *per_cpu_ptr(sdd->sds, sd_id); sets sd->shared to NULL because sd_id is out of range atomic_inc(&sd->shared->ref); crashes without printing anything We can fix it by calling reset_cpu_topology() from init_cpu_topology() - this will initialize the sibling masks on CPUs, so that they're not empty. This patch also removes the variable "dualcores_found", it is useless, because during boot, init_cpu_topology is called before store_cpu_topology. Thus, set_sched_topology(parisc_mc_topology) is never called. We don't need to call it at all because default_topology in kernel/sched/topology.c contains the same items as parisc_mc_topology. Note that we should not call store_cpu_topology() from init_per_cpu() because it is called too early in the kernel initialization process and it results in the message "Failure to register CPU0 device". Before this patch, store_cpu_topology() would exit immediatelly because cpuid_topo->core id was uninitialized and it was 0. Signed-off-by: NMikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org # v5.18 Signed-off-by: NHelge Deller <deller@gmx.de>
-
由 Nathan Chancellor 提交于
After commit 49b290e4 ("riscv: prevent compressed instructions in alternatives"), builds with LLVM's integrated assembler fail: In file included from arch/riscv/mm/init.c:10: In file included from ./include/linux/mm.h:29: In file included from ./include/linux/pgtable.h:6: In file included from ./arch/riscv/include/asm/pgtable.h:108: ./arch/riscv/include/asm/tlbflush.h:23:2: error: expected assembly-time absolute expression ALT_FLUSH_TLB_PAGE(__asm__ __volatile__ ("sfence.vma %0" : : "r" (addr) : "memory")); ^ ./arch/riscv/include/asm/errata_list.h:33:5: note: expanded from macro 'ALT_FLUSH_TLB_PAGE' asm(ALTERNATIVE("sfence.vma %0", "sfence.vma", SIFIVE_VENDOR_ID, \ ^ ./arch/riscv/include/asm/alternative-macros.h:187:2: note: expanded from macro 'ALTERNATIVE' _ALTERNATIVE_CFG(old_content, new_content, vendor_id, errata_id, CONFIG_k) ^ ./arch/riscv/include/asm/alternative-macros.h:113:2: note: expanded from macro '_ALTERNATIVE_CFG' __ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, IS_ENABLED(CONFIG_k)) ^ ./arch/riscv/include/asm/alternative-macros.h:110:2: note: expanded from macro '__ALTERNATIVE_CFG' ALT_NEW_CONTENT(vendor_id, errata_id, enable, new_c) ^ ./arch/riscv/include/asm/alternative-macros.h:99:3: note: expanded from macro 'ALT_NEW_CONTENT' ".org . - (889b - 888b) + (887b - 886b)\n" \ ^ <inline asm>:26:6: note: instantiated into assembly here .org . - (889b - 888b) + (887b - 886b) ^ This error happens because LLVM's integrated assembler has a one-pass design, which means it cannot figure out the instruction lengths when the .org directive is outside of the subsection that contains the instructions, which was changed by the .option directives added by the above change. Move the .org directives before the .previous directive so that these directives are always within the same subsection, which resolves the failures and does not introduce any new issues with GNU as. This was done for arm64 in commit 966a0acc ("arm64/alternatives: move length validation inside the subsection") and commit 22315a22 ("arm64: alternatives: Move length validation in alternative_{insn, endif}"). While there is no error from the assembly versions of the macro, they appear to have the same problem so just make the same change there as well so that there are no problems in the future. Link: https://github.com/ClangBuiltLinux/linux/issues/1640Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: NNathan Chancellor <nathan@kernel.org> Reviewed-by: NHeiko Stuebner <heiko@sntech.de> Tested-by: NHeiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20220516214520.3252074-1-nathan@kernel.org Cc: stable@vger.kernel.org Signed-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
-
由 Jisheng Zhang 提交于
These three functions are only used in init.c, so make them static. Fix W=1 warnings like below: arch/riscv/mm/init.c:721:13: warning: no previous prototype for function 'pt_ops_set_early' [-Wmissing-prototypes] void __init pt_ops_set_early(void) ^ Signed-off-by: NJisheng Zhang <jszhang@kernel.org> Reviewed-by: NAnup Patel <anup@brainfault.org> Reviewed-by: NAtish Patra <atishp@rivosinc.com> Link: https://lore.kernel.org/r/20220516143204.2603-1-jszhang@kernel.orgSigned-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
-
由 Stephen Boyd 提交于
A static key warning splat appears during early boot on arm64 systems that credit randomness from devicetrees that contain an "rng-seed" property. This is because setup_machine_fdt() is called before jump_label_init() during setup_arch(). Let's swap the order of these two calls so that jump labels are initialized before the devicetree is unflattened and the rng seed is credited. static_key_enable_cpuslocked(): static key '0xffffffe51c6fcfc0' used before call to jump_label_init() WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:166 static_key_enable_cpuslocked+0xb0/0xb8 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.18.0+ #224 44b43e377bfc84bc99bb5ab885ff694984ee09ff pstate: 600001c9 (nZCv dAIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : static_key_enable_cpuslocked+0xb0/0xb8 lr : static_key_enable_cpuslocked+0xb0/0xb8 sp : ffffffe51c393cf0 x29: ffffffe51c393cf0 x28: 000000008185054c x27: 00000000f1042f10 x26: 0000000000000000 x25: 00000000f10302b2 x24: 0000002513200000 x23: 0000002513200000 x22: ffffffe51c1c9000 x21: fffffffdfdc00000 x20: ffffffe51c2f0831 x19: ffffffe51c6fcfc0 x18: 00000000ffff1020 x17: 00000000e1e2ac90 x16: 00000000000000e0 x15: ffffffe51b710708 x14: 0000000000000066 x13: 0000000000000018 x12: 0000000000000000 x11: 0000000000000000 x10: 00000000ffffffff x9 : 0000000000000000 x8 : 0000000000000000 x7 : 61632065726f6665 x6 : 6220646573752027 x5 : ffffffe51c641d25 x4 : ffffffe51c13142c x3 : ffff0a00ffffff05 x2 : 40000000ffffe003 x1 : 00000000000001c0 x0 : 0000000000000065 Call trace: static_key_enable_cpuslocked+0xb0/0xb8 static_key_enable+0x2c/0x40 crng_set_ready+0x24/0x30 execute_in_process_context+0x80/0x90 _credit_init_bits+0x100/0x154 add_bootloader_randomness+0x64/0x78 early_init_dt_scan_chosen+0x140/0x184 early_init_dt_scan_nodes+0x28/0x4c early_init_dt_scan+0x40/0x44 setup_machine_fdt+0x7c/0x120 setup_arch+0x74/0x1d8 start_kernel+0x84/0x44c __primary_switched+0xc0/0xc8 ---[ end trace 0000000000000000 ]--- random: crng init done Machine model: Google Lazor (rev1 - 2) with LTE Cc: Hsin-Yi Wang <hsinyi@chromium.org> Cc: Douglas Anderson <dianders@chromium.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jason A. Donenfeld <Jason@zx2c4.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Fixes: f5bda35f ("random: use static branch for crng_ready()") Signed-off-by: NStephen Boyd <swboyd@chromium.org> Reviewed-by: NJason A. Donenfeld <Jason@zx2c4.com> Link: https://lore.kernel.org/r/20220602022109.780348-1-swboyd@chromium.orgSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
-
由 Xiang wangx 提交于
Delete the redundant word 'to'. Signed-off-by: NXiang wangx <wangxiang@cdjrlc.com> Link: https://lore.kernel.org/r/20220602180228.4259-1-wangxiang@cdjrlc.comSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
-
由 Kristen Carlson Accardi 提交于
When the system runs out of enclave memory, SGX can reclaim EPC pages by swapping to normal RAM. These backing pages are allocated via a per-enclave shared memory area. Since SGX allows unlimited over commit on EPC memory, the reclaimer thread can allocate a large number of backing RAM pages in response to EPC memory pressure. When the shared memory backing RAM allocation occurs during the reclaimer thread context, the shared memory is charged to the root memory control group, and the shmem usage of the enclave is not properly accounted for, making cgroups ineffective at limiting the amount of RAM an enclave can consume. For example, when using a cgroup to launch a set of test enclaves, the kernel does not properly account for 50% - 75% of shmem page allocations on average. In the worst case, when nearly all allocations occur during the reclaimer thread, the kernel accounts less than a percent of the amount of shmem used by the enclave's cgroup to the correct cgroup. SGX stores a list of mm_structs that are associated with an enclave. Pick one of them during reclaim and charge that mm's memcg with the shmem allocation. The one that gets picked is arbitrary, but this list almost always only has one mm. The cases where there is more than one mm with different memcg's are not worth considering. Create a new function - sgx_encl_alloc_backing(). This function is used whenever a new backing storage page needs to be allocated. Previously the same function was used for page allocation as well as retrieving a previously allocated page. Prior to backing page allocation, if there is a mm_struct associated with the enclave that is requesting the allocation, it is set as the active memory control group. [ dhansen: - fix merge conflict with ELDU fixes - check against actual ksgxd_tsk, not ->mm ] Cc: stable@vger.kernel.org Signed-off-by: NKristen Carlson Accardi <kristen@linux.intel.com> Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com> Reviewed-by: NShakeel Butt <shakeelb@google.com> Acked-by: NRoman Gushchin <roman.gushchin@linux.dev> Link: https://lkml.kernel.org/r/20220520174248.4918-1-kristen@linux.intel.com
-
- 02 6月, 2022 3 次提交
-
-
由 Masahiro Yamada 提交于
Commit 31a088b6 ("sparc: add asm/stat.h to UAPI compile-test coverage") converted as follows: uid_t --> __kernel_uid_t gid_t --> __kernel_gid_t It changed the field widths of struct stat because Sparc uses 16-bits for ___kernel_{uid,gid}_t as in arch/sparc/include/uapi/asm/posix_types.h. The safe replacements across all architectures are: uid_t --> __kernel_uid32_t gid_t --> __kernel_gid32_t as defined in include/linux/types.h. A similar issue was reported for the android binder. [1] [1]: https://lore.kernel.org/all/20220601010017.2639048-1-cmllamas@google.com/ Fixes: 31a088b6 ("sparc: add asm/stat.h to UAPI compile-test coverage") Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-
由 Masahiro Yamada 提交于
Commit c01013a2 ("powerpc: add asm/stat.h to UAPI compile-test coverage") converted as follows: uid_t --> __kernel_uid_t gid_t --> __kernel_gid_t The bit width of __kernel_{uid,gid}_t is 16 or 32-bits depending on architectures. PPC uses 32-bits for them as in include/uapi/asm-generic/posix_types.h, so the previous conversion is probably fine, but let's stick to the arch-independent conversion just in case. The safe replacements across all architectures are: uid_t --> __kernel_uid32_t gid_t --> __kernel_gid32_t as defined in include/linux/types.h. A similar issue was reported for the android binder. [1] [1]: https://lore.kernel.org/all/20220601010017.2639048-1-cmllamas@google.com/ Fixes: c01013a2 ("powerpc: add asm/stat.h to UAPI compile-test coverage") Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-
由 Masahiro Yamada 提交于
Commit 8c1a381a ("mips: add asm/stat.h to UAPI compile-test coverage") converted as follows: uid_t --> __kernel_uid_t gid_t --> __kernel_gid_t The bit width of __kernel_{uid,gid}_t is 16 or 32-bits depending on architectures. MIPS uses 32-bits for them as in include/uapi/asm-generic/posix_types.h, so the previous conversion is probably fine, but let's stick to the arch-independent conversion just in case. The safe replacements across all architectures are: uid_t --> __kernel_uid32_t gid_t --> __kernel_gid32_t as defined in include/linux/types.h. A similar issue was reported for the android binder. [1] [1]: https://lore.kernel.org/all/20220601010017.2639048-1-cmllamas@google.com/ Fixes: 8c1a381a ("mips: add asm/stat.h to UAPI compile-test coverage") Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-