Commit Graph

336539 Commits

Author SHA1 Message Date
Akeem G. Abodunrin 24a372cd0b igb: Ethtool support to enable and disable EEE
This patch allows users to enable and disable EEE using Ethtool.
It also allows users to get EEE settings, as supported by the device.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:15 -05:00
Alexander Duyck 80d0759e5e igb: Improve performance and reduce size of igb_tx_map
This change is meant to both improve the performance and reduce the size of
igb_tx_map.  To do this I have expanded the work done in the main loop by
pushing first into tx_buffer.  This allows us to pull in the dma_mapping_error
check, the tx_buffer value assignment, and the initial DMA value assignment to
the Tx descriptor.  The net result is that the function reduces in size by a
little over a 100 bytes and is about 1% or 2% faster.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:15 -05:00
Alexander Duyck 1d9daf45b4 igb: Update igb Tx flags to improve code efficiency
This change is meant to improve the efficiency of the Tx flags in igb by
aligning them with the values that will later be written into either the
cmd_type or olinfo.  By doing this we are able to reduce most of these
functions to either just a simple shift followed by an or in the case of
cmd_type, or an and followed by an or in the case of olinfo.

In order to avoid type conversion errors I also adjusted the locations
where we were switching between CPU and little endian.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:14 -05:00
Alexander Duyck ed6aa10580 igb: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check
This change is meant to reduce the overhead for workloads that are not
using either TSO or checksum offloads.  Most of the time the compiler
should jump ahead after failing this check to the VLAN check since in the
igb_tx_csum call we start with that check as well.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:14 -05:00
Akeem G. Abodunrin 039454a818 igb: Support for modifying UDP RSS flow hashing
This patch provides ability to enable or disable UDP RSS hashing. It gives
users option of generating RSS hash based on the UDP source and destination
ports numbers. Currently, UDP flow hash is always disabled in igb-driver.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:14 -05:00
Carolyn Wyborny 867eb39e8b igb: Clear Go Link Disconnect for 82580 and later devices
Customers are requesting that the hw prevents PHY from establishing link
until the driver loads.  This patch clears the Go Link Disconnect bit which
provides the requested behavior on parts 82580 and later.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:14 -05:00
Greg Rose 85624caff9 ixgbevf: Reduce size of maximum rx buffer
There's no need to support up to 15k buffers since the HW is limited to
9.5k in SR-IOV mode.  Instead, allocate buffers that fit and align inside
of a 32K memory buffer.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:14 -05:00
Greg Rose 366c109912 ixgbevf: Add flag to indicate when rx is in net poll
napi_gro_receive shouldn't be called from netpoll context.  Doing
so was causing kernel panics when jumbo frames larger than 2K were set.
Add a flag to check if the Rx ring processing is occurring from interrupt
context or from netpoll context and call netif_rx() if in the polling
context.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:14 -05:00
Emil Tantilov a5f9337bdc ixgbevf: fix possible use of uninitialized variable
This patch resolves the following warning:

drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function ‘ixgbevf_probe’:
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1742:290: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized]
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1717:6: note: ‘err’ was declared here

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:14 -05:00
Jakub Kicinski e45dd5fe65 ixgbevf: make sure probe fails on MSI-X enable error
This driver cannot work without MSI-X interrupts
so there is no mechanism to fall back to.

Signed-off-by: Jakub Kicinski <jakub.kicinski@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:13 -05:00
Alexander Duyck f7c405618c ixgbe: Do not use DCA to prefetch the entire packet into the cache
The way the code was previously written it was causing DCA to prefetch the
entire packet into the cache when it was enabled.  That is excessive as we
only really need the headers.

We are now prefetching the headers via software so doing this from DCA would
be redundant anyway.  So clear the bit that was causing us to prefetch the
packet data and instead only use DCA for the descriptor rings.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13 14:18:13 -05:00
Greg Kroah-Hartman e592c5d0b7 Revert "USB/host: Cleanup unneccessary irq disable code"
This reverts commit 73d4066055.

