Skip to contentSkip to conversation

Linux 3.18.9

DISCUSSION Greg KH 1 participant 2 messages Mar 7, 2015 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 3.18.9 kernel.

All users of the 3.18 kernel series must upgrade.

The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Makefile                                     |    2 
 arch/arc/include/asm/pgtable.h               |    3 
 arch/arm/boot/dts/am335x-bone-common.dtsi    |    1 
 arch/arm/boot/dts/bcm63138.dtsi              |    5 
 arch/arm/boot/dts/tegra20.dtsi               |    8 -
 arch/arm/mach-mvebu/system-controller.c      |    2 
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c    |    2 
 arch/arm/mach-pxa/corgi.c                    |    3 
 arch/arm/mach-pxa/hx4700.c                   |    2 
 arch/arm/mach-pxa/poodle.c                   |    2 
 arch/arm/mach-sa1100/pm.c                    |    1 
 arch/arm/mach-vexpress/Kconfig               |    1 
 arch/arm64/kernel/signal32.c                 |    5 
 arch/metag/include/asm/processor.h           |    4 
 arch/mips/alchemy/common/clock.c             |    2 
 arch/mips/include/asm/asmmacro.h             |    4 
 arch/mips/include/asm/cpu-info.h             |    5 
 arch/mips/include/asm/mmu_context.h          |    7 
 arch/mips/include/asm/pgtable.h              |   42 +++--
 arch/mips/kernel/cps-vec.S                   |   16 +-
 arch/mips/kernel/cpu-probe.c                 |    4 
 arch/mips/kernel/mips_ksyms.c                |   10 +
 arch/mips/kvm/locore.S                       |    2 
 arch/mips/kvm/mips.c                         |   19 ++
 arch/powerpc/sysdev/axonram.c                |    2 
 arch/s390/kvm/interrupt.c                    |   22 ++-
 arch/s390/kvm/kvm-s390.c                     |    2 
 arch/x86/boot/compressed/Makefile            |    1 
 arch/x86/boot/compressed/efi_stub_64.S       |   25 ---
 arch/x86/boot/compressed/efi_thunk_64.S      |  196 +++++++++++++++++++++++++++
 arch/x86/kernel/acpi/boot.c                  |   22 +--
 arch/x86/kernel/pmc_atom.c                   |    4 
 arch/x86/kvm/x86.c                           |   19 +-
 arch/x86/mm/gup.c                            |    2 
 arch/x86/mm/hugetlbpage.c                    |    8 -
 arch/x86/mm/mmap.c                           |    6 
 arch/x86/pci/xen.c                           |   47 ------
 arch/x86/platform/efi/efi_stub_64.S          |  161 ----------------------
 arch/x86/platform/efi/efi_thunk_64.S         |  121 ++++++++++++++--
 block/blk-mq-tag.c                           |    1 
 block/blk-throttle.c                         |    3 
 block/cfq-iosched.c                          |   16 +-
 drivers/acpi/acpi_lpss.c                     |   19 ++
 drivers/bluetooth/ath3k.c                    |   10 +
 drivers/bluetooth/btusb.c                    |   11 +
 drivers/char/random.c                        |    8 -
 drivers/char/tpm/tpm-interface.c             |    2 
 drivers/char/tpm/tpm_i2c_atmel.c             |    4 
 drivers/char/tpm/tpm_i2c_nuvoton.c           |    5 
 drivers/char/tpm/tpm_i2c_stm_st33.c          |    2 
 drivers/char/tpm/tpm_ibmvtpm.c               |   28 ++-
 drivers/char/tpm/tpm_tis.c                   |   76 ++++++++--
 drivers/clocksource/mtk_timer.c              |    9 -
 drivers/cpufreq/cpufreq.c                    |    6 
 drivers/cpufreq/s3c2416-cpufreq.c            |    4 
 drivers/cpufreq/s3c24xx-cpufreq.c            |   10 -
 drivers/cpufreq/speedstep-lib.c              |    3 
 drivers/cpufreq/speedstep-smi.c              |   12 +
 drivers/edac/amd64_edac.c                    |   10 +
 drivers/edac/sb_edac.c                       |    9 -
 drivers/gpio/gpio-tps65912.c                 |   14 +
 drivers/gpio/gpiolib-of.c                    |    9 -
 drivers/hid/i2c-hid/i2c-hid.c                |    5 
 drivers/md/raid1.c                           |    5 
 drivers/md/raid5.c                           |    3 
 drivers/media/dvb-frontends/si2168.c         |    2 
 drivers/media/platform/Kconfig               |    6 
 drivers/media/rc/rc-main.c                   |   14 -
 drivers/media/usb/dvb-usb-v2/lmedm04.c       |   14 +
 drivers/media/usb/em28xx/em28xx-audio.c      |    8 -
 drivers/media/usb/em28xx/em28xx-core.c       |    4 
 drivers/media/usb/em28xx/em28xx-dvb.c        |   14 -
 drivers/media/usb/em28xx/em28xx-input.c      |    6 
 drivers/media/usb/em28xx/em28xx-video.c      |    6 
 drivers/misc/mei/hw-me.c                     |    5 
 drivers/mmc/host/sdhci-pxav3.c               |   52 ++++++-
 drivers/net/wireless/iwlwifi/mvm/mac80211.c  |    5 
 drivers/net/wireless/iwlwifi/mvm/tx.c        |    5 
 drivers/net/wireless/iwlwifi/pcie/tx.c       |    7 
 drivers/net/wireless/rtlwifi/pci.c           |    5 
 drivers/net/wireless/rtlwifi/pci.h           |    7 
 drivers/net/wireless/rtlwifi/rtl8192ee/fw.c  |    6 
 drivers/net/wireless/rtlwifi/rtl8192ee/hw.c  |  166 +++++++++++++++++++---
 drivers/net/wireless/rtlwifi/rtl8192ee/reg.h |    2 
 drivers/net/wireless/rtlwifi/rtl8192ee/trx.c |   16 --
 drivers/net/wireless/rtlwifi/rtl8192ee/trx.h |    2 
 drivers/pci/pci-driver.c                     |    2 
 drivers/pci/rom.c                            |    7 
 drivers/platform/x86/samsung-laptop.c        |   20 ++
 drivers/power/88pm860x_charger.c             |    1 
 drivers/power/bq24190_charger.c              |    2 
 drivers/power/gpio-charger.c                 |    4 
 drivers/scsi/megaraid/megaraid_sas_base.c    |   24 +--
 drivers/scsi/megaraid/megaraid_sas_fp.c      |   17 +-
 drivers/scsi/megaraid/megaraid_sas_fusion.c  |   24 ++-
 drivers/scsi/megaraid/megaraid_sas_fusion.h  |    9 -
 drivers/scsi/sg.c                            |   34 ++++
 drivers/target/iscsi/iscsi_target_tq.c       |   28 ---
 drivers/tty/pty.c                            |    3 
 drivers/tty/serial/atmel_serial.c            |    4 
 drivers/tty/serial/fsl_lpuart.c              |   16 +-
 drivers/tty/vt/vt.c                          |    4 
 drivers/usb/core/buffer.c                    |   26 ++-
 drivers/usb/core/driver.c                    |   29 +--
 drivers/usb/core/hcd.c                       |   16 +-
 drivers/usb/core/hub.c                       |   25 +--
 drivers/usb/core/message.c                   |   23 ---
 drivers/usb/core/usb.c                       |    1 
 drivers/usb/host/isp1760-hcd.c               |    3 
 drivers/usb/serial/cp210x.c                  |    1 
 drivers/xen/manage.c                         |    8 -
 drivers/xen/xen-scsiback.c                   |   14 -
 fs/binfmt_elf.c                              |    5 
 fs/btrfs/ctree.c                             |   17 --
 fs/btrfs/disk-io.c                           |   11 +
 fs/btrfs/tree-log.c                          |   93 +++++++++++-
 fs/jffs2/scan.c                              |    5 
 fs/lockd/mon.c                               |   13 +
 fs/nfs/callback.c                            |    8 -
 fs/nfs/callback_xdr.c                        |    4 
 fs/nfs/direct.c                              |    2 
 fs/nfs/internal.h                            |   22 ++-
 fs/nfs/nfs4proc.c                            |   14 +
 fs/nfs/pnfs.c                                |   41 ++---
 fs/nfs/super.c                               |    9 -
 fs/ocfs2/quota_local.c                       |    4 
 fs/proc/task_mmu.c                           |   14 +
 fs/quota/dquot.c                             |   18 --
 fs/quota/quota_v1.c                          |    4 
 fs/quota/quota_v2.c                          |   10 -
 fs/udf/inode.c                               |   28 ++-
 fs/xfs/libxfs/xfs_bmap.c                     |    6 
 fs/xfs/libxfs/xfs_symlink_remote.c           |    2 
 fs/xfs/xfs_buf_item.c                        |    4 
 fs/xfs/xfs_inode.c                           |    2 
 fs/xfs/xfs_qm.c                              |    5 
 fs/xfs/xfs_trans.c                           |    1 
 include/linux/fsnotify.h                     |    6 
 include/linux/nfs_xdr.h                      |    2 
 include/linux/quota.h                        |    4 
 include/linux/sunrpc/clnt.h                  |    3 
 include/linux/usb.h                          |    5 
 include/linux/usb/hcd.h                      |    3 
 include/net/cipso_ipv4.h                     |   25 ++-
 kernel/debug/kdb/kdb_main.c                  |    2 
 kernel/time/ntp.c                            |   10 -
 kernel/trace/ring_buffer.c                   |   40 ++++-
 kernel/trace/trace.c                         |    2 
 mm/hugetlb.c                                 |    2 
 net/bluetooth/smp.c                          |    6 
 net/ceph/osd_client.c                        |   26 ++-
 net/ipv4/cipso_ipv4.c                        |   51 ++++---
 net/netlabel/netlabel_kapi.c                 |   15 +-
 net/sunrpc/clnt.c                            |   12 -
 net/sunrpc/rpcb_clnt.c                       |    8 -
 security/smack/smack.h                       |   10 +
 security/smack/smack_lsm.c                   |   24 +--
 sound/pci/hda/patch_realtek.c                |    1 
 sound/pci/hda/patch_sigmatel.c               |   20 ++
 sound/pci/riptide/riptide.c                  |   27 ++-
 sound/pci/rme9652/hdspm.c                    |    6 
 sound/soc/codecs/rt5670.c                    |    1 
 sound/soc/davinci/Kconfig                    |    3 
 sound/soc/pxa/mioa701_wm9713.c               |    2 
 tools/perf/util/cloexec.c                    |   18 ++
 165 files changed, 1597 insertions(+), 850 deletions(-)

Adam Lee (1):
Bluetooth: ath3k: workaround the compatibility issue with xHCI controller

Adrian Hunter (1):
perf tools: Fix probing for PERF_FLAG_FD_CLOEXEC flag

Adrian Knoth (1):
ALSA: hdspm - Constrain periods to 2 on older cards

Alan Stern (3):
USB: fix use-after-free bug in usb_hcd_unlink_urb()
USB: don't cancel queued resets when unbinding drivers
USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd)

Alexander Usyskin (2):
mei: mask interrupt set bit on clean reset bit
mei: me: release hw from reset only during the reset flow

Alexey Brodkin (1):

      ARC: fix page address calculation if PAGE_OFFSET != LINUX_LINK_BASE

Andrey Ryabinin (1):
smack: fix possible use after frees in task_security() callers

Andy Shevchenko (1):
x86: pmc-atom: Assign debugfs node as soon as possible

Antti Palosaari (1):
si2168: define symbol rate limits

Arnd Bergmann (6):
ASoC: davinci: fix DM365_EVM codec selection
cpufreq: s3c: remove incorrect __init annotations
cpufreq: s3c: remove last use of resume_clocks callback
timberdale: do not select TIMB_DMA
ARM: vexpress: use ARM_CPU_SUSPEND if needed
ARM: mvebu: build armada375-smp code conditionally

Bard Liao (1):
ASoC: rt5670: Set use_single_rw flag for regmap

Borislav Petkov (1):
sb_edac: Fix detection on SNB machines

Catalin Marinas (1):

      arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian

Chen Jie (1):
jffs2: fix handling of corrupted summary length

Christophe Ricard (1):
tpm/tpm_i2c_stm_st33: Fix potential bug in tpm_stm_i2c_send

Cyrille Pitchen (1):
tty/serial: at91: fix error handling in atmel_serial_probe()

Dan Carpenter (1):
ALSA: off by one bug in snd_riptide_joystick_probe()

Daniel J Blueman (1):
EDAC, amd64_edac: Prevent OOPS with >16 memory controllers

Dave Chinner (4):
xfs: ensure buffer types are set correctly
xfs: inode unlink does not set AGI buffer type
xfs: set buf types when converting extent formats
xfs: set superblock buffer type correctly

David Hildenbrand (4):
KVM: s390: forward hrtimer if guest ckc not pending yet
KVM: s390: base hrtimer on a monotonic clock
KVM: s390: floating irqs: fix user triggerable endless loop
KVM: s390: avoid memory leaks if __inject_vm() fails

David Howells (1):
TPM: Add new TPMs to the tail of the list to prevent inadvertent change of dev

David Sterba (2):
btrfs: set proper message level for skinny metadata
btrfs: fix leak of path in btrfs_find_item

Dmitry Eremin-Solenikov (4):
power: gpio-charger: balance enable/disable_irq_wake calls
ARM: 8284/1: sa1100: clear RCSR_SMR on resume
ARM: pxa: add regulator_has_full_constraints to corgi board file
ARM: pxa: add regulator_has_full_constraints to poodle board file

Dmitry Osipenko (1):
ARM: dts: tegra20: fix GR3D, DSI unit and reg base addresses

Dmitry Tunin (1):
Bluetooth: ath3k: Add support of AR3012 bluetooth 13d3:3423 device

Emmanuel Grumbach (1):
iwlwifi: pcie: disable the SCD_BASE_ADDR when we resume from WoWLAN

Eyal Shapira (1):
iwlwifi: mvm: validate tid and sta_id in ba_notif

Filipe Manana (1):
Btrfs: fix fsync data loss after adding hard link to inode

Florian Fainelli (1):
ARM: dts: BCM63xx: fix L2 cache properties

George Spelvin (1):
random: Fix fast_mix() function

Greg Kroah-Hartman (1):

      Linux 3.18.9

Gregory CLEMENT (1):
mmc: sdhci-pxav3: Fix SDR50 and DDR50 capabilities for the Armada 38x flavor

Hans Holmberg (1):
gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node

Hans de Goede (1):
samsung-laptop: Add use_native_backlight quirk, and enable it on some models

Hector Marco-Gisbert (1):
x86, mm/ASLR: Fix stack randomization on 64-bit systems

Hon Ching (Vicky) Lo (1):
tpm: Fix NULL return in tpm_ibmvtpm_get_desired_dma

Hui Wang (1):
ALSA: hda - enable mute led quirk for one more hp machine.

Ilya Dryomov (1):
libceph: fix double __remove_osd() problem

James Hogan (6):
rc-main: Re-apply filter for no-op protocol change
KVM: MIPS: Disable HTW while in guest
KVM: MIPS: Don't leak FPU/DSP to guest
MIPS: Export FP functions used by lose_fpu(1) for KVM
MIPS: Export MSA functions used by lose_fpu(1) for KVM
metag: Fix KSTK_EIP() and KSTK_ESP() macros

Jan Kara (5):
fsnotify: fix handling of renames in audit
udf: Remove repeated loads blocksize
udf: Check length of extended attributes and allocation descriptors
xfs: Fix quota type in quota structures when reusing quota file
quota: Store maximum space limit in bytes

Jay Lan (1):
kdb: fix incorrect counts in KDB summary command output

Jeff Layton (1):
nfs: don't call blocking operations while !TASK_RUNNING

Jeff Moyer (1):
cfq-iosched: fix incorrect filing of rt async cfqq

Jiang Liu (2):
x86/xen: Treat SCI interrupt as normal GSI interrupt x86/irq: Fix regression caused by commit b568b8601f05

Jisheng Zhang (2):
mmc: sdhci-pxav3: fix unbalanced clock issues during probe
mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles

Johan Hedberg (1):
Bluetooth: Fix valid Identity Address check

John Stultz (1):
ntp: Fixup adjtimex freq validation on 32-bit systems

Juergen Gross (1):
xen-scsiback: mark pvscsi frontend request consumed only after last read

Kiran Padwal (1):
char: tpm: Add missing error check for devm_kzalloc

Konstantin Khlebnikov (2):
proc/pagemap: walk page tables under pte lock
cfq-iosched: handle failure of cfq group allocation

Krzysztof Kozlowski (2):
power_supply: 88pm860x: Fix leaked power supply on probe fail
power: bq24190: Fix ignored supplicants

Larry Finger (2):
rtlwifi: rtl8192ee: Fix problems with calculating free space in FIFO
rtlwifi: Remove logging statement that is no longer needed

Lars-Peter Clausen (1):

      ASoC: mioa701_wm9713: Fix speaker event

Lennart Sorensen (1):

      USB: cp210x: add ID for RUGGEDCOM USB Serial Console

Lokesh Vutla (1):
ARM: DRA7: hwmod: Fix boot crash with DEBUG_LL enabled on UART3

Luciano Coelho (2):
iwlwifi: mvm: fix failure path when power_update fails in add_interface
iwlwifi: mvm: always use mac color zero

Malcolm Priestley (2):
lmedm04: Increase Interupt due time to 200 msec
lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb

Manuel Lauss (1):
MIPS: Alchemy: Fix cpu clock calculation

Marcel Holtmann (1):
Bluetooth: btusb: Add support for Dynex/Insignia USB dongles

Marcelo Tosatti (1):
KVM: x86: update masterclock values on TSC writes

Marcin Wojtas (1):
mmc: sdhci-pxav3: Fix Armada 38x controller's caps according to erratum ERR-7878951

Markos Chandras (5):
MIPS: kernel: cps-vec: Replace "addi" with "addiu"
MIPS: asm: asmmacro: Replace "add" instructions with "addu"
MIPS: asm: pgtable: Add c0 hazards on HTW start/stop sequences
MIPS: asm: pgtable: Prevent HTW race when updating PTEs
MIPS: HTW: Prevent accidental HTW start due to nested htw_{start, stop}

Martin Vajnar (1):
hx4700: regulator: declare full constraints

Matej Dubovy (1):
Bluetooth: btusb: Add support for Lite-On (04ca) Broadcom based, BCM43142

Matt Fleming (1):
x86/efi: Avoid triple faults during EFI mixed mode calls

Matthew Wilcox (1):
axonram: Fix bug in direct_access

Matthias Brugger (1):
clocksource: mtk: Fix race conditions in probe code

Michel Dänzer (1):
PCI: Fix infinite loop with ROM image of size 0

Mika Westerberg (2):
ACPI / LPSS: Always disable I2C host controllers
ACPI / LPSS: Deassert resets for SPI host controllers on Braswell

Mikulas Patocka (1):
cpufreq: speedstep-smi: enable interrupts when waiting

Naoya Horiguchi (1):
mm/hugetlb: pmd_huge() returns true for non-present hugepage

NeilBrown (1):
md/raid5: Fix livelock when array is both resyncing and degraded.

Nicholas Bellinger (1):
iscsi-target: Drop problematic active_ts_list usage

Nicolas Pitre (1):
vt: provide notifications on selection changes

Nicolas Saenz Julienne (1):
gpio: tps65912: fix wrong container_of arguments

Paul Moore (1):
cipso: don't use IPCB() to locate the CIPSO IP option

Peng Tao (1):
nfs41: .init_read and .init_write can be called with valid pg_lseg

Peter Hurley (1):
tty: Prevent untrappable signals from malicious program

Ricardo Ribalda Delgado (1):
PCI: Generate uppercase hex for modalias var in uevent

Rick Dunn (1):
Bluetooth: btusb: Add Broadcom patchram support for ASUSTek devices

Robert Nelson (1):
ARM: dts: am335x-bone*: usb0 is hardwired for peripheral

Ross Lagerwall (1):
xen/manage: Fix USB interaction issues when resuming

Russell King (7):
em28xx: ensure "closing" messages terminate with a newline
em28xx-input: fix missing newlines
em28xx-audio: fix missing newlines
em28xx-core: fix missing newlines
em28xx-video: fix missing newlines
em28xx-dvb: fix missing newlines
em28xx-audio: fix missing newlines, again

Scot Doyle (1):
tpm_tis: verify interrupt during init

Sebastian Andrzej Siewior (1):
usb: core: buffer: smallest buffer should start at ARCH_DMA_MINALIGN

Seth Forshee (1):
HID: i2c-hid: Limit reads to wMaxInputLength bytes for input events

Stefan Agner (2):
serial: fsl_lpuart: delete timer on shutdown
serial: fsl_lpuart: avoid new transfer while DMA is running

Steven Rostedt (Red Hat) (1):
ring-buffer: Do not wake up a splice waiter when page is not full

[email protected] (3):
megaraid_sas: endianness related bug fixes and code optimization
megaraid_sas: fix the problem of non-existing VD exposed to host
megaraid_sas: disable interrupt_mask before enabling hardware interrupts

Takashi Iwai (1):
ALSA: hda - Set up GPIO for Toshiba Satellite S50D

Thadeu Lima de Souza Cascardo (1):
blk-throttle: check stats_cpu before reading it from sysfs

Tomáš Hodek (1):
md/raid1: fix read balance when a drive is write-mostly.

Tony Battersby (3):
blk-mq: fix double-free in error path
sg: fix unkillable I/O wait deadlock with scsi-mq
sg: fix EWOULDBLOCK errors with scsi-mq

Trond Myklebust (4):
NFS: struct nfs_commit_info.lock must always point to inode->i_lock
SUNRPC: NULL utsname dereference on NFS umount during namespace cleanup
NFSv4: Ensure we reference the inode for return-on-close in delegreturn NFSv4.1: Fix a kfree() of uninitialised pointers in decode_cb_sequence_args

Troy Tan (4):
rtlwifi: rtl8192ee: Fix adhoc fail
rtlwifi: rtl8192ee: Fix TX hang due to failure to update TX write point
rtlwifi: rtl8192ee: Fix parsing of received packet
rtlwifi: rtl8192ee: Fix DMA stalls

Vikram Mulukutla (1):
tracing: Fix unmapping loop in tracing_mark_write

Viresh Kumar (1):
cpufreq: Set cpufreq_cpu_data to NULL before putting kobject

honclo (1):
Added Little Endian support to vtpm module

author maintainer
#1 lore raw
Makefile +1 -1
index 0b3f8a1b3715..62b333802a0e 100644
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 8
+SUBLEVEL = 9
 EXTRAVERSION =
 NAME = Diseased Newt
 
arch/arc/include/asm/pgtable.h +2 -1
index 6b0b7f7ef783..7670f33b9ce2 100644
@@ -259,7 +259,8 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
 #define pmd_clear(xp)			do { pmd_val(*(xp)) = 0; } while (0)
 
 #define pte_page(x) (mem_map + \
-		(unsigned long)(((pte_val(x) - PAGE_OFFSET) >> PAGE_SHIFT)))
+		(unsigned long)(((pte_val(x) - CONFIG_LINUX_LINK_BASE) >> \
+				PAGE_SHIFT)))
 
 #define mk_pte(page, pgprot)						\
 ({									\
arch/arm/boot/dts/am335x-bone-common.dtsi +1 -0
index 6cc25ed912ee..2c6248d9a9ef 100644
@@ -195,6 +195,7 @@
 
 &usb0 {
 	status = "okay";
+	dr_mode = "peripheral";
 };
 
 &usb1 {
arch/arm/boot/dts/bcm63138.dtsi +3 -2
index f3bb2dd6269e..c97844cac4e7 100644
@@ -66,8 +66,9 @@
 			reg = <0x1d000 0x1000>;
 			cache-unified;
 			cache-level = <2>;
-			cache-sets = <16>;
-			cache-size = <0x80000>;
+			cache-size = <524288>;
+			cache-sets = <1024>;
+			cache-line-size = <32>;
 			interrupts = <GIC_PPI 0 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
arch/arm/boot/dts/tegra20.dtsi +4 -4
index 8acf5d85c99d..f76fe94267d6 100644
@@ -68,9 +68,9 @@
 			reset-names = "2d";
 		};
 
-		gr3d@54140000 {
+		gr3d@54180000 {
 			compatible = "nvidia,tegra20-gr3d";
-			reg = <0x54140000 0x00040000>;
+			reg = <0x54180000 0x00040000>;
 			clocks = <&tegra_car TEGRA20_CLK_GR3D>;
 			resets = <&tegra_car 24>;
 			reset-names = "3d";
@@ -130,9 +130,9 @@
 			status = "disabled";
 		};
 
-		dsi@542c0000 {
+		dsi@54300000 {
 			compatible = "nvidia,tegra20-dsi";
-			reg = <0x542c0000 0x00040000>;
+			reg = <0x54300000 0x00040000>;
 			clocks = <&tegra_car TEGRA20_CLK_DSI>;
 			resets = <&tegra_car 48>;
 			reset-names = "dsi";
arch/arm/mach-mvebu/system-controller.c +1 -1
index a068cb5c2ce8..c6c132acd7a6 100644
@@ -126,7 +126,7 @@ int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev)
 		return -ENODEV;
 }
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && defined(CONFIG_MACH_MVEBU_V7)
 void mvebu_armada375_smp_wa_init(void)
 {
 	u32 dev, rev;
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +1 -1
index 5684f112654b..4e9d2a97c2cb 100644
@@ -2017,7 +2017,7 @@ static struct omap_hwmod dra7xx_uart3_hwmod = {
 	.class		= &dra7xx_uart_hwmod_class,
 	.clkdm_name	= "l4per_clkdm",
 	.main_clk	= "uart3_gfclk_mux",
-	.flags		= HWMOD_SWSUP_SIDLE_ACT,
+	.flags		= HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
 	.prcm = {
 		.omap4 = {
 			.clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
arch/arm/mach-pxa/corgi.c +3 -0
index 06022b235730..89f790dda93e 100644
@@ -26,6 +26,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c/pxa-i2c.h>
 #include <linux/io.h>
+#include <linux/regulator/machine.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/spi/corgi_lcd.h>
@@ -752,6 +753,8 @@ static void __init corgi_init(void)
 		sharpsl_nand_partitions[1].size = 53 * 1024 * 1024;
 
 	platform_add_devices(devices, ARRAY_SIZE(devices));
+
+	regulator_has_full_constraints();
 }
 
 static void __init fixup_corgi(struct tag *tags, char **cmdline)
arch/arm/mach-pxa/hx4700.c +2 -0
index c66ad4edc5e3..5fb41ad6e3bc 100644
@@ -893,6 +893,8 @@ static void __init hx4700_init(void)
 	mdelay(10);
 	gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1);
 	mdelay(10);
+
+	regulator_has_full_constraints();
 }
 
 MACHINE_START(H4700, "HP iPAQ HX4700")
arch/arm/mach-pxa/poodle.c +2 -0
index 131991629116..e81d216b05e4 100644
@@ -25,6 +25,7 @@
 #include <linux/gpio.h>
 #include <linux/i2c.h>
 #include <linux/i2c/pxa-i2c.h>
+#include <linux/regulator/machine.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/spi/pxa2xx_spi.h>
@@ -455,6 +456,7 @@ static void __init poodle_init(void)
 	pxa_set_i2c_info(NULL);
 	i2c_register_board_info(0, ARRAY_AND_SIZE(poodle_i2c_devices));
 	poodle_init_spi();
+	regulator_has_full_constraints();
 }
 
 static void __init fixup_poodle(struct tag *tags, char **cmdline)
arch/arm/mach-sa1100/pm.c +1 -0
index 6645d1e31f14..34853d5dfda2 100644
@@ -81,6 +81,7 @@ static int sa11x0_pm_enter(suspend_state_t state)
 	/*
 	 * Ensure not to come back here if it wasn't intended
 	 */
+	RCSR = RCSR_SMR;
 	PSPR = 0;
 
 	/*
arch/arm/mach-vexpress/Kconfig +1 -0
index b2cfba16c4e8..18865136156f 100644
@@ -75,6 +75,7 @@ config ARCH_VEXPRESS_TC2_PM
 	depends on MCPM
 	select ARM_CCI
 	select ARCH_VEXPRESS_SPC
+	select ARM_CPU_SUSPEND
 	help
 	  Support for CPU and cluster power management on Versatile Express
 	  with a TC2 (A15x2 A7x3) big.LITTLE core tile.
arch/arm64/kernel/signal32.c +2 -3
index 1b9ad02837cf..76920d4040d4 100644
@@ -154,8 +154,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from)
 	case __SI_TIMER:
 		 err |= __put_user(from->si_tid, &to->si_tid);
 		 err |= __put_user(from->si_overrun, &to->si_overrun);
-		 err |= __put_user((compat_uptr_t)(unsigned long)from->si_ptr,
-				   &to->si_ptr);
+		 err |= __put_user(from->si_int, &to->si_int);
 		break;
 	case __SI_POLL:
 		err |= __put_user(from->si_band, &to->si_band);
@@ -184,7 +183,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from)
 	case __SI_MESGQ: /* But this is */
 		err |= __put_user(from->si_pid, &to->si_pid);
 		err |= __put_user(from->si_uid, &to->si_uid);
-		err |= __put_user((compat_uptr_t)(unsigned long)from->si_ptr, &to->si_ptr);
+		err |= __put_user(from->si_int, &to->si_int);
 		break;
 	default: /* this is just in case for now ... */
 		err |= __put_user(from->si_pid, &to->si_pid);
arch/metag/include/asm/processor.h +2 -2
index 881071c07942..13272fd5a5ba 100644
@@ -149,8 +149,8 @@ extern void exit_thread(void);
 
 unsigned long get_wchan(struct task_struct *p);
 
-#define	KSTK_EIP(tsk)	((tsk)->thread.kernel_context->CurrPC)
-#define	KSTK_ESP(tsk)	((tsk)->thread.kernel_context->AX[0].U0)
+#define	KSTK_EIP(tsk)	(task_pt_regs(tsk)->ctx.CurrPC)
+#define	KSTK_ESP(tsk)	(task_pt_regs(tsk)->ctx.AX[0].U0)
 
 #define user_stack_pointer(regs)        ((regs)->ctx.AX[0].U0)
 
arch/mips/alchemy/common/clock.c +2 -0
index d7557cde271a..3fff11ec7dc0 100644
@@ -128,6 +128,8 @@ static unsigned long alchemy_clk_cpu_recalc(struct clk_hw *hw,
 		t = 396000000;
 	else {
 		t = alchemy_rdsys(AU1000_SYS_CPUPLL) & 0x7f;
+		if (alchemy_get_cputype() < ALCHEMY_CPU_AU1300)
+			t &= 0x3f;
 		t *= parent_rate;
 	}
 
arch/mips/include/asm/asmmacro.h +2 -2
index 6caf8766b80f..71fef0af9c9a 100644
@@ -304,7 +304,7 @@
 	.set	push
 	.set	noat
 	SET_HARDFLOAT
-	add	$1, \base, \off
+	addu	$1, \base, \off
 	.word	LDD_MSA_INSN | (\wd << 6)
 	.set	pop
 	.endm
@@ -313,7 +313,7 @@
 	.set	push
 	.set	noat
 	SET_HARDFLOAT
-	add	$1, \base, \off
+	addu	$1, \base, \off
 	.word	STD_MSA_INSN | (\wd << 6)
 	.set	pop
 	.endm
arch/mips/include/asm/cpu-info.h +5 -0
index a6c9ccb33c5c..c3f4f2d2e108 100644
@@ -84,6 +84,11 @@ struct cpuinfo_mips {
 	 * (shifted by _CACHE_SHIFT)
 	 */
 	unsigned int		writecombine;
+	/*
+	 * Simple counter to prevent enabling HTW in nested
+	 * htw_start/htw_stop calls
+	 */
+	unsigned int		htw_seq;
 } __attribute__((aligned(SMP_CACHE_BYTES)));
 
 extern struct cpuinfo_mips cpu_data[];
arch/mips/include/asm/mmu_context.h +6 -1
index 2f82568a3ee4..bc01579a907a 100644
@@ -25,7 +25,6 @@ do {									\
 	if (cpu_has_htw) {						\
 		write_c0_pwbase(pgd);					\
 		back_to_back_c0_hazard();				\
-		htw_reset();						\
 	}								\
 } while (0)
 
@@ -142,6 +141,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 	unsigned long flags;
 	local_irq_save(flags);
 
+	htw_stop();
 	/* Check if our ASID is of an older version and thus invalid */
 	if ((cpu_context(cpu, next) ^ asid_cache(cpu)) & ASID_VERSION_MASK)
 		get_new_mmu_context(next, cpu);
@@ -154,6 +154,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 	 */
 	cpumask_clear_cpu(cpu, mm_cpumask(prev));
 	cpumask_set_cpu(cpu, mm_cpumask(next));
+	htw_start();
 
 	local_irq_restore(flags);
 }
@@ -180,6 +181,7 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next)
 
 	local_irq_save(flags);
 
+	htw_stop();
 	/* Unconditionally get a new ASID.  */
 	get_new_mmu_context(next, cpu);
 
@@ -189,6 +191,7 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next)
 	/* mark mmu ownership change */
 	cpumask_clear_cpu(cpu, mm_cpumask(prev));
 	cpumask_set_cpu(cpu, mm_cpumask(next));
+	htw_start();
 
 	local_irq_restore(flags);
 }
