ac100:marvin24s-kernel.git
5 years agoARM: tegra: paz00: fix wake gpio key l4t-r16-ac100
Marc Dietrich [Fri, 19 Oct 2012 15:16:14 +0000 (17:16 +0200)]
ARM: tegra: paz00: fix wake gpio key

This is obviously wrong, but hey, does it change something?

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoASoC: tegra: alc5632: make missing speaker gpio non-fatal
Marc Dietrich [Sat, 13 Oct 2012 17:17:14 +0000 (19:17 +0200)]
ASoC: tegra: alc5632: make missing speaker gpio non-fatal

This is just for cases you don't want paz00 board support.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: register nvec early
Marc Dietrich [Sat, 13 Oct 2012 17:14:56 +0000 (19:14 +0200)]
ARM: tegra: paz00: register nvec early

By doing this, nvec suspend will get called late, so everything
should be down except ec.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: make event driver configurable
Marc Dietrich [Sat, 13 Oct 2012 15:09:02 +0000 (17:09 +0200)]
staging: nvec: make event driver configurable

This adds platform data to the events driver. This way, board files
(and later device tree) can configure which events to program and
react on.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Fri, 12 Oct 2012 16:37:58 +0000 (18:37 +0200)]
ARM: tegra: paz00: update defconfig

enable:
- compile in usb storage (we have no modules in initrd due to
size restrictions
- s/CONFIG_NVEC_LEDS/CONFIG_NVEC_PAZ00/

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoASoC: tegra: paz00: use dsp_a format on mono playback
Marc Dietrich [Wed, 10 Oct 2012 17:31:38 +0000 (19:31 +0200)]
ASoC: tegra: paz00: use dsp_a format on mono playback

This fixes the error messages meant to fixed in the previous reverted
commit.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoRevert "ASoC: tegra: only stereo is supported"
Marc Dietrich [Wed, 10 Oct 2012 16:43:07 +0000 (18:43 +0200)]
Revert "ASoC: tegra: only stereo is supported"

This reverts commit 4c646377834bb5c39d76f28c8407cd86fef3b71d.

5 years agoASoC: tegra+alc5632: add speaker enable gpio
Marc Dietrich [Mon, 28 May 2012 15:17:32 +0000 (17:17 +0200)]
ASoC: tegra+alc5632: add speaker enable gpio

This patch adds the possibility to toggle a speaker amplifier on playback
which is controlled by a gpio.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: remove mute function from events driver
Marc Dietrich [Sun, 7 Oct 2012 16:23:03 +0000 (18:23 +0200)]
staging: nvec: remove mute function from events driver

This will get done by the sound board driver in the next commit.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: add gpio driver to oem driver
Marc Dietrich [Sun, 7 Oct 2012 16:20:40 +0000 (18:20 +0200)]
staging: nvec: add gpio driver to oem driver

This will enable control of the amp mute gpio connected to the ec.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: don't reset the mouse on init
Marc Dietrich [Sun, 24 Jun 2012 19:56:58 +0000 (21:56 +0200)]
staging: nvec: don't reset the mouse on init

Let the subsystem decide when to reset the mouse. This may avoid
timeouts during init.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: move led init out of probe to its own function
Marc Dietrich [Sun, 7 Oct 2012 15:43:41 +0000 (17:43 +0200)]
staging: nvec: move led init out of probe to its own function

Moves the led init to its own function. This is in preparation to
the following speaker mute inclusion via a gpio driver.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: add remove function to nvec childs
Marc Dietrich [Sun, 24 Jun 2012 21:25:21 +0000 (23:25 +0200)]
staging: nvec: add remove function to nvec childs

This patch cleanups registered devices on remove.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: nvec: cleanup powermanagement callbacks
Marc Dietrich [Sun, 24 Jun 2012 21:25:19 +0000 (23:25 +0200)]
staging: nvec: cleanup powermanagement callbacks

Simplify powermanagement initialization by using pm_ops macro.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: cleanup driver registration
Marc Dietrich [Sun, 24 Jun 2012 21:25:18 +0000 (23:25 +0200)]
staging: nvec: cleanup driver registration

This patch simplifies code by using the module_platform_driver
macro.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: convert to devm_ functions
Marc Dietrich [Sun, 24 Jun 2012 21:25:16 +0000 (23:25 +0200)]
staging: nvec: convert to devm_ functions

This patch cleanups the nvec and its childs by replacing calls to
resource allocations by their devm_* equivalents.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: use dev_warn instead of printk
Marc Dietrich [Sun, 24 Jun 2012 21:25:17 +0000 (23:25 +0200)]
staging: nvec: use dev_warn instead of printk

Replace a printk in nvec core driver with dev_warn.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: nvec: rename led driver to board specific paz00 driver
Marc Dietrich [Sun, 7 Oct 2012 14:51:40 +0000 (16:51 +0200)]
staging: nvec: rename led driver to board specific paz00 driver

The led driver used OEM commands which are not part of the nvec protocol
definition. Therefore it is renamed to nvec_paz00 to reflect that it only
applies to PAZ00 board based devices.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: cleanup the string mess
Marc Dietrich [Thu, 28 Jun 2012 18:08:35 +0000 (20:08 +0200)]
staging: nvec: cleanup the string mess

Replace the various command strings by named constants.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: move toggle global event reporting to its own function
Marc Dietrich [Sat, 23 Jun 2012 18:47:34 +0000 (20:47 +0200)]
staging: nvec: move toggle global event reporting to its own function

Cleanup toggle of global event reporting by moving it to its own function.
This simplifies the following cleanup.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: rename fuse driver
Marc Dietrich [Tue, 2 Oct 2012 21:35:03 +0000 (23:35 +0200)]
ARM: tegra: rename fuse driver

The fuse driver registers parameters and thus create a /sys/module/fuse directory
which collides with the fuse filesystem driver.

Rename fuse.c to tegra-fuse.c to fix this.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agofuse: register_filesystem() called too early
Al Viro [Tue, 13 Dec 2011 17:25:27 +0000 (12:25 -0500)]
fuse: register_filesystem() called too early

same story as with ubifs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
5 years agofuse: llseek fix race
Miklos Szeredi [Tue, 13 Dec 2011 10:40:59 +0000 (11:40 +0100)]
fuse: llseek fix race

Fix race between lseek(fd, 0, SEEK_CUR) and read/write.  This was fixed in
generic code by commit 5b6f1eb97d (vfs: lseek(fd, 0, SEEK_CUR) race condition).

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Mon, 24 Sep 2012 19:19:49 +0000 (21:19 +0200)]
ARM: tegra: paz00: update defconfig

