Takashi Iwai [Wed, 1 Feb 2017 16:18:20 +0000 (17:18 +0100)]
ALSA: x86: Remove superfluous irqsave flags
We don't need to use irqsave/irqrestore versions for each spin lock,
but judge the context properly and use the simpler versions.
Also add some (still simplistic) comments to functions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 1 Feb 2017 15:45:38 +0000 (16:45 +0100)]
ALSA: x86: Constfy tables
Some tables can be defined as const.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 17:14:15 +0000 (18:14 +0100)]
ALSA: x86: Remove _v[12] suffices
Although we dropped the most of the obsoleted *_v1 definitions and
codes, some codes still keep the _v1 or _v2 suffices. Now they are
ripped off.
The only thing to be done carefully here is the definition of control
offsets. The original code defines enum hdmi_ctrl_reg_offset_v1 and
a few new elements just for v2 on its top. After this cleanup, we
remove the old AUD_HDMI_STATUS and AUD_HDMIW_INFOFR definitions and
replace with the v2 values.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 16:09:13 +0000 (17:09 +0100)]
ALSA: x86: Tidy up codes
Clean up codes, fix indentations, correct comments, etc.
No functional change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 15:46:44 +0000 (16:46 +0100)]
ALSA: x86: Drop had_get_hwstate()
The helper function isn't clearer than the plain condition check
"if (drv_status == HDA_DRV_DISCONNECTED)". By expanding this, the
compiler could even catch the possible uninitialized cases, so we
could fix them, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 15:38:22 +0000 (16:38 +0100)]
ALSA: x86: Remove superfluous check at resume
The had_get_hwstate() is identical with drv_status==DISCONECTED, which
was already checked before the call. And, returning an error at
resume is simply bad. That is, we should just kill this check.
Also, spewing an error at resume for drv_status!=SUSPENDED is also
annoying, as this is the normal case when the suspend was called
without the monitor connection. Make it debug, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 15:26:10 +0000 (16:26 +0100)]
ALSA: x86: Fix sleep-in-atomic via i915 notification
i915 notification is executed in a spinlock, thus it must not sleep;
i.e. we can't use kmalloc with GFP_KERNEL or such.
For making it working properly, move the notification handler in a
work, and handle it gracefully. We have already such a work, and it
was used just at the start. This can be re-used in a more generic
hotplug handling.
Also, the patch adds the proper call of cancel_work_sync() to the
destructor.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 15:17:14 +0000 (16:17 +0100)]
ALSA: x86: Drop superfluous PCM private_free
snd_pcm_lib_preallocate_free_for_all() doesn't have to be called from
each driver as it's called in the PCM core.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 15:11:27 +0000 (16:11 +0100)]
ALSA: x86: Drop unused fields from snd_intelhad struct
Also change the flag_underrun to bool to be clearer.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 15:04:10 +0000 (16:04 +0100)]
ALSA: x86: Remove indirect call of snd_pcm_period_elapsed()
Again another indirect call... Let's straighten it up.
Also define the had_stream field with a proper type instead of a void
pointer.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 1 Feb 2017 16:27:48 +0000 (17:27 +0100)]
ALSA: x86: Fix for CONFIG_PM=n
The direct access to power.runtime_status is taboo, let's use a helper
macro to avoid the compile error with CONFIG_PM=n.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 14:49:15 +0000 (15:49 +0100)]
ALSA: x86: Replace pr_xxx() with dev_xxx()
dev_xxx() helpers give a tidier output in general.
While we're at it, remove many useless debug prints (e.g. the ones at
each function entry), replace some too verbose errors with debugs, and
use WARN_ON() for some serious errors.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 12:57:58 +0000 (13:57 +0100)]
ALSA: x86: Fold intel_hdmi_audio_if.c into main file
As the very last step, we fold intel_hdmi_audio_if.c into the main
file, intel_hdmi_audio.c. This is merely a cleanup, and no functional
change.
By this move, we can mark all functions and variables as static, which
allows the compiler more optimizations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 12:52:22 +0000 (13:52 +0100)]
ALSA: x86: Flatten two abstraction layers
This is the final stage for a big clean-up series. Here we flatten
the two layers into one. Formerly, the implementation was split to
HDMI "shell" that talks with the platform device, and HDMI audio part
that communicates via caps and other event handlers. All these would
be good if there were multiple instantiations or if there were data
protection. But neither are true in our case. That said, it'll be
easier to have a flat driver structure in the end.
In this patch, the former struct hdmi_lpe_audio_ctx is forged into the
existing struct snd_intelhad. The latter has already a few members
that are basically the copy from the former. Only a few new members
for the lowlevel I/O are added by this change.
Then, the had_get_caps() and had_set_caps() are simply replaced with
the direct calls to copy the data in the struct fields. Also, the
had_event_handler() calls are replaced with the direct call for each
event as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 10:06:34 +0000 (11:06 +0100)]
ALSA: x86: Drop unused hdmi_audio_query()
It's used nowhere. Kill it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 07:47:05 +0000 (08:47 +0100)]
ALSA: x86: Call snd_card_register() at the end
The card registration should be done at the last stage of the probe
procedure. Otherwise user-space may access to the device before the
whole initialization is done.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 07:44:23 +0000 (08:44 +0100)]
ALSA: x86: Check platform_data earlier
Just a minor optimization; check the presence of platform_data earlier
in the probe function before actually starting allocation, which makes
the error path easier.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 07:42:50 +0000 (08:42 +0100)]
ALSA: x86: Drop superfluous CHT PCI ID check
Since the config base offset is now set per pipe id, we don't have to
check Cherry Trail PCI IDs any longer. Currently it's used only for
debug prints. Let's drop it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 07:14:34 +0000 (08:14 +0100)]
ALSA: x86: Embed snd_intelhad into snd_card
Instead of allocating snd_intelhad struct, use the card's private_data
and embed it. It simplifies the code a lot.
While we're at it, embed had_stream into snd_intelhad struct instead
of individually allocating, and rename had_pvt_data to a bit more
specific name, had_stream_data.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 07:02:16 +0000 (08:02 +0100)]
ALSA: x86: Move dma_mask debug print into intel_hdmi_lpe_audio.c
It belongs to the right place.
And, remove a few sanity checks (e.g. NULL card) and debug prints as
well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 06:53:56 +0000 (07:53 +0100)]
ALSA: x86: Drop unused hw_silence field
It's nowhere used. Let's drop it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 17:17:44 +0000 (18:17 +0100)]
ALSA: x86: Move the global underrun_count to struct snd_intelhad
The last one is in intel_hdmi_audio.c, underrun_count: this can be
embedded in snd_intelhad object.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 17:15:40 +0000 (18:15 +0100)]
ALSA: x86: Drop global ELD copy
Similarly like the previous patch, drop the global variable to keep
the ELD copy. It can be embedded in hdmi_lpe_audio_ctx as well.
And this makes easier to code, it's just a memcpy(), after all.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 17:11:13 +0000 (18:11 +0100)]
ALSA: x86: Drop global hlpe_state
Now it's the turn to drop the global hlpe_state variable. It can be
gracefully embedded in hdmi_lpe_audio_ctx struct.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 17:09:01 +0000 (18:09 +0100)]
ALSA: x86: Drop the global platform device reference
Instead of referring to the global hlpe_pdev variable, pass the
platform device object to each function properly. Accessing to the
global object is really ugly and error-prone.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 16:44:00 +0000 (17:44 +0100)]
ALSA: x86: Drop unused mid_hdmi_audio_is_busy()
The function is nowhere used. Kill it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 16:40:04 +0000 (17:40 +0100)]
ALSA: x86: Fix possible stale interrupt calls
Registering the irq handler at the too early place may cause a system
stall because the irq handler may be triggered before the other
initializations. Move the irq handler registration to the later point.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 16:38:00 +0000 (17:38 +0100)]
ALSA: x86: Call event callback directly
Currently the driver calls the event callback stored in its ctx
pointer, but it's obviously inefficient. Replace it with the direct
calls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 16:31:29 +0000 (17:31 +0100)]
ALSA: x86: Drop useless mutex at probe
had_mutex is (supposedly) used to protect the concurrent calls of
hdmi_audio_probe(). But we may have only one device at most, so it's
utterly useless. Drop it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 07:29:56 +0000 (08:29 +0100)]
ALSA: x86: Handle the error from hdmi_audio_probe() properly
The error from hdmi_audio_probe() wasn't handled properly, and it may
leave some resources leaked or mapped. Fix it and also clean up the
error paths.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 16:23:39 +0000 (17:23 +0100)]
ALSA: x86: Pass snd_intelhad object to helpers
For reducing the global variable reference, keep snd_intelhad object
in the context and pass it to each helper. It's a preliminary change
for further cleanup.
This also includes the simplification of the probe procedure: the LPE
platform driver directly gets the created snd_intelhad object by
hdmi_audio_probe(), and passes it to each helper and destructor,
hdmi_audio_remove(). The hdmi_audio_probe() function doesn't call the
back-registration any longer, which is fairly useless. The LPE
platform driver initializes the stuff instead at the right place, and
calls the wq after the object creation in the probe function itself.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 15:52:06 +0000 (16:52 +0100)]
ALSA: x86: Drop snd_intel_had_interface indirect calls
Yet another indirection is killed: at this time, it's
snd_intel_had_interface. It contains also the name string, but it's
nowhere used, thus we can kill it, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 15:37:06 +0000 (16:37 +0100)]
ALSA: x86: Replace indirect query_ops with direct calls
Like the previous patch, this replaces the indirect query_ops calls
via direct function calls. They are only get_caps and set_caps, so
fairly straightforward at this time.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 15:29:39 +0000 (16:29 +0100)]
ALSA: x86: Replace indirect register ops with direct calls
Now about the indirect register ops: they are replaced with direct
calls, too.
The read / write / modify ops are simply replaced with the
corresponding functions. The difference is that we calculate the
offset inside the function now. So all the had_config_offset
references in the caller side are dropped. This also simplifies the
DP-audio check in hdmi_audio_write() and hdmi_audio_rmw().
The hdmi_audio_get_register_base is dropped since it's no longer used
when the base address and config offset are referred in the read/write
functions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 15:09:11 +0000 (16:09 +0100)]
ALSA: x86: Drop indirect calls of had_ops
We have only a single implementation of had_ops, hence there is no
merit to use the indirect calls at all. Let's replace it with the
direct calls -- which allows the compiler more optimizations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 14:58:15 +0000 (15:58 +0100)]
ALSA: x86: Remove v1 ops and structs
The v1 code refers to Medfield/Clovertrail. It's not used at all in
the current driver, and probably won't be ever. Let's clean this up,
then we can go to the next stage of cleanup tasks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 06:30:20 +0000 (07:30 +0100)]
ALSA: x86: Don't set PCM state to DISCONNECTED
Theoretically setting the state to SNDRV_PCM_STATE_DISCONNECTED is
correct. But, unfortunately, PA gets confused by this action, and it
won't re-probe the device after HDMI/DP is re-plugged. (It reprobes
only when the card itself is recreated.)
As a workaround, set SNDRV_PCM_STATE_SETUP instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 2 Feb 2017 10:03:48 +0000 (11:03 +0100)]
drm/i915: Enable VLV audio chicken bit for LPE audio
The audio chicken bit (register offset 0x62f38) seems required to make
DP audio working on some machines. At least, on Dell Wyse 3040, I
failed to get the audio unless this bit is set once.
Strangely, the bit seems necessary only once, and it persists after
that, even some power-off cycles. The register is supposedly
write-only, so it's no evidence whether the bit keeps effect
persistently. But, judging from the experiment, it looks enough to
set it up once at the device initialization.
The patch is basically a cut from the original patch by Pierre-Louis
Bossart.
v1->v2: drop read since it's a write-only reg.
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jan 2017 16:56:39 +0000 (17:56 +0100)]
drm/i915: Pass platform device to LPE audio notifier
This allows the LPE HDMI driver to clean up its global variable
reference.
Also drop to pass the eld pointer because the connection status and
the ELD bytes can be retrieved from the attached pdata.
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pierre-Louis Bossart [Tue, 31 Jan 2017 20:16:53 +0000 (14:16 -0600)]
ALSA: x86: Use config base depending on the pipe
Now the pipe that is being used is passed over i915 notification, we
can re-setup the relevant register offset depending on pipe assignments
during hotplug.
This allows playback on single port machines such Zotac Pi330 or
dual-port machines such as Dell Wyse 3040 box
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pierre-Louis Bossart [Tue, 31 Jan 2017 20:16:52 +0000 (14:16 -0600)]
ALSA: x86: intel_hdmi: add definitions and logic for DP audio
Imported from legacy patches
Note: the new code doesn't assume a modified ELD but
an explicit notification that DP is present. It appears
that the i915 code does change the ELD so we could use
the ELD-based tests to check for DP audio
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 20:16:51 +0000 (14:16 -0600)]
drm/i915: Pass pipe to LPE audio notification
The LPE audio configuration depends on the pipe, thus we need to pass
the currently used pipe. It's now embedded in struct
intel_hdmi_lpe_audio_eld as well as port id.
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 31 Jan 2017 20:16:50 +0000 (14:16 -0600)]
drm/i915: Avoid MST pipe handling for LPE audio
The pipe gets cleared to -1 for non-MST before the ELD audio
notification due to the MST audio support. This makes sense for
HD-audio that received the MST handling, but it's useless for LPE
audio. Handle the MST pipe hack conditionally only for HD-audio.
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pierre-Louis Bossart [Tue, 31 Jan 2017 20:16:49 +0000 (14:16 -0600)]
drm/i915: add DisplayPort amp unmute for LPE audio mode
Enable unmute/mute amp notification. This doesn't seem to affect
HDMI support so this is done unconditionally.
An earlier version of this patch set a chicken bit at address 0x62F38
prior to the mute/unmute but this register doesn't seem to do anything
so this phase was removed.
v1->v2: Drop needless pipe A check, avoid temporary reg offset variable.
v2->v3: Add "_" prefix to VLV_AUD_PORT_EN_X_DBG as they are internal.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pierre-Louis Bossart [Tue, 31 Jan 2017 20:16:48 +0000 (14:16 -0600)]
drm/i915: add DP support in LPE audio mode
If DisplayPort is detected, pass flag and link rate to audio driver
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 26 Jan 2017 09:50:43 +0000 (10:50 +0100)]
Documentation/gpu: Move LPE audio section after HD-audio
As Daniel suggested, it makes more sense and reduces the conflicts.
Also, while we're at it, tidy up the section title from all lower
letters.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Julia Lawall [Tue, 24 Jan 2017 16:07:48 +0000 (17:07 +0100)]
ALSA: x86: hdmi: fix returnvar.cocci warnings
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
CC: Jerome Anand <jerome.anand@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
kbuild test robot [Tue, 24 Jan 2017 15:41:46 +0000 (23:41 +0800)]
ALSA: x86: fix resource_size.cocci warnings
sound/x86/intel_hdmi_lpe_audio.c:498:24-27: ERROR: Missing resource_size with res_mmio
Use resource_size function on resource object
instead of explicit computation.
Generated by: scripts/coccinelle/api/resource_size.cocci
CC: Jerome Anand <jerome.anand@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jerome Anand [Tue, 24 Jan 2017 22:57:53 +0000 (04:27 +0530)]
ALSA: x86: hdmi: continue playback even when display resolution changes
When the display resolution changes, the drm disables the
display pipes due to which audio rendering stops. At this
time, we need to ensure the existing audio pointers and
buffers are cleared out so that the playback can restarted
once the display pipe is enabled with a different N/CTS values
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Anand <jerome.anand@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jerome Anand [Tue, 24 Jan 2017 22:57:52 +0000 (04:27 +0530)]
ALSA: x86: hdmi: Add audio support for BYT and CHT
Hdmi audio driver based on the child platform device
created by gfx driver is implemented.
This audio driver is derived from legacy intel
hdmi audio driver.
The interfaces for interaction between gfx and audio
are updated and the driver implementation updated to
derive interrupts in its own address space based on
irq chip framework
The changes to calculate sub-period positions was triggered
by David Henningsson <david.henningsson@canonical.com> and is
accomodated in this patch
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Anand <jerome.anand@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jerome Anand [Tue, 24 Jan 2017 22:57:51 +0000 (04:27 +0530)]
ALSA: add Intel HDMI LPE audio driver for BYT/CHT-T
On Baytrail and Cherrytrail, HDaudio may be fused out or disabled
by the BIOS. This driver enables an alternate path to the i915
display registers and DMA.
Although there is no hardware path between i915 display and LPE/SST
audio clusters, this HDMI capability is referred to in the documentation
as "HDMI LPE Audio" so we keep the name for consistency. There is no
hardware path or control dependencies with the LPE/SST DSP functionality.
The hdmi-lpe-audio driver will be probed when the i915 driver creates
a child platform device.
Since this driver is neither SoC nor PCI, a new x86 folder is added
Additional indirections in the code will be cleaned up in the next series
to aid smoother DP integration
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Anand <jerome.anand@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jerome Anand [Tue, 24 Jan 2017 22:57:50 +0000 (04:27 +0530)]
drm/i915: Add support for audio driver notifications
Notifiations like mode change, hot plug and edid to
the audio driver are added. This is inturn used by the
audio driver for its functionality.
A new interface file capturing the notifications needed by the
audio driver is added
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Anand <jerome.anand@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jerome Anand [Tue, 24 Jan 2017 22:57:49 +0000 (04:27 +0530)]
drm/i915: setup bridge for HDMI LPE audio driver
Enable support for HDMI LPE audio mode on Baytrail and
Cherrytrail when HDaudio controller is not detected
Setup minimum required resources during i915_driver_load:
1. Create a platform device to share MMIO/IRQ resources
2. Make the platform device child of i915 device for runtime PM.
3. Create IRQ chip to forward HDMI LPE audio irqs.
HDMI LPE audio driver (a standalone sound driver) probes the
LPE audio device and creates a new sound card.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Anand <jerome.anand@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Linus Torvalds [Sun, 22 Jan 2017 20:54:15 +0000 (12:54 -0800)]
Linux 4.10-rc5
Linus Torvalds [Sun, 22 Jan 2017 20:47:48 +0000 (12:47 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull x86 fix from Thomas Gleixner:
"Restore the retrigger callbacks in the IO APIC irq chips. That
addresses a long standing regression which got introduced with the
rewrite of the x86 irq subsystem two years ago and went unnoticed so
far"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/ioapic: Restore IO-APIC irq_chip retrigger callback
Linus Torvalds [Sun, 22 Jan 2017 20:45:47 +0000 (12:45 -0800)]
Merge branch 'smp-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull smp/hotplug fix from Thomas Gleixner:
"Remove an unused variable which is a leftover from the notifier
removal"
* 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
cpu/hotplug: Remove unused but set variable in _cpu_down()
Linus Torvalds [Sun, 22 Jan 2017 20:40:09 +0000 (12:40 -0800)]
Merge tag 'for_linus' of git://git./linux/kernel/git/mst/vhost
Pull virtio/vhost fixes from Michael Tsirkin:
"Random fixes and cleanups that accumulated over the time"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio/s390: virtio: constify virtio_config_ops structures
virtio/s390: add missing \n to end of dev_err message
virtio/s390: support READ_STATUS command for virtio-ccw
tools/virtio/ringtest: tweaks for s390
tools/virtio/ringtest: fix run-on-all.sh for offline cpus
virtio_console: fix a crash in config_work_handler
vhost/scsi: silence uninitialized variable warning
vhost: scsi: constify target_core_fabric_ops structures
Linus Torvalds [Sun, 22 Jan 2017 20:36:47 +0000 (12:36 -0800)]
Merge branch 'for-rc' of git://git./linux/kernel/git/rzhang/linux
Pull thermal management fixes from Zhang Rui:
- fix a regression that thermal zone dynamically allocated sysfs
attributes are freed before they're removed, which is introduced in
4.10-rc1 (Jacob von Chorus)
- fix a boot warning because deprecated hwmon API is used (Fabio
Estevam)
- a couple of fixes for rockchip thermal driver (Brian Norris, Caesar
Wang)
* 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
thermal: rockchip: fixes the conversion table
thermal: core: move tz->device.groups cleanup to thermal_release
thermal: thermal_hwmon: Convert to hwmon_device_register_with_info()
thermal: rockchip: handle set_trips without the trip points
thermal: rockchip: optimize the conversion table
thermal: rockchip: fixes invalid temperature case
thermal: rockchip: don't pass table structs by value
thermal: rockchip: improve conversion error messages
Linus Torvalds [Sun, 22 Jan 2017 03:01:06 +0000 (19:01 -0800)]
Merge tag 'usb-4.10-rc5' of git://git./linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are a few small USB fixes for 4.10-rc5.
Most of these are gadget/dwc2 fixes for reported issues, all of these
have been in linux-next for a while. The last one is a single xhci
WARN_ON removal to handle an issue that the dwc3 driver is hitting in
the 4.10-rc tree. The warning is harmless and needs to be removed, and
a "real" fix that is more complex will show up in 4.11-rc1 for this
device.
That last patch hasn't been in linux-next yet due to the weekend
timing, but it's a "simple" WARN_ON() removal so what could go wrong?
:)"
Famous last words.
* tag 'usb-4.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
xhci: remove WARN_ON if dma mask is not set for platform devices
usb: dwc2: host: fix Wmaybe-uninitialized warning
usb: dwc2: gadget: Fix GUSBCFG.USBTRDTIM value
usb: gadget: udc: atmel: remove memory leak
usb: dwc3: exynos fix axius clock error path to do cleanup
usb: dwc2: Avoid suspending if we're in gadget mode
usb: dwc2: use u32 for DT binding parameters
usb: gadget: f_fs: Fix iterations on endpoints.
usb: dwc2: gadget: Fix DMA memory freeing
usb: gadget: composite: Fix function used to free memory
Linus Torvalds [Sun, 22 Jan 2017 02:53:06 +0000 (18:53 -0800)]
Merge branch 'libnvdimm-fixes' of git://git./linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams:
"Two fixes:
- a regression fix for the multiple-pmem-namespace-per-region support
added in 4.9. Even if an existing environment is not using that
feature the act of creating and a destroying a single namespace
with the ndctl utility will lead to the proliferation of extra
unwanted namespace devices.
- a fix for the error code returned from the pmem driver when the
memcpy_mcsafe() routine returns -EFAULT. Btrfs seems to be the only
block I/O consumer that tries to parse the meaning of the error
code when it is non-zero.
Neither of these fixes are critical, the namespace leak is awkward in
that it can cause device naming to change and complicates debugging
namespace initialization issues. The error code fix is included out of
caution for what other consumers might be expecting -EIO for block I/O
errors"
* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
libnvdimm, namespace: fix pmem namespace leak, delete when size set to zero
pmem: return EIO on read_pmem() failure
Linus Torvalds [Sun, 22 Jan 2017 02:46:45 +0000 (18:46 -0800)]
Merge tag 'clk-fixes-for-linus' of git://git./linux/kernel/git/clk/linux
Pull clk fix from Stephen Boyd:
"One fix for Samsung Exynos524x SoCs where recent IOMMU patches have
caused some of these clocks to turn off when they were always left on
before"
* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
clk/samsung: exynos542x: mark some clocks as critical
Linus Torvalds [Sun, 22 Jan 2017 02:07:40 +0000 (18:07 -0800)]
Merge tag 'arc-4.10-rc5' of git://git./linux/kernel/git/vgupta/arc
Pull ARC fixes from Vineet Gupta:
- more intc updates [Yuriv]
- fix module build when unwinder is turned off
- IO Coherency Programming model updates
- other miscellaneous
* tag 'arc-4.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARC: Revert "ARC: mm: IOC: Don't enable IOC by default"
ARC: mm: split arc_cache_init to allow __init reaping of bulk
ARCv2: IOC: Use actual memory size to setup aperture size
ARCv2: IOC: Adhere to progamming model guidelines to avoid DMA corruption
ARCv2: IOC: refactor the IOC and SLC operations into own functions
ARC: module: Fix !CONFIG_ARC_DW2_UNWIND builds
ARCv2: save r30 on kernel entry as gcc uses it for code-gen
ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP
ARC: IRQ: Use hwirq instead of virq in mask/unmask
ARC: mmu: clarify the MMUv3 programming model
Linus Torvalds [Sun, 22 Jan 2017 01:58:45 +0000 (17:58 -0800)]
Merge tag 'powerpc-4.10-2' of git://git./linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman:
"Two fixes for fallout from the hugetlb changes we merged this cycle.
Ten other fixes, four only affect Power9, and the rest are a bit of a
mixture though nothing terrible.
Thanks to: Aneesh Kumar K.V, Anton Blanchard, Benjamin Herrenschmidt,
Dave Martin, Gavin Shan, Madhavan Srinivasan, Nicholas Piggin, Reza
Arbab"
* tag 'powerpc-4.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc: Ignore reserved field in DCSR and PVR reads and writes
powerpc/ptrace: Preserve previous TM fprs/vsrs on short regset write
powerpc/ptrace: Preserve previous fprs/vsrs on short regset write
powerpc/perf: Use MSR to report privilege level on P9 DD1
selftest/powerpc: Wrong PMC initialized in pmc56_overflow test
powerpc/eeh: Enable IO path on permanent error
powerpc/perf: Fix PM_BRU_CMPL event code for power9
powerpc/mm: Fix little-endian 4K hugetlb
powerpc/mm/hugetlb: Don't panic when we don't find the default huge page size
powerpc: Fix pgtable pmd cache init
powerpc/icp-opal: Fix missing KVM case and harden replay
powerpc/mm: Fix memory hotplug BUG() on radix
Linus Torvalds [Fri, 20 Jan 2017 22:19:34 +0000 (14:19 -0800)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm
Pull KVM fixes from Radim Krčmář:
"ARM:
- Fix for timer setup on VHE machines
- Drop spurious warning when the timer races against the vcpu running
again
- Prevent a vgic deadlock when the initialization fails (for stable)
s390:
- Fix a kernel memory exposure (for stable)
x86:
- Fix exception injection when hypercall instruction cannot be
patched"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: s390: do not expose random data via facility bitmap
KVM: x86: fix fixing of hypercalls
KVM: arm/arm64: vgic: Fix deadlock on error handling
KVM: arm64: Access CNTHCTL_EL2 bit fields correctly on VHE systems
KVM: arm/arm64: Fix occasional warning from the timer work function
Linus Torvalds [Fri, 20 Jan 2017 22:17:04 +0000 (14:17 -0800)]
Merge branch 'scsi-target-for-v4.10' of git://git./linux/kernel/git/bvanassche/linux
Pull SCSI target fixes from Bart Van Assche:
- two small fixes for the ibmvscsis driver
- ten patches with bug fixes for the target mode of the qla2xxx driver
- four patches that avoid that the "sparse" and "smatch" static
analyzer tools report false positives for the qla2xxx code base
* 'scsi-target-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bvanassche/linux:
qla2xxx: Disable out-of-order processing by default in firmware
qla2xxx: Fix erroneous invalid handle message
qla2xxx: Reduce exess wait during chip reset
qla2xxx: Terminate exchange if corrupted
qla2xxx: Fix crash due to null pointer access
qla2xxx: Collect additional information to debug fw dump
qla2xxx: Reset reserved field in firmware options to 0
qla2xxx: Set tcm_qla2xxx version to automatically track qla2xxx version
qla2xxx: Include ATIO queue in firmware dump when in target mode
qla2xxx: Fix wrong IOCB type assumption
qla2xxx: Avoid that building with W=1 triggers complaints about set-but-not-used variables
qla2xxx: Move two arrays from header files to .c files
qla2xxx: Declare an array with file scope static
qla2xxx: Fix indentation
ibmvscsis: Fix sleeping in interrupt context
ibmvscsis: Fix max transfer length
Linus Torvalds [Fri, 20 Jan 2017 20:28:02 +0000 (12:28 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
"Just two small fixes for this -rc.
One is just killing an unused variable from Keith, but the other
fixes a performance regression for nbd in this series, where we
inadvertently flipped when we set MSG_MORE when outputting data"
* 'for-linus' of git://git.kernel.dk/linux-block:
nbd: only set MSG_MORE when we have more to send
blk-mq: Remove unused variable
Linus Torvalds [Fri, 20 Jan 2017 20:25:11 +0000 (12:25 -0800)]
Merge tag 'spi-fix-v4.10-rc4' of git://git./linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown:
"The usual small smattering of driver specific fixes. A few bits that
stand out here:
- the R-Car patches adding fallbacks are just adding new compatible
strings to the driver so that device trees are written in a more
robustly future proof fashion, this isn't strictly a fix but it's
just new IDs and it's better to get it into mainline sooner to
improve the ABI
- the DesignWare "switch to new API part 2" patch is actually a
misleadingly titled fix for a bit that got missed in the original
conversion"
* tag 'spi-fix-v4.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: davinci: use dma_mapping_error()
spi: spi-axi: Free resources on error path
spi: pxa2xx: add missed break
spi: dw-mid: switch to new dmaengine_terminate_* API (part 2)
spi: dw: Make debugfs name unique between instances
spi: sh-msiof: Do not use C++ style comment
spi: armada-3700: Set mode bits correctly
spi: armada-3700: fix unsigned compare than zero on irq
spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings
spi: SPI_FSL_DSPI should depend on HAS_DMA
Linus Torvalds [Fri, 20 Jan 2017 20:15:48 +0000 (12:15 -0800)]
Merge tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client
Pull ceph fixes from Ilya Dryomov:
"Three filesystem endianness fixes (one goes back to the 2.6 era, all
marked for stable) and two fixups for this merge window's patches"
* tag 'ceph-for-4.10-rc5' of git://github.com/ceph/ceph-client:
ceph: fix bad endianness handling in parse_reply_info_extra
ceph: fix endianness bug in frag_tree_split_cmp
ceph: fix endianness of getattr mask in ceph_d_revalidate
libceph: make sure ceph_aes_crypt() IV is aligned
ceph: fix ceph_get_caps() interruption
Linus Torvalds [Fri, 20 Jan 2017 19:58:30 +0000 (11:58 -0800)]
Merge branch 'overlayfs-linus' of git://git./linux/kernel/git/mszeredi/vfs
Pull overlayfs fix from Miklos Szeredi:
"This fixes a regression introduced in this cycle"
* 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
ovl: fix possible use after free on redirect dir lookup
Linus Torvalds [Fri, 20 Jan 2017 19:56:29 +0000 (11:56 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mszeredi/fuse
Pull fuse fixes from Miklos Szeredi:
"Fix two regressions, one introduced in 4.9 and a less recent one in
4.2"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: fix time_to_jiffies nsec sanity check
fuse: clear FR_PENDING flag when moving requests out of pending queue
Linus Torvalds [Fri, 20 Jan 2017 19:47:18 +0000 (11:47 -0800)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is a set of 12 fixes including the mpt3sas one that was causing
hangs on ATA passthrough.
The others are a couple of zoned block device fixes, a SAS device
detection bug which lead to SATA drives not being matched to bays, two
qla2xxx MSI fixes, a qla2xxx req for rsp confusion caused by cut and
paste, and a few other minor fixes"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: mpt3sas: fix hang on ata passthrough commands
scsi: lpfc: Set elsiocb contexts to NULL after freeing it
scsi: sd: Ignore zoned field for host-managed devices
scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type
scsi: bfa: fix wrongly initialized variable in bfad_im_bsg_els_ct_request()
scsi: ses: Fix SAS device detection in enclosure
scsi: libfc: Fix variable name in fc_set_wwpn
scsi: lpfc: avoid double free of resource identifiers
scsi: qla2xxx: remove irq_affinity_notifier
scsi: qla2xxx: fix MSI-X vector affinity
scsi: qla2xxx: Fix apparent cut-n-paste error.
scsi: qla2xxx: Get mutex lock before checking optrom_state
Linus Torvalds [Fri, 20 Jan 2017 19:44:47 +0000 (11:44 -0800)]
Merge tag 'arm64-fixes' of git://git./linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas:
- avoid potential stack information leak via the ptrace ABI caused by
uninitialised variables
- SWIOTLB DMA API fall-back allocation fix when the SWIOTLB buffer is
not initialised (all RAM is suitable for 32-bit DMA masks)
- fix the bad_mode function returning for unhandled exceptions coming
from user space
- fix name clash in __page_to_voff()
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: avoid returning from bad_mode
arm64/ptrace: Reject attempts to set incomplete hardware breakpoint fields
arm64/ptrace: Avoid uninitialised struct padding in fpr_set()
arm64/ptrace: Preserve previous registers for short regset write
arm64/ptrace: Preserve previous registers for short regset write
arm64/ptrace: Preserve previous registers for short regset write
arm64: mm: avoid name clash in __page_to_voff()
arm64: Fix swiotlb fallback allocation
Radim Krčmář [Fri, 20 Jan 2017 16:59:02 +0000 (17:59 +0100)]
Merge tag 'kvm-s390-master-4.10-1' of git://git./linux/kernel/git/kvms390/linux
KVM: s390: Fix for 4.10 (via kvm/master)
Fix a kernel memory exposure.
Christian Borntraeger [Thu, 12 Jan 2017 15:25:15 +0000 (16:25 +0100)]
KVM: s390: do not expose random data via facility bitmap
kvm_s390_get_machine() populates the facility bitmap by copying bytes
from the host results that are stored in a 256 byte array in the prefix
page. The KVM code does use the size of the target buffer (2k), thus
copying and exposing unrelated kernel memory (mostly machine check
related logout data).
Let's use the size of the source buffer instead. This is ok, as the
target buffer will always be greater or equal than the source buffer as
the KVM internal buffers (and thus S390_ARCH_FAC_LIST_SIZE_BYTE) cover
the maximum possible size that is allowed by STFLE, which is 256
doublewords. All structures are zero allocated so we can leave bytes
256-2047 unchanged.
Add a similar fix for kvm_arch_init_vm().
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
[found with smatch]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: stable@vger.kernel.org
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Mathias Nyman [Fri, 20 Jan 2017 13:38:24 +0000 (15:38 +0200)]
xhci: remove WARN_ON if dma mask is not set for platform devices
The warn on is a bit too much, we will anyway set the dma mask if not set
previously.
The main reason for this fix is that 4.10-rc1 has a dwc3 change that
pass a parent sysdev dev pointer instead of setting the dma mask of
its xhci platform device. xhci platform driver can then get more
attributes from the sysdev than just the dma mask.
The usb core and xhci changes are not yet in 4.10, and a fix like
this was preferred instead of taking those big changes this late in
the rc-cycle.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Zhang Rui [Fri, 20 Jan 2017 08:24:54 +0000 (16:24 +0800)]
Merge branches 'thermal-core' and 'thermal-soc' into for-rc
Anton Blanchard [Thu, 19 Jan 2017 03:19:10 +0000 (14:19 +1100)]
powerpc: Ignore reserved field in DCSR and PVR reads and writes
IBM bit 31 (for the rest of us - bit 0) is a reserved field in the
instruction definition of mtspr and mfspr. Hardware is encouraged to
(and does) ignore it.
As a result, if userspace executes an mtspr DSCR with the reserved bit
set, we get a DSCR facility unavailable exception. The kernel fails to
match against the expected value/mask, and we silently return to
userspace to try and re-execute the same mtspr DSCR instruction. We
loop forever until the process is killed.
We should do something here, and it seems mirroring what hardware does
is the better option vs killing the process. While here, relax the
matching of mfspr PVR too.
Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Dave Martin [Thu, 5 Jan 2017 16:50:57 +0000 (16:50 +0000)]
powerpc/ptrace: Preserve previous TM fprs/vsrs on short regset write
Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET
to fill all the check pointed registers, the thread's old check pointed
registers are preserved.
Fixes:
9d3918f7c0e5 ("powerpc/ptrace: Enable support for NT_PPC_CVSX")
Fixes:
19cbcbf75a0c ("powerpc/ptrace: Enable support for NT_PPC_CFPR")
Cc: stable@vger.kernel.org # v4.8+
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Dave Martin [Thu, 5 Jan 2017 16:50:57 +0000 (16:50 +0000)]
powerpc/ptrace: Preserve previous fprs/vsrs on short regset write
Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET
to fill all the registers, the thread's old registers are preserved.
Fixes:
c6e6771b87d4 ("powerpc: Introduce VSX thread_struct and CONFIG_VSX")
Cc: stable@vger.kernel.org # v2.6.27+
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Linus Torvalds [Fri, 20 Jan 2017 00:40:03 +0000 (16:40 -0800)]
Merge tag 'armsoc-fixes' of git://git./linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Olof Johansson:
"We've been sitting on fixes for a while, and they keep trickling in at
a low rate. Nothing in here comes across as particularly scary or
noteworthy, for the most part it's a large collection of small DT
tweaks"
* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (24 commits)
ARM: dts: da850-evm: fix read access to SPI flash
ARM: dts: omap3: Fix Card Detect and Write Protect on Logic PD SOM-LV
ARM64: dts: meson-gxbb-odroidc2: Disable SCPI DVFS
ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
ARM: dts: NSP: Fix DT ranges error
ARM: multi_v7_defconfig: set bcm47xx watchdog
ARM: multi_v7_defconfig: fix config typo
ARM: dts: dra72-evm-revc: fix typo in ethernet-phy node
soc: ti: wkup_m3_ipc: Fix error return code in wkup_m3_ipc_probe()
ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation
ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
ARM: dts: sun8i: Support DTB build for NanoPi M1
ARM: dts: sun6i: hummingbird: Enable display engine again
ARM: dts: sun6i: Disable display pipeline by default
ARM, ARM64: dts: drop "arm,amba-bus" in favor of "simple-bus" part 3
ARM: dts: imx6qdl-nitrogen6_som2: fix sgtl5000 pinctrl init
ARM: dts: imx6qdl-nitrogen6_max: fix sgtl5000 pinctrl init
ARM: OMAP1: DMA: Correct the number of logical channels
ARM: dts: am335x-icev2: Remove the duplicated pinmux setting
ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate
...
Linus Torvalds [Fri, 20 Jan 2017 00:33:00 +0000 (16:33 -0800)]
Merge tag 'xfs-for-linux-4.10-rc5-1' of git://git./fs/xfs/xfs-linux
Pull xfs fixes from Darrick Wong:
"I have a few more patches this week -- one to make the behavior of a
quota id ioctl consistent with the other filesystems, and the rest
improve validation of i_mode & i_size values coming into xfs so that
we don't read off the ends of arrays or crash when handed garbage disk
data.
Summary:
- inode i_mode sanitization
- prevent overflows in getnextquota
- minor build fixes"
* tag 'xfs-for-linux-4.10-rc5-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: fix xfs_mode_to_ftype() prototype
xfs: don't wrap ID in xfs_dq_get_next_id
xfs: sanity check inode di_mode
xfs: sanity check inode mode when creating new dentry
xfs: replace xfs_mode_to_ftype table with switch statement
xfs: add missing include dependencies to xfs_dir2.h
xfs: sanity check directory inode di_size
xfs: make the ASSERT() condition likely
Fabien Parent [Tue, 17 Jan 2017 12:57:42 +0000 (13:57 +0100)]
ARM: dts: da850-evm: fix read access to SPI flash
Read access to the SPI flash are broken on da850-evm, i.e. the data
read is not what is actually programmed on the flash.
According to the datasheet for the M25P64 part present on the da850-evm,
if the SPI frequency is higher than 20MHz then the READ command is not
usable anymore and only the FAST_READ command can be used to read data.
This commit specifies in the DTS that we should use FAST_READ command
instead of the READ command.
Cc: stable@vger.kernel.org
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Fabien Parent <fparent@baylibre.com>
[nsekhar@ti.com: subject line adjustment]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Bhumika Goyal [Fri, 13 Jan 2017 18:48:56 +0000 (00:18 +0530)]
virtio/s390: virtio: constify virtio_config_ops structures
Declare virtio_config_ops structure as const as it is only stored in the
config field of a virtio_device structure. This field is of type const, so
virtio_config_ops structures having this property can be declared const.
Done using Coccinelle:
@r1 disable optional_qualifier@
identifier i;
position p;
@@
static struct virtio_config_ops i@p={...};
@ok1@
identifier r1.i;
position p;
struct virtio_ccw_device x;
@@
x.vdev.config=&i@p
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct virtio_config_ops i;
File size before and after applying the patch remains the same.
text data bss dec hex filename
9235 296 32928 42459 a5db drivers/s390/virtio/virtio_ccw.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Message-Id: <
1484333336-13443-1-git-send-email-bhumirks@gmail.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Colin Ian King [Tue, 27 Sep 2016 20:08:44 +0000 (13:08 -0700)]
virtio/s390: add missing \n to end of dev_err message
Trival fix, dev_err message is missing a \n, so add it.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Message-Id: <
20160927200844.16008-1-colin.king@canonical.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Pierre Morel [Fri, 28 Aug 2015 09:09:32 +0000 (11:09 +0200)]
virtio/s390: support READ_STATUS command for virtio-ccw
As virtio-1 introduced the possibility of the device manipulating the
status byte, revision 2 of the virtio-ccw transport introduced a means
of getting the status byte from the device via READ_STATUS. Let's wire
it up for revisions >= 2 and fall back to returning the stored status
byte if not supported.
Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Halil Pasic [Fri, 2 Sep 2016 15:59:36 +0000 (17:59 +0200)]
tools/virtio/ringtest: tweaks for s390
Make ringtest work on s390 too.
Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Acked-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Halil Pasic [Mon, 29 Aug 2016 16:25:22 +0000 (18:25 +0200)]
tools/virtio/ringtest: fix run-on-all.sh for offline cpus
Since
ef1b144d ("tools/virtio/ringtest: fix run-on-all.sh to work
without /dev/cpu") run-on-all.sh uses seq 0 $HOST_AFFINITY as the list
of ids of the CPUs to run the command on (assuming ids of online CPUs
are consecutive and start from 0), where $HOST_AFFINITY is the highest
CPU id in the system previously determined using lscpu. This can fail
on systems with offline CPUs.
Instead let's use lscpu to determine the list of online CPUs.
Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Fixes:
ef1b144d ("tools/virtio/ringtest: fix run-on-all.sh to work without
/dev/cpu")
Reviewed-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
G. Campana [Thu, 19 Jan 2017 21:37:46 +0000 (23:37 +0200)]
virtio_console: fix a crash in config_work_handler
Using control_work instead of config_work as the 3rd argument to
container_of results in an invalid portdev pointer. Indeed, the work
structure is initialized as below:
INIT_WORK(&portdev->config_work, &config_work_handler);
It leads to a crash when portdev->vdev is dereferenced later. This
bug
is triggered when the guest uses a virtio-console without multiport
feature and receives a config_changed virtio interrupt.
Signed-off-by: G. Campana <gcampana@quarkslab.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Dan Carpenter [Thu, 12 Jan 2017 18:45:04 +0000 (21:45 +0300)]
vhost/scsi: silence uninitialized variable warning
This is to silence an uninitialized variable warning in debug output.
The problem is this line:
pr_debug("vhost_get_vq_desc: head: %d, out: %u in: %u\n",
head, out, in);
If "head == vq->num" is true on the first iteration then "out" and "in"
aren't initialized. We handle that a few lines after the printk. I was
tempted to just delete the pr_debug() but I decided to just initialize
them to zero instead.
Also checkpatch.pl complains if variables are declared as just
"unsigned" without the "int".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Bhumika Goyal [Mon, 9 Jan 2017 15:21:02 +0000 (20:51 +0530)]
vhost: scsi: constify target_core_fabric_ops structures
Declare target_core_fabric_ops strucrues as const as they are only
passed as an argument to the functions target_register_template and
target_unregister_template. The arguments are of type const struct
target_core_fabric_ops *, so target_core_fabric_ops structures having
this property can be declared const.
Done using Coccinelle:
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct target_core_fabric_ops i@p={...};
@ok@
position p;
identifier r.i;
@@
(
target_register_template(&i@p)
|
target_unregister_template(&i@p)
)
@bad@
position p!={r.p,ok.p};
identifier r.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
+const
struct target_core_fabric_ops i;
File size before: drivers/vhost/scsi.o
text data bss dec hex filename
18063 2985 40 21088 5260 drivers/vhost/scsi.o
File size after: drivers/vhost/scsi.o
text data bss dec hex filename
18479 2601 40 21120 5280 drivers/vhost/scsi.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Josef Bacik [Thu, 19 Jan 2017 21:08:49 +0000 (16:08 -0500)]
nbd: only set MSG_MORE when we have more to send
A user noticed that write performance was horrible over loopback and we
traced it to an inversion of when we need to set MSG_MORE. It should be
set when we have more bvec's to send, not when we are on the last bvec.
This patch made the test go from 20 iops to 78k iops.
Signed-off-by: Josef Bacik <jbacik@fb.com>
Fixes:
429a787be679 ("nbd: fix use-after-free of rq/bio in the xmit path")
Signed-off-by: Jens Axboe <axboe@fb.com>
Linus Torvalds [Thu, 19 Jan 2017 17:59:46 +0000 (09:59 -0800)]
Merge tag 'pci-v4.10-fixes-1' of git://git./linux/kernel/git/helgaas/pci
Pull PCI fixes from Bjorn Helgaas:
- recognize that a PCI-to-PCIe bridge originates a PCIe hierarchy, so
we enumerate that hierarchy correctly
- X-Gene: fix a change merged for v4.10 that broke MSI
- Keystone: avoid reading undefined registers, which can cause
asynchronous external aborts
- Supermicro X8DTH-i/6/iF/6F: ignore broken _CRS that caused us to
change (and break) existing I/O port assignments
* tag 'pci-v4.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling
PCI: Enumerate switches below PCI-to-PCIe bridges
x86/PCI: Ignore _CRS on Supermicro X8DTH-i/6/iF/6F
PCI: designware: Check for iATU unroll only on platforms that use ATU
Linus Torvalds [Thu, 19 Jan 2017 17:49:58 +0000 (09:49 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
- regression fix for generic Wacom devices, from Jason Gerecke
- DMA-on-stack fixes for hid-corsair driver, from Johan Hovold
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: wacom: Fix sibling detection regression
HID: corsair: fix control-transfer error handling
HID: corsair: fix DMA buffers on stack
Linus Torvalds [Thu, 19 Jan 2017 17:46:10 +0000 (09:46 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/s390/linux
Pull two s390 bug fixes from Martin Schwidefsky:
"Two changes, the first is a fix to add a missing memory clobber to the
inline assembly to load control registers. This has not caused any
issues so far, but who knows what code gcc will generate in future
versions.
The second change is an update for the default configurations. This
includes CONFIG_BUG_ON_DATA_CORRUPTION=y, we want this to be enabled
for s390. The usual approach to debug problems on production systems
is to use crash on a system dump and for us avoiding data corruptions
is priority one"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390: update defconfigs
s390/ctl_reg: make __ctl_load a full memory barrier
Linus Torvalds [Thu, 19 Jan 2017 17:38:27 +0000 (09:38 -0800)]
Merge tag 'for-linus-4.10-rc4-tag' of git://git./linux/kernel/git/xen/tip
Pull xen fix from Juergen Gross:
"A fix for Xen running in nested virtualization environment"
* tag 'for-linus-4.10-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
partially revert "xen: Remove event channel notification through Xen PCI platform device"
Mark Rutland [Wed, 18 Jan 2017 17:23:41 +0000 (17:23 +0000)]
arm64: avoid returning from bad_mode
Generally, taking an unexpected exception should be a fatal event, and
bad_mode is intended to cater for this. However, it should be possible
to contain unexpected synchronous exceptions from EL0 without bringing
the kernel down, by sending a SIGILL to the task.
We tried to apply this approach in commit
9955ac47f4ba1c95 ("arm64:
don't kill the kernel on a bad esr from el0"), by sending a signal for
any bad_mode call resulting from an EL0 exception.
However, this also applies to other unexpected exceptions, such as
SError and FIQ. The entry paths for these exceptions branch to bad_mode
without configuring the link register, and have no kernel_exit. Thus, if
we take one of these exceptions from EL0, bad_mode will eventually
return to the original user link register value.
This patch fixes this by introducing a new bad_el0_sync handler to cater
for the recoverable case, and restoring bad_mode to its original state,
whereby it calls panic() and never returns. The recoverable case
branches to bad_el0_sync with a bl, and returns to userspace via the
usual ret_to_user mechanism.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Fixes:
9955ac47f4ba1c95 ("arm64: don't kill the kernel on a bad esr from el0")
Reported-by: Mark Salter <msalter@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Jason Gerecke [Tue, 17 Jan 2017 23:38:58 +0000 (15:38 -0800)]
HID: wacom: Fix sibling detection regression
Commit
345857b ("HID: wacom: generic: Add support for sensor offsets") included
a change to the operation and location of the call to 'wacom_add_shared_data'
in 'wacom_parse_and_register'. The modifications included moving it higher up
so that it would occur before the call to 'wacom_retrieve_hid_descriptor'. This
was done to prevent a crash that would have occured when the report containing
tablet offsets was fed into the driver with 'wacom_hid_report_raw_event'
(specifically: the various 'wacom_wac_*_report' functions were written with the
assumption that they would only be called once tablet setup had completed;
'wacom_wac_pen_report' in particular dereferences 'shared' which wasn't yet
allocated).
Moving the call to 'wacom_add_shared_data' effectively prevented the crash but
also broke the sibiling detection code which assumes that the HID descriptor
has been read and the various device_type flags set.
To fix this situation, we restore the original 'wacom_add_shared_data'
operation and location and instead implement an alternative change that can
also prevent the crash. Specifically, we notice that the report functions
mentioned above expect to be called only for input reports. By adding a check,
we can prevent feature reports (such as the offset report) from
causing trouble.
Fixes:
345857bb49 ("HID: wacom: generic: Add support for sensor offsets")
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Tested-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Vineet Gupta [Tue, 17 Jan 2017 19:09:18 +0000 (11:09 -0800)]
ARC: Revert "ARC: mm: IOC: Don't enable IOC by default"
The programming model has been fixed with prev patches so re-enable it
by default
This reverts commit
23cb1f644019bac49d87b4dd7c1eac0569cc4f53.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Vineet Gupta [Wed, 18 Jan 2017 23:10:52 +0000 (15:10 -0800)]
ARC: mm: split arc_cache_init to allow __init reaping of bulk
arc_cache_init() is called for each core so can't be tagged __init.
However bulk of it is only executed by master core and thus is candidate
for __init reaping.
So split it up to allow that.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Olof Johansson [Thu, 19 Jan 2017 00:11:03 +0000 (16:11 -0800)]
Merge tag 'omap-for-v4.10/fixes-rc4' of git://git./linux/kernel/git/tmlind/linux-omap into fixes
Fixes for omaps for v4.10-rc cycle. Mostly a DMA regression fix for
omap1, and then a handful of trivial fixes for boards and devices to
work:
- Fixes TI wilink bluetooth strange platform data baud rate
- Remove duplicate pinmux line for am335x-icev2
- Fix omap1 dma regression
- Fix uninitialized return value for wkup_m3_ipc_probe()
- Fix Ethernet PHY binding typo for dra72-evm
- Fix init for omap5 and dra7 sata ports
- Fix mmc card detect pin for Logic PD SOM-LV
* tag 'omap-for-v4.10/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: dts: omap3: Fix Card Detect and Write Protect on Logic PD SOM-LV
ARM: dts: OMAP5 / DRA7: indicate that SATA port 0 is available.
ARM: dts: dra72-evm-revc: fix typo in ethernet-phy node
soc: ti: wkup_m3_ipc: Fix error return code in wkup_m3_ipc_probe()
ARM: OMAP1: DMA: Correct the number of logical channels
ARM: dts: am335x-icev2: Remove the duplicated pinmux setting
ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate
Signed-off-by: Olof Johansson <olof@lixom.net>