Martin Steigerwald reported that this change caused a hard lockup when
using USB if threadirqs are enabled.  Thomas pointed out that this patch
is incorrect, and can cause problems.  So revert it to get the
previously working functionality back.

Reported-by: Martin Steigerwald <Martin@lichtvoll.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Chuansheng Liu <chuansheng.liu@intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 10:52:52 -08:00
Dan Williams c0bc309887 USB: option: add Alcatel X220/X500D USB IDs
Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 10:45:16 -08:00
Dan Williams fcb21645f1 USB: option: add Novatel E362 and Dell Wireless 5800 USB IDs
The Dell 5800 appears to be a simple rebrand of the Novatel E362.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 10:45:16 -08:00
Bjørn Mork f0e3e35c90 USB: keyspan: fix typo causing GPF on open
Commit f79b2d0f (USB: keyspan: fix NULL-pointer dereferences and
memory leaks) had a small typo which made the driver use wrong
offsets when mapping serial port private data.  This results in
in a GPF when the port is opened.

Reported-by: Richard <richjunk@pacbell.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 10:45:16 -08:00
Ralf Baechle 225ae5fd9a MIPS: Malta: Fix interupt number of CBUS UART.
The CBUS UART's interrupt number was wrong conflicting with the interrupt
being tied to the Intel PIIX4.  Since the PIIX4's interrupt is registered
before the CBUS UART which is not being used on most systems this would
not be noticed.

Attempts to open the ttyS2 CBUS UART would result in:

genirq: Flags mismatch irq 18. 00000000 (serial) vs. 00010000 (XT-PIC cascade)
serial_link_irq_chain: request failed: -16 for irq: 18

Qemu was written to match the kernel so will need to be fixed also.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-11-13 14:50:15 +01:00
Florian Westphal d3976a53ce netfilter: ipv6: only provide sk_bound_dev_if for link-local addr
yoshfuji points out that sk_bound_dev_if should only be provided
for link-local addresses.

IPv6 getpeer/sockname also has this test, i.e. we will now
only set sin6_scope_id if the original(!) destination
was a link-local address.

Reported-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-11-13 13:42:29 +01:00
Jani Nikula 2f4f649a69 drm/i915: do not ignore eDP bpc settings from vbt
There are laptops out there that need the eDP bpc from VBT. This is
effectively a revert of

commit 4344b813f1
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Aug 10 11:10:20 2012 +0200

    drm/i915: ignore eDP bpc settings from vbt

but putting the VBT check after the EDID check to see them both in dmesg if
this clamps more than the EDID. We have enough history with bpc clamping to
warrant the extra debug info.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47641
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56401
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-13 13:15:42 +01:00
Heiko Carstens 4bffbb3455 s390/mm: have 16 byte aligned struct pages
Select HAVE_ALIGNED_STRUCT_PAGE on s390, so that the slub allocator can make
use of compare and swap double for lockless updates. This increases the size
of struct page to 64 bytes (instead of 56 bytes), however the performance gain
justifies the increased size:

- now excactly four struct pages fit into a single cache line; the
  case that accessing a struct page causes two cache line loads
  does not exist anymore.
- calculating the offset of a struct page within the memmap array
  is only a simple shift instead of a more expensive multiplication.

A "hackbench 200 process 200" run on a 32 cpu system did show an 8% runtime
improvement.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-11-13 11:03:09 +01:00
Heiko Carstens 516bad44b9 s390/gup: fix access_ok() usage in __get_user_pages_fast()
access_ok() returns always "true" on s390. Therefore all access_ok()
invocations are rather pointless.
However when walking page tables we need to make sure that everything
is within bounds of the ASCE limit of the task's address space.
So remove the access_ok() call and add the same check we have in
get_user_pages_fast().

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-11-13 11:02:28 +01:00
Heiko Carstens d55c4c613f s390/gup: add missing TASK_SIZE check to get_user_pages_fast()
When walking page tables we need to make sure that everything
is within bounds of the ASCE limit of the task's address space.
Otherwise we might calculate e.g. a pud pointer which is not
within a pud and dereference it.
So check against TASK_SIZE (which is the ASCE limit) before
walking page tables.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-11-13 11:02:26 +01:00
Dan Carpenter d2153a1595 ALSA: es1968: precedence bug in snd_es1968_tea575x_get_pins()
I don't think this works as intended.  '|' higher precedence than ?: so
the bitwize OR "0 | (val & STR_MOST)" is a no-op.