This one
enables TEGRA__AVP_KERNEL_ON_MMU
disables CONFIG_TEGRA_NVAVP

as in tegra_defconfig and noted by fly-away on IRC.

This makes video playback with nvgstplayer working here.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: remove wakelocks from config again
Marc Dietrich [Fri, 21 Sep 2012 17:53:57 +0000 (19:53 +0200)]
ARM: tegra: paz00: remove wakelocks from config again

These didn't fix resume, but caused more harm instead.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: nvec: check for error on sync write
Marc Dietrich [Mon, 17 Sep 2012 16:42:51 +0000 (18:42 +0200)]
staging: nvec: check for error on sync write

This prevents oops if tx buffer is full. Well, we are lost anyway
here, but better than nothing.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: add sm0/1 slew rates to regulator
Marc Dietrich [Mon, 17 Sep 2012 16:38:58 +0000 (18:38 +0200)]
ARM: tegra: paz00: add sm0/1 slew rates to regulator

copied from ventana, no fallout issues yet.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: disable direct tps power off
Marc Dietrich [Sun, 16 Sep 2012 17:22:21 +0000 (19:22 +0200)]
ARM: tegra: paz00: disable direct tps power off

Doh! We don't power off with tps directly. Let nvec do this job.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Sun, 16 Sep 2012 14:32:13 +0000 (16:32 +0200)]
ARM: tegra: paz00: update defconfig

enable:
- frontswap
- wakelocks (for earlysuspend)
- cpuquite (shutdown single cpu cores?)

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agopower: wakelocks: fix console early suspend
Marc Dietrich [Sun, 16 Sep 2012 14:28:34 +0000 (16:28 +0200)]
power: wakelocks: fix console early suspend

This miscompiles because the inteface was changed.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: nvec: add earlysuspend/lateresume to the ps2 driver
Marc Dietrich [Sun, 16 Sep 2012 14:26:28 +0000 (16:26 +0200)]
staging: nvec: add earlysuspend/lateresume to the ps2 driver

This moves mouse enable/disable to earlysuspend/lateresume calls.
It needs CONFIG_WAKELOCKS. This seems to make resumes more reliable.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: fix cpu suspend timers
Marc Dietrich [Sun, 16 Sep 2012 10:28:27 +0000 (12:28 +0200)]
ARM: tegra: paz00: fix cpu suspend timers

This syncs cpu_timer and cpu_off_timer with the original source
values (instead of just copying the harmony values).

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: disable unused regulators
Marc Dietrich [Sun, 16 Sep 2012 10:27:36 +0000 (12:27 +0200)]
ARM: tegra: paz00: disable unused regulators

This disables unused regulators on boot.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: i2c addresses for new i2c slaves
Marc Dietrich [Wed, 12 Sep 2012 17:28:24 +0000 (19:28 +0200)]
ARM: tegra: paz00: i2c addresses for new i2c slaves

