Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b2a4306 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:
 "The timer departement provides:

   - More y2038 work in the area of ntp and pps.

   - Optimization of posix cpu timers

   - New time related selftests

   - Some new clocksource drivers

   - The usual pile of fixes, cleanups and improvements"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
  timeconst: Update path in comment
  timers/x86/hpet: Type adjustments
  clocksource/drivers/armada-370-xp: Implement ARM delay timer
  clocksource/drivers/tango_xtal: Add new timer for Tango SoCs
  clocksource/drivers/imx: Allow timer irq affinity change
  clocksource/drivers/exynos_mct: Use container_of() instead of this_cpu_ptr()
  clocksource/drivers/h8300_*: Remove unneeded memset()s
  clocksource/drivers/sh_cmt: Remove unneeded memset() in sh_cmt_setup()
  clocksource/drivers/em_sti: Remove unneeded memset()s
  clocksource/drivers/mediatek: Use GPT as sched clock source
  clockevents/drivers/mtk: Fix spurious interrupt leading to crash
  posix_cpu_timer: Reduce unnecessary sighand lock contention
  posix_cpu_timer: Convert cputimer->running to bool
  posix_cpu_timer: Check thread timers only when there are active thread timers
  posix_cpu_timer: Optimize fastpath_timer_check()
  timers, kselftest: Add 'adjtick' test to validate adjtimex() tick adjustments
  timers: Use __fls in apply_slack()
  clocksource: Remove return statement from void functions
  net: sfc: avoid using timespec
  ntp/pps: use y2038 safe types in pps_event_time
  ...
parents 316dde2f 03f136a2
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -63,10 +63,10 @@
/* hpet memory map physical address */
/* hpet memory map physical address */
extern unsigned long hpet_address;
extern unsigned long hpet_address;
extern unsigned long force_hpet_address;
extern unsigned long force_hpet_address;
extern int boot_hpet_disable;
extern bool boot_hpet_disable;
extern u8 hpet_blockid;
extern u8 hpet_blockid;
extern int hpet_force_user;
extern bool hpet_force_user;
extern u8 hpet_msi_disable;
extern bool hpet_msi_disable;
extern int is_hpet_enabled(void);
extern int is_hpet_enabled(void);
extern int hpet_enable(void);
extern int hpet_enable(void);
extern void hpet_disable(void);
extern void hpet_disable(void);
+1 −1
Original line number Original line Diff line number Diff line
@@ -584,7 +584,7 @@ static void __init intel_graphics_stolen(int num, int slot, int func)
static void __init force_disable_hpet(int num, int slot, int func)
static void __init force_disable_hpet(int num, int slot, int func)
{
{
#ifdef CONFIG_HPET_TIMER
#ifdef CONFIG_HPET_TIMER
	boot_hpet_disable = 1;
	boot_hpet_disable = true;
	pr_info("x86/hpet: Will disable the HPET for this platform because it's not reliable\n");
	pr_info("x86/hpet: Will disable the HPET for this platform because it's not reliable\n");
#endif
#endif
}
}
+14 −15
Original line number Original line Diff line number Diff line
@@ -37,10 +37,10 @@
 */
 */
unsigned long				hpet_address;
unsigned long				hpet_address;
u8					hpet_blockid; /* OS timer block num */
u8					hpet_blockid; /* OS timer block num */
u8					hpet_msi_disable;
bool					hpet_msi_disable;


#ifdef CONFIG_PCI_MSI
#ifdef CONFIG_PCI_MSI
static unsigned long			hpet_num_timers;
static unsigned int			hpet_num_timers;
#endif
#endif
static void __iomem			*hpet_virt_address;
static void __iomem			*hpet_virt_address;


@@ -86,9 +86,9 @@ static inline void hpet_clear_mapping(void)
/*
/*
 * HPET command line enable / disable
 * HPET command line enable / disable
 */
 */
int boot_hpet_disable;
bool boot_hpet_disable;
int hpet_force_user;
bool hpet_force_user;
static int hpet_verbose;
static bool hpet_verbose;


static int __init hpet_setup(char *str)
static int __init hpet_setup(char *str)
{
{
@@ -98,11 +98,11 @@ static int __init hpet_setup(char *str)
		if (next)
		if (next)
			*next++ = 0;
			*next++ = 0;
		if (!strncmp("disable", str, 7))
		if (!strncmp("disable", str, 7))
			boot_hpet_disable = 1;
			boot_hpet_disable = true;
		if (!strncmp("force", str, 5))
		if (!strncmp("force", str, 5))
			hpet_force_user = 1;
			hpet_force_user = true;
		if (!strncmp("verbose", str, 7))
		if (!strncmp("verbose", str, 7))
			hpet_verbose = 1;
			hpet_verbose = true;
		str = next;
		str = next;
	}
	}
	return 1;
	return 1;
