[tip:x86/apic] x86/apic: Update comment about disabling processor focus

2016-08-24 Thread tip-bot for Wei Jiangang
Commit-ID:  5035da41996d346c648a65c1d7a9f6469c7d358a
Gitweb: http://git.kernel.org/tip/5035da41996d346c648a65c1d7a9f6469c7d358a
Author: Wei Jiangang 
AuthorDate: Fri, 19 Aug 2016 11:22:37 +0800
Committer:  Ingo Molnar 
CommitDate: Wed, 24 Aug 2016 11:24:33 +0200

x86/apic: Update comment about disabling processor focus

Fix references to discarded end_level_ioapic_irq().

Signed-off-by: Wei Jiangang 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Cc: b...@suse.de
Link: 
http://lkml.kernel.org/r/1471576957-12961-2-git-send-email-weijg.f...@cn.fujitsu.com
Signed-off-by: Ingo Molnar 
---
 arch/x86/kernel/apic/apic.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 63b7484..1cbae30 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1374,7 +1374,6 @@ void setup_local_APIC(void)
 * Actually disabling the focus CPU check just makes the hang less
 * frequent as it makes the interrupt distributon model be more
 * like LRU than MRU (the short-term load is more even across CPUs).
-* See also the comment in end_level_ioapic_irq().  --macro
 */
 
/*


[tip:x86/apic] x86/smpboot: Check APIC ID before setting up default routing

2016-08-24 Thread tip-bot for Wei Jiangang
Commit-ID:  384d9fe3741657c8ed8cd9bf30bc1d4611864d56
Gitweb: http://git.kernel.org/tip/384d9fe3741657c8ed8cd9bf30bc1d4611864d56
Author: Wei Jiangang 
AuthorDate: Fri, 19 Aug 2016 11:22:36 +0800
Committer:  Ingo Molnar 
CommitDate: Wed, 24 Aug 2016 11:24:33 +0200

x86/smpboot: Check APIC ID before setting up default routing

This is not a bugfix, but code optimization.

If the BSP's APIC ID in local APIC is unexpected,
a kernel panic will occur and the system will halt.
That means no need to enable APIC mode, and no reason
to set up the default routing for APIC.

The combination of default_setup_apic_routing() and
apic_bsp_setup() are used to enable APIC mode.
They two should be kept together, rather than being
separated by the codes of checking APIC ID.
Just like their usage in APIC_init_uniprocessor().

Signed-off-by: Wei Jiangang 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Cc: b...@suse.de
Link: 
http://lkml.kernel.org/r/1471576957-12961-1-git-send-email-weijg.f...@cn.fujitsu.com
Signed-off-by: Ingo Molnar 
---
 arch/x86/kernel/smpboot.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 2a6e84a..8216b99 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1316,14 +1316,13 @@ void __init native_smp_prepare_cpus(unsigned int 
max_cpus)
break;
}
 
-   default_setup_apic_routing();
-
if (read_apic_id() != boot_cpu_physical_apicid) {
panic("Boot APIC ID in local APIC unexpected (%d vs %d)",
 read_apic_id(), boot_cpu_physical_apicid);
/* Or can we switch back to PIC here? */
}
 
+   default_setup_apic_routing();
cpu0_logical_apicid = apic_bsp_setup(false);
 
pr_info("CPU%d: ", 0);


[tip:x86/timers] x86/tsc: Remove the unused check_tsc_disabled()

2016-07-15 Thread tip-bot for Wei Jiangang
Commit-ID:  c48ec42d6eae08f55685ab660f0743ed33b9f22a
Gitweb: http://git.kernel.org/tip/c48ec42d6eae08f55685ab660f0743ed33b9f22a
Author: Wei Jiangang 
AuthorDate: Fri, 15 Jul 2016 16:12:10 +0800
Committer:  Ingo Molnar 
CommitDate: Fri, 15 Jul 2016 10:35:08 +0200

x86/tsc: Remove the unused check_tsc_disabled()