@@ -203,6 +206,7 @@ drop_mmu_context(struct mm_struct *mm, unsigned cpu)
 	unsigned long flags;
 
 	local_irq_save(flags);
+	htw_stop();
 
 	if (cpumask_test_cpu(cpu, mm_cpumask(mm)))  {
 		get_new_mmu_context(mm, cpu);
@@ -211,6 +215,7 @@ drop_mmu_context(struct mm_struct *mm, unsigned cpu)
 		/* will get a new context next time */
 		cpu_context(cpu, mm) = 0;
 	}
+	htw_start();
 	local_irq_restore(flags);
 }
 
arch/mips/include/asm/pgtable.h +25 -17

79 lines not on this page · raw message

arch/mips/kernel/cps-vec.S +8 -8
index 0384b05ab5a0..55b759a0019e 100644
@@ -99,11 +99,11 @@ not_nmi:
 	xori	t2, t1, 0x7
 	beqz	t2, 1f
 	 li	t3, 32
-	addi	t1, t1, 1
+	addiu	t1, t1, 1
 	sllv	t1, t3, t1
 1:	/* At this point t1 == I-cache sets per way */
 	_EXT	t2, v0, MIPS_CONF1_IA_SHF, MIPS_CONF1_IA_SZ
-	addi	t2, t2, 1
+	addiu	t2, t2, 1
 	mul	t1, t1, t0
 	mul	t1, t1, t2
 
@@ -126,11 +126,11 @@ icache_done:
 	xori	t2, t1, 0x7
 	beqz	t2, 1f
 	 li	t3, 32
-	addi	t1, t1, 1
+	addiu	t1, t1, 1
 	sllv	t1, t3, t1
 1:	/* At this point t1 == D-cache sets per way */
 	_EXT	t2, v0, MIPS_CONF1_DA_SHF, MIPS_CONF1_DA_SZ
-	addi	t2, t2, 1
+	addiu	t2, t2, 1
 	mul	t1, t1, t0
 	mul	t1, t1, t2
 
@@ -250,7 +250,7 @@ LEAF(mips_cps_core_init)
 	mfc0	t0, CP0_MVPCONF0
 	srl	t0, t0, MVPCONF0_PVPE_SHIFT
 	andi	t0, t0, (MVPCONF0_PVPE >> MVPCONF0_PVPE_SHIFT)
-	addi	t7, t0, 1
+	addiu	t7, t0, 1
 
 	/* If there's only 1, we're done */
 	beqz	t0, 2f
@@ -280,7 +280,7 @@ LEAF(mips_cps_core_init)
 	mttc0	t0, CP0_TCHALT
 
 	/* Next VPE */
-	addi	t5, t5, 1
+	addiu	t5, t5, 1
 	slt	t0, t5, t7
 	bnez	t0, 1b
 	 nop
@@ -317,7 +317,7 @@ LEAF(mips_cps_boot_vpes)
 	mfc0	t1, CP0_MVPCONF0
 	srl	t1, t1, MVPCONF0_PVPE_SHIFT
 	andi	t1, t1, MVPCONF0_PVPE >> MVPCONF0_PVPE_SHIFT
-	addi	t1, t1, 1
+	addiu	t1, t1, 1
 
 	/* Calculate a mask for the VPE ID from EBase.CPUNum */
 	clz	t1, t1
@@ -424,7 +424,7 @@ LEAF(mips_cps_boot_vpes)
 
 	/* Next VPE */
 2:	srl	t6, t6, 1
-	addi	t5, t5, 1
+	addiu	t5, t5, 1
 	bnez	t6, 1b
 	 nop
 
arch/mips/kernel/cpu-probe.c +3 -1
index dc49cf30c2db..5d6e59f20750 100644
@@ -367,8 +367,10 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
 	if (config3 & MIPS_CONF3_MSA)
 		c->ases |= MIPS_ASE_MSA;
 	/* Only tested on 32-bit cores */
-	if ((config3 & MIPS_CONF3_PW) && config_enabled(CONFIG_32BIT))
+	if ((config3 & MIPS_CONF3_PW) && config_enabled(CONFIG_32BIT)) {
+		c->htw_seq = 0;
 		c->options |= MIPS_CPU_HTW;
+	}
 
 	return config3 & MIPS_CONF_M;
 }
arch/mips/kernel/mips_ksyms.c +10 -0
index 2607c3a4ff7e..1b2452e2be67 100644
@@ -14,6 +14,8 @@
 #include <linux/mm.h>
 #include <asm/uaccess.h>
 #include <asm/ftrace.h>
+#include <asm/fpu.h>
+#include <asm/msa.h>
 
 extern void *__bzero(void *__s, size_t __count);
 extern long __strncpy_from_kernel_nocheck_asm(char *__to,
@@ -34,6 +36,14 @@ extern long __strnlen_user_nocheck_asm(const char *s);
 extern long __strnlen_user_asm(const char *s);
 
 /*
+ * Core architecture code
+ */
+EXPORT_SYMBOL_GPL(_save_fp);
+#ifdef CONFIG_CPU_HAS_MSA
+EXPORT_SYMBOL_GPL(_save_msa);
+#endif
+
+/*
  * String functions
  */
 EXPORT_SYMBOL(memset);
arch/mips/kvm/locore.S +1 -1
index d7279c03c517..4a68b176d6e4 100644
@@ -434,7 +434,7 @@ __kvm_mips_return_to_guest:
 	/* Setup status register for running guest in UM */
 	.set	at
 	or	v1, v1, (ST0_EXL | KSU_USER | ST0_IE)
-	and	v1, v1, ~ST0_CU0
+	and	v1, v1, ~(ST0_CU0 | ST0_MX)
 	.set	noat
 	mtc0	v1, CP0_STATUS
 	ehb
arch/mips/kvm/mips.c +16 -3
index e3b21e51ff7e..270bbd41769e 100644
@@ -15,9 +15,11 @@
 #include <linux/vmalloc.h>
 #include <linux/fs.h>
 #include <linux/bootmem.h>
+#include <asm/fpu.h>
 #include <asm/page.h>
 #include <asm/cacheflush.h>
 #include <asm/mmu_context.h>
+#include <asm/pgtable.h>
 
 #include <linux/kvm_host.h>
 
@@ -378,6 +380,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
 		vcpu->mmio_needed = 0;
 	}
 
+	lose_fpu(1);
+
 	local_irq_disable();
 	/* Check if we have any exceptions/interrupts pending */
 	kvm_mips_deliver_interrupts(vcpu,
@@ -385,8 +389,14 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
 
 	kvm_guest_enter();
 
+	/* Disable hardware page table walking while in guest */
+	htw_stop();
+
 	r = __kvm_mips_vcpu_run(run, vcpu);
 
+	/* Re-enable HTW before enabling interrupts */
+	htw_start();
+
 	kvm_guest_exit();
 	local_irq_enable();
 
@@ -980,9 +990,6 @@ static void kvm_mips_set_c0_status(void)
 {
 	uint32_t status = read_c0_status();
 
-	if (cpu_has_fpu)
-		status |= (ST0_CU1);
-
 	if (cpu_has_dsp)
 		status |= (ST0_MX);
 
@@ -1002,6 +1009,9 @@ int kvm_mips_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu)
 	enum emulation_result er = EMULATE_DONE;
 	int ret = RESUME_GUEST;
 
+	/* re-enable HTW before enabling interrupts */
+	htw_start();
+
 	/* Set a default exit reason */
 	run->exit_reason = KVM_EXIT_UNKNOWN;
 	run->ready_for_interrupt_injection = 1;
@@ -1136,6 +1146,9 @@ skip_emul:
 		}
 	}
 
+	/* Disable HTW before returning to guest or host */
+	htw_stop();
+
 	return ret;
 }
 
arch/powerpc/sysdev/axonram.c +1 -1
index ad56edc39919..e8bb33b2d3cc 100644
@@ -156,7 +156,7 @@ axon_ram_direct_access(struct block_device *device, sector_t sector,
 	}
 
 	*kaddr = (void *)(bank->ph_addr + offset);
-	*pfn = virt_to_phys(kaddr) >> PAGE_SHIFT;
+	*pfn = virt_to_phys(*kaddr) >> PAGE_SHIFT;
 
 	return 0;
 }
arch/s390/kvm/interrupt.c +19 -3
index 4fc3fed636dc..29e2e5aa2111 100644
@@ -613,7 +613,7 @@ no_timer:
 	__unset_cpu_idle(vcpu);
 	vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
 
-	hrtimer_try_to_cancel(&vcpu->arch.ckc_timer);
+	hrtimer_cancel(&vcpu->arch.ckc_timer);
 	return 0;
 }
 
@@ -633,10 +633,20 @@ void kvm_s390_vcpu_wakeup(struct kvm_vcpu *vcpu)
 enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer)
 {
 	struct kvm_vcpu *vcpu;
+	u64 now, sltime;
 
 	vcpu = container_of(timer, struct kvm_vcpu, arch.ckc_timer);
-	kvm_s390_vcpu_wakeup(vcpu);
+	now = get_tod_clock_fast() + vcpu->arch.sie_block->epoch;
+	sltime = tod_to_ns(vcpu->arch.sie_block->ckc - now);
 
+	/*
+	 * If the monotonic clock runs faster than the tod clock we might be
+	 * woken up too early and have to go back to sleep to avoid deadlocks.
+	 */
+	if (vcpu->arch.sie_block->ckc > now &&
+	    hrtimer_forward_now(timer, ns_to_ktime(sltime)))
+		return HRTIMER_RESTART;
+	kvm_s390_vcpu_wakeup(vcpu);
 	return HRTIMER_NORESTART;
 }
 
@@ -840,6 +850,8 @@ static int __inject_vm(struct kvm *kvm, struct kvm_s390_interrupt_info *inti)
 		list_add_tail(&inti->list, &iter->list);
 	}
 	atomic_set(&fi->active, 1);