Assign 0xFC as i2c slave address for all new i2c slaves (pick from
ventana). This may reduce confusion of the slave controller because
it sits on the same bus than the master.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: make sure to register backlight after DCs
Marc Dietrich [Fri, 7 Sep 2012 16:49:23 +0000 (18:49 +0200)]
ARM: tegra: paz00: make sure to register backlight after DCs

Copied over from ventana

"Register backlight device after tegradc.0 and tegradc.1. This makes
sure turning on/off backlight in correct sequence and eliminates the
flicker during suspending and resuming."

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: report wake gpio status to gpio_keys
Marc Dietrich [Fri, 7 Sep 2012 16:34:55 +0000 (18:34 +0200)]
ARM: tegra: paz00: report wake gpio status to gpio_keys

This was just copied over from ventana to let the gpio_keys driver
report "key pressed/released" after resume. Can't see any impact.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: ventana: get rid of gpio enable/disable calls
Marc Dietrich [Fri, 7 Sep 2012 16:02:47 +0000 (18:02 +0200)]
ARM: tegra: ventana: get rid of gpio enable/disable calls

see other boards: gpio_enable/disable is auto-called by request/free.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Fri, 7 Sep 2012 13:13:52 +0000 (15:13 +0200)]
ARM: tegra: paz00: update defconfig

- update to r16 kernel
- disable VT_HW_CONSOLE_BINDING to fix console=tty0 oops

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: fix compilation of with newer gcc
Marc Dietrich [Fri, 7 Sep 2012 12:49:35 +0000 (14:49 +0200)]
ARM: tegra: fix compilation of with newer gcc

on tegra2, phys_addr_t is u32, hence use %x instead of %lx.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: update panel code
Marc Dietrich [Wed, 5 Sep 2012 17:48:22 +0000 (19:48 +0200)]
ARM: tegra: paz00: update panel code

This was broken after r16 rebase (grhost is replaced by host1x) and
nvmap was moved to include/linux where it belongs.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: nvec: release sync write lock in error case
Marc Dietrich [Sun, 19 Aug 2012 15:51:52 +0000 (17:51 +0200)]
staging: nvec: release sync write lock in error case

We forgot to release the sync write lock in case the async write
fails. Found by rpiloose on IRC.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: nvec: try to fix mouse suspend/resume
Marc Dietrich [Sun, 22 Jul 2012 12:37:06 +0000 (14:37 +0200)]
staging: nvec: try to fix mouse suspend/resume

this time I got it right - I swear ...

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoupdate defconfig ...
Marc Dietrich [Wed, 15 Aug 2012 17:39:39 +0000 (19:39 +0200)]
update defconfig ...

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: mark emmc as internal
Marc Dietrich [Sun, 29 Jul 2012 12:30:00 +0000 (14:30 +0200)]
ARM: tegra: paz00: mark emmc as internal

This reduces some warnings during boot.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: fix copy'n paste error
Marc Dietrich [Fri, 3 Aug 2012 18:05:43 +0000 (20:05 +0200)]
ARM: tegra: paz00: fix copy'n paste error

Fix bogis vbus gpio copied from ventana.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: nvec: fix bus clock
Marc Dietrich [Sun, 29 Jul 2012 09:59:46 +0000 (11:59 +0200)]
staging: nvec: fix bus clock

This was set to a too high value in the clock table. Also later on
the nvec didn't got the right clock at all (used the controller clock)
instead of the bus clock. Urg.

I failed to used clk_add_alias so I just added a dup clock as the
vibrante slave driver does it for tegra3.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: port to new usb interface
Marc Dietrich [Wed, 25 Jul 2012 18:45:11 +0000 (20:45 +0200)]
ARM: tegra: paz00: port to new usb interface

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: disable copy of bootloader framebuffer
Marc Dietrich [Sat, 21 Jul 2012 19:07:58 +0000 (21:07 +0200)]
ARM: tegra: paz00: disable copy of bootloader framebuffer

Disable copy of the bootloader framebuffer to kernel framebuffer.
This avoids corruption our nice Toshiba logo.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Fri, 13 Jul 2012 17:34:22 +0000 (19:34 +0200)]
ARM: tegra: paz00: update defconfig

- remove some useless sound / camera drivers
- enable zsmalloc

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoARM: tegra: paz00: skip framebuffer copy if no boot framebuffer is available
Marc Dietrich [Fri, 13 Jul 2012 17:17:47 +0000 (19:17 +0200)]
ARM: tegra: paz00: skip framebuffer copy if no boot framebuffer is available

This fixes boots using u-boot which does not yet supply a boot framebuffer.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: nvec: fix clock enable on resume
Marc Dietrich [Wed, 11 Jul 2012 19:59:34 +0000 (21:59 +0200)]
staging: nvec: fix clock enable on resume