check_tsc_disabled() was introduced by commit:

  c73deb6aecda ("perf/x86: Add ability to calculate TSC from perf sample 
timestamps")

The only caller was arch_perf_update_userpage(), which had been refactored
by commit:

  d8b11a0cbd1c ("perf/x86: Clean up cap_user_time* setting")

... so no need keep and export it any more.

Signed-off-by: Wei Jiangang 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Cc: a.p.zijls...@chello.nl
Cc: adrian.hun...@intel.com
Cc: b...@suse.de
Link: 
http://lkml.kernel.org/r/1468570330-25810-1-git-send-email-weijg.f...@cn.fujitsu.com
Signed-off-by: Ingo Molnar 
---
 arch/x86/include/asm/tsc.h | 1 -
 arch/x86/kernel/tsc.c  | 6 --
 2 files changed, 7 deletions(-)

diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h
index a30591e..33b6365 100644
--- a/arch/x86/include/asm/tsc.h
+++ b/arch/x86/include/asm/tsc.h
@@ -35,7 +35,6 @@ extern void tsc_init(void);
 extern void mark_tsc_unstable(char *reason);
 extern int unsynchronized_tsc(void);
 extern int check_tsc_unstable(void);
-extern int check_tsc_disabled(void);
 extern unsigned long native_calibrate_cpu(void);
 extern unsigned long native_calibrate_tsc(void);
 extern unsigned long long native_sched_clock_from_tsc(u64 tsc);
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 2a952fc..a804b5a 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -335,12 +335,6 @@ int check_tsc_unstable(void)
 }
 EXPORT_SYMBOL_GPL(check_tsc_unstable);
 
