Commit graph

376342 commits

Author SHA1 Message Date
Sanjay Lal 6d17c0d1e8 KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()
- As suggested by Gleb, wrap calls to gfn_to_pfn() with srcu_read_lock/unlock().
  Memory slots should be acccessed from a SRCU read section.
- kvm_mips_map_page() now returns an error code to it's callers, instead of
  calling panic() if it cannot find a mapping for a particular gfn.

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
2013-05-22 11:44:09 +03:00
Sanjay Lal ba86e4dda7 KVM/MIPS32: Move include/asm/kvm.h => include/uapi/asm/kvm.h since it is a user visible API.
Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
2013-05-22 11:42:53 +03:00
Simon Horman 5f10428e4a ARM: shmobile: marzen: Use error values in usb_power_*
This patch updates the marzen board code as if USB PHY isn't enabled
they phy will have a value set by ERR_PTR() rather than be NULL.

Without this patch a NULL pointer dereference  and kernel panic
occurs on initialisation of USB on marzen.

This resolves a regression introduced in 3.10-rc1 by
b7fa5c2aec
("usb: phy: return -ENXIO when PHY layer isn't enabled").

Tested-by: Nguyen Hong Ky <nh-ky@jinso.co.jp>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-05-22 15:43:16 +09:00
Ralf Baechle 087d990b37 MIPS: Idle: Break r4k_wait into two functions and fix it.
local_irq_enable() may expand into very different code, so it rather should
stay in C.  Also this keeps the assembler code size constant which keeps
the rollback code simple.  So it's best to split r4k_wait into two parts,
one C and one assembler.

Finally add the local_irq_enable() to r4k_wait to ensure the WAIT
instruction in __r4k_wait() will work properly.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:28 +02:00
Ralf Baechle f94d9a8ef9 MIPS: Idle: Do address fiddlery in helper functions.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:28 +02:00
Ralf Baechle bdc92d74e0 MIPS: Idle: Consolidate all declarations in <asm/idle.h>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:27 +02:00
Ralf Baechle d882f07a83 MIPS: Idle: Don't call local_irq_disable() in cpu_wait() implementations.
The generic idle loop has already disabled interrupts so this is redundant.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:27 +02:00
Ralf Baechle fb40bc3e94 MIPS: Idle: Re-enable irqs at the end of r3081, au1k and loongson2 cpu_wait.
Without this, the

    WARN_ON_ONCE(irqs_disabled());

in the idle loop will be triggered.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:26 +02:00
Ralf Baechle c9b6869dbb MIPS: Idle: Make call of function pointer readable.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:26 +02:00
Ralf Baechle f91a148aa2 MIPS: Idle: Consistently reformat inline assembler.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:25 +02:00
Ralf Baechle 00baf8576c MIPS: Idle: cleaup SMTC idle hook as per Linux coding style.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:25 +02:00
Ralf Baechle 49f2ec91e1 MIPS: Consolidate idle loop / WAIT instruction support in a single file.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:25 +02:00
Ralf Baechle 1a461c5bdc MIPS: clock.h: Remove declaration of cpu_wait.
Duplicate and has no business in this header file.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:25 +02:00
Ralf Baechle 154c267008 Add include dependencies to <linux/printk.h>.
If <linux/linkage.h> has not been included before <linux/printk.h>,
a build error like the below one will result:

  CC      arch/mips/kernel/idle.o
In file included from arch/mips/kernel/idle.c:17:0:
include/linux/printk.h:109:1: error: data definition has no type or storage class [-Werror]
include/linux/printk.h:109:1: error: type defaults to ‘int’ in declaration of ‘asmlinkage’ [-Werror=implicit-int]
include/linux/printk.h:110:1: error: ‘format’ attribute only applies to function types [-Werror=attributes]
include/linux/printk.h:110:1: error: expected ‘,’ or ‘;’ before ‘int’
include/linux/printk.h:114:1: error: data definition has no type or storage class [-Werror]
include/linux/printk.h:114:1: error: type defaults to ‘int’ in declaration of ‘asmlinkage’ [-Werror=implicit-int]
include/linux/printk.h:115:1: error: ‘format’ attribute only applies to function types [-Werror=attributes]
include/linux/printk.h:115:1: error: expected ‘,’ or ‘;’ before ‘int’
include/linux/printk.h:117:1: error: data definition has no type or storage class [-Werror]
include/linux/printk.h:117:1: error: type defaults to ‘int’ in declaration of ‘asmlinkage’ [-Werror=implicit-int]
include/linux/printk.h:118:1: error: ‘format’ attribute only applies to function types [-Werror=attributes]
include/linux/printk.h:118:1: error: ‘__cold__’ attribute ignored [-Werror=attributes]
include/linux/printk.h:118:1: error: expected ‘,’ or ‘;’ before ‘asmlinkage’
include/linux/printk.h:122:1: error: data definition has no type or storage class [-Werror]
include/linux/printk.h:122:1: error: type defaults to ‘int’ in declaration of ‘asmlinkage’ [-Werror=implicit-int]
include/linux/printk.h:123:1: error: ‘format’ attribute only applies to function types [-Werror=attributes]
include/linux/printk.h:123:1: error: ‘__cold__’ attribute ignored [-Werror=attributes]
include/linux/printk.h:123:1: error: expected ‘,’ or ‘;’ before ‘int’
In file included from include/linux/kernel.h:14:0,
                 from include/linux/sched.h:15,
                 from arch/mips/kernel/idle.c:18:
