/* * phycore-ac97.c -- SoC audio for imx_phycore in AC97 mode * * Copyright 2009 Sascha Hauer, Pengutronix * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * */ #include #include #include #include #include #include #include #include #include "imx-audmux.h" static struct snd_soc_card imx_phycore; static struct snd_soc_ops imx_phycore_hifi_ops = { }; static struct snd_soc_dai_link imx_phycore_dai_ac97[] = { { .name = "HiFi", .stream_name = "HiFi", .codec_dai_name = "wm9712-hifi", .codec_name = "wm9712-codec", .cpu_dai_name = "imx-ssi.0", .platform_name = "imx-ssi.0", .ops = &imx_phycore_hifi_ops, }, }; static struct snd_soc_card imx_phycore = { .name = "PhyCORE-ac97-audio", .owner = THIS_MODULE, .dai_link = imx_phycore_dai_ac97, .num_links = ARRAY_SIZE(imx_phycore_dai_ac97), }; static struct platform_device *imx_phycore_snd_ac97_device; static struct platform_device *imx_phycore_snd_device; static int __init imx_phycore_init(void) { int ret; if (machine_is_pca100()) { imx_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, IMX_AUDMUX_V1_PCR_SYN | /* 4wire mode */ IMX_AUDMUX_V1_PCR_TFCSEL(3) | IMX_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */ IMX_AUDMUX_V1_PCR_RXDSEL(3)); imx_audmux_v1_configure_port(3, IMX_AUDMUX_V1_PCR_SYN | /* 4wire mode */ IMX_AUDMUX_V1_PCR_TFCSEL(0) | IMX_AUDMUX_V1_PCR_TFSDIR | IMX_AUDMUX_V1_PCR_RXDSEL(0)); } else if (machine_is_pcm043()) { imx_audmux_v2_configure_port(3, IMX_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ IMX_AUDMUX_V2_PTCR_TFSEL(0) | IMX_AUDMUX_V2_PTCR_TFSDIR, IMX_AUDMUX_V2_PDCR_RXDSEL(0)); imx_audmux_v2_configure_port(0, IMX_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ IMX_AUDMUX_V2_PTCR_TCSEL(3) | IMX_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ IMX_AUDMUX_V2_PDCR_RXDSEL(3)); } else { /* return happy. We might run on a totally different machine */ return 0; } imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1); if (!imx_phycore_snd_ac97_device) return -ENOMEM; platform_set_drvdata(imx_phycore_snd_ac97_device, &imx_phycore); ret = platform_device_add(imx_phycore_snd_ac97_device); if (ret) goto fail1; imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1); if (!imx_phycore_snd_device) { ret = -ENOMEM; goto fail2; } ret = platform_device_add(imx_phycore_snd_device); if (ret) { printk(KERN_ERR "ASoC: Platform device allocation failed\n"); goto fail3; } return 0; fail3: platform_device_put(imx_phycore_snd_device); fail2: platform_device_del(imx_phycore_snd_ac97_device); fail1: platform_device_put(imx_phycore_snd_ac97_device); return ret; } static void __exit imx_phycore_exit(void) { platform_device_unregister(imx_phycore_snd_device); platform_device_unregister(imx_phycore_snd_ac97_device); } late_initcall(imx_phycore_init); module_exit(imx_phycore_exit); MODULE_AUTHOR("Sascha Hauer "); MODULE_DESCRIPTION("PhyCORE ALSA SoC driver"); MODULE_LICENSE("GPL"); ff5bc3b9b25'/>
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-01-31 09:37:34 +0100
committerThomas Gleixner <tglx@linutronix.de>2017-01-31 21:47:58 +0100
commit0becc0ae5b42828785b589f686725ff5bc3b9b25 (patch)
treebe6d0e1f37c38ed0a7dd5da2d4b1e93f0fb43101 /fs/xfs/libxfs/xfs_defer.c
parent24c2503255d35c269b67162c397a1a1c1e02f6ce (diff)
x86/mce: Make timer handling more robust
Erik reported that on a preproduction hardware a CMCI storm triggers the BUG_ON in add_timer_on(). The reason is that the per CPU MCE timer is started by the CMCI logic before the MCE CPU hotplug callback starts the timer with add_timer_on(). So the timer is already queued which triggers the BUG. Using add_timer_on() is pretty pointless in this code because the timer is strictlty per CPU, initialized as pinned and all operations which arm the timer happen on the CPU to which the timer belongs. Simplify the whole machinery by using mod_timer() instead of add_timer_on() which avoids the problem because mod_timer() can handle already queued timers. Use __start_timer() everywhere so the earliest armed expiry time is preserved. Reported-by: Erik Veijola <erik.veijola@intel.com> Tested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Borislav Petkov <bp@alien8.de> Cc: Tony Luck <tony.luck@intel.com> Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701310936080.3457@nanos Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_defer.c')