I don't know why the clock was disabled and enabled shortly after,
but we failed to enable it on resume. So remove the clock disable.

This fixes 2nd and later suspend/resume fails.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agovideo: tegra: make carveout heap relocations less noisy
Marc Dietrich [Sun, 8 Jul 2012 18:27:39 +0000 (20:27 +0200)]
video: tegra: make carveout heap relocations less noisy

Reduce kern log spam.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: tegra: only stereo is supported
Marc Dietrich [Sun, 8 Jul 2012 17:30:25 +0000 (19:30 +0200)]
ASoC: tegra: only stereo is supported

Report min/max_channels = 2 to limit output to stereo only. Otherwise
we get a lot of errors in the kernel log.

*** This is an upstream candidate! ***

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb.
Jeongdo Son [Thu, 14 Jun 2012 17:28:01 +0000 (02:28 +0900)]
rt2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb.

This is a RT3070 based device.

Signed-off-by: Jeongdo Son <sohn9086@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00 : RT3290 chip support v4
Woody Hung [Wed, 13 Jun 2012 07:01:16 +0000 (15:01 +0800)]
rt2x00 : RT3290 chip support v4

This patch support the new chipset rt3290 wifi implementation in rt2x00.
It initailize the related mac, bbp and rf register in startup phase.
And this patch modify the efuse read/write method for the different efuse data offset of rt3290.

Signed-off-by: Woody Hung <Woody.Hung@mediatek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00:Add RT5392 chipset support
Zero.Lin [Tue, 29 May 2012 08:11:09 +0000 (16:11 +0800)]
rt2x00:Add RT5392 chipset support

Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00: claim RSN IBSS support
Stanislaw Gruszka [Mon, 28 May 2012 09:53:11 +0000 (11:53 +0200)]
rt2x00: claim RSN IBSS support

Similar like other drivers, do not configure group keys to the hardware
(on Ad-Hoc mode) to make IBSS RSN work.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00: Add support for RT5360 based PCI devices.
villacis@palosanto.com [Wed, 16 May 2012 19:07:12 +0000 (21:07 +0200)]
rt2x00: Add support for RT5360 based PCI devices.

This chip is used at least by the D-Link DWA-525 adapter.

Signed-off-by: Alex Villac<ED>s Lasso <a_villacis@palosanto.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2800usb: 2001:3c17 is an RT3370 device
Albert Pool [Mon, 14 May 2012 16:08:32 +0000 (18:08 +0200)]
rt2800usb: 2001:3c17 is an RT3370 device

D-Link DWA-123 rev A1

Signed-off-by: Albert Pool<albertpool@solcon.nl>
Cc: <stable@vger.kernel.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00: use atomic variable for seqno
Stanislaw Gruszka [Fri, 1 Jun 2012 09:29:40 +0000 (11:29 +0200)]
rt2x00: use atomic variable for seqno

Remove spinlock as atomic_t can be used instead. Note we use only 16
lower bits, upper bits are changed but we impilcilty cast to u16.

This fix possible deadlock on IBSS mode reproted by lockdep:

=================================
[ INFO: inconsistent lock state ]
3.4.0-wl+ #4 Not tainted
---------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
kworker/u:2/30374 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&(&intf->seqlock)->rlock){+.?...}, at: [<f9979a20>] rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
{IN-SOFTIRQ-W} state was registered at:
  [<c04978ab>] __lock_acquire+0x47b/0x1050
  [<c0498504>] lock_acquire+0x84/0xf0
  [<c0835733>] _raw_spin_lock+0x33/0x40
  [<f9979a20>] rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
  [<f9979f2a>] rt2x00queue_write_tx_frame+0x1a/0x300 [rt2x00lib]
  [<f997834f>] rt2x00mac_tx+0x7f/0x380 [rt2x00lib]
  [<f98fe363>] __ieee80211_tx+0x1b3/0x300 [mac80211]
  [<f98ffdf5>] ieee80211_tx+0x105/0x130 [mac80211]
  [<f99000dd>] ieee80211_xmit+0xad/0x100 [mac80211]
  [<f9900519>] ieee80211_subif_start_xmit+0x2d9/0x930 [mac80211]
  [<c0782e87>] dev_hard_start_xmit+0x307/0x660
  [<c079bb71>] sch_direct_xmit+0xa1/0x1e0
  [<c0784bb3>] dev_queue_xmit+0x183/0x730
  [<c078c27a>] neigh_resolve_output+0xfa/0x1e0
  [<c07b436a>] ip_finish_output+0x24a/0x460
  [<c07b4897>] ip_output+0xb7/0x100
  [<c07b2d60>] ip_local_out+0x20/0x60
  [<c07e01ff>] igmpv3_sendpack+0x4f/0x60
  [<c07e108f>] igmp_ifc_timer_expire+0x29f/0x330
  [<c04520fc>] run_timer_softirq+0x15c/0x2f0
  [<c0449e3e>] __do_softirq+0xae/0x1e0
