Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-12 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 22:59, Paolo Bonzini wrote: > On 11/12/20 22:04, Thomas Gleixner wrote: > The nanosecond and TSC times are sent as part of the paused-VM state at > the very end of the live migration process. > > So it's still true that the time advances during live migrat

[tip: irq/core] genirq: Move status flag checks to core

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: a578bb32cb1a46676caae72dc0c668630ab40c1f Gitweb: https://git.kernel.org/tip/a578bb32cb1a46676caae72dc0c668630ab40c1f Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:38 +01:00

[tip: irq/core] genirq: Annotate irq stats data races

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: fb4f676fc901cb547226efb3e69ffeaeefa124be Gitweb: https://git.kernel.org/tip/fb4f676fc901cb547226efb3e69ffeaeefa124be Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:41 +01:00

[tip: irq/core] genirq: Provide irq_get_effective_affinity()

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: 276b1e6e6fecc2f138c72519705dabc8bd01ffa9 Gitweb: https://git.kernel.org/tip/276b1e6e6fecc2f138c72519705dabc8bd01ffa9 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:40 +01:00

[tip: irq/core] ARM: smp: Use irq_desc_kstat_cpu() in show_ipi_list()

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: fe80f1d579dfd4edf78a66c3bd3befa985b4b02b Gitweb: https://git.kernel.org/tip/fe80f1d579dfd4edf78a66c3bd3befa985b4b02b Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:45 +01:00

[tip: irq/core] genirq: Make kstat_irqs() static

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: 63ca4e066a62afce8ebaf75ebd4c6ef67f7bb5ee Gitweb: https://git.kernel.org/tip/63ca4e066a62afce8ebaf75ebd4c6ef67f7bb5ee Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:43 +01:00

[tip: irq/core] drm/i915/lpe_audio: Remove pointless irq_to_desc() usage

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: 766ba1f937be5ec418bd759e40fccc0c8c42e271 Gitweb: https://git.kernel.org/tip/766ba1f937be5ec418bd759e40fccc0c8c42e271 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:49 +01:00

[tip: irq/core] NTB/msi: Use irq_has_action()

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: d53c576bd3d4787b3d7d0d814b28ae67099d84a1 Gitweb: https://git.kernel.org/tip/d53c576bd3d4787b3d7d0d814b28ae67099d84a1 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:53 +01:00

[tip: irq/core] drm/i915/pmu: Replace open coded kstat_irqs() copy

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: b64217174467e1c4c3da04a7f7835393fa234818 Gitweb: https://git.kernel.org/tip/b64217174467e1c4c3da04a7f7835393fa234818 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:50 +01:00

[tip: irq/core] genirq: Provide kstat_irqdesc_cpu()

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: ea5f36556b8bde14234ec223ebc59968ade4735a Gitweb: https://git.kernel.org/tip/ea5f36556b8bde14234ec223ebc59968ade4735a Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:44 +01:00

[tip: irq/core] parisc/irq: Use irq_desc_kstat_cpu() in show_interrupts()

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: 27fb43cb32d016366d1d87986970d5be7d6607e1 Gitweb: https://git.kernel.org/tip/27fb43cb32d016366d1d87986970d5be7d6607e1 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:47 +01:00

[tip: irq/core] genirq: Move irq_set_lockdep_class() to core

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: a07d244f00de679c66643e89eba6e1baa62d3517 Gitweb: https://git.kernel.org/tip/a07d244f00de679c66643e89eba6e1baa62d3517 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:39 +01:00

[tip: irq/core] genirq: Move irq_has_action() into core code

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: db123744af5d237048f23ede05cc7ef0dc48db01 Gitweb: https://git.kernel.org/tip/db123744af5d237048f23ede05cc7ef0dc48db01 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:25:37 +01:00

[tip: irq/core] xen/events: Implement irq distribution

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: 93b6adbf0420a7bd84167a4feb289cc2c1b4efca Gitweb: https://git.kernel.org/tip/93b6adbf0420a7bd84167a4feb289cc2c1b4efca Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:26:05 +01:00

[tip: irq/core] xen/events: Only force affinity mask for percpu interrupts

2020-12-12 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the irq/core branch of tip: Commit-ID: f61b8351facda691f1564097074976b30e987a81 Gitweb: https://git.kernel.org/tip/f61b8351facda691f1564097074976b30e987a81 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 20:26:03 +01:00

Re: [GIT PULL] timers changes for v5.11 #2