I have re-written it to be more clear.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-13 08:51:47 +01:00
Takashi Iwai 6214b54cbf ASoC: Fixes for v3.7
A few small fixes plus a large but simple change for WM5102 which writes
 out a bunch of register updates to the device when we enable the clock
 as recommended following chip evaluation.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQoeX6AAoJELSic+t+oim9Yg8P/j49T5obxIXTZNMmMjrdc//f
 xM61/gLoRfVtY2deHdAzpUw6OSUOCQ0iVuasQalmnz2KNb/htzXXT+npjwPo93ok
 QZ4NBiMVJdOj/8m2u64K7flcGv2/llj2kvrj+8HmAI7KZ++zXMbBPVmvCSz0NpBL
 tFyd4zQ5Fp7n4MCDiQ7fRKwgUbbkwuW4jm/R4YEJS0tOrEgy0vG4MP/v8oEYcu/f
 tsOo0cMo8yESwpsy+fzfzqw7WS8LW/nKJJkRkYkO96YvgpDKbiPHadTJZDZ/+vg4
 uDpNOcLP2t7cRV5kh0fIQpjPYxtDFeV9HCua/2NcDwSRbIn2gd4/vP08q8iZeZK7
 F7c7VCZs9LgWnur0+RxS/yvlQJD0hmFEnaYobMXsULTZs4cRceigkBWOBSThG19y
 iCxRdy0XLaog4yTHb5Aql0szAQ8PkxdtOP7JoyF0nUQn9hwinISWtgyxfHzHXWKb
 SZHh2RLyzyyBWDh8VVBr4VM6q6WbQzS5MzS1IHipphoMGuGRKwQ5huPb048XjThB
 w1suZvX8aMw1vJy2au/d38P4891c9qUBA4woNqd1r+xrYOBAw8VPw7c5CxCyBgIg
 RUuCjEy/4RTkiXrhKzJA0kHmLXJKb53i2yNtzwe+w1lG6zdnhqGIuuHqLmdm89fL
 qgm/dUv6FIXhkMxtYz0+
 =3xEm
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.7