irq event stamp: 18380437
hardirqs last  enabled at (18380437): [<c0526027>] __slab_alloc.clone.3+0x67/0x5f0
hardirqs last disabled at (18380436): [<c0525ff3>] __slab_alloc.clone.3+0x33/0x5f0
softirqs last  enabled at (18377616): [<c0449eb3>] __do_softirq+0x123/0x1e0
softirqs last disabled at (18377611): [<c041278d>] do_softirq+0x9d/0xe0

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&(&intf->seqlock)->rlock);
  <Interrupt>
    lock(&(&intf->seqlock)->rlock);

 *** DEADLOCK ***

4 locks held by kworker/u:2/30374:
 #0:  (wiphy_name(local->hw.wiphy)){++++.+}, at: [<c045cf99>] process_one_work+0x109/0x3f0
 #1:  ((&sdata->work)){+.+.+.}, at: [<c045cf99>] process_one_work+0x109/0x3f0
 #2:  (&ifibss->mtx){+.+.+.}, at: [<f98f005b>] ieee80211_ibss_work+0x1b/0x470 [mac80211]
 #3:  (&intf->beacon_skb_mutex){+.+...}, at: [<f997a644>] rt2x00queue_update_beacon+0x24/0x50 [rt2x00lib]

stack backtrace:
Pid: 30374, comm: kworker/u:2 Not tainted 3.4.0-wl+ #4
Call Trace:
 [<c04962a6>] print_usage_bug+0x1f6/0x220
 [<c0496a12>] mark_lock+0x2c2/0x300
 [<c0495ff0>] ? check_usage_forwards+0xc0/0xc0
 [<c04978ec>] __lock_acquire+0x4bc/0x1050
 [<c0527890>] ? __kmalloc_track_caller+0x1c0/0x1d0
 [<c0777fb6>] ? copy_skb_header+0x26/0x90
 [<c0498504>] lock_acquire+0x84/0xf0
 [<f9979a20>] ? rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
 [<c0835733>] _raw_spin_lock+0x33/0x40
 [<f9979a20>] ? rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
 [<f9979a20>] rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
 [<f997a5cf>] rt2x00queue_update_beacon_locked+0x5f/0xb0 [rt2x00lib]
 [<f997a64d>] rt2x00queue_update_beacon+0x2d/0x50 [rt2x00lib]
 [<f9977e3a>] rt2x00mac_bss_info_changed+0x1ca/0x200 [rt2x00lib]
 [<f9977c70>] ? rt2x00mac_remove_interface+0x70/0x70 [rt2x00lib]
 [<f98e4dd0>] ieee80211_bss_info_change_notify+0xe0/0x1d0 [mac80211]
 [<f98ef7b8>] __ieee80211_sta_join_ibss+0x3b8/0x610 [mac80211]
 [<c0496ab4>] ? mark_held_locks+0x64/0xc0
 [<c0440012>] ? virt_efi_query_capsule_caps+0x12/0x50
 [<f98efb09>] ieee80211_sta_join_ibss+0xf9/0x140 [mac80211]
 [<f98f0456>] ieee80211_ibss_work+0x416/0x470 [mac80211]
 [<c0496d8b>] ? trace_hardirqs_on+0xb/0x10
 [<c077683b>] ? skb_dequeue+0x4b/0x70
 [<f98f207f>] ieee80211_iface_work+0x13f/0x230 [mac80211]
 [<c045cf99>] ? process_one_work+0x109/0x3f0
 [<c045d015>] process_one_work+0x185/0x3f0
 [<c045cf99>] ? process_one_work+0x109/0x3f0
 [<f98f1f40>] ? ieee80211_teardown_sdata+0xa0/0xa0 [mac80211]
 [<c045ed86>] worker_thread+0x116/0x270
 [<c045ec70>] ? manage_workers+0x1e0/0x1e0
 [<c0462f64>] kthread+0x84/0x90
 [<c0462ee0>] ? __init_kthread_worker+0x60/0x60
 [<c083d382>] kernel_thread_helper+0x6/0x10

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00:Add RT539b chipset support
Zero.Lin [Thu, 10 May 2012 02:06:31 +0000 (10:06 +0800)]
rt2x00:Add RT539b chipset support

Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00: Add debugfs access for rfcsr register
Anisse Astier [Thu, 19 Apr 2012 13:53:10 +0000 (15:53 +0200)]
rt2x00: Add debugfs access for rfcsr register

