aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-11-17TTY: ldisc, wait for ldisc infinitely in hangupJiri Slaby1-2/+17
For /dev/console case, we do not kill all ldisc users. It's due to redirected_tty_write test in __tty_hangup. In that case there still might be a process waiting e.g. in n_tty_read for input. We wait for such processes to disappear. The problem is that we use a timeout. After this timeout, we continue closing the ldisc and start freeing tty resources. It obviously leads to crashes when the other process is woken. So to fix this, we wait infinitely before reiniting the ldisc. (The tiocsetd remains untouched -- times out after 5s.) This is nicely reproducible with this run from shell: exec 0<>/dev/console 1<>/dev/console 2<>/dev/console and stopping a getty like: systemctl stop [email protected] The crash proper may be produced only under load or with constified timing the same as for 92f6fa09b. Signed-off-by: Jiri Slaby <[email protected]> Cc: Dave Young <[email protected]> Cc: Dave Jones <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Dmitriy Matrosov <[email protected]> Cc: Alan Cox <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-11-17TTY: ldisc, move wait idle to callerJiri Slaby1-2/+2
It is the only place where reinit is called from. And we really need to wait for the old ldisc to go once. Actually this is the place where the waiting originally was (before removed and re-added later). This will make the fix in the following patch easier to implement. Signed-off-by: Jiri Slaby <[email protected]> Cc: Dave Young <[email protected]> Cc: Dave Jones <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Dmitriy Matrosov <[email protected]> Cc: Alan Cox <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-11-17TTY: ldisc, allow waiting for ldisc arbitrarily longJiri Slaby1-5/+6
To fix a nasty bug in ldisc hup vs. reinit we need to wait infinitely long for ldisc to be gone. So here we add a parameter to tty_ldisc_wait_idle to allow that. This is only a preparation for the real fix which is done in the following patches. Signed-off-by: Jiri Slaby <[email protected]> Cc: Dave Young <[email protected]> Cc: Dave Jones <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Dmitriy Matrosov <[email protected]> Cc: Alan Cox <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-11-17Merge branch 'master' of ↵John W. Linville4-2/+23
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2011-11-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds5-6/+17
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] hpsa: Disable ASPM [SCSI] aacraid: controller hangs if kernel uses non-default ASPM policy [SCSI] mpt2sas: add missing allocation. [SCSI] Silencing 'killing requests for dead queue' [SCSI] fix WARNING: at drivers/scsi/scsi_lib.c:1704
2011-11-17Merge branch 'for-linus' of ↵Linus Torvalds7-65/+72
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix the connection selection of ADCs on Cirrus codecs ALSA: hda - Update URLs in document ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld() ALSA: hda - delayed ELD repoll ALSA: hda - fix ELD memory leak ALSA: hda/realtek: remove redundant semicolon ALSA: hda - pwr_nids cleanup for IDT codecs
2011-11-17ARM: clps711x: consolidate irq/mm/time code into a single fileRussell King4-141/+88
The separate files for clps711x which contain maybe one or two data structures or functions is an inefficient use of files, and encourages further small files as other changes happen. Collapse down these into a single core.c file. Signed-off-by: Russell King <[email protected]>
2011-11-17ARM: 7159/1: OMAP: Introduce local common.h filesTony Lindgren88-287/+332
As suggested by Russell King - ARM Linux <[email protected]>, there's no need to keep local prototypes in non-local headers. Add mach-omap1/common.h and mach-omap2/common.h and move the local prototypes there from plat/common.h and mach/omap4-common.h. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-11-17ARM: restart: remove local_irq_disable() from within arch_reset()Russell King6-12/+0
IRQs are already disabled by the time arch_reset() is called, so these calls to local_irq_disable() instead arch_reset() are redundant. Remove them. Acked-by: H Hartley Sweeten <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2011-11-17ARM: wire up process_vm_writev and process_vm_readv syscallsRussell King2-0/+4
These two syscalls were introduced during the last merge window. Add the entries into the ARM call tables for them. Signed-off-by: Russell King <[email protected]>
2011-11-17ASoC: wm8753: Skip noop reconfiguration of DAI modeTimo Juhani Lindfors1-0/+3
This patch makes it possible to set DAI mode to its currently applied value even if codec is active. This is necessary to allow aplay -t raw -r 44100 -f S16_LE -c 2 < /dev/urandom & alsactl store -f backup.state alsactl restore -f backup.state to work without returning errors. This patch is based on a patch sent by Klaus Kurzmann <[email protected]>. Signed-off-by: Timo Juhani Lindfors <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2011-11-17genirq: Don't allow per cpu interrupts to be suspendedMarc Zyngier1-1/+1
The power management functions related to interrupts do not know (yet) about per-cpu interrupts and end up calling the wrong low-level methods to enable/disable interrupts. This leads to all kind of interesting issues (action taken on one CPU only, updating a refcount which is not used otherwise...). The workaround for the time being is simply to flag these interrupts with IRQF_NO_SUSPEND. At least on ARM, these interrupts are actually dealt with at the architecture level. Reported-by: Santosh Shilimkar <[email protected]> Tested-by: Santosh Shilimkar <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2011-11-17ARM: perf: initialise used_mask for fake PMU during validationWill Deacon1-1/+7
When validating an event group, we call pmu->get_event_idx for each group member in order to check that the group can be scheduled as a unit on an empty PMU. As a result of 3fc2c830 ("ARM: perf: remove event limit from pmu_hw_events"), the used_mask member of struct cpu_hw_events must be setup explicitly, something which we don't do for the fake cpu_hw_events used for validation. This patch sets up an empty used_mask for the fake validation cpu_hw_events, preventing NULL deferences when trying to get the event index. Reported-by: Pawel Moll <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2011-11-17Revert "KVM: PPC: Add support for explicit HIOR setting"Alexander Graf5-24/+2
This reverts commit a15bd354f083f20f257db450488db52ac27df439. It exceeded the padding on the SREGS struct, rendering the ABI backwards-incompatible. Conflicts: arch/powerpc/kvm/powerpc.c include/linux/kvm.h Signed-off-by: Avi Kivity <[email protected]>
2011-11-17KVM: VMX: Check for automatic switch msr table overflowGleb Natapov1-1/+5
Signed-off-by: Gleb Natapov <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-11-17KVM: VMX: Add support for guest/host-only profilingGleb Natapov1-0/+21
Support guest/host-only profiling by switch perf msrs on a guest entry if needed. Signed-off-by: Gleb Natapov <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-11-17KVM: VMX: add support for switching of PERF_GLOBAL_CTRLGleb Natapov1-11/+93
Some cpus have special support for switching PERF_GLOBAL_CTRL msr. Add logic to detect if such support exists and works properly and extend msr switching code to use it if available. Also extend number of generic msr switching entries to 8. Signed-off-by: Gleb Natapov <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-11-17KVM: s390: announce SYNC_MMUChristian Borntraeger1-0/+1
KVM on s390 always had a sync mmu. Any mapping change in userspace mapping was always reflected immediately in the guest mapping. - In older code the guest mapping was just an offset - In newer code the last level page table is shared Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Carsten Otte <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-11-17KVM: s390: Fix tprot lockingChristian Borntraeger1-2/+8
There is a potential host deadlock in the tprot intercept handling. We must not hold the mmap semaphore while resolving the guest address. If userspace is remapping, then the memory detection in the guest is broken anyway so we can safely separate the address translation from walking the vmas. Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Carsten Otte <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-11-17KVM: s390: handle SIGP sense running interceptsCornelia Huck3-0/+41
SIGP sense running may cause an intercept on higher level virtualization, so handle it by checking the CPUSTAT_RUNNING flag. Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Carsten Otte <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-11-17KVM: s390: Fix RUNNING flag misinterpretationCornelia Huck6-9/+15
CPUSTAT_RUNNING was implemented signifying that a vcpu is not stopped. This is not, however, what the architecture says: RUNNING should be set when the host is acting on the behalf of the guest operating system. CPUSTAT_RUNNING has been changed to be set in kvm_arch_vcpu_load() and to be unset in kvm_arch_vcpu_put(). For signifying stopped state of a vcpu, a host-controlled bit has been used and is set/unset basically on the reverse as the old CPUSTAT_RUNNING bit (including pushing it down into stop handling proper in handle_stop()). Cc: [email protected] Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Carsten Otte <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-11-17Merge branch 'irq-urgent-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Fix irqfixup, irqpoll regression
2011-11-17fix typo/thinko in get_random_bytes()Luck, Tony1-1/+1
If there is an architecture-specific random number generator we use it to acquire randomness one "long" at a time. We should put these random words into consecutive words in the result buffer - not just overwrite the first word again and again. Signed-off-by: Tony Luck <[email protected]> Acked-by: H. Peter Anvin <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-11-17writeback: remove vm_dirties and task->dirtiesWu Fengguang4-16/+0
They are not used any more. Signed-off-by: Wu Fengguang <[email protected]>
2011-11-17writeback: hard throttle 1000+ dd on a slow USB stickWu Fengguang1-6/+3
The sleep based balance_dirty_pages() can pause at most MAX_PAUSE=200ms on every 1 4KB-page, which means it cannot throttle a task under 4KB/200ms=20KB/s. So when there are more than 512 dd writing to a 10MB/s USB stick, its bdi dirty pages could grow out of control. Even if we can increase MAX_PAUSE, the minimal (task_ratelimit = 1) means a limit of 4KB/s. They can eventually be safeguarded by the global limit check (nr_dirty < dirty_thresh). However if someone is also writing to an HDD at the same time, it'll get poor HDD write performance. We at least want to maintain good write performance for other devices when one device is attacked by some "massive parallel" workload, or suffers from slow write bandwidth, or somehow get stalled due to some error condition (eg. NFS server not responding). For a stalled device, we need to completely block its dirtiers, too, before its bdi dirty pages grow all the way up to the global limit and leave no space for the other functional devices. So change the loop exit condition to /* * Always enforce global dirty limit; also enforce bdi dirty limit * if the normal max_pause sleeps cannot keep things under control. */ if (nr_dirty < dirty_thresh && (bdi_dirty < bdi_thresh || bdi->dirty_ratelimit > 1)) break; which can be further simplified to if (task_ratelimit) break; Signed-off-by: Wu Fengguang <[email protected]>
2011-11-17platform/x86: fix dell-laptop function prototypesRandy Dunlap1-2/+2
Fix build warnings: drivers/platform/x86/dell-laptop.c:592:13: warning: function declaration isn't a prototype drivers/platform/x86/dell-laptop.c:599:13: warning: function declaration isn't a prototype Signed-off-by: Randy Dunlap <[email protected]> Cc: Matthew Garrett <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-11-17media/staging: fix allyesconfig build errorRandy Dunlap2-3/+4
Fix x86 allyesconfig builds. Builds fail due to a non-static variable named 'debug' in drivers/staging/media/as102: arch/x86/built-in.o:arch/x86/kernel/entry_32.S:1296: first defined here ld: Warning: size of symbol `debug' changed from 90 in arch/x86/built-in.o to 4 in drivers/built-in.o Thou shalt have no non-static identifiers that are named 'debug'. Signed-off-by: Randy Dunlap <[email protected]> Cc: Pierrick Hascoet <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-11-17ARM: imx6q: move clock register map to machine_desc.map_ioRichard Zhao3-2/+7
map_io is the only place to call iotable_init. Signed-off-by: Richard Zhao <[email protected]> [shawn.guo: rename imx_clock_map_io() to imx6q_clock_map_io()] Signed-off-by: Shawn Guo <[email protected]>
2011-11-17hwmon: (exynos4_tmu) Fix Kconfig dependencyDonggeun Kim1-1/+1
Rename dependency of EXYNOS4_TMU in Kconfig to the existing one. Signed-off-by: Donggeun Kim <[email protected]> Signed-off-by: MyungJoo Ham <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-11-17ocfs2: Use filemap_write_and_wait() instead of write_inode_now()Jan Kara1-1/+1
Since ocfs2 has no ->write_inode method, there's no point in calling write_inode_now() from ocfs2_cleanup_delete_inode(). Use filemap_write_and_wait() instead. This helps us to cleanup inode writing interfaces... Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Joel Becker <[email protected]>
2011-11-17ocfs2: honor O_(D)SYNC flag in fallocateMark Fasheh1-0/+3
We need to sync the transaction which updates i_size if the file is marked as needing sync semantics. Signed-off-by: Mark Fasheh <[email protected]> Signed-off-by: Joel Becker <[email protected]>
2011-11-17ocfs2: Add a missing journal credit in ocfs2_link_credits() -v2Xiaowei.Hu1-2/+3
With indexed_dir enabled, ocfs2 maintains a list of dirblocks having space. The credit calculation in ocfs2_link_credits() did not correctly account for adding an entry that exactly fills a dirblock that triggers removing that dirblock by changing the pointer in the previous block in the list. The credit calculation did not account for that previous block. To expose, do: mkfs.ocfs2 -b 512 -M local /dev/sdX mount /dev/sdX /ocfs2 mkdir /ocfs2/linkdir touch /ocfs2/linkdir/file1 for i in `seq 1 29` ; do link /ocfs2/linkdir/file1 /ocfs2/linkdir/linklinklinklinklinklink$i; done rm -f /ocfs2/linkdir/linklinklinklinklinklink10 sleep 8 link /ocfs2/linkdir/file1 /ocfs2/linkdir/linklinklinklinklinklinkaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Note: The link names have been crafted for a 512 byte blocksize. Reproducing with a larger blocksize will require longer (or more) links. The sleep is important. We want jbd2 to commit the transaction so that the missing block does not piggy back on account of the previous transaction. Signed-off-by: XiaoweiHu <xiaowei.hu at oracle.com> Reviewed-by: WengangWang <wen.gang.wang at oracle.com> Reviewed-by: Sunil.Mushran <sunil.mushran at oracle.com> Signed-off-by: Joel Becker <[email protected]>
2011-11-17ocfs2: send correct UUID to cleancache initializationDan Magenheimer1-1/+1
ocfs2: Fix cleancache initialization call to correctly pass uuid As reported by Steven Whitehouse in https://lkml.org/lkml/2011/5/27/221 the ocfs2 volume UUID is incorrectly passed to cleancache. As a result, shared-ephemeral tmem pools will not actually be created; instead they will be private (unshared) which misses out on a major benefit of tmem. Reported-by: Steven Whitehouse <[email protected]> Signed-off-by: Dan Magenheimer <[email protected]> Signed-off-by: Joel Becker <[email protected]>
2011-11-17ocfs2: Commit transactions in error cases -v2Wengang Wang3-6/+9
There are three cases found that in error cases, journal transactions are not committed nor aborted. We should take care of these case by committing the transactions. Otherwise, there would left a journal handle which will lead to , in same process context, the comming ocfs2_start_trans() gets wrong credits. Signed-off-by: Wengang Wang <[email protected]> Signed-off-by: Joel Becker <[email protected]>
2011-11-17ocfs2: make direntry invalid when deleting itWengang Wang1-2/+1
When we deleting a direntry from a directory, if it's the first in a block we invalid it by setting inode to 0; otherwise, we merge the deleted one to the prior and contiguous direntry. And we don't truncate directories. There is a problem for the later case since inode is not set to 0. This problem happens when the caller passes a file position as parameter to ocfs2_dir_foreach_blk(). If the position happens to point to a stale(not the first, deleted in betweens of ocfs2_dir_foreach_blk()s) direntry, we are not able to recognize its staleness. So that we treat it as a live one wrongly. The fix is to set inode to 0 in both cases indicating the direntry is stale. This won't introduce additional IOs. Signed-off-by: Wengang Wang <[email protected]> Signed-off-by: Joel Becker <[email protected]>
2011-11-17fs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_freeJulia Lawall1-1/+1
Memory allocated using kmem_cache_zalloc should be freed using kmem_cache_free, not kfree. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,e,e1,e2; @@ x = kmem_cache_zalloc(e1,e2) ... when != x = e ?-kfree(x) +kmem_cache_free(e1,x) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Joel Becker <[email protected]>
2011-11-17stmmac: fix pm functions avoiding sleep on spinlockFrancesco Virlinzi1-5/+7
This patch fixes the pm functions to avoid the system sleeps while a spinlock is taken. Signed-off-by: Francesco Virlinzi <[email protected]> Signed-off-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-17stmmac: remove spin_lock in stmmac_ioctl.Srinivas Kandagatla1-2/+0
This patch removes un-needed spin_lock in stmmac_ioctl while reading and writing mdio registers. While holding spin_lock the code must be atomic, which is not true in this case as both mdiobus_read and writes have mutex locks. Without this patch reading mdio registers via mii-tool results in below BUG: mii-tool -vvv eth0" Using SIOCGMIIPHY=0x8947 BUG: sleeping function called from invalid context at kernel/mutex.c:287 in_atomic(): 1, irqs_disabled(): 0, pid: 614, name: mii-tool 2 locks held by mii-tool/614: #0: (rtnl_mutex){......}, at: [<c01fd80c>] dev_ioctl+0x550/0x674 #1: (&priv->lock){......}, at: [<c01b34ec>] stmmac_ioctl+0x4c/0x78 [<c002ea14>] (unwind_backtrace+0x0/0xcc) from [<c0272c38>] (mutex_lock_nested+0x24/0x35c) [<c0272c38>] (mutex_lock_nested+0x24/0x35c) from [<c01b237c>] (mdiobus_read+0x44/0x70) [<c01b237c>] (mdiobus_read+0x44/0x70) from [<c01b0c64>] (phy_mii_ioctl+0x4c/0x138) [<c01b0c64>] (phy_mii_ioctl+0x4c/0x138) from [<c01b34fc>] (stmmac_ioctl+0x5c/0x78) [<c01b34fc>] (stmmac_ioctl+0x5c/0x78) from [<c01fcec8>] (dev_ifsioc+0x2a4/0x2c8) [<c01fcec8>] (dev_ifsioc+0x2a4/0x2c8) from [<c01fd81c>] (dev_ioctl+0x560/0x674) [<c01fd81c>] (dev_ioctl+0x560/0x674) from [<c00c36e0>] (vfs_ioctl+0x2c/0x8c) [<c00c36e0>] (vfs_ioctl+0x2c/0x8c) from [<c00c4130>] (do_vfs_ioctl+0x530/0x578) [<c00c4130>] (do_vfs_ioctl+0x530/0x578) from [<c00c41ac>] (sys_ioctl+0x34/0x54) [<c00c41ac>] (sys_ioctl+0x34/0x54) from [<c0028aa0>] (ret_fast_syscall+0x0/0x2c) Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-17stmmac: parameters auto-tuning through HW cap regGiuseppe CAVALLARO3-29/+72
New GMAC devices (newer than the databook 3.50a) have the HW capability register that provides which features are actually supported by the hardware. On old devices many information have to be passed through the platform, for example: enhanced descriptor structure, TX COE etc. These are mandatory to properly configure the driver. This remains still valid because the driver has to support old Synopsys devices but now it's also able to override them using the values from the HW capability register if supported. Signed-off-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-17stmmac: fix advertising 1000Base capabilties for non GMII ifaceSrinivas Kandagatla1-6/+4
This patch fixes the way to stop the 1000Base advertising capabilties for non GMII interfaces. Signed-off-by: Srinivas Kandagatla <[email protected]> Acked-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-17stmmac: use mdelay on timeout of sw resetFrancesco Virlinzi2-2/+4
This patch uses an mdelay to manage the timeout on sw reset to be independant of cpu_clk. Signed-off-by: Francesco Virlinzi <[email protected]> Reviewed-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-17libata: fix build without BMDMAAlexander Beregalov1-0/+4
fix these errors: drivers/ata/libata-sff.c:2538:3: error: implicit declaration of function 'ata_pci_bmdma_prepare_host' drivers/ata/libata-sff.c:2549:40: error: 'ata_bmdma_interrupt' undeclared (first use in this function) Signed-off-by: Alexander Beregalov <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2011-11-17[libata] ahci_platform: fix DT probingRob Herring1-1/+1
The change in commit 904c04feaf13ed "ahci_platform: Add the board_ids..." doesn't work for the DT probing case as platform_get_device_id returns NULL. Pick the default ahci_port_info in this case. Signed-off-by: Rob Herring <[email protected]> Acked-by: Anton Vorontsov <[email protected]> Cc: Richard Zhu <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Jeff Garzik <[email protected]>
2011-11-17powerpc/signal32: Fix sigset_t conversion when copying to userWill Deacon1-1/+1
On PPC64, put_sigset_t converts a sigset_t to a compat_sigset_t before copying it to userspace. There is a typo in the case that we have 4 words to copy, meaning that we corrupt the compat_sigset_t. It appears that _NSIG_WORDS can't be greater than 2 at the moment so this code is probably always optimised away anyway. Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-11-17powerpc: Fix atomic_xxx_return barrier semanticsBenjamin Herrenschmidt4-35/+40
The Documentation/memory-barriers.txt document requires that atomic operations that return a value act as a memory barrier both before and after the actual atomic operation. Our current implementation doesn't guarantee this. More specifically, while a load following the isync can not be issued before stwcx. has completed, that completion doesn't architecturally means that the result of stwcx. is visible to other processors (or any previous stores for that matter) (typically, the other processors L1 caches can still hold the old value). This has caused an actual crash in RCU torture testing on Power 7 This fixes it by changing those atomic ops to use new macros instead of RELEASE/ACQUIRE barriers, called ATOMIC_ENTRY and ATMOIC_EXIT barriers, which are then defined respectively to lwsync and sync. I haven't had a chance to measure the performance impact (or rather what I measured with kernel compiles is in the noise, I yet have to find a more precise benchmark) Signed-off-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Paul E. McKenney <[email protected]>
2011-11-17powerpc: Remove buggy 9-year-old test for binutils < 2.12.1Kyle Moffett1-6/+0
Recent binutils refuses to assemble AltiVec opcodes when in e500/SPE mode, as some of those opcodes alias the "SPE" instructions. This triggers an ancient binutils version check even when building a kernel with CONFIG_ALTIVEC disabled. In theory, the check could be conditionalized on CONFIG_ALTIVEC, but in practice it has long outlived its utility. It is virtually impossible to find binutils older than 2.12.1 (released 2002) in the wild anymore. Even ancient RedHat Enterprise Linux 4 has binutils-2.14. To fix the kernel build when done natively on e500 systems with this new binutils, the test is simply removed. Signed-off-by: Kyle Moffett <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-11-17powerpc/book3e-64: Fix debug support for userspaceKumar Gala2-23/+1
With the introduction of CONFIG_PPC_ADV_DEBUG_REGS user space debug is broken on Book-E 64-bit parts that support delayed debug events. When switch_booke_debug_regs() sets DBCR0 we'll start getting debug events as MSR_DE is also set and we aren't able to handle debug events from kernel space. We can remove the hack that always enables MSR_DE and loads up DBCR0 and just utilize switch_booke_debug_regs() to get user space debug working again. We still need to handle critical/debug exception stacks & proper save/restore of state for those exception levles to support debug events from kernel space like we have on 32-bit. Signed-off-by: Kumar Gala <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-11-17powerpc: Remove extraneous CONFIG_PPC_ADV_DEBUG_REGS defineKumar Gala1-2/+0
All of DebugException is already protected by CONFIG_PPC_ADV_DEBUG_REGS there is no need to have another such ifdef inside the function. Signed-off-by: Kumar Gala <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-11-17powerpc: Revert show_regs() define for readabilityKumar Gala1-1/+1
We had an existing ifdef for 4xx & BOOKE processors that got changed to CONFIG_PPC_ADV_DEBUG_REGS. The define has nothing to do with CONFIG_PPC_ADV_DEBUG_REGS. The define really should be: #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) and not #ifdef CONFIG_PPC_ADV_DEBUG_REGS Signed-off-by: Kumar Gala <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2011-11-16drm/i915: Use DPCD value for max DP lanes.Keith Packard1-14/+9
The BIOS VBT value for an eDP panel has been shown to be incorrect on one machine, and we haven't found any machines where the DPCD value was wrong, so we'll use the DPCD value everywhere. Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Jesse Barnes <[email protected]>