A few small fixes plus a large but simple change for WM5102 which writes
out a bunch of register updates to the device when we enable the clock
as recommended following chip evaluation.
2012-11-13 07:48:07 +01:00
Mark Brown ba027da8eb Merge branches 'fix/arizona', 'fix/core', 'fix/cs42l52', 'fix/mxs', 'fix/samsung' and 'fix/wm8978' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into tmp 2012-11-13 15:13:29 +09:00
Linus Torvalds 9924a1992a Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fix from Marcelo Tosatti:
 "A correction for user triggerable oops"

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)
2012-11-12 17:37:53 -08:00
Linus Torvalds 946edc47b6 Missing clkdev entries are causing regressions on the U8500 platform.
This pull request contains those missing clkdev entries which are needed
 to boot that platform.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQoT87AAoJEDqPOy9afJhJRyYP/0SVLiDlDMZ6bm3UqzKsqY4V
 QhlSZQAJo/7FFRATeB7hGVAwayYSnzOcXMPvViCWGPe/30cva+IN7HzUbqvMHOfL
 vBfSBIMZT9nqC74gQe8QytKuGG1Aysw4bzhDxLiePxB7yEtMMJ22yoabVQfQSsuS
 U09pJ1jfAwNkLFLOwdDGgmx+xajPp3VVQRUC0R5mE/S/MowC1KPjRPZJZZwUPrjf
 WXKKXYd2tv7d6IoZ9kPbgu5zsEqdF5a+GHkTuYlJw3Zk1VEOZuFLVAmskyyX9hvi
 t6609gsyxch+nxFaz0BYV1Cf/fCcvLgL/oRAGbtspiiJL7IOwBbV7ojfNHd+3Pju
 CNh0B1aRE0QrIv5cvcvdOA9VtLo1yyOjWpo5o2iwcSiD0d+txyztb5p16tTausSt
 7LRxNdvt7aT9SsxtGLMa/PLlyRO+HSW8BKUo3Y84ZiwxJGGyIqv07tQd0jhlwXzv
 OZtFe63f7MeWc/MwuAFBkSQM7UGMtHpyWuZJ2EGwnHCPssq1D7yzTWLLI3n3fgin
 G1kIQklQwS+SrkjQGzZyYo436Dt3uJJ4mmCsrHypjfg6dUEYphkuucwJs3aiWNNX
 YzIBAKKr9rQWKaYx7vqYe/0Jg3jxnGpAnYqurI1jCJJ0xQhQ5BMksdMehUclujRw
 VRvnAZn5oKQVUGPnpVjE
 =VC2a
 -----END PGP SIGNATURE-----

Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux

Pull ux500 clk fixes from Mike Turquette:
 "Missing clkdev entries are causing regressions on the U8500 platform.
  This pull request contains those missing clkdev entries which are
  needed to boot that platform."

* tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux:
  clk: ux500: Register slimbus clock lookups for u8500
  clk: ux500: Update rtc clock lookup for u8500
  clk: ux500: Register msp clock lookups for u8500
  clk: ux500: Register ssp clock lookups for u8500
  clk: ux500: Register i2c clock lookups for u8500
2012-11-12 17:05:53 -08:00
Linus Torvalds 70c80dfd57 Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull menuconfig portability fix from Michal Marek:
 "Here is a fix for v3.7 that makes menuconfig compile again on systems
  whose C library is lacking CIRCLEQ_* macros.  I thought I sent it
  earlier, but apparently I did not."

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  menuconfig: Replace CIRCLEQ by list_head-style lists.
2012-11-12 17:04:57 -08:00
Linus Torvalds 9dce781768 Merge branch 'fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED fix from Bryan Wu.

* 'fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  ledtrig-cpu: kill useless mutex to fix sleep in atomic context
2012-11-12 17:03:28 -08:00
Linus Torvalds b0db954c04 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull futex fix from Thomas Gleixner:
 "Single fix for a long standing futex race when taking over a futex
  whose owner died.  You can end up with two owners, which violates
  quite some rules."

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Handle futex_pi OWNER_DIED take over correctly
2012-11-12 17:02:21 -08:00
Petr Matousek 6d1068b3a9 KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)
On hosts without the XSAVE support unprivileged local user can trigger
oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest
cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN
ioctl.

