aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* PPC: Add _GLOBAL_TOC for 32bitAlexander Graf2014-06-26
| | | | | | | | Commit ac5a8ee8 started using _GLOBAL_TOC on ppc32 code. Unfortunately it's only defined for 64bit targets though. Define it for ppc32 as well, fixing the build breakage that commit introduced. Signed-off-by: Alexander Graf <agraf@suse.de>
* KVM: PPC: BOOK3S: HV: Use base page size when comparing against slb valueAneesh Kumar K.V2014-06-25
| | | | | | | | | | | With guests supporting Multiple page size per segment (MPSS), hpte_page_size returns the actual page size used. Add a new function to return base page size and use that to compare against the the page size calculated from SLB. Without this patch a hpte lookup can fail since we are comparing wrong page size in kvmppc_hv_find_lock_hpte. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttributeMihai Caraman2014-06-24
| | | | | | | | | | | | The patch 08c9a188d0d0fc0f0c5e17d89a06bb59c493110f kvm: powerpc: use caching attributes as per linux pte do not handle properly the error case, letting mmu_lock locked. The lock will further generate a RCU stall from kvmppc_e500_emul_tlbwe() caller. In case of an error go to out label. Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* Merge tag 'virtio-next-for-linus' of ↵Linus Torvalds2014-06-12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull virtio updates from Rusty Russell: "Main excitement is a virtio_scsi fix for alloc holding spinlock on the abort path, which I refuse to CC stable since (1) I discovered it myself, and (2) it's been there forever with no reports" * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: virtio_scsi: don't call virtqueue_add_sgs(... GFP_NOIO) holding spinlock. virtio-rng: fixes for device registration/unregistration virtio-rng: fix boot with virtio-rng device virtio-rng: support multiple virtio-rng devices virtio_ccw: introduce device_lost in virtio_ccw_device virtio: virtio_break_device() to mark all virtqueues broken.
| * virtio_scsi: don't call virtqueue_add_sgs(... GFP_NOIO) holding spinlock.Rusty Russell2014-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This triggers every time we do a SCSI abort: virtscsi_tmf -> virtscsi_kick_cmd (grab lock and call) -> virtscsi_add_cmd -> virtqueue_add_sgs (GFP_NOIO) Logs look like this: sd 0:0:0:0: [sda] abort BUG: sleeping function called from invalid context at mm/slub.c:966 in_atomic(): 1, irqs_disabled(): 1, pid: 6, name: kworker/u2:0 3 locks held by kworker/u2:0/6: #0: ("scsi_tmf_%d"shost->host_no){......}, at: [<c0153180>] process_one_work+0xe0/0x3d0 #1: ((&(&cmd->abort_work)->work)){......}, at: [<c0153180>] process_one_work+0xe0/0x3d0 #2: (&(&virtscsi_vq->vq_lock)->rlock){......}, at: [<c043f508>] virtscsi_kick_cmd+0x18/0x1b0 CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.15.0-rc5+ #110 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-rc1-0-gb1d4dc9-20140515_140003-nilsson.home.kraxel.org 04/01/2014 Workqueue: scsi_tmf_0 scmd_eh_abort_handler Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
| * virtio-rng: fixes for device registration/unregistrationSasha Levin2014-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | There are several fixes in this patch (mostly because it's hard splitting them up): - Revert the name field in struct hwrng back to 'const'. Also, don't do an extra kmalloc for the name - just wasteful. - Deal with allocation failures properly. - Use IDA to allocate device number instead of brute forcing one. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * virtio-rng: fix boot with virtio-rng deviceSasha Levin2014-05-18
| | | | | | | | | | | | | | | | | | | | | | Commit "virtio-rng: support multiple virtio-rng devices" has broken boot with a virtio-rng device because the 'init' callback of the virtio-rng device was left unitialized to garbage, and got called by the hwrng infrastructure, killing the guest on boot. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Fixes: 08e53fbdb85c0f6f45c0f7c1ea3defc1752a95ce
| * virtio-rng: support multiple virtio-rng devicesAmos Kong2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current hwrng core supports to register multiple hwrng devices, and there is only one device really works in the same time. QEMU alsu supports to have multiple virtio-rng backends. This patch changes virtio-rng driver to support multiple virtio-rng devices. ]# cat /sys/class/misc/hw_random/rng_available virtio_rng.0 virtio_rng.1 ]# cat /sys/class/misc/hw_random/rng_current virtio_rng.0 ]# echo -n virtio_rng.1 > /sys/class/misc/hw_random/rng_current ]# dd if=/dev/hwrng of=/dev/null Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * virtio_ccw: introduce device_lost in virtio_ccw_deviceHeinz Graalfs2014-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a device is lost, the common I/O layer calls the notification handler with CIO_GONE: In that event, flag device_lost as true. In case the device had been flagged as lost when the remove/offline callbacks are called, call the new virtio_break_device() function prior to invoking device_unregister(). This avoids hangs of I/O triggered via the device unregistration callbacks. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * virtio: virtio_break_device() to mark all virtqueues broken.Rusty Russell2014-04-27
| | | | | | | | | | | | Good for post-apocalyptic scenarios, like S/390 hotplug. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds2014-06-11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull vhost infrastructure updates from Michael S. Tsirkin: "This reworks vhost core dropping unnecessary RCU uses in favor of VQ mutexes which are used on fast path anyway. This fixes worst-case latency for users which change the memory mappings a lot. Memory allocation for vhost-net now supports fallback on vmalloc (same as for vhost-scsi) this makes it possible to create the device on systems where memory is very fragmented, with slightly lower performance" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: move memory pointer to VQs vhost: move acked_features to VQs vhost: replace rcu with mutex vhost-net: extend device allocation to vmalloc
| * | vhost: move memory pointer to VQsMichael S. Tsirkin2014-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc vhost: replace rcu with mutex replaced rcu sync for memory accesses with VQ mutex locl/unlock. This is correct since all accesses are under VQ mutex, but incomplete: we still do useless rcu lock/unlock operations, someone might copy this code into some other context where this won't be right. This use of RCU is also non standard and hard to understand. Let's copy the pointer to each VQ structure, this way the access rules become straight-forward, and there's no need for RCU anymore. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | vhost: move acked_features to VQsMichael S. Tsirkin2014-06-09
| | | | | | | | | | | | | | | | | | | | | | | | Refactor code to make sure features are only accessed under VQ mutex. This makes everything simpler, no need for RCU here anymore. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | vhost: replace rcu with mutexMichael S. Tsirkin2014-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All memory accesses are done under some VQ mutex. So lock/unlock all VQs is a faster equivalent of synchronize_rcu() for memory access changes. Some guests cause a lot of these changes, so it's helpful to make them faster. Reported-by: "Gonglei (Arei)" <arei.gonglei@huawei.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | vhost-net: extend device allocation to vmallocMichael S. Tsirkin2014-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Michael Mueller provided a patch to reduce the size of vhost-net structure as some allocations could fail under memory pressure/fragmentation. We are still left with high order allocations though. This patch is handling the problem at the core level, allowing vhost structures to use vmalloc() if kmalloc() failed. As vmalloc() adds overhead on a critical network path, add __GFP_REPEAT to kzalloc() flags to do this fallback only when really needed. People are still looking at cleaner ways to handle the problem at the API level, probably passing in multiple iovecs. This hack seems consistent with approaches taken since then by drivers/vhost/scsi.c and net/core/dev.c Based on patch by Romain Francoise. Cc: Michael Mueller <mimu@linux.vnet.ibm.com> Signed-off-by: Romain Francoise <romain@orebokech.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tileLinus Torvalds2014-06-11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull arch/tile changes from Chris Metcalf: "These mostly just address smaller issues reported to me" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch: tile: kernel: unaligned.c: Cleaning up uninitialized variables drivers/tty/hvc/hvc_tile.c: use PTR_ERR_OR_ZERO replace strict_strto* call with kstrto* tile: Update comments for generic idle conversion tile: cleanup the comment in init_pgprot tile: use BOOTMEM_DEFAULT instead of magic number 0 for reserve_bootmem flags
| * | | arch: tile: kernel: unaligned.c: Cleaning up uninitialized variablesRickard Strandqvist2014-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> [minor cleanups]
| * | | drivers/tty/hvc/hvc_tile.c: use PTR_ERR_OR_ZEROFabian Frederick2014-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replace IS_ERR/PTR_ERR Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | replace strict_strto* call with kstrto*Daniel Walter2014-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove obsolete calls to strict_strto* and replace them with kstrto* calls accordingly. Signed-off-by: Daniel Walter <dwalter@google.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | tile: Update comments for generic idle conversionGeert Uytterhoeven2014-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of commit 0dc8153cfebac68c9523b8852b14f10b31209f08 ("tile: Use generic idle loop"), this applies to arch_cpu_idle() instead of cpu_idle(). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | tile: cleanup the comment in init_pgprotWang Sheng-Hui2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tile vmlinux, the rodata area start after the _sdata. The rodata area is included between [_sdata, __end_rodata), and is handled at an earlier point. The page walk starts at __end_rodata, not _sdata. Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | tile: use BOOTMEM_DEFAULT instead of magic number 0 for reserve_bootmem flagsWang Sheng-Hui2014-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use macro flag BOOTMEM_DEFAULT instead of magic number 0 for reserve_bootmem. Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
* | | | Merge tag 'modules-next-for-linus' of ↵Linus Torvalds2014-06-11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module updates from Rusty Russell: "Most of this is cleaning up various driver sysfs permissions so we can re-add the perm check (we unified the module param and sysfs checks, but the module ones were stronger so we weakened them temporarily). Param parsing gets documented, and also "--" now forces args to be handed to init (and ignored by the kernel). Module NX/RO protections get tightened: we now set them before calling parse_args()" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: module: set nx before marking module MODULE_STATE_COMING. samples/kobject/: avoid world-writable sysfs files. drivers/hid/hid-picolcd_fb: avoid world-writable sysfs files. drivers/staging/speakup/: avoid world-writable sysfs files. drivers/regulator/virtual: avoid world-writable sysfs files. drivers/scsi/pm8001/pm8001_ctl.c: avoid world-writable sysfs files. drivers/hid/hid-lg4ff.c: avoid world-writable sysfs files. drivers/video/fbdev/sm501fb.c: avoid world-writable sysfs files. drivers/mtd/devices/docg3.c: avoid world-writable sysfs files. speakup: fix incorrect perms on speakup_acntsa.c cpumask.h: silence warning with -Wsign-compare Documentation: Update kernel-parameters.tx param: hand arguments after -- straight to init modpost: Fix resource leak in read_dump()
| * | | | module: set nx before marking module MODULE_STATE_COMING.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently set RO & NX on modules very late: after we move them from MODULE_STATE_UNFORMED to MODULE_STATE_COMING, and after we call parse_args() (which can exec code in the module). Much better is to do it in complete_formation() and then call the notifier. This means that the notifiers will be called on a module which is already RO & NX, so that may cause problems (ftrace already changed so they're unaffected). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | samples/kobject/: avoid world-writable sysfs files.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | drivers/hid/hid-picolcd_fb: avoid world-writable sysfs files.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Bruno Prémont <bonbons@linux-vserver.org> Acked-by: Jiri Kosina <jkosina@suse.cz>
| * | | | drivers/staging/speakup/: avoid world-writable sysfs files.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Christopher Brannon <chris@the-brannons.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | drivers/regulator/virtual: avoid world-writable sysfs files.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | drivers/scsi/pm8001/pm8001_ctl.c: avoid world-writable sysfs files.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Lindar Liu <lindar_liu@usish.com> Cc: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | drivers/hid/hid-lg4ff.c: avoid world-writable sysfs files.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Simon Wood <simon@mungewell.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | drivers/video/fbdev/sm501fb.c: avoid world-writable sysfs files.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Vincent Sanders <vince@simtec.co.uk> Cc: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | drivers/mtd/devices/docg3.c: avoid world-writable sysfs files.Rusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | speakup: fix incorrect perms on speakup_acntsa.cRusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 22c9bcad859d5c969289b3b37084a96c621f8f2c contained a bad substitution for ROOT_W => S_IRUSR|S_IRUGO instead of S_IWUSR|S_IRUGO. Fixes: 22c9bcad859d5c969289b3b37084a96c621f8f2c Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | cpumask.h: silence warning with -Wsign-compareBrian W Hart2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence the warning when building with -Wsign-compare when cpumask.h is included: include/linux/cpumask.h: In function ‘cpumask_parse’: include/linux/cpumask.h:603:26: warning: signed and unsigned type in conditional expression [-Wsign-compare] int len = nl ? nl - buf : strlen(buf); ^ V2: Rusty pointed out that unsigned should be used instead. Signed-off-by: Brian W Hart <hartb@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | Documentation: Update kernel-parameters.txRusty Russell2014-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) __setup() is messy, prefer module_param and core_param. 2) Document -- 3) Document modprobe scraping /proc/cmdline. 4) Document handing of leftover parameters to init. 5) Document use of quotes to protect whitespace. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | param: hand arguments after -- straight to initRusty Russell2014-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel passes any args it doesn't need through to init, except it assumes anything containing '.' belongs to the kernel (for a module). This change means all users can clearly distinguish which arguments are for init. For example, the kernel uses debug ("dee-bug") to mean log everything to the console, where systemd uses the debug from the Scandinavian "day-boog" meaning "fail to boot". If a future versions uses argv[] instead of reading /proc/cmdline, this confusion will be avoided. eg: test 'FOO="this is --foo"' -- 'systemd.debug="true true true"' Gives: argv[0] = '/debug-init' argv[1] = 'test' argv[2] = 'systemd.debug=true true true' envp[0] = 'HOME=/' envp[1] = 'TERM=linux' envp[2] = 'FOO=this is --foo' Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | | | modpost: Fix resource leak in read_dump()Christian Engelmayer2014-04-27
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Function read_dump() memory maps the input via grab_file(), but fails to call the corresponding unmap function. Add the missing call to release_file(). Detected by Coverity: CID 1192419 Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | | | Merge branch 'next' of ↵Linus Torvalds2014-06-11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management update from Zhang Rui: "Specifics: - fix a bug in Exynos thermal driver, which overwrites the hardware trip point threshold when updating software trigger levels and results in emergency shutdown. From: Tushar Behera. - add thermal sensor support for Armada 375 and 38x SoCs. From Ezequiel Garcia. - add TMU (Thermal Management Unit) support for Exynos5260 and Exynos5420 SoCs. From Naveen Krishna Chatradhi. - add support for the additional digital temperature sensors in the Intel SoCs like Bay Trail. From: Srinivas Pandruvada. - a couple of cleanups and small fixes from Jingoo Han, Bartlomiej Zolnierkiewicz, Geert Uytterhoeven, Jacob Pan, Paul Walmsley and Lan,Tianyu" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (21 commits) thermal: spear: remove unnecessary OOM messages thermal: exynos: remove unnecessary OOM messages thermal: rcar: remove unnecessary OOM messages thermal: armada: Support Armada 380 SoC thermal: armada: Support Armada 375 SoC thermal: armada: Allow to specify an 'inverted readout' sensor thermal: armada: Pass the platform_device to init_sensor() thermal: armada: Add generic infrastructure to handle the sensor thermal: armada: Add infrastructure to support generic formulas thermal: armada: Rename armada_thermal_ops struct thermal/intel_powerclamp: add newer cpu ids thermal: rcar: Use pm_runtime_put() i.s.o. pm_runtime_put_sync() thermal: samsung: Only update available threshold limits Thermal/int3403: Fix thermal hysteresis unit conversion thermal: Intel SoC DTS thermal thermal: samsung: Add TMU support for Exynos5260 SoCs thermal: samsung: Add TMU support for Exynos5420 SoCs thermal: samsung: change base_common to more meaningful base_second thermal: samsung: replace inten_ bit fields with intclr_ thermal: offer Samsung thermal support only when ARCH_EXYNOS is defined ...
| | \ \ \
| | \ \ \
| | \ \ \
| | \ \ \
| *---. \ \ \ Merge branches 'armada-375-380-soc-support', 'eduardo-thermal-soc-fixes', ↵Zhang Rui2014-05-15
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'intel-soc-dts-thermal' and 'thermal-soc-fixes' of .git into next
| | | | * | | | thermal: spear: remove unnecessary OOM messagesJingoo Han2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * | | | thermal: exynos: remove unnecessary OOM messagesJingoo Han2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * | | | thermal: rcar: remove unnecessary OOM messagesJingoo Han2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * | | | thermal/intel_powerclamp: add newer cpu idsJacob Pan2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Broadwell and Valleyview CPUs Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
| | | | * | | | thermal: rcar: Use pm_runtime_put() i.s.o. pm_runtime_put_sync()Geert Uytterhoeven2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need for this to be synchronous Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * | | | thermal: samsung: Only update available threshold limitsTushar Behera2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the threshold limits are updated in 2 stages, once for all software trigger levels and again for hardware trip point. While updating the software trigger levels, it overwrites the threshold limit for hardware trip point thereby forcing the Exynos core to issue an emergency shutdown. Updating only the required fields in threshold register fixes this issue. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * | | | Thermal/int3403: Fix thermal hysteresis unit conversionlan,Tianyu2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thermal hysteresis represents a temperature difference. But the original code treats it as a temperature value, Convert it from tenths of degree Kelvin to Milli-Celsius by deducing 273200. This is not right. Kelvin and Celsius have same degree size. From temperature difference view, the conversion between tenths of degree Kelvin unit and Milli-Celsius unit is just to multiply 100. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | | | | thermal: Intel SoC DTS thermalSrinivas Pandruvada2014-05-15
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Intel SoCs like Bay Trail, there are 2 additional digital temperature sensors(DTS), in addition to the standard DTSs in the core. Also they support 4 programmable thresholds, out of which two can be used by OSPM. These thresholds can be used by OSPM thermal control. Out of these two thresholds, one is used by driver and one user mode can change via thermal sysfs to get notifications on threshold violations. The driver defines one critical trip points, which is set to TJ MAX - offset. The offset can be changed via module parameter (default 5C). Also it uses one of the thresholds to get notification for this temperature violation. This is very important for orderly shutdown as the many of these devices don't have ACPI thermal zone, and expects that there is some other thermal control mechanism present in OSPM. When a Linux distro is used without additional specialized thermal control program, BIOS can do force shutdown when thermals are not under control. When temperature reaches critical, the Linux thermal core will initiate an orderly shutdown. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | | | | Merge branch 'next' of ↵Zhang Rui2014-05-15
| | |\ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc-fixes
| | | * | | | thermal: samsung: Add TMU support for Exynos5260 SoCsNaveen Krishna Chatradhi2014-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the registers, bit fields and compatible strings required to support for the 5 TMU channels on Exynos5260. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
| | | * | | | thermal: samsung: Add TMU support for Exynos5420 SoCsNaveen Krishna Chatradhi2014-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exynos5420 has 5 TMU channels, the TRIMINFO register is misplaced for TMU channels 2, 3 and 4 TRIMINFO at 0x1006c000 contains data for TMU channel 3 TRIMINFO at 0x100a0000 contains data for TMU channel 4 TRIMINFO at 0x10068000 contains data for TMU channel 2 This patch 1 Adds the neccessary register changes and arch information to support Exynos5420 SoCs. 2. Handles the gate clock for misplaced TRIMINFO register 3. Updates the Documentation at Documentation/devicetree/bindings/thermal/exynos-thermal.txt Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>