irq/urgent for v5.13-rc3
Subsystems (9)
Linus,
please pull the latest irq/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2021-05-23
up to: b4764905ea5b: Merge tag 'irqchip-fixes-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
A few fixes for irqchip drivers:
- Allocate interrupt descriptors correctly on Mainstone PXA when SPARSE_IRQ is enabled; otherwise the interrupt association fails.
- Make the APPLE AIC chip driver depend on APPLE.
- Remove redundant error output on devm_ioremap_resource() failure.
Thanks,
tglx
------------------>
Geert Uytterhoeven (1):
irqchip/apple-aic: APPLE_AIC should depend on ARCH_APPLE
Marc Zyngier (1):
ARM: PXA: Fix cplds irqdesc allocation when using legacy mode
Zhen Lei (1):
irqchip: Remove redundant error printing
arch/arm/mach-pxa/pxa_cplds_irqs.c | 7 ++++++- drivers/irqchip/Kconfig | 2 +- drivers/irqchip/irq-mvebu-icu.c | 4 +--- drivers/irqchip/irq-mvebu-sei.c | 4 +--- drivers/irqchip/irq-stm32-exti.c | 4 +--- 5 files changed, 10 insertions(+), 11 deletions(-)
arch/arm/mach-pxa/pxa_cplds_irqs.c +6 -1
@@ -121,8 +121,13 @@ static int cplds_probe(struct platform_device *pdev)return fpga->irq; base_irq =platform_get_irq (pdev,1 ); -if (base_irq <0 ) +if (base_irq <0 ) { base_irq =0 ; + }else { + ret =devm_irq_alloc_descs (&pdev->dev, base_irq, base_irq,CPLDS_NB_IRQ ,0 ); +if (ret <0 ) +return ret; + } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); fpga->base =devm_ioremap_resource (&pdev->dev, res);
drivers/irqchip/Kconfig +1 -1
@@ -596,7 +596,7 @@ config IRQ_IDT3243X config APPLE_AIC bool "Apple Interrupt Controller (AIC)" depends on ARM64 - default ARCH_APPLE + depends on ARCH_APPLE || COMPILE_TEST help Support for the Apple Interrupt Controller found on Apple Silicon SoCs, such as the M1.
drivers/irqchip/irq-mvebu-icu.c +1 -3
@@ -359,10 +359,8 @@ static int mvebu_icu_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); icu->base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (icu->base)) { -dev_err (&pdev->dev,"Failed to map icu base address.\n" ); +if (IS_ERR (icu->base))return PTR_ERR (icu->base); - }/* * Legacy bindings: ICU is one node with one MSI parent: force manually
drivers/irqchip/irq-mvebu-sei.c +1 -3
@@ -384,10 +384,8 @@ static int mvebu_sei_probe(struct platform_device *pdev) sei->res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); sei->base =devm_ioremap_resource (sei->dev, sei->res); -if (IS_ERR (sei->base)) { -dev_err (sei->dev,"Failed to remap SEI resource\n" ); +if (IS_ERR (sei->base))return PTR_ERR (sei->base); - }/* Retrieve the SEI capabilities with the interrupt ranges */ sei->caps =of_device_get_match_data (&pdev->dev);
drivers/irqchip/irq-stm32-exti.c +1 -3
@@ -892,10 +892,8 @@ static int stm32_exti_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); host_data->base =devm_ioremap_resource (dev, res); -if (IS_ERR (host_data->base)) { -dev_err (dev,"Unable to map registers\n" ); +if (IS_ERR (host_data->base))return PTR_ERR (host_data->base); - }for (i =0 ; i < drv_data->bank_nr; i++)stm32_exti_chip_init (host_data, i, np);
[GIT pull] locking/urgent for v5.13-rc3
Linus,
please pull the latest locking/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-2021-05-23
up to: 3a010c493271: locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal
Two locking fixes:
- Invoke the lockdep tracepoints in the correct place so the ordering is correct again.
- Don't leave the mutex WAITER bit stale when the last waiter is dropping out early due to a signal as that forces all subsequent lock operations needlessly into the slowpath until it's cleaned up again.
Thanks,
tglx
------------------>
Leo Yan (1):
locking/lockdep: Correct calling tracepoints
Zqiang (1):
locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal
kernel/locking/lockdep.c | 4 ++-- kernel/locking/mutex-debug.c | 4 ++-- kernel/locking/mutex-debug.h | 2 +- kernel/locking/mutex.c | 18 +++++++++++++----- kernel/locking/mutex.h | 4 +--- 5 files changed, 19 insertions(+), 13 deletions(-)
kernel/locking/lockdep.c +2 -2
@@ -5736,7 +5736,7 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip) {unsigned long flags; -trace_lock_acquired (lock, ip); +trace_lock_contended (lock, ip);if (unlikely (!lock_stat || !lockdep_enabled ()))return ;
@@ -5754,7 +5754,7 @@ void lock_acquired(struct lockdep_map *lock, unsigned long ip) {unsigned long flags; -trace_lock_contended (lock, ip); +trace_lock_acquired (lock, ip);if (unlikely (!lock_stat || !lockdep_enabled ()))return ;
kernel/locking/mutex-debug.c +2 -2
@@ -57,7 +57,7 @@ void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, task->blocked_on = waiter; } -void mutex_remove_waiter (struct mutex *lock,struct mutex_waiter *waiter, +void debug_mutex_remove_waiter (struct mutex *lock,struct mutex_waiter *waiter,struct task_struct *task) {DEBUG_LOCKS_WARN_ON (list_empty (&waiter->list));
@@ -65,7 +65,7 @@ void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,DEBUG_LOCKS_WARN_ON (task->blocked_on != waiter); task->blocked_on =NULL ; -list_del_init (&waiter->list); +INIT_LIST_HEAD (&waiter->list); waiter->task =NULL ; }
kernel/locking/mutex-debug.h +1 -1
@@ -22,7 +22,7 @@ extern void debug_mutex_free_waiter(struct mutex_waiter *waiter);extern void debug_mutex_add_waiter (struct mutex *lock,struct mutex_waiter *waiter,struct task_struct *task); -extern void mutex_remove_waiter (struct mutex *lock,struct mutex_waiter *waiter, +extern void debug_mutex_remove_waiter (struct mutex *lock,struct mutex_waiter *waiter,struct task_struct *task);extern void debug_mutex_unlock (struct mutex *lock); extern void debug_mutex_init(struct mutex *lock, const char *name,
kernel/locking/mutex.c +13 -5
@@ -194,7 +194,7 @@ static inline bool __mutex_waiter_is_first(struct mutex *lock, struct mutex_wait* Add @waiter to a given location in the lock wait_list and set the * FLAG_WAITERS flag if it's the first waiter. */ -static void __sched +static void __mutex_add_waiter (struct mutex *lock,struct mutex_waiter *waiter,struct list_head *list) {
@@ -205,6 +205,16 @@ __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,__mutex_set_flag (lock,MUTEX_FLAG_WAITERS ); } +static void +__mutex_remove_waiter (struct mutex *lock,struct mutex_waiter *waiter) +{ +list_del (&waiter->list); +if (likely (list_empty (&lock->wait_list))) +__mutex_clear_flag (lock,MUTEX_FLAGS ); + +debug_mutex_remove_waiter (lock, waiter, current); +} +/* * Give up ownership to a specific task, when @task = NULL, this is equivalent * to a regular unlock. Sets PICKUP on a handoff, clears HANDOFF, preserves
@@ -1061,9 +1071,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,__ww_mutex_check_waiters (lock, ww_ctx); } -mutex_remove_waiter (lock, &waiter, current); -if (likely (list_empty (&lock->wait_list))) -__mutex_clear_flag (lock,MUTEX_FLAGS ); +__mutex_remove_waiter (lock, &waiter);debug_mutex_free_waiter (&waiter);
@@ -1080,7 +1088,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, err:__set_current_state (TASK_RUNNING ); -mutex_remove_waiter (lock, &waiter, current); +__mutex_remove_waiter (lock, &waiter); err_early_kill:spin_unlock (&lock->wait_lock);debug_mutex_free_waiter (&waiter);
kernel/locking/mutex.h +1 -3
@@ -10,12 +10,10 @@* !CONFIG_DEBUG_MUTEXES case. Most of them are NOPs: */ -#define mutex_remove_waiter (lock, waiter, task) \ - __list_del((waiter)->list.prev, (waiter)->list.next) -#define debug_mutex_wake_waiter (lock, waiter) do { } while (0)#define debug_mutex_free_waiter (waiter) do { } while (0)#define debug_mutex_add_waiter (lock, waiter, ti) do { } while (0) +#define debug_mutex_remove_waiter (lock, waiter, ti) do { } while (0)#define debug_mutex_unlock (lock) do { } while (0)#define debug_mutex_init (lock, name, key) do { } while (0)
Re: [GIT pull] locking/urgent for v5.13-rc3
The pull request you sent on Sun, 23 May 2021 13:33:44 -0000:
The pull request you sent on Sun, 23 May 2021 13:33:44 -0000:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitlocking-urgent-2021-05-23
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0898678c742ee913691d7f4a1606309825eee33b
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
[GIT pull] perf/urgent for v5.13-rc3
In reply to Thomas GleixnerLinus,
please pull the latest perf/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-2021-05-23
up to: 488e13a489e9: perf/x86/lbr: Remove cpuc->lbr_xsave allocation from atomic context
Two perf fixes:
- Do not check the LBR_TOS MSR when setting up unrelated LBR MSRs as this can cause malfunction when TOS is not supported.
- Allocate the LBR XSAVE buffers along with the DS buffers upfront because allocating them when adding an event can deadlock.
Thanks,
tglx
------------------>
Like Xu (2):
perf/x86: Avoid touching LBR_TOS MSR for Arch LBR perf/x86/lbr: Remove cpuc->lbr_xsave allocation from atomic context
arch/x86/events/core.c | 6 ++++-- arch/x86/events/intel/core.c | 2 +- arch/x86/events/intel/lbr.c | 26 ++++++++++++++++++++------ arch/x86/events/perf_event.h | 6 ++++++ 4 files changed, 31 insertions(+), 9 deletions(-)
arch/x86/events/core.c +4 -2
@@ -396,10 +396,12 @@ int x86_reserve_hardware(void)if (!atomic_inc_not_zero (&pmc_refcount)) {mutex_lock (&pmc_reserve_mutex);if (atomic_read (&pmc_refcount) ==0 ) { -if (!reserve_pmc_hardware ()) +if (!reserve_pmc_hardware ()) { err = -EBUSY ; -else + }else {reserve_ds_buffers (); +reserve_lbr_buffers (); + } }if (!err)atomic_inc (&pmc_refcount);
arch/x86/events/intel/core.c +1 -1
@@ -6253,7 +6253,7 @@ __init int intel_pmu_init(void)* Check all LBT MSR here. * Disable LBR access if any LBR MSRs can not be accessed. */ -if (x86_pmu.lbr_nr && !check_msr (x86_pmu.lbr_tos,0x3UL )) +if (x86_pmu.lbr_tos && !check_msr (x86_pmu.lbr_tos,0x3UL )) x86_pmu.lbr_nr =0 ;for (i =0 ; i < x86_pmu.lbr_nr; i++) { if (!(check_msr(x86_pmu.lbr_from + i, 0xffffUL) &&
arch/x86/events/intel/lbr.c +20 -6
@@ -658,7 +658,6 @@ static inline bool branch_user_callstack(unsigned br_sel)void intel_pmu_lbr_add (struct perf_event *event) { -struct kmem_cache *kmem_cache = event->pmu->task_ctx_cache;struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events);if (!x86_pmu.lbr_nr)
@@ -696,11 +695,6 @@ void intel_pmu_lbr_add(struct perf_event *event)perf_sched_cb_inc (event->ctx->pmu);if (!cpuc->lbr_users++ && !event->total_time_running)intel_pmu_lbr_reset (); - -if (static_cpu_has (X86_FEATURE_ARCH_LBR ) && - kmem_cache && !cpuc->lbr_xsave && - (cpuc->lbr_users != cpuc->lbr_pebs_users)) - cpuc->lbr_xsave =kmem_cache_alloc (kmem_cache,GFP_KERNEL ); }void release_lbr_buffers (void )
@@ -722,6 +716,26 @@ void release_lbr_buffers(void) } } +void reserve_lbr_buffers (void ) +{ +struct kmem_cache *kmem_cache; +struct cpu_hw_events *cpuc; +int cpu; + +if (!static_cpu_has (X86_FEATURE_ARCH_LBR )) +return ; + +for_each_possible_cpu (cpu) { + cpuc =per_cpu_ptr (&cpu_hw_events, cpu); + kmem_cache =x86_get_pmu (cpu)->task_ctx_cache; +if (!kmem_cache || cpuc->lbr_xsave) +continue ; + + cpuc->lbr_xsave =kmem_cache_alloc_node (kmem_cache,GFP_KERNEL , +cpu_to_node (cpu)); + } +} +void intel_pmu_lbr_del (struct perf_event *event) {struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events);
arch/x86/events/perf_event.h +6 -0
@@ -1244,6 +1244,8 @@ void reserve_ds_buffers(void);void release_lbr_buffers (void ); +void reserve_lbr_buffers (void ); +extern struct event_constraint bts_constraint;extern struct event_constraint vlbr_constraint;
@@ -1393,6 +1395,10 @@ static inline void release_lbr_buffers(void) { } +static inline void reserve_lbr_buffers (void ) +{ +} +static inline int intel_pmu_init (void ) {return 0 ;
Re: [GIT pull] perf/urgent for v5.13-rc3
The pull request you sent on Sun, 23 May 2021 13:33:45 -0000:
The pull request you sent on Sun, 23 May 2021 13:33:45 -0000:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitperf-urgent-2021-05-23
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6ebb6814a1ef9573d8488232b50dc53b394c025a
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
The pull request you sent on Sun, 23 May 2021 13:33:43 -0000:
The pull request you sent on Sun, 23 May 2021 13:33:43 -0000:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitirq-urgent-2021-05-23
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f73d2a429334dbd30bc9a7e5ef5e07a676d3d499
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html