Linux 3.15.6
Greg KH
maintainerI'm announcing the release of the 3.15.6 kernel.
All users of the 3.15 kernel series must upgrade.
The updated 3.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.15.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/cpu-freq/intel-pstate.txt | 7 + Makefile | 2 arch/arm64/include/asm/memory.h | 2 arch/parisc/kernel/hardware.c | 3 arch/parisc/kernel/sys_parisc32.c | 10 ++ arch/parisc/kernel/syscall_table.S | 2 arch/powerpc/Kconfig | 3 arch/powerpc/include/asm/perf_event_server.h | 3 arch/powerpc/kvm/book3s_hv_interrupts.S | 5 - arch/powerpc/perf/core-book3s.c | 26 ++++- arch/powerpc/perf/power8-pmu.c | 2 arch/x86/crypto/sha512_ssse3_glue.c | 2 arch/x86/mm/ioremap.c | 26 +++-- drivers/acpi/ac.c | 130 ++++++++++++++++++++++++++- drivers/acpi/battery.c | 27 +++++ drivers/acpi/ec.c | 128 ++++++++++++-------------- drivers/acpi/resource.c | 10 +- drivers/ata/ahci_imx.c | 35 ++++++- drivers/base/dma-contiguous.c | 12 ++ drivers/char/i8k.c | 4 drivers/clk/clk-s2mps11.c | 7 - drivers/clk/qcom/mmcc-msm8960.c | 2 drivers/clk/spear/spear3xx_clock.c | 2 drivers/cpufreq/Makefile | 2 drivers/cpufreq/intel_pstate.c | 35 ++++--- drivers/crypto/caam/jr.c | 8 - drivers/gpu/drm/i915/i915_drv.h | 1 drivers/gpu/drm/i915/i915_gem_stolen.c | 44 +++++++++ drivers/gpu/drm/i915/i915_reg.h | 3 drivers/gpu/drm/i915/intel_display.c | 14 ++ drivers/gpu/drm/i915/intel_panel.c | 8 + drivers/gpu/drm/radeon/ci_dpm.c | 2 drivers/gpu/drm/radeon/evergreen.c | 8 - drivers/gpu/drm/radeon/radeon_vm.c | 4 drivers/gpu/drm/radeon/rs600.c | 6 - drivers/gpu/drm/radeon/rv770_dpm.c | 6 - drivers/hv/connection.c | 8 + drivers/hwmon/adc128d818.c | 28 ++--- drivers/hwmon/adm1021.c | 14 +- drivers/hwmon/adm1029.c | 3 drivers/hwmon/adm1031.c | 8 + drivers/hwmon/amc6821.c | 2 drivers/hwmon/emc2103.c | 15 +-- drivers/iio/adc/ti_am335x_adc.c | 2 drivers/md/dm-io.c | 22 +--- drivers/md/dm-mpath.c | 5 - drivers/md/dm.c | 15 ++- drivers/mtd/nand/omap2.c | 10 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 drivers/pci/pci.c | 9 + drivers/phy/phy-core.c | 7 - drivers/rtc/rtc-puv3.c | 4 drivers/thermal/thermal_hwmon.c | 33 +++--- drivers/tty/serial/imx.c | 3 drivers/tty/serial/ip22zilog.c | 2 drivers/tty/serial/m32r_sio.c | 8 + drivers/tty/serial/pmac_zilog.c | 3 drivers/tty/serial/sunsab.c | 3 drivers/tty/serial/sunzilog.c | 2 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/ftdi_sio.c | 5 - drivers/usb/serial/ftdi_sio_ids.h | 9 + drivers/usb/serial/option.c | 2 fs/ext4/extents_status.c | 4 fs/ext4/ialloc.c | 14 +- fs/ext4/mballoc.c | 4 fs/ext4/super.c | 60 +++++------- fs/f2fs/data.c | 3 fs/f2fs/f2fs.h | 1 fs/f2fs/node.c | 46 +++++---- fs/f2fs/node.h | 5 - fs/jbd2/transaction.c | 5 - fs/kernfs/dir.c | 1 fs/kernfs/kernfs-internal.h | 5 + fs/kernfs/mount.c | 41 ++++++++ include/linux/kernfs.h | 5 + include/linux/ring_buffer.h | 2 kernel/cgroup.c | 53 ++++++++++- kernel/cpuset.c | 8 + kernel/trace/ring_buffer.c | 5 - kernel/trace/trace.c | 25 +++-- kernel/trace/trace.h | 4 kernel/workqueue.c | 3 mm/mempolicy.c | 2 84 files changed, 792 insertions(+), 320 deletions(-)
Aaron Lu (1):
thermal: hwmon: Make the check for critical temp valid consistent
Alex Deucher (2):
drm/radeon: fix typo in ci_stop_dpm() drm/radeon: fix typo in golden register setup on evergreen
Alex Williamson (1):
PCI: Fix unaligned access in AF transaction pending test
Alexandre Demers (1):
drm/radeon/dpm: Reenabling SS on Cayman
Andras Kovacs (1):
USB: cp210x: add support for Corsair usb dongle
Andy Whitcroft (1):
ACPI / resources: only reject zero length resources based at address zero
Anton Blanchard (1):
powerpc/perf: Never program book3s PMCs with values >= 0x80000000
Axel Lin (3):
hwmon: (amc6821) Fix permissions for temp2_input
hwmon: (adm1029) Ensure the fan_div cache is updated in set_fan_div
hwmon: (adm1021) Fix cache problem when writing temperature limits
Bernd Wachter (1):
usb: option: Add ID for Telewell TW-LTE 4G v2
Bert Vermeulen (1):
USB: ftdi_sio: Add extra PID.
Chen Gang (2):
drivers/rtc/rtc-puv3.c: remove "&dev->" for typo issue drivers/rtc/rtc-puv3.c: use dev_dbg() instead of dev_debug() for typo issue
Christian König (2):
drm/radeon: page table BOs are kernel allocations drm/radeon: stop poisoning the GART TLB
Colin Cross (1):
arm64: implement TASK_SIZE_OF
Cristian Stoica (1):
crypto: caam - fix memleak in caam_jr module
Dirk Brandewie (3):
intel_pstate: Fix setting VID
intel_pstate: don't touch turbo bit if turbo disabled or unavailable.
intel_pstate: Update documentation of {max,min}_perf_pct sysfs files
Eric Sandeen (1):
ext4: disable synchronous transaction batching if max_batch_time==0
Greg Kroah-Hartman (1):
Linux 3.15.6
Gu Zheng (1):
cpuset,mempolicy: fix sleeping function called from invalid context
Guenter Roeck (5):
i8k: Fix non-SMP operation
hwmon: (adc128d818) Drop write support on inX_input attributes
hwmon: (emc2103) Clamp limits instead of bailing out
hwmon: (adm1031) Fix writes to limit registers
powerpc: Disable RELOCATABLE for COMPILE_TEST with PPC64
Helge Deller (2):
parisc: add serial ports of C8000/1GHz machine to hardware database
parisc: fix fanotify_mark() syscall on 32bit compat kernel
Jaegeuk Kim (2):
f2fs: adjust free mem size to flush dentry blocks
f2fs: check bdi->dirty_exceeded when trying to skip data writes
Jan Kardell (1):
iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends
Jean Sacren (1):
i40e: fix passing wrong error code to i40e_open()
Joe Thornber (1):
dm io: fix a race condition in the wake up code for sync_io
Joel Stanley (3):
powerpc/kvm: Remove redundant save of SIER AND MMCR2 powerpc/perf: Add PPMU_ARCH_207S define powerpc/perf: Clear MMCR2 when enabling PMU
Joonsoo Kim (1):
DMA, CMA: fix possible memory leak
Jun'ichi Nomura (1):
dm mpath: fix IO hang due to logic bug in multipath_busy
Jussi Kivilinna (1):
crypto: sha512_ssse3 - fix byte count to bit count conversion
K. Y. Srinivasan (1):
Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
Krzysztof Kozlowski (1):
clk: s2mps11: Fix double free corruption during driver unbind
Lan Tianyu (2):
Revert "ACPI / AC: Remove AC's proc directory."
ACPI / battery: Retry to get battery information if failed during probing
Li Zefan (3):
cgroup: fix mount failure in a corner case
kernfs: introduce kernfs_pin_sb()
cgroup: fix a race between cgroup_mount() and cgroup_kill_sb()
Lv Zheng (4):
ACPI / EC: Avoid race condition related to advance_transaction() ACPI / EC: Add asynchronous command byte write support ACPI / EC: Remove duplicated ec_wait_ibf0() waiter ACPI / EC: Fix race condition in ec_transaction_completed()
Maxime Bizon (1):
workqueue: fix dev_set_uevent_suppress() imbalance
Michal Sojka (1):
USB: serial: ftdi_sio: Add Infineon Triboard
Mikulas Patocka (1):
dm: allocate a special workqueue for deferred device removal
Peter Hurley (2):
serial: Test for no tx data on tx restart
serial: imx: Fix build breakage
Prabhakar Lad (1):
cpufreq: Makefile: fix compilation for davinci platform
Roger Quadros (1):
phy: core: Fix error path in phy_create()
Roland Dreier (1):
x86, ioremap: Speed up check for RAM pages
Scot Doyle (3):
drm/i915: quirk asserts controllable backlight presence, overriding VBT drm/i915: Acer C720 and C720P have controllable backlights drm/i915: Toshiba CB35 has a controllable backlight
Shawn Guo (1):
ahci: imx: manage only sata_ref_clk in imx_sata_enable[disable]
Stephen Boyd (1):
clk: qcom: HDMI source sel is 3 not 2
Steven Rostedt (Red Hat) (1):
ring-buffer: Check if buffer exists before polling
Ted Juan (1):
mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
Tejun Heo (1):
kernfs: implement kernfs_root->supers list
Theodore Ts'o (5):
ext4: fix unjournalled bg descriptor while initializing inode bitmap
ext4: clarify error count warning messages
ext4: clarify ext4_error message in ext4_mb_generate_buddy_error()
ext4: revert commit which was causing fs corruption after journal replays
ext4: fix a potential deadlock in __ext4_es_shrink()
Thomas Gleixner (1):
clk: spear3xx: Use proper control register offset
Ville Syrjälä (1):
drm/i915: Don't clobber the GTT when it's within stolen memory
Vincent Minet (1):
intel_pstate: Set CPU number before accessing MSRs
Yasuaki Ishimatsu (1):
workqueue: zero cpumask of wq_numa_possible_cpumask on init
Greg KH
maintainerDocumentation/cpu-freq/intel-pstate.txt +5 -2
@@ -15,10 +15,13 @@ New sysfs files for controlling P state selection have been added to /sys/devices/system/cpu/intel_pstate/ max_perf_pct: limits the maximum P state that will be requested by - the driver stated as a percentage of the available performance. + the driver stated as a percentage of the available performance. The + available (P states) performance may be reduced by the no_turbo + setting described below. min_perf_pct: limits the minimum P state that will be requested by - the driver stated as a percentage of the available performance. + the driver stated as a percentage of the max (non-turbo) + performance level. no_turbo: limits the driver to selecting P states below the turbo frequency range.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 15 -SUBLEVEL = 5 +SUBLEVEL = 6 EXTRAVERSION = NAME = Shuffling Zombie Juror
arch/arm64/include/asm/memory.h +2 -0
@@ -56,6 +56,8 @@#define TASK_SIZE_32 UL(0x100000000)#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ TASK_SIZE_32 : TASK_SIZE_64) +#define TASK_SIZE_OF (tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ + TASK_SIZE_32 : TASK_SIZE_64)#else #define TASK_SIZE TASK_SIZE_64#endif /* CONFIG_COMPAT */
arch/parisc/kernel/hardware.c +2 -1
@@ -1210,7 +1210,8 @@ static struct hp_hardware hp_hardware_list[] = { {HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"}, {HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"}, {HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"}, - {HPHW_FIO, 0x076, 0x000AD, 0x00, "Crestone Peak RS-232"}, + {HPHW_FIO, 0x076, 0x000AD, 0x0, "Crestone Peak Core RS-232"}, + {HPHW_FIO, 0x077, 0x000AD, 0x0, "Crestone Peak Fast? Core RS-232"}, {HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"}, {HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"}, {HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"},
arch/parisc/kernel/sys_parisc32.c +10 -0
@@ -4,6 +4,7 @@* Copyright (C) 2000-2001 Hewlett Packard Company * Copyright (C) 2000 John Marvin * Copyright (C) 2001 Matthew Wilcox +* Copyright (C) 2014 Helge Deller <[email protected]> * * These routines maintain argument size conversion between 32bit and 64bit * environment. Based heavily on sys_ia32.c and sys_sparc32.c.
@@ -57,3 +58,12 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23, current->comm, current->pid, r20);return -ENOSYS ; } + +asmlinkage long sys32_fanotify_mark (compat_int_t fanotify_fd,compat_uint_t flags, +compat_uint_t mask0,compat_uint_t mask1,compat_int_t dfd, +const char __user * pathname) +{ +return sys_fanotify_mark (fanotify_fd, flags, + ((__u64 )mask1 <<32 ) | mask0, + dfd, pathname); +}
arch/parisc/kernel/syscall_table.S +1 -1
@@ -418,7 +418,7 @@ ENTRY_SAME(accept4) /* 320 */ ENTRY_SAME(prlimit64) ENTRY_SAME(fanotify_init) - ENTRY_COMP(fanotify_mark) + ENTRY_DIFF(fanotify_mark) ENTRY_COMP(clock_adjtime) ENTRY_SAME(name_to_handle_at) /* 325 */ ENTRY_COMP(open_by_handle_at)
arch/powerpc/Kconfig +2 -1
@@ -414,7 +414,7 @@ config KEXEC config CRASH_DUMP bool "Build a kdump crash kernel" depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP) - select RELOCATABLE if PPC64 || 44x || FSL_BOOKE + select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE help Build a kernel suitable for use as a kdump capture kernel. The same kernel binary can be used as production kernel and dump
@@ -1009,6 +1009,7 @@ endmenu if PPC64 config RELOCATABLE bool "Build a relocatable kernel" + depends on !COMPILE_TEST select NONSTATIC_KERNEL help This builds a kernel image that is capable of running anywhere
arch/powerpc/include/asm/perf_event_server.h +1 -2
@@ -61,8 +61,7 @@ struct power_pmu {#define PPMU_SIAR_VALID 0x00000010/* Processor has SIAR Valid bit */ #define PPMU_HAS_SSLOT 0x00000020/* Has sampled slot in MMCRA */ #define PPMU_HAS_SIER 0x00000040/* Has SIER */ -#define PPMU_BHRB 0x00000080/* has BHRB feature enabled */ -#define PPMU_EBB 0x00000100/* supports event based branch */ +#define PPMU_ARCH_207S 0x00000080/* PMC is architecture v2.07S */ /* * Values for flags to get_alternatives()
arch/powerpc/kvm/book3s_hv_interrupts.S +0 -5
@@ -127,11 +127,6 @@ BEGIN_FTR_SECTION stw r10, HSTATE_PMC + 24(r13) stw r11, HSTATE_PMC + 28(r13) END_FTR_SECTION_IFSET(CPU_FTR_ARCH_201) -BEGIN_FTR_SECTION - mfspr r9, SPRN_SIER - std r8, HSTATE_MMCR + 40(r13) - std r9, HSTATE_MMCR + 48(r13) -END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S) 31: /*
arch/powerpc/perf/core-book3s.c +22 -4
@@ -485,7 +485,7 @@ static bool is_ebb_event(struct perf_event *event)* check that the PMU supports EBB, meaning those that don't can still * use bit 63 of the event code for something else if they wish. */ -return (ppmu->flags &PPMU_EBB ) && +return (ppmu->flags &PPMU_ARCH_207S ) && ((event->attr.config >>PERF_EVENT_CONFIG_EBB_SHIFT ) &1 ); }
@@ -777,7 +777,7 @@ void perf_event_print_debug(void)if (ppmu->flags &PPMU_HAS_SIER ) sier =mfspr (SPRN_SIER ); -if (ppmu->flags &PPMU_EBB ) { +if (ppmu->flags &PPMU_ARCH_207S ) {pr_info ("MMCR2: %016lx EBBHR: %016lx\n" ,mfspr (SPRN_MMCR2 ),mfspr (SPRN_EBBHR )); pr_info("EBBRR: %016lx BESCR: %016lx\n",
@@ -996,7 +996,22 @@ static void power_pmu_read(struct perf_event *event) }while (local64_cmpxchg (&event->hw.prev_count, prev, val) != prev);local64_add (delta, &event->count); -local64_sub (delta, &event->hw.period_left); + +/* +* A number of places program the PMC with (0x80000000 - period_left). +* We never want period_left to be less than 1 because we will program +* the PMC with a value >= 0x800000000 and an edge detected PMC will +* roll around to 0 before taking an exception. We have seen this +* on POWER8. +* +* To fix this, clamp the minimum value of period_left to 1. +*/ +do { + prev =local64_read (&event->hw.period_left); + val = prev - delta; +if (val <1 ) + val =1 ; + }while (local64_cmpxchg (&event->hw.period_left, prev, val) != prev); }/*
@@ -1300,6 +1315,9 @@ static void power_pmu_enable(struct pmu *pmu)write_mmcr0 (cpuhw, mmcr0); +if (ppmu->flags &PPMU_ARCH_207S ) +mtspr (SPRN_MMCR2 ,0 ); +/* * Enable instruction sampling if necessary */
@@ -1696,7 +1714,7 @@ static int power_pmu_event_init(struct perf_event *event)if (has_branch_stack (event)) {/* PMU has BHRB enabled */ -if (!(ppmu->flags &PPMU_BHRB )) +if (!(ppmu->flags &PPMU_ARCH_207S ))return -EOPNOTSUPP ; }
arch/powerpc/perf/power8-pmu.c +1 -1
@@ -792,7 +792,7 @@ static struct power_pmu power8_pmu = { .get_constraint = power8_get_constraint, .get_alternatives = power8_get_alternatives, .disable_pmc = power8_disable_pmc, - .flags = PPMU_HAS_SSLOT | PPMU_HAS_SIER | PPMU_BHRB | PPMU_EBB, + .flags = PPMU_HAS_SSLOT | PPMU_HAS_SIER | PPMU_ARCH_207S, .n_generic = ARRAY_SIZE(power8_generic_events), .generic_events = power8_generic_events, .cache_events = &power8_cache_events,
arch/x86/crypto/sha512_ssse3_glue.c +1 -1
@@ -141,7 +141,7 @@ static int sha512_ssse3_final(struct shash_desc *desc, u8 *out)/* save number of bits */ bits[1 ] =cpu_to_be64 (sctx->count[0 ] <<3 ); - bits[0 ] =cpu_to_be64 (sctx->count[1 ] <<3 ) | sctx->count[0 ] >>61 ; + bits[0 ] =cpu_to_be64 (sctx->count[1 ] <<3 | sctx->count[0 ] >>61 );/* Pad out to 112 mod 128 and append length */ index = sctx->count[0 ] &0x7f ;
arch/x86/mm/ioremap.c +19 -7
@@ -50,6 +50,21 @@ int ioremap_change_attr(unsigned long vaddr, unsigned long size,return err; } +static int __ioremap_check_ram (unsigned long start_pfn,unsigned long nr_pages, +void *arg) +{ +unsigned long i; + +for (i =0 ; i < nr_pages; ++i) +if (pfn_valid (start_pfn + i) && + !PageReserved (pfn_to_page (start_pfn + i))) +return 1 ; + +WARN_ONCE (1 ,"ioremap on RAM pfn 0x%lx\n" , start_pfn); + +return 0 ; +} +/* * Remap an arbitrary physical address space into the kernel virtual * address space. Needed when the kernel wants to access high addresses
@@ -93,14 +108,11 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,/* * Don't allow anybody to remap normal RAM that we're using.. */ + pfn = phys_addr >>PAGE_SHIFT ; last_pfn = last_addr >>PAGE_SHIFT ; -for (pfn = phys_addr >>PAGE_SHIFT ; pfn <= last_pfn; pfn++) { -int is_ram =page_is_ram (pfn); - -if (is_ram &&pfn_valid (pfn) && !PageReserved (pfn_to_page (pfn))) -return NULL ; -WARN_ON_ONCE (is_ram); - } +if (walk_system_ram_range (pfn, last_pfn - pfn +1 ,NULL , + __ioremap_check_ram) ==1 ) +return NULL ;/* * Mappings have to be page-aligned
drivers/acpi/ac.c +128 -2
193 lines not on this page · raw message
drivers/acpi/battery.c +26 -1
@@ -34,6 +34,7 @@#include <linux/dmi.h> #include <linux/slab.h> #include <linux/suspend.h> +#include <linux/delay.h> #include <asm/unaligned.h> #ifdef CONFIG_ACPI_PROCFS_POWER
@@ -1069,6 +1070,28 @@ static struct dmi_system_id bat_dmi_table[] = { {}, }; +/* +* Some machines'(E,G Lenovo Z480) ECs are not stable +* during boot up and this causes battery driver fails to be +* probed due to failure of getting battery information +* from EC sometimes. After several retries, the operation +* may work. So add retry code here and 20ms sleep between +* every retries. +*/ +static int acpi_battery_update_retry (struct acpi_battery *battery) +{ +int retry, ret; + +for (retry =5 ; retry; retry--) { + ret =acpi_battery_update (battery); +if (!ret) +break ; + +msleep (20 ); + } +return ret; +} +static int acpi_battery_add (struct acpi_device *device) {int result =0 ;
@@ -1087,9 +1110,11 @@ static int acpi_battery_add(struct acpi_device *device)mutex_init (&battery->sysfs_lock);if (acpi_has_method (battery->device->handle,"_BIX" ))set_bit (ACPI_BATTERY_XINFO_PRESENT , &battery->flags); - result =acpi_battery_update (battery); + + result =acpi_battery_update_retry (battery);if (result) goto fail; +#ifdef CONFIG_ACPI_PROCFS_POWER result =acpi_battery_add_fs (device);#endif
drivers/acpi/ec.c +60 -68
207 lines not on this page · raw message
drivers/acpi/resource.c +5 -5
@@ -77,7 +77,7 @@ bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res)switch (ares->type) {case ACPI_RESOURCE_TYPE_MEMORY24 : memory24 = &ares->data.memory24; -if (!memory24->address_length) +if (!memory24->minimum && !memory24->address_length)return false; acpi_dev_get_memresource(res, memory24->minimum, memory24->address_length,
@@ -85,7 +85,7 @@ bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res)break ;case ACPI_RESOURCE_TYPE_MEMORY32 : memory32 = &ares->data.memory32; -if (!memory32->address_length) +if (!memory32->minimum && !memory32->address_length)return false; acpi_dev_get_memresource(res, memory32->minimum, memory32->address_length,
@@ -93,7 +93,7 @@ bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res)break ;case ACPI_RESOURCE_TYPE_FIXED_MEMORY32 : fixed_memory32 = &ares->data.fixed_memory32; -if (!fixed_memory32->address_length) +if (!fixed_memory32->address && !fixed_memory32->address_length)return false; acpi_dev_get_memresource(res, fixed_memory32->address, fixed_memory32->address_length,
@@ -150,7 +150,7 @@ bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res)switch (ares->type) {case ACPI_RESOURCE_TYPE_IO : io = &ares->data.io; -if (!io->address_length) +if (!io->minimum && !io->address_length)return false; acpi_dev_get_ioresource(res, io->minimum, io->address_length,
@@ -158,7 +158,7 @@ bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res)break ;case ACPI_RESOURCE_TYPE_FIXED_IO : fixed_io = &ares->data.fixed_io; -if (!fixed_io->address_length) +if (!fixed_io->address && !fixed_io->address_length)return false; acpi_dev_get_ioresource(res, fixed_io->address, fixed_io->address_length,
drivers/ata/ahci_imx.c +31 -4
@@ -58,6 +58,8 @@ enum ahci_imx_type {struct imx_ahci_priv {struct platform_device *ahci_pdev;enum ahci_imx_type type; +struct clk *sata_clk; +struct clk *sata_ref_clk;struct clk *ahb_clk;struct regmap *gpr;bool no_device;
@@ -224,7 +226,7 @@ static int imx_sata_enable(struct ahci_host_priv *hpriv)return ret; } - ret =ahci_platform_enable_clks (hpriv); + ret =clk_prepare_enable (imxpriv->sata_ref_clk);if (ret <0 ) goto disable_regulator;
@@ -291,7 +293,7 @@ static void imx_sata_disable(struct ahci_host_priv *hpriv) !IMX6Q_GPR13_SATA_MPLL_CLK_EN); } -ahci_platform_disable_clks (hpriv); +clk_disable_unprepare (imxpriv->sata_ref_clk);if (hpriv->target_pwr)regulator_disable (hpriv->target_pwr);
@@ -385,6 +387,19 @@ static int imx_ahci_probe(struct platform_device *pdev) imxpriv->no_device = false; imxpriv->first_time = true; imxpriv->type = (enum ahci_imx_type )of_id->data; + + imxpriv->sata_clk =devm_clk_get (dev,"sata" ); +if (IS_ERR (imxpriv->sata_clk)) { +dev_err (dev,"can't get sata clock.\n" ); +return PTR_ERR (imxpriv->sata_clk); + } + + imxpriv->sata_ref_clk =devm_clk_get (dev,"sata_ref" ); +if (IS_ERR (imxpriv->sata_ref_clk)) { +dev_err (dev,"can't get sata_ref clock.\n" ); +return PTR_ERR (imxpriv->sata_ref_clk); + } + imxpriv->ahb_clk =devm_clk_get (dev,"ahb" );if (IS_ERR (imxpriv->ahb_clk)) {dev_err (dev,"can't get ahb clock.\n" );
@@ -407,10 +422,14 @@ static int imx_ahci_probe(struct platform_device *pdev) hpriv->plat_data = imxpriv; - ret =imx_sata_enable (hpriv); + ret =clk_prepare_enable (imxpriv->sata_clk);if (ret)return ret; + ret =imx_sata_enable (hpriv); +if (ret) + goto disable_clk; +/* * Configure the HWINIT bits of the HOST_CAP and HOST_PORTS_IMPL, * and IP vendor specific register IMX_TIMER1MS.
@@ -434,16 +453,24 @@ static int imx_ahci_probe(struct platform_device *pdev) ret =ahci_platform_init_host (pdev, hpriv, &ahci_imx_port_info,0 ,0 );if (ret) -imx_sata_disable (hpriv); + goto disable_sata; + +return 0 ; +disable_sata: +imx_sata_disable (hpriv); +disable_clk: +clk_disable_unprepare (imxpriv->sata_clk);return ret; }static void ahci_imx_host_stop (struct ata_host *host) {struct ahci_host_priv *hpriv = host->private_data; +struct imx_ahci_priv *imxpriv = hpriv->plat_data;imx_sata_disable (hpriv); +clk_disable_unprepare (imxpriv->sata_clk); }#ifdef CONFIG_PM_SLEEP
drivers/base/dma-contiguous.c +11 -1
@@ -155,13 +155,23 @@ static int __init cma_activate_area(struct cma *cma) base_pfn = pfn;for (j = pageblock_nr_pages; j; --j, pfn++) {WARN_ON_ONCE (!pfn_valid (pfn)); +/* +* alloc_contig_range requires the pfn range +* specified to be in the same zone. Make this +* simple by forcing the entire CMA resv range +* to be in the same zone. +*/ if (page_zone (pfn_to_page (pfn)) != zone) -return -EINVAL ; + goto err; }init_cma_reserved_pageblock (pfn_to_page (base_pfn)); }while (--i);return 0 ; + +err: +kfree (cma->bitmap); +return -EINVAL ; }static struct cma cma_areas[MAX_CMA_AREAS ];
drivers/char/i8k.c +3 -1
@@ -138,7 +138,9 @@ static int i8k_smm(struct smm_regs *regs)if (!alloc_cpumask_var (&old_mask,GFP_KERNEL ))return -ENOMEM ;cpumask_copy (old_mask, ¤t->cpus_allowed); -set_cpus_allowed_ptr (current,cpumask_of (0 )); + rc =set_cpus_allowed_ptr (current,cpumask_of (0 )); +if (rc) + goto out;if (smp_processor_id () !=0 ) { rc = -EBUSY ; goto out;
drivers/clk/clk-s2mps11.c +2 -5
@@ -206,16 +206,13 @@ static int s2mps11_clk_probe(struct platform_device *pdev) goto err_reg; } - s2mps11_clk->lookup =devm_kzalloc (&pdev->dev, -sizeof (struct clk_lookup ),GFP_KERNEL ); + s2mps11_clk->lookup =clkdev_alloc (s2mps11_clk->clk, +s2mps11_name (s2mps11_clk),NULL );if (!s2mps11_clk->lookup) { ret = -ENOMEM ; goto err_lup; } - s2mps11_clk->lookup->con_id =s2mps11_name (s2mps11_clk); - s2mps11_clk->lookup->clk = s2mps11_clk->clk; -clkdev_add (s2mps11_clk->lookup); }
drivers/clk/qcom/mmcc-msm8960.c +1 -1
@@ -1208,7 +1208,7 @@ static struct clk_branch rot_clk = {static u8 mmcc_pxo_hdmi_map[] = { [P_PXO ] =0 , - [P_HDMI_PLL ] =2 , + [P_HDMI_PLL ] =3 , };static const char *mmcc_pxo_hdmi[] = {
drivers/clk/spear/spear3xx_clock.c +1 -1
@@ -211,7 +211,7 @@ static inline void spear310_clk_init(void) { }/* array of all spear 320 clock lookups */ #ifdef CONFIG_MACH_SPEAR320 -#define SPEAR320_CONTROL_REG (soc_config_base + 0x0000) +#define SPEAR320_CONTROL_REG (soc_config_base + 0x0010)#define SPEAR320_EXT_CTRL_REG (soc_config_base + 0x0018)#define SPEAR320_UARTX_PCLK_MASK 0x1
drivers/cpufreq/Makefile +1 -1
@@ -47,7 +47,7 @@ obj-$(CONFIG_ARM_BIG_LITTLE_CPUFREQ) += arm_big_little.o # LITTLE drivers, so that it is probed last. obj-$(CONFIG_ARM_DT_BL_CPUFREQ) += arm_big_little_dt.o -obj-$(CONFIG_ARCH_DAVINCI_DA850) += davinci-cpufreq.o +obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += exynos-cpufreq.o obj-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o
drivers/cpufreq/intel_pstate.c +22 -13
@@ -132,6 +132,7 @@ static struct pstate_funcs pstate_funcs;struct perf_limits {int no_turbo; +int turbo_disabled;int max_perf_pct;int min_perf_pct;int32_t max_perf;
@@ -291,7 +292,10 @@ static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,if (ret !=1 )return -EINVAL ; limits.no_turbo =clamp_t (int, input,0 ,1 ); - +if (limits.turbo_disabled) { +pr_warn ("Turbo disabled by BIOS or unavailable on processor\n" ); + limits.no_turbo = limits.turbo_disabled; + }return count; }
@@ -361,21 +365,21 @@ static int byt_get_min_pstate(void) {u64 value;rdmsrl (BYT_RATIOS , value); -return (value >>8 ) &0x3F ; +return (value >>8 ) &0x7F ; }static int byt_get_max_pstate (void ) {u64 value;rdmsrl (BYT_RATIOS , value); -return (value >>16 ) &0x3F ; +return (value >>16 ) &0x7F ; }static int byt_get_turbo_pstate (void ) {u64 value;rdmsrl (BYT_TURBO_RATIOS , value); -return value &0x3F ; +return value &0x7F ; }static void byt_set_pstate (struct cpudata *cpudata,int pstate)
@@ -385,7 +389,7 @@ static void byt_set_pstate(struct cpudata *cpudata, int pstate)u32 vid; val = pstate <<8 ; -if (limits.no_turbo) +if (limits.no_turbo && !limits.turbo_disabled) val |= (u64 )1 <<32 ; vid_fp = cpudata->vid.min + mul_fp(
@@ -409,8 +413,8 @@ static void byt_get_vid(struct cpudata *cpudata)rdmsrl (BYT_VIDS , value); - cpudata->vid.min =int_tofp ((value >>8 ) &0x3f ); - cpudata->vid.max =int_tofp ((value >>16 ) &0x3f ); + cpudata->vid.min =int_tofp ((value >>8 ) &0x7f ); + cpudata->vid.max =int_tofp ((value >>16 ) &0x7f ); cpudata->vid.ratio = div_fp( cpudata->vid.max - cpudata->vid.min, int_tofp(cpudata->pstate.max_pstate -
@@ -452,7 +456,7 @@ static void core_set_pstate(struct cpudata *cpudata, int pstate)u64 val; val = pstate <<8 ; -if (limits.no_turbo) +if (limits.no_turbo && !limits.turbo_disabled) val |= (u64 )1 <<32 ;wrmsrl_on_cpu (cpudata->cpu,MSR_IA32_PERF_CTL , val);
@@ -705,9 +709,8 @@ static int intel_pstate_init_cpu(unsigned int cpunum) cpu = all_cpu_data[cpunum]; -intel_pstate_get_cpu_pstates (cpu); - cpu->cpu = cpunum; +intel_pstate_get_cpu_pstates (cpu);init_timer_deferrable (&cpu->timer); cpu->timer.function = intel_pstate_timer_func;
@@ -750,7 +753,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) limits.min_perf =int_tofp (1 ); limits.max_perf_pct =100 ; limits.max_perf =int_tofp (1 ); - limits.no_turbo =0 ; + limits.no_turbo = limits.turbo_disabled;return 0 ; } limits.min_perf_pct = (policy->min *100 ) / policy->cpuinfo.max_freq;
@@ -793,6 +796,7 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy) {struct cpudata *cpu;int rc; +u64 misc_en; rc =intel_pstate_init_cpu (policy->cpu);if (rc)
@@ -800,8 +804,13 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy) cpu = all_cpu_data[policy->cpu]; -if (!limits.no_turbo && - limits.min_perf_pct ==100 && limits.max_perf_pct ==100 ) +rdmsrl (MSR_IA32_MISC_ENABLE , misc_en); +if (misc_en &MSR_IA32_MISC_ENABLE_TURBO_DISABLE || + cpu->pstate.max_pstate == cpu->pstate.turbo_pstate) { + limits.turbo_disabled =1 ; + limits.no_turbo =1 ; + } +if (limits.min_perf_pct ==100 && limits.max_perf_pct ==100 ) policy->policy =CPUFREQ_POLICY_PERFORMANCE ;else policy->policy =CPUFREQ_POLICY_POWERSAVE ;
drivers/crypto/caam/jr.c +3 -5
@@ -453,8 +453,8 @@ static int caam_jr_probe(struct platform_device *pdev)int error; jrdev = &pdev->dev; - jrpriv =kmalloc (sizeof (struct caam_drv_private_jr ), -GFP_KERNEL ); + jrpriv =devm_kmalloc (jrdev,sizeof (struct caam_drv_private_jr ), +GFP_KERNEL );if (!jrpriv)return -ENOMEM ;
@@ -487,10 +487,8 @@ static int caam_jr_probe(struct platform_device *pdev)/* Now do the platform independent part */ error =caam_jr_init (jrdev);/* now turn on hardware */ -if (error) { -kfree (jrpriv); +if (error)return error; - } jrpriv->dev = jrdev;spin_lock (&driver_data.jr_alloc_lock);
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -803,6 +803,7 @@ enum intel_sbi_destination {#define QUIRK_PIPEA_FORCE (1<<0)#define QUIRK_LVDS_SSC_DISABLE (1<<1)#define QUIRK_INVERT_BRIGHTNESS (1<<2) +#define QUIRK_BACKLIGHT_PRESENT (1<<3)struct intel_fbdev ;struct intel_fbc_work ;
drivers/gpu/drm/i915/i915_gem_stolen.c +44 -0
50 lines not on this page · raw message
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -659,6 +659,9 @@ enum punit_power_well {/* * Instruction and interrupt control regs */ +#define PGTBL_CTL 0x02020 +#define PGTBL_ADDRESS_LO_MASK 0xfffff000/* bits [31:12] */ +#define PGTBL_ADDRESS_HI_MASK 0x000000f0/* bits [35:32] (gen4) */ #define PGTBL_ER 0x02024#define RENDER_RING_BASE 0x02000#define BSD_RING_BASE 0x04000
drivers/gpu/drm/i915/intel_display.c +14 -0
@@ -11166,6 +11166,14 @@ static void quirk_invert_brightness(struct drm_device *dev)DRM_INFO ("applying inverted panel brightness quirk\n" ); } +/* Some VBT's incorrectly indicate no backlight is present */ +static void quirk_backlight_present (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; + dev_priv->quirks |=QUIRK_BACKLIGHT_PRESENT ; +DRM_INFO ("applying backlight present quirk\n" ); +} +struct intel_quirk {int device;int subsystem_vendor;
@@ -11237,6 +11245,12 @@ static struct intel_quirk intel_quirks[] = {/* Acer Aspire 5336 */ { 0x2a42, 0x1025, 0x048a, quirk_invert_brightness }, + +/* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */ + { 0x0a06, 0x1025, 0x0a11, quirk_backlight_present }, + +/* Toshiba CB35 Chromebook (Celeron 2955U) */ + { 0x0a06, 0x1179, 0x0a88, quirk_backlight_present }, };static void intel_init_quirks (struct drm_device *dev)
drivers/gpu/drm/i915/intel_panel.c +6 -2
@@ -1065,8 +1065,12 @@ int intel_panel_setup_backlight(struct drm_connector *connector)int ret;if (!dev_priv->vbt.backlight.present) { -DRM_DEBUG_KMS ("native backlight control not available per VBT\n" ); -return 0 ; +if (dev_priv->quirks &QUIRK_BACKLIGHT_PRESENT ) { +DRM_DEBUG_KMS ("no backlight present per VBT, but present per quirk\n" ); + }else { +DRM_DEBUG_KMS ("no backlight present per VBT\n" ); +return 0 ; + } }/* set level and max in panel struct */
drivers/gpu/drm/radeon/ci_dpm.c +1 -1
@@ -1179,7 +1179,7 @@ static int ci_stop_dpm(struct radeon_device *rdev) tmp &= ~GLOBAL_PWRMGT_EN ;WREG32_SMC (GENERAL_PWRMGT , tmp); - tmp =RREG32 (SCLK_PWRMGT_CNTL ); + tmp =RREG32_SMC (SCLK_PWRMGT_CNTL ); tmp &= ~DYNAMIC_PM_EN ;WREG32_SMC (SCLK_PWRMGT_CNTL , tmp);
drivers/gpu/drm/radeon/evergreen.c +4 -4
@@ -189,7 +189,7 @@ static const u32 evergreen_golden_registers[] =0x8c1c ,0xffffffff ,0x00001010 ,0x28350 ,0xffffffff ,0x00000000 ,0xa008 ,0xffffffff ,0x00010000 , -0x5cc ,0xffffffff ,0x00000001 , +0x5c4 ,0xffffffff ,0x00000001 ,0x9508 ,0xffffffff ,0x00000002 ,0x913c ,0x0000000f ,0x0000000a };
@@ -476,7 +476,7 @@ static const u32 cedar_golden_registers[] =0x8c1c ,0xffffffff ,0x00001010 ,0x28350 ,0xffffffff ,0x00000000 ,0xa008 ,0xffffffff ,0x00010000 , -0x5cc ,0xffffffff ,0x00000001 , +0x5c4 ,0xffffffff ,0x00000001 ,0x9508 ,0xffffffff ,0x00000002 };
@@ -635,7 +635,7 @@ static const u32 juniper_mgcg_init[] =static const u32 supersumo_golden_registers[] = {0x5eb4 ,0xffffffff ,0x00000002 , -0x5cc ,0xffffffff ,0x00000001 , +0x5c4 ,0xffffffff ,0x00000001 ,0x7030 ,0xffffffff ,0x00000011 ,0x7c30 ,0xffffffff ,0x00000011 ,0x6104 ,0x01000300 ,0x00000000 ,
@@ -719,7 +719,7 @@ static const u32 sumo_golden_registers[] =static const u32 wrestler_golden_registers[] = {0x5eb4 ,0xffffffff ,0x00000002 , -0x5cc ,0xffffffff ,0x00000001 , +0x5c4 ,0xffffffff ,0x00000001 ,0x7030 ,0xffffffff ,0x00000011 ,0x7c30 ,0xffffffff ,0x00000011 ,0x6104 ,0x01000300 ,0x00000000 ,
drivers/gpu/drm/radeon/radeon_vm.c +2 -2
@@ -493,7 +493,7 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,mutex_unlock (&vm->mutex); r =radeon_bo_create (rdev,RADEON_VM_PTE_COUNT *8 , -RADEON_GPU_PAGE_SIZE , false, +RADEON_GPU_PAGE_SIZE , true,RADEON_GEM_DOMAIN_VRAM ,NULL , &pt);if (r)return r;
@@ -913,7 +913,7 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm)return -ENOMEM ; } - r =radeon_bo_create (rdev, pd_size,RADEON_VM_PTB_ALIGN_SIZE , false, + r =radeon_bo_create (rdev, pd_size,RADEON_VM_PTB_ALIGN_SIZE , true,RADEON_GEM_DOMAIN_VRAM ,NULL , &vm->page_directory);if (r)
drivers/gpu/drm/radeon/rs600.c +4 -2
@@ -646,8 +646,10 @@ int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)return -EINVAL ; } addr = addr &0xFFFFFFFFFFFFF000ULL ; - addr |=R600_PTE_VALID |R600_PTE_SYSTEM |R600_PTE_SNOOPED ; - addr |=R600_PTE_READABLE |R600_PTE_WRITEABLE ; +if (addr != rdev->dummy_page.addr) + addr |=R600_PTE_VALID |R600_PTE_READABLE | +R600_PTE_WRITEABLE ; + addr |=R600_PTE_SYSTEM |R600_PTE_SNOOPED ;writeq (addr, ptr + (i *8 ));return 0 ; }
drivers/gpu/drm/radeon/rv770_dpm.c +0 -6
@@ -2329,12 +2329,6 @@ 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/hv/connection.c +6 -2
@@ -319,9 +319,13 @@ static void process_chn_event(u32 relid)*/ do { -hv_begin_read (&channel->inbound); +if (read_state) +hv_begin_read (&channel->inbound); channel->onchannel_callback (arg); - bytes_to_read =hv_end_read (&channel->inbound); +if (read_state) + bytes_to_read =hv_end_read (&channel->inbound); +else + bytes_to_read =0 ; }while (read_state && (bytes_to_read !=0 )); }else {pr_err ("no channel callback for relid - %u\n" , relid);
drivers/hwmon/adc128d818.c +14 -14
@@ -239,50 +239,50 @@ static ssize_t adc128_show_alarm(struct device *dev,return sprintf (buf,"%u\n" , !!(alarms & mask)); } -static SENSOR_DEVICE_ATTR_2(in0_input, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 0, 0); +static SENSOR_DEVICE_ATTR_2(in0_input, S_IRUGO, + adc128_show_in, NULL, 0, 0); static SENSOR_DEVICE_ATTR_2(in0_min, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 0, 1); static SENSOR_DEVICE_ATTR_2(in0_max, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 0, 2); -static SENSOR_DEVICE_ATTR_2(in1_input, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 1, 0); +static SENSOR_DEVICE_ATTR_2(in1_input, S_IRUGO, + adc128_show_in, NULL, 1, 0); static SENSOR_DEVICE_ATTR_2(in1_min, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 1, 1); static SENSOR_DEVICE_ATTR_2(in1_max, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 1, 2); -static SENSOR_DEVICE_ATTR_2(in2_input, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 2, 0); +static SENSOR_DEVICE_ATTR_2(in2_input, S_IRUGO, + adc128_show_in, NULL, 2, 0); static SENSOR_DEVICE_ATTR_2(in2_min, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 2, 1); static SENSOR_DEVICE_ATTR_2(in2_max, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 2, 2); -static SENSOR_DEVICE_ATTR_2(in3_input, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 3, 0); +static SENSOR_DEVICE_ATTR_2(in3_input, S_IRUGO, + adc128_show_in, NULL, 3, 0); static SENSOR_DEVICE_ATTR_2(in3_min, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 3, 1); static SENSOR_DEVICE_ATTR_2(in3_max, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 3, 2); -static SENSOR_DEVICE_ATTR_2(in4_input, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 4, 0); +static SENSOR_DEVICE_ATTR_2(in4_input, S_IRUGO, + adc128_show_in, NULL, 4, 0); static SENSOR_DEVICE_ATTR_2(in4_min, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 4, 1); static SENSOR_DEVICE_ATTR_2(in4_max, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 4, 2); -static SENSOR_DEVICE_ATTR_2(in5_input, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 5, 0); +static SENSOR_DEVICE_ATTR_2(in5_input, S_IRUGO, + adc128_show_in, NULL, 5, 0); static SENSOR_DEVICE_ATTR_2(in5_min, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 5, 1); static SENSOR_DEVICE_ATTR_2(in5_max, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 5, 2); -static SENSOR_DEVICE_ATTR_2(in6_input, S_IWUSR | S_IRUGO, - adc128_show_in, adc128_set_in, 6, 0); +static SENSOR_DEVICE_ATTR_2(in6_input, S_IRUGO, + adc128_show_in, NULL, 6, 0); static SENSOR_DEVICE_ATTR_2(in6_min, S_IWUSR | S_IRUGO, adc128_show_in, adc128_set_in, 6, 1); static SENSOR_DEVICE_ATTR_2(in6_max, S_IWUSR | S_IRUGO,
drivers/hwmon/adm1021.c +8 -6
@@ -185,7 +185,7 @@ static ssize_t set_temp_max(struct device *dev,struct adm1021_data *data =dev_get_drvdata (dev);struct i2c_client *client = data->client;long temp; -int err; +int reg_val, err; err =kstrtol (buf,10 , &temp);if (err)
@@ -193,10 +193,11 @@ static ssize_t set_temp_max(struct device *dev, temp /=1000 ;mutex_lock (&data->update_lock); - data->temp_max[index] =clamp_val (temp,-128 ,127 ); + reg_val =clamp_val (temp,-128 ,127 ); + data->temp_max[index] = reg_val *1000 ;if (!read_only)i2c_smbus_write_byte_data (client,ADM1021_REG_TOS_W (index), - data->temp_max[index]); + reg_val);mutex_unlock (&data->update_lock);return count;
@@ -210,7 +211,7 @@ static ssize_t set_temp_min(struct device *dev,struct adm1021_data *data =dev_get_drvdata (dev);struct i2c_client *client = data->client;long temp; -int err; +int reg_val, err; err =kstrtol (buf,10 , &temp);if (err)
@@ -218,10 +219,11 @@ static ssize_t set_temp_min(struct device *dev, temp /=1000 ;mutex_lock (&data->update_lock); - data->temp_min[index] =clamp_val (temp,-128 ,127 ); + reg_val =clamp_val (temp,-128 ,127 ); + data->temp_min[index] = reg_val *1000 ;if (!read_only)i2c_smbus_write_byte_data (client,ADM1021_REG_THYST_W (index), - data->temp_min[index]); + reg_val);mutex_unlock (&data->update_lock);return count;
drivers/hwmon/adm1029.c +3 -0
@@ -232,6 +232,9 @@ static ssize_t set_fan_div(struct device *dev,/* Update the value */ reg = (reg &0x3F ) | (val <<6 ); +/* Update the cache */ + data->fan_div[attr->index] = reg; +/* Write value */ i2c_smbus_write_byte_data (client,ADM1029_REG_FAN_DIV [attr->index], reg);
drivers/hwmon/adm1031.c +5 -3
@@ -365,6 +365,7 @@ set_auto_temp_min(struct device *dev, struct device_attribute *attr,if (ret)return ret; + val =clamp_val (val,0 ,127000 );mutex_lock (&data->update_lock); data->auto_temp[nr] =AUTO_TEMP_MIN_TO_REG (val, data->auto_temp[nr]); adm1031_write_value(client, ADM1031_REG_AUTO_TEMP(nr),
@@ -394,6 +395,7 @@ set_auto_temp_max(struct device *dev, struct device_attribute *attr,if (ret)return ret; + val =clamp_val (val,0 ,127000 );mutex_lock (&data->update_lock); data->temp_max[nr] =AUTO_TEMP_MAX_TO_REG (val, data->auto_temp[nr], data->pwm[nr]);
@@ -696,7 +698,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *attr,if (ret)return ret; - val =clamp_val (val,-55000 , nr ==0 ?127750 :127875 ); + val =clamp_val (val,-55000 ,127000 );mutex_lock (&data->update_lock); data->temp_min[nr] =TEMP_TO_REG (val); adm1031_write_value(client, ADM1031_REG_TEMP_MIN(nr),
@@ -717,7 +719,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *attr,if (ret)return ret; - val =clamp_val (val,-55000 , nr ==0 ?127750 :127875 ); + val =clamp_val (val,-55000 ,127000 );mutex_lock (&data->update_lock); data->temp_max[nr] =TEMP_TO_REG (val); adm1031_write_value(client, ADM1031_REG_TEMP_MAX(nr),
@@ -738,7 +740,7 @@ static ssize_t set_temp_crit(struct device *dev, struct device_attribute *attr,if (ret)return ret; - val =clamp_val (val,-55000 , nr ==0 ?127750 :127875 ); + val =clamp_val (val,-55000 ,127000 );mutex_lock (&data->update_lock); data->temp_crit[nr] =TEMP_TO_REG (val); adm1031_write_value(client, ADM1031_REG_TEMP_CRIT(nr),
drivers/hwmon/amc6821.c +1 -1
@@ -704,7 +704,7 @@ static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, get_temp_alarm, NULL, IDX_TEMP1_MAX); static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, get_temp_alarm, NULL, IDX_TEMP1_CRIT); -static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO | S_IWUSR, +static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, get_temp, NULL, IDX_TEMP2_INPUT); static SENSOR_DEVICE_ATTR(temp2_min, S_IRUGO | S_IWUSR, get_temp, set_temp, IDX_TEMP2_MIN);
drivers/hwmon/emc2103.c +5 -10
@@ -250,9 +250,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *da,if (result <0 )return result; - val =DIV_ROUND_CLOSEST (val,1000 ); -if ((val <-63 ) || (val >127 )) -return -EINVAL ; + val =clamp_val (DIV_ROUND_CLOSEST (val,1000 ),-63 ,127 );mutex_lock (&data->update_lock); data->temp_min[nr] = val;
@@ -274,9 +272,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *da,if (result <0 )return result; - val =DIV_ROUND_CLOSEST (val,1000 ); -if ((val <-63 ) || (val >127 )) -return -EINVAL ; + val =clamp_val (DIV_ROUND_CLOSEST (val,1000 ),-63 ,127 );mutex_lock (&data->update_lock); data->temp_max[nr] = val;
@@ -390,15 +386,14 @@ static ssize_t set_fan_target(struct device *dev, struct device_attribute *da, {struct emc2103_data *data =emc2103_update_device (dev);struct i2c_client *client =to_i2c_client (dev); -long rpm_target; +unsigned long rpm_target; -int result =kstrtol (buf,10 , &rpm_target); +int result =kstrtoul (buf,10 , &rpm_target);if (result <0 )return result;/* Datasheet states 16384 as maximum RPM target (table 3.2) */ -if ((rpm_target <0 ) || (rpm_target >16384 )) -return -EINVAL ; + rpm_target =clamp_val (rpm_target,0 ,16384 );mutex_lock (&data->update_lock);
drivers/iio/adc/ti_am335x_adc.c +1 -1
@@ -374,7 +374,7 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,return -EAGAIN ; } } - map_val = chan->channel +TOTAL_CHANNELS ; + map_val = adc_dev->channel_step[chan->scan_index];/* * We check the complete FIFO. We programmed just one entry but in case
drivers/md/dm-io.c +8 -14
@@ -10,6 +10,7 @@#include <linux/device-mapper.h> #include <linux/bio.h> +#include <linux/completion.h> #include <linux/mempool.h> #include <linux/module.h> #include <linux/sched.h>
@@ -32,7 +33,7 @@ struct dm_io_client {struct io {unsigned long error_bits;atomic_t count; -struct task_struct *sleeper; +struct completion *wait;struct dm_io_client *client;io_notify_fn callback;void *context;
@@ -121,8 +122,8 @@ static void dec_count(struct io *io, unsigned int region, int error)invalidate_kernel_vmap_range (io->vma_invalidate_address, io->vma_invalidate_size); -if (io->sleeper) -wake_up_process (io->sleeper); +if (io->wait) +complete (io->wait);else {unsigned long r = io->error_bits;
@@ -387,6 +388,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions,*/ volatile char io_[sizeof (struct io ) + __alignof__(struct io ) -1 ];struct io *io = (struct io *)PTR_ALIGN (&io_, __alignof__(struct io )); +DECLARE_COMPLETION_ONSTACK (wait);if (num_regions >1 && (rw &RW_MASK ) !=WRITE ) {WARN_ON (1 );
@@ -395,7 +397,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions, io->error_bits =0 ;atomic_set (&io->count,1 );/* see dispatch_io() */ - io->sleeper = current; + io->wait = &wait; io->client = client; io->vma_invalidate_address = dp->vma_invalidate_address;
@@ -403,15 +405,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions,dispatch_io (rw, num_regions, where, dp, io,1 ); -while (1 ) { -set_current_state (TASK_UNINTERRUPTIBLE ); - -if (!atomic_read (&io->count)) -break ; - -io_schedule (); - } -set_current_state (TASK_RUNNING ); +wait_for_completion_io (&wait);if (error_bits) *error_bits = io->error_bits;
@@ -434,7 +428,7 @@ static int async_io(struct dm_io_client *client, unsigned int num_regions, io =mempool_alloc (client->pool,GFP_NOIO ); io->error_bits =0 ;atomic_set (&io->count,1 );/* see dispatch_io() */ - io->sleeper =NULL ; + io->wait =NULL ; io->client = client; io->callback = fn; io->context = context;
drivers/md/dm-mpath.c +3 -2
@@ -1620,8 +1620,9 @@ static int multipath_busy(struct dm_target *ti)spin_lock_irqsave (&m->lock, flags); -/* pg_init in progress, requeue until done */ -if (!pg_ready (m)) { +/* pg_init in progress or no paths available */ +if (m->pg_init_in_progress || + (!m->nr_valid_paths && m->queue_if_no_path)) { busy =1 ; goto out; }
drivers/md/dm.c +13 -2
@@ -54,6 +54,8 @@ static void do_deferred_remove(struct work_struct *w); static DECLARE_WORK(deferred_remove_work, do_deferred_remove); +static struct workqueue_struct *deferred_remove_workqueue; +/* * For bio-based dm. * One of these is allocated per bio.
@@ -276,16 +278,24 @@ static int __init local_init(void)if (r) goto out_free_rq_tio_cache; + deferred_remove_workqueue =alloc_workqueue ("kdmremove" ,WQ_UNBOUND ,1 ); +if (!deferred_remove_workqueue) { + r = -ENOMEM ; + goto out_uevent_exit; + } + _major = major; r =register_blkdev (_major, _name);if (r <0 ) - goto out_uevent_exit; + goto out_free_workqueue;if (!_major) _major = r;return 0 ; +out_free_workqueue: +destroy_workqueue (deferred_remove_workqueue); out_uevent_exit:dm_uevent_exit (); out_free_rq_tio_cache:
@@ -299,6 +309,7 @@ out_free_io_cache:static void local_exit (void ) {flush_scheduled_work (); +destroy_workqueue (deferred_remove_workqueue);kmem_cache_destroy (_rq_tio_cache);kmem_cache_destroy (_io_cache);
@@ -407,7 +418,7 @@ static void dm_blk_close(struct gendisk *disk, fmode_t mode)if (atomic_dec_and_test (&md->open_count) && (test_bit (DMF_DEFERRED_REMOVE , &md->flags))) -schedule_work (&deferred_remove_work); +queue_work (deferred_remove_workqueue, &deferred_remove_work);dm_put (md);
drivers/mtd/nand/omap2.c +5 -5
@@ -1162,7 +1162,7 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,struct gpmc_nand_regs *gpmc_regs = &info->reg;u8 *ecc_code;unsigned long nsectors, bch_val1, bch_val2, bch_val3, bch_val4; -int i; +int i, j; nsectors = ((readl (info->reg.gpmc_ecc_config) >>4 ) &0x7 ) +1 ;for (i =0 ; i < nsectors; i++) {
@@ -1210,8 +1210,8 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,case OMAP_ECC_BCH4_CODE_HW_DETECTION_SW :/* Add constant polynomial to remainder, so that * ECC of blank pages results in 0x0 on reading back */ -for (i =0 ; i < eccbytes; i++) - ecc_calc[i] ^= bch4_polynomial[i]; +for (j =0 ; j < eccbytes; j++) + ecc_calc[j] ^= bch4_polynomial[j];break ;case OMAP_ECC_BCH4_CODE_HW :/* Set 8th ECC byte as 0x0 for ROM compatibility */
@@ -1220,8 +1220,8 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,case OMAP_ECC_BCH8_CODE_HW_DETECTION_SW :/* Add constant polynomial to remainder, so that * ECC of blank pages results in 0x0 on reading back */ -for (i =0 ; i < eccbytes; i++) - ecc_calc[i] ^= bch8_polynomial[i]; +for (j =0 ; j < eccbytes; j++) + ecc_calc[j] ^= bch8_polynomial[j];break ;case OMAP_ECC_BCH8_CODE_HW :/* Set 14th ECC byte as 0x0 for ROM compatibility */
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
@@ -4310,7 +4310,7 @@ int i40e_vsi_open(struct i40e_vsi *vsi) goto err_setup_rx;if (!vsi->netdev) { - err =EINVAL ; + err = -EINVAL ; goto err_setup_rx; } snprintf(int_name, sizeof(int_name) - 1, "%s-%s",
drivers/pci/pci.c +7 -2
@@ -3109,8 +3109,13 @@ static int pci_af_flr(struct pci_dev *dev, int probe)if (probe)return 0 ; -/* Wait for Transaction Pending bit clean */ -if (pci_wait_for_pending (dev, pos +PCI_AF_STATUS ,PCI_AF_STATUS_TP )) +/* +* Wait for Transaction Pending bit to clear. A word-aligned test +* is used, so we use the conrol offset rather than status and shift +* the test bit to match. +*/ +if (pci_wait_for_pending (dev, pos +PCI_AF_CTRL , +PCI_AF_STATUS_TP <<8 )) goto clear; dev_err(&dev->dev, "transaction is not cleared; "
drivers/phy/phy-core.c +4 -3
@@ -614,8 +614,9 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,return phy; put_dev: -put_device (&phy->dev); -ida_remove (&phy_ida, phy->id); +put_device (&phy->dev);/* calls phy_release() which frees resources */ +return ERR_PTR (ret); + free_phy:kfree (phy);return ERR_PTR (ret);
@@ -799,7 +800,7 @@ static void phy_release(struct device *dev) phy =to_phy (dev);dev_vdbg (dev,"releasing '%s'\n" ,dev_name (dev)); -ida_remove (&phy_ida, phy->id); +ida_simple_remove (&phy_ida, phy->id);kfree (phy); }
drivers/rtc/rtc-puv3.c +2 -2
@@ -71,7 +71,7 @@ static int puv3_rtc_setpie(struct device *dev, int enabled) {unsigned int tmp; -dev_debug (dev,"%s: pie=%d\n" , __func__, enabled); +dev_dbg (dev,"%s: pie=%d\n" , __func__, enabled);spin_lock_irq (&puv3_rtc_pie_lock); tmp =readl (RTC_RTSR ) & ~RTC_RTSR_HZE ;
@@ -140,7 +140,7 @@ static int puv3_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)rtc_tm_to_time (tm, &rtcalarm_count);writel (rtcalarm_count,RTC_RTAR ); -puv3_rtc_setaie (&dev->dev, alrm->enabled); +puv3_rtc_setaie (dev, alrm->enabled);if (alrm->enabled)enable_irq_wake (puv3_rtc_alarmno);
drivers/thermal/thermal_hwmon.c +18 -15
@@ -140,6 +140,12 @@ thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon,return NULL ; } +static bool thermal_zone_crit_temp_valid (struct thermal_zone_device *tz) +{ +unsigned long temp; +return tz->ops->get_crit_temp && !tz->ops->get_crit_temp (tz, &temp); +} +int thermal_add_hwmon_sysfs (struct thermal_zone_device *tz) {struct thermal_hwmon_device *hwmon;
@@ -189,21 +195,18 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)if (result) goto free_temp_mem; -if (tz->ops->get_crit_temp) { -unsigned long temperature; -if (!tz->ops->get_crit_temp (tz, &temperature)) { -snprintf (temp->temp_crit.name, -sizeof (temp->temp_crit.name), +if (thermal_zone_crit_temp_valid (tz)) { +snprintf (temp->temp_crit.name, +sizeof (temp->temp_crit.name),"temp%d_crit" , hwmon->count); - temp->temp_crit.attr.attr.name = temp->temp_crit.name; - temp->temp_crit.attr.attr.mode =0444 ; - temp->temp_crit.attr.show = temp_crit_show; -sysfs_attr_init (&temp->temp_crit.attr.attr); - result =device_create_file (hwmon->device, - &temp->temp_crit.attr); -if (result) - goto unregister_input; - } + temp->temp_crit.attr.attr.name = temp->temp_crit.name; + temp->temp_crit.attr.attr.mode =0444 ; + temp->temp_crit.attr.show = temp_crit_show; +sysfs_attr_init (&temp->temp_crit.attr.attr); + result =device_create_file (hwmon->device, + &temp->temp_crit.attr); +if (result) + goto unregister_input; }mutex_lock (&thermal_hwmon_list_lock);
@@ -250,7 +253,7 @@ void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) }device_remove_file (hwmon->device, &temp->temp_input.attr); -if (tz->ops->get_crit_temp) +if (thermal_zone_crit_temp_valid (tz))device_remove_file (hwmon->device, &temp->temp_crit.attr);mutex_lock (&thermal_hwmon_list_lock);
drivers/tty/serial/imx.c +3 -0
@@ -563,6 +563,9 @@ static void imx_start_tx(struct uart_port *port)struct imx_port *sport = (struct imx_port *)port;unsigned long temp; +if (uart_circ_empty (&port->state->xmit)) +return ; +if (USE_IRDA (sport)) {/* half duplex in IrDA mode; have to disable receive mode */ temp =readl (sport->port.membase +UCR4 );
drivers/tty/serial/ip22zilog.c +2 -0
@@ -603,6 +603,8 @@ static void ip22zilog_start_tx(struct uart_port *port) }else {struct circ_buf *xmit = &port->state->xmit; +if (uart_circ_empty (xmit)) +return ;writeb (xmit->buf[xmit->tail], &channel->data);ZSDELAY ();ZS_WSYNC (channel);
drivers/tty/serial/m32r_sio.c +5 -3
@@ -266,9 +266,11 @@ static void m32r_sio_start_tx(struct uart_port *port)if (!(up->ier &UART_IER_THRI )) { up->ier |=UART_IER_THRI ;serial_out (up,UART_IER , up->ier); -serial_out (up,UART_TX , xmit->buf[xmit->tail]); - xmit->tail = (xmit->tail +1 ) & (UART_XMIT_SIZE -1 ); - up->port.icount.tx++; +if (!uart_circ_empty (xmit)) { +serial_out (up,UART_TX , xmit->buf[xmit->tail]); + xmit->tail = (xmit->tail +1 ) & (UART_XMIT_SIZE -1 ); + up->port.icount.tx++; + } }while ((serial_in (up,UART_LSR ) &UART_EMPTY ) !=UART_EMPTY );#else
drivers/tty/serial/pmac_zilog.c +3 -0
@@ -653,6 +653,8 @@ static void pmz_start_tx(struct uart_port *port) }else {struct circ_buf *xmit = &port->state->xmit; +if (uart_circ_empty (xmit)) + goto out;write_zsdata (uap, xmit->buf[xmit->tail]);zssync (uap); xmit->tail = (xmit->tail +1 ) & (UART_XMIT_SIZE -1 );
@@ -661,6 +663,7 @@ static void pmz_start_tx(struct uart_port *port)if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS )uart_write_wakeup (&uap->port); } + out:pmz_debug ("pmz: start_tx() done.\n" ); }
drivers/tty/serial/sunsab.c +3 -0
@@ -427,6 +427,9 @@ static void sunsab_start_tx(struct uart_port *port)struct circ_buf *xmit = &up->port.state->xmit;int i; +if (uart_circ_empty (xmit)) +return ; + up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS |SAB82532_IMR1_XPR );writeb (up->interrupt_mask1, &up->regs->w.imr1);
drivers/tty/serial/sunzilog.c +2 -0
@@ -703,6 +703,8 @@ static void sunzilog_start_tx(struct uart_port *port) }else {struct circ_buf *xmit = &port->state->xmit; +if (uart_circ_empty (xmit)) +return ;writeb (xmit->buf[xmit->tail], &channel->data);ZSDELAY ();ZS_WSYNC (channel);
drivers/usb/serial/cp210x.c +1 -0
@@ -153,6 +153,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ + { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
drivers/usb/serial/ftdi_sio.c +4 -1
@@ -720,7 +720,8 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) }, { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, - { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, + { USB_DEVICE(TESTO_VID, TESTO_1_PID) }, + { USB_DEVICE(TESTO_VID, TESTO_3_PID) }, { USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) }, { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13M_PID) }, { USB_DEVICE(FTDI_VID, FTDI_TACTRIX_OPENPORT_13S_PID) },
@@ -944,6 +945,8 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_2_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_3_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_4_PID) }, +/* Infineon Devices */ + { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) }, { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +8 -1
@@ -584,6 +584,12 @@#define RATOC_PRODUCT_ID_USB60F 0xb020/* +* Infineon Technologies +*/ +#define INFINEON_VID 0x058b +#define INFINEON_TRIBOARD_PID 0x0028/* DAS JTAG TriBoard TC1798 V1.0 */ + +/* * Acton Research Corp. */ #define ACTON_VID 0x0647/* Vendor ID */
@@ -798,7 +804,8 @@* Submitted by Colin Leroy */ #define TESTO_VID 0x128D -#define TESTO_USB_INTERFACE_PID 0x0001 +#define TESTO_1_PID 0x0001 +#define TESTO_3_PID 0x0003/* * Mobility Electronics products.
drivers/usb/serial/option.c +2 -0
@@ -1487,6 +1487,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff), /* ZTE MF91 */ .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff), /* Telewell TW-LTE 4G v2 */ + .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
fs/ext4/extents_status.c +2 -2
@@ -960,10 +960,10 @@ retry:continue ; } -if (ei->i_es_lru_nr ==0 || ei == locked_ei) +if (ei->i_es_lru_nr ==0 || ei == locked_ei || + !write_trylock (&ei->i_es_lock))continue ; -write_lock (&ei->i_es_lock); shrunk =__es_try_to_reclaim_extents (ei, nr_to_scan);if (ei->i_es_lru_nr ==0 )list_del_init (&ei->i_es_lru);
fs/ext4/ialloc.c +7 -7
@@ -851,6 +851,13 @@ got: goto out; } +BUFFER_TRACE (group_desc_bh,"get_write_access" ); + err =ext4_journal_get_write_access (handle, group_desc_bh); +if (err) { +ext4_std_error (sb, err); + goto out; + } +/* We may have to initialize the block bitmap if it isn't already */ if (ext4_has_group_desc_csum (sb) && gdp->bg_flags &cpu_to_le16 (EXT4_BG_BLOCK_UNINIT )) {
@@ -887,13 +894,6 @@ got: } } -BUFFER_TRACE (group_desc_bh,"get_write_access" ); - err =ext4_journal_get_write_access (handle, group_desc_bh); -if (err) { -ext4_std_error (sb, err); - goto out; - } -/* Update the relevant bg descriptor fields */ if (ext4_has_group_desc_csum (sb)) {int free;
fs/ext4/mballoc.c +2 -2
@@ -751,8 +751,8 @@ void ext4_mb_generate_buddy(struct super_block *sb,if (free != grp->bb_free) {ext4_grp_locked_error (sb, group,0 ,0 , -"%u clusters in bitmap, %u in gd; " -"block bitmap corrupt." , +"block bitmap and bg descriptor " +"inconsistent: %u vs %u free clusters" , free, grp->bb_free);/* * If we intend to continue, we consider group descriptor
fs/ext4/super.c +28 -32
132 lines not on this page · raw message
fs/f2fs/data.c +2 -1
@@ -869,7 +869,8 @@ static int f2fs_write_data_pages(struct address_space *mapping,return 0 ;if (S_ISDIR (inode->i_mode) && wbc->sync_mode ==WB_SYNC_NONE && -get_dirty_dents (inode) <nr_pages_to_skip (sbi,DATA )) +get_dirty_dents (inode) <nr_pages_to_skip (sbi,DATA ) && +available_free_memory (sbi,DIRTY_DENTS )) goto skip_write; diff =nr_pages_to_write (sbi,DATA , wbc);
fs/f2fs/f2fs.h +1 -0
@@ -1140,6 +1140,7 @@ f2fs_hash_t f2fs_dentry_hash(const char *, size_t);struct dnode_of_data ;struct node_info ; +bool available_free_memory (struct f2fs_sb_info *,int );int is_checkpointed_node (struct f2fs_sb_info *,nid_t );bool fsync_mark_done (struct f2fs_sb_info *,nid_t );void get_node_info (struct f2fs_sb_info *,nid_t ,struct node_info *);
fs/f2fs/node.c +28 -18
112 lines not on this page · raw message
fs/f2fs/node.h +3 -2
@@ -75,9 +75,10 @@ static inline void node_info_from_raw_nat(struct node_info *ni, ni->version = raw_ne->version; } -enum nid_type { +enum mem_type {FREE_NIDS ,/* indicates the free nid list */ -NAT_ENTRIES /* indicates the cached nat entry */ +NAT_ENTRIES ,/* indicates the cached nat entry */ +DIRTY_DENTS /* indicates dirty dentry pages */ };/*
fs/jbd2/transaction.c +4 -1
@@ -1588,9 +1588,12 @@ int jbd2_journal_stop(handle_t *handle)* to perform a synchronous write. We do this to detect the * case where a single process is doing a stream of sync * writes. No point in waiting for joiners in that case. +* +* Setting max_batch_time to 0 disables this completely. */ pid = current->pid; -if (handle->h_sync && journal->j_last_sync_writer != pid) { +if (handle->h_sync && journal->j_last_sync_writer != pid && + journal->j_max_batch_time) {u64 commit_time, trans_time; journal->j_last_sync_writer = pid;
fs/kernfs/dir.c +1 -0
@@ -714,6 +714,7 @@ struct kernfs_root *kernfs_create_root(struct kernfs_syscall_ops *scops,return ERR_PTR (-ENOMEM );ida_init (&root->ino_ida); +INIT_LIST_HEAD (&root->supers); kn =__kernfs_new_node (root,"" ,S_IFDIR |S_IRUGO |S_IXUGO ,KERNFS_DIR );
fs/kernfs/kernfs-internal.h +5 -0
@@ -49,6 +49,8 @@ static inline struct kernfs_root *kernfs_root(struct kernfs_node *kn)* mount.c */ struct kernfs_super_info { +struct super_block *sb; +/* * The root associated with this super_block. Each super_block is * identified by the root and ns it's associated with.
@@ -62,6 +64,9 @@ struct kernfs_super_info {* an array and compare kernfs_node tag against every entry. */ const void *ns; + +/* anchored at kernfs_root->supers, protected by kernfs_mutex */ +struct list_head node; };#define kernfs_info (SB ) ((struct kernfs_super_info *)(SB->s_fs_info))
fs/kernfs/mount.c +41 -0
71 lines not on this page · raw message
include/linux/kernfs.h +5 -0
@@ -161,6 +161,10 @@ struct kernfs_root {/* private fields, do not use outside kernfs proper */ struct ida ino_ida;struct kernfs_syscall_ops *syscall_ops; + +/* list of kernfs_super_info of this root, protected by kernfs_mutex */ +struct list_head supers; +wait_queue_head_t deactivate_waitq; };
@@ -300,6 +304,7 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, struct kernfs_root *root, unsigned long magic, bool *new_sb_created, const void *ns);void kernfs_kill_sb (struct super_block *sb); +struct super_block *kernfs_pin_sb (struct kernfs_root *root,const void *ns);void kernfs_init (void );
include/linux/ring_buffer.h +1 -1
@@ -97,7 +97,7 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k__ring_buffer_alloc ((size), (flags), &__key); \ }) -void ring_buffer_wait (struct ring_buffer *buffer,int cpu); +int ring_buffer_wait (struct ring_buffer *buffer,int cpu);int ring_buffer_poll_wait (struct ring_buffer *buffer,int cpu,struct file *filp,poll_table *poll_table);
kernel/cgroup.c +52 -1
84 lines not on this page · raw message
kernel/cpuset.c +7 -1
@@ -1188,7 +1188,13 @@ done:int current_cpuset_is_being_rebound (void ) { -return task_cs (current) == cpuset_being_rebound; +int ret; + +rcu_read_lock (); + ret =task_cs (current) == cpuset_being_rebound; +rcu_read_unlock (); + +return ret; }static int update_relax_domain_level (struct cpuset *cs,s64 val)
kernel/trace/ring_buffer.c +4 -1
@@ -543,7 +543,7 @@ static void rb_wake_up_waiters(struct irq_work *work)* as data is added to any of the @buffer's cpu buffers. Otherwise * it will wait for data to be added to a specific cpu buffer. */ -void ring_buffer_wait (struct ring_buffer *buffer,int cpu) +int ring_buffer_wait (struct ring_buffer *buffer,int cpu) {struct ring_buffer_per_cpu *cpu_buffer;DEFINE_WAIT (wait);
@@ -557,6 +557,8 @@ void ring_buffer_wait(struct ring_buffer *buffer, int cpu)if (cpu ==RING_BUFFER_ALL_CPUS ) work = &buffer->irq_work;else { +if (!cpumask_test_cpu (cpu, buffer->cpumask)) +return -ENODEV ; cpu_buffer = buffer->buffers[cpu]; work = &cpu_buffer->irq_work; }
@@ -591,6 +593,7 @@ void ring_buffer_wait(struct ring_buffer *buffer, int cpu)schedule ();finish_wait (&work->waiters, &wait); +return 0 ; }/**
kernel/trace/trace.c +18 -7
@@ -1103,13 +1103,13 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu) }#endif /* CONFIG_TRACER_MAX_TRACE */ -static void default_wait_pipe (struct trace_iterator *iter) +static int default_wait_pipe (struct trace_iterator *iter) {/* Iterators are static, they should be filled or empty */ if (trace_buffer_iter (iter, iter->cpu_file)) -return ; +return 0 ; -ring_buffer_wait (iter->trace_buffer->buffer, iter->cpu_file); +return ring_buffer_wait (iter->trace_buffer->buffer, iter->cpu_file); }#ifdef CONFIG_FTRACE_STARTUP_TEST
@@ -4236,17 +4236,19 @@ tracing_poll_pipe(struct file *filp, poll_table *poll_table)* * Anyway, this is really very primitive wakeup. */ -void poll_wait_pipe (struct trace_iterator *iter) +int poll_wait_pipe (struct trace_iterator *iter) {set_current_state (TASK_INTERRUPTIBLE );/* sleep for 100 msecs, and try again. */ schedule_timeout (HZ /10 ); +return 0 ; }/* Must be called with trace_types_lock mutex held. */ static int tracing_wait_pipe (struct file *filp) {struct trace_iterator *iter = filp->private_data; +int ret;while (trace_empty (iter)) {
@@ -4256,10 +4258,13 @@ static int tracing_wait_pipe(struct file *filp)mutex_unlock (&iter->mutex); - iter->trace->wait_pipe (iter); + ret = iter->trace->wait_pipe (iter);mutex_lock (&iter->mutex); +if (ret) +return ret; +if (signal_pending (current))return -EINTR ;
@@ -5196,8 +5201,12 @@ tracing_buffers_read(struct file *filp, char __user *ubuf, goto out_unlock; }mutex_unlock (&trace_types_lock); - iter->trace->wait_pipe (iter); + ret = iter->trace->wait_pipe (iter);mutex_lock (&trace_types_lock); +if (ret) { + size = ret; + goto out_unlock; + }if (signal_pending (current)) { size = -EINTR ; goto out_unlock;
@@ -5407,8 +5416,10 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos, goto out; }mutex_unlock (&trace_types_lock); - iter->trace->wait_pipe (iter); + ret = iter->trace->wait_pipe (iter);mutex_lock (&trace_types_lock); +if (ret) + goto out;if (signal_pending (current)) { ret = -EINTR ; goto out;
kernel/trace/trace.h +2 -2
@@ -342,7 +342,7 @@ struct tracer {void (*stop)(struct trace_array *tr);void (*open)(struct trace_iterator *iter);void (*pipe_open)(struct trace_iterator *iter); -void (*wait_pipe)(struct trace_iterator *iter); +int (*wait_pipe)(struct trace_iterator *iter);void (*close)(struct trace_iterator *iter);void (*pipe_close)(struct trace_iterator *iter); ssize_t (*read)(struct trace_iterator *iter,
@@ -560,7 +560,7 @@ void trace_init_global_iter(struct trace_iterator *iter);void tracing_iter_reset (struct trace_iterator *iter,int cpu); -void poll_wait_pipe (struct trace_iterator *iter); +int poll_wait_pipe (struct trace_iterator *iter); void tracing_sched_switch_trace(struct trace_array *tr, struct task_struct *prev,
kernel/workqueue.c +2 -1
@@ -3422,6 +3422,7 @@ int workqueue_sysfs_register(struct workqueue_struct *wq) } } +dev_set_uevent_suppress (&wq_dev->dev, false);kobject_uevent (&wq_dev->dev.kobj,KOBJ_ADD );return 0 ; }
@@ -5033,7 +5034,7 @@ static void __init wq_numa_init(void)BUG_ON (!tbl);for_each_node (node) -BUG_ON (!alloc_cpumask_var_node (&tbl[node],GFP_KERNEL , +BUG_ON (!zalloc_cpumask_var_node (&tbl[node],GFP_KERNEL ,node_online (node) ? node :NUMA_NO_NODE ));for_each_possible_cpu (cpu) {
mm/mempolicy.c +0 -2
@@ -2136,7 +2136,6 @@ struct mempolicy *__mpol_dup(struct mempolicy *old) }else *new = *old; -rcu_read_lock ();if (current_cpuset_is_being_rebound ()) {nodemask_t mems =cpuset_mems_allowed (current);if (new->flags &MPOL_F_REBINDING )
@@ -2144,7 +2143,6 @@ struct mempolicy *__mpol_dup(struct mempolicy *old)else mpol_rebind_policy (new, &mems,MPOL_REBIND_ONCE ); } -rcu_read_unlock ();atomic_set (&new->refcnt,1 );return new; }