Linux 3.10.7
Greg KH
maintainerI'm announcing the release of the 3.10.7 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/mips/Kconfig | 2 arch/mips/include/asm/io.h | 5 + arch/powerpc/Kconfig | 2 arch/powerpc/include/asm/processor.h | 4 arch/powerpc/include/asm/reg.h | 31 ++++--- arch/powerpc/include/asm/switch_to.h | 9 ++ arch/powerpc/kernel/asm-offsets.c | 3 arch/powerpc/kernel/entry_64.S | 36 ++++++-- arch/powerpc/kernel/exceptions-64s.S | 5 - arch/powerpc/kernel/process.c | 10 ++ arch/powerpc/kernel/tm.S | 20 ++++ arch/powerpc/kernel/traps.c | 58 +++++++------ drivers/acpi/proc.c | 8 + drivers/base/regmap/regcache.c | 3 drivers/char/virtio_console.c | 70 +++++++++++----- drivers/cpufreq/cpufreq_conservative.c | 20 ++-- drivers/cpufreq/cpufreq_governor.c | 8 - drivers/cpufreq/cpufreq_governor.h | 4 drivers/cpufreq/cpufreq_ondemand.c | 20 ++-- drivers/cpufreq/loongson2_cpufreq.c | 11 +- drivers/gpu/drm/ast/ast_ttm.c | 1 drivers/gpu/drm/cirrus/cirrus_ttm.c | 1 drivers/gpu/drm/drm_irq.c | 5 - drivers/gpu/drm/i915/i915_dma.c | 1 drivers/gpu/drm/i915/intel_pm.c | 2 drivers/gpu/drm/mgag200/mgag200_ttm.c | 1 drivers/gpu/drm/radeon/evergreen.c | 6 - drivers/gpu/drm/radeon/ni.c | 6 - drivers/gpu/drm/radeon/r600.c | 31 +++++-- drivers/gpu/drm/radeon/r600_hdmi.c | 12 ++ drivers/gpu/drm/radeon/radeon.h | 2 drivers/gpu/drm/radeon/radeon_asic.h | 2 drivers/gpu/drm/radeon/radeon_fence.c | 2 drivers/gpu/drm/radeon/radeon_uvd.c | 50 ++++++++--- drivers/gpu/drm/radeon/rv770.c | 7 + drivers/gpu/drm/radeon/si.c | 9 +- drivers/hwmon/adt7470.c | 2 drivers/i2c/busses/i2c-mxs.c | 2 drivers/media/usb/em28xx/em28xx-i2c.c | 2 drivers/mtd/nand/Kconfig | 2 drivers/scsi/megaraid/megaraid_sas_base.c | 20 +++- drivers/scsi/nsp32.c | 2 drivers/scsi/scsi.c | 3 drivers/scsi/virtio_scsi.c | 2 drivers/staging/zcache/zcache-main.c | 6 - drivers/staging/zram/zram_drv.c | 2 drivers/usb/core/hub.c | 5 - fs/btrfs/tree-log.c | 5 - fs/cifs/cifsencrypt.c | 2 fs/cifs/cifsglob.h | 1 fs/cifs/connect.c | 7 - fs/cifs/readdir.c | 8 + fs/cifs/sess.c | 6 - fs/debugfs/inode.c | 69 +++++----------- fs/ext4/extents.c | 2 fs/ext4/ialloc.c | 10 +- fs/ext4/ioctl.c | 6 - fs/ext4/super.c | 20 ++++ fs/lockd/clntlock.c | 13 ++- fs/lockd/clntproc.c | 5 - fs/reiserfs/procfs.c | 99 ++++------------------- fs/reiserfs/super.c | 3 include/linux/ftrace_event.h | 10 +- include/linux/regmap.h | 1 include/linux/sunrpc/sched.h | 1 kernel/trace/trace.c | 128 +++++++++++++++++++----------- kernel/trace/trace_irqsoff.c | 4 net/sunrpc/clnt.c | 4 net/sunrpc/netns.h | 1 net/sunrpc/rpcb_clnt.c | 48 ++++++++--- sound/usb/6fire/comm.c | 38 +++++++- sound/usb/6fire/comm.h | 2 sound/usb/endpoint.c | 13 +-- 74 files changed, 633 insertions(+), 390 deletions(-)
Aaro Koskinen (1):
cpufreq: loongson2: fix regression related to clock management
Al Viro (1):
reiserfs: fix deadlock in umount
Alban Browaeys (1):
media: em28xx: fix assignment of the eeprom data
Alex Deucher (2):
drm/radeon: select audio dto based on encoder id for DCE3 drm/radeon: always program the MC on startup
Alexander Z Lam (2):
tracing: Make TRACE_ITER_STOP_ON_FREE stop the correct buffer
tracing: Fix reset of time stamps during trace_clock changes
Amit Shah (5):
virtio: console: fix race with port unplug and open/close
virtio: console: fix race in port_fops_open() and port unplug
virtio: console: clean up port data immediately at time of unplug
virtio: console: fix raising SIGIO after port unplug
virtio: console: return -ENODEV on all read operations after unplug
Andrew Vagin (1):
tracing: Fix fields of struct trace_iterator that are zeroed by mistake
Anton Blanchard (1):
powerpc: On POWERNV enable PPC_DENORMALISATION by default
Arnd Bergmann (2):
SCSI: nsp32: use mdelay instead of large udelay constants
mtd: omap2: allow bulding as a module
Asias He (1):
virtio-scsi: Fix virtqueue affinity setup
Chen Gang (1):
cifs: extend the buffer length enought for sprintf() using
Christian König (3):
drm/radeon: stop sending invalid UVD destroy msg drm/radeon: fix halting UVD
drm/radeon: only save UVD bo when we have open handles
Clemens Ladisch (1):
ALSA: usb-audio: do not trust too-big wMaxPacketSize values
Curt Brune (1):
hwmon: (adt7470) Fix incorrect return code check
Dave Airlie (1):
drm/ast: invalidate page tables when pinning a BO
Egbert Eich (1):
drm/mgag200: Invalidate page tables when pinning a BO
Eric Sandeen (1):
ext4: destroy ext4_es_cachep on module unload
Fabio Estevam (1):
i2c: i2c-mxs: Use DMA mode even for small transfers
Greg Kroah-Hartman (1):
Linux 3.10.7
Jani Nikula (1):
drm/i915: initialize gt_lock early with other spin locks
Jeff Layton (1):
cifs: don't instantiate new dentries in readdir for inodes that need to be revalidated immediately
Josef Bacik (1):
Btrfs: release both paths before logging dir/changed extents
Julius Werner (1):
usb: core: don't try to reset_device() a port that got just disconnected
Jussi Kivilinna (1):
ALSA: 6fire: fix DMA issues with URB transfer_buffer usage
Lars-Peter Clausen (1):
regmap: cache: Make sure to sync the last register in a block
Markos Chandras (1):
MIPS: Expose missing pci_io{map,unmap} declarations
Martin K. Petersen (1):
SCSI: Don't attempt to send extended INQUIRY command if skip_vpd_pages is set
Mateusz Krawczuk (1):
regmap: Add missing header for !CONFIG_REGMAP stubs
Michael Neuling (5):
powerpc: Fix hypervisor facility unavaliable vector number
powerpc: Rework setting up H/FSCR bit definitions
powerpc: Fix context switch DSCR on POWER8
powerpc: Save the TAR register earlier powerpc/tm: Fix context switching TAR, PPR and DSCR SPRs
Michal Srb (1):
drm/cirrus: Invalidate page tables when pinning a BO
Michel Dänzer (1):
drm: Don't pass negative delta to ktime_sub_ns()
Oleg Nesterov (1):
debugfs: debugfs_remove_recursive() must not rely on list_empty(d_subdirs)
Piotr Sarna (2):
staging: zcache: fix "zcache=" kernel parameter
ext4: fix mount/remount error messages for incompatible mount options
Rafael J. Wysocki (1):
ACPI / PM: Walk physical_node_list under physical_node_lock
Sergey Senozhatsky (1):
zram: allow request end to coincide with disksize
Steven Rostedt (Red Hat) (1):
tracing: Use flag buffer_disabled for irqsoff tracer
[email protected] (1):
SCSI: megaraid_sas: megaraid_sas driver init fails in kdump kernel
Theodore Ts'o (4):
ext4: make sure group number is bumped after a inode allocation race
ext4: fix retry handling in ext4_ext_truncate()
ext4: allow the mount options nodelalloc and data=journal
ext4: flush the extent status cache during EXT4_IOC_SWAP_BOOT
Trond Myklebust (3):
LOCKD: Don't call utsname()->nodename from nlmclnt_setlockargs
SUNRPC: Don't auto-disconnect from the local rpcbind socket
SUNRPC: If the rpcbind channel is disconnected, fail the call to unregister
Viresh Kumar (1):
cpufreq: rename ignore_nice as ignore_nice_load
Yoshihiro YUNOMAE (2):
virtio/console: Quit from splice_write if pipe->nrbufs is 0 virtio/console: Add pipe_lock/unlock for splice_write
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/mips/Kconfig +1 -1
@@ -27,6 +27,7 @@ config MIPS select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_PROBE select GENERIC_IRQ_SHOW + select GENERIC_PCI_IOMAP select HAVE_ARCH_JUMP_LABEL select ARCH_WANT_IPC_PARSE_VERSION select IRQ_FORCED_THREADING
@@ -2412,7 +2413,6 @@ config PCI bool "Support for PCI controller" depends on HW_HAS_PCI select PCI_DOMAINS - select GENERIC_PCI_IOMAP select NO_GENERIC_PCI_IOPORT_MAP help Find out whether you have a PCI motherboard. PCI is the name of a
arch/mips/include/asm/io.h +5 -0
@@ -170,6 +170,11 @@ static inline void * isa_bus_to_virt(unsigned long address)extern void __iomem *__ioremap (phys_t offset,phys_t size,unsigned long flags);extern void __iounmap (const volatile void __iomem *addr); +#ifndef CONFIG_PCI +struct pci_dev ; +static inline void pci_iounmap (struct pci_dev *dev,void __iomem *addr) {} +#endif +static inline void __iomem *__ioremap_mode (phys_t offset,unsigned long size,unsigned long flags) {
arch/powerpc/Kconfig +1 -1
@@ -572,7 +572,7 @@ config SCHED_SMT config PPC_DENORMALISATION bool "PowerPC denormalisation exception handling" depends on PPC_BOOK3S_64 - default "n" + default "y" if PPC_POWERNV ---help--- Add support for handling denormalisation of single precision values. Useful for bare metal only. If unsure say Y here.
arch/powerpc/include/asm/processor.h +4 -0
@@ -247,6 +247,10 @@ struct thread_struct {unsigned long tm_orig_msr;/* Thread's MSR on ctx switch */ struct pt_regs ckpt_regs;/* Checkpointed registers */ +unsigned long tm_tar; +unsigned long tm_ppr; +unsigned long tm_dscr; +/* * Transactional FP and VSX 0-31 register set. * NOTE: the sense of these is the opposite of the integer ckpt_regs!
arch/powerpc/include/asm/reg.h +20 -11
@@ -254,19 +254,28 @@#define SPRN_HRMOR 0x139/* Real mode offset register */ #define SPRN_HSRR0 0x13A/* Hypervisor Save/Restore 0 */ #define SPRN_HSRR1 0x13B/* Hypervisor Save/Restore 1 */ +/* HFSCR and FSCR bit numbers are the same */ +#define FSCR_TAR_LG 8/* Enable Target Address Register */ +#define FSCR_EBB_LG 7/* Enable Event Based Branching */ +#define FSCR_TM_LG 5/* Enable Transactional Memory */ +#define FSCR_PM_LG 4/* Enable prob/priv access to PMU SPRs */ +#define FSCR_BHRB_LG 3/* Enable Branch History Rolling Buffer*/ +#define FSCR_DSCR_LG 2/* Enable Data Stream Control Register */ +#define FSCR_VECVSX_LG 1/* Enable VMX/VSX */ +#define FSCR_FP_LG 0/* Enable Floating Point */ #define SPRN_FSCR 0x099/* Facility Status & Control Register */ -#define FSCR_TAR (1 << (63-55))/* Enable Target Address Register */ -#define FSCR_EBB (1 << (63-56))/* Enable Event Based Branching */ -#define FSCR_DSCR (1 << (63-61))/* Enable Data Stream Control Register */ +#define FSCR_TAR __MASK(FSCR_TAR_LG) +#define FSCR_EBB __MASK(FSCR_EBB_LG) +#define FSCR_DSCR __MASK(FSCR_DSCR_LG)#define SPRN_HFSCR 0xbe/* HV=1 Facility Status & Control Register */ -#define HFSCR_TAR (1 << (63-55))/* Enable Target Address Register */ -#define HFSCR_EBB (1 << (63-56))/* Enable Event Based Branching */ -#define HFSCR_TM (1 << (63-58))/* Enable Transactional Memory */ -#define HFSCR_PM (1 << (63-60))/* Enable prob/priv access to PMU SPRs */ -#define HFSCR_BHRB (1 << (63-59))/* Enable Branch History Rolling Buffer*/ -#define HFSCR_DSCR (1 << (63-61))/* Enable Data Stream Control Register */ -#define HFSCR_VECVSX (1 << (63-62))/* Enable VMX/VSX */ -#define HFSCR_FP (1 << (63-63))/* Enable Floating Point */ +#define HFSCR_TAR __MASK(FSCR_TAR_LG) +#define HFSCR_EBB __MASK(FSCR_EBB_LG) +#define HFSCR_TM __MASK(FSCR_TM_LG) +#define HFSCR_PM __MASK(FSCR_PM_LG) +#define HFSCR_BHRB __MASK(FSCR_BHRB_LG) +#define HFSCR_DSCR __MASK(FSCR_DSCR_LG) +#define HFSCR_VECVSX __MASK(FSCR_VECVSX_LG) +#define HFSCR_FP __MASK(FSCR_FP_LG)#define SPRN_TAR 0x32f/* Target Address Register */ #define SPRN_LPCR 0x13E/* LPAR Control Register */ #define LPCR_VPM0 (1ul << (63-0))
arch/powerpc/include/asm/switch_to.h +9 -0
@@ -15,6 +15,15 @@ extern struct task_struct *__switch_to(struct task_struct *,struct thread_struct ;extern struct task_struct *_switch (struct thread_struct *prev,struct thread_struct *next); +#ifdef CONFIG_PPC_BOOK3S_64 +static inline void save_tar (struct thread_struct *prev) +{ +if (cpu_has_feature (CPU_FTR_ARCH_207S )) + prev->tar =mfspr (SPRN_TAR ); +} +#else +static inline void save_tar (struct thread_struct *prev) {} +#endif extern void giveup_fpu (struct task_struct *);extern void load_up_fpu (void );
arch/powerpc/kernel/asm-offsets.c +3 -0
@@ -139,6 +139,9 @@ int main(void)DEFINE (THREAD_TM_TFHAR , offsetof(struct thread_struct , tm_tfhar));DEFINE (THREAD_TM_TEXASR , offsetof(struct thread_struct , tm_texasr));DEFINE (THREAD_TM_TFIAR , offsetof(struct thread_struct , tm_tfiar)); +DEFINE (THREAD_TM_TAR , offsetof(struct thread_struct , tm_tar)); +DEFINE (THREAD_TM_PPR , offsetof(struct thread_struct , tm_ppr)); +DEFINE (THREAD_TM_DSCR , offsetof(struct thread_struct , tm_dscr));DEFINE (PT_CKPT_REGS , offsetof(struct thread_struct , ckpt_regs));DEFINE (THREAD_TRANSACT_VR0 , offsetof(struct thread_struct , transact_vr[0]));
arch/powerpc/kernel/entry_64.S +26 -10
@@ -449,15 +449,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_DSCR) #ifdef CONFIG_PPC_BOOK3S_64 BEGIN_FTR_SECTION - /* - * Back up the TAR across context switches. Note that the TAR is not - * available for use in the kernel. (To provide this, the TAR should - * be backed up/restored on exception entry/exit instead, and be in - * pt_regs. FIXME, this should be in pt_regs anyway (for debug).) - */ - mfspr r0,SPRN_TAR - std r0,THREAD_TAR(r3) - /* Event based branch registers */ mfspr r0, SPRN_BESCR std r0, THREAD_BESCR(r3)
@@ -584,9 +575,34 @@ BEGIN_FTR_SECTION ld r7,DSCR_DEFAULT@toc(2) ld r0,THREAD_DSCR(r4) cmpwi r6,0 + li r8, FSCR_DSCR bne 1f ld r0,0(r7) -1: cmpd r0,r25 + b 3f +1: + BEGIN_FTR_SECTION_NESTED(70) + mfspr r6, SPRN_FSCR + or r6, r6, r8 + mtspr SPRN_FSCR, r6 + BEGIN_FTR_SECTION_NESTED(69) + mfspr r6, SPRN_HFSCR + or r6, r6, r8 + mtspr SPRN_HFSCR, r6 + END_FTR_SECTION_NESTED(CPU_FTR_HVMODE, CPU_FTR_HVMODE, 69) + b 4f + END_FTR_SECTION_NESTED(CPU_FTR_ARCH_207S, CPU_FTR_ARCH_207S, 70) +3: + BEGIN_FTR_SECTION_NESTED(70) + mfspr r6, SPRN_FSCR + andc r6, r6, r8 + mtspr SPRN_FSCR, r6 + BEGIN_FTR_SECTION_NESTED(69) + mfspr r6, SPRN_HFSCR + andc r6, r6, r8 + mtspr SPRN_HFSCR, r6 + END_FTR_SECTION_NESTED(CPU_FTR_HVMODE, CPU_FTR_HVMODE, 69) + END_FTR_SECTION_NESTED(CPU_FTR_ARCH_207S, CPU_FTR_ARCH_207S, 70) +4: cmpd r0,r25 beq 2f mtspr SPRN_DSCR,r0 2:
arch/powerpc/kernel/exceptions-64s.S +3 -2
@@ -848,7 +848,7 @@ hv_facility_unavailable_relon_trampoline: . = 0x4f80 SET_SCRATCH0(r13) EXCEPTION_PROLOG_0(PACA_EXGEN) - b facility_unavailable_relon_hv + b hv_facility_unavailable_relon_hv STD_RELON_EXCEPTION_PSERIES(0x5300, 0x1300, instruction_breakpoint) #ifdef CONFIG_PPC_DENORMALISATION
@@ -1175,6 +1175,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX) b .ret_from_except STD_EXCEPTION_COMMON(0xf60, facility_unavailable, .facility_unavailable_exception) + STD_EXCEPTION_COMMON(0xf80, hv_facility_unavailable, .facility_unavailable_exception) .align 7 .globl __end_handlers
@@ -1188,7 +1189,7 @@ __end_handlers: STD_RELON_EXCEPTION_PSERIES_OOL(0xf20, altivec_unavailable) STD_RELON_EXCEPTION_PSERIES_OOL(0xf40, vsx_unavailable) STD_RELON_EXCEPTION_PSERIES_OOL(0xf60, facility_unavailable) - STD_RELON_EXCEPTION_HV_OOL(0xf80, facility_unavailable) + STD_RELON_EXCEPTION_HV_OOL(0xf80, hv_facility_unavailable) #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) /*
arch/powerpc/kernel/process.c +10 -0
@@ -600,6 +600,16 @@ struct task_struct *__switch_to(struct task_struct *prev,struct ppc64_tlb_batch *batch;#endif +/* Back up the TAR across context switches. +* Note that the TAR is not available for use in the kernel. (To +* provide this, the TAR should be backed up/restored on exception +* entry/exit instead, and be in pt_regs. FIXME, this should be in +* pt_regs anyway (for debug).) +* Save the TAR here before we do treclaim/trecheckpoint as these +* will change the TAR. +*/ +save_tar (&prev->thread); +__switch_to_tm (prev);#ifdef CONFIG_SMP
arch/powerpc/kernel/tm.S +20 -0
@@ -224,6 +224,16 @@ dont_backup_fp: std r5, _CCR(r7) std r6, _XER(r7) + + /* ******************** TAR, PPR, DSCR ********** */ + mfspr r3, SPRN_TAR + mfspr r4, SPRN_PPR + mfspr r5, SPRN_DSCR + + std r3, THREAD_TM_TAR(r12) + std r4, THREAD_TM_PPR(r12) + std r5, THREAD_TM_DSCR(r12) + /* MSR and flags: We don't change CRs, and we don't need to alter * MSR. */
@@ -338,6 +348,16 @@ dont_restore_fp: mtmsr r6 /* FP/Vec off again! */ restore_gprs: + + /* ******************** TAR, PPR, DSCR ********** */ + ld r4, THREAD_TM_TAR(r3) + ld r5, THREAD_TM_PPR(r3) + ld r6, THREAD_TM_DSCR(r3) + + mtspr SPRN_TAR, r4 + mtspr SPRN_PPR, r5 + mtspr SPRN_DSCR, r6 + /* ******************** CR,LR,CCR,MSR ********** */ ld r3, _CTR(r7) ld r4, _LINK(r7)
arch/powerpc/kernel/traps.c +34 -24
92 lines not on this page · raw message
drivers/acpi/proc.c +8 -0
@@ -311,6 +311,8 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset) dev->pnp.bus_id, (u32) dev->wakeup.sleep_state); +mutex_lock (&dev->physical_node_lock); +if (!dev->physical_node_count) { seq_printf(seq, "%c%-8s\n", dev->wakeup.flags.run_wake ? '*' : ' ',
@@ -338,6 +340,8 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)put_device (ldev); } } + +mutex_unlock (&dev->physical_node_lock); }mutex_unlock (&acpi_device_lock);return 0 ;
@@ -347,12 +351,16 @@ static void physical_device_enable_wakeup(struct acpi_device *adev) {struct acpi_device_physical_node *entry; +mutex_lock (&adev->physical_node_lock); +list_for_each_entry (entry, &adev->physical_node_list, node)if (entry->dev &&device_can_wakeup (entry->dev)) {bool enable = !device_may_wakeup (entry->dev);device_set_wakeup_enable (entry->dev, enable); } + +mutex_unlock (&adev->physical_node_lock); } static ssize_t
drivers/base/regmap/regcache.c +2 -1
@@ -644,7 +644,8 @@ static int regcache_sync_block_raw(struct regmap *map, void *block, } } -return regcache_sync_block_raw_flush (map, &data, base, regtmp); +return regcache_sync_block_raw_flush (map, &data, base, regtmp + + map->reg_stride); } int regcache_sync_block(struct regmap *map, void *block,
drivers/char/virtio_console.c +48 -22
141 lines not on this page · raw message
drivers/cpufreq/cpufreq_conservative.c +10 -10
@@ -221,8 +221,8 @@ static ssize_t store_down_threshold(struct dbs_data *dbs_data, const char *buf,return count; } -static ssize_t store_ignore_nice (struct dbs_data *dbs_data,const char *buf, -size_t count) +static ssize_t store_ignore_nice_load (struct dbs_data *dbs_data, +const char *buf,size_t count) {struct cs_dbs_tuners *cs_tuners = dbs_data->tuners;unsigned int input, j;
@@ -235,10 +235,10 @@ static ssize_t store_ignore_nice(struct dbs_data *dbs_data, const char *buf,if (input >1 ) input =1 ; -if (input == cs_tuners->ignore_nice)/* nothing to do */ +if (input == cs_tuners->ignore_nice_load)/* nothing to do */ return count; - cs_tuners->ignore_nice = input; + cs_tuners->ignore_nice_load = input;/* we need to re-evaluate prev_cpu_idle */ for_each_online_cpu (j) {
@@ -246,7 +246,7 @@ static ssize_t store_ignore_nice(struct dbs_data *dbs_data, const char *buf, dbs_info = &per_cpu (cs_cpu_dbs_info, j); dbs_info->cdbs.prev_cpu_idle =get_cpu_idle_time (j, &dbs_info->cdbs.prev_cpu_wall,0 ); -if (cs_tuners->ignore_nice) +if (cs_tuners->ignore_nice_load) dbs_info->cdbs.prev_cpu_nice =kcpustat_cpu (j).cpustat[CPUTIME_NICE ]; }
@@ -279,7 +279,7 @@ show_store_one(cs, sampling_rate);show_store_one (cs, sampling_down_factor);show_store_one (cs, up_threshold);show_store_one (cs, down_threshold); -show_store_one (cs, ignore_nice); +show_store_one (cs, ignore_nice_load);show_store_one (cs, freq_step);declare_show_sampling_rate_min (cs);
@@ -287,7 +287,7 @@ gov_sys_pol_attr_rw(sampling_rate);gov_sys_pol_attr_rw (sampling_down_factor);gov_sys_pol_attr_rw (up_threshold);gov_sys_pol_attr_rw (down_threshold); -gov_sys_pol_attr_rw (ignore_nice); +gov_sys_pol_attr_rw (ignore_nice_load);gov_sys_pol_attr_rw (freq_step);gov_sys_pol_attr_ro (sampling_rate_min);
@@ -297,7 +297,7 @@ static struct attribute *dbs_attributes_gov_sys[] = { &sampling_down_factor_gov_sys.attr, &up_threshold_gov_sys.attr, &down_threshold_gov_sys.attr, - &ignore_nice_gov_sys.attr, + &ignore_nice_load_gov_sys.attr, &freq_step_gov_sys.attr, NULL };
@@ -313,7 +313,7 @@ static struct attribute *dbs_attributes_gov_pol[] = { &sampling_down_factor_gov_pol.attr, &up_threshold_gov_pol.attr, &down_threshold_gov_pol.attr, - &ignore_nice_gov_pol.attr, + &ignore_nice_load_gov_pol.attr, &freq_step_gov_pol.attr, NULL };
@@ -338,7 +338,7 @@ static int cs_init(struct dbs_data *dbs_data) tuners->up_threshold =DEF_FREQUENCY_UP_THRESHOLD ; tuners->down_threshold =DEF_FREQUENCY_DOWN_THRESHOLD ; tuners->sampling_down_factor =DEF_SAMPLING_DOWN_FACTOR ; - tuners->ignore_nice =0 ; + tuners->ignore_nice_load =0 ; tuners->freq_step =DEF_FREQUENCY_STEP ; dbs_data->tuners = tuners;
drivers/cpufreq/cpufreq_governor.c +4 -4
@@ -91,9 +91,9 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu)unsigned int j;if (dbs_data->cdata->governor ==GOV_ONDEMAND ) - ignore_nice = od_tuners->ignore_nice; + ignore_nice = od_tuners->ignore_nice_load;else - ignore_nice = cs_tuners->ignore_nice; + ignore_nice = cs_tuners->ignore_nice_load; policy = cdbs->cur_policy;
@@ -336,12 +336,12 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, cs_tuners = dbs_data->tuners; cs_dbs_info = dbs_data->cdata->get_cpu_dbs_info_s (cpu); sampling_rate = cs_tuners->sampling_rate; - ignore_nice = cs_tuners->ignore_nice; + ignore_nice = cs_tuners->ignore_nice_load; }else { od_tuners = dbs_data->tuners; od_dbs_info = dbs_data->cdata->get_cpu_dbs_info_s (cpu); sampling_rate = od_tuners->sampling_rate; - ignore_nice = od_tuners->ignore_nice; + ignore_nice = od_tuners->ignore_nice_load; od_ops = dbs_data->cdata->gov_ops; io_busy = od_tuners->io_is_busy; }
drivers/cpufreq/cpufreq_governor.h +2 -2
@@ -165,7 +165,7 @@ struct cs_cpu_dbs_info_s {/* Per policy Governers sysfs tunables */ struct od_dbs_tuners { -unsigned int ignore_nice; +unsigned int ignore_nice_load;unsigned int sampling_rate;unsigned int sampling_down_factor;unsigned int up_threshold;
@@ -175,7 +175,7 @@ struct od_dbs_tuners { };struct cs_dbs_tuners { -unsigned int ignore_nice; +unsigned int ignore_nice_load;unsigned int sampling_rate;unsigned int sampling_down_factor;unsigned int up_threshold;
drivers/cpufreq/cpufreq_ondemand.c +10 -10
@@ -403,8 +403,8 @@ static ssize_t store_sampling_down_factor(struct dbs_data *dbs_data,return count; } -static ssize_t store_ignore_nice (struct dbs_data *dbs_data,const char *buf, -size_t count) +static ssize_t store_ignore_nice_load (struct dbs_data *dbs_data, +const char *buf,size_t count) {struct od_dbs_tuners *od_tuners = dbs_data->tuners;unsigned int input;
@@ -419,10 +419,10 @@ static ssize_t store_ignore_nice(struct dbs_data *dbs_data, const char *buf,if (input >1 ) input =1 ; -if (input == od_tuners->ignore_nice) {/* nothing to do */ +if (input == od_tuners->ignore_nice_load) {/* nothing to do */ return count; } - od_tuners->ignore_nice = input; + od_tuners->ignore_nice_load = input;/* we need to re-evaluate prev_cpu_idle */ for_each_online_cpu (j) {
@@ -430,7 +430,7 @@ static ssize_t store_ignore_nice(struct dbs_data *dbs_data, const char *buf, dbs_info = &per_cpu (od_cpu_dbs_info, j); dbs_info->cdbs.prev_cpu_idle =get_cpu_idle_time (j, &dbs_info->cdbs.prev_cpu_wall, od_tuners->io_is_busy); -if (od_tuners->ignore_nice) +if (od_tuners->ignore_nice_load) dbs_info->cdbs.prev_cpu_nice =kcpustat_cpu (j).cpustat[CPUTIME_NICE ];
@@ -461,7 +461,7 @@ show_store_one(od, sampling_rate);show_store_one (od, io_is_busy);show_store_one (od, up_threshold);show_store_one (od, sampling_down_factor); -show_store_one (od, ignore_nice); +show_store_one (od, ignore_nice_load);show_store_one (od, powersave_bias);declare_show_sampling_rate_min (od);
@@ -469,7 +469,7 @@ gov_sys_pol_attr_rw(sampling_rate);gov_sys_pol_attr_rw (io_is_busy);gov_sys_pol_attr_rw (up_threshold);gov_sys_pol_attr_rw (sampling_down_factor); -gov_sys_pol_attr_rw (ignore_nice); +gov_sys_pol_attr_rw (ignore_nice_load);gov_sys_pol_attr_rw (powersave_bias);gov_sys_pol_attr_ro (sampling_rate_min);
@@ -478,7 +478,7 @@ static struct attribute *dbs_attributes_gov_sys[] = { &sampling_rate_gov_sys.attr, &up_threshold_gov_sys.attr, &sampling_down_factor_gov_sys.attr, - &ignore_nice_gov_sys.attr, + &ignore_nice_load_gov_sys.attr, &powersave_bias_gov_sys.attr, &io_is_busy_gov_sys.attr,NULL
@@ -494,7 +494,7 @@ static struct attribute *dbs_attributes_gov_pol[] = { &sampling_rate_gov_pol.attr, &up_threshold_gov_pol.attr, &sampling_down_factor_gov_pol.attr, - &ignore_nice_gov_pol.attr, + &ignore_nice_load_gov_pol.attr, &powersave_bias_gov_pol.attr, &io_is_busy_gov_pol.attr,NULL
@@ -544,7 +544,7 @@ static int od_init(struct dbs_data *dbs_data) } tuners->sampling_down_factor =DEF_SAMPLING_DOWN_FACTOR ; - tuners->ignore_nice =0 ; + tuners->ignore_nice_load =0 ; tuners->powersave_bias = default_powersave_bias; tuners->io_is_busy =should_io_be_busy ();
drivers/cpufreq/loongson2_cpufreq.c +6 -5
@@ -118,11 +118,6 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy)clk_put (cpuclk);return -EINVAL ; } - ret =clk_set_rate (cpuclk, rate); -if (ret) { -clk_put (cpuclk); -return ret; - }/* clock table init */ for (i = 2;
@@ -130,6 +125,12 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy) i++) loongson2_clockmod_table[i].frequency = (rate * i) /8 ; + ret =clk_set_rate (cpuclk, rate); +if (ret) { +clk_put (cpuclk); +return ret; + } + policy->cur =loongson2_cpufreq_get (policy->cpu); cpufreq_frequency_table_get_attr(&loongson2_clockmod_table[0],
drivers/gpu/drm/ast/ast_ttm.c +1 -0
@@ -348,6 +348,7 @@ int ast_bo_create(struct drm_device *dev, int size, int align, astbo->gem.driver_private =NULL ; astbo->bo.bdev = &ast->ttm.bdev; + astbo->bo.bdev->dev_mapping = dev->dev_mapping;ast_ttm_placement (astbo,TTM_PL_FLAG_VRAM |TTM_PL_FLAG_SYSTEM );
drivers/gpu/drm/cirrus/cirrus_ttm.c +1 -0
@@ -353,6 +353,7 @@ int cirrus_bo_create(struct drm_device *dev, int size, int align, cirrusbo->gem.driver_private =NULL ; cirrusbo->bo.bdev = &cirrus->ttm.bdev; + cirrusbo->bo.bdev->dev_mapping = dev->dev_mapping;cirrus_ttm_placement (cirrusbo,TTM_PL_FLAG_VRAM |TTM_PL_FLAG_SYSTEM );
drivers/gpu/drm/drm_irq.c +4 -1
@@ -708,7 +708,10 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc,/* Subtract time delta from raw timestamp to get final * vblank_time timestamp for end of vblank. */ - etime =ktime_sub_ns (etime, delta_ns); +if (delta_ns <0 ) + etime =ktime_add_ns (etime, -delta_ns); +else + etime =ktime_sub_ns (etime, delta_ns); *vblank_time =ktime_to_timeval (etime); DRM_DEBUG("crtc %d : v %d p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n",
drivers/gpu/drm/i915/i915_dma.c +1 -0
@@ -1514,6 +1514,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)spin_lock_init (&dev_priv->irq_lock);spin_lock_init (&dev_priv->gpu_error.lock);spin_lock_init (&dev_priv->rps.lock); +spin_lock_init (&dev_priv->gt_lock);mutex_init (&dev_priv->dpio_lock);mutex_init (&dev_priv->rps.hw_lock);mutex_init (&dev_priv->modeset_restore_lock);
drivers/gpu/drm/i915/intel_pm.c +0 -2
@@ -4507,8 +4507,6 @@ void intel_gt_init(struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private; -spin_lock_init (&dev_priv->gt_lock); -if (IS_VALLEYVIEW (dev)) { dev_priv->gt.force_wake_get = vlv_force_wake_get; dev_priv->gt.force_wake_put = vlv_force_wake_put;
drivers/gpu/drm/mgag200/mgag200_ttm.c +1 -0
@@ -347,6 +347,7 @@ int mgag200_bo_create(struct drm_device *dev, int size, int align, mgabo->gem.driver_private =NULL ; mgabo->bo.bdev = &mdev->ttm.bdev; + mgabo->bo.bdev->dev_mapping = dev->dev_mapping;mgag200_ttm_placement (mgabo,TTM_PL_FLAG_VRAM |TTM_PL_FLAG_SYSTEM );
drivers/gpu/drm/radeon/evergreen.c +4 -2
@@ -4681,6 +4681,8 @@ static int evergreen_startup(struct radeon_device *rdev)/* enable pcie gen2 link */ evergreen_pcie_gen2_enable (rdev); +evergreen_mc_program (rdev); +if (ASIC_IS_DCE5 (rdev)) {if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw || !rdev->mc_fw) { r =ni_init_microcode (rdev);
@@ -4708,7 +4710,6 @@ static int evergreen_startup(struct radeon_device *rdev)if (r)return r; -evergreen_mc_program (rdev);if (rdev->flags &RADEON_IS_AGP ) {evergreen_agp_enable (rdev); }else {
@@ -4854,10 +4855,10 @@ int evergreen_resume(struct radeon_device *rdev)int evergreen_suspend (struct radeon_device *rdev) {r600_audio_fini (rdev); +r600_uvd_stop (rdev);radeon_uvd_suspend (rdev);r700_cp_stop (rdev);r600_dma_stop (rdev); -r600_uvd_rbc_stop (rdev);evergreen_irq_suspend (rdev);radeon_wb_disable (rdev);evergreen_pcie_gart_disable (rdev);
@@ -4988,6 +4989,7 @@ void evergreen_fini(struct radeon_device *rdev)radeon_ib_pool_fini (rdev);radeon_irq_kms_fini (rdev);evergreen_pcie_gart_fini (rdev); +r600_uvd_stop (rdev);radeon_uvd_fini (rdev);r600_vram_scratch_fini (rdev);radeon_gem_fini (rdev);
drivers/gpu/drm/radeon/ni.c +4 -2
@@ -1929,6 +1929,8 @@ static int cayman_startup(struct radeon_device *rdev)/* enable pcie gen2 link */ evergreen_pcie_gen2_enable (rdev); +evergreen_mc_program (rdev); +if (rdev->flags &RADEON_IS_IGP ) {if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { r =ni_init_microcode (rdev);
@@ -1957,7 +1959,6 @@ static int cayman_startup(struct radeon_device *rdev)if (r)return r; -evergreen_mc_program (rdev); r =cayman_pcie_gart_enable (rdev);if (r)return r;
@@ -2133,7 +2134,7 @@ int cayman_suspend(struct radeon_device *rdev)radeon_vm_manager_fini (rdev);cayman_cp_enable (rdev, false);cayman_dma_stop (rdev); -r600_uvd_rbc_stop (rdev); +r600_uvd_stop (rdev);radeon_uvd_suspend (rdev);evergreen_irq_suspend (rdev);radeon_wb_disable (rdev);
@@ -2265,6 +2266,7 @@ void cayman_fini(struct radeon_device *rdev)radeon_vm_manager_fini (rdev);radeon_ib_pool_fini (rdev);radeon_irq_kms_fini (rdev); +r600_uvd_stop (rdev);radeon_uvd_fini (rdev);cayman_pcie_gart_fini (rdev);r600_vram_scratch_fini (rdev);
drivers/gpu/drm/radeon/r600.c +25 -6
@@ -2675,12 +2675,29 @@ int r600_uvd_rbc_start(struct radeon_device *rdev)return 0 ; } -void r600_uvd_rbc_stop (struct radeon_device *rdev) +void r600_uvd_stop (struct radeon_device *rdev) {struct radeon_ring *ring = &rdev->ring[R600_RING_TYPE_UVD_INDEX ];/* force RBC into idle state */ WREG32 (UVD_RBC_RB_CNTL ,0x11010101 ); + +/* Stall UMC and register bus before resetting VCPU */ +WREG32_P (UVD_LMI_CTRL2 ,1 <<8 , ~(1 <<8 )); +WREG32_P (UVD_RB_ARB_CTRL ,1 <<3 , ~(1 <<3 )); +mdelay (1 ); + +/* put VCPU into reset */ +WREG32 (UVD_SOFT_RESET ,VCPU_SOFT_RESET ); +mdelay (5 ); + +/* disable VCPU clock */ +WREG32 (UVD_VCPU_CNTL ,0x0 ); + +/* Unstall UMC and register bus */ +WREG32_P (UVD_LMI_CTRL2 ,0 , ~(1 <<8 )); +WREG32_P (UVD_RB_ARB_CTRL ,0 , ~(1 <<3 )); + ring->ready = false; }
@@ -2700,6 +2717,11 @@ int r600_uvd_init(struct radeon_device *rdev)/* disable interupt */ WREG32_P (UVD_MASTINT_EN ,0 , ~(1 <<1 )); +/* Stall UMC and register bus before resetting VCPU */ +WREG32_P (UVD_LMI_CTRL2 ,1 <<8 , ~(1 <<8 )); +WREG32_P (UVD_RB_ARB_CTRL ,1 <<3 , ~(1 <<3 )); +mdelay (1 ); +/* put LMI, VCPU, RBC etc... into reset */ WREG32(UVD_SOFT_RESET, LMI_SOFT_RESET | VCPU_SOFT_RESET | LBSI_SOFT_RESET | RBC_SOFT_RESET | CSM_SOFT_RESET |
@@ -2729,10 +2751,6 @@ int r600_uvd_init(struct radeon_device *rdev)WREG32 (UVD_MPC_SET_ALU ,0 );WREG32 (UVD_MPC_SET_MUX ,0x88 ); -/* Stall UMC */ -WREG32_P (UVD_LMI_CTRL2 ,1 <<8 , ~(1 <<8 )); -WREG32_P (UVD_RB_ARB_CTRL ,1 <<3 , ~(1 <<3 )); -/* take all subblocks out of reset, except VCPU */ WREG32 (UVD_SOFT_RESET ,VCPU_SOFT_RESET );mdelay (5 );
@@ -3206,6 +3224,8 @@ static int r600_startup(struct radeon_device *rdev)/* enable pcie gen2 link */ r600_pcie_gen2_enable (rdev); +r600_mc_program (rdev); +if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { r =r600_init_microcode (rdev);if (r) {
@@ -3218,7 +3238,6 @@ static int r600_startup(struct radeon_device *rdev)if (r)return r; -r600_mc_program (rdev);if (rdev->flags &RADEON_IS_AGP ) {r600_agp_enable (rdev); }else {
drivers/gpu/drm/radeon/r600_hdmi.c +9 -3
@@ -242,9 +242,15 @@ void r600_audio_set_dto(struct drm_encoder *encoder, u32 clock)/* according to the reg specs, this should DCE3.2 only, but in * practice it seems to cover DCE3.0 as well. */ -WREG32 (DCCG_AUDIO_DTO0_PHASE , base_rate *100 ); -WREG32 (DCCG_AUDIO_DTO0_MODULE , clock *100 ); -WREG32 (DCCG_AUDIO_DTO_SELECT ,0 );/* select DTO0 */ +if (dig->dig_encoder ==0 ) { +WREG32 (DCCG_AUDIO_DTO0_PHASE , base_rate *100 ); +WREG32 (DCCG_AUDIO_DTO0_MODULE , clock *100 ); +WREG32 (DCCG_AUDIO_DTO_SELECT ,0 );/* select DTO0 */ + }else { +WREG32 (DCCG_AUDIO_DTO1_PHASE , base_rate *100 ); +WREG32 (DCCG_AUDIO_DTO1_MODULE , clock *100 ); +WREG32 (DCCG_AUDIO_DTO_SELECT ,1 );/* select DTO1 */ + } }else {/* according to the reg specs, this should be DCE2.0 and DCE3.0 */ WREG32(AUDIO_DTO, AUDIO_DTO_PHASE(base_rate / 10) |
drivers/gpu/drm/radeon/radeon.h +1 -1
@@ -1146,7 +1146,6 @@ struct radeon_uvd {void *cpu_addr;uint64_t gpu_addr;void *saved_bo; -unsigned fw_size;atomic_t handles[RADEON_MAX_UVD_HANDLES ];struct drm_file *filp[RADEON_MAX_UVD_HANDLES ];struct delayed_work idle_work;
@@ -1686,6 +1685,7 @@ struct radeon_device {const struct firmware *rlc_fw;/* r6/700 RLC firmware */ const struct firmware *mc_fw;/* NI MC firmware */ const struct firmware *ce_fw;/* SI CE firmware */ +const struct firmware *uvd_fw;/* UVD firmware */ struct r600_blit r600_blit;struct r600_vram_scratch vram_scratch;int msi_enabled;/* msi enabled */
drivers/gpu/drm/radeon/radeon_asic.h +1 -1
@@ -399,7 +399,7 @@ uint64_t r600_get_gpu_clock_counter(struct radeon_device *rdev);/* uvd */ int r600_uvd_init (struct radeon_device *rdev);int r600_uvd_rbc_start (struct radeon_device *rdev); -void r600_uvd_rbc_stop (struct radeon_device *rdev); +void r600_uvd_stop (struct radeon_device *rdev);int r600_uvd_ib_test (struct radeon_device *rdev,struct radeon_ring *ring);void r600_uvd_fence_emit (struct radeon_device *rdev,struct radeon_fence *fence);
drivers/gpu/drm/radeon/radeon_fence.c +1 -1
@@ -782,7 +782,7 @@ int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring) }else {/* put fence directly behind firmware */ - index =ALIGN (rdev->uvd.fw_size,8 ); + index =ALIGN (rdev->uvd_fw->size,8 ); rdev->fence_drv[ring].cpu_addr = rdev->uvd.cpu_addr + index; rdev->fence_drv[ring].gpu_addr = rdev->uvd.gpu_addr + index; }
drivers/gpu/drm/radeon/radeon_uvd.c +35 -15
109 lines not on this page · raw message
drivers/gpu/drm/radeon/rv770.c +5 -2
@@ -813,7 +813,7 @@ int rv770_uvd_resume(struct radeon_device *rdev)/* programm the VCPU memory controller bits 0-27 */ addr = rdev->uvd.gpu_addr >>3 ; - size =RADEON_GPU_PAGE_ALIGN (rdev->uvd.fw_size +4 ) >>3 ; + size =RADEON_GPU_PAGE_ALIGN (rdev->uvd_fw->size +4 ) >>3 ;WREG32 (UVD_VCPU_CACHE_OFFSET0 , addr);WREG32 (UVD_VCPU_CACHE_SIZE0 , size);
@@ -1829,6 +1829,8 @@ static int rv770_startup(struct radeon_device *rdev)/* enable pcie gen2 link */ rv770_pcie_gen2_enable (rdev); +rv770_mc_program (rdev); +if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { r =r600_init_microcode (rdev);if (r) {
@@ -1841,7 +1843,6 @@ static int rv770_startup(struct radeon_device *rdev)if (r)return r; -rv770_mc_program (rdev);if (rdev->flags &RADEON_IS_AGP ) {rv770_agp_enable (rdev); }else {
@@ -1983,6 +1984,7 @@ int rv770_resume(struct radeon_device *rdev)int rv770_suspend (struct radeon_device *rdev) {r600_audio_fini (rdev); +r600_uvd_stop (rdev);radeon_uvd_suspend (rdev);r700_cp_stop (rdev);r600_dma_stop (rdev);
@@ -2098,6 +2100,7 @@ void rv770_fini(struct radeon_device *rdev)radeon_ib_pool_fini (rdev);radeon_irq_kms_fini (rdev);rv770_pcie_gart_fini (rdev); +r600_uvd_stop (rdev);radeon_uvd_fini (rdev);r600_vram_scratch_fini (rdev);radeon_gem_fini (rdev);
drivers/gpu/drm/radeon/si.c +6 -3
@@ -5270,6 +5270,8 @@ static int si_startup(struct radeon_device *rdev)struct radeon_ring *ring;int r; +si_mc_program (rdev); +if (!rdev->me_fw || !rdev->pfp_fw || !rdev->ce_fw || !rdev->rlc_fw || !rdev->mc_fw) { r =si_init_microcode (rdev);
@@ -5289,7 +5291,6 @@ static int si_startup(struct radeon_device *rdev)if (r)return r; -si_mc_program (rdev); r =si_pcie_gart_enable (rdev);if (r)return r;
@@ -5473,7 +5474,7 @@ int si_suspend(struct radeon_device *rdev)si_cp_enable (rdev, false);cayman_dma_stop (rdev);if (rdev->has_uvd) { -r600_uvd_rbc_stop (rdev); +r600_uvd_stop (rdev);radeon_uvd_suspend (rdev); }si_irq_suspend (rdev);
@@ -5613,8 +5614,10 @@ void si_fini(struct radeon_device *rdev)radeon_vm_manager_fini (rdev);radeon_ib_pool_fini (rdev);radeon_irq_kms_fini (rdev); -if (rdev->has_uvd) +if (rdev->has_uvd) { +r600_uvd_stop (rdev);radeon_uvd_fini (rdev); + }si_pcie_gart_fini (rdev);r600_vram_scratch_fini (rdev);radeon_gem_fini (rdev);
drivers/hwmon/adt7470.c +1 -1
@@ -215,7 +215,7 @@ static inline int adt7470_write_word_data(struct i2c_client *client, u8 reg, u16 value) {return i2c_smbus_write_byte_data (client, reg, value &0xFF ) - &&i2c_smbus_write_byte_data (client, reg +1 , value >>8 ); + ||i2c_smbus_write_byte_data (client, reg +1 , value >>8 ); }static void adt7470_init_client (struct i2c_client *client)
drivers/i2c/busses/i2c-mxs.c +1 -1
@@ -494,7 +494,7 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,* based on this empirical measurement and a lot of previous frobbing. */ i2c->cmd_err =0 ; -if (msg->len <8 ) { +if (0 ) {/* disable PIO mode until a proper fix is made */ ret =mxs_i2c_pio_setup_xfer (adap, msg, flags);if (ret)mxs_i2c_reset (i2c);
drivers/media/usb/em28xx/em28xx-i2c.c +1 -1
@@ -726,7 +726,7 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned bus, *eedata = data; *eedata_len = len; - dev_config = (void *)eedata; + dev_config = (void *)*eedata;switch (le16_to_cpu (dev_config->chip_conf) >>4 &0x3 ) {case 0 :
drivers/mtd/nand/Kconfig +1 -1
@@ -95,7 +95,7 @@ config MTD_NAND_OMAP2 config MTD_NAND_OMAP_BCH depends on MTD_NAND && MTD_NAND_OMAP2 && ARCH_OMAP3 - bool "Enable support for hardware BCH error correction" + tristate "Enable support for hardware BCH error correction" default n select BCH select BCH_CONST_PARAMS
drivers/scsi/megaraid/megaraid_sas_base.c +15 -5
@@ -3508,11 +3508,21 @@ static int megasas_init_fw(struct megasas_instance *instance)break ; } -/* -* We expect the FW state to be READY -*/ -if (megasas_transition_to_ready (instance,0 )) - goto fail_ready_state; +if (megasas_transition_to_ready (instance,0 )) { +atomic_set (&instance->fw_reset_no_pci_access,1 ); + instance->instancet->adp_reset + (instance, instance->reg_set); +atomic_set (&instance->fw_reset_no_pci_access,0 ); +dev_info (&instance->pdev->dev, +"megasas: FW restarted successfully from %s!\n" , + __func__); + +/*waitting for about 30 second before retry*/ +ssleep (30 ); + +if (megasas_transition_to_ready (instance,0 )) + goto fail_ready_state; + }/* Check if MSI-X is supported while in ready state */ msix_enable = (instance->instancet->read_fw_status_reg(reg_set) &
drivers/scsi/nsp32.c +1 -1
@@ -2899,7 +2899,7 @@ static void nsp32_do_bus_reset(nsp32_hw_data *data)* reset SCSI bus */ nsp32_write1 (base,SCSI_BUS_CONTROL ,BUSCTL_RST ); -udelay (RESET_HOLD_TIME ); +mdelay (RESET_HOLD_TIME /1000 );nsp32_write1 (base,SCSI_BUS_CONTROL ,0 );for (i =0 ; i <5 ; i++) { intrdat =nsp32_read2 (base,IRQ_STATUS );/* dummy read */
drivers/scsi/scsi.c +3 -0
@@ -1031,6 +1031,9 @@ int scsi_get_vpd_page(struct scsi_device *sdev, u8 page, unsigned char *buf, {int i, result; +if (sdev->skip_vpd_pages) + goto fail; +/* Ask for all the pages supported by this device */ result =scsi_vpd_inquiry (sdev, buf,0 , buf_len);if (result)
drivers/scsi/virtio_scsi.c +1 -1
@@ -751,7 +751,7 @@ static void __virtscsi_set_affinity(struct virtio_scsi *vscsi, bool affinity) vscsi->affinity_hint_set = true; }else { -for (i =0 ; i < vscsi->num_queues -VIRTIO_SCSI_VQ_BASE ; i++) +for (i =0 ; i < vscsi->num_queues; i++)virtqueue_set_affinity (vscsi->req_vqs[i].vq,-1 ); vscsi->affinity_hint_set = false;
drivers/staging/zcache/zcache-main.c +4 -2
@@ -1811,10 +1811,12 @@ static int zcache_comp_init(void)#else if (*zcache_comp_name !='\0' ) { ret =crypto_has_comp (zcache_comp_name,0 ,0 ); -if (!ret) +if (!ret) {pr_info ("zcache: %s not supported\n" , zcache_comp_name); - goto out; + ret =1 ; + goto out; + } }if (!ret)strcpy (zcache_comp_name,"lzo" );
drivers/staging/zram/zram_drv.c +1 -1
@@ -432,7 +432,7 @@ static inline int valid_io_request(struct zram *zram, struct bio *bio) end = start + (bio->bi_size >>SECTOR_SHIFT ); bound = zram->disksize >>SECTOR_SHIFT ;/* out of range range */ -if (unlikely (start >= bound || end >= bound || start > end)) +if (unlikely (start >= bound || end > bound || start > end))return 0 ;/* I/O request is valid */
drivers/usb/core/hub.c +3 -2
@@ -4796,7 +4796,8 @@ static void hub_events(void) hub->ports[i -1 ]->child;dev_dbg (hub_dev,"warm reset port %d\n" , i); -if (!udev) { +if (!udev || !(portstatus & +USB_PORT_STAT_CONNECTION )) { status =hub_port_reset (hub, i,NULL ,HUB_BH_RESET_TIME , true);
@@ -4806,8 +4807,8 @@ static void hub_events(void)usb_lock_device (udev); status =usb_reset_device (udev);usb_unlock_device (udev); + connect_change =0 ; } - connect_change =0 ; }if (connect_change)
fs/btrfs/tree-log.c +2 -3
@@ -3728,8 +3728,9 @@ next_slot: } log_extents: +btrfs_release_path (path); +btrfs_release_path (dst_path);if (fast_search) { -btrfs_release_path (dst_path); ret =btrfs_log_changed_extents (trans, root, inode, dst_path);if (ret) { err = ret;
@@ -3746,8 +3747,6 @@ log_extents: }if (inode_only ==LOG_INODE_ALL &&S_ISDIR (inode->i_mode)) { -btrfs_release_path (path); -btrfs_release_path (dst_path); ret =log_directory_changes (trans, root, inode, path, dst_path);if (ret) { err = ret;
fs/cifs/cifsencrypt.c +1 -1
@@ -389,7 +389,7 @@ find_domain_name(struct cifs_ses *ses, const struct nls_table *nls_cp)if (blobptr + attrsize > blobend)break ;if (type ==NTLMSSP_AV_NB_DOMAIN_NAME ) { -if (!attrsize) +if (!attrsize || attrsize >=CIFS_MAX_DOMAINNAME_LEN )break ;if (!ses->domainName) { ses->domainName =
fs/cifs/cifsglob.h +1 -0
@@ -44,6 +44,7 @@#define MAX_TREE_SIZE (2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1)#define MAX_SERVER_SIZE 15#define MAX_SHARE_SIZE 80 +#define CIFS_MAX_DOMAINNAME_LEN 256/* max domain name length */ #define MAX_USERNAME_SIZE 256/* reasonable maximum for current servers */ #define MAX_PASSWORD_SIZE 512/* max for windows seems to be 256 wide chars */
fs/cifs/connect.c +4 -3
@@ -1662,7 +1662,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,if (string ==NULL ) goto out_nomem; -if (strnlen (string,256 ) ==256 ) { +if (strnlen (string,CIFS_MAX_DOMAINNAME_LEN ) + ==CIFS_MAX_DOMAINNAME_LEN ) {printk (KERN_WARNING "CIFS: domain name too" " long\n" ); goto cifs_parse_mount_err;
@@ -2288,8 +2289,8 @@ cifs_put_smb_ses(struct cifs_ses *ses)#ifdef CONFIG_KEYS -/* strlen("cifs:a:") + INET6_ADDRSTRLEN + 1 */ -#define CIFSCREDS_DESC_SIZE (7 + INET6_ADDRSTRLEN + 1) +/* strlen("cifs:a:") + CIFS_MAX_DOMAINNAME_LEN + 1 */ +#define CIFSCREDS_DESC_SIZE (7 + CIFS_MAX_DOMAINNAME_LEN + 1)/* Populate username and pw fields from keyring if possible */ static int
fs/cifs/readdir.c +8 -0
@@ -111,6 +111,14 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name,return ; } +/* +* If we know that the inode will need to be revalidated immediately, +* then don't create a new dentry for it. We'll end up doing an on +* the wire call either way and this spares us an invalidation. +*/ +if (fattr->cf_flags &CIFS_FATTR_NEED_REVAL ) +return ; + dentry =d_alloc (parent, name);if (!dentry)return ;
fs/cifs/sess.c +3 -3
@@ -198,7 +198,7 @@ static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses, bytes_ret =0 ; }else bytes_ret =cifs_strtoUTF16 ((__le16 *) bcc_ptr, ses->domainName, -256 , nls_cp); +CIFS_MAX_DOMAINNAME_LEN , nls_cp); bcc_ptr +=2 * bytes_ret; bcc_ptr +=2 ;/* account for null terminator */
@@ -256,8 +256,8 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,/* copy domain */ if (ses->domainName !=NULL ) { -strncpy (bcc_ptr, ses->domainName,256 ); - bcc_ptr +=strnlen (ses->domainName,256 ); +strncpy (bcc_ptr, ses->domainName,CIFS_MAX_DOMAINNAME_LEN ); + bcc_ptr +=strnlen (ses->domainName,CIFS_MAX_DOMAINNAME_LEN ); }/* else we will send a null domain name so the server will default to its own domain */ *bcc_ptr =0 ;
fs/debugfs/inode.c +22 -47
91 lines not on this page · raw message
fs/ext4/extents.c +1 -1
@@ -4389,7 +4389,7 @@ void ext4_ext_truncate(handle_t *handle, struct inode *inode) retry: err =ext4_es_remove_extent (inode, last_block,EXT_MAX_BLOCKS - last_block); -if (err ==ENOMEM ) { +if (err == -ENOMEM ) {cond_resched ();congestion_wait (BLK_RW_ASYNC ,HZ /50 ); goto retry;
fs/ext4/ialloc.c +5 -5
@@ -734,11 +734,8 @@ repeat_in_this_group: ino =ext4_find_next_zero_bit ((unsigned long *) inode_bitmap_bh->b_data,EXT4_INODES_PER_GROUP (sb), ino); -if (ino >=EXT4_INODES_PER_GROUP (sb)) { -if (++group == ngroups) - group =0 ; -continue ; - } +if (ino >=EXT4_INODES_PER_GROUP (sb)) + goto next_group;if (group ==0 && (ino+1 ) <EXT4_FIRST_INO (sb)) {ext4_error (sb,"reserved inode found cleared - " "inode=%lu" , ino +1 );
@@ -768,6 +765,9 @@ repeat_in_this_group: goto got;/* we grabbed the inode! */ if (ino <EXT4_INODES_PER_GROUP (sb)) goto repeat_in_this_group; +next_group: +if (++group == ngroups) + group =0 ; } err = -ENOSPC ; goto out;
fs/ext4/ioctl.c +4 -2
@@ -77,8 +77,10 @@ static void swap_inode_data(struct inode *inode1, struct inode *inode2)memswap (ei1->i_data, ei2->i_data,sizeof (ei1->i_data));memswap (&ei1->i_flags, &ei2->i_flags,sizeof (ei1->i_flags));memswap (&ei1->i_disksize, &ei2->i_disksize,sizeof (ei1->i_disksize)); -memswap (&ei1->i_es_tree, &ei2->i_es_tree,sizeof (ei1->i_es_tree)); -memswap (&ei1->i_es_lru_nr, &ei2->i_es_lru_nr,sizeof (ei1->i_es_lru_nr)); +ext4_es_remove_extent (inode1,0 ,EXT_MAX_BLOCKS ); +ext4_es_remove_extent (inode2,0 ,EXT_MAX_BLOCKS ); +ext4_es_lru_del (inode1); +ext4_es_lru_del (inode2); isize =i_size_read (inode1);i_size_write (inode1,i_size_read (inode2));
fs/ext4/super.c +18 -2
@@ -1341,7 +1341,7 @@ static const struct mount_opts { {Opt_delalloc,EXT4_MOUNT_DELALLOC , MOPT_EXT4_ONLY | MOPT_SET | MOPT_EXPLICIT}, {Opt_nodelalloc, EXT4_MOUNT_DELALLOC, - MOPT_EXT4_ONLY | MOPT_CLEAR | MOPT_EXPLICIT}, + MOPT_EXT4_ONLY | MOPT_CLEAR}, {Opt_journal_checksum, EXT4_MOUNT_JOURNAL_CHECKSUM, MOPT_EXT4_ONLY | MOPT_SET}, {Opt_journal_async_commit, (EXT4_MOUNT_JOURNAL_ASYNC_COMMIT |
@@ -3445,7 +3445,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) }if (test_opt (sb,DIOREAD_NOLOCK )) {ext4_msg (sb,KERN_ERR ,"can't mount with " -"both data=journal and delalloc" ); +"both data=journal and dioread_nolock" ); goto failed_mount; }if (test_opt (sb,DELALLOC ))
@@ -4646,6 +4646,21 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) goto restore_opts; } +if (test_opt (sb,DATA_FLAGS ) ==EXT4_MOUNT_JOURNAL_DATA ) { +if (test_opt2 (sb,EXPLICIT_DELALLOC )) { +ext4_msg (sb,KERN_ERR ,"can't mount with " +"both data=journal and delalloc" ); + err = -EINVAL ; + goto restore_opts; + } +if (test_opt (sb,DIOREAD_NOLOCK )) { +ext4_msg (sb,KERN_ERR ,"can't mount with " +"both data=journal and dioread_nolock" ); + err = -EINVAL ; + goto restore_opts; + } + } +if (sbi->s_mount_flags &EXT4_MF_FS_ABORTED )ext4_abort (sb,"Abort forced by user" );
@@ -5400,6 +5415,7 @@ static void __exit ext4_exit_fs(void)kset_unregister (ext4_kset);ext4_exit_system_zone ();ext4_exit_pageio (); +ext4_exit_es (); }MODULE_AUTHOR ("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others" );
fs/lockd/clntlock.c +9 -4
@@ -64,12 +64,17 @@ struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init) nlm_init->protocol, nlm_version, nlm_init->hostname, nlm_init->noresvport, nlm_init->net); -if (host ==NULL ) { -lockd_down (nlm_init->net); -return ERR_PTR (-ENOLCK ); - } +if (host ==NULL ) + goto out_nohost; +if (host->h_rpcclnt ==NULL &&nlm_bind_host (host) ==NULL ) + goto out_nobind;return host; +out_nobind: +nlmclnt_release_host (host); +out_nohost: +lockd_down (nlm_init->net); +return ERR_PTR (-ENOLCK ); }EXPORT_SYMBOL_GPL (nlmclnt_init);
fs/lockd/clntproc.c +3 -2
@@ -125,14 +125,15 @@ static void nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) {struct nlm_args *argp = &req->a_args;struct nlm_lock *lock = &argp->lock; +char *nodename = req->a_host->h_rpcclnt->cl_nodename;nlmclnt_next_cookie (&argp->cookie);memcpy (&lock->fh,NFS_FH (file_inode (fl->fl_file)),sizeof (struct nfs_fh )); - lock->caller =utsname ()->nodename; + lock->caller = nodename; lock->oh.data = req->a_owner; lock->oh.len =snprintf (req->a_owner,sizeof (req->a_owner),"%u@%s" , (unsigned int )fl->fl_u.nfs_fl.owner->pid, -utsname ()->nodename); + nodename); lock->svid = fl->fl_u.nfs_fl.owner->pid; lock->fl.fl_start = fl->fl_start; lock->fl.fl_end = fl->fl_end;
fs/reiserfs/procfs.c +19 -80
171 lines not on this page · raw message
fs/reiserfs/super.c +1 -2
@@ -499,6 +499,7 @@ int remove_save_link(struct inode *inode, int truncate)static void reiserfs_kill_sb (struct super_block *s) {if (REISERFS_SB (s)) { +reiserfs_proc_info_done (s);/* * Force any pending inode evictions to occur now. Any * inodes to be removed that have extended attributes
@@ -554,8 +555,6 @@ static void reiserfs_put_super(struct super_block *s) REISERFS_SB(s)->reserved_blocks); } -reiserfs_proc_info_done (s); -reiserfs_write_unlock (s);mutex_destroy (&REISERFS_SB (s)->lock);kfree (s->s_fs_info);
include/linux/ftrace_event.h +6 -4
@@ -78,6 +78,11 @@ struct trace_iterator {/* trace_seq for __print_flags() and __print_symbolic() etc. */ struct trace_seq tmp_seq; +cpumask_var_t started; + +/* it's true when current open file is snapshot */ +bool snapshot; +/* The below is zeroed out in pipe_read */ struct trace_seq seq;struct trace_entry *ent;
@@ -90,10 +95,7 @@ struct trace_iterator {loff_t pos;long idx; -cpumask_var_t started; - -/* it's true when current open file is snapshot */ -bool snapshot; +/* All new field here will be zeroed out in pipe_read */ };enum trace_iter_flags {
include/linux/regmap.h +1 -0
@@ -15,6 +15,7 @@#include <linux/list.h> #include <linux/rbtree.h> +#include <linux/err.h> struct module ;struct device ;
include/linux/sunrpc/sched.h +1 -0
@@ -130,6 +130,7 @@ struct rpc_task_setup {#define RPC_TASK_SOFTCONN 0x0400/* Fail if can't connect */ #define RPC_TASK_SENT 0x0800/* message was sent */ #define RPC_TASK_TIMEOUT 0x1000/* fail with ETIMEDOUT on timeout */ +#define RPC_TASK_NOCONNECT 0x2000/* return ENOTCONN if not connected */ #define RPC_IS_ASYNC (t) ((t)->tk_flags & RPC_TASK_ASYNC)#define RPC_IS_SWAPPER (t) ((t)->tk_flags & RPC_TASK_SWAPPER)
kernel/trace/trace.c +84 -44
236 lines not on this page · raw message
kernel/trace/trace_irqsoff.c +2 -2
@@ -373,7 +373,7 @@ start_critical_timing(unsigned long ip, unsigned long parent_ip)struct trace_array_cpu *data;unsigned long flags; -if (likely (!tracer_enabled)) +if (!tracer_enabled || !tracing_is_enabled ())return ; cpu =raw_smp_processor_id ();
@@ -416,7 +416,7 @@ stop_critical_timing(unsigned long ip, unsigned long parent_ip)else return ; -if (!tracer_enabled) +if (!tracer_enabled || !tracing_is_enabled ())return ; data =per_cpu_ptr (tr->trace_buffer.data, cpu);
net/sunrpc/clnt.c +4 -0
@@ -1644,6 +1644,10 @@ call_connect(struct rpc_task *task) task->tk_action = call_connect_status;if (task->tk_status <0 )return ; +if (task->tk_flags &RPC_TASK_NOCONNECT ) { +rpc_exit (task, -ENOTCONN ); +return ; + }xprt_connect (task); } }
net/sunrpc/netns.h +1 -0
@@ -23,6 +23,7 @@ struct sunrpc_net {struct rpc_clnt *rpcb_local_clnt4;spinlock_t rpcb_clnt_lock;unsigned int rpcb_users; + unsigned int rpcb_is_af_local : 1;struct mutex gssp_lock;wait_queue_head_t gssp_wq;
net/sunrpc/rpcb_clnt.c +35 -13
136 lines not on this page · raw message
sound/usb/6fire/comm.c +33 -5
@@ -110,19 +110,37 @@ static int usb6fire_comm_send_buffer(u8 *buffer, struct usb_device *dev)static int usb6fire_comm_write8 (struct comm_runtime *rt,u8 request,u8 reg,u8 value) { -u8 buffer[13 ];/* 13: maximum length of message */ +u8 *buffer; +int ret; + +/* 13: maximum length of message */ + buffer =kmalloc (13 ,GFP_KERNEL ); +if (!buffer) +return -ENOMEM ;usb6fire_comm_init_buffer (buffer,0x00 , request, reg, value,0x00 ); -return usb6fire_comm_send_buffer (buffer, rt->chip->dev); + ret =usb6fire_comm_send_buffer (buffer, rt->chip->dev); + +kfree (buffer); +return ret; }static int usb6fire_comm_write16 (struct comm_runtime *rt,u8 request,u8 reg,u8 vl,u8 vh) { -u8 buffer[13 ];/* 13: maximum length of message */ +u8 *buffer; +int ret; + +/* 13: maximum length of message */ + buffer =kmalloc (13 ,GFP_KERNEL ); +if (!buffer) +return -ENOMEM ;usb6fire_comm_init_buffer (buffer,0x00 , request, reg, vl, vh); -return usb6fire_comm_send_buffer (buffer, rt->chip->dev); + ret =usb6fire_comm_send_buffer (buffer, rt->chip->dev); + +kfree (buffer); +return ret; }int usb6fire_comm_init (struct sfire_chip *chip)
@@ -135,6 +153,12 @@ int usb6fire_comm_init(struct sfire_chip *chip)if (!rt)return -ENOMEM ; + rt->receiver_buffer =kzalloc (COMM_RECEIVER_BUFSIZE ,GFP_KERNEL ); +if (!rt->receiver_buffer) { +kfree (rt); +return -ENOMEM ; + } + urb = &rt->receiver; rt->serial =1 ; rt->chip = chip;
@@ -153,6 +177,7 @@ int usb6fire_comm_init(struct sfire_chip *chip) urb->interval =1 ; ret =usb_submit_urb (urb,GFP_KERNEL );if (ret <0 ) { +kfree (rt->receiver_buffer);kfree (rt); snd_printk(KERN_ERR PREFIX "cannot create comm data receiver.");return ret;
@@ -171,6 +196,9 @@ void usb6fire_comm_abort(struct sfire_chip *chip)void usb6fire_comm_destroy (struct sfire_chip *chip) { -kfree (chip->comm); +struct comm_runtime *rt = chip->comm; + +kfree (rt->receiver_buffer); +kfree (rt); chip->comm =NULL ; }
sound/usb/6fire/comm.h +1 -1
@@ -24,7 +24,7 @@ struct comm_runtime {struct sfire_chip *chip;struct urb receiver; -u8 receiver_buffer[COMM_RECEIVER_BUFSIZE ]; +u8 *receiver_buffer;u8 serial;/* urb serial */
sound/usb/endpoint.c +6 -7
@@ -591,17 +591,16 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep, ep->stride = frame_bits >>3 ; ep->silence_value = pcm_format ==SNDRV_PCM_FORMAT_U8 ?0x80 :0 ; -/* calculate max. frequency */ -if (ep->maxpacksize) { +/* assume max. frequency is 25% higher than nominal */ + ep->freqmax = ep->freqn + (ep->freqn >>2 ); + maxsize = ((ep->freqmax +0xffff ) * (frame_bits >>3 )) + >> (16 - ep->datainterval); +/* but wMaxPacketSize might reduce this */ +if (ep->maxpacksize && ep->maxpacksize < maxsize) {/* whatever fits into a max. size packet */ maxsize = ep->maxpacksize; ep->freqmax = (maxsize / (frame_bits >>3 )) << (16 - ep->datainterval); - }else { -/* no max. packet size: just take 25% higher than nominal */ - ep->freqmax = ep->freqn + (ep->freqn >>2 ); - maxsize = ((ep->freqmax +0xffff ) * (frame_bits >>3 )) - >> (16 - ep->datainterval); }if (ep->fill_max)