2020-12-12 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 12:23, Daniel Lezcano wrote: > please consider pulling those 3 last changes which fixes some issues on > the drivers. > > The following changes since commit fef92cd2bc04c64bb3743d40c0b4be47aedf9e23: > > Merge tag 'timers-v5.11' of >

Re: [patch 1/3] tick: Remove pointless cpu valid check in hotplug code

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 23:21, Frederic Weisbecker wrote: > On Sun, Dec 06, 2020 at 10:12:54PM +0100, Thomas Gleixner wrote: >> tick_handover_do_timer() which is invoked when a CPU is unplugged has a >> @@ -407,17 +407,13 @@ EXPORT_SYMBOL_GPL(tick_broadcast_oneshot >>

Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-11 Thread Thomas Gleixner
Andrew, On Fri, Dec 11 2020 at 22:21, Andrew Cooper wrote: > On 11/12/2020 21:27, Thomas Gleixner wrote: >> It's not any different from the hardware example at least not as far as >> I understood the code. > > Xen's event channels do have a couple of quirks. Why am I not

[tip: timers/core] tick/sched: Make jiffies update quick check more robust

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: aa3b66f401b372598b29421bab4d17b631b92407 Gitweb: https://git.kernel.org/tip/aa3b66f401b372598b29421bab4d17b631b92407 Author:Thomas Gleixner AuthorDate:Fri, 04 Dec 2020 11:55:19 +01:00

Re: [patch 03/30] genirq: Move irq_set_lockdep_class() to core

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 22:08, Thomas Gleixner wrote: > On Fri, Dec 11 2020 at 19:53, Andy Shevchenko wrote: > >> On Thu, Dec 10, 2020 at 10:14 PM Thomas Gleixner wrote: >>> >>> irq_set_lockdep_class() is used from modules and requires irq_to_desc() to >>>

Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 09:29, boris ostrovsky wrote: > On 12/11/20 7:37 AM, Thomas Gleixner wrote: >> On Fri, Dec 11 2020 at 13:10, Jürgen Groß wrote: >>> On 11.12.20 00:20, boris.ostrov...@oracle.com wrote: >>>> On 12/10/20 2:26 PM, Thomas Gleixner wrote: >

RE: [patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 14:19, David Laight wrote: > From: Thomas Gleixner >> You can't catch that. If this really becomes an issue you need a >> sequence counter around it. > > Or just two copies of the high word. > Provided the accesses are sequenced: > writer: >

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 11:18, Marcelo Tosatti wrote: > On Fri, Dec 11, 2020 at 02:30:34PM +0100, Thomas Gleixner wrote: > Unless you notify applications to invalidate their time reads, > i can't see a way to fix this. This is just wrong. Suspend/resume handles that fine and t

Re: [patch 03/30] genirq: Move irq_set_lockdep_class() to core

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 19:53, Andy Shevchenko wrote: > On Thu, Dec 10, 2020 at 10:14 PM Thomas Gleixner wrote: >> >> irq_set_lockdep_class() is used from modules and requires irq_to_desc() to >> be exported. Move it into the core code which lifts another requirem

Re: timers: Move clearing of base::timer_running under base::lock

2020-12-11 Thread Thomas Gleixner
On Tue, Dec 08 2020 at 09:50, Sebastian Andrzej Siewior wrote: > On 2020-12-07 08:06:48 [-0800], Paul E. McKenney wrote: >> > Yes, but it triggers frequently. Like `rcuc' is somehow is aligned with >> > the timeout. >> >> Given that a lot of RCU processing is event-driven based on timers, >> and

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-11 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 21:27, Marcelo Tosatti wrote: > On Thu, Dec 10, 2020 at 10:48:10PM +0100, Thomas Gleixner wrote: >> You really all live in a seperate universe creating your own rules how >> things which other people work hard on to get it correct can be screwed >>

Re: [patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 10:13, Tvrtko Ursulin wrote: > On 10/12/2020 19:25, Thomas Gleixner wrote: >> >> Aside of that the count is per interrupt line and therefore takes >> interrupts from other devices into account which share the interrupt line >> and are not han

Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 13:10, Jürgen Groß wrote: > On 11.12.20 00:20, boris.ostrov...@oracle.com wrote: >> >> On 12/10/20 2:26 PM, Thomas Gleixner wrote: >>> All event channel setups bind the interrupt on CPU0 or the target CPU for >>> percpu interrupt

Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-11 Thread Thomas Gleixner
On Fri, Dec 11 2020 at 07:17, Jürgen Groß wrote: > On 11.12.20 00:20, boris.ostrov...@oracle.com wrote: >> >> On 12/10/20 2:26 PM, Thomas Gleixner wrote: >>> All event channel setups bind the interrupt on CPU0 or the target CPU for >>> percpu interrupt

[tip: timers/core] ntp: Make the RTC sync offset less obscure

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: 69eca258c85000564577642ba28335eb4e1df8f0 Gitweb: https://git.kernel.org/tip/69eca258c85000564577642ba28335eb4e1df8f0 Author:Thomas Gleixner AuthorDate:Sun, 06 Dec 2020 22:46:20 +01:00

[tip: timers/core] rtc: core: Make the sync offset default more realistic

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: 354c796b9270eb4780e59e3bdb83a3ae4930a832 Gitweb: https://git.kernel.org/tip/354c796b9270eb4780e59e3bdb83a3ae4930a832 Author:Thomas Gleixner AuthorDate:Sun, 06 Dec 2020 22:46:17 +01:00

[tip: timers/core] rtc: mc146818: Prevent reading garbage

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: 05a0302c35481e9b47fb90ba40922b0a4cae40d8 Gitweb: https://git.kernel.org/tip/05a0302c35481e9b47fb90ba40922b0a4cae40d8 Author:Thomas Gleixner AuthorDate:Sun, 06 Dec 2020 22:46:14 +01:00

[tip: timers/core] ntp: Consolidate the RTC update implementation

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: 76e87d96b30b5fee91b381fbc444a3eabcd9469a Gitweb: https://git.kernel.org/tip/76e87d96b30b5fee91b381fbc444a3eabcd9469a Author:Thomas Gleixner AuthorDate:Sun, 06 Dec 2020 22:46:21 +01:00

[tip: timers/core] ntp: Make the RTC synchronization more reliable

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: c9e6189fb03123a7dfb93589280347b46f30b161 Gitweb: https://git.kernel.org/tip/c9e6189fb03123a7dfb93589280347b46f30b161 Author:Thomas Gleixner AuthorDate:Sun, 06 Dec 2020 22:46:18 +01:00

[tip: timers/core] ntp, rtc: Move rtc_set_ntp_time() to ntp code

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: 33e62e832384c8cb523044e0e9d99d7133f98e93 Gitweb: https://git.kernel.org/tip/33e62e832384c8cb523044e0e9d99d7133f98e93 Author:Thomas Gleixner AuthorDate:Sun, 06 Dec 2020 22:46:19 +01:00

[tip: timers/core] rtc: cmos: Make rtc_cmos sync offset correct

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: b0ecd8e8c5ef376777277c4c2db7de92ac59f23f Gitweb: https://git.kernel.org/tip/b0ecd8e8c5ef376777277c4c2db7de92ac59f23f Author:Thomas Gleixner AuthorDate:Sun, 06 Dec 2020 22:46:16 +01:00

[tip: timers/core] rtc: mc146818: Reduce spinlock section in mc146818_set_time()

2020-12-11 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the timers/core branch of tip: Commit-ID: dcf257e92622ba0e25fdc4b6699683e7ae67e2a1 Gitweb: https://git.kernel.org/tip/dcf257e92622ba0e25fdc4b6699683e7ae67e2a1 Author:Thomas Gleixner AuthorDate:Sun, 06 Dec 2020 22:46:15 +01:00

Re: [patch 8/8] ntp: Consolidate the RTC update implementation

2020-12-11 Thread Thomas Gleixner
On Mon, Dec 07 2020 at 17:05, Jason Gunthorpe wrote: > On Sun, Dec 06, 2020 at 10:46:21PM +0100, Thomas Gleixner wrote: >> static void sync_hw_clock(struct work_struct *work) >> { >> +static unsigned long offset_nsec = NSEC_PER_SEC / 2; > > A comment here exp

Re: [patch 4/8] rtc: core: Make the sync offset default more realistic

2020-12-10 Thread Thomas Gleixner
Alexandre, On Fri, Dec 11 2020 at 00:59, Alexandre Belloni wrote: > On 06/12/2020 22:46:17+0100, Thomas Gleixner wrote: >> /* Drivers can revise this default after allocating the device. */ >> -rtc->set_offset_nsec = NSEC_PER_SEC / 2; >> +rtc->set_offset

Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 18:20, boris ostrovsky wrote: > On 12/10/20 2:26 PM, Thomas Gleixner wrote: >> All event channel setups bind the interrupt on CPU0 or the target CPU for >> percpu interrupts and overwrite the affinity mask with the corresponding >> cpumask. Tha

Re: [patch 24/30] xen/events: Remove unused bind_evtchn_to_irq_lateeoi()

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 18:19, boris ostrovsky wrote: > On 12/10/20 2:26 PM, Thomas Gleixner wrote: >> -EXPORT_SYMBOL_GPL(bind_evtchn_to_irq_lateeoi); > > include/xen/events.h also needs to be updated (and in the next patch for > xen_set_affinity_evtchn() as well). Darn, I lost that.

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 15:19, Andy Lutomirski wrote: >> On Dec 10, 2020, at 2:28 PM, Thomas Gleixner wrote: >> Can we please focus on real problems instead of making up new ones? >> >> Correctness of time is a real problem despite the believe of virt folks >> that i

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 12:26, Marcelo Tosatti wrote: > On Wed, Dec 09, 2020 at 09:58:23PM +0100, Thomas Gleixner wrote: >> Marcelo, >> >> On Wed, Dec 09 2020 at 13:34, Marcelo Tosatti wrote: >> > On Tue, Dec 08, 2020 at 10:33:15PM +0100, Thomas Gleixner wrote: >

[tip: x86/apic] x86/ioapic: Cleanup the timer_works() irqflags mess

2020-12-10 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the x86/apic branch of tip: Commit-ID: 058df195c23403f91acc028e39ca2ad599d0af52 Gitweb: https://git.kernel.org/tip/058df195c23403f91acc028e39ca2ad599d0af52 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 21:15:04 +01:00

[tip: x86/urgent] x86/apic/vector: Fix ordering in vector assignment

2020-12-10 Thread tip-bot2 for Thomas Gleixner
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 190113b4c6531c8e09b31d5235f9b5175cbb0f72 Gitweb: https://git.kernel.org/tip/190113b4c6531c8e09b31d5235f9b5175cbb0f72 Author:Thomas Gleixner AuthorDate:Thu, 10 Dec 2020 21:18:22 +01:00

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 14:01, Andy Lutomirski wrote: > On Thu, Dec 10, 2020 at 1:25 PM Thomas Gleixner wrote: >> I'm still convinced that a notification about 'we take a nap' will be >> more robust, less complex and more trivial to backport. > > What do you have in mind? Su

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-10 Thread Thomas Gleixner
Andy, On Thu, Dec 10 2020 at 07:16, Andy Lutomirski wrote: >> On Dec 10, 2020, at 6:52 AM, Maxim Levitsky wrote: >> On Thu, 2020-12-10 at 12:48 +0100, Paolo Bonzini wrote: >>>> On 08/12/20 22:20, Thomas Gleixner wrote: >>>> So now life migration comes a

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 14:01, Peter Zijlstra wrote: > On Thu, Dec 10, 2020 at 01:22:02PM +0100, Paolo Bonzini wrote: >> On 10/12/20 13:14, Peter Zijlstra wrote: >> > On Thu, Dec 10, 2020 at 12:42:36PM +0100, Paolo Bonzini wrote: >> > > On 07/12/20 18:41, Thomas

[PATCH] x86/apic/vector: Fix ordering in vector assignment

2020-12-10 Thread Thomas Gleixner
inity mask in irq descriptor") Reported-by: Shung-Hsi Yu Reported-by: Prarit Bhargava Signed-off-by: Thomas Gleixner Tested-by: Shung-Hsi Yu Cc: sta...@vger.kernel.org --- arch/x86/kernel/apic/vector.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) ---

x86/ioapic: Cleanup the timer_works() irqflags mess

2020-12-10 Thread Thomas Gleixner
restore with a conditional STI. That code is a historical mess and none of this is needed. Make it straightforward use local_irq_disable()/enable() as that's all what is required. It is invoked from interrupt enabled code nowadays. Reported-by: Mark Rutland Signed-off-by: Thomas Gleixner Tested

[patch 01/30] genirq: Move irq_has_action() into core code

2020-12-10 Thread Thomas Gleixner
. Signed-off-by: Thomas Gleixner --- arch/alpha/kernel/sys_jensen.c |2 +- arch/x86/kernel/topology.c |1 + include/linux/interrupt.h |1 + include/linux/irqdesc.h|7 +-- kernel/irq/manage.c| 17 + 5 files changed, 21 insertions

[patch 03/30] genirq: Move irq_set_lockdep_class() to core

2020-12-10 Thread Thomas Gleixner
irq_set_lockdep_class() is used from modules and requires irq_to_desc() to be exported. Move it into the core code which lifts another requirement for the export. Signed-off-by: Thomas Gleixner --- include/linux/irqdesc.h | 10 -- kernel/irq/irqdesc.c| 14 ++ 2 files

[patch 02/30] genirq: Move status flag checks to core

2020-12-10 Thread Thomas Gleixner
These checks are used by modules and prevent the removal of the export of irq_to_desc(). Move the accessor into the core. Signed-off-by: Thomas Gleixner --- include/linux/irqdesc.h | 17 + kernel/irq/manage.c | 17 + 2 files changed, 22 insertions(+), 12

[patch 06/30] parisc/irq: Simplify irq count output for /proc/interrupts

2020-12-10 Thread Thomas Gleixner
The SMP variant works perfectly fine on UP as well. Signed-off-by: Thomas Gleixner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: afzal mohammed Cc: linux-par...@vger.kernel.org --- arch/parisc/kernel/irq.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) --- a/a

[patch 07/30] genirq: Make kstat_irqs() static

2020-12-10 Thread Thomas Gleixner
No more users outside the core code. Signed-off-by: Thomas Gleixner --- include/linux/kernel_stat.h |1 - kernel/irq/irqdesc.c| 19 ++- 2 files changed, 6 insertions(+), 14 deletions(-) --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -67,7

[patch 00/30] genirq: Treewide hunt for irq descriptor abuse and assorted fixes

2020-12-10 Thread Thomas Gleixner
A recent request to export kstat_irqs() pointed to a copy of the same in the i915 code, which made me look for further usage of irq descriptors in drivers. The usage in drivers ranges from creative to broken in all colours. irqdesc.h clearly says that this is core functionality and the fact C

[patch 21/30] net/mlx4: Use effective interrupt affinity

2020-12-10 Thread Thomas Gleixner
means that checking the affinity mask itself does not really tell about the actual target CPUs. Signed-off-by: Thomas Gleixner Cc: Tariq Toukan Cc: "David S. Miller" Cc: Jakub Kicinski Cc: net...@vger.kernel.org Cc: linux-r...@vger.kernel.org --- drivers/net/ethernet/mellanox/ml

[patch 18/30] PCI: xilinx-nwl: Use irq_data_get_irq_chip_data()

2020-12-10 Thread Thomas Gleixner
chip data of the top level chip of a hierarchy. It does not matter in this case because the chip is the top level chip, but that doesn't make it more correct. Signed-off-by: Thomas Gleixner Cc: Lorenzo Pieralisi Cc: Rob Herring Cc: Bjorn Helgaas Cc: Michal Simek Cc: linux-...@vger.kernel.org

[patch 26/30] xen/events: Use immediate affinity setting

2020-12-10 Thread Thomas Gleixner
(). This makes XEN on x86 use the same mechanics as on e.g. ARM64 where deferred affinity setting is not required and not implemented and the code path in the ack functions is compiled out. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-de

[patch 25/30] xen/events: Remove disfunct affinity spreading

2020-12-10 Thread Thomas Gleixner
to contain cpumask_of(0). As the CPU0 enforcement was in place _before_ this was implemented it's entirely unclear how that can ever have worked at all. Remove it as preparation for doing it proper. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-de

[patch 08/30] genirq: Provide kstat_irqdesc_cpu()

2020-12-10 Thread Thomas Gleixner
Most users of kstat_irqs_cpu() have the irq descriptor already. No point in calling into the core code and looking it up once more. Use it in per_cpu_count_show() to start with. Signed-off-by: Thomas Gleixner --- include/linux/irqdesc.h |6 ++ kernel/irq/irqdesc.c|4 ++-- 2

[patch 04/30] genirq: Provide irq_get_effective_affinity()

2020-12-10 Thread Thomas Gleixner
Provide an accessor to the effective interrupt affinity mask. Going to be used to replace open coded fiddling with the irq descriptor. Signed-off-by: Thomas Gleixner --- include/linux/irq.h |7 +++ 1 file changed, 7 insertions(+) --- a/include/linux/irq.h +++ b/include/linux/irq.h

[patch 10/30] arm64/smp: Use irq_desc_kstat_cpu() in arch_show_interrupts()

2020-12-10 Thread Thomas Gleixner
The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: linux-arm-ker...@lists.infradead.org --- arch/arm64/kernel/smp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[patch 11/30] parisc/irq: Use irq_desc_kstat_cpu() in show_interrupts()

2020-12-10 Thread Thomas Gleixner
The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: afzal mohammed Cc: linux-par...@vger.kernel.org --- arch/parisc/kernel/irq.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[patch 05/30] genirq: Annotate irq stats data races

2020-12-10 Thread Thomas Gleixner
Both the per cpu stats and the accumulated count are accessed lockless and can be concurrently modified. That's intentional and the stats are a rough estimate anyway. Annotate them with data_race(). Signed-off-by: Thomas Gleixner --- kernel/irq/irqdesc.c |4 ++-- kernel/irq/proc.c|5

[patch 30/30] genirq: Remove export of irq_to_desc()

2020-12-10 Thread Thomas Gleixner
No more (ab)use in modules finally. Remove the export so there won't come new ones. Signed-off-by: Thomas Gleixner --- kernel/irq/irqdesc.c |1 - 1 file changed, 1 deletion(-) --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -352,7 +352,6 @@ struct irq_desc *irq_to_desc(unsigned

[patch 19/30] PCI: mobiveil: Use irq_data_get_irq_chip_data()

2020-12-10 Thread Thomas Gleixner
chip data of the top level chip of a hierarchy. It does not matter in this case because the chip is the top level chip, but that doesn't make it more correct. Signed-off-by: Thomas Gleixner Cc: Karthikeyan Mitran Cc: Hou Zhiqiang Cc: Lorenzo Pieralisi Cc: Rob Herring Cc: Bjorn Helgaas Cc

[patch 15/30] pinctrl: nomadik: Use irq_has_action()

2020-12-10 Thread Thomas Gleixner
Let the core code do the fiddling with irq_desc. Signed-off-by: Thomas Gleixner Cc: Linus Walleij Cc: linux-arm-ker...@lists.infradead.org Cc: linux-g...@vger.kernel.org --- drivers/pinctrl/nomadik/pinctrl-nomadik.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers

[patch 13/30] drm/i915/lpe_audio: Remove pointless irq_to_desc() usage

2020-12-10 Thread Thomas Gleixner
Nothing uses the result and nothing should ever use it in driver code. Signed-off-by: Thomas Gleixner Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Cc: Pankaj Bharadiya Cc: Chris Wilson Cc: Wambui Karuga Cc: intel-...@lists.freedesktop.org Cc

[patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc

2020-12-10 Thread Thomas Gleixner
of subsystem boundaries and racy against concurrent modifications of the interrupt descriptor. Print the irq line instead so the information can be looked up in a sane way in /proc/interrupts. Signed-off-by: Thomas Gleixner Cc: Linus Walleij Cc: Lee Jones Cc: linux-arm-ker...@lists.infradead.org

[patch 12/30] s390/irq: Use irq_desc_kstat_cpu() in show_msi_interrupt()

2020-12-10 Thread Thomas Gleixner
The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: Christian Borntraeger Cc: Heiko Carstens Cc: linux-s...@vger.kernel.org --- arch/s390/kernel/irq.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kernel/irq.c +++ b

[patch 20/30] net/mlx4: Replace irq_to_desc() abuse

2020-12-10 Thread Thomas Gleixner
. Retrieve a pointer to the affinity mask itself and use that. It's still using an interface which is usually not for random drivers, but definitely less hideous than the previous hack. Signed-off-by: Thomas Gleixner Cc: Tariq Toukan Cc: "David S. Miller" Cc: Jakub Kicinsk

[patch 23/30] net/mlx5: Use effective interrupt affinity

2020-12-10 Thread Thomas Gleixner
means that checking the affinity mask itself does not really tell about the actual target CPUs. Signed-off-by: Thomas Gleixner Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: "David S. Miller" Cc: Jakub Kicinski Cc: net...@vger.kernel.org Cc: linux-r...@vger.kernel.org --- drivers/ne

[patch 22/30] net/mlx5: Replace irq_to_desc() abuse

2020-12-10 Thread Thomas Gleixner
. Retrieve a pointer to the affinity mask itself and use that. It's still using an interface which is usually not for random drivers, but definitely less hideous than the previous hack. Signed-off-by: Thomas Gleixner --- drivers/net/ethernet/mellanox/mlx5/core/en.h |2 +- drivers/net/ethernet

[patch 24/30] xen/events: Remove unused bind_evtchn_to_irq_lateeoi()

2020-12-10 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-de...@lists.xenproject.org --- drivers/xen/events/events_base.c |6 -- 1 file changed, 6 deletions(-) --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c

[patch 17/30] NTB/msi: Use irq_has_action()

2020-12-10 Thread Thomas Gleixner
Use the proper core function. Signed-off-by: Thomas Gleixner Cc: Jon Mason Cc: Dave Jiang Cc: Allen Hubbe Cc: linux-...@googlegroups.com --- drivers/ntb/msi.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/ntb/msi.c +++ b/drivers/ntb/msi.c @@ -282,15 +282,13

[patch 28/30] xen/events: Reduce irq_info::spurious_cnt storage size

2020-12-10 Thread Thomas Gleixner
To prepare for interrupt spreading reduce the storage size of irq_info::spurious_cnt to u8 so the required flag for the spreading logic will not increase the storage size. Protect the usage site against overruns. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano

[patch 29/30] xen/events: Implement irq distribution

2020-12-10 Thread Thomas Gleixner
Keep track of the assignments of event channels to CPUs and select the online CPU with the least assigned channels in the affinity mask which is handed to irq_chip::irq_set_affinity() from the core code. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano

[patch 09/30] ARM: smp: Use irq_desc_kstat_cpu() in show_ipi_list()

2020-12-10 Thread Thomas Gleixner
The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org --- arch/arm/kernel/smp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm/kernel/smp.c +++ b

[patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-10 Thread Thomas Gleixner
irq(). This also prepares for proper interrupt spreading. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-de...@lists.xenproject.org --- drivers/xen/events/events_base.c | 42 ++- 1 file changed, 28 inserti

[patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy

2020-12-10 Thread Thomas Gleixner
only counts interrupts which originate from the graphics card. To avoid atomics or heuristics of some sort make the counter field 'unsigned long'. That limits the count to 4e9 on 32bit which is a lot and postprocessing can easily deal with the occasional wraparound. Signed-off-by: Thomas Gleixner

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 17:09, Tvrtko Ursulin wrote: > On 10/12/2020 16:35, Thomas Gleixner wrote: >> I'll send out a series addressing irq_to_desc() (ab)use all over the >> place shortly. i915 is in there... > > Yep we don't need atomic, my bad. And we would care about the sha

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 10:45, Tvrtko Ursulin wrote: > On 10/12/2020 07:53, Joonas Lahtinen wrote: >> I think later in the thread there was a suggestion to replace this with >> simple counter increment in IRQ handler. > > It was indeed unsafe until recent b00bccb3f0bb ("drm/i915/pmu: Handle > PCI

Re: [PATCH v2 03/12] x86/pv: switch SWAPGS to ALTERNATIVE

2020-12-09 Thread Thomas Gleixner
> Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner

Re: [PATCH v2 02/12] x86/xen: use specific Xen pv interrupt entry for DF

2020-12-09 Thread Thomas Gleixner
On Fri, Nov 20 2020 at 12:46, Juergen Gross wrote: > Xen PV guests don't use IST. For double fault interrupts switch to > the same model as NMI. > > Correct a typo in a comment while copying it. > > Signed-off-by: Juergen Gross > Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner

Re: [PATCH v2 01/12] x86/xen: use specific Xen pv interrupt entry for MCE

2020-12-09 Thread Thomas Gleixner
On Fri, Nov 20 2020 at 12:46, Juergen Gross wrote: > Xen PV guests don't use IST. For machine check interrupts switch to > the same model as debug interrupts. > > Signed-off-by: Juergen Gross > Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-09 Thread Thomas Gleixner
Marcelo, On Wed, Dec 09 2020 at 13:34, Marcelo Tosatti wrote: > On Tue, Dec 08, 2020 at 10:33:15PM +0100, Thomas Gleixner wrote: >> On Tue, Dec 08 2020 at 15:11, Marcelo Tosatti wrote: >> > max_cycles overflow. Sent a message to Maxim describing it. >> >> Truly

Re: [PATCH v2 05/12] x86: rework arch_local_irq_restore() to not use popf

2020-12-09 Thread Thomas Gleixner
On Wed, Dec 09 2020 at 18:15, Mark Rutland wrote: > In arch/x86/kernel/apic/io_apic.c's timer_irq_works() we do: > > local_irq_save(flags); > local_irq_enable(); > > [ trigger an IRQ here ] > > local_irq_restore(flags); > > ... and in check_timer() we call that a number of

Re: "irq 4: Affinity broken due to vector space exhaustion." warning on restart of ttyS0 console

2020-12-09 Thread Thomas Gleixner
Hi Shung-Hsi! On Wed, Dec 09 2020 at 14:33, Shung-Hsi Yu wrote: > On Tue, Nov 10, 2020 at 09:56:27PM +0100, Thomas Gleixner wrote: >> The real problem is irqbalanced aggressively exhausting the vector space >> of a _whole_ socket to the point that there is not a single vector lef

Re: [patch V2 4/9] softirq: Make softirq control and processing RT aware

2020-12-09 Thread Thomas Gleixner
On Wed, Dec 09 2020 at 13:42, Peter Zijlstra wrote: > On Wed, Dec 09, 2020 at 01:36:54PM +0100, Thomas Gleixner wrote: >> On Wed, Dec 09 2020 at 11:11, Peter Zijlstra wrote: >> > On Fri, Dec 04, 2020 at 06:01:55PM +0100, Thomas Gleixner wrote: >> >> From: Thomas Gl

Re: [patch 0/8] ntp/rtc: Fixes and cleanups

2020-12-09 Thread Thomas Gleixner
On Wed, Dec 09 2020 at 05:01, Alexandre Belloni wrote: > On 09/12/2020 01:33:08+0100, Thomas Gleixner wrote: >> > The following series addresses the above: >> > >> > 1) Fix the readout function of MC146818 >> > 2) Fix the rtc-cmos offset >&g

Re: [patch V2 4/9] softirq: Make softirq control and processing RT aware

2020-12-09 Thread Thomas Gleixner
On Wed, Dec 09 2020 at 11:11, Peter Zijlstra wrote: > On Fri, Dec 04, 2020 at 06:01:55PM +0100, Thomas Gleixner wrote: >> From: Thomas Gleixner >> +/* First entry of a task into a BH disabled section? */ >> +if (!current->softirq_disable_cnt) { >>

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-09 Thread Thomas Gleixner
Andy, On Tue, Dec 08 2020 at 20:08, Andy Lutomirski wrote: > On Tue, Dec 8, 2020 at 4:19 PM Thomas Gleixner wrote: >> On Tue, Dec 08 2020 at 12:32, Andy Lutomirski wrote: >> all the way through the end and then come up with a real proposal which >> solves all of

Re: [PATCH] x86/apic: Fix CPU devicetree-node lookups

2020-12-08 Thread Thomas Gleixner
On Tue, Dec 08 2020 at 11:05, Johan Hovold wrote: > On Tue, Nov 24, 2020 at 02:42:47PM +0100, Johan Hovold wrote: >> Fix CPU devicetree-node lookups by implementing >> arch_match_cpu_phys_id(). >> >> This allows using of_get_cpu_node() and of_cpu_device_node_get() to look >> up CPU devicetree

Re: [patch 0/8] ntp/rtc: Fixes and cleanups

2020-12-08 Thread Thomas Gleixner
Alexandre, On Sun, Dec 06 2020 at 22:46, Thomas Gleixner wrote: > Miroslav ran into a situation where the periodic RTC synchronization almost > never was able to hit the time window for the update. That happens due the > usage of delayed_work and the properties of the timer wheel.

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-08 Thread Thomas Gleixner
On Tue, Dec 08 2020 at 12:32, Andy Lutomirski wrote: >> On Dec 8, 2020, at 11:25 AM, Thomas Gleixner wrote: >> One issue here is that guests might want to run their own NTP/PTP. One >> reason to do that is that some people prefer the leap second smearing >> NTP se

Re: [PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-08 Thread Thomas Gleixner
On Tue, Dec 08 2020 at 13:11, Michael Ellerman wrote: > "Enrico Weigelt, metux IT consult" writes: >> All archs, except Alpha, print out the irq number in hex, but the message >> looks like it was a decimal number, which is quite confusing. Fixing this >> by adding "0x" prefix. > > Arguably

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-08 Thread Thomas Gleixner
On Tue, Dec 08 2020 at 15:12, Marcelo Tosatti wrote: > On Tue, Dec 08, 2020 at 06:25:13PM +0200, Maxim Levitsky wrote: >> On Tue, 2020-12-08 at 17:02 +0100, Thomas Gleixner wrote: >> The "bug" is that if VMM moves a hardware time counter (tsc or anything >> else) &

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-08 Thread Thomas Gleixner
On Tue, Dec 08 2020 at 15:11, Marcelo Tosatti wrote: > On Tue, Dec 08, 2020 at 05:02:07PM +0100, Thomas Gleixner wrote: >> On Tue, Dec 08 2020 at 16:50, Maxim Levitsky wrote: >> > On Mon, 2020-12-07 at 20:29 -0300, Marcelo Tosatti wrote: >> >> > +This ioctl

Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

2020-12-08 Thread Thomas Gleixner
On Tue, Dec 08 2020 at 09:33, Andy Lutomirski wrote: > On Tue, Dec 8, 2020 at 8:26 AM Maxim Levitsky wrote: > > IIRC we introduced mul_u64_u32_shift() for roughly this reason,but we > don't seem to be using it in the relevant code paths. We should be > able to use the same basic math with wider

<    1   2   3   4   5   6   7   8   9   10   >