@@ -111,7 +111,7 @@ __setup("hpet=", hpet_setup);


static int __init disable_hpet(char *str)
static int __init disable_hpet(char *str)
{
{
	boot_hpet_disable = 1;
	boot_hpet_disable = true;
	return 1;
	return 1;
}
}
__setup("nohpet", disable_hpet);
__setup("nohpet", disable_hpet);
@@ -124,7 +124,7 @@ static inline int is_hpet_capable(void)
/*
/*
 * HPET timer interrupt enable / disable
 * HPET timer interrupt enable / disable
 */
 */
static int hpet_legacy_int_enabled;
static bool hpet_legacy_int_enabled;


/**
/**
 * is_hpet_enabled - check whether the hpet timer interrupt is enabled
 * is_hpet_enabled - check whether the hpet timer interrupt is enabled
@@ -230,7 +230,7 @@ static struct clock_event_device hpet_clockevent;


static void hpet_stop_counter(void)
static void hpet_stop_counter(void)
{
{
	unsigned long cfg = hpet_readl(HPET_CFG);
	u32 cfg = hpet_readl(HPET_CFG);
	cfg &= ~HPET_CFG_ENABLE;
	cfg &= ~HPET_CFG_ENABLE;
	hpet_writel(cfg, HPET_CFG);
	hpet_writel(cfg, HPET_CFG);
}
}
@@ -272,7 +272,7 @@ static void hpet_enable_legacy_int(void)


	cfg |= HPET_CFG_LEGACY;
	cfg |= HPET_CFG_LEGACY;
	hpet_writel(cfg, HPET_CFG);
	hpet_writel(cfg, HPET_CFG);
	hpet_legacy_int_enabled = 1;
	hpet_legacy_int_enabled = true;
}
}


static void hpet_legacy_clockevent_register(void)
static void hpet_legacy_clockevent_register(void)
@@ -983,7 +983,7 @@ void hpet_disable(void)
			cfg = *hpet_boot_cfg;
			cfg = *hpet_boot_cfg;
		else if (hpet_legacy_int_enabled) {
		else if (hpet_legacy_int_enabled) {
			cfg &= ~HPET_CFG_LEGACY;
			cfg &= ~HPET_CFG_LEGACY;
			hpet_legacy_int_enabled = 0;
			hpet_legacy_int_enabled = false;
		}
		}
		cfg &= ~HPET_CFG_ENABLE;
		cfg &= ~HPET_CFG_ENABLE;
		hpet_writel(cfg, HPET_CFG);
		hpet_writel(cfg, HPET_CFG);
@@ -1121,8 +1121,7 @@ EXPORT_SYMBOL_GPL(hpet_rtc_timer_init);


static void hpet_disable_rtc_channel(void)
static void hpet_disable_rtc_channel(void)
{
{
	unsigned long cfg;
	u32 cfg = hpet_readl(HPET_T1_CFG);
	cfg = hpet_readl(HPET_T1_CFG);
	cfg &= ~HPET_TN_ENABLE;
	cfg &= ~HPET_TN_ENABLE;
	hpet_writel(cfg, HPET_T1_CFG);
	hpet_writel(cfg, HPET_T1_CFG);
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -524,7 +524,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E6XX_CU,
 */
 */
static void force_disable_hpet_msi(struct pci_dev *unused)
static void force_disable_hpet_msi(struct pci_dev *unused)
{
{
	hpet_msi_disable = 1;
	hpet_msi_disable = true;
}
}


DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
+4 −0
Original line number Original line Diff line number Diff line
@@ -279,6 +279,10 @@ config CLKSRC_MIPS_GIC
	depends on MIPS_GIC
	depends on MIPS_GIC
	select CLKSRC_OF
	select CLKSRC_OF


config CLKSRC_TANGO_XTAL
	bool
	select CLKSRC_OF

config CLKSRC_PXA
config CLKSRC_PXA
	def_bool y if ARCH_PXA || ARCH_SA1100
	def_bool y if ARCH_PXA || ARCH_SA1100
	select CLKSRC_OF if OF
	select CLKSRC_OF if OF
Loading