RFCSR is only used in rt2800. For other chipsets, the debug struct
for rfcsr should be zeroed, which isn't be an issue, since the code
can now cope with that.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00: debugfs support - allow a register to be empty
Anisse Astier [Thu, 19 Apr 2012 13:04:52 +0000 (15:04 +0200)]
rt2x00: debugfs support - allow a register to be empty

Allow a register to be unspecified, therefore not creating its debugfs
file entry.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2800: add chipset revision RT5390R support
Anisse Astier [Mon, 23 Apr 2012 10:33:11 +0000 (12:33 +0200)]
rt2800: add chipset revision RT5390R support

About 70% of the chips with revision RT5390R initialize incorrectly, using
the auxiliary antenna instead of the main one. The net result is that
signal reception is very poor (no AP further than 1M).

This chipset differs from RT5390 and RT5390F by its support of hardware
antenna diversity. Therefore antenna selection should be done
differently, by disabling software features and previously selected
antenna.

This changeset does just that, and makes all RT5390R work properly.

This is based on Ralink's 2012_03_22_RT5572_Linux_STA_v2.6.0.0_DPO
driver.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2x00: Use GFP_KERNEL for rx buffer allocation on USB devices
Helmut Schaa [Thu, 19 Apr 2012 11:24:10 +0000 (13:24 +0200)]
rt2x00: Use GFP_KERNEL for rx buffer allocation on USB devices

Since the RX path on USB devices is handled in process context we can
use GFP_KERNEL for RX buffer allocation. This should reduce the
likelihood of allocation failures.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Tested-By: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agort2800: debugfs register access: BBP is 256 bytes big
Anisse Astier [Thu, 19 Apr 2012 09:20:32 +0000 (11:20 +0200)]
rt2800: debugfs register access: BBP is 256 bytes big

We're already using BBP for values > 128. Make that explicit and allow
debugfs access.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: alc5632: sync with mainline
Marc Dietrich [Fri, 6 Jul 2012 19:15:49 +0000 (21:15 +0200)]
ASoC: alc5632: sync with mainline

I don't know where this I2S Pwr stuff came from.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: tegra+alc5632: Swap MICBIAS1 and MIC1 dapm widgets
Andrey Danin [Fri, 25 May 2012 20:27:02 +0000 (00:27 +0400)]
ASoC: tegra+alc5632: Swap MICBIAS1 and MIC1 dapm widgets

MICBIAS1 is internal widget. If MICBIAS1 is connected to board driver
instead of MIC1 asoc core enables widgets even if capture stream isn't
active

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Conflicts:

sound/soc/codecs/alc5632.c
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: alc5632: Convert to devm_regmap_init_i2c()
Axel Lin [Tue, 8 May 2012 15:44:55 +0000 (23:44 +0800)]
ASoC: alc5632: Convert to devm_regmap_init_i2c()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: alc5632: Convert to module_i2c_driver()
Axel Lin [Tue, 8 May 2012 15:43:33 +0000 (23:43 +0800)]
ASoC: alc5632: Convert to module_i2c_driver()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: alc5632: Fix I2S digital interface power for recording
Andrey Danin [Sat, 11 Feb 2012 21:26:34 +0000 (23:26 +0200)]
ASoC: alc5632: Fix I2S digital interface power for recording

Fix I2S digital interface power for recording.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: alc5632: Refactored DAPM routes to add voice support
Andrey Danin [Sat, 11 Feb 2012 21:26:32 +0000 (23:26 +0200)]
ASoC: alc5632: Refactored DAPM routes to add voice support

Refactored DAPM routes to add voice support.

- Added undocumented register
- Used AIF in/out
- Added missed voice items and routes
- Added DMIC input
- Romoved unrelevant items

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Conflicts:

sound/soc/codecs/alc5632.c
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: Add __devinit/__devexit annotations at necessary places
Axel Lin [Mon, 23 Jan 2012 03:18:17 +0000 (11:18 +0800)]
ASoC: Add __devinit/__devexit annotations at necessary places

Fix below build warning when CONFIG_HOTPLUG is not set.

  CC      sound/soc/codecs/alc5623.o
sound/soc/codecs/alc5623.c:1062: warning: â\80\98alc5623_i2c_removeâ\80\99 defined but not used
  CC      sound/soc/codecs/alc5632.o
sound/soc/codecs/alc5632.c:1112: warning: â\80\98alc5632_i2c_removeâ\80\99 defined but not used

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: Constify snd_soc_dai_ops structs
Author: Lars-Peter Clausen [Fri, 6 Jul 2012 16:17:14 +0000 (18:17 +0200)]
ASoC: Constify snd_soc_dai_ops structs

