summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: core: Allow DAIs to specify a base addressMark Brown2012-05-021-0/+1
| | | | | | | | | | | Devices with many DAIs are becoming more and more common, and generally the more modern devices have consistent register layouts between DAIs. Rather than have drivers open code lookups based on the DAI ID or cause uglification in UI by having register addresses for IDs provide a base address field they can use. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: wm_hubs: Cache multiple DCS offsetsMark Brown2012-05-012-10/+67
| | | | | | | | Rather than invalidating the cached DCS value every time the headphone gain changes store multiple values, indexed by gain. This allows the optimisation we get from the cache to take effect more often. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: add device tree support for TrimSliceStephen Warren2012-04-302-0/+48
| | | | | | | | | | This binding doesn't include the nvidia,model or nvidia,audio-routing properties the other Tegra audio DT bindings have, because this binding is targetted at a single machine, rather than for any machine using the tlv320aic23 codec. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8350: Replace use of custom I/O with snd_soc_read()/write()Mark Brown2012-04-301-37/+37
| | | | | | Makes the code more standard and prepares for better framework usage. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8350: Remove check for clocks in trigger()Mark Brown2012-04-301-40/+0
| | | | | | | | This is now very standard behaviour for CODECs so shouldn't be device specific and we shouldn't really be trying to peer into the register cache from atomic context anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l52: Remove duplicate module exit codeMark Brown2012-04-301-7/+0
| | | | | | | In the conversion to module_init_i2c() the original open coded module exit function was left. Remove it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add support for CS42L52 CodecBrian Austin2012-04-305-0/+1618
| | | | | | | | This patch adds support for Cirrus Logic CS42L52 Low Power Stereo Codec Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Georgi Vlaev <joe@nucleusys.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Fix dai_link dereference.Liam Girdwood2012-04-301-1/+1
| | | | | | | | We should check dailess before dereferencing. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000Richard Zhao2012-04-271-8/+32
| | | | | | | | It tries to clk_get the clock. And if it failed, it assumes the clock by default enabled. Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: imx-sgtl5000: add of_node_put when probe fail.Richard Zhao2012-04-271-11/+18
| | | | | Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_hubs: Enable class W for output mixer pathsMark Brown2012-04-271-21/+40
| | | | | | | | | | | | | | | | | Class W can be used for any path where only data from the DAC is routed to the headphones. Currently we only enable it when the direct DAC to headphone path is used but it can also be enabled for paths that go via the output mixer providing the DAC is the only input to the output mixer. Implement support for this, including updates to the class W status when the output mixer configuration is changed. This also allows us to enable the DC servo optimisations for DAC to headphone paths where the output mixer is used. In general the direct DAC path is still preferred as this will offer better performance on most wm_hubs devices but these additional paths can simplify use case management. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_hubs: Factor out class W managementMark Brown2012-04-274-158/+82
| | | | | | | | | Since the analogue portions of the checks for class W are the same over all the devices factor out these checks into wm_hubs and while we're at it also use wm_hubs_dac_hp_direct() to enable class W optimisations on more paths. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_hubs: Special case headphones for digital paths in more use casesMark Brown2012-04-274-14/+45
| | | | | | | | | | | | | The optimisations which we can do with caching the headphone DCS result in wm_hubs have only been enabled in cases where class W is enabled. However, there are more use cases which can benefit from the cache, especially with WM8994 series devices with their more advanced digital routing. Rather than keying off the class W information from the CODECs have a check in wm_hubs for a suitable path and use that to determine if we can deploy our headphone optimisations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dpcm: Fixup debugFS for DPCM state.Liam Girdwood2012-04-271-12/+5
| | | | | | | | Remove writable debugFS permission, use simple_open() and fix indentation. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: da7210: Minor bugfix for non pll slave modeAshish Chavan2012-04-271-6/+7
| | | | | | | | | | | This patch fixes a bug discovered during testing of non pll slave mode. Due to the bug chip was not getting correctly configured and as a result there was no sound output while playback. After applying this patch, both pll and non pll modes work fine. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dapm: Move CODEC<->CODEC params off stackMark Brown2012-04-271-12/+20
| | | | | | | | | Reduce our stack consumption by moving the params off the stack, they are reasonably large and might be an issue on platforms with small stacks. Reported-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Ackeded-by: Liam Girdwood <lrg@ti.com>
* ASoC: wm8994: Add trace showing wm8958_micd_set_rate()Mark Brown2012-04-261-0/+4
| | | | | | This can be helpful to users when tuning their systems. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Allow rate configuration with custom mic callbackMark Brown2012-04-261-1/+2
| | | | | | | If a driver using a custom mic detection callback has provided a table of mic detection rates via platform data then use it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Tune debounce rates for jack detect modeMark Brown2012-04-261-2/+4
| | | | | | | | Use a slightly larger debounce when identifying accessory type and a slightly smaller one when detecting buttons in response to user feedback from large scale testing. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Put the microphone biases into bypass mode when idleMark Brown2012-04-261-0/+12
| | | | | | | | | When we're not actively doing audio we don't need the microphone biases to be regulated, noise is not important when we are not looking at the audio signal. Save some power by putting the MICBIAS regulators into bypass mode when not doing audio. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: pcm: Add pcm operation for pcm ioctl.Liam Girdwood2012-04-261-0/+13
| | | | | | | | | | | | Provide an ioctl marshaller for ASoC platform drivers. This will use the default ALSA handler if no platform handler exists. This is also required for DPCM BE PCMs as snd_pcm_info() will call the ioctl as part of stream startup. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dpcm: Add bespoke trigger()Liam Girdwood2012-04-264-10/+96
| | | | | | | | | | | | | | | | Some on SoC DSP HW is very tightly coupled with DMA and DAI drivers. It's necessary to allow some flexability wrt to PCM operations here so that we can define a bespoke DPCM trigger() PCM operation for such HW. A bespoke DPCM trigger() allows exact ordering and timing of component triggering by allowing a component driver to manage the final enable and disable configurations without adding extra complexity to other component drivers. e.g. The McPDM DAI and ABE are tightly coupled on OMAP4 so we have a bespoke trigger to manage the trigger to improve performance and reduce complexity when triggering new McPDM BEs. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dpcm: Add API for DAI link substream and runtime lookupLiam Girdwood2012-04-262-0/+34
| | | | | | | | Some component drivers will need to be able to look up their DAI link substream and RTD data. Provide a mechanism for this. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dpcm: Add runtime dynamic route updateLiam Girdwood2012-04-263-2/+228
| | | | | | | | | | | | | | | | | This patch allows DPCM to dynamically alter the FE to BE PCM links at runtime based on mixer setting updates. DAPM is looked up after every mixer update and we perform a DPCM runtime update if the mixer has a change of value. This patchs adds/changes the following :- o Adds DPCM runtime update core. o Changes soc_dapm_mixer_update_power() and soc_dapm_mux_update_power() to return if a change has occured rather than 0. No other users check atm. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dpcm: Add debugFS support for DPCMLiam Girdwood2012-04-264-0/+171
| | | | | | | Add debugFS files for DPCM link management information. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dpcm: Add Dynamic PCM core operations.Liam Girdwood2012-04-264-30/+1370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Dynamic PCM core allows digital audio data to be dynamically routed between different ALSA PCMs and DAI links on SoC CPUs with on chip DSP devices. e.g. audio data could be played on pcm:0,0 and routed to any (or all) SoC DAI links. Dynamic PCM introduces the concept of Front End (FE) PCMs and Back End (BE) PCMs. The FE PCMs are normal ALSA PCM devices except that they can dynamically route digital audio data to any supported BE PCM. A BE PCM has no ALSA device, but represents a DAI link and it's substream and audio HW parameters. e.g. pcm:0,0 routing digital data to 2 external codecs. FE pcm:0,0 ----> BE (McBSP.0) ----> CODEC 0 +--> BE (McPDM.0) ----> CODEC 1 e.g. pcm:0,0 and pcm:0,1 routing digital data to 1 external codec. FE pcm:0,0 --- +--> BE (McBSP.0) ----> CODEC FE pcm:0,1 --- The digital audio routing is controlled by the usual ALSA method of mixer kcontrols. Dynamic PCM uses a DAPM graph to work out the routing based upon the mixer settings and configures the BE PCMs based on routing and the FE HW params. DPCM is designed so that most ASoC component drivers will need no modification at all. It's intended that existing CODEC, DAI and platform drivers can be used in DPCM based audio devices without any changes. However, there will be some cases where minor changes are required (e.g. for very tightly coupled HW) and there are helpers to support this too. Somethimes the HW params of a FE and BE do not match or are incompatible, so in these cases the machine driver can reconfigure any hw_params and make any DSP perform sample rate / format conversion. This patch adds the core DPCM code and contains :- o The FE and BE PCM operations. o FE and BE DAI link support. o FE and BE PCM creation. o BE support API. o BE and FE link management. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Remove unused variable 'min'Fabio Estevam2012-04-261-1/+0
| | | | | | | | | | | | | commit 4183eed2 (ASoC: core: Add signed multi register control) introduced the variable 'min',but it is not used. Remove it to fix the following build warning: sound/soc/soc-core.c: In function 'snd_soc_put_xr_sx': sound/soc/soc-core.c:2990: warning: unused variable 'min' Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: SSM2602: Convert to direct regmap API usageLars-Peter Clausen2012-04-251-30/+57
| | | | | | | | | Mostly a one to one converion. On one occasion the patch replaces a snd_soc_read-snd_soc_write sequence with regmap_update_bits though as it helps to keep the conversion simple. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: SSM2602: Remove driver specific versionLars-Peter Clausen2012-04-251-4/+0
| | | | | | | | We have never really updated that version number and probably never will, so just remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: SSM2602: Add sysclk based rate constraintsLars-Peter Clausen2012-04-251-4/+34
| | | | | | | | Not all advertised rates are available for all sysclk frequencies. Add additional sysclk based rate constraints. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: bf5xx-ssm2602: Setup sysclock in init callbackLars-Peter Clausen2012-04-251-33/+4
| | | | | | | | The sysclock is fixed, so just set it up once in the init callback instead of setting it repeatably in the hw_params callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Make sure we disable FLL bypass when stopping the FLLKyung-Kwee Ryu2012-04-251-1/+1
| | | | | | | | | If FLL bypass is left enabled when we disable the CODEC then the output clock will be left running which consumes a small amount of additional current. Only enable bypass when there is an output. Signed-off-by: Kyung-Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Add strobe controlKristoffer KARLSSON2012-04-232-0/+71
| | | | | | | | | | | | | | | | | | | | | | | Added support for a control that strobes a bit in a register to high then back to low (or the inverse). This is typically useful for hardware that requires strobing a singe bit to trigger some functionality and where exposing the bit in a normal single control would require the user to first manually set then again unset the bit again for the strobe to trigger. Added convenience macro. SOC_SINGLE_STROBE Added accessor implementations. snd_soc_get_strobe snd_soc_put_strobe Signed-off-by: Kristoffer KARLSSON <kristoffer.karlsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Add signed multi register controlKristoffer KARLSSON2012-04-232-1/+139
| | | | | | | | | | | | | | | | | | | | Added control type that can span multiple consecutive codec registers forming a single signed value in a MSB/LSB manner. The control dynamically adjusts to the register word size configured in driver. Added convenience macro. SOC_SINGLE_XR_SX Added accessor implementations. snd_soc_info_xr_sx snd_soc_get_xr_sx snd_soc_put_xr_sx Signed-off-by: Kristoffer KARLSSON <kristoffer.karlsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Delete trailing whitespace from sound/soc/codecs/wm8994.cJesper Juhl2012-04-231-7/+6
| | | | | | | | While reading through sound/soc/codecs/wm8994.c I noticed a fair amount of trailing whitespace. This patch gets rid of it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Update regmap access for WM5100 DSP control registersMark Brown2012-04-232-2/+282
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dapm: Fix x86_64 build warning.Liam Girdwood2012-04-231-2/+2
| | | | | | | | | | | | | | | | Fixes the following build warning on x86_64. In file included from include/trace/ftrace.h:567:0, from include/trace/define_trace.h:86, from include/trace/events/asoc.h:410, from sound/soc/soc-core.c:45: include/trace/events/asoc.h: In function 'ftrace_raw_event_snd_soc_dapm_output_path': include/trace/events/asoc.h:246:1: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] include/trace/events/asoc.h: In function 'ftrace_raw_event_snd_soc_dapm_input_path': include/trace/events/asoc.h:275:1: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm1250-ev1: Support sample rate configurationMark Brown2012-04-191-0/+43
| | | | | | | The Springbank module can support a range of sample rates, selected at runtime via GPIO configuration. Allow these to be configured at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm1250-ev1: Support stereoMark Brown2012-04-191-2/+2
| | | | | | | Springbank can support stereo, though it is primarily intended for mono use cases. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dapm: Add API call to query valid DAPM pathsLiam Girdwood2012-04-183-10/+197
| | | | | | | | | | | | | | In preparation for ASoC DSP support. Add a DAPM API call to determine whether a DAPM audio path is valid between source and sink widgets. This also takes into account all kcontrol mux and mixer settings in between the source and sink widgets to validate the audio path. This will be used by the DSP core to determine the runtime DAI mappings between FE and BE DAIs in order to run PCM operations. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: samsung: Hook up AIF2 to the CODEC on LittlemillMark Brown2012-04-181-12/+70
| | | | | | | | Connect the WM1250-EV1 baseband simulator on Littlemill systems up to the CODEC AIF2 using the new CODEC<->CODEC link support, allowing a wider range of use cases to be represented. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Keep AIF3 tristated when not in useMark Brown2012-04-171-5/+4
| | | | | | | | Since AIF3 shares clock signals with other audio interfaces in order to ensure it doesn't drive undesirable clocks we need to tristate it. Rather than forcing the machine driver to do so have the driver do this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: da7210: Minor update for PLL and SRMAshish Chavan2012-04-171-13/+9
| | | | | | | | This patch converts multiple if conditions in to single if with "&&"s. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: da7210: Add support for PLL and SRMAshish Chavan2012-04-171-38/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | Current DA7210 driver does support PLL mode fully. It uses fixed value of input master clock and PLL mode is enabled and disabled based on the sampling frequency being used for playback or recording. It also doesn't support Sample Rate Measurement feature of DA7210 hardware. This patch adds full support for PLL and SRM. Basically following three modes of operation are possible for DA7210 hardware, (1) I2S SLAVE mode with PLL bypassed (2) I2S SLAVE mode with PLL enabled (3) I2S Master mode with PLL enabled This patch adds support for all three modes. Also, in case of SLAVE mode with PLL, it supports SRM (Sample Rate Measurement) feature of the chip. Actually this patch was submitted earlier and received some review comments, but after that the driver got update by other patches. Because of that, I am considering this as new patch and not versioning it based of previous patches. This version tries to take care of all review comments received for earlier submissions. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Use dai_fmt in SpeysideMark Brown2012-04-161-29/+4
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Merge tag 'v3.4-rc3' into for-3.5Mark Brown2012-04-16360-2649/+3391
|\ | | | | | | | | | | | | | | | | | | | | Linux 3.4-rc3 contains a bunch of Tegra changes which are conflicting annoyingly with the new development that's going on for Tegra so merge it up to resolve those conflicts. Conflicts: sound/soc/soc-core.c sound/soc/tegra/tegra_i2s.c sound/soc/tegra/tegra_spdif.c
| * Linux 3.4-rc3v3.4-rc3Linus Torvalds2012-04-151-1/+1
| |
| * Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-armLinus Torvalds2012-04-1514-61/+46
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull ARM fixes from Russell King: "Nothing too disasterous, the biggest thing being the removal of the regulator support for vcore in the AMBA driver; only one SoC was using this and it got broken during the last merge window, which then started causing problems for other people. Mutual agreement was reached for it to be removed." * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7386/1: jump_label: fixup for rename to static_key ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE ARM: 7382/1: mm: truncate memory banks to fit in 4GB space for classic MMU ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus ARM: 7383/1: nommu: populate vectors page from paging_init ARM: 7381/1: nommu: fix typo in mm/Kconfig ARM: 7380/1: DT: do not add a zero-sized memory property ARM: 7379/1: DT: fix atags_to_fdt() second call site ARM: 7366/3: amba: Remove AMBA level regulator support ARM: 7377/1: vic: re-read status register before dispatching each IRQ handler ARM: 7368/1: fault.c: correct how the tsk->[maj|min]_flt gets incremented
| | * ARM: 7386/1: jump_label: fixup for rename to static_keyRabin Vincent2012-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c5905afb0 ("static keys: Introduce 'struct static_key'...") renamed struct jump_label_key to struct static_key. Fixup ARM for this to eliminate these build warnings: include/linux/jump_label.h:113:2: warning: passing argument 1 of 'arch_static_branch' from incompatible pointer type include/asm/jump_label.h:17:82: note: expected 'struct jump_label_key *' but argument is of type 'struct static_key *' Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEEJonathan Austin2012-04-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when ThumbEE is not enabled (!CONFIG_ARM_THUMBEE) the ThumbEE register states are not saved/restored at context switch. The default state of the ThumbEE Ctrl register (TEECR) allows userspace accesses to the ThumbEE Base Handler register (TEEHBR). This can cause unexpected behaviour when people use ThumbEE on !CONFIG_ARM_THUMBEE kernels, as well as allowing covert communication - eg between userspace tasks running inside chroot jails. This patch sets up TEECR in order to prevent user-space access to TEEHBR when !CONFIG_ARM_THUMBEE. In this case, tasks are sent SIGILL if they try to access TEEHBR. Cc: stable@vger.kernel.org Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>