hwmon: (ad7314) Adds missing spi_dev initialization

This driver was recently moved from IIO (where it worked) to hwmon (where
it doesn't.) This breakage occured because the hwmon version neglected to
correctly initialize a reference to spi_dev in its drvdata. The result is a
segfault every time the temperature is queried.

Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com>
Cc: stable@vger.kernel.org # 3.2+
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
serial/sunzilog: fix keyboard on SUN SPARCstation

The keyboard on my SUN SPARCstation 5 no longer worked.

    The culprint was: d4e33fac2408d37f7b52e80ca2a89f9fb482914f
    ("serial: Kill off NO_IRQ")

Fix up logic for no irq / irq so the keyboard works again.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
MCE, AMD: Drop too granulary family model checks

MCA details seldom change inbetween the models of a family so don't
be too conservative and enable decoding on everything starting from
K8 onwards. Minor adjustments can come in later but most importantly,
we have some decoding infrastructure in place for upcoming models by
default.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Revert "nouveau/bios: Fix tracking of BIOS image data"

This reverts commit d06221c0617ab6d0bc41c4980cefdd9c8cc9a1c1.

It turns out to trigger the "BUG_ON(!PageCompound(page))" in kfree(),
apparently because the code ends up trying to free somethng that was
never kmalloced in the first place.

BenH points out that the patch was untested and wasn't meant to go into
the upstream kernel that quickly in the first place.

Backtrace:
  bios_shadow
  bios_shadow_prom
  nv_mask
  init_io
  bios_shadow
  nouveau_bios_init
  NVReadVgaCrtc
  NVSetOwner
  nouveau_card_init
  nouveau_load

Reported-by: Meelis Roos <mroos@linux.ee>
Requested-by: Dave Airlie <airlied@gmail.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
avr32: fix nop compile fails from system.h split up

To fix:

  In file included from kernel/exit.c:61:
  arch/avr32/include/asm/mmu_context.h: In function 'enable_mmu':
  arch/avr32/include/asm/mmu_context.h:135: error: implicit declaration of function 'nop'

It needs an include of the new file created in commit ae4739465866
("Disintegrate asm/system.h for AVR32"), but since that file only
contains "nop", and since other arch already have precedent of putting
nop in asm/barrier.h we should just delete the new file and put nop in
barrier.h

Suggested-and-acked-by: David Howells <dhowells@redhat.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull Sparc fixes from David Miller:
 "One build regression and one serial probe regression fix on sparc."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  serial/sunzilog: fix keyboard on SUN SPARCstation
  sparc: pgtable_64: change include order
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm

Pull ARM fixes from Russell King:
 "Nothing too big here, just small fixes."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: fix more fallout from 9f97da78bf (Disintegrate asm/system.h for ARM)
  ARM: fix bios32.c build warning
  ARM: 7337/1: ptrace: fix ptrace_read_user for !CONFIG_MMU platforms
  ARM: fix missing bug.h include in arch/arm/kernel/insn.c
  ARM: sa11x0: fix build errors from DMA engine API updates
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md

Pull assorted md fixes from Neil Brown:
 - some RAID levels didn't clear up properly if md_integrity_register
  failed
 - a 'check' of RAID5/RAID6 doesn't actually read any data since a
   recent patch - so fix that (and mark for -stable)
 - a couple of other minor bugs.

* tag 'md-3.4-fixes' of git://neil.brown.name/md:
  md/raid1,raid10: don't compare excess byte during consistency check.
  md/raid5: Fix a bug about judging if the operation is syncing or replacing
  md/raid1:Remove unnecessary rcu_dereference(conf->mirrors[i].rdev).
  md: Avoid OOPS when reshaping raid1 to raid0
  md/raid5: fix handling of bad blocks during recovery.
  md/raid1: If md_integrity_register() failed,run() must free the mem
  md/raid0: If md_integrity_register() fails, raid0_run() must free the mem.
  md/linear: If md_integrity_register() fails, linear_run() must free the mem.
Merge tag 'mce-fix-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

Pull MCE fixlet from Borislav Petkov:
 "One fix which makes MCE decoding much more "liberal" wrt families."

* tag 'mce-fix-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  MCE, AMD: Drop too granulary family model checks
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon patches from Guenter Roeck:
 - Fix crash in ad7314 driver
 - Add support for AMD Trinity CPUs to k10temp driver
 - Fix __initdata/__initconst mixup in w83627ehf driver
 - Fix runtime warnings in acpi_power_meter and max6639 drivers
 - Fix build warnings in adm1031, f75375s, sht15, and gpio-fan drivers

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (ad7314) Adds missing spi_dev initialization
  hwmon: (k10temp) Add support for AMD Trinity CPUs
  hwmon: (w83627ehf) mark const init data with __initconst instead of __initdata
  hwmon: (acpi_power_meter) fix lockdep spew due to non-static lock class
  hwmon: (adm1031) Fix compiler warning
  hwmon: (f75375s) Fix warning message seen in some configurations
  hwmon: (max6639) Convert to dev_pm_ops
  hwmon: (sht15) Fix Kconfig dependencies
  hwmon: (gpio-fan) Fix Kconfig dependencies
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, kvm: Call restore_sched_clock_state() only after %gs is initialized
  x86: Use -mno-avx when available
  x86: Remove the ancient and deprecated disable_hlt() and enable_hlt() facility
  x86: Preserve lazy irq disable semantics in fixup_irqs()
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/p4: Add format attributes
  tracing, sched, vfs: Fix 'old_pid' usage in trace_sched_process_exec()
Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A bunch of smallish fixes that came up during the merge window as
  things got more testing - even more fixes from Axel, a fix for error
  handling in more complex systems using -EPROBE_DEFER and a couple of
  small fixes for the new dummy regulators."

* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Remove non-existent parameter from fixed-helper.c kernel doc
  regulator: Fix setting new voltage in s5m8767_set_voltage
  regulator: fix sysfs name collision between dummy and fixed dummy regulator
  regulator: Fix deadlock on removal of regulators with supplies
  regulator: Fix comments in include/linux/regulator/machine.h
  regulator: Only update [LDOx|DCx]_HIB_MODE bits in wm8350_[ldo|dcdc]_set_suspend_disable
  regulator: Fix setting low power mode for wm831x aldo
  regulator: Return microamps in wm8350_isink_get_current
  regulator: wm8350: Fix the logic to choose best current limit setting
  regulator: wm831x-isink: Fix the logic to choose best current limit setting
  regulator: wm831x-dcdc: Fix the logic to choose best current limit setting
  regulator: anatop: patching to device-tree property "reg".
  regulator: Do proper shift to set correct bit for DC[2|5]_HIB_MODE setting
  regulator: Fix restoring pmic.dcdcx_hib_mode settings in wm8350_dcdc_set_suspend_enable
  regulator: Fix unbalanced lock/unlock in mc13892_regulator_probe error path
  regulator: Fix set and get current limit for wm831x_buckv
  regulator: tps6586x: Fix list minimal voltage setting for LDO0
Merge tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull a single regmap fix from Mark Brown:
 "A simple bug that's been lurking for a while but not terribly visible
  since a high proportion of chips have no register 0 so the normal
  failure is that we end up doing a bit of extra I/O."

* tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: rbtree: Fix register default look-up in sync
Merge branch 'selinux' ("struct common_audit_data" sanitizer)

Merge common_audit_data cleanup patches from Eric Paris.

This is really too late, but it's a long-overdue cleanup of the costly
wrapper functions for the security layer.

The "struct common_audit_data" is used all over in critical paths,
allocated and initialized on the stack.  And used to be much too large,
causing not only unnecessarily big stack frames but the clearing of the
(mostly useless) data was also very visible in profiles.

As a particular example, in one microbenchmark for just doing "stat()"
over files a lot, selinux_inode_permission() used 7% of the CPU time.
That's despite the fact that it doesn't actually *do* anything: it is
just a helper wrapper function in the selinux security layer.

This patch-series shrinks "struct common_audit_data" sufficiently that
code generation for these kinds of wrapper functions is improved
noticeably, and we spend much less time just initializing data that we
will never use.

The functions still get called all the time, and it still shows up at
3.5+% in my microbenchmark, but it's quite a bit lower down the list,
and much less noticeable.

* Emailed patches from Eric Paris <eparis@redhat.com>:
  lsm_audit: don't specify the audit pre/post callbacks in 'struct common_audit_data'
  SELinux: do not allocate stack space for AVC data unless needed
  SELinux: remove avd from slow_avc_audit()
  SELinux: remove avd from selinux_audit_data
  LSM: shrink the common_audit_data data union
  LSM: shrink sizeof LSM specific portion of common_audit_data
Merge tag 'pm-for-3.4-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management updates from Rafael Wysocki:
 - Patch series that hopefully fixes races between the freezer and
   request_firmware() and request_firmware_nowait() for good, with two
   cleanups from Stephen Boyd on top.
 - Runtime PM fix from Alan Stern preventing tasks from getting stuck
   indefinitely in the runtime PM wait queue.
 - Device PM QoS update from MyungJoo Ham introducing a new variant of
   pm_qos_update_request() allowing the callers to specify a timeout.

* tag 'pm-for-3.4-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / QoS: add pm_qos_update_request_timeout() API
  firmware_class: Move request_firmware_nowait() to workqueues
  firmware_class: Reorganize fw_create_instance()
  PM / Sleep: Mitigate race between the freezer and request_firmware()
  PM / Sleep: Move disabling of usermode helpers to the freezer
  PM / Hibernate: Disable usermode helpers right before freezing tasks
  firmware_class: Do not warn that system is not ready from async loads
  firmware_class: Split _request_firmware() into three functions, v2
  firmware_class: Rework usermodehelper check
  PM / Runtime: don't forget to wake up waitqueue on failure