upstream: 85e7652d89293a6dab42bfd31f276f8bc072d4c5

Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
arley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
urprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: alc5632: Remove volatile registers from regmap defaults
Leon Romanovsky [Thu, 17 Nov 2011 16:48:42 +0000 (18:48 +0200)]
ASoC: alc5632: Remove volatile registers from regmap defaults

There is no need to provide defaults for the volatile
registers and doing so might cause confusion.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: alc5632: Update of i2c_probe function to use regmap API only
Leon Romanovsky [Thu, 17 Nov 2011 10:01:30 +0000 (12:01 +0200)]
ASoC: alc5632: Update of i2c_probe function to use regmap API only

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Conflicts:

sound/soc/codecs/alc5632.c
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: alc5632: Remove unrelevant registers and name the relevant
Leon Romanovsky [Thu, 17 Nov 2011 10:01:28 +0000 (12:01 +0200)]
ASoC: alc5632: Remove unrelevant registers and name the relevant

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agoASoC: Convert ALC5632 codec to use regmap API
Leon Romanovsky [Wed, 16 Nov 2011 10:06:58 +0000 (12:06 +0200)]
ASoC: Convert ALC5632 codec to use regmap API

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Conflicts:

sound/soc/codecs/alc5632.c
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: add zsmalloc to Kconfig/Makefile
Seth Jennings [Mon, 9 Jan 2012 22:51:57 +0000 (16:51 -0600)]
staging: add zsmalloc to Kconfig/Makefile

Adds the new zsmalloc library to the staging Kconfig and Makefile

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agox86: add local_tlb_flush_kernel_range()
Seth Jennings [Mon, 25 Jun 2012 16:14:38 +0000 (11:14 -0500)]
x86: add local_tlb_flush_kernel_range()

This patch adds support for a local_tlb_flush_kernel_range()
function for the x86 arch.  This function allows for CPU-local
TLB flushing, potentially using invlpg for single entry flushing,
using an arch independent function name.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agozsmalloc: add generic path and remove x86 dependency
Seth Jennings [Mon, 25 Jun 2012 16:14:37 +0000 (11:14 -0500)]
zsmalloc: add generic path and remove x86 dependency

This patch adds generic pages mapping methods that
work on all archs in the absence of support for
local_tlb_flush_kernel_range() advertised by the
arch through __HAVE_LOCAL_TLB_FLUSH_KERNEL_RANGE

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOC
Seth Jennings [Mon, 25 Jun 2012 16:14:36 +0000 (11:14 -0500)]
staging: zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOC

This patch switches zcache and zram dependency to ZSMALLOC
rather than X86.  There is no net change since ZSMALLOC
depends on X86, however, this prevent further changes to
these files as zsmalloc dependencies change.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zsmalloc: Finish conversion to a separate module
Ben Hutchings [Wed, 20 Jun 2012 01:31:11 +0000 (02:31 +0100)]
staging: zsmalloc: Finish conversion to a separate module

ZSMALLOC is tristate, but the code has no MODULE_LICENSE and since it
depends on GPL-only symbols it cannot be loaded as a module.  This in
turn breaks zram which now depends on it.  I assume it's meant to be
Dual BSD/GPL like the other z-stuff.

There is also no module_exit, which will make it impossible to unload.
Add the appropriate module_init and module_exit declarations suggested
by comments.

Reported-by: Christian Ohm <chr.ohm@gmx.net>
References: http://bugs.debian.org/677273
Cc: stable@vger.kernel.org # v3.4
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm/frontswap: cleanup doc and comment error
Wanpeng Li [Sat, 16 Jun 2012 12:37:48 +0000 (20:37 +0800)]
mm/frontswap: cleanup doc and comment error

Signed-off-by: Wanpeng Li <liwp.linux@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zcache: don't limit number of pools per client
Sasha Levin [Wed, 6 Jun 2012 19:05:48 +0000 (21:05 +0200)]
staging: zcache: don't limit number of pools per client

Currently the amount of pools each client can use is limited to 16, this is
and arbitrary limit which isn't really required by current implementation.

This places and arbitrary limit on the number of mounted filesystems that
can use cleancache.

This patch removes that limit and uses IDR to do sparse mapping of pools
in each client.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zsmalloc: fix uninit'ed variable warning
Seth Jennings [Wed, 13 Jun 2012 21:03:42 +0000 (16:03 -0500)]
staging: zsmalloc: fix uninit'ed variable warning

This patch fixes an uninitialized variable warning in
alloc_zspage().  It also fixes the secondary issue of
prev_page leaving scope on each loop iteration.  The only
reason this ever worked was because prev_page was occupying
the same space on the stack on each iteration.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: remove unneeded headers
Marc Dietrich [Sat, 30 Jun 2012 21:22:34 +0000 (23:22 +0200)]
mm: frontswap: remove unneeded headers

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