include/linux/dynamic_debug.h: In function ‘ddebug_dyndbg_module_param_cb’:
include/linux/dynamic_debug.h:124:3: error: implicit declaration of function ‘printk’ [-Werror=implicit-function-declaration]

Fixed by including <linux/linkage.h>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:24 +02:00
Dirk Brandewie c96d53d600 cpufreq / intel_pstate: Add additional supported CPU ID
Add CPU ID for Ivybrigde processor.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-05-22 00:28:44 +02:00
Viresh Kumar 955ef48335 cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT
With the rwsem lock around
__cpufreq_governor(policy, CPUFREQ_GOV_POLICY_EXIT), we
get circular dependency when we call sysfs_remove_group().

 ======================================================
 [ INFO: possible circular locking dependency detected ]
 3.9.0-rc7+ #15 Not tainted
 -------------------------------------------------------
 cat/2387 is trying to acquire lock:
  (&per_cpu(cpu_policy_rwsem, cpu)){+++++.}, at: [<c02f6179>] lock_policy_rwsem_read+0x25/0x34

 but task is already holding lock:
  (s_active#41){++++.+}, at: [<c00f9bf7>] sysfs_read_file+0x4f/0xcc

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

-> #1 (s_active#41){++++.+}:
        [<c0055a79>] lock_acquire+0x61/0xbc
        [<c00fabf1>] sysfs_addrm_finish+0xc1/0x128
        [<c00f9819>] sysfs_hash_and_remove+0x35/0x64
        [<c00fbe6f>] remove_files.isra.0+0x1b/0x24
        [<c00fbea5>] sysfs_remove_group+0x2d/0xa8
        [<c02f9a0b>] cpufreq_governor_interactive+0x13b/0x35c
        [<c02f61df>] __cpufreq_governor+0x2b/0x8c
        [<c02f6579>] __cpufreq_set_policy+0xa9/0xf8
        [<c02f6b75>] store_scaling_governor+0x61/0x100
        [<c02f6f4d>] store+0x39/0x60
        [<c00f9b81>] sysfs_write_file+0xed/0x114
        [<c00b3fd1>] vfs_write+0x65/0xd8
        [<c00b424b>] sys_write+0x2f/0x50
        [<c000cdc1>] ret_fast_syscall+0x1/0x52

-> #0 (&per_cpu(cpu_policy_rwsem, cpu)){+++++.}:
        [<c0055253>] __lock_acquire+0xef3/0x13dc
        [<c0055a79>] lock_acquire+0x61/0xbc
        [<c03ee1f5>] down_read+0x25/0x30
        [<c02f6179>] lock_policy_rwsem_read+0x25/0x34
        [<c02f6edd>] show+0x21/0x58
        [<c00f9c0f>] sysfs_read_file+0x67/0xcc
        [<c00b40a7>] vfs_read+0x63/0xd8
        [<c00b41fb>] sys_read+0x2f/0x50
        [<c000cdc1>] ret_fast_syscall+0x1/0x52

 other info that might help us debug this:

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(s_active#41);
                                lock(&per_cpu(cpu_policy_rwsem, cpu));
                                lock(s_active#41);
   lock(&per_cpu(cpu_policy_rwsem, cpu));

  *** DEADLOCK ***

 2 locks held by cat/2387:
  #0:  (&buffer->mutex){+.+.+.}, at: [<c00f9bcd>] sysfs_read_file+0x25/0xcc
  #1:  (s_active#41){++++.+}, at: [<c00f9bf7>] sysfs_read_file+0x4f/0xcc

 stack backtrace:
 [<c0011d55>] (unwind_backtrace+0x1/0x9c) from [<c03e9a09>] (print_circular_bug+0x19d/0x1e8)
 [<c03e9a09>] (print_circular_bug+0x19d/0x1e8) from [<c0055253>] (__lock_acquire+0xef3/0x13dc)
 [<c0055253>] (__lock_acquire+0xef3/0x13dc) from [<c0055a79>] (lock_acquire+0x61/0xbc)
 [<c0055a79>] (lock_acquire+0x61/0xbc) from [<c03ee1f5>] (down_read+0x25/0x30)
 [<c03ee1f5>] (down_read+0x25/0x30) from [<c02f6179>] (lock_policy_rwsem_read+0x25/0x34)
 [<c02f6179>] (lock_policy_rwsem_read+0x25/0x34) from [<c02f6edd>] (show+0x21/0x58)
 [<c02f6edd>] (show+0x21/0x58) from [<c00f9c0f>] (sysfs_read_file+0x67/0xcc)
 [<c00f9c0f>] (sysfs_read_file+0x67/0xcc) from [<c00b40a7>] (vfs_read+0x63/0xd8)
 [<c00b40a7>] (vfs_read+0x63/0xd8) from [<c00b41fb>] (sys_read+0x2f/0x50)
 [<c00b41fb>] (sys_read+0x2f/0x50) from [<c000cdc1>] (ret_fast_syscall+0x1/0x52)

This lock isn't required while calling __cpufreq_governor(policy,
CPUFREQ_GOV_POLICY_EXIT). Remove it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-05-22 00:23:54 +02:00
Rafael J. Wysocki ec4602a958 ACPI / PM: Allow device power states to be used for CONFIG_PM unset
Currently, drivers/acpi/device_pm.c depends on CONFIG_PM and all of
the functions defined in there are replaced with static inline stubs
if that option is unset.  However, CONFIG_PM means, roughly, "runtime
PM or suspend/hibernation support" and some of those functions are
useful regardless of that.  For example, they are used by the ACPI
fan driver for controlling fans and acpi_device_set_power() is called
during device removal.  Moreover, device initialization may depend on
setting device power states properly.

For these reasons, make the routines manipulating ACPI device power
states defined in drivers/acpi/device_pm.c available for CONFIG_PM
unset too.

Reported-by: Zhang Rui <rui.zhang@intel.com>
Reported-and-tested-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 3.9+ <stable@vger.kernel.org>
2013-05-22 00:19:28 +02:00
Fabio Baltieri 5649d8f9e3 mfd: ab8500-sysctrl: Let sysctrl driver work without pdata
A check for a valid plat->sysctrl was introduced in:

2377e52 mfd: ab8500-sysctrl: Error check clean up

but the driver works just fine even without that initialization data,
and enforcing it breaks existing platforms for no reason.

This patch removes the check and let the driver go ahead with probe.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-05-21 23:23:21 +02:00
Martin Hundebøll f69ae770e7 batman-adv: Avoid double freeing of bat_counters
On errors in batadv_mesh_init(), bat_counters will be freed in both
batadv_mesh_free() and batadv_softif_init_late(). This patch fixes this
by returning earlier from batadv_softif_init_late() in case of errors in
batadv_mesh_init() and by setting bat_counters to NULL after freeing.

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2013-05-21 21:34:36 +02:00
Linus Torvalds 519fe2ecb7 Merge branch 'leds-fixes-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem fix from Bryan Wu.

* 'leds-fixes-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: leds-gpio: reserve gpio before using it
2013-05-21 11:41:07 -07:00
Timo Teräs 803d19d57a leds: leds-gpio: reserve gpio before using it
This reverts commit a99d76f (leds: leds-gpio: use gpio_request_one)
and commit 2d7c22f (leds: leds-gpio: set devm_gpio_request_one()
flags param correctly) which was a fix of the first one.

The conversion to devm_gpio_request in commit e3b1d44c (leds:
leds-gpio: use devm_gpio_request_one) is not reverted.

The problem is that gpio_cansleep() and gpio_get_value_cansleep()
calls can crash if the gpio is not first reserved. Incidentally this
same bug existed earlier and was fixed similarly in commit d95cbe61
(leds: Fix potential leds-gpio oops). But the OOPS is real. It happens
when GPIOs are provided by module which is not yet loaded.

So this fixes the following BUG during my ALIX boot (3.9.2-vanilla):

BUG: unable to handle kernel NULL pointer dereference at 0000004c
IP: [<c11287d6>] __gpio_cansleep+0xe/0x1a
*pde = 00000000
Oops: 0000 [#1] SMP
Modules linked in: leds_gpio(+) via_rhine mii cs5535_mfd mfd_core
geode_rng rng_core geode_aes isofs nls_utf8 nls_cp437 vfat fat
ata_generic pata_amd pata_cs5536 pata_acpi libata ehci_pci ehci_hcd
ohci_hcd usb_storage usbcore usb_common sd_mod scsi_mod squashfs loop
Pid: 881, comm: modprobe Not tainted 3.9.2 #1-Alpine
EIP: 0060:[<c11287d6>] EFLAGS: 00010282 CPU: 0
EIP is at __gpio_cansleep+0xe/0x1a
EAX: 00000000 EBX: cf364018 ECX: c132b8b9 EDX: 00000000
ESI: c13993a4 EDI: c1399370 EBP: cded9dbc ESP: cded9dbc
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
CR0: 8005003b CR2: 0000004c CR3: 0f0c4000 CR4: 00000090
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400
Process modprobe (pid: 881, ti=cded8000 task=cf094aa0 task.ti=cded8000)
Stack:
 cded9de0 d09471cb 00000000 c1399260 cf364014 00000000 c1399260 c1399254
 d0949014 cded9df4 c118cd59 c1399260 d0949014 d0949014 cded9e08 c118ba47
 c1399260 d0949014 c1399294 cded9e1c c118bb75 cded9e24 d0949014 00000000
Call Trace:
 [<d09471cb>] gpio_led_probe+0xba/0x203 [leds_gpio]
 [<c118cd59>] platform_drv_probe+0x26/0x48
 [<c118ba47>] driver_probe_device+0x75/0x15c
 [<c118bb75>] __driver_attach+0x47/0x63
 [<c118a727>] bus_for_each_dev+0x3c/0x66
 [<c118b6f9>] driver_attach+0x14/0x16
 [<c118bb2e>] ? driver_probe_device+0x15c/0x15c
 [<c118b3d5>] bus_add_driver+0xbd/0x1bc
 [<d08b4000>] ? 0xd08b3fff
 [<d08b4000>] ? 0xd08b3fff
 [<c118bffc>] driver_register+0x74/0xec
 [<d08b4000>] ? 0xd08b3fff
 [<c118c8e8>] platform_driver_register+0x38/0x3a
 [<d08b400d>] gpio_led_driver_init+0xd/0x1000 [leds_gpio]
 [<c100116c>] do_one_initcall+0x6b/0x10f
 [<d08b4000>] ? 0xd08b3fff
 [<c105e918>] load_module+0x1631/0x1907
 [<c10975d6>] ? insert_vmalloc_vmlist+0x14/0x43
 [<c1098d5b>] ? __vmalloc_node_range+0x13e/0x15f
 [<c105ec50>] sys_init_module+0x62/0x77
 [<c1257888>] syscall_call+0x7/0xb
EIP: [<c11287d6>] __gpio_cansleep+0xe/0x1a SS:ESP 0068:cded9dbc
CR2: 000000000000004c
 ---[ end trace 5308fb20d2514822 ]---

Signed-off-by: Timo Teräs <timo.teras@iki.f>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Raphael Assenat <raph@8d.com>
Cc: Trent Piepho <tpiepho@freescale.com>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-05-21 11:26:53 -07:00
Linus Torvalds e748a38596 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c bugfixes from Wolfram Sang:
 "These should have been in rc2 but I missed it due to working on devm
  longer than expected.

  There is one ID addition, since we are touching the driver anyhow.
  And the feature bit documentation is one outcome of a debug session
  and will make it easier for users to work around problems.  The rest
  is typical driver bugfixes."

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: suppress lockdep warning on delete_device
  i2c: mv64xxx: work around signals causing I2C transactions to be aborted
  i2c: i801: Document feature bits in modinfo
  i2c: designware: add Intel BayTrail ACPI ID
  i2c: designware: always clear interrupts before enabling them
  i2c: designware: fix RX FIFO overrun
2013-05-21 11:11:45 -07:00
Fabio Estevam c7b0cf3e71 staging: imx-drm: imx-tve: Check the return value of 'regulator_enable()'
Since commit c8801a8 (regulator: core: Mark all get and enable calls as
__must_check) we need to check the value returned by 'regulator_enable()'.

Do this check to get rid of the following build warning:

drivers/staging/imx-drm/imx-tve.c: In function 'imx_tve_probe':
drivers/staging/imx-drm/imx-tve.c:671:19: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:48:54 -07:00
Marek Vasut 8c24d6ea12 staging: video: imx: Select VIDEOMODE_HELPERS for parallel display
Without this, I get the following problem when building kernel:

drivers/built-in.o: In function `imx_pd_connector_get_modes':
/linux-2.6/drivers/staging/imx-drm/parallel-display.c:78: undefined reference to `of_get_drm_display_mode'
make: *** [vmlinux] Error 1

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:48:54 -07:00
Matwey V. Kornilov dfc7b837c7 tty: mxser: fix usage of opmode_ioaddr
mxser_port->opmode_ioaddr is initialized only for MOXA_MUST_MU860_HWID
chips, but no precautions have been undertaken to prevent reading and
writing to undefined port number.

Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:26:05 -07:00
Heikki Krogerus 9d83e1807e serial: 8250_dw: add ACPI ID for Intel BayTrail
This is the same controller as on Intel Lynxpoint but the
ACPI ID is different.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:25:05 -07:00
wang, biao ac5a2962b0 klist: del waiter from klist_remove_waiters before wakeup waitting process
There is a race between klist_remove and klist_release. klist_remove
uses a local var waiter saved on stack. When klist_release calls
wake_up_process(waiter->process) to wake up the waiter, waiter might run
immediately and reuse the stack. Then, klist_release calls
list_del(&waiter->list) to change previous
wait data and cause prior waiter thread corrupt.

The patch fixes it against kernel 3.9.

Signed-off-by: wang, biao <biao.wang@intel.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:16:39 -07:00
Darrick J. Wong b5325a02aa ttyprintk: Fix NULL pointer deref by setting tty_port ops after initializing port
tty_port_init() zeroes out the tty port, which means that we have to set the
ops pointer /after/, not before this call.  Otherwise, tty_port_open will crash
when it tries to deref ops, which is now a NULL pointer.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:13:23 -07:00
Geert Uytterhoeven 89fb9e7c34 uio: UIO_DMEM_GENIRQ should depend on HAS_DMA
If NO_DMA=y:

drivers/built-in.o: In function `uio_dmem_genirq_release':
drivers/uio/uio_dmem_genirq.c:95: undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `uio_dmem_genirq_open':
drivers/uio/uio_dmem_genirq.c:61: undefined reference to `dma_alloc_coherent'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Hans J. Koch <hjk@hansjkoch.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:13:23 -07:00
Haiyang Zhang a4162747b7 MAINTAINERS: update Hyper-V file list
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 10:03:32 -07:00
Samuel Ortiz bbedf2fc20 mei: bus: Reset event_cb when disabling a device
After cancelling all reads from the disable hook, we need to reset the
event_cb pointer as well or else we won't be able to set a new one up
when re-enabling the device.

Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 09:57:55 -07:00
K. Y. Srinivasan d2242a3843 Drivers: hv: Fix a bug in get_vp_index()
Linux' notion of cpuid is different from the Host's notion of CPUID. In the
call to bind the channel interrupts, we should use the host's notion of
CPU Ids. Fix this bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: Stable <stable@vger.kernel.org> (V3.9)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 09:56:55 -07:00
Tomas Winkler 46e0cd87d9 mei: fix out of array access to me clients array
The patch 9f81abdac3: "mei: implement mei_cl_connect function"
from Jan 8, 2013, leads to the following static checker warning:
"drivers/misc/mei/main.c:522 mei_ioctl_connect_client()
	 warn: check 'dev->me_clients[]' for negative offsets (-2)"

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 09:54:26 -07:00
Linus Torvalds c4ad180f0e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 update from Martin Schwidefsky:
 "An additional sysfs attribute for channel paths and a couple of bux
  fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/pgtable: fix ipte notify bit
  s390/xpram: mark xpram as non-rotational
  s390/smp: fix cpu re-scan vs. cpu state
  s390/cio: add channel ID sysfs attribute
  s390/ftrace: fix mcount adjustment
  s390: fix gmap_ipte_notifier vs. software dirty pages
  s390: disable pfmf for clear page instruction
  s390/disassembler: prevent endless loop in print_fn_code()
  s390: remove non existent reference to GENERIC_KERNEL_THREAD
2013-05-21 09:36:46 -07:00
dyoung@redhat.com 97521978c5 driver core: print sysfs attribute name when warning about bogus permissions
Make it obvious to see what attribute is using bogus permissions.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 09:05:52 -07:00
Greg Kroah-Hartman 1c04fc3536 driver core: export subsys_virtual_register
Modules want to call this function, so it needs to be exported.

Reported-by: Daniel Mack <zonque@gmail.com>
Cc: Kay Sievers <kay@vrfy.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-21 09:05:52 -07:00
Stephen Boyd aa03381046 ARM: smp: Drop RCU_NONIDLE usage in cpu_die()
Before f7b861b7a6 ("arm: Use generic idle loop") ARM would kill the
CPU within the rcu idle section.  Now that the rcu_idle_enter()/exit()
pair have been pushed lower down in the idle loop this is no longer true
and so using RCU_NONIDLE here is no longer necessary and also harmful
because RCU is not actually idle at this point.

Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-05-21 08:56:21 -07:00
Linus Torvalds 0ddaa97425 Merge branch 'drm-radeon-sun-hainan' of git://people.freedesktop.org/~airlied/linux
Pull radeon sun/hainan support from  Dave Airlie:
 "Since I know its outside the merge window, but since this is new hw I
  thought I'd try and provoke the new hw exception, it just fills in the
  blanks in the driver for the new AMD sun and hainan chipsets."

* 'drm-radeon-sun-hainan' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: add Hainan pci ids
  drm/radeon: add golden register settings for Hainan (v2)
  drm/radeon: sun/hainan chips do not have UVD (v2)
  drm/radeon: track which asics have UVD
  drm/radeon: radeon-asic updates for Hainan
  drm/radeon: fill in ucode loading support for Hainan
  drm/radeon: don't touch DCE or VGA regs on Hainan (v3)
  drm/radeon: fill in GPU init for Hainan (v2)
  drm/radeon: add chip family for Hainan
2013-05-21 08:50:57 -07:00
Linus Torvalds 007b703b3e Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull DRM fixes from Dave Airlie:
 "This is just a set of nouveau and radeon fixes, the nouveau ones fix
  some suspend/resume regressions since use of copy engines and some
  fixes for Z compression on some newer chipsets."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/dce2: use 10khz units for audio dto calculation
  drm/radeon: Fix VRAM size calculation for VRAM >= 4GB
  drm/radeon: Remove superfluous variable
  drm/nouveau: ensure channels are stopped before saving fences for suspend
  drm/nv50/fifo: prevent races between clients updating playlists
  drm/nvc0/fifo: prevent CHAN_TABLE_ERROR:CHANNEL_PENDING on fifo fini
  drm/nvc0/fifo: prevent races between clients updating playlists
  drm/nve0/fifo: prevent races between clients updating playlists
  drm/nve0/ltcg: poke the partition count into yet another register
  drm/nvc0/ltcg: fix handling of disabled partitions
  drm/nvc0/ce: disable ce1 on a number of chipsets
  drm/nouveau/bios: fix thinko in ZM_MASK_ADD opcode
  drm/nouveau: fix build with nv50->nvc0
2013-05-21 08:50:09 -07:00
Borislav Petkov bbb013b920 amd64_edac: Fix bogus sysfs file permissions
Fix yet another issue caught by 8f46baaa7e ("base: core: WARN() about
bogus permissions on device attributes").

Signed-off-by: Borislav Petkov <bp@suse.de>
2013-05-21 09:13:11 +02:00
Alexandre Courbot 8d9849b051 ARM: tegra: defconfig fixes
The AK8975 Kconfig option was renamed during the 3.10 merge window.
Adjust tegra_defconfig to enable the new name, so it's not missing
useful features.

Tegra DRM support used to be enabled in the default Tegra configuration,
but it now depends on CONFIG_TEGRA_HOST1X which is disabled by default.
Enable CONFIG_TEGRA_HOST1X so that DRM support is compiled in again.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
[swarren, squashed Alex's and my changes together]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:50:34 -07:00
Linus Walleij b98da4db29 ARM: nomadik: fix IRQ assignment for SMC ethernet
The assignment of IRQ for the SMC91x ethernet adapter had two
problems making it non-working:

- It was not put into the ethernet device node. Let's do this
  by using the board-specific overlay, so we can make other
  overlays on other Nomadik boards.

- The IRQ number was actually completely wrong, this was the
  number for NHK8815, not S8815.

After this ethernet starts working on the USB S8815.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:49:51 -07:00
Olof Johansson d595f0a0c5 Some ux500 fixes for the v3.10-rc series:
- Fixes up the debug UART
 - Fix dangerous platform data double-assignment
 - Fix auxdata for the ethernet device
 - Select REGULATOR to satisfy Kconfig
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJRk7K2AAoJEEEQszewGV1zvNIP/R58MOp+33gX1i8GRnLCFWv8
 o19HHxbFjg8Itye/iqD8/JMTMNjtZCFAzZHV4rupffWhoXqoWzZmm0dSZQnUbWYB
 aT3BQcdoCSJCFBzCEO/SbxMNA7WgzAWfoPoAuUPvTcq9DJkt1X8tKgoGzI3latdr
 ue00su149+G6umi5mvvy2HWUGy8d9Hh7ghBEliLzEuM2PDpc/sbYpZsEdOgnjNu1
 HFlT50vOHEUFACyZ+NIZ1heCHeQdg0UquX49ptcJOhQsIUmnmih0MKeNz2TwWemF
 A/EsxnuAk/h9dK9ACF4KnWtRYNvaH/TRUiU7WBowV3YkYFU+h/QgGhrQnOrRImK+
 DMAkcVmMjqX5m86vFqDCWTpdr9fkq3x8BL+qF8p1O0U67BwM5VezGBfION1LxDXw
 zK9WJG7tFmv/IDXUxnNGB5TItbuGjvD0pFZ6ZToN7IaHBGS+7hrA/Udba1ZjZq/F
 5upyoV/7hdosJi3vZyjRgadKM8hGr9o6vnnn7EWl0HyIdNOGuUwmw2nv2e4lzjtQ
 IRrJ5JfF8EuAR03BQgFoOXF5cQm6NcYnxs62UxRoNfZ4ROGLcMtyZKt0DrfPkY5b
 fRmJ3tU6S89AlhTuUvuihRYyJKJm+QZ8JvMuV1NiKpcg8E7KbSifuWD8XNb1NPip
 Wg7HmQ9Iouv9Gzp5uw6C
 =uq56
 -----END PGP SIGNATURE-----

Merge tag 'ux500-arm-soc-v3.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into fixes

From Linus Walleij, some ux500 fixes for the v3.10-rc series:
- Fixes up the debug UART
- Fix dangerous platform data double-assignment
- Fix auxdata for the ethernet device
- Select REGULATOR to satisfy Kconfig

* tag 'ux500-arm-soc-v3.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: select REGULATOR
  ARM: ux500: Provide device enumeration number suffix for SMSC911x
  ARM: ux500: Fix incorrect DEBUG UART virtual addresses
  ARM: ux500: Remove duplicated assignment of ab8500_platdata

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:49:04 -07:00
Olof Johansson a706d8505c The imx fixes for 3.10:
* A few imx6 clock fixes.  Nothing is extremely important, but since
   we're still in early -rc, I send them for 3.10 inclusion.
 
 * Having bootloader handle ARM errata, we will need to replicate the
   diagnostic register of boot cpu into secondary cores, since
   bootloader only sets up boot cpu.  Otherwise, errata workaround simply
   does not work.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRkfdQAAoJEFBXWFqHsHzOOvoIAI5hte/C9p9H+aH0qAb7cE3d
 5dhALwu72mUpoMgwH0tBA5eVcmqPJXwQSDJFigG5iqs6RLf7VOsGkWdd5mPZEn6i
 l4yqJ9ox4GmAo4WioQiiGCWzITfGbHqjd4ClfXtDmpThGvvrGquH/K9SxKtc4Jc+
 Oa61dmOLgPc6XP78Q1zXB7rk9fcg1eL7IZQ+gTMEyDTPeJw2a5ILd/gwp8CffDkI
 VlMyWXrSu7ZZdmy6kaAlWZ9TouIi8aBedBnuuvD+k88Doua7Ar4PZ03dc2QOPwKb
 TRIKeOtvelWI3M8jJKQrhS/weQJqgsFvT3AgTZHSFHtaKioLfnaYLJf8puMpswM=
 =4IPh
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

From Shawn Guo, imx fixes for 3.10:

- A few imx6 clock fixes.  Nothing is extremely important, but since
  we're still in early -rc, I send them for 3.10 inclusion.
- Having bootloader handle ARM errata, we will need to replicate the
  diagnostic register of boot cpu into secondary cores, since
  bootloader only sets up boot cpu.  Otherwise, errata workaround simply
  does not work.

* tag 'imx-fixes-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: imx: fix typo in gpu3d_shader_sels
  ARM: imx: replicate the diagnostic register of boot cpu into secondary cores
  ARM i.MX6: correct MLB clock configuration
  ARM i.MX6q: Fix periph_clk2_sel and periph2_clk2_sel clocks

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:46:46 -07:00
Olof Johansson 7a7e3472dc Merge tag 'fixes-3.10-2' of git://git.infradead.org/users/jcooper/linux into fixes
From Jason Cooper, mvebu fixes for v3.10 (round 2):
 - mvebu (and orion SoCs)
    - remove init_dma_coherent_pool_size()
 - mvebu
    - fix ranges DT property
    - fix DT reg value for L2 cache
    - select ARCH_REQUIRE_GPIOLIB
 - orion legacy
    - fix num_resources and id for ge10 and ge11

* tag 'fixes-3.10-2' of git://git.infradead.org/users/jcooper/linux:
  ARM: dts: mvebu: Fix wrong the address reg value for the L2-cache node
  ARM: plat-orion: Fix num_resources and id for ge10 and ge11
  arm: mvebu: fix the 'ranges' property to handle PCIe
  ARM: mvebu: select ARCH_REQUIRE_GPIOLIB for mvebu platform
  ARM: mvebu: Fix ranges entry on XP GP board
  ARM: Orion: Remove redundant init_dma_coherent_pool_size()

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:43:29 -07:00
Olof Johansson 7ad915f5eb Fixes for omaps:
- a section mismatch fix for hwmod
 - boot fix for omap2plus_defconfig for omap2
 - musb interrupt fix when using device tree
 - am33xx clock fix that I missed earlier somehow
 - omap1 dma return code error fix
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRlmrVAAoJEBvUPslcq6VzpTQQAKF3OF1zyo9gml/1Mq62Zqhz
 bbC6SMxnyzzc34N3lg7yDTwiuIGreKhtkAYVjxYQ72/68edUnzsVwGmK3QtISbHA
 xSj9qlTwoEpbM9XYeDva6qCAXpFsZi67+R95CfeQa+DkOfZktcAC/8aRLYEwRxGs
 uyhLhBVNKqSn9WIMf6IyJlYsob7NUZ0xLfkfvceARy8eo90Ax3wIcDk273OQoMZo
 0ObgIsWBbzL3xCXNoPCrrowbL05DwgQqGT9UvOa8TxaPzzPKsQ8eL+QV4H9Su2t0
 vJjErCaYpJrbsC3YZfqUfTuHK+MGsSTgp61+NP8WJGaIcemx99a52tEXMe8QocJV
 243lp55mDyT78imYZNBwfxUuQc62TghA3k0DwHG3/pQuHRCGgVmGNxYH/Q/nzMjP
 B/QhlhygoN6Ayt8ZbMJ2ldpytxt8oHOVAABpQ6fsahBGzylcIpj+Ob4oQ1hgYetV
 JS+rexmJ7/Vv6VwU6STS4+1j2wg0qtj78aTZFs2q35RvjqLSYlqPtLy+FPx63qKm
 XVvMfxQvyJ/NJbBzKD5qgFpsQhO/I2BrnN2iTIM3yehzKhs/5iWIxkW/mrPr9R4V
 yrECkYFog+3vIWZQ/YKwdnGRSHIiclksPkYX6yQWcVjpRrndbk/KzaNSSiDUI7Vj
 /hQWzPeeY+6OHQFKHw6b
 =qO9y
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.10-rc1/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren, fixes for omaps:
- a section mismatch fix for hwmod
- boot fix for omap2plus_defconfig for omap2
- musb interrupt fix when using device tree
- am33xx clock fix that I missed earlier somehow
- omap1 dma return code error fix

* tag 'omap-for-v3.10-rc1/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock
  ARM: OMAP2+: Add missing CONFIG_ARCH_MULTI_V6=y to omap2plus_defconfig
  ARM: OMAP: fix error return code in omap1_system_dma_init()
  ARM: OMAP: fix __init section mismatch for _enable_preprogram
  ARM: dts: Fix musb interrupt for device tree booting

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:43:24 -07:00
Srinivas Kandagatla 9f8466c6e0 ARM: vt8500: Add missing NULL terminator in dt_compat
When I tried booting a stih415 Dual core A9 with multi_v7_defconfig, it
failed to boot. The issues seems to be changing by enabling or disabling
VT8550 platform. Having a quick look at dt_compat list, it seems to miss
a NULL terminator, which means of_flat_dt_match will compat check will
cross the boundary of dt_compat and fault at some point , which is what
was happening in my case.

Without this patch if we try to boot multi_v7_defconfig you might notice
that some of the platforms might fault if they fall after vt8500 in
machine-desc list. Other platforms which fall before vt8500 in mdesc list
will not fault.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:30:54 -07:00
Olof Johansson 8582df0f63 Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
From Nicolas Ferre:
An important revert on at91rm9200 platform related
to timers that prevented the platform to boot properly.
Then one pinctrl adjustments for SPI CS and a couple of
trivial typos.

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91: rm9200 fix time support
  ARM: at91: dts: request only spi cs-gpios used on sama5d3x cpu module
  ARM: at91/trivial: typo in GEM compatible string
  ARM: at91/trivial: fix model name for SAM9X25-EK

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:30:50 -07:00
Olof Johansson 4ae608e137 mvebu fixes for v3.10 round 1
- mvebu
     - duplicate alias removal
     - augment new internal-regs dt node with proper ranges node
 
  - kirkwood
     - stable fix for QNAP TS-11x/TS-21x enabling PCIe port 1
 
  - plat-orion
     - missing ehci include in common.h.  needed within common.h.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRkRSIAAoJEAi3KVZQDZAemuwH+weyabb2kl3203svdG2E6pRF
 h2Znj97zpZTgMLi96Onn7cN6A6xTCix4CCbjV91RhZWvWFkyw2/G73SZioo4tH7R
 Z2qgAfpk1OHF6XPiM2EeecG2ZdIbr9zoQtQHFRclRk+K7vvBa+osmuFZ6mleq5Hj
 ssLPP6oG/5gx58r0mbgIV6nrErGmN5VD3JJr/KnqQbMxZpD1/7EBlmwyD/ik7Fi7
 rnynDNZp7+LK72O1faSdUqij+YsuXE9uoZkN5Vd77ZKtxC+iHuhpJP1RPoyoy+pN
 Wr0k+3XV5Nmmp72Uq5vJqHwqblvhE1ylui5LqjLnyx+Yyxurl4zrPWJIXAQBnn0=
 =3wrv
 -----END PGP SIGNATURE-----

Merge tag 'fixes-3.10-1' of git://git.infradead.org/users/jcooper/linux into fixes

From Jason Cooper, mvebu fixes for v3.10:
 - mvebu
    - duplicate alias removal
    - augment new internal-regs dt node with proper ranges node
 - kirkwood
    - stable fix for QNAP TS-11x/TS-21x enabling PCIe port 1
 - plat-orion
    - missing ehci include in common.h.  needed within common.h.

* tag 'fixes-3.10-1' of git://git.infradead.org/users/jcooper/linux:
  ARM: mvebu: Add a ranges entry to translate devbus childs
  ARM: plat-orion: add missing ehci include to common.h
  Kirkwood: Enable PCIe port 1 on QNAP TS-11x/TS-21x
  ARM: mvebu: do not duplicate the mpic alias

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:30:43 -07:00
Lucas Stach 6ec3240047 clk: tegra: add ac97 controller clock
AC97 controller clock is hardwired to pll_a_out0.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-05-20 23:24:34 -07:00