Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-30 Thread Pavel Tatashin
> > - if (cd.actual_read_sched_clock == jiffy_sched_clock_read) > > + if (cd.actual_read_sched_clock == jiffy_sched_clock_read) { > > + local_irq_disable(); > > sched_clock_register(jiffy_sched_clock_read, BITS_PER_LONG, > > HZ); > > +

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-30 Thread Pavel Tatashin
> > - if (cd.actual_read_sched_clock == jiffy_sched_clock_read) > > + if (cd.actual_read_sched_clock == jiffy_sched_clock_read) { > > + local_irq_disable(); > > sched_clock_register(jiffy_sched_clock_read, BITS_PER_LONG, > > HZ); > > +

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-30 Thread Peter Zijlstra
On Tue, Jul 24, 2018 at 10:41:19PM -0400, Pavel Tatashin wrote: > If we need it, we can surround the sched_clock_register() with > local_irq_disable/local_irq_enable: > > diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c > index cbc72c2c1fca..5015b165b55b 100644 > ---

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-30 Thread Peter Zijlstra
On Tue, Jul 24, 2018 at 10:41:19PM -0400, Pavel Tatashin wrote: > If we need it, we can surround the sched_clock_register() with > local_irq_disable/local_irq_enable: > > diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c > index cbc72c2c1fca..5015b165b55b 100644 > ---

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Pavel Tatashin
> integrator_defconfig+CONFIG_DEVTMPFS=y+CONFIG_DEVTMPFS_MOUNT=y > > Qemu command line is > qemu-system-arm -M integratorcp -m 128 \ > -kernel arch/arm/boot/zImage -no-reboot \ > -initrd busybox-armv4.cpio \ > --append "rdinit=/sbin/init console=ttyAMA0,115200" \ >

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Pavel Tatashin
> integrator_defconfig+CONFIG_DEVTMPFS=y+CONFIG_DEVTMPFS_MOUNT=y > > Qemu command line is > qemu-system-arm -M integratorcp -m 128 \ > -kernel arch/arm/boot/zImage -no-reboot \ > -initrd busybox-armv4.cpio \ > --append "rdinit=/sbin/init console=ttyAMA0,115200" \ >

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Pavel Tatashin
Peter, The problem is in this stack start_kernel local_irq_enable late_time_init sched_clock_init generic_sched_clock_init sched_clock_register WARN_ON(!irqs_disabled()); Before this work, sched_clock_init() was called prior to enabling interrupts, but now after. So, we

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Pavel Tatashin
Peter, The problem is in this stack start_kernel local_irq_enable late_time_init sched_clock_init generic_sched_clock_init sched_clock_register WARN_ON(!irqs_disabled()); Before this work, sched_clock_init() was called prior to enabling interrupts, but now after. So, we

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Guenter Roeck
On 07/24/2018 05:36 PM, Pavel Tatashin wrote: On Tue, Jul 24, 2018 at 4:22 PM Pavel Tatashin wrote: On Tue, Jul 24, 2018 at 3:54 PM Guenter Roeck wrote: Hi, On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Guenter Roeck
On 07/24/2018 05:36 PM, Pavel Tatashin wrote: On Tue, Jul 24, 2018 at 4:22 PM Pavel Tatashin wrote: On Tue, Jul 24, 2018 at 3:54 PM Guenter Roeck wrote: Hi, On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Pavel Tatashin
On Tue, Jul 24, 2018 at 4:22 PM Pavel Tatashin wrote: > > On Tue, Jul 24, 2018 at 3:54 PM Guenter Roeck wrote: > > > > Hi, > > > > On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: > > > Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d > > > Gitweb: > > >

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Pavel Tatashin
On Tue, Jul 24, 2018 at 4:22 PM Pavel Tatashin wrote: > > On Tue, Jul 24, 2018 at 3:54 PM Guenter Roeck wrote: > > > > Hi, > > > > On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: > > > Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d > > > Gitweb: > > >

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Pavel Tatashin
On Tue, Jul 24, 2018 at 3:54 PM Guenter Roeck wrote: > > Hi, > > On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: > > Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d > > Gitweb: > > https://git.kernel.org/tip/857baa87b6422bcfb84ed3631d6839920cb5b09d > >

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Pavel Tatashin
On Tue, Jul 24, 2018 at 3:54 PM Guenter Roeck wrote: > > Hi, > > On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: > > Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d > > Gitweb: > > https://git.kernel.org/tip/857baa87b6422bcfb84ed3631d6839920cb5b09d > >

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Guenter Roeck
Hi, On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: > Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d > Gitweb: > https://git.kernel.org/tip/857baa87b6422bcfb84ed3631d6839920cb5b09d > Author: Pavel Tatashin > AuthorDate: Thu, 19 Jul 2018 16:55:42 -0400 >

Re: [tip:x86/timers] sched/clock: Enable sched clock early

2018-07-24 Thread Guenter Roeck
Hi, On Thu, Jul 19, 2018 at 03:33:21PM -0700, tip-bot for Pavel Tatashin wrote: > Commit-ID: 857baa87b6422bcfb84ed3631d6839920cb5b09d > Gitweb: > https://git.kernel.org/tip/857baa87b6422bcfb84ed3631d6839920cb5b09d > Author: Pavel Tatashin > AuthorDate: Thu, 19 Jul 2018 16:55:42 -0400 >