mm/frontswap.c
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: split out function to clear a page out
Sasha Levin [Sun, 10 Jun 2012 10:51:07 +0000 (12:51 +0200)]
mm: frontswap: split out function to clear a page out

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: remove unnecessary check during initialization
Sasha Levin [Sun, 10 Jun 2012 10:51:05 +0000 (12:51 +0200)]
mm: frontswap: remove unnecessary check during initialization

The check whether frontswap is enabled or not is done in the API functions in
the frontswap header, before they are passed to the internal
double-underscored frontswap functions.

Remove the check from __frontswap_init for consistency.

Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: make all branches of if statement in put page consistent
Sasha Levin [Sun, 10 Jun 2012 10:51:04 +0000 (12:51 +0200)]
mm: frontswap: make all branches of if statement in put page consistent

Currently it has a complex structure where different things are compared
at each branch. Simplify that and make both branches look similar.

Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: split frontswap_shrink further to simplify locking
Sasha Levin [Sun, 10 Jun 2012 10:51:03 +0000 (12:51 +0200)]
mm: frontswap: split frontswap_shrink further to simplify locking

Split frontswap_shrink to simplify the locking in the original code.

Also, assert that the function that was split still runs under the
swap spinlock.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: split out __frontswap_unuse_pages
Sasha Levin [Sun, 10 Jun 2012 10:51:02 +0000 (12:51 +0200)]
mm: frontswap: split out __frontswap_unuse_pages

An attempt at making frontswap_shrink shorter and more readable. This patch
splits out walking through the swap list to find an entry with enough
pages to unuse.

Also, assert that the internal __frontswap_unuse_pages is called under swap
lock, since that part of code was previously directly happen inside the lock.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: split out __frontswap_curr_pages
Sasha Levin [Sun, 10 Jun 2012 10:51:01 +0000 (12:51 +0200)]
mm: frontswap: split out __frontswap_curr_pages

Code was duplicated in two functions, clean it up.

Also, assert that the deduplicated code runs under the swap spinlock.

Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: trivial coding convention issues
Sasha Levin [Sun, 10 Jun 2012 10:51:00 +0000 (12:51 +0200)]
mm: frontswap: trivial coding convention issues

Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agomm: frontswap: remove casting from function calls through ops structure
Marc Dietrich [Sat, 30 Jun 2012 21:19:13 +0000 (23:19 +0200)]
mm: frontswap: remove casting from function calls through ops structure

Removes unneeded casts.

Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

mm/frontswap.c

Conflicts:

mm/frontswap.c
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zram: conventions, __aligned() attribute
Sam Hansen [Thu, 7 Jun 2012 23:03:48 +0000 (16:03 -0700)]
staging: zram: conventions, __aligned() attribute

Using the __aligned() attribute in favor of __attribute__((aligned(size)))

Signed-off-by: Sam Hansen <solid.se7en@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zram: conventions pr_warning -> pr_warn()
Sam Hansen [Thu, 7 Jun 2012 23:03:47 +0000 (16:03 -0700)]
staging: zram: conventions pr_warning -> pr_warn()

Porting zram to use the pr_warn() function instead of the deprecated
pr_warning().

Signed-off-by: Sam Hansen <solid.se7en@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zsmalloc documentation
Nitin Gupta [Sun, 10 Jun 2012 00:41:14 +0000 (17:41 -0700)]
staging: zsmalloc documentation

Documentation of various struct page fields
used by zsmalloc.

Changes for v2:
- Regroup descriptions as suggested by Konrad

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zram: fix random data read
Minchan Kim [Fri, 8 Jun 2012 06:39:26 +0000 (15:39 +0900)]
staging: zram: fix random data read

fd1a30de makes a bug that it uses (struct page *) as zsmalloc's handle
although it's a uncompressed page so that it can access random page,
return random data or even crashed by get_first_page in zs_map_object.

Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Conflicts:

drivers/staging/zram/zram_drv.c
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
6 years agostaging: zsmalloc: zsmalloc: use unsigned long instead of void *
Minchan Kim [Fri, 8 Jun 2012 06:39:25 +0000 (15:39 +0900)]
staging: zsmalloc: zsmalloc: use unsigned long instead of void *

We should use unsigned long as handle instead of void * to avoid any
confusion. Without this, users may just treat zs_malloc return value as
a pointer and try to deference it.

This patch passed compile test(zram, zcache and ramster) and zram is
tested on qemu.

changelog
  * from v2
- remove hval pointed out by Nitin
- based on next-20120607
  * from v1
- change zcache's zv_create return value
- baesd on next-20120604

Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Conflicts:

drivers/staging/zram/zram_drv.c
Signed-off-by: Marc Dietrich <marvin24@gmx.de>