-int check_tsc_disabled(void)
-{
-   return tsc_disabled;
-}
-EXPORT_SYMBOL_GPL(check_tsc_disabled);
-
 #ifdef CONFIG_X86_TSC
 int __init notsc_setup(char *str)
 {


[tip:x86/apic] x86/apic: Remove the unused struct apic::apic_id_mask field

2016-07-15 Thread tip-bot for Wei Jiangang
Commit-ID:  102bb9fef68a21f357dc813d4792666c8295bc35
Gitweb: http://git.kernel.org/tip/102bb9fef68a21f357dc813d4792666c8295bc35
Author: Wei Jiangang 
AuthorDate: Thu, 14 Jul 2016 10:24:06 +0800
Committer:  Ingo Molnar 
CommitDate: Fri, 15 Jul 2016 10:39:05 +0200

x86/apic: Remove the unused struct apic::apic_id_mask field

The only user verify_local_APIC() had been removed by commit:

  4399c03c6780 ("x86/apic: Remove verify_local_APIC()")

... so there is no need to keep it.

Signed-off-by: Wei Jiangang 
Cc: Borislav Petkov 
Cc: H. Peter Anvin 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Cc: boris.ostrov...@oracle.com
Cc: b...@redhat.com
Cc: david.vra...@citrix.com
Cc: jgr...@suse.com
Cc: konrad.w...@oracle.com
Cc: xen-de...@lists.xenproject.org
Link: 
http://lkml.kernel.org/r/1468463046-20849-1-git-send-email-weijg.f...@cn.fujitsu.com
Signed-off-by: Ingo Molnar 
---
 arch/x86/include/asm/apic.h   | 1 -
 arch/x86/kernel/apic/apic_flat_64.c   | 2 --
 arch/x86/kernel/apic/apic_noop.c  | 1 -
 arch/x86/kernel/apic/apic_numachip.c  | 2 --
 arch/x86/kernel/apic/bigsmp_32.c  | 1 -
 arch/x86/kernel/apic/probe_32.c   | 1 -
 arch/x86/kernel/apic/x2apic_cluster.c | 1 -
 arch/x86/kernel/apic/x2apic_phys.c| 1 -
 arch/x86/kernel/apic/x2apic_uv_x.c| 1 -
 arch/x86/xen/apic.c   | 1 -
 10 files changed, 12 deletions(-)

diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index bc27611..f5befd4 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -300,7 +300,6 @@ struct apic {
 
unsigned int (*get_apic_id)(unsigned long x);
unsigned long (*set_apic_id)(unsigned int id);
-   unsigned long apic_id_mask;
 
int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask,
  const struct cpumask *andmask,
diff --git a/arch/x86/kernel/apic/apic_flat_64.c 
b/arch/x86/kernel/apic/apic_flat_64.c
index 76f89e2..0487477 100644
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -181,7 +181,6 @@ static struct apic apic_flat =  {
 
.get_apic_id= flat_get_apic_id,
.set_apic_id= set_apic_id,
-   .apic_id_mask   = 0xFFu << 24,
 
.cpu_mask_to_apicid_and = flat_cpu_mask_to_apicid_and,
 
@@ -278,7 +277,6 @@ static struct apic apic_physflat =  {
 
.get_apic_id= flat_get_apic_id,
.set_apic_id= set_apic_id,
-   .apic_id_mask   = 0xFFu << 24,
 
.cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and,
 
diff --git a/arch/x86/kernel/apic/apic_noop.c b/arch/x86/kernel/apic/apic_noop.c
index 13d19ed..2cebf59 100644
--- a/arch/x86/kernel/apic/apic_noop.c
+++ b/arch/x86/kernel/apic/apic_noop.c
@@ -141,7 +141,6 @@ struct apic apic_noop = {
 
.get_apic_id= noop_get_apic_id,
.set_apic_id= NULL,
-   .apic_id_mask   = 0x0F << 24,
 
.cpu_mask_to_apicid_and = flat_cpu_mask_to_apicid_and,
 
diff --git a/arch/x86/kernel/apic/apic_numachip.c 
b/arch/x86/kernel/apic/apic_numachip.c
index ab5c2c6..714d4fd 100644
--- a/arch/x86/kernel/apic/apic_numachip.c
+++ b/arch/x86/kernel/apic/apic_numachip.c
@@ -269,7 +269,6 @@ static const struct apic apic_numachip1 __refconst = {
 
.get_apic_id= numachip1_get_apic_id,
.set_apic_id= numachip1_set_apic_id,
-   .apic_id_mask   = 0xffU << 24,
 
.cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and,
 
@@ -321,7 +320,6 @@ static const struct apic apic_numachip2 __refconst = {
 
.get_apic_id= numachip2_get_apic_id,
.set_apic_id= numachip2_set_apic_id,
-   .apic_id_mask   = 0xffU << 24,
 
.cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and,
 
diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c
index cf9bd89..06dbaa4 100644
--- a/arch/x86/kernel/apic/bigsmp_32.c
+++ b/arch/x86/kernel/apic/bigsmp_32.c
@@ -171,7 +171,6 @@ static struct apic apic_bigsmp = {
 
.get_apic_id= bigsmp_get_apic_id,
.set_apic_id= NULL,
-   .apic_id_mask   = 0xFF << 24,
 
.cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and,
 
diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c
index f316e34..93edfa0 100644
--- a/arch/x86/kernel/apic/probe_32.c
+++ b/arch/x86/kernel/apic/probe_32.c
@@ -101,7 +101,6 @@ static struct apic apic_default = {
 
.get_apic_id= default_get_apic_id,
.set_apic_id= NULL,
-   .apic_id_mask   = 0x0F << 24,
 
.cpu_mask_to_apicid_and = flat

[tip:timers/core] timers/nohz: Fix several typos

2016-07-01 Thread tip-bot for Wei Jiangang
Commit-ID:  6168f8ed01dc46a277908938294f1132d723f58d
Gitweb: http://git.kernel.org/tip/6168f8ed01dc46a277908938294f1132d723f58d
Author: Wei Jiangang 
AuthorDate: Wed, 29 Jun 2016 12:51:50 +0800
Committer:  Ingo Molnar 
CommitDate: Fri, 1 Jul 2016 12:39:22 +0200

timers/nohz: Fix several typos

Signed-off-by: Wei Jiangang 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Cc: fenghua...@intel.com
Link: 
http://lkml.kernel.org/r/1467175910-2966-2-git-send-email-weijg.f...@cn.fujitsu.com
Signed-off-by: Ingo Molnar 
---
 kernel/time/tick-sched.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 536ada8..6d83e9c 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -61,7 +61,7 @@ static void tick_do_update_jiffies64(ktime_t now)
if (delta.tv64 < tick_period.tv64)
return;
 
-   /* Reevalute with jiffies_lock held */
+   /* Reevaluate with jiffies_lock held */
write_seqlock(&jiffies_lock);
 
delta = ktime_sub(now, last_jiffies_update);
@@ -117,7 +117,7 @@ static void tick_sched_do_timer(ktime_t now)
/*
 * Check if the do_timer duty was dropped. We don't care about
 * concurrency: This happens only when the cpu in charge went
-* into a long sleep. If two cpus happen to assign themself to
+* into a long sleep. If two cpus happen to assign themselves to
 * this duty, then the jiffies update is still serialized by
 * jiffies_lock.
 */
@@ -571,7 +571,7 @@ static ktime_t tick_nohz_start_idle(struct tick_sched *ts)
  * @last_update_time: variable to store update time in. Do not update
  * counters if NULL.
  *
- * Return the cummulative idle time (since boot) for a given
+ * Return the cumulative idle time (since boot) for a given
  * CPU, in microseconds.
  *
  * This time is measured via accounting rather than sampling,
@@ -612,7 +612,7 @@ EXPORT_SYMBOL_GPL(get_cpu_idle_time_us);
  * @last_update_time: variable to store update time in. Do not update
  * counters if NULL.
  *
- * Return the cummulative iowait time (since boot) for a given
+ * Return the cumulative iowait time (since boot) for a given
  * CPU, in microseconds.
  *
  * This time is measured via accounting rather than sampling,
@@ -733,7 +733,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched 
*ts,
 * do_timer() never invoked. Keep track of the fact that it
 * was the one which had the do_timer() duty last. If this cpu
 * is the one which had the do_timer() duty last, we limit the
-* sleep time to the timekeeping max_deferement value.
+* sleep time to the timekeeping max_deferment value.
 * Otherwise we can sleep as long as we want.
 */
delta = timekeeping_max_deferment();