5.18.8-rc1 review
Subsystems (4)
Greg Kroah-Hartman
maintainerPATCH 152/181 xtensa: Fix refcount leak bug in time.c
In reply to Greg Kroah-HartmanFrom: Liang He <[email protected]>
commit a0117dc956429f2ede17b323046e1968d1849150 upstream.
In calibrate_ccount(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.
Message-Id: <[email protected]>
--- arch/xtensa/kernel/time.c | 1 + 1 file changed, 1 insertion(+)
arch/xtensa/kernel/time.c +1 -0
@@ -154,6 +154,7 @@ static void __init calibrate_ccount(void cpu =of_find_compatible_node (NULL ,NULL ,"cdns,xtensa-cpu" );if (cpu) { clk =of_clk_get (cpu,0 ); +of_node_put (cpu);if (!IS_ERR (clk)) { ccount_freq =clk_get_rate (clk);return ;
Greg Kroah-Hartman
maintainerPATCH 153/181 parisc/stifb: Fix fb_is_primary_device() only available with CONFIG_FB_STI
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit 1d0811b03eb30b2f0793acaa96c6ce90b8b9c87a upstream.
Fix this build error noticed by the kernel test robot:
drivers/video/console/sticore.c:1132:5: error: redefinition of 'fb_is_primary_device'
arch/parisc/include/asm/fb.h:18:19: note: previous definition of 'fb_is_primary_device'
--- arch/parisc/include/asm/fb.h | 2 +- drivers/video/console/sticore.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
arch/parisc/include/asm/fb.h +1 -1
@@ -12,7 +12,7 @@ static inline void fb_pgprotect(struct fpgprot_val (vma->vm_page_prot) |= _PAGE_NO_CACHE; } -#if defined(CONFIG_STI_CONSOLE ) || defined(CONFIG_FB_STI ) +#if defined(CONFIG_FB_STI )int fb_is_primary_device (struct fb_info *info);#else static inline int fb_is_primary_device (struct fb_info *info)
drivers/video/console/sticore.c +2 -0
@@ -1127,6 +1127,7 @@ int sti_call(const struct sti_struct *streturn ret; } +#if defined(CONFIG_FB_STI )/* check if given fb_info is the primary device */ int fb_is_primary_device (struct fb_info *info) {
@@ -1142,6 +1143,7 @@ int fb_is_primary_device(struct fb_info return (sti->info == info); }EXPORT_SYMBOL (fb_is_primary_device); +#endif MODULE_AUTHOR ("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer" );MODULE_DESCRIPTION ("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines" );
Greg Kroah-Hartman
maintainerPATCH 154/181 parisc: Fix flush_anon_page on PA8800/PA8900
In reply to Greg Kroah-HartmanFrom: John David Anglin <[email protected]>
commit e9ed22e6e5010997a2f922eef61ca797d0a2a246 upstream.
Anonymous pages are allocated with the shared mappings colouring, SHM_COLOUR. Since the alias boundary on machines with PA8800 and PA8900 processors is unknown, flush_user_cache_page() might not flush all mappings of a shared anonymous page. Flushing the whole data cache flushes all mappings.
This won't fix all coherency issues with shared mappings but it seems to work well in practice. I haven't seen any random memory faults in almost a month on a rp3440 running as a debian buildd machine.
There is a small preformance hit.
--- arch/parisc/kernel/cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/parisc/kernel/cache.c +4 -1
@@ -722,7 +722,10 @@ void flush_anon_page(struct vm_area_strureturn ;if (parisc_requires_coherency ()) { -flush_user_cache_page (vma, vmaddr); +if (vma->vm_flags &VM_SHARED ) +flush_data_cache (); +else +flush_user_cache_page (vma, vmaddr);return ; }
Greg Kroah-Hartman
maintainerPATCH 155/181 parisc: Enable ARCH_HAS_STRICT_MODULE_RWX
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit 0a1355db36718178becd2bfe728a023933d73123 upstream.
Fix a boot crash on a c8000 machine as reported by Dave. Basically it changes patch_map() to return an alias mapping to the to-be-patched code in order to prevent writing to write-protected memory.
--- arch/parisc/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/parisc/Kconfig +1 -0
@@ -10,6 +10,7 @@ config PARISC select ARCH_WANT_FRAME_POINTERS select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_STRICT_KERNEL_RWX + select ARCH_HAS_STRICT_MODULE_RWX select ARCH_HAS_UBSAN_SANITIZE_ALL select ARCH_HAS_PTE_SPECIAL select ARCH_NO_SG_CHAIN
Greg Kroah-Hartman
maintainerPATCH 156/181 arm64: dts: ti: k3-j721s2: Fix overlapping GICD memory region
In reply to Greg Kroah-HartmanFrom: Matt Ranostay <[email protected]>
commit 856216b70a41ff3f8c866b627546afa01567b389 upstream.
GICD region was overlapping with GICR causing the latter to not map successfully, and in turn the gic-v3 driver would fail to initialize.
This issue was hidden till commit 2b2cd74a06c3 ("irqchip/gic-v3: Claim iomem resources") replaced of_iomap() calls with of_io_request_and_map() that internally called request_mem_region().
Respective console output before this patchset:
[ 0.000000] GICv3: /bus@100000/interrupt-controller@1800000: couldn't map region 0
--- arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi +1 -1
@@ -33,7 +33,7 @@ ranges; #interrupt-cells = <3>; interrupt-controller; - reg = <0x00 0x01800000 0x00 0x200000>, /* GICD */ + reg = <0x00 0x01800000 0x00 0x100000>, /* GICD */ <0x00 0x01900000 0x00 0x100000>, /* GICR */ <0x00 0x6f000000 0x00 0x2000>, /* GICC */ <0x00 0x6f010000 0x00 0x1000>, /* GICH */
Greg Kroah-Hartman
maintainerPATCH 157/181 powerpc/microwatt: wire up rng during setup_arch()
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit 20a9689b3607456d92c6fb764501f6a95950b098 upstream.
The platform's RNG must be available before random_init() in order to be useful for initial seeding, which in turn means that it needs to be called from setup_arch(), rather than from an init call. Fortunately, each platform already has a setup_arch function pointer, which means it's easy to wire this up. This commit also removes some noisy log messages that don't add much.
--- arch/powerpc/platforms/microwatt/microwatt.h | 7 +++++++ arch/powerpc/platforms/microwatt/rng.c | 10 +++------- arch/powerpc/platforms/microwatt/setup.c | 8 ++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 arch/powerpc/platforms/microwatt/microwatt.h
arch/powerpc/platforms/microwatt/microwatt.h new file +7 -0
@@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _MICROWATT_H +#define _MICROWATT_H + +void microwatt_rng_init (void ); + +#endif /* _MICROWATT_H */
arch/powerpc/platforms/microwatt/rng.c +3 -7
@@ -11,6 +11,7 @@#include <asm/archrandom.h> #include <asm/cputable.h> #include <asm/machdep.h> +#include "microwatt.h" #define DARN_ERR 0xFFFFFFFFFFFFFFFFul
@@ -29,7 +30,7 @@ static int microwatt_get_random_darn(unsreturn 1 ; } -static __init int rng_init (void ) +void __init microwatt_rng_init (void ) {unsigned long val;int i;
@@ -37,12 +38,7 @@ static __init int rng_init(void)for (i =0 ; i <10 ; i++) {if (microwatt_get_random_darn (&val)) { ppc_md.get_random_seed = microwatt_get_random_darn; -return 0 ; +return ; } } - -pr_warn ("Unable to use DARN for get_random_seed()\n" ); - -return -EIO ; } -machine_subsys_initcall(, rng_init);
arch/powerpc/platforms/microwatt/setup.c +8 -0
@@ -16,6 +16,8 @@#include <asm/xics.h> #include <asm/udbg.h> +#include "microwatt.h" +static void __init microwatt_init_IRQ (void ) {xics_init ();
@@ -32,10 +34,16 @@ static int __init microwatt_populate(voi }machine_arch_initcall (microwatt, microwatt_populate); +static void __init microwatt_setup_arch (void ) +{ +microwatt_rng_init (); +} +define_machine (microwatt) { .name = "microwatt", .probe = microwatt_probe, .init_IRQ = microwatt_init_IRQ, + .setup_arch = microwatt_setup_arch, .progress = udbg_progress, .calibrate_decr = generic_calibrate_decr, };
Greg Kroah-Hartman
maintainerPATCH 158/181 powerpc: Enable execve syscall exit tracepoint
In reply to Greg Kroah-HartmanFrom: Naveen N. Rao <[email protected]>
commit ec6d0dde71d760aa60316f8d1c9a1b0d99213529 upstream.
On execve[at], we are zero'ing out most of the thread register state including gpr[0], which contains the syscall number. Due to this, we fail to trigger the syscall exit tracepoint properly. Fix this by retaining gpr[0] in the thread register state.
Before this patch:
# tail /sys/kernel/debug/tracing/trace cat-123 [000] ..... 61.449351: sys_execve(filename: 7fffa6b23448, argv: 7fffa6b233e0, envp: 7fffa6b233f8) cat-124 [000] ..... 62.428481: sys_execve(filename: 7fffa6b23448, argv: 7fffa6b233e0, envp: 7fffa6b233f8) echo-125 [000] ..... 65.813702: sys_execve(filename: 7fffa6b23378, argv: 7fffa6b233a0, envp: 7fffa6b233b0) echo-125 [000] ..... 65.822214: sys_execveat(fd: 0, filename: 1009ac48, argv: 7ffff65d0c98, envp: 7ffff65d0ca8, flags: 0)
After this patch:
# tail /sys/kernel/debug/tracing/trace cat-127 [000] ..... 100.416262: sys_execve(filename: 7fffa41b3448, argv: 7fffa41b33e0, envp: 7fffa41b33f8) cat-127 [000] ..... 100.418203: sys_execve -> 0x0 echo-128 [000] ..... 103.873968: sys_execve(filename: 7fffa41b3378, argv: 7fffa41b33a0, envp: 7fffa41b33b0) echo-128 [000] ..... 103.875102: sys_execve -> 0x0 echo-128 [000] ..... 103.882097: sys_execveat(fd: 0, filename: 1009ac48, argv: 7fffd10d2148, envp: 7fffd10d2158, flags: 0) echo-128 [000] ..... 103.883225: sys_execveat -> 0x0
--- arch/powerpc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/process.c +1 -1
@@ -1857,7 +1857,7 @@ void start_thread(struct pt_regs *regs,tm_reclaim_current (0 );#endif -memset (regs->gpr,0 ,sizeof (regs->gpr)); +memset (®s->gpr[1 ],0 ,sizeof (regs->gpr) -sizeof (regs->gpr[0 ])); regs->ctr =0 ; regs->link =0 ; regs->xer =0 ;
Greg Kroah-Hartman
maintainerPATCH 159/181 powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address
In reply to Greg Kroah-HartmanFrom: Andrew Donnellan <[email protected]>
commit 7bc08056a6dabc3a1442216daf527edf61ac24b6 upstream.
Add a special case to block_rtas_call() to allow the ibm,platform-dump RTAS call through the RTAS filter if the buffer address is 0.
According to PAPR, ibm,platform-dump is called with a null buffer address to notify the platform firmware that processing of a particular dump is finished.
Without this, on a pseries machine with CONFIG_PPC_RTAS_FILTER enabled, an application such as rtas_errd that is attempting to retrieve a dump will encounter an error at the end of the retrieval process.
--- arch/powerpc/kernel/rtas.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
arch/powerpc/kernel/rtas.c +10 -1
@@ -1061,7 +1061,7 @@ static struct rtas_filter rtas_filters[] { "get-time-of-day", -1, -1, -1, -1, -1 }, { "ibm,get-vpd", -1, 0, -1, 1, 2 }, { "ibm,lpar-perftools", -1, 2, 3, -1, -1 }, - { "ibm,platform-dump", -1, 4, 5, -1, -1 }, + { "ibm,platform-dump", -1, 4, 5, -1, -1 }, /* Special cased */ { "ibm,read-slot-reset-state", -1, -1, -1, -1, -1 }, { "ibm,scan-log-dump", -1, 0, 1, -1, -1 }, { "ibm,set-dynamic-indicator", -1, 2, -1, -1, -1 },
@@ -1110,6 +1110,15 @@ static bool block_rtas_call(int token, i size =1 ; end = base + size -1 ; + +/* +* Special case for ibm,platform-dump - NULL buffer +* address is used to indicate end of dump processing +*/ +if (!strcmp (f->name,"ibm,platform-dump" ) && + base ==0 ) +return false; +if (!in_rmo_buf (base, end)) goto err; }
Greg Kroah-Hartman
maintainerPATCH 160/181 powerpc/powernv: wire up rng during setup_arch
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit f3eac426657d985b97c92fa5f7ae1d43f04721f3 upstream.
The platform's RNG must be available before random_init() in order to be useful for initial seeding, which in turn means that it needs to be called from setup_arch(), rather than from an init call.
Complicating things, however, is that POWER8 systems need some per-cpu state and kmalloc, which isn't available at this stage. So we split things up into an early phase and a later opportunistic phase. This commit also removes some noisy log messages that don't add much.
--- arch/powerpc/platforms/powernv/powernv.h | 2 + arch/powerpc/platforms/powernv/rng.c | 52 +++++++++++++++++++++---------- arch/powerpc/platforms/powernv/setup.c | 2 + 3 files changed, 40 insertions(+), 16 deletions(-)
arch/powerpc/platforms/powernv/powernv.h +2 -0
@@ -42,4 +42,6 @@ ssize_t memcons_copy(struct memcons *mc,u32 __init memcons_get_size (struct memcons *mc);struct memcons *__init memcons_init (struct device_node *node,const char *mc_prop_name); +void pnv_rng_init (void ); +#endif /* _POWERNV_H */
arch/powerpc/platforms/powernv/rng.c +36 -16
90 lines not on this page · raw message
arch/powerpc/platforms/powernv/setup.c +2 -0
@@ -203,6 +203,8 @@ static void __init pnv_setup_arch(void)pnv_check_guarded_cores ();/* XXX PMCS */ + +pnv_rng_init (); }static void __init pnv_init (void )
Greg Kroah-Hartman
maintainerPATCH 161/181 mm/memory-failure: disable unpoison once hw error happens
In reply to Greg Kroah-HartmanFrom: zhenwei pi <[email protected]>
commit 67f22ba7750f940bcd7e1b12720896c505c2d63f upstream.
Currently unpoison_memory(unsigned long pfn) is designed for soft poison(hwpoison-inject) only. Since 17fae1294ad9d, the KPTE gets cleared on a x86 platform once hardware memory corrupts.
Unpoisoning a hardware corrupted page puts page back buddy only, the kernel has a chance to access the page with *NOT PRESENT* KPTE. This leads BUG during accessing on the corrupted KPTE.
Suggested by David&Naoya, disable unpoison mechanism when a real HW error happens to avoid BUG like this:
Unpoison: Software-unpoisoned page 0x61234
BUG: unable to handle page fault for address: ffff888061234000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 2c01067 P4D 2c01067 PUD 107267063 PMD 10382b063 PTE 800fffff9edcb062 Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 4 PID: 26551 Comm: stress Kdump: loaded Tainted: G M OE 5.18.0.bm.1-amd64 #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ... RIP: 0010:clear_page_erms+0x7/0x10 Code: ... RSP: 0000:ffffc90001107bc8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000901 RCX: 0000000000001000 RDX: ffffea0001848d00 RSI: ffffea0001848d40 RDI: ffff888061234000 RBP: ffffea0001848d00 R08: 0000000000000901 R09: 0000000000001276 R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000140dca R15: 0000000000000001 FS: 00007fd8b2333740(0000) GS:ffff88813fd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff888061234000 CR3: 00000001023d2005 CR4: 0000000000770ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: <TASK> prep_new_page+0x151/0x170 get_page_from_freelist+0xca0/0xe20 ? sysvec_apic_timer_interrupt+0xab/0xc0 ? asm_sysvec_apic_timer_interrupt+0x1b/0x20 __alloc_pages+0x17e/0x340 __folio_alloc+0x17/0x40 vma_alloc_folio+0x84/0x280 __handle_mm_fault+0x8d4/0xeb0 handle_mm_fault+0xd5/0x2a0 do_user_addr_fault+0x1d0/0x680 ? kvm_read_and_reset_apf_flags+0x3b/0x50 exc_page_fault+0x78/0x170 asm_exc_page_fault+0x27/0x30
--- Documentation/vm/hwpoison.rst | 3 ++- drivers/base/memory.c | 2 +- include/linux/mm.h | 1 + mm/hwpoison-inject.c | 2 +- mm/madvise.c | 2 +- mm/memory-failure.c | 12 ++++++++++++ 6 files changed, 18 insertions(+), 4 deletions(-)
Documentation/vm/hwpoison.rst +2 -1
@@ -120,7 +120,8 @@ Testing unpoison-pfn Software-unpoison page at PFN echoed into this file. This way a page can be reused again. This only works for Linux - injected failures, not for real memory failures. + injected failures, not for real memory failures. Once any hardware + memory failure happens, this feature is disabled. Note these injection interfaces are not stable and might change between kernel versions
drivers/base/memory.c +1 -1
@@ -558,7 +558,7 @@ static ssize_t hard_offline_page_store(sif (kstrtoull (buf,0 , &pfn) <0 )return -EINVAL ; pfn >>=PAGE_SHIFT ; - ret =memory_failure (pfn,0 ); + ret =memory_failure (pfn,MF_SW_SIMULATED );if (ret == -EOPNOTSUPP ) ret =0 ;return ret ? ret : count;
include/linux/mm.h +1 -0
@@ -3188,6 +3188,7 @@ enum mf_flags {MF_MUST_KILL =1 <<2 ,MF_SOFT_OFFLINE =1 <<3 ,MF_UNPOISON =1 <<4 , + MF_SW_SIMULATED = 1 << 5, };extern int memory_failure (unsigned long pfn,int flags);extern void memory_failure_queue (unsigned long pfn,int flags);
mm/hwpoison-inject.c +1 -1
@@ -48,7 +48,7 @@ static int hwpoison_inject(void *data, u inject:pr_info ("Injecting memory failure at pfn %#lx\n" , pfn); - err =memory_failure (pfn,0 ); + err =memory_failure (pfn,MF_SW_SIMULATED );return (err == -EOPNOTSUPP ) ?0 : err; }
mm/madvise.c +1 -1
@@ -1101,7 +1101,7 @@ static int madvise_inject_error(int beha }else {pr_info ("Injecting memory failure for pfn %#lx at process virtual address %#lx\n" , pfn, start); - ret =memory_failure (pfn,MF_COUNT_INCREASED ); + ret =memory_failure (pfn,MF_COUNT_INCREASED |MF_SW_SIMULATED );if (ret == -EOPNOTSUPP ) ret =0 ; }
mm/memory-failure.c +12 -0
@@ -68,6 +68,8 @@ int sysctl_memory_failure_recovery __reaatomic_long_t num_poisoned_pages__read_mostly =ATOMIC_LONG_INIT (0 ); +static bool hw_memory_failure__read_mostly = false; +static bool __page_handle_poison (struct page *page) {int ret;
@@ -1780,6 +1782,9 @@ int memory_failure(unsigned long pfn, inmutex_lock (&mf_mutex); +if (!(flags &MF_SW_SIMULATED )) + hw_memory_failure = true; + p =pfn_to_online_page (pfn);if (!p) { res =arch_memory_failure (pfn, flags);
@@ -2138,6 +2143,13 @@ int unpoison_memory(unsigned long pfn)mutex_lock (&mf_mutex); +if (hw_memory_failure) { +unpoison_pr_info ("Unpoison: Disabled after HW memory failure %#lx\n" , + pfn, &unpoison_rs); + ret = -EOPNOTSUPP ; + goto unlock_mutex; + } +if (!PageHWPoison (p)) {unpoison_pr_info ("Unpoison: Page was already unpoisoned %#lx\n" , pfn, &unpoison_rs);
Greg Kroah-Hartman
maintainerPATCH 162/181 mm: lru_cache_disable: use synchronize_rcu_expedited
In reply to Greg Kroah-HartmanFrom: Marcelo Tosatti <[email protected]>
commit 31733463372e8d88ea54bfa1e35178aad9b2ffd2 upstream.
commit ff042f4a9b050 ("mm: lru_cache_disable: replace work queue synchronization with synchronize_rcu") replaced lru_cache_disable's usage of work queues with synchronize_rcu.
Some users reported large performance regressions due to this commit, for example:
https://lore.kernel.org/all/20220521234616.GO1790663@paulmck-ThinkPad-P17-Gen-1/T/
Switching to synchronize_rcu_expedited fixes the problem.
--- mm/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/swap.c +1 -1
@@ -881,7 +881,7 @@ void lru_cache_disable(void)* lru_disable_count = 0 will have exited the critical * section when synchronize_rcu() returns. */ -synchronize_rcu (); +synchronize_rcu_expedited ();#ifdef CONFIG_SMP __lru_add_drain_all (true);#else
Signature · 1 line
2.36.1
Greg Kroah-Hartman
maintainerPATCH 163/181 ARM: dts: imx7: Move hsic_phy power domain to HSIC PHY node
In reply to Greg Kroah-HartmanFrom: Alexander Stein <[email protected]>
commit 552ca27929ab28b341ae9b2629f0de3a84c98ee8 upstream.
Move the power domain to its actual user. This keeps the power domain enabled even when the USB host is runtime suspended. This is necessary to detect any downstream events, like device attach.
--- arch/arm/boot/dts/imx7s.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx7s.dtsi +1 -1
@@ -120,6 +120,7 @@ compatible = "usb-nop-xceiv"; clocks = <&clks IMX7D_USB_HSIC_ROOT_CLK>; clock-names = "main_clk"; + power-domains = <&pgc_hsic_phy>; #phy-cells = <0>; };
@@ -1153,7 +1154,6 @@ compatible = "fsl,imx7d-usb", "fsl,imx27-usb"; reg = <0x30b30000 0x200>; interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; - power-domains = <&pgc_hsic_phy>; clocks = <&clks IMX7D_USB_CTRL_CLK>; fsl,usbphy = <&usbphynop3>; fsl,usbmisc = <&usbmisc3 0>;
Greg Kroah-Hartman
maintainerPATCH 164/181 ARM: dts: imx6qdl: correct PU regulator ramp delay
In reply to Greg Kroah-HartmanFrom: Lucas Stach <[email protected]>
commit 93a8ba2a619816d631bd69e9ce2172b4d7a481b8 upstream.
Contrary to what was believed at the time, the ramp delay of 150us is not plenty for the PU LDO with the default step time of 512 pulses of the 24MHz clock. Measurements have shown that after enabling the LDO the voltage on VDDPU_CAP jumps to ~750mV in the first step and after that the regulator executes the normal ramp up as defined by the step size control.
This means it takes the regulator between 360us and 370us to ramp up to the nominal 1.15V voltage for this power domain. With the old setting of the ramp delay the power up of the PU GPC domain would happen in the middle of the regulator ramp with the voltage being at around 900mV. Apparently this was enough for most units to properly power up the peripherals in the domain and execute the reset. Some units however, fail to power up properly, especially when the chip is at a low temperature. In that case any access to the GPU registers would yield an incorrect result with no way to recover from this situation.
Change the ramp delay to 380us to cover the measured ramp up time with a bit of additional slack.
--- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl.dtsi +1 -1
@@ -762,7 +762,7 @@ regulator-name = "vddpu"; regulator-min-microvolt = <725000>; regulator-max-microvolt = <1450000>; - regulator-enable-ramp-delay = <150>; + regulator-enable-ramp-delay = <380>; anatop-reg-offset = <0x140>; anatop-vol-bit-shift = <9>; anatop-vol-bit-width = <5>;
Greg Kroah-Hartman
maintainerPATCH 165/181 arm64: dts: ti: k3-am64-main: Remove support for HS400 speed mode
In reply to Greg Kroah-HartmanFrom: Aswath Govindraju <[email protected]>
commit 0c0af88f3f318e73237f7fadd02d0bf2b6c996bb upstream.
AM64 SoC, does not support HS400 and HS200 is the maximum supported speed mode[1]. Therefore, fix the device tree node to reflect the same.
[1] - https://www.ti.com/lit/ds/symlink/am6442.pdf
(SPRSP56C – JANUARY 2021 – REVISED FEBRUARY 2022)
--- arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +0 -2
@@ -456,13 +456,11 @@ clock-names = "clk_ahb", "clk_xin"; mmc-ddr-1_8v; mmc-hs200-1_8v; - mmc-hs400-1_8v; ti,trm-icp = <0x2>; ti,otap-del-sel-legacy = <0x0>; ti,otap-del-sel-mmc-hs = <0x0>; ti,otap-del-sel-ddr52 = <0x6>; ti,otap-del-sel-hs200 = <0x7>; - ti,otap-del-sel-hs400 = <0x4>; }; sdhci1: mmc@fa00000 {
Greg Kroah-Hartman
maintainerPATCH 166/181 ARM: exynos: Fix refcount leak in exynos_map_pmu
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
commit c4c79525042a4a7df96b73477feaf232fe44ae81 upstream.
of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. of_node_put() checks null pointer.
--- arch/arm/mach-exynos/exynos.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-exynos/exynos.c +1 -0
@@ -149,6 +149,7 @@ static void exynos_map_pmu(void) np =of_find_matching_node (NULL , exynos_dt_pmu_match);if (np) pmu_base_addr =of_iomap (np,0 ); +of_node_put (np); }static void __init exynos_init_irq (void )
Greg Kroah-Hartman
maintainerPATCH 167/181 arm64: dts: exynos: Correct UART clocks on Exynos7885
In reply to Greg Kroah-HartmanFrom: David Virag <[email protected]>
commit f84d83d8165570380f55f4ce578bfb131a9266c5 upstream.
The clocks in the serial UART nodes were swapped by mistake on Exynos7885. This only worked correctly because of a mistake in the clock driver which has been fixed. With the fixed clock driver in place, the baudrate of the UARTs get miscalculated. Fix this by correcting the clocks in the dtsi.
--- arch/arm64/boot/dts/exynos/exynos7885.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/exynos/exynos7885.dtsi +6 -6
@@ -280,8 +280,8 @@ serial_0: serial@13800000 { interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&uart0_bus>; - clocks = <&cmu_peri CLK_GOUT_UART0_EXT_UCLK>, - <&cmu_peri CLK_GOUT_UART0_PCLK>; + clocks = <&cmu_peri CLK_GOUT_UART0_PCLK>, + <&cmu_peri CLK_GOUT_UART0_EXT_UCLK>; clock-names = "uart", "clk_uart_baud0"; samsung,uart-fifosize = <64>; status = "disabled";
@@ -293,8 +293,8 @@ serial_1: serial@13810000 { interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&uart1_bus>; - clocks = <&cmu_peri CLK_GOUT_UART1_EXT_UCLK>, - <&cmu_peri CLK_GOUT_UART1_PCLK>; + clocks = <&cmu_peri CLK_GOUT_UART1_PCLK>, + <&cmu_peri CLK_GOUT_UART1_EXT_UCLK>; clock-names = "uart", "clk_uart_baud0"; samsung,uart-fifosize = <256>; status = "disabled";
@@ -306,8 +306,8 @@ serial_2: serial@13820000 { interrupts = <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&uart2_bus>; - clocks = <&cmu_peri CLK_GOUT_UART2_EXT_UCLK>, - <&cmu_peri CLK_GOUT_UART2_PCLK>; + clocks = <&cmu_peri CLK_GOUT_UART2_PCLK>, + <&cmu_peri CLK_GOUT_UART2_EXT_UCLK>; clock-names = "uart", "clk_uart_baud0"; samsung,uart-fifosize = <256>; status = "disabled";
Signature · 1 line
2.36.1
Greg Kroah-Hartman
maintainerPATCH 168/181 soc: bcm: brcmstb: pm: pm-arm: Fix refcount leak in brcmstb_pm_probe
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
commit 37d838de369b07b596c19ff3662bf0293fdb09ee upstream.
of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.
In brcmstb_init_sram, it pass dn to of_address_to_resource(), of_address_to_resource() will call of_find_device_by_node() to take reference, so we should release the reference returned by of_find_matching_node().
--- drivers/soc/bcm/brcmstb/pm/pm-arm.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/bcm/brcmstb/pm/pm-arm.c +1 -0
@@ -783,6 +783,7 @@ static int brcmstb_pm_probe(struct platf } ret =brcmstb_init_sram (dn); +of_node_put (dn);if (ret) {pr_err ("error setting up SRAM for PM\n" );return ret;
Greg Kroah-Hartman
maintainerPATCH 169/181 ARM: Fix refcount leak in axxia_boot_secondary
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
commit 7c7ff68daa93d8c4cdea482da4f2429c0398fcde upstream.
of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak.
--- arch/arm/mach-axxia/platsmp.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-axxia/platsmp.c +1 -0
@@ -39,6 +39,7 @@ static int axxia_boot_secondary(unsignedreturn -ENOENT ; syscon =of_iomap (syscon_np,0 ); +of_node_put (syscon_np);if (!syscon)return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 170/181 memory: mtk-smi: add missing put_device() call in mtk_smi_device_link_common
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
commit 038ae37c510fd57cbc543ac82db1e7b23b28557a upstream.
The reference taken by 'of_find_device_by_node()' must be released when not needed anymore.
Add the corresponding 'put_device()' in the error handling paths.
--- drivers/memory/mtk-smi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/memory/mtk-smi.c +4 -1
@@ -404,13 +404,16 @@ static int mtk_smi_device_link_common(struct device *dev, struct device **com_deof_node_put (smi_com_node);if (smi_com_pdev) {/* smi common is the supplier, Make sure it is ready before */ -if (!platform_get_drvdata (smi_com_pdev)) +if (!platform_get_drvdata (smi_com_pdev)) { +put_device (&smi_com_pdev->dev);return -EPROBE_DEFER ; + } smi_com_dev = &smi_com_pdev->dev; link =device_link_add (dev, smi_com_dev,DL_FLAG_PM_RUNTIME |DL_FLAG_STATELESS );if (!link) {dev_err (dev,"Unable to link smi-common dev\n" ); +put_device (&smi_com_pdev->dev);return -ENODEV ; } *com_dev = smi_com_dev;
Signature · 1 line
2.36.1
Greg Kroah-Hartman
maintainerPATCH 171/181 memory: samsung: exynos5422-dmc: Fix refcount leak in of_get_dram_timings
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
commit 1332661e09304b7b8e84e5edc11811ba08d12abe upstream.
of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. This function doesn't call of_node_put() in some error paths. To unify the structure, Add put_node label and goto it on errors.
--- drivers/memory/samsung/exynos5422-dmc.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-)
drivers/memory/samsung/exynos5422-dmc.c +18 -11
@@ -1187,33 +1187,39 @@ static int of_get_dram_timings(struct ex dmc->timing_row =devm_kmalloc_array (dmc->dev,TIMING_COUNT ,sizeof (u32),GFP_KERNEL ); -if (!dmc->timing_row) -return -ENOMEM ; +if (!dmc->timing_row) { + ret = -ENOMEM ; + goto put_node; + } dmc->timing_data =devm_kmalloc_array (dmc->dev,TIMING_COUNT ,sizeof (u32),GFP_KERNEL ); -if (!dmc->timing_data) -return -ENOMEM ; +if (!dmc->timing_data) { + ret = -ENOMEM ; + goto put_node; + } dmc->timing_power =devm_kmalloc_array (dmc->dev,TIMING_COUNT ,sizeof (u32),GFP_KERNEL ); -if (!dmc->timing_power) -return -ENOMEM ; +if (!dmc->timing_power) { + ret = -ENOMEM ; + goto put_node; + } dmc->timings =of_lpddr3_get_ddr_timings (np_ddr, dmc->dev,DDR_TYPE_LPDDR3 , &dmc->timings_arr_size);if (!dmc->timings) { -of_node_put (np_ddr);dev_warn (dmc->dev,"could not get timings from DT\n" ); -return -EINVAL ; + ret = -EINVAL ; + goto put_node; } dmc->min_tck =of_lpddr3_get_min_tck (np_ddr, dmc->dev);if (!dmc->min_tck) { -of_node_put (np_ddr);dev_warn (dmc->dev,"could not get tck from DT\n" ); -return -EINVAL ; + ret = -EINVAL ; + goto put_node; }/* Sorted array of OPPs with frequency ascending */
@@ -1227,13 +1233,14 @@ static int of_get_dram_timings(struct ex clk_period_ps); } -of_node_put (np_ddr);/* Take the highest frequency's timings as 'bypass' */ dmc->bypass_timing_row = dmc->timing_row[idx -1 ]; dmc->bypass_timing_data = dmc->timing_data[idx -1 ]; dmc->bypass_timing_power = dmc->timing_power[idx -1 ]; +put_node: +of_node_put (np_ddr);return ret; }
Greg Kroah-Hartman
maintainerPATCH 172/181 ARM: cns3xxx: Fix refcount leak in cns3xxx_init
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
commit 1ba904b6b16e08de5aed7c1349838d9cd0d178c5 upstream.
of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak.
--- arch/arm/mach-cns3xxx/core.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-cns3xxx/core.c +2 -0
@@ -372,6 +372,7 @@ static void __init cns3xxx_init(void)/* De-Asscer SATA Reset */ cns3xxx_pwr_soft_rst (CNS3XXX_PWR_SOFTWARE_RST (SATA )); } +of_node_put (dn); dn =of_find_compatible_node (NULL ,NULL ,"cavium,cns3420-sdhci" );if (of_device_is_available (dn)) {
@@ -385,6 +386,7 @@ static void __init cns3xxx_init(void)cns3xxx_pwr_clk_en (CNS3XXX_PWR_CLK_EN (SDIO ));cns3xxx_pwr_soft_rst (CNS3XXX_PWR_SOFTWARE_RST (SDIO )); } +of_node_put (dn); pm_power_off = cns3xxx_power_off;
Greg Kroah-Hartman
maintainerPATCH 173/181 modpost: fix section mismatch check for exported init/exit sections
In reply to Greg Kroah-HartmanFrom: Masahiro Yamada <[email protected]>
commit 28438794aba47a27e922857d27b31b74e8559143 upstream.
Since commit f02e8a6596b7 ("module: Sort exported symbols"), EXPORT_SYMBOL* is placed in the individual section ___ksymtab(_gpl)+<sym> (3 leading underscores instead of 2).
Since then, modpost cannot detect the bad combination of EXPORT_SYMBOL and __init/__exit.
Fix the .fromsec field.
--- scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/mod/modpost.c +1 -1
@@ -1115,7 +1115,7 @@ static const struct sectioncheck section },/* Do not export init/exit functions or data */ { - .fromsec = { "__ksymtab*", NULL }, + .fromsec = { "___ksymtab*", NULL }, .bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL }, .mismatch = EXPORT_TO_INIT_EXIT, .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
Greg Kroah-Hartman
maintainerPATCH 174/181 ARM: dts: bcm2711-rpi-400: Fix GPIO line names
In reply to Greg Kroah-HartmanFrom: Stefan Wahren <[email protected]>
commit b9b6d4c925604b70d007feb4c77b8cc4c038d2da upstream.
The GPIO expander line names has been fixed in the vendor tree last year, so upstream these changes.
--- arch/arm/boot/dts/bcm2711-rpi-400.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/bcm2711-rpi-400.dts +3 -3
@@ -28,12 +28,12 @@ &expgpio { gpio-line-names = "BT_ON", "WL_ON", - "", + "PWR_LED_OFF", "GLOBAL_RESET", "VDD_SD_IO_SEL", - "CAM_GPIO", + "GLOBAL_SHUTDOWN", "SD_PWR_ON", - "SD_OC_N"; + "SHUTDOWN_REQUEST"; }; &genet_mdio {
Greg Kroah-Hartman
maintainerPATCH 175/181 smb3: fix empty netname context on secondary channels
In reply to Greg Kroah-HartmanFrom: Steve French <[email protected]>
commit 73130a7b1ac92c9f30e0a255951129f4851c5794 upstream.
Some servers do not allow null netname contexts, which would cause multichannel to revert to single channel when mounting to some servers (e.g. Azure xSMB).
--- fs/cifs/smb2pdu.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
fs/cifs/smb2pdu.c +8 -6
@@ -570,16 +570,18 @@ assemble_neg_contexts(struct smb2_negoti *total_len += ctxt_len; pneg_ctxt += ctxt_len; - ctxt_len =build_netname_ctxt ((struct smb2_netname_neg_context *)pneg_ctxt, - server->hostname); - *total_len += ctxt_len; - pneg_ctxt += ctxt_len; -build_posix_ctxt ((struct smb2_posix_neg_context *)pneg_ctxt); *total_len +=sizeof (struct smb2_posix_neg_context ); pneg_ctxt +=sizeof (struct smb2_posix_neg_context ); - neg_context_count =4 ; +if (server->hostname && (server->hostname[0 ] !=0 )) { + ctxt_len =build_netname_ctxt ((struct smb2_netname_neg_context *)pneg_ctxt, + server->hostname); + *total_len += ctxt_len; + pneg_ctxt += ctxt_len; + neg_context_count =4 ; + }else /* second channels do not have a hostname */ + neg_context_count =3 ;if (server->compress_algorithm) { build_compression_ctxt((struct smb2_compression_capabilities_context *)
Greg Kroah-Hartman
maintainerPATCH 176/181 random: update comment from copy_to_user() -> copy_to_iter()
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit 63b8ea5e4f1a87dea4d3114293fc8e96a8f193d7 upstream.
This comment wasn't updated when we moved from read() to read_iter(), so this patch makes the trivial fix.
--- drivers/char/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/random.c +1 -1
@@ -451,7 +451,7 @@ static ssize_t get_random_bytes_user(str/* * Immediately overwrite the ChaCha key at index 4 with random -* bytes, in case userspace causes copy_to_user() below to sleep +* bytes, in case userspace causes copy_to_iter() below to sleep * forever, so that we still retain forward secrecy in that case. */ crng_make_state (chacha_state, (u8 *)&chacha_state[4 ],CHACHA_KEY_SIZE );
Greg Kroah-Hartman
maintainerPATCH 177/181 perf build-id: Fix caching files with a wrong build ID
In reply to Greg Kroah-HartmanFrom: Adrian Hunter <[email protected]>
commit ab66fdace8581ef3b4e7cf5381a168ed4058d779 upstream.
Build ID events associate a file name with a build ID. However, when using perf inject, there is no guarantee that the file on the current machine at the current time has that build ID. Fix by comparing the build IDs and skip adding to the cache if they are different.
Example:
$ echo "int main() {return 0;}" > prog.c
$ gcc -o prog prog.c
$ perf record --buildid-all ./prog
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.019 MB perf.data ]
$ file-buildid() { file $1 | awk -F= '{print $2}' | awk -F, '{print $1}' ; }
$ file-buildid prog
444ad9be165d8058a48ce2ffb4e9f55854a3293e
$ file-buildid ~/.debug/$(pwd)/prog/444ad9be165d8058a48ce2ffb4e9f55854a3293e/elf
444ad9be165d8058a48ce2ffb4e9f55854a3293e
$ echo "int main() {return 1;}" > prog.c
$ gcc -o prog prog.c
$ file-buildid prog
885524d5aaa24008a3e2b06caa3ea95d013c0fc5Before:
$ perf buildid-cache --purge $(pwd)/prog $ perf inject -i perf.data -o junk $ file-buildid ~/.debug/$(pwd)/prog/444ad9be165d8058a48ce2ffb4e9f55854a3293e/elf 885524d5aaa24008a3e2b06caa3ea95d013c0fc5 $
After:
$ perf buildid-cache --purge $(pwd)/prog $ perf inject -i perf.data -o junk $ file-buildid ~/.debug/$(pwd)/prog/444ad9be165d8058a48ce2ffb4e9f55854a3293e/elf
$
--- tools/perf/util/build-id.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
tools/perf/util/build-id.c +28 -0
@@ -872,6 +872,30 @@ out_free:return err; } +static int filename__read_build_id_ns (const char *filename, +struct build_id *bid, +struct nsinfo *nsi) +{ +struct nscookie nsc; +int ret; + +nsinfo__mountns_enter (nsi, &nsc); + ret =filename__read_build_id (filename, bid); +nsinfo__mountns_exit (&nsc); + +return ret; +} + +static bool dso__build_id_mismatch (struct dso *dso,const char *name) +{ +struct build_id bid; + +if (filename__read_build_id_ns (name, &bid, dso->nsinfo) <0 ) +return false; + +return !dso__build_id_equal (dso, &bid); +} +static int dso__cache_build_id (struct dso *dso,struct machine *machine,void *priv__maybe_unused ) {
@@ -886,6 +910,10 @@ static int dso__cache_build_id(struct ds is_kallsyms = true; name = machine->mmap_name; } + +if (!is_kallsyms &&dso__build_id_mismatch (dso, name)) +return 0 ; +return build_id_cache__add_b (&dso->bid, name, dso->nsinfo, is_kallsyms, is_vdso); }
Greg Kroah-Hartman
maintainerPATCH 178/181 smb3: use netname when available on secondary channels
In reply to Greg Kroah-HartmanFrom: Shyam Prasad N <[email protected]>
commit 9de74996a739bf0b7b5d8c260bd207ad6007442b upstream.
Some servers do not allow null netname contexts, which would cause multichannel to revert to single channel when mounting to some servers (e.g. Azure xSMB). The previous patch fixed that by avoiding incorrectly sending the netname context when there would be a null hostname sent in the netname context, while this patch fixes the null hostname for the secondary channel by using the hostname of the primary channel for the secondary channel.
--- fs/cifs/smb2pdu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
fs/cifs/smb2pdu.c +9 -2
@@ -543,6 +543,7 @@ assemble_neg_contexts(struct smb2_negotiate_req *req, struct TCP_Server_Info *server, unsigned int *total_len) { char *pneg_ctxt; +char *hostname =NULL ;unsigned int ctxt_len, neg_context_count;if (*total_len >200 ) {
@@ -574,9 +575,15 @@ assemble_neg_contexts(struct smb2_negotiate_req *req, *total_len +=sizeof (struct smb2_posix_neg_context ); pneg_ctxt +=sizeof (struct smb2_posix_neg_context ); -if (server->hostname && (server->hostname[0 ] !=0 )) { +/* +* secondary channels don't have the hostname field populated +* use the hostname field in the primary channel instead +*/ + hostname =CIFS_SERVER_IS_CHAN (server) ? + server->primary_server->hostname : server->hostname; +if (hostname && (hostname[0 ] !=0 )) { ctxt_len =build_netname_ctxt ((struct smb2_netname_neg_context *)pneg_ctxt, - server->hostname); + hostname); *total_len += ctxt_len; pneg_ctxt += ctxt_len; neg_context_count =4 ;
Signature · 1 line
2.36.1
Greg Kroah-Hartman
maintainerPATCH 179/181 dma-direct: use the correct size for dma_set_encrypted()
In reply to Greg Kroah-HartmanFrom: Dexuan Cui <[email protected]>
commit 3be4562584bba603f33863a00c1c32eecf772ee6 upstream.
The third parameter of dma_set_encrypted() is a size in bytes rather than the number of pages.
--- kernel/dma/direct.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
kernel/dma/direct.c +2 -3
@@ -357,7 +357,7 @@ void dma_direct_free(struct device *dev, }else {if (IS_ENABLED (CONFIG_ARCH_HAS_DMA_CLEAR_UNCACHED ))arch_dma_clear_uncached (cpu_addr, size); -if (dma_set_encrypted (dev, cpu_addr,1 << page_order)) +if (dma_set_encrypted (dev, cpu_addr, size))return ; }
@@ -392,7 +392,6 @@ void dma_direct_free_pages(struct device struct page *page, dma_addr_t dma_addr, enum dma_data_direction dir) { - unsigned int page_order = get_order(size); void *vaddr = page_address(page);/* If cpu_addr is not from an atomic pool, dma_free_from_pool() fails */
@@ -400,7 +399,7 @@ void dma_direct_free_pages(struct device dma_free_from_pool(dev, vaddr, size))return ; -if (dma_set_encrypted (dev, vaddr,1 << page_order)) +if (dma_set_encrypted (dev, vaddr, size))return ;__dma_direct_free_pages (dev, page, size); }
Greg Kroah-Hartman
maintainerPATCH 180/181 kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS (2nd attempt)
In reply to Greg Kroah-HartmanFrom: Masahiro Yamada <[email protected]>
commit 53632ba87d9f302a8d97a11ec2f4f4eec7bb75ea upstream.
If CONFIG_TRIM_UNUSED_KSYMS is enabled and the kernel is built from a pristine state, the vmlinux is linked twice.
Commit 3fdc7d3fe4c0 ("kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS") explains why this happens, but it did not fix the issue at all.
Now I realized I had applied a wrong patch.
In v1 patch [1], the autoksyms_recursive target correctly recurses to "$(MAKE) -f $(srctree)/Makefile autoksyms_recursive".
In v2 patch [2], I accidentally dropped the diff line, and it recurses to "$(MAKE) -f $(srctree)/Makefile vmlinux".
Restore the code I intended in v1.
[1]: https://lore.kernel.org/linux-kbuild/[email protected]/
[2]: https://lore.kernel.org/linux-kbuild/[email protected]/
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -1139,7 +1139,7 @@ KBUILD_MODULES := 1 autoksyms_recursive: descend modules.order $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \ - "$(MAKE) -f $(srctree)/Makefile vmlinux" + "$(MAKE) -f $(srctree)/Makefile autoksyms_recursive" endif autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h)
Greg Kroah-Hartman
maintainerPATCH 181/181 powerpc/pseries: wire up rng during setup_arch()
In reply to Greg Kroah-HartmanFrom: Jason A. Donenfeld <[email protected]>
commit e561e472a3d441753bd012333b057f48fef1045b upstream.
The platform's RNG must be available before random_init() in order to be useful for initial seeding, which in turn means that it needs to be called from setup_arch(), rather than from an init call. Fortunately, each platform already has a setup_arch function pointer, which means it's easy to wire this up. This commit also removes some noisy log messages that don't add much.
--- arch/powerpc/platforms/pseries/pseries.h | 2 ++ arch/powerpc/platforms/pseries/rng.c | 11 +++-------- arch/powerpc/platforms/pseries/setup.c | 2 ++ 3 files changed, 7 insertions(+), 8 deletions(-)
arch/powerpc/platforms/pseries/pseries.h +2 -0
@@ -121,4 +121,6 @@ void pseries_lpar_read_hblkrm_characteristatic inline void pseries_lpar_read_hblkrm_characteristics (void ) { }#endif +void pseries_rng_init (void ); +#endif /* _PSERIES_PSERIES_H */
arch/powerpc/platforms/pseries/rng.c +3 -8
@@ -10,6 +10,7 @@#include <asm/archrandom.h> #include <asm/machdep.h> #include <asm/plpar_wrappers.h> +#include "pseries.h" static int pseries_get_random_long (unsigned long *v)
@@ -24,19 +25,13 @@ static int pseries_get_random_long(unsigreturn 0 ; } -static __init int rng_init (void ) +void __init pseries_rng_init (void ) {struct device_node *dn; dn =of_find_compatible_node (NULL ,NULL ,"ibm,random" );if (!dn) -return -ENODEV ; - -pr_info ("Registering arch random hook.\n" ); - +return ; ppc_md.get_random_seed = pseries_get_random_long; -of_node_put (dn); -return 0 ; } -machine_subsys_initcall (pseries, rng_init);
arch/powerpc/platforms/pseries/setup.c +2 -0
@@ -852,6 +852,8 @@ static void __init pSeries_setup_arch(voif (swiotlb_force ==SWIOTLB_FORCE ) ppc_swiotlb_enable =1 ; + +pseries_rng_init (); }static void pseries_panic (char *str)
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.18.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.18:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
130 tests: 130 pass, 0 failLinux version: 5.18.8-rc1-g188f58194f3c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Hey Greg,
Ran tests and boot tested on my system, no regression found
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.18.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels:
Signature · 1 line
Florian
Hello!
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.18.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro's test farm.
The following new warnings have been found while building ixp4xx_defconfig for Arm combinations with GCC:
WARNING: modpost: vmlinux.o(___ksymtab_gpl+ixp4xx_irq_init+0x0): Section mismatch in reference from the variable __ksymtab_ixp4xx_irq_init to the function .init.text:ixp4xx_irq_init() The symbol ixp4xx_irq_init is exported and annotated __init
Fix this by removing the __init annotation of ixp4xx_irq_init or drop the export.
WARNING: modpost: vmlinux.o(___ksymtab_gpl+ixp4xx_timer_setup+0x0): Section mismatch in reference from the variable __ksymtab_ixp4xx_timer_setup to the function .init.text:ixp4xx_timer_setup() The symbol ixp4xx_timer_setup is exported and annotated __init
Fix this by removing the __init annotation of ixp4xx_timer_setup or drop the export.
## Build
* kernel: 5.18.8-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-5.18.y
* git commit: 188f58194f3c72f6d47077c7dfe205b4f62d01ba
* git describe: v5.18.7-182-g188f58194f3c
* test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.18.y/build/v5.18.7-182-g188f58194f3c
## No test regressions (compared to v5.18.7)
## Metric regressions (compared to v5.18.7)
* arm, build
- gcc-8-ixp4xx_defconfig-warnings
- gcc-9-ixp4xx_defconfig-warnings
- gcc-10-ixp4xx_defconfig-warnings
- gcc-11-ixp4xx_defconfig-warnings
## No test fixes (compared to v5.18.7)
## No metric fixes (compared to v5.18.7)
## Test result summary
total: 122034, pass: 110497, fail: 531, skip: 10313, xfail: 693
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 319 total, 316 passed, 3 failed
* arm64: 64 total, 62 passed, 2 failed
* i386: 57 total, 50 passed, 7 failed
* mips: 41 total, 38 passed, 3 failed
* parisc: 14 total, 14 passed, 0 failed
* powerpc: 65 total, 56 passed, 9 failed
* riscv: 32 total, 27 passed, 5 failed
* s390: 23 total, 20 passed, 3 failed
* sh: 26 total, 24 passed, 2 failed
* sparc: 14 total, 14 passed, 0 failed
* x86_64: 62 total, 58 passed, 4 failed
## Test suites summary
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-firmware
* kselftest-fpu
* kselftest-gpio
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-lib
* kselftest-membarrier
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-open-posix-tests
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* packetdrill
* perf
* rcutorture
* ssuite
* v4l2-compliance
* vdso
Greetings!
Daniel Díaz
[email protected]
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
Hi Greg,
5.18.8-rc1 tested.
Run tested on:
- Allwinner H6 (Tanix TX6)
- Intel Tiger Lake x86_64 (nuc11 i7-1165G7)
In addition - build tested for:
- Allwinner A64
- Allwinner H3
- Allwinner H5
- NXP iMX6
- NXP iMX8
- Qualcomm Dragonboard
- Rockchip RK3288
- Rockchip RK3328
- Rockchip RK3399pro
- Samsung Exynos
--
Rudi
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.18.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.18.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
Build results:
total: 154 pass: 154 fail: 0 Qemu test results: total: 489 pass: 489 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.18.y
and the diffstat can be found below.thanks,
greg k-h
Tested rc1 against the Fedora build system (aarch64, armv7, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Successfully cross-compiled for arm (multi_v7_defconfig, GCC 12.1.0, armv7 with neon FPU) and arm64 (bcm2711_defconfig, GCC 12.1.0).
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
Build test (gcc version 12.1.1 20220627):
mips: 59 configs -> no failure
arm: 99 configs -> no failure
arm64: 3 configs -> no failurex86_64: 4 configs -> no failure
alpha allmodconfig -> no failure
csky allmodconfig -> no failure
powerpc allmodconfig -> no failure
riscv allmodconfig -> no failure
s390 allmodconfig -> no failure
xtensa allmodconfig -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
mips: Booted on ci20 board. No regression. [3]
[1]. https://openqa.qa.codethink.co.uk/tests/1405
[2]. https://openqa.qa.codethink.co.uk/tests/1409
[3]. https://openqa.qa.codethink.co.uk/tests/1411
--
Regards
Sudip
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Successfully cross-compiled for arm64 (bcm2711_defconfig, GCC 10.2.0) and powerpc (ps3_defconfig, GCC 12.1.0).
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.18.8 release. There are 181 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 29 Jun 2022 11:19:09 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.18.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah