Re: [PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-22 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Preeti U Murthy wrote: On 01/21/2015 05:16 PM, Thomas Gleixner wrote: How about when the cpu that is going offline receives a timer interrupt just before setting its state to CPU_DEAD ? That is still possible right given that its clock devices may not have been shutdown

Re: [PATCH] hrtimer: add hrtimer_start_now()

2015-01-22 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Olliver Schinagl wrote: From: Olliver Schinagl oli...@schinagl.nl When using a hrtimer for repeating periodic ticks, hrtimer_forward_now() is often used. Quite possibly the timer loop is thus probably fully controlled by hrtimer_forward_now() and we don't really care

Re: [PATCH v2 0/2] time: tip/timers/urgent: Validate potential mult overflows

2015-01-22 Thread Thomas Gleixner
On Wed, 14 Jan 2015, John Stultz wrote: On Wed, Jan 7, 2015 at 10:12 AM, John Stultz john.stu...@linaro.org wrote: Thomas, Ingo, Just wanted to ping you here, since I've not seen any feedback here. Got caught in my huge backlog. Processing right now. Thanks, tglx -- To unsubscribe

Re: [PATCH v2 1/1] x86: Add Isolated Memory Regions for Quark X1000

2015-01-22 Thread Thomas Gleixner
On Wed, 21 Jan 2015, Bryan O'Donoghue wrote: arch/x86/Kconfig | 25 ++ arch/x86/Kconfig.debug | 13 + arch/x86/include/asm/imr.h | 60 arch/x86/kernel/Makefile | 1 + arch/x86/kernel/imr.c | 681 + Can we please

Re: [patch 01/23] x86/apic: Avoid open coded x2apic detection

2015-01-22 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Borislav Petkov wrote: On Thu, Jan 15, 2015 at 09:22:09PM -, Thomas Gleixner wrote: enable_IR_x2apic() grew a open coded x2apic detection. Implement a proper helper function which shares the code with the already existing x2apic_enabled(). Signed-off-by: Thomas

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: On Mon, 26 Jan 2015, Li, Aubrey wrote: On 2015/1/22 18:15, Thomas Gleixner wrote: Can we please stop adding more crap to that notifier thing? I rather see that go away than

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: The only remaining issue might be a NMI calling into ktime_get_mono_fast_ns() before timekeeping is resumed. Its probably a non issue on x86/tsc, but it might be a problem on other

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: On Monday, January 26, 2015 03:24:27 PM Thomas Gleixner wrote: On Mon, 26 Jan 2015, Rafael J. Wysocki wrote: On Monday, January 26, 2015 10:40:24 AM Thomas Gleixner wrote: The only remaining issue might be a NMI calling

Re: [PATCH 1/2] posix-timers: Prevents overrun counter overflow

2015-01-24 Thread Thomas Gleixner
On Fri, 23 Jan 2015, Daniel Church wrote: + overruns = (unsigned int) hrtimer_forward(timer, + timer-base-get_time(), + timr-it.real.interval); + if (overruns = delaytimer_max || + (timr-it_overrun = 0

Re: [PATCH v4] irqchip: gic: Allow interrupt level to be set for PPIs.

2015-01-24 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Marc Zyngier wrote: On Tue, Jan 20 2015 at 4:52:59 pm GMT, Liviu Dudau liviu.du...@arm.com wrote: During a recent cleanup of the arm64 DTs it has become clear that the handling of PPIs in _set_type() is incorrect. The ARM TRMs for GICv2 and later allow for

Re: futex(2) man page update help request

2015-01-24 Thread Thomas Gleixner
On Sat, 24 Jan 2015, Torvald Riegel wrote: On Sat, 2015-01-24 at 11:05 +0100, Thomas Gleixner wrote: On Fri, 23 Jan 2015, Torvald Riegel wrote: On Fri, 2015-01-16 at 16:46 -0800, Darren Hart wrote: On 1/16/15, 12:54 PM, Michael Kerrisk (man-pages) mtk.manpa...@gmail.com wrote

Re: [PATCH 3/5] ARM: sa1100: use ioremapped memory to access SC registers

2015-01-24 Thread Thomas Gleixner
On Sat, 24 Jan 2015, Dmitry Eremin-Solenikov wrote: 2015-01-24 20:48 GMT+03:00 Thomas Gleixner t...@linutronix.de: On Thu, 15 Jan 2015, Dmitry Eremin-Solenikov wrote: static void sa1100_mask_irq(struct irq_data *d) { - ICMR = ~BIT(d-hwirq); + u32 reg; + unsigned long

Re: [PATCH v4 2/4] irqchip: mtk-sysirq: Get irq number from register resource size

2015-01-24 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Matthias Brugger wrote: 2015-01-13 14:12 GMT+01:00 Matthias Brugger matthias@gmail.com: 2015-01-12 10:14 GMT+01:00 Eddie Huang eddie.hu...@mediatek.com: From: Yingjoe Chen yingjoe.c...@mediatek.com Originally mtk-sysirq hardcoded supported irq number to 224. This

Re: [PATCH 3/5] ARM: sa1100: use ioremapped memory to access SC registers

2015-01-24 Thread Thomas Gleixner
On Thu, 15 Jan 2015, Dmitry Eremin-Solenikov wrote: static void sa1100_mask_irq(struct irq_data *d) { - ICMR = ~BIT(d-hwirq); + u32 reg; + unsigned long flags; + + raw_spin_lock_irqsave(lock, flags); What's the exact point of that lock? And how is it related to the

Re: [Resend Patch v4 00/16] Kill SMP single function call interrupt

2015-01-24 Thread Thomas Gleixner
On Fri, 23 Jan 2015, Jiang Liu wrote: 38 files changed, 65 insertions(+), 268 deletions(-) Nice cleanup. If nobody yells, I'm going to route it through tip. Thanks, tglx -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

Re: [PATCH 3.19-rc2 v15 4/8] sched_clock: Avoid deadlock during read from NMI

2015-01-24 Thread Thomas Gleixner
On Fri, 23 Jan 2015, Daniel Thompson wrote: This patch fixes that problem by providing banked clock data in a similar manner to Thomas Gleixner's 4396e058c52e(timekeeping: Provide fast and NMI safe access to CLOCK_MONOTONIC). By some definition of similar. -struct clock_data { - ktime_t

Re: [PATCH v3 0/5] ARM: at91: fix irq_pm_install_action WARNING

2015-01-24 Thread Thomas Gleixner
On Fri, 23 Jan 2015, Boris Brezillon wrote: - change the compatible string to clearly show that this chip is purely virtual So we probably want to do : s/dumb/virt/ for both DT and code to make it clear from the names as well. Thanks, tglx -- To unsubscribe from this list: send

Re: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-24 Thread Thomas Gleixner
On Sat, 24 Jan 2015, Xunlei Pang wrote: Before this, I tried to add some code to catch such problem at the time of registering the clocksource, like using the CLOCKSOURCE_MASK(), for example 64bit counter will never wrap for us. But there may be other values like CLOCKSOURCE_MASK(56), I just

Re: [PATCH v2 2/2] posix-timers: Exposes DELAYTIMER_MAX constant used to govern overruns

2015-01-24 Thread Thomas Gleixner
On Sat, 24 Jan 2015, Daniel Church wrote: POSIX.1-2001 specification of timer_getoverrun() supports constant DELAYTIMER_MAX which prevents overflow and caps overrun count. Exposes delaytimer_max value to userland via /proc/sys/kernel/delaytimer_max such I know that you try to match the posix

Re: [PATCH v4 0/4] Add basic support for Mediatek MT8173 SoC

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Matthias Brugger wrote: Applied to v3.20-next/arm64. Yingjoe Chen (1): irqchip: mtk-sysirq: Get irq number from register resource size I just queued that irqchip patch in irq/core -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the

[patch 15/23] x86/ioapic: Add proper checks to setp/enable_IO_APIC()

2015-01-15 Thread Thomas Gleixner
No point to have the same checks at every call site. Add them to the functions, so they can be called unconditionally. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/io_apic.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) Index: tip/arch/x86

[patch 13/23] x86/smpboot: Move smpboot inlines to code

2015-01-15 Thread Thomas Gleixner
No point for a seperate header file. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm/smpboot_hooks.h | 68 --- arch/x86/kernel/smpboot.c| 67 +- 2 files changed, 66 insertions(+), 69

[patch 16/23] x86/apic: Sanitize ioapic handling

2015-01-15 Thread Thomas Gleixner
We have proper stubs for the IOAPIC=n case and the setup/enable function have the required checks inside now. Remove the ifdeffery and the copypasted conditionals. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c | 17 +++-- 1 file changed, 3

[patch 12/23] x86/x2apic: Use state information for disable

2015-01-15 Thread Thomas Gleixner
Use the state information to simplify the disable logic further. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) Index: tip/arch/x86/kernel/apic/apic.c

[patch 14/23] x86/ioapic: Provide stub functions for IOAPIC=n

2015-01-15 Thread Thomas Gleixner
To avoid lots of ifdeffery provide proper stubs for setup_IO_APIC(), enable_IO_APIC() and setup_ioapic_dest(). Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm/io_apic.h |5 + 1 file changed, 5 insertions(+) Index: tip/arch/x86/include/asm/io_apic.h

[patch 10/23] x86/x2apic: Disable x2apic from nox2apic setup

2015-01-15 Thread Thomas Gleixner
There is no point in postponing the hardware disablement of x2apic. It can be disabled right away in the nox2apic setup function. Disable it right away and set the state to DISABLED . This allows to remove all the nox2apic conditionals all over the place. Signed-off-by: Thomas Gleixner t

[patch 09/23] x86/x2apic: Add proper state tracking

2015-01-15 Thread Thomas Gleixner
for a state value instead of treating it as boolean. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) Index: tip/arch/x86/kernel/apic/apic.c

[patch 07/23] x86/x2apic: Move code in conditional region

2015-01-15 Thread Thomas Gleixner
No point in having try_to_enable_x2apic() outside of the CONFIG_X86_X2APIC section and having inline functions and more ifdefs to deal with it. Move the code into the existing ifdef section and remove the inline cruft. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm

[patch 08/23] x86/x2apic: Clarify remapping mode for x2apic enablement

2015-01-15 Thread Thomas Gleixner
Rename the argument of try_to_enable_x2apic() so the purpose becomes more clear. Make the pr_warning more consistent and avoid the double print of disabling. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c |8 1 file changed, 4 insertions(+), 4

[patch 05/23] x86/apic: Make disable x2apic work really

2015-01-15 Thread Thomas Gleixner
If x2apic_preenabled is not enabled, then disable_x2apic() is not called from various places which results in x2apic_disabled not being set. So other code pathes can happily reenable the x2apic. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c | 14

[patch 03/23] x86/apic: Move x2apic code to one place

2015-01-15 Thread Thomas Gleixner
Having several disjunct pieces of code for x2apic support makes reading the code unnecessarily hard. Move it to one ifdeffed section. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c | 58 +--- 1 file changed, 28

Re: [RFC Patch 16/19] ACPI: Introduce helper function acpi_dev_filter_resource_type()

2015-01-15 Thread Thomas Gleixner
On Thu, 8 Jan 2015, Jiang Liu wrote: Introduce helper function acpi_dev_filter_resource_type(), which may be used by acpi_dev_get_resources() to filer out resource based on resource type. Signed-off-by: Jiang Liu jiang@linux.intel.com --- drivers/acpi/resource.c | 54

[patch 06/23] x86/apic: Check x2apic early

2015-01-15 Thread Thomas Gleixner
No point in delaying the x2apic detection for the CONFIG_X86_X2APIC=n case to enable_IR_x2apic(). We rather detect that in the early boot code in check_x2apic(). Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm/apic.h |6 ++ arch/x86/kernel/apic/apic.c | 33

[patch 11/23] x86/x2apic: Split enable and setup function

2015-01-15 Thread Thomas Gleixner
-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm/apic.h |4 +-- arch/x86/kernel/apic/apic.c | 55 +-- arch/x86/kernel/cpu/common.c |2 - 3 files changed, 36 insertions(+), 25 deletions(-) Index: tip/arch/x86/include/asm/apic.h

[patch 19/23] init: Get rid of x86isms

2015-01-15 Thread Thomas Gleixner
The UP local API support can be set up from an early initcall. No need for horrible hackery in the init code. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c |3 +++ init/main.c | 14 +- 2 files changed, 4 insertions(+), 13

[patch 00/23] x86: Cleanup apic/ioapic/x2apic setup code

2015-01-15 Thread Thomas Gleixner
While reviewing Jiangs interrupt remapping patch set, I had several serious WTF moments when trying to understand what that code is doing. The main issues I've seen are: - Blindly copy and pasted code - Random places which initialize bits and pieces - Code which got mindlessly

Re: futex(2) man page update help request

2015-01-15 Thread Thomas Gleixner
On Thu, 15 Jan 2015, Michael Kerrisk (man-pages) wrote: [EINVAL] uaddr equal uaddr2. Requeue to same futex. ??? I added this, but does this error not occur only for PI requeues? It's equally wrong for normal futexes. And its actually the same code checking for this for all variants.

Re: [PATCH 0/2] clockevents: introduce -set_dev_mode() and convert a few drivers

2015-01-15 Thread Thomas Gleixner
On Thu, 15 Jan 2015, Kevin Hilman wrote: Thomas, Gentle reminder ping... Crap. I knew that some stuff on that todo list which I deleted will haunt me. Thanks for the reminder. tglx -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

Re: Proposal about reorganize struct irq_data and struct irq_desc

2015-01-20 Thread Thomas Gleixner
On Mon, 19 Jan 2015, Jiang Liu wrote: Hi Thomas and Marc, During working on the generic MSI support, I have some proposal about reorganizing struct irq_data and struct irq_desc. The proposed changes are: 1) Add a pointer struct irq_desc * to struct irq_data, so we could quickly get

Re: [PATCH v2 1/5] irqchip: add dumb demultiplexer implementation

2015-01-20 Thread Thomas Gleixner
On Thu, 15 Jan 2015, Rob Herring wrote: On Thu, Jan 15, 2015 at 3:11 AM, Thomas Gleixner t...@linutronix.de wrote: On Wed, 14 Jan 2015, Rob Herring wrote: We do not change shared interrupts in any way. We provide an alternative mechanism for braindead hardware. And if the at91 folks

Re: [PATCH V2] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-20 Thread Thomas Gleixner
On Tue, 20 Jan 2015, Preeti U Murthy wrote: --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -675,8 +675,8 @@ static void broadcast_move_bc(int deadcpu) if (!bc || !broadcast_needs_cpu(bc, deadcpu)) return; - /* This moves the broadcast

Re: [PATCH v2 1/2] clocksource: track usage

2015-01-20 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Alexandre Belloni wrote: diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index abcafaa20b86..7735902fc5f6 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -210,6 +210,8 @@ struct clocksource { #define

Re: [PATCH v2 2/2] clocksource: don't suspend/resume when unused

2015-01-20 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Alexandre Belloni wrote: There is no point in calling suspend/resume for unused clocksources. That's true, but Signed-off-by: Alexandre Belloni alexandre.bell...@free-electrons.com --- kernel/time/clocksource.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH] idle/tick-broadcast: Exit cpu idle poll loop when cleared from tick_broadcast_force_mask

2015-01-20 Thread Thomas Gleixner
On Mon, 19 Jan 2015, Preeti U Murthy wrote: An idle cpu enters cpu_idle_poll() if it is set in the tick_broadcast_force_mask. This is so that it does not incur the overhead of entering idle states when it is expected to be woken up anytime then through a broadcast IPI. The condition that

Re: [PATCH 0/2] x86: earlyprintk cleanup

2015-01-20 Thread Thomas Gleixner
On Mon, 19 Jan 2015, Alexander Kuleshov wrote: The following two patches remove unused macro definitions from early_serial_console and early_printk x86 code. Sigh. These mechanical 'follow the output of some code analyzer' changes are really horrible. Why not doing the obvious: Move the

Re: [GIT PULL] x86 cleanups for 3.20

2015-01-20 Thread Thomas Gleixner
On Tue, 13 Jan 2015, Borislav Petkov wrote: Hi guys, here just a bunch of minor cleanups for 3.20. Please pull, thanks. --- The following changes since commit b1940cd21c0f4abdce101253e860feff547291b0: Linux 3.19-rc3 (2015-01-05 17:05:20 -0800) are available in the git

Re: [PATCH 3.19 v4 1/2] x86, mpx: Short-circuit the instruction decoder for unexpected opcodes

2015-01-20 Thread Thomas Gleixner
On Tue, 13 Jan 2015, Andy Lutomirski wrote: This reduces the degree to which we're exposing the instruction decoder to malicious user code at very little complexity cost. Signed-off-by: Andy Lutomirski l...@amacapital.net --- arch/x86/mm/mpx.c | 25 - 1 file

Re: [PATCH 0/2] x86: earlyprintk cleanup

2015-01-20 Thread Thomas Gleixner
On Tue, 20 Jan 2015, Alexander Kuleshov wrote: 2015-01-20 16:29 GMT+06:00 Thomas Gleixner t...@linutronix.de: On Mon, 19 Jan 2015, Alexander Kuleshov wrote: The following two patches remove unused macro definitions from early_serial_console and early_printk x86 code. Sigh

Re: [PATCH] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU

2015-01-20 Thread Thomas Gleixner
On Tue, 13 Jan 2015, Calvin Owens wrote: While debugging an issue with excessive softirq usage, I encountered the following note in commit 3e339b5dae24a706 (softirq: Use hotplug thread infrastructure): [ paulmck: Call rcu_note_context_switch() with interrupts enabled. ] ...but

Re: [PATCH v3] hrtimers: calculate expires_next after all timers are executed

2015-01-20 Thread Thomas Gleixner
: Thomas Gleixner t...@linutronix.de Date: Tue, 20 Jan 2015 21:24:10 +0100 hrtimer_interrupt() has the following subtle issue: hrtimer_interrupt() lock(cpu_base); expires_next = KTIME_MAX; expire_timers(CLOCK_MONOTONIC); expires = get_next_timer(CLOCK_MONOTONIC); if (expires

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-22 Thread Thomas Gleixner
On Tue, 9 Dec 2014, Li, Aubrey wrote: diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 2e4cb67..d118e0b 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h @@ -18,6 +18,9 @@ enum clock_event_nofitiers { CLOCK_EVT_NOTIFY_BROADCAST_EXIT,

Re: [PATCH] treewide: Convert clockevents_notify to use int cpu

2015-01-22 Thread Thomas Gleixner
On Wed, 10 Dec 2014, Joe Perches wrote: As far as I can tell, there's no value indirecting the cpu passed to this function via a void *. Update all the callers and called functions from within clockevents_notify. Aside of that there is no value for this 'notification' function at all. This

Re: futex(2) man page update help request

2015-01-19 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Darren Hart wrote: On 1/16/15, 12:54 PM, Michael Kerrisk (man-pages) mtk.manpa...@gmail.com wrote: On 01/16/2015 04:20 PM, Thomas Gleixner wrote: On Fri, 16 Jan 2015, Michael Kerrisk (man-pages) wrote: Hello Thomas, On 01/15/2015 11:23 PM, Thomas Gleixner wrote

[patch 20/23] x86/smpboot: Move apic init code to apic.c

2015-01-15 Thread Thomas Gleixner
We better provide proper functions which implement the required code flow in the apic code rather than letting the smpboot code open code it. That allows to make more functions static and confines the APIC functionality to apic.c where it belongs. Signed-off-by: Thomas Gleixner t...@linutronix.de

[patch 17/23] x86/smpboot: Cleanup ioapic handling

2015-01-15 Thread Thomas Gleixner
of that it has the same ifdef mess and conditionals around the ioapic related code, which can now be removed. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/smpboot.c | 48 ++ 1 file changed, 7 insertions(+), 41 deletions(-) Index

[patch 18/23] x86/apic: Move apic_init_uniprocessor code

2015-01-15 Thread Thomas Gleixner
Move the code to a different place so we can make other functions inline. Preparatory patch for further cleanups. No change. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c | 125 +--- 1 file changed, 62 insertions(+), 63

[patch 23/23] x86: Consolidate boot cpu timer setup

2015-01-15 Thread Thomas Gleixner
Now that the APIC bringup is consolidated we can move the setup call for the percpu clock event device to apic_bsp_setup(). Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/apic/apic.c |4 ++-- arch/x86/kernel/smpboot.c |4 2 files changed, 2 insertions(+), 6

[patch 22/23] x86/apic: Reuse apic_bsp_setup() for UP APIC setup

2015-01-15 Thread Thomas Gleixner
Extend apic_bsp_setup() so the same code flow can be used for APIC_init_uniprocessor(). Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm/apic.h |2 - arch/x86/kernel/apic/apic.c | 54 ++-- arch/x86/kernel/smpboot.c |4

[patch 21/23] x86/smpboot: Sanitize uniprocessor init

2015-01-15 Thread Thomas Gleixner
The UP related setups for local apic are mangled into smp_sanity_check(). That results in duplicate calls to disable_smp() and makes the code hard to follow. Let smp_sanity_check() return dedicated values for the various exit reasons and handle them at the call site. Signed-off-by: Thomas

[patch 01/23] x86/apic: Avoid open coded x2apic detection

2015-01-15 Thread Thomas Gleixner
enable_IR_x2apic() grew a open coded x2apic detection. Implement a proper helper function which shares the code with the already existing x2apic_enabled(). Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm/apic.h | 18 +- arch/x86/kernel/apic/apic.c

[patch 02/23] x86/apic: Make x2apic_mode depend on CONFIG_X86_X2APIC

2015-01-15 Thread Thomas Gleixner
No point in having a static variable around which is always 0. Let the compiler optimize code out if disabled. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm/apic.h |8 arch/x86/kernel/apic/apic.c |2 +- 2 files changed, 5 insertions(+), 5 deletions

[patch 04/23] x86/ioapic: Check x2apic really

2015-01-15 Thread Thomas Gleixner
The x2apic_preenabled flag is just a horrible hack and if X2APIC support is disabled it does not reflect the actual hardware state. Check the hardware instead. Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/include/asm/apic.h|2 -- arch/x86/kernel/apic/apic.c|4

Re: [patch 00/23] x86: Cleanup apic/ioapic/x2apic setup code

2015-01-16 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Jiang Liu wrote: On 2015/1/16 5:22, Thomas Gleixner wrote: While reviewing Jiangs interrupt remapping patch set, I had several serious WTF moments when trying to understand what that code is doing. The main issues I've seen are: - Blindly copy and pasted

Re: [RFC 2/2] clocksource: don't suspend/resume when unused

2015-01-16 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Alexandre Belloni wrote: There is no point in calling suspend/resume for unused clocksources. Signed-off-by: Alexandre Belloni alexandre.bell...@free-electrons.com --- kernel/time/clocksource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [patch 00/23] x86: Cleanup apic/ioapic/x2apic setup code

2015-01-16 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Thomas Gleixner wrote: On Fri, 16 Jan 2015, Jiang Liu wrote: 5) x86_32, UP, IO_APIC disabled 5.1) boot: panic with following call stack: do_ono_initcall()-APIC_init_uniprocessor()-setup_local_APIC(). I can't capture the full log message due to lack of serial console

Re: futex(2) man page update help request

2015-01-16 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Michael Kerrisk (man-pages) wrote: Hello Thomas, On 01/15/2015 11:23 PM, Thomas Gleixner wrote: On Thu, 15 Jan 2015, Michael Kerrisk (man-pages) wrote: [EINVAL] uaddr equal uaddr2. Requeue to same futex. ??? I added this, but does this error not occur only for PI

Re: [PATCH v2 1/5] irqchip: add dumb demultiplexer implementation

2015-01-15 Thread Thomas Gleixner
On Wed, 14 Jan 2015, Rob Herring wrote: On Wed, Jan 14, 2015 at 4:36 AM, Thomas Gleixner t...@linutronix.de wrote: All attempts to work around that have resulted in horrible bandaids so far. That's why I guided Boris to implement this dummy demultiplexing mechanism. It solves the problem

Re: [Patch v2 07/16] x86/apic: Refine enable_IR_x2apic() and related functions

2015-01-15 Thread Thomas Gleixner
On Wed, 7 Jan 2015, Jiang Liu wrote: Refine enable_IR_x2apic() and related functions for better readability. It also changes the way to handle IR in XAPIC mode when enabling X2APIC. Previously it just skips X2APIC initialization without checking max CPU APIC ID in system, which may cause

RE: [RFC Patch 05/19] ACPI: Provide union for address_space64 and ext_address_space64

2015-01-22 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Zheng, Lv wrote: If we can reach an agreement on the linuxized version, then it can be merged directly by Rafael. And I'll zap it from the ACPICA release series. Fine with me. Thanks, tglx -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU

2015-01-22 Thread Thomas Gleixner
On Wed, 21 Jan 2015, Paul E. McKenney wrote: On Wed, Jan 21, 2015 at 10:30:07AM +0100, Thomas Gleixner wrote: On Tue, 20 Jan 2015, Paul E. McKenney wrote: On Tue, Jan 20, 2015 at 02:21:51PM +0100, Thomas Gleixner wrote: The whole rcu_note_context_switch() in run_ksoftirqd() is silly

RE: [PATCH v3] hrtimers: calculate expires_next after all timers are executed

2015-01-22 Thread Thomas Gleixner
On Wed, 21 Jan 2015, vigne...@codeaurora.org wrote: Hi Thomas, In this patch, we are only setting the flag cpu_base-in_hrtirq = 1; in hrtimer_interrupt() and not resetting it. @@ -1251,9 +1251,9 @@ void hrtimer_interrupt(struct clock_even dev-next_event.tv64 = KTIME_MAX;

Re: [PATCH V6 01/18] x86: Make page cache mode a real type

2015-01-22 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Juergen Gross wrote: On 01/22/2015 08:11 AM, Steven Noonan wrote: I notice these two symbols are exported GPL-only. This breaks builds of several out-of-tree non-GPL modules such as the NVIDIA driver, and VMware modules, etc. What is the appropriate code path for

Re: [patch 11/23] x86/x2apic: Split enable and setup function

2015-01-22 Thread Thomas Gleixner
On Fri, 16 Jan 2015, Borislav Petkov wrote: On Thu, Jan 15, 2015 at 09:22:26PM -, Thomas Gleixner wrote: +/* Called from cpu_init() to enable x2apic on (secondary) cpus */ +void x2apic_setup(void) +{ + /* +* If x2apic is not in ON state, disable it if already enabled

Re: [PATCH v7 0/7] Support Write-Through mapping on x86

2015-01-22 Thread Thomas Gleixner
On Thu, 15 Jan 2015, Toshi Kani wrote: Hi Ingo, Peter, Thomas, Is there anything else I need to do for accepting this patchset? You might hand me some spare time for reviewing it :) It's on my list. Thanks, tglx -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32

2015-01-22 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Bryan O'Donoghue wrote: Commit 0dbc6078c0 ('x86, build, pci: Fix PCI_MSI build on !SMP') introduced the dependency that X86_UP_APIC should only be visible only when PCI_MSI is false. I think the intention of the patch was to NOT expose the option when MSI is enabled, so

Re: [PATCH v2 0/8] CR4 handling improvements

2015-01-22 Thread Thomas Gleixner
On Tue, 13 Jan 2015, Andy Lutomirski wrote: On Fri, Oct 31, 2014 at 8:09 AM, Peter Zijlstra pet...@infradead.org wrote: This looks ok I suppose, although the x86 people should pass verdict on the first few patches. Hi all- What's the status of this series? I've reviewed the x86

Re: [PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-21 Thread Thomas Gleixner
On Tue, 20 Jan 2015, Preeti U Murthy wrote: diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 5544990..f3907c9 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -568,6 +568,7 @@ int clockevents_notify(unsigned long reason, void *arg)

Re: [PATCH 1/3] time: Don't bother to run rtc_resume() for nonstop clocksource

2015-01-21 Thread Thomas Gleixner
On Tue, 20 Jan 2015, Xunlei Pang wrote: --- drivers/rtc/class.c | 2 +- include/linux/timekeeping.h | 11 +++ kernel/time/timekeeping.c | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index

Re: [RFC Patch 17/19] resources: Move struct resource_list_entry from ACPI into resource core

2015-01-21 Thread Thomas Gleixner
On Wed, 21 Jan 2015, Jiang Liu wrote: On 2015/1/21 9:10, Rafael J. Wysocki wrote: + +void resource_list_insert(struct list_head *head, +struct resource_list_entry *entry, bool tail) I would call this resource_list_add() if anything. Also it may be better to

Re: [patch 00/23] x86: Cleanup apic/ioapic/x2apic setup code

2015-01-21 Thread Thomas Gleixner
On Wed, 21 Jan 2015, Jiang Liu wrote: On 2015/1/16 19:05, Thomas Gleixner wrote: Hi Thomas, With above patch applied, it just gives a blank screen instead of a panic when booting on my problematic laptop. Now I have found the root cause of the failure on my laptop. On i386

Re: [PATCH] idle/tick-broadcast: Exit cpu idle poll loop when cleared from tick_broadcast_force_mask

2015-01-21 Thread Thomas Gleixner
On Tue, 20 Jan 2015, Preeti U Murthy wrote: On 01/20/2015 04:51 PM, Thomas Gleixner wrote: On Mon, 19 Jan 2015, Preeti U Murthy wrote: An idle cpu enters cpu_idle_poll() if it is set in the tick_broadcast_force_mask. This is so that it does not incur the overhead of entering idle states

Re: [PATCH] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU

2015-01-21 Thread Thomas Gleixner
On Tue, 20 Jan 2015, Paul E. McKenney wrote: On Tue, Jan 20, 2015 at 02:21:51PM +0100, Thomas Gleixner wrote: The whole rcu_note_context_switch() in run_ksoftirqd() is silly. cond_resched() __preempt_count_add(PREEMPT_ACTIVE); __schedule(); preempt_disable

Re: [PATCH v2 1/1] x86: Add Isolated Memory Regions for Quark X1000

2015-01-22 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Bryan O'Donoghue wrote: On 22/01/15 15:02, Bryan O'Donoghue wrote: drivers/platform/x86/intel_qrk_imr.c Darren - would that be acceptable to you ? Sorry guys typo - should read arch/x86/platform/imr.c :) Ah Thomas actually if I'm understanding you

Re: [PATCH] hrtimer: add hrtimer_start_now()

2015-01-22 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Olliver Schinagl wrote: On 22-01-15 12:01, Thomas Gleixner wrote: Aside of that, what's wrong with doing: static const ktime_t ktime_zero = { .tv64 = 0 }; hrtimer_start(timer, ktime_zero, HRTIMER_MODE_REL); I guess the same could be said

Re: [PATCH V2] cpuidle: Add missing checks to the exit condition of cpu_idle_poll()

2015-01-22 Thread Thomas Gleixner
of cpu_idle_poll() to avoid this. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Reviewed-by: Thomas Gleixner t...@linutronix.de --- Changes from V1: Modified the Changelog kernel/sched/idle.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sched/idle.c

Re: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-22 Thread Thomas Gleixner
On Thu, 22 Jan 2015, Xunlei Pang wrote: When doing timekeeping_resume(), if the nonstop clocksource wraps back, cycle_delta will miss the wrap time. It's hard to determine the right CLOCKSOURCE_MASK(xxx) or something to add code for inspecting such behavior, and we don't have many existent

Re: [RFC PATCH v2 2/5] irq: Allow interrupts to routed to NMI (or similar)

2015-01-24 Thread Thomas Gleixner
On Wed, 21 Jan 2015, Daniel Thompson wrote: @@ -307,6 +307,7 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) * @irq_eoi: end of interrupt * @irq_set_affinity:set the CPU affinity on SMP machines * @irq_retrigger: resend an IRQ to the CPU + *

Re: [PATCH V4 01/14] sh: Eliminate unused irq_reg_{readl,writel} accessors

2015-01-24 Thread Thomas Gleixner
On Mon, 19 Jan 2015, Geert Uytterhoeven wrote: Will you still do so, or shall I forward the patch to Andrew Morton? akpm please. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v2 1/2] posix-timers: Prevents overrun counter overflow

2015-01-24 Thread Thomas Gleixner
On Sat, 24 Jan 2015, Daniel Church wrote: +/* + * Updates a timer's overrun count while capping it to delaytimer_max + */ +static void posix_timer_update_overrun_count(struct k_itimer *timer, + unsigned int overruns) +{ + const bool

Re: [PATCH RESEND] PM / sleep: Fix racing timers

2015-01-24 Thread Thomas Gleixner
On Fri, 23 Jan 2015, Sören Brinkmann wrote: On Mon, 2015-01-12 at 04:14PM +, Lorenzo Pieralisi wrote: I thought that a shutdown clock event device explicitly disables IRQ assertion, that's why I am inquiring, I do not understand how this can happen - how can you have a pending timer IRQ

Re: [PATCH RESEND v3 0/3] irqchip: vf610-mscm: add support for MSCM interrupt router

2015-01-26 Thread Thomas Gleixner
On Thu, 15 Jan 2015, Stefan Agner wrote: Splitted out version of the MSCM driver. My first driver based on the routeable domain support and was part of the Vybrid Cortex-M4 support patchset. So far the MSCM interrupt router was initialized by the boot loader and configured all interrupts

Re: [PATCH v3]PM/Sleep: Timer quiesce in freeze state

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Li, Aubrey wrote: On 2015/1/22 18:15, Thomas Gleixner wrote: Can we please stop adding more crap to that notifier thing? I rather see that go away than being expanded. Are you referring to FREEZE_PREPARE or remove all of FREEZE staff at all? What's the disadvantage

Re: [PATCH V2] clockevents: rockchip: Add rockchip timer for rk3288

2015-01-26 Thread Thomas Gleixner
On Sun, 25 Jan 2015, Daniel Lezcano wrote: +static inline void rk_timer_set_mode(enum clock_event_mode mode, + struct clock_event_device *ce) +{ + switch (mode) { + case CLOCK_EVT_MODE_PERIODIC: + rk_timer_disable(ce); +

[GIT pull] irq fixes for 3.19

2015-01-25 Thread Thomas Gleixner
Linus, please pull the latest irq-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-for-linus From the irqchip departement you get: - Regression fix for omap-intc - Regression fix for atmel-aic-common - Functional correctness fix for

Re: [PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2015-01-25 Thread Thomas Gleixner
case CLOCK_EVT_MODE_RESUME: return dev-setup_resume(dev); Because setting to all these existing modes isn't allowed to fail currently, shouldn't we make return type of all the new callbacks as 'void' and return 0 from this routine ? That way, these callbacks would

[GIT pull] timer fixes for 3.19

2015-01-25 Thread Thomas Gleixner
Linus, please pull the latest timers-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus A set of small fixes: - Regression fix for exynos_mct clocksource - Trivial build fix for kona clocksource - Functional one liner fix

[GIT pull] x86 fixes for 3.19

2015-01-25 Thread Thomas Gleixner
Linus, please pull the latest x86-urgent-for-linus git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus Hopefully the last round of fixes for 3.19 - Regression fix for the LDT changes - Regression fix for XEN interrupt handling caused by the APIC

Re: [PATCH v4 2/2] clocksource: driver for Conexant Digicolor SoC timer

2015-01-26 Thread Thomas Gleixner
On Mon, 26 Jan 2015, Baruch Siach wrote: Hi Daniel, On Mon, Jan 26, 2015 at 10:43:43AM +0100, Daniel Lezcano wrote: What do you think ? OK. I'll give it a try. Thanks for your prompt response and thorough review. Can you please trim your replies proper? It's annoying to page through

Re: [PATCH RFT] x86: move cacheinfo sysfs to generic cacheinfo infrastructure

2015-01-23 Thread Thomas Gleixner
) The private pointer provided by the cacheinfo is used to implement the AMD L3 cache specific attributes. Signed-off-by: Sudeep Holla sudeep.ho...@arm.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: x...@kernel.org --- arch/x86

Re: [PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2015-01-23 Thread Thomas Gleixner
On Tue, 9 Dec 2014, Kevin Hilman wrote: diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 55449909f114..f7614041240e 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -105,7 +105,16 @@ void clockevents_set_mode(struct clock_event_device *dev,

  1   2   3   4   5   6   7   8   9   10   >