Skip to contentSkip to conversation

x86/platform changes for v3.14

GIT PULL Ingo Molnar 1 participant 1 message Jan 20, 2014 x86

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-platform-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-platform-for-linus

# HEAD: ca1e631c3acf80bc5f5934ce9054a9b4880c96e1 x86, tsc, apic: Unbreak static (MSR) calibration when CONFIG_X86_LOCAL_APIC=n

Improved Intel SoC platform support.

Thanks,

Ingo

------------------>
Bin Gao (1):
x86, tsc: Add static (MSR) TSC calibration on Intel Atom SoCs

David E. Box (1):
arch: x86: New MailBox support driver for Intel SOC's

H. Peter Anvin (1):
x86, tsc, apic: Unbreak static (MSR) calibration when CONFIG_X86_LOCAL_APIC=n

 arch/x86/Kconfig                |   8 ++
 arch/x86/include/asm/iosf_mbi.h |  90 ++++++++++++++++
 arch/x86/include/asm/tsc.h      |   3 +
 arch/x86/kernel/Makefile        |   3 +-
 arch/x86/kernel/iosf_mbi.c      | 226 ++++++++++++++++++++++++++++++++++++++++
 arch/x86/kernel/tsc.c           |  10 ++
 arch/x86/kernel/tsc_msr.c       | 127 ++++++++++++++++++++++
 7 files changed, 466 insertions(+), 1 deletion(-)
 create mode 100644 arch/x86/include/asm/iosf_mbi.h
 create mode 100644 arch/x86/kernel/iosf_mbi.c
 create mode 100644 arch/x86/kernel/tsc_msr.c
arch/x86/Kconfig +8 -0
index 0952ecd..ca5959a 100644
@@ -2393,6 +2393,14 @@ config X86_DMA_REMAP
 	bool
 	depends on STA2X11
 
+config IOSF_MBI
+	bool
+	depends on PCI
+	---help---
+	  To be selected by modules requiring access to the Intel OnChip System
+	  Fabric (IOSF) Sideband MailBox Interface (MBI). For MBI platforms
+	  enumerable by PCI.
+
 source "net/Kconfig"
 
 source "drivers/Kconfig"
arch/x86/include/asm/iosf_mbi.h new file +90 -0

90 lines not on this page · raw message

arch/x86/include/asm/tsc.h +3 -0
index 235be70..57ae63c 100644
@@ -65,4 +65,7 @@ extern int notsc_setup(char *);
 extern void tsc_save_sched_clock_state(void);
 extern void tsc_restore_sched_clock_state(void);
 
+/* MSR based TSC calibration for Intel Atom SoC platforms */
+int try_msr_calibrate_tsc(unsigned long *fast_calibrate);
+
 #endif /* _ASM_X86_TSC_H */
arch/x86/kernel/Makefile +2 -1
index 9b0a34e..6dbbb1e 100644
@@ -32,7 +32,7 @@ obj-$(CONFIG_X86_64)	+= vsyscall_emu_64.o
 obj-y			+= bootflag.o e820.o
 obj-y			+= pci-dma.o quirks.o topology.o kdebugfs.o
 obj-y			+= alternative.o i8253.o pci-nommu.o hw_breakpoint.o
-obj-y			+= tsc.o io_delay.o rtc.o
+obj-y			+= tsc.o tsc_msr.o io_delay.o rtc.o
 obj-y			+= pci-iommu_table.o
 obj-y			+= resource.o
 
@@ -111,6 +111,7 @@ obj-$(CONFIG_EFI)			+= sysfb_efi.o
 
 obj-$(CONFIG_PERF_EVENTS)		+= perf_regs.o
 obj-$(CONFIG_TRACING)			+= tracepoint.o
+obj-$(CONFIG_IOSF_MBI)			+= iosf_mbi.o
 
 ###
 # 64 bit specific files
arch/x86/kernel/iosf_mbi.c new file +226 -0

226 lines not on this page · raw message

arch/x86/kernel/tsc.c +10 -0
index 930e5d4..e574716 100644
@@ -419,6 +419,16 @@ unsigned long native_calibrate_tsc(void)
 	unsigned long flags, latch, ms, fast_calibrate;
 	int hpet = is_hpet_enabled(), i, loopmin;
 
+	/* Calibrate TSC using MSR for Intel Atom SoCs */
+	local_irq_save(flags);
+	i = try_msr_calibrate_tsc(&fast_calibrate);
+	local_irq_restore(flags);
+	if (i >= 0) {
+		if (i == 0)
+			pr_warn("Fast TSC calibration using MSR failed\n");
+		return fast_calibrate;
+	}
+
 	local_irq_save(flags);
 	fast_calibrate = quick_pit_calibrate();
 	local_irq_restore(flags);
arch/x86/kernel/tsc_msr.c new file +127 -0

127 lines not on this page · raw message