invalid opcode: 0000 [#2] SMP
Modules linked in: tun ip6table_filter ip6_tables ebtable_nat ebtables
...
Pid: 24935, comm: zoog_kvm_monito Tainted: G      D      3.2.0-3-686-pae
EIP: 0060:[<f8b9550c>] EFLAGS: 00210246 CPU: 0
EIP is at kvm_arch_vcpu_ioctl_run+0x92a/0xd13 [kvm]
EAX: 00000001 EBX: 000f387e ECX: 00000000 EDX: 00000000
ESI: 00000000 EDI: 00000000 EBP: ef5a0060 ESP: d7c63e70
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process zoog_kvm_monito (pid: 24935, ti=d7c62000 task=ed84a0c0
task.ti=d7c62000)
Stack:
 00000001 f70a1200 f8b940a9 ef5a0060 00000000 00200202 f8769009 00000000
 ef5a0060 000f387e eda5c020 8722f9c8 00015bae 00000000 ed84a0c0 ed84a0c0
 c12bf02d 0000ae80 ef7f8740 fffffffb f359b740 ef5a0060 f8b85dc1 0000ae80
Call Trace:
 [<f8b940a9>] ? kvm_arch_vcpu_ioctl_set_sregs+0x2fe/0x308 [kvm]
...
 [<c12bfb44>] ? syscall_call+0x7/0xb
Code: 89 e8 e8 14 ee ff ff ba 00 00 04 00 89 e8 e8 98 48 ff ff 85 c0 74
1e 83 7d 48 00 75 18 8b 85 08 07 00 00 31 c9 8b 95 0c 07 00 00 <0f> 01
d1 c7 45 48 01 00 00 00 c7 45 1c 01 00 00 00 0f ae f0 89
EIP: [<f8b9550c>] kvm_arch_vcpu_ioctl_run+0x92a/0xd13 [kvm] SS:ESP
0068:d7c63e70

QEMU first retrieves the supported features via KVM_GET_SUPPORTED_CPUID
and then sets them later. So guest's X86_FEATURE_XSAVE should be masked
out on hosts without X86_FEATURE_XSAVE, making kvm_set_cr4 with
X86_CR4_OSXSAVE fail. Userspaces that allow specifying guest cpuid with
X86_FEATURE_XSAVE even on hosts that do not support it, might be
susceptible to this attack from inside the guest as well.

Allow setting X86_CR4_OSXSAVE bit only if host has XSAVE support.

Signed-off-by: Petr Matousek <pmatouse@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-11-12 21:16:45 -02:00
Fabio Estevam 2d4d07b97c ARM: boot: Fix usage of kecho
Since commit edc88ceb0 (ARM: be really quiet when building with 'make -s') the
following output is generated when building a kernel for ARM:

echo '  Kernel: arch/arm/boot/Image is ready'
  Kernel: arch/arm/boot/Image is ready
  Building modules, stage 2.
echo '  Kernel: arch/arm/boot/zImage is ready'
  Kernel: arch/arm/boot/zImage is ready

As per Documentation/kbuild/makefiles.txt the correct way of using kecho is
'@$(kecho)'.

Make this change so no more unwanted 'echo' messages are displayed.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-11-12 23:22:54 +01:00
Arnd Bergmann c9af5b76ef Minor OMAP PM and hwmod fixes for v3.7-rc series via
Kevin Hilman and Paul Walmsley.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQmXAHAAoJEBvUPslcq6Vz3GUP/RRDpRcsJUh0wQMA+MYDdPJf
 dVcYYczUPn7LCZEXsWVHiwOA0BxR+TQ1N7trUyGkj1cgGo3ImUatDHT9Czy1zZQs
 8fpb+2kkNoxhEeWkxYT6LZZ+RuwGfo6mruJSCX1ZCf8oblW8QqduNLjCJGViEc/J
 WFuuFb+ucSvqJWsD5L3Bma4/rkYhAx20MjoLWEh69WUUdVip1/YTZCT9ui7wRFin
 afvq2USSEacQBaPbY+rMOOJU13YK9pNLU5+kgiRyoQ63BIoI4Wl1smDa0NoyYoFO
 S8cIekRtXZQTUCp+r4IDz5ZTJ24Lu7ywMaawrQlHuKShxLaPTHJZAKSxcCg0pEdc
 gDj1FJ65PczSMryos6WR6M0kqInfJK8SGlGVUe9y3wV5kFKOrc/G3e1Vi8/xbBFn
 J9dkriQJ5Xf0w4VpfY4yy1TAQAWnHPunucFUMLKUXWwAnk4eSxRgz/zZBvj7xbey
 6oNre4W/fHXnF8YE1wLIsrqQJq9pOIQc9jz22/knjF0jjhQU1alFyJ6MhyINIH0o
 gJv1rO+VWfhsG/ECYd01E7ChG+9bATWjJpPHHB6brC24VLNgcDUlrJurvuGhNU8d
 5P+/6OKenBj+hHWuiWIpFY+jIkG9NRcq2QIPEkFVIvfDHZ34H5FTB89d1Kw3hLSX
 /0h4NvAA4aK8oJuItOhI
 =pyxl
 -----END PGP SIGNATURE-----

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

From Tony Lindgren <tony@atomide.com>:

Minor OMAP PM and hwmod fixes for v3.7-rc series via
Kevin Hilman and Paul Walmsley.

* tag 'omap-for-v3.7-rc4/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4: PM: fix regulator name for VDD_MPU
  ARM: OMAP4: hwmod data: do not enable or reset the McPDM during kernel init
  ARM: OMAP2+: hwmod: add flag to prevent hwmod code from touching IP block during init
  ARM: OMAP: hwmod: wait for sysreset complete after enabling hwmod
  ARM: OMAP2+: clockdomain: Fix OMAP4 ISS clk domain to support only SWSUP
  ARM: OMAP2+: PM: add missing newline to VC warning message

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-11-12 22:41:39 +01:00
YOSHIFUJI Hideaki / 吉藤英明 9fafd65ad4 ipv6 ndisc: Use pre-defined in6addr_linklocal_allnodes.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-12 15:23:21 -05:00
Jani Nikula d0ddfbd3d1 drm/i915/sdvo: clean up connectors on intel_sdvo_init() failures
Any failures in intel_sdvo_init() after the intel_sdvo_setup_output() call
left behind ghost connectors, attached (with a dangling pointer) to the
sdvo that has been cleaned up and freed. Properly destroy any connectors
attached to the encoder.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46381
CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
Tested-by: bjo@nord-west.org
[danvet: added a comment to explain why we need to clean up connectors
even when sdvo_output_setup fails.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-12 20:12:49 +01:00
Ulf Hansson 3d93067803 clk: ux500: Register slimbus clock lookups for u8500
At the same time the prcc bit for the kclk is corrected to
bit 8 instead of 3.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-11-12 10:20:23 -08:00
Ulf Hansson d4915cf5f6 clk: ux500: Update rtc clock lookup for u8500
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-11-12 10:20:22 -08:00
Ulf Hansson 15e66cd8d0 clk: ux500: Register msp clock lookups for u8500
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-11-12 10:20:22 -08:00
Ulf Hansson 08b1f1c7b9 clk: ux500: Register ssp clock lookups for u8500
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-11-12 10:20:22 -08:00
Ulf Hansson 4cf2d3b1b6 clk: ux500: Register i2c clock lookups for u8500
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-11-12 10:20:22 -08:00
Arnd Bergmann 69178dfeb1 This series fixes an annoying regression to make MUSB working
on omap4 again. Although it's getting rather late for these
 changes for the -rc cycle, it is important as many devices
 are using MUSB for charging and connectivity.
 
 With the USB PHY changes, MUSB started using the newly added
 drivers/usb/phy/omap-usb2.c driver introduced by commit
 657b306a (usb: phy: add a new driver for omap usb2 phy)
 that is using the newly introduced drivers/bus/omap-ocp2scp.c
 introduced by commit 26a84b3e (drivers: bus: add a new driver
 for omap-ocp2scp).
 
 These changes allowed dropping a lot of PHY related code from
 arch/arm/mach-omap2/omap_phy_internal.c and have it live in
 the device driver like it should with commit c9e4412a (arm: omap:
 phy: remove unused functions from omap-phy-internal.c).
 
 However, MUSB on omap4 broke with these changes for legacy
 platform data boot, and now only works with device tree for
 omap4. Unfortunately we are still few critical bindings away
 from being able to make omap4 usbale with device tree.
 
 Fix the regression properly by adding platform data support
 to the ocp2scp driver so we can avoid adding back the driver
 code to arch/arm/mach-omap2.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQmqakAAoJEBvUPslcq6VzBjcQANthvtvNsUrR3X3lB5GRwtIJ
 uGcOVqdrI9Y6seHQMqCiwa9JNlBHu+ABLYV4UGSNtHLAlaI+pilaqby7cUndFmBo
 O7FMPAK6EmrUqXewkQh3W3yx/JEy4zu7Kup5rK8p9kPBmqblrjdtfmlrIKjBBhbA
 4ZBQC82GSDg/UtLcVxjXgb2aJnLim5L2WU1drCSHgclyBWueg8ijFsTl9l7R9Zwh
 x6FV6DYHZyxFzvuXlB+83iZ1sJ6qpkD92hPe+Lj3jyxpW6+b6Mx5d/268743+Nde
 xzCxQ09JGYN+h/N+QX6SRhurHjlXGFwmAhYofdO+r7OdLrT12VHiOptRKh0N9DfX
 s1Mtk+X6f5iwKo8O//5DXkZPDLW8fI1GNs6QNsw71yM1mDP7tCamYUsSpLLJLcYo
 bB/O77HdQDWAWBOwbu+GY4eICTgh/Chj3LYe0Aic8F1jm8kzQm5CJMgxyAeMUrHX
 2O0yGUUIIqWkNdn/iluVHVs0nHwjfDZsRN4cAdMbjkqF4cJRkH2lIjrSSYlJxYmL
 cymFrkR0Evj2fmGXhEcX8pGgymlSp1Aj1tnaQ6I06XEjrlbtRpAsibniSx4OCcB2
 3sMZOpvmUYD/FecaZRatoOLQC6aNMY8ape0ghLFAklz1By7c2ytzGRQsoDqMoXql
 hl44QO9QKIYBYb2pPcDj
 =bbq5
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.7-rc4/musb-regression-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren <tony@atomide.com>:

This series fixes an annoying regression to make MUSB working
on omap4 again. Although it's getting rather late for these
changes for the -rc cycle, it is important as many devices
are using MUSB for charging and connectivity.

With the USB PHY changes, MUSB started using the newly added
drivers/usb/phy/omap-usb2.c driver introduced by commit
657b306a (usb: phy: add a new driver for omap usb2 phy)
that is using the newly introduced drivers/bus/omap-ocp2scp.c
introduced by commit 26a84b3e (drivers: bus: add a new driver
for omap-ocp2scp).

These changes allowed dropping a lot of PHY related code from
arch/arm/mach-omap2/omap_phy_internal.c and have it live in
the device driver like it should with commit c9e4412a (arm: omap:
phy: remove unused functions from omap-phy-internal.c).

However, MUSB on omap4 broke with these changes for legacy
platform data boot, and now only works with device tree for
omap4. Unfortunately we are still few critical bindings away
from being able to make omap4 usbale with device tree.

Fix the regression properly by adding platform data support
to the ocp2scp driver so we can avoid adding back the driver
code to arch/arm/mach-omap2.

* tag 'omap-for-v3.7-rc4/musb-regression-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: ocp2scp: create omap device for ocp2scp
  ARM: OMAP4: add _dev_attr_ to ocp2scp for representing usb_phy
  drivers: bus: ocp2scp: add pdata support

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-11-12 17:19:29 +01:00
Johannes Berg 43c771a196 wireless: allow 40 MHz on world roaming channels 12/13
When in world roaming mode, allow 40 MHz to be used
on channels 12 and 13 so that an AP that is, e.g.,
using HT40+ on channel 9 (in the UK) can be used.

Cc: stable@vger.kernel.org
Reported-by: Eddie Chapman <eddie@ehuk.net>
Tested-by: Eddie Chapman <eddie@ehuk.net>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-11-12 16:26:06 +01:00
Heiko Carstens 658e5ce705 s390/topology: fix core id vs physical package id mix-up
The current topology code confuses core id vs physical package id.

In other words /sys/devices/system/cpu/cpuX/topology/core_id
displays the physical_package_id (aka socket id) instead of the
core id.
The physical_package_id sysfs attribute always displays "-1"
instead of the socket id.

Fix this mix-up with a small patch which defines and initializes
topology_physical_package_id correctly and fixes the broken
core id handling.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-11-12 16:24:38 +01:00
Martin Schwidefsky fa968ee215 s390/signal: set correct address space control
If user space is running in primary mode it can switch to secondary
or access register mode, this is used e.g. in the clock_gettime code
of the vdso. If a signal is delivered to the user space process while
it has been running in access register mode the signal handler is
executed in access register mode as well which will result in a crash
most of the time.

Set the address space control bits in the PSW to the default for the
execution of the signal handler and make sure that the previous
address space control is restored on signal return. Take care
that user space can not switch to the kernel address space by
modifying the registers in the signal frame.

Cc: stable@vger.kernel.org
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-11-12 16:24:38 +01:00
Jiri Slaby 6b90466cfe HID: microsoft: do not use compound literal - fix build
In patch "HID: microsoft: fix invalid rdesc for 3k kbd" I fixed
support for MS 3k keyboards. However the added check using memcmp and
a compound statement breaks build on architectures where memcmp is a
macro with parameters.

hid-microsoft.c:51:18: error: macro "memcmp" passed 6 arguments, but takes just 3

On x86_64, memcmp is a function, so I did not see the error.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-11-12 15:34:59 +01:00
Takashi Iwai 05193639ca ALSA: hda - Add a missing quirk entry for iMac 9,1
This is another variant of iMac 9,1 with a different codec SSID.

Reported-and-tested-by: Everaldo Canuto <everaldo.canuto@gmail.com>
Cc: <stable@vger.kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-12 10:07:36 +01:00
Xi Wang 0c9f79be29 ipv4: avoid undefined behavior in do_ip_setsockopt()
(1<<optname) is undefined behavior in C with a negative optname or
optname larger than 31.  In those cases the result of the shift is
not necessarily zero (e.g., on x86).

This patch simplifies the code with a switch statement on optname.
It also allows the compiler to generate better code (e.g., using a
64-bit mask).

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-11 17:53:13 -05:00
Kirill Smelkov 810f4893e9 r8169: Drop tp arg from rtl8169_tx_vlan_tag()
Since eab6d18d (vlan: Don't check for vlan group before
vlan_tx_tag_present.) we don't check tp->vlgrp and thus
tp is not needed in this function.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-11-11 23:32:58 +01:00
Dayanidhi Sreenivasan ac50974b37 r8169: remove unused macros.
Signed-off-by: Dayanidhi Sreenivasan <dayanidhi.sreenivasan@gmail.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-11-11 23:19:08 +01:00
Nathan Lynch 0b8728d6f1 ledtrig-cpu: kill useless mutex to fix sleep in atomic context
Seeing the following every time the CPU enters or leaves idle on a
Beagleboard:

BUG: sleeping function called from invalid context at kernel/mutex.c:269
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/0
no locks held by swapper/0/0.
[<c001659c>] (unwind_backtrace+0x0/0xf8) from [<c05aaa7c>] (mutex_lock_nested+0x24/0x380)
[<c05aaa7c>] (mutex_lock_nested+0x24/0x380) from [<c043bd1c>] (ledtrig_cpu+0x38/0x88)
[<c043bd1c>] (ledtrig_cpu+0x38/0x88) from [<c000f4b0>] (cpu_idle+0xf4/0x120)
[<c000f4b0>] (cpu_idle+0xf4/0x120) from [<c07e47c8>] (start_kernel+0x2bc/0x30c)

Miles Lane has reported seeing similar splats during system suspend.

The mutex in struct led_trigger_cpu appears to have no function: it
resides in a per-cpu data structure which never changes after the
trigger is registered.  So just remove it.

Reported-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Bryan Wu <roc@roc-samos.(none)>
2012-11-11 12:09:43 -08:00
Linus Torvalds 77b67063bb Linux 3.7-rc5 2012-11-11 13:44:33 +01:00