Linux 3.12.7
Greg KH
maintainerI'm announcing the release of the 3.12.7 kernel.
All users of the 3.12 kernel series must upgrade.
The updated 3.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.12.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
------------
Documentation/kernel-parameters.txt | 2 Makefile | 2 arch/arm/boot/dts/r8a7790.dtsi | 4 arch/arm/boot/dts/sun7i-a20.dtsi | 32 ++--- arch/arm/mach-omap2/board-ldp.c | 7 + arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 4 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 6 - arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 2 arch/arm64/kernel/ptrace.c | 38 +++---- arch/powerpc/include/asm/exception-64s.h | 2 arch/powerpc/kernel/head_64.S | 1 arch/powerpc/kvm/book3s_64_mmu_hv.c | 6 - arch/powerpc/kvm/book3s_hv_rm_mmu.c | 4 arch/sh/kernel/sh_ksyms_32.c | 5 arch/sh/lib/Makefile | 2 arch/sparc/include/asm/pgtable_64.h | 4 arch/x86/include/asm/pgtable.h | 11 +- arch/x86/kernel/cpu/intel.c | 3 arch/x86/kvm/lapic.c | 8 - arch/x86/kvm/vmx.c | 3 arch/x86/mm/gup.c | 13 ++ drivers/acpi/acpi_lpss.c | 1 drivers/acpi/bus.c | 10 + drivers/ata/ahci_imx.c | 3 drivers/ata/libata-core.c | 19 +++ drivers/ata/libata-scsi.c | 21 +++ drivers/clocksource/dw_apb_timer_of.c | 7 - drivers/cpufreq/intel_pstate.c | 5 drivers/dma/Kconfig | 1 drivers/firewire/sbp2.c | 1 drivers/gpio/gpio-msm-v2.c | 4 drivers/gpio/gpio-twl4030.c | 15 ++ drivers/gpu/drm/drm_edid.c | 8 + drivers/gpu/drm/i915/i915_dma.c | 10 + drivers/gpu/drm/i915/i915_gem.c | 34 ++++-- drivers/gpu/drm/i915/i915_gem_context.c | 16 ++ drivers/gpu/drm/i915/intel_display.c | 9 + drivers/gpu/drm/nouveau/nouveau_acpi.c | 19 ++- drivers/gpu/drm/nouveau/nouveau_drm.c | 6 + drivers/gpu/drm/radeon/atombios_crtc.c | 23 +--- drivers/gpu/drm/radeon/cik.c | 12 +- drivers/gpu/drm/radeon/cik_sdma.c | 2 drivers/gpu/drm/radeon/dce6_afmt.c | 4 drivers/gpu/drm/radeon/evergreen_hdmi.c | 4 drivers/gpu/drm/radeon/ni.c | 20 ++- drivers/gpu/drm/radeon/radeon.h | 4 drivers/gpu/drm/radeon/radeon_atpx_handler.c | 16 ++ drivers/gpu/drm/radeon/radeon_kms.c | 9 + drivers/gpu/drm/radeon/radeon_uvd.c | 2 drivers/gpu/drm/radeon/rs690.c | 10 + drivers/gpu/drm/radeon/rv770_dpm.c | 6 + drivers/gpu/drm/radeon/si.c | 12 +- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 - drivers/idle/intel_idle.c | 3 drivers/iio/adc/ad7887.c | 16 ++ drivers/iio/imu/adis16400_core.c | 7 + drivers/infiniband/ulp/isert/ib_isert.c | 22 ++-- drivers/input/input.c | 4 drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 3 drivers/net/ethernet/broadcom/tg3.c | 2 drivers/net/usb/dm9601.c | 34 ++++-- drivers/net/wireless/ath/ath9k/ar9002_mac.c | 52 +++++++-- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 25 +++- drivers/net/wireless/ath/ath9k/main.c | 5 drivers/net/wireless/rtlwifi/pci.c | 4 drivers/of/address.c | 8 - drivers/pci/hotplug/acpiphp_glue.c | 30 ++++- drivers/pinctrl/pinctrl-baytrail.c | 1 drivers/pinctrl/sh-pfc/sh_pfc.h | 2 drivers/power/power_supply_core.c | 12 +- drivers/s390/char/tty3270.c | 2 drivers/scsi/qla2xxx/qla_target.c | 9 - drivers/staging/comedi/drivers.c | 2 drivers/staging/comedi/drivers/8255_pci.c | 15 ++ drivers/target/iscsi/iscsi_target.c | 27 ++--- drivers/target/iscsi/iscsi_target_login.c | 6 - drivers/target/target_core_device.c | 5 drivers/target/target_core_file.c | 8 - drivers/target/target_core_file.h | 5 drivers/tty/n_tty.c | 7 + drivers/tty/serial/8250/8250_dw.c | 2 drivers/tty/serial/pmac_zilog.c | 3 drivers/tty/tty_ldsem.c | 16 ++ drivers/usb/chipidea/core.c | 4 drivers/usb/chipidea/host.c | 3 drivers/usb/chipidea/udc.c | 3 drivers/usb/class/cdc-wdm.c | 8 - drivers/usb/host/xhci-pci.c | 7 + drivers/usb/musb/musb_core.c | 14 +- drivers/usb/serial/generic.c | 9 - drivers/usb/serial/option.c | 2 drivers/usb/serial/zte_ev.c | 3 fs/aio.c | 113 ++++++++++++--------- fs/ceph/addr.c | 10 + fs/ceph/cache.c | 3 fs/ceph/mds_client.c | 8 + fs/cifs/cifsproto.h | 7 - fs/cifs/dir.c | 11 +- fs/cifs/inode.c | 6 - fs/cifs/link.c | 26 ++-- fs/ext2/super.c | 1 fs/ext4/ext4.h | 10 + fs/ext4/ext4_jbd2.c | 9 + fs/ext4/extents.c | 45 +++++--- fs/ext4/inode.c | 12 -- fs/ext4/mballoc.c | 21 ++- fs/ext4/super.c | 21 ++- fs/gfs2/aops.c | 30 +++++ fs/gfs2/log.c | 4 fs/gfs2/meta_io.c | 5 fs/gfs2/ops_fstype.c | 12 ++ fs/jbd2/transaction.c | 6 - fs/xfs/xfs_qm.c | 71 +++++++++---- include/acpi/acpi_bus.h | 4 include/asm-generic/pgtable.h | 2 include/drm/drm_pciids.h | 2 include/linux/auxvec.h | 2 include/linux/libata.h | 1 include/linux/migrate.h | 13 ++ include/linux/mm_types.h | 49 +++++++++ include/linux/reboot.h | 1 include/target/target_core_base.h | 1 include/uapi/drm/radeon_drm.h | 2 kernel/cgroup.c | 31 +++-- kernel/fork.c | 1 kernel/freezer.c | 6 + kernel/kexec.c | 1 kernel/reboot.c | 2 kernel/sched/fair.c | 7 + kernel/sched/rt.c | 14 ++ kernel/trace/ftrace.c | 2 mm/compaction.c | 4 mm/fremap.c | 8 - mm/huge_memory.c | 49 +++++++-- mm/memcontrol.c | 2 mm/memory-failure.c | 24 +++- mm/mempolicy.c | 2 mm/migrate.c | 82 ++++++++++++--- mm/mlock.c | 44 +++++--- mm/mprotect.c | 13 ++ mm/page_alloc.c | 19 +-- mm/pgtable-generic.c | 8 + mm/rmap.c | 4 net/wireless/radiotap.c | 4 scripts/link-vmlinux.sh | 4 security/selinux/hooks.c | 53 +++++++-- security/selinux/include/xfrm.h | 9 - security/selinux/xfrm.c | 53 +++++++-- sound/core/pcm_lib.c | 2 sound/pci/hda/hda_intel.c | 4 sound/pci/hda/patch_realtek.c | 3 sound/soc/codecs/wm5110.c | 2 sound/soc/codecs/wm8904.c | 2 sound/soc/codecs/wm_adsp.c | 10 + sound/soc/tegra/tegra20_i2s.c | 6 - sound/soc/tegra/tegra20_spdif.c | 10 - sound/soc/tegra/tegra30_i2s.c | 6 - tools/power/cpupower/utils/cpupower-set.c | 6 - 158 files changed, 1349 insertions(+), 524 deletions(-)
Al Viro (1):
ext4: fix del_timer() misuse for ->s_err_report
Alex Deucher (6):
drm/radeon: Fix sideport problems on certain RS690 boards drm/radeon: add missing display tiling setup for oland drm/radeon/dpm: disable ss on Cayman
drm/radeon: check for 0 count in speaker allocation and SAD code drm/radeon: fix asic gfx values for scrapper asics drm/radeon: 0x9649 is SUMO2 not SUMO
Anton Blanchard (1):
powerpc: Align p_end
Ard Biesheuvel (1):
auxvec.h: account for AT_HWCAP2 in AT_VECTOR_SIZE_BASE
Ben Dooks (1):
ARM: shmobile: r8a7790: fix shdi resource sizes
Benjamin LaHaise (2):
aio: fix kioctx leak introduced by "aio: Fix a trinity splat" aio/migratepages: make aio migrate pages sane
Bjørn Mork (1):
usb: cdc-wdm: manage_power should always set needs_remote_wakeup
Bo Shen (1):
ASoC: wm8904: fix DSP mode B configuration
Bob Peterson (2):
GFS2: Fix use-after-free race when calling gfs2_remove_from_ail
GFS2: Fix slab memory leak in gfs2_bufdata
Chad Hanson (1):
selinux: fix broken peer recv check
Charles Keepax (2):
ASoC: wm_adsp: Add small delay while polling DSP RAM start
ASoC: wm5110: Correct HPOUT3 DAPM route typo
Chris Wilson (3):
drm/i915: Hold mutex across i915_gem_release
drm/i915: Fix erroneous dereference of batch_obj inside reset_status drm/i915: Use the correct GMCH_CTRL register for Sandybridge+
Christian König (2):
drm/radeon: fix typo in cik_copy_dma
drm/radeon: fix UVD 256MB check
Dan Williams (1):
net_dma: mark broken
Daniel Vetter (2):
drm/i915: Fix use-after-free in do_switch drm/i915: don't update the dri1 breadcrumb with modesetting
David Henningsson (1):
ALSA: hda - Add enable_msi=0 workaround for four HP machines
Dinh Nguyen (2):
clocksource: dw_apb_timer_of: Fix read_sched_clock
clocksource: dw_apb_timer_of: Fix support for dts binding "snps,dw-apb-timer"
Dmitry Kunilov (1):
usb: serial: zte_ev: move support for ZTE AC2726 from zte_ev back to option
Dmitry Torokhov (1):
Input: allocate absinfo data when setting ABS capability
Eric Whitney (1):
ext4: fix bigalloc regression
Eryu Guan (1):
ext4: check for overlapping extents in ext4_valid_extent_entries()
Fabio Estevam (1):
usb: chipidea: host: Only disable the vbus regulator if it is not NULL
Geert Uytterhoeven (2):
TTY: pmac_zilog, check existence of ports in pmz_console_init()
sh: always link in helper functions extracted from libgcc
Greg Kroah-Hartman (1):
Linux 3.12.7
H Hartley Sweeten (1):
staging: comedi: drivers: fix return value of comedi_load_firmware()
Hui Wang (1):
ALSA: hda - Add Dell headset detection quirk for three laptop models
Ian Abbott (1):
staging: comedi: 8255_pci: fix for newer PCI-DIO48H
Ilia Mirkin (1):
drm/nouveau: only runtime suspend by default in optimus configuration
Jan Kara (3):
ext4: Do not reserve clusters when fs doesn't support extents
ext4: fix deadlock when writing in ENOSPC conditions
ext2: Fix oops in ext2_get_block() called from ext2_quota_write()
Jan Kiszka (2):
KVM: nVMX: Unconditionally uninit the MMU on nested vmexit
KVM: x86: Fix APIC map calculation after re-enabling
Jianguo Wu (2):
mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfully mm/hugetlb: check for pte NULL pointer in __page_check_address()
Jie Liu (1):
xfs: fix infinite loop by detaching the group/project hints from user dquot
Johan Hovold (1):
USB: serial: fix race in generic write
Johannes Berg (1):
radiotap: fix bitmap-end-finding buffer overrun
Johannes Weiner (1):
mm: page_alloc: revert NUMA aspect of fair allocation policy
Jonathan Cameron (2):
iio:imu:adis16400 fix pressure channel scan type iio:adc:ad7887 Fix channel reported endianness from cpu to big endian
JongHo Kim (1):
ALSA: Add SNDRV_PCM_STATE_PAUSED case in wait_for_avail function
Joonsoo Kim (2):
mm/mempolicy: correct putback method for isolate pages if failed mm/compaction: respect ignore_skip_hint in update_pageblock_skip
Josh Boyer (1):
cpupower: Fix segfault due to incorrect getopt_long arugments
Junho Ryu (1):
ext4: fix use-after-free in ext4_mb_new_blocks
Kirill Tkhai (1):
sched/rt: Fix rq's cpupri leak while enqueue/dequeue child RT entities
Larry Finger (1):
rtlwifi: pci: Fix oops on driver unload
Laurent Pinchart (1):
sh-pfc: Fix PINMUX_GPIO macro
Len Brown (1):
x86 idle: Repair large-server 50-watt idle-power regression
Li Wang (2):
ceph: allocate non-zero page to fscache in readpage()
ceph: Avoid data inconsistency due to d-cache aliasing in readpage()
Linus Torvalds (1):
aio: clean up and fix aio_setup_ring page mapping
Lukas Czerner (1):
ext4: fix FITRIM in no journal mode
Marc Carino (1):
libata: implement ATA_HORKAGE_NO_NCQ_TRIM and apply it to Micro M500 SSDs
Marc Kleine-Budde (1):
can: peak_usb: fix mem leak in pcan_usb_pro_init()
Marek Olšák (3):
drm/radeon: fix render backend setup for SI and CIK drm/radeon: expose render backend mask to the userspace drm/radeon: set correct pipe config for Hawaii in DCE
Marek Vasut (1):
ahci: imx: Explicitly clear IMX6Q_GPR13_SATA_MPLL_CLK_EN
Martin Schwidefsky (1):
s390/3270: fix allocation of tty3270_screen structure
Mathy Vanhoef (1):
ath9k_htc: properly set MAC address and BSSID mask
Maxime Ripard (1):
ARM: sun7i: dt: Fix interrupt trigger types
Mel Gorman (12):
mm: numa: serialise parallel get_user_page against THP migration
mm: numa: call MMU notifiers on THP migration
mm: clear pmd_numa before invalidating
mm: numa: do not clear PMD during PTE update scan
mm: numa: do not clear PTE for pte_numa update
mm: numa: ensure anon_vma is locked to prevent parallel THP splits
mm: numa: avoid unnecessary work on the failure path
sched: numa: skip inaccessible VMAs
mm: numa: clear numa hinting information on mprotect
mm: numa: avoid unnecessary disruption of NUMA hinting during migration
mm: numa: guarantee that tlb_flush_pending updates are visible before page table updates
mm: numa: defer TLB flush for THP migration as long as possible
Miao Xie (1):
ftrace: Initialize the ftrace profiler for each possible cpu
Michael Neuling (1):
powerpc: Fix bad stack check in exception entry
Michele Baldessari (1):
libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk for Seagate Momentus SpinPoint M8
Mika Westerberg (1):
serial: 8250_dw: add new ACPI IDs
Milosz Tanski (1):
ceph: hung on ceph fscache invalidate in some cases
Ming Lei (1):
scripts/link-vmlinux.sh: only filter kernel symbols for arm
Naoya Horiguchi (1):
mm/memory-failure.c: transfer page count from head page to tail page after split thp
Nicholas Bellinger (4):
iscsi-target: Fix-up all zero data-length CDBs with R/W_BIT set
iscsi-target: Fix incorrect np->np_thread NULL assignment
iser-target: Move INIT_WORK setup into isert_create_device_ib_res target/file: Update hw_max_sectors based on current block_size
Nithin Sujir (1):
tg3: Expand 4g_overflow_test workaround to skb fragments of any size.
Nobuhiro Iwamatsu (1):
sh: add EXPORT_SYMBOL(min_low_pfn) and EXPORT_SYMBOL(max_low_pfn) to sh_ksyms_32.c
Oleg Nesterov (1):
selinux: selinux_setprocattr()->ptrace_parent() needs rcu_read_lock()
Paul Drews (1):
ACPI: Add BayTrail SoC GPIO and LPSS ACPI IDs
Paul Moore (2):
selinux: look for IPsec labels on both inbound and outbound packets
selinux: process labeled IPsec TCP SYN-ACK packets properly in selinux_ip_postroute()
Paulo Zanoni (1):
drm/i915: change CRTC assertion on LCPLL disable
Peter Chen (1):
usb: chipidea: fix nobody cared IRQ when booting with host role
Peter Hurley (2):
tty: Fix hang at ldsem_down_read()
n_tty: Fix apparent order of echoed output
Peter Korsgaard (2):
dm9601: fix reception of full size ethernet frames on dm9620/dm9621a
dm9601: work around tx fifo sync issue on dm962x
Rafael J. Wysocki (2):
intel_pstate: Fail initialization if P-state information is missing ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug
Rafał Miłecki (1):
drm/edid: add quirk for BPC in Samsung NP700G7A-S01PL notebook
Rajendra Nayak (1):
ARM: DRA7: hwmod: Fix boot crash with DEBUG_LL
Rik van Riel (2):
mm: fix TLB flush race between migration, and change_protection_range
mm: fix use-after-free in sys_remap_file_pages
Rob Herring (1):
Revert "of/address: Handle #address-cells > 2 specially"
Robin H. Johnson (1):
libata: disable a disk via libata.force params
Roger Quadros (1):
gpio: twl4030: Fix regression for twl gpio LED output
Sachin Prabhu (1):
cifs: We do not drop reference to tlink in CIFSCheckMFSymlink()
Sebastian Andrzej Siewior (2):
usb: musb: core: Call dma_controller_destroy() in error path only once.
usb: musb: only cancel work if it is initialized
Shirish Pargaonkar (1):
cifs: set FILE_CREATED
Shivaram Upadhyayula (1):
qla2xxx: Fix schedule_delayed_work() for target timeout calculations
Shuah Khan (1):
power_supply: Fix Oops from NULL pointer dereference from wakeup_source_activate
Stefan Richter (1):
firewire: sbp2: bring back WRITE SAME support
Stephen Boyd (1):
gpio: msm: Fix irq mask/unmask by writing bits instead of numbers
Stephen Warren (1):
ASoC: tegra: fix uninitialized variables in set_fmt
Steven Whitehouse (2):
GFS2: don't hold s_umount over blkdev_put
GFS2: Fix incorrect invalidation for DIO/buffered I/O
Sujith Manoharan (1):
ath9k: Fix interrupt handling for the AR9002 family
Suman Anna (1):
ARM: OMAP2+: hwmod_data: fix missing OMAP_INTC_START in irq data
Takashi Iwai (1):
xhci: Limit the spurious wakeup fix only to HP machines
Tejun Heo (2):
cgroup: fix cgroup_create() error handling path libata, freezer: avoid block device removal while system is frozen
Theodore Ts'o (3):
ext4: call ext4_error_inode() if jbd2_journal_dirty_metadata() fails
ext4: add explicit casts when masking cluster sizes
jbd2: don't BUG but return ENOSPC if a handle runs out of space
Thomas Hellstrom (1):
drm/ttm: Fix accesses through vmas with only partial coverage
Tony Lindgren (1):
ARM: OMAP2+: Fix LCD panel backlight regression for LDP legacy booting
Toshi Kani (1):
ACPI / PCI / hotplug: Avoid warning when _ADR not present
Ville Syrjälä (1):
drm/i915: Take modeset locks around intel_modeset_setup_hw_state()
Vivek Goyal (1):
kexec: migrate to reboot cpu
Vladimir Davydov (1):
memcg: fix memcg_size() calculation
Vlastimil Babka (2):
mm: munlock: fix a bug where THP tail page is encountered
mm: munlock: fix deadlock in __munlock_pagevec()
Wei Yongjun (1):
iser-target: fix error return code in isert_create_device_ib_res()
Will Deacon (1):
arm64: ptrace: avoid using HW_BREAKPOINT_EMPTY for disabled events
Yan, Zheng (2):
ceph: cleanup aborted requests when re-sending requests.
ceph: wake up 'safe' waiters when unregistering request
Zhang Rui (1):
nouveau_acpi: convert acpi_get_handle() to acpi_has_method()
pingfan liu (1):
powerpc: kvm: fix rare but potential deadlock scene
Greg KH
maintainerDocumentation/kernel-parameters.txt +2 -0
@@ -1515,6 +1515,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. * atapi_dmadir: Enable ATAPI DMADIR bridge support + * disable: Disable this device. + If there are multiple matching configurations changing the same attribute, the last one is used.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 12 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = One Giant Leap for Frogkind
arch/arm/boot/dts/r8a7790.dtsi +2 -2
@@ -152,7 +152,7 @@ sdhi0: sdhi@ee100000 { compatible = "renesas,sdhi-r8a7790"; - reg = <0 0xee100000 0 0x100>; + reg = <0 0xee100000 0 0x200>; interrupt-parent = <&gic>; interrupts = <0 165 4>; cap-sd-highspeed;
@@ -161,7 +161,7 @@ sdhi1: sdhi@ee120000 { compatible = "renesas,sdhi-r8a7790"; - reg = <0 0xee120000 0 0x100>; + reg = <0 0xee120000 0 0x200>; interrupt-parent = <&gic>; interrupts = <0 166 4>; cap-sd-highspeed;
arch/arm/boot/dts/sun7i-a20.dtsi +16 -16
@@ -170,7 +170,7 @@ emac: ethernet@01c0b000 { compatible = "allwinner,sun4i-emac"; reg = <0x01c0b000 0x1000>; - interrupts = <0 55 1>; + interrupts = <0 55 4>; clocks = <&ahb_gates 17>; status = "disabled"; };
@@ -186,7 +186,7 @@ pio: pinctrl@01c20800 { compatible = "allwinner,sun7i-a20-pinctrl"; reg = <0x01c20800 0x400>; - interrupts = <0 28 1>; + interrupts = <0 28 4>; clocks = <&apb0_gates 5>; gpio-controller; interrupt-controller;
@@ -230,12 +230,12 @@ timer@01c20c00 { compatible = "allwinner,sun4i-timer"; reg = <0x01c20c00 0x90>; - interrupts = <0 22 1>, - <0 23 1>, - <0 24 1>, - <0 25 1>, - <0 67 1>, - <0 68 1>; + interrupts = <0 22 4>, + <0 23 4>, + <0 24 4>, + <0 25 4>, + <0 67 4>, + <0 68 4>; clocks = <&osc24M>; };
@@ -247,7 +247,7 @@ uart0: serial@01c28000 { compatible = "snps,dw-apb-uart"; reg = <0x01c28000 0x400>; - interrupts = <0 1 1>; + interrupts = <0 1 4>; reg-shift = <2>; reg-io-width = <4>; clocks = <&apb1_gates 16>;
@@ -257,7 +257,7 @@ uart1: serial@01c28400 { compatible = "snps,dw-apb-uart"; reg = <0x01c28400 0x400>; - interrupts = <0 2 1>; + interrupts = <0 2 4>; reg-shift = <2>; reg-io-width = <4>; clocks = <&apb1_gates 17>;
@@ -267,7 +267,7 @@ uart2: serial@01c28800 { compatible = "snps,dw-apb-uart"; reg = <0x01c28800 0x400>; - interrupts = <0 3 1>; + interrupts = <0 3 4>; reg-shift = <2>; reg-io-width = <4>; clocks = <&apb1_gates 18>;
@@ -277,7 +277,7 @@ uart3: serial@01c28c00 { compatible = "snps,dw-apb-uart"; reg = <0x01c28c00 0x400>; - interrupts = <0 4 1>; + interrupts = <0 4 4>; reg-shift = <2>; reg-io-width = <4>; clocks = <&apb1_gates 19>;
@@ -287,7 +287,7 @@ uart4: serial@01c29000 { compatible = "snps,dw-apb-uart"; reg = <0x01c29000 0x400>; - interrupts = <0 17 1>; + interrupts = <0 17 4>; reg-shift = <2>; reg-io-width = <4>; clocks = <&apb1_gates 20>;
@@ -297,7 +297,7 @@ uart5: serial@01c29400 { compatible = "snps,dw-apb-uart"; reg = <0x01c29400 0x400>; - interrupts = <0 18 1>; + interrupts = <0 18 4>; reg-shift = <2>; reg-io-width = <4>; clocks = <&apb1_gates 21>;
@@ -307,7 +307,7 @@ uart6: serial@01c29800 { compatible = "snps,dw-apb-uart"; reg = <0x01c29800 0x400>; - interrupts = <0 19 1>; + interrupts = <0 19 4>; reg-shift = <2>; reg-io-width = <4>; clocks = <&apb1_gates 22>;
@@ -317,7 +317,7 @@ uart7: serial@01c29c00 { compatible = "snps,dw-apb-uart"; reg = <0x01c29c00 0x400>; - interrupts = <0 20 1>; + interrupts = <0 20 4>; reg-shift = <2>; reg-io-width = <4>; clocks = <&apb1_gates 23>;
arch/arm/mach-omap2/board-ldp.c +6 -1
@@ -243,12 +243,18 @@ static void __init ldp_display_init(void)static int ldp_twl_gpio_setup (struct device *dev,unsigned gpio,unsigned ngpio) { +int res; +/* LCD enable GPIO */ ldp_lcd_pdata.enable_gpio = gpio +7 ;/* Backlight enable GPIO */ ldp_lcd_pdata.backlight_gpio = gpio +15 ; + res =platform_device_register (&ldp_lcd_device); +if (res) +pr_err ("Unable to register LCD: %d\n" , res); +return 0 ; }
@@ -347,7 +353,6 @@ static struct omap2_hsmmc_info mmc[] __initdata = {static struct platform_device *ldp_devices[]__initdata = { &ldp_gpio_keys_device, - &ldp_lcd_device, };#ifdef CONFIG_OMAP_MUX
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +2 -2
@@ -796,7 +796,7 @@ struct omap_hwmod omap2xxx_counter_32k_hwmod = {/* gpmc */ static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = { - { .irq =20 }, + { .irq =20 +OMAP_INTC_START , }, { .irq =-1 } };
@@ -841,7 +841,7 @@ static struct omap_hwmod_class omap2_rng_hwmod_class = { };static struct omap_hwmod_irq_info omap2_rng_mpu_irqs[] = { - { .irq =52 }, + { .irq =52 +OMAP_INTC_START , }, { .irq =-1 } };
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +3 -3
@@ -2165,7 +2165,7 @@ static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = { };static struct omap_hwmod_irq_info omap3xxx_gpmc_irqs[] = { - { .irq =20 }, + { .irq =20 +OMAP_INTC_START , }, { .irq =-1 } };
@@ -2999,7 +2999,7 @@ static struct omap_mmu_dev_attr mmu_isp_dev_attr = {static struct omap_hwmod omap3xxx_mmu_isp_hwmod;static struct omap_hwmod_irq_info omap3xxx_mmu_isp_irqs[] = { - { .irq =24 }, + { .irq =24 +OMAP_INTC_START , }, { .irq =-1 } };
@@ -3041,7 +3041,7 @@ static struct omap_mmu_dev_attr mmu_iva_dev_attr = {static struct omap_hwmod omap3xxx_mmu_iva_hwmod;static struct omap_hwmod_irq_info omap3xxx_mmu_iva_irqs[] = { - { .irq =28 }, + { .irq =28 +OMAP_INTC_START , }, { .irq =-1 } };
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +1 -1
@@ -1637,7 +1637,7 @@ static struct omap_hwmod dra7xx_uart1_hwmod = { .class = &dra7xx_uart_hwmod_class, .clkdm_name = "l4per_clkdm", .main_clk = "uart1_gfclk_mux", - .flags = HWMOD_SWSUP_SIDLE_ACT, + .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS, .prcm = { .omap4 = { .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
arch/arm64/kernel/ptrace.c +18 -20
@@ -214,31 +214,29 @@ static int ptrace_hbp_fill_attr_ctrl(unsigned int note_type, {int err, len, type, disabled = !ctrl.enabled; -if (disabled) { - len =0 ; - type =HW_BREAKPOINT_EMPTY ; - }else { - err =arch_bp_generic_fields (ctrl, &len, &type); -if (err) -return err; - -switch (note_type) { -case NT_ARM_HW_BREAK : -if ((type &HW_BREAKPOINT_X ) != type) -return -EINVAL ; -break ; -case NT_ARM_HW_WATCH : -if ((type &HW_BREAKPOINT_RW ) != type) -return -EINVAL ; -break ; -default : + attr->disabled = disabled; +if (disabled) +return 0 ; + + err =arch_bp_generic_fields (ctrl, &len, &type); +if (err) +return err; + +switch (note_type) { +case NT_ARM_HW_BREAK : +if ((type &HW_BREAKPOINT_X ) != type)return -EINVAL ; - } +break ; +case NT_ARM_HW_WATCH : +if ((type &HW_BREAKPOINT_RW ) != type) +return -EINVAL ; +break ; +default : +return -EINVAL ; } attr->bp_len = len; attr->bp_type = type; - attr->disabled = disabled;return 0 ; }
arch/powerpc/include/asm/exception-64s.h +1 -1
@@ -265,7 +265,7 @@ do_kvm_##n: \subi r1,r1,INT_FRAME_SIZE ;/* alloc frame on kernel stack */ \ beq-1f ; \ld r1,PACAKSAVE (r13 );/* kernel stack to use */ \ -1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \ +1: cmpdi cr1,r1,-INT_FRAME_SIZE; /* check if r1 is in userspace */ \ blt+ cr1,3f ;/* abort if it is */ \li r1,(n);/* will be reloaded later */ \sth r1,PACA_TRAP_SAVE (r13 ); \
arch/powerpc/kernel/head_64.S +1 -0
@@ -467,6 +467,7 @@ _STATIC(__after_prom_start) mtctr r8 bctr +.balign 8 p_end: .llong _end - _stext 4: /* Now copy the rest of the kernel up to _end */
arch/powerpc/kvm/book3s_64_mmu_hv.c +5 -1
@@ -473,11 +473,14 @@ static int kvmppc_mmu_book3s_64_hv_xlate(struct kvm_vcpu *vcpu, gva_t eaddr, slb_v = vcpu->kvm->arch.vrma_slb_v; } +preempt_disable ();/* Find the HPTE in the hash table */ index =kvmppc_hv_find_lock_hpte (kvm, eaddr, slb_v,HPTE_V_VALID |HPTE_V_ABSENT ); -if (index <0 ) +if (index <0 ) { +preempt_enable ();return -ENOENT ; + } hptep = (unsigned long *)(kvm->arch.hpt_virt + (index <<4 )); v = hptep[0 ] & ~HPTE_V_HVLOCK ; gr = kvm->arch.revmap[index].guest_rpte;
@@ -485,6 +488,7 @@ static int kvmppc_mmu_book3s_64_hv_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,/* Unlock the HPTE */ asmvolatile ("lwsync" : : :"memory" ); hptep[0 ] = v; +preempt_enable (); gpte->eaddr = eaddr; gpte->vpage = ((v &HPTE_V_AVPN ) <<4 ) | ((eaddr >>12 ) &0xfff );
arch/powerpc/kvm/book3s_hv_rm_mmu.c +4 -0
@@ -749,6 +749,10 @@ static int slb_base_page_shift[4] = { 20, /* 1M, unsupported */ }; +/* When called from virtmode, this func should be protected by +* preempt_disable(), otherwise, the holding of HPTE_V_HVLOCK +* can trigger deadlock issue. +*/ long kvmppc_hv_find_lock_hpte (struct kvm *kvm,gva_t eaddr,unsigned long slb_v,unsigned long valid) {
arch/sh/kernel/sh_ksyms_32.c +5 -0
@@ -20,6 +20,11 @@ EXPORT_SYMBOL(csum_partial_copy_generic);EXPORT_SYMBOL (copy_page);EXPORT_SYMBOL (__clear_user);EXPORT_SYMBOL (empty_zero_page); +#ifdef CONFIG_FLATMEM +/* need in pfn_valid macro */ +EXPORT_SYMBOL (min_low_pfn); +EXPORT_SYMBOL (max_low_pfn); +#endif #define DECLARE_EXPORT (name) \ extern void name(void);EXPORT_SYMBOL(name)
arch/sh/lib/Makefile +1 -1
@@ -6,7 +6,7 @@ lib-y = delay.o memmove.o memchr.o \ checksum.o strlen.o div64.o div64-generic.o # Extracted from libgcc -lib-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \ +obj-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \ ashlsi3.o ashrsi3.o ashiftrt.o lshrsi3.o \ udiv_qrnnd.o
arch/sparc/include/asm/pgtable_64.h +2 -2
@@ -616,7 +616,7 @@ static inline unsigned long pte_present(pte_t pte) }#define pte_accessible pte_accessible -static inline unsigned long pte_accessible (pte_t a) +static inline unsigned long pte_accessible (struct mm_struct *mm,pte_t a) {return pte_val (a) & _PAGE_VALID; }
@@ -806,7 +806,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,* SUN4V NOTE: _PAGE_VALID is the same value in both the SUN4U * and SUN4V pte layout, so this inline test is fine. */ -if (likely (mm != &init_mm) &&pte_accessible (orig)) +if (likely (mm != &init_mm) &&pte_accessible (mm, orig))tlb_batch_add (mm, addr, ptep, orig, fullmm); }
arch/x86/include/asm/pgtable.h +9 -2
@@ -452,9 +452,16 @@ static inline int pte_present(pte_t a) }#define pte_accessible pte_accessible -static inline int pte_accessible (pte_t a) +static inline bool pte_accessible (struct mm_struct *mm,pte_t a) { -return pte_flags (a) & _PAGE_PRESENT; +if (pte_flags (a) & _PAGE_PRESENT) +return true; + +if ((pte_flags (a) & (_PAGE_PROTNONE | _PAGE_NUMA)) && +mm_tlb_flush_pending (mm)) +return true; + +return false; }static inline int pte_hidden (pte_t pte)
arch/x86/kernel/cpu/intel.c +2 -1
@@ -387,7 +387,8 @@ static void init_intel(struct cpuinfo_x86 *c)set_cpu_cap (c,X86_FEATURE_PEBS ); } -if (c->x86 ==6 && c->x86_model ==29 && cpu_has_clflush) +if (c->x86 ==6 && cpu_has_clflush && + (c->x86_model ==29 || c->x86_model ==46 || c->x86_model ==47 ))set_cpu_cap (c,X86_FEATURE_CLFLUSH_MONITOR );#ifdef CONFIG_X86_64
arch/x86/kvm/lapic.c +4 -4
@@ -1350,6 +1350,10 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)return ; } +if (!kvm_vcpu_is_bsp (apic->vcpu)) + value &= ~MSR_IA32_APICBASE_BSP ; + vcpu->arch.apic_base = value; +/* update jump label if enable bit changes */ if ((vcpu->arch.apic_base ^ value) &MSR_IA32_APICBASE_ENABLE ) {if (value &MSR_IA32_APICBASE_ENABLE )
@@ -1359,10 +1363,6 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)recalculate_apic_map (vcpu->kvm); } -if (!kvm_vcpu_is_bsp (apic->vcpu)) - value &= ~MSR_IA32_APICBASE_BSP ; - - vcpu->arch.apic_base = value;if ((old_value ^ value) &X2APIC_ENABLE ) {if (value &X2APIC_ENABLE ) {u32 id =kvm_apic_id (apic);
arch/x86/kvm/vmx.c +1 -2
@@ -8218,8 +8218,7 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu, vcpu->arch.cr4_guest_owned_bits = ~vmcs_readl (CR4_GUEST_HOST_MASK );kvm_set_cr4 (vcpu, vmcs12->host_cr4); -if (nested_cpu_has_ept (vmcs12)) -nested_ept_uninit_mmu_context (vcpu); +nested_ept_uninit_mmu_context (vcpu);kvm_set_cr3 (vcpu, vmcs12->host_cr3);kvm_mmu_reset_context (vcpu);
arch/x86/mm/gup.c +13 -0
@@ -83,6 +83,12 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,pte_t pte =gup_get_pte (ptep);struct page *page; +/* Similar to the PMD case, NUMA hinting must take slow path */ +if (pte_numa (pte)) { +pte_unmap (ptep); +return 0 ; + } +if ((pte_flags (pte) & (mask | _PAGE_SPECIAL)) != mask) {pte_unmap (ptep);return 0 ;
@@ -167,6 +173,13 @@ 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))) { +/* +* NUMA hinting faults need to be handled in the GUP +* slowpath for accounting purposes and so that they +* can be serialised against THP migration. +*/ +if (pmd_numa (pmd)) +return 0 ;if (!gup_huge_pmd (pmd, addr, next, write, pages, nr))return 0 ; }else {
drivers/acpi/acpi_lpss.c +1 -0
@@ -156,6 +156,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = { { "80860F14", (unsigned long)&byt_sdio_dev_desc }, { "80860F41", (unsigned long)&byt_i2c_dev_desc }, { "INT33B2", }, + { "INT33FC", }, { } };
drivers/acpi/bus.c +10 -0
@@ -156,6 +156,16 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data) }EXPORT_SYMBOL (acpi_bus_get_private_data); +void acpi_bus_no_hotplug (acpi_handle handle) +{ +struct acpi_device *adev =NULL ; + +acpi_bus_get_device (handle, &adev); +if (adev) + adev->flags.no_hotplug = true; +} +EXPORT_SYMBOL_GPL (acpi_bus_no_hotplug); +static void acpi_print_osc_error (acpi_handle handle,struct acpi_osc_context *context,char *error) {
drivers/ata/ahci_imx.c +2 -1
@@ -60,7 +60,7 @@ static int imx6q_sata_init(struct device *dev, void __iomem *mmio)/* * set PHY Paremeters, two steps to configure the GPR13, * one write for rest of parameters, mask of first write -* is 0x07fffffd, and the other one write for setting +* is 0x07ffffff, and the other one write for setting * the mpll_clk_en. */ regmap_update_bits(imxpriv->gpr, 0x34, IMX6Q_GPR13_SATA_RX_EQ_VAL_MASK
@@ -71,6 +71,7 @@ static int imx6q_sata_init(struct device *dev, void __iomem *mmio) | IMX6Q_GPR13_SATA_TX_ATTEN_MASK |IMX6Q_GPR13_SATA_TX_BOOST_MASK |IMX6Q_GPR13_SATA_TX_LVL_MASK + |IMX6Q_GPR13_SATA_MPLL_CLK_EN |IMX6Q_GPR13_SATA_TX_EDGE_RATE ,IMX6Q_GPR13_SATA_RX_EQ_VAL_3_0_DB |IMX6Q_GPR13_SATA_RX_LOS_LVL_SATA2M
drivers/ata/libata-core.c +17 -2
@@ -2149,9 +2149,16 @@ static int ata_dev_config_ncq(struct ata_device *dev,"failed to get NCQ Send/Recv Log Emask 0x%x\n" , err_mask); }else { +u8 *cmds = dev->ncq_send_recv_cmds; + dev->flags |=ATA_DFLAG_NCQ_SEND_RECV ; -memcpy (dev->ncq_send_recv_cmds, ap->sector_buf, -ATA_LOG_NCQ_SEND_RECV_SIZE ); +memcpy (cmds, ap->sector_buf,ATA_LOG_NCQ_SEND_RECV_SIZE ); + +if (dev->horkage &ATA_HORKAGE_NO_NCQ_TRIM ) { +ata_dev_dbg (dev,"disabling queued TRIM support\n" ); + cmds[ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET ] &= + ~ATA_LOG_NCQ_SEND_RECV_DSM_TRIM ; + } } }
@@ -4156,6 +4163,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { {"ST3320[68]13AS" ,"SD1[5-9]" ,ATA_HORKAGE_NONCQ | ATA_HORKAGE_FIRMWARE_WARN }, +/* Seagate Momentus SpinPoint M8 seem to have FPMDA_AA issues */ + { "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA }, +/* Blacklist entries taken from Silicon Image 3124/3132 Windows driver .inf file - also several Linux problem reports */ { "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, },
@@ -4202,6 +4212,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER }, { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER }, +/* devices that don't properly handle queued TRIM commands */ + { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, + { "Crucial_CT???M500SSD1", NULL, ATA_HORKAGE_NO_NCQ_TRIM, }, + /* End Marker */ { } };
@@ -6520,6 +6534,7 @@ static int __init ata_parse_force_one(char **cur, { "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST }, { "rstonce", .lflags = ATA_LFLAG_RST_ONCE }, { "atapi_dmadir", .horkage_on = ATA_HORKAGE_ATAPI_DMADIR }, + { "disable", .horkage_on = ATA_HORKAGE_DISABLE }, };char *start = *cur, *p = *cur;char *id, *val, *endp;
drivers/ata/libata-scsi.c +21 -0
@@ -3872,6 +3872,27 @@ void ata_scsi_hotplug(struct work_struct *work)return ; } +/* +* XXX - UGLY HACK +* +* The block layer suspend/resume path is fundamentally broken due +* to freezable kthreads and workqueue and may deadlock if a block +* device gets removed while resume is in progress. I don't know +* what the solution is short of removing freezable kthreads and +* workqueues altogether. +* +* The following is an ugly hack to avoid kicking off device +* removal while freezer is active. This is a joke but does avoid +* this particular deadlock scenario. +* +* https://bugzilla.kernel.org/show_bug.cgi?id=62801 +* http://marc.info/?l=linux-kernel&m=138695698516487 +*/ +#ifdef CONFIG_FREEZER +while (pm_freezing) +msleep (10 ); +#endif +DPRINTK ("ENTER\n" );mutex_lock (&ap->scsi_scan_mutex);
drivers/clocksource/dw_apb_timer_of.c +4 -3
@@ -108,12 +108,11 @@ static void add_clocksource(struct device_node *source_timer)static u32 read_sched_clock (void ) { -return __raw_readl (sched_io_base); +return ~__raw_readl (sched_io_base); }static const struct of_device_id sptimer_ids[]__initconst = { { .compatible ="picochip,pc3x2-rtc" }, - { .compatible ="snps,dw-apb-timer-sp" }, {/* Sentinel */ }, };
@@ -153,4 +152,6 @@ static void __init dw_apb_timer_init(struct device_node *timer) num_called++; }CLOCKSOURCE_OF_DECLARE (pc3x2_timer,"picochip,pc3x2-timer" , dw_apb_timer_init); -CLOCKSOURCE_OF_DECLARE (apb_timer,"snps,dw-apb-timer-osc" , dw_apb_timer_init); +CLOCKSOURCE_OF_DECLARE (apb_timer_osc,"snps,dw-apb-timer-osc" , dw_apb_timer_init); +CLOCKSOURCE_OF_DECLARE (apb_timer_sp,"snps,dw-apb-timer-sp" , dw_apb_timer_init); +CLOCKSOURCE_OF_DECLARE (apb_timer,"snps,dw-apb-timer" , dw_apb_timer_init);
drivers/cpufreq/intel_pstate.c +5 -0
@@ -550,6 +550,11 @@ static int intel_pstate_init_cpu(unsigned int cpunum) cpu = all_cpu_data[cpunum];intel_pstate_get_cpu_pstates (cpu); +if (!cpu->pstate.current_pstate) { + all_cpu_data[cpunum] =NULL ; +kfree (cpu); +return -ENODATA ; + } cpu->cpu = cpunum; cpu->pstate_policy =
drivers/dma/Kconfig +1 -0
@@ -339,6 +339,7 @@ config NET_DMA bool "Network: TCP receive copy offload" depends on DMA_ENGINE && NET default (INTEL_IOATDMA || FSL_DMA) + depends on BROKEN help This enables the use of DMA engines in the network stack to offload receive copy-to-user operations, freeing CPU cycles.
drivers/firewire/sbp2.c +0 -1
@@ -1623,7 +1623,6 @@ static struct scsi_host_template scsi_driver_template = { .cmd_per_lun = 1, .can_queue = 1, .sdev_attrs = sbp2_scsi_sysfs_attrs, - .no_write_same = 1, };MODULE_AUTHOR ("Kristian Hoegsberg <[email protected]>" );
drivers/gpio/gpio-msm-v2.c +2 -2
@@ -252,7 +252,7 @@ static void msm_gpio_irq_mask(struct irq_data *d)spin_lock_irqsave (&tlmm_lock, irq_flags);writel (TARGET_PROC_NONE ,GPIO_INTR_CFG_SU (gpio)); -clear_gpio_bits (INTR_RAW_STATUS_EN |INTR_ENABLE ,GPIO_INTR_CFG (gpio)); +clear_gpio_bits (BIT (INTR_RAW_STATUS_EN ) |BIT (INTR_ENABLE ),GPIO_INTR_CFG (gpio));__clear_bit (gpio, msm_gpio.enabled_irqs);spin_unlock_irqrestore (&tlmm_lock, irq_flags); }
@@ -264,7 +264,7 @@ static void msm_gpio_irq_unmask(struct irq_data *d)spin_lock_irqsave (&tlmm_lock, irq_flags);__set_bit (gpio, msm_gpio.enabled_irqs); -set_gpio_bits (INTR_RAW_STATUS_EN |INTR_ENABLE ,GPIO_INTR_CFG (gpio)); +set_gpio_bits (BIT (INTR_RAW_STATUS_EN ) |BIT (INTR_ENABLE ),GPIO_INTR_CFG (gpio));writel (TARGET_PROC_SCORPION ,GPIO_INTR_CFG_SU (gpio));spin_unlock_irqrestore (&tlmm_lock, irq_flags); }
drivers/gpio/gpio-twl4030.c +12 -3
@@ -300,7 +300,7 @@ static int twl_direction_in(struct gpio_chip *chip, unsigned offset)if (offset <TWL4030_GPIO_MAX ) ret =twl4030_set_gpio_direction (offset,1 );else - ret = -EINVAL ; + ret = -EINVAL ;/* LED outputs can't be set as input */ if (!ret) priv->direction &= ~BIT (offset);
@@ -354,11 +354,20 @@ static void twl_set(struct gpio_chip *chip, unsigned offset, int value)static int twl_direction_out (struct gpio_chip *chip,unsigned offset,int value) {struct gpio_twl4030_priv *priv =to_gpio_twl4030 (chip); -int ret = -EINVAL ; +int ret =0 ;mutex_lock (&priv->mutex); -if (offset <TWL4030_GPIO_MAX ) +if (offset <TWL4030_GPIO_MAX ) { ret =twl4030_set_gpio_direction (offset,0 ); +if (ret) { +mutex_unlock (&priv->mutex); +return ret; + } + } + +/* +* LED gpios i.e. offset >= TWL4030_GPIO_MAX are always output +*/ priv->direction |=BIT (offset);mutex_unlock (&priv->mutex);
drivers/gpu/drm/drm_edid.c +8 -0
@@ -68,6 +68,8 @@#define EDID_QUIRK_DETAILED_SYNC_PP (1 << 6)/* Force reduced-blanking timings for detailed modes */ #define EDID_QUIRK_FORCE_REDUCED_BLANKING (1 << 7) +/* Force 8bpc */ +#define EDID_QUIRK_FORCE_8BPC (1 << 8)struct detailed_mode_closure {struct drm_connector *connector;
@@ -128,6 +130,9 @@ static struct edid_quirk {/* Medion MD 30217 PG */ { "MED", 0x7b8, EDID_QUIRK_PREFER_LARGE_75 }, + +/* Panel in Samsung NP700G7A-S01PL notebook reports 6bpc */ + { "SEC", 0xd033, EDID_QUIRK_FORCE_8BPC }, };/*
@@ -3236,6 +3241,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)drm_add_display_info (edid, &connector->display_info); +if (quirks &EDID_QUIRK_FORCE_8BPC ) + connector->display_info.bpc =8 ; +return num_modes; }EXPORT_SYMBOL (drm_add_edid_modes);
drivers/gpu/drm/i915/i915_dma.c +10 -0
@@ -83,6 +83,14 @@ void i915_update_dri1_breadcrumb(struct drm_device *dev)drm_i915_private_t *dev_priv = dev->dev_private;struct drm_i915_master_private *master_priv; +/* +* The dri breadcrumb update races against the drm master disappearing. +* Instead of trying to fix this (this is by far not the only ums issue) +* just don't do the update in kms mode. +*/ +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return ; +if (dev->primary->master) { master_priv = dev->primary->master->driver_priv;if (master_priv->sarea_priv)
@@ -1848,8 +1856,10 @@ void i915_driver_lastclose(struct drm_device * dev)void i915_driver_preclose (struct drm_device * dev,struct drm_file *file_priv) { +mutex_lock (&dev->struct_mutex);i915_gem_context_close (dev, file_priv);i915_gem_release (dev, file_priv); +mutex_unlock (&dev->struct_mutex); }void i915_driver_postclose (struct drm_device *dev,struct drm_file *file)
drivers/gpu/drm/i915/i915_gem.c +24 -10
@@ -2278,15 +2278,24 @@ static void i915_gem_free_request(struct drm_i915_gem_request *request)kfree (request); } -static void i915_gem_reset_ring_lists (struct drm_i915_private *dev_priv, -struct intel_ring_buffer *ring) +static void i915_gem_reset_ring_status (struct drm_i915_private *dev_priv, +struct intel_ring_buffer *ring) { -u32 completed_seqno; -u32 acthd; +u32 completed_seqno = ring->get_seqno (ring, false); +u32 acthd =intel_ring_get_active_head (ring); +struct drm_i915_gem_request *request; + +list_for_each_entry (request, &ring->request_list, list) { +if (i915_seqno_passed (completed_seqno, request->seqno)) +continue ; - acthd =intel_ring_get_active_head (ring); - completed_seqno = ring->get_seqno (ring, false); +i915_set_reset_status (ring, request, acthd); + } +} +static void i915_gem_reset_ring_cleanup (struct drm_i915_private *dev_priv, +struct intel_ring_buffer *ring) +{while (!list_empty (&ring->request_list)) {struct drm_i915_gem_request *request;
@@ -2294,9 +2303,6 @@ static void i915_gem_reset_ring_lists(struct drm_i915_private *dev_priv, struct drm_i915_gem_request, list); -if (request->seqno > completed_seqno) -i915_set_reset_status (ring, request, acthd); -i915_gem_free_request (request); }
@@ -2338,8 +2344,16 @@ void i915_gem_reset(struct drm_device *dev)struct intel_ring_buffer *ring;int i; +/* +* Before we free the objects from the requests, we need to inspect +* them for finding the guilty party. As the requests only borrow +* their reference to the objects, the inspection must be done first. +*/ +for_each_ring (ring, dev_priv, i) +i915_gem_reset_ring_status (dev_priv, ring); +for_each_ring (ring, dev_priv, i) -i915_gem_reset_ring_lists (dev_priv, ring); +i915_gem_reset_ring_cleanup (dev_priv, ring);i915_gem_restore_fences (dev); }
drivers/gpu/drm/i915/i915_gem_context.c +12 -4
@@ -328,10 +328,8 @@ void i915_gem_context_close(struct drm_device *dev, struct drm_file *file) {struct drm_i915_file_private *file_priv = file->driver_priv; -mutex_lock (&dev->struct_mutex);idr_for_each (&file_priv->context_idr, context_idr_cleanup,NULL );idr_destroy (&file_priv->context_idr); -mutex_unlock (&dev->struct_mutex); } static struct i915_hw_context *
@@ -404,11 +402,21 @@ static int do_switch(struct i915_hw_context *to)if (ret)return ret; -/* Clear this page out of any CPU caches for coherent swap-in/out. Note +/* +* Pin can switch back to the default context if we end up calling into +* evict_everything - as a last ditch gtt defrag effort that also +* switches to the default context. Hence we need to reload from here. +*/ + from = ring->last_context; + +/* +* Clear this page out of any CPU caches for coherent swap-in/out. Note * that thanks to write = false in this call and us not setting any gpu * write domains when putting a context object onto the active list * (when switching away from it), this won't block. -* XXX: We need a real interface to do this instead of trickery. */ +* +* XXX: We need a real interface to do this instead of trickery. +*/ ret =i915_gem_object_set_to_gtt_domain (to->obj, false);if (ret) {i915_gem_object_unpin (to->obj);
drivers/gpu/drm/i915/intel_display.c +6 -3
@@ -6009,7 +6009,7 @@ static void assert_can_disable_lcpll(struct drm_i915_private *dev_priv)uint32_t val;list_for_each_entry (crtc, &dev->mode_config.crtc_list, base.head) -WARN (crtc->base.enabled,"CRTC for pipe %c enabled\n" , +WARN (crtc->active,"CRTC for pipe %c enabled\n" ,pipe_name (crtc->pipe));WARN (I915_READ (HSW_PWR_WELL_DRIVER ),"Power well on\n" );
@@ -10592,7 +10592,9 @@ void intel_modeset_gem_init(struct drm_device *dev)intel_setup_overlay (dev); +drm_modeset_lock_all (dev);intel_modeset_setup_hw_state (dev, false); +drm_modeset_unlock_all (dev); }void intel_modeset_cleanup (struct drm_device *dev)
@@ -10666,14 +10668,15 @@ void intel_connector_attach_encoder(struct intel_connector *connector,int intel_modeset_vga_set_state (struct drm_device *dev,bool state) {struct drm_i915_private *dev_priv = dev->dev_private; +unsigned reg =INTEL_INFO (dev)->gen >=6 ?SNB_GMCH_CTRL :INTEL_GMCH_CTRL ;u16 gmch_ctrl; -pci_read_config_word (dev_priv->bridge_dev,INTEL_GMCH_CTRL , &gmch_ctrl); +pci_read_config_word (dev_priv->bridge_dev, reg, &gmch_ctrl);if (state) gmch_ctrl &= ~INTEL_GMCH_VGA_DISABLE ;else gmch_ctrl |=INTEL_GMCH_VGA_DISABLE ; -pci_write_config_word (dev_priv->bridge_dev,INTEL_GMCH_CTRL , gmch_ctrl); +pci_write_config_word (dev_priv->bridge_dev, reg, gmch_ctrl);return 0 ; }
drivers/gpu/drm/nouveau/nouveau_acpi.c +14 -5
@@ -51,6 +51,7 @@ static struct nouveau_dsm_priv {bool dsm_detected;bool optimus_detected;acpi_handle dhandle; +acpi_handle other_handle;acpi_handle rom_handle; } nouveau_dsm_priv;
@@ -253,19 +254,17 @@ static struct vga_switcheroo_handler nouveau_dsm_handler = {static int nouveau_dsm_pci_probe (struct pci_dev *pdev) { -acpi_handle dhandle, nvidia_handle; -acpi_status status; +acpi_handle dhandle;int retval =0 ; dhandle =DEVICE_ACPI_HANDLE (&pdev->dev);if (!dhandle)return false; - status =acpi_get_handle (dhandle,"_DSM" , &nvidia_handle); -if (ACPI_FAILURE (status)) { +if (!acpi_has_method (dhandle,"_DSM" )) { + nouveau_dsm_priv.other_handle = dhandle;return false; } -if (nouveau_test_dsm (dhandle, nouveau_dsm,NOUVEAU_DSM_POWER )) retval |=NOUVEAU_DSM_HAS_MUX ;
@@ -331,6 +330,16 @@ static bool nouveau_dsm_detect(void)printk (KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n" , acpi_method_name); nouveau_dsm_priv.dsm_detected = true; +/* +* On some systems hotplug events are generated for the device +* being switched off when _DSM is executed. They cause ACPI +* hotplug to trigger and attempt to remove the device from +* the system, which causes it to break down. Prevent that from +* happening by setting the no_hotplug flag for the involved +* ACPI device objects. +*/ +acpi_bus_no_hotplug (nouveau_dsm_priv.dhandle); +acpi_bus_no_hotplug (nouveau_dsm_priv.other_handle); ret = true; }
drivers/gpu/drm/nouveau/nouveau_drm.c +6 -0
@@ -879,6 +879,12 @@ static int nouveau_pmops_runtime_suspend(struct device *dev)if (nouveau_runtime_pm ==0 )return -EINVAL ; +/* are we optimus enabled? */ +if (nouveau_runtime_pm ==-1 && !nouveau_is_optimus () && !nouveau_is_v1_dsm ()) { +DRM_DEBUG_DRIVER ("failing to power off - not optimus\n" ); +return -EINVAL ; + } +drm_kms_helper_poll_disable (drm_dev);vga_switcheroo_set_dynamic_switch (pdev,VGA_SWITCHEROO_OFF );nouveau_switcheroo_optimus_dsm ();
drivers/gpu/drm/radeon/atombios_crtc.c +9 -14
@@ -1180,23 +1180,18 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, fb_format |=EVERGREEN_GRPH_ARRAY_MODE (EVERGREEN_GRPH_ARRAY_1D_TILED_THIN1 );if (rdev->family >=CHIP_BONAIRE ) { -u32 num_pipe_configs = rdev->config.cik.max_tile_pipes; -u32 num_rb = rdev->config.cik.max_backends_per_se; -if (num_pipe_configs >8 ) - num_pipe_configs =8 ; -if (num_pipe_configs ==8 ) - fb_format |=CIK_GRPH_PIPE_CONFIG (CIK_ADDR_SURF_P8_32x32_16x16); -else if (num_pipe_configs ==4 ) { -if (num_rb ==4 ) - fb_format |=CIK_GRPH_PIPE_CONFIG (CIK_ADDR_SURF_P4_16x16); -else if (num_rb <4 ) - fb_format |=CIK_GRPH_PIPE_CONFIG (CIK_ADDR_SURF_P4_8x16); - }else if (num_pipe_configs ==2 ) - fb_format |=CIK_GRPH_PIPE_CONFIG (CIK_ADDR_SURF_P2 ); +/* Read the pipe config from the 2D TILED SCANOUT mode. +* It should be the same for the other modes too, but not all +* modes set the pipe config field. */ +u32 pipe_config = (rdev->config.cik.tile_mode_array[10 ] >>6 ) &0x1f ; + + fb_format |=CIK_GRPH_PIPE_CONFIG (pipe_config); }else if ((rdev->family ==CHIP_TAHITI ) || (rdev->family ==CHIP_PITCAIRN )) fb_format |=SI_GRPH_PIPE_CONFIG (SI_ADDR_SURF_P8_32x32_8x16); -else if (rdev->family ==CHIP_VERDE ) +else if ((rdev->family ==CHIP_VERDE ) || + (rdev->family ==CHIP_OLAND ) || + (rdev->family ==CHIP_HAINAN ))/* for completeness. HAINAN has no display hw */ fb_format |=SI_GRPH_PIPE_CONFIG (SI_ADDR_SURF_P4_8x16);switch (radeon_crtc->crtc_id) {
drivers/gpu/drm/radeon/cik.c +7 -5
@@ -2608,7 +2608,7 @@ static u32 cik_create_bitmask(u32 bit_width)* Returns the disabled RB bitmask. */ static u32 cik_get_rb_disabled (struct radeon_device *rdev, -u32 max_rb_num,u32 se_num, +u32 max_rb_num_per_se,u32 sh_per_se) {u32 data, mask;
@@ -2622,7 +2622,7 @@ static u32 cik_get_rb_disabled(struct radeon_device *rdev, data >>=BACKEND_DISABLE_SHIFT ; - mask =cik_create_bitmask (max_rb_num / se_num / sh_per_se); + mask =cik_create_bitmask (max_rb_num_per_se / sh_per_se);return data & mask; }
@@ -2639,7 +2639,7 @@ static u32 cik_get_rb_disabled(struct radeon_device *rdev,*/ static void cik_setup_rb (struct radeon_device *rdev,u32 se_num,u32 sh_per_se, -u32 max_rb_num) +u32 max_rb_num_per_se) {int i, j;u32 data, mask;
@@ -2649,19 +2649,21 @@ static void cik_setup_rb(struct radeon_device *rdev,for (i =0 ; i < se_num; i++) {for (j =0 ; j < sh_per_se; j++) {cik_select_se_sh (rdev, i, j); - data =cik_get_rb_disabled (rdev, max_rb_num, se_num, sh_per_se); + data =cik_get_rb_disabled (rdev, max_rb_num_per_se, sh_per_se); disabled_rbs |= data << ((i * sh_per_se + j) *CIK_RB_BITMAP_WIDTH_PER_SH ); } }cik_select_se_sh (rdev,0xffffffff ,0xffffffff ); mask =1 ; -for (i =0 ; i < max_rb_num; i++) { +for (i =0 ; i < max_rb_num_per_se * se_num; i++) {if (!(disabled_rbs & mask)) enabled_rbs |= mask; mask <<=1 ; } + rdev->config.cik.backend_enable_mask = enabled_rbs; +for (i =0 ; i < se_num; i++) {cik_select_se_sh (rdev, i,0xffffffff ); data =0 ;
drivers/gpu/drm/radeon/cik_sdma.c +1 -1
@@ -468,7 +468,7 @@ int cik_copy_dma(struct radeon_device *rdev,radeon_ring_write (ring,0 );/* src/dst endian swap */ radeon_ring_write (ring, src_offset &0xffffffff );radeon_ring_write (ring,upper_32_bits (src_offset) &0xffffffff ); -radeon_ring_write (ring, dst_offset &0xfffffffc ); +radeon_ring_write (ring, dst_offset &0xffffffff );radeon_ring_write (ring,upper_32_bits (dst_offset) &0xffffffff ); src_offset += cur_size_in_bytes; dst_offset += cur_size_in_bytes;
drivers/gpu/drm/radeon/dce6_afmt.c +2 -2
@@ -132,7 +132,7 @@ void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder) } sad_count =drm_edid_to_speaker_allocation (radeon_connector->edid, &sadb); -if (sad_count <0 ) { +if (sad_count <=0 ) {DRM_ERROR ("Couldn't read Speaker Allocation Data Block: %d\n" , sad_count);return ; }
@@ -193,7 +193,7 @@ void dce6_afmt_write_sad_regs(struct drm_encoder *encoder) } sad_count =drm_edid_to_sad (radeon_connector->edid, &sads); -if (sad_count <0 ) { +if (sad_count <=0 ) {DRM_ERROR ("Couldn't read SADs: %d\n" , sad_count);return ; }
drivers/gpu/drm/radeon/evergreen_hdmi.c +2 -2
@@ -81,7 +81,7 @@ static void dce4_afmt_write_speaker_allocation(struct drm_encoder *encoder) } sad_count =drm_edid_to_speaker_allocation (radeon_connector->edid, &sadb); -if (sad_count <0 ) { +if (sad_count <=0 ) {DRM_ERROR ("Couldn't read Speaker Allocation Data Block: %d\n" , sad_count);return ; }
@@ -134,7 +134,7 @@ static void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder) } sad_count =drm_edid_to_sad (radeon_connector->edid, &sads); -if (sad_count <0 ) { +if (sad_count <=0 ) {DRM_ERROR ("Couldn't read SADs: %d\n" , sad_count);return ; }
drivers/gpu/drm/radeon/ni.c +16 -4
@@ -900,6 +900,10 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device == 0x999C)) { rdev->config.cayman.max_simds_per_se =6 ; rdev->config.cayman.max_backends_per_se =2 ; + rdev->config.cayman.max_hw_contexts =8 ; + rdev->config.cayman.sx_max_export_size =256 ; + rdev->config.cayman.sx_max_export_pos_size =64 ; + rdev->config.cayman.sx_max_export_smx_size =192 ; } else if ((rdev->pdev->device == 0x9903) || (rdev->pdev->device == 0x9904) || (rdev->pdev->device == 0x990A) ||
@@ -910,6 +914,10 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device == 0x999D)) { rdev->config.cayman.max_simds_per_se =4 ; rdev->config.cayman.max_backends_per_se =2 ; + rdev->config.cayman.max_hw_contexts =8 ; + rdev->config.cayman.sx_max_export_size =256 ; + rdev->config.cayman.sx_max_export_pos_size =64 ; + rdev->config.cayman.sx_max_export_smx_size =192 ; } else if ((rdev->pdev->device == 0x9919) || (rdev->pdev->device == 0x9990) || (rdev->pdev->device == 0x9991) ||
@@ -920,9 +928,17 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device == 0x99A0)) { rdev->config.cayman.max_simds_per_se =3 ; rdev->config.cayman.max_backends_per_se =1 ; + rdev->config.cayman.max_hw_contexts =4 ; + rdev->config.cayman.sx_max_export_size =128 ; + rdev->config.cayman.sx_max_export_pos_size =32 ; + rdev->config.cayman.sx_max_export_smx_size =96 ; } else { rdev->config.cayman.max_simds_per_se =2 ; rdev->config.cayman.max_backends_per_se =1 ; + rdev->config.cayman.max_hw_contexts =4 ; + rdev->config.cayman.sx_max_export_size =128 ; + rdev->config.cayman.sx_max_export_pos_size =32 ; + rdev->config.cayman.sx_max_export_smx_size =96 ; } rdev->config.cayman.max_texture_channel_caches =2 ; rdev->config.cayman.max_gprs =256 ;
@@ -930,10 +946,6 @@ static void cayman_gpu_init(struct radeon_device *rdev) rdev->config.cayman.max_gs_threads =32 ; rdev->config.cayman.max_stack_entries =512 ; rdev->config.cayman.sx_num_of_sets =8 ; - rdev->config.cayman.sx_max_export_size =256 ; - rdev->config.cayman.sx_max_export_pos_size =64 ; - rdev->config.cayman.sx_max_export_smx_size =192 ; - rdev->config.cayman.max_hw_contexts =8 ; rdev->config.cayman.sq_num_cf_insts =2 ; rdev->config.cayman.sc_prim_fifo_size =0x40 ;
drivers/gpu/drm/radeon/radeon.h +2 -2
@@ -1930,7 +1930,7 @@ struct si_asic {unsigned sc_earlyz_tile_fifo_size;unsigned num_tile_pipes; -unsigned num_backends_per_se; +unsigned backend_enable_mask;unsigned backend_disable_mask_per_asic;unsigned backend_map;unsigned num_texture_channel_caches;
@@ -1960,7 +1960,7 @@ struct cik_asic {unsigned sc_earlyz_tile_fifo_size;unsigned num_tile_pipes; -unsigned num_backends_per_se; +unsigned backend_enable_mask;unsigned backend_disable_mask_per_asic;unsigned backend_map;unsigned num_texture_channel_caches;
drivers/gpu/drm/radeon/radeon_atpx_handler.c +14 -2
@@ -34,6 +34,7 @@ static struct radeon_atpx_priv {bool atpx_detected;/* handle for device - and atpx */ acpi_handle dhandle; +acpi_handle other_handle;struct radeon_atpx atpx; } radeon_atpx_priv;
@@ -448,9 +449,10 @@ static bool radeon_atpx_pci_probe_handle(struct pci_dev *pdev)return false; status =acpi_get_handle (dhandle,"ATPX" , &atpx_handle); -if (ACPI_FAILURE (status)) +if (ACPI_FAILURE (status)) { + radeon_atpx_priv.other_handle = dhandle;return false; - + } radeon_atpx_priv.dhandle = dhandle; radeon_atpx_priv.atpx.handle = atpx_handle;return true;
@@ -527,6 +529,16 @@ static bool radeon_atpx_detect(void)printk (KERN_INFO "VGA switcheroo: detected switching method %s handle\n" , acpi_method_name); radeon_atpx_priv.atpx_detected = true; +/* +* On some systems hotplug events are generated for the device +* being switched off when ATPX is executed. They cause ACPI +* hotplug to trigger and attempt to remove the device from +* the system, which causes it to break down. Prevent that from +* happening by setting the no_hotplug flag for the involved +* ACPI device objects. +*/ +acpi_bus_no_hotplug (radeon_atpx_priv.dhandle); +acpi_bus_no_hotplug (radeon_atpx_priv.other_handle);return true; }return false;
drivers/gpu/drm/radeon/radeon_kms.c +9 -0
@@ -436,6 +436,15 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)case RADEON_INFO_SI_CP_DMA_COMPUTE : *value =1 ;break ; +case RADEON_INFO_SI_BACKEND_ENABLED_MASK : +if (rdev->family >=CHIP_BONAIRE ) { + *value = rdev->config.cik.backend_enable_mask; + }else if (rdev->family >=CHIP_TAHITI ) { + *value = rdev->config.si.backend_enable_mask; + }else { +DRM_DEBUG_KMS ("BACKEND_ENABLED_MASK is si+ only!\n" ); + } +break ;default :DRM_DEBUG_KMS ("Invalid request %d\n" , info->request);return -EINVAL ;
drivers/gpu/drm/radeon/radeon_uvd.c +1 -1
@@ -472,7 +472,7 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,return -EINVAL ; } -if ((start >>28 ) != (end >>28 )) { +if ((start >>28 ) != ((end -1 ) >>28 )) {DRM_ERROR ("reloc %LX-%LX crossing 256MB boundary!\n" , start, end);return -EINVAL ;
drivers/gpu/drm/radeon/rs690.c +10 -0
@@ -162,6 +162,16 @@ static void rs690_mc_init(struct radeon_device *rdev) base =RREG32_MC (R_000100_MCCFG_FB_LOCATION ); base =G_000100_MC_FB_START (base) <<16 ; rdev->mc.igp_sideport_enabled =radeon_atombios_sideport_present (rdev); +/* Some boards seem to be configured for 128MB of sideport memory, +* but really only have 64MB. Just skip the sideport and use +* UMA memory. +*/ +if (rdev->mc.igp_sideport_enabled && + (rdev->mc.real_vram_size == (384 *1024 *1024 ))) { + base +=128 *1024 *1024 ; + rdev->mc.real_vram_size -=128 *1024 *1024 ; + rdev->mc.mc_vram_size = rdev->mc.real_vram_size; + }/* Use K8 direct mapping for fast fb access. */ rdev->fastfb_working = false;
drivers/gpu/drm/radeon/rv770_dpm.c +6 -0
@@ -2328,6 +2328,12 @@ void rv770_get_engine_memory_ss(struct radeon_device *rdev) pi->mclk_ss =radeon_atombios_get_asic_ss_info (rdev, &ss,ASIC_INTERNAL_MEMORY_SS ,0 ); +/* disable ss, causes hangs on some cayman boards */ +if (rdev->family ==CHIP_CAYMAN ) { + pi->sclk_ss = false; + pi->mclk_ss = false; + } +if (pi->sclk_ss || pi->mclk_ss) pi->dynamic_ss = true;else
drivers/gpu/drm/radeon/si.c +7 -5
@@ -2816,7 +2816,7 @@ static void si_setup_spi(struct radeon_device *rdev, }static u32 si_get_rb_disabled (struct radeon_device *rdev, -u32 max_rb_num,u32 se_num, +u32 max_rb_num_per_se,u32 sh_per_se) {u32 data, mask;
@@ -2830,14 +2830,14 @@ static u32 si_get_rb_disabled(struct radeon_device *rdev, data >>=BACKEND_DISABLE_SHIFT ; - mask =si_create_bitmask (max_rb_num / se_num / sh_per_se); + mask =si_create_bitmask (max_rb_num_per_se / sh_per_se);return data & mask; }static void si_setup_rb (struct radeon_device *rdev,u32 se_num,u32 sh_per_se, -u32 max_rb_num) +u32 max_rb_num_per_se) {int i, j;u32 data, mask;
@@ -2847,19 +2847,21 @@ static void si_setup_rb(struct radeon_device *rdev,for (i =0 ; i < se_num; i++) {for (j =0 ; j < sh_per_se; j++) {si_select_se_sh (rdev, i, j); - data =si_get_rb_disabled (rdev, max_rb_num, se_num, sh_per_se); + data =si_get_rb_disabled (rdev, max_rb_num_per_se, sh_per_se); disabled_rbs |= data << ((i * sh_per_se + j) *TAHITI_RB_BITMAP_WIDTH_PER_SH ); } }si_select_se_sh (rdev,0xffffffff ,0xffffffff ); mask =1 ; -for (i =0 ; i < max_rb_num; i++) { +for (i =0 ; i < max_rb_num_per_se * se_num; i++) {if (!(disabled_rbs & mask)) enabled_rbs |= mask; mask <<=1 ; } + rdev->config.si.backend_enable_mask = enabled_rbs; +for (i =0 ; i < se_num; i++) {si_select_se_sh (rdev, i,0xffffffff ); data =0 ;
drivers/gpu/drm/ttm/ttm_bo_vm.c +3 -3
@@ -116,9 +116,9 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) } page_offset = ((address - vma->vm_start) >>PAGE_SHIFT ) + -drm_vma_node_start (&bo->vma_node) - vma->vm_pgoff; - page_last =vma_pages (vma) + -drm_vma_node_start (&bo->vma_node) - vma->vm_pgoff; + vma->vm_pgoff -drm_vma_node_start (&bo->vma_node); + page_last =vma_pages (vma) + vma->vm_pgoff - +drm_vma_node_start (&bo->vma_node);if (unlikely (page_offset >= bo->num_pages)) { retval =VM_FAULT_SIGBUS ;
drivers/idle/intel_idle.c +3 -0
@@ -361,6 +361,9 @@ static int intel_idle(struct cpuidle_device *dev,if (!current_set_polling_and_test ()) { +if (this_cpu_has (X86_FEATURE_CLFLUSH_MONITOR )) +clflush ((void *)¤t_thread_info ()->flags); +__monitor ((void *)¤t_thread_info ()->flags,0 ,0 );smp_mb ();if (!need_resched ())
drivers/iio/adc/ad7887.c +14 -2
@@ -211,7 +211,13 @@ static const struct ad7887_chip_info ad7887_chip_info_tbl[] = { .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = 1, .scan_index = 1, - .scan_type = IIO_ST('u', 12, 16, 0), + .scan_type = { + .sign = 'u', + .realbits = 12, + .storagebits = 16, + .shift = 0, + .endianness =IIO_BE , + }, }, .channel[1] = { .type = IIO_VOLTAGE,
@@ -221,7 +227,13 @@ static const struct ad7887_chip_info ad7887_chip_info_tbl[] = { .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = 0, .scan_index = 0, - .scan_type = IIO_ST('u', 12, 16, 0), + .scan_type = { + .sign = 'u', + .realbits = 12, + .storagebits = 16, + .shift = 0, + .endianness =IIO_BE , + }, }, .channel[2] = IIO_CHAN_SOFT_TIMESTAMP(2), .int_vref_mv = 2500,
drivers/iio/imu/adis16400_core.c +6 -1
@@ -651,7 +651,12 @@ static const struct iio_chan_spec adis16448_channels[] = { .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = ADIS16448_BARO_OUT, .scan_index = ADIS16400_SCAN_BARO, - .scan_type =IIO_ST ('s' ,16 ,16 ,0 ), + .scan_type = { + .sign = 's', + .realbits = 16, + .storagebits = 16, + .endianness =IIO_BE , + }, },ADIS16400_TEMP_CHAN (ADIS16448_TEMP_OUT ,12 ),IIO_CHAN_SOFT_TIMESTAMP (11 )
drivers/infiniband/ulp/isert/ib_isert.c +16 -6
@@ -206,7 +206,9 @@ isert_free_rx_descriptors(struct isert_conn *isert_conn) isert_conn->conn_rx_descs =NULL ; } +static void isert_cq_tx_work (struct work_struct *);static void isert_cq_tx_callback (struct ib_cq *,void *); +static void isert_cq_rx_work (struct work_struct *);static void isert_cq_rx_callback (struct ib_cq *,void *); static int
@@ -258,26 +260,36 @@ isert_create_device_ib_res(struct isert_device *device) cq_desc[i].device = device; cq_desc[i].cq_index = i; +INIT_WORK (&cq_desc[i].cq_rx_work, isert_cq_rx_work); device->dev_rx_cq[i] =ib_create_cq (device->ib_device, isert_cq_rx_callback, isert_cq_event_callback, (void *)&cq_desc[i],ISER_MAX_RX_CQ_LEN , i); -if (IS_ERR (device->dev_rx_cq[i])) +if (IS_ERR (device->dev_rx_cq[i])) { + ret =PTR_ERR (device->dev_rx_cq[i]); + device->dev_rx_cq[i] =NULL ; goto out_cq; + } +INIT_WORK (&cq_desc[i].cq_tx_work, isert_cq_tx_work); device->dev_tx_cq[i] =ib_create_cq (device->ib_device, isert_cq_tx_callback, isert_cq_event_callback, (void *)&cq_desc[i],ISER_MAX_TX_CQ_LEN , i); -if (IS_ERR (device->dev_tx_cq[i])) +if (IS_ERR (device->dev_tx_cq[i])) { + ret =PTR_ERR (device->dev_tx_cq[i]); + device->dev_tx_cq[i] =NULL ; goto out_cq; + } -if (ib_req_notify_cq (device->dev_rx_cq[i],IB_CQ_NEXT_COMP )) + ret =ib_req_notify_cq (device->dev_rx_cq[i],IB_CQ_NEXT_COMP ); +if (ret) goto out_cq; -if (ib_req_notify_cq (device->dev_tx_cq[i],IB_CQ_NEXT_COMP )) + ret =ib_req_notify_cq (device->dev_tx_cq[i],IB_CQ_NEXT_COMP ); +if (ret) goto out_cq; }
@@ -1686,7 +1698,6 @@ isert_cq_tx_callback(struct ib_cq *cq, void *context) {struct isert_cq_desc *cq_desc = (struct isert_cq_desc *)context; -INIT_WORK (&cq_desc->cq_tx_work, isert_cq_tx_work);queue_work (isert_comp_wq, &cq_desc->cq_tx_work); }
@@ -1730,7 +1741,6 @@ isert_cq_rx_callback(struct ib_cq *cq, void *context) {struct isert_cq_desc *cq_desc = (struct isert_cq_desc *)context; -INIT_WORK (&cq_desc->cq_rx_work, isert_cq_rx_work);queue_work (isert_rx_wq, &cq_desc->cq_rx_work); }
drivers/input/input.c +4 -0
@@ -1871,6 +1871,10 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned intbreak ;case EV_ABS : +input_alloc_absinfo (dev); +if (!dev->absinfo) +return ; +__set_bit (code, dev->absbit);break ;
drivers/net/can/usb/peak_usb/pcan_usb_pro.c +3 -0
@@ -927,6 +927,9 @@ static int pcan_usb_pro_init(struct peak_usb_device *dev)/* set LED in default state (end of init phase) */ pcan_usb_pro_set_led (dev,0 ,1 ); +kfree (bi); +kfree (fi); +return 0 ; err_out:
drivers/net/ethernet/broadcom/tg3.c +1 -1
@@ -7608,7 +7608,7 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len) {u32 base = (u32 ) mapping &0xffffffff ; -return (base >0xffffdcc0 ) && (base + len +8 < base); +return base + len +8 < base; }/* Test for TSO DMA buffers that cross into regions which are within MSS bytes
drivers/net/usb/dm9601.c +25 -9
@@ -364,7 +364,12 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->ethtool_ops = &dm9601_ethtool_ops; dev->net->hard_header_len +=DM_TX_OVERHEAD ; dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; - dev->rx_urb_size = dev->net->mtu +ETH_HLEN +DM_RX_OVERHEAD ; + +/* dm9620/21a require room for 4 byte padding, even in dm9601 +* mode, so we need +1 to be able to receive full size +* ethernet frames. +*/ + dev->rx_urb_size = dev->net->mtu +ETH_HLEN +DM_RX_OVERHEAD +1 ; dev->mii.dev = dev->net; dev->mii.mdio_read = dm9601_mdio_read;
@@ -468,7 +473,7 @@ static int dm9601_rx_fixup(struct usbnet *dev, struct sk_buff *skb)static struct sk_buff *dm9601_tx_fixup (struct usbnet *dev,struct sk_buff *skb,gfp_t flags) { -int len; +int len, pad;/* format: b1: packet length low
@@ -476,12 +481,23 @@ static struct sk_buff *dm9601_tx_fixup(struct usbnet *dev, struct sk_buff *skb,b3..n: packet data */ - len = skb->len; + len = skb->len +DM_TX_OVERHEAD ; -if (skb_headroom (skb) <DM_TX_OVERHEAD ) { +/* workaround for dm962x errata with tx fifo getting out of +* sync if a USB bulk transfer retry happens right after a +* packet with odd / maxpacket length by adding up to 3 bytes +* padding. +*/ +while ((len &1 ) || !(len % dev->maxpacket)) + len++; + + len -=DM_TX_OVERHEAD ;/* hw header doesn't count as part of length */ + pad = len - skb->len; + +if (skb_headroom (skb) <DM_TX_OVERHEAD ||skb_tailroom (skb) < pad) {struct sk_buff *skb2; - skb2 =skb_copy_expand (skb,DM_TX_OVERHEAD ,0 , flags); + skb2 =skb_copy_expand (skb,DM_TX_OVERHEAD , pad, flags);dev_kfree_skb_any (skb); skb = skb2;if (!skb)
@@ -490,10 +506,10 @@ static struct sk_buff *dm9601_tx_fixup(struct usbnet *dev, struct sk_buff *skb,__skb_push (skb,DM_TX_OVERHEAD ); -/* usbnet adds padding if length is a multiple of packet size -if so, adjust length value in header */ -if ((skb->len % dev->maxpacket) ==0 ) - len++; +if (pad) { +memset (skb->data + skb->len,0 , pad); +__skb_put (skb, pad); + } skb->data[0 ] = len; skb->data[1 ] = len >>8 ;
drivers/net/wireless/ath/ath9k/ar9002_mac.c +43 -9
84 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/htc_drv_main.c +17 -8
@@ -147,21 +147,26 @@ static void ath9k_htc_bssid_iter(void *data, u8 *mac, struct ieee80211_vif *vif)struct ath9k_vif_iter_data *iter_data = data;int i; -for (i =0 ; i <ETH_ALEN ; i++) - iter_data->mask[i] &= ~(iter_data->hw_macaddr[i] ^ mac[i]); +if (iter_data->hw_macaddr !=NULL ) { +for (i =0 ; i <ETH_ALEN ; i++) + iter_data->mask[i] &= ~(iter_data->hw_macaddr[i] ^ mac[i]); + }else { + iter_data->hw_macaddr = mac; + } } -static void ath9k_htc_set_bssid_mask (struct ath9k_htc_priv *priv, +static void ath9k_htc_set_mac_bssid_mask (struct ath9k_htc_priv *priv,struct ieee80211_vif *vif) {struct ath_common *common =ath9k_hw_common (priv->ah);struct ath9k_vif_iter_data iter_data;/* -* Use the hardware MAC address as reference, the hardware uses it -* together with the BSSID mask when matching addresses. +* Pick the MAC address of the first interface as the new hardware +* MAC address. The hardware will use it together with the BSSID mask +* when matching addresses. */ - iter_data.hw_macaddr = common->macaddr; + iter_data.hw_macaddr =NULL ;memset (&iter_data.mask,0xff ,ETH_ALEN );if (vif)
@@ -173,6 +178,10 @@ static void ath9k_htc_set_bssid_mask(struct ath9k_htc_priv *priv, ath9k_htc_bssid_iter, &iter_data);memcpy (common->bssidmask, iter_data.mask,ETH_ALEN ); + +if (iter_data.hw_macaddr) +memcpy (common->macaddr, iter_data.hw_macaddr,ETH_ALEN ); +ath_hw_setbssidmask (common); }
@@ -1083,7 +1092,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, goto out; } -ath9k_htc_set_bssid_mask (priv, vif); +ath9k_htc_set_mac_bssid_mask (priv, vif); priv->vif_slot |= (1 << avp->index); priv->nvifs++;
@@ -1148,7 +1157,7 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw,ath9k_htc_set_opmode (priv); -ath9k_htc_set_bssid_mask (priv, vif); +ath9k_htc_set_mac_bssid_mask (priv, vif);/* * Stop ANI only if there are no associated station interfaces.
drivers/net/wireless/ath/ath9k/main.c +3 -2
@@ -885,8 +885,9 @@ void ath9k_calculate_iter_data(struct ieee80211_hw *hw,struct ath_common *common =ath9k_hw_common (ah);/* -* Use the hardware MAC address as reference, the hardware uses it -* together with the BSSID mask when matching addresses. +* Pick the MAC address of the first interface as the new hardware +* MAC address. The hardware will use it together with the BSSID mask +* when matching addresses. */ memset (iter_data,0 ,sizeof (*iter_data));memset (&iter_data->mask,0xff ,ETH_ALEN );
drivers/net/wireless/rtlwifi/pci.c +3 -1
@@ -741,6 +741,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) };int index = rtlpci->rx_ring[rx_queue_idx].idx; +if (rtlpci->driver_is_goingto_unload) +return ;/*RX NORMAL PKT */ while (count--) {/*rx descriptor */
@@ -1637,6 +1639,7 @@ static void rtl_pci_stop(struct ieee80211_hw *hw)*/ set_hal_stop (rtlhal); + rtlpci->driver_is_goingto_unload = true; rtlpriv->cfg->ops->disable_interrupt (hw);cancel_work_sync (&rtlpriv->works.lps_change_work);
@@ -1654,7 +1657,6 @@ static void rtl_pci_stop(struct ieee80211_hw *hw) ppsc->rfchange_inprogress = true;spin_unlock_irqrestore (&rtlpriv->locks.rf_ps_lock, flags); - rtlpci->driver_is_goingto_unload = true; rtlpriv->cfg->ops->hw_disable (hw);/* some things are not needed if firmware not available */ if (!rtlpriv->max_fw_size)
drivers/of/address.c +0 -8
@@ -69,14 +69,6 @@ static u64 of_bus_default_map(__be32 *addr, const __be32 *range, (unsigned long long )cp, (unsigned long long )s, (unsigned long long)da); -/* -* If the number of address cells is larger than 2 we assume the -* mapping doesn't specify a physical address. Rather, the address -* specifies an identifier that must match exactly. -*/ -if (na >2 &&memcmp (range, addr, na *4 ) !=0 ) -return OF_BAD_ADDR ; -if (da < cp || da >= (cp + s))return OF_BAD_ADDR ;return da - cp;
drivers/pci/hotplug/acpiphp_glue.c +26 -4
@@ -279,7 +279,9 @@ static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data, status =acpi_evaluate_integer (handle,"_ADR" ,NULL , &adr);if (ACPI_FAILURE (status)) { -acpi_handle_warn (handle,"can't evaluate _ADR (%#x)\n" , status); +if (status !=AE_NOT_FOUND ) +acpi_handle_warn (handle, +"can't evaluate _ADR (%#x)\n" , status);return AE_OK ; }
@@ -643,6 +645,24 @@ static void disable_slot(struct acpiphp_slot *slot) slot->flags &= (~SLOT_ENABLED ); } +static bool acpiphp_no_hotplug (acpi_handle handle) +{ +struct acpi_device *adev =NULL ; + +acpi_bus_get_device (handle, &adev); +return adev && adev->flags.no_hotplug; +} + +static bool slot_no_hotplug (struct acpiphp_slot *slot) +{ +struct acpiphp_func *func; + +list_for_each_entry (func, &slot->funcs, sibling) +if (acpiphp_no_hotplug (func_to_handle (func))) +return true; + +return false; +}/** * get_slot_status - get ACPI slot status
@@ -701,7 +721,8 @@ static void trim_stale_devices(struct pci_dev *dev)unsigned long long sta; status =acpi_evaluate_integer (handle,"_STA" ,NULL , &sta); - alive =ACPI_SUCCESS (status) && sta ==ACPI_STA_ALL ; + alive = (ACPI_SUCCESS (status) && sta ==ACPI_STA_ALL ) + ||acpiphp_no_hotplug (handle); }if (!alive) {u32 v;
@@ -741,8 +762,9 @@ static void acpiphp_check_bridge(struct acpiphp_bridge *bridge)struct pci_dev *dev, *tmp;mutex_lock (&slot->crit_sect); -/* wake up all functions */ -if (get_slot_status (slot) ==ACPI_STA_ALL ) { +if (slot_no_hotplug (slot)) { + ;/* do nothing */ + }else if (get_slot_status (slot) ==ACPI_STA_ALL ) {/* remove stale devices if any */ list_for_each_entry_safe (dev, tmp, &bus->devices, bus_list)
drivers/pinctrl/pinctrl-baytrail.c +1 -0
@@ -512,6 +512,7 @@ static const struct dev_pm_ops byt_gpio_pm_ops = {static const struct acpi_device_id byt_gpio_acpi_match[] = { {"INT33B2" ,0 }, + {"INT33FC" ,0 }, { } };MODULE_DEVICE_TABLE (acpi, byt_gpio_acpi_match);
drivers/pinctrl/sh-pfc/sh_pfc.h +1 -1
@@ -254,7 +254,7 @@ struct sh_pfc_soc_info {#define PINMUX_GPIO (_pin) \ [GPIO_##_pin] = { \ .pin = (u16)-1, \ - .name = __stringify(name), \ + .name = __stringify(GPIO_##_pin), \ .enum_id = _pin##_DATA, \ }
drivers/power/power_supply_core.c +6 -6
@@ -511,6 +511,10 @@ int power_supply_register(struct device *parent, struct power_supply *psy)dev_set_drvdata (dev, psy); psy->dev = dev; + rc =dev_set_name (dev,"%s" , psy->name); +if (rc) + goto dev_set_name_failed; +INIT_WORK (&psy->changed_work, power_supply_changed_work); rc =power_supply_check_supplies (psy);
@@ -524,10 +528,6 @@ int power_supply_register(struct device *parent, struct power_supply *psy)if (rc) goto wakeup_init_failed; - rc =kobject_set_name (&dev->kobj,"%s" , psy->name); -if (rc) - goto kobject_set_name_failed; - rc =device_add (dev);if (rc) goto device_add_failed;
@@ -553,11 +553,11 @@ create_triggers_failed: register_cooler_failed:psy_unregister_thermal (psy); register_thermal_failed: -wakeup_init_failed:device_del (dev); -kobject_set_name_failed: device_add_failed: +wakeup_init_failed: check_supplies_failed: +dev_set_name_failed:put_device (dev); success:return rc;
drivers/s390/char/tty3270.c +1 -1
@@ -942,7 +942,7 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)return rc; } - tp->screen =tty3270_alloc_screen (tp->view.cols, tp->view.rows); + tp->screen =tty3270_alloc_screen (tp->view.rows, tp->view.cols);if (IS_ERR (tp->screen)) { rc =PTR_ERR (tp->screen);raw3270_put_view (&tp->view);
drivers/scsi/qla2xxx/qla_target.c +5 -4
@@ -471,7 +471,7 @@ static void qlt_schedule_sess_for_deletion(struct qla_tgt_sess *sess,schedule_delayed_work (&tgt->sess_del_work,0 ); else schedule_delayed_work(&tgt->sess_del_work, - jiffies - sess->expires); + sess->expires - jiffies); }/* ha->hardware_lock supposed to be held on entry */
@@ -550,13 +550,14 @@ static void qlt_del_sess_work_fn(struct delayed_work *work)struct scsi_qla_host *vha = tgt->vha;struct qla_hw_data *ha = vha->hw;struct qla_tgt_sess *sess; -unsigned long flags; +unsigned long flags, elapsed;spin_lock_irqsave (&ha->hardware_lock, flags);while (!list_empty (&tgt->del_sess_list)) { sess =list_entry (tgt->del_sess_list.next,typeof (*sess), del_list_entry); -if (time_after_eq (jiffies, sess->expires)) { + elapsed = jiffies; +if (time_after_eq (elapsed, sess->expires)) {qlt_undelete_sess (sess); ql_dbg(ql_dbg_tgt_mgt, vha, 0xf004,
@@ -566,7 +567,7 @@ static void qlt_del_sess_work_fn(struct delayed_work *work) ha->tgt.tgt_ops->put_sess (sess); }else {schedule_delayed_work (&tgt->sess_del_work, - jiffies - sess->expires); + sess->expires - elapsed);break ; } }
drivers/staging/comedi/drivers.c +1 -1
@@ -417,7 +417,7 @@ int comedi_load_firmware(struct comedi_device *dev,release_firmware (fw); } -return ret; +return ret <0 ? ret :0 ; }EXPORT_SYMBOL_GPL (comedi_load_firmware);
drivers/staging/comedi/drivers/8255_pci.c +12 -3
@@ -63,7 +63,8 @@ enum pci_8255_boardid {BOARD_ADLINK_PCI7296 ,BOARD_CB_PCIDIO24 ,BOARD_CB_PCIDIO24H , -BOARD_CB_PCIDIO48H , +BOARD_CB_PCIDIO48H_OLD , +BOARD_CB_PCIDIO48H_NEW ,BOARD_CB_PCIDIO96H ,BOARD_NI_PCIDIO96 , BOARD_NI_PCIDIO96B,
@@ -106,11 +107,16 @@ static const struct pci_8255_boardinfo pci_8255_boards[] = { .dio_badr = 2, .n_8255 = 1, }, - [BOARD_CB_PCIDIO48H] = { + [BOARD_CB_PCIDIO48H_OLD] = { .name = "cb_pci-dio48h", .dio_badr = 1, .n_8255 = 2, }, + [BOARD_CB_PCIDIO48H_NEW] = { + .name = "cb_pci-dio48h", + .dio_badr = 2, + .n_8255 = 2, + }, [BOARD_CB_PCIDIO96H] = { .name = "cb_pci-dio96h", .dio_badr = 2,
@@ -263,7 +269,10 @@ static DEFINE_PCI_DEVICE_TABLE(pci_8255_pci_table) = { { PCI_VDEVICE(ADLINK, 0x7296), BOARD_ADLINK_PCI7296 }, { PCI_VDEVICE(CB, 0x0028), BOARD_CB_PCIDIO24 }, { PCI_VDEVICE(CB, 0x0014), BOARD_CB_PCIDIO24H }, - { PCI_VDEVICE(CB, 0x000b), BOARD_CB_PCIDIO48H }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_CB, 0x000b, 0x0000, 0x0000), + .driver_data = BOARD_CB_PCIDIO48H_OLD }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_CB, 0x000b, PCI_VENDOR_ID_CB, 0x000b), + .driver_data = BOARD_CB_PCIDIO48H_NEW }, { PCI_VDEVICE(CB, 0x0017), BOARD_CB_PCIDIO96H }, { PCI_VDEVICE(NI, 0x0160), BOARD_NI_PCIDIO96 }, { PCI_VDEVICE(NI, 0x1630), BOARD_NI_PCIDIO96B },
drivers/target/iscsi/iscsi_target.c +13 -14
@@ -465,6 +465,7 @@ int iscsit_del_np(struct iscsi_np *np)*/ send_sig (SIGINT , np->np_thread,1 );kthread_stop (np->np_thread); + np->np_thread =NULL ; } np->np_transport->iscsit_free_np (np);
@@ -830,24 +831,22 @@ int iscsit_setup_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,if (((hdr->flags &ISCSI_FLAG_CMD_READ ) || (hdr->flags &ISCSI_FLAG_CMD_WRITE )) && !hdr->data_length) {/* -* Vmware ESX v3.0 uses a modified Cisco Initiator (v3.4.2) -* that adds support for RESERVE/RELEASE. There is a bug -* add with this new functionality that sets R/W bits when -* neither CDB carries any READ or WRITE datapayloads. +* From RFC-3720 Section 10.3.1: +* +* "Either or both of R and W MAY be 1 when either the +* Expected Data Transfer Length and/or Bidirectional Read +* Expected Data Transfer Length are 0" +* +* For this case, go ahead and clear the unnecssary bits +* to avoid any confusion with ->data_direction. */ -if ((hdr->cdb[0 ] ==0x16 ) || (hdr->cdb[0 ] ==0x17 )) { - hdr->flags &= ~ISCSI_FLAG_CMD_READ ; - hdr->flags &= ~ISCSI_FLAG_CMD_WRITE ; - goto done; - } + hdr->flags &= ~ISCSI_FLAG_CMD_READ ; + hdr->flags &= ~ISCSI_FLAG_CMD_WRITE ; -pr_err ("ISCSI_FLAG_CMD_READ or ISCSI_FLAG_CMD_WRITE" +pr_warn ("ISCSI_FLAG_CMD_READ or ISCSI_FLAG_CMD_WRITE" " set when Expected Data Transfer Length is 0 for" -" CDB: 0x%02x. Bad iSCSI Initiator.\n" , hdr->cdb[0 ]); -return iscsit_add_reject_cmd (cmd, -ISCSI_REASON_BOOKMARK_INVALID , buf); +" CDB: 0x%02x, Fixing up flags\n" , hdr->cdb[0 ]); } -done:if (!(hdr->flags &ISCSI_FLAG_CMD_READ ) && !(hdr->flags &ISCSI_FLAG_CMD_WRITE ) && (hdr->data_length !=0 )) {
drivers/target/iscsi/iscsi_target_login.c +0 -6
@@ -1404,11 +1404,6 @@ old_sess_out: out: stop =kthread_should_stop (); -if (!stop &&signal_pending (current)) { -spin_lock_bh (&np->np_thread_lock); - stop = (np->np_thread_state ==ISCSI_NP_THREAD_SHUTDOWN ); -spin_unlock_bh (&np->np_thread_lock); - }/* Wait for another socket.. */ if (!stop)return 1 ;
@@ -1416,7 +1411,6 @@ exit:iscsi_stop_login_thread_timer (np);spin_lock_bh (&np->np_thread_lock); np->np_thread_state =ISCSI_NP_THREAD_EXIT ; - np->np_thread =NULL ;spin_unlock_bh (&np->np_thread_lock);return 0 ;
drivers/target/target_core_device.c +5 -0
@@ -1107,6 +1107,11 @@ int se_dev_set_block_size(struct se_device *dev, u32 block_size) dev->dev_attrib.block_size = block_size;pr_debug ("dev[%p]: SE Device block_size changed to %u\n" , dev, block_size); + +if (dev->dev_attrib.max_bytes_per_io) + dev->dev_attrib.hw_max_sectors = + dev->dev_attrib.max_bytes_per_io / block_size; +return 0 ; }
drivers/target/target_core_file.c +4 -4
@@ -66,9 +66,8 @@ static int fd_attach_hba(struct se_hba *hba, u32 host_id)pr_debug ("CORE_HBA[%d] - TCM FILEIO HBA Driver %s on Generic" " Target Core Stack %s\n" , hba->hba_id,FD_VERSION ,TARGET_CORE_MOD_VERSION ); -pr_debug ("CORE_HBA[%d] - Attached FILEIO HBA: %u to Generic" -" MaxSectors: %u\n" , - hba->hba_id, fd_host->fd_host_id,FD_MAX_SECTORS ); +pr_debug ("CORE_HBA[%d] - Attached FILEIO HBA: %u to Generic\n" , + hba->hba_id, fd_host->fd_host_id);return 0 ; }
@@ -220,7 +219,8 @@ static int fd_configure_device(struct se_device *dev) } dev->dev_attrib.hw_block_size = fd_dev->fd_block_size; - dev->dev_attrib.hw_max_sectors =FD_MAX_SECTORS ; + dev->dev_attrib.max_bytes_per_io =FD_MAX_BYTES ; + dev->dev_attrib.hw_max_sectors =FD_MAX_BYTES / fd_dev->fd_block_size; dev->dev_attrib.hw_queue_depth =FD_MAX_DEVICE_QUEUE_DEPTH ;if (fd_dev->fbd_flags &FDBD_HAS_BUFFERED_IO_WCE ) {
drivers/target/target_core_file.h +4 -1
@@ -7,7 +7,10 @@#define FD_DEVICE_QUEUE_DEPTH 32#define FD_MAX_DEVICE_QUEUE_DEPTH 128#define FD_BLOCKSIZE 512 -#define FD_MAX_SECTORS 2048 +/* +* Limited by the number of iovecs (2048) per vfs_[writev,readv] call +*/ +#define FD_MAX_BYTES 8388608#define RRF_EMULATE_CDB 0x01#define RRF_GOT_LBA 0x02
drivers/tty/n_tty.c +6 -1
@@ -93,6 +93,7 @@ struct n_tty_data {size_t canon_head;size_t echo_head;size_t echo_commit; +size_t echo_mark;DECLARE_BITMAP (char_map,256 );/* private to n_tty_receive_overrun (single-threaded) */
@@ -336,6 +337,7 @@ static void reset_buffer_flags(struct n_tty_data *ldata) { ldata->read_head = ldata->canon_head = ldata->read_tail =0 ; ldata->echo_head = ldata->echo_tail = ldata->echo_commit =0 ; + ldata->echo_mark =0 ; ldata->line_start =0 ; ldata->erasing =0 ;
@@ -787,6 +789,7 @@ static void commit_echoes(struct tty_struct *tty)size_t head; head = ldata->echo_head; + ldata->echo_mark = head; old = ldata->echo_commit - ldata->echo_tail;/* Process committed echoes if the accumulated # of bytes
@@ -811,10 +814,11 @@ static void process_echoes(struct tty_struct *tty)size_t echoed;if ((!L_ECHO (tty) && !L_ECHONL (tty)) || - ldata->echo_commit == ldata->echo_tail) + ldata->echo_mark == ldata->echo_tail)return ;mutex_lock (&ldata->output_lock); + ldata->echo_commit = ldata->echo_mark; echoed =__process_echoes (tty);mutex_unlock (&ldata->output_lock);
@@ -822,6 +826,7 @@ static void process_echoes(struct tty_struct *tty) tty->ops->flush_chars (tty); } +/* NB: echo_mark and echo_head should be equivalent here */ static void flush_echoes (struct tty_struct *tty) {struct n_tty_data *ldata = tty->disc_data;
drivers/tty/serial/8250/8250_dw.c +2 -0
@@ -417,6 +417,8 @@ MODULE_DEVICE_TABLE(of, dw8250_of_match);static const struct acpi_device_id dw8250_acpi_match[] = { {"INT33C4" ,0 }, {"INT33C5" ,0 }, + {"INT3434" ,0 }, + {"INT3435" ,0 }, {"80860F0A" ,0 }, { }, };
drivers/tty/serial/pmac_zilog.c +3 -0
@@ -2050,6 +2050,9 @@ static int __init pmz_console_init(void)/* Probe ports */ pmz_probe (); +if (pmz_ports_count ==0 ) +return -ENODEV ; +/* TODO: Autoprobe console based on OF */ /* pmz_console.index = i; */ register_console (&pmz_console);
drivers/tty/tty_ldsem.c +13 -3
@@ -86,11 +86,21 @@ static inline long ldsem_atomic_update(long delta, struct ld_semaphore *sem)return atomic_long_add_return (delta, (atomic_long_t *)&sem->count); } +/* +* ldsem_cmpxchg() updates @*old with the last-known sem->count value. +* Returns 1 if count was successfully changed; @*old will have @new value. +* Returns 0 if count was not changed; @*old will have most recent sem->count +*/ static inline int ldsem_cmpxchg (long *old,long new,struct ld_semaphore *sem) { -long tmp = *old; - *old =atomic_long_cmpxchg (&sem->count, *old, new); -return *old == tmp; +long tmp =atomic_long_cmpxchg (&sem->count, *old, new); +if (tmp == *old) { + *old = new; +return 1 ; + }else { + *old = tmp; +return 0 ; + } }/*
drivers/usb/chipidea/core.c +4 -0
@@ -575,6 +575,10 @@ static int ci_hdrc_probe(struct platform_device *pdev) : CI_ROLE_GADGET; } +/* only update vbus status for peripheral */ +if (ci->role ==CI_ROLE_GADGET ) +ci_handle_vbus_change (ci); + ret =ci_role_start (ci, ci->role);if (ret) {dev_err (dev,"can't start %s role\n" ,ci_role (ci)->name);
drivers/usb/chipidea/host.c +2 -1
@@ -88,7 +88,8 @@ static int host_start(struct ci_hdrc *ci)return ret; disable_reg: -regulator_disable (ci->platdata->reg_vbus); +if (ci->platdata->reg_vbus) +regulator_disable (ci->platdata->reg_vbus); put_hcd:usb_put_hcd (hcd);
drivers/usb/chipidea/udc.c +0 -3
@@ -1818,9 +1818,6 @@ static int udc_start(struct ci_hdrc *ci)pm_runtime_no_callbacks (&ci->gadget.dev);pm_runtime_enable (&ci->gadget.dev); -/* Update ci->vbus_active */ -ci_handle_vbus_change (ci); -return retval; remove_trans:
drivers/usb/class/cdc-wdm.c +3 -5
@@ -820,13 +820,11 @@ static int wdm_manage_power(struct usb_interface *intf, int on) {/* need autopm_get/put here to ensure the usbcore sees the new value */ int rv =usb_autopm_get_interface (intf); -if (rv <0 ) - goto err; intf->needs_remote_wakeup = on; -usb_autopm_put_interface (intf); -err: -return rv; +if (!rv) +usb_autopm_put_interface (intf); +return 0 ; }static int wdm_probe (struct usb_interface *intf,const struct usb_device_id *id)
drivers/usb/host/xhci-pci.c +6 -1
@@ -128,7 +128,12 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)* any other sleep) on Haswell machines with LPT and LPT-LP * with the new Intel BIOS */ - xhci->quirks |=XHCI_SPURIOUS_WAKEUP ; +/* Limit the quirk to only known vendors, as this triggers +* yet another BIOS bug on some other machines +* https://bugzilla.kernel.org/show_bug.cgi?id=66171 +*/ +if (pdev->subsystem_vendor ==PCI_VENDOR_ID_HP ) + xhci->quirks |=XHCI_SPURIOUS_WAKEUP ; }if (pdev->vendor ==PCI_VENDOR_ID_ETRON && pdev->device ==PCI_DEVICE_ID_ASROCK_P67 ) {
drivers/usb/musb/musb_core.c +8 -6
@@ -1809,9 +1809,6 @@ static void musb_free(struct musb *musb)disable_irq_wake (musb->nIrq);free_irq (musb->nIrq, musb); } -cancel_work_sync (&musb->irq_work); -if (musb->dma_controller) -dma_controller_destroy (musb->dma_controller);musb_host_free (musb); }
@@ -1893,6 +1890,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)musb_platform_disable (musb);musb_generic_disable (musb); +/* Init IRQ workqueue before request_irq */ +INIT_WORK (&musb->irq_work, musb_irq_work); +/* setup musb parts of the core (especially endpoints) */ status = musb_core_init(plat->config->multipoint ? MUSB_CONTROLLER_MHDRC
@@ -1902,9 +1902,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)setup_timer (&musb->otg_timer, musb_otg_timer_func, (unsigned long ) musb); -/* Init IRQ workqueue before request_irq */ -INIT_WORK (&musb->irq_work, musb_irq_work); -/* attach to the IRQ */ if (request_irq (nIrq, musb->isr,0 ,dev_name (dev), musb)) {dev_err (dev,"request_irq %d failed!\n" , nIrq);
@@ -1978,6 +1975,7 @@ fail4:musb_host_cleanup (musb); fail3: +cancel_work_sync (&musb->irq_work);if (musb->dma_controller)dma_controller_destroy (musb->dma_controller);pm_runtime_put_sync (musb->controller);
@@ -2036,6 +2034,10 @@ static int musb_remove(struct platform_device *pdev)musb_exit_debugfs (musb);musb_shutdown (pdev); +if (musb->dma_controller) +dma_controller_destroy (musb->dma_controller); + +cancel_work_sync (&musb->irq_work);musb_free (musb);device_init_wakeup (dev,0 );return 0 ;
drivers/usb/serial/generic.c +1 -8
@@ -176,14 +176,7 @@ retry:return result; } -/* Try sending off another urb, unless in irq context (in which case -* there will be no free urb). */ -if (!in_irq ()) - goto retry; - -clear_bit_unlock (USB_SERIAL_WRITE_BUSY , &port->flags); - -return 0 ; + goto retry;/* try sending off another urb */ }/**
drivers/usb/serial/option.c +2 -0
@@ -251,6 +251,7 @@ static void option_instat_callback(struct urb *urb);#define ZTE_PRODUCT_MF628 0x0015#define ZTE_PRODUCT_MF626 0x0031#define ZTE_PRODUCT_MC2718 0xffe8 +#define ZTE_PRODUCT_AC2726 0xfff1#define BENQ_VENDOR_ID 0x04a5#define BENQ_PRODUCT_H10 0x4068
@@ -1453,6 +1454,7 @@ static const struct usb_device_id option_ids[] = { { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
drivers/usb/serial/zte_ev.c +1 -2
@@ -281,8 +281,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x19d2, 0xfffd) }, { USB_DEVICE(0x19d2, 0xfffc) }, { USB_DEVICE(0x19d2, 0xfffb) }, -/* AC2726, AC8710_V3 */ - { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfff1, 0xff, 0xff, 0xff) }, +/* AC8710_V3 */ { USB_DEVICE(0x19d2, 0xfff6) }, { USB_DEVICE(0x19d2, 0xfff7) }, { USB_DEVICE(0x19d2, 0xfff8) },
fs/aio.c +69 -44
184 lines not on this page · raw message
fs/ceph/addr.c +7 -3
@@ -210,13 +210,17 @@ static int readpage_nounlock(struct file *filp, struct page *page)if (err <0 ) {SetPageError (page); goto out; - }else if (err <PAGE_CACHE_SIZE ) { + }else { +if (err <PAGE_CACHE_SIZE ) {/* zero fill remainder of page */ -zero_user_segment (page, err,PAGE_CACHE_SIZE ); +zero_user_segment (page, err,PAGE_CACHE_SIZE ); + }else { +flush_dcache_page (page); + } }SetPageUptodate (page); -if (err ==0 ) +if (err >=0 )ceph_readpage_to_fscache (inode, page); out:
fs/ceph/cache.c +3 -0
@@ -324,6 +324,9 @@ void ceph_invalidate_fscache_page(struct inode* inode, struct page *page) {struct ceph_inode_info *ci =ceph_inode (inode); +if (!PageFsCache (page)) +return ; +fscache_wait_on_page_write (ci->fscache, page);fscache_uncache_page (ci->fscache, page); }
fs/ceph/mds_client.c +6 -2
@@ -642,6 +642,8 @@ static void __unregister_request(struct ceph_mds_client *mdsc, req->r_unsafe_dir =NULL ; } +complete_all (&req->r_safe_completion); +ceph_mdsc_put_request (req); }
@@ -1875,8 +1877,11 @@ static int __do_request(struct ceph_mds_client *mdsc,int mds =-1 ;int err = -EAGAIN ; -if (req->r_err || req->r_got_result) +if (req->r_err || req->r_got_result) { +if (req->r_aborted) +__unregister_request (mdsc, req); goto out; + }if (req->r_timeout &&time_after_eq (jiffies, req->r_started + req->r_timeout)) {
@@ -2186,7 +2191,6 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg)if (head->safe) { req->r_got_safe = true;__unregister_request (mdsc, req); -complete_all (&req->r_safe_completion);if (req->r_got_unsafe) {/*
fs/cifs/cifsproto.h +4 -3
@@ -475,9 +475,10 @@ extern int CIFSGetExtAttr(const unsigned int xid, struct cifs_tcon *tcon, const int netfid, __u64 *pExtAttrBits, __u64 *pMask);extern void cifs_autodisable_serverino (struct cifs_sb_info *cifs_sb);extern bool CIFSCouldBeMFSymlink (const struct cifs_fattr *fattr); -extern int CIFSCheckMFSymlink (struct cifs_fattr *fattr, -const unsigned char *path, -struct cifs_sb_info *cifs_sb,unsigned int xid); +extern int CIFSCheckMFSymlink (unsigned int xid,struct cifs_tcon *tcon, +struct cifs_sb_info *cifs_sb, +struct cifs_fattr *fattr, +const unsigned char *path);extern int mdfour (unsigned char *,unsigned char *,int );extern int E_md4hash (const unsigned char *passwd,unsigned char *p16,const struct nls_table *codepage);
fs/cifs/dir.c +6 -5
@@ -193,7 +193,7 @@ check_name(struct dentry *direntry)static int cifs_do_create (struct inode *inode,struct dentry *direntry,unsigned int xid,struct tcon_link *tlink,unsigned oflags,umode_t mode, -__u32 *oplock,struct cifs_fid *fid,int *created) +__u32 *oplock,struct cifs_fid *fid) {int rc = -ENOENT ;int create_options =CREATE_NOT_DIR ;
@@ -349,7 +349,6 @@ cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid, .device = 0, }; - *created |=FILE_CREATED ;if (cifs_sb->mnt_cifs_flags &CIFS_MOUNT_SET_UID ) { args.uid =current_fsuid ();if (inode->i_mode &S_ISGID )
@@ -480,13 +479,16 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,cifs_add_pending_open (&fid, tlink, &open); rc =cifs_do_create (inode, direntry, xid, tlink, oflags, mode, - &oplock, &fid, opened); + &oplock, &fid);if (rc) {cifs_del_pending_open (&open); goto out; } +if ((oflags & (O_CREAT |O_EXCL )) == (O_CREAT |O_EXCL )) + *opened |=FILE_CREATED ; + rc =finish_open (file, direntry, generic_file_open, opened);if (rc) {if (server->ops->close)
@@ -529,7 +531,6 @@ int cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode,struct TCP_Server_Info *server;struct cifs_fid fid;__u32 oplock; -int created =FILE_CREATED ;cifs_dbg (FYI ,"cifs_create parent inode = 0x%p name is: %s and dentry = 0x%p\n" , inode, direntry->d_name.name, direntry);
@@ -546,7 +547,7 @@ int cifs_create(struct inode *inode, struct dentry *direntry, umode_t mode, server->ops->new_lease_key (&fid); rc =cifs_do_create (inode, direntry, xid, tlink, oflags, mode, - &oplock, &fid, &created); + &oplock, &fid);if (!rc && server->ops->close) server->ops->close (xid, tcon, &fid);
fs/cifs/inode.c +4 -2
@@ -383,7 +383,8 @@ int cifs_get_inode_info_unix(struct inode **pinode,/* check for Minshall+French symlinks */ if (cifs_sb->mnt_cifs_flags &CIFS_MOUNT_MF_SYMLINKS ) { -int tmprc =CIFSCheckMFSymlink (&fattr, full_path, cifs_sb, xid); +int tmprc =CIFSCheckMFSymlink (xid, tcon, cifs_sb, &fattr, + full_path);if (tmprc)cifs_dbg (FYI ,"CIFSCheckMFSymlink: %d\n" , tmprc); }
@@ -799,7 +800,8 @@ cifs_get_inode_info(struct inode **inode, const char *full_path,/* check for Minshall+French symlinks */ if (cifs_sb->mnt_cifs_flags &CIFS_MOUNT_MF_SYMLINKS ) { - tmprc =CIFSCheckMFSymlink (&fattr, full_path, cifs_sb, xid); + tmprc =CIFSCheckMFSymlink (xid, tcon, cifs_sb, &fattr, + full_path);if (tmprc)cifs_dbg (FYI ,"CIFSCheckMFSymlink: %d\n" , tmprc); }
fs/cifs/link.c +11 -15
@@ -354,34 +354,30 @@ open_query_close_cifs_symlink(const unsigned char *path, char *pbuf,int -CIFSCheckMFSymlink (struct cifs_fattr *fattr, -const unsigned char *path, -struct cifs_sb_info *cifs_sb,unsigned int xid) +CIFSCheckMFSymlink (unsigned int xid,struct cifs_tcon *tcon, +struct cifs_sb_info *cifs_sb,struct cifs_fattr *fattr, +const unsigned char *path) { -int rc =0 ; +int rc;u8 *buf =NULL ;unsigned int link_len =0 ;unsigned int bytes_read =0 ; -struct cifs_tcon *ptcon;if (!CIFSCouldBeMFSymlink (fattr))/* it's not a symlink */ return 0 ; buf =kmalloc (CIFS_MF_SYMLINK_FILE_SIZE ,GFP_KERNEL ); -if (!buf) { - rc = -ENOMEM ; - goto out; - } +if (!buf) +return -ENOMEM ; - ptcon =tlink_tcon (cifs_sb_tlink (cifs_sb)); -if ((ptcon->ses) && (ptcon->ses->server->ops->query_mf_symlink)) - rc = ptcon->ses->server->ops->query_mf_symlink (path, buf, - &bytes_read, cifs_sb, xid); +if (tcon->ses->server->ops->query_mf_symlink) + rc = tcon->ses->server->ops->query_mf_symlink (path, buf, + &bytes_read, cifs_sb, xid);else - goto out; + rc = -ENOSYS ; -if (rc !=0 ) +if (rc) goto out;if (bytes_read ==0 )/* not a symlink */
fs/ext2/super.c +1 -0
@@ -1493,6 +1493,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type, sb->s_blocksize - offset : towrite; tmp_bh.b_state =0 ; + tmp_bh.b_size = sb->s_blocksize; err =ext2_get_block (inode, blk, &tmp_bh,1 );if (err <0 ) goto out;
fs/ext4/ext4.h +10 -0
@@ -267,6 +267,16 @@ struct ext4_io_submit {/* Translate # of blks to # of clusters */ #define EXT4_NUM_B2C (sbi, blks) (((blks) + (sbi)->s_cluster_ratio - 1) >> \ (sbi)->s_cluster_bits) +/* Mask out the low bits to get the starting block of the cluster */ +#define EXT4_PBLK_CMASK (s, pblk) ((pblk) & \ + ~((ext4_fsblk_t) (s)->s_cluster_ratio - 1)) +#define EXT4_LBLK_CMASK (s, lblk) ((lblk) & \ + ~((ext4_lblk_t) (s)->s_cluster_ratio - 1)) +/* Get the cluster offset */ +#define EXT4_PBLK_COFF (s, pblk) ((pblk) & \ + ((ext4_fsblk_t) (s)->s_cluster_ratio - 1)) +#define EXT4_LBLK_COFF (s, lblk) ((lblk) & \ + ((ext4_lblk_t) (s)->s_cluster_ratio - 1))/* * Structure of a blocks group descriptor
fs/ext4/ext4_jbd2.c +9 -0
@@ -259,6 +259,15 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line,if (WARN_ON_ONCE (err)) {ext4_journal_abort_handle (where, line, __func__, bh, handle, err); +ext4_error_inode (inode, where, line, + bh->b_blocknr, +"journal_dirty_metadata failed: " +"handle type %u started at line %u, " +"credits %u/%u, errcode %d" , + handle->h_type, + handle->h_line_no, + handle->h_requested_credits, + handle->h_buffer_credits, err); } }else {if (inode)
fs/ext4/extents.c +30 -15
130 lines not on this page · raw message
fs/ext4/inode.c +0 -12
@@ -1206,7 +1206,6 @@ static int ext4_journalled_write_end(struct file *file,*/ static int ext4_da_reserve_metadata (struct inode *inode,ext4_lblk_t lblock) { -int retries =0 ;struct ext4_sb_info *sbi =EXT4_SB (inode->i_sb);struct ext4_inode_info *ei =EXT4_I (inode);unsigned int md_needed;
@@ -1218,7 +1217,6 @@ static int ext4_da_reserve_metadata(struct inode *inode, ext4_lblk_t lblock)* in order to allocate nrblocks * worse case is one extent per block */ -repeat:spin_lock (&ei->i_block_reservation_lock);/* * ext4_calc_metadata_amount() has side effects, which we have
@@ -1238,10 +1236,6 @@ repeat: ei->i_da_metadata_calc_len = save_len; ei->i_da_metadata_calc_last_lblock = save_last_lblock;spin_unlock (&ei->i_block_reservation_lock); -if (ext4_should_retry_alloc (inode->i_sb, &retries)) { -cond_resched (); - goto repeat; - }return -ENOSPC ; } ei->i_reserved_meta_blocks += md_needed;
@@ -1255,7 +1249,6 @@ repeat:*/ static int ext4_da_reserve_space (struct inode *inode,ext4_lblk_t lblock) { -int retries =0 ;struct ext4_sb_info *sbi =EXT4_SB (inode->i_sb);struct ext4_inode_info *ei =EXT4_I (inode);unsigned int md_needed;
@@ -1277,7 +1270,6 @@ static int ext4_da_reserve_space(struct inode *inode, ext4_lblk_t lblock)* in order to allocate nrblocks * worse case is one extent per block */ -repeat:spin_lock (&ei->i_block_reservation_lock);/* * ext4_calc_metadata_amount() has side effects, which we have
@@ -1297,10 +1289,6 @@ repeat: ei->i_da_metadata_calc_len = save_len; ei->i_da_metadata_calc_last_lblock = save_last_lblock;spin_unlock (&ei->i_block_reservation_lock); -if (ext4_should_retry_alloc (inode->i_sb, &retries)) { -cond_resched (); - goto repeat; - }dquot_release_reservation_block (inode,EXT4_C2B (sbi,1 ));return -ENOSPC ; }
fs/ext4/mballoc.c +13 -8
@@ -3442,6 +3442,9 @@ static void ext4_mb_pa_callback(struct rcu_head *head) {struct ext4_prealloc_space *pa; pa = container_of(head, struct ext4_prealloc_space, u.pa_rcu); + +BUG_ON (atomic_read (&pa->pa_count)); +BUG_ON (pa->pa_deleted ==0 );kmem_cache_free (ext4_pspace_cachep, pa); }
@@ -3455,11 +3458,13 @@ static void ext4_mb_put_pa(struct ext4_allocation_context *ac,ext4_group_t grp;ext4_fsblk_t grp_blk; -if (!atomic_dec_and_test (&pa->pa_count) || pa->pa_free !=0 ) -return ; -/* in this short window concurrent discard can set pa_deleted */ spin_lock (&pa->pa_lock); +if (!atomic_dec_and_test (&pa->pa_count) || pa->pa_free !=0 ) { +spin_unlock (&pa->pa_lock); +return ; + } +if (pa->pa_deleted ==1 ) {spin_unlock (&pa->pa_lock);return ;
@@ -4121,7 +4126,7 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac,ext4_get_group_no_and_offset (sb, goal, &group, &block);/* set up allocation goals */ - ac->ac_b_ex.fe_logical = ar->logical & ~(sbi->s_cluster_ratio -1 ); + ac->ac_b_ex.fe_logical =EXT4_LBLK_CMASK (sbi, ar->logical); ac->ac_status =AC_STATUS_CONTINUE ; ac->ac_sb = sb; ac->ac_inode = ar->inode;
@@ -4663,7 +4668,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,* blocks at the beginning or the end unless we are explicitly * requested to avoid doing so. */ - overflow = block & (sbi->s_cluster_ratio -1 ); + overflow =EXT4_PBLK_COFF (sbi, block);if (overflow) {if (flags &EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER ) { overflow = sbi->s_cluster_ratio - overflow;
@@ -4677,7 +4682,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode, count += overflow; } } - overflow = count & (sbi->s_cluster_ratio -1 ); + overflow =EXT4_LBLK_COFF (sbi, count);if (overflow) {if (flags &EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER ) {if (count > overflow)
@@ -4794,8 +4799,8 @@ do_more:" group:%d block:%d count:%lu failed" " with %d" , block_group, bit, count, err); - } - + }else +EXT4_MB_GRP_CLEAR_TRIMMED (e4b.bd_info);ext4_lock_group (sb, block_group);mb_clear_bits (bitmap_bh->b_data, bit, count_clusters);
fs/ext4/super.c +15 -6
@@ -773,7 +773,7 @@ static void ext4_put_super(struct super_block *sb) }ext4_es_unregister_shrinker (sbi); -del_timer (&sbi->s_err_report); +del_timer_sync (&sbi->s_err_report);ext4_release_system_zone (sb);ext4_mb_release (sb);ext4_ext_release (sb);
@@ -3288,11 +3288,19 @@ int ext4_calculate_overhead(struct super_block *sb) } -static ext4_fsblk_t ext4_calculate_resv_clusters (struct ext4_sb_info *sbi) +static ext4_fsblk_t ext4_calculate_resv_clusters (struct super_block *sb) {ext4_fsblk_t resv_clusters;/* +* There's no need to reserve anything when we aren't using extents. +* The space estimates are exact, there are no unwritten extents, +* hole punching doesn't need new metadata... This is needed especially +* to keep ext2/3 backward compatibility. +*/ +if (!EXT4_HAS_INCOMPAT_FEATURE (sb,EXT4_FEATURE_INCOMPAT_EXTENTS )) +return 0 ; +/* * By default we reserve 2% or 4096 clusters, whichever is smaller. * This should cover the situations where we can not afford to run * out of space like for example punch hole, or converting
@@ -3300,7 +3308,8 @@ static ext4_fsblk_t ext4_calculate_resv_clusters(struct ext4_sb_info *sbi)* allocation would require 1, or 2 blocks, higher numbers are * very rare. */ - resv_clusters =ext4_blocks_count (sbi->s_es) >> sbi->s_cluster_bits; + resv_clusters =ext4_blocks_count (EXT4_SB (sb)->s_es) >> +EXT4_SB (sb)->s_cluster_bits;do_div (resv_clusters,50 ); resv_clusters =min_t (ext4_fsblk_t, resv_clusters,4096 );
@@ -4043,10 +4052,10 @@ no_journal: "available"); } - err =ext4_reserve_clusters (sbi,ext4_calculate_resv_clusters (sbi)); + err =ext4_reserve_clusters (sbi,ext4_calculate_resv_clusters (sb));if (err) {ext4_msg (sb,KERN_ERR ,"failed to reserve %llu clusters for " -"reserved pool" ,ext4_calculate_resv_clusters (sbi)); +"reserved pool" ,ext4_calculate_resv_clusters (sb)); goto failed_mount4a; }
@@ -4151,7 +4160,7 @@ failed_mount_wq: } failed_mount3:ext4_es_unregister_shrinker (sbi); -del_timer (&sbi->s_err_report); +del_timer_sync (&sbi->s_err_report);if (sbi->s_flex_groups)ext4_kvfree (sbi->s_flex_groups);percpu_counter_destroy (&sbi->s_freeclusters_counter);
fs/gfs2/aops.c +30 -0
@@ -984,6 +984,7 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, {struct file *file = iocb->ki_filp;struct inode *inode = file->f_mapping->host; +struct address_space *mapping = inode->i_mapping;struct gfs2_inode *ip =GFS2_I (inode);struct gfs2_holder gh;int rv;
@@ -1004,6 +1005,35 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,if (rv !=1 ) goto out;/* dio not valid, fall back to buffered i/o */ +/* +* Now since we are holding a deferred (CW) lock at this point, you +* might be wondering why this is ever needed. There is a case however +* where we've granted a deferred local lock against a cached exclusive +* glock. That is ok provided all granted local locks are deferred, but +* it also means that it is possible to encounter pages which are +* cached and possibly also mapped. So here we check for that and sort +* them out ahead of the dio. The glock state machine will take care of +* everything else. +* +* If in fact the cached glock state (gl->gl_state) is deferred (CW) in +* the first place, mapping->nr_pages will always be zero. +*/ +if (mapping->nrpages) { +loff_t lstart = offset & (PAGE_CACHE_SIZE -1 ); +loff_t len =iov_length (iov, nr_segs); +loff_t end =PAGE_ALIGN (offset + len) -1 ; + + rv =0 ; +if (len ==0 ) + goto out; +if (test_and_clear_bit (GIF_SW_PAGED , &ip->i_flags)) +unmap_shared_mapping_range (ip->i_inode.i_mapping, offset, len); + rv =filemap_write_and_wait_range (mapping, lstart, end); +if (rv) +return rv; +truncate_inode_pages_range (mapping, lstart, end); + } + rv =__blockdev_direct_IO (rw, iocb, inode, inode->i_sb->s_bdev, iov, offset, nr_segs, gfs2_get_block_direct,NULL ,NULL ,0 );
fs/gfs2/log.c +2 -2
@@ -551,10 +551,10 @@ void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)struct buffer_head *bh = bd->bd_bh;struct gfs2_glock *gl = bd->bd_gl; -gfs2_remove_from_ail (bd); - bd->bd_bh =NULL ; bh->b_private =NULL ; bd->bd_blkno = bh->b_blocknr; +gfs2_remove_from_ail (bd);/* drops ref on bh */ + bd->bd_bh =NULL ; bd->bd_ops = &gfs2_revoke_lops; sdp->sd_log_num_revoke++;atomic_inc (&gl->gl_revokes);
fs/gfs2/meta_io.c +5 -0
@@ -258,6 +258,7 @@ void gfs2_remove_from_journal(struct buffer_head *bh, struct gfs2_trans *tr, intstruct address_space *mapping = bh->b_page->mapping;struct gfs2_sbd *sdp =gfs2_mapping2sbd (mapping);struct gfs2_bufdata *bd = bh->b_private; +int was_pinned =0 ;if (test_clear_buffer_pinned (bh)) {trace_gfs2_pin (bd,0 );
@@ -273,12 +274,16 @@ void gfs2_remove_from_journal(struct buffer_head *bh, struct gfs2_trans *tr, int tr->tr_num_databuf_rm++; } tr->tr_touched =1 ; + was_pinned =1 ;brelse (bh); }if (bd) {spin_lock (&sdp->sd_ail_lock);if (bd->bd_tr) {gfs2_trans_add_revoke (sdp, bd); + }else if (was_pinned) { + bh->b_private =NULL ; +kmem_cache_free (gfs2_bufdata_cachep, bd); }spin_unlock (&sdp->sd_ail_lock); }
fs/gfs2/ops_fstype.c +11 -1
@@ -1366,8 +1366,18 @@ static struct dentry *gfs2_mount(struct file_system_type *fs_type, int flags,if (IS_ERR (s)) goto error_bdev; -if (s->s_root) +if (s->s_root) { +/* +* s_umount nests inside bd_mutex during +* __invalidate_device(). blkdev_put() acquires +* bd_mutex and can't be called under s_umount. Drop +* s_umount temporarily. This is safe as we're +* holding an active reference. +*/ +up_write (&s->s_umount);blkdev_put (bdev, mode); +down_write (&s->s_umount); + }memset (&args,0 ,sizeof (args)); args.ar_quota =GFS2_QUOTA_DEFAULT ;
fs/jbd2/transaction.c +4 -2
@@ -1290,7 +1290,10 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)* once a transaction -bzzz */ jh->b_modified =1 ; -J_ASSERT_JH (jh, handle->h_buffer_credits >0 ); +if (handle->h_buffer_credits <=0 ) { + ret = -ENOSPC ; + goto out_unlock_bh; + } handle->h_buffer_credits--; }
@@ -1373,7 +1376,6 @@ out_unlock_bh:jbd2_journal_put_journal_head (jh); out:JBUFFER_TRACE (jh,"exit" ); -WARN_ON (ret);/* All errors are bugs, so dump the stack */ return ret; }
fs/xfs/xfs_qm.c +50 -21
98 lines not on this page · raw message
include/acpi/acpi_bus.h +3 -1
@@ -169,7 +169,8 @@ struct acpi_device_flags { u32 ejectable:1; u32 power_manageable:1; u32 match_driver:1; - u32 reserved:27; + u32 no_hotplug:1; + u32 reserved:26; };/* File System */
@@ -357,6 +358,7 @@ extern struct kobject *acpi_kobj;extern int acpi_bus_generate_netlink_event (const char *,const char *,u8 ,int );void acpi_bus_private_data_handler (acpi_handle ,void *);int acpi_bus_get_private_data (acpi_handle ,void **); +void acpi_bus_no_hotplug (acpi_handle handle);extern int acpi_notifier_call_chain (struct acpi_device *,u32 ,u32 );extern int register_acpi_notifier (struct notifier_block *);extern int unregister_acpi_notifier (struct notifier_block *);
include/asm-generic/pgtable.h +1 -1
@@ -217,7 +217,7 @@ static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)#endif #ifndef pte_accessible -# define pte_accessible (pte) ((void)(pte),1) +# define pte_accessible (mm, pte) ((void)(pte), 1)#endif
Lines of this file are not shown. View the raw message.
include/linux/mm_types.h +49 -0
49 lines not on this page · raw message
mm/huge_memory.c +39 -10
49 lines not on this page · raw message
mm/migrate.c +65 -17
82 lines not on this page · raw message
mm/mlock.c +32 -12
44 lines not on this page · raw message
security/selinux/hooks.c +42 -11
53 lines not on this page · raw message
security/selinux/xfrm.c +42 -11
53 lines not on this page · raw message
tools/power/cpupower/utils/cpupower-set.c +3 -3
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.