+	if (atomic_read(&kvm->online_vcpus) == 0)
+		goto unlock_fi;
 	sigcpu = find_first_bit(fi->idle_mask, KVM_MAX_VCPUS);
 	if (sigcpu == KVM_MAX_VCPUS) {
 		do {
@@ -864,6 +876,7 @@ int kvm_s390_inject_vm(struct kvm *kvm,
 		       struct kvm_s390_interrupt *s390int)
 {
 	struct kvm_s390_interrupt_info *inti;
+	int rc;
 
 	inti = kzalloc(sizeof(*inti), GFP_KERNEL);
 	if (!inti)
@@ -911,7 +924,10 @@ int kvm_s390_inject_vm(struct kvm *kvm,
 	trace_kvm_s390_inject_vm(s390int->type, s390int->parm, s390int->parm64,
 				 2);
 
-	return __inject_vm(kvm, inti);
+	rc = __inject_vm(kvm, inti);
+	if (rc)
+		kfree(inti);
+	return rc;
 }
 
 void kvm_s390_reinject_io_int(struct kvm *kvm,
arch/s390/kvm/kvm-s390.c +1 -1
index 55aade49b6d1..ced09d8738b4 100644
@@ -662,7 +662,7 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
 		if (rc)
 			return rc;
 	}
-	hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
+	hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
 	vcpu->arch.ckc_timer.function = kvm_s390_idle_wakeup;
 	get_cpu_id(&vcpu->arch.cpu_id);
 	vcpu->arch.cpu_id.version = 0xff;
arch/x86/boot/compressed/Makefile +1 -0
index 6a1a8458c042..30c0acf4ea6c 100644
@@ -36,6 +36,7 @@ vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/aslr.o
 $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
 
 vmlinux-objs-$(CONFIG_EFI_STUB) += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o
+vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o
 
 $(obj)/vmlinux: $(vmlinux-objs-y) FORCE
 	$(call if_changed,ld)
arch/x86/boot/compressed/efi_stub_64.S +0 -25
index 7ff3632806b1..99494dff2113 100644
@@ -3,28 +3,3 @@
 #include <asm/processor-flags.h>
 
 #include "../../platform/efi/efi_stub_64.S"
-
-#ifdef CONFIG_EFI_MIXED
-	.code64
-	.text
-ENTRY(efi64_thunk)
-	push	%rbp
-	push	%rbx
-
-	subq	$16, %rsp
-	leaq	efi_exit32(%rip), %rax
-	movl	%eax, 8(%rsp)
-	leaq	efi_gdt64(%rip), %rax
-	movl	%eax, 4(%rsp)
-	movl	%eax, 2(%rax)		/* Fixup the gdt base address */
-	leaq	efi32_boot_gdt(%rip), %rax
-	movl	%eax, (%rsp)
-
-	call	__efi64_thunk
-
-	addq	$16, %rsp
-	pop	%rbx
-	pop	%rbp
-	ret
-ENDPROC(efi64_thunk)
-#endif /* CONFIG_EFI_MIXED */
arch/x86/boot/compressed/efi_thunk_64.S new file +196 -0

196 lines not on this page · raw message

arch/x86/kernel/acpi/boot.c +14 -8
index a142e77693e1..a3eadfdc3e04 100644
@@ -604,18 +604,24 @@ void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)
 
 int acpi_gsi_to_irq(u32 gsi, unsigned int *irqp)
 {
-	int irq;
+	int rc, irq, trigger, polarity;
 
 	if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
 		*irqp = gsi;
-	} else {
-		irq = mp_map_gsi_to_irq(gsi,
-					IOAPIC_MAP_ALLOC | IOAPIC_MAP_CHECK);
-		if (irq < 0)
-			return -1;
-		*irqp = irq;
+		return 0;
 	}
-	return 0;
+
+	rc = acpi_get_override_irq(gsi, &trigger, &polarity);
+	if (rc == 0) {
+		trigger = trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE;
+		polarity = polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
+		irq = acpi_register_gsi(NULL, gsi, trigger, polarity);
+		if (irq >= 0) {
+			*irqp = irq;
+			return 0;
+		}
+	}
+	return -1;
 }
 EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
 
arch/x86/kernel/pmc_atom.c +3 -1
index 0ee5025e0fa4..8bb9a611ca23 100644
@@ -217,6 +217,8 @@ static int pmc_dbgfs_register(struct pmc_dev *pmc, struct pci_dev *pdev)
 	if (!dir)
 		return -ENOMEM;
 
+	pmc->dbgfs_dir = dir;
+
 	f = debugfs_create_file("dev_state", S_IFREG | S_IRUGO,
 				dir, pmc, &pmc_dev_state_ops);
 	if (!f) {
@@ -229,7 +231,7 @@ static int pmc_dbgfs_register(struct pmc_dev *pmc, struct pci_dev *pdev)
 		dev_err(&pdev->dev, "sleep_state register failed\n");
 		goto err;
 	}
-	pmc->dbgfs_dir = dir;
+
 	return 0;
 err:
 	pmc_dbgfs_unregister(pmc);
arch/x86/kvm/x86.c +10 -9
index 506488cfa385..8b92cf4b165a 100644
@@ -1237,21 +1237,22 @@ void kvm_track_tsc_matching(struct kvm_vcpu *vcpu)
 {
 #ifdef CONFIG_X86_64
 	bool vcpus_matched;
-	bool do_request = false;
 	struct kvm_arch *ka = &vcpu->kvm->arch;
 	struct pvclock_gtod_data *gtod = &pvclock_gtod_data;
 
 	vcpus_matched = (ka->nr_vcpus_matched_tsc + 1 ==
 			 atomic_read(&vcpu->kvm->online_vcpus));
 
-	if (vcpus_matched && gtod->clock.vclock_mode == VCLOCK_TSC)
-		if (!ka->use_master_clock)
-			do_request = 1;
-
-	if (!vcpus_matched && ka->use_master_clock)
-			do_request = 1;
-
-	if (do_request)
+	/*
+	 * Once the masterclock is enabled, always perform request in
+	 * order to update it.
+	 *
+	 * In order to enable masterclock, the host clocksource must be TSC
+	 * and the vcpus need to have matched TSCs.  When that happens,
+	 * perform request to enable masterclock.
+	 */
+	if (ka->use_master_clock ||
+	    (gtod->clock.vclock_mode == VCLOCK_TSC && vcpus_matched))
 		kvm_make_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu);
 
 	trace_kvm_track_tsc(vcpu->vcpu_id, ka->nr_vcpus_matched_tsc,
arch/x86/mm/gup.c +1 -1
index 207d9aef662d..448ee8912d9b 100644
@@ -172,7 +172,7 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,
 		 */
 		if (pmd_none(pmd) || pmd_trans_splitting(pmd))
 			return 0;
-		if (unlikely(pmd_large(pmd))) {
+		if (unlikely(pmd_large(pmd) || !pmd_present(pmd))) {
 			/*
 			 * NUMA hinting faults need to be handled in the GUP
 			 * slowpath for accounting purposes and so that they
arch/x86/mm/hugetlbpage.c +7 -1
index 8b977ebf9388..006cc914994b 100644
@@ -66,9 +66,15 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)
 	return ERR_PTR(-EINVAL);
 }
 
+/*
+ * pmd_huge() returns 1 if @pmd is hugetlb related entry, that is normal
+ * hugetlb entry or non-present (migration or hwpoisoned) hugetlb entry.
+ * Otherwise, returns 0.
+ */
 int pmd_huge(pmd_t pmd)
 {
-	return !!(pmd_val(pmd) & _PAGE_PSE);
+	return !pmd_none(pmd) &&
+		(pmd_val(pmd) & (_PAGE_PRESENT|_PAGE_PSE)) != _PAGE_PRESENT;
 }
 
 int pud_huge(pud_t pud)
arch/x86/mm/mmap.c +3 -3
index 919b91205cd4..df4552bd239e 100644
@@ -35,12 +35,12 @@ struct va_alignment __read_mostly va_align = {
 	.flags = -1,
 };
 
-static unsigned int stack_maxrandom_size(void)
+static unsigned long stack_maxrandom_size(void)
 {
-	unsigned int max = 0;
+	unsigned long max = 0;
 	if ((current->flags & PF_RANDOMIZE) &&
 		!(current->personality & ADDR_NO_RANDOMIZE)) {
-		max = ((-1U) & STACK_RND_MASK) << PAGE_SHIFT;
+		max = ((-1UL) & STACK_RND_MASK) << PAGE_SHIFT;
 	}
 
 	return max;
arch/x86/pci/xen.c +0 -47

59 lines not on this page · raw message

arch/x86/platform/efi/efi_stub_64.S +0 -161

167 lines not on this page · raw message

arch/x86/platform/efi/efi_thunk_64.S +104 -17

141 lines not on this page · raw message

block/blk-mq-tag.c +1 -0
index ff18dab6b585..702ae29b8d90 100644
@@ -500,6 +500,7 @@ static int bt_alloc(struct blk_mq_bitmap_tags *bt, unsigned int depth,
 	bt->bs = kzalloc(BT_WAIT_QUEUES * sizeof(*bt->bs), GFP_KERNEL);
 	if (!bt->bs) {
 		kfree(bt->map);
+		bt->map = NULL;
 		return -ENOMEM;
 	}
 
block/blk-throttle.c +3 -0
index 9273d0969ebd..5b9c6d5c3636 100644
@@ -1292,6 +1292,9 @@ static u64 tg_prfill_cpu_rwstat(struct seq_file *sf,
 	struct blkg_rwstat rwstat = { }, tmp;
 	int i, cpu;
 
+	if (tg->stats_cpu == NULL)
+		return 0;
+
 	for_each_possible_cpu(cpu) {
 		struct tg_stats_cpu *sc = per_cpu_ptr(tg->stats_cpu, cpu);
 
block/cfq-iosched.c +13 -3
index 6f2751d305de..5da8e6e9ab4b 100644
@@ -3590,6 +3590,11 @@ retry:
 
 	blkcg = bio_blkcg(bio);
 	cfqg = cfq_lookup_create_cfqg(cfqd, blkcg);
+	if (!cfqg) {
+		cfqq = &cfqd->oom_cfqq;
+		goto out;
+	}
+
 	cfqq = cic_to_cfqq(cic, is_sync);
 
 	/*
@@ -3626,7 +3631,7 @@ retry:
 		} else
 			cfqq = &cfqd->oom_cfqq;
 	}
-
+out:
 	if (new_cfqq)
 		kmem_cache_free(cfq_pool, new_cfqq);
 
@@ -3656,12 +3661,17 @@ static struct cfq_queue *
 cfq_get_queue(struct cfq_data *cfqd, bool is_sync, struct cfq_io_cq *cic,
 	      struct bio *bio, gfp_t gfp_mask)
 {
-	const int ioprio_class = IOPRIO_PRIO_CLASS(cic->ioprio);
-	const int ioprio = IOPRIO_PRIO_DATA(cic->ioprio);
+	int ioprio_class = IOPRIO_PRIO_CLASS(cic->ioprio);
+	int ioprio = IOPRIO_PRIO_DATA(cic->ioprio);
 	struct cfq_queue **async_cfqq = NULL;
 	struct cfq_queue *cfqq = NULL;
 
 	if (!is_sync) {
+		if (!ioprio_valid(cic->ioprio)) {
+			struct task_struct *tsk = current;
+			ioprio = task_nice_ioprio(tsk);
+			ioprio_class = task_nice_ioclass(tsk);
+		}
 		async_cfqq = cfq_async_queue_prio(cfqd, ioprio_class, ioprio);
 		cfqq = *async_cfqq;
 	}
drivers/acpi/acpi_lpss.c +17 -2
index 93d160661f4c..41e9c199e874 100644
@@ -105,7 +105,7 @@ static void lpss_uart_setup(struct lpss_private_data *pdata)
 	}
 }
 
-static void byt_i2c_setup(struct lpss_private_data *pdata)
+static void lpss_deassert_reset(struct lpss_private_data *pdata)
 {
 	unsigned int offset;
 	u32 val;
@@ -114,9 +114,18 @@ static void byt_i2c_setup(struct lpss_private_data *pdata)
 	val = readl(pdata->mmio_base + offset);
 	val |= LPSS_RESETS_RESET_APB | LPSS_RESETS_RESET_FUNC;
 	writel(val, pdata->mmio_base + offset);
+}
+
+#define LPSS_I2C_ENABLE			0x6c
+
+static void byt_i2c_setup(struct lpss_private_data *pdata)
+{
+	lpss_deassert_reset(pdata);
 
 	if (readl(pdata->mmio_base + pdata->dev_desc->prv_offset))
 		pdata->fixed_clk_rate = 133000000;
+
+	writel(0, pdata->mmio_base + LPSS_I2C_ENABLE);
 }
 
 static struct lpss_device_desc lpt_dev_desc = {
@@ -166,6 +175,12 @@ static struct lpss_device_desc byt_i2c_dev_desc = {
 	.setup = byt_i2c_setup,
 };
 
+static struct lpss_device_desc bsw_spi_dev_desc = {
+	.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
+	.prv_offset = 0x400,
+	.setup = lpss_deassert_reset,
+};
+
 #else
 
 #define LPSS_ADDR(desc) (0UL)
@@ -198,7 +213,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
 	/* Braswell LPSS devices */
 	{ "80862288", LPSS_ADDR(byt_pwm_dev_desc) },
 	{ "8086228A", LPSS_ADDR(byt_uart_dev_desc) },
-	{ "8086228E", LPSS_ADDR(byt_spi_dev_desc) },
+	{ "8086228E", LPSS_ADDR(bsw_spi_dev_desc) },
 	{ "808622C1", LPSS_ADDR(byt_i2c_dev_desc) },
 
 	{ "INT3430", LPSS_ADDR(lpt_dev_desc) },
drivers/bluetooth/ath3k.c +10 -0
index 086240cd29c3..fe1678c4ff89 100644
@@ -106,6 +106,7 @@ static const struct usb_device_id ath3k_table[] = {
 	{ USB_DEVICE(0x13d3, 0x3393) },
 	{ USB_DEVICE(0x13d3, 0x3402) },
 	{ USB_DEVICE(0x13d3, 0x3408) },
+	{ USB_DEVICE(0x13d3, 0x3423) },
 	{ USB_DEVICE(0x13d3, 0x3432) },
 
 	/* Atheros AR5BBU12 with sflash firmware */
@@ -158,6 +159,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
 	{ USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
+	{ USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
 
 	/* Atheros AR5BBU22 with sflash firmware */
@@ -170,6 +172,8 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
 #define USB_REQ_DFU_DNLOAD	1
 #define BULK_SIZE		4096
 #define FW_HDR_SIZE		20
+#define TIMEGAP_USEC_MIN	50
+#define TIMEGAP_USEC_MAX	100
 
 static int ath3k_load_firmware(struct usb_device *udev,
 				const struct firmware *firmware)
@@ -201,6 +205,9 @@ static int ath3k_load_firmware(struct usb_device *udev,
 	pipe = usb_sndbulkpipe(udev, 0x02);
 
 	while (count) {
+		/* workaround the compatibility issue with xHCI controller*/
+		usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX);
+
 		size = min_t(uint, count, BULK_SIZE);
 		memcpy(send_buf, firmware->data + sent, size);
 
@@ -298,6 +305,9 @@ static int ath3k_load_fwfile(struct usb_device *udev,
 	pipe = usb_sndbulkpipe(udev, 0x02);
 
 	while (count) {
+		/* workaround the compatibility issue with xHCI controller*/
+		usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX);
+
 		size = min_t(uint, count, BULK_SIZE);
 		memcpy(send_buf, firmware->data + sent, size);
 
drivers/bluetooth/btusb.c +10 -1
index 091c813df8e9..f0e2f721c8ce 100644
@@ -107,15 +107,23 @@ static const struct usb_device_id btusb_table[] = {
 	{ USB_DEVICE(0x0b05, 0x17cb) },
 	{ USB_DEVICE(0x413c, 0x8197) },
 
+	/* Broadcom BCM20702B0 (Dynex/Insignia) */
+	{ USB_DEVICE(0x19ff, 0x0239), .driver_info = BTUSB_BCM_PATCHRAM },
+
 	/* Foxconn - Hon Hai */
 	{ USB_VENDOR_AND_INTERFACE_INFO(0x0489, 0xff, 0x01, 0x01) },
 
+	/* Lite-On Technology - Broadcom based */
+	{ USB_VENDOR_AND_INTERFACE_INFO(0x04ca, 0xff, 0x01, 0x01),
+	  .driver_info = BTUSB_BCM_PATCHRAM },
+
 	/* Broadcom devices with vendor specific id */
 	{ USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01),
 	  .driver_info = BTUSB_BCM_PATCHRAM },
 
 	/* ASUSTek Computer - Broadcom based */
-	{ USB_VENDOR_AND_INTERFACE_INFO(0x0b05, 0xff, 0x01, 0x01) },
+	{ USB_VENDOR_AND_INTERFACE_INFO(0x0b05, 0xff, 0x01, 0x01),
+	  .driver_info = BTUSB_BCM_PATCHRAM },
 
 	/* Belkin F8065bf - Broadcom based */
 	{ USB_VENDOR_AND_INTERFACE_INFO(0x050d, 0xff, 0x01, 0x01) },
@@ -183,6 +191,7 @@ static const struct usb_device_id blacklist_table[] = {
 	{ USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
+	{ USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
 
 	/* Atheros AR5BBU12 with sflash firmware */
drivers/char/random.c +4 -4
index 04645c09fe5e..9cd6968e2f92 100644
@@ -569,19 +569,19 @@ static void fast_mix(struct fast_pool *f)
 	__u32 c = f->pool[2],	d = f->pool[3];
 
 	a += b;			c += d;
-	b = rol32(a, 6);	d = rol32(c, 27);
+	b = rol32(b, 6);	d = rol32(d, 27);
 	d ^= a;			b ^= c;
 
 	a += b;			c += d;
-	b = rol32(a, 16);	d = rol32(c, 14);
+	b = rol32(b, 16);	d = rol32(d, 14);
 	d ^= a;			b ^= c;
 
 	a += b;			c += d;
-	b = rol32(a, 6);	d = rol32(c, 27);
+	b = rol32(b, 6);	d = rol32(d, 27);
 	d ^= a;			b ^= c;
 
 	a += b;			c += d;
-	b = rol32(a, 16);	d = rol32(c, 14);
+	b = rol32(b, 16);	d = rol32(d, 14);
 	d ^= a;			b ^= c;
 
 	f->pool[0] = a;  f->pool[1] = b;
drivers/char/tpm/tpm-interface.c +1 -1
index 6af17002a115..cfb9089887bd 100644
@@ -1122,7 +1122,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev,
 
 	/* Make chip available */
 	spin_lock(&driver_lock);
-	list_add_rcu(&chip->list, &tpm_chip_list);
+	list_add_tail_rcu(&chip->list, &tpm_chip_list);
 	spin_unlock(&driver_lock);
 
 	return chip;
drivers/char/tpm/tpm_i2c_atmel.c +4 -0
index 77272925dee6..503a85ae176c 100644
@@ -168,6 +168,10 @@ static int i2c_atmel_probe(struct i2c_client *client,
 
 	chip->vendor.priv = devm_kzalloc(dev, sizeof(struct priv_data),
 					 GFP_KERNEL);
+	if (!chip->vendor.priv) {
+		rc = -ENOMEM;
+		goto out_err;
+	}
 
 	/* Default timeouts */
 	chip->vendor.timeout_a = msecs_to_jiffies(TPM_I2C_SHORT_TIMEOUT);
drivers/char/tpm/tpm_i2c_nuvoton.c +5 -0
index 7b158efd49f7..23c7b137a7fd 100644
@@ -538,6 +538,11 @@ static int i2c_nuvoton_probe(struct i2c_client *client,
 
 	chip->vendor.priv = devm_kzalloc(dev, sizeof(struct priv_data),
 					 GFP_KERNEL);
+	if (!chip->vendor.priv) {
+		rc = -ENOMEM;
+		goto out_err;
+	}
+
 	init_waitqueue_head(&chip->vendor.read_queue);
 	init_waitqueue_head(&chip->vendor.int_queue);
 
drivers/char/tpm/tpm_i2c_stm_st33.c +1 -1
index 4669e3713428..7d1c540fa26a 100644
@@ -487,7 +487,7 @@ static int tpm_stm_i2c_send(struct tpm_chip *chip, unsigned char *buf,
 		if (burstcnt < 0)
 			return burstcnt;
 		size = min_t(int, len - i - 1, burstcnt);
-		ret = I2C_WRITE_DATA(client, TPM_DATA_FIFO, buf, size);
+		ret = I2C_WRITE_DATA(client, TPM_DATA_FIFO, buf + i, size);
 		if (ret < 0)
 			goto out_err;
 
drivers/char/tpm/tpm_ibmvtpm.c +20 -8
index af74c57e5090..eff9d5870034 100644
@@ -148,7 +148,8 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)
 	crq.len = (u16)count;
 	crq.data = ibmvtpm->rtce_dma_handle;
 
-	rc = ibmvtpm_send_crq(ibmvtpm->vdev, word[0], word[1]);
+	rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(word[0]),
+			      cpu_to_be64(word[1]));
 	if (rc != H_SUCCESS) {
 		dev_err(ibmvtpm->dev, "tpm_ibmvtpm_send failed rc=%d\n", rc);
 		rc = 0;
@@ -186,7 +187,8 @@ static int ibmvtpm_crq_get_rtce_size(struct ibmvtpm_dev *ibmvtpm)
 	crq.valid = (u8)IBMVTPM_VALID_CMD;
 	crq.msg = (u8)VTPM_GET_RTCE_BUFFER_SIZE;
 
-	rc = ibmvtpm_send_crq(ibmvtpm->vdev, buf[0], buf[1]);
+	rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
+			      cpu_to_be64(buf[1]));
 	if (rc != H_SUCCESS)
 		dev_err(ibmvtpm->dev,
 			"ibmvtpm_crq_get_rtce_size failed rc=%d\n", rc);
@@ -212,7 +214,8 @@ static int ibmvtpm_crq_get_version(struct ibmvtpm_dev *ibmvtpm)
 	crq.valid = (u8)IBMVTPM_VALID_CMD;
 	crq.msg = (u8)VTPM_GET_VERSION;
 
-	rc = ibmvtpm_send_crq(ibmvtpm->vdev, buf[0], buf[1]);
+	rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
+			      cpu_to_be64(buf[1]));
 	if (rc != H_SUCCESS)
 		dev_err(ibmvtpm->dev,
 			"ibmvtpm_crq_get_version failed rc=%d\n", rc);
@@ -307,6 +310,14 @@ static int tpm_ibmvtpm_remove(struct vio_dev *vdev)
 static unsigned long tpm_ibmvtpm_get_desired_dma(struct vio_dev *vdev)
 {
 	struct ibmvtpm_dev *ibmvtpm = ibmvtpm_get_data(&vdev->dev);
+
+	/* ibmvtpm initializes at probe time, so the data we are
+	* asking for may not be set yet. Estimate that 4K required
+	* for TCE-mapped buffer in addition to CRQ.
+	*/
+	if (!ibmvtpm)
+		return CRQ_RES_BUF_SIZE + PAGE_SIZE;
+
 	return CRQ_RES_BUF_SIZE + ibmvtpm->rtce_size;
 }
 
@@ -327,7 +338,8 @@ static int tpm_ibmvtpm_suspend(struct device *dev)
 	crq.valid = (u8)IBMVTPM_VALID_CMD;
 	crq.msg = (u8)VTPM_PREPARE_TO_SUSPEND;
 
-	rc = ibmvtpm_send_crq(ibmvtpm->vdev, buf[0], buf[1]);
+	rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
+			      cpu_to_be64(buf[1]));
 	if (rc != H_SUCCESS)
 		dev_err(ibmvtpm->dev,
 			"tpm_ibmvtpm_suspend failed rc=%d\n", rc);
@@ -472,11 +484,11 @@ static void ibmvtpm_crq_process(struct ibmvtpm_crq *crq,
 	case IBMVTPM_VALID_CMD:
 		switch (crq->msg) {
 		case VTPM_GET_RTCE_BUFFER_SIZE_RES:
-			if (crq->len <= 0) {
+			if (be16_to_cpu(crq->len) <= 0) {
 				dev_err(ibmvtpm->dev, "Invalid rtce size\n");
 				return;
 			}
-			ibmvtpm->rtce_size = crq->len;
+			ibmvtpm->rtce_size = be16_to_cpu(crq->len);
 			ibmvtpm->rtce_buf = kmalloc(ibmvtpm->rtce_size,
 						    GFP_KERNEL);
 			if (!ibmvtpm->rtce_buf) {
@@ -497,11 +509,11 @@ static void ibmvtpm_crq_process(struct ibmvtpm_crq *crq,
 
 			return;
 		case VTPM_GET_VERSION_RES:
-			ibmvtpm->vtpm_version = crq->data;
+			ibmvtpm->vtpm_version = be32_to_cpu(crq->data);
 			return;
 		case VTPM_TPM_COMMAND_RES:
 			/* len of the data in rtce buffer */
-			ibmvtpm->res_len = crq->len;
+			ibmvtpm->res_len = be16_to_cpu(crq->len);
 			wake_up_interruptible(&ibmvtpm->wq);
 			return;
 		default:
drivers/char/tpm/tpm_tis.c +62 -14

126 lines not on this page · raw message

drivers/clocksource/mtk_timer.c +5 -4
index 32a3d25795d3..68ab42356d0e 100644
@@ -224,6 +224,8 @@ static void __init mtk_timer_init(struct device_node *node)
 	}
 	rate = clk_get_rate(clk);
 
+	mtk_timer_global_reset(evt);
+
 	if (request_irq(evt->dev.irq, mtk_timer_interrupt,
 			IRQF_TIMER | IRQF_IRQPOLL, "mtk_timer", evt)) {
 		pr_warn("failed to setup irq %d\n", evt->dev.irq);
@@ -232,8 +234,6 @@ static void __init mtk_timer_init(struct device_node *node)
 
 	evt->ticks_per_jiffy = DIV_ROUND_UP(rate, HZ);
 
-	mtk_timer_global_reset(evt);
-
 	/* Configure clock source */
 	mtk_timer_setup(evt, GPT_CLK_SRC, TIMER_CTRL_OP_FREERUN);
 	clocksource_mmio_init(evt->gpt_base + TIMER_CNT_REG(GPT_CLK_SRC),
@@ -241,10 +241,11 @@ static void __init mtk_timer_init(struct device_node *node)
 
 	/* Configure clock event */
 	mtk_timer_setup(evt, GPT_CLK_EVT, TIMER_CTRL_OP_REPEAT);
-	mtk_timer_enable_irq(evt, GPT_CLK_EVT);
-
 	clockevents_config_and_register(&evt->dev, rate, 0x3,
 					0xffffffff);
+
+	mtk_timer_enable_irq(evt, GPT_CLK_EVT);
+
 	return;
 
 err_clk_disable:
drivers/cpufreq/cpufreq.c +3 -3
index 4473eba1d6b0..e3bf702b5588 100644
@@ -1409,9 +1409,10 @@ static int __cpufreq_remove_dev_finish(struct device *dev,
 	unsigned long flags;
 	struct cpufreq_policy *policy;
 
-	read_lock_irqsave(&cpufreq_driver_lock, flags);
+	write_lock_irqsave(&cpufreq_driver_lock, flags);
 	policy = per_cpu(cpufreq_cpu_data, cpu);
-	read_unlock_irqrestore(&cpufreq_driver_lock, flags);
+	per_cpu(cpufreq_cpu_data, cpu) = NULL;
+	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
 	if (!policy) {
 		pr_debug("%s: No cpu_data found\n", __func__);
@@ -1466,7 +1467,6 @@ static int __cpufreq_remove_dev_finish(struct device *dev,
 		}
 	}
 
-	per_cpu(cpufreq_cpu_data, cpu) = NULL;
 	return 0;
 }
 
drivers/cpufreq/s3c2416-cpufreq.c +2 -2
index 2fd53eaaec20..d6d425773fa4 100644
@@ -263,7 +263,7 @@ out:
 }
 
 #ifdef CONFIG_ARM_S3C2416_CPUFREQ_VCORESCALE
-static void __init s3c2416_cpufreq_cfg_regulator(struct s3c2416_data *s3c_freq)
+static void s3c2416_cpufreq_cfg_regulator(struct s3c2416_data *s3c_freq)
 {
 	int count, v, i, found;
 	struct cpufreq_frequency_table *pos;
@@ -333,7 +333,7 @@ static struct notifier_block s3c2416_cpufreq_reboot_notifier = {
 	.notifier_call = s3c2416_cpufreq_reboot_notifier_evt,
 };
 
-static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
+static int s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
 {
 	struct s3c2416_data *s3c_freq = &s3c2416_cpufreq;
 	struct cpufreq_frequency_table *pos;
drivers/cpufreq/s3c24xx-cpufreq.c +1 -9
index d00f1cee4509..733aa5153e74 100644
@@ -144,11 +144,6 @@ static void s3c_cpufreq_setfvco(struct s3c_cpufreq_config *cfg)
 	(cfg->info->set_fvco)(cfg);
 }
 
-static inline void s3c_cpufreq_resume_clocks(void)
-{
-	cpu_cur.info->resume_clocks();
-}
-
 static inline void s3c_cpufreq_updateclk(struct clk *clk,
 					 unsigned int freq)
 {
@@ -417,9 +412,6 @@ static int s3c_cpufreq_resume(struct cpufreq_policy *policy)
 
 	last_target = ~0;	/* invalidate last_target setting */
 
-	/* first, find out what speed we resumed at. */
-	s3c_cpufreq_resume_clocks();
-
 	/* whilst we will be called later on, we try and re-set the
 	 * cpu frequencies as soon as possible so that we do not end
 	 * up resuming devices and then immediately having to re-set
@@ -454,7 +446,7 @@ static struct cpufreq_driver s3c24xx_driver = {
 };
 
 
-int __init s3c_cpufreq_register(struct s3c_cpufreq_info *info)
+int s3c_cpufreq_register(struct s3c_cpufreq_info *info)
 {
 	if (!info || !info->name) {
 		printk(KERN_ERR "%s: failed to pass valid information\n",
drivers/cpufreq/speedstep-lib.c +3 -0
index 7047821a7f8a..4ab7a2156672 100644
@@ -400,6 +400,7 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor,
 
 	pr_debug("previous speed is %u\n", prev_speed);
 
+	preempt_disable();
 	local_irq_save(flags);
 
 	/* switch to low state */
@@ -464,6 +465,8 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor,
 
 out:
 	local_irq_restore(flags);
+	preempt_enable();
+
 	return ret;
 }
 EXPORT_SYMBOL_GPL(speedstep_get_freqs);
drivers/cpufreq/speedstep-smi.c +12 -0
index 5fc96d5d656b..819229e824fb 100644
@@ -156,6 +156,7 @@ static void speedstep_set_state(unsigned int state)
 		return;
 
 	/* Disable IRQs */
+	preempt_disable();
 	local_irq_save(flags);
 
 	command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
@@ -166,9 +167,19 @@ static void speedstep_set_state(unsigned int state)
 
 	do {
 		if (retry) {
+			/*
+			 * We need to enable interrupts, otherwise the blockage
+			 * won't resolve.
+			 *
+			 * We disable preemption so that other processes don't
+			 * run. If other processes were running, they could
+			 * submit more DMA requests, making the blockage worse.
+			 */
 			pr_debug("retry %u, previous result %u, waiting...\n",
 					retry, result);
+			local_irq_enable();
 			mdelay(retry * 50);
+			local_irq_disable();
 		}
 		retry++;
 		__asm__ __volatile__(
@@ -185,6 +196,7 @@ static void speedstep_set_state(unsigned int state)
 
 	/* enable IRQs */
 	local_irq_restore(flags);
+	preempt_enable();
 
 	if (new_state == state)
 		pr_debug("change to %u MHz succeeded after %u tries "
drivers/edac/amd64_edac.c +8 -2
index bbd65149cdb2..c7236ba92b8e 100644
@@ -2039,14 +2039,20 @@ static void __log_bus_error(struct mem_ctl_info *mci, struct err_info *err,
 
 static inline void decode_bus_error(int node_id, struct mce *m)
 {
-	struct mem_ctl_info *mci = mcis[node_id];
-	struct amd64_pvt *pvt = mci->pvt_info;
+	struct mem_ctl_info *mci;
+	struct amd64_pvt *pvt;
 	u8 ecc_type = (m->status >> 45) & 0x3;
 	u8 xec = XEC(m->status, 0x1f);
 	u16 ec = EC(m->status);
 	u64 sys_addr;
 	struct err_info err;
 
+	mci = edac_mc_find(node_id);
+	if (!mci)
+		return;
+
+	pvt = mci->pvt_info;
+
 	/* Bail out early if this was an 'observed' error */
 	if (PP(ec) == NBSL_PP_OBS)
 		return;
drivers/edac/sb_edac.c +6 -3
index e9bb1af67c8d..3cdaac8944eb 100644
@@ -2297,7 +2297,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table);
 		type = IVY_BRIDGE;
 		break;
-	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+	case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
 		rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
 		type = SANDY_BRIDGE;
 		break;
@@ -2306,8 +2306,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		type = HASWELL;
 		break;
 	}
-	if (unlikely(rc < 0))
+	if (unlikely(rc < 0)) {
+		edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
 		goto fail0;
+	}
+
 	mc = 0;
 
 	list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) {
@@ -2320,7 +2323,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 			goto fail1;
 	}
 
-	sbridge_printk(KERN_INFO, "Driver loaded.\n");
+	sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
 
 	mutex_unlock(&sbridge_edac_lock);
 	return 0;
drivers/gpio/gpio-tps65912.c +10 -4
index 22052d84c63b..a8c783099af9 100644
@@ -26,9 +26,12 @@ struct tps65912_gpio_data {
 	struct gpio_chip gpio_chip;
 };
 
+#define to_tgd(gc) container_of(gc, struct tps65912_gpio_data, gpio_chip)
+
 static int tps65912_gpio_get(struct gpio_chip *gc, unsigned offset)
 {
-	struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
+	struct tps65912_gpio_data *tps65912_gpio = to_tgd(gc);
+	struct tps65912 *tps65912 = tps65912_gpio->tps65912;
 	int val;
 
 	val = tps65912_reg_read(tps65912, TPS65912_GPIO1 + offset);
@@ -42,7 +45,8 @@ static int tps65912_gpio_get(struct gpio_chip *gc, unsigned offset)
 static void tps65912_gpio_set(struct gpio_chip *gc, unsigned offset,
 			      int value)
 {
-	struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
+	struct tps65912_gpio_data *tps65912_gpio = to_tgd(gc);
+	struct tps65912 *tps65912 = tps65912_gpio->tps65912;
 
 	if (value)
 		tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset,
@@ -55,7 +59,8 @@ static void tps65912_gpio_set(struct gpio_chip *gc, unsigned offset,
 static int tps65912_gpio_output(struct gpio_chip *gc, unsigned offset,
 				int value)
 {
-	struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
+	struct tps65912_gpio_data *tps65912_gpio = to_tgd(gc);
+	struct tps65912 *tps65912 = tps65912_gpio->tps65912;
 
 	/* Set the initial value */
 	tps65912_gpio_set(gc, offset, value);
@@ -66,7 +71,8 @@ static int tps65912_gpio_output(struct gpio_chip *gc, unsigned offset,
 
 static int tps65912_gpio_input(struct gpio_chip *gc, unsigned offset)
 {
-	struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
+	struct tps65912_gpio_data *tps65912_gpio = to_tgd(gc);
+	struct tps65912 *tps65912 = tps65912_gpio->tps65912;
 
 	return tps65912_clear_bits(tps65912, TPS65912_GPIO1 + offset,
 								GPIO_CFG_MASK);
drivers/gpio/gpiolib-of.c +5 -4
index 08261f2b3a82..26645a847bb8 100644
@@ -46,12 +46,13 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data)
 
 	ret = gc->of_xlate(gc, &gg_data->gpiospec, gg_data->flags);
 	if (ret < 0) {
-		/* We've found the gpio chip, but the translation failed.
-		 * Return true to stop looking and return the translation
-		 * error via out_gpio
+		/* We've found a gpio chip, but the translation failed.
+		 * Store translation error in out_gpio.
+		 * Return false to keep looking, as more than one gpio chip
+		 * could be registered per of-node.
 		 */
 		gg_data->out_gpio = ERR_PTR(ret);
-		return true;
+		return false;
 	 }
 
 	gg_data->out_gpio = gpiochip_get_desc(gc, ret);
drivers/hid/i2c-hid/i2c-hid.c +4 -1
index 80e33e0abc52..6d7c9c580ceb 100644
@@ -370,7 +370,10 @@ static int i2c_hid_hwreset(struct i2c_client *client)
 static void i2c_hid_get_input(struct i2c_hid *ihid)
 {
 	int ret, ret_size;
-	int size = ihid->bufsize;
+	int size = le16_to_cpu(ihid->hdesc.wMaxInputLength);
+
+	if (size > ihid->bufsize)
+		size = ihid->bufsize;
 
 	ret = i2c_master_recv(ihid->client, ihid->inbuf, size);
 	if (ret != size) {
drivers/md/raid1.c +3 -2
index 40b35be34f8d..2f2f38f4d83c 100644
@@ -560,7 +560,7 @@ static int read_balance(struct r1conf *conf, struct r1bio *r1_bio, int *max_sect
 		if (test_bit(WriteMostly, &rdev->flags)) {
 			/* Don't balance among write-mostly, just
 			 * use the first as a last resort */
-			if (best_disk < 0) {
+			if (best_dist_disk < 0) {
 				if (is_badblock(rdev, this_sector, sectors,
 						&first_bad, &bad_sectors)) {
 					if (first_bad < this_sector)
@@ -569,7 +569,8 @@ static int read_balance(struct r1conf *conf, struct r1bio *r1_bio, int *max_sect
 					best_good_sectors = first_bad - this_sector;
 				} else
 					best_good_sectors = sectors;
-				best_disk = disk;
+				best_dist_disk = disk;
+				best_pending_disk = disk;
 			}
 			continue;
 		}
drivers/md/raid5.c +2 -1
index b98765f6f77f..8577cc7db47e 100644
@@ -3102,7 +3102,8 @@ static void handle_stripe_dirtying(struct r5conf *conf,
 	 * generate correct data from the parity.
 	 */
 	if (conf->max_degraded == 2 ||
-	    (recovery_cp < MaxSector && sh->sector >= recovery_cp)) {
+	    (recovery_cp < MaxSector && sh->sector >= recovery_cp &&
+	     s->failed == 0)) {
 		/* Calculate the real rcw later - for now make it
 		 * look like rcw is cheaper
 		 */
drivers/media/dvb-frontends/si2168.c +2 -0
index 1cd93be281ed..64a759c017d4 100644
@@ -605,6 +605,8 @@ static const struct dvb_frontend_ops si2168_ops = {
 	.delsys = {SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A},
 	.info = {
 		.name = "Silicon Labs Si2168",
+		.symbol_rate_min = 1000000,
+		.symbol_rate_max = 7200000,
 		.caps =	FE_CAN_FEC_1_2 |
 			FE_CAN_FEC_2_3 |
 			FE_CAN_FEC_3_4 |
drivers/media/platform/Kconfig +2 -4
index 3aac88f1d54a..736277236ba2 100644
@@ -56,10 +56,8 @@ config VIDEO_VIU
 
 config VIDEO_TIMBERDALE
 	tristate "Support for timberdale Video In/LogiWIN"
-	depends on VIDEO_V4L2 && I2C && DMADEVICES
-	depends on MFD_TIMBERDALE || COMPILE_TEST
-	select DMA_ENGINE
-	select TIMB_DMA
+	depends on VIDEO_V4L2 && I2C
+	depends on (MFD_TIMBERDALE && TIMB_DMA) || COMPILE_TEST
 	select VIDEO_ADV7180
 	select VIDEOBUF_DMA_CONTIG
 	---help---
drivers/media/rc/rc-main.c +7 -7
index 8d3b74c5a717..fc369b033484 100644
@@ -1021,16 +1021,16 @@ static ssize_t store_protocols(struct device *device,
 		goto out;
 	}
 
-	if (new_protocols == old_protocols) {
-		rc = len;
-		goto out;
+	if (new_protocols != old_protocols) {
+		*current_protocols = new_protocols;
+		IR_dprintk(1, "Protocols changed to 0x%llx\n",
+			   (long long)new_protocols);
 	}
 
-	*current_protocols = new_protocols;
-	IR_dprintk(1, "Protocols changed to 0x%llx\n", (long long)new_protocols);
-
 	/*
-	 * If the protocol is changed the filter needs updating.
+	 * If a protocol change was attempted the filter may need updating, even
+	 * if the actual protocol mask hasn't changed (since the driver may have
+	 * cleared the filter).
 	 * Try setting the same filter with the new protocol (if any).
 	 * Fall back to clearing the filter.
 	 */
drivers/media/usb/dvb-usb-v2/lmedm04.c +11 -3
index 9f2c5459b73a..2273ce78f5c8 100644
@@ -344,15 +344,17 @@ static void lme2510_int_response(struct urb *lme_urb)
 
 	usb_submit_urb(lme_urb, GFP_ATOMIC);
 
-	/* interrupt urb is due every 48 msecs while streaming
-	 *	add 12msecs for system lag */
-	st->int_urb_due = jiffies + msecs_to_jiffies(60);
+	/* Interrupt urb is due every 48 msecs while streaming the buffer
+	 * stores up to 4 periods if missed. Allow 200 msec for next interrupt.
+	 */
+	st->int_urb_due = jiffies + msecs_to_jiffies(200);
 }
 
 static int lme2510_int_read(struct dvb_usb_adapter *adap)
 {
 	struct dvb_usb_device *d = adap_to_d(adap);
 	struct lme2510_state *lme_int = adap_to_priv(adap);
+	struct usb_host_endpoint *ep;
 
 	lme_int->lme_urb = usb_alloc_urb(0, GFP_ATOMIC);
 
@@ -374,6 +376,12 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
 				adap,
 				8);
 
+	/* Quirk of pipe reporting PIPE_BULK but behaves as interrupt */
+	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
+
+	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
+		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
+
 	lme_int->lme_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
 
 	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
drivers/media/usb/em28xx/em28xx-audio.c +4 -4
index 957c7ae30efe..1ead904a7043 100644
@@ -821,7 +821,7 @@ static int em28xx_audio_urb_init(struct em28xx *dev)
 	if (urb_size > ep_size * npackets)
 		npackets = DIV_ROUND_UP(urb_size, ep_size);
 
-	em28xx_info("Number of URBs: %d, with %d packets and %d size",
+	em28xx_info("Number of URBs: %d, with %d packets and %d size\n",
 		    num_urb, npackets, urb_size);
 
 	/* Estimate the bytes per period */
@@ -982,7 +982,7 @@ static int em28xx_audio_fini(struct em28xx *dev)
 		return 0;
 	}
 
-	em28xx_info("Closing audio extension");
+	em28xx_info("Closing audio extension\n");
 
 	if (dev->adev.sndcard) {
 		snd_card_disconnect(dev->adev.sndcard);
@@ -1006,7 +1006,7 @@ static int em28xx_audio_suspend(struct em28xx *dev)
 	if (dev->usb_audio_type != EM28XX_USB_AUDIO_VENDOR)
 		return 0;
 
-	em28xx_info("Suspending audio extension");
+	em28xx_info("Suspending audio extension\n");
 	em28xx_deinit_isoc_audio(dev);
 	atomic_set(&dev->adev.stream_started, 0);
 	return 0;
@@ -1020,7 +1020,7 @@ static int em28xx_audio_resume(struct em28xx *dev)
 	if (dev->usb_audio_type != EM28XX_USB_AUDIO_VENDOR)
 		return 0;
 
-	em28xx_info("Resuming audio extension");
+	em28xx_info("Resuming audio extension\n");
 	/* Nothing to do other than schedule_work() ?? */
 	schedule_work(&dev->adev.wq_trigger);
 	return 0;
drivers/media/usb/em28xx/em28xx-core.c +2 -2
index 901cf2b952d7..84dd4aec70fb 100644
@@ -1122,7 +1122,7 @@ int em28xx_suspend_extension(struct em28xx *dev)
 {
 	const struct em28xx_ops *ops = NULL;
 
-	em28xx_info("Suspending extensions");
+	em28xx_info("Suspending extensions\n");
 	mutex_lock(&em28xx_devlist_mutex);
 	list_for_each_entry(ops, &em28xx_extension_devlist, next) {
 		if (ops->suspend)
@@ -1136,7 +1136,7 @@ int em28xx_resume_extension(struct em28xx *dev)
 {
 	const struct em28xx_ops *ops = NULL;
 
-	em28xx_info("Resuming extensions");
+	em28xx_info("Resuming extensions\n");
 	mutex_lock(&em28xx_devlist_mutex);
 	list_for_each_entry(ops, &em28xx_extension_devlist, next) {
 		if (ops->resume)
drivers/media/usb/em28xx/em28xx-dvb.c +7 -7
index 9682c52d67d1..41a6864ab8d2 100644
@@ -1667,7 +1667,7 @@ static int em28xx_dvb_fini(struct em28xx *dev)
 	if (!dev->dvb)
 		return 0;
 
-	em28xx_info("Closing DVB extension");
+	em28xx_info("Closing DVB extension\n");
 
 	dvb = dev->dvb;
 	client = dvb->i2c_client_tuner;
@@ -1718,17 +1718,17 @@ static int em28xx_dvb_suspend(struct em28xx *dev)
 	if (!dev->board.has_dvb)
 		return 0;
 
-	em28xx_info("Suspending DVB extension");
+	em28xx_info("Suspending DVB extension\n");
 	if (dev->dvb) {
 		struct em28xx_dvb *dvb = dev->dvb;
 
 		if (dvb->fe[0]) {
 			ret = dvb_frontend_suspend(dvb->fe[0]);
-			em28xx_info("fe0 suspend %d", ret);
+			em28xx_info("fe0 suspend %d\n", ret);
 		}
 		if (dvb->fe[1]) {
 			dvb_frontend_suspend(dvb->fe[1]);
-			em28xx_info("fe1 suspend %d", ret);
+			em28xx_info("fe1 suspend %d\n", ret);
 		}
 	}
 
@@ -1745,18 +1745,18 @@ static int em28xx_dvb_resume(struct em28xx *dev)
 	if (!dev->board.has_dvb)
 		return 0;
 
-	em28xx_info("Resuming DVB extension");
+	em28xx_info("Resuming DVB extension\n");
 	if (dev->dvb) {
 		struct em28xx_dvb *dvb = dev->dvb;
 
 		if (dvb->fe[0]) {
 			ret = dvb_frontend_resume(dvb->fe[0]);
-			em28xx_info("fe0 resume %d", ret);
+			em28xx_info("fe0 resume %d\n", ret);
 		}
 
 		if (dvb->fe[1]) {
 			ret = dvb_frontend_resume(dvb->fe[1]);
-			em28xx_info("fe1 resume %d", ret);
+			em28xx_info("fe1 resume %d\n", ret);
 		}
 	}
 
drivers/media/usb/em28xx/em28xx-input.c +3 -3
index 23f8f6afa2e0..b31e275faa2e 100644
@@ -833,7 +833,7 @@ static int em28xx_ir_fini(struct em28xx *dev)
 		return 0;
 	}
 
-	em28xx_info("Closing input extension");
+	em28xx_info("Closing input extension\n");
 
 	em28xx_shutdown_buttons(dev);
 
@@ -863,7 +863,7 @@ static int em28xx_ir_suspend(struct em28xx *dev)
 	if (dev->is_audio_only)
 		return 0;
 
-	em28xx_info("Suspending input extension");
+	em28xx_info("Suspending input extension\n");
 	if (ir)
 		cancel_delayed_work_sync(&ir->work);
 	cancel_delayed_work_sync(&dev->buttons_query_work);
@@ -880,7 +880,7 @@ static int em28xx_ir_resume(struct em28xx *dev)
 	if (dev->is_audio_only)
 		return 0;
 
-	em28xx_info("Resuming input extension");
+	em28xx_info("Resuming input extension\n");
 	/* if suspend calls ir_raw_event_unregister(), the should call
 	   ir_raw_event_register() */
 	if (ir)
drivers/media/usb/em28xx/em28xx-video.c +3 -3
index 03d5ece0319c..e0f4be8c5a19 100644
@@ -1956,7 +1956,7 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
 	if (v4l2 == NULL)
 		return 0;
 
-	em28xx_info("Closing video extension");
+	em28xx_info("Closing video extension\n");
 
 	mutex_lock(&dev->lock);
 
@@ -2005,7 +2005,7 @@ static int em28xx_v4l2_suspend(struct em28xx *dev)
 	if (!dev->has_video)
 		return 0;
 
-	em28xx_info("Suspending video extension");
+	em28xx_info("Suspending video extension\n");
 	em28xx_stop_urbs(dev);
 	return 0;
 }
@@ -2018,7 +2018,7 @@ static int em28xx_v4l2_resume(struct em28xx *dev)
 	if (!dev->has_video)
 		return 0;
 
-	em28xx_info("Resuming video extension");
+	em28xx_info("Resuming video extension\n");
 	/* what do we do here */
 	return 0;
 }
drivers/misc/mei/hw-me.c +2 -3
index 432aec8dd3ce..350a28af98aa 100644
@@ -242,7 +242,7 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
 	if ((hcsr & H_RST) == H_RST) {
 		dev_warn(dev->dev, "H_RST is set = 0x%08X", hcsr);
 		hcsr &= ~H_RST;
-		mei_me_reg_write(hw, H_CSR, hcsr);
+		mei_hcsr_set(hw, hcsr);
 		hcsr = mei_hcsr_read(hw);
 	}
 
@@ -335,6 +335,7 @@ static int mei_me_hw_ready_wait(struct mei_device *dev)
 		return -ETIME;
 	}
 
+	mei_me_hw_reset_release(dev);
 	dev->recvd_hw_ready = false;
 	return 0;
 }
@@ -729,9 +730,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
 	/*  check if we need to start the dev */
 	if (!mei_host_is_ready(dev)) {
 		if (mei_hw_is_ready(dev)) {
-			mei_me_hw_reset_release(dev);
 			dev_dbg(dev->dev, "we need to start the dev.\n");
-
 			dev->recvd_hw_ready = true;
 			wake_up(&dev->wait_hw_ready);
 		} else {
drivers/mmc/host/sdhci-pxav3.c +44 -8

92 lines not on this page · raw message

drivers/net/wireless/iwlwifi/mvm/mac80211.c +1 -4
index b6d2683da3a9..f71c22f8beea 100644
@@ -668,9 +668,6 @@ static void iwl_mvm_cleanup_iterator(void *data, u8 *mac,
 	mvmvif->uploaded = false;
 	mvmvif->ap_sta_id = IWL_MVM_STATION_COUNT;
 
-	/* does this make sense at all? */
-	mvmvif->color++;
-
 	spin_lock_bh(&mvm->time_event_lock);
 	iwl_mvm_te_clear_data(mvm, &mvmvif->time_event_data);
 	spin_unlock_bh(&mvm->time_event_lock);
@@ -1014,7 +1011,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
 
 	ret = iwl_mvm_power_update_mac(mvm);
 	if (ret)
-		goto out_release;
+		goto out_remove_mac;
 
 	/* beacon filtering */
 	ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0);
drivers/net/wireless/iwlwifi/mvm/tx.c +5 -0
index c6a517c771df..5928c9db49ce 100644
@@ -902,6 +902,11 @@ int iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
 	sta_id = ba_notif->sta_id;
 	tid = ba_notif->tid;
 
+	if (WARN_ONCE(sta_id >= IWL_MVM_STATION_COUNT ||
+		      tid >= IWL_MAX_TID_COUNT,
+		      "sta_id %d tid %d", sta_id, tid))
+		return 0;
+
 	rcu_read_lock();
 
 	sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]);
drivers/net/wireless/iwlwifi/pcie/tx.c +6 -1
index eb8e2984c5e9..62ea2b550832 100644
@@ -722,7 +722,12 @@ void iwl_trans_pcie_tx_reset(struct iwl_trans *trans)
 	iwl_write_direct32(trans, FH_KW_MEM_ADDR_REG,
 			   trans_pcie->kw.dma >> 4);
 
-	iwl_pcie_tx_start(trans, trans_pcie->scd_base_addr);
+	/*
+	 * Send 0 as the scd_base_addr since the device may have be reset
+	 * while we were in WoWLAN in which case SCD_SRAM_BASE_ADDR will
+	 * contain garbage.
+	 */
+	iwl_pcie_tx_start(trans, 0);
 }
 
 /*
drivers/net/wireless/rtlwifi/pci.c +1 -4
index c70efb9a6e78..e25faacf58b7 100644
@@ -816,11 +816,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
 
 		/* get a new skb - if fail, old one will be reused */
 		new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
-		if (unlikely(!new_skb)) {
-			pr_err("Allocation of new skb failed in %s\n",
-			       __func__);
+		if (unlikely(!new_skb))
 			goto no_new;
-		}
 		if (rtlpriv->use_new_trx_flow) {
 			buffer_desc =
 			  &rtlpci->rx_ring[rxring_idx].buffer_desc
drivers/net/wireless/rtlwifi/pci.h +7 -0
index 5e832306dba9..d4567d12e07e 100644
@@ -325,4 +325,11 @@ static inline void pci_write32_async(struct rtl_priv *rtlpriv,
 	writel(val, (u8 __iomem *) rtlpriv->io.pci_mem_start + addr);
 }
 
+static inline u16 calc_fifo_space(u16 rp, u16 wp)
+{
+	if (rp <= wp)
+		return RTL_PCI_MAX_RX_COUNT - 1 + rp - wp;
+	return rp - wp - 1;
+}
+
 #endif
drivers/net/wireless/rtlwifi/rtl8192ee/fw.c +1 -5
index 45c128b91f7f..c5d4b8013cde 100644
@@ -666,7 +666,6 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
 	struct sk_buff *skb = NULL;
 
 	u32 totalpacketlen;
-	bool rtstatus;
 	u8 u1rsvdpageloc[5] = { 0 };
 	bool b_dlok = false;
 
@@ -728,10 +727,7 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
 	memcpy((u8 *)skb_put(skb, totalpacketlen),
 	       &reserved_page_packet, totalpacketlen);
 
-	rtstatus = rtl_cmd_send_packet(hw, skb);
-
-	if (rtstatus)
-		b_dlok = true;
+	b_dlok = true;
 
 	if (b_dlok) {
 		RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD ,
drivers/net/wireless/rtlwifi/rtl8192ee/hw.c +140 -26

190 lines not on this page · raw message

drivers/net/wireless/rtlwifi/rtl8192ee/reg.h +2 -0
index 3f2a9596e7cd..1eaa1fab550d 100644
@@ -77,9 +77,11 @@
 #define REG_HIMRE				0x00B8
 #define REG_HISRE				0x00BC
 
+#define REG_PMC_DBG_CTRL2			0x00CC
 #define REG_EFUSE_ACCESS			0x00CF
 #define REG_HPON_FSM				0x00EC
 #define REG_SYS_CFG1				0x00F0
+#define REG_MAC_PHY_CTRL_NORMAL			0x00F8
 #define REG_SYS_CFG2				0x00FC
 
 #define REG_CR					0x0100
drivers/net/wireless/rtlwifi/rtl8192ee/trx.c +6 -10
index 2fcbef1d029f..00690040be37 100644
@@ -512,6 +512,10 @@ bool rtl92ee_rx_query_desc(struct ieee80211_hw *hw,
 	struct ieee80211_hdr *hdr;
 	u32 phystatus = GET_RX_DESC_PHYST(pdesc);
 
+	if (GET_RX_STATUS_DESC_RPT_SEL(pdesc) == 0)
+		status->packet_report_type = NORMAL_RX;
+	else
+		status->packet_report_type = C2H_PACKET;
 	status->length = (u16)GET_RX_DESC_PKT_LEN(pdesc);
 	status->rx_drvinfo_size = (u8)GET_RX_DESC_DRV_INFO_SIZE(pdesc) *
 				  RX_DRV_INFO_SIZE_UNIT;
@@ -654,14 +658,7 @@ u16 rtl92ee_rx_desc_buff_remained_cnt(struct ieee80211_hw *hw, u8 queue_index)
 	if (!start_rx)
 		return 0;
 
-	if ((last_read_point > (RX_DESC_NUM_92E / 2)) &&
-	    (read_point <= (RX_DESC_NUM_92E / 2))) {
-		remind_cnt = RX_DESC_NUM_92E - write_point;
-	} else {
-		remind_cnt = (read_point >= write_point) ?
-			     (read_point - write_point) :
-			     (RX_DESC_NUM_92E - write_point + read_point);
-	}
+	remind_cnt = calc_fifo_space(read_point, write_point);
 
 	if (remind_cnt == 0)
 		return 0;
@@ -1207,8 +1204,7 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index)
 	static u8 stop_report_cnt;
 	struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
 
-	/*checking Read/Write Point each interrupt wastes CPU */
-	if (stop_report_cnt > 15 || !rtlpriv->link_info.busytraffic) {
+	{
 		u16 point_diff = 0;
 		u16 cur_tx_rp, cur_tx_wp;
 		u32 tmpu32 = 0;
drivers/net/wireless/rtlwifi/rtl8192ee/trx.h +2 -0
index 6f9be1c7515c..8effef9b13dd 100644
@@ -542,6 +542,8 @@
 	LE_BITS_TO_4BYTE(__pdesc+8, 12, 4)
 #define GET_RX_DESC_RX_IS_QOS(__pdesc)			\
 	LE_BITS_TO_4BYTE(__pdesc+8, 16, 1)
+#define GET_RX_STATUS_DESC_RPT_SEL(__pdesc)		\
+	LE_BITS_TO_4BYTE(__pdesc+8, 28, 1)
 
 #define GET_RX_DESC_RXMCS(__pdesc)			\
 	LE_BITS_TO_4BYTE(__pdesc+12, 0, 7)
drivers/pci/pci-driver.c +1 -1
index 2b3c89425bb5..b720e7816a72 100644
@@ -1389,7 +1389,7 @@ static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
 	if (add_uevent_var(env, "PCI_SLOT_NAME=%s", pci_name(pdev)))
 		return -ENOMEM;
 
-	if (add_uevent_var(env, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x",
+	if (add_uevent_var(env, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02X",
 			   pdev->vendor, pdev->device,
 			   pdev->subsystem_vendor, pdev->subsystem_device,
 			   (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
drivers/pci/rom.c +4 -3
index f955edb9bea7..eb0ad530dc43 100644
@@ -71,6 +71,7 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size)
 {
 	void __iomem *image;
 	int last_image;
+	unsigned length;
 
 	image = rom;
 	do {
@@ -93,9 +94,9 @@ size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size)
 		if (readb(pds + 3) != 'R')
 			break;
 		last_image = readb(pds + 21) & 0x80;
-		/* this length is reliable */
-		image += readw(pds + 16) * 512;
-	} while (!last_image);
+		length = readw(pds + 16);
+		image += length * 512;
+	} while (length && !last_image);
 
 	/* never return a size larger than the PCI resource window */
 	/* there are known ROMs that get the size wrong */
drivers/platform/x86/samsung-laptop.c +17 -3
index ff765d8e1a09..ce364a41842a 100644
@@ -353,6 +353,7 @@ struct samsung_quirks {
 	bool broken_acpi_video;
 	bool four_kbd_backlight_levels;
 	bool enable_kbd_backlight;
+	bool use_native_backlight;
 };
 
 static struct samsung_quirks samsung_unknown = {};
@@ -361,6 +362,10 @@ static struct samsung_quirks samsung_broken_acpi_video = {
 	.broken_acpi_video = true,
 };
 
+static struct samsung_quirks samsung_use_native_backlight = {
+	.use_native_backlight = true,
+};
+
 static struct samsung_quirks samsung_np740u3e = {
 	.four_kbd_backlight_levels = true,
 	.enable_kbd_backlight = true,
@@ -1507,7 +1512,7 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "N150P"),
 		DMI_MATCH(DMI_BOARD_NAME, "N150P"),
 		},
-	 .driver_data = &samsung_broken_acpi_video,
+	 .driver_data = &samsung_use_native_backlight,
 	},
 	{
 	 .callback = samsung_dmi_matched,
@@ -1517,7 +1522,7 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "N145P/N250P/N260P"),
 		DMI_MATCH(DMI_BOARD_NAME, "N145P/N250P/N260P"),
 		},
-	 .driver_data = &samsung_broken_acpi_video,
+	 .driver_data = &samsung_use_native_backlight,
 	},
 	{
 	 .callback = samsung_dmi_matched,
@@ -1557,7 +1562,7 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "N250P"),
 		DMI_MATCH(DMI_BOARD_NAME, "N250P"),
 		},
-	 .driver_data = &samsung_broken_acpi_video,
+	 .driver_data = &samsung_use_native_backlight,
 	},
 	{
 	 .callback = samsung_dmi_matched,
@@ -1616,6 +1621,15 @@ static int __init samsung_init(void)
 		pr_info("Disabling ACPI video driver\n");
 		acpi_video_unregister();
 	}
+
+	if (samsung->quirks->use_native_backlight) {
+		pr_info("Using native backlight driver\n");
+		/* Tell acpi-video to not handle the backlight */
+		acpi_video_dmi_promote_vendor();
+		acpi_video_unregister();
+		/* And also do not handle it ourselves */
+		samsung->handle_backlight = false;
+	}
 #endif
 
 	ret = samsung_platform_init(samsung);
drivers/power/88pm860x_charger.c +1 -0
index de029bbc1cc1..5ccca8743ce6 100644
@@ -711,6 +711,7 @@ static int pm860x_charger_probe(struct platform_device *pdev)
 	return 0;
 
 out_irq:
+	power_supply_unregister(&info->usb);
 	while (--i >= 0)
 		free_irq(info->irq[i], info);
 out:
drivers/power/bq24190_charger.c +1 -1
index ad3ff8fbfbbb..e4c95e1a6733 100644
@@ -929,7 +929,7 @@ static void bq24190_charger_init(struct power_supply *charger)
 	charger->properties = bq24190_charger_properties;
 	charger->num_properties = ARRAY_SIZE(bq24190_charger_properties);
 	charger->supplied_to = bq24190_charger_supplied_to;
-	charger->num_supplies = ARRAY_SIZE(bq24190_charger_supplied_to);
+	charger->num_supplicants = ARRAY_SIZE(bq24190_charger_supplied_to);
 	charger->get_property = bq24190_charger_get_property;
 	charger->set_property = bq24190_charger_set_property;
 	charger->property_is_writeable = bq24190_charger_property_is_writeable;
drivers/power/gpio-charger.c +2 -2
index 7536933d0ab9..e5deb11bf1d5 100644
@@ -168,7 +168,7 @@ static int gpio_charger_suspend(struct device *dev)
 
 	if (device_may_wakeup(dev))
 		gpio_charger->wakeup_enabled =
-			enable_irq_wake(gpio_charger->irq);
+			!enable_irq_wake(gpio_charger->irq);
 
 	return 0;
 }
@@ -178,7 +178,7 @@ static int gpio_charger_resume(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	struct gpio_charger *gpio_charger = platform_get_drvdata(pdev);
 
-	if (gpio_charger->wakeup_enabled)
+	if (device_may_wakeup(dev) && gpio_charger->wakeup_enabled)
 		disable_irq_wake(gpio_charger->irq);
 	power_supply_changed(&gpio_charger->charger);
 
drivers/scsi/megaraid/megaraid_sas_base.c +11 -13
index 5e881e5e67b6..6e503802947a 100644
@@ -3556,7 +3556,6 @@ static int megasas_create_frame_pool(struct megasas_instance *instance)
 	int i;
 	u32 max_cmd;
 	u32 sge_sz;
-	u32 sgl_sz;
 	u32 total_sz;
 	u32 frame_count;
 	struct megasas_cmd *cmd;
@@ -3575,24 +3574,23 @@ static int megasas_create_frame_pool(struct megasas_instance *instance)
 	}
 
 	/*
-	 * Calculated the number of 64byte frames required for SGL
-	 */
-	sgl_sz = sge_sz * instance->max_num_sge;
-	frame_count = (sgl_sz + MEGAMFI_FRAME_SIZE - 1) / MEGAMFI_FRAME_SIZE;
-	frame_count = 15;
-
-	/*
-	 * We need one extra frame for the MFI command
+	 * For MFI controllers.
+	 * max_num_sge = 60
+	 * max_sge_sz  = 16 byte (sizeof megasas_sge_skinny)
+	 * Total 960 byte (15 MFI frame of 64 byte)
+	 *
+	 * Fusion adapter require only 3 extra frame.
+	 * max_num_sge = 16 (defined as MAX_IOCTL_SGE)
+	 * max_sge_sz  = 12 byte (sizeof  megasas_sge64)
+	 * Total 192 byte (3 MFI frame of 64 byte)
 	 */
-	frame_count++;
-
+	frame_count = instance->ctrl_context ? (3 + 1) : (15 + 1);
 	total_sz = MEGAMFI_FRAME_SIZE * frame_count;
 	/*
 	 * Use DMA pool facility provided by PCI layer
 	 */
 	instance->frame_dma_pool = pci_pool_create("megasas frame pool",
-						   instance->pdev, total_sz, 64,
-						   0);
+					instance->pdev, total_sz, 256, 0);
 
 	if (!instance->frame_dma_pool) {
 		printk(KERN_DEBUG "megasas: failed to setup frame pool\n");
drivers/scsi/megaraid/megaraid_sas_fp.c +11 -6
index 0f66d0ef0b26..7d2d424bc8d0 100644
@@ -170,6 +170,7 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)
 	struct MR_FW_RAID_MAP_ALL     *fw_map_old    = NULL;
 	struct MR_FW_RAID_MAP         *pFwRaidMap    = NULL;
 	int i;
+	u16 ld_count;
 
 
 	struct MR_DRV_RAID_MAP_ALL *drv_map =
@@ -189,9 +190,10 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)
 		fw_map_old = (struct MR_FW_RAID_MAP_ALL *)
 			fusion->ld_map[(instance->map_id & 1)];
 		pFwRaidMap = &fw_map_old->raidMap;
+		ld_count = (u16)le32_to_cpu(pFwRaidMap->ldCount);
 
 #if VD_EXT_DEBUG
-		for (i = 0; i < le16_to_cpu(pFwRaidMap->ldCount); i++) {
+		for (i = 0; i < ld_count; i++) {
 			dev_dbg(&instance->pdev->dev, "(%d) :Index 0x%x "
 				"Target Id 0x%x Seq Num 0x%x Size 0/%llx\n",
 				instance->unique_id, i,
@@ -203,12 +205,15 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)
 
 		memset(drv_map, 0, fusion->drv_map_sz);
 		pDrvRaidMap->totalSize = pFwRaidMap->totalSize;
-		pDrvRaidMap->ldCount = (__le16)pFwRaidMap->ldCount;
+		pDrvRaidMap->ldCount = (__le16)cpu_to_le16(ld_count);
 		pDrvRaidMap->fpPdIoTimeoutSec = pFwRaidMap->fpPdIoTimeoutSec;
 		for (i = 0; i < MAX_RAIDMAP_LOGICAL_DRIVES + MAX_RAIDMAP_VIEWS; i++)
 			pDrvRaidMap->ldTgtIdToLd[i] =
 				(u8)pFwRaidMap->ldTgtIdToLd[i];
-		for (i = 0; i < le16_to_cpu(pDrvRaidMap->ldCount); i++) {
+		for (i = (MAX_RAIDMAP_LOGICAL_DRIVES + MAX_RAIDMAP_VIEWS);
+			i < MAX_LOGICAL_DRIVES_EXT; i++)
+			pDrvRaidMap->ldTgtIdToLd[i] = 0xff;
+		for (i = 0; i < ld_count; i++) {
 			pDrvRaidMap->ldSpanMap[i] = pFwRaidMap->ldSpanMap[i];
 #if VD_EXT_DEBUG
 			dev_dbg(&instance->pdev->dev,
@@ -250,7 +255,7 @@ u8 MR_ValidateMapInfo(struct megasas_instance *instance)
 	struct LD_LOAD_BALANCE_INFO *lbInfo;
 	PLD_SPAN_INFO ldSpanInfo;
 	struct MR_LD_RAID         *raid;
-	int ldCount, num_lds;
+	u16 ldCount, num_lds;
 	u16 ld;
 	u32 expected_size;
 
@@ -354,7 +359,7 @@ static int getSpanInfo(struct MR_DRV_RAID_MAP_ALL *map,
 
 	for (ldCount = 0; ldCount < MAX_LOGICAL_DRIVES_EXT; ldCount++) {
 		ld = MR_TargetIdToLdGet(ldCount, map);
-			if (ld >= MAX_LOGICAL_DRIVES_EXT)
+			if (ld >= (MAX_LOGICAL_DRIVES_EXT - 1))
 				continue;
 		raid = MR_LdRaidGet(ld, map);
 		dev_dbg(&instance->pdev->dev, "LD %x: span_depth=%x\n",
@@ -1155,7 +1160,7 @@ void mr_update_span_set(struct MR_DRV_RAID_MAP_ALL *map,
 
 	for (ldCount = 0; ldCount < MAX_LOGICAL_DRIVES_EXT; ldCount++) {
 		ld = MR_TargetIdToLdGet(ldCount, map);
-		if (ld >= MAX_LOGICAL_DRIVES_EXT)
+		if (ld >= (MAX_LOGICAL_DRIVES_EXT - 1))
 			continue;
 		raid = MR_LdRaidGet(ld, map);
 		for (element = 0; element < MAX_QUAD_DEPTH; element++) {
drivers/scsi/megaraid/megaraid_sas_fusion.c +17 -7
index 9d9c27cd4687..554395634592 100644
@@ -101,6 +101,8 @@ megasas_enable_intr_fusion(struct megasas_instance *instance)
 {
 	struct megasas_register_set __iomem *regs;
 	regs = instance->reg_set;
+
+	instance->mask_interrupts = 0;
 	/* For Thunderbolt/Invader also clear intr on enable */
 	writel(~0, &regs->outbound_intr_status);
 	readl(&regs->outbound_intr_status);
@@ -109,7 +111,6 @@ megasas_enable_intr_fusion(struct megasas_instance *instance)
 
 	/* Dummy readl to force pci flush */
 	readl(&regs->outbound_intr_mask);
-	instance->mask_interrupts = 0;
 }
 
 /**
@@ -696,12 +697,11 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
 		cpu_to_le32(lower_32_bits(ioc_init_handle));
 	init_frame->data_xfer_len = cpu_to_le32(sizeof(struct MPI2_IOC_INIT_REQUEST));
 
-	req_desc.Words = 0;
+	req_desc.u.low = cpu_to_le32(lower_32_bits(cmd->frame_phys_addr));
+	req_desc.u.high = cpu_to_le32(upper_32_bits(cmd->frame_phys_addr));
 	req_desc.MFAIo.RequestFlags =
 		(MEGASAS_REQ_DESCRIPT_FLAGS_MFA <<
-		 MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
-	cpu_to_le32s((u32 *)&req_desc.MFAIo);
-	req_desc.Words |= cpu_to_le64(cmd->frame_phys_addr);
+		MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
 
 	/*
 	 * disable the intr before firing the init frame
@@ -1753,9 +1753,19 @@ megasas_build_dcdb_fusion(struct megasas_instance *instance,
 		if (scmd->device->channel < MEGASAS_MAX_PD_CHANNELS)
 			goto NonFastPath;
 
+		/*
+		 * For older firmware, Driver should not access ldTgtIdToLd
+		 * beyond index 127 and for Extended VD firmware, ldTgtIdToLd
+		 * should not go beyond 255.
+		 */
+
+		if ((!fusion->fast_path_io) ||
+			(device_id >= instance->fw_supported_vd_count))
+			goto NonFastPath;
+
 		ld = MR_TargetIdToLdGet(device_id, local_map_ptr);
-		if ((ld >= instance->fw_supported_vd_count) ||
-			(!fusion->fast_path_io))
+
+		if (ld >= instance->fw_supported_vd_count)
 			goto NonFastPath;
 
 		raid = MR_LdRaidGet(ld, local_map_ptr);
drivers/scsi/megaraid/megaraid_sas_fusion.h +2 -7
index 0d183d521bdd..a7f216f27ae3 100644
@@ -304,14 +304,9 @@ struct MPI2_RAID_SCSI_IO_REQUEST {
  * MPT RAID MFA IO Descriptor.
  */
 struct MEGASAS_RAID_MFA_IO_REQUEST_DESCRIPTOR {
-#if   defined(__BIG_ENDIAN_BITFIELD)
-	u32     MessageAddress1:24; /* bits 31:8*/
-	u32     RequestFlags:8;
-#else
 	u32     RequestFlags:8;
-	u32     MessageAddress1:24; /* bits 31:8*/
-#endif
-	u32     MessageAddress2;      /* bits 61:32 */
+	u32     MessageAddress1:24;
+	u32     MessageAddress2;
 };
 
 /* Default Request Descriptor */
drivers/scsi/sg.c +30 -4
index 60354449d9ed..843594c2583d 100644
@@ -1376,6 +1376,17 @@ sg_rq_end_io(struct request *rq, int uptodate)
 	}
 	/* Rely on write phase to clean out srp status values, so no "else" */
 
+	/*
+	 * Free the request as soon as it is complete so that its resources
+	 * can be reused without waiting for userspace to read() the
+	 * result.  But keep the associated bio (if any) around until
+	 * blk_rq_unmap_user() can be called from user context.
+	 */
+	srp->rq = NULL;
+	if (rq->cmd != rq->__cmd)
+		kfree(rq->cmd);
+	__blk_put_request(rq->q, rq);
+
 	write_lock_irqsave(&sfp->rq_list_lock, iflags);
 	if (unlikely(srp->orphan)) {
 		if (sfp->keep_orphan)
@@ -1710,7 +1721,22 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)
 			return -ENOMEM;
 	}
 
-	rq = blk_get_request(q, rw, GFP_ATOMIC);
+	/*
+	 * NOTE
+	 *
+	 * With scsi-mq enabled, there are a fixed number of preallocated
+	 * requests equal in number to shost->can_queue.  If all of the
+	 * preallocated requests are already in use, then using GFP_ATOMIC with
+	 * blk_get_request() will return -EWOULDBLOCK, whereas using GFP_KERNEL
+	 * will cause blk_get_request() to sleep until an active command
+	 * completes, freeing up a request.  Neither option is ideal, but
+	 * GFP_KERNEL is the better choice to prevent userspace from getting an
+	 * unexpected EWOULDBLOCK.
+	 *
+	 * With scsi-mq disabled, blk_get_request() with GFP_KERNEL usually
+	 * does not sleep except under memory pressure.
+	 */
+	rq = blk_get_request(q, rw, GFP_KERNEL);
 	if (IS_ERR(rq)) {
 		kfree(long_cmdp);
 		return PTR_ERR(rq);
@@ -1803,10 +1829,10 @@ sg_finish_rem_req(Sg_request *srp)
 	SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
 				      "sg_finish_rem_req: res_used=%d\n",
 				      (int) srp->res_used));
-	if (srp->rq) {
-		if (srp->bio)
-			ret = blk_rq_unmap_user(srp->bio);
+	if (srp->bio)
+		ret = blk_rq_unmap_user(srp->bio);
 
+	if (srp->rq) {
 		if (srp->rq->cmd != srp->rq->__cmd)
 			kfree(srp->rq->cmd);
 		blk_put_request(srp->rq);
drivers/target/iscsi/iscsi_target_tq.c +5 -23
index 601e9cc61e98..bb2890e79ca0 100644
@@ -24,36 +24,22 @@
 #include "iscsi_target_tq.h"
 #include "iscsi_target.h"
 
-static LIST_HEAD(active_ts_list);
 static LIST_HEAD(inactive_ts_list);
-static DEFINE_SPINLOCK(active_ts_lock);
 static DEFINE_SPINLOCK(inactive_ts_lock);
 static DEFINE_SPINLOCK(ts_bitmap_lock);
 
-static void iscsi_add_ts_to_active_list(struct iscsi_thread_set *ts)
-{
-	spin_lock(&active_ts_lock);
-	list_add_tail(&ts->ts_list, &active_ts_list);
-	iscsit_global->active_ts++;
-	spin_unlock(&active_ts_lock);
-}
-
 static void iscsi_add_ts_to_inactive_list(struct iscsi_thread_set *ts)
 {
+	if (!list_empty(&ts->ts_list)) {
+		WARN_ON(1);
+		return;
+	}
 	spin_lock(&inactive_ts_lock);
 	list_add_tail(&ts->ts_list, &inactive_ts_list);
 	iscsit_global->inactive_ts++;
 	spin_unlock(&inactive_ts_lock);
 }
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/tty/pty.c +3 -0
index 7c4447a5c0f4..082304dcbe8c 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/atmel_serial.c +3 -1
index edde3eca055d..6ee5c6cefac0 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/fsl_lpuart.c +9 -7
index 6dd53af546a3..eb9bc7e1dbaa 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/vt.c +3 -1
index b33b00b386de..53c25bca7d05 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/buffer.c +17 -9
index 684ef70dc09d..506b969ea7fd 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/driver.c +12 -17
index 9bffd26cea05..d7a6d8bc510b 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/hcd.c +8 -8
index a6efb4184f2b..0009fc847eee 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/hub.c +9 -16
index b649fef2e35d..2246954d7df3 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/message.c +3 -20
index f7b7713cfb2a..f368d2053da5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/usb.c +1 -0
index 2dd2362198d2..29ee9363faa5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/isp1760-hcd.c +3 -0
index e752c3098f38..d2a856528471 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/cp210x.c +1 -0
index f4c56fc1a9f6..f40c856ff758 100644

Lines of this file are not shown. View the raw message.

drivers/xen/manage.c +7 -1
index f8bb36f9d9ce..bf1940706422 100644

Lines of this file are not shown. View the raw message.

drivers/xen/xen-scsiback.c +6 -8
index 3e32146472a5..d30c6b246342 100644

Lines of this file are not shown. View the raw message.

fs/binfmt_elf.c +3 -2
index d8fc0605b9d2..e1efcaa1b245 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/ctree.c +4 -13
index 150822ee0a0b..c81ce0c7c1a9 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/disk-io.c +9 -2
index 97676731190c..b1709831b1a1 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/tree-log.c +83 -10

93 lines not on this page · raw message

fs/jffs2/scan.c +5 -0
index 7654e87b0428..9ad5ba4b299b 100644

Lines of this file are not shown. View the raw message.

fs/lockd/mon.c +9 -4
index 9106f42c472c..67bdc0bb9aea 100644

Lines of this file are not shown. View the raw message.

fs/nfs/callback.c +5 -3
index b8fb3a4ef649..351be9205bf8 100644

Lines of this file are not shown. View the raw message.

fs/nfs/callback_xdr.c +3 -1
index f4ccfe6521ec..02f8d09e119f 100644

Lines of this file are not shown. View the raw message.

fs/nfs/direct.c +1 -1
index 294692ff83b1..a094b0c34ac3 100644

Lines of this file are not shown. View the raw message.

fs/nfs/internal.h +21 -1
index efaa31c70fbe..e1acc1c4ce65 100644

Lines of this file are not shown. View the raw message.

fs/nfs/nfs4proc.c +9 -5
index 83f3a7d7466e..cd617076aeca 100644

Lines of this file are not shown. View the raw message.

fs/nfs/pnfs.c +20 -21

41 lines not on this page · raw message

fs/nfs/super.c +6 -3
index 31a11b0e885d..368d9395d2e7 100644

Lines of this file are not shown. View the raw message.

fs/ocfs2/quota_local.c +2 -2
index 10b653930ee2..465223b7592e 100644

Lines of this file are not shown. View the raw message.

fs/proc/task_mmu.c +9 -5
index 4e0388cffe3d..e8972bcddfb4 100644

Lines of this file are not shown. View the raw message.

fs/quota/dquot.c +4 -14
index 9340228aff6e..05fea2ac116c 100644

Lines of this file are not shown. View the raw message.

fs/quota/quota_v1.c +2 -2
index 469c6848b322..8fe79beced5c 100644

Lines of this file are not shown. View the raw message.

fs/quota/quota_v2.c +5 -5
index 02751ec695c5..d1a8054bba9a 100644

Lines of this file are not shown. View the raw message.

fs/udf/inode.c +17 -11
index 5bc71d9a674a..7b72b7dd8906 100644

Lines of this file are not shown. View the raw message.

fs/xfs/libxfs/xfs_bmap.c +5 -1
index 79c981984dca..661666ecac22 100644

Lines of this file are not shown. View the raw message.

fs/xfs/libxfs/xfs_symlink_remote.c +2 -0
index 5782f037eab4..a7dce9aea5b5 100644

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_buf_item.c +4 -0
index f15969543326..1a6c9b936789 100644

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_inode.c +2 -0
index 8ed049d1e332..3cc309a19ea8 100644

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_qm.c +5 -0
index d68f23021af3..cf2bc2dd702e 100644

Lines of this file are not shown. View the raw message.

fs/xfs/xfs_trans.c +1 -0
index 30e8e3410955..32dfdb5d3e6b 100644

Lines of this file are not shown. View the raw message.

include/linux/fsnotify.h +4 -2
index 1c804b057fb1..7ee1774edee5 100644

Lines of this file are not shown. View the raw message.

include/linux/nfs_xdr.h +1 -1
index 47ebb4fafd87..d77a08d25223 100644

Lines of this file are not shown. View the raw message.

include/linux/quota.h +2 -2
index 224fb8154f8f..8b0877faa7f5 100644

Lines of this file are not shown. View the raw message.

include/linux/sunrpc/clnt.h +2 -1
index 70736b98c721..b363a0f6dfe1 100644

Lines of this file are not shown. View the raw message.

include/linux/usb.h +0 -5
index 447a7e2fc19b..3827bffc11a7 100644

Lines of this file are not shown. View the raw message.

include/linux/usb/hcd.h +3 -0
index cd96a2bc3388..2f48e1756cbd 100644

Lines of this file are not shown. View the raw message.

include/net/cipso_ipv4.h +16 -9
index a6fd939f202d..3ebb168b9afc 100644

Lines of this file are not shown. View the raw message.

kernel/debug/kdb/kdb_main.c +1 -1
index 379650b984f8..6ffdc96059a0 100644

Lines of this file are not shown. View the raw message.

kernel/time/ntp.c +7 -3
index 28bf91c60a0b..85fb3d632bd8 100644

Lines of this file are not shown. View the raw message.

kernel/trace/ring_buffer.c +35 -5
index a56e07c8d15b..f4fbbfcdf399 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace.c +1 -1
index 426962b04183..72c71345db81 100644

Lines of this file are not shown. View the raw message.

mm/hugetlb.c +2 -0
index 9fd722769927..f08fec71ec5a 100644

Lines of this file are not shown. View the raw message.

net/bluetooth/smp.c +5 -1
index f09b6b65cf6b..9ebc394ea5e5 100644

Lines of this file are not shown. View the raw message.

net/ceph/osd_client.c +18 -8
index 6f164289bde8..b0cf1f287aed 100644

Lines of this file are not shown. View the raw message.

net/ipv4/cipso_ipv4.c +30 -21

51 lines not on this page · raw message

net/netlabel/netlabel_kapi.c +10 -5
index a845cd4cf21e..28cddc85b700 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/clnt.c +7 -5
index 9acd6ce88db7..ae46f0198608 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/rpcb_clnt.c +6 -2
index 1891a1022c17..74b75c3ce39d 100644

Lines of this file are not shown. View the raw message.

security/smack/smack.h +10 -0
index b828a379377c..b48359c0da32 100644

Lines of this file are not shown. View the raw message.

security/smack/smack_lsm.c +13 -11
index d515ec25ae9f..9d3c64af1ca9 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +1 -0
index c879c3709eae..50762cf62b2d 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_sigmatel.c +20 -0
index 605d14003d25..6d36c5b78805 100644

Lines of this file are not shown. View the raw message.

sound/pci/riptide/riptide.c +19 -8
index 6abc2ac8fffb..e76857277695 100644

Lines of this file are not shown. View the raw message.

sound/pci/rme9652/hdspm.c +6 -0
index 52d86af3ef2d..fcf91ee0328d 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/rt5670.c +1 -0
index 9bd8b4f63303..7134f9ebf2f3 100644

Lines of this file are not shown. View the raw message.

sound/soc/davinci/Kconfig +1 -2
index 8e948c63f3d9..2b81ca418d2a 100644

Lines of this file are not shown. View the raw message.

sound/soc/pxa/mioa701_wm9713.c +1 -1
index 595eee341e90..a08a877fc10c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/cloexec.c +15 -3
index 47b78b3f0325..6da965bdbc2c 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.